Re: [PATCH v5 06/12] khugepaged: introduce khugepaged_scan_bitmap for mTHP support
From: Dev Jain
Date: Fri Jun 06 2025 - 12:38:47 EST
On 01/05/25 12:26 am, Nico Pache wrote:
On Wed, Apr 30, 2025 at 4:08 AM Baolin Wang
<baolin.wang@xxxxxxxxxxxxxxxxx> wrote:
On 2025/4/29 02:12, Nico Pache wrote:
khugepaged scans anons PMD ranges for potential collapse to a hugepage.
To add mTHP support we use this scan to instead record chunks of utilized
sections of the PMD.
khugepaged_scan_bitmap uses a stack struct to recursively scan a bitmap
that represents chunks of utilized regions. We can then determine what
mTHP size fits best and in the following patch, we set this bitmap while
scanning the anon PMD.
max_ptes_none is used as a scale to determine how "full" an order must
be before being considered for collapse.
When attempting to collapse an order that has its order set to "always"
lets always collapse to that order in a greedy manner without
considering the number of bits set.
Signed-off-by: Nico Pache <npache@xxxxxxxxxx>
---
include/linux/khugepaged.h | 4 ++
mm/khugepaged.c | 94 ++++++++++++++++++++++++++++++++++----
2 files changed, 89 insertions(+), 9 deletions(-)
diff --git a/include/linux/khugepaged.h b/include/linux/khugepaged.h
index 1f46046080f5..18fe6eb5051d 100644
--- a/include/linux/khugepaged.h
+++ b/include/linux/khugepaged.h
@@ -1,6 +1,10 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _LINUX_KHUGEPAGED_H
#define _LINUX_KHUGEPAGED_H
+#define KHUGEPAGED_MIN_MTHP_ORDER 2
Still better to add some comments to explain explicitly why choose 2 as
the MIN_MTHP_ORDER.
Ok i'll add a note that explicitly states that the min order of anon mTHPs is 2
+#define KHUGEPAGED_MIN_MTHP_NR (1<<KHUGEPAGED_MIN_MTHP_ORDER)
+#define MAX_MTHP_BITMAP_SIZE (1 << (ilog2(MAX_PTRS_PER_PTE) - KHUGEPAGED_MIN_MTHP_ORDER))
+#define MTHP_BITMAP_SIZE (1 << (HPAGE_PMD_ORDER - KHUGEPAGED_MIN_MTHP_ORDER))
extern unsigned int khugepaged_max_ptes_none __read_mostly;
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
diff --git a/mm/khugepaged.c b/mm/khugepaged.c
index e21998a06253..6e67db86409a 100644
--- a/mm/khugepaged.c
+++ b/mm/khugepaged.c
@@ -94,6 +94,11 @@ static DEFINE_READ_MOSTLY_HASHTABLE(mm_slots_hash, MM_SLOTS_HASH_BITS);
static struct kmem_cache *mm_slot_cache __ro_after_init;
+struct scan_bit_state {
+ u8 order;
+ u16 offset;
+};
+
struct collapse_control {
bool is_khugepaged;
@@ -102,6 +107,18 @@ struct collapse_control {
/* nodemask for allocation fallback */
nodemask_t alloc_nmask;
+
+ /*
+ * bitmap used to collapse mTHP sizes.
+ * 1bit = order KHUGEPAGED_MIN_MTHP_ORDER mTHP
+ */
+ DECLARE_BITMAP(mthp_bitmap, MAX_MTHP_BITMAP_SIZE);
+ DECLARE_BITMAP(mthp_bitmap_temp, MAX_MTHP_BITMAP_SIZE);
+ struct scan_bit_state mthp_bitmap_stack[MAX_MTHP_BITMAP_SIZE];
+};
+
+struct collapse_control khugepaged_collapse_control = {
+ .is_khugepaged = true,
};
/**
@@ -851,10 +868,6 @@ static void khugepaged_alloc_sleep(void)
remove_wait_queue(&khugepaged_wait, &wait);
}
-struct collapse_control khugepaged_collapse_control = {
- .is_khugepaged = true,
-};
-
static bool khugepaged_scan_abort(int nid, struct collapse_control *cc)
{
int i;
@@ -1118,7 +1131,8 @@ static int alloc_charge_folio(struct folio **foliop, struct mm_struct *mm,
static int collapse_huge_page(struct mm_struct *mm, unsigned long address,
int referenced, int unmapped,
- struct collapse_control *cc)
+ struct collapse_control *cc, bool *mmap_locked,
+ u8 order, u16 offset)
{
LIST_HEAD(compound_pagelist);
pmd_t *pmd, _pmd;
@@ -1137,8 +1151,12 @@ static int collapse_huge_page(struct mm_struct *mm, unsigned long address,
* The allocation can take potentially a long time if it involves
* sync compaction, and we do not need to hold the mmap_lock during
* that. We will recheck the vma after taking it again in write mode.
+ * If collapsing mTHPs we may have already released the read_lock.
*/
- mmap_read_unlock(mm);
+ if (*mmap_locked) {
+ mmap_read_unlock(mm);
+ *mmap_locked = false;
+ }
result = alloc_charge_folio(&folio, mm, cc, HPAGE_PMD_ORDER);
if (result != SCAN_SUCCEED)
@@ -1273,12 +1291,72 @@ static int collapse_huge_page(struct mm_struct *mm, unsigned long address,
out_up_write:
mmap_write_unlock(mm);
out_nolock:
+ *mmap_locked = false;
if (folio)
folio_put(folio);
trace_mm_collapse_huge_page(mm, result == SCAN_SUCCEED, result);
return result;
}
+// Recursive function to consume the bitmap
Nit: please use '/* Xxxx */' for comments in this patch.
+static int khugepaged_scan_bitmap(struct mm_struct *mm, unsigned long address,
+ int referenced, int unmapped, struct collapse_control *cc,
+ bool *mmap_locked, unsigned long enabled_orders)
+{
+ u8 order, next_order;
+ u16 offset, mid_offset;
+ int num_chunks;
+ int bits_set, threshold_bits;
+ int top = -1;
+ int collapsed = 0;
+ int ret;
+ struct scan_bit_state state;
+ bool is_pmd_only = (enabled_orders == (1 << HPAGE_PMD_ORDER));
+
+ cc->mthp_bitmap_stack[++top] = (struct scan_bit_state)
+ { HPAGE_PMD_ORDER - KHUGEPAGED_MIN_MTHP_ORDER, 0 };
+
+ while (top >= 0) {
+ state = cc->mthp_bitmap_stack[top--];
+ order = state.order + KHUGEPAGED_MIN_MTHP_ORDER;
+ offset = state.offset;
+ num_chunks = 1 << (state.order);
+ // Skip mTHP orders that are not enabled
+ if (!test_bit(order, &enabled_orders))
+ goto next;
+
+ // copy the relavant section to a new bitmap
+ bitmap_shift_right(cc->mthp_bitmap_temp, cc->mthp_bitmap, offset,
+ MTHP_BITMAP_SIZE);
+
+ bits_set = bitmap_weight(cc->mthp_bitmap_temp, num_chunks);
+ threshold_bits = (HPAGE_PMD_NR - khugepaged_max_ptes_none - 1)
+ >> (HPAGE_PMD_ORDER - state.order);
+
+ //Check if the region is "almost full" based on the threshold
+ if (bits_set > threshold_bits || is_pmd_only
+ || test_bit(order, &huge_anon_orders_always)) {
When testing this patch, I disabled the PMD-sized THP and enabled
64K-sized mTHP, but it still attempts to collapse into a PMD-sized THP
(since bits_set > threshold_bits is ture). This doesn't seem reasonable?
We are still required to have PMD enabled for mTHP collapse to work.
It's a limitation of the current khugepaged code (it currently only
adds mm_slots when PMD is enabled).
We've discussed this in the past and are looking for a proper way
forward, but the solution becomes tricky.
Not sure if this is still a problem, but does this patch solve
it?
https://lore.kernel.org/all/20250211111326.14295-12-dev.jain@xxxxxxx/
However I'm surprised that it still collapses due to the code below.
I'll test this out later today.
+ if (!test_bit(order, &enabled_orders))
+ goto next;
+ ret = collapse_huge_page(mm, address, referenced, unmapped, cc,
+ mmap_locked, order, offset * KHUGEPAGED_MIN_MTHP_NR);
+ if (ret == SCAN_SUCCEED) {
+ collapsed += (1 << order);
+ continue;
+ }
+ }
+
+next:
+ if (state.order > 0) {
+ next_order = state.order - 1;
+ mid_offset = offset + (num_chunks / 2);
+ cc->mthp_bitmap_stack[++top] = (struct scan_bit_state)
+ { next_order, mid_offset };
+ cc->mthp_bitmap_stack[++top] = (struct scan_bit_state)
+ { next_order, offset };
+ }
+ }
+ return collapsed;
+}
+
static int khugepaged_scan_pmd(struct mm_struct *mm,
struct vm_area_struct *vma,
unsigned long address, bool *mmap_locked,
@@ -1445,9 +1523,7 @@ static int khugepaged_scan_pmd(struct mm_struct *mm,
pte_unmap_unlock(pte, ptl);
if (result == SCAN_SUCCEED) {
result = collapse_huge_page(mm, address, referenced,
- unmapped, cc);
- /* collapse_huge_page will return with the mmap_lock released */
- *mmap_locked = false;
+ unmapped, cc, mmap_locked, HPAGE_PMD_ORDER, 0);
}
out:
trace_mm_khugepaged_scan_pmd(mm, &folio->page, writable, referenced,
Return-Path: <linux-kernel+bounces-673108-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 6FD0641E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:14:55 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 4F4A61892D71
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:15:08 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 2105928E5EB;
Wed, 4 Jun 2025 11:14:48 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="h4DH7Vyp"
Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 67DAC24DCF1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:14:45 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.53
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749035687; cv=none; b=PrEw+94ptqZWCNKjfpP/aZhLEuEWxkc7HkS/0CyWqHsN9FKWfKITbgCknwItUX0Kkesp5PbRMPcnIdYPkPf8UK08dU5vzF/au+nL9pOFs6OJd6g4SqHr+2X6nbzD/cx/VdRaiH2HNCfryLimDjSgbEvevpWGQ/DBs66JTvewEao=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749035687; c=relaxed/simple;
bh=cBgnUFe9NIi5atwAq48uMs0hePgq9x+WEyJyAKbr08I=;
h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
To:Cc:Content-Type; b=E+aMOgnQayLV/tViTwrA8RxjI+ITwFeXT+fnc4oB/ypUHNaJqljlghfDGglnbGKG90FdbZ4jxcsWQ3aQbBKCdzjNtCfoI94EyD1CB10DUEdFVQH303fGDB4nylM9TcZN301m2+BDN5aZQYfI2el4Q1R/Do7x9nlbVrcXIm4ed80=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=h4DH7Vyp; arc=none smtp.client-ip=209.85.221.53
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-3a4ef05f631so677674f8f.3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 04:14:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1749035684; x=1749640484; darn=vger.kernel.org;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:from:to:cc:subject:date
:message-id:reply-to;
bh=/W3SslCIkybQ8nlaw9YaSUzaYWq8vA0m3x6Q+lRAvHA=;
b=h4DH7VyptlmBYB2rZzJT2jQ6yRoS52xzVhncgNnsuwraJOdPIjltrx8eVL1U21QLZl
LTnrKt3JedWY1K9x0oDR+FkZQ4IAb+U/4NB8/ULF3f7J77KuvUGMxJ54D//3TEpEHVad
UA67e4FLIindqg/cwjxesYPBo0zCsVzM6TEaTXy1RuA/bKv5HF7ImfLqtxgH5OYqwO2e
JqlYkdR0ctV63TsCFi7W8iBVtM8FN+qkazpAHNpcjF9K7l/v6hodd4Go95v2wYDzR0+E
rsGz2nMUCnt2MyOzQXGyI1hvtOwzzF9Y8FIvMQug+z/nwsADagUtAk8PZtzh2ol1iNLQ
U06A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749035684; x=1749640484;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=/W3SslCIkybQ8nlaw9YaSUzaYWq8vA0m3x6Q+lRAvHA=;
b=Mr1W+OOn+DK4RtEsGl0V5GbZFKYQQ9BYI4aHxCs7EFkHquvHwNHVw//OIrTEEwFWrB
ReZPaD53SYpVD+ii31lPsBTpCblcwVoYaGVRrt+hiTDIhMT0g3DEjHbhM5nUMNwUzV35
B18uRxuLuU6KFaYbbXT00rr3ngAgbuVOjonVmKxepfn0itU2IUIZaoU+eXVZ8EOcvkD2
AyUmsqRLHQcJr0wp0SGEx+VGNfN4/nOMISt6sG6WhJWf2gqjoqaKUN59o8uGMXDT+VBh
5bMopLhnuNSYYCmRB1ZOiO5+eUgZoRW6U+lPmblQZ/rgIjn/NgFJILzQHi1jMZVlrNDP
8v6Q==
X-Forwarded-Encrypted: i=1; AJvYcCUGIl44guHl2fDC5zCFkXfJwWaxWR/dklnX/P3VHQ1nXGEr1ChVp9ETBrSmT5cEkZG58usdA1sL5Kvc1KI=@vger.kernel.org
X-Gm-Message-State: AOJu0Yy9c5w5FmSHzyJSx1e4kPX5nUwTX0GN+F6veAbOzhMxFbZOG8bl
GN1PE3V+I3QIbbKcyj72lreNDWLuPwG0IaURSI4jhRA7Xi68eXe+1GrbV/7DFN6b1CyQ0NaYhM8
XzuaUtLd4ciMO7tvaemeFBjiQJknxplk=
X-Gm-Gg: ASbGncv7zUKMMna26bUNu6/AGfLIc+u7zc7UDeds/+5b8yXDwvkRL8RdJS89ZXwZjoa
fObqUD2oCPoMMHXJSOk5o9XIgKDBRqojiMp078WHZnK29R8vDbpYgmqgiSV6NgD8JhTka02iTDg
Hesydd2UsTzlC4GfQ2Iht79sue0m4ioVZIeDUnipjK/Mav
X-Google-Smtp-Source: AGHT+IE0Qn6gOQ8QGmAs8CrGPJdavUw2eWZCGOUk8VhczlRhK7Yu7ysdfiEIEcTehO1ISuGC68kBYW8rIShTXFmyYbE=
X-Received: by 2002:a05:6000:2305:b0:3a3:584b:f5d7 with SMTP id
ffacd0b85a97d-3a51d91f8a4mr726947f8f.5.1749035683391; Wed, 04 Jun 2025
04:14:43 -0700 (PDT)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
References: <1749016492-31835-1-git-send-email-zhiguo.niu@xxxxxxxxxx>
<061c94ab-ff57-42e3-ad7c-592dfb2a822e@xxxxxxxxxx> <CAHJ8P3J4Q-0ckCuZhV-r_O_Hct4yqqtC0uboLjxZP1bnfBJOEg@xxxxxxxxxxxxxx>
<1791cead-c598-41dc-8c6c-811787df14b7@xxxxxxxxxx>
In-Reply-To: <1791cead-c598-41dc-8c6c-811787df14b7@xxxxxxxxxx>
From: Zhiguo Niu <niuzhiguo84@xxxxxxxxx>
Date: Wed, 4 Jun 2025 19:14:31 +0800
X-Gm-Features: AX0GCFuDkB7CamZfWdlKurMulJGXKDq3kb6xULMz2Ze7rFIYjcGWXjRFGaXSkz0
Message-ID: <CAHJ8P3JCV9wjRXC530WgPjZx-_XEhVRoG3B9Mcn4XG_Y-x1nGQ@xxxxxxxxxxxxxx>
Subject: Re: [PATCH] f2fs: compress: fix UAF of f2fs_inode_info in f2fs_free_dic
To: Chao Yu <chao@xxxxxxxxxx>
Cc: Zhiguo Niu <zhiguo.niu@xxxxxxxxxx>, jaegeuk@xxxxxxxxxx,
linux-f2fs-devel@xxxxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
ke.wang@xxxxxxxxxx, Hao_hao.Wang@xxxxxxxxxx, baocong.liu@xxxxxxxxxx
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Chao Yu <chao@xxxxxxxxxx> =E4=BA=8E2025=E5=B9=B46=E6=9C=884=E6=97=A5=E5=91=
=A8=E4=B8=89 19:09=E5=86=99=E9=81=93=EF=BC=9A
On 6/4/25 18:49, Zhiguo Niu wrote:
> Chao Yu <chao@xxxxxxxxxx> =E4=BA=8E2025=E5=B9=B46=E6=9C=884=E6=97=A5=E5=
=91=A8=E4=B8=89 17:48=E5=86=99=E9=81=93=EF=BC=9A
>>
>> On 6/4/25 13:54, Zhiguo Niu wrote:
>>> The decompress_io_ctx may be released asynchronously after
>>> I/O completion. If this file is deleted immediately after read,
>>> and the kworker of processing post_read_wq has not been executed yet
>>> due to high workloads, It is possible that the inode(f2fs_inode_info)
>>> is evicted and freed before it is used f2fs_free_dic.
>>>
>>> The UAF case as below:
>>> Thread A Thread B
>>> - f2fs_decompress_end_io
>>> - f2fs_put_dic
>>> - queue_work
>>> add free_dic work to post_read_wq
>>> - do_unlink
>>> - iput
>>> - evict
>>> - call_rcu
>>> This file is deleted after read.
>>>
>>> Thread C kworker to process post_=
read_wq
>>> - rcu_do_batch
>>> - f2fs_free_inode
>>> - kmem_cache_free
>>> inode is freed by rcu
>>> - process_scheduled_work=
s
>>> - f2fs_late_free_dic
>>> - f2fs_free_dic
>>> - f2fs_release_decomp=
_mem
>>> read (dic->inode)->i_compress_a=
lgorithm
>>>
>>> This patch increase inode->i_count before f2fs_free_dic and decrease =
it
>>> after free the dic.
>>>
>>> Cc: Daeho Jeong <daehojeong@xxxxxxxxxx>
>>> Fixes: bff139b49d9f ("f2fs: handle decompress only post processing in=
softirq")
>>> Signed-off-by: Zhiguo Niu <zhiguo.niu@xxxxxxxxxx>
>>> Signed-off-by: Baocong Liu <baocong.liu@xxxxxxxxxx>
>>> ---
>>> fs/f2fs/compress.c | 19 ++++++++++++++-----
>>> 1 file changed, 14 insertions(+), 5 deletions(-)
>>>
>>> diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
>>> index b3c1df9..6b3b3a7 100644
>>> --- a/fs/f2fs/compress.c
>>> +++ b/fs/f2fs/compress.c
>>> @@ -1687,7 +1687,7 @@ static void f2fs_release_decomp_mem(struct deco=
mpress_io_ctx *dic,
>>> }
>>>
>>> static void f2fs_free_dic(struct decompress_io_ctx *dic,
>>> - bool bypass_destroy_callback);
>>> + bool bypass_destroy_callback, bool late_free);
>>>
>>> struct decompress_io_ctx *f2fs_alloc_dic(struct compress_ctx *cc)
>>> {
>>> @@ -1743,12 +1743,12 @@ struct decompress_io_ctx *f2fs_alloc_dic(stru=
ct compress_ctx *cc)
>>> return dic;
>>>
>>> out_free:
>>> - f2fs_free_dic(dic, true);
>>> + f2fs_free_dic(dic, true, false);
>>> return ERR_PTR(ret);
>>> }
>>>
>>> static void f2fs_free_dic(struct decompress_io_ctx *dic,
>>> - bool bypass_destroy_callback)
>>> + bool bypass_destroy_callback, bool late_free)
>>> {
>>> int i;
>>>
>>> @@ -1775,6 +1775,11 @@ static void f2fs_free_dic(struct decompress_io=
_ctx *dic,
>>> }
>>>
>>> page_array_free(dic->inode, dic->rpages, dic->nr_rpages);
>>> + if (late_free) {
>>> + spin_lock(&dic->inode->i_lock);
>>> + atomic_dec(&dic->inode->i_count);
>>> + spin_unlock(&dic->inode->i_lock);
>>
>> If it is the last one release i_count, it needs to call iput_final to =
evict inode
>> like what iput did, so we'd better to call iput() here?
> Hi Chao,
> Yes, we have also tested this method(iput/__iget), and it worked.
> Just think It is simpler and easier to read to directly operate
> i_count, and then free it
> by relying on the memory module when i_count=3D0.
> But It seems iput/__iget is better.
>>
>>> + }
>>> kmem_cache_free(dic_entry_slab, dic);
>>> }
>>>
>>> @@ -1783,16 +1788,20 @@ static void f2fs_late_free_dic(struct work_st=
ruct *work)
>>> struct decompress_io_ctx *dic =3D
>>> container_of(work, struct decompress_io_ctx, free_work)=
;
>>>
>>> - f2fs_free_dic(dic, false);
>>> + f2fs_free_dic(dic, false, true);
>>> }
>>>
>>> static void f2fs_put_dic(struct decompress_io_ctx *dic, bool in_task=
)
>>> {
>>> if (refcount_dec_and_test(&dic->refcnt)) {
>>> if (in_task) {
>>> - f2fs_free_dic(dic, false);
>>> + f2fs_free_dic(dic, false, false);
>>> } else {
>>> INIT_WORK(&dic->free_work, f2fs_late_free_dic);
>>> + /* to avoid inode is evicted simultaneously */
>>> + spin_lock(&dic->inode->i_lock);
>>> + atomic_inc(&dic->inode->i_count);
>>> + spin_unlock(&dic->inode->i_lock);
>>
>> iget()?
>>
>> BTW, can we store i_compress_algorithm in dic to avoid inode access?
>
> Also thought of this method, but it would require more changes.
> dic->inode used in f2fs_free_dic are all needed to modify except
> i_compress_algorithm.
> such as page_array_free(dic->inode),
Zhiguo,
page_array_free() parses dic->inode to get sbi only, so we can pass sbi t=
o
page_array_free() directly to avoid using dic->inode.
Hi Chao,
but now sbi is not in dic structure, so we also need to add it ?
> allow_memalloc_for_decomp(F2FS_I_SB(dic->inode)).
>
> Do you have any other suggestions?
Using iget/iput looks fine to me, please go ahead.
OK~
thanks!
Thanks,
> thanks=EF=BC=81
>
>>
>> Thanks,
>>
>>> queue_work(F2FS_I_SB(dic->inode)->post_read_wq,
>>> &dic->free_work);
>>> }
>>
Return-Path: <linux-kernel+bounces-673109-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 6CD8A41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:15:47 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 3E0181756F4
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:15:48 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 51A0428E607;
Wed, 4 Jun 2025 11:15:37 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="Ysm7foVG";
dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="X7DFucy+"
Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3D8C417996;
Wed, 4 Jun 2025 11:15:33 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.165.32
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749035736; cv=fail; b=AHBbMCS4KWkvv/Q4R+bMMpSLktP5+TbabyvmC+n4nMJWrWqytvCGdffK4ZGxTguIX1IzWE+OzCQOh20QsHbmwf+5q9Pg7aMsAMnUiRT1ZtU7pS20vwHWQGyeuDNHiigIMLA97QwC0ctwmlKUPiGqByYy8+ENfhQm5G0f5/eBHE8=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749035736; c=relaxed/simple;
bh=yokaSWPvlfIJV7QXvIjaQIoj1OrMJELGlXOV7Nu4eQY=;
h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To:
Content-Type:MIME-Version; b=FYrKX8a1XInuq1jOzb+w7NWNUQTkc9gDu9gqEEYBtUQhfvnh57GgRYtp4hf4YU1AxJwzJYAgTg4QH8h0RMlR9dfou/APWSwKW7xijP60hTs7ZIX3+4aTig6wjfSqmPxJN6Xf+T7jg7dz3lcReBT56X8glhS9DrVX+F2bL0T2r3g=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=Ysm7foVG; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=X7DFucy+; arc=fail smtp.client-ip=205.220.165.32
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com
Received: from pps.filterd (m0246617.ppops.net [127.0.0.1])
by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5549Mf4c010211;
Wed, 4 Jun 2025 11:15:26 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc
:content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=
corp-2025-04-25; bh=J1TN4YafqE12NHrVV9l9alWhOv0aWVDdk5lQy51cWpY=; b=
Ysm7foVGpaO/ZMtNV0JL8p23LG0DzcKh2ryITgW9eGiMVjiVO3kCozBzqhXNz7hg
KO7DRVt1qqPwVnc2ewxGx9SmMwnCX2JjCIe2h4PMLHcmtG+/9aAY+0h2axZlsxAU
YGKHhK0/0LrnwZ5TUPa0GrtaYap5Q1OwgCe0Ab2zs2wnOUlohPrax27JGwpKxNkN
AoHyhB4+8iZRzHT8fqT7urEB4TymJqUbE+sG5Og3mWd36V0jdsrvO3H+ykuo3Kyp
XuCXVM9yLp0yKpPic5tl94IS8bG5rJAYp5QIURip8zbcxbZVMJik4/NpTiv9RmVs
BLYZlGQAN2W9tnmexq1Esg==
Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223])
by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 471g8kbrq1-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 04 Jun 2025 11:15:26 +0000 (GMT)
Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1])
by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 554B57K7040644;
Wed, 4 Jun 2025 11:15:24 GMT
Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12on2069.outbound.protection.outlook.com [40.107.244.69])
by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 46yr7avfvp-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 04 Jun 2025 11:15:24 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=OOdY0uITaVP801WsxiPbPq3QaR4YtFq6NaAJFdfwMaDnYR/j2/nn8a+xEINUtyy2TxzFMtVUHECAEDIoF27h6QYYrRv1pokPDPODRDDzpZ/+FJRgM4tHoxSj3FYhRPAchX0sjIBnH4cgpVt7tKHIf+Jcu3vzQqvbUet5fhjGJNCCq2EiQuT7RBz3JUyyIwGvmgTadxKmBHH7avBULyGoauzmWmqGPBKIcQhsWZxuoNuUq1lrdfvUALDZcWj9NTDXTnMxm7KFOoslmaSlj9HCzl23tFjZqrh2nvQuiBip85HzRNzHe0rBV+OFf9zACYB5qGverfshm+OSDAhituQM8w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=J1TN4YafqE12NHrVV9l9alWhOv0aWVDdk5lQy51cWpY=;
b=lWwQHbEtdN3PT0uhZkCleAVjKtpz3rSCVoB57ti6pe/RA4qHqX7jPknw+FMjtFT1WsFi0YjQEaT5vWEqghng8/sm3bGf/Bdhsq5QYcyI9T7CMfe25cqLSbaotcT93aQQmBwjmRQzxKUvEy/FJpgs62T7Jq1cYK3hMDTz60MQGL1mpb3rhzEJhJXmtIHa3GRJ+vCjgR82QUZ41GE2QMD/DkR+TcmjvYriG3DL5KSgek5eqXoTzdhJD+XMZi3JgMsqMCAtqfN3O05FUzfKH32VwQ6hEGrXDnaT6R+iJS4qmCR1GyMn/PqLzcqpBeLa0WiLXoujaMFSHTx19gLefWYGTg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com;
dkim=pass header.d=oracle.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=J1TN4YafqE12NHrVV9l9alWhOv0aWVDdk5lQy51cWpY=;
b=X7DFucy+LM3+5gKU+z2+VaggQXmo6t8IXAQbXSBsawj9dWfAVVIFHaBRQXoUtprvCTlG6Iy5AyAQ4+qwIet5sQk8U7GV5vhTNWfAimdR50F+R52Yi8tYADzjjOQnCf3vZoT3aR/XURDwqrODDnDwFbcBEkVD8YvEkmtAbPsr0us=
Received: from BN0PR10MB5030.namprd10.prod.outlook.com (2603:10b6:408:12a::18)
by IA0PR10MB7133.namprd10.prod.outlook.com (2603:10b6:208:400::13) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8746.40; Wed, 4 Jun
2025 11:15:21 +0000
Received: from BN0PR10MB5030.namprd10.prod.outlook.com
([fe80::44db:1978:3a20:4237]) by BN0PR10MB5030.namprd10.prod.outlook.com
([fe80::44db:1978:3a20:4237%6]) with mapi id 15.20.8792.033; Wed, 4 Jun 2025
11:15:21 +0000
Message-ID: <e16b3bf2-ad1e-4614-a134-cee44a3b1b8b@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 12:15:10 +0100
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH 1/2] KVM: SVM: Reject SEV{-ES} intra host migration if
vCPU creation is in-flight
To: Sean Christopherson <seanjc@xxxxxxxxxx>,
Paolo Bonzini <pbonzini@xxxxxxxxxx>
Cc: kvm@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
Alexander Potapenko <glider@xxxxxxxxxx>,
James Houghton <jthoughton@xxxxxxxxxx>,
Peter Gonda <pgonda@xxxxxxxxxx>,
Tom Lendacky <thomas.lendacky@xxxxxxx>
References: <20250602224459.41505-1-seanjc@xxxxxxxxxx>
<20250602224459.41505-2-seanjc@xxxxxxxxxx>
Content-Language: en-GB
From: Liam Merwick <liam.merwick@xxxxxxxxxx>
In-Reply-To: <20250602224459.41505-2-seanjc@xxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-ClientProxiedBy: SG2PR04CA0216.apcprd04.prod.outlook.com
(2603:1096:4:187::18) To BN0PR10MB5030.namprd10.prod.outlook.com
(2603:10b6:408:12a::18)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: BN0PR10MB5030:EE_|IA0PR10MB7133:EE_
X-MS-Office365-Filtering-Correlation-Id: 0dfe5d59-7de3-4ada-2e7e-08dda3591833
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016;
X-Microsoft-Antispam-Message-Info:
=?utf-8?B?MlVkVDh6L2ZUNUxjYVRpSTdlQ1NKaHRXaFBGWk1MNTV0c2N3OFNLNjNvc0l1?=
=?utf-8?B?V3dNSW1tTTFwb0tPWnRKVUY5VUk5ZXFKYnM3NnB0VHF1OVdKbGx6WHpiaCtI?=
=?utf-8?B?ZWFvVTYyZWJhdnVUUWxCRWdEZkZwZExPTm92WVlqZ1dndERISzBWL1JOY3VX?=
=?utf-8?B?cG02b0FPNGhLUTZZMHhKTTJzL3VKVnQ4bVFSUEpPSElVRHFGZGVtN000aGYr?=
=?utf-8?B?bHVxWndvbysvNnpqNWhrZk9GYS9ZRG9YZ1o2RTJGVTE0bXNCWVppekZTZlBn?=
=?utf-8?B?UlhacEJlRUdVRk50OGFDZzJFQkRiZ2QvSll1Tm1EVkprcFVpYzd2eXBHQVc4?=
=?utf-8?B?bVhQeGZEN3ZUWEN4YXBTUUdaaGN4bHB2SkRBQXRLNTI4TUJ5dTloSEt6YWQ4?=
=?utf-8?B?VTJmTkNQMUZ6eC9RWHgwNmdPaW1DTnFuNDJNSjJjYktScDFONTUwb1pHSEJ3?=
=?utf-8?B?ZnNmVmQ4RVJNZGwycEl6U1R1clJYbU5KdjZ5ZUxsUk9tUTk0dW0vMGd1NlpT?=
=?utf-8?B?TTVTMW1nVjRIdEtBajZzNktwY1lqUlIzakJjZkl5NmcvY3FKODgveEtsTGoz?=
=?utf-8?B?TjRqWFl1ZlFNV2xTWHlUcmdBYTFMaGRQNjNySjU3dCs2Nnd6MzRwUWhUbXdJ?=
=?utf-8?B?cVVhNUNVYlJQZTZPRjBRemRIeFEyZHNmNllVRExYNkRZWFJMOTEzSVJXaDVM?=
=?utf-8?B?WHFkTElxZHRQakNUZmdDOCtwTFdKOGF1dWJWbmkvRmxWaWU4Y0tSbEJQeVBJ?=
=?utf-8?B?eTk4SmJTWENqanhVTG1xVlJwM0hYTW5uYkxoV0ZJOWJlOWlZZm1YQ0RIYzA0?=
=?utf-8?B?eXFvRUpJUXFwRkQ4K3A5akhabElVYXhIc05iRUV4eUVSSkVmcHQrYURxamxp?=
=?utf-8?B?T3JycmNDbXVzWkJhc2lTVkJKVTZFSFF3dWhqamJtMnI1dVFsOWpaNDI4SkRM?=
=?utf-8?B?V2RXb29WaUIwR2pTZDY0QjFFQ2I5ZUhGRnJ4VnhBbU05YWNRZjdMTFFWZjMw?=
=?utf-8?B?SUQ5QkNHNWd2VE5pWEdMMWVidzFrWkR0OWRPYzU5RXpvZGxXUkY4aStlTGxR?=
=?utf-8?B?OThZSG5CZTlzbk45UU16YVdNTHpiNWZyMGpLbVJWYXJlL0lHWGdsYzcrcGZO?=
=?utf-8?B?eHp4VXQwbnB0dS9xQndleTBFR3BieFNZYVYvM3NwMFpqR2l5TzdEeFMxTVR2?=
=?utf-8?B?N2hYOFcxYXpGVWVjd3NLL2tKN25Gb1NVSEtobVpReUlYVStqeFlNN3FiY2F3?=
=?utf-8?B?eGk4M3RSVVE0MXU2c0Y0bWJwZkNpQzg4b05MVXc1UmFMMVF3dlZtM29tVExu?=
=?utf-8?B?czliWXlyVnBNczBnRCt6SnpDbkxib1RGRnR6TWp5M0JOSnd6eUpzV3llYWkx?=
=?utf-8?B?K3cwMXFhSG94NENNVkw1RDE1MGQyZFo1TVQ2YkhaR2czT29POTVQT2hUVTU1?=
=?utf-8?B?dWl1K2ljREtnRWdKZDJJcWdrQis0YWtWTW9qZ0RJNEdqNGFCSTBoNzVUa0h5?=
=?utf-8?B?MHhVMXNyVXByQkRMWTBpeThSMStKNkJCbXFLbi8wbUVVc0tobW5JcHVXYzVE?=
=?utf-8?B?RE9NaTR1YnYyQlBSTHViTEgvc09MZ0l1WHJLU2hiOHA5M293cjFBL0paRVFj?=
=?utf-8?B?dE96dnhnNUw1U2JzeWVtQWFyZXV2Q3JIT3Z5c1Bhcng3eE9RNzhtMGFmN09L?=
=?utf-8?B?QUYwS1BQY21Mc2hwT1h4d1dBMG42ZzNBVW9WaWNCNUsvaklUblB3VnlnYUsv?=
=?utf-8?B?NzJua0NHYXhxQ1JrVlNoT2NQMEdkdU5lazgvdHdvQVhKZnlJeTloQ05LS2lm?=
=?utf-8?B?R3hRbk9rbHlRNjlNWEhMeVRWa1dLUGR0N3d6b3BweWZidGVVb0VGQ24weHNQ?=
=?utf-8?B?eDNmVmhCRmplVy9yUFlFcUxYYkRuaDNETjA5QnZUWldRZTRZL0xJMFJJUWJ2?=
=?utf-8?Q?0cXFcrhgL+s=3D?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN0PR10MB5030.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(1800799024)(366016);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?utf-8?B?VGlJVW1DS29JUDlyVEgxODBRL1o5NU1mVy8rbVVwMEp3Q0FndWNEbURPMlV5?=
=?utf-8?B?ay9aS0VQOXVYTWhLc2M5emF0TWZJa29KOTNScTRPNjM0UW9LNXJtUzFnSUlu?=
=?utf-8?B?ZlhlMWZwZVJQUVJzeFNmcUFrdS9LRFJwcjBCUVhHZGtGbEVGMkJjMThxVkpr?=
=?utf-8?B?VmhyczJCK201YktQN2JGODBEcHN2QmQ3Qnc5QVdhcEM3U21LelNZUnAxd3RE?=
=?utf-8?B?TXFZSTErUUxXR0s1M013TEE5djdaQnUwOWVFVm9BY0Zzam51c1NuWGU2ZUFH?=
=?utf-8?B?S2s4Rm5seERRN2h3akJPWDVTRzZCZm5vckN0OE1tLy91UFcwTUdHbHFhLzZE?=
=?utf-8?B?VXhwSlE0SHVZTnlPU2NqSC9rUERRQ1FNNmxnRnBZa3FWYVZuODMzR3pCekpw?=
=?utf-8?B?T01kd1p4U3UxUnNodWgxbGIwR05QeGlwQzdHUXZ5Q2ZtdjZLS2tnVmFoSmFo?=
=?utf-8?B?MzBtREpwVS81UUovN3BZVnp6TkVpZmZUOEtITndTZFNqLzIxYUgzVFZOV1pN?=
=?utf-8?B?Nlc1dzRHdHNIb0ZPNjBjQWVzV0ZxbjlWRjZEWTZFRitpN0h0RUtxcTF3V2ht?=
=?utf-8?B?ODhIYVM5Nms1VklFNjg3MzVoemJSWVhSTDBuQTFMKzJ2dmxwcTFZbmZQZ3d1?=
=?utf-8?B?OFRXVUJxTWFsaVJKTWVzY3V4bVVtS091VmxLeXRSZjlQbHNUQ3BBV1VkbjBS?=
=?utf-8?B?NkM1dzZZaFdZb3kvWEZqSUluQno4d2MvOHA1OFdmeVQ2OHZVUWRnWVQ3SHJB?=
=?utf-8?B?V3g0bGticVhwRm1ZNVpUUlJIOEhCZ01SNU5DTGNFemFqUHZvaGtYSmZYV0xZ?=
=?utf-8?B?WkZUZGZ0NHFlV3hSdUU2ZXk2WVdJVEUydnBWbHROb3kwY3EvSzVvV0lNOTdw?=
=?utf-8?B?K3RDMUhBRjl1SS94MStrcmllWVh1SFFPK1NiT05pKzRMbm83Rm9QRzdleDI3?=
=?utf-8?B?Sk1yT2lKL1IrSlVsMHlXaXpDUVpPTXV1eXJTaHY4Nk1pUFBqQTYzbmI5ODhJ?=
=?utf-8?B?WmZDVzh2V2JOTCttdHdhMHlOeVJUaGFqMkdRR2NCY2N4K3JmM2tHREg5MXF0?=
=?utf-8?B?KzcxTWNSSVB0UTFOQys2RUdOWjlRQzNSbVBIMnNHV0ViclQrRWpHaS9nZmxj?=
=?utf-8?B?aG16eEJxcFlSUURKN0dXSUNMelN3Z0lKSkJXQXpzcWtRRzBuS1l0clg4SEdq?=
=?utf-8?B?UFlWck9iSzZmVlFrbmhGcnlaU0VwaGxkUXY0ZFRQeU1RQ0llK1VrZE5zTThN?=
=?utf-8?B?R0VOdWRqR0VVdWdDV1FkY09yWTVBdDlWQU9NSWx6K0NyaU1NSHVtVThsNldm?=
=?utf-8?B?L2JwYVd6RXBiSXpaWmY4ZG5vVWVKNVo4QldJMUdseVYwZUNFK1ZyZHloL0tJ?=
=?utf-8?B?QU05NjBSNDIyTm1BNURWL0g0VTA0RE9Ga21hVnYxYlplOCtHT2tnNTVyZmhZ?=
=?utf-8?B?MlZLblZQeHkrekVNbTE1T21SK3JoYndONGw3L3VhS2Z3UTJpL0ZJbGdPN1lx?=
=?utf-8?B?bWZtRjY3RHUzUUVrY3NVT2R0TS9jNmZ2N1YyMHBqdEZGb0FPbjFkTW50dS9W?=
=?utf-8?B?Z0Z5N2ZadklNZHNpN1FIUCtNOWVQM1BqUTdZWExNS2lKTXN2YzJRNDRtUXBB?=
=?utf-8?B?aEM1NWcwVW4rRWJYckkwNkZJOXNMQkMySnpUeVBheUttODBBZTBHUG9EL0Jh?=
=?utf-8?B?SDFIVGVobGtCNWNEL3l1RHRCTUdFUjgwZlh1LzdiV0l0NjVySndrUi92a1ZZ?=
=?utf-8?B?WEpzMlZ1OVpuc21JWmxJbzNNREw3aVVvY0VvYzdjNzdidjdYSlZQMHU0SmZN?=
=?utf-8?B?ZXpTWmtSWGZTODBreEN0TmxRdEtyVTBtdjBodWJtbjQyVnZkaE5jazNDd3Rj?=
=?utf-8?B?RmdYcnd2MExRb3FPeitJdjNQOEdQQ2o4dWFPYTZ2anN1S1h1elJKS1l5b1o4?=
=?utf-8?B?NjRxRnlwWWo5TzJ1MjdEZEJXUk1lYnhWNS9aVWRhTnR2MnBjb0Q3bk10cERW?=
=?utf-8?B?VFlSVXpqSGN2ckJ1VHF2emlyUC8zajdkUGNmRnJwNWtjQm9PY1lsc0ZibExy?=
=?utf-8?B?VVJvbzFnZnNpU05HaWRWWTFJT1IvOWNtbmx4N1MxQVJHQjBKaFFLeEVGMUl0?=
=?utf-8?Q?B9S3Mvw0Jh9O+d/S4sgnfEUNR?=
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0:
lPa939RN21y4TjLN2YjS5ZzOD440FunAzjIX++NHmCJ+Pmw+9fpnZsKnWHAWsPpAYRuOW3oTYcCMDWgDmOb/DN9E7mmApBSRJomyOskeiAR6YLZuts6WUWhNInwilZcWd19HMiv2RHJJ3KeoFru/DWef4752gQ+w4m+ZTVfHYn9nR2XCdRyFwn4nrbwadiXHtiPj3sKmF9n7sPSDjfytjQ4/ZdyZlU85pdS8zpNL0KKUepou1JB5ApJoAgm5b0VlzQkwnb/Me6WYUyOJFK6gELutEx16iR4AQ/ujkROtuJQTqU8hPpa9UVhbgoygn2g9Znbc6RxwFWWp+FUu4bjOJP3+SEoSR3s1IiiPCQnpfiTwoNaOsPItH9NjxHNHNcb967yF7gq81Ark298RiHs+zqVTehqHf5XLMl4kbszPH0ntDdTct12yRIkDPm5bPEBzJwYmTkISRM4BBF6uZV/Eg7UjNS0NaRlS5fzNdDZKbWs+hOr66Jqe3T0hXmBSpVgtWCBYE43nwkSJfgMK7ASLCeivT9mxabni2GaQwv9EVtbmlEF+FCbEgR2CfBq3sQrdATeboxpMnMxihk7juR8tPCVg204crODQXn5iMiykWqI=
X-OriginatorOrg: oracle.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 0dfe5d59-7de3-4ada-2e7e-08dda3591833
X-MS-Exchange-CrossTenant-AuthSource: BN0PR10MB5030.namprd10.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 11:15:21.1942
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: ss4yQdv0zgzwgjq7yJXBlwyHElWydPwbEPlkZq8NnOsYOTck8pyE9D7cVFnT4lrEIfwE1ZD1jyN6u/595WRyyQ==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR10MB7133
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 adultscore=0 malwarescore=0
phishscore=0 mlxscore=0 mlxlogscore=999 suspectscore=0 bulkscore=0
classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2505160000
definitions=main-2506040085
X-Proofpoint-GUID: xuZ9dLd3QOd_owMsdcxtjCXo7iR_HlO9
X-Proofpoint-ORIG-GUID: xuZ9dLd3QOd_owMsdcxtjCXo7iR_HlO9
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDA4NSBTYWx0ZWRfX/RyDEunb9PyP fC5BkCIdmH3+kcq/vOyfG+t86DneGVE1pdnUxY3oaos2LdTS70PTrLwE3qYYa4mwO73ci8Ktomh DK0wl4Ld0+LmmC4Egdf9w+njN4XfzaLb9UAlVDxs6/Mc9bHAJpUijStO/fGgSUpzYlHcaSy4g95
xSMRxAnEqCiN9TU8Ws0Kj1oMi7H83yFur5JxDTYZSnFaOA2VphCPsCrxIzaDQBJgW/K8fodcj/v ebvGEwe9xhO0GYPmz4hkD3EE8OPqXGKgtuKtDkrNSQw9vT19xSLo3Y6os5fp2JnaJxAcoJBqXYd aJTGL5E+Y3hN+bbtcWjLfGMmu+GhvZDIQv7scMmc8pjeVdsRYt1/uMrh686N/rnbWSm7E1nt/gW
6dpadsu9SC35ISOZb6T5UvJB13GB9LSeecZvdBHsOOOn5HFefuLeA8BkQUmw1A/dm2XXAce9
X-Authority-Analysis: v=2.4 cv=FM4bx/os c=1 sm=1 tr=0 ts=68402ace b=1 cx=c_pps a=zPCbziy225d3KhSqZt3L1A==:117 a=zPCbziy225d3KhSqZt3L1A==:17 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19
a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10 a=GoEa3M9JfhUA:10 a=1XWaLZrsAAAA:8 a=VwQbUJbxAAAA:8 a=yPCof4ZbAAAA:8 a=23bUkPZOOvTO2IcE9GoA:9 a=QEXdDO2ut3YA:10 cc=ntf awl=host:13206
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 02/06/2025 23:44, Sean Christopherson wrote:
Reject migration of SEV{-ES} state if either the source or destination VM
is actively creating a vCPU, i.e. if kvm_vm_ioctl_create_vcpu() is in the
section between incrementing created_vcpus and online_vcpus. The bulk of
vCPU creation runs _outside_ of kvm->lock to allow creating multiple vCPUs
in parallel, and so sev_info.es_active can get toggled from false=>true in
the destination VM after (or during) svm_vcpu_create(), resulting in an
SEV{-ES} VM effectively having a non-SEV{-ES} vCPU.
The issue manifests most visibly as a crash when trying to free a vCPU's
NULL VMSA page in an SEV-ES VM, but any number of things can go wrong.
BUG: unable to handle page fault for address: ffffebde00000000
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 0 P4D 0
Oops: Oops: 0000 [#1] SMP KASAN NOPTI
CPU: 227 UID: 0 PID: 64063 Comm: syz.5.60023 Tainted: G U O 6.15.0-smp-DEV #2 NONE
Tainted: [U]=USER, [O]=OOT_MODULE
Hardware name: Google, Inc. Arcadia_IT_80/Arcadia_IT_80, BIOS 12.52.0-0 10/28/2024
RIP: 0010:constant_test_bit arch/x86/include/asm/bitops.h:206 [inline]
RIP: 0010:arch_test_bit arch/x86/include/asm/bitops.h:238 [inline]
RIP: 0010:_test_bit include/asm-generic/bitops/instrumented-non-atomic.h:142 [inline]
RIP: 0010:PageHead include/linux/page-flags.h:866 [inline]
RIP: 0010:___free_pages+0x3e/0x120 mm/page_alloc.c:5067
Code: <49> f7 06 40 00 00 00 75 05 45 31 ff eb 0c 66 90 4c 89 f0 4c 39 f0
RSP: 0018:ffff8984551978d0 EFLAGS: 00010246
RAX: 0000777f80000001 RBX: 0000000000000000 RCX: ffffffff918aeb98
RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffffebde00000000
RBP: 0000000000000000 R08: ffffebde00000007 R09: 1ffffd7bc0000000
R10: dffffc0000000000 R11: fffff97bc0000001 R12: dffffc0000000000
R13: ffff8983e19751a8 R14: ffffebde00000000 R15: 1ffffd7bc0000000
FS: 0000000000000000(0000) GS:ffff89ee661d3000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffebde00000000 CR3: 000000793ceaa000 CR4: 0000000000350ef0
DR0: 0000000000000000 DR1: 0000000000000b5f DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
sev_free_vcpu+0x413/0x630 arch/x86/kvm/svm/sev.c:3169
svm_vcpu_free+0x13a/0x2a0 arch/x86/kvm/svm/svm.c:1515
kvm_arch_vcpu_destroy+0x6a/0x1d0 arch/x86/kvm/x86.c:12396
kvm_vcpu_destroy virt/kvm/kvm_main.c:470 [inline]
kvm_destroy_vcpus+0xd1/0x300 virt/kvm/kvm_main.c:490
kvm_arch_destroy_vm+0x636/0x820 arch/x86/kvm/x86.c:12895
kvm_put_kvm+0xb8e/0xfb0 virt/kvm/kvm_main.c:1310
kvm_vm_release+0x48/0x60 virt/kvm/kvm_main.c:1369
__fput+0x3e4/0x9e0 fs/file_table.c:465
task_work_run+0x1a9/0x220 kernel/task_work.c:227
exit_task_work include/linux/task_work.h:40 [inline]
do_exit+0x7f0/0x25b0 kernel/exit.c:953
do_group_exit+0x203/0x2d0 kernel/exit.c:1102
get_signal+0x1357/0x1480 kernel/signal.c:3034
arch_do_signal_or_restart+0x40/0x690 arch/x86/kernel/signal.c:337
exit_to_user_mode_loop kernel/entry/common.c:111 [inline]
exit_to_user_mode_prepare include/linux/entry-common.h:329 [inline]
__syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
syscall_exit_to_user_mode+0x67/0xb0 kernel/entry/common.c:218
do_syscall_64+0x7c/0x150 arch/x86/entry/syscall_64.c:100
entry_SYSCALL_64_after_hwframe+0x76/0x7e
RIP: 0033:0x7f87a898e969
</TASK>
Modules linked in: gq(O)
gsmi: Log Shutdown Reason 0x03
CR2: ffffebde00000000
---[ end trace 0000000000000000 ]---
Deliberately don't check for a NULL VMSA when freeing the vCPU, as crashing
the host is likely desirable due to the VMSA being consumed by hardware.
E.g. if KVM manages to allow VMRUN on the vCPU, hardware may read/write a
bogus VMSA page. Accessing PFN 0 is "fine"-ish now that it's sequestered
away thanks to L1TF, but panicking in this scenario is preferable to
potentially running with corrupted state.
Reported-by: Alexander Potapenko <glider@xxxxxxxxxx>
Tested-by: Alexander Potapenko <glider@xxxxxxxxxx>
Fixes: 0b020f5af092 ("KVM: SEV: Add support for SEV-ES intra host migration")
Fixes: b56639318bb2 ("KVM: SEV: Add support for SEV intra host migration")
Cc: stable@xxxxxxxxxxxxxxx
Cc: James Houghton <jthoughton@xxxxxxxxxx>
Cc: Peter Gonda <pgonda@xxxxxxxxxx>
Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
Reviewed-by: Liam Merwick <liam.merwick@xxxxxxxxxx>
Tested-by: Liam Merwick <liam.merwick@xxxxxxxxxx>
---
arch/x86/kvm/svm/sev.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c
index a7a7dc507336..93d899454535 100644
--- a/arch/x86/kvm/svm/sev.c
+++ b/arch/x86/kvm/svm/sev.c
@@ -2032,6 +2032,10 @@ static int sev_check_source_vcpus(struct kvm *dst, struct kvm *src)
struct kvm_vcpu *src_vcpu;
unsigned long i;
+ if (src->created_vcpus != atomic_read(&src->online_vcpus) ||
+ dst->created_vcpus != atomic_read(&dst->online_vcpus))
+ return -EINVAL;
+
if (!sev_es_guest(src))
return 0;
Return-Path: <linux-kernel+bounces-673110-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 0748A41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:16:03 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 2BA5317564A
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:16:04 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 9D7A228E611;
Wed, 4 Jun 2025 11:15:48 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="fJxC5p7x";
dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="naQPiqp0"
Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id E5D9A2820C1;
Wed, 4 Jun 2025 11:15:45 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.165.32
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749035747; cv=fail; b=EB+v+NXQj3R3kg0EzCwit51AvLhm29jIogZFiQUP5iM0/vBxQFe22FV34Nskx66C8si7IscHRQAWxY59373PVsj4PoqqhuXie09IHEfYLOJ0Aka3pjHWfC4Tu1ui7ZDJmeOHm7CUW6kGdyqMzoPH9wgeVW237Yv8qwQC5KM/ZW0=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749035747; c=relaxed/simple;
bh=2BZx0emfxA1++3SKRoifnCJJ1jCH8OMg34e0R2Xn04E=;
h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To:
Content-Type:MIME-Version; b=YwFE+tF31krLrjkITq8y28nLND3EHhzbT6UzmDj7lgY8/tC+FbjNcKZXSHBvoKOD9iArkoXpTibeVM/q4eC3+gB3jMECH4JbuoBFJ1K6DtIIDXendI8xjFbPgax+zkpZUwHPUgQbOs3uWD6DtPrRbS1CsEylBhcxAxv+BEUQmJQ=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=fJxC5p7x; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=naQPiqp0; arc=fail smtp.client-ip=205.220.165.32
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com
Received: from pps.filterd (m0246627.ppops.net [127.0.0.1])
by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5549Mfr5012256;
Wed, 4 Jun 2025 11:15:40 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc
:content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=
corp-2025-04-25; bh=z2kAK1Q0rlrZpxiGMpEQ/nwaLUI9RSslVQgG/Ax8qms=; b=
fJxC5p7xTiK2gvUklJtf1RRGAK8VtQscdDSiiQzMvq2zZPd/POkZxrbbh0/0Rlbr
KsoHwk/xd/n0lSwg3iUAv8r3791zXsKEoB7/n+B3xqHn8OwOwHib7jeysJgou51g
i5OExO9x3QH5KhGOsNIHfiJ9iEyIpploiv8aOUa0lEkZ6k9EPFxkjwvq+ev1w3o2
RAYBLtdGFbi9Vcqj9icYf9m0z3sa2gRmm7+PKDoB7wRYzj8SzmU0tW0/jUXgjS2k
O2/wEYZA7PTi3CtiRDNj6Jznl0+BvwQC1LvZu+FlzjaaEueHK7xJibO9wBh6XEkE
6smtPfJEr1OBtUtOfeu5IA==
Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27])
by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 471g8cuqhq-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 04 Jun 2025 11:15:40 +0000 (GMT)
Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1])
by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 554B0PQX034603;
Wed, 4 Jun 2025 11:15:38 GMT
Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12on2078.outbound.protection.outlook.com [40.107.237.78])
by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 46yr7amduk-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 04 Jun 2025 11:15:38 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=vjn/Exa/JOuCwyeig2sEx6ncwL6x/aUBqZcWvwWUbWYw1OgM/i7xryx7eQvaU9p14CY2BVsBySnI2/Ta0shUwx+RgRkinc47eiqERiF1uMB5upHyG9iZ8vC0DX+Pv1HTScGYUVoBVfR1NrOBmD/ZN93wXWzH5M+t9Uy0+Kw7oOmIeO+LlIa4QahjgsM5BwuOquPrBfIGrCancs1MODo5YEmaR+wIYxhT8VHfoyq8do6pO3oY6zGS351xhLZv81lvNbgZMsBkz+OSgg3up6ROZdDy4/x7cGbeV388h/urDzntQ12RofWuuZZUaEbACmHJJpaParWLTJs1QyjkALr8wA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=z2kAK1Q0rlrZpxiGMpEQ/nwaLUI9RSslVQgG/Ax8qms=;
b=wJwLl9kCLl49yTehIWd/OPpT9/PN+i/aq4h9jSBieY9IGAYAS49tiXmCdU2vduyJmyRU85tYxhOMOxCtWcvJXvN2YtaqSl+3oDH1EsTQYOhmQRHwDANetJ8g6xKiDDP54TCjTGte7CjIs9J+E6+IUFus8cmMup/KhhM2grR//oP5mGnQbpmtzWWdeB0b6b42EBlXh0yzUqBjRjvLDt/+Srmx6QfRLWuUiIrFxYiesDz5DUUB2k0hSAjBulEARCMUjbz0y6N3QNh1QgNSLV8pM0eMOvH83xtF1fsF7qvlhKtORzRZc+lzcFGCWn3qud2FxVHpKZ2t4ugB+3G1i7r2Ew==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com;
dkim=pass header.d=oracle.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=z2kAK1Q0rlrZpxiGMpEQ/nwaLUI9RSslVQgG/Ax8qms=;
b=naQPiqp0gKq8ucQaLYFoegPvYBB3293KRevIqLG2zbEpLP9bMmUKyrKJTmBlwHvJDxpFZjZZYJfz6rwcOJWeCtstGJewS3+GaM6kwtFwnVqleFOijQcP/OISeN3JjM7BkLDNCpnO7usaU3ii3VG6R8TIDfMYROf+ojLaxmzdEOM=
Received: from BN0PR10MB5030.namprd10.prod.outlook.com (2603:10b6:408:12a::18)
by IA0PR10MB7133.namprd10.prod.outlook.com (2603:10b6:208:400::13) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8746.40; Wed, 4 Jun
2025 11:15:37 +0000
Received: from BN0PR10MB5030.namprd10.prod.outlook.com
([fe80::44db:1978:3a20:4237]) by BN0PR10MB5030.namprd10.prod.outlook.com
([fe80::44db:1978:3a20:4237%6]) with mapi id 15.20.8792.033; Wed, 4 Jun 2025
11:15:37 +0000
Message-ID: <18b86c31-e657-42e7-bca6-ddae52ead231@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 12:15:28 +0100
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH 2/2] KVM: SVM: Initialize vmsa_pa in VMCB to INVALID_PAGE
if VMSA page is NULL
To: Sean Christopherson <seanjc@xxxxxxxxxx>,
Paolo Bonzini <pbonzini@xxxxxxxxxx>
Cc: kvm@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
Alexander Potapenko <glider@xxxxxxxxxx>,
James Houghton <jthoughton@xxxxxxxxxx>,
Peter Gonda <pgonda@xxxxxxxxxx>,
Tom Lendacky <thomas.lendacky@xxxxxxx>
References: <20250602224459.41505-1-seanjc@xxxxxxxxxx>
<20250602224459.41505-3-seanjc@xxxxxxxxxx>
Content-Language: en-GB
From: Liam Merwick <liam.merwick@xxxxxxxxxx>
In-Reply-To: <20250602224459.41505-3-seanjc@xxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-ClientProxiedBy: SG2PR04CA0204.apcprd04.prod.outlook.com
(2603:1096:4:187::16) To BN0PR10MB5030.namprd10.prod.outlook.com
(2603:10b6:408:12a::18)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: BN0PR10MB5030:EE_|IA0PR10MB7133:EE_
X-MS-Office365-Filtering-Correlation-Id: 15ceb07a-8d7c-4c7b-c617-08dda35921a8
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016|7053199007;
X-Microsoft-Antispam-Message-Info:
=?utf-8?B?QVBOSDFjKzhGM3l0V3FCZEk1QTNLemVoQ1RzTHBGd2VXOFJvVlEwZ1NOWW81?=
=?utf-8?B?bGxKNVNFNUVKSi9lNjc4dlZOUlV0R2cwSE1lRVBXVHduTDNkRVFLcjdHTXNP?=
=?utf-8?B?N2p6dk9oT0d1VElxc1psSzhRYXJFc2xDNTkxVkpPL3I4UHMxZ09rZ3lNZDRX?=
=?utf-8?B?THVIbk1TSmtFSHJnYlZMb2pOSmxNc0ZjdGRhck1wMHZkVGdKWlJrUG9rbUtV?=
=?utf-8?B?dFVDd3FXV256WjZvUCt4dWNiRDY3SEs4cWtkSi8raDljT0lrL0ltUStMYXht?=
=?utf-8?B?V1NPV21HZFRXM1c2Um1NUDV1YmNwWHBKRFNWNUNjUFBibTdwQ2NIbDNOLzNz?=
=?utf-8?B?Y1JCMm9qRjE0Rnp2YzJvdXc2dHo4OTkxdXc1OEtiSHFxYnhBL3JxZ1BIWTV6?=
=?utf-8?B?VENQaENmZkUvbERYc0ZjMnQ4SytKNVdoQTIzNDBTSmE0c3ZPd0NEOWFscm5Y?=
=?utf-8?B?MWoyeUNxOE9qSTQ4MXBGejYvRTVwR0ZHeGNyV2xLdk9YeGJwQ1I2QVIrU1Qw?=
=?utf-8?B?eGozZ0JKOHhjK0RwVUNzdDVyWVo0OFFua2prZVZDelhpN0htSHZtYzdKMGpt?=
=?utf-8?B?b0N1WVQ4cGRobG5ISHhlNm8vUDhuUmYrOXk3ZnY4cTQrempjeHRxazA0bWdO?=
=?utf-8?B?Z3ozNDcveGYxcjdvUldlL3BoWGlkZ2hVSk9KRWtPd1Q3cENZamVOUGZIaW1I?=
=?utf-8?B?MUQ0T1NHZ1R4dnpxUlh1YTBkQ3NTVG5EcjhOenYybVdrQzRQMlRtMjZiN09i?=
=?utf-8?B?VTFwY3JpSmU2eDkzYXpqM3JXY3QzR3hPalI5akZuTUwxMCtmZit3ZVR0L2pT?=
=?utf-8?B?b3RRdU9sWWlkL0thWU5RZ3NMbi9MK2ZzeGM0NWxyZ0gxU0FRS0drNFRteEw3?=
=?utf-8?B?c3NLM08vOFpHclU0UWlSUVF1MjBjSTlVNkY0RmdqejRuazQ2cHh5NWp4M0dC?=
=?utf-8?B?TE9yVWZyMG1JQVpHdUtHU2VKclRwclovU1RJcDdKTkdlR0NialZhUmE5Rzkx?=
=?utf-8?B?RERuOUgvUWhha214UjlJU3NVYUF5OHYxd0JmRjkvVFFwNVloODBJRU9iMTFp?=
=?utf-8?B?SWhURisrTGFsVzVuNW91Umlkekx4MExwNVE3WXZSbm1XaWpJVk5LamlzLzFE?=
=?utf-8?B?N0pxeG4vcGh4YnZ6SVI0djBaZ09uVmhLdnQrSi95MlArSU1IeWI0OVptK3Av?=
=?utf-8?B?cHJGenI3YnhJWitvcDlOSW9BK0J4WmdDeUJ3Z0FuN0VUTU9aSUk0MzJIUkJ4?=
=?utf-8?B?aDJkOWdVRzRnODNIaWJlSXBhaVl0bnA3eXc0d0MwVnRBRFk5aVBHa1ljMXFE?=
=?utf-8?B?TXFucHdzNW9waUJGU01KMzQ1ZHRJZlRsWWpGOFZIR2xkOThSODRyLy9pZ1Fi?=
=?utf-8?B?YTQ5U2pxaUVHVkIzOWdPOWtpQytpMDJMZkkxM2Rtc0FqUWJXVUJmempYTzJY?=
=?utf-8?B?SE5VU2FkK2RtM1BkazN3MWlhcTA0MSs0KzNTQldMM2VhQWVwNTVTeEx3TDV1?=
=?utf-8?B?QTZWK1l1WnJJZ1haendaT081b0Jib1hnQjJIbVJWek9IQzZVcFBrbHdMUGtJ?=
=?utf-8?B?WlhrVG1tVlYxTmt1OVo5dkhXb05CQmovTmxIQi95SDVONzl1K1lFbUpzY0ZB?=
=?utf-8?B?MEVicWRaZXA5VlBsem0zSEdCOURqWVhyb1BuN1VqV2JIWFdEbXVJSzJqYmFa?=
=?utf-8?B?TmE3UkM5aENDbVVqZDJwSE84M1lvZ0VWMDNBV0JDclJTZE1lRTBvQXJXSi9p?=
=?utf-8?B?SjF0OWN0ZWo3aHVUUldQRU5MS2VCOENad1c4MjFzd0xtalU1TjRaUkVWZTdZ?=
=?utf-8?B?OFJ2TnlTVUgwTjhqRHdZbGo3bThRZ0taa2s3cTB6bDh6cHhWc2tuMlJZbVNZ?=
=?utf-8?B?UWtEVW5QTGVxZ2dOTnd3c1lzUlMwRXZDbEhlLzV1Zm9RU2VxYko1UmhZY0JI?=
=?utf-8?Q?H1a4k6wjJb4=3D?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN0PR10MB5030.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(1800799024)(366016)(7053199007);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?utf-8?B?a04xSGNYYmlBczVpVU9vR0xhSGdNYTZFa0dJTDFaRExKaUVzMzJMVVlsRWxK?=
=?utf-8?B?SmU1KzJ4TmlPV1F6MFJ6QmVBNWorK3FWcU1HSjB5WXNyY2JyNGd4b1p2eHpG?=
=?utf-8?B?TzNWalE4RExiYXB6aWxnYVREeVBkVFhSOU5sWllGOUgvbEoxdGgvdmtmenFh?=
=?utf-8?B?WmNrWXVpMlcveGJDa1ZmQ0ErNWQzQ2M0T1N5Z1lGMHRHKzRRaDAvWHNVZEVY?=
=?utf-8?B?Rlk4ZGRWRlVDbHBOc2dpTWp5eVg5dGxMOS9vUnUyK3VPWGRjRVhQcUcyVTlU?=
=?utf-8?B?a3pBakIyTmhHMVF2V01LTWFlNTBXTFRGYUIxZE1PbjcvUE83Q2NxQWNiNThx?=
=?utf-8?B?dWI0bzVhbDdPeVhjWGMwcjdMcW1pSnlwdVBLbnp6YVdBK0FITWxMNG92VjJZ?=
=?utf-8?B?Q1R3REYrWVh1QmJSUlNjeHM2N2FXdEJocWhGYkhQc0ozcG16T1JpbGVlY2NV?=
=?utf-8?B?amw5ck5nbGp6WWF6VHEzK05aWmpacmh2NXBuMFpBQzJEVmpMc2ErYlpra2Rp?=
=?utf-8?B?ZTg3SlZQTHFkK1JOWGtBbm5JbUZ1V3dOMUpWbzV4Y1RrdXRTVG5Ua29GejBL?=
=?utf-8?B?aWpVMkFSQTMzYnhPTnBTcDE0ZnBUQmx4YnZIK2xPOWwyT1JiMTFkN1U2ays3?=
=?utf-8?B?V1Q4WTJuR28zVjhqYTkyYmVYSGdsVkdFRVNKS1Q2b3hEMzRLWFhWM0U3aFZm?=
=?utf-8?B?TUQ4aWxzdWdYWFNSZnN2YVlhWDUrZ2NIYnp3Ym5qWFU5Y0tjQXozcTJhY3Nq?=
=?utf-8?B?WVBtekdNR2RMSWI5cndtWHhWMUNTTHF4SWdGdXpMa1ZDbHVqdmYwTWNsd3hq?=
=?utf-8?B?SlJxZkI4UU16M3EwNlFFaTNPak83Qmo4SnhrQzVsdzJYU0JIWkQ1ZHA0bXBX?=
=?utf-8?B?d0FqL3lhMGlacGF3QmcwM3pwOWlDYk9TMTMzay9jSE5IanYzVHIzNmp5dllH?=
=?utf-8?B?ZlBTWGwyNGYvUWlhd3FwbXlzWlZxa0pleVJXZ3kxWUo3WDY2ZW1KZDNleXJs?=
=?utf-8?B?VlMxWnAvRmpqTUEvNzQ2WTRHUjdmZlFPQlBzUDJBOGxKUFhLNXRrSXVTVlhM?=
=?utf-8?B?M3JlVytrM1gvdHJ3dWhoUFVwL3dYcEgyUE1zcmg4NFV4b1hpTmxHWVVuT0xy?=
=?utf-8?B?U3VyMHRRVjVqSWtBRU54QVVmMmZUNjNXamYvaUJGcjFMNktsZ0t6RHRMK2JX?=
=?utf-8?B?d2JZOWVOTGlkbzJIVUtYOG0xUkh2aXRjcjA1UkJyaWdTR2ZlNEdXSXFGSGVT?=
=?utf-8?B?QkxaR25DazVtbVdpSEc0Wi9XUUY5VHU0aktKa2dEQTdpaXppRlZnWWRrT3BL?=
=?utf-8?B?ZWZXai82VURkWWx2YWJNQjBOQVpKc29ob2JwQllEM2dYMlhDdXFqenhXRUJ5?=
=?utf-8?B?c3cxcWV5MjVGdUlzY0UzQnVTaWd3azgxK2NVK2E3azIxQ2l3M1lRZFVKN21S?=
=?utf-8?B?QjNWZDNrUW9kbjFzTVFnWEFCYW1FdVRvUzgvVHZ5TWc4Z1RhUDNiTnVlYzh1?=
=?utf-8?B?aDdyRENFWmdycjJGNWlEKzc5RDZuM0JUWDd1TWxkSHlQZm9XamhnRGxORnlU?=
=?utf-8?B?TFFVTy9QWWFCVmhaZHYzcStzQkxJRXJmSFdFUTFiQlZ5MXZBbmRaMkw2VDBS?=
=?utf-8?B?UjkxS3k5aWZTZFhnNkZHbFBhMkRwUG9KWUI5ZldLWk5MVnl3VUJsSTVoUGlX?=
=?utf-8?B?VnRwdnBwYzJFeTBVVVppbVVtTCtRcXRKWDBPckRnSVRjMlN3clJXSnNvcDE3?=
=?utf-8?B?S0tBelJiSU0vQUdmL0FZUzFFQXIzb2NPalNPblRxWFNYZzhiLzBPbW9pMklP?=
=?utf-8?B?enRnNWVlWWN6QUJFZHloYjQ1OU5rUk1XYVJYbllBNE1Wb0VDVnJsMDZBdG1h?=
=?utf-8?B?L253c0xOQkwzRlhHSzYrMXJDQmVadHBoTml5V0trMiszdy9Lc0JkVEd5NnFZ?=
=?utf-8?B?cE55akdvZGQycjRET3g1ZCtSOUUxTEhGUlJTY3g2UjZSclVzem5zNHhFenVN?=
=?utf-8?B?enNTZ1J0ZmJFZFUzRU9kb0FERW5YNFhqUHBXYXdmeXZiOHFmT2NMU0cyMGd0?=
=?utf-8?B?S21PNjZ0RW9IME9Fa0FoSmRnTE1jRENubEhtYlZzY0ZtM0VPMmM2cjNxRzBO?=
=?utf-8?Q?MCzmZSeut1blPrF3kz+C3jSO4?=
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0:
6HyM5pMsLC593JFjvWMCcbkD3/8V4v3mM7uQA1x2XC3r2MBJ0UCktfIAA4uWody71oZOMP5IXqVlmGJMCExj2ZwCrZ3TfLMoiX8BIWwDDpqDjSxFixTsPkreY6Jwaa0IBj4Ns8Yk8QANNYFpCg71KxzmAVqU8AjVJGuuHyLlXp86f7bNXRUKEUCES9g/t+O062pResgZ99a/SCZ264qaatbj4fElTlKXWY7/9es5wyPdi3oiVlPqcgwe8MhOHa5A40CBFy9qtWc3uj1x5UyujaujfjZVA1bqbGvQxuFuGEeg6W8YIENZWWZzT3qnSvDM0Wsy5/MyKWEXjDLMdWtTd+9ludThqFu1WXS40w9o7URTXFa7TMbN2Tj5rIMxqMBIRUUZRQii0JGf9byJ3rxWUJcaSVwRZMFhn6i7gwUv4ECtmS0QuHLFe01Cl47O/8OLH8PKBy1CpKjyr6OlKwkV0R1wZ9H9bMOza7InJ1mzNUk2xSTGyxeZn9bywJnrAcu0fojtuC+qzyPvF+JTCH+XDOZEG9Y0kdJfRM0IRpGVJpN2Y1ctvAQhIHBzJ6SYOVicCFuZXBB3pfq7sSkBLtVEBHXdPGYpILWHNOT60pqo6HM=
X-OriginatorOrg: oracle.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 15ceb07a-8d7c-4c7b-c617-08dda35921a8
X-MS-Exchange-CrossTenant-AuthSource: BN0PR10MB5030.namprd10.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 11:15:37.2031
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: 4K91kjXUdNB8AptM5rHKgoGFxjyx22i7b0kiCcZhlamdFmeMv2CFiifwbX1C8W2PPATJ3FmPTiKVoPd/MvT9NQ==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR10MB7133
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 spamscore=0 bulkscore=0
mlxscore=0 phishscore=0 suspectscore=0 mlxlogscore=999 adultscore=0
classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2505160000
definitions=main-2506040085
X-Proofpoint-GUID: ku7dSEW9wUEaJ5S1P3Ig9ycmp58_p2Yu
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDA4NSBTYWx0ZWRfX6VHWa8X5Mmt1 N0yK3gRpk79hhces4BqUbfPSw/B8Ds6YGNT6M91c4f7BRydfx4NCEyX93BZwXjabSaFC0txd7fX b4l2wn8hlddX6sXdIsg8vnsFdtpOhFLKBz3IovEAHN+xZ4NOxdXNqgByEU/HY7jS+sJFE5OLC93
nMvzE89gPX4Zhweq1VGsaVIYU1sml3XBdOxaQw0AJGiaQU5cpHM9HJVNQtIS/jkBWvyTGywyL54 Plm3NA7TZH9JIm9M7AF8bBmF+T//760P5n8zXrq0/5HBzzM661/p2LgJLlB7/Y4+UXJcZ2ye335 8hG/c5tbPtZ2qHvkTysl2j001MQuhjkOweKlTePm8+2SrVY/1uTiMVi6wHUz4+tK4+5a0if2G20
/099A2EkZzrzdRsmb0P5uPHeN79SHTFAWMZfn50jaLOGvsrdQ3gdSeT1VMiAuQ/jjv24n1mk
X-Authority-Analysis: v=2.4 cv=KaTSsRYD c=1 sm=1 tr=0 ts=68402adc b=1 cx=c_pps a=qoll8+KPOyaMroiJ2sR5sw==:117 a=qoll8+KPOyaMroiJ2sR5sw==:17 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19
a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10 a=GoEa3M9JfhUA:10 a=zd2uoN0lAAAA:8 a=1XWaLZrsAAAA:8 a=yPCof4ZbAAAA:8 a=WlJtN08NMJsrYo0BGjwA:9 a=QEXdDO2ut3YA:10 cc=ntf awl=host:13207
X-Proofpoint-ORIG-GUID: ku7dSEW9wUEaJ5S1P3Ig9ycmp58_p2Yu
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 02/06/2025 23:44, Sean Christopherson wrote:
When creating an SEV-ES vCPU for intra-host migration, set its vmsa_pa to
INVALID_PAGE to harden against doing VMRUN with a bogus VMSA (KVM checks
for a valid VMSA page in pre_sev_run()).
Cc: Tom Lendacky <thomas.lendacky@xxxxxxx>
Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
Reviewed-by: Liam Merwick <liam.merwick@xxxxxxxxxx>
Tested-by: Liam Merwick <liam.merwick@xxxxxxxxxx>
---
arch/x86/kvm/svm/sev.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c
index 93d899454535..5ebb265f2075 100644
--- a/arch/x86/kvm/svm/sev.c
+++ b/arch/x86/kvm/svm/sev.c
@@ -4471,8 +4471,12 @@ static void sev_es_init_vmcb(struct vcpu_svm *svm)
* the VMSA will be NULL if this vCPU is the destination for intrahost
* migration, and will be copied later.
*/
- if (svm->sev_es.vmsa && !svm->sev_es.snp_has_guest_vmsa)
- svm->vmcb->control.vmsa_pa = __pa(svm->sev_es.vmsa);
+ if (!svm->sev_es.snp_has_guest_vmsa) {
+ if (svm->sev_es.vmsa)
+ svm->vmcb->control.vmsa_pa = __pa(svm->sev_es.vmsa);
+ else
+ svm->vmcb->control.vmsa_pa = INVALID_PAGE;
+ }
/* Can't intercept CR register access, HV can't modify CR registers */
svm_clr_intercept(svm, INTERCEPT_CR0_READ);
Return-Path: <linux-kernel+bounces-673111-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 2419441E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:19:32 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 9A1097A352C
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:18:11 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 859A728E5E5;
Wed, 4 Jun 2025 11:19:22 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=altera.com header.i=@altera.com header.b="n4sMG/rc"
Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2076.outbound.protection.outlook.com [40.107.93.76])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id B11C125179A;
Wed, 4 Jun 2025 11:19:19 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.93.76
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749035961; cv=fail; b=TMnss9nX+KPKrxliCi+FnwKnSFc20pj1N0cO0xgGlGT4hDTtzdOwVbWOVvSJCAKLmAx8v6r9Nk67S+BPEkD9aZHFC3ALU/3n1dMY41tcnhWMWbWOavIulU9fRPLG747DcSjAdUhwfA0f1tQgVpMZ7t83DCa08PenKwx+NF/SlRI=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749035961; c=relaxed/simple;
bh=dQBr4oX4ztQKM3Q8+3d5nNSdZhYK4EESPMrGh+DEJ+o=;
h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To:
Content-Type:MIME-Version; b=jeokrV5YphSyI/HjiJhx8mlgRgQiEPO/hZBqZ79Px1R31YxkWqy+urUXyghJ3uuGKOtkO44vlKLtcAgvJDdDDkSgsFPeEUH2BoJvQj2++rgHOcPDKlKhNPmkMeqfMyqsPKHuwazUNtEHOex1/ZEGaOreE5yfFubSvQiLeDjpyVw=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=altera.com; spf=pass smtp.mailfrom=altera.com; dkim=pass (2048-bit key) header.d=altera.com header.i=@altera.com header.b=n4sMG/rc; arc=fail smtp.client-ip=40.107.93.76
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=altera.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=altera.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=ivHGXSKhc8JNz7/ehmVFgAdcyyTOMkJtmzorT5i3sGIYwD5dSVC15Tob388RwtIdMQRAhZbrtTXd4YXWI72URM8IYjpucmDkyaGy7+LNqP9rrCGqcm3TAF5fpylw2jE7XrhymwSbSaNmwpEeRCmNQ0IcAvpfDd96/AV+2jIgjionznjbU6j5D04yvrw53YTX+FNpAjz6JW0mp4VzzC0MSmpEsMmY7XtXXtD8gNd5uGx1oFRneUXd3FVimh+KVY2gmP2lvNauA3IpLb+jprKSovBCEayuNLTlzqc2s3CvQesJ+OyWzY78muwY/tdGa1HwPF+eByu5ChkdcKrMO3VyTw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=t6hMGq1mE9osyEeL8Nm0hx36p0vXx9b8x2D6Tqx+eZ0=;
b=FbDVFjb5D0R8NlByi9IiVt28Gdz4TdY4sFIAffxkX2xUWqZQLuBkfQyVHEyI4oSkBWPhOXeKv25xj4WiCcpbDmtPxXFe/YYKJbLgMOhCmrR04/VBVN63sIY2cg3YTsgSxlMAD1IMEr9BJF9DSV1Ym1vTinVBDogKgTqlXBEXcl9fpjdv1Sopt+n3UaBlraCmpiNyHi556PJWKoRi3/1eOf//F+M9l+ZLXhJuqL/565XipVq3gIF1KSCCpkFo3bNl4IBAtKpxRqtKi85p/cAj1sd05ooiAa0tKah9x9/FSH3QUDV/maQm15Q2SJVWAI1MlyZWmXlCj6rKCS0af6GRrA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=altera.com; dmarc=pass action=none header.from=altera.com;
dkim=pass header.d=altera.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=altera.com;
s=selector2;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=t6hMGq1mE9osyEeL8Nm0hx36p0vXx9b8x2D6Tqx+eZ0=;
b=n4sMG/rckbqmw67boBy+M6CLi/jsODh2hERqsDX8zfykxZLqPISUMI++ThApxbCAVkZlVGih+V0ArTC8tIC9hMZ0FvdLPe7l6mDLp2vrQ6dipUJ3OKiOiicfddlAr5x7aq8Rfvt3owQQw6NYKbyogYpSm30ZydTBK0kuspqxRpxBuT6j1oCer3m8gmGT4Ucplohl7YxdyI1josfmHdjVkEUwsSPHgYqY7gGP1dYxSXev3U2tJcc1sHk48NoUlagoOA1w+itbm7knPc11nnvcnTTXo1SNyywpd7pqpbJFNxbzwXoVrQWrE+tW0H4N91JGJ9ELgK9tnZ4cjTKHWGyBCA==
Authentication-Results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=altera.com;
Received: from BN9PR03MB6201.namprd03.prod.outlook.com (2603:10b6:408:11e::20)
by MW4PR03MB6554.namprd03.prod.outlook.com (2603:10b6:303:125::11) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.34; Wed, 4 Jun
2025 11:19:13 +0000
Received: from BN9PR03MB6201.namprd03.prod.outlook.com
([fe80::6b16:5fd0:112:ab8e]) by BN9PR03MB6201.namprd03.prod.outlook.com
([fe80::6b16:5fd0:112:ab8e%5]) with mapi id 15.20.8792.034; Wed, 4 Jun 2025
11:19:13 +0000
Message-ID: <bef27c79-7d28-4d06-b05b-567e2a69a9eb@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 16:49:05 +0530
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v3 3/4] firmware: stratix10-svc: Add initial support for
asynchronous communication with Stratix10 service channel
To: Krzysztof Kozlowski <krzk@xxxxxxxxxx>, Dinh Nguyen <dinguyen@xxxxxxxxxx>,
Rob Herring <robh@xxxxxxxxxx>, Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>
Cc: Matthew Gerlach <matthew.gerlach@xxxxxxxxxx>,
linux-kernel@xxxxxxxxxxxxxxx, devicetree@xxxxxxxxxxxxxxx
References: <20250526-sip_svc_upstream-v3-0-6a08a4502de3@xxxxxxxxxx>
<20250526-sip_svc_upstream-v3-3-6a08a4502de3@xxxxxxxxxx>
<3a76c7b1-ce02-41eb-a4c0-ae065e9b99f3@xxxxxxxxxx>
<0f74ed36-13bd-4b6c-9d5e-f52cc25235f8@xxxxxxxxxx>
<7e02b0ef-2470-454b-81df-810602d8a626@xxxxxxxxxx>
Content-Language: en-US
From: Mahesh Rao <mahesh.rao@xxxxxxxxxx>
In-Reply-To: <7e02b0ef-2470-454b-81df-810602d8a626@xxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-ClientProxiedBy: MA0PR01CA0097.INDPRD01.PROD.OUTLOOK.COM
(2603:1096:a01:af::14) To BN9PR03MB6201.namprd03.prod.outlook.com
(2603:10b6:408:11e::20)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: BN9PR03MB6201:EE_|MW4PR03MB6554:EE_
X-MS-Office365-Filtering-Correlation-Id: ab328cd1-f40c-431e-af45-08dda359a267
X-MS-Exchange-AtpMessageProperties: SA
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|1800799024;
X-Microsoft-Antispam-Message-Info:
=?utf-8?B?cXFXZmRZRVF0YU1hQVFwZFh6aCs5K1ArWHZtbzloNitSUG1CK3BRZGVUL2l2?=
=?utf-8?B?dEpKTE5WQ1AzSTZCVml2WklWTTdWY21pQ05OaHNWUDBJbXlMcUE1dno2ekJF?=
=?utf-8?B?UFBZU3Y3K3NLMmgxWWNGTzB2NnJGUm5jMGxlZGJOWHRXZG1rdTB4UG9QTG9Y?=
=?utf-8?B?dDlUN3c2aDBINTZTMm1ZUCtKRjRhQTV5d0J5aFlJOTJOSnByRmt5SjB0Qktn?=
=?utf-8?B?UFgwSWtSMXN2MFRBMlJ6RTBjY244YmNNSEQvdGlPQi9PcDVqajY5VGNLQ2Fn?=
=?utf-8?B?U3dSSmJhekFyTFpnSm5Rd00yM3lKVFM4aTd1MEoxRFZMTnN4RFhWUU1kUE9n?=
=?utf-8?B?UGl2UWJnU3BDL0Y5aEFLUmZROEtuWTZQL0llZkN0ZDEydDY1WS9YRUpGNFJZ?=
=?utf-8?B?N01QdU5KbDRYbENlNXNKOHphODR4d3gyRFQ0THU0NC84eEhMVW9IbUhzakN4?=
=?utf-8?B?aXVMb2NhQWNBS094UWpScExpb2xwUnF4RXBRV0JUK3RkZ1l0b2hDYXNtdEgz?=
=?utf-8?B?UkV0WHIraGRiQmJpMGNEaXExcktIWVY3V1laZHJZaUtTenFoN2JrR200czJD?=
=?utf-8?B?anRnRWFNQVpsMHV6MFZ3dlQwLzczYXJUZE5tZ1J6UzM3dlBkMjFmc2VpSWxQ?=
=?utf-8?B?S3hMYnVWbndlaTd4YVZrMUVEekdvUUlQSWY0Sk9JREZ4bkE5YjAxVTBZdXlO?=
=?utf-8?B?UXpSd2NYeE4zWGRKaDNhRDQvMkpqTTZhUHUvbnp2REsvNjM1RzRseXdEVmVu?=
=?utf-8?B?dllnY09sMENRSSs0N2t2N2xwUnZENUwwNUtMTmJEb2s2QUhIUm94c012bWhL?=
=?utf-8?B?b0FML1kwN3NzSzZIQ2lhcjBYWUpOaEFNZE03aXNoOTViSVFvN0p0d1FlNU5M?=
=?utf-8?B?WVczN1MvTHdVb3dpQW0ydTJVdmxDY3NWSmFpaUVtZzN1b2xyWDJZMFkvTFFt?=
=?utf-8?B?N1dmaTVZL0x6dWhqSFlObnpUcnNCZkFVNEJLU2NZeW1RUzhoVFU0bzNNcXJQ?=
=?utf-8?B?Q0l6WkhYK1cyRFBsVm1GRjVmQWpIYk5lRDNvMGt1RXFEOU1pd2NheklmaUFG?=
=?utf-8?B?YjRnQ2pmUi82L2FubVBjSVBQT2FqNGpDWEhGdTNDcWRLZXRoK0F3S3VINjBn?=
=?utf-8?B?Zk10dzVPeHkvUThSN3VjcG5talpBZUhhV1BBZm9BSFJLd1pLQnA3djRFR1N3?=
=?utf-8?B?T2ZTZWhQdFE0enR6Y0djRk9XV0ZnN3lmMG93M3ZjYXQ0VForMnhCOVlydzhO?=
=?utf-8?B?WmhWRG5ONnlob2kwMGR5My9taWxhRDBrcno5aXJQNlJ3ZjIxRFNWbVZ6a2pD?=
=?utf-8?B?dXk0YTV6OWt3R2Q2bitTVjloNkZmb3hjMHE0Zjd3NldjU0hJTkdmN1pYdjgw?=
=?utf-8?B?QzF5OU96MWdZem9KanpSSkZHdzdlcmRjb3BXVXFtbjUzTVJsMk5uejc3V2ti?=
=?utf-8?B?QlNZdjJnSzN3RmNqUEhaR0ZON0xhNEswZzJIUDNuaGJhTVA1bnFkWmFLVFFN?=
=?utf-8?B?SWo1Q21heUlMdTFDQk5pZnVSOVRoZjZyUVVvNnNDZGxkMWJ4eUVKVnlBM1Nm?=
=?utf-8?B?Ym9nSXlqOHJnM3VPWWUxK3lmb0JjdmZrN3ZMRXR6V1VmUHJ6akpvc1EzQkRv?=
=?utf-8?B?V3I0Y1hOdkhWWWhqZXRqZXNnM2h5MjBtNzFZTlV4VnNzTWFaSWZBd0dEeW5M?=
=?utf-8?B?d041Z1JzMlVoRjFZZ3ZMVUJiNGtETllQd3lGaStZdER3QlBuemRpWUFiYmN3?=
=?utf-8?B?cE5jNzhYcGVyQVJKdkVYRHU3ek5OMDZORjl1VVVmejVWMmVaWlRFTkVCR1RL?=
=?utf-8?B?UnVZV2Jud0htV2YxbUZjNG1CZXVrKzRBUGpCZUpuTUxTeitFN1BmcE8rQnpV?=
=?utf-8?B?bVAxcjlLb1ptRzBnM05aclVCM2ZyRm9ia09hVFo5bjZ3ZWJQZWg4K0hHSjlB?=
=?utf-8?Q?wqyILnQ0o4w=3D?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN9PR03MB6201.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(376014)(1800799024);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?utf-8?B?VmZYa0Mvek93SEJ3RXVWTTgwVXFXQ3VvSHgzWXpoZm9uRkFJRmR5QlE2a0d1?=
=?utf-8?B?SFJBMG1NUTBUQ3NObEc5enVkMVcrN08wWTUrK3cvaVBaUzlPN2V1UVFvNVJy?=
=?utf-8?B?dVVyaFVPakVGKzlxSWNiZzA5eFhNSU0xT0J0SE1HOVVLRFZNU3NEYmZkbnkw?=
=?utf-8?B?ZHZGdHdrZE9hUzRmdnc4M2lRVFBOU0NBZ0szbkkzSVNKMGVnb2dnZkZocmFl?=
=?utf-8?B?OXhsQm5HUHRhUFE4T1BCSTNwRlN6bUgwUjRzZWRDWnA1R25wV3BpSU50MHY3?=
=?utf-8?B?REtlSXBwRVp5VjFwL0wrNm5UNWpaNDhJOHZBWWVmT3I3RUI1R2duUndEQ1Jn?=
=?utf-8?B?SW9mK0hiL2VzaG1HVGJVSFdsRmxwSlJiaUtaNjI1N29VU084Zm1lMkVQa0lq?=
=?utf-8?B?ZE5iYzFJMlY2WnVSZkxoOU8ya0pOdDlZRFl3eElSZHdGdE9WblBVODMwSmth?=
=?utf-8?B?RW9PaG1mUGtXYjRvcER4TUFUR1g2cGlhaWF2aHd1TnlqTU4wYjljSkRwUHFB?=
=?utf-8?B?OUlWTmJUZVFTNi9nQ1VheUNQbnhzNG81MVMvbi8yRkdrdGpZN0F2WU1uWHkx?=
=?utf-8?B?VEZJRXZ2RnJKZTJmK2JlVmRWb3ZuMS84NUYyNy8vT3E1UERoWjd2RGdmdjEy?=
=?utf-8?B?dWY0dHVxTWlTQkt6c3FZWG5vdXhNSEFSMUR1U1B4QjlKSDUvcHhTZjdNWmhh?=
=?utf-8?B?ekxIem1oVzZlT1J5K05FNzVGVkxuOFlsaFJUWUg1WENBTFJ2bitkV0lEYTBK?=
=?utf-8?B?citSVzY2Y2RFUndCUXBRVW43S0gxb3FnZkk5SzliTGRnRThJV0xTM3NWMUEy?=
=?utf-8?B?WDhHYkFEMjV6YkF5M1E0SWtWUUlnaW1YMFZxbmw1QVdod1pnM2MzdVVFdEJ5?=
=?utf-8?B?N085OFBHTkttNWNFMXJqMC9pZGE3MUhsd3Z4QnRWQVZPUHRJaGxDUEZWZEc4?=
=?utf-8?B?Tm9Ha1BRUHRvSGc3ZDB2Q3R1YzJrMG01WkREQ3NWQzFUSlpoeWp5SzVDaC9M?=
=?utf-8?B?QVNUK2ZUUkZ3NG1VcytCYVVVeThsbHhlS0E5cHRnQkJzcXFncFIxWDA5UCtt?=
=?utf-8?B?MTRES1dtalJxUE9lU0xzdEx4QW1lYUVqWlVGdWVnWmtWVEVHRlB1b0FSU3hY?=
=?utf-8?B?VXN2eW1ZWi9uWkRaRlRGbGN6Q1MreXBRZGJDdjlra3R3bWwwRUY0RW1QRFU0?=
=?utf-8?B?L0xoS1NPV2w0OWcrc0c2ODZ6ZDFXT05GSDF6SHVNLzgzSVJQWDRhUlBrVTEv?=
=?utf-8?B?b0lOVmYyWWszTGIxeXU2STk3czJxcmZpdHdoV21yY2EvVi9aSXpnOG5GOUVu?=
=?utf-8?B?TUUzQjFWSTZWRTBEZTlSRTl6bGE2UUtVcC82UFgyRGtwbFZVN21TNFMybVBx?=
=?utf-8?B?ZUM2ZVpvZm9PUUtNNk1BdU81eHYvSXl4UGVXeWJ4bFBSN09NVEFCazl1MkNu?=
=?utf-8?B?S3c4MG9vMy9SalNkd0JQQWZvR0I2VzFIZXNkcnBoSi9VUVBnbkdnQUlvbEVH?=
=?utf-8?B?Rk96VFJQejJsMnkzaEhwUlVCY0t0eWRzRVJpRTdJZFhCM1dDbEl3MUVVdThI?=
=?utf-8?B?T1pYUS9TbWcwU01od2FWR0JuZ2lCVStHQS9YVzNsRndzRHR6UFo1R3E4TnRz?=
=?utf-8?B?cmtzNjRCemtoM1ZFMEs1dDFCYlZsbVVZNGorTnNmVm1sNDNCRG5md055ZjBB?=
=?utf-8?B?NFRrbWJpUnhja0w2aE1XR1ZxZ1pWMzM5QUo1eFgvZm5IaWo3QlJReUdJQzRr?=
=?utf-8?B?ODhFNXF6VnkrSVJVbS8zTDdkTy9MU2toOEFWQlZPQ2NLOEtkcS91QmdtQmdX?=
=?utf-8?B?YzFBdExQL09RQ1djbDFiTms1M3NiZ1VBbEF2QmNNVnFDRmpOZXRycTR4VVN0?=
=?utf-8?B?dStRNlhYYXNSUzF5aE1nNnRxRFBhVjRKUnhJN2x6QS9Cbi9IU0lYeEVtcy9Y?=
=?utf-8?B?T0FrankrOWhaR0txUXFCTjJhRWU3aVE5bjdhMEV4WGUwWTJDeGpzcjhXNVhw?=
=?utf-8?B?L2VuTVVyUWxwb0gyOHphS203elM0MEQxOFpCc25JNHJrQ3J1aC8wMXNUTlhy?=
=?utf-8?B?R3RFV0N5WC90QjUwQ2RsOHlnSFZLYmZ4M1RsV21FL2xpWXRHYWo4VkhBN3BM?=
=?utf-8?Q?f+HuWEdo5QnqJtwbYOdJIHhSg?=
X-OriginatorOrg: altera.com
X-MS-Exchange-CrossTenant-Network-Message-Id: ab328cd1-f40c-431e-af45-08dda359a267
X-MS-Exchange-CrossTenant-AuthSource: BN9PR03MB6201.namprd03.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 11:19:13.3163
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: fbd72e03-d4a5-4110-adce-614d51f2077a
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: mWNynmSK9k/wXZuMiXTD9JibjCRhaKp0SEu5eZ0gwoqOa+YCY092I8Xe3F7QJX4MK6QW+6nSOqya+RaAQYpt9A==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR03MB6554
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hi Krzysztof,
On 28-05-2025 05:20 pm, Krzysztof Kozlowski wrote:
On 28/05/2025 12:29, Mahesh Rao wrote:
...
+ args.a0 = INTEL_SIP_SMC_ASYNC_POLL;
+ args.a1 =
+ STRATIX10_SIP_SMC_SET_TRANSACTIONID_X1(handle->transaction_id);
+
+ actrl->invoke_fn(actrl, &args, &handle->res);
+
+ data->status = 0;
+ if (handle->res.a0 == INTEL_SIP_SMC_STATUS_OK) {
+ return 0;
+ } else if (handle->res.a0 == INTEL_SIP_SMC_STATUS_BUSY) {
+ dev_dbg(ctrl->dev, "async message is still in progress\n");
+ return -EAGAIN;
+ }
+
+ dev_err(ctrl->dev,
+ "Failed to poll async message ,got status as %ld\n",
+ handle->res.a0);
+ return -EINVAL;
+}
+EXPORT_SYMBOL_GPL(stratix10_svc_async_poll);
No, drop entire function. There is no user of it. You cannot add exports
for dead code.
These functions have been newly introduced for the Stratix10-SVC
platform driver. The client drivers that will utilize these APIs are
currently under development and are planned for inclusion in a
subsequent patch set. Would you prefer that I include a sample client
driver using these APIs in this patch set instead?
You must have user for every exported symbol. In the same patchset, usually.
Ok, I will add a client usage to this patch set.
Best regards,
Krzysztof
Thanks
Mahesh
Return-Path: <linux-kernel+bounces-673112-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 61D7841E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:20:16 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 6F7343A55CB
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:19:54 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id B808828E5EC;
Wed, 4 Jun 2025 11:20:11 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="awh5mH7K"
Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id D47D925EFBF
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:20:08 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.15
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749036011; cv=none; b=sYt4ha6AvqDDd0APaL4sZJUc9OrECD8DhfLWW5EEayAj4gqADyLHjyKorvoZnFKQUsokff9+zUbGzXVahsSl8/XJK3IsL7lqMJKd2X5VOxZyWPni9Bgzn40VNj14/84uflZQmutuqwsXoRdC725GMHUyc6HyJXuu2fEd1VXafVM=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749036011; c=relaxed/simple;
bh=YHd4xZcBCdKBN8J++MiZTkfPsgwm7PVknj53DY0Zn6A=;
h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type:
Content-Disposition; b=hZTuNpSurzm/DzHG9w1BYPomotLT8J6EAAjs5jiNEQ526tQXH5rsh1ZZrxAi7lJ6/Yk8lH7LiMgyG1cFJVZoxvkMAMHMk3XG3zaQGPTgqhlFJ9Ue8cxFlRyyXrJSI2Y7iLGLPZhgGb0liQ/L+GidSkd/E5mTzqa4o7mtRDtu+Aw=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=awh5mH7K; arc=none smtp.client-ip=192.198.163.15
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
t=1749036009; x=1780572009;
h=date:from:to:cc:subject:message-id:mime-version;
bh=YHd4xZcBCdKBN8J++MiZTkfPsgwm7PVknj53DY0Zn6A=;
b=awh5mH7KAsRCPlA9PGpZ5RXLMhzx5QQMw9ZthtcOEsWrKJP0RWpZuMSU
ePMulO0TUYtAH0OxKDh5VJHq407J4ZDDyP8+ckLFqGfKymMTo+KD6oDnQ
QeKMj9UkQqsPyOZD4Itm0GqE69iRSE/BFME8d492PqHAHx50HGaTfiHtS
+2vt/7UA+AQUdtFBK2tckSEbp/Hi987BwxtU9TQKszpbGMRyxjv5AizjX
E3hsQXw+FQwijIfHkZsnzYhj8yk2FoniFQ2RHK/MpTyKz7KgTwh/W7qqw
pKJexur+sAUM0jhWHHcr2dv75cT7fUJbZiPdzrk6PPdNq5qCqslZ1SKML
g==;
X-CSE-ConnectionGUID: y+VaGlZ7SKavvoy+IU3WWg==
X-CSE-MsgGUID: I5kNXrV1TGqKagF+A2QQkw==
X-IronPort-AV: E=McAfee;i="6700,10204,11453"; a="51255276"
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="51255276"
Received: from orviesa002.jf.intel.com ([10.64.159.142])
by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 04:20:08 -0700
X-CSE-ConnectionGUID: MC94g4S0Th6O+mli522cZA==
X-CSE-MsgGUID: 8+xvg4u4TM+exkC+Lk/Z8Q==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="176110094"
Received: from igk-lkp-server01.igk.intel.com (HELO b69e6467d450) ([10.211.3.150])
by orviesa002.jf.intel.com with ESMTP; 04 Jun 2025 04:20:07 -0700
Received: from kbuild by b69e6467d450 with local (Exim 4.96)
(envelope-from <lkp@xxxxxxxxx>)
id 1uMmA7-0001g2-2j;
Wed, 04 Jun 2025 11:20:03 +0000
Date: Wed, 4 Jun 2025 19:19:49 +0800
From: kernel test robot <lkp@xxxxxxxxx>
To: Shahab Vahedi <shahab@xxxxxxxxxxxx>
Cc: oe-kbuild-all@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
linux-snps-arc@xxxxxxxxxxxxxxxxxxx,
Alexei Starovoitov <ast@xxxxxxxxxx>
Subject: arch/arc/net/bpf_jit_arcv2.c:2236:3: error: label at end of compound
statement
Message-ID: <202506041921.lFErMU6Q-lkp@xxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5abc7438f1e9d62e91ad775cc83c9594c48d2282
commit: f122668ddcce450c2585f0be4bf4478d6fd6176b ARC: Add eBPF JIT support
date: 1 year, 1 month ago
config: arc-randconfig-2005-20250604 (https://download.01.org/0day-ci/archive/20250604/202506041921.lFErMU6Q-lkp@xxxxxxxxx/config)
compiler: arc-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250604/202506041921.lFErMU6Q-lkp@xxxxxxxxx/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202506041921.lFErMU6Q-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
arch/arc/net/bpf_jit_arcv2.c: In function 'gen_swap':
arch/arc/net/bpf_jit_arcv2.c:2236:3: error: label at end of compound statement
default:
^~~~~~~
arch/arc/net/bpf_jit_arcv2.c:2254:3: error: label at end of compound statement
default:
^~~~~~~
arch/arc/net/bpf_jit_arcv2.c: In function 'gen_jmp_64':
arch/arc/net/bpf_jit_arcv2.c:2867:2: error: label at end of compound statement
default:
^~~~~~~
--
{standard input}: Assembler messages:
{standard input}:32583: Error: flag mismatch for instruction 'mpyd'
vim +2236 arch/arc/net/bpf_jit_arcv2.c
2199
2200 u8 gen_swap(u8 *buf, u8 rd, u8 size, u8 endian, bool force, bool do_zext)
2201 {
2202 u8 len = 0;
2203 #ifdef __BIG_ENDIAN
2204 const u8 host_endian = BPF_FROM_BE;
2205 #else
2206 const u8 host_endian = BPF_FROM_LE;
2207 #endif
2208 if (host_endian != endian || force) {
2209 switch (size) {
2210 case 16:
2211 /*
2212 * r = B4B3_B2B1 << 16 --> r = B2B1_0000
2213 * then, swape(r) would become the desired 0000_B1B2
2214 */
2215 len = arc_asli_r(buf, REG_LO(rd), REG_LO(rd), 16);
2216 fallthrough;
2217 case 32:
2218 len += arc_swape_r(BUF(buf, len), REG_LO(rd));
2219 if (do_zext)
2220 len += zext(BUF(buf, len), rd);
2221 break;
2222 case 64:
2223 /*
2224 * swap "hi" and "lo":
2225 * hi ^= lo;
2226 * lo ^= hi;
2227 * hi ^= lo;
2228 * and then swap the bytes in "hi" and "lo".
2229 */
2230 len = arc_xor_r(buf, REG_HI(rd), REG_LO(rd));
2231 len += arc_xor_r(BUF(buf, len), REG_LO(rd), REG_HI(rd));
2232 len += arc_xor_r(BUF(buf, len), REG_HI(rd), REG_LO(rd));
2233 len += arc_swape_r(BUF(buf, len), REG_LO(rd));
2234 len += arc_swape_r(BUF(buf, len), REG_HI(rd));
2235 break;
2236 default:
2237 /* The caller must have handled this. */
2238 }
2239 } else {
2240 /*
2241 * If the same endianness, there's not much to do other
2242 * than zeroing out the upper bytes based on the "size".
2243 */
2244 switch (size) {
2245 case 16:
2246 len = arc_and_i(buf, REG_LO(rd), 0xffff);
2247 fallthrough;
2248 case 32:
2249 if (do_zext)
2250 len += zext(BUF(buf, len), rd);
2251 break;
2252 case 64:
2253 break;
2254 default:
2255 /* The caller must have handled this. */
2256 }
2257 }
2258
2259 return len;
2260 }
2261
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Return-Path: <linux-kernel+bounces-673113-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 345FE41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:21:32 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 30F707A97D4
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:20:12 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 14F2A28E5F3;
Wed, 4 Jun 2025 11:21:24 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="XjMjnOOc"
Received: from out-181.mta1.migadu.com (out-181.mta1.migadu.com [95.215.58.181])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id A5AD525179A;
Wed, 4 Jun 2025 11:21:16 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.181
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749036082; cv=none; b=NdKXZ4L413LMW7espPFrxfWUJHiKyoaPOWZ6JmpN07ajSJVQIEthAwUo8yOgMomU4BWdUwXaHK5uwdhLE2UTmBEtVn23Dii/vz8G07VSqBUP9+qusvRXKS5HkhnolVHfN1BBkMbMO7yy1Wxw5uwnWT78iC8VtSWaLJa+kOArMwg=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749036082; c=relaxed/simple;
bh=xqm5cHFk20wFqyERODHx0A5Yo7HzFZcrbSgFQoBjAkQ=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=Fz5sfAKkqci9c8sLlFlAx3Qoh+jJ0B+0+rlbeVpP9RlfYsQNBPvvl7GfeSWRiFFhDotM2bmBGzX9v1CwVPpu2LntSRGJjSEGr/N+v0isSWAnWNBDNe40MSlMDNh/Mak/gVpY98IvNul/+IXwvSUEdMepnik11G5IYdWif5zDcrU=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=XjMjnOOc; arc=none smtp.client-ip=95.215.58.181
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev
Date: Wed, 4 Jun 2025 07:21:07 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1;
t=1749036073;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
in-reply-to:in-reply-to:references:references;
bh=B6tNxQUm7SiMLlUyYYyUWjpyr8owNk6jHSf4TF5Pg7E=;
b=XjMjnOOc0hWHjQJHHVVufwJrf8aH7eM5YKXzzrR3q4EoLO9Kc6vjJh3r1iDoK0rRqiBa51
w+rF5p+hTTVqnXv37+TVNjU17atj6QugExvDXYQEQyr9S6UvHWObqv78OXx/MuG64gMP5s
QyQIC9nczpm+ovVfYO62LaiYxfsuFg0=
X-Report-Abuse: Please report any abuse attempt to abuse@xxxxxxxxxx and include these headers.
From: Kent Overstreet <kent.overstreet@xxxxxxxxx>
To: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Cc: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>,
Linux Next Mailing List <linux-next@xxxxxxxxxxxxxxx>, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>,
linux-bcachefs@xxxxxxxxxxxxxxx
Subject: Re: linux-next: Tree for Jun 4 (fs/bcachefs/dirent.o)
Message-ID: <mhmmdwdgody7hmoltfdgyfhnmk5vyydgopzmru3wjmbnyydhkl@di4wpd3e3pvx>
References: <20250604140235.2f14220f@xxxxxxxxxxxxxxxx>
<c15ba8f1-4bf4-4b14-ba79-440a3b17a021@xxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <c15ba8f1-4bf4-4b14-ba79-440a3b17a021@xxxxxxxxxxxxx>
X-Migadu-Flow: FLOW_OUT
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Tue, Jun 03, 2025 at 11:45:14PM -0700, Randy Dunlap wrote:
On 6/3/25 9:02 PM, Stephen Rothwell wrote:
> Hi all,
>
> Please do not add any material destined for v6.17 to you rlinux-next
> included branches until after v6.16-rc1 has been released.
>
> Changes since 20250603:
>
> The bacahefs tree lost its build failure.
>
I am seeing on x86_64 when
# CONFIG_UNICODE is not set:
ld: fs/bcachefs/dirent.o: in function `bch2_dirent_init_name':
dirent.c:(.text+0x13bb): undefined reference to `utf8_casefold'
thanks
Return-Path: <linux-kernel+bounces-673114-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 0A4CC41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:21:42 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 36FCC174227
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:21:43 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id F071728DB75;
Wed, 4 Jun 2025 11:21:37 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=altera.com header.i=@altera.com header.b="ZKXlHlC+"
Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2078.outbound.protection.outlook.com [40.107.92.78])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5B29F28DB45;
Wed, 4 Jun 2025 11:21:34 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.92.78
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749036097; cv=fail; b=S/t7G4HlJbeTfRMtwMHLejNVP/PtjN/NzwwPWMtEZpDoRp6MH2JfQ5TzJ+oOmb/h2qE9lytDmkTx9NTKScpaOyE1CZJNzXFwcK42Jr/+rozuRstL22zI2VjCUcH2Osmgf/OOah6b6Rw7gblXJdgf+K9XRdHcFK9Lp66YYjd58MQ=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749036097; c=relaxed/simple;
bh=kV7vjLU7GNyRsiBJK6HcySc7J/wdFZibeAVdkOqSfjs=;
h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To:
Content-Type:MIME-Version; b=mhljv3G+hXpO7A/mgKm6n6x46CMPI0oLjfQzYrc/bvriH6XX9zb+IjXAcB38QRg1fPX3lrcmUYITrk4VPgExd4/GFiT1stGpSQUBmfTZVCAYAxY90NlnfCuOhfgrP/nubjGdDiawe3aZIHuWi2VaVjUNIF4ktD5uN0T7lDpvzOk=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=altera.com; spf=pass smtp.mailfrom=altera.com; dkim=pass (2048-bit key) header.d=altera.com header.i=@altera.com header.b=ZKXlHlC+; arc=fail smtp.client-ip=40.107.92.78
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=altera.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=altera.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=nS+B34LfCDGwh6OLqEfK4fMnnf8phYh8ma+0VgJ7R44XhF0d9PSkOW+fiErKrsEoD+aX7GE1WGSlMHWZVz8lLPTPIScnei/rPJq+dhZ2w6XL7kWc7EBpdA6wo3XAKOQEM+wrrLgLzgysjqroeni2ROjvupkHV5msKdHuflzCiABWpSsCTHGkIWZVPiXWcUaylv7gBhYvcbuKrdxYzrS1pNaWDFnWi0b8DIHkT6JzkA7FG7Fqt6OVTMwCzBksDu4pcvIP9UEpUsKFE1yZvVs+1igZUep5Y2bQTGmTtSp98Ry8+32VtUg60l4MFn6SMsYwkE/b6mXgrhqupgajqSk79w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=MtErCyEk1wBu9e9GqpNDqHjUXF/CvLbAkhT3wMGsoI0=;
b=lMGCn++f13m1g4IfvqPaEWZvFLXgxuJRBPXNnBiBoYc7TAjwvSjifOjGN1zaBX8IrimR8UQ2z08n95NTDKDLUifyPN1KCBPkkkyoNw1WGzHQZ2bvvSv7OGrGEIz+lQXDPtijz6gwjc1d1nWmgOUkvKtjf3xZeroIOhdrTEH1h4aD7IYNp584ZIIFceuWPT0hXM/sSTelpMh+1MZWAhhxRY5ABM8cw097Umhs1kDKgXlBLukKTzKSw/ugNLFpq52ZhmN72LjiDecRDE2qH8wGvfJmuoQvN0z6GIx81j+Dn01mzMh63KAuJMaTgfreBvaLGEZ412Q2/cEY7EwU/mInzg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=altera.com; dmarc=pass action=none header.from=altera.com;
dkim=pass header.d=altera.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=altera.com;
s=selector2;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=MtErCyEk1wBu9e9GqpNDqHjUXF/CvLbAkhT3wMGsoI0=;
b=ZKXlHlC+qcONW0a2sR1fJbd027bOh8dJgOl9RS+DO6R3gHYI1udcui07RLZEsoYFGzbrku5BB9WyQlggJbBnQtbp0/SYQ1P3cjhWkpxcIcIkIznIUfizFhvQIXplssFMUSkF4KXHKuRxsCP+/WI1CqNpAZ/nAQmaCYzBXRd51Lp3ggClZKcD21xkVw5Di9cy71nm0obhbKa9yqxMAESD7fcJzSKiDo2TEctcscq3K5uF4iAPyaiRd30czkfmn5lkpVzMIPQ4jCbRmhb7dvjbqnXKs5uIKOvkFD/kkHKexPFx6LQy33XJwmUksJ86Q0f8euynpC9OYPPcjgeLlZE4OA==
Authentication-Results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=altera.com;
Received: from BN9PR03MB6201.namprd03.prod.outlook.com (2603:10b6:408:11e::20)
by MW4PR03MB6554.namprd03.prod.outlook.com (2603:10b6:303:125::11) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.34; Wed, 4 Jun
2025 11:21:32 +0000
Received: from BN9PR03MB6201.namprd03.prod.outlook.com
([fe80::6b16:5fd0:112:ab8e]) by BN9PR03MB6201.namprd03.prod.outlook.com
([fe80::6b16:5fd0:112:ab8e%5]) with mapi id 15.20.8792.034; Wed, 4 Jun 2025
11:21:32 +0000
Message-ID: <ed37f7df-3d67-4da3-9189-07cb3e55f13c@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 16:51:25 +0530
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v3 4/4] firmware: stratix10-svc: Add support for HWMON
temperature and voltage read command.
To: Dinh Nguyen <dinguyen@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>
Cc: Matthew Gerlach <matthew.gerlach@xxxxxxxxxx>,
linux-kernel@xxxxxxxxxxxxxxx, devicetree@xxxxxxxxxxxxxxx
References: <20250526-sip_svc_upstream-v3-0-6a08a4502de3@xxxxxxxxxx>
<20250526-sip_svc_upstream-v3-4-6a08a4502de3@xxxxxxxxxx>
<4dab7429-9b4f-4e76-9076-aa3eff759730@xxxxxxxxxx>
Content-Language: en-US
From: Mahesh Rao <mahesh.rao@xxxxxxxxxx>
In-Reply-To: <4dab7429-9b4f-4e76-9076-aa3eff759730@xxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-ClientProxiedBy: MA0PR01CA0054.INDPRD01.PROD.OUTLOOK.COM
(2603:1096:a01:ac::6) To BN9PR03MB6201.namprd03.prod.outlook.com
(2603:10b6:408:11e::20)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: BN9PR03MB6201:EE_|MW4PR03MB6554:EE_
X-MS-Office365-Filtering-Correlation-Id: 8e1ba60e-1356-4907-6c7d-08dda359f55e
X-MS-Exchange-AtpMessageProperties: SA
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|1800799024;
X-Microsoft-Antispam-Message-Info:
=?utf-8?B?SzNqZTU0T2ZMWXBZUUE1STViNWVYRVVFRzdyU1NEVTZNQm1uQW5kM1phSmRx?=
=?utf-8?B?NW5ydG1nSW8rYXFjM2NDdjZMRzA1QWZ6d0JnTlg3OTN6MEhOU24rSS9LWENx?=
=?utf-8?B?WHRGSklyNXlLTG05ZnhOcTlsaEFlSllpVXdLNTFNbUN3UTg0d0hMTms1YmJk?=
=?utf-8?B?WWtCakJidlZuOUpVOTRLQUZwN2xrSWRLdmFCeUZyeVpNTUxkbjdkUWhCbDQw?=
=?utf-8?B?Njc1T2RocUpoeThhNXA4UnJCaDAwUWpUQllMR3doS3FYaHhsaER2VXJDTnNE?=
=?utf-8?B?eFlhZS96WkNXdjlLK1lQT3BmOEMxcHVzUTlPUFUzNzJqNW92eHBtMVRkMitM?=
=?utf-8?B?L2h2dGVhUGthME15OHJGYXlzTFU5YVg0ejlPWWl4MXdRV1RyZWxVNGd1V2g2?=
=?utf-8?B?RTNsNDZCSnZJYTY4eThmaGdUeklyQkthclZqUGN1djU1cXJJTTM5eFFBQnBB?=
=?utf-8?B?QU9ya3hWaDlpdWplcXBiQllEb2lSbW8rNkNCOUdKNU1teHFEelg0WTRtV0pV?=
=?utf-8?B?YmdqOHQ5Wll5RkN4UG1Mc2FmUFErei9uOUhIZzdMMHc1OEpzcVV5RlZLZlg4?=
=?utf-8?B?NStRYU0vUGQ1UTQ2ZC9Scm00ZVNvT21kY1daYVRlRUlnZXR0NTBGVVR0SjNV?=
=?utf-8?B?aWdCcW1pVHVWL0ZrblJpRUpaaDJ1VHJDUkFYRUtnTHZlM2tVWGp4ZjdVUDZX?=
=?utf-8?B?VDMvaDRUMlRMcWJMcnIzcUR5cnlGb2UraWRldTU4OWl4WGptZEI3dzhYRFNm?=
=?utf-8?B?NnBQZkhmSUFQRHNwY2doSjM0cGtMVnBOMzVOOWFiS3JjamlISTBGZ281TDAz?=
=?utf-8?B?b08vSTFCY3hNYlZlSlI2dWxFNEF6eHdoYy91bE9STytqL01CbEIwMlF5bXJE?=
=?utf-8?B?TnJsay9hazVEQlVJY1JMT2JPQkFJTE5GSXVEeFZqbU00WmFURFhUNGp3UDY4?=
=?utf-8?B?eTVEL3EveVN4REVOVEMyQ1VjY1Z5b3k0OXJWQWlyRTFHaFlhSHN0WStHemh1?=
=?utf-8?B?T0hQeW0veXlhMVUwTWdwemk2ZXN0NEdHMzF0MXdVblNVYUFObzI5d1ZHSXRZ?=
=?utf-8?B?UU80dkhKWU54d2dQS2FkWlRvQTAvUzVsZk9pbXVFRVFmSXU4aFBhMWNiZlFa?=
=?utf-8?B?enBjTjQyR2E4SnU1RU01L0w3L3g0TnBuR2lLOVNiTjBpTmI3Y21BbE04bzdM?=
=?utf-8?B?MEVBcS9ISHU4ZHd2Rnp6UzY1a1FkQTgyZ296dTVaY09IVVUxZmlDV1AwTmZQ?=
=?utf-8?B?QmxDZWFZL21lZXNhSFEyb2NLV0RQSDhOaDlORmxKZWxkRkVMRW81MlpRV3BZ?=
=?utf-8?B?MHUwenJCMVZ2WE14dzRvSXNrdG1GeWtBdmN5aC9hKzdFRGkxbGJuMmRlTDk1?=
=?utf-8?B?RUtJRXR2U0FCUTJQUjVCdk1oLzBCMHdOeklPOTJNUG9YeDlpR2ZEL1BXWjhl?=
=?utf-8?B?dHFMSWhGZFBZQmRsSmFjUjlEUzNBVHR3UElIc0E0a2dsazVuMlBlMjN4RU9m?=
=?utf-8?B?VzdHSHNYSW1TVTBSMXl6ck9LV21UZnE1NGptQmlIcGc2ZDByakNDTFVEZjBP?=
=?utf-8?B?dnFwdzdyRnRSZFRpNDVvUFJidEc4ZTkzZllqWDRjdzNvNTlyOHI2bWlRS0pJ?=
=?utf-8?B?VUFpZXM4SHRNeVJrd1Rncm9aTFdlMjVEL256V2k2QVM5MG1iRnJ5bzNML3lC?=
=?utf-8?B?blE2ZGtvb1ZpSUJMb1pybmE3ZkZrK2NUQXVmQU0zTE1hQ1ZOUm1GY2JxRzZX?=
=?utf-8?B?aTBrVndRT29qZ2huMktvRklwWXMwaE1RM2pyR3FRcXZqMDZBYmQ0dFVGVGZY?=
=?utf-8?B?cFhkeHlTNjBOVjk2dU1iM0RVY3l4RThUSUJrMjZWK29IQko3dWJ2dXAyK0ll?=
=?utf-8?B?Z1ZVWTF2S05ubU5CK2tNWjdOTStKVTZtaTFuZXI3cG9JWHZUN1NPelNPVGxo?=
=?utf-8?Q?Ns6aGCw36UI=3D?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN9PR03MB6201.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(376014)(1800799024);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?utf-8?B?ZEk0NFUxWkdwdGtJaHpHdXdrRDY2MXFkVUFhajRWYjVQT2loY2RyTHZLdm9u?=
=?utf-8?B?ZXVyeHQ3Rm9pK3EvV0hsN1lSS21vNk1NNkM4RkM3VWdHc1JBMFRVYmhETm1K?=
=?utf-8?B?c0kwRnZzQzJ2eTVBbGVFaE1idjRNbnpyajdYOUFlTXp5aHM0d0RCdHllV2Ru?=
=?utf-8?B?VWdsYTNkUE16UUF2TWhXaFdDU1FJakdBWCtlcEZLQ0kwa21Ga3g5Znk4RGM0?=
=?utf-8?B?dnhlRFpQd2dOZmJwaFlSVGY3K0VGcFB2Ty9nQnlwTHNDemJNcUM2QVQzaHJ5?=
=?utf-8?B?aVdrYXg1bFVnZFBXaWV5U2hyU0FPK2s3dFVZU0QrUWkwYlJwUTlBVklXTFZT?=
=?utf-8?B?S2JSZGVnejZVTjdiTTEvT2pXWHE5ZVZaSGlYUkNhZzJtNmZCZ01CaUhtU3Bi?=
=?utf-8?B?MDBlSGNySmVpTGJUcGpXYVBuUzJBbElFa3NtemNtNkoybU9lVWRwbS95Y2I0?=
=?utf-8?B?dFlEemlpeWNoQ2dhUy9OZWRxSDVSWE52Vi9HY2tkZDQvamxJUk5EOFJtdnh2?=
=?utf-8?B?UVpESDR4TDVxLzNSRzQrcm85VlBxLzg3SDJzVC9YNzZjRW10ZjI2eC9DcHpN?=
=?utf-8?B?U3NvQ2VWSjQxeUJrQ1dhVVJOWEYrSUltWmJFNWdYbFk0QnBzNUJ2L0Q4OUln?=
=?utf-8?B?VmRlVCtMVUJ5ekluZWNIK3FOSmhTb2o2UFlsbWxWTjU5ZTFpZ0pKNlNVZEtl?=
=?utf-8?B?Q2lEazMveHNiWnZQNTVhUktaYlJHdmcvTDQ5SW9pMmRiVWZRaHZJRW5kcWxY?=
=?utf-8?B?b3NuMlUvamJnS3Y2eU9tMXN3L2xka3VMZFNKOUM5cVpFNFBiTElIZ2F2ZXQ0?=
=?utf-8?B?b2FPYzg5MWpSUEEvazc3YWloVnhEdHdjd0JvNUR2RncyQllBbDVvcXpocHV4?=
=?utf-8?B?K1NNa3ZBaUNwREt0TnNyeXdjVVhRL1ZJRkdiK3gzbXZ4dEMxcUpPTHdyRmt0?=
=?utf-8?B?Z05KWGF0bHI3U1RDaCtseUN3YWorU3Z5Y3lJOW9DUUwyOTVwaVBXOENKbEJo?=
=?utf-8?B?Y3JOTnRydEpkZ2VaekRyKzJhb25hdUpWS1Fjb2tiS1pWaHRiMmQ0OFlEeUEy?=
=?utf-8?B?YXJ0cjhkdkZHejg2RXRpcWQ0djdFekR6N2JPcVhadWVabXZOSmJ3VVVhdSs4?=
=?utf-8?B?Q1JqcDhKeFo5aHVqYzk3eXkzMzFXSURXKytZKzJZaEtXbWlNdGxtYjhoMjR2?=
=?utf-8?B?cnVZZUk0U0ZHaWJSSDBBUEpaNGc3UWd5QUVySVFEZTd6OFlrRTAvdjdodjUy?=
=?utf-8?B?STV5ZkpEK0RTMkFiS2FKSWFYVER5MlRER3dWZXJKRWJrN0VReFlDTjQwb2ls?=
=?utf-8?B?NDZZcEswVktoMzlGcVVQaXZBa05kNmh6cU9GYktvMmVCa1pDZHpKNFdWaW12?=
=?utf-8?B?M2FteHBEanFBWlgwY21hSmI3d0gzbk5ROFcxZmsxWWRsMWRnQkFac2l1ZFJu?=
=?utf-8?B?MUd1THZ6Q3B2RjZNZXhyR1psMmVsb0ROcXlnc3hNanVxeVQ1YjFQQnJReHBj?=
=?utf-8?B?TUkya01TM01pWDVvbW1xRWlNOGhEcEFMT1doMnllY2paeUQwRm9pTmRJQTNP?=
=?utf-8?B?T1NmUklPRFN6S2x4OW1NdUdLdmVscVlJY2p3ajFkWnRONFdkVmhjRGYzMGJ5?=
=?utf-8?B?eUM3UHNyZ3pNLzgwZHE1RWQ4RGJlQTM5UDFuaXZvMCtPdWQ4TkRLKzh6bHlQ?=
=?utf-8?B?VTgzdjBsU1BDTHZTM2VPWkJsRUxhTFY1YWZqR2VJdFdiZmx1c1lDZEhVVGI0?=
=?utf-8?B?OUZHdlFaSUduYzU3Y3JQOUZmZG5hQXY0S1VIQUEyMGJkQ2RVaG9pTldNMTNR?=
=?utf-8?B?aWtHTnRuN2s3aHVpbzQ0a2U3TXlqSFQ0eTJ1ZytsVVF3TU5HZ2E3OWNOcFUw?=
=?utf-8?B?TWI3NTkxN29rK01rbVh5NVRoL2lJd3ZzeW40anBaWnZjTjlWV1ZjSzErMGIw?=
=?utf-8?B?eHRGdzl1VWJ0a0dQZm5WZWx5dkxJRlFjOWg3dVR2OWVmT015UXFNQnJkQXdX?=
=?utf-8?B?bC9RZ3h6ck1ualF3cC95MFZFdjhuM3lOQlZjaGFhRTFCeFZ1TDFhLzFydno3?=
=?utf-8?B?ZEkwTkg0aVBJL041NU1PWWhpNklqZVQ3K3R4OVoxVEwwZU9COE9qb0JKQm1V?=
=?utf-8?B?TzhSSnMweE1IR0o5YXB4UVlzZzAwMHRjeEp3Q0Y2YjNRTmpRNTlyUVNqY05w?=
=?utf-8?B?TlE9PQ==?=
X-OriginatorOrg: altera.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 8e1ba60e-1356-4907-6c7d-08dda359f55e
X-MS-Exchange-CrossTenant-AuthSource: BN9PR03MB6201.namprd03.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 11:21:32.3946
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: fbd72e03-d4a5-4110-adce-614d51f2077a
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: AJEqxEFcQqHBoKOrfBLQ/aYSn0gJv8N8oIV84LkRL/dKYXaV9xH4OAS/qja4eF+E3X7nRViHBy/UGEvlC1+PoA==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR03MB6554
X-Spam-Status: No, score=-2.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_BL_SPAMCOP_NET,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hi Dinh,
On 04-06-2025 01:14 am, Dinh Nguyen wrote:
On 5/26/25 01:25, Mahesh Rao via B4 Relay wrote:
From: Mahesh Rao <mahesh.rao@xxxxxxxxxx>
Add support for HWMON commands in stratix10
Asynchronous communication
Please add more details to your commit message. What kind of HWMON
commands, and why do you need it. If you ever have to debug using git
bisect, you'll find these commit message very useful.
Dinh
OK, I will add more descriptive message in the next version.
Thanks
Mahesh
Return-Path: <linux-kernel+bounces-673115-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 60E9141E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:21:53 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 183D11750B7
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:21:54 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id B732128EA7B;
Wed, 4 Jun 2025 11:21:44 +0000 (UTC)
Received: from mail-il1-f198.google.com (mail-il1-f198.google.com [209.85.166.198])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9167D28E61E
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:21:42 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.198
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749036104; cv=none; b=PD30rcQq06IbWBD8Swau3UToQXyLydYntHTQSixgouz0PFiWGr3OsMS4vbJNgcMUFjyJtaMcSN+zbOTJNxBOwe1Ua680mtfJTPeMcGVfm5fR7K6TUOIz7BIgXzRMmdBd11ZLQBrf4k4H6PZunL1nWMLn1JDDvvr3ykx3kU4mjuA=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749036104; c=relaxed/simple;
bh=zBYGvX52BxLQ4GUMUxG0DeMTjGwYb+sctll/J9DgxZ0=;
h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To:
Content-Type; b=byPIO8cV5n08+lYpioWPyH0s9AfpUzrGMZabIbxCsHz1cQYG3cz1INTpnn6AJibY6z5uRSda4mYfpWi1mV3Wxk6m1GDEuEpJQIH1J6EK45UnufOvHi675dJdlXG+JCEdG1OtbCNsCD/XtCmrqSK2NwFxoD5BfeR9ZWTNO1h7Ctw=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.166.198
Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com
Received: by mail-il1-f198.google.com with SMTP id e9e14a558f8ab-3ddbb34fc1cso16042955ab.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 04:21:42 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749036101; x=1749640901;
h=to:from:subject:message-id:in-reply-to:date:mime-version
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=zBYGvX52BxLQ4GUMUxG0DeMTjGwYb+sctll/J9DgxZ0=;
b=NogC42wxVapHlz/KK7yGLo0JnY9h3jzsghliETb+R+HmeJAvpXuJFbUCrDsYs7DVyu
MKlQytdNWPNVhTv2YPD1nDnV07LqCvkxVRJRNwMkEwGpOD/u3kqO6U0Sn9QaqNm/TZNI
SH51InjPSXScd9id1ycDPfa9zbhXy2teyZ72oAvsmc5jYDXrXZl5C4U2tAxfG5r/+yJ6
fr7ohKlf87jf7tudnenVbw0bwL011XRInVE2QTYQ9bqNdqkvqZhlEWVhbsee3sGlW8C0
/rAy3w8rzEQLXTqM2KVhTiz6U7OnBBIWogfhGn4sdGED7EObQjjetUrtyC3E0dMciw23
yrHw==
X-Gm-Message-State: AOJu0Yxmceue07KXOcYZ6wkWdE/zMQ4ksR+FHUGZbHCwF0+pyRCdSUNj
rCmJRq53gGjGYs5qOGCzQM3XVUhT+522W3uPZhRtXcQeotVqpwPksCTxZ3bxbUegn1GsGmRQaw4
P3EYwjtB4yG3vr6a2U+t9fP4EUanzAmVvRMwmEGuokKaIlwbz2+GPSD5F/xo=
X-Google-Smtp-Source: AGHT+IHkGpWjXLm4JAyFF3HtqNsQSlSBZxIZ2ZK/FxttcAI3EM32GB6aJuvjD+bsBV1SXBwag3ErfSWPHMe9IOq0M+r0YqZ4ReQ0
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-Received: by 2002:a05:6e02:1807:b0:3dc:90fc:2831 with SMTP id
e9e14a558f8ab-3ddbecf1d5emr25412625ab.4.1749036101653; Wed, 04 Jun 2025
04:21:41 -0700 (PDT)
Date: Wed, 04 Jun 2025 04:21:41 -0700
In-Reply-To: <681865d0.a70a0220.254cdc.0048.GAE@xxxxxxxxxx>
X-Google-Appengine-App-Id: s~syzkaller
X-Google-Appengine-App-Id-Alias: syzkaller
Message-ID: <68402c45.a00a0220.d8eae.0087.GAE@xxxxxxxxxx>
Subject: Re: [syzbot] #syz test
From: syzbot <syzbot+0a36c1fec090c67a9885@xxxxxxxxxxxxxxxxxxxxxxxxx>
To: linux-kernel@xxxxxxxxxxxxxxx, syzkaller-bugs@xxxxxxxxxxxxxxxx
Content-Type: text/plain; charset="UTF-8"
X-Spam-Status: No, score=-3.0 required=5.0 tests=FROM_LOCAL_HEX,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
For archival purposes, forwarding an incoming command email to
linux-kernel@xxxxxxxxxxxxxxx, syzkaller-bugs@xxxxxxxxxxxxxxxx.
***
Subject: #syz test
Author: abhinav.ogl@xxxxxxxxx
Return-Path: <linux-kernel+bounces-673116-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 3D22F41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:23:18 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id A8C347A4126
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:21:58 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id DC0E428E607;
Wed, 4 Jun 2025 11:23:09 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="hm2UJ0Mn"
Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2056.outbound.protection.outlook.com [40.107.223.56])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 474692C3261;
Wed, 4 Jun 2025 11:23:06 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.223.56
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749036188; cv=fail; b=pr77t32IP9oK76kIKz6cwFjKOP6d5nMRZDRQTbkb2KZuoRCsF4H7wbA1mYkmC7rgDKmbJkHT9eai8InQHqrQzD+hNDi3egloCd70q7LcSUsDt+NxKTWDDQs39/NQ+f78aYPwcd2G0wtRnYqBLcx3+yya6UV3KogdbBa/TicDTDo=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749036188; c=relaxed/simple;
bh=9xMBhfCX/LoMOYYMeeRFCzvvW9eCiwinCmX1WM7l+fw=;
h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To:
Content-Type:MIME-Version; b=rrNqllnj+vYd4oMSyf2jj84xNIbMu7tKBNa19/njm/OCdmE7NBlhFRHdKT9bmDhEMnDOK8EP5xbGVDHuRl0p4WgSUMUTu/7qvlKbqDT+zlZSZWUqDQc9uvFr4IQyVPf+3aqjoYEhNEBxMb2AtMisStPjG65+nhBDLnsOd9vYJ+M=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=hm2UJ0Mn; arc=fail smtp.client-ip=40.107.223.56
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com
Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=DxFmwZzZTaJQeuMDsOy0X0El6gWNVHNdAPBJgGR8Q0jN8IN4r9X92D+Yj+nBG6YL8oJxUMreXySCHPAjm89JDP1q++XziziekYmrCjSPk/FDAruKIw6QWg7Cz6XaHGskjuQKO9hPhrq5ByIQjPkTpm1iRA6ANO/sm72YNGUC6+8z0u01felpWn+hjGQ//d7+ChScnXpi2hhOHz7YgWox/d8LWutxqBqoyjzwOpbxWoBj18Fgcvex83gGNFezdACF4cYPQ8bTKzf3vRcrXuAX7NOtJuwnPRs85F8NHn/YyFHwrLgoZBYaN1GsHU+Ti7VYEIbtGJrN+/+y4NVKss1DLA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=04ZmDTJyKYMGviXE8BbOW1jo+cUBpaQVU6cJCkobJXc=;
b=a7lgHDk0UFFATAtPlr5G0C/AWGkaO8fIzsU1CUlnIeI6tFOO0H1apBQEXmeb8sbuw7SB4T2yUzwHbrSdHHiJt1H6SSDYX5TUca4AGRJmz5p9E0u/+t4FDzgzIRiCXv/ySCTFHr4XUBXBq1XyUJdo/+mCuX8ddK2gRv3GUcfIm29sZ+L8gduHQbsNzJzixp66h/IJhQSCAfESgMR9+xtljWUH+AeAjTlfHnA1ZVUqkUrsG4xEQK3BrOiJDbzMipjrpBbAfJkiETTH24IY2JyKsS0QOlAR+F97H8FALLHKIpuoUDV89TcSxoiZgGT49LvUSEG9Pb/SE16iTl+rWqvcMg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass
header.d=amd.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=04ZmDTJyKYMGviXE8BbOW1jo+cUBpaQVU6cJCkobJXc=;
b=hm2UJ0Mn5RWFktw69gh5NOHILVjDIB30Z/1Yaocm1FbLxvhsatBaqhd1YJpR07QeVdwMVZDhD7JVGKkjgf70AiQI8f3XCckU6wkIjL5V9/4RsdRG4ocBLCN3783X6XU8QuZzjkpgu/5QeyetyfAderTE7rTL/dGaE+rKKbS/nNU=
Authentication-Results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=amd.com;
Received: from DM4PR12MB5962.namprd12.prod.outlook.com (2603:10b6:8:69::7) by
IA1PR12MB7710.namprd12.prod.outlook.com (2603:10b6:208:422::14) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8769.24; Wed, 4 Jun
2025 11:23:03 +0000
Received: from DM4PR12MB5962.namprd12.prod.outlook.com
([fe80::5df0:a9be:ee71:f30a]) by DM4PR12MB5962.namprd12.prod.outlook.com
([fe80::5df0:a9be:ee71:f30a%5]) with mapi id 15.20.8769.037; Wed, 4 Jun 2025
11:23:01 +0000
Message-ID: <4bc3ebce-2b04-4686-b8a0-c08243a88d1b@xxxxxxx>
Date: Wed, 4 Jun 2025 16:52:55 +0530
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH 1/2] x86/platform/amd: move final timeout check to after
final sleep
To: jake@xxxxxxxxxxxxx,
Naveen Krishna Chatradhi <naveenkrishna.chatradhi@xxxxxxx>,
Carlos Bilbao <carlos.bilbao@xxxxxxxxxx>, Hans de Goede
<hdegoede@xxxxxxxxxx>, =?UTF-8?Q?Ilpo_J=C3=A4rvinen?=
<ilpo.jarvinen@xxxxxxxxxxxxxxx>
Cc: platform-driver-x86@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
sched-ext@xxxxxxxx, Blaise Sanouillet <linux@xxxxxxxxxxxxxxxxxxxxx>
References: <20250530-amd-hsmp-v1-0-3222bffa4008@xxxxxxxxxxxxx>
<20250530-amd-hsmp-v1-1-3222bffa4008@xxxxxxxxxxxxx>
Content-Language: en-US
From: Suma Hegde <Suma.Hegde@xxxxxxx>
In-Reply-To: <20250530-amd-hsmp-v1-1-3222bffa4008@xxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-ClientProxiedBy: PN4P287CA0118.INDP287.PROD.OUTLOOK.COM
(2603:1096:c01:2b0::7) To DM4PR12MB5962.namprd12.prod.outlook.com
(2603:10b6:8:69::7)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: DM4PR12MB5962:EE_|IA1PR12MB7710:EE_
X-MS-Office365-Filtering-Correlation-Id: f065ab7e-9dde-443c-e471-08dda35a2a99
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016|7053199007;
X-Microsoft-Antispam-Message-Info:
=?utf-8?B?ajRzNUYvWGpyYWg2NnBNUC9xMDV2MFZGVHM2dlRneGx1ZGtTRHRJY2w4WnZP?=
=?utf-8?B?V2RwRlExbTh4VTVaT1MwZ0dodCtmUG0wNTdzc0gxQ0Z1SENwY010cW9zTy9U?=
=?utf-8?B?YmtDY0s4UVpYV2VjR0d0ZUE0bGdYREF0Rm5UeFo5NUFscExzMkwzYzU5T0JZ?=
=?utf-8?B?bWlvMHVEZkxSR284Qk9HV2xGUlRUYmhWQldQcmdZbjB2Qkg3b2QxZkh3eE5w?=
=?utf-8?B?YlFMZ0IzTXlhMnhRWm5hUkkzakN6WE1reVZBLzBMYVcvdXJVOUtRQmRFUE5I?=
=?utf-8?B?SlRJSTg0SGkya085eDhiTlhjOHRFU2V4VWVFNmNva0VmakxhQmtCb3AyQWNt?=
=?utf-8?B?cUFLTHhzdmZlNW9USTNVM0ZUQk9xT21BaFZuT0Zzc0JSRTJUenkwMXJ5UVVs?=
=?utf-8?B?RXJWeVhsOFVxeGFjT0FQZ1FIbnV4cHpvOUh3T3daQXZPM3ZhNmdZUlZDNU1H?=
=?utf-8?B?S1J2YnR0TmVUMGxwRGNMV1VYQlVwVkhMdEdPK2t3c2ZQZXJhZkIzdFZSUUQz?=
=?utf-8?B?MHlKakdXUUlEUUZZVEY5dFl3eUxlenhxbDhGdENlSWI2NVkxUnB2Sjdaa0tK?=
=?utf-8?B?clhZOXZRM1B0NGNDTjFZK1pJOFZGQ2lIK05XR2JlOUJKV1kwYmRPd0FHZGNj?=
=?utf-8?B?QStHelBsYlk5NGs5V2RNVVRFa0IwZGQveGdScWR6NjQ4TmNjNGdUQTJUUWV1?=
=?utf-8?B?bmNxNFZxLy9wQ1hZamM3N2FxQjR3d2xmZ1ZmZERra1ovMWNPVkZlQzQ3RjBv?=
=?utf-8?B?SFNGaHdhcEUxdG1EM1U2NDlNd0M3d2dOMVVaYlNZMS8zaGRrT2RUSFl1aGpw?=
=?utf-8?B?OUZ4ajROQldoSVV1K0pBZEJjVlR5THZVYjdiaTY0N0phM1hXTzZmLzJ5VmMv?=
=?utf-8?B?dHd6enhCcGE3VGYyd2pGbHVVd09VNmtPUVVIYSs4T1JNaVp4YlBrcWp5Q1do?=
=?utf-8?B?cGxza0RBVU5aa1djcjZsTFVRTzZCZGh0dndTTEpyRVFYbHJ1RTdQZHl0eDVQ?=
=?utf-8?B?cDljNlNEMnFud21NQzYrTUxQM1BvMlFvNXY5SnNIcWNpV2UxZlRsZVVRemNl?=
=?utf-8?B?ekx5SStKNFU0VTNmdTJIUHR4bGJzSjM3RmRPR3NYblN2b1hWZWNPaWNneVo4?=
=?utf-8?B?VG9Yc1FieFVFa0VKVFN5WXZCbjlMOE5TQ1ZRZ0NrR0lNaFkrckpsd2VvQWZ3?=
=?utf-8?B?VndKK3VzYXFQbnM0SUltejNGb05zMUhtMi84aDh2ekpLRnFMVXpKL09wdHI4?=
=?utf-8?B?dFltMDhhZC9vYWRHbk5sOVZsZEdaQTk5U1ZWZzNEOTlGVmU5dXhUNmVkNjBX?=
=?utf-8?B?SS8xc2ZiSmEwV1pUODZkTU1FV3Z2eDNCclZrNlhIU1FYaW9FK0lBQkduSEp1?=
=?utf-8?B?KzY1NUdPSENTRDhYa3BkZWNrNDVHUStheWpJQlU1QThvQWVTUFd4Mm5IWTl3?=
=?utf-8?B?U29VTkhoeWVNL2hkVmRWZ01nQ2hMZEt2eVZwSDZ0TjhpakhkRmNlZWtrbmo3?=
=?utf-8?B?dkVFRk1aZ2NaRW54SEREMUt6SGRiMXhrYVFyQ1BEazB3UUx0dEJMNkk5MHRs?=
=?utf-8?B?MGxiRDhHYlZWb1k4a1NUNVpjVkhoMm1aNlM2MzZOUGwzckZPM2J4K3VBSks5?=
=?utf-8?B?Y2txN0k0T0NlaWc5RmVsRVY0WTdwWFZnMFFsZGREcERmNHVXcXdOeEhIRncr?=
=?utf-8?B?Zi9PaWQxWDF6RERJWXRqeVA4QzhDZTg0SnBsMGFTeEEyOFZoalZLRHVWMG51?=
=?utf-8?B?RDREZGhpVHJvTmxXQ1B0djZYbCtBN0RjRjY1U1ZQajc5ZnE5WU9sK01GSjJT?=
=?utf-8?B?MVFXRXVybEdFU1dUVE9vbDdqbU0wbTA0cUc3U1hrVHJtY2NMdVp2OTJKVmwy?=
=?utf-8?B?OWw0UzQ2N3dHY0c1S1hwT2hYQUorQWRHWW1hU3pGZU9paUp4OTRSU3Q4NjVG?=
=?utf-8?Q?peGNJpAqoJs=3D?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR12MB5962.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(1800799024)(366016)(7053199007);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?utf-8?B?VGNOejNvUzhoc3FIbzdqblYzUThDYnpwODJHU1NkTGVmdlBvVUZ4MFZLNllE?=
=?utf-8?B?dkJ1WWk1WTE4cnhkc1JtMmRERWNUNmtNTUpDNENFYlZkNUhTUHBTR2dMci94?=
=?utf-8?B?YitqZFdZUzd1TlhQdlJpdkxGNktvQkhmQlZqMHZVSUl5UWdCRkJqckptdXU3?=
=?utf-8?B?Z1JGYUFaVnhlRjgvaU5FTjB2bUhpbVZ3YlV1RjBwYnh3ays1VS9Sc0ptODBx?=
=?utf-8?B?QXpON2RWN0dTeHpyM0lCUmU0eGwyYm1JYWZ1U0swSG4xTGNoNlRXK2lFcld0?=
=?utf-8?B?YUZkcmU4Umw5U3VrT2dhSzgzKzBiQ0FrK3AzdVZ6azl3Uy8wOFVWOUFEVEdY?=
=?utf-8?B?TjhsYXc0NkJQUXhVeWVhNzVGZk45TGszMytUTUJwYlNiVmU1bEx6dVNML3Bo?=
=?utf-8?B?YndydzNkV3hhNVN2QmVuUGJXc3FmOWVsQTY1UndYWUJpaHRzaGxKMGtJY0dF?=
=?utf-8?B?TjJsaUJUTnBmbE1nYVBQMnlKbXREZnpPK09LK1dndGhwZXBHTFplZmJtRmdS?=
=?utf-8?B?bVFMMDIzd1Q1aG4xQ1l1aSsyekszVXhxNi9ZQzRHRG9uSW05eU55TGc5MnpU?=
=?utf-8?B?K1I5Zk04R3Z5NW02ajJMbmNNSWdDTDFub3B4azN4Uzh4UGlmQktIemoveHFT?=
=?utf-8?B?UXp5UnlzYXBWK2dvNndIdlllbG5tbEVmdUhFQUlUaXUwNk1pMCtySnVUbWFO?=
=?utf-8?B?cFJVREV0NlAzV3p4ZUdGQVl5REF0Z2Q0NWpHVlpCR3dFcEI5Ly9OY1M1S0Qr?=
=?utf-8?B?R2VQcW9qTlVXQ3FOdjdiKzVVYTI0OCtNWjFSNjRId3h0ajREVHBmLy9RMXlv?=
=?utf-8?B?S1hsVWt2NHlaYTlFY29aWWNlN0ZmdzVNS0ZJZEhlTEFSUDBUQnFOZW1PWlB6?=
=?utf-8?B?RkN5c1pVczU4TWVtbUFEVHBJWEc2Ti9IL3dUNS9tazZnVDluazhWQnlCYWsx?=
=?utf-8?B?TEtHOVN0bkNMUFBlVEhqSFdGL2JFY3c5V0gzdk1maEcvUElIaWk1cHQxeXJm?=
=?utf-8?B?YytPckNVdDJjRTlZeFFEWHkyOEg5MGxDRkNKd0VrOWNZMFNvTDFTc3lWYnZE?=
=?utf-8?B?WlMxRkdPeWxmeDNHck5qK2hPRFErSHJBQm81QXQzamFyUEJCeW4vR3pCVnVB?=
=?utf-8?B?T1NOU1hnK1dHNDFnZkEyK3BmRWsxbkVrS1FsdDFndFhQaHY2Z0JoSzdDT2o3?=
=?utf-8?B?R3hiV1ZNM2xxdnc3VFcvYys5QW5vY2duSXJDaUNWRWtMVzJNVUNTb1ZOZmZo?=
=?utf-8?B?ZHo3dDlHRWhWYlZWSmxvbmp4dVZWb0NqdnF6bEhocVRtZ1lFZHY5VWp3MzRM?=
=?utf-8?B?OEdRblY5QTVaSTJZQ3htQ20wNzN5dTZpUk1qblcvSUxCeERWY3RyODI1Vml2?=
=?utf-8?B?MDdIT0xTVnp4UFRIYjEvdXZqbi9LQk9VNitMVVdmRG1TN0xjM3ovZzVHeHc5?=
=?utf-8?B?dy9YcUl1dFVKUTgwUHltZWZibUZVekJxWUZOSktVQTJJRDlpWVhvSUFGSmVF?=
=?utf-8?B?bXQrUlhFUSt5RWkvR0gxQ2dQaXhvWEJRZVNSajVRby91MURpVk9BVVk3V1Vo?=
=?utf-8?B?bHRFRVd5My8yRkxjQ3BCZmNmYS9lcENWNkV5d2lSdms5NHNsV3RQYVJ6WlZ6?=
=?utf-8?B?TFdiL2luRCt4MytHbGhrbVp0TU5zZU5ydHpDZGRoUU9ickQ3QURyL1hkVUMx?=
=?utf-8?B?V3JRRVN0NGJRd3h3V3NraW1vTGwxaGJqWHJBS0VGQm4rWk9hSm9uNUR5Zllj?=
=?utf-8?B?V3VGVmhCdmtCTUdIOUJXSjRiSmpZU1BQbTF0bHAwWlk0L2NhdU9QUlpQeHp2?=
=?utf-8?B?UUlvc3RlMVIzYmFMWEpNdXlIbzhkdFRpTE56VlNPdDl0M1BoQ0Y5UDJyK1pK?=
=?utf-8?B?ZGlRYlFIR3Bud2hHWG05NldRNEV5SzhQVjhncDBXelRzOU5JbkV1VFhLVThX?=
=?utf-8?B?K0NnOTdEb0JiWm5oZ3VQczNlZjRqcUhubEtpdXhtaUxuTjc1c0U2VWp6VUNF?=
=?utf-8?B?M2JIanlhYmxGVGF5MDFoK1VtUWQ0YTZaRzJMRzN3a01GdzIrMExYaTQ3SXp3?=
=?utf-8?B?L2tmN2tWUkVUcjR0QVFqSkdxOFpFUzdoa1ZGMGdpaSt5Si8rcWNBdHJFa3dv?=
=?utf-8?Q?kQ/6zZLtcSbInQ8B4eW7Kj6Ef?=
X-OriginatorOrg: amd.com
X-MS-Exchange-CrossTenant-Network-Message-Id: f065ab7e-9dde-443c-e471-08dda35a2a99
X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5962.namprd12.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 11:23:01.7221
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: qzPglnMoIiSovTsywLhXZ87aeACSzxlg6ILaSt2QatW7ozdnzJY8PK0yusGQZtsIMDvFEL0WVOsEEFEED68gzw==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB7710
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hi,
On 5/30/2025 9:45 PM, Jake Hillion via B4 Relay wrote:
Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
From: Jake Hillion <jake@xxxxxxxxxxxxx>
__hsmp_send_message sleeps between result read attempts and has a
timeout of 100ms. Under extreme load it's possible for these sleeps to
take a long time, exceeding the 100ms. In this case the current code
does not check the register and fails with ETIMEDOUT.
Refactor the loop to ensure there is at least one read of the register
after a sleep of any duration. This removes instances of ETIMEDOUT with
a single caller, even with a misbehaving scheduler. Tested on AMD
Bergamo machines.
Suggested-by: Blaise Sanouillet <linux@xxxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Jake Hillion <jake@xxxxxxxxxxxxx>
Reviewed-by: Suma Hegde <suma.hegde@xxxxxxx>
Tested-by: Suma Hegde <suma.hegde@xxxxxxx>
---
drivers/platform/x86/amd/hsmp/hsmp.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/platform/x86/amd/hsmp/hsmp.c b/drivers/platform/x86/amd/hsmp/hsmp.c
index e262e8a97b4542a389e09a82dad71f7d2e8b2449..f35c639457ac425e79dead2515c0eddea0759323 100644
--- a/drivers/platform/x86/amd/hsmp/hsmp.c
+++ b/drivers/platform/x86/amd/hsmp/hsmp.c
@@ -99,7 +99,7 @@ static int __hsmp_send_message(struct hsmp_socket *sock, struct hsmp_message *ms
short_sleep = jiffies + msecs_to_jiffies(HSMP_SHORT_SLEEP);
timeout = jiffies + msecs_to_jiffies(HSMP_MSG_TIMEOUT);
- while (time_before(jiffies, timeout)) {
+ while (true) {
ret = sock->amd_hsmp_rdwr(sock, mbinfo->msg_resp_off, &mbox_status, HSMP_RD);
if (ret) {
dev_err(sock->dev, "Error %d reading mailbox status\n", ret);
@@ -108,6 +108,10 @@ static int __hsmp_send_message(struct hsmp_socket *sock, struct hsmp_message *ms
if (mbox_status != HSMP_STATUS_NOT_READY)
break;
+
+ if (!time_before(jiffies, timeout))
+ break;
+
if (time_before(jiffies, short_sleep))
usleep_range(50, 100);
else
--
2.47.2
Thanks and Regards,
Suma
Return-Path: <linux-kernel+bounces-673117-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 501E541E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:25:19 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 4ECED3A55ED
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:24:57 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 236EE28E610;
Wed, 4 Jun 2025 11:25:13 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="Uta72S3L"
Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2086.outbound.protection.outlook.com [40.107.220.86])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id C188E2C3261;
Wed, 4 Jun 2025 11:25:10 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.86
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749036312; cv=fail; b=C+NhvbkHVeYzjaw5brU/T1alYSHmdUNe3GvGQsGg9ejyQGXgFCoixwn5vFzKEsuxP3it3Wm5cNRS6BVT8OUzkzXtLaFFTM0po3wTY68bUglm2dhmpuIv8Q70xs/jpsMmNmEoVmQkqQVggj1aFRJ0dBn7nT/TQ6bLCmrrkOPcn8s=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749036312; c=relaxed/simple;
bh=Sclj0X5Wqmd5jdHr2V+8R/l3yobv2CN6mEv5Vg30MXI=;
h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To:
Content-Type:MIME-Version; b=s/MMiiYApn3w0Ow2meFz4hFOqHl72HEKbfQ9Ex91SLEPl7UxWzLjiunLUjBjno/Y18E6p6QhbYgjetQppGpzr4bgWvE+iJImU0ZXaZt+EGXKO7NWc+ViXDDng/WJjZfzO96r64J3G8DfHtn9/SkPko+ripvDdxtxRrQw1Q37InA=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=Uta72S3L; arc=fail smtp.client-ip=40.107.220.86
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com
Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=B0SvnO+HzP3VADjE8DhjubUlNgKH1xMqmc+bFNKNR+MQXhfi6yOwp9pflVSQ73YhAbtK8FIuMNcw0h8NKe0ftX2MtQvKpqEtv3shKoj/jQKlRKI8FRe/NnvZU/KOQUzhJrGW67KT8tuPKaiRwZyotBd79y6yn5xXeQRlfe6UHlFeQ2X2XZsH8kNyU/bZyOJ72B4T35Ww/SHBwtoT8BbdxhdUjzU3I929nC6/dckfRucZFcUQ6tyWkU+IgjOWwpkueksl/8y5Uy0IDWYtJvmIVNHAPk+Cyhc7v7oiwrqlETtOj+L9CAKXBY/MTI0Z5bCtkcAl0G7vKpgifgQUwVgH1A==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=Ef5MtIATJQApQ4C4MrrH6jMGYSdXle9FqJxE0HUr+XQ=;
b=k5svt+v5bQ+tjnqB62fiRCoxrnYjNJ2Qiz4WMqvnnR/XM7OhlHjQ14Hp1F/6MwNJ4BpRQTbcvwNUURemkHVpIj34c7x6NtUwb5Pype2r+tqfSJM2b4yHUGs7KxGeNmHXQJO7SOOh/gHB+eQeKEJk+ZanMdaN/BlybxgVz7yIFcw5XpJgRUz0uzo5Yi7k51WGFFn2tQioTycTCRSh7rwGjlGZmhM7VguOcZNVjRQ/Tz6dQk1hS+aJnSOxR4ekNYdWTut/oG70RYbzXe7IttRYygsi5Zla/HbsmsYkEJwOcc4hgKKI9pdpwYltvwAOlFV15KeVvAEYHtMX25V2smJCqQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass
header.d=amd.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=Ef5MtIATJQApQ4C4MrrH6jMGYSdXle9FqJxE0HUr+XQ=;
b=Uta72S3LsqTYuUZ0i4kYaQ004LAim+y1ePtg0qyiiv2Xv6G9mvG1PeZXZNqN2tX3hZWEpU3aHb898yH4P1Yk5qUetZh3gxgueto+T1cp6O9b2U6GkUy0BbA0w1x6YyRQThh9qKrVcM37RKW1vv7dfwhXbsudgu8MCcPOVxVeios=
Authentication-Results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=amd.com;
Received: from DM4PR12MB5962.namprd12.prod.outlook.com (2603:10b6:8:69::7) by
IA1PR12MB7710.namprd12.prod.outlook.com (2603:10b6:208:422::14) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8769.24; Wed, 4 Jun
2025 11:25:08 +0000
Received: from DM4PR12MB5962.namprd12.prod.outlook.com
([fe80::5df0:a9be:ee71:f30a]) by DM4PR12MB5962.namprd12.prod.outlook.com
([fe80::5df0:a9be:ee71:f30a%5]) with mapi id 15.20.8769.037; Wed, 4 Jun 2025
11:25:07 +0000
Message-ID: <b579c4eb-058a-445f-b288-aef1daffeaf3@xxxxxxx>
Date: Wed, 4 Jun 2025 16:55:00 +0530
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH 2/2] x86/platform/amd: replace down_timeout with
down_interruptible
To: jake@xxxxxxxxxxxxx,
Naveen Krishna Chatradhi <naveenkrishna.chatradhi@xxxxxxx>,
Carlos Bilbao <carlos.bilbao@xxxxxxxxxx>, Hans de Goede
<hdegoede@xxxxxxxxxx>, =?UTF-8?Q?Ilpo_J=C3=A4rvinen?=
<ilpo.jarvinen@xxxxxxxxxxxxxxx>
Cc: platform-driver-x86@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
sched-ext@xxxxxxxx
References: <20250530-amd-hsmp-v1-0-3222bffa4008@xxxxxxxxxxxxx>
<20250530-amd-hsmp-v1-2-3222bffa4008@xxxxxxxxxxxxx>
Content-Language: en-US
From: Suma Hegde <Suma.Hegde@xxxxxxx>
In-Reply-To: <20250530-amd-hsmp-v1-2-3222bffa4008@xxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-ClientProxiedBy: PN2PR01CA0030.INDPRD01.PROD.OUTLOOK.COM
(2603:1096:c01:25::35) To DM4PR12MB5962.namprd12.prod.outlook.com
(2603:10b6:8:69::7)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: DM4PR12MB5962:EE_|IA1PR12MB7710:EE_
X-MS-Office365-Filtering-Correlation-Id: 4f09f9f4-2567-41af-da41-08dda35a7590
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016|7053199007;
X-Microsoft-Antispam-Message-Info:
=?utf-8?B?MW9pYnFhdW9vZjl0Z2hWcVdkOS9lK0EvaENrdUxudEtVQ0VVMUtMdHZVcGk2?=
=?utf-8?B?YzFpeUdhNE4zUzlwMXUzTGUwS1k3MFVvMlNsVm9WMVhzbFl2d094OGZFVFRn?=
=?utf-8?B?c2VGN1BJN2hJd29SRVBobHcxdEZvNkw1dnFmbFN6SEZFc3dCN2lvZlBlRGNC?=
=?utf-8?B?TFo4UjB2Qlc3OXkxN3ZoZGpqbGNsV1ZmaGdpTkFCdUJySDlDVXN6ZGV1cUZG?=
=?utf-8?B?MENITjQ2b05MZkJ5UldhSndFOGRRZnlHT2d6ZVIrZEd3SDZxOUt5UTNkd0Y1?=
=?utf-8?B?TmRKY0hrUXI4UFNWUWVmSnhoalN3bFByUWlqaEhZdVd3ckVtK2RXMXR3ZExJ?=
=?utf-8?B?NFFIdU9zZHhtQnZ1SGpyOFpDUnhtOTRRL3dDMEV3dmpUZDNDMzR6N3pCUnBD?=
=?utf-8?B?ZUR5Tm5HcEV4NGkwbGl0b2FtRVMwL0J0ek5NWVNZazNWaHhwV3Q2NE9GYkpv?=
=?utf-8?B?eXcyTDc0RTJhL2hIUm5kTmJFSWV3dTlpZ29BLzJZWnBHTjRrS0NCcGlBYUpY?=
=?utf-8?B?OGxrWlhVS1hIVmFWa0x0Y0VoUmtFeHhYOFdtcWdBbHg5WVcwTHJ0aldUMWs0?=
=?utf-8?B?dFRENFVZY2JGblZaQWhZTklQc3lJeWtmcjRJZEdJUkVzTmRpTW1DSlRCSzhQ?=
=?utf-8?B?blpPL3g5alhJN05vbG16THZDekoxL0tpa0QzSC9DSGtPUlplU0FRbUxkRmI0?=
=?utf-8?B?TFJKQ09VRlJFMys2Q1NTUTJ5OVZXR3dwR01VTkdVeUdpRmdpVmxjVFFQempS?=
=?utf-8?B?RVVwK2xOb1FMSXdVMGxoWUZFTzdzeXVEUjg0dVFUbi9qSkpOWkptSmJhZ0Zl?=
=?utf-8?B?bGM3a21zZTBaZ3FnS3VZS01rYXdCQzFIdm1TUE1LVk56ZURSOS9HajBuMVh2?=
=?utf-8?B?WVRYNENWN29odnc2UUs1OVkyamFnQmR6MFlpay91aXRjU3d2QTBoQW1FaUho?=
=?utf-8?B?VzZCVWJUU3VldHA5SHpnZmRwOEE0aWFNUlkrMUZwanpPZU1xUEpDQlNxdnpT?=
=?utf-8?B?WmJncjdkU2RwT0NweEV2dUU1VHlIcHZTRzIxRU1xWEhJZFUyd0tIU0ZRNU02?=
=?utf-8?B?NGc3NUdXaXpVTk9OSkpjUktmenQ5QmJJUHRscDBIL0FtRFhZYzJxTFlQMXdu?=
=?utf-8?B?eHR5NFFScFkyNWR6VmRnck9nTjVYQ0V3bVlnM3JnSGZhc2c1R2Qrc0pXdTQv?=
=?utf-8?B?QVVFSlBFTHc4RHlJME9lVWdXb0VXTXREUHNuWGVCZlFEMUdiTWtQWkhWNVZi?=
=?utf-8?B?VHF2QTYvZGdDZ1huNENqVHgwV0ZmNHd4WTlnUFhjSG0raGFuTnNBV2MvSlVC?=
=?utf-8?B?UFBIa1dFcXlmMGk4REQxV092US9OckZ0c09PRHhIayt0TGtZQy9IVzc5UDZi?=
=?utf-8?B?L0E2Z3RKamwxbVVOdytLK3BTR1VxRTBTZUt0NXhxeklHTFRjS2VjYUsrR25t?=
=?utf-8?B?bTBiQisvK2ZqVjhSYkhTNnJZNkRybzE0RnhjcHkzTEdxbmJ5UGl5Z3BONEh3?=
=?utf-8?B?OUt2TGxpT3Q1Z0tXZ0ZZQTcwYXBwZzRUdW9teWtEM2VMcXpYTkdzSTViWU9I?=
=?utf-8?B?d09lQjZZR2FpMXljT0hsamRMYXdWRFNwNnlaUmpvb254STJnVTg1L2g0Q3d6?=
=?utf-8?B?RE83QzRIMUh5c0tTL3lwR0lJOVVZUEtvaUFPdzQxTjVDVmgyK0QzbXZzSlNT?=
=?utf-8?B?VXU0a212SVFWb2daNVhWSlB1U0xMTUM4NEY0NjFBRmdDV0hKejhHbjd4MEh3?=
=?utf-8?B?dDUwVGhuVWsrL2o0bHF5aU5aUkkvaEZIaTRGSGxYeFZBL3F0YzNKdU5RWUd6?=
=?utf-8?B?YWxia0Q1bm9KcjEvKzlaYUNqU2RxZGx4cmlUb0tGKzNHNUJmY3Ztakh1RGR5?=
=?utf-8?B?STdNYkNVSXRla0V5VkpTQ2tsVnVHMWZJWjdvZTJMSHBkcEM2Z2YvTDAxTklL?=
=?utf-8?Q?ltK6RhMKI/A=3D?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR12MB5962.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(1800799024)(366016)(7053199007);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?utf-8?B?L09YMnNQd2xwRGN0dG02NjRrbEhjM0cwQit0WGYzMVlGMTY5U3pDZ0c5OW5R?=
=?utf-8?B?bFBBMkhlSUw0VDZJTU5kVFdTRTMrbXpYTGV5K2x2MDJtSXMvcW91Wjl0Ymdl?=
=?utf-8?B?R0hzcHU3Rit0MzEyTm4ycjd6TkRZczRCTXlrdWxSVUNOanZqTDN0aUVPZmU4?=
=?utf-8?B?dFV2YklTa094OXg3WXpqNXE4VzhQUTVyWXFDdUsxeExrMGtyV3JLdkhuMFBC?=
=?utf-8?B?SkFCVUxpOUlZb0xpcFpod1NwUVYyR1NtOVZMUWxtNlVrUGFWOGVlckZmc1Nu?=
=?utf-8?B?REtLcHkveFZQNSttcDh0TWZ2WkRzcWJTWXEzdFR6a1Z0aWg2MHB5MEIydnkx?=
=?utf-8?B?YUwyT0VFSlNOZ1poeS9uVVd5TWZmQjgycmdObVU4ZVY3dEpFQTNvWVRlMjZ1?=
=?utf-8?B?T1BIWi9ScnNnSjRTUCt4U2NybzdubnN5dHhPSWtTOEg0ZDBMMXJDN3FYeXho?=
=?utf-8?B?Y1hCTFBwb0x6L2c5WmJULzVVYjVKbm5JUXJzM3ZVSkd4b2RGV043aUhKclJw?=
=?utf-8?B?MnR2Y2JTeU9kWm1xWGNGOFJ0OXlWMGloWTdtVVZ3Z0RvMkdNR1l5RzQxMWda?=
=?utf-8?B?V2ZNaHNPYjRsUk96bjE4UFVwVjJzbnRjaVpZNndBLzZPOEFKVXFuTjh3SG5T?=
=?utf-8?B?aTAwM2VpWG9qTTBDZC9kcGxFNHU5b1paa3RGY0wwYVpvajFmejYvS0l4VzBS?=
=?utf-8?B?VWhxdDFPMzdkd2I0WHFrYW44ZEhOaFBmb2UzR1IweE5QRU9ta1NCY2ZJQVhs?=
=?utf-8?B?aGx1RWtZVEJLQzYvaUd5bGJvd05BdmlqZXdpL2Q3TktaQVlOSFRpU1AxUm1q?=
=?utf-8?B?cjl6K2dxckt0eEdJZXQ0WEtOdG5oQStCTTNpWi91T2x6STQrR3dpa0RaVmVl?=
=?utf-8?B?WU56U2hZTGM0U3N1YzkzR1FwTU1PSDlSTGlKU0hmb2tndlVNZWJ3d1RqOXcz?=
=?utf-8?B?RTMyRGhZaVZqWURGNlA2U3NQV0lwTzVKYUNZV0JZOHd2MjE0SkNHZzh5VXVl?=
=?utf-8?B?NE1FSnpGRk5WanpQeER5dUFtRThvTG14dENWb0VGMk1hOE8xaS9HQnhRL0tw?=
=?utf-8?B?bEw5SjE1cnlNcjc4MHlyM3Z3cnJoRTNKSU53ZWQydWlPWE43NkRsRVd6YVVD?=
=?utf-8?B?eDRIODZqSDdiOSsvNVdLM1RsTEpXd3k2SVlLU2wvNGpCMGtITVFRaWp1UWhY?=
=?utf-8?B?b0NScExCNVVIdFFlZG54WlpLRGVwQzVKVGJIS25CY1J1MmVXWGtnaHRRdmMz?=
=?utf-8?B?TGd5enhhWktVT1lrdkxZV05EV1BlYWt0MDdWRlJybjV3MFRWNG9kY0VLK1BZ?=
=?utf-8?B?SzByV29scHBETE5uNi9GbFhjOTYwL1k2am43RmhiNGw4dVlnbnRRNEh0SlM1?=
=?utf-8?B?TWtOV3pzWHc5SFZmOU90ZzROeFNPdGNPNUZDanExeTBiNStLMXBuMnVPVE93?=
=?utf-8?B?c0xMelpyc0FvSEIrUCsrdkpsRlQyNHNsc29GVnk4K1RsYXByK0F0ZlVYaVlw?=
=?utf-8?B?NnlQVUlYdVBJQ1JWVmFpZGpKZkJZK25UR2pCcTgrRDZlay9sRWNaTGU4NUZY?=
=?utf-8?B?THVGUmJTdTJkNE1EWDN4RXA4MWV3OEE5SmFGRHBIR3ZudjlLaFZ1UXd6K1Vs?=
=?utf-8?B?SWpkY0twc2lEU1lYNS8zdVlHV1JpRVFzeG82Mm5hcVc5OTU1dWkxWEJERk9x?=
=?utf-8?B?eW1VVGZkeHZJM3VmQ1h3bkJVTVVYZkQ2S3JsOUZVQUk4anBjYXp5a3g2UzFm?=
=?utf-8?B?ZFFxT2lJL2FrRkhiRFhieThEbmlUWTcvVTVDZ2hXaHhqMVowU3pwUHhJMy92?=
=?utf-8?B?NDNka1hTbWg3VG5qZk5QazliNkpiZlE3Q05RMDhQdVp1bnNOUFhDM2ZaczZz?=
=?utf-8?B?eFNzR2FIY2sydGhTK0VyM3VHSHlDZmVBb3FMdURFR1pvTnhkLzlwNlRwL1J0?=
=?utf-8?B?a1R6YUFQYm8rRGp1Zy9JcU9CbTF3RlRLQlZtdnJ3aTMvYTdIQVkzZE9iVnJQ?=
=?utf-8?B?a2dWa1JMWXc2aGlIbmtNcmYvTnh4bitGdEdDNHhyaHQvL3p6a2cvQU94NGdH?=
=?utf-8?B?Wi85MEc3SGVNMU4xdHVGdnFySzJwOXVXRFpjR1VmMXpVa3NCYlhaMUNRZmJ1?=
=?utf-8?Q?W/h+rLIk/hbWMevnTe5V2WL60?=
X-OriginatorOrg: amd.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 4f09f9f4-2567-41af-da41-08dda35a7590
X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5962.namprd12.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 11:25:07.4192
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: gcjsHGpw0H9mDeQU79OrySmVhRiLEA988M0gs8qhXUKluwq3dqdFefMIRD+A7cm6Kg1BGbrYsM7zUUcfrhQUtg==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB7710
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hi,
On 5/30/2025 9:45 PM, Jake Hillion via B4 Relay wrote:
Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
From: Jake Hillion <jake@xxxxxxxxxxxxx>
Currently hsmp_send_message uses down_timeout with a 100ms timeout to
take the semaphore. However __hsmp_send_message, the content of the
critical section, has a sleep in it. On systems with significantly
delayed scheduling behaviour this may take over 100ms.
Convert this method to down_interruptible. Leave the error handling the
same as the documentation currently is not specific about what error is
returned.
Previous behaviour: a caller who competes with another caller stuck in
the critical section due to scheduler delays would receive -ETIMEDOUT.
down_timeout() will return -ETIME, Please replace -ETIMEDOUT with -ETIME.
New behaviour: a caller who competes with another caller stuck in the
critical section due to scheduler delays will complete successfully.
Signed-off-by: Jake Hillion <jake@xxxxxxxxxxxxx>
Reviewed-by: Suma Hegde <suma.hegde@xxxxxxx>
Tested-by: Suma Hegde <suma.hegde@xxxxxxx>
---
drivers/platform/x86/amd/hsmp/hsmp.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/platform/x86/amd/hsmp/hsmp.c b/drivers/platform/x86/amd/hsmp/hsmp.c
index f35c639457ac425e79dead2515c0eddea0759323..6c30bb3edc1d77939b10047b771a5c574e5f2a1e 100644
--- a/drivers/platform/x86/amd/hsmp/hsmp.c
+++ b/drivers/platform/x86/amd/hsmp/hsmp.c
@@ -216,13 +216,7 @@ int hsmp_send_message(struct hsmp_message *msg)
return -ENODEV;
sock = &hsmp_pdev.sock[msg->sock_ind];
- /*
- * The time taken by smu operation to complete is between
- * 10us to 1ms. Sometime it may take more time.
- * In SMP system timeout of 100 millisecs should
- * be enough for the previous thread to finish the operation
- */
- ret = down_timeout(&sock->hsmp_sem, msecs_to_jiffies(HSMP_MSG_TIMEOUT));
+ ret = down_interruptible(&sock->hsmp_sem);
if (ret < 0)
return ret;
--
2.47.2
Thanks and Regards,
Suma
Return-Path: <linux-kernel+bounces-673118-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 1E71A41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:25:58 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 41E241894A74
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:26:11 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 004B728E61C;
Wed, 4 Jun 2025 11:25:50 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=htecgroup.com header.i=@htecgroup.com header.b="jYWna+6q"
Received: from AS8PR03CU001.outbound.protection.outlook.com (mail-westeuropeazon11022121.outbound.protection.outlook.com [52.101.71.121])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3C4802C3261;
Wed, 4 Jun 2025 11:25:45 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.71.121
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749036348; cv=fail; b=qgWr9OXtU4N4DpXZ44UIofr6sQvc0mBhOGj4Jb+xaIZWmNXexe4SZr+VD3YsAyBd6XnWZHrQiSlYyEIxg2VPQM+xKZjjH1tbyj0a+tox8OijmTyf6PUpuoW2japykxL97Y9iRdxeCr4IeGRSQt/DMkFHbRTUguok59ozSySYOs4=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749036348; c=relaxed/simple;
bh=MCIgaB2EeJPkai0oX0XG/nWjq6LhJLzHSwhtQdF7R4g=;
h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To:
Content-Type:MIME-Version; b=SlEXhPkekyyDvNkqxE4GoX3U7QZpQYfGy2yZTBNs1v75sPPxhsuy/M7M3GSFG/OGUaMrJFc9BdZ3pTbmqv+T/7e/UGMW5DDiQtnaTNZVTWcDCucNHxt+Wj4j/Jd0UD0REct+kiDnZ7il87cENeshCe3DUKzz+l6rK/exzDgbzgc=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=htecgroup.com; spf=pass smtp.mailfrom=htecgroup.com; dkim=pass (2048-bit key) header.d=htecgroup.com header.i=@htecgroup.com header.b=jYWna+6q; arc=fail smtp.client-ip=52.101.71.121
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=htecgroup.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=htecgroup.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=g5wlmHHURjIqG0hQ7KXTl3kKVG5EiCcp1pyMYbaW94IVWp3yh4SRoRmq3BgVjzgnzCgSN/yLrx1ZoQJ44NHb1lugnIdGSy9hWFHoGi9KhLpgi4Nw296Do6YVUYJLb3kJW2wm/Spx9laQv/7h7K+YPXV+y+qzHuG2kemP0FSbOJBo5r1eB/ZzLXOWaZCa6rLDq+jFINXtueMFDKai0QpwHrzlU5m3tKPPa9fKj1WyVfI/LuoFCswMw6iGo94HVb/cXlCUI+BcpqubHfy3BawNCJzqTVMU3um2A8UwVnKFfMqY5DLjPBjf8nosMVANVTKQn6z1P2VygOuDJcleyYs0KA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=MCIgaB2EeJPkai0oX0XG/nWjq6LhJLzHSwhtQdF7R4g=;
b=nNqMmhfXAM5Nb3UL7kU3Zn7hXUF4O4SbfKeUR5mz3cJBHeM9DehE7Kpeaul5Azy6qI+szIEZkm2fe0VNlfGrA9HDVbxHjGJBP3gbjOf54DnKRR9RBoeyq6pvfGAgYrGUv+2p7qH7Onn00DO3EmwXqVvtq7qA561Zptbn6m6TVRFPG8bqak1Ae56/3KlKKdmlFzxz5VE1zCjfcfkouEvdlEex6QutZMZ+OeWWvDIO9c9CUHsUbqJaavBfaxRkAnx5FfknCJ+krOkdUdbFUrt0kc6ZhTqOFKWLDiOm6SlIJ4hJOcXZyWEw7a9VzKXHlkEBjC3m5/o5hud48kMq3c/T5Q==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=htecgroup.com; dmarc=pass action=none
header.from=htecgroup.com; dkim=pass header.d=htecgroup.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=htecgroup.com;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=MCIgaB2EeJPkai0oX0XG/nWjq6LhJLzHSwhtQdF7R4g=;
b=jYWna+6qx9HYvYkgX1twhDmrNDteL9QzRQYidcqjIg3ZKdZhO3ZfkdrkIdy/NdoQ+PuMB0lwygXnf0Iue0Vqc7O095ncjobYZgfECiMdI+gYuqC4kG6QBf/CIeEYcEcI+EjOjt8g0e31e5xy+LfExJvc0xshtFhDOAn46F+/UKiKWgDHkc9Pct6ikd92cJc90iAKgT++ayRW888UtzEfLh2LHsr3EXYHQbYi9BvG0E9MmS6NuO46Pb8KY+sc2itaxk0FuLyt3pAO667i8smR2T9g31IaFeeJi9TMalp435ctKce02ODY6/sJMWa3M/4J55CGYPJG3SexRu1Ggsvvig==
Received: from DU0PR09MB6196.eurprd09.prod.outlook.com (2603:10a6:10:47f::9)
by VI1PR09MB3791.eurprd09.prod.outlook.com (2603:10a6:803:136::20) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.34; Wed, 4 Jun
2025 11:25:42 +0000
Received: from DU0PR09MB6196.eurprd09.prod.outlook.com
([fe80::a9c6:101d:ef46:7f95]) by DU0PR09MB6196.eurprd09.prod.outlook.com
([fe80::a9c6:101d:ef46:7f95%6]) with mapi id 15.20.8792.034; Wed, 4 Jun 2025
11:25:41 +0000
From: Aleksa Paunovic <aleksa.paunovic@xxxxxxxxxxxxx>
To: "alex@xxxxxxxx" <alex@xxxxxxxx>
CC: Aleksa Paunovic <aleksa.paunovic@xxxxxxxxxxxxx>, "aou@xxxxxxxxxxxxxxxxx"
<aou@xxxxxxxxxxxxxxxxx>, "conor+dt@xxxxxxxxxx" <conor+dt@xxxxxxxxxx>,
"daniel.lezcano@xxxxxxxxxx" <daniel.lezcano@xxxxxxxxxx>,
"devicetree@xxxxxxxxxxxxxxx" <devicetree@xxxxxxxxxxxxxxx>, Djordje Todorovic
<Djordje.Todorovic@xxxxxxxxxxxxx>, "krzk+dt@xxxxxxxxxx" <krzk+dt@xxxxxxxxxx>,
"linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>,
"linux-riscv@xxxxxxxxxxxxxxxxxxx" <linux-riscv@xxxxxxxxxxxxxxxxxxx>,
"palmer@xxxxxxxxxxx" <palmer@xxxxxxxxxxx>, "paul.walmsley@xxxxxxxxxx"
<paul.walmsley@xxxxxxxxxx>, "robh@xxxxxxxxxx" <robh@xxxxxxxxxx>,
"tglx@xxxxxxxxxxxxx" <tglx@xxxxxxxxxxxxx>
Subject: Re: [PATCH v4 2/2] Allow for riscv-clock to pick up mmio address.
Thread-Topic: [PATCH v4 2/2] Allow for riscv-clock to pick up mmio address.
Thread-Index: AQHbyj02U8SnExY6RUaW6WfoaU2A5LPy8lSA
Date: Wed, 4 Jun 2025 11:25:41 +0000
Message-ID: <38243a26-cbcc-40e7-b052-b71e821442b9@xxxxxxxxxxxxx>
References: <be461744-8a74-4ee6-9029-d3aa5e69b0f1@xxxxxxxx>
In-Reply-To: <be461744-8a74-4ee6-9029-d3aa5e69b0f1@xxxxxxxx>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=htecgroup.com;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: DU0PR09MB6196:EE_|VI1PR09MB3791:EE_
x-ms-office365-filtering-correlation-id: fe349366-b53a-4f2e-3956-08dda35a8a40
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam:
BCL:0;ARA:13230040|7416014|1800799024|376014|366016|38070700018;
x-microsoft-antispam-message-info:
=?utf-8?B?YVNNWS9CVk02NVFrRTY1cHpJS2lEK1YrdkxzcDlRWkpWSTUzV0x6Zk42V2hv?=
=?utf-8?B?bmlLYkZTUElQYm5neWh2RkVFSXF2OGYyODdKUC9vZXRqNmNmd1NMbFNRUG5w?=
=?utf-8?B?TENaSGF4cExWRU1NWmRTdXRpTjBkT2I2cmlPSkJIRFRrdnZPVHQ2OTNia3Nj?=
=?utf-8?B?TXMxZnJ4UkZsMjR5UEM2aHFmdnBhMTh0QWRKQnpaVEF4RE0wdm1JV2lobDJD?=
=?utf-8?B?aUoxNW1xMDBCTnpPazR3SkhURCtqMmhEbjRMa0hRZWxDUVY4SDRyUWpSNUFi?=
=?utf-8?B?c2hSQ3lDNEl1U0NUSC9rQ2wzL2huZ3RUbnBlemtlOTMwZVR1U0ZuZDYvbTda?=
=?utf-8?B?VUkraURqTVdwbXdaTFBLb2t3cjZiVGZIdUFVYzNwd0R1WTdiRDFObUYvOUJ0?=
=?utf-8?B?b3VRK0E0S0JtUk1PcUZWeHl6U3h0MFdjSlJmYWwxOHZnK3VHZlc4MGxMQmlO?=
=?utf-8?B?cjdWSU9OdmlUazQvMkt5MFB5azZoY1NvcStIaWNWQ0c3MlNFeTE3dGprTnlY?=
=?utf-8?B?WFprUGVsbW1GVnYvalZOby96OHdqVWFxbi9hcGpKZHgxckYyaUEwZ0pGbkNH?=
=?utf-8?B?Nm5mMDRiWFVXREVWWGFYL29wNDNIcDBpS3dGTlp5c05GSDF1TVF4SXBLajZC?=
=?utf-8?B?cE95TzJmK0lScHZ0N25sc1Mvc1IxMWhXMWU0YUxtZ0JGcHRZS1NORnZIaXNW?=
=?utf-8?B?VGtCRUxUY1RtUkVza2hDdjlib2NpUWxrSDdxQjZSKzhTZkorTTNScHFuSjlQ?=
=?utf-8?B?RjJYaUQzQ3hrT25lcDNoWk9DQkZaa1ZsQ1B2anBGM0FpNGp1U3FodUZpVWlG?=
=?utf-8?B?WE5Id3d2UGNIZGRna3VKTmk1LzVCNFQySE5MUVRpYkNObUh2VDhXM0plTFV2?=
=?utf-8?B?eWNzOFBkZWpsQWUzMWswR1p5QURDN1R1VXN3QjlYZUdDS0ZtMDFubGIxSmx5?=
=?utf-8?B?OEYwMWg2LzUyeGRyaDdmWmE2cXNSN3h2YkJGc3BNUk11S1dLTXJDSDJoOHgx?=
=?utf-8?B?endlTFNlUHEyTmZqS1JJZ1hUZ0prRGphWDlRTHF2cVJOdVZnYnEzVnpSeHZX?=
=?utf-8?B?azZVYmtMM1JiZUZoaWxHY09Da1ZYZWd0S2c2dXgzbGlnNWVOLzBkVkFyR1Zk?=
=?utf-8?B?MjFKbW12Rm1kUW0zaHVlSDZkb3E2YklGck5VM0krYmFXaElNYWd1dDNhVXZR?=
=?utf-8?B?QW1qc3craGdwcjIxV0pudmlZdkVXRnRUUnZkVjJHaEo0UkJhdWpVV2xmWXgr?=
=?utf-8?B?Q2ozdzVWVkRtWFIzeGJiU2JjNmxlYktrVDh3N0x4TjQ3ZFUrVWJMNmZLVktV?=
=?utf-8?B?dyt6WjZXckxmNmR4ZVkzWUpDMVZrV2FkeWZJNzRlaklINEJJd0FleGROUHdE?=
=?utf-8?B?V1p4SVgwUTVCd09KN3VSVWtsanlxZ3NQYlpZWllJMDdKM01FZ3VHVXIrdHJr?=
=?utf-8?B?WkdRUFVZTlNySnhtY3ZoRzNNeFVOcnNRYld6NjI3SDRvSnB1cTVYZ28zTHR6?=
=?utf-8?B?WjR6UFMwcCs4emRCVk1LTU1XWVFuTDV0eFJNbVZVeGtpdUNoSW5uVHRXTDAv?=
=?utf-8?B?STZRYmZGaXBtU1J3Sk9EUWVoWjN0L0dLQkJLaW1leVdkZ3VQcUJWcU5nNm10?=
=?utf-8?B?ckVBR2xvWlhsR2h2T0g3Yk5UejBhcnVGOU54blVtUHY5MGduZEZDc2hBNXZo?=
=?utf-8?B?MEFWRXk0eTdCcWxuMnRtNHBtTkZzTTZ1NkZxS1B3a2ozK1BRL0ZNRXVDQWVJ?=
=?utf-8?B?UjhxeThwUm9IaFNGSDFtVkRHcjF1WWhqZW1JU0Q0L3hrTldCWG4xVDdyRDJM?=
=?utf-8?B?L2k5WUlMWmFCMEdvUVJZQmxselNFKzl1Wkl0VFFsamt1ZUlJVmQ0VDVQSnl0?=
=?utf-8?B?bjB6UklRdkgwQ1lBSnByTlIrWFhTZDJiVWoxN0ZEbThKc2dwQ21rZ21kYmd0?=
=?utf-8?Q?wbfAdP5at84=3D?=
x-forefront-antispam-report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR09MB6196.eurprd09.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(1800799024)(376014)(366016)(38070700018);DIR:OUT;SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0:
=?utf-8?B?dk5Pbm1rd1U2dHBQVndHQkE1U2xGbE9nTElVSG4xaWhJdGRZWHlhcVVMaVNJ?=
=?utf-8?B?MHRJaW4xeDllcnQ1UXlpbGlQalhGMXFYVklRVXpuTFZZQWdZUE1YaEV6ZHRt?=
=?utf-8?B?NkZSblhqY0txckh3emJUUFltZEJUMTdHcVlZL0ovSGxvMUFRd2R5Zm13dWdj?=
=?utf-8?B?TGx3UXB3NWdaQkdJUkpYempqeUNMaGpKbWpFc3hxMjVmUTMrQVBLWEpkclNk?=
=?utf-8?B?UFFnVzNqNGNIR2hMeXRLSEJKMW9uQjdGSjBOdXRUaEIwZGNRMFNxaHlLUjEv?=
=?utf-8?B?enExTWNDVVJjc21XYXd1cGNwUkJwaDlQR3oxWmlWSE1tSGNNeTBURWFVQXRB?=
=?utf-8?B?SmJhbnZmbjJ0TSt4TUVjbDZuN2J1a0dwRGE0cGhlVGVHK0VnOTdYZ2lxY1Zu?=
=?utf-8?B?U0hxM1p3aG9mSDhjcUt5WmZBRUg2c2k1Qkc4QWpzQklmYW5TV01xcWRjcmVQ?=
=?utf-8?B?bHE4cHRONTJrVTNYNEJueTIrUldnMEtwL2dkOEVQTGFrSWVWek1Rc29yTEVW?=
=?utf-8?B?dnVYbUtXeGlPdlVaa2ZnMVo0UmdXT0pkbVVlSytCd2ZCNkhMV0JlK3FnTHZo?=
=?utf-8?B?bWx4WW1xSHhqWUdYZkJrWlFuZGlMdjZZTklVZ2t3U3hZWTJ3NVFpeGJwczJR?=
=?utf-8?B?dzVoYlhFM3RPbHViWlVxNk1LMUVMaUJ6SC95S3FyMmhBWEFpbWFraUN1cUNG?=
=?utf-8?B?WG1OZVEzRncwanpyN3dKSFpId2FUWStubXR0Ujk5ZXY0MkZjUWpjcHhtVGRj?=
=?utf-8?B?VXp1Z1p6Mmc1Y3MwMFcxRnlVZEpYbWUyNUthYW0rSFBFU05zbzdvbE1aaXp6?=
=?utf-8?B?MmdOSG0vaURRQUkzNmZxMEZpeXI2b3VKUFFzQTlPc2RQTG01OXlLRVg1eG1m?=
=?utf-8?B?eTVHazdBS3hHb2UrVG9mUThkRnJQMk03aVJoM3RxRk11UkE5R09JQ0sxeUQ1?=
=?utf-8?B?Sjl5c05jdnh3dGVJbmN0SHZzcm1wK0ZsUEp4L1FFcHRENzZmTDV1eW1tUVRV?=
=?utf-8?B?ckFwTDF2aHo0eG15d3lhTC9wcTZWQUFIa05QeFJReHhoc2dhZU5nYzdERnVO?=
=?utf-8?B?ck5FNlVCaVRlL0pDaVdYeTJLRnhTSUVRV1BleFR2Um0vbFpuWlduTnR2bGJq?=
=?utf-8?B?MjRWdFdwT2NnenROeWQxQlhrUzNHb1E4ZmJ1R2o0bmRkR3p2bUs0WXJlbVhC?=
=?utf-8?B?L2xwZUZ1VmVGdTJvVHM4N016UDdCOUNtQStnOWR4TW9sK1ZKOWsvak9hS0hN?=
=?utf-8?B?YlU2MEoxWWR3Mng2ajI2eVVMZ1VOL0IrUkJVUnVaUmZIOS9sWmgvYkpDTmZE?=
=?utf-8?B?Yi9iOVlnbGhCY3ZSaU1oc0FXMk5uUXZHQjRvS1JoaW5xdVBOR3hDUHdyNURh?=
=?utf-8?B?MFBsUEZOd2V3eXhVUENjK0hJYUhqNkxsUkRxTmxxZGpIVE05UlljcHlCT2Ez?=
=?utf-8?B?eitLYklWcTdzV2ZPdUdYcTNYTi9Nb2t1bnAzK2crd0JIV0NzQWx2Z3h5dkVq?=
=?utf-8?B?UHZ3NmVwOVpnZUprMXZIdHVBdFEvRmszWmhDaTk2d1l2cHJya3BaREwxQzhC?=
=?utf-8?B?V01LalBWQWNncW5XTFhtUHlpVWt6Uk9uMTJPdm1scXZ0MmlhQ3dWVUdUNzdu?=
=?utf-8?B?MmduT29LSi9qTUNoZ0RScGgyUW5ZUDlVQUFpeG1PNG54ZTJWRExmVzQzK1c1?=
=?utf-8?B?bWZVdDg5dmN6VzRpMFljMWJkUTNZUWxidjNacCtMS3J4eGE2V21XL2drY3Js?=
=?utf-8?B?QU1xOHZmYmtXQ29XS3lPMzYxVGJTQXFCaVpNN2Y1Y2ZvbjBMc1JtMmJkYmVx?=
=?utf-8?B?bG9VS25TU2VZY1B6MUR4eERPY2tXU3dERWx2Zi83OFEwTVo2QThWSmNzZHRN?=
=?utf-8?B?UnRyajl1Q3ZJVld2RU01OXF0THNkK0RvZ1ZhOVNEK1lEemk1ck50TUVMOFQw?=
=?utf-8?B?WWRFOFdKbzBxQmdUT3Y2YVpGQzdlV2ZKOE5WRHBhWU9EYksxUURXdEZoV0xp?=
=?utf-8?B?RWRHdmJiL3ZSSGVXSmhZWlJXU3J5NlZRK1dZY1U2SUQvc2lIc1BlU0lSNmp4?=
=?utf-8?B?eE13Lzl4Rk9oVmt1YXlyTDV6aWJ3SXBrWkJobHVEN2JHQmFkYk5qL2YwZk0v?=
=?utf-8?B?SmIxbjNONzRiSEtGQWl5WW4vemhKcnd1bFpMeXMrSHBiaG05aW5JU0M5czRY?=
=?utf-8?Q?dHAeecHf4C6S7KzPEuux9d8=3D?=
Content-Type: text/plain; charset="utf-8"
Content-ID: <5B1A329690DD1441A84BB65616736F12@xxxxxxxxxxxxxxxxxxxxxxxxx>
Content-Transfer-Encoding: base64
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-OriginatorOrg: htecgroup.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: DU0PR09MB6196.eurprd09.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: fe349366-b53a-4f2e-3956-08dda35a8a40
X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jun 2025 11:25:41.8129
(UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 9f85665b-7efd-4776-9dfe-b6bfda2565ee
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: 0YBYhdmYA0eT8EthteJnd0/Nz6NqhYfmhIPQW8dgZMgKZmFE2IGOu1jOeNJz9n7KuhzbBB+bwA7qYmfbxqRxiSZePG9tcFhjyxvEETHQ+f8=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR09MB3791
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
DQpIZWxsbyBBbGV4YW5kcmUsDQoNClRoYW5rIHlvdSBmb3IgeW91ciBzdWdnZXN0aW9ucyENCg0K
DQpPbiAyMS4gNS4gMjUuIDEyOjQzLCBBbGV4YW5kcmUgR2hpdGkgd3JvdGU6DQoNCj4gDQo+IEhp
IEFsZWtzYSwNCj4gDQo+IEZpcnN0LCB5b3UgY29tbWl0IHRpdGxlIHNob3VsZCBiZSBwcmVmaXhl
ZCB3aXRoICJyaXNjdjoiLg0KPiANCj4gT24gNS8xNC8yNSAxMDo1MSwgQWxla3NhIFBhdW5vdmlj
IHZpYSBCNCBSZWxheSB3cm90ZToNCj4+IEZyb206IEFsZWtzYSBQYXVub3ZpYyA8YWxla3NhLnBh
dW5vdmljQGh0ZWNncm91cC5jb20+DQo+Pg0KPj4gQWxsb3cgZmFzdGVyIHJkdGltZSBhY2Nlc3Mg
dmlhIEdDUi5VIG10aW1lIHNoYWRvdyByZWdpc3RlciBvbiBSSVNDLVYNCj4+IGRldmljZXMuIFRo
aXMgZmVhdHVyZSBjYW4gYmUgZW5hYmxlZCBieSBzZXR0aW5nIEdDUlVfVElNRV9NTUlPIGR1cmlu
ZyBjb25maWd1cmF0aW9uLg0KPiANCj4gDQo+IFdoYXQncyBHQ1IuVT8gSSBjYW4ndCBmaW5kIGFu
eXRoaW5nIG9ubGluZS4gQ29ub3IgYXNrZWQgc29tZXRoaW5nDQo+IHNpbWlsYXIgaW4gdjIgYnR3
Lg0KPiAgDQoNClBsZWFzZSBzZWUgWzFdIGZvciBtb3JlIGRldGFpbHMsIGVzcGVjaWFsbHkgdGhl
ICJHQ1IuVSBVc2VyIE1vZGUgUmVnaXN0ZXJzIiBzZWN0aW9uLiBFc3NlbnRpYWxseSwgaXQncyBh
IHVzZXItYWNjZXNzaWJsZSBtZW1vcnkgcmVnaW9uIGhvbGRpbmcgc2hhZG93IGNvcGllcyBvZiBz
b21lIE0gbW9kZSByZWdpc3RlcnMuIFNpbmNlIGJvdGggb2YgdGhlc2UgcmVnaXN0ZXJzIGFyZSB0
aW1lLXJlbGF0ZWQsIHdlIGRlY2lkZWQgdG8gcmVnaXN0ZXIgaXQgYXMgYSB0aW1lciBkZXZpY2Uu
IFRoZSBleGFtcGxlIGluIHRoZSBmaXJzdCBwYXRjaCBvZiB0aGUgc2VyaWVzIGlzIHRha2VuIGZy
b20gdGhlIC5kdHMgZmlsZSBmb3IgdGhlIHA4NzAwIGNwdS4NCg0KWzFdDQpodHRwczovL21pcHMu
Y29tL3dwLWNvbnRlbnQvdXBsb2Fkcy8yMDI1LzA0L1A4NzAwLUZfUHJvZ3JhbW1lcnNfUmVmZXJl
bmNlX01hbnVhbF9SZXYxLjgzXzQtOS0yMDI1LnBkZg0KDQo+IA0KPj4NCj4+IFNpZ25lZC1vZmYt
Ynk6IEFsZWtzYSBQYXVub3ZpYyA8YWxla3NhLnBhdW5vdmljQGh0ZWNncm91cC5jb20+DQo+PiAt
LS0NCj4+IMKgIGFyY2gvcmlzY3YvaW5jbHVkZS9hc20vdGltZXguaMKgwqDCoCB8IDQ4ICsrKysr
KysrKystLS0tLS0tLS0tLS0tLS0tLS0tLQ0KPj4gwqAgZHJpdmVycy9jbG9ja3NvdXJjZS9LY29u
ZmlnwqDCoMKgwqDCoMKgIHwgMTIgKysrKysrKysNCj4+IMKgIGRyaXZlcnMvY2xvY2tzb3VyY2Uv
dGltZXItcmlzY3YuYyB8IDYxICsrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysr
Kw0KPj4gwqAgMyBmaWxlcyBjaGFuZ2VkLCA4OCBpbnNlcnRpb25zKCspLCAzMyBkZWxldGlvbnMo
LSkNCj4+DQo+PiBkaWZmIC0tZ2l0IGEvYXJjaC9yaXNjdi9pbmNsdWRlL2FzbS90aW1leC5oIGIv
YXJjaC9yaXNjdi9pbmNsdWRlL2FzbS90aW1leC5oDQo+PiBpbmRleCBhMDY2OTc4NDZlNjk1MjFj
YWNlYWMyYWU0ZDRlMDQwZDIyN2QyYWU3Li4yZGVhMzVmZTMyYzBiMDgwZmYyNzU4NzA4OGJiYmUw
MWZhZDIyY2U2IDEwMDY0NA0KPj4gLS0tIGEvYXJjaC9yaXNjdi9pbmNsdWRlL2FzbS90aW1leC5o
DQo+PiArKysgYi9hcmNoL3Jpc2N2L2luY2x1ZGUvYXNtL3RpbWV4LmgNCj4+IEBAIC03LDMxICs3
LDI1IEBADQo+PiDCoCAjZGVmaW5lIF9BU01fUklTQ1ZfVElNRVhfSA0KPj4NCj4+IMKgICNpbmNs
dWRlIDxhc20vY3NyLmg+DQo+PiArI2luY2x1ZGUgPGFzbS9tbWlvLmg+DQo+PiArDQo+PiArI2lu
Y2x1ZGUgPGxpbnV4L2p1bXBfbGFiZWwuaD4NCj4+DQo+PiDCoCB0eXBlZGVmIHVuc2lnbmVkIGxv
bmcgY3ljbGVzX3Q7DQo+Pg0KPj4gK2V4dGVybiB1NjQgX19pb21lbSAqcmlzY3ZfdGltZV92YWw7
DQo+PiArZXh0ZXJuIGN5Y2xlc190ICgqZ2V0X2N5Y2xlc19wdHIpKHZvaWQpOw0KPj4gK2V4dGVy
biB1MzIgKCpnZXRfY3ljbGVzX2hpX3B0cikodm9pZCk7DQo+PiArDQo+PiArI2RlZmluZSByaXNj
dl90aW1lX3ZhbCByaXNjdl90aW1lX3ZhbA0KPiANCj4gDQo+IEFzIGFscmVhZHkgbWVudGlvbmVk
IGJ5IERhbmllbCwgdGhpcyBpcyB3ZWlyZCBeLCB3aHkgZG9uJ3QgeW91IGp1c3QNCj4gaW5pdGlh
bGl6ZSByaXNjdl90aW1lX3ZhbCB3aXRoIHRoZSBtbWlvIGFkZHJlc3M/DQo+ICANCg0KU2ltcGx5
IGluaXRpYWxpemluZyByaXN2X3RpbWVfdmFsIGRvZXNuJ3Qgd29yaywgc2luY2Ugd2UgbmVlZCB0
byByZWFkIHRoZSBtbWlvIGFkZHJlc3MgZnJvbSB0aGUgZGV2aWNlIHRyZWUuIA0KDQpXaWxsIGFw
cGx5IG90aGVyIHJlcXVlc3RlZCBjaGFuZ2VzIGluIHY1IG9mIHRoZSBzZXJpZXMuIA0KDQpCZXN0
IHJlZ2FyZHMsDQpBbGVrc2ENCg0KPiANCj4+ICsNCj4+IMKgICNpZmRlZiBDT05GSUdfUklTQ1Zf
TV9NT0RFDQo+Pg0KPj4gwqAgI2luY2x1ZGUgPGFzbS9jbGludC5oPg0KPj4NCj4+IC0jaWZkZWYg
Q09ORklHXzY0QklUDQo+PiAtc3RhdGljIGlubGluZSBjeWNsZXNfdCBnZXRfY3ljbGVzKHZvaWQp
DQo+PiAtew0KPj4gLcKgwqDCoMKgIHJldHVybiByZWFkcV9yZWxheGVkKGNsaW50X3RpbWVfdmFs
KTsNCj4+IC19DQo+PiAtI2Vsc2UgLyogIUNPTkZJR182NEJJVCAqLw0KPj4gLXN0YXRpYyBpbmxp
bmUgdTMyIGdldF9jeWNsZXModm9pZCkNCj4+IC17DQo+PiAtwqDCoMKgwqAgcmV0dXJuIHJlYWRs
X3JlbGF4ZWQoKCh1MzIgKiljbGludF90aW1lX3ZhbCkpOw0KPj4gLX0NCj4+IC0jZGVmaW5lIGdl
dF9jeWNsZXMgZ2V0X2N5Y2xlcw0KPj4gKyN1bmRlZiByaXNjdl90aW1lX3ZhbA0KPj4NCj4+IC1z
dGF0aWMgaW5saW5lIHUzMiBnZXRfY3ljbGVzX2hpKHZvaWQpDQo+PiAtew0KPj4gLcKgwqDCoMKg
IHJldHVybiByZWFkbF9yZWxheGVkKCgodTMyICopY2xpbnRfdGltZV92YWwpICsgMSk7DQo+PiAt
fQ0KPj4gLSNkZWZpbmUgZ2V0X2N5Y2xlc19oaSBnZXRfY3ljbGVzX2hpDQo+PiAtI2VuZGlmIC8q
IENPTkZJR182NEJJVCAqLw0KPj4gKyNkZWZpbmUgcmlzY3ZfdGltZV92YWwgY2xpbnRfdGltZV92
YWwNCj4gDQo+IA0KPiBZZXMsIEkgd291bGQgcmVtb3ZlIHRoYXQgdG9vLg0KPiANCj4gDQo+Pg0K
Pj4gwqAgLyoNCj4+IMKgwqAgKiBNdWNoIGxpa2UgTUlQUywgd2UgbWF5IG5vdCBoYXZlIGEgdmlh
YmxlIGNvdW50ZXIgdG8gdXNlIGF0IGFuIGVhcmx5IHBvaW50DQo+PiBAQCAtNDUsMjkgKzM5LDE3
IEBAIHN0YXRpYyBpbmxpbmUgdW5zaWduZWQgbG9uZyByYW5kb21fZ2V0X2VudHJvcHkodm9pZCkN
Cj4+IMKgwqDCoMKgwqAgcmV0dXJuIGdldF9jeWNsZXMoKTsNCj4+IMKgIH0NCj4+IMKgICNkZWZp
bmUgcmFuZG9tX2dldF9lbnRyb3B5KCnCoMKgwqDCoMKgwqDCoCByYW5kb21fZ2V0X2VudHJvcHko
KQ0KPj4gKyNlbmRpZg0KPj4NCj4+IC0jZWxzZSAvKiBDT05GSUdfUklTQ1ZfTV9NT0RFICovDQo+
PiAtDQo+PiAtc3RhdGljIGlubGluZSBjeWNsZXNfdCBnZXRfY3ljbGVzKHZvaWQpDQo+PiAtew0K
Pj4gLcKgwqDCoMKgIHJldHVybiBjc3JfcmVhZChDU1JfVElNRSk7DQo+PiAtfQ0KPj4gLSNkZWZp
bmUgZ2V0X2N5Y2xlcyBnZXRfY3ljbGVzDQo+PiAtDQo+PiAtc3RhdGljIGlubGluZSB1MzIgZ2V0
X2N5Y2xlc19oaSh2b2lkKQ0KPj4gLXsNCj4+IC3CoMKgwqDCoCByZXR1cm4gY3NyX3JlYWQoQ1NS
X1RJTUVIKTsNCj4+IC19DQo+PiAtI2RlZmluZSBnZXRfY3ljbGVzX2hpIGdldF9jeWNsZXNfaGkN
Cj4+IC0NCj4+IC0jZW5kaWYgLyogIUNPTkZJR19SSVNDVl9NX01PREUgKi8NCj4+ICsjZGVmaW5l
IGdldF9jeWNsZXMgZ2V0X2N5Y2xlc19wdHINCj4+ICsjZGVmaW5lIGdldF9jeWNsZXNfaGkgZ2V0
X2N5Y2xlc19wdHJfaGkNCj4+DQo+PiDCoCAjaWZkZWYgQ09ORklHXzY0QklUDQo+PiDCoCBzdGF0
aWMgaW5saW5lIHU2NCBnZXRfY3ljbGVzNjQodm9pZCkNCj4+IMKgIHsNCj4+IMKgwqDCoMKgwqAg
cmV0dXJuIGdldF9jeWNsZXMoKTsNCj4+IMKgIH0NCj4+IC0jZWxzZSAvKiBDT05GSUdfNjRCSVQg
Ki8NCj4+ICsjZWxzZSAvKiAhQ09ORklHXzY0QklUICovDQo+PiDCoCBzdGF0aWMgaW5saW5lIHU2
NCBnZXRfY3ljbGVzNjQodm9pZCkNCj4+IMKgIHsNCj4+IMKgwqDCoMKgwqAgdTMyIGhpLCBsbzsN
Cj4+IGRpZmYgLS1naXQgYS9kcml2ZXJzL2Nsb2Nrc291cmNlL0tjb25maWcgYi9kcml2ZXJzL2Ns
b2Nrc291cmNlL0tjb25maWcNCj4+IGluZGV4IDQ4N2M4NTI1OTk2NzI0ZmJmOWM2ZTk3MjZkYWJi
NDc4ZDg2NTEzYjkuLjBmMmJiNzU1NjRjN2QyYmM5YzQ1MGE3ZmIwZWVmMzUzZTVkMjdlNjkgMTAw
NjQ0DQo+PiAtLS0gYS9kcml2ZXJzL2Nsb2Nrc291cmNlL0tjb25maWcNCj4+ICsrKyBiL2RyaXZl
cnMvY2xvY2tzb3VyY2UvS2NvbmZpZw0KPj4gQEAgLTY2MSw2ICs2NjEsMTggQEAgY29uZmlnIENM
SU5UX1RJTUVSDQo+PiDCoMKgwqDCoMKgwqDCoCBUaGlzIG9wdGlvbiBlbmFibGVzIHRoZSBDTElO
VCB0aW1lciBmb3IgUklTQy1WIHN5c3RlbXMuwqAgVGhlIENMSU5UDQo+PiDCoMKgwqDCoMKgwqDC
oCBkcml2ZXIgaXMgdXN1YWxseSB1c2VkIGZvciBOb01NVSBSSVNDLVYgc3lzdGVtcy4NCj4+DQo+
PiArY29uZmlnIEdDUlVfVElNRV9NTUlPDQo+PiArwqDCoMKgwqAgYm9vbCAiR0NSLlUgdGltZXIg
c3VwcG9ydCBmb3IgUklTQy1WIHBsYXRmb3JtcyINCj4+ICvCoMKgwqDCoCBkZXBlbmRzIG9uICFS
SVNDVl9NX01PREUgJiYgUklTQ1YNCj4gDQo+IA0KPiBIZXJlIHlvdSBkZXBlbmQgb24gZHQgKENv
bm9yIGFza2VkIGZvciB0aGlzIGNoYW5nZSBpbiB2MikuDQo+IA0KPiANCj4+ICvCoMKgwqDCoCBk
ZWZhdWx0IG4NCj4+ICvCoMKgwqDCoCBoZWxwDQo+PiArwqDCoMKgwqDCoMKgwqAgQWNjZXNzIEdD
Ui5VIHNoYWRvdyBjb3B5IG9mIHRoZSBSSVNDLVYgbXRpbWUgcmVnaXN0ZXINCj4+ICvCoMKgwqDC
oMKgwqDCoCBvbiBwbGF0Zm9ybXMgdGhhdCBwcm92aWRlIGEgY29tcGF0aWJsZSBkZXZpY2UsIGlu
c3RlYWQgb2YNCj4+ICvCoMKgwqDCoMKgwqDCoCByZWFkaW5nIHRoZSB0aW1lIENTUi4gU2luY2Ug
cmVhZGluZyB0aGUgdGltZSBDU1INCj4+ICvCoMKgwqDCoMKgwqDCoCB0cmFwcyB0byBNIG1vZGUg
b24gY2VydGFpbiBwbGF0Zm9ybXMsIHRoaXMgbWF5IGJlIG1vcmUgZWZmaWNpZW50Lg0KPj4gKw0K
Pj4gK8KgwqDCoMKgwqDCoMKgIElmIHlvdSBkb24ndCBrbm93IHdoYXQgdG8gZG8gaGVyZSwgc2F5
IG4uDQo+PiArDQo+PiDCoCBjb25maWcgQ1NLWV9NUF9USU1FUg0KPj4gwqDCoMKgwqDCoCBib29s
ICJTTVAgVGltZXIgZm9yIHRoZSBDLVNLWSBwbGF0Zm9ybSIgaWYgQ09NUElMRV9URVNUDQo+PiDC
oMKgwqDCoMKgIGRlcGVuZHMgb24gQ1NLWQ0KPj4gZGlmZiAtLWdpdCBhL2RyaXZlcnMvY2xvY2tz
b3VyY2UvdGltZXItcmlzY3YuYyBiL2RyaXZlcnMvY2xvY2tzb3VyY2UvdGltZXItcmlzY3YuYw0K
Pj4gaW5kZXggNGQ3Y2YzMzg4MjRhM2IyMTQ2MWMyNzU2YTAwMjIzNmRlZGM0OGY1Zi4uMWNjZjJh
OTVmNWJjYjI4OTQ2ZGNlZTQzNWY1YmJlYTIyMmM2ZmFjMyAxMDA2NDQNCj4+IC0tLSBhL2RyaXZl
cnMvY2xvY2tzb3VyY2UvdGltZXItcmlzY3YuYw0KPj4gKysrIGIvZHJpdmVycy9jbG9ja3NvdXJj
ZS90aW1lci1yaXNjdi5jDQo+PiBAQCAtMjIsNiArMjIsNyBAQA0KPj4gwqAgI2luY2x1ZGUgPGxp
bnV4L2lvLTY0LW5vbmF0b21pYy1sby1oaS5oPg0KPj4gwqAgI2luY2x1ZGUgPGxpbnV4L2ludGVy
cnVwdC5oPg0KPj4gwqAgI2luY2x1ZGUgPGxpbnV4L29mX2lycS5oPg0KPj4gKyNpbmNsdWRlIDxs
aW51eC9vZl9hZGRyZXNzLmg+DQo+PiDCoCAjaW5jbHVkZSA8bGludXgvbGltaXRzLmg+DQo+PiDC
oCAjaW5jbHVkZSA8Y2xvY2tzb3VyY2UvdGltZXItcmlzY3YuaD4NCj4+IMKgICNpbmNsdWRlIDxh
c20vc21wLmg+DQo+PiBAQCAtMzIsNiArMzMsNDIgQEANCj4+IMKgIHN0YXRpYyBERUZJTkVfU1RB
VElDX0tFWV9GQUxTRShyaXNjdl9zc3RjX2F2YWlsYWJsZSk7DQo+PiDCoCBzdGF0aWMgYm9vbCBy
aXNjdl90aW1lcl9jYW5ub3Rfd2FrZV9jcHU7DQo+Pg0KPj4gK3U2NCBfX2lvbWVtICpyaXNjdl90
aW1lX3ZhbCBfX3JvX2FmdGVyX2luaXQ7DQo+PiArRVhQT1JUX1NZTUJPTChyaXNjdl90aW1lX3Zh
bCk7DQo+PiArDQo+PiArI2lmZGVmIENPTkZJR182NEJJVA0KPj4gK3N0YXRpYyBjeWNsZXNfdCBf
X21heWJlX3VudXNlZCBtbWlvX2dldF9jeWNsZXModm9pZCkNCj4+ICt7DQo+PiArwqDCoMKgwqAg
cmV0dXJuIHJlYWRxX3JlbGF4ZWQocmlzY3ZfdGltZV92YWwpOw0KPj4gK30NCj4+ICsjZWxzZSAv
KiAhQ09ORklHXzY0QklUICovDQo+PiArc3RhdGljIGN5Y2xlc190IF9fbWF5YmVfdW51c2VkIG1t
aW9fZ2V0X2N5Y2xlcyh2b2lkKQ0KPj4gK3sNCj4+ICvCoMKgwqDCoCByZXR1cm4gcmVhZGxfcmVs
YXhlZCgoKHUzMiAqKXJpc2N2X3RpbWVfdmFsKSk7DQo+PiArfQ0KPj4gKyNlbmRpZiAvKiBDT05G
SUdfNjRCSVQgKi8NCj4+ICsNCj4+ICtzdGF0aWMgY3ljbGVzX3QgX19tYXliZV91bnVzZWQgZ2V0
X2N5Y2xlc19jc3Iodm9pZCkNCj4+ICt7DQo+PiArwqDCoMKgwqAgcmV0dXJuIGNzcl9yZWFkKENT
Ul9USU1FKTsNCj4+ICt9DQo+PiArDQo+PiArc3RhdGljIHUzMiBfX21heWJlX3VudXNlZCBtbWlv
X2dldF9jeWNsZXNfaGkodm9pZCkNCj4+ICt7DQo+PiArwqDCoMKgwqAgcmV0dXJuIHJlYWRsX3Jl
bGF4ZWQoKCh1MzIgKilyaXNjdl90aW1lX3ZhbCkgKyAxKTsNCj4+ICt9DQo+PiArDQo+PiArc3Rh
dGljIHUzMiBfX21heWJlX3VudXNlZCBnZXRfY3ljbGVzX2hpX2Nzcih2b2lkKQ0KPj4gK3sNCj4+
ICvCoMKgwqDCoCByZXR1cm4gY3NyX3JlYWQoQ1NSX1RJTUVIKTsNCj4+ICt9DQo+PiArDQo+PiAr
Y3ljbGVzX3QgKCpnZXRfY3ljbGVzX3B0cikodm9pZCkgPSBnZXRfY3ljbGVzX2NzcjsNCj4+ICtF
WFBPUlRfU1lNQk9MKGdldF9jeWNsZXNfcHRyKTsNCj4+ICsNCj4+ICt1MzIgKCpnZXRfY3ljbGVz
X2hpX3B0cikodm9pZCkgPSBnZXRfY3ljbGVzX2hpX2NzcjsNCj4+ICtFWFBPUlRfU1lNQk9MKGdl
dF9jeWNsZXNfaGlfcHRyKTsNCj4+ICsNCj4+IMKgIHN0YXRpYyB2b2lkIHJpc2N2X2Nsb2NrX2V2
ZW50X3N0b3Aodm9pZCkNCj4+IMKgIHsNCj4+IMKgwqDCoMKgwqAgaWYgKHN0YXRpY19icmFuY2hf
bGlrZWx5KCZyaXNjdl9zc3RjX2F2YWlsYWJsZSkpIHsNCj4+IEBAIC0yMDksNiArMjQ2LDExIEBA
IHN0YXRpYyBpbnQgX19pbml0IHJpc2N2X3RpbWVyX2luaXRfZHQoc3RydWN0IGRldmljZV9ub2Rl
ICpuKQ0KPj4gwqDCoMKgwqDCoCBpbnQgY3B1aWQsIGVycm9yOw0KPj4gwqDCoMKgwqDCoCB1bnNp
Z25lZCBsb25nIGhhcnRpZDsNCj4+IMKgwqDCoMKgwqAgc3RydWN0IGRldmljZV9ub2RlICpjaGls
ZDsNCj4+ICsjaWYgZGVmaW5lZChDT05GSUdfR0NSVV9USU1FX01NSU8pDQo+PiArwqDCoMKgwqAg
dTY0IG1taW9fYWRkcjsNCj4+ICvCoMKgwqDCoCB1NjQgbW1pb19zaXplOw0KPj4gK8KgwqDCoMKg
IHN0cnVjdCBkZXZpY2Vfbm9kZSAqZ2NydTsNCj4+ICsjZW5kaWYNCj4+DQo+PiDCoMKgwqDCoMKg
IGVycm9yID0gcmlzY3Zfb2ZfcHJvY2Vzc29yX2hhcnRpZChuLCAmaGFydGlkKTsNCj4+IMKgwqDC
oMKgwqAgaWYgKGVycm9yIDwgMCkgew0KPj4gQEAgLTIyNiw2ICsyNjgsMjUgQEAgc3RhdGljIGlu
dCBfX2luaXQgcmlzY3ZfdGltZXJfaW5pdF9kdChzdHJ1Y3QgZGV2aWNlX25vZGUgKm4pDQo+PiDC
oMKgwqDCoMKgIGlmIChjcHVpZCAhPSBzbXBfcHJvY2Vzc29yX2lkKCkpDQo+PiDCoMKgwqDCoMKg
wqDCoMKgwqDCoMKgwqDCoCByZXR1cm4gMDsNCj4+DQo+PiArI2lmIGRlZmluZWQoQ09ORklHX0dD
UlVfVElNRV9NTUlPKQ0KPj4gK8KgwqDCoMKgIGdjcnUgPSBvZl9maW5kX2NvbXBhdGlibGVfbm9k
ZShOVUxMLCBOVUxMLCAibXRpLGdjcnUiKTsNCj4+ICvCoMKgwqDCoCBpZiAoZ2NydSkgew0KPj4g
K8KgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoCBpZiAoIW9mX3Byb3BlcnR5X3JlYWRfcmVnKGdjcnUs
IDAsICZtbWlvX2FkZHIsICZtbWlvX3NpemUpKSB7DQo+PiArwqDCoMKgwqDCoMKgwqDCoMKgwqDC
oMKgwqDCoMKgwqDCoMKgwqDCoCByaXNjdl90aW1lX3ZhbCA9IGlvcmVtYXAoKGxvbmcpbW1pb19h
ZGRyLCBtbWlvX3NpemUpOw0KPj4gK8KgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDC
oMKgwqAgaWYgKHJpc2N2X3RpbWVfdmFsKSB7DQo+PiArwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKg
wqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqAgcHJfaW5mbygiVXNpbmcgbW1pbyB0aW1l
IHJlZ2lzdGVyIGF0IDB4JWxseFxuIiwNCj4+ICvCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKg
wqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqAgbW1pb19hZGRyKTsN
Cj4+ICvCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKg
wqDCoCBnZXRfY3ljbGVzX3B0ciA9ICZtbWlvX2dldF9jeWNsZXM7DQo+PiArwqDCoMKgwqDCoMKg
wqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqAgZ2V0X2N5Y2xlc19o
aV9wdHIgPSAmbW1pb19nZXRfY3ljbGVzX2hpOw0KPj4gK8KgwqDCoMKgwqDCoMKgwqDCoMKgwqDC
oMKgwqDCoMKgwqDCoMKgwqAgfSBlbHNlIHsNCj4+ICvCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDC
oMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoCBwcl93YXJuKCJVbmFibGUgdG8gdXNlIG1t
aW8gdGltZSBhdCAweCVsbHhcbiIsDQo+PiArwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKg
wqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgIG1taW9fYWRkcik7DQo+
PiArwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoCB9DQo+PiArwqDCoMKg
wqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoCBvZl9ub2RlX3B1dChnY3J1KTsNCj4+
ICvCoMKgwqDCoMKgwqDCoMKgwqDCoMKgwqAgfQ0KPj4gK8KgwqDCoMKgIH0NCj4+ICsjZW5kaWYN
Cj4+ICsNCj4+IMKgwqDCoMKgwqAgY2hpbGQgPSBvZl9maW5kX2NvbXBhdGlibGVfbm9kZShOVUxM
LCBOVUxMLCAicmlzY3YsdGltZXIiKTsNCj4+IMKgwqDCoMKgwqAgaWYgKGNoaWxkKSB7DQo+PiDC
oMKgwqDCoMKgwqDCoMKgwqDCoMKgwqDCoCByaXNjdl90aW1lcl9jYW5ub3Rfd2FrZV9jcHUgPSBv
Zl9wcm9wZXJ0eV9yZWFkX2Jvb2woY2hpbGQsDQo+IA0KPiANCj4gQW5kIHlvdSBoYXZlIGEgYnVu
Y2ggb2Yga2VybmVsIHRlc3Qgcm9ib3QgZmFpbHVyZXMgdG8gZml4IHRvbyA6KQ0KPiANCj4gVGhh
bmtzLA0KPiANCj4gQWxleA0KPiANCj4gDQo=
Return-Path: <linux-kernel+bounces-673119-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id E85ED41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:26:22 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 220323A56E5
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:26:01 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id E375D28EA4C;
Wed, 4 Jun 2025 11:26:16 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ljaBft0+"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2388A28E5F3;
Wed, 4 Jun 2025 11:26:15 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749036376; cv=none; b=Ly2Yz1K2lUeAivZFsmbLA8BI+79Fvc5gcLfk8RYlCtmNGNIRsp2v83ez85BDlxfD+n1j0cQj1t9W8sP6w3Kgn6VQc8y25COvg/K5BKQ+LjOhfPrvJaZD+iO+l++a2dEo3ai03nRddTk3tUkMxeGklWTzmaw+gMQ/osL/pJMIyKo=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749036376; c=relaxed/simple;
bh=CXvat76UgqTuizaTTXk2cggB6YuXzgU2clBrFmOcy4k=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=DUgZ6BHBlLsjifl66+JDTyOCpYHXQXNxvnXlV5ERwQ4N12FunAnRDeYjm3JAKi/cFYfV+Esu1YF+dMAK0bf1Y+sVN8OdHa9dmuE0CeuXleWO6I3XGaxrN1EadEVVjlHUsDpNO8tVpw/Humomo6JWKQ+cvmYW/mLQjlRwshdqyhM=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ljaBft0+; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 690BDC4CEEF;
Wed, 4 Jun 2025 11:26:13 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749036375;
bh=CXvat76UgqTuizaTTXk2cggB6YuXzgU2clBrFmOcy4k=;
h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
b=ljaBft0+5o5l8U7L+cwauxQk9qvCh4kVXGRfdGZVA1ROBRHWH5akSlf/ixTX8QSXv
F0F1OoO5/8isOq0Vji3evVVauluzAli766s+7nGCrIPEhMKPwNxIzoKzgXhcAqf96y
D1JC1ggNgMtL+MfXpNwBYQJhisyJYHiahUnKOGpCh1u7TThRRsu6rvyaV2npiPdeco
igDsVATDmDJvF+z8YPw6R69ufXIxFplUOunXsOcL/aXjZauStbdwcPESMF8c1J2Frk
9bLxlCcy9po6Oo2lYXjKorpaLHJmbzRR3l0vWBV8pmWsOPgrpO8FqRWN8pIhJk9FKZ
0U+zWQ0/dOtxQ==
Date: Wed, 4 Jun 2025 13:26:09 +0200
From: Alexey Gladkov <legion@xxxxxxxxxx>
To: Masahiro Yamada <masahiroy@xxxxxxxxxx>
Cc: Petr Pavlu <petr.pavlu@xxxxxxxx>, Luis Chamberlain <mcgrof@xxxxxxxxxx>,
Sami Tolvanen <samitolvanen@xxxxxxxxxx>,
Daniel Gomez <da.gomez@xxxxxxxxxxx>,
Nathan Chancellor <nathan@xxxxxxxxxx>,
Nicolas Schier <nicolas.schier@xxxxxxxxx>,
linux-kernel@xxxxxxxxxxxxxxx, linux-modules@xxxxxxxxxxxxxxx,
linux-kbuild@xxxxxxxxxxxxxxx
Subject: Re: [PATCH v3 3/6] modpost: Make mod_device_table aliases more unique
Message-ID: <aEAtUc6OTyvu-ThM@xxxxxxxxxxx>
References: <cover.1748335606.git.legion@xxxxxxxxxx>
<ecf0ebdda5bcf82464ed1cebbf50afdcd8b5b23a.1748335606.git.legion@xxxxxxxxxx>
<CAK7LNARkhc40UfrmmqsqmqkCn60=7zHc=pDFGR4o=k2p7CsABA@xxxxxxxxxxxxxx>
<aD1bozP0l67f_wbs@xxxxxxxxxxx>
<CAK7LNAQmQtvB4PfmH4MkRM123wySON6cF6TG79fi0WER1sz4Gw@xxxxxxxxxxxxxx>
<aD2vSnZhofEPilcL@xxxxxxxxxxx>
<CAK7LNATfUzCXmCb5kKOJOKOw=CJvk7viGgYtrGLwbSAkq7VtyA@xxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <CAK7LNATfUzCXmCb5kKOJOKOw=CJvk7viGgYtrGLwbSAkq7VtyA@xxxxxxxxxxxxxx>
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Tue, Jun 03, 2025 at 01:18:25AM +0900, Masahiro Yamada wrote:
> > > Before these patches this was not a problem as non-unique characters are
> > > in separate object files when the module is compiled separately.
> > >
> > > But when the modules are compiled into the kernel, there is a symbol
> > > conflict when linking vmlinuz. We have modules that export multiple device
> > > tables from different object files.
> >
> > This is because the __mod_device_table__* symbols are global, but
> > I suspect they do not need to be.
> >
> > Let's test this
> > https://lore.kernel.org/lkml/20250602105539.392362-1-masahiroy@xxxxxxxxxx/T/#u
>
> I tested this patch with the config:
>
> make allmodconfig
> make mod2yesconfig
>
> and it works.
Good.
Then, __COUNTER__ is unnecessary.
I didn't immediately notice. The patch you suggested works, but these
symbols remain in System.map and it seems in vmlinuz.
--
Rgrds, legion
Return-Path: <linux-kernel+bounces-673120-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id D18F541E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:26:51 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 142BC18957B0
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:27:05 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 190A428EA65;
Wed, 4 Jun 2025 11:26:42 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="XgNsJO2t"
Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7B29C28E611;
Wed, 4 Jun 2025 11:26:39 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749036401; cv=none; b=lgDI2RfcQiqn3p6RJ0zTA3ax52ZWu5AtjCVF/KGXJR0XZ9LPPl6RDgs0AnnaQdXiEm3FGoF1Md0Us2XCsue7JrgyMNc6/pmBB1dlXMcAIUxUU69K3JlTQDIITGe/je/S1PB98PxtCX9DMMHbAo8OZDzHgLl9qFryTQVtkCJQoio=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749036401; c=relaxed/simple;
bh=E84Gx9daW4oGLDSIvgjc8THpf725mJjQEx4bw6Z0Be8=;
h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From:
In-Reply-To:Content-Type; b=qC82U4dMos/WLqvpLVkvq5B0+AbekvHJc+SFdi4uqPb8MRWHnlf5KaDsOyg9SC1rSTLZg344iBvdE/iodbDIit7iIV++SkjkDuUeEWTlS3Py1d8sB/kcxslnFe17JY68AJ4A22ZnhUiNCbxX2I5d4oxE6JbNFlj0+/Ql6ewkQn8=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=XgNsJO2t; arc=none smtp.client-ip=205.220.168.131
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com
Received: from pps.filterd (m0279862.ppops.net [127.0.0.1])
by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5549ugSE014378;
Wed, 4 Jun 2025 11:26:32 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=
cc:content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=qcppdkim1; bh=
VHGAL1P7Wq3Zkiic8U0OX71CgaWKBP0Jugo1QllVrGU=; b=XgNsJO2tg9TijcCu
+SurFLfaSK1bEMAQG1wEM1q9k+U+ldq/Tm9CRJzuHTti05sIj58i4vkjER0WR9Js
ZinXkSoWquqowuMxLgurx0ti9VIOBNWK37VqgdiMtDHX+SOMBbyyD7vEmbxIQsR7
2lNayyKNyjNWfowcVPC/YIIMvtJpuqZceaVEf7DyzQgTIAuzyxpNlMVeVXlYyVwi
QlzqjLQ+4vlwQ1jDrYHZD5cFZCd2StMrLYEZa7w+3I9Vk6M7xh3O6PEhcBLieWgt
y16O2MmM4S53suwandT8gTLclTTJbVkRaYTtOlMNbWIlFi1o/sDqAuI/Copimh58
6IT8kg==
Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20])
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 472be81je6-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 11:26:32 +0000 (GMT)
Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196])
by NALASPPMTA03.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 554BQVCj014741
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 4 Jun 2025 11:26:31 GMT
Received: from [10.217.219.221] (10.80.80.8) by nalasex01a.na.qualcomm.com
(10.47.209.196) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Wed, 4 Jun 2025
04:26:27 -0700
Message-ID: <80b21999-f69a-4546-8b8a-2acb59df3fa1@xxxxxxxxxxx>
Date: Wed, 4 Jun 2025 16:55:34 +0530
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v2 3/7] phy: qcom: qmp-combo: introduce QPHY_MODE
To: Neil Armstrong <neil.armstrong@xxxxxxxxxx>, Vinod Koul <vkoul@xxxxxxxxxx>,
Kishon Vijay Abraham I <kishon@xxxxxxxxxx>,
Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>,
Bjorn Andersson <andersson@xxxxxxxxxx>,
Konrad Dybcio
<konrad.dybcio@xxxxxxxxxx>,
Krzysztof Kozlowski
<krzysztof.kozlowski+dt@xxxxxxxxxx>
CC: <linux-arm-msm@xxxxxxxxxxxxxxx>, <linux-phy@xxxxxxxxxxxxxxxxxxx>,
<devicetree@xxxxxxxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>
References: <20240527-topic-sm8x50-upstream-phy-combo-typec-mux-v2-0-a03e68d7b8fc@xxxxxxxxxx>
<20240527-topic-sm8x50-upstream-phy-combo-typec-mux-v2-3-a03e68d7b8fc@xxxxxxxxxx>
Content-Language: en-US
From: Udipto Goswami <quic_ugoswami@xxxxxxxxxxx>
In-Reply-To: <20240527-topic-sm8x50-upstream-phy-combo-typec-mux-v2-3-a03e68d7b8fc@xxxxxxxxxx>
Content-Type: text/plain; charset="UTF-8"; format=flowed
Content-Transfer-Encoding: 7bit
X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To
nalasex01a.na.qualcomm.com (10.47.209.196)
X-QCInternal: smtphost
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085
X-Authority-Analysis: v=2.4 cv=bNYWIO+Z c=1 sm=1 tr=0 ts=68402d68 cx=c_pps
a=ouPCqIW2jiPt+lZRy3xVPw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17
a=GEpy-HfZoHoA:10 a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10 a=VwQbUJbxAAAA:8
a=KKAkSRfTAAAA:8 a=RblEnPfGN_9KTdTLSikA:9 a=QEXdDO2ut3YA:10
a=cvBusfyB2V15izCimMoJ:22
X-Proofpoint-GUID: t9hUoPdx06CgKfI_iLyS4mLnRWnXttXj
X-Proofpoint-ORIG-GUID: t9hUoPdx06CgKfI_iLyS4mLnRWnXttXj
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDA4NyBTYWx0ZWRfXwQgi2ygkPGdH
v4sTBD8JayKDcj6BWZoU8l8/FGSAsa9wFt7FCbk8UXqgfNTSR/Imp6yHgH0MZGLvWyBYXhpdmYp
IqZpA67fpTIRRxyTfhHU+lhqBF8S/sY1xTq35m0rdlUcshODxHS4pPa1Ale+RUIY7Je9AmZtF51
ylWEue9EOKbtafLZPm2r3Vyu/Xh4JHuaCqckUk7NqOt5oIRnE0uGd2dI01BBPKA9fYtc7qx0OiK
Ghk4bHI8SaqHK51aE85TJJWUJvtV4+4dF/zgcD88xyw1iXL+YXJWmmBt5oUk6XlJ2zc3+x7cCkP
qIboMcJ3hEpVTDwLqM5UnF7yAnBgpirOjmOnHu4f7FiyuvqNxY6Am/lnMt1NPiXYl2Volzwl/Hh
vXPFjCWgNUlJkPPiXza9sgygtO77D4IfYb9oLz7ltwZlrdR/xfE0rh/HkRN8kUWmq4IQu8vU
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
lowpriorityscore=0 malwarescore=0 phishscore=0 priorityscore=1501
suspectscore=0 mlxscore=0 impostorscore=0 spamscore=0 clxscore=1011
mlxlogscore=999 adultscore=0 bulkscore=0 classifier=spam authscore=0
authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1
engine=8.19.0-2505280000 definitions=main-2506040087
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 5/27/2024 2:12 PM, Neil Armstrong wrote:
Introduce an enum for the QMP Combo PHY modes, use it in the
QMP commmon phy init function and default to COMBO mode.
Signed-off-by: Neil Armstrong <neil.armstrong@xxxxxxxxxx>
---
drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 41 +++++++++++++++++++++++++++----
1 file changed, 36 insertions(+), 5 deletions(-)
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
index 183cd9cd1884..788e4c05eaf2 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
@@ -61,6 +61,12 @@
#define PHY_INIT_COMPLETE_TIMEOUT 10000
+enum qphy_mode {
+ QPHY_MODE_COMBO = 0,
Hi Neil,
I have a doubt here, shouldn't this be aligned with what typec_altmode has ?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/usb/typec_altmode.h?h=v6.15#n113
This patch marks COMBO mode as 0
when the mux_set when called from pmic_glink_altmode.c
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/soc/qcom/pmic_glink_altmode.c?h=v6.15#n160
the state will start from 2 if i'm not wrong ?
For the similar implmentation I referring to fsa4480.c which seems to be
using the enums from typec_altmode.c therefore asking.
Thanks,
-Udipto
+ QPHY_MODE_DP_ONLY,
+ QPHY_MODE_USB_ONLY,
+};
+
/* set of registers with offsets different per-PHY */
enum qphy_reg_layout {
/* PCS registers */
@@ -1503,6 +1509,7 @@ struct qmp_combo {
struct mutex phy_mutex;
int init_count;
+ enum qphy_mode init_mode;
struct phy *usb_phy;
enum phy_mode mode;
@@ -2589,12 +2596,33 @@ static int qmp_combo_com_init(struct qmp_combo *qmp, bool force)
if (qmp->orientation == TYPEC_ORIENTATION_REVERSE)
val |= SW_PORTSELECT_VAL;
writel(val, com + QPHY_V3_DP_COM_TYPEC_CTRL);
- writel(USB3_MODE | DP_MODE, com + QPHY_V3_DP_COM_PHY_MODE_CTRL);
- /* bring both QMP USB and QMP DP PHYs PCS block out of reset */
- qphy_clrbits(com, QPHY_V3_DP_COM_RESET_OVRD_CTRL,
- SW_DPPHY_RESET_MUX | SW_DPPHY_RESET |
- SW_USB3PHY_RESET_MUX | SW_USB3PHY_RESET);
+ switch (qmp->init_mode) {
+ case QPHY_MODE_COMBO:
+ writel(USB3_MODE | DP_MODE, com + QPHY_V3_DP_COM_PHY_MODE_CTRL);
+
+ /* bring both QMP USB and QMP DP PHYs PCS block out of reset */
+ qphy_clrbits(com, QPHY_V3_DP_COM_RESET_OVRD_CTRL,
+ SW_DPPHY_RESET_MUX | SW_DPPHY_RESET |
+ SW_USB3PHY_RESET_MUX | SW_USB3PHY_RESET);
+ break;
+
+ case QPHY_MODE_DP_ONLY:
+ writel(DP_MODE, com + QPHY_V3_DP_COM_PHY_MODE_CTRL);
+
+ /* bring QMP DP PHY PCS block out of reset */
+ qphy_clrbits(com, QPHY_V3_DP_COM_RESET_OVRD_CTRL,
+ SW_DPPHY_RESET_MUX | SW_DPPHY_RESET);
+ break;
+
+ case QPHY_MODE_USB_ONLY:
+ writel(USB3_MODE, com + QPHY_V3_DP_COM_PHY_MODE_CTRL);
+
+ /* bring QMP USB PHY PCS block out of reset */
+ qphy_clrbits(com, QPHY_V3_DP_COM_RESET_OVRD_CTRL,
+ SW_USB3PHY_RESET_MUX | SW_USB3PHY_RESET);
+ break;
+ }
qphy_clrbits(com, QPHY_V3_DP_COM_SWI_CTRL, 0x03);
qphy_clrbits(com, QPHY_V3_DP_COM_SW_RESET, SW_RESET);
@@ -3603,6 +3631,9 @@ static int qmp_combo_probe(struct platform_device *pdev)
if (ret)
goto err_node_put;
+ /* Set PHY_MODE as combo by default */
+ qmp->init_mode = QPHY_MODE_COMBO;
+
qmp->usb_phy = devm_phy_create(dev, usb_np, &qmp_combo_usb_phy_ops);
if (IS_ERR(qmp->usb_phy)) {
ret = PTR_ERR(qmp->usb_phy);
Return-Path: <linux-kernel+bounces-673121-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 7D4B341E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:29:24 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 81CC81895E43
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:29:37 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 08D7E28EA4C;
Wed, 4 Jun 2025 11:29:17 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Y2Bg19LN"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 42F5A2C3261;
Wed, 4 Jun 2025 11:29:16 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749036556; cv=none; b=k5lhD/TYaddcO8OJPZrsEh5yYD1ev3enwT7dTE7X4mN7LAAPKfhJ5GkAm9F27b9Eag45hMkpIxOPlDh8YR7U3R/vkZr4DRZyLNKtt5yDVWuOVExgwKumjdqfUagO7XTWMcLZHSUJUuNLIT6gbrnoPbqVEtigwLHS85po2Pp3uYU=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749036556; c=relaxed/simple;
bh=FMbpwrcMsbvsG7V7LiHvP4zL0l+No3TsOeEeyaxVZiQ=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=fvxMyn55iB9xrX+Ur8yNNxh96c26QLUiQI06jzW5xgxHEoiLGqPZl+2AnpUSHY3w2CVAmzKhlvfUFE4ZLYrW51OXb+9nRUKMjzqW7lE+8x+I9VSYcxX3w0TWSuflPlZRj06Pktx/R9T2DCO/3jCQyd5VKszvCxgHWzya5r4Ucu8=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Y2Bg19LN; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 416B2C4CEE7;
Wed, 4 Jun 2025 11:29:13 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749036556;
bh=FMbpwrcMsbvsG7V7LiHvP4zL0l+No3TsOeEeyaxVZiQ=;
h=Date:Subject:To:Cc:References:From:In-Reply-To:From;
b=Y2Bg19LNfdhwHjTFfRUB/s4mxacX0gaBix3KUcvv/lDnmiBLFQY32mNrCwtzoBb+l
JI8RR4VzHLEk0HDnWceWtEu8AdwFDHLXDT7PXA0+BArj8RFz2uxi3w1h+ltYChLxSX
eOBbx/YFohlg5oOqtcEzg8zjQ1J60MdjzVLbfUIep+XOFWKXYb9afD/pRDlP3WRygk
polOc65+Xtr2XgL4uv6Jrry8jpisIqZ83f+MJbz3lIqrtL7w47y/tuz/6zrX+0N1Ct
XAi7qYxX+w5nxxlEIVBZlyNYqPHxOZkFelGvyNxQ1QT6s6MitjGFqS5Q7Su5Gw2EvS
cpX4ZJnk7HXmA==
Message-ID: <1ab9d9d5-fe0c-4ed3-b059-7be8465d79c6@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 13:29:08 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v2 1/1] dt-bindings: nvmem: convert lpc1857-eeprom.txt to
yaml format
To: Frank Li <Frank.Li@xxxxxxx>, Srinivas Kandagatla <srini@xxxxxxxxxx>,
Rob Herring <robh@xxxxxxxxxx>, Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@xxxxxxxxxxxxxxx>, open list <linux-kernel@xxxxxxxxxxxxxxx>
Cc: imx@xxxxxxxxxxxxxxx
References: <20250603152836.1069326-1-Frank.Li@xxxxxxx>
From: Krzysztof Kozlowski <krzk@xxxxxxxxxx>
Content-Language: en-US
Autocrypt: addr=krzk@xxxxxxxxxx; keydata=
xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79
cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu
JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH
gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE
J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj
NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS
BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU
vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM
Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD
TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzSVLcnp5c3p0b2Yg
S296bG93c2tpIDxrcnprQGtlcm5lbC5vcmc+wsGVBBMBCgA/AhsDBgsJCAcDAgYVCAIJCgsE
FgIDAQIeAQIXgBYhBJvQfg4MUfjVlne3VBuTQ307QWKbBQJoF1BKBQkWlnSaAAoJEBuTQ307
QWKbHukP/3t4tRp/bvDnxJfmNdNVn0gv9ep3L39IntPalBFwRKytqeQkzAju0whYWg+R/rwp
+r2I1Fzwt7+PTjsnMFlh1AZxGDmP5MFkzVsMnfX1lGiXhYSOMP97XL6R1QSXxaWOpGNCDaUl
ajorB0lJDcC0q3xAdwzRConxYVhlgmTrRiD8oLlSCD5baEAt5Zw17UTNDnDGmZQKR0fqLpWy
786Lm5OScb7DjEgcA2PRm17st4UQ1kF0rQHokVaotxRM74PPDB8bCsunlghJl1DRK9s1aSuN
hL1Pv9VD8b4dFNvCo7b4hfAANPU67W40AaaGZ3UAfmw+1MYyo4QuAZGKzaP2ukbdCD/DYnqi
tJy88XqWtyb4UQWKNoQqGKzlYXdKsldYqrLHGoMvj1UN9XcRtXHST/IaLn72o7j7/h/Ac5EL
8lSUVIG4TYn59NyxxAXa07Wi6zjVL1U11fTnFmE29ALYQEXKBI3KUO1A3p4sQWzU7uRmbuxn
naUmm8RbpMcOfa9JjlXCLmQ5IP7Rr5tYZUCkZz08LIfF8UMXwH7OOEX87Y++EkAB+pzKZNNd
hwoXulTAgjSy+OiaLtuCys9VdXLZ3Zy314azaCU3BoWgaMV0eAW/+gprWMXQM1lrlzvwlD/k
whyy9wGf0AEPpLssLVt9VVxNjo6BIkt6d1pMg6mHsUEVzsFNBFVDXDQBEADNkrQYSREUL4D3
Gws46JEoZ9HEQOKtkrwjrzlw/tCmqVzERRPvz2Xg8n7+HRCrgqnodIYoUh5WsU84N03KlLue
MNsWLJBvBaubYN4JuJIdRr4dS4oyF1/fQAQPHh8Thpiz0SAZFx6iWKB7Qrz3OrGCjTPcW6ei
OMheesVS5hxietSmlin+SilmIAPZHx7n242u6kdHOh+/SyLImKn/dh9RzatVpUKbv34eP1wA
GldWsRxbf3WP9pFNObSzI/Bo3kA89Xx2rO2roC+Gq4LeHvo7ptzcLcrqaHUAcZ3CgFG88CnA
6z6lBZn0WyewEcPOPdcUB2Q7D/NiUY+HDiV99rAYPJztjeTrBSTnHeSBPb+qn5ZZGQwIdUW9
YegxWKvXXHTwB5eMzo/RB6vffwqcnHDoe0q7VgzRRZJwpi6aMIXLfeWZ5Wrwaw2zldFuO4Dt
91pFzBSOIpeMtfgb/Pfe/a1WJ/GgaIRIBE+NUqckM+3zJHGmVPqJP/h2Iwv6nw8U+7Yyl6gU
BLHFTg2hYnLFJI4Xjg+AX1hHFVKmvl3VBHIsBv0oDcsQWXqY+NaFahT0lRPjYtrTa1v3tem/
JoFzZ4B0p27K+qQCF2R96hVvuEyjzBmdq2esyE6zIqftdo4MOJho8uctOiWbwNNq2U9pPWmu
4vXVFBYIGmpyNPYzRm0QPwARAQABwsF8BBgBCgAmAhsMFiEEm9B+DgxR+NWWd7dUG5NDfTtB
YpsFAmgXUF8FCRaWWyoACgkQG5NDfTtBYptO0w//dlXJs5/42hAXKsk+PDg3wyEFb4NpyA1v
qmx7SfAzk9Hf6lWwU1O6AbqNMbh6PjEwadKUk1m04S7EjdQLsj/MBSgoQtCT3MDmWUUtHZd5
RYIPnPq3WVB47GtuO6/u375tsxhtf7vt95QSYJwCB+ZUgo4T+FV4hquZ4AsRkbgavtIzQisg
Dgv76tnEv3YHV8Jn9mi/Bu0FURF+5kpdMfgo1sq6RXNQ//TVf8yFgRtTUdXxW/qHjlYURrm2
H4kutobVEIxiyu6m05q3e9eZB/TaMMNVORx+1kM3j7f0rwtEYUFzY1ygQfpcMDPl7pRYoJjB
dSsm0ZuzDaCwaxg2t8hqQJBzJCezTOIkjHUsWAK+tEbU4Z4SnNpCyM3fBqsgYdJxjyC/tWVT
AQ18NRLtPw7tK1rdcwCl0GFQHwSwk5pDpz1NH40e6lU+NcXSeiqkDDRkHlftKPV/dV+lQXiu
jWt87ecuHlpL3uuQ0ZZNWqHgZoQLXoqC2ZV5KrtKWb/jyiFX/sxSrodALf0zf+tfHv0FZWT2
zHjUqd0t4njD/UOsuIMOQn4Ig0SdivYPfZukb5cdasKJukG1NOpbW7yRNivaCnfZz6dTawXw
XRIV/KDsHQiyVxKvN73bThKhONkcX2LWuD928tAR6XMM2G5ovxLe09vuOzzfTWQDsm++9UKF a/A=
In-Reply-To: <20250603152836.1069326-1-Frank.Li@xxxxxxx>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 03/06/2025 17:28, Frank Li wrote:
Convert lpc1857-eeprom.txt to yaml format.
Signed-off-by: Frank Li <Frank.Li@xxxxxxx>
---
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>
Best regards,
Krzysztof
Return-Path: <linux-kernel+bounces-673122-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 9EAB841E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:29:32 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id D7BED175849
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:29:33 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 7410B28EA62;
Wed, 4 Jun 2025 11:29:27 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qCld74uj"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id AB9D828E5EF;
Wed, 4 Jun 2025 11:29:26 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749036566; cv=none; b=qbM24bFRKSagCncJ7ZvDpWPO+WRX141i53r43YTh/Qw1LZ8k2KDZjEHaZX9JjNTrD635pQKaeloZDif3/F1ewNkeHOJ1/T9Xx6CcqL3OGnom+C0C+IgT+I9BtvW6RYOW1+I2l1htpfLd+yGiGPAH+rFtbyPHeoF6qDXTjg9WmDg=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749036566; c=relaxed/simple;
bh=d2BIPMNimzjXbgSV6A0P6u4TSLLraPPLngeklZCCS+8=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=FVVgpPeI+nQ4PfYvtYR6zMmVB8NFb2UkhfMD5Ye4RW9URm/wf9RYFRztAW2zVgA6mK1m6wDRbrx/sJsB4QyerBCp3EU/ruXcqCcVS2Lxwyq0NDztBlTfl2RXQPt17bG3ZCwfKjKedLD97MPlvtg2r/WBMztPSpQM9WDhQ4BigOo=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qCld74uj; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8C18BC4CEE7;
Wed, 4 Jun 2025 11:29:16 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749036566;
bh=d2BIPMNimzjXbgSV6A0P6u4TSLLraPPLngeklZCCS+8=;
h=Date:Subject:To:Cc:References:From:In-Reply-To:From;
b=qCld74uj1bdGLZvkMJaf+A8oQK0B+MBUAmM/eTkAhSfJHfYsdGVjnR9AsxXuVgeEc
NEh3h132u/4CgE4wLt4BuCvWolfFTjeuaJZRS/4TmZI87KFnLfiuD2+ciLcl8i/Wms
jt5+6dcVmIuTgt4GXxtMvoKOAfEqyrDeGYpAumthMjX6bSk69qN00tT3GaLwgIhLFO
x3rMhPJnPtpcokt2XOrhnp1ZghyWqtSYc6AnhbJMp9BTExv3/SPV43q3RqRmOwDX89
DHzeqepI1u0epFvuBYrRBLHVmvZrkhvTc9J0h2rcAhtZm4KDHmgz7dtKPZDz0J458z
NKJgh5Umh3w3A==
Message-ID: <71a7422a-f139-404f-8759-54dc1510b571@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 13:29:11 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v2 1/1] dt-bindings: trivial-devices: Add compatible
string synaptics,synaptics_i2c
To: Frank Li <Frank.Li@xxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Conor Dooley
<conor+dt@xxxxxxxxxx>, Guenter Roeck <linux@xxxxxxxxxxxx>,
Noah Wang <noahwang.wang@xxxxxxxxxxx>,
Naresh Solanki <naresh.solanki@xxxxxxxxxxxxx>,
Rodrigo Gobbi <rodrigo.gobbi.7@xxxxxxxxx>,
Michal Simek <michal.simek@xxxxxxx>, Grant Peltier
<grantpeltier93@xxxxxxxxx>,
Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>,
Neil Armstrong <neil.armstrong@xxxxxxxxxx>, Heiko Stuebner
<heiko@xxxxxxxxx>, Kever Yang <kever.yang@xxxxxxxxxxxxxx>,
Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@xxxxxxxxxxxxxxx>, open list <linux-kernel@xxxxxxxxxxxxxxx>
Cc: imx@xxxxxxxxxxxxxxx, wahrenst@xxxxxxx
References: <20250603151239.1065763-1-Frank.Li@xxxxxxx>
From: Krzysztof Kozlowski <krzk@xxxxxxxxxx>
Content-Language: en-US
Autocrypt: addr=krzk@xxxxxxxxxx; keydata=
xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79
cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu
JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH
gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE
J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj
NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS
BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU
vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM
Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD
TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzSVLcnp5c3p0b2Yg
S296bG93c2tpIDxrcnprQGtlcm5lbC5vcmc+wsGVBBMBCgA/AhsDBgsJCAcDAgYVCAIJCgsE
FgIDAQIeAQIXgBYhBJvQfg4MUfjVlne3VBuTQ307QWKbBQJoF1BKBQkWlnSaAAoJEBuTQ307
QWKbHukP/3t4tRp/bvDnxJfmNdNVn0gv9ep3L39IntPalBFwRKytqeQkzAju0whYWg+R/rwp
+r2I1Fzwt7+PTjsnMFlh1AZxGDmP5MFkzVsMnfX1lGiXhYSOMP97XL6R1QSXxaWOpGNCDaUl
ajorB0lJDcC0q3xAdwzRConxYVhlgmTrRiD8oLlSCD5baEAt5Zw17UTNDnDGmZQKR0fqLpWy
786Lm5OScb7DjEgcA2PRm17st4UQ1kF0rQHokVaotxRM74PPDB8bCsunlghJl1DRK9s1aSuN
hL1Pv9VD8b4dFNvCo7b4hfAANPU67W40AaaGZ3UAfmw+1MYyo4QuAZGKzaP2ukbdCD/DYnqi
tJy88XqWtyb4UQWKNoQqGKzlYXdKsldYqrLHGoMvj1UN9XcRtXHST/IaLn72o7j7/h/Ac5EL
8lSUVIG4TYn59NyxxAXa07Wi6zjVL1U11fTnFmE29ALYQEXKBI3KUO1A3p4sQWzU7uRmbuxn
naUmm8RbpMcOfa9JjlXCLmQ5IP7Rr5tYZUCkZz08LIfF8UMXwH7OOEX87Y++EkAB+pzKZNNd
hwoXulTAgjSy+OiaLtuCys9VdXLZ3Zy314azaCU3BoWgaMV0eAW/+gprWMXQM1lrlzvwlD/k
whyy9wGf0AEPpLssLVt9VVxNjo6BIkt6d1pMg6mHsUEVzsFNBFVDXDQBEADNkrQYSREUL4D3
Gws46JEoZ9HEQOKtkrwjrzlw/tCmqVzERRPvz2Xg8n7+HRCrgqnodIYoUh5WsU84N03KlLue
MNsWLJBvBaubYN4JuJIdRr4dS4oyF1/fQAQPHh8Thpiz0SAZFx6iWKB7Qrz3OrGCjTPcW6ei
OMheesVS5hxietSmlin+SilmIAPZHx7n242u6kdHOh+/SyLImKn/dh9RzatVpUKbv34eP1wA
GldWsRxbf3WP9pFNObSzI/Bo3kA89Xx2rO2roC+Gq4LeHvo7ptzcLcrqaHUAcZ3CgFG88CnA
6z6lBZn0WyewEcPOPdcUB2Q7D/NiUY+HDiV99rAYPJztjeTrBSTnHeSBPb+qn5ZZGQwIdUW9
YegxWKvXXHTwB5eMzo/RB6vffwqcnHDoe0q7VgzRRZJwpi6aMIXLfeWZ5Wrwaw2zldFuO4Dt
91pFzBSOIpeMtfgb/Pfe/a1WJ/GgaIRIBE+NUqckM+3zJHGmVPqJP/h2Iwv6nw8U+7Yyl6gU
BLHFTg2hYnLFJI4Xjg+AX1hHFVKmvl3VBHIsBv0oDcsQWXqY+NaFahT0lRPjYtrTa1v3tem/
JoFzZ4B0p27K+qQCF2R96hVvuEyjzBmdq2esyE6zIqftdo4MOJho8uctOiWbwNNq2U9pPWmu
4vXVFBYIGmpyNPYzRm0QPwARAQABwsF8BBgBCgAmAhsMFiEEm9B+DgxR+NWWd7dUG5NDfTtB
YpsFAmgXUF8FCRaWWyoACgkQG5NDfTtBYptO0w//dlXJs5/42hAXKsk+PDg3wyEFb4NpyA1v
qmx7SfAzk9Hf6lWwU1O6AbqNMbh6PjEwadKUk1m04S7EjdQLsj/MBSgoQtCT3MDmWUUtHZd5
RYIPnPq3WVB47GtuO6/u375tsxhtf7vt95QSYJwCB+ZUgo4T+FV4hquZ4AsRkbgavtIzQisg
Dgv76tnEv3YHV8Jn9mi/Bu0FURF+5kpdMfgo1sq6RXNQ//TVf8yFgRtTUdXxW/qHjlYURrm2
H4kutobVEIxiyu6m05q3e9eZB/TaMMNVORx+1kM3j7f0rwtEYUFzY1ygQfpcMDPl7pRYoJjB
dSsm0ZuzDaCwaxg2t8hqQJBzJCezTOIkjHUsWAK+tEbU4Z4SnNpCyM3fBqsgYdJxjyC/tWVT
AQ18NRLtPw7tK1rdcwCl0GFQHwSwk5pDpz1NH40e6lU+NcXSeiqkDDRkHlftKPV/dV+lQXiu
jWt87ecuHlpL3uuQ0ZZNWqHgZoQLXoqC2ZV5KrtKWb/jyiFX/sxSrodALf0zf+tfHv0FZWT2
zHjUqd0t4njD/UOsuIMOQn4Ig0SdivYPfZukb5cdasKJukG1NOpbW7yRNivaCnfZz6dTawXw
XRIV/KDsHQiyVxKvN73bThKhONkcX2LWuD928tAR6XMM2G5ovxLe09vuOzzfTWQDsm++9UKF a/A=
In-Reply-To: <20250603151239.1065763-1-Frank.Li@xxxxxxx>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 03/06/2025 17:12, Frank Li wrote:
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index 5d2a7a8d3ac6c..5b9c7ab6d8185 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -1496,6 +1496,9 @@ patternProperties:
"^synopsys,.*":
description: Synopsys, Inc. (deprecated, use snps)
deprecated: true
+ "^synaptics,.*":
Please place it in alphabetical order.
Best regards,
Krzysztof
Return-Path: <linux-kernel+bounces-673123-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 12AAA41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:31:45 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 8F0A41896075
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:31:58 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id CFC4628EA4B;
Wed, 4 Jun 2025 11:31:38 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="aCdqXEl/"
Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id F0DF12B9BC
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:31:35 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749036698; cv=none; b=XOhal4Yew7lRVZM9RmjGR2jGPMdIqzdzA8drswylHhp4ONRmeZFw6lu2n+KKLqkwGEorbq/uKsNKKK+IfkMZARaAzH9qbXCsCsndN8QIJn/x5c6qvwPsUdoapuKpTc+iKBtVVhEzSIuKmCBdFPQhwFj1hV87RZEv6O16ybP0Sp8=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749036698; c=relaxed/simple;
bh=xsT7df1iosQgc0GDXxlbzLg0Z/QlQnax8MazA18G5ak=;
h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References:
MIME-Version:Content-Type; b=IEBqJH4GeS1dg5AewTxPLyCD7idfVxjR5IB/ZtnAlCVq0l3WTnZGyizP1c+AIuKfeCnyaXVc9WIm9GWTkzP5uBKJJcAEvh5q7+OeYClxTnPHHZ+Vo20qyelNx5Id7LYeLg/3j3G23EeBNmeklgd0zH72JW7qotnR9xhyldqfYDc=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=aCdqXEl/; arc=none smtp.client-ip=148.251.105.195
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com;
s=mail; t=1749036264;
bh=xsT7df1iosQgc0GDXxlbzLg0Z/QlQnax8MazA18G5ak=;
h=Date:From:To:Cc:Subject:In-Reply-To:References:From;
b=aCdqXEl/DCOyBnn9BxAS+/b2YaPf/UGyGV6m4yy3uYyL6uM8bs/bKMvFm6arFV+c5
MuMLWDBM+bdLAs5W1PVV6itr/Jzgv+RhgaRdfOga6lXLo+szBR+TkBXlvcLqwwDgtP
gsfXvC0OJuYXiDqOEq70RnPjB6TFedF7JnLcYVvqIP+FYn+kHHfl/emDUlozDMq3Nv
yGgT5UoYRvqg4N6EsuRwqgEfZLHrMjzLYr5nMxN98SJhkTFjVXjnT58+eEp/ID4p+B
QeJ4Zp/8Nxv+6JYddH7Tdhnf3Q9Ll6+ii15J15buKhq7KFtqxjE5QeGsrzEDxNDdTS
AfKOcf+rATNLg==
Received: from localhost (unknown [IPv6:2a01:e0a:2c:6930:5cf4:84a1:2763:fe0d])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(No client certificate requested)
(Authenticated sender: bbrezillon)
by bali.collaboradmins.com (Postfix) with ESMTPSA id 120D517E010B;
Wed, 4 Jun 2025 13:24:24 +0200 (CEST)
Date: Wed, 4 Jun 2025 13:24:18 +0200
From: Boris Brezillon <boris.brezillon@xxxxxxxxxxxxx>
To: Ashley Smith <ashley.smith@xxxxxxxxxxxxx>
Cc: "Liviu Dudau" <liviu.dudau@xxxxxxx>, "Steven Price"
<steven.price@xxxxxxx>, "Maarten Lankhorst"
<maarten.lankhorst@xxxxxxxxxxxxxxx>, "Maxime Ripard" <mripard@xxxxxxxxxx>,
"Thomas Zimmermann" <tzimmermann@xxxxxxx>, "David Airlie"
<airlied@xxxxxxxxx>, "Simona Vetter" <simona@xxxxxxxx>, "kernel"
<kernel@xxxxxxxxxxxxx>, "open list:ARM MALI PANTHOR DRM DRIVER"
<dri-devel@xxxxxxxxxxxxxxxxxxxxx>, "open list"
<linux-kernel@xxxxxxxxxxxxxxx>
Subject: Re: [PATCH v5 1/2] drm/panthor: Reset queue slots if termination
fails
Message-ID: <20250604132418.6685ff7c@xxxxxxxxxxxxx>
In-Reply-To: <1973a637a7f.b61987aa482053.3031227813632792112@xxxxxxxxxxxxx>
References: <20250603094952.4188093-1-ashley.smith@xxxxxxxxxxxxx>
<20250603094952.4188093-2-ashley.smith@xxxxxxxxxxxxx>
<aD7X-O8ykIGZjHjc@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
<1973a637a7f.b61987aa482053.3031227813632792112@xxxxxxxxxxxxx>
Organization: Collabora
X-Mailer: Claws Mail 4.3.1 (GTK 3.24.49; x86_64-redhat-linux-gnu)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, 04 Jun 2025 11:01:27 +0100
Ashley Smith <ashley.smith@xxxxxxxxxxxxx> wrote:
On Tue, 03 Jun 2025 12:09:44 +0100 Liviu Dudau <liviu.dudau@xxxxxxx>
wrote:
> On Tue, Jun 03, 2025 at 10:49:31AM +0100, Ashley Smith wrote:
> > This fixes a bug where if we timeout after a suspend and the
> > termination fails, due to waiting on a fence that will never be
> > signalled for example, we do not resume the group correctly. The
> > fix forces a reset for groups that are not terminated correctly.
> >
>
> I have a question on the commit message: you're describing a
> situation where a fence will *never* be signalled. Is that a real
> example? I thought this is not supposed to ever happen! Or are you
> trying to say that the fence signalling happens after the timeout?
>
This covers cases where a fence is never signalled.
Fence not being signaled in time is covered by the job timeout. What
you're fixing here is the FW not responding to a CSG SUSPEND/TERMINATE
request, which is different.
It shouldn't
happen, but we have found this in some situations with a FW hang.
This ^.
Since queue_suspend_timeout() is only called on state update, if a
suspend/terminate fails due to a FW hang for example this will leave
delayed work, possibly leading to an incorrect queue_timeout_work().
Nah, that's not true until the second patch in this series is applied,
because drm_sched_stop(), which is called in the
panthor_sched_pre_reset() path, takes care of suspending the drm_sched
timer. What's still problematic if we don't call cs_slot_reset_locked()
here is that we don't re-initialize the FW CS slots, and since
cs_slot_prog_locked() is only called on active queues, we might end up
with an unused CS slot that still has values from the previous user of
this slot. Not sure how harmful this is in practice, but it's certainly
not great.
The true reason we have a Fixes tag is because the second patch has
a Fixes tag too, and it relies on the new driver timer being stopped
even if the FW hangs on a TERMINATE request (queue_suspend_timeout() is
called in cs_slot_reset_locked()). So, either we merge the two patches
back, like was done in v2, or we have to flag both as Fixes.
Return-Path: <linux-kernel+bounces-673124-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 6E6CD41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:31:58 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 0643818960C9
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:32:12 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id C384728E594;
Wed, 4 Jun 2025 11:31:52 +0000 (UTC)
Received: from mail-il1-f197.google.com (mail-il1-f197.google.com [209.85.166.197])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 05F7938DD1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:31:50 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.197
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749036712; cv=none; b=fRP8pV2LOJooRXTdKCPpLZ9WsmTC9px+LDzRPDHQ0xxDumMQe8UWb7Yctzp/RBvwVPBkqkf0VVjbYWyc3lcLxB4c9wqWNolp1v+aTQQsO3v4I9Epxznn2COyzaMh/9AOIgCMef21RCLaHOhIuhnrjCGF9mpxEdHR7QmDdknEsWk=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749036712; c=relaxed/simple;
bh=zBYGvX52BxLQ4GUMUxG0DeMTjGwYb+sctll/J9DgxZ0=;
h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To:
Content-Type; b=WUyh/SaCCbh6Dydk6pbjTWhqAOD6e94MspL6s1njWj5gYty88ugP0q2C8ErXWPvknfY3tbK/in15tToTpQoGBOkIrRdf8129ObT335gMe3ucSlcNqtdisU3zKOcKWSVU5hAz2vr1LrHY5MmJqMwWsnASE7dbj+Tits5hL1AXp+8=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.166.197
Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com
Received: by mail-il1-f197.google.com with SMTP id e9e14a558f8ab-3ddbec809acso12054225ab.2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 04:31:50 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749036710; x=1749641510;
h=to:from:subject:message-id:in-reply-to:date:mime-version
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=zBYGvX52BxLQ4GUMUxG0DeMTjGwYb+sctll/J9DgxZ0=;
b=wfWIkUzyYWYRF3NhWt9ABURGKVRjL2TnU7lZx3+GzAp/Etn1jkP2EQOnFpesMy5zod
MIvQ5Dfee4zvsgliOF47kQny7x/1voSSpUJv1HoULr1kLNOrSASc674oRCOOL73Ixviv
vZv0allIA/qO42djxWBIVTCl5DavN027kVGMQmynmcTLxPpnUHmcar6mlF+z1ejNWEHi
Mv+iy8NyHZFJjlPXHe5BWCZz62wujiacQPf2qYldSShg313b9mPLcPYMJ2c+aepcHijy
FgX7DIB1G4SNhlnP7aYe/zBUoOW3Plc+7RgEmOp2kNzUfJ9C9LHG8nHXL3oApugIw+YT
swog==
X-Gm-Message-State: AOJu0YzQZPUl+q9y7XmXoeAfWy25X59QAgqzF7SvPEnZYnFWkQAdRoIl
2VVjU/1xrxxEMuu2EMOWVL5uzW+i3HjuQEyKaWR1JdmXNrwTDnX+8cy81ae1ouTkNbjocR/YFb+
tT4IA6Vw4tj++gwBkJGnaD9xaOJcFwz3LW+js5PB3brDy1lFnCGV19WgNrNQ=
X-Google-Smtp-Source: AGHT+IHGlYWvW7Y00Yspy+dOuOvGQTA/yh4gPJr6hPXEI1xQxgg1DEwHUBkPkMGdK3wtpuqC5IZAiywuwgyfJ57nYc8wkiaC5vWY
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-Received: by 2002:a05:6e02:250d:b0:3dc:8a54:c244 with SMTP id
e9e14a558f8ab-3ddbed6e5fbmr26970305ab.12.1749036710060; Wed, 04 Jun 2025
04:31:50 -0700 (PDT)
Date: Wed, 04 Jun 2025 04:31:50 -0700
In-Reply-To: <68344557.a70a0220.1765ec.0165.GAE@xxxxxxxxxx>
X-Google-Appengine-App-Id: s~syzkaller
X-Google-Appengine-App-Id-Alias: syzkaller
Message-ID: <68402ea6.a00a0220.d8eae.0088.GAE@xxxxxxxxxx>
Subject: Re: [syzbot] #syz test
From: syzbot <syzbot+5138f00559ffb3cb3610@xxxxxxxxxxxxxxxxxxxxxxxxx>
To: linux-kernel@xxxxxxxxxxxxxxx, syzkaller-bugs@xxxxxxxxxxxxxxxx
Content-Type: text/plain; charset="UTF-8"
X-Spam-Status: No, score=-3.0 required=5.0 tests=FROM_LOCAL_HEX,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
For archival purposes, forwarding an incoming command email to
linux-kernel@xxxxxxxxxxxxxxx, syzkaller-bugs@xxxxxxxxxxxxxxxx.
***
Subject: #syz test
Author: abhinav.ogl@xxxxxxxxx
Return-Path: <linux-kernel+bounces-673125-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 6D1F741E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:32:32 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id D189A189607D
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:32:45 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id B6EB028EA4F;
Wed, 4 Jun 2025 11:32:23 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=technica-engineering.de header.i=@technica-engineering.de header.b="K6nhfckI"
Received: from AM0PR02CU008.outbound.protection.outlook.com (mail-westeuropeazon11023100.outbound.protection.outlook.com [52.101.72.100])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id CFE022B9BC;
Wed, 4 Jun 2025 11:32:20 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.72.100
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749036742; cv=fail; b=SaDvMDi6Uqo6feTQtfOHJAHfyVjrNKSWbUVcG2Qf5p4m8FYmTCP07HOgYIDI76t0il/7YN/qBLVNl9vntS87yeKmYp8O/xyyH7EMvwQFYQ6tSWnuG5L4MB001hYI7rq38ey4df5wXIsBb4BAtsbpzbxGy+CXrEKjahy1hTeyRWg=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749036742; c=relaxed/simple;
bh=bg15VbVKtuzjICnx+yZvTg3dZWLkW3lAxmTaai7wm2k=;
h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=YyIz5Z5trzZXkr5d22FkoYZyL1HNKjvxZawqlAjhvLiVoztoMuyXAzmQNDOg/mlUWt/w9J0zS/8XgcD1FV2C8rG88jTn3s0cmavxd0Xo4GUhBO2tsIrzDD1bAEo5G7e1s/EfHNg+yXIJmMyhuIzKZoEntHRngdhij+l6exsLYuE=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=technica-engineering.de; spf=pass smtp.mailfrom=technica-engineering.de; dkim=pass (1024-bit key) header.d=technica-engineering.de header.i=@technica-engineering.de header.b=K6nhfckI; arc=fail smtp.client-ip=52.101.72.100
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=technica-engineering.de
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=technica-engineering.de
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=Vg04+uX+RlktiGD+CGVRd1QqzteN4MxGNcRLBKFn8r6fqeU5nlAzZmNMzBsiuFlo42LkQYTVvaopBQxYwX1h9mJWh1qc6H+beRKEDqWOU2FG6BPGePJIldjaxNc0kkO+KOV01QfhqOkhA+4BMGr0tyfJ7hlX3RjRtdsiMLVkrF83PiSmelgsYcUi5d/Zi+1MmicvXqfyKqBHwNfDPIDIdJLlbdJVwFlg9jaySYGqrWTY95y7u6ueHd+TpyaXdJg56pWTYMMiGHFsvr/m5bHl0rnNrPkgQvmzwpbw1B4Bdr61XEdUAxyjxNEALFYrFu1qAS9SyFPtxFLTWH+XTojHpg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=Xw/ZrDam5/WptiSh5/ySaIjudcnbebypODmVzipU+e8=;
b=nVFxeLBsyXCdft7AbQeLi/0NyvuLLTisgdMy7PM+IjspRq/9UQMrLGNyO8iWXtbql64CkUwCv3h0YXqui3XukmXp2FJ84N8TAWPdPiPRSpWuBwSHSW8E/p0lZM6U0TWujm+JqCnjF2hbKUYl1lEUBWjWM2HqpIIYrFp+9Dg7WfoOo8FJ5dGvl59LWDqgWVjGAzMJ3AMefShP5GmMS7WMhKs+0gw9XURkoeBreLvIFtudc7wYZ9CaIvy7xNAqHsxYT7KXTQ18FtXxCRP/HZAvXrPc+fGPPgHT7kZbVeethpXLyVl/2dpBWR0ZdtuKQMZGyAeAOtg9BLLMxcawnV8NvA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is
2.136.200.136) smtp.rcpttodomain=davemloft.net
smtp.mailfrom=technica-engineering.de; dmarc=fail (p=reject sp=reject
pct=100) action=oreject header.from=technica-engineering.de; dkim=none
(message not signed); arc=none (0)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=technica-engineering.de; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=Xw/ZrDam5/WptiSh5/ySaIjudcnbebypODmVzipU+e8=;
b=K6nhfckIi5vIjWCFk6ow3Q6JrChI2oG1FDFiddpMDVGWJmeiMDYc8TuAnSaaXzntKQPvjUOQkRl1KC8Mq9t65UmnucUWenVby4Ugro7+/y27za4qpsQNNINBw5i6GwiyVVpadUJJaIbaSia8e7NMS+/yzo+D4l8wtUfg3Zu3LM8=
Received: from AS9P250CA0018.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:532::21)
by AS8PR08MB10142.eurprd08.prod.outlook.com (2603:10a6:20b:633::21) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8769.32; Wed, 4 Jun
2025 11:32:16 +0000
Received: from DU2PEPF00028CFE.eurprd03.prod.outlook.com
(2603:10a6:20b:532:cafe::49) by AS9P250CA0018.outlook.office365.com
(2603:10a6:20b:532::21) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8792.32 via Frontend Transport; Wed,
4 Jun 2025 11:32:16 +0000
X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 2.136.200.136)
smtp.mailfrom=technica-engineering.de; dkim=none (message not signed)
header.d=none;dmarc=fail action=oreject header.from=technica-engineering.de;
Received-SPF: Fail (protection.outlook.com: domain of technica-engineering.de
does not designate 2.136.200.136 as permitted sender)
receiver=protection.outlook.com; client-ip=2.136.200.136;
helo=jump.ad.technica-electronics.es;
Received: from jump.ad.technica-electronics.es (2.136.200.136) by
DU2PEPF00028CFE.mail.protection.outlook.com (10.167.242.182) with Microsoft
SMTP Server id 15.20.8792.29 via Frontend Transport; Wed, 4 Jun 2025 11:32:15
+0000
Received: from dalek.ad.technica-electronics.es (unknown [10.10.2.101])
by jump.ad.technica-electronics.es (Postfix) with ESMTP id 55201402BC;
Wed, 4 Jun 2025 13:32:15 +0200 (CEST)
From: carlos.fernandez@xxxxxxxxxxxxxxxxxxxxxxx
To: andreu.montiel@xxxxxxxxxxxxxxxxxxxxxxx
Cc: carlos.fernandez@xxxxxxxxxxxxxxxxxxxxxxx,
Andreu Montiel <Andreu.Montiel@xxxxxxxxxxxxxxxxxxxxxxx>,
Sabrina Dubroca <sd@xxxxxxxxxxxxxxx>,
Andrew Lunn <andrew+netdev@xxxxxxx>,
"David S. Miller" <davem@xxxxxxxxxxxxx>,
Eric Dumazet <edumazet@xxxxxxxxxx>,
Jakub Kicinski <kuba@xxxxxxxxxx>,
Paolo Abeni <pabeni@xxxxxxxxxx>,
Hannes Frederic Sowa <hannes@xxxxxxxxxxxxxxxxxxx>,
netdev@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
Subject: [PATCH net v2] macsec: MACsec SCI assignment for ES = 0
Date: Wed, 4 Jun 2025 13:31:54 +0200
Message-ID: <20250604113213.2595524-1-carlos.fernandez@xxxxxxxxxxxxxxxxxxxxxxx>
X-Mailer: git-send-email 2.43.0
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-EOPAttributedMessage: 0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: DU2PEPF00028CFE:EE_|AS8PR08MB10142:EE_
Content-Type: text/plain
X-MS-Office365-Filtering-Correlation-Id: 3c8f30d5-c72f-4964-9526-08dda35b7528
X-MS-Exchange-AtpMessageProperties: SA
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam:
BCL:0;ARA:13230040|1800799024|376014|82310400026|36860700013;
X-Microsoft-Antispam-Message-Info:
=?us-ascii?Q?RIT+85CA8oH7LJlUC3PuNNMvHOmxf7t5dS2jjMfn7sM++/hJAAMuR/L70DxI?=
=?us-ascii?Q?RRcGxCT1SAVaihm9xLeN3mlxiFoln2JvPJR7rOmRkSTJNN+n4HevwghbLl1z?=
=?us-ascii?Q?WSpRvI4psq0pd6mFLZnhxKhGcwd2e6ncOvTwxX3JS85ll2iQKPQTiWMqfFOB?=
=?us-ascii?Q?MZEGBmkfF9RMm/JCH4bJAH4JBt+G10VXa1P9bJsIcFBB+NL/MTOy+hEOYMEg?=
=?us-ascii?Q?CcnVh+tSqiDyKt6qs1SXYqYuBhJWdOyZbJBHeySTGkd2VTDRGqUXf4CSZTjx?=
=?us-ascii?Q?UBfS+49Sw/NLa0z+Js9A7cy+QIMWM36sIsQS1xO7FlTW4H8wvj4oh/hGpGcl?=
=?us-ascii?Q?hScAQOYYDKjticYIcRWw2BuLF/XvfcLN1B1H8Ca8aR6lx6pNrf6l9F3h4wuG?=
=?us-ascii?Q?/2yNIRF0BfFFTxlNPJh/HmI8I4jIV0IzXUpCW+5jMH+LTP2ASoGiOZRaF5/+?=
=?us-ascii?Q?MUT7lw1J9fsr35k7a7tWZiR69mzIAiek+x3s6gG7sruf0XulU6xHa0Lc5Q8q?=
=?us-ascii?Q?iv1YyCeXGJRVDob0m2gCWK1wubpcgm70ihZJFt1rflRzX+rWfNgPbCVElgaZ?=
=?us-ascii?Q?s5Rio36S3tRaoke3P+62zYgMVfDjOx29CQ+wJa+tNWM50GDXfdvMfYSdUH03?=
=?us-ascii?Q?UVU4G/TVwgfDBfMfD8ldjLV6vI+U0u3iTVG0BO+zdmdVu4y6oXoEHGxOOY1d?=
=?us-ascii?Q?vCyf3eWW50hmY+iRoh/cUGAvqs2GxywAMGk0IfIUSxuuTUxISFPHS3oGhMBU?=
=?us-ascii?Q?629irfnrCk27tgI5Or+0wTJASKBcWMwq/l9l+J9p6FED+ftMU7Z64VqT4u+2?=
=?us-ascii?Q?847PXUHLdt6IyYvJaPDti6EqPq+V1mlQRDD/drYGg9CoBYNN5wix0KuW58IX?=
=?us-ascii?Q?APlrY4nDCyeWqtxJSG3LRQsorDkVZSNYB/oXnK8CFkw6EAmdrL186wJ8TQY7?=
=?us-ascii?Q?yFXvETwD2cApdCCwJs8w/ix40cNivrnLXWHehwiEcWIzlJehOD6haOPPi8Qs?=
=?us-ascii?Q?iIn8+vNxIUDelivOjmlLqFzDiLnB1Wq6nvMrDbf5cpM4fNWdHlT2pS81tqAj?=
=?us-ascii?Q?Smc8g4Iww/DR5A+BHakOWO5+vG6e0SKPuiuZm1hVCK1qG/c1ePN4Zjtc8Lmn?=
=?us-ascii?Q?lt9lnZ+gR46SYROgNh+1tyBV02bWlvvsma/zuo0q2WYqJksJgXhNCtIb6X6L?=
=?us-ascii?Q?1tFszqI9XLKsKRYTRef3Xzbv760M/qWU9ejRh1soSRvbFYsM46y4CFgtyfGV?=
=?us-ascii?Q?8+TjkPYlre9YqyWfNJfPY/ov6LDQfFO7JBhCmrvGOP/HzIe8kieWbsp9GNYu?=
=?us-ascii?Q?ghE/1iAHWaaa3kl15vN0doUBoOCbFEB+W5C4Tq7CT2fMUyfVEV3ms4IlbmeR?=
=?us-ascii?Q?JERbiE48poqQk9uyNRGyzzpOpDHwYcVkkU2p9YB/zjLIiHew74Ap+Bi0kWmA?=
=?us-ascii?Q?MDJsayGz7isEJOwKdA/xix6VJ1TxDohmtpflWzkBH99atSWg0eB99rFN+8SM?=
=?us-ascii?Q?GoYZwCeKmNbd1ZXJYYEzWlCuBu0etvZbXiH8OP5Wsk2g3rHR1Xx6NI12CQ?=
=?us-ascii?Q?=3D=3D?=
X-Forefront-Antispam-Report:
CIP:2.136.200.136;CTRY:ES;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:jump.ad.technica-electronics.es;PTR:136.red-2-136-200.staticip.rima-tde.net;CAT:NONE;SFS:(13230040)(1800799024)(376014)(82310400026)(36860700013);DIR:OUT;SFP:1102;
X-OriginatorOrg: technica-engineering.de
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 11:32:15.8124
(UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: 3c8f30d5-c72f-4964-9526-08dda35b7528
X-MS-Exchange-CrossTenant-Id: 1f04372a-6892-44e3-8f58-03845e1a70c1
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=1f04372a-6892-44e3-8f58-03845e1a70c1;Ip=[2.136.200.136];Helo=[jump.ad.technica-electronics.es]
X-MS-Exchange-CrossTenant-AuthSource:
DU2PEPF00028CFE.eurprd03.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB10142
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
From: Carlos Fernandez <carlos.fernandez@xxxxxxxxxxxxxxxxxxxxxxx>
According to 802.1AE standard, when ES and SC flags in TCI are zero,
used SCI should be the current active SC_RX. Current code uses the
header MAC address. Without this patch, when ES flag is 0 (using a
bridge or switch), header MAC will not fit the SCI and MACSec frames
will be discarted.
Fixes: c09440f7dcb3 ("macsec: introduce IEEE 802.1AE driver")
Co-developed-by: Andreu Montiel <Andreu.Montiel@xxxxxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Andreu Montiel <Andreu.Montiel@xxxxxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Carlos Fernandez <carlos.fernandez@xxxxxxxxxxxxxxxxxxxxxxx>
---
v2:
* Active sci lookup logic in a separate helper.
* Unnecessary loops avoided.
* Check RXSC is exactly one for lower device.
* Drops frame in case of error.
v1: https://patchwork.kernel.org/project/netdevbpf/patch/20250529124455.2761783-1-carlos.fernandez@xxxxxxxxxxxxxxxxxxxxxxx/#26409053
drivers/net/macsec.c | 36 +++++++++++++++++++++++++++++++-----
1 file changed, 31 insertions(+), 5 deletions(-)
diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c
index 3d315e30ee47..976927e715fd 100644
--- a/drivers/net/macsec.c
+++ b/drivers/net/macsec.c
@@ -247,15 +247,38 @@ static sci_t make_sci(const u8 *addr, __be16 port)
return sci;
}
-static sci_t macsec_frame_sci(struct macsec_eth_header *hdr, bool sci_present)
+static sci_t macsec_active_sci(struct macsec_secy *secy)
{
- sci_t sci;
+ struct macsec_rx_sc *rx_sc = rcu_dereference_bh(secy->rx_sc);
+
+ /* Case single RX SC */
+ if (rx_sc && !rcu_dereference_bh(rx_sc->next))
+ return (rx_sc->active) ? rx_sc->sci : 0;
+ /* Case no RX SC or multiple */
+ else
+ return 0;
+}
+
+static sci_t macsec_frame_sci(struct macsec_eth_header *hdr, bool sci_present,
+ struct macsec_rxh_data *rxd)
+{
+ struct macsec_dev *macsec;
+ sci_t sci = 0;
- if (sci_present)
+ /* SC = 1 */
+ if (sci_present) {
memcpy(&sci, hdr->secure_channel_id,
sizeof(hdr->secure_channel_id));
- else
+ /* SC = 0; ES = 0 */
+ } else if ((!(hdr->tci_an & (MACSEC_TCI_ES | MACSEC_TCI_SC))) &&
+ (list_is_singular(&rxd->secys))) {
+ /* Only one SECY should exist on this scenario */
+ macsec = list_first_or_null_rcu(&rxd->secys, struct macsec_dev, secys);
+ if (macsec)
+ return macsec_active_sci(&macsec->secy);
+ } else {
sci = make_sci(hdr->eth.h_source, MACSEC_PORT_ES);
+ }
return sci;
}
@@ -1156,11 +1179,14 @@ static rx_handler_result_t macsec_handle_frame(struct sk_buff **pskb)
macsec_skb_cb(skb)->has_sci = !!(hdr->tci_an & MACSEC_TCI_SC);
macsec_skb_cb(skb)->assoc_num = hdr->tci_an & MACSEC_AN_MASK;
- sci = macsec_frame_sci(hdr, macsec_skb_cb(skb)->has_sci);
rcu_read_lock();
rxd = macsec_data_rcu(skb->dev);
+ sci = macsec_frame_sci(hdr, macsec_skb_cb(skb)->has_sci, rxd);
+ if (!sci)
+ goto drop;
+
list_for_each_entry_rcu(macsec, &rxd->secys, secys) {
struct macsec_rx_sc *sc = find_rx_sc(&macsec->secy, sci);
--
2.43.0
Return-Path: <linux-kernel+bounces-673126-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 6B7C141E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:33:14 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 684327A3E11
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:31:54 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id F215328ECC1;
Wed, 4 Jun 2025 11:33:03 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="dOUSbhLf"
Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2088.outbound.protection.outlook.com [40.107.22.88])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1544D1E2848;
Wed, 4 Jun 2025 11:33:00 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.22.88
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749036783; cv=fail; b=nXitjbfkyYwErivzGfy7uUEd8SliozqG34tjN9tMudDVfEXah4mgjP8wPb5IYJ+tg+b7IeJz0ARpR8FXVtvRDK8THAFwpPdT9rpzv8TiIRBLl00Z3TiJ4ogtuQWEcpO556u7FDnDOYj+oC5cYsiJmbdjYNa7TY56wZt+TydcyY0=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749036783; c=relaxed/simple;
bh=EUgTjBA8mgSmMI7TRIn0vJOMo/SxMAmSEgWBgZUKQas=;
h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To:
Content-Type:MIME-Version; b=hXc8trOCCHQ+0l8pytm32sroGIGUi6l9z2SRpIzCokh1gHDAmHTNHeYEDg5FcGiuiEHubjjXy/Qr6Kz6yhkxzJu2SAEu9lDSqQ6C/XBa+BAZBKHWCsJ1l4sZZpx3ixw9mJJylgi2gdgs+gAhd32o38JEiYix0vczbMTs9sM78O0=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=dOUSbhLf; arc=fail smtp.client-ip=40.107.22.88
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=tgTj5w7ngrbLP+BuQ/YhMEFBKr/DdkHIK0uLVEhCr6wt/IC3vI6n9n1HhCUYg6TA+JfmB0xcChXNnt26hRx5hqEkfCeSk8uL2P9iL1kZrsMtLO9MS5smuPbdG5Yf06hpwZc/BC+mi0XoLspzCadinW9kOEH28SgdsZ1JpzuB5A3+Fbm5Dwm7FKlFutnq3Fg6vOZttqzLX8k/L5/3n4OYrlFrPX+WpCoJ5tP9/RIFoNiZjFSsYrw6a9vBwRQGz5c6iOlTSgqKHLXbK7/4A4kGHb2R2bTrDb3MxOvl/43JD1UF1TSYs3Uf/Fqc6fm9c+fa5y3BsLW8sBEHfDm0q1QnIA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=EUgTjBA8mgSmMI7TRIn0vJOMo/SxMAmSEgWBgZUKQas=;
b=tLgNj5LMp50b+w7hIFVrHCajm9BnYZYIlmalEyDqCLY+bp/hbMheZeS3EFyu8G2TZYkozdF++tTajzgTsaWQZHXw3hRnTgJNmbgqSrpkihZCblkthOsyr42rb1DkL3LWrILfjT1bcxcObicq9JBRIkgVE26+UE+oGYAbPm0y0vJ9/Fjx9GZau1dxWnWiPquJWEYzVuixsPN3vLicrsVF3zyoRpbjeNFXbRStP+48dUOHR+jqS4aESc7QNWaDAyEaSMw46r4x3gGV70bQRng13uvNxU51IwzPkj9hxOD0IizNk2Yfl3o599cEOaoBwtgCXjXNbDMCm1M4ysmIgK2/fg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass
header.d=nxp.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=EUgTjBA8mgSmMI7TRIn0vJOMo/SxMAmSEgWBgZUKQas=;
b=dOUSbhLfRz85lyX47XDXDD0riRh13bjC19MhnyXZaw4CW1vpykj5qiGDXmCE35on6ZlccaH+5fWp7sU/kM4q/GwacQAx8Pq1xXvcYpNu5UDPv6KBNTCL4HuibDmKAMLtJ96FqnBPSl3QpbEuApGG47AfAB0/pA0atWEIaFwhVa/BF/fgk8WJx/ylXg9miNLUUEx4Lu7Ds6yQmwkWFuEoc8aygT62g7i5SXgoaKnz29rpoFb011HeF36WOMnfCPTfdEY1yt+MwaxZEQEDu8KPQyHQfA0WlZ6CsDEDh6KSdL9Aze69Xj+3W8xpPCdmhN5enSfgx5glcDpo1XPtZaWjPA==
Received: from PAXPR04MB8510.eurprd04.prod.outlook.com (2603:10a6:102:211::7)
by AM8PR04MB7988.eurprd04.prod.outlook.com (2603:10a6:20b:24e::20) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8813.19; Wed, 4 Jun
2025 11:32:57 +0000
Received: from PAXPR04MB8510.eurprd04.prod.outlook.com
([fe80::a7c2:e2fa:8e04:40db]) by PAXPR04MB8510.eurprd04.prod.outlook.com
([fe80::a7c2:e2fa:8e04:40db%5]) with mapi id 15.20.8813.018; Wed, 4 Jun 2025
11:32:57 +0000
From: Wei Fang <wei.fang@xxxxxxx>
To: Arnd Bergmann <arnd@xxxxxxxxxx>, Vladimir Oltean <vladimir.oltean@xxxxxxx>
CC: Claudiu Manoil <claudiu.manoil@xxxxxxx>, Clark Wang
<xiaoning.wang@xxxxxxx>, "andrew+netdev@xxxxxxx" <andrew+netdev@xxxxxxx>,
"David S . Miller" <davem@xxxxxxxxxxxxx>, Eric Dumazet <edumazet@xxxxxxxxxx>,
Jakub Kicinski <kuba@xxxxxxxxxx>, Paolo Abeni <pabeni@xxxxxxxxxx>, Netdev
<netdev@xxxxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx"
<linux-kernel@xxxxxxxxxxxxxxx>, "imx@xxxxxxxxxxxxxxx" <imx@xxxxxxxxxxxxxxx>
Subject: RE: [PATCH net] net: enetc: fix the netc-lib driver build dependency
Thread-Topic: [PATCH net] net: enetc: fix the netc-lib driver build dependency
Thread-Index:
AQHb1Hg4llIxzk9mvU6olT1BgH8nCbPx58+AgABhlvCAAFEMAIAAHdiAgAAFhwCAACHfsA==
Date: Wed, 4 Jun 2025 11:32:57 +0000
Message-ID:
<PAXPR04MB8510DDEC9525F0D6DA6BA7DD886CA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20250603105056.4052084-1-wei.fang@xxxxxxx>
<20250603204501.2lcszfoiy5svbw6s@skbuf>
<PAXPR04MB85104C607BF23FFFD6663ABB886CA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
<b2068b86-dcbb-4fee-b091-4910e975a9b9@xxxxxxxxxxxxxxxx>
<20250604091111.oo2o2xd2zeqqisaf@skbuf>
<effd3e84-8aa7-4c06-ae36-effbf3b4f87d@xxxxxxxxxxxxxxxx>
In-Reply-To: <effd3e84-8aa7-4c06-ae36-effbf3b4f87d@xxxxxxxxxxxxxxxx>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=nxp.com;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: PAXPR04MB8510:EE_|AM8PR04MB7988:EE_
x-ms-office365-filtering-correlation-id: 59a68fbd-23a1-4355-ff8e-08dda35b8db7
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;ARA:13230040|376014|1800799024|366016|38070700018;
x-microsoft-antispam-message-info:
=?us-ascii?Q?o3zthYKq5NBjV9sNqray2VwAXTHjEBfBY6BorA9XqR8Rzg787BD3sWECxOSE?=
=?us-ascii?Q?pCGbV3/prn1k1qOBqpt33s3Utu4H/Bljuei59bx41I8gA4TCHatdO8j5TLSo?=
=?us-ascii?Q?P2dPgCMIKbF/6EYdRZpgpc2XO1Q8fWxkyhYgFmUc3ABFelh+XzdobY3uo0Wn?=
=?us-ascii?Q?3Lz+PMZpi1YfgMA00qMTKZyhnZlNSdK4SXL+IxVx0bS7i5ag63td9gY6nsIJ?=
=?us-ascii?Q?iS+elGy2SmcYGgoGvwB3D0QHcGOIZvyJwFBEVKi6iAW5cApRkgOmPXC7nYvv?=
=?us-ascii?Q?Kb5CyJOVCNRRj6xlRqj5vZ+8t6TTTJHQQ4xKCAVgRNhBISgwMwy8GHQKkWKw?=
=?us-ascii?Q?0QU4WXJD7vdOiOhesNi+Yf/uRpcieuBl3izrtxTL6DRxQGwmPRch2WJxnnlO?=
=?us-ascii?Q?vpbyjzdrycPBWCDtNa6tGXu8PheSr0WJM5hVbAPVWiFy8SGBNoRhm863I9PC?=
=?us-ascii?Q?53f6822+0h9ucEZKgXgP3sJYapKRxeE4uH3jrW3ZaAanLNFqfqL9wSk63Rj/?=
=?us-ascii?Q?ziPl26yFKvlfEUzDl1aOLmnu7P64YJwQrxrScaMx98QORTrG5v3wzTgcwVgq?=
=?us-ascii?Q?0cTN9+HF4iytXTUnVB/bY1/Y6JIYbtUJqKUHQO3nW9IzuV+B9cfNXldbng4L?=
=?us-ascii?Q?DntWUKBIeVxzz07PrqHg9I8jgHN1dtm048sqGQsbea3tG2zWsKN5ENM/SR1J?=
=?us-ascii?Q?0I/iyBb14eKQAcqVkIP33i9/ancA2H+g6mwuVNUI3qYfe2AvcgFysfGm332y?=
=?us-ascii?Q?p70RXx12QSTXvxWdfmMP5+G0r+Wcr7cKX8QCSisHhKk7/oheFaw8meTCVXs+?=
=?us-ascii?Q?2QqSXg76Dsi0lgaGSP3ruOGHRhbqhErusAAIhEe3sQERCd5lqUqed6B4fP9O?=
=?us-ascii?Q?1yLtnxYUIKT7KKrxdSmTW00lAkkKWm3aAw46ig90mUuFf4vl4gEIYurEZ3+s?=
=?us-ascii?Q?aJMSSgi+5Kye1Q5mgFb77gDyMFhkD86mX47TlyfR46jYJBOqKV5JOMLUguQE?=
=?us-ascii?Q?v2xaScipsxxq+S8uNftjtel0JvTdBk/C5Hoyxlth4syEeV1JY1jIR9kcphHz?=
=?us-ascii?Q?schKvTFGMvDabJ/ZY1tOYsFMjkgdZiCQkrCos1D4Fk8mjIbALypdzMXO5Hbf?=
=?us-ascii?Q?a5BCOBtwmivwHaoW/c+WJ+smm3h/B1PEsakL3xr9D20kH1cNDkdMi/m/LyWT?=
=?us-ascii?Q?i3KItJHfZMRG5SWTeX76/V5LHZv1ySBKheD7Kl1sXW+AXy880wOiC8mdEDWN?=
=?us-ascii?Q?4Gmx4GV4ULmcbjydshRVvtHf2jB22apJUopikfDQGx//kkW+AnduGdPBvi+5?=
=?us-ascii?Q?As6JNXF9TRvneF/UJOyc3YgyjPNVk7L/uVJHG+xhbbW3PAwowuwfUBMUWWIe?=
=?us-ascii?Q?7TkV2UMUpz2lsJ+dN29T1UU7lPsfqsBVxh+jrqpwMf6TW2fZBThi5i5rYFFj?=
=?us-ascii?Q?vLiKXgpzt4PiwNIUz6KnUZao1rXHl7suyhM2kWouaTe/EWYd9NC0zdGfaEoh?=
=?us-ascii?Q?3W1LLe8C9iPBG+M=3D?=
x-forefront-antispam-report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB8510.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(1800799024)(366016)(38070700018);DIR:OUT;SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0:
=?us-ascii?Q?HEPUS6MP4hZir6UG2zbhAyTICo3qwBvM683rLd8/9z3dbtTJ0s8dCmS8/CnH?=
=?us-ascii?Q?g+juGWRQy9QlVmBf6enCyGZBC8ffdA9iWz+DFIyEMuE5EcYJYGAdWYP7M20v?=
=?us-ascii?Q?MlOeqvs1Z/DWZ+gAMcnfroUhZ1tWbCDCcZVutFeDdyp1czgk89VBzZw05vu6?=
=?us-ascii?Q?2dqtT/teBA8MLHkrAzr6gWs8nsnrLb/PTXyhAKiDGVQokiZeNJi96IjifweG?=
=?us-ascii?Q?D795bn9GkSNkyLIKKHyoX+qMjdSfOHfGC8Uukb/YC9uJ6cGLIICCfG2jM/03?=
=?us-ascii?Q?cZfkQTduXaErfHoB2WPfsmU2OOv2bRs/zxpGI/+dyRVMU17RmQPsGQebEl/a?=
=?us-ascii?Q?s1usJ13dq2QK2N0ZW41X+hJCqeN3WCvnC3VmVAE2Qrx8HKEwpij3oh4kzgA2?=
=?us-ascii?Q?bBs1FlWjEF0esB1rJZupCBBq4yOgtCRbC8IW6QljgGE3y6tE7VrcMt7N/DGa?=
=?us-ascii?Q?eP2t7ne1HpaX+k6AJtusL6FwApPrc6ifX4EmMOqVF3h9DYiNNbV+KkW4cmE2?=
=?us-ascii?Q?m/AJrsVttAIy8v7jLe14O/8GTOlC06mYAvUH5KQzEDdWnLeC9xvvg7rrNFfC?=
=?us-ascii?Q?QawK7pTLtjclFp933E6sDBflq/Zwm1st9LBUrIuUrqxm+HgYqLSQQTJkxElR?=
=?us-ascii?Q?8MNSODkWZb0U70CoKUPYRDQw9DjmPnYRkyJh/IuibpI8VHmBQv8xXl95hjWL?=
=?us-ascii?Q?7yFcGz1luO3k2Oo1M7daWuVHxrQLDYb96H3IDbv9q6AGfRtGYcNBmM+xjq4z?=
=?us-ascii?Q?BypKXj07TxxOk8LOSQSJp1Mts2mbX6o9dR0FDnZQ6sW6We6KaDh6n8iz1clg?=
=?us-ascii?Q?YPRyxQSTzuqtizyJ+ciCUVbuH995mA4N3pal2MTmkatfIWv6t+KoOIFFoOgm?=
=?us-ascii?Q?4XRFWGNvPhKV4zXeUFCV6dCAihiAoxbW1+yEEKKuy/LsR2Yq5+T4bhXmEs7U?=
=?us-ascii?Q?8y3Zck2WF/MAGpgdVwBy4z20Htov/peoECGjHiW+lY5Pa5p3ny2i21MdkiHl?=
=?us-ascii?Q?YwP3v9QbC2/lTbTgoUzJa8tItzfI9Ii4rKXBfN+B2gilytSBPfPbplg89LKc?=
=?us-ascii?Q?oWSF0PHt75ORzU3E2fioFmjS9C7JJcmmaItgfYnD9GK6JtojKt67S2psY0b3?=
=?us-ascii?Q?hkUWw39vRy4cvLbBVSd+wSCLrD8OTJQbEcMAWG3lK5plmfP3JTq/xdODkSZQ?=
=?us-ascii?Q?JAp83b/a/ZNtxZDAoN9LA0FbKUDL40owEzISC8fzFOvE4wj38BXrZgJYeXP1?=
=?us-ascii?Q?YQcEFya3gdHalCMtaNkHHE7YwbIhfd5vpDDlYBWtGs5gZ0XClxgQ0DJfhEOd?=
=?us-ascii?Q?5w+AjHHjLjiR6uKB966DmwoV4PUlpJhIZ6hmW/it2uRQPHtxNKfxBoNAcryZ?=
=?us-ascii?Q?3J/0im0/4W5ugkAd6CCyHoJFxeS3bb88pIudjhygl9Yig8ZomHvkcRdKyApv?=
=?us-ascii?Q?y+Wx51XhbvNS07zS27Sw3q9KUQt8lwi5D4WtQA7jdc7l0F+9ITvYKhOCeEZq?=
=?us-ascii?Q?G8CvDsjddO9zCm5Msgt3O7JdAUnYw8ZRSSthxKlcEZK4gu7GsaEkq6uNRG27?=
=?us-ascii?Q?GA/SbTX4ORlrZqwZ76I=3D?=
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-OriginatorOrg: nxp.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8510.eurprd04.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 59a68fbd-23a1-4355-ff8e-08dda35b8db7
X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jun 2025 11:32:57.1097
(UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: 5/1UzBQ+vjPZHTn6CvQ61wamPoapX1BS9iVuQCE9d/fguJdeOBpFZdhx6NNflG1ZAmeAGUUxwzW5qmZS8VoHNw==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7988
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
> Thanks, this seems to be the best proposal thus far. IMO it is also
> easy to maintain and it also fully satisfies the imposed requirements.
> I checked that when FSL_ENETC_CORE goes to m, NXP_NETC_LIB also goes
> to m, and when it remains y, the latter also remains y. Note,
> FSL_ENETC_CORE only goes to m when all its selecters are m. More
> importantly, when NXP_ENETC4=3Dn, NXP_NETC_LIB is also n. The drivers
> seem to build in all cases.
>
> Will you send a patch with this proposal, or should Wei do it with a
> Suggested-by?
=20
I'd prefer Wei to send it as a tested patch with my Suggested-by.
I've also tested this version overnight on my randconfig build system.
=20
Thanks, I will improve the solution.
Return-Path: <linux-kernel+bounces-673127-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 6315041E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:33:43 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id F36843A5908
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:33:20 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id E715F28EA6E;
Wed, 4 Jun 2025 11:33:36 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="idg5KZnk"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 022C428D8D3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:33:33 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749036816; cv=none; b=WBRpd805zPfnn9V9ULkYRX0Zv4Z1HDpcPMzZ1ysKv4z06/R+35iT0iUrX3aUnL7h9SXPysOHgtxwGn+76FNJZlfCeQtt8nwy2niWbE3si4VjksGZCmVzFkNdwyttiQ4P8uvGNFVmdbos+faEtE+Pvv/UR584DBiARanKnBsUjNY=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749036816; c=relaxed/simple;
bh=ytUoKNC2WjKJEBNR5HZseYC55Rn/6amOPcLFGvmFVzI=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=H4XxtXU26rYOF57L6kienh0jiT+lQObZqNPoeJnFIh/4ODIGfaafXZMHWDXufFqs1HhVIPxp0UL8kX+V/jMR/Trk2H/obWTHSXiM0CZJFCtXuql979lzmQpzbwlk0aLA/+KRuNwH60jO7gEWsejI+UWVGqWJ982KX5zPebI34kM=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=idg5KZnk; arc=none smtp.client-ip=170.10.133.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749036812;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=MyQt2johQWtxMYuAwwY/HHR2S0j1U3CDI1ooJIdEYRU=;
b=idg5KZnkbJ2UvgbOL0ZUPKLZPK4GOscdsuGcTM9scVpP1pnRdnHBj+Jbg/SLX1/yzrbrHU
b9/Duy0N4BRr4JZk42UTIudlXdP+xis7AFRV4F1nTqNG6VSiN/ZzerWOlQfGMTDPRQMyyR
F6GkwFX2kVUyQnI4L70auTL3++xLkTQ=
Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com
[209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-298-hjJSICH3MK6IQLuuFrXc3A-1; Wed, 04 Jun 2025 07:33:31 -0400
X-MC-Unique: hjJSICH3MK6IQLuuFrXc3A-1
X-Mimecast-MFC-AGG-ID: hjJSICH3MK6IQLuuFrXc3A_1749036810
Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-450d290d542so37099235e9.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 04:33:31 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749036810; x=1749641610;
h=content-transfer-encoding:in-reply-to:organization:autocrypt
:content-language:from:references:cc:to:subject:user-agent
:mime-version:date:message-id:x-gm-message-state:from:to:cc:subject
:date:message-id:reply-to;
bh=MyQt2johQWtxMYuAwwY/HHR2S0j1U3CDI1ooJIdEYRU=;
b=lX52nodqz+MspQ0hl7GNEYlHJzcAS/Z4X5/IWqZhCVj2XPA1+9FnTRMWOcECuHMnMm
ChWKu1Qtj2FjVLq5G7gTK5TXsQiB5mfd/mNeeSUsec5QHAKv3zzmfn78/zbWnxFXhNSh
KDM6qLy55TqOrqi2F8OY3ZJcXbDkWidOzfw+9H2e8s6TsRS0EmwBB4AraHSvwtN/6CKX
3AQY8pisqj3q6vKIORWrCpV6s5fetj81lMW34ZBzjJ0rQ9tVYAPy+Zomq+7yOfgZIsdV
+BcqqBkl9KWEHYcAOopxOgwtVjqlOb0QWfprgz4h/H5EhmMuizBAq8eW7stAPo/2utJf
/syQ==
X-Forwarded-Encrypted: i=1; AJvYcCXfHEEwPlGE8eBHKh/agMFWGOH8QbLmdDlurCoFQ8ycXLmSt/2Jno1G59TvNtYXxKhuIjE93y7d2MxXig8=@vger.kernel.org
X-Gm-Message-State: AOJu0YxqzMnhLvmaUZ/tOM7vEYQv+t01/XogZViAsvyf+zrcbXa7OWiN
hrtQopE9YZ+ewp8au0HyiA7mleP1+YOE8G0tT75dRbzpvPxyyNUnNNxzbLAok/nw2T12DzcLqxa
zvkrTmqD9WYRT3au3g+VD6u9m0G4t25NCJLZ6FjOFjuQXvk36II2HLtbWgIUbHp2oGQ==
X-Gm-Gg: ASbGncvIyKj3Mh/+x9vLLE6ji8/Ty47vxyhLXdpPYh7pUzmpmSpHCAAWRgPn0TT+7wF
AeY7tHCYNSlVQn2UBXVX+gRwGAfE+LoqobIfHyJRKrryK4Mnnbcb7RdA70GzYmwQmoR1pPwpXlX
EONeHfxJ0t/ZHmFkwY8GwPTLku2SLSKB9b00md+gpGP0Fiy5q0CgZRAiM+RrKEE+/2VqU/tXQUc
mA2VKUnP5xRb8ZcDPL9NmzOoPGjHT/29z9vhKHU/+rPSIaVO2sq42lA8m2w9PCLKK3OLQHXWols
ttFuu8M2K85ClLEhNTUYzgwrngocN8PnfR/f3uMs23cyZuhbnaLeem/o20EOYhYAlLO8pKl/Uq7
DeDAFvLmg0wVRATh54a8mOKNYJXhbtrapp0elUB4=
X-Received: by 2002:a05:600c:c1c8:20b0:442:f4a3:b5f2 with SMTP id 5b1f17b1804b1-451f1680284mr11866515e9.6.1749036810425;
Wed, 04 Jun 2025 04:33:30 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IFqoVz0lYNaMYqWzIIYfW1H6uv753TnaSi4WlHH20770u7Q7XE9I797JmIASn0R6pSoBimJHg==
X-Received: by 2002:a05:600c:c1c8:20b0:442:f4a3:b5f2 with SMTP id 5b1f17b1804b1-451f1680284mr11866275e9.6.1749036810003;
Wed, 04 Jun 2025 04:33:30 -0700 (PDT)
Received: from ?IPV6:2003:d8:2f1b:b800:6fdb:1af2:4fbd:1fdf? (p200300d82f1bb8006fdb1af24fbd1fdf.dip0.t-ipconnect.de. [2003:d8:2f1b:b800:6fdb:1af2:4fbd:1fdf])
by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a4efe5b87csm21787067f8f.12.2025.06.04.04.33.29
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 04:33:29 -0700 (PDT)
Message-ID: <34584ae6-473d-4cf8-923c-3a8e7f16e8ad@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 13:33:28 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v4 1/3] mm,slub: Do not special case N_NORMAL nodes for
slab_nodes
To: Oscar Salvador <osalvador@xxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Vlastimil Babka <vbabka@xxxxxxx>,
Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>,
Harry Yoo <harry.yoo@xxxxxxxxxx>, Rakie Kim <rakie.kim@xxxxxx>,
Hyeonggon Yoo <42.hyeyoo@xxxxxxxxx>, linux-mm@xxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
References: <20250603110850.192912-1-osalvador@xxxxxxx>
<20250603110850.192912-2-osalvador@xxxxxxx>
From: David Hildenbrand <david@xxxxxxxxxx>
Content-Language: en-US
Autocrypt: addr=david@xxxxxxxxxx; keydata=
xsFNBFXLn5EBEAC+zYvAFJxCBY9Tr1xZgcESmxVNI/0ffzE/ZQOiHJl6mGkmA1R7/uUpiCjJ
dBrn+lhhOYjjNefFQou6478faXE6o2AhmebqT4KiQoUQFV4R7y1KMEKoSyy8hQaK1umALTdL
QZLQMzNE74ap+GDK0wnacPQFpcG1AE9RMq3aeErY5tujekBS32jfC/7AnH7I0v1v1TbbK3Gp
XNeiN4QroO+5qaSr0ID2sz5jtBLRb15RMre27E1ImpaIv2Jw8NJgW0k/D1RyKCwaTsgRdwuK
Kx/Y91XuSBdz0uOyU/S8kM1+ag0wvsGlpBVxRR/xw/E8M7TEwuCZQArqqTCmkG6HGcXFT0V9
PXFNNgV5jXMQRwU0O/ztJIQqsE5LsUomE//bLwzj9IVsaQpKDqW6TAPjcdBDPLHvriq7kGjt
WhVhdl0qEYB8lkBEU7V2Yb+SYhmhpDrti9Fq1EsmhiHSkxJcGREoMK/63r9WLZYI3+4W2rAc
UucZa4OT27U5ZISjNg3Ev0rxU5UH2/pT4wJCfxwocmqaRr6UYmrtZmND89X0KigoFD/XSeVv
jwBRNjPAubK9/k5NoRrYqztM9W6sJqrH8+UWZ1Idd/DdmogJh0gNC0+N42Za9yBRURfIdKSb
B3JfpUqcWwE7vUaYrHG1nw54pLUoPG6sAA7Mehl3nd4pZUALHwARAQABzSREYXZpZCBIaWxk
ZW5icmFuZCA8ZGF2aWRAcmVkaGF0LmNvbT7CwZgEEwEIAEICGwMGCwkIBwMCBhUIAgkKCwQW
AgMBAh4BAheAAhkBFiEEG9nKrXNcTDpGDfzKTd4Q9wD/g1oFAl8Ox4kFCRKpKXgACgkQTd4Q
9wD/g1oHcA//a6Tj7SBNjFNM1iNhWUo1lxAja0lpSodSnB2g4FCZ4R61SBR4l/psBL73xktp
rDHrx4aSpwkRP6Epu6mLvhlfjmkRG4OynJ5HG1gfv7RJJfnUdUM1z5kdS8JBrOhMJS2c/gPf
wv1TGRq2XdMPnfY2o0CxRqpcLkx4vBODvJGl2mQyJF/gPepdDfcT8/PY9BJ7FL6Hrq1gnAo4
3Iv9qV0JiT2wmZciNyYQhmA1V6dyTRiQ4YAc31zOo2IM+xisPzeSHgw3ONY/XhYvfZ9r7W1l
pNQdc2G+o4Di9NPFHQQhDw3YTRR1opJaTlRDzxYxzU6ZnUUBghxt9cwUWTpfCktkMZiPSDGd
KgQBjnweV2jw9UOTxjb4LXqDjmSNkjDdQUOU69jGMUXgihvo4zhYcMX8F5gWdRtMR7DzW/YE
BgVcyxNkMIXoY1aYj6npHYiNQesQlqjU6azjbH70/SXKM5tNRplgW8TNprMDuntdvV9wNkFs
9TyM02V5aWxFfI42+aivc4KEw69SE9KXwC7FSf5wXzuTot97N9Phj/Z3+jx443jo2NR34XgF
89cct7wJMjOF7bBefo0fPPZQuIma0Zym71cP61OP/i11ahNye6HGKfxGCOcs5wW9kRQEk8P9
M/k2wt3mt/fCQnuP/mWutNPt95w9wSsUyATLmtNrwccz63XOwU0EVcufkQEQAOfX3n0g0fZz
Bgm/S2zF/kxQKCEKP8ID+Vz8sy2GpDvveBq4H2Y34XWsT1zLJdvqPI4af4ZSMxuerWjXbVWb
T6d4odQIG0fKx4F8NccDqbgHeZRNajXeeJ3R7gAzvWvQNLz4piHrO/B4tf8svmRBL0ZB5P5A
2uhdwLU3NZuK22zpNn4is87BPWF8HhY0L5fafgDMOqnf4guJVJPYNPhUFzXUbPqOKOkL8ojk
CXxkOFHAbjstSK5Ca3fKquY3rdX3DNo+EL7FvAiw1mUtS+5GeYE+RMnDCsVFm/C7kY8c2d0G
NWkB9pJM5+mnIoFNxy7YBcldYATVeOHoY4LyaUWNnAvFYWp08dHWfZo9WCiJMuTfgtH9tc75
7QanMVdPt6fDK8UUXIBLQ2TWr/sQKE9xtFuEmoQGlE1l6bGaDnnMLcYu+Asp3kDT0w4zYGsx
5r6XQVRH4+5N6eHZiaeYtFOujp5n+pjBaQK7wUUjDilPQ5QMzIuCL4YjVoylWiBNknvQWBXS
lQCWmavOT9sttGQXdPCC5ynI+1ymZC1ORZKANLnRAb0NH/UCzcsstw2TAkFnMEbo9Zu9w7Kv
AxBQXWeXhJI9XQssfrf4Gusdqx8nPEpfOqCtbbwJMATbHyqLt7/oz/5deGuwxgb65pWIzufa
N7eop7uh+6bezi+rugUI+w6DABEBAAHCwXwEGAEIACYCGwwWIQQb2cqtc1xMOkYN/MpN3hD3
AP+DWgUCXw7HsgUJEqkpoQAKCRBN3hD3AP+DWrrpD/4qS3dyVRxDcDHIlmguXjC1Q5tZTwNB
boaBTPHSy/Nksu0eY7x6HfQJ3xajVH32Ms6t1trDQmPx2iP5+7iDsb7OKAb5eOS8h+BEBDeq
3ecsQDv0fFJOA9ag5O3LLNk+3x3q7e0uo06XMaY7UHS341ozXUUI7wC7iKfoUTv03iO9El5f
XpNMx/YrIMduZ2+nd9Di7o5+KIwlb2mAB9sTNHdMrXesX8eBL6T9b+MZJk+mZuPxKNVfEQMQ
a5SxUEADIPQTPNvBewdeI80yeOCrN+Zzwy/Mrx9EPeu59Y5vSJOx/z6OUImD/GhX7Xvkt3kq
Er5KTrJz3++B6SH9pum9PuoE/k+nntJkNMmQpR4MCBaV/J9gIOPGodDKnjdng+mXliF3Ptu6
3oxc2RCyGzTlxyMwuc2U5Q7KtUNTdDe8T0uE+9b8BLMVQDDfJjqY0VVqSUwImzTDLX9S4g/8
kC4HRcclk8hpyhY2jKGluZO0awwTIMgVEzmTyBphDg/Gx7dZU1Xf8HFuE+UZ5UDHDTnwgv7E
th6RC9+WrhDNspZ9fJjKWRbveQgUFCpe1sa77LAw+XFrKmBHXp9ZVIe90RMe2tRL06BGiRZr
jPrnvUsUUsjRoRNJjKKA/REq+sAnhkNPPZ/NNMjaZ5b8Tovi8C0tmxiCHaQYqj7G2rgnT0kt
WNyWQQ==
Organization: Red Hat
In-Reply-To: <20250603110850.192912-2-osalvador@xxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 03.06.25 13:08, Oscar Salvador wrote:
Currently, slab_mem_going_going_callback() checks whether the node has
N_NORMAL memory in order to be set in slab_nodes.
While it is true that gettind rid of that enforcing would mean
ending up with movables nodes in slab_nodes, the memory waste that comes
with that is negligible.
So stop checking for status_change_nid_normal and just use status_change_nid
instead which works for both types of memory.
Also, once we allocate the kmem_cache_node cache for the node in
slab_mem_online_callback(), we never deallocate it in
slab_mem_off_callback() when the node goes memoryless, so we can just
get rid of it.
The side effects are that we will stop clearing the node from slab_nodes,
and also that newly created kmem caches after node hotremove will now allocate
their kmem_cache_node for the node(s) that was hotremoved, but these
should be negligible.
Suggested-by: David Hildenbrand <david@xxxxxxxxxx>
Signed-off-by: Oscar Salvador <osalvador@xxxxxxx>
Reviewed-by: Vlastimil Babka <vbabka@xxxxxxx>
---
Acked-by: David Hildenbrand <david@xxxxxxxxxx>
--
Cheers,
David / dhildenb
Return-Path: <linux-kernel+bounces-673128-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 967CF41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:35:16 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id A6A5C175941
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:35:17 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 00C8828ECCB;
Wed, 4 Jun 2025 11:35:11 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kyS8n5/l"
Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 06CC928EA4F;
Wed, 4 Jun 2025 11:35:08 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.47
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749036910; cv=none; b=l1iYbZegW8mzxUYBWm1NiH8uNfr4moKxSc9Q2cMfnbP4s7prmRjRPKzvKdvykNfw3G09/dpXjq0lgUuPWL5TtxhbUiSneJEuSKdFU84Oyw9sV/CzL2JuuPVF91LQDVqt5yVX7Vu6kuRvDxoAVi8Vj9VtvhsNh7vBG5EbBGb64WU=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749036910; c=relaxed/simple;
bh=eC4zQahnbIG0zimMI3qqobsDEY2WS5TdQDTeDCRi8Wg=;
h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
To:Cc:Content-Type; b=REzUZ3p4Z1I+TJ6U//25S21s0Wi08z2xX3AhZZ01Bh9jv9ExSGJP7aFN2WDcefIq1bc0+CvjE7mn16KU+HsQ5nYjtr7DVp5ZuscpLTKHxk1Hj6gix34ryhaJfanJvbr/NOgS7FDG/oPl3b/X1VUG2wsmAdA6t41a44Zf7Uk9LIs=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=kyS8n5/l; arc=none smtp.client-ip=209.85.216.47
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
Received: by mail-pj1-f47.google.com with SMTP id 98e67ed59e1d1-311ef4fb43dso5075431a91.3;
Wed, 04 Jun 2025 04:35:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1749036908; x=1749641708; darn=vger.kernel.org;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:from:to:cc:subject:date
:message-id:reply-to;
bh=eC4zQahnbIG0zimMI3qqobsDEY2WS5TdQDTeDCRi8Wg=;
b=kyS8n5/lFtYIhTAfZj8SKO86ZbmOe1vveEClx6G79N+BpGpfx4T/v9MclbaJfNIitZ
m5J/7rXMH3pHbn8ZPVunvsxi/o69ArBrlyQWgvl/trAqwmHjkkUzmWJ9KTXElG9iKHEz
mD96tQCQLtUbZRRMTZ4+xhMuFj4pz6Dpdi/o/z3JhbDiftt2nd9riQTiKveMYq1jPTSc
jgQtf6/jKhfJPx4Dvu1M/y6st/nsczNpqaWWWJC3qYGciCATdq2N1xsQe+Br86x7A7ob
eW5zv44y1FAn4RNIR8eT/8Cdp1tdP7vKWq1xok1Q1lEgxSxLcRJYTX+awNJ2qCZ6Y6H7
biCA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749036908; x=1749641708;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=eC4zQahnbIG0zimMI3qqobsDEY2WS5TdQDTeDCRi8Wg=;
b=MTTMsdi/0hEISF1/HvQCS8j2UyVoLXJO/jT1x0Lr0orrNQDt9NAwb1rUPvOvH1Qjwo
zkfttrQoQEujCU+ip3XF+lECfDb7q7i5U3AKWNexcVd4xyy7e1xd03qajnl2IwXafQgy
bXA1UP0EZXUPRpG2AHhzsEYVDawsY5iFyvqq/LB18V9H4mBcH4WaUlR+UyQqzP7fgROW
7dMzlgmfCrvQaGD9+oFw7CsN9e4oBut+fAMbN4it+km4ExFFZkOaVTgwXxUGKf+ma4oV
+RcXM4E141DUsrmy+K7AJkZsffgEytrzln5SIjgiu3P+UdEnjHkvAChr/5izLMa6EHi0
RINw==
X-Forwarded-Encrypted: i=1; AJvYcCU4uVmfyIZ7I9MWw9we7mqGZUTbEDXPF1al8voOiD/a7un9yR5Rhqy950NfyriNx8gOl9wmu1jf74aNg/nVmowVTg==@vger.kernel.org, AJvYcCWq4VLa03IIpLujgkyOPVZxYwDC66qUcKhLWzU+leUgAtk3UfSZNpeIemwWrLqPm9n6CXyPYOYdZ6vv@xxxxxxxxxxxxxxx, AJvYcCXGKqfWC7o9qVBsM44WS5cZCzCjJISS9pb4S1as2vH6cN5U4ZxzoJgF9nozxgfF8BUGmVQxNLIisENP9EB7@xxxxxxxxxxxxxxx
X-Gm-Message-State: AOJu0Yw67XfbOJhwMbtWlXsbssjOdAOHc9xXGmm3LUitC1t/773xTXzB
uHo3rYURUyTfmXdWrUaDmO3VjzuyAUVFUqLrnYqtFAzb6KyRu4UXRuN+xLMHQfZ+tvkDsRMs+be
BNHjyjmuR5TgHVwKDx6BRzxsAB1mYDFE=
X-Gm-Gg: ASbGncu00tRfkOo2SYyA5bNoT1tRMAUn7joYpgSRLBbwXapO+RIOtbI/Jm60h8UJLlK
6MPrShH8kr9kd4z2EARjkL9jftDzQnEuaYigNezJj5LqGhbT3XoDe0Ebq8SM7YCpBYo1e2KNeUK
PAnLMXrUlWaONGeJcvpp5gTuMURRxmZA==
X-Google-Smtp-Source: AGHT+IGwIGTmxieNXznAoBW8LEiVl/ryKLqB13xhYIunkErEyJpECY1o6OzL5PMiS9fUTOhNK6TrQ2RtqRozCxKlADg=
X-Received: by 2002:a17:90b:390c:b0:311:a561:86f3 with SMTP id
98e67ed59e1d1-3130ccf65dcmr3679787a91.6.1749036908156; Wed, 04 Jun 2025
04:35:08 -0700 (PDT)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
References: <20250604-imx95-rproc-1-v1-0-a6e5f512731c@xxxxxxx> <20250604-imx95-rproc-1-v1-3-a6e5f512731c@xxxxxxx>
In-Reply-To: <20250604-imx95-rproc-1-v1-3-a6e5f512731c@xxxxxxx>
From: Daniel Baluta <daniel.baluta@xxxxxxxxx>
Date: Wed, 4 Jun 2025 14:37:04 +0300
X-Gm-Features: AX0GCFuTyob7yQ_CjnB1akDwMMdIK7thx9Xx1AgvnXPVg4AWe6fnJ67XkMM0Idc
Message-ID: <CAEnQRZAm_-zr6W4KffXCjzWqBZ2G8TYmMvgF_ABPWhTZNNZGbQ@xxxxxxxxxxxxxx>
Subject: Re: [PATCH 3/3] remoteproc: imx_rproc: Add support for i.MX95
To: "Peng Fan (OSS)" <peng.fan@xxxxxxxxxxx>
Cc: Bjorn Andersson <andersson@xxxxxxxxxx>, Mathieu Poirier <mathieu.poirier@xxxxxxxxxx>,
Rob Herring <robh@xxxxxxxxxx>, Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>,
Shawn Guo <shawnguo@xxxxxxxxxx>, Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>,
Pengutronix Kernel Team <kernel@xxxxxxxxxxxxxx>, Fabio Estevam <festevam@xxxxxxxxx>,
Iuliana Prodan <iuliana.prodan@xxxxxxx>, Daniel Baluta <daniel.baluta@xxxxxxx>,
linux-remoteproc@xxxxxxxxxxxxxxx, devicetree@xxxxxxxxxxxxxxx,
imx@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, Peng Fan <peng.fan@xxxxxxx>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 4, 2025 at 5:37=E2=80=AFAM Peng Fan (OSS) <peng.fan@xxxxxxxxxxx=
wrote:
From: Peng Fan <peng.fan@xxxxxxx>
Add imx_rproc_cfg_imx95_m7 and address(TCM and DDR) mapping
Add i.MX95 of_device_id entry
Signed-off-by: Peng Fan <peng.fan@xxxxxxx>
Reviewed-by: Daniel Baluta <daniel.baluta@xxxxxxx>
Return-Path: <linux-kernel+bounces-673129-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id A061841E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:35:37 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 3253A177125
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:35:38 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id D75D028ECD7;
Wed, 4 Jun 2025 11:35:28 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="byI6xZ56"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0C77028EA6D;
Wed, 4 Jun 2025 11:35:27 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749036928; cv=none; b=HlbYhZHfdS2QFUCSsc8JWiu4FUj4svfM0J/FeGKs/zWmei3xIVo6/MrqzfyBIVoQ7vkOOgTNpnDDWl4WIZxSgl2JbtiMu0uokm+mfy6iiB6gsUq4nqYQGj4JbxFR8qiwd9oiBFZCMu9p/0Z15ByPx2S6vGXiqIEh/m/i+mF76LM=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749036928; c=relaxed/simple;
bh=wXSTBOc9hfPvgHW6k38UqyP60yWHejz7Bu4vESAaYGk=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=tw2KvT8JJ6dXxxrEU8fGv0UpagKTU2gHzDPzLJvqXk+F13YJKzkBRpV9QX03M8/btwlHuF4pOQ7g4cRI/PRP5XoJ3BK2iYa9DiY38GxGZU3q+mh1y2vjQS4vJUHGZfHigu9QajAhZe1BdhIsjxAIY1WFq2pQ2+LHDJH92WrYUAQ=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=byI6xZ56; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6247CC4CEE7;
Wed, 4 Jun 2025 11:35:24 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749036927;
bh=wXSTBOc9hfPvgHW6k38UqyP60yWHejz7Bu4vESAaYGk=;
h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
b=byI6xZ56+XQ73QaQFzVyf3xS+xcl4WnFhC/Yo9S8+yMrqTI4Tje/ARheZJsjWSCo4
eiAMaihUpAUlyLoo7oRPmdDK1iXVNdFUQ5hUh4Q8Vpcy1EP/viiRDFSudIa2c6ao8U
y71BzzlcWn1e9GRCjG6jbztgcYfhv0Pf5vpDSkQHdzNarlQgEBFiusi23mznCKwtqE
iEJRvZNtc56L6zyNxnPw/2/AfvOIY5mIOAdWyVg8H0wlHbbzf8jFb08t3oTz7ALID/
QbdpU4UhBjYKGyUB2RGa71VkswRBtb7OZRyXzzvEWepJN5sl4PHAJUA0/xQ3Dngxjt
/HNxqs4IaZx1A==
Date: Wed, 4 Jun 2025 12:35:21 +0100
From: Mark Brown <broonie@xxxxxxxxxx>
To: samuel.kayode@xxxxxxxxxxxxxxxxxxxx
Cc: Lee Jones <lee@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>,
Liam Girdwood <lgirdwood@xxxxxxxxx>,
Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>,
Sebastian Reichel <sre@xxxxxxxxxx>, devicetree@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-input@xxxxxxxxxxxxxxx,
linux-pm@xxxxxxxxxxxxxxx, Abel Vesa <abelvesa@xxxxxxxxxx>,
Abel Vesa <abelvesa@xxxxxxxxx>, Robin Gong <b38343@xxxxxxxxxxxxx>,
Enric Balletbo i Serra <eballetbo@xxxxxxxxx>
Subject: Re: [PATCH v4 3/6] regulator: pf1550: add support for regulator
Message-ID: <eb1fb4e2-42aa-4795-bc6c-dbcf1fa04f11@xxxxxxxxxxxxx>
References: <20250603-pf1550-v4-0-bfdf51ee59cc@xxxxxxxxxxxxxxxxxxxx>
<20250603-pf1550-v4-3-bfdf51ee59cc@xxxxxxxxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512;
protocol="application/pgp-signature"; boundary="7ow0kNdE51Zb6Qp/"
Content-Disposition: inline
In-Reply-To: <20250603-pf1550-v4-3-bfdf51ee59cc@xxxxxxxxxxxxxxxxxxxx>
X-Cookie: Non-sequiturs make me eat lampshades.
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
--7ow0kNdE51Zb6Qp/
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Tue, Jun 03, 2025 at 02:27:47PM -0400, Samuel Kayode via B4 Relay wrote:
+static int pf1550_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay)
+{
+ int id = rdev_get_id(rdev);
+ unsigned int ramp_bits = 0;
+ int ret;
+
+ if (id > PF1550_VREFDDR)
+ return -EACCES;
+
+ if (ramp_delay > 0) {
+ ramp_delay = 6250 / ramp_delay;
+ ramp_bits = ramp_delay >> 1;
+ }
I'm not seeing validation of the maximum ramp_delay value here?
+ switch (irq_type) {
+ case PF1550_PMIC_IRQ_SW1_LS:
+ event = REGULATOR_EVENT_OVER_CURRENT;
+ case PF1550_PMIC_IRQ_SW1_HS:
+ event = REGULATOR_EVENT_OVER_CURRENT;
+ case PF1550_PMIC_IRQ_LDO1_FAULT:
+ event = REGULATOR_EVENT_OVER_CURRENT;
You appear to be flagging all these events as over current events which
doesn't seem entirely plausible.
--7ow0kNdE51Zb6Qp/
Content-Type: application/pgp-signature; name="signature.asc"
-----BEGIN PGP SIGNATURE-----
iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmhAL3gACgkQJNaLcl1U
h9BP0gf7BQBYj/vVLKsA5wseOvzZSYmWZEKxie9t4vNLf1wwUtWrL8QpfAW6AMuA
zTuTdnQpclS9lZMHtfcdUfLpgEma4S59VuiMDIt7EcjE16R7NvjFppzaRG+rSLHG
EsaPxW4w2VV7m+oLjGKTMJYxFpBbcldcwNgXKlLsSPnC/tY2x7x1jymSJYuZ93UX
Z13o6DQjL+9Ku3brZKjPubVwnAnUU8/hY5W9gbNj+Q1yZHReSwNU2Rbre4qOxCRJ
YsRk1x4xVMcD8E9xDK3iNpk+1Uf3aC2heiSRy2k1tpNCR9AKYqH+pJ3FN61Xc/QP
cIetZ86IqOH4t8q/Y6lLqNCxEE526A==
=7Ooj
-----END PGP SIGNATURE-----
--7ow0kNdE51Zb6Qp/--
Return-Path: <linux-kernel+bounces-673130-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 3CA2941E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:37:36 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 5CF19176FE9
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:37:37 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 8791528ECDD;
Wed, 4 Jun 2025 11:37:27 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qIoi8EPi"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id AA2A520F063;
Wed, 4 Jun 2025 11:37:26 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749037046; cv=none; b=W+WVekBfxm4fTxYVU0VKJVTzokDEnX4H+i9XINx/QBrtmXv8su2InRFFsKc4p0cGHmfMeYKyJqNzxOefJdlWBROPQtPhmMXzZfG6bM5n3AsOBkkWNWh5RIbztjE9mWFUhk3lcsA9oa0+VDzNPKb1TXbIy7x4DGkT5OBHGJh60Gs=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749037046; c=relaxed/simple;
bh=/03g7ApDlfWnALDbvW9C24ZKhfHyWDmZKHy+HvjP5Qk=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=d0c6VFgo7OpT6whP9TWjuzbk97lM/3aiX6nJiePM3RH2dO6b7mvwatzKRwbCWC0j9DW7ciikBMVSaElwycg1TXu+jMldwHKVrrsq6m3aXEDtnKxCRvm0JWb+JE9glNV/wMDHBOBmNP/cX5OJWOov1IRGc1jEYOxaend+jWm/gWw=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qIoi8EPi; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2A2A2C4CEE7;
Wed, 4 Jun 2025 11:36:11 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749037046;
bh=/03g7ApDlfWnALDbvW9C24ZKhfHyWDmZKHy+HvjP5Qk=;
h=Date:Subject:To:Cc:References:From:In-Reply-To:From;
b=qIoi8EPiVCeeIexPhQzxhsbNDeV5+YFZeBaPeV5UumRWr9GtbNhTLbr9C+wydFENz
kx1Bk1bq4zm83ioW3wVCZbXsRa/AYyJkrpcbkofIxaV046FsBlVCVOjG5zwuKxrKWg
Q5cnbbIsYHeuBgqgka3xaqIVpWszSXMkEPElqYHtNpWDN0oAqYRV2zQQqjHmC/Oinu
gwQMU127tE9uAPWBsqyLdBF8+gmyjO691efkCoiH40kMf9V2xONBIvoYmeX0Y+ZlQp
hul+qlP+DDye4hqg1yMLE80B0qUja2/ms3Y2DZROrh4Nuih5iF1v2mi6VgvT4PsDK6
4Ww672m79RfYg==
Message-ID: <9089f618-0df1-4710-8158-36f58c94a0c6@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 13:36:05 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v1 2/4] dt-bindings: PCI: qcom,pcie-sa8775p: document
link_down reset
To: Qiang Yu <quic_qianyu@xxxxxxxxxxx>,
Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>,
Ziyue Zhang <quic_ziyuzhan@xxxxxxxxxxx>
Cc: lpieralisi@xxxxxxxxxx, kwilczynski@xxxxxxxxxx,
manivannan.sadhasivam@xxxxxxxxxx, robh@xxxxxxxxxx, bhelgaas@xxxxxxxxxx,
krzk+dt@xxxxxxxxxx, neil.armstrong@xxxxxxxxxx, abel.vesa@xxxxxxxxxx,
kw@xxxxxxxxx, conor+dt@xxxxxxxxxx, vkoul@xxxxxxxxxx, kishon@xxxxxxxxxx,
andersson@xxxxxxxxxx, konradybcio@xxxxxxxxxx, linux-arm-msm@xxxxxxxxxxxxxxx,
linux-pci@xxxxxxxxxxxxxxx, linux-phy@xxxxxxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
quic_krichai@xxxxxxxxxxx, quic_vbadigan@xxxxxxxxxxx
References: <20250529035416.4159963-1-quic_ziyuzhan@xxxxxxxxxxx>
<20250529035416.4159963-3-quic_ziyuzhan@xxxxxxxxxxx>
<drr7cngryldptgzbmac7l2xpryugbrnydke3alq5da2mfvmgm5@nwjsqkef7ypc>
<e8d1b60c-97fe-4f50-8ead-66711f1aa3a7@xxxxxxxxxxx>
<34dnpaz3gl5jctcohh5kbf4arijotpdlxn2eze3oixrausyev3@4qso3qg5zn4t>
<43a6e141-adab-42e9-9966-ec54cb91a6de@xxxxxxxxxxx>
From: Krzysztof Kozlowski <krzk@xxxxxxxxxx>
Content-Language: en-US
Autocrypt: addr=krzk@xxxxxxxxxx; keydata=
xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79
cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu
JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH
gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE
J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj
NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS
BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU
vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM
Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD
TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzSVLcnp5c3p0b2Yg
S296bG93c2tpIDxrcnprQGtlcm5lbC5vcmc+wsGVBBMBCgA/AhsDBgsJCAcDAgYVCAIJCgsE
FgIDAQIeAQIXgBYhBJvQfg4MUfjVlne3VBuTQ307QWKbBQJoF1BKBQkWlnSaAAoJEBuTQ307
QWKbHukP/3t4tRp/bvDnxJfmNdNVn0gv9ep3L39IntPalBFwRKytqeQkzAju0whYWg+R/rwp
+r2I1Fzwt7+PTjsnMFlh1AZxGDmP5MFkzVsMnfX1lGiXhYSOMP97XL6R1QSXxaWOpGNCDaUl
ajorB0lJDcC0q3xAdwzRConxYVhlgmTrRiD8oLlSCD5baEAt5Zw17UTNDnDGmZQKR0fqLpWy
786Lm5OScb7DjEgcA2PRm17st4UQ1kF0rQHokVaotxRM74PPDB8bCsunlghJl1DRK9s1aSuN
hL1Pv9VD8b4dFNvCo7b4hfAANPU67W40AaaGZ3UAfmw+1MYyo4QuAZGKzaP2ukbdCD/DYnqi
tJy88XqWtyb4UQWKNoQqGKzlYXdKsldYqrLHGoMvj1UN9XcRtXHST/IaLn72o7j7/h/Ac5EL
8lSUVIG4TYn59NyxxAXa07Wi6zjVL1U11fTnFmE29ALYQEXKBI3KUO1A3p4sQWzU7uRmbuxn
naUmm8RbpMcOfa9JjlXCLmQ5IP7Rr5tYZUCkZz08LIfF8UMXwH7OOEX87Y++EkAB+pzKZNNd
hwoXulTAgjSy+OiaLtuCys9VdXLZ3Zy314azaCU3BoWgaMV0eAW/+gprWMXQM1lrlzvwlD/k
whyy9wGf0AEPpLssLVt9VVxNjo6BIkt6d1pMg6mHsUEVzsFNBFVDXDQBEADNkrQYSREUL4D3
Gws46JEoZ9HEQOKtkrwjrzlw/tCmqVzERRPvz2Xg8n7+HRCrgqnodIYoUh5WsU84N03KlLue
MNsWLJBvBaubYN4JuJIdRr4dS4oyF1/fQAQPHh8Thpiz0SAZFx6iWKB7Qrz3OrGCjTPcW6ei
OMheesVS5hxietSmlin+SilmIAPZHx7n242u6kdHOh+/SyLImKn/dh9RzatVpUKbv34eP1wA
GldWsRxbf3WP9pFNObSzI/Bo3kA89Xx2rO2roC+Gq4LeHvo7ptzcLcrqaHUAcZ3CgFG88CnA
6z6lBZn0WyewEcPOPdcUB2Q7D/NiUY+HDiV99rAYPJztjeTrBSTnHeSBPb+qn5ZZGQwIdUW9
YegxWKvXXHTwB5eMzo/RB6vffwqcnHDoe0q7VgzRRZJwpi6aMIXLfeWZ5Wrwaw2zldFuO4Dt
91pFzBSOIpeMtfgb/Pfe/a1WJ/GgaIRIBE+NUqckM+3zJHGmVPqJP/h2Iwv6nw8U+7Yyl6gU
BLHFTg2hYnLFJI4Xjg+AX1hHFVKmvl3VBHIsBv0oDcsQWXqY+NaFahT0lRPjYtrTa1v3tem/
JoFzZ4B0p27K+qQCF2R96hVvuEyjzBmdq2esyE6zIqftdo4MOJho8uctOiWbwNNq2U9pPWmu
4vXVFBYIGmpyNPYzRm0QPwARAQABwsF8BBgBCgAmAhsMFiEEm9B+DgxR+NWWd7dUG5NDfTtB
YpsFAmgXUF8FCRaWWyoACgkQG5NDfTtBYptO0w//dlXJs5/42hAXKsk+PDg3wyEFb4NpyA1v
qmx7SfAzk9Hf6lWwU1O6AbqNMbh6PjEwadKUk1m04S7EjdQLsj/MBSgoQtCT3MDmWUUtHZd5
RYIPnPq3WVB47GtuO6/u375tsxhtf7vt95QSYJwCB+ZUgo4T+FV4hquZ4AsRkbgavtIzQisg
Dgv76tnEv3YHV8Jn9mi/Bu0FURF+5kpdMfgo1sq6RXNQ//TVf8yFgRtTUdXxW/qHjlYURrm2
H4kutobVEIxiyu6m05q3e9eZB/TaMMNVORx+1kM3j7f0rwtEYUFzY1ygQfpcMDPl7pRYoJjB
dSsm0ZuzDaCwaxg2t8hqQJBzJCezTOIkjHUsWAK+tEbU4Z4SnNpCyM3fBqsgYdJxjyC/tWVT
AQ18NRLtPw7tK1rdcwCl0GFQHwSwk5pDpz1NH40e6lU+NcXSeiqkDDRkHlftKPV/dV+lQXiu
jWt87ecuHlpL3uuQ0ZZNWqHgZoQLXoqC2ZV5KrtKWb/jyiFX/sxSrodALf0zf+tfHv0FZWT2
zHjUqd0t4njD/UOsuIMOQn4Ig0SdivYPfZukb5cdasKJukG1NOpbW7yRNivaCnfZz6dTawXw
XRIV/KDsHQiyVxKvN73bThKhONkcX2LWuD928tAR6XMM2G5ovxLe09vuOzzfTWQDsm++9UKF a/A=
In-Reply-To: <43a6e141-adab-42e9-9966-ec54cb91a6de@xxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 04/06/2025 12:05, Qiang Yu wrote:
Signed-off-by: Ziyue Zhang <quic_ziyuzhan@xxxxxxxxxxx>
---
.../devicetree/bindings/pci/qcom,pcie-sa8775p.yaml | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-sa8775p.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie-sa8775p.yaml
index e3fa232da2ca..805258cbcf2f 100644
--- a/Documentation/devicetree/bindings/pci/qcom,pcie-sa8775p.yaml
+++ b/Documentation/devicetree/bindings/pci/qcom,pcie-sa8775p.yaml
@@ -61,11 +61,14 @@ properties:
- const: global
resets:
- maxItems: 1
+ minItems: 1
+ maxItems: 2
Shouldn't we just update this to maxItems:2 / minItems:2 and drop
minItems:1 from the next clause?
Hi Dmitry,
link_down reset is optional. In many other platforms, like sm8550
and x1e80100, link_down reset is documented as a optional reset.
PCIe will works fine without link_down reset. So I think setting it
as optional is better.
You are describing a hardware. How can a reset be optional in the
_hardware_? It's either routed or not.
I feel a bit confused. According to the theory above, everything seems to
be non-optional when describing hardware, such as registers, clocks,
resets, regulators, and interrupts—all of them either exist or do not.
Can you construct a DTS being fully complete and correct picture of
hardware without these? If not, they are not optional, because correct
hardware representation would need them.
Seems like I misunderstand the concept of 'optional'? Is 'optional' only
used for compatibility across different platforms?
Additionally, we have documented the PCIe global interrupt as optional. I
was taught that, in the PCIe driver, this interrupt is retrieved using the
platform_get_irq_byname_optional API, so it can be documented as optional.
However, this still seems to contradict the theory mentioned earlier.
ABI is just one side of the required properties.
Best regards,
Krzysztof
Return-Path: <linux-kernel+bounces-673131-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 635E941E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:37:59 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id EAD7B18974C6
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:38:12 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id DC49E28ECD1;
Wed, 4 Jun 2025 11:37:52 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="neOuFRF4"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 21B4228ECC9;
Wed, 4 Jun 2025 11:37:52 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749037072; cv=none; b=nwEOtA3tV5A/R+dNGxIOwVyeH0FWC9fSWWNh1kRIsxKDjjLlyN1e1B517INJXktEuOeTR9vdcn4SXAEy6zU/zD6xTab5d8TyhJ+mxyPtZHkee+VY/6kpyC5xdBJ6SGcmHs4Nqrg2uXE+yb4uffklb17XfRx0W5MghqwTsjX3tUU=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749037072; c=relaxed/simple;
bh=ggwoki9c2BwP/sGTmMHE1VekW49QINGECUTib6v7NpM=;
h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=fnS+6vEyt9TQNtiBfSLPzOM3OLhnyjQvdaJU+c6QvFTrp7RxdZILtBbtohy6K3CFZ0jdk0iN19IvUAlh0jbrgDY0awoYiCMfT2HaiS0PH9siHo7MkoPzx+wnH8T5dJVv17xUr+lf1ZKOnhHnA7cIVSZEJrtW7eHcvIaaB+qeqig=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=neOuFRF4; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 83471C4CEE7;
Wed, 4 Jun 2025 11:37:50 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749037072;
bh=ggwoki9c2BwP/sGTmMHE1VekW49QINGECUTib6v7NpM=;
h=From:To:Cc:Subject:Date:From;
b=neOuFRF48UZGjxlObU4xZCA5Yr9n25W6u25RkSNKEYoOIEw9JUA9ulaCVZe+5lghk
vDC9CaB8Jo4dKC0cdMZ4v3ev3w95q265X23RMSJfMDwyFV5r3efIDpRFx8af1L0FZJ
+FnWZ8T67ALqDl28OFOpLkOELjBELaeZ7Jj6OqUxC2SAR0XFQt6Y8vX0QBlBHYFOly
GJNcz4QDfHos1z3mxPI1zhYRmiuAOXaoOjzMzcSzPx+T7dz2Jd6+81YF9HTOtR/4mB
LWRhfpurNku4qigtpFSKKiD0aHf6h8MRm3/J21GbYevZiA1PHmL1PIT8UzHzpn9JKh
L5YKCSq5yxmSQ==
From: Philipp Stanner <phasta@xxxxxxxxxx>
To: Damien Le Moal <dlemoal@xxxxxxxxxx>,
Niklas Cassel <cassel@xxxxxxxxxx>
Cc: linux-ide@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx,
Philipp Stanner <phasta@xxxxxxxxxx>
Subject: [PATCH] ata: macio: Use non-hybrid PCI devres API
Date: Wed, 4 Jun 2025 13:34:24 +0200
Message-ID: <20250604113423.138595-2-phasta@xxxxxxxxxx>
X-Mailer: git-send-email 2.49.0
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
macio enables its PCI device with pcim_enable_device(). This,
implicitly, switches the function pci_request_regions() into managed
mode, where it becomes a devres function.
The PCI subsystem wants to remove this hybrid nature from its
interfaces. To do so, users of the aforementioned combination of
functions must be ported to non-hybrid functions.
Replace the call to sometimes-managed pci_request_regions() with one to
the always-managed pcim_request_all_regions().
Signed-off-by: Philipp Stanner <phasta@xxxxxxxxxx>
---
Hi,
seems I forgot sending this patch out a while ago. Mea culpa.
PCI has currently chained the changes mentioned above queued up for
Linus, so it's probably a good idea to get this into macio relatively
soonish. Otherwise the driver would likely fail to reload in v6.16,
because the device's PCI regions remain blocked.
Thx
P.
---
drivers/ata/pata_macio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ata/pata_macio.c b/drivers/ata/pata_macio.c
index fbf5f07ea357..f7a933eefe05 100644
--- a/drivers/ata/pata_macio.c
+++ b/drivers/ata/pata_macio.c
@@ -1298,7 +1298,7 @@ static int pata_macio_pci_attach(struct pci_dev *pdev,
priv->dev = &pdev->dev;
/* Get MMIO regions */
- if (pci_request_regions(pdev, "pata-macio")) {
+ if (pcim_request_all_regions(pdev, "pata-macio")) {
dev_err(&pdev->dev,
"Cannot obtain PCI resources\n");
return -EBUSY;
--
2.48.1
Return-Path: <linux-kernel+bounces-673132-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 9438C41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:38:17 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 91A093A5ABE
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:37:46 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id D8BFD28ECD4;
Wed, 4 Jun 2025 11:38:02 +0000 (UTC)
Received: from baidu.com (mx22.baidu.com [220.181.50.185])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0D41528ECC9
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:37:58 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=220.181.50.185
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749037082; cv=none; b=e7NxhauvFtMbBhrIXqSUUmD/SUJMcec9BB3jra4fhWqCVD3oN39FoLGXbj6LEru1f2LIBzSTsBUAJciLV3lKqtgfZP2xEUy/TVbBRF1QXaBPAK5ITddZHl8n2EvwTz9aI27FNnzaJsOXiK5H8SP83T7z9X0T8EJpAEVvJoIiEBk=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749037082; c=relaxed/simple;
bh=EXf9ilVpwK7qhf3Xh6ueV+kNhH+KvXii9ls7+ipW8wA=;
h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=sEZgHndEN4yaeiD1d3f9G44S3hNW4kl7WIRWbzUHFBdUB7Pc20rdCjNYj+QnSRsmrHaJwuq6+5gq7I6D/DEUwIKB6uB0/fUyyQcn3wo9VP/YLQl5EWMivJHqVbIEQ3ofUB2zH4oyzi+mZxSleHvkYEFaWuWyCAcSeo/2DSn5pu4=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=baidu.com; spf=pass smtp.mailfrom=baidu.com; arc=none smtp.client-ip=220.181.50.185
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=baidu.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baidu.com
From: lirongqing <lirongqing@xxxxxxxxx>
To: <mingo@xxxxxxxxxx>, <peterz@xxxxxxxxxxxxx>, <juri.lelli@xxxxxxxxxx>,
<vincent.guittot@xxxxxxxxxx>, <dietmar.eggemann@xxxxxxx>,
<rostedt@xxxxxxxxxxx>, <bsegall@xxxxxxxxxx>, <mgorman@xxxxxxx>,
<vschneid@xxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>
CC: Li RongQing <lirongqing@xxxxxxxxx>
Subject: [PATCH] sched/cputime: Fix a mostly theoretical divide by zero
Date: Wed, 4 Jun 2025 19:04:42 +0800
Message-ID: <20250604110442.8251-1-lirongqing@xxxxxxxxx>
X-Mailer: git-send-email 2.17.1
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain
X-ClientProxiedBy: bjkjy-exc8.internal.baidu.com (172.31.50.52) To
BJHW-Mail-Ex15.internal.baidu.com (10.127.64.38)
X-Baidu-BdMsfe-DateCheck: 1_BJHW-Mail-Ex15_2025-06-04 19:04:49:062
X-FEAS-Client-IP: 10.127.64.38
X-FE-Policy-ID: 52:10:53:SYSTEM
X-Spam-Status: No, score=-3.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
From: Li RongQing <lirongqing@xxxxxxxxx>
Sum of utime and stime can overflow to 0, when a process with
many threads run over total 2^64 ns
Signed-off-by: Li RongQing <lirongqing@xxxxxxxxx>
---
kernel/sched/cputime.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/sched/cputime.c b/kernel/sched/cputime.c
index 6dab4854..c35fc4c 100644
--- a/kernel/sched/cputime.c
+++ b/kernel/sched/cputime.c
@@ -579,7 +579,8 @@ void cputime_adjust(struct task_cputime *curr, struct prev_cputime *prev,
goto update;
}
- stime = mul_u64_u64_div_u64(stime, rtime, stime + utime);
+ if (likely(stime + utime))
+ stime = mul_u64_u64_div_u64(stime, rtime, stime + utime);
/*
* Because mul_u64_u64_div_u64() can approximate on some
* achitectures; enforce the constraint that: a*b/(b+c) <= a.
--
2.9.4
Return-Path: <linux-kernel+bounces-673133-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 93BEF41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:38:48 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id EAB8418860C2
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:38:57 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id B58F528ECCF;
Wed, 4 Jun 2025 11:38:37 +0000 (UTC)
Received: from SHSQR01.spreadtrum.com (unknown [222.66.158.135])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id DB76028ECC9
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:38:33 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=222.66.158.135
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749037117; cv=none; b=Xin6UU09rY8/8okA3AZt68UeqTVR4RhBt1EQADI5MTQfupo6Lq20/4iToAjc+/5mL38NBlGe573ixs3jPZLzc7rGeSPt7Xc+yNWjlu9G6iuzxlsB7Y3eNmJfRYtI2NMzm+aqitYwj6ngMG1ZdAmYbaOrCuAotVG65g/t2qZmTyU=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749037117; c=relaxed/simple;
bh=bkWYBN0z7L5PXWrZDWUNaAzGfO2efcEkm/tCxSovQGc=;
h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=hv045OFPASdvNwYQ6U6l/bx+UEiM6laVVVAH6e2hvbA9XSV1Tc7D0KkDZe/YT13jVGgKqm8VwMEiZ9fpFZuvt50jvRmC4DPwIIA7hmxHnIHPwfh9gYytwD/IKa81Xp6c1YtTRxjg4ehfWasURxo7HMa20Asogp7Mtq2tflHvLkc=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=unisoc.com; spf=pass smtp.mailfrom=unisoc.com; arc=none smtp.client-ip=222.66.158.135
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=unisoc.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=unisoc.com
Received: from dlp.unisoc.com ([10.29.3.86])
by SHSQR01.spreadtrum.com with ESMTP id 554BbvWC063964;
Wed, 4 Jun 2025 19:37:57 +0800 (+08)
(envelope-from Zhiguo.Niu@xxxxxxxxxx)
Received: from SHDLP.spreadtrum.com (bjmbx02.spreadtrum.com [10.0.64.8])
by dlp.unisoc.com (SkyGuard) with ESMTPS id 4bC59374gHz2NZDyW;
Wed, 4 Jun 2025 19:35:03 +0800 (CST)
Received: from bj08434pcu.spreadtrum.com (10.0.73.87) by
BJMBX02.spreadtrum.com (10.0.64.8) with Microsoft SMTP Server (TLS) id
15.0.1497.48; Wed, 4 Jun 2025 19:37:55 +0800
From: Zhiguo Niu <zhiguo.niu@xxxxxxxxxx>
To: <jaegeuk@xxxxxxxxxx>, <chao@xxxxxxxxxx>
CC: <linux-f2fs-devel@xxxxxxxxxxxxxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>,
<niuzhiguo84@xxxxxxxxx>, <zhiguo.niu@xxxxxxxxxx>, <ke.wang@xxxxxxxxxx>,
<Hao_hao.Wang@xxxxxxxxxx>, <baocong.liu@xxxxxxxxxx>
Subject: [PATCH v2] f2fs: compress: fix UAF of f2fs_inode_info in f2fs_free_dic
Date: Wed, 4 Jun 2025 19:37:39 +0800
Message-ID: <1749037059-4243-1-git-send-email-zhiguo.niu@xxxxxxxxxx>
X-Mailer: git-send-email 1.9.1
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain
X-ClientProxiedBy: SHCAS03.spreadtrum.com (10.0.1.207) To
BJMBX02.spreadtrum.com (10.0.64.8)
X-MAIL:SHSQR01.spreadtrum.com 554BbvWC063964
X-Spam-Status: No, score=-3.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
The decompress_io_ctx may be released asynchronously after
I/O completion. If this file is deleted immediately after read,
and the kworker of processing post_read_wq has not been executed yet
due to high workloads, It is possible that the inode(f2fs_inode_info)
is evicted and freed before it is used f2fs_free_dic.
The UAF case as below:
Thread A Thread B
- f2fs_decompress_end_io
- f2fs_put_dic
- queue_work
add free_dic work to post_read_wq
- do_unlink
- iput
- evict
- call_rcu
This file is deleted after read.
Thread C kworker to process post_read_wq
- rcu_do_batch
- f2fs_free_inode
- kmem_cache_free
inode is freed by rcu
- process_scheduled_works
- f2fs_late_free_dic
- f2fs_free_dic
- f2fs_release_decomp_mem
read (dic->inode)->i_compress_algorithm
This patch use __iget before f2fs_free_dic and iput after free the dic.
Cc: Daeho Jeong <daehojeong@xxxxxxxxxx>
Fixes: bff139b49d9f ("f2fs: handle decompress only post processing in softirq")
Signed-off-by: Zhiguo Niu <zhiguo.niu@xxxxxxxxxx>
Signed-off-by: Baocong Liu <baocong.liu@xxxxxxxxxx>
---
v2: use __iget/iput function
---
fs/f2fs/compress.c | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
index b3c1df9..3f0c18d 100644
--- a/fs/f2fs/compress.c
+++ b/fs/f2fs/compress.c
@@ -1687,7 +1687,7 @@ static void f2fs_release_decomp_mem(struct decompress_io_ctx *dic,
}
static void f2fs_free_dic(struct decompress_io_ctx *dic,
- bool bypass_destroy_callback);
+ bool bypass_destroy_callback, bool late_free);
struct decompress_io_ctx *f2fs_alloc_dic(struct compress_ctx *cc)
{
@@ -1743,12 +1743,12 @@ struct decompress_io_ctx *f2fs_alloc_dic(struct compress_ctx *cc)
return dic;
out_free:
- f2fs_free_dic(dic, true);
+ f2fs_free_dic(dic, true, false);
return ERR_PTR(ret);
}
static void f2fs_free_dic(struct decompress_io_ctx *dic,
- bool bypass_destroy_callback)
+ bool bypass_destroy_callback, bool late_free)
{
int i;
@@ -1775,6 +1775,8 @@ static void f2fs_free_dic(struct decompress_io_ctx *dic,
}
page_array_free(dic->inode, dic->rpages, dic->nr_rpages);
+ if (late_free)
+ iput(dic->inode);
kmem_cache_free(dic_entry_slab, dic);
}
@@ -1783,16 +1785,20 @@ static void f2fs_late_free_dic(struct work_struct *work)
struct decompress_io_ctx *dic =
container_of(work, struct decompress_io_ctx, free_work);
- f2fs_free_dic(dic, false);
+ f2fs_free_dic(dic, false, true);
}
static void f2fs_put_dic(struct decompress_io_ctx *dic, bool in_task)
{
if (refcount_dec_and_test(&dic->refcnt)) {
if (in_task) {
- f2fs_free_dic(dic, false);
+ f2fs_free_dic(dic, false, false);
} else {
INIT_WORK(&dic->free_work, f2fs_late_free_dic);
+ /* to avoid inode is evicted simultaneously */
+ spin_lock(&dic->inode->i_lock);
+ __iget(dic->inode);
+ spin_unlock(&dic->inode->i_lock);
queue_work(F2FS_I_SB(dic->inode)->post_read_wq,
&dic->free_work);
}
--
1.9.1
Return-Path: <linux-kernel+bounces-673134-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 058C041E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:40:03 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id CF7903A590E
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:39:40 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 4AD1B28ECDA;
Wed, 4 Jun 2025 11:39:55 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Qa7IBXXJ"
Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id BB20E28D8ED;
Wed, 4 Jun 2025 11:39:52 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.15
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749037194; cv=none; b=hTx+vHI0vPhE27r8U9n8BR3HYjy8HydhKk4RkSy0M6/677matXiZtMQNQItxfRMTmAngmSrbfXulshvGZ9rzG80fMor6HNI7oKYiup4k0Rfg9l6eyr2WP3FddamFf5JNgTAytQ3krEZFc+w/Os+Rzl+MgcYvWS4VKgPy+Vd+/CA=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749037194; c=relaxed/simple;
bh=ufZGYSMjuWeE0gmaN3weztdJUrBUeABeoB5cfpDXF9c=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=YbElBr7Bg4gFZL6O2i0OMyFqbxZg6pC90oCCXBttOmMmPbTxqLjj2UPhdAtBYunUqWjPkOZYPRXRGkBcl8/+ylmiQusOGtPZBwyY3RjUHIzhST7QiZGjXiaGQQoD2Q3Bcsk1oiyyvirpU9Kt9PqWoEp1ZT7lXBjMhSrrczGmXJs=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Qa7IBXXJ; arc=none smtp.client-ip=198.175.65.15
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com
Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
t=1749037192; x=1780573192;
h=date:from:to:cc:subject:message-id:references:
mime-version:content-transfer-encoding:in-reply-to;
bh=ufZGYSMjuWeE0gmaN3weztdJUrBUeABeoB5cfpDXF9c=;
b=Qa7IBXXJ1MzG4ZhQY2/jh9zRWDTnD/QSKCwuYzGs2wg0D0+RqksM+zjy
3RXMhEarpMTAs2n/qe6RHuUpragMW0DRW7cDyksQKaYcqCdYI4d+sbLFz
PsA/HI76RnhvuwZ8456LdNEavQNvJMmS6PkkGNXkMXOD6zewhmvSxbCIu
a2BD7XL3ujEy69atTcDaAtxuDn+6JMDv0fKQhly1J8ktfZ9x3egcGQ7vO
8UNINKoZLrwVozt3jkMrF9gSWigNtmoYe7NS8ag9qVRZziQRWgo1s2J8E
+Rbj+t7+kqQTTkFXtZZQg6JQlMehiKRB3H0HMvQxFesRvcI3EDl2phqKG
w==;
X-CSE-ConnectionGUID: ZvTCTuzCTMOniRW/Xc8S1g==
X-CSE-MsgGUID: 7zyYtGSXT1qgggdyvJo0DA==
X-IronPort-AV: E=McAfee;i="6800,10657,11454"; a="54776197"
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="54776197"
Received: from orviesa003.jf.intel.com ([10.64.159.143])
by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 04:39:52 -0700
X-CSE-ConnectionGUID: 4gH2R/qmRh+J8XxmpdEsLA==
X-CSE-MsgGUID: f0YM29GmS/uxrFTQImlS1g==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="149950623"
Received: from ranerica-svr.sc.intel.com ([172.25.110.23])
by orviesa003.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 04:39:52 -0700
Date: Wed, 4 Jun 2025 04:44:59 -0700
From: Ricardo Neri <ricardo.neri-calderon@xxxxxxxxxxxxxxx>
To: "Rafael J. Wysocki" <rafael@xxxxxxxxxx>
Cc: x86@xxxxxxxxxx, Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
"K. Y. Srinivasan" <kys@xxxxxxxxxxxxx>,
Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>,
Wei Liu <wei.liu@xxxxxxxxxx>, Dexuan Cui <decui@xxxxxxxxxxxxx>,
Michael Kelley <mhklinux@xxxxxxxxxxx>,
Saurabh Sengar <ssengar@xxxxxxxxxxxxxxxxxxx>,
Chris Oo <cho@xxxxxxxxxxxxx>,
"Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx>,
linux-hyperv@xxxxxxxxxxxxxxx, devicetree@xxxxxxxxxxxxxxx,
linux-acpi@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
"Ravi V. Shankar" <ravi.v.shankar@xxxxxxxxx>,
Ricardo Neri <ricardo.neri@xxxxxxxxx>,
Yunhong Jiang <yunhong.jiang@xxxxxxxxxxxxxxx>
Subject: Re: [PATCH v4 02/10] x86/acpi: Move acpi_wakeup_cpu() and helpers to
smpwakeup.c
Message-ID: <20250604114459.GA29325@xxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20250603-rneri-wakeup-mailbox-v4-0-d533272b7232@xxxxxxxxxxxxxxx>
<20250603-rneri-wakeup-mailbox-v4-2-d533272b7232@xxxxxxxxxxxxxxx>
<CAJZ5v0geZAnLRkeunW06JKE1gyDcd15EGzqJ_A-cZHO_koJVAw@xxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <CAJZ5v0geZAnLRkeunW06JKE1gyDcd15EGzqJ_A-cZHO_koJVAw@xxxxxxxxxxxxxx>
User-Agent: Mutt/1.9.4 (2018-02-28)
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 11:12:53AM +0200, Rafael J. Wysocki wrote:
On Wed, Jun 4, 2025 at 2:18 AM Ricardo Neri
<ricardo.neri-calderon@xxxxxxxxxxxxxxx> wrote:
>
> The bootstrap processor uses acpi_wakeup_cpu() to indicate to firmware that
> it wants to boot a secondary CPU using a mailbox as described in the
> Multiprocessor Wakeup Structure of the ACPI specification.
>
> The platform firmware may implement the mailbox as described in the ACPI
> specification but enumerate it using a DeviceTree graph. An example of
> this is OpenHCL paravisor.
>
> Move the code used to setup and use the mailbox for CPU wakeup out of the
> ACPI directory into a new smpwakeup.c file that both ACPI and DeviceTree
> can use.
>
> No functional changes are intended.
>
> Co-developed-by: Yunhong Jiang <yunhong.jiang@xxxxxxxxxxxxxxx>
> Signed-off-by: Yunhong Jiang <yunhong.jiang@xxxxxxxxxxxxxxx>
> Signed-off-by: Ricardo Neri <ricardo.neri-calderon@xxxxxxxxxxxxxxx>
> ---
> Changes since v3:
> - Create a new file smpwakeup.c instead of relocating it to smpboot.c.
> (Rafael)
>
> Changes since v2:
> - Only move to smpboot.c the portions of the code that configure and
> use the mailbox. This also resolved the compile warnings about unused
> functions that Michael Kelley reported.
> - Edited the commit message for clarity.
>
> Changes since v1:
> - None.
> ---
> arch/x86/Kconfig | 7 ++++
> arch/x86/kernel/Makefile | 1 +
> arch/x86/kernel/acpi/madt_wakeup.c | 76 ----------------------------------
> arch/x86/kernel/smpwakeup.c | 83 ++++++++++++++++++++++++++++++++++++++
> 4 files changed, 91 insertions(+), 76 deletions(-)
>
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index cb0f4af31789..82147edb355a 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -1113,6 +1113,13 @@ config X86_LOCAL_APIC
> depends on X86_64 || SMP || X86_UP_APIC || PCI_MSI
> select IRQ_DOMAIN_HIERARCHY
>
> +config X86_MAILBOX_WAKEUP
> + def_bool y
> + depends on OF || ACPI_MADT_WAKEUP
At this point the dependency on OF is premature. IMV it should be
added in a later patch.
I see your point. Sure, I will the dependency in a later patch.
Return-Path: <linux-kernel+bounces-673135-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 4C06341E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:40:25 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 066917A736D
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:38:56 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 1421A28ECF9;
Wed, 4 Jun 2025 11:39:57 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="suV3Xt94"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 557B828ECE5;
Wed, 4 Jun 2025 11:39:55 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749037196; cv=none; b=I0lVLcnDLGU7y19UFyK4uJ+nV6fmsPw7Lr9YllALJwILb+wVItpa2/MP7uxVrErZxdPOMnmLr+SDELxiYWSwsHBJt8G1J8EazLNMZYC8WtE0eDLU1i77dxUkdGZRBYlTtNTM6pVHiKiHiDS9SHoKjGh2wps0lDBR7BWH57kA6w4=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749037196; c=relaxed/simple;
bh=f5sb3YV8qwEzrJRbbUo0eU1F2vSViH0WxMz1v6VOMKA=;
h=Content-Type:MIME-Version:Subject:From:Message-Id:Date:References:
In-Reply-To:To:Cc; b=RSR00xdthOItkMPuGuJusCoCeE9Erj/21qP1FsHHLbPqAYMBETECDoVoTrSVa+TVHq0182z1uDDujd98db2pAw04ClndNXBQa3+W7wMNi2Ecp/IQ+vnD9voYsDhL2jp47WQVLJUFcxYEL7od8E2U/OPoXBSDlwW+bk4pMagEttA=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=suV3Xt94; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id B946AC4CEE7;
Wed, 4 Jun 2025 11:39:55 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749037195;
bh=f5sb3YV8qwEzrJRbbUo0eU1F2vSViH0WxMz1v6VOMKA=;
h=Subject:From:Date:References:In-Reply-To:To:Cc:From;
b=suV3Xt94XZ0j5pd1qxnjcqnX63gG9D709HAX+kcJPaKQ3RzfUNRbbE1jxBaq+nkCl
oduer5jd7f49zsB6uKoeWPBRGluK22AlgTl58dGkJAHS8vftT/GLk1mIh+nieWoLrJ
0y45gcpyQ6HVER32f3Hclin6B/zLcQeekptpi49+xGcOAvfbhbe0jlMqOKkodc+8fO
i2RtOr8XQVovYo8pG0w6A0F7MaPt3BOTS5PnJvsJ31l2SXBxax1eBijyxv8+V74Rux
sJn7+ouf+dGfREsZVkGmyRJmr752Fj4LswpeyiONueC7Cet2fH8VuzXk9OEVwdcBYU
AYGBEW0lR1fag==
Received: from [10.30.226.235] (localhost [IPv6:::1])
by aws-us-west-2-korg-oddjob-rhel9-1.codeaurora.org (Postfix) with ESMTP id 33C8D38111E5;
Wed, 4 Jun 2025 11:40:29 +0000 (UTC)
Content-Type: text/plain; charset="utf-8"
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: Re: [PATCH net v2] gve: add missing NULL check for
gve_alloc_pending_packet() in TX DQO
From: patchwork-bot+netdevbpf@xxxxxxxxxx
Message-Id:
<174903722800.2252645.3715137704739506343.git-patchwork-notify@xxxxxxxxxx>
Date: Wed, 04 Jun 2025 11:40:28 +0000
References: <20250602103450.3472509-1-alok.a.tiwari@xxxxxxxxxx>
In-Reply-To: <20250602103450.3472509-1-alok.a.tiwari@xxxxxxxxxx>
To: ALOK TIWARI <alok.a.tiwari@xxxxxxxxxx>
Cc: almasrymina@xxxxxxxxxx, bcf@xxxxxxxxxx, joshwash@xxxxxxxxxx,
willemb@xxxxxxxxxx, pkaligineedi@xxxxxxxxxx, pabeni@xxxxxxxxxx,
kuba@xxxxxxxxxx, jeroendb@xxxxxxxxxx, hramamurthy@xxxxxxxxxx,
andrew+netdev@xxxxxxx, davem@xxxxxxxxxxxxx, edumazet@xxxxxxxxxx,
netdev@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, darren.kenny@xxxxxxxxxx
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hello:
This patch was applied to netdev/net.git (main)
by David S. Miller <davem@xxxxxxxxxxxxx>:
On Mon, 2 Jun 2025 03:34:29 -0700 you wrote:
gve_alloc_pending_packet() can return NULL, but gve_tx_add_skb_dqo()
did not check for this case before dereferencing the returned pointer.
Add a missing NULL check to prevent a potential NULL pointer
dereference when allocation fails.
This improves robustness in low-memory scenarios.
[...]
Here is the summary with links:
- [net,v2] gve: add missing NULL check for gve_alloc_pending_packet() in TX DQO
https://git.kernel.org/netdev/net/c/12c331b29c73
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Return-Path: <linux-kernel+bounces-673136-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id AF87B41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:43:59 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 05CE67A2036
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:42:32 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 05A7E28ECDE;
Wed, 4 Jun 2025 11:43:41 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="DTg/qEZm"
Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6455328E594;
Wed, 4 Jun 2025 11:43:38 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.14
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749037420; cv=none; b=L/k761MH84E3ruaYXzVEhjvT03O0HGGdieNX9/0sxEabtQ97nn3gRRHbdjjfVj0VgqirafA2LD/SP+vDMQq3Lc890+ICPkMBjE6WdXnrz2pD8gRWu8xx2s0l+wKycSFbezBe8REB3ky/SXgpfRd7bOcBF3xRTmzEO4RrHvs1NAs=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749037420; c=relaxed/simple;
bh=asMHIzflbcbz5dL3ZARFHy96ClpJy1yEA64sCCpM5xU=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=gB1QbflN6DhyN5w57+yTZ3YVGc8dtYxZ0F6i4U/cfmBqblzPVPtXaTgRHhUoljZxIBK5EIJJgmLqyQZOw/mG10Wp3OItSu0xWwojByKpit/Ntc0f1b6erDLiWO8a4gHbRYa4bFeHnJJm4b1uxBS0f5dF2mFxVGp6uqzB9vTYvvs=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=DTg/qEZm; arc=none smtp.client-ip=198.175.65.14
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com
Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
t=1749037418; x=1780573418;
h=date:from:to:cc:subject:message-id:references:
mime-version:content-transfer-encoding:in-reply-to;
bh=asMHIzflbcbz5dL3ZARFHy96ClpJy1yEA64sCCpM5xU=;
b=DTg/qEZm0kTGsEVzzgd4trzzF0mssnT7+MYZcB+AHukkQe2WEeRQuQgU
XZXKLdgymB/JDH5zJPT0I/hIJH+ei/nQkNT1y0N0dU99AXZwI+BlFuw/Y
GymFujLH2uKVQIpRklQGk4kmzP/Jr6uehrxXeORe4DLh+/eVOfPGqq184
1K9RitcqOHCy7ywRacPXvhFAZyUm/2RPPcG4upTkKAdOI4CpF27vLEGZ6
MhMeS0hQ6oFfLN/oj4KPdoLdCzw5sH78PQduVOM0Aee4fC5eJw7+raoIR
rV4d3PchBjqUx5MAzzGPIvBXweJ1xkqxQ4Mm9URYm/IZzX0rBYJWuNml4
Q==;
X-CSE-ConnectionGUID: wY1w0lG4QbCyTBn+WdbS2Q==
X-CSE-MsgGUID: e4KjUlkSRnKe9omGbzSdaw==
X-IronPort-AV: E=McAfee;i="6800,10657,11454"; a="54913282"
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="54913282"
Received: from orviesa009.jf.intel.com ([10.64.159.149])
by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 04:43:37 -0700
X-CSE-ConnectionGUID: JDWoo7ccR5mHN4d5bYcyCg==
X-CSE-MsgGUID: CR0mYPAESp61B0UmWrL5Rw==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="145182204"
Received: from ranerica-svr.sc.intel.com ([172.25.110.23])
by orviesa009.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 04:43:37 -0700
Date: Wed, 4 Jun 2025 04:48:44 -0700
From: Ricardo Neri <ricardo.neri-calderon@xxxxxxxxxxxxxxx>
To: "Rafael J. Wysocki" <rafael@xxxxxxxxxx>
Cc: x86@xxxxxxxxxx, Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
"K. Y. Srinivasan" <kys@xxxxxxxxxxxxx>,
Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>,
Wei Liu <wei.liu@xxxxxxxxxx>, Dexuan Cui <decui@xxxxxxxxxxxxx>,
Michael Kelley <mhklinux@xxxxxxxxxxx>,
Saurabh Sengar <ssengar@xxxxxxxxxxxxxxxxxxx>,
Chris Oo <cho@xxxxxxxxxxxxx>,
"Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx>,
linux-hyperv@xxxxxxxxxxxxxxx, devicetree@xxxxxxxxxxxxxxx,
linux-acpi@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
"Ravi V. Shankar" <ravi.v.shankar@xxxxxxxxx>,
Ricardo Neri <ricardo.neri@xxxxxxxxx>,
Yunhong Jiang <yunhong.jiang@xxxxxxxxxxxxxxx>
Subject: Re: [PATCH v4 03/10] dt-bindings: reserved-memory: Wakeup Mailbox
for Intel processors
Message-ID: <20250604114844.GB29325@xxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20250603-rneri-wakeup-mailbox-v4-0-d533272b7232@xxxxxxxxxxxxxxx>
<20250603-rneri-wakeup-mailbox-v4-3-d533272b7232@xxxxxxxxxxxxxxx>
<CAJZ5v0i6Ej6Tg-4aS_B3Gg2Z5Bk0g_AA9wdG0FQmuq0ZqdP1og@xxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <CAJZ5v0i6Ej6Tg-4aS_B3Gg2Z5Bk0g_AA9wdG0FQmuq0ZqdP1og@xxxxxxxxxxxxxx>
User-Agent: Mutt/1.9.4 (2018-02-28)
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 11:18:15AM +0200, Rafael J. Wysocki wrote:
On Wed, Jun 4, 2025 at 2:18 AM Ricardo Neri
<ricardo.neri-calderon@xxxxxxxxxxxxxxx> wrote:
>
> Add DeviceTree bindings to enumerate the wakeup mailbox used in platform
> firmware for Intel processors.
>
> x86 platforms commonly boot secondary CPUs using an INIT assert, de-assert
> followed by Start-Up IPI messages. The wakeup mailbox can be used when this
> mechanism is unavailable.
>
> The wakeup mailbox offers more control to the operating system to boot
> secondary CPUs than a spin-table. It allows the reuse of same wakeup vector
> for all CPUs while maintaining control over which CPUs to boot and when.
> While it is possible to achieve the same level of control using a spin-
> table, it would require to specify a separate `cpu-release-addr` for each
> secondary CPU.
>
> The operation and structure of the mailbox is described in the
> Multiprocessor Wakeup Structure defined in the ACPI specification. Note
> that this structure does not specify how to publish the mailbox to the
> operating system (ACPI-based platform firmware uses a separate table). No
> ACPI table is needed in DeviceTree-based firmware to enumerate the mailbox.
>
> Add a `compatible` property that the operating system can use to discover
> the mailbox. Nodes wanting to refer to the reserved memory usually define a
> `memory-region` property. /cpus/cpu* nodes would want to refer to the
> mailbox, but they do not have such property defined in the DeviceTree
> specification. Moreover, it would imply that there is a memory region per
> CPU.
>
> Co-developed-by: Yunhong Jiang <yunhong.jiang@xxxxxxxxxxxxxxx>
> Signed-off-by: Yunhong Jiang <yunhong.jiang@xxxxxxxxxxxxxxx>
> Signed-off-by: Ricardo Neri <ricardo.neri-calderon@xxxxxxxxxxxxxxx>
> ---
> Changes since v3:
> - Removed redefinitions of the mailbox and instead referred to ACPI
> specification as per discussion on LKML.
> - Clarified that DeviceTree-based firmware do not require the use of
> ACPI tables to enumerate the mailbox. (Rob)
> - Described the need of using a `compatible` property.
> - Dropped the `alignment` property. (Krzysztof, Rafael)
> - Used a real address for the mailbox node. (Krzysztof)
>
> Changes since v2:
> - Implemented the mailbox as a reserved-memory node. Add to it a
> `compatible` property. (Krzysztof)
> - Explained the relationship between the mailbox and the `enable-mehod`
> property of the CPU nodes.
> - Expanded the documentation of the binding.
>
> Changes since v1:
> - Added more details to the description of the binding.
> - Added requirement a new requirement for cpu@N nodes to add an
> `enable-method`.
> ---
> .../reserved-memory/intel,wakeup-mailbox.yaml | 48 ++++++++++++++++++++++
> 1 file changed, 48 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/reserved-memory/intel,wakeup-mailbox.yaml b/Documentation/devicetree/bindings/reserved-memory/intel,wakeup-mailbox.yaml
> new file mode 100644
> index 000000000000..f18643805866
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/reserved-memory/intel,wakeup-mailbox.yaml
> @@ -0,0 +1,48 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/reserved-memory/intel,wakeup-mailbox.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Wakeup Mailbox for Intel processors
> +
> +description: |
> + The Wakeup Mailbox provides a mechanism for the operating system to wake up
> + secondary CPUs on Intel processors. It is an alternative to the INIT-!INIT-
> + SIPI sequence used on most x86 systems.
> +
> + The structure and operation of the mailbox is described in the Multiprocessor
> + Wakeup Structure of the ACPI specification.
Please make this more specific: Which specification version and what section.
You may as well add a URL here too.
Sure Rafael. I will refer to the ACPI specification v6.6 secton 5.2.12.19.
It is the latest version at the time of writing this schema.
Return-Path: <linux-kernel+bounces-673137-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id D91AC41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:44:31 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id F2473176F86
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:44:32 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 7FBCD28ECD4;
Wed, 4 Jun 2025 11:44:26 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="UONAhmd/"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2D89E28E594
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:44:23 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749037465; cv=none; b=HzFgy4bd9yxvypQgVV99unpIdY7D/CCcyJNMrP7HBRVmwuGfvtfQFVk88x+dTm424lMR/LhGujdyyV9feP0oPRf+KpCB1yCPdBMo9jjYLKlykuafjToJLv9yb89oSa2SeoqMsjlkiuhePY/71Tdz83QHC58RNu+SjyzYWOYsNx0=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749037465; c=relaxed/simple;
bh=KuOgRbBgfLn4JiytyJCJWxPgQxC7L3xGE0gJqeHLfzU=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=LAoCc12LsLHAQn5V7bug3CfzRlINnYd6iOjn4R5zhumK6IiJ0q714Y7APQ08Hg7vbuaO+b3Y9NmIUCdPKGEwgqQsU4gTFD+d+tTL042GTixXAFK6UJzPXhmk2CRxZPP5acIAQ2BkxYPcZVlwkwwrwuXEvQzcjXYFTgcVgfjQyXo=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=UONAhmd/; arc=none smtp.client-ip=170.10.133.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749037462;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=lAZ6PoM2yHxT2XxiC3h9Ua+Sq3PY55BOVc0a18RVQnA=;
b=UONAhmd/W0N8wviiARmn4O3zJAeu35bBSbdzpxuiglhQfSHpFZXARrC8BKX/7265A3H76B
oM7ReL+wa40wd8DquxALT+0nyEiJ9sVQYeGXO/ZJ5H2JbPZcpqKczoTJReJz3H3nR9p+G4
za9lbMQfLOlXe99pGT8TGYo1CNo3VYs=
Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com
[209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-688-kEvfvVC8PJiW9YLsg1R50A-1; Wed, 04 Jun 2025 07:44:21 -0400
X-MC-Unique: kEvfvVC8PJiW9YLsg1R50A-1
X-Mimecast-MFC-AGG-ID: kEvfvVC8PJiW9YLsg1R50A_1749037460
Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-3a4eeed54c2so4270146f8f.3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 04:44:21 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749037460; x=1749642260;
h=content-transfer-encoding:in-reply-to:organization:autocrypt
:content-language:from:references:cc:to:subject:user-agent
:mime-version:date:message-id:x-gm-message-state:from:to:cc:subject
:date:message-id:reply-to;
bh=lAZ6PoM2yHxT2XxiC3h9Ua+Sq3PY55BOVc0a18RVQnA=;
b=qM6xS2YgBvTJLvzh1ynaJbWgq0M94+tvhZ2SLVF8o9zbvZI1XJnk6t+GXdpTUtWZ8x
YJ69LcJV6Jn+8YWMex4gUZ/H2i2126MZr8i8M+5nhTeQn+TmFKDO1bG4+xNSuDCzQ2Ll
mtr+6cptdrKyi+hQSmIMx9CSkXMShazSRXkPAoaw8OsSnvzDjw4s38RIxRVvDTUXu3hI
X72REEBFbuXEIZww2FNxBU91wzDqkmIr7hEwQeNn+GyWKBw3pNaMGNrNYfwKFawL+1Ct
eKup1pJ4QiCbzgRKpopB/ejCzsAh5ZCM3a40P/8nVtIGM4y89ZRn/j1/qn5y4YU7uGoj
IZcQ==
X-Forwarded-Encrypted: i=1; AJvYcCW0RQ/wJIUBQtPUiO8rZYbXT5Jrn4VJr3R8//2e7TYAR5mpC4NLO+p2LyT2gpXoBGQB01cKg9LTr+QjKdE=@vger.kernel.org
X-Gm-Message-State: AOJu0YzF8WFgEZ4oJYKlILw37NutKeIC9YS9bUgzoTnjSglaq2Mqz2Ty
WN39y9LRQJ+zpo2gDYSfnwl9q4qq3Jg+bkUbi27f2ZV6FLO9eERfpRRmTGo15RRFobPz00cq6gt
PyvTUDWbpgipL2z/TVZlNBzKTI7zt9G7KN7hEXUDixLqkpBAhw2DqioiS/EiLVZI9Sw==
X-Gm-Gg: ASbGncvh0RgQD0e3/tsOlA3Z3BNUUg4+7gBwi3ITTZpqeM0NQ7R0WIx5qi5aSEze0AS
G3JPwvZQ/TCEL7LJiMRx582EMQWnNYPci8n5qToUDKtwhuDgSgHpRiEW+0FIaUu8UybFA9ygkiZ
x00xMKlRanlUTNGkzLakSmcw4KSfGzkqG1W8k9NnDx93BTJonuOvLv9r71yEoAclSuyJEMjj3Sm
6lMM8s7Z/t0zRt3krrBq3sQn2AkfW30ZcLdxXvsgL0pUd57ftsavyhJRN/y8WwoORxlBW4PynyV
f536l0K/nbicz0wls8vcKuSl8dNludFM/WjTxGuiACTJ4bGaVVQ4oBjHZyFDt/yx6l7Yr50OL7Q
Kv6DzEsWfz4nVMfSV4yEilQLwvD/8AKWxxKYCZd6Or80iWSEdsA==
X-Received: by 2002:a5d:5f95:0:b0:3a4:ed62:c7e1 with SMTP id ffacd0b85a97d-3a51d8f59cfmr1948577f8f.12.1749037460531;
Wed, 04 Jun 2025 04:44:20 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IGTk+ZZ/txMdPYiZPbWtN+UTbUQiFhEQ2KYLiZED5o28ZN+uPzMH8V5s47pXStLZWFaTG3UiA==
X-Received: by 2002:a5d:5f95:0:b0:3a4:ed62:c7e1 with SMTP id ffacd0b85a97d-3a51d8f59cfmr1948538f8f.12.1749037460114;
Wed, 04 Jun 2025 04:44:20 -0700 (PDT)
Received: from ?IPV6:2003:d8:2f1b:b800:6fdb:1af2:4fbd:1fdf? (p200300d82f1bb8006fdb1af24fbd1fdf.dip0.t-ipconnect.de. [2003:d8:2f1b:b800:6fdb:1af2:4fbd:1fdf])
by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-451e505c350sm51456695e9.0.2025.06.04.04.44.18
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 04:44:19 -0700 (PDT)
Message-ID: <d72c77b7-2f40-4236-8288-e811f82671c6@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 13:44:18 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v3 1/5] mm: Optimize mprotect() by batch-skipping PTEs
To: Dev Jain <dev.jain@xxxxxxx>, akpm@xxxxxxxxxxxxxxxxxxxx
Cc: ryan.roberts@xxxxxxx, willy@xxxxxxxxxxxxx, linux-mm@xxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, catalin.marinas@xxxxxxx, will@xxxxxxxxxx,
Liam.Howlett@xxxxxxxxxx, lorenzo.stoakes@xxxxxxxxxx, vbabka@xxxxxxx,
jannh@xxxxxxxxxx, anshuman.khandual@xxxxxxx, peterx@xxxxxxxxxx,
joey.gouly@xxxxxxx, ioworker0@xxxxxxxxx, baohua@xxxxxxxxxx,
kevin.brodsky@xxxxxxx, quic_zhenhuah@xxxxxxxxxxx,
christophe.leroy@xxxxxxxxxx, yangyicong@xxxxxxxxxxxxx,
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, hughd@xxxxxxxxxx,
yang@xxxxxxxxxxxxxxxxxxxxxx, ziy@xxxxxxxxxx
References: <20250519074824.42909-1-dev.jain@xxxxxxx>
<20250519074824.42909-2-dev.jain@xxxxxxx>
<912757c0-8a75-4307-a0bd-8755f6135b5a@xxxxxxxxxx>
<76afb4f3-79b5-4126-b408-614bb6202526@xxxxxxx>
<25c0c700-656c-4a8a-8ef1-5093581cf25c@xxxxxxxxxx>
<4f97491c-b0dd-406a-9ddb-4f4424571704@xxxxxxx>
<8c389ee5-f7a4-44f6-a0d6-cc01c3da4d91@xxxxxxxxxx>
<92cc1bfb-ab7a-4abc-afd0-49f8f2d12da0@xxxxxxx>
From: David Hildenbrand <david@xxxxxxxxxx>
Content-Language: en-US
Autocrypt: addr=david@xxxxxxxxxx; keydata=
xsFNBFXLn5EBEAC+zYvAFJxCBY9Tr1xZgcESmxVNI/0ffzE/ZQOiHJl6mGkmA1R7/uUpiCjJ
dBrn+lhhOYjjNefFQou6478faXE6o2AhmebqT4KiQoUQFV4R7y1KMEKoSyy8hQaK1umALTdL
QZLQMzNE74ap+GDK0wnacPQFpcG1AE9RMq3aeErY5tujekBS32jfC/7AnH7I0v1v1TbbK3Gp
XNeiN4QroO+5qaSr0ID2sz5jtBLRb15RMre27E1ImpaIv2Jw8NJgW0k/D1RyKCwaTsgRdwuK
Kx/Y91XuSBdz0uOyU/S8kM1+ag0wvsGlpBVxRR/xw/E8M7TEwuCZQArqqTCmkG6HGcXFT0V9
PXFNNgV5jXMQRwU0O/ztJIQqsE5LsUomE//bLwzj9IVsaQpKDqW6TAPjcdBDPLHvriq7kGjt
WhVhdl0qEYB8lkBEU7V2Yb+SYhmhpDrti9Fq1EsmhiHSkxJcGREoMK/63r9WLZYI3+4W2rAc
UucZa4OT27U5ZISjNg3Ev0rxU5UH2/pT4wJCfxwocmqaRr6UYmrtZmND89X0KigoFD/XSeVv
jwBRNjPAubK9/k5NoRrYqztM9W6sJqrH8+UWZ1Idd/DdmogJh0gNC0+N42Za9yBRURfIdKSb
B3JfpUqcWwE7vUaYrHG1nw54pLUoPG6sAA7Mehl3nd4pZUALHwARAQABzSREYXZpZCBIaWxk
ZW5icmFuZCA8ZGF2aWRAcmVkaGF0LmNvbT7CwZgEEwEIAEICGwMGCwkIBwMCBhUIAgkKCwQW
AgMBAh4BAheAAhkBFiEEG9nKrXNcTDpGDfzKTd4Q9wD/g1oFAl8Ox4kFCRKpKXgACgkQTd4Q
9wD/g1oHcA//a6Tj7SBNjFNM1iNhWUo1lxAja0lpSodSnB2g4FCZ4R61SBR4l/psBL73xktp
rDHrx4aSpwkRP6Epu6mLvhlfjmkRG4OynJ5HG1gfv7RJJfnUdUM1z5kdS8JBrOhMJS2c/gPf
wv1TGRq2XdMPnfY2o0CxRqpcLkx4vBODvJGl2mQyJF/gPepdDfcT8/PY9BJ7FL6Hrq1gnAo4
3Iv9qV0JiT2wmZciNyYQhmA1V6dyTRiQ4YAc31zOo2IM+xisPzeSHgw3ONY/XhYvfZ9r7W1l
pNQdc2G+o4Di9NPFHQQhDw3YTRR1opJaTlRDzxYxzU6ZnUUBghxt9cwUWTpfCktkMZiPSDGd
KgQBjnweV2jw9UOTxjb4LXqDjmSNkjDdQUOU69jGMUXgihvo4zhYcMX8F5gWdRtMR7DzW/YE
BgVcyxNkMIXoY1aYj6npHYiNQesQlqjU6azjbH70/SXKM5tNRplgW8TNprMDuntdvV9wNkFs
9TyM02V5aWxFfI42+aivc4KEw69SE9KXwC7FSf5wXzuTot97N9Phj/Z3+jx443jo2NR34XgF
89cct7wJMjOF7bBefo0fPPZQuIma0Zym71cP61OP/i11ahNye6HGKfxGCOcs5wW9kRQEk8P9
M/k2wt3mt/fCQnuP/mWutNPt95w9wSsUyATLmtNrwccz63XOwU0EVcufkQEQAOfX3n0g0fZz
Bgm/S2zF/kxQKCEKP8ID+Vz8sy2GpDvveBq4H2Y34XWsT1zLJdvqPI4af4ZSMxuerWjXbVWb
T6d4odQIG0fKx4F8NccDqbgHeZRNajXeeJ3R7gAzvWvQNLz4piHrO/B4tf8svmRBL0ZB5P5A
2uhdwLU3NZuK22zpNn4is87BPWF8HhY0L5fafgDMOqnf4guJVJPYNPhUFzXUbPqOKOkL8ojk
CXxkOFHAbjstSK5Ca3fKquY3rdX3DNo+EL7FvAiw1mUtS+5GeYE+RMnDCsVFm/C7kY8c2d0G
NWkB9pJM5+mnIoFNxy7YBcldYATVeOHoY4LyaUWNnAvFYWp08dHWfZo9WCiJMuTfgtH9tc75
7QanMVdPt6fDK8UUXIBLQ2TWr/sQKE9xtFuEmoQGlE1l6bGaDnnMLcYu+Asp3kDT0w4zYGsx
5r6XQVRH4+5N6eHZiaeYtFOujp5n+pjBaQK7wUUjDilPQ5QMzIuCL4YjVoylWiBNknvQWBXS
lQCWmavOT9sttGQXdPCC5ynI+1ymZC1ORZKANLnRAb0NH/UCzcsstw2TAkFnMEbo9Zu9w7Kv
AxBQXWeXhJI9XQssfrf4Gusdqx8nPEpfOqCtbbwJMATbHyqLt7/oz/5deGuwxgb65pWIzufa
N7eop7uh+6bezi+rugUI+w6DABEBAAHCwXwEGAEIACYCGwwWIQQb2cqtc1xMOkYN/MpN3hD3
AP+DWgUCXw7HsgUJEqkpoQAKCRBN3hD3AP+DWrrpD/4qS3dyVRxDcDHIlmguXjC1Q5tZTwNB
boaBTPHSy/Nksu0eY7x6HfQJ3xajVH32Ms6t1trDQmPx2iP5+7iDsb7OKAb5eOS8h+BEBDeq
3ecsQDv0fFJOA9ag5O3LLNk+3x3q7e0uo06XMaY7UHS341ozXUUI7wC7iKfoUTv03iO9El5f
XpNMx/YrIMduZ2+nd9Di7o5+KIwlb2mAB9sTNHdMrXesX8eBL6T9b+MZJk+mZuPxKNVfEQMQ
a5SxUEADIPQTPNvBewdeI80yeOCrN+Zzwy/Mrx9EPeu59Y5vSJOx/z6OUImD/GhX7Xvkt3kq
Er5KTrJz3++B6SH9pum9PuoE/k+nntJkNMmQpR4MCBaV/J9gIOPGodDKnjdng+mXliF3Ptu6
3oxc2RCyGzTlxyMwuc2U5Q7KtUNTdDe8T0uE+9b8BLMVQDDfJjqY0VVqSUwImzTDLX9S4g/8
kC4HRcclk8hpyhY2jKGluZO0awwTIMgVEzmTyBphDg/Gx7dZU1Xf8HFuE+UZ5UDHDTnwgv7E
th6RC9+WrhDNspZ9fJjKWRbveQgUFCpe1sa77LAw+XFrKmBHXp9ZVIe90RMe2tRL06BGiRZr
jPrnvUsUUsjRoRNJjKKA/REq+sAnhkNPPZ/NNMjaZ5b8Tovi8C0tmxiCHaQYqj7G2rgnT0kt
WNyWQQ==
Organization: Red Hat
In-Reply-To: <92cc1bfb-ab7a-4abc-afd0-49f8f2d12da0@xxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 04.06.25 12:38, Dev Jain wrote:
On 22/05/25 9:48 pm, David Hildenbrand wrote:
On 22.05.25 09:47, Dev Jain wrote:
On 22/05/25 12:43 pm, David Hildenbrand wrote:
... likely with a better function name,
I want to be able to reuse the folio from vm_normal_folio(), and we
also
need
nr_ptes to know how much to skip, so if there is no objection in
passing
int *nr_ptes,
or struct folio **foliop to this new function, then I'll carry on with
your suggestion :)
Can you quickly prototype what you have in mind and paste it here?
Will make it easier :)
if (prot_numa)
func(vma, addr, oldpte, &nr);
I'd probably return "nr_ptes" and return the folio using a &folio
instead.
That way, you can easily extend the function to return the folio in
the patch where you really need it (not this patch IIUR :) )
Just confirming, you mean to return nr_ptes and get the folio by passing
&folio, and the function parameter will be struct folio **foliop?
Yes.
--
Cheers,
David / dhildenb
Return-Path: <linux-kernel+bounces-673138-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 56AE141E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:45:36 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 67B313A5C32
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:45:14 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 8002A23A562;
Wed, 4 Jun 2025 11:45:30 +0000 (UTC)
Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6323C1E1DE7
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:45:26 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.199
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749037530; cv=none; b=YoO4SIa0fsQlZygALDtM9iFXPw/3M7VykxZKjjYxaLwv+7IfkZ93brSVeVwZnDS5KYJ06G6sk9rnFb8C/e2pWo7zO6EpVQn6Ec/x9kXNGL4tpxQbYjTTuwmA8EJ5/DIy1IVK2kIY52vpbdf5FoM2ZEKpFDcdex0Y0FKcYDAsI1Y=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749037530; c=relaxed/simple;
bh=TmHCFiRDPScVcYmoA0LMLEoluTj57EotqkbpUyllzTI=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=W1v/FSIIChSvJC04T1FMSuogYtYCHPoQqSYn/0GnACcfJx7Z+UMc1updascX+7zoNnn37NC+Xf3ToxrOqTvPWrggyD3dhUMowPpkPK33CR8scb5cGB3ivqYXIm7bRuNTscvOOhBkqZSOsyaUbzttCG0iA1KBZdsMCUdo7xuQInM=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ghiti.fr; spf=pass smtp.mailfrom=ghiti.fr; arc=none smtp.client-ip=217.70.183.199
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ghiti.fr
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ghiti.fr
Received: by mail.gandi.net (Postfix) with ESMTPSA id 6790B439B4;
Wed, 4 Jun 2025 11:45:19 +0000 (UTC)
Message-ID: <57a1ced6-406b-4197-96ca-6b83d99ca1a0@xxxxxxxx>
Date: Wed, 4 Jun 2025 13:45:18 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v2] RISC-V: vDSO: Wire up getrandom() vDSO implementation
To: Xi Ruoyao <xry111@xxxxxxxxxxx>,
=?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= <thomas.weissschuh@xxxxxxxxxxxxx>,
Nathan Chancellor <nathan@xxxxxxxxxx>
Cc: "Jason A. Donenfeld" <Jason@xxxxxxxxx>,
Paul Walmsley <paul.walmsley@xxxxxxxxxx>, Palmer Dabbelt
<palmer@xxxxxxxxxxx>, Guo Ren <guoren@xxxxxxxxxx>,
linux-riscv@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
References: <20250411024600.16045-1-xry111@xxxxxxxxxxx>
<20250411095103-2aad099a-e4a1-4efb-8374-dd27bf05b668@xxxxxxxxxxxxx>
<a2477829-f3a5-4763-89f3-8c2c1f4716b8@xxxxxxxx>
<7f840a23ab8865d7f205caec56817c660e237d64.camel@xxxxxxxxxxx>
<71f093d5-4823-4bc6-b9ee-23433bd8c60c@xxxxxxxx>
<0f0eb024d7ed062141a8aa048017e6f7ef7c1fd4.camel@xxxxxxxxxxx>
Content-Language: en-US
From: Alexandre Ghiti <alex@xxxxxxxx>
In-Reply-To: <0f0eb024d7ed062141a8aa048017e6f7ef7c1fd4.camel@xxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-GND-State: clean
X-GND-Score: -100
X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddugddvtdelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfevfhfhjggtgfesthekredttddvjeenucfhrhhomheptehlvgigrghnughrvgcuifhhihhtihcuoegrlhgvgiesghhhihhtihdrfhhrqeenucggtffrrghtthgvrhhnpeffhfdvfedtvdffhffhleejveeviedvffdtudegveffffegffdtieetveehjeduveenucffohhmrghinhepkhgvrhhnvghlrdhorhhgpdhlughsrdhssgenucfkphepudelfedrfeefrdehjedrudelleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduleefrdeffedrheejrdduleelpdhhvghloheplgduledvrdduieekrddvuddrvdeingdpmhgrihhlfhhrohhmpegrlhgvgiesghhhihhtihdrfhhrpdhnsggprhgtphhtthhopeelpdhrtghpthhtohepgihrhiduudduseigrhihudduuddrshhithgvpdhrtghpthhtohepthhhohhmrghsrdifvghishhsshgthhhuhheslhhinhhuthhrohhnihigrdguvgdprhgtphhtthhopehnrghthhgrnheskhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplfgrshhonhesiiigvdgtgedrtghomhdprhgtphhtthhopehprghulhdrfigrlhhmshhlvgihsehsihhfihhvvgdrt
ghomhdprhgtphhtthhopehprghlmhgvrhesuggrsggsvghlthdrtghomhdprhgtphhtthhopehguhhorhgvnheskhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqrhhishgtvheslhhishhtshdrihhnfhhrrgguvggrugdrohhrgh
X-GND-Sasl: alex@xxxxxxxx
X-Spam-Status: No, score=-3.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hi Xi,
On 6/3/25 14:48, Xi Ruoyao wrote:
On Fri, 2025-05-23 at 12:06 +0200, Alexandre Ghiti wrote:
On 5/23/25 10:02, Xi Ruoyao wrote:
On Fri, 2025-05-23 at 10:01 +0200, Alexandre Ghiti wrote:
Hi Xi,
On 4/11/25 10:04, Thomas Weißschuh wrote:
On Fri, Apr 11, 2025 at 10:46:00AM +0800, Xi Ruoyao wrote:
Hook up the generic vDSO implementation to the generic vDSO
getrandom
implementation by providing the required
__arch_chacha20_blocks_nostack
and getrandom_syscall implementations. Also wire up the selftests.
The benchmark result:
vdso: 25000000 times in 2.466341333 seconds
libc: 25000000 times in 41.447720005 seconds
syscall: 25000000 times in 41.043926672 seconds
vdso: 25000000 x 256 times in 162.286219353 seconds
libc: 25000000 x 256 times in 2953.855018685 seconds
syscall: 25000000 x 256 times in 2796.268546000 seconds
Signed-off-by: Xi Ruoyao <xry111@xxxxxxxxxxx>
---
[v1]->v2:
- Fix the commit message.
- Only build the vDSO getrandom code if CONFIG_VDSO_GETRANDOM, to
unbreak RV32 build.
- Likewise, only enable the selftest if __riscv_xlen == 64.
[v1]:
https://lore.kernel.org/all/20250224122541.65045-1-xry111@xxxxxxxxxxx/
arch/riscv/Kconfig | 1 +
arch/riscv/include/asm/vdso/getrandom.h | 30 +++
arch/riscv/kernel/vdso/Makefile | 12 +
arch/riscv/kernel/vdso/getrandom.c | 10 +
arch/riscv/kernel/vdso/vdso.lds.S | 1 +
arch/riscv/kernel/vdso/vgetrandom-chacha.S | 244
++++++++++++++++++
.../selftests/vDSO/vgetrandom-chacha.S | 2 +
7 files changed, 300 insertions(+)
create mode 100644 arch/riscv/include/asm/vdso/getrandom.h
create mode 100644 arch/riscv/kernel/vdso/getrandom.c
create mode 100644 arch/riscv/kernel/vdso/vgetrandom-chacha.S
<snip>
diff --git a/arch/riscv/kernel/vdso/vdso.lds.S
b/arch/riscv/kernel/vdso/vdso.lds.S
index 8e86965a8aae..abc69cda0445 100644
--- a/arch/riscv/kernel/vdso/vdso.lds.S
+++ b/arch/riscv/kernel/vdso/vdso.lds.S
@@ -80,6 +80,7 @@ VERSION
#ifndef COMPAT_VDSO
__vdso_riscv_hwprobe;
#endif
+ __vdso_getrandom;
For consistency this could be gated behind CONFIG_VDSO_GETRANDOM.
Nathan sent a fix for this here:
https://lore.kernel.org/all/20250423-riscv-fix-compat_vdso-lld-v2-1-b7bbbc244501@xxxxxxxxxx/
I've given it an R-b. Do you prefer me to squash the patches and keep
the SoB of both I and Nathan?
Hmm I was about to send a new PR today after the CI passes, I mentioned
Nathan's patch in the squash so he keeps credit for the fix. Unless you
can send something today, I'll keep my squashed patch.
Palmer has reverted this in for-next and Thomas just informed me another
mistake in the code at https://lore.kernel.org/all/20250603-loongarch-
vdso-syscall-v1-1-6d12d6dfbdd0@xxxxxxxxxxxxx/.
I'll try to sort things up and send v3 in the week.
I already sent this patch with a few fixes in my second PR for 6.16
(https://git.kernel.org/pub/scm/linux/kernel/git/alexghiti/linux.git/commit/?h=alex-for-next-sbi-3.0-rebase-6.15-rc6&id=dc5240f09bca7b5fc72ad8894d6b9321bce51139)
Can you just send the fix? I'll merge it next week in -rc2.
Thanks,
Alex
Return-Path: <linux-kernel+bounces-673139-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 875E441E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:49:42 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id C22C8177138
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:49:43 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 4185D24C664;
Wed, 4 Jun 2025 11:49:39 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="is9MVYSO"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 793F051C5A;
Wed, 4 Jun 2025 11:49:38 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749037778; cv=none; b=YwlfaZxAqh61VuG5bxeezPTk4XlSVAyPRDhFgpz7rw1+AVixw9XGkvYHfdtuFTg7M5w08ZPGls/KKZu1kbl/C10dyhtJfEcJBG+WtH4joMA5cCLPjJzEeekI3bpFR3J1aluWhY1OSEPNFUgUlPWSp0E6yD+QObXtZ02PH3raRWw=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749037778; c=relaxed/simple;
bh=LWoCnVWu9kyApgL0kLFdiS1HexGeNKcPhWj+9WD/Kfc=;
h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:
MIME-Version; b=cs4hW2XX3dhX/49HMoCjp1DqVNjVCt1tdI3OPbwk3pBoVOvMlfp8Pd50xgvZB4Vp0F5/4SyHXunWxw7715B63PpMklsOTvx3WuZ3XL84JvVmIvF7R6PfUyKN4OvrMoXCxKHS20pkxlaFkOMf7BJwyiecgraPxJ14yklYYz5Cuf8=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=is9MVYSO; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0CDBAC4CEF1;
Wed, 4 Jun 2025 11:49:36 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749037778;
bh=LWoCnVWu9kyApgL0kLFdiS1HexGeNKcPhWj+9WD/Kfc=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=is9MVYSOVtMnrgwzOzakjMU3j5YIu5jgPQCNZ1v4fPjqDWeZMLwzYyBcKFjy39C4D
v1Z9szTqR0IVIkZ8VSvcQ/61F2FrKKPFeKJx9w5BsVn3tqUY7N9O2w8cxInat0Fhe0
i9el7HpsFNYdvn0r8YdXYW9DRKMbvFD/fmIgfybGB1Q+tOKfx0r+U3tP7msrCzSxZl
jABrlyGkysOSPZr5SMDuId1rfK4kTiFCnf7AdGKKbbJHlAxjVpsLvMrQ2EEuMhlMeA
4kvekT8tH+9tVFypIl/1TWw68frh2gDhlwiGu+Az0R2MTx+PVIjsm5iIMUbijCu7S1
UFrPJ24rpPleA==
From: Sasha Levin <sashal@xxxxxxxxxx>
To: patches@xxxxxxxxxxxxxxx,
stable@xxxxxxxxxxxxxxx
Cc: Laurentiu Tudor <laurentiu.tudor@xxxxxxx>,
Ioana Ciornei <ioana.ciornei@xxxxxxx>,
Christophe Leroy <christophe.leroy@xxxxxxxxxx>,
Sasha Levin <sashal@xxxxxxxxxx>,
linuxppc-dev@xxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
Subject: [PATCH AUTOSEL 6.15 6/9] bus: fsl-mc: increase MC_CMD_COMPLETION_TIMEOUT_MS value
Date: Wed, 4 Jun 2025 07:49:19 -0400
Message-Id: <20250604114923.208380-6-sashal@xxxxxxxxxx>
X-Mailer: git-send-email 2.39.5
In-Reply-To: <20250604114923.208380-1-sashal@xxxxxxxxxx>
References: <20250604114923.208380-1-sashal@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-stable: review
X-Patchwork-Hint: Ignore
X-stable-base: Linux 6.15
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
From: Laurentiu Tudor <laurentiu.tudor@xxxxxxx>
[ Upstream commit 23d060136841c58c2f9ee8c08ad945d1879ead4b ]
In case the MC firmware runs in debug mode with extensive prints pushed
to the console, the current timeout of 500ms is not enough.
Increase the timeout value so that we don't have any chance of wrongly
assuming that the firmware is not responding when it's just taking more
time.
Signed-off-by: Laurentiu Tudor <laurentiu.tudor@xxxxxxx>
Signed-off-by: Ioana Ciornei <ioana.ciornei@xxxxxxx>
Link: https://lore.kernel.org/r/20250408105814.2837951-7-ioana.ciornei@xxxxxxx
Signed-off-by: Christophe Leroy <christophe.leroy@xxxxxxxxxx>
Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
---
Based on my analysis of the commit and the surrounding code context,
here is my assessment: **YES** This commit should be backported to
stable kernel trees. **Detailed Analysis:** **1. Bug Fix Nature:** This
commit addresses a real timeout issue where legitimate MC firmware
operations can fail due to an inadequate timeout value. The commit
message explicitly states that "In case the MC firmware runs in debug
mode with extensive prints pushed to the console, the current timeout of
500ms is not enough." **2. Code Change Analysis:** The change is minimal
and surgical: - Changes a single timeout constant from 500ms to 15000ms
(15 seconds) - Only affects `drivers/bus/fsl-mc/mc-sys.c:22` - No
architectural changes or new functionality added - The timeout is used
in both `mc_polling_wait_preemptible()` and `mc_polling_wait_atomic()`
functions that handle MC command completion **3. Risk Assessment:** The
change has minimal risk: - Increasing a timeout value is generally safe
and doesn't change behavior for successful operations - Only affects
systems with Freescale/NXP DPAA2 Management Complex hardware - The
original 500ms timeout was clearly insufficient for legitimate use cases
- Similar to successful backports in the reference commits (e.g.,
Similar Commit #1 and #3 which both increased timeouts) **4. Impact and
Importance:** - Fixes a real user-facing issue where MC commands fail
with timeouts during firmware debug scenarios - The FSL-MC bus is
critical infrastructure for DPAA2 networking architecture on NXP ARM
SoCs - Timeout failures can cause device initialization problems and
system instability - The `mc_send_command()` function is used
extensively throughout the FSL-MC subsystem for all hardware
communication **5. Comparison with Similar Commits:** - Very similar to
Similar Commit #1 (UCSI timeout increase from 1s to 5s) - **Status:
YES** - Very similar to Similar Commit #3 (MLX5 timeout decrease from 2
hours to 60s) - **Status: YES** - Both of these were timeout adjustments
that got backported successfully **6. Subsystem Scope:** The change is
contained within the FSL-MC bus driver subsystem and only affects NXP
DPAA2 hardware platforms, making it a safe candidate for stable trees.
**7. Explicit Stable Tree Criteria:** This meets the stable tree
criteria: - Fixes an important bug affecting real users - Small and
contained change with minimal regression risk - No new features or
architectural changes - Addresses a timeout issue that can cause system
functionality problems The commit represents a classic example of a
safe, important bug fix that should be backported to help users
experiencing MC command timeouts in production environments, especially
during firmware debugging scenarios.
drivers/bus/fsl-mc/mc-sys.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/bus/fsl-mc/mc-sys.c b/drivers/bus/fsl-mc/mc-sys.c
index f2052cd0a0517..b22c59d57c8f0 100644
--- a/drivers/bus/fsl-mc/mc-sys.c
+++ b/drivers/bus/fsl-mc/mc-sys.c
@@ -19,7 +19,7 @@
/*
* Timeout in milliseconds to wait for the completion of an MC command
*/
-#define MC_CMD_COMPLETION_TIMEOUT_MS 500
+#define MC_CMD_COMPLETION_TIMEOUT_MS 15000
/*
* usleep_range() min and max values used to throttle down polling
--
2.39.5
Return-Path: <linux-kernel+bounces-673140-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 0167641E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:50:12 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 258DF18965EA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:50:21 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id D91BE28ECE0;
Wed, 4 Jun 2025 11:49:54 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="GD1+vIdl"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1C89524BBE4;
Wed, 4 Jun 2025 11:49:53 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749037794; cv=none; b=lSFYiQw/j8Jn5/GOTlTpGuTJ0nuyHNg9JcliLzQXqki10tz33jQq12hhUtf9OvaTUSjNvOh+PAmhFRqoygGWl4yeAtyoeaalayKSjXkjhOMmnCJnqTzMEwiQxcpCShjSoTIR8ilcopm05zDtJ+ZrqV/ncq2H19RQAyT73T6zmKg=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749037794; c=relaxed/simple;
bh=LWoCnVWu9kyApgL0kLFdiS1HexGeNKcPhWj+9WD/Kfc=;
h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:
MIME-Version; b=gomj5UmTXUFkpp5NrsjdLRz7w3NbK2zHftl0Uptz2xL9kY6iGOsVh38M1MdsxQNP6TYk5XU/e1TSB3DBI4dX3gRq3sJ73FgMiso8DcKxFL+2DoO+mUyVYEbhw4b6R4sLApatEBfwHAPLsCLWq9eU6G/9TDI44dtZvAPEOb5wbk4=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GD1+vIdl; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id B5F0AC4CEE7;
Wed, 4 Jun 2025 11:49:52 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749037793;
bh=LWoCnVWu9kyApgL0kLFdiS1HexGeNKcPhWj+9WD/Kfc=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=GD1+vIdlvALfa654LyRw7iwQtzrVx4c5UTxu1fsr3/qFEU2EQAh5zxPuSeiZLogza
5EdH9kBuU2R3zN8nPhYcZv5r4q7rIMwP6mAmzMLByhBxTwklCCxMaTp9iwUH/JfVLj
//Zo1sHvaA3KiElX6e+UhROfdXPTpkzXVgE0LAj7s0b/t6F7bUaSIWnxCUvHq1+FhO
Btkx+Yp+dHFR4/gszF35OfGlVWy73boOATwxqOVwvzVH20uOxHL/mK4oAAMgGBMt7k
yEB6ijCtTUxRbvSVGIxx5TSnKAoDe+m4eLdEsXkTYDOu5Vv85HFTMxH9CVCXC8k2R3
sSYBsUttWiDXA==
From: Sasha Levin <sashal@xxxxxxxxxx>
To: patches@xxxxxxxxxxxxxxx,
stable@xxxxxxxxxxxxxxx
Cc: Laurentiu Tudor <laurentiu.tudor@xxxxxxx>,
Ioana Ciornei <ioana.ciornei@xxxxxxx>,
Christophe Leroy <christophe.leroy@xxxxxxxxxx>,
Sasha Levin <sashal@xxxxxxxxxx>,
linuxppc-dev@xxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
Subject: [PATCH AUTOSEL 6.14 5/8] bus: fsl-mc: increase MC_CMD_COMPLETION_TIMEOUT_MS value
Date: Wed, 4 Jun 2025 07:49:40 -0400
Message-Id: <20250604114944.208828-5-sashal@xxxxxxxxxx>
X-Mailer: git-send-email 2.39.5
In-Reply-To: <20250604114944.208828-1-sashal@xxxxxxxxxx>
References: <20250604114944.208828-1-sashal@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-stable: review
X-Patchwork-Hint: Ignore
X-stable-base: Linux 6.14.9
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
From: Laurentiu Tudor <laurentiu.tudor@xxxxxxx>
[ Upstream commit 23d060136841c58c2f9ee8c08ad945d1879ead4b ]
In case the MC firmware runs in debug mode with extensive prints pushed
to the console, the current timeout of 500ms is not enough.
Increase the timeout value so that we don't have any chance of wrongly
assuming that the firmware is not responding when it's just taking more
time.
Signed-off-by: Laurentiu Tudor <laurentiu.tudor@xxxxxxx>
Signed-off-by: Ioana Ciornei <ioana.ciornei@xxxxxxx>
Link: https://lore.kernel.org/r/20250408105814.2837951-7-ioana.ciornei@xxxxxxx
Signed-off-by: Christophe Leroy <christophe.leroy@xxxxxxxxxx>
Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
---
Based on my analysis of the commit and the surrounding code context,
here is my assessment: **YES** This commit should be backported to
stable kernel trees. **Detailed Analysis:** **1. Bug Fix Nature:** This
commit addresses a real timeout issue where legitimate MC firmware
operations can fail due to an inadequate timeout value. The commit
message explicitly states that "In case the MC firmware runs in debug
mode with extensive prints pushed to the console, the current timeout of
500ms is not enough." **2. Code Change Analysis:** The change is minimal
and surgical: - Changes a single timeout constant from 500ms to 15000ms
(15 seconds) - Only affects `drivers/bus/fsl-mc/mc-sys.c:22` - No
architectural changes or new functionality added - The timeout is used
in both `mc_polling_wait_preemptible()` and `mc_polling_wait_atomic()`
functions that handle MC command completion **3. Risk Assessment:** The
change has minimal risk: - Increasing a timeout value is generally safe
and doesn't change behavior for successful operations - Only affects
systems with Freescale/NXP DPAA2 Management Complex hardware - The
original 500ms timeout was clearly insufficient for legitimate use cases
- Similar to successful backports in the reference commits (e.g.,
Similar Commit #1 and #3 which both increased timeouts) **4. Impact and
Importance:** - Fixes a real user-facing issue where MC commands fail
with timeouts during firmware debug scenarios - The FSL-MC bus is
critical infrastructure for DPAA2 networking architecture on NXP ARM
SoCs - Timeout failures can cause device initialization problems and
system instability - The `mc_send_command()` function is used
extensively throughout the FSL-MC subsystem for all hardware
communication **5. Comparison with Similar Commits:** - Very similar to
Similar Commit #1 (UCSI timeout increase from 1s to 5s) - **Status:
YES** - Very similar to Similar Commit #3 (MLX5 timeout decrease from 2
hours to 60s) - **Status: YES** - Both of these were timeout adjustments
that got backported successfully **6. Subsystem Scope:** The change is
contained within the FSL-MC bus driver subsystem and only affects NXP
DPAA2 hardware platforms, making it a safe candidate for stable trees.
**7. Explicit Stable Tree Criteria:** This meets the stable tree
criteria: - Fixes an important bug affecting real users - Small and
contained change with minimal regression risk - No new features or
architectural changes - Addresses a timeout issue that can cause system
functionality problems The commit represents a classic example of a
safe, important bug fix that should be backported to help users
experiencing MC command timeouts in production environments, especially
during firmware debugging scenarios.
drivers/bus/fsl-mc/mc-sys.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/bus/fsl-mc/mc-sys.c b/drivers/bus/fsl-mc/mc-sys.c
index f2052cd0a0517..b22c59d57c8f0 100644
--- a/drivers/bus/fsl-mc/mc-sys.c
+++ b/drivers/bus/fsl-mc/mc-sys.c
@@ -19,7 +19,7 @@
/*
* Timeout in milliseconds to wait for the completion of an MC command
*/
-#define MC_CMD_COMPLETION_TIMEOUT_MS 500
+#define MC_CMD_COMPLETION_TIMEOUT_MS 15000
/*
* usleep_range() min and max values used to throttle down polling
--
2.39.5
Return-Path: <linux-kernel+bounces-673141-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id D52D541E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:50:40 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 7D4A21898BAA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:50:41 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 8565A28E610;
Wed, 4 Jun 2025 11:50:06 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OJG+YXt8"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id BA68228EA7E;
Wed, 4 Jun 2025 11:50:05 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749037805; cv=none; b=YFqR0P8F9SjzmrdsOidqmNemsPaQkHTYkiIAs2YdHfuBupgB7yMfcopfZ7QMmvv50J9PUlJlREVWh0jU3X8Jaz4tgSrsp2aFCa9hUjbVHn93FlV3ELROzZzbBu83bexxapgcW6Z4+3qxHvN0YvBcx9SubaPQh2EIQFJ7XQJjjMM=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749037805; c=relaxed/simple;
bh=LWoCnVWu9kyApgL0kLFdiS1HexGeNKcPhWj+9WD/Kfc=;
h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:
MIME-Version; b=uU5pEIT6ml1kXERQbbzwO7eOCrJ61AXP0Pz3HmvNZO0q8W+9TgxfyNvRD6F27LYgYGsDwffFTSAH3uhsXboVlRUq8b/Q4mqhUJFI5s76rTBrR9HKSvvjDoMPKEhcpgKY+cPyhB7n5IK1Llg2ylNoAoksIHMh3QT4+ZXROiw6/e0=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OJG+YXt8; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5A80FC4CEE7;
Wed, 4 Jun 2025 11:50:04 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749037805;
bh=LWoCnVWu9kyApgL0kLFdiS1HexGeNKcPhWj+9WD/Kfc=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=OJG+YXt8zz97M7jq/f/zzzHBc+dzXxMjBNWdM9edR++S+nVa6dvDPhkTt7z1sYyFq
8jnq2Sp28TD4FbjZWiW8Z1gDyUq+1fTVp8qzQHuCti1Xp0bO3UEASOKl3RXwVb5qpu
vzlgcQb2OFBAwBjg+eJJ16usuK8i7608LfxFn6Kq9ZZVxh6vCt0RYCk1sieugnmDKR
xjjZeOSa4nkSpyPQacsMMnWidWZYkloMgRp+gayWffsNP7NOCNuCGsEZnrwxyFU8BG
Tf+bJ5qiThtskXC19f31bga7vG1K/bPgyaKD1FW/tO69o4pAL9uC+Qh77rUNzPtJOf
Va1bYp9ueWpdA==
From: Sasha Levin <sashal@xxxxxxxxxx>
To: patches@xxxxxxxxxxxxxxx,
stable@xxxxxxxxxxxxxxx
Cc: Laurentiu Tudor <laurentiu.tudor@xxxxxxx>,
Ioana Ciornei <ioana.ciornei@xxxxxxx>,
Christophe Leroy <christophe.leroy@xxxxxxxxxx>,
Sasha Levin <sashal@xxxxxxxxxx>,
linuxppc-dev@xxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
Subject: [PATCH AUTOSEL 6.12 3/6] bus: fsl-mc: increase MC_CMD_COMPLETION_TIMEOUT_MS value
Date: Wed, 4 Jun 2025 07:49:55 -0400
Message-Id: <20250604114959.209031-3-sashal@xxxxxxxxxx>
X-Mailer: git-send-email 2.39.5
In-Reply-To: <20250604114959.209031-1-sashal@xxxxxxxxxx>
References: <20250604114959.209031-1-sashal@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-stable: review
X-Patchwork-Hint: Ignore
X-stable-base: Linux 6.12.31
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
From: Laurentiu Tudor <laurentiu.tudor@xxxxxxx>
[ Upstream commit 23d060136841c58c2f9ee8c08ad945d1879ead4b ]
In case the MC firmware runs in debug mode with extensive prints pushed
to the console, the current timeout of 500ms is not enough.
Increase the timeout value so that we don't have any chance of wrongly
assuming that the firmware is not responding when it's just taking more
time.
Signed-off-by: Laurentiu Tudor <laurentiu.tudor@xxxxxxx>
Signed-off-by: Ioana Ciornei <ioana.ciornei@xxxxxxx>
Link: https://lore.kernel.org/r/20250408105814.2837951-7-ioana.ciornei@xxxxxxx
Signed-off-by: Christophe Leroy <christophe.leroy@xxxxxxxxxx>
Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
---
Based on my analysis of the commit and the surrounding code context,
here is my assessment: **YES** This commit should be backported to
stable kernel trees. **Detailed Analysis:** **1. Bug Fix Nature:** This
commit addresses a real timeout issue where legitimate MC firmware
operations can fail due to an inadequate timeout value. The commit
message explicitly states that "In case the MC firmware runs in debug
mode with extensive prints pushed to the console, the current timeout of
500ms is not enough." **2. Code Change Analysis:** The change is minimal
and surgical: - Changes a single timeout constant from 500ms to 15000ms
(15 seconds) - Only affects `drivers/bus/fsl-mc/mc-sys.c:22` - No
architectural changes or new functionality added - The timeout is used
in both `mc_polling_wait_preemptible()` and `mc_polling_wait_atomic()`
functions that handle MC command completion **3. Risk Assessment:** The
change has minimal risk: - Increasing a timeout value is generally safe
and doesn't change behavior for successful operations - Only affects
systems with Freescale/NXP DPAA2 Management Complex hardware - The
original 500ms timeout was clearly insufficient for legitimate use cases
- Similar to successful backports in the reference commits (e.g.,
Similar Commit #1 and #3 which both increased timeouts) **4. Impact and
Importance:** - Fixes a real user-facing issue where MC commands fail
with timeouts during firmware debug scenarios - The FSL-MC bus is
critical infrastructure for DPAA2 networking architecture on NXP ARM
SoCs - Timeout failures can cause device initialization problems and
system instability - The `mc_send_command()` function is used
extensively throughout the FSL-MC subsystem for all hardware
communication **5. Comparison with Similar Commits:** - Very similar to
Similar Commit #1 (UCSI timeout increase from 1s to 5s) - **Status:
YES** - Very similar to Similar Commit #3 (MLX5 timeout decrease from 2
hours to 60s) - **Status: YES** - Both of these were timeout adjustments
that got backported successfully **6. Subsystem Scope:** The change is
contained within the FSL-MC bus driver subsystem and only affects NXP
DPAA2 hardware platforms, making it a safe candidate for stable trees.
**7. Explicit Stable Tree Criteria:** This meets the stable tree
criteria: - Fixes an important bug affecting real users - Small and
contained change with minimal regression risk - No new features or
architectural changes - Addresses a timeout issue that can cause system
functionality problems The commit represents a classic example of a
safe, important bug fix that should be backported to help users
experiencing MC command timeouts in production environments, especially
during firmware debugging scenarios.
drivers/bus/fsl-mc/mc-sys.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/bus/fsl-mc/mc-sys.c b/drivers/bus/fsl-mc/mc-sys.c
index f2052cd0a0517..b22c59d57c8f0 100644
--- a/drivers/bus/fsl-mc/mc-sys.c
+++ b/drivers/bus/fsl-mc/mc-sys.c
@@ -19,7 +19,7 @@
/*
* Timeout in milliseconds to wait for the completion of an MC command
*/
-#define MC_CMD_COMPLETION_TIMEOUT_MS 500
+#define MC_CMD_COMPLETION_TIMEOUT_MS 15000
/*
* usleep_range() min and max values used to throttle down polling
--
2.39.5
Return-Path: <linux-kernel+bounces-673142-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 531BB41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:50:49 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 8930C7AAC41
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:49:29 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 7A5CD28ECF9;
Wed, 4 Jun 2025 11:50:17 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="u5yesk56"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id B856B28EA7E;
Wed, 4 Jun 2025 11:50:16 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749037816; cv=none; b=hROKuriJJbSTgp23qHJrTVPJOMS/0OA3aMUoD02Jg/a/n0C4oGK9o4yoqEqcGd4VX1mQkhL6zD/JOeN5LYaGCdgZ93/9RklknWeqpna/x0oy8Y+IZHpEvuZ4jiYD2hO0NI1x9hankIjjhIMkYyAvBeIQKLZHzvat81lZLItz2zs=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749037816; c=relaxed/simple;
bh=LWoCnVWu9kyApgL0kLFdiS1HexGeNKcPhWj+9WD/Kfc=;
h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:
MIME-Version; b=C2L+f20QKo1e6EQfDEh2sLUz9VFTwB3u4KrDurAtrLZ8xq+AGQnYn0/ZjA64ZgDUbOMurM+Nnr+O+rhtlZBKPf/tCODig+LjITB6Xn9NIXnHNxaKPnR+YjMUXJWfAfRZXdT9azNatf43aaYoSnG6CJJ6UWaw6tAo8/hcWXuGo98=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=u5yesk56; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC85BC4CEF1;
Wed, 4 Jun 2025 11:50:15 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749037816;
bh=LWoCnVWu9kyApgL0kLFdiS1HexGeNKcPhWj+9WD/Kfc=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=u5yesk561O0EPOORX5b2C3JO1Aq7Rp+kW2HIETbav2gcUg7k60F1XlenqEPrFM7CY
0x6MQ/eT/y20QRnafp+Ry5oN5qVfcpCq7BRVPvCKvijftgrs/josOw0mvizRasIgBm
8JNUkCkh0saaNdssfP1kzvEGgMsz6P1Wb96zbTC3Qcp5x3ligRDPFBX5+1NmJLzXet
BqeTOp5kKPwjxx7YYyEYUeWMiSubB0qnkVsZTkBHC4/CaSmvRv1SSUv9sYn0FPEJze
jKAlV4hnm6JRCJ/i23Gx7+y/IGGEM9vD6x4z+esO3IHtpuRPqiCjfPG6mi24K7IuJ0
KmEJsHCUUumrw==
From: Sasha Levin <sashal@xxxxxxxxxx>
To: patches@xxxxxxxxxxxxxxx,
stable@xxxxxxxxxxxxxxx
Cc: Laurentiu Tudor <laurentiu.tudor@xxxxxxx>,
Ioana Ciornei <ioana.ciornei@xxxxxxx>,
Christophe Leroy <christophe.leroy@xxxxxxxxxx>,
Sasha Levin <sashal@xxxxxxxxxx>,
linuxppc-dev@xxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
Subject: [PATCH AUTOSEL 6.6 3/6] bus: fsl-mc: increase MC_CMD_COMPLETION_TIMEOUT_MS value
Date: Wed, 4 Jun 2025 07:50:07 -0400
Message-Id: <20250604115011.209189-3-sashal@xxxxxxxxxx>
X-Mailer: git-send-email 2.39.5
In-Reply-To: <20250604115011.209189-1-sashal@xxxxxxxxxx>
References: <20250604115011.209189-1-sashal@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-stable: review
X-Patchwork-Hint: Ignore
X-stable-base: Linux 6.6.92
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
From: Laurentiu Tudor <laurentiu.tudor@xxxxxxx>
[ Upstream commit 23d060136841c58c2f9ee8c08ad945d1879ead4b ]
In case the MC firmware runs in debug mode with extensive prints pushed
to the console, the current timeout of 500ms is not enough.
Increase the timeout value so that we don't have any chance of wrongly
assuming that the firmware is not responding when it's just taking more
time.
Signed-off-by: Laurentiu Tudor <laurentiu.tudor@xxxxxxx>
Signed-off-by: Ioana Ciornei <ioana.ciornei@xxxxxxx>
Link: https://lore.kernel.org/r/20250408105814.2837951-7-ioana.ciornei@xxxxxxx
Signed-off-by: Christophe Leroy <christophe.leroy@xxxxxxxxxx>
Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
---
Based on my analysis of the commit and the surrounding code context,
here is my assessment: **YES** This commit should be backported to
stable kernel trees. **Detailed Analysis:** **1. Bug Fix Nature:** This
commit addresses a real timeout issue where legitimate MC firmware
operations can fail due to an inadequate timeout value. The commit
message explicitly states that "In case the MC firmware runs in debug
mode with extensive prints pushed to the console, the current timeout of
500ms is not enough." **2. Code Change Analysis:** The change is minimal
and surgical: - Changes a single timeout constant from 500ms to 15000ms
(15 seconds) - Only affects `drivers/bus/fsl-mc/mc-sys.c:22` - No
architectural changes or new functionality added - The timeout is used
in both `mc_polling_wait_preemptible()` and `mc_polling_wait_atomic()`
functions that handle MC command completion **3. Risk Assessment:** The
change has minimal risk: - Increasing a timeout value is generally safe
and doesn't change behavior for successful operations - Only affects
systems with Freescale/NXP DPAA2 Management Complex hardware - The
original 500ms timeout was clearly insufficient for legitimate use cases
- Similar to successful backports in the reference commits (e.g.,
Similar Commit #1 and #3 which both increased timeouts) **4. Impact and
Importance:** - Fixes a real user-facing issue where MC commands fail
with timeouts during firmware debug scenarios - The FSL-MC bus is
critical infrastructure for DPAA2 networking architecture on NXP ARM
SoCs - Timeout failures can cause device initialization problems and
system instability - The `mc_send_command()` function is used
extensively throughout the FSL-MC subsystem for all hardware
communication **5. Comparison with Similar Commits:** - Very similar to
Similar Commit #1 (UCSI timeout increase from 1s to 5s) - **Status:
YES** - Very similar to Similar Commit #3 (MLX5 timeout decrease from 2
hours to 60s) - **Status: YES** - Both of these were timeout adjustments
that got backported successfully **6. Subsystem Scope:** The change is
contained within the FSL-MC bus driver subsystem and only affects NXP
DPAA2 hardware platforms, making it a safe candidate for stable trees.
**7. Explicit Stable Tree Criteria:** This meets the stable tree
criteria: - Fixes an important bug affecting real users - Small and
contained change with minimal regression risk - No new features or
architectural changes - Addresses a timeout issue that can cause system
functionality problems The commit represents a classic example of a
safe, important bug fix that should be backported to help users
experiencing MC command timeouts in production environments, especially
during firmware debugging scenarios.
drivers/bus/fsl-mc/mc-sys.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/bus/fsl-mc/mc-sys.c b/drivers/bus/fsl-mc/mc-sys.c
index f2052cd0a0517..b22c59d57c8f0 100644
--- a/drivers/bus/fsl-mc/mc-sys.c
+++ b/drivers/bus/fsl-mc/mc-sys.c
@@ -19,7 +19,7 @@
/*
* Timeout in milliseconds to wait for the completion of an MC command
*/
-#define MC_CMD_COMPLETION_TIMEOUT_MS 500
+#define MC_CMD_COMPLETION_TIMEOUT_MS 15000
/*
* usleep_range() min and max values used to throttle down polling
--
2.39.5
Return-Path: <linux-kernel+bounces-673143-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 5B84541E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:51:31 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 3D28B3A6001
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:50:45 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 00C9A221FD2;
Wed, 4 Jun 2025 11:50:29 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JCTAfY6H"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3E92924C664;
Wed, 4 Jun 2025 11:50:28 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749037828; cv=none; b=rgdZ5uDGGPG/vve4kECRviIh4Qy/bxgeYYJQcQe1PHz571iqjdWg7ktLAKjHHsnktsL0V2qmAhinvg+F1gLB+dWWoshT+zbSdtRUd7riS+KBjijaZEfeU1LwXasm81aQYMPdbY60kCVFTbQ3hqvd2FHkIgTTjrUb+zRm3eN/yX0=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749037828; c=relaxed/simple;
bh=LWoCnVWu9kyApgL0kLFdiS1HexGeNKcPhWj+9WD/Kfc=;
h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:
MIME-Version; b=MthlAbbI4KMKxQw2XOXYR2/+SezHxgRwtXSSGquCma6l1B7K0M17lrpZpKnYqVq2RgC+oVBglu6V/LYs6EbTcGXSEUNtsq31QF/C401nuBFogxJFweoFSHJn67Oj/YF1jiHeaXg02Pwe2aBRSVI5a4boY2PgyimH384vrI4ye6A=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JCTAfY6H; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 31238C4CEF0;
Wed, 4 Jun 2025 11:50:27 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749037828;
bh=LWoCnVWu9kyApgL0kLFdiS1HexGeNKcPhWj+9WD/Kfc=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=JCTAfY6HcRJkegoi97GsQjUIUcT9TW1XPOYKhxJRzYvEhsZ0V7XAhf2nxMI9Q0Gst
QfwA0ZiITBzmbcPVzGAaggkJdPgVxBlS4IXI+VIHBIBOQj9RB+rH9mo/sgyUEVF1Tp
sezap4SwNESDE3g8Rqa4t9tPz151qXhWd/CPR7RPUPsza/Crlax4sR3LNZ5iM/FgjN
ez3oqLEpqdxfKv2s5MEfHhdWNOFGeKn58+8CgUqbWK6TYlha+IkNcdLLj7RrsDD5ck
ICIKUyTRFrvH+VcYoOFnzUlO9p4jtI9CaiI71Cdx9cjedTCoi5GjUaYi6v0ds3t4FJ
jNnoYrSc9p70g==
From: Sasha Levin <sashal@xxxxxxxxxx>
To: patches@xxxxxxxxxxxxxxx,
stable@xxxxxxxxxxxxxxx
Cc: Laurentiu Tudor <laurentiu.tudor@xxxxxxx>,
Ioana Ciornei <ioana.ciornei@xxxxxxx>,
Christophe Leroy <christophe.leroy@xxxxxxxxxx>,
Sasha Levin <sashal@xxxxxxxxxx>,
linuxppc-dev@xxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
Subject: [PATCH AUTOSEL 6.1 3/6] bus: fsl-mc: increase MC_CMD_COMPLETION_TIMEOUT_MS value
Date: Wed, 4 Jun 2025 07:50:18 -0400
Message-Id: <20250604115022.209346-3-sashal@xxxxxxxxxx>
X-Mailer: git-send-email 2.39.5
In-Reply-To: <20250604115022.209346-1-sashal@xxxxxxxxxx>
References: <20250604115022.209346-1-sashal@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-stable: review
X-Patchwork-Hint: Ignore
X-stable-base: Linux 6.1.140
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
From: Laurentiu Tudor <laurentiu.tudor@xxxxxxx>
[ Upstream commit 23d060136841c58c2f9ee8c08ad945d1879ead4b ]
In case the MC firmware runs in debug mode with extensive prints pushed
to the console, the current timeout of 500ms is not enough.
Increase the timeout value so that we don't have any chance of wrongly
assuming that the firmware is not responding when it's just taking more
time.
Signed-off-by: Laurentiu Tudor <laurentiu.tudor@xxxxxxx>
Signed-off-by: Ioana Ciornei <ioana.ciornei@xxxxxxx>
Link: https://lore.kernel.org/r/20250408105814.2837951-7-ioana.ciornei@xxxxxxx
Signed-off-by: Christophe Leroy <christophe.leroy@xxxxxxxxxx>
Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
---
Based on my analysis of the commit and the surrounding code context,
here is my assessment: **YES** This commit should be backported to
stable kernel trees. **Detailed Analysis:** **1. Bug Fix Nature:** This
commit addresses a real timeout issue where legitimate MC firmware
operations can fail due to an inadequate timeout value. The commit
message explicitly states that "In case the MC firmware runs in debug
mode with extensive prints pushed to the console, the current timeout of
500ms is not enough." **2. Code Change Analysis:** The change is minimal
and surgical: - Changes a single timeout constant from 500ms to 15000ms
(15 seconds) - Only affects `drivers/bus/fsl-mc/mc-sys.c:22` - No
architectural changes or new functionality added - The timeout is used
in both `mc_polling_wait_preemptible()` and `mc_polling_wait_atomic()`
functions that handle MC command completion **3. Risk Assessment:** The
change has minimal risk: - Increasing a timeout value is generally safe
and doesn't change behavior for successful operations - Only affects
systems with Freescale/NXP DPAA2 Management Complex hardware - The
original 500ms timeout was clearly insufficient for legitimate use cases
- Similar to successful backports in the reference commits (e.g.,
Similar Commit #1 and #3 which both increased timeouts) **4. Impact and
Importance:** - Fixes a real user-facing issue where MC commands fail
with timeouts during firmware debug scenarios - The FSL-MC bus is
critical infrastructure for DPAA2 networking architecture on NXP ARM
SoCs - Timeout failures can cause device initialization problems and
system instability - The `mc_send_command()` function is used
extensively throughout the FSL-MC subsystem for all hardware
communication **5. Comparison with Similar Commits:** - Very similar to
Similar Commit #1 (UCSI timeout increase from 1s to 5s) - **Status:
YES** - Very similar to Similar Commit #3 (MLX5 timeout decrease from 2
hours to 60s) - **Status: YES** - Both of these were timeout adjustments
that got backported successfully **6. Subsystem Scope:** The change is
contained within the FSL-MC bus driver subsystem and only affects NXP
DPAA2 hardware platforms, making it a safe candidate for stable trees.
**7. Explicit Stable Tree Criteria:** This meets the stable tree
criteria: - Fixes an important bug affecting real users - Small and
contained change with minimal regression risk - No new features or
architectural changes - Addresses a timeout issue that can cause system
functionality problems The commit represents a classic example of a
safe, important bug fix that should be backported to help users
experiencing MC command timeouts in production environments, especially
during firmware debugging scenarios.
drivers/bus/fsl-mc/mc-sys.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/bus/fsl-mc/mc-sys.c b/drivers/bus/fsl-mc/mc-sys.c
index f2052cd0a0517..b22c59d57c8f0 100644
--- a/drivers/bus/fsl-mc/mc-sys.c
+++ b/drivers/bus/fsl-mc/mc-sys.c
@@ -19,7 +19,7 @@
/*
* Timeout in milliseconds to wait for the completion of an MC command
*/
-#define MC_CMD_COMPLETION_TIMEOUT_MS 500
+#define MC_CMD_COMPLETION_TIMEOUT_MS 15000
/*
* usleep_range() min and max values used to throttle down polling
--
2.39.5
Return-Path: <linux-kernel+bounces-673144-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 9922841E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:51:53 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 207793A5FE6
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:51:06 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id AFE5323BCE2;
Wed, 4 Jun 2025 11:50:37 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="MXPg5C1F"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id EDEF61E1DE7;
Wed, 4 Jun 2025 11:50:36 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749037837; cv=none; b=lgxsPqIZdm2aSqDqCpOR/fF0khPBwLbQz37XfkXjd6bLTT5NC4XKf90vt5dpXP+g4t6A7c04514n3U4kFp5PuyLqRenPnK51TsgWTjVJlyuWk7urFf1ONiWX+ObVPfWQRGPqhiVhmDQv/VKnaa+8dN+L1F/ApbxwSBOTcn+70k8=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749037837; c=relaxed/simple;
bh=LWoCnVWu9kyApgL0kLFdiS1HexGeNKcPhWj+9WD/Kfc=;
h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:
MIME-Version; b=TRdWTm3VHTsYn7VBc9FKQU5071kLe5UKVRgTfUlQEc/eEsZAgTtmyYgX4Nm9LqehM48HKVo+g19X8fr3j0CMeyB1MK9FI7whYX2VPWS9eMyRNA5T8sxMxoQBlxIMQXk4ULwa0sTc0Q4BFy6nta481pz2mVTlepaAjA9wEYTeEvc=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=MXPg5C1F; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id E3B5FC4CEEF;
Wed, 4 Jun 2025 11:50:35 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749037836;
bh=LWoCnVWu9kyApgL0kLFdiS1HexGeNKcPhWj+9WD/Kfc=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=MXPg5C1FfD5CFrcwX/YJxb1s0QvtnT7YAeJu+tKjUg6pdyQjVeTOJr6Nt5pRuJBbc
HKEs2b8/yYTpKvAOLEy+nShdmpyioifn0NraI8aAtdwlQNmue00rEKahligmL/WeRx
XWXiwQAGgh/5GzVW/WycsstiC2/GcM5ztWt07a5EzroJJJUlJFndvFYTnSRXoPTVPO
Ssiv6PpM38LpKKoQo8hlYiDUA1z6r5IvQf48UVKlTiHNgI3fPSHeJvhFomiuhiL6DN
c8sZmB3r0XoB7ndSX1vzgd9B4c6OlaVD15TFeEKbW1pdRQurwJDPMfydBIewIh4/+h
2XNdtxjrA3xfA==
From: Sasha Levin <sashal@xxxxxxxxxx>
To: patches@xxxxxxxxxxxxxxx,
stable@xxxxxxxxxxxxxxx
Cc: Laurentiu Tudor <laurentiu.tudor@xxxxxxx>,
Ioana Ciornei <ioana.ciornei@xxxxxxx>,
Christophe Leroy <christophe.leroy@xxxxxxxxxx>,
Sasha Levin <sashal@xxxxxxxxxx>,
linuxppc-dev@xxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
Subject: [PATCH AUTOSEL 5.15 2/5] bus: fsl-mc: increase MC_CMD_COMPLETION_TIMEOUT_MS value
Date: Wed, 4 Jun 2025 07:50:30 -0400
Message-Id: <20250604115033.209492-2-sashal@xxxxxxxxxx>
X-Mailer: git-send-email 2.39.5
In-Reply-To: <20250604115033.209492-1-sashal@xxxxxxxxxx>
References: <20250604115033.209492-1-sashal@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-stable: review
X-Patchwork-Hint: Ignore
X-stable-base: Linux 5.15.184
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
From: Laurentiu Tudor <laurentiu.tudor@xxxxxxx>
[ Upstream commit 23d060136841c58c2f9ee8c08ad945d1879ead4b ]
In case the MC firmware runs in debug mode with extensive prints pushed
to the console, the current timeout of 500ms is not enough.
Increase the timeout value so that we don't have any chance of wrongly
assuming that the firmware is not responding when it's just taking more
time.
Signed-off-by: Laurentiu Tudor <laurentiu.tudor@xxxxxxx>
Signed-off-by: Ioana Ciornei <ioana.ciornei@xxxxxxx>
Link: https://lore.kernel.org/r/20250408105814.2837951-7-ioana.ciornei@xxxxxxx
Signed-off-by: Christophe Leroy <christophe.leroy@xxxxxxxxxx>
Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
---
Based on my analysis of the commit and the surrounding code context,
here is my assessment: **YES** This commit should be backported to
stable kernel trees. **Detailed Analysis:** **1. Bug Fix Nature:** This
commit addresses a real timeout issue where legitimate MC firmware
operations can fail due to an inadequate timeout value. The commit
message explicitly states that "In case the MC firmware runs in debug
mode with extensive prints pushed to the console, the current timeout of
500ms is not enough." **2. Code Change Analysis:** The change is minimal
and surgical: - Changes a single timeout constant from 500ms to 15000ms
(15 seconds) - Only affects `drivers/bus/fsl-mc/mc-sys.c:22` - No
architectural changes or new functionality added - The timeout is used
in both `mc_polling_wait_preemptible()` and `mc_polling_wait_atomic()`
functions that handle MC command completion **3. Risk Assessment:** The
change has minimal risk: - Increasing a timeout value is generally safe
and doesn't change behavior for successful operations - Only affects
systems with Freescale/NXP DPAA2 Management Complex hardware - The
original 500ms timeout was clearly insufficient for legitimate use cases
- Similar to successful backports in the reference commits (e.g.,
Similar Commit #1 and #3 which both increased timeouts) **4. Impact and
Importance:** - Fixes a real user-facing issue where MC commands fail
with timeouts during firmware debug scenarios - The FSL-MC bus is
critical infrastructure for DPAA2 networking architecture on NXP ARM
SoCs - Timeout failures can cause device initialization problems and
system instability - The `mc_send_command()` function is used
extensively throughout the FSL-MC subsystem for all hardware
communication **5. Comparison with Similar Commits:** - Very similar to
Similar Commit #1 (UCSI timeout increase from 1s to 5s) - **Status:
YES** - Very similar to Similar Commit #3 (MLX5 timeout decrease from 2
hours to 60s) - **Status: YES** - Both of these were timeout adjustments
that got backported successfully **6. Subsystem Scope:** The change is
contained within the FSL-MC bus driver subsystem and only affects NXP
DPAA2 hardware platforms, making it a safe candidate for stable trees.
**7. Explicit Stable Tree Criteria:** This meets the stable tree
criteria: - Fixes an important bug affecting real users - Small and
contained change with minimal regression risk - No new features or
architectural changes - Addresses a timeout issue that can cause system
functionality problems The commit represents a classic example of a
safe, important bug fix that should be backported to help users
experiencing MC command timeouts in production environments, especially
during firmware debugging scenarios.
drivers/bus/fsl-mc/mc-sys.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/bus/fsl-mc/mc-sys.c b/drivers/bus/fsl-mc/mc-sys.c
index f2052cd0a0517..b22c59d57c8f0 100644
--- a/drivers/bus/fsl-mc/mc-sys.c
+++ b/drivers/bus/fsl-mc/mc-sys.c
@@ -19,7 +19,7 @@
/*
* Timeout in milliseconds to wait for the completion of an MC command
*/
-#define MC_CMD_COMPLETION_TIMEOUT_MS 500
+#define MC_CMD_COMPLETION_TIMEOUT_MS 15000
/*
* usleep_range() min and max values used to throttle down polling
--
2.39.5
Return-Path: <linux-kernel+bounces-673145-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id A653241E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:52:06 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 36F623A65D5
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:51:16 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 8831B28FA83;
Wed, 4 Jun 2025 11:50:39 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="oLegIJNm";
dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="SmWCssRS"
Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 55BEF28F51A;
Wed, 4 Jun 2025 11:50:36 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749037838; cv=none; b=eew9YILeeJkG35CnRnU15ou9HQ2FehEPi5RmDkegaBHxAwRa3duhJPa19fPsst9ga2uk8ELmgYX7mu0xvyHIoM5bC7Zj6QqHplgzvUrtVtxXDxfN2iWtRBT0RemwyuI6sy+uEz5MTaHrKM+S1UgzvERRAQZijGyD42yDYGoM4t0=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749037838; c=relaxed/simple;
bh=L8dtHkNvZx3SLd/o3iJzF6LR1Vyy7ZrilUk1Pr3G3uY=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID:
MIME-Version:Content-Type; b=A1kXhVF0Ka0B7YPW7ZpAJ33P+09j8ishlcN1ReZJQ6yXd3bcNwLiCvq5g0/rloNMTUTe7ud0O3lnKQLcE2EyQkvTVPi+aownFin3Na+U4aVYnGHRjssNIKwyYytgNs6nspYbIOgvlF2S66W9bpLJIxlmJ1O5wUX25YoVqJZbDWk=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=oLegIJNm; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=SmWCssRS; arc=none smtp.client-ip=193.142.43.55
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de
From: John Ogness <john.ogness@xxxxxxxxxxxxx>
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de;
s=2020; t=1749037835;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
in-reply-to:in-reply-to:references:references;
bh=WuJsBEQO3vOHs70HHUYSLQfGS4A7b1VGRI3y13ObEFA=;
b=oLegIJNmlkhOaetnuHLnch2mHHI+88mIOb3Y0cYl7lskKBYEEzGVCM1wsH1KXlak8ffUBR
nZUMyHq+WVjSRiI+J5d+zSeEV6tTJpcCuHO6QGXQvXnS7EHGCqDLEy3X8CWDi4ijbAKM2F
Px3eU6Ao/vZiGBWf6Ty5mCa1tRsEJ+KjayDZD6WJmYQVW52RS4Jbi+JJi3em83Lj9LfVQC
p969a8IZOgd9cM9f5pzgSRNX6OLiL9uc5gVFSdgA4gntA1s/mCv+UU/ctr6r/wI0WzBmj6
r8nyemYWNPFPNtWON1uz44w64Ej3ZByT/sIkP1z23H2cRcIHzjIA+LfcceOBvg==
DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de;
s=2020e; t=1749037835;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
in-reply-to:in-reply-to:references:references;
bh=WuJsBEQO3vOHs70HHUYSLQfGS4A7b1VGRI3y13ObEFA=;
b=SmWCssRSGTRTgB2qp0+RPYebju8bTkPSVINOn6Di4Y+SjIWdqd2It7SNMy+NVWjVCDXVWa
TpYNl84Bb9OtHzCw==
To: Petr Mladek <pmladek@xxxxxxxx>, "Toshiyuki Sato (Fujitsu)"
<fj6611ie@xxxxxxxxxxx>
Cc: 'Michael Kelley' <mhklinux@xxxxxxxxxxx>, 'Ryo Takakura'
<ryotkkr98@xxxxxxxxx>, Russell King <linux@xxxxxxxxxxxxxxx>, Greg
Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, Jiri Slaby
<jirislaby@xxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx"
<linux-kernel@xxxxxxxxxxxxxxx>, "linux-serial@xxxxxxxxxxxxxxx"
<linux-serial@xxxxxxxxxxxxxxx>, "linux-arm-kernel@xxxxxxxxxxxxxxxxxxx"
<linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: Problem with nbcon console and amba-pl011 serial port
In-Reply-To: <aEApOPTqbVOR35F_@xxxxxxxxxxxxxxx>
References: <SN6PR02MB4157A4C5E8CB219A75263A17D46DA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
<OS7PR01MB13775FE1A20762D1EA4A38D0ED76DA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
<84y0u95e0j.fsf@xxxxxxxxxxxxxxxxxxxxx>
<84plfl5bf1.fsf@xxxxxxxxxxxxxxxxxxxxx>
<TY4PR01MB13777674C22721FCD8ACF4FCCD76CA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
<aEApOPTqbVOR35F_@xxxxxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 13:56:34 +0206
Message-ID: <84o6v3ohdh.fsf@xxxxxxxxxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Status: No, score=-2.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INVALID_DATE_TZ_ABSURD,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 2025-06-04, Petr Mladek <pmladek@xxxxxxxx> wrote:
On Wed 2025-06-04 04:11:10, Toshiyuki Sato (Fujitsu) wrote:
> On 2025-06-03, John Ogness <john.ogness@xxxxxxxxxxxxx> wrote:
> > On 2025-06-03, "Toshiyuki Sato (Fujitsu)" <fj6611ie@xxxxxxxxxxx> wrote:
> >>> 4. pr_emerg() has a high logging level, and it effectively steals the console
> >>> from the "pr/ttyAMA0" task, which I believe is intentional in the nbcon
> design.
> >>> Down in pl011_console_write_thread(), the "pr/ttyAMA0" task is doing
> >>> nbcon_enter_unsafe() and nbcon_exit_unsafe() around each character
> >>> that it outputs. When pr_emerg() steals the console, nbcon_exit_unsafe()
> >>> returns 0, so the "for" loop exits. pl011_console_write_thread() then
> >>> enters a busy "while" loop waiting to reclaim the console. It's doing this
> >>> busy "while" loop with interrupts disabled, and because of the panic,
> >>> it never succeeds.
I am a bit surprised that it never succeeds. The panic CPU takes over
the ownership but it releases it when the messages are flushed. And
the original owner should be able to reacquire it in this case.
The problem is that other_cpu_in_panic() will return true forever, which
will cause _all_ acquires to fail forever. Originally we did allow
non-panic to take over again after panic releases ownership. But IIRC we
removed that capability because it allowed us to reduce a lot of
complexity. And now nbcon_waiter_matches() relies on "Lower priorities
are ignored during panic() until reboot."
John Ogness
Return-Path: <linux-kernel+bounces-673146-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id AF1A341E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:52:50 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 9BDA53A646B
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:51:35 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id D021D28ECE9;
Wed, 4 Jun 2025 11:50:46 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WHP2TRZx"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 119E628ECEE;
Wed, 4 Jun 2025 11:50:45 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749037846; cv=none; b=RVF90wA9RSi7v7XHIPKILuFSkIbSC618SC3LkCbUFOWEveZpjPAlUfOMelZKqzYdhaztNA+PDOCP9EOM5gXMY9z8V+SYiWUqQcx7RgVQOvmBEBJ5UflMY7mI2X23BZM/qqRud3c4ADn1yCD0tV7iH+sxt7vAmwUZtP/T8vRFXuQ=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749037846; c=relaxed/simple;
bh=b3KW4xNg96FKJCx7KjKLvxR70JWKyUz6ER2DhpnCb0I=;
h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:
MIME-Version; b=EvHFNbCk4y2ggCttCVA7NmsYFMkbSoipOuKVt25DOInC6F5YEKaOWpkyYG8aNxcvTby6tW77GqSJfPFi/j4O9Rb85z++9/aS2qX8jSbQsKVmuHVkXazBqc357QfTWvAQ5DG9zjBwvQ4WKsnw2mHZeI/NV30ZsgkaAaj1Qln9aRA=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WHP2TRZx; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9831EC4CEF0;
Wed, 4 Jun 2025 11:50:44 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749037845;
bh=b3KW4xNg96FKJCx7KjKLvxR70JWKyUz6ER2DhpnCb0I=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=WHP2TRZxzED39eKAvUSnPUkOLIHjeOM60OOBwOkAyA9gQr+HoVcdDQPocXTaB0i9F
hXRAso0qSnhx+BGLDKWWyJouUaHn9bRwE2DFIbAwiRAkR2hO6TTWNjofQJjZj6d+tU
wRKuoYqd+fuHL7hxfHpLkuGoVM4iYr6siaC0xDg19gO2dnNUbvPQW2NNi2JEQPBnji
d3MtOdVUDLLm5JXbbHInSE6VDnirf57QoKW9oeuKZlnNFfOjwBYjnyrz8cp0ZrgOlD
vZmDyRY0oDAFhs3tC+emAw3LfcYgpqDqkQzX8e616zquSoEXoSqFW+be3S8dfV4aZs
h6Rc3PEzP5k8g==
From: Sasha Levin <sashal@xxxxxxxxxx>
To: patches@xxxxxxxxxxxxxxx,
stable@xxxxxxxxxxxxxxx
Cc: Laurentiu Tudor <laurentiu.tudor@xxxxxxx>,
Ioana Ciornei <ioana.ciornei@xxxxxxx>,
Christophe Leroy <christophe.leroy@xxxxxxxxxx>,
Sasha Levin <sashal@xxxxxxxxxx>,
linuxppc-dev@xxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
Subject: [PATCH AUTOSEL 5.10 2/5] bus: fsl-mc: increase MC_CMD_COMPLETION_TIMEOUT_MS value
Date: Wed, 4 Jun 2025 07:50:38 -0400
Message-Id: <20250604115042.209624-2-sashal@xxxxxxxxxx>
X-Mailer: git-send-email 2.39.5
In-Reply-To: <20250604115042.209624-1-sashal@xxxxxxxxxx>
References: <20250604115042.209624-1-sashal@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-stable: review
X-Patchwork-Hint: Ignore
X-stable-base: Linux 5.10.237
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
From: Laurentiu Tudor <laurentiu.tudor@xxxxxxx>
[ Upstream commit 23d060136841c58c2f9ee8c08ad945d1879ead4b ]
In case the MC firmware runs in debug mode with extensive prints pushed
to the console, the current timeout of 500ms is not enough.
Increase the timeout value so that we don't have any chance of wrongly
assuming that the firmware is not responding when it's just taking more
time.
Signed-off-by: Laurentiu Tudor <laurentiu.tudor@xxxxxxx>
Signed-off-by: Ioana Ciornei <ioana.ciornei@xxxxxxx>
Link: https://lore.kernel.org/r/20250408105814.2837951-7-ioana.ciornei@xxxxxxx
Signed-off-by: Christophe Leroy <christophe.leroy@xxxxxxxxxx>
Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
---
Based on my analysis of the commit and the surrounding code context,
here is my assessment: **YES** This commit should be backported to
stable kernel trees. **Detailed Analysis:** **1. Bug Fix Nature:** This
commit addresses a real timeout issue where legitimate MC firmware
operations can fail due to an inadequate timeout value. The commit
message explicitly states that "In case the MC firmware runs in debug
mode with extensive prints pushed to the console, the current timeout of
500ms is not enough." **2. Code Change Analysis:** The change is minimal
and surgical: - Changes a single timeout constant from 500ms to 15000ms
(15 seconds) - Only affects `drivers/bus/fsl-mc/mc-sys.c:22` - No
architectural changes or new functionality added - The timeout is used
in both `mc_polling_wait_preemptible()` and `mc_polling_wait_atomic()`
functions that handle MC command completion **3. Risk Assessment:** The
change has minimal risk: - Increasing a timeout value is generally safe
and doesn't change behavior for successful operations - Only affects
systems with Freescale/NXP DPAA2 Management Complex hardware - The
original 500ms timeout was clearly insufficient for legitimate use cases
- Similar to successful backports in the reference commits (e.g.,
Similar Commit #1 and #3 which both increased timeouts) **4. Impact and
Importance:** - Fixes a real user-facing issue where MC commands fail
with timeouts during firmware debug scenarios - The FSL-MC bus is
critical infrastructure for DPAA2 networking architecture on NXP ARM
SoCs - Timeout failures can cause device initialization problems and
system instability - The `mc_send_command()` function is used
extensively throughout the FSL-MC subsystem for all hardware
communication **5. Comparison with Similar Commits:** - Very similar to
Similar Commit #1 (UCSI timeout increase from 1s to 5s) - **Status:
YES** - Very similar to Similar Commit #3 (MLX5 timeout decrease from 2
hours to 60s) - **Status: YES** - Both of these were timeout adjustments
that got backported successfully **6. Subsystem Scope:** The change is
contained within the FSL-MC bus driver subsystem and only affects NXP
DPAA2 hardware platforms, making it a safe candidate for stable trees.
**7. Explicit Stable Tree Criteria:** This meets the stable tree
criteria: - Fixes an important bug affecting real users - Small and
contained change with minimal regression risk - No new features or
architectural changes - Addresses a timeout issue that can cause system
functionality problems The commit represents a classic example of a
safe, important bug fix that should be backported to help users
experiencing MC command timeouts in production environments, especially
during firmware debugging scenarios.
drivers/bus/fsl-mc/mc-sys.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/bus/fsl-mc/mc-sys.c b/drivers/bus/fsl-mc/mc-sys.c
index 85a0225db522a..14d77dc618cc1 100644
--- a/drivers/bus/fsl-mc/mc-sys.c
+++ b/drivers/bus/fsl-mc/mc-sys.c
@@ -19,7 +19,7 @@
/**
* Timeout in milliseconds to wait for the completion of an MC command
*/
-#define MC_CMD_COMPLETION_TIMEOUT_MS 500
+#define MC_CMD_COMPLETION_TIMEOUT_MS 15000
/*
* usleep_range() min and max values used to throttle down polling
--
2.39.5
Return-Path: <linux-kernel+bounces-673147-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id C0EF941E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:53:08 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 53785189AA42
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:52:31 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 0631B28F53B;
Wed, 4 Jun 2025 11:50:55 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="b/tRP0fO"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 416DC23A562;
Wed, 4 Jun 2025 11:50:54 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749037854; cv=none; b=VPkeqy0tiALLDLwiVNTDiEJtzgBl2OZdP8g9dpOgyPfqgOmn8QDN5AzND+XesEn9MShQQV0No1KDZOX96WUWKLvY4NCITjKjks8EzA7KEt7R/ImMgNQGCFsy8XrpxZ89DARtmQMatwl/6YsyGCJHHsVJC7EE689xslEMdOaSh8o=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749037854; c=relaxed/simple;
bh=F9N16TAMBxsonCFLJzyb2HtE5z9rIBeHoTfahj8tkO0=;
h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:
MIME-Version; b=eDCLGoSoxy6CgzdRQA3esbjTSmQmNMYeMjqnTX8RZqPHkvM7iPo61jxsWXrqwded3J9PJdVqPionpYc3SagIH5sIbzTNZTG/3uCe8fqTNoXElYQrFhkkFuN4yg0VIWwk8CqEbmORsgrLHnSqBKJMxuuvzoiVYhf0ZwCZSvYOzWg=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=b/tRP0fO; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3555EC4CEEF;
Wed, 4 Jun 2025 11:50:53 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749037854;
bh=F9N16TAMBxsonCFLJzyb2HtE5z9rIBeHoTfahj8tkO0=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=b/tRP0fOzv6g08K5+cQx9lQ+tEqZcf+L03PJBIlDkqw9D1SG54jDnCBUecqlcipgU
vWtqJ/GjfxrikInYk9FVPlfzex4uPyvM6tce53K2jXUfbqjss2fbFx+5KNDzxw4y7e
CSCyJviI9WXhjyqjDmcGcuMWwW2SU4bihWmWl1HgsA0iYeBeG64lanZVTGAarOX4wV
f1SNgZ34xxbk/H6FsNj3w7pYddhqpVw0KGO5NF9yQlaIXLC2DZxieOof5xHNzlLCTN
R2R//uYtOz1MVGsCs3tz8ikaG5UWkXuOgbuccplNI1T+HS7jHtADLeUYkNMuxngyoO
fzNLLUlgz8Nwg==
From: Sasha Levin <sashal@xxxxxxxxxx>
To: patches@xxxxxxxxxxxxxxx,
stable@xxxxxxxxxxxxxxx
Cc: Laurentiu Tudor <laurentiu.tudor@xxxxxxx>,
Ioana Ciornei <ioana.ciornei@xxxxxxx>,
Christophe Leroy <christophe.leroy@xxxxxxxxxx>,
Sasha Levin <sashal@xxxxxxxxxx>,
linuxppc-dev@xxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
Subject: [PATCH AUTOSEL 5.4 2/5] bus: fsl-mc: increase MC_CMD_COMPLETION_TIMEOUT_MS value
Date: Wed, 4 Jun 2025 07:50:47 -0400
Message-Id: <20250604115050.209756-2-sashal@xxxxxxxxxx>
X-Mailer: git-send-email 2.39.5
In-Reply-To: <20250604115050.209756-1-sashal@xxxxxxxxxx>
References: <20250604115050.209756-1-sashal@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-stable: review
X-Patchwork-Hint: Ignore
X-stable-base: Linux 5.4.293
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
From: Laurentiu Tudor <laurentiu.tudor@xxxxxxx>
[ Upstream commit 23d060136841c58c2f9ee8c08ad945d1879ead4b ]
In case the MC firmware runs in debug mode with extensive prints pushed
to the console, the current timeout of 500ms is not enough.
Increase the timeout value so that we don't have any chance of wrongly
assuming that the firmware is not responding when it's just taking more
time.
Signed-off-by: Laurentiu Tudor <laurentiu.tudor@xxxxxxx>
Signed-off-by: Ioana Ciornei <ioana.ciornei@xxxxxxx>
Link: https://lore.kernel.org/r/20250408105814.2837951-7-ioana.ciornei@xxxxxxx
Signed-off-by: Christophe Leroy <christophe.leroy@xxxxxxxxxx>
Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
---
Based on my analysis of the commit and the surrounding code context,
here is my assessment: **YES** This commit should be backported to
stable kernel trees. **Detailed Analysis:** **1. Bug Fix Nature:** This
commit addresses a real timeout issue where legitimate MC firmware
operations can fail due to an inadequate timeout value. The commit
message explicitly states that "In case the MC firmware runs in debug
mode with extensive prints pushed to the console, the current timeout of
500ms is not enough." **2. Code Change Analysis:** The change is minimal
and surgical: - Changes a single timeout constant from 500ms to 15000ms
(15 seconds) - Only affects `drivers/bus/fsl-mc/mc-sys.c:22` - No
architectural changes or new functionality added - The timeout is used
in both `mc_polling_wait_preemptible()` and `mc_polling_wait_atomic()`
functions that handle MC command completion **3. Risk Assessment:** The
change has minimal risk: - Increasing a timeout value is generally safe
and doesn't change behavior for successful operations - Only affects
systems with Freescale/NXP DPAA2 Management Complex hardware - The
original 500ms timeout was clearly insufficient for legitimate use cases
- Similar to successful backports in the reference commits (e.g.,
Similar Commit #1 and #3 which both increased timeouts) **4. Impact and
Importance:** - Fixes a real user-facing issue where MC commands fail
with timeouts during firmware debug scenarios - The FSL-MC bus is
critical infrastructure for DPAA2 networking architecture on NXP ARM
SoCs - Timeout failures can cause device initialization problems and
system instability - The `mc_send_command()` function is used
extensively throughout the FSL-MC subsystem for all hardware
communication **5. Comparison with Similar Commits:** - Very similar to
Similar Commit #1 (UCSI timeout increase from 1s to 5s) - **Status:
YES** - Very similar to Similar Commit #3 (MLX5 timeout decrease from 2
hours to 60s) - **Status: YES** - Both of these were timeout adjustments
that got backported successfully **6. Subsystem Scope:** The change is
contained within the FSL-MC bus driver subsystem and only affects NXP
DPAA2 hardware platforms, making it a safe candidate for stable trees.
**7. Explicit Stable Tree Criteria:** This meets the stable tree
criteria: - Fixes an important bug affecting real users - Small and
contained change with minimal regression risk - No new features or
architectural changes - Addresses a timeout issue that can cause system
functionality problems The commit represents a classic example of a
safe, important bug fix that should be backported to help users
experiencing MC command timeouts in production environments, especially
during firmware debugging scenarios.
drivers/bus/fsl-mc/mc-sys.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/bus/fsl-mc/mc-sys.c b/drivers/bus/fsl-mc/mc-sys.c
index 3221a7fbaf0ad..24307ed59d777 100644
--- a/drivers/bus/fsl-mc/mc-sys.c
+++ b/drivers/bus/fsl-mc/mc-sys.c
@@ -19,7 +19,7 @@
/**
* Timeout in milliseconds to wait for the completion of an MC command
*/
-#define MC_CMD_COMPLETION_TIMEOUT_MS 500
+#define MC_CMD_COMPLETION_TIMEOUT_MS 15000
/*
* usleep_range() min and max values used to throttle down polling
--
2.39.5
Return-Path: <linux-kernel+bounces-673148-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 3A61D41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:53:31 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 22DAC189A171
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:52:48 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 7CE0C24C664;
Wed, 4 Jun 2025 11:52:06 +0000 (UTC)
Received: from mail-il1-f199.google.com (mail-il1-f199.google.com [209.85.166.199])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7BD1C221FD2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:52:04 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.199
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749037926; cv=none; b=fGxhqrChpVFQhC3u7YE19mREYYZXoXgU7Tg2OiT2guP6bqUuyyk0jcoz8qu9jsYqSXzqqusGvFBF8UUxmlUB4a2s9ekt3K8j7J1C9aoMvrMV9/I8oMCg9m7lbf11BPp0U/ajF7zJDB/u/1bKAjL0+VQ5Wr879dzX9nhD1ZsgbeU=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749037926; c=relaxed/simple;
bh=ucaxpTfhki9xe5KaqJ1uJvOYxJGMYvSNnfGlyjDEFeI=;
h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To:
Content-Type; b=ZmJwiaiNaWlyNYoFKcg3LypxNEaqfkPA/6refkbT5/tTVfNvkCxmBEBA/OyaMwqf5VDadHFHwlwUPX0d6tl1yin7RwklCN22bQwi4W/EbHY0x4RCRY25oh8b4sAp8+DGEezESamRh4CJ8iSKjiJmIcG15a0BbWH5JJvW8twUX/4=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.166.199
Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com
Received: by mail-il1-f199.google.com with SMTP id e9e14a558f8ab-3ddc1af1e5bso8246245ab.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 04:52:04 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749037923; x=1749642723;
h=to:from:subject:message-id:in-reply-to:date:mime-version
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=uYNeylFd+Wd9wnCJ8dYejfviKEpOERMeuHn0zm+K+kg=;
b=GjxYC9bpJKTaUCWxDuBuO/UIAOZRqjvSwEU5DQ6S0dz/RS4xTA/fcphP6RZ8AZ1L6r
J0XoMmvwT873qVbNqvvZ4GQL+YQLjwUar7FV1KX0DwLELasKO2e+QuVqthzafwyQd7cQ
lEGTcA/xB2XPTWHv/dW3wth6tYnJilu099TciIQC0qd7S7wqm1ZwnsN/1FHItxqX2jLX
adnTgHEXeVBuBgGIsxiSGUi4YOE9bYOZCCihXbCLnWkyXO4H5k5sv60IMmXidp5DAbAC
uriUyemUwv4m3HnI8LHZV8iY7BWIeTruKICCTEb9PQonoerUeUYMZWkcx3aqiUZcyIG2
Eejw==
X-Forwarded-Encrypted: i=1; AJvYcCWWj06GK0cblG0dkNJJZUvfGgk9pREY8Tpf+Pkb0MYcpqdf5lUtkeLmQJy2COmSOJDaaSWX1Y8Ze9vYh1I=@vger.kernel.org
X-Gm-Message-State: AOJu0Yz/+fDz9beXZ/1NTYAcvLbolQ77+ELq0NDlXuM/oRbqCy59qaMA
7m20q5kWM82iA627qI6QS2cUPTz6tI1ItQpDmxeqZS9vHPWlPw/OF/hi2xIk/e9fxcJLgpq82j/
z30jC2qbl9eevQ64EX19U/1K2nnaYxGuYhCalEedXVLgXmhwmTY/IzAf//Og=
X-Google-Smtp-Source: AGHT+IHaPThA9cKn4GyiJP/w3G4JQGITHzNmy5URcA8wMh53KvQ/Goo8sDp7ZHuT9i3BSO/KaMyV2LsGE5mvmAN9Kgtoj6WZwXxF
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-Received: by 2002:a05:6e02:3086:b0:3da:71ea:91c2 with SMTP id
e9e14a558f8ab-3ddbfcbc6admr24944905ab.22.1749037923627; Wed, 04 Jun 2025
04:52:03 -0700 (PDT)
Date: Wed, 04 Jun 2025 04:52:03 -0700
In-Reply-To: <43284d2b-be67-41ca-877f-0fc580c20754@xxxxxxxxx>
X-Google-Appengine-App-Id: s~syzkaller
X-Google-Appengine-App-Id-Alias: syzkaller
Message-ID: <68403363.a00a0220.d8eae.0089.GAE@xxxxxxxxxx>
Subject: Re: [syzbot] [jfs?] kernel BUG in jfs_truncate_nolock
From: syzbot <syzbot+630f6d40b3ccabc8e96e@xxxxxxxxxxxxxxxxxxxxxxxxx>
To: dmantipov@xxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
syzkaller-bugs@xxxxxxxxxxxxxxxx
Content-Type: text/plain; charset="UTF-8"
X-Spam-Status: No, score=-3.0 required=5.0 tests=FROM_LOCAL_HEX,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hello,
syzbot has tested the proposed patch and the reproducer did not trigger any issue:
Reported-by: syzbot+630f6d40b3ccabc8e96e@xxxxxxxxxxxxxxxxxxxxxxxxx
Tested-by: syzbot+630f6d40b3ccabc8e96e@xxxxxxxxxxxxxxxxxxxxxxxxx
Tested on:
commit: 5abc7438 Merge tag 'nfs-for-6.16-1' of git://git.linux..
git tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=16927c82580000
kernel config: https://syzkaller.appspot.com/x/.config?x=82e79780b034d72f
dashboard link: https://syzkaller.appspot.com/bug?extid=630f6d40b3ccabc8e96e
compiler: Debian clang version 20.1.6 (++20250514063057+1e4d39e07757-1~exp1~20250514183223.118), Debian LLD 20.1.6
patch: https://syzkaller.appspot.com/x/patch.diff?x=10cc780c580000
Note: testing is done by a robot and is best-effort only.
Return-Path: <linux-kernel+bounces-673149-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id B12DB41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:53:51 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 693BD1899BC7
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:53:21 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 3AF3A252910;
Wed, 4 Jun 2025 11:53:00 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="DXuoEABQ"
Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 98A7351C5A;
Wed, 4 Jun 2025 11:52:57 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.156.1
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749037979; cv=none; b=V2ld+Urus/qpl+77CM6ZXPn9Qj09V2CirKiTPQ0KB3EOnsY8WvSSk+IUrQUrubeLcslHX9FybC6R/0GuaX19TSSs4xXemc/XyGz+sGXuAOm/XomaPTib+5wAZaob2EiIdpPl28AkJP7M0RG8paHYKCHkcdwKrBRnEBtWRX9M8ok=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749037979; c=relaxed/simple;
bh=I6sL62JAME8PuBznmWoXj2evmjXHuLP9SMdB6dehbgI=;
h=Message-ID:Date:MIME-Version:To:From:Cc:Subject:Content-Type; b=kLMznImv2ilmmS6KbhzJUTHDrAHnLUIfnHQcFrNoTULDv7vx+lsRDmvf/9ozT/FRucX1PVCau6BzLLd3sNurT4pQvBIHklyU4vUGWptEwdoRhHCc1NZ+AitU9pdu8pANPJf3cd0Y3/Qa2p6ccuCPx8bPFpSWMK6Nmn/zf5hNa8w=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=DXuoEABQ; arc=none smtp.client-ip=148.163.156.1
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com
Received: from pps.filterd (m0356517.ppops.net [127.0.0.1])
by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5543sUQp030432;
Wed, 4 Jun 2025 11:52:51 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc
:content-transfer-encoding:content-type:date:from:message-id
:mime-version:subject:to; s=pp1; bh=hIlQ/KIJ02fO0J/hYZXUTFNWtCW7
DG2pHnTn7+6lA3Q=; b=DXuoEABQzSWUIXSurrxmBtm5BZqMr6PLWTpS768HEuxl
gigIORlNsldXk1IymuXILyPmT2Oh5GFsMe1zr0ns4//pZ6+KYL1qG6450pPmcn+v
aIj6lJsDUGgFTGECSpdhG65ZAUbxkBIGSd1f4CJ3TV2Z5fB5B3te8sMuGdlHpCBj
pvvUR9ga7AvnZ4Z6YuAuIBiqoJd/W1vS+lEgfbl75dVBtn4RySLsw9Gt+8gijvON
WVYSMq03h/nIwaJOJKSfgyj9Ui3Yci5n8YAUUPYHWHRV83i3bjekHe+vgH4W9NjM
M6K8Lpw2MtUEKUMecvviGQ4G2MTcNCxM/2/m89feFQ==
Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93])
by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 471geyt96f-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 11:52:51 +0000 (GMT)
Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1])
by ppma23.wdc07v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 5547Yuq1024914;
Wed, 4 Jun 2025 11:52:50 GMT
Received: from smtprelay05.wdc07v.mail.ibm.com ([172.16.1.72])
by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 470dkmfdty-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 11:52:50 +0000
Received: from smtpav06.dal12v.mail.ibm.com (smtpav06.dal12v.mail.ibm.com [10.241.53.105])
by smtprelay05.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 554BqnsA32637476
(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 4 Jun 2025 11:52:49 GMT
Received: from smtpav06.dal12v.mail.ibm.com (unknown [127.0.0.1])
by IMSVA (Postfix) with ESMTP id 4B10358055;
Wed, 4 Jun 2025 11:52:49 +0000 (GMT)
Received: from smtpav06.dal12v.mail.ibm.com (unknown [127.0.0.1])
by IMSVA (Postfix) with ESMTP id 8E8BB58043;
Wed, 4 Jun 2025 11:52:48 +0000 (GMT)
Received: from [9.155.201.157] (unknown [9.155.201.157])
by smtpav06.dal12v.mail.ibm.com (Postfix) with ESMTPS;
Wed, 4 Jun 2025 11:52:48 +0000 (GMT)
Message-ID: <43bcc782-4aa5-4957-a5ab-73184da29147@xxxxxxxxxxxxx>
Date: Wed, 4 Jun 2025 13:52:46 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-US
To: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
From: Zaslonko Mikhail <zaslonko@xxxxxxxxxxxxx>
Cc: linux-s390@xxxxxxxxxxxxxxx,
"linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>,
Heiko Carstens <hca@xxxxxxxxxxxxx>
Subject: kernel/sched/core: WARNING when migrating to an offline CPU
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-TM-AS-GCONF: 00
X-Proofpoint-ORIG-GUID: mJaq6_nwYl33KVsGYYe8y7G2DkhSwqSX
X-Authority-Analysis: v=2.4 cv=DYMXqutW c=1 sm=1 tr=0 ts=68403393 cx=c_pps a=3Bg1Hr4SwmMryq2xdFQyZA==:117 a=3Bg1Hr4SwmMryq2xdFQyZA==:17 a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10 a=VwQbUJbxAAAA:8 a=JfrnYn6hAAAA:8 a=CEzOr5Ttf5qj40zooyEA:9 a=QEXdDO2ut3YA:10
a=1CNFftbPRP8L7MoqJWF3:22
X-Proofpoint-GUID: mJaq6_nwYl33KVsGYYe8y7G2DkhSwqSX
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDA4OCBTYWx0ZWRfXy4uwYFLe6tum DY4Nbe1vAhc6U6CL86cOD+IEO8uTyNaMI3+yhKd26mG/DT71hQHC7PLa8xSHY3seXpcGfkmww6N o7OPPwKdBriLhrHFc8SWkiLkOrNO7JXIXZ4rQouFeQYWZ18ENSL65if6/x/GUuQjMwQ2LCfUv2P
sziGWrAOC9vpoZSYMxe50U3iT3UfSvB6NmM8u9Gr/+3/jAG7qpOI2IRaVZKy0Y554pogOKy5SNv o4HDUybuelpwBeGQiCVz9jX66HF1D72a52y0CiiPyNnYoncrBg86yL4vw5uDHAnNvwKDuSC0JTP hOKvXjQoCyLTVCvIzxJfcSVfx0GVIHiCFbdzxsCt16hBRtglOavzAX18DgVTgxOzT4Hw3FbXTLe
RzB0R1g2qwVAfM0E16readJR4SWng3UOE78JAfMflIuJK6/9Gr3e2qdd5kJYX4NdZXv4xoHb
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0
lowpriorityscore=0 suspectscore=0 spamscore=0 mlxscore=0
priorityscore=1501 clxscore=1011 phishscore=0 mlxlogscore=450 adultscore=0
malwarescore=0 bulkscore=0 classifier=spam authscore=0 authtc=n/a authcc=
route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000
definitions=main-2506040088
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hi Peter,
This WARN_ON has been introduced by you a while ago:
https://lore.kernel.org/all/20170907150614.094206976@xxxxxxxxxxxxx/
It seems we had a hit on s390 recently followed by a kernel panic while running stress tests on Fedora42 with the latest kernel.
Not sure we can reproduce it easily since the stress workload varies each time.
[248217.530550] ------------[ cut here ]------------
[248217.530560] WARNING: CPU: 76 PID: 469721 at kernel/sched/core.c:3334 set_task_cpu+0x1e2/0x200
[248217.530567] Modules linked in: algif_hash af_alg nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 mlx5_ib ib_uverbs ib_core mlx5_vdpa vdpa vringh vhost_iotlb ip_set nf_tables mlx5_core s390_trng vfio_ccw mdev eadm_sch vfio_iommu_type1 vfio sch_fq_codel drm i2c_core loop configfs drm_panel_orientation_quirks nfnetlink ctcm fsm zfcp scsi_transport_fc uvdevice diag288_wdt hmac_s390 ghash_s390 prng aes_s390 des_s390 libdes sha3_512_s390 sha3_256_s390 sha512_s390 sha256_s390 sha1_s390 sha_common paes_s390 crypto_engine pkey_cca pkey_ep11 zcrypt rng_core pkey_pckmo pkey autofs4 ecdsa_generic ecc
[248217.530624] CPU: 76 UID: 0 PID: 469721 Comm: stress-ng-timer Not tainted 6.16.0-20250526.rc0.git4.b871b0f876d9.63.fc42.s390x #1 NONE
[248217.530629] Hardware name: IBM 9175 ME1 701 (LPAR)
[248217.530631] Krnl PSW : 0404c00180000000 00000289d49b07f6 (set_task_cpu+0x1e6/0x200)
[248217.530636] R:0 T:1 IO:0 EX:0 Key:0 M:1 W:0 P:0 AS:3 CC:0 PM:0 RI:0 EA:3
[248217.530639] Krnl GPRS: 0000000000000000 0000000000000000 00000289d62cdd28 000000000000000a
[248217.530642] 00000289d62e8e50 00000289d62ca198 000000fbffffffff 0000000000000001
[248217.530644] 7d48be6d37ef83d1 001f522f9b4dfbe0 000000000000000a 000000e88736a300
[248217.530647] 000003ffa65acfa8 000000fb00000000 00000209e8f6fcb8 00000209e8f6fc70
[248217.530654] Krnl Code: 00000289d49b07ea: af000000 mc 0,0
00000289d49b07ee: a7f4ff32 brc 15,00000289d49b0652
#00000289d49b07f2: af000000 mc 0,0
>00000289d49b07f6: bf13b678 icm %r1,3,1656(%r11)
00000289d49b07fa: a784ff43 brc 8,00000289d49b0680
00000289d49b07fe: af000000 mc 0,0
00000289d49b0802: a7f4ff3f brc 15,00000289d49b0680
00000289d49b0806: 0707 bcr 0,%r7
[248217.530794] Call Trace:
[248217.530798] [<00000289d49b07f6>] set_task_cpu+0x1e6/0x200
[248217.530803] ([<00000289d49d0f7e>] dequeue_task_dl+0x14e/0x1a0)
[248217.530806] [<00000289d49cc48c>] push_dl_task+0x1ac/0x220
[248217.530808] [<00000289d49cdba8>] dl_task_timer+0x178/0x1d0
[248217.530811] [<00000289d4a355ea>] __hrtimer_run_queues+0x17a/0x2e0
[248217.530814] [<00000289d4a36820>] hrtimer_interrupt+0x130/0x2a0
[248217.530817] [<00000289d49177f2>] do_IRQ+0x42/0x70
[248217.530820] [<00000289d491795a>] do_irq_async+0x5a/0x80
[248217.530823] [<00000289d5709dcc>] do_ext_irq+0xac/0x170
[248217.530827] [<00000289d5715e9a>] ext_int_handler+0xc2/0xe8
[248217.530830] [<00000289d4bc8380>] __rseq_handle_notify_resume+0x60/0x170
[248217.530834] [<00000289d491353c>] arch_do_signal_or_restart+0x1ac/0x320
[248217.530836] [<00000289d570a0d2>] syscall_exit_to_user_mode+0x122/0x230
[248217.530840] [<00000289d5709a9a>] __do_syscall+0x14a/0x250
[248217.530843] [<00000289d57157ce>] system_call+0x6e/0x90
[248217.530845] Last Breaking-Event-Address:
[248217.530846] [<00000289d49b0674>] set_task_cpu+0x64/0x200
[248217.530851] ---[ end trace 0000000000000000 ]---
[248217.902560] Fallback order for Node 0: 0
[248217.902563] Built 1 zonelists, mobility grouping on. Total pages: 279779194
[248217.902568] Policy zone: Normal
[248220.564502] fixpoint divide exception: 0009 ilc:2 [#1]SMP
[248220.564511] Modules linked in: algif_hash af_alg nft_fib_inet nft_fib_ipv4 nft_fib_ipv6 nft_fib nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_ct nft_chain_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 mlx5_ib ib_uverbs ib_core mlx5_vdpa vdpa vringh vhost_iotlb ip_set nf_tables mlx5_core s390_trng vfio_ccw mdev eadm_sch vfio_iommu_type1 vfio sch_fq_codel drm i2c_core loop configfs drm_panel_orientation_quirks nfnetlink ctcm fsm zfcp scsi_transport_fc uvdevice diag288_wdt hmac_s390 ghash_s390 prng aes_s390 des_s390 libdes sha3_512_s390 sha3_256_s390 sha512_s390 sha256_s390 sha1_s390 sha_common paes_s390 crypto_engine pkey_cca pkey_ep11 zcrypt rng_core pkey_pckmo pkey autofs4 ecdsa_generic ecc
[248220.564558] CPU: 10 UID: 0 PID: 809915 Comm: stress-ng-cpu-s Tainted: G W 6.16.0-20250526.rc0.git4.b871b0f876d9.63.fc42.s390x #1 NONE
[248220.564562] Tainted: [W]=WARN
[248220.564563] Hardware name: IBM 9175 ME1 701 (LPAR)
[248220.564564] Krnl PSW : 0404e00180000000 00000289d49cb02a (task_non_contending+0x13a/0x340)
[248220.564569] R:0 T:1 IO:0 EX:0 Key:0 M:1 W:0 P:0 AS:3 CC:2 PM:0 RI:0 EA:3
[248220.564571] Krnl GPRS: 0000000000000001 0000000000000030 0000000000000000 00000000000001a1
[248220.564573] 00000000000001a0 0000000000006666 0000000000006666 00000289d670c1e0
[248220.564575] 00000289d5c92da8 00000289d62e7d38 000000fb00000000 000000e88736a630
[248220.564576] 000003ff97a2cfa8 0000020900000047 00000289d49cb022 00000209ec89fc50
[248220.564582] Krnl Code: 00000289d49cb01c: c0e5ffffeef2 brasl %r14,00000289d49c8e00
00000289d49cb022: b9140056 lgfr %r5,%r6
#00000289d49cb026: b90d0042 dsgr %r4,%r2
>00000289d49cb02a: e32070f80004 lg %r2,248(%r7)
00000289d49cb030: c4a800c80ab0 lgrl %r10,00000289d62cc590
00000289d49cb036: b9090026 sgr %r2,%r6
00000289d49cb03a: e32070f80024 stg %r2,248(%r7)
00000289d49cb040: c42800c81264 lgrl %r2,00000289d62cd508
[248220.564630] Call Trace:
[248220.564633] [<00000289d49cb02a>] task_non_contending+0x13a/0x340
[248220.564637] ([<00000289d49cb022>] task_non_contending+0x132/0x340)
[248220.564640] [<00000289d49cb35e>] switched_from_dl+0x12e/0x180
[248220.564643] [<00000289d49acf44>] check_class_changed+0x44/0xa0
[248220.564646] [<00000289d49d315e>] __sched_setscheduler+0x30e/0x990
[248220.564648] [<00000289d49d38dc>] sched_setscheduler+0x7c/0x90
[248220.564650] [<00000289d49d395a>] do_sched_setscheduler+0x6a/0x130
[248220.564652] [<00000289d49d3c2c>] __s390x_sys_sched_setscheduler+0x3c/0x60
[248220.564654] [<00000289d5709a86>] __do_syscall+0x136/0x250
[248220.564657] [<00000289d57157ce>] system_call+0x6e/0x90
[248220.564661] Last Breaking-Event-Address:
[248220.564661] [<00000289d49c8ea2>] dl_bw_cpus+0xa2/0xd0
[248220.564666] Kernel panic - not syncing: Fatal exception: panic_on_oops
Thanks,
Mikhail
Return-Path: <linux-kernel+bounces-673150-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id BA38A41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:54:18 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 639CC188993F
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:54:18 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 2546128EA51;
Wed, 4 Jun 2025 11:53:56 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="VUQivGpu"
Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8402422A4DA
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:53:53 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.118.77.11
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749038035; cv=none; b=VBDLfvZT+ksDiH/WtkV5RlnVseCdXE+BrIEWXrRi5Kcl1jMtyQoq/dE8bDeA1rqBTBPg6Ae6as4GYLxQ9iX52pQLQMkzMss6RiS6mL8QIf8hdl1SeVEJMzqMOMufEatZQSDGqvg7phO0VbKpbd80sRzSlr2iqRu0/JyZYPj6K/E=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749038035; c=relaxed/simple;
bh=hF0QbYOloZlOwVAlSYgg34GUEd0zSnKsf9/kU9hggk0=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:From:In-Reply-To:
Content-Type:References; b=jTKMaTkuNRKH/VAgGXn2l8KIAa6vaMvK26uH32wBBIp/SAhCSBRsS3qGJexSTNVLCgnCgbq54sFhIcBHQK2E3pyhGg5n4wn2HE7nl6fvNzA95/gvebLODTO9GAcsV7w4UhNOltcEq/Fg40OfIGtG02HPfD0M+8BoefudEZRnqQw=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=VUQivGpu; arc=none smtp.client-ip=210.118.77.11
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com
Received: from eucas1p1.samsung.com (unknown [182.198.249.206])
by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20250604115351euoutp01400ab7bcac9fb7fbce4c5fd28b3e2d19~F1NK6axSO2313223132euoutp01k
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:53:51 +0000 (GMT)
DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20250604115351euoutp01400ab7bcac9fb7fbce4c5fd28b3e2d19~F1NK6axSO2313223132euoutp01k
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com;
s=mail20170921; t=1749038031;
bh=s/0qhETp0/O5tfeuPDSpC29l+QS4DsX1qeaGhsBy0I4=;
h=Date:Subject:To:Cc:From:In-Reply-To:References:From;
b=VUQivGpuXwfTvpBVWD1oWFdPgrlPaqvo8usOtfrEEyMhn3X9zaHLn/ZJvzMCOaNVm
tThqy1WUXxJeweaD4C6PA2Tr6afc9y6mcEVGtHV1cW7xjKehfa9S0SRk67bkRDLdcy
4vmdhCVu7nbznSCVPy1xyUByvCZtPorTzTysaG3M=
Received: from eusmtip2.samsung.com (unknown [203.254.199.222]) by
eucas1p2.samsung.com (KnoxPortal) with ESMTPA id
20250604115351eucas1p2029645aec0becbaea4623fed73756400~F1NKR_He42239722397eucas1p2f;
Wed, 4 Jun 2025 11:53:51 +0000 (GMT)
Received: from [192.168.1.44] (unknown [106.210.136.40]) by
eusmtip2.samsung.com (KnoxPortal) with ESMTPA id
20250604115349eusmtip2988a156336ef42213eda6e883df452af~F1NJJo9GR1421814218eusmtip2Y;
Wed, 4 Jun 2025 11:53:49 +0000 (GMT)
Message-ID: <a6a29e58-8613-47f0-9e5c-d125da7ddb49@xxxxxxxxxxx>
Date: Wed, 4 Jun 2025 13:53:49 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v3 3/8] drm/imagination: Use pwrseq for TH1520 GPU power
management
To: Krzysztof Kozlowski <krzk@xxxxxxxxxx>
Cc: Drew Fustini <drew@xxxxxxxx>, Guo Ren <guoren@xxxxxxxxxx>, Fu Wei
<wefu@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>, Krzysztof Kozlowski
<krzk+dt@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>, Bartosz
Golaszewski <brgl@xxxxxxxx>, Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>, Frank
Binns <frank.binns@xxxxxxxxxx>, Matt Coster <matt.coster@xxxxxxxxxx>,
Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>, Maxime Ripard
<mripard@xxxxxxxxxx>, Thomas Zimmermann <tzimmermann@xxxxxxx>, David Airlie
<airlied@xxxxxxxxx>, Simona Vetter <simona@xxxxxxxx>, Paul Walmsley
<paul.walmsley@xxxxxxxxxx>, Palmer Dabbelt <palmer@xxxxxxxxxxx>, Albert Ou
<aou@xxxxxxxxxxxxxxxxx>, Alexandre Ghiti <alex@xxxxxxxx>, Ulf Hansson
<ulf.hansson@xxxxxxxxxx>, Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>,
linux-riscv@xxxxxxxxxxxxxxxxxxx, devicetree@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-pm@xxxxxxxxxxxxxxx,
dri-devel@xxxxxxxxxxxxxxxxxxxxx
Content-Language: en-US
From: Michal Wilczynski <m.wilczynski@xxxxxxxxxxx>
In-Reply-To: <e5a0bee2-ff74-47cf-ad2c-0c78b57ae6cf@xxxxxxxxxx>
Content-Transfer-Encoding: 7bit
X-CMS-MailID: 20250604115351eucas1p2029645aec0becbaea4623fed73756400
X-Msg-Generator: CA
Content-Type: text/plain; charset="utf-8"
X-RootMTR: 20250529222405eucas1p18ed1254bf1b2d78468734656fec537e1
X-EPHeader: CA
X-CMS-RootMailID: 20250529222405eucas1p18ed1254bf1b2d78468734656fec537e1
References: <20250530-apr_14_for_sending-v3-0-83d5744d997c@xxxxxxxxxxx>
<CGME20250529222405eucas1p18ed1254bf1b2d78468734656fec537e1@xxxxxxxxxxxxxxxxxxxx>
<20250530-apr_14_for_sending-v3-3-83d5744d997c@xxxxxxxxxxx>
<20250603-whispering-jaybird-of-thunder-f87867@kuoka>
<d42a8c49-7ad2-49ef-bd9c-1e3d9981b58e@xxxxxxxxxxx>
<e5a0bee2-ff74-47cf-ad2c-0c78b57ae6cf@xxxxxxxxxx>
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 6/4/25 08:36, Krzysztof Kozlowski wrote:
On 03/06/2025 21:43, Michal Wilczynski wrote:
+ * and resets. Otherwise, we fall back to managing them ourselves.
+ */
+ pvr_dev->pwrseq = devm_pwrseq_get(dev, "gpu-power");
+ if (IS_ERR(pvr_dev->pwrseq)) {
+ int pwrseq_err = PTR_ERR(pvr_dev->pwrseq);
+
+ /*
+ * If the error is -EPROBE_DEFER, it's because the
+ * optional sequencer provider is not present
+ * and it's safe to fall back on manual power-up.
It is safe but why it is desirable? The rule is rather to defer the
probe, assuming this is probe path.
Yeah this is probe path.
The GPU node will depend on the AON node, which will be the sole
provider for the 'gpu-power' sequencer (based on the discussion in patch
1).
Therefore, if the AON/pwrseq driver has already completed its probe, and
devm_pwrseq_get() in the GPU driver subsequently returns -EPROBE_DEFER
(because pwrseq_get found 'no match' on the bus for 'gpu-power'), the
interpretation is that the AON driver did not register this optional
sequencer. Since AON is the only anticipated source, it implies the
sequencer won't become available later from its designated provider.
I don't understand why you made this assumption. AON could be a module
and this driver built-in. AON will likely probe later.
You're absolutely right that AON could be a module and would generally
probe later in that scenario. However, the GPU device also has a
'power-domains = <&aon TH1520_GPU_PD>' dependency. If the AON driver (as
the PM domain provider) were a late probing module, the GPU driver's
probe would hit -EPROBE_DEFER when its power domain is requested
which happens before attempting to get other resources like a power
sequencer.
So, if the GPU driver's code does reach the devm_pwrseq_get(dev,
"gpu-power") call, it strongly implies the AON driver has already
successfully probed.
This leads to the core challenge with the optional 'gpu-power'
sequencer: Even if the AON driver has already probed, if it then chooses
not to register the "gpu-power" sequence (because it's an optional
feature), pwrseq_get() will still find "no device matched" on the
pwrseq_bus and return EPROBE_DEFER.
If the GPU driver defers here, as it normally should for -EPROBE_DEFER,
it could wait indefinitely for an optional sequence that its
already probed AON provider will not supply.
Anyway I think you're right, that this is probably confusing and we
shouldn't rely on this behavior.
To solve this, and to allow the GPU driver to correctly handle
-EPROBE_DEFER when a sequencer is genuinely expected, I propose using a
boolean property on the GPU's DT node, e.g.
img,gpu-expects-power-sequencer. If the GPU node provides this property
it means the pwrseq 'gpu-power' is required.
I didn't want to use this approach at first, as it seemed to me like the
pwrseq API had a hands-off approach for the DT with its matching logic,
but it seems unavoidable at this point.
Best regards,
Krzysztof
Best regards,
--
Michal Wilczynski <m.wilczynski@xxxxxxxxxxx>
Return-Path: <linux-kernel+bounces-673151-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 4F1D041E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:54:42 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id CA07F3A4CFD
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:54:19 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 3ED1028C01F;
Wed, 4 Jun 2025 11:54:36 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="Bm3iMoNc"
Received: from TY3P286CU002.outbound.protection.outlook.com (mail-japaneastazon11010005.outbound.protection.outlook.com [52.101.229.5])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2884D22A4DA;
Wed, 4 Jun 2025 11:54:31 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.229.5
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749038075; cv=fail; b=hPDKyUdzqXPghyYVNmEOcxAEs4fPuIqkOY6lnRxEstLpXA51oahGBP+6f09AD4l3K17ApkXfoeE7tTgGkRo5jaqpXEn2IYW+zzK4pS/2uUuwDlr85qQURQg5ADEdUuVPJKYcifvQVSN1eedqH+bzRgzR/zKin4q1x6Htfm8VBbk=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749038075; c=relaxed/simple;
bh=JoiHtbcWA0zSIzldxrzfQ1yopb1Ux/xjeQ2sZ9geIyU=;
h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To:
Content-Type:MIME-Version; b=Br9XLfzlU/EwQXDvA26fXqUaZa6B5vphPi1NhB4izHM3DwlIdN570/VOYILLfXPamr3anc92m5KxlXjRzcu9q3N1+Vwky7aBh+VUSfw/fjF323sulI+R2l6OUsQ68wwPwbqqEVfxrF4FYo56jA/UlbBMzQVzrhheREhDpdza8no=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com; spf=pass smtp.mailfrom=renesas.com; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b=Bm3iMoNc; arc=fail smtp.client-ip=52.101.229.5
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=amDHOsBWuknTsSPtkCzmA96iJlUuop+anMOmhEwJz9wXyV0Wx/JizU1vicGLx2/jB08GouCqvyGTqft/V9as/sMYsWDfzUe8NpZ4spqL5NnhYcARD0/nivYPRqO666JryNlgvx+DKIYkqFqa+J+VW/hMj1RM6+Nr3qz1haV/UM0RpOBgnTIIj1eKBrKF354ZKWvs6SyXveBrT+K917ohkOqOYhGBEPaot+ypVcWbon7hQVZSginxtDU4/f4KHgCXKSm5slG78DypsShY5pxzS23dkbiCSkim+H+JdMMmqo/Uk09p/b6Dsi6APHZvhQ5FanWI8HAQVF2YbHKidWFh/A==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=sMvmqWZGWCKdJcGFjkYWMbd1en9FJ+RgAIo1JkEl4bQ=;
b=eqio0dP8pq4V8uhF7v+qrj0qn9gCkQeM2DhvuyzwJC/fhyucKOpT/MouOohgBHq8WVQj/H4BofC/eUG/LpyDZokcTOdgYunwu1vrmj4VByIL552iJ5ZaILdXNiI4XiL3qiDInHPY2qUf/cTWnrZzzXTNp+4I7rMk/8yDzZvKUVBcfPSSJSqAAZm9kBlMu0ECWCkBG7lgYHDIjj6BEtknB1D51Nx8oUz1p8m9quBYE+N8wKIYfkThW29owLS1n6o/8R8F1I4okXS86sfe1F0bXqKJn8GgNimQ+/yocn2UB29NinpTENONS+riDR9QueHfPiOCwNUlYERkvZEWsldBJA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com;
dkim=pass header.d=renesas.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=sMvmqWZGWCKdJcGFjkYWMbd1en9FJ+RgAIo1JkEl4bQ=;
b=Bm3iMoNcCnh6MLPmGuZgfdXK9oE55og5t5UIsEMxZ8VQAURtWeKzq9S+mkgP9N2q8xzF/c1LiN21klggdb3TyKRPag9E0QbVQrZxlqZ8Za5MLrWEtpFT3O6kkckoYMXPMZ+RnxBTw6L+Se09uIakXAxbWlAcsJVN+vYrn9jdzMA=
Received: from OS3PR01MB8319.jpnprd01.prod.outlook.com (2603:1096:604:1a2::11)
by TYCPR01MB9894.jpnprd01.prod.outlook.com (2603:1096:400:220::12) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8813.19; Wed, 4 Jun
2025 11:54:28 +0000
Received: from OS3PR01MB8319.jpnprd01.prod.outlook.com
([fe80::3bc8:765f:f19e:16d5]) by OS3PR01MB8319.jpnprd01.prod.outlook.com
([fe80::3bc8:765f:f19e:16d5%5]) with mapi id 15.20.8813.018; Wed, 4 Jun 2025
11:54:28 +0000
From: Chris Brandt <Chris.Brandt@xxxxxxxxxxx>
To: Hugo Villeneuve <hugo@xxxxxxxxxxx>, Biju Das <biju.das.jz@xxxxxxxxxxxxxx>,
"maarten.lankhorst@xxxxxxxxxxxxxxx" <maarten.lankhorst@xxxxxxxxxxxxxxx>,
"mripard@xxxxxxxxxx" <mripard@xxxxxxxxxx>, "tzimmermann@xxxxxxx"
<tzimmermann@xxxxxxx>, "airlied@xxxxxxxxx" <airlied@xxxxxxxxx>,
"simona@xxxxxxxx" <simona@xxxxxxxx>
CC: "dri-devel@xxxxxxxxxxxxxxxxxxxxx" <dri-devel@xxxxxxxxxxxxxxxxxxxxx>,
"linux-renesas-soc@xxxxxxxxxxxxxxx" <linux-renesas-soc@xxxxxxxxxxxxxxx>,
"linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, Hugo
Villeneuve <hvilleneuve@xxxxxxxxxxxx>
Subject: RE: [PATCH v3 2/2] drm: renesas: rz-du: Set DCS maximum return packet
size
Thread-Topic: [PATCH v3 2/2] drm: renesas: rz-du: Set DCS maximum return
packet size
Thread-Index: AQHbyydYZROipDs4Mk6V13hnElvTOLPy9BEw
Date: Wed, 4 Jun 2025 11:54:28 +0000
Message-ID:
<OS3PR01MB831999C4A5A32FE11CC04A078A6CA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20250522143911.138077-1-hugo@xxxxxxxxxxx>
<20250522143911.138077-3-hugo@xxxxxxxxxxx>
In-Reply-To: <20250522143911.138077-3-hugo@xxxxxxxxxxx>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=renesas.com;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: OS3PR01MB8319:EE_|TYCPR01MB9894:EE_
x-ms-office365-filtering-correlation-id: 7e1b19a7-88d3-4f0c-bbea-08dda35e8f8f
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam:
BCL:0;ARA:13230040|366016|1800799024|376014|7416014|38070700018|7053199007;
x-microsoft-antispam-message-info:
=?us-ascii?Q?Fmyj1KikUkKi0mSHJe3gVwH+DGW0Q90mzj+6dph6S2kDuOSu4ZEVwVG2XSw4?=
=?us-ascii?Q?eOURvMvE+Oca+rSRTUZtQgEwT/EwiYKCT8RDqCvYPpkm8oIwbWL5SX7SLBXO?=
=?us-ascii?Q?aSbO0PN6Rvlci08P3Ik4jIiIT2oQq37lc5xrGys4+Tf+oVVuEIcxgH3sN9TT?=
=?us-ascii?Q?CkeI3+2CQvNDCZaU8GYQzKla+6cVg8sYMZ3PDtKDpZT+Hm3lfsotR0zLHJZn?=
=?us-ascii?Q?56o3pXKlZPJpgKBUtcc6bTXS4BUv4S0c2oVeEG4LzaRzOK5uc3rbEcrPzOm5?=
=?us-ascii?Q?0vkPgVyvN4hA+hzXacSIYmbI+o2F0NL8IJ6glyq2fTzy0KL+MReCSitsFvko?=
=?us-ascii?Q?bDncfH69wWh2igDJrmfbRGd6ihtRgstMYeol9d00gY67yZb2ixQy1Up6o09R?=
=?us-ascii?Q?ofKp7gJltj0OZXnMq5tKsifxFODatxkMJGdgWeSAfG5CHuunC871S3x/RvT8?=
=?us-ascii?Q?JF2j4TDtI7qy1XgGLgnSJAnz8CEB7xt6vfNr6RkW6Zekz5RDmCZ+nhmgBVh5?=
=?us-ascii?Q?653c3lUuVe4xysg/kK5UX08wG6+fzFvk2AL9WYcpIVPd+wSra5F//LtymX5k?=
=?us-ascii?Q?2+MKAq0nE/BBF/paQ9ngEgdot6xcSyLZNJdniMbEOBRLmaQXxQiFuOZSH4Jb?=
=?us-ascii?Q?nkQ7/g7xxhxHPMgmm2z/rNef2YD9aOF9ZnHuBFHQVUuuKVOSpQzFlmvh+Sw/?=
=?us-ascii?Q?JZouGeix4BuGHHeDDYSXQERev6Nlj2QXOovZehqOuj00udwlz8M/qsZEVQYE?=
=?us-ascii?Q?jJBFGAAM9oo7Z4iac+HegDWk0/SzSsdn3TsYqX0Mh3KGpdQtCKGhUhCYoKf6?=
=?us-ascii?Q?MweLFJ1UsZSPFfk+lDyyp7jKuR0jwdqQWUBv6mZ0bHaUpEygVUViwub6RCtd?=
=?us-ascii?Q?qgK9dq4HFOiHxSIhFgAjXg1Cnrg0yBeN+WXLC6V5UWBICzYKwF0bSWFCA8Xf?=
=?us-ascii?Q?E8H5YRcqGPoY/gg7znMByax/qF/HbGUA/QM5HRR35FKnt/MtCZ0x3I3zGEWL?=
=?us-ascii?Q?PDCW8L19BIsz5y/oCNDbEpyBWUo5drTjub3sdyvopgObVLCPTmUaPrln9nCQ?=
=?us-ascii?Q?LEfVWD1263+ewE9K3l7CQGiNhVig3D3TM5HGQufw22GlcZpaG/+BPM8gbGFG?=
=?us-ascii?Q?IGm0VLW9z7WVjuJtN3F7xcq1z7bC8hx03ojOOCaHJx2eN1OyWITvUHJF92e2?=
=?us-ascii?Q?OGdg3l38H9K5t44KK/pjUz8oSD/2v0PLgcpNHa1OjjNGEf6fqvyoELyHjdoI?=
=?us-ascii?Q?dOlsyyp02s7iMXjnLIKJRfIonr1O0Lkjie2ZmVxQubbcyvjvzRZ+KOq2UkVT?=
=?us-ascii?Q?Y0RdQzSIiR2xIL3Ke63zwj2kSAS3Q2v1SkPC4E/ciIuB53l0hsYVqlvDb/N2?=
=?us-ascii?Q?tvQS+Y7NmiEDBML3EbIvLpYejXEIWqAtSQAY9QnfKFzyUB/SEAuViUOP3Kaa?=
=?us-ascii?Q?rZvFDv3QFEUtRKsnZ6Qvd8NTNyf2T98CKHx5/8VPJSwmZB/LOG28BA=3D=3D?=
x-forefront-antispam-report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS3PR01MB8319.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014)(7416014)(38070700018)(7053199007);DIR:OUT;SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0:
=?us-ascii?Q?qJrOxUX4UT/drBrsUumTFKN9YHxz0wrfXP33SonwSOv3Ss+DfRN8hqNwU53z?=
=?us-ascii?Q?u36QWghhdfaP9wFPrC9gmaUyy0eyD4u/HpbkpBStjAh38+5Kt1YZh/U1DhHY?=
=?us-ascii?Q?lL5AqGROK4PcL8nO2hcoXpK/rnz0WH4Bq1VywrdUHQVDgyFGjm02nkO9mId6?=
=?us-ascii?Q?7WqzkBfEpAJBx4Ehh40b+fe3I96pmMKytDviEQ0cC6UMv02mbZ4HP0JitUrR?=
=?us-ascii?Q?f2Rk8Z7Tz6A1o59Uj0xEFqL+8tFhL5QD3Hp5lANUkMOFzf+aieeiKgIRiuPg?=
=?us-ascii?Q?yJ9ydYuHkbxwMcJYUTx4hSvZxZcZd4AV+rSFQaEFfmjNoUJAujuM4rsSXZUO?=
=?us-ascii?Q?FCRV8SGHpdKA6NJs0vRF9m6VczNFYaNBv3QzCKovOr/XjPbwqm2l3GVHD6l1?=
=?us-ascii?Q?1bojtEl+68Rzpy3I+vws8oJLpfC7HQ/IYUxcNA40dqxoZJUfJQWYcv7rR1XF?=
=?us-ascii?Q?K9xJed+8VTxanPWlDEXqAIGFzLCmvBM6U+cPHeuEfg4DFdoq4T0SAZTQrhn2?=
=?us-ascii?Q?nT5omN2VJj1ngsocrO1H/UGSaLM2cfYHAb1dv1dD9GH9Q8Iho0BtqB9BVCfa?=
=?us-ascii?Q?bbSSJ3ar9yliZl5Yfs1mKec0+4BSt9nOSbEhZdtDSV2As+61DPemy3etYtRH?=
=?us-ascii?Q?ankg1scbsC7RttOudaexppMjQhJG1aLVCmwWHtLhNZlgBxTdi0wFd6BZWwQB?=
=?us-ascii?Q?7wxfFWYi7bFYh3ZVxP5lHfUe4xJ9MDgOf5Yb28BXbej3l3iuswJ2j5RU8HEw?=
=?us-ascii?Q?S/aN3qSzhBbgPb6mhnjpGfiQoFc2cnWlf7rfxe1xckUCo+lGKbT3eZkPtSNA?=
=?us-ascii?Q?033ApZ7atHR9sDzdpXnUjjKrrCq+tED/xXCfESDGA3dBAGv2pQLpAbgpk/Ve?=
=?us-ascii?Q?OOdLypGO6LJKxMfAQT54QSOnatmFEaftz3atD5mnqEeUj5JsbHNUitAw2KWW?=
=?us-ascii?Q?BRTFr51MKW6ClRZWjYtfQN4Ks5upxoDwMLerg5rjL3NljOLFEfZ2euvIG7XC?=
=?us-ascii?Q?kkD1fwKMlxIBpsib5bNwB40yaM+08fnRry8w4hJxoxCCgUZjRWvtdBM21rsN?=
=?us-ascii?Q?BT4mN0mzAYP5NPcVNlhGaYesdyCDkqOeWP5YY1MrtlXykG9mwzs5ZakGTWzK?=
=?us-ascii?Q?+wc9XHWmps1sxj6P4dLPPrXqXksYdTzeA5pN9Y55w2rBF2QI6WjTBwOjsPr8?=
=?us-ascii?Q?+Cp/AZIK3LF3ScFmlvsvJAbO/KkNn3fItZj3/z2anFORetvQnDv8K796sJYe?=
=?us-ascii?Q?LuTaHcOAJKFuYxLTdjsROsEw3r/P0yEaMu+Prz7eiVkqBbYta1u4TLoMXHZf?=
=?us-ascii?Q?iHFXlBJaxpGbH+84NHCD9lo+1cevWkzsJQ8Z0NaHj8da+fEEuwmMWcncuEV6?=
=?us-ascii?Q?BfP+8CahJgC6XCeh8s2cRHgDIzK+r4DrC4yCsRfcihHvtJ74Y7UMAH0igKqC?=
=?us-ascii?Q?TqbNHmgRIJmVQgW3KTdnVwrUL3pFSl1z6Fid3X2KX/gvWQbRayrPQLMyaqwF?=
=?us-ascii?Q?E1xLbH5ouwkUFsHwuAlKGBHo1HseYxNMh5kLv3sBDiNxZjY/rIr04ZBiTPPz?=
=?us-ascii?Q?SnGj4qmBNRxcEnanO7onTu6AS9K4pKgPqhldPLgw?=
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-OriginatorOrg: renesas.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8319.jpnprd01.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 7e1b19a7-88d3-4f0c-bbea-08dda35e8f8f
X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jun 2025 11:54:28.7029
(UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 53d82571-da19-47e4-9cb4-625a166a4a2a
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: WFks0g8Uod6970pX1e0AfvgDMwdoky4e4TI6+sNIKoxv91YGTzdQ03Wl/8fg09b+49uokEh5gABFLSEq2/NF4E/eHLDQOlbql3bEnYW9nHs=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYCPR01MB9894
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hi Hugo,
I'm fine with the code, but maybe it should go in a different location.
Since it's a register setup, it should probably go in rzg2l_mipi_dsi_startu=
p() with the others.
Additionally, since it is required to make rzg2l_mipi_dsi_host_transfer() o=
perate properly, my suggestion
is to add this to your previous patch instead of making it separate.
Otherwise, it's like you are submitting one patch with a known bug, then im=
mediately fixing it with a second patch.
This also would prevent the merge conflict with my patch that also modifies=
rzg2l_mipi_dsi_atomic_enable().
Chris
-----Original Message-----
From: Hugo Villeneuve <hugo@xxxxxxxxxxx>=20
Sent: Thursday, May 22, 2025 10:39 AM
To: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>; maarten.lankhorst@xxxxxxxxxxxxxx=
m; mripard@xxxxxxxxxx; tzimmermann@xxxxxxx; airlied@xxxxxxxxx; simona@ffwll=
.ch
Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx; linux-renesas-soc@xxxxxxxxxxxxxxx; lin=
ux-kernel@xxxxxxxxxxxxxxx; hugo@xxxxxxxxxxx; Hugo Villeneuve <hvilleneuve@d=
imonoff.com>; Chris Brandt <Chris.Brandt@xxxxxxxxxxx>
Subject: [PATCH v3 2/2] drm: renesas: rz-du: Set DCS maximum return packet =
size
From: Hugo Villeneuve <hvilleneuve@xxxxxxxxxxxx>
The default value of 1 will result in long read commands payload not being =
saved to memory.
Fix by setting this value to the DMA buffer size.
Cc: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
Cc: Chris Brandt <chris.brandt@xxxxxxxxxxx>
Signed-off-by: Hugo Villeneuve <hvilleneuve@xxxxxxxxxxxx>
---
drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c | 10 ++++++++++
drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi_regs.h | 4 ++++
2 files changed, 14 insertions(+)
diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c b/drivers/gpu/d=
rm/renesas/rz-du/rzg2l_mipi_dsi.c
index a048d473db00b..745aae63af9d8 100644
--- a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
+++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
@@ -549,6 +549,7 @@ static void rzg2l_mipi_dsi_atomic_enable(struct drm_bri=
dge *bridge,
const struct drm_display_mode *mode;
struct drm_connector *connector;
struct drm_crtc *crtc;
+ u32 value;
int ret;
=20
connector =3D drm_atomic_get_new_connector_for_encoder(state, bridge->enc=
oder); @@ -561,6 +562,15 @@ static void rzg2l_mipi_dsi_atomic_enable(struct=
drm_bridge *bridge,
=20
rzg2l_mipi_dsi_set_display_timing(dsi, mode);
=20
+ /*
+ * The default value of 1 will result in long read commands payload
+ * not being saved to memory. Set to the DMA buffer size.
+ */
+ value =3D rzg2l_mipi_dsi_link_read(dsi, DSISETR);
+ value &=3D ~DSISETR_MRPSZ;
+ value |=3D FIELD_PREP(DSISETR_MRPSZ, RZG2L_DCS_BUF_SIZE);
+ rzg2l_mipi_dsi_link_write(dsi, DSISETR, value);
+
ret =3D rzg2l_mipi_dsi_start_hs_clock(dsi);
if (ret < 0)
goto err_stop;
diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi_regs.h b/drivers/=
gpu/drm/renesas/rz-du/rzg2l_mipi_dsi_regs.h
index 0e432b04188d0..26d8a37ee6351 100644
--- a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi_regs.h
+++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi_regs.h
@@ -81,6 +81,10 @@
#define RSTSR_SWRSTLP (1 << 1)
#define RSTSR_SWRSTHS (1 << 0)
=20
+/* DSI Set Register */
+#define DSISETR 0x120
+#define DSISETR_MRPSZ GENMASK(15, 0)
+
/* Rx Result Save Slot 0 Register */
#define RXRSS0R 0x240
#define RXRSS0R_RXPKTDFAIL BIT(28)
--
2.39.5
Return-Path: <linux-kernel+bounces-673152-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id CB41A41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:55:49 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 6A78A1884024
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:56:01 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id C0C8828C01F;
Wed, 4 Jun 2025 11:55:41 +0000 (UTC)
Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id E258822A4DA
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:55:38 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.196
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749038141; cv=none; b=FobWXRwgzAcXM0Pk8GMbwMfKwYP2XjMxlo5RZ0SFW497pS35IKHtVojiJAkuZ+jmqwx+ip1QI9OvH1sseAkBy7aJcvBCHy5jWCkDgIrr2Hg5O3hpFucqhJ8EDXiNVhUMnAH/2JL04O1l7plFn3oYB8PirlOJb2aobwfsVGM/LWs=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749038141; c=relaxed/simple;
bh=qQA6KOcXSDs8+2RWAQENkMP3pc5baNbMl6nrgh95vQQ=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=sB/Cp7CrUeNQyBzPyP4XzdE5RiydAUrclwQh0wwGfhDZKeFEWZDzGZ3yBx/sxZXxDOrZFkqLLfAOgbzkPEgUlfZKFUI7Zn2AZkZ5OlwshN8aEe2dkPkdvoDi0pg2zcVnUAyBigdoOHzcgwCMUCRK2wEUP5uoqSSe4HP+gn5LatM=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ghiti.fr; spf=pass smtp.mailfrom=ghiti.fr; arc=none smtp.client-ip=217.70.183.196
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ghiti.fr
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ghiti.fr
Received: by mail.gandi.net (Postfix) with ESMTPSA id 4421643B20;
Wed, 4 Jun 2025 11:55:28 +0000 (UTC)
Message-ID: <dc2b9e86-29f7-406e-a7c5-3f949f3999db@xxxxxxxx>
Date: Wed, 4 Jun 2025 13:55:27 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v2 2/3] riscv: process: use unsigned int instead of
unsigned long for put_user()
To: =?UTF-8?B?Q2zDqW1lbnQgTMOpZ2Vy?= <cleger@xxxxxxxxxxxx>,
linux-riscv@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
Cc: Paul Walmsley <paul.walmsley@xxxxxxxxxx>,
Palmer Dabbelt <palmer@xxxxxxxxxxx>, Albert Ou <aou@xxxxxxxxxxxxxxxxx>,
"Maciej W . Rozycki" <macro@xxxxxxxxxxx>,
David Laight <david.laight.linux@xxxxxxxxx>
References: <20250602193918.868962-1-cleger@xxxxxxxxxxxx>
<20250602193918.868962-3-cleger@xxxxxxxxxxxx>
Content-Language: en-US
From: Alexandre Ghiti <alex@xxxxxxxx>
In-Reply-To: <20250602193918.868962-3-cleger@xxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-GND-State: clean
X-GND-Score: -100
X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddugddvudduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfevfhfhjggtgfesthekredttddvjeenucfhrhhomheptehlvgigrghnughrvgcuifhhihhtihcuoegrlhgvgiesghhhihhtihdrfhhrqeenucggtffrrghtthgvrhhnpedtgeeuhffhveeujeetveevieekleekvdffudefleevgefgieekkefggefhtddtveenucfkphepudelfedrfeefrdehjedrudelleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduleefrdeffedrheejrdduleelpdhhvghloheplgduledvrdduieekrddvuddrvdeingdpmhgrihhlfhhrohhmpegrlhgvgiesghhhihhtihdrfhhrpdhnsggprhgtphhtthhopeekpdhrtghpthhtoheptghlvghgvghrsehrihhvohhsihhntgdrtghomhdprhgtphhtthhopehlihhnuhigqdhrihhstghvsehlihhsthhsrdhinhhfrhgruggvrggurdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohepphgruhhlrdifrghlmhhslhgvhiesshhifhhivhgvrdgtohhmpdhrtghpthhtohepphgrlhhmvghrsegurggssggvlhhtrdgtohhmpdhrtghpthhtohepr
ghouhesvggvtghsrdgsvghrkhgvlhgvhidrvgguuhdprhgtphhtthhopehmrggtrhhosehorhgtrghmrdhmvgdruhhkpdhrtghpthhtohepuggrvhhiugdrlhgrihhghhhtrdhlihhnuhigsehgmhgrihhlrdgtohhm
X-GND-Sasl: alex@xxxxxxxx
X-Spam-Status: No, score=-3.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hi Clément,
On 6/2/25 21:39, Clément Léger wrote:
The specification of prctl() for GET_UNALIGN_CTL states that the value is
returned in an unsigned int * address passed as an unsigned long. Change
the type to match that and avoid an unaligned access as well.
Signed-off-by: Clément Léger <cleger@xxxxxxxxxxxx>
---
arch/riscv/kernel/process.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/riscv/kernel/process.c b/arch/riscv/kernel/process.c
index 15d8f75902f8..9ee6d816b98b 100644
--- a/arch/riscv/kernel/process.c
+++ b/arch/riscv/kernel/process.c
@@ -57,7 +57,7 @@ int get_unalign_ctl(struct task_struct *tsk, unsigned long adr)
if (!unaligned_ctl_available())
return -EINVAL;
- return put_user(tsk->thread.align_ctl, (unsigned long __user *)adr);
+ return put_user(tsk->thread.align_ctl, (unsigned int __user *)adr);
}
void __show_regs(struct pt_regs *regs)
Reviewed-by: Alexandre Ghiti <alexghiti@xxxxxxxxxxxx>
Thanks,
Alex
Return-Path: <linux-kernel+bounces-673153-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 17F8441E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:57:07 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id D35D41883EFF
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:57:20 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id C767528A408;
Wed, 4 Jun 2025 11:57:00 +0000 (UTC)
Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5E55C14E2E2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:56:57 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.195
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749038220; cv=none; b=Shyl1reLdkshOTJ7OcpVJyQFOsug9w2KEt43SkQOgWOWPj3Dr+KYlNnN0pZDZKI2Ru5aakEzEgziNHXH5W3EHGPBiOQcgF6xItIjs1z5ObkCHQeB3WyA45ODz86lHHiX25AX6pQ4hekbYmUADSXiKcDT6WGmWqUPKIPzSAuMp+s=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749038220; c=relaxed/simple;
bh=9Z2VDGaxg3hA3dx2AQrLUPV0bdjRYVKPmpcwAiPu6Qk=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=sBSUvRmqT47CtsXQ4pUYY+ceqZXQ0whxZkJq/RmyeyYyAXFeDA7O9yOdfVuR0grYxLf6/EUzS8sud/wrAg5a9+JYCIEG5p9NUELDqn7V1ZL58+Z6es7nhYhkezzGMMzpToTfVPk0jamm9/0KpRVQUy2ulPGZkqGh2Map80FB4NA=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ghiti.fr; spf=pass smtp.mailfrom=ghiti.fr; arc=none smtp.client-ip=217.70.183.195
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ghiti.fr
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ghiti.fr
Received: by mail.gandi.net (Postfix) with ESMTPSA id A97C11F4F3;
Wed, 4 Jun 2025 11:56:53 +0000 (UTC)
Message-ID: <185b2f71-38df-4656-932c-1d0e0304441d@xxxxxxxx>
Date: Wed, 4 Jun 2025 13:56:53 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v2 3/3] riscv: uaccess: do not do misaligned accesses in
get/put_user()
To: =?UTF-8?B?Q2zDqW1lbnQgTMOpZ2Vy?= <cleger@xxxxxxxxxxxx>,
linux-riscv@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
Cc: Paul Walmsley <paul.walmsley@xxxxxxxxxx>,
Palmer Dabbelt <palmer@xxxxxxxxxxx>, Albert Ou <aou@xxxxxxxxxxxxxxxxx>,
"Maciej W . Rozycki" <macro@xxxxxxxxxxx>,
David Laight <david.laight.linux@xxxxxxxxx>
References: <20250602193918.868962-1-cleger@xxxxxxxxxxxx>
<20250602193918.868962-4-cleger@xxxxxxxxxxxx>
Content-Language: en-US
From: Alexandre Ghiti <alex@xxxxxxxx>
In-Reply-To: <20250602193918.868962-4-cleger@xxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-GND-State: clean
X-GND-Score: -100
X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddugddvudduucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfevfhfhjggtgfesthekredttddvjeenucfhrhhomheptehlvgigrghnughrvgcuifhhihhtihcuoegrlhgvgiesghhhihhtihdrfhhrqeenucggtffrrghtthgvrhhnpedtgeeuhffhveeujeetveevieekleekvdffudefleevgefgieekkefggefhtddtveenucfkphepudelfedrfeefrdehjedrudelleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduleefrdeffedrheejrdduleelpdhhvghloheplgduledvrdduieekrddvuddrvdeingdpmhgrihhlfhhrohhmpegrlhgvgiesghhhihhtihdrfhhrpdhnsggprhgtphhtthhopeekpdhrtghpthhtoheptghlvghgvghrsehrihhvohhsihhntgdrtghomhdprhgtphhtthhopehlihhnuhigqdhrihhstghvsehlihhsthhsrdhinhhfrhgruggvrggurdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohepphgruhhlrdifrghlmhhslhgvhiesshhifhhivhgvrdgtohhmpdhrtghpthhtohepphgrlhhmvghrsegurggssggvlhhtrdgtohhmpdhrtghpthhtohepr
ghouhesvggvtghsrdgsvghrkhgvlhgvhidrvgguuhdprhgtphhtthhopehmrggtrhhosehorhgtrghmrdhmvgdruhhkpdhrtghpthhtohepuggrvhhiugdrlhgrihhghhhtrdhlihhnuhigsehgmhgrihhlrdgtohhm
X-GND-Sasl: alex@xxxxxxxx
X-Spam-Status: No, score=-3.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 6/2/25 21:39, Clément Léger wrote:
Doing misaligned access to userspace memory would make a trap on
platform where it is emulated. Latest fixes removed the kernel
capability to do unaligned accesses to userspace memory safely since
interrupts are kept disabled at all time during that. Thus doing so
would crash the kernel.
Such behavior was detected with GET_UNALIGN_CTL() that was doing
a put_user() with an unsigned long* address that should have been an
unsigned int*. Reenabling kernel misaligned access emulation is a bit
risky and it would also degrade performances. Rather than doing that,
we will try to avoid any misaligned accessed by using copy_from/to_user()
which does not do any misaligned accesses. This can be done only for
!CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS and thus allows to only generate
a bit more code for this config.
Signed-off-by: Clément Léger <cleger@xxxxxxxxxxxx>
---
arch/riscv/include/asm/uaccess.h | 23 ++++++++++++++++++-----
1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/arch/riscv/include/asm/uaccess.h b/arch/riscv/include/asm/uaccess.h
index 046de7ced09c..d472da4450e6 100644
--- a/arch/riscv/include/asm/uaccess.h
+++ b/arch/riscv/include/asm/uaccess.h
@@ -169,8 +169,19 @@ do { \
#endif /* CONFIG_64BIT */
+unsigned long __must_check __asm_copy_to_user_sum_enabled(void __user *to,
+ const void *from, unsigned long n);
+unsigned long __must_check __asm_copy_from_user_sum_enabled(void *to,
+ const void __user *from, unsigned long n);
+
#define __get_user_nocheck(x, __gu_ptr, label) \
do { \
+ if (!IS_ENABLED(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) && \
+ !IS_ALIGNED((uintptr_t)__gu_ptr, sizeof(*__gu_ptr))) { \
+ if (__asm_copy_from_user_sum_enabled(&(x), __gu_ptr, sizeof(*__gu_ptr))) \
+ goto label; \
+ break; \
+ } \
switch (sizeof(*__gu_ptr)) { \
case 1: \
__get_user_asm("lb", (x), __gu_ptr, label); \
@@ -297,6 +308,13 @@ do { \
#define __put_user_nocheck(x, __gu_ptr, label) \
do { \
+ if (!IS_ENABLED(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS) && \
+ !IS_ALIGNED((uintptr_t)__gu_ptr, sizeof(*__gu_ptr))) { \
+ __inttype(x) val = (__inttype(x))x; \
+ if (__asm_copy_to_user_sum_enabled(__gu_ptr, &(val), sizeof(*__gu_ptr))) \
+ goto label; \
+ break; \
+ } \
switch (sizeof(*__gu_ptr)) { \
case 1: \
__put_user_asm("sb", (x), __gu_ptr, label); \
@@ -450,11 +468,6 @@ static inline void user_access_restore(unsigned long enabled) { }
(x) = (__force __typeof__(*(ptr)))__gu_val; \
} while (0)
-unsigned long __must_check __asm_copy_to_user_sum_enabled(void __user *to,
- const void *from, unsigned long n);
-unsigned long __must_check __asm_copy_from_user_sum_enabled(void *to,
- const void __user *from, unsigned long n);
-
#define unsafe_copy_to_user(_dst, _src, _len, label) \
if (__asm_copy_to_user_sum_enabled(_dst, _src, _len)) \
goto label;
Even if as noted by David, there is room for improvement, for now the
simplicity of this is good enough to me, so:
Reviewed-by: Alexandre Ghiti <alexghiti@xxxxxxxxxxxx>
Thanks,
Alex
Return-Path: <linux-kernel+bounces-673154-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 4867641E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:00:32 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 98AAE1899009
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:00:45 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id DCD6828A408;
Wed, 4 Jun 2025 12:00:23 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=cmpxchg-org.20230601.gappssmtp.com header.i=@cmpxchg-org.20230601.gappssmtp.com header.b="FhEX+H60"
Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0A1BF1DED6D
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:00:20 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.49
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749038423; cv=none; b=egNNt0waHhDR3OJj/no+y9k3qAswl0xt8QDur0OP8nnD0X+ZVhsEgJVfdE2CFK6EsMhUsue4DBhgtSKNZY2AGAIxO0H3YasECEmdjwbv9phzc0TCxnzOCGKFnAKVlEkEanJCJapb6MTupcXU9DNu9MFcsuAHjegtC2Tm+mPaxq4=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749038423; c=relaxed/simple;
bh=zVY9XzhhWcHzqUqNnnyNii3ba4FGUocj04/QVzLzR3A=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=euhoPA8hGHpdBNzWrrlvDeljPwjWDId+5g1zuaBumNwKKRlGYJ5QWnvXfIVEij9wukT3KlLYesrnvZHac86nAOuSiDsOPovTiNrLYndCy1rqX9xfuaWQ244iu3+Il0ytMSk/DzudnX1/GGv0Tac9t/yNjJOdQ685JYEuSu1Xs+k=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmpxchg.org; spf=pass smtp.mailfrom=cmpxchg.org; dkim=pass (2048-bit key) header.d=cmpxchg-org.20230601.gappssmtp.com header.i=@cmpxchg-org.20230601.gappssmtp.com header.b=FhEX+H60; arc=none smtp.client-ip=209.85.221.49
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmpxchg.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cmpxchg.org
Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-3a5123c1533so1368557f8f.2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 05:00:20 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=cmpxchg-org.20230601.gappssmtp.com; s=20230601; t=1749038419; x=1749643219; darn=vger.kernel.org;
h=in-reply-to:content-transfer-encoding:content-disposition
:mime-version:references:message-id:subject:cc:to:from:date:from:to
:cc:subject:date:message-id:reply-to;
bh=+nqsQ82kt+Zea8zn/pb02YPbww1gbCosRGb705bohss=;
b=FhEX+H60z8jWIs2AbbU6bw8uIkILhdOwG1gFlrg1+OnmO3NXv4zOuK0bnhW2GwJoHC
+REFawsff3Ve3aOavihdXmVVF/ioSL61U6pARlJfb8t8VbVzeKdmRMjOuRnTu90Qw22q
zplpJOGhpSlDCHZNpG2Imj1HXecpvqzScqeABpxli+KhDUM81F87ppbiSbBrHaS2dfU1
jkKpRFre9M95/0t4Z/3qsrFn/ZmCp0oK3DaZpSx5Z8D1ee5un+utuVSY8wEUeh/cr+gY
3td7k+9+nxIiBMyQQvbgMO9GJJTDx7AUSlxtwr847qAjpDyHxzbyV3X9edEB+AXN44Ho
8wFw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749038419; x=1749643219;
h=in-reply-to:content-transfer-encoding:content-disposition
:mime-version:references:message-id:subject:cc:to:from:date
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=+nqsQ82kt+Zea8zn/pb02YPbww1gbCosRGb705bohss=;
b=IjDbdht1WiFVQiHfH9IEAwFR4NZEtbKHsgrvBiZZGSn4Ym9DH+9+JqKb9PgUqQA1/T
ygbd4r1ujvpwm2Nwvx66ubF9ouLnK2qV9FzUAByirUglIgPmrsGgh38I9BwQdRUOq4+x
txVWKFCtCkuMUBHCtl+dVYWukd53l6d08e9YZHNwZPfV5UWXZnAiL+Q2/DijyjPFkivk
UfeqeKOjZh2iOrVvbYOIIJlmS4nuwFvNN1Z8qAcWXjA9z+5X6wRqgLWudobxaCy9j1c4
RDRHRz9bz3gtw3sM1olVqYkES+bPcAZ2NjV1Y1uAOZe58fcuS9Et3hDs6djFxxhOUCjn
NPrg==
X-Forwarded-Encrypted: i=1; AJvYcCUzcD+I/TE7e47iOyuQng3b8reeeqJKC3q1e/SRgkarb0PzXVmHi9/QleZFGWI7ZcobDBJSVXkQCJLxNYE=@vger.kernel.org
X-Gm-Message-State: AOJu0YxnJBzzV06oZLIi2I0hWE6vJXsFkp9GDIB6BcJ58XtmJAi16cBu
x2oAe6IPPd/KekKSly28QtZE6yHknYfzuFRYvkL+6k0zg0kjYCINbpBlLXRPF/pnXwI=
X-Gm-Gg: ASbGncsiFgPr14ItqhWqXmKNvKUGFbmnE43gR8mwuNb79cmNQGWDs/xTRieT85JAylR
p09oYANkvHZ2XbIhuCh8twCQwAQrrDtCfmGIlAlbm+5jMdmXVqbsZneAN2vPTt0o765BTLKzRTm
I5HYJMkOL6T9OHobca9DHaGd/thJcDU7VDDeaLMDX0e9ZRcVks9si0sHF4ui/UaZ04q6+nQOju8
xpigLb7R+3Kmdv6FnKvL6cNbeW+SPeGD3BykezDDg4F9PZLqnBU7DYSgBvak9r6foy54hMZkdBe
ydNB9uwEbtFF1DfZhXO+xHzUYO0mFHTPVHJCjs88p1rK/hbG
X-Google-Smtp-Source: AGHT+IEMm/wavbNrVrfyOME8tFK/mY4+K5X1c4/6nmOVfXnr2qJvVXbyJyEJqELmggltmokAdLxjpw==
X-Received: by 2002:a05:6000:178a:b0:3a5:1266:e9ce with SMTP id ffacd0b85a97d-3a51d96cfffmr2078263f8f.36.1749038418886;
Wed, 04 Jun 2025 05:00:18 -0700 (PDT)
Received: from localhost ([2a02:8071:6401:180:da11:6260:39d6:12c])
by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-450d7f92585sm210408665e9.5.2025.06.04.05.00.17
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 05:00:17 -0700 (PDT)
Date: Wed, 4 Jun 2025 08:00:13 -0400
From: Johannes Weiner <hannes@xxxxxxxxxxx>
To: Barry Song <21cnbao@xxxxxxxxx>
Cc: Matthew Wilcox <willy@xxxxxxxxxxxxx>,
Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
Shakeel Butt <shakeel.butt@xxxxxxxxx>,
"Liam R . Howlett" <Liam.Howlett@xxxxxxxxxx>,
David Hildenbrand <david@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>, Jann Horn <jannh@xxxxxxxxxx>,
Arnd Bergmann <arnd@xxxxxxxx>,
Christian Brauner <brauner@xxxxxxxxxx>,
SeongJae Park <sj@xxxxxxxxxx>, Usama Arif <usamaarif642@xxxxxxxxx>,
Mike Rapoport <rppt@xxxxxxxxxx>, linux-mm@xxxxxxxxx,
linux-arch@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
linux-api@xxxxxxxxxxxxxxx, Pedro Falcato <pfalcato@xxxxxxx>
Subject: Re: [DISCUSSION] proposed mctl() API
Message-ID: <20250604120013.GA1431@xxxxxxxxxxx>
References: <85778a76-7dc8-4ea8-8827-acb45f74ee05@lucifer.local>
<aDh9LtSLCiTLjg2X@xxxxxxxxxxxxxxxxxxxx>
<20250529211423.GA1271329@xxxxxxxxxxx>
<CAGsJ_4yKDqUu8yZjHSmWBz3CpQhU6DM0=EhibfTwHbTo+QWvZA@xxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <CAGsJ_4yKDqUu8yZjHSmWBz3CpQhU6DM0=EhibfTwHbTo+QWvZA@xxxxxxxxxxxxxx>
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Fri, May 30, 2025 at 07:52:28PM +1200, Barry Song wrote:
On Fri, May 30, 2025 at 9:14 AM Johannes Weiner <hannes@xxxxxxxxxxx> wrote:
>
> On Thu, May 29, 2025 at 04:28:46PM +0100, Matthew Wilcox wrote:
> > Barry's problem is that we're all nervous about possibly regressing
> > performance on some unknown workloads. Just try Barry's proposal, see
> > if anyone actually compains or if we're just afraid of our own shadows.
>
> I actually explained why I think this is a terrible idea. But okay, I
> tried the patch anyway.
>
> This is 'git log' on a hot kernel repo after a large IO stream:
>
> VANILLA BARRY
> Real time 49.93 ( +0.00%) 60.36 ( +20.48%)
> User time 32.10 ( +0.00%) 32.09 ( -0.04%)
> System time 14.41 ( +0.00%) 14.64 ( +1.50%)
> pgmajfault 9227.00 ( +0.00%) 18390.00 ( +99.30%)
> workingset_refault_file 184.00 ( +0.00%) 236899.00 (+127954.05%)
>
> Clearly we can't generally ignore page cache hits just because the
> mmaps() are intermittent.
Hi Johannes,
Thanks!
Are you on v1, which lacks folio demotion[1], or v2, which includes it [2]?
[1] https://lore.kernel.org/linux-mm/20250412085852.48524-1-21cnbao@xxxxxxxxx/
[2] https://lore.kernel.org/linux-mm/20250514070820.51793-1-21cnbao@xxxxxxxxx/
The subthread is about whether the reference dismissal / demotion
should be unconditional (v1) or opt-in (v2).
I'm arguing for v2.
Return-Path: <linux-kernel+bounces-673155-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 123F841E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:01:09 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 51B803A5BC8
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:00:46 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id B0F1E25332E;
Wed, 4 Jun 2025 12:01:01 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="xRjnYFbi"
Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 60A9A1ACEAF;
Wed, 4 Jun 2025 12:00:57 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749038460; cv=none; b=dCFWhSqBlRrDNN0bR2pcPhJh/sUBjfN9bvVMXFpwFzn44cjOiyiHN0cVijkEqnPuUBpGIUfWl71Nsmi7RWGMgYQPPj/tCo1Zfa+dEzIKyYByiUpT44Df/Gps8H+JBEtcUAUooyDFqVZLxtIxXJnn/Vtid0agZVpq8janc6vPaKA=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749038460; c=relaxed/simple;
bh=mUFesVRf3dClQ3cxTGHcZsZj8luMfnTT92hQXVDRfq8=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=ddqBRSDvWjeQmUUY3H4JT7vqcauJ4Ia8OdwE802WnEXiulVjayN7rKLSa0V/oGxhhb12mrcTnagp13C6WIdDyk8DahW3ZuNb1XwJCD1UArEYQQ7xHog7Lv+sHvi6feCNGCsxFu97ERXVco15OpVHRYEU/L/0YFtlGfbuAWK91j0=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=xRjnYFbi; arc=none smtp.client-ip=156.67.10.101
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch;
s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version:
References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject:
Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:
Content-ID:Content-Description:Content-Disposition:In-Reply-To:References;
bh=waKYFNIYf4LrJ42FOyiZV+jusnWxW7j8zewA7/spaT0=; b=xRjnYFbiM4mwUIe/PxOIVrTZj5
asr9kZnkbk7H9VDjzpjU3n4TP0fwjdA+YMIKqSrPV2h+yxSf1LTP8bP4bYSjYqqGr4bRzEsQC2pUS
4mXAMtQGi6d9mkurCGQxZgaXBKRO2tS+PEmY1dVNLm3gTIo1cggd2NJtv4uo/P++Pn94=;
Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2)
(envelope-from <andrew@xxxxxxx>)
id 1uMmnf-00Eg4w-Ap; Wed, 04 Jun 2025 14:00:55 +0200
Date: Wed, 4 Jun 2025 14:00:55 +0200
From: Andrew Lunn <andrew@xxxxxxx>
To: Stefano Radaelli <stefano.radaelli21@xxxxxxxxx>
Cc: devicetree@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>, Shawn Guo <shawnguo@xxxxxxxxxx>,
Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>,
Pengutronix Kernel Team <kernel@xxxxxxxxxxxxxx>,
Fabio Estevam <festevam@xxxxxxxxx>, imx@xxxxxxxxxxxxxxx,
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [v1] arm64: dts: freescale: imx93-var-som: update eqos support
for MaxLinear PHY
Message-ID: <d5f891d7-d24a-4f85-b59d-313b925c4495@xxxxxxx>
References: <20250603221416.74523-1-stefano.radaelli21@xxxxxxxxx>
<54c4a279-a528-4657-8319-c9374add54b7@xxxxxxx>
<CAK+owoihxp-2xAvFfVthvNELshti_3V-pFgD7D7jzd1XqiLgGQ@xxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <CAK+owoihxp-2xAvFfVthvNELshti_3V-pFgD7D7jzd1XqiLgGQ@xxxxxxxxxxxxxx>
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
61;8001;1cOn Wed, Jun 04, 2025 at 09:37:39AM +0200, Stefano Radaelli wrote:
Hi Andrew,
I double-checked with our hardware team, and it turns out that all required
RGMII delays are already handled by the hardware on the SOM (trace
tuning + PHY config).
What do you mean by PHY config?
The four RGMII modes you can use with phy-mode are purely about the
PCB. If you have the PHY strapped to add delays, what does not count
for PCB, and if you are not careful, future software could reconfigure
it.
Andrew
Return-Path: <linux-kernel+bounces-673156-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 1455F41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:02:22 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 9F000178653
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:02:21 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 02F2C28DF38;
Wed, 4 Jun 2025 12:02:10 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="gqki9vYH"
Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.18])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 128F21A5BBD;
Wed, 4 Jun 2025 12:02:06 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=198.175.65.18
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749038529; cv=fail; b=APNMzsQWNGlbtpkjVWzVYFBE4oeBpD0XUstpujwT26ply3KUIYDoK2QwngqqvJ3QyuZ2myywcw2BDSJq/JH+mSMrkyZl9ZI5AsmAQCpRM98YOkUJaQStESYYXQjvRBcXbO4XlaNXHD0PBrru3bZqLzgvh/6Fd+bRPN+2Q/is3jI=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749038529; c=relaxed/simple;
bh=a/wtQmHCm8JmgkhE3122nA+VORXNAZ4rdR8FxzFAdss=;
h=Date:From:To:CC:Subject:Message-ID:References:Content-Type:
Content-Disposition:In-Reply-To:MIME-Version; b=FZx8HDc0bT9Y+hGI7umY/wEh95qPzOWGyhfJEnsc17zYtUDbWPOtzEY3PUn47bwCpi5m5Jmgiy2V/pqCFzo6ZoIwixCO2e1rPuOV6BcdBvHllbKnIa5nklpqvqKpG/ht4WwA+tgNZgxga45nMhRDrZJGf5z9RkztxUna3qYXjRY=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=gqki9vYH; arc=fail smtp.client-ip=198.175.65.18
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
t=1749038527; x=1780574527;
h=date:from:to:cc:subject:message-id:references:
in-reply-to:mime-version;
bh=a/wtQmHCm8JmgkhE3122nA+VORXNAZ4rdR8FxzFAdss=;
b=gqki9vYHnrRe+CcPtcaRAwed4hvcCftCbUruaTfOeXGS56prQfeH5aNY
CppKJcIf8ald0ezlUsSBp6Y9R3v74n5SJa+XNC3B8NuP8IbLH84YbUEnP
iSqPLDvP8wrRjNIIqKA+66b43Anlfl/iKNXZV6PvqgT5KTnbfJbbfxheh
8CXOdqP7N6iPffh+LORlPtMEsnkqiNrEvetPRN7oVyzb86ia7w/3e9+Jg
oRlWczNENRD//VSx4AEB3QYTuV1xUtZ/+s5k8BvOd+Q1WlPBn8epeGfUv
qswYbPpLlkHmoFMj8SICawmk46/C7swGP1v+sZ9ve2bwfeQBSAn58ObL1
A==;
X-CSE-ConnectionGUID: fYqW1tMYQGWue8E79RBE/Q==
X-CSE-MsgGUID: A3wZDjCBSMaRX24gvlQdRQ==
X-IronPort-AV: E=McAfee;i="6800,10657,11454"; a="51261980"
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="51261980"
Received: from fmviesa010.fm.intel.com ([10.60.135.150])
by orvoesa110.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 05:02:06 -0700
X-CSE-ConnectionGUID: cmJD8+aFT2e1UA25TfubRA==
X-CSE-MsgGUID: RP9Seig5QkiTBbXAe22kCA==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="145655622"
Received: from orsmsx902.amr.corp.intel.com ([10.22.229.24])
by fmviesa010.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 05:02:05 -0700
Received: from ORSMSX902.amr.corp.intel.com (10.22.229.24) by
ORSMSX902.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.2.1544.25; Wed, 4 Jun 2025 05:02:05 -0700
Received: from ORSEDG901.ED.cps.intel.com (10.7.248.11) by
ORSMSX902.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.2.1544.25 via Frontend Transport; Wed, 4 Jun 2025 05:02:05 -0700
Received: from NAM10-BN7-obe.outbound.protection.outlook.com (40.107.92.69) by
edgegateway.intel.com (134.134.137.111) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.2.1544.25; Wed, 4 Jun 2025 05:02:03 -0700
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=xG0qq12wFdc8TXFC3oloh/2Mhjztqn1THukO+/s2bQIMClv9O+6lqCHtT2ykkatSDosJXZeuRuTEDUj+qej7BZeOdBaEr1WAMc+VDoo/SUXxHD6e/h+9psdMSkn2u6g0Xv7pKjWjmBmZhJh8BNLGns31c+U0D58AOWbMWV7XbwLI+QafaxAK7xa4xGisihZ9/kzBDW2r8BJhsxmjrwr8RcWQQ6AHKUK1R69psP3/pyJaaBxfiTUy1fYM0VSCCtQgjrKw2vWmnji3Ov7tAt+OyYbZaZofGtqCE+iX9LcnT2sBRuxW+YNsk47IS9xAXNLqOjZmF6bbQ/Z2KJKISHdfUA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=xwrf+PC3mHzI4j/PGMEmtWWA/7yqhNJhEOsmUV4MrAA=;
b=lCNH+4mY/uHsTo0t/KamhLbPYKRGrRGBEPX9VeQPuJGGDYtCiMj2JvV9g+fd2hSWaYPlOA/bbryYIcGLPsUbklrs6L4xNKSQk/hCJAWSilhsWb8VL6KoL4W5HV6Qmp69LCIixJOh6gdmZsR7L1pXJ/ceoqVF7t2c6LMday50Xwrv96dCTnuQWrD7O6UXCE30upIk0765GVSNRa29S8JdBi1U9YOKMgPIQJVEF8xNv70MF9GGEThx3Ch8QY79yWLmTMUkHelQfi+uy7z/C7MD0TlLcH4punPTW82ucdsdQez2RGjZXU7S5/4ofYNrp/rgskFLTQX6JBjfYjrFYXu3sg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com;
dkim=pass header.d=intel.com; arc=none
Authentication-Results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=intel.com;
Received: from SN7PR11MB7540.namprd11.prod.outlook.com (2603:10b6:806:340::7)
by IA4PR11MB9012.namprd11.prod.outlook.com (2603:10b6:208:56d::14) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8813.19; Wed, 4 Jun
2025 12:01:30 +0000
Received: from SN7PR11MB7540.namprd11.prod.outlook.com
([fe80::399f:ff7c:adb2:8d29]) by SN7PR11MB7540.namprd11.prod.outlook.com
([fe80::399f:ff7c:adb2:8d29%6]) with mapi id 15.20.8792.033; Wed, 4 Jun 2025
12:01:29 +0000
Date: Wed, 4 Jun 2025 14:01:08 +0200
From: Larysa Zaremba <larysa.zaremba@xxxxxxxxx>
To: Jinjian Song <jinjian.song@xxxxxxxxxxx>
CC: <andrew+netdev@xxxxxxx>, <angelogioacchino.delregno@xxxxxxxxxxxxx>,
<chandrashekar.devegowda@xxxxxxxxx>, <chiranjeevi.rapolu@xxxxxxxxxxxxxxx>,
<corbet@xxxxxxx>, <danielwinkler@xxxxxxxxxx>, <davem@xxxxxxxxxxxxx>,
<edumazet@xxxxxxxxxx>, <haijun.liu@xxxxxxxxxxxx>, <helgaas@xxxxxxxxxx>,
<horms@xxxxxxxxxx>, <ilpo.jarvinen@xxxxxxxxxxxxxxx>,
<johannes@xxxxxxxxxxxxxxxx>, <kuba@xxxxxxxxxx>,
<linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, <linux-doc@xxxxxxxxxxxxxxx>,
<linux-kernel@xxxxxxxxxxxxxxx>, <linux-mediatek@xxxxxxxxxxxxxxxxxxx>,
<loic.poulain@xxxxxxxxxx>, <m.chetan.kumar@xxxxxxxxxxxxxxx>,
<matthias.bgg@xxxxxxxxx>, <netdev@xxxxxxxxxxxxxxx>, <pabeni@xxxxxxxxxx>,
<ricardo.martinez@xxxxxxxxxxxxxxx>, <ryazanov.s.a@xxxxxxxxx>,
<sreehari.kancharla@xxxxxxxxxxxxxxx>
Subject: Re: [net v3] net: wwan: t7xx: Fix napi rx poll issue
Message-ID: <aEA1hBEltWuIE-Yy@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20250530031648.5592-1-jinjian.song@xxxxxxxxxxx>
<aD7BsIXPxYtZYBH_@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <aD7BsIXPxYtZYBH_@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
X-ClientProxiedBy: VI1PR02CA0051.eurprd02.prod.outlook.com
(2603:10a6:802:14::22) To SN7PR11MB7540.namprd11.prod.outlook.com
(2603:10b6:806:340::7)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: SN7PR11MB7540:EE_|IA4PR11MB9012:EE_
X-MS-Office365-Filtering-Correlation-Id: 8b513cce-b637-4992-e64e-08dda35f8a2f
X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;ARA:13230040|10070799003|366016|1800799024|376014|7416014|7053199007;
X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?cDrM/pS+lJc8vut+19bP5Gdy6kxSn2BkRcPxKy7HmPXb30x1YRTYDgLVWQRe?=
=?us-ascii?Q?6Mcg/pFP7nqvmOKxNlI8+Dok8RkFGG17li3ep8cvrNbYXhVGvkVuAnE75j99?=
=?us-ascii?Q?/6pjV1If6uocLpM0evhhc9eAg+0D4/ynL3fJBLGU2Hj/9S+CGMgf1Pax2urY?=
=?us-ascii?Q?LVV70GMGSYyMVD1hEF2NRBdi+8oGBh4433H6gUIKmiBaXx+JwqevguYbt8QY?=
=?us-ascii?Q?Jx07rAZ1hPd9ymng6/JfQf219v2rQKUKWX24QUMqiDi/RSLhKn+gv+W8c4So?=
=?us-ascii?Q?G04GOwQhZsyokAXstBTk7spHHS1Bb5YMLUyz2lbOWDLMsr7uAGTTYnqxR7GA?=
=?us-ascii?Q?dwekiwW7VQ2i+03vrGHDMk/K4w9QKu7Q6oPcxhxrv0xyVVundEiTDhQCFdmw?=
=?us-ascii?Q?vpM1y0MlGRypALQLJgafsgjoHGs4CPkNVrYMkhwucQ963CRn/zmoE6uSgJbA?=
=?us-ascii?Q?iZYAFP8DLkgUfOIhLUWuu4sMz3BhYoIg9oBdi3a5iMbydBjlr0ywaGpHP1y5?=
=?us-ascii?Q?GfuTUt0LqXkA00OqZH6VGJAvOJMMORBKS9Dowss72lzMtGuIzTxvPT5OYK6u?=
=?us-ascii?Q?cAX6/fo7LII8Om6F3SUxVZaHr6vhcL3ezuFmJsg4LiNlraZxyL5bec3Su5Xm?=
=?us-ascii?Q?XGmicUu91phxHxUj4PYIiwfdT0Ga1GkFW05GPiJkqwxQNnlJgk/9xxld5CkE?=
=?us-ascii?Q?nsG6WuWKMqQ5i8s+p5ENIG6xrBTbyylLj9ICi9Ba3XypRW6YdXuPVP1KLq/f?=
=?us-ascii?Q?IdbTxjpLMamrEVtLS+FxnTVqnTDkVzSKiT8fD0HN5bYw9oFDQOmY1R1fT9Qf?=
=?us-ascii?Q?pcoH6DnLSUny+Lm2MKdWLz40IfF8KMmgYrbkloJhINA/r6D1RH29LIKsa80O?=
=?us-ascii?Q?LoRKRgzXwj33bUXSqXvuFw0ZvFzr7gvUo4M+e7Us8WiBrKrZZc3mAHmfS7UR?=
=?us-ascii?Q?NYN72umQGaNK9PrG6tJHIjThJfkW5bUrbeYzMnRun1TBs1+gU2BiPkpkS0VC?=
=?us-ascii?Q?1iLkdgtlfBG49opOZFYcf8n5giGy6FhIAx9+1Mgi94va0hAXN4HFieNJinm8?=
=?us-ascii?Q?P6LQ68lM3O2s0dxn2spykgXgrepjjEPfep0BjYAbNcsmR7Pc1wXIBf9XE6iO?=
=?us-ascii?Q?FD4SDUNsNIWwIYXZxc7n+0J/AaebDYo7noZEYItYAUF14LHtDyBBk7rhqjZS?=
=?us-ascii?Q?EbVmtOzEnH8YCGARODh3lnoMaUut4aUwEoI/DmICvmImcv9wfBcVKrZb76wg?=
=?us-ascii?Q?2ALmxBZ9ZqvUubIhjQXM71J+urgwJCHkc6d2bBfmeblwG5dGyu0VSrvZwCZr?=
=?us-ascii?Q?Rrh7f6tq37fN1OWjdig3I1Kx2dIBc3xaDSGgsqunQLHItyEMqdL2FhZKRhQ/?=
=?us-ascii?Q?vlf2fuL9wF9GC8BbTm/XK6bV474S6j2LaQZPom67vr6e8JRoa2LLjtlyfPHz?=
=?us-ascii?Q?taar/2axgbk=3D?=
X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN7PR11MB7540.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(10070799003)(366016)(1800799024)(376014)(7416014)(7053199007);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?y4ksMCmH8Kz4rLVUOjqKvACJWVyZMYL4SGu8BcYQTJVSnFfwZic5IlOAdpj/?=
=?us-ascii?Q?N4+Ze/SJpAgWyzw3omg4MA3oCpEBXh3P8ufBBUgtpIoAr6wE63nXe7NAds87?=
=?us-ascii?Q?wJ5QfKMdX5mCq2X++zvvNzxybGS3Oj8iPS/4HXrMvShz1NuRXEBqH+1iupZC?=
=?us-ascii?Q?MANBsMalF9sXNjav0h53kYAa7hlhFqfuoX2oG428BHZKeym7f1vfPZAUNDFF?=
=?us-ascii?Q?nnROwntDdHifdosRQ3NQ1u7F3E2Z7vc+nXuQXEt6XTblpRS/UZ+RlrX7PVwr?=
=?us-ascii?Q?45vJGhYPzaWyGVVlACvtwAhf1v7gD9sXgrwwCj0IxFMg5DYGweLKHEfDmAsG?=
=?us-ascii?Q?bn4t9krm/MIShCzLom7H04SDeehzZQN+cNaTY9DWFF9sE2kEsepXAaJ0j0Rh?=
=?us-ascii?Q?xFl0sP6dvGdqG0nxMblJVewUvOzIElbsmjyTfSLGEXdiQRTNOa5mZCfdAVzG?=
=?us-ascii?Q?VLvugfXP2bVDJFtBFPqPvsbu84FTRk5b4oMm6UN0AwiPYhXTf/c/APwFZjMA?=
=?us-ascii?Q?ptKBKehYyWqQxO0X44s/ixupHA43p6NqrqFgGHOdvr6iAkmEeUwksIT+oIdA?=
=?us-ascii?Q?+ShQ4NCOwC2FZ74fNNw6YCJLwenP9k0Q8rrAXNBRFuhkqx+2cJts2rm9OuV+?=
=?us-ascii?Q?JRM2nHIhgVsNDZCFhQTLHWHflDbzeqDNF2wmr5PvbSw9iFJABTy9KcIOXIIA?=
=?us-ascii?Q?BBBZAsno9IwwTdU+59a6Aik4rCw8BMDaHEo+mqt75zsNSLLP6ciedWoWaUfL?=
=?us-ascii?Q?P9HZkI7xuAS4Jm8y6S2zN/7LHfjMq+MfPA+veAsoCuJin4pDWnYVqesVH24B?=
=?us-ascii?Q?l2vMICKk8NxBelVT8pqfbA6cyXs4nnQ0WAccrv4RyslhKpXzgCL11lJPXX41?=
=?us-ascii?Q?DZOxgYOboNQTmWoTjqG6MyRqG93RepbxtDkvz5Ju4PX2a8kugeLu45UetF+M?=
=?us-ascii?Q?LHl91OolfmnnnGUvZoOptHb6aFaFwN4NXmQXt/zB0vX/lb5ATIVwCudyipEz?=
=?us-ascii?Q?4AToidVADTqDbfA+IF9pmdzY1HxTtblTcAp2M0tGbXVHF482Uie4ZdSfulAz?=
=?us-ascii?Q?9WaaTT+gDWbhtbTzi1FEaBxKaSxu/S60di1FrnHRbl1tPvby0oPPOxR/C9yO?=
=?us-ascii?Q?KsFz1+VcZVQyrYm0hSbcoJmn5nNw7DuKQX4heboOoXjQpFbkAUdbRYb/L/hI?=
=?us-ascii?Q?V7DZ/PkUQbZpVx2JXd4LD/wJR+k/VNNcsppUuDSaizSyPzdxBcFz3cz57hcC?=
=?us-ascii?Q?2IAfymYvsNn198n4Z8cFVx8DLBnHi3pV9Z0Z14NZl6glTdVHdsR1/pxoOj0j?=
=?us-ascii?Q?VKQZb8oDjBKZCMCFONbIDlh7b2Cj66wHg6uPWgFIHEGhMNEj2Rh5exO4twBC?=
=?us-ascii?Q?NQbHY0X1p6gQBUA3yttR2rWGUMwJm+XGbcd0foxcedDNba3RqLa3QbMB9wgz?=
=?us-ascii?Q?Kp7rkqzZ3n4n14SAXrCQSxMgeUhSpdBlQ8HSiNyufE5u2HKjAJ1UbCXZabUi?=
=?us-ascii?Q?1WHblc59esi4iR4uDKNFmp6Br2xHuEfXPllzWv0IjRRNEst/c+XOM39BrXIl?=
=?us-ascii?Q?SN9A4WwcQmyAxtazs5Vp/4ykzEgpSEgxUsTy8EdzMkpuQJBdjG72DQay/KQi?=
=?us-ascii?Q?b036JMCOIhauFQmAxUSxoR+H+e9tten+U3j/Aay5sB4eHeZDSLdQ79o144tl?=
=?us-ascii?Q?eHdfKA=3D=3D?=
X-MS-Exchange-CrossTenant-Network-Message-Id: 8b513cce-b637-4992-e64e-08dda35f8a2f
X-MS-Exchange-CrossTenant-AuthSource: SN7PR11MB7540.namprd11.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 12:01:29.4400
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: s3ssfX/3lNv3oY5Rbxc/k2w6EQ1B2O3PVSu9maPM4spZYLLnpiQL9JPVNJQ+uMc/A50pFcjLCPiICgzxQJXiuKQ/rLEo6Lckl62eN4vZzOU=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA4PR11MB9012
X-OriginatorOrg: intel.com
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 06:19:53PM +0800, Jinjian Song wrote:
From: Larysa Zaremba <larysa.zaremba@xxxxxxxxx>
>> Fixes: 5545b7b9f294 ("net: wwan: t7xx: Add NAPI support")
>> Signed-off-by: Jinjian Song <jinjian.song@xxxxxxxxxxx>
>> ---
>> v3:
>> * Only Use READ_ONCE/WRITE_ONCE when the lock protecting ctlb->ccmni_inst
>> is not held.
>
>What do you mean by "lock protecting ctlb->ccmni_inst"? Please specify.
Hi Larysa,
This description might have been a bit simplified. This process is as follow:
In patch v1, I directly set ctlb->ccmni_inst. This may be not safe, as the NAPI
processing and the driver's internal interface might not be synchronized. Therefoe,
following Jakub's suggestion, I add READ_ONCE/WRITE_ONCE in all places where this
pointer is accessed.
In patch v2, Paolo suggested using READ_ONCE in places that are not protected by locks.
Some interfaces are protected by synchronization mechanisms, so it's unnecesssary to add them there.
Therefore, I removed READ_ONCE from the interfaces.
I have seen the discussion for previous version, I am asking you for the symbol
name/names for the locks that make READ_ONCE in the removed places not needed.
>> @@ -441,7 +442,7 @@ static void t7xx_ccmni_recv_skb(struct t7xx_ccmni_ctrl *ccmni_ctlb, struct sk_bu
>>
>> static void t7xx_ccmni_queue_tx_irq_notify(struct t7xx_ccmni_ctrl *ctlb, int qno)
>> {
>> - struct t7xx_ccmni *ccmni = ctlb->ccmni_inst[0];
>> + struct t7xx_ccmni *ccmni = READ_ONCE(ctlb->ccmni_inst[0]);
>> struct netdev_queue *net_queue;
>>
>
>You do not seem to check if ccmni is NULL here, so given ctlb->ccmni_inst[0] is
>not being hot-swapped, I guess that there are some guarantees of it not being
>NULL at this moment, so I would drop READ_ONCE here.
This ctlb->ccmni_inst[0] is checked in the upper-level interface:
static void t7xx_ccmni_queue_state_notify([...]) {
[...]
if (!READ_ONCE(ctlb->ccmni_inst[0])) {
return;
}
if (state == DMPAIF_TXQ_STATE_IRQ)
t7xx_ccmni_queue_tx_irq_notify(ctlb, qno);
else if (state == DMPAIF_TXQ_STATE_FULL)
t7xx_ccmni_queue_tx_full_notify(ctlb, qno);
}
Since this is part of the driver's internal logic for handing queue events, would it be
safer to add READ_ONCE here as well?
Well, I am not 100% sure. What would make the code easier to reason about in
terms of READ_ONCE/WRITE_ONCE is if you replaced struct t7xx_ccmni_ctrl *ctlb
argument in t7xx_ccmni_queue_tx_irq_notify() and
t7xx_ccmni_queue_tx_full_notify() with ctlb->ccmni_inst[0], the code would look
like this:
struct t7xx_ccmni *ccmni =
READ_ONCE(t7xx_dev->ccmni_ctlb->ccmni_inst[0]);
if (!ccmni) {
dev_warn(&t7xx_dev->pdev->dev, "No netdev registered yet\n");
return;
}
if (state == DMPAIF_TXQ_STATE_IRQ)
t7xx_ccmni_queue_tx_irq_notify(ccmni, qno);
else if (state == DMPAIF_TXQ_STATE_FULL)
t7xx_ccmni_queue_tx_full_notify(ccmni, qno);
This way atomic reads in notifiers would be dependent on a single READ_ONCE,
which should prevent nasty reordering, as far as I am concerned.
The above holds if you think you do not need to check for NULL in the notifiers,
but is such case I would rather consider proper locking or RCU.
>> @@ -453,7 +454,7 @@ static void t7xx_ccmni_queue_tx_irq_notify(struct t7xx_ccmni_ctrl *ctlb, int qno
>>
>> static void t7xx_ccmni_queue_tx_full_notify(struct t7xx_ccmni_ctrl *ctlb, int qno)
>> {
>> - struct t7xx_ccmni *ccmni = ctlb->ccmni_inst[0];
>> + struct t7xx_ccmni *ccmni = READ_ONCE(ctlb->ccmni_inst[0]);
>> struct netdev_queue *net_queue;
>>
>
>Same as above, either READ_ONCE is not needed or NULL check is required.
Yes, This function in the same upper-level interface.
> if (atomic_read(&ccmni->usage) > 0) {
> @@ -471,7 +472,7 @@ static void t7xx_ccmni_queue_state_notify(struct t7xx_pci_dev *t7xx_dev,
> if (ctlb->md_sta != MD_STATE_READY)
> return;
>
> - if (!ctlb->ccmni_inst[0]) {
> + if (!READ_ONCE(ctlb->ccmni_inst[0])) {
> dev_warn(&t7xx_dev->pdev->dev, "No netdev registered yet\n");
> return;
> }
> --
> 2.34.1
>
>
Thanks.
Jinjian,
Best Regards.
Return-Path: <linux-kernel+bounces-673157-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 1C2C641E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:03:01 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 2C74B3A5CCE
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:02:39 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id DE56023185F;
Wed, 4 Jun 2025 12:02:55 +0000 (UTC)
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 77BE521C177
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:02:55 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749038575; cv=none; b=Ms7bqZGXuO9fWRFHW0MZoeb3NeXqTCaoPnZAc+3clI602rDCuVkrIGpnIN9k8BsVbEzRoB2XbwFIhpDZNnZLka/TbL7XH81tReciarhRfbSjGQZR2T/7XClYEhbkqUKqMJpxEM1l2lgmJbJBgvLzGebOdAkii4LncvXDnOAyJ+I=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749038575; c=relaxed/simple;
bh=I8eBzeTMW2V+Qw1JI1vRGHg7SCjvgikCILck2lndrl0=;
h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References:
MIME-Version:Content-Type; b=JM8TcLds39du1LDw2m+wbkHhoWr0GCd3hD/7F3gno9gMO4YUz0qBlMq3bzXCXYE1sCOFggJQExxbo5Is509ucwOAQWzlOMRuHvmiNuqLYedCMCWQsjomMtfY/Ri3SxbrvyKbnmEJvGjY0RT1D58Dl/KZWf922KXBy6p6pRmKZ2I=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 20F2CC4CEE7;
Wed, 4 Jun 2025 12:02:53 +0000 (UTC)
Date: Wed, 4 Jun 2025 08:04:09 -0400
From: Steven Rostedt <rostedt@xxxxxxxxxxx>
To: Hugh Dickins <hughd@xxxxxxxxxx>
Cc: Thomas =?UTF-8?B?SGVsbHN0csO2bQ==?= <thomas.hellstrom@xxxxxxxxxxxxxxx>,
Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>, Matthew Wilcox
<willy@xxxxxxxxxxxxx>, LKML <linux-kernel@xxxxxxxxxxxxxxx>,
linux-mm@xxxxxxxxx, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Christian
Koenig <christian.koenig@xxxxxxx>, Huang Rui <ray.huang@xxxxxxx>, Matthew
Auld <matthew.auld@xxxxxxxxx>, Matthew Brost <matthew.brost@xxxxxxxxx>,
dri-devel@xxxxxxxxxxxxxxxxxxxxx, Maarten Lankhorst
<maarten.lankhorst@xxxxxxxxxxxxxxx>, Maxime Ripard <mripard@xxxxxxxxxx>,
Thomas Zimmermann <tzimmermann@xxxxxxx>, David Airlie <airlied@xxxxxxxxx>,
Simona Vetter <simona@xxxxxxxx>
Subject: Re: [PATCH] mm: Fix compile error when CONFIG_SHMEM is not set
Message-ID: <20250604080409.448a27e4@xxxxxxxxxxxxxxxxxx>
In-Reply-To: <dca861b8-a29d-b2b3-eba7-32aaf2b8eff7@xxxxxxxxxx>
References: <20250602170500.48713a2b@xxxxxxxxxxxxxxxxxx>
<20250602171458.7ceabb1c@xxxxxxxxxxxxxxxxxx>
<aD4boBrdZXtz_5kL@xxxxxxxxxxxxxxxxxxxx>
<fc2b6a94-bd2d-a5d9-c935-381a1613f47e@xxxxxxxxxx>
<20250603102959.20c85adb@xxxxxxxxxxxxxxxxxx>
<aD8iL4cFoXpIVK_0@xxxxxxxxxxxxxxxxxxxx>
<20250603132736.554f611d@xxxxxxxxxxxxxxxxxx>
<CAHk-=whb2rMUCGsaNQC4pkCikJ7iX2_Tc1ye5_a6R9-vAkd2Cg@xxxxxxxxxxxxxx>
<20250603140632.168190f9@xxxxxxxxxxxxxxxxxx>
<dca861b8-a29d-b2b3-eba7-32aaf2b8eff7@xxxxxxxxxx>
X-Mailer: Claws Mail 3.20.0git84 (GTK+ 2.24.33; x86_64-pc-linux-gnu)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, 4 Jun 2025 00:03:18 -0700 (PDT)
Hugh Dickins <hughd@xxxxxxxxxx> wrote:
I vote for the "select SHMEM", but Thomas and dri-devel and Linus
should decide.
I only tried "depends on SHMEM" which did not work, but it looks like
"select SHMEM" should.
I prefer this solution too.
Thanks,
-- Steve
Return-Path: <linux-kernel+bounces-673158-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 8CD8F41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:03:38 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id F33C2189906E
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:03:51 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id E494B23185F;
Wed, 4 Jun 2025 12:03:31 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="FYoJkKgK"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3C62522157E
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:03:28 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749038610; cv=none; b=p9VLcTqPZsoj8xfBknhI5SQCpjo2iupZffBzVR/E1FBOgnUjqpV42AFc2wBfJ3doj808GgjJovtT+3XmdFdP9Zq1qG7OrUsWNWDHlEadkpim3gx76th6M7Kmx+PasD40I7F+6JEjOJLBxJTu6XO/9Am6425zMvEs8yfZbcWbblg=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749038610; c=relaxed/simple;
bh=224ooLFIfGjQiYB9ezkIszdxnmiRrwLeu0GIHwWE3fY=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=X9cWXapKGH0QSLCZj2ehVxcxazOT2Y2/HZgFkIU6tCogExgKMnI8ZndXIizclYQpUa7JWOmi9sXluo2wI5X3DxrNClNDsOWzZaKN3MCd+NXKwGRzzyZoJX2x/d7ZRcRSRy20wqtx1QscAktVo9GZGesAnghE1toBNA5sdpG0Q40=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=FYoJkKgK; arc=none smtp.client-ip=170.10.129.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749038608;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=4diXHUDmAcP7SFBj3azFrHhHSD0swnED0H5Eh4tf6ok=;
b=FYoJkKgKmrnJVqr2LiQLPsMw7D3z0xFE7AMbXdXH9lhY6RgzDiDN90USn9pjV/k5/AotwF
q1nC2sthLcDGVKX/WKJ/K3WfRpOGZZEMUbW4y0enibiRVx+yoYkxYByxvP7U+ICQt8X1Wo
EYq2t2AWXPfU1CvtwozCvID+FE6Vb1k=
Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com
[209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-371-RWcW63S3O2ehkvSuSXhWkg-1; Wed, 04 Jun 2025 08:03:26 -0400
X-MC-Unique: RWcW63S3O2ehkvSuSXhWkg-1
X-Mimecast-MFC-AGG-ID: RWcW63S3O2ehkvSuSXhWkg_1749038606
Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-3a503f28b09so446395f8f.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 05:03:26 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749038606; x=1749643406;
h=content-transfer-encoding:in-reply-to:organization:autocrypt
:content-language:from:references:cc:to:subject:user-agent
:mime-version:date:message-id:x-gm-message-state:from:to:cc:subject
:date:message-id:reply-to;
bh=4diXHUDmAcP7SFBj3azFrHhHSD0swnED0H5Eh4tf6ok=;
b=b43TYhRunxSjRBWnVmqf3y3qlcB1BLutBrFDWhvD7JPmhuuFeNtd8u57QjSCFktUx2
6iAwjrxNCK//pSOXY1v4ldpRPgf317ak2REhhBgMIYJoKg+WEGJ9BsLYWzr1mpVJm8f6
BQ7HrzDX/+sL3mVvhoGGxyG9BqUOho5XtZFRgMdaQzEv6JXvHpDRpgtFLaRzQop57E9t
atnq5tK263Hgx0Tyy234wkUUSq2aQNEM9AsdI+FxKg3tTPKiKJ6ldQVcKTTvboXSWijE
5E9XonsJtgf4AbSpc+rYADCzNDSpcPwOUWtingNkjGB7vygGPmtt2QUxSnaJWhElai3N
PLBQ==
X-Forwarded-Encrypted: i=1; AJvYcCUT4RYE26kaRBAeDhve+2+tqgCNk2qKUdAlzotIaizH7Z6E3MIbeYtCiiEGcHV+yVBYL4PDzXOYFRMblSI=@vger.kernel.org
X-Gm-Message-State: AOJu0YxWrhrSREBoHjp0IN3qrpvQuseQKQBuMoTeC4uRzKfngGvxR451
KbNCmwgscOULWr97PkKrdwJTC0iXAPeKy6oryiAWV2LJwUtlQTinc12qKUkVUlorjxysEaNWPiH
7Epv64XT1WY07TiSNvQUE0UeWxar7AZQyWUtKZEoiqcfSAsHHehhl9we4HRK+Kg/jaA==
X-Gm-Gg: ASbGncvPYMWMDqKxLMYg+cHoUF9YN4xjNWQQ8Jv5CfueH+BjrIv0+bLBSS7iYiX1lzH
uqccOCL9+MevFvJZRbQMFFITcQq4KxswEPgTUtWAwftTRvyibKaJ0D3yqwsJBHblP9DqpRhCShL
GAPJj/0FtJpJQTkXWyzKxvnDwxSgIjkaeqBM2d9HGzeqjmq36fAEsuLMaIebZdYMXyKYwjGw/3T
HDhijyMEaxmL9uaWAy/UtbGWk8udOSrCSNO1onBcJp7Rs+/8xLGl7uH0s+fyfxqRJ/4swPmQYnv
k9ejtkUFAos0Q+VPeRnDtlRwzmIn+LX2HWuLOpMF608lQwFeLBhg/0pKG1ZHpc8ZP08323K2vpb
oGDe4wsNGF1bjkV+XQClVrY5dpxSP1c7iz21Pe1s=
X-Received: by 2002:adf:fe8f:0:b0:3a5:23c6:eeee with SMTP id ffacd0b85a97d-3a523c6f100mr837997f8f.21.1749038605615;
Wed, 04 Jun 2025 05:03:25 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IHxDHrxlwX2CRsMft0T9uSibYrKTzC6gJCsnUQc1+VzckE3rTrUtENVBFWIg5Pk5c2/LzskBQ==
X-Received: by 2002:adf:fe8f:0:b0:3a5:23c6:eeee with SMTP id ffacd0b85a97d-3a523c6f100mr837944f8f.21.1749038605086;
Wed, 04 Jun 2025 05:03:25 -0700 (PDT)
Received: from ?IPV6:2003:d8:2f1b:b800:6fdb:1af2:4fbd:1fdf? (p200300d82f1bb8006fdb1af24fbd1fdf.dip0.t-ipconnect.de. [2003:d8:2f1b:b800:6fdb:1af2:4fbd:1fdf])
by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a4efe5b92bsm21209118f8f.9.2025.06.04.05.03.24
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 05:03:24 -0700 (PDT)
Message-ID: <ddcdd8b9-566c-4f6c-b1f7-861e93a80fbb@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 14:03:23 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v4 2/3] mm,memory_hotplug: Implement numa node notifier
To: Oscar Salvador <osalvador@xxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Vlastimil Babka <vbabka@xxxxxxx>,
Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>,
Harry Yoo <harry.yoo@xxxxxxxxxx>, Rakie Kim <rakie.kim@xxxxxx>,
Hyeonggon Yoo <42.hyeyoo@xxxxxxxxx>, linux-mm@xxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
References: <20250603110850.192912-1-osalvador@xxxxxxx>
<20250603110850.192912-3-osalvador@xxxxxxx>
From: David Hildenbrand <david@xxxxxxxxxx>
Content-Language: en-US
Autocrypt: addr=david@xxxxxxxxxx; keydata=
xsFNBFXLn5EBEAC+zYvAFJxCBY9Tr1xZgcESmxVNI/0ffzE/ZQOiHJl6mGkmA1R7/uUpiCjJ
dBrn+lhhOYjjNefFQou6478faXE6o2AhmebqT4KiQoUQFV4R7y1KMEKoSyy8hQaK1umALTdL
QZLQMzNE74ap+GDK0wnacPQFpcG1AE9RMq3aeErY5tujekBS32jfC/7AnH7I0v1v1TbbK3Gp
XNeiN4QroO+5qaSr0ID2sz5jtBLRb15RMre27E1ImpaIv2Jw8NJgW0k/D1RyKCwaTsgRdwuK
Kx/Y91XuSBdz0uOyU/S8kM1+ag0wvsGlpBVxRR/xw/E8M7TEwuCZQArqqTCmkG6HGcXFT0V9
PXFNNgV5jXMQRwU0O/ztJIQqsE5LsUomE//bLwzj9IVsaQpKDqW6TAPjcdBDPLHvriq7kGjt
WhVhdl0qEYB8lkBEU7V2Yb+SYhmhpDrti9Fq1EsmhiHSkxJcGREoMK/63r9WLZYI3+4W2rAc
UucZa4OT27U5ZISjNg3Ev0rxU5UH2/pT4wJCfxwocmqaRr6UYmrtZmND89X0KigoFD/XSeVv
jwBRNjPAubK9/k5NoRrYqztM9W6sJqrH8+UWZ1Idd/DdmogJh0gNC0+N42Za9yBRURfIdKSb
B3JfpUqcWwE7vUaYrHG1nw54pLUoPG6sAA7Mehl3nd4pZUALHwARAQABzSREYXZpZCBIaWxk
ZW5icmFuZCA8ZGF2aWRAcmVkaGF0LmNvbT7CwZgEEwEIAEICGwMGCwkIBwMCBhUIAgkKCwQW
AgMBAh4BAheAAhkBFiEEG9nKrXNcTDpGDfzKTd4Q9wD/g1oFAl8Ox4kFCRKpKXgACgkQTd4Q
9wD/g1oHcA//a6Tj7SBNjFNM1iNhWUo1lxAja0lpSodSnB2g4FCZ4R61SBR4l/psBL73xktp
rDHrx4aSpwkRP6Epu6mLvhlfjmkRG4OynJ5HG1gfv7RJJfnUdUM1z5kdS8JBrOhMJS2c/gPf
wv1TGRq2XdMPnfY2o0CxRqpcLkx4vBODvJGl2mQyJF/gPepdDfcT8/PY9BJ7FL6Hrq1gnAo4
3Iv9qV0JiT2wmZciNyYQhmA1V6dyTRiQ4YAc31zOo2IM+xisPzeSHgw3ONY/XhYvfZ9r7W1l
pNQdc2G+o4Di9NPFHQQhDw3YTRR1opJaTlRDzxYxzU6ZnUUBghxt9cwUWTpfCktkMZiPSDGd
KgQBjnweV2jw9UOTxjb4LXqDjmSNkjDdQUOU69jGMUXgihvo4zhYcMX8F5gWdRtMR7DzW/YE
BgVcyxNkMIXoY1aYj6npHYiNQesQlqjU6azjbH70/SXKM5tNRplgW8TNprMDuntdvV9wNkFs
9TyM02V5aWxFfI42+aivc4KEw69SE9KXwC7FSf5wXzuTot97N9Phj/Z3+jx443jo2NR34XgF
89cct7wJMjOF7bBefo0fPPZQuIma0Zym71cP61OP/i11ahNye6HGKfxGCOcs5wW9kRQEk8P9
M/k2wt3mt/fCQnuP/mWutNPt95w9wSsUyATLmtNrwccz63XOwU0EVcufkQEQAOfX3n0g0fZz
Bgm/S2zF/kxQKCEKP8ID+Vz8sy2GpDvveBq4H2Y34XWsT1zLJdvqPI4af4ZSMxuerWjXbVWb
T6d4odQIG0fKx4F8NccDqbgHeZRNajXeeJ3R7gAzvWvQNLz4piHrO/B4tf8svmRBL0ZB5P5A
2uhdwLU3NZuK22zpNn4is87BPWF8HhY0L5fafgDMOqnf4guJVJPYNPhUFzXUbPqOKOkL8ojk
CXxkOFHAbjstSK5Ca3fKquY3rdX3DNo+EL7FvAiw1mUtS+5GeYE+RMnDCsVFm/C7kY8c2d0G
NWkB9pJM5+mnIoFNxy7YBcldYATVeOHoY4LyaUWNnAvFYWp08dHWfZo9WCiJMuTfgtH9tc75
7QanMVdPt6fDK8UUXIBLQ2TWr/sQKE9xtFuEmoQGlE1l6bGaDnnMLcYu+Asp3kDT0w4zYGsx
5r6XQVRH4+5N6eHZiaeYtFOujp5n+pjBaQK7wUUjDilPQ5QMzIuCL4YjVoylWiBNknvQWBXS
lQCWmavOT9sttGQXdPCC5ynI+1ymZC1ORZKANLnRAb0NH/UCzcsstw2TAkFnMEbo9Zu9w7Kv
AxBQXWeXhJI9XQssfrf4Gusdqx8nPEpfOqCtbbwJMATbHyqLt7/oz/5deGuwxgb65pWIzufa
N7eop7uh+6bezi+rugUI+w6DABEBAAHCwXwEGAEIACYCGwwWIQQb2cqtc1xMOkYN/MpN3hD3
AP+DWgUCXw7HsgUJEqkpoQAKCRBN3hD3AP+DWrrpD/4qS3dyVRxDcDHIlmguXjC1Q5tZTwNB
boaBTPHSy/Nksu0eY7x6HfQJ3xajVH32Ms6t1trDQmPx2iP5+7iDsb7OKAb5eOS8h+BEBDeq
3ecsQDv0fFJOA9ag5O3LLNk+3x3q7e0uo06XMaY7UHS341ozXUUI7wC7iKfoUTv03iO9El5f
XpNMx/YrIMduZ2+nd9Di7o5+KIwlb2mAB9sTNHdMrXesX8eBL6T9b+MZJk+mZuPxKNVfEQMQ
a5SxUEADIPQTPNvBewdeI80yeOCrN+Zzwy/Mrx9EPeu59Y5vSJOx/z6OUImD/GhX7Xvkt3kq
Er5KTrJz3++B6SH9pum9PuoE/k+nntJkNMmQpR4MCBaV/J9gIOPGodDKnjdng+mXliF3Ptu6
3oxc2RCyGzTlxyMwuc2U5Q7KtUNTdDe8T0uE+9b8BLMVQDDfJjqY0VVqSUwImzTDLX9S4g/8
kC4HRcclk8hpyhY2jKGluZO0awwTIMgVEzmTyBphDg/Gx7dZU1Xf8HFuE+UZ5UDHDTnwgv7E
th6RC9+WrhDNspZ9fJjKWRbveQgUFCpe1sa77LAw+XFrKmBHXp9ZVIe90RMe2tRL06BGiRZr
jPrnvUsUUsjRoRNJjKKA/REq+sAnhkNPPZ/NNMjaZ5b8Tovi8C0tmxiCHaQYqj7G2rgnT0kt
WNyWQQ==
Organization: Red Hat
In-Reply-To: <20250603110850.192912-3-osalvador@xxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 03.06.25 13:08, Oscar Salvador wrote:
There are at least six consumers of hotplug_memory_notifier that what they
really are interested in is whether any numa node changed its state, e.g: going
from being memory aware to becoming memoryless and vice versa.
Implement a specific notifier for numa nodes when their state gets changed,
and have those consumers that only care about numa node state changes use it.
Signed-off-by: Oscar Salvador <osalvador@xxxxxxx>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
Reviewed-by: Harry Yoo <harry.yoo@xxxxxxxxxx>
Reviewed-by: Vlastimil Babka <vbabka@xxxxxxx>
---
drivers/acpi/numa/hmat.c | 6 +-
drivers/base/node.c | 21 +++++
drivers/cxl/core/region.c | 14 ++--
drivers/cxl/cxl.h | 4 +-
include/linux/memory.h | 38 ++++++++-
kernel/cgroup/cpuset.c | 2 +-
mm/memory-tiers.c | 8 +-
mm/memory_hotplug.c | 161 +++++++++++++++++---------------------
mm/mempolicy.c | 8 +-
mm/slub.c | 13 ++-
10 files changed, 155 insertions(+), 120 deletions(-)
diff --git a/drivers/acpi/numa/hmat.c b/drivers/acpi/numa/hmat.c
index 9d9052258e92..9ac82a767daf 100644
--- a/drivers/acpi/numa/hmat.c
+++ b/drivers/acpi/numa/hmat.c
@@ -962,10 +962,10 @@ static int hmat_callback(struct notifier_block *self,
unsigned long action, void *arg)
{
struct memory_target *target;
- struct memory_notify *mnb = arg;
+ struct node_notify *mnb = arg;
int pxm, nid = mnb->status_change_nid;
- if (nid == NUMA_NO_NODE || action != MEM_ONLINE)
+ if (nid == NUMA_NO_NODE || action != NODE_BECAME_MEM_AWARE)
return NOTIFY_OK;
pxm = node_to_pxm(nid);
@@ -1118,7 +1118,7 @@ static __init int hmat_init(void)
hmat_register_targets();
/* Keep the table and structures if the notifier may use them */
- if (hotplug_memory_notifier(hmat_callback, HMAT_CALLBACK_PRI))
+ if (hotplug_node_notifier(hmat_callback, HMAT_CALLBACK_PRI))
goto out_put;
if (!hmat_set_default_dram_perf())
diff --git a/drivers/base/node.c b/drivers/base/node.c
[...]
diff --git a/include/linux/memory.h b/include/linux/memory.h
index 5ec4e6d209b9..8c5c88eaffb3 100644
--- a/include/linux/memory.h
+++ b/include/linux/memory.h
@@ -99,6 +99,14 @@ int set_memory_block_size_order(unsigned int order);
#define MEM_PREPARE_ONLINE (1<<6)
#define MEM_FINISH_OFFLINE (1<<7)
+/* These states are used for numa node notifiers */
+#define NODE_BECOMING_MEM_AWARE (1<<0)
+#define NODE_BECAME_MEM_AWARE (1<<1)
+#define NODE_BECOMING_MEMORYLESS (1<<2)
+#define NODE_BECAME_MEMORYLESS (1<<3)
+#define NODE_CANCEL_MEM_AWARE (1<<4)
+#define NODE_CANCEL_MEMORYLESS (1<<5)
Very nitpicky: MEM vs. MEMORY inconsistency. Also, I am not sure about
"MEMORYLESS vs. MEMORY AWARE" terminology (opposite of aware is not
less) and "BECOMING" vs. "CANCEL" ...
There must be something better ... but what is it. :)
NODE_ADDING_FIRST_MEMORY
NODE_ADDED_FIRST_MEMORY
NODE_CANCEL_ADDING_FIRST_MEMORY
NODE_REMOVING_LAST_MEMORY
NODE_REMOVED_LAST_MEMORY
NODE_CANCEL_REMOVING_LAST_MEMORY
Maybe something like that? I still don't quite like the "CANCEL" stuff.
NODE_ADDING_FIRST_MEMORY
NODE_ADDED_FIRST_MEMORY
NODE_NOT_ADDED_FIRST_MEMORY
NODE_REMOVING_LAST_MEMORY
NODE_REMOVED_LAST_MEMORY
NODE_NOT_REMOVED_LAST_MEMORY
Hm ...
+
struct memory_notify {
/*
* The altmap_start_pfn and altmap_nr_pages fields are designated for
@@ -109,7 +117,10 @@ struct memory_notify {
unsigned long altmap_nr_pages;
unsigned long start_pfn;
unsigned long nr_pages;
- int status_change_nid_normal;
+ int status_change_nid;
+};
Could/should that be a separate patch after patch #1 removed the last user?
Also, I think the sequence should be (this patch is getting hard to
review for me due to the size):
#1 existing patch 1
#2 remove status_change_nid_normal
#3 introduce node notifier
#4-#X: convert individual users to node notifier
#X+1: change status_change_nid to always just indicate the nid, renaming
it on the way (incl current patch #3)
+
+struct node_notify {
int status_change_nid;
This should be called "nid" right from the start.
@@ -157,15 +168,34 @@ static inline unsigned long memory_block_advised_max_size(void)
{
return 0;
}
+
[...]
* {on,off}lining is constrained to full memory sections (or more
@@ -1194,11 +1172,22 @@ int online_pages(unsigned long pfn, unsigned long nr_pages,
/* associate pfn range with the zone */
move_pfn_range_to_zone(zone, pfn, nr_pages, NULL, MIGRATE_ISOLATE);
- arg.start_pfn = pfn;
- arg.nr_pages = nr_pages;
- node_states_check_changes_online(nr_pages, zone, &arg);
+ node_arg.status_change_nid = NUMA_NO_NODE;
+ if (!node_state(nid, N_MEMORY)) {
+ /* Node is becoming memory aware. Notify consumers */
+ cancel_node_notifier_on_err = true;
+ node_arg.status_change_nid = nid;
+ ret = node_notify(NODE_BECOMING_MEM_AWARE, &node_arg);
+ ret = notifier_to_errno(ret);
+ if (ret)
+ goto failed_addition;
+ }
I assume without NUMA, that code would never trigger? I mean, the whole
notifier doesn't make sense without CONFIG_NUMA :)
--
Cheers,
David / dhildenb
Return-Path: <linux-kernel+bounces-673159-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 4735741E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:05:50 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 6C85816BF7D
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:05:51 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 280A028ECC1;
Wed, 4 Jun 2025 12:05:39 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="PzoeOgct"
Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id C82781DED6D;
Wed, 4 Jun 2025 12:05:36 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749038738; cv=none; b=Sf85RcK7TJwwAwpG0Ksu8JkaZvB0eAv+BHKYeXwYcq5R99SYcrVCccVVFVTUvEWILHhAuO0QFNouFKTMsUwbpgHydWNUWG1xnDHtsDHcBgugs9SMw2WL3beHFBxUPxNnwBRaXxbrymqDfwLbcRxOSMUr0NmZk4MuvpXK57eYjDk=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749038738; c=relaxed/simple;
bh=d0jYeINdY4WPRJM3V9B7OarlkOzj3p1nXsQ+TeFa250=;
h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From:
In-Reply-To:Content-Type; b=rMl53WSp0oS6PTQpOqZUs8at5VPmdEqfye26lQkTxVhOw0hDVEIyvUKO3Z58Tgj6dio0qsYje1t5/xe1aeZo2M4ANk/LKuxEK9dVSRByUP/lhaFzXKzP3KKzCmS8yvI5zLMAG4w9TO923VKR3bWhTxYIXoGeD5hwJBBNxxmjNdQ=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=PzoeOgct; arc=none smtp.client-ip=205.220.168.131
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com
Received: from pps.filterd (m0279865.ppops.net [127.0.0.1])
by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 55480T0Y007627;
Wed, 4 Jun 2025 12:05:32 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=
cc:content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=qcppdkim1; bh=
VoHrna9YP2EfxiDXuUk8V+6zFQ/YagPNUMtfU//Kwhc=; b=PzoeOgctBHZHuRb6
BerSU/jc6H7EMrVvFCM2Bwe0iFNilzFIvvKc9CXYfiJmYucUqa4fz51mrTyrvCGA
WYQ8BoyNXZqscaM+ehhURntjovp8TdC0NTXnLUM7zynhCkeJ6gra3j31O/vQrauw
dLG14gmfJM/uf3vTJNlE02FWKbnU3tr1jPvuLqoQyFaF6AyTLbJIj5VZLHpxS8zE
CpwgHTA9IYAijTnLgFeluomnkpJgRfUq/lPC6DIrMwICRbHibWm4l7Ommb66kGF/
BU1g7ssh2kLFTratU4UAUhWsWGxhMLftlivqWFbwcB2CX/g5iwATaS3xgz9DcLZ9
zlXozA==
Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20])
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 471g8swx5x-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 12:05:32 +0000 (GMT)
Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35])
by NALASPPMTA03.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 554C5VEM020637
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 4 Jun 2025 12:05:31 GMT
Received: from [10.253.33.25] (10.80.80.8) by nalasex01c.na.qualcomm.com
(10.47.97.35) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Wed, 4 Jun 2025
05:05:28 -0700
Message-ID: <9faff664-9717-4259-8b23-bc44e64f6947@xxxxxxxxxxx>
Date: Wed, 4 Jun 2025 20:05:25 +0800
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v7 2/3] arm64: dts: qcom: qcs615: add venus node to
devicetree
To: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
CC: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>,
Vikash Garodia
<quic_vgarodia@xxxxxxxxxxx>,
Dikshita Agarwal <quic_dikshita@xxxxxxxxxxx>,
Bryan O'Donoghue <bryan.odonoghue@xxxxxxxxxx>,
Mauro Carvalho Chehab
<mchehab@xxxxxxxxxx>,
Bjorn Andersson <andersson@xxxxxxxxxx>,
Konrad Dybcio
<konradybcio@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski
<krzk+dt@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>, <linux-media@xxxxxxxxxxxxxxx>,
<linux-arm-msm@xxxxxxxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>,
<devicetree@xxxxxxxxxxxxxxx>
References: <20250527-add-venus-for-qcs615-v7-0-cca26e2768e3@xxxxxxxxxxx>
<20250527-add-venus-for-qcs615-v7-2-cca26e2768e3@xxxxxxxxxxx>
<429b4c99-b312-4015-8678-0371eac86de4@xxxxxxxxxxxxxxxx>
<6a9e7daf-c0df-42db-b02d-96d9893afcde@xxxxxxxxxxx>
<idc4476ibh4geraklzpas5536jnwvbp6xhjjaajcdcwxicorrf@myh7kyz77rxy>
<43e1f8db-5ab1-44ce-97c8-50910704788f@xxxxxxxxxxx>
<d6udpwmocodvlsm5ljqz7zbyonj2yahtlzmm2jjjveqrm2hmkz@andh5j4jgixr>
Content-Language: en-US
From: Renjiang Han <quic_renjiang@xxxxxxxxxxx>
In-Reply-To: <d6udpwmocodvlsm5ljqz7zbyonj2yahtlzmm2jjjveqrm2hmkz@andh5j4jgixr>
Content-Type: text/plain; charset="UTF-8"; format=flowed
Content-Transfer-Encoding: 8bit
X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To
nalasex01c.na.qualcomm.com (10.47.97.35)
X-QCInternal: smtphost
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085
X-Authority-Analysis: v=2.4 cv=RMizH5i+ c=1 sm=1 tr=0 ts=6840368c cx=c_pps
a=ouPCqIW2jiPt+lZRy3xVPw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17
a=GEpy-HfZoHoA:10 a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10 a=COk6AnOGAAAA:8
a=FDjDQU04mdZVipPL-u4A:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10
a=TjNXssC_j7lpFel5tvFf:22
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDA5MSBTYWx0ZWRfXw4FHX4VDeXEI
UEAFN33n2unu1RJWN+87P2H/nCVvK5TtWchNYgDkjCU3p8leIS9alfEAQiAZv5mt0eZZ9OhT2o5
TJ8gH70cpuyGTgnDuNhwuyNuQJohgJAzR42lsX8Z1uQjyDMQiCSNF6SJIG3McCGtuD4tTLRrQDF
49Qjui2+RxLyDP/oNTFztfSDbi5bnY7Jx3urPuN4P/DpX/U7opQHYeUscizulS2lexTwPCY9s5M
iZSIyodpCRLpUJK6VutWsoVWhE5h6YhLyNzkkcEP22jKRRvKjTeVS/4CCc/dS1xgBNcIpdZnrZ6
qfOlicK8Tha/rn/7ONQMw+MY46p5ypIlpkGkpCa2VX4xqbes0ktm99qcWSgSgLwBYtJDeDKu+Y8
DCgibsFSR2s10eTuohawLukSwEI9E4wUryVevKKwIenjQojz9C45xxilAqgdrzZeYylR+2yn
X-Proofpoint-GUID: s_BbQRWeuHOt61K7SqsmzIvKHq3Y3IfU
X-Proofpoint-ORIG-GUID: s_BbQRWeuHOt61K7SqsmzIvKHq3Y3IfU
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
impostorscore=0 phishscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0
bulkscore=0 suspectscore=0 adultscore=0 mlxlogscore=834 mlxscore=0
clxscore=1015 priorityscore=1501 classifier=spam authscore=0 authtc=n/a
authcc= route=outbound adjust=0 reason=mlx scancount=1
engine=8.19.0-2505280000 definitions=main-2506040091
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 6/3/2025 9:21 PM, Dmitry Baryshkov wrote:
On Thu, May 29, 2025 at 10:29:46AM +0800, Renjiang Han wrote:
On 5/28/2025 7:04 PM, Dmitry Baryshkov wrote:
On Wed, May 28, 2025 at 05:13:06PM +0800, Renjiang Han wrote:
On 5/27/2025 9:57 PM, Konrad Dybcio wrote:
On 5/27/25 5:32 AM, Renjiang Han wrote:
Add the venus node to the devicetree for the qcs615 platform to enable
video functionality. The qcs615 platform currently lacks video
functionality due to the absence of the venus node. Fallback to sc7180 due
to the same video core.
Signed-off-by: Renjiang Han <quic_renjiang@xxxxxxxxxxx>
---
[...]
+ interconnect-names = "video-mem",
+ "cpu-cfg";
+
+ iommus = <&apps_smmu 0xe40 0x20>;
fwiw docs mention 0xe60 0x20 (which result in the exact same resulting sid)
OK. Will update it with next version.
How would you update this?
Thanks for your comments. I'll update it like this.
iommus = <&apps_smmu 0xe60 0x20>;
This 0xe40 SID was based on a previous project. However, after rechecking
the documentation yesterday and confirming with colleagues, the correct
SID value should be 0xe60. I’ve also validated it on local device, it
works as expected. The reason 0xe40 seemed to work earlier is due to the
mask value being 0x20, which causes the effective SID derived from 0xe40
to be the same as 0xe60.
Using 0xe60 would be counterintuitive, as we have a non-zero masked bits
in the base value. It should be either <0xe60 0x0> or <0xe40 0x20>.
Hi Dmitry
Thank you for your comment.
I’ve followed up on this sid with a colleague from the kernel team,
and based on our discussion, it seems that the sid in this case should
be the result sid. The actual sid is 0xe60, and with a mask of 0x20,
the resulting sid would be 0xe40. Therefore, it should be <0xe40 0x20>.
@Konrad, I’d appreciate any thoughts or suggestions you might have on it.
--
Best Regards,
Renjiang
Return-Path: <linux-kernel+bounces-673160-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 96A0241E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:06:03 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id D7B313A5C2C
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:05:40 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 3CDC628DB7D;
Wed, 4 Jun 2025 12:05:47 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="fBhdUkRV"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id CA18B22DFB5
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:05:44 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749038746; cv=none; b=GDPsTikbRJv7/vh78M0p+Zd50SV2qW6cD39jbMY/JaYbiODmyCP1fheacxWsdHtMg9uAiGnrNtBMT1M8b/aU+alXvE9/o7DNXETXc9Wl6fNXeSYeYqTYRYtlBYrjL9rOGsKyWKAdpQT2D+ZeW7UrPKvPceXlrr+iFrP99U6Jy8g=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749038746; c=relaxed/simple;
bh=U8AVzAlrbEZ0aChrxNGmrNRiyqyM220uTc6XmlAQjho=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=o1hvNXCmuK5CZRS8OzJtrKQPZDyWdolIDxYEMUUXlRrWbkl+4p+Z4gP6S1AvMmChrGKesZmxZzvCXHA/Qk4T60yMsdB3l8U3I8ILgN5W/Z4aR+vAjKfKFDSqws022O/LhmvUTzIDkY0c2rQClNDJ+WZy2XdZvNFvS3Vs/apLMSc=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=fBhdUkRV; arc=none smtp.client-ip=170.10.133.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749038743;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=Rs0btbQ6D2xanKsfDuTxjlpnDIaLcj7WvAFOziSOBxI=;
b=fBhdUkRVnDqJ0Y5HcKvW08xkfXZaD3avkTu/F3zxVkEh5D6WlWfSM6FH9xjfa9Vhdwk0h7
g+baqeuBmcZeCUyBStQ6wky4Q39sJdv6USYWNYIvbjzBpyHNCYx8IcFBqVT3PVNsPg6DPE
5rG8l/Dyyrs98orazEYgRZYiPMekAMI=
Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com
[209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-422-7-4qGx4fNUOh734QEiDvkw-1; Wed, 04 Jun 2025 08:05:42 -0400
X-MC-Unique: 7-4qGx4fNUOh734QEiDvkw-1
X-Mimecast-MFC-AGG-ID: 7-4qGx4fNUOh734QEiDvkw_1749038741
Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-451d2037f1eso22778275e9.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 05:05:42 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749038741; x=1749643541;
h=content-transfer-encoding:in-reply-to:organization:autocrypt
:content-language:from:references:cc:to:subject:user-agent
:mime-version:date:message-id:x-gm-message-state:from:to:cc:subject
:date:message-id:reply-to;
bh=Rs0btbQ6D2xanKsfDuTxjlpnDIaLcj7WvAFOziSOBxI=;
b=upxgM8/DFuLnbhp1Zqsrc9+UZo23F4KFytODqwYOKce74lQ1Bq+cMwN/dHnu8FyJZc
+reqFPMpWNiSrkB1BMskBAqwy80SxpFBrdmURyTrw4O1PHaBatkfke8ApfAR6I7JRPSX
16q43XBYyFqpc5Anu86NS8i2Ke0GGgymBa/6OB5abRnoT9J/LD8hUdZlmu1inCoFj1qE
SiRKCjKinHK18W2iEXoAJnD+f4kQc0OxCRFE6vp+tbppZDMLH1sGeREc1Mi33BBCj7UC
dE8vPBY6+GfTKbtWDjWl9SssHOM/vsRelYiDetjxvU+WaTeb1sTzRvsAI50UOtdWir5z
Jd0g==
X-Forwarded-Encrypted: i=1; AJvYcCVvNYlnfFdvS/bzwYLwk3glGCaxky9v4AXs4gcsUkU0iG+W2egCTr+QRtqYiP/a2X6UWGHVDMIzdIplrcc=@vger.kernel.org
X-Gm-Message-State: AOJu0YwRb68sLqLppwBLRoZP0PwDOLBwE8XSttGzKLwDaMMN5NsSfGpJ
Y77ARJvilcfkearfWFPFZVRt+8jQXS1vVkZb7lT6saf0L8KTeZrRnhUNoW+/6RkuBjJxLF8TeA+
fx5NvEr/VFebD8rqwICxM4q2q44m0Z0YtYZ1ZgImi716KtaQ2+frEPMFc9BQpLZ50TA==
X-Gm-Gg: ASbGnctR+vK2pLHmPfVSLTMbAJsx78o9jvNKh8krTLh3qv9hi9gAYcDy97jl6PsQchs
Ln7yqwOwwndA5V8P5OjOl/04DgRhSCcBpCkN4tQpU9geJgRMnnZMO0sR4JVGezZ17fGJUUB96wF
7H019uWSlBdCAjl2q8D7hpa8VGHDfG1WxLPqjCciCDxOcuTncWDuqE+xbE+vTWqPPcuUjnYBK5R
O18KMjX39brlBfjVwJ5SSMok4mXcVufq0tgyS79uFGCEJ62rABbvGQFOxuttFCMgX6Uu6JRxDPz
pLsKS3/wwIHAPWOPR6AKQZPn9H7FKVl89LYvrSj6bWPgutnaZJX8yB0T7V5FDW8i/Gf1imQCESv
uN7/MXLTrAj8D/hqq5DwNL3xlAE8TLHYrTnTdbRk=
X-Received: by 2002:a05:600c:34c2:b0:440:68db:9fef with SMTP id 5b1f17b1804b1-451f0b09f62mr18360355e9.20.1749038741082;
Wed, 04 Jun 2025 05:05:41 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IEBsuyo9l+yFSCcNj2JR7ZoUNJ4TDGNXGCjYZQjJw2vbSw0Yu0DciIRlxFRq3I5iJNsenYpfg==
X-Received: by 2002:a05:600c:34c2:b0:440:68db:9fef with SMTP id 5b1f17b1804b1-451f0b09f62mr18359835e9.20.1749038740628;
Wed, 04 Jun 2025 05:05:40 -0700 (PDT)
Received: from ?IPV6:2003:d8:2f1b:b800:6fdb:1af2:4fbd:1fdf? (p200300d82f1bb8006fdb1af24fbd1fdf.dip0.t-ipconnect.de. [2003:d8:2f1b:b800:6fdb:1af2:4fbd:1fdf])
by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-450d8000d8csm196532255e9.24.2025.06.04.05.05.39
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 05:05:40 -0700 (PDT)
Message-ID: <5c054941-62c2-483c-ac19-592aa795ed93@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 14:05:39 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [DISCUSSION] proposed mctl() API
To: Johannes Weiner <hannes@xxxxxxxxxxx>, Barry Song <21cnbao@xxxxxxxxx>
Cc: Matthew Wilcox <willy@xxxxxxxxxxxxx>,
Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
Shakeel Butt <shakeel.butt@xxxxxxxxx>,
"Liam R . Howlett" <Liam.Howlett@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>, Jann Horn <jannh@xxxxxxxxxx>,
Arnd Bergmann <arnd@xxxxxxxx>, Christian Brauner <brauner@xxxxxxxxxx>,
SeongJae Park <sj@xxxxxxxxxx>, Usama Arif <usamaarif642@xxxxxxxxx>,
Mike Rapoport <rppt@xxxxxxxxxx>, linux-mm@xxxxxxxxx,
linux-arch@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
linux-api@xxxxxxxxxxxxxxx, Pedro Falcato <pfalcato@xxxxxxx>
References: <85778a76-7dc8-4ea8-8827-acb45f74ee05@lucifer.local>
<aDh9LtSLCiTLjg2X@xxxxxxxxxxxxxxxxxxxx>
<20250529211423.GA1271329@xxxxxxxxxxx>
<CAGsJ_4yKDqUu8yZjHSmWBz3CpQhU6DM0=EhibfTwHbTo+QWvZA@xxxxxxxxxxxxxx>
<20250604120013.GA1431@xxxxxxxxxxx>
From: David Hildenbrand <david@xxxxxxxxxx>
Content-Language: en-US
Autocrypt: addr=david@xxxxxxxxxx; keydata=
xsFNBFXLn5EBEAC+zYvAFJxCBY9Tr1xZgcESmxVNI/0ffzE/ZQOiHJl6mGkmA1R7/uUpiCjJ
dBrn+lhhOYjjNefFQou6478faXE6o2AhmebqT4KiQoUQFV4R7y1KMEKoSyy8hQaK1umALTdL
QZLQMzNE74ap+GDK0wnacPQFpcG1AE9RMq3aeErY5tujekBS32jfC/7AnH7I0v1v1TbbK3Gp
XNeiN4QroO+5qaSr0ID2sz5jtBLRb15RMre27E1ImpaIv2Jw8NJgW0k/D1RyKCwaTsgRdwuK
Kx/Y91XuSBdz0uOyU/S8kM1+ag0wvsGlpBVxRR/xw/E8M7TEwuCZQArqqTCmkG6HGcXFT0V9
PXFNNgV5jXMQRwU0O/ztJIQqsE5LsUomE//bLwzj9IVsaQpKDqW6TAPjcdBDPLHvriq7kGjt
WhVhdl0qEYB8lkBEU7V2Yb+SYhmhpDrti9Fq1EsmhiHSkxJcGREoMK/63r9WLZYI3+4W2rAc
UucZa4OT27U5ZISjNg3Ev0rxU5UH2/pT4wJCfxwocmqaRr6UYmrtZmND89X0KigoFD/XSeVv
jwBRNjPAubK9/k5NoRrYqztM9W6sJqrH8+UWZ1Idd/DdmogJh0gNC0+N42Za9yBRURfIdKSb
B3JfpUqcWwE7vUaYrHG1nw54pLUoPG6sAA7Mehl3nd4pZUALHwARAQABzSREYXZpZCBIaWxk
ZW5icmFuZCA8ZGF2aWRAcmVkaGF0LmNvbT7CwZgEEwEIAEICGwMGCwkIBwMCBhUIAgkKCwQW
AgMBAh4BAheAAhkBFiEEG9nKrXNcTDpGDfzKTd4Q9wD/g1oFAl8Ox4kFCRKpKXgACgkQTd4Q
9wD/g1oHcA//a6Tj7SBNjFNM1iNhWUo1lxAja0lpSodSnB2g4FCZ4R61SBR4l/psBL73xktp
rDHrx4aSpwkRP6Epu6mLvhlfjmkRG4OynJ5HG1gfv7RJJfnUdUM1z5kdS8JBrOhMJS2c/gPf
wv1TGRq2XdMPnfY2o0CxRqpcLkx4vBODvJGl2mQyJF/gPepdDfcT8/PY9BJ7FL6Hrq1gnAo4
3Iv9qV0JiT2wmZciNyYQhmA1V6dyTRiQ4YAc31zOo2IM+xisPzeSHgw3ONY/XhYvfZ9r7W1l
pNQdc2G+o4Di9NPFHQQhDw3YTRR1opJaTlRDzxYxzU6ZnUUBghxt9cwUWTpfCktkMZiPSDGd
KgQBjnweV2jw9UOTxjb4LXqDjmSNkjDdQUOU69jGMUXgihvo4zhYcMX8F5gWdRtMR7DzW/YE
BgVcyxNkMIXoY1aYj6npHYiNQesQlqjU6azjbH70/SXKM5tNRplgW8TNprMDuntdvV9wNkFs
9TyM02V5aWxFfI42+aivc4KEw69SE9KXwC7FSf5wXzuTot97N9Phj/Z3+jx443jo2NR34XgF
89cct7wJMjOF7bBefo0fPPZQuIma0Zym71cP61OP/i11ahNye6HGKfxGCOcs5wW9kRQEk8P9
M/k2wt3mt/fCQnuP/mWutNPt95w9wSsUyATLmtNrwccz63XOwU0EVcufkQEQAOfX3n0g0fZz
Bgm/S2zF/kxQKCEKP8ID+Vz8sy2GpDvveBq4H2Y34XWsT1zLJdvqPI4af4ZSMxuerWjXbVWb
T6d4odQIG0fKx4F8NccDqbgHeZRNajXeeJ3R7gAzvWvQNLz4piHrO/B4tf8svmRBL0ZB5P5A
2uhdwLU3NZuK22zpNn4is87BPWF8HhY0L5fafgDMOqnf4guJVJPYNPhUFzXUbPqOKOkL8ojk
CXxkOFHAbjstSK5Ca3fKquY3rdX3DNo+EL7FvAiw1mUtS+5GeYE+RMnDCsVFm/C7kY8c2d0G
NWkB9pJM5+mnIoFNxy7YBcldYATVeOHoY4LyaUWNnAvFYWp08dHWfZo9WCiJMuTfgtH9tc75
7QanMVdPt6fDK8UUXIBLQ2TWr/sQKE9xtFuEmoQGlE1l6bGaDnnMLcYu+Asp3kDT0w4zYGsx
5r6XQVRH4+5N6eHZiaeYtFOujp5n+pjBaQK7wUUjDilPQ5QMzIuCL4YjVoylWiBNknvQWBXS
lQCWmavOT9sttGQXdPCC5ynI+1ymZC1ORZKANLnRAb0NH/UCzcsstw2TAkFnMEbo9Zu9w7Kv
AxBQXWeXhJI9XQssfrf4Gusdqx8nPEpfOqCtbbwJMATbHyqLt7/oz/5deGuwxgb65pWIzufa
N7eop7uh+6bezi+rugUI+w6DABEBAAHCwXwEGAEIACYCGwwWIQQb2cqtc1xMOkYN/MpN3hD3
AP+DWgUCXw7HsgUJEqkpoQAKCRBN3hD3AP+DWrrpD/4qS3dyVRxDcDHIlmguXjC1Q5tZTwNB
boaBTPHSy/Nksu0eY7x6HfQJ3xajVH32Ms6t1trDQmPx2iP5+7iDsb7OKAb5eOS8h+BEBDeq
3ecsQDv0fFJOA9ag5O3LLNk+3x3q7e0uo06XMaY7UHS341ozXUUI7wC7iKfoUTv03iO9El5f
XpNMx/YrIMduZ2+nd9Di7o5+KIwlb2mAB9sTNHdMrXesX8eBL6T9b+MZJk+mZuPxKNVfEQMQ
a5SxUEADIPQTPNvBewdeI80yeOCrN+Zzwy/Mrx9EPeu59Y5vSJOx/z6OUImD/GhX7Xvkt3kq
Er5KTrJz3++B6SH9pum9PuoE/k+nntJkNMmQpR4MCBaV/J9gIOPGodDKnjdng+mXliF3Ptu6
3oxc2RCyGzTlxyMwuc2U5Q7KtUNTdDe8T0uE+9b8BLMVQDDfJjqY0VVqSUwImzTDLX9S4g/8
kC4HRcclk8hpyhY2jKGluZO0awwTIMgVEzmTyBphDg/Gx7dZU1Xf8HFuE+UZ5UDHDTnwgv7E
th6RC9+WrhDNspZ9fJjKWRbveQgUFCpe1sa77LAw+XFrKmBHXp9ZVIe90RMe2tRL06BGiRZr
jPrnvUsUUsjRoRNJjKKA/REq+sAnhkNPPZ/NNMjaZ5b8Tovi8C0tmxiCHaQYqj7G2rgnT0kt
WNyWQQ==
Organization: Red Hat
In-Reply-To: <20250604120013.GA1431@xxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 04.06.25 14:00, Johannes Weiner wrote:
On Fri, May 30, 2025 at 07:52:28PM +1200, Barry Song wrote:
On Fri, May 30, 2025 at 9:14 AM Johannes Weiner <hannes@xxxxxxxxxxx> wrote:
On Thu, May 29, 2025 at 04:28:46PM +0100, Matthew Wilcox wrote:
Barry's problem is that we're all nervous about possibly regressing
performance on some unknown workloads. Just try Barry's proposal, see
if anyone actually compains or if we're just afraid of our own shadows.
I actually explained why I think this is a terrible idea. But okay, I
tried the patch anyway.
This is 'git log' on a hot kernel repo after a large IO stream:
VANILLA BARRY
Real time 49.93 ( +0.00%) 60.36 ( +20.48%)
User time 32.10 ( +0.00%) 32.09 ( -0.04%)
System time 14.41 ( +0.00%) 14.64 ( +1.50%)
pgmajfault 9227.00 ( +0.00%) 18390.00 ( +99.30%)
workingset_refault_file 184.00 ( +0.00%) 236899.00 (+127954.05%)
Clearly we can't generally ignore page cache hits just because the
mmaps() are intermittent.
Hi Johannes,
Thanks!
Are you on v1, which lacks folio demotion[1], or v2, which includes it [2]?
[1] https://lore.kernel.org/linux-mm/20250412085852.48524-1-21cnbao@xxxxxxxxx/
[2] https://lore.kernel.org/linux-mm/20250514070820.51793-1-21cnbao@xxxxxxxxx/
The subthread is about whether the reference dismissal / demotion
should be unconditional (v1) or opt-in (v2).
I'm arguing for v2.
+1
--
Cheers,
David / dhildenb
Return-Path: <linux-kernel+bounces-673161-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 4409A41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:08:20 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 92DC316D567
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:08:12 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 3D0C828EA64;
Wed, 4 Jun 2025 12:08:03 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FdBrv4tr"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4F6EB1A5BBD;
Wed, 4 Jun 2025 12:08:01 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749038882; cv=none; b=CF8SG9CSEqrT/AzhR9ixoVFrGfyJLRN/u5SHDxWkfZDIapZ5Q/VAyFTU9n0QKvMslNuCergZWGbEtEeBfutXmI7vLBhx+nRKh2WCyLSxDtSNyuFtsdQZYGq3FDfkj0O0KO0wu2CEAuI/cBYViefTUpCx4kjBhtX6Pv2lOdhMULM=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749038882; c=relaxed/simple;
bh=JGjvHMM1UBKGBFe4oZgVTLwSUN2F5OP2sQO5HIWNYtY=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=kEzEF1doqfEZi16N1bw6Kt5Su8gWoDJH5IZrKlQrwMWLQBP60l0QppqrvbVVSVCkLIsFkzTO8qHXNg+9zL9Erx1cBD4lPATGitkb5TEAFaowFVY0VkIspondTSyu2nmxyFSpkZ2IYAhHr/GvfPlGOVke0K8c300fBZlIdxEXKVw=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FdBrv4tr; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 30703C4CEE7;
Wed, 4 Jun 2025 12:07:53 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749038881;
bh=JGjvHMM1UBKGBFe4oZgVTLwSUN2F5OP2sQO5HIWNYtY=;
h=Date:Subject:To:Cc:References:From:In-Reply-To:From;
b=FdBrv4trwT8p4QmYOPtphbxL67Hs8mAoetDvfecAQ9X7mG6NEeEg86fFwRBKIb5yw
9xxA45tU48kgDkxYCJkFKBOpwBzuEMTDJ3PQWfYiiAatmaX9jr2GtmOZCU1L+epMbz
EWJMTuS3BxLWO+cCTLzndZATxUOdxrbAcvXxvfnSWsbq63nCDaWOhhZX4CorFaNO+n
32r4wf8qolXonz5q7PTShuuy0FC0HURETE7XOt5R8IuXw88ZsOVx3MfhjuQHSl3v0k
9peoZreNNQfq/ZyBjuMScg60tkc2suxcYqRBv4w5Ale/r14DjqywcHmJ0O7ZnE1NWP
48tRCM0HZeGng==
Message-ID: <cc4dbf7c-e023-403c-88be-4691f97a0ff0@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 14:07:52 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v3 3/8] drm/imagination: Use pwrseq for TH1520 GPU power
management
To: Michal Wilczynski <m.wilczynski@xxxxxxxxxxx>
Cc: Drew Fustini <drew@xxxxxxxx>, Guo Ren <guoren@xxxxxxxxxx>,
Fu Wei <wefu@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Conor Dooley
<conor+dt@xxxxxxxxxx>, Bartosz Golaszewski <brgl@xxxxxxxx>,
Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>, Frank Binns
<frank.binns@xxxxxxxxxx>, Matt Coster <matt.coster@xxxxxxxxxx>,
Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>,
Maxime Ripard <mripard@xxxxxxxxxx>, Thomas Zimmermann <tzimmermann@xxxxxxx>,
David Airlie <airlied@xxxxxxxxx>, Simona Vetter <simona@xxxxxxxx>,
Paul Walmsley <paul.walmsley@xxxxxxxxxx>, Palmer Dabbelt
<palmer@xxxxxxxxxxx>, Albert Ou <aou@xxxxxxxxxxxxxxxxx>,
Alexandre Ghiti <alex@xxxxxxxx>, Ulf Hansson <ulf.hansson@xxxxxxxxxx>,
Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>,
linux-riscv@xxxxxxxxxxxxxxxxxxx, devicetree@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-pm@xxxxxxxxxxxxxxx,
dri-devel@xxxxxxxxxxxxxxxxxxxxx
References: <20250530-apr_14_for_sending-v3-0-83d5744d997c@xxxxxxxxxxx>
<CGME20250529222405eucas1p18ed1254bf1b2d78468734656fec537e1@xxxxxxxxxxxxxxxxxxxx>
<20250530-apr_14_for_sending-v3-3-83d5744d997c@xxxxxxxxxxx>
<20250603-whispering-jaybird-of-thunder-f87867@kuoka>
<d42a8c49-7ad2-49ef-bd9c-1e3d9981b58e@xxxxxxxxxxx>
<e5a0bee2-ff74-47cf-ad2c-0c78b57ae6cf@xxxxxxxxxx>
<a6a29e58-8613-47f0-9e5c-d125da7ddb49@xxxxxxxxxxx>
From: Krzysztof Kozlowski <krzk@xxxxxxxxxx>
Content-Language: en-US
Autocrypt: addr=krzk@xxxxxxxxxx; keydata=
xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79
cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu
JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH
gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE
J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj
NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS
BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU
vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM
Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD
TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzSVLcnp5c3p0b2Yg
S296bG93c2tpIDxrcnprQGtlcm5lbC5vcmc+wsGVBBMBCgA/AhsDBgsJCAcDAgYVCAIJCgsE
FgIDAQIeAQIXgBYhBJvQfg4MUfjVlne3VBuTQ307QWKbBQJoF1BKBQkWlnSaAAoJEBuTQ307
QWKbHukP/3t4tRp/bvDnxJfmNdNVn0gv9ep3L39IntPalBFwRKytqeQkzAju0whYWg+R/rwp
+r2I1Fzwt7+PTjsnMFlh1AZxGDmP5MFkzVsMnfX1lGiXhYSOMP97XL6R1QSXxaWOpGNCDaUl
ajorB0lJDcC0q3xAdwzRConxYVhlgmTrRiD8oLlSCD5baEAt5Zw17UTNDnDGmZQKR0fqLpWy
786Lm5OScb7DjEgcA2PRm17st4UQ1kF0rQHokVaotxRM74PPDB8bCsunlghJl1DRK9s1aSuN
hL1Pv9VD8b4dFNvCo7b4hfAANPU67W40AaaGZ3UAfmw+1MYyo4QuAZGKzaP2ukbdCD/DYnqi
tJy88XqWtyb4UQWKNoQqGKzlYXdKsldYqrLHGoMvj1UN9XcRtXHST/IaLn72o7j7/h/Ac5EL
8lSUVIG4TYn59NyxxAXa07Wi6zjVL1U11fTnFmE29ALYQEXKBI3KUO1A3p4sQWzU7uRmbuxn
naUmm8RbpMcOfa9JjlXCLmQ5IP7Rr5tYZUCkZz08LIfF8UMXwH7OOEX87Y++EkAB+pzKZNNd
hwoXulTAgjSy+OiaLtuCys9VdXLZ3Zy314azaCU3BoWgaMV0eAW/+gprWMXQM1lrlzvwlD/k
whyy9wGf0AEPpLssLVt9VVxNjo6BIkt6d1pMg6mHsUEVzsFNBFVDXDQBEADNkrQYSREUL4D3
Gws46JEoZ9HEQOKtkrwjrzlw/tCmqVzERRPvz2Xg8n7+HRCrgqnodIYoUh5WsU84N03KlLue
MNsWLJBvBaubYN4JuJIdRr4dS4oyF1/fQAQPHh8Thpiz0SAZFx6iWKB7Qrz3OrGCjTPcW6ei
OMheesVS5hxietSmlin+SilmIAPZHx7n242u6kdHOh+/SyLImKn/dh9RzatVpUKbv34eP1wA
GldWsRxbf3WP9pFNObSzI/Bo3kA89Xx2rO2roC+Gq4LeHvo7ptzcLcrqaHUAcZ3CgFG88CnA
6z6lBZn0WyewEcPOPdcUB2Q7D/NiUY+HDiV99rAYPJztjeTrBSTnHeSBPb+qn5ZZGQwIdUW9
YegxWKvXXHTwB5eMzo/RB6vffwqcnHDoe0q7VgzRRZJwpi6aMIXLfeWZ5Wrwaw2zldFuO4Dt
91pFzBSOIpeMtfgb/Pfe/a1WJ/GgaIRIBE+NUqckM+3zJHGmVPqJP/h2Iwv6nw8U+7Yyl6gU
BLHFTg2hYnLFJI4Xjg+AX1hHFVKmvl3VBHIsBv0oDcsQWXqY+NaFahT0lRPjYtrTa1v3tem/
JoFzZ4B0p27K+qQCF2R96hVvuEyjzBmdq2esyE6zIqftdo4MOJho8uctOiWbwNNq2U9pPWmu
4vXVFBYIGmpyNPYzRm0QPwARAQABwsF8BBgBCgAmAhsMFiEEm9B+DgxR+NWWd7dUG5NDfTtB
YpsFAmgXUF8FCRaWWyoACgkQG5NDfTtBYptO0w//dlXJs5/42hAXKsk+PDg3wyEFb4NpyA1v
qmx7SfAzk9Hf6lWwU1O6AbqNMbh6PjEwadKUk1m04S7EjdQLsj/MBSgoQtCT3MDmWUUtHZd5
RYIPnPq3WVB47GtuO6/u375tsxhtf7vt95QSYJwCB+ZUgo4T+FV4hquZ4AsRkbgavtIzQisg
Dgv76tnEv3YHV8Jn9mi/Bu0FURF+5kpdMfgo1sq6RXNQ//TVf8yFgRtTUdXxW/qHjlYURrm2
H4kutobVEIxiyu6m05q3e9eZB/TaMMNVORx+1kM3j7f0rwtEYUFzY1ygQfpcMDPl7pRYoJjB
dSsm0ZuzDaCwaxg2t8hqQJBzJCezTOIkjHUsWAK+tEbU4Z4SnNpCyM3fBqsgYdJxjyC/tWVT
AQ18NRLtPw7tK1rdcwCl0GFQHwSwk5pDpz1NH40e6lU+NcXSeiqkDDRkHlftKPV/dV+lQXiu
jWt87ecuHlpL3uuQ0ZZNWqHgZoQLXoqC2ZV5KrtKWb/jyiFX/sxSrodALf0zf+tfHv0FZWT2
zHjUqd0t4njD/UOsuIMOQn4Ig0SdivYPfZukb5cdasKJukG1NOpbW7yRNivaCnfZz6dTawXw
XRIV/KDsHQiyVxKvN73bThKhONkcX2LWuD928tAR6XMM2G5ovxLe09vuOzzfTWQDsm++9UKF a/A=
In-Reply-To: <a6a29e58-8613-47f0-9e5c-d125da7ddb49@xxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 04/06/2025 13:53, Michal Wilczynski wrote:
The GPU node will depend on the AON node, which will be the sole
provider for the 'gpu-power' sequencer (based on the discussion in patch
1).
Therefore, if the AON/pwrseq driver has already completed its probe, and
devm_pwrseq_get() in the GPU driver subsequently returns -EPROBE_DEFER
(because pwrseq_get found 'no match' on the bus for 'gpu-power'), the
interpretation is that the AON driver did not register this optional
sequencer. Since AON is the only anticipated source, it implies the
sequencer won't become available later from its designated provider.
I don't understand why you made this assumption. AON could be a module
and this driver built-in. AON will likely probe later.
You're absolutely right that AON could be a module and would generally
probe later in that scenario. However, the GPU device also has a
'power-domains = <&aon TH1520_GPU_PD>' dependency. If the AON driver (as
the PM domain provider) were a late probing module, the GPU driver's
probe would hit -EPROBE_DEFER when its power domain is requested
which happens before attempting to get other resources like a power
sequencer.
Huh, so basically you imply certain hardware design and certain DTS
description in your driver code. Well, that's clearly fragile design to
me, because you should not rely how hardware properties are presented in
DTS. Will work here on th1520 with this DTS, won't work with something else.
Especially that this looks like generic Imagination GPU code, common to
multiple devices, not TH1520 only specific.
So, if the GPU driver's code does reach the devm_pwrseq_get(dev,
"gpu-power") call, it strongly implies the AON driver has already
successfully probed.
This leads to the core challenge with the optional 'gpu-power'
sequencer: Even if the AON driver has already probed, if it then chooses
not to register the "gpu-power" sequence (because it's an optional
feature), pwrseq_get() will still find "no device matched" on the
pwrseq_bus and return EPROBE_DEFER.
If the GPU driver defers here, as it normally should for -EPROBE_DEFER,
it could wait indefinitely for an optional sequence that its
already probed AON provider will not supply.
Anyway I think you're right, that this is probably confusing and we
shouldn't rely on this behavior.
To solve this, and to allow the GPU driver to correctly handle
-EPROBE_DEFER when a sequencer is genuinely expected, I propose using a
boolean property on the GPU's DT node, e.g.
img,gpu-expects-power-sequencer. If the GPU node provides this property
it means the pwrseq 'gpu-power' is required.
No, that would be driver design in DTS.
I think the main problem is the pwrseq API: you should get via phandle,
not name of the pwrseq controller. That's how all producer-consumer
relationships are done in OF platforms.
It's also fragile to rely on names in case of systems with multiple
similar devices. This does not affect your platform and this hardware in
general, but shows issues with interface: imagine multiple gpus and
multiple pwr sequence devices. Which one should be obtained?
gpu-power-1? But if GPUs are the same class of devices (e.g. 2x TG1520
GPU) this is just imprecise.
Best regards,
Krzysztof
Return-Path: <linux-kernel+bounces-673162-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 82ADB41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:08:43 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 768DC189974D
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:08:55 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 25C83238C36;
Wed, 4 Jun 2025 12:08:32 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="jwIb6/Zo"
Received: from DUZPR83CU001.outbound.protection.outlook.com (mail-northeuropeazon11012011.outbound.protection.outlook.com [52.101.66.11])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5D2F61E3772;
Wed, 4 Jun 2025 12:08:28 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.66.11
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749038911; cv=fail; b=eQ7NpMNJ6ikFzldXTkzy79UUTmWb++1rU7EsFVs/VP/pHz9i4H3DX+TY3QKuPKfCG4YnfnprcQ5LAPvm5J2nhr1VO7yw1ui8GBFPNhMOZs8vEKtqajYbgeKHd2VDhv6/8D8/u5u2bj1fvGyZMEWydy+GDaffUICqRZXftf4WZgM=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749038911; c=relaxed/simple;
bh=i/iuxuOmaoPEJHULOocaHuC0pIzW55L3OGkFbU44+5Y=;
h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To:
Content-Type:MIME-Version; b=nZqcA8/rzwQU4WOZ9HMxyLEHpc8Ddj9mC0wfEnDTQsOj/bu2Lie1NlXwJxBc6Y2UNnVGml6+OzSaq/axZmBdtZK9qmqltE/NG7MHTlBbtu6gZi05+kBOTtAShFJFoNFV2g3K0q3ZC0r2rvk0wpncvaVSiE+QjMaPzlfDDYeq+Fw=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=jwIb6/Zo; arc=fail smtp.client-ip=52.101.66.11
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=VesxxYSyN2i3d1KQ7gfMThLV07FzPMoAKQAoU5cfRCerqxARJp2l7hSsHAP67NaQqUewxzCbDjwH3noJh//JYmQWVnRCLeN9RkAmwiuuPJGz9Q5WAbXka8RKwUOAlml3bKkLGv1G2KTyh2/fy/mq7y7afQb6fdnOgIU8nfPf4/+VKRwpgEnMKN/gaVX55BOI916VRG/J4NrP5dw0MqQMeNBF0Iq2/Ql8yVXJhRgC7DXweI2SvtAGdCdIvwmtbAkNr8UT84n23PI8T7XP2gJVDhfldSlcqd0Ncci9LCkJdepUA3Usp8U+6tktW+N3fGCYQkGyE7PY1BzP+gJthpXNjA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=i/iuxuOmaoPEJHULOocaHuC0pIzW55L3OGkFbU44+5Y=;
b=eJlten50TYgfSqsStgH3dwkUhdaSS1vJ/YUuvnMMv71Dxz6w6Dv+Drh9hqgkmj5gzfhee87syAeNWixJRXAcZqpeFQ3cFkPmZO3Mh5g0OSegxawdAemGhSo5pVb7eyO2T4tHAiybDCpJ6yCf/W5vJrME71Rvc7tTn7UGfjCSjBeLm2lAWNvtxVJbovvID3QSDSgMH8BapG3DeVJYPHz+FYCT3Yeud4zYwtyVqC3XRlR5+RPOR42f0RAtgC3nVJYX1mos4D/sgyGBO35IKRaqbDsKaIIO7KtQw5MRodhl9TOk3HmbRlPXPyvKXuPrfn+aLN4iMyhYmCcK0BZqOptYMw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass
header.d=nxp.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=i/iuxuOmaoPEJHULOocaHuC0pIzW55L3OGkFbU44+5Y=;
b=jwIb6/Zo4yhzmQ2yqAUT+fVy6GY5pt6tVgSHLoA1HzKjyYbjWlDZv/weOR0bft+jyVuwQ8bmyvRcfP3uL0aeuncMKCRyKBMi3B4u7KL43SHSenOOskiNGQp2kpwaAnn2SVMUD29jnUVSDV28iI/lQOyiJy9zXg2OFGpQBtE5wjBU+yUHSy1cT6TTU8Z4S+S2qw34rvN7/Os5LTwvkjp0a7tqFVdS3m7Zq+bNjF1zlvxkDxaiTSHp73y7jJpMbKdFEk0prI+PAcF/EfOvIFwaiMFP0RmFtMiIO3txRpjmVzpue0M5xZV4vsj9CB4DW23BPvDsnViXcKTEc2AFToN9qA==
Received: from PAXPR04MB8510.eurprd04.prod.outlook.com (2603:10a6:102:211::7)
by DBAPR04MB7414.eurprd04.prod.outlook.com (2603:10a6:10:1a0::16) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8813.20; Wed, 4 Jun
2025 12:08:26 +0000
Received: from PAXPR04MB8510.eurprd04.prod.outlook.com
([fe80::a7c2:e2fa:8e04:40db]) by PAXPR04MB8510.eurprd04.prod.outlook.com
([fe80::a7c2:e2fa:8e04:40db%5]) with mapi id 15.20.8813.018; Wed, 4 Jun 2025
12:08:26 +0000
From: Wei Fang <wei.fang@xxxxxxx>
To: Russell King <linux@xxxxxxxxxxxxxxx>
CC: "Abhishek Chauhan (ABC)" <quic_abchauha@xxxxxxxxxxx>, Florian Fainelli
<f.fainelli@xxxxxxxxx>, "andrew@xxxxxxx" <andrew@xxxxxxx>,
"hkallweit1@xxxxxxxxx" <hkallweit1@xxxxxxxxx>, "davem@xxxxxxxxxxxxx"
<davem@xxxxxxxxxxxxx>, "edumazet@xxxxxxxxxx" <edumazet@xxxxxxxxxx>,
"kuba@xxxxxxxxxx" <kuba@xxxxxxxxxx>, "pabeni@xxxxxxxxxx" <pabeni@xxxxxxxxxx>,
"xiaolei.wang@xxxxxxxxxxxxx" <xiaolei.wang@xxxxxxxxxxxxx>,
"netdev@xxxxxxxxxxxxxxx" <netdev@xxxxxxxxxxxxxxx>,
"linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>,
"imx@xxxxxxxxxxxxxxx" <imx@xxxxxxxxxxxxxxx>
Subject: RE: [PATCH v2 net] net: phy: clear phydev->devlink when the link is
deleted
Thread-Topic: [PATCH v2 net] net: phy: clear phydev->devlink when the link is
deleted
Thread-Index: AQHby8C/1AHS0HJUFE6a7bJae4mQobPgVKIAgBGjJoCAAG4doIAAUgsAgAA/5PA=
Date: Wed, 4 Jun 2025 12:08:26 +0000
Message-ID:
<PAXPR04MB851003DFCAA705E17F7B7117886CA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20250523083759.3741168-1-wei.fang@xxxxxxx>
<8b947cec-f559-40b4-a0e0-7a506fd89341@xxxxxxxxx>
<d696a426-40bb-4c1a-b42d-990fb690de5e@xxxxxxxxxxx>
<PAXPR04MB85107D8AB628CC9814C9B230886CA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
<aD_-xLBCswtemwee@xxxxxxxxxxxxxxxxxxxxx>
In-Reply-To: <aD_-xLBCswtemwee@xxxxxxxxxxxxxxxxxxxxx>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=nxp.com;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: PAXPR04MB8510:EE_|DBAPR04MB7414:EE_
x-ms-office365-filtering-correlation-id: 6f39651f-f820-41d3-cefd-08dda36082d9
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam:
BCL:0;ARA:13230040|366016|1800799024|7416014|376014|38070700018;
x-microsoft-antispam-message-info:
=?us-ascii?Q?FWrHYXucZ+QQ9G41hLtOpRVPM2Tr8g8FO3YCZoWdIDxyJJsNKO5NGJIC1Q2C?=
=?us-ascii?Q?HhLBXmhBiPJ22FnqzJUGXCmo9e0Iili+m5wg+IWsgnMI/fSRu086Qbe4zi27?=
=?us-ascii?Q?x5f5BQ48dPo8tUN0Zcf4VDOMeKRXCLw3T53ivLShyhY3mdfOEujGqDablJuH?=
=?us-ascii?Q?XI+Ai8Vl4rdzjNpTmKMk5pVbyh7Jj2QhcbqTDADot+O7xRi6NyPzSOKxKZNs?=
=?us-ascii?Q?NicUyiCIQj0jJSwwtrV6/EoOWAQ9FUzCezdN2G9mm9RmBP7GMW84uHUH4VGK?=
=?us-ascii?Q?kR9ff/qMSM2lkElITmxQtLUMm246gTshc1eUyzE8CdvrkQKJkhq9V0j0wlEY?=
=?us-ascii?Q?zdnwE+LHb2QEy1QfL4nArKrLg8P57CkLWHUGdvNiHebJt7GGm/6t1W3LhdoI?=
=?us-ascii?Q?LERaWoJVr93fkkXGQq0jpzB8Yq2Fc5OQVasv0ktKw1o+DrOVoWI5RTDMgd0k?=
=?us-ascii?Q?kkfmfMmatWJ2o0+1BwsQtI9jKDomPduK8cd8R/yN2WfajBnK3cft7HeNvog6?=
=?us-ascii?Q?lVFVkQlDFun7AxkOb1tgecbwKfGcCiVpLxAaj4qZGCI2StsiI8kRyhDkdkJn?=
=?us-ascii?Q?7XnuLauzQQpGfwHQOZcywiTMYolUfloeW/P99dAay/GaEWFNkJGqqXqRuusK?=
=?us-ascii?Q?JHzInabslRL5WlGCKrOw5pqKhzu0jTzcnKAJCpdVkN9nhaRpYDX+eD/NnBL2?=
=?us-ascii?Q?spuKmCeq313ZFrgH9+3QtvUpNE5J+bLBADWRuvJDbD8UJ1qTLwAoTWy4Qh2+?=
=?us-ascii?Q?577Ht+m1D2tEvIAZpkOUdBpMPy5vor6D/OlUR2nbzy8zpjRK7iJCa9+tg1G2?=
=?us-ascii?Q?m94a/luQF2ZXDNAnWQya4lfVBGLuslhCQKgzH4FhMCoGYOdnvltKWpx6FnnZ?=
=?us-ascii?Q?hk/jTp52PnoX2vP6BZT5jwl1zVi75MSQsz2jIPO38HjUvqm/okiCkp9Su6Dw?=
=?us-ascii?Q?EWa9LUfEKVJtmAKpRdXaDwcJaXzh0jJoPx2pHvKa0nzYAQMqb4Gc3xYFoXT3?=
=?us-ascii?Q?xujoGZTsOIzmq6UhiZeOcW79C9FZZ9BbeKZ4JPe9dg4sxt1f+QPybzwZisfL?=
=?us-ascii?Q?Z6Ej/wf/W7/lUIwPRKV6Y7NEPsH1sxr3CHeI97T5EVfmilUfGf358c0tr+XA?=
=?us-ascii?Q?7yCctaH5Oi1JFN5reX80+EJyWejgchZjZzqkNCNwKWRIe12Mn6mgEylZVr4W?=
=?us-ascii?Q?XeDYRm+K6Hf0R3LHqhenh1gQAsWn5EdXIAMM9QQA5seNfznNimvXSbwVK32X?=
=?us-ascii?Q?ll3FXwBQhWXsBlFNXCt5ragPqboinNnyiaMy6vX1G9xFI7QyqsoQMf2ROFuX?=
=?us-ascii?Q?I/ru1ehNL3AII4PjgOnhR+7ek7peikKAgvPhpNyXrSkIMOsxqey1QZ6d668L?=
=?us-ascii?Q?nqz11SykD30pZu5obpsv0Kurikzf++1CGxFMbhsPQYRVF9bmqIzN+9O/Cdg8?=
=?us-ascii?Q?+uI1DZ+IbGM=3D?=
x-forefront-antispam-report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB8510.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(7416014)(376014)(38070700018);DIR:OUT;SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0:
=?us-ascii?Q?4+b0swPnJSvij14Yad6Fz6cv2OR2bL438pgWXjuI6zEC4KPoT5WBdezkzg+W?=
=?us-ascii?Q?B40Tas64Y1GkdZaHKndTC31dj0MwhPGBirBnOfJ6+GDO64T7rA5tu5pDMtT7?=
=?us-ascii?Q?TaqNissGBF+IoQnEqXJFMSRBMasc/+HdUQCbOaLPqIGYWg8q7hu6eCmfTze3?=
=?us-ascii?Q?n2M1oko4yszavjHDqlz4ykox2o+HFl21m3CIfyvS1CGvL3PLeWi/TJxbBPnm?=
=?us-ascii?Q?VbbDQrYm+5CTA8oLRg5NMQQHcepJ1v0aRfIKdIiis5rFssiFzZ0CoVu3/QXc?=
=?us-ascii?Q?ykHoiuoHNJWMow21awegY7KJsg9zPgHCu5re17xgrYpmE2i1DBoaPo/uW09S?=
=?us-ascii?Q?AJfA9Tp7UrWypwUqSw+VJoOZxSXFNEWEIp8CzngfqOCw8fHqVvf6aUsV881I?=
=?us-ascii?Q?Xcsr8cEngvaoP1nLI/clJWJFkcXf6z+zCwXafvQBeny5DCCkzqbKg09bjksP?=
=?us-ascii?Q?ny7kiaSOjLAaYIYxXGVMlvnxgT0b8Ai7qkzq/n3fcD+4GuPin8FLfYZFFLyT?=
=?us-ascii?Q?mp9rqKsW2us2PfN33nJ3K6hL/RuT1Mz6saeL0eHWfZYVFKS8uXOZg1XTrKbB?=
=?us-ascii?Q?QdXkpx28HYTKSRIruYFAnmqTqas6jjZfkf8B9hhEpIggyIgUwO2UwJS3AAzr?=
=?us-ascii?Q?0EUf4siiICa7/LiX5ITkldaOCC03kaSeed8+qfWVuaQqJdYzKLgxTZfkyTuu?=
=?us-ascii?Q?NhzYxZMyRjXNEPuSvHaVATS8yLu4HZe62G6tKac98WdTPL6xBY6BajCLGzb7?=
=?us-ascii?Q?FI9QWcaUrvTJ2oy6Wt03Dojd6KMDllb7q8FDSvIIBYFbT1d9qT69lgrJz4nx?=
=?us-ascii?Q?gSEXHP1oPfmAoRZkHeW92/+0qs1qA/Jn/mLd1o6kswpMMCDW5rjYXmoHvmIp?=
=?us-ascii?Q?JzXvHrb12/g50iz8BkSF5GN+GHnqQ0un/OvUGHnWpiImzTunY6Yq3YTEsQJt?=
=?us-ascii?Q?WYweTpQhrMoMfs347D2Mm5NMtbBeeBP0rNbTlHY5fhB1VAWzpgiawvP5zuo8?=
=?us-ascii?Q?EGqTnVC1kZqepRBTQwAL/skYSwx6KkWGeKBN1bk1F3JLGy2B6cR715lfa6vJ?=
=?us-ascii?Q?o//y1o3eGsD0RODGPLY+x0QqiRlL6Mb+9fZe0Ct2EDx6f8piYuKiZqKZUHVa?=
=?us-ascii?Q?Ngj8McTgO3lWqM9OTeqW6FuVycFna29gL+2NBa+6169rf8cI+9RS8gJKPDt+?=
=?us-ascii?Q?DfQwm4+sb/c+/IzoFGlegy290c4pOcHqxwtCgl8b2gEgyXzWfW8zIpV9w+Eq?=
=?us-ascii?Q?zywG1KBjA+H0rGAPMr1+gEJ7BsBQJ9+WMaB3CDH2T6pguyrC8TAUYzXOhEkl?=
=?us-ascii?Q?3AQX9CHvW/goqGRnaxgJSF2U44Hf5eVcN/VZu3Fm6Z0XcoFxJpM6/n7QZX0e?=
=?us-ascii?Q?EofXDgMQOIXIW/JlPBlid3tmyKer7R3BkSt1+TycqAZVUakN5ru6R+Ob6OUA?=
=?us-ascii?Q?M/mGx1HXWxpLb3DEZugCpo/O+7XvXwyR/b0tiA5GqgMI26qDgu9giuChJ8Di?=
=?us-ascii?Q?m0dN8PBtPNxgkRTHMQ4QBdP7LVyuDi0lVakmieC9un6JvbSjMwk8Nnk9NTKz?=
=?us-ascii?Q?qrUWjVkQafJ29+Kkk5g=3D?=
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-OriginatorOrg: nxp.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8510.eurprd04.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 6f39651f-f820-41d3-cefd-08dda36082d9
X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jun 2025 12:08:26.3781
(UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: cr3XRPFtgtmXJMtxbmd4mVbD7F+qIROMknlk3bd6mDRGPoqPseSD9AKruPUouIdTt3T1mCHM8jWzROEoUs3cAA==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR04MB7414
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 06:00:54AM +0000, Wei Fang wrote:
> I think this issue is also introduced by the commit bc66fa87d4fd
> ("net: phy: Add link between phy dev and mac dev"). I suggested
> to change the DL_FLAG_STATELESS flag to
> DL_FLAG_AUTOREMOVE_SUPPLIER to solve this issue, so that
> the consumer (MAC controller) driver will be automatically removed
> when the link is removed. The changes are as follows.
=20
I suspect this still has problems. This is fine if the PHY device is
going away and as you say device_del() is called.
=20
However, you need to consider the case where a MAC driver attaches the
PHY during .ndo_open and releases it during .ndo_release. These will
happen multiple times.
.ndo_release? Do you mean .ndo_stop?
=20
Each time the MAC driver attaches to the PHY via .ndo_open, we will
call device_link_add(), but the device link will not be removed when
.ndo_release is called.
=20
Either device_link_add() will fail, or we will eat memory each time
the device is closed and re-opened.
Below is what I find in the kernel doc of device_link_add().
https://elixir.bootlin.com/linux/v6.15/source/drivers/base/core.c#L711
if a device link between the given @consumer and @supplier pair
exists already when this function is called for them, the existing link wil=
l
be returned regardless of its current type and status.
Therefore, it will not create new link each time the netdev is re-opened.
=20
If that is correct, then we're trading one problem for another.
=20
Return-Path: <linux-kernel+bounces-673163-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id A8E3C41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:09:06 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 29BDE1705AF
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:08:58 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id C69E028EA7E;
Wed, 4 Jun 2025 12:08:48 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="G2RlP4WX"
Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 78FF3252903
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:08:45 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.178
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749038928; cv=none; b=oxuN/lcS+1qWr0HP15nQcmBiIHDB66nc86pWVrfkDV+YZ9LsJIugnZ4qXZ9s5QSK/Z+qWe14DZMkbWEPIs+VaE/TafgQIOhptyt6HYegJQX2hU7cOSJnwyWDoGUOiPoBGIiBdfPsKRnezecjkdhRPg+khrErxFQ0mfCTN+3kpDI=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749038928; c=relaxed/simple;
bh=tB3Ex4WI5fJpbmaniueAkEOhEZ2gbuotRgFgHTCZSVQ=;
h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=CAhTAec7GdZXBTYZ2vBxMcaKL0oNyfqP5Ku8XvxlE8NhyZE09Te4F6RDbyh3TJ67VfiMWrodcOd94tX6aP8h4Ui8463S2kJ98orTwQwK6DQv1h/DdXPQH0kMVy+yFnQ9/MfAU9hPpzruSpLCj/DNHFuvIk+dQnpBA0KWoU8maKs=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=G2RlP4WX; arc=none smtp.client-ip=209.85.210.178
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org
Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-74800b81f1bso1559863b3a.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 05:08:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=linaro.org; s=google; t=1749038925; x=1749643725; darn=vger.kernel.org;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:from:to:cc:subject:date:message-id:reply-to;
bh=Nkln9+TL3dVzqnRHny1SDfLruPjSMpepjUfV+2UY4FY=;
b=G2RlP4WX/N/oRzrmNLh5wE0Ab5/oiYAK2vnVQFciTHMBJXaXHBQVdAJ8HSZ+BbSEhJ
WA77AfIFiWGzHQKlYeNtz7N5PIOyRbP5rASR7wo518lUNoq23RwbcvqIKWgNW75o22Q4
cJws1sflBnyBBvoYJ0/+rRSVaIWJlRyXS92PXyPIAH5mJkRmmsgCrH+mG2+TIqYvrMJY
YprRTV6H+pcWiLM2pi/oacKoiJDxxzr1vMiw/pjRFl6j+lYnV/3mNm2tcx1Z99oAV63n
SkmtKGce7W/DKLC80DAlSqrdnUITDUao5NpblojeMWQSdxjzRtdhT1VwQSryw+CEaxHn
vHfQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749038925; x=1749643725;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=Nkln9+TL3dVzqnRHny1SDfLruPjSMpepjUfV+2UY4FY=;
b=k+5WA0hkyOaJsYU61njvRiEBIunjXVV6YcFEpkA99GifhqVexHNBEOtL5xzBWdp1XF
p4mF1hmxavejBzk12y06U1UL6xLECv8sjw0rbFS17rPc4jLfLn+wdz4arNearEGMRSd0
JjjY3qL7RzUPBjRTKE40Q/ti4naY8jFN1WvmR7Yd3GwOranOA5rI8Be8VHWIMQcTx5Ut
L3nMc5AY7TgqkcacrrLtVi0lasvBJbaK4CCfq4Hl225X937jggYdFcQ6zk3FI98cpdMJ
5xq0I7SGlO7QknN5v4LDd2RGb+LcAvnYUs0IAZa4iXwkb2WYY41ZuI5z/8Ccuxz8Y9yq
8djA==
X-Forwarded-Encrypted: i=1; AJvYcCUCdgAi2FQ6uIhD2x/BHvCDb/K/8dD9PNaDnsnPnfDuZ0l77n5/6yj2kyoJv3CpxRRyAGYE1fcpd1u7IHE=@vger.kernel.org
X-Gm-Message-State: AOJu0YyEOrkVJapWJQrvRfoGJXc+yvcU2OZ9UQ/2eqobx98KzQXN4F+q
cUhlQlEHsENCrGta6PVT0sFNdGKDbWm2oV+owEB/RkXEGMB8i7YYiowVsH6ie+yvtQEuz74998x
dfhY=
X-Gm-Gg: ASbGncuuxudSEP/7SJWEshH8FDQZBqYfqdyYzi0mzAt4SEqx7XCrLnt6IT+9ZWScbr7
S9tvfRb3lh7pvhEvx3YxKI8hjQ2htVnaITyvyGaR9tMCd7grF1Xnd2cMFlqn9s62kmEUSEKqRVW
O/616i94cX+P2RFlj90xBeGn4IrpueH7uvGSxqHWEQkO8UGxdCAiRLI4U/9WvkWyWo8wBxXuCCP
bxCEMoIm5f95/sSZSBizKeIf+frt1b1oG1EcoyAwhw2igNrle+IAl1zZmZ7BA7RvO8lxKQ5cgDy
+U9Je54y48Rmflg6OmO8b53h0lc8SK1HhYYYpYXxTk/tbTk1Zj+/nQEFZ9pavAgu
X-Google-Smtp-Source: AGHT+IEklUjzZitqK/mgd1QYNqhN2rQnnl8mC2rRk3Ch1E2YSkU7gd9atQTFVTrlEn5riosDI1nryQ==
X-Received: by 2002:a05:6a00:238d:b0:746:2ad2:f38d with SMTP id d2e1a72fcca58-7480b401442mr3535067b3a.13.1749038924694;
Wed, 04 Jun 2025 05:08:44 -0700 (PDT)
Received: from thinkpad.. ([120.60.60.253])
by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-747affafaebsm11034942b3a.87.2025.06.04.05.08.42
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 05:08:44 -0700 (PDT)
From: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
To: bhelgaas@xxxxxxxxxx
Cc: linux-pci@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx,
linux-arm-msm@xxxxxxxxxxxxxxx,
Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
Subject: [PATCH 0/2] Update my e-mail address
Date: Wed, 4 Jun 2025 17:38:29 +0530
Message-ID: <20250604120833.32791-1-manivannan.sadhasivam@xxxxxxxxxx>
X-Mailer: git-send-email 2.43.0
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hi,
My Linaro e-mail is going to bounce soon. So update the MAINTAINERS file to use
my kernel.org alias and also add a mailmap entry to map the Linaro email to the
same.
@Bjorn H: Could you please merge this series via PCI tree?
- Mani
Manivannan Sadhasivam (2):
MAINTAINERS: Update the e-mail address of Manivannan Sadhasivam
mailmap: Add a new entry for Manivannan Sadhasivam
.mailmap | 1 +
MAINTAINERS | 38 +++++++++++++++++++-------------------
2 files changed, 20 insertions(+), 19 deletions(-)
--
2.43.0
Return-Path: <linux-kernel+bounces-673165-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id BA01241E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:09:23 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 756657A46C6
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:08:03 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 6DC0928F500;
Wed, 4 Jun 2025 12:08:52 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="XBHP5Tl6"
Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2960328ECF9
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:08:50 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.179
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749038931; cv=none; b=ibrciJr6zirIOfHUyu/mKdEOauYeMEgeb0sVPlxI2v11+p1HskVDqG0ZwQ0xtSeiSpqdKMMut4Q2jk6lcu7v5xq0pHkU82UT1mMjs/8LCGsw8g1VpsTbHqM0M7vubRW0UQCM4AmUiVKrb45AKOKm2Z/4oxh9GKWkvTvkoLmZmlY=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749038931; c=relaxed/simple;
bh=JN0Vgk9KPnL+EATlO51MQ+wdhcln9wimpUD//DwZ7Pw=;
h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version; b=GzUWuQYlxi46ePcOFXqt4q6ah9bxUQA7ocARfzGODNgO58DajaE7wHVYBNO9j5Z1idL6MBKsfr+njNk+GGUl29lK14kH6FhDuedKgGbpCev0ybUeD04qRTyRlSanSwwXEj9/EyvzWXy0Skw8QDP4mLUfUc9MqD2oiTWkjFg4SRo=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=XBHP5Tl6; arc=none smtp.client-ip=209.85.210.179
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org
Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-747fc77bb2aso1751526b3a.3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 05:08:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=linaro.org; s=google; t=1749038930; x=1749643730; darn=vger.kernel.org;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:from:to:cc:subject:date
:message-id:reply-to;
bh=63gUF31R/njodbawtioVjbMgNLq35VUnPeZiigQnoG4=;
b=XBHP5Tl62ppMUCi92qAnrBB2yXKx/oKJPBhoW1Cab3BcRBPibXkh/4nVs/8YBgLOul
u8JNgbvJlj1vJm6xyIGjCWXfAyOG2S2Splbit86SmQuikb97QYExH5dM/bwd1FXAsQIc
zQamA5y1Rljz3Q+X2DGaeFXzB99VGenVMSSwXcmumGJHdurSNFAfDipkBvp/tewDFyb2
nYvA1LUK3bpW2bjsu8JQVVU2mIYzIMSxr3ciPuzExbqQ5OqQnJlS3FiAgthIbK5TFslM
3hEXx7k+OXWOM2pw99QrOfsd0HbNenC7f6hUvmI4A6Xheu6sR36s5Gw45sf6BSMkpb8V
YtJA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749038930; x=1749643730;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=63gUF31R/njodbawtioVjbMgNLq35VUnPeZiigQnoG4=;
b=QetrbPG9cDrNL4X39IG9i2IIsNdReoDETMBZtu5y0hvhQNQnR0f7+uQIJX5Dvcw3Un
hqxSWM1rBQuxM9BZ7ufSzAW1LTi98s0sAvgIeo/6/8vxIo8eQGiBkyYHE8tFNbMiIe6Q
m6hXCVZxyX+S47j9LjWcYrJOSkeWmBVrxbrUxm3NEooDPyW1pu1Ns5WzCOBx8AXhuhdY
JZOHt7/A+yahVB9tOlZxgsulCY065DJwrw1SDwfLqx+lNCdaz10MSV7MOqtG2+xXBuVs
FKFvn7uiBgJTw+rml3a3T2Il7apR7UJUnY7VoIy9hQjau8YqWdlX1rLhFnRHZNeoP2YS
39aw==
X-Forwarded-Encrypted: i=1; AJvYcCUT3YolYnGfaV4P72aKcUuwVOVJ9CinUd+4nxhqGq3Z1i9GO2sKy8jhpNH4MWWG3GbDkijpajhyeMEd4Og=@vger.kernel.org
X-Gm-Message-State: AOJu0YxdPT/3+duPOBOIyZ8dpyI0m6PeUl724Wlo05S5sOz6LMMFcaQu
uUvxtzrk53X6gO8uEqwAB8BFfG7oZXOVjWf9x5ec4+hZRyD0Opgy/N70veFrovxVKhOBOjLaVtT
hYcM=
X-Gm-Gg: ASbGnctit/tPJlVDI8mfqV5jXA3J0BMXU7LLrvekv/67CBCLplxmM0O0DEdwp2JKAgF
GW0EB7e7VXuc9FrYqLueDi8ZAvFcxrIudjVyXwemZHA0QJjUph97uJJuRAGk6rtP5kdHgBO0Jcc
inn6i3WwnXaQ9cr/MWJHGdupSfmiLtge1JBjCDRMKACAiIZEHtZmJa9Chm4rnLjugdYHUZSzjJs
L8ZjF6x6p+deYf2epbOA/UCO1FJQZOYl6tuibeu/2UTfGsGd2LE4bIFJomnthSpt9mB3EaXYLc4
6eaBmUV7lF9gmKzn3IpVaDJMtPjTf1HMDj3rsLyTP17mYVMeodl3eNBXLPiFN+8tkU3o+xRbQhs
=
X-Google-Smtp-Source: AGHT+IEI24fmQiYs+KkyGzQenyiA9iVsVnj+bFctMQWy7u0aVJs7US/+jOggPfA1S66IRlVRaTETtA==
X-Received: by 2002:a05:6a21:1:b0:1f5:8dea:bb93 with SMTP id adf61e73a8af0-21d22a6d45dmr4274308637.7.1749038929697;
Wed, 04 Jun 2025 05:08:49 -0700 (PDT)
Received: from thinkpad.. ([120.60.60.253])
by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-747affafaebsm11034942b3a.87.2025.06.04.05.08.47
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 05:08:49 -0700 (PDT)
From: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
To: bhelgaas@xxxxxxxxxx
Cc: linux-pci@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx,
linux-arm-msm@xxxxxxxxxxxxxxx,
Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
Subject: [PATCH 2/2] mailmap: Add a new entry for Manivannan Sadhasivam
Date: Wed, 4 Jun 2025 17:38:31 +0530
Message-ID: <20250604120833.32791-3-manivannan.sadhasivam@xxxxxxxxxx>
X-Mailer: git-send-email 2.43.0
In-Reply-To: <20250604120833.32791-1-manivannan.sadhasivam@xxxxxxxxxx>
References: <20250604120833.32791-1-manivannan.sadhasivam@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Map my Linaro e-mail address is going to bounce soon. So remap it to my
kernel.org alias.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
---
.mailmap | 1 +
1 file changed, 1 insertion(+)
diff --git a/.mailmap b/.mailmap
index a885e2eefc69..1e87b388f41b 100644
--- a/.mailmap
+++ b/.mailmap
@@ -458,6 +458,7 @@ Maheshwar Ajja <quic_majja@xxxxxxxxxxx> <majja@xxxxxxxxxxxxxx>
Malathi Gottam <quic_mgottam@xxxxxxxxxxx> <mgottam@xxxxxxxxxxxxxx>
Manikanta Pubbisetty <quic_mpubbise@xxxxxxxxxxx> <mpubbise@xxxxxxxxxxxxxx>
Manivannan Sadhasivam <mani@xxxxxxxxxx> <manivannanece23@xxxxxxxxx>
+Manivannan Sadhasivam <mani@xxxxxxxxxx> <manivannan.sadhasivam@xxxxxxxxxx>
Manoj Basapathi <quic_manojbm@xxxxxxxxxxx> <manojbm@xxxxxxxxxxxxxx>
Marcin Nowakowski <marcin.nowakowski@xxxxxxxx> <marcin.nowakowski@xxxxxxxxxx>
Marc Zyngier <maz@xxxxxxxxxx> <marc.zyngier@xxxxxxx>
--
2.43.0
Return-Path: <linux-kernel+bounces-673164-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 3925241E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:09:40 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id B31A018999E3
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:09:25 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 0627F28F511;
Wed, 4 Jun 2025 12:08:51 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="DU3Ppkt2"
Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2C5B328ECCA
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:08:47 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.182
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749038930; cv=none; b=XenF5p+1zCcopAM33HNMlnmmh2AW35l4IUD49DvfPT0qZ7UbHs5dpWnhXosomWj98XkZST/IKsVkmcuc5JpOkSWNFSnUzCGZO9YyTNx4UFxFrqAATyync8QOOa/FNYDxfai1xZgcQ4XShBJ8ORBOp0a77aXkgmeJBWXrkywD/XI=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749038930; c=relaxed/simple;
bh=rGdN3v31aLv/PBCFA5XzjY0q5LLbpW30GxzwXF64bPY=;
h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version:Content-Type; b=cHLbpZ9al07mtnJLoL/VufvTEsIJSW22T9ZIoodKaZ5ShW3CKEA91dixVbYU1n7eQ36KDQPoqhi14vG9sGJWKe8OnVnq+uq0Pi2iLrdMfdRd5mBD321eAb2CsvZ7g2DDynu1Y7uJk8UsIAFzOxIzoKr1Y4RPxdYJmcItstmHtuI=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=DU3Ppkt2; arc=none smtp.client-ip=209.85.210.182
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org
Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-747abb3cd0bso667339b3a.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 05:08:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=linaro.org; s=google; t=1749038927; x=1749643727; darn=vger.kernel.org;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:from:to:cc:subject:date
:message-id:reply-to;
bh=sjYBjKWJV5CqNiGs22RjLFcCVYroLCOBOVDwOAOK6GY=;
b=DU3Ppkt2tYGUkO6u3xW4tbudYv5PhWyy1PYupqIxU4dvg1tkm16YiOU4riZ/hxB84n
MSRW7sN9zTnfCF2ptUJoMLJ6X6r8R1/Xwg6kwiT9GIsyCMFtEWBdrnuTOVFqEZtskmFG
sJKMzMfKzdHGoeh8vZPSdWNQjc2yREey0RGRCQM/MI8atp1z33pQRsC08OVkXHDlyua4
6kM4uRjgcvXnsNnz2PyKElD9PnhPIdME3wHS4Nnfxj2jtVE54uxUDx351glDcaqU1Z1G
M5EvMZcJel6wP7iparsKXc9LqXshbIeDrraKS/6nox3siuX+Kk9cp591wzamfXfNNaaX
iE2g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749038927; x=1749643727;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=sjYBjKWJV5CqNiGs22RjLFcCVYroLCOBOVDwOAOK6GY=;
b=xJxVllEBEUbyUvPRrA6ehercfBsaWnlyfQ9vUlLTB2UsHxUaAVn6cNTTZrE/D+xlp6
BQo5xUapxk167CD2FFF7zjFdzvi9zZko0qMhiCPaHb3XKkv9igU3GxURt7JYUCgtbpGs
M01Yy5EdwcIFnYNGZw41r7lbFxLq4SRz9EUrM/KBd+RNSJsisYdJKyZTQMsPlD5EU3FB
jfXKpCiNL54j1QJiYJS2HmHA44Oku3nfg5nr47wU8prE//aMfwszwj3H9gRN6SZSwOr+
DehCdrJBEE8lxQJNby6IB8fKC7hOQu6FP5PTG2k+LqiUkRv2ejoM2r1Z8O1faTHG3Cc3
AocQ==
X-Forwarded-Encrypted: i=1; AJvYcCU6WLKRqddWUtJobRwFgEhACE+JX4axra4T5awi+eLZ0/uFjS4oQ1M6TJwItYeJHMlL7UnnvPTL/YYMwB0=@vger.kernel.org
X-Gm-Message-State: AOJu0YxMRIqAiwjFhxK1gjC+C4w/+OUZg2VPwpEywA8uU8OsYwHm5YKs
dAYfzgNUZL5IVUq+fZAScHbtRfND5422l0+F0BPFu1tb91confWVdVTRTVKqAq69/w==
X-Gm-Gg: ASbGnctnwNqZUF6d7gnGpcytP+fv4HDBf/tmlNdxsJqqYjfkwLMtqxak+lGAZyu8Ilx
7mkDmsOGVS1ztwtSXbLuZ1Zyxlm58wXDNXH/oJ3fRD87socDEGLzYmYfPnhhxywcsifY6YL4I5J
8HUbvxj0+uREIu1wKvaXfiho0VIkBRAqnv8is9HSVdKxd8O8wDkV3rOD5AelLZKCmNAJoyFdoUJ
+ja7KK0qWBL/MYDDkJXgI5W8EUvDV8jkCZ1ycC3i6UDTU1lJmqqJidkHmhOZ3br/bGTC2K72ihM
WpiVC8kBPO1m5tbtIPFtMHwhtjzqPr0LZbFANNI7JRAJW8cveqdRUvW0rhkp8OY7
X-Google-Smtp-Source: AGHT+IEVOZmmV9E31mhCbC4YHgaliV2VnrEV1sOC49gAAGFgUHtXngMbCL1CKPL2LnQJ3qUWCxsoWw==
X-Received: by 2002:a05:6a21:1796:b0:21a:de8e:5c53 with SMTP id adf61e73a8af0-21d22716cbfmr4189624637.12.1749038927376;
Wed, 04 Jun 2025 05:08:47 -0700 (PDT)
Received: from thinkpad.. ([120.60.60.253])
by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-747affafaebsm11034942b3a.87.2025.06.04.05.08.45
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 05:08:46 -0700 (PDT)
From: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
To: bhelgaas@xxxxxxxxxx
Cc: linux-pci@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx,
linux-arm-msm@xxxxxxxxxxxxxxx,
Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
Subject: [PATCH 1/2] MAINTAINERS: Update the e-mail address of Manivannan Sadhasivam
Date: Wed, 4 Jun 2025 17:38:30 +0530
Message-ID: <20250604120833.32791-2-manivannan.sadhasivam@xxxxxxxxxx>
X-Mailer: git-send-email 2.43.0
In-Reply-To: <20250604120833.32791-1-manivannan.sadhasivam@xxxxxxxxxx>
References: <20250604120833.32791-1-manivannan.sadhasivam@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
My Linaro email is going to bounce soon, so switch to the kernel.org alias.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
---
MAINTAINERS | 38 +++++++++++++++++++-------------------
1 file changed, 19 insertions(+), 19 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 690e48c20fb5..f39b6fca3ab8 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2102,7 +2102,7 @@ F: arch/arm/plat-*/
ARM/ACTIONS SEMI ARCHITECTURE
M: Andreas Färber <afaerber@xxxxxxx>
-M: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
+M: Manivannan Sadhasivam <mani@xxxxxxxxxx>
L: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx (moderated for non-subscribers)
L: linux-actions@xxxxxxxxxxxxxxxxxxx (moderated for non-subscribers)
S: Maintained
@@ -2354,7 +2354,7 @@ F: arch/arm/boot/dts/intel/axm/
F: arch/arm/mach-axxia/
ARM/BITMAIN ARCHITECTURE
-M: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
+M: Manivannan Sadhasivam <mani@xxxxxxxxxx>
L: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx (moderated for non-subscribers)
S: Maintained
F: Documentation/devicetree/bindings/arm/bitmain.yaml
@@ -3022,7 +3022,7 @@ F: include/linux/soc/qcom/
F: include/soc/qcom/
ARM/RDA MICRO ARCHITECTURE
-M: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
+M: Manivannan Sadhasivam <mani@xxxxxxxxxx>
L: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx (moderated for non-subscribers)
L: linux-unisoc@xxxxxxxxxxxxxxxxxxx (moderated for non-subscribers)
S: Maintained
@@ -3725,7 +3725,7 @@ F: Documentation/admin-guide/aoe/
F: drivers/block/aoe/
ATC260X PMIC MFD DRIVER
-M: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
+M: Manivannan Sadhasivam <mani@xxxxxxxxxx>
M: Cristian Ciocaltea <cristian.ciocaltea@xxxxxxxxx>
L: linux-actions@xxxxxxxxxxxxxxxxxxx
S: Maintained
@@ -6730,7 +6730,7 @@ S: Orphan
F: drivers/mtd/nand/raw/denali*
DESIGNWARE EDMA CORE IP DRIVER
-M: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
+M: Manivannan Sadhasivam <mani@xxxxxxxxxx>
L: dmaengine@xxxxxxxxxxxxxxx
S: Maintained
F: drivers/dma/dw-edma/
@@ -8546,7 +8546,7 @@ S: Maintained
F: drivers/edac/pnd2_edac.[ch]
EDAC-QCOM
-M: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
+M: Manivannan Sadhasivam <mani@xxxxxxxxxx>
L: linux-arm-msm@xxxxxxxxxxxxxxx
L: linux-edac@xxxxxxxxxxxxxxx
S: Maintained
@@ -14702,7 +14702,7 @@ F: drivers/hid/hid-mcp2221.c
MCP251XFD SPI-CAN NETWORK DRIVER
M: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>
-M: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
+M: Manivannan Sadhasivam <mani@xxxxxxxxxx>
R: Thomas Kopp <thomas.kopp@xxxxxxxxxxxxx>
L: linux-can@xxxxxxxxxxxxxxx
S: Maintained
@@ -15849,7 +15849,7 @@ F: arch/arm64/boot/dts/marvell/armada-3720-eDPU.dts
F: arch/arm64/boot/dts/marvell/armada-3720-uDPU.*
MHI BUS
-M: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
+M: Manivannan Sadhasivam <mani@xxxxxxxxxx>
L: mhi@xxxxxxxxxxxxxxx
L: linux-arm-msm@xxxxxxxxxxxxxxx
S: Maintained
@@ -18752,7 +18752,7 @@ F: drivers/pci/controller/dwc/pci-exynos.c
PCI DRIVER FOR SYNOPSYS DESIGNWARE
M: Jingoo Han <jingoohan1@xxxxxxxxx>
-M: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
+M: Manivannan Sadhasivam <mani@xxxxxxxxxx>
L: linux-pci@xxxxxxxxxxxxxxx
S: Maintained
F: Documentation/devicetree/bindings/pci/snps,dw-pcie-ep.yaml
@@ -18787,7 +18787,7 @@ F: Documentation/devicetree/bindings/pci/xilinx-versal-cpm.yaml
F: drivers/pci/controller/pcie-xilinx-cpm.c
PCI ENDPOINT SUBSYSTEM
-M: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
+M: Manivannan Sadhasivam <mani@xxxxxxxxxx>
M: Krzysztof Wilczyński <kw@xxxxxxxxx>
R: Kishon Vijay Abraham I <kishon@xxxxxxxxxx>
L: linux-pci@xxxxxxxxxxxxxxx
@@ -18840,7 +18840,7 @@ F: drivers/pci/controller/pci-xgene-msi.c
PCI NATIVE HOST BRIDGE AND ENDPOINT DRIVERS
M: Lorenzo Pieralisi <lpieralisi@xxxxxxxxxx>
M: Krzysztof Wilczyński <kw@xxxxxxxxx>
-M: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
+M: Manivannan Sadhasivam <mani@xxxxxxxxxx>
R: Rob Herring <robh@xxxxxxxxxx>
L: linux-pci@xxxxxxxxxxxxxxx
S: Supported
@@ -18997,7 +18997,7 @@ F: Documentation/devicetree/bindings/pci/microchip*
F: drivers/pci/controller/plda/*microchip*
PCIE DRIVER FOR QUALCOMM MSM
-M: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
+M: Manivannan Sadhasivam <mani@xxxxxxxxxx>
L: linux-pci@xxxxxxxxxxxxxxx
L: linux-arm-msm@xxxxxxxxxxxxxxx
S: Maintained
@@ -19033,7 +19033,7 @@ F: Documentation/devicetree/bindings/pci/starfive,jh7110-pcie.yaml
F: drivers/pci/controller/plda/pcie-starfive.c
PCIE ENDPOINT DRIVER FOR QUALCOMM
-M: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
+M: Manivannan Sadhasivam <mani@xxxxxxxxxx>
L: linux-pci@xxxxxxxxxxxxxxx
L: linux-arm-msm@xxxxxxxxxxxxxxx
S: Maintained
@@ -20154,7 +20154,7 @@ F: drivers/iommu/arm/arm-smmu/arm-smmu-qcom*
F: drivers/iommu/msm_iommu*
QUALCOMM IPC ROUTER (QRTR) DRIVER
-M: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
+M: Manivannan Sadhasivam <mani@xxxxxxxxxx>
L: linux-arm-msm@xxxxxxxxxxxxxxx
S: Maintained
F: include/trace/events/qrtr.h
@@ -20162,7 +20162,7 @@ F: include/uapi/linux/qrtr.h
F: net/qrtr/
QUALCOMM IPCC MAILBOX DRIVER
-M: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
+M: Manivannan Sadhasivam <mani@xxxxxxxxxx>
L: linux-arm-msm@xxxxxxxxxxxxxxx
S: Supported
F: Documentation/devicetree/bindings/mailbox/qcom-ipcc.yaml
@@ -20196,7 +20196,7 @@ F: Documentation/devicetree/bindings/media/qcom,*-iris.yaml
F: drivers/media/platform/qcom/iris/
QUALCOMM NAND CONTROLLER DRIVER
-M: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
+M: Manivannan Sadhasivam <mani@xxxxxxxxxx>
L: linux-mtd@xxxxxxxxxxxxxxxxxxx
L: linux-arm-msm@xxxxxxxxxxxxxxx
S: Maintained
@@ -22731,7 +22731,7 @@ F: Documentation/devicetree/bindings/media/i2c/sony,imx283.yaml
F: drivers/media/i2c/imx283.c
SONY IMX290 SENSOR DRIVER
-M: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
+M: Manivannan Sadhasivam <mani@xxxxxxxxxx>
L: linux-media@xxxxxxxxxxxxxxx
S: Maintained
T: git git://linuxtv.org/media.git
@@ -22740,7 +22740,7 @@ F: drivers/media/i2c/imx290.c
SONY IMX296 SENSOR DRIVER
M: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
-M: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
+M: Manivannan Sadhasivam <mani@xxxxxxxxxx>
L: linux-media@xxxxxxxxxxxxxxx
S: Maintained
T: git git://linuxtv.org/media.git
@@ -25041,7 +25041,7 @@ S: Maintained
F: drivers/ufs/host/ufs-mediatek*
UNIVERSAL FLASH STORAGE HOST CONTROLLER DRIVER QUALCOMM HOOKS
-M: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
+M: Manivannan Sadhasivam <mani@xxxxxxxxxx>
L: linux-arm-msm@xxxxxxxxxxxxxxx
L: linux-scsi@xxxxxxxxxxxxxxx
S: Maintained
--
2.43.0
Return-Path: <linux-kernel+bounces-673166-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id CFD3041E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:09:43 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id DB1933A5F47
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:09:14 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 7A6A928ECD0;
Wed, 4 Jun 2025 12:08:56 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="g7EBvqMF"
Received: from TY3P286CU002.outbound.protection.outlook.com (mail-japaneastazon11010057.outbound.protection.outlook.com [52.101.229.57])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id DC88028F528;
Wed, 4 Jun 2025 12:08:52 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.229.57
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749038935; cv=fail; b=IhmdDuwMHfxamXGajhc6zK+eZEyNsL9xiy7Azh/oo5V+jcwilpf3ZFLpRK0iWcTnMIJ4IROMxFfIRy4fqR2JLSAn6zQTcP4Z/bzeMP+28h1V56JIxuuAz3FQJf/TpUznmLk0ooE3MA64JiSV21GTyeuoQ6pVDKtyaBqTeezB5Es=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749038935; c=relaxed/simple;
bh=Bre8t9jRxdtThYHoWu25f8uvgE8abhPbW9wpsqUeFEs=;
h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To:
Content-Type:MIME-Version; b=E9LuS9v/8qhuL6wxakzuw7bCV+W3O4jtoJ9oUxWUAeDPTr+b/Jf0nMruG2HW7y1TZ7WFJyzSeDSWHZFcMKUGdQKRTfKoBMewX0c6yB/UA+XRgTrHnDBP1V/B3gUcEpjrbrE2WRnyx7KK1DNmK3pPkbj+Jw4nt8gpAr1WArM1vaQ=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com; spf=pass smtp.mailfrom=renesas.com; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b=g7EBvqMF; arc=fail smtp.client-ip=52.101.229.57
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=fsY7eky3SWZ85A0u+lfhtSSgr+tEuMitEO6cVIoY4Gmc6ofiPXhQiziT3G5pGjt3eAqigoQzBEjIVBQmzISNifV/CoZHdX1rma1nQXbhvPZNuYTyKQchbiI23ekDaOncPmJgnXGwIQcID64V8ZUimfQ8+5zkKsFceDy1R0UjW3+yZ0FdyFyRYO9GoJhZJXgoAQG2eZTQuk+KYbOic77hEiwua+E3yNrSED8DAS2NxLxGkS98iV/FDQe/4KwdonaxbIMkuXQ6ER8tepxgMfsyCjDGEZPgRmw6Ericte7llCD2DOKaUbjw6AxNNCHZI02CB5cb9oNja7+X5Bnkowl1sw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=44r08ZybhomZBa6S9DuwfCEIir5yH4HiNHxrIFogplI=;
b=lCOfZROY1DbweYp5IZA+8b1XRHMX4TqNTcSJvU9ZjMybhbh0pgOqm3DVDFbyuU2AFD2kkch0R4gPKFnbrYSoEWcn/SCxLnBVaNy0qBVy1GGmmXluJJLbPH9T2TV714dzTRCLa/JFc3Jsy7WyUg5TmDu0Bg55pmN/OJj/Dv+1qv1U01G3Cjw7myNqzjA9JSZUAoJScdYc1fp6wN+2fHYPOFeM61l0SOP6yWEAzc/nsO3BlxNPbcQjttrfWBEFqUFkJD/wHk6hFEJy4ZOz8RtmERG/WtvGm21ibnjNxam+lVJate00fb1VLp9qcWamqX+rEDd1KiezDiEUu949Z6Tz+g==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com;
dkim=pass header.d=renesas.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=44r08ZybhomZBa6S9DuwfCEIir5yH4HiNHxrIFogplI=;
b=g7EBvqMF9HhNLm233urbtjOtYQJHHVENnKJEqucggzi7PdwcaCcwRA2reVAufqSiE5sV7IGy0f57Rw5flEUcaQ7JHfHas5zpIX6LwqTAJrpENCrYCbpnJpXr8DJG6Bd6WVXpGX4LAIBw1QKJl/JfhEUvQSk15L1qX1F02Wh7hNs=
Received: from OS3PR01MB8319.jpnprd01.prod.outlook.com (2603:1096:604:1a2::11)
by TYRPR01MB13829.jpnprd01.prod.outlook.com (2603:1096:405:217::12) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8769.38; Wed, 4 Jun
2025 12:08:49 +0000
Received: from OS3PR01MB8319.jpnprd01.prod.outlook.com
([fe80::3bc8:765f:f19e:16d5]) by OS3PR01MB8319.jpnprd01.prod.outlook.com
([fe80::3bc8:765f:f19e:16d5%5]) with mapi id 15.20.8813.018; Wed, 4 Jun 2025
12:08:49 +0000
From: Chris Brandt <Chris.Brandt@xxxxxxxxxxx>
To: Hugo Villeneuve <hugo@xxxxxxxxxxx>, Biju Das <biju.das.jz@xxxxxxxxxxxxxx>,
"maarten.lankhorst@xxxxxxxxxxxxxxx" <maarten.lankhorst@xxxxxxxxxxxxxxx>,
"mripard@xxxxxxxxxx" <mripard@xxxxxxxxxx>, "tzimmermann@xxxxxxx"
<tzimmermann@xxxxxxx>, "airlied@xxxxxxxxx" <airlied@xxxxxxxxx>,
"simona@xxxxxxxx" <simona@xxxxxxxx>
CC: "dri-devel@xxxxxxxxxxxxxxxxxxxxx" <dri-devel@xxxxxxxxxxxxxxxxxxxxx>,
"linux-renesas-soc@xxxxxxxxxxxxxxx" <linux-renesas-soc@xxxxxxxxxxxxxxx>,
"linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, Hugo
Villeneuve <hvilleneuve@xxxxxxxxxxxx>
Subject: RE: [PATCH v3 2/2] drm: renesas: rz-du: Set DCS maximum return packet
size
Thread-Topic: [PATCH v3 2/2] drm: renesas: rz-du: Set DCS maximum return
packet size
Thread-Index: AQHbyydYZROipDs4Mk6V13hnElvTOLPy9BEwgAAHgeA=
Date: Wed, 4 Jun 2025 12:08:49 +0000
Message-ID:
<OS3PR01MB83195CC101339CA1ECDCD6C78A6CA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20250522143911.138077-1-hugo@xxxxxxxxxxx>
<20250522143911.138077-3-hugo@xxxxxxxxxxx>
<OS3PR01MB831999C4A5A32FE11CC04A078A6CA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
In-Reply-To:
<OS3PR01MB831999C4A5A32FE11CC04A078A6CA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=renesas.com;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: OS3PR01MB8319:EE_|TYRPR01MB13829:EE_
x-ms-office365-filtering-correlation-id: 4c347552-c163-4f25-a011-08dda36090ac
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam:
BCL:0;ARA:13230040|7416014|376014|1800799024|366016|38070700018|7053199007;
x-microsoft-antispam-message-info:
=?us-ascii?Q?OjIXP0HJdwe7qUNRt4F2lNDe7ClmbcbGcO1Un21IR/Si2gthrac8ZI9LR2+N?=
=?us-ascii?Q?zD/qqc86zvfglIgOMob587tgkRJk66LZwAn1Xrzg4uX8CnMRHdcpVDhDAM/h?=
=?us-ascii?Q?khHqQkIK7boZjwhxkNO4YamZgV5VkppBWB+GhIk5l4sgrOnF06AQFOstzji4?=
=?us-ascii?Q?pAQfzBTGBnTVnWyTWN9hAXfB8mjcj7QMPdNTcCD52krTDTygIMBwdvbknyTM?=
=?us-ascii?Q?SYXIKz/oEk7kKfK68rnzmKtgBAtU0K2dWQWwBINWdBT9vsFwWnupETgd5Q/Q?=
=?us-ascii?Q?PpbwKfMCvUZANTzS33yA2JdHSR3dgzJeLKbbGyO1M206/1oTwB+X17PaEQss?=
=?us-ascii?Q?JLXulmhoI0pqQpdAzBejYluj3eKZjOCelsAdgyy0p7g1EfWaGKepxmAgU+lU?=
=?us-ascii?Q?5Ow9uw2ZujP8oUK/utrGVPkMx5xiamIHWAex8MnNxiO703nQU8ZlYDXdZB3q?=
=?us-ascii?Q?Uw12oIqd+5hFdYIXTrK0hzZeRHpSCkg60gP4tC7EpMcoZx/DHvKGsOwSPyQf?=
=?us-ascii?Q?RxAhAmAPpC16XPPcyEcQ3BxQUEiyNfYqGxLe8n7pmpHGb/S0/sScR8rh6CBN?=
=?us-ascii?Q?O6DP5kNQmMYoeUimtTqK+WwpnOlI+v18C6QO+I6ayhiv3BwHzQXu3fMK0Or8?=
=?us-ascii?Q?jiWjyMlM+dE7Uds1exy/6ZKUBuxOLPmAYJvc2FuaX0wl9OkxvN1CXZbyuq3M?=
=?us-ascii?Q?3KZUBhGS9anJU4+fQhGLNDjEoFdoySdo7YqaRYXJDim/29S/aa6cJzsG6K5r?=
=?us-ascii?Q?dv8IzK8L93G2rQ3Bf4tEl3RYxluRO1+5t2XUlRHIy0la5ovVOBoxOZoew4AS?=
=?us-ascii?Q?k7FpxLRK5qH5Jv4+G/5C5SlLCBy9zlHuqE/pKIdwzkDX5bK+KsPdANaldcqK?=
=?us-ascii?Q?khS8RoQptZmHzdcxJWwNzBnBIfkcTgOZwpn7KGKn1+ey3KaejVRwe57r+fzJ?=
=?us-ascii?Q?bS6//mPz6YVgBdajmS1upbTzDSq5+aMDgk6FZsxDq2q9JDp1vw5F1SphV/A1?=
=?us-ascii?Q?Qe7dPpMupbzF/tCmXvYNm1tKZxGslCG+L7r3EWqtJBlRG3BBtq8JPN5yicMA?=
=?us-ascii?Q?QoNZnFDlVg6p3kQzExP3V+zuScBmmrg5IEFG7WQQzM1W61Lbk7t+NwqtipQJ?=
=?us-ascii?Q?B0UbViudOlUac1hBNwDGZfr8KilZ3rw+JDHWa7V2sERSXuH8IJuJbm7bGM31?=
=?us-ascii?Q?PpITYRheXStDXpKBOMqlv5rFOJAnqDB/7tbjj6hnDc9L0Blc6FhJQtBq7dL1?=
=?us-ascii?Q?r9cYn5KaFXEh2gJkqWRQu0vEI8JIwQTVxB0fnYLx74eLs+foOv79ooFX4eoC?=
=?us-ascii?Q?dGidtWg8h4J9fJL0bqQozXHRy7Ii9tFN6VmPqAQG/Idvgopf3Et8J/hwucjy?=
=?us-ascii?Q?UAOMiQwXugUvZA+CJQm/ldiK6qDyLSuBnKaP1TZbDUJj4KALc0nWLxevmBJD?=
=?us-ascii?Q?9YO5cP++4RAeM8GV6bFlZATasNYjm6fjgk+qvrObLP+sz+pRuhXauw=3D=3D?=
x-forefront-antispam-report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS3PR01MB8319.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(376014)(1800799024)(366016)(38070700018)(7053199007);DIR:OUT;SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0:
=?us-ascii?Q?PYndG+OXqEhRQvJewDWDFjVahoaClSnLXL+Os4RS6xgdSD1PTJF1wDG4ksNG?=
=?us-ascii?Q?peAIPlLL3e5aTUVCPmyauar7VnQY1la/5v0CJ+9fudZi9ZSyOZHQw258nrRK?=
=?us-ascii?Q?m1NvJXO1EN+Vw3EGzT4wGrcFVSc1i11RwhheeNpr4WMU13YbsWdD6PKpD+Ou?=
=?us-ascii?Q?xytYwupknQNZNS901OIY0w7HhpUNrrvgBWtAJxn5qdAVbjKJ+o5Zebdrihq1?=
=?us-ascii?Q?m44Et0wJKoAm9H2o/m18LKivM1NIytpRuxzWpQ9BGcq8a2V+q0DqNG4IyTS3?=
=?us-ascii?Q?e4kQv4pkSNLsSEXB5RDNtYotZJu3Lf+dd4vq6OawNQwcRMCAMn7GdYMxQ8Rp?=
=?us-ascii?Q?sgda9qtnLvZy3raitCclB9XqXnAYP9giKoaityJR5UGeOKMllPcKX5n1Pe3L?=
=?us-ascii?Q?JLQ2ESElYipNL8BEEKqi7JgQIlK/letsa1e+sNwWTSqECiT5c+AaE5wVhus0?=
=?us-ascii?Q?g+9W7qzlgHxVqEcmglR226bekBOZkNmszLKz+txI6Pk0iVrzav6JsQAaqF8C?=
=?us-ascii?Q?tJGRu4tGlZO0g4vkwhXQ2GuPdqGumnRMTI8okh3fJMI5gUrBFUhx+F1Bx/LD?=
=?us-ascii?Q?BI3593PKGaJ5980LaNrx3mGqTltaOeS1DLcRi0j3l4wdnIByPBfEGLIOBgrG?=
=?us-ascii?Q?GtTBZ8GgBjXurq1wzwAf8Pfad9hEa9rl0DCdh3KKdWriZz/zOhHQs6l7S9w8?=
=?us-ascii?Q?gQ6HZ7yGFiKEhEGMm2dCkjKrlCMUMgTpujA7X+h+Oc1Blem9DXwVcQcXziYN?=
=?us-ascii?Q?ZN7eKHm0NvKAe98Uw7JV4BELASP+gaSaQbuyY/a0DwuhqNWNrnDgP1tNfcPi?=
=?us-ascii?Q?UOQX71hZvGHDB4Ben30lEdW/O5Rnn7S3ZmurjA12b/a+iG/DCa8PkfNz+29R?=
=?us-ascii?Q?jcK1syqEpNL4L9P6EyCkPFRosiswrNzleN5gge+OLXy4yGu8K+nR0oLftIFE?=
=?us-ascii?Q?vAsN1YZpknB5Q1v0uHVJ0i3KnaO+cs0bQ/XFrrUWdoEQrs0pdqA90bHZjayT?=
=?us-ascii?Q?lIehx+M5jRUdelmfVQyzKa31xFgZKnlSaCWw+VYmlA4gcA0HsbvFgv8kvWlo?=
=?us-ascii?Q?xktGFaZd5njYqIjG4usWAoScjFIYqirxSFnAkb1sNwaf+zFoLh+q0dPiAtjH?=
=?us-ascii?Q?U1vPWejQLInYkI8j+Ep0HxGwz8woV+qPCG2d6KLIKHcYlsATg35+Lm3tHqiy?=
=?us-ascii?Q?sBbbXZS64URs6yUoXmmuG+oNCma0wJzFZQkyKnOT/r8wfEFGyVMtFHtFykgs?=
=?us-ascii?Q?vF+02KxM08p/xnCyCMrH7SRFv8R29+zRjStsRYoANd8qIIL2RfI2L09L6Q2S?=
=?us-ascii?Q?ZzzaUJibmgmQ+usRGwPx++pTsbd0XLd6+Njc0JdqaHiYtjbfzUlYqISMXHAF?=
=?us-ascii?Q?+7btHziEmzP5sD1e94cUvTu9RsrQ4Da6SOyqwhLVy3IsH+4khGV6J53nhElD?=
=?us-ascii?Q?fjKxGdhHnRxOuXqD8GHNr5Xi17/ilbPW85RUvA614nXWU6rjRIsI6MU6sJwS?=
=?us-ascii?Q?NNRbywPMhQvv+EyzCANmec2N5uHL/s5+ZQG6tqwKe1tC1x38AGfs/f16iK8V?=
=?us-ascii?Q?pK9z8bBfhjQd6528RFXUeNNf3bfdgSCYD6RLtflO?=
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-OriginatorOrg: renesas.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8319.jpnprd01.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 4c347552-c163-4f25-a011-08dda36090ac
X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jun 2025 12:08:49.5510
(UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 53d82571-da19-47e4-9cb4-625a166a4a2a
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: YxaxF3z31x4u1NteHY5Nr+4LND1ezfJA6u6bN+8jBhQ7HtuC9jN4QBlNuwIjQXD3N+xJmiVeMobepCXS2OlyoJTBnFbrGIsXAO8xzG/bN/0=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYRPR01MB13829
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hi Hugo,
Sorry, one more thing....
+ /*
+ * The default value of 1 will result in long read commands payload
+ * not being saved to memory. Set to the DMA buffer size.
+ */
The comment is a bit wordy.
You just need to say:
/* Set read buffer size */
Or...no comment at all. It's pretty obvious what the code is doing because =
you are writing
RZG2L_DCS_BUF_SIZE to a register.
Chris
-----Original Message-----
From: Chris Brandt=20
Sent: Wednesday, June 4, 2025 7:54 AM
To: Hugo Villeneuve <hugo@xxxxxxxxxxx>; Biju Das <biju.das.jz@xxxxxxxxxxxxx=
m>; maarten.lankhorst@xxxxxxxxxxxxxxx; mripard@xxxxxxxxxx; tzimmermann@suse=
.de; airlied@xxxxxxxxx; simona@xxxxxxxx
Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx; linux-renesas-soc@xxxxxxxxxxxxxxx; lin=
ux-kernel@xxxxxxxxxxxxxxx; Hugo Villeneuve <hvilleneuve@xxxxxxxxxxxx>
Subject: RE: [PATCH v3 2/2] drm: renesas: rz-du: Set DCS maximum return pac=
ket size
Hi Hugo,
I'm fine with the code, but maybe it should go in a different location.
Since it's a register setup, it should probably go in rzg2l_mipi_dsi_startu=
p() with the others.
Additionally, since it is required to make rzg2l_mipi_dsi_host_transfer() o=
perate properly, my suggestion is to add this to your previous patch instea=
d of making it separate.
Otherwise, it's like you are submitting one patch with a known bug, then im=
mediately fixing it with a second patch.
This also would prevent the merge conflict with my patch that also modifies=
rzg2l_mipi_dsi_atomic_enable().
Chris
-----Original Message-----
From: Hugo Villeneuve <hugo@xxxxxxxxxxx>
Sent: Thursday, May 22, 2025 10:39 AM
To: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>; maarten.lankhorst@xxxxxxxxxxxxxx=
m; mripard@xxxxxxxxxx; tzimmermann@xxxxxxx; airlied@xxxxxxxxx; simona@ffwll=
.ch
Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx; linux-renesas-soc@xxxxxxxxxxxxxxx; lin=
ux-kernel@xxxxxxxxxxxxxxx; hugo@xxxxxxxxxxx; Hugo Villeneuve <hvilleneuve@d=
imonoff.com>; Chris Brandt <Chris.Brandt@xxxxxxxxxxx>
Subject: [PATCH v3 2/2] drm: renesas: rz-du: Set DCS maximum return packet =
size
From: Hugo Villeneuve <hvilleneuve@xxxxxxxxxxxx>
The default value of 1 will result in long read commands payload not being =
saved to memory.
Fix by setting this value to the DMA buffer size.
Cc: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
Cc: Chris Brandt <chris.brandt@xxxxxxxxxxx>
Signed-off-by: Hugo Villeneuve <hvilleneuve@xxxxxxxxxxxx>
---
drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c | 10 ++++++++++
drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi_regs.h | 4 ++++
2 files changed, 14 insertions(+)
diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c b/drivers/gpu/d=
rm/renesas/rz-du/rzg2l_mipi_dsi.c
index a048d473db00b..745aae63af9d8 100644
--- a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
+++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
@@ -549,6 +549,7 @@ static void rzg2l_mipi_dsi_atomic_enable(struct drm_bri=
dge *bridge,
const struct drm_display_mode *mode;
struct drm_connector *connector;
struct drm_crtc *crtc;
+ u32 value;
int ret;
=20
connector =3D drm_atomic_get_new_connector_for_encoder(state, bridge->enc=
oder); @@ -561,6 +562,15 @@ static void rzg2l_mipi_dsi_atomic_enable(struct=
drm_bridge *bridge,
=20
rzg2l_mipi_dsi_set_display_timing(dsi, mode);
=20
+ /*
+ * The default value of 1 will result in long read commands payload
+ * not being saved to memory. Set to the DMA buffer size.
+ */
+ value =3D rzg2l_mipi_dsi_link_read(dsi, DSISETR);
+ value &=3D ~DSISETR_MRPSZ;
+ value |=3D FIELD_PREP(DSISETR_MRPSZ, RZG2L_DCS_BUF_SIZE);
+ rzg2l_mipi_dsi_link_write(dsi, DSISETR, value);
+
ret =3D rzg2l_mipi_dsi_start_hs_clock(dsi);
if (ret < 0)
goto err_stop;
diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi_regs.h b/drivers/=
gpu/drm/renesas/rz-du/rzg2l_mipi_dsi_regs.h
index 0e432b04188d0..26d8a37ee6351 100644
--- a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi_regs.h
+++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi_regs.h
@@ -81,6 +81,10 @@
#define RSTSR_SWRSTLP (1 << 1)
#define RSTSR_SWRSTHS (1 << 0)
=20
+/* DSI Set Register */
+#define DSISETR 0x120
+#define DSISETR_MRPSZ GENMASK(15, 0)
+
/* Rx Result Save Slot 0 Register */
#define RXRSS0R 0x240
#define RXRSS0R_RXPKTDFAIL BIT(28)
--
2.39.5
Return-Path: <linux-kernel+bounces-673167-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 9828F41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:10:34 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id D6DE116C372
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:10:35 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 1E9BC28DF0B;
Wed, 4 Jun 2025 12:10:28 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ydSWUQ/K"
Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA38A252903
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:10:25 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.170
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749039027; cv=none; b=SqdKutWewaYf7ajJzWtSBp4czV3jl44d8ia/96+lNSAgpfIWlKFDGfcXAW5ecU2lzHr/3N+S8eVhxZ2kSzg6kv/WOtNcUw4U0goKAfsAYB9hKRWsRNefabJKkRJth5MDIXfkemDGB2JnNJGwbm2vIjGq8ImWa3RrBg/KlNXi9H8=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749039027; c=relaxed/simple;
bh=2qRhj+8PaD7KbS+ePJC+FIyfrnTKwmRG37BmkAjQGxs=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=B53c74TZDzWAJbGsjiRSQuIoyuoYOXpzt+Cj5ctzQ3NLcJgs25G/jO1jIvDolLtTqX/FWtwGX9L850ar/C1zTawTNwtEO4TmMi4SQnxCRg9kvoHU7+OTDyg9YUmnYQEi7AZnAbGAC013MQDLs2NQLmKD1GrCauVrta+KucWsGIk=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=ydSWUQ/K; arc=none smtp.client-ip=209.85.215.170
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org
Received: by mail-pg1-f170.google.com with SMTP id 41be03b00d2f7-b1fb650bdf7so3523691a12.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 05:10:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=linaro.org; s=google; t=1749039025; x=1749643825; darn=vger.kernel.org;
h=in-reply-to:content-transfer-encoding:content-disposition
:mime-version:references:message-id:subject:cc:to:from:date:from:to
:cc:subject:date:message-id:reply-to;
bh=pWB1gx1mno0s7eFeJEUn/nD76wT6cl2IYjc+kN6JYkw=;
b=ydSWUQ/KtPdi38pFMGjiNI8vQAz1YrJGjTRYBMNh3lVcpKha+82Tjs8ieW1iO4QAXG
rPsWxto21L/+D8WL+0hSrZwIZ8DOA4Ye5cjiaiasXD4i2MdYwu3KES33K3zT28/j/WMF
OvSASVFNITGd9SKvtrrqFbIqtlmQi1jkxIRGnEzq0LBs2CXIdPx4J2iPb2dKxGacN8ul
leSWL/EuTtK5bp366e/pvE3r5vC3soT7R8s5SRBUngxxRSGLgDaEqi2IMWQDly4mr3Nm
4LEkqu0KfyTcfWAGQX8Zf1zaqqUMqIMuXx954eL2+yiHMG1Q0HNU6dhY+tBWRn94K5FG
BzsA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749039025; x=1749643825;
h=in-reply-to:content-transfer-encoding:content-disposition
:mime-version:references:message-id:subject:cc:to:from:date
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=pWB1gx1mno0s7eFeJEUn/nD76wT6cl2IYjc+kN6JYkw=;
b=AaLESfLrSN8TyUTcJA6lwvldItm1geC/+zQhDvuobivmdlDkCMd8H1dCI/685KPFfp
2cVcWnVQhCM1BsgV2BfKkO4c1LiDkRCsqs7gJyFDdMQwGRZWlQWShy84c0CpRTebv+O8
lMcQu/aJR/02Zuye1GwkLp5tBCEz7zol4SeWhA+aIcckcH5gZ4FARSsnqs/ojqzT1YV9
GgxzfRssLtIxIHTa7WVC2j4Ahw5WUElHD7KjuhABfIefHSlQ0nQW+U1y/c73Z3Ve/0AA
l8ni7EUJIJY5tvqr5EWy+i40pypuqOorAhgEcKluioy+5eBlYH5lY7UzLgANpqRoZVQy
gExw==
X-Forwarded-Encrypted: i=1; AJvYcCW3sW6CEjSWj3HHmHkDuf0kjRjq7OWUvKe4wNAa28xU48QpyLh+MCWUhHcQaaqKF7y7nBX2WrfW2BdB9Qo=@vger.kernel.org
X-Gm-Message-State: AOJu0YwuT/DrwLYXjjV6wxygdCyfCWXNYOIKaqmMlt4JebD+HeU40Oqf
bmB7p3M4uOT9PwafI7oapBEtg9Nm4G7Q2Wv5O/37Ejtah8Tq4bb+AYIFe8m2+lbpQA==
X-Gm-Gg: ASbGncvUtDVf/UuPWtEMeOnoGiozjFVwFy7GDYuF3757UGnfQSsesPtWkhTQWFnUx+S
mxMSySN9mCEo3uUF1KKd0g7oR0E9x0evrCRuJXNbTWI4OGTo2fw3voX3VWHQz0EcXqTef9nLH1H
Ix9uTzN81Gn0iAYgfyKR5b00pUhi4cA8zLg4Csxid1wc1cDDuEoS4oDxHK80RdEm4E3CuJaQl0E
uUXQMG+Gm/a+GzxWji2ihaZaMvErVsnzVI20AU8naOk+6rAKaBeh2l2h2VBGHIn7T6DZOX2biRm
CWvueBxI6jdWW7/A9La3rWh7lWmP3s7tePCDNxRH5Iv99uPsThYKtIuwhW1G2g==
X-Google-Smtp-Source: AGHT+IG57XGK+U+lVqYG/JIjQeIC5Z3vtLCeEP/XJOi9Tpj75vDY8Loup1Fc3OWKbmi7pysssKLxpw==
X-Received: by 2002:a17:90b:4a10:b0:312:26d9:d5a7 with SMTP id 98e67ed59e1d1-3130cd2b40emr3886359a91.20.1749039025081;
Wed, 04 Jun 2025 05:10:25 -0700 (PDT)
Received: from thinkpad ([120.60.60.253])
by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3124e3c0db6sm9661015a91.34.2025.06.04.05.10.22
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 05:10:24 -0700 (PDT)
Date: Wed, 4 Jun 2025 17:40:20 +0530
From: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
To: bhelgaas@xxxxxxxxxx
Cc: linux-pci@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
linux-arm-msm@xxxxxxxxxxxxxxx
Subject: Re: [PATCH 2/2] mailmap: Add a new entry for Manivannan Sadhasivam
Message-ID: <ejg4ds3igm3njxfhtjx7uoh557tzh3tw2ig3srixlvlyaj5man@rs3gx46dahmk>
References: <20250604120833.32791-1-manivannan.sadhasivam@xxxxxxxxxx>
<20250604120833.32791-3-manivannan.sadhasivam@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <20250604120833.32791-3-manivannan.sadhasivam@xxxxxxxxxx>
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 05:38:31PM +0530, Manivannan Sadhasivam wrote:
Map my Linaro e-mail address is going to bounce soon. So remap it to my
Err... s/Map my/My
- Mani
kernel.org alias.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
---
.mailmap | 1 +
1 file changed, 1 insertion(+)
diff --git a/.mailmap b/.mailmap
index a885e2eefc69..1e87b388f41b 100644
--- a/.mailmap
+++ b/.mailmap
@@ -458,6 +458,7 @@ Maheshwar Ajja <quic_majja@xxxxxxxxxxx> <majja@xxxxxxxxxxxxxx>
Malathi Gottam <quic_mgottam@xxxxxxxxxxx> <mgottam@xxxxxxxxxxxxxx>
Manikanta Pubbisetty <quic_mpubbise@xxxxxxxxxxx> <mpubbise@xxxxxxxxxxxxxx>
Manivannan Sadhasivam <mani@xxxxxxxxxx> <manivannanece23@xxxxxxxxx>
+Manivannan Sadhasivam <mani@xxxxxxxxxx> <manivannan.sadhasivam@xxxxxxxxxx>
Manoj Basapathi <quic_manojbm@xxxxxxxxxxx> <manojbm@xxxxxxxxxxxxxx>
Marcin Nowakowski <marcin.nowakowski@xxxxxxxx> <marcin.nowakowski@xxxxxxxxxx>
Marc Zyngier <maz@xxxxxxxxxx> <marc.zyngier@xxxxxxx>
--
2.43.0
--
மணிவண்ணன் சதாசிவம்
Return-Path: <linux-kernel+bounces-673168-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 062BF41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:13:32 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 7D7D618815CA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:13:46 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 3AA9828EA73;
Wed, 4 Jun 2025 12:13:25 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WK5KdPxO"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 71B0922A1FA;
Wed, 4 Jun 2025 12:13:23 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749039204; cv=none; b=G+5nPR9wsnwQdr9YUzOh8Ll4jmm03qvNyJhj/rwGrSKGKU10XmZiX47a/IAH60GA/NQAaCS8li9oiUsFE34QCWPZG29DZvIxTqXOxkktv0iXG64IWxwooNhLceuwcaNilOMyfxUlPM6xy5xMy3CUSwZgiZJrgdzP50YD4O9ShhY=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749039204; c=relaxed/simple;
bh=EquEqI/Sw1dGVDT4hKR7XdeTsx/22cG1ATM29XKxML8=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=CfmTVd2VuRBLXuYzJDO/irdZVcdgQL0OvvnUmG6cYjzgTSyoq2Vecjsx+3I2WFy89cF2yeb9lI5n1HFLB87JSeCW1H4hAM+iKEEZ6Mf10rvHxTG+K2469UihguUz3SZBSgLF98vrFHYESjhzzqGSifWZy9fDldQ3ZML2kI7r3EU=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WK5KdPxO; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id E31BAC4CEE7;
Wed, 4 Jun 2025 12:13:19 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749039202;
bh=EquEqI/Sw1dGVDT4hKR7XdeTsx/22cG1ATM29XKxML8=;
h=Date:Subject:To:Cc:References:From:In-Reply-To:From;
b=WK5KdPxOcFMYtLvwAGwZ24Hd/kZhpUdmkuTCGY4hvhKDYPmeYOhLTQcGMFnRElcxP
W8tSFbehQHFX44owUojTvw/vg8dBzQLiweVTy73PfyqprF4l31yiXLySvdasZG1qzo
IsZFUqNneDh36tFJkmpvLaCjvv+QrfiqF8vmlktOmAQmYM4kEoxQSoj9jQ0b6KkmDW
J6fICGA5crfJgzVrjnllP+azAL0D9PZJXvdB0hhF6OB7j3Y6tOg0iW2alsSlx3iTCZ
sD/ptxUrOieKdv67U7PehI5C0fA9dmiAMEP9Kf43Wsd1UAtMcW2tLZCXLBk7+Ibl5k
wouiHylNszGPg==
Message-ID: <5f3c7d44-6af0-4cfa-ba56-a8948b00c7f9@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 14:13:17 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v2 2/2] reset: eswin: Add eic7700 reset driver
To: dongxuyang@xxxxxxxxxxxxxxxxxx, p.zabel@xxxxxxxxxxxxxx, robh@xxxxxxxxxx,
krzk+dt@xxxxxxxxxx, conor+dt@xxxxxxxxxx, devicetree@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
Cc: ningyu@xxxxxxxxxxxxxxxxxx, linmin@xxxxxxxxxxxxxxxxxx,
huangyifeng@xxxxxxxxxxxxxxxxxx
References: <20250604085124.2098-1-dongxuyang@xxxxxxxxxxxxxxxxxx>
<20250604085316.2211-1-dongxuyang@xxxxxxxxxxxxxxxxxx>
From: Krzysztof Kozlowski <krzk@xxxxxxxxxx>
Content-Language: en-US
Autocrypt: addr=krzk@xxxxxxxxxx; keydata=
xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79
cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu
JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH
gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE
J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj
NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS
BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU
vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM
Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD
TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzSVLcnp5c3p0b2Yg
S296bG93c2tpIDxrcnprQGtlcm5lbC5vcmc+wsGVBBMBCgA/AhsDBgsJCAcDAgYVCAIJCgsE
FgIDAQIeAQIXgBYhBJvQfg4MUfjVlne3VBuTQ307QWKbBQJoF1BKBQkWlnSaAAoJEBuTQ307
QWKbHukP/3t4tRp/bvDnxJfmNdNVn0gv9ep3L39IntPalBFwRKytqeQkzAju0whYWg+R/rwp
+r2I1Fzwt7+PTjsnMFlh1AZxGDmP5MFkzVsMnfX1lGiXhYSOMP97XL6R1QSXxaWOpGNCDaUl
ajorB0lJDcC0q3xAdwzRConxYVhlgmTrRiD8oLlSCD5baEAt5Zw17UTNDnDGmZQKR0fqLpWy
786Lm5OScb7DjEgcA2PRm17st4UQ1kF0rQHokVaotxRM74PPDB8bCsunlghJl1DRK9s1aSuN
hL1Pv9VD8b4dFNvCo7b4hfAANPU67W40AaaGZ3UAfmw+1MYyo4QuAZGKzaP2ukbdCD/DYnqi
tJy88XqWtyb4UQWKNoQqGKzlYXdKsldYqrLHGoMvj1UN9XcRtXHST/IaLn72o7j7/h/Ac5EL
8lSUVIG4TYn59NyxxAXa07Wi6zjVL1U11fTnFmE29ALYQEXKBI3KUO1A3p4sQWzU7uRmbuxn
naUmm8RbpMcOfa9JjlXCLmQ5IP7Rr5tYZUCkZz08LIfF8UMXwH7OOEX87Y++EkAB+pzKZNNd
hwoXulTAgjSy+OiaLtuCys9VdXLZ3Zy314azaCU3BoWgaMV0eAW/+gprWMXQM1lrlzvwlD/k
whyy9wGf0AEPpLssLVt9VVxNjo6BIkt6d1pMg6mHsUEVzsFNBFVDXDQBEADNkrQYSREUL4D3
Gws46JEoZ9HEQOKtkrwjrzlw/tCmqVzERRPvz2Xg8n7+HRCrgqnodIYoUh5WsU84N03KlLue
MNsWLJBvBaubYN4JuJIdRr4dS4oyF1/fQAQPHh8Thpiz0SAZFx6iWKB7Qrz3OrGCjTPcW6ei
OMheesVS5hxietSmlin+SilmIAPZHx7n242u6kdHOh+/SyLImKn/dh9RzatVpUKbv34eP1wA
GldWsRxbf3WP9pFNObSzI/Bo3kA89Xx2rO2roC+Gq4LeHvo7ptzcLcrqaHUAcZ3CgFG88CnA
6z6lBZn0WyewEcPOPdcUB2Q7D/NiUY+HDiV99rAYPJztjeTrBSTnHeSBPb+qn5ZZGQwIdUW9
YegxWKvXXHTwB5eMzo/RB6vffwqcnHDoe0q7VgzRRZJwpi6aMIXLfeWZ5Wrwaw2zldFuO4Dt
91pFzBSOIpeMtfgb/Pfe/a1WJ/GgaIRIBE+NUqckM+3zJHGmVPqJP/h2Iwv6nw8U+7Yyl6gU
BLHFTg2hYnLFJI4Xjg+AX1hHFVKmvl3VBHIsBv0oDcsQWXqY+NaFahT0lRPjYtrTa1v3tem/
JoFzZ4B0p27K+qQCF2R96hVvuEyjzBmdq2esyE6zIqftdo4MOJho8uctOiWbwNNq2U9pPWmu
4vXVFBYIGmpyNPYzRm0QPwARAQABwsF8BBgBCgAmAhsMFiEEm9B+DgxR+NWWd7dUG5NDfTtB
YpsFAmgXUF8FCRaWWyoACgkQG5NDfTtBYptO0w//dlXJs5/42hAXKsk+PDg3wyEFb4NpyA1v
qmx7SfAzk9Hf6lWwU1O6AbqNMbh6PjEwadKUk1m04S7EjdQLsj/MBSgoQtCT3MDmWUUtHZd5
RYIPnPq3WVB47GtuO6/u375tsxhtf7vt95QSYJwCB+ZUgo4T+FV4hquZ4AsRkbgavtIzQisg
Dgv76tnEv3YHV8Jn9mi/Bu0FURF+5kpdMfgo1sq6RXNQ//TVf8yFgRtTUdXxW/qHjlYURrm2
H4kutobVEIxiyu6m05q3e9eZB/TaMMNVORx+1kM3j7f0rwtEYUFzY1ygQfpcMDPl7pRYoJjB
dSsm0ZuzDaCwaxg2t8hqQJBzJCezTOIkjHUsWAK+tEbU4Z4SnNpCyM3fBqsgYdJxjyC/tWVT
AQ18NRLtPw7tK1rdcwCl0GFQHwSwk5pDpz1NH40e6lU+NcXSeiqkDDRkHlftKPV/dV+lQXiu
jWt87ecuHlpL3uuQ0ZZNWqHgZoQLXoqC2ZV5KrtKWb/jyiFX/sxSrodALf0zf+tfHv0FZWT2
zHjUqd0t4njD/UOsuIMOQn4Ig0SdivYPfZukb5cdasKJukG1NOpbW7yRNivaCnfZz6dTawXw
XRIV/KDsHQiyVxKvN73bThKhONkcX2LWuD928tAR6XMM2G5ovxLe09vuOzzfTWQDsm++9UKF a/A=
In-Reply-To: <20250604085316.2211-1-dongxuyang@xxxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 04/06/2025 10:53, dongxuyang@xxxxxxxxxxxxxxxxxx wrote:
+ .reset = eswin_reset_reset,
+ .assert = eswin_reset_assert,
+ .deassert = eswin_reset_deassert,
+};
+
+static int eswin_reset_of_xlate_lookup_id(int id, void *p, void *data)
+{
+ struct of_phandle_args *reset_spec = (struct of_phandle_args *)data;
Wrong cast. Look at the type in xlate.
+ struct eswin_reset_control *slot_control =
+ (struct eswin_reset_control *)p;
+
+ if (reset_spec->args[0] == slot_control->dev_id &&
+ reset_spec->args[1] == slot_control->reset_bit)
+ return id;
+
+ return 0;
Best regards,
Krzysztof
Return-Path: <linux-kernel+bounces-673169-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 50BA241E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:13:43 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 79C1B3A5D6D
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:13:21 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id EEE5E28ECEE;
Wed, 4 Jun 2025 12:13:31 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HVW/XwKx"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 398E422A1FA;
Wed, 4 Jun 2025 12:13:30 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749039211; cv=none; b=lFFH/daFJ5Ek0lwV759T0fjonv9xQ3wqr5kq9t75LpAHGrUEfN+Ufg6WICEfqIfv1GA9Lm/mYMcv2qNt2BplIcQvZneNJnTMM1Umd/QgI30phcNuGSpH2kJcVA5sHcMFxtkTAkWwAy1YstDduFDQIaJ1qa+v0WTyvxVE1L3wIcc=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749039211; c=relaxed/simple;
bh=EquEqI/Sw1dGVDT4hKR7XdeTsx/22cG1ATM29XKxML8=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=PiDgKasNAWmJENjdPmiErUnimH2nRyHbppCcEqN3jGIUmYMubaV0y+4puGRQ/G3Z9G1Kk83rIyEPHAHFAsqebHRhGwC5ZLWIZPAhfK9eDrnJjLjYllCZ/EWX5ibMLdqTToTVY7BmZ4atzI2g8bm08C6/bQVPFEmtWihbPz5yObY=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HVW/XwKx; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1C3F5C4CEE7;
Wed, 4 Jun 2025 12:13:27 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749039210;
bh=EquEqI/Sw1dGVDT4hKR7XdeTsx/22cG1ATM29XKxML8=;
h=Date:Subject:To:Cc:References:From:In-Reply-To:From;
b=HVW/XwKxlck8KdaqhNJU+nvqkR81OWA+hhGYVSUTqxIHcaDxDATLXxbkpneGJqOkw
j/qHguaCH+EjfSyMSZdmympYXXebKBuyLKTnYLRaM6SXXy4Sclvcc3t2kurFirETfj
QyNSk0fYFzuMq9Mcx6J4sIx+Cylp2fi+Bl0YtczAEHAXc+ERxDS8oyycKfsoOz75/h
Fxn9y2e46IOvxZF8MxY7vE0WeAEUiejV9kvU7UTfe9K10ri8avYMiRffiV421Xnh/N
fP2davWLSHBHs68BeZblKzeh9krD+AK2eunj4pQdTuKm0Bhfrb2B1zTrioyHEw9zAG
SzUROnnM13Ozg==
Message-ID: <2c92d5fd-00eb-4f11-8071-1a593a1e4328@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 14:13:26 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v2 2/2] reset: eswin: Add eic7700 reset driver
To: dongxuyang@xxxxxxxxxxxxxxxxxx, p.zabel@xxxxxxxxxxxxxx, robh@xxxxxxxxxx,
krzk+dt@xxxxxxxxxx, conor+dt@xxxxxxxxxx, devicetree@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
Cc: ningyu@xxxxxxxxxxxxxxxxxx, linmin@xxxxxxxxxxxxxxxxxx,
huangyifeng@xxxxxxxxxxxxxxxxxx
References: <20250604085124.2098-1-dongxuyang@xxxxxxxxxxxxxxxxxx>
<20250604085316.2211-1-dongxuyang@xxxxxxxxxxxxxxxxxx>
From: Krzysztof Kozlowski <krzk@xxxxxxxxxx>
Content-Language: en-US
Autocrypt: addr=krzk@xxxxxxxxxx; keydata=
xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79
cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu
JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH
gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE
J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj
NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS
BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU
vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM
Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD
TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzSVLcnp5c3p0b2Yg
S296bG93c2tpIDxrcnprQGtlcm5lbC5vcmc+wsGVBBMBCgA/AhsDBgsJCAcDAgYVCAIJCgsE
FgIDAQIeAQIXgBYhBJvQfg4MUfjVlne3VBuTQ307QWKbBQJoF1BKBQkWlnSaAAoJEBuTQ307
QWKbHukP/3t4tRp/bvDnxJfmNdNVn0gv9ep3L39IntPalBFwRKytqeQkzAju0whYWg+R/rwp
+r2I1Fzwt7+PTjsnMFlh1AZxGDmP5MFkzVsMnfX1lGiXhYSOMP97XL6R1QSXxaWOpGNCDaUl
ajorB0lJDcC0q3xAdwzRConxYVhlgmTrRiD8oLlSCD5baEAt5Zw17UTNDnDGmZQKR0fqLpWy
786Lm5OScb7DjEgcA2PRm17st4UQ1kF0rQHokVaotxRM74PPDB8bCsunlghJl1DRK9s1aSuN
hL1Pv9VD8b4dFNvCo7b4hfAANPU67W40AaaGZ3UAfmw+1MYyo4QuAZGKzaP2ukbdCD/DYnqi
tJy88XqWtyb4UQWKNoQqGKzlYXdKsldYqrLHGoMvj1UN9XcRtXHST/IaLn72o7j7/h/Ac5EL
8lSUVIG4TYn59NyxxAXa07Wi6zjVL1U11fTnFmE29ALYQEXKBI3KUO1A3p4sQWzU7uRmbuxn
naUmm8RbpMcOfa9JjlXCLmQ5IP7Rr5tYZUCkZz08LIfF8UMXwH7OOEX87Y++EkAB+pzKZNNd
hwoXulTAgjSy+OiaLtuCys9VdXLZ3Zy314azaCU3BoWgaMV0eAW/+gprWMXQM1lrlzvwlD/k
whyy9wGf0AEPpLssLVt9VVxNjo6BIkt6d1pMg6mHsUEVzsFNBFVDXDQBEADNkrQYSREUL4D3
Gws46JEoZ9HEQOKtkrwjrzlw/tCmqVzERRPvz2Xg8n7+HRCrgqnodIYoUh5WsU84N03KlLue
MNsWLJBvBaubYN4JuJIdRr4dS4oyF1/fQAQPHh8Thpiz0SAZFx6iWKB7Qrz3OrGCjTPcW6ei
OMheesVS5hxietSmlin+SilmIAPZHx7n242u6kdHOh+/SyLImKn/dh9RzatVpUKbv34eP1wA
GldWsRxbf3WP9pFNObSzI/Bo3kA89Xx2rO2roC+Gq4LeHvo7ptzcLcrqaHUAcZ3CgFG88CnA
6z6lBZn0WyewEcPOPdcUB2Q7D/NiUY+HDiV99rAYPJztjeTrBSTnHeSBPb+qn5ZZGQwIdUW9
YegxWKvXXHTwB5eMzo/RB6vffwqcnHDoe0q7VgzRRZJwpi6aMIXLfeWZ5Wrwaw2zldFuO4Dt
91pFzBSOIpeMtfgb/Pfe/a1WJ/GgaIRIBE+NUqckM+3zJHGmVPqJP/h2Iwv6nw8U+7Yyl6gU
BLHFTg2hYnLFJI4Xjg+AX1hHFVKmvl3VBHIsBv0oDcsQWXqY+NaFahT0lRPjYtrTa1v3tem/
JoFzZ4B0p27K+qQCF2R96hVvuEyjzBmdq2esyE6zIqftdo4MOJho8uctOiWbwNNq2U9pPWmu
4vXVFBYIGmpyNPYzRm0QPwARAQABwsF8BBgBCgAmAhsMFiEEm9B+DgxR+NWWd7dUG5NDfTtB
YpsFAmgXUF8FCRaWWyoACgkQG5NDfTtBYptO0w//dlXJs5/42hAXKsk+PDg3wyEFb4NpyA1v
qmx7SfAzk9Hf6lWwU1O6AbqNMbh6PjEwadKUk1m04S7EjdQLsj/MBSgoQtCT3MDmWUUtHZd5
RYIPnPq3WVB47GtuO6/u375tsxhtf7vt95QSYJwCB+ZUgo4T+FV4hquZ4AsRkbgavtIzQisg
Dgv76tnEv3YHV8Jn9mi/Bu0FURF+5kpdMfgo1sq6RXNQ//TVf8yFgRtTUdXxW/qHjlYURrm2
H4kutobVEIxiyu6m05q3e9eZB/TaMMNVORx+1kM3j7f0rwtEYUFzY1ygQfpcMDPl7pRYoJjB
dSsm0ZuzDaCwaxg2t8hqQJBzJCezTOIkjHUsWAK+tEbU4Z4SnNpCyM3fBqsgYdJxjyC/tWVT
AQ18NRLtPw7tK1rdcwCl0GFQHwSwk5pDpz1NH40e6lU+NcXSeiqkDDRkHlftKPV/dV+lQXiu
jWt87ecuHlpL3uuQ0ZZNWqHgZoQLXoqC2ZV5KrtKWb/jyiFX/sxSrodALf0zf+tfHv0FZWT2
zHjUqd0t4njD/UOsuIMOQn4Ig0SdivYPfZukb5cdasKJukG1NOpbW7yRNivaCnfZz6dTawXw
XRIV/KDsHQiyVxKvN73bThKhONkcX2LWuD928tAR6XMM2G5ovxLe09vuOzzfTWQDsm++9UKF a/A=
In-Reply-To: <20250604085316.2211-1-dongxuyang@xxxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 04/06/2025 10:53, dongxuyang@xxxxxxxxxxxxxxxxxx wrote:
+ .reset = eswin_reset_reset,
+ .assert = eswin_reset_assert,
+ .deassert = eswin_reset_deassert,
+};
+
+static int eswin_reset_of_xlate_lookup_id(int id, void *p, void *data)
+{
+ struct of_phandle_args *reset_spec = (struct of_phandle_args *)data;
Wrong cast. Look at the type in xlate.
+ struct eswin_reset_control *slot_control =
+ (struct eswin_reset_control *)p;
+
+ if (reset_spec->args[0] == slot_control->dev_id &&
+ reset_spec->args[1] == slot_control->reset_bit)
+ return id;
+
+ return 0;
Best regards,
Krzysztof
Return-Path: <linux-kernel+bounces-673170-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 6833741E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:14:01 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 3ACC27A19DD
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:12:39 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 7F26E28ECE6;
Wed, 4 Jun 2025 12:13:44 +0000 (UTC)
Received: from mail-il1-f208.google.com (mail-il1-f208.google.com [209.85.166.208])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1F83828D82F
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:13:41 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.208
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749039223; cv=none; b=Fm/KDs8R7LHC2Agw1uEjyqmZtNS6z199nICaoIMJIGr52pniVrheRRxbyCV+4c1ls/uDSIkJrfgLXndeHOjEy9aSITpebTGu1o408LvdV7XmSMxN1fZVh/dgUAeIdXfRSZ7ttch3xSwWf9SnWVWPu7hQni//LRSXTjrQwyP/mE4=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749039223; c=relaxed/simple;
bh=l/tgeUW9ZxWkBuGuZhUNYwAeSn3krAwQzrrUkzZ4wj0=;
h=MIME-Version:Date:Message-ID:Subject:From:To:Content-Type; b=fXroxaTRobhUiE+jpSQE02SfDrcentWAEPiv+ImjrzxcrypH+MmD0zu7EEpC5/gaYB6MuUSwDXrza2fqSWddYFcFmyS/YFlvs0ls8i2smJ7r2CtmQlIvtTU2vVbloiVTAemQlaztMokbl1WRmxVeU5LzbM3GIkOTcp80v4Iv5UE=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.166.208
Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com
Received: by mail-il1-f208.google.com with SMTP id e9e14a558f8ab-3ddc07eea46so4712705ab.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 05:13:41 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749039221; x=1749644021;
h=to:from:subject:message-id:date:mime-version:x-gm-message-state
:from:to:cc:subject:date:message-id:reply-to;
bh=CzajI+MYpH3SgRs9ff/pJQ6x8nBJe2DTOmSzXzu4lqg=;
b=cQnxNjq6weY8sxGzrSdlM1x43+6MQ467uYrLe5icR7yRl6Tjj5FpmhSYJHdfobYxfU
Iu/eVOkXyq5gJgVvJcc7GnFZmiXAv0EUpg3hQfj3q4sIlMZd6q4dy+AJjjGcIXgJI8IG
RmJZnbc2vnfNhEkt6Q98J/81bzGgw5JZXMSt7d/3O4PXJVPm8N3jaPKJJ3mNLj7g/yNg
eWTe9zWMiMUiNNjmsOPKb7+iO+3EJ/m863RuGRrL4uCO0vRls29omFOoTi6kTqeIoHu4
Vehtf4GsDagcVpMph0GEZDpzK15I8ZD2KDm8nU4B7QkdvM4auUID5oj9DHK16Jp6iEWG
Q0MA==
X-Forwarded-Encrypted: i=1; AJvYcCXOyTqi0oEvD/O+EVL6lgP+hEJXgd0UVnxoUgbepX78eEpVVzj6Sr7lUdL/YZfKwq12c5ONBG+SmhWwQEA=@vger.kernel.org
X-Gm-Message-State: AOJu0Yxe4tDLTq+s/yNn7ern377Ll9Dv916DCpf2bbBUhVF8VbmNlLPy
giIWHKnvpnTDkRJ1MsHfr7f4oJI4WWarhoC3PoKgVmW0AlwaJc9hb0W7NUY3xxbRXF7Cwug6Nyd
YA7HTssDYH4fMiWAzpJSVOSoauM2uyJYIDOdZ5M6a25Cu6P+YMWURKni+YhU=
X-Google-Smtp-Source: AGHT+IEGPEDHtyiuVX0WqAOQbTgWXRbowiKe0WnfH17r6Ih6V1RLgxslPgXXOvL+SoXMwK0pVeGoy4Tc3tkL8CL2X6FaMcEtNXZs
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-Received: by 2002:a05:6e02:1a87:b0:3dd:8136:a687 with SMTP id
e9e14a558f8ab-3ddbebd825emr25413805ab.8.1749039221210; Wed, 04 Jun 2025
05:13:41 -0700 (PDT)
Date: Wed, 04 Jun 2025 05:13:41 -0700
X-Google-Appengine-App-Id: s~syzkaller
X-Google-Appengine-App-Id-Alias: syzkaller
Message-ID: <68403875.a00a0220.d4325.000a.GAE@xxxxxxxxxx>
Subject: [syzbot] [cgroups?] BUG: unable to handle kernel paging request in css_rstat_flush
From: syzbot <syzbot+36ca05bdc071f7ba8f75@xxxxxxxxxxxxxxxxxxxxxxxxx>
To: cgroups@xxxxxxxxxxxxxxx, hannes@xxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
mkoutny@xxxxxxxx, syzkaller-bugs@xxxxxxxxxxxxxxxx, tj@xxxxxxxxxx
Content-Type: text/plain; charset="UTF-8"
X-Spam-Status: No, score=-3.0 required=5.0 tests=FROM_LOCAL_HEX,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hello,
syzbot found the following issue on:
HEAD commit: 4cb6c8af8591 selftests/filesystems: Fix build of anon_inod..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=17967ed4580000
kernel config: https://syzkaller.appspot.com/x/.config?x=43b7075a5c42ffca
dashboard link: https://syzkaller.appspot.com/bug?extid=36ca05bdc071f7ba8f75
compiler: Debian clang version 20.1.6 (++20250514063057+1e4d39e07757-1~exp1~20250514183223.118), Debian LLD 20.1.6
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=170d9970580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13e88c82580000
Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/d900f083ada3/non_bootable_disk-4cb6c8af.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/91b28032d866/vmlinux-4cb6c8af.xz
kernel image: https://storage.googleapis.com/syzbot-assets/7cf2a9f8c096/bzImage-4cb6c8af.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+36ca05bdc071f7ba8f75@xxxxxxxxxxxxxxxxxxxxxxxxx
BUG: unable to handle page fault for address: ffffed1011a4ca01
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 5ffcd067 P4D 5ffcd067 PUD 2fff7067 PMD 0
Oops: Oops: 0000 [#1] SMP KASAN NOPTI
CPU: 0 UID: 0 PID: 5328 Comm: kworker/0:3 Not tainted 6.15.0-syzkaller-10402-g4cb6c8af8591 #0 PREEMPT(full)
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Workqueue: cgroup_destroy css_free_rwork_fn
RIP: 0010:css_rstat_updated_list kernel/cgroup/rstat.c:284 [inline]
RIP: 0010:css_rstat_flush+0x5ff/0x1fa0 kernel/cgroup/rstat.c:413
Code: 1e 75 d1 0d 01 0f 85 e6 14 00 00 e8 1b 1e 07 00 4c 03 6c 24 20 4d 8d 7d 08 4c 89 fb 48 c1 eb 03 48 b8 00 00 00 00 00 fc ff df <80> 3c 03 00 74 08 4c 89 ff e8 e3 51 6a 00 49 83 3f 00 0f 84 5d 01
RSP: 0018:ffffc9000d68f780 EFLAGS: 00010802
RAX: dffffc0000000000 RBX: 1ffff11011a4ca01 RCX: ffff88801f4ea440
RDX: 0000000000000000 RSI: ffffffff8be266a0 RDI: ffffffff8be26660
RBP: ffffc9000d68f9b8 R08: ffffffff8fa0aaf7 R09: 1ffffffff1f4155e
R10: dffffc0000000000 R11: fffffbfff1f4155f R12: ffff88801fc42590
R13: ffff88808d265000 R14: 0000000000000000 R15: ffff88808d265008
FS: 0000000000000000(0000) GS:ffff88808d265000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffed1011a4ca01 CR3: 0000000042fe0000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
css_rstat_exit+0xa9/0x320 kernel/cgroup/rstat.c:479
css_free_rwork_fn+0x8b/0xc50 kernel/cgroup/cgroup.c:5449
process_one_work kernel/workqueue.c:3238 [inline]
process_scheduled_works+0xade/0x17b0 kernel/workqueue.c:3321
worker_thread+0x8a0/0xda0 kernel/workqueue.c:3402
kthread+0x711/0x8a0 kernel/kthread.c:464
ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
</TASK>
Modules linked in:
CR2: ffffed1011a4ca01
---[ end trace 0000000000000000 ]---
RIP: 0010:css_rstat_updated_list kernel/cgroup/rstat.c:284 [inline]
RIP: 0010:css_rstat_flush+0x5ff/0x1fa0 kernel/cgroup/rstat.c:413
Code: 1e 75 d1 0d 01 0f 85 e6 14 00 00 e8 1b 1e 07 00 4c 03 6c 24 20 4d 8d 7d 08 4c 89 fb 48 c1 eb 03 48 b8 00 00 00 00 00 fc ff df <80> 3c 03 00 74 08 4c 89 ff e8 e3 51 6a 00 49 83 3f 00 0f 84 5d 01
RSP: 0018:ffffc9000d68f780 EFLAGS: 00010802
RAX: dffffc0000000000 RBX: 1ffff11011a4ca01 RCX: ffff88801f4ea440
RDX: 0000000000000000 RSI: ffffffff8be266a0 RDI: ffffffff8be26660
RBP: ffffc9000d68f9b8 R08: ffffffff8fa0aaf7 R09: 1ffffffff1f4155e
R10: dffffc0000000000 R11: fffffbfff1f4155f R12: ffff88801fc42590
R13: ffff88808d265000 R14: 0000000000000000 R15: ffff88808d265008
FS: 0000000000000000(0000) GS:ffff88808d265000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: ffffed1011a4ca01 CR3: 0000000042fe0000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess), 5 bytes skipped:
0: 0f 85 e6 14 00 00 jne 0x14ec
6: e8 1b 1e 07 00 call 0x71e26
b: 4c 03 6c 24 20 add 0x20(%rsp),%r13
10: 4d 8d 7d 08 lea 0x8(%r13),%r15
14: 4c 89 fb mov %r15,%rbx
17: 48 c1 eb 03 shr $0x3,%rbx
1b: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
22: fc ff df
* 25: 80 3c 03 00 cmpb $0x0,(%rbx,%rax,1) <-- trapping instruction
29: 74 08 je 0x33
2b: 4c 89 ff mov %r15,%rdi
2e: e8 e3 51 6a 00 call 0x6a5216
33: 49 83 3f 00 cmpq $0x0,(%r15)
37: 0f .byte 0xf
38: 84 5d 01 test %bl,0x1(%rbp)
---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@xxxxxxxxxxxxxxxx.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup
Return-Path: <linux-kernel+bounces-673171-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 84A8A41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:14:09 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 6A92217388E
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:14:10 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 351CE1E3772;
Wed, 4 Jun 2025 12:13:54 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="P8pOBq3e"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2CC1A28ECF9
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:13:50 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749039233; cv=none; b=qL9r3jemFvh8ZoRUgZEWJg8/Bx6+Ih9730hXu1jeCRNrI+uCAS7t0+74r831MmqHCOIJfXSxm5zMdLU4FCVYopqYOh+owDVJ8zBLT7W86QhkMTRy4iWlxy9jJH3nmVR2mjYsVk6JYhaanpS6yXm6TISxm1ruFKmWEVDE24Zdvoo=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749039233; c=relaxed/simple;
bh=M91WX10OykSuts3tq0EmaMg+DxK8RsoijLDtBFghApE=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=DU+yKN/WwPbjUMv9OeLhFQf3KitfDc7V8fp4B0Tw/fRikFCF3G7RLLyao5EqHbJQRxmIXz9BaPgJuxA20mdEk1TYDsnAfib56ksb4CBLt4kc0cEK4Ut+T0HI8ndHxjSsgDOkbwLBqh6r7PQnJLxZfw4u2rkVS/rtmFM+GpsWPeE=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=P8pOBq3e; arc=none smtp.client-ip=170.10.129.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749039229;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=sGZd5jkJzXRR5Y1KNgGDi9lodbqrFlXTwmeW8YPSQr0=;
b=P8pOBq3eqD0DgTuzq99T5Txp2/VHIMHgo0JG4VDCH9OCz5RLQDShJ86BrRpvTqSJX0Q3BH
J2jzOvNWi+lz47su5upCiIhpZklpCjzZIgsIz/gdCMHCAKnDCgRR4HSlxoe2G/hQGp4azz
1NOK242S5iO7m8wHchoCOWFaDLuaZZw=
Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com
[209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-335-GMJzPkEuMai86vnFmBLHgA-1; Wed, 04 Jun 2025 08:13:48 -0400
X-MC-Unique: GMJzPkEuMai86vnFmBLHgA-1
X-Mimecast-MFC-AGG-ID: GMJzPkEuMai86vnFmBLHgA_1749039227
Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-3a4f8fd1856so2600228f8f.2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 05:13:48 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749039227; x=1749644027;
h=content-transfer-encoding:in-reply-to:organization:autocrypt
:content-language:from:references:cc:to:subject:user-agent
:mime-version:date:message-id:x-gm-message-state:from:to:cc:subject
:date:message-id:reply-to;
bh=sGZd5jkJzXRR5Y1KNgGDi9lodbqrFlXTwmeW8YPSQr0=;
b=oY5TJRKBrmsUQM7YyCZRbIob1n1zBKubVsIMOn2MzrPGB/PWihqT1Q1kMdoqaoU51w
tCUFIrdh+1TDM/GAUn/FLGaQ5NbchAP/TZ/hl5pZ3/DewF5mi2RvIvJsy74dU+aGiClR
1VxHKiYNsxlwEanB14vZSwlexrJbTqYnt+KitH1tpTXPorAX2qICADh33CNq3hbV9y9M
4FDNqyGuH6RU+SJ3r8U/4Ro0r8gAR3mr+RQtiDTc36W+JhpDsCqykxXHz/pnALTJKXEM
KX4GSG3IFCQnrFWJGh1HTH5GeGk94VHcOIHpJOtE4Tb/ZD7BYRhF3m9vtZuUeXcmryCb
xy1A==
X-Forwarded-Encrypted: i=1; AJvYcCX/Og9x7z0diZwbddNrZiMeIf4Vw0re63rGakyTs9kdl/o+1AI7Ysp9JHK2/eTOkzTMcVFeXB8xxazQGVc=@vger.kernel.org
X-Gm-Message-State: AOJu0YxOccKWDk98jmZbayEv19hfsC50fzdX7tBfrAAlGIGPhBYbF4Xh
jtQHVji98IwPHxakvWNCYT3Zc/gMCHueLUtmjCjoR/qZ3/SEsDOqwNzn9XW51x75jrm727PEXoq
QnVaVm5dlaoI1lc7YyqWBxU0+lidfyaCCWizH3NRBsl/sWlnoZ+Ma472d+w0wYzI1H2gvdiFdIg
YN
X-Gm-Gg: ASbGncvl3wjarrkoYWVOyPGaq1nzgZROfHGVGzndt5RVUIteg/CSmNsgqia08ZD2bkJ
qgCW2n0NIP3kLI8mfjrFNK2f51QAcqOZSv/jufKGgyLoIbT1Hoah8mCEaT7v2/iH/4YCijZrwIK
r17r2j4QZTlyMsophtfiIVn8qhs6bdzUUgHTqXmcHqScnYBa9TxnAkCclNTYk0vr6MzSkOHTq32
LlV5N5DmiFiImtNVXZT5vXA3ZQYwHDfWTFvCp4HO+onv+j6Sk/fVM3mb3O40IhXHv4KUKMh1naY
e1+H07BjsideDDcD3JGiKJCrK6wxWP7ZeBxr3/7lOe4g3uIPPrwl2y9SN7lbU8bLafZKUPqxBTQ
p7YL/WHvzYybgkiHRxvQFIRp4qMxXaxjqxBfn/gk=
X-Received: by 2002:a5d:5f85:0:b0:3a4:d0fe:429f with SMTP id ffacd0b85a97d-3a51d922d28mr1874003f8f.14.1749039227558;
Wed, 04 Jun 2025 05:13:47 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IEqYcUXaR9htAa65DIl0cC7t2Xtvb0tAc+5MHwkqiAmRAUKyw5KpJnBDKbemV1jQ4tddElXPQ==
X-Received: by 2002:a5d:5f85:0:b0:3a4:d0fe:429f with SMTP id ffacd0b85a97d-3a51d922d28mr1873983f8f.14.1749039227138;
Wed, 04 Jun 2025 05:13:47 -0700 (PDT)
Received: from ?IPV6:2003:d8:2f1b:b800:6fdb:1af2:4fbd:1fdf? (p200300d82f1bb8006fdb1af24fbd1fdf.dip0.t-ipconnect.de. [2003:d8:2f1b:b800:6fdb:1af2:4fbd:1fdf])
by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a4efe6c525sm21478526f8f.23.2025.06.04.05.13.46
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 05:13:46 -0700 (PDT)
Message-ID: <2129a260-3553-4cbc-a33c-fb81f0dc2d57@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 14:13:45 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH] MAINTAINERS: add tlb trace events to MMU GATHER AND TLB
INVALIDATION
To: Tal Zussman <tz2294@xxxxxxxxxxxx>, Will Deacon <will@xxxxxxxxxx>,
"Aneesh Kumar K.V" <aneesh.kumar@xxxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Nick Piggin <npiggin@xxxxxxxxx>,
Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: linux-mm@xxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
References: <20250603-tlb-maintainers-v1-1-726d193c6693@xxxxxxxxxxxx>
From: David Hildenbrand <david@xxxxxxxxxx>
Content-Language: en-US
Autocrypt: addr=david@xxxxxxxxxx; keydata=
xsFNBFXLn5EBEAC+zYvAFJxCBY9Tr1xZgcESmxVNI/0ffzE/ZQOiHJl6mGkmA1R7/uUpiCjJ
dBrn+lhhOYjjNefFQou6478faXE6o2AhmebqT4KiQoUQFV4R7y1KMEKoSyy8hQaK1umALTdL
QZLQMzNE74ap+GDK0wnacPQFpcG1AE9RMq3aeErY5tujekBS32jfC/7AnH7I0v1v1TbbK3Gp
XNeiN4QroO+5qaSr0ID2sz5jtBLRb15RMre27E1ImpaIv2Jw8NJgW0k/D1RyKCwaTsgRdwuK
Kx/Y91XuSBdz0uOyU/S8kM1+ag0wvsGlpBVxRR/xw/E8M7TEwuCZQArqqTCmkG6HGcXFT0V9
PXFNNgV5jXMQRwU0O/ztJIQqsE5LsUomE//bLwzj9IVsaQpKDqW6TAPjcdBDPLHvriq7kGjt
WhVhdl0qEYB8lkBEU7V2Yb+SYhmhpDrti9Fq1EsmhiHSkxJcGREoMK/63r9WLZYI3+4W2rAc
UucZa4OT27U5ZISjNg3Ev0rxU5UH2/pT4wJCfxwocmqaRr6UYmrtZmND89X0KigoFD/XSeVv
jwBRNjPAubK9/k5NoRrYqztM9W6sJqrH8+UWZ1Idd/DdmogJh0gNC0+N42Za9yBRURfIdKSb
B3JfpUqcWwE7vUaYrHG1nw54pLUoPG6sAA7Mehl3nd4pZUALHwARAQABzSREYXZpZCBIaWxk
ZW5icmFuZCA8ZGF2aWRAcmVkaGF0LmNvbT7CwZgEEwEIAEICGwMGCwkIBwMCBhUIAgkKCwQW
AgMBAh4BAheAAhkBFiEEG9nKrXNcTDpGDfzKTd4Q9wD/g1oFAl8Ox4kFCRKpKXgACgkQTd4Q
9wD/g1oHcA//a6Tj7SBNjFNM1iNhWUo1lxAja0lpSodSnB2g4FCZ4R61SBR4l/psBL73xktp
rDHrx4aSpwkRP6Epu6mLvhlfjmkRG4OynJ5HG1gfv7RJJfnUdUM1z5kdS8JBrOhMJS2c/gPf
wv1TGRq2XdMPnfY2o0CxRqpcLkx4vBODvJGl2mQyJF/gPepdDfcT8/PY9BJ7FL6Hrq1gnAo4
3Iv9qV0JiT2wmZciNyYQhmA1V6dyTRiQ4YAc31zOo2IM+xisPzeSHgw3ONY/XhYvfZ9r7W1l
pNQdc2G+o4Di9NPFHQQhDw3YTRR1opJaTlRDzxYxzU6ZnUUBghxt9cwUWTpfCktkMZiPSDGd
KgQBjnweV2jw9UOTxjb4LXqDjmSNkjDdQUOU69jGMUXgihvo4zhYcMX8F5gWdRtMR7DzW/YE
BgVcyxNkMIXoY1aYj6npHYiNQesQlqjU6azjbH70/SXKM5tNRplgW8TNprMDuntdvV9wNkFs
9TyM02V5aWxFfI42+aivc4KEw69SE9KXwC7FSf5wXzuTot97N9Phj/Z3+jx443jo2NR34XgF
89cct7wJMjOF7bBefo0fPPZQuIma0Zym71cP61OP/i11ahNye6HGKfxGCOcs5wW9kRQEk8P9
M/k2wt3mt/fCQnuP/mWutNPt95w9wSsUyATLmtNrwccz63XOwU0EVcufkQEQAOfX3n0g0fZz
Bgm/S2zF/kxQKCEKP8ID+Vz8sy2GpDvveBq4H2Y34XWsT1zLJdvqPI4af4ZSMxuerWjXbVWb
T6d4odQIG0fKx4F8NccDqbgHeZRNajXeeJ3R7gAzvWvQNLz4piHrO/B4tf8svmRBL0ZB5P5A
2uhdwLU3NZuK22zpNn4is87BPWF8HhY0L5fafgDMOqnf4guJVJPYNPhUFzXUbPqOKOkL8ojk
CXxkOFHAbjstSK5Ca3fKquY3rdX3DNo+EL7FvAiw1mUtS+5GeYE+RMnDCsVFm/C7kY8c2d0G
NWkB9pJM5+mnIoFNxy7YBcldYATVeOHoY4LyaUWNnAvFYWp08dHWfZo9WCiJMuTfgtH9tc75
7QanMVdPt6fDK8UUXIBLQ2TWr/sQKE9xtFuEmoQGlE1l6bGaDnnMLcYu+Asp3kDT0w4zYGsx
5r6XQVRH4+5N6eHZiaeYtFOujp5n+pjBaQK7wUUjDilPQ5QMzIuCL4YjVoylWiBNknvQWBXS
lQCWmavOT9sttGQXdPCC5ynI+1ymZC1ORZKANLnRAb0NH/UCzcsstw2TAkFnMEbo9Zu9w7Kv
AxBQXWeXhJI9XQssfrf4Gusdqx8nPEpfOqCtbbwJMATbHyqLt7/oz/5deGuwxgb65pWIzufa
N7eop7uh+6bezi+rugUI+w6DABEBAAHCwXwEGAEIACYCGwwWIQQb2cqtc1xMOkYN/MpN3hD3
AP+DWgUCXw7HsgUJEqkpoQAKCRBN3hD3AP+DWrrpD/4qS3dyVRxDcDHIlmguXjC1Q5tZTwNB
boaBTPHSy/Nksu0eY7x6HfQJ3xajVH32Ms6t1trDQmPx2iP5+7iDsb7OKAb5eOS8h+BEBDeq
3ecsQDv0fFJOA9ag5O3LLNk+3x3q7e0uo06XMaY7UHS341ozXUUI7wC7iKfoUTv03iO9El5f
XpNMx/YrIMduZ2+nd9Di7o5+KIwlb2mAB9sTNHdMrXesX8eBL6T9b+MZJk+mZuPxKNVfEQMQ
a5SxUEADIPQTPNvBewdeI80yeOCrN+Zzwy/Mrx9EPeu59Y5vSJOx/z6OUImD/GhX7Xvkt3kq
Er5KTrJz3++B6SH9pum9PuoE/k+nntJkNMmQpR4MCBaV/J9gIOPGodDKnjdng+mXliF3Ptu6
3oxc2RCyGzTlxyMwuc2U5Q7KtUNTdDe8T0uE+9b8BLMVQDDfJjqY0VVqSUwImzTDLX9S4g/8
kC4HRcclk8hpyhY2jKGluZO0awwTIMgVEzmTyBphDg/Gx7dZU1Xf8HFuE+UZ5UDHDTnwgv7E
th6RC9+WrhDNspZ9fJjKWRbveQgUFCpe1sa77LAw+XFrKmBHXp9ZVIe90RMe2tRL06BGiRZr
jPrnvUsUUsjRoRNJjKKA/REq+sAnhkNPPZ/NNMjaZ5b8Tovi8C0tmxiCHaQYqj7G2rgnT0kt
WNyWQQ==
Organization: Red Hat
In-Reply-To: <20250603-tlb-maintainers-v1-1-726d193c6693@xxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 04.06.25 00:50, Tal Zussman wrote:
The MMU GATHER AND TLB INVALIDATION entry lists other TLB-related files.
Add the tlb.h tracepoint file there as well.
Link: https://lore.kernel.org/linux-mm/ce048e11-f79d-44a6-bacc-46e1ebc34b24@xxxxxxxxxx/
Suggested-by: David Hildenbrand <david@xxxxxxxxxx>
Signed-off-by: Tal Zussman <tz2294@xxxxxxxxxxxx>
Acked-by: David Hildenbrand <david@xxxxxxxxxx>
--
Cheers,
David / dhildenb
Return-Path: <linux-kernel+bounces-673044-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 73EA441E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 05:50:10 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id B7E753A31B8
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:49:47 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id DB48228CF68;
Wed, 4 Jun 2025 09:50:01 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Ig2Owuvf"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0BC451E3772;
Wed, 4 Jun 2025 09:50:00 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749030601; cv=none; b=FJEpgikllfavLd8KOxzDAeevYWRIpEtKnbfv0zIPbFuR7XAGjnshlx2zVUEY972XuKLveNRpa1uAGNvgARxmB62LHRWfsRNQ0iJwyYmNPw1n1Hv9u6lL4uP6a5Ooys2Vt+IxUXnJLw0I1Jwg0vzCNjaQU9fpE0Tk5rsW9WUCOT0=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749030601; c=relaxed/simple;
bh=Ab424E9k28t4IDBrmxzZpiv39b/KLWE7lhSswN4XFJ0=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=UD8lhii3n3PYd85uRkge722gBa94sLe5sH3nXzm/IN3k+QAYwLBPBccbMzCDPZabtQcMRAGqbvHZG1//aSI1c1Cb9V2IwNVPcQz+RlEn9pUe2+oSO+Ino4XckEXVVLCwzWW7/gW6GPs0FwV4AlKeMaP6UMaOUM1Q+y+gOGpvTi8=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Ig2Owuvf; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9DC7AC4CEE7;
Wed, 4 Jun 2025 09:49:57 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749030600;
bh=Ab424E9k28t4IDBrmxzZpiv39b/KLWE7lhSswN4XFJ0=;
h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
b=Ig2Owuvfk1TYotGhEXFMRgP7tIhEPMEP8zhQituOqKBsNEWNJ3JmRw/dOcKRd8KCC
hmtstscqscz2CND9P4MWh0aysetXK6HmrZBtHwz5DIBwZOBbvtGMYH3+99qcC8sRjx
VG1e/6UqOIlPY0GxyUGp+GlcXkkgLQeUmgY8KUfiHdQrxOcTi/cZ7Z36tT1S8L5Dvi
sSezxPBIpJJAAU6hNRZ9LyxeSzb2qGi9pjx1EwfiZHQ4HI01GOM0uSGaP079DtZTGg
VP7J8jgZ0j40VuAoBH4oG4Qs5+AWJ6JTqrfGxTAVQL7akPvOtM75IZp8pAsvJ/LG2Y
31hajWnW/fwOw==
Date: Wed, 4 Jun 2025 11:49:54 +0200
From: Danilo Krummrich <dakr@xxxxxxxxxx>
To: Boqun Feng <boqun.feng@xxxxxxxxx>
Cc: gregkh@xxxxxxxxxxxxxxxxxxx, rafael@xxxxxxxxxx, ojeda@xxxxxxxxxx,
alex.gaynor@xxxxxxxxx, gary@xxxxxxxxxxx, bjorn3_gh@xxxxxxxxxxxxxx,
benno.lossin@xxxxxxxxx, a.hindborg@xxxxxxxxxx, aliceryhl@xxxxxxxxxx,
tmgross@xxxxxxxxx, chrisi.schrefl@xxxxxxxxx,
rust-for-linux@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
Subject: Re: [PATCH 3/3] rust: devres: fix race in Devres::drop()
Message-ID: <aEAWwnyP4zwwrccX@pollux>
References: <20250603205416.49281-1-dakr@xxxxxxxxxx>
<20250603205416.49281-4-dakr@xxxxxxxxxx>
<aD-EiRChuScS5TK-@tardis.local>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <aD-EiRChuScS5TK-@tardis.local>
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Tue, Jun 03, 2025 at 04:26:01PM -0700, Boqun Feng wrote:
On Tue, Jun 03, 2025 at 10:48:52PM +0200, Danilo Krummrich wrote:
> In Devres::drop() we first remove the devres action and then drop the
> wrapped device resource.
>
> The design goal is to give the owner of a Devres object control over when
> the device resource is dropped, but limit the overall scope to the
> corresponding device being bound to a driver.
>
> However, there's a race that was introduced with commit 8ff656643d30
> ("rust: devres: remove action in `Devres::drop`"), but also has been
> (partially) present from the initial version on.
>
> In Devres::drop(), the devres action is removed successfully and
> subsequently the destructor of the wrapped device resource runs.
> However, there is no guarantee that the destructor of the wrapped device
> resource completes before the driver core is done unbinding the
> corresponding device.
>
> If in Devres::drop(), the devres action can't be removed, it means that
> the devres callback has been executed already, or is still running
> concurrently. In case of the latter, either Devres::drop() wins revoking
> the Revocable or the devres callback wins revoking the Revocable. If
> Devres::drop() wins, we (again) have no guarantee that the destructor of
> the wrapped device resource completes before the driver core is done
> unbinding the corresponding device.
>
> Depending on the specific device resource, this can potentially lead to
> user-after-free bugs.
>
This all sounds reasonable, one question though: it seems to me the
problem exists only for the device resources that expect the device
being bounded, so hypothetically if the device resources can be
programmed against unbound devices, then the current behavior should be
fine?
I don't think that such device resources exist from a semantical point of view.
We always have to guarantee that a driver released the device resources once the
corresponding device is unbound from the driver.
However, there certainly are differences between how fatal it is if we don't do
so.
Complementing your example below, if we for instance fail to release a memory
region in time, a subsequent driver probing the device may fail requesting the
corresponding region.
For example, in your case, you want free_irq() to happen before
the device becomes unbound, which is of course reasonable, but it sounds
more like a design choice (or what device model we want to use), because
hypothetically you can program an irq that still works even if the
device is unbound, no?
You can, just like for every other registration (e.g. class devices, such as
misc device), but it's sub-optimal, since then we could not treat the
registering device of the registration as &Device<Bound>, which allows direct
access to device resources with Devres::access(). Please see also [1] and [2].
We have two (safe and correct) ways to access device resources, one is the
runtime checked access through Revocable::try_access() (which implies the RCU
read-side critical section and atomic check); the other one is the compile-time
checked access through providing a &Device<Bound> as cookie for directy access
without runtime overhead.
Wherever possible, we want to enable the latter, which means that registrations
need to be properly guarded.
[1] https://lore.kernel.org/lkml/20250530142447.166524-6-dakr@xxxxxxxxxx/
[2] https://lore.kernel.org/lkml/20250530142447.166524-7-dakr@xxxxxxxxxx/
Again this sounds reasonable to me, just want to check my understanding
here.
Regards,
Boqun
> In order to fix this, implement the following logic.
>
> In the devres callback, we're always good when we get to revoke the
> device resource ourselves, i.e. Revocable::revoke() returns true.
>
> If Revocable::revoke() returns false, it means that Devres::drop(),
> concurrently, already drops the device resource and we have to wait for
> Devres::drop() to signal that it finished dropping the device resource.
>
> Note that if we hit the case where we need to wait for the completion of
> Devres::drop() in the devres callback, it means that we're actually
> racing with a concurrent Devres::drop() call, which already started
> revoking the device resource for us. This is rather unlikely and means
> that the concurrent Devres::drop() already started doing our work and we
> just need to wait for it to complete it for us. Hence, there should not
> be any additional overhead from that.
>
> (Actually, for now it's even better if Devres::drop() does the work for
> us, since it can bypass the synchronize_rcu() call implied by
> Revocable::revoke(), but this goes away anyways once I get to implement
> the split devres callback approach, which allows us to first flip the
> atomics of all registered Devres objects of a certain device, execute a
> single synchronize_rcu() and then drop all revocable objects.)
>
> In Devres::drop() we try to revoke the device resource. If that is *not*
> successful, it means that the devres callback already did and we're good.
>
> Otherwise, we try to remove the devres action, which, if successful,
> means that we're good, since the device resource has just been revoked
> by us *before* we removed the devres action successfully.
>
> If the devres action could not be removed, it means that the devres
> callback must be running concurrently, hence we signal that the device
> resource has been revoked by us, using the completion.
>
> This makes it safe to drop a Devres object from any task and at any point
> of time, which is one of the design goals.
>
[...]
Return-Path: <linux-kernel+bounces-673045-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id E7C3841E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 05:51:34 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 4C327188A38A
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:51:48 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 5A57E28C871;
Wed, 4 Jun 2025 09:51:28 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="a80LNb0G"
Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id CD9E41F4C8C
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:51:25 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.7
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749030687; cv=none; b=EvUiII54jIJoadpc+MK6kIqdy0+Aw0vA2CVpa5rc3uNCqfg3vFUhR7jQeqlB3yhNCIypRFYda//QmarWUGUm/bWcI2tZAWjWEFj/IaThQ5soSOGuigl4p8pdg6wezjj0v5YkRdzeqBuMPlk6L3OqmozUg1LsbDObEvZoXZlIp2Y=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749030687; c=relaxed/simple;
bh=Ho1O+9wmQfoTB7KOV0bWDiX8dWlZiNJ3mNiwerX/VZ8=;
h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ulfL8nVH2aBGDGub9wT6wiZdr6PbX1lbrKadCP9bpqd3vTaIgS+MuJP6Oh+m+7uTbl26DwKV4g6kDZGz3ggCLuuo47Hrf8JCDnYprO3QxwkfatnUNeZvWkSZwFZDemWYBsr40nxFWYbT495ggmRGH0081rMDSzuZfZRp0Uk4NFk=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.helo=mgamail.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=a80LNb0G; arc=none smtp.client-ip=192.198.163.7
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com
Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.helo=mgamail.intel.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
t=1749030686; x=1780566686;
h=from:to:cc:subject:date:message-id:mime-version:
content-transfer-encoding;
bh=Ho1O+9wmQfoTB7KOV0bWDiX8dWlZiNJ3mNiwerX/VZ8=;
b=a80LNb0G+f3KrcB72pCZz2JZhf7MJCZwecD2q37kKzO5YxZInNhMTiZ3
MKbIhGTpEs5UJqiC/4UNBcCihhxIRBF7f2uN1JvsNftVc0/IOOWYZpEKA
0JpkPecgVtqdvkHSc4zLT6hFQ50Z0XngY8F5YmSFMEyWtX2Hwar4XUej2
e18xRiuRwV1awpmf+1VGgdJoxxfxeTQfAgZP4nBhcTUYlBwcxX0T217GV
4R4DplR0ukXnlQyPcvk4Gzf0+WV1Q69EQPlZ8FDYvj/v7TEi2oGeLpL98
dz6a9bu31NpoBi+AvFqwbTh8nAF6zA7gDhv775yTSQ9PaZcKvIGCohEdT
g==;
X-CSE-ConnectionGUID: iGjqdfxxTa+ab+P2NM+c1w==
X-CSE-MsgGUID: 09fRNl7DQMySbRrDYqVu0Q==
X-IronPort-AV: E=McAfee;i="6700,10204,11453"; a="76489249"
X-IronPort-AV: E=Sophos;i="6.16,208,1744095600";
d="scan'208";a="76489249"
Received: from orviesa009.jf.intel.com ([10.64.159.149])
by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 02:51:25 -0700
X-CSE-ConnectionGUID: GiUBNCIJQEabWNIMVq834Q==
X-CSE-MsgGUID: 0O7V5tS/QjCNCdTs7jLdPg==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.16,208,1744095600";
d="scan'208";a="145157138"
Received: from black.fi.intel.com ([10.237.72.28])
by orviesa009.jf.intel.com with ESMTP; 04 Jun 2025 02:51:21 -0700
Received: by black.fi.intel.com (Postfix, from userid 1000)
id F0ED63D8; Wed, 04 Jun 2025 12:51:19 +0300 (EEST)
From: "Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx>
To: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
David Hildenbrand <david@xxxxxxxxxx>
Cc: lorenzo.stoakes@xxxxxxxxxx,
Liam.Howlett@xxxxxxxxxx,
vbabka@xxxxxxx,
rppt@xxxxxxxxxx,
surenb@xxxxxxxxxx,
mhocko@xxxxxxxx,
hannes@xxxxxxxxxxx,
shakeel.butt@xxxxxxxxx,
muchun.song@xxxxxxxxx,
linux-mm@xxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx,
"Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx>,
Randy Dunlap <rdunlap@xxxxxxxxxxxxx>,
Konstantin Khlebnikov <koct9i@xxxxxxxxx>
Subject: [PATCH] mm/vmstat: Fix build with MEMCG=y and VM_EVENT_COUNTERS=n
Date: Wed, 4 Jun 2025 12:51:11 +0300
Message-ID: <20250604095111.533783-1-kirill.shutemov@xxxxxxxxxxxxxxx>
X-Mailer: git-send-email 2.47.2
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
When compiling with MEMCG enabled but VM_EVENT_COUNTERS disabled,
BUILD_BUG_ON() is triggered in vmstat_start because the vmstat_text
array is larger than NR_VMSTAT_ITEMS.
This issue arises because some elements of the vmstat_text array are
present when either MEMCG or VM_EVENT_COUNTERS is enabled, but
NR_VMSTAT_ITEMS only accounts for these elements if VM_EVENT_COUNTERS is
enabled.
The recent change in the BUILD_BUG_ON() check made it more strict,
disallowing extra elements in the array, which revealed the issue.
Instead of adjusting the NR_VMSTAT_ITEMS definition to account for
MEMCG, make MEMCG select VM_EVENT_COUNTERS. VM_EVENT_COUNTERS is
enabled in most configurations anyway.
There is no need to backport this fix to stable trees. Without the
strict BUILD_BUG_ON(), the issue is not harmful. The elements in
question would only be read by the memcg code, not by /proc/vmstat.
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>
Reported-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Fixes: ebc5d83d0443 ("mm/memcontrol: use vmstat names for printing statistics")
Cc: Konstantin Khlebnikov <koct9i@xxxxxxxxx>
---
include/linux/vmstat.h | 4 ++--
init/Kconfig | 1 +
mm/vmstat.c | 4 ++--
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h
index b2ccb6845595..c287998908bf 100644
--- a/include/linux/vmstat.h
+++ b/include/linux/vmstat.h
@@ -507,7 +507,7 @@ static inline const char *lru_list_name(enum lru_list lru)
return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
}
-#if defined(CONFIG_VM_EVENT_COUNTERS) || defined(CONFIG_MEMCG)
+#if defined(CONFIG_VM_EVENT_COUNTERS)
static inline const char *vm_event_name(enum vm_event_item item)
{
return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
@@ -516,7 +516,7 @@ static inline const char *vm_event_name(enum vm_event_item item)
NR_VM_STAT_ITEMS +
item];
}
-#endif /* CONFIG_VM_EVENT_COUNTERS || CONFIG_MEMCG */
+#endif /* CONFIG_VM_EVENT_COUNTERS */
#ifdef CONFIG_MEMCG
diff --git a/init/Kconfig b/init/Kconfig
index ab83abe0fd9d..dd332cac6036 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -989,6 +989,7 @@ config MEMCG
select PAGE_COUNTER
select EVENTFD
select SLAB_OBJ_EXT
+ select VM_EVENT_COUNTERS
help
Provides control over the memory footprint of tasks in a cgroup.
diff --git a/mm/vmstat.c b/mm/vmstat.c
index 27dc37168cfd..c3114b8826e4 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -1301,7 +1301,7 @@ const char * const vmstat_text[] = {
[I(NR_MEMMAP_BOOT_PAGES)] = "nr_memmap_boot_pages",
#undef I
-#if defined(CONFIG_VM_EVENT_COUNTERS) || defined(CONFIG_MEMCG)
+#if defined(CONFIG_VM_EVENT_COUNTERS)
/* enum vm_event_item counters */
#define I(x) (NR_VM_ZONE_STAT_ITEMS + NR_VM_NUMA_EVENT_ITEMS + \
NR_VM_NODE_STAT_ITEMS + NR_VM_STAT_ITEMS + x)
@@ -1498,7 +1498,7 @@ const char * const vmstat_text[] = {
#endif
#endif
#undef I
-#endif /* CONFIG_VM_EVENT_COUNTERS || CONFIG_MEMCG */
+#endif /* CONFIG_VM_EVENT_COUNTERS */
};
#endif /* CONFIG_PROC_FS || CONFIG_SYSFS || CONFIG_NUMA || CONFIG_MEMCG */
--
2.47.2
Return-Path: <linux-kernel+bounces-673046-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 317C641E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 05:52:58 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 9622A188ADD1
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:53:11 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 4437628C872;
Wed, 4 Jun 2025 09:52:51 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="ImtRb+zp"
Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id CCC7123817A
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:52:46 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.24
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749030770; cv=none; b=N7EHLG4m5wcIhaNAEut7rcxEid5qQ5n1zSzuwX4kKtYuJvLp7X3MRVKjSW/l73nhYJCyt48HzaVyvLGKlJ5W+PtDIJ644J2Pm3TT4OGVUmzIV5d7KckAzXrtlrmNNBz488SYy8TuKdEbHKodFRAmM68EBWx08c6qYsAFIA1EBys=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749030770; c=relaxed/simple;
bh=5CUfTXSZL28fjRaCIudb0p1svpbj3kaP7AIJ7fQDE0M=;
h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type:
References; b=tT8KtHStMKVffc7akt9lpQ2frwFtCWXfGnfeGvgAEDwWR2+BAygCSIX/1jgO4BJqauD74Vb6SaIlcTiB6UzLu4XtaDzWoqrtxeQf0wJ0HBHp7TkSxYvyNimc7gOF1JpEFAVbLu4Hlaxp1jA+SSNyo5L5dsOuL2PxgB3VEW+GzRA=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=ImtRb+zp; arc=none smtp.client-ip=203.254.224.24
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com
Received: from epcas2p2.samsung.com (unknown [182.195.41.54])
by mailout1.samsung.com (KnoxPortal) with ESMTP id 20250604095244epoutp018816ec6e455f3d76e74242448d46247d~FzjauxIS51454014540epoutp01V
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:52:44 +0000 (GMT)
DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20250604095244epoutp018816ec6e455f3d76e74242448d46247d~FzjauxIS51454014540epoutp01V
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com;
s=mail20170921; t=1749030764;
bh=U1e46riN5AgpP+BOTQu5flAeRIz4W1sPhNu7S+rH/Xc=;
h=From:To:Cc:Subject:Date:References:From;
b=ImtRb+zpcTMnsRvuuzyfk526/bW3kQ2JGKPv1K68ZjiQfP9ijKsgYMyhYY/xP+Zja
p+vfBn2xmL1OcA/NxgRmDLlBcBYHlLmf5bgrj9JHsdM3MSYQdwNEAq4YMu1XcnqPtR
MPlodIS0MMYSqMTVXEOIUi5BKmQztnWCV8CHVSEg=
Received: from epsnrtp03.localdomain (unknown [182.195.42.155]) by
epcas2p2.samsung.com (KnoxPortal) with ESMTPS id
20250604095244epcas2p2f47d4a9682f3931646c1fc0d7b5af49f~FzjaQ3bMI0398503985epcas2p2P;
Wed, 4 Jun 2025 09:52:44 +0000 (GMT)
Received: from epcas2p1.samsung.com (unknown [182.195.36.97]) by
epsnrtp03.localdomain (Postfix) with ESMTP id 4bC2tz2pn2z3hhTC; Wed, 4 Jun
2025 09:52:43 +0000 (GMT)
Received: from epsmtip2.samsung.com (unknown [182.195.34.31]) by
epcas2p1.samsung.com (KnoxPortal) with ESMTPA id
20250604095242epcas2p17032a1133b03be2d24c8ebcff94d1d55~FzjZMA2Cy0178901789epcas2p1N;
Wed, 4 Jun 2025 09:52:42 +0000 (GMT)
Received: from localhost.localdomain (unknown [10.229.95.142]) by
epsmtip2.samsung.com (KnoxPortal) with ESMTPA id
20250604095242epsmtip255f2c31e21b6ff74081e2097b3e4fd75~FzjZGKufv3057430574epsmtip2z;
Wed, 4 Jun 2025 09:52:42 +0000 (GMT)
From: Hyesoo Yu <hyesoo.yu@xxxxxxxxxxx>
To:
Cc: janghyuck.kim@xxxxxxxxxxx, zhaoyang.huang@xxxxxxxxxx,
jaewon31.kim@xxxxxxxxx, david@xxxxxxxxxx, Hyesoo Yu <hyesoo.yu@xxxxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Jason Gunthorpe <jgg@xxxxxxxx>,
John Hubbard <jhubbard@xxxxxxxxxx>, Peter Xu <peterx@xxxxxxxxxx>,
linux-mm@xxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
Subject: [PATCH] mm: gup: fail migration when no migratable page to prevent
CMA pinning
Date: Wed, 4 Jun 2025 18:50:46 +0900
Message-ID: <20250604095049.4052078-1-hyesoo.yu@xxxxxxxxxxx>
X-Mailer: git-send-email 2.49.0
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-CMS-MailID: 20250604095242epcas2p17032a1133b03be2d24c8ebcff94d1d55
X-Msg-Generator: CA
Content-Type: text/plain; charset="utf-8"
X-Sendblock-Type: AUTO_CONFIDENTIAL
CMS-TYPE: 102P
cpgsPolicy: CPGSC10-234,Y
X-CFilter-Loop: Reflected
X-CMS-RootMailID: 20250604095242epcas2p17032a1133b03be2d24c8ebcff94d1d55
References: <CGME20250604095242epcas2p17032a1133b03be2d24c8ebcff94d1d55@xxxxxxxxxxxxxxxxxxxx>
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Commit 1aaf8c122918 ("mm: gup: fix infinite loop within __get_longterm_locked")
caused CMA pages to become pinned in some cases when handling longterm GUP.
This happened because migration would return success immediately if no pages
were in the movable_page_list, without retrying.
However, CMA pages can be temporarily off the LRU (e.g., in pagevecs), and
therefore not appear in movable_page_list, even though they can be migrated
later. Before commit 1aaf8c, the kernel would retry migration in such cases,
which helped avoid accidental CMA pinning.
The commit 1aaf8c aimed to support an out-of-tree use case (like pKVM), where
longterm GUP was applied to non-LRU CMA pages. But allowing CMA pinning
in general for this corner case could lead to more fragmentation and
reliability issues. So this patch prevents that.
Instead of retrying, this patch explicitly fails the migration attempt
(-EBUSY) if no movable pages are found and unpinnable pages remain.
This avoids infinite loops and gives user a clear signal to retry,
rather then spinning inside kernel.
Fixes: 1aaf8c122918 ("mm: gup: fix infinite loop within __get_longterm_locked")
Signed-off-by: Hyesoo Yu <hyesoo.yu@xxxxxxxxxxx>
---
mm/gup.c | 49 ++++++++++++++++++++++++++-----------------------
1 file changed, 26 insertions(+), 23 deletions(-)
diff --git a/mm/gup.c b/mm/gup.c
index e065a49842a8..446938aedcc9 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -2303,12 +2303,13 @@ static void pofs_unpin(struct pages_or_folios *pofs)
/*
* Returns the number of collected folios. Return value is always >= 0.
*/
-static void collect_longterm_unpinnable_folios(
+static bool collect_longterm_unpinnable_folios(
struct list_head *movable_folio_list,
struct pages_or_folios *pofs)
{
struct folio *prev_folio = NULL;
bool drain_allow = true;
+ bool any_unpinnable = false;
unsigned long i;
for (i = 0; i < pofs->nr_entries; i++) {
@@ -2321,6 +2322,8 @@ static void collect_longterm_unpinnable_folios(
if (folio_is_longterm_pinnable(folio))
continue;
+ any_unpinnable = true;
+
if (folio_is_device_coherent(folio))
continue;
@@ -2342,6 +2345,8 @@ static void collect_longterm_unpinnable_folios(
NR_ISOLATED_ANON + folio_is_file_lru(folio),
folio_nr_pages(folio));
}
+
+ return any_unpinnable;
}
/*
@@ -2353,8 +2358,13 @@ static int
migrate_longterm_unpinnable_folios(struct list_head *movable_folio_list,
struct pages_or_folios *pofs)
{
- int ret;
+ int ret = -EAGAIN;
unsigned long i;
+ struct migration_target_control mtc = {
+ .nid = NUMA_NO_NODE,
+ .gfp_mask = GFP_USER | __GFP_NOWARN,
+ .reason = MR_LONGTERM_PIN,
+ };
for (i = 0; i < pofs->nr_entries; i++) {
struct folio *folio = pofs_get_folio(pofs, i);
@@ -2370,6 +2380,7 @@ migrate_longterm_unpinnable_folios(struct list_head *movable_folio_list,
gup_put_folio(folio, 1, FOLL_PIN);
if (migrate_device_coherent_folio(folio)) {
+ pofs_unpin(pofs);
ret = -EBUSY;
goto err;
}
@@ -2388,27 +2399,11 @@ migrate_longterm_unpinnable_folios(struct list_head *movable_folio_list,
pofs_clear_entry(pofs, i);
}
- if (!list_empty(movable_folio_list)) {
- struct migration_target_control mtc = {
- .nid = NUMA_NO_NODE,
- .gfp_mask = GFP_USER | __GFP_NOWARN,
- .reason = MR_LONGTERM_PIN,
- };
-
- if (migrate_pages(movable_folio_list, alloc_migration_target,
- NULL, (unsigned long)&mtc, MIGRATE_SYNC,
- MR_LONGTERM_PIN, NULL)) {
- ret = -ENOMEM;
- goto err;
- }
- }
-
- putback_movable_pages(movable_folio_list);
-
- return -EAGAIN;
+ if (migrate_pages(movable_folio_list, alloc_migration_target, NULL,
+ (unsigned long)&mtc, MIGRATE_SYNC, MR_LONGTERM_PIN, NULL))
+ ret = -ENOMEM;
err:
- pofs_unpin(pofs);
putback_movable_pages(movable_folio_list);
return ret;
@@ -2417,11 +2412,19 @@ migrate_longterm_unpinnable_folios(struct list_head *movable_folio_list,
static long
check_and_migrate_movable_pages_or_folios(struct pages_or_folios *pofs)
{
+ bool any_unpinnable;
+
LIST_HEAD(movable_folio_list);
- collect_longterm_unpinnable_folios(&movable_folio_list, pofs);
- if (list_empty(&movable_folio_list))
+ any_unpinnable = collect_longterm_unpinnable_folios(&movable_folio_list, pofs);
+
+ if (list_empty(&movable_folio_list)) {
+ if (any_unpinnable) {
+ pofs_unpin(pofs);
+ return -EBUSY;
+ }
return 0;
+ }
return migrate_longterm_unpinnable_folios(&movable_folio_list, pofs);
}
--
2.49.0
Return-Path: <linux-kernel+bounces-673047-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 97FFB41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 05:53:10 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 9CFD9188B145
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:53:23 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 851E428C872;
Wed, 4 Jun 2025 09:52:57 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=shutemov.name header.i=@shutemov.name header.b="U5Ri+8Du";
dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="GAmZDAai"
Received: from fout-a2-smtp.messagingengine.com (fout-a2-smtp.messagingengine.com [103.168.172.145])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id C62BD28D82D;
Wed, 4 Jun 2025 09:52:53 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.145
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749030776; cv=none; b=p96lE9fDOoIln55wSYYZRZwIc4MLvLuL65lgymKbnH+FTxyjNqJ31A+N8bN6CKOrA7ZIyVdX8IAXgZZJGGSNSREhJMEojLMOTbwyQFRbiS5ST2kGoPzkWGyk1aSgM74UssQUViNmXYhYqFqhVYcPe8jVo7HhWSBP7iGIRDP4qPM=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749030776; c=relaxed/simple;
bh=FY4lEHOq4x+pB4JWAVKPgcTAiQFWbIjedrLUyx6+ODY=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=AN9YKC1qFtUFI+kDUjXvMonXcfZEPI4M/eL/+NAFG5+0pplpBSmgHyajmCqffzImY2KBTF1W2UCLE4Aesf6DR1fbx9J/9MSw6hcRfvR0IPIVLhutLdbfY2p5JCuf0WZXiMhf6wb2/drcOU2Axg3I4nczoPWc8i1v/nakWrBxN0w=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=shutemov.name; spf=pass smtp.mailfrom=shutemov.name; dkim=pass (2048-bit key) header.d=shutemov.name header.i=@shutemov.name header.b=U5Ri+8Du; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=GAmZDAai; arc=none smtp.client-ip=103.168.172.145
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=shutemov.name
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=shutemov.name
Received: from phl-compute-06.internal (phl-compute-06.phl.internal [10.202.2.46])
by mailfout.phl.internal (Postfix) with ESMTP id 9D80613803EE;
Wed, 4 Jun 2025 05:52:52 -0400 (EDT)
Received: from phl-mailfrontend-01 ([10.202.2.162])
by phl-compute-06.internal (MEProxy); Wed, 04 Jun 2025 05:52:52 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov.name;
h=cc:cc:content-type:content-type:date:date:from:from
:in-reply-to:in-reply-to:message-id:mime-version:references
:reply-to:subject:subject:to:to; s=fm2; t=1749030772; x=
1749117172; bh=aiJtCPKpRcL2bfmmYmjB2wpik8z8vrsqCPOjOzw+OeQ=; b=U
5Ri+8DuZXmm8NGJIW8TexHnIR4yO9MYM+Zel2nVwinYiRQG3J9PaAwemJ+yd1DTx
bAso26nf/kh/FrceA9Z7/Y/eKODtIsWaw+x6vLtcvTZDJ6F6SWnSFlXls9+RryEk
66wpn7z/uGYUtk6FwdoH/m1y/7vYm5XCzNU5NhIM/nIDeCECOYY0oFnohV9Xrwi7
xke9+KbyLbpKDRoa6BhcXL6hVtbMPp35BbX8QVKYNIj7umkr38pZv9TW7+WErv7c
oxsNMzOTtYtdgW/NMB5falGzKIswpVed3EydOFUsU2R2jrlcS4NwLu2uC7SLFBPL
U9qL1fK4wQntq7kdiJGbA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
messagingengine.com; h=cc:cc:content-type:content-type:date:date
:feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
:message-id:mime-version:references:reply-to:subject:subject:to
:to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=
1749030772; x=1749117172; bh=aiJtCPKpRcL2bfmmYmjB2wpik8z8vrsqCPO
jOzw+OeQ=; b=GAmZDAaiRjRNltwJRdDysP9aJJidmC0apJNijsO1Ao4Z44dOPdI
rHiG7RbbmS+raxcyK2PRw/O4dNy7RE0gDGF07TS6bSLszlmQO/DfJKeVfrUmTqJV
5vc4A5Z28bFklPJ7oI/3ShTCSuAFHwt1gMcOBVhDVtZVb49AmyZlkzrCHZgKZ1d2
v8wB5jrF/fn+PWPSl07V3/bgSuQOGm/GNmflhFZ6P3rIuDvzMUVPy0HJh52NN8WL
12cQAI5fCXc/uO7u8OjjV2sgo8lfCwFqOuRQiGV0xitmeMpxo57H1KIhwm/buAqA
dJJh3BKNa+o+wjKjE+8fC83lvCZTH00kWsw==
X-ME-Sender: <xms:cxdAaPyvX204P6dEPrfO30VKD_FRM82FeLQyKNonuaSTP-AWe2Zfiw>
<xme:cxdAaHRyIJbbqBrlgUUuTeJKWhDaydneJL5NHdXI2Lx9ghboy-jdvPhEnKrueNLix
WVZ1az7BaUAdoZ8pR8>
X-ME-Received: <xmr:cxdAaJVL9SS0fVTj2lTio-oP36JEIctVG4j4pUf0l95u_msIhHZD-uV2Y7CVrz09XNnFXA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddugdduleduucetufdoteggodetrfdotf
fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu
rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh
htshculddquddttddmnecujfgurhepfffhvfevuffkfhggtggujgesthdtsfdttddtvden
ucfhrhhomhepfdfmihhrihhllhcutedrucfuhhhuthgvmhhovhdfuceokhhirhhilhhlse
hshhhuthgvmhhovhdrnhgrmhgvqeenucggtffrrghtthgvrhhnpeeltedugedtgfehuddu
hfetleeiuedvtdehieejjedufeejfeegteetuddtgefgudenucffohhmrghinhepkhgvrh
hnvghlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhf
rhhomhepkhhirhhilhhlsehshhhuthgvmhhovhdrnhgrmhgvpdhnsggprhgtphhtthhope
ejpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehrughunhhlrghpsehinhhfrhgr
uggvrggurdhorhhgpdhrtghpthhtohepshhfrhestggrnhgsrdgruhhughdrohhrghdrrg
hupdhrtghpthhtoheplhhinhhugidqnhgvgihtsehvghgvrhdrkhgvrhhnvghlrdhorhhg
pdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorh
hgpdhrtghpthhtoheprghkphhmsehlihhnuhigqdhfohhunhgurghtihhonhdrohhrghdp
rhgtphhtthhopehlihhnuhigqdhmmheskhhvrggtkhdrohhrghdprhgtphhtthhopehkih
hrihhllhdrshhhuhhtvghmohhvsehlihhnuhigrdhinhhtvghlrdgtohhm
X-ME-Proxy: <xmx:cxdAaJh4mEaDFMprfp1TxyERANo72przNlqsBG0IG-AeIPtzH7eBhA>
<xmx:cxdAaBCtp0P67Jw-sfHqcAYWZaqkkx8KPJmTOBYZVEHP1Y5BenXkEQ>
<xmx:cxdAaCKsh1_beOXyXTwdIclYi6IVGAvMfnrb5etMcuipfNefr08QHw>
<xmx:cxdAaABoYC_07BEEqzThTbKgsS6jg9edYU7kd2-5SuvD5Z1h5OtQ5w>
<xmx:dBdAaMHrCZDqpTI_xNvSrYxboUUX7fJau88azRjwK8f1poKGj49gD83P>
Feedback-ID: ie3994620:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
4 Jun 2025 05:52:48 -0400 (EDT)
Date: Wed, 4 Jun 2025 12:52:45 +0300
From: "Kirill A. Shutemov" <kirill@xxxxxxxxxxxxx>
To: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Cc: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>,
Linux Next Mailing List <linux-next@xxxxxxxxxxxxxxx>, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Linux Memory Management List <linux-mm@xxxxxxxxx>,
"Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx>
Subject: Re: linux-next: Tree for Jun 4 (mm/vmstat.c)
Message-ID: <zg6ql34habvml3lwr2pq4fl3aibmbf54ezkee5taj2r75qqlbq@x5uqfrveeafl>
References: <20250604140235.2f14220f@xxxxxxxxxxxxxxxx>
<fc028557-648b-4dca-bd46-96cd4d2fbac0@xxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <fc028557-648b-4dca-bd46-96cd4d2fbac0@xxxxxxxxxxxxx>
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 01:16:40AM -0700, Randy Dunlap wrote:
On 6/3/25 9:02 PM, Stephen Rothwell wrote:
> Hi all,
>
> Please do not add any material destined for v6.17 to you rlinux-next
> included branches until after v6.16-rc1 has been released.
>
> Changes since 20250603:
>
on x86_64:
../mm/vmstat.c: In function 'vmstat_start':
./../include/linux/compiler_types.h:568:45: error: call to '__compiletime_assert_436' declared with attribute error: BUILD_BUG_ON failed: ARRAY_SIZE(vmstat_text) != NR_VMSTAT_ITEMS
568 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^
./../include/linux/compiler_types.h:549:25: note: in definition of macro '__compiletime_assert'
549 | prefix ## suffix(); \
| ^~~~~~
./../include/linux/compiler_types.h:568:9: note: in expansion of macro '_compiletime_assert'
568 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
../include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
../include/linux/build_bug.h:50:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
50 | BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
| ^~~~~~~~~~~~~~~~
../mm/vmstat.c:1872:9: note: in expansion of macro 'BUILD_BUG_ON'
1872 | BUILD_BUG_ON(ARRAY_SIZE(vmstat_text) != NR_VMSTAT_ITEMS);
| ^~~~~~~~~~~~
Full randconfig file is attached.
Thanks for the report!
The fix is here:
https://lore.kernel.org/all/20250604095111.533783-1-kirill.shutemov@xxxxxxxxxxxxxxx/
--
Kiryl Shutsemau / Kirill A. Shutemov
Return-Path: <linux-kernel+bounces-673048-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 6651A41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 05:55:17 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 91F0E1892C63
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:55:22 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 3A4D828D841;
Wed, 4 Jun 2025 09:55:00 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="at9+FukE"
Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id DF5527082D;
Wed, 4 Jun 2025 09:54:57 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.41
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749030899; cv=none; b=Ihn4AxXyHVu5ra1qYZIZWYo2YK/YXosAtZRsLkq70NLo1XzTnXNNhVsoirWb8Sf0zESs3srpYsBpcVKQkLcincaqq/00XrK/blugqk1Dj9uibZEiqJmQCvCjubdnuh2yOeh4CiqeSFkvVzMyBLKEiEh82WnjYxI6tTeNRe7c2+8=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749030899; c=relaxed/simple;
bh=rT7WV0z9QakqwOWrmARwlyRwSp8Y7X8ngHE26wEnmxY=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=Tousg6ZXW3TaB+91F2Ok9xzcvH4NRrLZ5pQ0a07mRO1s/R9q903zI9wvFYuAtKBELld76Hb7bHW9BH9z6F4Ak9IzhaqCJj3jmV8wJJsT/C0cgLP3K2bDxX+ZpRgrtMkxqdGym7Tr5G7XEtBPwWG3tXIdEWzXww4ZrWhqbkpKSwg=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=at9+FukE; arc=none smtp.client-ip=209.85.218.41
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-ad891bb0957so1165499566b.3;
Wed, 04 Jun 2025 02:54:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1749030896; x=1749635696; darn=vger.kernel.org;
h=content-transfer-encoding:in-reply-to:from:content-language
:references:cc:to:subject:user-agent:mime-version:date:message-id
:from:to:cc:subject:date:message-id:reply-to;
bh=yCnSX/2bOTAq6bwZrnhh+Ap10mZ4BWjQuaO8FVGMszg=;
b=at9+FukEZgVBVJ1rGEaU7lsYNYxIBD7HHUE2BFBLjyG/J26YqthKH0j96NXn7jX+vj
0e4juWBjcxp5k5FzzHcjYA7I/ukNBQPnMD9uBPsc9Nh7ZpXleRT6LnwhAxU8Uo210oFQ
sv4o9/Sct7ku4Yk+trPlUp7nXvJq461pxXHyvjz3bAEqXPuK0TIGLGlMzhDutGx/IKXi
LFbzmLjmuYXN4TqId687cW6pp57580l60oPnev1HBCit2P58wq5GYmbWr+o15PnG28qC
l8COFE8Ld5nToeH3vfBFCDRfILUAld1InM1o703eH7HEh29/gTKiDwjQKX7kqvqCzkYV
v6Jg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749030896; x=1749635696;
h=content-transfer-encoding:in-reply-to:from:content-language
:references:cc:to:subject:user-agent:mime-version:date:message-id
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=yCnSX/2bOTAq6bwZrnhh+Ap10mZ4BWjQuaO8FVGMszg=;
b=ogPvCB6XipIqXNe2oy1bbi/e1ox23uDZM7htgOjJQBYqhQ4Wc2cCPDW4+/pUe2x/7I
m05A00j/PEf/B0ffZDNiMYNjNo7yaACWX2ziNGWNQSVU8AqzJqp2zbBIjjkX3YL2b6tx
pY3AGwj2xn0anu2ZO8n7sAsxRtrUQdkGwTKUJz78PHj65AnXjaFR3rHwUZkB/2lkkL3t
Mmc3uuRMaolUCi5Bon11P03toMD6eC67KygD+0/w0nnlaGZcvOKkUnLImnmaEkspfzVE
qjhYeYzZfLURzPZQsvY3eqiMgfp9JHvwOvcah0g/UdP3qwNTplrNroDytuD4COLl1oxe
Ef4Q==
X-Forwarded-Encrypted: i=1; AJvYcCUCvs9ZPvTVeTQm4EOFFldyoXX5c8XhUShQjEkV8h97RvBMNureVx89vXDcchhmNdh0r6NMYyk7VKZgzKk=@vger.kernel.org, AJvYcCWsub1WkXi/Fh6SjpBHV8JfNLXHB4Q95asvC9zobGItbw+E5VCfdte3wxA2ouaSx0JSFd0i4oyqmcRIAPjnUw4=@vger.kernel.org
X-Gm-Message-State: AOJu0YzoYnK7BV88jgDtr5UMJj78F4xulEnubJWzVAydDW/vB8QdTsxo
ifB136tT6wIAWLvaDOrMkbb4K0jPfbBSjpunMbBKVXhFfO1tr+Cg1vuj
X-Gm-Gg: ASbGnctXjxY3eFbJFTP+7Mo8zXJ37XdaTLFzWIkOz0UP1LovXGTBdF9BikMSId/u+Kp
9XQRr0iVACBlKAUy8LocfucYWD+jRhQDNcY4igRwngGnVENE/meWzMfcTmtEILzX75HJbhS6gZB
s3wKt5sZI0lFMaoMJMWYDhSNfSp7EuB4EztDl7Z9N71xSxOkwaab7FTcaaD1K4kRT1Po0MM1ccc
U7VeE+7ZyDBTw/zShSwjTIhDVmhIlG2nY4hN08ogyecHihEuCf7/VVSpyTBz5DLs6WipnU2AtTK
uyDbaBhZVyuvp6knNS3XIZp8+b5xvMgKOmumXuzBMk9ExHGZ5fp9SlWGfM1X
X-Google-Smtp-Source: AGHT+IHojeDu0D3iKuvJZTxM+tPZGooJbnzqjWhWIh4v1qc9uISoP6pFIzKIiHEualV/VjzLSEqq9w==
X-Received: by 2002:a17:907:d16:b0:add:f62e:a300 with SMTP id a640c23a62f3a-addf8ccde2dmr191680466b.2.1749030895870;
Wed, 04 Jun 2025 02:54:55 -0700 (PDT)
Received: from [10.5.1.156] ([193.170.134.247])
by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ada5e2beff7sm1074579166b.111.2025.06.04.02.54.54
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 02:54:55 -0700 (PDT)
Message-ID: <de844563-651a-4a6e-bf61-7a7b41d1cb43@xxxxxxxxx>
Date: Wed, 4 Jun 2025 11:54:54 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v4 2/3] rust: miscdevice: add additional data to
MiscDeviceRegistration
To: Miguel Ojeda <miguel.ojeda.sandonis@xxxxxxxxx>,
Benno Lossin <lossin@xxxxxxxxxx>
Cc: Miguel Ojeda <ojeda@xxxxxxxxxx>, Danilo Krummrich <dakr@xxxxxxxxxx>,
Alex Gaynor <alex.gaynor@xxxxxxxxx>, Boqun Feng <boqun.feng@xxxxxxxxx>,
Gary Guo <gary@xxxxxxxxxxx>, =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?=
<bjorn3_gh@xxxxxxxxxxxxxx>, Andreas Hindborg <a.hindborg@xxxxxxxxxx>,
Alice Ryhl <aliceryhl@xxxxxxxxxx>, Trevor Gross <tmgross@xxxxxxxxx>,
Arnd Bergmann <arnd@xxxxxxxx>,
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, Lee Jones <lee@xxxxxxxxxx>,
Daniel Almeida <daniel.almeida@xxxxxxxxxxxxx>,
=?UTF-8?Q?Gerald_Wisb=C3=B6ck?= <gerald.wisboeck@xxxxxxxxxxx>,
rust-for-linux@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
References: <20250530-b4-rust_miscdevice_registrationdata-v4-0-d313aafd7e59@xxxxxxxxx>
<20250530-b4-rust_miscdevice_registrationdata-v4-2-d313aafd7e59@xxxxxxxxx>
<DAACCYW3QRQE.1O75L2SHJYVPM@xxxxxxxxxx>
<3eef5777-9190-4782-8433-7b6ad4b9acd3@xxxxxxxxx>
<DADAEIT9E1R8.1J69W5DKYAQGY@xxxxxxxxxx>
<CANiq72=893T0ZHawsym358N5iexbj+5UEL_RqMA_w_dEbJ+Ujw@xxxxxxxxxxxxxx>
Content-Language: en-US, de-DE
From: Christian Schrefl <chrisi.schrefl@xxxxxxxxx>
In-Reply-To: <CANiq72=893T0ZHawsym358N5iexbj+5UEL_RqMA_w_dEbJ+Ujw@xxxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 04.06.25 10:48 AM, Miguel Ojeda wrote:
On Wed, Jun 4, 2025 at 1:29 AM Benno Lossin <lossin@xxxxxxxxxx> wrote:
(the `assert_sync` function should maybe be somewhere where everyone can
use it)
+1, and likely part of the prelude too.
(We may want to put all these into an `assert.rs` or similar too.)
I think that we can add it to `build_assert.rs`, since this would
be a build time construct.
Should I do this in a separate series?
Cheers
Christian
Return-Path: <linux-kernel+bounces-673049-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id B7BA141E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 05:55:21 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id EFB5B3A3F8B
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:54:59 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 8E77028D8DD;
Wed, 4 Jun 2025 09:55:04 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="G5f1ePH9";
dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="HpkSZjPq"
Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id B274C28D8D0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:55:01 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749030903; cv=fail; b=urBhX7ARkHYi+XMmGetYWHPwrpmDv30ROHYBt6nBbV5f7RsfEtTfIRMlGErc8BpTKgNSUXrUp6xLdw5KQkdoBUdFALSUobcrw927wV2WvRE/E8064vuJBbDqAB4lraK8keAgXfeyi7rjwyNl2a4CKDSvAdjAZCbMGdBjbHAZ0hI=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749030903; c=relaxed/simple;
bh=NE/yuEBXPXDgmacwqvFBtTzqiYRjxadxODucAm71Z64=;
h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To:
Content-Type:MIME-Version; b=mh78nGsJMf2YAzaj2m0+mKARefHXgrj2+vMt91z+QFejoWLNoNYpzgXR3G4Ut454Eae492QzyI56dSIxDnXGYL43S2J+zkPDxMH2Q9kgksZ0ewoPDt3+7+Tg4TyQnFCk/WZbtoMa/AF9agTAb8n57aS69F6Bmd2EyG6Vq90TLus=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=G5f1ePH9; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=HpkSZjPq; arc=fail smtp.client-ip=205.220.177.32
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com
Received: from pps.filterd (m0246632.ppops.net [127.0.0.1])
by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5549Mbpq029579;
Wed, 4 Jun 2025 09:55:00 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc
:content-type:date:from:in-reply-to:message-id:mime-version
:references:subject:to; s=corp-2025-04-25; bh=NE/yuEBXPXDgmacwqv
FBtTzqiYRjxadxODucAm71Z64=; b=G5f1ePH93GvLFKC6cl7Dfn5QGekVK75RAx
/8u+F+czIDKpYFiBXk6tK86wbRz4ikCp4CU/212p4npLvABLD2wc/++mVtM44UsU
v9lRT88GNZnnC1GO8ejupvNqvQXzkdMcXVc8q3DdCsXjOhfYcq484l9qtUKa81+O
5pjxbUuAYCn5qR6AWpwIqeV1x22QwbTVkVAUKISvJoxdBZqSJRoB+7S5p7Crw0+B
9t06LbQB1XFwI+ckZpb6EOzM7lKIp+DTGcrPXsKPihAFBz9r/WPNYVRYgjXmNpQP
8UafkjaIbkw9GRIcmOy/ktUUzmF57jNBKUP6RXZ4MOSwxFY53vEQ==
Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223])
by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 471g8j3pux-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 04 Jun 2025 09:54:58 +0000 (GMT)
Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1])
by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 5548sELh040691;
Wed, 4 Jun 2025 09:54:58 GMT
Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11on2082.outbound.protection.outlook.com [40.107.236.82])
by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 46yr7at5pg-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 04 Jun 2025 09:54:58 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=NTyXjKhy4k5vG1PyG7JwiL/+uomqutDl/EI/VIZSBhWeRjp6h5L5gWHlnVoI1T/9L33OAjkhGRYPwRFHfdEq+c7A63Tyhs2dmecV3kABZgIDy9QW5dBSQm1Ab3CE+OvoXSOqITHsGZgmWlTcM+g1MVFGd4UXOnJnH/a1DROKmP5nLNt+FEPf8xiTMICm13akSgQWcCJfe2A/fE0UtsufEzdIbxf4cV5MAGTvon2pZtao63VNiGn59G2HGEXGFziOmYixBQnXePQSrWnC3oEhJx7aMaBuJa5LySyCTF2dscEKT2O/S2aUs16fJVdcTl23DQlIBCJUdthNuGnUPQ84QA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=NE/yuEBXPXDgmacwqvFBtTzqiYRjxadxODucAm71Z64=;
b=P85b5SUOS0KXZqfSn6DodU9XR7X8E5vKQc9uNRGDY2Z5fYpvu7st81EIj/jQ6UY6w7DdrkgOAhSQrLpU3o+Rs3lLKIi7fdFvMqkGAKyHaTJKOPJPJ/KKOxYMNDY9GvoI+7HwgZnhE9zpblJSFQIXwjJpEGEqiyOoFakbiqBGNExQcR0WC9kimITiOo9NFv47b4RkhGVBgWzYmsuw2LSnWAu3qTAY16yG8rs+R9NykE1maHzCTehu8i9RIB2XAb5x07r0Hov+DFly6EYKlbKwT3TEfaI7uHFptEZW7CuDxiXDZBAQ3g88k4CQeEqwPSYehFw9JdXZ0IVjVPqVfc5Vwg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com;
dkim=pass header.d=oracle.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=NE/yuEBXPXDgmacwqvFBtTzqiYRjxadxODucAm71Z64=;
b=HpkSZjPqr53ha8bn52NhLHn+fL3xa29MnbvxNngpRRGZ3PjIbuOZvzSbm//9EN2LtWwJeZDo5Jc72BrpT+ZIVFehBijX8SgXL3LTwyp9MF05PgXVkO9z/WQmmshfd5N775Iu0EJoE4RsID5iNk6RdKDIhfsLBIsNcTcXJYoemRo=
Received: from BN0PR10MB5015.namprd10.prod.outlook.com (2603:10b6:408:126::11)
by SJ0PR10MB5631.namprd10.prod.outlook.com (2603:10b6:a03:3e1::18) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8746.41; Wed, 4 Jun
2025 09:54:56 +0000
Received: from BN0PR10MB5015.namprd10.prod.outlook.com
([fe80::f2f4:6196:e18:1b1]) by BN0PR10MB5015.namprd10.prod.outlook.com
([fe80::f2f4:6196:e18:1b1%5]) with mapi id 15.20.8813.018; Wed, 4 Jun 2025
09:54:55 +0000
From: Siddh Raman Pant <siddh.raman.pant@xxxxxxxxxx>
To: "gregkh@xxxxxxxxxxxxxxxxxxx" <gregkh@xxxxxxxxxxxxxxxxxxx>
CC: "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>
Subject: Re: CVE-2025-21991: x86/microcode/AMD: Fix out-of-bounds on systems
with CPU-less NUMA nodes
Thread-Topic: CVE-2025-21991: x86/microcode/AMD: Fix out-of-bounds on systems
with CPU-less NUMA nodes
Thread-Index: AQHb1Ta5ezQGfr0GskK/Eg86yvAS5g==
Date: Wed, 4 Jun 2025 09:54:55 +0000
Message-ID: <064d66133dc11a95f7c5aa647784cf9bb3ede1df.camel@xxxxxxxxxx>
References: <2025040257-CVE-2025-21991-6aae@gregkh>
<793ae4a30ab15d0993ce9152ce91b6b98a05b1a5.camel@xxxxxxxxxx>
<2025060430-rimless-splinter-4131@gregkh>
In-Reply-To: <2025060430-rimless-splinter-4131@gregkh>
Accept-Language: en-US, en-IN
Content-Language: en-US
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: BN0PR10MB5015:EE_|SJ0PR10MB5631:EE_
x-ms-office365-filtering-correlation-id: 7d02c351-dd62-4db2-8400-08dda34ddc40
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam:
BCL:0;ARA:13230040|1800799024|366016|376014|38070700018|4053099003|4013099003|7053199007;
x-microsoft-antispam-message-info:
=?utf-8?B?R0VlVDlwd3BRd1ZWdjVsalpOU0sxZXBkV2lBc3lzUmNMcTJlWHVGSzVpUmQ5?=
=?utf-8?B?WnMxQ2tvKzU5SHE3Y0wvV2Z1RDI4dlNzRGxDOFQwT1V0ZC9saktMVGRLU2dD?=
=?utf-8?B?UFd2bWZlSTJZTW9oVmVYcEs0UUJmRkNQTzArNmtqTnJDZVJ4S2Zkd3ZZQm02?=
=?utf-8?B?WVNpNFZRRkFSNkVGZGl0T2RlNWJMQWxHbnFXVzh0MjA1YSszNXd0VWxDN24r?=
=?utf-8?B?a2hUcUlqU09FM0pDc0NoSnF1dGhjOEZ3dkhxSnVyNXNmNDNSRDJxRTJ5T2ow?=
=?utf-8?B?T3VoTEFKeDZWYytCSXRxWXR0VXhjVnV6VHB4cHhJc0lmNUV4clozN3NJNGVC?=
=?utf-8?B?TWxMaG12Yjh0alVzL0daT2tyYmhKd3lyRytzMDJLeXdNUE9aYUJCMXliNXJ5?=
=?utf-8?B?N0dvdWdqSWs2VDZTMXBXamxmTGRkc3JVb2dmOWF6WkN6UHJLSkxXNXcvbjAz?=
=?utf-8?B?Njhyc1FPc0F4TzFCejNyMmtWTDRJYXpLSU9SV2hweU5MZUkvTFIxNVhLdTFz?=
=?utf-8?B?blJiRm1XUENUWTdYcEtuakpaZjM1N1E2U1dvQjNxTzhyQytlV2xrLzdZWnJs?=
=?utf-8?B?Q29SNlJjakNKQmdOTXo4SXZaQlNSMDRMQ09oQU9DTmUvbkdYd2dJQUhJYkZ6?=
=?utf-8?B?YXZXbDVPS3ozenhHY0N0U1FmV0praFlhUStaQ3J2cWVUYS82WDZWNklEWWU1?=
=?utf-8?B?QTFSZkU3TkZVVTNhQUg5S0RjbTJ6bFVZdG11ckg5SGlxenFvdkVtaWNjNGUx?=
=?utf-8?B?aGtSclZLTitWTTBMbGtMRzVMemQwRzhrQmxVMEQ1VXl1RlJlTHQ3QnNRYU0w?=
=?utf-8?B?SHd6c3BxY0J3Z2REa2tKTVNZdW5HQzZwdFVjZjkrYTNvRzBQVlJ1TWQ0TUtI?=
=?utf-8?B?SkNIVmFnUjRRQnd1dUp0Y2xldWtGTTZtUHI1SWZZTUtkVjJPaU54dW5BNjJo?=
=?utf-8?B?Q3NnUnlwRjhUR3dOSTBNWGE0UmhqTWVkUWRSU1JJcm9GVjdubXVrK3NEblE5?=
=?utf-8?B?QTBjbGZkaXVFZnhSWURJcklwYTFlWjNtUDl1ajJxWUZvUDhyclAzWEJVN2Y1?=
=?utf-8?B?bG5tREp6QnhjOThIL0hpTkRmc2diMTl6Ym9DSG1xK1RvSW9VSWxzWWFuSERm?=
=?utf-8?B?RVoyN2F0OG5MRWFyOUxNbjk4RHlIckcyd3Vjd21YV2s0MFVyQ1A3Mzc5dmdW?=
=?utf-8?B?YTNoaDFySDVvclNuYWEvMWFmQW1vY0lHQTdYK04vMjNiUXZyUmltanp4NEJQ?=
=?utf-8?B?RE9pUjhYc0c0cVVvQiswdjJtNkdDbkFadjhiZjBvbE45SWc3dlVXU3VtcUV6?=
=?utf-8?B?TENST3JMbnF2UU1NOWg1bndzZ2xFbjh0eVdhdndMSjc4Ymh2WlV4U2RObExn?=
=?utf-8?B?TG9jMS9UajdmMHVkRGdzekVwQmVZUFdTVHhFcmNueWVBdSs0TEY3TEgxeUpr?=
=?utf-8?B?R3pRZUZWRm5YMjA4ZjlVVlVpWVBWSDlHeXo5MDc0MjlwMTBDV0xxVlVMQ0U0?=
=?utf-8?B?cW5BcldwM0FnNFZ6KzJZM1NJeFVVUm1na08xTW4rZUQxdzErQ2YxdVQ5eHR5?=
=?utf-8?B?TzgweGpCMFZOMVp4c2RobVNBakh5UHovWFNONExhZjRORjVQZG9FSUpQSUJa?=
=?utf-8?B?aFpsYXo2Q21MNFVJSERXRlUxMW1ZNzdKMGNhUHNMcG8ybWIxK0xyRnN2bmlI?=
=?utf-8?B?YStwR2VkN3JCK0RwZEhISGtIRWh4NEdzYVphUEZua3JTLzJibk5kLzdqenh3?=
=?utf-8?B?emxYNnJHcDQ1bEV5aUlSUHR0c29HZTdoUXBySUUvUDBUZlA3MXlMRVk0dGY2?=
=?utf-8?B?Tmo5eklSYjdsYnBRV0ZMd0hqeUNiOE04SGxFcWl3cCt0Skl3bVhKOFNUQlpl?=
=?utf-8?B?T0lhcEN5VStheE9rM1RxejB3OEo1SjBWa3E3ZzVOVEx5bW8yRjloTXQxOFl4?=
=?utf-8?B?aFJIdmVPQTBDbTZuaFZHS0NVc09PbkFBVjBPVk90Y3A1MzhnOGxFUkN2VHcx?=
=?utf-8?Q?1PG7nIaQWx9saOy+aImpICHqaYFc7E=3D?=
x-forefront-antispam-report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN0PR10MB5015.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(38070700018)(4053099003)(4013099003)(7053199007);DIR:OUT;SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0:
=?utf-8?B?ZURnVlFlaWlUZXZWVWxMek82SHIwUk4yYU9OQlY5b2lhQ3plUHpocGJpY2FJ?=
=?utf-8?B?MS9DcHJ1czljbW5LbmZQVE43dDd1MmpzNDhMOEhQd0ZKcVIwMEo3THcrV1hP?=
=?utf-8?B?YVFxc05ub1VIcERRdmNsQlozQm1BYTh0eHNQdHFQeXBsTXoxaE1hdCtteFZR?=
=?utf-8?B?VjdobnRiS1ZYVjA5ZUZBYnVSU1VuYVRsWXZFMGx1WWFVNXVjd094MUJKY0JY?=
=?utf-8?B?TURkSlhVU0ViT25LbFZWRE12czQwWmpJQzZEdXkyL3dSM3BldlNkeE1FcVpD?=
=?utf-8?B?L2tHZWFYTGhPTHVaZU1iWXFBUm11WmlMTFlmcmJZME9DNlJHMzdxU1pIRzNu?=
=?utf-8?B?QXc0M09OR2ttVTg5U3NPcnBlbGQzU3lvMWp1dHpFaHJmeGFWUG5GYTZlL3Rs?=
=?utf-8?B?YzJTN3RuWE5TM09kNTA4eWdJVVAwL2lrOVdMdVlNcUs0cUMvcUlEUkZBUGZh?=
=?utf-8?B?bEk0Y2VYY0JqWDQ4UnhvMERWMUtoS20zV1hrVVY0WjF4ODlIQk9CaWJHTWRQ?=
=?utf-8?B?UmdRbUhQZllMZWJGck1RKzYyZ09HaUlIWFFlUTVYanN4UEsxRWkxN2k3VnBn?=
=?utf-8?B?WFJOTWw5TG1obmZzVDJJeklvM0FvMFNKWDFZd25pTzJGekFJWm14OERmSm9o?=
=?utf-8?B?cXAwb29yK2E3ZnhKaVp5dnFNYzV6UWVFMGxFSWIrOWZSZjlWUk1xY21yUFlY?=
=?utf-8?B?bUxmWDB2S3A4Nzgzd3IzNWhEaFZhSlFPenVOcHFsTU9vVnc5N2FaMHJEZFpS?=
=?utf-8?B?dGd3ZjAvV213STBiZmJISVd1VnJmYnVUUE1XcVNJY0duNGp0ZXF1WlhmeWFx?=
=?utf-8?B?cjhRS1ViNmNUVHV2K0U1YkZTR1NQOXRvbWQyQjJrcTFkTCtXTnp5cEFZdVh1?=
=?utf-8?B?MEl5ZHYyMVJPMnpiTVZEYkxwSExrc3I1U2cxMVNzMkxwVVUzMnFZVi8zeHMw?=
=?utf-8?B?dFVTTFVDY1pScDZZaEhrcEdkWEFkcWgzRzZ1cVpvaXdZVkhuaXFLV1ZUVlFk?=
=?utf-8?B?Z0lENktESGJzU2ZpcXJ0bmx2RXViSUxsVWVKYVh3cTFERkdua3FwaU12WnB4?=
=?utf-8?B?SzdVeGhCdmpVNmJRcW45L3lQTUtDYmIrR1Fid01NRC8rNHpmcDdRWVNVZkU1?=
=?utf-8?B?QkJNRDFsckhaSndkZjlBNndZY0lVNk1jQ3pUMkxma0ZLSGlrTVJYeHJFK0R6?=
=?utf-8?B?a3RieG43NXlNYWlIYmt5c2YySTFYblFhRFZrNGJtdG90UVV0SXUwdlZHWW05?=
=?utf-8?B?UFhTdHpXdWErdlR6OXY3a0V1WERvbGNJMm5uVUtEYmtIK0gwK2E2bkZPWUNF?=
=?utf-8?B?dmlGMno4YkcxMzczL1NZei9ycEF4WngvcXlDbDUzQXo3c0t6OHRyaFVZaks1?=
=?utf-8?B?ZW5qN0wrL3JIRzlsKyt1TXJIczRaVjYyeHJTL2FKUktwSCs2LzJjOW4rQVp4?=
=?utf-8?B?Y2U3RkpuUldBbWV4OWJWSGM0dU54bmErQzR3WXpJVXJDaG13RWs4UEtySm1z?=
=?utf-8?B?bWZvKzhFbGVEaTFUUHdTaFFZZ1VPanRmcTRrZ21PL3JpSlJManIvd25QU2NT?=
=?utf-8?B?N1JLVERCZFUwSWg2MHYzSGhKdHJoTVBFSkk3QUVnaHBXdVhkSDlFU3JCNWpW?=
=?utf-8?B?RVBRc2ZuelpTSk1KZlQxQ21jWVo2RmFpVDlBNGs1anBzZklSdXZVLzZaSldB?=
=?utf-8?B?a3kxN3dSamNOb3h1dHFJK3hpMHllVWVJU043RmxGdS9oYjJPUlh4ZXVCOEVo?=
=?utf-8?B?dUR1S1k4ait0NUVuTW4xZEpzdFVieEJUTm5IdHZSQ2pvMWNnYzV6ZE8xTlQy?=
=?utf-8?B?ckp0eEIxM1RkZ0RzUWRwaDZiUFl1UDRTcjNmcmlCOUdKeWt4ckwrSlNpNEs3?=
=?utf-8?B?eFR4MjI4Y28vOWhPNHBwbEFKaWFobUszMVR4TmhoTWNSUDFLbFBjMGd5UUpC?=
=?utf-8?B?UkY3amVoZVhwNUJaQmlHNjZZZjJVUFdPY0NYQ3hPS01JZXY3OWhLUC91Q3gx?=
=?utf-8?B?WHVxdnMzTHlzb1pES29sTUg2d2xPbWgyempldmtLZUFLTWFMUmprTFJ0akFr?=
=?utf-8?B?dUpFdWI1SWhPa016Ymh1UjJkUzZidmI3VCsxMkVzL3hreDhBbTMwUi9oamps?=
=?utf-8?B?Nll2VVdnempZOGNlZjQwdlMrb3lzV3VuSkRFZVBYOFV4V21TUExSUTdHZ3Fj?=
=?utf-8?B?dkE9PQ==?=
Content-Type: multipart/signed; micalg=pgp-sha512;
protocol="application/pgp-signature"; boundary="=-Zl36f6sOY+6rHHFS2kbE"
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0:
Jcfht1sXZH/c4T5ROlP3+N7iF/4VxsOuHkGItMhPcJTySub1dSAE7isPLndqzpJMOS/pef6zyEvrbMGO8/QHB0EawqBEJ2CG5jJS8lWOY8yW3kMZrEP6a6rY6dhpcVlV0BXJyf6lEJtvYlJN73b2bO2322L18jKL9DynYzYe+xnW+wxqSywGi7lGT4BvQnv/5xtcLIIKcWRO9T+L6EgG6nMQjE2Y2AHBsYW7btwZ4heUa3tztcSxPTPaAiWbmGuHuFKQzkDSj7vDnvmw7b9IcSYeHvG1X4fAYqBnVxen9Dxt+LK9zptdmA+LYZl/WcbpKekgEYe9Nk/1pMopHYrBfBvQ+KgFJe4jP42OuoVFGGuYR91WG5K8FoQxHXc9/HCJyx8RbBN9sKrjHNKjftS3Peo4Ao2GKN/FBY3DDB8D9ncPGzbhBl6hF3WJfNdt2Y7X+GfE04EeI4Ox3ny+IDz/ySGpepNyg/O4oCKtm7pA8xPOQoCFdyAqM0i6mL7eS9y3+hSzo1Pp3/Z/I6+ZCDwAuBAbxgyX9wZdXqH/ZWbxyb0tWgO6ubG+iWm4yUu8fcSBgNs/pPlKzPMs1aosT8oMGOIDAY/q0yoD5wbbT492S8I=
X-OriginatorOrg: oracle.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: BN0PR10MB5015.namprd10.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 7d02c351-dd62-4db2-8400-08dda34ddc40
X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jun 2025 09:54:55.9048
(UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: hZqDHMoCrmTA22ttfCqZOhLaBYCQtK9ooM6/aENtal2NwqwDuQqspLCeGEIzkTFVwVj9WC508SeUOOZ7rpgeLAOtXozARZoSDcRx4X6JO0w=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB5631
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_02,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 adultscore=0 malwarescore=0
phishscore=0 mlxscore=0 mlxlogscore=999 suspectscore=0 bulkscore=0
classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2505160000
definitions=main-2506040074
X-Proofpoint-GUID: -TCXILxUqFDNbTk9P2mTj5zrCYojGRiX
X-Proofpoint-ORIG-GUID: -TCXILxUqFDNbTk9P2mTj5zrCYojGRiX
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDA3NCBTYWx0ZWRfX4fqW243L0n1l bU5ymFHSw0S5sHqjMf07YqXYtUZzVYkozUWDfBE+TPOxtt8cnMsjl0LYU0h5jSvRdIhkgQPEPlx HpV77LwXTaNxMUsaw/aFnhmtXHdmJjkVNd2hTT87+Oza5V4YdGFRQmB/2dE0FMmShNC3UUmMQYL
hRAnrABL04dd2/XnbKmMbADrKCb+dZxqwL9Wlr/yBxPp6WPGD+84leAscQioe3EnW/tPrZ2s8R+ yXaLPzoXk0y7QCgEEJuyW++GHy1xkqrXWXnGFqZgpRT0f41dD74amBDU6U+MlGe6Ou9KWaY/38+ mhrQvvxn5DwM/zxUoFvb/4WB6BFscgMPrkTzJvpL0+4/pyf7cPbb+rycl7uwTDPaQlGiqEFhvPa
dqmGwXmUeHLEd9HvvzO109o8TPCAOHstlTxb0n938CXR/0yPECLgtle+akI8ULg2xKjoiqfu
X-Authority-Analysis: v=2.4 cv=QI1oRhLL c=1 sm=1 tr=0 ts=684017f4 b=1 cx=c_pps a=zPCbziy225d3KhSqZt3L1A==:117 a=zPCbziy225d3KhSqZt3L1A==:17 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19 a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19
a=xqWC_Br6kY4A:10 a=6IFa9wvqVegA:10 a=GoEa3M9JfhUA:10 a=ag1SF4gXAAAA:8 a=8r2qhXULAAAA:8 a=_mSwfpN90Yta9QRQWCYA:9 a=QEXdDO2ut3YA:10 a=WWjZugqi5kgA:10 a=IZYsaDoDhFtbN8HEXcQA:9 a=FfaGCDsud1wA:10 a=Yupwre4RP9_Eg_Bd0iYG:22 a=8gvLZcY7Nlvl4CGD_6nf:22 cc=ntf
awl=host:13206
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
--=-Zl36f6sOY+6rHHFS2kbE
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
On Wed, Jun 04 2025 at 14:58:03 +0530, gregkh@xxxxxxxxxxxxxxxxxxx
wrote:
Doesn't "causing corrupted memory when flashing a microcode update" fit
the cve.org definition of a "vulnerabilty"?
This only happens on CPU bring-up so I don't see it getting triggered
without already being exploited.
Thanks,
Siddh
--=-Zl36f6sOY+6rHHFS2kbE
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEQ4+7hHLv3y1dvdaRBwq/MEwk8ioFAmhAF+IACgkQBwq/MEwk
8iooHRAAihE76gmSmD5VfevvaBxSEsOqTul3bp7ZqjoSVBTFHh2AdxnNupsMD0Mf
HfEuxV2hm37vlMU9cv0gte4qQZBF/jZ2eDXCS8s+Oqti9WKxyVWbmfdgERtr+KZj
Pdm0XGolgo3v94HopZHW8EnGZR0aOQX4jgyfgOoNM9o4IEMDUVSNhnigaJnGscXv
I2ZqQHYHg2iSxHfntrJtCD+GMx5sx3pxtnGX35hSoY7aYOddYMRcF10OzW3bSqCo
lVkXSWbUcYYeBnIGK/DeUEYStz7XYVGJYWmTzeh63zWgZJJzWnIxhUJUi00Fk4pl
vW6IJc0gB5Fj0H7e1EwbmOYuYtkGokhys9sEiMrzBN5dJ7gNlqMhZW6RugwHOnNq
/kekdX2Zeq4j3/A00g2LI0bsDCGtUi29rMiLJTNaXk5WbsVoNTyRE+hwoVyXGn3g
TAkwmV78MIYs/tj6u7CaiqfWTc/Gpm77GRCAFg1R+zQUH97rK29SuoRQBPLEFfNQ
6ADKx95U8S7cPmQ5grGtmQRP8Rx/zKZHBVs3Krnj1mcfcotHw2nW1Ie3OpMG1jBI
yZE8Ub5nUHCYqpEzNJKUw+oGOUX2fVsaFOpHQnGv2YoIqDlPI7ADiRlcKpo0OWcr
SxQXuEG9sl/3PtfohdjnkE0L40YILIYk4s5MnIlANtqdMfiw8NE=
=sKh0
-----END PGP SIGNATURE-----
--=-Zl36f6sOY+6rHHFS2kbE--
Return-Path: <linux-kernel+bounces-673050-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 3B21841E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 05:56:04 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id DFA97189392F
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:55:48 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 8D05328D85B;
Wed, 4 Jun 2025 09:55:26 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="JxuIgA5y"
Received: from lelvem-ot02.ext.ti.com (lelvem-ot02.ext.ti.com [198.47.23.235])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0E36528CF53;
Wed, 4 Jun 2025 09:55:23 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.235
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749030925; cv=none; b=WmRYX7KXFLARjbD3d5zxVYeumqyT9otVo4VWWA/1fpDS+Ewe6vYVRDc5EbF/45i3OBtn/q5cc4O7Ih8UjHP+nS5yntxLqMF9e7LR8KnRZ9MDT3rLIe8d7HCThduL3pOTrhwpNaewQfqohLisE52GcNEx0JjgN0KqAlqTGB0ZZEo=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749030925; c=relaxed/simple;
bh=HOkYdD3VqmBtfOa+HAHSNsjkX5wCeLANE/uP59K485U=;
h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From:
In-Reply-To:Content-Type; b=ivhrUGPPyyJ2bfyt1FloFmu2+L4w1fGR7FdQ0T87Ki8LKInKEGu+C6NJ1u3DEvj3LXBtNvry1eWTYeFxcSw++fLlYlTmWkE15weHpl9ui26y2mDt3mFvH77f/WHOjdhByDrXoXFo+5rY6Zf568+rwRyCQloyVnXlAAmvdGmSRRU=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=JxuIgA5y; arc=none smtp.client-ip=198.47.23.235
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com
Received: from fllvem-sh04.itg.ti.com ([10.64.41.54])
by lelvem-ot02.ext.ti.com (8.15.2/8.15.2) with ESMTP id 5549tH283779467;
Wed, 4 Jun 2025 04:55:17 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com;
s=ti-com-17Q1; t=1749030917;
bh=n4rIj+lEGrxmq90HEJV5hfV3RbqS6xnOp3Ughx0TBsI=;
h=Date:Subject:To:CC:References:From:In-Reply-To;
b=JxuIgA5y2U1me452IOx3/IPU1xliz94izbrHCoy1PpZ/QAE2ckWjqLJ38mbxlxk2d
mOBmoP1DuRDRJ4m4c6xw6NBGKBIOrKmL9GUSzgoqVNPHU/xKStusBcNbRRD4tFzNZp
7QX4DzCq/faqNNGmYA6bRAv+c4NTBWfxxEDp1S6o=
Received: from DLEE108.ent.ti.com (dlee108.ent.ti.com [157.170.170.38])
by fllvem-sh04.itg.ti.com (8.18.1/8.18.1) with ESMTPS id 5549tHFX066079
(version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA256 bits=128 verify=FAIL);
Wed, 4 Jun 2025 04:55:17 -0500
Received: from DLEE102.ent.ti.com (157.170.170.32) by DLEE108.ent.ti.com
(157.170.170.38) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 4
Jun 2025 04:55:17 -0500
Received: from lelvem-mr06.itg.ti.com (10.180.75.8) by DLEE102.ent.ti.com
(157.170.170.32) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via
Frontend Transport; Wed, 4 Jun 2025 04:55:16 -0500
Received: from [172.24.17.132] (lt5cd2489kgj.dhcp.ti.com [172.24.17.132])
by lelvem-mr06.itg.ti.com (8.18.1/8.18.1) with ESMTP id 5549tDEN1774749;
Wed, 4 Jun 2025 04:55:14 -0500
Message-ID: <02f80914-80c7-4b8b-87e1-b48b8a8e7072@xxxxxx>
Date: Wed, 4 Jun 2025 15:25:13 +0530
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [RESEND PATCH] arm64: dts: ti: k3-j784s4-mcu-wakeup: Configure
wkup_uart0 with clock settings
To: Nishanth Menon <nm@xxxxxx>
CC: <vigneshr@xxxxxx>, <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>,
<devicetree@xxxxxxxxxxxxxxx>, <kristo@xxxxxxxxxx>, <robh@xxxxxxxxxx>,
<krzk+dt@xxxxxxxxxx>, <conor+dt@xxxxxxxxxx>,
<linux-kernel@xxxxxxxxxxxxxxx>, <b-padhi@xxxxxx>
References: <20250603042448.783956-1-u-kumar1@xxxxxx>
<20250603160147.47orn74obh2lz3qm@rethink>
Content-Language: en-US
From: "Kumar, Udit" <u-kumar1@xxxxxx>
In-Reply-To: <20250603160147.47orn74obh2lz3qm@rethink>
Content-Type: text/plain; charset="UTF-8"; format=flowed
Content-Transfer-Encoding: 7bit
X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 6/3/2025 9:31 PM, Nishanth Menon wrote:
On 09:54-20250603, Udit Kumar wrote:
From: Bhavya Kapoor <b-kapoor@xxxxxx>
This commit adds the assigned-clocks and assigned-clock-parents
properties for wkup_uart0 in J784S4. Specifically, the assigned-clocks
property is set to reference the clock identified by
"wkup_usart_mcupll_bypass_out0", ensuring the UART operates with the
correct clock source.
The assigned-clock-parents property specifies "wkup_usart_clksel_out0"
as the parent clock. This configuration is critical for establishing
the proper clocking hierarchy, enabling the UART device to function
reliably across different baud rates.
Please fix the commit message - not clear what specifically in the clock
hierarchy does permit the multiple baud rates.
Thanks for review.
will address in v2, commit message and other comments as well
Signed-off-by: Bhavya Kapoor <b-kapoor@xxxxxx>
You need to add your SoB.
---
Link to v1: https://lore.kernel.org/all/20241009072056.3511346-1-b-kapoor@xxxxxx/
Also as Baleswar stated, the $subject needs to be fixed.
arch/arm64/boot/dts/ti/k3-j784s4-j742s2-mcu-wakeup-common.dtsi | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-j742s2-mcu-wakeup-common.dtsi b/arch/arm64/boot/dts/ti/k3-j784s4-j742s2-mcu-wakeup-common.dtsi
index 52e2965a3bf5..1146bc5990ea 100644
--- a/arch/arm64/boot/dts/ti/k3-j784s4-j742s2-mcu-wakeup-common.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j784s4-j742s2-mcu-wakeup-common.dtsi
@@ -310,6 +310,8 @@ wkup_uart0: serial@42300000 {
interrupts = <GIC_SPI 897 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&k3_clks 397 0>;
clock-names = "fclk";
+ assigned-clocks = <&k3_clks 397 0>;
+ assigned-clock-parents = <&k3_clks 397 1>;
power-domains = <&k3_pds 397 TI_SCI_PD_EXCLUSIVE>;
status = "disabled";
};
--
2.34.1
Return-Path: <linux-kernel+bounces-673051-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 9E43741E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 05:57:53 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id DFC3D167226
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:57:49 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id E167E28D849;
Wed, 4 Jun 2025 09:57:40 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="urTbpm6r"
Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2077.outbound.protection.outlook.com [40.107.101.77])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4580A28D834;
Wed, 4 Jun 2025 09:57:37 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.101.77
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749031059; cv=fail; b=eHgThMyOsQOUfLujpOVCmMLJ+1gzSzDDLINVU8GuXWto9KG912BoKaqi9T7U7fpkHDbxRq0rtlQNqoXZvLf4wyWQNSWNdFxKJnnOOieUZ5o8teGNLOj04e9JG3q3Bg0tmTgSGo3kM5WhI9QRAGaooRgnVntJdMkF3WZ1dkwuvVU=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749031059; c=relaxed/simple;
bh=d0gkLhF+fWFFNKD6Pv2y8MNkkhYVwHc9ejdBumeIUAk=;
h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To:
Content-Type:MIME-Version; b=cXQG22wobLaQrx59R5uEWEW0dCx/FUfMn5qoVKnUoWbc/WBgAYI25YNCD6ZIQDuXkcgRp7wG+rWuVcJLcnQipysl+RoC07w0Mp6ghlB6KOfQ/HJdVO4or3RC2uPEUXbdGBJCIvDUrdWJUpI/6HdJg86D06wZuR1NeJa6kkcLLLk=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=urTbpm6r; arc=fail smtp.client-ip=40.107.101.77
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com
Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=PB8nTD89rXHAry4XJIWhPH0k3BlByiuTZakvVReyACYBVEfynm64AbG5oNqs9y82RlWYNhsPlTiUUhF8lPpHOl3IRVPse8k/g156Cr+0oqyYxqwajA7byGTqyTyZBtYxODXe7NoAyvI/HKcpP2eYK8ZgIpzLsFy6Yn1LuyELjBoYW353qj3Uo7+xwqF7B4Z9w/jUe8B0VpqC0l5eE/lZG1nBDeQ1WnNvrGBEjkEfi0dRG1NTQWiNvTHsSdGWVLS0x3pYUhh4X63FTLgjx9xPqvOe1dlkQir1u5CkShgLKntgpWtDFTdATFNo0SGNPwhy8iOKIPyNqYWjTcNkZBFfGQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=kIP9iaPyzX1lsuw62CnUqlP2AIDnjzEDxk6PvyVa0gY=;
b=Q+YaVUSD2LheO5HzuNHdsxz/6Sx/Xsth4XipCO0hp62be0nZCApjRyS1Ae7wEDl6wKRjVBWhjs0137e+K8uovqyxMr/keHSbjIxdZNUEwN81gjOGp2LGQi1DcgS1vIZ2Q54Z0oEtJJuewUkAftde/Kx8wwnEWKRJz31jljU3bp20y4Pt0pZRLjX1H0y02qzgTop8lH7gAUQkbCMb6AA0sqCajbWNe/QHq5EDY/bO4jb4SchyFI2nY1Yq0kPG8vTnZ7wNzak5dgDOYhFxUd3csjCmmEnJrtt1J4JgyQAnRgNoN7CCg+r5WeQMztCL7OWt6LbD9G82dpNza9yXOCEMdQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com;
dkim=pass header.d=nvidia.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;
s=selector2;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=kIP9iaPyzX1lsuw62CnUqlP2AIDnjzEDxk6PvyVa0gY=;
b=urTbpm6rzTXiahY66kxgdHWx8GTgeIrbTgEz77GrrnA7TosOvuNaAG+TVedDNdwkQuHdv+HFmL/sOzziAfiFw+Ak5wonByG4YiizSbLSyUoEfjr41vS8GOvD1encZAwylZ/RhOAZ9lXvowmwUDiymGyXCh4Su0EwbEOKrQRZylMuRX8fwOdz4mok2T5crxgjxGBVXMwDuDVCycydLOme7cATKN8o/fcueeO2LHZSyFaDN3JvhrFJ5hv2d4QOGbRhs7ccqTJbVeD0qpS54GXVtWHhJjqBI+x5bFeELKZTaqZpxoa1TZmefJJbpXX/mgh3ztfy2mdRPj/SimW6zBbPdQ==
Authentication-Results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=nvidia.com;
Received: from SJ2PR12MB8784.namprd12.prod.outlook.com (2603:10b6:a03:4d0::11)
by DM6PR12MB4138.namprd12.prod.outlook.com (2603:10b6:5:220::21) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.34; Wed, 4 Jun
2025 09:57:35 +0000
Received: from SJ2PR12MB8784.namprd12.prod.outlook.com
([fe80::1660:3173:eef6:6cd9]) by SJ2PR12MB8784.namprd12.prod.outlook.com
([fe80::1660:3173:eef6:6cd9%3]) with mapi id 15.20.8769.037; Wed, 4 Jun 2025
09:57:35 +0000
Message-ID: <bf1dabf7-0337-40e9-8b8e-4e93a0ffd4cc@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 10:57:29 +0100
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH 6.12 00/55] 6.12.32-rc1 review
To: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Cc: patches@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
torvalds@xxxxxxxxxxxxxxxxxxxx, akpm@xxxxxxxxxxxxxxxxxxxx,
linux@xxxxxxxxxxxx, shuah@xxxxxxxxxx, patches@xxxxxxxxxxxx,
lkft-triage@xxxxxxxxxxxxxxxx, pavel@xxxxxxx, f.fainelli@xxxxxxxxx,
sudipm.mukherjee@xxxxxxxxx, srw@xxxxxxxxxxxxxxxx, rwarsow@xxxxxx,
conor@xxxxxxxxxx, hargar@xxxxxxxxxxxxx, broonie@xxxxxxxxxx,
linux-tegra@xxxxxxxxxxxxxxx, stable@xxxxxxxxxxxxxxx,
Aaron Kling <webgeek1234@xxxxxxxxx>
References: <20250602134238.271281478@xxxxxxxxxxxxxxxxxxx>
<ff0b4357-e2d4-4d39-aa0e-bb73c59304c1@xxxxxxxxxxxxxxxxxxxxxx>
From: Jon Hunter <jonathanh@xxxxxxxxxx>
Content-Language: en-US
In-Reply-To: <ff0b4357-e2d4-4d39-aa0e-bb73c59304c1@xxxxxxxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-ClientProxiedBy: LO6P123CA0030.GBRP123.PROD.OUTLOOK.COM
(2603:10a6:600:313::10) To SJ2PR12MB8784.namprd12.prod.outlook.com
(2603:10b6:a03:4d0::11)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: SJ2PR12MB8784:EE_|DM6PR12MB4138:EE_
X-MS-Office365-Filtering-Correlation-Id: 6d8725a6-92f4-41b1-0d57-08dda34e3b23
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam:
BCL:0;ARA:13230040|366016|10070799003|7416014|376014|1800799024;
X-Microsoft-Antispam-Message-Info:
=?utf-8?B?QWM3cmtDaW1yQXNYQ0d4UjdFWkpwcmx1WTNPcWp5SDJIZHZ3cVdOMVBTZnFh?=
=?utf-8?B?Z3g4NkdLbDVOMUdreGpDTm9ERXU2K2dzb2JNd3NkRmNEMlVYWlFOS04yTENU?=
=?utf-8?B?UzcxeCsyMGwwUDNaelNFMWJuL29XZjlIanBBaW8rL09Xd3VqQzZzV3JIbzQx?=
=?utf-8?B?YThZKzlTWW5hTTRMWStIVkZuVHA0cFhCbjdqSkVYelkvS05rNjB4RExQNGxy?=
=?utf-8?B?cWJqN2ZybEhvQU82NG1CSkpXNVNKOXN5Z29wb1ZXQ0RhUFFyNFZoWDdmL3Ux?=
=?utf-8?B?UGpBT1Q5eWVyQTJQOWJqaFhQVzhaNlRtUDNLdUtFdXI4SXdHVXgwZ0dmcjJN?=
=?utf-8?B?RWNUMGRHYlQ3eEpXVUYwb2dSdTVNUCs0WGFXdGV0UDhoWHdSOXpLeDRhdFV5?=
=?utf-8?B?blFWUW1QRkRCaHhETW1LaXVtSVZiblB3NXVlT3prV1NPWjVPb3FVekQ0UkZN?=
=?utf-8?B?WHdtaDZoa1lPdDcrV0ptdXV6azVLRk1qeWxZNE03R3ZhZU5lbUZEbmQxZ3F3?=
=?utf-8?B?NENLM1d0bDNsODdqcWZKYjNBVjRmeUc3eDlrdkhZYXBHbnh1ODZZbHpQUEZI?=
=?utf-8?B?TkYyOEU0WU53WDlrd2U2d2orQ3U0K1V5cTlxOUhHMlgyOW5NSjhxTkNPakpv?=
=?utf-8?B?SThKU0xMMmswRE13SFV1ZmxjQTAyV1c5QXM1ZVo4b1J4b0RnTVlHNEJLUUJt?=
=?utf-8?B?Undna3FnWXpTM20vZ0FPNnVwU3pYNTVYMXhCbWlBcXZWS2dmTjQ1STRJdVl2?=
=?utf-8?B?ajdGcENuaHBPOVgzbENZc0FMb3lVTzZPTG9TVFNRZHJVa2J4Y1VWS2xNU3Zj?=
=?utf-8?B?YVgvM0NZUGEySG1WM2VwOHpQVVduVTNqQjFaWTFhekhXMlp2b0s2enZVZG53?=
=?utf-8?B?NGNpKzJ5eW1aY09FZURyMSs1R1dQQ1FiVG1WWGpac0k1V3VIZm45VTlqd1Ev?=
=?utf-8?B?ODkreWkzRVlkbkw2cTNyQ0Q2VlR5empEblIwbmYrK2dqdVRNZ0thQjRYSjB6?=
=?utf-8?B?dlF6NE9aNWRwa0Rmd3pSa3F5WWVBU3o3RDljSXgvb2o2UXVsM3NscHl1M1hz?=
=?utf-8?B?K0xjUjBKYS9IOUppTmErKzFBdHp5Q2FaeFFYcGFlMmRZSTE2eVhmOTl2WnJG?=
=?utf-8?B?aUFSeFZwLzcrYWtNNy9Ga2JaNDRvcndNcWxQa3ZxUWd2QXRLbXVFKzhVZHl1?=
=?utf-8?B?VVZIS25GNXREeUV3TE8zK0VvdklQVng3MXRpWGZmRFptSjJBM1Vqay9mc0Ry?=
=?utf-8?B?R0VsYXF5TjlUSGtROHN3T1RuN085c3pncS80enZFSklpdGhuT1prZWR4bGpE?=
=?utf-8?B?eHNFSEJEZW5KWDc4VCs2ZDd5S1c0YXdWNHM0T2RMUWE3Z0pKNkQ5UGR3TTZB?=
=?utf-8?B?VVpvdjNSZVBPTkNzTFllak44aDZEKy8rZHkvVENtT3pmVXNWeDdjTlc3bEtq?=
=?utf-8?B?aXgySG1PY09XU3VCMnJMZ0NNK3kwTVA5VnFhY2FySWF4ZlB5aTNBdmM1TzZT?=
=?utf-8?B?UnY5aURidkZySTVSSVhZdGNtbHQrMHdKTGxnajNwUTJwZkVLM0NTZm1lQzBx?=
=?utf-8?B?dWtoR1NGdDFiU1JKM0dHRlhpTjlsWjNaUEM4ZzZXdC82ZDNaSDRVRVdBWjlG?=
=?utf-8?B?eWduWXVDTnlkZlNQazFZSytyamJ3cC93bFhRQnpZNDlZTXJmdG5Xdmh6bzFk?=
=?utf-8?B?Z1lNdXMzWHFBOTBPME5ab2lZckFkTFI3SHhMcUJUcEtHbVJwenh3dHF5K2Ex?=
=?utf-8?B?R2lMQkJXZU15UkdmQVJ2ejNaVStQTmpNVU5jZzhjRU5iYTVha2RHWElDTUow?=
=?utf-8?B?NFowMGcwQ0RGTkY4bWxYb0NQWThiNFpuc3VRaUhLT3BrU1RDVVAyc2VpbDZD?=
=?utf-8?B?c1dBVXRiQ2JhZkNGL0taakJBMDhOQ2VpOHc3RC91aU85dWNuMENvQVZ3aWlI?=
=?utf-8?Q?x08JdcylxMs=3D?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ2PR12MB8784.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(10070799003)(7416014)(376014)(1800799024);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?utf-8?B?THJsVjBrODl5QnBuOTQrcG1CQXVMdktPY3VSczFUalRUOW1kdUdRbTFPZGlz?=
=?utf-8?B?WGhhYWNkbzY1UHlkL2d1Q0lnMThzQUVVZ1RIbzZ2Tm1udUY2aFlENTB0YXlw?=
=?utf-8?B?bmU0aTlsTUpmOXY3aEcyWG5tRm9ZTWtwWksvSThwS2NhZkFuOHh2d1lKempK?=
=?utf-8?B?SHl4ZjEyQ3FYYVlkanZwdUowb0dGQ0lzMS9xR2k5dythYUlIVS90eXVlWmxx?=
=?utf-8?B?a0Jadk1aanFqTzNVYnFZbmZUQUJjK1V6Z0V0WlRXbm1wamxheHRISVJZZ0E0?=
=?utf-8?B?MzdxRUxQZkpoeG5ndTM0OTBLZlhEUndDYjU3a2VpQjFHdWJlU21ITWVaazVs?=
=?utf-8?B?cGY3VGZmbHJUTU9VcG1BcWNyQTBtSEpXYkRFTEQ5ZzZBTjltTThyYzlabzZQ?=
=?utf-8?B?K1hwcUt3d2w0ZjRlSTRuWmlndXpHNnFZWWtIc3hLVitxNmZDN3FOU2JJSkZt?=
=?utf-8?B?VnZWS1J5anF3ci9YSk1WaVIrby83VjF0bUs5RkNsOVhFamJlWnhFTm9zRThW?=
=?utf-8?B?MmtCQU1KayswaUt4T0JlRXhYZ05XV2ZZZUo1Z2ljMU5PVkJyRW91VVFOYW5T?=
=?utf-8?B?YksvZ21qNnB3cUp2WFRMWUJsdzFkYlV4UFduYmlJUEVLL2owWVROSkZDVW9E?=
=?utf-8?B?SWpSN3dEbmQ3cGwrcldnMGl1RWZMK1pJOFBSWUU0VTBMTWVLRmdkZytsRkY5?=
=?utf-8?B?d1h3ME9YcDEwejB3ZXlPUUVQYVd0MUFZa1J0WThFcE9lQ3pyalIvYmllVTJX?=
=?utf-8?B?bE1GTDR6b2R2T2l0WGdTTDZhTlBZRGxRRFZrMzNoY0w4OWJMT25GdHhOaWc5?=
=?utf-8?B?WWVucnZaOVV0blVCQUtmZUphMVR2UFk4bHFUemVSRGJCUzl2K1NDaWlxU0Fw?=
=?utf-8?B?RjFraXVYZ0ZnTHhxai9jazVkVGRBUEk2UEhkbWtSclhwNDRSektGOWNOVkxj?=
=?utf-8?B?TWFLUjd1S01pbjdNdUZIVjF2cHkwQnJtWXAySi9IeWNaTmd6ZE1QRDY3NG90?=
=?utf-8?B?dGFXbmhYNDU1bGIvaUhRMWl2TUR3NkxFN1FHVnJoS0gvYmI1NUFaUGlHZ0FY?=
=?utf-8?B?T1RDZis1cnQrMVJaS25jb2tHVkh6T2JxeTFwelk2clh0Z1FUWWZIc0lxdlZT?=
=?utf-8?B?K0hvV3IreFpGbDdudXdCVFgzbWpQVFJkcmp5T1dEVE82Zlk4MjUwejYvdEVt?=
=?utf-8?B?bnBhcjFKbEN3N1E4a0lSY1dkaEZ0czJQa0p3TUJnQ3JFRm81SVRYeEJyYVhB?=
=?utf-8?B?VFUrSExiSjRMLzhpYklONmYwNkU5TFNVQ3hHd1dFc1Nock1Jb25pR2xoNzlv?=
=?utf-8?B?aVFvL09rOHlKTmJ4M3doZkordy9ibnpNM0Z2cVo0V1ZPWkZKSFErTW1WM1R3?=
=?utf-8?B?VEFWOG9HWjJmbFV0UDBUemNqVzV4RGpyT1ZOd1pIWEcvMFJzNkhpdDQvTVNO?=
=?utf-8?B?bk1MamdCMWpjeitlTWVWUmRMeTN4bTV3dk5ydTg3NUFsb29vQzJ2d3VwSW56?=
=?utf-8?B?ZTlqamRiWVB5T2ZyUGJXYkh0SUVQaFF1SVNjdFBoT2lxWGNwN0NjRElGSUJF?=
=?utf-8?B?MmhCM1UwN216bGJNaUZBN1BlVVgwbFU5V1F6b2NjTmk3M0FabEJRRXVTNlds?=
=?utf-8?B?eDVSTTdjOFBBZkZlQUoxbXV2Y3RRMUIrWFNabGNWSWJlaGRrMmhDWm5jME0x?=
=?utf-8?B?K005M0tacXFnMWxxMGZwUmRja05BbkJFeU9YUkdaQi9DcVNwVjYyZ2xuN1NI?=
=?utf-8?B?S2p4b21VMXBCcnltZ05pcXZHVGNxZW1DRHUwa3B5T3N5dkF5aC9OWFVuREIx?=
=?utf-8?B?bW9Ga3loK2M5VllheGIyZHVWdWtMMTFDaTNjQXFVZ1hkWkRrT1JmeWk2a21V?=
=?utf-8?B?MGg1ZzZYeVRmS3pRSnkxMDIzZmUrK2YxSzc0ZjU0Z0ppaWkxdHJMRDlhcXI5?=
=?utf-8?B?YnVVcEtGUy9UKzMyMkluL05HVkh0Vk1MY09QMURoYlZSM05kYnlpU3QyUzl0?=
=?utf-8?B?S1h5alNuS2d1NVlEMndoZEoyMmJxRlJFbk1PbEJjZGxvWlR6dTRwek4yUkJO?=
=?utf-8?B?RGV4TitIaFlTaXIxR3pDNm9XUXIxcjJlbXdybWl2OHU0R3RBS3dHRmc0ajFC?=
=?utf-8?B?d0dZZzRESWJYWHJKcWRlRHZiMGhMOFJuNnlSSTZKUGdTeTc0SVQ0U3lKV2Jt?=
=?utf-8?Q?Qr+3PJFecSsRiWwuV84Hxz2I2b2YD10Ol+mwMTVZS+VO?=
X-OriginatorOrg: Nvidia.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 6d8725a6-92f4-41b1-0d57-08dda34e3b23
X-MS-Exchange-CrossTenant-AuthSource: SJ2PR12MB8784.namprd12.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 09:57:35.4166
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: 66C7gh9HLsVtU7UgPn2muxZi2B6X8aFPafIOIrBVpwmz5hzvSGRMhsEm4xVWdxQRxYocXaR2lgqdqD3JU1rxcQ==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4138
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hi Greg,
On 04/06/2025 10:41, Jon Hunter wrote:
On Mon, 02 Jun 2025 15:47:17 +0200, Greg Kroah-Hartman wrote:
This is the start of the stable review cycle for the 6.12.32 release.
There are 55 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Wed, 04 Jun 2025 13:42:20 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.12.32-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.12.y
and the diffstat can be found below.
thanks,
greg k-h
Failures detected for Tegra ...
Test results for stable-v6.12:
10 builds: 10 pass, 0 fail
28 boots: 28 pass, 0 fail
116 tests: 115 pass, 1 fail
Linux version: 6.12.32-rc1-gce2ebbe0294c
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra186-p3509-0000+p3636-0001, tegra194-p2972-0000,
tegra194-p3509-0000+p3668-0000, tegra20-ventana,
tegra210-p2371-2180, tegra210-p3450-0000,
tegra30-cardhu-a04
Test failures: tegra186-p2771-0000: pm-system-suspend.sh
I have been looking at this and this appears to be an intermittent
failure that has crept in. Bisect is point to the following change which
landed in v6.12.31 and we did not catch it ...
# first bad commit: [d95fdee2253e612216e72f29c65b92ec42d254eb] cpufreq:
tegra186: Share policy per cluster
I have tested v6.15 which has this change and I don't see the same issue
there. I have also tested v6.6.y because this was backported to the
various stable branches and I don't see any problems there. Only v6.12.y
appears to be impacted which is odd (although this test only runs on
v6.6+ kernels for this board). However, the testing is conclusive that
this change is a problem for v6.12.y.
So I think we do need to revert the above change for v6.12.y but I am
not sure if it makes sense to revert for earlier stable branches too?
Let me know your thoughts.
However, given that this is not a new failure for this stable update we
can handle in subsequent updates. So for this update ...
Tested-by: Jon Hunter <jonathanh@xxxxxxxxxx>
Cheers
Jon
--
nvpublic
Return-Path: <linux-kernel+bounces-673052-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 5102741E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 05:59:12 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 675771893D50
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:59:24 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 3E4E928D849;
Wed, 4 Jun 2025 09:59:02 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="GF9aA4Tb"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5A3C313D24D;
Wed, 4 Jun 2025 09:59:00 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749031141; cv=none; b=V8CKY3+uMOdL0Wt0pjvOzUddahKkRjtYJ7hpsmzI94ZRv/itHNLMBDxqcd1Jj6Z6ap4DC3l2oJXd1t/YuW4gOYXemtNTJ0B+AFKvZuOJ2YTm9MJ8Gu80llzzI9lQyel1lqKF62vbrp3a5bXJS6qWz6KLwTWV085ocfnb9nsLUHU=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749031141; c=relaxed/simple;
bh=CqCmbrbXobJgc1ymA9/kKEL8N3CEYCC7UPRgK9vYaoA=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=DBPNhut90BzP4z9FfFaYi6aKFAoGnHAt1GziRFfxoy24WvFSuUeNS1kGYZcP/ZSFvsOtJgo2NnX0YZbmXcRihKWEmaMpAeW2lezkI3r7rfPglbIkjBzTx3AonICVcZnAFdSvETimwSeWepvIkEQHqainAFujvmHzIsw9v73KmXs=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=GF9aA4Tb; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4A071C4CEE7;
Wed, 4 Jun 2025 09:59:00 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org;
s=korg; t=1749031140;
bh=CqCmbrbXobJgc1ymA9/kKEL8N3CEYCC7UPRgK9vYaoA=;
h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
b=GF9aA4TbIZJFMyVVDGQL3bsBKLwjB13kEJh2YOjr/VtsqKnhID7qPC+gVYoQ5gm47
SvLAtiEvMBpXUJd1EUeckKoTUmAgZd70ZpvxYUVNvIvG4xYMX9esHHrsXSTetjzCoY
3Av3FNqciKp3cEaPuk49+/o7Tjsvx8TMuS7BhNwc=
Date: Wed, 4 Jun 2025 11:58:57 +0200
From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
To: Jon Hunter <jonathanh@xxxxxxxxxx>
Cc: patches@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
torvalds@xxxxxxxxxxxxxxxxxxxx, akpm@xxxxxxxxxxxxxxxxxxxx,
linux@xxxxxxxxxxxx, shuah@xxxxxxxxxx, patches@xxxxxxxxxxxx,
lkft-triage@xxxxxxxxxxxxxxxx, pavel@xxxxxxx, f.fainelli@xxxxxxxxx,
sudipm.mukherjee@xxxxxxxxx, srw@xxxxxxxxxxxxxxxx, rwarsow@xxxxxx,
conor@xxxxxxxxxx, hargar@xxxxxxxxxxxxx, broonie@xxxxxxxxxx,
linux-tegra@xxxxxxxxxxxxxxx, stable@xxxxxxxxxxxxxxx
Subject: Re: [PATCH 6.12 00/55] 6.12.32-rc1 review
Message-ID: <2025060446-chewer-dill-080e@gregkh>
References: <20250602134238.271281478@xxxxxxxxxxxxxxxxxxx>
<ff0b4357-e2d4-4d39-aa0e-bb73c59304c1@xxxxxxxxxxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <ff0b4357-e2d4-4d39-aa0e-bb73c59304c1@xxxxxxxxxxxxxxxxxxxxxx>
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 02:41:11AM -0700, Jon Hunter wrote:
On Mon, 02 Jun 2025 15:47:17 +0200, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 6.12.32 release.
> There are 55 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Wed, 04 Jun 2025 13:42:20 +0000.
> Anything received after that time might be too late.
>
> The whole patch series can be found in one patch at:
> https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.12.32-rc1.gz
> or in the git tree and branch at:
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.12.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
Failures detected for Tegra ...
Test results for stable-v6.12:
10 builds: 10 pass, 0 fail
28 boots: 28 pass, 0 fail
116 tests: 115 pass, 1 fail
Linux version: 6.12.32-rc1-gce2ebbe0294c
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra186-p3509-0000+p3636-0001, tegra194-p2972-0000,
tegra194-p3509-0000+p3668-0000, tegra20-ventana,
tegra210-p2371-2180, tegra210-p3450-0000,
tegra30-cardhu-a04
Test failures: tegra186-p2771-0000: pm-system-suspend.sh
Any hints as to what is causing the failure?
thanks,
greg k-h
Return-Path: <linux-kernel+bounces-673053-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 1822941E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:01:04 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 125753A4030
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:00:42 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id BC4A228C5DA;
Wed, 4 Jun 2025 10:00:58 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="E1oa3V4u"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0C6AB82864
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:00:57 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749031258; cv=none; b=ZwjsNHFL9qqX80QyInaEZRln3h/rw7mVw3/sz/EhVNzwbcA7bhgf66Qg4uHZ/d3xlrRIo2BxqyYZxgsxfsQZJhYBXp76Syce9AsOHT3NEthOzm8suKHaEpSNpLyFvI1gO3+eVckYzvRkO1JyKnx1Z4u2mXCWgQ281LKU7JXfQ1Q=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749031258; c=relaxed/simple;
bh=WSg9CWk5ApKKdBW49u1Rk3H+IopeCVo+D/psH+QEf0A=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=BnLyolwARziTNTaVaFnAArxRTmS4IYJI4PG/CkQs8m4O8aw63t9GcbbSeiYRC+pdWGNSltGtorjO8bGJLT69CzX1cQ9dZm03lIIrYw1EQ9b+E9N80t2YVt3LWtYdfIScuvARfU5ZXMulprusyHth5U01L5dpbcwB1/1uJqDnv4o=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=E1oa3V4u; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1CD28C4CEEF;
Wed, 4 Jun 2025 10:00:56 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org;
s=korg; t=1749031257;
bh=WSg9CWk5ApKKdBW49u1Rk3H+IopeCVo+D/psH+QEf0A=;
h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
b=E1oa3V4u6veK7uks/BAQ+p8CLRi0LUCsi4glZVhE8XHjRZsGaS3dqmgNf2iSboNge
JaG25DXG2aWQywPQVuY3ioHKQ7xsBoFEzsfUhtClrfm4ddTMiC3zA4Qwe+lvS776UM
uc5O7d4ZmHH/aLkYN/iYJejOnC34sSEdWLoVU040=
Date: Wed, 4 Jun 2025 12:00:54 +0200
From: "gregkh@xxxxxxxxxxxxxxxxxxx" <gregkh@xxxxxxxxxxxxxxxxxxx>
To: Siddh Raman Pant <siddh.raman.pant@xxxxxxxxxx>
Cc: "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>
Subject: Re: CVE-2025-21991: x86/microcode/AMD: Fix out-of-bounds on systems
with CPU-less NUMA nodes
Message-ID: <2025060459-diaphragm-display-ba2d@gregkh>
References: <2025040257-CVE-2025-21991-6aae@gregkh>
<793ae4a30ab15d0993ce9152ce91b6b98a05b1a5.camel@xxxxxxxxxx>
<2025060430-rimless-splinter-4131@gregkh>
<064d66133dc11a95f7c5aa647784cf9bb3ede1df.camel@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <064d66133dc11a95f7c5aa647784cf9bb3ede1df.camel@xxxxxxxxxx>
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 09:54:55AM +0000, Siddh Raman Pant wrote:
On Wed, Jun 04 2025 at 14:58:03 +0530, gregkh@xxxxxxxxxxxxxxxxxxx
wrote:
> Doesn't "causing corrupted memory when flashing a microcode update" fit
> the cve.org definition of a "vulnerabilty"?
This only happens on CPU bring-up so I don't see it getting triggered
without already being exploited.
If you can get the maintainers/developers involved with this change to
agree, we will be glad to reject this.
thanks,
greg k-h
Return-Path: <linux-kernel+bounces-673054-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 7BFEF41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:01:15 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id BE9B23A40A9
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:00:52 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 9D54B28D8C5;
Wed, 4 Jun 2025 10:01:09 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="V5gVPwYN"
Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 795C282864;
Wed, 4 Jun 2025 10:01:05 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.92.199
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749031268; cv=none; b=SorhRLUi7AEbh5nAD5/2H0HG8knclqIfhfUpgZfeRSZ3TQh0cvqZB1Tx8Z5jOS1aaKXQpTCL/4WqFVPQ96bpO+Qf9D5Hd1ui8AW1zzVQWZx3GW7fA6P6JkZtoq/xhODUiHztuuW4LRUa7MO5hue+vj0mTjHHfE3Nrajcy9wCj94=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749031268; c=relaxed/simple;
bh=g7dNmCFIuya1AhW9VqQ7BiqRh+rsuId820P66lxPe3I=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=WjfuZnhYpO4Wl/devvLufNYljiBOCsJwOCN1dCtK4UBi7tSKDwU7RmWE+LLkT2uVaWV94a7SLFAdaiRl6m1KVowYh5LUlOciCftPUV/ShOPCeHEUFyZTAUJP/RVLrZX5/Kqr6GnK+2YReD7vAsncbuwYuoiH7FtCvwF/MFr5wME=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=V5gVPwYN; arc=none smtp.client-ip=90.155.92.199
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org
Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version:
References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:
Content-Transfer-Encoding:Content-ID:Content-Description;
bh=hvswKOspXfPTomvHlFFhmYJf0rg8SY9R3ztOupfQW1k=; b=V5gVPwYNk3egL6TbXhE4FB0B0O
9OWoVUpjbd6KhfBwhZs4MpN6QBPVxKc9M84ZPChKCN5d771V/VcxwIK5SrPd54p7HruLbXmcLa3OQ
cwhxmojiIlLzewnu7hRud3tIaZgHh6g15hk6XDCXKRaSyXx6AEvceQ0Bb0JH8+2rLPsKKaPxJnWwR
a+VO8SbpyJoBRODZ6x3ABpL/WJsHlOCYvuYSRaR+Rz/XdIc8o80Y8tmJwA6WEr6XR1JpE2R7PrvJv
OwDfWlH4zt+sR1HTcLNOg+UFP24YEW0rDQ6mACnzbKUXMeOWGZdZdE2JTbtlj/oXqyJYuLJgv3ug0
msCswAtw==;
Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net)
by desiato.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux))
id 1uMkvV-00000000t0z-2SCQ;
Wed, 04 Jun 2025 10:00:53 +0000
Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000)
id CC1C830078B; Wed, 4 Jun 2025 12:00:52 +0200 (CEST)
Date: Wed, 4 Jun 2025 12:00:52 +0200
From: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
To: Luo Gengkun <luogengkun@xxxxxxxxxxxxxxx>
Cc: mingo@xxxxxxxxxx, acme@xxxxxxxxxx, namhyung@xxxxxxxxxx,
mark.rutland@xxxxxxx, alexander.shishkin@xxxxxxxxxxxxxxx,
jolsa@xxxxxxxxxx, irogers@xxxxxxxxxx, adrian.hunter@xxxxxxxxx,
kan.liang@xxxxxxxxxxxxxxx, davidcc@xxxxxxxxxx,
linux-perf-users@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
Subject: Re: [PATCH v2 2/2] perf/core: Fix
WARN_ON_ONCE(cpuctx->ctx.nr_cgroups == 0) in perf_cgroup_switch
Message-ID: <20250604100052.GH38114@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20250604033924.3914647-1-luogengkun@xxxxxxxxxxxxxxx>
<20250604033924.3914647-3-luogengkun@xxxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20250604033924.3914647-3-luogengkun@xxxxxxxxxxxxxxx>
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 03:39:24AM +0000, Luo Gengkun wrote:
There may be concurrency between perf_cgroup_switch and
perf_cgroup_event_disable. Consider the following scenario: after a new
perf cgroup event is created on CPU0, the new event may not trigger
a reprogramming, causing ctx->is_active to be 0. In this case, when CPU1
disables this perf event, it executes __perf_remove_from_context->
list _del_event->perf_cgroup_event_disable on CPU1, which causes a race
with perf_cgroup_switch running on CPU0.
The following describes the details of this concurrency scenario:
CPU0 CPU1
perf_cgroup_switch:
...
# cpuctx->cgrp is not NULL here
if (READ_ONCE(cpuctx->cgrp) == NULL)
return;
perf_remove_from_context:
...
raw_spin_lock_irq(&ctx->lock);
...
# ctx->is_active == 0 because reprogramm is not
# tigger, so CPU1 can do __perf_remove_from_context
# for CPU0
__perf_remove_from_context:
perf_cgroup_event_disable:
...
if (--ctx->nr_cgroups)
...
# this warning will happened because CPU1 changed
# ctx.nr_cgroups to 0.
WARN_ON_ONCE(cpuctx->ctx.nr_cgroups == 0);
To fix this problem, expand the lock-holding critical section in
perf_cgroup_switch.
Fixes: db4a835601b7 ("perf/core: Set cgroup in CPU contexts for new cgroup events")
Signed-off-by: Luo Gengkun <luogengkun@xxxxxxxxxxxxxxx>
---
Right, so how about we simply re-check the condition once we take the
lock?
Also, take the opportunity to convert to guard instead of adding goto
unlock.
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -207,6 +207,19 @@ static void perf_ctx_unlock(struct perf_
__perf_ctx_unlock(&cpuctx->ctx);
}
+typedef struct {
+ struct perf_cpu_context *cpuctx;
+ struct perf_event_context *ctx;
+} class_perf_ctx_lock_t;
+
+static inline void class_perf_ctx_lock_destructor(class_perf_ctx_lock_t *_T)
+{ perf_ctx_unlock(_T->cpuctx, _T->ctx); }
+
+static inline class_perf_ctx_lock_t
+class_perf_ctx_lock_constructor(struct perf_cpu_context *cpuctx,
+ struct perf_event_context *ctx)
+{ perf_ctx_lock(cpuctx, ctx); return (class_perf_ctx_lock_t){ cpuctx, ctx }; }
+
#define TASK_TOMBSTONE ((void *)-1L)
static bool is_kernel_event(struct perf_event *event)
@@ -944,7 +957,13 @@ static void perf_cgroup_switch(struct ta
if (READ_ONCE(cpuctx->cgrp) == cgrp)
return;
- perf_ctx_lock(cpuctx, cpuctx->task_ctx);
+ guard(perf_ctx_lock)(cpuctx, cpuctx->task_ctx);
+ /*
+ * Re-check, could've raced vs perf_remove_from_context().
+ */
+ if (READ_ONCE(cpuctx->cgrp) == NULL)
+ return;
+
perf_ctx_disable(&cpuctx->ctx, true);
ctx_sched_out(&cpuctx->ctx, NULL, EVENT_ALL|EVENT_CGROUP);
@@ -962,7 +981,6 @@ static void perf_cgroup_switch(struct ta
ctx_sched_in(&cpuctx->ctx, NULL, EVENT_ALL|EVENT_CGROUP);
perf_ctx_enable(&cpuctx->ctx, true);
- perf_ctx_unlock(cpuctx, cpuctx->task_ctx);
}
static int perf_cgroup_ensure_storage(struct perf_event *event,
Return-Path: <linux-kernel+bounces-673055-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id B59B141E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:02:02 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 72E197A6687
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:00:42 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 6DE8028D8C7;
Wed, 4 Jun 2025 10:01:51 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=collabora.com header.i=ashley.smith@xxxxxxxxxxxxx header.b="Vp82e9Wh"
Received: from sender4-pp-f112.zoho.com (sender4-pp-f112.zoho.com [136.143.188.112])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1AFBA7082D
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:01:48 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.188.112
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749031310; cv=pass; b=HqgSWcD0M49MhLcRxjobpJmOa+7O67oNHf2Xy1ZwaX7/frmB0W8AvW6SVaTHkeCum6OomvD3ZkEMd58IoJ/oQci58MoSzyo3QNTYRyQ76sJ+6WVifRlb0Z0FDEqBsMs/2U02cXtTAhWhzzIesRdg0Ht1C7GMOkBDWNOh7oeBQms=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749031310; c=relaxed/simple;
bh=00m+DbRyqp8HvMfpmN9CYVvYGT+Po1qjBi0T8xcp3f0=;
h=Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject:
MIME-Version:Content-Type; b=DCHGqPDiivKS8tEwnlYcfB0s1Wpdft4YhPzJdraY39wZdW9F8a37I2rVisafritYY2Xg7RsrSPFVA+fbLeBcDNB3+eUzyFkLueTrdTnTeCtrKP5MAbIH0UFmIIizLXEVRthuK9h2SDVXYtniHpKz0EEWFEFTDxgthhdei+hjgpg=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (1024-bit key) header.d=collabora.com header.i=ashley.smith@xxxxxxxxxxxxx header.b=Vp82e9Wh; arc=pass smtp.client-ip=136.143.188.112
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com
ARC-Seal: i=1; a=rsa-sha256; t=1749031289; cv=none;
d=zohomail.com; s=zohoarc;
b=FRejhhTIFTuj4rxFeJOSz3XFZ0qEUzvBM97t7uJ3067hEZJ7JEFjGWyNrUfOeOJn5ghJlcsmMO/Cmecetp9EL389menn4U6w0/0L2Cvptz5bNFdJXMRepw/nKiLziCL3sK7WOX3VlK3fJkHIz9XT6yFPyYqDO1HB7o5v9KeAwpg=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc;
t=1749031289; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To;
bh=9gcEv4agCiJl8Utx0HIyKDah065hsCsg0Lwo1J+yp8k=;
b=ZwGvFOXgS9pIwa0ELza71Wk1WefJ6MYt1Dh7YO8VDY0UayzB8wM6BohEr1RA7uVCCWtokijL5eCIrYVO6dsbS6gNin574RGWEcYiVVDPdWoywalst8e8meqypRCvXeVM2sMOGbzAsbLrJtBOZ4UxO4B7Yy6e4WVbl1IlFWVun2c=
ARC-Authentication-Results: i=1; mx.zohomail.com;
dkim=pass header.i=collabora.com;
spf=pass smtp.mailfrom=ashley.smith@xxxxxxxxxxxxx;
dmarc=pass header.from=<ashley.smith@xxxxxxxxxxxxx>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1749031289;
s=zohomail; d=collabora.com; i=ashley.smith@xxxxxxxxxxxxx;
h=Date:Date:From:From:To:To:Cc:Cc:Message-ID:In-Reply-To:References:Subject:Subject:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To;
bh=9gcEv4agCiJl8Utx0HIyKDah065hsCsg0Lwo1J+yp8k=;
b=Vp82e9Wh9xGss/m1WtWrBanV3U9BlR/l9NOClM4uFlocKdw+sBYkG9iLmEsvcGao
rZ+WSoSq2TyrE+rKxl86wIrpaoNgvMjedWXyMdd9bqnSF2hbnqJa9swLFPfTUBvvnc1
bm4n1y6vnEJnr/7T2OEME5LYxiRh6EK/BYrgkKTQ=
Received: from mail.zoho.com by mx.zohomail.com
with SMTP id 1749031287445538.6080897635943; Wed, 4 Jun 2025 03:01:27 -0700 (PDT)
Date: Wed, 04 Jun 2025 11:01:27 +0100
From: Ashley Smith <ashley.smith@xxxxxxxxxxxxx>
To: "Liviu Dudau" <liviu.dudau@xxxxxxx>
Cc: "Boris Brezillon" <boris.brezillon@xxxxxxxxxxxxx>,
"Steven Price" <steven.price@xxxxxxx>,
"Maarten Lankhorst" <maarten.lankhorst@xxxxxxxxxxxxxxx>,
"Maxime Ripard" <mripard@xxxxxxxxxx>,
"Thomas Zimmermann" <tzimmermann@xxxxxxx>,
"David Airlie" <airlied@xxxxxxxxx>,
"Simona Vetter" <simona@xxxxxxxx>, "kernel" <kernel@xxxxxxxxxxxxx>,
"open list:ARM MALI PANTHOR DRM DRIVER" <dri-devel@xxxxxxxxxxxxxxxxxxxxx>,
"open list" <linux-kernel@xxxxxxxxxxxxxxx>
Message-ID: <1973a637a7f.b61987aa482053.3031227813632792112@xxxxxxxxxxxxx>
In-Reply-To: <aD7X-O8ykIGZjHjc@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20250603094952.4188093-1-ashley.smith@xxxxxxxxxxxxx>
<20250603094952.4188093-2-ashley.smith@xxxxxxxxxxxxx> <aD7X-O8ykIGZjHjc@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [PATCH v5 1/2] drm/panthor: Reset queue slots if termination
fails
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
Importance: Medium
User-Agent: Zoho Mail
X-Mailer: Zoho Mail
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Tue, 03 Jun 2025 12:09:44 +0100 Liviu Dudau <liviu.dudau@xxxxxxx> wrote:
> On Tue, Jun 03, 2025 at 10:49:31AM +0100, Ashley Smith wrote:
> > This fixes a bug where if we timeout after a suspend and the termination
> > fails, due to waiting on a fence that will never be signalled for
> > example, we do not resume the group correctly. The fix forces a reset
> > for groups that are not terminated correctly.
>
> I have a question on the commit message: you're describing a situation where
> a fence will *never* be signalled. Is that a real example? I thought this is
> not supposed to ever happen! Or are you trying to say that the fence signalling
> happens after the timeout?
This covers cases where a fence is never signalled. It shouldn't happen, but we have found this in some situations with a FW hang. Since queue_suspend_timeout() is only called on state update, if a suspend/terminate fails due to a FW hang for example this will leave delayed work, possibly leading to an incorrect queue_timeout_work(). Maybe I should not have used the word bug, it's more choosing a failsafe path.
Return-Path: <linux-kernel+bounces-673056-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 5420141E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:02:30 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id C68E31894AAE
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:02:43 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 64EEC7082D;
Wed, 4 Jun 2025 10:02:22 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="GZpFy6cG"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2A7B91F873E
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:02:18 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749031341; cv=none; b=nBDDKtuW7/8IIHd+MYc52yU3YStNpYDu91Ni2W33MwwJky23iZH7iSLq5bZQFG4AfFJZAQURlK7m7AqoYM8Q2IuDpqTTkHN4ItoljZjwnUfg+EGd2IAhxQ4h0VLlZ8WXyB6zy3t9Mj7sCWR94KSA2tSssWRF45Ei6vOozuKovKI=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749031341; c=relaxed/simple;
bh=sLPoz34XcgLXIRhfhqNHWOIvPeZoKDI1bDStOXNazJg=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=F62yCXvRopvyXIMsBHCH2UQaCQai1+icXAJwIpDFuu5TRPppMqLM51lFMexTNMWPRHfRGpAgpN0v3vRpNLC/rNa3v2PdmNyhQYcVBrlKh6xOjF7n5yCjlkRAwisbicwQRvRCNfq/LtP297dLflOXfCWH+n11ZmFQ0VxQiVxZfNY=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=GZpFy6cG; arc=none smtp.client-ip=170.10.129.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749031337;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
in-reply-to:in-reply-to:references:references;
bh=tDCGxTzwpKIeg+WG1qzk+ag5Tw2hTP//K4tpxVqw090=;
b=GZpFy6cG6npAE4OIQECGbVdy/pfwiWahwj0DH5+WImCFFFZIqMh8lbB67/R00Cwxk84YQY
gGpI0p/dZJYch35XA/BYYJ9ZMOuhuu1MlbnuPOceuIKkcivt7Y/GLi1Ijc9txnG6n+a/ej
/b9C4lQwjf9Cw2pGhZChRIaPlj8jUjM=
Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com
[209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-511-hb5wSsczNL6VCHwuhOX8vg-1; Wed, 04 Jun 2025 06:02:16 -0400
X-MC-Unique: hb5wSsczNL6VCHwuhOX8vg-1
X-Mimecast-MFC-AGG-ID: hb5wSsczNL6VCHwuhOX8vg_1749031335
Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-3a1f6c5f4f2so2424921f8f.2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 03:02:16 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749031335; x=1749636135;
h=in-reply-to:content-disposition:mime-version:references:message-id
:subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to;
bh=tDCGxTzwpKIeg+WG1qzk+ag5Tw2hTP//K4tpxVqw090=;
b=pb7wmY1zgTCbmDcCLp8GpBvTOcgku97g4BnVwxdRqZqVhSqkU7eAEYPpMImrzt/hDV
HHvIFpyhOBWNO+FEqGC2UA+gb2FgQ8DrgwfpKBk6MMMN32PmdWQszI6aVcCrEXEYTATk
fJmpqdmaPA7kTKXl/ue6DfS4R0qC73/Ho1xJRrT80e3UnVxzkV10P2HKABas4RSBlq4P
W1pkUoMksnoA26ifwaMEBTcs4HCE7O9FPel0MvBMlCIK7ONPAiZ2Xethtn+iTwSjPFUD
lvcQOVELfUsjfFIM5P9D0W3ZivjtclCnskofxRgO6PCe3gC/r+dG98l+SO+jhyPHEtwV
Fj+A==
X-Gm-Message-State: AOJu0Ywt4uo6F91uJD+Y0Y7RYbWGgPaaCN8sXXVdVDQVK54F2EnoEAfe
2ZLLxV7B2bno37iPlBXK95DRVnfyZ6QZCz/WlcNcaa6hwP16XjFN75Xgj6zEEleZBcAp6AaAKgx
8b1yXWNHgryX6AlqocvMAxkkce71IKOdRbubqzHTomQGgdMUbBPQml8Y0WudOW2spvg==
X-Gm-Gg: ASbGncvTR4iSApaS44RAvONIU0fz+sjjurZDMdzG1IQE+vv/FsjlwVFLzgpCmxHoitD
1rXso/PvAOg/QfH5eSshK1MIOcNGSwX1gEyVoi+h6AvgepYtaQdoMhbEYJ6qifHFtlA53pH+T8D
bzzQefTvWGVihmv5y7BILoLieR0N9PCMgqKm4FBA4fh+alcQixTfnENIdONAnp0dbRRgTtZKMsB
3/1tZ8rzgXgkMGgVHoAz/qzSJLvhpNbHZOmC5OwZabEvHP/46JOoY5DyZ1MPIdbrRbL1STWlwM2
4qwbOSBpzBqZJZEouIPheLHsQ4oeIQO3Pjwcp8Dn+03JwIj/49zr
X-Received: by 2002:a05:6000:2dc6:b0:3a4:d939:62fc with SMTP id ffacd0b85a97d-3a51d920b3cmr1490994f8f.22.1749031335367;
Wed, 04 Jun 2025 03:02:15 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IESd9xrE10B8oV6pKkf1J4F6ZlcEe1Vr3hNQtiSD2N7bfqicy4vZTUhvvKpmT2z676IOGjS9g==
X-Received: by 2002:a05:6000:2dc6:b0:3a4:d939:62fc with SMTP id ffacd0b85a97d-3a51d920b3cmr1490954f8f.22.1749031334938;
Wed, 04 Jun 2025 03:02:14 -0700 (PDT)
Received: from jlelli-thinkpadt14gen4.remote.csb ([151.29.57.104])
by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a4efe740bbsm21264184f8f.54.2025.06.04.03.02.13
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 03:02:13 -0700 (PDT)
Date: Wed, 4 Jun 2025 12:02:11 +0200
From: Juri Lelli <juri.lelli@xxxxxxxxxx>
To: Joel Fernandes <joelagnelf@xxxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx, Ingo Molnar <mingo@xxxxxxxxxx>,
Peter Zijlstra <peterz@xxxxxxxxxxxxx>,
Vincent Guittot <vincent.guittot@xxxxxxxxxx>,
Dietmar Eggemann <dietmar.eggemann@xxxxxxx>,
Steven Rostedt <rostedt@xxxxxxxxxxx>,
Ben Segall <bsegall@xxxxxxxxxx>, Mel Gorman <mgorman@xxxxxxx>,
Valentin Schneider <vschneid@xxxxxxxxxx>, Tejun Heo <tj@xxxxxxxxxx>,
David Vernet <void@xxxxxxxxxxxxx>, Andrea Righi <arighi@xxxxxxxxxx>,
Changwoo Min <changwoo@xxxxxxxxxx>
Subject: Re: [PATCH v2 06/10] sched/debug: Add support to change sched_ext
server params
Message-ID: <aEAZo3_g-OMVEgc-@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20250602180110.816225-1-joelagnelf@xxxxxxxxxx>
<20250602180110.816225-7-joelagnelf@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20250602180110.816225-7-joelagnelf@xxxxxxxxxx>
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hi Joel,
On 02/06/25 14:01, Joel Fernandes wrote:
When a sched_ext server is loaded, tasks in CFS are converted to run in
sched_ext class. Modify the ext server parameters as well along with the
fair ones.
Re-use the existing interface to modify both ext and fair servers to
keep number of interfaces less (as it is, we have a per-cpu interface).
We have a bit of code duplication, don't we? I wonder if we can do
anything early on to prevent mis-alignment between servers in the
future.
Also, is a single shared interface enough? Is the assumption that either
all tasks are FAIR or SCX always guaranteed?
Thanks,
Juri
Return-Path: <linux-kernel+bounces-673057-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 5458441E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:03:04 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 3C3C87A9AC3
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:01:43 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id B05DE28D8F6;
Wed, 4 Jun 2025 10:02:48 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="KQ3jDaEv"
Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id B7C4F28C2CC;
Wed, 4 Jun 2025 10:02:45 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749031367; cv=none; b=qHBZqGnCrWIzo9Skd76rdXZwMtnW3KFJBc5q1yJjj5wUjNdUfEPzp/7pSdlT3pGNjdrQRRdcvUBFzHlgTgfpjITz4uaZUBN9RsFAwr5m8lmAmGLc49tqhcRGqNHj9TB2AC6+1BjHgKJoWae2+qBfjXDjXS2rhCm6VcxZWH5q7Vk=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749031367; c=relaxed/simple;
bh=hHfwX93Z1LNoyiAbTbrxQDAYuvLkrymMo+5mny2wZDk=;
h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From:
In-Reply-To:Content-Type; b=LeJCUTVe06PidsrYchuiCrCaiRIc3XbDeu3twpHYQlWtgZVWpANEAHpN6ciL6xjLfAeaePC9Bq8r6hSPHTsfgkbWP+X4+qw6Q4AAp0TZyX5tQoHeU81zUXFGd4ywAAMFto589z6KmebH2m6H8JfmGJYBjHScKaTmVX/UNSOhd7E=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=KQ3jDaEv; arc=none smtp.client-ip=205.220.168.131
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com
Received: from pps.filterd (m0279864.ppops.net [127.0.0.1])
by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 554875DU013521;
Wed, 4 Jun 2025 10:02:33 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=
cc:content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=qcppdkim1; bh=
XMWU8a/DXCAez/wWFLWi1bCf9nSDlbvC+BavkR9SOYM=; b=KQ3jDaEvx5GGJ8o4
m5n+AGbafDd5oOq98rJZgBZknQLd+eBkzYNJLIt8I7YuRe/IRyE+to8KoufHmDKp
mzx3szcPwOkjKSy8tCQw641WLwcoBP4bP06bmek8LEpUv34/oqGl+6I70F/MsZjQ
AdVfEQAUAtZAcBvVHUMZqtxr5+9lvRTwM9sL5ir3VnoEBke78OlAVMKS1CfWdllo
rBEZRPHFHRJA5MECQatsw+0N0jn2cMvrtrcui96p5U63imNpsdvenDxRg0M7OwH3
MmhDZDwUZNDrjtXoIPMtATRoxwqF31he6qowg6hJXPt77tepnHp8DqO0WqJwG8f4
mI58IQ==
Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254])
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 471g8nnmx7-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 10:02:32 +0000 (GMT)
Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250])
by NASANPPMTA04.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 554A2Wh6005912
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 4 Jun 2025 10:02:32 GMT
Received: from [10.239.31.134] (10.80.80.8) by nasanex01b.na.qualcomm.com
(10.46.141.250) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Wed, 4 Jun 2025
03:02:27 -0700
Message-ID: <772f5e33-5040-4a68-84f4-25e048aa4432@xxxxxxxxxxx>
Date: Wed, 4 Jun 2025 18:02:10 +0800
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v1 2/4] dt-bindings: PCI: qcom,pcie-sa8775p: document
link_down reset
To: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>,
Ziyue Zhang
<quic_ziyuzhan@xxxxxxxxxxx>
CC: <lpieralisi@xxxxxxxxxx>, <kwilczynski@xxxxxxxxxx>,
<manivannan.sadhasivam@xxxxxxxxxx>, <robh@xxxxxxxxxx>,
<bhelgaas@xxxxxxxxxx>, <krzk+dt@xxxxxxxxxx>,
<neil.armstrong@xxxxxxxxxx>, <abel.vesa@xxxxxxxxxx>, <kw@xxxxxxxxx>,
<conor+dt@xxxxxxxxxx>, <vkoul@xxxxxxxxxx>, <kishon@xxxxxxxxxx>,
<andersson@xxxxxxxxxx>, <konradybcio@xxxxxxxxxx>,
<linux-arm-msm@xxxxxxxxxxxxxxx>, <linux-pci@xxxxxxxxxxxxxxx>,
<linux-phy@xxxxxxxxxxxxxxxxxxx>, <devicetree@xxxxxxxxxxxxxxx>,
<linux-kernel@xxxxxxxxxxxxxxx>, <quic_krichai@xxxxxxxxxxx>,
<quic_vbadigan@xxxxxxxxxxx>
References: <20250529035416.4159963-1-quic_ziyuzhan@xxxxxxxxxxx>
<20250529035416.4159963-3-quic_ziyuzhan@xxxxxxxxxxx>
<drr7cngryldptgzbmac7l2xpryugbrnydke3alq5da2mfvmgm5@nwjsqkef7ypc>
<e8d1b60c-97fe-4f50-8ead-66711f1aa3a7@xxxxxxxxxxx>
<34dnpaz3gl5jctcohh5kbf4arijotpdlxn2eze3oixrausyev3@4qso3qg5zn4t>
Content-Language: en-US
From: Qiang Yu <quic_qianyu@xxxxxxxxxxx>
In-Reply-To: <34dnpaz3gl5jctcohh5kbf4arijotpdlxn2eze3oixrausyev3@4qso3qg5zn4t>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To
nasanex01b.na.qualcomm.com (10.46.141.250)
X-QCInternal: smtphost
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085
X-Proofpoint-GUID: M78myJrI6CB7Jy1T4BD-DqDvxKB0H3iT
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDA3NSBTYWx0ZWRfX5qxemDmXAipZ
ZahAIbqzRnKjfSdtDOq9GBm9FSXMjDmVOsVEqjI0FJsT/CgS4CZyo33r37vFQ4sojv5JaIO8aJD
XIbVLAx/5mkc2FTZMWqRgeAjA0p5+a/zI2+jKSOEU+jFjxMQubv4GrwfoSpbXmx2AtduwrPs1eL
xMTUM2aahi+KZ+tb8qvhqM/hfyOdmbL3qNvPOL/LsjwjfmbjVcKmrR2lC2gxv/60ROjQEnvXBcI
fLMvbfg6YgHI+cMZlxcDN1vFv4XvLuNN3ox4HW6aPELt7iommu0ThBOwgGpBcNH7YvyzZ8CBj7W
2tPwUbXlhkHoPCUrfrwhcqwqDKiUs/7OiXLL2co7KY3ZW8UCzIUm9q2D+y6xNRfBmtlsw0g6Lqh
oPM2XNdFd25s/sfIBC+NquMVzeNMDi3yKeD3TszK8WUNguXEqdKZjuLSuSFfM/rdPjC4hq9T
X-Proofpoint-ORIG-GUID: M78myJrI6CB7Jy1T4BD-DqDvxKB0H3iT
X-Authority-Analysis: v=2.4 cv=UphjN/wB c=1 sm=1 tr=0 ts=684019b8 cx=c_pps
a=JYp8KDb2vCoCEuGobkYCKw==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17
a=GEpy-HfZoHoA:10 a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10 a=JfrnYn6hAAAA:8
a=COk6AnOGAAAA:8 a=gDmLj3BAQhsnJV4uteAA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10
a=1CNFftbPRP8L7MoqJWF3:22 a=TjNXssC_j7lpFel5tvFf:22
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_02,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
priorityscore=1501 spamscore=0 impostorscore=0 lowpriorityscore=0
phishscore=0 mlxlogscore=999 clxscore=1011 malwarescore=0 adultscore=0
bulkscore=0 mlxscore=0 suspectscore=0 classifier=spam authscore=0 authtc=n/a
authcc= route=outbound adjust=0 reason=mlx scancount=1
engine=8.19.0-2505280000 definitions=main-2506040075
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 6/4/2025 5:15 PM, Dmitry Baryshkov wrote:
On Wed, Jun 04, 2025 at 03:58:33PM +0800, Ziyue Zhang wrote:
On 6/3/2025 9:11 PM, Dmitry Baryshkov wrote:
On Thu, May 29, 2025 at 11:54:14AM +0800, Ziyue Zhang wrote:
Each PCIe controller on sa8775p supports 'link_down'reset on hardware,
document it.
I don't think it's possible to "support" reset in hardware. Either it
exists and is routed, or it is not.
Hi Dmitry,
I will change the commit msg to
'Each PCIe controller on sa8775p includes 'link_down'reset on hardware,
document it.'
"Supports" implies that the PCIe controller has an active role in enabling
or managing the reset functionality—it suggests that the controller is designed
to accommodate or facilitate this feature.
"Includes" simply states that the reset functionality is present in the
hardware—it exists, whether or not it's actively managed or configurable.
So I think change it to includes will be better.
BRs
Ziyue
Signed-off-by: Ziyue Zhang <quic_ziyuzhan@xxxxxxxxxxx>
---
.../devicetree/bindings/pci/qcom,pcie-sa8775p.yaml | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-sa8775p.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie-sa8775p.yaml
index e3fa232da2ca..805258cbcf2f 100644
--- a/Documentation/devicetree/bindings/pci/qcom,pcie-sa8775p.yaml
+++ b/Documentation/devicetree/bindings/pci/qcom,pcie-sa8775p.yaml
@@ -61,11 +61,14 @@ properties:
- const: global
resets:
- maxItems: 1
+ minItems: 1
+ maxItems: 2
Shouldn't we just update this to maxItems:2 / minItems:2 and drop
minItems:1 from the next clause?
Hi Dmitry,
link_down reset is optional. In many other platforms, like sm8550
and x1e80100, link_down reset is documented as a optional reset.
PCIe will works fine without link_down reset. So I think setting it
as optional is better.
You are describing a hardware. How can a reset be optional in the
_hardware_? It's either routed or not.
I feel a bit confused. According to the theory above, everything seems to
be non-optional when describing hardware, such as registers, clocks,
resets, regulators, and interrupts—all of them either exist or do not.
Seems like I misunderstand the concept of 'optional'? Is 'optional' only
used for compatibility across different platforms?
Additionally, we have documented the PCIe global interrupt as optional. I
was taught that, in the PCIe driver, this interrupt is retrieved using the
platform_get_irq_byname_optional API, so it can be documented as optional.
However, this still seems to contradict the theory mentioned earlier.
BRs
Ziyue
reset-names:
+ minItems: 1
items:
- - const: pci
+ - const: pci # PCIe core reset
+ - const: link_down # PCIe link down reset
required:
- interconnects
@@ -161,8 +164,10 @@ examples:
power-domains = <&gcc PCIE_0_GDSC>;
- resets = <&gcc GCC_PCIE_0_BCR>;
- reset-names = "pci";
+ resets = <&gcc GCC_PCIE_0_BCR>,
+ <&gcc GCC_PCIE_0_LINK_DOWN_BCR>;
+ reset-names = "pci",
+ "link_down";
perst-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>;
wake-gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
--
2.34.1
--
linux-phy mailing list
linux-phy@xxxxxxxxxxxxxxxxxxx
https://lists.infradead.org/mailman/listinfo/linux-phy
--
With best wishes
Qiang Yu
Return-Path: <linux-kernel+bounces-673058-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 3E05F41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:03:57 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 3CB073A46E0
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:03:35 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 491E128D8ED;
Wed, 4 Jun 2025 10:03:48 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="S1Wxwlrx"
Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4BBDD2B9BC;
Wed, 4 Jun 2025 10:03:45 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.170
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749031427; cv=none; b=t0j9MPq255Y8J/yKr4s5WKxopKVbB28Zt/+j0J65a0e4qocwrocrdEkTFLBdW/QYMrmW4Mg22W3eBnWKuXoVUWackPNXSSoy2wvBqXAAUi5i+YHO2cR24u4/cqrzd6ocAYPnoI1Mdoy1Xq3xMY1m3xe+W3GjjvoTpKs+qQyBO9M=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749031427; c=relaxed/simple;
bh=iYIRVfkXKufURUDOPAucqCIYt8hFzqU7YK1s1FIrhP8=;
h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
To:Cc:Content-Type; b=cpjgGwsaGUkv2+I1avQd1HIKNS4Uthe4OmE04T8J6MJpnsV6T7kO1MqQywk39GKND+E/tpfXrm4jSyj8cGQeYbgh8cxl/gsIzN1j2i12ivOFFt7D56MftX7pgAuDvICsJD2Z9cDceHS7g0nss0q04vT2WOqeYygPnjEaQ1xzZvg=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=S1Wxwlrx; arc=none smtp.client-ip=209.85.215.170
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
Received: by mail-pg1-f170.google.com with SMTP id 41be03b00d2f7-b2705e3810cso616427a12.0;
Wed, 04 Jun 2025 03:03:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1749031425; x=1749636225; darn=vger.kernel.org;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:from:to:cc:subject:date
:message-id:reply-to;
bh=iYIRVfkXKufURUDOPAucqCIYt8hFzqU7YK1s1FIrhP8=;
b=S1WxwlrxhvGu6me8x2hmoqmLFx0N/FFnA33hE72rpQc1A5/c1t++4Mmptr+z3mtIkz
oTFH1BC2Zn8KWUUdUBocQ/bKsHO6jbZmDTrUgpCxfXVQ6WsnvjaU/ulUv2eUgpm/XCgd
We/9m5qc1cet7OpEGzSKqsdG/HvXs1sQUPDOIt7RaktlnFxxi1G46F4Bo+bYpkKKS4r6
O/PpcX6sjSBuq5kadHPj6H1/kSMyJ3gZGM6mJn7yd1DDR3gAhP6PhfXPxRPdYDtprNWe
OrJWXmugdDg4k07MCq3qlLK3bkXqC/nzSj0DlI08ZMwIS/pXu2tDZc08SvlP3xqMOKzX
4gGQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749031425; x=1749636225;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=iYIRVfkXKufURUDOPAucqCIYt8hFzqU7YK1s1FIrhP8=;
b=kiajUKFb+YciceI/bfQl/srESzixdq+ucvdacKuSWihUuBNajiYPi79IRMhSIGtgyK
w51uam2zMIySseq7Ns0hAgVn+Hhku3MffYyyS9oyiVBgnrjDveX805rXj9sVYNhkxeV/
JVxHDaBFtpp6YVcdKnePbHkrB8trocM/Azbsbv16iY6a8WfCeYnOiSNMjGPftZIuXtRi
eNFkYwgMWjpxcg9Qn7CJc204Mz9V0cfdeoCiQbH3BnJPmCPXqvm9UMXqLAT6ibJiLsP6
ciGihq5LGy2W+jNvL5u7b+hJPBEPpjDNTzD/nSV/L0iveTZ7Aari0fJWtaicSBX5dJmM
6Glg==
X-Forwarded-Encrypted: i=1; AJvYcCVoR4bKUal6gHODOhLxXCqWFVb9XmW5ShMTeugPBt5LlzMLnJQHG1lWYS4m8p6sxYVd1IoIfY7KfCT+h0vxfys=@vger.kernel.org, AJvYcCWE5qRUUlT93lknJWIB5tBL9LYZgprTT2sMhF+hqCAF6ATPUFqt6KvytOZfm0Z+YZSWHH6jsOn0bpOShRs=@vger.kernel.org
X-Gm-Message-State: AOJu0Yz+DLjqjC1yNlu7e5RGGfUdZ/qQDPTfqX9uVuewTQNxU87C5nOO
idOb5+YYse0hu7mTKgRDLH/CG9ESotDJozl7Fp5JqAcO5esiIEiNusPaM2JAeeQ6EYES6vgE+CZ
rSBmD7Rh7FEnpPkklgBJgBth+mY7D7xI=
X-Gm-Gg: ASbGncuAaDglpX1NYJItmOs+QNhJ7QgAATku54pvwOXcji9DgY96zcngj/vb52Fp5Hh
4fiv8ggua0C2KukuLUZJvSvsljfWlbOvf7CIouxNB5Ccg5M51jDdp8ObHeNaVMsBtmM+AHmwwoU
+w5hAXF4OdfF/TS2GDHlgR38b1Pbanb/mD
X-Google-Smtp-Source: AGHT+IFY54/4SXuHhNfhR34u/tz7WHBUhSm2/IfQ3AqffQFchQvW18uxeL7Cd6oGwhaiU9pD6yfyiIBQ6dRYcZzfLS8=
X-Received: by 2002:a17:903:181:b0:234:11cb:6f95 with SMTP id
d9443c01a7336-235e116766cmr12020315ad.6.1749031425395; Wed, 04 Jun 2025
03:03:45 -0700 (PDT)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
References: <20250521-nova-frts-v4-0-05dfd4f39479@xxxxxxxxxx>
<20250521-nova-frts-v4-16-05dfd4f39479@xxxxxxxxxx> <f528cd2d491f15404f30317dd093cc7af5a00fa7.camel@xxxxxxxxxx>
In-Reply-To: <f528cd2d491f15404f30317dd093cc7af5a00fa7.camel@xxxxxxxxxx>
From: Miguel Ojeda <miguel.ojeda.sandonis@xxxxxxxxx>
Date: Wed, 4 Jun 2025 12:03:32 +0200
X-Gm-Features: AX0GCFvjWD_zgPyKD-OQaU5vX3FRf-KmGpph09TCktkVk0tXDV8Lo-vignDRYHw
Message-ID: <CANiq72=daoTUH0qdEuTLtgaDsdNj=RVvX4fn2xjDtQZn7-xYcw@xxxxxxxxxxxxxx>
Subject: Re: [PATCH v4 16/20] nova-core: Add support for VBIOS ucode
extraction for boot
To: Lyude Paul <lyude@xxxxxxxxxx>
Cc: Alexandre Courbot <acourbot@xxxxxxxxxx>, Miguel Ojeda <ojeda@xxxxxxxxxx>,
Alex Gaynor <alex.gaynor@xxxxxxxxx>, Boqun Feng <boqun.feng@xxxxxxxxx>,
Gary Guo <gary@xxxxxxxxxxx>, =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= <bjorn3_gh@xxxxxxxxxxxxxx>,
Benno Lossin <benno.lossin@xxxxxxxxx>, Andreas Hindborg <a.hindborg@xxxxxxxxxx>,
Alice Ryhl <aliceryhl@xxxxxxxxxx>, Trevor Gross <tmgross@xxxxxxxxx>,
Danilo Krummrich <dakr@xxxxxxxxxx>, David Airlie <airlied@xxxxxxxxx>, Simona Vetter <simona@xxxxxxxx>,
Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>, Maxime Ripard <mripard@xxxxxxxxxx>,
Thomas Zimmermann <tzimmermann@xxxxxxx>, John Hubbard <jhubbard@xxxxxxxxxx>,
Ben Skeggs <bskeggs@xxxxxxxxxx>, Joel Fernandes <joelagnelf@xxxxxxxxxx>,
Timur Tabi <ttabi@xxxxxxxxxx>, Alistair Popple <apopple@xxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx,
rust-for-linux@xxxxxxxxxxxxxxx, nouveau@xxxxxxxxxxxxxxxxxxxxx,
dri-devel@xxxxxxxxxxxxxxxxxxxxx, Shirish Baskaran <sbaskaran@xxxxxxxxxx>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Tue, Jun 3, 2025 at 11:05=E2=80=AFPM Lyude Paul <lyude@xxxxxxxxxx> wrote=
:
Not sure this makes sense - debug_assertions is supposed to be about
assertions, we probably shouldn't try to use it for other things (especia=
lly
since we've already got dev_dbg! here)
Yeah, we added it in `pr_debug!`, but I think we should match the C
side for that one instead.
In general, we probably want to say that enabling `debug_assertions`
should ideally have no "visible" effect on the program if there are no
bugs (modulo performance etc.; and it should have a loud effect if
there is indeed a bug :)
Cheers,
Miguel
Return-Path: <linux-kernel+bounces-673059-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 946B541E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:04:18 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id B9758171BC4
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:04:19 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id D8F2028D8C7;
Wed, 4 Jun 2025 10:04:09 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="TdqsUA0A"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id A5EA8748F
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:04:07 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749031449; cv=none; b=Ma/RpwR/NaOjoplm3rOT1Y9B/guVhMXtIB9IIDhFSAv1JdhoCHk0+nrV4+z1YK0+3nLVGYamqr1n3O2fHZdj5zMQAjk4/fTJRdWi06dpEMTOxufV9XfGdm72brEzeeS+y61mhh8ufoixkQ1wT/xShoZZszeq/M2jv+Zi93lD4/M=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749031449; c=relaxed/simple;
bh=seIrY0Gby6UPJGXQDaLd+t1ObaudYSJ3nxhZrP8pwDE=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=BEFC2Mko3M7N5eyx3qRZ31LuhRVie0PmsnvK2TUR+aA533eAVd/s2bmp67Ens+QkpHOCzeRuDmiTNMTBkMKRLVX+yRJEmSVExwfU9z/rINkpvv2Mxtm4QWsV6Cpa3R0a8W7+01kYvRxaodtZgf+9iB+JcW18wt/u/EteIttfKMs=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=TdqsUA0A; arc=none smtp.client-ip=170.10.133.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749031446;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
in-reply-to:in-reply-to:references:references;
bh=XnIkrheePomCWgtSzx9cRRzzCoqZnIbbmr/u3ys8YZ8=;
b=TdqsUA0AGRcFk/Y9TM+nlr1DSjCHTzMQZHHNLStKMaztAJTjHxnCLH9HRj3KHbnManhNhV
F2bXbpU88HXC2vmgqBRwKFMRvn0l4sLoH252ic7SifgnKLZoXt3OceZHKRsI41j5zUWNAs
TSq6g8rC/SI/QOybvt1ZF4ajjElog4s=
Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com
[209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-176-xJiOGo6cNt2zgbeHtccfuA-1; Wed, 04 Jun 2025 06:04:05 -0400
X-MC-Unique: xJiOGo6cNt2zgbeHtccfuA-1
X-Mimecast-MFC-AGG-ID: xJiOGo6cNt2zgbeHtccfuA_1749031444
Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-451deff247cso3686465e9.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 03:04:04 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749031444; x=1749636244;
h=in-reply-to:content-disposition:mime-version:references:message-id
:subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to;
bh=XnIkrheePomCWgtSzx9cRRzzCoqZnIbbmr/u3ys8YZ8=;
b=D8vsSPUMbREFrJdVk8PrJs1cL5CFYDl5XcqfCA/pxtfefWZM6T87m7D3OwQWfd/1CN
YP8RfDxhjqlXabfiBEh8s4fH6e9xpIAqA72Jsnkv2xr24QzKKnBkNoIZEWR6Ll4Lp9tc
giui4seRbO5xUNPtPAImEpXvIX5mf+KF2loQEyDiaWI1VkcfwnIZBUIQCghEvJafT6n8
SXTfP12E4sjYK9O9oDJdqH9gNaKfQ4Yurk1nDJj27CuV7O9lq2LYXgUKlU0xE4oivyLn
SYlT/Qm6H7/MsznvzQdJxINzHmQxMpn1uTABWYoBEIedq/MGpKL7tyS0KtnsbNdUDl/+
CcMg==
X-Gm-Message-State: AOJu0Yx/gwn7FaZm2sZeqaq1/scYG3bBauV3+BVojfoitsO9AlXhtZRL
d3qLfFeHs1x61jQoDUw44XkhiFCmaLGktWjlczzSNTZ3Dv9C8Q1Wbx70R0a+31/dwS2NGa1WPCq
rmFseWenmupzqEm9j7VKXDmx4RnGqoZG18bKxNghG1Z5EChC/lfx9FSHqpg0s8JLwMw==
X-Gm-Gg: ASbGnct6/O3SXtsJucBgHxl/vEfURkzukpKVn9AUx/bN2bVHHLM17rMobiHsnTbOrB8
/f5raEEmPnd3qE5UrTmAGaO8kptKc/bfOlhKHRvIejo3cW0QKPRBWVJBgylIylJQQNvaVFuLLQP
XWJXrvIwGUaTb5EbDz68swEcJOlQt8l9rvpIMclimanzozGsW9A3up+245ctmYPRmHCVcq3YFAB
B5V1X2dKfbKYQ3bgRPXpLQrtODlFPCoFvjJXR/HzWDbqZG7TUJWE9h7jKMBNmpl2XPdZrJpnLDX
Js9Oh95MYGVla6rQCrWcHU5tBCJgralgQ1Ctd3tiiOPxXreOJ6G+
X-Received: by 2002:a05:600c:a4b:b0:442:d9fb:d9a5 with SMTP id 5b1f17b1804b1-451efe974c2mr18272245e9.9.1749031443833;
Wed, 04 Jun 2025 03:04:03 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IEanHcVyh1FY7biXgLM1BeG/aTZ81EZcXqzt0tAJ++LQpzUI+38SEUMpUWcen4rJLqfhMG5vg==
X-Received: by 2002:a05:600c:a4b:b0:442:d9fb:d9a5 with SMTP id 5b1f17b1804b1-451efe974c2mr18271985e9.9.1749031443438;
Wed, 04 Jun 2025 03:04:03 -0700 (PDT)
Received: from jlelli-thinkpadt14gen4.remote.csb ([151.29.57.104])
by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-450d8000d8csm192945285e9.24.2025.06.04.03.04.02
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 03:04:02 -0700 (PDT)
Date: Wed, 4 Jun 2025 12:04:01 +0200
From: Juri Lelli <juri.lelli@xxxxxxxxxx>
To: Joel Fernandes <joelagnelf@xxxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx, Ingo Molnar <mingo@xxxxxxxxxx>,
Peter Zijlstra <peterz@xxxxxxxxxxxxx>,
Vincent Guittot <vincent.guittot@xxxxxxxxxx>,
Dietmar Eggemann <dietmar.eggemann@xxxxxxx>,
Steven Rostedt <rostedt@xxxxxxxxxxx>,
Ben Segall <bsegall@xxxxxxxxxx>, Mel Gorman <mgorman@xxxxxxx>,
Valentin Schneider <vschneid@xxxxxxxxxx>, Tejun Heo <tj@xxxxxxxxxx>,
David Vernet <void@xxxxxxxxxxxxx>, Andrea Righi <arighi@xxxxxxxxxx>,
Changwoo Min <changwoo@xxxxxxxxxx>
Subject: Re: [PATCH v2 04/10] sched/debug: Fix updating of ppos on server
write ops
Message-ID: <aEAaEc0-WAnklXjh@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20250602180110.816225-1-joelagnelf@xxxxxxxxxx>
<20250602180110.816225-5-joelagnelf@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20250602180110.816225-5-joelagnelf@xxxxxxxxxx>
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hi Joel,
On 02/06/25 14:01, Joel Fernandes wrote:
Updating "ppos" on error conditions does not make much sense. The pattern
is to return the error code directly without modifying the position, or
modify the position on success and return the number of bytes written.
Since on success, the return value of apply is 0, there is no point in
modifying ppos either. Fix it by removing all this and just returning
error code or number of bytes written on success.
Looks like patches 04, 05 and 07 are standalone fixes. If that is indeed
the case maybe we could move them to the start of this series so that
they can picked up independently (or split them to a separate series)?
Thanks,
Juri
Return-Path: <linux-kernel+bounces-673060-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id BA5FE41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:05:58 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 0CCB77AA111
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:04:37 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 953FC28D8EF;
Wed, 4 Jun 2025 10:05:42 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="PXU03Ir8"
Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 46F40280339;
Wed, 4 Jun 2025 10:05:39 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749031541; cv=none; b=e+nWbfrY2nVa+JKIzHVLh0okbzmrzfsSkq3q9ff/lM7gU3KTb5I4NSWm+jIywKFJ2r0TpN1B1SFw4mGuUJoi4Pa4ufkf1DdRbXK4Wig+ryy/xarKJMkVUgqAeX2qB9wtz/BInoXrruSlZu7Q+6ewE2uT73zsIbmaKowKWNPnD3I=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749031541; c=relaxed/simple;
bh=CcTfuyjqSM12x50F8W1XyXrsWuiAPxaoahPzB/aeJmc=;
h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From:
In-Reply-To:Content-Type; b=aQ87C7gwMBFSxktq2weOvTvr2V3EHoqeZo4D/upDPGuRc6I+IwFIynYfvDZIvVVSTkZDI3jju50aHp/AIlSzYoNET+6olR3oc4XwjoETwfieMfTgFkgI3jINiLwwtmncxrw+5GZG5MQtFNyZEVGinNOCF+idMN/7jSiq6WUOmpA=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=PXU03Ir8; arc=none smtp.client-ip=205.220.168.131
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com
Received: from pps.filterd (m0279866.ppops.net [127.0.0.1])
by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5548d3Ql004284;
Wed, 4 Jun 2025 10:05:30 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=
cc:content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=qcppdkim1; bh=
LLWn+M7Jb3tl19nO3TgCdp05g80bpe8bTMMZoETnm2Y=; b=PXU03Ir8zSvNrplc
go2gEUMB7tWONFsOvQ4viPgwwLQCBqTeLr0ioCBXLKX7KGEwEmG9dec0lrVC+TpZ
DFbcCqqB93ykpzgvAgiD7655+Y/IUzzlpQPDFdKMb0+vs7kdPhwYqIGkfiMd3GwV
zfROOOuTVb/uc8jAnBkzwgnaV15H85cRjGi26wMdCg/ehBjexd2vVDMf7mOOlFA8
y3v+TCYWPU5W2ZKJnlZREvgmVCDQy10Nqni+IU7MzZcJSrAFQAE9TDAdRxghW6ep
TFQECwHEgF/L7h85Om1BMxo1MXUo3eys/MPN3BgUqYtooWTind0yx+oDC9B8BWwA
WsWwoA==
Received: from nasanppmta03.qualcomm.com (i-global254.qualcomm.com [199.106.103.254])
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 471g8rwpja-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 10:05:30 +0000 (GMT)
Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250])
by NASANPPMTA03.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 554A5TEm005531
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 4 Jun 2025 10:05:29 GMT
Received: from [10.239.31.134] (10.80.80.8) by nasanex01b.na.qualcomm.com
(10.46.141.250) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Wed, 4 Jun 2025
03:05:24 -0700
Message-ID: <43a6e141-adab-42e9-9966-ec54cb91a6de@xxxxxxxxxxx>
Date: Wed, 4 Jun 2025 18:05:21 +0800
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v1 2/4] dt-bindings: PCI: qcom,pcie-sa8775p: document
link_down reset
To: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>,
Ziyue Zhang
<quic_ziyuzhan@xxxxxxxxxxx>
CC: <lpieralisi@xxxxxxxxxx>, <kwilczynski@xxxxxxxxxx>,
<manivannan.sadhasivam@xxxxxxxxxx>, <robh@xxxxxxxxxx>,
<bhelgaas@xxxxxxxxxx>, <krzk+dt@xxxxxxxxxx>,
<neil.armstrong@xxxxxxxxxx>, <abel.vesa@xxxxxxxxxx>, <kw@xxxxxxxxx>,
<conor+dt@xxxxxxxxxx>, <vkoul@xxxxxxxxxx>, <kishon@xxxxxxxxxx>,
<andersson@xxxxxxxxxx>, <konradybcio@xxxxxxxxxx>,
<linux-arm-msm@xxxxxxxxxxxxxxx>, <linux-pci@xxxxxxxxxxxxxxx>,
<linux-phy@xxxxxxxxxxxxxxxxxxx>, <devicetree@xxxxxxxxxxxxxxx>,
<linux-kernel@xxxxxxxxxxxxxxx>, <quic_krichai@xxxxxxxxxxx>,
<quic_vbadigan@xxxxxxxxxxx>
References: <20250529035416.4159963-1-quic_ziyuzhan@xxxxxxxxxxx>
<20250529035416.4159963-3-quic_ziyuzhan@xxxxxxxxxxx>
<drr7cngryldptgzbmac7l2xpryugbrnydke3alq5da2mfvmgm5@nwjsqkef7ypc>
<e8d1b60c-97fe-4f50-8ead-66711f1aa3a7@xxxxxxxxxxx>
<34dnpaz3gl5jctcohh5kbf4arijotpdlxn2eze3oixrausyev3@4qso3qg5zn4t>
Content-Language: en-US
From: Qiang Yu <quic_qianyu@xxxxxxxxxxx>
In-Reply-To: <34dnpaz3gl5jctcohh5kbf4arijotpdlxn2eze3oixrausyev3@4qso3qg5zn4t>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To
nasanex01b.na.qualcomm.com (10.46.141.250)
X-QCInternal: smtphost
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085
X-Proofpoint-ORIG-GUID: kr1ygYF-xldh2_nW38WLv7Xgzahp8F7z
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDA3NiBTYWx0ZWRfXydctOvOa9SmP
/qo4oM6jGlGtQACfZRJfoYKTaT+0JMovEgzeaLABBzhhxSoeNFrgazYh/bLrGlaPROVjgG6VElB
jEcJGd7ennwLg94abgN2FMZP5TaYC3ZtN08IG1fWFyaOKWQh17I1yR1Gx0ad8BCMJfFRvwf5GjP
AIu9eD+6PMgzpGaI6DvCPzZsm+7WvqmwKd39DDeTn5jeS8dODGTJtWcaV+bjIP6Q/MqGI1l1xUI
xnCrjAfMsaba9rtNIAjl7BRbOsnGbWrb//JpxgKl1fj0Z+8zLX3wNtR2FpdffEvDVZOhEGbCbWG
HYV5sXx+phgwwmYtipQIaa7mKWb2pX/SLTiMntx7YU2a62RAQt+goxFDevDnC88x+c2fe66VbXz
lfEa5xAF/86c4Ckt4viy9KwCvZjwtLfdslPcbkC44R6zEJeKkNK+9+Ixzxbogc8ckbl9jQpL
X-Authority-Analysis: v=2.4 cv=RdWQC0tv c=1 sm=1 tr=0 ts=68401a6a cx=c_pps
a=JYp8KDb2vCoCEuGobkYCKw==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17
a=GEpy-HfZoHoA:10 a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10 a=JfrnYn6hAAAA:8
a=COk6AnOGAAAA:8 a=gDmLj3BAQhsnJV4uteAA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10
a=1CNFftbPRP8L7MoqJWF3:22 a=TjNXssC_j7lpFel5tvFf:22
X-Proofpoint-GUID: kr1ygYF-xldh2_nW38WLv7Xgzahp8F7z
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_02,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
bulkscore=0 adultscore=0 mlxscore=0 priorityscore=1501 phishscore=0
clxscore=1011 lowpriorityscore=0 malwarescore=0 suspectscore=0
impostorscore=0 spamscore=0 mlxlogscore=999 classifier=spam authscore=0
authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1
engine=8.19.0-2505280000 definitions=main-2506040076
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 6/4/2025 5:15 PM, Dmitry Baryshkov wrote:
On Wed, Jun 04, 2025 at 03:58:33PM +0800, Ziyue Zhang wrote:
On 6/3/2025 9:11 PM, Dmitry Baryshkov wrote:
On Thu, May 29, 2025 at 11:54:14AM +0800, Ziyue Zhang wrote:
Each PCIe controller on sa8775p supports 'link_down'reset on hardware,
document it.
I don't think it's possible to "support" reset in hardware. Either it
exists and is routed, or it is not.
Hi Dmitry,
I will change the commit msg to
'Each PCIe controller on sa8775p includes 'link_down'reset on hardware,
document it.'
"Supports" implies that the PCIe controller has an active role in enabling
or managing the reset functionality—it suggests that the controller is designed
to accommodate or facilitate this feature.
"Includes" simply states that the reset functionality is present in the
hardware—it exists, whether or not it's actively managed or configurable.
So I think change it to includes will be better.
BRs
Ziyue
Signed-off-by: Ziyue Zhang <quic_ziyuzhan@xxxxxxxxxxx>
---
.../devicetree/bindings/pci/qcom,pcie-sa8775p.yaml | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-sa8775p.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie-sa8775p.yaml
index e3fa232da2ca..805258cbcf2f 100644
--- a/Documentation/devicetree/bindings/pci/qcom,pcie-sa8775p.yaml
+++ b/Documentation/devicetree/bindings/pci/qcom,pcie-sa8775p.yaml
@@ -61,11 +61,14 @@ properties:
- const: global
resets:
- maxItems: 1
+ minItems: 1
+ maxItems: 2
Shouldn't we just update this to maxItems:2 / minItems:2 and drop
minItems:1 from the next clause?
Hi Dmitry,
link_down reset is optional. In many other platforms, like sm8550
and x1e80100, link_down reset is documented as a optional reset.
PCIe will works fine without link_down reset. So I think setting it
as optional is better.
You are describing a hardware. How can a reset be optional in the
_hardware_? It's either routed or not.
I feel a bit confused. According to the theory above, everything seems to
be non-optional when describing hardware, such as registers, clocks,
resets, regulators, and interrupts—all of them either exist or do not.
Seems like I misunderstand the concept of 'optional'? Is 'optional' only
used for compatibility across different platforms?
Additionally, we have documented the PCIe global interrupt as optional. I
was taught that, in the PCIe driver, this interrupt is retrieved using the
platform_get_irq_byname_optional API, so it can be documented as optional.
However, this still seems to contradict the theory mentioned earlier.
BRs
Ziyue
reset-names:
+ minItems: 1
items:
- - const: pci
+ - const: pci # PCIe core reset
+ - const: link_down # PCIe link down reset
required:
- interconnects
@@ -161,8 +164,10 @@ examples:
power-domains = <&gcc PCIE_0_GDSC>;
- resets = <&gcc GCC_PCIE_0_BCR>;
- reset-names = "pci";
+ resets = <&gcc GCC_PCIE_0_BCR>,
+ <&gcc GCC_PCIE_0_LINK_DOWN_BCR>;
+ reset-names = "pci",
+ "link_down";
perst-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>;
wake-gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
--
2.34.1
--
linux-phy mailing list
linux-phy@xxxxxxxxxxxxxxxxxxx
https://lists.infradead.org/mailman/listinfo/linux-phy
--
With best wishes
Qiang Yu
Return-Path: <linux-kernel+bounces-673061-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id AB88141E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:07:03 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 231653A41D2
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:06:41 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 40E5028D8D0;
Wed, 4 Jun 2025 10:06:58 +0000 (UTC)
Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1BA54748F
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:06:55 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749031617; cv=none; b=sFVl5PtQphX89me9S9mAVS4FsIQ0TBbHxLs+JKGeVTowSUPpdYAm6RWAW/EgM68tn6HPi6dPFl5Ww40OeIH2ERs6sh+yo0n5wQS4IMsNsekxd4gES1tdkv80fmn1AaPncOMu5NG/UyGEB0Dez980ubsAZ/DsCd/mzmaeLgOeo2U=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749031617; c=relaxed/simple;
bh=s8Zvrgk1wNEjJBcuY95Kurh/A9wtiUK4tZivAUQP/44=;
h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References:
Content-Type:MIME-Version; b=cU1R7afvN9NJhjQat6rFo4Rpgapjhw18ViWmd7iTmb/ZJkGOi+KnzSewvunOMxwYz9hXlajuPiXelz3Q8j3EL0szKV4Kl5xa5BruyVV5zUIMWr4heVuOCXA6PM1uATwz1T2ZSspMYsUTGlNalCvyg660ur12W50YaFq9U3dOvd8=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de
Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2])
by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.92)
(envelope-from <p.zabel@xxxxxxxxxxxxxx>)
id 1uMl1B-0005Ea-VH; Wed, 04 Jun 2025 12:06:45 +0200
Received: from lupine.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::4e] helo=lupine)
by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
(Exim 4.96)
(envelope-from <p.zabel@xxxxxxxxxxxxxx>)
id 1uMl1A-001m8i-39;
Wed, 04 Jun 2025 12:06:44 +0200
Received: from pza by lupine with local (Exim 4.96)
(envelope-from <p.zabel@xxxxxxxxxxxxxx>)
id 1uMl1A-000Cxx-2s;
Wed, 04 Jun 2025 12:06:44 +0200
Message-ID: <fbca5b91c43f724656b0a7d7a35176fb2e44d9da.camel@xxxxxxxxxxxxxx>
Subject: Re: [PATCH v2 1/2] dt-bindings: reset: eswin: Documentation for
eic7700 SoC
From: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>
To: dongxuyang@xxxxxxxxxxxxxxxxxx, robh@xxxxxxxxxx, krzk+dt@xxxxxxxxxx,
conor+dt@xxxxxxxxxx, devicetree@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
Cc: ningyu@xxxxxxxxxxxxxxxxxx, linmin@xxxxxxxxxxxxxxxxxx,
huangyifeng@xxxxxxxxxxxxxxxxxx
Date: Wed, 04 Jun 2025 12:06:44 +0200
In-Reply-To: <20250604085235.2153-1-dongxuyang@xxxxxxxxxxxxxxxxxx>
References: <20250604085124.2098-1-dongxuyang@xxxxxxxxxxxxxxxxxx>
<20250604085235.2153-1-dongxuyang@xxxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
User-Agent: Evolution 3.46.4-2
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2
X-SA-Exim-Mail-From: p.zabel@xxxxxxxxxxxxxx
X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false
X-PTX-Original-Recipient: linux-kernel@xxxxxxxxxxxxxxx
X-Spam-Status: No, score=-3.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Mi, 2025-06-04 at 16:52 +0800, dongxuyang@xxxxxxxxxxxxxxxxxx wrote:
From: Xuyang Dong <dongxuyang@xxxxxxxxxxxxxxxxxx>
=20
Add device tree binding documentation and header file for the ESWIN
eic7700 reset controller module.
=20
Signed-off-by: Yifeng Huang <huangyifeng@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Xuyang Dong <dongxuyang@xxxxxxxxxxxxxxxxxx>
---
.../bindings/reset/eswin,eic7700-reset.yaml | 41 +++++++++++
.../dt-bindings/reset/eswin,eic7700-reset.h | 73 +++++++++++++++++++
2 files changed, 114 insertions(+)
create mode 100644 Documentation/devicetree/bindings/reset/eswin,eic7700=
-reset.yaml
create mode 100644 include/dt-bindings/reset/eswin,eic7700-reset.h
=20
diff --git a/Documentation/devicetree/bindings/reset/eswin,eic7700-reset.=
yaml b/Documentation/devicetree/bindings/reset/eswin,eic7700-reset.yaml
new file mode 100644
index 000000000000..85ad5fec9430
--- /dev/null
+++ b/Documentation/devicetree/bindings/reset/eswin,eic7700-reset.yaml
@@ -0,0 +1,41 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/reset/eswin,eic7700-reset.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ESWIN EIC7700 SoC reset controller
+
+maintainers:
+ - Yifeng Huang <huangyifeng@xxxxxxxxxxxxxxxxxx>
+ - Xuyang Dong <dongxuyang@xxxxxxxxxxxxxxxxxx>
+
+properties:
+ compatible:
+ items:
+ - const: eswin,eic7700-reset
+ - const: syscon
+ - const: simple-mfd
+
+ reg:
+ maxItems: 1
+
+ '#reset-cells':
+ const: 2
+
+required:
+ - compatible
+ - reg
+ - '#reset-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/reset/eswin,eic7700-reset.h>
+
+ reset-controller@51828000 {
+ compatible =3D "eswin,eic7700-reset", "syscon", "simple-mfd";
+ reg =3D <0x51828000 0x80000>;
+ #reset-cells =3D <2>;
+ };
diff --git a/include/dt-bindings/reset/eswin,eic7700-reset.h b/include/dt=
-bindings/reset/eswin,eic7700-reset.h
new file mode 100644
index 000000000000..7ba31db86141
--- /dev/null
+++ b/include/dt-bindings/reset/eswin,eic7700-reset.h
@@ -0,0 +1,73 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright 2024, Beijing ESWIN Computing Technology Co., Ltd.. All rig=
hts reserved.
+ *
+ * Device Tree binding constants for EIC7700 reset controller.
+ *
+ * Authors:
+ * Yifeng Huang <huangyifeng@xxxxxxxxxxxxxxxxxx>
+ * Xuyang Dong <dongxuyang@xxxxxxxxxxxxxxxxxx>
+ */
+
+#ifndef __DT_ESWIN_EIC7700_RESET_H__
+#define __DT_ESWIN_EIC7700_RESET_H__
+
+#define SNOC_RST_CTRL 0
+#define GPU_RST_CTRL 1
+#define DSP_RST_CTRL 2
+#define D2D_RST_CTRL 3
+#define DDR_RST_CTRL 4
+#define TCU_RST_CTRL 5
+#define NPU_RST_CTRL 6
+#define HSPDMA_RST_CTRL 7
+#define PCIE_RST_CTRL 8
+#define I2C_RST_CTRL 9
+#define FAN_RST_CTRL 10
+#define PVT_RST_CTRL 11
+#define MBOX_RST_CTRL 12
+#define UART_RST_CTRL 13
+#define GPIO_RST_CTRL 14
+#define TIMER_RST_CTRL 15
+#define SSI_RST_CTRL 16
+#define WDT_RST_CTRL 17
+#define LSP_CFGRST_CTRL 18
+#define U84_RST_CTRL 19
+#define SCPU_RST_CTRL 20
+#define LPCPU_RST_CTRL 21
+#define VC_RST_CTRL 22
+#define JD_RST_CTRL 23
+#define JE_RST_CTRL 24
+#define VD_RST_CTRL 25
+#define VE_RST_CTRL 26
+#define G2D_RST_CTRL 27
+#define VI_RST_CTRL 28
+#define DVP_RST_CTRL 29
+#define ISP0_RST_CTRL 30
+#define ISP1_RST_CTRL 31
+#define SHUTTER_RST_CTRL 32
+#define VO_PHYRST_CTRL 33
+#define VO_I2SRST_CTRL 34
+#define VO_RST_CTRL 35
+#define BOOTSPI_RST_CTRL 36
+#define I2C1_RST_CTRL 37
+#define I2C0_RST_CTRL 38
+#define DMA1_RST_CTRL 39
+#define FPRT_RST_CTRL 40
+#define HBLOCK_RST_CTRL 41
+#define SECSR_RST_CTRL 42
+#define OTP_RST_CTRL 43
+#define PKA_RST_CTRL 44
+#define SPACC_RST_CTRL 45
+#define TRNG_RST_CTRL 46
+#define RESERVED 47
+#define TIMER0_RST_CTRL 48
+#define TIMER1_RST_CTRL 49
+#define TIMER2_RST_CTRL 50
+#define TIMER3_RST_CTRL 51
+#define RTC_RST_CTRL 52
+#define MNOC_RST_CTRL 53
+#define RNOC_RST_CTRL 54
+#define CNOC_RST_CTRL 55
+#define LNOC_RST_CTRL 56
These appear to be register offsets, not individual reset control
indices.
Are PIPE_RST_CTRL, TBU_RST_CTRL, and TEST_RST_CTRL left out on purpose?
regards
Philipp
Return-Path: <linux-kernel+bounces-673062-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id A8B7541E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:07:35 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id E99CA17215B
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:07:36 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id C709D28D85F;
Wed, 4 Jun 2025 10:07:29 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="bLT7tM+T"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id D6D7928D828
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:07:26 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749031648; cv=none; b=eCvFSR6i7qwRouMGtTvmoq5cUH2IR2Qy1aDBAkFt104DjChC3VBr5SB11ze8bIIqFeOaAVWkYgwhxGQBNNVngDtdxbZSyj06sEP3mgnjpsVbFE6DOFSncdIcSzsUpHSRmzqT7gP9UjgG+dsGRu3HREgiAmSex/7csu4zszO/39E=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749031648; c=relaxed/simple;
bh=12SlAVxWL49IT3DlM/LrsD+2sJP1//rmG4q4/hAXMd4=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=WE1VvC5i4ubJbFPWH3y4xpbLQ2ucWGPw8VS+xQ+dSyEVcjSggETZLrcjc7mdbTBLNyXN6PmNNYFHoScU2EFN5zb7ND0ePf+ChlGMOyfx/Vdo1Mvb52QT7KsjI+dUdBXTUtMJA4fRg6HhINrTIfiTjJ+WiSqyUcCW4OaME7c7kXM=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=bLT7tM+T; arc=none smtp.client-ip=170.10.133.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749031645;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=7PRfniGheLvssRHrIJEaU1qt06uo8ioIfyXuvxIrE6A=;
b=bLT7tM+TiyvsSZJ8R0HXmV0xYMG0gwc9YIfwYU4vm40ZJO4RYOtxDDc4Ocrfqzxmgc5Wk8
A4afuOttdL0+BREnG2L5AzKBnncPVUDmhNWg0eMTWLQRS2rlzJ5iaodjvPSMR2NREK9myI
5SW2umENqgI1nvvcmMJ4VIkxOMJw25Y=
Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com
[209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-368-vAoOVoNrOQe9Gfal9m4_Kg-1; Wed, 04 Jun 2025 06:07:24 -0400
X-MC-Unique: vAoOVoNrOQe9Gfal9m4_Kg-1
X-Mimecast-MFC-AGG-ID: vAoOVoNrOQe9Gfal9m4_Kg_1749031643
Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-450dada0f83so38734705e9.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 03:07:24 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749031643; x=1749636443;
h=content-transfer-encoding:in-reply-to:organization:autocrypt
:content-language:from:references:cc:to:subject:user-agent
:mime-version:date:message-id:x-gm-message-state:from:to:cc:subject
:date:message-id:reply-to;
bh=7PRfniGheLvssRHrIJEaU1qt06uo8ioIfyXuvxIrE6A=;
b=mje6yjB3slp1f2yAlH38t4q11cMCQTH96vw4lliFDKnHqEoR+RCYZFwwHgFCTDyk7t
GJnZd+aBlei369BnOVq0URkKXVRLNXKfvr2WpfDjG9ZMaRpoWy6kNUE1llYYgUtaJdVr
nz83zk6BdVpJwArD2fA6huj1JAoaAeFG1peiSgf1e/gRrVrL6LISCg6hJDJvVnWzqntj
OHK1oF7xNN31sUcZcbqGdXAqRN7oFEIB+wwVphi4/iW35GqVUgLnk4IPciaEZN8q7wR5
lCPSinYJ8zQvsazCf/YF0LZSMpgKF+CWKIPwp04qO4gfnZXGv/1CzIuLgdPFMebRB2s+
rqIg==
X-Forwarded-Encrypted: i=1; AJvYcCUYL1+MUqt1Gec/lUk9y9VweJSa4/9yG9ZJjQ9yk/+7jzdqtsQpf76XUgJRXX+bLrDJOAJm5nOpRDUTOJ0=@vger.kernel.org
X-Gm-Message-State: AOJu0YyGeI0raA7nv5mMO/o6ek37nhoq1FNFRFiICKxWS++lkTqU+izA
4c5NuzJ9H/NoF2WtCZuP+V3jBCDMiFQfj4M2w9VSSOVEw14wCiNy8x+IWDcg03bSRNS7EhfZHvW
+y2lWDF+gZCWgsOLwESfFetsyF8FgCg55SeJXOHlzUetyeIujRgVjbrSrQIWkme7Vpg==
X-Gm-Gg: ASbGnctKf8Kn6jcC+Ka4nMW9g8yOfMLeKx/qtq8Uk4Vc7fkM+KfpwMF8XaxcZtNsgwr
SqpbSWqePNVFo9Df5aP5mTLSi9Ca5bl4QZNnj8JIy/+lLQ0vTyf0HMPtez7enwpSO5dakJ8b+wG
89F4wrMn9gEEcN+Ys/zhMxyPDTqHL3/OYfb9RzY29aImpfheSfQFRXJNTK1O5dX+YoBKcIHLU5Q
0kRwMwaz8vmF6W1ge2Uxjc3Im5iJ1KJK9M47HfbbmF19MpB+Ab7+LaF42hNKRTfuAbCm9Ejn5S2
aUZiFUjXJCRVWa0Nf4wMjNHwCjECD1e5NFghEsNiVagf1CDBpK/gPVjshNbsWbrvmdYmg7hTPA2
RCDMw85vIrMqlesEp/87CYJTALW03SDYjmY3+o6blfDejGqa4/w==
X-Received: by 2002:a05:600c:a015:b0:450:d37c:9fc8 with SMTP id 5b1f17b1804b1-451f0a74191mr18412185e9.13.1749031643158;
Wed, 04 Jun 2025 03:07:23 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IG7o2bEYM4OLlTeV0JBA6sp6f4ZXgEdhRDuQC/nWLoEHV+qeqnF/gO2YE9gGAKeTmJLS62Qxg==
X-Received: by 2002:a05:600c:a015:b0:450:d37c:9fc8 with SMTP id 5b1f17b1804b1-451f0a74191mr18411865e9.13.1749031642639;
Wed, 04 Jun 2025 03:07:22 -0700 (PDT)
Received: from ?IPV6:2003:d8:2f1b:b800:6fdb:1af2:4fbd:1fdf? (p200300d82f1bb8006fdb1af24fbd1fdf.dip0.t-ipconnect.de. [2003:d8:2f1b:b800:6fdb:1af2:4fbd:1fdf])
by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-450d8006613sm201595465e9.28.2025.06.04.03.07.21
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 03:07:22 -0700 (PDT)
Message-ID: <fa9d72ac-1b46-4a09-8f29-af97f2ca6e2e@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 12:07:21 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH] mm: gup: fail migration when no migratable page to
prevent CMA pinning
To: Hyesoo Yu <hyesoo.yu@xxxxxxxxxxx>
Cc: janghyuck.kim@xxxxxxxxxxx, zhaoyang.huang@xxxxxxxxxx,
jaewon31.kim@xxxxxxxxx, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
Jason Gunthorpe <jgg@xxxxxxxx>, John Hubbard <jhubbard@xxxxxxxxxx>,
Peter Xu <peterx@xxxxxxxxxx>, linux-mm@xxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
References: <CGME20250604095242epcas2p17032a1133b03be2d24c8ebcff94d1d55@xxxxxxxxxxxxxxxxxxxx>
<20250604095049.4052078-1-hyesoo.yu@xxxxxxxxxxx>
From: David Hildenbrand <david@xxxxxxxxxx>
Content-Language: en-US
Autocrypt: addr=david@xxxxxxxxxx; keydata=
xsFNBFXLn5EBEAC+zYvAFJxCBY9Tr1xZgcESmxVNI/0ffzE/ZQOiHJl6mGkmA1R7/uUpiCjJ
dBrn+lhhOYjjNefFQou6478faXE6o2AhmebqT4KiQoUQFV4R7y1KMEKoSyy8hQaK1umALTdL
QZLQMzNE74ap+GDK0wnacPQFpcG1AE9RMq3aeErY5tujekBS32jfC/7AnH7I0v1v1TbbK3Gp
XNeiN4QroO+5qaSr0ID2sz5jtBLRb15RMre27E1ImpaIv2Jw8NJgW0k/D1RyKCwaTsgRdwuK
Kx/Y91XuSBdz0uOyU/S8kM1+ag0wvsGlpBVxRR/xw/E8M7TEwuCZQArqqTCmkG6HGcXFT0V9
PXFNNgV5jXMQRwU0O/ztJIQqsE5LsUomE//bLwzj9IVsaQpKDqW6TAPjcdBDPLHvriq7kGjt
WhVhdl0qEYB8lkBEU7V2Yb+SYhmhpDrti9Fq1EsmhiHSkxJcGREoMK/63r9WLZYI3+4W2rAc
UucZa4OT27U5ZISjNg3Ev0rxU5UH2/pT4wJCfxwocmqaRr6UYmrtZmND89X0KigoFD/XSeVv
jwBRNjPAubK9/k5NoRrYqztM9W6sJqrH8+UWZ1Idd/DdmogJh0gNC0+N42Za9yBRURfIdKSb
B3JfpUqcWwE7vUaYrHG1nw54pLUoPG6sAA7Mehl3nd4pZUALHwARAQABzSREYXZpZCBIaWxk
ZW5icmFuZCA8ZGF2aWRAcmVkaGF0LmNvbT7CwZgEEwEIAEICGwMGCwkIBwMCBhUIAgkKCwQW
AgMBAh4BAheAAhkBFiEEG9nKrXNcTDpGDfzKTd4Q9wD/g1oFAl8Ox4kFCRKpKXgACgkQTd4Q
9wD/g1oHcA//a6Tj7SBNjFNM1iNhWUo1lxAja0lpSodSnB2g4FCZ4R61SBR4l/psBL73xktp
rDHrx4aSpwkRP6Epu6mLvhlfjmkRG4OynJ5HG1gfv7RJJfnUdUM1z5kdS8JBrOhMJS2c/gPf
wv1TGRq2XdMPnfY2o0CxRqpcLkx4vBODvJGl2mQyJF/gPepdDfcT8/PY9BJ7FL6Hrq1gnAo4
3Iv9qV0JiT2wmZciNyYQhmA1V6dyTRiQ4YAc31zOo2IM+xisPzeSHgw3ONY/XhYvfZ9r7W1l
pNQdc2G+o4Di9NPFHQQhDw3YTRR1opJaTlRDzxYxzU6ZnUUBghxt9cwUWTpfCktkMZiPSDGd
KgQBjnweV2jw9UOTxjb4LXqDjmSNkjDdQUOU69jGMUXgihvo4zhYcMX8F5gWdRtMR7DzW/YE
BgVcyxNkMIXoY1aYj6npHYiNQesQlqjU6azjbH70/SXKM5tNRplgW8TNprMDuntdvV9wNkFs
9TyM02V5aWxFfI42+aivc4KEw69SE9KXwC7FSf5wXzuTot97N9Phj/Z3+jx443jo2NR34XgF
89cct7wJMjOF7bBefo0fPPZQuIma0Zym71cP61OP/i11ahNye6HGKfxGCOcs5wW9kRQEk8P9
M/k2wt3mt/fCQnuP/mWutNPt95w9wSsUyATLmtNrwccz63XOwU0EVcufkQEQAOfX3n0g0fZz
Bgm/S2zF/kxQKCEKP8ID+Vz8sy2GpDvveBq4H2Y34XWsT1zLJdvqPI4af4ZSMxuerWjXbVWb
T6d4odQIG0fKx4F8NccDqbgHeZRNajXeeJ3R7gAzvWvQNLz4piHrO/B4tf8svmRBL0ZB5P5A
2uhdwLU3NZuK22zpNn4is87BPWF8HhY0L5fafgDMOqnf4guJVJPYNPhUFzXUbPqOKOkL8ojk
CXxkOFHAbjstSK5Ca3fKquY3rdX3DNo+EL7FvAiw1mUtS+5GeYE+RMnDCsVFm/C7kY8c2d0G
NWkB9pJM5+mnIoFNxy7YBcldYATVeOHoY4LyaUWNnAvFYWp08dHWfZo9WCiJMuTfgtH9tc75
7QanMVdPt6fDK8UUXIBLQ2TWr/sQKE9xtFuEmoQGlE1l6bGaDnnMLcYu+Asp3kDT0w4zYGsx
5r6XQVRH4+5N6eHZiaeYtFOujp5n+pjBaQK7wUUjDilPQ5QMzIuCL4YjVoylWiBNknvQWBXS
lQCWmavOT9sttGQXdPCC5ynI+1ymZC1ORZKANLnRAb0NH/UCzcsstw2TAkFnMEbo9Zu9w7Kv
AxBQXWeXhJI9XQssfrf4Gusdqx8nPEpfOqCtbbwJMATbHyqLt7/oz/5deGuwxgb65pWIzufa
N7eop7uh+6bezi+rugUI+w6DABEBAAHCwXwEGAEIACYCGwwWIQQb2cqtc1xMOkYN/MpN3hD3
AP+DWgUCXw7HsgUJEqkpoQAKCRBN3hD3AP+DWrrpD/4qS3dyVRxDcDHIlmguXjC1Q5tZTwNB
boaBTPHSy/Nksu0eY7x6HfQJ3xajVH32Ms6t1trDQmPx2iP5+7iDsb7OKAb5eOS8h+BEBDeq
3ecsQDv0fFJOA9ag5O3LLNk+3x3q7e0uo06XMaY7UHS341ozXUUI7wC7iKfoUTv03iO9El5f
XpNMx/YrIMduZ2+nd9Di7o5+KIwlb2mAB9sTNHdMrXesX8eBL6T9b+MZJk+mZuPxKNVfEQMQ
a5SxUEADIPQTPNvBewdeI80yeOCrN+Zzwy/Mrx9EPeu59Y5vSJOx/z6OUImD/GhX7Xvkt3kq
Er5KTrJz3++B6SH9pum9PuoE/k+nntJkNMmQpR4MCBaV/J9gIOPGodDKnjdng+mXliF3Ptu6
3oxc2RCyGzTlxyMwuc2U5Q7KtUNTdDe8T0uE+9b8BLMVQDDfJjqY0VVqSUwImzTDLX9S4g/8
kC4HRcclk8hpyhY2jKGluZO0awwTIMgVEzmTyBphDg/Gx7dZU1Xf8HFuE+UZ5UDHDTnwgv7E
th6RC9+WrhDNspZ9fJjKWRbveQgUFCpe1sa77LAw+XFrKmBHXp9ZVIe90RMe2tRL06BGiRZr
jPrnvUsUUsjRoRNJjKKA/REq+sAnhkNPPZ/NNMjaZ5b8Tovi8C0tmxiCHaQYqj7G2rgnT0kt
WNyWQQ==
Organization: Red Hat
In-Reply-To: <20250604095049.4052078-1-hyesoo.yu@xxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 04.06.25 11:50, Hyesoo Yu wrote:
Commit 1aaf8c122918 ("mm: gup: fix infinite loop within __get_longterm_locked")
caused CMA pages to become pinned in some cases when handling longterm GUP.
This happened because migration would return success immediately if no pages
were in the movable_page_list, without retrying.
However, CMA pages can be temporarily off the LRU (e.g., in pagevecs), and
A better example might be concurrent isolation. Just imagine two of
these longterm pinnings racing.
therefore not appear in movable_page_list, even though they can be migrated
later. Before commit 1aaf8c, the kernel would retry migration in such cases,
which helped avoid accidental CMA pinning.
The commit 1aaf8c aimed to support an out-of-tree use case (like pKVM), where
longterm GUP was applied to non-LRU CMA pages. But allowing CMA pinning
in general for this corner case could lead to more fragmentation and
reliability issues. So this patch prevents that.
Instead of retrying, this patch explicitly fails the migration attempt
(-EBUSY) if no movable pages are found and unpinnable pages remain.
This avoids infinite loops and gives user a clear signal to retry,
rather then spinning inside kernel.
Hmmm, that means we will return EBUSY to the caller. Are all users
actually prepared to deal with that?
So far we only returned EBUSY in this corner-case
migrate_device_coherent_folio() that most callers never actually trigger.
Maybe we should do EAGAIN for now (old way of doing it?), and look into
doing EBUSY separately.
Fixes: 1aaf8c122918 ("mm: gup: fix infinite loop within __get_longterm_locked")
Signed-off-by: Hyesoo Yu <hyesoo.yu@xxxxxxxxxxx>
---
mm/gup.c | 49 ++++++++++++++++++++++++++-----------------------
1 file changed, 26 insertions(+), 23 deletions(-)
diff --git a/mm/gup.c b/mm/gup.c
index e065a49842a8..446938aedcc9 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -2303,12 +2303,13 @@ static void pofs_unpin(struct pages_or_folios *pofs)
/*
* Returns the number of collected folios. Return value is always >= 0.
*/
Comment should be removed.
-static void collect_longterm_unpinnable_folios(
+static bool collect_longterm_unpinnable_folios(
struct list_head *movable_folio_list,
struct pages_or_folios *pofs)
{
struct folio *prev_folio = NULL;
bool drain_allow = true;
+ bool any_unpinnable = false;
unsigned long i;
for (i = 0; i < pofs->nr_entries; i++) {
@@ -2321,6 +2322,8 @@ static void collect_longterm_unpinnable_folios(
if (folio_is_longterm_pinnable(folio))
continue;
+ any_unpinnable = true;
+
if (folio_is_device_coherent(folio))
continue;
@@ -2342,6 +2345,8 @@ static void collect_longterm_unpinnable_folios(
NR_ISOLATED_ANON + folio_is_file_lru(folio),
folio_nr_pages(folio));
}
+
+ return any_unpinnable;
}
/*
@@ -2353,8 +2358,13 @@ static int
migrate_longterm_unpinnable_folios(struct list_head *movable_folio_list,
struct pages_or_folios *pofs)
{
- int ret;
+ int ret = -EAGAIN;
unsigned long i;
+ struct migration_target_control mtc = {
+ .nid = NUMA_NO_NODE,
+ .gfp_mask = GFP_USER | __GFP_NOWARN,
+ .reason = MR_LONGTERM_PIN,
+ };
Reverse xmas tree while we're at it.
But, can we do this cleanup here separately, and not as part of the fix?
for (i = 0; i < pofs->nr_entries; i++) {
struct folio *folio = pofs_get_folio(pofs, i);
@@ -2370,6 +2380,7 @@ migrate_longterm_unpinnable_folios(struct list_head *movable_folio_list,
gup_put_folio(folio, 1, FOLL_PIN);
if (migrate_device_coherent_folio(folio)) {
+ pofs_unpin(pofs);
ret = -EBUSY;
goto err;
}
@@ -2388,27 +2399,11 @@ migrate_longterm_unpinnable_folios(struct list_head *movable_folio_list,
pofs_clear_entry(pofs, i);
}
- if (!list_empty(movable_folio_list)) {
- struct migration_target_control mtc = {
- .nid = NUMA_NO_NODE,
- .gfp_mask = GFP_USER | __GFP_NOWARN,
- .reason = MR_LONGTERM_PIN,
- };
-
- if (migrate_pages(movable_folio_list, alloc_migration_target,
- NULL, (unsigned long)&mtc, MIGRATE_SYNC,
- MR_LONGTERM_PIN, NULL)) {
- ret = -ENOMEM;
- goto err;
- }
- }
-
- putback_movable_pages(movable_folio_list);
-
- return -EAGAIN;
+ if (migrate_pages(movable_folio_list, alloc_migration_target, NULL,
+ (unsigned long)&mtc, MIGRATE_SYNC, MR_LONGTERM_PIN, NULL))
+ ret = -ENOMEM;
err:
- pofs_unpin(pofs);
putback_movable_pages(movable_folio_list);
return ret;
@@ -2417,11 +2412,19 @@ migrate_longterm_unpinnable_folios(struct list_head *movable_folio_list,
static long
check_and_migrate_movable_pages_or_folios(struct pages_or_folios *pofs)
{
+ bool any_unpinnable;
+
LIST_HEAD(movable_folio_list);
- collect_longterm_unpinnable_folios(&movable_folio_list, pofs);
- if (list_empty(&movable_folio_list))
+ any_unpinnable = collect_longterm_unpinnable_folios(&movable_folio_list, pofs);
+
+ if (list_empty(&movable_folio_list)) {
+ if (any_unpinnable) {
/*
* If we find any longterm unpinnable page that we failed to
* isolated for migration, it might be because someone else
* concurrently isolated it. Make the caller retry until it
* succeeds.
*/
+ pofs_unpin(pofs);
+ return -EBUSY;
+ }
return 0;
+ }
return migrate_longterm_unpinnable_folios(&movable_folio_list, pofs);
}
--
Cheers,
David / dhildenb
Return-Path: <linux-kernel+bounces-673063-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 164CC41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:07:50 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 5D5B63A4206
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:07:28 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 8B04428D8D0;
Wed, 4 Jun 2025 10:07:38 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="LVwsstmV";
dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="LVwsstmV"
Received: from OSPPR02CU001.outbound.protection.outlook.com (mail-norwayeastazon11013012.outbound.protection.outlook.com [40.107.159.12])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id B7727748F;
Wed, 4 Jun 2025 10:07:34 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.159.12
ARC-Seal:i=3; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749031657; cv=fail; b=P1oL/PB3U7ik3U2RWbdJZ0HJNm0kIDjXs4rTnERKe3bCmEiv+0HlTcd/Tev/0Ne91EYSVJ7ABRlA71YrXD5Tf0vykNCxRkFqYqSntNoLFVLcP/zbzBkrpRVRJzb2xM5MK3auDP95zbm0o3xidYvrL+ArCy3LSkROGGjTtyKDdJg=
ARC-Message-Signature:i=3; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749031657; c=relaxed/simple;
bh=Ad6FITFa0sk5VBSodMotzTMz4kiDARWlVmOM3Aat3AU=;
h=Date:From:To:Cc:Subject:Message-ID:References:Content-Type:
Content-Disposition:In-Reply-To:MIME-Version; b=vDdf5w++xBpaYVUGoZ6MI5iJGbyVC4waZtxNpfvAPoqflQfspWjqjiP99Alb+OMd2bmaYuex1FZVdOorhk0wbXQMFBnvqBdVBB/EkE657QBd1XPQFpBEm1w7mkmlgljyMQP4AksnO8mGtnrCeeWzOwfLtHE6N63Duj9iwDr7IcE=
ARC-Authentication-Results:i=3; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=LVwsstmV; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=LVwsstmV; arc=fail smtp.client-ip=40.107.159.12
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com
ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass;
b=EQeNRSsEHg9ILBIVVLOKnZ7KUCFbWslOl9XGcfq4MtXryHvZBESeV9nl+1r4jPGBvz2Td2FCKg5ZOuyk7RjY1lv1bWtK1vELWq9AUF6cBKH3GxKxfxlJ4feH51MT61FHRRgQ9sXbhij4ltX1ILf+W1hQIs5klrKpWl5qIzmaPUFhu2NRfN/lIyVuWuimeYF/aLyTxrOoq3C85IesWGnEj73CNM1pN0Fnb87/6AiPUCPr7cdW8mW8gmgsqVxH4GX4+2RdFXU+/FDXw7Q4ZdAZ/AaPfD/devo+JTeB73V+iP7aRPWAaQHx0gObjXG1Y2IpCwMzkyfDiE0LVi7ajVnIxQ==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=hi3teqMiPlwrMPKZkGyCIx3TaKy1qnX4fUUPLa9R9HE=;
b=ZjHwMQT3xJWOdmXCvcZ37DP+FGyl8pk0KTpGkHmnYDXDRQLcH8gb+DOGfBigFxuM8h2Ii36JRg5qtZaHknS1MJCm7a1OOIsOwQiJMwvmSs1MXmIA5YuANDDrsakBqxna9M9dM9NdjqEyp/65Wmt5ZfcZGME08Ax2R/KHTMuPS4B8PChdgTwApHUWXfOXYCcjgDXjSJF1JFPFJ7kNurq0fGIOq31hmJcGJJLCtnVHeYG1hj7BnbX9trRRQdJL3hwAyLx35podCiirMY7Ww+OVbQqQ776R68I5UhdlO10vWlMKPcBd1YCDO5jYIA8RLbk4TbMkDeeml3hiGhcXJ+sE2A==
ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is
4.158.2.129) smtp.rcpttodomain=infradead.org smtp.mailfrom=arm.com;
dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com;
dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1
spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com]
dmarc=[1,1,header.from=arm.com])
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=hi3teqMiPlwrMPKZkGyCIx3TaKy1qnX4fUUPLa9R9HE=;
b=LVwsstmVFfQ4sAwid+HApXldm2bqKcN6ybC8ZrcmYRQsRYbX/kG6dXXCEeGkWc6rv61hoWXqzj9fk/a1/tsCImEvcZ4xMujnkKRUBzPLnOoswR6GrGnSfqmO7X0liSFiyLwpZZvvabqryFaBkm8nliTLs3rqOj8H9gPO02rZYx8=
Received: from CWLP265CA0288.GBRP265.PROD.OUTLOOK.COM (2603:10a6:401:5c::36)
by DU0PR08MB8230.eurprd08.prod.outlook.com (2603:10a6:10:3b1::17) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.33; Wed, 4 Jun
2025 10:07:31 +0000
Received: from AM4PEPF00027A5E.eurprd04.prod.outlook.com
(2603:10a6:401:5c:cafe::65) by CWLP265CA0288.outlook.office365.com
(2603:10a6:401:5c::36) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.34 via Frontend
Transport; Wed, 4 Jun 2025 10:07:31 +0000
X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 4.158.2.129)
smtp.mailfrom=arm.com; dkim=pass (signature was verified)
header.d=arm.com;dmarc=pass action=none header.from=arm.com;
Received-SPF: Pass (protection.outlook.com: domain of arm.com designates
4.158.2.129 as permitted sender) receiver=protection.outlook.com;
client-ip=4.158.2.129; helo=outbound-uk1.az.dlp.m.darktrace.com; pr=C
Received: from outbound-uk1.az.dlp.m.darktrace.com (4.158.2.129) by
AM4PEPF00027A5E.mail.protection.outlook.com (10.167.16.72) with Microsoft
SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8792.29
via Frontend Transport; Wed, 4 Jun 2025 10:07:30 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=NTmtCLB77hW61Fe/JvlGCytB4tufC/4wNOu4ebDjceL13sndskescsMbPw3lDzuh3F/7TCiXyxeB8eYs6m4vNbHGKLBZU9QuzTwE22oA7A221tCz7RDCLJz9PFjW/oTHLyriUgSIRrX0I4X4rbyrpVLaGyJuy0K8apZjhu9JpvJEC4puGzuFoHuokgSYJMqeZgLwvO1Wxf+DkEvMECfYqycmyC36xzp59cf86Zl5ixs8Afc2mggYjwzuxumw8riyRlJcbczHebSAsJffG5SNXoDhUzsST5hAoAIBE6HQ3XvDdO+3h/FQXZvaMFqzCxsFyFJeJhwK7ymqUIdDs5yLdg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=hi3teqMiPlwrMPKZkGyCIx3TaKy1qnX4fUUPLa9R9HE=;
b=Lfr+Rg5mcmnsKARnGHvAk8X8TDsbMwpZNfTM5nXUs9T+Zw15icU30tr2m+WL13xaAx/VVUgIWrvqwzP2TQ54TSpyCrBDBKSfoEtZI1Tz5VsHcVsjvzVJvoPz0PFhktDzdiCQEO3zn0scfFmGPHqb+ZTjX4lv4YnrWZve/kaRq9OWardp0raAw/t2PiNhUw7hbaG1/3Diz6MHLcIzs4XTJ1WXIU4qro3MAICEsAa6TS5BvVavPAQrDgytPODP76pip5e9QRi8EjPHI07YL2eXYf2cWFQW1UYW/CPJMD7wVQQf5pyFiTZwCbagcLNkGp0OTfPhVom/1rahTTzEno81mA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass
header.d=arm.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=hi3teqMiPlwrMPKZkGyCIx3TaKy1qnX4fUUPLa9R9HE=;
b=LVwsstmVFfQ4sAwid+HApXldm2bqKcN6ybC8ZrcmYRQsRYbX/kG6dXXCEeGkWc6rv61hoWXqzj9fk/a1/tsCImEvcZ4xMujnkKRUBzPLnOoswR6GrGnSfqmO7X0liSFiyLwpZZvvabqryFaBkm8nliTLs3rqOj8H9gPO02rZYx8=
Authentication-Results-Original: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=arm.com;
Received: from GV1PR08MB10521.eurprd08.prod.outlook.com
(2603:10a6:150:163::20) by GV2PR08MB9951.eurprd08.prod.outlook.com
(2603:10a6:150:b8::10) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8769.32; Wed, 4 Jun
2025 10:06:54 +0000
Received: from GV1PR08MB10521.eurprd08.prod.outlook.com
([fe80::d430:4ef9:b30b:c739]) by GV1PR08MB10521.eurprd08.prod.outlook.com
([fe80::d430:4ef9:b30b:c739%7]) with mapi id 15.20.8792.033; Wed, 4 Jun 2025
10:06:54 +0000
Date: Wed, 4 Jun 2025 11:06:51 +0100
From: Yeoreum Yun <yeoreum.yun@xxxxxxx>
To: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Leo Yan <leo.yan@xxxxxxx>, mingo@xxxxxxxxxx, mingo@xxxxxxxxxx,
acme@xxxxxxxxxx, namhyung@xxxxxxxxxx, mark.rutland@xxxxxxx,
alexander.shishkin@xxxxxxxxxxxxxxx, jolsa@xxxxxxxxxx,
irogers@xxxxxxxxxx, adrian.hunter@xxxxxxxxx,
kan.liang@xxxxxxxxxxxxxxx, linux-perf-users@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, David Wang <00107082@xxxxxxx>
Subject: Re: [PATCH 1/1] perf/core: fix dangling cgroup pointer in cpuctx
Message-ID: <aEAau+v4qBQSt13s@xxxxxxxxxxxxxxx>
References: <20250602184049.4010919-1-yeoreum.yun@xxxxxxx>
<20250603140040.GB8020@xxxxxxxxxxxxxxx>
<20250603144414.GC38114@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
<20250604080339.GB35970@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20250604080339.GB35970@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
X-ClientProxiedBy: LO4P123CA0505.GBRP123.PROD.OUTLOOK.COM
(2603:10a6:600:272::15) To GV1PR08MB10521.eurprd08.prod.outlook.com
(2603:10a6:150:163::20)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-TrafficTypeDiagnostic:
GV1PR08MB10521:EE_|GV2PR08MB9951:EE_|AM4PEPF00027A5E:EE_|DU0PR08MB8230:EE_
X-MS-Office365-Filtering-Correlation-Id: 3d6acb2a-6c1c-4a51-47ca-08dda34f9e36
x-checkrecipientrouted: true
NoDisclaimer: true
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam-Untrusted:
BCL:0;ARA:13230040|7416014|1800799024|376014|366016;
X-Microsoft-Antispam-Message-Info-Original:
=?us-ascii?Q?5E+x0sjVKDDpblHs6avKbdTyIcwE49Y7BTAsPMrYjselJyUYrjWf+k7+SwnZ?=
=?us-ascii?Q?sVoktvXWa35VOtQBnovGZaVcup2dPyZpw3nqEnOLmC9jku5lva1XlkG1YGmy?=
=?us-ascii?Q?LLbpuJQ0aJ4iGj8ssSH1RFIS3G7xib1TS7lkQlPG3D0ddKqn6KOJVOkku+w6?=
=?us-ascii?Q?XEfSoVZlrc7tyrbcKnFztpJUlkouqizhzAs/gnsbO3/RVui2li7uH9QfYh0C?=
=?us-ascii?Q?A3awY3jlgQxuWfchJPsiheUl+3frbu6E+eGn2NOvpIx7opklThZ9k1UJRCVf?=
=?us-ascii?Q?dm57PSSQobvocuTy8DlZSQYawXgytaqCnsPPKbVJ2Q8p9Xg0UU4fo64iR/v7?=
=?us-ascii?Q?ni+SnokUEKX1ZuxKvVOK+YW1CTtslO0RqMNe072tuhpQkxKKzlwa3mpgQWic?=
=?us-ascii?Q?1NQuMEOH/TLcPilsnIRKxmOUxiKB9XxZ9lszZc3MxAdI1D+QaPtOTsQApPwS?=
=?us-ascii?Q?EtsWFX24d4Lgg0Pdb+7uxGtrBm9zB0OdndHZ+VGWLY4HdYwHcpFGBPQf8MJu?=
=?us-ascii?Q?s7oqrRUJXFOavDVXExzy7bDWWA4n3T3EMpwp6gmaPKLTzWsAijePluiKnjCc?=
=?us-ascii?Q?B9/AnGRuSpUURcBTbb4hIFX/QhaBjV8k7FMUUCPzwN53ElP2Kg8o3IUfk7/c?=
=?us-ascii?Q?COrZtMBkCTVeBg6Ucp/gQnIsqO3mkhVu/nkofFTiPZl9RYceyoXkwUlm6BJ/?=
=?us-ascii?Q?cfIQHqvrWt+a1YxHLf6T2EH6cvAKZsS+qCt6vazm+tLPz4KUZ8L3YKdiWjT6?=
=?us-ascii?Q?RCcSSLDqnEnhLnjIyKMT+2x4qdcEv3Et/GSowqYhveRCooNFZ/USHCzf684Z?=
=?us-ascii?Q?sZJ9kclh1qtwrbhTTY47LNVAFQE3elrsKWiaEEogzKdv4asGp6rBc0JYlUKM?=
=?us-ascii?Q?fFrfn0SQpM81tefkulXOubyQEHeuGMKkaB+/cxV9Xa1GwkQ/CyjSj8IkLpZ4?=
=?us-ascii?Q?TXs7CbksFfXzFcbCnWsEUcv+IDQr3mCg+t6X0B10SrrIlWNKMjzgIlnF70G8?=
=?us-ascii?Q?zKYyuJpNRxz8i2Wt/A+LYkX0Cuaf03umC157jNFl7D8LVtjkF973OuvupnGI?=
=?us-ascii?Q?gAqpBnWZhsvawcI8+UpOKDSUyn1yf/idALv82QjauT5w8xnmyMENVgctZZea?=
=?us-ascii?Q?C1qMTwrOnKmuREgkvTkjcF2MK2QPVyMALbi1Zzghs78ZQG+DfJ8Rht3ixKWB?=
=?us-ascii?Q?4TTFpdtzYUXwf0VUa11oKygv600R9Ba0JXkozlPV9+CW5Lw1W6sDDTKpoLwC?=
=?us-ascii?Q?E2hZ19THFAKXgYN6urC2oboG28Lo20+XREzFEpMMkPP70Bp7/6AM4tsbtswP?=
=?us-ascii?Q?m8jGAxWsOBtRDR2B2f9n9BgLsIb1Pncw6rkheGkm+zRWZZQTzFTtlJHyQOXe?=
=?us-ascii?Q?kolV2ELaW0TzCjourUbKTWDcN/b1qeq0D3Jbph3NAIAi8t2Zv/qo3yNhLvNy?=
=?us-ascii?Q?f0Svvse8rIU=3D?=
X-Forefront-Antispam-Report-Untrusted:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:GV1PR08MB10521.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(1800799024)(376014)(366016);DIR:OUT;SFP:1101;
X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV2PR08MB9951
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
AM4PEPF00027A5E.eurprd04.prod.outlook.com
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id-Prvs:
73d5af06-9ce7-4906-a25f-08dda34f8847
X-Microsoft-Antispam:
BCL:0;ARA:13230040|376014|82310400026|36860700013|14060799003|1800799024|7416014|35042699022;
X-Microsoft-Antispam-Message-Info:
=?us-ascii?Q?yZ3sm3wAfS4hN+bsQZa3DXT5Fx05rgFjmHoPnv9ugpBufRRG58UG8scPbncn?=
=?us-ascii?Q?s4NK3gAEwe6LZJNxH97roPBvCLuKCZM3Ifl3rhopYCy+d8KYa6Xn6h06WdZL?=
=?us-ascii?Q?P4+ti9wi0ahWmrkNPUeKcxK9da76x0ym9t4rPAGniWRqF0Q94mmOgAcmrb85?=
=?us-ascii?Q?vAPg5dQ751LYeEmTAyVx6XBxcjRjDrAm5rfbzXFVan3NEeWDeXXS3NHDJWye?=
=?us-ascii?Q?CtVQm+V1DPgg4Q2l3tvbItJCV60EJdRzsK8rR/9H/LTuygcCWhnWmyssQppd?=
=?us-ascii?Q?9Yqev+NcmN7d2InORVyRTu1anAnOoT98z0Ur9DuithFBifCJmH534WjsLo3e?=
=?us-ascii?Q?I63i9tPg1pAq55F7acD7cwFuwOTLcmzdkJq7MhB8npFIJZCBWlAG514yuFhE?=
=?us-ascii?Q?4ZsHIYUiPpqkuARkN/OOCnnSKgtE/C6J0QYxCl9SUSMHCiiO08LxT3g/naKh?=
=?us-ascii?Q?DYsKHmyHHN56XfZAgWl78EKeQxPEjOxrQV7ptBah0w8ooEc8pswdHJjKV+oZ?=
=?us-ascii?Q?SAvWu7JXiSnVgwmXy7rOPJJSd3DAuHE+S3oqatcvTLd4o18GrTALM0WyXV0T?=
=?us-ascii?Q?SM4HN2LOCuDmiENZBXO+YbOEfdaRImB1qgYTqzqZWn8vvH3mpl1Efv9KReq3?=
=?us-ascii?Q?OqRhSRJPKG2H6ua/RI5y9+71lSwym0Pd3IjgM2Di0+ZmchTAkUyzT5Yl2vsq?=
=?us-ascii?Q?c259x2sY/b3wnpEX/zqYNHeQvdadmRq1dk/QVe67kE9UPrlZxE6TRhZxZltH?=
=?us-ascii?Q?QE17F7+L9OCd7bHMui/P0GmdL5tEtND7QvRrBQFBjyW/ggU9K+TIkZ0GrpaF?=
=?us-ascii?Q?xfqONYyz9WSGgYjy90khgiSiZO1arxtqiCIF8/fgZxuS/JtklA6aABMZhpr0?=
=?us-ascii?Q?DCp16MbaKXoS8Y62dgBqZGMEz04ImGSJwJAl9nLu7qq9uQj1HUR/R/SoFig6?=
=?us-ascii?Q?bS96U2DxM+LFFuln/YSPyFsL1cAD+FHYG3wJhHJgCc9Kf/tz+1oocHqLKTx4?=
=?us-ascii?Q?UbZICtnvWcbcjkCM9Bi+jbKL5qSiTMsLhZHNNca1vylrlCD2d0rnGORIaGvB?=
=?us-ascii?Q?yNmT22kWKKV0umjwXoyca0s49mnjnEpXEt7JnsW1KRNnfBvgoYHEg9qeTyg4?=
=?us-ascii?Q?v+RFSM1y7iPmxY/3xIGE0CDG0YesyGU6wFIs2oZEm3kHzU9A4u9fRzwWOEuC?=
=?us-ascii?Q?5mPhDt2NS1GFu9tN20ukG/T4Wd5KKAknmw8BY3gMX073Rj5BfkWIz0AZjFkV?=
=?us-ascii?Q?3E4efNjE/Ud5VK9WKgiRtdxA4WLpVlRcCyp6+a8p4mByg1s1NN8MX0NkLiKx?=
=?us-ascii?Q?jmt94JuNsU/I7a749hTVRnfgXBPrZcQ2hhdi2XmaCp4CuGsFHZSVDzrfFRtM?=
=?us-ascii?Q?isXmpRb9o7xKJT4rBH6PUIk0w5lDsS8dBGjgBULcVrhcYWdVMLGd91jBEf7j?=
=?us-ascii?Q?84yYN5s3eUa/ZBbb95+etoKNBh1jcmXhTQ3vhrVCVZpa3FBboD+ZdirTI1FM?=
=?us-ascii?Q?kUnKx+abHIQBTOKdmb5DGgXIZaShTXp/6v32?=
X-Forefront-Antispam-Report:
CIP:4.158.2.129;CTRY:GB;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:outbound-uk1.az.dlp.m.darktrace.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(376014)(82310400026)(36860700013)(14060799003)(1800799024)(7416014)(35042699022);DIR:OUT;SFP:1101;
X-OriginatorOrg: arm.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 10:07:30.7703
(UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: 3d6acb2a-6c1c-4a51-47ca-08dda34f9e36
X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[4.158.2.129];Helo=[outbound-uk1.az.dlp.m.darktrace.com]
X-MS-Exchange-CrossTenant-AuthSource:
AM4PEPF00027A5E.eurprd04.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB8230
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hi Peter,
On Tue, Jun 03, 2025 at 04:44:14PM +0200, Peter Zijlstra wrote:
> On Tue, Jun 03, 2025 at 03:00:40PM +0100, Leo Yan wrote:
>
> > > + if (event->state > PERF_EVENT_STATE_OFF)
> > > + perf_cgroup_event_disable(event, ctx);
> > > +
> >
> > As we discussed, seems to me, the issue is caused by an ambigous state
> > machine transition:
> >
> > When a PMU event state is PERF_EVENT_STATE_EXIT, the current code does
> > not transite the state to PERF_EVENT_STATE_OFF. As a result, the
> > list_del_event() function skips to clean up cgroup pointer for non OFF
> > states. This is different from the code prior to the commit a3c3c6667,
> > which transits states EXIT -> INACTIVE -> OFF.
>
> Right.
>
> > My suggestion is not reliable. Roughly read code, except for the
> > PERF_EVENT_STATE_EXIT case, I think other error cases should also clean
> > up the cgroup pointer. The reason is I don't see other places to
> > clean up the cgroup pointer for these error cases:
> >
> > PERF_EVENT_STATE_REVOKED
> > PERF_EVENT_STATE_DEAD
>
> Those should be done here; on the first transition into these states.
>
> > Only in the PERF_EVENT_STATE_ERROR state, we don't need to cleanup
> > cgroup as this has already been handled in merge_sched_in().
> >
> > So a correct condition would be:
> >
> > if (event->state > PERF_EVENT_STATE_OFF ||
> > event->state <= PERF_EVENT_STATE_EXIT)
> > perf_cgroup_event_disable(event, ctx);
>
> I'm too tired to get my head straight. I'll look tomorrow.
Right; had a sleep. Lets do this :-)
So the normal states are:
ACTIVE ---.
^ |
| |
sched_{in,out}() |
| |
v |
,---> INACTIVE <--+
| |
| {dis,en}able()
sched_in() |
| OFF <--+
| |
`---> ERROR ---'
That is:
sched_in: INACTIVE -> {ACTIVE,ERROR}
sched_out: ACTIVE -> INACTIVE
disable: {ACTIVE,INACTIVE} -> OFF
enable: {OFF,ERROR} -> INACTIVE
Where OFF/ERROR are 'disable' and have this perf_cgroup_event_disable()
called.
Then we have {EXIT,REVOKED,DEAD} states which are various shades of
defunct events:
- EXIT means task that the even was assigned to died, but child events
still live, and further children can still be created. But the event
itself will never be active again. It can only transition to
{REVOKED,DEAD};
I have a slight quetions. after parent event set EXIT,
Does EXIT event should be inherited?
for example
parent task(0, ...) -> parent_event(0, parent_event:NULL)
` child_task(1, parent:0) -> child_event(1, parent_event:0)
` child_task(2, parent:1) -> child_event(2, parent_event:0)
In this case when parent task(0) is exited,
parent->event will be set as EXIT state.
But suppose the child_task(2) try to fork (child_task3) and
inherit the event (create child_event(3, parent_event:0),
and at the fork, forking can observe the parent event state as "EXIT".
In thie situation why child_event(3, parent_event:0) should be created for
child_task(3)?
- REVOKED means the PMU the event was associated with is gone; all
functionality is stopped but the event is still alive. Can only
transition to DEAD;
- DEAD event really is DYING tearing down state and freeing bits.
And now we have the sitation that __perf_remove_from_context() can do:
{ACTIVE,INACTIVE,OFF,ERROR} -> {OFF,EXIT,REVOKED,DEAD}
Where the {OFF,ERROR} -> * transition already have
perf_cgroup_event_disable(), but the {ACTIVE,INACTIVE} -> * part has
not.
The condition:
if (event->state > PERF_EVENT_STATE_OFF)
captures exactly that {ACTIVE,INACTIVE} that still needs the cgroup
disable. Every other state is already a disabled state.
Agreed?
Also, I should probably stick most of all this in a comment somewhere.
--
Sincerely,
Yeoreum Yun
Return-Path: <linux-kernel+bounces-673064-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 5330941E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:12:06 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id A554A1895A5C
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:12:15 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 294BE28DB58;
Wed, 4 Jun 2025 10:11:46 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="MYITG1KW"
Received: from mail-ej1-f45.google.com (mail-ej1-f45.google.com [209.85.218.45])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id A44BA28D8E9
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:11:41 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.45
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749031905; cv=none; b=hFLwGwtpsRCgXLUqOp64Fadi3MWwfuj+VITSpkkRNJMgz9J4ilE7s2xnTNmbOGwjxtsL5su3CfMZvj/T7I1NrE65/xgDdCUyuz/ntFEg5Od5biRPBn79JlApSL0gnmshMoC5nqWi5FdkAsOSimHfDvoIobYaIZ46acqFJRcA9YA=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749031905; c=relaxed/simple;
bh=bMz8PIBAQbrvx8Djn/oBl8MxTjTq84wAVZa1BcDfmSI=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=UouLyuLmPnGPh8W6NJgq6Xk8PPvQxWNWNpS2b6DqRY2Y/RGXT1xb9k1ihYkP7xd/uKQH4hBXoMPPOv+Si0dT4DYZXBr6bBl/uIfpoQLDTxuGnoMLg6MjaSX8PbJqlSpOwJeqeaP5c2M7pKDbJfqW1AXidrQ+f4CyumyI97sBgpE=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=MYITG1KW; arc=none smtp.client-ip=209.85.218.45
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com
Received: by mail-ej1-f45.google.com with SMTP id a640c23a62f3a-ad89ee255easo1199601766b.3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 03:11:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=suse.com; s=google; t=1749031900; x=1749636700; darn=vger.kernel.org;
h=content-transfer-encoding:in-reply-to:from:content-language
:references:cc:to:subject:user-agent:mime-version:date:message-id
:from:to:cc:subject:date:message-id:reply-to;
bh=oWPoWbzUhmp2RDptwz5xvj52B4NS6cLJTvzVIv/q4Ys=;
b=MYITG1KW2pDdcyH0HIRjSnh29SjV6H0LusgszbnRgJmvAPA6jn2WewC8cAHg1Nr+De
l7PtwxmbFx1veP94y3WcND0QBPLjRHpiVJKv9HR4ZbyXFO/oq4UMXVS7H2Pd+RnbYRl0
7hRGDvoPtpsxUucOik1NfinqsvY1s0FsUtfVfS7JyhNrlk6TwVPzAiiRdI5Rt3TMGop2
TKZDXxPupvVlvfiVs/IQPVaz2MSGbdFc/4AFy3n1ukHCHXsRWxRcv1GD9VHKdhzaTuVJ
G1HI3rJJmo3NMHAg1IKCngyMi4EqC3Ax0efTG8iC03dpaRpkSPy7Yrky4fgWB6nOlM08
X3iA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749031900; x=1749636700;
h=content-transfer-encoding:in-reply-to:from:content-language
:references:cc:to:subject:user-agent:mime-version:date:message-id
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=oWPoWbzUhmp2RDptwz5xvj52B4NS6cLJTvzVIv/q4Ys=;
b=gimBQ6bK/urfjtH2afhBZhW4thH1GfwPpFRT7paDnJw2Sp3ABWISamINdX4c4gGxnl
8Y3y7x5njZRmQ9QiW0yKoC6rC4bCKzcPRqEkEZ2z87ZxpNOqoQuWt/z5gBBsxyR/0zVF
EK9pe4M6SDoA7NvVBvhMXh2t9bKU/Sccp/JTrpMxlWN78zknPVaZ2wzXWh+Z8bsR14zI
NaW1YBfQihBM2ZKz++l6qWjE3mggRf1JpL3NgqPDZ7LpPMTNHNBZEikU9G5SYybDRg8h
BJpu0i6uPUnkmN0yeJmVjZQyioJtsVELmqb8LmThCEubhm/bTruHGgPNf9JKhIQ9tnUC
W6ew==
X-Gm-Message-State: AOJu0Ywr6FBuKsA8s71Sm0TV96lk/7gQiXe4JRnGe8lRaWuFCsaCLilV
jME6MjAUFiD6gZnVrxYNMrNemk8hOy4koil08s8P4iUmKpeCF8fCFeqeXDwb7UowGDA=
X-Gm-Gg: ASbGnctSmigqyBmN7iZj5VDkKq0q1flL5dergaWLi8Jl21YdyMF3ogQhBXykKsLFG7j
t+RV15L8vsw9Wxw8nwVXCqmt1ymzgiIUenRqGYWOitx2VyLNBp2ZWOsWMZx2brY8Iuz/mr9ArGV
9WNRAh7o/W1+n/ziFhwMmWmYXESb2pIE2XiRun1IbrK9DwcfT6Du9Gf8vVkHoU7my9EFKy680Hp
UfqqVFhZHdMfE6iahoZEF2/ev14YUYln17/LqDn1fb1g0IK5kNq5NFJVoRD77poOz7H+k8exwjs
b9IvheII8ZbZRk07kVh16pQ4koAK4CYDePe5lVYku+X6Dzam25I7aDa+lMGLznoEVbjnjwRWp1d
Nfqka3W8889TScwm1GQ==
X-Google-Smtp-Source: AGHT+IEN7+lUvVjlo5WrsWRuQY/5JwNtTIftyeq/8cm9Qk7+1lHTStjH4l2FSVtegPvjKCRSAb2npw==
X-Received: by 2002:a17:906:7b56:b0:adb:2ef9:db38 with SMTP id a640c23a62f3a-addf8ebb630mr142177666b.36.1749031899644;
Wed, 04 Jun 2025 03:11:39 -0700 (PDT)
Received: from ?IPV6:2001:a61:13e2:3601:e970:9c8e:9666:22ea? ([2001:a61:13e2:3601:e970:9c8e:9666:22ea])
by smtp.gmail.com with ESMTPSA id a640c23a62f3a-adb325c829csm920799566b.145.2025.06.04.03.11.38
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 03:11:39 -0700 (PDT)
Message-ID: <b4c15a6b-0906-4fea-b218-4467afdd8345@xxxxxxxx>
Date: Wed, 4 Jun 2025 12:11:36 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v12 1/7] mfd: Add core driver for Nuvoton NCT6694
To: a0282524688@xxxxxxxxx, lee@xxxxxxxxxx, linus.walleij@xxxxxxxxxx,
brgl@xxxxxxxx, andi.shyti@xxxxxxxxxx, mkl@xxxxxxxxxxxxxx,
mailhol.vincent@xxxxxxxxxx, andrew+netdev@xxxxxxx, davem@xxxxxxxxxxxxx,
edumazet@xxxxxxxxxx, kuba@xxxxxxxxxx, pabeni@xxxxxxxxxx,
wim@xxxxxxxxxxxxxxxxxx, linux@xxxxxxxxxxxx, jdelvare@xxxxxxxx,
alexandre.belloni@xxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-gpio@xxxxxxxxxxxxxxx,
linux-i2c@xxxxxxxxxxxxxxx, linux-can@xxxxxxxxxxxxxxx,
netdev@xxxxxxxxxxxxxxx, linux-watchdog@xxxxxxxxxxxxxxx,
linux-hwmon@xxxxxxxxxxxxxxx, linux-rtc@xxxxxxxxxxxxxxx,
linux-usb@xxxxxxxxxxxxxxx, Ming Yu <tmyu0@xxxxxxxxxxx>
References: <20250604041418.1188792-1-tmyu0@xxxxxxxxxxx>
<20250604041418.1188792-2-tmyu0@xxxxxxxxxxx>
Content-Language: en-US
From: Oliver Neukum <oneukum@xxxxxxxx>
In-Reply-To: <20250604041418.1188792-2-tmyu0@xxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 04.06.25 06:14, a0282524688@xxxxxxxxx wrote:
From: Ming Yu <tmyu0@xxxxxxxxxxx>
The Nuvoton NCT6694 provides an USB interface to the host to
access its features.
Sub-devices can use the USB functions nct6694_read_msg() and
nct6694_write_msg() to issue a command. They can also request
interrupt that will be called when the USB device receives its
interrupt pipe.
Signed-off-by: Ming Yu <tmyu0@xxxxxxxxxxx>
---
Changes since version 11:
- Modify the irq_domain_add_simple() to irq_domain_create_simple()
- Fix mfd_cell back to v9, and use Use platform_device's id to replace IDA
in sub-drivers
Changes since version 10:
- Add change log for the patch
- Fix mfd_cell to MFD_CELL_NAME()
- Remove unnecessary blank line
Changes since version 9:
- Add KernelDoc to exported functions
Changes since version 8:
- Modify the signed-off-by with my work address
- Rename all MFD cell names to "nct6694-xxx"
- Fix some comments in nct6694.c and in nct6694.h
Changes since version 7:
- Add error handling for devm_mutex_init()
Changes since version 6:
Changes since version 5:
- Fix mfd_cell to MFD_CELL_NAME() and MFD_CELL_BASIC()
- Drop unnecessary macros
Changes since version 4:
- Modify arguments in read/write function to a pointer to cmd_header
Changes since version 3:
- Modify array buffer to structure
- Fix defines and comments
- Add header <linux/bits.h> and use BIT macro
- Modify mutex_init() to devm_mutex_init()
Changes since version 2:
Changes since version 1:
- Implement IRQ domain to handle IRQ demux
- Modify USB_DEVICE to USB_DEVICE_AND_INTERFACE_INFO API
- Add command structure
- Fix USB functions
- Sort each driver's header files alphabetically
MAINTAINERS | 6 +
drivers/mfd/Kconfig | 15 ++
drivers/mfd/Makefile | 2 +
drivers/mfd/nct6694.c | 386 ++++++++++++++++++++++++++++++++++++
include/linux/mfd/nct6694.h | 98 +++++++++
5 files changed, 507 insertions(+)
create mode 100644 drivers/mfd/nct6694.c
create mode 100644 include/linux/mfd/nct6694.h
diff --git a/MAINTAINERS b/MAINTAINERS
index 98201e1f4ab5..29d2d05bac22 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -17679,6 +17679,12 @@ F: drivers/nubus/
F: include/linux/nubus.h
F: include/uapi/linux/nubus.h
+NUVOTON NCT6694 MFD DRIVER
+M: Ming Yu <tmyu0@xxxxxxxxxxx>
+S: Supported
+F: drivers/mfd/nct6694.c
+F: include/linux/mfd/nct6694.h
+
NVIDIA (rivafb and nvidiafb) FRAMEBUFFER DRIVER
M: Antonino Daplas <adaplas@xxxxxxxxx>
L: linux-fbdev@xxxxxxxxxxxxxxx
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index 96992af22565..489c1950f1ac 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -1078,6 +1078,21 @@ config MFD_MENF21BMC
This driver can also be built as a module. If so the module
will be called menf21bmc.
+config MFD_NCT6694
+ tristate "Nuvoton NCT6694 support"
+ select MFD_CORE
+ depends on USB
+ help
+ This enables support for the Nuvoton USB device NCT6694, which shares
+ peripherals.
+ The Nuvoton NCT6694 is a peripheral expander with 16 GPIO chips,
+ 6 I2C controllers, 2 CANfd controllers, 2 Watchdog timers, ADC,
+ PWM, and RTC.
+ This driver provides core APIs to access the NCT6694 hardware
+ monitoring and control features.
+ Additional drivers must be enabled to utilize the specific
+ functionalities of the device.
+
config MFD_OCELOT
tristate "Microsemi Ocelot External Control Support"
depends on SPI_MASTER
diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
index 5e5cc279af60..a96204d938fc 100644
--- a/drivers/mfd/Makefile
+++ b/drivers/mfd/Makefile
@@ -120,6 +120,8 @@ obj-$(CONFIG_MFD_MC13XXX) += mc13xxx-core.o
obj-$(CONFIG_MFD_MC13XXX_SPI) += mc13xxx-spi.o
obj-$(CONFIG_MFD_MC13XXX_I2C) += mc13xxx-i2c.o
+obj-$(CONFIG_MFD_NCT6694) += nct6694.o
+
obj-$(CONFIG_MFD_CORE) += mfd-core.o
ocelot-soc-objs := ocelot-core.o ocelot-spi.o
diff --git a/drivers/mfd/nct6694.c b/drivers/mfd/nct6694.c
new file mode 100644
index 000000000000..82d378ee47ed
--- /dev/null
+++ b/drivers/mfd/nct6694.c
@@ -0,0 +1,386 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2025 Nuvoton Technology Corp.
+ *
+ * Nuvoton NCT6694 core driver using USB interface to provide
+ * access to the NCT6694 hardware monitoring and control features.
+ *
+ * The NCT6694 is an integrated controller that provides GPIO, I2C,
+ * CAN, WDT, HWMON and RTC management.
+ */
+
+#include <linux/bits.h>
+#include <linux/interrupt.h>
+#include <linux/irq.h>
+#include <linux/irqdomain.h>
+#include <linux/kernel.h>
+#include <linux/mfd/core.h>
+#include <linux/mfd/nct6694.h>
+#include <linux/module.h>
+#include <linux/slab.h>
+#include <linux/usb.h>
+
+static const struct mfd_cell nct6694_devs[] = {
+ MFD_CELL_BASIC("nct6694-gpio", NULL, NULL, 0, 0),
+ MFD_CELL_BASIC("nct6694-gpio", NULL, NULL, 0, 1),
+ MFD_CELL_BASIC("nct6694-gpio", NULL, NULL, 0, 2),
+ MFD_CELL_BASIC("nct6694-gpio", NULL, NULL, 0, 3),
+ MFD_CELL_BASIC("nct6694-gpio", NULL, NULL, 0, 4),
+ MFD_CELL_BASIC("nct6694-gpio", NULL, NULL, 0, 5),
+ MFD_CELL_BASIC("nct6694-gpio", NULL, NULL, 0, 6),
+ MFD_CELL_BASIC("nct6694-gpio", NULL, NULL, 0, 7),
+ MFD_CELL_BASIC("nct6694-gpio", NULL, NULL, 0, 8),
+ MFD_CELL_BASIC("nct6694-gpio", NULL, NULL, 0, 9),
+ MFD_CELL_BASIC("nct6694-gpio", NULL, NULL, 0, 10),
+ MFD_CELL_BASIC("nct6694-gpio", NULL, NULL, 0, 11),
+ MFD_CELL_BASIC("nct6694-gpio", NULL, NULL, 0, 12),
+ MFD_CELL_BASIC("nct6694-gpio", NULL, NULL, 0, 13),
+ MFD_CELL_BASIC("nct6694-gpio", NULL, NULL, 0, 14),
+ MFD_CELL_BASIC("nct6694-gpio", NULL, NULL, 0, 15),
+
+ MFD_CELL_BASIC("nct6694-i2c", NULL, NULL, 0, 0),
+ MFD_CELL_BASIC("nct6694-i2c", NULL, NULL, 0, 1),
+ MFD_CELL_BASIC("nct6694-i2c", NULL, NULL, 0, 2),
+ MFD_CELL_BASIC("nct6694-i2c", NULL, NULL, 0, 3),
+ MFD_CELL_BASIC("nct6694-i2c", NULL, NULL, 0, 4),
+ MFD_CELL_BASIC("nct6694-i2c", NULL, NULL, 0, 5),
+
+ MFD_CELL_BASIC("nct6694-canfd", NULL, NULL, 0, 0),
+ MFD_CELL_BASIC("nct6694-canfd", NULL, NULL, 0, 1),
+
+ MFD_CELL_BASIC("nct6694-wdt", NULL, NULL, 0, 0),
+ MFD_CELL_BASIC("nct6694-wdt", NULL, NULL, 0, 1),
+
+ MFD_CELL_NAME("nct6694-hwmon"),
+
+ MFD_CELL_NAME("nct6694-rtc"),
+};
+
+static int nct6694_response_err_handling(struct nct6694 *nct6694, unsigned char err_status)
+{
+ switch (err_status) {
+ case NCT6694_NO_ERROR:
+ return 0;
+ case NCT6694_NOT_SUPPORT_ERROR:
+ dev_err(nct6694->dev, "Command is not supported!\n");
+ break;
+ case NCT6694_NO_RESPONSE_ERROR:
+ dev_warn(nct6694->dev, "Command received no response!\n");
+ break;
+ case NCT6694_TIMEOUT_ERROR:
+ dev_warn(nct6694->dev, "Command timed out!\n");
+ break;
+ case NCT6694_PENDING:
+ dev_err(nct6694->dev, "Command is pending!\n");
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ return -EIO;
+}
+
+/**
+ * nct6694_read_msg() - Read message from NCT6694 device
+ * @nct6694: NCT6694 device pointer
+ * @cmd_hd: command header structure
+ * @buf: buffer to store the response data
+ *
+ * Sends a command to the NCT6694 device and reads the response.
+ * The command header is specified in @cmd_hd, and the response
+ * data is stored in @buf.
+ *
+ * Return: Negative value on error or 0 on success.
+ */
+int nct6694_read_msg(struct nct6694 *nct6694, const struct nct6694_cmd_header *cmd_hd, void *buf)
+{
+ union nct6694_usb_msg *msg = nct6694->usb_msg;
+ struct usb_device *udev = nct6694->udev;
+ int tx_len, rx_len, ret;
+
+ guard(mutex)(&nct6694->access_lock);
+
+ memcpy(&msg->cmd_header, cmd_hd, sizeof(*cmd_hd));
+ msg->cmd_header.hctrl = NCT6694_HCTRL_GET;
+
+ /* Send command packet to USB device */
+ ret = usb_bulk_msg(udev, usb_sndbulkpipe(udev, NCT6694_BULK_OUT_EP), &msg->cmd_header,
+ sizeof(*msg), &tx_len, NCT6694_URB_TIMEOUT);
+ if (ret)
+ return ret;
+
+ /* Receive response packet from USB device */
+ ret = usb_bulk_msg(udev, usb_rcvbulkpipe(udev, NCT6694_BULK_IN_EP), &msg->response_header,
+ sizeof(*msg), &rx_len, NCT6694_URB_TIMEOUT);
+ if (ret)
+ return ret;
+
+ /* Receive data packet from USB device */
+ ret = usb_bulk_msg(udev, usb_rcvbulkpipe(udev, NCT6694_BULK_IN_EP), buf,
+ le16_to_cpu(cmd_hd->len), &rx_len, NCT6694_URB_TIMEOUT);
+ if (ret)
+ return ret;
+
+ if (rx_len != le16_to_cpu(cmd_hd->len)) {
+ dev_err(nct6694->dev, "Expected received length %d, but got %d\n",
+ le16_to_cpu(cmd_hd->len), rx_len);
+ return -EIO;
+ }
+
+ return nct6694_response_err_handling(nct6694, msg->response_header.sts);
+}
+EXPORT_SYMBOL_GPL(nct6694_read_msg);
+
+/**
+ * nct6694_write_msg() - Write message to NCT6694 device
+ * @nct6694: NCT6694 device pointer
+ * @cmd_hd: command header structure
+ * @buf: buffer containing the data to be sent
+ *
+ * Sends a command to the NCT6694 device and writes the data
+ * from @buf. The command header is specified in @cmd_hd.
+ *
+ * Return: Negative value on error or 0 on success.
+ */
+int nct6694_write_msg(struct nct6694 *nct6694, const struct nct6694_cmd_header *cmd_hd, void *buf)
+{
+ union nct6694_usb_msg *msg = nct6694->usb_msg;
+ struct usb_device *udev = nct6694->udev;
+ int tx_len, rx_len, ret;
+
+ guard(mutex)(&nct6694->access_lock);
+
+ memcpy(&msg->cmd_header, cmd_hd, sizeof(*cmd_hd));
+ msg->cmd_header.hctrl = NCT6694_HCTRL_SET;
+
+ /* Send command packet to USB device */
+ ret = usb_bulk_msg(udev, usb_sndbulkpipe(udev, NCT6694_BULK_OUT_EP), &msg->cmd_header,
+ sizeof(*msg), &tx_len, NCT6694_URB_TIMEOUT);
+ if (ret)
+ return ret;
+
+ /* Send data packet to USB device */
+ ret = usb_bulk_msg(udev, usb_sndbulkpipe(udev, NCT6694_BULK_OUT_EP), buf,
+ le16_to_cpu(cmd_hd->len), &tx_len, NCT6694_URB_TIMEOUT);
+ if (ret)
+ return ret;
+
+ /* Receive response packet from USB device */
+ ret = usb_bulk_msg(udev, usb_rcvbulkpipe(udev, NCT6694_BULK_IN_EP), &msg->response_header,
+ sizeof(*msg), &rx_len, NCT6694_URB_TIMEOUT);
+ if (ret)
+ return ret;
+
+ /* Receive data packet from USB device */
+ ret = usb_bulk_msg(udev, usb_rcvbulkpipe(udev, NCT6694_BULK_IN_EP), buf,
+ le16_to_cpu(cmd_hd->len), &rx_len, NCT6694_URB_TIMEOUT);
+ if (ret)
+ return ret;
+
+ if (rx_len != le16_to_cpu(cmd_hd->len)) {
+ dev_err(nct6694->dev, "Expected transmitted length %d, but got %d\n",
+ le16_to_cpu(cmd_hd->len), rx_len);
+ return -EIO;
+ }
+
+ return nct6694_response_err_handling(nct6694, msg->response_header.sts);
+}
+EXPORT_SYMBOL_GPL(nct6694_write_msg);
+
+static void usb_int_callback(struct urb *urb)
+{
+ struct nct6694 *nct6694 = urb->context;
+ unsigned int *int_status = urb->transfer_buffer;
+ int ret;
+
+ switch (urb->status) {
+ case 0:
+ break;
+ case -ECONNRESET:
+ case -ENOENT:
+ case -ESHUTDOWN:
+ return;
+ default:
+ goto resubmit;
+ }
+
+ while (*int_status) {
+ int irq = __ffs(*int_status);
+
+ generic_handle_irq_safe(irq_find_mapping(nct6694->domain, irq));
+ *int_status &= ~BIT(irq);
+ }
Does modifying the byte have any benefit?
+resubmit:
+ ret = usb_submit_urb(urb, GFP_ATOMIC);
+ if (ret)
+ dev_warn(nct6694->dev, "Failed to resubmit urb, status %pe", ERR_PTR(ret));
+}
+
+static void nct6694_irq_lock(struct irq_data *data)
+{
+ struct nct6694 *nct6694 = irq_data_get_irq_chip_data(data);
+
+ mutex_lock(&nct6694->irq_lock);
+}
Why? Does this do anything but make it _harder_ to tell that you
cannot take the lock in interrupt?
Regards
Oliver
Return-Path: <linux-kernel+bounces-673065-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id EF24B41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:13:49 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id CAB943A2E6A
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:13:26 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 3CE0E28D8E7;
Wed, 4 Jun 2025 10:13:42 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iXwFfY6B"
Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3F45D28C030;
Wed, 4 Jun 2025 10:13:39 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.43
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749032021; cv=none; b=ri6DIZkZGIXPH50MpmoPC/KN9NeBv9YZqUliHiQddyGR7rUIq0xxQaQ6ehhahbjBLK1usnpAGyDTH9pW/J908sodD/kUwKfCYLiA/pxa0Qo/juSTQalZh0L9T0+OMz4jysQluviICJavY0UtFkHaKPE6dM6W7eqwGhy12ZNIHOc=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749032021; c=relaxed/simple;
bh=lMABpan9iE9b5FiftfCZKRFqnb71Y82a2DsbpqpyudU=;
h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
To:Cc:Content-Type; b=LBvbpZgab3mnc1H32+tcuSuB9ihFzaVUyU99JKUDlJkAfmSjAFw4pvW8ntXdecYQ5ZOJ/yHtbpb0v49P6LS/H3aGNrj8WNSB6xRLXI+M+3gUZtBgoEh/PfNg1KBksEiwQD/mZF9D8DI6zdmpT9g0boxBGOCrpyj84dry/aEzWpU=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=iXwFfY6B; arc=none smtp.client-ip=209.85.216.43
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
Received: by mail-pj1-f43.google.com with SMTP id 98e67ed59e1d1-312a806f002so465153a91.3;
Wed, 04 Jun 2025 03:13:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1749032019; x=1749636819; darn=vger.kernel.org;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:from:to:cc:subject:date
:message-id:reply-to;
bh=lMABpan9iE9b5FiftfCZKRFqnb71Y82a2DsbpqpyudU=;
b=iXwFfY6BPN1C0v4YHx4cZNM9dxMgUI2516TUs7SUsEfSISpKeb9LgrL9I5jYoIneMM
TnHMaTRusqb0BR6bvtqZWnIqMuqQBX7+1EYJ1ffLdJp2zjGdosDqikPa2C0bRRcJXSUg
zULAaFZvUeHLXVMi77zDAwNDLsPVveuJuIJTcGA4yXWp3z+Cz90sgGxFHpI5kJB3ul/h
7qFOPBu6laNyUXE1btEnCe/VMtUZg+ZxhWteJSgCX0HxJStSOCaww5cCliSylKY5CACT
EejO1M3Yh0F9NFff75SpSSnJLilZOrpr/1uOsBaoUOmuf17iSUtdfB67ZG4MzXDsWW4S
zZFA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749032019; x=1749636819;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=lMABpan9iE9b5FiftfCZKRFqnb71Y82a2DsbpqpyudU=;
b=dtLkQufKE0+i7T5CSffdtCKKfX6UNOR8BFvS28FiF11kp0jZOoow67ZXncsfzTYHzA
n/ENeedlDFPsrBWXuiTp7jZB2ilGedWJt+atAOr/tmXlKg9sNqmE8MYYdDVoODEQtmWg
4z2VTZsdvOwgUpUJ4P1mepjMcMON1Vb4ZwcpcU1lY3G3No53nQ5KesNheROf7HBcNL0H
0HqtmSdsFLL1AHn5JHuenjQ3ps685e82ytxYgB+exRbaC9LOB5HocJRqDb8apiLr5nSe
lpE8lktYD5wNrfIW4dVKvFr2IsnCvSUyxeeF1JgB5vLKp8bCehkgJmBq6+Os3Y65FyUV
x0+g==
X-Forwarded-Encrypted: i=1; AJvYcCXVwZoNQK/Q97uijViO9HWSwe4WDWZDP1yrEQw/wF+rjFZindoBkSXsXB3s1PxB7Wx1KWBvAhvK4b4v6ws=@vger.kernel.org, AJvYcCXv49qcdo5vQxDfuJQElZrQJa6w/pE8kerPyStoCv9Dqu0AkiQZ++3HmCkrYPBNc1dWqDB59VlqD9S5OHjPDEc=@vger.kernel.org
X-Gm-Message-State: AOJu0YzkPOfXS493ijyn81c6U1i8exz7J/Y4CF0jR8WhTrIYCj/r8I3Z
X0YrGD4GRkMGjD1VfiuplEFf9o6f1bD2ntb5TyqjQ2QTuzFZ1NZJQuykueiUGnDXHU0jxR0vxwg
9WmDXhVFKXlkqaVm47bqMxE6T3YiuUnA=
X-Gm-Gg: ASbGncvsVeFglyzbiRim5o6Imbtwsk/xZaS6ofd33KAWQKpjSjl/JKNG4Ixm9YS875i
+WnBxQ/OsKIok96I4BIETQwoJO83I9xGPSBoUeVnZkdAVq3vFNvP0vNFLg5ako0iUMCM/3FBVCq
ydGlAtEjgDSLDfJVo+u/Dfv3wIxYxnbyxoQZMCf3P4AcE=
X-Google-Smtp-Source: AGHT+IFcTXBF+gTGjJ32WA7AwDMf5FOdkFiFympx6S8u4ynrijxsyC/aBymU2IsbEIbDK9n3nW8sDRHu3GPTwfVni/g=
X-Received: by 2002:a17:90b:2ec5:b0:311:9c9a:58db with SMTP id
98e67ed59e1d1-3130ccaf030mr1374802a91.1.1749032019354; Wed, 04 Jun 2025
03:13:39 -0700 (PDT)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
References: <20250530-b4-rust_miscdevice_registrationdata-v4-0-d313aafd7e59@xxxxxxxxx>
<20250530-b4-rust_miscdevice_registrationdata-v4-2-d313aafd7e59@xxxxxxxxx>
<DAACCYW3QRQE.1O75L2SHJYVPM@xxxxxxxxxx> <3eef5777-9190-4782-8433-7b6ad4b9acd3@xxxxxxxxx>
<DADAEIT9E1R8.1J69W5DKYAQGY@xxxxxxxxxx> <CANiq72=893T0ZHawsym358N5iexbj+5UEL_RqMA_w_dEbJ+Ujw@xxxxxxxxxxxxxx>
<de844563-651a-4a6e-bf61-7a7b41d1cb43@xxxxxxxxx>
In-Reply-To: <de844563-651a-4a6e-bf61-7a7b41d1cb43@xxxxxxxxx>
From: Miguel Ojeda <miguel.ojeda.sandonis@xxxxxxxxx>
Date: Wed, 4 Jun 2025 12:13:27 +0200
X-Gm-Features: AX0GCFvf3tldhMcAt47pMJDVKok6Hzu38Q8OPRGaR3AE0QqUvMjIGgC2Mn7Wukk
Message-ID: <CANiq72mWN+o-wF0GNi34PttNqaNWoYuiY9H+KJs5Q_Gi=hesyg@xxxxxxxxxxxxxx>
Subject: Re: [PATCH v4 2/3] rust: miscdevice: add additional data to MiscDeviceRegistration
To: Christian Schrefl <chrisi.schrefl@xxxxxxxxx>
Cc: Benno Lossin <lossin@xxxxxxxxxx>, Miguel Ojeda <ojeda@xxxxxxxxxx>,
Danilo Krummrich <dakr@xxxxxxxxxx>, Alex Gaynor <alex.gaynor@xxxxxxxxx>,
Boqun Feng <boqun.feng@xxxxxxxxx>, Gary Guo <gary@xxxxxxxxxxx>,
=?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= <bjorn3_gh@xxxxxxxxxxxxxx>,
Andreas Hindborg <a.hindborg@xxxxxxxxxx>, Alice Ryhl <aliceryhl@xxxxxxxxxx>,
Trevor Gross <tmgross@xxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>,
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, Lee Jones <lee@xxxxxxxxxx>,
Daniel Almeida <daniel.almeida@xxxxxxxxxxxxx>,
=?UTF-8?Q?Gerald_Wisb=C3=B6ck?= <gerald.wisboeck@xxxxxxxxxxx>,
rust-for-linux@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 4, 2025 at 11:54=E2=80=AFAM Christian Schrefl
<chrisi.schrefl@xxxxxxxxx> wrote:
I think that we can add it to `build_assert.rs`, since this would
be a build time construct.
Hmm... it definitely makes sense, but I am not sure we want to mix
them -- the `build_assert!` is fairly special / different from the
others, since it is not really at compile-time like the others (which
is why it is a last-resort option), and it would be nice to have its
implementation self-contained in a different mod/file too.
Perhaps `compile_asserts.rs` or similar if we want to split them into
compiletime/buildtime/runtime?
Should I do this in a separate series?
Yeah, no worries, it can be done later.
Thanks!
Cheers,
Miguel
Return-Path: <linux-kernel+bounces-673066-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id B97D141E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:15:13 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 2587B3A3552
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:14:51 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id DE8A7223DC1;
Wed, 4 Jun 2025 10:15:08 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="gA+9l/Vy"
Received: from DU2PR03CU002.outbound.protection.outlook.com (mail-northeuropeazon11011029.outbound.protection.outlook.com [52.101.65.29])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id E697028CF62;
Wed, 4 Jun 2025 10:15:04 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.65.29
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749032107; cv=fail; b=LdHKsefcxV5vR0GlARVDzTRuJSG8dyV3lBxzhLhKrOjDoieL++pDjCU4aOSz99FzfqfjKqZ8vqxrC+nO/rmXgnYlrzNjSrggCHbtVoMugP64UOMHtbxg6ea+9U+w9N7RfYXG+PKPSTooKJf52WTLmkBlTPNSlTv1ZcNasZoAb0A=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749032107; c=relaxed/simple;
bh=TIDKYIwjXZPR4/wk7cF96zCWEVh23z2ICIhT59AcxNI=;
h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=cERW+ORZjunUlV+BzV/9lCw+/V4x1tXVEMW2pboxBQ7eAmbITZbYb9odn36GMNVHABfQIQWDX5QsUU4WR7b7oJzse7w/lvnu7TxQ8UZTA+nGIVORYxQsA7O+OijzDXoASjcckuV7RdR/t3Ck6WJKN70tmG8Pr3/awdqaQ1YbtbQ=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=gA+9l/Vy; arc=fail smtp.client-ip=52.101.65.29
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=C/mNJ68bnz9sXAz1M9s/YSYmzc6GYeLX8da5LoDcfS5AvDUmwnxFM55e2b7V/O9SE0rXAF88A9bO+YobH5VQ2mW1WcxzqFPqkEQ27yjHtPFcYkTuaEU3ZIcEv2cg+U4dZvtdSOFxCY0x3CSOX5knaRW5e3Pkmqy//FNIyWpwGvFdCNlthgIxaUqhtPiZDps+63q5A6vmBXEPlotCJJEgcwl9latWYOBQT0JunJE4S9lujvrPG5wmYruDxj9RHtQzQ7B783T22r7kIZ/TolelNU6983MyP1aSVGfwPDVFxMD1WUZ782PV5NQ8MJ70hCXRsdnM82F5fKQgKM5S8/TgAQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=0o1I8ADJGekovFD80vpZgXZqg1XoYvgjChCpexc4QiQ=;
b=wtU8ZAvfbgu6+3UV61c/4kJkTPeVPojAoid7pHNAHFxBYG17XyIdGGelUEik2gueFrbvmk5TivcUNCtS3Onzx18NuQ8QDrS8JjrOA7z1g+HjVC7Mtm2qVQtDyizYCqhOyIYgH5TVPEjYwdI49RAKNsEGDQLHR/p/uLdKHZKCBK23SYXMZznmX1urEdDwJn2oFlL3mvbCNqLtL2XZL8CK0XkpY3sIXeXOzWDk6EyGi9m9zRd6JzEE9LLBaq7P2lWltYHGT/6w0aytblYPNG8Sc1s1+PPicxOkq7hUBjb9vhhaAfyiL5zwXpbZNdr2aE5eeoKKKB4yV4bqm+fsEhExfw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass
header.d=nxp.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=0o1I8ADJGekovFD80vpZgXZqg1XoYvgjChCpexc4QiQ=;
b=gA+9l/Vy2/QS8PEjmBLgGaB48Nghc5ZNSPF5eHwJWT1RnPIZMAxPFS3dZz4aRw/WQWeyU5ynN/mg24vKOXYADb97geBer3bY1iXUD9rw+xYxBVgGzZUhcWi7srYVPOTfWCVEH0nieplZdh3YkflhHDH+jTkhmbbcccc54YaYlPm0m8KKvq5sPbznkPQywzI6AEuKRQWMeq7d/ghPnHMhUIAe2VrFi7YsjzuTp6tnVzs6X3nvEfBtHL+Vz7iqFgi1/g6vbHuMoZPL/yU3bExuFKTU7IcTb4HudIMSQHU2yp+uG08laS0T2XEC01dXJM+b/mipa8s8C52fhJ7TMzJsTQ==
Authentication-Results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=nxp.com;
Received: from PAXPR04MB8301.eurprd04.prod.outlook.com (2603:10a6:102:1c5::16)
by DB9PR04MB8480.eurprd04.prod.outlook.com (2603:10a6:10:2c6::20) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8769.37; Wed, 4 Jun
2025 10:15:02 +0000
Received: from PAXPR04MB8301.eurprd04.prod.outlook.com
([fe80::85de:cf79:69cf:4833]) by PAXPR04MB8301.eurprd04.prod.outlook.com
([fe80::85de:cf79:69cf:4833%3]) with mapi id 15.20.8813.018; Wed, 4 Jun 2025
10:15:02 +0000
From: meenakshi.aggarwal@xxxxxxx
To: gaurav.jain@xxxxxxx,
herbert@xxxxxxxxxxxxxxxxxxx,
davem@xxxxxxxxxxxxx,
linux-crypto@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
Cc: Meenakshi Aggarwal <meenakshi.aggarwal@xxxxxxx>
Subject: [PATCH] crypto: caam - Set DMA alignment explicitly
Date: Wed, 4 Jun 2025 12:14:46 +0200
Message-Id: <20250604101446.3993932-1-meenakshi.aggarwal@xxxxxxx>
X-Mailer: git-send-email 2.25.1
Content-Transfer-Encoding: 8bit
Content-Type: text/plain
X-ClientProxiedBy: AS4P191CA0048.EURP191.PROD.OUTLOOK.COM
(2603:10a6:20b:657::17) To PAXPR04MB8301.eurprd04.prod.outlook.com
(2603:10a6:102:1c5::16)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: PAXPR04MB8301:EE_|DB9PR04MB8480:EE_
X-MS-Office365-Filtering-Correlation-Id: a8743088-ee0f-4eee-9b73-08dda350ab24
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam:
BCL:0;ARA:13230040|1800799024|366016|376014|52116014|38350700014;
X-Microsoft-Antispam-Message-Info:
=?us-ascii?Q?v+dgs0xTuNWB1rLEiCwF8fvuiPoOjwHU4IqVIFJKVCkmp4knl5zFKcM4e8nQ?=
=?us-ascii?Q?31plErsMt2LfYP6RFHsHz5kBJjtLAZdRZogsYHbXxprvz3QyUFsxV4KEYYVT?=
=?us-ascii?Q?aGGhNZP9WBnxZmFGf2vwA7aTdzCQhcyVYITUZ3rvJcaq7dpxLF8oJ3HSBtDj?=
=?us-ascii?Q?qNS1zuhYZDByYy9GOMmnSehMZLnLc8sTIxYEFiL+FqFFgTi3sxJ87RwE5vvk?=
=?us-ascii?Q?hsDtERA/krQWOG/CaBTf+UtcK9NO/KMcyr2uybXjkxtTeHtByH4/04sbqsXZ?=
=?us-ascii?Q?ZkGRY+39Dfk5/DvPX8pXJ6tYS9M/9NYr41nnD7lDBnU0HN0fGYYzfWfN2fy0?=
=?us-ascii?Q?hLJpWeYMsLbT1oscynO1jrvVMytJkX4P4B8DQOIx1SIr+i2En+LRzHcinIrD?=
=?us-ascii?Q?ZCQYw9CxF8AhRs+GZQhTiUGDH66Nz7tivoYPD4556SLwWd4Au9pgfuHAizmH?=
=?us-ascii?Q?LIzxbvgcD4mF2+13xViSysvhBS44/JidnVih5BxBz+sa2rGnWpMfvI3gaoq0?=
=?us-ascii?Q?yQELh0Lbcps1YBWZF00JVplTN8w8cVGAiIbWZfZvBVKw93/OtA8ce4BxsFSP?=
=?us-ascii?Q?b1SOzcAkxOa6qxAOefXWlNd1jvQpCPxalHqZiooUNeFWt5BvZ4pnZf6TknBe?=
=?us-ascii?Q?/1J65j64Ot1ELRU+iLrQ02rEM4vkLZnLG33/4MQ1OBy6Tu6KdxSCJ5rb+lkC?=
=?us-ascii?Q?QLtjBJXEY/qLBcIzsM3ROFe0+wObWesgzb6uNsrOY0AkXlte8BtnT9Zmxb7q?=
=?us-ascii?Q?D9hQo4J6VEDoihN91HRQw2gZNj1MCii9nd4/KxAzwIoNCFu59VG1bHvb5d9G?=
=?us-ascii?Q?8iyNadISLxKBpppZ+twngp5hlmG6ARpEi7bSRkfv7Wt0Oo3wROCRa07Cq7sb?=
=?us-ascii?Q?CDY5MlX12YwkLp110aocDCal/bbvQvjnaefkoeW426yaj4dVWXC746WsWB6A?=
=?us-ascii?Q?hZnpXm4ajOK5ZfAz1W/lzt244gAR3xBcQnSoNrl6eQjXLoOX0McLUT2qo9zq?=
=?us-ascii?Q?FeLjRw43NXY9DQ+MpZuiKUMp7jetwZmxtJQNiS9SZz6MhnCm/hT7ovZ5csvz?=
=?us-ascii?Q?12yA6wrRBSieP9SyxG8cLATCipgzRb/tzETkm63DmyjAtvVLFi0zRYU6+4Jb?=
=?us-ascii?Q?6DlwT7ZF0iUw3XRuyRVjqiH229XZSG7+5Y9WYx2UooKYm2zI8k7+YbGUT3RH?=
=?us-ascii?Q?Wf/b8Hg0FJwNMUi44HjhIlI1blrkS5zjYnSXSpcEg9x7pMJw/YwCdIbIY1Rh?=
=?us-ascii?Q?rlJCGqMJ18eNxcXRdpGoeOxz3XSLyYPMraljHsw+uadgcW64WgSnzsIzVV78?=
=?us-ascii?Q?BiSQFccvaOymqvCuww9De12a+i/S8LOKQZzq13aCCxi7hmUT3i6ixdSm2aDm?=
=?us-ascii?Q?pUNX/teKmwqjK9yO16XgateGNGmHdccUo7qgUW+t+NGIyOmdJVDY4vKiQRwX?=
=?us-ascii?Q?PBvi1sA0omntUDVIoBnQP3aNEl7Aei+T/zJJISESJGg2Bh03tpd0mPrEhoqF?=
=?us-ascii?Q?fX/FYkJ7JaseBhQ=3D?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB8301.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(52116014)(38350700014);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?us-ascii?Q?xSCiLd2Iaalpu/qNP+hviV8X2q/oclgvMAjhi4mBtxIi1MXHJV4OoeBTnAQI?=
=?us-ascii?Q?jG03r5i5tzZbpLpwx6X0Akw43k+ldsOxoTG2LwA1qbOBPJKD8e28VZG0g7/j?=
=?us-ascii?Q?XSZRs10s0Wx638gOhNvqv0zfv+23GIUWP810kiu4AhemFZEYwub3lNPsGijC?=
=?us-ascii?Q?pytvfLqlsyZhk+Bnq0X5Gd2iyd2JJrOIyfJixBA+BY8zYfHtTzF7DPY/ipXT?=
=?us-ascii?Q?/eIGpxxXxNGtVDYKZuFP8TOfqbGGuX34vGzDgLBOEY6bLZ2BH0zm2CNkjxWj?=
=?us-ascii?Q?9FDGfIyVXJsIZkgXEBjJz6DhJZezhsLf5hSS8uqJTub36vygdOBQXkcgJu/q?=
=?us-ascii?Q?HY1BnT0EOMKEYMG9uhaXEij7ZFF2OHCYSfnboFdI28OVKCnGqvgs0U/Rcwdm?=
=?us-ascii?Q?DzMKA58T1h/FtWc3X1C2oxT0qeq6hZTmfVLLgBMsXRQqEvqGHwFmxWpHnhEI?=
=?us-ascii?Q?4p6W23Tv4YcKme/HdBNbz2cSznUJUF8spAefYhe+QM3AKVKaYnqJBVe9l5S9?=
=?us-ascii?Q?wbEWJBsWQoIiL9LpBCo1BCnMSiPvPf5vB8rsNBoVCERTiEBp8uN28HWFeCo7?=
=?us-ascii?Q?kgU2Fas76HDbWCoGdbKfK6sRj6qHKFVxPI5+DW6zCB2muv/sskUA80VUFcR5?=
=?us-ascii?Q?jjhK81klqimpNJxpSMSOknxdlyvO98tE7l5askkIjFDYRa9m4O9GFXrW+ZI/?=
=?us-ascii?Q?SFPK9iAl11Lvt+xhtlDUhLyylb2/4H+0dswrAFZEkkwUsTgTkjrCSaR/Or+2?=
=?us-ascii?Q?QOCmVuLtfn3LCfry9Vnd/Vx4oYD3t9KyC8x5kVBZliV7DSHwBEtkORuoIsl/?=
=?us-ascii?Q?5cAjN89W1QTY6J4Fyw8PJE5bOyVm2/4pFgI3ES8cYd/GhqmnJNJizmr2/z7C?=
=?us-ascii?Q?TqcKEaI8Z8sYr5hhhTkI4i8DOEXnd+RNsBEc9OfYjp+rq9q8ZUzdkggnEh2/?=
=?us-ascii?Q?ZFs7sossmwl/M8xdrsB/iLC489bqUw3DYNRaIDGIeRpkZ5E7izRv/ax2QPVc?=
=?us-ascii?Q?fNGpjrfKgSzFnWmyIut9bUhbq2PWAahl+vycCADg1w/8vwPIuSfssz8Yq5xu?=
=?us-ascii?Q?bEaboKgVbUkKXXA0675n0Ahswe4KB6/nzSatYVc46vOdGRfpheTXtJVTza5v?=
=?us-ascii?Q?Oy6a4fKqgx4tI5erFyV3QWkjPrYRBWaCkZMAsO83rf+KOOuwLYKBl8ik8N1l?=
=?us-ascii?Q?QJTjt5qkWul/oeN5UBcACO3gcr/R1KcleWxIwbjDOwDA9VCONvKOunw3movc?=
=?us-ascii?Q?v2FvW/So7Ckptk3CMYgGG3jbL6+e123G/t99tko9tp62B70/ONaQ2nMsCGhv?=
=?us-ascii?Q?+fiGMDWa1jdYni5mQuhiF333MA4gzwwolSilTgNLk9RI1HcyjH9XM0TfFi/y?=
=?us-ascii?Q?HLzx/lLhd8vvesyGKe/RI9KzgTf+EyZmIURPt1Pbbz7Uit7Y0vBmM8BMTM3p?=
=?us-ascii?Q?/+UN7/paXCVDeZWZqXSpeuTnavE4lMr3zUZCL2UZpGjChYknKglxd40Tc4Xn?=
=?us-ascii?Q?2QPZ8TbsZprLLKxVMQKH3GaF6fN/NV+EuG+aPHoor3H6CSRASVfgH6CXnHmk?=
=?us-ascii?Q?mP0Og/Y9wfFHHCvbiS0BHxD99M2HrazaOnQwA7MoGj4TlXCqh4eql+SpMibF?=
=?us-ascii?Q?8Q=3D=3D?=
X-OriginatorOrg: nxp.com
X-MS-Exchange-CrossTenant-Network-Message-Id: a8743088-ee0f-4eee-9b73-08dda350ab24
X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8301.eurprd04.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 10:15:02.2349
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: YlmE5hLNSkcFCDAd6fIcL8bMKQIWImNLiVUcrAFso9U8KWvwclGx+V71yhVQ0zfrYtQxIUVxZbqT713bh2kqvtv/PsBI83WZV3OBQ5OYMrc=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8480
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
From: Meenakshi Aggarwal <meenakshi.aggarwal@xxxxxxx>
Few DMA alignment were missed in the original patch.
Fixes: 4cb4f7c11dee ("crypto: caam - Set DMA alignment explicitly")
Signed-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@xxxxxxx>
---
drivers/crypto/caam/caamalg.c | 22 +++++++++++-----------
drivers/crypto/caam/caamalg_qi.c | 4 ++--
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/drivers/crypto/caam/caamalg.c b/drivers/crypto/caam/caamalg.c
index 2cfb1b8d8c7c..81dfbe436c20 100644
--- a/drivers/crypto/caam/caamalg.c
+++ b/drivers/crypto/caam/caamalg.c
@@ -980,7 +980,7 @@ static void aead_crypt_done(struct device *jrdev, u32 *desc, u32 err,
void *context)
{
struct aead_request *req = context;
- struct caam_aead_req_ctx *rctx = aead_request_ctx(req);
+ struct caam_aead_req_ctx *rctx = aead_request_ctx_dma(req);
struct caam_drv_private_jr *jrp = dev_get_drvdata(jrdev);
struct aead_edesc *edesc;
int ecode = 0;
@@ -1020,7 +1020,7 @@ static void skcipher_crypt_done(struct device *jrdev, u32 *desc, u32 err,
{
struct skcipher_request *req = context;
struct skcipher_edesc *edesc;
- struct caam_skcipher_req_ctx *rctx = skcipher_request_ctx(req);
+ struct caam_skcipher_req_ctx *rctx = skcipher_request_ctx_dma(req);
struct crypto_skcipher *skcipher = crypto_skcipher_reqtfm(req);
struct caam_drv_private_jr *jrp = dev_get_drvdata(jrdev);
int ivsize = crypto_skcipher_ivsize(skcipher);
@@ -1309,7 +1309,7 @@ static struct aead_edesc *aead_edesc_alloc(struct aead_request *req,
struct crypto_aead *aead = crypto_aead_reqtfm(req);
struct caam_ctx *ctx = crypto_aead_ctx_dma(aead);
struct device *jrdev = ctx->jrdev;
- struct caam_aead_req_ctx *rctx = aead_request_ctx(req);
+ struct caam_aead_req_ctx *rctx = aead_request_ctx_dma(req);
gfp_t flags = (req->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP) ?
GFP_KERNEL : GFP_ATOMIC;
int src_nents, mapped_src_nents, dst_nents = 0, mapped_dst_nents = 0;
@@ -1445,7 +1445,7 @@ static struct aead_edesc *aead_edesc_alloc(struct aead_request *req,
static int aead_enqueue_req(struct device *jrdev, struct aead_request *req)
{
struct caam_drv_private_jr *jrpriv = dev_get_drvdata(jrdev);
- struct caam_aead_req_ctx *rctx = aead_request_ctx(req);
+ struct caam_aead_req_ctx *rctx = aead_request_ctx_dma(req);
struct aead_edesc *edesc = rctx->edesc;
u32 *desc = edesc->hw_desc;
int ret;
@@ -1541,7 +1541,7 @@ static int aead_do_one_req(struct crypto_engine *engine, void *areq)
{
struct aead_request *req = aead_request_cast(areq);
struct caam_ctx *ctx = crypto_aead_ctx_dma(crypto_aead_reqtfm(req));
- struct caam_aead_req_ctx *rctx = aead_request_ctx(req);
+ struct caam_aead_req_ctx *rctx = aead_request_ctx_dma(req);
u32 *desc = rctx->edesc->hw_desc;
int ret;
@@ -1614,7 +1614,7 @@ static struct skcipher_edesc *skcipher_edesc_alloc(struct skcipher_request *req,
{
struct crypto_skcipher *skcipher = crypto_skcipher_reqtfm(req);
struct caam_ctx *ctx = crypto_skcipher_ctx_dma(skcipher);
- struct caam_skcipher_req_ctx *rctx = skcipher_request_ctx(req);
+ struct caam_skcipher_req_ctx *rctx = skcipher_request_ctx_dma(req);
struct device *jrdev = ctx->jrdev;
gfp_t flags = (req->base.flags & CRYPTO_TFM_REQ_MAY_SLEEP) ?
GFP_KERNEL : GFP_ATOMIC;
@@ -1778,7 +1778,7 @@ static int skcipher_do_one_req(struct crypto_engine *engine, void *areq)
{
struct skcipher_request *req = skcipher_request_cast(areq);
struct caam_ctx *ctx = crypto_skcipher_ctx_dma(crypto_skcipher_reqtfm(req));
- struct caam_skcipher_req_ctx *rctx = skcipher_request_ctx(req);
+ struct caam_skcipher_req_ctx *rctx = skcipher_request_ctx_dma(req);
u32 *desc = rctx->edesc->hw_desc;
int ret;
@@ -1828,7 +1828,7 @@ static inline int skcipher_crypt(struct skcipher_request *req, bool encrypt)
if (ctx->fallback && ((ctrlpriv->era <= 8 && xts_skcipher_ivsize(req)) ||
ctx->xts_key_fallback)) {
- struct caam_skcipher_req_ctx *rctx = skcipher_request_ctx(req);
+ struct caam_skcipher_req_ctx *rctx = skcipher_request_ctx_dma(req);
skcipher_request_set_tfm(&rctx->fallback_req, ctx->fallback);
skcipher_request_set_callback(&rctx->fallback_req,
@@ -3639,10 +3639,10 @@ static int caam_cra_init(struct crypto_skcipher *tfm)
}
ctx->fallback = fallback;
- crypto_skcipher_set_reqsize(tfm, sizeof(struct caam_skcipher_req_ctx) +
+ crypto_skcipher_set_reqsize_dma(tfm, sizeof(struct caam_skcipher_req_ctx) +
crypto_skcipher_reqsize(fallback));
} else {
- crypto_skcipher_set_reqsize(tfm, sizeof(struct caam_skcipher_req_ctx));
+ crypto_skcipher_set_reqsize_dma(tfm, sizeof(struct caam_skcipher_req_ctx));
}
ret = caam_init_common(ctx, &caam_alg->caam, false);
@@ -3659,7 +3659,7 @@ static int caam_aead_init(struct crypto_aead *tfm)
container_of(alg, struct caam_aead_alg, aead.base);
struct caam_ctx *ctx = crypto_aead_ctx_dma(tfm);
- crypto_aead_set_reqsize(tfm, sizeof(struct caam_aead_req_ctx));
+ crypto_aead_set_reqsize_dma(tfm, sizeof(struct caam_aead_req_ctx));
return caam_init_common(ctx, &caam_alg->caam, !caam_alg->caam.nodkp);
}
diff --git a/drivers/crypto/caam/caamalg_qi.c b/drivers/crypto/caam/caamalg_qi.c
index 65f6adb6c673..9aa2d6d97f22 100644
--- a/drivers/crypto/caam/caamalg_qi.c
+++ b/drivers/crypto/caam/caamalg_qi.c
@@ -1435,7 +1435,7 @@ static inline int skcipher_crypt(struct skcipher_request *req, bool encrypt)
if (ctx->fallback && ((ctrlpriv->era <= 8 && xts_skcipher_ivsize(req)) ||
ctx->xts_key_fallback)) {
- struct caam_skcipher_req_ctx *rctx = skcipher_request_ctx(req);
+ struct caam_skcipher_req_ctx *rctx = skcipher_request_ctx_dma(req);
skcipher_request_set_tfm(&rctx->fallback_req, ctx->fallback);
skcipher_request_set_callback(&rctx->fallback_req,
@@ -2524,7 +2524,7 @@ static int caam_cra_init(struct crypto_skcipher *tfm)
}
ctx->fallback = fallback;
- crypto_skcipher_set_reqsize(tfm, sizeof(struct caam_skcipher_req_ctx) +
+ crypto_skcipher_set_reqsize_dma(tfm, sizeof(struct caam_skcipher_req_ctx) +
crypto_skcipher_reqsize(fallback));
}
--
2.25.1
Return-Path: <linux-kernel+bounces-673067-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 1D2FF41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:18:37 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 214873A2F28
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:18:15 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 14AC0223DC1;
Wed, 4 Jun 2025 10:18:31 +0000 (UTC)
Received: from foss.arm.com (foss.arm.com [217.140.110.172])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 6045256B81;
Wed, 4 Jun 2025 10:18:28 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749032310; cv=none; b=ueiNymQJqlrJw2DdB8vqxX9Fo1bZYDew6Q5Jlun/J1+wJoXhPVIM7QLseA2y8xfhbKkc9yoPX3TZ+iR7XZ1G/g9dRlYlohEte4rIGzI6Ip/9DLoDdrLTlQFFvH+Uo74ds/+6M+SENDw0Tyc4YAkKAyFzsUOSAK00GdfSNKB3148=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749032310; c=relaxed/simple;
bh=3HHpt7djO8MsGfUXUzePpCpx/Fnuo9SaY/kGssvfXMY=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=kHostD71q/RtEBec1kDU2lcLYr2jYHzjry81tp/tHFg+EoeDJHacv+9fTba4zTW9C7z600B+psp6SDPr2A71Ca8mnF+t6eJ/wzvWMhhwAGkwHWCj2GT8Ki7/FToCm1ODnJ1ipsLyXt4xYU7tYyhJFf35RwL9TCb0+tMcBAqFit4=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com
Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14])
by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2A8311758;
Wed, 4 Jun 2025 03:18:10 -0700 (PDT)
Received: from localhost (e132581.arm.com [10.1.196.87])
by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D59CE3F673;
Wed, 4 Jun 2025 03:18:26 -0700 (PDT)
Date: Wed, 4 Jun 2025 11:18:21 +0100
From: Leo Yan <leo.yan@xxxxxxx>
To: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Yeoreum Yun <yeoreum.yun@xxxxxxx>, mingo@xxxxxxxxxx, mingo@xxxxxxxxxx,
acme@xxxxxxxxxx, namhyung@xxxxxxxxxx, mark.rutland@xxxxxxx,
alexander.shishkin@xxxxxxxxxxxxxxx, jolsa@xxxxxxxxxx,
irogers@xxxxxxxxxx, adrian.hunter@xxxxxxxxx,
kan.liang@xxxxxxxxxxxxxxx, linux-perf-users@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, David Wang <00107082@xxxxxxx>
Subject: Re: [PATCH 1/1] perf/core: fix dangling cgroup pointer in cpuctx
Message-ID: <20250604101821.GC8020@xxxxxxxxxxxxxxx>
References: <20250602184049.4010919-1-yeoreum.yun@xxxxxxx>
<20250603140040.GB8020@xxxxxxxxxxxxxxx>
<20250603144414.GC38114@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
<20250604080339.GB35970@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20250604080339.GB35970@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
X-Spam-Status: No, score=-3.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 10:03:39AM +0200, Peter Zijlstra wrote:
[...]
> > My suggestion is not reliable. Roughly read code, except for the
> > PERF_EVENT_STATE_EXIT case, I think other error cases should also clean
> > up the cgroup pointer. The reason is I don't see other places to
> > clean up the cgroup pointer for these error cases:
> >
> > PERF_EVENT_STATE_REVOKED
> > PERF_EVENT_STATE_DEAD
>
> Those should be done here; on the first transition into these states.
>
> > Only in the PERF_EVENT_STATE_ERROR state, we don't need to cleanup
> > cgroup as this has already been handled in merge_sched_in().
> >
> > So a correct condition would be:
> >
> > if (event->state > PERF_EVENT_STATE_OFF ||
> > event->state <= PERF_EVENT_STATE_EXIT)
> > perf_cgroup_event_disable(event, ctx);
>
> I'm too tired to get my head straight. I'll look tomorrow.
Right; had a sleep. Lets do this :-)
Thanks a lot for the state machine diagram.
So the normal states are:
ACTIVE ---.
^ |
| |
sched_{in,out}() |
| |
v |
,---> INACTIVE <--+
| |
| {dis,en}able()
sched_in() |
| OFF <--+
| |
`---> ERROR ---'
That is:
sched_in: INACTIVE -> {ACTIVE,ERROR}
Strictly speaking, sched_in() can keep INACTIVE state if an event is
rotated.
sched_out: ACTIVE -> INACTIVE
disable: {ACTIVE,INACTIVE} -> OFF
enable: {OFF,ERROR} -> INACTIVE
Where OFF/ERROR are 'disable' and have this perf_cgroup_event_disable()
called.
Then we have {EXIT,REVOKED,DEAD} states which are various shades of
defunct events:
- EXIT means task that the even was assigned to died, but child events
still live, and further children can still be created. But the event
itself will never be active again. It can only transition to
{REVOKED,DEAD};
- REVOKED means the PMU the event was associated with is gone; all
functionality is stopped but the event is still alive. Can only
transition to DEAD;
- DEAD event really is DYING tearing down state and freeing bits.
And now we have the sitation that __perf_remove_from_context() can do:
{ACTIVE,INACTIVE,OFF,ERROR} -> {OFF,EXIT,REVOKED,DEAD}
A detailed transition is:
Case 1: {ACTIVE} -> {INACTIVE} -> {OFF,EXIT,REVOKED,DEAD}
Case 2: {ERROR} -> {ERROR,EXIT,REVOKED,DEAD}
Case 3: {OFF} -> {OFF,EXIT,REVOKED,DEAD}
Where the {OFF,ERROR} -> * transition already have
perf_cgroup_event_disable(), but the {ACTIVE,INACTIVE} -> * part has
not.
Just a minor concern.
I noticed perf_put_aux_event() sets the ERROR state for sibling events
of an AUX event. IIUC, the AUX event is the group leader, so we only
need to clean up the cgroup pointer for the AUX event, and simply set
the ERROR state for its sibling events, correct?
The condition:
if (event->state > PERF_EVENT_STATE_OFF)
captures exactly that {ACTIVE,INACTIVE} that still needs the cgroup
disable. Every other state is already a disabled state.
Agreed?
Except above concern, otherwise, the conclusion makes sense to me.
Also, I should probably stick most of all this in a comment somewhere.
Totally agree. The comment would be very useful!
Thanks,
Leo
Return-Path: <linux-kernel+bounces-673068-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id E4C0C41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:19:46 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id E82823A3431
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:19:24 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id B60E81DC9BB;
Wed, 4 Jun 2025 10:19:41 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kode54.net header.i=@kode54.net header.b="COaL8z7y";
dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="oBNLR88B"
Received: from fhigh-a4-smtp.messagingengine.com (fhigh-a4-smtp.messagingengine.com [103.168.172.155])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5731156B81
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:19:38 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.155
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749032380; cv=none; b=Tr77x0mH4ilq3d/IUyWeBMZE5o0WgdmJ57MIYN88ACwwBVWdunSpgu4oUP0OzbGU+sFd6kkZ6FqV06bNuYdePYCRO7wkmD6HbJvH5kOeWHgD3nHmzrm6Y1syF5LvZHOfke5FCVX6f4t9FWqh1AWyfwfVIwPtilYKluS74aCmy2A=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749032380; c=relaxed/simple;
bh=dqyE9slUR1QxgVP87pCAXxy72IefKePiX8duGwbuDm4=;
h=Mime-Version:Content-Type:Date:Message-Id:To:Cc:Subject:From:
References:In-Reply-To; b=I/X6IdREO5Lu6WEIYt+97u4YLs2ZwLyqEXKc0t3vtYIHUMliumclwGSWqy8+6yYLcA0Ya0dXpkDvradYLxkVxHgtyJHKhMU4INWd64J6FWepETHBTD7utSnm3XaNFxyTvfOZ4AvW+K4tNUvanf7+hy4KUQZOSJeOYQNocpFml4M=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=kode54.net; spf=pass smtp.mailfrom=kode54.net; dkim=pass (2048-bit key) header.d=kode54.net header.i=@kode54.net header.b=COaL8z7y; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=oBNLR88B; arc=none smtp.client-ip=103.168.172.155
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=kode54.net
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kode54.net
Received: from phl-compute-06.internal (phl-compute-06.phl.internal [10.202.2.46])
by mailfhigh.phl.internal (Postfix) with ESMTP id 4AF27114021A;
Wed, 4 Jun 2025 06:19:37 -0400 (EDT)
Received: from phl-mailfrontend-01 ([10.202.2.162])
by phl-compute-06.internal (MEProxy); Wed, 04 Jun 2025 06:19:37 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kode54.net; h=cc
:cc:content-transfer-encoding:content-type:content-type:date
:date:from:from:in-reply-to:in-reply-to:message-id:mime-version
:references:reply-to:subject:subject:to:to; s=fm3; t=1749032377;
x=1749118777; bh=jzGfamnjXuCdedVs8bQG0PhMF8FNUo4KELx4ukznBgI=; b=
COaL8z7ywEU3KkCXoUjOZ3PU4xeaPio4ibht5ldgb9sXfv6KlvA4cnLxi5IYGEyR
0riG6rvZ/DrCgYAzrNW6FEZB4aAa+vRSVOJiW5EU7HdeUvT+guGUXchHbxOmEDhw
AcH+qEPeV+bSSwS04ziKanTm2Byw7TTp+c/zcZuq7uV4up+J28nu0LgxOZxdokPR
oi1SS/cjI5lMdtKUBVY3XPdG2LewiB6Hk3qeaDsZm2FcTy2zG9VKQuqBkjieKXAY
lVpDTAP07wmPY0SUIq0n687rrU9xFeNcrRkRim+j8VqMwXM7opTQ+TW8M54Vb3kL
Y2YxifR7jt0U+0/z89Jp7Q==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
messagingengine.com; h=cc:cc:content-transfer-encoding
:content-type:content-type:date:date:feedback-id:feedback-id
:from:from:in-reply-to:in-reply-to:message-id:mime-version
:references:reply-to:subject:subject:to:to:x-me-proxy
:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1749032377; x=
1749118777; bh=jzGfamnjXuCdedVs8bQG0PhMF8FNUo4KELx4ukznBgI=; b=o
BNLR88BDvnsgqaq2Y+921FMc5FPnaWf54q0ak1+tMA7ktTfYwiXihX1qridzKkdV
XcVeionCH2XFA6xZRpbuSMmxda9iJw71zHeDA1zzy2xsVAGTJk+fc2zi1eqrfPYr
L2kR9g3Ux7o40fM8Cmrfbdxw0YXq+QjkvEUu7g3Ba0+gGD/6/Fg089+YJ2cZkH6v
z32pNLcrpSh55Jwois8Lk/Pk7O3BgYLMXWBKpmE7gwrApgZxYZOia3kTN91Lb7Gf
dDdSPaCDtYuKSwGxuDcR+IpDW96IhHbjnTKC7I9g2rI1MEMrDTOaXQrtgX/DmhiX
FP8wA9vAthwY125q1awKQ==
X-ME-Sender: <xms:uR1AaDa6aoFGvp4vOQuuRws4GGuQkjbVOtaTokhc9PYjDKFImNPkCA>
<xme:uR1AaCbpe8NzHBhVfo9Jxtvn7PgfvPB-4ETVWthUnhpv5yxcs0bHvknZUK_7yo9fI
8jU7uT7y1L7I3mLI08>
X-ME-Received: <xmr:uR1AaF_BomkHQAgmjEzSy2bspZ3L6cvC9AVXy7JkvEj9XwzzKNnswSP3C5Ezp6JKF4RNvuldKKfEvx8q3hXtwcCrebct1K1iCg>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddugdduleehucetufdoteggodetrfdotf
fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu
rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh
htshculddquddttddmnecujfgurhepggfgtgffkffvvefuhffofhgjsehtqhertdertdej
necuhfhrohhmpedfvehhrhhishhtohhphhgvrhcuufhnohifhhhilhhlfdcuoegthhhrih
hssehkohguvgehgedrnhgvtheqnecuggftrfgrthhtvghrnhepieejleekhfdukeeukedv
jedtueeuleetgedvueevtedtkeejkeeiudeggeetvedunecuvehluhhsthgvrhfuihiivg
eptdenucfrrghrrghmpehmrghilhhfrhhomheptghhrhhisheskhhouggvheegrdhnvght
pdhnsggprhgtphhtthhopeelpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehphh
hilhhiphhprdhrvghishhnvghrsehlihhnsghithdrtghomhdprhgtphhtthhopegthhhr
ihhsthhirghnrdhkohgvnhhighesrghmugdrtghomhdprhgtphhtthhopehpshhtrghnnh
gvrhesrhgvughhrghtrdgtohhmpdhrtghpthhtohepughrihdquggvvhgvlheslhhishht
shdrfhhrvggvuggvshhkthhophdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnh
gvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehsihhmohhnrgesfhhf
fihllhdrtghhpdhrtghpthhtohepuggrkhhrsehkvghrnhgvlhdrohhrghdprhgtphhtth
hopehphhgrshhtrgeskhgvrhhnvghlrdhorhhgpdhrtghpthhtohepughrihdquggvvhgv
lhdqsghouhhntggvsheslhhishhtshdrfhhrvggvuggvshhkthhophdrohhrgh
X-ME-Proxy: <xmx:uR1AaJobfx6tESM5eLtXUEIkuw61AFpGRbIp0iOWprpKyTT0B9sOVg>
<xmx:uR1AaOrgJmkhj45RwJ91OwWpPAgs3YVVovdskxIPIBBnXQpRD1lPSQ>
<xmx:uR1AaPSbPni4LUcKH-J9-ZQKNFd4urnq1CMSDn7ZTGpMbu1g1o5F0w>
<xmx:uR1AaGowU0ImgiUKztk3WPusm9Xyxlj1wtMMojEF6WPtavARjusi3Q>
<xmx:uR1AaEsVoPamp5bPtP2SyB3XtNY1F6fjvpVlg55PcGctvNkrah39LDBW>
Feedback-ID: i9ec6488d:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
4 Jun 2025 06:19:36 -0400 (EDT)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
Mime-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8
Date: Wed, 04 Jun 2025 03:19:35 -0700
Message-Id: <DADO8D07ZTFD.1A1L9QSSMDTXR@xxxxxxxxxx>
To: "Philipp Reisner" <philipp.reisner@xxxxxxxxxx>
Cc: =?utf-8?q?Christian_K=C3=B6nig?= <christian.koenig@xxxxxxx>, "Philipp
Stanner" <pstanner@xxxxxxxxxx>, <dri-devel@xxxxxxxxxxxxxxxxxxxxx>,
<linux-kernel@xxxxxxxxxxxxxxx>, "Simona Vetter" <simona@xxxxxxxx>, "Danilo
Krummrich" <dakr@xxxxxxxxxx>, "Philipp Stanner" <phasta@xxxxxxxxxx>,
"dri-devel" <dri-devel-bounces@xxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [PATCH] drm/sched: Fix amdgpu crash upon suspend/resume
From: "Christopher Snowhill" <chris@xxxxxxxxxx>
X-Mailer: aerc 0.20.1-0-g2ecb8770224a
References: <20250107140240.325899-1-philipp.reisner@xxxxxxxxxx>
<942c02f2-6496-4406-a73b-941d096aadfb@xxxxxxx>
<CADGDV=U_7CdkdEiLX9kj9yHsXhwb5zP_eGXpwmrj20cmgzMAtA@xxxxxxxxxxxxxx>
<eb5f3198-7625-40f4-bc23-cac969664e85@xxxxxxx>
<582e10673bb749f18ebf8a18f46ca573df396576.camel@xxxxxxxxxx>
<b055ff59-4653-44d9-a2e0-bb43eb158315@xxxxxxx>
<DA7PC2LNU79K.28KBFOL3MGI1S@xxxxxxxxxx>
<CADGDV=WJjcLds5T1uAst7ctOMbApnLR6ixH8wvgvKvF-YS6kog@xxxxxxxxxxxxxx>
In-Reply-To: <CADGDV=WJjcLds5T1uAst7ctOMbApnLR6ixH8wvgvKvF-YS6kog@xxxxxxxxxxxxxx>
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Mon Jun 2, 2025 at 3:25 AM PDT, Philipp Reisner wrote:
Hi Christopher,
Thanks for following up. The bug still annoys me from time to time.
It triggered last on May 8, May 12, and May 18.
The crash on May 18 was already with the 6.14.5 kernel.
Could this sleep wake issue also be caused by a similar thing to the
panics and SMU hangs I was experiencing with my own issue? It's an issue
known to have the same workaround for both 6000 and 7000 series users. A
specific kernel commit seems to affect it as well.
I posted the stack trace earlier in the thread. The question is, what
was the stack
trace of the issue you are referring to?
If you could test whether you can still reproduce the error after
disabling GFXOFF states with the following kernel commandline override:
amdgpu.ppfeaturemask=3D0xfff73fff
that disables PP_OVERDRIVE_MASK, PP_GFXOFF_MASK,
and PP_GFX_DCS_MASK.
IMHO, that looks like a mitigation for something different than the non-r=
eady
compute schedulers that seem to be the root cause for the NULL pointer de=
refs
in my case.
Indeed, it's mitigating something that leads to SMU firmware hangs. I
made a guess, I probably guessed poorly, that your compute units may be
failing to wake up due to a SMU hang. But you have no SMU hang log
notices, so it's probably not that. Oh well.
Anyhow, I will give it a try, and will report back if my workstation
does not deref
NULL pointers for more than three weeks with that amdgpu.ppfeaturemask se=
t.
Best regards,
Philipp
Return-Path: <linux-kernel+bounces-673069-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 57C1F41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:20:05 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 467153A3C43
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:19:41 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id AB83422578A;
Wed, 4 Jun 2025 10:19:57 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="BWWKEKJR"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9468B1B0F17;
Wed, 4 Jun 2025 10:19:56 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749032396; cv=none; b=lC4E7QLQmFYXlMncGW8Ds+hFR6zcHdk4O/oVoeKJGb8K5tAfOhbrgPaxjLBogKU1An0kY/NTzdVYxIH/Tu7sFP8q7E6iqckhhG+JGhWTxojmfI3Gh413bNNtnN2xZyOhEDeo5eoPCJrDwPdQsz4LMMuMMavnEZxvc8gMeTU1Fr8=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749032396; c=relaxed/simple;
bh=Yrwd8GQru06HwBciXhUf3GAGIfo2pI03y9hCFNJJIEk=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=Vuv9Of4pqZC8pLxHx6X7fEKkAlEWEhPqSmofsjXI7cOIWyt3y0VqUMoH0Sqm6TZR/yS6LeGzM8G9ROiq9C1WeRwnRLV/EpSnDH79llL5spZJlFgkvrxfSlX2RNMRo04ObyryI4eKBAGk07atoF4xReyPjreFMfaTS6x4ry3l+3g=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=BWWKEKJR; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A739C4CEE7;
Wed, 4 Jun 2025 10:19:55 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org;
s=korg; t=1749032396;
bh=Yrwd8GQru06HwBciXhUf3GAGIfo2pI03y9hCFNJJIEk=;
h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
b=BWWKEKJRd3Pl2a2GExWPCNyRpCd5ZPjggETW9wVSpdXj8uZ1vVw03KHs2KcyiDALA
o+5iqFVP21A3qcTuq363wToTJQ6Ph6dhGRNlzthLwHM1Vtjx2Ujk55tCgsygPxX3hm
JF9EUyKySszXreKqngU+TxLOQH24vNRZTbPBL3vk=
Date: Wed, 4 Jun 2025 12:19:53 +0200
From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
To: Jon Hunter <jonathanh@xxxxxxxxxx>
Cc: patches@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
torvalds@xxxxxxxxxxxxxxxxxxxx, akpm@xxxxxxxxxxxxxxxxxxxx,
linux@xxxxxxxxxxxx, shuah@xxxxxxxxxx, patches@xxxxxxxxxxxx,
lkft-triage@xxxxxxxxxxxxxxxx, pavel@xxxxxxx, f.fainelli@xxxxxxxxx,
sudipm.mukherjee@xxxxxxxxx, srw@xxxxxxxxxxxxxxxx, rwarsow@xxxxxx,
conor@xxxxxxxxxx, hargar@xxxxxxxxxxxxx, broonie@xxxxxxxxxx,
linux-tegra@xxxxxxxxxxxxxxx, stable@xxxxxxxxxxxxxxx,
Aaron Kling <webgeek1234@xxxxxxxxx>
Subject: Re: [PATCH 6.12 00/55] 6.12.32-rc1 review
Message-ID: <2025060413-entrust-unsold-7bfd@gregkh>
References: <20250602134238.271281478@xxxxxxxxxxxxxxxxxxx>
<ff0b4357-e2d4-4d39-aa0e-bb73c59304c1@xxxxxxxxxxxxxxxxxxxxxx>
<bf1dabf7-0337-40e9-8b8e-4e93a0ffd4cc@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <bf1dabf7-0337-40e9-8b8e-4e93a0ffd4cc@xxxxxxxxxx>
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 10:57:29AM +0100, Jon Hunter wrote:
Hi Greg,
On 04/06/2025 10:41, Jon Hunter wrote:
> On Mon, 02 Jun 2025 15:47:17 +0200, Greg Kroah-Hartman wrote:
> > This is the start of the stable review cycle for the 6.12.32 release.
> > There are 55 patches in this series, all will be posted as a response
> > to this one. If anyone has any issues with these being applied, please
> > let me know.
> >
> > Responses should be made by Wed, 04 Jun 2025 13:42:20 +0000.
> > Anything received after that time might be too late.
> >
> > The whole patch series can be found in one patch at:
> > https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.12.32-rc1.gz
> > or in the git tree and branch at:
> > git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.12.y
> > and the diffstat can be found below.
> >
> > thanks,
> >
> > greg k-h
>
> Failures detected for Tegra ...
>
> Test results for stable-v6.12:
> 10 builds: 10 pass, 0 fail
> 28 boots: 28 pass, 0 fail
> 116 tests: 115 pass, 1 fail
>
> Linux version: 6.12.32-rc1-gce2ebbe0294c
> Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
> tegra186-p3509-0000+p3636-0001, tegra194-p2972-0000,
> tegra194-p3509-0000+p3668-0000, tegra20-ventana,
> tegra210-p2371-2180, tegra210-p3450-0000,
> tegra30-cardhu-a04
>
> Test failures: tegra186-p2771-0000: pm-system-suspend.sh
I have been looking at this and this appears to be an intermittent failure
that has crept in. Bisect is point to the following change which landed in
v6.12.31 and we did not catch it ...
# first bad commit: [d95fdee2253e612216e72f29c65b92ec42d254eb] cpufreq:
tegra186: Share policy per cluster
I have tested v6.15 which has this change and I don't see the same issue
there. I have also tested v6.6.y because this was backported to the various
stable branches and I don't see any problems there. Only v6.12.y appears to
be impacted which is odd (although this test only runs on v6.6+ kernels for
this board). However, the testing is conclusive that this change is a
problem for v6.12.y.
So I think we do need to revert the above change for v6.12.y but I am not
sure if it makes sense to revert for earlier stable branches too?
Yes, let's revert it for the older ones as well as it would look odd,
and our tools might notice that we had "skipped" a stable release tree.
Can you send the revert or do you need us to?
Let me know your thoughts.
However, given that this is not a new failure for this stable update we can
handle in subsequent updates. So for this update ...
Tested-by: Jon Hunter <jonathanh@xxxxxxxxxx>
Wonderful, thanks for testing!
greg k-h
Return-Path: <linux-kernel+bounces-673070-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 857C141E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:20:29 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 88A327A8F0D
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:19:09 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 85AEE28BA8B;
Wed, 4 Jun 2025 10:20:19 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="cGL3BA8a"
Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2063.outbound.protection.outlook.com [40.107.243.63])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0539356B81;
Wed, 4 Jun 2025 10:20:15 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.243.63
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749032418; cv=fail; b=CvJq6XA6Ad9/2x+mw6KTHSZnl/5E2cMJEFGyzz5nGk+aVLx4AVTnddN7ntqiHdMN6H5tZNI+FYUUTANl5fvywLvDClL3Hi1icg59tFgfTOU8d7MdqB/3O+gLnCsMyCLwUVZu6JlSxnoaM4wzAnaSGmpxLjR1tqM10DTk/567gDU=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749032418; c=relaxed/simple;
bh=xT/bbjcu3icyVWffFjsuN6r9HOSr4ogSe+/gUIRst88=;
h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To:
Content-Type:MIME-Version; b=VsYVFow2TIfNlocBqMu9lg03qfhxmB/B84vuQyOLtN2ex7cwzOi0pk7NIZrbKjIKhtjFFWwNnqIha3CDDzGsckEKexqXc/ABMe5djeJ5oZKBD6YnTXHcPqm7ntB5tXKJGdG5fZJJCZBrOe45kfW1aMnrnvqNJVt8SfiPNHnUh2I=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=cGL3BA8a; arc=fail smtp.client-ip=40.107.243.63
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com
Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=F66PRTMcuRvXzv72Nc5FTaswhcd8qKbcqa07x1VGBPIA/O8Mma528U+2jlOpnl6ALGXg6oGyJ05PmTm+8YrX7LDRATH5hPchQWbKEivGvEUV6H1cAQaBNatrws5TJEsm74IEEVc7GHcRV2kIjTILjmp6Vrp/MmD7JsxdMTekJw0rjqIT99S3c7GtzXLhpDbwQLt/ounlFJ8nUARmZzuh7hH5Z/CpHPUhrlXhUV4p9G7Cl++j4yPW9qFEh5jeEbNhSzviBRS7hsghZ3Got1sWmxCE/wtec8BSB7jRKYAlr+3NuYkSKd8JIkVPy+GNxxAAuCwD+XYZShkryNmKe8qHMw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=N5HyNJPrgm16dkQNvqUTBqGFykgrYCwO2xzlyOnD/6o=;
b=AKhBiNx3CHrSznKhygf6BPYS0Jium9sRE4nxTCgJ9y0DTgq0Km4LcO4ZCtKjJYCqLQuRrfysUwiUC4xU/MvTpvyV000MrEFx+Rl2gtU21R6unsD2fRZcyuXh+0JAzWJ2oo0DTB0OYh4cyVxTrSrQ7vHKqesAzUc0ou/Ha3b8BX357O2bNzsfhcgiAOBS9WhVgTC1BpkL4jNz0fqofNK6piZTCrjnoV2VA8zdBQ0MA3U+4Umrh7vB23GZ3togznLEFFIBt9Yi8jBOj2eRujd2AJMuRQS3N6epQ0mnUOYC9WGUCEGkgbh5cLxwadiEo7DMEBImd3mN/Qkyv5MXDWgqWA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com;
dkim=pass header.d=nvidia.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;
s=selector2;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=N5HyNJPrgm16dkQNvqUTBqGFykgrYCwO2xzlyOnD/6o=;
b=cGL3BA8a/Up/RbbMNF1bk8Xbz+PwCe/3f2EpgCqGA0ni9ENYRmxW3lDq4YT4Jg4U6CHNNW7B2bEPzTFF14Kd7EOf6ZYZAoKACxNOm+1dVYE6Ztvdnzf659MQyFbqJ8KYD4TxCGb2qKhfMOOVA1bTQT+LoRBBBvxSH+JKL7/x3xOpCq7M6ULOVl2oK4BE2ZnBRaAMV2c2h1+ca1CWwWGuEV0pAq7ZKCIl9IEeo1c5HlsQnyu7rfyjTG8iI2qtABfm8DnclpU9vLWZbQHPiD11itINK+QY8e9Asr1152VN5dhGYaSFvfpvzDFL4v9u8Rv1dvy87a/GegDyR7vrjB0FAQ==
Authentication-Results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=nvidia.com;
Received: from SJ2PR12MB8784.namprd12.prod.outlook.com (2603:10b6:a03:4d0::11)
by DS0PR12MB6416.namprd12.prod.outlook.com (2603:10b6:8:cb::6) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.8769.37; Wed, 4 Jun 2025 10:20:13 +0000
Received: from SJ2PR12MB8784.namprd12.prod.outlook.com
([fe80::1660:3173:eef6:6cd9]) by SJ2PR12MB8784.namprd12.prod.outlook.com
([fe80::1660:3173:eef6:6cd9%3]) with mapi id 15.20.8769.037; Wed, 4 Jun 2025
10:20:13 +0000
Message-ID: <fb1252b4-cc2e-4227-94be-9015ea8f3d1b@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 11:20:06 +0100
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH 6.12 00/55] 6.12.32-rc1 review
To: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Cc: patches@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
torvalds@xxxxxxxxxxxxxxxxxxxx, akpm@xxxxxxxxxxxxxxxxxxxx,
linux@xxxxxxxxxxxx, shuah@xxxxxxxxxx, patches@xxxxxxxxxxxx,
lkft-triage@xxxxxxxxxxxxxxxx, pavel@xxxxxxx, f.fainelli@xxxxxxxxx,
sudipm.mukherjee@xxxxxxxxx, srw@xxxxxxxxxxxxxxxx, rwarsow@xxxxxx,
conor@xxxxxxxxxx, hargar@xxxxxxxxxxxxx, broonie@xxxxxxxxxx,
linux-tegra@xxxxxxxxxxxxxxx, stable@xxxxxxxxxxxxxxx
References: <20250602134238.271281478@xxxxxxxxxxxxxxxxxxx>
<ff0b4357-e2d4-4d39-aa0e-bb73c59304c1@xxxxxxxxxxxxxxxxxxxxxx>
<2025060446-chewer-dill-080e@gregkh>
From: Jon Hunter <jonathanh@xxxxxxxxxx>
Content-Language: en-US
In-Reply-To: <2025060446-chewer-dill-080e@gregkh>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-ClientProxiedBy: LO3P265CA0001.GBRP265.PROD.OUTLOOK.COM
(2603:10a6:600:bb::6) To SJ2PR12MB8784.namprd12.prod.outlook.com
(2603:10b6:a03:4d0::11)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: SJ2PR12MB8784:EE_|DS0PR12MB6416:EE_
X-MS-Office365-Filtering-Correlation-Id: 669b1423-15d6-44d8-1def-08dda351647c
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam:
BCL:0;ARA:13230040|376014|7416014|1800799024|10070799003|366016;
X-Microsoft-Antispam-Message-Info:
=?utf-8?B?bjFoWk54dTFsa24wTGRIREdYYm5zTUpaZ1ZOWUZZK1NsWXJRcUxSYmxtaERX?=
=?utf-8?B?YUpZSDllY1NobzlzNGYxbUEzRVdxdGY1MFVHbjFTVmlhRlRiOG1aUUVNbEhv?=
=?utf-8?B?aWdQamJkOG1oeEJ4T2p0STlKMy9UOTA5Q1YxL3g3Rlo1OWt3OGY5QXFDWHI1?=
=?utf-8?B?N09SQTNpMW1kcXdPQ3FwODRFNXRaWHY1RFBBSzJpeGVWOHh0VHBXd1NFK0tD?=
=?utf-8?B?RDVXT2w3Qy9Tcy9MazFxZnFRbzE1dFRtcGRWeVYvUFMvZ2gwVFN4VzJieXNJ?=
=?utf-8?B?bjF6VENoNVFiVDB4RUtvcXplcFB0eDVZa2xocHoxTXE2NXZOTjVteWhKL0Ev?=
=?utf-8?B?anJHM0hPMThPcFhhaHBVSEVYQW16elprdzZmVVZQZ1h6MEswSHhVRS8zd01l?=
=?utf-8?B?R3p0VU4zL1RvNXREVHoyRDFXaU0yZWx5R0haKzhZTFdNc0Joam13YU1wSnoz?=
=?utf-8?B?QXZBUVpqOFRsazczcXA5M0gxOGduS1J4S3lROWlzejc3dlNvMVBqeVRNeTNI?=
=?utf-8?B?WUhQT09waGkya1FSMHpMckkwdWlBWklRVGg4cGN3RU5OSkpISWtDangwZ0Zp?=
=?utf-8?B?SEpLMTVKNndkZUhINkhhUXgzaTJxOURQdlhZandybmpRRWRiYmNxTHZrbm9Q?=
=?utf-8?B?NDl3bkRQUU53SnhaeEQxYzFnNlBZOUpEY3BpTTBMaHI4YlROaGhCak1SZjl1?=
=?utf-8?B?MWFwcHM3YnN4aG1SRE03Y1JMM2tPZmRMT1MySnk5d0R0dzJSQ3k2Y2JuSVlV?=
=?utf-8?B?V0lJcjkyak9PQXdNSloyOWxyYnNrNC9jZitORW1PUGw1MnY4K2IzZGF3T0Nt?=
=?utf-8?B?azZhRHI3M1l2RTdvaG1QaUJiTTJuQmQ3VW82ZjBEZW9hd09DOUlXcW9PK1FY?=
=?utf-8?B?N0o1M2s1cGVhTG9VZmZyckdYZ0hoN0cyelozd2c3aVFTb3BtMitPWGxXUkpn?=
=?utf-8?B?d1VZZ3B0RzZ0Z240aVlwS1lvbjJzaDBYY3lCUUU3R1Q0TGw1aGh2b1huS3Fq?=
=?utf-8?B?eGtDMkR0bkVEOFpIM0tUSWZPMDkyZmhKV25sREhwKzgxd3dMdmo2TWtEV0ph?=
=?utf-8?B?bHljWXBGcHkwUHJFeXQ3N3pxZUxobzc1SVk1cGhHQzZOL0JtdU94WUtPYXpp?=
=?utf-8?B?NlZxNm1UY05yS1dCei94Y1JxY2tsOEJtUTV6TDVkYnpWUXNNbUk1M3Z2NGg5?=
=?utf-8?B?eVBLYkgwZVlqakZxbmF6cnorN1cyWm9mQXNPQllUMVA0OFlhKzVBU2xDT3Jl?=
=?utf-8?B?Mm42djBJbkJObUhLQ3d0SG1IeUdBVWRrZWEvZjcwZzRLSk1EZFBwZklNT05w?=
=?utf-8?B?TmNna1hIcUFPMHo1S1hvV1RQbHJDb2pWQ3YzRnNzaGtFWVUrNWYzRlE4R3c4?=
=?utf-8?B?VTdITkpkZGZuZ0lEa04xVmlxL2lvZzl4SGQ0SFdKK3J2ZDBRVU5FUURpSVFU?=
=?utf-8?B?WFRnanQvekUxVG9EaXJ4NzFQS2w4Z3BidjhYM2I3bm5vVVdranl6SDRoci9a?=
=?utf-8?B?S0VFaVFaakdJWE5FTU5UZDJSblMwSTJVdEZLbHFRdHljd20xQ1JZTmRlaHRw?=
=?utf-8?B?MXNSdCtlaHFnbldNK01BZysyODdCS041MGZYdERtSTJ1T2pBKzN0dzNsVFFw?=
=?utf-8?B?U3FFQUIyM1I5amR0bnpYZVF0NjNyNEN3ODAwOWNXZnJZUXZIN1BvdkhiVHZE?=
=?utf-8?B?TVJubzE3SzdWRll4Wk05WDlVRjkyU0xEUFdyUjNDTFRZUkNwcDJTMGNMOS9m?=
=?utf-8?B?QmczRndFQnVRMXZlVlFlNlpFOFY4RDN6ZWh6dnlnM2lPbG91WGlBaEREME1w?=
=?utf-8?B?VE0rTDVBeEo3bDlyOVRSOTJpTkxiZXdEYi9mZU5OVVlHNlRhejUwems3YlZ6?=
=?utf-8?B?UWE1aUNUb1pWRldBVVI4SUcySG5sdFdNQi9tTzdUdzQxZ0k3V0ZYTkFkYkRk?=
=?utf-8?Q?/nxLLrLvn9c=3D?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ2PR12MB8784.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(7416014)(1800799024)(10070799003)(366016);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?utf-8?B?enlscVVXRlFVeDBMZ2RaeUR0eG9leEI3dHo0ZEdhQUpJaEVTRGFhbkhKY1ZN?=
=?utf-8?B?VDFBbEhiVk9OUXJraDFES1h4Y3U0a3QrZWNkS2I2OEIrU3dDa1ZrVTFKbmNo?=
=?utf-8?B?Q3JGQUtNc3F4UnRha0xmYWZNR3BjZWQyL2NvVzVSTnNtSE50U3hSS0lDMTli?=
=?utf-8?B?dVd4S0wrRjRTTWxqTU0rQUY4dXlYazFQbEVuUEdjOHhxdU9hZmJuS0o5cHlW?=
=?utf-8?B?NUcxSm5EbHlJN3lSVXJjWUNiYXVnT3h6SlVyZVFWRWpsN0o4T2o2VFk4Q2V0?=
=?utf-8?B?aXN2ZVJzaFVSWk41MXF3YklDd2d4ZTVRYUhJUHpMa0ZadUNHdS92K2lpaFEr?=
=?utf-8?B?dC9LdVNmd2I5ZlJCaGZGZ2dxYitzNURtSTdqZWpHdnNWRTF4M2VYM0MxanR6?=
=?utf-8?B?dkh6M2hhWW40NW1OVGp6c095RE5HeThFNWQzOUFFNGdzaDZ4OVMxMkxGbi9N?=
=?utf-8?B?SXBmMDNsU3QvRlFKSEZuTWI1d2lFYmdNRUhTeGNNS0FHS0gxZ24zeE95cnF5?=
=?utf-8?B?WUc0eGtNdXIzY0EyV3pkc0Ywc3pJRlRQOUhSUFFqblZqaXZ4Y2JxdFZXN010?=
=?utf-8?B?TFYyWEVMeXlSTjRwdVFOSVdpUXRkelVaMWhCcEMyL2pFMlQzOVFCSjY1ZXR6?=
=?utf-8?B?bVFuK3huSFEzZDYwQzhteGVYZjBmaG9wLzcvenFSMXR1MmJtbjBmRW0rSks0?=
=?utf-8?B?d3N0RkZMTnBWa3dNRHNWcjRPYmRjWW1nVElBL0lsR3N1dERnS1ozTklqR2tw?=
=?utf-8?B?MkdwTk9BU1pjaDFvaUJRcXRhUzRjT1pXWXNpcjJnYWtiMjdNakcvMDRUNHRp?=
=?utf-8?B?LzA0blVJWFMrUkhuVUw1U1RIQzRudFVoUWo5VVRmSzNER0JlYmJ3Y3p0c1pZ?=
=?utf-8?B?WFZmODdLd3NzV0d0NmdwMUtmN2N5MzlFcXphaEhXUzhhQy9YQUV5TlhuS2pU?=
=?utf-8?B?ZTlLNiszd2NTbHo0QklRNzlNRm9nNnErbkROdk9OY04vVk5lNERJbllDV3Za?=
=?utf-8?B?YUdGNFhXUVJ4UUtOUnlJc25BUU5mbkFUSndITUNjNDBVSUlYRnVrVHMxeGJW?=
=?utf-8?B?MHQwcWVIeFhONjBNNkVNT1dzTVozNHp6WkxGZFVwN1hHbFBLTVJBZ1R1U01W?=
=?utf-8?B?MzdUTlNkMGprMmp4U3ZWM2tOcFJhTUxxTmxqTHpTa3pvYVovRTZJWlZ6MXpx?=
=?utf-8?B?ck12Y3FkV2xsWER2S0RyNDVsaTRoU3VKZFZaR0xuMllJYUNsdVlmSEpPS0U0?=
=?utf-8?B?Q2RJWjJXajlOenk2RU1XT0hZRVVEdHVZOVAwbFlBNVA5SURpU3JGdFFrbldQ?=
=?utf-8?B?MTRESnpNMDE4TDA3WGZodGlLWFpXdnlsc0tlUVd1UG1sV2ovTW5QdW5zWVVF?=
=?utf-8?B?UGxHa1NtOGRPby9kV3ZsMU5qZ3l2bkhpSHNqblRzTFRkbVQ3TDIrQ0JIVnd3?=
=?utf-8?B?OEZPYmgyNTlrQklnVnU5dXA4cGRRU0JNV1gzQ0h3Z0c5QkNONzY1ckszelVY?=
=?utf-8?B?SXo2Znl1Q1hrTjJoaGRXUjlqVWR0WExGc1ZTdnZWYk9hdTVmcEE0VHd6WkRa?=
=?utf-8?B?RzkyWTQ0c3phcjBtSXdoYUo3K2x3SmxVQy93LzJOV1E0Qks4Tk44aEo1VnIx?=
=?utf-8?B?bG9NQlpYTnk5YmZFWFBWakRhTEYzSjZhZjk4ek5ualhBdGV6N2IyOUFianFM?=
=?utf-8?B?YXRuWXlFL1RMakpnYkJHbGlDSmUvUC84anc5SGJ4L2pxZ0k4L0dIc2tlNDdS?=
=?utf-8?B?TFBDWXhUc25TTE9ZcFgyZlpFN3VQdVJHL2lKUms5T0ExOERpRkxxeS8vNjU3?=
=?utf-8?B?cHc4SHdzeUxhVTgrbGIxTUIvZGJSekZtWkxlTkd5N0NiamdyOExWa25jdWUz?=
=?utf-8?B?MVpYN1k1L3puOFIwRGtGZWJXWXZPOWNQZERJQWg4VXVDUnI4OGt2clhMRkRr?=
=?utf-8?B?SGpuMWxpd01SWWdJVlpoTWgzc0pVdmhqc1pSdjRPYVFacEVZclR2ak45WXFu?=
=?utf-8?B?QzdnbENpSk5JS0UySjYwVGs0MGFlWEZjZGdkWEx0c3RUNXVHbDY2NTF2NEFB?=
=?utf-8?B?QW1ucG10U0FZQk1oYzNSUUx6RkhqUUZvdVlFM1FWdUVLK2hrQThRV0F3elZw?=
=?utf-8?B?REt5U1NzMWZNQWNUTTZVVk9zVVF5SjFDdjdOY0FPeTZCUEdRdzJKSjZMZkNt?=
=?utf-8?B?R05OUE9OT0kzUzNROXZ6QXgwT1ZhMFJYcGpTVmJLaVJrMzVUZzdmaFBkUU0r?=
=?utf-8?B?b0pDNE5Jb2J5bGZXMkZSajhkQmtnPT0=?=
X-OriginatorOrg: Nvidia.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 669b1423-15d6-44d8-1def-08dda351647c
X-MS-Exchange-CrossTenant-AuthSource: SJ2PR12MB8784.namprd12.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 10:20:13.2439
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: qfdEhXackMga7JFjLwMOKnypm8Xq+fSdnTZ8QDLIskbsUqSw/jfysRZJnUhjoXql+7kQi8F2aOCPnpKf6Bx7Jw==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB6416
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 04/06/2025 10:58, Greg Kroah-Hartman wrote:
On Wed, Jun 04, 2025 at 02:41:11AM -0700, Jon Hunter wrote:
On Mon, 02 Jun 2025 15:47:17 +0200, Greg Kroah-Hartman wrote:
This is the start of the stable review cycle for the 6.12.32 release.
There are 55 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Wed, 04 Jun 2025 13:42:20 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.12.32-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.12.y
and the diffstat can be found below.
thanks,
greg k-h
Failures detected for Tegra ...
Test results for stable-v6.12:
10 builds: 10 pass, 0 fail
28 boots: 28 pass, 0 fail
116 tests: 115 pass, 1 fail
Linux version: 6.12.32-rc1-gce2ebbe0294c
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra186-p3509-0000+p3636-0001, tegra194-p2972-0000,
tegra194-p3509-0000+p3668-0000, tegra20-ventana,
tegra210-p2371-2180, tegra210-p3450-0000,
tegra30-cardhu-a04
Test failures: tegra186-p2771-0000: pm-system-suspend.sh
Any hints as to what is causing the failure?
Yes, I had just responded to my initial email reporting the failure with
the details when you sent this.
Cheers
Jon
--
nvpublic
Return-Path: <linux-kernel+bounces-673071-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 1DC2841E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:20:40 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id D209E175E0B
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:20:34 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 7F0D428D8FE;
Wed, 4 Jun 2025 10:20:20 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=fibocomcorp.onmicrosoft.com header.i=@fibocomcorp.onmicrosoft.com header.b="T1r+de+L"
Received: from OS8PR02CU002.outbound.protection.outlook.com (mail-japanwestazon11022115.outbound.protection.outlook.com [40.107.75.115])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 45E001B0F17;
Wed, 4 Jun 2025 10:20:14 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.75.115
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749032419; cv=fail; b=pgr6Mkp2/BDEEBmXzc7tpu9HlyLTw6Cyj+uzg+9Mm3of89tBIAqWXHKxQLxrLr3SywA4dNXvjLXqb3M2jhqo7avvH+XUWLgVHLTXNvZvBhYAtfpHDs+20E17aKkuHRIn+ImBQn9amUMc99TnuGV7JjaQisdygQEFo0r177DQ5Z4=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749032419; c=relaxed/simple;
bh=qEWVzUh8dxtL23Ilk1LrE9Meelri6vTVWa+0DqVgK6Q=;
h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:
Content-Type:Content-Disposition:MIME-Version; b=GdK8Nv9MzE7Low5H7DMjmiMKPcywpUJaYBDgBnr7zOvl1P93nPMVUEy509j7t6pX5zcGE4AVETilNbNhYmBbD9ekC8RLdqo4n5cxw/K7jVKuE6s1HSehZqQUp5THSRBNn8Hd7nuU4ahiXHj/eUcVIygkPtlkbmoiSAf6FF3TNxU=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=fibocom.com; spf=pass smtp.mailfrom=fibocom.com; dkim=pass (1024-bit key) header.d=fibocomcorp.onmicrosoft.com header.i=@fibocomcorp.onmicrosoft.com header.b=T1r+de+L; arc=fail smtp.client-ip=40.107.75.115
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=fibocom.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fibocom.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=VaAXoPuGZaMO/w2U82clt/UumnmtbgZa74eYuP0EAcabDEibLh4yX9Bbd9bQwdnDxHgT3VqRYvoJBVJRs7tVu+Oy6jr/8GLhNVD0h4YeUnDzNrC+6jbTLGcPzXgNxbh2vGP63hhY6qjVKKWq6X90ym48b5YXrAhvtDoDfxW8nLWuaJvckpc/W38pgLi8fpjIaai0Xn93lKiwpiElzRfutnRUfEzK6l0qRgjWYVQdesX20c/tG2xYVZ/ZIV7ufvFwMaSMerBKyDKWouJ7QrSjAoZd1A+Pv2w4Yl+iIs7P7jdakgrp2DOVtOyWKbOZUaRo3ogRQ3hswr7yrJhWx+1j5A==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=nVrMKRlmBuMmWEiBvZfKhdUM/ymCKO5TLdiJmMnEwOs=;
b=wPPymnXPUIq9NYfHh8UDDIQJdCiyz1fd0XRIoU25JdIDeeqcL5MzkpnD5tjPnzGsEKUdfSSM/c7aBvWjtzEyj2CRrX+/uLJBtY82nH6KJXbkQqnYVh1U46Y4sgHEtSv3ULeK2Al/pWIOZ0d7KhN8Gvijf9jJBBtLIxr12mon5Vmz/Z1t0OU4XWuwEHdZkUdIab3nPI5ic9yfYQwuiAGIGofsoiIlVgXh0tRomW1J/xar2u0yAcvwXMLIhsSP6k0Exkz8m7tCzJrgnkoM5E/4RsG9JNZ7R8f1PTjgJzz4oFAt/gYSeGKuuJ0j3Ek5/BDwjqjrlrw23ZuBHmSzygXwmg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=fibocom.com; dmarc=pass action=none header.from=fibocom.com;
dkim=pass header.d=fibocom.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=fibocomcorp.onmicrosoft.com; s=selector1-fibocomcorp-onmicrosoft-com;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=nVrMKRlmBuMmWEiBvZfKhdUM/ymCKO5TLdiJmMnEwOs=;
b=T1r+de+LVr0emCUXfAn3uzMHWp3wFLlq5m+91ZoY4iz7Tkm20N+PNB2xDwnKCOxfhwAk4h2WvISILkeSn/rrGN1p91mx/dfoQPtYeORLtmy+TMK50vP6mwO2o0IsS5RUSZ1v0/5U4Hk/QRKNq5nYXbn/uVU+qQ43R6V1sUamZ+0=
Authentication-Results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=fibocom.com;
Received: from TY0PR02MB5766.apcprd02.prod.outlook.com (2603:1096:400:1b5::6)
by JH0PR02MB6424.apcprd02.prod.outlook.com (2603:1096:990:c::14) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8769.37; Wed, 4 Jun
2025 10:20:11 +0000
Received: from TY0PR02MB5766.apcprd02.prod.outlook.com
([fe80::f53d:47b:3b04:9a8b]) by TY0PR02MB5766.apcprd02.prod.outlook.com
([fe80::f53d:47b:3b04:9a8b%4]) with mapi id 15.20.8769.037; Wed, 4 Jun 2025
10:20:10 +0000
From: Jinjian Song <jinjian.song@xxxxxxxxxxx>
To: larysa.zaremba@xxxxxxxxx,
Jinjian Song <jinjian.song@xxxxxxxxxxx>
Cc: andrew+netdev@xxxxxxx,
angelogioacchino.delregno@xxxxxxxxxxxxx,
chandrashekar.devegowda@xxxxxxxxx,
chiranjeevi.rapolu@xxxxxxxxxxxxxxx,
corbet@xxxxxxx,
danielwinkler@xxxxxxxxxx,
davem@xxxxxxxxxxxxx,
edumazet@xxxxxxxxxx,
haijun.liu@xxxxxxxxxxxx,
helgaas@xxxxxxxxxx,
horms@xxxxxxxxxx,
ilpo.jarvinen@xxxxxxxxxxxxxxx,
johannes@xxxxxxxxxxxxxxxx,
kuba@xxxxxxxxxx,
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx,
linux-doc@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx,
linux-mediatek@xxxxxxxxxxxxxxxxxxx,
loic.poulain@xxxxxxxxxx,
m.chetan.kumar@xxxxxxxxxxxxxxx,
matthias.bgg@xxxxxxxxx,
netdev@xxxxxxxxxxxxxxx,
pabeni@xxxxxxxxxx,
ricardo.martinez@xxxxxxxxxxxxxxx,
ryazanov.s.a@xxxxxxxxx,
sreehari.kancharla@xxxxxxxxxxxxxxx
Subject: Re: [net v3] net: wwan: t7xx: Fix napi rx poll issue
Date: Wed, 4 Jun 2025 18:19:53 +0800
Message-Id: <aD7BsIXPxYtZYBH_@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
X-Mailer: git-send-email 2.34.1
In-Reply-To: <aD7BsIXPxYtZYBH_@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20250530031648.5592-1-jinjian.song@xxxxxxxxxxx>
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
X-ClientProxiedBy: VI1PR06CA0174.eurprd06.prod.outlook.com (2603:10a6:803:c8::31) To SN7PR11MB7540.namprd11.prod.outlook.com (2603:10b6:806:340::7)
Precedence: bulk
Content-Transfer-Encoding: 8bit
X-ClientProxiedBy: TYAPR01CA0133.jpnprd01.prod.outlook.com
(2603:1096:404:2d::25) To TY0PR02MB5766.apcprd02.prod.outlook.com
(2603:1096:400:1b5::6)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: TY0PR02MB5766:EE_|JH0PR02MB6424:EE_
X-MS-Office365-Filtering-Correlation-Id: b9ca67fa-a0fe-4cbb-f969-08dda35162f2
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam:
BCL:0;ARA:13230040|1800799024|376014|52116014|7416014|4022899009|366016|38350700014|7053199007;
X-Microsoft-Antispam-Message-Info:
=?us-ascii?Q?aOpKfiw21lHtSDRugT+MkF00G8LCfFWyqsEUOpxYCMuKzuZXArn7GPEort8/?=
=?us-ascii?Q?QaqfhtLK9N7Od7Ur+zy6dOnCC3B6WCrwd4ewqWY0cGvS9cbKQpnOYkrMz78o?=
=?us-ascii?Q?3W5cYqD0NQdUxBp7SvIAOXKxS9FLo6paWyMGOdsBVVWTy9pzPWsaUiTlz58t?=
=?us-ascii?Q?knvqx4/4DGYdo9zu3Pn+dZIZqltJT/DwMMa1xFpsqNoL/5vtljk2HYOitHlx?=
=?us-ascii?Q?iPbtTA6OmgS7P2Bp9T6goK+WqB11TSFChJ4alqE5cUv6AXG9Mkay6t4d1MFX?=
=?us-ascii?Q?nHdKwS74YAh1DcI7S+1q7HL32911Ckn2dt+0wYzyfvnAwJEkJaPaPn4EZQIN?=
=?us-ascii?Q?4Q19KF3szxFC8kMBlo97cvOhwuz7pTV1wk8gSykQbm761m4s6oIvY6i1Gx1S?=
=?us-ascii?Q?yPGVsnt8otFYizBMr/YxlR98lV6corHqdwawYLmrKkS8mREScQKVdxp/kIDt?=
=?us-ascii?Q?eqCvdoNsX4v/lI/xdwzS0yyKAOdCBXko5TWaFYzowtFgEj8/MZC9UhA6zqFm?=
=?us-ascii?Q?2nZsuesWmfFH8IhNk6NF1SwzO+nPgYGQv/0I/jG3nNb9Agzja5T1H3XlP8Cl?=
=?us-ascii?Q?W9qlcBfNRHNebqzcLAxYnN/lOiD5dW9O+ha4nXxRQYBiE1Ic/vfAzNzvCJtk?=
=?us-ascii?Q?14SIAikRZXBdzELNfOvY/PJdGYPqViNbV2ANHdlnBNSK7nbEnBu4Ia7Wk3R+?=
=?us-ascii?Q?+riZ21ryOzEGgo+ECNoTc+o5TxSukTjyoF8sMiYVgBBny3bhy6LhQZpCqsPe?=
=?us-ascii?Q?MKIA4RhofLp8RcBDrWVEU16kaCa9UYlLmNtenmz4cq/gq+f1CQqQi72u8J4M?=
=?us-ascii?Q?AeqmZMIHehydUItPj37hlQzNMbXQ9nZFGI91MQq/vMCx36OXFg8OnAY2h3pb?=
=?us-ascii?Q?ek8SIiwXZP/7KOqZTAzBJvC3UjW5+DNM3MGEhnX5J2q0wYTicTUTf3jFvprS?=
=?us-ascii?Q?bpqsbfZd8piTiNDmzgX8aTB1CulIY2Owjolown+WKbxKuN/i3qMPCXSwQFVE?=
=?us-ascii?Q?/M5ApmJQf4t/Aup9MRPuMwWlVthlXhK18iwptALy9uA/nhxZ03yzy+kYmuAL?=
=?us-ascii?Q?tQMk3wEYYDjDCaLskRZ8WW3+V5rA5V22vhMeoLlOQATPgkppKC9xy+Nc+AkG?=
=?us-ascii?Q?G1uwxscxDgowM3lsdINEvUcrJozhqD+N7qZ/L0gXzRopYp1Fm/rX3Rs9nXaF?=
=?us-ascii?Q?kEioRwUOMEEX3POE+Sb9PGXjKY8ivp6/TisUFraRtklU790DjZBhZxQ2Gf2d?=
=?us-ascii?Q?aIfjZ7Mnkx8r0JksI38TAOTNBgVOWEGV0piDTs+6uxrW7zf3kV5J0hyYxUU1?=
=?us-ascii?Q?Vf4LdbAG+ssutEPf2Lxh/KuFqgkdjeMzuz6of7e2QKc3izujqtcmYyeBsaUK?=
=?us-ascii?Q?1vyWOL3YWiSNhJ9V9Mdbne7S1ahD+JMt1+oNp6leyaH2p+E4P5Snm1yOHilZ?=
=?us-ascii?Q?eRyPuhc56+P8d9Gu57HjSpsCfa1IdqRkcpLjmVGwCqVi2nVqMJOxEQ=3D=3D?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:TY0PR02MB5766.apcprd02.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(376014)(52116014)(7416014)(4022899009)(366016)(38350700014)(7053199007);DIR:OUT;SFP:1102;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?us-ascii?Q?qRx1lMEpAmztV28TU6CW4wpuCCphlPZDhmCtj0l6fvLque2jd4MjBJXQcIDI?=
=?us-ascii?Q?J4HJ3IQcF4JnuY2eLkGozo1NI5EpsxUHybpzzCqs9uJVE4CGZoKunj1j10Az?=
=?us-ascii?Q?o27RborfNt5Nxsdv0jvrUoaLr2ha67XrGrSKQAtL88uJBf//IFfhJqb/P/uH?=
=?us-ascii?Q?xjMdg2LvSPJbDyvHXCLh1IPYyWtgVnre61vu1hOrzkWdySQX/Lt9I6xfLwCN?=
=?us-ascii?Q?P71PWiP8qCEzKGWTw6gz3QCYCbU+srRTjAqF56JKNMW9+21a8bYoHkTTjzn3?=
=?us-ascii?Q?NXQWLQEQFo7al/UfmH/58hoUFx3XXWlfqxc6iBm282WfVB0jdvx2eRaPWOD6?=
=?us-ascii?Q?e5w/1y/jyJMyUZWhOD422e6NLR1Y7iOiDr1Fbinx6PLtAhGFiauln/060NT6?=
=?us-ascii?Q?QIOWFoaMKSZ6lWj65DahHEzuRuaw37JoqU/y+9Z87Qii5IIBi6y0Ob6kX6nM?=
=?us-ascii?Q?o/m2IxZxVJO/S+6hP1OKcq5gIB48bIRJQz3gtcrHwo9Ce/QiVcZ7YEL+pWqu?=
=?us-ascii?Q?7saFByL8FTFQIdXUQNJyBlPMCaf9oOskQ1JpsNYwaw9e/gWh4tdQ7i4DpokJ?=
=?us-ascii?Q?iHnE/EBGPEQzYhrZwCy4DEbMckap2Wdy1bgiW4yxCLdk3RVcSyiAeL9p8yso?=
=?us-ascii?Q?w4sfIP58AyltH4G1gXBucHt6iv5xevftkf0KSeEP1kRUCWN1ZbOFqFuZLBF9?=
=?us-ascii?Q?dCSEY9vP21jdJOX+sBrobCKF6oPtGYOPsklmFi6CupJuujMMX/+74M0E0LyJ?=
=?us-ascii?Q?3s5lhIwRKD2zE3lUW6UuK7325y+UKmqOTWbMLJ7MBf8lqAcAegMKrymqts4l?=
=?us-ascii?Q?sEwrbY2Ho7ZY4x2wJNfjsjCFaWF5JmL4xPw6eulS02zgAeZC/AWWFWt1uIg1?=
=?us-ascii?Q?1uSow9X+1Av57AGAd+GGgOP0YO2K+n1of2GOHaC/zX9CR8BQH/7uJplYhnt6?=
=?us-ascii?Q?K8KIpzDApBc6l0DDH5xchRaP8MfokTr1MAnUnwKHdgJsDYllUSFAc1MOr8AK?=
=?us-ascii?Q?GiRyNgEuxuzC/M5THhWmX5HmLPibrxIKC8Lb1WqdjhpWP67/lFKfZbJmfNGr?=
=?us-ascii?Q?tcJjMGAWqMuG6Ld368zBJhjYnxM6f5H3+Z+p4fxGT69BA81DUe/EgFbOZoG4?=
=?us-ascii?Q?OBsr17Rw4e9TfXJdOYhK7iBpDpi5tJCQUWsOmheivpbKA8ONmjCaTRxg/rEy?=
=?us-ascii?Q?d/tR2j3L1rfDJFRShKddolEUDgF6f0nTEEv7YmGQ7PxnAIVPJGaG+rR37pdm?=
=?us-ascii?Q?TwsIkF0vp3MRKdG+FADoLPEPUtdJKTLLXISjARry9hdbIkrgNEZKJTWVK35y?=
=?us-ascii?Q?SuShFDkl4Elg4V6oUunpk70R4zBiRSWH8V172+Jc4U4lgyqNfbyEi8AuIvi/?=
=?us-ascii?Q?1W3Ne8Y44IuDrYY0uoekUDIAu1gtStokwX1yMjEimmyvCJXazoin29kobV3Y?=
=?us-ascii?Q?MGtrSoXqdpQPrHR3t0lLRKQPbWSg32X7gfDQrtac9UoHDv7GtlQeYNRnL5NL?=
=?us-ascii?Q?AaGaznZ5mezf1+cuoQPnuTzxYvi3qKfeZZ2HKgp2VrwjwgtN1fiomoXv4boF?=
=?us-ascii?Q?Gi8iLTRJtXB3JnvDcloQpcK4G9UECct5sIpNKv7ylmEK+o0d1aiWFJFB/6Sx?=
=?us-ascii?Q?gA=3D=3D?=
X-OriginatorOrg: fibocom.com
X-MS-Exchange-CrossTenant-Network-Message-Id: b9ca67fa-a0fe-4cbb-f969-08dda35162f2
X-MS-Exchange-CrossTenant-AuthSource: TY0PR02MB5766.apcprd02.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 10:20:10.7595
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 889bfe61-8c21-436b-bc07-3908050c8236
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: NBkaR8gzoK/2a3TXYQxhyoF18BLH89Mq61Ep6XyKiSbSUF0It4w6foIouPRnGROrXw1C+KsFul+KqVAjDuWOmQ8/co/VK3U3q4b57lmUo8Q=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: JH0PR02MB6424
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
From: Larysa Zaremba <larysa.zaremba@xxxxxxxxx>
Fixes: 5545b7b9f294 ("net: wwan: t7xx: Add NAPI support")
Signed-off-by: Jinjian Song <jinjian.song@xxxxxxxxxxx>
---
v3:
* Only Use READ_ONCE/WRITE_ONCE when the lock protecting ctlb->ccmni_inst
is not held.
What do you mean by "lock protecting ctlb->ccmni_inst"? Please specify.
Hi Larysa,
This description might have been a bit simplified. This process is as follow:
In patch v1, I directly set ctlb->ccmni_inst. This may be not safe, as the NAPI
processing and the driver's internal interface might not be synchronized. Therefoe,
following Jakub's suggestion, I add READ_ONCE/WRITE_ONCE in all places where this
pointer is accessed.
In patch v2, Paolo suggested using READ_ONCE in places that are not protected by locks.
Some interfaces are protected by synchronization mechanisms, so it's unnecesssary to add them there.
Therefore, I removed READ_ONCE from the interfaces.
@@ -441,7 +442,7 @@ static void t7xx_ccmni_recv_skb(struct t7xx_ccmni_ctrl *ccmni_ctlb, struct sk_bu
static void t7xx_ccmni_queue_tx_irq_notify(struct t7xx_ccmni_ctrl *ctlb, int qno)
{
- struct t7xx_ccmni *ccmni = ctlb->ccmni_inst[0];
+ struct t7xx_ccmni *ccmni = READ_ONCE(ctlb->ccmni_inst[0]);
struct netdev_queue *net_queue;
You do not seem to check if ccmni is NULL here, so given ctlb->ccmni_inst[0] is
not being hot-swapped, I guess that there are some guarantees of it not being
NULL at this moment, so I would drop READ_ONCE here.
This ctlb->ccmni_inst[0] is checked in the upper-level interface:
static void t7xx_ccmni_queue_state_notify([...]) {
[...]
if (!READ_ONCE(ctlb->ccmni_inst[0])) {
return;
}
if (state == DMPAIF_TXQ_STATE_IRQ)
t7xx_ccmni_queue_tx_irq_notify(ctlb, qno);
else if (state == DMPAIF_TXQ_STATE_FULL)
t7xx_ccmni_queue_tx_full_notify(ctlb, qno);
}
Since this is part of the driver's internal logic for handing queue events, would it be
safer to add READ_ONCE here as well?
@@ -453,7 +454,7 @@ static void t7xx_ccmni_queue_tx_irq_notify(struct t7xx_ccmni_ctrl *ctlb, int qno
static void t7xx_ccmni_queue_tx_full_notify(struct t7xx_ccmni_ctrl *ctlb, int qno)
{
- struct t7xx_ccmni *ccmni = ctlb->ccmni_inst[0];
+ struct t7xx_ccmni *ccmni = READ_ONCE(ctlb->ccmni_inst[0]);
struct netdev_queue *net_queue;
Same as above, either READ_ONCE is not needed or NULL check is required.
Yes, This function in the same upper-level interface.
if (atomic_read(&ccmni->usage) > 0) {
@@ -471,7 +472,7 @@ static void t7xx_ccmni_queue_state_notify(struct t7xx_pci_dev *t7xx_dev,
if (ctlb->md_sta != MD_STATE_READY)
return;
- if (!ctlb->ccmni_inst[0]) {
+ if (!READ_ONCE(ctlb->ccmni_inst[0])) {
dev_warn(&t7xx_dev->pdev->dev, "No netdev registered yet\n");
return;
}
--
2.34.1
Thanks.
Jinjian,
Best Regards.
Return-Path: <linux-kernel+bounces-673072-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id EF7E641E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:21:00 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id CAF337A9DC7
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:19:40 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id F3A7A28DF45;
Wed, 4 Jun 2025 10:20:24 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="NIYrsHCd"
Received: from out.smtpout.orange.fr (out-70.smtpout.orange.fr [193.252.22.70])
(using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id B55EE28DB4F;
Wed, 4 Jun 2025 10:20:19 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.252.22.70
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749032424; cv=none; b=XeQnQG5yhM5zrt03VXmplnUK1x48oWl3i7yIOzgC4lyToCxT/gnZ3kt/FKdi+U5+Til9KfK+pbdct87v+HDvpW6KNI0RlsrR2DShBnn1C0884baUlmr4cVJVXKt5HvzCHZoPrCMvRsvZB8lB64hX6abzk93LLnLMXAvDbJrVn2E=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749032424; c=relaxed/simple;
bh=SI8hKINZA8ZOjnngj3VI4gk5fVqroFWExXzS49Plxbg=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=kU1qh2tiBhfSqR3PDYriOBDbvDMkPGV83nl09vqXaFgtD/i6R/O29Cr9UuX8E/Q1pp70YsTmRhyoyZek7KuY7nte57Qe8gFx4tQvnXRe+S1u3AUpUQkFQ4ySBpBx5DfnWwl93kq+rYZuk1U7RhmqU9DSWX9hBklHpNta+8h4aRY=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr; spf=pass smtp.mailfrom=wanadoo.fr; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b=NIYrsHCd; arc=none smtp.client-ip=193.252.22.70
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wanadoo.fr
Received: from [172.16.82.72] ([124.33.176.97])
by smtp.orange.fr with ESMTPA
id MlDzuEUloXQs6MlE1uxdmP; Wed, 04 Jun 2025 12:20:12 +0200
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr;
s=t20230301; t=1749032412;
bh=f3saFh4IWjuvEXxBtC57if+A82mqTstaTkfFE0fvKtg=;
h=Message-ID:Date:MIME-Version:Subject:To:From;
b=NIYrsHCdw63o6pQVgtEauY0CxUs3bQOHE+QFt5XnMaFYdI1PC9wWt7jC+7IufUft/
93HtXBP7z/ZNIXkbUU4urmoxoQO2V9Z5UR/T9GD38IyOwVUmyiXs5Pj91L7w/X91ep
S+MvilUt7wZR6JSuEmZ/YoxHg43mxroFJUyQ79F1yqJSjRKeRa2+xR//ESBMX1SSS+
jJrExTzsNfpXIktW+OjrrFGv6Hnvskd5G43guF1ui29xr94gc97cv3/9REgxDjDbfZ
752n6Ekgb+sdoDkhW10A0eFzxJ8nxsaQ8P1dAYlRpPgwiNjSOSTwIG6XAuJ1wYcCID
VFxECmNYqPH8w==
X-ME-Helo: [172.16.82.72]
X-ME-Auth: bWFpbGhvbC52aW5jZW50QHdhbmFkb28uZnI=
X-ME-Date: Wed, 04 Jun 2025 12:20:12 +0200
X-ME-IP: 124.33.176.97
Message-ID: <460dee11-4cb2-4ec3-80c4-feca344e0ea0@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 19:19:58 +0900
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v12 4/7] can: Add Nuvoton NCT6694 CANFD support
To: a0282524688@xxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-gpio@xxxxxxxxxxxxxxx,
linux-i2c@xxxxxxxxxxxxxxx, linux-can@xxxxxxxxxxxxxxx,
netdev@xxxxxxxxxxxxxxx, linux-watchdog@xxxxxxxxxxxxxxx,
linux-hwmon@xxxxxxxxxxxxxxx, linux-rtc@xxxxxxxxxxxxxxx,
linux-usb@xxxxxxxxxxxxxxx, Ming Yu <tmyu0@xxxxxxxxxxx>, lee@xxxxxxxxxx,
linus.walleij@xxxxxxxxxx, brgl@xxxxxxxx, andi.shyti@xxxxxxxxxx,
mkl@xxxxxxxxxxxxxx, andrew+netdev@xxxxxxx, davem@xxxxxxxxxxxxx,
edumazet@xxxxxxxxxx, kuba@xxxxxxxxxx, pabeni@xxxxxxxxxx,
wim@xxxxxxxxxxxxxxxxxx, linux@xxxxxxxxxxxx, jdelvare@xxxxxxxx,
alexandre.belloni@xxxxxxxxxxx
References: <20250604041418.1188792-1-tmyu0@xxxxxxxxxxx>
<20250604041418.1188792-5-tmyu0@xxxxxxxxxxx>
Content-Language: en-US
From: Vincent Mailhol <mailhol.vincent@xxxxxxxxxx>
Autocrypt: addr=mailhol.vincent@xxxxxxxxxx; keydata=
xjMEZluomRYJKwYBBAHaRw8BAQdAf+/PnQvy9LCWNSJLbhc+AOUsR2cNVonvxhDk/KcW7FvN
LFZpbmNlbnQgTWFpbGhvbCA8bWFpbGhvbC52aW5jZW50QHdhbmFkb28uZnI+wrIEExYKAFoC
GwMFCQp/CJcFCwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AWIQTtj3AFdOZ/IOV06OKrX+uI
bbuZwgUCZx41XhgYaGtwczovL2tleXMub3BlbnBncC5vcmcACgkQq1/riG27mcIYiwEAkgKK
BJ+ANKwhTAAvL1XeApQ+2NNNEwFWzipVAGvTRigA+wUeyB3UQwZrwb7jsQuBXxhk3lL45HF5
8+y4bQCUCqYGzjgEZx4y8xIKKwYBBAGXVQEFAQEHQJrbYZzu0JG5w8gxE6EtQe6LmxKMqP6E
yR33sA+BR9pLAwEIB8J+BBgWCgAmFiEE7Y9wBXTmfyDldOjiq1/riG27mcIFAmceMvMCGwwF
CQPCZwAACgkQq1/riG27mcJU7QEA+LmpFhfQ1aij/L8VzsZwr/S44HCzcz5+jkxnVVQ5LZ4B
ANOCpYEY+CYrld5XZvM8h2EntNnzxHHuhjfDOQ3MAkEK
In-Reply-To: <20250604041418.1188792-5-tmyu0@xxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 04/06/2025 at 13:14, a0282524688@xxxxxxxxx wrote:
From: Ming Yu <tmyu0@xxxxxxxxxxx>
This driver supports Socket CANFD functionality for NCT6694 MFD
device based on USB interface.
Reviewed-by: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>
Signed-off-by: Ming Yu <tmyu0@xxxxxxxxxxx>
You are sending this from a0282524688@xxxxxxxxx, but your signature says
tmyu0@xxxxxxxxxxx.
Can you use your actual email address in the signature?
Aside from that:
Reviewed-by: Vincent Mailhol <mailhol.vincent@xxxxxxxxxx>
Thank you!
Yours sincerely,
Vincent Mailhol
Return-Path: <linux-kernel+bounces-673073-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 8A6E341E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:21:31 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 247BF175F29
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:21:12 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 817AE28D822;
Wed, 4 Jun 2025 10:20:40 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LcSiyIO1"
Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9B0EA19DF48;
Wed, 4 Jun 2025 10:20:37 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.47
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749032439; cv=none; b=qxpIoAVW1tVFYrWaKmu2xllCCrWs7EyHBdZoTuGuxXkXfILQ1P4Itf4fxSIupzXBGdWtezlUcozSBIrlaEU/ik0JzNoQGU10cbeQZRVAcY2RFSya31JvEq45Z270rpon0T0lIPcNYyCZCJ65h7te5MYwnijlelF5KyIhrCUbsyg=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749032439; c=relaxed/simple;
bh=2nP4D7Pp64PEPL5G3sjyZgtyDpXKVhkDNwiQajpcrFI=;
h=Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc:
Message-Id:References:To; b=nKXo/daRLl5gI8RpJs6ysV40hQypd0nty2oucwWmOpGaskygFBuZbv/czqjCk6ipfFW2tHk+rjoPCIhtoboGL2fBiehMl+mH7+ou/vwEbJZXtkpFX3Ypf5sXwM3IhqE8q5ZqhdFkMYyK7etLlUBW32ytKgB4bYTaeSuf9CMM2KE=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=LcSiyIO1; arc=none smtp.client-ip=209.85.221.47
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-3a35c894313so5925438f8f.2;
Wed, 04 Jun 2025 03:20:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1749032436; x=1749637236; darn=vger.kernel.org;
h=to:references:message-id:content-transfer-encoding:cc:date
:in-reply-to:from:subject:mime-version:from:to:cc:subject:date
:message-id:reply-to;
bh=gksmbVMdlMg2K8PgWxvAtllhStxQNr+LZ8Dt0YW8uEI=;
b=LcSiyIO1ob8nplXDpQ/nVNl/ErBAsalI9vx0jKvw+Fiy8930o1DSThxTfrwxqzbayi
cU+sTzN73qo7zteQ2sDwRoGaBk5q9Y/esdPzvNjdvrUMuk9YCoqWQJTltjsi60BtE+4z
fMZhm0jlr0ITL5FMfOe05DP049asiE2cWExNKCuFBtRRORAGAh7cQqLG+Bzdwu4FKfCh
tBTQEppteTqW75PMS5R1VUXfgzbgvNFzNXNHk8YvtB5GtDytofX7qQRJIzLNmfZ9m7dq
NNBi2Qc4jEKY0r/nTdnKmGzzlRPR5wvB4cOrY/KmkSIzLH2Pf7V9+e/YmMVk56wjlrDl
4InA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749032436; x=1749637236;
h=to:references:message-id:content-transfer-encoding:cc:date
:in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=gksmbVMdlMg2K8PgWxvAtllhStxQNr+LZ8Dt0YW8uEI=;
b=dHBaENdqFvh1nZ3M7mlRzLr3c0LbaxmIjD+cPBkUwFyBVZroR5eAKSC11TWWtWShEs
3jHiXM2+DL/MI+iwA0tQdnwYP8Gi8gPY+McD5cw1WX2yEqHtaFY71QI92aCB1uDQuaQ2
HS/eGak3+WeAMq29Mnnk0gyb4aCCRQRUVsWYnPsmI5cE0LBnRGSDqNZA3lJvWtKz7h13
cXwsxEnXdWkG0rmra+g78WMGO8XR4Lns18C3lp5I45gC2gXAcLzhztcnbgjQpuk+jXHb
kCY00uHBnvRa1tnzUF4Brpeno2ygGxny2df8k6sqzspkTTcCjaytrkoiv8kE0uQOdi7j
EFeA==
X-Forwarded-Encrypted: i=1; AJvYcCVquZfIcwPUs3otBx0Dx6Kj+jxEcRqbEEItRBu07XYF9DBqORpJkGTh6euIear+CU/9nfVEdj+Ilm52V50=@vger.kernel.org, AJvYcCWJGio7Xb91wWf89+yqnHGXm7yEe5+nKaBOdfgXJMzWsnqmhmBzlXMvPNegREVmUnV8THFr3vWmDXre@xxxxxxxxxxxxxxx
X-Gm-Message-State: AOJu0Yw5UcUuDX4BdxMuCOuWKPI7QpfAbEkHClTIGPhyJB/LO8ICX1O/
w/UKbx7nsH7NOXoa7ZMkLSuzCVdYAfMJ/N+BmGI+HwTr0hd2KpmtRlKO
X-Gm-Gg: ASbGncs1sa5/Mf7gXzceFRe0GU5InM1gaEfYcR5VaVb7eJX1WykKpOnkVfrnCEOUbUy
eNlsGVnEajNvlzRm4wY92yxdjXtYmbtwBgM2Wa+c/34tbF/0AE7/KEDMvfxPqAj74/mrfc3ZyyX
k3ID4duuWnmoILkTXRJ/H6y15QGIofMr/lxnBzGF6uNb8OmL8RrXekZVTZDXkQof22Sgqo0kGg2
33wJqp7W/swhBkLcK/ZcMBb8lcJ5ajpMXasYYVPRM3bpED6ggZMQo9oiytqM9NKsiNwja5kaGDx
reG27q56tdmOa1hJr+XO1kH1JklVezv9eOk4r4Vy3Kv4fMsJdxiBIQ/uR6LtYELeZFkY5+kXjts
F
X-Google-Smtp-Source: AGHT+IF88CeFxKvQxdvXREnSkr8GHdt7EoWxmbkqn8grATbGWlFIxrHVsbxE7StTbOeQY8wMZZYAXg==
X-Received: by 2002:a05:6000:240c:b0:3a0:b1f7:c1da with SMTP id ffacd0b85a97d-3a51d967e0emr1682017f8f.46.1749032435644;
Wed, 04 Jun 2025 03:20:35 -0700 (PDT)
Received: from smtpclient.apple ([87.200.95.144])
by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a4f00a03bdsm21776589f8f.91.2025.06.04.03.20.32
(version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
Wed, 04 Jun 2025 03:20:35 -0700 (PDT)
Content-Type: text/plain;
charset=utf-8
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.600.51.1.1\))
Subject: Re: [RFC PATCH 1/2] PCI: rockchip-host: Retry link training on
failure without PERST#
From: Christian Hewitt <christianshewitt@xxxxxxxxx>
In-Reply-To: <aEAOiO_YIqWH9frQ@geday>
Date: Wed, 4 Jun 2025 14:20:20 +0400
Cc: linux-rockchip@xxxxxxxxxxxxxxxxxxx,
Hugh Cole-Baker <sigmaris@xxxxxxxxx>,
Shawn Lin <shawn.lin@xxxxxxxxxxxxxx>,
Lorenzo Pieralisi <lpieralisi@xxxxxxxxxx>,
=?utf-8?Q?Krzysztof_Wilczy=C5=84ski?= <kw@xxxxxxxxx>,
Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>,
Rob Herring <robh@xxxxxxxxxx>,
Bjorn Helgaas <bhelgaas@xxxxxxxxxx>,
Heiko Stuebner <heiko@xxxxxxxxx>,
linux-pci@xxxxxxxxxxxxxxx,
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
Content-Transfer-Encoding: quoted-printable
Message-Id: <317943F7-8658-436D-9E3C-05CB6404F122@xxxxxxxxx>
References: <aEAOiO_YIqWH9frQ@geday>
To: Geraldo Nascimento <geraldogabriel@xxxxxxxxx>
X-Mailer: Apple Mail (2.3826.600.51.1.1)
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 4 Jun 2025, at 1:14=E2=80=AFpm, Geraldo Nascimento =
<geraldogabriel@xxxxxxxxx> wrote:
=20
Hi,
=20
After almost 30 days of battling with RK3399 buggy PCIe on my Rock Pi
N10 through trial-and-error debugging, I finally got positive results
with enumeration on the PCI bus for both a Realtek 8111E NIC and a
Samsung PM981a SSD.
=20
The NIC was connected to a M.2->PCIe x4 riser card and it would get
stuck on Polling.Compliance, without breaking electrical idle on the
Host RX side. The Samsung PM981a SSD is directly connected to M.2
connector and that SSD is known to be quirky (OEM... no support)
and non-functional on the RK3399 platform.
=20
The Samsung SSD was even worse than the NIC - it would get stuck on
Detect.Active like a bricked card, even though it was fully functional
via USB adapter.
=20
It seems both devices benefit from retrying Link Training if - big if
here - PERST# is not toggled during retry. This patch does exactly =
that.
I find the patch to be ugly as hell but it works - every time.
=20
I added Hugh Cole-Baker and Christian Hewitt to Cc: as both are
experienced on RK3399 and hopefully at least one of them has faced
the non-working SSD experience on RK3399 and will be able to test =
this.
I think you have me confused with another Christian (or auto-complete
scored a new victim). Sadly I have no clue about PCI and not a lot of
knowledge on RK3399 matters :)
CH.
---
drivers/pci/controller/pcie-rockchip-host.c | 141 ++++++++++++--------
1 file changed, 87 insertions(+), 54 deletions(-)
=20
diff --git a/drivers/pci/controller/pcie-rockchip-host.c =
b/drivers/pci/controller/pcie-rockchip-host.c
index 6a46be17aa91..6a465f45a09c 100644
--- a/drivers/pci/controller/pcie-rockchip-host.c
+++ b/drivers/pci/controller/pcie-rockchip-host.c
@@ -284,6 +284,53 @@ static void rockchip_pcie_set_power_limit(struct =
rockchip_pcie *rockchip)
rockchip_pcie_write(rockchip, status, PCIE_RC_CONFIG_DCR);
}
=20
+static int rockchip_pcie_set_vpcie(struct rockchip_pcie *rockchip)
+{
+ struct device *dev =3D rockchip->dev;
+ int err;
+
+ if (!IS_ERR(rockchip->vpcie12v)) {
+ err =3D regulator_enable(rockchip->vpcie12v);
+ if (err) {
+ dev_err(dev, "fail to enable vpcie12v regulator\n");
+ goto err_out;
+ }
+ }
+
+ if (!IS_ERR(rockchip->vpcie3v3)) {
+ err =3D regulator_enable(rockchip->vpcie3v3);
+ if (err) {
+ dev_err(dev, "fail to enable vpcie3v3 regulator\n");
+ goto err_disable_12v;
+ }
+ }
+
+ err =3D regulator_enable(rockchip->vpcie1v8);
+ if (err) {
+ dev_err(dev, "fail to enable vpcie1v8 regulator\n");
+ goto err_disable_3v3;
+ }
+
+ err =3D regulator_enable(rockchip->vpcie0v9);
+ if (err) {
+ dev_err(dev, "fail to enable vpcie0v9 regulator\n");
+ goto err_disable_1v8;
+ }
+
+ return 0;
+
+err_disable_1v8:
+ regulator_disable(rockchip->vpcie1v8);
+err_disable_3v3:
+ if (!IS_ERR(rockchip->vpcie3v3))
+ regulator_disable(rockchip->vpcie3v3);
+err_disable_12v:
+ if (!IS_ERR(rockchip->vpcie12v))
+ regulator_disable(rockchip->vpcie12v);
+err_out:
+ return err;
+}
+
/**
* rockchip_pcie_host_init_port - Initialize hardware
* @rockchip: PCIe port information
@@ -291,11 +338,14 @@ static void rockchip_pcie_set_power_limit(struct =
rockchip_pcie *rockchip)
static int rockchip_pcie_host_init_port(struct rockchip_pcie =
*rockchip)
{
struct device *dev =3D rockchip->dev;
- int err, i =3D MAX_LANE_NUM;
+ int err, i =3D MAX_LANE_NUM, is_reinit =3D 0;
u32 status;
=20
- gpiod_set_value_cansleep(rockchip->perst_gpio, 0);
+ if (!is_reinit) {
+ gpiod_set_value_cansleep(rockchip->perst_gpio, 0);
+ }
=20
+reinit:
err =3D rockchip_pcie_init_port(rockchip);
if (err)
return err;
@@ -322,16 +372,46 @@ static int rockchip_pcie_host_init_port(struct =
rockchip_pcie *rockchip)
rockchip_pcie_write(rockchip, PCIE_CLIENT_LINK_TRAIN_ENABLE,
PCIE_CLIENT_CONFIG);
=20
- msleep(PCIE_T_PVPERL_MS);
- gpiod_set_value_cansleep(rockchip->perst_gpio, 1);
-
- msleep(PCIE_T_RRS_READY_MS);
+ if (!is_reinit) {
+ msleep(PCIE_T_PVPERL_MS);
+ gpiod_set_value_cansleep(rockchip->perst_gpio, 1);
+ msleep(PCIE_T_RRS_READY_MS);
+ }
=20
/* 500ms timeout value should be enough for Gen1/2 training */
err =3D readl_poll_timeout(rockchip->apb_base + =
PCIE_CLIENT_BASIC_STATUS1,
status, PCIE_LINK_UP(status), 20,
500 * USEC_PER_MSEC);
- if (err) {
+
+ if (err && !is_reinit) {
+ while (i--)
+ phy_power_off(rockchip->phys[i]);
+ i =3D MAX_LANE_NUM;
+ while (i--)
+ phy_exit(rockchip->phys[i]);
+ i =3D MAX_LANE_NUM;
+ is_reinit =3D 1;
+ dev_dbg(dev, "Will reinit PCIe without toggling PERST#");
+ if (!IS_ERR(rockchip->vpcie12v))
+ regulator_disable(rockchip->vpcie12v);
+ if (!IS_ERR(rockchip->vpcie3v3))
+ regulator_disable(rockchip->vpcie3v3);
+ regulator_disable(rockchip->vpcie1v8);
+ regulator_disable(rockchip->vpcie0v9);
+ rockchip_pcie_disable_clocks(rockchip);
+ err =3D rockchip_pcie_enable_clocks(rockchip);
+ if (err)
+ return err;
+ err =3D rockchip_pcie_set_vpcie(rockchip);
+ if (err) {
+ dev_err(dev, "failed to set vpcie regulator\n");
+ rockchip_pcie_disable_clocks(rockchip);
+ return err;
+ }
+ goto reinit;
+ }
+
+ else if (err) {
dev_err(dev, "PCIe link training gen1 timeout!\n");
goto err_power_off_phy;
}
@@ -613,53 +693,6 @@ static int rockchip_pcie_parse_host_dt(struct =
rockchip_pcie *rockchip)
return 0;
}
=20
-static int rockchip_pcie_set_vpcie(struct rockchip_pcie *rockchip)
-{
- struct device *dev =3D rockchip->dev;
- int err;
-
- if (!IS_ERR(rockchip->vpcie12v)) {
- err =3D regulator_enable(rockchip->vpcie12v);
- if (err) {
- dev_err(dev, "fail to enable vpcie12v regulator\n");
- goto err_out;
- }
- }
-
- if (!IS_ERR(rockchip->vpcie3v3)) {
- err =3D regulator_enable(rockchip->vpcie3v3);
- if (err) {
- dev_err(dev, "fail to enable vpcie3v3 regulator\n");
- goto err_disable_12v;
- }
- }
-
- err =3D regulator_enable(rockchip->vpcie1v8);
- if (err) {
- dev_err(dev, "fail to enable vpcie1v8 regulator\n");
- goto err_disable_3v3;
- }
-
- err =3D regulator_enable(rockchip->vpcie0v9);
- if (err) {
- dev_err(dev, "fail to enable vpcie0v9 regulator\n");
- goto err_disable_1v8;
- }
-
- return 0;
-
-err_disable_1v8:
- regulator_disable(rockchip->vpcie1v8);
-err_disable_3v3:
- if (!IS_ERR(rockchip->vpcie3v3))
- regulator_disable(rockchip->vpcie3v3);
-err_disable_12v:
- if (!IS_ERR(rockchip->vpcie12v))
- regulator_disable(rockchip->vpcie12v);
-err_out:
- return err;
-}
-
static void rockchip_pcie_enable_interrupts(struct rockchip_pcie =
*rockchip)
{
rockchip_pcie_write(rockchip, (PCIE_CLIENT_INT_CLI << 16) &
--=20
2.49.0
=20
Return-Path: <linux-kernel+bounces-673074-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 34ECA41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:21:44 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 5F4AC176123
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:21:22 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 362CE280A5C;
Wed, 4 Jun 2025 10:21:08 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="nDm4AHKU";
dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="WHdEUh1n";
dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="nDm4AHKU";
dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="WHdEUh1n"
Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1BAD92153EA
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:21:04 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749032467; cv=none; b=cYq6yIW3xup0l7hv+JDWsrEc4LGqmBmzBlqmsUtI4sbtEOIPRDVVNVZRZCPvxA3+X5jvP95aZe3x0KpQy/fMxjNsffAHkLP7JjMhAiFC0UeU5+cBDxDvgt4rF0E6X3YMEXitXO87Xsy+0BsEPXlHxQYTc0dgvtWNavM762ierTI=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749032467; c=relaxed/simple;
bh=fr2U+QjdTUfwEtNfL8gz/GPmo2b3XjHY/ERjpu0d+HM=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=Cqr5ERiOmYMgyHpArIOsrJqYgHu1xVWD/ucWHLcpia+dGyZgWBsUpirPwU08B05RLhisaIYhv2/JobRPQZJCuk2RhT7Bk2/Uq3TknTt4WHCrzjcNTuzihy+ebe7dNLSQict2RQ8ZTmzkydbefWzJJ+fZMlQkXtYc610micdpnU0=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz; spf=pass smtp.mailfrom=suse.cz; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=nDm4AHKU; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=WHdEUh1n; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=nDm4AHKU; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=WHdEUh1n; arc=none smtp.client-ip=195.135.223.131
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.cz
Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(No client certificate requested)
by smtp-out2.suse.de (Postfix) with ESMTPS id 565BA5F993;
Wed, 4 Jun 2025 09:56:42 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa;
t=1749031002; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=1jjyZmVb2kI0wJ/xwBd+UN6NcrjIdsAAEgibBT83Kx4=;
b=nDm4AHKUVbsQhlSq/U90NBb1bblcevUHw4674wIXVoEjVtlYPEN07cOI/0cAHk0SaziQgs
Msacas3qAilmtwhwGocAhgupoEg5S4SHjexOhy0vxhh2XelNBoNl4Y01LFlhaLlLZV1ACN
xTK/3B5kN9vezkH4a54aO2NA+gbSi5k=
DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz;
s=susede2_ed25519; t=1749031002;
h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=1jjyZmVb2kI0wJ/xwBd+UN6NcrjIdsAAEgibBT83Kx4=;
b=WHdEUh1nWrWg3bcwwuBdeF+QRyGtFm9jDfeWDb3u3jgh4ls9UM7ai8UcJw8DeIP+jupdnB
ADVbo4Cfps0ImPCw==
Authentication-Results: smtp-out2.suse.de;
dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=nDm4AHKU;
dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=WHdEUh1n
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa;
t=1749031002; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=1jjyZmVb2kI0wJ/xwBd+UN6NcrjIdsAAEgibBT83Kx4=;
b=nDm4AHKUVbsQhlSq/U90NBb1bblcevUHw4674wIXVoEjVtlYPEN07cOI/0cAHk0SaziQgs
Msacas3qAilmtwhwGocAhgupoEg5S4SHjexOhy0vxhh2XelNBoNl4Y01LFlhaLlLZV1ACN
xTK/3B5kN9vezkH4a54aO2NA+gbSi5k=
DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz;
s=susede2_ed25519; t=1749031002;
h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=1jjyZmVb2kI0wJ/xwBd+UN6NcrjIdsAAEgibBT83Kx4=;
b=WHdEUh1nWrWg3bcwwuBdeF+QRyGtFm9jDfeWDb3u3jgh4ls9UM7ai8UcJw8DeIP+jupdnB
ADVbo4Cfps0ImPCw==
Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(No client certificate requested)
by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 35C1113AD9;
Wed, 4 Jun 2025 09:56:42 +0000 (UTC)
Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167])
by imap1.dmz-prg2.suse.org with ESMTPSA
id +cLEDFoYQGjAHAAAD6G6ig
(envelope-from <vbabka@xxxxxxx>); Wed, 04 Jun 2025 09:56:42 +0000
Message-ID: <6fffd2fe-0cee-405f-af78-b57b5e5d02e8@xxxxxxx>
Date: Wed, 4 Jun 2025 11:56:42 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH] mm/vmstat: Fix build with MEMCG=y and VM_EVENT_COUNTERS=n
Content-Language: en-US
To: "Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
David Hildenbrand <david@xxxxxxxxxx>
Cc: lorenzo.stoakes@xxxxxxxxxx, Liam.Howlett@xxxxxxxxxx, rppt@xxxxxxxxxx,
surenb@xxxxxxxxxx, mhocko@xxxxxxxx, hannes@xxxxxxxxxxx,
shakeel.butt@xxxxxxxxx, muchun.song@xxxxxxxxx, linux-mm@xxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, Randy Dunlap <rdunlap@xxxxxxxxxxxxx>,
Konstantin Khlebnikov <koct9i@xxxxxxxxx>
References: <20250604095111.533783-1-kirill.shutemov@xxxxxxxxxxxxxxx>
From: Vlastimil Babka <vbabka@xxxxxxx>
Autocrypt: addr=vbabka@xxxxxxx; keydata=
xsFNBFZdmxYBEADsw/SiUSjB0dM+vSh95UkgcHjzEVBlby/Fg+g42O7LAEkCYXi/vvq31JTB
KxRWDHX0R2tgpFDXHnzZcQywawu8eSq0LxzxFNYMvtB7sV1pxYwej2qx9B75qW2plBs+7+YB
87tMFA+u+L4Z5xAzIimfLD5EKC56kJ1CsXlM8S/LHcmdD9Ctkn3trYDNnat0eoAcfPIP2OZ+
9oe9IF/R28zmh0ifLXyJQQz5ofdj4bPf8ecEW0rhcqHfTD8k4yK0xxt3xW+6Exqp9n9bydiy
tcSAw/TahjW6yrA+6JhSBv1v2tIm+itQc073zjSX8OFL51qQVzRFr7H2UQG33lw2QrvHRXqD
Ot7ViKam7v0Ho9wEWiQOOZlHItOOXFphWb2yq3nzrKe45oWoSgkxKb97MVsQ+q2SYjJRBBH4
8qKhphADYxkIP6yut/eaj9ImvRUZZRi0DTc8xfnvHGTjKbJzC2xpFcY0DQbZzuwsIZ8OPJCc
LM4S7mT25NE5kUTG/TKQCk922vRdGVMoLA7dIQrgXnRXtyT61sg8PG4wcfOnuWf8577aXP1x
6mzw3/jh3F+oSBHb/GcLC7mvWreJifUL2gEdssGfXhGWBo6zLS3qhgtwjay0Jl+kza1lo+Cv
BB2T79D4WGdDuVa4eOrQ02TxqGN7G0Biz5ZLRSFzQSQwLn8fbwARAQABzSBWbGFzdGltaWwg
QmFia2EgPHZiYWJrYUBzdXNlLmN6PsLBlAQTAQoAPgIbAwULCQgHAwUVCgkICwUWAgMBAAIe
AQIXgBYhBKlA1DSZLC6OmRA9UCJPp+fMgqZkBQJnyBr8BQka0IFQAAoJECJPp+fMgqZkqmMQ
AIbGN95ptUMUvo6aAdhxaOCHXp1DfIBuIOK/zpx8ylY4pOwu3GRe4dQ8u4XS9gaZ96Gj4bC+
jwWcSmn+TjtKW3rH1dRKopvC07tSJIGGVyw7ieV/5cbFffA8NL0ILowzVg8w1ipnz1VTkWDr
2zcfslxJsJ6vhXw5/npcY0ldeC1E8f6UUoa4eyoskd70vO0wOAoGd02ZkJoox3F5ODM0kjHu
Y97VLOa3GG66lh+ZEelVZEujHfKceCw9G3PMvEzyLFbXvSOigZQMdKzQ8D/OChwqig8wFBmV
QCPS4yDdmZP3oeDHRjJ9jvMUKoYODiNKsl2F+xXwyRM2qoKRqFlhCn4usVd1+wmv9iLV8nPs
2Db1ZIa49fJet3Sk3PN4bV1rAPuWvtbuTBN39Q/6MgkLTYHb84HyFKw14Rqe5YorrBLbF3rl
M51Dpf6Egu1yTJDHCTEwePWug4XI11FT8lK0LNnHNpbhTCYRjX73iWOnFraJNcURld1jL1nV
r/LRD+/e2gNtSTPK0Qkon6HcOBZnxRoqtazTU6YQRmGlT0v+rukj/cn5sToYibWLn+RoV1CE
Qj6tApOiHBkpEsCzHGu+iDQ1WT0Idtdynst738f/uCeCMkdRu4WMZjteQaqvARFwCy3P/jpK
uvzMtves5HvZw33ZwOtMCgbpce00DaET4y/UzsBNBFsZNTUBCACfQfpSsWJZyi+SHoRdVyX5
J6rI7okc4+b571a7RXD5UhS9dlVRVVAtrU9ANSLqPTQKGVxHrqD39XSw8hxK61pw8p90pg4G
/N3iuWEvyt+t0SxDDkClnGsDyRhlUyEWYFEoBrrCizbmahOUwqkJbNMfzj5Y7n7OIJOxNRkB
IBOjPdF26dMP69BwePQao1M8Acrrex9sAHYjQGyVmReRjVEtv9iG4DoTsnIR3amKVk6si4Ea
X/mrapJqSCcBUVYUFH8M7bsm4CSxier5ofy8jTEa/CfvkqpKThTMCQPNZKY7hke5qEq1CBk2
wxhX48ZrJEFf1v3NuV3OimgsF2odzieNABEBAAHCwXwEGAEKACYCGwwWIQSpQNQ0mSwujpkQ
PVAiT6fnzIKmZAUCZ8gcVAUJFhTonwAKCRAiT6fnzIKmZLY8D/9uo3Ut9yi2YCuASWxr7QQZ
lJCViArjymbxYB5NdOeC50/0gnhK4pgdHlE2MdwF6o34x7TPFGpjNFvycZqccSQPJ/gibwNA
zx3q9vJT4Vw+YbiyS53iSBLXMweeVV1Jd9IjAoL+EqB0cbxoFXvnjkvP1foiiF5r73jCd4PR
rD+GoX5BZ7AZmFYmuJYBm28STM2NA6LhT0X+2su16f/HtummENKcMwom0hNu3MBNPUOrujtW
khQrWcJNAAsy4yMoJ2Lw51T/5X5Hc7jQ9da9fyqu+phqlVtn70qpPvgWy4HRhr25fCAEXZDp
xG4RNmTm+pqorHOqhBkI7wA7P/nyPo7ZEc3L+ZkQ37u0nlOyrjbNUniPGxPxv1imVq8IyycG
AN5FaFxtiELK22gvudghLJaDiRBhn8/AhXc642/Z/yIpizE2xG4KU4AXzb6C+o7LX/WmmsWP
Ly6jamSg6tvrdo4/e87lUedEqCtrp2o1xpn5zongf6cQkaLZKQcBQnPmgHO5OG8+50u88D9I
rywqgzTUhHFKKF6/9L/lYtrNcHU8Z6Y4Ju/MLUiNYkmtrGIMnkjKCiRqlRrZE/v5YFHbayRD
dJKXobXTtCBYpLJM4ZYRpGZXne/FAtWNe4KbNJJqxMvrTOrnIatPj8NhBVI0RSJRsbilh6TE
m6M14QORSWTLRg==
In-Reply-To: <20250604095111.533783-1-kirill.shutemov@xxxxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Rspamd-Server: rspamd2.dmz-prg2.suse.org
X-Rspamd-Queue-Id: 565BA5F993
X-Rspamd-Action: no action
X-Spamd-Result: default: False [-4.51 / 50.00];
BAYES_HAM(-3.00)[100.00%];
NEURAL_HAM_LONG(-1.00)[-1.000];
R_DKIM_ALLOW(-0.20)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519];
NEURAL_HAM_SHORT(-0.20)[-0.999];
MIME_GOOD(-0.10)[text/plain];
MX_GOOD(-0.01)[];
RCVD_TLS_ALL(0.00)[];
FREEMAIL_ENVRCPT(0.00)[gmail.com];
ARC_NA(0.00)[];
RCVD_VIA_SMTP_AUTH(0.00)[];
RCPT_COUNT_TWELVE(0.00)[15];
MIME_TRACE(0.00)[0:+];
MID_RHS_MATCH_FROM(0.00)[];
FUZZY_BLOCKED(0.00)[rspamd.com];
DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519];
FROM_HAS_DN(0.00)[];
FREEMAIL_CC(0.00)[oracle.com,kernel.org,google.com,suse.com,cmpxchg.org,linux.dev,kvack.org,vger.kernel.org,infradead.org,gmail.com];
TO_DN_SOME(0.00)[];
FROM_EQ_ENVFROM(0.00)[];
DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo];
RCVD_COUNT_TWO(0.00)[2];
TO_MATCH_ENVRCPT_ALL(0.00)[];
DKIM_TRACE(0.00)[suse.cz:+]
X-Spam-Score: -4.51
X-Spam-Level:
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 6/4/25 11:51, Kirill A. Shutemov wrote:
When compiling with MEMCG enabled but VM_EVENT_COUNTERS disabled,
BUILD_BUG_ON() is triggered in vmstat_start because the vmstat_text
array is larger than NR_VMSTAT_ITEMS.
This issue arises because some elements of the vmstat_text array are
present when either MEMCG or VM_EVENT_COUNTERS is enabled, but
NR_VMSTAT_ITEMS only accounts for these elements if VM_EVENT_COUNTERS is
enabled.
The recent change in the BUILD_BUG_ON() check made it more strict,
disallowing extra elements in the array, which revealed the issue.
Instead of adjusting the NR_VMSTAT_ITEMS definition to account for
MEMCG, make MEMCG select VM_EVENT_COUNTERS. VM_EVENT_COUNTERS is
enabled in most configurations anyway.
There is no need to backport this fix to stable trees. Without the
strict BUILD_BUG_ON(), the issue is not harmful. The elements in
question would only be read by the memcg code, not by /proc/vmstat.
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>
Reported-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Fixes: ebc5d83d0443 ("mm/memcontrol: use vmstat names for printing statistics")
Well in that case I think we should put Fixes: to the BUILD_BUG_ON() change.
And if it's not yet a stable sha1, squash that together with this?
It doesn't seem ebc5d83d0443 alone needs this fix.
Cc: Konstantin Khlebnikov <koct9i@xxxxxxxxx>
Otherwise,
Acked-by: Vlastimil Babka <vbabka@xxxxxxx>
---
include/linux/vmstat.h | 4 ++--
init/Kconfig | 1 +
mm/vmstat.c | 4 ++--
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h
index b2ccb6845595..c287998908bf 100644
--- a/include/linux/vmstat.h
+++ b/include/linux/vmstat.h
@@ -507,7 +507,7 @@ static inline const char *lru_list_name(enum lru_list lru)
return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
}
-#if defined(CONFIG_VM_EVENT_COUNTERS) || defined(CONFIG_MEMCG)
+#if defined(CONFIG_VM_EVENT_COUNTERS)
static inline const char *vm_event_name(enum vm_event_item item)
{
return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
@@ -516,7 +516,7 @@ static inline const char *vm_event_name(enum vm_event_item item)
NR_VM_STAT_ITEMS +
item];
}
-#endif /* CONFIG_VM_EVENT_COUNTERS || CONFIG_MEMCG */
+#endif /* CONFIG_VM_EVENT_COUNTERS */
#ifdef CONFIG_MEMCG
diff --git a/init/Kconfig b/init/Kconfig
index ab83abe0fd9d..dd332cac6036 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -989,6 +989,7 @@ config MEMCG
select PAGE_COUNTER
select EVENTFD
select SLAB_OBJ_EXT
+ select VM_EVENT_COUNTERS
help
Provides control over the memory footprint of tasks in a cgroup.
diff --git a/mm/vmstat.c b/mm/vmstat.c
index 27dc37168cfd..c3114b8826e4 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -1301,7 +1301,7 @@ const char * const vmstat_text[] = {
[I(NR_MEMMAP_BOOT_PAGES)] = "nr_memmap_boot_pages",
#undef I
-#if defined(CONFIG_VM_EVENT_COUNTERS) || defined(CONFIG_MEMCG)
+#if defined(CONFIG_VM_EVENT_COUNTERS)
/* enum vm_event_item counters */
#define I(x) (NR_VM_ZONE_STAT_ITEMS + NR_VM_NUMA_EVENT_ITEMS + \
NR_VM_NODE_STAT_ITEMS + NR_VM_STAT_ITEMS + x)
@@ -1498,7 +1498,7 @@ const char * const vmstat_text[] = {
#endif
#endif
#undef I
-#endif /* CONFIG_VM_EVENT_COUNTERS || CONFIG_MEMCG */
+#endif /* CONFIG_VM_EVENT_COUNTERS */
};
#endif /* CONFIG_PROC_FS || CONFIG_SYSFS || CONFIG_NUMA || CONFIG_MEMCG */
Return-Path: <linux-kernel+bounces-673075-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id D0D6241E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:22:39 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id EF1CC3A3E04
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:22:17 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id B6958239E6E;
Wed, 4 Jun 2025 10:22:33 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="Z60bS6rZ"
Received: from mailout3.samsung.com (mailout3.samsung.com [203.254.224.33])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 00D9C2236F0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:22:29 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=203.254.224.33
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749032552; cv=none; b=eLMSGFFNHnsmxRoiuks3G+PjbNHoz3CM/1FHbkv+8jE7Xz+yxbFN6ED9WC7cjGiVKEXWOiohWFGmhN6pHrUlBtOQRAkmqPLTDuqTCSIWLbGwiTLMmEVxWk7aEjcaGSWbhpWteUuT9FXxu3MC5y2ejmfDqjdRepnu9Ay9cf42yLM=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749032552; c=relaxed/simple;
bh=Qz5W+vvradWz8G1yGaxhcXNSB9TzaaANhMo6byS0QGc=;
h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:In-Reply-To:
Content-Type:References; b=DOgxqOlTILn9veHeIdvFMMe5Sy0PjSrhTtFmu61iPk7RuUlXRtvKtoi+kVeQXAD+lmp56Ogu2SJvSLn2Wx01SffVmaAZO/T62Pn0N0Gxsb5FzBMVOJj2HWJUWBpoUfALQcWZmayM4LmgBwI1NcxTaxG98Tu7Uzj925S1oOL7Bt8=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=Z60bS6rZ; arc=none smtp.client-ip=203.254.224.33
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com
Received: from epcas2p1.samsung.com (unknown [182.195.41.53])
by mailout3.samsung.com (KnoxPortal) with ESMTP id 20250604102221epoutp03ce3d137257c69dfeb46ba9a06da04897~Fz9SB_QMj1578015780epoutp03l
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:22:21 +0000 (GMT)
DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20250604102221epoutp03ce3d137257c69dfeb46ba9a06da04897~Fz9SB_QMj1578015780epoutp03l
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com;
s=mail20170921; t=1749032541;
bh=5PFJKOcCJULULXlfEo0K6/6CMfBVPePa/hBz4dur49c=;
h=Date:From:To:Cc:Subject:In-Reply-To:References:From;
b=Z60bS6rZdi0hWnk0sSxuIcUwZq7U8bml6F/zXGZL9fEBhyHqaq7fDze/nW+lE24dm
OghcnvaKeBad/vT4zhggvzlTGIybJSCTtTWwftVdZbzwMjSf2ybJaI2vgrhGWd+cfA
VZ+EHGpXsILXfPXvbhoXTu4LwfsH8Dgoee766ufk=
Received: from epsnrtp01.localdomain (unknown [182.195.42.153]) by
epcas2p1.samsung.com (KnoxPortal) with ESMTPS id
20250604102220epcas2p1cf5f69cfed7f307bb22bda90b73cce9f~Fz9RHCVZR1135311353epcas2p1Z;
Wed, 4 Jun 2025 10:22:20 +0000 (GMT)
Received: from epcas2p2.samsung.com (unknown [182.195.36.90]) by
epsnrtp01.localdomain (Postfix) with ESMTP id 4bC3Y82q3dz6B9m7; Wed, 4 Jun
2025 10:22:20 +0000 (GMT)
Received: from epsmtip2.samsung.com (unknown [182.195.34.31]) by
epcas2p4.samsung.com (KnoxPortal) with ESMTPA id
20250604102219epcas2p4e13cbdf67accf9389272d1889e073898~Fz9QDGduJ0169101691epcas2p4Y;
Wed, 4 Jun 2025 10:22:19 +0000 (GMT)
Received: from tiffany (unknown [10.229.95.142]) by epsmtip2.samsung.com
(KnoxPortal) with ESMTPA id
20250604102219epsmtip2cea4cb3046f85c7514d67452e731543e~Fz9QAFh431738217382epsmtip2j;
Wed, 4 Jun 2025 10:22:19 +0000 (GMT)
Date: Wed, 4 Jun 2025 19:20:31 +0900
From: Hyesoo Yu <hyesoo.yu@xxxxxxxxxxx>
To: David Hildenbrand <david@xxxxxxxxxx>
Cc: janghyuck.kim@xxxxxxxxxxx, zhaoyang.huang@xxxxxxxxxx,
jaewon31.kim@xxxxxxxxx, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Jason
Gunthorpe <jgg@xxxxxxxx>, John Hubbard <jhubbard@xxxxxxxxxx>, Peter Xu
<peterx@xxxxxxxxxx>, linux-mm@xxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
Subject: Re: [PATCH] mm: gup: fail migration when no migratable page to
prevent CMA pinning
Message-ID: <20250604102031.GA4060485@tiffany>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
In-Reply-To: <fa9d72ac-1b46-4a09-8f29-af97f2ca6e2e@xxxxxxxxxx>
X-CMS-MailID: 20250604102219epcas2p4e13cbdf67accf9389272d1889e073898
X-Msg-Generator: CA
Content-Type: multipart/mixed;
boundary="----6COtjJDFSqE3oSvckRkzJ3gMdAJ_hz7naVTtDv8sVOxgD1sZ=_290f2_"
X-Sendblock-Type: AUTO_CONFIDENTIAL
CMS-TYPE: 102P
cpgsPolicy: CPGSC10-234,Y
X-CFilter-Loop: Reflected
X-CMS-RootMailID: 20250604095242epcas2p17032a1133b03be2d24c8ebcff94d1d55
References: <CGME20250604095242epcas2p17032a1133b03be2d24c8ebcff94d1d55@xxxxxxxxxxxxxxxxxxxx>
<20250604095049.4052078-1-hyesoo.yu@xxxxxxxxxxx>
<fa9d72ac-1b46-4a09-8f29-af97f2ca6e2e@xxxxxxxxxx>
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
------6COtjJDFSqE3oSvckRkzJ3gMdAJ_hz7naVTtDv8sVOxgD1sZ=_290f2_
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
On Wed, Jun 04, 2025 at 12:07:21PM +0200, David Hildenbrand wrote:
On 04.06.25 11:50, Hyesoo Yu wrote:
> Commit 1aaf8c122918 ("mm: gup: fix infinite loop within __get_longterm_locked")
> caused CMA pages to become pinned in some cases when handling longterm GUP.
> This happened because migration would return success immediately if no pages
> were in the movable_page_list, without retrying.
>
> However, CMA pages can be temporarily off the LRU (e.g., in pagevecs), and
A better example might be concurrent isolation. Just imagine two of these
longterm pinnings racing.
I will change the example below.
CMA pages may be temporarily off the LRU due to concurrent isolation, for example
when multiple longterm GUP requests are racing.
> therefore not appear in movable_page_list, even though they can be migrated
> later. Before commit 1aaf8c, the kernel would retry migration in such cases,
> which helped avoid accidental CMA pinning.
>
> The commit 1aaf8c aimed to support an out-of-tree use case (like pKVM), where
> longterm GUP was applied to non-LRU CMA pages. But allowing CMA pinning
> in general for this corner case could lead to more fragmentation and
> reliability issues. So this patch prevents that.
>
> Instead of retrying, this patch explicitly fails the migration attempt
> (-EBUSY) if no movable pages are found and unpinnable pages remain.
> This avoids infinite loops and gives user a clear signal to retry,
> rather then spinning inside kernel.
Hmmm, that means we will return EBUSY to the caller. Are all users actually
prepared to deal with that?
So far we only returned EBUSY in this corner-case
migrate_device_coherent_folio() that most callers never actually trigger.
Maybe we should do EAGAIN for now (old way of doing it?), and look into
doing EBUSY separately.
Thank you for the feedback. I agree. I'll keep this patch focused on resolving
the CMA pinning issue using -EAGAIN. Handling -EBUSY can be considered separately.
>
> Fixes: 1aaf8c122918 ("mm: gup: fix infinite loop within __get_longterm_locked")
> Signed-off-by: Hyesoo Yu <hyesoo.yu@xxxxxxxxxxx>
> ---
> mm/gup.c | 49 ++++++++++++++++++++++++++-----------------------
> 1 file changed, 26 insertions(+), 23 deletions(-)
>
> diff --git a/mm/gup.c b/mm/gup.c
> index e065a49842a8..446938aedcc9 100644
> --- a/mm/gup.c
> +++ b/mm/gup.c
> @@ -2303,12 +2303,13 @@ static void pofs_unpin(struct pages_or_folios *pofs)
> /*
> * Returns the number of collected folios. Return value is always >= 0.
> */
Comment should be removed.
Got it. I'll remove the comment.
> -static void collect_longterm_unpinnable_folios(
> +static bool collect_longterm_unpinnable_folios(
> struct list_head *movable_folio_list,
> struct pages_or_folios *pofs)
> {
> struct folio *prev_folio = NULL;
> bool drain_allow = true;
> + bool any_unpinnable = false;
> unsigned long i;
> for (i = 0; i < pofs->nr_entries; i++) {
> @@ -2321,6 +2322,8 @@ static void collect_longterm_unpinnable_folios(
> if (folio_is_longterm_pinnable(folio))
> continue;
> + any_unpinnable = true;
> +
> if (folio_is_device_coherent(folio))
> continue;
> @@ -2342,6 +2345,8 @@ static void collect_longterm_unpinnable_folios(
> NR_ISOLATED_ANON + folio_is_file_lru(folio),
> folio_nr_pages(folio));
> }
> +
> + return any_unpinnable;
> }
> /*
> @@ -2353,8 +2358,13 @@ static int
> migrate_longterm_unpinnable_folios(struct list_head *movable_folio_list,
> struct pages_or_folios *pofs)
> {
> - int ret;
> + int ret = -EAGAIN;
> unsigned long i;
> + struct migration_target_control mtc = {
> + .nid = NUMA_NO_NODE,
> + .gfp_mask = GFP_USER | __GFP_NOWARN,
> + .reason = MR_LONGTERM_PIN,
> + };
Reverse xmas tree while we're at it.
But, can we do this cleanup here separately, and not as part of the fix?
I'll prepare a separate patch for the cleanup.
> for (i = 0; i < pofs->nr_entries; i++) {
> struct folio *folio = pofs_get_folio(pofs, i);
> @@ -2370,6 +2380,7 @@ migrate_longterm_unpinnable_folios(struct list_head *movable_folio_list,
> gup_put_folio(folio, 1, FOLL_PIN);
> if (migrate_device_coherent_folio(folio)) {
> + pofs_unpin(pofs);
> ret = -EBUSY;
> goto err;
> }
> @@ -2388,27 +2399,11 @@ migrate_longterm_unpinnable_folios(struct list_head *movable_folio_list,
> pofs_clear_entry(pofs, i);
> }
> - if (!list_empty(movable_folio_list)) {
> - struct migration_target_control mtc = {
> - .nid = NUMA_NO_NODE,
> - .gfp_mask = GFP_USER | __GFP_NOWARN,
> - .reason = MR_LONGTERM_PIN,
> - };
> -
> - if (migrate_pages(movable_folio_list, alloc_migration_target,
> - NULL, (unsigned long)&mtc, MIGRATE_SYNC,
> - MR_LONGTERM_PIN, NULL)) {
> - ret = -ENOMEM;
> - goto err;
> - }
> - }
> -
> - putback_movable_pages(movable_folio_list);
> -
> - return -EAGAIN;
> + if (migrate_pages(movable_folio_list, alloc_migration_target, NULL,
> + (unsigned long)&mtc, MIGRATE_SYNC, MR_LONGTERM_PIN, NULL))
> + ret = -ENOMEM;
> err:
> - pofs_unpin(pofs);
> putback_movable_pages(movable_folio_list);
> return ret;
> @@ -2417,11 +2412,19 @@ migrate_longterm_unpinnable_folios(struct list_head *movable_folio_list,
> static long
> check_and_migrate_movable_pages_or_folios(struct pages_or_folios *pofs)
> {
> + bool any_unpinnable;
> +
> LIST_HEAD(movable_folio_list);
> - collect_longterm_unpinnable_folios(&movable_folio_list, pofs);
> - if (list_empty(&movable_folio_list))
> + any_unpinnable = collect_longterm_unpinnable_folios(&movable_folio_list, pofs);
> +
> + if (list_empty(&movable_folio_list)) {
> + if (any_unpinnable) {
/*
* If we find any longterm unpinnable page that we failed to
* isolated for migration, it might be because someone else
* concurrently isolated it. Make the caller retry until it
* succeeds.
*/
I will add the comment.
> + pofs_unpin(pofs);
> + return -EBUSY;
> + }
> return 0;
> + }
> return migrate_longterm_unpinnable_folios(&movable_folio_list, pofs);
> }
--
Cheers,
David / dhildenb
Thanks,
Regards.
------6COtjJDFSqE3oSvckRkzJ3gMdAJ_hz7naVTtDv8sVOxgD1sZ=_290f2_
Content-Type: text/plain; charset="utf-8"
------6COtjJDFSqE3oSvckRkzJ3gMdAJ_hz7naVTtDv8sVOxgD1sZ=_290f2_--
Return-Path: <linux-kernel+bounces-673076-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 4F48E41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:23:14 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id A8A033A4B12
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:22:52 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 881E928B50C;
Wed, 4 Jun 2025 10:23:06 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="pc2IsaP7"
Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2087.outbound.protection.outlook.com [40.107.237.87])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id B59412236F0;
Wed, 4 Jun 2025 10:23:03 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.237.87
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749032585; cv=fail; b=hJ4UEdhW62kFNEM+Cs/1vPYlfFNXHnUKzV1fU82Nh0wUPHzUa6Y/gebQmbp4q+/Gi+p21/SrNSLoWdwJMWfhd6nC08amAzOtHyiUvs/Q+H10U7QIhcOoNIiI6Gq8WC4XTkB9EhPDmM5UU9pn+SC14Opvi0VBjBLpze4R4m0IOuU=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749032585; c=relaxed/simple;
bh=8e6Q5YGUc4QQFe2tD7dO88Q+flP5yiHC5OQq0sF01rM=;
h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To:
Content-Type:MIME-Version; b=g/jwKdwsv5WIu6lgC/+Vx/89k/wKkN/toVQaWN5/xYIaB1tC8ItfCqRKK3VrNpTQzIRZFTXYel6GfLds7E9n82CTBe1iIHhd/TjWXL75c/uh3445CiBLsPzA7bkahvY3lWHp+xJdpNxm77/cjoQffvHyzIXOYbXHRfeFNzuKGxs=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=pc2IsaP7; arc=fail smtp.client-ip=40.107.237.87
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com
Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=WYkv/ZYQ2ahn+M4LChzeAQ0kaysC5hIAV+GkugdQmkZByOYYuWu6HtCoHZpnoi5dCyo+zGgx8Wt37iXZPsLQh9GmW3Mwo9wMNLiWQqdFQX9qCnPE5veOFt2XBzxR6NLGZC6SikGCMBhTtlALELRBwAtQxWaom81kg1qgXP1OqbxffiICeHxWXALUJNFBHm1AaRBtu8X1bwCorQvUerLqKuhMkUfVD4IbGtEXHtK98y7Mj6KDnMlrcxeGTPD7VdXrkgpDJL859LfrJ3EKL/D4wK7aexUuV0PIr4KhavILd0YFZu4tL4svITEZbdgG0AHjVFhbHxaPKoNq+VybO2YYbg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=vbd5Qu5ILLbqyGOwC4M5+j+wgFAVTGjBxNZAbVC5ufI=;
b=dzND92pndBpZHT1pv8rm6CjqV9Dsb6Ed2sgMMOZ1p9LgXlFoYKnSpoHFdLdMJrPxen2NYYFfZYaS4TO8hHsqNz3/TZ8s9NxZMiZey4kYlTupqOO54SnSnfCS+0SC83H+eG+eGqZMPL4lcppc2Y1W5suX0y5qN0810vmR33Hyqof1S7XEu73cBcmzxk6mmK+rXsofFX55ocQKoKq7YZuTLy04qs7l6hG6vaeFlpeCWej55huc70C0juIXMrSRQV1ib6iOlEYx6w0qNN51qb1AmugvEFKnG59Rw/+IjyDrhCHtixgYjFFbE4QRxfrcanBeoHdTJK2BZwF5PStfQSulew==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com;
dkim=pass header.d=nvidia.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;
s=selector2;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=vbd5Qu5ILLbqyGOwC4M5+j+wgFAVTGjBxNZAbVC5ufI=;
b=pc2IsaP7QttD+n7THQLg2qtiIYSc9qCo0SpV6w7Ydc+5TP/8lC57kwIpDo5VRkAfFQwBezSYSkuRCLiCK02gcinqgmLhfzRy5pFmUKNC08MIFVVFSfodsxuuCzKRklYBD+kkq3ay0KTYfTK0XhTjuRl+f+zsvO/StHzCaG9CZjaHrwsFx6izOzGWgI5yXOsiRmfNO39en/Fiu/HC3FtKaPcYFVrWBw5kRyjvtfjLk1ggQV4KDKkQJtvtyuLc2uE5Ms/HOzt7XWyBl8H44HQeJ6lih2aFCtl90GWR/0WRxzvhkAZhCyALj2WsXKr094rXR5MeH39RtTHPf4MBYroB6g==
Authentication-Results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=nvidia.com;
Received: from SJ2PR12MB8784.namprd12.prod.outlook.com (2603:10b6:a03:4d0::11)
by DS0PR12MB6416.namprd12.prod.outlook.com (2603:10b6:8:cb::6) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.8769.37; Wed, 4 Jun 2025 10:23:00 +0000
Received: from SJ2PR12MB8784.namprd12.prod.outlook.com
([fe80::1660:3173:eef6:6cd9]) by SJ2PR12MB8784.namprd12.prod.outlook.com
([fe80::1660:3173:eef6:6cd9%3]) with mapi id 15.20.8769.037; Wed, 4 Jun 2025
10:23:00 +0000
Message-ID: <b103ae12-150b-4b89-bc77-86e256dac7bc@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 11:22:53 +0100
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH 6.12 00/55] 6.12.32-rc1 review
To: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Cc: patches@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
torvalds@xxxxxxxxxxxxxxxxxxxx, akpm@xxxxxxxxxxxxxxxxxxxx,
linux@xxxxxxxxxxxx, shuah@xxxxxxxxxx, patches@xxxxxxxxxxxx,
lkft-triage@xxxxxxxxxxxxxxxx, pavel@xxxxxxx, f.fainelli@xxxxxxxxx,
sudipm.mukherjee@xxxxxxxxx, srw@xxxxxxxxxxxxxxxx, rwarsow@xxxxxx,
conor@xxxxxxxxxx, hargar@xxxxxxxxxxxxx, broonie@xxxxxxxxxx,
linux-tegra@xxxxxxxxxxxxxxx, stable@xxxxxxxxxxxxxxx,
Aaron Kling <webgeek1234@xxxxxxxxx>
References: <20250602134238.271281478@xxxxxxxxxxxxxxxxxxx>
<ff0b4357-e2d4-4d39-aa0e-bb73c59304c1@xxxxxxxxxxxxxxxxxxxxxx>
<bf1dabf7-0337-40e9-8b8e-4e93a0ffd4cc@xxxxxxxxxx>
<2025060413-entrust-unsold-7bfd@gregkh>
From: Jon Hunter <jonathanh@xxxxxxxxxx>
Content-Language: en-US
In-Reply-To: <2025060413-entrust-unsold-7bfd@gregkh>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-ClientProxiedBy: LO4P265CA0055.GBRP265.PROD.OUTLOOK.COM
(2603:10a6:600:2af::11) To SJ2PR12MB8784.namprd12.prod.outlook.com
(2603:10b6:a03:4d0::11)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: SJ2PR12MB8784:EE_|DS0PR12MB6416:EE_
X-MS-Office365-Filtering-Correlation-Id: 5b0a06a8-b122-420a-f4e2-08dda351c807
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam:
BCL:0;ARA:13230040|376014|7416014|1800799024|10070799003|366016;
X-Microsoft-Antispam-Message-Info:
=?utf-8?B?UVpZR0ZrdE1oRHBOTWMxTGxwTUtEZHFpUU9JK1VkZ1o2elhwOUgrVFg5R2l0?=
=?utf-8?B?VW0zK0txMnRCZ3QzZnRVUkxGdDhoRStYYnFQdXlwSVB6T0VOMHZMWERCOHQ2?=
=?utf-8?B?dVJxVHVOMzV1a3Y0WktOTFI5RjZMbVNEK0FxS2g3N2NtdDRENkEvbnc0SEEw?=
=?utf-8?B?VUU3MnBXMmFrbE5PUzRRd2NScHFVREY1SE94RWhSOGloZXd0OFAxYmVkMTNt?=
=?utf-8?B?QlVBUWlIY2VqMzlWNVkrNDhMblZzMmhoeFMybTMxaklWUzA1cUs3MmRuelBy?=
=?utf-8?B?MkVZL2dwYnE0SHVFbERBbUVYYjNxTTI2bWRMZDkvcUlYME1KdStiNGpJcnlG?=
=?utf-8?B?V1FCcCtXVkxyaEhpd0d0RzA1Tkp1cm9oQW93RVl1LzlnR1FId0haSkN4c1lE?=
=?utf-8?B?NytpdTNPMHk2bEw0MnJGSDB2VTlKc0lBbXQ4RWRieXh2R0Ntb1h2eFBadzNq?=
=?utf-8?B?NDVCZ1QwNXR1QUk4d3hDQ3Q1bjdWcmhuMzJaZGtCMEFnbGxsNy9ETC9JdDZG?=
=?utf-8?B?d3l0RmRvcTZDdzUzTW4wMkdHa1IwNUtUR3psWjUxOE0vVngxb0szRk1DbXF4?=
=?utf-8?B?N1VWRGUxMGJ1QzYwNWIwWWlWODFrWDMvSW55ZnAyeDdtbGNySUVUM2krYWJp?=
=?utf-8?B?R1R2emVvN3FYKzg3aUtwZzBHZDhVYTBScWxLWUlRd0o1SEJ0bnNhdUFRWTlz?=
=?utf-8?B?MDRzVzVxVnhFNTdoL0tLbFNLWDUwRjVpd1VvSkNMM25uL0EwalErYWVGWkxK?=
=?utf-8?B?ck52LzhYWVNWREFRWlhhTksrNjNmVE5nWHNLZVlYU3Q1T3NEbU0xUGpVVHRB?=
=?utf-8?B?ZHl2MHZrMWNsemlRWXBQTlE2c1FuS29wUEllcldjOERLY3hkN3JzQmNGM1VK?=
=?utf-8?B?dDJWbWh5SmdhQXlpc0dVeTRNd1VyL2NDZnFKdlVXam9na0RaRk1WaEhwclRv?=
=?utf-8?B?Z2RHWTVIWVdHU3pKRnJPTXl2SXVPSDdmL29nVytEcjlJRm02TktQb3hMRFBv?=
=?utf-8?B?TEhkblcyT0N2VkxPRHZOamUzSFF1UzhuZUQwMjRQaHZCLytyZm93aHhLTFh6?=
=?utf-8?B?NU4yUy9qVXZ2Z2JmQzUzamhNdmZEYlFCTFJ0emozZW9seXRSQzJLSmRuNUNa?=
=?utf-8?B?WEJWODdiWTRQdGJIcGVzbGxLM005bGFXbElwWkFmUmRVMGlId1A5SDRBR1NF?=
=?utf-8?B?TThWQlE1cUYwTmZZS2Rlb3dSaEUrZGNQWFUrQ1Y0Rk5NajhYUVJ4L1QxS0hk?=
=?utf-8?B?R0VKYWF0L21Rb3oxNmhDNkR0Z1hkeHd4SGZxOFNOUHFPelZhOWY5aWlIK0dC?=
=?utf-8?B?TE5Uc0dwaDZ3cTVYcFRvTjZ3c1d5anpSYkZUbzlLTXZtR040YWIxTysvbmxs?=
=?utf-8?B?THJmRjJJbnR6YUFiSUI3ZGp6N3FIa1RxMks4YlpNVWxNdk9qc3Q5YStXT1ZS?=
=?utf-8?B?RHdpVjlGNGZtWWJNTndyVUV3SUIwRDBNQnlKMXovMzJlajl0Q1BGZnZ2RDJX?=
=?utf-8?B?ZkdoRjZpR2xidDJrQ2p2dGw4eXMrNDh2clZDRlIxYVMwdDN0RlhVNDRHQnpM?=
=?utf-8?B?ekpLL0kvMDRYZGxxUVVIMERjZ2dNVVA5VXRJMWxmRzN2ZGdKa1VaUUdselJ1?=
=?utf-8?B?RVlWSGlQOTFaVDQyKzJOUUcwTkdoOUJqRkxqdVR1L0Z4a1BFZnNyc0FKc2Fi?=
=?utf-8?B?TWRVVWNmNXZQMy8ySXUyNE1TSitDbVNITnh3TEo0ZG9HZExLTW5Ea3IxYlBN?=
=?utf-8?B?OVpKZjdGUmhabCthQVZMSnpYejgydGNWSVpyRHhVMlFzQ3V5dWUrRmd0dG05?=
=?utf-8?B?bHlYRUxlckV4TE5zc0dnZ3piekQxbFJMU29vUlJtbC9FazBLaFVoQTJQRDQr?=
=?utf-8?B?UEdza3MvTHd3RmFveVNPVVBBRjV2Z3QyWVJZTXlSVWhlT0ZNU0xicTR3QTNE?=
=?utf-8?Q?hbuQrzo9l1A=3D?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ2PR12MB8784.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(7416014)(1800799024)(10070799003)(366016);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?utf-8?B?SUpQeTV1dWtHRHFhZm5PVXV1dVpQMGx3QU9HZklzaHVONW96RHVZRVJ6dUFI?=
=?utf-8?B?TG01UVJYQktJYjUrdmhFRmZ5Uk1iY0VNRG5jaVFXVEtuQ2ZkZjVqb2tpYWlP?=
=?utf-8?B?VUMxSnd0QXAzQW0xak5RQ01tYkxzR0owSm1DYUZhaTZDbkt5N1B4NHpjQWZk?=
=?utf-8?B?S1VNeTJYd0x0eVR0TDM3TG1UajdxV3hodmE2YVBOeWI1WHZmV2FhRmt3Ymo2?=
=?utf-8?B?SDErc1VCVUtrbWtDcGw0TmNsSDk2Wk9zN0xMa0l0bjBCRDhhQnQ1Z2ZVb3hj?=
=?utf-8?B?ZTBLQjVDck5YdUQ5ZWdzNkZKUExPU1BzK2grVHJmWHRwM0lWeTZINzBLdDNs?=
=?utf-8?B?V2NlMCt3RWVqOWgzbXhOVFFwUnY5b2ZicW9VOGtxTENFQXlaUVBpcUJUSEJn?=
=?utf-8?B?eGF2Uk5pSDZFc1ZyZFpuSExlNlhodzJKYnNoQzNUS0h6MmNZekdFenA5eDhx?=
=?utf-8?B?Y1BqdTA5RE84SnRHMzNzMVozM0pPTSs4WndoNGwwaFZ3aUhDRHZKcWpsWEta?=
=?utf-8?B?ZEVLMC9CbzBET0dOaWdra2dYTXh5NkxKaU5IM041ZzBJNVc1RnBySjRwek9G?=
=?utf-8?B?VzNDMk5YdHdsaDF5cFkzNVZ4aWIzdCtJTVNVMDcxaGZOQldFN2F6cC9tT3F2?=
=?utf-8?B?V1Z6anlZajhaODk5VnNvZDdjRDF1Q2ZGbEhOUWltM0RVcG9HZFBGQmZ6RGtM?=
=?utf-8?B?bzdaZ2JqNUhyZGFNSDlyQWpibUt3TGlNRUdocFBsVTNDY0NIU1RGNHlkeElw?=
=?utf-8?B?a3JMT0hUUDB4bnF2andiSUIxLzAwb2NkUWkyWitGZEswYTR5b0NldmkzV1dW?=
=?utf-8?B?anJSR0VuR1diNG1PVjcvekxkRzlJVnFKZnZYVkFVUmxuaTFGbGZodVB6UXlC?=
=?utf-8?B?c2xRbWtXWDY5K0hFTXlRRDRNNitoaTFBZDNUZWdkbzUyL1g5NjJuZlp0anV6?=
=?utf-8?B?YUIwSWp0bHNSNi9KTmlRU2JzMzY0dkIvQWFubFNhK1JuWk15Y0puM1pzRUtj?=
=?utf-8?B?SjZIbnRQb0tjK3FjejM1MWc4ZThkNU1aQTN0ZzVGbFdxRDEwTk1peFlUS1hY?=
=?utf-8?B?MVJaZEtzL2hFS0dFSHFxSDBlUXIxaG5sVlVORUJSandPVytDSkhka2RkSnBF?=
=?utf-8?B?S08vNVQ4ZHcrSSt4azU0Mk10TzUrUTBTbkhTNUwveER6VmtZWDhSREFpZUgr?=
=?utf-8?B?MXo4bHB2MVl5bnkvcU1uVnVCN29ZYjNKQW8zMDdLTE5KaUVuQzVXak5ZaGF3?=
=?utf-8?B?ZGVwMlRacDhLRGdwTGVMcDNwd0ZMMkY3TG9kNzVVN3JWWUdKa3JVelptNFVu?=
=?utf-8?B?SXhYNitTSnp3VUpJZm1RV0pCaGJPRFFLVUp1eVY4WG1aaHNHRlQxSW16Lzgr?=
=?utf-8?B?bnJmZE1jRTJBaW5haFhBbDVRRGpLUklhdDY5Y1RURUdLQ21ybEh5RmpxRXpz?=
=?utf-8?B?V3I1WTVyR2ZsK1U2ZzZTckJjZjhEMGpJTmhsQnl4UnZsVUpkN3FPWS9aOHpO?=
=?utf-8?B?RG1vSytjSXVpelFPQmNLS2dpS2V1MkZwZ09iQk1tazJiVUo0d1lwZ09TUGFQ?=
=?utf-8?B?S2xLQmRmbk5yVG9UMVVBQjZtekt0R0xhbXR2R3AvdUpkVE1rSG5IMk9HSmNo?=
=?utf-8?B?em9HZkU3MFhwTE8vUlZ1eXJYTzJFQnVVTmxHdURDSUhhUXFtNlZHWS9PaHpQ?=
=?utf-8?B?UU9ZZzhUMUE4bDgwR0h0NkViWGdTQnl0eGtldE9zRVlnc01oTGFWZmxjdTgr?=
=?utf-8?B?ekdkOTUxYnBQcDJmOTFnQ3lyQThDR0t3Q2tPSkhyMUloZk50NjgyWEhOS0JB?=
=?utf-8?B?MU9neUtLOVRGaU9TYk5RMlR2aU9MckNWZ2k1blpuTVQwWHNrUytiVU5IUGFH?=
=?utf-8?B?YmJ6L2RmN0VwTm15Yzlnam5KdktWT3NRMWxBZ3kwRE13UGEyN1RCRmNHMzBH?=
=?utf-8?B?cy9tVE40RktCRXZVc2NnbXpHNGwxYVpiRXBsdXBiaCtmL3Y1b2RoZTRRcytt?=
=?utf-8?B?VGVkVEcwbUcydHZidlJwNlhyWDZNUnhSVkVyQkpYVGZjekZ2RnhSWkpQSDhB?=
=?utf-8?B?Q3VkRVg5WTRMcTRwbU5nZk5VRFNMbGVKaXFvTnorNVJrRFJPK2JjVnBZZ0Mr?=
=?utf-8?B?dC9iRlltN25PZ2R6bHpCODloZ2VxMEMyOWp1R2d4eFdUTEsrZmMxZ0JjVit1?=
=?utf-8?Q?uYVO7ewo8VAJ81Fe3Ub3xZRVBcmqUha13OzwV1S096xF?=
X-OriginatorOrg: Nvidia.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 5b0a06a8-b122-420a-f4e2-08dda351c807
X-MS-Exchange-CrossTenant-AuthSource: SJ2PR12MB8784.namprd12.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 10:23:00.2845
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: HYms0MwUIp945tOdonSaEzWETfYSzgwPJQeWnq2/47uHxGqSx3XDw4KLtcTolmJq+lhtyBs6crD/ohsHmz8qSg==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB6416
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 04/06/2025 11:19, Greg Kroah-Hartman wrote:
On Wed, Jun 04, 2025 at 10:57:29AM +0100, Jon Hunter wrote:
Hi Greg,
On 04/06/2025 10:41, Jon Hunter wrote:
On Mon, 02 Jun 2025 15:47:17 +0200, Greg Kroah-Hartman wrote:
This is the start of the stable review cycle for the 6.12.32 release.
There are 55 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Wed, 04 Jun 2025 13:42:20 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.12.32-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.12.y
and the diffstat can be found below.
thanks,
greg k-h
Failures detected for Tegra ...
Test results for stable-v6.12:
10 builds: 10 pass, 0 fail
28 boots: 28 pass, 0 fail
116 tests: 115 pass, 1 fail
Linux version: 6.12.32-rc1-gce2ebbe0294c
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra186-p3509-0000+p3636-0001, tegra194-p2972-0000,
tegra194-p3509-0000+p3668-0000, tegra20-ventana,
tegra210-p2371-2180, tegra210-p3450-0000,
tegra30-cardhu-a04
Test failures: tegra186-p2771-0000: pm-system-suspend.sh
I have been looking at this and this appears to be an intermittent failure
that has crept in. Bisect is point to the following change which landed in
v6.12.31 and we did not catch it ...
# first bad commit: [d95fdee2253e612216e72f29c65b92ec42d254eb] cpufreq:
tegra186: Share policy per cluster
I have tested v6.15 which has this change and I don't see the same issue
there. I have also tested v6.6.y because this was backported to the various
stable branches and I don't see any problems there. Only v6.12.y appears to
be impacted which is odd (although this test only runs on v6.6+ kernels for
this board). However, the testing is conclusive that this change is a
problem for v6.12.y.
So I think we do need to revert the above change for v6.12.y but I am not
sure if it makes sense to revert for earlier stable branches too?
Yes, let's revert it for the older ones as well as it would look odd,
and our tools might notice that we had "skipped" a stable release tree.
Can you send the revert or do you need us to?
I can no problem. Do you need a revert for each stable branch or just
one email with the commit to revert for each stable branch?
Jon
--
nvpublic
Return-Path: <linux-kernel+bounces-673077-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 81F0F41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:23:48 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id C6B6818969B1
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:23:43 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id C5D6728DB41;
Wed, 4 Jun 2025 10:23:13 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LZs6XMtk"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0F6C91D7E4A;
Wed, 4 Jun 2025 10:23:12 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749032593; cv=none; b=Xvoveh4QYtzLAt1dUWfzfvHzg3DLhg2DIuqFFVL7wxcTjc2chl4JcfUthlrH7F1yNgKYK3Dshbe1gN+uGfRXQNZbMQkjkeWln52LeTRslULa1lJXMegMPrQv+w3UJkALd2LCjr3hU4XhKyyRyyRuz9MPX2tx7eeQU6YJpCqD9ns=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749032593; c=relaxed/simple;
bh=IsZt5w6RNpSLAPXJ4G5EuYXatQFaY7xih6awDDId0ns=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=Ua63+6+/S+O2SSqNUcVdc2hQ1L0HJ6GWs5QSES5VUwT1SJ86knimnBTtFt+QTUcW+eX6FT1xm9WX6ECtV1NuK39bbE12U+9cjPIIt0YvcwQ3tziIoCGFv2nPklqrk65gp3lKONtXLUhATY91fgkaOK0x0v6ysVe5kYCE+VdNpo4=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LZs6XMtk; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 180C4C4CEF0;
Wed, 4 Jun 2025 10:23:07 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749032592;
bh=IsZt5w6RNpSLAPXJ4G5EuYXatQFaY7xih6awDDId0ns=;
h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
b=LZs6XMtkTpWknLrbNMU2qVWSTB1LLd2aXLOfCV25H+8gfPhhVMl9OxupmmvlwR4ZW
saXtJxodZpnDExgUfzyHpo70AnH9xZ0V4XLkcR5ahWWBP+3hEc6ew5Pdok1Tyfu8L2
nrKV8/NhBwDCnZ+FoLUQSlZK/uhkzCufVFO4SjlBe0pcdbfX0A2UQX9oHpkNHypb9V
UetIRQqyXSd0rtz79LUkxXFM5gCcobA+45lxNOAjRl57+XRZ7BYyZcppcbIDv8dWui
D3jkB/cNP8Cqc8Yc4SjB4n9Vzc2Jz3Iwwt+6qHWJ3Ml3znlDwS5Uo55ldzP7NGp9Lr
qGoEQCEilSS6Q==
Date: Wed, 4 Jun 2025 12:23:05 +0200
From: Danilo Krummrich <dakr@xxxxxxxxxx>
To: Alexandre Courbot <acourbot@xxxxxxxxxx>
Cc: Miguel Ojeda <ojeda@xxxxxxxxxx>, Alex Gaynor <alex.gaynor@xxxxxxxxx>,
Boqun Feng <boqun.feng@xxxxxxxxx>, Gary Guo <gary@xxxxxxxxxxx>,
=?iso-8859-1?Q?Bj=F6rn?= Roy Baron <bjorn3_gh@xxxxxxxxxxxxxx>,
Benno Lossin <benno.lossin@xxxxxxxxx>,
Andreas Hindborg <a.hindborg@xxxxxxxxxx>,
Alice Ryhl <aliceryhl@xxxxxxxxxx>, Trevor Gross <tmgross@xxxxxxxxx>,
David Airlie <airlied@xxxxxxxxx>, Simona Vetter <simona@xxxxxxxx>,
Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>,
Maxime Ripard <mripard@xxxxxxxxxx>,
Thomas Zimmermann <tzimmermann@xxxxxxx>,
John Hubbard <jhubbard@xxxxxxxxxx>, Ben Skeggs <bskeggs@xxxxxxxxxx>,
Joel Fernandes <joelagnelf@xxxxxxxxxx>,
Timur Tabi <ttabi@xxxxxxxxxx>, Alistair Popple <apopple@xxxxxxxxxx>,
linux-kernel@xxxxxxxxxxxxxxx, rust-for-linux@xxxxxxxxxxxxxxx,
nouveau@xxxxxxxxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx
Subject: Re: [PATCH v4 17/20] gpu: nova-core: compute layout of the FRTS
region
Message-ID: <aEAeibsMAdlmIfch@cassiopeiae>
References: <20250521-nova-frts-v4-0-05dfd4f39479@xxxxxxxxxx>
<20250521-nova-frts-v4-17-05dfd4f39479@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20250521-nova-frts-v4-17-05dfd4f39479@xxxxxxxxxx>
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, May 21, 2025 at 03:45:12PM +0900, Alexandre Courbot wrote:
+impl Chipset {
+ /// Returns the HAL corresponding to this chipset.
+ pub(super) fn get_fb_fal(self) -> &'static dyn FbHal {
Please don't use the 'get' prefix here.
Also, I feel like it's a bit random to have this on Chipset. I think the
standalone function to create a HAL was fine. (Same for falcon/hal.rs, where I
missed this.)
Return-Path: <linux-kernel+bounces-673078-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 52D3241E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:24:21 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 5886B1896408
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:24:15 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 9DDB228D837;
Wed, 4 Jun 2025 10:23:50 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="O0na44ib"
Received: from fout-b8-smtp.messagingengine.com (fout-b8-smtp.messagingengine.com [202.12.124.151])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id D0615227574;
Wed, 4 Jun 2025 10:23:46 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.151
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749032629; cv=none; b=uJHY/dxI/Y5+MqRk77eoljuk5o4bGj458kPz9xeDb3EN88l9ZlLzoZHhf5Ozv4su/q/fK63W7WATekz2F220blDu9WltgDX8ej2TuC/28HJfY6hXofKa4DQ+JTds6SruvQ+7Dx8UoUT30qmV/BhRakKo9Q1iZduzlhmWgSa2a8U=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749032629; c=relaxed/simple;
bh=QxNSTDXCGJOmWNBGEOkx78UPdyo2nZYaQ3Fb7w+/lws=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=rergP1k9pjbquP9MYUxsReO7Ei8p3vxfVkh18k3XKrbngwfMIfHBdLTCqoDWUp0y9iVOH53EVAEUW8Nr2abukrWxvkwAhRcgCdlqxSJlz9p9RZl0x10zbn4ezlILxsPJ5agbHw4V1Wt1gse/hW45EIN1yk4ru46fEl5i18s8mNA=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=idosch.org; spf=none smtp.mailfrom=idosch.org; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=O0na44ib; arc=none smtp.client-ip=202.12.124.151
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=idosch.org
Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=idosch.org
Received: from phl-compute-06.internal (phl-compute-06.phl.internal [10.202.2.46])
by mailfout.stl.internal (Postfix) with ESMTP id 63D0B1140142;
Wed, 4 Jun 2025 06:23:45 -0400 (EDT)
Received: from phl-mailfrontend-02 ([10.202.2.163])
by phl-compute-06.internal (MEProxy); Wed, 04 Jun 2025 06:23:45 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
messagingengine.com; h=cc:cc:content-transfer-encoding
:content-type:content-type:date:date:feedback-id:feedback-id
:from:from:in-reply-to:in-reply-to:message-id:mime-version
:references:reply-to:subject:subject:to:to:x-me-proxy
:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1749032625; x=
1749119025; bh=HjeA796RFt94HBnou7FcFNxCyD0fs7Jyu9j4FkElU7c=; b=O
0na44ibaSzxf1NrXoE2V5ZGwpoAM7NQVFLd/s/7v32+tw0yKDB2gDPLHUP+4lphu
cMt8WX9k1AZLKcqM/R00DW9zB2KCvA4w6R1IRHDFhXX2/vwoatl+QF89vhbBtLF/
VTYbt5EtNhssgJE/1O2RSySzeZnnfP7f6K/m617vGbgWE8tSnT5omQsWykUIUe1/
Qqw0x39uRTB13imdwOtJfaHgUATAnOJ8nIuWSdxO5eeMv67sPK0nvTr5dDInNze7
a5TAc9w/WDx4cKgoZ7INAl5tqbIozQm8C0UkmQYOXCgU9R43oocnDPlpb8cnejg8
Duh1qmERoqUB+2v0hPvvg==
X-ME-Sender: <xms:sB5AaMpPOmEDLgVz71jxwql8VU--mtfOyHp7m6lb7vdSvP0FyCJcKQ>
<xme:sB5AaCqRscuHMXPJKbYyA33ZUtoXbBI0YoZO5YRUfd2lNA0bCHFlqT4Vnsvnq3eBj
HCzRSSfHOLllLw>
X-ME-Received: <xmr:sB5AaBPjHnkZ0PwzYvhE1mr8YMdHRF3SELzYVdOWERwibwJShz1o3Sk_8QiD>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddugdduleeiucetufdoteggodetrfdotf
fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu
rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh
htshculddquddttddmnecujfgurhepfffhvfevuffkfhggtggugfgjsehtkeertddttdej
necuhfhrohhmpefkughoucfutghhihhmmhgvlhcuoehiughoshgthhesihguohhstghhrd
horhhgqeenucggtffrrghtthgvrhhnpeekgefggefhuedvgeettdegvdeuvdfhudejvddv
jeetledvuedtheehleelhffhudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh
epmhgrihhlfhhrohhmpehiughoshgthhesihguohhstghhrdhorhhgpdhnsggprhgtphht
thhopeduhedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohephigthhgvmhhlrgesnh
hvihguihgrrdgtohhmpdhrtghpthhtohepkhhusggrsehkvghrnhgvlhdrohhrghdprhgt
phhtthhopehtrghrihhqthesnhhvihguihgrrdgtohhmpdhrtghpthhtohepuggrvhgvmh
esuggrvhgvmhhlohhfthdrnhgvthdprhgtphhtthhopehprggsvghnihesrhgvughhrght
rdgtohhmpdhrtghpthhtohepvgguuhhmrgiivghtsehgohhoghhlvgdrtghomhdprhgtph
htthhopegrnhgurhgvfidonhgvthguvghvsehluhhnnhdrtghhpdhrtghpthhtohepshgr
vggvughmsehnvhhiughirgdrtghomhdprhgtphhtthhopehlvghonheskhgvrhhnvghlrd
horhhg
X-ME-Proxy: <xmx:sB5AaD4tkWY5BOzrYbi1ML5dWNcPznC6zqdJDm3zn5mn7SkTiR465g>
<xmx:sB5AaL674c-b4D_wCz4iFJqcQ_Tepap7vKdelTs7RmRWLsO0pmibug>
<xmx:sB5AaDhA2KkOjJQ09X8BqyPk6jTNQ1Lf2EIvcUw8Om4XnaqwUbsVEA>
<xmx:sB5AaF45A9G_7DoLTpVr1Yzeefc-tAO4GqfsfDwL3wuBkd5ViBSZ2g>
<xmx:sR5AaOc4iUAA06aGfHmDHjUf64jxLYEBlVGp5yQh150WFicpvMZ9Z1-i>
Feedback-ID: i494840e7:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
4 Jun 2025 06:23:43 -0400 (EDT)
Date: Wed, 4 Jun 2025 13:23:41 +0300
From: Ido Schimmel <idosch@xxxxxxxxxx>
To: Yael Chemla <ychemla@xxxxxxxxxx>
Cc: Jakub Kicinski <kuba@xxxxxxxxxx>, Tariq Toukan <tariqt@xxxxxxxxxx>,
"David S. Miller" <davem@xxxxxxxxxxxxx>,
Paolo Abeni <pabeni@xxxxxxxxxx>, Eric Dumazet <edumazet@xxxxxxxxxx>,
Andrew Lunn <andrew+netdev@xxxxxxx>,
Saeed Mahameed <saeedm@xxxxxxxxxx>,
Leon Romanovsky <leon@xxxxxxxxxx>, netdev@xxxxxxxxxxxxxxx,
linux-rdma@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
Moshe Shemesh <moshe@xxxxxxxxxx>, Mark Bloch <mbloch@xxxxxxxxxx>,
Gal Pressman <gal@xxxxxxxxxx>
Subject: Re: [PATCH net-next 2/2] net/mlx5e: Log error messages when extack
is not present
Message-ID: <aEAerYw-5p8S4bHq@shredder>
References: <1748173652-1377161-1-git-send-email-tariqt@xxxxxxxxxx>
<1748173652-1377161-3-git-send-email-tariqt@xxxxxxxxxx>
<20250527174955.594f3617@xxxxxxxxxx>
<2c0f4a69-dd90-4822-9981-faa90f7a58a6@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <2c0f4a69-dd90-4822-9981-faa90f7a58a6@xxxxxxxxxx>
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 12:01:05AM +0300, Yael Chemla wrote:
Ethtool APIs: While Netlink support was introduced around versions
5.6–5.8, many LTS distributions (e.g., Ubuntu 20.04, CentOS 7) still
ship with older userspace ethtool utilities that rely on ioctl for
certain operations. In these ioctl-based paths, the extack pointer
passed down to the driver may legitimately be NULL.
[...]
If a narrower scope is preferred, I can revise the patch to include only
the ethtool-related changes, which were the primary motivation behind
this work.
FWIW, there is a netlink extack tracepoint that is always triggered from
NL_SET_ERR_MSG(). Example:
ethtool$ ./configure --disable-netlink &> /dev/null
ethtool$ make -j14 &> /dev/null
# echo "10 1" > /sys/bus/netdevsim/new_device
# echo 1 > /sys/kernel/tracing/events/netlink/netlink_extack/enable
# cat /sys/kernel/tracing/trace_pipe &
[1] 390
# ./ethtool --set-ring eni10np1 rx 1
ethtool-413 [008] ..... 80.588053: netlink_extack: msg=netdevsim: testing123
Used this dummy patch:
diff --git a/drivers/net/netdevsim/ethtool.c b/drivers/net/netdevsim/ethtool.c
index 4d191a3293c7..38022e8e1f37 100644
--- a/drivers/net/netdevsim/ethtool.c
+++ b/drivers/net/netdevsim/ethtool.c
@@ -85,6 +85,7 @@ static int nsim_set_ringparam(struct net_device *dev,
{
struct netdevsim *ns = netdev_priv(dev);
+ NL_SET_ERR_MSG_MOD(extack, "testing123");
ns->ethtool.ring.rx_pending = ring->rx_pending;
ns->ethtool.ring.rx_jumbo_pending = ring->rx_jumbo_pending;
ns->ethtool.ring.rx_mini_pending = ring->rx_mini_pending;
Return-Path: <linux-kernel+bounces-673079-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 4102441E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:24:57 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 1A6881897193
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:24:32 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 1339B28CF62;
Wed, 4 Jun 2025 10:24:12 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="uSV2UJw/"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 422AE223DC1;
Wed, 4 Jun 2025 10:24:10 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749032651; cv=none; b=pvnmswse2M1kZNwxNZ1l+0cGkIZ9klUWb7iQW8W9CtbHSAhPXB4cQTNU+fSHJ5zkeflgjtMUwOir/jUMNfrousw48KJoxOHi1LHZHm+kBpUyg2Dd4NG040eZG8Z9fLRbUgvDHH+orSWtpkOLnoS93mvVOCqkH8W8eH3LxmB5NFM=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749032651; c=relaxed/simple;
bh=CkA7t5JHKnLC81OTeJgx+nWLwzFbh3oMj2svLeegIBI=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=AXMGN6YcX0Gd1M+JYwMhLiy/E7FrqHEgT2QDmTEorle3RzRIoJYV2o3iNXnSWHKoMA8sa514hmYTg4RR/pKTNEGUnbegNKsIg7AAXH0GznnTQtaeHTwgjaAWrAK8EvKA5TmDtcIeylqRm+UFDgrhneRogs8UkGbBkw+tpjiVIz8=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uSV2UJw/; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6737C4CEE7;
Wed, 4 Jun 2025 10:24:05 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749032650;
bh=CkA7t5JHKnLC81OTeJgx+nWLwzFbh3oMj2svLeegIBI=;
h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
b=uSV2UJw/i73iytoNxBk5Iq4aWiF3a/acB6XUW19B7KG1PXEN5f6k5B2Ze3TM0qCDo
4VDjEqfa30L+LZx9eKuMQ7l1S61c9UDyfF6+jDaATvRlem3OHYhVNwWfFKOpGO1rYk
T/ddZxpTCRY2C1NI5YwvkfVom5CPEBCjXNMoRqcTHtTs9zfgMQ9LQug8BJ7mNF9pm8
mWUsU24tydD9GKZb4+5cD4y208fFnLyOnqObAK3XPzSgMB3Mm1boem0vcxnZONCRc7
43nKuL9JjINnDmWe2KF79z1QsNZXYLy6SV2qdxPxWloUtUPwvACeDhsQYxmjnDEzqm
e6jHQ/4+4wcuQ==
Date: Wed, 4 Jun 2025 12:24:03 +0200
From: Danilo Krummrich <dakr@xxxxxxxxxx>
To: Alexandre Courbot <acourbot@xxxxxxxxxx>
Cc: Lyude Paul <lyude@xxxxxxxxxx>, Miguel Ojeda <ojeda@xxxxxxxxxx>,
Alex Gaynor <alex.gaynor@xxxxxxxxx>,
Boqun Feng <boqun.feng@xxxxxxxxx>, Gary Guo <gary@xxxxxxxxxxx>,
=?iso-8859-1?Q?Bj=F6rn?= Roy Baron <bjorn3_gh@xxxxxxxxxxxxxx>,
Benno Lossin <benno.lossin@xxxxxxxxx>,
Andreas Hindborg <a.hindborg@xxxxxxxxxx>,
Alice Ryhl <aliceryhl@xxxxxxxxxx>, Trevor Gross <tmgross@xxxxxxxxx>,
David Airlie <airlied@xxxxxxxxx>, Simona Vetter <simona@xxxxxxxx>,
Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>,
Maxime Ripard <mripard@xxxxxxxxxx>,
Thomas Zimmermann <tzimmermann@xxxxxxx>,
John Hubbard <jhubbard@xxxxxxxxxx>, Ben Skeggs <bskeggs@xxxxxxxxxx>,
Joel Fernandes <joelagnelf@xxxxxxxxxx>,
Timur Tabi <ttabi@xxxxxxxxxx>, Alistair Popple <apopple@xxxxxxxxxx>,
linux-kernel@xxxxxxxxxxxxxxx, rust-for-linux@xxxxxxxxxxxxxxx,
nouveau@xxxxxxxxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx
Subject: Re: [PATCH v4 17/20] gpu: nova-core: compute layout of the FRTS
region
Message-ID: <aEAew5aBnfSqXFdT@cassiopeiae>
References: <20250521-nova-frts-v4-0-05dfd4f39479@xxxxxxxxxx>
<20250521-nova-frts-v4-17-05dfd4f39479@xxxxxxxxxx>
<632966ba8231e8f3c20350b217b225301280cdd3.camel@xxxxxxxxxx>
<DADGJZGG5PXE.170H96D26HIN6@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <DADGJZGG5PXE.170H96D26HIN6@xxxxxxxxxx>
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 01:18:37PM +0900, Alexandre Courbot wrote:
On Wed Jun 4, 2025 at 6:14 AM JST, Lyude Paul wrote:
> On Wed, 2025-05-21 at 15:45 +0900, Alexandre Courbot wrote:
>> + const NV_PRAMIN_SIZE: u64 = 0x100000;
>
> Don't leave those size constants out, they're getting lonely :C
Not quite sure where I should put these; they are not used (for now)
anywhere else, so the relevant scope is not obvious to me. Any
suggestion?
I assume Lyude means that you should use SZ_1M here. :)
Return-Path: <linux-kernel+bounces-673080-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 823AC41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:25:29 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 18D79188F4B2
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:25:40 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id A37B428B50A;
Wed, 4 Jun 2025 10:25:18 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OBjigJuM"
Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8F0C6223DC1;
Wed, 4 Jun 2025 10:25:16 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.171
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749032718; cv=none; b=a910ksE/hxe4IKmRrbuiPF3Y8C8eeVwK46KJCv1WbqKsmuOS5OXZB+6BgE+KVoEi6IjX0fTukP8ldSj2x9Em1jJ4bwjXZR2i36w/89ouzHm0XRLdShT0ORNhsDvr7MsLIdDAtKvpDUXP2VQWTDtfX9wzTTLXHDDNyLVIAgdT6GE=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749032718; c=relaxed/simple;
bh=BNG3k2EZnzx3U0v7bx3XO6iS4R70EkPOxvqtIZ8NH5A=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=dUVyLjBQQ9OB0iJzbukF7+BPYETVVZ/Bxv5byYLFFwgJfjODqzjR/QI0iWzfPvE0d4/PUlmV7fimyPfYRXtCM5b7/j8t9TWiJ92AEO6q0HNHwCEDgfQpJKHl/c132xQWENCBj8woH7GwVd14uJ3v+00sNZVMlKscUkuC/COOe8E=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=OBjigJuM; arc=none smtp.client-ip=209.85.215.171
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
Received: by mail-pg1-f171.google.com with SMTP id 41be03b00d2f7-b2f0dc1424aso1058791a12.0;
Wed, 04 Jun 2025 03:25:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1749032716; x=1749637516; darn=vger.kernel.org;
h=in-reply-to:content-disposition:mime-version:references:message-id
:subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to;
bh=QBZorERfZGVAeB4b9MQwohizAQ7RVji7qJz8RExp9pY=;
b=OBjigJuM+TBFoL14Ls2dFluDiRsB9lpB0stdbpVE3O+KLi43qwAJf6+SkFLqf8wtrh
z4E8Hrp2utOJPa6ZcPc3szHkwmUchc+rJXlKKIMfh2IxF+l/xXSFulGcXHql4cZ9801d
T2eJJoP9gW6iP8ADUWbKs6re3YFt3QMI988YxodWoMBM/5WKZ/cCcXXrrVCkvXmSUUn7
VP/8NC9MAH21irCgftqeFgCa7dkugQcmr8l5TxyzpiHBgB6MCtwrFHikujFDU9WXQAnp
frav6voCNGHfKf3fLdAq5DLdNDib+IceOfOBegVPZkaWnNWXjzOFf6FtIiSgraVcxN5G
7xGw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749032716; x=1749637516;
h=in-reply-to:content-disposition:mime-version:references:message-id
:subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to;
bh=QBZorERfZGVAeB4b9MQwohizAQ7RVji7qJz8RExp9pY=;
b=pm/1KrGB/h9ESD+J88lHyVzUPBxPte3JkkM+RkExvnfauF6gOB/A3fu03BaatkjdwC
sGvAvQclJ1f/oLnG/cq5GQrnikin8IxlF2LhxVTBWo7yvOtstVZO5uNXzboDgbOfsZN/
hkeqjoMe2EFtQOs6a/QEOuGPYGur2mJ60ZTjhc94Hqk8Z/C/gcrzbvZgPPFYOyyCZS1B
1RkClGSfw0qz4d0F592l16urYUDSmR/HsQNt//lSfJhz/HHg5oKkaTH+3qHpjPtVkTRc
+jndPa8BVwPmJd7FQGE1PcHddYulnlrMtJ51ReTXFGLe0aXsMx3sfwM/Pam6I0R4mJsx
7JCg==
X-Forwarded-Encrypted: i=1; AJvYcCUWTLexuRBaIreLohn9I0vD3DcnifIAbEl3ni3LpXXGMBFCKbEtMnF2x1cFcOLQKRNZIeDChQNX/pKL@xxxxxxxxxxxxxxx, AJvYcCW24ioTtwjPRHwn8tsQUvi9QZWyRUua3gL5nI0xD5vGkZPmdV7j5VOcjA0nkCuds6eSAE/XZIDqFRkapfc=@vger.kernel.org
X-Gm-Message-State: AOJu0Yy9id+wA9qn7Wb9QeAoFoUuhjaotJhoEUYwrhdS5Zx10x8yJNNQ
WjLrxpdxYH724mhIU7IhGICBQ28K2RdTt0pdlnBFmWuDWaPnuANBPL1z
X-Gm-Gg: ASbGncsVnX5MUGbvBz+IqYRMhiMkcKeoqmYff8Zc8r/yutjES7lPQCAeMg6eFd0WlqC
on8iQKqjyc0T2pSWDH0wrXrCyJmlHjTjACC7BK+v7ZOvF4r6eLa/N0RjUkyYPCpDmXelIiq3RGo
zlzj8NOffh9MuxzXkOWRZbQVbmmvl0CIT0utvyLo7O7Fo/wMAP10rED9DlJwUk/ocw5+4nrYOau
PpU6Uq+oRP0cC02vvLgtNrxNdIbqrhOvUp/TS7KJ0KrspNwZS8CKddC3+sWC1Glu7iZxBkogolw
n71Ji7kbu6NmKEtCP1X8YyQdRctjFldZJgw+bIOmv0dOGG5g
X-Google-Smtp-Source: AGHT+IEKyQ32HiyWlJskTxRYL8AQnVG4qWWHt6Qqr3ywr5giPCq3wD9L9VKOqjgiM8Sod4EwUE2ZGQ==
X-Received: by 2002:a17:90b:38c4:b0:312:959:dc45 with SMTP id 98e67ed59e1d1-3130cca4fdbmr3399852a91.3.1749032715722;
Wed, 04 Jun 2025 03:25:15 -0700 (PDT)
Received: from geday ([2804:7f2:800b:7b3::dead:c001])
by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3124e2c2fa3sm9473906a91.19.2025.06.04.03.25.12
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 03:25:15 -0700 (PDT)
Date: Wed, 4 Jun 2025 07:25:09 -0300
From: Geraldo Nascimento <geraldogabriel@xxxxxxxxx>
To: Christian Hewitt <christianshewitt@xxxxxxxxx>
Cc: linux-rockchip@xxxxxxxxxxxxxxxxxxx,
Hugh Cole-Baker <sigmaris@xxxxxxxxx>,
Shawn Lin <shawn.lin@xxxxxxxxxxxxxx>,
Lorenzo Pieralisi <lpieralisi@xxxxxxxxxx>,
Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= <kw@xxxxxxxxx>,
Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>,
Rob Herring <robh@xxxxxxxxxx>, Bjorn Helgaas <bhelgaas@xxxxxxxxxx>,
Heiko Stuebner <heiko@xxxxxxxxx>, linux-pci@xxxxxxxxxxxxxxx,
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
Subject: Re: [RFC PATCH 1/2] PCI: rockchip-host: Retry link training on
failure without PERST#
Message-ID: <aEAfBc3gsVTmkCyE@geday>
References: <aEAOiO_YIqWH9frQ@geday>
<317943F7-8658-436D-9E3C-05CB6404F122@xxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <317943F7-8658-436D-9E3C-05CB6404F122@xxxxxxxxx>
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 02:20:20PM +0400, Christian Hewitt wrote:
I think you have me confused with another Christian (or auto-complete
scored a new victim). Sadly I have no clue about PCI and not a lot of
knowledge on RK3399 matters :)
CH.
Hi Christian,
I did not confuse you. I thought your work with LibreElec partially
involved getting the ol' hand dirty with RK3399 patches. But if it's not
the case, I'll drop you from future Cc: on this subject.
Thanks!
Geraldo Nascimento
Return-Path: <linux-kernel+bounces-673081-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 2319741E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:25:54 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 151891896475
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:26:05 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 26F0928D83E;
Wed, 4 Jun 2025 10:25:40 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="UgEQxibD"
Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 73B4F225A20;
Wed, 4 Jun 2025 10:25:37 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749032739; cv=none; b=CrDaWmnd7lul8Q/SqkoCnMrIKfd9mzzSYLlwbh+wac/a7iI6jSKNMHMfTJ92lhWgUQehXCtvLY+b8SgxIetJfv1uFbPRxin81FbIAEJmohYQ/vPWRD5Cu8CTddzaNk9Tqg5Y1C8lBKq+ar8ofMuICtPyXdh/OeccCflqtCpkU6A=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749032739; c=relaxed/simple;
bh=xL+N//WjnuF0hOc7kdx62x8VitK0nxlNLXcupQQspzk=;
h=From:Date:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=Uq7VxX2PbNJzLSUV3w68iBA5N6H1DyTUQcnwqWqgfNG7Sxohq7eG5Wa5P9zpkQczLJRr7esFepLR0vZ30QwYAt/wcu4OwBPQsKN63/xMtRWK6k9v2KV6AOACJUM7Bhe5XJgIBlJklzm29PVTD4OX0rwJTD5jmGxeDou4Rx+0Cig=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=UgEQxibD; arc=none smtp.client-ip=209.85.128.50
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-450d37d4699so33335885e9.0;
Wed, 04 Jun 2025 03:25:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1749032736; x=1749637536; darn=vger.kernel.org;
h=in-reply-to:content-transfer-encoding:content-disposition
:mime-version:references:message-id:subject:cc:to:date:from:from:to
:cc:subject:date:message-id:reply-to;
bh=yyzqZAFPiecVZ8v3jVi3mxvHGnKj1UzTNsDM6WLqpOU=;
b=UgEQxibDLapiBdm/1/HNLLsNesRLx6vy5kwALtzTbYFIHi2YnvD25d6wbzEephiEIo
yC0e7EOzhEuFhyC8modzDTH4/G+of8Pxd99EPd4SA+BSbo/xtIYxzr5Lxi3sb8E0fOoJ
lnl/WQ6QKhMuLtGPenczeQbk6BnQnnvb51kYuPQ+HWrpYmVBx4rfLlLMDfaZdcZ2qxwX
ugQ3S0z6pUERMIAFk0nPNeQSRqqN0r3LHkmPybQ24kSRinneRvV/xktk8w1YPdCEzXM4
t1L/V3V3qorK53JJ/b8yJDxZyWB73ZP57bLmuyC20ad9T8VOQ8z3zAIpxhgWwr7CTrPO
sDtw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749032736; x=1749637536;
h=in-reply-to:content-transfer-encoding:content-disposition
:mime-version:references:message-id:subject:cc:to:date:from
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=yyzqZAFPiecVZ8v3jVi3mxvHGnKj1UzTNsDM6WLqpOU=;
b=BDz3BmoLoK6xPvTry9AcFabRIItehJBHHLNN1qTA85D8/vegtrH6G8Ig26m5VpX/80
MpniZfDkcj6/RxV4jOKD/YAvel+tIpYL2nD8gIYjZug6UyG9Oq1ZFRBSp/VxTIP2E2R/
mL80NePLEEmWNffrpJIxwry0oKhnV625QxW6ZIS56mEU181GUJF8LQ5vDg05Q7P08vx1
8byi5F6nq7VncbBD1/yZdEIvJhBrmCpepSqDDSs/On/L7GC9E17iU1vuJqakx+2gd9zh
pqNISXp2pMCrrSM+PWQsKbBk/YXhQMMYPAcinHQfb0vUdsWwP8Pvuyw2t1YsDSE/FWmX
k2gA==
X-Forwarded-Encrypted: i=1; AJvYcCVC7hgsDC4TneJnh79UYKWxjNy/yXQsH3rV6PMlXl8U3qbIK5MgskECycXEL4fDo2usFj0PVvVX+nxoKzXRdz9F2Q==@vger.kernel.org, AJvYcCX5vwG03Hds8c8LJQqC/IB7vh0PdyuXYyX1Qd7dgyC2wU2k+aHKvK2kukoh+lvPIZVCA74=@vger.kernel.org, AJvYcCXttMm+C8a45D5WjLm7yviM23/skBnIMnszms4ujXplbrB3j6/GULhALEX7x0tJv291G7iTMUjsSJpAWEYB@xxxxxxxxxxxxxxx
X-Gm-Message-State: AOJu0Yy+RI0/lFSnc5OJECfDzWnDlDwsLfhDQXZsdEYOKT2glJlCWMLO
1oC7Ebr7ZUJITsrRIQapYa2dAT1akOYstyPYptt+jNowhxKMNBpsOXgtoSZazOQyKzop7w==
X-Gm-Gg: ASbGncs4U5XXWjYJaIMZODpcZ13G9pL3c6jNWu7ruZh3xRVg7eUaBot9kMi8M6foEn3
GOUjumnsnu1kg+BV4ZqS0v42c6h2WvxF/sx1qqmmUz8ARjcK7FfIsVQnh6cgLgT/fZ98Zzyx4Z2
4hjUibA1arTXlXJBvBiNuaP/lrPeAV49y5b2yigUFqLA3Ohsm9Ys5BcoqYny+4aVeDGwEo56CTC
CJkkijIqcBB7/356gKLxM92Kuo0NoCmtuuwN+l1FNsQbdCSjE8zFH8AQj/Pd0Q45OAGUVinyXFx
yXAok9EBYIeJYJVR5YXEcRedyTVHCx1cppNDG4s=
X-Google-Smtp-Source: AGHT+IFymM6noBC/NQKxn6oL2pO5mt03fzXdx6wOmLhOIQ4wn2u93ARJ20EQbs1qQuX1oAkAWNMMWw==
X-Received: by 2002:a05:600c:609b:b0:43c:f616:f08 with SMTP id 5b1f17b1804b1-451f0f247b4mr19281225e9.8.1749032735577;
Wed, 04 Jun 2025 03:25:35 -0700 (PDT)
Received: from krava ([176.74.159.170])
by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a4efe5b849sm21424103f8f.14.2025.06.04.03.25.34
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 03:25:35 -0700 (PDT)
From: Jiri Olsa <olsajiri@xxxxxxxxx>
X-Google-Original-From: Jiri Olsa <jolsa@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 12:25:33 +0200
To: Howard Chu <howardchu95@xxxxxxxxx>, Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx>, acme@xxxxxxxxxx,
mingo@xxxxxxxxxx, mark.rutland@xxxxxxx,
alexander.shishkin@xxxxxxxxxxxxxxx, irogers@xxxxxxxxxx,
adrian.hunter@xxxxxxxxx, peterz@xxxxxxxxxxxxx,
kan.liang@xxxxxxxxxxxxxxx, linux-perf-users@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, Song Liu <song@xxxxxxxxxx>,
bpf@xxxxxxxxxxxxxxx, Alexei Starovoitov <ast@xxxxxxxxxx>,
Daniel Borkmann <daniel@xxxxxxxxxxxxx>,
Andrii Nakryiko <andrii@xxxxxxxxxx>,
Steven Rostedt <rostedt@xxxxxxxxxxx>
Subject: Re: [RFC PATCH v1] perf trace: Mitigate failures in parallel perf
trace instances
Message-ID: <aEAfHYLEyc7xGy7E@krava>
References: <20250529065537.529937-1-howardchu95@xxxxxxxxx>
<aDpBTLoeOJ3NAw_-@xxxxxxxxxx>
<CAH0uvojGoLX6mpK9wA1cw-EO-y_fUmdndAU8eZ1pa70Lc_rvvw@xxxxxxxxxxxxxx>
<20250602181743.1c3dabea@xxxxxxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <20250602181743.1c3dabea@xxxxxxxxxxxxxxxxxx>
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Mon, Jun 02, 2025 at 06:17:43PM -0400, Steven Rostedt wrote:
On Fri, 30 May 2025 17:00:38 -0700
Howard Chu <howardchu95@xxxxxxxxx> wrote:
> Hello Namhyung,
>
> On Fri, May 30, 2025 at 4:37 PM Namhyung Kim <namhyung@xxxxxxxxxx> wrote:
> >
> > Hello,
> >
> > (Adding tracing folks)
>
> (That's so convenient wow)
Shouldn't the BPF folks be more relevant. I don't see any of the tracing
code involved here.
>
> >
> > On Wed, May 28, 2025 at 11:55:36PM -0700, Howard Chu wrote:
> > > perf trace utilizes the tracepoint utility, the only filter in perf
> > > trace is a filter on syscall type. For example, if perf traces only
> > > openat, then it filters all the other syscalls, such as readlinkat,
> > > readv, etc.
> > >
> > > This filtering is flawed. Consider this case: two perf trace
> > > instances are running at the same time, trace instance A tracing
> > > readlinkat, trace instance B tracing openat. When an openat syscall
> > > enters, it triggers both BPF programs (sys_enter) in both perf trace
> > > instances, these kernel functions will be executed:
> > >
> > > perf_syscall_enter
> > > perf_call_bpf_enter
> > > trace_call_bpf
This is in bpf_trace.c (BPF related, not tracing related).
-- Steve
> > > bpf_prog_run_array
> > >
> > > In bpf_prog_run_array:
> > > ~~~
> > > while ((prog = READ_ONCE(item->prog))) {
> > > run_ctx.bpf_cookie = item->bpf_cookie;
> > > ret &= run_prog(prog, ctx);
> > > item++;
> > > }
> > > ~~~
> > >
> > > I'm not a BPF expert, but by tinkering I found that if one of the BPF
> > > programs returns 0, there will be no tracepoint sample. That is,
> > >
> > > (Is there a sample?) = ProgRetA & ProgRetB & ProgRetC
> > >
> > > Where ProgRetA is the return value of one of the BPF programs in the BPF
> > > program array.
> > >
> > > Go back to the case, when two perf trace instances are tracing two
> > > different syscalls, again, A is tracing readlinkat, B is tracing openat,
> > > when an openat syscall enters, it triggers the sys_enter program in
> > > instance A, call it ProgA, and the sys_enter program in instance B,
> > > ProgB, now ProgA will return 0 because ProgA cares about readlinkat only,
> > > even though ProgB returns 1; (Is there a sample?) = ProgRetA (0) &
> > > ProgRetB (1) = 0. So there won't be a tracepoint sample in B's output,
> > > when there really should be one.
> >
> > Sounds like a bug. I think it should run bpf programs attached to the
> > current perf_event only. Isn't it the case for tracepoint + perf + bpf?
>
> I really can't answer that question.
bpf programs for tracepoint are executed before the perf event specific
check/trigger in perf_trace_run_bpf_submit
bpf programs array is part of struct trace_event_call so it's global per
tracepoint, not per perf event
IIRC perf trace needs the perf event sample and the bpf program is there
to do the filter and some other related stuff?
if that's the case I wonder we could switch bpf_prog_run_array logic
to be permissive like below, and perhaps make that as tracepoint specific
change, because bpf_prog_run_array is used in other place
or make it somehow configurable.. otherwise I fear that might break existing
use cases.. FWIW bpf ci tests [1] survived the change below
jirka
[1] https://github.com/kernel-patches/bpf/pull/9044
---
diff --git a/include/linux/bpf.h b/include/linux/bpf.h
index 5b25d278409b..4ca8afe0217c 100644
--- a/include/linux/bpf.h
+++ b/include/linux/bpf.h
@@ -2218,12 +2218,12 @@ bpf_prog_run_array(const struct bpf_prog_array *array,
const struct bpf_prog *prog;
struct bpf_run_ctx *old_run_ctx;
struct bpf_trace_run_ctx run_ctx;
- u32 ret = 1;
+ u32 ret = 0;
RCU_LOCKDEP_WARN(!rcu_read_lock_held(), "no rcu lock held");
if (unlikely(!array))
- return ret;
+ return 1;
run_ctx.is_uprobe = false;
@@ -2232,7 +2232,7 @@ bpf_prog_run_array(const struct bpf_prog_array *array,
item = &array->items[0];
while ((prog = READ_ONCE(item->prog))) {
run_ctx.bpf_cookie = item->bpf_cookie;
- ret &= run_prog(prog, ctx);
+ ret |= run_prog(prog, ctx);
item++;
}
bpf_reset_run_ctx(old_run_ctx);
Return-Path: <linux-kernel+bounces-673082-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 2908941E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:29:01 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 362D51772F4
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:29:02 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 24B5728D837;
Wed, 4 Jun 2025 10:28:53 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qP9yIi1G"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 65A572153EA;
Wed, 4 Jun 2025 10:28:51 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749032932; cv=none; b=f5X8+ZFmp+X5DD5xkj+7vAkLkXw0PD/rrbvI3jCCvwiLgEBVPhovZlH0RZothG40S8ORgOmCVv5J9CKALPjKZ7UOI8uisP0YeM0MAdF6hjm/WS2PhozcweZMjRctJowGW9AAQtfGvYKbpc4kAw3eQNAtYum1GQrp7AFk4cOakrk=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749032932; c=relaxed/simple;
bh=JBl2S2HcUiHa7eTyy0mmRlKPLkijJl96CchvkFqMJNc=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=XkzwAuBLtkl+RQ6qUWU6St+IGScdzz3Tm9wUVpvZEicdEnULd4cV92ZU4KTjmq00WFmz7QuAaX4z+8J21nAQRX4BI4SAadi7AQVysb/lQ0kuNONGyS1u9IG/MaCIe6MIWD12skWgg2iEBUOYZ4UGf0FtjhT0bKyHqZm3F40UuQI=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qP9yIi1G; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 401EFC4CEE7;
Wed, 4 Jun 2025 10:28:47 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749032931;
bh=JBl2S2HcUiHa7eTyy0mmRlKPLkijJl96CchvkFqMJNc=;
h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
b=qP9yIi1GWziSK+VEJTpm1vEyrBxdG0uppVJAd6frmyrfEEZs2s5ba3u9NsSupTlTw
DztOcoXc8EjQM0TDdtKR1jrVryh2iiC/To4hlWR9VuGAIFk2WrfJYI/YEApkELqkSN
/oms3NVAgEpR2Hnr9jYOi5HUvxcJiaEPktU+qL/quWemrVQKOeMZExJhiCLHrmpqoK
mtpwUXM2kpVPamsZ+tdNlIM7qIBYb/VI9J4j/uk7jZyr9C6ujVg6oM5MT3ThPMqn/7
1yZ0kl9lccbciDhbRaTaw0sndq+0UyUJyHXf7mu7RTHxo32jxQv3ba2Poyru3o9bSt
fMx2pRB0wAEbg==
Date: Wed, 4 Jun 2025 12:28:44 +0200
From: Danilo Krummrich <dakr@xxxxxxxxxx>
To: Alexandre Courbot <acourbot@xxxxxxxxxx>
Cc: Miguel Ojeda <ojeda@xxxxxxxxxx>, Alex Gaynor <alex.gaynor@xxxxxxxxx>,
Boqun Feng <boqun.feng@xxxxxxxxx>, Gary Guo <gary@xxxxxxxxxxx>,
=?iso-8859-1?Q?Bj=F6rn?= Roy Baron <bjorn3_gh@xxxxxxxxxxxxxx>,
Benno Lossin <benno.lossin@xxxxxxxxx>,
Andreas Hindborg <a.hindborg@xxxxxxxxxx>,
Alice Ryhl <aliceryhl@xxxxxxxxxx>, Trevor Gross <tmgross@xxxxxxxxx>,
David Airlie <airlied@xxxxxxxxx>, Simona Vetter <simona@xxxxxxxx>,
Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>,
Maxime Ripard <mripard@xxxxxxxxxx>,
Thomas Zimmermann <tzimmermann@xxxxxxx>,
John Hubbard <jhubbard@xxxxxxxxxx>, Ben Skeggs <bskeggs@xxxxxxxxxx>,
Joel Fernandes <joelagnelf@xxxxxxxxxx>,
Timur Tabi <ttabi@xxxxxxxxxx>, Alistair Popple <apopple@xxxxxxxxxx>,
linux-kernel@xxxxxxxxxxxxxxx, rust-for-linux@xxxxxxxxxxxxxxx,
nouveau@xxxxxxxxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx
Subject: Re: [PATCH v4 18/20] gpu: nova-core: add types for patching firmware
binaries
Message-ID: <aEAf3GUUz5oxnuk9@cassiopeiae>
References: <20250521-nova-frts-v4-0-05dfd4f39479@xxxxxxxxxx>
<20250521-nova-frts-v4-18-05dfd4f39479@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20250521-nova-frts-v4-18-05dfd4f39479@xxxxxxxxxx>
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, May 21, 2025 at 03:45:13PM +0900, Alexandre Courbot wrote:
+/// A [`DmaObject`] containing a specific microcode ready to be loaded into a falcon.
+///
+/// This is module-local and meant for sub-modules to use internally.
+struct FirmwareDmaObject<F: FalconFirmware>(DmaObject, PhantomData<F>);
+
+/// Trait for signatures to be patched directly into a given firmware.
+///
+/// This is module-local and meant for sub-modules to use internally.
+trait FirmwareSignature<F: FalconFirmware>: AsRef<[u8]> {}
+
+#[expect(unused)]
+impl<F: FalconFirmware> FirmwareDmaObject<F> {
+ /// Creates a new `UcodeDmaObject` containing `data`.
+ fn new(dev: &device::Device<device::Bound>, data: &[u8]) -> Result<Self> {
+ DmaObject::from_data(dev, data).map(|dmaobj| Self(dmaobj, PhantomData))
+ }
+
+ /// Patches the firmware at offset `sig_base_img` with `signature`.
+ fn patch_signature<S: FirmwareSignature<F>>(
+ &mut self,
+ signature: &S,
+ sig_base_img: usize,
+ ) -> Result<()> {
+ let signature_bytes = signature.as_ref();
+ if sig_base_img + signature_bytes.len() > self.0.size() {
+ return Err(EINVAL);
+ }
+
+ // SAFETY: we are the only user of this object, so there cannot be any race.
+ let dst = unsafe { self.0.start_ptr_mut().add(sig_base_img) };
+
+ // SAFETY: `signature` and `dst` are valid, properly aligned, and do not overlap.
+ unsafe {
+ core::ptr::copy_nonoverlapping(signature_bytes.as_ptr(), dst, signature_bytes.len())
+ };
+
+ Ok(())
+ }
+}
If we can't patch them when the object is created, i.e. in
FirmwareDmaObject::new(), I think we should take self by value in
FirmwareDmaObject::patch_signature() and return a SignedFirmwareDmaObject (which
can just be a transparent wrapper) instead in order to let the type system prove
that we did not forget to call patch_signature().
Return-Path: <linux-kernel+bounces-673083-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 7CBA041E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:29:50 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id EC0501898709
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:29:52 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id D956528DB50;
Wed, 4 Jun 2025 10:29:32 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=aladdin.ru header.i=@aladdin.ru header.b="vz6lJEDI"
Received: from mail-out.aladdin-rd.ru (mail-out.aladdin-rd.ru [91.199.251.16])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 946CB2153EA;
Wed, 4 Jun 2025 10:29:25 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.199.251.16
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749032972; cv=none; b=fFtAimAwJZ+KPVdiYBcGYL2w0j75Vo6P64dqEamDizcyCU5KitaOBL8imyOrb8lvsNXp2TAs2fRWtylraDfjnOVYvFbKdJYLXkk1HIFbRWPKZ9DXhnrlDlhm5yZBH33QH7L9LvqraziqpNHuU/GhuNlwFJE3DyuWmWNLyHMAb2I=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749032972; c=relaxed/simple;
bh=K0KH87Eqmp0gY8TpGdW3mtysyP6xVb0gwpGfKjIWs7k=;
h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=uTB15avj9JSlSlfq03npLfdxr6x4nl+yf7ex5Ye3cIvcaWEedkjrkMF5ulkRASgBmAReXqqtutoN8gvqLyx/UgORKpWjBJgZl7S7UvNIwDTnZmgvwz+DUiMxh72wYdnV85DovfuK4sHGOZ0udLc32vsEMMXDR/1Vd65m7ZqKWDw=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=aladdin.ru; spf=pass smtp.mailfrom=aladdin.ru; dkim=pass (2048-bit key) header.d=aladdin.ru header.i=@aladdin.ru header.b=vz6lJEDI; arc=none smtp.client-ip=91.199.251.16
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=aladdin.ru
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aladdin.ru
DKIM-Signature: v=1; a=rsa-sha256; d=aladdin.ru; s=mail; c=simple/simple;
t=1749032043; h=from:subject:to:date:message-id;
bh=K0KH87Eqmp0gY8TpGdW3mtysyP6xVb0gwpGfKjIWs7k=;
b=vz6lJEDITQM61yQXqmdMenRaQvSX3SrS+iGH9t/NNNPxlBXwjYd92l0sEhHP/aMOFEFQtN2MPJE
VLiWbh124z2HFn3U7vyy/sGQjUwyQTtPTAw/Kt7Ijy+fJ5UY0SVwWb5Z7tOAY6TJh1QsuKKYv86P8
D6o7IppyT4xGGLakYNPHkBKguUJqA7euPRGwT13UnK3yAosdwYfPm4+vW+M630sGu9jkrO8Ipoxqq
GcvIuPzRh+IQfRcT0i065Q4C4P8iHDTY2c9dK0jVVh9tWn8T2Jpez8aC4LiCzYeCARGKjgZ+89GdQ
ENAN0VwovpvOQmPOVuO+IOW7DrYfxoPMDUNw==
From: Daniil Dulov <d.dulov@xxxxxxxxxx>
To: Johannes Berg <johannes.berg@xxxxxxxxx>
CC: Daniil Dulov <d.dulov@xxxxxxxxxx>, Kees Cook <kees@xxxxxxxxxx>, "Emmanuel
Grumbach" <emmanuel.grumbach@xxxxxxxxx>, Miri Korenblit
<miriam.rachel.korenblit@xxxxxxxxx>, "John W. Linville"
<linville@xxxxxxxxxxxxx>, Daniel Drake <dsd@xxxxxxxxxx>,
<linux-wireless@xxxxxxxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>,
<lvc-project@xxxxxxxxxxxxxxxx>
Subject: [PATCH] wifi: zd1211rw: Fix potential data race in zd_mac_tx_to_dev()
Date: Wed, 4 Jun 2025 13:13:56 +0300
Message-ID: <20250604101356.6292-1-d.dulov@xxxxxxxxxx>
X-Mailer: git-send-email 2.34.1
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain
X-ClientProxiedBy: EXCH-2016-03.aladdin.ru (192.168.1.103) To
EXCH-2016-01.aladdin.ru (192.168.1.101)
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
There is a potential data race in zd_mac_tx_to_dev(). For example, it is
possible for filter_ack() to clear the ack_wait_queue right after
zd_mac_tx_to_dev() checks that queue has more than 50 elements, but before
it dequeues any skb. This results in skb_dequeue() returns NULL and the
pointer is dereferenced in zd_mac_tx_status().
In order to avoid potential data races and leading dereference of a NULL
pointer, acquire the queue lock before any work with the queue is done and
replace all skb_* calls with their lockless version.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 459c51ad6e1f ("zd1211rw: port to mac80211")
Signed-off-by: Daniil Dulov <d.dulov@xxxxxxxxxx>
---
drivers/net/wireless/zydas/zd1211rw/zd_mac.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/zydas/zd1211rw/zd_mac.c b/drivers/net/wireless/zydas/zd1211rw/zd_mac.c
index 9653dbaac3c0..e7e0d1b7b9ab 100644
--- a/drivers/net/wireless/zydas/zd1211rw/zd_mac.c
+++ b/drivers/net/wireless/zydas/zd1211rw/zd_mac.c
@@ -568,6 +568,7 @@ void zd_mac_tx_to_dev(struct sk_buff *skb, int error)
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
struct ieee80211_hw *hw = info->rate_driver_data[0];
struct zd_mac *mac = zd_hw_mac(hw);
+ unsigned long flags;
ieee80211_tx_info_clear_status(info);
@@ -581,13 +582,17 @@ void zd_mac_tx_to_dev(struct sk_buff *skb, int error)
} else {
struct sk_buff_head *q = &mac->ack_wait_queue;
- skb_queue_tail(q, skb);
+ spin_lock_irqsave(&q->lock, flags);
+
+ __skb_queue_tail(q, skb);
while (skb_queue_len(q) > ZD_MAC_MAX_ACK_WAITERS) {
- zd_mac_tx_status(hw, skb_dequeue(q),
+ zd_mac_tx_status(hw, __skb_dequeue(q),
mac->ack_pending ? mac->ack_signal : 0,
NULL);
mac->ack_pending = 0;
}
+
+ spin_unlock_irqrestore(&q->lock, flags);
}
}
--
2.34.1
Return-Path: <linux-kernel+bounces-673084-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 2781441E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:36:39 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 348D217735F
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:36:40 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 8F9C928C2CC;
Wed, 4 Jun 2025 10:36:34 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="MQ/J19+d";
dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="Bc6oGhnB"
Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id BA84D223DEF
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:36:31 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749033393; cv=fail; b=tjJEKnqY4/JMd6khH7PHZtos5m4uEU3ul4r/uSJJK3SiAqSKXKYaRpj2PcLT7ZfxdVLicpVF7YaUDJ8ISAPyITIUtMr36vrVahQONPKVtS6tvPDijQ0/CmESDEvuI121Qn+L7zf/SjLhC7P4DSGHOHWCdJwEWhV0GjgAdVqg3F4=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749033393; c=relaxed/simple;
bh=LMYdMRo6S++QLAt0EgmSItpPvzNtjAh8Q9xVFwyPpV8=;
h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To:
Content-Type:MIME-Version; b=td3NbyrdCE/E5y0qS4nC0tRAJZ6sObTYmwzla7+aYxZDkAZD1mSdusKNh0eOLpoHQJ6sz9dR42DdBBC2M0UzsWpNEc+QkkgqFp8xZ0YjLMbfqi1+SuZfA+lCvjdNt1lmPnP9o3n1Hwy771uQ4YvNI7PhzjC01gIPbGxTlAIzgaE=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=MQ/J19+d; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=Bc6oGhnB; arc=fail smtp.client-ip=205.220.177.32
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com
Received: from pps.filterd (m0246630.ppops.net [127.0.0.1])
by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5549MeVL024854;
Wed, 4 Jun 2025 10:36:30 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc
:content-type:date:from:in-reply-to:message-id:mime-version
:references:subject:to; s=corp-2025-04-25; bh=LMYdMRo6S++QLAt0Eg
mSItpPvzNtjAh8Q9xVFwyPpV8=; b=MQ/J19+drSbeUtF7LovuCql+Wd3ZkTAPR/
9uYG35WLxxBzyZNYetuAKX36mOBHF8Ck+H1ovCkkq7t8N4mhkSMYdkgLxRx6KnGE
CtAIES8kSzpSeYZsexQ+LRLj/6BnfZDbpJtST/uGsFAjPQT+QApQSWeGJZjga/8m
P9oYwk7rEsoIXWlAK4ndCBHiGGS9vy4eWcn4DwHApOXGbmYD0Wzv0GR9KlDVzkse
ZAhfn6Pltp4Yxf8OXV/TWaKuBwRtdHlmCETbq608uIn8HMCIaDizPgtE5E1zvY3I
BnMRbfrLarjttfwn0LoD2V1YhlevGaKjQwSBv8QT2cOT/5h0jBnA==
Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20])
by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 471g8gbpb7-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 04 Jun 2025 10:36:28 +0000 (GMT)
Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1])
by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 5548X0KW030888;
Wed, 4 Jun 2025 10:36:28 GMT
Received: from nam04-mw2-obe.outbound.protection.outlook.com (mail-mw2nam04on2049.outbound.protection.outlook.com [40.107.101.49])
by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 46yr7akfds-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 04 Jun 2025 10:36:28 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=batJCvDlC0Q/ByDMEL+tQ0YJmonPi0BIxwb07G8JtbLdLeXoCM0bhFKVIVwm+oZGEQNX8FuVVQy9laTLSMBY3wkdpYpHBTGNH/Ali4/HN9IZqgOuP4fDB0rFFgLYrkEWlVP3TFPhWDEM1/VKl6kIwAY5zlg821/CIb2wHuKN1nye6xZi7LLZKsXH5wFyGP9Q0a1BJ7O3SkE2VpMomv2M6nzWWCS0wkVgTBnDkW4ECIJX4pTOLjcCnxjR+u2eBwB7XlAV7AkSP9d8xHWDEG/d3+tljGzmAjCHyNM0YtvE/8cu9JqQoRDHbnwplMxRr96GSehwKjCs6iKZs2GQwzP3vA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=LMYdMRo6S++QLAt0EgmSItpPvzNtjAh8Q9xVFwyPpV8=;
b=vYy0o3ir+MVF2qSvv5h+MFJ7YePLCVkr0tKTSH8gjL3qL4YFi94FpqVggE73Gsi4qgxlYEm9QgcIhIRZ6b+FsPeS0a6TR7s1yPS2Vbi4RpFC1W9BXgtZ9V0p628wNtBIUdl2VhYwuzl0DJUjWImYGhUC6c8wXKfG9ZfV62g1IOkFE0pCa4Hd3yKmXpO2VjQBYIMIOBebu0v3tlIkmafPXZ8rmHvq/n3IbCrxCoEAhw+Hb/3wTABn9zw98YgXRK56AeX8lv/gz95JBisi6rmiB8Bo+ESKW5ZDkI15c6yyZHi1ut9glpjJy+OiCmdzCdaQ40+9MMtFxUcBN2MIjWHM8Q==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com;
dkim=pass header.d=oracle.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=LMYdMRo6S++QLAt0EgmSItpPvzNtjAh8Q9xVFwyPpV8=;
b=Bc6oGhnBfM6iry3DoQH+AOoh0qT/Zot5P6da/7E6ETvTMAfXdHuvehNvqXzREukQ5CsRsPQs8dBlmPSWNf7wBdJALhdMsXP91XebcQiRIhIIaOZG4VTmoiUugBWSlLutVlBMXAhxdx+zPssBMsJ80c+QdH4k5V4XeS6mWPPEz94=
Received: from BN0PR10MB5015.namprd10.prod.outlook.com (2603:10b6:408:126::11)
by DM4PR10MB7473.namprd10.prod.outlook.com (2603:10b6:8:18a::10) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8746.40; Wed, 4 Jun
2025 10:36:25 +0000
Received: from BN0PR10MB5015.namprd10.prod.outlook.com
([fe80::f2f4:6196:e18:1b1]) by BN0PR10MB5015.namprd10.prod.outlook.com
([fe80::f2f4:6196:e18:1b1%5]) with mapi id 15.20.8813.018; Wed, 4 Jun 2025
10:36:25 +0000
From: Siddh Raman Pant <siddh.raman.pant@xxxxxxxxxx>
To: "gregkh@xxxxxxxxxxxxxxxxxxx" <gregkh@xxxxxxxxxxxxxxxxxxx>
CC: "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>
Subject: Re: CVE-2025-21991: x86/microcode/AMD: Fix out-of-bounds on systems
with CPU-less NUMA nodes
Thread-Topic: CVE-2025-21991: x86/microcode/AMD: Fix out-of-bounds on systems
with CPU-less NUMA nodes
Thread-Index: AQHb1TyFwMURLZJFqEWiyUCD8lNXIw==
Date: Wed, 4 Jun 2025 10:36:25 +0000
Message-ID: <916e1b593d7dfc8d6286206a6ecc60bdff45a091.camel@xxxxxxxxxx>
References: <2025040257-CVE-2025-21991-6aae@gregkh>
<793ae4a30ab15d0993ce9152ce91b6b98a05b1a5.camel@xxxxxxxxxx>
<2025060430-rimless-splinter-4131@gregkh>
<064d66133dc11a95f7c5aa647784cf9bb3ede1df.camel@xxxxxxxxxx>
<2025060459-diaphragm-display-ba2d@gregkh>
In-Reply-To: <2025060459-diaphragm-display-ba2d@gregkh>
Accept-Language: en-US, en-IN
Content-Language: en-US
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: BN0PR10MB5015:EE_|DM4PR10MB7473:EE_
x-ms-office365-filtering-correlation-id: 7c1cae24-1617-420c-6bc8-08dda353a7fe
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam:
BCL:0;ARA:13230040|1800799024|376014|366016|7053199007|4013099003|4053099003|38070700018;
x-microsoft-antispam-message-info:
=?utf-8?B?V0lYS3pVcEZ1QlFOQW9TMU4zRlZpS0JWV3hJdUFFT1NvWU10L2V5UFJ5RzBQ?=
=?utf-8?B?ekVkdE9LZXNxT2MrS1JTdSt0dUR0OXJGY2NvYzNZRitxeEdOYlRndUJkVVVU?=
=?utf-8?B?anVibkhaR0p1cmRzTzdBREt2TlhVWndZTDFqV2hMU1J6OEZBRW1xV1lPbHFh?=
=?utf-8?B?aWVITkRRVUV2Sm5vTzZSSkNHSmFHR0xJOGpSa3FyTC83ZHgyU2w1SEhQYnJL?=
=?utf-8?B?UmFHSjZnR3hRT1ozWTJBdFBnQnRGUE1kbWpqVGRtcURpS0xCbkFpMkFnVktE?=
=?utf-8?B?VmpZdnpSVFB5UFFoYVRmUnJEa0UvM0cxaGR6QlZPR1g3V3hla1Q0WU9DTDBp?=
=?utf-8?B?TGc3MXlyTm9ML3Q5OXkrMjBGczJ1bVMrbHJNTXA1K0I3bTFEN2FXZmNoWDJE?=
=?utf-8?B?VHU0YmtYeFErQlF2U2UrZG9UY2ZoNUtCelc0MjE2UTNHNXBCQTJ3b2RMUytH?=
=?utf-8?B?c0c4d1k3SGpuTnNDYVNkVTJvY1R3NGc1ck50blMwajZBVlRxV2xPSnZ2NWtN?=
=?utf-8?B?ZDUvcHd5ZEUxR1hoNGg5U2ZuZWpkeTkrNkxPUmUvQmlXQjM1NWJoZDIzZVpS?=
=?utf-8?B?N0szTkRkTmNWQ2trelkvWDNOSWt0SDBkZXY4OGpXdHFrWncyL3NQVEF4bXpq?=
=?utf-8?B?ZjB1MUFVbDlVc3dycnpPcDIvbTNxQUJuUXQwSzc1bUJiR0FWSXhzUHJmbWM3?=
=?utf-8?B?NjgzakU5c1dtcy9OdG56cUhxTXQ5cTJ5YkkzcC9RWmMzaWFmekI0OXF0M2FB?=
=?utf-8?B?UGMvTTYwV3hGQUtXcVBSVUJuRUpxNlVCS29RUHF3UDFYNi9zazlMWU9oSmdn?=
=?utf-8?B?NUJkQW5wY3NIMmZMUGhiVHBlU0gzUURQTGVxTjRtUUFkc2R4M3V4LzhwcGZY?=
=?utf-8?B?OC95dXJWN01VRm9CMGVQZ2pZVTJTMEVxSkpKMHBjY0dMV05tZFBjeVJxYW16?=
=?utf-8?B?K2NCNHZXSEUyY2IrR0lwWSsrZDRaVHl5dkllZFBsTDl6QUp5eTU0T2hubVZ1?=
=?utf-8?B?Wlprd2o4b0xKWGRrTW9IUkpDeTFLN2VOWW1NNHhnUE0zVE1kWHgyUXBHa3gw?=
=?utf-8?B?V3VQdlNSdkZiRmx0cEtnaURBWWVPdkw1Ymp4N3d6UGUxS1BFNzdUc3pjelBo?=
=?utf-8?B?L3FSVUl2MlRWQjJBblBXWmtBTkIrRE1JaWVvbnAzT1B5UUhuSTZxcVBvSFhD?=
=?utf-8?B?NFJERWFwWlNJUm05M1RvcTJldEpKUzFwV0QraFVNY3FsNFpUMmtsU0ZtUEZk?=
=?utf-8?B?aUpIcWZoakg2b2laYXliUDhRbHFyU1IzVndSZXBvRTl2NnFpdTY4bXlnNVJl?=
=?utf-8?B?M01SKzUwMVRqSmI3ZlR4ditkc3RIS0kvMlJCdDl1bXBacjRYRXpndmFSbjYx?=
=?utf-8?B?bWtVQW5HQUhVZzlQOU5WaE5ndkh3WXJXSEgzOXJ2T0NBMUZodFo1RGdyUXM5?=
=?utf-8?B?dzc1UGd0MkRITFBjU3EzTDh0UzUzN21NazlRblAxVjFMVzArcmwyUnpjOXBD?=
=?utf-8?B?eERDTVIxT1c4bkp3Z1NLY0xGU0k4UmU4UFJoNzVNQVJvc25BZnpoc3luQzlp?=
=?utf-8?B?UjB4ZW53KzRUanlFejliRUhyOEs4Wm1LTVlqekI4UnRLVkFxMWMwQ1ZBVFF0?=
=?utf-8?B?dEhRaldrV2drYmxsNkV6U0NlWk9lTGVhQmRaSWR3UXZDQ0ZyL3g3VEI5TUVs?=
=?utf-8?B?T2thcHBqWDdsMUhqSDJwdGtuQ1dOWUxmYmVURUtPZWszb1EvSTAyQ0N1Vm5h?=
=?utf-8?B?NEV0dVlwU1grNkk2WVM0MmJFVWFNbzA4enZkYnZKSkVjM1pDRjZDZDFpdEtw?=
=?utf-8?B?U3pvVTl2RjJLY2M1anRUSmxZTGZ0Q2xwbGVRN3EvVGtKUDdFVmh5SlNpakVL?=
=?utf-8?B?Wk9NY28wWmw2eER2eHNUUWRlYkZocnRnR0VDbWh4UmZ1ekxzUTJrR2JySThT?=
=?utf-8?B?cWxWZHltUlNwN0plbTRuYklGbk9ZaS9SSWJLMUhqUzQzZGJ2K1crWFRvakcw?=
=?utf-8?Q?jFqLXe5rvrzMabAs2DkdZjNJkoST9U=3D?=
x-forefront-antispam-report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN0PR10MB5015.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(376014)(366016)(7053199007)(4013099003)(4053099003)(38070700018);DIR:OUT;SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0:
=?utf-8?B?eUN4QUtLRVF1NTVIUi8zZ1V4cUNraHB4VGplWk80M2VkVjVNUlpuakJtbTY0?=
=?utf-8?B?THVZaE0ycXU4YTMyNkNvMjMzc29RY1IzNTBaSC9RZEM1bWU1a05PeE9hYnM3?=
=?utf-8?B?UlhMeUo4cEhnTWYxeUcxb0MyY25GcGhJcU1kSDRYYUhGdUlVUi9Cc3ZGZEJC?=
=?utf-8?B?eVpOVjFtNEtQcnh6S0Q5N2tZNjZPZjBlV2xRMVNldFF0cEtsbUo5dzhKUHBy?=
=?utf-8?B?SldCVEhmN1dOejZEZmx0L3VDZU9sOUNFOW4xRndkRDBwVGJEZXV1a0Q0RWgx?=
=?utf-8?B?ZE0zejduK201QXZpNTZoRHc4TS94VmJrcmRmVU5OMTltM2hzKzRWdWQvWTlP?=
=?utf-8?B?Q1Azai9FTGhTcnlwUWJoTlVCOWhjTW1UTWRVT2xESFhRdXpoU3pFVE96RS83?=
=?utf-8?B?elM3MmJmNHBmWU91eE05YWh1MWU1SmpnZ3c5Y0dJZEtzMWNRcTM4c0E4c2NU?=
=?utf-8?B?VUpTTVlSWmFpQm95b01ZOSt5bFpleFB1VUJocXA0VEFpTGpyTGRTeFUxSEto?=
=?utf-8?B?SmEwa2h0K0hrNXVjTDVXUkM0M04reHJUdGxKS2tzTWFIc0x5MG8yOWIyQmRN?=
=?utf-8?B?WjBLaVg1QUQzcko0STBobmFYUUFOd1cyRkErUVpqTGNBMXUwM09EcVQxL0RR?=
=?utf-8?B?VWNLdUgwU3U5NFE3VmZ2eHlaWlVlQ05UYmpISS8wZFl2d3NlS29OWHBMek9a?=
=?utf-8?B?REdTMnp4dlQzMXNwcXhBamErQmptNDl1TEVUY1FjRFRmVHVaeW5DMCtIZmRz?=
=?utf-8?B?azdKRUEzMlQwOTY1WnpTK0ZyY2tneTUwZllLL3g1ckNUaUhnK0swbmxaTWQz?=
=?utf-8?B?NVl5SEtGTnB3L0paTlhuR1JOYnRnNURLK2NBVzd0VFUxTW5jVnJwVnJBd3BW?=
=?utf-8?B?akN0SHRGbk1HR29VeEZWR0cyVjdQZ1NLQnF0YkFLU1ZkeG0xVmZrVUs2dE5k?=
=?utf-8?B?bm5kcERrSzlMNFArcHdrL2p6MXA5VDVlWGpKL212THRzUTRqR1JIbU9rUFEx?=
=?utf-8?B?K0lCZHZIQjZjaHVWZHJINzRoMjdvb0xuRVhtR3VZZ0ZvMlJEQWpGdTRoMXlS?=
=?utf-8?B?VE9xakdYLzBuaVJjTGwyYW03TzBySkJIeXNYbEZoZTBiRHE1YzFadlo0R25t?=
=?utf-8?B?QjRnQkVVcjhWZmlpWU5KZ2xHdnZ6aHdVUkRwNWlmZlByQUlYTDdoSW1sNmo4?=
=?utf-8?B?Q2F4NklpMFVmOEpoQk1pY3FRQ3h0L3o5ejgzRjJlSW5mc2hva2JQUTZmZzky?=
=?utf-8?B?aE16bnFEbktFNC90SDJpeHE5SkxiRzQ2eEcxdk13bUpIQVdvekkxb1JmVlRa?=
=?utf-8?B?WFE2c3kzWUExRWFtanBvaVIxdlFNb2dCYjZtVmI0Q3hUVWRpelJKSWhnYjV1?=
=?utf-8?B?bG5BaFFrNjhOWjJ0bUdnVDMzcFo0YTRCRHNkV3Z5dmZ5NUYvZHpvQm45bjhz?=
=?utf-8?B?ZEFSQmZVTnR1V0ErdmVhRUYrVGZ2aWVGNXVaRFJuczIrbVFhTnNBVDFRc0RO?=
=?utf-8?B?REVnRjd0WmdJY1J1LzY4aFE1c1BLeTBSdGI0UGVSdXBCL1MyZXVxNy85aEZK?=
=?utf-8?B?RXY3OWtmekhzaDlMSmxpbzlKSVE3SWtUUjZwTmVYU0JNdFByL3dVc1RKUmZ0?=
=?utf-8?B?MER1dWN4S3k1RU1XWVk4YjRmV2YxU1lFWXBvdTMvb0pHT1Qra0k2c1VIOW9K?=
=?utf-8?B?a1RFUFdBa0JCVGYvcEtSUk9ETGQwOVJCS01LeUhleVlKZGxBSWFHMlA3MGdE?=
=?utf-8?B?d254dmJuVVJGNnpXQUU1RHRrSzIxandINHdaSTZCbXJMYnVDQ09LVFlCUFhi?=
=?utf-8?B?L1VvaXpNVExSQ2JKdExLS1J3THFwa0gvS2lxbEgrMkVpN1RxTnVxZDFIaGtX?=
=?utf-8?B?QStYNVljZzliNHVtQWNyTGlGckFhOXVzTWwydmpnSXN5ZXFyY1llT1VDMEJC?=
=?utf-8?B?bU1zZHpIc1lyM0NHVXhpMmo5bVZXdk9SREkxUnNiZXVibVQ5QkdhdlZZdGlH?=
=?utf-8?B?STZRVC8zZWFjbjZybXV3cVhkaHMzRWpNRURZZkxXMGdOTkp2cFJ5SW5FTkdW?=
=?utf-8?B?VGJvSW9nU09SVVcrTDgvRGNFa0lIVFRBT1JRRG1SUUU4dUsvbys4eWphV3F2?=
=?utf-8?B?bGFFdzRJTk9mZW5jSmxNaEt6RSt6MHJyUkZKdlpqcS9HeEcrVGtJVFRIMzFm?=
=?utf-8?B?TVE9PQ==?=
Content-Type: multipart/signed; micalg=pgp-sha512;
protocol="application/pgp-signature"; boundary="=-s2uX+4JWYnpGe2HP3vMo"
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0:
FbOpXzYN71C4laR9GrU5UIcEdXE6k2iY3S43uiKY2ZKkvMMVkOGYlx92/zTSrEQTz2uEOHsYhwOkQ4DYWWzGWdIsflcli1GO03el7TjAJZ1FOWZRmBuOP5GCahkhIc9XQJAFbx5LTSMNlgRF0HvewM0ChyRfDqWmUUFCYhEgr135DdWbGHt4ecYuR1oaSHcXC0JEWVoh3FGeZBS8z/J2DPMgV7zfPYHimQJtuTBAEOl4GgikGjW1aigDj1rRh/sj7nMmD3W5v/PoTd4BwHNLihmR1lm8SkEiboBUrwKMIKujtf4CW1RrBliviUE+HmFoIgK4OdeO7Vno7rqLB04/oH1GEAw80rL+C9b2G7RSl9np9zaw0MmleSUOnW/WKr/F1p4ookE5pIX+7nJEDjjH2rf6tV1635zXSVnbmCeT/P3urnKNXPgtWwEsuyMCJmhu2q6gKmCJ1OnFTml230TGnr5b4dJOWNYm8zExjapcrLTrjA8R2gvzXlNthSKWxSzbh1MtfQpxcRlDlcES4b2zcYVB9OxXVb8npA2KGYBh0wr0AxhTd5jtsVfkFRItbUJyKP2m3jpDIY/LaLn2O4WhiYWcKeGSKt/awP9DTggsUtY=
X-OriginatorOrg: oracle.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: BN0PR10MB5015.namprd10.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 7c1cae24-1617-420c-6bc8-08dda353a7fe
X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jun 2025 10:36:25.2100
(UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: ry6nGZUhYNY3eBgI7vMAQYHlj//RluZfkon67US9Bhuk/lwSvHB8eok4ot4hxD0nryCx4W5XTkgVYGcTp0L9olaHq3dtRLdrotVcbuvh7Wo=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR10MB7473
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 malwarescore=0
suspectscore=0 phishscore=0 adultscore=0 spamscore=0 mlxlogscore=999
mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1
engine=8.12.0-2505160000 definitions=main-2506040080
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDA4MCBTYWx0ZWRfX8GEA/DobvEwx l6DtpwkyHqTK+U1aC9gumh4MxckqAQAImApTF8Qo9uLtYrIDGvR5tLS0sBCH1WG8ojokiLdGiqq o7LKNyTgMNYgruPmkAw/qcF4tZ7/6O/9U3oi9h2usPRmiucGRSeNcFxf4Ul8OKlF7C+ppEKvEe2
98UkjTHniyc7LeOrI/JNATeDdV9rVTRJu5itIgKQqzgCvEulNnnnRnjmHk5RvIHkPAqQ3Yle/4z WNI9FCXN3gcRbhplr+MoGcuEzw79za2R9uQv/aFVPMNT+it3nwSFsU++DfXTMmQ8XaTE/1KyAos oVayS2HwIk2Hpye3yaKVfO3OuQmToS+oUVF7bGPqzfL1ZXt1j2bM7uSaKNrkVj6xeR7/n3obaIl
4eyTA6qUHo5n2m4eMDV9N59rtHu/Uao3gERK2gZoxta65IKhzSvvqgC2ifAO09+26OChcSl6
X-Proofpoint-GUID: LT88QZCI3J-M-KkijrJKPFTmQWG7LXDm
X-Proofpoint-ORIG-GUID: LT88QZCI3J-M-KkijrJKPFTmQWG7LXDm
X-Authority-Analysis: v=2.4 cv=H5Tbw/Yi c=1 sm=1 tr=0 ts=684021ad b=1 cx=c_pps a=e1sVV491RgrpLwSTMOnk8w==:117 a=e1sVV491RgrpLwSTMOnk8w==:17 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19 a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19
a=xqWC_Br6kY4A:10 a=6IFa9wvqVegA:10 a=GoEa3M9JfhUA:10 a=ag1SF4gXAAAA:8 a=8r2qhXULAAAA:8 a=yyagJoPZJimeaCQgX2EA:9 a=QEXdDO2ut3YA:10 a=_fyKtwIuHVOqWXlmuoQA:9 a=FfaGCDsud1wA:10 a=Yupwre4RP9_Eg_Bd0iYG:22 a=8gvLZcY7Nlvl4CGD_6nf:22 cc=ntf awl=host:14714
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
--=-s2uX+4JWYnpGe2HP3vMo
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
On Wed, Jun 04 2025 at 15:30:54 +0530, gregkh@xxxxxxxxxxxxxxxxxxx
wrote:
On Wed, Jun 04, 2025 at 09:54:55AM +0000, Siddh Raman Pant wrote:
> On Wed, Jun 04 2025 at 14:58:03 +0530, gregkh@xxxxxxxxxxxxxxxxxxx
> wrote:
> > Doesn't "causing corrupted memory when flashing a microcode update" f=
it
> > the cve.org definition of a "vulnerabilty"?
>=20
> This only happens on CPU bring-up so I don't see it getting triggered
> without already being exploited.
=20
If you can get the maintainers/developers involved with this change to
agree, we will be glad to reject this.
Oops, went through it in more detail, you are right.
I should have done my homework better.
Very sorry for the noise,
Siddh
--=-s2uX+4JWYnpGe2HP3vMo
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEQ4+7hHLv3y1dvdaRBwq/MEwk8ioFAmhAIZoACgkQBwq/MEwk
8iodWhAAjJS9KPnFIu1cROyHID4JjRKLeg+V85N9yj+NrmePsWyxJjD7WnkW2zDc
8b11FHrPTqz44As0S61S/ucdWg8t2woLqExOgtrb97zXMVxzpoc/TrwgrW7r5Jfk
TsP3fLdX3MjQhYAEF6pb+iTsHUr8ZUdicElG0SVKJpzhBzA57eRZqcWzm/Se7u2i
Tk0FuEiRwCANhrEQiiu86bmgeOgUBmoBPgejrTv+mopUnKk14rFkWCBsbopJTd/z
mvK8wv0sQrN5qxNNV7bBzYTckpVwYJuOc8xAHNiS0kNWrQATsCf6cqapXRWBHCRy
dcoeEe/BRvskMP8EdDWkOX/AquDulZvrbrM0S+pMluAsGnDxBw0mGQ3MoaL3d9Vn
oegNgKhTUDupJ4t8rORn+9zu1I1PcP4SjrqVWzzSWO9XHhDldfhMEisjmgBOsd9u
C6Ctyov9fRGmscPBkyMyXQo3wG04lCJKKQtftXLH8o2tke5C6sjg9mU1615VumHp
AihfsHIvM1FjWn3onopYHr31Duz0cjUuSmQy0xqCF6HGH+oDm5UgQwEcsKHUUXER
Ztl5dWP1vnCZmmzCrc1pc6/nwBVMPumsJCHLGWndmpyunWRIkFiVGFya9rLEKcuu
K0g3jinzSZqHzSON+V7095g673v4NDDt7FQauH7isXvsCyHDOpo=
=9V/o
-----END PGP SIGNATURE-----
--=-s2uX+4JWYnpGe2HP3vMo--
Return-Path: <linux-kernel+bounces-673085-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id B715E41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:37:04 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 3A2177A7D75
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:35:44 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id DE7F728D8E6;
Wed, 4 Jun 2025 10:36:54 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="hSPWipAf"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id C7978223DEF;
Wed, 4 Jun 2025 10:36:53 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749033414; cv=none; b=JURw2zgVEyC3Dz5SkapXTtc5JlZ4jdehofFwB5d2pStAfwoW08/IavHUZYOAlwI35wG6x4D97uTHRTCynna6I4YRs+uY1GDCYpfAW7fl6ZGuJ8vVA1TW0yWYrUwz+Y5OqUdSIgAuEH2TKNnmRzW8m3o+TPMQicT987eujvDIHfQ=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749033414; c=relaxed/simple;
bh=wfRJznO+iEVV9hKNmfFsf/JeU/L4Kcn9A8u9eRc0S1o=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=IFiB/K3zqpTbM+XLbaXlDqGeO79T0CmH2I+byP8yU1UZlH5sKcKGJhNXHJZ1Hts7mi5QwWnavatbAZtN/eI6W2IleBVXS597GRGfLg6DmB23Nmz4T48DlaHoH7NAab15ipVqInXZkdktk3wVzAwPTqVTPl61NJr7RjhEmUryJtg=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=hSPWipAf; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id DE846C4CEE7;
Wed, 4 Jun 2025 10:36:52 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org;
s=korg; t=1749033413;
bh=wfRJznO+iEVV9hKNmfFsf/JeU/L4Kcn9A8u9eRc0S1o=;
h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
b=hSPWipAfTurWPye4FDGCK29gkbw9vLJsMcZB7kpdC6KGuWpIlnNribc6Nu0KCuSOb
muQNDdOuVWYkrvKcuJxNpjeDwK6jMTvCfB7TxPmPTCWX+mn5dBV7zUAJs7yJE7Jxcn
2A91Tk1hMgxdb63osfcVs0LfLQg0bePHAs60M0k4=
Date: Wed, 4 Jun 2025 12:36:51 +0200
From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
To: Jon Hunter <jonathanh@xxxxxxxxxx>
Cc: patches@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
torvalds@xxxxxxxxxxxxxxxxxxxx, akpm@xxxxxxxxxxxxxxxxxxxx,
linux@xxxxxxxxxxxx, shuah@xxxxxxxxxx, patches@xxxxxxxxxxxx,
lkft-triage@xxxxxxxxxxxxxxxx, pavel@xxxxxxx, f.fainelli@xxxxxxxxx,
sudipm.mukherjee@xxxxxxxxx, srw@xxxxxxxxxxxxxxxx, rwarsow@xxxxxx,
conor@xxxxxxxxxx, hargar@xxxxxxxxxxxxx, broonie@xxxxxxxxxx,
linux-tegra@xxxxxxxxxxxxxxx, stable@xxxxxxxxxxxxxxx,
Aaron Kling <webgeek1234@xxxxxxxxx>
Subject: Re: [PATCH 6.12 00/55] 6.12.32-rc1 review
Message-ID: <2025060419-duchess-rehab-2d6e@gregkh>
References: <20250602134238.271281478@xxxxxxxxxxxxxxxxxxx>
<ff0b4357-e2d4-4d39-aa0e-bb73c59304c1@xxxxxxxxxxxxxxxxxxxxxx>
<bf1dabf7-0337-40e9-8b8e-4e93a0ffd4cc@xxxxxxxxxx>
<2025060413-entrust-unsold-7bfd@gregkh>
<b103ae12-150b-4b89-bc77-86e256dac7bc@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <b103ae12-150b-4b89-bc77-86e256dac7bc@xxxxxxxxxx>
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 11:22:53AM +0100, Jon Hunter wrote:
On 04/06/2025 11:19, Greg Kroah-Hartman wrote:
> On Wed, Jun 04, 2025 at 10:57:29AM +0100, Jon Hunter wrote:
> > Hi Greg,
> >
> > On 04/06/2025 10:41, Jon Hunter wrote:
> > > On Mon, 02 Jun 2025 15:47:17 +0200, Greg Kroah-Hartman wrote:
> > > > This is the start of the stable review cycle for the 6.12.32 release.
> > > > There are 55 patches in this series, all will be posted as a response
> > > > to this one. If anyone has any issues with these being applied, please
> > > > let me know.
> > > >
> > > > Responses should be made by Wed, 04 Jun 2025 13:42:20 +0000.
> > > > Anything received after that time might be too late.
> > > >
> > > > The whole patch series can be found in one patch at:
> > > > https://www.kernel.org/pub/linux/kernel/v6.x/stable-review/patch-6.12.32-rc1.gz
> > > > or in the git tree and branch at:
> > > > git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-6.12.y
> > > > and the diffstat can be found below.
> > > >
> > > > thanks,
> > > >
> > > > greg k-h
> > >
> > > Failures detected for Tegra ...
> > >
> > > Test results for stable-v6.12:
> > > 10 builds: 10 pass, 0 fail
> > > 28 boots: 28 pass, 0 fail
> > > 116 tests: 115 pass, 1 fail
> > >
> > > Linux version: 6.12.32-rc1-gce2ebbe0294c
> > > Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
> > > tegra186-p3509-0000+p3636-0001, tegra194-p2972-0000,
> > > tegra194-p3509-0000+p3668-0000, tegra20-ventana,
> > > tegra210-p2371-2180, tegra210-p3450-0000,
> > > tegra30-cardhu-a04
> > >
> > > Test failures: tegra186-p2771-0000: pm-system-suspend.sh
> >
> >
> > I have been looking at this and this appears to be an intermittent failure
> > that has crept in. Bisect is point to the following change which landed in
> > v6.12.31 and we did not catch it ...
> >
> > # first bad commit: [d95fdee2253e612216e72f29c65b92ec42d254eb] cpufreq:
> > tegra186: Share policy per cluster
> >
> > I have tested v6.15 which has this change and I don't see the same issue
> > there. I have also tested v6.6.y because this was backported to the various
> > stable branches and I don't see any problems there. Only v6.12.y appears to
> > be impacted which is odd (although this test only runs on v6.6+ kernels for
> > this board). However, the testing is conclusive that this change is a
> > problem for v6.12.y.
> >
> > So I think we do need to revert the above change for v6.12.y but I am not
> > sure if it makes sense to revert for earlier stable branches too?
>
> Yes, let's revert it for the older ones as well as it would look odd,
> and our tools might notice that we had "skipped" a stable release tree.
>
> Can you send the revert or do you need us to?
I can no problem. Do you need a revert for each stable branch or just one
email with the commit to revert for each stable branch?
Which ever is easier for you, I can handle the git id "fixups" when
applying them to the different branches if you don't want to have to dig
for them.
thanks,
greg k-h
Return-Path: <linux-kernel+bounces-673086-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 8EB9E41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:39:06 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 59FC47A2912
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:37:46 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 51FB028C5DA;
Wed, 4 Jun 2025 10:38:58 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="Ki2z953O";
dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="Ki2z953O"
Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2054.outbound.protection.outlook.com [40.107.21.54])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 300F03D3B8
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:38:54 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.54
ARC-Seal:i=3; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749033537; cv=fail; b=QOePUl7ibYkpNxEK2LqCKICwh2SV/p3EBZmA3Yrsk+P4tS1Mc/QBBFAC5jnUbYFxKyGCyUEMa2c17mLme9Gmka1WjrXV1+lG5bcDRld+JuFof3JiKa6VR7gUva3ttgamrqa9Qkt61ZUTPMovjeovJd4WlYCmg29FIxhxqRQFKFo=
ARC-Message-Signature:i=3; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749033537; c=relaxed/simple;
bh=tUESY52Mdt/jnTkNZqOmdu71t0uAIUgdzLMs9AGxLdo=;
h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To:
Content-Type:MIME-Version; b=kxstHYB75rEPilo1GxFOSLqt535HnRO3cm2C8JqVgCWRjynKlNDp+wPwU+cdGijW/M9D1IJAnDi/nOj6SEf1fnp9cSyMvMyaeN7bCfzOfk0jCKCEI3V5zTjojSNf125t+Ij364l+ixjc7y8E/k2rKWW7L6N9bdTs7h1S7cDwPLA=
ARC-Authentication-Results:i=3; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=Ki2z953O; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=Ki2z953O; arc=fail smtp.client-ip=40.107.21.54
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com
ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass;
b=JdEvLMCHhVTW5G18zJyuNfadM26d8OZxjX7UKSlhzjlrGjXhCnfm6XKtHNhpEM8B6K+RVwaw42KDhPZCfRgktsEaXchycFuXT6X0gHQF7REMQLqqvmlyYoAuWabdEHlctrLDrCUMAvc0PJHih0iMHCRYCVddGYCa1OLuiJKwf7ViWq4S5rsU/jaXFL4D4oGVMK8quGCJq+cYTnkkJw9QC+J7CpMWQwdonYrTfR8XGoJGDEdNm7bgdDnVK28iI+tRvxBK+08AwF3vhn724PLWejq6jsMO1wDtc/4Fv46OYAfpjco/MT9BAQzntPK1FmA88OmAlaCGPso+ZOqm2bHmWw==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=OJVGKhhOoBBMz6Lfc3F7j9n9ExT0noSInChv9O1rnkc=;
b=UpmT20GyZ+T2T4xoXOtYOB29WifYVCd6LvbSgsf9yAFBPQvQXCf8j2NA1bnp73/EMLh/84uhh49TFXEWPnnsaPS1m5ArkFVOZOyeOLFCMhGsH8+CQYEA6s/tAFr+kyNtYYI6JGNEMUn40ifTelSM1P5tQHeavVjq9t7b3hHqMM2zLCMH3cBAAPTqGWa/Ykrjd8AFpWdFdCRnlzrWapqAnitWipPHX/YBwmufIsZHDBoV/BWRqAYZi8sGK1Uw1UV3Yd1ePni0gEyzwC8E2+By+M00PwNwka7j0tRvDRPYOzfRiwV8eKhEDNCCkeJlB0nZoBsLaiely8VYdPqiwx8nRg==
ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is
4.158.2.129) smtp.rcpttodomain=redhat.com smtp.mailfrom=arm.com; dmarc=pass
(p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass
(signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1
spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com]
dmarc=[1,1,header.from=arm.com])
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=OJVGKhhOoBBMz6Lfc3F7j9n9ExT0noSInChv9O1rnkc=;
b=Ki2z953OViXoJaOsnVAwWSIoVsXGRJ2uKyPf9YH9cfQOR3f3wn3e0u5c/GLE+nhHxT+MobmPw84YGtOS3aWmgfRA2KpYCyD8p5aEOkyZVycv12cxdmYgJ+gYGAw0EIzGJVEZ71FOlOYczJsDUzhWennfVgisU18B346RFMqO5y4=
Received: from AS4P192CA0032.EURP192.PROD.OUTLOOK.COM (2603:10a6:20b:658::15)
by DU0PR08MB8137.eurprd08.prod.outlook.com (2603:10a6:10:3ec::19) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.34; Wed, 4 Jun
2025 10:38:50 +0000
Received: from AM3PEPF0000A78F.eurprd04.prod.outlook.com
(2603:10a6:20b:658:cafe::6a) by AS4P192CA0032.outlook.office365.com
(2603:10a6:20b:658::15) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8792.24 via Frontend Transport; Wed,
4 Jun 2025 10:38:49 +0000
X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 4.158.2.129)
smtp.mailfrom=arm.com; dkim=pass (signature was verified)
header.d=arm.com;dmarc=pass action=none header.from=arm.com;
Received-SPF: Pass (protection.outlook.com: domain of arm.com designates
4.158.2.129 as permitted sender) receiver=protection.outlook.com;
client-ip=4.158.2.129; helo=outbound-uk1.az.dlp.m.darktrace.com; pr=C
Received: from outbound-uk1.az.dlp.m.darktrace.com (4.158.2.129) by
AM3PEPF0000A78F.mail.protection.outlook.com (10.167.16.118) with Microsoft
SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8792.29
via Frontend Transport; Wed, 4 Jun 2025 10:38:48 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=O2AqI1zRD8eT4NGFKOBn2QzQoS3hEtPTAYZ1ByuxrkEM5/24zKwi3BYmtks6I1+ZruTzcoAlYviRIOqOP+Y83NPB/+HvP5j5Y6LBpwrZDFXdmV9gKiYQZXesAdBuBJm6OcWUaJ2+sq+YcVFViyMrydk53+9aRn+NZkuJj3f4zgE7jEMTlKspIQKyvgCQsT45VxhLTYlBrRtDEwTGTLGjyxQOOEQ4LWhVVljvemEDasRLSN85HF1k1EAv3pAD7+hl9UCjnYo+pkH0JR8oKo5KHTLw8v1YxdYFha8puR91xl+/GDFlO1DSfkTyEF5UO1jinaD41TWk1vT3EQ8CGCu95A==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=OJVGKhhOoBBMz6Lfc3F7j9n9ExT0noSInChv9O1rnkc=;
b=A+8/7cjJxaZ5fYNGtiktGVsnX3CdI/jnKL/5m/ZnSsMqOL4l3sqGBt4+zZD+8Vr5dNQ+zu60g0PJRUxr6nIh73mJIsvBdqSYJ2LXOVnI3xXidXv8qJAR/G4CQ6punvEG0lxo1CnHybxQdf9qqo26awCs18wRaTxKdb6tmdEQYVlVx68c5RURQ1htSPOzGgFWnhdz/prB5/cGmp842H/20QTHrNLdVF81xByZHyPdJNdOJ+k7TkRhh5g7T16P0PznQIvnz2TzGC/LcbJQiF2y9pLdsQTpsbRxubphRLd1hY+1ecaG3mWutY0ERc/UP5uYPM+moiZhorVKumgBXXeH+w==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass
header.d=arm.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=OJVGKhhOoBBMz6Lfc3F7j9n9ExT0noSInChv9O1rnkc=;
b=Ki2z953OViXoJaOsnVAwWSIoVsXGRJ2uKyPf9YH9cfQOR3f3wn3e0u5c/GLE+nhHxT+MobmPw84YGtOS3aWmgfRA2KpYCyD8p5aEOkyZVycv12cxdmYgJ+gYGAw0EIzGJVEZ71FOlOYczJsDUzhWennfVgisU18B346RFMqO5y4=
Authentication-Results-Original: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=arm.com;
Received: from AM9PR08MB7120.eurprd08.prod.outlook.com (2603:10a6:20b:3dc::22)
by PR3PR08MB5690.eurprd08.prod.outlook.com (2603:10a6:102:86::21) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8769.37; Wed, 4 Jun
2025 10:38:15 +0000
Received: from AM9PR08MB7120.eurprd08.prod.outlook.com
([fe80::2933:29aa:2693:d12e]) by AM9PR08MB7120.eurprd08.prod.outlook.com
([fe80::2933:29aa:2693:d12e%2]) with mapi id 15.20.8792.033; Wed, 4 Jun 2025
10:38:15 +0000
Message-ID: <92cc1bfb-ab7a-4abc-afd0-49f8f2d12da0@xxxxxxx>
Date: Wed, 4 Jun 2025 16:08:07 +0530
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v3 1/5] mm: Optimize mprotect() by batch-skipping PTEs
To: David Hildenbrand <david@xxxxxxxxxx>, akpm@xxxxxxxxxxxxxxxxxxxx
Cc: ryan.roberts@xxxxxxx, willy@xxxxxxxxxxxxx, linux-mm@xxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, catalin.marinas@xxxxxxx, will@xxxxxxxxxx,
Liam.Howlett@xxxxxxxxxx, lorenzo.stoakes@xxxxxxxxxx, vbabka@xxxxxxx,
jannh@xxxxxxxxxx, anshuman.khandual@xxxxxxx, peterx@xxxxxxxxxx,
joey.gouly@xxxxxxx, ioworker0@xxxxxxxxx, baohua@xxxxxxxxxx,
kevin.brodsky@xxxxxxx, quic_zhenhuah@xxxxxxxxxxx,
christophe.leroy@xxxxxxxxxx, yangyicong@xxxxxxxxxxxxx,
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, hughd@xxxxxxxxxx,
yang@xxxxxxxxxxxxxxxxxxxxxx, ziy@xxxxxxxxxx
References: <20250519074824.42909-1-dev.jain@xxxxxxx>
<20250519074824.42909-2-dev.jain@xxxxxxx>
<912757c0-8a75-4307-a0bd-8755f6135b5a@xxxxxxxxxx>
<76afb4f3-79b5-4126-b408-614bb6202526@xxxxxxx>
<25c0c700-656c-4a8a-8ef1-5093581cf25c@xxxxxxxxxx>
<4f97491c-b0dd-406a-9ddb-4f4424571704@xxxxxxx>
<8c389ee5-f7a4-44f6-a0d6-cc01c3da4d91@xxxxxxxxxx>
Content-Language: en-US
From: Dev Jain <dev.jain@xxxxxxx>
In-Reply-To: <8c389ee5-f7a4-44f6-a0d6-cc01c3da4d91@xxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-ClientProxiedBy: MA0PR01CA0033.INDPRD01.PROD.OUTLOOK.COM
(2603:1096:a01:b8::15) To AM9PR08MB7120.eurprd08.prod.outlook.com
(2603:10a6:20b:3dc::22)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-TrafficTypeDiagnostic:
AM9PR08MB7120:EE_|PR3PR08MB5690:EE_|AM3PEPF0000A78F:EE_|DU0PR08MB8137:EE_
X-MS-Office365-Filtering-Correlation-Id: f8129009-d835-4eda-0902-08dda353fd45
x-checkrecipientrouted: true
NoDisclaimer: true
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam-Untrusted:
BCL:0;ARA:13230040|1800799024|366016|7416014|376014;
X-Microsoft-Antispam-Message-Info-Original:
=?utf-8?B?SUNyVXk4MWlzcWxQNS9Vd2xpREdpYkx6SG5YbnRxeUNQSmNpWm9SajVzTmZC?=
=?utf-8?B?Y0xQdVIzYThheThFbVFyZk1ISzFYOG5iamtQL1dOdGUra0NDRlJVa3RiVjFN?=
=?utf-8?B?YitjNmpKOFZIZ0RVNHE4MjRWSDBXMEVWYnRObUxhalBlZ2E5R2RUT21XL0pJ?=
=?utf-8?B?L21DUFZvY09VM0NyV2VrQUtPbERnM2Q2QXFrT1FiUG9HZm8yYXV5cUQ2YnI0?=
=?utf-8?B?S1hIbHM5UXkrOFpHelU4Z2ZJTVhTT0ppMnFxNVY2ZWNqaFVlOVBwaFNYK2dD?=
=?utf-8?B?WkgrVmNzQk1pWVRiNFphb3dWWjRVY3JoSDR2OFlFdVk1b0ZOSndUNkxFOHRH?=
=?utf-8?B?MldBUTRXR1RrNUVKaGFPMk1FbTFpSGRPSVhFa1JOV2xIa05PRUs1bkcwbGdr?=
=?utf-8?B?UW1ENDlSWWhmMkRMVE5MaVpVZ2tqTU1LcmtwSENFM216U2FZZ0t5RTQ1eTd6?=
=?utf-8?B?L25qTjFwb1FGbHNpdHNJbmRwQWVTNExzU1BEU29kTDVXZlRIR1ZiLzFzempx?=
=?utf-8?B?YVpXL0VrMXFodjJkbTZNQm1ZbmdJeVloWCs4ejllS0pMc0xoa3U1NnBMNjlY?=
=?utf-8?B?VlFyRElXMitmOGhMV2czbXVhcmtWbVB3dlYxOExpV3JUZHJyOEFTT0ZCL2ZL?=
=?utf-8?B?bG9vakZYdG56U3NXMjRrRVZGSnFGVWRhVWtZMkc1aUEvb1hzZ1YxVkNpRUs0?=
=?utf-8?B?Y1ZHSjhhNVRIYzlINGN5Um5ycHJRRHFQd0t5T2lyanMzN1Z1VTJRNTZKaGNx?=
=?utf-8?B?Q3RNbmovSmRybEQ2VUp1d0d6aU1lWGtvRUNrY29CdDJxZ3RtQVlNblA4SmpO?=
=?utf-8?B?TXN5TVNIdlZIK2E0My9vUWl0RmZTMmVBTkEzNmppMXp6RjJQTkJ6ZllucHdq?=
=?utf-8?B?WDByMmZGMVMwblRtMHhHUU8yaEhWVXNPYWtPZ2tqK01rWldDSUk3ejdqTE5N?=
=?utf-8?B?WXpwalROWlQ5bmMyV0xxNDZJSVZIanZlUmF6NHY2bHlGRjM1Vmd5R3AzNER5?=
=?utf-8?B?Qm5PYjA4UTZoVGk4TEUzZWpwRDRVSGVTdEx6ZFI2Z2pGYXI3R3ZkSmpnN1Vo?=
=?utf-8?B?Yi9wdzBlY2hpZStiSHZPcU5GMjRuQU1OZVc4OGVrNFNldUJRcmNEMCs4QXdR?=
=?utf-8?B?alR0SWJNalo3WTJmZUFWbUtoQ0hlN2RzOXdwTFV3UDVwbGpGSlpnWDJMK0RU?=
=?utf-8?B?SGU5U3RtUSs4OHFLc3p5cEUxSFVsSlhQd0NYZGhkYzJFVjQzMDFNdlpnaXkr?=
=?utf-8?B?ZWZVNmcvdEQ1K3o1dm40bU5WK21sM3JoV2QxeUl1bmhmc25KaERDRGszbW5j?=
=?utf-8?B?dWxGSGpaemxBOW92dld5OG10bDkrdDI0blIvTTdZWkZQcDMzV1B1dTJDTVdJ?=
=?utf-8?B?UjBzMzZQZzBmRzcvYWoxRDluYlN0R1VINGRCa3h3dFNIWE4rcjF0Y08rNmY0?=
=?utf-8?B?aGFocFQ1UVN0VWhpa29aVFVIdnJwUlpYQ2hSOFlCVTE3aGdFVHE5dkZUd2Iy?=
=?utf-8?B?MnFiZzNtNnByd2d1SFVBc2l6NnFQdllJbEZpNXAvSUxLVUgyVjV1QjZ1KzNs?=
=?utf-8?B?cGhYRzFmSytVZTh2cXMweTFCTGxzKzkzQnErdWdxTDgweTloRHhNbGs0K2tt?=
=?utf-8?B?KzBUdWZ1UG13WkdhN3ArTzMydkVsL3BKQ2NpTnMwYVJyY3BjMUE0T3Rub3BZ?=
=?utf-8?B?MndQOURxcW5rVk5VUmg3TmFrckdWUUE4aVhaY1UrK1h0SGZYREtRbDVMMzBx?=
=?utf-8?B?N0NKcENmZEVXVkZwaExFTHNEcHlwUEVvemlFUGhWb0M4WTRTQ05MbWZRK20w?=
=?utf-8?B?V1ZUZGwyUTloZ3Vaamp4aGNnaXlpbnVxaGJBNXNGWURhTnRvWjRVK0x6VmpF?=
=?utf-8?B?cUJzSlRSbmVJT1o2bi8vMTVLcUNGbkVhNmxuWHN5RU1uMUQ1YkFSL2Q1WmlJ?=
=?utf-8?Q?I6TTEGnJzZQ=3D?=
X-Forefront-Antispam-Report-Untrusted:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM9PR08MB7120.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(7416014)(376014);DIR:OUT;SFP:1101;
X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR08MB5690
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
AM3PEPF0000A78F.eurprd04.prod.outlook.com
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id-Prvs:
fe3c9fa5-3669-4f6f-f985-08dda353e925
X-Microsoft-Antispam:
BCL:0;ARA:13230040|14060799003|82310400026|1800799024|35042699022|36860700013|7416014|376014;
X-Microsoft-Antispam-Message-Info:
=?utf-8?B?Zmd3UEgza2tFM0xyYm0rY0NMWWEwM1o4bUkzZVZoeUtPN1NBZWgxWFZ4eTBo?=
=?utf-8?B?QWlySkJ3SHIxdDhkdTZaRzI2WnlmSWRheXNFSUtQMzFsNTFzZmxFSTZQaUZT?=
=?utf-8?B?NjdCNUZ0b2x0ZGp6K2toVlV3SlBMdjJrbXAwb0RKa0pUSHRlNFNLd0ZvWVo4?=
=?utf-8?B?SEVkZU80ZFFYOFpLc0hIYTQrcnUxbnZvVXU1NDdibzluR2YydVo5YTRmNTNG?=
=?utf-8?B?T1R3NTF5MEhGRVZsQUV1aUJzaDBONzhZWmFoVEV2UXhIbEd5NVhlRlRuTXpW?=
=?utf-8?B?ckw0RFZRMTdqY0R6bWJ1Z2IrMEpVSG9LaS80U21uaEhZSnpsamlTbG12MDA0?=
=?utf-8?B?RDh3cWU3Nkd5VVV4dkw0T3ZHS3N6QnBIVnNOUVlNdm83NXV4T2lVN00vdHg0?=
=?utf-8?B?a2tocUR6WDlXQm9wSUx0cFlhdDlIaGEvbnFtMGhybDVUZGpVamhYWE9rQjBI?=
=?utf-8?B?dWdvMGtWVFpRamlqS1luelVjRE0xYnJyZndMVmxCVUk1WitubHZKcEduQUJ6?=
=?utf-8?B?VzR1SUZVT1kzcFBLejZHR0NUNUl3TGpXb2VkazJ1QUI0S2tQcW8vTmxHWXFo?=
=?utf-8?B?ZHFnS08rakZHS0xZU3J6Z285SXgyemlESmR4Y09yYzZHcDJOZlhKMmJIUHNh?=
=?utf-8?B?T2d1TkVma2g0WE0yVlVjOENlOUdCUDdGMXMrem1vRThoaEloMUxHbHFXVDBr?=
=?utf-8?B?RUZ3V1Eyck5oN1Yrbi9GN25GYmhtYkl5aEROTFROVXQrV1RsMm9uSXg2Y2hv?=
=?utf-8?B?a29TMXZ3QUdSQTRGRmFiVlRNdm5FVGpubDFUaitoM0xmMDZuV2VPYlFXVXRB?=
=?utf-8?B?YmxLUzR6UHBWZzhhdVJGMkU5WHhBeDBNdC9HZ2JhaVJsUjJ3KzhGZXA2eUVZ?=
=?utf-8?B?c29OYXlqdGJSMDZ3SEw0R0lJWWVpV0laRGlhckJ1RldJdXltTlRLdG5KWU1Y?=
=?utf-8?B?VS9XeVZpNmpCRWt2YlVVd0ZuL0lmWllZZWZiWFlLY01pcXFnMnNZZjduYzdj?=
=?utf-8?B?RnJpUWpwZWk0S0d0Q3k5b25FNWVLQWx0dVdFQkx6SlgxSTdsVHRBUXovQ1p1?=
=?utf-8?B?cHFUR200THl4RUdhSUhJQ0EyK08veEl4SjF6TFZHbmh0cWxvZUpvNFBES1o3?=
=?utf-8?B?TmJ6RWtBU0N6cnVQaUczZFRYaUJiTDFya0FaaUIzaTAwUWtURmlwRnJNU3VE?=
=?utf-8?B?MGFhT2RnVXNyT0dTUzdZcThEdXFjZDg2c0dxS1g2Rm1BNDZiLzRrd3hJdkJr?=
=?utf-8?B?Z01PdUpXUXVHMEpaUXhORVhHRHNyRWpHb1hrNmRDZUJIOXlBM2JhY3lGbDN3?=
=?utf-8?B?UGcwVlhpUTFhZlVjaEw4dkV2NzhqSjREdVE4dVNrSFd2Y3NuU3dBMU85K1Y4?=
=?utf-8?B?MFMrVWZuMDlMWjBqUUs4UVllOEdFQnAxc3pvTUtQSHJkV0RrK0NrSXI4L1cx?=
=?utf-8?B?azlWaDVqUEJMR1daQkdTdFhwWlZpQThJbVErTFdSK2plejJPV3RiaWVzY0Yz?=
=?utf-8?B?SlljWjQ1MEY4VmZMa29Qd3JnN3dWZFdSbG5ReVNWQWNaQWRYQ1RuZUE4eXV3?=
=?utf-8?B?QzZ6cmQvbjlFckl2MFc3TVZxTWtwZ2k1QVFzSTA4RkhoclExWFJZd3ZrUzdQ?=
=?utf-8?B?VlB4UkhEcDBQWDQ4dXZtMTFhcURYTmdFZUpFZFV3SzRzQlNKZkduWDByYkF3?=
=?utf-8?B?Q3NhVDlnUWx2TjF1UFg3c2xBaGVRMHRPWW1WQWZuN1BIT1BYRWJjWWxjNEFk?=
=?utf-8?B?bCs1VEc5QkhTUzhmTXZZRkZHdElweGNycS9neG16Q3lpQUdVR2xkSzROR3lz?=
=?utf-8?B?RzhMV3pwNC9WTEdjYm13M1NaTnRrcndMSG8zSkQvSEpzZG1DRVcrVXh0Mll0?=
=?utf-8?B?SlhzMHg5bGFpRTRwUzFiWTlGME5NTjlJb3pubURvNGJBVTF0VnoyOVBQUktB?=
=?utf-8?B?WDVOSDgvQkJEUDFxUVBGYWVRamxLVWg5MDFFV2k5YVh4cjZwK1ZMMWxlVVM1?=
=?utf-8?B?aWtEcUp4NTNIdzduRm1MRDJwRTRQRlAzTGYvSEs2UnVXWXJ3TGMyTFNDUEVh?=
=?utf-8?Q?IFfyeM?=
X-Forefront-Antispam-Report:
CIP:4.158.2.129;CTRY:GB;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:outbound-uk1.az.dlp.m.darktrace.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(14060799003)(82310400026)(1800799024)(35042699022)(36860700013)(7416014)(376014);DIR:OUT;SFP:1101;
X-OriginatorOrg: arm.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 10:38:48.2296
(UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: f8129009-d835-4eda-0902-08dda353fd45
X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[4.158.2.129];Helo=[outbound-uk1.az.dlp.m.darktrace.com]
X-MS-Exchange-CrossTenant-AuthSource:
AM3PEPF0000A78F.eurprd04.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB8137
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 22/05/25 9:48 pm, David Hildenbrand wrote:
On 22.05.25 09:47, Dev Jain wrote:
On 22/05/25 12:43 pm, David Hildenbrand wrote:
... likely with a better function name,
I want to be able to reuse the folio from vm_normal_folio(), and we
also
need
nr_ptes to know how much to skip, so if there is no objection in
passing
int *nr_ptes,
or struct folio **foliop to this new function, then I'll carry on with
your suggestion :)
Can you quickly prototype what you have in mind and paste it here?
Will make it easier :)
if (prot_numa)
func(vma, addr, oldpte, &nr);
I'd probably return "nr_ptes" and return the folio using a &folio
instead.
That way, you can easily extend the function to return the folio in
the patch where you really need it (not this patch IIUR :) )
Just confirming, you mean to return nr_ptes and get the folio by passing
&folio, and the function parameter will be struct folio **foliop?
Return-Path: <linux-kernel+bounces-673087-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 9314441E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:42:27 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id D9E5B189753D
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:42:40 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 1D1FE28D8C4;
Wed, 4 Jun 2025 10:42:19 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="cuZf38GB"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4F7673D3B8;
Wed, 4 Jun 2025 10:42:16 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749033738; cv=none; b=SlrTCugTtnXUhRcmyAMW9J+6Dclv8SAnAb2TZNQ2VwMLI3UOVPuAVYfCEJsoi8A/bmVaTubSw3DF3P/bHesNUB52zVQtcyROxd5iZmDeU3+h/pi068IMA2vZLD+5Uap0+cP1+xKgR1qzRhZgL/bUJ6MoC+IqMj2ZeeEcaRjtJIc=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749033738; c=relaxed/simple;
bh=qNDOUiF7KGRFDOUnrBkneiuinvRIhfXa2gk0djElLEg=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=Z0SczosCMjYv+x7TzzOJ3UKGR3zlsq9B0i0URukoG5EPCMNpZT93o4+todYJL+Fx1dENWNmtIBcocYQqVj8/iWS9kDNo89NkiIKAV4qZ9um2KIoyWCZepAHQPKPRQtk1GZK40Ma67WGF4gRfvk0GMgmfNeO03PtwSPPQfNV8Xp4=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cuZf38GB; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4D6A9C4CEE7;
Wed, 4 Jun 2025 10:42:12 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749033736;
bh=qNDOUiF7KGRFDOUnrBkneiuinvRIhfXa2gk0djElLEg=;
h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
b=cuZf38GBKdmBQUia1rTRrpxrwZm0dilfnmqqBlXyp4nZz8oM1MMSWTNcr/kClFbvr
ew94dmBplR3Dbvd7xH7kY/HTHVWIRDfpNAZJq6BfC2g0shGYB4HgMregASavszwCam
O4jUhn55Hj7unRUdfYY5/cp+zgU/nSshPK1fu0gsEulAK2RaJVHHBLqhoUtow1P/Mm
n2EdVMsYHUQ+9Rbvy3Crj/xNO33Fmb7SiOvfAQHGNB3vq7TlsJpMA9xQPonJidkxEv
poTasdllJ8rpBDayF2IhUXn61Wc5nHP1MYbYIV+hsPVVQ+dDvGuq+ZwX050wxiptnq
zp1PBIbJ5LriA==
Date: Wed, 4 Jun 2025 12:42:09 +0200
From: Danilo Krummrich <dakr@xxxxxxxxxx>
To: Alexandre Courbot <acourbot@xxxxxxxxxx>
Cc: Miguel Ojeda <ojeda@xxxxxxxxxx>, Alex Gaynor <alex.gaynor@xxxxxxxxx>,
Boqun Feng <boqun.feng@xxxxxxxxx>, Gary Guo <gary@xxxxxxxxxxx>,
=?iso-8859-1?Q?Bj=F6rn?= Roy Baron <bjorn3_gh@xxxxxxxxxxxxxx>,
Benno Lossin <benno.lossin@xxxxxxxxx>,
Andreas Hindborg <a.hindborg@xxxxxxxxxx>,
Alice Ryhl <aliceryhl@xxxxxxxxxx>, Trevor Gross <tmgross@xxxxxxxxx>,
David Airlie <airlied@xxxxxxxxx>, Simona Vetter <simona@xxxxxxxx>,
Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>,
Maxime Ripard <mripard@xxxxxxxxxx>,
Thomas Zimmermann <tzimmermann@xxxxxxx>,
John Hubbard <jhubbard@xxxxxxxxxx>, Ben Skeggs <bskeggs@xxxxxxxxxx>,
Joel Fernandes <joelagnelf@xxxxxxxxxx>,
Timur Tabi <ttabi@xxxxxxxxxx>, Alistair Popple <apopple@xxxxxxxxxx>,
linux-kernel@xxxxxxxxxxxxxxx, rust-for-linux@xxxxxxxxxxxxxxx,
nouveau@xxxxxxxxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx
Subject: Re: [PATCH v4 19/20] gpu: nova-core: extract FWSEC from BIOS and
patch it to run FWSEC-FRTS
Message-ID: <aEAjASkf9t4s4RsY@cassiopeiae>
References: <20250521-nova-frts-v4-0-05dfd4f39479@xxxxxxxxxx>
<20250521-nova-frts-v4-19-05dfd4f39479@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20250521-nova-frts-v4-19-05dfd4f39479@xxxxxxxxxx>
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, May 21, 2025 at 03:45:14PM +0900, Alexandre Courbot wrote:
+impl FirmwareDmaObject<FwsecFirmware> {
+ /// Patch the Fwsec firmware image in `fw` to run the command `cmd`.
+ fn patch_command(&mut self, v3_desc: &FalconUCodeDescV3, cmd: FwsecCommand) -> Result<()> {
Same comment as on the previous patch regarding patch_signature().
<snip>
+ fn dmem_load_params(&self) -> FalconLoadTarget {
+ FalconLoadTarget {
+ src_start: self.desc.imem_load_size,
+ dst_start: self.desc.dmem_phys_base,
+ len: Layout::from_size_align(self.desc.dmem_load_size as usize, 256)
+ // Cannot panic, as 256 is non-zero and a power of 2.
+ .unwrap()
There is also Layout::from_size_align_unchecked(), which I prefer over unwrap().
I think we should never use unwrap() and rather the unsafe variant, which at least
forces us to document things properly, if there's no other option.
In this case, however, I don't see why we can't just propage the error? This
method is used from Falcon::dma_load(), which returns a Result anyways, so let's
just propagate it.
In general, we should *never* potentially panic the whole kernel just because
of a wrong size calculation in a driver.
Return-Path: <linux-kernel+bounces-673088-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 5F42A41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:46:48 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 8A97818982C3
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:47:00 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 13D6328DB50;
Wed, 4 Jun 2025 10:46:38 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Jr3JM1rh"
Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 12BF67262F;
Wed, 4 Jun 2025 10:46:35 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.51
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749033997; cv=none; b=pwqpksdfIcWOgc02b1vMDFPhw8uAJsD5eGysq/PJEnicJHfXAwQp6Z3Fq6ohPprF+169la0/01abpmEaNXstywBKurjO9RJScCO4zGo6WSIz7HscizDBFYXVfpZGafT3msK0KpI2x6WRoh2ScqBHkzJjLsxN23r4cCYClYHwJGU=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749033997; c=relaxed/simple;
bh=Epv5mheAzkoXZsYIyltaMAeCUL6h42koA1fBsB2ZV/k=;
h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
To:Cc:Content-Type; b=AvM8Mg1mHsAM3q/HgwIWd60d67VQo04lXhB32ZuREMh2w2YXlvo4ypW10IpiWB8sTeTFLbt9p8dqNOca0IjV4Y80zBqW458X82FsMAt6zxXuLPGrMeDcAjAWnCBCfGaEZpzM1YRmG8NUUa6pHud4juTmQC1lavnkn6tJuwbQlvc=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Jr3JM1rh; arc=none smtp.client-ip=209.85.216.51
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
Received: by mail-pj1-f51.google.com with SMTP id 98e67ed59e1d1-311f6be42f1so1191725a91.0;
Wed, 04 Jun 2025 03:46:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1749033995; x=1749638795; darn=vger.kernel.org;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:from:to:cc:subject:date
:message-id:reply-to;
bh=KZkMdZcPLkgpesLYoSGyu8by6g0yo2x1DeouPMHzhTM=;
b=Jr3JM1rh7uvPSMYVJOgLn+BUsQm61rsyrLdRm3xKdtChICX7mleF/DmEg4I/iDMzmq
/P4VaZZk46YlEe2+ShzRlDeTdOdO1EfRy+qr0ZAEwyKNQ93ka79U+ugSfBjEVCBPc7PB
lxUajAbEm1l/EGUtbX52J7mQXF7ceiE1Wmwp87uDDp4NCQYmq4+AsQW477KdsZOnqEWU
bdUkLxEVukZOgm2QTGkud2HV37eMtgOZtXhtqoISYStADV3WSd9Rbpo/Yu/BiDAYgt2p
4t3P4iLAkPHUTk2zEDR1n3xkamqWQFUeN5MZtJLWQVuc8ifjbA9wuCdN5jmZuT4WdRkm
5hMQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749033995; x=1749638795;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=KZkMdZcPLkgpesLYoSGyu8by6g0yo2x1DeouPMHzhTM=;
b=oZMGkwDvWfqEzm/+fmi20ziqbaZQ72xnGeIXMBNTnY75OhQGGi3XSIut0axbu5v5wB
ShFKg8FBs3GkfWyFbPrSFbsG6O3iAP6kJoL0PibA5PBVdFN07AF6TvySino+0mbb2CTe
BiL+AgcbbGcMJ8PaZbdgocfd4Bs6UbI46LF6WvuBGwNDVwdVN7Eg6oYuzSwhorViSAdP
K7k0bnN7TdvyfKA5+12G0pmQ9biQF88IEBb2SPy4vVJcYMvkiJjxGXxzON6HCzxPcemm
crRX4Bs1v2kV5TtG/gB3SdizBQ2DMCaIkfcT3JgjM330TOg86T7NNeO3QyJIXb3E6S/z
R6Sw==
X-Forwarded-Encrypted: i=1; AJvYcCWJvywZqRdfkqATzojgD+mSfjsyqmGSWFqIJ30o0mJ/OBZFvxYLlYmlIV7Ez8qbLn8rgMu8iyhai8pkrc6rOBs=@vger.kernel.org, AJvYcCXmyVG03kMLhtJJCDV49Dykk+3DjT0UcuqYxXExqQEiBfjUMcH2DjtlUufMlBR0wRqpDlntBuGnY9C3@xxxxxxxxxxxxxxx
X-Gm-Message-State: AOJu0YzhjX67/RVtITPKkJcsYHt+VDofero99EHxzTvmFczWwwgBsRnF
6n+ZB3nqnm+I4NI1m3s+po91sXgoXKa23fZPMfiqZWGuHgZWkfMGH0hg8XvUs8yfs/yMjFvZDTB
D8ZeVNVLWgWuKgU0/gfmFwEmQxYFec0o=
X-Gm-Gg: ASbGncuYmpCWjldHr90Z1IG1VMhK1W4z1r+Gs1BJl2B80tTiFIow2mzs1y22G1gRHuP
pjddodHXIWO9xq262Ieto6kZzPrlAQsX31ET+Z7G02XVyLGIxFiT1MGUBbBCYzPCsg8+Yke0KOI
G3EZW9AYLKFizhV0EjfEh1ToEXY6Ifmp6k
X-Google-Smtp-Source: AGHT+IGNTKbmWxJj58p+j9OqUbP+KdcPfi3ogpgUnwFvWYVS0MsDXgTq9fUjK9ub9rEssL91xGAhBa49+UKQcxA0aMM=
X-Received: by 2002:a17:90b:4f8d:b0:311:488:f506 with SMTP id
98e67ed59e1d1-3130cd6d852mr1421896a91.6.1749033995206; Wed, 04 Jun 2025
03:46:35 -0700 (PDT)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
References: <700ebe13-c2d3-48e3-800f-8dc327efb6fc@xxxxxxxxx>
<CANiq72mFL4dn+0JppLLfxyKnM+xYwKeduFw2j07hUfxWVVHdUw@xxxxxxxxxxxxxx>
<f5d5b84c-0850-4df9-bad7-61fff12c4248@xxxxxxxxxxxxx> <CANiq72=+qUNJu5j+uoveMrTbngwA89+ScwjUPd9OyVGqps54aw@xxxxxxxxxxxxxx>
<20250604073118.4205f303@xxxxxxxxxxxxxxxx>
In-Reply-To: <20250604073118.4205f303@xxxxxxxxxxxxxxxx>
From: Miguel Ojeda <miguel.ojeda.sandonis@xxxxxxxxx>
Date: Wed, 4 Jun 2025 12:46:22 +0200
X-Gm-Features: AX0GCFt_aMFHy55zt8zB_FnAa4ypToTjhayKmPmGVsXSI4Wl9tvd7Ee8ChK3pqU
Message-ID: <CANiq72kghKg7FU=W_yO_q9VuCf=smiyzvrcU8oOFG2FFFsOQiA@xxxxxxxxxxxxxx>
Subject: Re: REGRESSION: armv7 build mismatched types
To: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>, Thorsten Leemhuis <linux@xxxxxxxxxxxxx>,
Rudraksha Gupta <guptarud@xxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx,
Linux regressions mailing list <regressions@xxxxxxxxxxxxxxx>, rust-for-linux@xxxxxxxxxxxxxxx,
Miguel Ojeda <ojeda@xxxxxxxxxx>, Linux Next Mailing List <linux-next@xxxxxxxxxxxxxxx>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Tue, Jun 3, 2025 at 11:32=E2=80=AFPM Stephen Rothwell <sfr@xxxxxxxxxxxxx=
.au> wrote:
Damn! I knew I would forget. Sorry about that, it will be applied
today.
Looks good to me today, thanks!
Rudraksha/Thorsten: the error should be gone from your builds now.
Cheers,
Miguel
Return-Path: <linux-kernel+bounces-673089-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 6978841E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:47:17 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 0D6D63A27A7
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:46:55 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id DE6F928D8D0;
Wed, 4 Jun 2025 10:47:10 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="hIkqJzEK"
Received: from lelvem-ot02.ext.ti.com (lelvem-ot02.ext.ti.com [198.47.23.235])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 97AA03FE4;
Wed, 4 Jun 2025 10:47:08 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.235
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749034030; cv=none; b=qmax+B/cX5TgABX8dvC46z1Zn/cBvDk+PTwMgs3rXoCvpY8MhcF8VE6rt2YhX0OUvkBucRwwMXJvjzJMmDsHkC0J/f/NJja2DDtGSyXtD+C8YmX1snEMTlM4BB9YIkE41UPzP0jHejlwzERLgakyDnqT6ulTkc/bXiE3pzhWxNw=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749034030; c=relaxed/simple;
bh=fcBWWL1rS4f5Sk+veiqqjg2rTPrlh664bDCvpXlsWx0=;
h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version:Content-Type; b=BWrxl3Utf1LdVf7U57ewdlXz2j1K986/XqRGKunAyP88NlalgTVvVRpx9JqHSF8J1w0jeYM7WUnh0pwo5qlIOiikbBCa8vmo9+MsONTuXb7i8HPpAV6qR4v0bgrlekLppIKwV8A+6r3gpUb/WkBLtBFNI4Ykd2LdrYPVuRG9RcA=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=hIkqJzEK; arc=none smtp.client-ip=198.47.23.235
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com
Received: from lelvem-sh02.itg.ti.com ([10.180.78.226])
by lelvem-ot02.ext.ti.com (8.15.2/8.15.2) with ESMTP id 554Al12Q3789918;
Wed, 4 Jun 2025 05:47:01 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com;
s=ti-com-17Q1; t=1749034021;
bh=URUAuGhJ6oVpvppDA506Q+cOUcLV4A0Cy2nR7TJqxBA=;
h=From:To:CC:Subject:Date:In-Reply-To:References;
b=hIkqJzEKREQcoCXDqFEQCNQ/nmNIeRUyJSWlOTg/9qKw+4smOxu/evYrSiuzmBtCz
G7CouK0O7ebdwhwdghsB49tYbz7w8QCqu+XQo+Pr7Ek/ANPwQYYwdFy4KEoYIl08mH
IiqwTSy5T95qR1snHUb83a8N96wWUcFz1PlJD5Fg=
Received: from DLEE111.ent.ti.com (dlee111.ent.ti.com [157.170.170.22])
by lelvem-sh02.itg.ti.com (8.18.1/8.18.1) with ESMTPS id 554Al1PE1977638
(version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA256 bits=128 verify=FAIL);
Wed, 4 Jun 2025 05:47:01 -0500
Received: from DLEE103.ent.ti.com (157.170.170.33) by DLEE111.ent.ti.com
(157.170.170.22) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 4
Jun 2025 05:47:01 -0500
Received: from lelvem-mr06.itg.ti.com (10.180.75.8) by DLEE103.ent.ti.com
(157.170.170.33) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via
Frontend Transport; Wed, 4 Jun 2025 05:47:00 -0500
Received: from localhost (jayesh-hp-z2-tower-g5-workstation.dhcp.ti.com [172.24.227.14])
by lelvem-mr06.itg.ti.com (8.18.1/8.18.1) with ESMTP id 554Al0OL1830865;
Wed, 4 Jun 2025 05:47:00 -0500
From: Jayesh Choudhary <j-choudhary@xxxxxx>
To: <nm@xxxxxx>, <vigneshr@xxxxxx>, <devicetree@xxxxxxxxxxxxxxx>
CC: <kristo@xxxxxxxxxx>, <robh@xxxxxxxxxx>, <krzk+dt@xxxxxxxxxx>,
<conor+dt@xxxxxxxxxx>, <r-donadkar@xxxxxx>,
<linux-kernel@xxxxxxxxxxxxxxx>, <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>,
<j-choudhary@xxxxxx>
Subject: [PATCH 2/3] arm64: dts: ti: k3-j721s2-main: Add audio_refclk node
Date: Wed, 4 Jun 2025 16:16:55 +0530
Message-ID: <20250604104656.38752-3-j-choudhary@xxxxxx>
X-Mailer: git-send-email 2.34.1
In-Reply-To: <20250604104656.38752-1-j-choudhary@xxxxxx>
References: <20250604104656.38752-1-j-choudhary@xxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain
X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On J721S2 SoC, the AUDIO_REFCLK1 can be used as input to external
peripherals when configured through CTRL_MMR.
Add audio_refclk1 node which would be used as system clock for
audio codec PCM3168A.
Signed-off-by: Jayesh Choudhary <j-choudhary@xxxxxx>
---
arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi b/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
index 6dee0c573980..e21f6092b3f0 100644
--- a/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
@@ -74,6 +74,15 @@ ehrpwm_tbclk: clock-controller@140 {
reg = <0x140 0x18>;
#clock-cells = <1>;
};
+
+ audio_refclk1: clock-controller@42e4 {
+ compatible = "ti,am62-audio-refclk";
+ reg = <0x42e4 0x4>;
+ clocks = <&k3_clks 157 299>;
+ assigned-clocks = <&k3_clks 157 299>;
+ assigned-clock-parents = <&k3_clks 157 328>;
+ #clock-cells = <0>;
+ };
};
main_ehrpwm0: pwm@3000000 {
--
2.34.1
Return-Path: <linux-kernel+bounces-673090-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 4700741E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:47:25 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 3BB1D3A53DD
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:47:01 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id E029F28DF46;
Wed, 4 Jun 2025 10:47:11 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="UkzhLjlw"
Received: from lelvem-ot01.ext.ti.com (lelvem-ot01.ext.ti.com [198.47.23.234])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id A7CAC1EFF9B;
Wed, 4 Jun 2025 10:47:09 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.23.234
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749034031; cv=none; b=iGajPT7o2Y94E34wjYlCub0//GorxlQaeXnat4I6/l9u2wiCgJXR3pqJBjN0Y0BiuAnAfiAQ3W8ouoQEgsCJkxj60JADXndGiDidg/igX9bIPA2lXpwBNtkHdl8KpnELqSDOF/h7F+kCMcGPNxupotXNHKdCKtPEglp91GGjk8g=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749034031; c=relaxed/simple;
bh=JFqx00dq9k+yHX8+9lWGiUOhUmBnpFrTc0GEzlUwFYg=;
h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=I33Hp+K9O1GngSfvHekjJBAVocirYK3UOcsbKaHl143/xCqeI5KmX+2vhMzQiuuOLHk0gEzyMYfKZnvOvK79mhEKFBec2lM8+bjZrJcq1zSScu4RLbC4mk3+e9e9ePOIreBLzNCr3VHfQmIvyJU3+iQ1vuDExZjFU07AGkEeQOE=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=UkzhLjlw; arc=none smtp.client-ip=198.47.23.234
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com
Received: from lelvem-sh02.itg.ti.com ([10.180.78.226])
by lelvem-ot01.ext.ti.com (8.15.2/8.15.2) with ESMTP id 554AkwBt745182;
Wed, 4 Jun 2025 05:46:58 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com;
s=ti-com-17Q1; t=1749034018;
bh=jeb13SokNNFpJkdvHxDAZCgiIX6KKVTISmQSdYUXtd4=;
h=From:To:CC:Subject:Date;
b=UkzhLjlwcvCa5DuEtyqeYjyKZ4LNecR4UoGJRaEzT4pIPBTems+QWHw2TIcvwsPm+
CgNqTdeOo+F5+OvsBrqNBxB2k7JL5QglPqezF4m9ksGGnRzmDpK85LUyCtOgGwpDy8
6hn+0rrbVABh31anURtckR8r3bL9zp56CLgsIw5E=
Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21])
by lelvem-sh02.itg.ti.com (8.18.1/8.18.1) with ESMTPS id 554AkwOg1977619
(version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA256 bits=128 verify=FAIL);
Wed, 4 Jun 2025 05:46:58 -0500
Received: from DFLE104.ent.ti.com (10.64.6.25) by DFLE100.ent.ti.com
(10.64.6.21) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 4
Jun 2025 05:46:57 -0500
Received: from lelvem-mr05.itg.ti.com (10.180.75.9) by DFLE104.ent.ti.com
(10.64.6.25) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via
Frontend Transport; Wed, 4 Jun 2025 05:46:57 -0500
Received: from localhost (jayesh-hp-z2-tower-g5-workstation.dhcp.ti.com [172.24.227.14])
by lelvem-mr05.itg.ti.com (8.18.1/8.18.1) with ESMTP id 554Akvjv1917870;
Wed, 4 Jun 2025 05:46:57 -0500
From: Jayesh Choudhary <j-choudhary@xxxxxx>
To: <nm@xxxxxx>, <vigneshr@xxxxxx>, <devicetree@xxxxxxxxxxxxxxx>
CC: <kristo@xxxxxxxxxx>, <robh@xxxxxxxxxx>, <krzk+dt@xxxxxxxxxx>,
<conor+dt@xxxxxxxxxx>, <r-donadkar@xxxxxx>,
<linux-kernel@xxxxxxxxxxxxxxx>, <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>,
<j-choudhary@xxxxxx>
Subject: [PATCH 0/3] Enable audio support for J721S2-EVM
Date: Wed, 4 Jun 2025 16:16:53 +0530
Message-ID: <20250604104656.38752-1-j-choudhary@xxxxxx>
X-Mailer: git-send-email 2.34.1
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain
X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
These 3 patches add the support to enable audio on J721S2-EVM.
This required the i2c-mux support[0] which is now in linux tree.
Now, this series ***depends upon only one dts change[1]*** to ensure there
are no dtbs_check warnings (no functional issues):
"ti,j721e-system-controller.yaml" refers to "ti,am654-ehrpwm-tbclk.yaml"
for clock-controller nodes, but for audio we need "ti,am62-audio-refclk".
When scm_conf is "simple-bus", there are no such warnings.
Test log: https://gist.github.com/Jayesh2000/840c19ef8f9b7f0f75dedd015ccbf98a
[0]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0fc829dbde9bf1f349631c677a85e08782037ecf
[1]: https://lore.kernel.org/all/20250603095609.33569-4-j-choudhary@xxxxxx/
Jayesh Choudhary (3):
arm64: dts: ti: k3-j721s2-main: Add McASP nodes
arm64: dts: ti: k3-j721s2-main: Add audio_refclk node
arm64: dts: ti: k3-j721s2-common-proc-board: Enable analog audio
support
.../dts/ti/k3-j721s2-common-proc-board.dts | 131 ++++++++++++++++++
arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi | 99 +++++++++++++
2 files changed, 230 insertions(+)
--
2.34.1
Return-Path: <linux-kernel+bounces-673091-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id C647041E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:47:44 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 8BE6D3A5546
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:47:15 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id DAD6E28EA4B;
Wed, 4 Jun 2025 10:47:15 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="SjlOuvRl"
Received: from fllvem-ot03.ext.ti.com (fllvem-ot03.ext.ti.com [198.47.19.245])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7E91D28E604;
Wed, 4 Jun 2025 10:47:13 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.245
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749034035; cv=none; b=MiOzHzMv6iqKGoPOZypS4PVk9pkrZv9mEYESkm8GlNMFveCNad7c5lk1+1q58Huol9nn9VloqeeLebte+gjycuoBXgOkf0cOFbq0duZsy28gQR1m/ezBQzOp0AEl4D5pycnAoTJgjUu/zfCH5GosxdmEzlHQ00PfzwnRZ++uTEM=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749034035; c=relaxed/simple;
bh=60Fl1KOrUPbNv5vrl/G82DJcxcAXOwQWTH0HZCHnWek=;
h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version:Content-Type; b=lrcmoaIeAyvs+y05w6h93l3lWk2OQXgBUfWrbiPZ5llQSvOWQ54SbnGHyDF4u66SSeyw8JlG68Jm37I79pfG1GMaH71w/hUEc3NhP+Z1oib6D8L21Te3na4n8O5tGjJ8Y0fdDR7mrAz0p518lYA/GevGgoJmZZfjlRfh5wNpVF4=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=SjlOuvRl; arc=none smtp.client-ip=198.47.19.245
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com
Received: from fllvem-sh04.itg.ti.com ([10.64.41.54])
by fllvem-ot03.ext.ti.com (8.15.2/8.15.2) with ESMTP id 554Al0iU772444;
Wed, 4 Jun 2025 05:47:00 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com;
s=ti-com-17Q1; t=1749034020;
bh=ASLg/A5fi+W/LA+IOM+ZsHtSzRzn5LVIqH4St0CX4uE=;
h=From:To:CC:Subject:Date:In-Reply-To:References;
b=SjlOuvRl5xdH1RKUkllJe+gqteEuQ4vJQldUSAn9paJwNBOgQbRQlRS4MsBihKhoF
7ZfA7h/RdfZlAC+v5crpqOCJiUDpOydiTWQRChCiQNKXMPSw7PIWEvQoK6lo82X6v7
Q/xt+9Egr5XClt7lq4FWJNPM4/fnvx40uCq9UmYo=
Received: from DLEE106.ent.ti.com (dlee106.ent.ti.com [157.170.170.36])
by fllvem-sh04.itg.ti.com (8.18.1/8.18.1) with ESMTPS id 554Al0Ij091644
(version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA256 bits=128 verify=FAIL);
Wed, 4 Jun 2025 05:47:00 -0500
Received: from DLEE103.ent.ti.com (157.170.170.33) by DLEE106.ent.ti.com
(157.170.170.36) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 4
Jun 2025 05:46:59 -0500
Received: from lelvem-mr05.itg.ti.com (10.180.75.9) by DLEE103.ent.ti.com
(157.170.170.33) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via
Frontend Transport; Wed, 4 Jun 2025 05:46:59 -0500
Received: from localhost (jayesh-hp-z2-tower-g5-workstation.dhcp.ti.com [172.24.227.14])
by lelvem-mr05.itg.ti.com (8.18.1/8.18.1) with ESMTP id 554AkwXX1917892;
Wed, 4 Jun 2025 05:46:59 -0500
From: Jayesh Choudhary <j-choudhary@xxxxxx>
To: <nm@xxxxxx>, <vigneshr@xxxxxx>, <devicetree@xxxxxxxxxxxxxxx>
CC: <kristo@xxxxxxxxxx>, <robh@xxxxxxxxxx>, <krzk+dt@xxxxxxxxxx>,
<conor+dt@xxxxxxxxxx>, <r-donadkar@xxxxxx>,
<linux-kernel@xxxxxxxxxxxxxxx>, <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>,
<j-choudhary@xxxxxx>
Subject: [PATCH 1/3] arm64: dts: ti: k3-j721s2-main: Add McASP nodes
Date: Wed, 4 Jun 2025 16:16:54 +0530
Message-ID: <20250604104656.38752-2-j-choudhary@xxxxxx>
X-Mailer: git-send-email 2.34.1
In-Reply-To: <20250604104656.38752-1-j-choudhary@xxxxxx>
References: <20250604104656.38752-1-j-choudhary@xxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain
X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Add McASP 0-4 instances and keep them disabled because several
required properties are missing as they are board specific.
Signed-off-by: Jayesh Choudhary <j-choudhary@xxxxxx>
---
arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi | 90 ++++++++++++++++++++++
1 file changed, 90 insertions(+)
diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi b/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
index 605f753d3258..6dee0c573980 100644
--- a/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
@@ -2066,4 +2066,94 @@ gpu: gpu@4e20000000 {
power-domain-names = "a", "b";
dma-coherent;
};
+
+ mcasp0: mcasp@2b00000 {
+ compatible = "ti,am33xx-mcasp-audio";
+ reg = <0x00 0x02b00000 0x00 0x2000>,
+ <0x00 0x02b08000 0x00 0x1000>;
+ reg-names = "mpu","dat";
+ interrupts = <GIC_SPI 544 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 545 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "tx", "rx";
+ dmas = <&main_udmap 0xc400>, <&main_udmap 0x4400>;
+ dma-names = "tx", "rx";
+ clocks = <&k3_clks 209 0>;
+ clock-names = "fck";
+ assigned-clocks = <&k3_clks 209 0>;
+ assigned-clock-parents = <&k3_clks 209 1>;
+ power-domains = <&k3_pds 209 TI_SCI_PD_EXCLUSIVE>;
+ status = "disabled";
+ };
+
+ mcasp1: mcasp@2b10000 {
+ compatible = "ti,am33xx-mcasp-audio";
+ reg = <0x00 0x02b10000 0x00 0x2000>,
+ <0x00 0x02b18000 0x00 0x1000>;
+ reg-names = "mpu","dat";
+ interrupts = <GIC_SPI 546 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 547 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "tx", "rx";
+ dmas = <&main_udmap 0xc401>, <&main_udmap 0x4401>;
+ dma-names = "tx", "rx";
+ clocks = <&k3_clks 210 0>;
+ clock-names = "fck";
+ assigned-clocks = <&k3_clks 210 0>;
+ assigned-clock-parents = <&k3_clks 210 1>;
+ power-domains = <&k3_pds 210 TI_SCI_PD_EXCLUSIVE>;
+ status = "disabled";
+ };
+
+ mcasp2: mcasp@2b20000 {
+ compatible = "ti,am33xx-mcasp-audio";
+ reg = <0x00 0x02b20000 0x00 0x2000>,
+ <0x00 0x02b28000 0x00 0x1000>;
+ reg-names = "mpu","dat";
+ interrupts = <GIC_SPI 548 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 549 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "tx", "rx";
+ dmas = <&main_udmap 0xc402>, <&main_udmap 0x4402>;
+ dma-names = "tx", "rx";
+ clocks = <&k3_clks 211 0>;
+ clock-names = "fck";
+ assigned-clocks = <&k3_clks 211 0>;
+ assigned-clock-parents = <&k3_clks 211 1>;
+ power-domains = <&k3_pds 211 TI_SCI_PD_EXCLUSIVE>;
+ status = "disabled";
+ };
+
+ mcasp3: mcasp@2b30000 {
+ compatible = "ti,am33xx-mcasp-audio";
+ reg = <0x00 0x02b30000 0x00 0x2000>,
+ <0x00 0x02b38000 0x00 0x1000>;
+ reg-names = "mpu","dat";
+ interrupts = <GIC_SPI 550 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 551 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "tx", "rx";
+ dmas = <&main_udmap 0xc403>, <&main_udmap 0x4403>;
+ dma-names = "tx", "rx";
+ clocks = <&k3_clks 212 0>;
+ clock-names = "fck";
+ assigned-clocks = <&k3_clks 212 0>;
+ assigned-clock-parents = <&k3_clks 212 1>;
+ power-domains = <&k3_pds 212 TI_SCI_PD_EXCLUSIVE>;
+ status = "disabled";
+ };
+
+ mcasp4: mcasp@2b40000 {
+ compatible = "ti,am33xx-mcasp-audio";
+ reg = <0x00 0x02b40000 0x00 0x2000>,
+ <0x00 0x02b48000 0x00 0x1000>;
+ reg-names = "mpu","dat";
+ interrupts = <GIC_SPI 552 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 553 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "tx", "rx";
+ dmas = <&main_udmap 0xc404>, <&main_udmap 0x4404>;
+ dma-names = "tx", "rx";
+ clocks = <&k3_clks 213 0>;
+ clock-names = "fck";
+ assigned-clocks = <&k3_clks 213 0>;
+ assigned-clock-parents = <&k3_clks 213 1>;
+ power-domains = <&k3_pds 213 TI_SCI_PD_EXCLUSIVE>;
+ status = "disabled";
+ };
};
--
2.34.1
Return-Path: <linux-kernel+bounces-673092-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id E872F41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:47:51 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id C57213A5439
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:47:21 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id CC03C28EA65;
Wed, 4 Jun 2025 10:47:16 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="Wj797Qna"
Received: from fllvem-ot04.ext.ti.com (fllvem-ot04.ext.ti.com [198.47.19.246])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4BDE91EFF9B;
Wed, 4 Jun 2025 10:47:14 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.246
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749034036; cv=none; b=VYSc8mnZAjzLuiJ87wBqxfJfH2t9pawfO0uCxQGzuwk3krNON8KaFvQKDCFF/nEF9wY6XMXQtEtMTV1h70EMab6Rx2AdrcVuPJvXlLMRhKcFhg7KqkrSBm5fQ+ilw5AbLZnLdnSx3IBDTKsNreHmsKxLCOBq4zUYy2+YlbxSTgk=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749034036; c=relaxed/simple;
bh=3RWCrKfrLOCVxObemX8XoSert2dO6smO2TERLaJX53o=;
h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version:Content-Type; b=osg8YbMQgGHAWtRaFdzlVpfTW6wLN6FDODCNP91jLa/n5hDhwDJXfJ2EzBPDdAhRZVOKPKXWcj+APmoc/WTRxQds66MhyuSOM0Q6yj5KoYpoliyouaThzGgaA0h6sNjfMXWgi29xMqk/bXdc0B2TS3JlJ05vqadH9/+X2EhP7o8=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=Wj797Qna; arc=none smtp.client-ip=198.47.19.246
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com
Received: from lelvem-sh01.itg.ti.com ([10.180.77.71])
by fllvem-ot04.ext.ti.com (8.15.2/8.15.2) with ESMTP id 554Al3lc3781106;
Wed, 4 Jun 2025 05:47:03 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com;
s=ti-com-17Q1; t=1749034023;
bh=Li8lzGs5nzskLUkdkX//0GrXtU67DGh9o245ARYwvZc=;
h=From:To:CC:Subject:Date:In-Reply-To:References;
b=Wj797QnasjFCRi/mbZXoBb54HHitRtDCVlxR8wufCqH2nh2ivc1zAkPrEniclkMnu
AUH1M4VFSN3xLi8pVdGeoFjADhg+YSC2utpeoDBpvUqnP6vuCv4RBDdnV6qTT71S41
x0UTEanMAL2PWbaMDydBLV27LNqQvG12t5F2udgg=
Received: from DFLE102.ent.ti.com (dfle102.ent.ti.com [10.64.6.23])
by lelvem-sh01.itg.ti.com (8.18.1/8.18.1) with ESMTPS id 554Al28m283977
(version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA256 bits=128 verify=FAIL);
Wed, 4 Jun 2025 05:47:03 -0500
Received: from DFLE101.ent.ti.com (10.64.6.22) by DFLE102.ent.ti.com
(10.64.6.23) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 4
Jun 2025 05:47:02 -0500
Received: from lelvem-mr05.itg.ti.com (10.180.75.9) by DFLE101.ent.ti.com
(10.64.6.22) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via
Frontend Transport; Wed, 4 Jun 2025 05:47:02 -0500
Received: from localhost (jayesh-hp-z2-tower-g5-workstation.dhcp.ti.com [172.24.227.14])
by lelvem-mr05.itg.ti.com (8.18.1/8.18.1) with ESMTP id 554Al1Od1917942;
Wed, 4 Jun 2025 05:47:02 -0500
From: Jayesh Choudhary <j-choudhary@xxxxxx>
To: <nm@xxxxxx>, <vigneshr@xxxxxx>, <devicetree@xxxxxxxxxxxxxxx>
CC: <kristo@xxxxxxxxxx>, <robh@xxxxxxxxxx>, <krzk+dt@xxxxxxxxxx>,
<conor+dt@xxxxxxxxxx>, <r-donadkar@xxxxxx>,
<linux-kernel@xxxxxxxxxxxxxxx>, <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>,
<j-choudhary@xxxxxx>
Subject: [PATCH 3/3] arm64: dts: ti: k3-j721s2-common-proc-board: Enable analog audio support
Date: Wed, 4 Jun 2025 16:16:56 +0530
Message-ID: <20250604104656.38752-4-j-choudhary@xxxxxx>
X-Mailer: git-send-email 2.34.1
In-Reply-To: <20250604104656.38752-1-j-choudhary@xxxxxx>
References: <20250604104656.38752-1-j-choudhary@xxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain
X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
The audio support on J721S2-EVM is using PCM3168A codec
connected to McASP4 serializers.
- Add the nodes for sound-card, audio codec, MAIN_I2C3 and
McASP4.
- Add pinmux for I2C3, McASP4, AUDIO_EXT_REFCLK1 and
WKUP_GPIO_0.
- Add necessary GPIO hogs to route the MAIN_I2C3 lines and
McASP serializer.
- Add idle-state as 1 in mux0 and mux1 to route McASP signals
Signed-off-by: Jayesh Choudhary <j-choudhary@xxxxxx>
---
.../dts/ti/k3-j721s2-common-proc-board.dts | 131 ++++++++++++++++++
1 file changed, 131 insertions(+)
diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dts b/arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dts
index e2fc1288ed07..9c6a3515847e 100644
--- a/arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dts
+++ b/arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dts
@@ -128,6 +128,28 @@ transceiver4: can-phy4 {
standby-gpios = <&exp_som 7 GPIO_ACTIVE_HIGH>;
mux-states = <&mux1 1>;
};
+
+ codec_audio: sound {
+ compatible = "ti,j7200-cpb-audio";
+ model = "j721e-cpb";
+
+ ti,cpb-mcasp = <&mcasp4>;
+ ti,cpb-codec = <&pcm3168a_1>;
+
+ clocks = <&k3_clks 213 0>, <&k3_clks 213 1>,
+ <&k3_clks 157 299>, <&k3_clks 157 328>;
+ clock-names = "cpb-mcasp-auxclk", "cpb-mcasp-auxclk-48000",
+ "cpb-codec-scki", "cpb-codec-scki-48000";
+ };
+
+ i2c_mux: mux-controller-2 {
+ compatible = "gpio-mux";
+ #mux-state-cells = <1>;
+ mux-gpios = <&wkup_gpio0 54 GPIO_ACTIVE_HIGH>;
+ idle-state = <1>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_i2c3_mux_pins_default>;
+ };
};
&main_pmx0 {
@@ -195,6 +217,22 @@ J721S2_IOPAD(0x03c, PIN_INPUT, 0) /* (U27) MCASP0_AFSX.MCAN5_RX */
J721S2_IOPAD(0x038, PIN_OUTPUT, 0) /* (AB28) MCASP0_ACLKX.MCAN5_TX */
>;
};
+
+ mcasp4_pins_default: mcasp4-default-pins {
+ pinctrl-single,pins = <
+ J721S2_IOPAD(0x0c8, PIN_OUTPUT_PULLDOWN, 1) /* (AD28) MCASP4_ACLKX */
+ J721S2_IOPAD(0x06c, PIN_OUTPUT_PULLDOWN, 1) /* (V26) MCASP4_AFSX */
+ J721S2_IOPAD(0x068, PIN_INPUT_PULLDOWN, 1) /* (U28) MCASP4_AXR1 */
+ J721S2_IOPAD(0x0c4, PIN_OUTPUT_PULLDOWN, 1) /* (AB26) MCASP4_AXR2 */
+ J721S2_IOPAD(0x070, PIN_OUTPUT_PULLDOWN, 1) /* (R27) MCASP4_AXR3 */
+ >;
+ };
+
+ audio_ext_refclk1_pins_default: audio-ext-refclk1-default-pins {
+ pinctrl-single,pins = <
+ J721S2_IOPAD(0x078, PIN_OUTPUT, 1) /* (Y25) MCAN2_RX.AUDIO_EXT_REFCLK1 */
+ >;
+ };
};
&wkup_pmx2 {
@@ -292,6 +330,12 @@ J721S2_WKUP_IOPAD(0x104, PIN_INPUT, 0) /* (N26) MCU_ADC1_AIN6 */
J721S2_WKUP_IOPAD(0x108, PIN_INPUT, 0) /* (N27) MCU_ADC1_AIN7 */
>;
};
+
+ main_i2c3_mux_pins_default: main-i2c3-mux-default-pins {
+ pinctrl-single,pins = <
+ J721S2_WKUP_IOPAD(0x038, PIN_OUTPUT, 7) /* (B27) WKUP_GPIO0_54 */
+ >;
+ };
};
&wkup_pmx1 {
@@ -367,6 +411,22 @@ exp2: gpio@22 {
"MLB_MUX_SEL", "MCAN_MUX_SEL", "MCASP2/SPI3_MUX_SEL", "PCIe_CLKREQn_MUX_SEL",
"CDCI2_RSTZ", "ENET_EXP_PWRDN", "ENET_EXP_RESETZ", "ENET_I2CMUX_SEL",
"ENET_EXP_SPARE2", "M2PCIE_RTSZ", "USER_INPUT1", "USER_LED1", "USER_LED2";
+
+ p09-hog {
+ /* P09 - MCASP/TRACE_MUX_S0 */
+ gpio-hog;
+ gpios = <9 GPIO_ACTIVE_HIGH>;
+ output-low;
+ line-name = "MCASP/TRACE_MUX_S0";
+ };
+
+ p10-hog {
+ /* P10 - MCASP/TRACE_MUX_S1 */
+ gpio-hog;
+ gpios = <10 GPIO_ACTIVE_HIGH>;
+ output-high;
+ line-name = "MCASP/TRACE_MUX_S1";
+ };
};
};
@@ -539,3 +599,74 @@ &main_mcan5 {
pinctrl-0 = <&main_mcan5_pins_default>;
phys = <&transceiver4>;
};
+
+&mux0 {
+ idle-state = <0>;
+};
+
+&mux1 {
+ idle-state = <0>;
+};
+
+&exp_som {
+ p03-hog {
+ /* P03 - CANUART_MUX_SEL1 */
+ gpio-hog;
+ gpios = <3 GPIO_ACTIVE_HIGH>;
+ output-high;
+ line-name = "CANUART_MUX_SEL1";
+ };
+};
+
+&k3_clks {
+ /* Confiure AUDIO_EXT_REFCLK1 pin as output */
+ pinctrl-names = "default";
+ pinctrl-0 = <&audio_ext_refclk1_pins_default>;
+};
+
+&main_i2c3 {
+ status = "okay";
+ pinctrl-names = "default";
+ pinctrl-0 = <&main_i2c3_pins_default>;
+ clock-frequency = <400000>;
+ mux-states = <&i2c_mux 1>;
+
+ exp3: gpio@20 {
+ compatible = "ti,tca6408";
+ reg = <0x20>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ };
+
+ pcm3168a_1: audio-codec@44 {
+ compatible = "ti,pcm3168a";
+ reg = <0x44>;
+ #sound-dai-cells = <1>;
+ reset-gpios = <&exp3 0 GPIO_ACTIVE_LOW>;
+ /* C_AUDIO_REFCLK1 -> MCAN2_RX (Y25) */
+ clocks = <&audio_refclk1>;
+ clock-names = "scki";
+ VDD1-supply = <&vsys_3v3>;
+ VDD2-supply = <&vsys_3v3>;
+ VCCAD1-supply = <&vsys_5v0>;
+ VCCAD2-supply = <&vsys_5v0>;
+ VCCDA1-supply = <&vsys_5v0>;
+ VCCDA2-supply = <&vsys_5v0>;
+ };
+};
+
+&mcasp4 {
+ status = "okay";
+ #sound-dai-cells = <0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&mcasp4_pins_default>;
+ op-mode = <0>; /* MCASP_IIS_MODE */
+ tdm-slots = <2>;
+ auxclk-fs-ratio = <256>;
+ serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */
+ 0 2 1 1
+ 0 0 0 0
+ 0 0 0 0
+ 0 0 0 0
+ >;
+};
--
2.34.1
Return-Path: <linux-kernel+bounces-673093-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id A790941E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:48:04 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 4A1171675C8
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:47:59 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 4FF3228DF15;
Wed, 4 Jun 2025 10:47:24 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="S24+Sacx";
dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="EDRNLh4m"
Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id CADA428DB75
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:47:21 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749034043; cv=none; b=tZ78dWob2KmAK3bhEiIU75sq23nY788lR6uV2BHfNiukfSoYJfarGDMwtkk35ZrmZkuMH/KE0snfiCNLqLsvZctfsMwRZ4G/X3wYFns3AfaCc7vbgIgpTfepT38gt/3TWQDoP631E/zvQ8KVOdFXoOda6dJIrtjPM2ltW5FKoI0=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749034043; c=relaxed/simple;
bh=bRbexgjPNs6cp9+xwQ95/Py1/pt8/R9C4mRpKyyla+U=;
h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=KlXcQi+1RpAk7UCtSDUdlMtNUZ//CiPinzbuyGY/qIlBRRCcprKdRIVDru9zN4Duv2702VaWXRx3ezQGrgstb7ngd7yJefs3beBheH9f+uPkjmwvyNIypimlVKVclHrSEzZN71q5qIKIN8L77Kbcnn0SjQX12wxJM5Sc7ffB3f8=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=S24+Sacx; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=EDRNLh4m; arc=none smtp.client-ip=195.135.223.130
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com
Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(No client certificate requested)
by smtp-out1.suse.de (Postfix) with ESMTPS id AAB4333741;
Wed, 4 Jun 2025 10:47:18 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1;
t=1749034039; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version: content-transfer-encoding:content-transfer-encoding;
bh=gHhQrj+v5R7cktQ3d/MFfmQ8RxmbP910uhmc2MqlTF4=;
b=S24+Sacxvu3H0l3pdQc5UBE+QhTxrZ4v2ktp1YdFyhxZp7t5kQHVOm3KAK9ETR4p59C7Wt
5sbfDgKhxeb0ZpNDMl+5p5JVkcDDI9836Ghf6/13JyZ+UIoBSTacvVVm1uImzuqLShyFTM
3eo7PWRzYDX/iuRnDzfFDmA7ESamjaw=
Authentication-Results: smtp-out1.suse.de;
dkim=pass header.d=suse.com header.s=susede1 header.b=EDRNLh4m
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1;
t=1749034038; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version: content-transfer-encoding:content-transfer-encoding;
bh=gHhQrj+v5R7cktQ3d/MFfmQ8RxmbP910uhmc2MqlTF4=;
b=EDRNLh4mUYo/YjG8eOmvoDgYWjkzzaFVXWLQobEReiWwe/MLFOIxiwWzygbHCISg904sFx
car4MfLyT3RGDzusfeMo/nOoiOm4ft9DmqUHXw2d+OTOhpO6lMPL9kSKkom6FxZfoM19NH
HqQ898GvVhhaMSSWJxbZDrm6XhpLDrQ=
Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(No client certificate requested)
by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 426691369A;
Wed, 4 Jun 2025 10:47:18 +0000 (UTC)
Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167])
by imap1.dmz-prg2.suse.org with ESMTPSA
id OfIzDTYkQGgyLQAAD6G6ig
(envelope-from <nik.borisov@xxxxxxxx>); Wed, 04 Jun 2025 10:47:18 +0000
From: Nikolay Borisov <nik.borisov@xxxxxxxx>
To: x86@xxxxxxxxxx
Cc: pawan.kumar.gupta@xxxxxxxxxxxxxxx,
peterz@xxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx,
dave.hansen@xxxxxxxxxxxxxxx,
Nikolay Borisov <nik.borisov@xxxxxxxx>
Subject: [PATCH] x86/its: Always return a writable page for dynamic thunks
Date: Wed, 4 Jun 2025 13:47:15 +0300
Message-ID: <20250604104715.700149-1-nik.borisov@xxxxxxxx>
X-Mailer: git-send-email 2.43.0
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Rspamd-Server: rspamd2.dmz-prg2.suse.org
X-Rspamd-Queue-Id: AAB4333741
X-Rspamd-Action: no action
X-Spamd-Result: default: False [-3.01 / 50.00];
BAYES_HAM(-3.00)[100.00%];
NEURAL_HAM_LONG(-1.00)[-1.000];
MID_CONTAINS_FROM(1.00)[];
R_MISSING_CHARSET(0.50)[];
R_DKIM_ALLOW(-0.20)[suse.com:s=susede1];
NEURAL_HAM_SHORT(-0.20)[-1.000];
MIME_GOOD(-0.10)[text/plain];
MX_GOOD(-0.01)[];
RCVD_VIA_SMTP_AUTH(0.00)[];
ARC_NA(0.00)[];
RCVD_COUNT_TWO(0.00)[2];
MIME_TRACE(0.00)[0:+];
RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from];
SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from];
TO_DN_SOME(0.00)[];
RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received];
FUZZY_BLOCKED(0.00)[rspamd.com];
FROM_HAS_DN(0.00)[];
TO_MATCH_ENVRCPT_ALL(0.00)[];
DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo,suse.com:mid,suse.com:dkim,suse.com:email];
RCVD_TLS_ALL(0.00)[];
FROM_EQ_ENVFROM(0.00)[];
RCPT_COUNT_FIVE(0.00)[6];
DKIM_SIGNED(0.00)[suse.com:s=susede1];
DKIM_TRACE(0.00)[suse.com:+]
X-Spam-Score: -3.01
X-Spam-Level:
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
its_alloc unconditionally allocates and return a ROX page, but setting
it RW is predicated on its_mod being set. This can cause a #GP on the
memset in its_allocate_thunk() if its_mod is not set.
Since the function always returns a page, ensure it's always set
writable so it can be initialized properly.
Fixes: 872df34d7c51 ("x86/its: Use dynamic thunks for indirect branches")
Signed-off-by: Nikolay Borisov <nik.borisov@xxxxxxxx>
---
arch/x86/kernel/alternative.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
index ecfe7b497cad..191e909636a5 100644
--- a/arch/x86/kernel/alternative.c
+++ b/arch/x86/kernel/alternative.c
@@ -199,6 +199,8 @@ static void *its_alloc(void)
if (!page)
return NULL;
+ execmem_make_temp_rw(page, PAGE_SIZE);
+
#ifdef CONFIG_MODULES
if (its_mod) {
void *tmp = krealloc(its_mod->its_page_array,
@@ -210,7 +212,6 @@ static void *its_alloc(void)
its_mod->its_page_array = tmp;
its_mod->its_page_array[its_mod->its_num_pages++] = page;
- execmem_make_temp_rw(page, PAGE_SIZE);
}
#endif /* CONFIG_MODULES */
--
2.43.0
Return-Path: <linux-kernel+bounces-673094-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id C567E41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:49:41 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 0F2073A2CD4
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:49:20 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 129A028D8CA;
Wed, 4 Jun 2025 10:49:37 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QtZfFRcQ"
Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7DB7928C5B6
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:49:34 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.48
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749034176; cv=none; b=bxsL+X98AybUOcw+6ElmsAQGqatCaM8SE00YeevSm/g2lzZeSe1Rkt+20T3bFxwTTm6hdcyUF38OqmNJ637ALPUp6d3IzqULEgiVoiji9pUUimlPlWMpauUATvts9LocRiSc/N8PgUZ0u66pQYwhTSosYhA8X2b1PMOIFDUnwOA=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749034176; c=relaxed/simple;
bh=2PZTdXSJ5ZXAAURxbOSrECvRw+S46bnSkvyyy1BRtgU=;
h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
To:Cc:Content-Type; b=e0zY6lCIhYRiHaCoLZDaPEfmI0NNu6hjpcHz9F0Rft9kkSYe/MXmzYHSLRQI0OVwWjVlV875/4DwFVahcr9qmoLbXMHKGerIJGxBBIJZiU7hJ84LQmrz9clh3oFOI+naiX8a0vKwgVjPpyAyMKdaJOebuZgEqZfWd0SDR0FKbqU=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=QtZfFRcQ; arc=none smtp.client-ip=209.85.221.48
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-3a4ee391e6fso632377f8f.3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 03:49:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1749034173; x=1749638973; darn=vger.kernel.org;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:from:to:cc:subject:date
:message-id:reply-to;
bh=bWimSkfWm5JH4ZLawa6c2SjXJDNrI4LeXxoo3qltBvk=;
b=QtZfFRcQP92BK3vq5IhxQUQVMUfsZ2VFd7ZPWccm/zuJrVwRdZu2T2QH8pG1wUH+5R
xQJwgoX5EDk6MBQ+jC1XBFdKbc0moIHjlYuVpTSMhdSjViihz/GVU+fEOiWwMXIjhJ96
b++VYdepWXW3pqCkuMisGXrlGRu5Nt1L1YrD7Do/P7jeCS0rViJWaVyhtGSxqz3jL/Hx
qxoY3h+WjIxRCYfDEfEwqmYpwFXIC1G59ifFEnmHR83alAuXK4dBIy7KVjVC/n0Fp6DV
ufErbuvg0byh9+dhgbUjqvlJlYx/trT1fDlbDh6EOxiNxD+8hcC8jFjnyL7WKHWdPQpP
gRpg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749034173; x=1749638973;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=bWimSkfWm5JH4ZLawa6c2SjXJDNrI4LeXxoo3qltBvk=;
b=YdpJR8cdH3NhsDSugUqTWqO3fY03T8KHk3dp8aV65KRpu5vfuHTqv7yps/H06M4l7a
hWvk2bVIpJwUZARn6HfSyDGXnnioL4uV1v3SvEtfrwU9/C9gNHowjbS91a7kECGp06RT
01409uY328PNbAJmRg89usa98lFxj3sKVfx8kCseQNvk0tbWF38jXYCF1iF1ES6pa/Tx
Vh8Du89B7hlv+R45ItogcI+Z6HBRnYcfk0twHn6U7FN8u+crHuBIBFIUqW+bzAVV9dTY
wMYn9nrqfb1yJtsDbPI8g7byVsWj0z7qmu+4GFrOEwjYlmj+wl+7suSnuXRM6wSMBZQj
n2Yw==
X-Forwarded-Encrypted: i=1; AJvYcCVC/0Nm45/GMOKo38e57TrpF5brCkX8ibwGeo8GIBwsNTF31um9MalYf7l4rBri/5L9v0f9MUxwsUoOIgw=@vger.kernel.org
X-Gm-Message-State: AOJu0YxLg2nFkXDi60HXRpEkN3cAqOTkiwkboPgdA7/wyoo+V1XO6BpS
EHrhXnEUBH3OvZNJR77DOruRMy2vaSTTKiR+CP2QSMjvrdgpqC0BXNG1nz0LVFvdC4PaFsd5+sG
1ZL9zJMUjxA/ZVriipGB1XYM4y2CHL4AcbX12
X-Gm-Gg: ASbGncvFqxbnO8mnBtvpcfrDcxHaVI8aG9oSgdP9/YBIqzM3ADLed8L2Ina3c8IX0UX
zN1Sx8E6jKKxfftWxnkpAA36otBmdtNximVPK/86uJYDuGvea0Go7hPPDG7kwvyO4Fcqoq7F0Rf
seIUXQB8fL9xD8bXDT3kaOvTjcJGT1a3oinQ==
X-Google-Smtp-Source: AGHT+IEhWr/oJ8E1Zyy+W66pCjIpMxWHTixzW7gMc8tMPHE5zIr4Q479fvioLoa7TY4uLVTgBq1zVIJbucTNp0WLh2o=
X-Received: by 2002:a05:6000:1887:b0:3a4:e667:9226 with SMTP id
ffacd0b85a97d-3a51d95dc6bmr683154f8f.10.1749034172575; Wed, 04 Jun 2025
03:49:32 -0700 (PDT)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
References: <1749016492-31835-1-git-send-email-zhiguo.niu@xxxxxxxxxx> <061c94ab-ff57-42e3-ad7c-592dfb2a822e@xxxxxxxxxx>
In-Reply-To: <061c94ab-ff57-42e3-ad7c-592dfb2a822e@xxxxxxxxxx>
From: Zhiguo Niu <niuzhiguo84@xxxxxxxxx>
Date: Wed, 4 Jun 2025 18:49:21 +0800
X-Gm-Features: AX0GCFvCuty0imqhT_17dlR0lz_ZTGEqCRFE17Z47gaugw1FbiJUIKH6XW1W_M8
Message-ID: <CAHJ8P3J4Q-0ckCuZhV-r_O_Hct4yqqtC0uboLjxZP1bnfBJOEg@xxxxxxxxxxxxxx>
Subject: Re: [PATCH] f2fs: compress: fix UAF of f2fs_inode_info in f2fs_free_dic
To: Chao Yu <chao@xxxxxxxxxx>
Cc: Zhiguo Niu <zhiguo.niu@xxxxxxxxxx>, jaegeuk@xxxxxxxxxx,
linux-f2fs-devel@xxxxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
ke.wang@xxxxxxxxxx, Hao_hao.Wang@xxxxxxxxxx, baocong.liu@xxxxxxxxxx
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Chao Yu <chao@xxxxxxxxxx> =E4=BA=8E2025=E5=B9=B46=E6=9C=884=E6=97=A5=E5=91=
=A8=E4=B8=89 17:48=E5=86=99=E9=81=93=EF=BC=9A
On 6/4/25 13:54, Zhiguo Niu wrote:
> The decompress_io_ctx may be released asynchronously after
> I/O completion. If this file is deleted immediately after read,
> and the kworker of processing post_read_wq has not been executed yet
> due to high workloads, It is possible that the inode(f2fs_inode_info)
> is evicted and freed before it is used f2fs_free_dic.
>
> The UAF case as below:
> Thread A Thread B
> - f2fs_decompress_end_io
> - f2fs_put_dic
> - queue_work
> add free_dic work to post_read_wq
> - do_unlink
> - iput
> - evict
> - call_rcu
> This file is deleted after read.
>
> Thread C kworker to process post_re=
ad_wq
> - rcu_do_batch
> - f2fs_free_inode
> - kmem_cache_free
> inode is freed by rcu
> - process_scheduled_works
> - f2fs_late_free_dic
> - f2fs_free_dic
> - f2fs_release_decomp_m=
em
> read (dic->inode)->i_compress_alg=
orithm
>
> This patch increase inode->i_count before f2fs_free_dic and decrease it
> after free the dic.
>
> Cc: Daeho Jeong <daehojeong@xxxxxxxxxx>
> Fixes: bff139b49d9f ("f2fs: handle decompress only post processing in s=
oftirq")
> Signed-off-by: Zhiguo Niu <zhiguo.niu@xxxxxxxxxx>
> Signed-off-by: Baocong Liu <baocong.liu@xxxxxxxxxx>
> ---
> fs/f2fs/compress.c | 19 ++++++++++++++-----
> 1 file changed, 14 insertions(+), 5 deletions(-)
>
> diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
> index b3c1df9..6b3b3a7 100644
> --- a/fs/f2fs/compress.c
> +++ b/fs/f2fs/compress.c
> @@ -1687,7 +1687,7 @@ static void f2fs_release_decomp_mem(struct decomp=
ress_io_ctx *dic,
> }
>
> static void f2fs_free_dic(struct decompress_io_ctx *dic,
> - bool bypass_destroy_callback);
> + bool bypass_destroy_callback, bool late_free);
>
> struct decompress_io_ctx *f2fs_alloc_dic(struct compress_ctx *cc)
> {
> @@ -1743,12 +1743,12 @@ struct decompress_io_ctx *f2fs_alloc_dic(struct=
compress_ctx *cc)
> return dic;
>
> out_free:
> - f2fs_free_dic(dic, true);
> + f2fs_free_dic(dic, true, false);
> return ERR_PTR(ret);
> }
>
> static void f2fs_free_dic(struct decompress_io_ctx *dic,
> - bool bypass_destroy_callback)
> + bool bypass_destroy_callback, bool late_free)
> {
> int i;
>
> @@ -1775,6 +1775,11 @@ static void f2fs_free_dic(struct decompress_io_c=
tx *dic,
> }
>
> page_array_free(dic->inode, dic->rpages, dic->nr_rpages);
> + if (late_free) {
> + spin_lock(&dic->inode->i_lock);
> + atomic_dec(&dic->inode->i_count);
> + spin_unlock(&dic->inode->i_lock);
If it is the last one release i_count, it needs to call iput_final to evi=
ct inode
like what iput did, so we'd better to call iput() here?
Hi Chao,
Yes, we have also tested this method(iput/__iget), and it worked.
Just think It is simpler and easier to read to directly operate
i_count, and then free it
by relying on the memory module when i_count=3D0.
But It seems iput/__iget is better.
> + }
> kmem_cache_free(dic_entry_slab, dic);
> }
>
> @@ -1783,16 +1788,20 @@ static void f2fs_late_free_dic(struct work_stru=
ct *work)
> struct decompress_io_ctx *dic =3D
> container_of(work, struct decompress_io_ctx, free_work);
>
> - f2fs_free_dic(dic, false);
> + f2fs_free_dic(dic, false, true);
> }
>
> static void f2fs_put_dic(struct decompress_io_ctx *dic, bool in_task)
> {
> if (refcount_dec_and_test(&dic->refcnt)) {
> if (in_task) {
> - f2fs_free_dic(dic, false);
> + f2fs_free_dic(dic, false, false);
> } else {
> INIT_WORK(&dic->free_work, f2fs_late_free_dic);
> + /* to avoid inode is evicted simultaneously */
> + spin_lock(&dic->inode->i_lock);
> + atomic_inc(&dic->inode->i_count);
> + spin_unlock(&dic->inode->i_lock);
iget()?
BTW, can we store i_compress_algorithm in dic to avoid inode access?
Also thought of this method, but it would require more changes.
dic->inode used in f2fs_free_dic are all needed to modify except
i_compress_algorithm.
such as page_array_free(dic->inode),
allow_memalloc_for_decomp(F2FS_I_SB(dic->inode)).
Do you have any other suggestions?
thanks=EF=BC=81
Thanks,
> queue_work(F2FS_I_SB(dic->inode)->post_read_wq,
> &dic->free_work);
> }
Return-Path: <linux-kernel+bounces-673095-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 4B34341E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:50:48 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 8A2AE16A36D
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:50:49 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id BD46C28CF6F;
Wed, 4 Jun 2025 10:50:41 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=vayavyalabs.com header.i=@vayavyalabs.com header.b="mGygoU4J"
Received: from mail-yb1-f172.google.com (mail-yb1-f172.google.com [209.85.219.172])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7758D28C5B6
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:50:39 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.172
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749034241; cv=none; b=uXNxqONYjjZ4C7A3gj0oxPUY/YDUcoFoTN8b/sss13313M1sNnUerPdvHtEp3xJewxi5Dz+bgaCX0zqnX060Ypr/XZg/I2Qe/bc3jUVoRcHJ/bXpEHkcF1VFsSpQ04ZFTTBgSL7VRW8AoZoMmQiaD7JjAw9a8SidekpTMlx00ZM=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749034241; c=relaxed/simple;
bh=jn4nygRnTKj9fV+Xag4PqoajhS/sLBPzpXAKdRZIkSk=;
h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
To:Cc:Content-Type; b=bS6GDgXyNNrDcBwfmArYC/3DGn6pDFECOHGBnwxcVFDLExIn/XqwhJGqep2+m15bAsT4X2KJFx4xcb7r+bmS0otxH2Ssh8xyhtwUyG3e1dUoatIApqv9vwjLEnKnOKCLhr8NI+93YQ2vax436cr17WwqUs9yRa3WVexLfry+lVI=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=vayavyalabs.com; spf=pass smtp.mailfrom=vayavyalabs.com; dkim=pass (1024-bit key) header.d=vayavyalabs.com header.i=@vayavyalabs.com header.b=mGygoU4J; arc=none smtp.client-ip=209.85.219.172
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=vayavyalabs.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=vayavyalabs.com
Received: by mail-yb1-f172.google.com with SMTP id 3f1490d57ef6-e8134dee405so3717805276.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 03:50:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=vayavyalabs.com; s=google; t=1749034238; x=1749639038; darn=vger.kernel.org;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:from:to:cc:subject:date
:message-id:reply-to;
bh=VMikC/irEVPa0Hohnvi6eoO332ZgA2v4xeO8L+pg4Ds=;
b=mGygoU4JVXevxiAZITgyyF3XVDdbmuu3iDvu+ng24VEOTIbFQOCregMuKzvG8Fw/qU
VaF4JzxnOKhKmN2rVrln9q0/8+RiNJyXvzt1KDqOtM3eK/+/DgGWAju6WLKie7o5Kfv/
ROt/aa8DoQRA8EQYhWNp079emtGlEqqy7VRps=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749034238; x=1749639038;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=VMikC/irEVPa0Hohnvi6eoO332ZgA2v4xeO8L+pg4Ds=;
b=pAhPG32AXFYxxCYOrmVis0b1ptcdQ9o296Sxriuk1uhHqMCFXqb6w6U7xxd67kPjNt
HTM0Iw59qpMFisMTPWYUGiO6JYCQTbCipdPpANalEhKeyiosV9rTaoqMxRAf3/IRKJxs
T2a8xRI/CmnC8yhYwa0phYQM7Vja5YXLdw9/k7e9u4HkNER6OnX9aIHlLdmN9LnXAhX6
fpLZIWY9cHLMbtjnU31C8L03npKfUDi07SkHY8WLPQG5LqYT0zW71BNT+Ol3zoxF58SP
KP6Vjc/ZV7vEULO5kHlvvIOLVagTr6UyDwteiQ6G6wGsqFzCdmULsB/SdvGcjbSTXeyX
1otQ==
X-Forwarded-Encrypted: i=1; AJvYcCUGElHWnfdNbUNIWFN8snrglpeMpYcOpFl9aWmunB/9F3xeEljckRrmUodvdajQnGFEHpJPqaej40A9ISQ=@vger.kernel.org
X-Gm-Message-State: AOJu0Yw+NEy7jtOa5bMlpJfwLijQguyKS5fTzE6zICYCmC/5w/xZ55ua
rXp7IGV/I6GLMDGu0+X0dyx7Z9r2waf5kTsptEjZuvzmBWE+p1BAuzV2NK47Bj+uvLl4FtTyS/4
dnOa+mZiqCeWwH4WfM5gWrlv0LQKBXYAR3UVlYpLg/Q==
X-Gm-Gg: ASbGncuXqKQdKs4E4wnKecJDfKiy2HY/gPhtTaY6BDXh6sB9+LnPIzhDPPib4yaZIuG
8ErnUoRGT1FcSgKuEBCXCsm4Cs0sQrQyc4PGjJAAa+GvmALkW4EX+Ok7QqUJxJ3X11HJUtVKd88
3HxX+o442hWfxW03o2F1g3IMzy3ZnDxErnVi2pERD15VBJ
X-Google-Smtp-Source: AGHT+IFWlEF6Prrn96FnW4kqan/Qb0noChaG+ccVxhKjIFms+WNmINJx1a1EqZrB7XhYaXDlzutOFigrnkk7T1KJs8o=
X-Received: by 2002:a05:6902:18d0:b0:e7d:c87a:6249 with SMTP id
3f1490d57ef6-e8179dbababmr3083480276.36.1749034238352; Wed, 04 Jun 2025
03:50:38 -0700 (PDT)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
References: <20250602053231.403143-1-pavitrakumarm@xxxxxxxxxxxxxxx>
<20250602053231.403143-3-pavitrakumarm@xxxxxxxxxxxxxxx> <9f6b4442-1fb0-479d-9514-410d4d8bfd98@xxxxxxxxxx>
<CALxtO0kitR0MnjzPwVT8nsuYThTRX+fbyOH9i2z1KKnCPg1dqg@xxxxxxxxxxxxxx> <ba13c2f1-9b08-4ba7-8093-d55c16143cb2@xxxxxxxxxx>
In-Reply-To: <ba13c2f1-9b08-4ba7-8093-d55c16143cb2@xxxxxxxxxx>
From: Pavitrakumar Managutte <pavitrakumarm@xxxxxxxxxxxxxxx>
Date: Wed, 4 Jun 2025 16:20:27 +0530
X-Gm-Features: AX0GCFvr1jBPQKug_8tsk9gqR4GmtY_mFZiWF1BuLivnsEZbP1Uhfaym79oBKSI
Message-ID: <CALxtO0nVngMjC4cg+d==p7XktnYJ9EgP_cXgwaJ1NOizPCJqZQ@xxxxxxxxxxxxxx>
Subject: Re: [PATCH v3 2/6] Add SPAcc Skcipher support
To: Krzysztof Kozlowski <krzk@xxxxxxxxxx>
Cc: linux-crypto@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, herbert@xxxxxxxxxxxxxxxxxxx, robh@xxxxxxxxxx,
krzk+dt@xxxxxxxxxx, conor+dt@xxxxxxxxxx, Ruud.Derwig@xxxxxxxxxxxx,
manjunath.hadli@xxxxxxxxxxxxxxx, adityak@xxxxxxxxxxxxxxx,
Shweta Raikar <shwetar@xxxxxxxxxxxxxxx>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hi Krzysztof,
Yes, I do understand the use of static tools and the W=3D1 warning
checks on gcc/clang. Anything missed here is not intentional and I am
ready to add more tests and checks before posting patches.
I use Sparse, which did not show any errors or warnings in the code.
make C=3D1 CHECK=3D"sparse" M=3Ddrivers/crypto/dwc-spacc/
make C=3D2 CHECK=3D"sparse" M=3Ddrivers/crypto/dwc-spacc/
I missed Coccinelle, because I had installation problems on my Ubuntu
20.04 workstation, which has the build setup and my cross compilers. I
installed and checked SPAcc code with Coccinelle on another
workstation and I do see errors/warnings in the code.
I will fix all these and any new ones going forward.
cocci.log:25:./spacc_device.c:132:2-9: line 132 is redundant
because platform_get_irq() already prints an error
cocci.log:27:./spacc_device.c:301:3-8: No need to set .owner here.
The core will do it.
cocci.log:50:./spacc_aead.c:575:8-15: ERROR: iterator variable
bound on line 572 cannot be NULL
cocci.log:51:./spacc_skcipher.c:202:8-15: ERROR: iterator variable
bound on line 199 cannot be NULL
cocci.log:52:./spacc_ahash.c:288:8-15: ERROR: iterator variable
bound on line 285 cannot be NULL
cocci.log:59:./spacc_interrupt.c:117:1-7: preceding lock on line 97
(false positive)
Also I do the W=3D1 warning checks with my .config on gcc and clang
COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-13.2.0
~/lkp-tests/kbuild/make.cross W=3D1 C=3D1 CF=3D'-fdiagnostic-prefix
-D__CHECK_ENDIAN__ -fmax-errors=3Dunlimited -fmax-warnings=3Dunlimited'
O=3Dbuild_dir ARCH=3Darm64 SHELL=3D/bin/bash drivers/crypto/dwc-spacc/
COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-14.1.0
~/lkp-tests/kbuild/make.cross W=3D1 O=3Dbuild_dir ARCH=3Darm64
SHELL=3D/bin/bash drivers/crypto/
COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dclang-17
~/lkp-tests/kbuild/make.cross W=3D1 O=3Dbuild_dir ARCH=3Darm64
drivers/crypto/dwc-spacc
Warm regards,
PK
On Tue, Jun 3, 2025 at 5:37=E2=80=AFPM Krzysztof Kozlowski <krzk@xxxxxxxxxx=
wrote:
On 03/06/2025 14:02, Pavitrakumar Managutte wrote:
>> Please run standard kernel tools for static analysis, like coccinelle,
>> smatch and sparse, and fix reported warnings. Also please check for
>> warnings when building with W=3D1 for gcc and clang. Most of these
>> commands (checks or W=3D1 build) can build specific targets, like some
>> directory, to narrow the scope to only your code. The code here looks
>> like it needs a fix. Feel free to get in touch if the warning is not c=
lear.
>>
Confirm that you understood this. You sent us code with obvious flaws
which would be found with tools. It's a proof you did not run these
static tools. It's not the job of community reviewers to replace the
tools. Using us instead of tools is... well, a mistake but if you think
about our limited time then kind of close to inappropriate request. So
did you understand the need of using tools BEFORE you post it?
Best regards,
Krzysztof
Return-Path: <linux-kernel+bounces-673096-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 8CD4B41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:53:07 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id BCF891899485
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:53:17 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id DC7C928DEF9;
Wed, 4 Jun 2025 10:52:54 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="4ly+D30T"
Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2073.outbound.protection.outlook.com [40.107.93.73])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5FCB81B0F17;
Wed, 4 Jun 2025 10:52:52 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.93.73
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749034374; cv=fail; b=O1/AYwlvtzlhZvHZ3Qp4GQXOxquTuSvxA4IKyfncLZF9yUsGt6414u9xq1Ehj2U6rx3IgqRATIe44aaprO1sndQQFOGocVDWdyLDN9sI35zdcj17sLYvjKiBA+6f4HrJyHF8hkaKfgaOeBE/meKFBml0reHddbHqgjc5J4zqEmY=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749034374; c=relaxed/simple;
bh=wcIsxtEeHE9NUPZAvzluYWu4OzNIThL1mdevFRSrVcY=;
h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To:
Content-Type:MIME-Version; b=GkN0i9fi1xcyesvWjvZ7RG+slJGL/VsdfhH5iM5wUoOcuZwvHJRDehaBhCXChxCMvAPbZ06qpRIkMoHdl68SS+VxYKTjK8fnwWVyKb9A0ZfdD1Vj4AD4RIrQvEl4+LGVWgp6HgorWpylIQ38DDegtM92oCq7omZlgbz/ROrzFCk=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=4ly+D30T; arc=fail smtp.client-ip=40.107.93.73
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com
Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=eoS1JvS0P8jH6wExeHJHLVdq7cCA4yQsOKbNgPnQ+7zeYBFxI61yHX6SjISBYauUIRZ9wXo/0oDdiqoxd19HQBXCQlEqH6Ex7JBBQs82UeDb+v71h6Tzy+3G9Jfdwrit74b1JYpw2uCzCaYjpk3yEVUUhecFu11S9AeRQeQcpNH5G/760kXt51bvgSbluRlCtm59EzS5bKAZD4uH1Dc9/0S4agYQGIDA4y0daYROVWc6hw4Dh6Wh0rBJCwDosWwWGea8/FKjEyQl+jRuEMenR9WR1lLdf5qZ+oJkD9itBuLAvNKMhfyK33Hosxr6ObW0+IqhP1kmdg8hNi9K5vbbGg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=AKZSWj69udCLp9IP2Mr4xKsivl0TM7HGBZGc7SfgpV8=;
b=aQb5JizY3dNoOZr/1ArjnDuBwqTLUWVuqYoiKHPSxe/Ww0u5gXuiXgacZFuid+LmNWDkye6ZA2BjHLq2zJCShkhut/CrlMHZfJaY613JdGXniA36NwraITnxMw3FPMRub20RcrlieWEFCladfYTwZXCyGDtM5IGQ85+yAVwP8UWKQcyrKfo2X/iS78B2tQt9azujU+koSyN/DHKssMlSnO6K9cUumwl3ta0RHI2DFh5Oo6ZFLQ5v90P+yGsHzGZ72RhfrEsvMzf+U7Dz5+dz0tJeeb3WT33ktP79cxaJOJWWrWWf5OL2vraFsC/8vypFR54aBu96GcEfHLsfMW4dWw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass
header.d=amd.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=AKZSWj69udCLp9IP2Mr4xKsivl0TM7HGBZGc7SfgpV8=;
b=4ly+D30Tl7AyuZ+fxnS/s/ubsdU4o00zDHn5KJUFRaTb969dnj8hbJJZynJl9Uv16ZnmZ8IPiUTY6VMI/8jRZ57iQKARu8NbYSZt6iBdW72RrWG8W0ZcE1EYkXAUnIsF86dmVy9JZg2bNmvx6s5C0oUQsnDWxHZTaeTusj9Geb0=
Received: from CH3PR12MB9171.namprd12.prod.outlook.com (2603:10b6:610:1a2::5)
by PH7PR12MB9073.namprd12.prod.outlook.com (2603:10b6:510:2eb::22) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.34; Wed, 4 Jun
2025 10:52:48 +0000
Received: from CH3PR12MB9171.namprd12.prod.outlook.com
([fe80::4c1:7aaa:e0b2:ebd0]) by CH3PR12MB9171.namprd12.prod.outlook.com
([fe80::4c1:7aaa:e0b2:ebd0%4]) with mapi id 15.20.8792.034; Wed, 4 Jun 2025
10:52:47 +0000
From: "Joseph, Abin" <Abin.Joseph@xxxxxxx>
To: Andrew Lunn <andrew@xxxxxxx>
CC: "nicolas.ferre@xxxxxxxxxxxxx" <nicolas.ferre@xxxxxxxxxxxxx>,
"claudiu.beznea@xxxxxxxxx" <claudiu.beznea@xxxxxxxxx>,
"andrew+netdev@xxxxxxx" <andrew+netdev@xxxxxxx>, "davem@xxxxxxxxxxxxx"
<davem@xxxxxxxxxxxxx>, "edumazet@xxxxxxxxxx" <edumazet@xxxxxxxxxx>,
"kuba@xxxxxxxxxx" <kuba@xxxxxxxxxx>, "pabeni@xxxxxxxxxx" <pabeni@xxxxxxxxxx>,
"git (AMD-Xilinx)" <git@xxxxxxx>, "netdev@xxxxxxxxxxxxxxx"
<netdev@xxxxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx"
<linux-kernel@xxxxxxxxxxxxxxx>
Subject: RE: [PATCH net-next] net: macb: Add shutdown operation support
Thread-Topic: [PATCH net-next] net: macb: Add shutdown operation support
Thread-Index: AQHb1JwRPoJ9JHDVV0yZ8utTANT4R7PxlxIAgAE7qaA=
Date: Wed, 4 Jun 2025 10:52:47 +0000
Message-ID:
<CH3PR12MB9171B307A46A01455DBBA241FC6CA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20250603152724.3004759-1-abin.joseph@xxxxxxx>
<3f3a9687-1dea-41fb-8567-1186d4fa2df2@xxxxxxx>
In-Reply-To: <3f3a9687-1dea-41fb-8567-1186d4fa2df2@xxxxxxx>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
msip_labels:
MSIP_Label_dce362fe-1558-4fb5-9f64-8a6240d76441_ActionId=18e6ddb4-1fe7-4b3d-97b4-4e863d4ea4b0;MSIP_Label_dce362fe-1558-4fb5-9f64-8a6240d76441_ContentBits=0;MSIP_Label_dce362fe-1558-4fb5-9f64-8a6240d76441_Enabled=true;MSIP_Label_dce362fe-1558-4fb5-9f64-8a6240d76441_Method=Standard;MSIP_Label_dce362fe-1558-4fb5-9f64-8a6240d76441_Name=AMD
Internal Distribution
Only;MSIP_Label_dce362fe-1558-4fb5-9f64-8a6240d76441_SetDate=2025-06-04T10:46:49Z;MSIP_Label_dce362fe-1558-4fb5-9f64-8a6240d76441_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d;MSIP_Label_dce362fe-1558-4fb5-9f64-8a6240d76441_Tag=10,
3, 0, 1;
authentication-results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=amd.com;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: CH3PR12MB9171:EE_|PH7PR12MB9073:EE_
x-ms-office365-filtering-correlation-id: bdf238bd-aee8-4794-03eb-08dda355f1a9
x-ld-processed: 3dd8961f-e488-4e60-8e11-a82d994e183d,ExtAddr
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam:
BCL:0;ARA:13230040|1800799024|376014|7416014|366016|38070700018;
x-microsoft-antispam-message-info:
=?us-ascii?Q?JakUonl5DGYB0/TzUkvdspNMIzWkVcPjSPVAx1zkvW3FfqC4ljmep6iC/YUw?=
=?us-ascii?Q?pLUD2ChoVSNKCXKIrqfnnVehW2GNBnq+uxZFCBcCa5wZdcwT2OsPCbUkEKGe?=
=?us-ascii?Q?ss3bcc9+zUbaCCfDHaF3ehI+8FNo7LsSeHNx95ZuqAXxPsmbzeBBGniRsZgV?=
=?us-ascii?Q?WjpPX5J88LPkJt8CAQsFvSNk2oL5c6czgJ3Zby1J6iPyaFxct3NgkwZDImMP?=
=?us-ascii?Q?VkzgK/Ipu6QOthhzhp3tBs39lzXVnnZipaudXH3aFFBS4I9GuffRIowuEHhR?=
=?us-ascii?Q?3+5yzapvKCPqNA+h47SqqVqYVi1iKjtfoA+/kwKtTGdX64IWjsVg5d1SenY0?=
=?us-ascii?Q?LWEhIvXayka1/Fvi1MUmF5EpxVBEa9FxG/aGagQ/gSMVzFc0OtBjJLm0kzdx?=
=?us-ascii?Q?leJnFy+UbG/QHI5VonYDAimDHJ43DDY+qkpXmIEaRSvBGNLzoYqtmFbSGEWY?=
=?us-ascii?Q?Js0tq/71AhYR8vDM1/iHUhz7Wu7+3II+WUkvLQ0XWdt8ZEjWwmomk9asYHpS?=
=?us-ascii?Q?bHON2hzWYTFfrIskibfNTUCA6gjJQMlOoi3sfyWf2Bl9ThvUe2O6PWafRAi4?=
=?us-ascii?Q?+i7ihyDbUSdBhcTQOWw3LFp3KLTYRjsrfHOtmViQgptIVfWHeSC/27KVcTs1?=
=?us-ascii?Q?FNmcHPUvn56vI1mh+TEvtqAyPAHG1fwAg55KZRLUnw42kg0cCOFQo3He9nyr?=
=?us-ascii?Q?XnU9XBAOtNx4ejtwV35zvwZg3UH/I5sqiGVT9e1hAD/PK2XDCN9XVl71YyN+?=
=?us-ascii?Q?4CWYPnpR31dTqPllEnHKX6T/SxmKxpUHqOg51LSWKvnOJYJYY/ZW0kU5M64t?=
=?us-ascii?Q?mh45t4Fgp9mQzB2a15u8p6RXSke+ab4n5rEK0mI7kKxAEn9lrlX8a6OmaXgH?=
=?us-ascii?Q?NGbC6KiGsU6bRK9i6lpJJpWSoAgaqDYrzSUw+ZVP2UcqOFvM4J6MNklbtLwj?=
=?us-ascii?Q?V5kwF9O3KzSLux9xYJel3LQNKBzJtkcOFYbxyqVcFqsCApFqJWgh3C6fxGdB?=
=?us-ascii?Q?MrParFaTJj9KfZDOlyEIIeLgQ/lgDo35ZNwVvo4rKZoauB9y15l/D4hCgF3r?=
=?us-ascii?Q?4pVCZuOc9NV6kq1iXvI4hNCIPlvLzt5+rkQQGqJx17DzK4R0s2obZVbVBhwT?=
=?us-ascii?Q?HYIxTCrzaT+wv9DOQtFEnEg1w/caBwYngOPKgP19z6rFiIhT0QblZx+PrRj6?=
=?us-ascii?Q?V1PaKL4SamzZHRd+0gWJ8NZgYATD8QOO/4n2gxpchmlwvUzsDdDyHlViFnZX?=
=?us-ascii?Q?+/9qMTl7CBQtyNRHSceuZvntnuJAm4ayyMf3cExaP/RA/4BEoRAQ2lMZjEOn?=
=?us-ascii?Q?uBte38mfWZjw9x2XxkN+PhNp3D4dIvxhXETf/Q9kELPCEKGB3g5B0yECqkim?=
=?us-ascii?Q?3lVujAhThWeZ3kv771LvJTf0ozhvo7kx8EOEDYSOMKDpdKLPnuZK7l6p8NrG?=
=?us-ascii?Q?LgfyjRoTq1BZwZm10VRX9OLjEOfXFf2XkCFyf8VusWkvKDaOptWlM4ysANFc?=
=?us-ascii?Q?IpLMa9rA858o7Dg=3D?=
x-forefront-antispam-report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CH3PR12MB9171.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(376014)(7416014)(366016)(38070700018);DIR:OUT;SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0:
=?us-ascii?Q?Rt4Ix0SkBmPiXuxWXeoWglAPKaaZnkk1bbGW9alp8aVDuPV46I8TXarpVD2o?=
=?us-ascii?Q?sfwcNQM6e7+iN6BUmhY0HlJZh42UrQ+AlyOP9mCrS8L6trA7Bijk+WFTVVtA?=
=?us-ascii?Q?MKpr4WJQmXzq2//0+AezSWVw98sS/R9zb4DAX71x8YP9dVa8gphtrCM6TmLL?=
=?us-ascii?Q?G6bkHBkQnbnEshH3UH/Ast6wDRWhh/WmRt0FcaiB8zLJ8/2NPSLtlMqsW/1w?=
=?us-ascii?Q?KlHy7Y5qP9ZhgsMU1nrtZv4EVKkHD9Ig1elTqXq5yqL3EXGm/1io0qvTnYRv?=
=?us-ascii?Q?GCD5GZKwKMqASWQn/gpcmicd/MRY/N+yr3ZBVUm7MBLfXWRbyjtQrWBKgkoe?=
=?us-ascii?Q?0ErX6TZoJqO3ZzRTJSn5ucocd6V5yKiITzZn4j5wo85ecVTNK4f/QUDBwX0N?=
=?us-ascii?Q?OD1DCMQiKOXkTM1b1uKdBpGVHBVsxR7LXsZ/l78Z4WA1Otg6dkY2jpAtHmr8?=
=?us-ascii?Q?dWKrfvJ8o93dFZTXDmue8htCo6x+JiqM9kfpCltKtne3ELMV3pTyLm1eRIvs?=
=?us-ascii?Q?KwqG7lLgQLw3dyZOYz+KtWeja+5zYEx6DAZccdpUCBMy/xbT12/QkHdiGfQ4?=
=?us-ascii?Q?iq5TBG0R+dJRiXB0GB6W31ajtzcilE5QOC9yJxz5yWMuSwrm41TjUUMtaZlx?=
=?us-ascii?Q?HjFfSFPmkXtZWXNYwdj8OSijN5z/Suwi609/vaeWZ6MyRRBXvrjTK4UIQAtk?=
=?us-ascii?Q?yVebe1/fYxkQihK9IqGbvN3ieJt92loIE5cDFEoAK4R9P229/Zl7FTn035vv?=
=?us-ascii?Q?vSeX1/NFl9wCgpTqA9BtRqRlwd+EtumutUNGlKLoLKGe3cVuYy3grEaD6zQZ?=
=?us-ascii?Q?PtMfYI4i+1Xi+5PIgdswPKzkVu2A6yaws8QirqvYW4YI1fa6lTcKuDUc9gRj?=
=?us-ascii?Q?BxLDl01CT1sH4RZisJs9bYI9l/6FP4ZqlIa2gOd1TdO/uHxUJ/lAUeA6dxQV?=
=?us-ascii?Q?Oeq8RVy0xRyqVe0vWrpZu6+488x4aLfzblLlS8xR8VZe2wCW31SUeSra8oSt?=
=?us-ascii?Q?hTtJbmQ1p1wnO/96nQJADIEeCB43U9XROY0x5Xnf4BcARgy0M1xbbwu7pPkX?=
=?us-ascii?Q?KYniQBEnv0CzwcTLbsuKvKVfCk8pw5XeY0HpxbVRn/t6yHmCz2ap511rff1H?=
=?us-ascii?Q?sDlZtSAvbE5w1aJd+fzh8NupR8lr2Y1pE9rKrySLwUh7SvcRWsmnYtYt191j?=
=?us-ascii?Q?pC1KnDSIn8NiHmINb9wDYjzhBOHWg5BafZ/zlWeqaMHGmfUK0ylvdepnwxbA?=
=?us-ascii?Q?FiCWSVGbqhBXXvpeY6EJgEJJEriz+a0D6rMClA0BBoKRfewhXKWPNu/psM39?=
=?us-ascii?Q?RIwnAdKKryObFk+eLdWi/HcqRsSTGYrKWAXdOPV6v0gQ+pm1Zo9ICgUh0UKH?=
=?us-ascii?Q?Hb2MZKBiFJnHxKzlPv/JR2JaeOxwTVegCj2n4T0Tm0SKDlIieS/I3gaDxR72?=
=?us-ascii?Q?b6QXt5BtJhb66IwpEuW4JLG2mOR6XgtQdIT55M8tdp65qTpLK0sfFuL27ls2?=
=?us-ascii?Q?UaU4S4ZppIT5gqtCJ4KXi/PxTU1Qqx8tkFFS/DlUJjrJTgYrtzxdvWjKSCsg?=
=?us-ascii?Q?zfNVgl+gU9YPJglq2mw=3D?=
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-OriginatorOrg: amd.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: CH3PR12MB9171.namprd12.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: bdf238bd-aee8-4794-03eb-08dda355f1a9
X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jun 2025 10:52:47.8249
(UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: aZidJSJG0tXO4tMNGBvO/BFPAGDtLZqNuHf0zQFc31SsX9aQ7SlzR6fX57IKEXZX
X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB9073
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
[AMD Official Use Only - AMD Internal Distribution Only]
Hi Andrew,
-----Original Message-----
From: Andrew Lunn <andrew@xxxxxxx>
Sent: Tuesday, June 3, 2025 9:27 PM
To: Joseph, Abin <Abin.Joseph@xxxxxxx>
Cc: nicolas.ferre@xxxxxxxxxxxxx; claudiu.beznea@xxxxxxxxx;
andrew+netdev@xxxxxxx; davem@xxxxxxxxxxxxx; edumazet@xxxxxxxxxx;
kuba@xxxxxxxxxx; pabeni@xxxxxxxxxx; git (AMD-Xilinx) <git@xxxxxxx>;
netdev@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
Subject: Re: [PATCH net-next] net: macb: Add shutdown operation support
Caution: This message originated from an External Source. Use proper cauti=
on when
opening attachments, clicking links, or responding.
+static void macb_shutdown(struct platform_device *pdev) {
+ struct net_device *netdev =3D dev_get_drvdata(&pdev->dev);
+
+ netif_device_detach(netdev);
+ dev_close(netdev);
+}
Have you tried this on a device which was admin down? It seems like you ge=
t
unbalanced open()/close() calls.
Yes, I tested this on a device which was admin down using "ifconfig eth0 do=
wn". I observed that macb_close() is invoked only once,
specifically when the interface is bought down. During the kexec call the s=
hutdown hook is triggered, but the close() won't be called
In this scenario.
Regards,
Abin Joseph
Andrew
Return-Path: <linux-kernel+bounces-673097-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 85E3841E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:53:23 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id DB43F177E74
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:53:20 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id E5C5428EA44;
Wed, 4 Jun 2025 10:52:57 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=icenowy.me header.i=uwu@xxxxxxxxxx header.b="q6ZoxAlo"
Received: from sender4-op-o12.zoho.com (sender4-op-o12.zoho.com [136.143.188.12])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 73A7428DB55;
Wed, 4 Jun 2025 10:52:54 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.188.12
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749034376; cv=pass; b=jjZq/cjerStY6zPuhWrs0VkEAiwJGPEQ21DieEQF0MxUC7S7K8fn4Pkjb3CjhR6esJpnHUw43sdrYs6r/tjp9i1PRuuxs6K9NjMGC7YBjpcbQAa8xhbbf2iCyimwB+ryZhwrw4cJnppXmRuNcTBWH7dAeWi1RhaBlP2O9ouSs1k=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749034376; c=relaxed/simple;
bh=nR/LHrJoVGLjUqxTxpxdGWVYuwJ60L9TMZkpjlQV3HU=;
h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References:
Content-Type:MIME-Version; b=Mh2reNUvupCg5AkxeWOhFV/1R+YW26jfDEwVdZnErCAiPOOJLWnOIbhMYY72M4NYOhgbA/YXIr0sbL2bOSMkp43oPZPhdI7jRugzzdFvxqkAPzvrpcUi7dh/pvCoi0eBwNF6V45KzzW+r/oZT9/gOCDz1iVU1QmaeUgeMmsMLY4=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=icenowy.me; spf=pass smtp.mailfrom=icenowy.me; dkim=pass (2048-bit key) header.d=icenowy.me header.i=uwu@xxxxxxxxxx header.b=q6ZoxAlo; arc=pass smtp.client-ip=136.143.188.12
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=icenowy.me
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=icenowy.me
ARC-Seal: i=1; a=rsa-sha256; t=1749034338; cv=none;
d=zohomail.com; s=zohoarc;
b=R9riRJJ/sv0Li6EH/rmyeFTBjxmehFkTOcdm/E4NPApNXOdsYR7YpxJTG0PGcoIvpI81suJ/DDlgY8V/LbwEq2n4Sxq7xjLMeCcAd1jS6UafGGlDgjTDBRQsMXESuz/fgZgYhXVFc9BZ0kkb+lxDDOOazoW7HCWHyiUkr1LsmQI=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc;
t=1749034338; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To;
bh=nR/LHrJoVGLjUqxTxpxdGWVYuwJ60L9TMZkpjlQV3HU=;
b=VdugbJyo72ec55W7FAszckRO4ct43KCenjwfrqSIsXYuQZeNq9dziF3kLwIicqrLWHEDHug3lkiHAxWrFlB1uC3XJB/V9mdz4D1P2yvqSWJE3kNcrkyPmZF6009kYcvsp14/XjjxpDsgQ77wf/r2frv6NsZ/Gg7G161l9ffj1iI=
ARC-Authentication-Results: i=1; mx.zohomail.com;
dkim=pass header.i=icenowy.me;
spf=pass smtp.mailfrom=uwu@xxxxxxxxxx;
dmarc=pass header.from=<uwu@xxxxxxxxxx>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1749034338;
s=zmail2; d=icenowy.me; i=uwu@xxxxxxxxxx;
h=Message-ID:Subject:Subject:From:From:To:To:Cc:Cc:Date:Date:In-Reply-To:References:Content-Type:Content-Transfer-Encoding:MIME-Version:Message-Id:Reply-To;
bh=nR/LHrJoVGLjUqxTxpxdGWVYuwJ60L9TMZkpjlQV3HU=;
b=q6ZoxAlo0pMnzbwoQgrVifuA8LaCYqMPMU37ajb8OV4pViUxjKqzlsNOrnnZORpH
3DCGJavzD22yErAxviuOOIq6yHS23jVyPoZtnYT9nytiERNlbiHSj6/AuBvPa3h5SMt
qogWNA/MkHTz0uK4F0tZeq4dkBVOgPX6BnjXvRFzGp/HyUPvV1G9Z3TjsAhhUWa/Eb6
QE0NqDPGaJvhhlZ82O3NNSM67QN5MMtJtWiD91m2ilaYlwsBw9LNJL2qj1F56CMxArI
x/18oDNlreHUcxfhk9FRV9ktxg+33ZNVe1n4tTTS4rdfGi6Drch7rSChpj/FuVQd6So
03N4qU1Aig==
Received: by mx.zohomail.com with SMTPS id 1749034336346498.96758739824725;
Wed, 4 Jun 2025 03:52:16 -0700 (PDT)
Message-ID: <e4db4e6f0a5a42ceacacc925adbe13747a6f948e.camel@xxxxxxxxxx>
Subject: Re: [PATCH net v2] dt-bindings: net: ethernet-controller: Add
informative text about RGMII delays
From: Icenowy Zheng <uwu@xxxxxxxxxx>
To: Andrew Lunn <andrew@xxxxxxx>, Rob Herring <robh@xxxxxxxxxx>
Cc: Andrew Lunn <andrew+netdev@xxxxxxx>, "David S. Miller"
<davem@xxxxxxxxxxxxx>, Eric Dumazet <edumazet@xxxxxxxxxx>, Jakub Kicinski
<kuba@xxxxxxxxxx>, Paolo Abeni <pabeni@xxxxxxxxxx>, Krzysztof Kozlowski
<krzk+dt@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>, Chaoyi Chen
<chaoyi.chen@xxxxxxxxxxxxxx>, Matthias Schiffer
<matthias.schiffer@xxxxxxxxxxxxxxx>, "Russell King (Oracle)"
<linux@xxxxxxxxxxxxxxx>, Heiner Kallweit <hkallweit1@xxxxxxxxx>,
netdev@xxxxxxxxxxxxxxx, devicetree@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
Date: Wed, 04 Jun 2025 18:52:06 +0800
In-Reply-To: <20250430-v6-15-rc3-net-rgmii-delays-v2-1-099ae651d5e5@xxxxxxx>
References: <20250430-v6-15-rc3-net-rgmii-delays-v2-1-099ae651d5e5@xxxxxxx>
Organization: Anthon Open-Source Community
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
User-Agent: Evolution 3.44.4
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-ZohoMailClient: External
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
=E5=9C=A8 2025-04-30=E6=98=9F=E6=9C=9F=E4=B8=89=E7=9A=84 11:21 -0500=EF=BC=
=8CAndrew Lunn=E5=86=99=E9=81=93=EF=BC=9A
Device Tree and Ethernet MAC driver writers often misunderstand RGMII
delays. Rewrite the Normative section in terms of the PCB, is the PCB
adding the 2ns delay. This meaning was previous implied by the
definition, but often wrongly interpreted due to the ambiguous
wording
and looking at the definition from the wrong perspective. The new
definition concentrates clearly on the hardware, and should be less
ambiguous.
=20
Add an Informative section to the end of the binding describing in
detail what the four RGMII delays mean. This expands on just the PCB
meaning, adding in the implications for the MAC and PHY.
=20
Additionally, when the MAC or PHY needs to add a delay, which is
software configuration, describe how Linux does this, in the hope of
reducing errors. Make it clear other users of device tree binding may
implement the software configuration in other ways while still
conforming to the binding.
Sorry for my late disturbance (so late that this patch is already
included in released version), but I have some questions about this...
=20
Fixes: 9d3de3c58347 ("dt-bindings: net: Add YAML schemas for the
generic Ethernet options")
Signed-off-by: Andrew Lunn <andrew@xxxxxxx>
Acked-by: Conor Dooley <conor.dooley@xxxxxxxxxxxxx>
---
Changes in v2:
Reword Normative section
manor->manner
add when using phylib/phylink
request details in the commit message and .dts comments
clarify PHY -internal-delay-ps values being depending on rgmii-X
mode.
Link to v1:
https://lore.kernel.org/r/20250429-v6-15-rc3-net-rgmii-delays-v1-1-f52664=
945741@xxxxxxx
---
=C2=A0.../bindings/net/ethernet-controller.yaml=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 | 97
++++++++++++++++++++--
=C2=A01 file changed, 90 insertions(+), 7 deletions(-)
=20
=20
---
base-commit: d4cb1ecc22908ef46f2885ee2978a4f22e90f365
change-id: 20250429-v6-15-rc3-net-rgmii-delays-8a00c4788fa7
=20
Best regards,
=20
diff --git a/Documentation/devicetree/bindings/net/ethernet-
controller.yaml b/Documentation/devicetree/bindings/net/ethernet-
controller.yaml
index
45819b2358002bc75e876eddb4b2ca18017c04bd..a2d4c626f659a57fc7dcd39301f
322c28afed69d 100644
--- a/Documentation/devicetree/bindings/net/ethernet-controller.yaml
+++ b/Documentation/devicetree/bindings/net/ethernet-controller.yaml
@@ -74,19 +74,17 @@ properties:
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 - rev-rmii
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 - moca
=C2=A0
-=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # RX and TX delays are added by the MAC w=
hen required
+=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # RX and TX delays are provided by the PC=
B. See below
This really sounds like a breaking change that changes the meaning of
the definition of this item instead of simply rewording.
Everything written according to the original description is broken by
this change.
In addition, considering this is set as a property of the MAC device
tree node, it's more natural to represents the perspective of MAC,
instead of only describing what's on the PCB.
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 - rgmii
=C2=A0
-=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # RGMII with internal RX and TX delays pr=
ovided by the PHY,
-=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # the MAC should not add the RX or TX del=
ays in this case
+=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # RX and TX delays are not provided by th=
e PCB. This is the
most
+=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # frequent case. See below
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 - rgmii-id
=C2=A0
-=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # RGMII with internal RX delay provided b=
y the PHY, the MAC
-=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # should not add an RX delay in this case
+=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # TX delay is provided by the PCB. See be=
low
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 - rgmii-rxid
=C2=A0
-=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # RGMII with internal TX delay provided b=
y the PHY, the MAC
-=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # should not add an TX delay in this case
+=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 # RX delay is provided by the PCB. See be=
low
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 - rgmii-txid
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 - rtbi
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 - smii
@@ -286,4 +284,89 @@ allOf:
=C2=A0
=C2=A0additionalProperties: true
=C2=A0
+# Informative
+# =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
+#
+# 'phy-modes' & 'phy-connection-type' properties 'rgmii', 'rgmii-
id',
+# 'rgmii-rxid', and 'rgmii-txid' are frequently used wrongly by
+# developers. This informative section clarifies their usage.
+#
+# The RGMII specification requires a 2ns delay between the data and
+# clock signals on the RGMII bus. How this delay is implemented is
not
+# specified.
+#
+# One option is to make the clock traces on the PCB longer than the
+# data traces. A sufficiently difference in length can provide the
2ns
+# delay. If both the RX and TX delays are implemented in this
manner,
+# 'rgmii' should be used, so indicating the PCB adds the delays.
+#
+# If the PCB does not add these delays via extra long traces,
+# 'rgmii-id' should be used. Here, 'id' refers to 'internal delay',
+# where either the MAC or PHY adds the delay.
+#
+# If only one of the two delays are implemented via extra long clock
+# lines, either 'rgmii-rxid' or 'rgmii-txid' should be used,
+# indicating the MAC or PHY should implement one of the delays
+# internally, while the PCB implements the other delay.
+#
+# Device Tree describes hardware, and in this case, it describes the
+# PCB between the MAC and the PHY, if the PCB implements delays or
+# not.
+#
+# In practice, very few PCBs make use of extra long clock lines.
Hence
+# any RGMII phy mode other than 'rgmii-id' is probably wrong, and is
+# unlikely to be accepted during review without details provided in
+# the commit description and comments in the .dts file.
+#
+# When the PCB does not implement the delays, the MAC or PHY must.=C2=A0
As
+# such, this is software configuration, and so not described in
Device
+# Tree.
Usually, in this case, this isn't pure software configuration but
already described as '?x-internal-delay-ps' (or in some legacy cases,
'vendor,?x-delay-ps') property in the MAC.
+#
+# The following describes how Linux implements the configuration of
+# the MAC and PHY to add these delays when the PCB does not. As
stated
+# above, developers often get this wrong, and the aim of this
section
+# is reduce the frequency of these errors by Linux developers. Other
+# users of the Device Tree may implement it differently, and still
be
+# consistent with both the normative and informative description
+# above.
+#
+# By default in Linux, when using phylib/phylink, the MAC is
expected
+# to read the 'phy-mode' from Device Tree, not implement any delays,
+# and pass the value to the PHY. The PHY will then implement delays
as
+# specified by the 'phy-mode'. The PHY should always be reconfigured
+# to implement the needed delays, replacing any setting performed by
+# strapping or the bootloader, etc.
+#
+# Experience to date is that all PHYs which implement RGMII also
+# implement the ability to add or not add the needed delays. Hence
+# this default is expected to work in all cases. Ignoring this
default
+# is likely to be questioned by Reviews, and require a strong
argument
+# to be accepted.
Although these PHYs are able to implement (or not to implement) the
delay, it's not promised that this could be overriden by the kernel
instead of being set up as strap pins.
Take Realtek GbE PHYs, which I am most familiar with, as examples. The
Linux realtek netphy driver supports overriding delay configuration
only for RTL8211E/F. From Internet, RTL8211B/C/E/F datasheets could be
found. All of them contain RXDLY/TXDLY strap pins, but neither of them
mention any register to config the delays, which means that on
RTL8211B/C there's no known way to override them (the only known , and
on RTL8211E/F the way to override them are undocumented registers from
unknown origin (which means no support from Realtek themselves are
available). I do partly participate a dramatic case about RTL8211E:
there were some Pine A64+ boards with broken RTL8211E that have some
delay-chain related issues, and Pine64 only got magic numbers from
Realtek to fix them (the magic numbers happen to match current RTL8211E
delay configuration code in realtek driver and show that RXDLY is
overriden to disabled).
In addition, the Linux kernel contains a "Generic PHY" driver for any
802.1 c22 PHYs to work, without setting any delays. With this driver
it's impossible to let the PHY "always be reconfigured", and
enabling/disabling the PHY-specific driver may lead to behavior change
(when enabling the specific driver, the configuration is overriden;
when disabling it, the strap pin configuration is used). Well
personally I think the driver should give out a warning when it can
read out strip pin status and it does not match the DT configuration).
The DT binding (and phylib) currently also lacks any way to describe
"respect the hardware strapping delay configuration of PHY".
+#
+# There are a small number of cases where the MAC has hard coded
+# delays which cannot be disabled. The 'phy-mode' only describes the
+# PCB.=C2=A0 The inability to disable the delays in the MAC does not
change
+# the meaning of 'phy-mode'. It does however mean that a 'phy-mode'
of
+# 'rgmii' is now invalid, it cannot be supported, since both the PCB
+# and the MAC and PHY adding delays cannot result in a functional
+# link. Thus the MAC should report a fatal error for any modes which
Considering compatibilty, should this be just a warning (which usually
means a wrong phy-mode setup) instead of a fatal error?
+# cannot be supported. When the MAC implements the delay, it must
+# ensure that the PHY does not also implement the same delay. So it
+# must modify the phy-mode it passes to the PHY, removing the delay
it
+# has added. Failure to remove the delay will result in a
+# non-functioning link.
In case of the MAC implementing a '?x-internal-delay-ps' property, when
should the MAC stripping delays from phy-mode? Should the phy-mode be
changed when MAC delaying 100ps? Should it be changed when MAC delaying
1000ps? And if the PHY could be reprogrammed to do the delay and the
property contains a big value that is higher than 2000ps, should the
software switch to do the delay in PHY and decrease the MAC side delay
by 2000ps?
Besides this, do we have any existing MAC driver that implements
stripping the delay from passing to PHY? How should we maintain
compatibilty between a DT that does not consider MAC driver delay
stripping and a driver that considers this? DTs are expected to be
backward compatible, and if this problem could not be solved, we can
never implement this intended MAC delay stripping.
My personal idea here, which reflects the current practice of most
drivers/DTs I read and leads to no known breaking change, is to make
the "phy-mode" property of the MAC node represents how the MAC expects
external components (PCB+PHY), and, assuming no significant PCB delay,
just pass this value to PHY instead. The MAC side delay shouldn't be
considered and represented in this property, but extra properties, like
'?x-internal-delay-ps' should be used instead.
+#
+# Sometimes there is a need to fine tune the delays. Often the MAC
or
+# PHY can perform this fine tuning. In the MAC node, the Device Tree
+# properties 'rx-internal-delay-ps' and 'tx-internal-delay-ps'
should
+# be used to indicate fine tuning performed by the MAC. The values
+# expected here are small. A value of 2000ps, i.e 2ns, and a phy-
mode
+# of 'rgmii' will not be accepted by Reviewers.
BTW the MAC might be very powerful on introducing delays, e.g. it can
have delay lines on data pins in addition to clock pins (in case of
data pins are delayed, this could be considered as a "negative clock
delay"), or some hardware might be able to do per-data-pin data delay
(to compensate HW trace length inconsistency). Should these be
considered by the standard binding, or should these be left to vendored
properties?
+#
+# If the PHY is to perform fine tuning, the properties
+# 'rx-internal-delay-ps' and 'tx-internal-delay-ps' in the PHY node
+# should be used. When the PHY is implementing delays, e.g. 'rgmii-
id'
+# these properties should have a value near to 2000ps. If the PCB is
+# implementing delays, e.g. 'rgmii', a small value can be used to
fine
+# tune the delay added by the PCB.
=C2=A0...
Return-Path: <linux-kernel+bounces-673098-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 8E34541E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:55:08 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id A96683A55EE
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:54:46 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 09C9628DB55;
Wed, 4 Jun 2025 10:55:04 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="DmqZ2f/7"
Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0CC102C327E
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:55:00 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.41
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749034503; cv=none; b=kDDXBZiu78fAA1UXhaitiyGReShXvxRNMIvHTJn7dPyZjTjO5rwzVOIpBvz42m1QeKCj3QdccSREBU3Ab5k6IE1xbkrEg827MsXXRJ9LFdQOADAxQofyku3hT2hoRb9cuQyIWzU98tqoky8WCyIFnHkF7BKTVCsWO6vYod11n2c=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749034503; c=relaxed/simple;
bh=wHcPCwGxUmVNyXsXAbEWS06LpX11YizruvdQuxUc2nc=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=rDGuooB/k3qgXQOP0zihwieISKhlVg+UzKzV5R++w7Bug9oIfihSNDYwVGZQKU0dUhsNAsvy5qX2WCMRrw3IUEwz1ZXiQJ55uN9/0K0KtSpL18QasmjO/fXINhjAfsI3s49wCpEIjs3EXo8RGsgAl+XGQTGqZNPFOs4DItCkNNw=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=DmqZ2f/7; arc=none smtp.client-ip=209.85.208.41
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com
Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-60477f1a044so11461896a12.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 03:55:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=suse.com; s=google; t=1749034499; x=1749639299; darn=vger.kernel.org;
h=content-transfer-encoding:in-reply-to:autocrypt:content-language
:from:references:cc:to:subject:user-agent:mime-version:date
:message-id:from:to:cc:subject:date:message-id:reply-to;
bh=RQiFSzh7MNKglOz6npvfpvqQ53FTFZpnQ2JPeQGyeBo=;
b=DmqZ2f/7xb7Sv7MfX9F9zhrxevIp647ORCu2vS/sESxgAngqoo0650o7xXbZVUhUBR
z+o/OYGdcbyoyINPZpNP/r1+lhsmRCvwFfJjJduLz5/dfNPFByjK6XflB3FX0yQuoROy
qbKogYgRErElOVgp1B2Dfhlk2rI7hRWLM+5dOizF5rTsqpj4gATOql2pr1fAe8Wdr9WB
j8hrLJ/Ihp7dgxQ4Aqzm2S8bbPvN2IgcOT4gK4TeSB8XGxkhNzHwDUraJbpIsCVHXSrM
z4FC84AOLkC8vXT4ITWsL8G0/9dYKt+1lUqVrksb56c6LC6fuyLRfLB48KUyqnvjC2PB
oSMQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749034499; x=1749639299;
h=content-transfer-encoding:in-reply-to:autocrypt:content-language
:from:references:cc:to:subject:user-agent:mime-version:date
:message-id:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=RQiFSzh7MNKglOz6npvfpvqQ53FTFZpnQ2JPeQGyeBo=;
b=LGhVZ4vL/OUMYym3hfPELuTLKYbgFD6zRUOp4jv2XoX/9lGdIuNGQWJ7GmB+/Ef9oa
0BPjP/5HvQaDKkj3W23bvnoB+gioW721VYZjEJbDoyrfkanwGJJvtENfBQ6Ma3zbMytf
wyOV9TPEk9aA4WCOoMLcel3dvM3FLKSqLeodqPeQTfAVO05Ck4Ujpx425MsuxaGsB+V4
Ug92KE3Qbi/ed9xxSird8ZOn2mEglBYSty9fcewjzAwcOlXZiWfWJvktFWL+y/7s+leA
4y52rPDeN81+v5AV/ubDmcMpgjfUXCID/D7nVWQZo18A9Dk9BKWbT6Q8Y81DoydWpzz9
IaNw==
X-Forwarded-Encrypted: i=1; AJvYcCXVFx8QvMiuG5QKBVr3XoFz9/4Z2QZTjo0eTPVVQBLi5RzKdpabwreTHz6ebsu5kQnS/HgtyP896geTGfs=@vger.kernel.org
X-Gm-Message-State: AOJu0Yzl/SQtj36Zdhe+W92PLZnsgWT9RWhknq4v3bDizO7lW4ScHHpV
AvfjLuBVQ7LUr9+ED9pwu+a+ovik5of8rhVOOP7c2xQsqHxBbBDQj832PdyPDpUMzUQytcGzpzm
WJ9rs
X-Gm-Gg: ASbGnctHNXlbrdpQTWpkPc2SP6s0sz2QasbFfJIlNHYz7VjGNe5seUknDcF84zHhv51
IypEIwSsnenemx23SK/AB4nY655ywVGTN/9GQZdu5r6oKFi2BUI2KEOeJP4ZZkbNz9Ujyw1532Z
Y54PPRdmVD03bnYBN2pVy7WBLV7hxIFbyxu5DesUuQOJKsYS2kFUbrDqnvYPm9xGCLp1KYGvY+g
3abMyBTiO2RD8jo257JIzyL6V+nARz2fkcOJZks/uWWvMFPBH0V77yTcsEai1ks3M+7dzWUKaai
07CkjrF3fNPel16ypJGkeDGZYXAaBoXh5Knjm2hAtdLf+/+RcWrnGESM
X-Google-Smtp-Source: AGHT+IFP6tIqlCqjMTmuclDNXygh6kzxDV1hmxofL/JCB/Rdjr7vcC3zqFjLhJMAwf2l24JZ8HagTA==
X-Received: by 2002:a17:906:4fc7:b0:adb:2bb2:ed1 with SMTP id a640c23a62f3a-addf8f24e35mr197693166b.40.1749034499177;
Wed, 04 Jun 2025 03:54:59 -0700 (PDT)
Received: from [192.168.0.20] ([212.21.159.167])
by smtp.gmail.com with ESMTPSA id a640c23a62f3a-adb390f09d7sm844311066b.148.2025.06.04.03.54.58
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 03:54:58 -0700 (PDT)
Message-ID: <73aaf67c-3ece-4a9f-989d-a1d4aae6ab69@xxxxxxxx>
Date: Wed, 4 Jun 2025 13:54:57 +0300
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH] x86/its: Always return a writable page for dynamic thunks
To: x86@xxxxxxxxxx
Cc: pawan.kumar.gupta@xxxxxxxxxxxxxxx, peterz@xxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, dave.hansen@xxxxxxxxxxxxxxx
References: <20250604104715.700149-1-nik.borisov@xxxxxxxx>
From: Nikolay Borisov <nik.borisov@xxxxxxxx>
Content-Language: en-US
Autocrypt: addr=nik.borisov@xxxxxxxx; keydata=
xsFNBGcrpvIBEAD5cAR5+qu30GnmPrK9veWX5RVzzbgtkk9C/EESHy9Yz0+HWgCVRoNyRQsZ
7DW7vE1KhioDLXjDmeu8/0A8u5nFMqv6d1Gt1lb7XzSAYw7uSWXLPEjFBtz9+fBJJLgbYU7G
OpTKy6gRr6GaItZze+r04PGWjeyVUuHZuncTO7B2huxcwIk9tFtRX21gVSOOC96HcxSVVA7X
N/LLM2EOL7kg4/yDWEhAdLQDChswhmdpHkp5g6ytj9TM8bNlq9I41hl/3cBEeAkxtb/eS5YR
88LBb/2FkcGnhxkGJPNB+4Siku7K8Mk2Y6elnkOctJcDvk29DajYbQnnW4nhfelZuLNupb1O
M0912EvzOVI0dIVgR+xtosp66bYTOpX4Xb0fylED9kYGiuEAeoQZaDQ2eICDcHPiaLzh+6cc
pkVTB0sXkWHUsPamtPum6/PgWLE9vGI5s+FaqBaqBYDKyvtJfLK4BdZng0Uc3ijycPs3bpbQ
bOnK9LD8TYmYaeTenoNILQ7Ut54CCEXkP446skUMKrEo/HabvkykyWqWiIE/UlAYAx9+Ckho
TT1d2QsmsAiYYWwjU8igXBecIbC0uRtF/cTfelNGrQwbICUT6kJjcOTpQDaVyIgRSlUMrlNZ
XPVEQ6Zq3/aENA8ObhFxE5PLJPizJH6SC89BMKF3zg6SKx0qzQARAQABzSZOaWtvbGF5IEJv
cmlzb3YgPG5pay5ib3Jpc292QHN1c2UuY29tPsLBkQQTAQoAOxYhBDuWB8EJLBUZCPjT3SRn
XZEnyhfsBQJnK6byAhsDBQsJCAcCAiICBhUKCQgLAgQWAgMBAh4HAheAAAoJECRnXZEnyhfs
XbIQAJxuUnelGdXbSbtovBNm+HF3LtT0XnZ0+DoR0DemUGuA1bZAlaOXGr5mvVbTgaoGUQIJ
3Ejx3UBEG7ZSJcfJobB34w1qHEDO0pN9orGIFT9Bic3lqhawD2r85QMcWwjsZH5FhyRx7P2o
DTuUClLMO95GuHYQngBF2rHHl8QMJPVKsR18w4IWAhALpEApxa3luyV7pAAqKllfCNt7tmed
uKmclf/Sz6qoP75CvEtRbfAOqYgG1Uk9A62C51iAPe35neMre3WGLsdgyMj4/15jPYi+tOUX
Tc7AAWgc95LXyPJo8069MOU73htZmgH4OYy+S7f+ArXD7h8lTLT1niff2bCPi6eiAQq6b5CJ
Ka4/27IiZo8tm1XjLYmoBmaCovqx5y5Xt2koibIWG3ZGD2I+qRwZ0UohKRH6kKVHGcrmCv0J
YO8yIprxgoYmA7gq21BpTqw3D4+8xujn/6LgndLKmGESM1FuY3ymXgj5983eqaxicKpT9iq8
/a1j31tms4azR7+6Dt8H4SagfN6VbJ0luPzobrrNFxUgpjR4ZyQQ++G7oSRdwjfIh1wuCF6/
mDUNcb6/kA0JS9otiC3omfht47yQnvod+MxFk1lTNUu3hePJUwg1vT1te3vO5oln8lkUo9BU
knlYpQ7QA2rDEKs+YWqUstr4pDtHzwQ6mo0rqP+zzsFNBGcrpvIBEADGYTFkNVttZkt6e7yA
LNkv3Q39zQCt8qe7qkPdlj3CqygVXfw+h7GlcT9fuc4kd7YxFys4/Wd9icj9ZatGMwffONmi
LnUotIq2N7+xvc4Xu76wv+QJpiuGEfCDB+VdZOmOzUPlmMkcJc/EDSH4qGogIYRu72uweKEq
VfBI43PZIGpGJ7TjS3THX5WVI2YNSmuwqxnQF/iVqDtD2N72ObkBwIf9GnrOgxEyJ/SQq2R0
g7hd6IYk7SOKt1a8ZGCN6hXXKzmM6gHRC8fyWeTqJcK4BKSdX8PzEuYmAJjSfx4w6DoxdK5/
9sVrNzaVgDHS0ThH/5kNkZ65KNR7K2nk45LT5Crjbg7w5/kKDY6/XiXDx7v/BOR/a+Ryo+lM
MffN3XSnAex8cmIhNINl5Z8CAvDLUtItLcbDOv7hdXt6DSyb65CdyY8JwOt6CWno1tdjyDEG
5ANwVPYY878IFkOJLRTJuUd5ltybaSWjKIwjYJfIXuoyzE7OL63856MC/Os8PcLfY7vYY2LB
cvKH1qOcs+an86DWX17+dkcKD/YLrpzwvRMur5+kTgVfXcC0TAl39N4YtaCKM/3ugAaVS1Mw
MrbyGnGqVMqlCpjnpYREzapSk8XxbO2kYRsZQd8J9ei98OSqgPf8xM7NCULd/xaZLJUydql1
JdSREId2C15jut21aQARAQABwsF2BBgBCgAgFiEEO5YHwQksFRkI+NPdJGddkSfKF+wFAmcr
pvICGwwACgkQJGddkSfKF+xuuxAA4F9iQc61wvAOAidktv4Rztn4QKy8TAyGN3M8zYf/A5Zx
VcGgX4J4MhRUoPQNrzmVlrrtE2KILHxQZx5eQyPgixPXri42oG5ePEXZoLU5GFRYSPjjTYmP
ypyTPN7uoWLfw4TxJqWCGRLsjnkwvyN3R4161Dty4Uhzqp1IkNhl3ifTDYEvbnmHaNvlvvna
7+9jjEBDEFYDMuO/CA8UtoVQXjy5gtOhZZkEsptfwQYc+E9U99yxGofDul7xH41VdXGpIhUj
4wjd3IbgaCiHxxj/M9eM99ybu5asvHyMo3EFPkyWxZsBlUN/riFXGspG4sT0cwOUhG2ZnExv
XXhOGKs/y3VGhjZeCDWZ+0ZQHPCL3HUebLxW49wwLxvXU6sLNfYnTJxdqn58Aq4sBXW5Un0Q
vfbd9VFV/bKFfvUscYk2UKPi9vgn1hY38IfmsnoS8b0uwDq75IBvup9pYFyNyPf5SutxhFfP
JDjakbdjBoYDWVoaPbp5KAQ2VQRiR54lir/inyqGX+dwzPX/F4OHfB5RTiAFLJliCxniKFsM
d8eHe88jWjm6/ilx4IlLl9/MdVUGjLpBi18X7ejLz3U2quYD8DBAGzCjy49wJ4Di4qQjblb2
pTXoEyM2L6E604NbDu0VDvHg7EXh1WwmijEu28c/hEB6DwtzslLpBSsJV0s1/jE=
In-Reply-To: <20250604104715.700149-1-nik.borisov@xxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 6/4/25 13:47, Nikolay Borisov wrote:
its_alloc unconditionally allocates and return a ROX page, but setting
it RW is predicated on its_mod being set. This can cause a #GP on the
memset in its_allocate_thunk() if its_mod is not set.
Since the function always returns a page, ensure it's always set
writable so it can be initialized properly.
Fixes: 872df34d7c51 ("x86/its: Use dynamic thunks for indirect branches")
Signed-off-by: Nikolay Borisov <nik.borisov@xxxxxxxx>
---
arch/x86/kernel/alternative.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
index ecfe7b497cad..191e909636a5 100644
--- a/arch/x86/kernel/alternative.c
+++ b/arch/x86/kernel/alternative.c
@@ -199,6 +199,8 @@ static void *its_alloc(void)
if (!page)
return NULL;
+ execmem_make_temp_rw(page, PAGE_SIZE);
Actually this is not sufficient, in case we don't have its_mod set ergo
its_fini_mod won't be executed I guess execmem_restore_rox should also
be executed in its_allocate_thunk iff its_mod is not set?
+
#ifdef CONFIG_MODULES
if (its_mod) {
void *tmp = krealloc(its_mod->its_page_array,
@@ -210,7 +212,6 @@ static void *its_alloc(void)
its_mod->its_page_array = tmp;
its_mod->its_page_array[its_mod->its_num_pages++] = page;
- execmem_make_temp_rw(page, PAGE_SIZE);
}
#endif /* CONFIG_MODULES */
Return-Path: <linux-kernel+bounces-673099-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 74B4541E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:56:11 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 454963A56C9
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:55:49 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id CB33428DF03;
Wed, 4 Jun 2025 10:56:04 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="tTqGyC6r"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 05BA52C327E;
Wed, 4 Jun 2025 10:56:03 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749034564; cv=none; b=HwVzQhJf3qvT/orUP0TthJpcmF4EizmDL70j5tZcYiLxsN/ndS8pmWfR0OQELx7EmXmdRSbQzG4u4AjVXZQvUdEvo7vBfiBmU20224sQC379jXS2+ls55QKN8AzlmqLyAGNvJbLncZDmXJ/di3J+CBC+vhgK6UxvmPi2D2/W/gg=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749034564; c=relaxed/simple;
bh=PTR/RCyK2e6HQxlFTyr65MmvnXHyyyrK+apYSD459UU=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=iBsGxxJAl4DNBjHlwF88vW7s9qAblUgRywvomS8Sy8ANMSSJPD+xhK/Jdpi/w6dq+srjGXkKoiGGmQs1fRIyy6mMP3YCz20rTsDPHARvA7UpLxT0Njxyh137VS98DUQi4b6Q2Ehay4rRkjUblweg5mrH749c3Kaf22Wqusjsm8E=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=tTqGyC6r; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id DDF3FC4CEE7;
Wed, 4 Jun 2025 10:56:02 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org;
s=korg; t=1749034563;
bh=PTR/RCyK2e6HQxlFTyr65MmvnXHyyyrK+apYSD459UU=;
h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
b=tTqGyC6r69NMq/Ro36XGPbxC/P5UWL2ERimFZMcuP+Q2B4ERq2KH3bD0hv51hd3gK
Pfu6xr0Ous+eV+CzuZ/CDzQqED0rfYygjSUnHMIs73kPjjwbpPjPGGngTqKHI9530i
pkUn94A5uuX9Nl9Ew1GUlYh1V7nWAjrx4V6T1vOw=
Date: Wed, 4 Jun 2025 12:56:00 +0200
From: Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx>
To: Guan-Yu Lin <guanyulin@xxxxxxxxxx>
Cc: mathias.nyman@xxxxxxxxx, gargaditya08@xxxxxxxx, kekrby@xxxxxxxxx,
jeff.johnson@xxxxxxxxxxxxxxxx, quic_zijuhu@xxxxxxxxxxx,
andriy.shevchenko@xxxxxxxxxxxxxxx, ben@xxxxxxxxxxxxxxx,
broonie@xxxxxxxxxx, quic_wcheng@xxxxxxxxxxx,
krzysztof.kozlowski@xxxxxxxxxx, sumit.garg@xxxxxxxxxx,
linux-usb@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
Subject: Re: [PATCH v14 0/4] Support system sleep with offloaded usb transfers
Message-ID: <2025060407-geologic-excuse-9ca5@gregkh>
References: <20250604082449.2029156-1-guanyulin@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20250604082449.2029156-1-guanyulin@xxxxxxxxxx>
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 08:23:06AM +0000, Guan-Yu Lin wrote:
Wesley Cheng and Mathias Nyman's USB offload design enables a co-processor
to handle some USB transfers, potentially allowing the system to sleep
(suspend-to-RAM) and save power. However, Linux's System Sleep model halts
the USB host controller when the main system isn't managing any USB
transfers. To address this, the proposal modifies the system to recognize
offloaded USB transfers and manage power accordingly. This way, offloaded
USB transfers could still happen during system sleep (Suspend-to-RAM).
This involves two key steps:
1. Transfer Status Tracking: Propose offload_usage and corresponding apis
drivers could track USB transfers on the co-processor, ensuring the
system is aware of any ongoing activity.
2. Power Management Adjustment: Modifications to the USB driver stack
(xhci host controller driver, and USB device drivers) allow the system to
sleep (Suspend-to-RAM) without disrupting co-processor managed USB
transfers. This involves adding conditional checks to bypass some power
management operations in the System Sleep model.
Is there a reason you aren't cc:ing the developers from a "big android
device company" that is currently testing and finding problems with this
patchset in their device testing? I will require their signed-off-by or
tested-by in order to even consider accepting this patch series based on
the issues they seem to be finding with it in an
internal-company-bug-reporting-platform that I seem to be also copied
on.
thanks,
greg k-h
Return-Path: <linux-kernel+bounces-673100-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 710C141E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 06:56:48 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 56A423A2E91
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:56:23 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 39B2B28DF38;
Wed, 4 Jun 2025 10:56:35 +0000 (UTC)
Received: from mail-il1-f206.google.com (mail-il1-f206.google.com [209.85.166.206])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id D44F628D8C4
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:56:32 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.206
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749034594; cv=none; b=OdUCqXgYDGRk7FgmIFkYt0RNn3X+bpT28J43x58jfESXT5rZGhriU7z3yC7gBG50NMjRqwRvTN63OYZJiQh27VTaZsx1f/ytZkpeA6yvhJ9fprZlXc9sw4aos7FZ2xr9v1+GwHqh2/nrMALNi5IF1B0hwpEvnG7UBEHEoBr0Qng=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749034594; c=relaxed/simple;
bh=T+zYEIAmMmpAzN1ze+g1gfi5HhEkkGrf3dbSzfbrWjQ=;
h=MIME-Version:Date:Message-ID:Subject:From:To:Content-Type; b=TiRQtbWC+aDyxFoTpfkuynjMHJGmbAJOgnBQpMNjCrmUDnf9rluwk6rItaQO8uNxuSiKNha1DIZIhu2NeTN5fv/lFA6pa44xOsnag9DXsZfaMscACL3Z6kJFXxgT4huZDgJaEJkZcOniLsk8FZABSUfXV9nJOKHDZY7RsAe2BS4=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.166.206
Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com
Received: by mail-il1-f206.google.com with SMTP id e9e14a558f8ab-3ddb62de753so28339635ab.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 03:56:32 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749034592; x=1749639392;
h=to:from:subject:message-id:date:mime-version:x-gm-message-state
:from:to:cc:subject:date:message-id:reply-to;
bh=9H9I0I6jfZojHPAuDECm5OdoTjhXs2NEC2Che2TNBsM=;
b=hQ9z7uoQGZJ+WK9cqXyLXpoK+APqm8fwRNYsgVIK6xBJl8IWlQyPE9QtDdRyttPmqs
Hp9Y46VvUEoGHLlzkm6MbnPmAJyCJxOCEAK11NLc1SNr0oQaVWs5CZmtNfR5JuoJMR/d
8LoGwNMMwrrZb5Ss3Cau7tqPa091ndlh2PgOJ9IH43XsEY5QasZ61pPEwuKfHTvarc3F
DENRNhrmozPLR/Divcir8xxxk7YMdETYFlgC21HNjyhskW3/3OrKzcOEd72yRX9B1XtV
G4riQHs1NA4F492YYkURbV2nG/avYs7QVXdVILD9l6MHTjFoFNCVbNBO/8Ahk10nIJYx
Jt0Q==
X-Forwarded-Encrypted: i=1; AJvYcCWTXDSJORis5DwHHekbmsrDoTDYEt8jf6JyolxI0e97Y0tDM/H5zENbhlJCbwq5+MDBxShObARwcT+TQIY=@vger.kernel.org
X-Gm-Message-State: AOJu0YzDxDPKljbL2Ty9yqyEXLPu/3TwV7/RxD/h8ploIwEQ+51T6F0U
aB+zyDCLjWq6rdmCXltf+H8cB2sQ7oMWcCGU+nkXsfMYQwqsA86uursN0Bn+IPayUOastHyi1QX
iJVJUoeQPftviSL6TfnAm569G5N9mSdorhOelIguevLKAddI7o9YuVNHQzsU=
X-Google-Smtp-Source: AGHT+IGkDC1m7T/sZhA1CzDZGOPEYypkra9gBAnM6ErQK7mA6H0Ft7U4WI4bzOy3kCcvFqpWL09GKkKRjYyUoWJ2p6rK4xOtursK
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-Received: by 2002:a05:6e02:378c:b0:3dc:757b:3fb3 with SMTP id
e9e14a558f8ab-3ddbede5cb9mr25417395ab.20.1749034591917; Wed, 04 Jun 2025
03:56:31 -0700 (PDT)
Date: Wed, 04 Jun 2025 03:56:31 -0700
X-Google-Appengine-App-Id: s~syzkaller
X-Google-Appengine-App-Id-Alias: syzkaller
Message-ID: <6840265f.a00a0220.d4325.0009.GAE@xxxxxxxxxx>
Subject: [syzbot] [net?] general protection fault in dev_set_group
From: syzbot <syzbot+9fc858ba0312b42b577e@xxxxxxxxxxxxxxxxxxxxxxxxx>
To: davem@xxxxxxxxxxxxx, edumazet@xxxxxxxxxx, horms@xxxxxxxxxx,
kuba@xxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx,
pabeni@xxxxxxxxxx, syzkaller-bugs@xxxxxxxxxxxxxxxx
Content-Type: text/plain; charset="UTF-8"
X-Spam-Status: No, score=-0.5 required=5.0 tests=FROM_LOCAL_HEX,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SORTED_RECIPS,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no
version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hello,
syzbot found the following issue on:
HEAD commit: b56bbaf8c9ff Merge branch 'net-airoha-fix-ipv6-hw-accelera..
git tree: net
console+strace: https://syzkaller.appspot.com/x/log.txt?x=11947c82580000
kernel config: https://syzkaller.appspot.com/x/.config?x=262b2977ef00756b
dashboard link: https://syzkaller.appspot.com/bug?extid=9fc858ba0312b42b577e
compiler: Debian clang version 20.1.6 (++20250514063057+1e4d39e07757-1~exp1~20250514183223.118), Debian LLD 20.1.6
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=1122780c580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=15947c82580000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/dfc603506ef3/disk-b56bbaf8.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/531e9b9a7cff/vmlinux-b56bbaf8.xz
kernel image: https://storage.googleapis.com/syzbot-assets/001a9016bbc6/bzImage-b56bbaf8.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+9fc858ba0312b42b577e@xxxxxxxxxxxxxxxxxxxxxxxxx
netlink: 'syz-executor579': attribute type 1 has an invalid length.
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000055: 0000 [#1] SMP KASAN PTI
KASAN: null-ptr-deref in range [0x00000000000002a8-0x00000000000002af]
CPU: 1 UID: 0 PID: 5834 Comm: syz-executor579 Not tainted 6.15.0-syzkaller-07817-gb56bbaf8c9ff #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
RIP: 0010:netdev_need_ops_lock include/net/netdev_lock.h:33 [inline]
RIP: 0010:netdev_lock_ops include/net/netdev_lock.h:41 [inline]
RIP: 0010:dev_set_group+0xc0/0x230 net/core/dev_api.c:82
Code: 03 43 80 3c 2f 00 74 08 48 89 df e8 4a 40 d4 f8 41 bd a8 02 00 00 4c 03 2b 4c 89 e8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <80> 3c 08 00 74 08 4c 89 ef e8 22 40 d4 f8 31 c0 49 83 7d 00 00 0f
RSP: 0018:ffffc9000417ee60 EFLAGS: 00010206
RAX: 0000000000000055 RBX: ffff8880227e4008 RCX: dffffc0000000000
RDX: 0000000000000000 RSI: 0000000055690764 RDI: ffff8880227e4000
RBP: ffff8880227e4000 R08: 0000000000400dc0 R09: 00000000ffffffff
R10: dffffc0000000000 R11: fffffbfff1f41637 R12: 0000000000000000
R13: 00000000000002a8 R14: 1ffff110044fc998 R15: 1ffff110044fc801
FS: 000055556089f380(0000) GS:ffff888125d66000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000563942114448 CR3: 000000007d85a000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
rtnl_create_link+0x748/0xd10 net/core/rtnetlink.c:3674
rtnl_newlink_create+0x25c/0xb00 net/core/rtnetlink.c:3813
__rtnl_newlink net/core/rtnetlink.c:3940 [inline]
rtnl_newlink+0x16d6/0x1c70 net/core/rtnetlink.c:4055
rtnetlink_rcv_msg+0x7cf/0xb70 net/core/rtnetlink.c:6944
netlink_rcv_skb+0x208/0x470 net/netlink/af_netlink.c:2534
netlink_unicast_kernel net/netlink/af_netlink.c:1313 [inline]
netlink_unicast+0x75b/0x8d0 net/netlink/af_netlink.c:1339
netlink_sendmsg+0x805/0xb30 net/netlink/af_netlink.c:1883
sock_sendmsg_nosec net/socket.c:712 [inline]
__sock_sendmsg+0x219/0x270 net/socket.c:727
____sys_sendmsg+0x505/0x830 net/socket.c:2566
___sys_sendmsg+0x21f/0x2a0 net/socket.c:2620
__sys_sendmsg net/socket.c:2652 [inline]
__do_sys_sendmsg net/socket.c:2657 [inline]
__se_sys_sendmsg net/socket.c:2655 [inline]
__x64_sys_sendmsg+0x19b/0x260 net/socket.c:2655
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fa5080a6369
Code: 48 83 c4 28 c3 e8 37 17 00 00 0f 1f 80 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd3dfbc8b8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 00007ffd3dfbca88 RCX: 00007fa5080a6369
RDX: 0000000000000000 RSI: 0000200000000280 RDI: 0000000000000003
RBP: 00007fa508119610 R08: 0000000000000000 R09: 00007ffd3dfbca88
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001
R13: 00007ffd3dfbca78 R14: 0000000000000001 R15: 0000000000000001
</TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:netdev_need_ops_lock include/net/netdev_lock.h:33 [inline]
RIP: 0010:netdev_lock_ops include/net/netdev_lock.h:41 [inline]
RIP: 0010:dev_set_group+0xc0/0x230 net/core/dev_api.c:82
Code: 03 43 80 3c 2f 00 74 08 48 89 df e8 4a 40 d4 f8 41 bd a8 02 00 00 4c 03 2b 4c 89 e8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df <80> 3c 08 00 74 08 4c 89 ef e8 22 40 d4 f8 31 c0 49 83 7d 00 00 0f
RSP: 0018:ffffc9000417ee60 EFLAGS: 00010206
RAX: 0000000000000055 RBX: ffff8880227e4008 RCX: dffffc0000000000
RDX: 0000000000000000 RSI: 0000000055690764 RDI: ffff8880227e4000
RBP: ffff8880227e4000 R08: 0000000000400dc0 R09: 00000000ffffffff
R10: dffffc0000000000 R11: fffffbfff1f41637 R12: 0000000000000000
R13: 00000000000002a8 R14: 1ffff110044fc998 R15: 1ffff110044fc801
FS: 000055556089f380(0000) GS:ffff888125c66000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000000000045ad50 CR3: 000000007d85a000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
----------------
Code disassembly (best guess):
0: 03 43 80 add -0x80(%rbx),%eax
3: 3c 2f cmp $0x2f,%al
5: 00 74 08 48 add %dh,0x48(%rax,%rcx,1)
9: 89 df mov %ebx,%edi
b: e8 4a 40 d4 f8 call 0xf8d4405a
10: 41 bd a8 02 00 00 mov $0x2a8,%r13d
16: 4c 03 2b add (%rbx),%r13
19: 4c 89 e8 mov %r13,%rax
1c: 48 c1 e8 03 shr $0x3,%rax
20: 48 b9 00 00 00 00 00 movabs $0xdffffc0000000000,%rcx
27: fc ff df
* 2a: 80 3c 08 00 cmpb $0x0,(%rax,%rcx,1) <-- trapping instruction
2e: 74 08 je 0x38
30: 4c 89 ef mov %r13,%rdi
33: e8 22 40 d4 f8 call 0xf8d4405a
38: 31 c0 xor %eax,%eax
3a: 49 83 7d 00 00 cmpq $0x0,0x0(%r13)
3f: 0f .byte 0xf
---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@xxxxxxxxxxxxxxxx.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup
Return-Path: <linux-kernel+bounces-673101-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id E121E41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:00:21 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id A65421721FF
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:00:21 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id C0BA228EA56;
Wed, 4 Jun 2025 11:00:12 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BZ2MRuyK"
Received: from mail-qv1-f51.google.com (mail-qv1-f51.google.com [209.85.219.51])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8564E28E610;
Wed, 4 Jun 2025 11:00:10 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.51
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749034812; cv=none; b=g7pfxw4lwi0QhWW1mv66Yq96HEvBw4Frr9xUF0FNjDYb65S3MeKqGV3VOHlH0Lt6pT1yyPDzQW0lMI5ILpvzms8Ud885qi5t9Z0EY5BRHQY/NrIoB2qXBB4Ms9b1KIbSSe9p0ETw9FXJME3kjQfYGbVqH7hD4+0EIJEGF+es55Q=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749034812; c=relaxed/simple;
bh=Schw2RsYLQNpi+xEERdg/mqlrK2JYXvaTEsebGb49Qo=;
h=From:Content-Type:Mime-Version:Subject:Date:Message-Id:References:
Cc:In-Reply-To:To; b=anSyolsIVfXow+E49868S2ZT/chg0/Wb5UFjh2F55blx37dePxBKL5m/VAEwgD9BVmEIhOOx6V1+ZjmdLneCLOQeVUjQn9C0lDdpKLzyqS55qYjJD7u2PcEajH5mSXaxyNX4UGhCc1srGGRXzJTwGnMPNu93zfaA5+vV2ZtNHhQ=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=BZ2MRuyK; arc=none smtp.client-ip=209.85.219.51
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
Received: by mail-qv1-f51.google.com with SMTP id 6a1803df08f44-6fadd3ad18eso41105676d6.2;
Wed, 04 Jun 2025 04:00:10 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1749034809; x=1749639609; darn=vger.kernel.org;
h=to:in-reply-to:cc:references:message-id:date:subject:mime-version
:content-transfer-encoding:from:from:to:cc:subject:date:message-id
:reply-to;
bh=Schw2RsYLQNpi+xEERdg/mqlrK2JYXvaTEsebGb49Qo=;
b=BZ2MRuyKYoHD8j+DnuImZItXZQ3K8DKvbsQt62JPHfNF02NjNOAX6BzTTtydTgdT5G
nS4tC94c58sPEaEW+OJoFZoYs0+s+C8tNLYqpl9AYG8s5aIBN7bnftYjJ8Fqp0BoOIx4
slFXTw8ChywA/pz0jrbWNGvHwg1rct8tpDJso1DHkble7l8mJ314UTrrWdozLonk/kaa
2+0P4xubQmEHpE3/piEhfaI4nQblCLuKGIo99nqVyMG3pBACELG0HAxGlqG/HuygqrI5
qXyLBXu5HPs7i/cxyxjhlY4vHGvyT9sMtrza5uqM+BwkJAWQ1wNUFPc2dmKcr0yswYja
9ARw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749034809; x=1749639609;
h=to:in-reply-to:cc:references:message-id:date:subject:mime-version
:content-transfer-encoding:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=Schw2RsYLQNpi+xEERdg/mqlrK2JYXvaTEsebGb49Qo=;
b=rIu1At9fVPdw47ykXecSZ9kMxUqiDRGF8q65qsD73qjTlg50WhTGAv/S6yiVQ4gKMQ
eCeSXdOJ2nTplaNualTyru7lnneuo6BmFa8iYuC5kVY42EfjDzlSSAjLdvCaEsotsW+B
rxQ0II/FLRizladPsEnQTUoE220zeMD8SWVHV27liKukWi2VJNL/5Iu+446yb8aeOtyp
gpufPQDDygGONo72nkWSFyqowYs3npPcZ0S/X3TiGsNiMYwIPVfPZGP2N1khNtAQmxPf
x6KfaKMJMUIH9NDgUiNDF+Zc+DeTD2NLjjiGE0KstxovGechzqQC2pXpYFlAjmR+/jLf
9U5g==
X-Forwarded-Encrypted: i=1; AJvYcCU5tMW+MZAi0UF/KeERsOUWicdZz9rFMc8lx0tmG8OJrbQVI/p5+f+Yo5z2p39d6BTaFwF8YuEfXkESqqM=@vger.kernel.org, AJvYcCWmwiDXNUw9pNgtKCQa1Q0ibvU5SkKzX6eEEYqkZ60Qk58Ti62G/9kf2jqS0JzVwoOWN7mKtWRJjfmxlBzz6qs=@vger.kernel.org, AJvYcCWubQjVnxcBCjJzYS8MF6y0+zlQWEoc3j0q5bReFlazmoEJEY8tNZ1yX77EDmfsbsTcrxd3mA4rHQjYyw==@vger.kernel.org
X-Gm-Message-State: AOJu0YxYGa6v5z2CBTquYErqSoKtzpqp2mk0MYIu1yotm5YKla3enP+6
oldmlMTxDvy6WOXDdrrewyk7xs/I88/R5a7dlLfb+JdtQyJlFwEeD1MP
X-Gm-Gg: ASbGncvjRbMaDbJAL9I3clIO4kLqC2a36kjitQDG0WbqFPYOlZEguWxEV6hPhESqVvJ
bB5Qmzosr7tD0YZIyeQABqP1YEmPFPYDdITxDRx0MmV5Q/y0XIcchkLdJ6bZJkrRdhe4G5aoFe1
tdAUDhMkrjj5g0ghIudDaFGEx9egovnqw+0cKrYMoLU3kP/8QJVzMYfXQCu43jFfgsdejvWGfjF
cb+W4p5v47lACb8Y9+O+OVcRORjLWhKnL46D9Mw73iplV4f8Dk6Ncm1RidgT6xkfmCS1f7zmXbh
iQLcKQT2m4EZWXnFflkvfM+w16zCeuR1IgxKkSv06Ld1bMusXBnWT4KXqM8i3BbwR9yzE1WhnJL
8Ky94QUuzy5tUqi2vZDXoUkVx2TpVvONTk8xktbbrWw==
X-Google-Smtp-Source: AGHT+IEqSF8mjarZ/kRpcwxU9I19cNQnsgHots4Mmgea27/PfoN1l+IsQDKOfP8c8Ri0J7J4W7BS0g==
X-Received: by 2002:ad4:5ce2:0:b0:6fa:bb44:fddf with SMTP id 6a1803df08f44-6faf6e87e98mr35729696d6.16.1749034808945;
Wed, 04 Jun 2025 04:00:08 -0700 (PDT)
Received: from smtpclient.apple (104-12-136-65.lightspeed.irvnca.sbcglobal.net. [104.12.136.65])
by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6fafb6899dasm3364456d6.21.2025.06.04.04.00.08
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 04:00:08 -0700 (PDT)
From: Rudraksha Gupta <guptarud@xxxxxxxxx>
X-Google-Original-From: Rudraksha Gupta <GuptaRud@xxxxxxxxx>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
Mime-Version: 1.0 (1.0)
Subject: Re: REGRESSION: armv7 build mismatched types
Date: Wed, 4 Jun 2025 03:59:56 -0700
Message-Id: <C830877D-1EC4-4F94-947B-8B5CD7E09546@xxxxxxxxx>
References: <CANiq72kghKg7FU=W_yO_q9VuCf=smiyzvrcU8oOFG2FFFsOQiA@xxxxxxxxxxxxxx>
Cc: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>,
Thorsten Leemhuis <linux@xxxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx,
Linux regressions mailing list <regressions@xxxxxxxxxxxxxxx>,
rust-for-linux@xxxxxxxxxxxxxxx, Miguel Ojeda <ojeda@xxxxxxxxxx>,
Linux Next Mailing List <linux-next@xxxxxxxxxxxxxxx>
In-Reply-To: <CANiq72kghKg7FU=W_yO_q9VuCf=smiyzvrcU8oOFG2FFFsOQiA@xxxxxxxxxxxxxx>
To: Miguel Ojeda <miguel.ojeda.sandonis@xxxxxxxxx>
X-Mailer: iPhone Mail (20H360)
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Perfect! Works for me now, thanks :)
Thanks,
Rudraksha
Return-Path: <linux-kernel+bounces-673102-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id EF6E041E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:00:50 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id B92A07A956C
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:59:30 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 0AA2428DB7E;
Wed, 4 Jun 2025 11:00:45 +0000 (UTC)
Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id C2AE128DF15
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:00:42 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749034844; cv=none; b=TjnGm0dK9yrwakEDIhBQADYaLeUv/+J1zBAP55g4MGRRgH56mBSIqu2LFagAsYUcxUv3RsamNGBVG7sYpbBgyOMb1ByQTbis3xsymVdsnAJhunQJpC5xboLCrakSW15LAIPPOAWyMebyb78m8/82Hx9KyBZHJfkq+QMjuqBkOaM=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749034844; c=relaxed/simple;
bh=v/veQCLfrMcIRAj6dJqLlBlutbTVZR6wTEh4vNB9rjU=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=AtzlArl8lLLvJKsTMDfvXWqdTPlUJ6oUahdSh2bfv0HDqqXUCyGuFfHP2iAISDj1UJXQX2pdy0iqz4WsHfXhb/+vEWK/Dd8jE8XlBgx6hpPKEr1//Iw1UWs1XtaqLP6yb3nxoIL4d/qQknfGd3i/RfR8Ak0GjuyK2mjaMjvXLI0=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de
Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2])
by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.92)
(envelope-from <s.hauer@xxxxxxxxxxxxxx>)
id 1uMlrD-0000Jr-37; Wed, 04 Jun 2025 13:00:31 +0200
Received: from dude02.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::28])
by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
(Exim 4.96)
(envelope-from <s.hauer@xxxxxxxxxxxxxx>)
id 1uMlrC-001mPi-2B;
Wed, 04 Jun 2025 13:00:30 +0200
Received: from localhost ([::1] helo=dude02.red.stw.pengutronix.de)
by dude02.red.stw.pengutronix.de with esmtp (Exim 4.96)
(envelope-from <s.hauer@xxxxxxxxxxxxxx>)
id 1uMlrC-001JDN-1w;
Wed, 04 Jun 2025 13:00:30 +0200
From: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 13:00:30 +0200
Subject: [PATCH] clk: scmi: Fix children encountered before parents case
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <20250604-clk-scmi-children-parent-fix-v1-1-be206954d866@xxxxxxxxxxxxxx>
X-B4-Tracking: v=1; b=H4sIAE0nQGgC/x2MQQ5AMBAAvyJ7tkk1KviKOFQtNihpRSSNv9u4T
DJzmASRAlOENksQ6ObIhxcp8gzcYv1MyKM4aKWNqlSJblsxup3RLbyNgTyeVnjhxA+WxtZNoYd
6sApkcQaS/O+7/n0/xXveK24AAAA=
X-Change-ID: 20250604-clk-scmi-children-parent-fix-45a8912b8ba0
To: Sudeep Holla <sudeep.holla@xxxxxxx>,
Cristian Marussi <cristian.marussi@xxxxxxx>,
Michael Turquette <mturquette@xxxxxxxxxxxx>,
Stephen Boyd <sboyd@xxxxxxxxxx>, Peng Fan <peng.fan@xxxxxxx>
Cc: arm-scmi@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx,
linux-clk@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
X-Mailer: b4 0.14.2
X-Developer-Signature: v=1; a=ed25519-sha256; t=1749034830; l=2736;
i=s.hauer@xxxxxxxxxxxxxx; s=20230412; h=from:subject:message-id;
bh=v/veQCLfrMcIRAj6dJqLlBlutbTVZR6wTEh4vNB9rjU=;
b=p/7n0aM4JHmJA90LjJcorfb/OkVNPqsasWKC6s95WollCc5lkgTOdCrSA0J7PxaGnLV6Ujqk3
BPOxZ5yBsoACaD1Fsr6qlqo0jsefBvPwUw34LZMz5myarg0YgOSshMj
X-Developer-Key: i=s.hauer@xxxxxxxxxxxxxx; a=ed25519;
pk=4kuc9ocmECiBJKWxYgqyhtZOHj5AWi7+d0n/UjhkwTg=
X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2
X-SA-Exim-Mail-From: s.hauer@xxxxxxxxxxxxxx
X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false
X-PTX-Original-Recipient: linux-kernel@xxxxxxxxxxxxxxx
X-Spam-Status: No, score=-3.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
When it comes to clocks with parents the SCMI clk driver assumes that
parents are always initialized before their children which might not
always be the case.
During initialization of the parent_data array we have:
sclk->parent_data[i].hw = hws[sclk->info->parents[i]];
hws[sclk->info->parents[i]] will not yet be initialized when children
are encountered before their possible parents. Solve this by allocating
all struct scmi_clk as an array first and populating all hws[] upfront.
Fixes: 65a8a3dd3b95f ("clk: scmi: Add support for clock {set,get}_parent")
Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
drivers/clk/clk-scmi.c | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/drivers/clk/clk-scmi.c b/drivers/clk/clk-scmi.c
index 15510c2ff21c0335f5cb30677343bd4ef59c0738..f258ad7dda73e3c50c3ce567a8e22b3d2ec9836b 100644
--- a/drivers/clk/clk-scmi.c
+++ b/drivers/clk/clk-scmi.c
@@ -404,6 +404,7 @@ static int scmi_clocks_probe(struct scmi_device *sdev)
const struct scmi_handle *handle = sdev->handle;
struct scmi_protocol_handle *ph;
const struct clk_ops *scmi_clk_ops_db[SCMI_MAX_CLK_OPS] = {};
+ struct scmi_clk *sclks;
if (!handle)
return -ENODEV;
@@ -430,18 +431,24 @@ static int scmi_clocks_probe(struct scmi_device *sdev)
transport_is_atomic = handle->is_transport_atomic(handle,
&atomic_threshold_us);
+ sclks = devm_kcalloc(dev, count, sizeof(*sclks), GFP_KERNEL);
+ if (!sclks)
+ return -ENOMEM;
+
for (idx = 0; idx < count; idx++) {
- struct scmi_clk *sclk;
- const struct clk_ops *scmi_ops;
+ struct scmi_clk *sclk = &sclks[idx];
- sclk = devm_kzalloc(dev, sizeof(*sclk), GFP_KERNEL);
- if (!sclk)
- return -ENOMEM;
+ hws[idx] = &sclk->hw;
+ }
+
+ for (idx = 0; idx < count; idx++) {
+ struct scmi_clk *sclk = &sclks[idx];
+ const struct clk_ops *scmi_ops;
sclk->info = scmi_proto_clk_ops->info_get(ph, idx);
if (!sclk->info) {
dev_dbg(dev, "invalid clock info for idx %d\n", idx);
- devm_kfree(dev, sclk);
+ hws[idx] = NULL;
continue;
}
@@ -479,13 +486,11 @@ static int scmi_clocks_probe(struct scmi_device *sdev)
if (err) {
dev_err(dev, "failed to register clock %d\n", idx);
devm_kfree(dev, sclk->parent_data);
- devm_kfree(dev, sclk);
hws[idx] = NULL;
} else {
dev_dbg(dev, "Registered clock:%s%s\n",
sclk->info->name,
scmi_ops->enable ? " (atomic ops)" : "");
- hws[idx] = &sclk->hw;
}
}
---
base-commit: 5abc7438f1e9d62e91ad775cc83c9594c48d2282
change-id: 20250604-clk-scmi-children-parent-fix-45a8912b8ba0
Best regards,
--
Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
Return-Path: <linux-kernel+bounces-673103-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 8D2C541E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:01:58 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 31CCB7A8ED6
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:00:38 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id BADCC28DF15;
Wed, 4 Jun 2025 11:01:48 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="lgmy3Vzg"
Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 48CB3200B99
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:01:46 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.10
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749034908; cv=none; b=EzO6gsC1k4WaGMUll0tu9wrLTDnUQlaxfSqeaAVaVbcbz0/HyhV0tN6RYOf0j5jQp6h2HxPp/HVZDwwFcFw2SNHw19eEZNf6CBZ1aWRiNEZF0CmXRHREuH9aQIzGM83aeKZ1PVS8tmSMNNn2Zhao1BRkUtE6mHZCApgE1zljY4k=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749034908; c=relaxed/simple;
bh=ubu53MA0qQJpJ9knh2ETXZj1I5JdH8FHWFKt0Vz40l8=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=o9caJdmafUQIQwq+wIynUxZP+OnY8oTveMzrM7Owvmv0eb8UpqB/nt1E+9vUmf2jgIRq/CRTp1UNFMqLkbJHH9SXeWt62f3arbHWv2yn97np91nJJB0c6cMC056hbhHmJlzoUkViDaraIxgurt433lQZdwU/i0u4/xstw4aD7yE=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=lgmy3Vzg; arc=none smtp.client-ip=192.198.163.10
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
t=1749034906; x=1780570906;
h=date:from:to:cc:subject:message-id:references:
mime-version:in-reply-to;
bh=ubu53MA0qQJpJ9knh2ETXZj1I5JdH8FHWFKt0Vz40l8=;
b=lgmy3VzgrJPRPTQiC34VITEEG6keU0XzHnS4IUWSmhrS01MEpK6LG/04
9j49xI2WkXTpRxVscbSNauknG47+1fkDsWn0msGH8WbkQ1piMmQzf+7C/
ntQeyBLTGi0sqLR1nh9lsl5aFj4O2ig9lZY3wp6zqFrbWXp0iYw1qQsS/
A5pW7XYJT8TIOOb5HeDfeql2N7Ra6VHYyGA5eDlCUycZS/gs+LRENg4l9
9lPgKmjYoqpJ25STpOrfWgSQ4uqp1yTBT+CnRgVWnRxkb40P510iwNMel
4ydj5U0OL79CeXzAwy+qU8vLIetAXwHNtHT753dkMSB3CVi7uOQTahSXs
Q==;
X-CSE-ConnectionGUID: 1HqpvjA9RZewuQprC/zl4w==
X-CSE-MsgGUID: Xncv0Ui0Th6iUuwTP/iBBQ==
X-IronPort-AV: E=McAfee;i="6700,10204,11453"; a="62466526"
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="62466526"
Received: from fmviesa003.fm.intel.com ([10.60.135.143])
by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 04:01:46 -0700
X-CSE-ConnectionGUID: j5x+btOfQge2qUoGt1jn6w==
X-CSE-MsgGUID: 4NJtS36gR6eI1rB7XOf2YA==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="148991966"
Received: from lkp-server01.sh.intel.com (HELO e8142ee1dce2) ([10.239.97.150])
by fmviesa003.fm.intel.com with ESMTP; 04 Jun 2025 04:01:42 -0700
Received: from kbuild by e8142ee1dce2 with local (Exim 4.96)
(envelope-from <lkp@xxxxxxxxx>)
id 1uMlsH-00034P-0g;
Wed, 04 Jun 2025 11:01:37 +0000
Date: Wed, 4 Jun 2025 19:00:53 +0800
From: kernel test robot <lkp@xxxxxxxxx>
To: Donny Turizo <donnyturizo13@xxxxxxxxx>, gregkh@xxxxxxxxxxxxxxxxxxx
Cc: oe-kbuild-all@xxxxxxxxxxxxxxx, linux-staging@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx,
Donny Turizo <donnyturizo13@xxxxxxxxx>
Subject: Re: [PATCH v4] staging: rtl8723bs: Fix camelCase to snake_case style
in core files
Message-ID: <202506041853.5ZvDpouT-lkp@xxxxxxxxx>
References: <20250525064426.9662-1-donnyturizo13@xxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20250525064426.9662-1-donnyturizo13@xxxxxxxxx>
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hi Donny,
kernel test robot noticed the following build errors:
[auto build test ERROR on staging/staging-testing]
url: https://github.com/intel-lab-lkp/linux/commits/Donny-Turizo/staging-rtl8723bs-Fix-camelCase-to-snake_case-style-in-core-files/20250525-144506
base: staging/staging-testing
patch link: https://lore.kernel.org/r/20250525064426.9662-1-donnyturizo13%40gmail.com
patch subject: [PATCH v4] staging: rtl8723bs: Fix camelCase to snake_case style in core files
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20250604/202506041853.5ZvDpouT-lkp@xxxxxxxxx/config)
compiler: sh4-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250604/202506041853.5ZvDpouT-lkp@xxxxxxxxx/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202506041853.5ZvDpouT-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
In file included from drivers/staging/rtl8723bs/include/drv_types.h:29,
from drivers/staging/rtl8723bs/core/rtw_cmd.c:7:
drivers/staging/rtl8723bs/core/rtw_cmd.c:12:23: error: '_read_macreg_CMD_' undeclared here (not in a function); did you mean '_Read_MACREG_CMD_'?
12 | {GEN_CMD_CODE(_read_macreg), NULL}, /*0*/
| ^~~~~~~~~~~~
drivers/staging/rtl8723bs/include/rtw_cmd.h:554:33: note: in definition of macro 'GEN_CMD_CODE'
554 | #define GEN_CMD_CODE(cmd) cmd ## _CMD_
| ^~~
drivers/staging/rtl8723bs/core/rtw_cmd.c:13:23: error: '_write_macreg_CMD_' undeclared here (not in a function); did you mean '_Write_MACREG_CMD_'?
13 | {GEN_CMD_CODE(_write_macreg), NULL},
| ^~~~~~~~~~~~~
drivers/staging/rtl8723bs/include/rtw_cmd.h:554:33: note: in definition of macro 'GEN_CMD_CODE'
554 | #define GEN_CMD_CODE(cmd) cmd ## _CMD_
| ^~~
vim +12 drivers/staging/rtl8723bs/core/rtw_cmd.c
10
11 static struct _cmd_callback rtw_cmd_callback[] = {
> 12 {GEN_CMD_CODE(_read_macreg), NULL}, /*0*/
> 13 {GEN_CMD_CODE(_write_macreg), NULL},
14 {GEN_CMD_CODE(_Read_BBREG), &rtw_getbbrfreg_cmdrsp_callback},
15 {GEN_CMD_CODE(_Write_BBREG), NULL},
16 {GEN_CMD_CODE(_Read_RFREG), &rtw_getbbrfreg_cmdrsp_callback},
17 {GEN_CMD_CODE(_Write_RFREG), NULL}, /*5*/
18 {GEN_CMD_CODE(_Read_EEPROM), NULL},
19 {GEN_CMD_CODE(_Write_EEPROM), NULL},
20 {GEN_CMD_CODE(_Read_EFUSE), NULL},
21 {GEN_CMD_CODE(_Write_EFUSE), NULL},
22
23 {GEN_CMD_CODE(_Read_CAM), NULL}, /*10*/
24 {GEN_CMD_CODE(_Write_CAM), NULL},
25 {GEN_CMD_CODE(_setBCNITV), NULL},
26 {GEN_CMD_CODE(_setMBIDCFG), NULL},
27 {GEN_CMD_CODE(_JoinBss), &rtw_joinbss_cmd_callback}, /*14*/
28 {GEN_CMD_CODE(_DisConnect), &rtw_disassoc_cmd_callback}, /*15*/
29 {GEN_CMD_CODE(_CreateBss), &rtw_createbss_cmd_callback},
30 {GEN_CMD_CODE(_SetOpMode), NULL},
31 {GEN_CMD_CODE(_SiteSurvey), &rtw_survey_cmd_callback}, /*18*/
32 {GEN_CMD_CODE(_SetAuth), NULL},
33
34 {GEN_CMD_CODE(_SetKey), NULL}, /*20*/
35 {GEN_CMD_CODE(_SetStaKey), &rtw_setstaKey_cmdrsp_callback},
36 {GEN_CMD_CODE(_SetAssocSta), &rtw_setassocsta_cmdrsp_callback},
37 {GEN_CMD_CODE(_DelAssocSta), NULL},
38 {GEN_CMD_CODE(_SetStaPwrState), NULL},
39 {GEN_CMD_CODE(_SetBasicRate), NULL}, /*25*/
40 {GEN_CMD_CODE(_GetBasicRate), NULL},
41 {GEN_CMD_CODE(_SetDataRate), NULL},
42 {GEN_CMD_CODE(_GetDataRate), NULL},
43 {GEN_CMD_CODE(_SetPhyInfo), NULL},
44
45 {GEN_CMD_CODE(_GetPhyInfo), NULL}, /*30*/
46 {GEN_CMD_CODE(_SetPhy), NULL},
47 {GEN_CMD_CODE(_GetPhy), NULL},
48 {GEN_CMD_CODE(_readRssi), NULL},
49 {GEN_CMD_CODE(_readGain), NULL},
50 {GEN_CMD_CODE(_SetAtim), NULL}, /*35*/
51 {GEN_CMD_CODE(_SetPwrMode), NULL},
52 {GEN_CMD_CODE(_JoinbssRpt), NULL},
53 {GEN_CMD_CODE(_SetRaTable), NULL},
54 {GEN_CMD_CODE(_GetRaTable), NULL},
55
56 {GEN_CMD_CODE(_GetCCXReport), NULL}, /*40*/
57 {GEN_CMD_CODE(_GetDTMReport), NULL},
58 {GEN_CMD_CODE(_GetTXRateStatistics), NULL},
59 {GEN_CMD_CODE(_SetUsbSuspend), NULL},
60 {GEN_CMD_CODE(_SetH2cLbk), NULL},
61 {GEN_CMD_CODE(_AddBAReq), NULL}, /*45*/
62 {GEN_CMD_CODE(_SetChannel), NULL}, /*46*/
63 {GEN_CMD_CODE(_SetTxPower), NULL},
64 {GEN_CMD_CODE(_SwitchAntenna), NULL},
65 {GEN_CMD_CODE(_SetCrystalCap), NULL},
66 {GEN_CMD_CODE(_SetSingleCarrierTx), NULL}, /*50*/
67
68 {GEN_CMD_CODE(_SetSingleToneTx), NULL}, /*51*/
69 {GEN_CMD_CODE(_SetCarrierSuppressionTx), NULL},
70 {GEN_CMD_CODE(_SetContinuousTx), NULL},
71 {GEN_CMD_CODE(_SwitchBandwidth), NULL}, /*54*/
72 {GEN_CMD_CODE(_TX_Beacon), NULL},/*55*/
73
74 {GEN_CMD_CODE(_Set_MLME_EVT), NULL},/*56*/
75 {GEN_CMD_CODE(_Set_Drv_Extra), NULL},/*57*/
76 {GEN_CMD_CODE(_Set_H2C_MSG), NULL},/*58*/
77 {GEN_CMD_CODE(_SetChannelPlan), NULL},/*59*/
78
79 {GEN_CMD_CODE(_SetChannelSwitch), NULL},/*60*/
80 {GEN_CMD_CODE(_TDLS), NULL},/*61*/
81 {GEN_CMD_CODE(_ChkBMCSleepq), NULL}, /*62*/
82
83 {GEN_CMD_CODE(_RunInThreadCMD), NULL},/*63*/
84 };
85
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Return-Path: <linux-kernel+bounces-673104-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 863B441E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:05:00 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 1B8C83A4B0C
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:04:38 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id D953028E604;
Wed, 4 Jun 2025 11:04:49 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="tdJExIWU";
dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="BALc2CPn"
Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id A857220E6E3;
Wed, 4 Jun 2025 11:04:47 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749035089; cv=none; b=lA78ePho2Id7Z/69eVjpuL+lTUunPygsdSEKwMezxyNRjA0fr/ehLi0u8gUCXv5Fg6rysW7REkZNGUiSQ2+n1YOyhU2xypEJmuZ7f0C0s1qXyXxVsQFezsnH3OAMM6+YDB1RnMy48YoeCaBBhl+aFvPlHIFawZUHnm50ITrtjyk=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749035089; c=relaxed/simple;
bh=vrFDCiqXDMtRHbVFVsT+31iDGAdDQ3ptGNMH7XKEI9Q=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=fCLLqMyhBIo+g89+7MGIE0oeyFb3bmo6WTcvlERZuaEUwwCzDX367MMAuCAo0L19jT696Z+B9PNU/zAC0Fl1vnp18x0uaeb7wwxjAjsX7We0spP99Hzk9rTVrlmC9F6mmwlFyZVV7gLzWFXmISSXrHkUfl+5v9feLbHjuww7IfQ=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=tdJExIWU; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=BALc2CPn; arc=none smtp.client-ip=193.142.43.55
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de
Date: Wed, 4 Jun 2025 13:04:38 +0200
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de;
s=2020; t=1749035079;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references;
bh=vrFDCiqXDMtRHbVFVsT+31iDGAdDQ3ptGNMH7XKEI9Q=;
b=tdJExIWU24fpA6+s2PVmEwF5OlREnTVG04LlBr5mh1rW3r0KA8BuSnXw2xtJv5AAPx1YGU
A3sC9mL/+kbvrqAeREt4EAgIvVdf9q6bzYnmoIeoz3Ez4ovzgC/RencTsBcdiKirHuSmUn
uQYmKQjOE912jmRQHAcfSSYGYv1ZYrqSQkTlJaH/bJuYch4yp8aRTeJ12oA7L78WkIn5TT
/2ATA7mG2kECBxOIg10rlQtCM0vjNigf+dCQ9m1dgG/FYMTgDi93uaYGkisyfqGzlCEGVk
2E1g+yOxtae8npQ/oWYtUJzPv05T9/DlXtEkI8EsglQAxzbmEny+gkHHtoqqvQ==
DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de;
s=2020e; t=1749035079;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references;
bh=vrFDCiqXDMtRHbVFVsT+31iDGAdDQ3ptGNMH7XKEI9Q=;
b=BALc2CPnWzOjlqX0PqN8Lvuavq2pw1hJQ+kR+d7cuTD0L5ptSNoho+3HXS69mZsPEHzjml
L/2JsK5jDYvsnFAg==
From: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
To: kernel test robot <oliver.sang@xxxxxxxxx>
Cc: oe-lkp@xxxxxxxxxxxxxxx, lkp@xxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
Paolo Abeni <pabeni@xxxxxxxxxx>,
Allison Henderson <allison.henderson@xxxxxxxxxx>,
netdev@xxxxxxxxxxxxxxx, linux-rdma@xxxxxxxxxxxxxxx,
rds-devel@xxxxxxxxxxxxxx
Subject: Re: [linus:master] [rds] c50d295c37:
BUG:unable_to_handle_page_fault_for_address
Message-ID: <20250604110438.rer2bMSx@xxxxxxxxxxxxx>
References: <202506041623.e45e4f7d-lkp@xxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
In-Reply-To: <202506041623.e45e4f7d-lkp@xxxxxxxxx>
X-Spam-Status: No, score=-3.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 2025-06-04 16:42:37 [+0800], kernel test robot wrote:
=20
Hello,
Hi,
kernel test robot noticed "BUG:unable_to_handle_page_fault_for_address" o=
n:
=20
commit: c50d295c37f2648a8d9e8a572fedaad027d134bb ("rds: Use nested-BH loc=
king for rds_page_remainder")
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master
=E2=80=A6
the issue does not always happen, 45 times out of 200 runs as below. but =
parent
keeps clean.
I can reproduce this quite reliably. Looking=E2=80=A6
Sebastian
Return-Path: <linux-kernel+bounces-673105-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 8D8E041E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:05:37 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id C43E7175F21
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:05:38 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 6A7E928E5EB;
Wed, 4 Jun 2025 11:05:31 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Vyvx8Ew2"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id A83B756B81;
Wed, 4 Jun 2025 11:05:30 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749035130; cv=none; b=b3+lgpTNtMwU8DjVFKsvHP4dzlgkx3kAX3qQMXFsgsQl1CYlHnUTLo4EWDgYbd1du7nMvYPvDCZiiWdbaENu/b8ahKYdE+tFC+ySTSrB238uT4UOB75IMSiDUgim0XRh1QAoelxjGYmCU7fZg8WZMH46FHVD4S/3Hz2htqWzPNs=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749035130; c=relaxed/simple;
bh=cg0T1yIQI7Ucejk4Gmh/4YQZt5t7iZ3WyH3OyMfASgw=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=k9PVAqBRfKJmm70vEioVYDf5PEe4BV/v500sixHSkp+lNJsnuvtF7ynR6uwBN3J/mpLGRHjp1+jRJuvFA4ksmVO/OGdjQgvitAN9nSWTaLKyXt2nXwlmXgFvT19ve127abTH1uc4374Cpx9N3v8X8NbjQ9QLAn2u18SirVKo/eU=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Vyvx8Ew2; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id B3162C4CEE7;
Wed, 4 Jun 2025 11:05:28 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749035130;
bh=cg0T1yIQI7Ucejk4Gmh/4YQZt5t7iZ3WyH3OyMfASgw=;
h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
b=Vyvx8Ew2CRsTvABqXjBD2PDGfEkQeZfMXE2RMWvgldcItEE7Awc99YdCCJqzkruPg
AxphnFJauUA7oIuZKGY19P81rZQyYDzMAhe7PBQ1B2fgW5M6NX9TC5OgxfPTico+R2
5uEbStFKtnDG76ucSmEEB7HOy4lMN5VCvQZ89ovTYcAusJBqStYckBZ7+jIuKlILmI
nStTOwil5DY2tRKvyyAVaSI9wumTHHf655ERj1yVQJISKer3IYn7lvxFTq6dELezNu
IYqgPN3OO7neFEDPPOY8QqRzRDWnA+9j5/GCQwSVAaRwjqfz7bIHSK5j4ZBlB7wfQZ
9oI4OJEoshAAg==
Date: Wed, 4 Jun 2025 12:05:25 +0100
From: Mark Brown <broonie@xxxxxxxxxx>
To: Arnd Bergmann <arnd@xxxxxxxx>
Cc: Yury Khrustalev <yury.khrustalev@xxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx,
Christian Brauner <brauner@xxxxxxxxxx>,
Mark Rutland <mark.rutland@xxxxxxx>, linux-api@xxxxxxxxxxxxxxx
Subject: Re: Extending clone_args for clone3()
Message-ID: <069a9c63-3cb4-4fc4-9566-bfffb6d07cc5@xxxxxxxxxxxxx>
References: <aCs65ccRQtJBnZ_5@xxxxxxx>
<71c9bd77-85fd-4f00-a36a-8621640ebbb5@xxxxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512;
protocol="application/pgp-signature"; boundary="LuHmAmRYU6fI7wQl"
Content-Disposition: inline
In-Reply-To: <71c9bd77-85fd-4f00-a36a-8621640ebbb5@xxxxxxxxxxxxxxxx>
X-Cookie: Non-sequiturs make me eat lampshades.
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
--LuHmAmRYU6fI7wQl
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Wed, Jun 04, 2025 at 10:29:48AM +0200, Arnd Bergmann wrote:
As I understand the shadow stack feature, we want this to be enabled
whenever the kernel and hardware supports it, completely transparent
to an application, right?
Slightly more involved, but roughly. The application and all libraries
linked into it should be built targeting shadow stacks (most binaries
will already be compatible but it's possible they wouldn't be so we
can't just asssume that) then if everything is compatible shadow stacks
will be enabled transparently by libc if the system supports them.
I think ideally we'd check for HWCAP_GCS on arm64 or the equivalent
feature on other architectures and expect clone3 to support the
longer argument whenever that is set, but it looks like that would
break on current kernels that already support HWCAP_GCS but not
the clone3 argument.
Adding one more hwcap flag would be ugly, but that seems to be
the easiest way. That way, glibc can just test for the new hwcap
flag only use the extra clone3 word if all prerequisites (hardware
support, kernel gcs support, clone3 argument support) are there.
We'd also have to add something similar for x86 since that's had the
support even longer, and the RISC-V series looks like it's getting near
to being merged too so we'll likely have the same problem there given
that the clone3() series is not progressing super fast.
--LuHmAmRYU6fI7wQl
Content-Type: application/pgp-signature; name="signature.asc"
-----BEGIN PGP SIGNATURE-----
iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmhAKHUACgkQJNaLcl1U
h9BwdQf+MCEl2EhpjZORAr4HEpjhBRMRrwiL5qIKtHRy52EhAgX/Uni52uItWG9G
67x2Mdaqk4ow2SkawYCT3aTxpccLCmQuXu/hEcvwE0d+MDe8HAhA3CH4kphgTy1d
3l1LF7Nyz+bwMhRX9FxE2UEAw4cWssEt85vOdCwaA9piZ1mPO7kAKM9zEGg1JnjI
D3USaqin4rRGqEZDbNW5MVit52App8J1IRHtG2YJn+nYkekp0tl0IH9tFPDJ5bVH
Z7fQgIbdR4SOebI3WhD7z2Uq4rDTPnJJHoMOmluHuyBi7po9dhZCNQ3XopGiCC/8
97EyU3KMT/Hdm3w1PRFgPVzMMIeG4g==
=SyAz
-----END PGP SIGNATURE-----
--LuHmAmRYU6fI7wQl--
Return-Path: <linux-kernel+bounces-673106-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id A9F8D41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:09:09 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 9CEA87A46A5
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:07:49 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 6EC1C28E5ED;
Wed, 4 Jun 2025 11:09:04 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="Q0zvDwY0"
Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3F3E8748F
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:08:59 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749035343; cv=none; b=WjpPOc0/aBP3etIJV7Lak1hYmYKOjgLDV+YNYxOMpWAmbL1F5KgQUZi5rc3kqEuT/oHtL+e67OwOggkI/1L4qOMs2HafRDppmlhji0I2jZ165sVD8bJbCkyNTQ/nlEuAFCg7NfJzD4nlSpbqifU9Sez5JjSR13xXgJjSS0u175g=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749035343; c=relaxed/simple;
bh=pyi5fUpMBDA7xVdsAPRF/Q9ktcBAwK+luYZR5u5s9nc=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=W7v+kToaeIjG65tJEzD15cq3IqW83FjnBUnR+ZFUBQibVd42rDsguN/aW+klGpdJL3w3md8VtJvCzRTu8zddQDPi9O9Cw1HTCEr+lnrOwvO5X2CD4BKdZa+Mpue4mt/M0R97+xCGEEPxFawQxYFlKG7FybvKnou4isnjfbNEehQ=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=Q0zvDwY0; arc=none smtp.client-ip=209.85.128.46
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com
Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-43cfe63c592so77705505e9.2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 04:08:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=suse.com; s=google; t=1749035338; x=1749640138; darn=vger.kernel.org;
h=in-reply-to:content-disposition:mime-version:references:message-id
:subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to;
bh=fo/dL6h3Yr2vVYWODP4+BLrzuTaAimU3j5bsgQKsn4o=;
b=Q0zvDwY0swWxGlE/TZiC//TqzmYPhSYjLpoSYruYkWgeIwLPHFBVCthpSOv/Ko+OO2
iMQLwREAH8l+0FZFfq4fTTBwENWld6ODLklbd4hrUZnhjQUn2MR1jO5hCV4E+FiyiZHj
Bzs/jYV/szgH7zAhuHRbwCUErbmrJY1+53jXlWP4gbTQpj5EAmsEGwa+N1sN1cs7fmI2
Xq+g3o9Rq5+74ORETwKfvtqW+QQR+Amr3OorAUrr+B8ra73mwU5mTb34YMuQwA4TMKVM
sxAlPm+Ojcu1UpFHvs06CNYV1nwbnu1I4yN2U4pymFB7dr91CxNiVwlY2s9HKVv8Di6D
0x6g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749035338; x=1749640138;
h=in-reply-to:content-disposition:mime-version:references:message-id
:subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to;
bh=fo/dL6h3Yr2vVYWODP4+BLrzuTaAimU3j5bsgQKsn4o=;
b=qJwDSqLczWorCKb0EVEJQ71zMJqr/F4KRCeunL5z5UuslwQuSeNchPn69XYbWs53N4
HLPrwD3hObGzeKWWdq9d76G7MQVoC94CHBpzoEWdN+GhTAjFQtPSmcJg7/uaOSzUHG3p
zlq/8RQ5KIbrgBkLdk/ULRahAFv6Jd4aHV8PXkke9HL4EdrbYYtbzL7zsdTL52tHweCE
wb1JXkFSYqF5KTESgv5XYAcn+G2BZImuUPH04H66Ah00ra68Jh2oesiqTFD1vmsrtmQ0
SKLxJiBhY0zBJBkiUFSeLmUhgbkbOpVRl3734MfM9XtWtaBQSp34GZyLcSOw/wYGVGLe
lijA==
X-Forwarded-Encrypted: i=1; AJvYcCWCUgdqePdMXrwgdmgVowPDYnwwEx7FimRUwQj3/JFAtjf0vhsJudOsQF0jTkXjTxT1QW0Bq60NcVoumIk=@vger.kernel.org
X-Gm-Message-State: AOJu0Yyb80pS9Qh5EP2PAEw/FzRtlpxkBFGU9uEdkrNv/OaHf8JWMPYp
+quE2cGSBMfFEaQMIbrEF0pu1+gZnoULTqXEGXVkfyMuAgfeks6HfITzL2lA7BI8PXk=
X-Gm-Gg: ASbGncskL0GDsipo6Mn7Oj/UrSvovjM3Req2aaZNxQ+4s4CtPtPD5mFcNqbTbXm6OuG
yPAypJefePrpJIbW+vYMnb/Cj3mrZ0cMv3niXW3haW7vnbDFzTbkYhGG5ZNoRopG0kPVGm0M1hg
fJpGQn0ieE2RWwpTc45Kz/1IWYeCbbqQl1+U8WJ2WQzMZNIoIIKlcI/zjwrD8HZ1qzbddwU6h23
eOV3berJ0tNts3uJgGvYJ8xjp7S4hGZ3jaE8e5exQqDYoP1yme1aoAZLgCzopsaBZxS4VTWjZOb
hyxGo3dZWKtfDlAuZmIaThTS1woRtBndtqSvDTM/PYciAz2fta3/5g==
X-Google-Smtp-Source: AGHT+IGzwTw0APJOBCPXYsgbi3L8T2cF37ouY+tpV3tVwkWBF2/qFMnNgv0OYaykSm6L6gQBiWeTzQ==
X-Received: by 2002:a05:6000:430a:b0:3a3:7593:81a1 with SMTP id ffacd0b85a97d-3a51d967d6emr1755178f8f.43.1749035338282;
Wed, 04 Jun 2025 04:08:58 -0700 (PDT)
Received: from pathway.suse.cz ([176.114.240.130])
by smtp.gmail.com with ESMTPSA id d9443c01a7336-23506cd3506sm101742875ad.156.2025.06.04.04.08.49
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 04:08:57 -0700 (PDT)
Date: Wed, 4 Jun 2025 13:08:40 +0200
From: Petr Mladek <pmladek@xxxxxxxx>
To: "Toshiyuki Sato (Fujitsu)" <fj6611ie@xxxxxxxxxxx>
Cc: 'Michael Kelley' <mhklinux@xxxxxxxxxxx>,
'John Ogness' <john.ogness@xxxxxxxxxxxxx>,
'Ryo Takakura' <ryotkkr98@xxxxxxxxx>,
Russell King <linux@xxxxxxxxxxxxxxx>,
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>,
Jiri Slaby <jirislaby@xxxxxxxxxx>,
"linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>,
"linux-serial@xxxxxxxxxxxxxxx" <linux-serial@xxxxxxxxxxxxxxx>,
"linux-arm-kernel@xxxxxxxxxxxxxxxxxxx" <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: Problem with nbcon console and amba-pl011 serial port
Message-ID: <aEApOPTqbVOR35F_@xxxxxxxxxxxxxxx>
References: <SN6PR02MB4157A4C5E8CB219A75263A17D46DA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
<OS7PR01MB13775FE1A20762D1EA4A38D0ED76DA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
<84y0u95e0j.fsf@xxxxxxxxxxxxxxxxxxxxx>
<84plfl5bf1.fsf@xxxxxxxxxxxxxxxxxxxxx>
<TY4PR01MB13777674C22721FCD8ACF4FCCD76CA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <TY4PR01MB13777674C22721FCD8ACF4FCCD76CA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed 2025-06-04 04:11:10, Toshiyuki Sato (Fujitsu) wrote:
> On 2025-06-03, John Ogness <john.ogness@xxxxxxxxxxxxx> wrote:
> > On 2025-06-03, "Toshiyuki Sato (Fujitsu)" <fj6611ie@xxxxxxxxxxx> wrote:
> >>> 4. pr_emerg() has a high logging level, and it effectively steals the console
> >>> from the "pr/ttyAMA0" task, which I believe is intentional in the nbcon
> design.
> >>> Down in pl011_console_write_thread(), the "pr/ttyAMA0" task is doing
> >>> nbcon_enter_unsafe() and nbcon_exit_unsafe() around each character
> >>> that it outputs. When pr_emerg() steals the console, nbcon_exit_unsafe()
> >>> returns 0, so the "for" loop exits. pl011_console_write_thread() then
> >>> enters a busy "while" loop waiting to reclaim the console. It's doing this
> >>> busy "while" loop with interrupts disabled, and because of the panic,
> >>> it never succeeds.
I am a bit surprised that it never succeeds. The panic CPU takes over
the ownership but it releases it when the messages are flushed. And
the original owner should be able to reacquire it in this case.
But maybe, this does not work well on virtualized systems when the
virtualized CPUs do not run at the same time.
> >>> Whatever CPU is running "pr/ttyAMA0" is effectively
> >>> stuck at this point.
> >>>
> >>> 5. Meanwhile panic() continues, calling panic_other_cpus_shutdown(). On
> >>> ARM64, other CPUs are stopped by sending them an IPI. Each CPU receives
> >>> the IPI and calls the PSCI function to stop itself. But the CPU running
> >>> "pr/ttyAMA0" is looping forever with interrupts disabled, so it never
> >>> processes the IPI and it never stops. ARM64 doesn't have a true NMI that
> >>> can override the looping with interrupts disabled, so there's no way to
> >>> stop that CPU.
> >>>
> >>> 6. The failure to stop the "pr/ttyAMA0" CPU then causes downstream
> >>> problems, such as when loading and running a kdump kernel.
Thanks a lot for this great analyze. It makes sense. It must have been
hard to put all the pieces together.
> >
> > [...]
> >
This is a proposed fix to force termination by returning false from
nbcon_reacquire_nobuf when a panic occurs within pl011_console_write_thread.
(I believe this is similar to what John suggested in his previous reply.)
While I couldn't reproduce the issue using sysrq-trigger in my environment
(It seemed that the panic was being executed before the thread processing),
I did observe nbcon_reacquire_nobuf failing to complete when injecting an
NMI (SError) during pl011_console_write_thread.
Applying this fix seems to have resolved the "SMP: failed to stop secondary
CPUs" issue.
This patch is for test.
Modifications to imx and other drivers, as well as adding __must_check,
will likely be required.
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index 11d650975..c3a2b22e6 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -2577,8 +2577,10 @@ pl011_console_write_thread(struct console *co, struct nbcon_write_context *wctxt
}
}
- while (!nbcon_enter_unsafe(wctxt))
- nbcon_reacquire_nobuf(wctxt);
+ while (!nbcon_enter_unsafe(wctxt)) {
+ if (!nbcon_reacquire_nobuf(wctxt))
+ return;
+ }
while ((pl011_read(uap, REG_FR) ^ uap->vendor->inv_fr) & uap->vendor->fr_busy)
cpu_relax();
diff --git a/include/linux/console.h b/include/linux/console.h
index 8f10d0a85..ae278b875 100644
--- a/include/linux/console.h
+++ b/include/linux/console.h
@@ -604,14 +604,14 @@ extern void nbcon_cpu_emergency_exit(void);
extern bool nbcon_can_proceed(struct nbcon_write_context *wctxt);
extern bool nbcon_enter_unsafe(struct nbcon_write_context *wctxt);
extern bool nbcon_exit_unsafe(struct nbcon_write_context *wctxt);
-extern void nbcon_reacquire_nobuf(struct nbcon_write_context *wctxt);
+extern bool nbcon_reacquire_nobuf(struct nbcon_write_context *wctxt);
#else
static inline void nbcon_cpu_emergency_enter(void) { }
static inline void nbcon_cpu_emergency_exit(void) { }
static inline bool nbcon_can_proceed(struct nbcon_write_context *wctxt) { return false; }
static inline bool nbcon_enter_unsafe(struct nbcon_write_context *wctxt) { return false; }
static inline bool nbcon_exit_unsafe(struct nbcon_write_context *wctxt) { return false; }
-static inline void nbcon_reacquire_nobuf(struct nbcon_write_context *wctxt) { }
+static inline bool nbcon_reacquire_nobuf(struct nbcon_write_context *wctxt) { }
#endif
extern int console_set_on_cmdline;
diff --git a/kernel/printk/nbcon.c b/kernel/printk/nbcon.c
index fd12efcc4..ec016bb24 100644
--- a/kernel/printk/nbcon.c
+++ b/kernel/printk/nbcon.c
@@ -909,14 +909,18 @@ EXPORT_SYMBOL_GPL(nbcon_exit_unsafe);
* output buffer because that has been lost. This function cannot be used to
* resume printing.
*/
Please, add a comment explaining the new return value. Something
like:
* Return: True when the context reacquired the owner ship. The caller
* might try entering the unsafe state and restore the original
* console device setting. It just must not access the output
* buffer anymore.
*
* False when another CPU is in panic() and a busy waiting for
* the ownership is not safe. It might prevent stopping this
* CPU and create further complications, especially on virtualized
* systems without proper NMI. The caller should bail out
* immediately without touching the console device or
* the output buffer.
It is very long. But I think that a good explanation might safe people
troubles in the future.
-void nbcon_reacquire_nobuf(struct nbcon_write_context *wctxt)
+bool nbcon_reacquire_nobuf(struct nbcon_write_context *wctxt)
{
struct nbcon_context *ctxt = &ACCESS_PRIVATE(wctxt, ctxt);
- while (!nbcon_context_try_acquire(ctxt))
+ while (!nbcon_context_try_acquire(ctxt)) {
cpu_relax();
+ if (other_cpu_in_panic())
+ return false;
+ }
nbcon_write_context_set_buf(wctxt, NULL, 0);
It would make sense to set the NULL buffer even when returning "false".
+ return true;
}
EXPORT_SYMBOL_GPL(nbcon_reacquire_nobuf);
Return-Path: <linux-kernel+bounces-673107-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 6ACD141E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 07:09:28 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 7FA963A4013
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:09:06 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 574AA28E5EC;
Wed, 4 Jun 2025 11:09:23 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="d76ficgW"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 877C128DF3A
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:09:22 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749035362; cv=none; b=LqBsqRaho7yRz1zac0Fndj+Ik085izS6y9RkKW2CF8R1MxPkPhhadQN8szonVD3aHfIgZARQuyCGt8Xd4uo3BFpueF4I7EeKHHLgUvkhJGc4pe3FDGFZA9SmvczwZ9TgMUBIDIJZ6Jh3EeZuhi41yrInTJDPgSTEDZMm0pCYObM=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749035362; c=relaxed/simple;
bh=bxbzNNKPCagVAfsznDam2r9jaVbG7yC74u5DW2QcVFI=;
h=Message-ID:Date:MIME-Version:Cc:Subject:To:References:From:
In-Reply-To:Content-Type; b=ViKqtbM+CU7c2d16hdIGuWDxSWWTd7TUm6wn4UGCCKJ8Ye3TArZcFtkviSI4EXZNC6jBI6PjybgMw9/WrdDUvglmnvRmUkiGLsHt+qJl9agBy1AUy8qcbCL8n2k9pwHtCdPcqUp2Kn9ntdDNpDV9koZ55T8gmzYLWfW1uNczNho=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=d76ficgW; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE364C4CEE7;
Wed, 4 Jun 2025 11:09:19 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749035362;
bh=bxbzNNKPCagVAfsznDam2r9jaVbG7yC74u5DW2QcVFI=;
h=Date:Cc:Subject:To:References:From:In-Reply-To:From;
b=d76ficgWdxxqPKuMtBDUFhRi8MS/oyNrEUGQ34Bkafomm8+7djXA8UCvTJ2LHbod1
HIHzw2gV3/ck5nB472azG8/WGH6w4mn79IyRymk/W5YmOFWamKZLp1fihjvA1KTXYH
WcwnjFrboIPtRrVJZ7TM5RRQAwDSQESgOhL82Xgkp3gRQ/ZETm4AIL+Orxhd/TPK2F
l92pT2D7pErPMJ/itTOsIFInlaaE8dGa3oB8Tp/9jaOuFhyE+PovEuQfmC4SJ6DXGe
s1q86KCXJgqMQ8lmbQA6muM8AkU6fcXJdnlpzJuayDFjY5MX/7wz84TETngsmLCoAW
c/Kwmu4MeUTBg==
Message-ID: <1791cead-c598-41dc-8c6c-811787df14b7@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 19:09:17 +0800
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Cc: chao@xxxxxxxxxx, Zhiguo Niu <zhiguo.niu@xxxxxxxxxx>, jaegeuk@xxxxxxxxxx,
linux-f2fs-devel@xxxxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
ke.wang@xxxxxxxxxx, Hao_hao.Wang@xxxxxxxxxx, baocong.liu@xxxxxxxxxx
Subject: Re: [PATCH] f2fs: compress: fix UAF of f2fs_inode_info in
f2fs_free_dic
To: Zhiguo Niu <niuzhiguo84@xxxxxxxxx>
References: <1749016492-31835-1-git-send-email-zhiguo.niu@xxxxxxxxxx>
<061c94ab-ff57-42e3-ad7c-592dfb2a822e@xxxxxxxxxx>
<CAHJ8P3J4Q-0ckCuZhV-r_O_Hct4yqqtC0uboLjxZP1bnfBJOEg@xxxxxxxxxxxxxx>
Content-Language: en-US
From: Chao Yu <chao@xxxxxxxxxx>
In-Reply-To: <CAHJ8P3J4Q-0ckCuZhV-r_O_Hct4yqqtC0uboLjxZP1bnfBJOEg@xxxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 6/4/25 18:49, Zhiguo Niu wrote:
Chao Yu <chao@xxxxxxxxxx> 于2025年6月4日周三 17:48写道:
On 6/4/25 13:54, Zhiguo Niu wrote:
The decompress_io_ctx may be released asynchronously after
I/O completion. If this file is deleted immediately after read,
and the kworker of processing post_read_wq has not been executed yet
due to high workloads, It is possible that the inode(f2fs_inode_info)
is evicted and freed before it is used f2fs_free_dic.
The UAF case as below:
Thread A Thread B
- f2fs_decompress_end_io
- f2fs_put_dic
- queue_work
add free_dic work to post_read_wq
- do_unlink
- iput
- evict
- call_rcu
This file is deleted after read.
Thread C kworker to process post_read_wq
- rcu_do_batch
- f2fs_free_inode
- kmem_cache_free
inode is freed by rcu
- process_scheduled_works
- f2fs_late_free_dic
- f2fs_free_dic
- f2fs_release_decomp_mem
read (dic->inode)->i_compress_algorithm
This patch increase inode->i_count before f2fs_free_dic and decrease it
after free the dic.
Cc: Daeho Jeong <daehojeong@xxxxxxxxxx>
Fixes: bff139b49d9f ("f2fs: handle decompress only post processing in softirq")
Signed-off-by: Zhiguo Niu <zhiguo.niu@xxxxxxxxxx>
Signed-off-by: Baocong Liu <baocong.liu@xxxxxxxxxx>
---
fs/f2fs/compress.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
index b3c1df9..6b3b3a7 100644
--- a/fs/f2fs/compress.c
+++ b/fs/f2fs/compress.c
@@ -1687,7 +1687,7 @@ static void f2fs_release_decomp_mem(struct decompress_io_ctx *dic,
}
static void f2fs_free_dic(struct decompress_io_ctx *dic,
- bool bypass_destroy_callback);
+ bool bypass_destroy_callback, bool late_free);
struct decompress_io_ctx *f2fs_alloc_dic(struct compress_ctx *cc)
{
@@ -1743,12 +1743,12 @@ struct decompress_io_ctx *f2fs_alloc_dic(struct compress_ctx *cc)
return dic;
out_free:
- f2fs_free_dic(dic, true);
+ f2fs_free_dic(dic, true, false);
return ERR_PTR(ret);
}
static void f2fs_free_dic(struct decompress_io_ctx *dic,
- bool bypass_destroy_callback)
+ bool bypass_destroy_callback, bool late_free)
{
int i;
@@ -1775,6 +1775,11 @@ static void f2fs_free_dic(struct decompress_io_ctx *dic,
}
page_array_free(dic->inode, dic->rpages, dic->nr_rpages);
+ if (late_free) {
+ spin_lock(&dic->inode->i_lock);
+ atomic_dec(&dic->inode->i_count);
+ spin_unlock(&dic->inode->i_lock);
If it is the last one release i_count, it needs to call iput_final to evict inode
like what iput did, so we'd better to call iput() here?
Hi Chao,
Yes, we have also tested this method(iput/__iget), and it worked.
Just think It is simpler and easier to read to directly operate
i_count, and then free it
by relying on the memory module when i_count=0.
But It seems iput/__iget is better.
+ }
kmem_cache_free(dic_entry_slab, dic);
}
@@ -1783,16 +1788,20 @@ static void f2fs_late_free_dic(struct work_struct *work)
struct decompress_io_ctx *dic =
container_of(work, struct decompress_io_ctx, free_work);
- f2fs_free_dic(dic, false);
+ f2fs_free_dic(dic, false, true);
}
static void f2fs_put_dic(struct decompress_io_ctx *dic, bool in_task)
{
if (refcount_dec_and_test(&dic->refcnt)) {
if (in_task) {
- f2fs_free_dic(dic, false);
+ f2fs_free_dic(dic, false, false);
} else {
INIT_WORK(&dic->free_work, f2fs_late_free_dic);
+ /* to avoid inode is evicted simultaneously */
+ spin_lock(&dic->inode->i_lock);
+ atomic_inc(&dic->inode->i_count);
+ spin_unlock(&dic->inode->i_lock);
iget()?
BTW, can we store i_compress_algorithm in dic to avoid inode access?
Also thought of this method, but it would require more changes.
dic->inode used in f2fs_free_dic are all needed to modify except
i_compress_algorithm.
such as page_array_free(dic->inode),
Zhiguo,
page_array_free() parses dic->inode to get sbi only, so we can pass sbi to
page_array_free() directly to avoid using dic->inode.
allow_memalloc_for_decomp(F2FS_I_SB(dic->inode)).
Do you have any other suggestions?
Using iget/iput looks fine to me, please go ahead.
Thanks,
thanks!
Thanks,
queue_work(F2FS_I_SB(dic->inode)->post_read_wq,
&dic->free_work);
}
Return-Path: <linux-kernel+bounces-673173-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 7CB5541E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:16:30 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id B41F33A5F73
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:16:08 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 7D5F528F52C;
Wed, 4 Jun 2025 12:16:09 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="e+rSStwS"
Received: from mail-lf1-f52.google.com (mail-lf1-f52.google.com [209.85.167.52])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 005221DFF8
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:16:05 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.52
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749039368; cv=none; b=QB2mn/aSr1EDserqgOf32eA2B8NwoxGcd7HAqnmNYOdYPVc5db2JhdizVAt+WbIcAsDKAllxvJdd/5M0rLIsfe9WJoJT7i0FkPsT6VmrB6uRLpBU1CwTCxN8WmaTnIC753Vcr0fFhAT+jLWJXlHu24jJVo6DHcPP899tM7WdodE=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749039368; c=relaxed/simple;
bh=uY7D+jjddolNqhiti7y96EkPRMPxJ7Jd0zS9UX+scuw=;
h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=pRnuGL+NMpBNqt5cz5DgA8X2HVVcKHB51Tap9yFrgSxjtnyRWfWSb0SJroVMbV7tKDPjIPCQWCC6WjItd6qf4JIGKUpq29pdWOC5x+5IzjKkMOfAKmbtT750I0LJQXOG4FEUCUhpOhV31I82Izpk1wDfVPcailq3beiV7oneTWE=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=e+rSStwS; arc=none smtp.client-ip=209.85.167.52
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org
Received: by mail-lf1-f52.google.com with SMTP id 2adb3069b0e04-5532a30ac45so901152e87.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 05:16:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=chromium.org; s=google; t=1749039364; x=1749644164; darn=vger.kernel.org;
h=cc:to:content-transfer-encoding:mime-version:message-id:date
:subject:from:from:to:cc:subject:date:message-id:reply-to;
bh=8xekR2IKHK6b8xke32HrcPkFvXPWhwmXLd0wFiP/mSA=;
b=e+rSStwSlpYjZMTFbC+RwFRtnoaWIJLzghpR/3qJeLlnfuleO8F00hOZPV5mNoGmn7
agEznDImczaYKcQ9knU2uroN8XS1U+PLCor5EZFShjkUV4MOpzECC7Qz9I36yxIvGDxG
r7joec8oZSWOgfU5Z6xuj+mITSrXHp9+helbY=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749039364; x=1749644164;
h=cc:to:content-transfer-encoding:mime-version:message-id:date
:subject:from:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=8xekR2IKHK6b8xke32HrcPkFvXPWhwmXLd0wFiP/mSA=;
b=Pgp/aXXhpsoq2Q8SVOx5onZA99TZN2sj3KbOV6kFCjE3KTuuXcg5HcH2Ty7sgnvoVw
zHzGMS8x6K1nqOf8MorSMIu14Ms33xOJoi1ZoxnLuS6dlka2oqD8LjFQvWQWBj+dDGdx
RF+hQF/lAEOSshXRndxdjh2uczIhMxq+wJCg8pSvYxbJm1XyhvBx+KJ8kMy9h0UwiNa3
Gt5V7z5zBK8F+ElLzZEptAqlda8VQu7NjsSUXFxdeY1q9QU+VU69k+PW1l4neWNYQCOS
deLCYH9Jo9wKoX9eoljRk590+MxIDvYWyCvu3gFjYAJqyBlZ+HbqmTPjnFTyJeGGrpPD
giyQ==
X-Forwarded-Encrypted: i=1; AJvYcCW5LlIg1gXLjYEaC6qX4sGdQiI32Rfm+2qKi1p79+ltb/kl6AY3ORejWbkvcBxNpsAwWKVSn86un8NEBPA=@vger.kernel.org
X-Gm-Message-State: AOJu0YwgtWT454FDsS2g4hq/Y3CiZTeDu+6PUHF17v1osry8YWx6YNT/
ZDEJqj2XPGlukPCASO4XVCIKyJ5MhsxWxpJAE5G5dKubHz2+q5/R/xCU81PQhalW9KBOvJYMUBx
izss=
X-Gm-Gg: ASbGncsR0zfEmWUc2ZOnb6qPZs/AF5oJLdzTLfFz2khVL8Rng5GjGrNlT+qSJP8cBeN
/8pR07HGzpLBD8AhDKRfWgvJ+paukkvstOSjvq40xJ3/4lHaUY4WhDH3WtwlEFOuw13ToOIc9FU
UjBH8I3eSksNUZq+8EsU8TPKrIo/OotgRQBX0GjMl+DWpJTe3BgPC8Q1MKt7OMui8OwLpdk5H5l
OoSjnDN1mUIpoaF0g3A8dM/BJEO2Oz2UFh7TxXOuObBQsm3GMZYGEbLP6rkumORhlp4YaI7qJwn
FiaDTKVkEi2mzOw8Bgjl3G5F3o4E+k6QV6MYsRPWeKrJjmLKaOnROv8/FzQYicFuCFuk6ebsRr3
DiIrCCMEr7ESE9PZ52MnzuEUcMA==
X-Google-Smtp-Source: AGHT+IHhatcr0s6vMVBvq/OiXe1Yz6St2NxBtXXPB6neJC31+NPT+75ckWXgzHIGnO1tpnNzLm5vDQ==
X-Received: by 2002:a05:6512:104a:b0:550:d4fc:a0d with SMTP id 2adb3069b0e04-5535719cec5mr813991e87.24.1749039363950;
Wed, 04 Jun 2025 05:16:03 -0700 (PDT)
Received: from ribalda.c.googlers.com (90.52.88.34.bc.googleusercontent.com. [34.88.52.90])
by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-553378a12ecsm2289134e87.90.2025.06.04.05.16.03
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 05:16:03 -0700 (PDT)
From: Ricardo Ribalda <ribalda@xxxxxxxxxxxx>
Subject: [PATCH v6 0/4] media: uvcvideo: Introduce
V4L2_META_FMT_UVC_MSXU_1_5 + other meta fixes
Date: Wed, 04 Jun 2025 12:16:01 +0000
Message-Id: <20250604-uvc-meta-v6-0-7141d48c322c@xxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
X-B4-Tracking: v=1; b=H4sIAAE5QGgC/22MQQ6CMBBFr0JmbU0tHUZceQ/joikDdAE1LTQaw
t0trIhx+X7+ewtEDo4j3IoFAicXnR8zVKcCbG/GjoVrMoOSCqWWpZiTFQNPRjBiRVQ2F2UY8v0
VuHXvPfV4Zu5dnHz47OWkt/VPJGkhxZXImEoT1oR32wc/uHk4+9DB1kl4dPXBxey2VNekW6saJ
X/cdV2/1Izf+98AAAA=
X-Change-ID: 20250403-uvc-meta-e556773d12ae
To: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>,
Hans de Goede <hdegoede@xxxxxxxxxx>,
Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>,
Guennadi Liakhovetski <guennadi.liakhovetski@xxxxxxxxx>,
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Cc: linux-media@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
linux-usb@xxxxxxxxxxxxxxx, Ricardo Ribalda <ribalda@xxxxxxxxxxxx>,
stable@xxxxxxxxxxxxxxx, Hans de Goede <hansg@xxxxxxxxxx>
X-Mailer: b4 0.14.2
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
This series introduces a new metadata format for UVC cameras and adds a
couple of improvements to the UVC metadata handling.
The new metadata format can be enabled in runtime with quirks.
Signed-off-by: Ricardo Ribalda <ribalda@xxxxxxxxxxxx>
---
Changes in v6 (Thanks Laurent):
- Fix typo in metafmt-uvc.rst
- Improve metafmt-uvc-msxu-1-5.rst
- uvc_meta_v4l2_try_format() block MSXU format unless the quirk is
active
- Refactor uvc_enable_msxu
- Document uvc_meta_detect_msxu
- Rebase series
- Add R-b
- Link to v5: https://lore.kernel.org/r/20250404-uvc-meta-v5-0-f79974fc2d20@xxxxxxxxxxxx
Changes in v5:
- Fix codestyle and kerneldoc warnings reported by media-ci
- Link to v4: https://lore.kernel.org/r/20250403-uvc-meta-v4-0-877aa6475975@xxxxxxxxxxxx
Changes in v4:
- Rename format to V4L2_META_FMT_UVC_MSXU_1_5 (Thanks Mauro)
- Flag the new format with a quirk.
- Autodetect MSXU devices.
- Link to v3: https://lore.kernel.org/linux-media/20250313-uvc-metadata-v3-0-c467af869c60@xxxxxxxxxxxx/
Changes in v3:
- Fix doc syntax errors.
- Link to v2: https://lore.kernel.org/r/20250306-uvc-metadata-v2-0-7e939857cad5@xxxxxxxxxxxx
Changes in v2:
- Add metadata invalid fix
- Move doc note to a separate patch
- Introduce V4L2_META_FMT_UVC_CUSTOM (thanks HdG!).
- Link to v1: https://lore.kernel.org/r/20250226-uvc-metadata-v1-1-6cd6fe5ec2cb@xxxxxxxxxxxx
---
Ricardo Ribalda (4):
media: uvcvideo: Do not mark valid metadata as invalid
media: Documentation: Add note about UVCH length field
media: uvcvideo: Introduce V4L2_META_FMT_UVC_MSXU_1_5
media: uvcvideo: Auto-set UVC_QUIRK_MSXU_META
.../userspace-api/media/v4l/meta-formats.rst | 1 +
.../media/v4l/metafmt-uvc-msxu-1-5.rst | 23 ++++
.../userspace-api/media/v4l/metafmt-uvc.rst | 4 +-
MAINTAINERS | 1 +
drivers/media/usb/uvc/uvc_metadata.c | 116 +++++++++++++++++++--
drivers/media/usb/uvc/uvc_video.c | 12 +--
drivers/media/usb/uvc/uvcvideo.h | 1 +
drivers/media/v4l2-core/v4l2-ioctl.c | 1 +
include/linux/usb/uvc.h | 3 +
include/uapi/linux/videodev2.h | 1 +
10 files changed, 150 insertions(+), 13 deletions(-)
---
base-commit: 5e1ff2314797bf53636468a97719a8222deca9ae
change-id: 20250403-uvc-meta-e556773d12ae
Best regards,
--
Ricardo Ribalda <ribalda@xxxxxxxxxxxx>
Return-Path: <linux-kernel+bounces-673172-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 9415F41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:16:31 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 33EB218885DF
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:16:45 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 71FD328F52A;
Wed, 4 Jun 2025 12:16:09 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="G8iyOkHg"
Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 96FA428E575
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:16:06 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.44
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749039368; cv=none; b=tMCxTbwnSjMUcUWaj7O5t00u+5E0IaBWmnO/x2LsySqLD9MZyJnhrn+UXnx2dE0pPbiqso/YWzjyzqPKEx6xx00t0yVHsj6hQzbePBWS6HEAE0NHl2MY2pvLU88zUbQ8nhIFw6pW9PPk5liXo1zp6oDvYq7/v7qFXZSbncqKrPY=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749039368; c=relaxed/simple;
bh=jSBviQQTH7JAePMwo7QwRip56LEcJbJopD0NUjuBTkQ=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=OrMm6PfLKsLdMe9RfoSvOWxevH0rv4dD31QW9etr1EjmxhnvrLiDhq/5wCWMQ/NQiJfCaK8woNRRGjCE8lB7N241TOFUgdJlBNW2Hr2KO4RnLXDtuH5gOceu4bjdWknM8/a/xvKYKZ+fg4InPewywG0WMqkoFqA0+sL/W/wWyTw=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=G8iyOkHg; arc=none smtp.client-ip=209.85.167.44
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org
Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-54b10594812so8085647e87.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 05:16:06 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=chromium.org; s=google; t=1749039364; x=1749644164; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=9bRE2ys8mv+7tBhBfvYdhYX2EBs6/nnVBCJEn6Vbnr8=;
b=G8iyOkHgPN+IXSQUq/50GbvfkUfYWE1dHn25TjVwlMnCI57vMa0ouZo0U5J7Om9WzN
lSozfueM+T7UjGRuGi2SuzxlBQTWdcGNZ2gdVWffCUYLaM7Imp0a3rtLA1zD+6niy3e/
Ddr+9OhNKBcrntuRrnBk07c37Mg5rpDdIef70=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749039364; x=1749644164;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=9bRE2ys8mv+7tBhBfvYdhYX2EBs6/nnVBCJEn6Vbnr8=;
b=bqitGkovxpUleqxagZ1AWY7uSWogLezVwN5yCXs6fzi0gtQTGgyJaVGqALZoVDeJTl
15EE+NCUbdyHKrqLWSB/YZ1c0Kyth1e4RN7INJmcYgjgzmdCnO4+mih9OuIvYQGLL6eH
iWmVocqFUytoK9J1MgMUXfFic8oZwQIy88Clf7WCS8U4qpPF5w5qQztgSvjGzxT24pYP
ItcbAjZNyWM9nRbGrh0X0o8rVGAt1dd6SBEHSunwsQkAr8DT4SV+Aqu03cnihXGbN/ZG
m20hwz0oVnQdpv30To0EiSmiS0X2ei4ouhUJS0aEZ0JayHgqqcUK6w4nM8BpqCPe1Ywy
tEiw==
X-Forwarded-Encrypted: i=1; AJvYcCVSd1mU2DaBou+fCdHqV6CPLOnUz+0aKbhyCr6VBZLNc/+koE3y0fRCKwtYIA+T2O450DbkvUadxTmJEqg=@vger.kernel.org
X-Gm-Message-State: AOJu0Ywrud0eN3hSbB279hCeels9cOttY2If4/y9cjsuikyMOTVbPOan
JfMYJ/tF0W3QAtCguyUphor3HGRNIhJNdg6Klg6PJycjCq0fD1HNErxcN++sxjoObg==
X-Gm-Gg: ASbGncvKjN1NC49ewwHMZE0OnCfHkSyz5aK7gCII0MDAwz7rTDqBT5aplzy3A4HD0xa
SLc2taln+PNYi02SVy2I89Sd8QgLjueC8kXMpI13hwGy6981Qla2yHcAV3g98DHjlgleyo++T4A
fpPZUoa54GMzlARyAc4ETzqbFRPPYlDWlPlgDjF/SgedemsPReoXbANiGJj/Gikd6jHtOUSL0gh
sQj3jNpAeZWGQ2YwF2hmCDuNr8frXvAfe5PI9AzqS5S2v9EPBCrsIWOpJ78CGiUb78estGDcdhG
dflXKKdOCJINhN85GamxlG+pwbjaQXmziJwbbwNijOAR0iKlh+H+GzTQDLqS+kNTI1+Nlgcal4F
l/1bunvC77mXLQTEyN32E+qTrph883vzWodTh
X-Google-Smtp-Source: AGHT+IH07nfEfCPRSuygtbpDMHx2EgaT3En+BmBFDnKq74uak7z24qXSWnIDRK5q++KIzPjVa2AeUA==
X-Received: by 2002:a05:6512:3d28:b0:549:5866:6489 with SMTP id 2adb3069b0e04-55356defd46mr716577e87.47.1749039364509;
Wed, 04 Jun 2025 05:16:04 -0700 (PDT)
Received: from ribalda.c.googlers.com (90.52.88.34.bc.googleusercontent.com. [34.88.52.90])
by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-553378a12ecsm2289134e87.90.2025.06.04.05.16.04
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 05:16:04 -0700 (PDT)
From: Ricardo Ribalda <ribalda@xxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 12:16:02 +0000
Subject: [PATCH v6 1/4] media: uvcvideo: Do not mark valid metadata as
invalid
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <20250604-uvc-meta-v6-1-7141d48c322c@xxxxxxxxxxxx>
References: <20250604-uvc-meta-v6-0-7141d48c322c@xxxxxxxxxxxx>
In-Reply-To: <20250604-uvc-meta-v6-0-7141d48c322c@xxxxxxxxxxxx>
To: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>,
Hans de Goede <hdegoede@xxxxxxxxxx>,
Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>,
Guennadi Liakhovetski <guennadi.liakhovetski@xxxxxxxxx>,
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Cc: linux-media@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
linux-usb@xxxxxxxxxxxxxxx, Ricardo Ribalda <ribalda@xxxxxxxxxxxx>,
stable@xxxxxxxxxxxxxxx, Hans de Goede <hansg@xxxxxxxxxx>
X-Mailer: b4 0.14.2
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Currently, the driver performs a length check of the metadata buffer
before the actual metadata size is known and before the metadata is
decided to be copied. This results in valid metadata buffers being
incorrectly marked as invalid.
Move the length check to occur after the metadata size is determined and
is decided to be copied.
Cc: stable@xxxxxxxxxxxxxxx
Fixes: 088ead255245 ("media: uvcvideo: Add a metadata device node")
Reviewed-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
Reviewed-by: Hans de Goede <hansg@xxxxxxxxxx>
Signed-off-by: Ricardo Ribalda <ribalda@xxxxxxxxxxxx>
---
drivers/media/usb/uvc/uvc_video.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c
index e3567aeb0007c1f0a766f331e4e744359e95a863..b113297dac61f1b2eecd72c36ea61ef2c1e7d28a 100644
--- a/drivers/media/usb/uvc/uvc_video.c
+++ b/drivers/media/usb/uvc/uvc_video.c
@@ -1433,12 +1433,6 @@ static void uvc_video_decode_meta(struct uvc_streaming *stream,
if (!meta_buf || length == 2)
return;
- if (meta_buf->length - meta_buf->bytesused <
- length + sizeof(meta->ns) + sizeof(meta->sof)) {
- meta_buf->error = 1;
- return;
- }
-
has_pts = mem[1] & UVC_STREAM_PTS;
has_scr = mem[1] & UVC_STREAM_SCR;
@@ -1459,6 +1453,12 @@ static void uvc_video_decode_meta(struct uvc_streaming *stream,
!memcmp(scr, stream->clock.last_scr, 6)))
return;
+ if (meta_buf->length - meta_buf->bytesused <
+ length + sizeof(meta->ns) + sizeof(meta->sof)) {
+ meta_buf->error = 1;
+ return;
+ }
+
meta = (struct uvc_meta_buf *)((u8 *)meta_buf->mem + meta_buf->bytesused);
local_irq_save(flags);
time = uvc_video_get_time();
--
2.50.0.rc0.604.gd4ff7b7c86-goog
Return-Path: <linux-kernel+bounces-673174-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 9B19741E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:16:42 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 3651A174110
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:16:43 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id ECA6C28F931;
Wed, 4 Jun 2025 12:16:09 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Vwhzcscz"
Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5ABB028E609
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:16:07 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.41
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749039369; cv=none; b=OKmFHJADUXe/CMlCDUn5DntCK92P9ADg9jOC6BWO+U43b0qJVwIFR1uj0TozYrMeMGyqJ4sv5T7GC0jcMaKKfUCAIoWOMdo3NKyD2Pxm5UynBBnonOCaJI2xg2QTUy1FC47bG9GsG/B9nFOS9FubmO7k+TLK2SHA8cuFhBT4cQ4=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749039369; c=relaxed/simple;
bh=R9poar0IHwcvjb7X94DIxPbqfZnQbM35tbbAXoVZYLU=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=A6H4Dxix4xEiLxR+ZG2tdh8hvkRHz6+EgRzXR6axVg/ljZ4AfABCqc7+P6r7MNgiJfuCDEoywqxf0HoFIKEp5LayrUqCn5NIa9epaNAaccUi/AyqVXR2Cr7C1JoNc13PWGjUEVNVu4/coC63eaJSb+vwxkfbnWmxLQ9c3Kej95E=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=Vwhzcscz; arc=none smtp.client-ip=209.85.167.41
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org
Received: by mail-lf1-f41.google.com with SMTP id 2adb3069b0e04-5533303070cso7514288e87.2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 05:16:06 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=chromium.org; s=google; t=1749039365; x=1749644165; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=U65dM4LWKHoC7xW4BA72z8M8lPtxis+hazmUzV/TgxQ=;
b=VwhzcscznEi8l5eb9HAbb9nZZHVFk4PLxSHZ9FRj2276NlAmZm2eh+1kin53N0wQWR
ofixgFEZeSMUls7eB/6jRB8duaVLT5hQM3ZKM928w8WCmzuQdS6sePdC1FmULqA7c5km
ZluFNFVRGJCc1wD4rx4vDV6a54n+6VY096nuE=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749039365; x=1749644165;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=U65dM4LWKHoC7xW4BA72z8M8lPtxis+hazmUzV/TgxQ=;
b=Mv7EX059iqX2NQM1h9NuFOP6U1rczlOR0fVHZEf3gt/xfc8wAqvxN369bUCLqSs3F2
i9TpNPVcpl+fSA0mjL3cusrMshD/pyLpp7AvYxBu/ksnggXKyFfcGoqDeOc7/2df0BGK
c1n4zfys2f+jq6Wfb8qKN0XgUcMHETVJlp6qLJQkRw1El0HKPq44DBZSuPn4oqEL0Dca
yTiaXd11yfA2etFEFEF+3dzDJAfl7AMCnbSW4/MnONLal4/jbuh+j4shmZynvQ1S7Biu
KqtaCZHLJJjcZcFKEQcKSEiFfKyI6jVwwmLKLdo/1tCc5xQuDg2+HDVerChSBKaKjKm+
QGrA==
X-Forwarded-Encrypted: i=1; AJvYcCUZ6Yc8W9oxPnloBaEGqwkeAuuUH5hzZLkuXiPCS5PW3gEW+RZuAPlaTkCk/Mav2fvt8HDk2D5J2rUGRPM=@vger.kernel.org
X-Gm-Message-State: AOJu0YzJ4P9pSkqD/baWMwxsd1UVXZYC+uq1C+fy0CdYpoZTaDV9PAbN
KfIlawEGsEyfSJ5zCyy/7Dsd0JyEClmePaJD0jBrTTEzO7WZFxThmx6HO9y05582tA==
X-Gm-Gg: ASbGnctME1sYDCkBh40G2tUEqVjmfn4Q6v33LfYgdeDpKpbVYiOcPbCSdMqEjFbMkMK
4eCQ+w/TOgu4biB/0/e+QBxZ9F1av5aV1kVb5nREUcY+ldeYm1FMBJnfDvjRn68Pgkuf3AjxAh4
6LfRz6tbbqQkQhLdmsRPaM9N/fgxxi2NoYAmTLq3kbKziKv/5Hskc2+F3p3HeWoycIxR60U1Eyx
UhWwH++G/UrEn7wXIYRzqVGe80cM2XWjT0lm+QyLM048vjQCCvHlPYBtKp0LTZjmbdJeL7ndIRI
EZiMafdFWRrkkVzkATEsKIx1934rrRT/D/7/3/u3JUsNiwIj7AK06NI5S5LAYqn/Tui9KhIyUOr
GDKbCDltowm8pKHqJTRh3Qb3LrLF8nGx9Fq0i
X-Google-Smtp-Source: AGHT+IGBrBRDYdNS9IdYcZYK7RO2DqQLHlV/qfBzNERuIj/o5XcOQ3QVU/1bYU8eKuGEsinUybydhQ==
X-Received: by 2002:a05:6512:3d9e:b0:553:2e42:fffb with SMTP id 2adb3069b0e04-55356bfb72cmr664186e87.33.1749039365318;
Wed, 04 Jun 2025 05:16:05 -0700 (PDT)
Received: from ribalda.c.googlers.com (90.52.88.34.bc.googleusercontent.com. [34.88.52.90])
by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-553378a12ecsm2289134e87.90.2025.06.04.05.16.04
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 05:16:04 -0700 (PDT)
From: Ricardo Ribalda <ribalda@xxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 12:16:03 +0000
Subject: [PATCH v6 2/4] media: Documentation: Add note about UVCH length
field
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <20250604-uvc-meta-v6-2-7141d48c322c@xxxxxxxxxxxx>
References: <20250604-uvc-meta-v6-0-7141d48c322c@xxxxxxxxxxxx>
In-Reply-To: <20250604-uvc-meta-v6-0-7141d48c322c@xxxxxxxxxxxx>
To: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>,
Hans de Goede <hdegoede@xxxxxxxxxx>,
Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>,
Guennadi Liakhovetski <guennadi.liakhovetski@xxxxxxxxx>,
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Cc: linux-media@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
linux-usb@xxxxxxxxxxxxxxx, Ricardo Ribalda <ribalda@xxxxxxxxxxxx>,
Hans de Goede <hansg@xxxxxxxxxx>
X-Mailer: b4 0.14.2
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
The documentation currently describes the UVC length field as the "length
of the rest of the block", which can be misleading. The driver limits the
data copied to a maximum of 12 bytes.
This change adds a clarifying sentence to the documentation to make this
restriction explicit.
Reviewed-by: Hans de Goede <hansg@xxxxxxxxxx>
Signed-off-by: Ricardo Ribalda <ribalda@xxxxxxxxxxxx>
---
Documentation/userspace-api/media/v4l/metafmt-uvc.rst | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Documentation/userspace-api/media/v4l/metafmt-uvc.rst b/Documentation/userspace-api/media/v4l/metafmt-uvc.rst
index 784346d14bbdbf28348262084d5b0646d30bd1da..4c05e9e54683a2bf844ddf26f99d0d9713ef05de 100644
--- a/Documentation/userspace-api/media/v4l/metafmt-uvc.rst
+++ b/Documentation/userspace-api/media/v4l/metafmt-uvc.rst
@@ -44,7 +44,9 @@ Each individual block contains the following fields:
them
* - :cspan:`1` *The rest is an exact copy of the UVC payload header:*
* - __u8 length;
- - length of the rest of the block, including this field
+ - length of the rest of the block, including this field. Please note that
+ regardless of this value, for V4L2_META_FMT_UVC the kernel will never
+ copy more than 2-12 bytes.
* - __u8 flags;
- Flags, indicating presence of other standard UVC fields
* - __u8 buf[];
--
2.50.0.rc0.604.gd4ff7b7c86-goog
Return-Path: <linux-kernel+bounces-673175-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id DE70541E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:17:11 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id A6D6717415A
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:17:12 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 2104828FAA0;
Wed, 4 Jun 2025 12:16:11 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="msGOwrwJ"
Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id CD35F28EA69
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:16:07 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.42
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749039370; cv=none; b=RgzFkj2BvEe7wbHFaqPxVzvIqE8epmLHZseqlAfXZVgJ8x0AGdB9Sr7jZ7+X3uK5aMAuovU/SPYI3yibnS49R9fVhXAuerQg2V9MFSWDm7bhI/sUcsZ6xJeCDF21EHlzecpzBijY8yz0zi6XakZWvOZEWLHbmcNVoWBcOgRXDPQ=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749039370; c=relaxed/simple;
bh=iQEqTG4/3UDjJ+E3KJa+z+GCpi2U4Apdf9LwAOxBmDc=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=Dcxtg1mlIwFBV8d1utyw0DFcgLTEi+QVV3rMdxxq1pAN3C5R02dx5LmG+5EAuz+oVLcXnHoLLceVRj2ibOM3EYy6+yinPuUPSxghNLcBGMc1jMcp1UowySUYubg4cjRpiPQz03N9Bqlv8uH2r/j/r31uM8Dq9AgpvmkJAwJIMjg=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=msGOwrwJ; arc=none smtp.client-ip=209.85.167.42
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org
Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-55220699ba8so8510683e87.2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 05:16:07 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=chromium.org; s=google; t=1749039366; x=1749644166; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=Rpn5XLuZmuf4jyqtpvFJSJfn3q1HBa9vHQrTSB1V4GQ=;
b=msGOwrwJIa2KdW9VLT26AhD8GiVYfFxY5JdW2sYHOmqJF0O/abqPhJKeaDkjpS7VD6
8a3OIXXKe0ruSRnI25E6mi5gb2MqRofs0I7mEdOYfJctoKN9odN3YIlIzFXJLHB3qEbH
vHaK1eefl/UfZzfObW6i1AtniQQ7lzMIII5rY=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749039366; x=1749644166;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=Rpn5XLuZmuf4jyqtpvFJSJfn3q1HBa9vHQrTSB1V4GQ=;
b=aPRq4FoZEU3yGXXu1nNI/PhcJ04XInIkkcc+VMLLUVacRxM6b+IXhVtJF6I6BDwb76
U6vPsqfNAgf46xIhXLaul8Y41EbxdcSv/yzhLgFoEPauqVPmfznG05eTb/6aKlGd9q7g
ru+0iDK0VfzaTJ9A7Po1Uc/t2Guk5V0pSEMoO4KDyYXunEhk9hrd+zEVI/SMK5AdbfnT
fb8OK+7YsBODMVyHTsBA6LsiDMv4J+4OsY5qhdN4nKvR3EDClhT1AW9Zt1USl5xPAoow
7OYE6tkxG4hRUkk4b1MbdvshcarAcJaE7b6Bpl1YV8C0CcWD9iO2+cDW5e4T4YcmWdnG
JhUA==
X-Forwarded-Encrypted: i=1; AJvYcCXENBG+sma5H7TM43jMua5/dn77HRkM/bROm8fm969d/KO4SN/KaAmte20pwUUFM/qRErzLIGAsYLXhBxc=@vger.kernel.org
X-Gm-Message-State: AOJu0YyI963A/LiWHWkHLUc7TTjslwubxxPF+RZLUWEqIKUlSPGOgP/f
MeLms61g63sCy6mmzVwsQV7WhOCDbXIS5faebj/r5DMmVJZfXRcewWsdVkOBhFQenw==
X-Gm-Gg: ASbGncsENKnc29fO9miguVkvpQieqFzDRFVJUYvmSuqOU+2KWGTOkIEqT0JIaLknfyp
vN1tfobRAh3RqegvsEXrapmJ1JtcNxnCcTRKvNHJ4L3PQFhsKUxWW6n5YOmIk07WipUWr0EfLmD
qEkfTOvACG2W2AIfCvTmVVwO5m3yALrYsAWMnx8kQfbIZhlZbIs3YdaKXMrgakwkORbkb0ndtTd
Wx9/1MsL78iZZK3NED65+leacHDGkhdlT/gL0M0elLtNPx7D79Te1Vw/8ZkM6+lH04xNqwAwomh
bzWI94/4fDMOuoV0VNcx+pk0odB8CzSGecyPa5+L6oQHo4xn0uf44e0UWK0xEMNg/lA6to73UWP
2+MYS0MQPMU23ujBksyyQ8SUUiA==
X-Google-Smtp-Source: AGHT+IF3RtTm2BDDHqCJioBd+yKx4Lso0a0nlgtuzqJjFvwDip15oCrnHIDxvdROipxY74nFayO7tw==
X-Received: by 2002:a05:6512:2214:b0:550:d4f3:84a6 with SMTP id 2adb3069b0e04-55356c040femr799958e87.33.1749039365904;
Wed, 04 Jun 2025 05:16:05 -0700 (PDT)
Received: from ribalda.c.googlers.com (90.52.88.34.bc.googleusercontent.com. [34.88.52.90])
by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-553378a12ecsm2289134e87.90.2025.06.04.05.16.05
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 05:16:05 -0700 (PDT)
From: Ricardo Ribalda <ribalda@xxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 12:16:04 +0000
Subject: [PATCH v6 3/4] media: uvcvideo: Introduce
V4L2_META_FMT_UVC_MSXU_1_5
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <20250604-uvc-meta-v6-3-7141d48c322c@xxxxxxxxxxxx>
References: <20250604-uvc-meta-v6-0-7141d48c322c@xxxxxxxxxxxx>
In-Reply-To: <20250604-uvc-meta-v6-0-7141d48c322c@xxxxxxxxxxxx>
To: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>,
Hans de Goede <hdegoede@xxxxxxxxxx>,
Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>,
Guennadi Liakhovetski <guennadi.liakhovetski@xxxxxxxxx>,
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Cc: linux-media@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
linux-usb@xxxxxxxxxxxxxxx, Ricardo Ribalda <ribalda@xxxxxxxxxxxx>,
Hans de Goede <hansg@xxxxxxxxxx>
X-Mailer: b4 0.14.2
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
The UVC driver provides two metadata types V4L2_META_FMT_UVC, and
V4L2_META_FMT_D4XX. The only difference between the two of them is that
V4L2_META_FMT_UVC only copies PTS, SCR, size and flags, and
V4L2_META_FMT_D4XX copies the whole metadata section.
Now we only enable V4L2_META_FMT_D4XX for the Intel D4xx family of
devices, but it is useful to have the whole metadata payload for any
device where vendors include other metadata, such as the one described by
Microsoft:
https://learn.microsoft.com/en-us/windows-hardware/drivers/stream/mf-capture-metadata
This patch introduces a new format V4L2_META_FMT_UVC_MSXU_1_5, that is
identical to V4L2_META_FMT_D4XX.
Let the user enable this format with a quirk for now. This way they can
test if their devices provide useful metadata without rebuilding the
kernel. They can later contribute patches to auto-quirk their devices.
We will also work in methods to auto-detect devices compatible with this
new metadata format.
Suggested-by: Hans de Goede <hdegoede@xxxxxxxxxx>
Reviewed-by: Hans de Goede <hansg@xxxxxxxxxx>
Signed-off-by: Ricardo Ribalda <ribalda@xxxxxxxxxxxx>
---
.../userspace-api/media/v4l/meta-formats.rst | 1 +
.../media/v4l/metafmt-uvc-msxu-1-5.rst | 23 +++++++++++
MAINTAINERS | 1 +
drivers/media/usb/uvc/uvc_metadata.c | 44 +++++++++++++++++++---
drivers/media/usb/uvc/uvcvideo.h | 1 +
drivers/media/v4l2-core/v4l2-ioctl.c | 1 +
include/uapi/linux/videodev2.h | 1 +
7 files changed, 66 insertions(+), 6 deletions(-)
diff --git a/Documentation/userspace-api/media/v4l/meta-formats.rst b/Documentation/userspace-api/media/v4l/meta-formats.rst
index bb6876cfc271e1a0543eee4209d6251e1a6a73cc..0de80328c36bf148051a19abe9e5241234ddfe5c 100644
--- a/Documentation/userspace-api/media/v4l/meta-formats.rst
+++ b/Documentation/userspace-api/media/v4l/meta-formats.rst
@@ -20,6 +20,7 @@ These formats are used for the :ref:`metadata` interface only.
metafmt-pisp-fe
metafmt-rkisp1
metafmt-uvc
+ metafmt-uvc-msxu-1-5
metafmt-vivid
metafmt-vsp1-hgo
metafmt-vsp1-hgt
diff --git a/Documentation/userspace-api/media/v4l/metafmt-uvc-msxu-1-5.rst b/Documentation/userspace-api/media/v4l/metafmt-uvc-msxu-1-5.rst
new file mode 100644
index 0000000000000000000000000000000000000000..dd1c3076df243d770a13e7f6d07c3296a269e16a
--- /dev/null
+++ b/Documentation/userspace-api/media/v4l/metafmt-uvc-msxu-1-5.rst
@@ -0,0 +1,23 @@
+.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
+
+.. _v4l2-meta-fmt-uvc-msxu-1-5:
+
+***********************************
+V4L2_META_FMT_UVC_MSXU_1_5 ('UVCM')
+***********************************
+
+Microsoft(R)'s UVC Payload Metadata.
+
+
+Description
+===========
+
+V4L2_META_FMT_UVC_MSXU_1_5 buffers follow the metadata buffer layout of
+V4L2_META_FMT_UVC with the only difference that it includes all the UVC
+metadata in the `buffer[]` field, not just the first 2-12 bytes.
+
+The metadata format follows the specification from Microsoft(R) [1].
+
+.. _1:
+
+[1] https://docs.microsoft.com/en-us/windows-hardware/drivers/stream/uvc-extensions-1-5
diff --git a/MAINTAINERS b/MAINTAINERS
index 137122d3dc4e46194eba1c4e035e24b203ed46c5..939def0992c259655c3ae1cc8a757ce53e9c650e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -25215,6 +25215,7 @@ S: Maintained
W: http://www.ideasonboard.org/uvc/
T: git git://linuxtv.org/media.git
F: Documentation/userspace-api/media/drivers/uvcvideo.rst
+F: Documentation/userspace-api/media/v4l/metafmt-uvc-msxu-1-5.rst
F: Documentation/userspace-api/media/v4l/metafmt-uvc.rst
F: drivers/media/common/uvc.c
F: drivers/media/usb/uvc/
diff --git a/drivers/media/usb/uvc/uvc_metadata.c b/drivers/media/usb/uvc/uvc_metadata.c
index 82de7781f5b6b70c5ba16bcba9e0741231231904..df3f259271c675feb590c4534dad95b3b786f082 100644
--- a/drivers/media/usb/uvc/uvc_metadata.c
+++ b/drivers/media/usb/uvc/uvc_metadata.c
@@ -63,15 +63,22 @@ static int uvc_meta_v4l2_try_format(struct file *file, void *fh,
struct uvc_streaming *stream = video_get_drvdata(vfh->vdev);
struct uvc_device *dev = stream->dev;
struct v4l2_meta_format *fmt = &format->fmt.meta;
- u32 fmeta = fmt->dataformat;
+ u32 fmeta;
+
+ if (fmt->dataformat == dev->info->meta_format)
+ fmeta = dev->info->meta_format;
+ else if (fmt->dataformat == V4L2_META_FMT_UVC_MSXU_1_5 &&
+ dev->quirks & UVC_QUIRK_MSXU_META)
+ fmeta = V4L2_META_FMT_UVC_MSXU_1_5;
+ else
+ fmeta = V4L2_META_FMT_UVC;
if (format->type != vfh->vdev->queue->type)
return -EINVAL;
memset(fmt, 0, sizeof(*fmt));
- fmt->dataformat = fmeta == dev->info->meta_format
- ? fmeta : V4L2_META_FMT_UVC;
+ fmt->dataformat = fmeta;
fmt->buffersize = UVC_METADATA_BUF_SIZE;
return 0;
@@ -106,6 +113,27 @@ static int uvc_meta_v4l2_set_format(struct file *file, void *fh,
return ret;
}
+static u32 uvc_meta_idx_to_fmeta(struct uvc_device *dev, u32 index)
+{
+ switch (index) {
+ case 0:
+ return V4L2_META_FMT_UVC;
+ case 1:
+ if (dev->info->meta_format)
+ return dev->info->meta_format;
+ if (dev->quirks & UVC_QUIRK_MSXU_META)
+ return V4L2_META_FMT_UVC_MSXU_1_5;
+ return 0;
+ case 2:
+ if (dev->info->meta_format &&
+ dev->quirks & UVC_QUIRK_MSXU_META)
+ return V4L2_META_FMT_UVC_MSXU_1_5;
+ return 0;
+ }
+
+ return 0;
+}
+
static int uvc_meta_v4l2_enum_formats(struct file *file, void *fh,
struct v4l2_fmtdesc *fdesc)
{
@@ -113,16 +141,20 @@ static int uvc_meta_v4l2_enum_formats(struct file *file, void *fh,
struct uvc_streaming *stream = video_get_drvdata(vfh->vdev);
struct uvc_device *dev = stream->dev;
u32 index = fdesc->index;
+ u32 fmeta;
+
+ if (fdesc->type != vfh->vdev->queue->type)
+ return -EINVAL;
- if (fdesc->type != vfh->vdev->queue->type ||
- index > 1U || (index && !dev->info->meta_format))
+ fmeta = uvc_meta_idx_to_fmeta(dev, fdesc->index);
+ if (!fmeta)
return -EINVAL;
memset(fdesc, 0, sizeof(*fdesc));
fdesc->type = vfh->vdev->queue->type;
fdesc->index = index;
- fdesc->pixelformat = index ? dev->info->meta_format : V4L2_META_FMT_UVC;
+ fdesc->pixelformat = fmeta;
return 0;
}
diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h
index b9f8eb62ba1d82ea7788cf6c10cc838a429dbc9e..2b6d9ddc18e751bef4d295439c460b741d1a1a2f 100644
--- a/drivers/media/usb/uvc/uvcvideo.h
+++ b/drivers/media/usb/uvc/uvcvideo.h
@@ -77,6 +77,7 @@
#define UVC_QUIRK_DISABLE_AUTOSUSPEND 0x00008000
#define UVC_QUIRK_INVALID_DEVICE_SOF 0x00010000
#define UVC_QUIRK_MJPEG_NO_EOF 0x00020000
+#define UVC_QUIRK_MSXU_META 0x00040000
/* Format flags */
#define UVC_FMT_FLAG_COMPRESSED 0x00000001
diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
index 650dc1956f73d2f1943b56c42140c7b8d757259f..ba508f7fb577021497009ab23a7be5add23fd08c 100644
--- a/drivers/media/v4l2-core/v4l2-ioctl.c
+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
@@ -1459,6 +1459,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)
case V4L2_META_FMT_VSP1_HGO: descr = "R-Car VSP1 1-D Histogram"; break;
case V4L2_META_FMT_VSP1_HGT: descr = "R-Car VSP1 2-D Histogram"; break;
case V4L2_META_FMT_UVC: descr = "UVC Payload Header Metadata"; break;
+ case V4L2_META_FMT_UVC_MSXU_1_5: descr = "UVC MSXU Metadata"; break;
case V4L2_META_FMT_D4XX: descr = "Intel D4xx UVC Metadata"; break;
case V4L2_META_FMT_VIVID: descr = "Vivid Metadata"; break;
case V4L2_META_FMT_RK_ISP1_PARAMS: descr = "Rockchip ISP1 3A Parameters"; break;
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 9e3b366d5fc79d8a04c6f0752858fc23363db65c..75f2096b2d4fed5e0235ea4732d35044ff77a98b 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -861,6 +861,7 @@ struct v4l2_pix_format {
#define V4L2_META_FMT_VSP1_HGT v4l2_fourcc('V', 'S', 'P', 'T') /* R-Car VSP1 2-D Histogram */
#define V4L2_META_FMT_UVC v4l2_fourcc('U', 'V', 'C', 'H') /* UVC Payload Header metadata */
#define V4L2_META_FMT_D4XX v4l2_fourcc('D', '4', 'X', 'X') /* D4XX Payload Header metadata */
+#define V4L2_META_FMT_UVC_MSXU_1_5 v4l2_fourcc('U', 'V', 'C', 'M') /* UVC MSXU metadata */
#define V4L2_META_FMT_VIVID v4l2_fourcc('V', 'I', 'V', 'D') /* Vivid Metadata */
/* Vendor specific - used for RK_ISP1 camera sub-system */
--
2.50.0.rc0.604.gd4ff7b7c86-goog
Return-Path: <linux-kernel+bounces-673176-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id E3B9541E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:17:27 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 240A8188B301
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:17:41 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 067A828FFCD;
Wed, 4 Jun 2025 12:16:12 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="M0eFwaAZ"
Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 686FA252295
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:16:08 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.51
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749039371; cv=none; b=My5oXUjySOsMiX1WMiX4z+xd3Kj+R4unmsZreRPUKT3YNJie2OEs42CcMVbTleN4F/zLSf1IuqXEVUtBpUV+z/baPz7Cnyi9VuHoCRFZTcWCn0J3vPkHYlVwhsKGWRz46oWpE4kH7SrBq+ALTEhcaI0O/OriZw9GottoWEIIbcE=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749039371; c=relaxed/simple;
bh=qb2IsYSQmLLLKdcyr0dhshT0CIs3hy85Pfrju2/okvw=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=bgPAwLTm4PFWRR9gu9W5/n97FFZWaOjMxot0E1czq2pKCdLo2D5a9hjbdJXuAljl1sSWc/pzmEMcGXyHGw4gMQzOs1vTfuKCTIGQXH9l34Je39l6WQRFKkDPKHIqiIblVGi8UPzIWBGzqKERREreTzgzAaa7nQaNIAi5HJONFXc=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=M0eFwaAZ; arc=none smtp.client-ip=209.85.167.51
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org
Received: by mail-lf1-f51.google.com with SMTP id 2adb3069b0e04-54acc0cd458so8317418e87.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 05:16:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=chromium.org; s=google; t=1749039366; x=1749644166; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=WMJRjZ4qL/tvILSJe2gN3C50PVnnmdOg1JfvMI0lfRc=;
b=M0eFwaAZLuM95X8w4hQhyn1gMgbzNw8Rf95rHy4MkRlc7sN1u3duvIuINzCBnx6u5a
lL0J6pL6nl3ZbLdWitKgruGjhONp0cidWIV5v/tQqSOmfrWChgjH3KOrUYHCZzUrQfKH
A0ZNcWHcgplpLYkvowgtDrirwpkNDpdpAqBMU=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749039366; x=1749644166;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=WMJRjZ4qL/tvILSJe2gN3C50PVnnmdOg1JfvMI0lfRc=;
b=AGd4o+jNMT0f7A1PU4XVL61FeYduVJXUBVjsRZgE4lS8cnpWUy6UYVfUBvDMo63oHn
hcraR4G/+VE5XQqJT5r2XmJKXBqEThpuSZC7uHmUN24Vw8pAqp9o3BnoW2VysBJ6QT8/
cINm2Xu+QsrCvrekmQbfHfN2uXaCCeP4vmOTpM/lGSXD+vVY/K+2M1qClrYIYGm/adc9
6m+xunVE20+8jw50YZoX/3vZ+MHMfBfLIBqsr3HVePxp+oyYVNn1vt3F5bBgSDjq84eM
Y8PRHrIPXx5IVTMWfB3ldUYR9jKJBdWHhH8kVgqshqCtNzCrgB8C4qfQhm/MGhTUqHX7
st7Q==
X-Forwarded-Encrypted: i=1; AJvYcCXw4pCb44UTrvkC9zsDvpFG4bSUqaMPK2RHR2wWwdSgOFNI7t3yRt0OzoMr851SO6a3kpIsPDlZNx5ewGQ=@vger.kernel.org
X-Gm-Message-State: AOJu0YwXkUDOHJmE9HjjAUHVpwHI2dCy3I8HJg1FO3J4Cqm71ElGMNCZ
8ry5btGfCoK5icKNvbjPbWTjjHipYTMAU/5TGx3/oHNVVpUfA8mS/w77pAtQXNiK8au3vHu2kYI
UWFw=
X-Gm-Gg: ASbGncvHgvSUFdXkQSLpmje6wgP08HhFHR4T+OlRFUZzGaGCXYP+AXMTumsmEI3niaL
d64o5QhXGvh6WxACBqGYXAYFPHHnhc6e+p2fDh3ohASq+a/NPRF3VkEC43gZ59O42vkNlWiMZnp
Zfnp0a1slK9TJ+jZuIFIyDFSOImSED0rsOphlFDeyZsFtSv/un0kDKqJKNslhaoWoz/9biliG9L
6oWpGbB3kvH7IvcnY/pbtd+VLua6bG+WHV8rP8yJsxXybC0R+1ERI2Jlz/Ky2xqO/xZ5UgTDvx1
bRcP2jRkD3w5x2hgfsFN3wdxu2P/OnyL/bEZ1Fzk0w8nk6cNxkdjDYgWxsFZvA6Cy8KI+CfRKnT
aRwXrjxIwFscnGnAPjmD/SbhAvCmtIx9PfT+p
X-Google-Smtp-Source: AGHT+IE+7NzqkeD+ZSyHu/dQA5YK9mbS7I0/oekl8u6s5H7/C/PTVU979D4mgOjItWdWoshdoyZQ+g==
X-Received: by 2002:a05:6512:39c4:b0:553:2480:230b with SMTP id 2adb3069b0e04-55356aea00cmr772720e87.22.1749039366427;
Wed, 04 Jun 2025 05:16:06 -0700 (PDT)
Received: from ribalda.c.googlers.com (90.52.88.34.bc.googleusercontent.com. [34.88.52.90])
by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-553378a12ecsm2289134e87.90.2025.06.04.05.16.06
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 05:16:06 -0700 (PDT)
From: Ricardo Ribalda <ribalda@xxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 12:16:05 +0000
Subject: [PATCH v6 4/4] media: uvcvideo: Auto-set UVC_QUIRK_MSXU_META
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <20250604-uvc-meta-v6-4-7141d48c322c@xxxxxxxxxxxx>
References: <20250604-uvc-meta-v6-0-7141d48c322c@xxxxxxxxxxxx>
In-Reply-To: <20250604-uvc-meta-v6-0-7141d48c322c@xxxxxxxxxxxx>
To: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>,
Hans de Goede <hdegoede@xxxxxxxxxx>,
Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>,
Guennadi Liakhovetski <guennadi.liakhovetski@xxxxxxxxx>,
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Cc: linux-media@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
linux-usb@xxxxxxxxxxxxxxx, Ricardo Ribalda <ribalda@xxxxxxxxxxxx>,
Hans de Goede <hansg@xxxxxxxxxx>
X-Mailer: b4 0.14.2
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
If the camera supports the MSXU_CONTROL_METADATA control, auto set the
MSXU_META quirk.
Reviewed-by: Hans de Goede <hansg@xxxxxxxxxx>
Signed-off-by: Ricardo Ribalda <ribalda@xxxxxxxxxxxx>
---
drivers/media/usb/uvc/uvc_metadata.c | 72 ++++++++++++++++++++++++++++++++++++
include/linux/usb/uvc.h | 3 ++
2 files changed, 75 insertions(+)
diff --git a/drivers/media/usb/uvc/uvc_metadata.c b/drivers/media/usb/uvc/uvc_metadata.c
index df3f259271c675feb590c4534dad95b3b786f082..cd58427578ff413591b60abe0a210b90802dddc7 100644
--- a/drivers/media/usb/uvc/uvc_metadata.c
+++ b/drivers/media/usb/uvc/uvc_metadata.c
@@ -10,6 +10,7 @@
#include <linux/list.h>
#include <linux/module.h>
#include <linux/usb.h>
+#include <linux/usb/uvc.h>
#include <linux/videodev2.h>
#include <media/v4l2-ioctl.h>
@@ -188,11 +189,82 @@ static const struct v4l2_file_operations uvc_meta_fops = {
.mmap = vb2_fop_mmap,
};
+static const u8 uvc_msxu_guid[16] = UVC_GUID_MSXU_1_5;
+
+static struct uvc_entity *uvc_meta_find_msxu(struct uvc_device *dev)
+{
+ struct uvc_entity *entity;
+
+ list_for_each_entry(entity, &dev->entities, list) {
+ if (!memcmp(entity->guid, uvc_msxu_guid, sizeof(entity->guid)))
+ return entity;
+ }
+
+ return NULL;
+}
+
+#define MSXU_CONTROL_METADATA 0x9
+static int uvc_meta_detect_msxu(struct uvc_device *dev)
+{
+ u32 *data __free(kfree) = NULL;
+ struct uvc_entity *entity;
+ int ret;
+
+ entity = uvc_meta_find_msxu(dev);
+ if (!entity)
+ return 0;
+
+ /*
+ * USB requires buffers aligned in a special way, simplest way is to
+ * make sure that query_ctrl will work is to kmalloc() them.
+ */
+ data = kmalloc(sizeof(*data), GFP_KERNEL);
+ if (!data)
+ return -ENOMEM;
+
+ /* Check if the metadata is already enabled. */
+ ret = uvc_query_ctrl(dev, UVC_GET_CUR, entity->id, dev->intfnum,
+ MSXU_CONTROL_METADATA, data, sizeof(*data));
+ if (ret)
+ return 0;
+
+ if (*data) {
+ dev->quirks |= UVC_QUIRK_MSXU_META;
+ return 0;
+ }
+
+ /*
+ * We have seen devices that require 1 to enable the metadata, others
+ * requiring a value != 1 and others requiring a value >1. Luckily for
+ * us, the value from GET_MAX seems to work all the time.
+ */
+ ret = uvc_query_ctrl(dev, UVC_GET_MAX, entity->id, dev->intfnum,
+ MSXU_CONTROL_METADATA, data, sizeof(*data));
+ if (ret || !*data)
+ return 0;
+
+ /*
+ * If we can set MSXU_CONTROL_METADATA, the device will report
+ * metadata.
+ */
+ ret = uvc_query_ctrl(dev, UVC_SET_CUR, entity->id, dev->intfnum,
+ MSXU_CONTROL_METADATA, data, sizeof(*data));
+ if (!ret)
+ dev->quirks |= UVC_QUIRK_MSXU_META;
+
+ return 0;
+}
+
int uvc_meta_register(struct uvc_streaming *stream)
{
struct uvc_device *dev = stream->dev;
struct video_device *vdev = &stream->meta.vdev;
struct uvc_video_queue *queue = &stream->meta.queue;
+ int ret;
+
+ ret = uvc_meta_detect_msxu(dev);
+ if (ret)
+ return ret;
stream->meta.format = V4L2_META_FMT_UVC;
diff --git a/include/linux/usb/uvc.h b/include/linux/usb/uvc.h
index bce95153e5a65613a710d7316fc17cf5462b5bce..ee19e9f915b8370c333c426dc1ee4202c7b75c5b 100644
--- a/include/linux/usb/uvc.h
+++ b/include/linux/usb/uvc.h
@@ -29,6 +29,9 @@
#define UVC_GUID_EXT_GPIO_CONTROLLER \
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03}
+#define UVC_GUID_MSXU_1_5 \
+ {0xdc, 0x95, 0x3f, 0x0f, 0x32, 0x26, 0x4e, 0x4c, \
+ 0x92, 0xc9, 0xa0, 0x47, 0x82, 0xf4, 0x3b, 0xc8}
#define UVC_GUID_FORMAT_MJPEG \
{ 'M', 'J', 'P', 'G', 0x00, 0x00, 0x10, 0x00, \
--
2.50.0.rc0.604.gd4ff7b7c86-goog
Return-Path: <linux-kernel+bounces-673177-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id E4BB641E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:17:53 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 247AC7A1934
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:16:34 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id D7F3C28ECFC;
Wed, 4 Jun 2025 12:17:05 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="ZDG7755E"
Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5EB1B2C327E;
Wed, 4 Jun 2025 12:17:03 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.158.5
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749039425; cv=none; b=IiYHdMQTsKlH6A8vk+cxq/ga5dPmwYQSkR03HcGYpb+/PFyg6/XovoVUrN0JYzgeBFP6DOQBNTGUZNnZ1u717IbhHHhIVooVDwNo0nj2T5vQDuZxa+dVSAlx0EPXgA5epgZn4IP36omXvHb9nYyUEOeSFiFHjDSK2L5mxHjulKg=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749039425; c=relaxed/simple;
bh=BYEG8UxhrVg4vmXnOWAFZdFKVOOqkdCNcXJaeBUyLEQ=;
h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References:
MIME-Version:Content-Type; b=tKrNQ2AmsPFpzs7qriWRdgTL5FUM5wRWXf8c9UPDxGM+V2T/Eg5XaPSz7UCUnSzsw28henMCX7arJ0ui/aGJRIK7g+qooor2RD9N3zabLMAImqnvqIICjalwBY8aD0tBxa76SBJJuZH1wTBSEcGEA5SHNrpbY4BJu874z1tAutM=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=ZDG7755E; arc=none smtp.client-ip=148.163.158.5
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com
Received: from pps.filterd (m0356516.ppops.net [127.0.0.1])
by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5543t1k6000498;
Wed, 4 Jun 2025 12:17:01 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc
:content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=pp1; bh=Lm/EAk
8MgrTQ6UY9tgv52aZyMMIBuRgmYq2fBE2YC0E=; b=ZDG7755EGZieZn6nscDqtK
3JH18HSi5iArGyxDVfWZwxSoZnV/q0+aYLuTKA50qFQfc3VukJta73g561xboQ5t
1qM14Q0XiUmIjQNHGblpQRJtwosHui9uLw0WWjolBlNzgikdyHbCeF4iFkz4D8NO
hUTXLMz5wrtKYKvq2ZYv9NnLlJPjgOljWiXlhVyP+ZUIFpppUdUyKwx65u3G4865
tV/Rmka2JfFuOpcv1B7k9goGcoMLXJ5gtysUqLv69wtOXHf05NWE85F8HDkCziZA
yitWvZgjG15hc5OgpzsNozHnzXUKFWryk4lpAvR2ZtzVOX9+SomLJy6pxehC2YaA
==
Received: from ppma21.wdc07v.mail.ibm.com (5b.69.3da9.ip4.static.sl-reverse.com [169.61.105.91])
by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 471geyt9tf-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 12:17:01 +0000 (GMT)
Received: from pps.filterd (ppma21.wdc07v.mail.ibm.com [127.0.0.1])
by ppma21.wdc07v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 554C4aLr019873;
Wed, 4 Jun 2025 12:17:00 GMT
Received: from smtprelay04.fra02v.mail.ibm.com ([9.218.2.228])
by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 470d3nymq4-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 12:17:00 +0000
Received: from smtpav06.fra02v.mail.ibm.com (smtpav06.fra02v.mail.ibm.com [10.20.54.105])
by smtprelay04.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 554CGuvQ10092834
(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 4 Jun 2025 12:16:56 GMT
Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1])
by IMSVA (Postfix) with ESMTP id 44C5620049;
Wed, 4 Jun 2025 12:16:56 +0000 (GMT)
Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1])
by IMSVA (Postfix) with ESMTP id DC0C520040;
Wed, 4 Jun 2025 12:16:55 +0000 (GMT)
Received: from p-imbrenda (unknown [9.152.224.66])
by smtpav06.fra02v.mail.ibm.com (Postfix) with ESMTP;
Wed, 4 Jun 2025 12:16:55 +0000 (GMT)
Date: Wed, 4 Jun 2025 14:16:43 +0200
From: Claudio Imbrenda <imbrenda@xxxxxxxxxxxxx>
To: Heiko Carstens <hca@xxxxxxxxxxxxx>
Cc: Janosch Frank <frankja@xxxxxxxxxxxxx>,
Christian Borntraeger
<borntraeger@xxxxxxxxxxxxx>,
David Hildenbrand <david@xxxxxxxxxx>,
Alexander Gordeev <agordeev@xxxxxxxxxxxxx>,
Sven Schnelle
<svens@xxxxxxxxxxxxx>,
Vasily Gorbik <gor@xxxxxxxxxxxxx>, kvm@xxxxxxxxxxxxxxx,
linux-s390@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
Subject: Re: [PATCH] s390/mm: Fix in_atomic() handling in
do_secure_storage_access()
Message-ID: <20250604141643.3c04ae4e@p-imbrenda>
In-Reply-To: <20250603134936.1314139-1-hca@xxxxxxxxxxxxx>
References: <20250603134936.1314139-1-hca@xxxxxxxxxxxxx>
Organization: IBM
X-Mailer: Claws Mail 4.3.1 (GTK 3.24.49; x86_64-redhat-linux-gnu)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-TM-AS-GCONF: 00
X-Proofpoint-GUID: _P9ZkWimBNBdfVwAV3mJrxSqWo5a6d15
X-Proofpoint-ORIG-GUID: _P9ZkWimBNBdfVwAV3mJrxSqWo5a6d15
X-Authority-Analysis: v=2.4 cv=X4dSKHTe c=1 sm=1 tr=0 ts=6840393d cx=c_pps a=GFwsV6G8L6GxiO2Y/PsHdQ==:117 a=GFwsV6G8L6GxiO2Y/PsHdQ==:17 a=kj9zAlcOel0A:10 a=6IFa9wvqVegA:10 a=VnNF1IyMAAAA:8 a=RnnUVUEQLhJupq3Ke2AA:9 a=CjuIK1q_8ugA:10
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDA5MSBTYWx0ZWRfXwP53MNcpGtg6 G4L640dVTTsxnFjMXrZqQT+xljyvfB5WteVweKOJMhu2lnj+UGmrw1GQaq1fMU9iMsC7qkaDEN7 HKx65XdVHAYjzA7p/VztMfHS39VUIRfrFYMLI75v3WhTyv7xmc0Meko5Aw48uYe/Q42juPR7H8e
Vu/AfGxbADat+OH/9jS6GpWLAxRYaabEohCsoOTVSaMQ1BNA76I9AWnfjX/8/r42EK43m8tbw/S pVsKKOD2kbW9aogqZpMYjBdMyZGu3kZCpvKRKTm7+3lTPNIji/EmtrxrRCWSJWr7Ndr5Fh5pDH6 v41B8ytHhW3ZNFCGqE4oD9ro4KmDEW+CIyzoCFV7C8mpSPcThfmd6iVghFf2aoE7hD7UOdOPcIA
AoGrJnumstEbERMdaVJJpUl/g6cRYEKFk+QYK5h4VjEeXeadBxkefqVjszAwAYeUxGjfmd5f
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0
priorityscore=1501 lowpriorityscore=0 mlxscore=0 impostorscore=0
mlxlogscore=924 adultscore=0 clxscore=1015 phishscore=0 bulkscore=0
malwarescore=0 spamscore=0 classifier=spam authscore=0 authtc=n/a authcc=
route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000
definitions=main-2506040091
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Tue, 3 Jun 2025 15:49:36 +0200
Heiko Carstens <hca@xxxxxxxxxxxxx> wrote:
Kernel user spaces accesses to not exported pages in atomic context
incorrectly try to resolve the page fault.
With debug options enabled call traces like this can be seen:
BUG: sleeping function called from invalid context at kernel/locking/rwsem.c:1523
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 419074, name: qemu-system-s39
preempt_count: 1, expected: 0
RCU nest depth: 0, expected: 0
INFO: lockdep is turned off.
Preemption disabled at:
[<00000383ea47cfa2>] copy_page_from_iter_atomic+0xa2/0x8a0
CPU: 12 UID: 0 PID: 419074 Comm: qemu-system-s39
Tainted: G W 6.16.0-20250531.rc0.git0.69b3a602feac.63.fc42.s390x+debug #1 PREEMPT
Tainted: [W]=WARN
Hardware name: IBM 3931 A01 703 (LPAR)
Call Trace:
[<00000383e990d282>] dump_stack_lvl+0xa2/0xe8
[<00000383e99bf152>] __might_resched+0x292/0x2d0
[<00000383eaa7c374>] down_read+0x34/0x2d0
[<00000383e99432f8>] do_secure_storage_access+0x108/0x360
[<00000383eaa724b0>] __do_pgm_check+0x130/0x220
[<00000383eaa842e4>] pgm_check_handler+0x114/0x160
[<00000383ea47d028>] copy_page_from_iter_atomic+0x128/0x8a0
([<00000383ea47d016>] copy_page_from_iter_atomic+0x116/0x8a0)
[<00000383e9c45eae>] generic_perform_write+0x16e/0x310
[<00000383e9eb87f4>] ext4_buffered_write_iter+0x84/0x160
[<00000383e9da0de4>] vfs_write+0x1c4/0x460
[<00000383e9da123c>] ksys_write+0x7c/0x100
[<00000383eaa7284e>] __do_syscall+0x15e/0x280
[<00000383eaa8417e>] system_call+0x6e/0x90
INFO: lockdep is turned off.
It is not allowed to take the mmap_lock while in atomic context. Therefore
handle such a secure storage access fault as if the accessed page is not
mapped: the uaccess function will return -EFAULT, and the caller has to
deal with this. Usually this means that the access is retried in process
context, which allows to resolve the page fault (or in this case export the
page).
Signed-off-by: Heiko Carstens <hca@xxxxxxxxxxxxx>
Reviewed-by: Claudio Imbrenda <imbrenda@xxxxxxxxxxxxx>
---
arch/s390/mm/fault.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c
index 3829521450dd..e1ad05bfd28a 100644
--- a/arch/s390/mm/fault.c
+++ b/arch/s390/mm/fault.c
@@ -441,6 +441,8 @@ void do_secure_storage_access(struct pt_regs *regs)
if (rc)
BUG();
} else {
+ if (faulthandler_disabled())
+ return handle_fault_error_nolock(regs, 0);
mm = current->mm;
mmap_read_lock(mm);
vma = find_vma(mm, addr);
Return-Path: <linux-kernel+bounces-673179-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id A62F441E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:18:22 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 1B115188B0FD
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:18:36 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 9017628EA69;
Wed, 4 Jun 2025 12:18:15 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="RnFsKzpb"
Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3F0FF1DFF8
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:18:12 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.16
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749039494; cv=none; b=M+OHNSXkM5UJjunjvwuTuRcGIxAOJyz+d+FAslU6tMLI27KXOd+xB+GDzTZnQhfTjg+adH4CARLmE8YxaLbv7ARhqLpFxUzKmN/CMVm4gSJWBHqTVgprfegKm2VsHkVVX0wFsFL8/XB2JO5aoS3PvPvbW2xojest5TlrGfMkUYE=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749039494; c=relaxed/simple;
bh=JfaoRG57LFIS/dd8Kog1/eQFr8Bx0dcUrQuHslbLOmY=;
h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References:
Content-Type:MIME-Version; b=XlOAQrL9lX4fi01Ij/yXtjBsgLdiiWt3SauGN+yN3zuqGY36wkfUU7HWPHoNbtV948s5VH5UvxDI+nxUQ1OQn9LajNnAOtI3b/OtIWvrdo2ONoG+yvbyA9jjZ8HgLXRzXLTq46mV+A6B3BCZ+cHmQ+O6xPmVNhP4ICSCWmF+zHU=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=RnFsKzpb; arc=none smtp.client-ip=198.175.65.16
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com
Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
t=1749039494; x=1780575494;
h=message-id:subject:from:to:cc:date:in-reply-to:
references:content-transfer-encoding:mime-version;
bh=JfaoRG57LFIS/dd8Kog1/eQFr8Bx0dcUrQuHslbLOmY=;
b=RnFsKzpbKJohUcvz3prwX3oeZ2xjFZrgDRLurwQDX9/Lvd/m7NxLCvRb
9CSOFjUWERbrTAn59lRz2ZBT8U4pfOKP4ev5xbvPYakkPBALglCfOuHtm
IFCVDIgEyRnKMur09pW2UBvxc158xe9KGrbUBytdo+ACYWf1rDms91Q2w
NrmsBoeP/+SP+2OwfyjUpGWl9vagYYE/sKcyJDT4k0sqIFISD8um+M02w
3sKa5x/TzfIOcFMPZRVcc1ZWtaW4MMZ4LRrrzrWSwdT9ZygHtyFrR/VP5
C5opfO1ziO2uaLNGdc8D1QexgZUw3/oD+u3xSfbXSMl7rQwXC+i8MU8aC
w==;
X-CSE-ConnectionGUID: 44BJiRqrTt6YOaOEgI00tw==
X-CSE-MsgGUID: jB+jOGzqScuPPlhrFL+0rQ==
X-IronPort-AV: E=McAfee;i="6800,10657,11454"; a="51188742"
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="51188742"
Received: from orviesa001.jf.intel.com ([10.64.159.141])
by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 05:18:13 -0700
X-CSE-ConnectionGUID: vUOPYx5oQuixYIIMdrWXhg==
X-CSE-MsgGUID: x63ZjyzkTBO+WtX82pS7Bw==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="182345818"
Received: from pgcooper-mobl3.ger.corp.intel.com (HELO [10.245.245.121]) ([10.245.245.121])
by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 05:18:09 -0700
Message-ID: <3262455c0ac3bff64522fff47c0281943c9f76ea.camel@xxxxxxxxxxxxxxx>
Subject: Re: [PATCH] mm: Fix compile error when CONFIG_SHMEM is not set
From: Thomas =?ISO-8859-1?Q?Hellstr=F6m?= <thomas.hellstrom@xxxxxxxxxxxxxxx>
To: Steven Rostedt <rostedt@xxxxxxxxxxx>, Hugh Dickins <hughd@xxxxxxxxxx>
Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>, Matthew Wilcox
<willy@xxxxxxxxxxxxx>, LKML <linux-kernel@xxxxxxxxxxxxxxx>,
linux-mm@xxxxxxxxx, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Christian
Koenig <christian.koenig@xxxxxxx>, Huang Rui <ray.huang@xxxxxxx>, Matthew
Auld <matthew.auld@xxxxxxxxx>, Matthew Brost <matthew.brost@xxxxxxxxx>,
dri-devel@xxxxxxxxxxxxxxxxxxxxx, Maarten Lankhorst
<maarten.lankhorst@xxxxxxxxxxxxxxx>, Maxime Ripard <mripard@xxxxxxxxxx>,
Thomas Zimmermann <tzimmermann@xxxxxxx>, David Airlie <airlied@xxxxxxxxx>,
Simona Vetter <simona@xxxxxxxx>
Date: Wed, 04 Jun 2025 14:18:06 +0200
In-Reply-To: <20250604080409.448a27e4@xxxxxxxxxxxxxxxxxx>
References: <20250602170500.48713a2b@xxxxxxxxxxxxxxxxxx>
<20250602171458.7ceabb1c@xxxxxxxxxxxxxxxxxx>
<aD4boBrdZXtz_5kL@xxxxxxxxxxxxxxxxxxxx>
<fc2b6a94-bd2d-a5d9-c935-381a1613f47e@xxxxxxxxxx>
<20250603102959.20c85adb@xxxxxxxxxxxxxxxxxx>
<aD8iL4cFoXpIVK_0@xxxxxxxxxxxxxxxxxxxx>
<20250603132736.554f611d@xxxxxxxxxxxxxxxxxx>
<CAHk-=whb2rMUCGsaNQC4pkCikJ7iX2_Tc1ye5_a6R9-vAkd2Cg@xxxxxxxxxxxxxx>
<20250603140632.168190f9@xxxxxxxxxxxxxxxxxx>
<dca861b8-a29d-b2b3-eba7-32aaf2b8eff7@xxxxxxxxxx>
<20250604080409.448a27e4@xxxxxxxxxxxxxxxxxx>
Organization: Intel Sweden AB, Registration Number: 556189-6027
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
User-Agent: Evolution 3.54.3 (3.54.3-1.fc41)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, 2025-06-04 at 08:04 -0400, Steven Rostedt wrote:
On Wed, 4 Jun 2025 00:03:18 -0700 (PDT)
Hugh Dickins <hughd@xxxxxxxxxx> wrote:
=20
> I vote for the "select SHMEM", but Thomas and dri-devel and Linus
> should decide.
=20
I only tried "depends on SHMEM" which did not work, but it looks like
"select SHMEM" should.
I agree. The whole ttm_backup implementation is based on backing things
up to shmem objects so IMO it perfectly makes sense to "select SHMEM".
Let me know if you want me to send a patch for that.
In the very unlikely case someone would ever want a config without
SHMEM but with TTM, they'd have to live without the ttm_backup and we'd
create a separate config for that.
/Thomas
=20
I prefer this solution too.
=20
Thanks,
=20
-- Steve
Return-Path: <linux-kernel+bounces-673180-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 42E2E41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:18:48 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 69E3C3A34F3
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:18:26 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 954C528E5EF;
Wed, 4 Jun 2025 12:18:42 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="O/CFyTCp"
Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 390071DFF8
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:18:39 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.44
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749039521; cv=none; b=W0hj3LAR8MEQR1N4rc+ak5IAA2DlriEpjC7MGlh3oP51ekgJOFYdwl+1NSTLzajJ7pgO/CkvF7d0JTYyCYOtoMykQIgcytjVURZh7F9ztDQpyYFfzy0sJOXQacI2mHjnmsLHzjBBSr6qyR7Q185AuJGI47WWL1TEFB2EvxgUGCc=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749039521; c=relaxed/simple;
bh=fmtvIVhEcf9Ds3pRf4w4H1KHrmA1PIgMPMheepuFKek=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=F+6TAlzQTmRu7l6Z6zKH4eG1jXyBZ4CXnudTX9v2tUpuFucXXBlXPlL+URaU1E2AmZnmwD1JHIMrpwUA6plP6WRotYBpukbH5JityApe2H3hJSZDzBLwEZ/gznaYLtJEenEJQyVQSsfUm532Cz9kaQmE8S2KFQyBIryMt2CWDgg=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=O/CFyTCp; arc=none smtp.client-ip=209.85.221.44
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
Received: by mail-wr1-f44.google.com with SMTP id ffacd0b85a97d-3a50fc819f2so2146232f8f.2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 05:18:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1749039518; x=1749644318; darn=vger.kernel.org;
h=content-transfer-encoding:in-reply-to:content-language:from
:references:cc:to:subject:user-agent:mime-version:date:message-id
:from:to:cc:subject:date:message-id:reply-to;
bh=6aP3zhLVOba0eQWQTz2JY5uYi9PhSFybgMarblmIhkQ=;
b=O/CFyTCppKoT0z0NDKqLqbqrLEC/5l+xWSwf0xkeViD66gRo+z/1UBDDPF8LCkR962
bXrMJz33A2M5TzsH0IJMnB5bo/mWNGTdjeWSsBlsVIBOj5qc3YbpXh8ruiU5BWekKlNt
gH41uM1lk7dK8kJ1yJ89vaLmBk89JRcg4NY7kQQops0PBRweSLSULgnIqwlONTIkllbA
8xqMmbS/S+efeirltRq5Qfb+HD8UJC00BhGA+Z0GbLJwp0NtleUWhEqCD8BVe08vZxqg
R9p40sLbLXxxMpP8nJzAIZChyvwYKOd3d6ztnYkby89yl8JKnTrcSj9xHpGlybZKT5gL
2o6g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749039518; x=1749644318;
h=content-transfer-encoding:in-reply-to:content-language:from
:references:cc:to:subject:user-agent:mime-version:date:message-id
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=6aP3zhLVOba0eQWQTz2JY5uYi9PhSFybgMarblmIhkQ=;
b=UtdjVh6dSj7MKDOuvDgGIb9nGa5ZC3e8616D+8zHunRAnaD9t8hNMzgFHd26Ofr9Sd
IqgtN39kqFqz5XYlcfhg+si+qL/rqhI3BUm/f0Wl547I40pOEzt7v/ym8R8LsIm80I58
NGdMnyrZq/Ad373ScgP/Y3xcr164DdzAC20+uWHS5Cg0Y2mxGGuKIEFrYDysSoExrG7L
iYgdOjffrpiY2CnQBmW59/IruV9ZYm9abFMYfkA35T8dhn1Cia9Kii0tGc5LfrTuoZX/
bi/LltKVlHA8hNcAmSulxsAfGgpVS4Jtit6FtswSDwpVo4W/nvsQ7/G6HjVmJn/o3npC
Lu9Q==
X-Forwarded-Encrypted: i=1; AJvYcCUegub5KrTHiyYBWvMwLabkSbxysN2peg5mKutWPgB8X321uhflEYmO8FVV/B49gTavJTPMjJaDEuBwPzw=@vger.kernel.org
X-Gm-Message-State: AOJu0Yw7P3mG1cRdDDJBOIAE1ZoEaTeL0nC8AFihOgbTcSKS6yEW+C/r
Ccwr6t1wn20B919ps7TmvO8+K43FQBDc1Cvh0NxH/Q1OdtaU6CZOTTaH
X-Gm-Gg: ASbGncv5T7MAyvgNp+2Nlj0+7uytq+kiybQhSBiHObVt+zTr8+dUqhSKDd0RUWFQmro
4Z7qsj7zr62/A8M9UHi/22fZ5mjk3IqVxyKoFwdZH3sZKQElb95WQ74xBzSfMpzeUg3ifNzB9hP
yO2UWYSbCQQYcH2DG7OIQ8m9s6u0SzIJ5fb5wEyKgYK8byl9LrAoqnhFgd0UeyLrNlfWs7Qqwyl
Kgn3q7dqI/ixmHRigs7WXLiBKT4QVGK07Qe1GoAb6OFwJTJZ+OOIhLpDaG+v3hjeI4mcieF9R3l
gFOS/pGKJfQAEVEMr7ifoHDLJoQRMPPjZhST/178w9j61t/nhibFsk97Oj0Ajw==
X-Google-Smtp-Source: AGHT+IH6AazEjXzmMzLSskspefSjG9nYKH55Ex9FS8UbAAtLGVLMQkNvhM4d8ZC2XtdvoWCGB3vYCw==
X-Received: by 2002:a05:6000:310e:b0:3a4:ef00:a7b9 with SMTP id ffacd0b85a97d-3a51d8f5fe6mr1835839f8f.12.1749039518213;
Wed, 04 Jun 2025 05:18:38 -0700 (PDT)
Received: from [192.168.0.20] ([212.21.159.167])
by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a4efe73eebsm21317356f8f.44.2025.06.04.05.18.37
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 05:18:37 -0700 (PDT)
Message-ID: <67be78c8-d276-4edc-a101-51f168e200da@xxxxxxxxx>
Date: Wed, 4 Jun 2025 15:18:36 +0300
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH] x86/its: Always return a writable page for dynamic thunks
To: Nikolay Borisov <nik.borisov@xxxxxxxx>, x86@xxxxxxxxxx
Cc: pawan.kumar.gupta@xxxxxxxxxxxxxxx, peterz@xxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, dave.hansen@xxxxxxxxxxxxxxx
References: <20250604104715.700149-1-nik.borisov@xxxxxxxx>
From: Nikolay Borisov <n.borisov.lkml@xxxxxxxxx>
Content-Language: en-US
In-Reply-To: <20250604104715.700149-1-nik.borisov@xxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 6/4/25 13:47, Nikolay Borisov wrote:
its_alloc unconditionally allocates and return a ROX page, but setting
it RW is predicated on its_mod being set. This can cause a #GP on the
memset in its_allocate_thunk() if its_mod is not set.
Since the function always returns a page, ensure it's always set
writable so it can be initialized properly.
Fixes: 872df34d7c51 ("x86/its: Use dynamic thunks for indirect branches")
Signed-off-by: Nikolay Borisov <nik.borisov@xxxxxxxx>
---
arch/x86/kernel/alternative.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c
index ecfe7b497cad..191e909636a5 100644
--- a/arch/x86/kernel/alternative.c
+++ b/arch/x86/kernel/alternative.c
@@ -199,6 +199,8 @@ static void *its_alloc(void)
if (!page)
return NULL;
+ execmem_make_temp_rw(page, PAGE_SIZE);
+
#ifdef CONFIG_MODULES
if (its_mod) {
void *tmp = krealloc(its_mod->its_page_array,
@@ -210,7 +212,6 @@ static void *its_alloc(void)
its_mod->its_page_array = tmp;
its_mod->its_page_array[its_mod->its_num_pages++] = page;
- execmem_make_temp_rw(page, PAGE_SIZE);
}
#endif /* CONFIG_MODULES */
Ok, this actually works in the upstream kernel thanks to
d6d1e3e6580ca35071ad474381f053cbf1fb6414 meaning at the time retpolines
are processed the execmem cache is actually writable...
Return-Path: <linux-kernel+bounces-673178-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id B3BCE41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:19:03 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 1C9AF16F5DC
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:18:06 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 45FEA28F52F;
Wed, 4 Jun 2025 12:17:13 +0000 (UTC)
Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id D757B28F511
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:17:09 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.187
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749039432; cv=none; b=PIvEPt28acnIZyQJFOVLUZEEgKDNQKo1sEWrEvsW9w2OzlE42Y93PuSEte3jIlYxhz9zlFPh4VMlUZ+k8J+wEgdy/5rMZ2txsARjsG/WHiq0vrbrIWOkIge1tk5IRPznRyMe17qAXaDlI77SB3BOpRWzSIXgptPi/ri+cEjnlrY=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749039432; c=relaxed/simple;
bh=dYrtAsRbWJD7CMmunRxvqC1sQtm1EdHAuEkfEDRb+xE=;
h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From:
In-Reply-To:Content-Type; b=G1dKZcW38pHb5xkbSrP0nctsalQXknAJ/4mUcAdc5lnt34lqEBOCcTCqB0DG0GoOxK2VeuA/VllqGU8vrVL2yP55Y7/SBnh2/IUxF9Cmul41y4upvpvGEiXbJKjgdvPt6z4Mj6AEDUIi7aVU1T9WPDdP3sfkf0fElKeJNnmDa8I=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.187
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com
Received: from mail.maildlp.com (unknown [172.19.163.174])
by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4bC60Q6NdBz10Wct;
Wed, 4 Jun 2025 20:12:38 +0800 (CST)
Received: from dggpemf200006.china.huawei.com (unknown [7.185.36.61])
by mail.maildlp.com (Postfix) with ESMTPS id D39C91400C8;
Wed, 4 Jun 2025 20:17:06 +0800 (CST)
Received: from [10.67.112.40] (10.67.112.40) by dggpemf200006.china.huawei.com
(7.185.36.61) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Wed, 4 Jun
2025 20:17:06 +0800
Message-ID: <f69c29a4-ee31-49b3-9430-62c1f752e72b@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 20:16:59 +0800
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v4 1/3] mm,slub: Do not special case N_NORMAL nodes for
slab_nodes
To: Oscar Salvador <osalvador@xxxxxxx>, Andrew Morton
<akpm@xxxxxxxxxxxxxxxxxxxx>
CC: David Hildenbrand <david@xxxxxxxxxx>, Vlastimil Babka <vbabka@xxxxxxx>,
Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>, Harry Yoo
<harry.yoo@xxxxxxxxxx>, Rakie Kim <rakie.kim@xxxxxx>, Hyeonggon Yoo
<42.hyeyoo@xxxxxxxxx>, <linux-mm@xxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>
References: <20250603110850.192912-1-osalvador@xxxxxxx>
<20250603110850.192912-2-osalvador@xxxxxxx>
Content-Language: en-US
From: Yunsheng Lin <linyunsheng@xxxxxxxxxx>
In-Reply-To: <20250603110850.192912-2-osalvador@xxxxxxx>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-ClientProxiedBy: kwepems200002.china.huawei.com (7.221.188.68) To
dggpemf200006.china.huawei.com (7.185.36.61)
X-Spam-Status: No, score=-3.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 2025/6/3 19:08, Oscar Salvador wrote:
Currently, slab_mem_going_going_callback() checks whether the node has
slab_mem_going_going_callback() might be a typo here.
I suppose slab_mem_going_online_callback() might be the correct one here.
N_NORMAL memory in order to be set in slab_nodes.
While it is true that gettind rid of that enforcing would mean
ending up with movables nodes in slab_nodes, the memory waste that comes
with that is negligible.
So stop checking for status_change_nid_normal and just use status_change_nid
instead which works for both types of memory.
Also, once we allocate the kmem_cache_node cache for the node in
^^
seems like a minor nit, an extral space for the above.
Return-Path: <linux-kernel+bounces-673182-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id EBB3141E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:19:43 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 223D37A4C76
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:18:24 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 0FBAD28EA7B;
Wed, 4 Jun 2025 12:19:33 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=cmpxchg-org.20230601.gappssmtp.com header.i=@cmpxchg-org.20230601.gappssmtp.com header.b="yyGRU1qp"
Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4AE671E501C
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:19:29 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749039572; cv=none; b=aXeOLwA0QGZgyElNDfG/78Z+KBkGLqUMgBCDH9UkRXhPyukLK+aHQ6Lktgq39VagQKE44zKkIPih7ZQt6we7QC5hyaLFo+PFCDdIS27vuDG7X3hgaFgHr+lxtbFrt000p/J+aVK+BcyZ143u2dH1xeAlO7ON2nBZlfrKAGgBQp0=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749039572; c=relaxed/simple;
bh=vsTAjMsXxruZD6EGEeDMJx5KZQVmoGJlBxqecOUMPhg=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=H4yhP1iyWJ3eIQtXVOQOjvYIzg3r/rdPBLFHJzE42FTUHDDyNCYab41DKDQU70X9TksQs0b/UnvG8y5F0ALT6V4AZaEocuU7LN6/ju8nPcY3o9uHCX0QV9rULmjAh6Wl8bB+dHdHdZeqxaA/S1zo73BgOKuDjN4m8tAg9YKd330=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmpxchg.org; spf=pass smtp.mailfrom=cmpxchg.org; dkim=pass (2048-bit key) header.d=cmpxchg-org.20230601.gappssmtp.com header.i=@cmpxchg-org.20230601.gappssmtp.com header.b=yyGRU1qp; arc=none smtp.client-ip=209.85.128.46
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmpxchg.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cmpxchg.org
Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-450cfb6a794so43014845e9.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 05:19:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=cmpxchg-org.20230601.gappssmtp.com; s=20230601; t=1749039568; x=1749644368; darn=vger.kernel.org;
h=in-reply-to:content-disposition:mime-version:references:message-id
:subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to;
bh=7va4B4zo5RMoE8/q1VOrd2uGJHuIadY3crtc+x7HSIs=;
b=yyGRU1qpBsaMLBUCgCWNDyAK8xEwbdz5so70/sFtDet0Ccql7H/LSW5A+WjC3xLsKM
ZKRtmTIVBCnJqApyDK45Yl/pVIKEf8y8C6xdy+fwUxXRBNSSHtSZKGwAKn+LFhDulA+c
9SjfIeMB9FN1n8Q+T/2zMfdA8qb4KQbpKyAiMCyaEs/1/yPDcZs+rWorZOf/xMsrxAcK
eaaRlC5OLN0eitm650Xh4kJ+CO/sj/lAOzljGcBGF5QI937h1R+V+rOulnJQZEWudnSI
gX4CyMoKbmz+OpafNdEHWzwV1qQisiyVEf9k641WzIoV/t1aOiLeMpYh58pgwa4uqpoh
J/6g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749039568; x=1749644368;
h=in-reply-to:content-disposition:mime-version:references:message-id
:subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to;
bh=7va4B4zo5RMoE8/q1VOrd2uGJHuIadY3crtc+x7HSIs=;
b=k21CvZuhVHO2iGKPOtuWdww2ztKYpt+JQYG+AOXsiWSSvrRPHyHQe5KdhS7+XA1PHX
BetNNM2ThIVBHKLliMc2vXie8UeeJITa860I+vuZGjRSiBIdcQ0VGgT/LDRKIne+3j4f
+6nR95qLHdUssHi8Z8JWf+BeObgiAgN6W3WyME1OPS/Gq19kvNf2q2otSE+fQbF4eVBQ
2h8LD2nICpVYwmdKnMbE3CFFDnTb/9+fQsCnIPQFlbVfREqedw9opl+KIZMiZn8QIpDP
sXSDpdYzx58fBRBMvuOuQTMZTY/RJrM+ZZwVqUZyz4gU9ctE76clGzeaiWgt2lqBEgKQ
3jMg==
X-Forwarded-Encrypted: i=1; AJvYcCVB6vR57z6/IPdfP4HPCyQieGQGCx+aOyLqiIunS7J38o0i1nNSGjRruNPoWXrgBY4ao7cUvz3n/uNDbWg=@vger.kernel.org
X-Gm-Message-State: AOJu0YwMwHVa67zBin8MjTJXeJVMftmdhrnOGJt//pgdXibBJ62Se4yC
IaZ4r7wMFVzk91rzHN1lIrV5KqhdV8drjctW9MEyUW79UvE7gtVuUdSpWWRnD2hzVlU=
X-Gm-Gg: ASbGncuemLBZSWGnjireuJ5II7RuDIqgtSzLTVl5xurMCZdjerHnrXHUL5Zw2znwQxu
8Se41+nisZFE2G2ewXryXmUokyVcHMa0Woxa932+a1V7UvlRfDtarS2r4iObceK6EzC3O7kZ8J5
IH/sTy8rJSmaESaAMrp8B22+3WobC5VJWFct9Z29lJbeOVdBG0e7VavkGVHM/8jumCYSFGaudrI
ftnjw60dpEvQs9aHcnIbGPknNHo9DtDtBIycQaxfkwEdjKdueDy5G1mvCrl6JPYfJk/92g1pdlM
FTFsRNfNpXUVentyYmrtKliA9naOLbxJdsBGlOyVREv6vJWg
X-Google-Smtp-Source: AGHT+IGVrF4O5T3Kqh+fUs3JsLlwaWKguUlwDSvf4RuehBTzNd19MRzE14XOKWLjuavmnFq2+KnyhA==
X-Received: by 2002:a05:600c:6297:b0:442:d9f2:ded8 with SMTP id 5b1f17b1804b1-451f0aa7fb6mr21810695e9.15.1749039568246;
Wed, 04 Jun 2025 05:19:28 -0700 (PDT)
Received: from localhost ([2a02:8071:6401:180:da11:6260:39d6:12c])
by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-3a5215e4c4asm1456495f8f.17.2025.06.04.05.19.27
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 05:19:27 -0700 (PDT)
Date: Wed, 4 Jun 2025 08:19:23 -0400
From: Johannes Weiner <hannes@xxxxxxxxxxx>
To: Vlastimil Babka <vbabka@xxxxxxx>
Cc: Matthew Wilcox <willy@xxxxxxxxxxxxx>,
Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
Shakeel Butt <shakeel.butt@xxxxxxxxx>,
"Liam R . Howlett" <Liam.Howlett@xxxxxxxxxx>,
David Hildenbrand <david@xxxxxxxxxx>, Jann Horn <jannh@xxxxxxxxxx>,
Arnd Bergmann <arnd@xxxxxxxx>,
Christian Brauner <brauner@xxxxxxxxxx>,
SeongJae Park <sj@xxxxxxxxxx>, Usama Arif <usamaarif642@xxxxxxxxx>,
Mike Rapoport <rppt@xxxxxxxxxx>, Barry Song <21cnbao@xxxxxxxxx>,
linux-mm@xxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-api@xxxxxxxxxxxxxxx,
Pedro Falcato <pfalcato@xxxxxxx>, tj@xxxxxxxxxxx
Subject: Re: [DISCUSSION] proposed mctl() API
Message-ID: <20250604121923.GB1431@xxxxxxxxxxx>
References: <85778a76-7dc8-4ea8-8827-acb45f74ee05@lucifer.local>
<aDh9LtSLCiTLjg2X@xxxxxxxxxxxxxxxxxxxx>
<20250529211423.GA1271329@xxxxxxxxxxx>
<0aeb6d8b-2abb-43a7-b47d-448f37f8a3bf@xxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <0aeb6d8b-2abb-43a7-b47d-448f37f8a3bf@xxxxxxx>
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Fri, May 30, 2025 at 12:31:35PM +0200, Vlastimil Babka wrote:
On 5/29/25 23:14, Johannes Weiner wrote:
> On Thu, May 29, 2025 at 04:28:46PM +0100, Matthew Wilcox wrote:
>> Barry's problem is that we're all nervous about possibly regressing
>> performance on some unknown workloads. Just try Barry's proposal, see
>> if anyone actually compains or if we're just afraid of our own shadows.
>
> I actually explained why I think this is a terrible idea. But okay, I
> tried the patch anyway.
>
> This is 'git log' on a hot kernel repo after a large IO stream:
>
> VANILLA BARRY
> Real time 49.93 ( +0.00%) 60.36 ( +20.48%)
> User time 32.10 ( +0.00%) 32.09 ( -0.04%)
> System time 14.41 ( +0.00%) 14.64 ( +1.50%)
> pgmajfault 9227.00 ( +0.00%) 18390.00 ( +99.30%)
> workingset_refault_file 184.00 ( +0.00%) 236899.00 (+127954.05%)
>
> Clearly we can't generally ignore page cache hits just because the
> mmaps() are intermittent.
>
> The whole point is to cache across processes and their various
> apertures into a common, long-lived filesystem space.
>
> Barry knows something about the relationship between certain processes
> and certain files that he could exploit with MADV_COLD-on-exit
> semantics. But that's not something the kernel can safely assume. Not
> without defeating the page cache for an entire class of file accesses.
I've just read the previous threads about Barry's proposal and if doing this
always isn't feasible, I'm wondering if memcg would be a better interface to
opt-in for this kind of behavior than both prctl or mctl. I think at least
conceptually it fits what memcg is doing? The question is if the
implementation would be feasible, and if android puts apps in separate memcgs...
CCing Tejun.
Cgroups has been trying to resist flag settings like these. The cgroup
tree is a nested hierarchical structure designed for dividing up
system resources. But flag properties don't have natural inheritance
rules. What does it mean if the parent group says one thing and the
child says another? Which one has precedence?
Hence the proposal to make it a per-process property that propagates
through fork() and exec(). This also enables the container usecase (by
setting the flag in the container launching process), without there
being any confusion what the *effective* setting for any given process
in the system is.
Return-Path: <linux-kernel+bounces-673181-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 446D441E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:19:57 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 88520163145
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:19:06 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 947E928EA51;
Wed, 4 Jun 2025 12:19:00 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=nabijaczleweli.xyz header.i=@nabijaczleweli.xyz header.b="jOz0/JQo"
Received: from tarta.nabijaczleweli.xyz (tarta.nabijaczleweli.xyz [139.28.40.42])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 79A2F2C327E
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:18:53 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=139.28.40.42
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749039539; cv=none; b=O824y1M4NQ1+5ZxBGfGyZSY6pTfOITzb35zpkeWy+VxrQn67dK4ix9AvT3b7eGUfwfH+jHT/kJBmW/cwnchPWZxCaH7a7vGcWWL6FBV9FFz7iOV8uHQwvZX0c3Eo1mZE+ZwHu6BPy7sWU0G+FsEumI9dzVr198a65a6Zyn7k5+U=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749039539; c=relaxed/simple;
bh=Sy31JKM7/PuGbGxr+JNLABhQ28VTKAgZaYvANIAsQbc=;
h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type:
Content-Disposition; b=SBwtqo77x5qh0sNrDWSCddk09nxWyBsiOgE7mLs09gHwm/2iEiN523BHzbTQvKu0JUMo/NRUBzYGiRYCeNAZr5BPovn58e9aeNO1Q69nJj8aMyZK0Qb9R7rXYZPNl8M0ENMFpvxXqQyeuDo/AftrL5/38IVOfDGsfCPcfs2zIZo=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nabijaczleweli.xyz; spf=pass smtp.mailfrom=nabijaczleweli.xyz; dkim=pass (2048-bit key) header.d=nabijaczleweli.xyz header.i=@nabijaczleweli.xyz header.b=jOz0/JQo; arc=none smtp.client-ip=139.28.40.42
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nabijaczleweli.xyz
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nabijaczleweli.xyz
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz;
s=202505; t=1749039526;
bh=Sy31JKM7/PuGbGxr+JNLABhQ28VTKAgZaYvANIAsQbc=;
h=Date:From:To:Subject:From;
b=jOz0/JQoLIBUK8liTs01m0dsoHA9nmCOzzd2YnCWxq7vJbka/KHFfMx0nTnOlB+u7
eic7ysSeK8YU+Sn7+w9TCzGs7qJBWcl/3Z8cY4wV9Zqj4odAro3p3I2HkSL6nrzK5i
uk4RC8KvbrAqFR7FwVidupRCyoBJazD0owbW6P0hTW85JiedWLe5jgU2P1FBpGhcHG
d5EEPo3JEwM7q8QrVVH44Ry7L3hH8NlIqea+/tKoSC2eyZ7afKy2kCirKZOFzV2Vr3
+wKykvImJYUwqsbfvYXFnPGqP5phLcXjoGYPPWnFAbuRrnw3nXLbOzH/yTHc6SiMiT
r8rdjjTOca4LA==
Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250])
by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id 4C1C62C4A;
Wed, 4 Jun 2025 14:18:46 +0200 (CEST)
Date: Wed, 4 Jun 2025 14:18:46 +0200
From:
Ahelenia =?utf-8?Q?Ziemia=C5=84ska?= <nabijaczleweli@xxxxxxxxxxxxxxxxxx>
To: Michal Simek <monstr@xxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx
Subject: [PATCH v2] microblaze: fix typos in Kconfig
Message-ID: <2pg4pexvl2guyww56tnjrt3hjsb6bqtccmpkzt42sqz3igcq56@xxxxxxxxxxxxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512;
protocol="application/pgp-signature"; boundary="jd3zt4wx6ib2ttjj"
Content-Disposition: inline
User-Agent: NeoMutt/20231221-2-4202cf-dirty
X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,FROM_SUSPICIOUS_NTLD,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,PDS_OTHER_BAD_TLD,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
--jd3zt4wx6ib2ttjj
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
optimalize -> optimize, these configs turn the functions on instead of
allowing them to be turned on, consistent pluralisation
Signed-off-by: Ahelenia Ziemia=C5=84ska <nabijaczleweli@xxxxxxxxxxxxxxxxxx>
---
v1: <f6e465fee5a824a67be1ae7c3bc1b72adcf9471f.1746558529.git.nabijaczleweli=
@nabijaczleweli.xyz>
arch/microblaze/Kconfig.platform | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/microblaze/Kconfig.platform b/arch/microblaze/Kconfig.pla=
tform
index 7795f90dad86..9cf9007ed69a 100644
--- a/arch/microblaze/Kconfig.platform
+++ b/arch/microblaze/Kconfig.platform
@@ -8,10 +8,10 @@
menu "Platform options"
=20
config OPT_LIB_FUNCTION
- bool "Optimalized lib function"
+ bool "Optimized lib function"
default y
help
- Allows turn on optimalized library function (memcpy and memmove).
+ Turns on optimized library functions (memcpy and memmove).
They are optimized by using word alignment. This will work
fine if both source and destination are aligned on the same
boundary. However, if they are aligned on different boundaries
@@ -19,13 +19,13 @@ config OPT_LIB_FUNCTION
on MicroBlaze systems without a barrel shifter.
=20
config OPT_LIB_ASM
- bool "Optimalized lib function ASM"
+ bool "Optimized lib function ASM"
depends on OPT_LIB_FUNCTION && (XILINX_MICROBLAZE0_USE_BARREL =3D 1)
depends on CPU_BIG_ENDIAN
default n
help
- Allows turn on optimalized library function (memcpy and memmove).
- Function are written in asm code.
+ Turns on optimized library functions (memcpy and memmove).
+ They are written in assembly.
=20
# Definitions for MICROBLAZE0
comment "Definitions for MICROBLAZE0"
--=20
2.39.5
--jd3zt4wx6ib2ttjj
Content-Type: application/pgp-signature; name="signature.asc"
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEEfWlHToQCjFzAxEFjvP0LAY0mWPEFAmhAOaUACgkQvP0LAY0m
WPEF+w/+IABKwNG/sgvDUZLq1GDAcfnfdvb73L37OkutIx9axla48J8NiGfgc0n9
xwapfclYkMjQiEDcY7SRvpGQFrLdFKACEA1Yd90oChuRJHBNtueLpbkEfod5uOXf
USWM0iztkjsdsGkVeY6FNHd6ZZXNymSWfaSD8qmkP33jFNK+pp0NZvqsWnFl8Jh8
oZLTWx3WOnneMsKRqjdx8KNrkqf+GHYXrdNi8fJUDam8kGnNbZgKH2pyzsZbP7zJ
5KxmolZY+FvLEhsFlikm4gA8VQq7KXZzeqRuus6FXwcnIHJpjr18yBoTRCGO+/Y3
pcEjAH3Sy0kkkNxbXGaHqBPGlnJIopsRfEEHFizZVgFf+f+oEK0NwZrPJUtBeVZw
t2kDfeYPcKhTs6YOUiC22vvSLJ0lhl5InimrVgxeW+AxUcFqLEO9CalEEjiX+1+m
vaj6Im2Odeq1Mv9rqTMzO73gYEm2sE2Ht/2Ka0uh4ZtTAwXrg3fBrWDGKrDpYa2h
N4D/w/eXTUcLKPZ43t9imqI02NCi9jXCDZHLcaqnH1SkkKdI+nZM+HnxAqgRuEU7
xSu45s4gHiik80q09/KJ5RUcCVLAAvEOIUXVe8GtO65blY2EFA8Bjg5Olx24bLfQ
QriAU3fy4O6P/PsH5ojzb8+jW7e8Q+vOSW3Ic+tbAxPbZyH/6fY=
=TYbJ
-----END PGP SIGNATURE-----
--jd3zt4wx6ib2ttjj--
Return-Path: <linux-kernel+bounces-673183-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 17F9D41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:21:08 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id E248D7A10A7
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:19:47 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id CF13428EA7B;
Wed, 4 Jun 2025 12:20:58 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=vayavyalabs.com header.i=@vayavyalabs.com header.b="NMkVPZiv"
Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 67B3717A30A
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:20:56 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.180
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749039658; cv=none; b=e8mnHIztFk7m9cR160we7Uo2UIQRRDiHbuLfmucvI7jnEolhs+NoNeqK13rjrCozRTXgCNm5qVRm1nD+sNttLfxo5TU5VgSJder3ZyJrtNmABjeQS3yuuV1jxqopGZs6KOaCfxW8Ou6AGC0BrxW/jOO3gV/glEgQ1apFFah5hpw=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749039658; c=relaxed/simple;
bh=UJO8fx4zrjzUtoGazJLMeF4iUYaNpSkc62UBtLsRXWY=;
h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
To:Cc:Content-Type; b=BjF54rhAxc5SzRqVow5O79I7BPLfpzT2RCmx27QhP509eP++3e3DuVHHqxsIjBQcwATOZis4TYjzdnOc3/rlDNSb4mDwts5yLY5PMwfqOknQ44Af0UnljscQmrWhr0fJMW9HXm1909o4UGELqxCp33L3OPhhBB3nJHrjknxtYzA=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=vayavyalabs.com; spf=pass smtp.mailfrom=vayavyalabs.com; dkim=pass (1024-bit key) header.d=vayavyalabs.com header.i=@vayavyalabs.com header.b=NMkVPZiv; arc=none smtp.client-ip=209.85.215.180
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=vayavyalabs.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=vayavyalabs.com
Received: by mail-pg1-f180.google.com with SMTP id 41be03b00d2f7-b26f7d2c1f1so6381914a12.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 05:20:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=vayavyalabs.com; s=google; t=1749039655; x=1749644455; darn=vger.kernel.org;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:from:to:cc:subject:date
:message-id:reply-to;
bh=Ztn23ugr0Et0nrkznY5+W0yWLUSMNK7u22fb8u5+6Hs=;
b=NMkVPZivcRBwtpL9R+33KwuaB+8SNvHkf2nNNgHoUFVcjzLjbkjDrZONUuGCM2wGku
KAoBJDWybfEdwheXsoq1yV+fmEDyIlb+ML55J9Jk/Qd4wVVZI++HhF972M+6gq6LnyaH
TCWXS0+ieU+yvH0gJnoYcvyEkZaZkUJehc6qU=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749039655; x=1749644455;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=Ztn23ugr0Et0nrkznY5+W0yWLUSMNK7u22fb8u5+6Hs=;
b=PHjfWF0u29duaw9hhrQ+4i+IIWdE1AkPLFGZZjUMdHk/Y0jfncOwXwCYlOzYlnYPCt
zKdYBOVX09H8OpcHH9hl9D0OOjSFd3BzmaO5EeMdd9Leg8q19RK8YoMdnVB0jqA/ANUB
tfYtEPo4/hTbHxiVZLcibCLl78GMhJ0pwHKoeQwxp7Bor2wmP7/sNhxyXtYaHVvTV4gV
2hJS0wsCepPpME8NIG6mMnO0nj+JhXbG4Ia6MZ0ezEVSYIxsSGiesDtau6TpKsejp0Q5
shQhb0j0M7fdB3ETPuZUZjVHUmIAKOf+TdzsY4bKEss3bltvmZy1NcztV2oQoCFoVWqh
kvNw==
X-Forwarded-Encrypted: i=1; AJvYcCUQIPXsuwc84iF38PNKyeDdD/UJ7vaQj8NpichOQW9fBQ0HiB6nls+1dJZB4+VSvgkp1M2kaqa3kcVQ7as=@vger.kernel.org
X-Gm-Message-State: AOJu0YwIM1sCvoAbRJMVhJnKt1UgQj2sWqw5wlZOlTPUPTS+NwjXHVaM
ryY6bPaCRMqmhj36c2hHC4rl2a/mAWHBPY3Ldnq35CEiUAUqHx6UpSc6SJFOdUi418cOwLq/CaS
ezWeBq7jhX3JZibBOBoYQE0mQ9EsCB/6SMCWK+SFvM26jnO8afEIcwbk=
X-Gm-Gg: ASbGncu7DYDD6WGb6WHGw5Z1MmO8iASL9Rr9d0/JYkce3mqSGqcMFbHKDOJZALFXJbI
pFNV8f01s9s+AxaK/J35zph8E8sATy7yoygM1NJLc2D8HXQ3lJ5SGmSuatoREEuFhB+kymIvqvu
tIEDRcNQG3byXNP8YLnWA+l+HrPSD1LsPuZw==
X-Google-Smtp-Source: AGHT+IEGMdIOkMV/uQ7zUK4UFRQ/YPtl1qy/zuPQpsLGtSK7QRRT2HbpWbVUamoQWNHk/kCuifvCQu4eWbBNQYRgwmA=
X-Received: by 2002:a05:6902:1207:b0:e7f:66d2:702b with SMTP id
3f1490d57ef6-e8179dacd59mr3554043276.35.1749039645410; Wed, 04 Jun 2025
05:20:45 -0700 (PDT)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
References: <20250602053231.403143-1-pavitrakumarm@xxxxxxxxxxxxxxx>
<20250602053231.403143-2-pavitrakumarm@xxxxxxxxxxxxxxx> <fae97f84-bdb9-42de-b292-92d2b262f16a@xxxxxxxxxx>
<CALxtO0mpQtqPB0h_Wff2dLGo=Mxk02JJQkK4rn+=TuScNdSfxQ@xxxxxxxxxxxxxx> <3570be5b-cb20-4259-9a9b-959098b902d0@xxxxxxxxxx>
In-Reply-To: <3570be5b-cb20-4259-9a9b-959098b902d0@xxxxxxxxxx>
From: Pavitrakumar Managutte <pavitrakumarm@xxxxxxxxxxxxxxx>
Date: Wed, 4 Jun 2025 17:50:33 +0530
X-Gm-Features: AX0GCFsFCDL3Q847lJwuNMF8LuDkhE19L7HG54evtY5CFetlay22p3RmnolgEVg
Message-ID: <CALxtO0mH=GwhQxQBsmMQYd+qgAue9WxXN1XWo9BncVJvJk6d8A@xxxxxxxxxxxxxx>
Subject: Re: [PATCH v3 1/6] dt-bindings: crypto: Document support for SPAcc
To: Krzysztof Kozlowski <krzk@xxxxxxxxxx>
Cc: linux-crypto@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, herbert@xxxxxxxxxxxxxxxxxxx, robh@xxxxxxxxxx,
krzk+dt@xxxxxxxxxx, conor+dt@xxxxxxxxxx, Ruud.Derwig@xxxxxxxxxxxx,
manjunath.hadli@xxxxxxxxxxxxxxx, adityak@xxxxxxxxxxxxxxx,
Bhoomika Kadabi <bhoomikak@xxxxxxxxxxxxxxx>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hi Krzysztof.
Appreciate your inputs. My comments are embedded below.
Warm regards,
PK
On Tue, Jun 3, 2025 at 5:34=E2=80=AFPM Krzysztof Kozlowski <krzk@xxxxxxxxxx=
wrote:
On 03/06/2025 13:45, Pavitrakumar Managutte wrote:
> Hi Krzysztof,
> Thanks for the inputs, my comments are embedded below.
>
> Warm regards,
> PK
>
> On Mon, Jun 2, 2025 at 11:28=E2=80=AFAM Krzysztof Kozlowski <krzk@kerne=
l.org> wrote:
>>
>> On 02/06/2025 07:32, Pavitrakumar Managutte wrote:
>>> Add DT bindings related to the SPAcc driver for Documentation.
>>> DWC Synopsys Security Protocol Accelerator(SPAcc) Hardware Crypto
>>> Engine is a crypto IP designed by Synopsys.
>>>
>>> Co-developed-by: Bhoomika Kadabi <bhoomikak@xxxxxxxxxxxxxxx>
>>> Signed-off-by: Bhoomika Kadabi <bhoomikak@xxxxxxxxxxxxxxx>
>>> Signed-off-by: Pavitrakumar Managutte <pavitrakumarm@xxxxxxxxxxxxxxx>
>>> Acked-by: Ruud Derwig <Ruud.Derwig@xxxxxxxxxxxx>
>>
>> Where was this Ack given? It's not on the lists, it's not public, so i=
t
>> cannot be after your SoB.
>
> PK: Yes, its not on the mailing list. I will remove that.
If it was given in private, then happened for sure before you sent the
patch, so it should be above your SoB.
PK: Sure, I will fix that. Yes, that was an internal Ack.
...
>>> +
>>> + snps,vspacc-id:
>>> + $ref: /schemas/types.yaml#/definitions/uint32
>>> + description: |
>>> + Virtual SPAcc instance identifier.
>>> + The SPAcc hardware supports multiple virtual instances (determ=
ined by
>>> + ELP_SPACC_CONFIG_VSPACC_CNT parameter), and this ID is used to=
identify
>>> + which virtual instance this node represents.
>>
>> No, IDs are not accepted.
>
> PK: This represents the specific virtual SPAcc that is being used in
> the current configuration. It is used to index into the register banks
> and the context memories of the virtual SPAcc that is being used. The
> SPAcc IP can be configured as dedicated virtual SPAccs in
> heterogeneous environments.
OK. Why registers are not narrowed to only this instance? It feels like
you provide here full register space for multiple devices and then
select the bank with above ID.
PK: No, we cant narrow the registers to only this instance since its
is just a single SPAcc with multiple virtual SPAcc instances. The same
set of registers(aka register banks) and context memories are
repeated, but sit at different offset addresses (i*4000 +
register-offsets). The crypto hardware engine inside is shared by all
the virtual SPAccs. This is very much for a heterogeneous computing
scenario.
> This was also discssed with Rob Herring and updated from
> "vpsacc-index" to "vspacc-id" based on Rob's inputs
> https://lore.kernel.org/linux-crypto/CALxtO0mkmyaDYta0tfx9Q1qi_GY0OwUoF=
DDVmcL15UH_fEZ25w@xxxxxxxxxxxxxx/
Yeah, it is still ID and thus look at his comment about proper
justification.
PK: Agreed
>
>>
>>> + minimum: 0
>>> + maximum: 7
>>> +
>>> + snps,spacc-internal-counter:
>>> + $ref: /schemas/types.yaml#/definitions/uint32
>>> + description: |
>>> + Hardware counter that generates an interrupt based on a count =
value.
>>> + This counter starts ticking when there is a completed job sitt=
ing on
>>> + the status fifo to be serviced. This makes sure that no jobs a=
re
>>> + starved of processing.
>>
>> Not a DT property.
>
> PK: This is a hardware counter which starts ticking when a processed
> job is sitting on the STAT FIFO. This makes sure a JOB does not stay
> in STATUS FIFO unprocessed.
>
> This was called watchdog timer - wdtimer, which we renamed to
> "spacc-internal-counter" based on your inputs.
> https://lore.kernel.org/linux-crypto/CALxtO0k4RkopERap_ykrMTZ4Qtdzm8hEP=
JGLCQ2pknQGjfQ4Eg@xxxxxxxxxxxxxx/
I suggested to use watchdog schema if this device has a watchdog feature.
Why would you configure here different values for the same hardware in
different boards?
PK: Agreed, it does not make sense to have this here in DT. I am
moving this as a Kconfig option.
Best regards,
Krzysztof
Return-Path: <linux-kernel+bounces-673184-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 3AC7B41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:21:53 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 8C64F163F51
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:21:54 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 528D328E609;
Wed, 4 Jun 2025 12:21:47 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=fooishbar.org header.i=@fooishbar.org header.b="BPpbmfvD"
Received: from mail-qt1-f171.google.com (mail-qt1-f171.google.com [209.85.160.171])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id A9F692C327E
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:21:44 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.171
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749039706; cv=none; b=PbbBnhLD/XIY3LrBn/SwexEGS8m91GxI64/jZDDAwafNPVlW4FKABAGour3raB2VtLzEG0x4ffctNgvpYZtf+zWjpArCKWD1DbxIr7G45PKqMYWBvxKNwvq847xxZ54YHikxLjwPiFJ0JfuJL857jO4zdYMy475ys49csOt37is=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749039706; c=relaxed/simple;
bh=R7tzwYh1LXUEAErDEhmuw6K4BeB32f5NFrte3APTo4w=;
h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
To:Cc:Content-Type; b=cHnJkuU+yg4mwFlWuuxRnEJLZHQldZ/9MkZHiNVtazew450Mu5DRA6+eJKJj42eDViktQ7Wf1l/WXLJUByIPPTU+kebN45aT/Qii9kZGcYepypjcGf3gYiFTu2nCQw/+Bu2pA/VvE7q4cV8muO8XQIwcMZdOgrLt1TTz3i3qK50=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fooishbar.org; spf=pass smtp.mailfrom=fooishbar.org; dkim=pass (2048-bit key) header.d=fooishbar.org header.i=@fooishbar.org header.b=BPpbmfvD; arc=none smtp.client-ip=209.85.160.171
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fooishbar.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fooishbar.org
Received: by mail-qt1-f171.google.com with SMTP id d75a77b69052e-4a4bb155eb1so50386351cf.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 05:21:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=fooishbar.org; s=google; t=1749039703; x=1749644503; darn=vger.kernel.org;
h=cc:to:subject:message-id:date:from:in-reply-to:references
:mime-version:from:to:cc:subject:date:message-id:reply-to;
bh=yaZTpWyg0hpKHYyjrUj3+OP2gwR0EFDPrHBmPT8RlVM=;
b=BPpbmfvDRqIYXmFks/rkltDf7e7IlKQCrpA/4D7qrjDuAE5jVknKw1h0+SPMYMSy3E
TzHf2ixoLWnpfwZ4pKW20wz+zuG2xntZQ4Xb9ACwx+m/yMnKX6hJTTBg/YPtr5CSW8Xi
wC1oMX6hX4IwOhQFWu/GHaBygxlzC+hrXyBp+lYE/Z0bBJ3Mv1ahaBQoMddLXHDAR3gr
idHWmJMIiMDPKBUIxm1ErvTA4ef2+qOvbWRS4ACr92bN/oslG7tZ6rWBVMDtEqwQdsA/
pLoQrcndEmBEwqJWJamwFSGYQNvtPyD21Op/NHpttnA2x8nT9BQT1hzHpseG2+iB7z9F
IZWw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749039703; x=1749644503;
h=cc:to:subject:message-id:date:from:in-reply-to:references
:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=yaZTpWyg0hpKHYyjrUj3+OP2gwR0EFDPrHBmPT8RlVM=;
b=QntQFfw3hR6MF3c3ESRF8BEOaev6AMWoYVoUTgXKqk/SVLbs4HL83l4zo1/5xzuaPC
QWFrA9mVjNWVYxjvB9vjBtl/HcQ6HmbqxvyIX7CUdjBCeCe3lysszqrLU5moasjXvTXz
HF+YpPnAuzRoM2TvsQ1vD54n17S90JPCpeTDIBBfL8Em/2C5L1MABIqlpOl4cl8I72FV
bIvxCxT5xBrbDNGAO0UIwec7zvuuxDjvS4v8U+sThTk3RuKO80T9UzBPDhfxjopZhIIJ
p6sgAeVvxBI+gWwgR8m9WHuvXRXk4jcHGMWFbCEcJ8174CzLLfuDZpVGF473AJjxZkdd
anGg==
X-Forwarded-Encrypted: i=1; AJvYcCVijjZhjmmnt+C+VUCtrqHqw7bip0yls0azvhW5rQpjtm4efSm0ZSXjOqDrWFncCU2d36w75IVCWcjT8Dk=@vger.kernel.org
X-Gm-Message-State: AOJu0Yzq63qH3/4KvADAGRqmacpXqwu5NuWgzYF4dIOP4d78WMGbY316
6ukKzr9MSdJ7KoJRJd81YrXGwymkXLYwEsANtuA5Y7ExfoDuAFDUM3E1olmLUj1DjS0t8zgnjHx
UkJAKcraBdmV8mlXpU6LtZO51QRma1KhS+TWTRcmJsw==
X-Gm-Gg: ASbGncveLZ81FQnz5q0TrufvXqrRllO5gBHDW7c8KhoJBOM19/z01ufST44S3UMa7Qy
xuJhqfNJ1GnvyjjmxzARL3Gsog5CqJgzcp7Itcp60KeyiLixc65dGtdLZ8JT77m4frzWzLf7+gd
jgfZTmNt5jbThhgGuIUfXSff2b8T4b1Q==
X-Google-Smtp-Source: AGHT+IGBhb9oN9Dnm4FiGYp7zAjk8KUthNG2jfK6LDnEP2PSQ1B7bbxENdlAigbtFAXPzwkkLJkzP6CGB7NZEJFpiUw=
X-Received: by 2002:a05:622a:5806:b0:4a4:2fad:7cdd with SMTP id
d75a77b69052e-4a5a585f07cmr36560661cf.24.1749039703440; Wed, 04 Jun 2025
05:21:43 -0700 (PDT)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
References: <20250604090054.7070-1-mail@xxxxxxxxxxx>
In-Reply-To: <20250604090054.7070-1-mail@xxxxxxxxxxx>
From: Daniel Stone <daniel@xxxxxxxxxxxxx>
Date: Wed, 4 Jun 2025 13:21:31 +0100
X-Gm-Features: AX0GCFuX5NY6Hf5wXDs-Pk8QnTYrnxwjGyh7lfIG_jr6I0hdBynp5Y1APmOGjzA
Message-ID: <CAPj87rMU9qcdEmAVuH7E7ENkHCn5zveKA-Sk2bvCB=6BwxR4Ug@xxxxxxxxxxxxxx>
Subject: Re: [PATCH V5 RESEND] drm/rockchip: Reject AFBC for res >2560 on rk3399
To: Konstantin Shabanov <mail@xxxxxxxxxxx>
Cc: Sandy Huang <hjc@xxxxxxxxxxxxxx>, =?UTF-8?Q?Heiko_St=C3=BCbner?= <heiko@xxxxxxxxx>,
Andy Yan <andy.yan@xxxxxxxxxxxxxx>,
Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>, Maxime Ripard <mripard@xxxxxxxxxx>,
Thomas Zimmermann <tzimmermann@xxxxxxx>, David Airlie <airlied@xxxxxxxxx>, Simona Vetter <simona@xxxxxxxx>,
Dan Callaghan <djc@xxxxxxxxx>, dri-devel@xxxxxxxxxxxxxxxxxxxxx,
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-rockchip@xxxxxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
Content-Type: text/plain; charset="UTF-8"
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, 4 Jun 2025 at 10:01, Konstantin Shabanov <mail@xxxxxxxxxxx> wrote:
As it isn't supported by rk3399. From the datasheet[1]
("1.2.10 Video IN/OUT", "Display Interface", p. 17):
Support AFBC function co-operation with GPU
* support 2560x1600 UI
Signed-off-by: Konstantin Shabanov <mail@xxxxxxxxxxx>
Reported-by: Dan Callaghan <djc@xxxxxxxxx>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7968
Acked-by: Daniel Stone <daniels@xxxxxxxxxxxxx>
Cheers,
Daniel
Return-Path: <linux-kernel+bounces-673185-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 0CBDC41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:22:08 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 1636D7A5AE5
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:20:47 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 975A528F503;
Wed, 4 Jun 2025 12:21:51 +0000 (UTC)
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 310452C327E
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:21:50 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749039711; cv=none; b=LCY5Bs/dRENqPltbRdRn8HcDJET8EZdJW0B8uSvKSRVoh02EQSKOB3EAjnJ/sChW3W5u33D23GktIPl7w1jmAJ8t/lxCKHpnCDWzmvCPfBxraWixEBX76uL3E84+jbheP8SX0oo4wBayaHJbkScSQ8Nuwc1M5s/x9MF02HXGNUU=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749039711; c=relaxed/simple;
bh=oOm+H4FXm5gkLeMJjwvfvPYmhfu0ZnBEppOkxKmLUjo=;
h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References:
MIME-Version:Content-Type; b=Kw8z/VpbsqVk3mI5Vbzb/WP7HiqZssxsi/qsDvgQdyonY0fSDQPpz4/0l9rFixaJtkmtrPWNJCxcG3/YyqKgHwjGu3dKjBCZiFKCtca//Bo2L8LmdtXf7ZG3MKHvpNdV8RaBnGbLAn4XMQCT27dFxuGGds0yd0ALnXr+xygj8gw=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id DB936C4CEEF;
Wed, 4 Jun 2025 12:21:48 +0000 (UTC)
Date: Wed, 4 Jun 2025 08:23:04 -0400
From: Steven Rostedt <rostedt@xxxxxxxxxxx>
To: Thomas =?UTF-8?B?SGVsbHN0csO2bQ==?= <thomas.hellstrom@xxxxxxxxxxxxxxx>
Cc: Hugh Dickins <hughd@xxxxxxxxxx>, Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx>, Matthew Wilcox <willy@xxxxxxxxxxxxx>,
LKML <linux-kernel@xxxxxxxxxxxxxxx>, linux-mm@xxxxxxxxx, Andrew Morton
<akpm@xxxxxxxxxxxxxxxxxxxx>, Christian Koenig <christian.koenig@xxxxxxx>,
Huang Rui <ray.huang@xxxxxxx>, Matthew Auld <matthew.auld@xxxxxxxxx>,
Matthew Brost <matthew.brost@xxxxxxxxx>, dri-devel@xxxxxxxxxxxxxxxxxxxxx,
Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>, Maxime Ripard
<mripard@xxxxxxxxxx>, Thomas Zimmermann <tzimmermann@xxxxxxx>, David Airlie
<airlied@xxxxxxxxx>, Simona Vetter <simona@xxxxxxxx>
Subject: Re: [PATCH] mm: Fix compile error when CONFIG_SHMEM is not set
Message-ID: <20250604082304.6f13e9c0@xxxxxxxxxxxxxxxxxx>
In-Reply-To: <3262455c0ac3bff64522fff47c0281943c9f76ea.camel@xxxxxxxxxxxxxxx>
References: <20250602170500.48713a2b@xxxxxxxxxxxxxxxxxx>
<20250602171458.7ceabb1c@xxxxxxxxxxxxxxxxxx>
<aD4boBrdZXtz_5kL@xxxxxxxxxxxxxxxxxxxx>
<fc2b6a94-bd2d-a5d9-c935-381a1613f47e@xxxxxxxxxx>
<20250603102959.20c85adb@xxxxxxxxxxxxxxxxxx>
<aD8iL4cFoXpIVK_0@xxxxxxxxxxxxxxxxxxxx>
<20250603132736.554f611d@xxxxxxxxxxxxxxxxxx>
<CAHk-=whb2rMUCGsaNQC4pkCikJ7iX2_Tc1ye5_a6R9-vAkd2Cg@xxxxxxxxxxxxxx>
<20250603140632.168190f9@xxxxxxxxxxxxxxxxxx>
<dca861b8-a29d-b2b3-eba7-32aaf2b8eff7@xxxxxxxxxx>
<20250604080409.448a27e4@xxxxxxxxxxxxxxxxxx>
<3262455c0ac3bff64522fff47c0281943c9f76ea.camel@xxxxxxxxxxxxxxx>
X-Mailer: Claws Mail 3.20.0git84 (GTK+ 2.24.33; x86_64-pc-linux-gnu)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, 04 Jun 2025 14:18:06 +0200
Thomas Hellstr=C3=B6m <thomas.hellstrom@xxxxxxxxxxxxxxx> wrote:
Let me know if you want me to send a patch for that.
This is a simple fix. I can send the patch and make sure it fixes my builds.
Thanks,
-- Steve
Return-Path: <linux-kernel+bounces-673186-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id AB6F241E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:22:21 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id DCF3A166794
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:22:22 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 6997828ECFD;
Wed, 4 Jun 2025 12:22:10 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="gVfkPl7M"
Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id B624F2C327E;
Wed, 4 Jun 2025 12:22:06 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=198.175.65.17
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749039728; cv=fail; b=flhkOrkCDF9hwiAxsJX0vqfPFFdTmG+eYvZPbPoHD3wYYuhpdMfNvbl9iSes4D3OPQ655S8JSwJarlQaS06Sa3WC3OQ9Z+KWXSyb+oda7jNMPm0OUCS/RNMnH3GfI88O7WRcRI7E+YPM9HsrDxibxYJcCOwKQpYrXPHPk9yAkYg=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749039728; c=relaxed/simple;
bh=sbWWwMnYY8ow2jnlE6PiaaraAhYKQy7Q838m1lWJJYg=;
h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To:
Content-Type:MIME-Version; b=K88OgKdRQ4+momPKH7lpUyXrJA5f0TZr9+7kIuTdjXg1BXxpL/pQsd2jha+ZvAPyGxTsM8bWtKQwfb6oGzTYyKrvDFhns35XQJQ3WI95Gk2yXr4piaiAI8d/ksGJ9LGAzKesszVs5ux7LV8aMQoQGObM7Iv2gP5ucTQKLlRQrts=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=gVfkPl7M; arc=fail smtp.client-ip=198.175.65.17
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
t=1749039727; x=1780575727;
h=from:to:cc:subject:date:message-id:references:
in-reply-to:content-id:content-transfer-encoding:
mime-version;
bh=sbWWwMnYY8ow2jnlE6PiaaraAhYKQy7Q838m1lWJJYg=;
b=gVfkPl7MV/u4JQIkx3HCGCn0uOADa6xNDC8hEKftHpSDJDA34RplS7I0
jGnzB2+PGqtYYnij8ipGDz7ykT++TdEfmjH0TRRLstq23kIrKHZXuoBxL
i4C4e/JHHCTvJOClXYgKlDvV2Cb0U2S/BFV3t4LQYdX73V5+X5QakP1w+
I56mreQCux9wSNNoUyeHBqx9x2Ziw7zA+UKkmciKISe/gL9Itz2NJmvNX
7HpPrvG7GXAWjGLVeJeipqD+G9E912JqM9w+umIGc4C/n+J+aBUQONS/+
fafEPoh+BChe3QlAnN0YmYCRaBI4fNrzNfeNH7kQozOyxhJKaizBh2YGu
Q==;
X-CSE-ConnectionGUID: 5HkhizZPTy6Uk5sbwJXMMg==
X-CSE-MsgGUID: zdcN7X+sSh62DL3GYSyzjQ==
X-IronPort-AV: E=McAfee;i="6800,10657,11454"; a="51120355"
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="51120355"
Received: from orviesa005.jf.intel.com ([10.64.159.145])
by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 05:22:06 -0700
X-CSE-ConnectionGUID: tBLrdrg1Qpa2Hy4yTx17VQ==
X-CSE-MsgGUID: adsu5xrDQDKNAVb9jw/VZA==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="150448755"
Received: from orsmsx901.amr.corp.intel.com ([10.22.229.23])
by orviesa005.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 05:22:06 -0700
Received: from ORSMSX901.amr.corp.intel.com (10.22.229.23) by
ORSMSX901.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.2.1544.25; Wed, 4 Jun 2025 05:22:05 -0700
Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by
ORSMSX901.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.2.1544.25 via Frontend Transport; Wed, 4 Jun 2025 05:22:05 -0700
Received: from NAM10-BN7-obe.outbound.protection.outlook.com (40.107.92.83) by
edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.1.2507.55; Wed, 4 Jun 2025 05:22:05 -0700
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=Ehx8zZzGmjusVzI8LwM/eD38qWB20Pv8mp4OgO4YxZDeio4auRUPnLYpYdstE6fFTVPQ5ngc7w3oRE2c5d14sfGIQz7GPpHEZUVR1HMTr/yrX3H+4BjgNfWjMs9eD7dzMTZSxhz7xBAKe94Kv+3Xq8w9rS752UAekNW4IJhFOlYi9IYMsQqRVj/rsdO64ffTdOWSM8VyWnjesYYIO9a6y9ZxupYL2lkwpRjwxPwMw4+/a2cOqevxsEdbNgCs7LC6zB7L0xF6baymS9KBoDH1PBYoKZQZfpeiduuJqAZFA1av52ax+fk7xa2zlIPXqXnrMAfrjsdIP9PoXG2SJqWGvA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=sbWWwMnYY8ow2jnlE6PiaaraAhYKQy7Q838m1lWJJYg=;
b=HaTgkXatIl4RxJICIfNSy7NetA8Dm5WSX9++cOWGQ/uTEFLVdiOhzCSkztvdqnrO4z+CY81Po9CMFQ06/lOA0j2msBjZ7n+7IkEZgqDwhEQFg/CUz1YDC4uzQL8SFme2FgIge7YXCKuzG48Kh7FM56zsVBRoOcTwvfGlObX5b7ent16Vk/HpAfbcC8cEECK8UfDZJ9Fg3qKdH25zSe0B+hQzh9OkW210RH7cAGJSMosSTUEKPQP0Fr1LoTJbAMsuKQeBmBSbAmzT1yD1mF3AvXYHi+yrxLpbn7N+c7GWCGKKdGmFWGj/Evfr+dQzeTamaHA1hKyF1TTDtFBV9y/UqQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com;
dkim=pass header.d=intel.com; arc=none
Received: from BL1PR11MB5525.namprd11.prod.outlook.com (2603:10b6:208:31f::10)
by PH0PR11MB7421.namprd11.prod.outlook.com (2603:10b6:510:281::16) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.34; Wed, 4 Jun
2025 12:22:01 +0000
Received: from BL1PR11MB5525.namprd11.prod.outlook.com
([fe80::1a2f:c489:24a5:da66]) by BL1PR11MB5525.namprd11.prod.outlook.com
([fe80::1a2f:c489:24a5:da66%5]) with mapi id 15.20.8792.034; Wed, 4 Jun 2025
12:22:01 +0000
From: "Huang, Kai" <kai.huang@xxxxxxxxx>
To: "kvm@xxxxxxxxxxxxxxx" <kvm@xxxxxxxxxxxxxxx>, "linux-coco@xxxxxxxxxxxxxxx"
<linux-coco@xxxxxxxxxxxxxxx>, "Gao, Chao" <chao.gao@xxxxxxxxx>,
"x86@xxxxxxxxxx" <x86@xxxxxxxxxx>
CC: "Shutemov, Kirill" <kirill.shutemov@xxxxxxxxx>, "Dong, Eddie"
<eddie.dong@xxxxxxxxx>, "Hansen, Dave" <dave.hansen@xxxxxxxxx>,
"dave.hansen@xxxxxxxxxxxxxxx" <dave.hansen@xxxxxxxxxxxxxxx>, "Reshetova,
Elena" <elena.reshetova@xxxxxxxxx>, "kirill.shutemov@xxxxxxxxxxxxxxx"
<kirill.shutemov@xxxxxxxxxxxxxxx>, "seanjc@xxxxxxxxxx" <seanjc@xxxxxxxxxx>,
"mingo@xxxxxxxxxx" <mingo@xxxxxxxxxx>, "pbonzini@xxxxxxxxxx"
<pbonzini@xxxxxxxxxx>, "tglx@xxxxxxxxxxxxx" <tglx@xxxxxxxxxxxxx>, "Yamahata,
Isaku" <isaku.yamahata@xxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx"
<linux-kernel@xxxxxxxxxxxxxxx>, "hpa@xxxxxxxxx" <hpa@xxxxxxxxx>, "Chen,
Farrah" <farrah.chen@xxxxxxxxx>, "Edgecombe, Rick P"
<rick.p.edgecombe@xxxxxxxxx>, "bp@xxxxxxxxx" <bp@xxxxxxxxx>, "Williams, Dan
J" <dan.j.williams@xxxxxxxxx>
Subject: Re: [RFC PATCH 02/20] x86/virt/tdx: Prepare to support P-SEAMLDR
SEAMCALLs
Thread-Topic: [RFC PATCH 02/20] x86/virt/tdx: Prepare to support P-SEAMLDR
SEAMCALLs
Thread-Index: AQHby8iK5F9fOtaWc0+3IQP4NuCnfrPy/vcA
Date: Wed, 4 Jun 2025 12:22:01 +0000
Message-ID: <95c57c6d14b495f92af6bd12651b8b5ae03be80a.camel@xxxxxxxxx>
References: <20250523095322.88774-1-chao.gao@xxxxxxxxx>
<20250523095322.88774-3-chao.gao@xxxxxxxxx>
In-Reply-To: <20250523095322.88774-3-chao.gao@xxxxxxxxx>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Evolution 3.56.2 (3.56.2-1.fc42)
authentication-results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=intel.com;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: BL1PR11MB5525:EE_|PH0PR11MB7421:EE_
x-ms-office365-filtering-correlation-id: 0f36b5b3-4bb5-448c-8cec-08dda3626893
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;ARA:13230040|366016|376014|1800799024|7416014|38070700018;
x-microsoft-antispam-message-info: =?utf-8?B?VlVHOFkwNFpCR1NHZlNUSmV6NUZzUFZTdkZXUE4wNHRDSUV0c25kMndYckdk?=
=?utf-8?B?aXczZWFiMm1RSG4xbStaK1NpWWZLK2ZOa3dUU2NyMEVVL0VhemZ3cTVyNks5?=
=?utf-8?B?TFRUSDI1WXRVUjJiVjNEVzc2SlRoM0tuKzUrdXgwQzJOODAwQllibGczbUJC?=
=?utf-8?B?MjF4QmVMSnp1UDFrY2FtMHVOWkoxakVLQkhPbFJ4Q0FnU3VaZlNwQzNQby9u?=
=?utf-8?B?ZU5LUjRPQk9YUmpFUzRDYXBTeXNyU3VxNk1Nc3RnQWhmcWs0UmdsejNXeUNX?=
=?utf-8?B?dGorRkxwQUk4UHIvZ3c5TnBvTEN2d01oTERSd3dlYlB0TVo0a1pseUsraWJ4?=
=?utf-8?B?ZDJTY3ZsRitLSmlORzJnUzIzTjZwMnhtcStSSks5cTlUY3cwM2tyRnArVnFV?=
=?utf-8?B?U01kMWZybXpWVU41cjVidWo2WGJZcmtpZGJ0V0ZXUXhOSDNyK0ZkT1cvdXIy?=
=?utf-8?B?WUJzNnVkbUV3cTl1dzF3NFBsL0xWRElVN1hSbDNxOEVBa1ZYSHNkQTg1N1Q5?=
=?utf-8?B?YVJJUzREbmcvL2lHUEZydXBFSStMRERQM21JblJhUFgwakxsMzdZZm9mUFFx?=
=?utf-8?B?T3hWeHJDVndTTk56K0JaaXRIcGtnU3pYOWpaeFJIdVlrcmpEV0pzUUJabmFK?=
=?utf-8?B?UTVSNFdtbVp5Q2hhREQzQk5kUk9hT1VZbGhWSmgrMjg2UjZPTGoxRTB1eWZx?=
=?utf-8?B?a1YyK1owV2hKNWFkZFdCL0FPeVNEcllIVzk2ZXRkQVp0L3NHUitQY1NHb1o1?=
=?utf-8?B?QXZ1d3JaeWJncWJXU1lRT0t4am1tR3FJdGFtNnJmeUtjNVhWK2NHR204blRV?=
=?utf-8?B?ejR4YTVMakNpRWRYQnJhdUxtVUdWVGJVbEc2S3Q0bHVCRURaZmJEam96SXpK?=
=?utf-8?B?T2FNSUMwM3pTWFVYVE5KZHh2M0Zlekh4ZVQ0UG1MZ2R3K2c5b2hQZVFXUnpZ?=
=?utf-8?B?NmlKc2VYNStxbzEydEhDZkFnUlYzQ2RzNGtiSklRMjNsMXp2Qmd4blllejE0?=
=?utf-8?B?Vkxab3YvRGt0OWFieXRjTjRnVkNNVzZOSmJCem1vVHltWmdZQy8vR1I4V0tM?=
=?utf-8?B?RlBQUFpXUDM4Q0hjcE5DdG9pMll2WW1rY0x0bUtrY0N5NmpYTFBWeWt0NEEy?=
=?utf-8?B?UGlLZHZJYjNPaWFEa2p1QmtTVldZSnVuSzRQVStsK2xXejBqMXR2QlBCWmVP?=
=?utf-8?B?N3ZEQWNmUklma2doVXYwK1pzYS9zcWJlaHBQZVI2TnRlY3IvRk41a1BwSUM0?=
=?utf-8?B?S1FNbTI3dU1hWm5SQnJTcmhmZDNWUWYwS2lEWExFeFhOM1ZUQnFmS1ptNFox?=
=?utf-8?B?VWdRRjJ5SHczOHkvSE9hTjhBRDM3M1UwVWlaNzVwWVdVNDZTMGtvdWhzcE5W?=
=?utf-8?B?Z096dG1Zb1gvWHo3ZmRXOC95OXY2SUo5Nnc4U3NGWHJpTUs3eEI0YjZMVEZj?=
=?utf-8?B?a2VNNEJhUkpSNVdxWTZseTJaTUZVMXlIR2JLeFo4M2ZsMTl3QzNaWHNzMzdn?=
=?utf-8?B?d2JvZkk1dFNXR0U2eFpIbGlDeGMzQXFXQjZiaHVZcUorOTZaSE1VRExCZ1Bt?=
=?utf-8?B?dXNyMmQvb1RxWjI1L01OU2E4enZPcnhjU1JueEdDQ2hxK2VBV0xranUrVEw5?=
=?utf-8?B?T1JJZjVyYUtuOEo0UG1rL3FBNU02OEQvbGJJd3E4Z212S2daS1hYeWwrNVRS?=
=?utf-8?B?YTRIa2I5djlKc3hxQmJEOUlGUDExMEQ4NDZZeEF6WnlFVkNza3JnTmlxZWd4?=
=?utf-8?B?UTJpRS9qV1U0blE2UE0vT0ZidEZPS05DT2srNzd0ejJ0MktxV1pKTkdrb1hG?=
=?utf-8?B?dGc0azNqT1MxRHNXSjMrdzhVZ1Nmd0gvL3pYVWFSQzF6WjdUUDFROXVmRGdr?=
=?utf-8?B?eXhtbEllMllDQm1nK2R1KzBRUm1XVWpqcURFQ3ZoTnIrMHlnam1aZnI0WVp3?=
=?utf-8?B?QS81RUFuU3JQTUxBRk5RU2ZicUVrNEV3UHpZamxkSGVMZll5eGJVdExQMTBU?=
=?utf-8?Q?hTyVVWA291LgRG4CzxbgCglG63VOxI=3D?=
x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BL1PR11MB5525.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(376014)(1800799024)(7416014)(38070700018);DIR:OUT;SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: =?utf-8?B?VUM2YVpNVmhjUG9FaElONGEvTVNlNUcrM3VROVQralo4QUtsRFQ5eU05UzJy?=
=?utf-8?B?b3I0R24zSm1KT25HTXhLeit3MXZpTTdsKzZGU2hueXBoNG8rQU96OGNMQmhj?=
=?utf-8?B?Y2o5ZTB1bDhBUWZXRWw3aGtuS0JzRWVPWXh3elVFcVRUbzNscjFVRndiNW81?=
=?utf-8?B?djFhbVJWSWRBbXQ3MWRZbXAxSnhBV3hGMlhsb0JQQjZHRG5nMGwvWkxjMDJn?=
=?utf-8?B?Q2phR29pSzV1NGE2V05tNXl6TEVQdEZmRW93WkZpdDNrcERpL2Fha1NJZFlv?=
=?utf-8?B?bmxLSG1VanZsM3NNVk9YK29qTThwRzJKbDh2QUtLZGs1OEI1cmdjVUxPdDR4?=
=?utf-8?B?MHNTeWF3UTBLaDkvaE54MkdyMGdTcmFBSWRaMEJNQ0VndUY5dmsrTElLMmpu?=
=?utf-8?B?bzIza2xSYlZhWWdwaGpUWW9jS1ExV2t2WHQ0VEYwUFRiUStmZnFqN3UzamFj?=
=?utf-8?B?citneG90Q0xjUWdsZnFZcFgyRmpqaWZ1bVB1TllYZWhtZm1kT29lc1lCVDF5?=
=?utf-8?B?UnZUQVBsQnd6VmVtT3FsYXg1Y003M1pzRS9rWS9rc1pwenkrOFY5bzJORGND?=
=?utf-8?B?ajdUelJxMGtIVU9wckZCaWExZlN0MlplRHdMT1ZtK3prL3V4YTdNbmF6elM4?=
=?utf-8?B?Ymh4TExxVVdkUDlXUktxZGpCTW1wdnpVNnpIUkFLdnBRRldDeDJuaTNTdHBn?=
=?utf-8?B?dUp2eGZqcGJZckxWa2NCMFRUOTNjdER0aWNGVjZQSjc2a0dJL2R3NERZeXFz?=
=?utf-8?B?YkdCSkR4YnVRTFJsa1lqVmFqSVRBbXA1Z1NMZlk2NWJDZUhtemU4OVdDNTZ2?=
=?utf-8?B?U1hmMEtwUGQ3a3E1ZGcyYlI2bmtweFgxcDkvRkNCeU5OS1doSHhuaDNvQUJo?=
=?utf-8?B?OWlNUlNaeFVQazFualR2YngyeFZXSE0yTzN5ZDZSWkJrbkZNTjNZS0dKMFpO?=
=?utf-8?B?R2dkMmYvNklVdnpqdjVSeWtaNmdjSWZFdVZweFlTL0JTcnJPaWZyQ0VsOGVF?=
=?utf-8?B?NngxTHhLY092NmJjRXVmYkorTyt0RnpXMFJpblNTL3g5bllOc3VJcDI5a0hD?=
=?utf-8?B?ZUJ2Vk1wZk5IaXAzRWRsOG54NFNtbWRDL0NJZmVabFpzQnR0N3N3Z3kyTEJn?=
=?utf-8?B?U3JMY2thckozQzkrMjBOUHBaRVY0eEkwYmlYbjg1VFk5T0gydHRZQWdQUkt1?=
=?utf-8?B?UlhMeFRYcTNqdzFudHBUTVRVWW1WdFRuZzRTZHpnZUpSSlI1bG5KeHRsRmtR?=
=?utf-8?B?djh1T0lDdVRQNy83bGtNWHhoditaWmVKYXVuZEd6WjFkQms0K1dqU0E4cVEv?=
=?utf-8?B?b2xzeGhBSXlCV0x5aFp2SldlbEt1QzZraGVldGdkbGUwb0RuekxZMkZTYXly?=
=?utf-8?B?Z3NKczgrWlhDbFlnU2ZFNDZlWTJQcTdpM0NKbmtRUEVlcDA0MllLa290NC9y?=
=?utf-8?B?NU9qWTA0dXdUUlMzV2tEWVJWeExDNTRET1lKcEZtemdIbk1WQ0grNVJDOHVj?=
=?utf-8?B?dUZSeXZzdXBRbzRyZ09rVFM4aURENWQ1MHI0SVJLWnBKYU9Dd0lLVzBNK2hI?=
=?utf-8?B?RGtLcGtNNmJwUkMwNVNleGVUTFZKaTFJU0w0U1E1Uk5TSjJsZWVnd2VBN2ph?=
=?utf-8?B?OVFqQkR6VXJ5Yi9qUFNPQWNMS0VSczhUSUZ1Q0U1WGIyY3liR0ZIaTNSbDdW?=
=?utf-8?B?ZE01ZzNoTmZWQlJUSUMwME8vbFFYakdzMGNCbmFyTVhiMDNhNXdiRzBYaEVh?=
=?utf-8?B?MVdGNDZVbHl2cVROTW12VWV3eFlNQXN4b3BWZzdpMUZZNi9RZGNkMkdDSTE0?=
=?utf-8?B?Q1lSaDB6c09HVXdHdU9UekxBY042bWh4SnUwOUprRUhyTVZJOGZJTkpiRG83?=
=?utf-8?B?NVBZMURYUXFjZVZMMGxBZDJwTmwzZ1dWRWErZnlIa0dpeTNMTnRWY2hOdE5u?=
=?utf-8?B?bW1ZZEtWVk84alJsVTNQWGNRSDdwYzcwWGNId0JVMzVScTh6Ymx1emY4eXhw?=
=?utf-8?B?SlJBaHpwMzc4c2NDVmFTQWZpR2FhQURUaXZPMjNaaVEzNVdBNm1OVzNZTU9n?=
=?utf-8?B?TVdBYUxyVkNWRUVxNGFUekpPRWpnNHYyMUFIcHRUM2JXdXc3UjM5T3paZzlE?=
=?utf-8?Q?LKLIpTlplvOjFKIKy4IvoJTmQ?=
Content-Type: text/plain; charset="utf-8"
Content-ID: <4C5F57113A392A428FECA9EAF2990154@xxxxxxxxxxxxxxxxxxxxxxxxx>
Content-Transfer-Encoding: base64
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: BL1PR11MB5525.namprd11.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 0f36b5b3-4bb5-448c-8cec-08dda3626893
X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jun 2025 12:22:01.2986
(UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: Z7vP0gPMGtVeT8CDNrY5xUTkwvQo4/8iFY9DBWgQASQUkbcPERquwR4IEhb8Nm9vmVK9ZueF3feUuUA1zOiNRQ==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB7421
X-OriginatorOrg: intel.com
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
DQo+IGRpZmYgLS1naXQgYS9hcmNoL3g4Ni92aXJ0L3ZteC90ZHgvdGR4LmMgYi9hcmNoL3g4Ni92
aXJ0L3ZteC90ZHgvdGR4LmMNCj4gaW5kZXggNDkyNjdjODY1ZjE4Li5iNTg2MzI5ZGQ4N2QgMTAw
NjQ0DQo+IC0tLSBhL2FyY2gveDg2L3ZpcnQvdm14L3RkeC90ZHguYw0KPiArKysgYi9hcmNoL3g4
Ni92aXJ0L3ZteC90ZHgvdGR4LmMNCj4gQEAgLTY1LDYgKzY1LDE3IEBAIHN0YXRpYyBpbmxpbmUg
dm9pZCBzZWFtY2FsbF9lcnIodTY0IGZuLCB1NjQgZXJyLCBzdHJ1Y3QgdGR4X21vZHVsZV9hcmdz
ICphcmdzKQ0KPiAgCXByX2VycigiU0VBTUNBTEwgKCVsbGQpIGZhaWxlZDogMHglMDE2bGx4XG4i
LCBmbiwgZXJyKTsNCj4gIH0NCj4gIA0KPiArc3RhdGljIGlubGluZSB2b2lkIHNlYW1sZHJfZXJy
KHU2NCBmbiwgdTY0IGVyciwgc3RydWN0IHRkeF9tb2R1bGVfYXJncyAqYXJncykNCj4gK3sNCj4g
KwkvKg0KPiArCSAqIEdldCB0aGUgYWN0dWFsIGxlYWYgbnVtYmVyLiBObyBuZWVkIHRvIHByaW50
IHRoZSBiaXQgdXNlZCB0bw0KPiArCSAqIGRpZmZlcmVudGlhdGUgYmV0d2VlbiBTRUFNTERSIGFu
ZCBURFggbW9kdWxlIGFzIHRoZSAiU0VBTUxEUiINCj4gKwkgKiBzdHJpbmcgaW4gdGhlIGVycm9y
IG1lc3NhZ2UgYWxyZWFkeSBwcm92aWRlcyB0aGF0IGluZm9ybWF0aW9uLg0KPiArCSAqLw0KPiAr
CWZuICY9IH5TRUFNTERSX1NFQU1DQUxMX01BU0s7DQo+ICsJcHJfZXJyKCJTRUFNTERSICglbGxk
KSBmYWlsZWQ6IDB4JTAxNmxseFxuIiwgZm4sIGVycik7DQo+ICt9DQo+ICsNCj4gIHN0YXRpYyBp
bmxpbmUgdm9pZCBzZWFtY2FsbF9lcnJfcmV0KHU2NCBmbiwgdTY0IGVyciwNCj4gIAkJCQkgICAg
c3RydWN0IHRkeF9tb2R1bGVfYXJncyAqYXJncykNCj4gIHsNCj4gQEAgLTEwMiw2ICsxMTMsMTEg
QEAgc3RhdGljIGlubGluZSBpbnQgc2NfcmV0cnlfcHJlcnIoc2NfZnVuY190IGZ1bmMsIHNjX2Vy
cl9mdW5jX3QgZXJyX2Z1bmMsDQo+ICAjZGVmaW5lIHNlYW1jYWxsX3ByZXJyX3JldChfX2ZuLCBf
X2FyZ3MpCQkJCQlcDQo+ICAJc2NfcmV0cnlfcHJlcnIoX19zZWFtY2FsbF9yZXQsIHNlYW1jYWxs
X2Vycl9yZXQsIChfX2ZuKSwgKF9fYXJncykpDQo+ICANCj4gK2ludCBzZWFtbGRyX3ByZXJyKHU2
NCBmbiwgc3RydWN0IHRkeF9tb2R1bGVfYXJncyAqYXJncykNCj4gK3sNCj4gKwlyZXR1cm4gc2Nf
cmV0cnlfcHJlcnIoX19zZWFtY2FsbCwgc2VhbWxkcl9lcnIsIGZuLCBhcmdzKTsNCj4gK30NCj4g
Kw0KPiAgLyoNCj4gICAqIERvIHRoZSBtb2R1bGUgZ2xvYmFsIGluaXRpYWxpemF0aW9uIG9uY2Ug
YW5kIHJldHVybiBpdHMgcmVzdWx0Lg0KPiAgICogSXQgY2FuIGJlIGRvbmUgb24gYW55IGNwdS4g
IEl0J3MgYWx3YXlzIGNhbGxlZCB3aXRoIGludGVycnVwdHMNCj4gZGlmZiAtLWdpdCBhL2FyY2gv
eDg2L3ZpcnQvdm14L3RkeC90ZHguaCBiL2FyY2gveDg2L3ZpcnQvdm14L3RkeC90ZHguaA0KPiBp
bmRleCA4MmJiODJiZTg1NjcuLjQ4YzBhODUwYzYyMSAxMDA2NDQNCj4gLS0tIGEvYXJjaC94ODYv
dmlydC92bXgvdGR4L3RkeC5oDQo+ICsrKyBiL2FyY2gveDg2L3ZpcnQvdm14L3RkeC90ZHguaA0K
PiBAQCAtNCw2ICs0LDggQEANCj4gIA0KPiAgI2luY2x1ZGUgPGxpbnV4L2JpdHMuaD4NCj4gIA0K
PiArI2luY2x1ZGUgPGFzbS90ZHguaD4NCj4gKw0KPiAgLyoNCj4gICAqIFRoaXMgZmlsZSBjb250
YWlucyBib3RoIG1hY3JvcyBhbmQgZGF0YSBzdHJ1Y3R1cmVzIGRlZmluZWQgYnkgdGhlIFREWA0K
PiAgICogYXJjaGl0ZWN0dXJlIGFuZCBMaW51eCBkZWZpbmVkIHNvZnR3YXJlIGRhdGEgc3RydWN0
dXJlcyBhbmQgZnVuY3Rpb25zLg0KPiBAQCAtMTE4LDQgKzEyMCw2IEBAIHN0cnVjdCB0ZG1yX2lu
Zm9fbGlzdCB7DQo+ICAJaW50IG1heF90ZG1yczsJLyogSG93IG1hbnkgJ3RkbXJfaW5mbydzIGFy
ZSBhbGxvY2F0ZWQgKi8NCj4gIH07DQo+ICANCj4gK2ludCBzZWFtbGRyX3ByZXJyKHU2NCBmbiwg
c3RydWN0IHRkeF9tb2R1bGVfYXJncyAqYXJncyk7DQo+ICsNCj4gICNlbmRpZg0KDQpHaXZlbiB0
aGVyZSB3aWxsIGJlIGEgZGVkaWNhdGVkIHNlYW1sZHIuYywgSSBkb24ndCBxdWl0ZSBsaWtlIGhh
dmluZw0Kc2VhbWxkcl9wcmVycigpIGluICJ0ZHguaCIgYW5kIHRkeC5jLg0KDQpOb3cgZm9yIGFs
bCBTRUFNQ0FMTHMgdXNlZCBieSBLVk0sIHdlIGhhdmUgYSBkZWRpY2F0ZWQgd3JhcHBlciBpbXBs
ZW1lbnRlZA0KaW4gdGR4LmMgYW5kIGV4cG9ydGVkIGZvciBLVk0gdG8gdXNlLiAgSSB0aGluayB3
ZSBjYW4gbW92ZSBzZWFtY2FsbCooKSBvdXQNCm9mIDxhc20vdGR4Lmg+IHRvIFREWCBob3N0IGxv
Y2FsIHNpbmNlIG5vIG90aGVyIGtlcm5lbCBjb2RlIGV4Y2VwdCB0aGUgVERYDQpob3N0IGNvcmUg
aXMgc3VwcG9zZWQgdG8gdXNlIHNlYW1jYWxsKigpLg0KDQpUaGlzIGFsc28gY2xlYW5zIHVwIDxh
c20vdGR4Lmg+IGEgbGl0dGxlIGJpdCwgd2hpY2ggaW4gZ2VuZXJhbCBtYWtlcyBjb2RlDQpjbGVh
bmVyIElNSE8uDQoNCkUuZy4sIGhvdyBhYm91dCB3ZSBkbyBiZWxvdyBwYXRjaCwgYW5kIHRoZW4g
eW91IGNhbiBkbyBjaGFuZ2VzIHRvIHN1cHBvcnQNClAtU0VBTUxEUiBvbiB0b3Agb2YgaXQ/DQoN
Ci0tLQ0KDQpGcm9tIDFjYmExN2NmODMyZDg3YTZlYTM0Y2M0ZGIxNzk4OTAyZTU0ZDc1NzcgTW9u
IFNlcCAxNyAwMDowMDowMCAyMDAxDQpGcm9tOiBLYWkgSHVhbmcgPGthaS5odWFuZ0BpbnRlbC5j
b20+DQpEYXRlOiBUdWUsIDMgSnVuIDIwMjUgMTI6NTU6NTMgKzEyMDANClN1YmplY3Q6IFtQQVRD
SF0geDg2L3ZpcnQvdGR4OiBNb3ZlIGxvdyBsZXZlbCBTRUFNQ0FMTCBoZWxwZXJzIG91dCBvZg0K
IDxhc20vdGR4Lmg+DQoNCk5vdyBmb3IgYWxsIHRoZSBTRUFNQ0FMTCBsZWFmIGZ1bmN0aW9ucyB0
aGF0IHVzZWQgYnkgS1ZNLCBlYWNoIGhhcyBhDQpkZWRpY2F0ZWQgd3JhcHBlciBmdW5jdGlvbiBp
bXBsZW1lbnRlZCBpbiBURFggaG9zdCBjb3JlIHRkeC5jIGFuZA0KZXhwb3J0ZWQgZm9yIEtWTSB0
byB1c2UuICBJbiB0aGUgZnV0dXJlLCBpZiBLVk0gb3IgYW55IG90aGVyIGtlcm5lbA0KY29tcG9u
ZW50IG5lZWRzIG1vcmUgU0VBTUNBTEwsIHRoZSBURFggaG9zdCBjb3JlIHRkeC5jIHNob3VsZCBw
cm92aWRlIGENCndyYXBwZXIuICBJbiBvdGhlciB3b3Jkcywgb3RoZXIgdGhhbiBURFggaG9zdCBj
b3JlIGNvZGUsIHNlYW1jYWxsKigpIGFyZQ0Kbm90IHN1cHBvc2VkIHRvIGJlIHVzZWQgYnkgb3Ro
ZXIga2VybmVsIGNvbXBvbmVudHMgdGh1cyBkb24ndCBuZWVkIHRvIGJlDQppbiA8YXNtL3RkeC5o
Pi4NCg0KTW92ZSBzZWFtY2FsbCooKSBhbmQgcmVsYXRlZCBjb2RlIG91dCBvZiA8YXNtL3RkeC5o
PiBhbmQgcHV0IHRoZW0gdG8gVERYDQphb3N0IGxvY2FsLiAgVGhpcyBhbHNvIGNsZWFucyB1cCA8
YXNtL3RkeC5oPiBhIGxpdHRsZSBiaXQsIHdoaWNoIGlzDQpnZXR0aW5nIGJpZ2dlciBhbmQgYmln
Z2VyLg0KDQpEb24ndCBqdXN0IHB1dCBzZWFtY2FsbCooKSB0byB0ZHguYyBzaW5jZSBpdCBpcyBh
bHJlYWR5IHZlcnkgaGVhdnksIGJ1dA0KcHV0IHNlYW1jYWxsKigpIHRvIGEgbmV3IGxvY2FsICJz
ZWFtY2FsbC5oIiB3aGljaCBpcyBtb3JlIHJlYWRhYmxlLg0KQWxzbywgY3VycmVudGx5IHRkeC5j
IGhhcyBzZWFtY2FsbF9wcmVyciooKSBoZWxwZXJzIHdoaWNoIGFkZGl0aW9uYWxseQ0KcHJpbnRz
IGVycm9yIG1lc3NhZ2Ugd2hlbiBjYWxsaW5nIHNlYW1jYWxsKigpIGZhaWxzLiAgTW92ZSB0aGVt
IGFuZCB0aGUNCnJlbGF0ZWQgY29kZSB0byAic2VhbWNhbGwuaCIgdG9vLiAgSW4gc3VjaCB3YXkg
YWxsIGxvdyBsZXZlbCBTRUFNQ0FMTA0KaGVscGVycyBhbmQgcmVsYXRlZCBjb2RlIGFyZSBpbiBh
IGRlZGljYXRlZCBwbGFjZSwgd2hpY2ggaXMgbXVjaCBtb3JlDQpyZWFkYWJsZS4NCg0KU2lnbmVk
LW9mZi1ieTogS2FpIEh1YW5nIDxrYWkuaHVhbmdAaW50ZWwuY29tPg0KLS0tDQogYXJjaC94ODYv
aW5jbHVkZS9hc20vdGR4LmggICAgICAgfCAyNCAtLS0tLS0tLS0tLQ0KIGFyY2gveDg2L3ZpcnQv
dm14L3RkeC9zZWFtY2FsbC5oIHwgNzEgKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysN
CiBhcmNoL3g4Ni92aXJ0L3ZteC90ZHgvdGR4LmMgICAgICB8IDQ2ICstLS0tLS0tLS0tLS0tLS0t
LS0tLQ0KIDMgZmlsZXMgY2hhbmdlZCwgNzIgaW5zZXJ0aW9ucygrKSwgNjkgZGVsZXRpb25zKC0p
DQogY3JlYXRlIG1vZGUgMTAwNjQ0IGFyY2gveDg2L3ZpcnQvdm14L3RkeC9zZWFtY2FsbC5oDQoN
CmRpZmYgLS1naXQgYS9hcmNoL3g4Ni9pbmNsdWRlL2FzbS90ZHguaCBiL2FyY2gveDg2L2luY2x1
ZGUvYXNtL3RkeC5oDQppbmRleCA4YjE5Mjk0NjAwYzQuLmE0NTMyMzExOGI3ZSAxMDA2NDQNCi0t
LSBhL2FyY2gveDg2L2luY2x1ZGUvYXNtL3RkeC5oDQorKysgYi9hcmNoL3g4Ni9pbmNsdWRlL2Fz
bS90ZHguaA0KQEAgLTk3LDMxICs5Nyw3IEBAIHN0YXRpYyBpbmxpbmUgbG9uZyB0ZHhfa3ZtX2h5
cGVyY2FsbCh1bnNpZ25lZCBpbnQgbnIsIHVuc2lnbmVkIGxvbmcgcDEsDQogI2VuZGlmIC8qIENP
TkZJR19JTlRFTF9URFhfR1VFU1QgJiYgQ09ORklHX0tWTV9HVUVTVCAqLw0KIA0KICNpZmRlZiBD
T05GSUdfSU5URUxfVERYX0hPU1QNCi11NjQgX19zZWFtY2FsbCh1NjQgZm4sIHN0cnVjdCB0ZHhf
bW9kdWxlX2FyZ3MgKmFyZ3MpOw0KLXU2NCBfX3NlYW1jYWxsX3JldCh1NjQgZm4sIHN0cnVjdCB0
ZHhfbW9kdWxlX2FyZ3MgKmFyZ3MpOw0KLXU2NCBfX3NlYW1jYWxsX3NhdmVkX3JldCh1NjQgZm4s
IHN0cnVjdCB0ZHhfbW9kdWxlX2FyZ3MgKmFyZ3MpOw0KIHZvaWQgdGR4X2luaXQodm9pZCk7DQot
DQotI2luY2x1ZGUgPGFzbS9hcmNocmFuZG9tLmg+DQotDQotdHlwZWRlZiB1NjQgKCpzY19mdW5j
X3QpKHU2NCBmbiwgc3RydWN0IHRkeF9tb2R1bGVfYXJncyAqYXJncyk7DQotDQotc3RhdGljIGlu
bGluZSB1NjQgc2NfcmV0cnkoc2NfZnVuY190IGZ1bmMsIHU2NCBmbiwNCi0gICAgICAgICAgICAg
ICAgICAgICAgICAgIHN0cnVjdCB0ZHhfbW9kdWxlX2FyZ3MgKmFyZ3MpDQotew0KLSAgICAgICBp
bnQgcmV0cnkgPSBSRFJBTkRfUkVUUllfTE9PUFM7DQotICAgICAgIHU2NCByZXQ7DQotDQotICAg
ICAgIGRvIHsNCi0gICAgICAgICAgICAgICByZXQgPSBmdW5jKGZuLCBhcmdzKTsNCi0gICAgICAg
fSB3aGlsZSAocmV0ID09IFREWF9STkRfTk9fRU5UUk9QWSAmJiAtLXJldHJ5KTsNCi0NCi0gICAg
ICAgcmV0dXJuIHJldDsNCi19DQotDQotI2RlZmluZSBzZWFtY2FsbChfZm4sIF9hcmdzKSAgICAg
ICAgICAgc2NfcmV0cnkoX19zZWFtY2FsbCwgKF9mbiksIChfYXJncykpDQotI2RlZmluZSBzZWFt
Y2FsbF9yZXQoX2ZuLCBfYXJncykgICAgICAgc2NfcmV0cnkoX19zZWFtY2FsbF9yZXQsIChfZm4p
LCAoX2FyZ3MpKQ0KLSNkZWZpbmUgc2VhbWNhbGxfc2F2ZWRfcmV0KF9mbiwgX2FyZ3MpIHNjX3Jl
dHJ5KF9fc2VhbWNhbGxfc2F2ZWRfcmV0LCAoX2ZuKSwgKF9hcmdzKSkNCiBpbnQgdGR4X2NwdV9l
bmFibGUodm9pZCk7DQogaW50IHRkeF9lbmFibGUodm9pZCk7DQogY29uc3QgY2hhciAqdGR4X2R1
bXBfbWNlX2luZm8oc3RydWN0IG1jZSAqbSk7DQpkaWZmIC0tZ2l0IGEvYXJjaC94ODYvdmlydC92
bXgvdGR4L3NlYW1jYWxsLmggYi9hcmNoL3g4Ni92aXJ0L3ZteC90ZHgvc2VhbWNhbGwuaA0KbmV3
IGZpbGUgbW9kZSAxMDA2NDQNCmluZGV4IDAwMDAwMDAwMDAwMC4uNTQ5MjJmN2JkYTNhDQotLS0g
L2Rldi9udWxsDQorKysgYi9hcmNoL3g4Ni92aXJ0L3ZteC90ZHgvc2VhbWNhbGwuaA0KQEAgLTAs
MCArMSw3MSBAQA0KKy8qIFNQRFgtTGljZW5zZS1JZGVudGlmaWVyOiBHUEwtMi4wICovDQorLyog
Q29weXJpZ2h0IChDKSAyMDI1IEludGVsIENvcnBvcmF0aW9uICovDQorI2luY2x1ZGUgPGFzbS90
ZHguaD4NCisjaW5jbHVkZSA8YXNtL2FyY2hyYW5kb20uaD4NCisNCit1NjQgX19zZWFtY2FsbCh1
NjQgZm4sIHN0cnVjdCB0ZHhfbW9kdWxlX2FyZ3MgKmFyZ3MpOw0KK3U2NCBfX3NlYW1jYWxsX3Jl
dCh1NjQgZm4sIHN0cnVjdCB0ZHhfbW9kdWxlX2FyZ3MgKmFyZ3MpOw0KK3U2NCBfX3NlYW1jYWxs
X3NhdmVkX3JldCh1NjQgZm4sIHN0cnVjdCB0ZHhfbW9kdWxlX2FyZ3MgKmFyZ3MpOw0KKw0KK3R5
cGVkZWYgdTY0ICgqc2NfZnVuY190KSh1NjQgZm4sIHN0cnVjdCB0ZHhfbW9kdWxlX2FyZ3MgKmFy
Z3MpOw0KKw0KK3N0YXRpYyBpbmxpbmUgdTY0IHNjX3JldHJ5KHNjX2Z1bmNfdCBmdW5jLCB1NjQg
Zm4sDQorICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgdGR4X21vZHVsZV9hcmdzICph
cmdzKQ0KK3sNCisgICAgICAgaW50IHJldHJ5ID0gUkRSQU5EX1JFVFJZX0xPT1BTOw0KKyAgICAg
ICB1NjQgcmV0Ow0KKw0KKyAgICAgICBkbyB7DQorICAgICAgICAgICAgICAgcmV0ID0gZnVuYyhm
biwgYXJncyk7DQorICAgICAgIH0gd2hpbGUgKHJldCA9PSBURFhfUk5EX05PX0VOVFJPUFkgJiYg
LS1yZXRyeSk7IA0KKyANCisgICAgICAgcmV0dXJuIHJldDsNCit9DQorDQorI2RlZmluZSBzZWFt
Y2FsbChfZm4sIF9hcmdzKSAgICAgICAgICAgc2NfcmV0cnkoX19zZWFtY2FsbCwgKF9mbiksIChf
YXJncykpDQorI2RlZmluZSBzZWFtY2FsbF9yZXQoX2ZuLCBfYXJncykgICAgICAgc2NfcmV0cnko
X19zZWFtY2FsbF9yZXQsIChfZm4pLCAoX2FyZ3MpKQ0KKyNkZWZpbmUgc2VhbWNhbGxfc2F2ZWRf
cmV0KF9mbiwgX2FyZ3MpIHNjX3JldHJ5KF9fc2VhbWNhbGxfc2F2ZWRfcmV0LCAoX2ZuKSwgKF9h
cmdzKSkNCisNCit0eXBlZGVmIHZvaWQgKCpzY19lcnJfZnVuY190KSh1NjQgZm4sIHU2NCBlcnIs
IHN0cnVjdCB0ZHhfbW9kdWxlX2FyZ3MgKmFyZ3MpOw0KKw0KK3N0YXRpYyBpbmxpbmUgdm9pZCBz
ZWFtY2FsbF9lcnIodTY0IGZuLCB1NjQgZXJyLCBzdHJ1Y3QgdGR4X21vZHVsZV9hcmdzICphcmdz
KQ0KK3sNCisgICAgICAgcHJfZXJyKCJTRUFNQ0FMTCAoMHglMDE2bGx4KSBmYWlsZWQ6IDB4JTAx
NmxseFxuIiwgZm4sIGVycik7DQorfQ0KKw0KK3N0YXRpYyBpbmxpbmUgdm9pZCBzZWFtY2FsbF9l
cnJfcmV0KHU2NCBmbiwgdTY0IGVyciwNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgIHN0cnVjdCB0ZHhfbW9kdWxlX2FyZ3MgKmFyZ3MpDQorew0KKyAgICAgICBzZWFtY2FsbF9l
cnIoZm4sIGVyciwgYXJncyk7DQorICAgICAgIHByX2VycigiUkNYIDB4JTAxNmxseCBSRFggMHgl
MDE2bGx4IFIwOCAweCUwMTZsbHhcbiIsDQorICAgICAgICAgICAgICAgICAgICAgICBhcmdzLT5y
Y3gsIGFyZ3MtPnJkeCwgYXJncy0+cjgpOw0KKyAgICAgICBwcl9lcnIoIlIwOSAweCUwMTZsbHgg
UjEwIDB4JTAxNmxseCBSMTEgMHglMDE2bGx4XG4iLA0KKyAgICAgICAgICAgICAgICAgICAgICAg
YXJncy0+cjksIGFyZ3MtPnIxMCwgYXJncy0+cjExKTsNCit9DQorDQorc3RhdGljIGlubGluZSBp
bnQgc2NfcmV0cnlfcHJlcnIoc2NfZnVuY190IGZ1bmMsIHNjX2Vycl9mdW5jX3QgZXJyX2Z1bmMs
DQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1NjQgZm4sIHN0cnVjdCB0ZHhfbW9k
dWxlX2FyZ3MgKmFyZ3MpDQorew0KKyAgICAgICB1NjQgc3JldCA9IHNjX3JldHJ5KGZ1bmMsIGZu
LCBhcmdzKTsNCisNCisgICAgICAgaWYgKHNyZXQgPT0gVERYX1NVQ0NFU1MpDQorICAgICAgICAg
ICAgICAgcmV0dXJuIDA7DQorDQorICAgICAgIGlmIChzcmV0ID09IFREWF9TRUFNQ0FMTF9WTUZB
SUxJTlZBTElEKQ0KKyAgICAgICAgICAgICAgIHJldHVybiAtRU5PREVWOw0KKw0KKyAgICAgICBp
ZiAoc3JldCA9PSBURFhfU0VBTUNBTExfR1ApDQorICAgICAgICAgICAgICAgcmV0dXJuIC1FT1BO
T1RTVVBQOw0KKw0KKyAgICAgICBpZiAoc3JldCA9PSBURFhfU0VBTUNBTExfVUQpDQorICAgICAg
ICAgICAgICAgcmV0dXJuIC1FQUNDRVM7DQorDQorICAgICAgIGVycl9mdW5jKGZuLCBzcmV0LCBh
cmdzKTsNCisgICAgICAgcmV0dXJuIC1FSU87DQorfQ0KKw0KKyNkZWZpbmUgc2VhbWNhbGxfcHJl
cnIoX19mbiwgX19hcmdzKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICBcDQorICAgICAgIHNjX3JldHJ5X3ByZXJyKF9fc2VhbWNhbGwsIHNlYW1jYWxsX2VyciwgKF9f
Zm4pLCAoX19hcmdzKSkNCisNCisjZGVmaW5lIHNlYW1jYWxsX3ByZXJyX3JldChfX2ZuLCBfX2Fy
Z3MpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXA0KKyAgICAgICBzY19y
ZXRyeV9wcmVycihfX3NlYW1jYWxsX3JldCwgc2VhbWNhbGxfZXJyX3JldCwgKF9fZm4pLCAoX19h
cmdzKSkNCmRpZmYgLS1naXQgYS9hcmNoL3g4Ni92aXJ0L3ZteC90ZHgvdGR4LmMgYi9hcmNoL3g4
Ni92aXJ0L3ZteC90ZHgvdGR4LmMNCmluZGV4IDI0NTdkMTNjM2Y5ZS4uYjk2M2UyZDc1NzEzIDEw
MDY0NA0KLS0tIGEvYXJjaC94ODYvdmlydC92bXgvdGR4L3RkeC5jDQorKysgYi9hcmNoL3g4Ni92
aXJ0L3ZteC90ZHgvdGR4LmMNCkBAIC0zOCw2ICszOCw3IEBADQogI2luY2x1ZGUgPGFzbS9jcHVf
ZGV2aWNlX2lkLmg+DQogI2luY2x1ZGUgPGFzbS9wcm9jZXNzb3IuaD4NCiAjaW5jbHVkZSA8YXNt
L21jZS5oPg0KKyNpbmNsdWRlICJzZWFtY2FsbC5oIg0KICNpbmNsdWRlICJ0ZHguaCINCg0KIHN0
YXRpYyB1MzIgdGR4X2dsb2JhbF9rZXlpZCBfX3JvX2FmdGVyX2luaXQ7DQpAQCAtNTcsNTEgKzU4
LDYgQEAgc3RhdGljIERFRklORV9NVVRFWCh0ZHhfbW9kdWxlX2xvY2spOw0KIHN0YXRpYyBMSVNU
X0hFQUQodGR4X21lbWxpc3QpOw0KDQogc3RhdGljIHN0cnVjdCB0ZHhfc3lzX2luZm8gdGR4X3N5
c2luZm87DQotDQotdHlwZWRlZiB2b2lkICgqc2NfZXJyX2Z1bmNfdCkodTY0IGZuLCB1NjQgZXJy
LCBzdHJ1Y3QgdGR4X21vZHVsZV9hcmdzICphcmdzKTsNCi0NCi1zdGF0aWMgaW5saW5lIHZvaWQg
c2VhbWNhbGxfZXJyKHU2NCBmbiwgdTY0IGVyciwgc3RydWN0IHRkeF9tb2R1bGVfYXJncyAqYXJn
cykNCi17DQotICAgICAgIHByX2VycigiU0VBTUNBTEwgKDB4JTAxNmxseCkgZmFpbGVkOiAweCUw
MTZsbHhcbiIsIGZuLCBlcnIpOw0KLX0NCi0NCi1zdGF0aWMgaW5saW5lIHZvaWQgc2VhbWNhbGxf
ZXJyX3JldCh1NjQgZm4sIHU2NCBlcnIsDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICBzdHJ1Y3QgdGR4X21vZHVsZV9hcmdzICphcmdzKQ0KLXsNCi0gICAgICAgc2VhbWNhbGxf
ZXJyKGZuLCBlcnIsIGFyZ3MpOw0KLSAgICAgICBwcl9lcnIoIlJDWCAweCUwMTZsbHggUkRYIDB4
JTAxNmxseCBSMDggMHglMDE2bGx4XG4iLA0KLSAgICAgICAgICAgICAgICAgICAgICAgYXJncy0+
cmN4LCBhcmdzLT5yZHgsIGFyZ3MtPnI4KTsNCi0gICAgICAgcHJfZXJyKCJSMDkgMHglMDE2bGx4
IFIxMCAweCUwMTZsbHggUjExIDB4JTAxNmxseFxuIiwNCi0gICAgICAgICAgICAgICAgICAgICAg
IGFyZ3MtPnI5LCBhcmdzLT5yMTAsIGFyZ3MtPnIxMSk7DQotfQ0KLQ0KLXN0YXRpYyBpbmxpbmUg
aW50IHNjX3JldHJ5X3ByZXJyKHNjX2Z1bmNfdCBmdW5jLCBzY19lcnJfZnVuY190IGVycl9mdW5j
LA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdTY0IGZuLCBzdHJ1Y3QgdGR4X21v
ZHVsZV9hcmdzICphcmdzKQ0KLXsNCi0gICAgICAgdTY0IHNyZXQgPSBzY19yZXRyeShmdW5jLCBm
biwgYXJncyk7DQotDQotICAgICAgIGlmIChzcmV0ID09IFREWF9TVUNDRVNTKQ0KLSAgICAgICAg
ICAgICAgIHJldHVybiAwOw0KLQ0KLSAgICAgICBpZiAoc3JldCA9PSBURFhfU0VBTUNBTExfVk1G
QUlMSU5WQUxJRCkNCi0gICAgICAgICAgICAgICByZXR1cm4gLUVOT0RFVjsNCi0NCi0gICAgICAg
aWYgKHNyZXQgPT0gVERYX1NFQU1DQUxMX0dQKQ0KLSAgICAgICAgICAgICAgIHJldHVybiAtRU9Q
Tk9UU1VQUDsNCi0NCi0gICAgICAgaWYgKHNyZXQgPT0gVERYX1NFQU1DQUxMX1VEKQ0KLSAgICAg
ICAgICAgICAgIHJldHVybiAtRUFDQ0VTOw0KLQ0KLSAgICAgICBlcnJfZnVuYyhmbiwgc3JldCwg
YXJncyk7DQotICAgICAgIHJldHVybiAtRUlPOw0KLX0NCi0NCi0jZGVmaW5lIHNlYW1jYWxsX3By
ZXJyKF9fZm4sIF9fYXJncykgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgXA0KLSAgICAgICBzY19yZXRyeV9wcmVycihfX3NlYW1jYWxsLCBzZWFtY2FsbF9lcnIsIChf
X2ZuKSwgKF9fYXJncykpDQotDQotI2RlZmluZSBzZWFtY2FsbF9wcmVycl9yZXQoX19mbiwgX19h
cmdzKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwNCi0gICAgICAgc2Nf
cmV0cnlfcHJlcnIoX19zZWFtY2FsbF9yZXQsIHNlYW1jYWxsX2Vycl9yZXQsIChfX2ZuKSwgKF9f
YXJncykpDQotDQogLyoNCiAgKiBEbyB0aGUgbW9kdWxlIGdsb2JhbCBpbml0aWFsaXphdGlvbiBv
bmNlIGFuZCByZXR1cm4gaXRzIHJlc3VsdC4NCiAgKiBJdCBjYW4gYmUgZG9uZSBvbiBhbnkgY3B1
LiAgSXQncyBhbHdheXMgY2FsbGVkIHdpdGggaW50ZXJydXB0cw0KLS0gDQoyLjQ5LjANCg==
Return-Path: <linux-kernel+bounces-673187-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 94D6641E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:22:51 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 78E0F3A44AC
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:22:13 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id B46C628ECCA;
Wed, 4 Jun 2025 12:22:20 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Tskw8KDw"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2A2E428E5EF
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:22:17 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749039739; cv=none; b=tI82d/UFhv81JL8GsLbuRRtpW6U7/DQkNtVGuTKJ3FYjUXnl9koq9WbpEWiCRe5druzWX15//uMCngmHeQ8vmyczGHxZ4s/8r06bKlSpwxgwzHdNRnX8Inl+4GXhuhVtgMqAarHlPEqeCtdR14UH8UVSzjK6KGG2dC9Z+98j64w=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749039739; c=relaxed/simple;
bh=xKcZz/sXeB78LMPUg/yXvPuhsZl80bUdTqiR6z8BPEs=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=OOzu9WGvxEEa7bObHR1x7ltLxal+3SPl7/9rkDcGgi7S3apxDO2Ar8TLFtEHJYpBR1tej+4MOnRoXul+09E+AKmXnPbpXrdMgzNTBZ8VsH/4Fw+SKB/SOpnDwd3J2g7LZ7fpNBY0dDeVF0Qtpdvg8AdXZ3yj4kh4PqHxrIC6fhM=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Tskw8KDw; arc=none smtp.client-ip=170.10.129.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749039736;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=6lfXeT0z+TCzLVyd3cGFL+scSmu9BUEdMfvBKTxjadI=;
b=Tskw8KDw803kcHcFa0DgNUmu1nM9ds2MYdqv9HhzhqVPkEGt7AzMnQWByQHfLt2I6l/dHS
LZjUzWOeyzSaWXZD+/ytby/Ia6ykAKemzfFZLgW9lWsp7aI89u/lZGqvHiqil+Kd12JZJu
of2ZM5857nLZblsf0s/BtV5DHR6U210=
Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com
[209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-567-D_u3bTitNpO5tO2rNxeO-g-1; Wed, 04 Jun 2025 08:22:14 -0400
X-MC-Unique: D_u3bTitNpO5tO2rNxeO-g-1
X-Mimecast-MFC-AGG-ID: D_u3bTitNpO5tO2rNxeO-g_1749039733
Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-3a4eee72969so4361321f8f.3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 05:22:14 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749039733; x=1749644533;
h=content-transfer-encoding:in-reply-to:organization:autocrypt
:content-language:from:references:cc:to:subject:user-agent
:mime-version:date:message-id:x-gm-message-state:from:to:cc:subject
:date:message-id:reply-to;
bh=6lfXeT0z+TCzLVyd3cGFL+scSmu9BUEdMfvBKTxjadI=;
b=PKOdr3epeLOax1QNS1s55DTgiRl4/HJOEMdy44/9nUecbr68fv/4c/2a5HxIqgWH+h
B6aypTd4t3lr95AKlsSMeSJ7Su8tAejpUfjiyuyZnmsqG03F10RwV+MgmNE43tkzWOvO
cKUG5pFniLI6boSaRD06r7wEWljYXooS/Pgsqp+NFw6y9+Lmx1/RFk1ovTkVT0sjlmUD
ws/vKkXf8k2rtXB2IUJjNUjKIFsxLDBXi3933Hxeu5UyRv1bQHwViShxKFA6dyD9DOmY
l6q0fHtIuj9yLfacHArN8CWRlBQDmSew3RgRwM0Fxg3Qo4TsB/Pax+M6l/+n0MczxBfa
PjIQ==
X-Forwarded-Encrypted: i=1; AJvYcCXokSdgwQ4VdtjfGot8n9aNEp0pZaNu6HboFxUvSIG1H52zhSh6Dqjsq2V0ciTX3YLxoYQ9O0UrKWbDHHs=@vger.kernel.org
X-Gm-Message-State: AOJu0YztPg/QlB/L3z+cKhMXd+Z+EnQMXGpaBtdkynwFsit3qdZxL6T2
RpAPq9jpJorQqwGvoKRSIcTRoAyurycxLz3V0gMKt9BxNjISiFkfFzylKioyrKNdL7a9S9aO64s
+8BvvoIDSt1MGxUsdW1j1HPoX97tLXrMnFrIhE6Q67T589k3UgaJZENgeI4OIAbg7JA==
X-Gm-Gg: ASbGncvgT29jNQSLriulPHfd5UdBszJCgowuaCm9QaBvzyiMqF6NVOwWZclwySXmV/2
e6VIi+56DDO+QeyDIdep2miJRFY4/3h2MGS5k8yvldDghM0gJzSP3+nOxSQgVgPFzmTn+m7DU9D
BWYqpgoU3zTJ5yleGGFmGO50SDc1oR/I4bezhJskcRNRDboqNiE7ja02gwomEmHbzWkSnyQNux6
IE2+XKpZ99D3xISoGE4rwXPFqAf1N5gq9gq+qOvXTOo4LrKTko93jonr5RfzqXZaVLcT9db7xJA
wKz+bSMd2cMg5ZKs0G0/IknApg8Anusw95uzF0LmvVn2Jwq68bV9xWM4ZhxVDfNRH8wtmCE9Hvk
PE0o5Y6XKw6kQLelB1EIh/oUqqRQhesYZYidJaAKe8+nC8SZ/gA==
X-Received: by 2002:a05:6000:220d:b0:3a4:f50a:bd5f with SMTP id ffacd0b85a97d-3a51d969a2dmr2111952f8f.31.1749039733403;
Wed, 04 Jun 2025 05:22:13 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IFA9VuHpccMtdKKzp4Hz3kHndj5EggT/8SayDPYShxKlb0WORgYX8TtbaW4GT5gQgzKlo2NJw==
X-Received: by 2002:a05:6000:220d:b0:3a4:f50a:bd5f with SMTP id ffacd0b85a97d-3a51d969a2dmr2111921f8f.31.1749039732918;
Wed, 04 Jun 2025 05:22:12 -0700 (PDT)
Received: from ?IPV6:2003:d8:2f1b:b800:6fdb:1af2:4fbd:1fdf? (p200300d82f1bb8006fdb1af24fbd1fdf.dip0.t-ipconnect.de. [2003:d8:2f1b:b800:6fdb:1af2:4fbd:1fdf])
by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a4f009748fsm21291293f8f.80.2025.06.04.05.22.11
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 05:22:12 -0700 (PDT)
Message-ID: <bcb71683-22b4-41a1-9db2-b99ac7c7fdea@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 14:22:11 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH 1/2] mm/memory: ensure fork child sees coherent memory
snapshot
To: Jann Horn <jannh@xxxxxxxxxx>, Matthew Wilcox <willy@xxxxxxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>, Vlastimil Babka
<vbabka@xxxxxxx>, Mike Rapoport <rppt@xxxxxxxxxx>,
Suren Baghdasaryan <surenb@xxxxxxxxxx>, Michal Hocko <mhocko@xxxxxxxx>,
linux-mm@xxxxxxxxx, Peter Xu <peterx@xxxxxxxxxx>,
linux-kernel@xxxxxxxxxxxxxxx, stable@xxxxxxxxxxxxxxx
References: <20250603-fork-tearing-v1-0-a7f64b7cfc96@xxxxxxxxxx>
<20250603-fork-tearing-v1-1-a7f64b7cfc96@xxxxxxxxxx>
<aD8--plab38qiQF8@xxxxxxxxxxxxxxxxxxxx>
<CAG48ez36t3ZaG7DsDCw1xLpdOhKVWQMjcH-hwP66Cbd8p4eTAA@xxxxxxxxxxxxxx>
From: David Hildenbrand <david@xxxxxxxxxx>
Content-Language: en-US
Autocrypt: addr=david@xxxxxxxxxx; keydata=
xsFNBFXLn5EBEAC+zYvAFJxCBY9Tr1xZgcESmxVNI/0ffzE/ZQOiHJl6mGkmA1R7/uUpiCjJ
dBrn+lhhOYjjNefFQou6478faXE6o2AhmebqT4KiQoUQFV4R7y1KMEKoSyy8hQaK1umALTdL
QZLQMzNE74ap+GDK0wnacPQFpcG1AE9RMq3aeErY5tujekBS32jfC/7AnH7I0v1v1TbbK3Gp
XNeiN4QroO+5qaSr0ID2sz5jtBLRb15RMre27E1ImpaIv2Jw8NJgW0k/D1RyKCwaTsgRdwuK
Kx/Y91XuSBdz0uOyU/S8kM1+ag0wvsGlpBVxRR/xw/E8M7TEwuCZQArqqTCmkG6HGcXFT0V9
PXFNNgV5jXMQRwU0O/ztJIQqsE5LsUomE//bLwzj9IVsaQpKDqW6TAPjcdBDPLHvriq7kGjt
WhVhdl0qEYB8lkBEU7V2Yb+SYhmhpDrti9Fq1EsmhiHSkxJcGREoMK/63r9WLZYI3+4W2rAc
UucZa4OT27U5ZISjNg3Ev0rxU5UH2/pT4wJCfxwocmqaRr6UYmrtZmND89X0KigoFD/XSeVv
jwBRNjPAubK9/k5NoRrYqztM9W6sJqrH8+UWZ1Idd/DdmogJh0gNC0+N42Za9yBRURfIdKSb
B3JfpUqcWwE7vUaYrHG1nw54pLUoPG6sAA7Mehl3nd4pZUALHwARAQABzSREYXZpZCBIaWxk
ZW5icmFuZCA8ZGF2aWRAcmVkaGF0LmNvbT7CwZgEEwEIAEICGwMGCwkIBwMCBhUIAgkKCwQW
AgMBAh4BAheAAhkBFiEEG9nKrXNcTDpGDfzKTd4Q9wD/g1oFAl8Ox4kFCRKpKXgACgkQTd4Q
9wD/g1oHcA//a6Tj7SBNjFNM1iNhWUo1lxAja0lpSodSnB2g4FCZ4R61SBR4l/psBL73xktp
rDHrx4aSpwkRP6Epu6mLvhlfjmkRG4OynJ5HG1gfv7RJJfnUdUM1z5kdS8JBrOhMJS2c/gPf
wv1TGRq2XdMPnfY2o0CxRqpcLkx4vBODvJGl2mQyJF/gPepdDfcT8/PY9BJ7FL6Hrq1gnAo4
3Iv9qV0JiT2wmZciNyYQhmA1V6dyTRiQ4YAc31zOo2IM+xisPzeSHgw3ONY/XhYvfZ9r7W1l
pNQdc2G+o4Di9NPFHQQhDw3YTRR1opJaTlRDzxYxzU6ZnUUBghxt9cwUWTpfCktkMZiPSDGd
KgQBjnweV2jw9UOTxjb4LXqDjmSNkjDdQUOU69jGMUXgihvo4zhYcMX8F5gWdRtMR7DzW/YE
BgVcyxNkMIXoY1aYj6npHYiNQesQlqjU6azjbH70/SXKM5tNRplgW8TNprMDuntdvV9wNkFs
9TyM02V5aWxFfI42+aivc4KEw69SE9KXwC7FSf5wXzuTot97N9Phj/Z3+jx443jo2NR34XgF
89cct7wJMjOF7bBefo0fPPZQuIma0Zym71cP61OP/i11ahNye6HGKfxGCOcs5wW9kRQEk8P9
M/k2wt3mt/fCQnuP/mWutNPt95w9wSsUyATLmtNrwccz63XOwU0EVcufkQEQAOfX3n0g0fZz
Bgm/S2zF/kxQKCEKP8ID+Vz8sy2GpDvveBq4H2Y34XWsT1zLJdvqPI4af4ZSMxuerWjXbVWb
T6d4odQIG0fKx4F8NccDqbgHeZRNajXeeJ3R7gAzvWvQNLz4piHrO/B4tf8svmRBL0ZB5P5A
2uhdwLU3NZuK22zpNn4is87BPWF8HhY0L5fafgDMOqnf4guJVJPYNPhUFzXUbPqOKOkL8ojk
CXxkOFHAbjstSK5Ca3fKquY3rdX3DNo+EL7FvAiw1mUtS+5GeYE+RMnDCsVFm/C7kY8c2d0G
NWkB9pJM5+mnIoFNxy7YBcldYATVeOHoY4LyaUWNnAvFYWp08dHWfZo9WCiJMuTfgtH9tc75
7QanMVdPt6fDK8UUXIBLQ2TWr/sQKE9xtFuEmoQGlE1l6bGaDnnMLcYu+Asp3kDT0w4zYGsx
5r6XQVRH4+5N6eHZiaeYtFOujp5n+pjBaQK7wUUjDilPQ5QMzIuCL4YjVoylWiBNknvQWBXS
lQCWmavOT9sttGQXdPCC5ynI+1ymZC1ORZKANLnRAb0NH/UCzcsstw2TAkFnMEbo9Zu9w7Kv
AxBQXWeXhJI9XQssfrf4Gusdqx8nPEpfOqCtbbwJMATbHyqLt7/oz/5deGuwxgb65pWIzufa
N7eop7uh+6bezi+rugUI+w6DABEBAAHCwXwEGAEIACYCGwwWIQQb2cqtc1xMOkYN/MpN3hD3
AP+DWgUCXw7HsgUJEqkpoQAKCRBN3hD3AP+DWrrpD/4qS3dyVRxDcDHIlmguXjC1Q5tZTwNB
boaBTPHSy/Nksu0eY7x6HfQJ3xajVH32Ms6t1trDQmPx2iP5+7iDsb7OKAb5eOS8h+BEBDeq
3ecsQDv0fFJOA9ag5O3LLNk+3x3q7e0uo06XMaY7UHS341ozXUUI7wC7iKfoUTv03iO9El5f
XpNMx/YrIMduZ2+nd9Di7o5+KIwlb2mAB9sTNHdMrXesX8eBL6T9b+MZJk+mZuPxKNVfEQMQ
a5SxUEADIPQTPNvBewdeI80yeOCrN+Zzwy/Mrx9EPeu59Y5vSJOx/z6OUImD/GhX7Xvkt3kq
Er5KTrJz3++B6SH9pum9PuoE/k+nntJkNMmQpR4MCBaV/J9gIOPGodDKnjdng+mXliF3Ptu6
3oxc2RCyGzTlxyMwuc2U5Q7KtUNTdDe8T0uE+9b8BLMVQDDfJjqY0VVqSUwImzTDLX9S4g/8
kC4HRcclk8hpyhY2jKGluZO0awwTIMgVEzmTyBphDg/Gx7dZU1Xf8HFuE+UZ5UDHDTnwgv7E
th6RC9+WrhDNspZ9fJjKWRbveQgUFCpe1sa77LAw+XFrKmBHXp9ZVIe90RMe2tRL06BGiRZr
jPrnvUsUUsjRoRNJjKKA/REq+sAnhkNPPZ/NNMjaZ5b8Tovi8C0tmxiCHaQYqj7G2rgnT0kt
WNyWQQ==
Organization: Red Hat
In-Reply-To: <CAG48ez36t3ZaG7DsDCw1xLpdOhKVWQMjcH-hwP66Cbd8p4eTAA@xxxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 03.06.25 21:03, Jann Horn wrote:
On Tue, Jun 3, 2025 at 8:29 PM Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:
On Tue, Jun 03, 2025 at 08:21:02PM +0200, Jann Horn wrote:
When fork() encounters possibly-pinned pages, those pages are immediately
copied instead of just marking PTEs to make CoW happen later. If the parent
is multithreaded, this can cause the child to see memory contents that are
inconsistent in multiple ways:
1. We are copying the contents of a page with a memcpy() while userspace
may be writing to it. This can cause the resulting data in the child to
be inconsistent.
2. After we've copied this page, future writes to other pages may
continue to be visible to the child while future writes to this page are
no longer visible to the child.
This means the child could theoretically see incoherent states where
allocator freelists point to objects that are actually in use or stuff like
that. A mitigating factor is that, unless userspace already has a deadlock
bug, userspace can pretty much only observe such issues when fancy lockless
data structures are used (because if another thread was in the middle of
mutating data during fork() and the post-fork child tried to take the mutex
protecting that data, it might wait forever).
Um, OK, but isn't that expected behaviour? POSIX says:
I don't think it is expected behavior that locklessly-updated data
structures in application code could break.
: A process shall be created with a single thread. If a multi-threaded
: process calls fork(), the new process shall contain a replica of the
: calling thread and its entire address space, possibly including the
: states of mutexes and other resources. Consequently, the application
: shall ensure that the child process only executes async-signal-safe
: operations until such time as one of the exec functions is successful.
I think that is only talking about ways in which you can interact with
libc, and does not mean that application code couldn't access its own
lockless data structures or such.
Though admittedly that is a fairly theoretical point, since in
practice the most likely place where you'd encounter this kind of
issue would be in an allocator implementation or such.
I thought a bit further about that.
The thing is, that another thread in the parent might be doing something
lockless using atomics etc. And in the parent, that thread will make
progress as soon as fork() is done. In the child, that thread will never
make progress again, as it is gone.
So the assumption must be that another thread possibly stalling forever
and not making any progress will not affect the algorithm in the child.
I am not sure if that is actually the case for many lockless algorithms
in allocators. I'm curious, do we have any examples of such algorithms,
in particular, regarding allocators?
--
Cheers,
David / dhildenb
Return-Path: <linux-kernel+bounces-673188-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 7728341E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:23:43 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 85F507A54AA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:22:22 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 6DF5028ECDD;
Wed, 4 Jun 2025 12:23:30 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="Db0ompKE"
Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id D4C432C327E;
Wed, 4 Jun 2025 12:23:27 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749039809; cv=none; b=PjcxCTBMMGhUyY27h4tbyUh+gelkEVZcM+0CvNkUir7qnF9KZ4+2ZpYGrA+XKnykjElKYhRIZAOBwcCxraWM5NDLrCfh+7EI109AT1y0IaVtUAvYq97yVU7BFllBFKZDgSQ0+n5tatj0huNbhPB+0m0q7zNH4Qt//s3NGXhJqiY=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749039809; c=relaxed/simple;
bh=QaTyjEznJ1R5sNay9RQIac7K2Sj38RK5k3TLtoVPbzM=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=ki2ruQ0jessNEVNfN95IiCJ8ra7iB2rgMFUAs5PAYUcPG6ABJQYFrrmkqUozhM8YzU8M4bCLHAL30X+TjVAHgiW0zLBCnh/0TSfoY9NdiV/qXXENiA8r65UWo2KX2wU2BkX3yrRM35eZUSKbLGywDqNWrwVG5RcFkW4SxceVd/w=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=Db0ompKE; arc=none smtp.client-ip=156.67.10.101
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch;
s=20171124; h=In-Reply-To:Content-Transfer-Encoding:Content-Disposition:
Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:From:
Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type:
Content-Transfer-Encoding:Content-ID:Content-Description:Content-Disposition:
In-Reply-To:References; bh=7XWieguazqtxUMRi6G7yUlfR8Tu1/VnAzgOfOXGtr7c=; b=Db
0ompKEjd/bvN9l1Nb/8IXd21AkXSBrYqRkJVu6UzHiWEXh3fFqWo8NlaMkhFdMbtgZ4Vol0lgGMEi
7VIeePYWVWilUfF6UoVrFgd1U1/rTaJQTWvnfTyzCwZIl+Ak2hxdbiFxk140Lpb7MgTZVVQCTS3hX
iFgyrNvRoMtfgnM=;
Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2)
(envelope-from <andrew@xxxxxxx>)
id 1uMn9A-00EgC3-M8; Wed, 04 Jun 2025 14:23:08 +0200
Date: Wed, 4 Jun 2025 14:23:08 +0200
From: Andrew Lunn <andrew@xxxxxxx>
To: Icenowy Zheng <uwu@xxxxxxxxxx>
Cc: Rob Herring <robh@xxxxxxxxxx>, Andrew Lunn <andrew+netdev@xxxxxxx>,
"David S. Miller" <davem@xxxxxxxxxxxxx>,
Eric Dumazet <edumazet@xxxxxxxxxx>,
Jakub Kicinski <kuba@xxxxxxxxxx>, Paolo Abeni <pabeni@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>,
Chaoyi Chen <chaoyi.chen@xxxxxxxxxxxxxx>,
Matthias Schiffer <matthias.schiffer@xxxxxxxxxxxxxxx>,
"Russell King (Oracle)" <linux@xxxxxxxxxxxxxxx>,
Heiner Kallweit <hkallweit1@xxxxxxxxx>, netdev@xxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
Subject: Re: [PATCH net v2] dt-bindings: net: ethernet-controller: Add
informative text about RGMII delays
Message-ID: <debcb2e1-b7ef-493b-a4c4-e13d4aaf0223@xxxxxxx>
References: <20250430-v6-15-rc3-net-rgmii-delays-v2-1-099ae651d5e5@xxxxxxx>
<e4db4e6f0a5a42ceacacc925adbe13747a6f948e.camel@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <e4db4e6f0a5a42ceacacc925adbe13747a6f948e.camel@xxxxxxxxxx>
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
> -����� # RX and TX delays are added by the MAC when required
> +����� # RX and TX delays are provided by the PCB. See below
This really sounds like a breaking change that changes the meaning of
the definition of this item instead of simply rewording.
Everything written according to the original description is broken by
this change.
Please give some examples. What has broken, which was not already
broken. There has been a lot of discussion about this over the last
year, so please do some careful research about what has been said, and
try not to repeat past discussion.
The whole point of this change is this is often wrongly interpreted,
and there are a lot of broken .dts files. By including a lot of text,
explaining both the pure OS agnostic DT meaning, and how Linux systems
should implement it, i hope i have made it less ambiguous.
Although these PHYs are able to implement (or not to implement) the
delay, it's not promised that this could be overriden by the kernel
instead of being set up as strap pins.
If you want the kernel to not touch the PHY, use
phy-mode = 'internal'
In addition, the Linux kernel contains a "Generic PHY" driver for any
802.1 c22 PHYs to work, without setting any delays.
genphy is best effort, cross your fingers, it might work if you are
luckily. Given the increasing complexity of PHYs, it is becoming less
and less likely to work. From a Maintainers perspective, i only care
if the system works with the proper PHY driver for the
hardware. Anything else is unmaintainable.
> +#
> +# There are a small number of cases where the MAC has hard coded
> +# delays which cannot be disabled. The 'phy-mode' only describes the
> +# PCB.� The inability to disable the delays in the MAC does not
> change
> +# the meaning of 'phy-mode'. It does however mean that a 'phy-mode'
> of
> +# 'rgmii' is now invalid, it cannot be supported, since both the PCB
> +# and the MAC and PHY adding delays cannot result in a functional
> +# link. Thus the MAC should report a fatal error for any modes which
Considering compatibilty, should this be just a warning (which usually
means a wrong phy-mode setup) instead of a fatal error?
As i said, there are a large number of broken DT blobs. In order to
fix them, but not break backwards compatibility, some MAC and PHY
drivers are going to have to check the strapping/bootloader
configuration and issue a warning if phy-mode seems wrong, telling the
user to update there DT blob. So, yes it is just a warning for systems
that are currently broken, but i would consider it an error for
correctly implemented systems.
Andrew
Return-Path: <linux-kernel+bounces-673189-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id A179D41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:26:14 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id AB46518875C5
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:26:27 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 6AB0128ECCE;
Wed, 4 Jun 2025 12:26:05 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="EhXTjvaC"
Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id D8D8479F2;
Wed, 4 Jun 2025 12:26:02 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.13
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749039964; cv=none; b=UCeCBhcGUqROL924r0vICVLDVCubPw/n0mNnJ/a4CxWhMfGh7aQcfCddXLxGpwoAWtGJ0rU9RBv0Cqce7nRR5FApcnkhIvCO48fWJQP67gcUFcRe5ImlYR1Hk+yUaVopgv8qg7/ev/sinY1o+X/XoJKyqzkVu1kjbEfEkNMNMl4=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749039964; c=relaxed/simple;
bh=EFkzfqm1FA/pnUlUVk4/tkPBvTq7nP68gf7IeW/2B0w=;
h=From:Date:To:cc:Subject:In-Reply-To:Message-ID:References:
MIME-Version:Content-Type; b=UG89XT2Bw6lIDS3BslQkDDoYiPKNX4NXWQwqyXJqUy0gdsNQjEKpOh4ElQQs/CyS4JAMoA4DPpo6t3hZ/gAIqJ2k8VzwqBTBnZHIpZS9cfh2iA7KlIKofs/muOJ/r7MjpqOebMeaNDPMr32Uf1Q9r02+qhU2edMgSab/HSdCbf0=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=EhXTjvaC; arc=none smtp.client-ip=192.198.163.13
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com
Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
t=1749039963; x=1780575963;
h=from:date:to:cc:subject:in-reply-to:message-id:
references:mime-version;
bh=EFkzfqm1FA/pnUlUVk4/tkPBvTq7nP68gf7IeW/2B0w=;
b=EhXTjvaCdoJe9SUD5eQ4XyGVolhq4qgixu37m1PL4IJMWTod9TUmUCwU
DWGarE/CrPzfe9EZ95lOkVSw62jiiWiDjYHAY/UllnxvKtM/9XtKCY5Yd
gOajgiS4U5gr/ZxM4wCwrQvgQhyTMJj65pzf+iRO83NaTdHZZ21sOna1P
p9H3gErjAY/fonh68MVHxMD7+/ze3fgKc3sKhW3IeWAZkfpKMQtbritgf
anRoN9vtYtkVYZgXWYHVM0vNIYtz2N++toROl0YiOVWlOYNRa/u8Uf+yz
YRaQL+iUqa2yva/aSq5SLIDhiJzXlafCJQ9DcK5NeSkZ7tsNY2TDryW7a
g==;
X-CSE-ConnectionGUID: jcoZAIqSTn+BhpTBx2+JbQ==
X-CSE-MsgGUID: pARAJ2wITsOF+G5YykbbxA==
X-IronPort-AV: E=McAfee;i="6800,10657,11454"; a="53745738"
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="53745738"
Received: from orviesa010.jf.intel.com ([10.64.159.150])
by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 05:26:02 -0700
X-CSE-ConnectionGUID: lH/3sueOTVeh6pK8IT9H7Q==
X-CSE-MsgGUID: 4OTG5hFBSAutbZbNmejlmQ==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="145133647"
Received: from ijarvine-mobl1.ger.corp.intel.com (HELO localhost) ([10.245.245.124])
by orviesa010-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 05:25:56 -0700
From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= <ilpo.jarvinen@xxxxxxxxxxxxxxx>
Date: Wed, 4 Jun 2025 15:25:52 +0300 (EEST)
To: =?ISO-8859-2?Q?Micha=B3_Winiarski?= <michal.winiarski@xxxxxxxxx>
cc: linux-pci@xxxxxxxxxxxxxxx, intel-xe@xxxxxxxxxxxxxxxxxxxxx,
dri-devel@xxxxxxxxxxxxxxxxxxxxx, LKML <linux-kernel@xxxxxxxxxxxxxxx>,
Bjorn Helgaas <bhelgaas@xxxxxxxxxx>,
=?ISO-8859-15?Q?Christian_K=F6nig?= <christian.koenig@xxxxxxx>,
=?ISO-8859-2?Q?Krzysztof_Wilczy=F1ski?= <kw@xxxxxxxxx>,
Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>,
Michal Wajdeczko <michal.wajdeczko@xxxxxxxxx>,
Lucas De Marchi <lucas.demarchi@xxxxxxxxx>,
=?ISO-8859-15?Q?Thomas_Hellstr=F6m?= <thomas.hellstrom@xxxxxxxxxxxxxxx>,
Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>,
Maxime Ripard <mripard@xxxxxxxxxx>,
Thomas Zimmermann <tzimmermann@xxxxxxx>, David Airlie <airlied@xxxxxxxxx>,
Simona Vetter <simona@xxxxxxxx>, Matt Roper <matthew.d.roper@xxxxxxxxx>
Subject: Re: [PATCH v9 5/6] PCI: Allow drivers to control VF BAR size
In-Reply-To: <20250527120637.665506-6-michal.winiarski@xxxxxxxxx>
Message-ID: <a6dd1c15-7c0c-bb60-9784-f3a18bc8b765@xxxxxxxxxxxxxxx>
References: <20250527120637.665506-1-michal.winiarski@xxxxxxxxx> <20250527120637.665506-6-michal.winiarski@xxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="8323328-318291348-1749039952=:979"
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
--8323328-318291348-1749039952=:979
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: QUOTED-PRINTABLE
On Tue, 27 May 2025, Micha=C5=82 Winiarski wrote:
Drivers could leverage the fact that the VF BAR MMIO reservation is
created for total number of VFs supported by the device by resizing the
BAR to larger size when smaller number of VFs is enabled.
=20
Add a pci_iov_vf_bar_set_size() function to control the size and a
pci_iov_vf_bar_get_sizes() helper to get the VF BAR sizes that will
allow up to num_vfs to be successfully enabled with the current
underlying reservation size.
=20
Signed-off-by: Micha=C5=82 Winiarski <michal.winiarski@xxxxxxxxx>
---
drivers/pci/iov.c | 73 +++++++++++++++++++++++++++++++++++++++++++++
include/linux/pci.h | 6 ++++
2 files changed, 79 insertions(+)
=20
diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c
index f34173c70b32a..ac4375954c947 100644
--- a/drivers/pci/iov.c
+++ b/drivers/pci/iov.c
@@ -8,11 +8,15 @@
*/
=20
#include <linux/bitfield.h>
+#include <linux/bits.h>
+#include <linux/log2.h>
#include <linux/pci.h>
+#include <linux/sizes.h>
#include <linux/slab.h>
#include <linux/export.h>
#include <linux/string.h>
#include <linux/delay.h>
+#include <asm/div64.h>
#include "pci.h"
=20
#define VIRTFN_ID_LEN=0917=09/* "virtfn%u\0" for 2^32 - 1 */
@@ -1313,3 +1317,72 @@ int pci_sriov_configure_simple(struct pci_dev *dev=
, int nr_virtfn)
=09return nr_virtfn;
}
EXPORT_SYMBOL_GPL(pci_sriov_configure_simple);
+
+/**
+ * pci_iov_vf_bar_set_size - set a new size for a VF BAR
+ * @dev: the PCI device
+ * @resno: the resource number
+ * @size: new size as defined in the spec (0=3D1MB, 31=3D128TB)
+ *
+ * Set the new size of a VF BAR that supports VF resizable BAR capabilit=
y.
+ * Unlike pci_resize_resource(), this does not cause the resource that
+ * reserves the MMIO space (originally up to total_VFs) to be resized, w=
hich
+ * means that following calls to pci_enable_sriov() can fail if the reso=
urces
+ * no longer fit.
+ *
+ * Return: 0 on success, or negative on failure.
+ */
+int pci_iov_vf_bar_set_size(struct pci_dev *dev, int resno, int size)
+{
+=09u32 sizes;
+=09int ret;
+
+=09if (!pci_resource_is_iov(resno))
+=09=09return -EINVAL;
+
+=09if (pci_iov_is_memory_decoding_enabled(dev))
+=09=09return -EBUSY;
+
+=09sizes =3D pci_rebar_get_possible_sizes(dev, resno);
+=09if (!sizes)
+=09=09return -ENOTSUPP;
+
+=09if (!(sizes & BIT(size)))
+=09=09return -EINVAL;
+
+=09ret =3D pci_rebar_set_size(dev, resno, size);
+=09if (ret)
+=09=09return ret;
+
+=09pci_iov_resource_set_size(dev, resno, pci_rebar_size_to_bytes(size));
+
+=09return 0;
+}
+EXPORT_SYMBOL_GPL(pci_iov_vf_bar_set_size);
+
+/**
+ * pci_iov_vf_bar_get_sizes - get VF BAR sizes allowing to create up to =
num_vfs
+ * @dev: the PCI device
+ * @resno: the resource number
+ * @num_vfs: number of VFs
+ *
+ * Get the sizes of a VF resizable BAR that can accommodate @num_vfs wit=
hin
+ * the currently assigned size of the resource @resno.
+ *
+ * Return: A bitmask of sizes in format defined in the spec (bit 0=3D1MB=
,
+ * bit 31=3D128TB).
+ */
+u32 pci_iov_vf_bar_get_sizes(struct pci_dev *dev, int resno, int num_vfs=
)
+{
+=09u64 vf_len =3D pci_resource_len(dev, resno);
+=09u32 sizes;
+
+=09if (!num_vfs)
+=09=09return 0;
+
+=09do_div(vf_len, num_vfs);
+=09sizes =3D (roundup_pow_of_two(vf_len + 1) - 1) >> ilog2(SZ_1M);
+
+=09return sizes & pci_rebar_get_possible_sizes(dev, resno);
+}
+EXPORT_SYMBOL_GPL(pci_iov_vf_bar_get_sizes);
diff --git a/include/linux/pci.h b/include/linux/pci.h
index ab62bcb5f99c6..cc633b1a13d51 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -2437,6 +2437,8 @@ int pci_sriov_set_totalvfs(struct pci_dev *dev, u16=
numvfs);
int pci_sriov_get_totalvfs(struct pci_dev *dev);
int pci_sriov_configure_simple(struct pci_dev *dev, int nr_virtfn);
resource_size_t pci_iov_resource_size(struct pci_dev *dev, int resno);
+int pci_iov_vf_bar_set_size(struct pci_dev *dev, int resno, int size);
+u32 pci_iov_vf_bar_get_sizes(struct pci_dev *dev, int resno, int num_vfs=
);
void pci_vf_drivers_autoprobe(struct pci_dev *dev, bool probe);
=20
/* Arch may override these (weak) */
@@ -2489,6 +2491,10 @@ static inline int pci_sriov_get_totalvfs(struct pc=
i_dev *dev)
#define pci_sriov_configure_simple=09NULL
static inline resource_size_t pci_iov_resource_size(struct pci_dev *dev,=
int resno)
{ return 0; }
+static inline int pci_iov_vf_bar_set_size(struct pci_dev *dev, int resno=
, int size)
+{ return -ENODEV; }
+static inline u32 pci_iov_vf_bar_get_sizes(struct pci_dev *dev, int resn=
o, int num_vfs)
+{ return 0; }
static inline void pci_vf_drivers_autoprobe(struct pci_dev *dev, bool pr=
obe) { }
#endif
=20
=20
Reviewed-by: Ilpo J=C3=A4rvinen <ilpo.jarvinen@xxxxxxxxxxxxxxx>
--=20
i.
--8323328-318291348-1749039952=:979--
Return-Path: <linux-kernel+bounces-673190-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 0CB7D41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:26:51 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 0025E3A33EF
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:26:29 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 9C0BA28E61C;
Wed, 4 Jun 2025 12:26:46 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="GLoiQCw6"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 51E5B28E575;
Wed, 4 Jun 2025 12:26:28 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749039989; cv=none; b=qDEbQJ3kgvd8iniASPJVigR8rq7T15nv3Ug/W8xYR0md/3kt0n0rMUrdIYACRKuVPS3dpKeilLP/0/WfC6BAWoOiwQ6LCg3iDvIB6hGQD/egdrKoh2Dcq7m3YUHeDtthtntEprKnOuLOXoagKumZNB9Cq6DEMlHyihOWDA6rAgY=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749039989; c=relaxed/simple;
bh=0cUEW+0kP0oJbKDTcAo3DSxdi9HA4lXhR/Gyg6MipBI=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=HMn9I03OPywXGzw7s8t2moCLMwWq4r1999X4VdU94G+MaQ7S7GUFXP7zB4ybvrk/SblDOegYkE7PIyedYHlRoIEBj5559DioRE2/MqDlDIxxs8ZBEq7+GhT0WRL5t7+1V3yDt2ooXd8TzoAbFcLG3L51RIsCAC6LPVoUL5+Dv0I=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=GLoiQCw6; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id B6E2CC4CEE7;
Wed, 4 Jun 2025 12:26:28 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749039988;
bh=0cUEW+0kP0oJbKDTcAo3DSxdi9HA4lXhR/Gyg6MipBI=;
h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From;
b=GLoiQCw6rMzMsVAxtp+B0z1jwFZ2IoDZi8Y/WxERs/gzCSZxPtDYxjEq0srfiu9Hp
eBN2oaBzuxvqCif7LWz3szzAniE/xqELrDJyHWxa+KX7TnEWA23lcOqZmp6IhQkfvU
VX5ZWjn10NH+p9XzQJtA4yf7wR6WjIz7Zmz0EPiNLKg/nTdl49BZFQswVR2enRDg99
r66/j8G9gg2AmBg7V2HwHkNiI7gbTNjcWsnUG/HfF/CWTbDKadfQbFdlY2ertJI//r
DJqC7LI3sOiwBtYpChxydDIPz4qtQ5idHP/HY/Bf0I5b8GbH/tF+AW6muFNj7roE8W
Hu1knzusqo+7A==
Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000)
id 51AACCE0836; Wed, 4 Jun 2025 05:26:28 -0700 (PDT)
Date: Wed, 4 Jun 2025 05:26:28 -0700
From: "Paul E. McKenney" <paulmck@xxxxxxxxxx>
To: Xiongfeng Wang <wangxiongfeng2@xxxxxxxxxx>
Cc: Joel Fernandes <joelagnelf@xxxxxxxxxx>,
Joel Fernandes <joel@xxxxxxxxxxxxxxxxx>, ankur.a.arora@xxxxxxxxxx,
Frederic Weisbecker <frederic@xxxxxxxxxx>,
Boqun Feng <boqun.feng@xxxxxxxxx>, neeraj.upadhyay@xxxxxxxxxx,
urezki@xxxxxxxxx, rcu@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
xiqi2@xxxxxxxxxx, "Wangshaobo (bobo)" <bobo.shaobowang@xxxxxxxxxx>,
Xie XiuQi <xiexiuqi@xxxxxxxxxx>
Subject: Re: [QUESTION] problems report: rcu_read_unlock_special() called in
irq_exit() causes dead loop
Message-ID: <a963b475-72cd-474d-96d4-9e651fc8f857@paulmck-laptop>
Reply-To: paulmck@xxxxxxxxxx
References: <9acd5f9f-6732-7701-6880-4b51190aa070@xxxxxxxxxx>
<CAEXW_YRC=f6i3KOd_uhuH=xAOCG7mW7-LwtA4+_fc8FMjfRHeg@xxxxxxxxxxxxxx>
<3ce6f3ce-5dfb-8c59-cb7b-4619b70f8d25@xxxxxxxxxx>
<20250603185939.GA1109523@joelnvbox>
<066e8121-c6c5-48ac-b35a-e6430d986dff@xxxxxxxxxx>
<a82784fd-d51e-4ea2-9d5c-43db971a3074@xxxxxxxxxx>
<c448118b-9f7e-4c29-d6b3-a66e70f7163f@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <c448118b-9f7e-4c29-d6b3-a66e70f7163f@xxxxxxxxxx>
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 11:20:34AM +0800, Xiongfeng Wang wrote:
Hi Joel,
On 2025/6/4 3:22, Joel Fernandes wrote:
> On 6/3/2025 3:03 PM, Joel Fernandes wrote:
>> On 6/3/2025 2:59 PM, Joel Fernandes wrote:
>>> On Fri, May 30, 2025 at 09:55:45AM +0800, Xiongfeng Wang wrote:
>>>> Hi Joel,
>>>>
>>>> On 2025/5/29 0:30, Joel Fernandes wrote:
>>>>> On Wed, May 21, 2025 at 5:43 AM Xiongfeng Wang
>>>>> <wangxiongfeng2@xxxxxxxxxx> wrote:
>>>>>>
>>>>>> Hi RCU experts,
>>>>>>
>>>>>> When I ran syskaller in Linux 6.6 with CONFIG_PREEMPT_RCU enabled, I got
>>>>>> the following soft lockup. The Calltrace is too long. I put it in the end.
>>>>>> The issue can also be reproduced in the latest kernel.
>>>>>>
>>>>>> The issue is as follows. CPU3 is waiting for a spin_lock, which is got by CPU1.
>>>>>> But CPU1 stuck in the following dead loop.
>>>>>>
>>>>>> irq_exit()
>>>>>> __irq_exit_rcu()
>>>>>> /* in_hardirq() returns false after this */
>>>>>> preempt_count_sub(HARDIRQ_OFFSET)
>>>>>> tick_irq_exit()
>>>>>> tick_nohz_irq_exit()
>>>>>> tick_nohz_stop_sched_tick()
>>>>>> trace_tick_stop() /* a bpf prog is hooked on this trace point */
>>>>>> __bpf_trace_tick_stop()
>>>>>> bpf_trace_run2()
>>>>>> rcu_read_unlock_special()
>>>>>> /* will send a IPI to itself */
>>>>>> irq_work_queue_on(&rdp->defer_qs_iw, rdp->cpu);
>>>>>>
>>>>>> /* after interrupt is enabled again, the irq_work is called */
>>>>>> asm_sysvec_irq_work()
>>>>>> sysvec_irq_work()
>>>>>> irq_exit() /* after handled the irq_work, we again enter into irq_exit() */
>>>>>> __irq_exit_rcu()
>>>>>> ...skip...
>>>>>> /* we queue a irq_work again, and enter a dead loop */
>>>>>> irq_work_queue_on(&rdp->defer_qs_iw, rdp->cpu);
>>>>>
>>>>> This seems legitimate, Boqun and I were just talking about it. He may
>>>>> share more thoughts but here are a few:
>>>>>
>>>>> Maybe we can delay subsequent clearing of the flag in
>>>>> rcu_preempt_deferred_qs_handler() using a timer and an exponential
>>>>> back-off? That way we are not sending too many self-IPIs.
>>>>>
>>>>> And reset the process at the end of a grace period.
>>>>>
>>>>> Or just don't send subsequent self-IPIs if we just sent one for the
>>>>> rdp. Chances are, if we did not get the scheduler's attention during
>>>>> the first one, we may not in subsequent ones I think. Plus we do send
>>>>> other IPIs already if the grace period was over extended (from the FQS
>>>>> loop), maybe we can tweak that?
>>>>
>>>> Thanks a lot for your reply. I think it's hard for me to fix this issue as
>>>> above without introducing new bugs. I barely understand the RCU code. But I'm
>>>> very glad to help test if you have any code modifiction need to. I have
>>>> the VM and the syskaller benchmark which can reproduce the problem.
>>>
>>> Sure, I understand. This is already incredibly valuable so thank you again.
>>> Will request for your testing help soon. I also have a test module now which
>>> can sort-off reproduce this. Keep you posted!
>>
>> Oh sorry I meant to ask - could you provide the full kernel log and also is
>> there a standalone reproducer syzcaller binary one can run to reproduce it in a VM?
Sorry, I communicate with the teams who maintain the syzkaller tools. He said
I can't send the syskaller binary out of the company. Sorry, but I can help to
reproduce. It's not complicate and not time consuming.
I found the origin log which use kernel v6.6. But it's not complete.
Then I reprouce the problem using the latest kernel.
Both logs are attached as attachments.
Looking at both the v6.6 version and Joel's fix, I am forced to conclude
that this bug has been there for a very long time. Thank you for your
testing efforts and Joel for the fix!
Thanx, Paul
> Sorry for the noise, but please provide the full .config as well. I am curious
> if you have CONFIG_RCU_STRICT_GRACE_PERIOD. Since that has an effect on
> rcu_read_unlock_special().
.config is also attached. CONFIG_RCU_STRICT_GRACE_PERIOD is not set.
Thanks,
Xiongfeng
>
> Thanks!
>
> - Joel
>
> .
>
[ 0.000000][ T0] Linux version 6.15.0-rc7 (root@localhost.localdomain) (gcc (GCC) 10.3.1, GNU ld (GNU Binutils) 2.37) #9 SMP PREEMPT_DYNAMIC Wed Jun 4 18:04:00 CST 2025
[ 0.000000][ T0] Command line: console=ttyS0 root=/dev/vda rw rootfstype=ext4 nohz_full=2 earlycon=pl011,0x9000000 watchdog_thresh=50 mpam=acpi kernelcore=reliable clear_freelist hugetlb_free_vmemmap=on hugevm earlyconalloc=on cgroup1_writeback hardlockup_panic=1 softlockup_panic=1 nmi_watchdog=1 psi_v1=1 enable_dmips_measure sysctl.net.core.netdev_unregister_timeout_secs=300 watchdog_thresh=50 selinux=0 panic_on_warn
[ 0.000000][ T0] BIOS-provided physical RAM map:
[ 0.000000][ T0] BIOS-e820: [mem 0x0000000000000000-0x000000000009ffff] usable
[ 0.000000][ T0] BIOS-e820: [mem 0x0000000000100000-0x00000000007fffff] usable
[ 0.000000][ T0] BIOS-e820: [mem 0x0000000000800000-0x0000000000807fff] ACPI NVS
[ 0.000000][ T0] BIOS-e820: [mem 0x0000000000808000-0x000000000080ffff] usable
[ 0.000000][ T0] BIOS-e820: [mem 0x0000000000810000-0x00000000008fffff] ACPI NVS
[ 0.000000][ T0] BIOS-e820: [mem 0x0000000000900000-0x00000000be8c2fff] usable
[ 0.000000][ T0] BIOS-e820: [mem 0x00000000be8c3000-0x00000000be8c3fff] ACPI data
[ 0.000000][ T0] BIOS-e820: [mem 0x00000000be8c4000-0x00000000be8cffff] usable
[ 0.000000][ T0] BIOS-e820: [mem 0x00000000be8d0000-0x00000000be8d0fff] ACPI data
[ 0.000000][ T0] BIOS-e820: [mem 0x00000000be8d1000-0x00000000be8d4fff] ACPI NVS
[ 0.000000][ T0] BIOS-e820: [mem 0x00000000be8d5000-0x00000000be8d7fff] ACPI data
[ 0.000000][ T0] BIOS-e820: [mem 0x00000000be8d8000-0x00000000be8dffff] ACPI NVS
[ 0.000000][ T0] BIOS-e820: [mem 0x00000000be8e0000-0x00000000be8f8fff] reserved
[ 0.000000][ T0] BIOS-e820: [mem 0x00000000be8f9000-0x00000000be9ecfff] usable
[ 0.000000][ T0] BIOS-e820: [mem 0x00000000be9ed000-0x00000000beb1afff] reserved
[ 0.000000][ T0] BIOS-e820: [mem 0x00000000beb1b000-0x00000000bfb9afff] usable
[ 0.000000][ T0] BIOS-e820: [mem 0x00000000bfb9b000-0x00000000bfbf2fff] reserved
[ 0.000000][ T0] BIOS-e820: [mem 0x00000000bfbf3000-0x00000000bfbfafff] ACPI data
[ 0.000000][ T0] BIOS-e820: [mem 0x00000000bfbfb000-0x00000000bfbfefff] ACPI NVS
[ 0.000000][ T0] BIOS-e820: [mem 0x00000000bfbff000-0x00000000bff3ffff] usable
[ 0.000000][ T0] BIOS-e820: [mem 0x00000000bff40000-0x00000000bff5ffff] reserved
[ 0.000000][ T0] BIOS-e820: [mem 0x00000000bff60000-0x00000000bfffffff] ACPI NVS
[ 0.000000][ T0] BIOS-e820: [mem 0x0000000100000000-0x000000013fffffff] usable
[ 0.000000][ T0] NX (Execute Disable) protection: active
[ 0.000000][ T0] APIC: Static calls initialized
[ 0.000000][ T0] efi: EFI v2.7 by EDK II
[ 0.000000][ T0] efi: SMBIOS=0xbfbce000 SMBIOS 3.0=0xbfbcc000 ACPI=0xbfbfa000 ACPI 2.0=0xbfbfa014 MEMATTR=0xbf228098
[ 0.000000][ T0] SMBIOS 3.0.0 present.
[ 0.000000][ T0] DMI: QEMU Ubuntu 24.04 PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015
[ 0.000000][ T0] DMI: Memory slots populated: 1/1
[ 0.000000][ T0] Hypervisor detected: KVM
[ 0.000000][ T0] kvm-clock: Using msrs 4b564d01 and 4b564d00
[ 0.000002][ T0] kvm-clock: using sched offset of 3369787381 cycles
[ 0.000011][ T0] clocksource: kvm-clock: mask: 0xffffffffffffffff max_cycles: 0x1cd42e4dffb, max_idle_ns: 881590591483 ns
[ 0.000027][ T0] tsc: Detected 2294.608 MHz processor
[ 0.000291][ T0] last_pfn = 0x140000 max_arch_pfn = 0x10000000000
[ 0.000371][ T0] MTRR map: 4 entries (2 fixed + 2 variable; max 18), built from 8 variable MTRRs
[ 0.000386][ T0] x86/PAT: Configuration [0-7]: WB WC UC- UC WB WP UC- WT
[ 0.000478][ T0] last_pfn = 0xbff40 max_arch_pfn = 0x10000000000
[ 0.021610][ T0] Using GB pages for direct mapping
[ 0.042117][ T0] Secure boot disabled
[ 0.042124][ T0] ACPI: Early table checksum verification disabled
[ 0.042134][ T0] ACPI: RSDP 0x00000000BFBFA014 000024 (v02 BOCHS )
[ 0.042155][ T0] ACPI: XSDT 0x00000000BFBF90E8 00005C (v01 BOCHS BXPC 00000001 01000013)
[ 0.042183][ T0] ACPI: FACP 0x00000000BFBF5000 000074 (v01 BOCHS BXPC 00000001 BXPC 00000001)
[ 0.042215][ T0] ACPI: DSDT 0x00000000BFBF6000 002024 (v01 BOCHS BXPC 00000001 BXPC 00000001)
[ 0.042249][ T0] ACPI: FACS 0x00000000BFBFD000 000040
[ 0.042268][ T0] ACPI: APIC 0x00000000BFBF4000 000090 (v03 BOCHS BXPC 00000001 BXPC 00000001)
[ 0.042293][ T0] ACPI: HPET 0x00000000BFBF3000 000038 (v01 BOCHS BXPC 00000001 BXPC 00000001)
[ 0.042318][ T0] ACPI: SRAT 0x00000000BE8D7000 000110 (v01 BOCHS BXPC 00000001 BXPC 00000001)
[ 0.042343][ T0] ACPI: HMAT 0x00000000BE8D6000 000050 (v02 BOCHS BXPC 00000001 BXPC 00000001)
[ 0.042368][ T0] ACPI: WAET 0x00000000BE8D5000 000028 (v01 BOCHS BXPC 00000001 BXPC 00000001)
[ 0.042393][ T0] ACPI: BGRT 0x00000000BE8D0000 000038 (v01 INTEL EDK2 00000002 01000013)
[ 0.042415][ T0] ACPI: Reserving FACP table memory at [mem 0xbfbf5000-0xbfbf5073]
[ 0.042425][ T0] ACPI: Reserving DSDT table memory at [mem 0xbfbf6000-0xbfbf8023]
[ 0.042434][ T0] ACPI: Reserving FACS table memory at [mem 0xbfbfd000-0xbfbfd03f]
[ 0.042442][ T0] ACPI: Reserving APIC table memory at [mem 0xbfbf4000-0xbfbf408f]
[ 0.042451][ T0] ACPI: Reserving HPET table memory at [mem 0xbfbf3000-0xbfbf3037]
[ 0.042460][ T0] ACPI: Reserving SRAT table memory at [mem 0xbe8d7000-0xbe8d710f]
[ 0.042469][ T0] ACPI: Reserving HMAT table memory at [mem 0xbe8d6000-0xbe8d604f]
[ 0.042478][ T0] ACPI: Reserving WAET table memory at [mem 0xbe8d5000-0xbe8d5027]
[ 0.042486][ T0] ACPI: Reserving BGRT table memory at [mem 0xbe8d0000-0xbe8d0037]
[ 0.042774][ T0] ACPI: SRAT: Node 0 PXM 0 [mem 0x00000000-0x0009ffff]
[ 0.042786][ T0] ACPI: SRAT: Node 0 PXM 0 [mem 0x00100000-0xbfffffff]
[ 0.042798][ T0] ACPI: SRAT: Node 0 PXM 0 [mem 0x100000000-0x13fffffff]
[ 0.042809][ T0] ACPI: SRAT: Node 0 PXM 0 [mem 0x140000000-0x11ffffffff] hotplug
[ 0.042840][ T0] NUMA: Node 0 [mem 0x00001000-0x0009ffff] + [mem 0x00100000-0xbfffffff] -> [mem 0x00001000-0xbfffffff]
[ 0.042857][ T0] NUMA: Node 0 [mem 0x00001000-0xbfffffff] + [mem 0x100000000-0x13fffffff] -> [mem 0x00001000-0x13fffffff]
[ 0.042939][ T0] NODE_DATA(0) allocated [mem 0x13ffd5280-0x13fffffff]
[ 0.044263][ T0] Zone ranges:
[ 0.044268][ T0] DMA [mem 0x0000000000001000-0x0000000000ffffff]
[ 0.044281][ T0] DMA32 [mem 0x0000000001000000-0x00000000ffffffff]
[ 0.044291][ T0] Normal [mem 0x0000000100000000-0x000000013fffffff]
[ 0.044302][ T0] Device empty
[ 0.044308][ T0] Movable zone start for each node
[ 0.044330][ T0] Early memory node ranges
[ 0.044334][ T0] node 0: [mem 0x0000000000001000-0x000000000009ffff]
[ 0.044344][ T0] node 0: [mem 0x0000000000100000-0x00000000007fffff]
[ 0.044352][ T0] node 0: [mem 0x0000000000808000-0x000000000080ffff]
[ 0.044361][ T0] node 0: [mem 0x0000000000900000-0x00000000be8c2fff]
[ 0.044371][ T0] node 0: [mem 0x00000000be8c4000-0x00000000be8cffff]
[ 0.044379][ T0] node 0: [mem 0x00000000be8f9000-0x00000000be9ecfff]
[ 0.044388][ T0] node 0: [mem 0x00000000beb1b000-0x00000000bfb9afff]
[ 0.044396][ T0] node 0: [mem 0x00000000bfbff000-0x00000000bff3ffff]
[ 0.044405][ T0] node 0: [mem 0x0000000100000000-0x000000013fffffff]
[ 0.044415][ T0] Initmem setup node 0 [mem 0x0000000000001000-0x000000013fffffff]
[ 0.044840][ T0] On node 0, zone DMA: 1 pages in unavailable ranges
[ 0.044998][ T0] On node 0, zone DMA: 96 pages in unavailable ranges
[ 0.045009][ T0] On node 0, zone DMA: 8 pages in unavailable ranges
[ 0.045180][ T0] On node 0, zone DMA: 240 pages in unavailable ranges
[ 0.111525][ T0] On node 0, zone DMA32: 1 pages in unavailable ranges
[ 0.111563][ T0] On node 0, zone DMA32: 41 pages in unavailable ranges
[ 0.111917][ T0] On node 0, zone DMA32: 302 pages in unavailable ranges
[ 0.111999][ T0] On node 0, zone DMA32: 100 pages in unavailable ranges
[ 0.115749][ T0] On node 0, zone Normal: 192 pages in unavailable ranges
[ 0.270439][ T0] kasan: KernelAddressSanitizer initialized
[ 0.270908][ T0] ACPI: PM-Timer IO Port: 0xb008
[ 0.270956][ T0] ACPI: LAPIC_NMI (acpi_id[0xff] dfl dfl lint[0x1])
[ 0.271013][ T0] IOAPIC[0]: apic_id 0, version 17, address 0xfec00000, GSI 0-23
[ 0.271032][ T0] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[ 0.271043][ T0] ACPI: INT_SRC_OVR (bus 0 bus_irq 5 global_irq 5 high level)
[ 0.271054][ T0] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[ 0.271064][ T0] ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 high level)
[ 0.271075][ T0] ACPI: INT_SRC_OVR (bus 0 bus_irq 11 global_irq 11 high level)
[ 0.271102][ T0] ACPI: Using ACPI (MADT) for SMP configuration information
[ 0.271108][ T0] ACPI: HPET id: 0x8086a201 base: 0xfed00000
[ 0.271205][ T0] TSC deadline timer available
[ 0.271229][ T0] CPU topo: Max. logical packages: 1
[ 0.271235][ T0] CPU topo: Max. logical dies: 1
[ 0.271240][ T0] CPU topo: Max. dies per package: 1
[ 0.271255][ T0] CPU topo: Max. threads per core: 1
[ 0.271260][ T0] CPU topo: Num. cores per package: 4
[ 0.271266][ T0] CPU topo: Num. threads per package: 4
[ 0.271271][ T0] CPU topo: Allowing 4 present CPUs plus 0 hotplug CPUs
[ 0.271318][ T0] kvm-guest: APIC: eoi() replaced with kvm_guest_apic_eoi_write()
[ 0.271355][ T0] kvm-guest: KVM setup pv remote TLB flush
[ 0.271366][ T0] kvm-guest: setup PV sched yield
[ 0.271544][ T0] PM: hibernation: Registered nosave memory: [mem 0x00000000-0x00000fff]
[ 0.271562][ T0] PM: hibernation: Registered nosave memory: [mem 0x000a0000-0x000fffff]
[ 0.271580][ T0] PM: hibernation: Registered nosave memory: [mem 0x00800000-0x00807fff]
[ 0.271599][ T0] PM: hibernation: Registered nosave memory: [mem 0x00810000-0x008fffff]
[ 0.271617][ T0] PM: hibernation: Registered nosave memory: [mem 0xbe8c3000-0xbe8c3fff]
[ 0.271636][ T0] PM: hibernation: Registered nosave memory: [mem 0xbe8d0000-0xbe8f8fff]
[ 0.271655][ T0] PM: hibernation: Registered nosave memory: [mem 0xbe9ed000-0xbeb1afff]
[ 0.271674][ T0] PM: hibernation: Registered nosave memory: [mem 0xbf203000-0xbf20bfff]
[ 0.271693][ T0] PM: hibernation: Registered nosave memory: [mem 0xbfb9b000-0xbfbfefff]
[ 0.271713][ T0] PM: hibernation: Registered nosave memory: [mem 0xbff40000-0xffffffff]
[ 0.271724][ T0] [mem 0xc0000000-0xffffffff] available for PCI devices
[ 0.271733][ T0] Booting paravirtualized kernel on KVM
[ 0.271739][ T0] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1910969940391419 ns
[ 0.342656][ T0] setup_percpu: NR_CPUS:8192 nr_cpumask_bits:4 nr_cpu_ids:4 nr_node_ids:1
[ 0.343471][ T0] percpu: Embedded 77 pages/cpu s278528 r8192 d28672 u524288
[ 0.343796][ T0] Kernel command line: console=ttyS0 root=/dev/vda rw rootfstype=ext4 nohz_full=2 earlycon=pl011,0x9000000 watchdog_thresh=50 mpam=acpi kernelcore=reliable clear_freelist hugetlb_free_vmemmap=on hugevm earlyconalloc=on cgroup1_writeback hardlockup_panic=1 softlockup_panic=1 nmi_watchdog=1 psi_v1=1 enable_dmips_measure sysctl.net.core.netdev_unregister_timeout_secs=300 watchdog_thresh=50 selinux=0 panic_on_warn
[ 0.349175][ T0] Booting kernel: `' invalid for parameter `panic_on_warn'
[ 0.349208][ T0] Unknown kernel command line parameters "clear_freelist hugevm cgroup1_writeback enable_dmips_measure mpam=acpi earlyconalloc=on hardlockup_panic=1 psi_v1=1", will be passed to user space.
[ 0.349244][ T0] random: crng init done
[ 0.349249][ T0] printk: log buffer data + meta data: 1048576 + 3670016 = 4718592 bytes
[ 0.350455][ T0] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes, linear)
[ 0.350745][ T0] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[ 0.352005][ T0] software IO TLB: area num 4.
[ 0.379482][ T0] Fallback order for Node 0: 0
[ 0.379503][ T0] Built 1 zonelists, mobility grouping on. Total pages: 1047595
[ 0.379512][ T0] Policy zone: Normal
[ 0.379519][ T0] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.379526][ T0] stackdepot: allocating hash table via alloc_large_system_hash
[ 0.379556][ T0] stackdepot hash table entries: 1048576 (order: 12, 16777216 bytes, linear)
[ 0.464645][ T0] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.550772][ T0] ftrace: allocating 155151 entries in 608 pages
[ 0.550785][ T0] ftrace: allocated 608 pages with 3 groups
[ 0.556173][ T0] Dynamic Preempt: none
[ 0.558241][ T0] rcu: Preemptible hierarchical RCU implementation.
[ 0.558247][ T0] rcu: RCU restricting CPUs from NR_CPUS=8192 to nr_cpu_ids=4.
[ 0.558257][ T0] Trampoline variant of Tasks RCU enabled.
[ 0.558262][ T0] Rude variant of Tasks RCU enabled.
[ 0.558265][ T0] Tracing variant of Tasks RCU enabled.
[ 0.558270][ T0] rcu: RCU calculated value of scheduler-enlistment delay is 100 jiffies.
[ 0.558276][ T0] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[ 0.558397][ T0] RCU Tasks: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=4.
[ 0.558417][ T0] RCU Tasks Rude: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=4.
[ 0.558436][ T0] RCU Tasks Trace: Setting shift to 2 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=4.
[ 0.706069][ T0] NR_IRQS: 524544, nr_irqs: 456, preallocated irqs: 16
[ 0.707498][ T0] NO_HZ: Full dynticks CPUs: 2.
[ 0.707517][ T0] rcu: Offload RCU callbacks from CPUs: 2.
[ 0.707526][ T0] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[ 0.708184][ T0] Console: colour dummy device 80x25
[ 0.708291][ T0] printk: legacy console [ttyS0] enabled
[ 0.895794][ T0] ACPI: Core revision 20240827
[ 0.897721][ T0] clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604467 ns
[ 0.899323][ T0] APIC: Switch to symmetric I/O mode setup
[ 0.900527][ T0] x2apic enabled
[ 0.901529][ T0] APIC: Switched APIC routing to: physical x2apic
[ 0.902553][ T0] kvm-guest: APIC: send_IPI_mask() replaced with kvm_send_ipi_mask()
[ 0.903769][ T0] kvm-guest: APIC: send_IPI_mask_allbutself() replaced with kvm_send_ipi_mask_allbutself()
[ 0.905232][ T0] kvm-guest: setup PV IPIs
[ 0.908156][ T0] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[ 0.909260][ T0] clocksource: tsc-early: mask: 0xffffffffffffffff max_cycles: 0x21134f58f0d, max_idle_ns: 440795217993 ns
[ 0.911004][ T0] Calibrating delay loop (skipped) preset value.. 4589.21 BogoMIPS (lpj=2294608)
[ 0.912249][ T0] x86/cpu: User Mode Instruction Prevention (UMIP) activated
[ 0.913224][ T0] Last level iTLB entries: 4KB 0, 2MB 0, 4MB 0
[ 0.913999][ T0] Last level dTLB entries: 4KB 0, 2MB 0, 4MB 0, 1GB 0
[ 0.915039][ T0] Spectre V1 : Mitigation: usercopy/swapgs barriers and __user pointer sanitization
[ 0.916022][ T0] Spectre V2 : WARNING: Unprivileged eBPF is enabled with eIBRS on, data leaks possible via Spectre v2 BHB attacks!
[ 0.917002][ T0] Spectre V2 : Spectre BHI mitigation: SW BHB clearing on syscall and VM exit
[ 0.917998][ T0] Spectre V2 : Mitigation: Enhanced / Automatic IBRS
[ 0.918998][ T0] Spectre V2 : Spectre v2 / PBRSB-eIBRS: Retire a single CALL on VMEXIT
[ 0.920016][ T0] Spectre V2 : mitigation: Enabling conditional Indirect Branch Prediction Barrier
[ 0.921024][ T0] Speculative Store Bypass: Mitigation: Speculative Store Bypass disabled via prctl
[ 0.922017][ T0] TAA: Mitigation: TSX disabled
[ 0.922998][ T0] MMIO Stale Data: Mitigation: Clear CPU buffers
[ 0.924003][ T0] ITS: Mitigation: Aligned branch/return thunks
[ 0.925038][ T0] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.925998][ T0] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[ 0.926998][ T0] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[ 0.927998][ T0] x86/fpu: Supporting XSAVE feature 0x020: 'AVX-512 opmask'
[ 0.928998][ T0] x86/fpu: Supporting XSAVE feature 0x040: 'AVX-512 Hi256'
[ 0.929998][ T0] x86/fpu: Supporting XSAVE feature 0x080: 'AVX-512 ZMM_Hi256'
[ 0.930998][ T0] x86/fpu: Supporting XSAVE feature 0x200: 'Protection Keys User registers'
[ 0.931999][ T0] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
[ 0.932998][ T0] x86/fpu: xstate_offset[5]: 832, xstate_sizes[5]: 64
[ 0.933998][ T0] x86/fpu: xstate_offset[6]: 896, xstate_sizes[6]: 512
[ 0.934998][ T0] x86/fpu: xstate_offset[7]: 1408, xstate_sizes[7]: 1024
[ 0.935998][ T0] x86/fpu: xstate_offset[9]: 2432, xstate_sizes[9]: 8
[ 0.936998][ T0] x86/fpu: Enabled xstate features 0x2e7, context size is 2440 bytes, using 'compacted' format.
[ 1.185798][ T0] Freeing SMP alternatives memory: 104K
[ 1.186004][ T0] pid_max: default: 32768 minimum: 301
[ 1.191319][ T0] LSM: initializing lsm=lockdown,capability,yama,apparmor,bpf,ima,evm
[ 1.192174][ T0] Yama: becoming mindful.
[ 1.194123][ T0] AppArmor: AppArmor initialized
[ 1.195542][ T0] LSM support for eBPF active
[ 1.197205][ T0] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[ 1.198015][ T0] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[ 1.203532][ T1] smpboot: CPU0: Intel(R) Xeon(R) Platinum 8380 CPU @ 2.30GHz (family: 0x6, model: 0x6a, stepping: 0x6)
[ 1.205408][ T1] Performance Events: PEBS fmt4+, Icelake events, 32-deep LBR, full-width counters, Intel PMU driver.
[ 1.206006][ T1] ... version: 2
[ 1.206699][ T1] ... bit width: 48
[ 1.207000][ T1] ... generic registers: 8
[ 1.207689][ T1] ... value mask: 0000ffffffffffff
[ 1.208000][ T1] ... max period: 00007fffffffffff
[ 1.208871][ T1] ... fixed-purpose events: 3
[ 1.209000][ T1] ... event mask: 00000007000000ff
[ 1.210344][ T1] signal: max sigframe size: 3632
[ 1.211207][ T1] rcu: Hierarchical SRCU implementation.
[ 1.212001][ T1] rcu: Max phase no-delay instances is 400.
[ 1.213562][ T1] Timer migration: 1 hierarchy levels; 8 children per group; 1 crossnode level
[ 1.241131][ T1] watchdog: Disabling watchdog on nohz_full cores by default
[ 1.242539][ T9] NMI watchdog: Enabled. Permanently consumes one hw-PMU counter.
[ 1.243500][ T1] smp: Bringing up secondary CPUs ...
[ 1.245144][ T1] smpboot: x86: Booting SMP configuration:
[ 1.245988][ T1] .... node #0, CPUs: #1 #2 #3
[ 1.254595][ T1] smp: Brought up 1 node, 4 CPUs
[ 1.255706][ T1] smpboot: Total of 4 processors activated (18356.86 BogoMIPS)
[ 1.259077][ T45] node 0 deferred pages initialised in 0ms
[ 1.263168][ T1] Memory: 3148068K/4190380K available (152506K kernel code, 32460K rwdata, 55912K rodata, 26564K init, 10536K bss, 1024988K reserved, 0K cma-reserved)
[ 1.267119][ T1] devtmpfs: initialized
[ 1.272981][ T1] x86/mm: Memory block size: 128MB
[ 1.330158][ T1] ACPI: PM: Registering ACPI NVS region [mem 0x00800000-0x00807fff] (32768 bytes)
[ 1.331088][ T1] ACPI: PM: Registering ACPI NVS region [mem 0x00810000-0x008fffff] (983040 bytes)
[ 1.334594][ T1] ACPI: PM: Registering ACPI NVS region [mem 0xbe8d1000-0xbe8d4fff] (16384 bytes)
[ 1.336035][ T1] ACPI: PM: Registering ACPI NVS region [mem 0xbe8d8000-0xbe8dffff] (32768 bytes)
[ 1.337063][ T1] ACPI: PM: Registering ACPI NVS region [mem 0xbfbfb000-0xbfbfefff] (16384 bytes)
[ 1.339037][ T1] ACPI: PM: Registering ACPI NVS region [mem 0xbff60000-0xbfffffff] (655360 bytes)
[ 1.343126][ T1] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns
[ 1.345021][ T1] posixtimers hash table entries: 2048 (order: 3, 32768 bytes, linear)
[ 1.346055][ T1] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[ 1.348120][ T1] pinctrl core: initialized pinctrl subsystem
[ 1.354833][ T1] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[ 1.363244][ T1] DMA: preallocated 512 KiB GFP_KERNEL pool for atomic allocations
[ 1.365100][ T1] DMA: preallocated 512 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[ 1.366100][ T1] DMA: preallocated 512 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[ 1.368207][ T1] audit: initializing netlink subsys (disabled)
[ 1.370235][ T51] audit: type=2000 audit(1749005465.695:1): state=initialized audit_enabled=0 res=1
[ 1.371993][ T1] thermal_sys: Registered thermal governor 'fair_share'
[ 1.371993][ T1] thermal_sys: Registered thermal governor 'bang_bang'
[ 1.371993][ T1] thermal_sys: Registered thermal governor 'step_wise'
[ 1.371993][ T1] thermal_sys: Registered thermal governor 'user_space'
[ 1.375122][ T1] cpuidle: using governor menu
[ 1.382462][ T1] acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5
[ 1.387225][ T1] dca service started, version 1.12.1
[ 1.389250][ T1] PCI: Using configuration type 1 for base access
[ 1.398521][ T1] kprobes: kprobe jump-optimization is enabled. All kprobes are optimized if possible.
[ 1.404292][ T1] HugeTLB: allocation took 0ms with hugepage_allocation_threads=1
[ 1.406049][ T1] HugeTLB: registered 1.00 GiB page size, pre-allocated 0 pages
[ 1.408008][ T1] HugeTLB: 16380 KiB vmemmap can be freed for a 1.00 GiB page
[ 1.410015][ T1] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages
[ 1.411004][ T1] HugeTLB: 28 KiB vmemmap can be freed for a 2.00 MiB page
[ 1.428270][ T1] cryptd: max_cpu_qlen set to 1000
[ 1.449987][ T1] raid6: avx512x4 gen() 8890 MB/s
[ 1.467221][ T1] raid6: avx512x2 gen() 6086 MB/s
[ 1.486305][ T1] raid6: avx512x1 gen() 3591 MB/s
[ 1.504910][ T1] raid6: avx2x4 gen() 9335 MB/s
[ 1.521672][ T1] raid6: avx2x2 gen() 7820 MB/s
[ 1.538745][ T1] raid6: avx2x1 gen() 4428 MB/s
[ 1.539001][ T1] raid6: using algorithm avx2x4 gen() 9335 MB/s
[ 1.556983][ T1] raid6: .... xor() 6118 MB/s, rmw enabled
[ 1.557862][ T1] raid6: using avx512x2 recovery algorithm
[ 1.560097][ T1] ACPI: Added _OSI(Module Device)
[ 1.560862][ T1] ACPI: Added _OSI(Processor Device)
[ 1.562002][ T1] ACPI: Added _OSI(3.0 _SCP Extensions)
[ 1.562834][ T1] ACPI: Added _OSI(Processor Aggregator Device)
[ 1.642663][ T1] ACPI: 1 ACPI AML tables successfully acquired and loaded
[ 1.663784][ T1] ACPI: Interpreter enabled
[ 1.664289][ T1] ACPI: PM: (supports S0 S3 S4 S5)
[ 1.665002][ T1] ACPI: Using IOAPIC for interrupt routing
[ 1.666098][ T1] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[ 1.667002][ T1] PCI: Using E820 reservations for host bridge windows
[ 1.672468][ T1] ACPI: Enabled 3 GPEs in block 00 to 0F
[ 1.820574][ T1] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
[ 1.821057][ T1] acpi PNP0A03:00: _OSC: OS supports [ASPM ClockPM Segments MSI HPX-Type3]
[ 1.823007][ T1] acpi PNP0A03:00: _OSC: not requesting OS control; OS requires [ExtendedConfig ASPM ClockPM MSI]
[ 1.824496][ T1] acpi PNP0A03:00: fail to add MMCONFIG information, can't access extended configuration space under this bridge
[ 1.839665][ T1] acpiphp: Slot [3] registered
[ 1.840424][ T1] acpiphp: Slot [4] registered
[ 1.841426][ T1] acpiphp: Slot [5] registered
[ 1.842414][ T1] acpiphp: Slot [6] registered
[ 1.843422][ T1] acpiphp: Slot [7] registered
[ 1.844417][ T1] acpiphp: Slot [8] registered
[ 1.846417][ T1] acpiphp: Slot [9] registered
[ 1.847422][ T1] acpiphp: Slot [10] registered
[ 1.848840][ T1] acpiphp: Slot [11] registered
[ 1.849435][ T1] acpiphp: Slot [12] registered
[ 1.850414][ T1] acpiphp: Slot [13] registered
[ 1.852421][ T1] acpiphp: Slot [14] registered
[ 1.853426][ T1] acpiphp: Slot [15] registered
[ 1.854428][ T1] acpiphp: Slot [16] registered
[ 1.855430][ T1] acpiphp: Slot [17] registered
[ 1.856410][ T1] acpiphp: Slot [18] registered
[ 1.857416][ T1] acpiphp: Slot [19] registered
[ 1.858413][ T1] acpiphp: Slot [20] registered
[ 1.859413][ T1] acpiphp: Slot [21] registered
[ 1.860419][ T1] acpiphp: Slot [22] registered
[ 1.861428][ T1] acpiphp: Slot [23] registered
[ 1.863420][ T1] acpiphp: Slot [24] registered
[ 1.864410][ T1] acpiphp: Slot [25] registered
[ 1.865413][ T1] acpiphp: Slot [26] registered
[ 1.866414][ T1] acpiphp: Slot [27] registered
[ 1.867413][ T1] acpiphp: Slot [28] registered
[ 1.868416][ T1] acpiphp: Slot [29] registered
[ 1.869427][ T1] acpiphp: Slot [30] registered
[ 1.870422][ T1] acpiphp: Slot [31] registered
[ 1.871235][ T1] PCI host bridge to bus 0000:00
[ 1.872189][ T1] pci_bus 0000:00: root bus resource [io 0x0000-0x0cf7 window]
[ 1.873015][ T1] pci_bus 0000:00: root bus resource [io 0x0d00-0xffff window]
[ 1.875014][ T1] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window]
[ 1.876013][ T1] pci_bus 0000:00: root bus resource [mem 0xc0000000-0xfebfffff window]
[ 1.877013][ T1] pci_bus 0000:00: root bus resource [mem 0x1800000000-0x187fffffff window]
[ 1.878015][ T1] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 1.879055][ T1] pci 0000:00:00.0: [8086:1237] type 00 class 0x060000 conventional PCI endpoint
[ 1.883199][ T1] pci 0000:00:01.0: [8086:7000] type 00 class 0x060100 conventional PCI endpoint
[ 1.888113][ T1] pci 0000:00:01.1: [8086:7010] type 00 class 0x010180 conventional PCI endpoint
[ 1.889809][ T1] pci 0000:00:01.1: BAR 4 [io 0xc0c0-0xc0cf]
[ 1.891045][ T1] pci 0000:00:01.1: BAR 0 [io 0x01f0-0x01f7]: legacy IDE quirk
[ 1.892001][ T1] pci 0000:00:01.1: BAR 1 [io 0x03f6]: legacy IDE quirk
[ 1.893001][ T1] pci 0000:00:01.1: BAR 2 [io 0x0170-0x0177]: legacy IDE quirk
[ 1.894002][ T1] pci 0000:00:01.1: BAR 3 [io 0x0376]: legacy IDE quirk
[ 1.897828][ T1] pci 0000:00:01.3: [8086:7113] type 00 class 0x068000 conventional PCI endpoint
[ 1.899501][ T1] pci 0000:00:01.3: quirk: [io 0xb000-0xb03f] claimed by PIIX4 ACPI
[ 1.901012][ T1] pci 0000:00:01.3: quirk: [io 0xb100-0xb10f] claimed by PIIX4 SMB
[ 1.904694][ T1] pci 0000:00:02.0: [1234:1111] type 00 class 0x030000 conventional PCI endpoint
[ 1.907802][ T1] pci 0000:00:02.0: BAR 0 [mem 0xc0000000-0xc0ffffff pref]
[ 1.908023][ T1] pci 0000:00:02.0: BAR 2 [mem 0xc1012000-0xc1012fff]
[ 1.909035][ T1] pci 0000:00:02.0: ROM [mem 0xffff0000-0xffffffff pref]
[ 1.910242][ T1] pci 0000:00:02.0: Video device with shadowed ROM at [mem 0x000c0000-0x000dffff]
[ 1.915076][ T1] pci 0000:00:03.0: [1af4:1001] type 00 class 0x010000 conventional PCI endpoint
[ 1.918021][ T1] pci 0000:00:03.0: BAR 0 [io 0xc000-0xc07f]
[ 1.918937][ T1] pci 0000:00:03.0: BAR 1 [mem 0xc1011000-0xc1011fff]
[ 1.919036][ T1] pci 0000:00:03.0: BAR 4 [mem 0x1800000000-0x1800003fff 64bit pref]
[ 1.964682][ T1] pci 0000:00:04.0: [1af4:1009] type 00 class 0x000200 conventional PCI endpoint
[ 1.967023][ T1] pci 0000:00:04.0: BAR 0 [io 0xc080-0xc0bf]
[ 1.967923][ T1] pci 0000:00:04.0: BAR 1 [mem 0xc1010000-0xc1010fff]
[ 1.969038][ T1] pci 0000:00:04.0: BAR 4 [mem 0x1800004000-0x1800007fff 64bit pref]
[ 2.023377][ T1] ACPI: PCI: Interrupt link LNKA configured for IRQ 11
[ 2.027728][ T1] ACPI: PCI: Interrupt link LNKB configured for IRQ 11
[ 2.032596][ T1] ACPI: PCI: Interrupt link LNKC configured for IRQ 10
[ 2.036629][ T1] ACPI: PCI: Interrupt link LNKD configured for IRQ 10
[ 2.039469][ T1] ACPI: PCI: Interrupt link LNKS configured for IRQ 9
[ 2.057023][ T1] acpi/hmat: Memory Flags:0001 Processor Domain:0 Memory Domain:0
[ 2.060284][ T1] iommu: Default domain type: Passthrough
[ 2.066443][ T1] SCSI subsystem initialized
[ 2.068224][ T1] ACPI: bus type USB registered
[ 2.069422][ T1] usbcore: registered new interface driver usbfs
[ 2.070191][ T1] usbcore: registered new interface driver hub
[ 2.071150][ T1] usbcore: registered new device driver usb
[ 2.072872][ T1] mc: Linux media interface: v0.10
[ 2.074219][ T1] videodev: Linux video capture interface: v2.00
[ 2.075542][ T1] pps_core: LinuxPPS API ver. 1 registered
[ 2.077001][ T1] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@xxxxxxxx>
[ 2.078067][ T1] PTP clock support registered
[ 2.080191][ T1] EDAC MC: Ver: 3.0.0
[ 2.083022][ T1] efivars: Registered efivars operations
[ 2.084351][ T1] Advanced Linux Sound Architecture Driver Initialized.
[ 2.089802][ T1] NET: Registered PF_ATMPVC protocol family
[ 2.090006][ T1] NET: Registered PF_ATMSVC protocol family
[ 2.091176][ T1] NetLabel: Initializing
[ 2.091674][ T1] NetLabel: domain hash size = 128
[ 2.093003][ T1] NetLabel: protocols = UNLABELED CIPSOv4 CALIPSO
[ 2.094292][ T1] NetLabel: unlabeled traffic allowed by default
[ 2.096382][ T1] PCI: Using ACPI for IRQ routing
[ 2.098314][ T1] pci 0000:00:02.0: vgaarb: setting as boot VGA device
[ 2.098993][ T1] pci 0000:00:02.0: vgaarb: bridge control possible
[ 2.098993][ T1] pci 0000:00:02.0: vgaarb: VGA device added: decodes=io+mem,owns=io+mem,locks=none
[ 2.102005][ T1] vgaarb: loaded
[ 2.107784][ T1] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0
[ 2.108002][ T1] hpet0: 3 comparators, 64-bit 100.000000 MHz counter
[ 2.118674][ T1] clocksource: Switched to clocksource kvm-clock
[ 2.469534][ T1] VFS: Disk quotas dquot_6.6.0
[ 2.469534][ T1] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 2.478506][ T1] netfs: FS-Cache loaded
[ 2.482117][ T1] CacheFiles: Loaded
[ 2.486503][ T1] AppArmor: AppArmor Filesystem Enabled
[ 2.486503][ T1] pnp: PnP ACPI init
[ 2.502515][ T1] pnp: PnP ACPI: found 6 devices
[ 2.586545][ T1] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns
[ 2.599208][ T1] NET: Registered PF_INET protocol family
[ 2.602735][ T1] IP idents hash table entries: 65536 (order: 7, 524288 bytes, linear)
[ 2.854735][ T1] tcp_listen_portaddr_hash hash table entries: 2048 (order: 3, 32768 bytes, linear)
[ 2.855925][ T1] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[ 2.857036][ T1] TCP established hash table entries: 32768 (order: 6, 262144 bytes, linear)
[ 2.858333][ T1] TCP bind hash table entries: 32768 (order: 8, 1048576 bytes, linear)
[ 2.859595][ T1] TCP: Hash tables configured (established 32768 bind 32768)
[ 2.861288][ T1] MPTCP token hash table entries: 4096 (order: 4, 98304 bytes, linear)
[ 2.862415][ T1] UDP hash table entries: 2048 (order: 5, 131072 bytes, linear)
[ 2.863411][ T1] UDP-Lite hash table entries: 2048 (order: 5, 131072 bytes, linear)
[ 2.865078][ T1] NET: Registered PF_UNIX/PF_LOCAL protocol family
[ 2.866541][ T1] NET: Registered PF_XDP protocol family
[ 2.867258][ T1] pci_bus 0000:00: resource 4 [io 0x0000-0x0cf7 window]
[ 2.868102][ T1] pci_bus 0000:00: resource 5 [io 0x0d00-0xffff window]
[ 2.868942][ T1] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff window]
[ 2.869874][ T1] pci_bus 0000:00: resource 7 [mem 0xc0000000-0xfebfffff window]
[ 2.870806][ T1] pci_bus 0000:00: resource 8 [mem 0x1800000000-0x187fffffff window]
[ 2.872536][ T1] pci 0000:00:01.0: PIIX3: Enabling Passive Release
[ 2.873319][ T1] pci 0000:00:00.0: Limiting direct PCI/PCI transfers
[ 2.874269][ T1] PCI: CLS 0 bytes, default 64
[ 2.875542][ T1] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[ 2.876399][ T1] software IO TLB: mapped [mem 0x00000000b7ede000-0x00000000bbede000] (64MB)
[ 2.877543][ T1] ACPI: bus type thunderbolt registered
[ 2.882287][ T1] RAPL PMU: API unit is 2^-32 Joules, 0 fixed counters, 10737418240 ms ovfl timer
[ 2.883551][ T1] kvm_amd: CPU 3 isn't AMD or Hygon
[ 2.884182][ T1] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x21134f58f0d, max_idle_ns: 440795217993 ns
[ 2.885657][ T1] clocksource: Switched to clocksource tsc
[ 2.888357][ T1] mce: Machine check injector initialized
[ 2.923164][ T1] Initialise system trusted keyrings
[ 2.924594][ T1] Key type blacklist registered
[ 2.926823][ T1] workingset: timestamp_bits=36 max_order=20 bucket_order=0
[ 2.937880][ T1] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 2.940186][ T1] ntfs3: Enabled Linux POSIX ACLs support
[ 2.941585][ T1] ntfs3: Read-only LZX/Xpress compression included
[ 2.944200][ T1] fuse: init (API version 7.43)
[ 2.949569][ T1] SGI XFS with ACLs, security attributes, no debug enabled
[ 2.960163][ T1] integrity: Platform Keyring initialized
[ 3.023950][ T1] NET: Registered PF_ALG protocol family
[ 3.024893][ T1] xor: automatically using best checksumming function avx
[ 3.026083][ T1] async_tx: api initialized (async)
[ 3.026872][ T1] Key type asymmetric registered
[ 3.027630][ T1] Asymmetric key parser 'x509' registered
[ 3.028859][ T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 239)
[ 3.030775][ T1] io scheduler mq-deadline registered
[ 3.031598][ T1] io scheduler kyber registered
[ 3.032482][ T1] io scheduler bfq registered
[ 3.039425][ T1] leds_ss4200: no LED devices found
[ 3.083911][ T1] acpiphp_ibm: ibm_acpiphp_init: acpi_walk_namespace failed
[ 3.086439][ T1] hv_vmbus: registering driver hyperv_fb
[ 3.087629][ T1] IPMI message handler: version 39.2
[ 3.088608][ T1] ipmi device interface
[ 3.090105][ T1] ipmi_si: IPMI System Interface driver
[ 3.094230][ T1] ipmi_si: Unable to find any System Interface(s)
[ 3.096931][ T1] ipmi_ssif: IPMI SSIF Interface driver
[ 3.099906][ T1] IPMI Watchdog: driver initialized
[ 3.101945][ T1] IPMI poweroff: Copyright (C) 2004 MontaVista Software - IPMI Powerdown via sys_reboot
[ 3.109527][ T1] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0
[ 3.113301][ T1] ACPI: button: Power Button [PWRF]
[ 3.125046][ T1] ioatdma: Intel(R) QuickData Technology Driver 5.00
[ 3.126978][ T1] idxd driver failed to load without MOVDIR64B.
[ 6.328329][ T1] ACPI: \_SB_.LNKC: Enabled at IRQ 10
[ 9.410221][ T1] ACPI: \_SB_.LNKD: Enabled at IRQ 11
[ 9.414359][ T1] N_HDLC line discipline registered with maxframe=4096
[ 9.415246][ T1] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 9.415246][ T1] 00:04: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[ 9.429616][ T1] mmtimer: Hardware unsupported
[ 9.436438][ T1] lp: driver loaded but no devices found
[ 9.438555][ T1] Non-volatile memory driver v1.3
[ 9.440563][ T1] ppdev: user-space parallel port driver
[ 9.441448][ T1] telclk_interrupt = 0xf non-mcpbl0010 hw.
[ 9.441536][ T1] Hangcheck: starting hangcheck timer 0.9.1 (tick is 180 seconds, margin is 60 seconds).
[ 9.446061][ T1] parport_pc 00:03: reported by Plug and Play ACPI
[ 9.446735][ T1] parport0: PC-style at 0x378, irq 7 [PCSPP,TRISTATE]
[ 9.544199][ T1] lp0: using parport0 (interrupt-driven).
[ 9.623819][ T1] brd: module loaded
[ 9.626608][ T1] loop: module loaded
[ 9.753355][ T1] virtio_blk virtio0: 4/0/0 default/read/poll queues
[ 9.753355][ T1] virtio_blk virtio0: [vda] 33554432 512-byte logical blocks (17.2 GB/16.0 GiB)
[ 9.770606][ T1] rbd: loaded (major 251)
[ 9.773539][ T1] zram: Added device: zram0
[ 9.777142][ T1] null_blk: disk nullb0 created
[ 9.777142][ T1] null_blk: module loaded
[ 9.777142][ T1] usbcore: registered new interface driver rtsx_usb
[ 9.777142][ T1] usbcore: registered new interface driver viperboard
[ 9.777142][ T1] Loading iSCSI transport class v2.0-870.
[ 9.793701][ T1] rdac: device handler registered
[ 9.794813][ T1] hp_sw: device handler registered
[ 9.795551][ T1] emc: device handler registered
[ 9.796668][ T1] alua: device handler registered
[ 9.798591][ T1] fnic: Cisco FCoE HBA Driver, ver 1.8.0.0
[ 9.799330][ T1] fnic: Successfully Initialized Trace Buffer
[ 9.799330][ T1] fnic: Successfully Initialized FC_CTLR Trace Buffer
[ 9.803612][ T1] bnx2fc: QLogic FCoE Driver bnx2fc v2.12.13 (October 15, 2015)
[ 9.806677][ T1] [0000:00:00.0]:[qedf_init:4142]: QLogic FCoE Offload Driver v8.42.3.0.
[ 9.809633][ T1] iscsi: registered transport (tcp)
[ 9.810127][ T1] Adaptec aacraid driver 1.2.1[50983]-custom
[ 9.810127][ T1] qla2xxx [0000:00:00.0]-0005: : QLogic Fibre Channel HBA Driver: 10.02.09.400-k.
[ 9.810127][ T1] iscsi: registered transport (qla4xxx)
[ 9.810127][ T1] QLogic iSCSI HBA Driver
[ 9.810127][ T1] Emulex LightPulse Fibre Channel SCSI driver 14.4.0.8
[ 9.810127][ T1] Copyright (C) 2017-2025 Broadcom. All Rights Reserved. The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
[ 9.895799][ T1] csiostor: Chelsio FCoE driver 1.0.0-ko
[ 9.896118][ T1] Microchip SmartPQI Driver (v2.1.30-031)
[ 9.896118][ T1] megasas: 07.734.00.00-rc1
[ 9.896118][ T1] mpt3sas version 52.100.00.00 loaded
[ 9.902394][ T1] libcxgbi:libcxgbi_init_module: Chelsio iSCSI driver library libcxgbi v0.9.1-ko (Apr. 2015)
[ 9.903082][ T1] Chelsio T4-T6 iSCSI Driver cxgb4i v0.9.5-ko (Apr. 2015)
[ 9.903082][ T1] iscsi: registered transport (cxgb4i)
[ 9.903082][ T1] QLogic NetXtreme II iSCSI Driver bnx2i v2.7.10.1 (Jul 16, 2014)
[ 9.903082][ T1] iscsi: registered transport (bnx2i)
[ 9.909918][ T1] iscsi: registered transport (qedi)
[ 9.912828][ T1] iscsi: registered transport (be2iscsi)
[ 9.913333][ T1] In beiscsi_module_init, tt=00000000cf5de27d
[ 9.913333][ T1] VMware PVSCSI driver - version 1.0.7.0-k
[ 9.913333][ T1] hv_vmbus: registering driver hv_storvsc
[ 9.913333][ T1] st: Version 20160209, fixed bufsize 32768, s/g segs 256
[ 9.913333][ T1] SCSI Media Changer driver v0.25
[ 9.925915][ T1] scsi_debug:sdebug_driver_probe: scsi_debug: trim poll_queues to 0. poll_q/nr_hw = (0/1)
[ 9.926454][ T1] scsi host0: scsi_debug: version 0191 [20210520]
[ 9.926454][ T1] dev_size_mb=8, opts=0x0, submit_queues=1, statistics=0
[ 9.934830][ T12] scsi 0:0:0:0: Direct-Access Linux scsi_debug 0191 PQ: 0 ANSI: 7
[ 9.943209][ C3] scsi 0:0:0:0: Power-on or device reset occurred
[ 9.949723][ T1] scsi host1: ata_piix
[ 9.952149][ T12] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 9.953189][ T1] scsi host2: ata_piix
[ 9.953766][ T1] ata1: PATA max MWDMA2 cmd 0x1f0 ctl 0x3f6 bmdma 0xc0c0 irq 14 lpm-pol 0
[ 9.955612][ T53] sd 0:0:0:0: [sda] 16384 512-byte logical blocks: (8.39 MB/8.00 MiB)
[ 9.953766][ T1] ata2: PATA max MWDMA2 cmd 0x170 ctl 0x376 bmdma 0xc0c8 irq 15 lpm-pol 0
[ 9.958582][ T1] Rounding down aligned max_sectors from 4294967295 to 4294967288
[ 9.960754][ T53] sd 0:0:0:0: [sda] Write Protect is off
[ 9.962424][ T1] db_root: cannot open: /etc/target
[ 9.967003][ T53] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, supports DPO and FUA
[ 9.976512][ T53] sd 0:0:0:0: [sda] permanent stream count = 5
[ 9.982569][ T1] MACsec IEEE 802.1AE
[ 9.982721][ T53] sd 0:0:0:0: [sda] Preferred minimum I/O size 512 bytes
[ 9.986251][ T53] sd 0:0:0:0: [sda] Optimal transfer size 524288 bytes
[ 10.020021][ T1] tun: Universal TUN/TAP device driver, 1.6
[ 10.022901][ T1] vcan: Virtual CAN interface driver
[ 10.024158][ T1] slcan: serial line CAN interface driver
[ 10.025231][ T1] CAN device driver interface
[ 10.026402][ T1] usbcore: registered new interface driver usb_8dev
[ 10.027474][ T1] usbcore: registered new interface driver ems_usb
[ 10.028420][ T1] usbcore: registered new interface driver kvaser_usb
[ 10.029618][ T1] usbcore: registered new interface driver peak_usb
[ 10.030497][ T1] cc770: CAN netdevice driver
[ 10.031945][ T53] sd 0:0:0:0: [sda] Attached SCSI disk
[ 10.032021][ T1] sja1000 CAN netdevice driver
[ 10.037516][ T1] cnic: QLogic cnicDriver v2.5.22 (July 20, 2015)
[ 10.110974][ T158] ata2: found unknown device (class 0)
[ 10.114620][ T158] ata2.00: ATAPI: QEMU DVD-ROM, 2.5+, max UDMA/100
[ 10.121735][ T68] scsi 2:0:0:0: CD-ROM QEMU QEMU DVD-ROM 2.5+ PQ: 0 ANSI: 5
[ 10.156373][ T68] sr 2:0:0:0: [sr0] scsi3-mmc drive: 4x/4x cd/rw xa/form2 tray
[ 10.159566][ T68] cdrom: Uniform CD-ROM driver Revision: 3.20
[ 10.190788][ T68] sr 2:0:0:0: Attached scsi generic sg1 type 5
[ 11.054446][ T1] e1000: Intel(R) PRO/1000 Network Driver
[ 11.056867][ T1] e1000: Copyright (c) 1999-2006 Intel Corporation.
[ 11.060318][ T1] e1000e: Intel(R) PRO/1000 Network Driver
[ 11.062684][ T1] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[ 11.066195][ T1] igb: Intel(R) Gigabit Ethernet Network Driver
[ 11.068707][ T1] igb: Copyright (c) 2007-2014 Intel Corporation.
[ 11.071052][ T1] igbvf: Intel(R) Gigabit Virtual Function Network Driver
[ 11.072977][ T1] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.
[ 11.075271][ T1] ixgbe: Intel(R) 10 Gigabit PCI Express Network Driver
[ 11.077168][ T1] ixgbe: Copyright (c) 1999-2016 Intel Corporation.
[ 11.080716][ T1] ixgbevf: Intel(R) 10 Gigabit PCI Express Virtual Function Network Driver
[ 11.084223][ T1] ixgbevf: Copyright (c) 2009 - 2024 Intel Corporation.
[ 11.088430][ T1] i40e: Intel(R) Ethernet Connection XL710 Network Driver
[ 11.091514][ T1] i40e: Copyright (c) 2013 - 2019 Intel Corporation.
[ 11.094579][ T1] iavf: Intel(R) Ethernet Adaptive Virtual Function Network Driver
[ 11.096922][ T1] Copyright (c) 2013 - 2018 Intel Corporation.
[ 11.099253][ T1] Intel(R) Ethernet Switch Host Interface Driver
[ 11.101137][ T1] Copyright(c) 2013 - 2019 Intel Corporation.
[ 11.103845][ T1] ice: Intel(R) Ethernet Connection E800 Series Linux Driver
[ 11.105426][ T1] ice: Copyright (c) 2018, Intel Corporation.
[ 11.111780][ T1] myri10ge: Version 1.5.3-1.534
[ 11.113169][ T1] nfp: NFP PCIe Driver, Copyright (C) 2014-2020 Netronome Systems
[ 11.114316][ T1] nfp: NFP PCIe Driver, Copyright (C) 2021-2022 Corigine Inc.
[ 11.116066][ T1] QLogic/NetXen Network Driver v4.0.82
[ 11.117149][ T1] QLogic FastLinQ 4xxxx Core Module qed
[ 11.117946][ T1] qede init: QLogic FastLinQ 4xxxx Ethernet Driver qede
[ 11.120003][ T1] Solarflare NET driver
[ 11.122395][ T1] PPP generic driver version 2.4.2
[ 11.124090][ T1] PPP BSD Compression module registered
[ 11.124883][ T1] PPP Deflate Compression module registered
[ 11.125607][ T1] PPP MPPE Compression module registered
[ 11.126246][ T1] NET: Registered PF_PPPOX protocol family
[ 11.126966][ T1] PPTP driver version 0.8.5
[ 11.127619][ T1] SLIP: version 0.8.4-NET3.019-NEWTTY (dynamic channels, max=256).
[ 11.128533][ T1] CSLIP: code copyright 1989 Regents of the University of California.
[ 11.129447][ T1] SLIP linefill/keepalive option.
[ 11.130034][ T1] hdlc: HDLC support module revision 1.22
[ 11.130699][ T1] VMware vmxnet3 virtual NIC driver - version 1.9.0.0-k-NAPI
[ 11.131974][ T1] usbcore: registered new interface driver catc
[ 11.132872][ T1] usbcore: registered new interface driver kaweth
[ 11.133608][ T1] pegasus: Pegasus/Pegasus II USB Ethernet driver
[ 11.134502][ T1] usbcore: registered new interface driver pegasus
[ 11.135409][ T1] usbcore: registered new interface driver rtl8150
[ 11.136230][ T1] usbcore: registered new device driver r8152-cfgselector
[ 11.137226][ T1] usbcore: registered new interface driver r8152
[ 11.138172][ T1] usbcore: registered new interface driver hso
[ 11.139059][ T1] usbcore: registered new interface driver lan78xx
[ 11.140011][ T1] usbcore: registered new interface driver asix
[ 11.140899][ T1] usbcore: registered new interface driver ax88179_178a
[ 11.141864][ T1] usbcore: registered new interface driver cdc_ether
[ 11.142800][ T1] usbcore: registered new interface driver cdc_eem
[ 11.143717][ T1] usbcore: registered new interface driver dm9601
[ 11.144634][ T1] usbcore: registered new interface driver smsc75xx
[ 11.145585][ T1] usbcore: registered new interface driver smsc95xx
[ 11.146510][ T1] usbcore: registered new interface driver gl620a
[ 11.147416][ T1] usbcore: registered new interface driver net1080
[ 11.148321][ T1] usbcore: registered new interface driver plusb
[ 11.149287][ T1] usbcore: registered new interface driver rndis_host
[ 11.150237][ T1] usbcore: registered new interface driver cdc_subset
[ 11.151178][ T1] usbcore: registered new interface driver zaurus
[ 11.152082][ T1] usbcore: registered new interface driver MOSCHIP usb-ethernet driver
[ 11.153194][ T1] usbcore: registered new interface driver int51x1
[ 11.154644][ T1] usbcore: registered new interface driver kalmia
[ 11.155601][ T1] usbcore: registered new interface driver ipheth
[ 11.156479][ T1] usbcore: registered new interface driver sierra_net
[ 11.157403][ T1] usbcore: registered new interface driver cx82310_eth
[ 11.158341][ T1] usbcore: registered new interface driver cdc_ncm
[ 11.159237][ T1] usbcore: registered new interface driver huawei_cdc_ncm
[ 11.160208][ T1] usbcore: registered new interface driver lg-vl600
[ 11.161133][ T1] usbcore: registered new interface driver qmi_wwan
[ 11.162046][ T1] usbcore: registered new interface driver cdc_mbim
[ 11.162958][ T1] usbcore: registered new interface driver ch9200
[ 11.163852][ T1] usbcore: registered new interface driver r8153_ecm
[ 11.164806][ T1] hv_vmbus: registering driver hv_netvsc
[ 11.166048][ T1] Fusion MPT base driver 3.04.20
[ 11.166701][ T1] Copyright (c) 1999-2008 LSI Corporation
[ 11.167382][ T1] Fusion MPT SPI Host driver 3.04.20
[ 11.168197][ T1] Fusion MPT SAS Host driver 3.04.20
[ 11.169007][ T1] Fusion MPT misc device (ioctl) driver 3.04.20
[ 11.170221][ T1] mptctl: Registered with Fusion MPT base driver
[ 11.170966][ T1] mptctl: /dev/mptctl @ (major,minor=10,220)
[ 11.173675][ T1] hv_vmbus: registering driver uio_hv_generic
[ 11.175650][ T1] VFIO - User Level meta-driver version: 0.3
[ 11.178780][ T1] usbcore: registered new interface driver cdc_acm
[ 11.179544][ T1] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[ 11.180727][ T1] usbcore: registered new interface driver usblp
[ 11.181614][ T1] usbcore: registered new interface driver cdc_wdm
[ 11.182525][ T1] usbcore: registered new interface driver usbtmc
[ 11.183735][ T1] usbcore: registered new interface driver uas
[ 11.184609][ T1] usbcore: registered new interface driver usb-storage
[ 11.185677][ T1] usbcore: registered new interface driver ums-alauda
[ 11.186597][ T1] usbcore: registered new interface driver ums-cypress
[ 11.187527][ T1] usbcore: registered new interface driver ums-datafab
[ 11.188471][ T1] usbcore: registered new interface driver ums_eneub6250
[ 11.189417][ T1] usbcore: registered new interface driver ums-freecom
[ 11.190312][ T1] usbcore: registered new interface driver ums-isd200
[ 11.191235][ T1] usbcore: registered new interface driver ums-jumpshot
[ 11.192166][ T1] usbcore: registered new interface driver ums-karma
[ 11.193143][ T1] usbcore: registered new interface driver ums-onetouch
[ 11.194096][ T1] usbcore: registered new interface driver ums-realtek
[ 11.195028][ T1] usbcore: registered new interface driver ums-sddr09
[ 11.195957][ T1] usbcore: registered new interface driver ums-sddr55
[ 11.196885][ T1] usbcore: registered new interface driver ums-usbat
[ 11.197872][ T1] usbcore: registered new interface driver mdc800
[ 11.198603][ T1] mdc800: v0.7.5 (30/10/2000):USB Driver for Mustek MDC800 Digital Camera
[ 11.199738][ T1] usbcore: registered new interface driver microtekX6
[ 11.200857][ T1] usbcore: registered new interface driver usbserial_generic
[ 11.201783][ T1] usbserial: USB Serial support registered for generic
[ 11.202702][ T1] usbcore: registered new interface driver aircable
[ 11.203525][ T1] usbserial: USB Serial support registered for aircable
[ 11.204432][ T1] usbcore: registered new interface driver ark3116
[ 11.205241][ T1] usbserial: USB Serial support registered for ark3116
[ 11.206137][ T1] usbcore: registered new interface driver belkin_sa
[ 11.206969][ T1] usbserial: USB Serial support registered for Belkin / Peracom / GoHubs USB Serial Adapter
[ 11.208241][ T1] usbcore: registered new interface driver ch341
[ 11.209036][ T1] usbserial: USB Serial support registered for ch341-uart
[ 11.209969][ T1] usbcore: registered new interface driver cp210x
[ 11.210776][ T1] usbserial: USB Serial support registered for cp210x
[ 11.211673][ T1] usbcore: registered new interface driver cyberjack
[ 11.212510][ T1] usbserial: USB Serial support registered for Reiner SCT Cyberjack USB card reader
[ 11.213765][ T1] usbcore: registered new interface driver cypress_m8
[ 11.214586][ T1] usbserial: USB Serial support registered for DeLorme Earthmate USB
[ 11.215541][ T1] usbserial: USB Serial support registered for HID->COM RS232 Adapter
[ 11.216519][ T1] usbserial: USB Serial support registered for Nokia CA-42 V2 Adapter
[ 11.217571][ T1] usbcore: registered new interface driver usb_debug
[ 11.218386][ T1] usbserial: USB Serial support registered for debug
[ 11.219212][ T1] usbserial: USB Serial support registered for xhci_dbc
[ 11.220124][ T1] usbcore: registered new interface driver digi_acceleport
[ 11.221186][ T1] usbserial: USB Serial support registered for Digi 2 port USB adapter
[ 11.222206][ T1] usbserial: USB Serial support registered for Digi 4 port USB adapter
[ 11.223263][ T1] usbcore: registered new interface driver io_edgeport
[ 11.224161][ T1] usbserial: USB Serial support registered for Edgeport 2 port adapter
[ 11.225194][ T1] usbserial: USB Serial support registered for Edgeport 4 port adapter
[ 11.226233][ T1] usbserial: USB Serial support registered for Edgeport 8 port adapter
[ 11.227262][ T1] usbserial: USB Serial support registered for EPiC device
[ 11.228222][ T1] usbcore: registered new interface driver io_ti
[ 11.229031][ T1] usbserial: USB Serial support registered for Edgeport TI 1 port adapter
[ 11.230092][ T1] usbserial: USB Serial support registered for Edgeport TI 2 port adapter
[ 11.231233][ T1] usbcore: registered new interface driver empeg
[ 11.232022][ T1] usbserial: USB Serial support registered for empeg
[ 11.232912][ T1] usbcore: registered new interface driver f81534
[ 11.233714][ T1] usbserial: USB Serial support registered for Fintek F81532/F81534
[ 11.234752][ T1] usbcore: registered new interface driver ftdi_sio
[ 11.235571][ T1] usbserial: USB Serial support registered for FTDI USB Serial Device
[ 11.236629][ T1] usbcore: registered new interface driver garmin_gps
[ 11.237482][ T1] usbserial: USB Serial support registered for Garmin GPS usb/tty
[ 11.238530][ T1] usbcore: registered new interface driver ipaq
[ 11.239305][ T1] usbserial: USB Serial support registered for PocketPC PDA
[ 11.240253][ T1] usbcore: registered new interface driver ipw
[ 11.241025][ T1] usbserial: USB Serial support registered for IPWireless converter
[ 11.242056][ T1] usbcore: registered new interface driver ir_usb
[ 11.242869][ T1] usbserial: USB Serial support registered for IR Dongle
[ 11.243791][ T1] usbcore: registered new interface driver iuu_phoenix
[ 11.244646][ T1] usbserial: USB Serial support registered for iuu_phoenix
[ 11.245589][ T1] usbcore: registered new interface driver keyspan
[ 11.246380][ T1] usbserial: USB Serial support registered for Keyspan - (without firmware)
[ 11.247476][ T1] usbserial: USB Serial support registered for Keyspan 1 port adapter
[ 11.248481][ T1] usbserial: USB Serial support registered for Keyspan 2 port adapter
[ 11.249668][ T1] usbserial: USB Serial support registered for Keyspan 4 port adapter
[ 11.250723][ T1] usbcore: registered new interface driver keyspan_pda
[ 11.251582][ T1] usbserial: USB Serial support registered for Keyspan PDA
[ 11.252467][ T1] usbserial: USB Serial support registered for Keyspan PDA - (prerenumeration)
[ 11.253631][ T1] usbcore: registered new interface driver kl5kusb105
[ 11.254987][ T1] usbserial: USB Serial support registered for KL5KUSB105D / PalmConnect
[ 11.256527][ T1] usbcore: registered new interface driver kobil_sct
[ 11.257420][ T1] usbserial: USB Serial support registered for KOBIL USB smart card terminal
[ 11.258554][ T1] usbcore: registered new interface driver mct_u232
[ 11.259354][ T1] usbserial: USB Serial support registered for MCT U232
[ 11.260251][ T1] usbcore: registered new interface driver mos7720
[ 11.261063][ T1] usbserial: USB Serial support registered for Moschip 2 port adapter
[ 11.262109][ T1] usbcore: registered new interface driver mos7840
[ 11.262912][ T1] usbserial: USB Serial support registered for Moschip 7840/7820 USB Serial Driver
[ 11.264257][ T1] usbcore: registered new interface driver mxuport
[ 11.265219][ T1] usbserial: USB Serial support registered for MOXA UPort
[ 11.266167][ T1] usbcore: registered new interface driver navman
[ 11.266991][ T1] usbserial: USB Serial support registered for navman
[ 11.267907][ T1] usbcore: registered new interface driver omninet
[ 11.268744][ T1] usbserial: USB Serial support registered for ZyXEL - omni.net usb
[ 11.269816][ T1] usbcore: registered new interface driver opticon
[ 11.270643][ T1] usbserial: USB Serial support registered for opticon
[ 11.271565][ T1] usbcore: registered new interface driver option
[ 11.272380][ T1] usbserial: USB Serial support registered for GSM modem (1-port)
[ 11.273396][ T1] usbcore: registered new interface driver oti6858
[ 11.274227][ T1] usbserial: USB Serial support registered for oti6858
[ 11.275144][ T1] usbcore: registered new interface driver pl2303
[ 11.275970][ T1] usbserial: USB Serial support registered for pl2303
[ 11.276928][ T1] usbcore: registered new interface driver qcaux
[ 11.277762][ T1] usbserial: USB Serial support registered for qcaux
[ 11.279011][ T1] usbcore: registered new interface driver qcserial
[ 11.279869][ T1] usbserial: USB Serial support registered for Qualcomm USB modem
[ 11.281186][ T1] usbcore: registered new interface driver quatech2
[ 11.282197][ T1] usbserial: USB Serial support registered for Quatech 2nd gen USB to Serial Driver
[ 11.283445][ T1] usbcore: registered new interface driver safe_serial
[ 11.284329][ T1] usbserial: USB Serial support registered for safe_serial
[ 11.285331][ T1] usbcore: registered new interface driver sierra
[ 11.286147][ T1] usbserial: USB Serial support registered for Sierra USB modem
[ 11.287158][ T1] usbcore: registered new interface driver spcp8x5
[ 11.287992][ T1] usbserial: USB Serial support registered for SPCP8x5
[ 11.288915][ T1] usbcore: registered new interface driver ssu100
[ 11.289745][ T1] usbserial: USB Serial support registered for Quatech SSU-100 USB to Serial Driver
[ 11.290951][ T1] usbcore: registered new interface driver symbolserial
[ 11.291834][ T1] usbserial: USB Serial support registered for symbol
[ 11.292749][ T1] usbcore: registered new interface driver ti_usb_3410_5052
[ 11.293659][ T1] usbserial: USB Serial support registered for TI USB 3410 1 port adapter
[ 11.294733][ T1] usbserial: USB Serial support registered for TI USB 5052 2 port adapter
[ 11.295867][ T1] usbcore: registered new interface driver upd78f0730
[ 11.296722][ T1] usbserial: USB Serial support registered for upd78f0730
[ 11.297667][ T1] usbcore: registered new interface driver visor
[ 11.298889][ T1] usbserial: USB Serial support registered for Handspring Visor / Palm OS
[ 11.300146][ T1] usbserial: USB Serial support registered for Sony Clie 5.0
[ 11.301064][ T1] usbserial: USB Serial support registered for Sony Clie 3.5
[ 11.302029][ T1] usbcore: registered new interface driver whiteheat
[ 11.302890][ T1] usbserial: USB Serial support registered for Connect Tech - WhiteHEAT - (prerenumeration)
[ 11.304120][ T1] usbserial: USB Serial support registered for Connect Tech - WhiteHEAT
[ 11.305188][ T1] usbcore: registered new interface driver xsens_mt
[ 11.306009][ T1] usbserial: USB Serial support registered for xsens_mt
[ 11.306997][ T1] usbcore: registered new interface driver adutux
[ 11.307909][ T1] usbcore: registered new interface driver appledisplay
[ 11.308886][ T1] usbcore: registered new interface driver emi26 - firmware loader
[ 11.309949][ T1] usbcore: registered new interface driver emi62 - firmware loader
[ 11.311044][ T1] usbcore: registered new interface driver idmouse
[ 11.311965][ T1] usbcore: registered new interface driver iowarrior
[ 11.312904][ T1] usbcore: registered new interface driver isight_firmware
[ 11.313921][ T1] usbcore: registered new interface driver usblcd
[ 11.314859][ T1] usbcore: registered new interface driver ldusb
[ 11.315866][ T1] usbcore: registered new interface driver legousbtower
[ 11.316859][ T1] usbcore: registered new interface driver uss720
[ 11.317576][ T1] uss720: USB Parport Cable driver for Cables using the Lucent Technologies USS720 Chip
[ 11.318653][ T1] uss720: NOTE: this is a special purpose driver to allow nonstandard
[ 11.319575][ T1] uss720: protocols (eg. bitbang) over USS720 usb to parallel cables
[ 11.320844][ T1] uss720: If you just want to connect to a printer, use usblp instead
[ 11.322181][ T1] usbcore: registered new interface driver usbsevseg
[ 11.323306][ T1] usbcore: registered new interface driver sisusb
[ 11.324198][ T1] usbcore: registered new interface driver cxacru
[ 11.325093][ T1] usbcore: registered new interface driver speedtch
[ 11.326015][ T1] usbcore: registered new interface driver ueagle-atm
[ 11.326797][ T1] xusbatm: malformed module parameters
[ 11.328351][ T1] i8042: PNP: PS/2 Controller [PNP0303:KBD,PNP0f13:MOU] at 0x60,0x64 irq 1,12
[ 11.330829][ T1] serio: i8042 KBD port at 0x60,0x64 irq 1
[ 11.331517][ T1] serio: i8042 AUX port at 0x60,0x64 irq 12
[ 11.332585][ T1] hv_vmbus: registering driver hyperv_keyboard
[ 11.334250][ T1] mousedev: PS/2 mouse device common for all mice
[ 11.336161][ T1] usbcore: registered new interface driver appletouch
[ 11.337110][ T1] usbcore: registered new interface driver bcm5974
[ 11.338850][ T1] usbcore: registered new interface driver synaptics_usb
[ 11.340002][ T1] usbcore: registered new interface driver usb_acecad
[ 11.340939][ T1] usbcore: registered new interface driver aiptek
[ 11.341850][ T1] usbcore: registered new interface driver kbtab
[ 11.343360][ T1] apanel: Fujitsu BIOS signature 'FJKEYINF' not found...
[ 11.344498][ T1] usbcore: registered new interface driver ati_remote2
[ 11.345430][ T1] cm109: Keymap for Komunikate KIP1000 phone loaded
[ 11.346411][ T1] usbcore: registered new interface driver cm109
[ 11.347182][ T1] cm109: CM109 phone driver: 20080805 (C) Alfred E. Heggestad
[ 11.348234][ T1] usbcore: registered new interface driver keyspan_remote
[ 11.349634][ T1] input: PC Speaker as /devices/platform/pcspkr/input/input2
[ 11.351611][ T77] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input1
[ 11.351979][ T1] usbcore: registered new interface driver powermate
[ 11.355969][ T1] usbcore: registered new interface driver yealink
[ 11.357996][ T77] input: VirtualPS/2 VMware VMMouse as /devices/platform/i8042/serio1/input/input5
[ 11.360318][ T1] rtc_cmos 00:05: RTC can wake from S4
[ 11.361847][ T77] input: VirtualPS/2 VMware VMMouse as /devices/platform/i8042/serio1/input/input4
[ 11.365957][ T1] rtc_cmos 00:05: registered as rtc0
[ 11.367013][ T1] rtc_cmos 00:05: setting system clock to 2025-06-04T02:51:15 UTC (1749005475)
[ 11.369067][ T1] rtc_cmos 00:05: alarms up to one day, y3k, 242 bytes nvram
[ 11.375614][ T1] i2c_dev: i2c /dev entries driver
[ 11.378915][ T1] piix4_smbus 0000:00:01.3: SMBus Host Controller at 0xb100, revision 0
[ 11.383275][ T1] i2c i2c-0: Memory type 0x07 not supported yet, not instantiating SPD
[ 11.386788][ T1] usbcore: registered new interface driver i2c-diolan-u2c
[ 11.388475][ T1] i2c-parport: adapter type unspecified
[ 11.389768][ T1] usbcore: registered new interface driver i2c-tiny-usb
[ 11.398025][ T1] ir_imon_decoder: IR iMON protocol handler initialized
[ 11.399273][ T1] IR JVC protocol handler initialized
[ 11.400206][ T1] IR MCE Keyboard/mouse protocol handler initialized
[ 11.401362][ T1] IR NEC protocol handler initialized
[ 11.402312][ T1] IR RC5(x/sz) protocol handler initialized
[ 11.403335][ T1] IR RC6 protocol handler initialized
[ 11.404272][ T1] IR SANYO protocol handler initialized
[ 11.405238][ T1] IR Sony protocol handler initialized
[ 11.406764][ T1] usbcore: registered new interface driver iguanair
[ 11.408222][ T1] usbcore: registered new interface driver imon
[ 11.409655][ T1] usbcore: registered new interface driver imon_raw
[ 11.411593][ T1] usbcore: registered new interface driver mceusb
[ 11.413157][ T1] usbcore: registered new interface driver redrat3
[ 11.415320][ T1] serial_ir serial_ir.0: port 03f8 already in use
[ 11.417208][ T1] serial_ir serial_ir.0: use 'setserial /dev/ttySX uart none'
[ 11.418494][ T1] serial_ir serial_ir.0: or compile the serial port driver as module and
[ 11.419911][ T1] serial_ir serial_ir.0: make sure this module is loaded first
[ 11.421188][ T1] serial_ir serial_ir.0: probe with driver serial_ir failed with error -16
[ 11.423165][ T1] usbcore: registered new interface driver streamzap
[ 11.424622][ T1] usbcore: registered new interface driver ttusbir
[ 11.426213][ T1] usbcore: registered new interface driver ati_remote
[ 11.428044][ T1] b2c2-flexcop: B2C2 FlexcopII/II(b)/III digital TV receiver chip loaded successfully
[ 11.429662][ T1] saa7146: register extension 'budget dvb'
[ 11.430983][ T1] saa7146: register extension 'budget_av'
[ 11.432233][ T1] saa7146: register extension 'budget_ci dvb'
[ 11.435386][ T1] ngene: nGene PCIE bridge driver, Copyright (C) 2005-2007 Micronas
[ 11.437076][ T1] ddbridge: Digital Devices PCIE bridge driver 0.9.33-integrated, Copyright (C) 2010-17 Digital Devices GmbH
[ 11.439651][ T1] bttv: driver version 0.9.19 loaded
[ 11.440570][ T1] bttv: using 8 buffers with 2080k (520 pages) each for capture
[ 11.441894][ T1] bttv: Host bridge needs ETBF enabled
[ 11.443415][ T1] bt878: AUDIO driver version 0.0.0 loaded
[ 11.444942][ T1] cx18: Start initialization, version 1.5.1
[ 11.446322][ T1] cx18: End initialization
[ 11.447147][ T1] cx23885: cx23885 driver version 0.0.4 loaded
[ 11.450080][ T1] cx88_blackbird: cx2388x blackbird driver version 1.0.0 loaded
[ 11.451433][ T1] cx8802: registering cx8802 driver, type: blackbird access: shared
[ 11.452870][ T1] cx88_dvb: cx2388x dvb driver version 1.0.0 loaded
[ 11.454061][ T1] cx8802: registering cx8802 driver, type: dvb access: shared
[ 11.455392][ T1] ivtv: Start initialization, version 1.4.3
[ 11.456853][ T1] ivtv: End initialization
[ 11.457641][ T1] ivtvfb: no cards found
[ 11.458366][ T1] saa7134: saa7130/34: v4l2 driver version 0, 2, 17 loaded
[ 11.460357][ T1] saa7164 driver loaded
[ 11.461417][ T1] usbcore: registered new interface driver b2c2_flexcop_usb
[ 11.462984][ T1] usbcore: registered new interface driver dvb_usb_vp7045
[ 11.464532][ T1] usbcore: registered new interface driver dvb_usb_vp702x
[ 11.466140][ T1] usbcore: registered new interface driver dvb_usb_gp8psk
[ 11.467721][ T1] usbcore: registered new interface driver dvb_usb_dtt200u
[ 11.469294][ T1] usbcore: registered new interface driver dvb_usb_a800
[ 11.470809][ T1] usbcore: registered new interface driver dvb_usb_dibusb_mb
[ 11.472388][ T1] usbcore: registered new interface driver dvb_usb_dibusb_mc
[ 11.473990][ T1] usbcore: registered new interface driver dvb_usb_nova_t_usb2
[ 11.475577][ T1] usbcore: registered new interface driver dvb_usb_umt_010
[ 11.477142][ T1] usbcore: registered new interface driver dvb_usb_m920x
[ 11.478764][ T1] usbcore: registered new interface driver dvb_usb_digitv
[ 11.480298][ T1] usbcore: registered new interface driver dvb_usb_cxusb
[ 11.481824][ T1] usbcore: registered new interface driver dvb_usb_ttusb2
[ 11.483374][ T1] usbcore: registered new interface driver dvb_usb_dib0700
[ 11.484926][ T1] usbcore: registered new interface driver opera1
[ 11.486367][ T1] usbcore: registered new interface driver dvb_usb_af9005
[ 11.487580][ T1] failing symbol_get of non-GPLONLY symbol af9005_rc_decode.
[ 11.490776][ T1] failing symbol_get of non-GPLONLY symbol af9005_rc_decode.
[ 11.491663][ T1] failing symbol_get of non-GPLONLY symbol rc_map_af9005_table.
[ 11.498118][ T1] failing symbol_get of non-GPLONLY symbol rc_map_af9005_table.
[ 11.499043][ T1] failing symbol_get of non-GPLONLY symbol rc_map_af9005_table_size.
[ 11.505707][ T1] failing symbol_get of non-GPLONLY symbol rc_map_af9005_table_size.
[ 11.506613][ T1] af9005: af9005_rc_decode function not found, disabling remote
[ 11.506613][ T1] usbcore: registered new interface driver pctv452e
[ 11.506613][ T1] usbcore: registered new interface driver dw2102
[ 11.516894][ T1] usbcore: registered new interface driver dvb_usb_dtv5100
[ 11.519039][ T1] usbcore: registered new interface driver cinergyT2
[ 11.521006][ T1] usbcore: registered new interface driver dvb_usb_az6027
[ 11.523086][ T1] usbcore: registered new interface driver dvb_usb_technisat_usb2
[ 11.525279][ T1] usbcore: registered new interface driver dvb_usb_af9015
[ 11.527325][ T1] usbcore: registered new interface driver dvb_usb_af9035
[ 11.528690][ T1] usbcore: registered new interface driver dvb_usb_anysee
[ 11.530021][ T1] usbcore: registered new interface driver dvb_usb_au6610
[ 11.531330][ T1] usbcore: registered new interface driver dvb_usb_az6007
[ 11.532667][ T1] usbcore: registered new interface driver dvb_usb_ce6230
[ 11.533989][ T1] usbcore: registered new interface driver dvb_usb_ec168
[ 11.535288][ T1] usbcore: registered new interface driver dvb_usb_lmedm04
[ 11.536629][ T1] usbcore: registered new interface driver dvb_usb_gl861
[ 11.537979][ T1] usbcore: registered new interface driver dvb_usb_mxl111sf
[ 11.539271][ T1] usbcore: registered new interface driver dvb_usb_rtl28xxu
[ 11.540581][ T1] usbcore: registered new interface driver s2255
[ 11.541757][ T1] usbcore: registered new interface driver smsusb
[ 11.542932][ T1] usbcore: registered new interface driver ttusb
[ 11.544110][ T1] usbcore: registered new interface driver ttusb-dec
[ 11.545103][ T1] gspca_main: v2.14.0 registered
[ 11.546065][ T1] usbcore: registered new interface driver benq
[ 11.547250][ T1] usbcore: registered new interface driver conex
[ 11.548413][ T1] usbcore: registered new interface driver cpia1
[ 11.549607][ T1] usbcore: registered new interface driver etoms
[ 11.550456][ T1] usbcore: registered new interface driver finepix
[ 11.550456][ T1] usbcore: registered new interface driver jeilinj
[ 11.550456][ T1] usbcore: registered new interface driver jl2005bcd
[ 11.550456][ T1] usbcore: registered new interface driver konica
[ 11.550456][ T1] usbcore: registered new interface driver mars
[ 11.550456][ T1] usbcore: registered new interface driver mr97310a
[ 11.550456][ T1] usbcore: registered new interface driver nw80x
[ 11.550456][ T1] usbcore: registered new interface driver ov519
[ 11.550456][ T1] usbcore: registered new interface driver ov534
[ 11.550456][ T1] usbcore: registered new interface driver ov534_9
[ 11.550456][ T1] usbcore: registered new interface driver pac207
[ 11.550456][ T1] usbcore: registered new interface driver gspca_pac7302
[ 11.550456][ T1] usbcore: registered new interface driver pac7311
[ 11.550456][ T1] usbcore: registered new interface driver se401
[ 11.550456][ T1] usbcore: registered new interface driver sn9c2028
[ 11.550456][ T1] usbcore: registered new interface driver gspca_sn9c20x
[ 11.550456][ T1] usbcore: registered new interface driver sonixb
[ 11.550456][ T1] usbcore: registered new interface driver sonixj
[ 11.550456][ T1] usbcore: registered new interface driver spca500
[ 11.550456][ T1] usbcore: registered new interface driver spca501
[ 11.550456][ T1] usbcore: registered new interface driver spca505
[ 11.550456][ T1] usbcore: registered new interface driver spca506
[ 11.550456][ T1] usbcore: registered new interface driver spca508
[ 11.550456][ T1] usbcore: registered new interface driver spca561
[ 11.550456][ T1] usbcore: registered new interface driver spca1528
[ 11.550456][ T1] usbcore: registered new interface driver sq905
[ 11.550456][ T1] usbcore: registered new interface driver sq905c
[ 11.550456][ T1] usbcore: registered new interface driver sq930x
[ 11.550456][ T1] usbcore: registered new interface driver sunplus
[ 11.550456][ T1] usbcore: registered new interface driver stk014
[ 11.550456][ T1] usbcore: registered new interface driver stv0680
[ 11.550456][ T1] usbcore: registered new interface driver t613
[ 11.550456][ T1] usbcore: registered new interface driver gspca_topro
[ 11.550456][ T1] usbcore: registered new interface driver tv8532
[ 11.550456][ T1] usbcore: registered new interface driver vc032x
[ 11.550456][ T1] usbcore: registered new interface driver vicam
[ 11.550456][ T1] usbcore: registered new interface driver xirlink-cit
[ 11.550456][ T1] usbcore: registered new interface driver gspca_zc3xx
[ 11.550456][ T1] usbcore: registered new interface driver ALi m5602
[ 11.550456][ T1] usbcore: registered new interface driver STV06xx
[ 11.550456][ T1] usbcore: registered new interface driver gspca_gl860
[ 11.550456][ T1] usbcore: registered new interface driver Philips webcam
[ 11.550456][ T1] usbcore: registered new interface driver uvcvideo
[ 11.550456][ T1] au0828: au0828 driver loaded
[ 11.550456][ T1] usbcore: registered new interface driver au0828
[ 11.550456][ T1] usbcore: registered new interface driver cx231xx
[ 11.550456][ T1] usbcore: registered new interface driver em28xx
[ 11.550456][ T1] em28xx: Registered (Em28xx Audio Extension) extension
[ 11.550456][ T1] em28xx: Registered (Em28xx dvb Extension) extension
[ 11.550456][ T1] em28xx: Registered (Em28xx Input Extension) extension
[ 11.550456][ T1] usbcore: registered new interface driver hdpvr
[ 11.611206][ T1] usbcore: registered new interface driver pvrusb2
[ 11.611825][ T1] pvrusb2: V4L in-tree version:Hauppauge WinTV-PVR-USB2 MPEG2 Encoder/Tuner
[ 11.611825][ T1] pvrusb2: Debug mask is 31 (0x1f)
[ 11.611825][ T1] pps_ldisc: PPS line discipline registered
[ 11.611825][ T1] parport0: cannot grant exclusive access for device pps_parport
[ 11.611825][ T1] pps_parport: couldn't register with parport0
[ 11.682173][ T1] applesmc: supported laptop not found!
[ 11.683074][ T1] applesmc: driver init failed (ret=-19)!
[ 11.858034][ T1] pc87360: PC8736x not detected, module not inserted
[ 11.901092][ T1] intel_powerclamp: CPU does not support MWAIT
[ 11.901092][ T1] usbcore: registered new interface driver pcwd_usb
[ 11.901092][ T1] alim7101_wdt: Steve Hill <steve@xxxxxxxxxxxx>
[ 11.901092][ T1] alim7101_wdt: ALi M7101 PMU not present - WDT not set
[ 11.901092][ T1] ib700wdt: WDT driver for IB700 single board computer initialising
[ 11.921365][ T1] iTCO_vendor_support: vendor-support=0
[ 11.921385][ T1] it87_wdt: no device
[ 11.921385][ T1] nv_tco: NV TCO WatchDog Timer Driver v0.01
[ 11.921385][ T1] w83877f_wdt: I/O address 0x0443 already in use
[ 11.921385][ T1] w83977f_wdt: driver v1.00
[ 11.921385][ T1] w83977f_wdt: cannot register miscdev on minor=130 (err=-16)
[ 11.921385][ T1] machzwd: MachZ ZF-Logic Watchdog driver initializing
[ 11.921385][ T1] machzwd: no ZF-Logic found
[ 11.921385][ T1] watchdog: Software Watchdog: cannot register miscdev on minor=130 (err=-16).
[ 11.921385][ T1] watchdog: Software Watchdog: a legacy watchdog module is probably present.
[ 11.936161][ T1] softdog: initialized. soft_noboot=0 soft_margin=60 sec soft_panic=0 (nowayout=0)
[ 11.937096][ T1] softdog: soft_reboot_cmd=<not set> soft_active_on_boot=0
[ 11.941015][ T1] device-mapper: core: CONFIG_IMA_DISABLE_HTABLE is disabled. Duplicate IMA measurements will not be recorded in the IMA log.
[ 11.941834][ T1] device-mapper: uevent: version 1.0.3
[ 11.944671][ T1] device-mapper: ioctl: 4.49.0-ioctl (2025-01-17) initialised: dm-devel@xxxxxxxxxxxxxxx
[ 11.947130][ T1] device-mapper: multipath round-robin: version 1.2.0 loaded
[ 11.947974][ T1] device-mapper: multipath queue-length: version 0.2.0 loaded
[ 11.948066][ T1] device-mapper: multipath service-time: version 0.3.0 loaded
[ 11.948066][ T1] device-mapper: dm-log-userspace: version 1.3.0 loaded
[ 11.948066][ T1] Modular ISDN core version 1.1.29
[ 11.951878][ T1] NET: Registered PF_ISDN protocol family
[ 11.952521][ T1] DSP module 2.0
[ 11.952798][ T1] mISDN_dsp: DSP clocks every 64 samples. This equals 8 jiffies.
[ 11.952798][ T1] mISDN: Layer-1-over-IP driver Rev. 2.00
[ 11.952798][ T1] 0 virtual devices registered
[ 11.952798][ T1] mISDN: HFC-multi driver 2.03
[ 11.952798][ T1] usbcore: registered new interface driver HFC-S_USB
[ 11.952798][ T1] AVM Fritz PCI driver Rev. 2.3
[ 11.952798][ T1] Sedlbauer Speedfax+ Driver Rev. 2.0
[ 11.952798][ T1] Infineon ISDN Driver Rev. 1.0
[ 11.952798][ T1] Winbond W6692 PCI driver Rev. 2.0
[ 11.952798][ T1] Netjet PCI driver Rev. 2.0
[ 11.952798][ T1] mISDNipac module version 2.0
[ 11.952798][ T1] mISDN: ISAR driver Rev. 2.1
[ 11.952798][ T1] intel_pstate: CPU model not supported
[ 11.952798][ T1] sdhci: Secure Digital Host Controller Interface driver
[ 11.952798][ T1] sdhci: Copyright(c) Pierre Ossman
[ 11.952798][ T1] VUB300 Driver rom wait states = 1C irqpoll timeout = 0400
[ 11.980010][ T1] usbcore: registered new interface driver vub300
[ 11.980772][ T1] usbcore: registered new interface driver ushc
[ 11.980772][ T1] sdhci-pltfm: SDHCI platform and OF driver helper
[ 11.985526][ T1] No iBFT detected.
[ 11.985526][ T1] efifb: probing for efifb
[ 11.985526][ T1] efifb: framebuffer at 0xc0000000, using 1876k, total 1875k
[ 11.985526][ T1] efifb: mode is 800x600x32, linelength=3200, pages=1
[ 11.985526][ T1] efifb: scrolling: redraw
[ 11.985526][ T1] efifb: Truecolor: size=8:8:8:8, shift=24:16:8:0
[ 11.994716][ T1] Console: switching to colour frame buffer device 100x37
[ 11.994716][ T1] fb0: EFI VGA frame buffer device
[ 11.994716][ T1] ccp_crypto: Cannot load: there are no available CCPs
[ 12.009936][ T1] hid: raw HID events driver (C) Jiri Kosina
[ 12.015904][ T1] hv_vmbus: registering driver hid_hyperv
[ 12.015904][ T1] usbcore: registered new interface driver usbhid
[ 12.015904][ T1] usbhid: USB HID core driver
[ 12.015904][ T1] acerhdf: Acer Aspire One Fan driver, v.0.7.0
[ 12.015904][ T1] acerhdf: unknown (unsupported) BIOS version QEMU/Ubuntu 24.04 PC (i440FX + PIIX, 1996)/0.0.0, please report, aborting!
[ 12.015904][ T1] acer_wmi: Acer Laptop ACPI-WMI Extras
[ 12.015904][ T1] acer_wmi: No or unsupported WMI interface, unable to load
[ 12.015904][ T1] asus_wmi: ASUS WMI generic driver loaded
[ 12.015904][ T1] asus_wmi: ASUS Management GUID not found
[ 12.015904][ T1] asus_wmi: ASUS Management GUID not found
[ 12.015904][ T1] fujitsu_laptop: driver 0.6.0 successfully loaded
[ 12.015904][ T1] fujitsu_tablet: Unknown (using defaults)
[ 12.015904][ T1] hdaps: supported laptop not found!
[ 12.015904][ T1] hdaps: driver init failed (ret=-19)!
[ 12.042088][ T1] intel_oaktrail: Platform not recognized (You could try the module's force-parameter)
[ 12.042088][ T1] msi_wmi: This machine doesn't have neither MSI-hotkeys nor backlight through WMI
[ 12.042088][ T1] compal_laptop: Motherboard not recognized (You could try the module's force-parameter)
[ 12.042088][ T1] topstar_laptop: ACPI extras driver loaded
[ 12.042088][ T1] hv_utils: Registering HyperV Utility Driver
[ 12.042088][ T1] hv_vmbus: registering driver hv_utils
[ 12.042088][ T1] hv_vmbus: registering driver hv_balloon
[ 12.042088][ T1] Intel(R) PCI-E Non-Transparent Bridge Driver 2.0
[ 12.042088][ T1] Software Queue-Pair Transport over NTB, version 4
[ 12.093696][ T1] snd_mtpav snd_mtpav: MTVAP port 0x378 is busy
[ 12.093696][ T1] snd_mtpav snd_mtpav: probe with driver snd_mtpav failed with error -16
[ 12.093696][ T1] Error: Driver 'pcspkr' is already registered, aborting...
[ 12.093696][ T1] ASIHPI driver 4.14.03
[ 12.093696][ T1] usbcore: registered new interface driver snd-usb-audio
[ 12.093696][ T1] usbcore: registered new interface driver snd-ua101
[ 12.093696][ T1] usbcore: registered new interface driver snd-usb-usx2y
[ 12.093696][ T1] usbcore: registered new interface driver snd-usb-us122l
[ 12.093696][ T1] usbcore: registered new interface driver snd-usb-caiaq
[ 12.093696][ T1] usbcore: registered new interface driver snd-usb-6fire
[ 12.093696][ T1] usbcore: registered new interface driver snd-usb-hiface
[ 12.093696][ T1] usbcore: registered new interface driver snd-bcd2000
[ 12.093696][ T1] usbcore: registered new interface driver snd_usb_pod
[ 12.093696][ T1] usbcore: registered new interface driver snd_usb_podhd
[ 12.093696][ T1] usbcore: registered new interface driver snd_usb_toneport
[ 12.093696][ T1] usbcore: registered new interface driver snd_usb_variax
[ 12.093696][ T1] pktgen: Packet Generator for packet performance testing. Version: 2.75
[ 12.125278][ T1] drop_monitor: Initializing network drop monitor service
[ 12.126258][ T1] GACT probability on
[ 12.126266][ T1] Mirror/redirect action on
[ 12.126266][ T1] Simple TC action Loaded
[ 12.126266][ T1] netem: version 1.3
[ 12.126266][ T1] u32 classifier
[ 12.126266][ T1] Performance counters on
[ 12.126266][ T1] input device check on
[ 12.126266][ T1] Actions configured
[ 12.126266][ T1] IPVS: Registered protocols (TCP, UDP, SCTP, AH, ESP)
[ 12.126266][ T1] IPVS: Connection hash table configured (size=4096, memory=32Kbytes)
[ 12.126266][ T1] IPVS: ipvs loaded.
[ 12.126266][ T1] IPVS: [rr] scheduler registered.
[ 12.126266][ T1] IPVS: [wrr] scheduler registered.
[ 12.126266][ T1] IPVS: [lc] scheduler registered.
[ 12.126266][ T1] IPVS: [wlc] scheduler registered.
[ 12.126266][ T1] IPVS: [fo] scheduler registered.
[ 12.126266][ T1] IPVS: [ovf] scheduler registered.
[ 12.126266][ T1] IPVS: [lblc] scheduler registered.
[ 12.126266][ T1] IPVS: [lblcr] scheduler registered.
[ 12.126266][ T1] IPVS: [dh] scheduler registered.
[ 12.126266][ T1] IPVS: [sh] scheduler registered.
[ 12.126266][ T1] IPVS: [sed] scheduler registered.
[ 12.126266][ T1] IPVS: [nq] scheduler registered.
[ 12.126266][ T1] IPVS: [sip] pe registered.
[ 12.126266][ T1] ipip: IPv4 and MPLS over IPv4 tunneling driver
[ 12.126266][ T1] gre: GRE over IPv4 demultiplexor driver
[ 12.126266][ T1] ip_gre: GRE over IPv4 tunneling driver
[ 12.153320][ T1] IPv4 over IPsec tunneling driver
[ 12.156669][ T1] Initializing XFRM netlink socket
[ 12.157319][ T1] IPsec XFRM device driver
[ 12.158213][ T1] NET: Registered PF_INET6 protocol family
[ 12.164488][ T1] Segment Routing with IPv6
[ 12.164488][ T1] In-situ OAM (IOAM) with IPv6
[ 12.164488][ T1] mip6: Mobile IPv6
[ 12.164488][ T1] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[ 12.164488][ T1] ip6_gre: GRE over IPv6 tunneling driver
[ 12.164488][ T1] NET: Registered PF_PACKET protocol family
[ 12.176092][ T1] NET: Registered PF_KEY protocol family
[ 12.176897][ T1] Bridge firewalling registered
[ 12.177494][ T1] can: controller area network core
[ 12.178215][ T1] NET: Registered PF_CAN protocol family
[ 12.178854][ T1] can: raw protocol
[ 12.179282][ T1] can: broadcast manager protocol
[ 12.179869][ T1] can: netlink gateway - max_hops=1
[ 12.181032][ T1] lec:lane_module_init: lec.c: initialized
[ 12.181866][ T1] l2tp_core: L2TP core driver, V2.0
[ 12.182458][ T1] l2tp_ppp: PPPoL2TP kernel driver, V2.0
[ 12.182690][ T1] l2tp_ip: L2TP IP encapsulation support (L2TPv3)
[ 12.182690][ T1] l2tp_netlink: L2TP netlink interface
[ 12.182690][ T1] l2tp_eth: L2TP ethernet pseudowire support (L2TPv3)
[ 12.182690][ T1] l2tp_debugfs: L2TP debugfs support
[ 12.182690][ T1] l2tp_ip6: L2TP IP encapsulation support for IPv6 (L2TPv3)
[ 12.182690][ T1] 8021q: 802.1Q VLAN Support v1.8
[ 12.191820][ T1] Key type dns_resolver registered
[ 12.192448][ T1] Key type ceph registered
[ 12.193424][ T1] libceph: loaded (mon/osd proto 15/24)
[ 12.194192][ T1] openvswitch: Open vSwitch switching datapath
[ 12.195544][ T1] mpls_gso: MPLS GSO support
[ 12.211849][ T1] IPI shorthand broadcast: enabled
[ 13.141846][ T1] sched_clock: Marking stable (12946003101, 195453356)->(13187037302, -45580845)
[ 13.157173][ T1] registered taskstats version 1
[ 13.171445][ T1] Loading compiled-in X.509 certificates
[ 13.375195][ T1] Loaded X.509 cert 'Build time autogenerated kernel key: 8bd3e4a98356365a6d82dbebcab1c0386f688aed'
[ 13.509884][ T1] Demotion targets for Node 0: null
[ 13.512905][ T1] kmemleak: Kernel memory leak detector initialized (mem pool available: 13099)
[ 13.512961][ T228] kmemleak: Automatic memory scanning thread started
[ 13.518494][ T1] Key type .fscrypt registered
[ 13.521275][ T1] Key type fscrypt-provisioning registered
[ 13.537207][ T1] Key type encrypted registered
[ 13.538131][ T1] AppArmor: AppArmor sha256 policy hashing enabled
[ 13.541112][ T1] ima: No TPM chip found, activating TPM-bypass!
[ 13.542348][ T1] Loading compiled-in module X.509 certificates
[ 13.552728][ T1] Loaded X.509 cert 'Build time autogenerated kernel key: 8bd3e4a98356365a6d82dbebcab1c0386f688aed'
[ 13.554544][ T1] ima: Allocated hash algorithm: sha256
[ 13.555592][ T1] ima: No architecture policies found
[ 13.556948][ T1] evm: Initialising EVM extended attributes:
[ 13.557956][ T1] evm: security.selinux
[ 13.558664][ T1] evm: security.SMACK64 (disabled)
[ 13.559521][ T1] evm: security.SMACK64EXEC (disabled)
[ 13.560432][ T1] evm: security.SMACK64TRANSMUTE (disabled)
[ 13.561410][ T1] evm: security.SMACK64MMAP (disabled)
[ 13.562318][ T1] evm: security.apparmor
[ 13.563035][ T1] evm: security.ima
[ 13.563609][ T1] evm: security.capability
[ 13.564271][ T1] evm: HMAC attrs: 0x1
[ 13.704007][ T494] alg: No test for fips(ansi_cprng) (fips_ansi_cprng)
[ 13.730964][ T515] "cryptomgr_test" (515) uses obsolete ecb(arc4) skcipher
[ 13.769482][ T1] printk: legacy console [netcon0] enabled
[ 13.770896][ T1] netconsole: network logging started
[ 13.774526][ T1] saa7134_alsa: saa7134 ALSA driver for DMA sound loaded
[ 13.776195][ T1] saa7134_alsa: saa7134 ALSA: no saa7134 cards found
[ 14.010120][ T1] clk: Disabling unused clocks
[ 14.010864][ T1] ALSA device list:
[ 14.011414][ T1] #0: Dummy 1
[ 14.011929][ T1] #1: Loopback 1
[ 14.012479][ T1] #2: Virtual MIDI Card 1
[ 14.015525][ T1] md: Waiting for all devices to be available before autodetect
[ 14.018553][ T1] md: If you don't use raid, use raid=noautodetect
[ 14.020746][ T1] md: Autodetecting RAID arrays.
[ 14.022514][ T1] md: autorun ...
[ 14.023713][ T1] md: ... autorun DONE.
[ 14.254405][ T1] EXT4-fs (vda): warning: mounting fs with errors, running e2fsck is recommended
[ 14.279916][ T1] EXT4-fs (vda): Errors on filesystem, clearing orphan list.
[ 14.281090][ T1] EXT4-fs (vda): recovery complete
[ 14.283948][ T1] EXT4-fs (vda): mounted filesystem e4fb7975-5ae6-4691-99af-944cd89af02d r/w with ordered data mode. Quota mode: none.
[ 14.286035][ T1] VFS: Mounted root (ext4 filesystem) on device 252:0.
[ 14.288010][ T1] devtmpfs: mounted
[ 14.289411][ T1] integrity: Unable to open file: /etc/keys/x509_ima.der (-2)
[ 14.289512][ T1] integrity: Unable to open file: /etc/keys/x509_evm.der (-2)
[ 14.408551][ T1] Freeing unused decrypted memory: 2028K
[ 14.418364][ T1] Freeing unused kernel image (initmem) memory: 26564K
[ 14.419738][ T1] Write protecting the kernel read-only data: 210944k
[ 14.425423][ T1] Freeing unused kernel image (text/rodata gap) memory: 1092K
[ 14.427556][ T1] Freeing unused kernel image (rodata/data gap) memory: 1432K
[ 14.445803][ T1] Run /sbin/init as init process
[ 14.766446][ T1] systemd[1]: systemd 245.4-4ubuntu3.18 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=hybrid)
[ 14.772673][ T1] systemd[1]: Detected virtualization kvm.
[ 14.774022][ T1] systemd[1]: Detected architecture x86-64.
[ 14.775258][ T1] /proc/cgroups lists only v1 controllers, use cgroup.controllers of root cgroup for v2 info
Welcome to Ubuntu 20.04.5 LTS!
[ 14.809114][ T1] systemd[1]: Set hostname to <qemu>.
[ 15.567124][ T1] systemd[1]: Created slice system-getty.slice.
[ OK ] Created slice system-getty.slice.
[ 15.572186][ T1] systemd[1]: Created slice system-modprobe.slice.
[ OK ] Created slice system-modprobe.slice.
[ 15.576911][ T1] systemd[1]: Created slice system-serial\x2dgetty.slice.
[ OK ] Created slice system-serial\x2dgetty.slice.
[ 15.582180][ T1] systemd[1]: Created slice User and Session Slice.
[ OK ] Created slice User and Session Slice.
[ 15.585673][ T1] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[ OK ] Started Dispatch Password ??ts to Console Directory Watch.
[ 15.589744][ T1] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[ OK ] Started Forward Password R??uests to Wall Directory Watch.
[ 15.594988][ T1] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[ OK ] Set up automount Arbitrary??s File System Automount Point.
[ 15.598631][ T1] systemd[1]: Reached target Local Encrypted Volumes.
[ OK ] Reached target Local Encrypted Volumes.
[ 15.601382][ T1] systemd[1]: Reached target Paths.
[ OK ] Reached target Paths.
[ 15.603504][ T1] systemd[1]: Reached target Remote File Systems.
[ OK ] Reached target Remote File Systems.
[ 15.606446][ T1] systemd[1]: Reached target Slices.
[ OK ] Reached target Slices.
[ 15.610820][ T1] systemd[1]: Reached target Swap.
[ OK ] Reached target Swap.
[ 15.617747][ T1] systemd[1]: Listening on Syslog Socket.
[ OK ] Listening on Syslog Socket.
[ 15.622504][ T1] systemd[1]: Listening on initctl Compatibility Named Pipe.
[ OK ] Listening on initctl Compatibility Named Pipe.
[ 15.630450][ T1] systemd[1]: Listening on Journal Audit Socket.
[ OK ] Listening on Journal Audit Socket.
[ 15.635349][ T1] systemd[1]: Listening on Journal Socket (/dev/log).
[ OK ] Listening on Journal Socket (/dev/log).
[ 15.640748][ T1] systemd[1]: Listening on Journal Socket.
[ OK ] Listening on Journal Socket.
[ 15.644627][ T1] systemd[1]: Listening on udev Control Socket.
[ OK ] Listening on udev Control Socket.
[ 15.648268][ T1] systemd[1]: Listening on udev Kernel Socket.
[ OK ] Listening on udev Kernel Socket.
[ 15.685881][ T1] systemd[1]: Mounting Huge Pages File System...
Mounting Huge Pages File System...
[ 15.702383][ T1] systemd[1]: Mounting POSIX Message Queue File System...
Mounting POSIX Message Queue File System...
[ 15.715336][ T1] systemd[1]: Mounting Kernel Debug File System...
Mounting Kernel Debug File System...
[ 15.730055][ T1] systemd[1]: Mounting Kernel Trace File System...
Mounting Kernel Trace File System...
[ 15.752433][ T1] systemd[1]: Starting Journal Service...
Starting Journal Service...
[ 15.756547][ T1] systemd[1]: Condition check resulted in Create list of static device nodes for the current kernel being skipped.
[ 15.765559][ T1] systemd[1]: Starting Load Kernel Module chromeos_pstore...
Starting Load Kernel Module chromeos_pstore...
[ 15.775040][ T1] systemd[1]: Starting Load Kernel Module drm...
Starting Load Kernel Module drm...
[ 15.776487][ T1] systemd[1]: Condition check resulted in Load Kernel Module efi_pstore being skipped.
[ 15.784886][ T1] systemd[1]: Starting Load Kernel Module pstore_blk...
Starting Load Kernel Module pstore_blk...
[ 15.806879][ T1] systemd[1]: Starting Load Kernel Module pstore_zone...
Starting Load Kernel Module pstore_zone...
[ 15.809682][ T1] systemd[1]: Condition check resulted in Load Kernel Module ramoops being skipped.
[ 15.812742][ T1] systemd[1]: Condition check resulted in Set Up Additional Binary Formats being skipped.
[ 15.824685][ T1] systemd[1]: Starting Load Kernel Modules...
Starting Load Kernel Modules...
[ 15.835283][ T1] systemd[1]: Starting Remount Root and Kernel File Systems...
Starting Remount Root and Kernel File Systems...
[ 15.844324][ T1] systemd[1]: Starting udev Coldplug all Devices...
Starting udev Coldplug all Devices...
[ 15.857207][ T1] systemd[1]: Mounted Huge Pages File System.
[ OK ] Mounted Huge Pages File System.
[ 15.877582][ T1] systemd[1]: Mounted POSIX Message Queue File System.
[ OK ] Mounted POSIX Message Queue File System.
[ 15.888037][ T1] systemd[1]: Mounted Kernel Debug File System.
[ OK ] Mounted Kernel Debug File System.
[ 15.894077][ T1] systemd[1]: Mounted Kernel Trace File System.
[ OK ] Mounted Kernel Trace File System.
[ 15.898954][ T1] systemd[1]: modprobe@chromeos_pstore.service: Succeeded.
[ 15.901197][ T1] systemd[1]: Finished Load Kernel Module chromeos_pstore.
[ OK ] Finished Load Kernel Module chromeos_pstore.
[ 15.906134][ T1] systemd[1]: modprobe@drm.service: Succeeded.
[ 15.908313][ T1] systemd[1]: Finished Load Kernel Module drm.
[ OK ] Finished Load Kernel Module drm.
[ 15.911541][ T1] systemd[1]: modprobe@pstore_blk.service: Succeeded.
[ 15.915674][ T1] systemd[1]: Finished Load Kernel Module pstore_blk.
[ OK ] Finished Load Kernel Module pstore_blk.
[ 15.919011][ T1] systemd[1]: modprobe@pstore_zone.service: Succeeded.
[ 15.921233][ T1] systemd[1]: Finished Load Kernel Module pstore_zone.
[ OK ] Finished Load Kernel Module pstore_zone.
[ 15.927635][ T1] systemd[1]: Finished Load Kernel Modules.
[ OK ] Finished Load Kernel Modules.
[ 15.931846][ T1] systemd[1]: Finished Remount Root and Kernel File Systems.
[ OK ] Finished Remount Root and Kernel File Systems.
[ 15.964500][ T1] systemd[1]: Mounting FUSE Control File System...
Mounting FUSE Control File System...
[ 15.976537][ T1] systemd[1]: Mounting Kernel Configuration File System...
Mounting Kernel Configuration File System...
[ 15.982340][ T1] systemd[1]: Condition check resulted in Rebuild Hardware Database being skipped.
[ 15.983325][ T1] systemd[1]: Condition check resulted in Platform Persistent Storage Archival being skipped.
[ 16.002607][ T1] systemd[1]: Starting Load/Save Random Seed...
Starting Load/Save Random Seed...
[ 16.014146][ T1] systemd[1]: Starting Apply Kernel Variables...
Starting Apply Kernel Variables...
[ 16.026579][ T1] systemd[1]: Starting Create System Users...
Starting Create System Users...
[ 16.035240][ T1] systemd[1]: Started Journal Service.
[ OK ] Started Journal Service.
[ OK ] Mounted FUSE Control File System.
[ OK ] Mounted Kernel Configuration File System.
Starting Flush Journal to Persistent Storage...
[ 16.117044][ T572] systemd-journald[572]: Received client request to flush runtime journal.
[ OK ] Finished Load/Save Random Seed.
[ OK ] Finished Apply Kernel Variables.
[ OK ] Finished Create System Users.
Starting Create Static Device Nodes in /dev...
[ OK ] Finished Create Static Device Nodes in /dev.
[ OK ] Reached target Local File Systems (Pre).
[ OK ] Reached target Local File Systems.
Starting udev Kernel Device Manager...
[ OK ] Finished Flush Journal to Persistent Storage.
Starting Create Volatile Files and Directories...
[ OK ] Started udev Kernel Device Manager.
[ OK ] Finished Create Volatile Files and Directories.
Starting Network Name Resolution...
Starting Network Time Synchronization...
Starting Update UTMP about System Boot/Shutdown...
[ OK ] Finished Update UTMP about System Boot/Shutdown.
[ OK ] Started Network Time Synchronization.
[ OK ] Reached target System Time Set.
[ OK ] Reached target System Time Synchronized.
[ OK ] Started Network Name Resolution.
[ OK ] Reached target Host and Network Name Lookups.
[ OK ] Finished udev Coldplug all Devices.
[ OK ] Reached target System Initialization.
[ OK ] Started Daily apt download activities.
[ OK ] Started Daily apt upgrade and clean activities.
[ OK ] Started Periodic ext4 Onli??ata Check for All Filesystems.
[ OK ] Started Discard unused blocks once a week.
[ OK ] Started Daily rotation of log files.
[ OK ] Started Message of the Day.
[ OK ] Started Daily Cleanup of Temporary Directories.
[ OK ] Reached target Timers.
[ OK ] Listening on D-Bus System Message Bus Socket.
[ OK ] Reached target Sockets.
[ OK ] Reached target Basic System.
[ OK ] Started Regular background program processing daemon.
[ OK ] Started D-Bus System Message Bus.
Starting Network Manager...
[ OK ] Started Save initial kernel messages after boot.
Starting Remove Stale Onli??t4 Metadata Check Snapshots...
Starting Helper to synchronize boot up for ifupdown...
Starting LSB: Execute the ??-e command to reboot system...
Starting Dispatcher daemon for systemd-networkd...
Starting Authorization Manager...
Starting Restore /etc/reso?? the ppp link was shut down...
Starting System Logging Service...
Starting Resets System Activity Data Collector...
Starting Login Service...
Starting WPA supplicant...
[ OK ] Finished Restore /etc/reso??re the ppp link was shut down.
[ OK ] Finished Resets System Activity Data Collector.
[ OK ] Started System Logging Service.
[ OK ] Started WPA supplicant.
[ OK ] Started Network Manager.
[ OK ] Started Authorization Manager.
Starting Modem Manager...
[ OK ] Started LSB: Execute the k??c -e command to reboot system.
Starting LSB: Load kernel image with kexec...
[ OK ] Started LSB: Load kernel image with kexec.
[ OK ] Started Modem Manager.
Starting Hostname Service...
[ OK ] Started Dispatcher daemon for systemd-networkd.
[ OK ] Finished Remove Stale Onli??ext4 Metadata Check Snapshots.
[ OK ] Started Login Service.
[ OK ] Started Hostname Service.
Starting Network Manager Script Dispatcher Service...
[ OK ] Started Network Manager Script Dispatcher Service.
[ OK ] Reached target Sound Card.
[ OK ] Reached target Printer.
[ OK ] Found device /dev/ttyS0.
[ OK ] Listening on Load/Save RF ??itch Status /dev/rfkill Watch.
[ OK ] Finished Helper to synchronize boot up for ifupdown.
Starting Raise network interfaces...
[FAILED] Failed to start Raise network interfaces.
See 'systemctl status networking.service' for details.
[ OK ] Reached target Network.
Starting OpenBSD Secure Shell server...
Starting Permit User Sessions...
[ OK ] Finished Permit User Sessions.
[ OK ] Started Getty on tty1.
[ OK ] Started Serial Getty on ttyS0.
[ OK ] Reached target Login Prompts.
Ubuntu 20.04.5 LTS qemu ttyS0
qemu login:
.... skip unrelated log .....
[ 172.045217][ T6378] overlay: filesystem on ./file0 not supported as upperdir
[ 172.046704][ T6378] overlay: filesystem on ./file0 not supported as upperdir
[ 172.054360][ T6378] overlay: filesystem on ./file0 not supported as upperdir
[ 172.060124][ T6378] overlay: filesystem on ./file0 not supported as upperdir
[ 172.068280][ T6378] overlay: filesystem on ./file0 not supported as upperdir
[ 172.071691][ T6378] overlay: filesystem on ./file0 not supported as upperdir
[ 172.082069][ T6378] overlay: filesystem on ./file0 not supported as upperdir
[ 172.087936][ T6378] overlay: filesystem on ./file0 not supported as upperdir
[ 172.110142][ T1281] bond0 (unregistering): (slave bond_slave_0): Releasing backup interface
[ 172.120287][ T1281] bond0 (unregistering): (slave bond_slave_1): Releasing backup interface
[ 172.128148][ T1281] bond0 (unregistering): Released all slaves
[ 172.130452][ T1176] netdevsim netdevsim5 eni5np2: renamed from eth1
[ 172.137979][ T3523] netdevsim netdevsim5 eni5np1: renamed from eth0
[ 172.154779][ T1281] veth1_macvtap: left promiscuous mode
[ 172.155290][ T1281] veth0_macvtap: left promiscuous mode
[ 172.155838][ T1281] veth1_vlan: left promiscuous mode
[ 172.156303][ T1281] veth0_vlan: left promiscuous mode
[ 172.178241][ T6429] netlink: 'syz.7.548': attribute type 17 has an invalid length.
[ 172.258919][ T4624] veth0_vlan: entered promiscuous mode
[ 172.268448][ T5244] netdevsim netdevsim2 netdevsim0: renamed from eth0
[ 172.274348][ T5244] netdevsim netdevsim2 netdevsim1: renamed from eth1
[ 172.310019][ T6380] : renamed from bridge_slave_1 (while UP)
[ 172.312968][ T1286] bridge0: port 1(bridge_slave_0) entered blocking state
[ 172.313629][ T1286] bridge0: port 1(bridge_slave_0) entered forwarding state
[ 172.349057][ T3989] netdevsim netdevsim5 eni5np4: renamed from eth3
[ 172.363860][ T4624] veth1_vlan: entered promiscuous mode
[ 172.373334][ T47] bridge0: port 2(bridge_slave_1) entered blocking state
[ 172.374003][ T47] bridge0: port 2(bridge_slave_1) entered forwarding state
[ 172.385261][ T5244] netdevsim netdevsim2 netdevsim2: renamed from eth2
[ 172.417330][ T53] audit: type=1326 audit(1749004377.447:59): auid=0 uid=0 gid=0 ses=1 subj=unconfined pid=6472 comm="syz.0.559" exe="/root/syzkaller/syz-executor" sig=31 arch=c000003e syscall=202 compat=0 ip=0x54d2cd code=0x0
[ 172.487402][ T5244] netdevsim netdevsim2 netdevsim3: renamed from eth3
[ 172.599719][ T5469] netdevsim netdevsim13 netdevsim0: renamed from eth0
[ 232.663579][ C1] rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
[ 232.664238][ C1] rcu: 2-...!: (1 GPs behind) idle=e984/1/0x4000000000000000 softirq=13264/13265 fqs=1
[ 232.665080][ C1] rcu: (detected by 1, t=60003 jiffies, g=45681, q=6747 ncpus=4)
[ 232.665724][ C1] Sending NMI from CPU 1 to CPUs 2:
[ 232.665754][ C2] NMI backtrace for cpu 2
[ 232.665766][ C2] CPU: 2 UID: 0 PID: 1271 Comm: syz-executor Not tainted 6.15.0-rc7 #9 PREEMPT(undef)
[ 232.665778][ C2] Hardware name: QEMU Ubuntu 24.04 PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015
[ 232.665783][ C2] RIP: 0010:__irq_work_queue_local+0x41/0x2a0
[ 232.665815][ C2] Code: 48 89 ef e8 41 9b 4e 00 48 89 ea 48 b8 00 00 00 00 00 fc ff df 48 c1 ea 03 0f b6 14 02 48 89 e8 83 e0 07 83 c0 03 38 d0 7c 08 <84> d2 0f 85 0b 02 00 00 8b 6b 08 31 ff 83 e5 04 89 ee e8 b8 01 e5
[ 232.665824][ C2] RSP: 0018:ff11000119708db0 EFLAGS: 00000006
[ 232.665832][ C2] RAX: 0000000000000003 RBX: ff11000119742170 RCX: ffffffffa2a4269f
[ 232.665838][ C2] RDX: 0000000000000000 RSI: 0000000000000004 RDI: ff11000119742178
[ 232.665844][ C2] RBP: ff11000119742178 R08: 0000000000000000 R09: ffe21c00232e842f
[ 232.665850][ C2] R10: ff1100011974217b R11: ff11000119708ff8 R12: ff11000119742170
[ 232.665856][ C2] R13: 0000000000000002 R14: ffa00000046c6001 R15: 0000000000000000
[ 232.665862][ C2] FS: 000000002ae69500(0000) GS:ff110001659aa000(0000) knlGS:0000000000000000
[ 232.665871][ C2] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 232.665878][ C2] CR2: 00000000012c56c0 CR3: 0000000026591003 CR4: 0000000000771ef0
[ 232.665884][ C2] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 232.665889][ C2] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 232.665895][ C2] PKRU: 00000000
[ 232.665898][ C2] Call Trace:
[ 232.665903][ C2] <IRQ>
[ 232.665910][ C2] irq_work_queue_on+0x184/0x1b0
[ 232.665923][ C2] bpf_trace_run2+0x1c3/0x370
[ 232.665934][ C2] ? __pfx_tick_nohz_handler+0x10/0x10
[ 232.665945][ C2] ? __pfx_bpf_trace_run2+0x10/0x10
[ 232.665956][ C2] ? _raw_spin_lock_irqsave+0x8a/0xe0
[ 232.665971][ C2] __bpf_trace_tick_stop+0xb3/0xf0
[ 232.665981][ C2] ? __pfx___bpf_trace_tick_stop+0x10/0x10
[ 232.665991][ C2] ? sched_clock_cpu+0x19/0x1d0
[ 232.666005][ C2] ? rcu_report_qs_rdp+0x2e7/0x380
[ 232.666018][ C2] ? kvm_sched_clock_read+0x16/0x30
[ 232.666028][ C2] check_tick_dependency+0x40a/0x670
[ 232.666039][ C2] __tick_nohz_full_update_tick+0xcc/0x210
[ 232.666050][ C2] tick_nohz_irq_exit+0x1e6/0x240
[ 232.666062][ C2] sysvec_irq_work+0xa4/0xb0
[ 232.666075][ C2] </IRQ>
[ 232.666078][ C2] <TASK>
[ 232.666081][ C2] asm_sysvec_irq_work+0x1a/0x20
[ 232.666092][ C2] RIP: 0010:__sanitizer_cov_trace_pc+0x0/0x80
[ 232.666104][ C2] Code: 48 89 70 18 5b 5d 41 5c 41 5d c3 cc cc cc cc 48 c7 c0 f4 ff ff ff eb 92 66 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 <f3> 0f 1e fa 48 8b 0c 24 65 48 8b 15 78 ae 4e 11 65 8b 05 89 ae 4e
[ 232.666112][ C2] RSP: 0018:ff110000023c7af0 EFLAGS: 00000202
[ 232.666119][ C2] RAX: 0000000000000000 RBX: 0000000000000010 RCX: ffffffffa256dcae
[ 232.666125][ C2] RDX: ff1100010952a180 RSI: 0000000000000000 RDI: ff11000001f42600
[ 232.666131][ C2] RBP: ff11000001f42698 R08: 0000000000000001 R09: ffe21c0000478f5b
[ 232.666137][ C2] R10: 0000000080000001 R11: 0000000000000000 R12: ff11000001f42688
[ 232.666142][ C2] R13: 0000000000000004 R14: ff11000001f42600 R15: 0000000000400000
[ 232.666150][ C2] ? alloc_pid+0x8be/0xc20
[ 232.666169][ C2] pidfs_add_pid+0x1b/0x340
[ 232.666183][ C2] alloc_pid+0x8d7/0xc20
[ 232.666195][ C2] copy_process+0x27de/0x5030
[ 232.666207][ C2] ? __pfx_copy_process+0x10/0x10
[ 232.666215][ C2] ? handle_pte_fault+0x46c/0x8a0
[ 232.666230][ C2] ? __virt_addr_valid+0xf0/0x190
[ 232.666240][ C2] ? __sanitizer_cov_trace_switch+0x54/0x90
[ 232.666253][ C2] kernel_clone+0xe8/0x930
[ 232.666262][ C2] ? __pfx_kernel_clone+0x10/0x10
[ 232.666271][ C2] ? __pfx___handle_mm_fault+0x10/0x10
[ 232.666286][ C2] __do_sys_clone+0xce/0x120
[ 232.666296][ C2] ? __pfx___do_sys_clone+0x10/0x10
[ 232.666308][ C2] ? get_vtime_delta+0x11a/0x240
[ 232.666317][ C2] ? vtime_user_exit+0x5b/0x170
[ 232.666331][ C2] ? ct_kernel_enter.constprop.0+0x89/0xe0
[ 232.666343][ C2] do_syscall_64+0x5f/0x170
[ 232.666353][ C2] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 232.666363][ C2] RIP: 0033:0x57d1b7
[ 232.666375][ C2] Code: 5d c3 90 f3 0f 1e fa 64 48 8b 04 25 10 00 00 00 45 31 c0 31 d2 31 f6 bf 11 00 20 01 4c 8d 90 d0 02 00 00 b8 38 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 39 89 c2 85 c0 75 2c 64 48 8b 04 25 10 00 00
[ 232.666384][ C2] RSP: 002b:00007ffcc87ccdc8 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
[ 232.666392][ C2] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000057d1b7
[ 232.666398][ C2] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011
[ 232.666404][ C2] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000001
[ 232.666409][ C2] R10: 000000002ae697d0 R11: 0000000000000246 R12: 0000000000000001
[ 232.666415][ C2] R13: 000000000002a17a R14: 0000000000000000 R15: 0000000000000032
[ 232.666424][ C2] </TASK>
[ 232.666737][ C1] rcu: rcu_preempt kthread starved for 59811 jiffies! g45681 f0x0 RCU_GP_WAIT_FQS(5) ->state=0x0 ->cpu=1
[ 232.706098][ C1] rcu: Unless rcu_preempt kthread gets sufficient CPU time, OOM is now expected behavior.
[ 232.706894][ C1] rcu: RCU grace-period kthread stack dump:
[ 232.707370][ C1] task:rcu_preempt state:R running task stack:0 pid:15 tgid:15 ppid:2 task_flags:0x208040 flags:0x00004000
[ 232.708446][ C1] Call Trace:
[ 232.708719][ C1] <TASK>
[ 232.708966][ C1] __schedule+0x80a/0x1a50
[ 232.709341][ C1] ? __pfx___schedule+0x10/0x10
[ 232.709741][ C1] ? __pfx___mod_timer+0x10/0x10
[ 232.710148][ C1] ? __pfx___try_to_del_timer_sync+0x10/0x10
[ 232.710642][ C1] ? _raw_spin_lock_irqsave+0x8a/0xe0
[ 232.711082][ C1] schedule+0x6b/0x180
[ 232.711424][ C1] schedule_timeout+0x116/0x240
[ 232.711830][ C1] ? __pfx_schedule_timeout+0x10/0x10
[ 232.712277][ C1] ? __pfx_process_timeout+0x10/0x10
[ 232.712715][ C1] ? prepare_to_swait_event+0xb7/0x440
[ 232.713167][ C1] rcu_gp_fqs_loop+0x193/0x780
[ 232.713564][ C1] ? __pfx_rcu_gp_fqs_loop+0x10/0x10
[ 232.714001][ C1] rcu_gp_kthread+0x270/0x3a0
[ 232.714394][ C1] ? __pfx_rcu_gp_kthread+0x10/0x10
[ 232.714822][ C1] ? __pfx_kthread_affine_node+0x10/0x10
[ 232.715286][ C1] ? __kthread_parkme+0x143/0x1c0
[ 232.715698][ C1] ? __pfx_rcu_gp_kthread+0x10/0x10
[ 232.716125][ C1] kthread+0x3c0/0x4e0
[ 232.716468][ C1] ? __pfx_kthread+0x10/0x10
[ 232.716881][ C1] ret_from_fork+0x4d/0x80
[ 232.717252][ C1] ? __pfx_kthread+0x10/0x10
[ 232.717637][ C1] ret_from_fork_asm+0x1a/0x30
[ 232.718033][ C1] </TASK>
[ 232.718290][ C1] rcu: Stack dump where RCU GP kthread last ran:
[ 232.718799][ C1] CPU: 1 UID: 0 PID: 1286 Comm: kworker/u16:8 Not tainted 6.15.0-rc7 #9 PREEMPT(undef)
[ 232.719579][ C1] Hardware name: QEMU Ubuntu 24.04 PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015
[ 232.720322][ C1] Workqueue: events_unbound call_usermodehelper_exec_work
[ 232.720901][ C1] RIP: 0010:queued_spin_lock_slowpath+0x243/0xa90
[ 232.721438][ C1] Code: 02 48 89 e8 83 e0 07 83 c0 01 38 d0 7c 08 84 d2 0f 85 e8 07 00 00 b8 01 00 00 00 66 89 45 00 e9 c2 fe ff ff 89 44 24 38 f3 90 <e9> 5e fe ff ff 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03
[ 232.722977][ C1] RSP: 0018:ff11000001baf7a8 EFLAGS: 00000202
[ 232.723474][ C1] RAX: 0000000000000001 RBX: 0000000000000001 RCX: ffffffffab2e0c33
[ 232.724111][ C1] RDX: fffffbfff5d81829 RSI: 0000000000000004 RDI: ffffffffaec0c140
[ 232.724753][ C1] RBP: ffffffffaec0c140 R08: 0000000000000000 R09: fffffbfff5d81828
[ 232.725394][ C1] R10: ffffffffaec0c143 R11: 0000000000000000 R12: 1fe2200000375ef6
[ 232.726033][ C1] R13: 0000000000000003 R14: fffffbfff5d81828 R15: ff11000001baf7e0
[ 232.726673][ C1] FS: 0000000000000000(0000) GS:ff1100016592a000(0000) knlGS:0000000000000000
[ 232.727389][ C1] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 232.727924][ C1] CR2: 00007f6da92d83b8 CR3: 0000000053ecc003 CR4: 0000000000771ef0
[ 232.728571][ C1] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 232.729221][ C1] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 232.729858][ C1] PKRU: 55555554
[ 232.730153][ C1] Call Trace:
[ 232.730429][ C1] <TASK>
[ 232.730674][ C1] ? __pfx_queued_spin_lock_slowpath+0x10/0x10
[ 232.731184][ C1] ? kmem_cache_free+0x134/0x4f0
[ 232.731593][ C1] ? __cleanup_sighand+0x78/0xa0
[ 232.732002][ C1] ? __change_pid+0x2f4/0x560
[ 232.732396][ C1] _raw_spin_lock+0xce/0xe0
[ 232.732771][ C1] ? __pfx__raw_spin_lock+0x10/0x10
[ 232.733202][ C1] ? blake2s_update+0x14b/0x1f0
[ 232.733608][ C1] free_pid+0x3b/0x260
[ 232.733948][ C1] ? __pfx_add_device_randomness+0x10/0x10
[ 232.734434][ C1] free_pids+0x4a/0x80
[ 232.734775][ C1] release_task+0x31e/0x670
[ 232.735152][ C1] ? __pfx_release_task+0x10/0x10
[ 232.735570][ C1] ? __pfx_thread_group_cputime_adjusted+0x10/0x10
[ 232.736103][ C1] ? __pfx__raw_spin_lock_irq+0x10/0x10
[ 232.736562][ C1] wait_task_zombie+0x1527/0x20f0
[ 232.736978][ C1] ? set_next_entity+0x309/0x610
[ 232.737390][ C1] ? __pfx_wait_task_zombie+0x10/0x10
[ 232.737830][ C1] ? finish_task_switch.isra.0+0x148/0x770
[ 232.738329][ C1] wait_consider_task+0x4d7/0x690
[ 232.738774][ C1] do_wait_pid+0x2ca/0x370
[ 232.739178][ C1] __do_wait+0x4d8/0x5b0
[ 232.739545][ C1] ? __pfx___do_wait+0x10/0x10
[ 232.739970][ C1] do_wait+0x126/0x410
[ 232.740341][ C1] kernel_wait+0xa4/0x160
[ 232.740732][ C1] ? __pfx_kernel_wait+0x10/0x10
[ 232.741184][ C1] ? __pfx_child_wait_callback+0x10/0x10
[ 232.741676][ C1] ? __pfx___schedule+0x10/0x10
[ 232.742095][ C1] ? __pfx__raw_spin_lock_irq+0x10/0x10
[ 232.742587][ C1] call_usermodehelper_exec_work+0xfe/0x190
[ 232.743114][ C1] process_one_work+0x70b/0x11c0
[ 232.743559][ C1] worker_thread+0x7bf/0xc30
[ 232.743967][ C1] ? __pfx_worker_thread+0x10/0x10
[ 232.744424][ C1] kthread+0x3c0/0x4e0
[ 232.744787][ C1] ? __pfx_kthread+0x10/0x10
[ 232.745201][ C1] ret_from_fork+0x4d/0x80
[ 232.745591][ C1] ? __pfx_kthread+0x10/0x10
[ 232.746006][ C1] ret_from_fork_asm+0x1a/0x30
[ 232.746432][ C1] </TASK>
[ 301.380092][ C0] watchdog: BUG: soft lockup - CPU#0 stuck for 130s! [systemd-udevd:3523]
[ 301.380107][ C0] Modules linked in:
[ 301.380116][ C0] CPU: 0 UID: 0 PID: 3523 Comm: systemd-udevd Not tainted 6.15.0-rc7 #9 PREEMPT(undef)
[ 301.380128][ C0] Hardware name: QEMU Ubuntu 24.04 PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015
[ 301.380133][ C0] RIP: 0010:queued_spin_lock_slowpath+0x243/0xa90
[ 301.380170][ C0] Code: 02 48 89 e8 83 e0 07 83 c0 01 38 d0 7c 08 84 d2 0f 85 e8 07 00 00 b8 01 00 00 00 66 89 45 00 e9 c2 fe ff ff 89 44 24 38 f3 90 <e9> 5e fe ff ff 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03
[ 301.380180][ C0] RSP: 0018:ff1100002ebcf7b8 EFLAGS: 00000202
[ 301.380188][ C0] RAX: 0000000000000001 RBX: 0000000000000001 RCX: ffffffffab2e0c33
[ 301.380194][ C0] RDX: fffffbfff5d81829 RSI: 0000000000000004 RDI: ffffffffaec0c140
[ 301.380200][ C0] RBP: ffffffffaec0c140 R08: 0000000000000000 R09: fffffbfff5d81828
[ 301.380206][ C0] R10: ffffffffaec0c143 R11: 0000000000000000 R12: 1fe2200005d79ef8
[ 301.380213][ C0] R13: 0000000000000003 R14: fffffbfff5d81828 R15: ff1100002ebcf7f0
[ 301.380219][ C0] FS: 00007f316675b880(0000) GS:ff110001658aa000(0000) knlGS:0000000000000000
[ 301.380229][ C0] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 301.380236][ C0] CR2: 00007ffd2b7b2898 CR3: 0000000057de9002 CR4: 0000000000771ef0
[ 301.380242][ C0] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 301.380248][ C0] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 301.380254][ C0] PKRU: 55555554
[ 301.380258][ C0] Call Trace:
[ 301.380262][ C0] <TASK>
[ 301.380265][ C0] ? __pfx_evict+0x10/0x10
[ 301.380280][ C0] ? __pfx_queued_spin_lock_slowpath+0x10/0x10
[ 301.380291][ C0] ? __call_rcu_common.constprop.0+0x327/0x940
[ 301.380307][ C0] ? _raw_spin_lock+0x84/0xe0
[ 301.380317][ C0] ? __pfx__raw_spin_lock+0x10/0x10
[ 301.380328][ C0] _raw_spin_lock+0xce/0xe0
[ 301.380338][ C0] ? __pfx__raw_spin_lock+0x10/0x10
[ 301.380348][ C0] ? blake2s_update+0x14b/0x1f0
[ 301.380361][ C0] free_pid+0x3b/0x260
[ 301.380373][ C0] ? __pfx_add_device_randomness+0x10/0x10
[ 301.380389][ C0] free_pids+0x4a/0x80
[ 301.380400][ C0] release_task+0x31e/0x670
[ 301.380412][ C0] ? __pfx_release_task+0x10/0x10
[ 301.380422][ C0] ? __pfx_thread_group_cputime_adjusted+0x10/0x10
[ 301.380439][ C0] ? __pfx__raw_spin_lock_irq+0x10/0x10
[ 301.380450][ C0] ? __kernel_text_address+0x66/0xb0
[ 301.380464][ C0] wait_task_zombie+0x1527/0x20f0
[ 301.380477][ C0] ? __pfx_wait_task_zombie+0x10/0x10
[ 301.380487][ C0] ? stack_trace_save+0x93/0xd0
[ 301.380498][ C0] ? stack_depot_save_flags+0x6a/0x640
[ 301.380515][ C0] wait_consider_task+0x4d7/0x690
[ 301.380526][ C0] do_wait_pid+0x2ca/0x370
[ 301.380537][ C0] __do_wait+0x4d8/0x5b0
[ 301.380548][ C0] ? __pfx__raw_spin_lock_irqsave+0x10/0x10
[ 301.380559][ C0] ? __pfx___do_wait+0x10/0x10
[ 301.380570][ C0] ? kernel_waitid_prepare+0x19e/0x3b0
[ 301.380582][ C0] ? add_wait_queue+0x103/0x260
[ 301.380596][ C0] do_wait+0x126/0x410
[ 301.380607][ C0] kernel_waitid+0x106/0x170
[ 301.380619][ C0] ? __pfx_kernel_waitid+0x10/0x10
[ 301.380631][ C0] ? __pfx_child_wait_callback+0x10/0x10
[ 301.380645][ C0] __do_sys_waitid+0x200/0x230
[ 301.380657][ C0] ? __pfx___do_sys_waitid+0x10/0x10
[ 301.380668][ C0] ? __seccomp_filter+0x117/0xca0
[ 301.380686][ C0] ? __x64_sys_epoll_ctl+0x14f/0x1d0
[ 301.380703][ C0] ? __secure_computing+0x1de/0x2e0
[ 301.380719][ C0] do_syscall_64+0x5f/0x170
[ 301.380730][ C0] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 301.380741][ C0] RIP: 0033:0x7f31669e9ced
[ 301.380754][ C0] Code: eb c2 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 41 89 ca 64 8b 04 25 18 00 00 00 85 c0 75 1d 45 31 c0 b8 f7 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 6b c3 66 2e 0f 1f 84 00 00 00 00 00 48 83 ec
[ 301.380763][ C0] RSP: 002b:00007ffd2b7b38c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000f7
[ 301.380772][ C0] RAX: ffffffffffffffda RBX: 00007ffd2b7b38e0 RCX: 00007f31669e9ced
[ 301.380778][ C0] RDX: 000055bf2691aeb0 RSI: 000000000000196f RDI: 0000000000000001
[ 301.380784][ C0] RBP: 000055bf2691ae40 R08: 0000000000000000 R09: 0000000000000000
[ 301.380790][ C0] R10: 0000000000000005 R11: 0000000000000246 R12: 0000000000000001
[ 301.380796][ C0] R13: 0000000000000007 R14: 000055bf2691aeb0 R15: 000055bf26727450
[ 301.380805][ C0] </TASK>
[ 301.380809][ C0] Sending NMI from CPU 0 to CPUs 1-3:
[ 301.416087][ C2] NMI backtrace for cpu 2
[ 301.416099][ C2] CPU: 2 UID: 0 PID: 1271 Comm: syz-executor Not tainted 6.15.0-rc7 #9 PREEMPT(undef)
[ 301.416111][ C2] Hardware name: QEMU Ubuntu 24.04 PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015
[ 301.416117][ C2] RIP: 0010:asm_sysvec_irq_work+0x0/0x20
[ 301.416132][ C2] Code: 66 d2 4b 09 e9 b1 05 00 00 90 f3 0f 1e fa 0f 01 ca fc 6a ff e8 61 04 00 00 48 89 c4 48 89 e7 e8 f6 9f 4b 09 e9 91 05 00 00 90 <f3> 0f 1e fa 0f 01 ca fc 6a ff e8 41 04 00 00 48 89 c4 48 89 e7 e8
[ 301.416141][ C2] RSP: 0018:ff11000119708f48 EFLAGS: 00000086
[ 301.416149][ C2] RAX: ffe21c00212a5430 RBX: 00000000ffffffff RCX: 1fe22000232e578c
[ 301.416156][ C2] RDX: dffffc0000000000 RSI: dffffc0000000000 RDI: ff1100011972bc60
[ 301.416162][ C2] RBP: ff110000023c7a48 R08: 000000362c06bb4c R09: ffe21c00232e57b9
[ 301.416174][ C2] R10: 0000000000000000 R11: 1fe220002281c207 R12: 0000000000000000
[ 301.416179][ C2] R13: 0000000000000200 R14: 0000000000000000 R15: 0000000000000000
[ 301.416185][ C2] FS: 000000002ae69500(0000) GS:ff110001659aa000(0000) knlGS:0000000000000000
[ 301.416195][ C2] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 301.416201][ C2] CR2: 00000000012c56c0 CR3: 0000000026591003 CR4: 0000000000771ef0
[ 301.416207][ C2] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 301.416213][ C2] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 301.416218][ C2] PKRU: 00000000
[ 301.416222][ C2] Call Trace:
[ 301.416226][ C2] <IRQ>
[ 301.416229][ C2] RIP: 0010:handle_softirqs+0x127/0x590
[ 301.416245][ C2] Code: 00 00 00 fc ff df 48 c1 e8 03 c7 44 24 24 0a 00 00 00 48 01 f0 48 89 44 24 18 65 66 c7 05 e7 29 88 11 00 00 fb bb ff ff ff ff <49> c7 c2 c0 c0 c0 ae 41 0f bc dd 83 c3 01 4c 89 d5 0f 84 96 00 00
[ 301.416254][ C2] RSP: 0018:ff11000119708f78 EFLAGS: 00000286
[ 301.416263][ C2] ? handle_softirqs+0xf6/0x590
[ 301.416280][ C2] __irq_exit_rcu+0x158/0x1a0
[ 301.416294][ C2] sysvec_irq_work+0xa4/0xb0
[ 301.416309][ C2] </IRQ>
[ 301.416312][ C2] <TASK>
[ 301.416315][ C2] asm_sysvec_irq_work+0x1a/0x20
[ 301.416325][ C2] RIP: 0010:__sanitizer_cov_trace_pc+0x0/0x80
[ 301.416337][ C2] Code: 48 89 70 18 5b 5d 41 5c 41 5d c3 cc cc cc cc 48 c7 c0 f4 ff ff ff eb 92 66 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 <f3> 0f 1e fa 48 8b 0c 24 65 48 8b 15 78 ae 4e 11 65 8b 05 89 ae 4e
[ 301.416346][ C2] RSP: 0018:ff110000023c7af0 EFLAGS: 00000202
[ 301.416353][ C2] RAX: 0000000000000000 RBX: 0000000000000010 RCX: ffffffffa256dcae
[ 301.416359][ C2] RDX: ff1100010952a180 RSI: 0000000000000000 RDI: ff11000001f42600
[ 301.416365][ C2] RBP: ff11000001f42698 R08: 0000000000000001 R09: ffe21c0000478f5b
[ 301.416371][ C2] R10: 0000000080000001 R11: 0000000000000000 R12: ff11000001f42688
[ 301.416376][ C2] R13: 0000000000000004 R14: ff11000001f42600 R15: 0000000000400000
[ 301.416384][ C2] ? alloc_pid+0x8be/0xc20
[ 301.416397][ C2] pidfs_add_pid+0x1b/0x340
[ 301.416410][ C2] alloc_pid+0x8d7/0xc20
[ 301.416422][ C2] copy_process+0x27de/0x5030
[ 301.416435][ C2] ? __pfx_copy_process+0x10/0x10
[ 301.416443][ C2] ? handle_pte_fault+0x46c/0x8a0
[ 301.416458][ C2] ? __virt_addr_valid+0xf0/0x190
[ 301.416469][ C2] ? __sanitizer_cov_trace_switch+0x54/0x90
[ 301.416482][ C2] kernel_clone+0xe8/0x930
[ 301.416491][ C2] ? __pfx_kernel_clone+0x10/0x10
[ 301.416501][ C2] ? __pfx___handle_mm_fault+0x10/0x10
[ 301.416516][ C2] __do_sys_clone+0xce/0x120
[ 301.416526][ C2] ? __pfx___do_sys_clone+0x10/0x10
[ 301.416538][ C2] ? get_vtime_delta+0x11a/0x240
[ 301.416547][ C2] ? vtime_user_exit+0x5b/0x170
[ 301.416561][ C2] ? ct_kernel_enter.constprop.0+0x89/0xe0
[ 301.416573][ C2] do_syscall_64+0x5f/0x170
[ 301.416584][ C2] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 301.416594][ C2] RIP: 0033:0x57d1b7
[ 301.416613][ C2] Code: 5d c3 90 f3 0f 1e fa 64 48 8b 04 25 10 00 00 00 45 31 c0 31 d2 31 f6 bf 11 00 20 01 4c 8d 90 d0 02 00 00 b8 38 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 39 89 c2 85 c0 75 2c 64 48 8b 04 25 10 00 00
[ 301.416621][ C2] RSP: 002b:00007ffcc87ccdc8 EFLAGS: 00000246 ORIG_RAX: 0000000000000038
[ 301.416630][ C2] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 000000000057d1b7
[ 301.416636][ C2] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000001200011
[ 301.416641][ C2] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000001
[ 301.416647][ C2] R10: 000000002ae697d0 R11: 0000000000000246 R12: 0000000000000001
[ 301.416652][ C2] R13: 000000000002a17a R14: 0000000000000000 R15: 0000000000000032
[ 301.416661][ C2] </TASK>
[ 301.416666][ C1] NMI backtrace for cpu 1
[ 301.416676][ C1] CPU: 1 UID: 0 PID: 1286 Comm: kworker/u16:8 Not tainted 6.15.0-rc7 #9 PREEMPT(undef)
[ 301.416689][ C1] Hardware name: QEMU Ubuntu 24.04 PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015
[ 301.416695][ C1] Workqueue: events_unbound call_usermodehelper_exec_work
[ 301.416713][ C1] RIP: 0010:queued_spin_lock_slowpath+0x243/0xa90
[ 301.416727][ C1] Code: 02 48 89 e8 83 e0 07 83 c0 01 38 d0 7c 08 84 d2 0f 85 e8 07 00 00 b8 01 00 00 00 66 89 45 00 e9 c2 fe ff ff 89 44 24 38 f3 90 <e9> 5e fe ff ff 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03
[ 301.416736][ C1] RSP: 0018:ff11000001baf7a8 EFLAGS: 00000202
[ 301.416743][ C1] RAX: 0000000000000001 RBX: 0000000000000001 RCX: ffffffffab2e0c33
[ 301.416749][ C1] RDX: fffffbfff5d81829 RSI: 0000000000000004 RDI: ffffffffaec0c140
[ 301.416755][ C1] RBP: ffffffffaec0c140 R08: 0000000000000000 R09: fffffbfff5d81828
[ 301.416761][ C1] R10: ffffffffaec0c143 R11: 0000000000000000 R12: 1fe2200000375ef6
[ 301.416767][ C1] R13: 0000000000000003 R14: fffffbfff5d81828 R15: ff11000001baf7e0
[ 301.416773][ C1] FS: 0000000000000000(0000) GS:ff1100016592a000(0000) knlGS:0000000000000000
[ 301.416783][ C1] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 301.416789][ C1] CR2: 00007f6da92d83b8 CR3: 0000000053ecc003 CR4: 0000000000771ef0
[ 301.416795][ C1] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 301.416800][ C1] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 301.416806][ C1] PKRU: 55555554
[ 301.416809][ C1] Call Trace:
[ 301.416813][ C1] <TASK>
[ 301.416817][ C1] ? __pfx_queued_spin_lock_slowpath+0x10/0x10
[ 301.416829][ C1] ? kmem_cache_free+0x134/0x4f0
[ 301.416841][ C1] ? __cleanup_sighand+0x78/0xa0
[ 301.416850][ C1] ? __change_pid+0x2f4/0x560
[ 301.416861][ C1] _raw_spin_lock+0xce/0xe0
[ 301.416871][ C1] ? __pfx__raw_spin_lock+0x10/0x10
[ 301.416880][ C1] ? blake2s_update+0x14b/0x1f0
[ 301.416893][ C1] free_pid+0x3b/0x260
[ 301.416904][ C1] ? __pfx_add_device_randomness+0x10/0x10
[ 301.416919][ C1] free_pids+0x4a/0x80
[ 301.416929][ C1] release_task+0x31e/0x670
[ 301.416940][ C1] ? __pfx_release_task+0x10/0x10
[ 301.416950][ C1] ? __pfx_thread_group_cputime_adjusted+0x10/0x10
[ 301.416966][ C1] ? __pfx__raw_spin_lock_irq+0x10/0x10
[ 301.416977][ C1] wait_task_zombie+0x1527/0x20f0
[ 301.416990][ C1] ? set_next_entity+0x309/0x610
[ 301.417002][ C1] ? __pfx_wait_task_zombie+0x10/0x10
[ 301.417013][ C1] ? finish_task_switch.isra.0+0x148/0x770
[ 301.417029][ C1] wait_consider_task+0x4d7/0x690
[ 301.417041][ C1] do_wait_pid+0x2ca/0x370
[ 301.417051][ C1] __do_wait+0x4d8/0x5b0
[ 301.417063][ C1] ? __pfx___do_wait+0x10/0x10
[ 301.417075][ C1] do_wait+0x126/0x410
[ 301.417086][ C1] kernel_wait+0xa4/0x160
[ 301.417098][ C1] ? __pfx_kernel_wait+0x10/0x10
[ 301.417111][ C1] ? __pfx_child_wait_callback+0x10/0x10
[ 301.417122][ C1] ? __pfx___schedule+0x10/0x10
[ 301.417132][ C1] ? __pfx__raw_spin_lock_irq+0x10/0x10
[ 301.417142][ C1] call_usermodehelper_exec_work+0xfe/0x190
[ 301.417157][ C1] process_one_work+0x70b/0x11c0
[ 301.417179][ C1] worker_thread+0x7bf/0xc30
[ 301.417193][ C1] ? __pfx_worker_thread+0x10/0x10
[ 301.417206][ C1] kthread+0x3c0/0x4e0
[ 301.417217][ C1] ? __pfx_kthread+0x10/0x10
[ 301.417228][ C1] ret_from_fork+0x4d/0x80
[ 301.417238][ C1] ? __pfx_kthread+0x10/0x10
[ 301.417249][ C1] ret_from_fork_asm+0x1a/0x30
[ 301.417261][ C1] </TASK>
[ 301.417266][ C3] NMI backtrace for cpu 3
[ 301.417275][ C3] CPU: 3 UID: 0 PID: 1294 Comm: kworker/u16:11 Not tainted 6.15.0-rc7 #9 PREEMPT(undef)
[ 301.417287][ C3] Hardware name: QEMU Ubuntu 24.04 PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015
[ 301.417293][ C3] Workqueue: events_unbound call_usermodehelper_exec_work
[ 301.417309][ C3] RIP: 0010:queued_spin_lock_slowpath+0x243/0xa90
[ 301.417322][ C3] Code: 02 48 89 e8 83 e0 07 83 c0 01 38 d0 7c 08 84 d2 0f 85 e8 07 00 00 b8 01 00 00 00 66 89 45 00 e9 c2 fe ff ff 89 44 24 38 f3 90 <e9> 5e fe ff ff 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03
[ 301.417331][ C3] RSP: 0018:ff1100010b81f7a8 EFLAGS: 00000202
[ 301.417338][ C3] RAX: 0000000000000001 RBX: 0000000000000001 RCX: ffffffffab2e0c33
[ 301.417344][ C3] RDX: fffffbfff5d81829 RSI: 0000000000000004 RDI: ffffffffaec0c140
[ 301.417350][ C3] RBP: ffffffffaec0c140 R08: 0000000000000000 R09: fffffbfff5d81828
[ 301.417356][ C3] R10: ffffffffaec0c143 R11: 0000000000000000 R12: 1fe2200021703ef6
[ 301.417362][ C3] R13: 0000000000000003 R14: fffffbfff5d81828 R15: ff1100010b81f7e0
[ 301.417368][ C3] FS: 0000000000000000(0000) GS:ff11000165a2a000(0000) knlGS:0000000000000000
[ 301.417378][ C3] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 301.417384][ C3] CR2: 0000559c275fe6f8 CR3: 0000000053ecc005 CR4: 0000000000771ef0
[ 301.417390][ C3] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 301.417395][ C3] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 301.417401][ C3] PKRU: 55555554
[ 301.417404][ C3] Call Trace:
[ 301.417407][ C3] <TASK>
[ 301.417412][ C3] ? __pfx_queued_spin_lock_slowpath+0x10/0x10
[ 301.417423][ C3] ? kmem_cache_free+0x134/0x4f0
[ 301.417435][ C3] ? __cleanup_sighand+0x78/0xa0
[ 301.417443][ C3] ? __change_pid+0x2f4/0x560
[ 301.417454][ C3] _raw_spin_lock+0xce/0xe0
[ 301.417464][ C3] ? __pfx__raw_spin_lock+0x10/0x10
[ 301.417474][ C3] ? blake2s_update+0x14b/0x1f0
[ 301.417486][ C3] free_pid+0x3b/0x260
[ 301.417496][ C3] ? __pfx_add_device_randomness+0x10/0x10
[ 301.417511][ C3] free_pids+0x4a/0x80
[ 301.417521][ C3] release_task+0x31e/0x670
[ 301.417532][ C3] ? __pfx_release_task+0x10/0x10
[ 301.417541][ C3] ? __pfx_thread_group_cputime_adjusted+0x10/0x10
[ 301.417558][ C3] ? __pfx__raw_spin_lock_irq+0x10/0x10
[ 301.417569][ C3] wait_task_zombie+0x1527/0x20f0
[ 301.417580][ C3] ? __pfx_switch_mm_irqs_off+0x10/0x10
[ 301.417593][ C3] ? __pfx_wait_task_zombie+0x10/0x10
[ 301.417604][ C3] ? finish_task_switch.isra.0+0x148/0x770
[ 301.417620][ C3] wait_consider_task+0x4d7/0x690
[ 301.417631][ C3] do_wait_pid+0x2ca/0x370
[ 301.417642][ C3] __do_wait+0x4d8/0x5b0
[ 301.417653][ C3] ? __pfx___do_wait+0x10/0x10
[ 301.417666][ C3] do_wait+0x126/0x410
[ 301.417677][ C3] kernel_wait+0xa4/0x160
[ 301.417688][ C3] ? __pfx_kernel_wait+0x10/0x10
[ 301.417701][ C3] ? __pfx_child_wait_callback+0x10/0x10
[ 301.417712][ C3] ? __pfx___schedule+0x10/0x10
[ 301.417721][ C3] ? __pfx__raw_spin_lock_irq+0x10/0x10
[ 301.417732][ C3] call_usermodehelper_exec_work+0xfe/0x190
[ 301.417746][ C3] process_one_work+0x70b/0x11c0
[ 301.417761][ C3] worker_thread+0x7bf/0xc30
[ 301.417775][ C3] ? __pfx_worker_thread+0x10/0x10
[ 301.417787][ C3] kthread+0x3c0/0x4e0
[ 301.417798][ C3] ? __pfx_kthread+0x10/0x10
[ 301.417809][ C3] ret_from_fork+0x4d/0x80
[ 301.417817][ C3] ? __pfx_kthread+0x10/0x10
[ 301.417828][ C3] ret_from_fork_asm+0x1a/0x30
[ 301.417841][ C3] </TASK>
[ 301.418073][ C0] Kernel panic - not syncing: softlockup: hung tasks
[ 301.418081][ C0] CPU: 0 UID: 0 PID: 3523 Comm: systemd-udevd Tainted: G L 6.15.0-rc7 #9 PREEMPT(undef)
[ 301.418095][ C0] Tainted: [L]=SOFTLOCKUP
[ 301.418098][ C0] Hardware name: QEMU Ubuntu 24.04 PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015
[ 301.418103][ C0] Call Trace:
[ 301.418107][ C0] <IRQ>
[ 301.418111][ C0] dump_stack_lvl+0x3d/0xe0
[ 301.418126][ C0] panic+0x6be/0x750
[ 301.418136][ C0] ? __pfx_panic+0x10/0x10
[ 301.418148][ C0] ? irq_work_queue+0xc4/0x100
[ 301.418162][ C0] ? watchdog_timer_fn+0x42e/0x4f0
[ 301.418180][ C0] watchdog_timer_fn+0x43f/0x4f0
[ 301.418193][ C0] __run_hrtimer+0x147/0x6b0
[ 301.418206][ C0] ? __pfx_watchdog_timer_fn+0x10/0x10
[ 301.418219][ C0] __hrtimer_run_queues+0x1a1/0x290
[ 301.418234][ C0] ? __pfx___hrtimer_run_queues+0x10/0x10
[ 301.418247][ C0] ? read_tsc+0x9/0x20
[ 301.418261][ C0] hrtimer_interrupt+0x302/0x770
[ 301.418279][ C0] __sysvec_apic_timer_interrupt+0x8a/0x260
[ 301.418293][ C0] sysvec_apic_timer_interrupt+0x69/0x90
[ 301.418303][ C0] </IRQ>
[ 301.418306][ C0] <TASK>
[ 301.418310][ C0] asm_sysvec_apic_timer_interrupt+0x1a/0x20
[ 301.418321][ C0] RIP: 0010:queued_spin_lock_slowpath+0x243/0xa90
[ 301.418333][ C0] Code: 02 48 89 e8 83 e0 07 83 c0 01 38 d0 7c 08 84 d2 0f 85 e8 07 00 00 b8 01 00 00 00 66 89 45 00 e9 c2 fe ff ff 89 44 24 38 f3 90 <e9> 5e fe ff ff 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03
[ 301.418342][ C0] RSP: 0018:ff1100002ebcf7b8 EFLAGS: 00000202
[ 301.418350][ C0] RAX: 0000000000000001 RBX: 0000000000000001 RCX: ffffffffab2e0c33
[ 301.418356][ C0] RDX: fffffbfff5d81829 RSI: 0000000000000004 RDI: ffffffffaec0c140
[ 301.418362][ C0] RBP: ffffffffaec0c140 R08: 0000000000000000 R09: fffffbfff5d81828
[ 301.418369][ C0] R10: ffffffffaec0c143 R11: 0000000000000000 R12: 1fe2200005d79ef8
[ 301.418375][ C0] R13: 0000000000000003 R14: fffffbfff5d81828 R15: ff1100002ebcf7f0
[ 301.418382][ C0] ? queued_spin_lock_slowpath+0xb3/0xa90
[ 301.418395][ C0] ? queued_spin_lock_slowpath+0xb3/0xa90
[ 301.418405][ C0] ? __pfx_evict+0x10/0x10
[ 301.418418][ C0] ? __pfx_queued_spin_lock_slowpath+0x10/0x10
[ 301.418429][ C0] ? __call_rcu_common.constprop.0+0x327/0x940
[ 301.418443][ C0] ? _raw_spin_lock+0x84/0xe0
[ 301.418453][ C0] ? __pfx__raw_spin_lock+0x10/0x10
[ 301.418463][ C0] _raw_spin_lock+0xce/0xe0
[ 301.418473][ C0] ? __pfx__raw_spin_lock+0x10/0x10
[ 301.418483][ C0] ? blake2s_update+0x14b/0x1f0
[ 301.418495][ C0] free_pid+0x3b/0x260
[ 301.418506][ C0] ? __pfx_add_device_randomness+0x10/0x10
[ 301.418521][ C0] free_pids+0x4a/0x80
[ 301.418531][ C0] release_task+0x31e/0x670
[ 301.418542][ C0] ? __pfx_release_task+0x10/0x10
[ 301.418552][ C0] ? __pfx_thread_group_cputime_adjusted+0x10/0x10
[ 301.418568][ C0] ? __pfx__raw_spin_lock_irq+0x10/0x10
[ 301.418579][ C0] ? __kernel_text_address+0x66/0xb0
[ 301.418592][ C0] wait_task_zombie+0x1527/0x20f0
[ 301.535093][ C0] ? __pfx_wait_task_zombie+0x10/0x10
[ 301.535584][ C0] ? stack_trace_save+0x93/0xd0
[ 301.536013][ C0] ? stack_depot_save_flags+0x6a/0x640
[ 301.536509][ C0] wait_consider_task+0x4d7/0x690
[ 301.536950][ C0] do_wait_pid+0x2ca/0x370
[ 301.537349][ C0] __do_wait+0x4d8/0x5b0
[ 301.537727][ C0] ? __pfx__raw_spin_lock_irqsave+0x10/0x10
[ 301.538256][ C0] ? __pfx___do_wait+0x10/0x10
[ 301.538685][ C0] ? kernel_waitid_prepare+0x19e/0x3b0
[ 301.539176][ C0] ? add_wait_queue+0x103/0x260
[ 301.539618][ C0] do_wait+0x126/0x410
[ 301.539990][ C0] kernel_waitid+0x106/0x170
[ 301.540411][ C0] ? __pfx_kernel_waitid+0x10/0x10
[ 301.540863][ C0] ? __pfx_child_wait_callback+0x10/0x10
[ 301.541366][ C0] __do_sys_waitid+0x200/0x230
[ 301.541787][ C0] ? __pfx___do_sys_waitid+0x10/0x10
[ 301.542276][ C0] ? __seccomp_filter+0x117/0xca0
[ 301.542730][ C0] ? __x64_sys_epoll_ctl+0x14f/0x1d0
[ 301.543204][ C0] ? __secure_computing+0x1de/0x2e0
[ 301.543667][ C0] do_syscall_64+0x5f/0x170
[ 301.544077][ C0] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 301.544611][ C0] RIP: 0033:0x7f31669e9ced
[ 301.545001][ C0] Code: eb c2 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 41 89 ca 64 8b 04 25 18 00 00 00 85 c0 75 1d 45 31 c0 b8 f7 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 6b c3 66 2e 0f 1f 84 00 00 00 00 00 48 83 ec
[ 301.546650][ C0] RSP: 002b:00007ffd2b7b38c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000f7
[ 301.547376][ C0] RAX: ffffffffffffffda RBX: 00007ffd2b7b38e0 RCX: 00007f31669e9ced
[ 301.548051][ C0] RDX: 000055bf2691aeb0 RSI: 000000000000196f RDI: 0000000000000001
[ 301.548735][ C0] RBP: 000055bf2691ae40 R08: 0000000000000000 R09: 0000000000000000
[ 301.549419][ C0] R10: 0000000000000005 R11: 0000000000000246 R12: 0000000000000001
[ 301.550091][ C0] R13: 0000000000000007 R14: 000055bf2691aeb0 R15: 000055bf26727450
[ 301.550770][ C0] </TASK>
[ 301.551521][ C0] Kernel Offset: 0x20e00000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
[ 301.552517][ C0] ---[ end Kernel panic - not syncing: softlockup: hung tasks ]---
[ 1894.636017][ C1] madvise_pageout+0x1f4/0x400
[ 1894.636030][ C1] ? __pfx_madvise_pageout+0x10/0x10
[ 1894.636043][ C1] ? futex_wait+0x552/0x680
[ 1894.636059][ C1] ? __sanitizer_cov_trace_switch+0x54/0x90
[ 1894.636075][ C1] ? __sanitizer_cov_trace_switch+0x54/0x90
[ 1894.636086][ C1] ? mas_prev_setup.constprop.0+0xb4/0x530
[ 1894.636102][ C1] madvise_vma_behavior+0x8fa/0xe30
[ 1894.636116][ C1] ? __pfx_madvise_vma_behavior+0x10/0x10
[ 1894.636129][ C1] ? find_vma_prev+0xf5/0x170
[ 1894.636139][ C1] ? __pfx_find_vma_prev+0x10/0x10
[ 1894.636151][ C1] ? do_futex+0x135/0x360
[ 1894.636165][ C1] do_madvise+0x3af/0x650
[ 1894.636178][ C1] ? __pfx_do_madvise+0x10/0x10
[ 1894.636190][ C1] ? __se_sys_futex+0xf7/0x390
[ 1894.636203][ C1] ? kvm_steal_clock+0xca/0x100
[ 1894.636220][ C1] ? get_vtime_delta+0xd7/0x250
[ 1894.636234][ C1] __x64_sys_madvise+0xaf/0x120
[ 1894.636246][ C1] ? __ct_user_exit+0x70/0xe0
[ 1894.636261][ C1] do_syscall_64+0x59/0x110
[ 1894.636276][ C1] entry_SYSCALL_64_after_hwframe+0x78/0xe2
[ 1894.636290][ C1] RIP: 0033:0x54d2cd
[ 1894.636298][ C1] Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
[ 1894.636306][ C1] RSP: 002b:00007f10a7955048 EFLAGS: 00000246 ORIG_RAX: 000000000000001c
[ 1894.636315][ C1] RAX: ffffffffffffffda RBX: 0000000000795fa0 RCX: 000000000054d2cd
[ 1894.636321][ C1] RDX: 0000000000000015 RSI: 0000000000003000 RDI: 0000000020001000
[ 1894.636326][ C1] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
[ 1894.636332][ C1] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000795fac
[ 1894.636337][ C1] R13: 0000000000000000 R14: 0000000000795fa0 R15: 00007f10a7935000
[ 1894.636346][ C1] </TASK>
[ 1901.634222][ C3] watchdog: BUG: soft lockup - CPU#3 stuck for 913s! [syz.8.781:8076]
[ 1901.634947][ C3] Modules linked in:
[ 1901.635261][ C3] CPU: 3 PID: 8076 Comm: syz.8.781 Tainted: G L 6.6.0+ #1873
[ 1901.635981][ C3] Hardware name: QEMU Ubuntu 24.04 PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015
[ 1901.636735][ C3] RIP: 0010:queued_spin_lock_slowpath+0x109/0x9c0
[ 1901.637281][ C3] Code: 00 48 8b 44 24 60 65 48 2b 04 25 28 00 00 00 0f 85 ca 07 00 00 48 83 c4 68 5b 5d 41 5c 41 5d 41 5e 41 5f c3 cc cc cc cc f3 90 <eb> 85 81 fe 00 01 00 00 0f 84 dc 00 00 00 81 fe ff 00 00 00 0f 87
[ 1901.638858][ C3] RSP: 0000:ff1100002900f8b0 EFLAGS: 00000202
[ 1901.639364][ C3] RAX: 0000000000000000 RBX: 0000000000000001 RCX: ffffffff961f5ecd
[ 1901.640001][ C3] RDX: fffa7c000005f936 RSI: 0000000000000004 RDI: ffd40000002fc9a8
[ 1901.640624][ C3] RBP: 0000000000000003 R08: 0000000000000000 R09: fffa7c000005f935
[ 1901.641255][ C3] R10: ffd40000002fc9ab R11: 0000000000000000 R12: fffa7c000005f935
[ 1901.641905][ C3] R13: 0000000000000001 R14: 1fe2200005201f17 R15: ffd40000002fc9a8
[ 1901.642527][ C3] FS: 000000002316c500(0000) GS:ff11000107980000(0000) knlGS:0000000000000000
[ 1901.643272][ C3] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1901.643818][ C3] CR2: 0000000020000000 CR3: 0000000036592004 CR4: 0000000000771ee0
[ 1901.644469][ C3] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 1901.645105][ C3] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 1901.645724][ C3] PKRU: 80000000
[ 1901.646010][ C3] Call Trace:
[ 1901.646287][ C3] <TASK>
[ 1901.646526][ C3] ? __pfx_queued_spin_lock_slowpath+0x10/0x10
[ 1901.647053][ C3] _raw_spin_lock+0xd0/0xe0
[ 1901.647450][ C3] ? __pfx__raw_spin_lock+0x10/0x10
[ 1901.647883][ C3] __pte_offset_map_lock+0x129/0x270
[ 1901.648335][ C3] ? __pfx___pte_offset_map_lock+0x10/0x10
[ 1901.648820][ C3] migration_entry_wait+0x85/0x270
[ 1901.649247][ C3] ? __pfx_migration_entry_wait+0x10/0x10
[ 1901.649705][ C3] ? __pfx___schedule+0x10/0x10
[ 1901.650122][ C3] ? __hrtimer_start_range_ns+0x355/0xd00
[ 1901.650623][ C3] do_swap_page+0x36d2/0x4670
[ 1901.651016][ C3] ? plist_del+0x24c/0x450
[ 1901.651453][ C3] ? __pte_offset_map+0x2b9/0x3d0
[ 1901.651981][ C3] ? __pfx_do_swap_page+0x10/0x10
[ 1901.652432][ C3] ? __pfx_default_wake_function+0x10/0x10
[ 1901.652947][ C3] handle_pte_fault+0x5ae/0x7b0
[ 1901.653387][ C3] __handle_mm_fault+0xf9e/0x17f0
[ 1901.653839][ C3] ? __pfx___handle_mm_fault+0x10/0x10
[ 1901.654335][ C3] ? lock_vma_under_rcu+0x377/0x4d0
[ 1901.654797][ C3] ? __pfx_lock_vma_under_rcu+0x10/0x10
[ 1901.655294][ C3] handle_mm_fault+0x4bf/0xa20
[ 1901.655725][ C3] exc_page_fault+0x20b/0x7f0
[ 1901.656150][ C3] asm_exc_page_fault+0x26/0x30
[ 1901.656582][ C3] RIP: 0033:0x51d788
[ 1901.656927][ C3] Code: 66 89 74 17 02 88 0f c3 c5 fa 6f 06 c5 fa 6f 4c 16 f0 c5 fa 7f 07 c5 fa 7f 4c 17 f0 c3 0f 1f 44 00 00 48 8b 4c 16 f8 48 8b 36 <48> 89 37 48 89 4c 17 f8 c3 62 e1 fe 28 6f 54 16 ff 62 e1 fe 28 6f
[ 1901.658618][ C3] RSP: 002b:00007fff991f9118 EFLAGS: 00010202
[ 1901.659157][ C3] RAX: 0000000020000000 RBX: 0000000000000004 RCX: 002367732f766564
[ 1901.659856][ C3] RDX: 0000000000000009 RSI: 2367732f7665642f RDI: 0000000020000000
[ 1901.660553][ C3] RBP: 0000000000797ba0 R08: 00007f10a7800000 R09: 0000000000000001
[ 1901.661240][ C3] R10: 0000000000000001 R11: 0000000000000009 R12: 0000000000000032
[ 1901.661906][ C3] R13: 00000000000e2c77 R14: 0000000000795fa0 R15: 0000000000795fac
[ 1901.662589][ C3] </TASK>
[ 1901.662864][ C3] Sending NMI from CPU 3 to CPUs 0-2:
[ 1901.663358][ C1] NMI backtrace for cpu 1
[ 1901.663365][ C1] AAA2 1901441189248 1901441163169 0 0 0 1901441162197
[ 1901.663374][ C1] AAA2 1901441197984 993372484411 993372484804 993372484875 928887973527 928887973577 928887974425 // handle_softirqs
[ 1901.663383][ C1] softirq_handle_start:
[ 1901.663385][ C1] 0
[ 1901.663387][ C1] 928330006990
[ 1901.663390][ C1] 924221567459
[ 1901.663392][ C1] 928817263100
[ 1901.663395][ C1] 928328744939
[ 1901.663397][ C1] 0
[ 1901.663399][ C1] 921062008817
[ 1901.663401][ C1] 928879010614
[ 1901.663403][ C1] 0
[ 1901.663405][ C1] 928887973635
[ 1901.663407][ C1]
[ 1901.663409][ C1] softirq_handle_end_time:
[ 1901.663410][ C1] 0
[ 1901.663412][ C1] 928330009295
[ 1901.663415][ C1] 924221568491
[ 1901.663417][ C1] 928817511439
[ 1901.663419][ C1] 928328806233
[ 1901.663421][ C1] 0
[ 1901.663423][ C1] 921062009968
[ 1901.663425][ C1] 928879011708
[ 1901.663427][ C1] 0
[ 1901.663429][ C1] 928887974243
[ 1901.663432][ C1]
[ 1901.663434][ C1] CPU: 1 PID: 8079 Comm: syz.8.781 Tainted: G L 6.6.0+ #1873
[ 1901.663444][ C1] Hardware name: QEMU Ubuntu 24.04 PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015
[ 1901.663448][ C1] RIP: 0010:irq_work_claim+0x5c/0xa0
[ 1901.663464][ C1] Code: 14 02 48 89 e8 83 e0 07 83 c0 03 38 d0 7c 04 84 d2 75 44 8b 5b 08 e8 c3 74 e7 ff 89 da 41 89 dc 89 d8 83 ca 23 f0 0f b1 55 00 <41> 0f 94 c5 31 ff 89 c3 44 89 ee e8 74 6a e7 ff 45 84 ed 74 d7 e8
[ 1901.663473][ C1] RSP: 0018:ff11000107889c68 EFLAGS: 00000046
[ 1901.663480][ C1] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffffffff8dc11a4d
[ 1901.663486][ C1] RDX: 0000000000000023 RSI: 0000000000000004 RDI: ff110001078c6838
[ 1901.663491][ C1] RBP: ff110001078c6838 R08: 0000000000000001 R09: ffe21c0020f18d07
[ 1901.663496][ C1] R10: ff110001078c683b R11: 0000000000000000 R12: 0000000000000000
[ 1901.663502][ C1] R13: ff110001078c6bf0 R14: 0000000000000000 R15: ffffffff99f43000
[ 1901.663507][ C1] FS: 00007f10a79556c0(0000) GS:ff11000107880000(0000) knlGS:0000000000000000
[ 1901.663517][ C1] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1901.663523][ C1] CR2: 0000000000638300 CR3: 0000000036592002 CR4: 0000000000771ee0
[ 1901.663529][ C1] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 1901.663534][ C1] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 1901.663539][ C1] PKRU: 00000000
[ 1901.663542][ C1] Call Trace:
[ 1901.663546][ C1] <IRQ>
[ 1901.663551][ C1] irq_work_queue_on+0x59/0x130
[ 1901.663563][ C1] rcu_read_unlock_special+0x46a/0x530
[ 1901.663577][ C1] bpf_trace_run2+0xf7/0x220
[ 1901.663588][ C1] ? __pfx_bpf_trace_run2+0x10/0x10
[ 1901.663599][ C1] ? __pfx_ep_poll_callback+0x10/0x10
[ 1901.663613][ C1] __bpf_trace_tick_stop+0xb4/0xf0
[ 1901.663623][ C1] ? __pfx___bpf_trace_tick_stop+0x10/0x10
[ 1901.663633][ C1] ? __pfx_sched_clock_cpu+0x10/0x10
[ 1901.663643][ C1] ? __wake_up+0x44/0x60
[ 1901.663657][ C1] check_tick_dependency+0x362/0x670
[ 1901.663673][ C1] __tick_nohz_full_update_tick+0xd1/0x220
[ 1901.663683][ C1] tick_nohz_irq_exit+0x22c/0x2a0
[ 1901.663694][ C1] sysvec_irq_work+0x36/0x80
[ 1901.663705][ C1] asm_sysvec_irq_work+0x1a/0x20
[ 1901.663720][ C1] RIP: 0010:handle_softirqs+0x230/0x8d0
[ 1901.663734][ C1] Code: 24 f5 80 5d 84 98 e8 1f 9b 27 00 4c 89 e2 48 c1 ea 03 42 80 3c 3a 00 0f 85 d5 05 00 00 49 89 04 24 fb 65 44 8b 35 0c 2c 93 72 <4d> 63 f6 49 c7 c4 20 0c 03 00 4a 8d 3c f5 80 5d 84 98 48 89 f8 48
[ 1901.663742][ C1] RSP: 0018:ff11000107889f68 EFLAGS: 00000246
[ 1901.663748][ C1] RAX: 000000e7499d350b RBX: 0000000000000000 RCX: 0000000000000018
[ 1901.663754][ C1] RDX: 1fe2200020f16185 RSI: 00000000001e2170 RDI: 0000000000000004
[ 1901.663759][ C1] RBP: ff1100003ae422c0 R08: 0000000000000001 R09: ffe21c0020f16239
[ 1901.663765][ C1] R10: 00000000001e2170 R11: 3030303030302052 R12: ff110001078b0c28
[ 1901.663770][ C1] R13: 0000000000400140 R14: 0000000000000001 R15: dffffc0000000000
[ 1901.663779][ C1] ? handle_softirqs+0x211/0x8d0
[ 1901.663792][ C1] ? update_sibling_normalize_runtime+0x1a/0x410
[ 1901.663807][ C1] irq_exit_rcu+0x134/0x190
[ 1901.663820][ C1] sysvec_irq_work+0x6a/0x80
[ 1901.663830][ C1] </IRQ>
[ 1901.663833][ C1] <TASK>
[ 1901.663835][ C1] asm_sysvec_irq_work+0x1a/0x20
[ 1901.663849][ C1] RIP: 0010:rcu_read_unlock_special+0x186/0x530
[ 1901.663861][ C1] Code: 0f 85 01 01 00 00 4d 85 f6 0f 84 6a 01 00 00 40 84 ed 0f 84 61 01 00 00 bf 09 00 00 00 e8 c2 45 df ff fb 65 8b 2d 26 65 72 72 <48> 63 ed 48 c7 c3 40 1a 03 00 48 b8 00 00 00 00 00 fc ff df 48 8d
[ 1901.663869][ C1] RSP: 0018:ff110000380b6fe8 EFLAGS: 00000283
[ 1901.663875][ C1] RAX: 0000000000000001 RBX: ff110001078c6800 RCX: ffffffff8d7c6a90
[ 1901.663881][ C1] RDX: 0000000000000001 RSI: 0000000000000046 RDI: ff11000100e33084
[ 1901.663886][ C1] RBP: 0000000000000001 R08: 0000000000000000 R09: fffffbfff3716ab4
[ 1901.663891][ C1] R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000
[ 1901.663896][ C1] R13: dffffc0000000000 R14: 0000000000000200 R15: ffffffff99f43000
[ 1901.663903][ C1] ? ttwu_do_activate+0x520/0x6f0
[ 1901.663918][ C1] ? rcu_read_unlock_special+0x17e/0x530
[ 1901.663930][ C1] page_vma_mapped_walk+0x1e00/0x2b50
[ 1901.663948][ C1] ? __netlink_deliver_tap_skb+0x352/0x4d0
[ 1901.663959][ C1] ? __pfx_page_vma_mapped_walk+0x10/0x10
[ 1901.663974][ C1] ? netlink_ack+0x614/0xba0
[ 1901.663986][ C1] try_to_migrate_one+0x3f0/0x2cb0
[ 1901.663999][ C1] ? __sys_sendmsg+0xee/0x1b0
[ 1901.664015][ C1] ? __pfx_try_to_migrate_one+0x10/0x10
[ 1901.664028][ C1] ? __orc_find+0x109/0x140
[ 1901.664041][ C1] ? arch_stack_walk+0x92/0x160
[ 1901.664058][ C1] ? __anon_vma_interval_tree_subtree_search+0x171/0x1f0
[ 1901.664080][ C1] ? __pfx_try_to_migrate_one+0x10/0x10
[ 1901.664094][ C1] rmap_walk_anon+0x2b0/0x980
[ 1901.664108][ C1] try_to_migrate+0x19f/0x350
[ 1901.664122][ C1] ? __pfx_try_to_migrate+0x10/0x10
[ 1901.664135][ C1] ? __pfx_try_to_migrate_one+0x10/0x10
[ 1901.664148][ C1] ? __pfx_folio_not_mapped+0x10/0x10
[ 1901.664159][ C1] ? __pfx_folio_lock_anon_vma_read+0x10/0x10
[ 1901.664173][ C1] ? __pfx_invalid_migration_vma+0x10/0x10
[ 1901.664184][ C1] ? folio_total_mapcount+0xb4/0x210
[ 1901.664197][ C1] split_huge_page_to_list_to_order+0xc84/0x17f0
[ 1901.664213][ C1] ? __pfx_split_huge_page_to_list_to_order+0x10/0x10
[ 1901.664226][ C1] ? __orc_find+0x109/0x140
[ 1901.664240][ C1] ? __orc_find+0x109/0x140
[ 1901.664253][ C1] ? entry_SYSCALL_64_after_hwframe+0x77/0xe2
[ 1901.664269][ C1] madvise_cold_or_pageout_pte_range+0x1966/0x2450
[ 1901.664284][ C1] ? arch_stack_walk+0x92/0x160
[ 1901.664298][ C1] ? __read_once_word_nocheck+0x9/0x20
[ 1901.664311][ C1] ? deref_stack_reg+0x1a4/0x2b0
[ 1901.664326][ C1] ? entry_SYSCALL_64_after_hwframe+0x77/0xe2
[ 1901.664340][ C1] ? __pfx_madvise_cold_or_pageout_pte_range+0x10/0x10
[ 1901.664354][ C1] ? __read_once_word_nocheck+0x9/0x20
[ 1901.664368][ C1] ? __orc_find+0x109/0x140
[ 1901.664381][ C1] ? __pfx_madvise_cold_or_pageout_pte_range+0x10/0x10
[ 1901.664395][ C1] walk_pmd_range.isra.0+0x240/0x720
[ 1901.664405][ C1] ? __read_once_word_nocheck+0x9/0x20
[ 1901.664419][ C1] walk_pud_range.isra.0+0x3d3/0x6c0
[ 1901.664431][ C1] walk_p4d_range+0x2ef/0x4f0
[ 1901.664441][ C1] walk_pgd_range+0x27e/0x530
[ 1901.664452][ C1] __walk_page_range+0x4ab/0x5a0
[ 1901.664461][ C1] ? find_vma+0x81/0xb0
[ 1901.664469][ C1] ? __pfx_find_vma+0x10/0x10
[ 1901.664477][ C1] ? folios_put_refs+0x510/0x740
[ 1901.664487][ C1] ? walk_page_test+0xa0/0x190
[ 1901.664503][ C1] walk_page_range+0x2a0/0x530
[ 1901.664513][ C1] ? __pfx_walk_page_range+0x10/0x10
[ 1901.664522][ C1] ? vtime_task_switch_generic+0x278/0x5a0
[ 1901.664535][ C1] ? folio_batch_move_lru+0x2b8/0x3d0
[ 1901.664544][ C1] ? __pfx_lru_add_fn+0x10/0x10
[ 1901.664554][ C1] madvise_pageout_page_range+0x1cc/0x6d0
[ 1901.664567][ C1] ? __pfx_madvise_pageout_page_range+0x10/0x10
[ 1901.664582][ C1] madvise_pageout+0x1f4/0x400
[ 1901.664595][ C1] ? __pfx_madvise_pageout+0x10/0x10
[ 1901.664608][ C1] ? futex_wait+0x552/0x680
[ 1901.664624][ C1] ? __sanitizer_cov_trace_switch+0x54/0x90
[ 1901.664635][ C1] ? __sanitizer_cov_trace_switch+0x54/0x90
[ 1901.664645][ C1] ? mas_prev_setup.constprop.0+0xb4/0x530
[ 1901.664661][ C1] madvise_vma_behavior+0x8fa/0xe30
[ 1901.664675][ C1] ? __pfx_madvise_vma_behavior+0x10/0x10
[ 1901.664688][ C1] ? find_vma_prev+0xf5/0x170
[ 1901.664698][ C1] ? __pfx_find_vma_prev+0x10/0x10
[ 1901.664711][ C1] ? do_futex+0x135/0x360
[ 1901.664724][ C1] do_madvise+0x3af/0x650
[ 1901.664737][ C1] ? __pfx_do_madvise+0x10/0x10
[ 1901.664749][ C1] ? __se_sys_futex+0xf7/0x390
[ 1901.664762][ C1] ? kvm_steal_clock+0xca/0x100
[ 1901.664778][ C1] ? get_vtime_delta+0xd7/0x250
[ 1901.664793][ C1] __x64_sys_madvise+0xaf/0x120
[ 1901.664805][ C1] ? __ct_user_exit+0x70/0xe0
[ 1901.664819][ C1] do_syscall_64+0x59/0x110
[ 1901.664834][ C1] entry_SYSCALL_64_after_hwframe+0x78/0xe2
[ 1901.664849][ C1] RIP: 0033:0x54d2cd
[ 1901.664856][ C1] Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
[ 1901.664864][ C1] RSP: 002b:00007f10a7955048 EFLAGS: 00000246 ORIG_RAX: 000000000000001c
[ 1901.664873][ C1] RAX: ffffffffffffffda RBX: 0000000000795fa0 RCX: 000000000054d2cd
[ 1901.664878][ C1] RDX: 0000000000000015 RSI: 0000000000003000 RDI: 0000000020001000
[ 1901.664884][ C1] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
[ 1901.664889][ C1] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000795fac
[ 1901.664894][ C1] R13: 0000000000000000 R14: 0000000000795fa0 R15: 00007f10a7935000
[ 1901.664903][ C1] </TASK>
[ 1901.664908][ C2] NMI backtrace for cpu 2
[ 1901.664927][ C2] AAA2 1901442750380 928616117678 0 0 0 928616122779
[ 1901.664955][ C2] AAA2 1901442779231 1901441042702 1901441042982 1901441043133 1901441043281 1901441043425 1901441149133
[ 1901.664990][ C2] softirq_handle_start:
[ 1901.664999][ C2] 0
[ 1901.665010][ C2] 1901441043574
[ 1901.665023][ C2] 927808535269
[ 1901.665035][ C2] 1901193600384
[ 1901.665047][ C2] 28776582930
[ 1901.665060][ C2] 0
[ 1901.665087][ C2] 0
[ 1901.665095][ C2] 1901440051177
[ 1901.665103][ C2] 0
[ 1901.665110][ C2] 928888742270
[ 1901.665118][ C2]
[ 1901.665122][ C2] softirq_handle_end_time:
[ 1901.665128][ C2] 0
[ 1901.665134][ C2] 1901441148789
[ 1901.665142][ C2] 927808536719
[ 1901.665150][ C2] 1901193637121
[ 1901.665157][ C2] 28776591391
[ 1901.665165][ C2] 0
[ 1901.665172][ C2] 0
[ 1901.665178][ C2] 1901440068820
[ 1901.665186][ C2] 0
[ 1901.665192][ C2] 928888825436
[ 1901.665200][ C2]
[ 1901.665206][ C2] CPU: 2 PID: 17 Comm: rcu_preempt Tainted: G L 6.6.0+ #1873
[ 1901.665240][ C2] Hardware name: QEMU Ubuntu 24.04 PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015
[ 1901.665255][ C2] RIP: 0010:find_busiest_group+0x1493/0x2830
[ 1901.665310][ C2] Code: ff 49 8d 7d 40 48 89 f8 48 c1 e8 03 42 0f b6 04 30 84 c0 74 08 3c 03 0f 8e 83 11 00 00 41 c7 45 40 01 00 00 00 e9 7f f4 ff ff <49> 8d 7d 38 48 89 f8 48 c1 e8 03 42 0f b6 04 30 84 c0 74 08 3c 03
[ 1901.665339][ C2] RSP: 0018:ff11000100c7f4e8 EFLAGS: 00000097
[ 1901.665363][ C2] RAX: 0000000000000001 RBX: ff11000100e51800 RCX: 0000000000000000
[ 1901.665383][ C2] RDX: 1fe220002018fede RSI: 0000000000000000 RDI: ff11000100c7f6f0
[ 1901.665401][ C2] RBP: ff11000100eaeb00 R08: 0000000000000075 R09: ff11000100eaea00
[ 1901.665420][ C2] R10: 0000000000000000 R11: 0000000000000000 R12: ff11000100eaea18
[ 1901.665437][ C2] R13: ff11000100c7f6a8 R14: dffffc0000000000 R15: ff11000100c7f848
[ 1901.665457][ C2] FS: 0000000000000000(0000) GS:ff11000107900000(0000) knlGS:0000000000000000
[ 1901.665489][ C2] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1901.665510][ C2] CR2: 00007f2b5a37b000 CR3: 0000000105636005 CR4: 0000000000771ee0
[ 1901.665530][ C2] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 1901.665547][ C2] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 1901.665565][ C2] PKRU: 55555554
[ 1901.665575][ C2] Call Trace:
[ 1901.665585][ C2] <TASK>
[ 1901.665607][ C2] ? __pfx_find_busiest_group+0x10/0x10
[ 1901.665682][ C2] ? __pfx__raw_spin_lock+0x10/0x10
[ 1901.665726][ C2] ? __bitmap_and+0x18e/0x210
[ 1901.665775][ C2] load_balance+0x212/0x1280
[ 1901.665821][ C2] ? __update_blocked_fair+0x227/0x2e90
[ 1901.665874][ C2] ? __pfx_load_balance+0x10/0x10
[ 1901.665927][ C2] ? __pfx__raw_spin_lock+0x10/0x10
[ 1901.665970][ C2] ? sched_clock_cpu+0x6d/0x4c0
[ 1901.666015][ C2] newidle_balance+0x51b/0xc90
[ 1901.666108][ C2] ? __pfx_newidle_balance+0x10/0x10
[ 1901.666155][ C2] ? sched_clock+0x38/0x60
[ 1901.666193][ C2] pick_next_task_fair+0x66d/0x23c0
[ 1901.666249][ C2] __schedule+0x4c5/0x1fb0
[ 1901.666298][ C2] ? __pfx___schedule+0x10/0x10
[ 1901.666342][ C2] ? _raw_spin_lock_irqsave+0x8b/0xf0
[ 1901.666387][ C2] ? __pfx__raw_spin_lock_irqsave+0x10/0x10
[ 1901.666432][ C2] ? __try_to_del_timer_sync+0x103/0x160
[ 1901.666465][ C2] ? __pfx___try_to_del_timer_sync+0x10/0x10
[ 1901.666500][ C2] ? housekeeping_test_cpu+0x6f/0x90
[ 1901.666542][ C2] ? get_nohz_timer_target+0xdf/0x5d0
[ 1901.666587][ C2] schedule+0x134/0x280
[ 1901.666632][ C2] schedule_timeout+0x4c2/0x770
[ 1901.666673][ C2] ? _raw_spin_lock_irqsave+0x8b/0xf0
[ 1901.666719][ C2] ? __pfx_schedule_timeout+0x10/0x10
[ 1901.666762][ C2] ? _raw_spin_lock_irqsave+0x8b/0xf0
[ 1901.666807][ C2] ? __pfx_process_timeout+0x10/0x10
[ 1901.666840][ C2] ? __pfx_rcu_implicit_dynticks_qs+0x10/0x10
[ 1901.666888][ C2] ? prepare_to_swait_event+0x11e/0x430
[ 1901.666921][ C2] rcu_gp_fqs_loop+0x1bf/0x9d0
[ 1901.666961][ C2] ? __pfx_rcu_gp_fqs_loop+0x10/0x10
[ 1901.667013][ C2] ? finish_swait+0x9e/0x240
[ 1901.667063][ C2] rcu_gp_kthread+0x277/0x400
[ 1901.667138][ C2] ? __pfx_rcu_gp_kthread+0x10/0x10
[ 1901.667184][ C2] ? __pfx_set_cpus_allowed_ptr+0x10/0x10
[ 1901.667235][ C2] ? __kthread_parkme+0x10d/0x190
[ 1901.667276][ C2] ? __pfx_rcu_gp_kthread+0x10/0x10
[ 1901.667320][ C2] kthread+0x2f4/0x3f0
[ 1901.667367][ C2] ? __pfx_kthread+0x10/0x10
[ 1901.667418][ C2] ret_from_fork+0x4a/0x80
[ 1901.667460][ C2] ? __pfx_kthread+0x10/0x10
[ 1901.667510][ C2] ret_from_fork_asm+0x1b/0x30
[ 1901.667555][ C2] </TASK>
[ 1901.667567][ C0] NMI backtrace for cpu 0
[ 1901.667583][ C0] AAA2 1901445406480 928856909383 0 0 0 928856909774
[ 1901.667608][ C0] AAA2 1901445431980 1901439056150 1901439056650 1901439056896 1901439057156 1901439057448 1901439092009
[ 1901.667637][ C0] softirq_handle_start:
[ 1901.667642][ C0] 0
[ 1901.667648][ C0] 1901437034812
[ 1901.667655][ C0] 928873837201
[ 1901.667662][ C0] 1873956031919
[ 1901.667669][ C0] 0
[ 1901.667675][ C0] 0
[ 1901.667681][ C0] 928609012446
[ 1901.667688][ C0] 1901439057689
[ 1901.667695][ C0] 0
[ 1901.667701][ C0] 928888606411
[ 1901.667707][ C0]
[ 1901.667711][ C0] softirq_handle_end_time:
[ 1901.667716][ C0] 0
[ 1901.667722][ C0] 1901437060853
[ 1901.667729][ C0] 928873838583
[ 1901.667736][ C0] 1873957586746
[ 1901.667743][ C0] 0
[ 1901.667749][ C0] 0
[ 1901.667755][ C0] 928609013591
[ 1901.667762][ C0] 1901439091316
[ 1901.667769][ C0] 0
[ 1901.667774][ C0] 928888785127
[ 1901.667782][ C0]
[ 1901.667787][ C0] CPU: 0 PID: 8956 Comm: kworker/u8:1 Tainted: G L 6.6.0+ #1873
[ 1901.667817][ C0] Hardware name: QEMU Ubuntu 24.04 PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015
[ 1901.667833][ C0] Workqueue: events_unbound nsim_dev_trap_report_work
[ 1901.667898][ C0] RIP: 0010:process_one_work+0x94a/0x1020
[ 1901.667934][ C0] Code: 3c 03 0f 8e e5 03 00 00 c7 43 30 ff ff ff 7f 48 8b 74 24 48 48 83 c4 58 4c 89 e7 5b 5d 41 5c 41 5d 41 5e 41 5f e9 f6 db ff ff <e8> 41 fa 31 00 41 81 e5 88 01 00 00 31 ff 44 89 ee e8 60 f0 31 00
[ 1901.667961][ C0] RSP: 0018:ff1100006e90fda8 EFLAGS: 00000002
[ 1901.667982][ C0] RAX: 0000000000000000 RBX: ff11000037aa1e00 RCX: ffffffff8d769330
[ 1901.668001][ C0] RDX: ff1100006ebea2c0 RSI: 0000000000000000 RDI: 0000000000000005
[ 1901.668019][ C0] RBP: ff11000100071000 R08: 0000000000000001 R09: ffe21c000dd21faa
[ 1901.668038][ C0] R10: 0000000000000080 R11: 0000000000000001 R12: ff11000100116d00
[ 1901.668055][ C0] R13: 0000000000000080 R14: 0000000000000080 R15: ffffffff9284bec0
[ 1901.668089][ C0] FS: 0000000000000000(0000) GS:ff11000107800000(0000) knlGS:0000000000000000
[ 1901.668119][ C0] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1901.668139][ C0] CR2: 00007f77e1f86000 CR3: 00000000088d0002 CR4: 0000000000771ef0
[ 1901.668156][ C0] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 1901.668172][ C0] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 1901.668189][ C0] PKRU: 55555554
[ 1901.668198][ C0] Call Trace:
[ 1901.668212][ C0] <TASK>
[ 1901.668240][ C0] worker_thread+0x849/0x1090
[ 1901.668297][ C0] ? __kthread_parkme+0x10d/0x190
[ 1901.668335][ C0] ? __pfx_worker_thread+0x10/0x10
[ 1901.668364][ C0] kthread+0x2f4/0x3f0
[ 1901.668403][ C0] ? __pfx_kthread+0x10/0x10
[ 1901.668444][ C0] ret_from_fork+0x4a/0x80
[ 1901.668479][ C0] ? __pfx_kthread+0x10/0x10
[ 1901.668519][ C0] ret_from_fork_asm+0x1b/0x30
[ 1901.668556][ C0] </TASK>
[ 2013.245598][ C3] perf: interrupt took too long (5525 > 5362), lowering kernel.perf_event_max_sample_rate to 36000
[ 2069.210124][ C0] rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
[ 2069.212232][ C0] rcu: BBB 2068990137232 928856909383 0 0 0 928856909774
[ 2069.214280][ C0] rcu: BBB 2068992185298 2068986047715 2068986048070 2068986048234 2068986048400 2068986048562 2068986245132
[ 2069.217571][ C0] rcu: 1-....: (1 ticks this GP) idle=a97c/1/0x4000000000000000 softirq=26480/26480 fqs=474201
[ 2069.220202][ C0] rcu: (detected by 0, t=1140107 jiffies, g=99129, q=4647382 ncpus=4)
[ 2069.222105][ C0] Sending NMI from CPU 0 to CPUs 1:
[ 2069.223354][ C1] NMI backtrace for cpu 1
[ 2069.223363][ C1] AAA2 2069001268135 2069001236634 0 0 0 2069001236976
[ 2069.223372][ C1] AAA2 2069001277548 993372484411 993372484804 993372484875 928887973527 928887973577 928887974425
[ 2069.223381][ C1] softirq_handle_start:
[ 2069.223383][ C1] 0
[ 2069.223386][ C1] 928330006990
[ 2069.223389][ C1] 924221567459
[ 2069.223391][ C1] 928817263100
[ 2069.223393][ C1] 928328744939
[ 2069.223395][ C1] 0
[ 2069.223397][ C1] 921062008817
[ 2069.223400][ C1] 928879010614
[ 2069.223402][ C1] 0
[ 2069.223404][ C1] 928887973635
[ 2069.223406][ C1]
[ 2069.223408][ C1] softirq_handle_end_time:
[ 2069.223410][ C1] 0
[ 2069.223412][ C1] 928330009295
[ 2069.223414][ C1] 924221568491
[ 2069.223416][ C1] 928817511439
[ 2069.223418][ C1] 928328806233
[ 2069.223421][ C1] 0
[ 2069.223423][ C1] 921062009968
[ 2069.223425][ C1] 928879011708
[ 2069.223427][ C1] 0
[ 2069.223429][ C1] 928887974243
[ 2069.223431][ C1]
[ 2069.223434][ C1] CPU: 1 PID: 8079 Comm: syz.8.781 Tainted: G L 6.6.0+ #1873
[ 2069.223457][ C1] Hardware name: QEMU Ubuntu 24.04 PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015
[ 2069.223462][ C1] RIP: 0010:native_apic_msr_eoi+0xf/0x20
[ 2069.223490][ C1] Code: f6 31 d2 89 cf e9 d1 a5 e9 01 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 31 c0 b9 0b 08 00 00 89 c2 0f 30 <c3> cc cc cc cc 66 66 2e 0f 1f 84 00 00 00 00 00 90 90 90 90 90 90
[ 2069.223499][ C1] RSP: 0018:ff11000107889e78 EFLAGS: 00000046
[ 2069.223507][ C1] RAX: 0000000000000000 RBX: ff110001078c8000 RCX: 000000000000080b
[ 2069.223513][ C1] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000001
[ 2069.223519][ C1] RBP: 0000000000000000 R08: 0000000000000001 R09: ffe21c0020f19008
[ 2069.223524][ C1] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
[ 2069.223529][ C1] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
[ 2069.223535][ C1] FS: 00007f10a79556c0(0000) GS:ff11000107880000(0000) knlGS:0000000000000000
[ 2069.223545][ C1] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 2069.223551][ C1] CR2: 0000000000638300 CR3: 0000000036592002 CR4: 0000000000771ee0
[ 2069.223557][ C1] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 2069.223562][ C1] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 2069.223567][ C1] PKRU: 00000000
[ 2069.223570][ C1] Call Trace:
[ 2069.223575][ C1] <IRQ>
[ 2069.223579][ C1] kvm_guest_apic_eoi_write+0x45/0x50
[ 2069.223592][ C1] __sysvec_irq_work+0x14/0x210
[ 2069.223603][ C1] sysvec_irq_work+0x31/0x80
[ 2069.223620][ C1] asm_sysvec_irq_work+0x1a/0x20
[ 2069.223636][ C1] RIP: 0010:handle_softirqs+0x230/0x8d0
[ 2069.223650][ C1] Code: 24 f5 80 5d 84 98 e8 1f 9b 27 00 4c 89 e2 48 c1 ea 03 42 80 3c 3a 00 0f 85 d5 05 00 00 49 89 04 24 fb 65 44 8b 35 0c 2c 93 72 <4d> 63 f6 49 c7 c4 20 0c 03 00 4a 8d 3c f5 80 5d 84 98 48 89 f8 48
[ 2069.223660][ C1] RSP: 0018:ff11000107889f68 EFLAGS: 00000246
[ 2069.223666][ C1] RAX: 000000e7499d350b RBX: 0000000000000000 RCX: 0000000000000018
[ 2069.223672][ C1] RDX: 1fe2200020f16185 RSI: 00000000001e2170 RDI: 0000000000000004
[ 2069.223678][ C1] RBP: ff1100003ae422c0 R08: 0000000000000001 R09: ffe21c0020f16239
[ 2069.223683][ C1] R10: 00000000001e2170 R11: 3030303030302052 R12: ff110001078b0c28
[ 2069.223689][ C1] R13: 0000000000400140 R14: 0000000000000001 R15: dffffc0000000000
[ 2069.223699][ C1] ? handle_softirqs+0x211/0x8d0
[ 2069.223713][ C1] ? update_sibling_normalize_runtime+0x1a/0x410
[ 2069.223728][ C1] irq_exit_rcu+0x134/0x190
[ 2069.223742][ C1] sysvec_irq_work+0x6a/0x80
[ 2069.223752][ C1] </IRQ>
[ 2069.223755][ C1] <TASK>
[ 2069.223758][ C1] asm_sysvec_irq_work+0x1a/0x20
[ 2069.223772][ C1] RIP: 0010:rcu_read_unlock_special+0x186/0x530
[ 2069.223785][ C1] Code: 0f 85 01 01 00 00 4d 85 f6 0f 84 6a 01 00 00 40 84 ed 0f 84 61 01 00 00 bf 09 00 00 00 e8 c2 45 df ff fb 65 8b 2d 26 65 72 72 <48> 63 ed 48 c7 c3 40 1a 03 00 48 b8 00 00 00 00 00 fc ff df 48 8d
[ 2069.223794][ C1] RSP: 0018:ff110000380b6fe8 EFLAGS: 00000283
[ 2069.223800][ C1] RAX: 0000000000000001 RBX: ff110001078c6800 RCX: ffffffff8d7c6a90
[ 2069.223806][ C1] RDX: 0000000000000001 RSI: 0000000000000046 RDI: ff11000100e33084
[ 2069.223812][ C1] RBP: 0000000000000001 R08: 0000000000000000 R09: fffffbfff3716ab4
[ 2069.223817][ C1] R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000
[ 2069.223822][ C1] R13: dffffc0000000000 R14: 0000000000000200 R15: ffffffff99f43000
[ 2069.223830][ C1] ? ttwu_do_activate+0x520/0x6f0
[ 2069.223845][ C1] ? rcu_read_unlock_special+0x17e/0x530
[ 2069.223857][ C1] page_vma_mapped_walk+0x1e00/0x2b50
[ 2069.223877][ C1] ? __netlink_deliver_tap_skb+0x352/0x4d0
[ 2069.223888][ C1] ? __pfx_page_vma_mapped_walk+0x10/0x10
[ 2069.223903][ C1] ? netlink_ack+0x614/0xba0
[ 2069.223916][ C1] try_to_migrate_one+0x3f0/0x2cb0
[ 2069.223930][ C1] ? __sys_sendmsg+0xee/0x1b0
[ 2069.223946][ C1] ? __pfx_try_to_migrate_one+0x10/0x10
[ 2069.223959][ C1] ? __orc_find+0x109/0x140
[ 2069.223972][ C1] ? arch_stack_walk+0x92/0x160
[ 2069.223989][ C1] ? __anon_vma_interval_tree_subtree_search+0x171/0x1f0
[ 2069.224005][ C1] ? __pfx_try_to_migrate_one+0x10/0x10
[ 2069.224019][ C1] rmap_walk_anon+0x2b0/0x980
[ 2069.224033][ C1] try_to_migrate+0x19f/0x350
[ 2069.224046][ C1] ? __pfx_try_to_migrate+0x10/0x10
[ 2069.224060][ C1] ? __pfx_try_to_migrate_one+0x10/0x10
[ 2069.224073][ C1] ? __pfx_folio_not_mapped+0x10/0x10
[ 2069.224092][ C1] ? __pfx_folio_lock_anon_vma_read+0x10/0x10
[ 2069.224106][ C1] ? __pfx_invalid_migration_vma+0x10/0x10
[ 2069.224117][ C1] ? folio_total_mapcount+0xb4/0x210
[ 2069.224131][ C1] split_huge_page_to_list_to_order+0xc84/0x17f0
[ 2069.224147][ C1] ? __pfx_split_huge_page_to_list_to_order+0x10/0x10
[ 2069.224160][ C1] ? __orc_find+0x109/0x140
[ 2069.224174][ C1] ? __orc_find+0x109/0x140
[ 2069.224187][ C1] ? entry_SYSCALL_64_after_hwframe+0x77/0xe2
[ 2069.224203][ C1] madvise_cold_or_pageout_pte_range+0x1966/0x2450
[ 2069.224218][ C1] ? arch_stack_walk+0x92/0x160
[ 2069.224232][ C1] ? __read_once_word_nocheck+0x9/0x20
[ 2069.224246][ C1] ? deref_stack_reg+0x1a4/0x2b0
[ 2069.224261][ C1] ? entry_SYSCALL_64_after_hwframe+0x77/0xe2
[ 2069.224276][ C1] ? __pfx_madvise_cold_or_pageout_pte_range+0x10/0x10
[ 2069.224290][ C1] ? __read_once_word_nocheck+0x9/0x20
[ 2069.224304][ C1] ? __orc_find+0x109/0x140
[ 2069.224317][ C1] ? __pfx_madvise_cold_or_pageout_pte_range+0x10/0x10
[ 2069.224331][ C1] walk_pmd_range.isra.0+0x240/0x720
[ 2069.224341][ C1] ? __read_once_word_nocheck+0x9/0x20
[ 2069.224356][ C1] walk_pud_range.isra.0+0x3d3/0x6c0
[ 2069.224367][ C1] walk_p4d_range+0x2ef/0x4f0
[ 2069.224378][ C1] walk_pgd_range+0x27e/0x530
[ 2069.224388][ C1] __walk_page_range+0x4ab/0x5a0
[ 2069.224397][ C1] ? find_vma+0x81/0xb0
[ 2069.224405][ C1] ? __pfx_find_vma+0x10/0x10
[ 2069.224413][ C1] ? folios_put_refs+0x510/0x740
[ 2069.224424][ C1] ? walk_page_test+0xa0/0x190
[ 2069.224439][ C1] walk_page_range+0x2a0/0x530
[ 2069.224449][ C1] ? __pfx_walk_page_range+0x10/0x10
[ 2069.224458][ C1] ? vtime_task_switch_generic+0x278/0x5a0
[ 2069.224471][ C1] ? folio_batch_move_lru+0x2b8/0x3d0
[ 2069.224481][ C1] ? __pfx_lru_add_fn+0x10/0x10
[ 2069.224490][ C1] madvise_pageout_page_range+0x1cc/0x6d0
[ 2069.224504][ C1] ? __pfx_madvise_pageout_page_range+0x10/0x10
[ 2069.224519][ C1] madvise_pageout+0x1f4/0x400
[ 2069.224532][ C1] ? __pfx_madvise_pageout+0x10/0x10
[ 2069.224545][ C1] ? futex_wait+0x552/0x680
[ 2069.224561][ C1] ? __sanitizer_cov_trace_switch+0x54/0x90
[ 2069.224572][ C1] ? __sanitizer_cov_trace_switch+0x54/0x90
[ 2069.224582][ C1] ? mas_prev_setup.constprop.0+0xb4/0x530
[ 2069.224599][ C1] madvise_vma_behavior+0x8fa/0xe30
[ 2069.224613][ C1] ? __pfx_madvise_vma_behavior+0x10/0x10
[ 2069.224626][ C1] ? find_vma_prev+0xf5/0x170
[ 2069.224637][ C1] ? __pfx_find_vma_prev+0x10/0x10
[ 2069.224649][ C1] ? do_futex+0x135/0x360
[ 2069.224662][ C1] do_madvise+0x3af/0x650
[ 2069.224676][ C1] ? __pfx_do_madvise+0x10/0x10
[ 2069.224688][ C1] ? __se_sys_futex+0xf7/0x390
[ 2069.224701][ C1] ? kvm_steal_clock+0xca/0x100
[ 2069.224717][ C1] ? get_vtime_delta+0xd7/0x250
[ 2069.224731][ C1] __x64_sys_madvise+0xaf/0x120
[ 2069.224744][ C1] ? __ct_user_exit+0x70/0xe0
[ 2069.224758][ C1] do_syscall_64+0x59/0x110
[ 2069.224774][ C1] entry_SYSCALL_64_after_hwframe+0x78/0xe2
[ 2069.224789][ C1] RIP: 0033:0x54d2cd
[ 2069.224796][ C1] Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
[ 2069.224805][ C1] RSP: 002b:00007f10a7955048 EFLAGS: 00000246 ORIG_RAX: 000000000000001c
[ 2069.224813][ C1] RAX: ffffffffffffffda RBX: 0000000000795fa0 RCX: 000000000054d2cd
[ 2069.224819][ C1] RDX: 0000000000000015 RSI: 0000000000003000 RDI: 0000000020001000
[ 2069.224825][ C1] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
[ 2069.224830][ C1] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000795fac
[ 2069.224835][ C1] R13: 0000000000000000 R14: 0000000000795fa0 R15: 00007f10a7935000
[ 2069.224844][ C1] </TASK>
[ 2074.851167][ T528] rcu: INFO: rcu_preempt detected expedited stalls on CPUs/tasks: { 1-.... } 1145742 jiffies s: 14109 root: 0x2/.
[ 2074.853320][ T528] rcu: blocking rcu_node structures (internal RCU debug):
[ 2074.854557][ T528] Sending NMI from CPU 0 to CPUs 1:
[ 2074.855497][ C1] NMI backtrace for cpu 1
[ 2074.855503][ C1] AAA2 2074633411808 2074633384796 0 0 0 2074633385139
[ 2074.855513][ C1] AAA2 2074633421487 993372484411 993372484804 993372484875 928887973527 928887973577 928887974425
[ 2074.855523][ C1] softirq_handle_start:
[ 2074.855525][ C1] 0
[ 2074.855527][ C1] 928330006990
[ 2074.855530][ C1] 924221567459
[ 2074.855532][ C1] 928817263100
[ 2074.855534][ C1] 928328744939
[ 2074.855537][ C1] 0
[ 2074.855539][ C1] 921062008817
[ 2074.855541][ C1] 928879010614
[ 2074.855543][ C1] 0
[ 2074.855545][ C1] 928887973635
[ 2074.855547][ C1]
[ 2074.855549][ C1] softirq_handle_end_time:
[ 2074.855550][ C1] 0
[ 2074.855552][ C1] 928330009295
[ 2074.855555][ C1] 924221568491
[ 2074.855557][ C1] 928817511439
[ 2074.855559][ C1] 928328806233
[ 2074.855562][ C1] 0
[ 2074.855564][ C1] 921062009968
[ 2074.855566][ C1] 928879011708
[ 2074.855568][ C1] 0
[ 2074.855570][ C1] 928887974243
[ 2074.855572][ C1]
[ 2074.855575][ C1] CPU: 1 PID: 8079 Comm: syz.8.781 Tainted: G L 6.6.0+ #1873
[ 2074.855585][ C1] Hardware name: QEMU Ubuntu 24.04 PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015
[ 2074.855590][ C1] RIP: 0010:asm_sysvec_irq_work+0x0/0x20
[ 2074.855611][ C1] Code: 06 14 fd ff e9 a1 05 00 00 90 f3 0f 1e fa 0f 01 ca fc 6a ff e8 51 04 00 00 48 89 c4 48 89 e7 e8 76 f4 fc ff e9 81 05 00 00 90 <f3> 0f 1e fa 0f 01 ca fc 6a ff e8 31 04 00 00 48 89 c4 48 89 e7 e8
[ 2074.855620][ C1] RSP: 0018:ff11000107889f38 EFLAGS: 00000046
[ 2074.855628][ C1] RAX: 000000e7499d350b RBX: 0000000000000000 RCX: 0000000000000018
[ 2074.855634][ C1] RDX: 1fe2200020f16185 RSI: 00000000001e2170 RDI: 0000000000000004
[ 2074.855640][ C1] RBP: ff1100003ae422c0 R08: 0000000000000001 R09: ffe21c0020f16239
[ 2074.855645][ C1] R10: 00000000001e2170 R11: 3030303030302052 R12: ff110001078b0c28
[ 2074.855651][ C1] R13: 0000000000400140 R14: 0000000000000001 R15: dffffc0000000000
[ 2074.855657][ C1] FS: 00007f10a79556c0(0000) GS:ff11000107880000(0000) knlGS:0000000000000000
[ 2074.855667][ C1] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 2074.855674][ C1] CR2: 0000000000638300 CR3: 0000000036592002 CR4: 0000000000771ee0
[ 2074.855679][ C1] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 2074.855685][ C1] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 2074.855690][ C1] PKRU: 00000000
[ 2074.855693][ C1] Call Trace:
[ 2074.855697][ C1] <IRQ>
[ 2074.855700][ C1] RIP: 0010:handle_softirqs+0x230/0x8d0
[ 2074.855715][ C1] Code: 24 f5 80 5d 84 98 e8 1f 9b 27 00 4c 89 e2 48 c1 ea 03 42 80 3c 3a 00 0f 85 d5 05 00 00 49 89 04 24 fb 65 44 8b 35 0c 2c 93 72 <4d> 63 f6 49 c7 c4 20 0c 03 00 4a 8d 3c f5 80 5d 84 98 48 89 f8 48
[ 2074.855724][ C1] RSP: 0018:ff11000107889f68 EFLAGS: 00000246
[ 2074.855732][ C1] ? handle_softirqs+0x211/0x8d0
[ 2074.855746][ C1] ? update_sibling_normalize_runtime+0x1a/0x410
[ 2074.855761][ C1] irq_exit_rcu+0x134/0x190
[ 2074.855775][ C1] sysvec_irq_work+0x6a/0x80
[ 2074.855787][ C1] </IRQ>
[ 2074.855790][ C1] <TASK>
[ 2074.855792][ C1] asm_sysvec_irq_work+0x1a/0x20
[ 2074.855807][ C1] RIP: 0010:rcu_read_unlock_special+0x186/0x530
[ 2074.855820][ C1] Code: 0f 85 01 01 00 00 4d 85 f6 0f 84 6a 01 00 00 40 84 ed 0f 84 61 01 00 00 bf 09 00 00 00 e8 c2 45 df ff fb 65 8b 2d 26 65 72 72 <48> 63 ed 48 c7 c3 40 1a 03 00 48 b8 00 00 00 00 00 fc ff df 48 8d
[ 2074.855829][ C1] RSP: 0018:ff110000380b6fe8 EFLAGS: 00000283
[ 2074.855835][ C1] RAX: 0000000000000001 RBX: ff110001078c6800 RCX: ffffffff8d7c6a90
[ 2074.855841][ C1] RDX: 0000000000000001 RSI: 0000000000000046 RDI: ff11000100e33084
[ 2074.855847][ C1] RBP: 0000000000000001 R08: 0000000000000000 R09: fffffbfff3716ab4
[ 2074.855852][ C1] R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000
[ 2074.855857][ C1] R13: dffffc0000000000 R14: 0000000000000200 R15: ffffffff99f43000
[ 2074.855865][ C1] ? ttwu_do_activate+0x520/0x6f0
[ 2074.855881][ C1] ? rcu_read_unlock_special+0x17e/0x530
[ 2074.855894][ C1] page_vma_mapped_walk+0x1e00/0x2b50
[ 2074.855913][ C1] ? __netlink_deliver_tap_skb+0x352/0x4d0
[ 2074.855924][ C1] ? __pfx_page_vma_mapped_walk+0x10/0x10
[ 2074.855939][ C1] ? netlink_ack+0x614/0xba0
[ 2074.855952][ C1] try_to_migrate_one+0x3f0/0x2cb0
[ 2074.855967][ C1] ? __sys_sendmsg+0xee/0x1b0
[ 2074.855982][ C1] ? __pfx_try_to_migrate_one+0x10/0x10
[ 2074.855996][ C1] ? __orc_find+0x109/0x140
[ 2074.856010][ C1] ? arch_stack_walk+0x92/0x160
[ 2074.856026][ C1] ? __anon_vma_interval_tree_subtree_search+0x171/0x1f0
[ 2074.856043][ C1] ? __pfx_try_to_migrate_one+0x10/0x10
[ 2074.856056][ C1] rmap_walk_anon+0x2b0/0x980
[ 2074.856070][ C1] try_to_migrate+0x19f/0x350
[ 2074.856092][ C1] ? __pfx_try_to_migrate+0x10/0x10
[ 2074.856105][ C1] ? __pfx_try_to_migrate_one+0x10/0x10
[ 2074.856118][ C1] ? __pfx_folio_not_mapped+0x10/0x10
[ 2074.856129][ C1] ? __pfx_folio_lock_anon_vma_read+0x10/0x10
[ 2074.856143][ C1] ? __pfx_invalid_migration_vma+0x10/0x10
[ 2074.856154][ C1] ? folio_total_mapcount+0xb4/0x210
[ 2074.856168][ C1] split_huge_page_to_list_to_order+0xc84/0x17f0
[ 2074.856184][ C1] ? __pfx_split_huge_page_to_list_to_order+0x10/0x10
[ 2074.856197][ C1] ? __orc_find+0x109/0x140
[ 2074.856211][ C1] ? __orc_find+0x109/0x140
[ 2074.856224][ C1] ? entry_SYSCALL_64_after_hwframe+0x77/0xe2
[ 2074.856239][ C1] madvise_cold_or_pageout_pte_range+0x1966/0x2450
[ 2074.856254][ C1] ? arch_stack_walk+0x92/0x160
[ 2074.856268][ C1] ? __read_once_word_nocheck+0x9/0x20
[ 2074.856282][ C1] ? deref_stack_reg+0x1a4/0x2b0
[ 2074.856296][ C1] ? entry_SYSCALL_64_after_hwframe+0x77/0xe2
[ 2074.856311][ C1] ? __pfx_madvise_cold_or_pageout_pte_range+0x10/0x10
[ 2074.856325][ C1] ? __read_once_word_nocheck+0x9/0x20
[ 2074.856338][ C1] ? __orc_find+0x109/0x140
[ 2074.856352][ C1] ? __pfx_madvise_cold_or_pageout_pte_range+0x10/0x10
[ 2074.856365][ C1] walk_pmd_range.isra.0+0x240/0x720
[ 2074.856376][ C1] ? __read_once_word_nocheck+0x9/0x20
[ 2074.856391][ C1] walk_pud_range.isra.0+0x3d3/0x6c0
[ 2074.856402][ C1] walk_p4d_range+0x2ef/0x4f0
[ 2074.856412][ C1] walk_pgd_range+0x27e/0x530
[ 2074.856423][ C1] __walk_page_range+0x4ab/0x5a0
[ 2074.856432][ C1] ? find_vma+0x81/0xb0
[ 2074.856440][ C1] ? __pfx_find_vma+0x10/0x10
[ 2074.856448][ C1] ? folios_put_refs+0x510/0x740
[ 2074.856458][ C1] ? walk_page_test+0xa0/0x190
[ 2074.856473][ C1] walk_page_range+0x2a0/0x530
[ 2074.856483][ C1] ? __pfx_walk_page_range+0x10/0x10
[ 2074.856492][ C1] ? vtime_task_switch_generic+0x278/0x5a0
[ 2074.856505][ C1] ? folio_batch_move_lru+0x2b8/0x3d0
[ 2074.856514][ C1] ? __pfx_lru_add_fn+0x10/0x10
[ 2074.856524][ C1] madvise_pageout_page_range+0x1cc/0x6d0
[ 2074.856538][ C1] ? __pfx_madvise_pageout_page_range+0x10/0x10
[ 2074.856553][ C1] madvise_pageout+0x1f4/0x400
[ 2074.856566][ C1] ? __pfx_madvise_pageout+0x10/0x10
[ 2074.856579][ C1] ? futex_wait+0x552/0x680
[ 2074.856595][ C1] ? __sanitizer_cov_trace_switch+0x54/0x90
[ 2074.856605][ C1] ? __sanitizer_cov_trace_switch+0x54/0x90
[ 2074.856615][ C1] ? mas_prev_setup.constprop.0+0xb4/0x530
[ 2074.856632][ C1] madvise_vma_behavior+0x8fa/0xe30
[ 2074.856646][ C1] ? __pfx_madvise_vma_behavior+0x10/0x10
[ 2074.856660][ C1] ? find_vma_prev+0xf5/0x170
[ 2074.856670][ C1] ? __pfx_find_vma_prev+0x10/0x10
[ 2074.856682][ C1] ? do_futex+0x135/0x360
[ 2074.856695][ C1] do_madvise+0x3af/0x650
[ 2074.856708][ C1] ? __pfx_do_madvise+0x10/0x10
[ 2074.856720][ C1] ? __se_sys_futex+0xf7/0x390
[ 2074.856733][ C1] ? kvm_steal_clock+0xca/0x100
[ 2074.856749][ C1] ? get_vtime_delta+0xd7/0x250
[ 2074.856764][ C1] __x64_sys_madvise+0xaf/0x120
[ 2074.856776][ C1] ? __ct_user_exit+0x70/0xe0
[ 2074.856790][ C1] do_syscall_64+0x59/0x110
[ 2074.856806][ C1] entry_SYSCALL_64_after_hwframe+0x78/0xe2
[ 2074.856821][ C1] RIP: 0033:0x54d2cd
[ 2074.856828][ C1] Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
[ 2074.856837][ C1] RSP: 002b:00007f10a7955048 EFLAGS: 00000246 ORIG_RAX: 000000000000001c
[ 2074.856845][ C1] RAX: ffffffffffffffda RBX: 0000000000795fa0 RCX: 000000000054d2cd
[ 2074.856851][ C1] RDX: 0000000000000015 RSI: 0000000000003000 RDI: 0000000020001000
[ 2074.856857][ C1] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
[ 2074.856862][ C1] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000795fac
[ 2074.856867][ C1] R13: 0000000000000000 R14: 0000000000795fa0 R15: 00007f10a7935000
[ 2074.856876][ C1] </TASK>
[ 2141.634105][ C3] watchdog: BUG: soft lockup - CPU#3 stuck for 1136s! [syz.8.781:8076]
[ 2141.634824][ C3] Modules linked in:
[ 2141.635152][ C3] CPU: 3 PID: 8076 Comm: syz.8.781 Tainted: G L 6.6.0+ #1873
[ 2141.635864][ C3] Hardware name: QEMU Ubuntu 24.04 PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015
[ 2141.636602][ C3] RIP: 0010:queued_spin_lock_slowpath+0x109/0x9c0
[ 2141.637141][ C3] Code: 00 48 8b 44 24 60 65 48 2b 04 25 28 00 00 00 0f 85 ca 07 00 00 48 83 c4 68 5b 5d 41 5c 41 5d 41 5e 41 5f c3 cc cc cc cc f3 90 <eb> 85 81 fe 00 01 00 00 0f 84 dc 00 00 00 81 fe ff 00 00 00 0f 87
[ 2141.638704][ C3] RSP: 0000:ff1100002900f8b0 EFLAGS: 00000202
[ 2141.639207][ C3] RAX: 0000000000000000 RBX: 0000000000000001 RCX: ffffffff961f5ecd
[ 2141.639842][ C3] RDX: fffa7c000005f936 RSI: 0000000000000004 RDI: ffd40000002fc9a8
[ 2141.640484][ C3] RBP: 0000000000000003 R08: 0000000000000000 R09: fffa7c000005f935
[ 2141.641127][ C3] R10: ffd40000002fc9ab R11: 0000000000000000 R12: fffa7c000005f935
[ 2141.641764][ C3] R13: 0000000000000001 R14: 1fe2200005201f17 R15: ffd40000002fc9a8
[ 2141.642409][ C3] FS: 000000002316c500(0000) GS:ff11000107980000(0000) knlGS:0000000000000000
[ 2141.643139][ C3] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 2141.643671][ C3] CR2: 0000000020000000 CR3: 0000000036592004 CR4: 0000000000771ee0
[ 2141.644321][ C3] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 2141.644957][ C3] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 2141.645626][ C3] PKRU: 80000000
[ 2141.645920][ C3] Call Trace:
[ 2141.646213][ C3] <TASK>
[ 2141.646459][ C3] ? __pfx_queued_spin_lock_slowpath+0x10/0x10
[ 2141.646973][ C3] _raw_spin_lock+0xd0/0xe0
[ 2141.647362][ C3] ? __pfx__raw_spin_lock+0x10/0x10
[ 2141.647800][ C3] __pte_offset_map_lock+0x129/0x270
[ 2141.648251][ C3] ? __pfx___pte_offset_map_lock+0x10/0x10
[ 2141.648730][ C3] migration_entry_wait+0x85/0x270
[ 2141.649186][ C3] ? __pfx_migration_entry_wait+0x10/0x10
[ 2141.649657][ C3] ? __pfx___schedule+0x10/0x10
[ 2141.650065][ C3] ? __hrtimer_start_range_ns+0x355/0xd00
[ 2141.650555][ C3] do_swap_page+0x36d2/0x4670
[ 2141.650950][ C3] ? plist_del+0x24c/0x450
[ 2141.651326][ C3] ? __pte_offset_map+0x2b9/0x3d0
[ 2141.651743][ C3] ? __pfx_do_swap_page+0x10/0x10
[ 2141.652168][ C3] ? __pfx_default_wake_function+0x10/0x10
[ 2141.652650][ C3] handle_pte_fault+0x5ae/0x7b0
[ 2141.653051][ C3] __handle_mm_fault+0xf9e/0x17f0
[ 2141.653473][ C3] ? __pfx___handle_mm_fault+0x10/0x10
[ 2141.653931][ C3] ? lock_vma_under_rcu+0x377/0x4d0
[ 2141.654355][ C3] ? __pfx_lock_vma_under_rcu+0x10/0x10
[ 2141.654795][ C3] handle_mm_fault+0x4bf/0xa20
[ 2141.655191][ C3] exc_page_fault+0x20b/0x7f0
[ 2141.655573][ C3] asm_exc_page_fault+0x26/0x30
[ 2141.655972][ C3] RIP: 0033:0x51d788
[ 2141.656307][ C3] Code: 66 89 74 17 02 88 0f c3 c5 fa 6f 06 c5 fa 6f 4c 16 f0 c5 fa 7f 07 c5 fa 7f 4c 17 f0 c3 0f 1f 44 00 00 48 8b 4c 16 f8 48 8b 36 <48> 89 37 48 89 4c 17 f8 c3 62 e1 fe 28 6f 54 16 ff 62 e1 fe 28 6f
[ 2141.657882][ C3] RSP: 002b:00007fff991f9118 EFLAGS: 00010202
[ 2141.658387][ C3] RAX: 0000000020000000 RBX: 0000000000000004 RCX: 002367732f766564
[ 2141.659048][ C3] RDX: 0000000000000009 RSI: 2367732f7665642f RDI: 0000000020000000
[ 2141.659691][ C3] RBP: 0000000000797ba0 R08: 00007f10a7800000 R09: 0000000000000001
[ 2141.660351][ C3] R10: 0000000000000001 R11: 0000000000000009 R12: 0000000000000032
[ 2141.660997][ C3] R13: 00000000000e2c77 R14: 0000000000795fa0 R15: 0000000000795fac
[ 2141.661653][ C3] </TASK>
[ 2141.661914][ C3] Sending NMI from CPU 3 to CPUs 0-2:
[ 2141.662396][ C1] NMI backtrace for cpu 1
[ 2141.662406][ C1] AAA2 2141440346452 2141440306520 0 0 0 2141440307415
[ 2141.662421][ C1] AAA2 2141440362180 993372484411 993372484804 993372484875 928887973527 928887973577 928887974425
[ 2141.662439][ C1] softirq_handle_start:
[ 2141.662442][ C1] 0
[ 2141.662447][ C1] 928330006990
[ 2141.662451][ C1] 924221567459
[ 2141.662456][ C1] 928817263100
[ 2141.662461][ C1] 928328744939
[ 2141.662465][ C1] 0
[ 2141.662470][ C1] 921062008817
[ 2141.662475][ C1] 928879010614
[ 2141.662480][ C1] 0
[ 2141.662484][ C1] 928887973635
[ 2141.662489][ C1]
[ 2141.662491][ C1] softirq_handle_end_time:
[ 2141.662495][ C1] 0
[ 2141.662499][ C1] 928330009295
[ 2141.662504][ C1] 924221568491
[ 2141.662509][ C1] 928817511439
[ 2141.662514][ C1] 928328806233
[ 2141.662518][ C1] 0
[ 2141.662522][ C1] 921062009968
[ 2141.662527][ C1] 928879011708
[ 2141.662532][ C1] 0
[ 2141.662536][ C1] 928887974243
[ 2141.662541][ C1]
[ 2141.662545][ C1] CPU: 1 PID: 8079 Comm: syz.8.781 Tainted: G L 6.6.0+ #1873
[ 2141.662564][ C1] Hardware name: QEMU Ubuntu 24.04 PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015
[ 2141.662573][ C1] RIP: 0010:asm_sysvec_irq_work+0x0/0x20
[ 2141.662608][ C1] Code: 06 14 fd ff e9 a1 05 00 00 90 f3 0f 1e fa 0f 01 ca fc 6a ff e8 51 04 00 00 48 89 c4 48 89 e7 e8 76 f4 fc ff e9 81 05 00 00 90 <f3> 0f 1e fa 0f 01 ca fc 6a ff e8 31 04 00 00 48 89 c4 48 89 e7 e8
[ 2141.662626][ C1] RSP: 0018:ff11000107889f38 EFLAGS: 00000046
[ 2141.662642][ C1] RAX: 000000e7499d350b RBX: 0000000000000000 RCX: 0000000000000018
[ 2141.662655][ C1] RDX: 1fe2200020f16185 RSI: 00000000001e2170 RDI: 0000000000000004
[ 2141.662668][ C1] RBP: ff1100003ae422c0 R08: 0000000000000001 R09: ffe21c0020f16239
[ 2141.662681][ C1] R10: 00000000001e2170 R11: 3030303030302052 R12: ff110001078b0c28
[ 2141.662695][ C1] R13: 0000000000400140 R14: 0000000000000001 R15: dffffc0000000000
[ 2141.662708][ C1] FS: 00007f10a79556c0(0000) GS:ff11000107880000(0000) knlGS:0000000000000000
[ 2141.662731][ C1] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 2141.662744][ C1] CR2: 0000000000638300 CR3: 0000000036592002 CR4: 0000000000771ee0
[ 2141.662757][ C1] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 2141.662768][ C1] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 2141.662779][ C1] PKRU: 00000000
[ 2141.662785][ C1] Call Trace:
[ 2141.662792][ C1] <IRQ>
[ 2141.662797][ C1] RIP: 0010:handle_softirqs+0x230/0x8d0
[ 2141.662827][ C1] Code: 24 f5 80 5d 84 98 e8 1f 9b 27 00 4c 89 e2 48 c1 ea 03 42 80 3c 3a 00 0f 85 d5 05 00 00 49 89 04 24 fb 65 44 8b 35 0c 2c 93 72 <4d> 63 f6 49 c7 c4 20 0c 03 00 4a 8d 3c f5 80 5d 84 98 48 89 f8 48
[ 2141.662844][ C1] RSP: 0018:ff11000107889f68 EFLAGS: 00000246
[ 2141.662861][ C1] ? handle_softirqs+0x211/0x8d0
[ 2141.662890][ C1] ? update_sibling_normalize_runtime+0x1a/0x410
[ 2141.662921][ C1] irq_exit_rcu+0x134/0x190
[ 2141.662950][ C1] sysvec_irq_work+0x6a/0x80
[ 2141.662975][ C1] </IRQ>
[ 2141.662980][ C1] <TASK>
[ 2141.662986][ C1] asm_sysvec_irq_work+0x1a/0x20
[ 2141.663016][ C1] RIP: 0010:rcu_read_unlock_special+0x186/0x530
[ 2141.663043][ C1] Code: 0f 85 01 01 00 00 4d 85 f6 0f 84 6a 01 00 00 40 84 ed 0f 84 61 01 00 00 bf 09 00 00 00 e8 c2 45 df ff fb 65 8b 2d 26 65 72 72 <48> 63 ed 48 c7 c3 40 1a 03 00 48 b8 00 00 00 00 00 fc ff df 48 8d
[ 2141.663061][ C1] RSP: 0018:ff110000380b6fe8 EFLAGS: 00000283
[ 2141.663076][ C1] RAX: 0000000000000001 RBX: ff110001078c6800 RCX: ffffffff8d7c6a90
[ 2141.663099][ C1] RDX: 0000000000000001 RSI: 0000000000000046 RDI: ff11000100e33084
[ 2141.663111][ C1] RBP: 0000000000000001 R08: 0000000000000000 R09: fffffbfff3716ab4
[ 2141.663124][ C1] R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000
[ 2141.663135][ C1] R13: dffffc0000000000 R14: 0000000000000200 R15: ffffffff99f43000
[ 2141.663153][ C1] ? ttwu_do_activate+0x520/0x6f0
[ 2141.663186][ C1] ? rcu_read_unlock_special+0x17e/0x530
[ 2141.663213][ C1] page_vma_mapped_walk+0x1e00/0x2b50
[ 2141.663250][ C1] ? __netlink_deliver_tap_skb+0x352/0x4d0
[ 2141.663274][ C1] ? __pfx_page_vma_mapped_walk+0x10/0x10
[ 2141.663304][ C1] ? netlink_ack+0x614/0xba0
[ 2141.663331][ C1] try_to_migrate_one+0x3f0/0x2cb0
[ 2141.663361][ C1] ? __sys_sendmsg+0xee/0x1b0
[ 2141.663393][ C1] ? __pfx_try_to_migrate_one+0x10/0x10
[ 2141.663422][ C1] ? __orc_find+0x109/0x140
[ 2141.663450][ C1] ? arch_stack_walk+0x92/0x160
[ 2141.663484][ C1] ? __anon_vma_interval_tree_subtree_search+0x171/0x1f0
[ 2141.663517][ C1] ? __pfx_try_to_migrate_one+0x10/0x10
[ 2141.663545][ C1] rmap_walk_anon+0x2b0/0x980
[ 2141.663574][ C1] try_to_migrate+0x19f/0x350
[ 2141.663598][ C1] ? __pfx_try_to_migrate+0x10/0x10
[ 2141.663623][ C1] ? __pfx_try_to_migrate_one+0x10/0x10
[ 2141.663644][ C1] ? __pfx_folio_not_mapped+0x10/0x10
[ 2141.663665][ C1] ? __pfx_folio_lock_anon_vma_read+0x10/0x10
[ 2141.663690][ C1] ? __pfx_invalid_migration_vma+0x10/0x10
[ 2141.663711][ C1] ? folio_total_mapcount+0xb4/0x210
[ 2141.663738][ C1] split_huge_page_to_list_to_order+0xc84/0x17f0
[ 2141.663768][ C1] ? __pfx_split_huge_page_to_list_to_order+0x10/0x10
[ 2141.663792][ C1] ? __orc_find+0x109/0x140
[ 2141.663819][ C1] ? __orc_find+0x109/0x140
[ 2141.663843][ C1] ? entry_SYSCALL_64_after_hwframe+0x77/0xe2
[ 2141.663872][ C1] madvise_cold_or_pageout_pte_range+0x1966/0x2450
[ 2141.663899][ C1] ? arch_stack_walk+0x92/0x160
[ 2141.663918][ C1] ? __read_once_word_nocheck+0x9/0x20
[ 2141.663936][ C1] ? deref_stack_reg+0x1a4/0x2b0
[ 2141.663955][ C1] ? entry_SYSCALL_64_after_hwframe+0x77/0xe2
[ 2141.663974][ C1] ? __pfx_madvise_cold_or_pageout_pte_range+0x10/0x10
[ 2141.663992][ C1] ? __read_once_word_nocheck+0x9/0x20
[ 2141.664010][ C1] ? __orc_find+0x109/0x140
[ 2141.664027][ C1] ? __pfx_madvise_cold_or_pageout_pte_range+0x10/0x10
[ 2141.664044][ C1] walk_pmd_range.isra.0+0x240/0x720
[ 2141.664057][ C1] ? __read_once_word_nocheck+0x9/0x20
[ 2141.664076][ C1] walk_pud_range.isra.0+0x3d3/0x6c0
[ 2141.664102][ C1] walk_p4d_range+0x2ef/0x4f0
[ 2141.664116][ C1] walk_pgd_range+0x27e/0x530
[ 2141.664130][ C1] __walk_page_range+0x4ab/0x5a0
[ 2141.664141][ C1] ? find_vma+0x81/0xb0
[ 2141.664152][ C1] ? __pfx_find_vma+0x10/0x10
[ 2141.664162][ C1] ? folios_put_refs+0x510/0x740
[ 2141.664175][ C1] ? walk_page_test+0xa0/0x190
[ 2141.664195][ C1] walk_page_range+0x2a0/0x530
[ 2141.664208][ C1] ? __pfx_walk_page_range+0x10/0x10
[ 2141.664220][ C1] ? vtime_task_switch_generic+0x278/0x5a0
[ 2141.664237][ C1] ? folio_batch_move_lru+0x2b8/0x3d0
[ 2141.664248][ C1] ? __pfx_lru_add_fn+0x10/0x10
[ 2141.664261][ C1] madvise_pageout_page_range+0x1cc/0x6d0
[ 2141.664278][ C1] ? __pfx_madvise_pageout_page_range+0x10/0x10
[ 2141.664298][ C1] madvise_pageout+0x1f4/0x400
[ 2141.664314][ C1] ? __pfx_madvise_pageout+0x10/0x10
[ 2141.664332][ C1] ? futex_wait+0x552/0x680
[ 2141.664352][ C1] ? __sanitizer_cov_trace_switch+0x54/0x90
[ 2141.664365][ C1] ? __sanitizer_cov_trace_switch+0x54/0x90
[ 2141.664378][ C1] ? mas_prev_setup.constprop.0+0xb4/0x530
[ 2141.664400][ C1] madvise_vma_behavior+0x8fa/0xe30
[ 2141.664418][ C1] ? __pfx_madvise_vma_behavior+0x10/0x10
[ 2141.664435][ C1] ? find_vma_prev+0xf5/0x170
[ 2141.664448][ C1] ? __pfx_find_vma_prev+0x10/0x10
[ 2141.664463][ C1] ? do_futex+0x135/0x360
[ 2141.664481][ C1] do_madvise+0x3af/0x650
[ 2141.664498][ C1] ? __pfx_do_madvise+0x10/0x10
[ 2141.664514][ C1] ? __se_sys_futex+0xf7/0x390
[ 2141.664530][ C1] ? kvm_steal_clock+0xca/0x100
[ 2141.664551][ C1] ? get_vtime_delta+0xd7/0x250
[ 2141.664570][ C1] __x64_sys_madvise+0xaf/0x120
[ 2141.664586][ C1] ? __ct_user_exit+0x70/0xe0
[ 2141.664605][ C1] do_syscall_64+0x59/0x110
[ 2141.664625][ C1] entry_SYSCALL_64_after_hwframe+0x78/0xe2
[ 2141.664644][ C1] RIP: 0033:0x54d2cd
[ 2141.664654][ C1] Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48
[ 2141.664665][ C1] RSP: 002b:00007f10a7955048 EFLAGS: 00000246 ORIG_RAX: 000000000000001c
[ 2141.664677][ C1] RAX: ffffffffffffffda RBX: 0000000000795fa0 RCX: 000000000054d2cd
[ 2141.664685][ C1] RDX: 0000000000000015 RSI: 0000000000003000 RDI: 0000000020001000
[ 2141.664692][ C1] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
[ 2141.664699][ C1] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000795fac
[ 2141.664707][ C1] R13: 0000000000000000 R14: 0000000000795fa0 R15: 00007f10a7935000
[ 2141.664718][ C1] </TASK>
[ 2141.664724][ C2] NMI backtrace for cpu 2
[ 2141.664745][ C2] AAA2 2141442685830 928616117678 0 0 0 928616122779
[ 2141.664777][ C2] AAA2 2141442717544 2141439036319 2141439036650 2141439036844 2141439037021 2141439037181 2141439040489
[ 2141.664813][ C2] softirq_handle_start:
[ 2141.664819][ C2] 0
[ 2141.664827][ C2] 2141437057916
[ 2141.664836][ C2] 927808535269
[ 2141.664845][ C2] 2140806775443
[ 2141.664854][ C2] 28776582930
[ 2141.664862][ C2] 0
[ 2141.664869][ C2] 0
[ 2141.664877][ C2] 2141439037347
[ 2141.664885][ C2] 0
[ 2141.664893][ C2] 928888742270
[ 2141.664901][ C2]
[ 2141.664906][ C2] softirq_handle_end_time:
[ 2141.664912][ C2] 0
[ 2141.664920][ C2] 2141437310823
[ 2141.664928][ C2] 927808536719
[ 2141.664937][ C2] 2140806797386
[ 2141.664946][ C2] 28776591391
[ 2141.664954][ C2] 0
[ 2141.664962][ C2] 0
[ 2141.664969][ C2] 2141439040106
[ 2141.664978][ C2] 0
[ 2141.664985][ C2] 928888825436
[ 2141.664993][ C2]
[ 2141.665000][ C2] CPU: 2 PID: 8956 Comm: kworker/u8:1 Tainted: G L 6.6.0+ #1873
[ 2141.665039][ C2] Hardware name: QEMU Ubuntu 24.04 PC (i440FX + PIIX, 1996), BIOS 0.0.0 02/06/2015
[ 2141.665059][ C2] Workqueue: events_unbound nsim_dev_trap_report_work
[ 2141.665138][ C2] RIP: 0010:memset_orig+0x72/0xb0
[ 2141.665178][ C2] Code: 47 28 48 89 47 30 48 89 47 38 48 8d 7f 40 75 d8 0f 1f 84 00 00 00 00 00 89 d1 83 e1 38 74 14 c1 e9 03 66 0f 1f 44 00 00 ff c9 <48> 89 07 48 8d 7f 08 75 f5 83 e2 07 74 0a ff ca 88 07 48 8d 7f 01
[ 2141.665213][ C2] RSP: 0018:ff1100006e90f9b0 EFLAGS: 00010202
[ 2141.665240][ C2] RAX: 0000000000000000 RBX: ff11000095c06000 RCX: 0000000000000001
[ 2141.665263][ C2] RDX: 0000000000000010 RSI: 0000000000000000 RDI: ff11000095c07000
[ 2141.665285][ C2] RBP: ffd4000002570000 R08: 0000000000000008 R09: 0000000000000000
[ 2141.665307][ C2] R10: ff11000095c07000 R11: 0000000000000006 R12: ff11000095c00000
[ 2141.665330][ C2] R13: 0000000000008000 R14: 0000000000000003 R15: ff1100010003d040
[ 2141.665353][ C2] FS: 0000000000000000(0000) GS:ff11000107900000(0000) knlGS:0000000000000000
[ 2141.665390][ C2] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 2141.665417][ C2] CR2: 00000000012c5000 CR3: 0000000105636005 CR4: 0000000000771ee0
[ 2141.665440][ C2] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 2141.665461][ C2] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 2141.665483][ C2] PKRU: 55555554
[ 2141.665495][ C2] Call Trace:
[ 2141.665506][ C2] <TASK>
[ 2141.665516][ C2] __kasan_init_slab_obj+0xd/0x20
[ 2141.665556][ C2] setup_object+0x17/0x90
[ 2141.665591][ C2] shuffle_freelist+0xb1/0x170
[ 2141.665642][ C2] allocate_slab+0x13e/0x320
[ 2141.665693][ C2] ___slab_alloc+0x570/0x8a0
[ 2141.665742][ C2] ? nsim_dev_trap_report_work+0x27e/0x610
[ 2141.665785][ C2] ? process_one_work+0x661/0x1020
[ 2141.665821][ C2] ? __alloc_skb+0x12b/0x330
[ 2141.665862][ C2] ? ret_from_fork_asm+0x1b/0x30
[ 2141.665898][ C2] ? kasan_set_track+0x25/0x30
[ 2141.665954][ C2] ? __kasan_slab_alloc+0x6e/0x70
[ 2141.665996][ C2] __kmem_cache_alloc_node+0x3cc/0x460
[ 2141.666051][ C2] ? __alloc_skb+0x12b/0x330
[ 2141.666109][ C2] ? __alloc_skb+0x12b/0x330
[ 2141.666151][ C2] __kmalloc_node_track_caller+0x53/0x140
[ 2141.666208][ C2] kmalloc_reserve+0xf4/0x270
[ 2141.666255][ C2] __alloc_skb+0x12b/0x330
[ 2141.666297][ C2] ? __pfx___alloc_skb+0x10/0x10
[ 2141.666339][ C2] ? kasan_set_track+0x25/0x30
[ 2141.666395][ C2] ? kasan_save_free_info+0x2b/0x50
[ 2141.666445][ C2] ? kmem_cache_free+0xce/0x530
[ 2141.666496][ C2] ? kfree_skbmem+0xf4/0x1b0
[ 2141.666541][ C2] nsim_dev_trap_skb_build+0x2e/0x710
[ 2141.666588][ C2] nsim_dev_trap_report_work+0x27e/0x610
[ 2141.666643][ C2] process_one_work+0x661/0x1020
[ 2141.666689][ C2] worker_thread+0x849/0x1090
[ 2141.666734][ C2] ? __kthread_parkme+0x10d/0x190
[ 2141.666781][ C2] ? __pfx_worker_thread+0x10/0x10
[ 2141.666818][ C2] kthread+0x2f4/0x3f0
[ 2141.666868][ C2] ? __pfx_kthread+0x10/0x10
[ 2141.666921][ C2] ret_from_fork+0x4a/0x80
[ 2141.666966][ C2] ? __pfx_kthread+0x10/0x10
[ 2141.667018][ C2] ret_from_fork_asm+0x1b/0x30
[ 2141.667065][ C2] </TASK>
[ 2141.667077][ C0] NMI backtrace for cpu 0 skipped: idling at default_idle+0xf/0x20
[ 2141.667141][ C0] AAA1 2141445081811 928856909383 0 0 0 928856909774
[ 2141.667173][ C0] AAA1 2141445113956 2141440058230 2141440058591 2141440058780 2141440058946 2141440059101 2141440070327
[ 2141.667210][ C0] softirq_handle_start:
[ 2141.667216][ C0] 0
[ 2141.667224][ C0] 2141440059261
[ 2141.667233][ C0] 928873837201
[ 2141.667242][ C0] 2136080964230
[ 2141.667251][ C0] 0
[ 2141.667258][ C0] 0
[ 2141.667265][ C0] 928609012446
[ 2141.667274][ C0] 2141438064270
[ 2141.667283][ C0] 0
[ 2141.667290][ C0] 928888606411
[ 2141.667299][ C0]
[ 2141.667303][ C0] softirq_handle_end_time:
[ 2141.667310][ C0] 0
[ 2141.667317][ C0] 2141440069902
[ 2141.667326][ C0] 928873838583
[ 2141.667334][ C0] 2136081297815
[ 2141.667343][ C0] 0
[ 2141.667350][ C0] 0
[ 2141.667358][ C0] 928609013591
[ 2141.667366][ C0] 2141438082237
[ 2141.667375][ C0] 0
[ 2141.667382][ C0] 928888785127
[ 2141.667391][ C0]
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 6.15.0-rc7 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (GCC) 10.3.1"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=100301
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=23700
CONFIG_LD_IS_BFD=y
CONFIG_LD_VERSION=23700
CONFIG_LLD_VERSION=0
CONFIG_RUSTC_VERSION=0
CONFIG_RUSTC_LLVM_VERSION=0
CONFIG_CC_CAN_LINK=y
CONFIG_GCC_ASM_GOTO_OUTPUT_BROKEN=y
CONFIG_CC_HAS_ASM_INLINE=y
CONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y
CONFIG_LD_CAN_USE_KEEP_IN_OVERLAY=y
CONFIG_PAHOLE_VERSION=128
CONFIG_CONSTRUCTORS=y
CONFIG_IRQ_WORK=y
CONFIG_BUILDTIME_TABLE_SORT=y
CONFIG_THREAD_INFO_IN_TASK=y
#
# General setup
#
CONFIG_INIT_ENV_ARG_LIMIT=32
# CONFIG_COMPILE_TEST is not set
# CONFIG_WERROR is not set
CONFIG_LOCALVERSION=""
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_BUILD_SALT=""
CONFIG_HAVE_KERNEL_GZIP=y
CONFIG_HAVE_KERNEL_BZIP2=y
CONFIG_HAVE_KERNEL_LZMA=y
CONFIG_HAVE_KERNEL_XZ=y
CONFIG_HAVE_KERNEL_LZO=y
CONFIG_HAVE_KERNEL_LZ4=y
CONFIG_HAVE_KERNEL_ZSTD=y
CONFIG_KERNEL_GZIP=y
# CONFIG_KERNEL_BZIP2 is not set
# CONFIG_KERNEL_LZMA is not set
# CONFIG_KERNEL_XZ is not set
# CONFIG_KERNEL_LZO is not set
# CONFIG_KERNEL_LZ4 is not set
# CONFIG_KERNEL_ZSTD is not set
CONFIG_DEFAULT_INIT=""
CONFIG_DEFAULT_HOSTNAME="(none)"
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
CONFIG_SYSVIPC_COMPAT=y
CONFIG_POSIX_MQUEUE=y
CONFIG_POSIX_MQUEUE_SYSCTL=y
# CONFIG_WATCH_QUEUE is not set
CONFIG_CROSS_MEMORY_ATTACH=y
# CONFIG_USELIB is not set
CONFIG_AUDIT=y
CONFIG_HAVE_ARCH_AUDITSYSCALL=y
CONFIG_AUDITSYSCALL=y
#
# IRQ subsystem
#
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_GENERIC_IRQ_SHOW=y
CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
CONFIG_GENERIC_PENDING_IRQ=y
CONFIG_GENERIC_IRQ_MIGRATION=y
CONFIG_GENERIC_IRQ_INJECTION=y
CONFIG_HARDIRQS_SW_RESEND=y
CONFIG_IRQ_DOMAIN=y
CONFIG_IRQ_DOMAIN_HIERARCHY=y
CONFIG_GENERIC_MSI_IRQ=y
CONFIG_GENERIC_IRQ_MATRIX_ALLOCATOR=y
CONFIG_GENERIC_IRQ_RESERVATION_MODE=y
CONFIG_IRQ_FORCED_THREADING=y
CONFIG_SPARSE_IRQ=y
# CONFIG_GENERIC_IRQ_DEBUGFS is not set
# end of IRQ subsystem
CONFIG_CLOCKSOURCE_WATCHDOG=y
CONFIG_ARCH_CLOCKSOURCE_INIT=y
CONFIG_GENERIC_TIME_VSYSCALL=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST_IDLE=y
CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=y
CONFIG_GENERIC_CMOS_UPDATE=y
CONFIG_HAVE_POSIX_CPU_TIMERS_TASK_WORK=y
CONFIG_POSIX_CPU_TIMERS_TASK_WORK=y
CONFIG_CONTEXT_TRACKING=y
CONFIG_CONTEXT_TRACKING_IDLE=y
#
# Timers subsystem
#
CONFIG_TICK_ONESHOT=y
CONFIG_NO_HZ_COMMON=y
# CONFIG_HZ_PERIODIC is not set
# CONFIG_NO_HZ_IDLE is not set
CONFIG_NO_HZ_FULL=y
CONFIG_CONTEXT_TRACKING_USER=y
# CONFIG_CONTEXT_TRACKING_USER_FORCE is not set
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_CLOCKSOURCE_WATCHDOG_MAX_SKEW_US=125
# end of Timers subsystem
CONFIG_BPF=y
CONFIG_HAVE_EBPF_JIT=y
CONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y
#
# BPF subsystem
#
CONFIG_BPF_SYSCALL=y
CONFIG_BPF_JIT=y
CONFIG_BPF_JIT_ALWAYS_ON=y
CONFIG_BPF_JIT_DEFAULT_ON=y
# CONFIG_BPF_UNPRIV_DEFAULT_OFF is not set
# CONFIG_BPF_PRELOAD is not set
CONFIG_BPF_LSM=y
# end of BPF subsystem
CONFIG_PREEMPT_BUILD=y
CONFIG_ARCH_HAS_PREEMPT_LAZY=y
CONFIG_PREEMPT_NONE=y
# CONFIG_PREEMPT_VOLUNTARY is not set
# CONFIG_PREEMPT is not set
# CONFIG_PREEMPT_LAZY is not set
CONFIG_PREEMPT_COUNT=y
CONFIG_PREEMPTION=y
CONFIG_PREEMPT_DYNAMIC=y
# CONFIG_SCHED_CORE is not set
# CONFIG_SCHED_CLASS_EXT is not set
#
# CPU/Task time and stats accounting
#
CONFIG_VIRT_CPU_ACCOUNTING=y
CONFIG_VIRT_CPU_ACCOUNTING_GEN=y
CONFIG_IRQ_TIME_ACCOUNTING=y
CONFIG_HAVE_SCHED_AVG_IRQ=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_BSD_PROCESS_ACCT_V3=y
CONFIG_TASKSTATS=y
CONFIG_TASK_DELAY_ACCT=y
CONFIG_TASK_XACCT=y
CONFIG_TASK_IO_ACCOUNTING=y
CONFIG_PSI=y
CONFIG_PSI_DEFAULT_DISABLED=y
# end of CPU/Task time and stats accounting
CONFIG_CPU_ISOLATION=y
#
# RCU Subsystem
#
CONFIG_TREE_RCU=y
CONFIG_PREEMPT_RCU=y
# CONFIG_RCU_EXPERT is not set
CONFIG_TREE_SRCU=y
CONFIG_TASKS_RCU_GENERIC=y
CONFIG_NEED_TASKS_RCU=y
CONFIG_TASKS_RCU=y
CONFIG_TASKS_RUDE_RCU=y
CONFIG_TASKS_TRACE_RCU=y
CONFIG_RCU_STALL_COMMON=y
CONFIG_RCU_NEED_SEGCBLIST=y
CONFIG_RCU_NOCB_CPU=y
# CONFIG_RCU_NOCB_CPU_DEFAULT_ALL is not set
# CONFIG_RCU_LAZY is not set
# end of RCU Subsystem
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
# CONFIG_IKHEADERS is not set
CONFIG_LOG_BUF_SHIFT=20
CONFIG_LOG_CPU_MAX_BUF_SHIFT=12
# CONFIG_PRINTK_INDEX is not set
CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y
#
# Scheduler features
#
# CONFIG_UCLAMP_TASK is not set
# end of Scheduler features
CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y
CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH=y
CONFIG_CC_HAS_INT128=y
CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
CONFIG_GCC10_NO_ARRAY_BOUNDS=y
CONFIG_CC_NO_ARRAY_BOUNDS=y
CONFIG_GCC_NO_STRINGOP_OVERFLOW=y
CONFIG_CC_NO_STRINGOP_OVERFLOW=y
CONFIG_ARCH_SUPPORTS_INT128=y
CONFIG_NUMA_BALANCING=y
CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=y
CONFIG_SLAB_OBJ_EXT=y
CONFIG_CGROUPS=y
CONFIG_PAGE_COUNTER=y
# CONFIG_CGROUP_FAVOR_DYNMODS is not set
CONFIG_MEMCG=y
# CONFIG_MEMCG_V1 is not set
CONFIG_BLK_CGROUP=y
CONFIG_CGROUP_WRITEBACK=y
CONFIG_CGROUP_SCHED=y
CONFIG_GROUP_SCHED_WEIGHT=y
CONFIG_FAIR_GROUP_SCHED=y
CONFIG_CFS_BANDWIDTH=y
CONFIG_RT_GROUP_SCHED=y
CONFIG_SCHED_MM_CID=y
CONFIG_CGROUP_PIDS=y
CONFIG_CGROUP_RDMA=y
# CONFIG_CGROUP_DMEM is not set
CONFIG_CGROUP_FREEZER=y
CONFIG_CGROUP_HUGETLB=y
CONFIG_CPUSETS=y
# CONFIG_CPUSETS_V1 is not set
CONFIG_CGROUP_DEVICE=y
CONFIG_CGROUP_CPUACCT=y
CONFIG_CGROUP_PERF=y
CONFIG_CGROUP_BPF=y
CONFIG_CGROUP_MISC=y
# CONFIG_CGROUP_DEBUG is not set
CONFIG_SOCK_CGROUP_DATA=y
CONFIG_NAMESPACES=y
CONFIG_UTS_NS=y
CONFIG_TIME_NS=y
CONFIG_IPC_NS=y
CONFIG_USER_NS=y
CONFIG_PID_NS=y
CONFIG_NET_NS=y
CONFIG_CHECKPOINT_RESTORE=y
CONFIG_SCHED_AUTOGROUP=y
CONFIG_RELAY=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_RD_GZIP=y
CONFIG_RD_BZIP2=y
CONFIG_RD_LZMA=y
CONFIG_RD_XZ=y
CONFIG_RD_LZO=y
CONFIG_RD_LZ4=y
CONFIG_RD_ZSTD=y
CONFIG_BOOT_CONFIG=y
# CONFIG_BOOT_CONFIG_FORCE is not set
# CONFIG_BOOT_CONFIG_EMBED is not set
# CONFIG_INITRAMFS_PRESERVE_MTIME is not set
CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y
# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
CONFIG_LD_ORPHAN_WARN=y
CONFIG_LD_ORPHAN_WARN_LEVEL="warn"
CONFIG_SYSCTL=y
CONFIG_HAVE_UID16=y
CONFIG_SYSCTL_EXCEPTION_TRACE=y
CONFIG_SYSFS_SYSCALL=y
CONFIG_HAVE_PCSPKR_PLATFORM=y
# CONFIG_EXPERT is not set
CONFIG_UID16=y
CONFIG_MULTIUSER=y
CONFIG_SGETMASK_SYSCALL=y
CONFIG_FHANDLE=y
CONFIG_POSIX_TIMERS=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
CONFIG_PCSPKR_PLATFORM=y
CONFIG_FUTEX=y
CONFIG_FUTEX_PI=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_AIO=y
CONFIG_IO_URING=y
CONFIG_ADVISE_SYSCALLS=y
CONFIG_MEMBARRIER=y
CONFIG_KCMP=y
CONFIG_RSEQ=y
CONFIG_CACHESTAT_SYSCALL=y
CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_SELFTEST is not set
CONFIG_KALLSYMS_ALL=y
CONFIG_ARCH_HAS_MEMBARRIER_SYNC_CORE=y
CONFIG_ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPINGS=y
CONFIG_HAVE_PERF_EVENTS=y
CONFIG_GUEST_PERF_EVENTS=y
#
# Kernel Performance Events And Counters
#
CONFIG_PERF_EVENTS=y
# CONFIG_DEBUG_PERF_USE_VMALLOC is not set
# end of Kernel Performance Events And Counters
CONFIG_SYSTEM_DATA_VERIFICATION=y
# CONFIG_PROFILING is not set
CONFIG_TRACEPOINTS=y
#
# Kexec and crash features
#
CONFIG_CRASH_RESERVE=y
CONFIG_VMCORE_INFO=y
CONFIG_KEXEC_CORE=y
CONFIG_HAVE_IMA_KEXEC=y
CONFIG_KEXEC=y
CONFIG_KEXEC_FILE=y
CONFIG_KEXEC_SIG=y
CONFIG_KEXEC_SIG_FORCE=y
CONFIG_KEXEC_BZIMAGE_VERIFY_SIG=y
CONFIG_KEXEC_JUMP=y
CONFIG_CRASH_DUMP=y
CONFIG_CRASH_HOTPLUG=y
CONFIG_CRASH_MAX_MEMORY_RANGES=8192
# end of Kexec and crash features
# end of General setup
CONFIG_64BIT=y
CONFIG_X86_64=y
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT="elf64-x86-64"
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_MMU=y
CONFIG_ARCH_MMAP_RND_BITS_MIN=28
CONFIG_ARCH_MMAP_RND_BITS_MAX=32
CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=8
CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=16
CONFIG_GENERIC_ISA_DMA=y
CONFIG_GENERIC_CSUM=y
CONFIG_GENERIC_BUG=y
CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_ARCH_HAS_CPU_RELAX=y
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y
CONFIG_AUDIT_ARCH=y
CONFIG_KASAN_SHADOW_OFFSET=0xdffffc0000000000
CONFIG_HAVE_INTEL_TXT=y
CONFIG_X86_64_SMP=y
CONFIG_ARCH_SUPPORTS_UPROBES=y
CONFIG_FIX_EARLYCON_MEM=y
CONFIG_DYNAMIC_PHYSICAL_MASK=y
CONFIG_PGTABLE_LEVELS=5
#
# Processor type and features
#
CONFIG_SMP=y
CONFIG_X86_X2APIC=y
# CONFIG_X86_POSTED_MSI is not set
CONFIG_X86_MPPARSE=y
CONFIG_X86_CPU_RESCTRL=y
CONFIG_RESCTRL_FS_PSEUDO_LOCK=y
# CONFIG_X86_FRED is not set
CONFIG_X86_EXTENDED_PLATFORM=y
# CONFIG_X86_NUMACHIP is not set
# CONFIG_X86_VSMP is not set
CONFIG_X86_UV=y
# CONFIG_X86_INTEL_MID is not set
# CONFIG_X86_GOLDFISH is not set
CONFIG_X86_INTEL_LPSS=y
CONFIG_X86_AMD_PLATFORM_DEVICE=y
CONFIG_IOSF_MBI=y
# CONFIG_IOSF_MBI_DEBUG is not set
CONFIG_X86_SUPPORTS_MEMORY_FAILURE=y
CONFIG_SCHED_OMIT_FRAME_POINTER=y
CONFIG_HYPERVISOR_GUEST=y
CONFIG_PARAVIRT=y
# CONFIG_PARAVIRT_DEBUG is not set
# CONFIG_PARAVIRT_SPINLOCKS is not set
CONFIG_X86_HV_CALLBACK_VECTOR=y
CONFIG_XEN=y
# CONFIG_XEN_PV is not set
CONFIG_XEN_PVHVM=y
CONFIG_XEN_PVHVM_SMP=y
CONFIG_XEN_PVHVM_GUEST=y
CONFIG_XEN_SAVE_RESTORE=y
# CONFIG_XEN_DEBUG_FS is not set
# CONFIG_XEN_PVH is not set
CONFIG_KVM_GUEST=y
CONFIG_ARCH_CPUIDLE_HALTPOLL=y
# CONFIG_PVH is not set
CONFIG_PARAVIRT_TIME_ACCOUNTING=y
CONFIG_PARAVIRT_CLOCK=y
# CONFIG_JAILHOUSE_GUEST is not set
# CONFIG_ACRN_GUEST is not set
# CONFIG_INTEL_TDX_GUEST is not set
CONFIG_X86_INTERNODE_CACHE_SHIFT=6
CONFIG_X86_L1_CACHE_SHIFT=6
CONFIG_X86_TSC=y
CONFIG_X86_HAVE_PAE=y
CONFIG_X86_CX8=y
CONFIG_X86_CMOV=y
CONFIG_X86_MINIMUM_CPU_FAMILY=64
CONFIG_X86_DEBUGCTLMSR=y
CONFIG_IA32_FEAT_CTL=y
CONFIG_X86_VMX_FEATURE_NAMES=y
CONFIG_BROADCAST_TLB_FLUSH=y
CONFIG_CPU_SUP_INTEL=y
CONFIG_CPU_SUP_AMD=y
CONFIG_CPU_SUP_HYGON=y
CONFIG_CPU_SUP_CENTAUR=y
CONFIG_CPU_SUP_ZHAOXIN=y
CONFIG_HPET_TIMER=y
CONFIG_HPET_EMULATE_RTC=y
CONFIG_DMI=y
# CONFIG_GART_IOMMU is not set
CONFIG_BOOT_VESA_SUPPORT=y
CONFIG_MAXSMP=y
CONFIG_NR_CPUS_RANGE_BEGIN=8192
CONFIG_NR_CPUS_RANGE_END=8192
CONFIG_NR_CPUS_DEFAULT=8192
CONFIG_NR_CPUS=8192
CONFIG_SCHED_CLUSTER=y
CONFIG_SCHED_SMT=y
CONFIG_SCHED_MC=y
CONFIG_SCHED_MC_PRIO=y
CONFIG_X86_LOCAL_APIC=y
CONFIG_ACPI_MADT_WAKEUP=y
CONFIG_X86_IO_APIC=y
CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y
CONFIG_X86_MCE=y
CONFIG_X86_MCELOG_LEGACY=y
CONFIG_X86_MCE_INTEL=y
CONFIG_X86_MCE_AMD=y
CONFIG_X86_MCE_THRESHOLD=y
CONFIG_X86_MCE_INJECT=y
#
# Performance monitoring
#
CONFIG_PERF_EVENTS_INTEL_UNCORE=y
CONFIG_PERF_EVENTS_INTEL_RAPL=y
CONFIG_PERF_EVENTS_INTEL_CSTATE=y
CONFIG_PERF_EVENTS_AMD_POWER=y
CONFIG_PERF_EVENTS_AMD_UNCORE=y
CONFIG_PERF_EVENTS_AMD_BRS=y
# end of Performance monitoring
CONFIG_X86_16BIT=y
CONFIG_X86_ESPFIX64=y
CONFIG_X86_VSYSCALL_EMULATION=y
CONFIG_X86_IOPL_IOPERM=y
CONFIG_MICROCODE=y
CONFIG_MICROCODE_LATE_LOADING=y
# CONFIG_MICROCODE_LATE_FORCE_MINREV is not set
CONFIG_X86_MSR=y
CONFIG_X86_CPUID=y
CONFIG_X86_5LEVEL=y
CONFIG_X86_DIRECT_GBPAGES=y
# CONFIG_X86_CPA_STATISTICS is not set
CONFIG_X86_MEM_ENCRYPT=y
CONFIG_AMD_MEM_ENCRYPT=y
CONFIG_NUMA=y
CONFIG_AMD_NUMA=y
CONFIG_X86_64_ACPI_NUMA=y
CONFIG_NODES_SHIFT=10
CONFIG_ARCH_SPARSEMEM_ENABLE=y
CONFIG_ARCH_SPARSEMEM_DEFAULT=y
# CONFIG_ARCH_MEMORY_PROBE is not set
CONFIG_ARCH_PROC_KCORE_TEXT=y
CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
CONFIG_X86_PMEM_LEGACY_DEVICE=y
CONFIG_X86_PMEM_LEGACY=y
CONFIG_X86_CHECK_BIOS_CORRUPTION=y
# CONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK is not set
CONFIG_MTRR=y
CONFIG_MTRR_SANITIZER=y
CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT=1
CONFIG_MTRR_SANITIZER_SPARE_REG_NR_DEFAULT=1
CONFIG_X86_PAT=y
CONFIG_X86_UMIP=y
CONFIG_CC_HAS_IBT=y
CONFIG_X86_CET=y
CONFIG_X86_KERNEL_IBT=y
CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS=y
CONFIG_ARCH_PKEY_BITS=4
CONFIG_X86_INTEL_TSX_MODE_OFF=y
# CONFIG_X86_INTEL_TSX_MODE_ON is not set
# CONFIG_X86_INTEL_TSX_MODE_AUTO is not set
CONFIG_X86_SGX=y
# CONFIG_X86_USER_SHADOW_STACK is not set
CONFIG_EFI=y
CONFIG_EFI_STUB=y
CONFIG_EFI_HANDOVER_PROTOCOL=y
CONFIG_EFI_MIXED=y
CONFIG_EFI_RUNTIME_MAP=y
# CONFIG_HZ_100 is not set
# CONFIG_HZ_250 is not set
# CONFIG_HZ_300 is not set
CONFIG_HZ_1000=y
CONFIG_HZ=1000
CONFIG_SCHED_HRTICK=y
CONFIG_ARCH_SUPPORTS_KEXEC=y
CONFIG_ARCH_SUPPORTS_KEXEC_FILE=y
CONFIG_ARCH_SELECTS_KEXEC_FILE=y
CONFIG_ARCH_SUPPORTS_KEXEC_PURGATORY=y
CONFIG_ARCH_SUPPORTS_KEXEC_SIG=y
CONFIG_ARCH_SUPPORTS_KEXEC_SIG_FORCE=y
CONFIG_ARCH_SUPPORTS_KEXEC_BZIMAGE_VERIFY_SIG=y
CONFIG_ARCH_SUPPORTS_KEXEC_JUMP=y
CONFIG_ARCH_SUPPORTS_CRASH_DUMP=y
CONFIG_ARCH_DEFAULT_CRASH_DUMP=y
CONFIG_ARCH_SUPPORTS_CRASH_HOTPLUG=y
CONFIG_ARCH_HAS_GENERIC_CRASHKERNEL_RESERVATION=y
CONFIG_PHYSICAL_START=0x1000000
CONFIG_RELOCATABLE=y
CONFIG_RANDOMIZE_BASE=y
CONFIG_X86_NEED_RELOCS=y
CONFIG_PHYSICAL_ALIGN=0x200000
CONFIG_DYNAMIC_MEMORY_LAYOUT=y
CONFIG_RANDOMIZE_MEMORY=y
CONFIG_RANDOMIZE_MEMORY_PHYSICAL_PADDING=0xa
CONFIG_HOTPLUG_CPU=y
# CONFIG_COMPAT_VDSO is not set
CONFIG_LEGACY_VSYSCALL_XONLY=y
# CONFIG_LEGACY_VSYSCALL_NONE is not set
# CONFIG_CMDLINE_BOOL is not set
CONFIG_MODIFY_LDT_SYSCALL=y
# CONFIG_STRICT_SIGALTSTACK_SIZE is not set
CONFIG_HAVE_LIVEPATCH=y
CONFIG_LIVEPATCH=y
CONFIG_X86_BUS_LOCK_DETECT=y
# end of Processor type and features
CONFIG_CC_HAS_NAMED_AS=y
CONFIG_CC_HAS_RETURN_THUNK=y
CONFIG_CC_HAS_ENTRY_PADDING=y
CONFIG_FUNCTION_PADDING_CFI=11
CONFIG_FUNCTION_PADDING_BYTES=16
CONFIG_CALL_PADDING=y
CONFIG_HAVE_CALL_THUNKS=y
CONFIG_CALL_THUNKS=y
CONFIG_PREFIX_SYMBOLS=y
CONFIG_CPU_MITIGATIONS=y
CONFIG_MITIGATION_PAGE_TABLE_ISOLATION=y
CONFIG_MITIGATION_RETPOLINE=y
CONFIG_MITIGATION_RETHUNK=y
CONFIG_MITIGATION_UNRET_ENTRY=y
CONFIG_MITIGATION_CALL_DEPTH_TRACKING=y
# CONFIG_CALL_THUNKS_DEBUG is not set
CONFIG_MITIGATION_IBPB_ENTRY=y
CONFIG_MITIGATION_IBRS_ENTRY=y
CONFIG_MITIGATION_SRSO=y
CONFIG_MITIGATION_GDS=y
CONFIG_MITIGATION_RFDS=y
CONFIG_MITIGATION_SPECTRE_BHI=y
CONFIG_MITIGATION_MDS=y
CONFIG_MITIGATION_TAA=y
CONFIG_MITIGATION_MMIO_STALE_DATA=y
CONFIG_MITIGATION_L1TF=y
CONFIG_MITIGATION_RETBLEED=y
CONFIG_MITIGATION_SPECTRE_V1=y
CONFIG_MITIGATION_SPECTRE_V2=y
CONFIG_MITIGATION_SRBDS=y
CONFIG_MITIGATION_SSB=y
CONFIG_MITIGATION_ITS=y
CONFIG_ARCH_HAS_ADD_PAGES=y
#
# Power management and ACPI options
#
CONFIG_ARCH_HIBERNATION_HEADER=y
CONFIG_SUSPEND=y
CONFIG_SUSPEND_FREEZER=y
CONFIG_HIBERNATE_CALLBACKS=y
CONFIG_HIBERNATION=y
CONFIG_HIBERNATION_SNAPSHOT_DEV=y
CONFIG_HIBERNATION_COMP_LZO=y
CONFIG_HIBERNATION_DEF_COMP="lzo"
CONFIG_PM_STD_PARTITION=""
CONFIG_PM_SLEEP=y
CONFIG_PM_SLEEP_SMP=y
# CONFIG_PM_AUTOSLEEP is not set
# CONFIG_PM_USERSPACE_AUTOSLEEP is not set
# CONFIG_PM_WAKELOCKS is not set
CONFIG_PM=y
CONFIG_PM_DEBUG=y
# CONFIG_PM_ADVANCED_DEBUG is not set
# CONFIG_PM_TEST_SUSPEND is not set
CONFIG_PM_SLEEP_DEBUG=y
# CONFIG_PM_TRACE_RTC is not set
CONFIG_PM_CLK=y
# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set
# CONFIG_ENERGY_MODEL is not set
CONFIG_ARCH_SUPPORTS_ACPI=y
CONFIG_ACPI=y
CONFIG_ACPI_LEGACY_TABLES_LOOKUP=y
CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=y
CONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT=y
CONFIG_ACPI_TABLE_LIB=y
CONFIG_ACPI_THERMAL_LIB=y
CONFIG_ACPI_DEBUGGER=y
CONFIG_ACPI_DEBUGGER_USER=y
CONFIG_ACPI_SPCR_TABLE=y
# CONFIG_ACPI_FPDT is not set
CONFIG_ACPI_LPIT=y
CONFIG_ACPI_SLEEP=y
CONFIG_ACPI_REV_OVERRIDE_POSSIBLE=y
CONFIG_ACPI_EC=y
CONFIG_ACPI_EC_DEBUGFS=y
CONFIG_ACPI_AC=y
CONFIG_ACPI_BATTERY=y
CONFIG_ACPI_BUTTON=y
CONFIG_ACPI_VIDEO=y
CONFIG_ACPI_FAN=y
CONFIG_ACPI_TAD=y
CONFIG_ACPI_DOCK=y
CONFIG_ACPI_CPU_FREQ_PSS=y
CONFIG_ACPI_PROCESSOR_CSTATE=y
CONFIG_ACPI_PROCESSOR_IDLE=y
CONFIG_ACPI_CPPC_LIB=y
CONFIG_ACPI_PROCESSOR=y
CONFIG_ACPI_IPMI=y
CONFIG_ACPI_HOTPLUG_CPU=y
CONFIG_ACPI_PROCESSOR_AGGREGATOR=y
CONFIG_ACPI_THERMAL=y
CONFIG_ACPI_PLATFORM_PROFILE=y
CONFIG_ARCH_HAS_ACPI_TABLE_UPGRADE=y
CONFIG_ACPI_TABLE_UPGRADE=y
CONFIG_ACPI_DEBUG=y
CONFIG_ACPI_PCI_SLOT=y
CONFIG_ACPI_CONTAINER=y
CONFIG_ACPI_HOTPLUG_MEMORY=y
CONFIG_ACPI_HOTPLUG_IOAPIC=y
CONFIG_ACPI_SBS=y
CONFIG_ACPI_HED=y
CONFIG_ACPI_BGRT=y
CONFIG_ACPI_NHLT=y
CONFIG_ACPI_NFIT=y
# CONFIG_NFIT_SECURITY_DEBUG is not set
CONFIG_ACPI_NUMA=y
CONFIG_ACPI_HMAT=y
CONFIG_HAVE_ACPI_APEI=y
CONFIG_HAVE_ACPI_APEI_NMI=y
CONFIG_ACPI_APEI=y
CONFIG_ACPI_APEI_GHES=y
CONFIG_ACPI_APEI_PCIEAER=y
CONFIG_ACPI_APEI_MEMORY_FAILURE=y
CONFIG_ACPI_APEI_EINJ=y
CONFIG_ACPI_APEI_EINJ_CXL=y
# CONFIG_ACPI_APEI_ERST_DEBUG is not set
CONFIG_ACPI_DPTF=y
CONFIG_DPTF_POWER=y
# CONFIG_DPTF_PCH_FIVR is not set
CONFIG_ACPI_WATCHDOG=y
CONFIG_ACPI_EXTLOG=y
CONFIG_ACPI_ADXL=y
# CONFIG_ACPI_CONFIGFS is not set
# CONFIG_ACPI_PFRUT is not set
CONFIG_ACPI_PCC=y
# CONFIG_ACPI_FFH is not set
CONFIG_PMIC_OPREGION=y
CONFIG_ACPI_PRMT=y
CONFIG_X86_PM_TIMER=y
#
# CPU Frequency scaling
#
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_GOV_ATTR_SET=y
CONFIG_CPU_FREQ_GOV_COMMON=y
CONFIG_CPU_FREQ_STAT=y
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
#
# CPU frequency scaling drivers
#
CONFIG_X86_INTEL_PSTATE=y
# CONFIG_X86_PCC_CPUFREQ is not set
CONFIG_X86_AMD_PSTATE=y
CONFIG_X86_AMD_PSTATE_DEFAULT_MODE=3
# CONFIG_X86_AMD_PSTATE_UT is not set
CONFIG_X86_ACPI_CPUFREQ=y
CONFIG_X86_ACPI_CPUFREQ_CPB=y
CONFIG_X86_POWERNOW_K8=y
CONFIG_X86_AMD_FREQ_SENSITIVITY=y
# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
CONFIG_X86_P4_CLOCKMOD=y
#
# shared options
#
CONFIG_X86_SPEEDSTEP_LIB=y
CONFIG_CPUFREQ_ARCH_CUR_FREQ=y
# end of CPU Frequency scaling
#
# CPU Idle
#
CONFIG_CPU_IDLE=y
# CONFIG_CPU_IDLE_GOV_LADDER is not set
CONFIG_CPU_IDLE_GOV_MENU=y
CONFIG_CPU_IDLE_GOV_TEO=y
CONFIG_CPU_IDLE_GOV_HALTPOLL=y
CONFIG_HALTPOLL_CPUIDLE=y
# end of CPU Idle
CONFIG_INTEL_IDLE=y
# end of Power management and ACPI options
#
# Bus options (PCI etc.)
#
CONFIG_PCI_DIRECT=y
CONFIG_PCI_MMCONFIG=y
CONFIG_PCI_XEN=y
CONFIG_MMCONF_FAM10H=y
CONFIG_ISA_DMA_API=y
CONFIG_AMD_NB=y
CONFIG_AMD_NODE=y
# end of Bus options (PCI etc.)
#
# Binary Emulations
#
CONFIG_IA32_EMULATION=y
# CONFIG_IA32_EMULATION_DEFAULT_DISABLED is not set
# CONFIG_X86_X32_ABI is not set
CONFIG_COMPAT_32=y
CONFIG_COMPAT=y
CONFIG_COMPAT_FOR_U64_ALIGNMENT=y
# end of Binary Emulations
CONFIG_KVM_COMMON=y
CONFIG_HAVE_KVM_PFNCACHE=y
CONFIG_HAVE_KVM_IRQCHIP=y
CONFIG_HAVE_KVM_IRQ_ROUTING=y
CONFIG_HAVE_KVM_DIRTY_RING=y
CONFIG_HAVE_KVM_DIRTY_RING_TSO=y
CONFIG_HAVE_KVM_DIRTY_RING_ACQ_REL=y
CONFIG_KVM_MMIO=y
CONFIG_KVM_ASYNC_PF=y
CONFIG_HAVE_KVM_MSI=y
CONFIG_HAVE_KVM_READONLY_MEM=y
CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT=y
CONFIG_KVM_VFIO=y
CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=y
CONFIG_KVM_GENERIC_PRE_FAULT_MEMORY=y
CONFIG_KVM_COMPAT=y
CONFIG_HAVE_KVM_IRQ_BYPASS=y
CONFIG_HAVE_KVM_NO_POLL=y
CONFIG_KVM_XFER_TO_GUEST_WORK=y
CONFIG_HAVE_KVM_PM_NOTIFIER=y
CONFIG_KVM_GENERIC_HARDWARE_ENABLING=y
CONFIG_KVM_GENERIC_MMU_NOTIFIER=y
CONFIG_KVM_ELIDE_TLB_FLUSH_IF_YOUNG=y
CONFIG_KVM_MMU_LOCKLESS_AGING=y
CONFIG_KVM_GENERIC_MEMORY_ATTRIBUTES=y
CONFIG_KVM_PRIVATE_MEM=y
CONFIG_KVM_GENERIC_PRIVATE_MEM=y
CONFIG_HAVE_KVM_ARCH_GMEM_PREPARE=y
CONFIG_HAVE_KVM_ARCH_GMEM_INVALIDATE=y
CONFIG_VIRTUALIZATION=y
CONFIG_KVM_X86=y
CONFIG_KVM=y
# CONFIG_KVM_INTEL is not set
CONFIG_KVM_AMD=y
CONFIG_KVM_AMD_SEV=y
CONFIG_KVM_SMM=y
CONFIG_KVM_HYPERV=y
# CONFIG_KVM_XEN is not set
CONFIG_KVM_MAX_NR_VCPUS=4096
CONFIG_X86_REQUIRED_FEATURE_ALWAYS=y
CONFIG_X86_REQUIRED_FEATURE_NOPL=y
CONFIG_X86_REQUIRED_FEATURE_CX8=y
CONFIG_X86_REQUIRED_FEATURE_CMOV=y
CONFIG_X86_REQUIRED_FEATURE_CPUID=y
CONFIG_X86_REQUIRED_FEATURE_FPU=y
CONFIG_X86_REQUIRED_FEATURE_PAE=y
CONFIG_X86_REQUIRED_FEATURE_PSE=y
CONFIG_X86_REQUIRED_FEATURE_PGE=y
CONFIG_X86_REQUIRED_FEATURE_MSR=y
CONFIG_X86_REQUIRED_FEATURE_FXSR=y
CONFIG_X86_REQUIRED_FEATURE_XMM=y
CONFIG_X86_REQUIRED_FEATURE_XMM2=y
CONFIG_X86_REQUIRED_FEATURE_LM=y
CONFIG_X86_DISABLED_FEATURE_VME=y
CONFIG_X86_DISABLED_FEATURE_K6_MTRR=y
CONFIG_X86_DISABLED_FEATURE_CYRIX_ARR=y
CONFIG_X86_DISABLED_FEATURE_CENTAUR_MCR=y
CONFIG_X86_DISABLED_FEATURE_LAM=y
CONFIG_X86_DISABLED_FEATURE_XENPV=y
CONFIG_X86_DISABLED_FEATURE_TDX_GUEST=y
CONFIG_X86_DISABLED_FEATURE_USER_SHSTK=y
CONFIG_X86_DISABLED_FEATURE_FRED=y
CONFIG_AS_AVX512=y
CONFIG_AS_SHA1_NI=y
CONFIG_AS_SHA256_NI=y
CONFIG_AS_TPAUSE=y
CONFIG_AS_GFNI=y
CONFIG_AS_VAES=y
CONFIG_AS_VPCLMULQDQ=y
CONFIG_AS_WRUSS=y
CONFIG_ARCH_CONFIGURES_CPU_MITIGATIONS=y
CONFIG_ARCH_HAS_DMA_OPS=y
#
# General architecture-dependent options
#
CONFIG_HOTPLUG_SMT=y
CONFIG_HOTPLUG_CORE_SYNC=y
CONFIG_HOTPLUG_CORE_SYNC_DEAD=y
CONFIG_HOTPLUG_CORE_SYNC_FULL=y
CONFIG_HOTPLUG_SPLIT_STARTUP=y
CONFIG_HOTPLUG_PARALLEL=y
CONFIG_GENERIC_ENTRY=y
CONFIG_KPROBES=y
CONFIG_JUMP_LABEL=y
# CONFIG_STATIC_KEYS_SELFTEST is not set
# CONFIG_STATIC_CALL_SELFTEST is not set
CONFIG_OPTPROBES=y
CONFIG_KPROBES_ON_FTRACE=y
CONFIG_UPROBES=y
CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
CONFIG_ARCH_USE_BUILTIN_BSWAP=y
CONFIG_KRETPROBES=y
CONFIG_KRETPROBE_ON_RETHOOK=y
CONFIG_USER_RETURN_NOTIFIER=y
CONFIG_HAVE_IOREMAP_PROT=y
CONFIG_HAVE_KPROBES=y
CONFIG_HAVE_KRETPROBES=y
CONFIG_HAVE_OPTPROBES=y
CONFIG_HAVE_KPROBES_ON_FTRACE=y
CONFIG_ARCH_CORRECT_STACKTRACE_ON_KRETPROBE=y
CONFIG_HAVE_FUNCTION_ERROR_INJECTION=y
CONFIG_HAVE_NMI=y
CONFIG_TRACE_IRQFLAGS_SUPPORT=y
CONFIG_TRACE_IRQFLAGS_NMI_SUPPORT=y
CONFIG_HAVE_ARCH_TRACEHOOK=y
CONFIG_HAVE_DMA_CONTIGUOUS=y
CONFIG_GENERIC_SMP_IDLE_THREAD=y
CONFIG_ARCH_HAS_FORTIFY_SOURCE=y
CONFIG_ARCH_HAS_SET_MEMORY=y
CONFIG_ARCH_HAS_SET_DIRECT_MAP=y
CONFIG_ARCH_HAS_CPU_FINALIZE_INIT=y
CONFIG_ARCH_HAS_CPU_PASID=y
CONFIG_HAVE_ARCH_THREAD_STRUCT_WHITELIST=y
CONFIG_ARCH_WANTS_DYNAMIC_TASK_STRUCT=y
CONFIG_ARCH_WANTS_NO_INSTR=y
CONFIG_HAVE_ASM_MODVERSIONS=y
CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
CONFIG_HAVE_RSEQ=y
CONFIG_HAVE_RUST=y
CONFIG_HAVE_FUNCTION_ARG_ACCESS_API=y
CONFIG_HAVE_HW_BREAKPOINT=y
CONFIG_HAVE_MIXED_BREAKPOINTS_REGS=y
CONFIG_HAVE_USER_RETURN_NOTIFIER=y
CONFIG_HAVE_PERF_EVENTS_NMI=y
CONFIG_HAVE_HARDLOCKUP_DETECTOR_PERF=y
CONFIG_HAVE_PERF_REGS=y
CONFIG_HAVE_PERF_USER_STACK_DUMP=y
CONFIG_HAVE_ARCH_JUMP_LABEL=y
CONFIG_HAVE_ARCH_JUMP_LABEL_RELATIVE=y
CONFIG_MMU_GATHER_TABLE_FREE=y
CONFIG_MMU_GATHER_RCU_TABLE_FREE=y
CONFIG_MMU_GATHER_MERGE_VMAS=y
CONFIG_MMU_LAZY_TLB_REFCOUNT=y
CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG=y
CONFIG_ARCH_HAVE_EXTRA_ELF_NOTES=y
CONFIG_ARCH_HAS_NMI_SAFE_THIS_CPU_OPS=y
CONFIG_HAVE_ALIGNED_STRUCT_PAGE=y
CONFIG_HAVE_CMPXCHG_LOCAL=y
CONFIG_HAVE_CMPXCHG_DOUBLE=y
CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y
CONFIG_ARCH_WANT_OLD_COMPAT_IPC=y
CONFIG_HAVE_ARCH_SECCOMP=y
CONFIG_HAVE_ARCH_SECCOMP_FILTER=y
CONFIG_SECCOMP=y
CONFIG_SECCOMP_FILTER=y
# CONFIG_SECCOMP_CACHE_DEBUG is not set
CONFIG_HAVE_ARCH_STACKLEAK=y
CONFIG_HAVE_STACKPROTECTOR=y
CONFIG_STACKPROTECTOR=y
CONFIG_STACKPROTECTOR_STRONG=y
CONFIG_ARCH_SUPPORTS_LTO_CLANG=y
CONFIG_ARCH_SUPPORTS_LTO_CLANG_THIN=y
CONFIG_LTO_NONE=y
CONFIG_ARCH_SUPPORTS_AUTOFDO_CLANG=y
CONFIG_ARCH_SUPPORTS_PROPELLER_CLANG=y
CONFIG_ARCH_SUPPORTS_CFI_CLANG=y
CONFIG_HAVE_ARCH_WITHIN_STACK_FRAMES=y
CONFIG_HAVE_CONTEXT_TRACKING_USER=y
CONFIG_HAVE_CONTEXT_TRACKING_USER_OFFSTACK=y
CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y
CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y
CONFIG_HAVE_MOVE_PUD=y
CONFIG_HAVE_MOVE_PMD=y
CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y
CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD=y
CONFIG_HAVE_ARCH_HUGE_VMAP=y
CONFIG_HAVE_ARCH_HUGE_VMALLOC=y
CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y
CONFIG_ARCH_WANT_PMD_MKWRITE=y
CONFIG_HAVE_ARCH_SOFT_DIRTY=y
CONFIG_HAVE_MOD_ARCH_SPECIFIC=y
CONFIG_MODULES_USE_ELF_RELA=y
CONFIG_ARCH_HAS_EXECMEM_ROX=y
CONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK=y
CONFIG_HAVE_SOFTIRQ_ON_OWN_STACK=y
CONFIG_SOFTIRQ_ON_OWN_STACK=y
CONFIG_ARCH_HAS_ELF_RANDOMIZE=y
CONFIG_HAVE_ARCH_MMAP_RND_BITS=y
CONFIG_HAVE_EXIT_THREAD=y
CONFIG_ARCH_MMAP_RND_BITS=28
CONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS=y
CONFIG_ARCH_MMAP_RND_COMPAT_BITS=8
CONFIG_HAVE_ARCH_COMPAT_MMAP_BASES=y
CONFIG_HAVE_PAGE_SIZE_4KB=y
CONFIG_PAGE_SIZE_4KB=y
CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
CONFIG_PAGE_SHIFT=12
CONFIG_HAVE_OBJTOOL=y
CONFIG_HAVE_JUMP_LABEL_HACK=y
CONFIG_HAVE_NOINSTR_HACK=y
CONFIG_HAVE_NOINSTR_VALIDATION=y
CONFIG_HAVE_UACCESS_VALIDATION=y
CONFIG_HAVE_STACK_VALIDATION=y
CONFIG_HAVE_RELIABLE_STACKTRACE=y
CONFIG_OLD_SIGSUSPEND3=y
CONFIG_COMPAT_OLD_SIGACTION=y
CONFIG_COMPAT_32BIT_TIME=y
CONFIG_ARCH_SUPPORTS_RT=y
CONFIG_HAVE_ARCH_VMAP_STACK=y
CONFIG_HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET=y
CONFIG_RANDOMIZE_KSTACK_OFFSET=y
# CONFIG_RANDOMIZE_KSTACK_OFFSET_DEFAULT is not set
CONFIG_ARCH_HAS_STRICT_KERNEL_RWX=y
CONFIG_STRICT_KERNEL_RWX=y
CONFIG_ARCH_HAS_STRICT_MODULE_RWX=y
CONFIG_STRICT_MODULE_RWX=y
CONFIG_HAVE_ARCH_PREL32_RELOCATIONS=y
CONFIG_ARCH_USE_MEMREMAP_PROT=y
# CONFIG_LOCK_EVENT_COUNTS is not set
CONFIG_ARCH_HAS_MEM_ENCRYPT=y
CONFIG_ARCH_HAS_CC_PLATFORM=y
CONFIG_HAVE_STATIC_CALL=y
CONFIG_HAVE_STATIC_CALL_INLINE=y
CONFIG_HAVE_PREEMPT_DYNAMIC=y
CONFIG_HAVE_PREEMPT_DYNAMIC_CALL=y
CONFIG_ARCH_WANT_LD_ORPHAN_WARN=y
CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
CONFIG_ARCH_SUPPORTS_PAGE_TABLE_CHECK=y
CONFIG_ARCH_HAS_ELFCORE_COMPAT=y
CONFIG_ARCH_HAS_PARANOID_L1D_FLUSH=y
CONFIG_DYNAMIC_SIGFRAME=y
CONFIG_HAVE_ARCH_NODE_DEV_GROUP=y
CONFIG_ARCH_HAS_HW_PTE_YOUNG=y
CONFIG_ARCH_HAS_NONLEAF_PMD_YOUNG=y
CONFIG_ARCH_HAS_KERNEL_FPU_SUPPORT=y
CONFIG_ARCH_VMLINUX_NEEDS_RELOCS=y
#
# GCOV-based kernel profiling
#
# CONFIG_GCOV_KERNEL is not set
CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y
# end of GCOV-based kernel profiling
CONFIG_HAVE_GCC_PLUGINS=y
CONFIG_FUNCTION_ALIGNMENT_4B=y
CONFIG_FUNCTION_ALIGNMENT_16B=y
CONFIG_FUNCTION_ALIGNMENT=16
# end of General architecture-dependent options
CONFIG_RT_MUTEXES=y
CONFIG_MODULE_SIG_FORMAT=y
CONFIG_MODULES=y
# CONFIG_MODULE_DEBUG is not set
CONFIG_MODULE_FORCE_LOAD=y
CONFIG_MODULE_UNLOAD=y
# CONFIG_MODULE_FORCE_UNLOAD is not set
# CONFIG_MODULE_UNLOAD_TAINT_TRACKING is not set
CONFIG_MODVERSIONS=y
CONFIG_GENKSYMS=y
CONFIG_ASM_MODVERSIONS=y
# CONFIG_EXTENDED_MODVERSIONS is not set
CONFIG_BASIC_MODVERSIONS=y
CONFIG_MODULE_SRCVERSION_ALL=y
CONFIG_MODULE_SIG=y
# CONFIG_MODULE_SIG_FORCE is not set
CONFIG_MODULE_SIG_ALL=y
# CONFIG_MODULE_SIG_SHA1 is not set
CONFIG_MODULE_SIG_SHA256=y
# CONFIG_MODULE_SIG_SHA384 is not set
# CONFIG_MODULE_SIG_SHA512 is not set
# CONFIG_MODULE_SIG_SHA3_256 is not set
# CONFIG_MODULE_SIG_SHA3_384 is not set
# CONFIG_MODULE_SIG_SHA3_512 is not set
CONFIG_MODULE_SIG_HASH="sha256"
# CONFIG_MODULE_COMPRESS is not set
# CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS is not set
CONFIG_MODPROBE_PATH="/sbin/modprobe"
# CONFIG_TRIM_UNUSED_KSYMS is not set
CONFIG_MODULES_TREE_LOOKUP=y
CONFIG_BLOCK=y
CONFIG_BLOCK_LEGACY_AUTOLOAD=y
CONFIG_BLK_RQ_ALLOC_TIME=y
CONFIG_BLK_CGROUP_RWSTAT=y
CONFIG_BLK_DEV_BSG_COMMON=y
CONFIG_BLK_ICQ=y
CONFIG_BLK_DEV_BSGLIB=y
CONFIG_BLK_DEV_INTEGRITY=y
CONFIG_BLK_DEV_WRITE_MOUNTED=y
CONFIG_BLK_DEV_ZONED=y
CONFIG_BLK_DEV_THROTTLING=y
CONFIG_BLK_WBT=y
CONFIG_BLK_WBT_MQ=y
# CONFIG_BLK_CGROUP_IOLATENCY is not set
# CONFIG_BLK_CGROUP_FC_APPID is not set
CONFIG_BLK_CGROUP_IOCOST=y
# CONFIG_BLK_CGROUP_IOPRIO is not set
CONFIG_BLK_DEBUG_FS=y
# CONFIG_BLK_SED_OPAL is not set
# CONFIG_BLK_INLINE_ENCRYPTION is not set
#
# Partition Types
#
CONFIG_PARTITION_ADVANCED=y
# CONFIG_ACORN_PARTITION is not set
# CONFIG_AIX_PARTITION is not set
CONFIG_OSF_PARTITION=y
CONFIG_AMIGA_PARTITION=y
# CONFIG_ATARI_PARTITION is not set
CONFIG_MAC_PARTITION=y
CONFIG_MSDOS_PARTITION=y
CONFIG_BSD_DISKLABEL=y
CONFIG_MINIX_SUBPARTITION=y
CONFIG_SOLARIS_X86_PARTITION=y
CONFIG_UNIXWARE_DISKLABEL=y
# CONFIG_LDM_PARTITION is not set
CONFIG_SGI_PARTITION=y
# CONFIG_ULTRIX_PARTITION is not set
CONFIG_SUN_PARTITION=y
CONFIG_KARMA_PARTITION=y
CONFIG_EFI_PARTITION=y
# CONFIG_SYSV68_PARTITION is not set
# CONFIG_CMDLINE_PARTITION is not set
# end of Partition Types
CONFIG_BLK_MQ_PCI=y
CONFIG_BLK_MQ_VIRTIO=y
CONFIG_BLK_PM=y
CONFIG_BLOCK_HOLDER_DEPRECATED=y
CONFIG_BLK_MQ_STACKING=y
#
# IO Schedulers
#
CONFIG_MQ_IOSCHED_DEADLINE=y
CONFIG_MQ_IOSCHED_KYBER=y
CONFIG_IOSCHED_BFQ=y
CONFIG_BFQ_GROUP_IOSCHED=y
# CONFIG_BFQ_CGROUP_DEBUG is not set
# end of IO Schedulers
CONFIG_PREEMPT_NOTIFIERS=y
CONFIG_PADATA=y
CONFIG_ASN1=y
CONFIG_UNINLINE_SPIN_UNLOCK=y
CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y
CONFIG_MUTEX_SPIN_ON_OWNER=y
CONFIG_RWSEM_SPIN_ON_OWNER=y
CONFIG_LOCK_SPIN_ON_OWNER=y
CONFIG_ARCH_USE_QUEUED_SPINLOCKS=y
CONFIG_QUEUED_SPINLOCKS=y
CONFIG_ARCH_USE_QUEUED_RWLOCKS=y
CONFIG_QUEUED_RWLOCKS=y
CONFIG_ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE=y
CONFIG_ARCH_HAS_SYNC_CORE_BEFORE_USERMODE=y
CONFIG_ARCH_HAS_SYSCALL_WRAPPER=y
CONFIG_FREEZER=y
#
# Executable file formats
#
CONFIG_BINFMT_ELF=y
CONFIG_COMPAT_BINFMT_ELF=y
CONFIG_ELFCORE=y
CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y
CONFIG_BINFMT_SCRIPT=y
CONFIG_BINFMT_MISC=y
CONFIG_COREDUMP=y
# end of Executable file formats
#
# Memory Management options
#
CONFIG_ZPOOL=y
CONFIG_SWAP=y
CONFIG_ZSWAP=y
# CONFIG_ZSWAP_DEFAULT_ON is not set
# CONFIG_ZSWAP_SHRINKER_DEFAULT_ON is not set
# CONFIG_ZSWAP_COMPRESSOR_DEFAULT_DEFLATE is not set
CONFIG_ZSWAP_COMPRESSOR_DEFAULT_LZO=y
# CONFIG_ZSWAP_COMPRESSOR_DEFAULT_842 is not set
# CONFIG_ZSWAP_COMPRESSOR_DEFAULT_LZ4 is not set
# CONFIG_ZSWAP_COMPRESSOR_DEFAULT_LZ4HC is not set
# CONFIG_ZSWAP_COMPRESSOR_DEFAULT_ZSTD is not set
CONFIG_ZSWAP_COMPRESSOR_DEFAULT="lzo"
CONFIG_ZSWAP_ZPOOL_DEFAULT_ZSMALLOC=y
CONFIG_ZSWAP_ZPOOL_DEFAULT="zsmalloc"
CONFIG_ZSMALLOC=y
CONFIG_ZSMALLOC_STAT=y
CONFIG_ZSMALLOC_CHAIN_SIZE=8
#
# Slab allocator options
#
CONFIG_SLUB=y
CONFIG_KVFREE_RCU_BATCHED=y
CONFIG_SLAB_MERGE_DEFAULT=y
CONFIG_SLAB_FREELIST_RANDOM=y
# CONFIG_SLAB_FREELIST_HARDENED is not set
# CONFIG_SLAB_BUCKETS is not set
# CONFIG_SLUB_STATS is not set
CONFIG_SLUB_CPU_PARTIAL=y
# CONFIG_RANDOM_KMALLOC_CACHES is not set
# end of Slab allocator options
CONFIG_SHUFFLE_PAGE_ALLOCATOR=y
# CONFIG_COMPAT_BRK is not set
CONFIG_SPARSEMEM=y
CONFIG_SPARSEMEM_EXTREME=y
CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
CONFIG_SPARSEMEM_VMEMMAP=y
CONFIG_SPARSEMEM_VMEMMAP_PREINIT=y
CONFIG_ARCH_WANT_OPTIMIZE_DAX_VMEMMAP=y
CONFIG_ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP=y
CONFIG_ARCH_WANT_HUGETLB_VMEMMAP_PREINIT=y
CONFIG_HAVE_GUP_FAST=y
CONFIG_NUMA_KEEP_MEMINFO=y
CONFIG_MEMORY_ISOLATION=y
CONFIG_EXCLUSIVE_SYSTEM_RAM=y
CONFIG_HAVE_BOOTMEM_INFO_NODE=y
CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y
CONFIG_MEMORY_HOTPLUG=y
CONFIG_MHP_DEFAULT_ONLINE_TYPE_OFFLINE=y
# CONFIG_MHP_DEFAULT_ONLINE_TYPE_ONLINE_AUTO is not set
# CONFIG_MHP_DEFAULT_ONLINE_TYPE_ONLINE_KERNEL is not set
# CONFIG_MHP_DEFAULT_ONLINE_TYPE_ONLINE_MOVABLE is not set
CONFIG_MEMORY_HOTREMOVE=y
CONFIG_MHP_MEMMAP_ON_MEMORY=y
CONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y
CONFIG_SPLIT_PTE_PTLOCKS=y
CONFIG_ARCH_ENABLE_SPLIT_PMD_PTLOCK=y
CONFIG_SPLIT_PMD_PTLOCKS=y
CONFIG_MEMORY_BALLOON=y
CONFIG_BALLOON_COMPACTION=y
CONFIG_COMPACTION=y
CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
CONFIG_PAGE_REPORTING=y
CONFIG_MIGRATION=y
CONFIG_DEVICE_MIGRATION=y
CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION=y
CONFIG_ARCH_ENABLE_THP_MIGRATION=y
CONFIG_CONTIG_ALLOC=y
CONFIG_PCP_BATCH_SCALE_MAX=5
CONFIG_PHYS_ADDR_T_64BIT=y
CONFIG_MMU_NOTIFIER=y
CONFIG_KSM=y
CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
CONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y
CONFIG_MEMORY_FAILURE=y
CONFIG_HWPOISON_INJECT=y
CONFIG_ARCH_WANT_GENERAL_HUGETLB=y
CONFIG_ARCH_WANTS_THP_SWAP=y
CONFIG_MM_ID=y
CONFIG_TRANSPARENT_HUGEPAGE=y
CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y
# CONFIG_TRANSPARENT_HUGEPAGE_MADVISE is not set
# CONFIG_TRANSPARENT_HUGEPAGE_NEVER is not set
CONFIG_THP_SWAP=y
CONFIG_READ_ONLY_THP_FOR_FS=y
# CONFIG_NO_PAGE_MAPCOUNT is not set
CONFIG_PAGE_MAPCOUNT=y
CONFIG_PGTABLE_HAS_HUGE_LEAVES=y
CONFIG_ARCH_SUPPORTS_HUGE_PFNMAP=y
CONFIG_ARCH_SUPPORTS_PMD_PFNMAP=y
CONFIG_ARCH_SUPPORTS_PUD_PFNMAP=y
CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y
CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y
CONFIG_USE_PERCPU_NUMA_NODE_ID=y
CONFIG_HAVE_SETUP_PER_CPU_AREA=y
CONFIG_CMA=y
# CONFIG_CMA_DEBUGFS is not set
# CONFIG_CMA_SYSFS is not set
CONFIG_CMA_AREAS=19
CONFIG_MEM_SOFT_DIRTY=y
CONFIG_GENERIC_EARLY_IOREMAP=y
CONFIG_DEFERRED_STRUCT_PAGE_INIT=y
CONFIG_PAGE_IDLE_FLAG=y
CONFIG_IDLE_PAGE_TRACKING=y
CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
CONFIG_ARCH_HAS_CURRENT_STACK_POINTER=y
CONFIG_ARCH_HAS_PTE_DEVMAP=y
CONFIG_ZONE_DMA=y
CONFIG_ZONE_DMA32=y
CONFIG_ZONE_DEVICE=y
CONFIG_GET_FREE_REGION=y
CONFIG_DEVICE_PRIVATE=y
CONFIG_ARCH_USES_HIGH_VMA_FLAGS=y
CONFIG_ARCH_HAS_PKEYS=y
CONFIG_ARCH_USES_PG_ARCH_2=y
CONFIG_VM_EVENT_COUNTERS=y
# CONFIG_PERCPU_STATS is not set
# CONFIG_GUP_TEST is not set
# CONFIG_DMAPOOL_TEST is not set
CONFIG_ARCH_HAS_PTE_SPECIAL=y
CONFIG_MEMFD_CREATE=y
CONFIG_SECRETMEM=y
# CONFIG_ANON_VMA_NAME is not set
CONFIG_HAVE_ARCH_USERFAULTFD_WP=y
CONFIG_HAVE_ARCH_USERFAULTFD_MINOR=y
CONFIG_USERFAULTFD=y
CONFIG_PTE_MARKER_UFFD_WP=y
CONFIG_LRU_GEN=y
# CONFIG_LRU_GEN_ENABLED is not set
# CONFIG_LRU_GEN_STATS is not set
CONFIG_LRU_GEN_WALKS_MMU=y
CONFIG_ARCH_SUPPORTS_PER_VMA_LOCK=y
CONFIG_PER_VMA_LOCK=y
CONFIG_LOCK_MM_AND_FIND_VMA=y
CONFIG_IOMMU_MM_DATA=y
CONFIG_EXECMEM=y
CONFIG_NUMA_MEMBLKS=y
CONFIG_NUMA_EMU=y
CONFIG_ARCH_SUPPORTS_PT_RECLAIM=y
CONFIG_PT_RECLAIM=y
#
# Data Access Monitoring
#
CONFIG_DAMON=y
CONFIG_DAMON_VADDR=y
CONFIG_DAMON_PADDR=y
CONFIG_DAMON_SYSFS=y
CONFIG_DAMON_RECLAIM=y
CONFIG_DAMON_LRU_SORT=y
# end of Data Access Monitoring
# end of Memory Management options
CONFIG_NET=y
CONFIG_NET_INGRESS=y
CONFIG_NET_EGRESS=y
CONFIG_NET_XGRESS=y
CONFIG_NET_REDIRECT=y
CONFIG_SKB_DECRYPTED=y
CONFIG_SKB_EXTENSIONS=y
CONFIG_NET_DEVMEM=y
CONFIG_NET_SHAPER=y
#
# Networking options
#
CONFIG_PACKET=y
CONFIG_PACKET_DIAG=y
CONFIG_UNIX=y
CONFIG_AF_UNIX_OOB=y
CONFIG_UNIX_DIAG=y
CONFIG_TLS=y
CONFIG_TLS_DEVICE=y
# CONFIG_TLS_TOE is not set
CONFIG_XFRM=y
CONFIG_XFRM_OFFLOAD=y
CONFIG_XFRM_ALGO=y
CONFIG_XFRM_USER=y
# CONFIG_XFRM_USER_COMPAT is not set
CONFIG_XFRM_INTERFACE=y
CONFIG_XFRM_SUB_POLICY=y
CONFIG_XFRM_MIGRATE=y
CONFIG_XFRM_STATISTICS=y
CONFIG_XFRM_AH=y
CONFIG_XFRM_ESP=y
CONFIG_XFRM_IPCOMP=y
CONFIG_NET_KEY=y
CONFIG_NET_KEY_MIGRATE=y
# CONFIG_XFRM_IPTFS is not set
CONFIG_XDP_SOCKETS=y
CONFIG_XDP_SOCKETS_DIAG=y
CONFIG_NET_HANDSHAKE=y
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_IP_FIB_TRIE_STATS=y
CONFIG_IP_MULTIPLE_TABLES=y
CONFIG_IP_ROUTE_MULTIPATH=y
CONFIG_IP_ROUTE_VERBOSE=y
CONFIG_IP_ROUTE_CLASSID=y
# CONFIG_IP_PNP is not set
CONFIG_NET_IPIP=y
CONFIG_NET_IPGRE_DEMUX=y
CONFIG_NET_IP_TUNNEL=y
CONFIG_NET_IPGRE=y
CONFIG_NET_IPGRE_BROADCAST=y
CONFIG_IP_MROUTE_COMMON=y
CONFIG_IP_MROUTE=y
CONFIG_IP_MROUTE_MULTIPLE_TABLES=y
CONFIG_IP_PIMSM_V1=y
CONFIG_IP_PIMSM_V2=y
CONFIG_SYN_COOKIES=y
CONFIG_NET_IPVTI=y
CONFIG_NET_UDP_TUNNEL=y
# CONFIG_NET_FOU is not set
# CONFIG_NET_FOU_IP_TUNNELS is not set
CONFIG_INET_AH=y
CONFIG_INET_ESP=y
CONFIG_INET_ESP_OFFLOAD=y
# CONFIG_INET_ESPINTCP is not set
CONFIG_INET_IPCOMP=y
CONFIG_INET_TABLE_PERTURB_ORDER=16
CONFIG_INET_XFRM_TUNNEL=y
CONFIG_INET_TUNNEL=y
CONFIG_INET_DIAG=y
CONFIG_INET_TCP_DIAG=y
CONFIG_INET_UDP_DIAG=y
CONFIG_INET_RAW_DIAG=y
# CONFIG_INET_DIAG_DESTROY is not set
CONFIG_TCP_CONG_ADVANCED=y
CONFIG_TCP_CONG_BIC=y
CONFIG_TCP_CONG_CUBIC=y
CONFIG_TCP_CONG_WESTWOOD=y
CONFIG_TCP_CONG_HTCP=y
CONFIG_TCP_CONG_HSTCP=y
CONFIG_TCP_CONG_HYBLA=y
CONFIG_TCP_CONG_VEGAS=y
CONFIG_TCP_CONG_NV=y
CONFIG_TCP_CONG_SCALABLE=y
CONFIG_TCP_CONG_LP=y
CONFIG_TCP_CONG_VENO=y
CONFIG_TCP_CONG_YEAH=y
CONFIG_TCP_CONG_ILLINOIS=y
CONFIG_TCP_CONG_DCTCP=y
# CONFIG_TCP_CONG_CDG is not set
CONFIG_TCP_CONG_BBR=y
# CONFIG_DEFAULT_BIC is not set
CONFIG_DEFAULT_CUBIC=y
# CONFIG_DEFAULT_HTCP is not set
# CONFIG_DEFAULT_HYBLA is not set
# CONFIG_DEFAULT_VEGAS is not set
# CONFIG_DEFAULT_VENO is not set
# CONFIG_DEFAULT_WESTWOOD is not set
# CONFIG_DEFAULT_DCTCP is not set
# CONFIG_DEFAULT_BBR is not set
# CONFIG_DEFAULT_RENO is not set
CONFIG_DEFAULT_TCP_CONG="cubic"
CONFIG_TCP_SIGPOOL=y
# CONFIG_TCP_AO is not set
CONFIG_TCP_MD5SIG=y
CONFIG_IPV6=y
CONFIG_IPV6_ROUTER_PREF=y
CONFIG_IPV6_ROUTE_INFO=y
CONFIG_IPV6_OPTIMISTIC_DAD=y
CONFIG_INET6_AH=y
CONFIG_INET6_ESP=y
CONFIG_INET6_ESP_OFFLOAD=y
# CONFIG_INET6_ESPINTCP is not set
CONFIG_INET6_IPCOMP=y
CONFIG_IPV6_MIP6=y
# CONFIG_IPV6_ILA is not set
CONFIG_INET6_XFRM_TUNNEL=y
CONFIG_INET6_TUNNEL=y
CONFIG_IPV6_VTI=y
CONFIG_IPV6_SIT=y
CONFIG_IPV6_SIT_6RD=y
CONFIG_IPV6_NDISC_NODETYPE=y
CONFIG_IPV6_TUNNEL=y
CONFIG_IPV6_GRE=y
CONFIG_IPV6_MULTIPLE_TABLES=y
# CONFIG_IPV6_SUBTREES is not set
CONFIG_IPV6_MROUTE=y
CONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y
CONFIG_IPV6_PIMSM_V2=y
# CONFIG_IPV6_SEG6_LWTUNNEL is not set
# CONFIG_IPV6_SEG6_HMAC is not set
# CONFIG_IPV6_RPL_LWTUNNEL is not set
# CONFIG_IPV6_IOAM6_LWTUNNEL is not set
CONFIG_NETLABEL=y
CONFIG_MPTCP=y
CONFIG_INET_MPTCP_DIAG=y
CONFIG_MPTCP_IPV6=y
CONFIG_NETWORK_SECMARK=y
CONFIG_NET_PTP_CLASSIFY=y
CONFIG_NETWORK_PHY_TIMESTAMPING=y
CONFIG_NETFILTER=y
CONFIG_NETFILTER_ADVANCED=y
CONFIG_BRIDGE_NETFILTER=y
#
# Core Netfilter Configuration
#
CONFIG_NETFILTER_INGRESS=y
CONFIG_NETFILTER_EGRESS=y
CONFIG_NETFILTER_SKIP_EGRESS=y
CONFIG_NETFILTER_NETLINK=y
CONFIG_NETFILTER_FAMILY_BRIDGE=y
CONFIG_NETFILTER_FAMILY_ARP=y
CONFIG_NETFILTER_BPF_LINK=y
# CONFIG_NETFILTER_NETLINK_HOOK is not set
# CONFIG_NETFILTER_NETLINK_ACCT is not set
CONFIG_NETFILTER_NETLINK_QUEUE=y
CONFIG_NETFILTER_NETLINK_LOG=y
CONFIG_NETFILTER_NETLINK_OSF=y
CONFIG_NF_CONNTRACK=y
CONFIG_NF_LOG_SYSLOG=y
CONFIG_NETFILTER_CONNCOUNT=y
CONFIG_NF_CONNTRACK_MARK=y
CONFIG_NF_CONNTRACK_SECMARK=y
CONFIG_NF_CONNTRACK_ZONES=y
CONFIG_NF_CONNTRACK_PROCFS=y
CONFIG_NF_CONNTRACK_EVENTS=y
CONFIG_NF_CONNTRACK_TIMEOUT=y
CONFIG_NF_CONNTRACK_TIMESTAMP=y
CONFIG_NF_CONNTRACK_LABELS=y
CONFIG_NF_CONNTRACK_OVS=y
CONFIG_NF_CT_PROTO_DCCP=y
CONFIG_NF_CT_PROTO_GRE=y
CONFIG_NF_CT_PROTO_SCTP=y
CONFIG_NF_CT_PROTO_UDPLITE=y
CONFIG_NF_CONNTRACK_AMANDA=y
CONFIG_NF_CONNTRACK_FTP=y
CONFIG_NF_CONNTRACK_H323=y
CONFIG_NF_CONNTRACK_IRC=y
CONFIG_NF_CONNTRACK_BROADCAST=y
CONFIG_NF_CONNTRACK_NETBIOS_NS=y
CONFIG_NF_CONNTRACK_SNMP=y
CONFIG_NF_CONNTRACK_PPTP=y
CONFIG_NF_CONNTRACK_SANE=y
CONFIG_NF_CONNTRACK_SIP=y
CONFIG_NF_CONNTRACK_TFTP=y
CONFIG_NF_CT_NETLINK=y
CONFIG_NF_CT_NETLINK_TIMEOUT=y
CONFIG_NF_CT_NETLINK_HELPER=y
CONFIG_NETFILTER_NETLINK_GLUE_CT=y
CONFIG_NF_NAT=y
CONFIG_NF_NAT_AMANDA=y
CONFIG_NF_NAT_FTP=y
CONFIG_NF_NAT_IRC=y
CONFIG_NF_NAT_SIP=y
CONFIG_NF_NAT_TFTP=y
CONFIG_NF_NAT_REDIRECT=y
CONFIG_NF_NAT_MASQUERADE=y
CONFIG_NF_NAT_OVS=y
CONFIG_NETFILTER_SYNPROXY=y
CONFIG_NF_TABLES=y
CONFIG_NF_TABLES_INET=y
CONFIG_NF_TABLES_NETDEV=y
CONFIG_NFT_NUMGEN=y
CONFIG_NFT_CT=y
CONFIG_NFT_CONNLIMIT=y
CONFIG_NFT_LOG=y
CONFIG_NFT_LIMIT=y
CONFIG_NFT_MASQ=y
CONFIG_NFT_REDIR=y
CONFIG_NFT_NAT=y
# CONFIG_NFT_TUNNEL is not set
CONFIG_NFT_QUEUE=y
CONFIG_NFT_QUOTA=y
CONFIG_NFT_REJECT=y
CONFIG_NFT_REJECT_INET=y
CONFIG_NFT_COMPAT=y
CONFIG_NFT_HASH=y
CONFIG_NFT_FIB=y
CONFIG_NFT_FIB_INET=y
# CONFIG_NFT_XFRM is not set
# CONFIG_NFT_SOCKET is not set
# CONFIG_NFT_OSF is not set
# CONFIG_NFT_TPROXY is not set
# CONFIG_NFT_SYNPROXY is not set
CONFIG_NF_DUP_NETDEV=y
CONFIG_NFT_DUP_NETDEV=y
CONFIG_NFT_FWD_NETDEV=y
CONFIG_NFT_FIB_NETDEV=y
# CONFIG_NFT_REJECT_NETDEV is not set
# CONFIG_NF_FLOW_TABLE is not set
CONFIG_NETFILTER_XTABLES=y
CONFIG_NETFILTER_XTABLES_COMPAT=y
#
# Xtables combined modules
#
CONFIG_NETFILTER_XT_MARK=y
CONFIG_NETFILTER_XT_CONNMARK=y
CONFIG_NETFILTER_XT_SET=y
#
# Xtables targets
#
CONFIG_NETFILTER_XT_TARGET_AUDIT=y
CONFIG_NETFILTER_XT_TARGET_CHECKSUM=y
CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y
CONFIG_NETFILTER_XT_TARGET_CONNMARK=y
CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=y
CONFIG_NETFILTER_XT_TARGET_CT=y
CONFIG_NETFILTER_XT_TARGET_DSCP=y
CONFIG_NETFILTER_XT_TARGET_HL=y
CONFIG_NETFILTER_XT_TARGET_HMARK=y
CONFIG_NETFILTER_XT_TARGET_IDLETIMER=y
# CONFIG_NETFILTER_XT_TARGET_LED is not set
CONFIG_NETFILTER_XT_TARGET_LOG=y
CONFIG_NETFILTER_XT_TARGET_MARK=y
CONFIG_NETFILTER_XT_NAT=y
CONFIG_NETFILTER_XT_TARGET_NETMAP=y
CONFIG_NETFILTER_XT_TARGET_NFLOG=y
CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y
CONFIG_NETFILTER_XT_TARGET_NOTRACK=y
CONFIG_NETFILTER_XT_TARGET_RATEEST=y
CONFIG_NETFILTER_XT_TARGET_REDIRECT=y
CONFIG_NETFILTER_XT_TARGET_MASQUERADE=y
CONFIG_NETFILTER_XT_TARGET_TEE=y
CONFIG_NETFILTER_XT_TARGET_TPROXY=y
CONFIG_NETFILTER_XT_TARGET_TRACE=y
CONFIG_NETFILTER_XT_TARGET_SECMARK=y
CONFIG_NETFILTER_XT_TARGET_TCPMSS=y
CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=y
#
# Xtables matches
#
CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=y
CONFIG_NETFILTER_XT_MATCH_BPF=y
CONFIG_NETFILTER_XT_MATCH_CGROUP=y
CONFIG_NETFILTER_XT_MATCH_CLUSTER=y
CONFIG_NETFILTER_XT_MATCH_COMMENT=y
CONFIG_NETFILTER_XT_MATCH_CONNBYTES=y
CONFIG_NETFILTER_XT_MATCH_CONNLABEL=y
CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=y
CONFIG_NETFILTER_XT_MATCH_CONNMARK=y
CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y
CONFIG_NETFILTER_XT_MATCH_CPU=y
CONFIG_NETFILTER_XT_MATCH_DCCP=y
CONFIG_NETFILTER_XT_MATCH_DEVGROUP=y
CONFIG_NETFILTER_XT_MATCH_DSCP=y
CONFIG_NETFILTER_XT_MATCH_ECN=y
CONFIG_NETFILTER_XT_MATCH_ESP=y
CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=y
CONFIG_NETFILTER_XT_MATCH_HELPER=y
CONFIG_NETFILTER_XT_MATCH_HL=y
# CONFIG_NETFILTER_XT_MATCH_IPCOMP is not set
CONFIG_NETFILTER_XT_MATCH_IPRANGE=y
CONFIG_NETFILTER_XT_MATCH_IPVS=y
# CONFIG_NETFILTER_XT_MATCH_L2TP is not set
CONFIG_NETFILTER_XT_MATCH_LENGTH=y
CONFIG_NETFILTER_XT_MATCH_LIMIT=y
CONFIG_NETFILTER_XT_MATCH_MAC=y
CONFIG_NETFILTER_XT_MATCH_MARK=y
CONFIG_NETFILTER_XT_MATCH_MULTIPORT=y
# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set
CONFIG_NETFILTER_XT_MATCH_OSF=y
CONFIG_NETFILTER_XT_MATCH_OWNER=y
CONFIG_NETFILTER_XT_MATCH_POLICY=y
CONFIG_NETFILTER_XT_MATCH_PHYSDEV=y
CONFIG_NETFILTER_XT_MATCH_PKTTYPE=y
CONFIG_NETFILTER_XT_MATCH_QUOTA=y
CONFIG_NETFILTER_XT_MATCH_RATEEST=y
CONFIG_NETFILTER_XT_MATCH_REALM=y
CONFIG_NETFILTER_XT_MATCH_RECENT=y
CONFIG_NETFILTER_XT_MATCH_SCTP=y
CONFIG_NETFILTER_XT_MATCH_SOCKET=y
CONFIG_NETFILTER_XT_MATCH_STATE=y
CONFIG_NETFILTER_XT_MATCH_STATISTIC=y
CONFIG_NETFILTER_XT_MATCH_STRING=y
CONFIG_NETFILTER_XT_MATCH_TCPMSS=y
# CONFIG_NETFILTER_XT_MATCH_TIME is not set
# CONFIG_NETFILTER_XT_MATCH_U32 is not set
# end of Core Netfilter Configuration
CONFIG_IP_SET=y
CONFIG_IP_SET_MAX=256
CONFIG_IP_SET_BITMAP_IP=y
CONFIG_IP_SET_BITMAP_IPMAC=y
CONFIG_IP_SET_BITMAP_PORT=y
CONFIG_IP_SET_HASH_IP=y
CONFIG_IP_SET_HASH_IPMARK=y
CONFIG_IP_SET_HASH_IPPORT=y
CONFIG_IP_SET_HASH_IPPORTIP=y
CONFIG_IP_SET_HASH_IPPORTNET=y
CONFIG_IP_SET_HASH_IPMAC=y
CONFIG_IP_SET_HASH_MAC=y
CONFIG_IP_SET_HASH_NETPORTNET=y
CONFIG_IP_SET_HASH_NET=y
CONFIG_IP_SET_HASH_NETNET=y
CONFIG_IP_SET_HASH_NETPORT=y
CONFIG_IP_SET_HASH_NETIFACE=y
CONFIG_IP_SET_LIST_SET=y
CONFIG_IP_VS=y
CONFIG_IP_VS_IPV6=y
# CONFIG_IP_VS_DEBUG is not set
CONFIG_IP_VS_TAB_BITS=12
#
# IPVS transport protocol load balancing support
#
CONFIG_IP_VS_PROTO_TCP=y
CONFIG_IP_VS_PROTO_UDP=y
CONFIG_IP_VS_PROTO_AH_ESP=y
CONFIG_IP_VS_PROTO_ESP=y
CONFIG_IP_VS_PROTO_AH=y
CONFIG_IP_VS_PROTO_SCTP=y
#
# IPVS scheduler
#
CONFIG_IP_VS_RR=y
CONFIG_IP_VS_WRR=y
CONFIG_IP_VS_LC=y
CONFIG_IP_VS_WLC=y
CONFIG_IP_VS_FO=y
CONFIG_IP_VS_OVF=y
CONFIG_IP_VS_LBLC=y
CONFIG_IP_VS_LBLCR=y
CONFIG_IP_VS_DH=y
CONFIG_IP_VS_SH=y
# CONFIG_IP_VS_MH is not set
CONFIG_IP_VS_SED=y
CONFIG_IP_VS_NQ=y
# CONFIG_IP_VS_TWOS is not set
#
# IPVS SH scheduler
#
CONFIG_IP_VS_SH_TAB_BITS=8
#
# IPVS MH scheduler
#
CONFIG_IP_VS_MH_TAB_INDEX=12
#
# IPVS application helper
#
CONFIG_IP_VS_FTP=y
CONFIG_IP_VS_NFCT=y
CONFIG_IP_VS_PE_SIP=y
#
# IP: Netfilter Configuration
#
CONFIG_NF_DEFRAG_IPV4=y
CONFIG_IP_NF_IPTABLES_LEGACY=y
CONFIG_NF_SOCKET_IPV4=y
CONFIG_NF_TPROXY_IPV4=y
CONFIG_NF_TABLES_IPV4=y
CONFIG_NFT_REJECT_IPV4=y
CONFIG_NFT_DUP_IPV4=y
CONFIG_NFT_FIB_IPV4=y
CONFIG_NF_TABLES_ARP=y
CONFIG_NF_DUP_IPV4=y
CONFIG_NF_LOG_ARP=y
CONFIG_NF_LOG_IPV4=y
CONFIG_NF_REJECT_IPV4=y
CONFIG_NF_NAT_SNMP_BASIC=y
CONFIG_NF_NAT_PPTP=y
CONFIG_NF_NAT_H323=y
CONFIG_IP_NF_IPTABLES=y
CONFIG_IP_NF_MATCH_AH=y
CONFIG_IP_NF_MATCH_ECN=y
CONFIG_IP_NF_MATCH_RPFILTER=y
CONFIG_IP_NF_MATCH_TTL=y
CONFIG_IP_NF_FILTER=y
CONFIG_IP_NF_TARGET_REJECT=y
CONFIG_IP_NF_TARGET_SYNPROXY=y
CONFIG_IP_NF_NAT=y
CONFIG_IP_NF_TARGET_MASQUERADE=y
CONFIG_IP_NF_TARGET_NETMAP=y
CONFIG_IP_NF_TARGET_REDIRECT=y
CONFIG_IP_NF_MANGLE=y
CONFIG_IP_NF_TARGET_ECN=y
CONFIG_IP_NF_TARGET_TTL=y
CONFIG_IP_NF_RAW=y
CONFIG_IP_NF_SECURITY=y
CONFIG_IP_NF_ARPTABLES=y
CONFIG_NFT_COMPAT_ARP=y
CONFIG_IP_NF_ARPFILTER=y
CONFIG_IP_NF_ARP_MANGLE=y
# end of IP: Netfilter Configuration
#
# IPv6: Netfilter Configuration
#
CONFIG_IP6_NF_IPTABLES_LEGACY=y
CONFIG_NF_SOCKET_IPV6=y
CONFIG_NF_TPROXY_IPV6=y
CONFIG_NF_TABLES_IPV6=y
CONFIG_NFT_REJECT_IPV6=y
CONFIG_NFT_DUP_IPV6=y
CONFIG_NFT_FIB_IPV6=y
CONFIG_NF_DUP_IPV6=y
CONFIG_NF_REJECT_IPV6=y
CONFIG_NF_LOG_IPV6=y
CONFIG_IP6_NF_IPTABLES=y
CONFIG_IP6_NF_MATCH_AH=y
CONFIG_IP6_NF_MATCH_EUI64=y
CONFIG_IP6_NF_MATCH_FRAG=y
CONFIG_IP6_NF_MATCH_OPTS=y
CONFIG_IP6_NF_MATCH_HL=y
CONFIG_IP6_NF_MATCH_IPV6HEADER=y
CONFIG_IP6_NF_MATCH_MH=y
CONFIG_IP6_NF_MATCH_RPFILTER=y
CONFIG_IP6_NF_MATCH_RT=y
# CONFIG_IP6_NF_MATCH_SRH is not set
# CONFIG_IP6_NF_TARGET_HL is not set
CONFIG_IP6_NF_FILTER=y
CONFIG_IP6_NF_TARGET_REJECT=y
CONFIG_IP6_NF_TARGET_SYNPROXY=y
CONFIG_IP6_NF_MANGLE=y
CONFIG_IP6_NF_RAW=y
CONFIG_IP6_NF_SECURITY=y
CONFIG_IP6_NF_NAT=y
CONFIG_IP6_NF_TARGET_MASQUERADE=y
CONFIG_IP6_NF_TARGET_NPT=y
# end of IPv6: Netfilter Configuration
CONFIG_NF_DEFRAG_IPV6=y
CONFIG_NF_TABLES_BRIDGE=y
# CONFIG_NFT_BRIDGE_META is not set
CONFIG_NFT_BRIDGE_REJECT=y
# CONFIG_NF_CONNTRACK_BRIDGE is not set
CONFIG_BRIDGE_NF_EBTABLES_LEGACY=y
CONFIG_BRIDGE_NF_EBTABLES=y
CONFIG_BRIDGE_EBT_BROUTE=y
CONFIG_BRIDGE_EBT_T_FILTER=y
CONFIG_BRIDGE_EBT_T_NAT=y
CONFIG_BRIDGE_EBT_802_3=y
CONFIG_BRIDGE_EBT_AMONG=y
CONFIG_BRIDGE_EBT_ARP=y
CONFIG_BRIDGE_EBT_IP=y
CONFIG_BRIDGE_EBT_IP6=y
CONFIG_BRIDGE_EBT_LIMIT=y
CONFIG_BRIDGE_EBT_MARK=y
CONFIG_BRIDGE_EBT_PKTTYPE=y
CONFIG_BRIDGE_EBT_STP=y
CONFIG_BRIDGE_EBT_VLAN=y
CONFIG_BRIDGE_EBT_ARPREPLY=y
CONFIG_BRIDGE_EBT_DNAT=y
CONFIG_BRIDGE_EBT_MARK_T=y
CONFIG_BRIDGE_EBT_REDIRECT=y
CONFIG_BRIDGE_EBT_SNAT=y
CONFIG_BRIDGE_EBT_LOG=y
CONFIG_BRIDGE_EBT_NFLOG=y
# CONFIG_IP_DCCP is not set
# CONFIG_IP_SCTP is not set
# CONFIG_RDS is not set
# CONFIG_TIPC is not set
CONFIG_ATM=y
CONFIG_ATM_CLIP=y
# CONFIG_ATM_CLIP_NO_ICMP is not set
CONFIG_ATM_LANE=y
# CONFIG_ATM_MPOA is not set
CONFIG_ATM_BR2684=y
# CONFIG_ATM_BR2684_IPFILTER is not set
CONFIG_L2TP=y
CONFIG_L2TP_DEBUGFS=y
CONFIG_L2TP_V3=y
CONFIG_L2TP_IP=y
CONFIG_L2TP_ETH=y
CONFIG_STP=y
CONFIG_GARP=y
CONFIG_MRP=y
CONFIG_BRIDGE=y
CONFIG_BRIDGE_IGMP_SNOOPING=y
CONFIG_BRIDGE_VLAN_FILTERING=y
# CONFIG_BRIDGE_MRP is not set
# CONFIG_BRIDGE_CFM is not set
# CONFIG_NET_DSA is not set
CONFIG_VLAN_8021Q=y
CONFIG_VLAN_8021Q_GVRP=y
CONFIG_VLAN_8021Q_MVRP=y
CONFIG_LLC=y
# CONFIG_LLC2 is not set
# CONFIG_ATALK is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_PHONET is not set
CONFIG_6LOWPAN=y
# CONFIG_6LOWPAN_DEBUGFS is not set
# CONFIG_6LOWPAN_NHC is not set
# CONFIG_IEEE802154 is not set
CONFIG_NET_SCHED=y
#
# Queueing/Scheduling
#
CONFIG_NET_SCH_HTB=y
CONFIG_NET_SCH_HFSC=y
CONFIG_NET_SCH_PRIO=y
CONFIG_NET_SCH_MULTIQ=y
CONFIG_NET_SCH_RED=y
CONFIG_NET_SCH_SFB=y
CONFIG_NET_SCH_SFQ=y
CONFIG_NET_SCH_TEQL=y
CONFIG_NET_SCH_TBF=y
# CONFIG_NET_SCH_CBS is not set
# CONFIG_NET_SCH_ETF is not set
CONFIG_NET_SCH_MQPRIO_LIB=y
# CONFIG_NET_SCH_TAPRIO is not set
CONFIG_NET_SCH_GRED=y
CONFIG_NET_SCH_NETEM=y
CONFIG_NET_SCH_DRR=y
CONFIG_NET_SCH_MQPRIO=y
# CONFIG_NET_SCH_SKBPRIO is not set
CONFIG_NET_SCH_CHOKE=y
CONFIG_NET_SCH_QFQ=y
CONFIG_NET_SCH_CODEL=y
CONFIG_NET_SCH_FQ_CODEL=y
# CONFIG_NET_SCH_CAKE is not set
CONFIG_NET_SCH_FQ=y
CONFIG_NET_SCH_HHF=y
CONFIG_NET_SCH_PIE=y
# CONFIG_NET_SCH_FQ_PIE is not set
CONFIG_NET_SCH_INGRESS=y
CONFIG_NET_SCH_PLUG=y
# CONFIG_NET_SCH_ETS is not set
CONFIG_NET_SCH_DEFAULT=y
# CONFIG_DEFAULT_FQ is not set
# CONFIG_DEFAULT_CODEL is not set
CONFIG_DEFAULT_FQ_CODEL=y
# CONFIG_DEFAULT_SFQ is not set
# CONFIG_DEFAULT_PFIFO_FAST is not set
CONFIG_DEFAULT_NET_SCH="fq_codel"
#
# Classification
#
CONFIG_NET_CLS=y
CONFIG_NET_CLS_BASIC=y
CONFIG_NET_CLS_ROUTE4=y
CONFIG_NET_CLS_FW=y
CONFIG_NET_CLS_U32=y
CONFIG_CLS_U32_PERF=y
CONFIG_CLS_U32_MARK=y
CONFIG_NET_CLS_FLOW=y
CONFIG_NET_CLS_CGROUP=y
CONFIG_NET_CLS_BPF=y
CONFIG_NET_CLS_FLOWER=y
CONFIG_NET_CLS_MATCHALL=y
CONFIG_NET_EMATCH=y
CONFIG_NET_EMATCH_STACK=32
CONFIG_NET_EMATCH_CMP=y
CONFIG_NET_EMATCH_NBYTE=y
CONFIG_NET_EMATCH_U32=y
CONFIG_NET_EMATCH_META=y
CONFIG_NET_EMATCH_TEXT=y
# CONFIG_NET_EMATCH_CANID is not set
CONFIG_NET_EMATCH_IPSET=y
# CONFIG_NET_EMATCH_IPT is not set
CONFIG_NET_CLS_ACT=y
CONFIG_NET_ACT_POLICE=y
CONFIG_NET_ACT_GACT=y
CONFIG_GACT_PROB=y
CONFIG_NET_ACT_MIRRED=y
CONFIG_NET_ACT_SAMPLE=y
CONFIG_NET_ACT_NAT=y
CONFIG_NET_ACT_PEDIT=y
CONFIG_NET_ACT_SIMP=y
CONFIG_NET_ACT_SKBEDIT=y
CONFIG_NET_ACT_CSUM=y
# CONFIG_NET_ACT_MPLS is not set
CONFIG_NET_ACT_VLAN=y
CONFIG_NET_ACT_BPF=y
# CONFIG_NET_ACT_CONNMARK is not set
# CONFIG_NET_ACT_CTINFO is not set
CONFIG_NET_ACT_SKBMOD=y
# CONFIG_NET_ACT_IFE is not set
CONFIG_NET_ACT_TUNNEL_KEY=y
# CONFIG_NET_ACT_GATE is not set
# CONFIG_NET_TC_SKB_EXT is not set
CONFIG_NET_SCH_FIFO=y
CONFIG_DCB=y
CONFIG_DNS_RESOLVER=y
# CONFIG_BATMAN_ADV is not set
CONFIG_OPENVSWITCH=y
CONFIG_OPENVSWITCH_GRE=y
CONFIG_OPENVSWITCH_VXLAN=y
CONFIG_OPENVSWITCH_GENEVE=y
# CONFIG_VSOCKETS is not set
CONFIG_NETLINK_DIAG=y
CONFIG_MPLS=y
CONFIG_NET_MPLS_GSO=y
CONFIG_MPLS_ROUTING=y
CONFIG_MPLS_IPTUNNEL=y
CONFIG_NET_NSH=y
# CONFIG_HSR is not set
CONFIG_NET_SWITCHDEV=y
CONFIG_NET_L3_MASTER_DEV=y
# CONFIG_QRTR is not set
# CONFIG_NET_NCSI is not set
# CONFIG_PCPU_DEV_REFCNT is not set
CONFIG_MAX_SKB_FRAGS=17
CONFIG_RPS=y
CONFIG_RFS_ACCEL=y
CONFIG_SOCK_RX_QUEUE_MAPPING=y
CONFIG_XPS=y
CONFIG_CGROUP_NET_PRIO=y
CONFIG_CGROUP_NET_CLASSID=y
CONFIG_NET_RX_BUSY_POLL=y
CONFIG_BQL=y
CONFIG_BPF_STREAM_PARSER=y
CONFIG_NET_FLOW_LIMIT=y
#
# Network testing
#
CONFIG_NET_PKTGEN=y
CONFIG_NET_DROP_MONITOR=y
# end of Network testing
# end of Networking options
# CONFIG_HAMRADIO is not set
CONFIG_CAN=y
CONFIG_CAN_RAW=y
CONFIG_CAN_BCM=y
CONFIG_CAN_GW=y
# CONFIG_CAN_J1939 is not set
# CONFIG_CAN_ISOTP is not set
# CONFIG_BT is not set
# CONFIG_AF_RXRPC is not set
# CONFIG_AF_KCM is not set
CONFIG_STREAM_PARSER=y
# CONFIG_MCTP is not set
CONFIG_FIB_RULES=y
# CONFIG_WIRELESS is not set
CONFIG_RFKILL=y
CONFIG_RFKILL_LEDS=y
CONFIG_RFKILL_INPUT=y
CONFIG_RFKILL_GPIO=y
# CONFIG_NET_9P is not set
# CONFIG_CAIF is not set
CONFIG_CEPH_LIB=y
# CONFIG_CEPH_LIB_PRETTYDEBUG is not set
CONFIG_CEPH_LIB_USE_DNS_RESOLVER=y
# CONFIG_NFC is not set
CONFIG_PSAMPLE=y
# CONFIG_NET_IFE is not set
CONFIG_LWTUNNEL=y
CONFIG_LWTUNNEL_BPF=y
CONFIG_DST_CACHE=y
CONFIG_GRO_CELLS=y
CONFIG_SOCK_VALIDATE_XMIT=y
CONFIG_NET_SELFTESTS=y
CONFIG_NET_SOCK_MSG=y
CONFIG_NET_DEVLINK=y
CONFIG_PAGE_POOL=y
CONFIG_PAGE_POOL_STATS=y
CONFIG_FAILOVER=y
CONFIG_ETHTOOL_NETLINK=y
#
# Device Drivers
#
CONFIG_HAVE_PCI=y
CONFIG_GENERIC_PCI_IOMAP=y
CONFIG_PCI=y
CONFIG_PCI_DOMAINS=y
CONFIG_PCIEPORTBUS=y
CONFIG_HOTPLUG_PCI_PCIE=y
CONFIG_PCIEAER=y
CONFIG_PCIEAER_INJECT=y
CONFIG_PCIEAER_CXL=y
CONFIG_PCIE_ECRC=y
CONFIG_PCIEASPM=y
CONFIG_PCIEASPM_DEFAULT=y
# CONFIG_PCIEASPM_POWERSAVE is not set
# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set
# CONFIG_PCIEASPM_PERFORMANCE is not set
CONFIG_PCIE_PME=y
CONFIG_PCIE_DPC=y
# CONFIG_PCIE_PTM is not set
# CONFIG_PCIE_EDR is not set
CONFIG_PCI_MSI=y
CONFIG_PCI_QUIRKS=y
# CONFIG_PCI_DEBUG is not set
# CONFIG_PCI_REALLOC_ENABLE_AUTO is not set
CONFIG_PCI_STUB=y
CONFIG_PCI_PF_STUB=y
CONFIG_PCI_ATS=y
CONFIG_PCI_DOE=y
CONFIG_PCI_LOCKLESS_CONFIG=y
CONFIG_PCI_IOV=y
# CONFIG_PCI_NPEM is not set
CONFIG_PCI_PRI=y
CONFIG_PCI_PASID=y
# CONFIG_PCIE_TPH is not set
# CONFIG_PCI_P2PDMA is not set
CONFIG_PCI_LABEL=y
CONFIG_PCI_HYPERV=y
CONFIG_VGA_ARB=y
CONFIG_VGA_ARB_MAX_GPUS=64
CONFIG_HOTPLUG_PCI=y
CONFIG_HOTPLUG_PCI_ACPI=y
CONFIG_HOTPLUG_PCI_ACPI_IBM=y
# CONFIG_HOTPLUG_PCI_CPCI is not set
# CONFIG_HOTPLUG_PCI_OCTEONEP is not set
CONFIG_HOTPLUG_PCI_SHPC=y
#
# PCI controller drivers
#
CONFIG_VMD=y
CONFIG_PCI_HYPERV_INTERFACE=y
#
# Cadence-based PCIe controllers
#
# end of Cadence-based PCIe controllers
#
# DesignWare-based PCIe controllers
#
# CONFIG_PCI_MESON is not set
# CONFIG_PCIE_DW_PLAT_HOST is not set
# end of DesignWare-based PCIe controllers
#
# Mobiveil-based PCIe controllers
#
# end of Mobiveil-based PCIe controllers
#
# PLDA-based PCIe controllers
#
# end of PLDA-based PCIe controllers
# end of PCI controller drivers
#
# PCI Endpoint
#
# CONFIG_PCI_ENDPOINT is not set
# end of PCI Endpoint
#
# PCI switch controller drivers
#
# CONFIG_PCI_SW_SWITCHTEC is not set
# end of PCI switch controller drivers
# CONFIG_PCI_PWRCTL_SLOT is not set
CONFIG_CXL_BUS=y
CONFIG_CXL_PCI=y
# CONFIG_CXL_MEM_RAW_COMMANDS is not set
CONFIG_CXL_ACPI=y
CONFIG_CXL_PMEM=y
CONFIG_CXL_MEM=y
# CONFIG_CXL_FEATURES is not set
CONFIG_CXL_PORT=y
CONFIG_CXL_SUSPEND=y
CONFIG_CXL_REGION=y
# CONFIG_CXL_REGION_INVALIDATION_TEST is not set
CONFIG_CXL_MCE=y
CONFIG_PCCARD=y
# CONFIG_PCMCIA is not set
CONFIG_CARDBUS=y
#
# PC-card bridges
#
CONFIG_YENTA=y
CONFIG_YENTA_O2=y
CONFIG_YENTA_RICOH=y
CONFIG_YENTA_TI=y
CONFIG_YENTA_ENE_TUNE=y
CONFIG_YENTA_TOSHIBA=y
# CONFIG_RAPIDIO is not set
#
# Generic Driver Options
#
CONFIG_AUXILIARY_BUS=y
# CONFIG_UEVENT_HELPER is not set
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
# CONFIG_DEVTMPFS_SAFE is not set
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
#
# Firmware loader
#
CONFIG_FW_LOADER=y
CONFIG_FW_LOADER_DEBUG=y
CONFIG_FW_LOADER_PAGED_BUF=y
CONFIG_FW_LOADER_SYSFS=y
CONFIG_EXTRA_FIRMWARE=""
# CONFIG_FW_LOADER_USER_HELPER is not set
# CONFIG_FW_LOADER_COMPRESS is not set
CONFIG_FW_CACHE=y
CONFIG_FW_UPLOAD=y
# end of Firmware loader
CONFIG_ALLOW_DEV_COREDUMP=y
# CONFIG_DEBUG_DRIVER is not set
# CONFIG_DEBUG_DEVRES is not set
# CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set
CONFIG_HMEM_REPORTING=y
# CONFIG_TEST_ASYNC_DRIVER_PROBE is not set
CONFIG_SYS_HYPERVISOR=y
CONFIG_GENERIC_CPU_DEVICES=y
CONFIG_GENERIC_CPU_AUTOPROBE=y
CONFIG_GENERIC_CPU_VULNERABILITIES=y
CONFIG_REGMAP=y
CONFIG_REGMAP_I2C=y
CONFIG_REGMAP_SPI=y
CONFIG_DMA_SHARED_BUFFER=y
# CONFIG_DMA_FENCE_TRACE is not set
# CONFIG_FW_DEVLINK_SYNC_STATE_TIMEOUT is not set
# end of Generic Driver Options
#
# Bus devices
#
# CONFIG_MHI_BUS is not set
# CONFIG_MHI_BUS_EP is not set
# end of Bus devices
#
# Cache Drivers
#
# end of Cache Drivers
CONFIG_CONNECTOR=y
CONFIG_PROC_EVENTS=y
#
# Firmware Drivers
#
#
# ARM System Control and Management Interface Protocol
#
# end of ARM System Control and Management Interface Protocol
CONFIG_EDD=y
# CONFIG_EDD_OFF is not set
CONFIG_FIRMWARE_MEMMAP=y
CONFIG_DMIID=y
CONFIG_DMI_SYSFS=y
CONFIG_DMI_SCAN_MACHINE_NON_EFI_FALLBACK=y
CONFIG_ISCSI_IBFT_FIND=y
CONFIG_ISCSI_IBFT=y
CONFIG_FW_CFG_SYSFS=y
# CONFIG_FW_CFG_SYSFS_CMDLINE is not set
CONFIG_SYSFB=y
# CONFIG_SYSFB_SIMPLEFB is not set
# CONFIG_GOOGLE_FIRMWARE is not set
#
# EFI (Extensible Firmware Interface) Support
#
CONFIG_EFI_ESRT=y
CONFIG_EFI_VARS_PSTORE=y
CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE=y
CONFIG_EFI_SOFT_RESERVE=y
CONFIG_EFI_DXE_MEM_ATTRIBUTES=y
CONFIG_EFI_RUNTIME_WRAPPERS=y
# CONFIG_EFI_BOOTLOADER_CONTROL is not set
# CONFIG_EFI_CAPSULE_LOADER is not set
# CONFIG_EFI_TEST is not set
CONFIG_EFI_DEV_PATH_PARSER=y
CONFIG_APPLE_PROPERTIES=y
# CONFIG_RESET_ATTACK_MITIGATION is not set
# CONFIG_EFI_RCI2_TABLE is not set
# CONFIG_EFI_DISABLE_PCI_DMA is not set
CONFIG_EFI_EARLYCON=y
CONFIG_EFI_CUSTOM_SSDT_OVERLAYS=y
# CONFIG_EFI_DISABLE_RUNTIME is not set
# CONFIG_EFI_COCO_SECRET is not set
CONFIG_UNACCEPTED_MEMORY=y
# end of EFI (Extensible Firmware Interface) Support
CONFIG_UEFI_CPER=y
CONFIG_UEFI_CPER_X86=y
#
# Qualcomm firmware drivers
#
# end of Qualcomm firmware drivers
#
# Tegra firmware driver
#
# end of Tegra firmware driver
# end of Firmware Drivers
# CONFIG_FWCTL is not set
# CONFIG_GNSS is not set
CONFIG_MTD=y
# CONFIG_MTD_TESTS is not set
#
# Partition parsers
#
# CONFIG_MTD_CMDLINE_PARTS is not set
# CONFIG_MTD_REDBOOT_PARTS is not set
# end of Partition parsers
#
# User Modules And Translation Layers
#
CONFIG_MTD_BLKDEVS=y
CONFIG_MTD_BLOCK=y
#
# Note that in some cases UBI block is preferred. See MTD_UBI_BLOCK.
#
# CONFIG_FTL is not set
# CONFIG_NFTL is not set
# CONFIG_INFTL is not set
# CONFIG_RFD_FTL is not set
# CONFIG_SSFDC is not set
# CONFIG_SM_FTL is not set
# CONFIG_MTD_OOPS is not set
# CONFIG_MTD_SWAP is not set
# CONFIG_MTD_PARTITIONED_MASTER is not set
#
# RAM/ROM/Flash chip drivers
#
# CONFIG_MTD_CFI is not set
# CONFIG_MTD_JEDECPROBE is not set
CONFIG_MTD_MAP_BANK_WIDTH_1=y
CONFIG_MTD_MAP_BANK_WIDTH_2=y
CONFIG_MTD_MAP_BANK_WIDTH_4=y
CONFIG_MTD_CFI_I1=y
CONFIG_MTD_CFI_I2=y
# CONFIG_MTD_RAM is not set
# CONFIG_MTD_ROM is not set
# CONFIG_MTD_ABSENT is not set
# end of RAM/ROM/Flash chip drivers
#
# Mapping drivers for chip access
#
# CONFIG_MTD_COMPLEX_MAPPINGS is not set
# CONFIG_MTD_PLATRAM is not set
# end of Mapping drivers for chip access
#
# Self-contained MTD device drivers
#
# CONFIG_MTD_PMC551 is not set
# CONFIG_MTD_DATAFLASH is not set
# CONFIG_MTD_MCHP23K256 is not set
# CONFIG_MTD_MCHP48L640 is not set
# CONFIG_MTD_SST25L is not set
# CONFIG_MTD_SLRAM is not set
# CONFIG_MTD_PHRAM is not set
# CONFIG_MTD_MTDRAM is not set
CONFIG_MTD_BLOCK2MTD=y
#
# Disk-On-Chip Device Drivers
#
# CONFIG_MTD_DOCG3 is not set
# end of Self-contained MTD device drivers
#
# NAND
#
# CONFIG_MTD_ONENAND is not set
# CONFIG_MTD_RAW_NAND is not set
# CONFIG_MTD_SPI_NAND is not set
#
# ECC engine support
#
# CONFIG_MTD_NAND_ECC_SW_HAMMING is not set
# CONFIG_MTD_NAND_ECC_SW_BCH is not set
# CONFIG_MTD_NAND_ECC_MXIC is not set
# end of ECC engine support
# end of NAND
#
# LPDDR & LPDDR2 PCM memory drivers
#
# CONFIG_MTD_LPDDR is not set
# end of LPDDR & LPDDR2 PCM memory drivers
CONFIG_MTD_SPI_NOR=y
CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y
# CONFIG_MTD_SPI_NOR_SWP_DISABLE is not set
CONFIG_MTD_SPI_NOR_SWP_DISABLE_ON_VOLATILE=y
# CONFIG_MTD_SPI_NOR_SWP_KEEP is not set
CONFIG_MTD_UBI=y
CONFIG_MTD_UBI_WL_THRESHOLD=4096
CONFIG_MTD_UBI_BEB_LIMIT=20
# CONFIG_MTD_UBI_FASTMAP is not set
CONFIG_MTD_UBI_GLUEBI=y
# CONFIG_MTD_UBI_BLOCK is not set
# CONFIG_MTD_UBI_FAULT_INJECTION is not set
# CONFIG_MTD_UBI_NVMEM is not set
# CONFIG_MTD_HYPERBUS is not set
# CONFIG_OF is not set
CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
CONFIG_PARPORT=y
CONFIG_PARPORT_PC=y
CONFIG_PARPORT_SERIAL=y
# CONFIG_PARPORT_PC_FIFO is not set
# CONFIG_PARPORT_PC_SUPERIO is not set
CONFIG_PARPORT_1284=y
CONFIG_PARPORT_NOT_PC=y
CONFIG_PNP=y
# CONFIG_PNP_DEBUG_MESSAGES is not set
#
# Protocols
#
CONFIG_PNPACPI=y
CONFIG_BLK_DEV=y
CONFIG_BLK_DEV_NULL_BLK=y
# CONFIG_BLK_DEV_NULL_BLK_FAULT_INJECTION is not set
# CONFIG_BLK_DEV_FD is not set
CONFIG_CDROM=y
# CONFIG_BLK_DEV_PCIESSD_MTIP32XX is not set
CONFIG_ZRAM=y
# CONFIG_ZRAM_BACKEND_LZ4 is not set
# CONFIG_ZRAM_BACKEND_LZ4HC is not set
# CONFIG_ZRAM_BACKEND_ZSTD is not set
# CONFIG_ZRAM_BACKEND_DEFLATE is not set
# CONFIG_ZRAM_BACKEND_842 is not set
CONFIG_ZRAM_BACKEND_FORCE_LZO=y
CONFIG_ZRAM_BACKEND_LZO=y
CONFIG_ZRAM_DEF_COMP_LZORLE=y
# CONFIG_ZRAM_DEF_COMP_LZO is not set
CONFIG_ZRAM_DEF_COMP="lzo-rle"
CONFIG_ZRAM_WRITEBACK=y
# CONFIG_ZRAM_TRACK_ENTRY_ACTIME is not set
# CONFIG_ZRAM_MEMORY_TRACKING is not set
CONFIG_ZRAM_MULTI_COMP=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_LOOP_MIN_COUNT=0
# CONFIG_BLK_DEV_DRBD is not set
CONFIG_BLK_DEV_NBD=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=16
CONFIG_BLK_DEV_RAM_SIZE=16384
CONFIG_CDROM_PKTCDVD=y
CONFIG_CDROM_PKTCDVD_BUFFERS=8
# CONFIG_CDROM_PKTCDVD_WCACHE is not set
# CONFIG_ATA_OVER_ETH is not set
CONFIG_XEN_BLKDEV_FRONTEND=y
CONFIG_VIRTIO_BLK=y
CONFIG_BLK_DEV_RBD=y
# CONFIG_BLK_DEV_UBLK is not set
#
# NVME Support
#
CONFIG_NVME_CORE=y
CONFIG_BLK_DEV_NVME=y
CONFIG_NVME_MULTIPATH=y
# CONFIG_NVME_VERBOSE_ERRORS is not set
# CONFIG_NVME_HWMON is not set
CONFIG_NVME_FABRICS=y
CONFIG_NVME_FC=y
CONFIG_NVME_TCP=y
# CONFIG_NVME_TCP_TLS is not set
# CONFIG_NVME_HOST_AUTH is not set
CONFIG_NVME_TARGET=y
# CONFIG_NVME_TARGET_DEBUGFS is not set
# CONFIG_NVME_TARGET_PASSTHRU is not set
CONFIG_NVME_TARGET_LOOP=y
CONFIG_NVME_TARGET_FC=y
CONFIG_NVME_TARGET_FCLOOP=y
CONFIG_NVME_TARGET_TCP=y
# CONFIG_NVME_TARGET_TCP_TLS is not set
# CONFIG_NVME_TARGET_AUTH is not set
# end of NVME Support
#
# Misc devices
#
CONFIG_SENSORS_LIS3LV02D=y
# CONFIG_AD525X_DPOT is not set
# CONFIG_DUMMY_IRQ is not set
# CONFIG_IBM_ASM is not set
# CONFIG_PHANTOM is not set
# CONFIG_RPMB is not set
CONFIG_TIFM_CORE=y
CONFIG_TIFM_7XX1=y
# CONFIG_ICS932S401 is not set
CONFIG_ENCLOSURE_SERVICES=y
CONFIG_SGI_XP=y
CONFIG_HP_ILO=y
CONFIG_SGI_GRU=y
# CONFIG_SGI_GRU_DEBUG is not set
CONFIG_APDS9802ALS=y
CONFIG_ISL29003=y
CONFIG_ISL29020=y
CONFIG_SENSORS_TSL2550=y
CONFIG_SENSORS_BH1770=y
CONFIG_SENSORS_APDS990X=y
# CONFIG_HMC6352 is not set
# CONFIG_DS1682 is not set
# CONFIG_LATTICE_ECP3_CONFIG is not set
# CONFIG_SRAM is not set
# CONFIG_DW_XDATA_PCIE is not set
# CONFIG_PCI_ENDPOINT_TEST is not set
# CONFIG_XILINX_SDFEC is not set
CONFIG_MISC_RTSX=y
# CONFIG_NTSYNC is not set
# CONFIG_NSM is not set
# CONFIG_C2PORT is not set
#
# EEPROM support
#
# CONFIG_EEPROM_AT24 is not set
# CONFIG_EEPROM_AT25 is not set
CONFIG_EEPROM_MAX6875=y
CONFIG_EEPROM_93CX6=y
# CONFIG_EEPROM_93XX46 is not set
# CONFIG_EEPROM_IDT_89HPESX is not set
# CONFIG_EEPROM_EE1004 is not set
# end of EEPROM support
CONFIG_CB710_CORE=y
# CONFIG_CB710_DEBUG is not set
CONFIG_CB710_DEBUG_ASSUMPTIONS=y
CONFIG_SENSORS_LIS3_I2C=y
CONFIG_ALTERA_STAPL=y
CONFIG_INTEL_MEI=y
CONFIG_INTEL_MEI_ME=y
# CONFIG_INTEL_MEI_TXE is not set
# CONFIG_INTEL_MEI_VSC_HW is not set
# CONFIG_VMWARE_VMCI is not set
# CONFIG_GENWQE is not set
# CONFIG_ECHO is not set
# CONFIG_BCM_VK is not set
# CONFIG_MISC_ALCOR_PCI is not set
CONFIG_MISC_RTSX_PCI=y
CONFIG_MISC_RTSX_USB=y
CONFIG_UACCE=y
CONFIG_PVPANIC=y
# CONFIG_PVPANIC_MMIO is not set
# CONFIG_PVPANIC_PCI is not set
# CONFIG_GP_PCI1XXXX is not set
# CONFIG_KEBA_CP500 is not set
# end of Misc devices
#
# SCSI device support
#
CONFIG_SCSI_MOD=y
CONFIG_RAID_ATTRS=y
CONFIG_SCSI_COMMON=y
CONFIG_SCSI=y
CONFIG_SCSI_DMA=y
CONFIG_SCSI_NETLINK=y
CONFIG_SCSI_PROC_FS=y
#
# SCSI support type (disk, tape, CD-ROM)
#
CONFIG_BLK_DEV_SD=y
CONFIG_CHR_DEV_ST=y
CONFIG_BLK_DEV_SR=y
CONFIG_CHR_DEV_SG=y
CONFIG_BLK_DEV_BSG=y
CONFIG_CHR_DEV_SCH=y
# CONFIG_SCSI_ENCLOSURE is not set
CONFIG_SCSI_CONSTANTS=y
CONFIG_SCSI_LOGGING=y
CONFIG_SCSI_SCAN_ASYNC=y
#
# SCSI Transports
#
CONFIG_SCSI_SPI_ATTRS=y
CONFIG_SCSI_FC_ATTRS=y
CONFIG_SCSI_ISCSI_ATTRS=y
CONFIG_SCSI_SAS_ATTRS=y
CONFIG_SCSI_SAS_LIBSAS=y
CONFIG_SCSI_SAS_ATA=y
CONFIG_SCSI_SAS_HOST_SMP=y
CONFIG_SCSI_SRP_ATTRS=y
# end of SCSI Transports
CONFIG_SCSI_LOWLEVEL=y
CONFIG_ISCSI_TCP=y
CONFIG_ISCSI_BOOT_SYSFS=y
# CONFIG_SCSI_CXGB3_ISCSI is not set
CONFIG_SCSI_CXGB4_ISCSI=y
CONFIG_SCSI_BNX2_ISCSI=y
CONFIG_SCSI_BNX2X_FCOE=y
CONFIG_BE2ISCSI=y
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
CONFIG_SCSI_HPSA=y
# CONFIG_SCSI_3W_9XXX is not set
# CONFIG_SCSI_3W_SAS is not set
# CONFIG_SCSI_ACARD is not set
CONFIG_SCSI_AACRAID=y
# CONFIG_SCSI_AIC7XXX is not set
# CONFIG_SCSI_AIC79XX is not set
# CONFIG_SCSI_AIC94XX is not set
# CONFIG_SCSI_MVSAS is not set
# CONFIG_SCSI_MVUMI is not set
# CONFIG_SCSI_ADVANSYS is not set
# CONFIG_SCSI_ARCMSR is not set
# CONFIG_SCSI_ESAS2R is not set
# CONFIG_MEGARAID_NEWGEN is not set
# CONFIG_MEGARAID_LEGACY is not set
CONFIG_MEGARAID_SAS=y
CONFIG_SCSI_MPT3SAS=y
CONFIG_SCSI_MPT2SAS_MAX_SGE=128
CONFIG_SCSI_MPT3SAS_MAX_SGE=128
CONFIG_SCSI_MPT2SAS=y
# CONFIG_SCSI_MPI3MR is not set
CONFIG_SCSI_SMARTPQI=y
# CONFIG_SCSI_HPTIOP is not set
# CONFIG_SCSI_BUSLOGIC is not set
# CONFIG_SCSI_MYRB is not set
# CONFIG_SCSI_MYRS is not set
CONFIG_VMWARE_PVSCSI=y
# CONFIG_XEN_SCSI_FRONTEND is not set
CONFIG_HYPERV_STORAGE=y
CONFIG_LIBFC=y
CONFIG_LIBFCOE=y
CONFIG_FCOE=y
CONFIG_FCOE_FNIC=y
# CONFIG_SCSI_SNIC is not set
# CONFIG_SCSI_DMX3191D is not set
# CONFIG_SCSI_FDOMAIN_PCI is not set
# CONFIG_SCSI_ISCI is not set
# CONFIG_SCSI_IPS is not set
# CONFIG_SCSI_INITIO is not set
# CONFIG_SCSI_INIA100 is not set
# CONFIG_SCSI_PPA is not set
# CONFIG_SCSI_IMM is not set
# CONFIG_SCSI_STEX is not set
# CONFIG_SCSI_SYM53C8XX_2 is not set
# CONFIG_SCSI_IPR is not set
# CONFIG_SCSI_QLOGIC_1280 is not set
CONFIG_SCSI_QLA_FC=y
# CONFIG_TCM_QLA2XXX is not set
CONFIG_SCSI_QLA_ISCSI=y
CONFIG_QEDI=y
CONFIG_QEDF=y
CONFIG_SCSI_LPFC=y
# CONFIG_SCSI_LPFC_DEBUG_FS is not set
# CONFIG_SCSI_EFCT is not set
# CONFIG_SCSI_DC395x is not set
# CONFIG_SCSI_AM53C974 is not set
# CONFIG_SCSI_WD719X is not set
CONFIG_SCSI_DEBUG=y
# CONFIG_SCSI_PMCRAID is not set
# CONFIG_SCSI_PM8001 is not set
# CONFIG_SCSI_BFA_FC is not set
CONFIG_SCSI_VIRTIO=y
CONFIG_SCSI_CHELSIO_FCOE=y
CONFIG_SCSI_DH=y
CONFIG_SCSI_DH_RDAC=y
CONFIG_SCSI_DH_HP_SW=y
CONFIG_SCSI_DH_EMC=y
CONFIG_SCSI_DH_ALUA=y
# end of SCSI device support
CONFIG_ATA=y
CONFIG_SATA_HOST=y
CONFIG_PATA_TIMINGS=y
CONFIG_ATA_VERBOSE_ERROR=y
CONFIG_ATA_FORCE=y
CONFIG_ATA_ACPI=y
# CONFIG_SATA_ZPODD is not set
CONFIG_SATA_PMP=y
#
# Controllers with non-SFF native interface
#
CONFIG_SATA_AHCI=y
CONFIG_SATA_MOBILE_LPM_POLICY=0
CONFIG_SATA_AHCI_PLATFORM=y
# CONFIG_AHCI_DWC is not set
# CONFIG_SATA_INIC162X is not set
# CONFIG_SATA_ACARD_AHCI is not set
# CONFIG_SATA_SIL24 is not set
CONFIG_ATA_SFF=y
#
# SFF controllers with custom DMA interface
#
# CONFIG_PDC_ADMA is not set
# CONFIG_SATA_QSTOR is not set
# CONFIG_SATA_SX4 is not set
CONFIG_ATA_BMDMA=y
#
# SATA SFF controllers with BMDMA
#
CONFIG_ATA_PIIX=y
# CONFIG_SATA_DWC is not set
# CONFIG_SATA_MV is not set
# CONFIG_SATA_NV is not set
# CONFIG_SATA_PROMISE is not set
# CONFIG_SATA_SIL is not set
# CONFIG_SATA_SIS is not set
# CONFIG_SATA_SVW is not set
# CONFIG_SATA_ULI is not set
# CONFIG_SATA_VIA is not set
# CONFIG_SATA_VITESSE is not set
#
# PATA SFF controllers with BMDMA
#
# CONFIG_PATA_ALI is not set
# CONFIG_PATA_AMD is not set
# CONFIG_PATA_ARTOP is not set
# CONFIG_PATA_ATIIXP is not set
# CONFIG_PATA_ATP867X is not set
# CONFIG_PATA_CMD64X is not set
# CONFIG_PATA_CYPRESS is not set
# CONFIG_PATA_EFAR is not set
# CONFIG_PATA_HPT366 is not set
# CONFIG_PATA_HPT37X is not set
# CONFIG_PATA_HPT3X2N is not set
# CONFIG_PATA_HPT3X3 is not set
# CONFIG_PATA_IT8213 is not set
# CONFIG_PATA_IT821X is not set
# CONFIG_PATA_JMICRON is not set
# CONFIG_PATA_MARVELL is not set
# CONFIG_PATA_NETCELL is not set
# CONFIG_PATA_NINJA32 is not set
# CONFIG_PATA_NS87415 is not set
# CONFIG_PATA_OLDPIIX is not set
# CONFIG_PATA_OPTIDMA is not set
# CONFIG_PATA_PDC2027X is not set
# CONFIG_PATA_PDC_OLD is not set
# CONFIG_PATA_RADISYS is not set
# CONFIG_PATA_RDC is not set
# CONFIG_PATA_SCH is not set
# CONFIG_PATA_SERVERWORKS is not set
# CONFIG_PATA_SIL680 is not set
# CONFIG_PATA_SIS is not set
# CONFIG_PATA_TOSHIBA is not set
# CONFIG_PATA_TRIFLEX is not set
# CONFIG_PATA_VIA is not set
# CONFIG_PATA_WINBOND is not set
#
# PIO-only SFF controllers
#
# CONFIG_PATA_CMD640_PCI is not set
# CONFIG_PATA_MPIIX is not set
# CONFIG_PATA_NS87410 is not set
# CONFIG_PATA_OPTI is not set
# CONFIG_PATA_RZ1000 is not set
# CONFIG_PATA_PARPORT is not set
#
# Generic fallback / legacy drivers
#
# CONFIG_PATA_ACPI is not set
CONFIG_ATA_GENERIC=y
# CONFIG_PATA_LEGACY is not set
CONFIG_MD=y
CONFIG_BLK_DEV_MD=y
CONFIG_MD_AUTODETECT=y
CONFIG_MD_BITMAP_FILE=y
CONFIG_MD_LINEAR=y
CONFIG_MD_RAID0=y
CONFIG_MD_RAID1=y
CONFIG_MD_RAID10=y
CONFIG_MD_RAID456=y
CONFIG_BCACHE=y
# CONFIG_BCACHE_DEBUG is not set
# CONFIG_BCACHE_ASYNC_REGISTRATION is not set
CONFIG_BLK_DEV_DM_BUILTIN=y
CONFIG_BLK_DEV_DM=y
CONFIG_DM_DEBUG=y
CONFIG_DM_BUFIO=y
# CONFIG_DM_DEBUG_BLOCK_MANAGER_LOCKING is not set
CONFIG_DM_BIO_PRISON=y
CONFIG_DM_PERSISTENT_DATA=y
# CONFIG_DM_UNSTRIPED is not set
CONFIG_DM_CRYPT=y
CONFIG_DM_SNAPSHOT=y
CONFIG_DM_THIN_PROVISIONING=y
CONFIG_DM_CACHE=y
CONFIG_DM_CACHE_SMQ=y
CONFIG_DM_WRITECACHE=y
# CONFIG_DM_EBS is not set
CONFIG_DM_ERA=y
# CONFIG_DM_CLONE is not set
CONFIG_DM_MIRROR=y
CONFIG_DM_LOG_USERSPACE=y
CONFIG_DM_RAID=y
CONFIG_DM_ZERO=y
CONFIG_DM_MULTIPATH=y
CONFIG_DM_MULTIPATH_QL=y
CONFIG_DM_MULTIPATH_ST=y
# CONFIG_DM_MULTIPATH_HST is not set
# CONFIG_DM_MULTIPATH_IOA is not set
CONFIG_DM_DELAY=y
# CONFIG_DM_DUST is not set
# CONFIG_DM_INIT is not set
CONFIG_DM_UEVENT=y
CONFIG_DM_FLAKEY=y
CONFIG_DM_VERITY=y
# CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG is not set
# CONFIG_DM_VERITY_FEC is not set
CONFIG_DM_SWITCH=y
CONFIG_DM_LOG_WRITES=y
CONFIG_DM_INTEGRITY=y
# CONFIG_DM_ZONED is not set
CONFIG_DM_AUDIT=y
# CONFIG_DM_VDO is not set
CONFIG_TARGET_CORE=y
CONFIG_TCM_IBLOCK=y
CONFIG_TCM_FILEIO=y
CONFIG_TCM_PSCSI=y
CONFIG_TCM_USER2=y
CONFIG_LOOPBACK_TARGET=y
# CONFIG_TCM_FC is not set
CONFIG_ISCSI_TARGET=y
CONFIG_ISCSI_TARGET_CXGB4=y
# CONFIG_SBP_TARGET is not set
# CONFIG_REMOTE_TARGET is not set
CONFIG_FUSION=y
CONFIG_FUSION_SPI=y
# CONFIG_FUSION_FC is not set
CONFIG_FUSION_SAS=y
CONFIG_FUSION_MAX_SGE=128
CONFIG_FUSION_CTL=y
CONFIG_FUSION_LOGGING=y
#
# IEEE 1394 (FireWire) support
#
CONFIG_FIREWIRE=y
CONFIG_FIREWIRE_OHCI=y
CONFIG_FIREWIRE_SBP2=y
CONFIG_FIREWIRE_NET=y
# CONFIG_FIREWIRE_NOSY is not set
# end of IEEE 1394 (FireWire) support
CONFIG_MACINTOSH_DRIVERS=y
CONFIG_MAC_EMUMOUSEBTN=y
CONFIG_NETDEVICES=y
CONFIG_MII=y
CONFIG_NET_CORE=y
CONFIG_BONDING=y
CONFIG_DUMMY=y
# CONFIG_WIREGUARD is not set
# CONFIG_EQUALIZER is not set
CONFIG_NET_FC=y
CONFIG_IFB=y
# CONFIG_NET_TEAM is not set
CONFIG_MACVLAN=y
CONFIG_MACVTAP=y
CONFIG_IPVLAN_L3S=y
CONFIG_IPVLAN=y
CONFIG_IPVTAP=y
CONFIG_VXLAN=y
CONFIG_GENEVE=y
# CONFIG_BAREUDP is not set
# CONFIG_GTP is not set
# CONFIG_PFCP is not set
# CONFIG_AMT is not set
CONFIG_MACSEC=y
CONFIG_NETCONSOLE=y
CONFIG_NETCONSOLE_DYNAMIC=y
# CONFIG_NETCONSOLE_EXTENDED_LOG is not set
CONFIG_NETPOLL=y
CONFIG_NET_POLL_CONTROLLER=y
CONFIG_NTB_NETDEV=y
CONFIG_TUN=y
CONFIG_TAP=y
# CONFIG_TUN_VNET_CROSS_LE is not set
CONFIG_VETH=y
CONFIG_VIRTIO_NET=y
CONFIG_NLMON=y
# CONFIG_NETKIT is not set
CONFIG_NET_VRF=y
# CONFIG_ARCNET is not set
# CONFIG_ATM_DRIVERS is not set
CONFIG_ETHERNET=y
CONFIG_MDIO=y
# CONFIG_NET_VENDOR_3COM is not set
# CONFIG_NET_VENDOR_ADAPTEC is not set
# CONFIG_NET_VENDOR_AGERE is not set
# CONFIG_NET_VENDOR_ALACRITECH is not set
# CONFIG_NET_VENDOR_ALTEON is not set
# CONFIG_ALTERA_TSE is not set
CONFIG_NET_VENDOR_AMAZON=y
CONFIG_ENA_ETHERNET=y
CONFIG_NET_VENDOR_AMD=y
# CONFIG_AMD8111_ETH is not set
# CONFIG_PCNET32 is not set
CONFIG_AMD_XGBE=y
# CONFIG_AMD_XGBE_DCB is not set
CONFIG_AMD_XGBE_HAVE_ECC=y
# CONFIG_PDS_CORE is not set
CONFIG_NET_VENDOR_AQUANTIA=y
CONFIG_AQTION=y
# CONFIG_NET_VENDOR_ARC is not set
CONFIG_NET_VENDOR_ASIX=y
# CONFIG_SPI_AX88796C is not set
CONFIG_NET_VENDOR_ATHEROS=y
CONFIG_ATL2=y
CONFIG_ATL1=y
CONFIG_ATL1E=y
CONFIG_ATL1C=y
CONFIG_ALX=y
# CONFIG_CX_ECAT is not set
CONFIG_NET_VENDOR_BROADCOM=y
# CONFIG_B44 is not set
# CONFIG_BCMGENET is not set
CONFIG_BNX2=y
CONFIG_CNIC=y
CONFIG_TIGON3=y
CONFIG_TIGON3_HWMON=y
CONFIG_BNX2X=y
CONFIG_BNX2X_SRIOV=y
# CONFIG_SYSTEMPORT is not set
CONFIG_BNXT=y
CONFIG_BNXT_SRIOV=y
CONFIG_BNXT_FLOWER_OFFLOAD=y
CONFIG_BNXT_DCB=y
CONFIG_BNXT_HWMON=y
CONFIG_NET_VENDOR_CADENCE=y
# CONFIG_MACB is not set
CONFIG_NET_VENDOR_CAVIUM=y
# CONFIG_THUNDER_NIC_PF is not set
# CONFIG_THUNDER_NIC_VF is not set
# CONFIG_THUNDER_NIC_BGX is not set
# CONFIG_THUNDER_NIC_RGX is not set
CONFIG_CAVIUM_PTP=y
CONFIG_LIQUIDIO_CORE=y
CONFIG_LIQUIDIO=y
CONFIG_LIQUIDIO_VF=y
CONFIG_NET_VENDOR_CHELSIO=y
# CONFIG_CHELSIO_T1 is not set
# CONFIG_CHELSIO_T3 is not set
CONFIG_CHELSIO_T4=y
# CONFIG_CHELSIO_T4_DCB is not set
CONFIG_CHELSIO_T4VF=y
CONFIG_CHELSIO_LIB=y
CONFIG_CHELSIO_INLINE_CRYPTO=y
CONFIG_CHELSIO_IPSEC_INLINE=y
# CONFIG_CHELSIO_TLS_DEVICE is not set
CONFIG_NET_VENDOR_CISCO=y
CONFIG_ENIC=y
# CONFIG_NET_VENDOR_CORTINA is not set
CONFIG_NET_VENDOR_DAVICOM=y
# CONFIG_DM9051 is not set
CONFIG_DNET=y
CONFIG_NET_VENDOR_DEC=y
# CONFIG_NET_TULIP is not set
CONFIG_NET_VENDOR_DLINK=y
CONFIG_DL2K=y
CONFIG_NET_VENDOR_EMULEX=y
CONFIG_BE2NET=y
CONFIG_BE2NET_HWMON=y
# CONFIG_BE2NET_BE2 is not set
# CONFIG_BE2NET_BE3 is not set
CONFIG_BE2NET_LANCER=y
CONFIG_BE2NET_SKYHAWK=y
CONFIG_NET_VENDOR_ENGLEDER=y
# CONFIG_TSNEP is not set
# CONFIG_NET_VENDOR_EZCHIP is not set
CONFIG_NET_VENDOR_FUNGIBLE=y
# CONFIG_FUN_ETH is not set
CONFIG_NET_VENDOR_GOOGLE=y
# CONFIG_GVE is not set
CONFIG_NET_VENDOR_HISILICON=y
CONFIG_HIBMCGE=m
CONFIG_NET_VENDOR_HUAWEI=y
CONFIG_HINIC=y
# CONFIG_NET_VENDOR_I825XX is not set
CONFIG_NET_VENDOR_INTEL=y
CONFIG_LIBETH=y
CONFIG_LIBIE=y
# CONFIG_E100 is not set
CONFIG_E1000=y
CONFIG_E1000E=y
CONFIG_E1000E_HWTS=y
CONFIG_IGB=y
CONFIG_IGB_HWMON=y
CONFIG_IGB_DCA=y
CONFIG_IGBVF=y
CONFIG_IXGBE=y
CONFIG_IXGBE_HWMON=y
CONFIG_IXGBE_DCA=y
CONFIG_IXGBE_DCB=y
CONFIG_IXGBE_IPSEC=y
CONFIG_IXGBEVF=y
CONFIG_IXGBEVF_IPSEC=y
CONFIG_I40E=y
CONFIG_I40E_DCB=y
CONFIG_IAVF=y
CONFIG_I40EVF=y
CONFIG_ICE=y
CONFIG_ICE_HWMON=y
CONFIG_ICE_SWITCHDEV=y
CONFIG_FM10K=y
# CONFIG_IGC is not set
# CONFIG_IDPF is not set
# CONFIG_JME is not set
CONFIG_NET_VENDOR_ADI=y
# CONFIG_ADIN1110 is not set
CONFIG_NET_VENDOR_LITEX=y
# CONFIG_NET_VENDOR_MARVELL is not set
CONFIG_NET_VENDOR_MELLANOX=y
CONFIG_MLX4_EN=y
CONFIG_MLX4_EN_DCB=y
CONFIG_MLX4_CORE=y
CONFIG_MLX4_DEBUG=y
# CONFIG_MLX4_CORE_GEN2 is not set
CONFIG_MLX5_CORE=y
CONFIG_MLX5_FPGA=y
CONFIG_MLX5_CORE_EN=y
CONFIG_MLX5_EN_ARFS=y
CONFIG_MLX5_EN_RXNFC=y
CONFIG_MLX5_MPFS=y
CONFIG_MLX5_ESWITCH=y
CONFIG_MLX5_BRIDGE=y
CONFIG_MLX5_CORE_EN_DCB=y
CONFIG_MLX5_CORE_IPOIB=y
# CONFIG_MLX5_MACSEC is not set
# CONFIG_MLX5_EN_IPSEC is not set
# CONFIG_MLX5_EN_TLS is not set
CONFIG_MLX5_SW_STEERING=y
CONFIG_MLX5_HW_STEERING=y
# CONFIG_MLX5_SF is not set
# CONFIG_MLX5_DPLL is not set
CONFIG_MLXSW_CORE=y
CONFIG_MLXSW_CORE_HWMON=y
CONFIG_MLXSW_CORE_THERMAL=y
CONFIG_MLXSW_PCI=y
CONFIG_MLXSW_I2C=y
CONFIG_MLXSW_SPECTRUM=y
CONFIG_MLXSW_SPECTRUM_DCB=y
CONFIG_MLXSW_MINIMAL=y
CONFIG_MLXFW=y
CONFIG_NET_VENDOR_META=y
# CONFIG_FBNIC is not set
# CONFIG_NET_VENDOR_MICREL is not set
# CONFIG_NET_VENDOR_MICROCHIP is not set
# CONFIG_NET_VENDOR_MICROSEMI is not set
CONFIG_NET_VENDOR_MICROSOFT=y
# CONFIG_MICROSOFT_MANA is not set
CONFIG_NET_VENDOR_MYRI=y
CONFIG_MYRI10GE=y
CONFIG_MYRI10GE_DCA=y
# CONFIG_FEALNX is not set
# CONFIG_NET_VENDOR_NI is not set
# CONFIG_NET_VENDOR_NATSEMI is not set
CONFIG_NET_VENDOR_NETERION=y
# CONFIG_S2IO is not set
CONFIG_NET_VENDOR_NETRONOME=y
CONFIG_NFP=y
CONFIG_NFP_APP_FLOWER=y
CONFIG_NFP_APP_ABM_NIC=y
CONFIG_NFP_NET_IPSEC=y
# CONFIG_NFP_DEBUG is not set
# CONFIG_NET_VENDOR_NVIDIA is not set
CONFIG_NET_VENDOR_OKI=y
CONFIG_ETHOC=y
CONFIG_NET_VENDOR_PACKET_ENGINES=y
# CONFIG_HAMACHI is not set
# CONFIG_YELLOWFIN is not set
CONFIG_NET_VENDOR_PENSANDO=y
# CONFIG_IONIC is not set
CONFIG_NET_VENDOR_QLOGIC=y
CONFIG_QLA3XXX=y
# CONFIG_QLCNIC is not set
CONFIG_NETXEN_NIC=y
CONFIG_QED=y
CONFIG_QED_LL2=y
CONFIG_QED_SRIOV=y
CONFIG_QEDE=y
CONFIG_QED_ISCSI=y
CONFIG_QED_FCOE=y
CONFIG_QED_OOO=y
CONFIG_NET_VENDOR_BROCADE=y
# CONFIG_BNA is not set
# CONFIG_NET_VENDOR_QUALCOMM is not set
# CONFIG_NET_VENDOR_RDC is not set
CONFIG_NET_VENDOR_REALTEK=y
# CONFIG_ATP is not set
CONFIG_8139CP=y
CONFIG_8139TOO=y
# CONFIG_8139TOO_PIO is not set
# CONFIG_8139TOO_TUNE_TWISTER is not set
CONFIG_8139TOO_8129=y
# CONFIG_8139_OLD_RX_RESET is not set
CONFIG_R8169=y
# CONFIG_RTASE is not set
# CONFIG_NET_VENDOR_RENESAS is not set
CONFIG_NET_VENDOR_ROCKER=y
CONFIG_ROCKER=y
# CONFIG_NET_VENDOR_SAMSUNG is not set
# CONFIG_NET_VENDOR_SEEQ is not set
# CONFIG_NET_VENDOR_SILAN is not set
# CONFIG_NET_VENDOR_SIS is not set
CONFIG_NET_VENDOR_SOLARFLARE=y
CONFIG_SFC=y
CONFIG_SFC_MTD=y
CONFIG_SFC_MCDI_MON=y
CONFIG_SFC_SRIOV=y
CONFIG_SFC_MCDI_LOGGING=y
# CONFIG_SFC_FALCON is not set
# CONFIG_SFC_SIENA is not set
# CONFIG_NET_VENDOR_SMSC is not set
# CONFIG_NET_VENDOR_SOCIONEXT is not set
# CONFIG_NET_VENDOR_STMICRO is not set
# CONFIG_NET_VENDOR_SUN is not set
# CONFIG_NET_VENDOR_SYNOPSYS is not set
# CONFIG_NET_VENDOR_TEHUTI is not set
# CONFIG_NET_VENDOR_TI is not set
CONFIG_NET_VENDOR_VERTEXCOM=y
# CONFIG_MSE102X is not set
# CONFIG_NET_VENDOR_VIA is not set
CONFIG_NET_VENDOR_WANGXUN=y
CONFIG_LIBWX=y
CONFIG_NGBE=y
CONFIG_TXGBE=y
# CONFIG_NET_VENDOR_WIZNET is not set
# CONFIG_NET_VENDOR_XILINX is not set
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
CONFIG_PHYLINK=y
CONFIG_PHYLIB=y
CONFIG_SWPHY=y
CONFIG_LED_TRIGGER_PHY=y
CONFIG_FIXED_PHY=y
CONFIG_SFP=y
#
# MII PHY device drivers
#
# CONFIG_AIR_EN8811H_PHY is not set
CONFIG_AMD_PHY=y
# CONFIG_ADIN_PHY is not set
# CONFIG_ADIN1100_PHY is not set
CONFIG_AQUANTIA_PHY=y
CONFIG_AX88796B_PHY=y
CONFIG_BROADCOM_PHY=y
# CONFIG_BCM54140_PHY is not set
CONFIG_BCM7XXX_PHY=y
# CONFIG_BCM84881_PHY is not set
CONFIG_BCM87XX_PHY=y
CONFIG_BCM_NET_PHYLIB=y
CONFIG_BCM_NET_PHYPTP=y
CONFIG_CICADA_PHY=y
CONFIG_CORTINA_PHY=y
CONFIG_DAVICOM_PHY=y
CONFIG_ICPLUS_PHY=y
CONFIG_LXT_PHY=y
CONFIG_INTEL_XWAY_PHY=y
CONFIG_LSI_ET1011C_PHY=y
CONFIG_MARVELL_PHY=y
CONFIG_MARVELL_10G_PHY=y
# CONFIG_MARVELL_88Q2XXX_PHY is not set
# CONFIG_MARVELL_88X2222_PHY is not set
# CONFIG_MAXLINEAR_GPHY is not set
# CONFIG_MEDIATEK_GE_PHY is not set
CONFIG_MICREL_PHY=y
# CONFIG_MICROCHIP_T1S_PHY is not set
CONFIG_MICROCHIP_PHY=y
CONFIG_MICROCHIP_T1_PHY=y
CONFIG_MICROCHIP_PHY_RDS_PTP=y
CONFIG_MICROSEMI_PHY=y
CONFIG_MOTORCOMM_PHY=m
CONFIG_NATIONAL_PHY=y
# CONFIG_NXP_CBTX_PHY is not set
# CONFIG_NXP_C45_TJA11XX_PHY is not set
# CONFIG_NXP_TJA11XX_PHY is not set
# CONFIG_NCN26000_PHY is not set
# CONFIG_QCA83XX_PHY is not set
# CONFIG_QCA808X_PHY is not set
CONFIG_QSEMI_PHY=y
CONFIG_REALTEK_PHY=y
# CONFIG_REALTEK_PHY_HWMON is not set
CONFIG_RENESAS_PHY=y
CONFIG_ROCKCHIP_PHY=y
CONFIG_SMSC_PHY=y
CONFIG_STE10XP=y
CONFIG_TERANETICS_PHY=y
CONFIG_DP83822_PHY=y
CONFIG_DP83TC811_PHY=y
CONFIG_DP83848_PHY=y
CONFIG_DP83867_PHY=y
# CONFIG_DP83869_PHY is not set
# CONFIG_DP83TD510_PHY is not set
# CONFIG_DP83TG720_PHY is not set
CONFIG_VITESSE_PHY=y
CONFIG_XILINX_GMII2RGMII=y
CONFIG_MICREL_KS8995MA=y
CONFIG_CAN_DEV=y
CONFIG_CAN_VCAN=y
# CONFIG_CAN_VXCAN is not set
CONFIG_CAN_NETLINK=y
CONFIG_CAN_CALC_BITTIMING=y
# CONFIG_CAN_CAN327 is not set
# CONFIG_CAN_KVASER_PCIEFD is not set
CONFIG_CAN_SLCAN=y
CONFIG_CAN_C_CAN=y
CONFIG_CAN_C_CAN_PLATFORM=y
CONFIG_CAN_C_CAN_PCI=y
CONFIG_CAN_CC770=y
# CONFIG_CAN_CC770_ISA is not set
CONFIG_CAN_CC770_PLATFORM=y
# CONFIG_CAN_CTUCANFD_PCI is not set
# CONFIG_CAN_ESD_402_PCI is not set
# CONFIG_CAN_IFI_CANFD is not set
# CONFIG_CAN_M_CAN is not set
# CONFIG_CAN_PEAK_PCIEFD is not set
CONFIG_CAN_SJA1000=y
CONFIG_CAN_EMS_PCI=y
# CONFIG_CAN_F81601 is not set
CONFIG_CAN_KVASER_PCI=y
CONFIG_CAN_PEAK_PCI=y
CONFIG_CAN_PEAK_PCIEC=y
CONFIG_CAN_PLX_PCI=y
# CONFIG_CAN_SJA1000_ISA is not set
CONFIG_CAN_SJA1000_PLATFORM=y
CONFIG_CAN_SOFTING=y
#
# CAN SPI interfaces
#
# CONFIG_CAN_HI311X is not set
# CONFIG_CAN_MCP251X is not set
# CONFIG_CAN_MCP251XFD is not set
# end of CAN SPI interfaces
#
# CAN USB interfaces
#
CONFIG_CAN_8DEV_USB=y
CONFIG_CAN_EMS_USB=y
# CONFIG_CAN_ESD_USB is not set
# CONFIG_CAN_ETAS_ES58X is not set
# CONFIG_CAN_F81604 is not set
# CONFIG_CAN_GS_USB is not set
CONFIG_CAN_KVASER_USB=y
# CONFIG_CAN_MCBA_USB is not set
CONFIG_CAN_PEAK_USB=y
# CONFIG_CAN_UCAN is not set
# end of CAN USB interfaces
# CONFIG_CAN_DEBUG_DEVICES is not set
CONFIG_MDIO_DEVICE=y
CONFIG_MDIO_BUS=y
CONFIG_FWNODE_MDIO=y
CONFIG_ACPI_MDIO=y
CONFIG_MDIO_DEVRES=y
CONFIG_MDIO_BITBANG=y
# CONFIG_MDIO_BCM_UNIMAC is not set
CONFIG_MDIO_CAVIUM=y
# CONFIG_MDIO_GPIO is not set
CONFIG_MDIO_I2C=y
# CONFIG_MDIO_MVUSB is not set
CONFIG_MDIO_THUNDER=y
#
# MDIO Multiplexers
#
#
# PCS device drivers
#
CONFIG_PCS_XPCS=y
# end of PCS device drivers
# CONFIG_PLIP is not set
CONFIG_PPP=y
CONFIG_PPP_BSDCOMP=y
CONFIG_PPP_DEFLATE=y
CONFIG_PPP_FILTER=y
CONFIG_PPP_MPPE=y
CONFIG_PPP_MULTILINK=y
CONFIG_PPPOATM=y
CONFIG_PPPOE=y
# CONFIG_PPPOE_HASH_BITS_1 is not set
# CONFIG_PPPOE_HASH_BITS_2 is not set
CONFIG_PPPOE_HASH_BITS_4=y
# CONFIG_PPPOE_HASH_BITS_8 is not set
CONFIG_PPPOE_HASH_BITS=4
CONFIG_PPTP=y
CONFIG_PPPOL2TP=y
CONFIG_PPP_ASYNC=y
CONFIG_PPP_SYNC_TTY=y
CONFIG_SLIP=y
CONFIG_SLHC=y
CONFIG_SLIP_COMPRESSED=y
CONFIG_SLIP_SMART=y
# CONFIG_SLIP_MODE_SLIP6 is not set
CONFIG_USB_NET_DRIVERS=y
CONFIG_USB_CATC=y
CONFIG_USB_KAWETH=y
CONFIG_USB_PEGASUS=y
CONFIG_USB_RTL8150=y
CONFIG_USB_RTL8152=y
CONFIG_USB_LAN78XX=y
CONFIG_USB_USBNET=y
CONFIG_USB_NET_AX8817X=y
CONFIG_USB_NET_AX88179_178A=y
CONFIG_USB_NET_CDCETHER=y
CONFIG_USB_NET_CDC_EEM=y
CONFIG_USB_NET_CDC_NCM=y
CONFIG_USB_NET_HUAWEI_CDC_NCM=y
CONFIG_USB_NET_CDC_MBIM=y
CONFIG_USB_NET_DM9601=y
# CONFIG_USB_NET_SR9700 is not set
# CONFIG_USB_NET_SR9800 is not set
CONFIG_USB_NET_SMSC75XX=y
CONFIG_USB_NET_SMSC95XX=y
CONFIG_USB_NET_GL620A=y
CONFIG_USB_NET_NET1080=y
CONFIG_USB_NET_PLUSB=y
CONFIG_USB_NET_MCS7830=y
CONFIG_USB_NET_RNDIS_HOST=y
CONFIG_USB_NET_CDC_SUBSET_ENABLE=y
CONFIG_USB_NET_CDC_SUBSET=y
CONFIG_USB_ALI_M5632=y
CONFIG_USB_AN2720=y
CONFIG_USB_BELKIN=y
CONFIG_USB_ARMLINUX=y
CONFIG_USB_EPSON2888=y
CONFIG_USB_KC2190=y
CONFIG_USB_NET_ZAURUS=y
CONFIG_USB_NET_CX82310_ETH=y
CONFIG_USB_NET_KALMIA=y
CONFIG_USB_NET_QMI_WWAN=y
CONFIG_USB_HSO=y
CONFIG_USB_NET_INT51X1=y
CONFIG_USB_IPHETH=y
CONFIG_USB_SIERRA_NET=y
CONFIG_USB_VL600=y
CONFIG_USB_NET_CH9200=y
# CONFIG_USB_NET_AQC111 is not set
CONFIG_USB_RTL8153_ECM=y
# CONFIG_WLAN is not set
CONFIG_WAN=y
CONFIG_HDLC=y
CONFIG_HDLC_RAW=y
# CONFIG_HDLC_RAW_ETH is not set
CONFIG_HDLC_CISCO=y
CONFIG_HDLC_FR=y
CONFIG_HDLC_PPP=y
#
# X.25/LAPB support is disabled
#
# CONFIG_FRAMER is not set
# CONFIG_PCI200SYN is not set
# CONFIG_WANXL is not set
# CONFIG_PC300TOO is not set
# CONFIG_FARSYNC is not set
#
# Wireless WAN
#
# CONFIG_WWAN is not set
# end of Wireless WAN
CONFIG_XEN_NETDEV_FRONTEND=y
CONFIG_VMXNET3=y
CONFIG_FUJITSU_ES=y
CONFIG_USB4_NET=y
CONFIG_HYPERV_NET=y
CONFIG_NETDEVSIM=y
CONFIG_NET_FAILOVER=y
CONFIG_ISDN=y
CONFIG_MISDN=y
CONFIG_MISDN_DSP=y
CONFIG_MISDN_L1OIP=y
#
# mISDN hardware drivers
#
CONFIG_MISDN_HFCPCI=y
CONFIG_MISDN_HFCMULTI=y
CONFIG_MISDN_HFCUSB=y
CONFIG_MISDN_AVMFRITZ=y
CONFIG_MISDN_SPEEDFAX=y
CONFIG_MISDN_INFINEON=y
CONFIG_MISDN_W6692=y
CONFIG_MISDN_NETJET=y
CONFIG_MISDN_HDLC=y
CONFIG_MISDN_IPAC=y
CONFIG_MISDN_ISAR=y
#
# Input device support
#
CONFIG_INPUT=y
CONFIG_INPUT_LEDS=y
CONFIG_INPUT_FF_MEMLESS=y
CONFIG_INPUT_SPARSEKMAP=y
# CONFIG_INPUT_MATRIXKMAP is not set
CONFIG_INPUT_VIVALDIFMAP=y
#
# Userland interfaces
#
CONFIG_INPUT_MOUSEDEV=y
# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
CONFIG_INPUT_JOYDEV=y
CONFIG_INPUT_EVDEV=y
#
# Input Device Drivers
#
CONFIG_INPUT_KEYBOARD=y
# CONFIG_KEYBOARD_ADC is not set
# CONFIG_KEYBOARD_ADP5588 is not set
# CONFIG_KEYBOARD_ADP5589 is not set
# CONFIG_KEYBOARD_APPLESPI is not set
CONFIG_KEYBOARD_ATKBD=y
# CONFIG_KEYBOARD_QT1050 is not set
# CONFIG_KEYBOARD_QT1070 is not set
# CONFIG_KEYBOARD_QT2160 is not set
# CONFIG_KEYBOARD_DLINK_DIR685 is not set
# CONFIG_KEYBOARD_LKKBD is not set
# CONFIG_KEYBOARD_GPIO is not set
# CONFIG_KEYBOARD_GPIO_POLLED is not set
# CONFIG_KEYBOARD_TCA6416 is not set
# CONFIG_KEYBOARD_TCA8418 is not set
# CONFIG_KEYBOARD_MATRIX is not set
# CONFIG_KEYBOARD_LM8323 is not set
# CONFIG_KEYBOARD_LM8333 is not set
# CONFIG_KEYBOARD_MAX7359 is not set
# CONFIG_KEYBOARD_MPR121 is not set
# CONFIG_KEYBOARD_NEWTON is not set
# CONFIG_KEYBOARD_OPENCORES is not set
# CONFIG_KEYBOARD_SAMSUNG is not set
# CONFIG_KEYBOARD_STOWAWAY is not set
# CONFIG_KEYBOARD_SUNKBD is not set
# CONFIG_KEYBOARD_TM2_TOUCHKEY is not set
# CONFIG_KEYBOARD_XTKBD is not set
# CONFIG_KEYBOARD_CYPRESS_SF is not set
CONFIG_INPUT_MOUSE=y
CONFIG_MOUSE_PS2=y
CONFIG_MOUSE_PS2_ALPS=y
CONFIG_MOUSE_PS2_BYD=y
CONFIG_MOUSE_PS2_LOGIPS2PP=y
CONFIG_MOUSE_PS2_SYNAPTICS=y
CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS=y
CONFIG_MOUSE_PS2_CYPRESS=y
CONFIG_MOUSE_PS2_LIFEBOOK=y
CONFIG_MOUSE_PS2_TRACKPOINT=y
CONFIG_MOUSE_PS2_ELANTECH=y
CONFIG_MOUSE_PS2_ELANTECH_SMBUS=y
CONFIG_MOUSE_PS2_SENTELIC=y
# CONFIG_MOUSE_PS2_TOUCHKIT is not set
CONFIG_MOUSE_PS2_FOCALTECH=y
CONFIG_MOUSE_PS2_VMMOUSE=y
CONFIG_MOUSE_PS2_SMBUS=y
CONFIG_MOUSE_SERIAL=y
CONFIG_MOUSE_APPLETOUCH=y
CONFIG_MOUSE_BCM5974=y
CONFIG_MOUSE_CYAPA=y
CONFIG_MOUSE_ELAN_I2C=y
CONFIG_MOUSE_ELAN_I2C_I2C=y
CONFIG_MOUSE_ELAN_I2C_SMBUS=y
CONFIG_MOUSE_VSXXXAA=y
# CONFIG_MOUSE_GPIO is not set
CONFIG_MOUSE_SYNAPTICS_I2C=y
CONFIG_MOUSE_SYNAPTICS_USB=y
# CONFIG_INPUT_JOYSTICK is not set
CONFIG_INPUT_TABLET=y
CONFIG_TABLET_USB_ACECAD=y
CONFIG_TABLET_USB_AIPTEK=y
# CONFIG_TABLET_USB_HANWANG is not set
CONFIG_TABLET_USB_KBTAB=y
# CONFIG_TABLET_USB_PEGASUS is not set
CONFIG_TABLET_SERIAL_WACOM4=y
CONFIG_INPUT_TOUCHSCREEN=y
# CONFIG_TOUCHSCREEN_ADS7846 is not set
# CONFIG_TOUCHSCREEN_AD7877 is not set
# CONFIG_TOUCHSCREEN_AD7879 is not set
# CONFIG_TOUCHSCREEN_ADC is not set
# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set
# CONFIG_TOUCHSCREEN_AUO_PIXCIR is not set
# CONFIG_TOUCHSCREEN_BU21013 is not set
# CONFIG_TOUCHSCREEN_BU21029 is not set
# CONFIG_TOUCHSCREEN_CHIPONE_ICN8505 is not set
# CONFIG_TOUCHSCREEN_CY8CTMA140 is not set
# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set
# CONFIG_TOUCHSCREEN_CYTTSP_CORE is not set
# CONFIG_TOUCHSCREEN_CYTTSP5 is not set
# CONFIG_TOUCHSCREEN_DYNAPRO is not set
# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set
# CONFIG_TOUCHSCREEN_EETI is not set
# CONFIG_TOUCHSCREEN_EGALAX_SERIAL is not set
# CONFIG_TOUCHSCREEN_EXC3000 is not set
# CONFIG_TOUCHSCREEN_FUJITSU is not set
# CONFIG_TOUCHSCREEN_GOODIX is not set
# CONFIG_TOUCHSCREEN_GOODIX_BERLIN_I2C is not set
# CONFIG_TOUCHSCREEN_GOODIX_BERLIN_SPI is not set
# CONFIG_TOUCHSCREEN_HIDEEP is not set
# CONFIG_TOUCHSCREEN_HYCON_HY46XX is not set
# CONFIG_TOUCHSCREEN_HYNITRON_CSTXXX is not set
# CONFIG_TOUCHSCREEN_ILI210X is not set
# CONFIG_TOUCHSCREEN_ILITEK is not set
# CONFIG_TOUCHSCREEN_S6SY761 is not set
# CONFIG_TOUCHSCREEN_GUNZE is not set
# CONFIG_TOUCHSCREEN_EKTF2127 is not set
# CONFIG_TOUCHSCREEN_ELAN is not set
CONFIG_TOUCHSCREEN_ELO=y
CONFIG_TOUCHSCREEN_WACOM_W8001=y
CONFIG_TOUCHSCREEN_WACOM_I2C=y
# CONFIG_TOUCHSCREEN_MAX11801 is not set
# CONFIG_TOUCHSCREEN_MMS114 is not set
# CONFIG_TOUCHSCREEN_MELFAS_MIP4 is not set
# CONFIG_TOUCHSCREEN_MSG2638 is not set
# CONFIG_TOUCHSCREEN_MTOUCH is not set
# CONFIG_TOUCHSCREEN_NOVATEK_NVT_TS is not set
# CONFIG_TOUCHSCREEN_IMAGIS is not set
# CONFIG_TOUCHSCREEN_INEXIO is not set
# CONFIG_TOUCHSCREEN_PENMOUNT is not set
# CONFIG_TOUCHSCREEN_EDT_FT5X06 is not set
# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
# CONFIG_TOUCHSCREEN_PIXCIR is not set
# CONFIG_TOUCHSCREEN_WDT87XX_I2C is not set
# CONFIG_TOUCHSCREEN_WM97XX is not set
# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
# CONFIG_TOUCHSCREEN_TSC_SERIO is not set
# CONFIG_TOUCHSCREEN_TSC2004 is not set
# CONFIG_TOUCHSCREEN_TSC2005 is not set
# CONFIG_TOUCHSCREEN_TSC2007 is not set
# CONFIG_TOUCHSCREEN_RM_TS is not set
# CONFIG_TOUCHSCREEN_SILEAD is not set
# CONFIG_TOUCHSCREEN_SIS_I2C is not set
# CONFIG_TOUCHSCREEN_ST1232 is not set
# CONFIG_TOUCHSCREEN_STMFTS is not set
# CONFIG_TOUCHSCREEN_SUR40 is not set
# CONFIG_TOUCHSCREEN_SURFACE3_SPI is not set
# CONFIG_TOUCHSCREEN_SX8654 is not set
# CONFIG_TOUCHSCREEN_TPS6507X is not set
# CONFIG_TOUCHSCREEN_ZET6223 is not set
# CONFIG_TOUCHSCREEN_ZFORCE is not set
# CONFIG_TOUCHSCREEN_COLIBRI_VF50 is not set
# CONFIG_TOUCHSCREEN_ROHM_BU21023 is not set
# CONFIG_TOUCHSCREEN_IQS5XX is not set
# CONFIG_TOUCHSCREEN_IQS7211 is not set
# CONFIG_TOUCHSCREEN_ZINITIX is not set
# CONFIG_TOUCHSCREEN_HIMAX_HX83112B is not set
CONFIG_INPUT_MISC=y
# CONFIG_INPUT_AD714X is not set
# CONFIG_INPUT_BMA150 is not set
# CONFIG_INPUT_E3X0_BUTTON is not set
CONFIG_INPUT_PCSPKR=y
# CONFIG_INPUT_MMA8450 is not set
CONFIG_INPUT_APANEL=y
# CONFIG_INPUT_GPIO_BEEPER is not set
# CONFIG_INPUT_GPIO_DECODER is not set
# CONFIG_INPUT_GPIO_VIBRA is not set
CONFIG_INPUT_ATLAS_BTNS=y
CONFIG_INPUT_ATI_REMOTE2=y
CONFIG_INPUT_KEYSPAN_REMOTE=y
# CONFIG_INPUT_KXTJ9 is not set
CONFIG_INPUT_POWERMATE=y
CONFIG_INPUT_YEALINK=y
CONFIG_INPUT_CM109=y
CONFIG_INPUT_UINPUT=y
# CONFIG_INPUT_PCF8574 is not set
# CONFIG_INPUT_PWM_BEEPER is not set
# CONFIG_INPUT_PWM_VIBRA is not set
CONFIG_INPUT_GPIO_ROTARY_ENCODER=y
# CONFIG_INPUT_DA7280_HAPTICS is not set
# CONFIG_INPUT_ADXL34X is not set
# CONFIG_INPUT_IMS_PCU is not set
# CONFIG_INPUT_IQS269A is not set
# CONFIG_INPUT_IQS626A is not set
# CONFIG_INPUT_IQS7222 is not set
# CONFIG_INPUT_CMA3000 is not set
CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y
# CONFIG_INPUT_IDEAPAD_SLIDEBAR is not set
# CONFIG_INPUT_DRV260X_HAPTICS is not set
# CONFIG_INPUT_DRV2665_HAPTICS is not set
# CONFIG_INPUT_DRV2667_HAPTICS is not set
CONFIG_RMI4_CORE=y
CONFIG_RMI4_I2C=y
CONFIG_RMI4_SPI=y
CONFIG_RMI4_SMB=y
CONFIG_RMI4_F03=y
CONFIG_RMI4_F03_SERIO=y
CONFIG_RMI4_2D_SENSOR=y
CONFIG_RMI4_F11=y
CONFIG_RMI4_F12=y
CONFIG_RMI4_F30=y
CONFIG_RMI4_F34=y
CONFIG_RMI4_F3A=y
# CONFIG_RMI4_F54 is not set
CONFIG_RMI4_F55=y
#
# Hardware I/O ports
#
CONFIG_SERIO=y
CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y
CONFIG_SERIO_I8042=y
CONFIG_SERIO_SERPORT=y
# CONFIG_SERIO_CT82C710 is not set
# CONFIG_SERIO_PARKBD is not set
# CONFIG_SERIO_PCIPS2 is not set
CONFIG_SERIO_LIBPS2=y
CONFIG_SERIO_RAW=y
CONFIG_SERIO_ALTERA_PS2=y
# CONFIG_SERIO_PS2MULT is not set
CONFIG_SERIO_ARC_PS2=y
CONFIG_HYPERV_KEYBOARD=y
# CONFIG_SERIO_GPIO_PS2 is not set
# CONFIG_USERIO is not set
# CONFIG_GAMEPORT is not set
# end of Hardware I/O ports
# end of Input device support
#
# Character devices
#
CONFIG_TTY=y
CONFIG_VT=y
CONFIG_CONSOLE_TRANSLATIONS=y
CONFIG_VT_CONSOLE=y
CONFIG_VT_CONSOLE_SLEEP=y
CONFIG_VT_HW_CONSOLE_BINDING=y
CONFIG_UNIX98_PTYS=y
# CONFIG_LEGACY_PTYS is not set
CONFIG_LEGACY_TIOCSTI=y
CONFIG_LDISC_AUTOLOAD=y
#
# Serial drivers
#
CONFIG_SERIAL_EARLYCON=y
CONFIG_SERIAL_8250=y
# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set
CONFIG_SERIAL_8250_PNP=y
# CONFIG_SERIAL_8250_16550A_VARIANTS is not set
# CONFIG_SERIAL_8250_FINTEK is not set
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_DMA=y
CONFIG_SERIAL_8250_PCILIB=y
CONFIG_SERIAL_8250_PCI=y
CONFIG_SERIAL_8250_EXAR=y
CONFIG_SERIAL_8250_NR_UARTS=32
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
CONFIG_SERIAL_8250_EXTENDED=y
CONFIG_SERIAL_8250_MANY_PORTS=y
# CONFIG_SERIAL_8250_PCI1XXXX is not set
CONFIG_SERIAL_8250_SHARE_IRQ=y
# CONFIG_SERIAL_8250_DETECT_IRQ is not set
CONFIG_SERIAL_8250_RSA=y
CONFIG_SERIAL_8250_DWLIB=y
CONFIG_SERIAL_8250_DW=y
# CONFIG_SERIAL_8250_RT288X is not set
CONFIG_SERIAL_8250_LPSS=y
CONFIG_SERIAL_8250_MID=y
CONFIG_SERIAL_8250_PERICOM=y
# CONFIG_SERIAL_8250_NI is not set
#
# Non-8250 serial port support
#
# CONFIG_SERIAL_MAX3100 is not set
# CONFIG_SERIAL_MAX310X is not set
# CONFIG_SERIAL_UARTLITE is not set
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_CONSOLE_POLL=y
CONFIG_SERIAL_JSM=y
# CONFIG_SERIAL_LANTIQ is not set
# CONFIG_SERIAL_SCCNXP is not set
# CONFIG_SERIAL_SC16IS7XX is not set
# CONFIG_SERIAL_ALTERA_JTAGUART is not set
# CONFIG_SERIAL_ALTERA_UART is not set
CONFIG_SERIAL_ARC=y
# CONFIG_SERIAL_ARC_CONSOLE is not set
CONFIG_SERIAL_ARC_NR_PORTS=1
# CONFIG_SERIAL_RP2 is not set
# CONFIG_SERIAL_FSL_LPUART is not set
# CONFIG_SERIAL_FSL_LINFLEXUART is not set
# CONFIG_SERIAL_SPRD is not set
# end of Serial drivers
CONFIG_SERIAL_MCTRL_GPIO=y
CONFIG_SERIAL_NONSTANDARD=y
# CONFIG_MOXA_INTELLIO is not set
# CONFIG_MOXA_SMARTIO is not set
CONFIG_N_HDLC=y
CONFIG_N_GSM=y
CONFIG_NOZOMI=y
# CONFIG_NULL_TTY is not set
CONFIG_HVC_DRIVER=y
CONFIG_HVC_IRQ=y
CONFIG_HVC_XEN=y
CONFIG_HVC_XEN_FRONTEND=y
# CONFIG_SERIAL_DEV_BUS is not set
CONFIG_PRINTER=y
# CONFIG_LP_CONSOLE is not set
CONFIG_PPDEV=y
CONFIG_VIRTIO_CONSOLE=y
CONFIG_IPMI_HANDLER=y
CONFIG_IPMI_DMI_DECODE=y
CONFIG_IPMI_PLAT_DATA=y
CONFIG_IPMI_PANIC_EVENT=y
CONFIG_IPMI_PANIC_STRING=y
CONFIG_IPMI_DEVICE_INTERFACE=y
CONFIG_IPMI_SI=y
CONFIG_IPMI_SSIF=y
CONFIG_IPMI_WATCHDOG=y
CONFIG_IPMI_POWEROFF=y
CONFIG_HW_RANDOM=y
CONFIG_HW_RANDOM_TIMERIOMEM=y
CONFIG_HW_RANDOM_INTEL=y
CONFIG_HW_RANDOM_AMD=y
# CONFIG_HW_RANDOM_BA431 is not set
CONFIG_HW_RANDOM_VIA=y
CONFIG_HW_RANDOM_VIRTIO=y
# CONFIG_HW_RANDOM_XIPHERA is not set
# CONFIG_APPLICOM is not set
# CONFIG_MWAVE is not set
CONFIG_DEVMEM=y
CONFIG_NVRAM=y
CONFIG_DEVPORT=y
CONFIG_HPET=y
CONFIG_HPET_MMAP=y
# CONFIG_HPET_MMAP_DEFAULT is not set
CONFIG_HANGCHECK_TIMER=y
CONFIG_UV_MMTIMER=y
CONFIG_TCG_TPM=y
CONFIG_TCG_TPM2_HMAC=y
CONFIG_HW_RANDOM_TPM=y
CONFIG_TCG_TIS_CORE=y
CONFIG_TCG_TIS=y
CONFIG_TCG_TIS_SPI=y
# CONFIG_TCG_TIS_SPI_CR50 is not set
# CONFIG_TCG_TIS_I2C is not set
# CONFIG_TCG_TIS_I2C_CR50 is not set
CONFIG_TCG_TIS_I2C_ATMEL=y
CONFIG_TCG_TIS_I2C_INFINEON=y
CONFIG_TCG_TIS_I2C_NUVOTON=y
CONFIG_TCG_NSC=y
CONFIG_TCG_ATMEL=y
CONFIG_TCG_INFINEON=y
# CONFIG_TCG_XEN is not set
CONFIG_TCG_CRB=y
# CONFIG_TCG_VTPM_PROXY is not set
CONFIG_TCG_TIS_ST33ZP24=y
CONFIG_TCG_TIS_ST33ZP24_I2C=y
CONFIG_TCG_TIS_ST33ZP24_SPI=y
CONFIG_TELCLOCK=y
# CONFIG_XILLYBUS is not set
# CONFIG_XILLYUSB is not set
# end of Character devices
#
# I2C support
#
CONFIG_I2C=y
CONFIG_ACPI_I2C_OPREGION=y
CONFIG_I2C_BOARDINFO=y
CONFIG_I2C_CHARDEV=y
CONFIG_I2C_MUX=y
#
# Multiplexer I2C Chip support
#
# CONFIG_I2C_MUX_GPIO is not set
# CONFIG_I2C_MUX_LTC4306 is not set
# CONFIG_I2C_MUX_PCA9541 is not set
# CONFIG_I2C_MUX_PCA954x is not set
# CONFIG_I2C_MUX_REG is not set
CONFIG_I2C_MUX_MLXCPLD=y
# end of Multiplexer I2C Chip support
CONFIG_I2C_HELPER_AUTO=y
CONFIG_I2C_SMBUS=y
CONFIG_I2C_ALGOBIT=y
CONFIG_I2C_ALGOPCA=y
#
# I2C Hardware Bus support
#
#
# PC SMBus host controller drivers
#
# CONFIG_I2C_ALI1535 is not set
# CONFIG_I2C_ALI1563 is not set
# CONFIG_I2C_ALI15X3 is not set
CONFIG_I2C_AMD756=y
CONFIG_I2C_AMD8111=y
# CONFIG_I2C_AMD_MP2 is not set
# CONFIG_I2C_AMD_ASF is not set
CONFIG_I2C_I801=y
CONFIG_I2C_ISCH=y
CONFIG_I2C_ISMT=y
CONFIG_I2C_PIIX4=y
CONFIG_I2C_NFORCE2=y
# CONFIG_I2C_NVIDIA_GPU is not set
# CONFIG_I2C_SIS5595 is not set
# CONFIG_I2C_SIS630 is not set
CONFIG_I2C_SIS96X=y
CONFIG_I2C_VIA=y
CONFIG_I2C_VIAPRO=y
CONFIG_I2C_ZHAOXIN=y
#
# ACPI drivers
#
CONFIG_I2C_SCMI=y
#
# I2C system bus drivers (mostly embedded / system-on-chip)
#
# CONFIG_I2C_CBUS_GPIO is not set
CONFIG_I2C_DESIGNWARE_CORE=y
# CONFIG_I2C_DESIGNWARE_SLAVE is not set
CONFIG_I2C_DESIGNWARE_PLATFORM=y
# CONFIG_I2C_DESIGNWARE_AMDPSP is not set
CONFIG_I2C_DESIGNWARE_BAYTRAIL=y
# CONFIG_I2C_DESIGNWARE_PCI is not set
# CONFIG_I2C_EMEV2 is not set
# CONFIG_I2C_GPIO is not set
# CONFIG_I2C_OCORES is not set
CONFIG_I2C_PCA_PLATFORM=y
CONFIG_I2C_SIMTEC=y
# CONFIG_I2C_XILINX is not set
#
# External I2C/SMBus adapter drivers
#
CONFIG_I2C_DIOLAN_U2C=y
# CONFIG_I2C_CP2615 is not set
CONFIG_I2C_PARPORT=y
# CONFIG_I2C_PCI1XXXX is not set
# CONFIG_I2C_ROBOTFUZZ_OSIF is not set
# CONFIG_I2C_TAOS_EVM is not set
CONFIG_I2C_TINY_USB=y
CONFIG_I2C_VIPERBOARD=y
#
# Other I2C/SMBus bus drivers
#
CONFIG_I2C_MLXCPLD=y
# CONFIG_I2C_VIRTIO is not set
# end of I2C Hardware Bus support
CONFIG_I2C_STUB=m
# CONFIG_I2C_SLAVE is not set
# CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DEBUG_ALGO is not set
# CONFIG_I2C_DEBUG_BUS is not set
# end of I2C support
# CONFIG_I3C is not set
CONFIG_SPI=y
# CONFIG_SPI_DEBUG is not set
CONFIG_SPI_MASTER=y
CONFIG_SPI_MEM=y
#
# SPI Master Controller Drivers
#
# CONFIG_SPI_ALTERA is not set
# CONFIG_SPI_AXI_SPI_ENGINE is not set
# CONFIG_SPI_BITBANG is not set
# CONFIG_SPI_BUTTERFLY is not set
# CONFIG_SPI_CADENCE is not set
# CONFIG_SPI_CH341 is not set
# CONFIG_SPI_DESIGNWARE is not set
# CONFIG_SPI_GPIO is not set
# CONFIG_SPI_INTEL_PCI is not set
# CONFIG_SPI_INTEL_PLATFORM is not set
# CONFIG_SPI_LM70_LLP is not set
# CONFIG_SPI_MICROCHIP_CORE is not set
# CONFIG_SPI_MICROCHIP_CORE_QSPI is not set
# CONFIG_SPI_LANTIQ_SSC is not set
# CONFIG_SPI_OC_TINY is not set
# CONFIG_SPI_PCI1XXXX is not set
# CONFIG_SPI_PXA2XX is not set
# CONFIG_SPI_SC18IS602 is not set
# CONFIG_SPI_SIFIVE is not set
# CONFIG_SPI_MXIC is not set
# CONFIG_SPI_XCOMM is not set
# CONFIG_SPI_XILINX is not set
# CONFIG_SPI_ZYNQMP_GQSPI is not set
# CONFIG_SPI_AMD is not set
#
# SPI Multiplexer support
#
# CONFIG_SPI_MUX is not set
#
# SPI Protocol Masters
#
# CONFIG_SPI_SPIDEV is not set
# CONFIG_SPI_LOOPBACK_TEST is not set
# CONFIG_SPI_TLE62X0 is not set
# CONFIG_SPI_SLAVE is not set
CONFIG_SPI_DYNAMIC=y
# CONFIG_SPMI is not set
# CONFIG_HSI is not set
CONFIG_PPS=y
# CONFIG_PPS_DEBUG is not set
#
# PPS clients support
#
# CONFIG_PPS_CLIENT_KTIMER is not set
CONFIG_PPS_CLIENT_LDISC=y
CONFIG_PPS_CLIENT_PARPORT=y
CONFIG_PPS_CLIENT_GPIO=y
# CONFIG_PPS_GENERATOR is not set
#
# PTP clock support
#
CONFIG_PTP_1588_CLOCK=y
CONFIG_PTP_1588_CLOCK_OPTIONAL=y
CONFIG_DP83640_PHY=y
# CONFIG_PTP_1588_CLOCK_INES is not set
CONFIG_PTP_1588_CLOCK_KVM=y
CONFIG_PTP_1588_CLOCK_VMCLOCK=y
# CONFIG_PTP_1588_CLOCK_IDT82P33 is not set
# CONFIG_PTP_1588_CLOCK_IDTCM is not set
# CONFIG_PTP_1588_CLOCK_FC3W is not set
# CONFIG_PTP_1588_CLOCK_MOCK is not set
# CONFIG_PTP_1588_CLOCK_VMW is not set
# CONFIG_PTP_1588_CLOCK_OCP is not set
# end of PTP clock support
CONFIG_PINCTRL=y
CONFIG_PINMUX=y
CONFIG_PINCONF=y
CONFIG_GENERIC_PINCONF=y
# CONFIG_DEBUG_PINCTRL is not set
# CONFIG_PINCTRL_AMD is not set
# CONFIG_PINCTRL_CY8C95X0 is not set
# CONFIG_PINCTRL_MCP23S08 is not set
# CONFIG_PINCTRL_SX150X is not set
#
# Intel pinctrl drivers
#
CONFIG_PINCTRL_BAYTRAIL=y
# CONFIG_PINCTRL_CHERRYVIEW is not set
# CONFIG_PINCTRL_LYNXPOINT is not set
CONFIG_PINCTRL_INTEL=y
# CONFIG_PINCTRL_INTEL_PLATFORM is not set
# CONFIG_PINCTRL_ALDERLAKE is not set
CONFIG_PINCTRL_BROXTON=y
CONFIG_PINCTRL_CANNONLAKE=y
CONFIG_PINCTRL_CEDARFORK=y
CONFIG_PINCTRL_DENVERTON=y
# CONFIG_PINCTRL_ELKHARTLAKE is not set
CONFIG_PINCTRL_EMMITSBURG=y
CONFIG_PINCTRL_GEMINILAKE=y
CONFIG_PINCTRL_ICELAKE=y
# CONFIG_PINCTRL_JASPERLAKE is not set
# CONFIG_PINCTRL_LAKEFIELD is not set
CONFIG_PINCTRL_LEWISBURG=y
# CONFIG_PINCTRL_METEORLAKE is not set
# CONFIG_PINCTRL_METEORPOINT is not set
CONFIG_PINCTRL_SUNRISEPOINT=y
# CONFIG_PINCTRL_TIGERLAKE is not set
# end of Intel pinctrl drivers
#
# Renesas pinctrl drivers
#
# end of Renesas pinctrl drivers
CONFIG_GPIOLIB=y
CONFIG_GPIOLIB_FASTPATH_LIMIT=512
CONFIG_GPIO_ACPI=y
CONFIG_GPIOLIB_IRQCHIP=y
# CONFIG_DEBUG_GPIO is not set
CONFIG_GPIO_CDEV=y
CONFIG_GPIO_CDEV_V1=y
CONFIG_GPIO_GENERIC=y
#
# Memory mapped GPIO drivers
#
# CONFIG_GPIO_ALTERA is not set
CONFIG_GPIO_AMDPT=y
# CONFIG_GPIO_DWAPB is not set
# CONFIG_GPIO_EXAR is not set
# CONFIG_GPIO_GENERIC_PLATFORM is not set
# CONFIG_GPIO_GRANITERAPIDS is not set
CONFIG_GPIO_ICH=y
# CONFIG_GPIO_MB86S7X is not set
# CONFIG_GPIO_POLARFIRE_SOC is not set
# CONFIG_GPIO_XILINX is not set
# CONFIG_GPIO_AMD_FCH is not set
# end of Memory mapped GPIO drivers
#
# Port-mapped I/O GPIO drivers
#
# CONFIG_GPIO_VX855 is not set
# CONFIG_GPIO_F7188X is not set
# CONFIG_GPIO_IT87 is not set
# CONFIG_GPIO_SCH is not set
# CONFIG_GPIO_SCH311X is not set
# CONFIG_GPIO_WINBOND is not set
# CONFIG_GPIO_WS16C48 is not set
# end of Port-mapped I/O GPIO drivers
#
# I2C GPIO expanders
#
# CONFIG_GPIO_FXL6408 is not set
# CONFIG_GPIO_DS4520 is not set
# CONFIG_GPIO_MAX7300 is not set
# CONFIG_GPIO_MAX732X is not set
# CONFIG_GPIO_PCA953X is not set
# CONFIG_GPIO_PCA9570 is not set
# CONFIG_GPIO_PCF857X is not set
# CONFIG_GPIO_TPIC2810 is not set
# end of I2C GPIO expanders
#
# MFD GPIO expanders
#
# CONFIG_GPIO_ELKHARTLAKE is not set
# end of MFD GPIO expanders
#
# PCI GPIO expanders
#
# CONFIG_GPIO_AMD8111 is not set
# CONFIG_GPIO_ML_IOH is not set
# CONFIG_GPIO_PCI_IDIO_16 is not set
# CONFIG_GPIO_PCIE_IDIO_24 is not set
# CONFIG_GPIO_RDC321X is not set
# end of PCI GPIO expanders
#
# SPI GPIO expanders
#
# CONFIG_GPIO_74X164 is not set
# CONFIG_GPIO_MAX3191X is not set
# CONFIG_GPIO_MAX7301 is not set
# CONFIG_GPIO_MC33880 is not set
# CONFIG_GPIO_PISOSR is not set
# CONFIG_GPIO_XRA1403 is not set
# end of SPI GPIO expanders
#
# USB GPIO expanders
#
CONFIG_GPIO_VIPERBOARD=y
# CONFIG_GPIO_MPSSE is not set
# end of USB GPIO expanders
#
# Virtual GPIO drivers
#
# CONFIG_GPIO_AGGREGATOR is not set
# CONFIG_GPIO_LATCH is not set
# CONFIG_GPIO_MOCKUP is not set
# CONFIG_GPIO_VIRTIO is not set
# CONFIG_GPIO_SIM is not set
# end of Virtual GPIO drivers
#
# GPIO Debugging utilities
#
# CONFIG_GPIO_VIRTUSER is not set
# end of GPIO Debugging utilities
# CONFIG_W1 is not set
CONFIG_POWER_RESET=y
# CONFIG_POWER_RESET_RESTART is not set
# CONFIG_POWER_SEQUENCING is not set
CONFIG_POWER_SUPPLY=y
# CONFIG_POWER_SUPPLY_DEBUG is not set
CONFIG_POWER_SUPPLY_HWMON=y
# CONFIG_GENERIC_ADC_BATTERY is not set
# CONFIG_IP5XXX_POWER is not set
# CONFIG_TEST_POWER is not set
# CONFIG_CHARGER_ADP5061 is not set
# CONFIG_BATTERY_CW2015 is not set
# CONFIG_BATTERY_DS2780 is not set
# CONFIG_BATTERY_DS2781 is not set
# CONFIG_BATTERY_DS2782 is not set
# CONFIG_BATTERY_SAMSUNG_SDI is not set
# CONFIG_BATTERY_SBS is not set
# CONFIG_CHARGER_SBS is not set
# CONFIG_MANAGER_SBS is not set
# CONFIG_BATTERY_BQ27XXX is not set
# CONFIG_BATTERY_MAX17040 is not set
# CONFIG_BATTERY_MAX17042 is not set
# CONFIG_BATTERY_MAX1720X is not set
# CONFIG_CHARGER_MAX8903 is not set
# CONFIG_CHARGER_LP8727 is not set
# CONFIG_CHARGER_GPIO is not set
# CONFIG_CHARGER_LT3651 is not set
# CONFIG_CHARGER_LTC4162L is not set
# CONFIG_CHARGER_MAX77976 is not set
# CONFIG_CHARGER_BQ2415X is not set
# CONFIG_CHARGER_BQ24257 is not set
# CONFIG_CHARGER_BQ24735 is not set
# CONFIG_CHARGER_BQ2515X is not set
# CONFIG_CHARGER_BQ25890 is not set
# CONFIG_CHARGER_BQ25980 is not set
# CONFIG_CHARGER_BQ256XX is not set
# CONFIG_BATTERY_GAUGE_LTC2941 is not set
# CONFIG_BATTERY_GOLDFISH is not set
# CONFIG_BATTERY_RT5033 is not set
# CONFIG_CHARGER_RT9455 is not set
# CONFIG_FUEL_GAUGE_STC3117 is not set
# CONFIG_CHARGER_BD99954 is not set
# CONFIG_BATTERY_UG3105 is not set
# CONFIG_FUEL_GAUGE_MM8013 is not set
CONFIG_HWMON=y
CONFIG_HWMON_VID=y
# CONFIG_HWMON_DEBUG_CHIP is not set
#
# Native drivers
#
CONFIG_SENSORS_ABITUGURU=y
CONFIG_SENSORS_ABITUGURU3=y
# CONFIG_SENSORS_AD7314 is not set
CONFIG_SENSORS_AD7414=y
CONFIG_SENSORS_AD7418=y
CONFIG_SENSORS_ADM1025=y
CONFIG_SENSORS_ADM1026=y
CONFIG_SENSORS_ADM1029=y
CONFIG_SENSORS_ADM1031=y
# CONFIG_SENSORS_ADM1177 is not set
CONFIG_SENSORS_ADM9240=y
CONFIG_SENSORS_ADT7X10=y
# CONFIG_SENSORS_ADT7310 is not set
CONFIG_SENSORS_ADT7410=y
CONFIG_SENSORS_ADT7411=y
CONFIG_SENSORS_ADT7462=y
CONFIG_SENSORS_ADT7470=y
CONFIG_SENSORS_ADT7475=y
# CONFIG_SENSORS_AHT10 is not set
# CONFIG_SENSORS_AQUACOMPUTER_D5NEXT is not set
# CONFIG_SENSORS_AS370 is not set
CONFIG_SENSORS_ASC7621=y
# CONFIG_SENSORS_ASUS_ROG_RYUJIN is not set
# CONFIG_SENSORS_AXI_FAN_CONTROL is not set
CONFIG_SENSORS_K8TEMP=y
CONFIG_SENSORS_K10TEMP=y
CONFIG_SENSORS_FAM15H_POWER=y
CONFIG_SENSORS_APPLESMC=y
CONFIG_SENSORS_ASB100=y
CONFIG_SENSORS_ATXP1=y
# CONFIG_SENSORS_CHIPCAP2 is not set
# CONFIG_SENSORS_CORSAIR_CPRO is not set
# CONFIG_SENSORS_CORSAIR_PSU is not set
# CONFIG_SENSORS_DRIVETEMP is not set
CONFIG_SENSORS_DS620=y
CONFIG_SENSORS_DS1621=y
CONFIG_SENSORS_DELL_SMM=y
# CONFIG_I8K is not set
CONFIG_SENSORS_I5K_AMB=y
CONFIG_SENSORS_F71805F=y
CONFIG_SENSORS_F71882FG=y
CONFIG_SENSORS_F75375S=y
CONFIG_SENSORS_FSCHMD=y
# CONFIG_SENSORS_FTSTEUTATES is not set
# CONFIG_SENSORS_GIGABYTE_WATERFORCE is not set
CONFIG_SENSORS_GL518SM=y
CONFIG_SENSORS_GL520SM=y
CONFIG_SENSORS_G760A=y
# CONFIG_SENSORS_G762 is not set
# CONFIG_SENSORS_HIH6130 is not set
# CONFIG_SENSORS_HS3001 is not set
# CONFIG_SENSORS_HTU31 is not set
CONFIG_SENSORS_IBMAEM=y
CONFIG_SENSORS_IBMPEX=y
# CONFIG_SENSORS_IIO_HWMON is not set
CONFIG_SENSORS_I5500=y
CONFIG_SENSORS_CORETEMP=y
# CONFIG_SENSORS_ISL28022 is not set
CONFIG_SENSORS_IT87=y
CONFIG_SENSORS_JC42=y
# CONFIG_SENSORS_POWERZ is not set
# CONFIG_SENSORS_POWR1220 is not set
# CONFIG_SENSORS_LENOVO_EC is not set
CONFIG_SENSORS_LINEAGE=y
# CONFIG_SENSORS_LTC2945 is not set
# CONFIG_SENSORS_LTC2947_I2C is not set
# CONFIG_SENSORS_LTC2947_SPI is not set
# CONFIG_SENSORS_LTC2990 is not set
# CONFIG_SENSORS_LTC2991 is not set
# CONFIG_SENSORS_LTC2992 is not set
CONFIG_SENSORS_LTC4151=y
CONFIG_SENSORS_LTC4215=y
# CONFIG_SENSORS_LTC4222 is not set
CONFIG_SENSORS_LTC4245=y
# CONFIG_SENSORS_LTC4260 is not set
CONFIG_SENSORS_LTC4261=y
# CONFIG_SENSORS_LTC4282 is not set
# CONFIG_SENSORS_MAX1111 is not set
# CONFIG_SENSORS_MAX127 is not set
CONFIG_SENSORS_MAX16065=y
CONFIG_SENSORS_MAX1619=y
CONFIG_SENSORS_MAX1668=y
CONFIG_SENSORS_MAX197=y
# CONFIG_SENSORS_MAX31722 is not set
# CONFIG_SENSORS_MAX31730 is not set
# CONFIG_SENSORS_MAX31760 is not set
# CONFIG_MAX31827 is not set
# CONFIG_SENSORS_MAX6620 is not set
# CONFIG_SENSORS_MAX6621 is not set
CONFIG_SENSORS_MAX6639=y
CONFIG_SENSORS_MAX6650=y
CONFIG_SENSORS_MAX6697=y
# CONFIG_SENSORS_MAX31790 is not set
# CONFIG_SENSORS_MC34VR500 is not set
CONFIG_SENSORS_MCP3021=y
# CONFIG_SENSORS_MLXREG_FAN is not set
# CONFIG_SENSORS_TC654 is not set
# CONFIG_SENSORS_TPS23861 is not set
# CONFIG_SENSORS_MR75203 is not set
# CONFIG_SENSORS_ADCXX is not set
CONFIG_SENSORS_LM63=y
# CONFIG_SENSORS_LM70 is not set
CONFIG_SENSORS_LM73=y
CONFIG_SENSORS_LM75=y
CONFIG_SENSORS_LM77=y
CONFIG_SENSORS_LM78=y
CONFIG_SENSORS_LM80=y
CONFIG_SENSORS_LM83=y
CONFIG_SENSORS_LM85=y
CONFIG_SENSORS_LM87=y
CONFIG_SENSORS_LM90=y
CONFIG_SENSORS_LM92=y
CONFIG_SENSORS_LM93=y
CONFIG_SENSORS_LM95234=y
CONFIG_SENSORS_LM95241=y
CONFIG_SENSORS_LM95245=y
CONFIG_SENSORS_PC87360=y
CONFIG_SENSORS_PC87427=y
CONFIG_SENSORS_NTC_THERMISTOR=y
# CONFIG_SENSORS_NCT6683 is not set
CONFIG_SENSORS_NCT6775_CORE=y
CONFIG_SENSORS_NCT6775=y
# CONFIG_SENSORS_NCT6775_I2C is not set
# CONFIG_SENSORS_NCT7363 is not set
# CONFIG_SENSORS_NCT7802 is not set
# CONFIG_SENSORS_NCT7904 is not set
# CONFIG_SENSORS_NPCM7XX is not set
# CONFIG_SENSORS_NZXT_KRAKEN2 is not set
# CONFIG_SENSORS_NZXT_KRAKEN3 is not set
# CONFIG_SENSORS_NZXT_SMART2 is not set
# CONFIG_SENSORS_OCC_P8_I2C is not set
# CONFIG_SENSORS_OXP is not set
CONFIG_SENSORS_PCF8591=y
CONFIG_PMBUS=y
CONFIG_SENSORS_PMBUS=y
# CONFIG_SENSORS_ACBEL_FSG032 is not set
# CONFIG_SENSORS_ADM1266 is not set
CONFIG_SENSORS_ADM1275=y
# CONFIG_SENSORS_ADP1050 is not set
# CONFIG_SENSORS_BEL_PFE is not set
# CONFIG_SENSORS_BPA_RS600 is not set
# CONFIG_SENSORS_CRPS is not set
# CONFIG_SENSORS_DELTA_AHE50DC_FAN is not set
# CONFIG_SENSORS_FSP_3Y is not set
# CONFIG_SENSORS_IBM_CFFPS is not set
# CONFIG_SENSORS_DPS920AB is not set
# CONFIG_SENSORS_INA233 is not set
# CONFIG_SENSORS_INSPUR_IPSPS is not set
# CONFIG_SENSORS_IR35221 is not set
# CONFIG_SENSORS_IR36021 is not set
# CONFIG_SENSORS_IR38064 is not set
# CONFIG_SENSORS_IRPS5401 is not set
# CONFIG_SENSORS_ISL68137 is not set
CONFIG_SENSORS_LM25066=y
# CONFIG_SENSORS_LT7182S is not set
CONFIG_SENSORS_LTC2978=y
# CONFIG_SENSORS_LTC3815 is not set
# CONFIG_SENSORS_LTC4286 is not set
# CONFIG_SENSORS_MAX15301 is not set
CONFIG_SENSORS_MAX16064=y
# CONFIG_SENSORS_MAX16601 is not set
# CONFIG_SENSORS_MAX20730 is not set
# CONFIG_SENSORS_MAX20751 is not set
# CONFIG_SENSORS_MAX31785 is not set
CONFIG_SENSORS_MAX34440=y
CONFIG_SENSORS_MAX8688=y
# CONFIG_SENSORS_MP2856 is not set
# CONFIG_SENSORS_MP2888 is not set
# CONFIG_SENSORS_MP2891 is not set
# CONFIG_SENSORS_MP2975 is not set
# CONFIG_SENSORS_MP2993 is not set
# CONFIG_SENSORS_MP5023 is not set
# CONFIG_SENSORS_MP5920 is not set
# CONFIG_SENSORS_MP5990 is not set
# CONFIG_SENSORS_MP9941 is not set
# CONFIG_SENSORS_MPQ7932 is not set
# CONFIG_SENSORS_MPQ8785 is not set
# CONFIG_SENSORS_PIM4328 is not set
# CONFIG_SENSORS_PLI1209BC is not set
# CONFIG_SENSORS_PM6764TR is not set
# CONFIG_SENSORS_PXE1610 is not set
# CONFIG_SENSORS_Q54SJ108A2 is not set
# CONFIG_SENSORS_STPDDC60 is not set
# CONFIG_SENSORS_TDA38640 is not set
# CONFIG_SENSORS_TPS25990 is not set
# CONFIG_SENSORS_TPS40422 is not set
# CONFIG_SENSORS_TPS53679 is not set
# CONFIG_SENSORS_TPS546D24 is not set
CONFIG_SENSORS_UCD9000=y
CONFIG_SENSORS_UCD9200=y
# CONFIG_SENSORS_XDP710 is not set
# CONFIG_SENSORS_XDPE152 is not set
# CONFIG_SENSORS_XDPE122 is not set
CONFIG_SENSORS_ZL6100=y
# CONFIG_SENSORS_PT5161L is not set
# CONFIG_SENSORS_PWM_FAN is not set
# CONFIG_SENSORS_SBTSI is not set
# CONFIG_SENSORS_SBRMI is not set
CONFIG_SENSORS_SHT15=y
CONFIG_SENSORS_SHT21=y
# CONFIG_SENSORS_SHT3x is not set
# CONFIG_SENSORS_SHT4x is not set
# CONFIG_SENSORS_SHTC1 is not set
CONFIG_SENSORS_SIS5595=y
CONFIG_SENSORS_DME1737=y
CONFIG_SENSORS_EMC1403=y
# CONFIG_SENSORS_EMC2103 is not set
# CONFIG_SENSORS_EMC2305 is not set
CONFIG_SENSORS_EMC6W201=y
CONFIG_SENSORS_SMSC47M1=y
CONFIG_SENSORS_SMSC47M192=y
CONFIG_SENSORS_SMSC47B397=y
CONFIG_SENSORS_SCH56XX_COMMON=y
CONFIG_SENSORS_SCH5627=y
CONFIG_SENSORS_SCH5636=y
# CONFIG_SENSORS_STTS751 is not set
# CONFIG_SENSORS_ADC128D818 is not set
CONFIG_SENSORS_ADS7828=y
# CONFIG_SENSORS_ADS7871 is not set
CONFIG_SENSORS_AMC6821=y
CONFIG_SENSORS_INA209=y
CONFIG_SENSORS_INA2XX=y
# CONFIG_SENSORS_INA238 is not set
# CONFIG_SENSORS_INA3221 is not set
# CONFIG_SENSORS_SPD5118 is not set
# CONFIG_SENSORS_TC74 is not set
CONFIG_SENSORS_THMC50=y
CONFIG_SENSORS_TMP102=y
# CONFIG_SENSORS_TMP103 is not set
# CONFIG_SENSORS_TMP108 is not set
CONFIG_SENSORS_TMP401=y
CONFIG_SENSORS_TMP421=y
# CONFIG_SENSORS_TMP464 is not set
# CONFIG_SENSORS_TMP513 is not set
CONFIG_SENSORS_VIA_CPUTEMP=y
CONFIG_SENSORS_VIA686A=y
CONFIG_SENSORS_VT1211=y
CONFIG_SENSORS_VT8231=y
# CONFIG_SENSORS_W83773G is not set
CONFIG_SENSORS_W83781D=y
CONFIG_SENSORS_W83791D=y
CONFIG_SENSORS_W83792D=y
CONFIG_SENSORS_W83793=y
CONFIG_SENSORS_W83795=y
# CONFIG_SENSORS_W83795_FANCTRL is not set
CONFIG_SENSORS_W83L785TS=y
CONFIG_SENSORS_W83L786NG=y
CONFIG_SENSORS_W83627HF=y
CONFIG_SENSORS_W83627EHF=y
# CONFIG_SENSORS_XGENE is not set
#
# ACPI drivers
#
CONFIG_SENSORS_ACPI_POWER=y
CONFIG_SENSORS_ATK0110=y
# CONFIG_SENSORS_ASUS_WMI is not set
# CONFIG_SENSORS_ASUS_EC is not set
# CONFIG_SENSORS_HP_WMI is not set
CONFIG_THERMAL=y
CONFIG_THERMAL_NETLINK=y
# CONFIG_THERMAL_STATISTICS is not set
# CONFIG_THERMAL_DEBUGFS is not set
# CONFIG_THERMAL_CORE_TESTING is not set
CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
CONFIG_THERMAL_HWMON=y
CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set
# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set
# CONFIG_THERMAL_DEFAULT_GOV_BANG_BANG is not set
CONFIG_THERMAL_GOV_FAIR_SHARE=y
CONFIG_THERMAL_GOV_STEP_WISE=y
CONFIG_THERMAL_GOV_BANG_BANG=y
CONFIG_THERMAL_GOV_USER_SPACE=y
# CONFIG_PCIE_THERMAL is not set
CONFIG_THERMAL_EMULATION=y
#
# Intel thermal drivers
#
CONFIG_INTEL_POWERCLAMP=y
CONFIG_X86_THERMAL_VECTOR=y
CONFIG_INTEL_TCC=y
CONFIG_X86_PKG_TEMP_THERMAL=y
CONFIG_INTEL_SOC_DTS_IOSF_CORE=y
# CONFIG_INTEL_SOC_DTS_THERMAL is not set
#
# ACPI INT340X thermal drivers
#
CONFIG_INT340X_THERMAL=y
CONFIG_ACPI_THERMAL_REL=y
# CONFIG_INT3406_THERMAL is not set
CONFIG_PROC_THERMAL_MMIO_RAPL=y
# end of ACPI INT340X thermal drivers
CONFIG_INTEL_PCH_THERMAL=y
# CONFIG_INTEL_TCC_COOLING is not set
CONFIG_INTEL_HFI_THERMAL=y
# end of Intel thermal drivers
# CONFIG_GENERIC_ADC_THERMAL is not set
CONFIG_WATCHDOG=y
CONFIG_WATCHDOG_CORE=y
# CONFIG_WATCHDOG_NOWAYOUT is not set
CONFIG_WATCHDOG_HANDLE_BOOT_ENABLED=y
CONFIG_WATCHDOG_OPEN_TIMEOUT=0
CONFIG_WATCHDOG_SYSFS=y
# CONFIG_WATCHDOG_HRTIMER_PRETIMEOUT is not set
#
# Watchdog Pretimeout Governors
#
# CONFIG_WATCHDOG_PRETIMEOUT_GOV is not set
#
# Watchdog Device Drivers
#
CONFIG_SOFT_WATCHDOG=y
# CONFIG_LENOVO_SE10_WDT is not set
# CONFIG_LENOVO_SE30_WDT is not set
CONFIG_WDAT_WDT=y
# CONFIG_XILINX_WATCHDOG is not set
# CONFIG_ZIIRAVE_WATCHDOG is not set
# CONFIG_MLX_WDT is not set
# CONFIG_CADENCE_WATCHDOG is not set
# CONFIG_DW_WATCHDOG is not set
# CONFIG_MAX63XX_WATCHDOG is not set
# CONFIG_ACQUIRE_WDT is not set
# CONFIG_ADVANTECH_WDT is not set
# CONFIG_ADVANTECH_EC_WDT is not set
CONFIG_ALIM1535_WDT=y
CONFIG_ALIM7101_WDT=y
# CONFIG_EBC_C384_WDT is not set
# CONFIG_EXAR_WDT is not set
CONFIG_F71808E_WDT=y
CONFIG_SP5100_TCO=y
CONFIG_SBC_FITPC2_WATCHDOG=y
# CONFIG_EUROTECH_WDT is not set
CONFIG_IB700_WDT=y
CONFIG_IBMASR=y
# CONFIG_WAFER_WDT is not set
CONFIG_I6300ESB_WDT=y
CONFIG_IE6XX_WDT=y
CONFIG_ITCO_WDT=y
CONFIG_ITCO_VENDOR_SUPPORT=y
CONFIG_IT8712F_WDT=y
CONFIG_IT87_WDT=y
CONFIG_HP_WATCHDOG=y
CONFIG_HPWDT_NMI_DECODING=y
# CONFIG_SC1200_WDT is not set
# CONFIG_PC87413_WDT is not set
CONFIG_NV_TCO=y
# CONFIG_60XX_WDT is not set
CONFIG_SMSC_SCH311X_WDT=y
# CONFIG_SMSC37B787_WDT is not set
# CONFIG_TQMX86_WDT is not set
CONFIG_VIA_WDT=y
CONFIG_W83627HF_WDT=y
CONFIG_W83877F_WDT=y
CONFIG_W83977F_WDT=y
CONFIG_MACHZ_WDT=y
# CONFIG_SBC_EPX_C3_WATCHDOG is not set
CONFIG_INTEL_MEI_WDT=y
# CONFIG_NI903X_WDT is not set
# CONFIG_NIC7018_WDT is not set
# CONFIG_MEN_A21_WDT is not set
CONFIG_XEN_WDT=y
#
# PCI-based Watchdog Cards
#
CONFIG_PCIPCWATCHDOG=y
CONFIG_WDTPCI=y
#
# USB-based Watchdog Cards
#
CONFIG_USBPCWATCHDOG=y
CONFIG_SSB_POSSIBLE=y
# CONFIG_SSB is not set
CONFIG_BCMA_POSSIBLE=y
CONFIG_BCMA=y
CONFIG_BCMA_HOST_PCI_POSSIBLE=y
CONFIG_BCMA_HOST_PCI=y
# CONFIG_BCMA_HOST_SOC is not set
CONFIG_BCMA_DRIVER_PCI=y
CONFIG_BCMA_DRIVER_GMAC_CMN=y
CONFIG_BCMA_DRIVER_GPIO=y
# CONFIG_BCMA_DEBUG is not set
#
# Multifunction device drivers
#
CONFIG_MFD_CORE=y
# CONFIG_MFD_AS3711 is not set
# CONFIG_MFD_SMPRO is not set
# CONFIG_PMIC_ADP5520 is not set
# CONFIG_MFD_AAT2870_CORE is not set
# CONFIG_MFD_BCM590XX is not set
# CONFIG_MFD_BD9571MWV is not set
# CONFIG_MFD_AXP20X_I2C is not set
# CONFIG_MFD_CGBC is not set
# CONFIG_MFD_CS42L43_I2C is not set
# CONFIG_MFD_MADERA is not set
# CONFIG_PMIC_DA903X is not set
# CONFIG_MFD_DA9052_SPI is not set
# CONFIG_MFD_DA9052_I2C is not set
# CONFIG_MFD_DA9055 is not set
# CONFIG_MFD_DA9062 is not set
# CONFIG_MFD_DA9063 is not set
# CONFIG_MFD_DA9150 is not set
# CONFIG_MFD_DLN2 is not set
# CONFIG_MFD_MC13XXX_SPI is not set
# CONFIG_MFD_MC13XXX_I2C is not set
# CONFIG_MFD_MP2629 is not set
# CONFIG_MFD_INTEL_QUARK_I2C_GPIO is not set
CONFIG_LPC_ICH=y
CONFIG_LPC_SCH=y
# CONFIG_INTEL_SOC_PMIC is not set
# CONFIG_INTEL_SOC_PMIC_CHTWC is not set
# CONFIG_INTEL_SOC_PMIC_CHTDC_TI is not set
CONFIG_MFD_INTEL_LPSS=y
CONFIG_MFD_INTEL_LPSS_ACPI=y
CONFIG_MFD_INTEL_LPSS_PCI=y
# CONFIG_MFD_INTEL_PMC_BXT is not set
# CONFIG_MFD_IQS62X is not set
# CONFIG_MFD_JANZ_CMODIO is not set
# CONFIG_MFD_KEMPLD is not set
# CONFIG_MFD_88PM800 is not set
# CONFIG_MFD_88PM805 is not set
# CONFIG_MFD_88PM860X is not set
# CONFIG_MFD_MAX14577 is not set
# CONFIG_MFD_MAX77541 is not set
# CONFIG_MFD_MAX77693 is not set
# CONFIG_MFD_MAX77705 is not set
# CONFIG_MFD_MAX77843 is not set
# CONFIG_MFD_MAX8907 is not set
# CONFIG_MFD_MAX8925 is not set
# CONFIG_MFD_MAX8997 is not set
# CONFIG_MFD_MAX8998 is not set
# CONFIG_MFD_MT6360 is not set
# CONFIG_MFD_MT6370 is not set
# CONFIG_MFD_MT6397 is not set
# CONFIG_MFD_MENF21BMC is not set
# CONFIG_MFD_OCELOT is not set
# CONFIG_EZX_PCAP is not set
CONFIG_MFD_VIPERBOARD=y
# CONFIG_MFD_RETU is not set
# CONFIG_MFD_SY7636A is not set
# CONFIG_MFD_RDC321X is not set
# CONFIG_MFD_RT4831 is not set
# CONFIG_MFD_RT5033 is not set
# CONFIG_MFD_RT5120 is not set
# CONFIG_MFD_RC5T583 is not set
# CONFIG_MFD_SI476X_CORE is not set
CONFIG_MFD_SM501=y
CONFIG_MFD_SM501_GPIO=y
# CONFIG_MFD_SKY81452 is not set
# CONFIG_MFD_SYSCON is not set
# CONFIG_MFD_LP3943 is not set
# CONFIG_MFD_LP8788 is not set
# CONFIG_MFD_TI_LMU is not set
# CONFIG_MFD_PALMAS is not set
# CONFIG_TPS6105X is not set
# CONFIG_TPS65010 is not set
# CONFIG_TPS6507X is not set
# CONFIG_MFD_TPS65086 is not set
# CONFIG_MFD_TPS65090 is not set
# CONFIG_MFD_TI_LP873X is not set
# CONFIG_MFD_TPS6586X is not set
# CONFIG_MFD_TPS65910 is not set
# CONFIG_MFD_TPS65912_I2C is not set
# CONFIG_MFD_TPS65912_SPI is not set
# CONFIG_MFD_TPS6594_I2C is not set
# CONFIG_MFD_TPS6594_SPI is not set
# CONFIG_TWL4030_CORE is not set
# CONFIG_TWL6040_CORE is not set
# CONFIG_MFD_WL1273_CORE is not set
# CONFIG_MFD_LM3533 is not set
# CONFIG_MFD_TQMX86 is not set
CONFIG_MFD_VX855=y
# CONFIG_MFD_ARIZONA_I2C is not set
# CONFIG_MFD_ARIZONA_SPI is not set
# CONFIG_MFD_WM8400 is not set
# CONFIG_MFD_WM831X_I2C is not set
# CONFIG_MFD_WM831X_SPI is not set
# CONFIG_MFD_WM8350_I2C is not set
# CONFIG_MFD_WM8994 is not set
# CONFIG_MFD_ATC260X_I2C is not set
# CONFIG_MFD_CS40L50_I2C is not set
# CONFIG_MFD_CS40L50_SPI is not set
# CONFIG_MFD_INTEL_M10_BMC_SPI is not set
# CONFIG_MFD_UPBOARD_FPGA is not set
# end of Multifunction device drivers
# CONFIG_REGULATOR is not set
CONFIG_RC_CORE=y
# CONFIG_BPF_LIRC_MODE2 is not set
CONFIG_LIRC=y
CONFIG_RC_MAP=y
CONFIG_RC_DECODERS=y
CONFIG_IR_IMON_DECODER=y
CONFIG_IR_JVC_DECODER=y
CONFIG_IR_MCE_KBD_DECODER=y
CONFIG_IR_NEC_DECODER=y
CONFIG_IR_RC5_DECODER=y
CONFIG_IR_RC6_DECODER=y
# CONFIG_IR_RCMM_DECODER is not set
CONFIG_IR_SANYO_DECODER=y
# CONFIG_IR_SHARP_DECODER is not set
CONFIG_IR_SONY_DECODER=y
# CONFIG_IR_XMP_DECODER is not set
CONFIG_RC_DEVICES=y
CONFIG_IR_ENE=y
CONFIG_IR_FINTEK=y
# CONFIG_IR_IGORPLUGUSB is not set
CONFIG_IR_IGUANA=y
CONFIG_IR_IMON=y
CONFIG_IR_IMON_RAW=y
CONFIG_IR_ITE_CIR=y
CONFIG_IR_MCEUSB=y
CONFIG_IR_NUVOTON=y
CONFIG_IR_REDRAT3=y
CONFIG_IR_SERIAL=y
CONFIG_IR_SERIAL_TRANSMITTER=y
CONFIG_IR_STREAMZAP=y
# CONFIG_IR_TOY is not set
CONFIG_IR_TTUSBIR=y
CONFIG_IR_WINBOND_CIR=y
CONFIG_RC_ATI_REMOTE=y
# CONFIG_RC_LOOPBACK is not set
# CONFIG_RC_XBOX_DVD is not set
CONFIG_CEC_CORE=y
#
# CEC support
#
# CONFIG_MEDIA_CEC_RC is not set
CONFIG_MEDIA_CEC_SUPPORT=y
# CONFIG_CEC_CH7322 is not set
# CONFIG_CEC_NXP_TDA9950 is not set
# CONFIG_CEC_GPIO is not set
# CONFIG_CEC_SECO is not set
# CONFIG_USB_EXTRON_DA_HD_4K_PLUS_CEC is not set
CONFIG_USB_PULSE8_CEC=y
CONFIG_USB_RAINSHADOW_CEC=y
# end of CEC support
CONFIG_MEDIA_SUPPORT=y
CONFIG_MEDIA_SUPPORT_FILTER=y
CONFIG_MEDIA_SUBDRV_AUTOSELECT=y
#
# Media device types
#
CONFIG_MEDIA_CAMERA_SUPPORT=y
CONFIG_MEDIA_ANALOG_TV_SUPPORT=y
CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y
CONFIG_MEDIA_RADIO_SUPPORT=y
# CONFIG_MEDIA_SDR_SUPPORT is not set
CONFIG_MEDIA_PLATFORM_SUPPORT=y
# CONFIG_MEDIA_TEST_SUPPORT is not set
# end of Media device types
CONFIG_VIDEO_DEV=y
CONFIG_MEDIA_CONTROLLER=y
CONFIG_DVB_CORE=y
#
# Video4Linux options
#
CONFIG_VIDEO_V4L2_I2C=y
CONFIG_VIDEO_V4L2_SUBDEV_API=y
# CONFIG_VIDEO_ADV_DEBUG is not set
# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
CONFIG_VIDEO_TUNER=y
CONFIG_V4L2_FWNODE=y
CONFIG_V4L2_ASYNC=y
# end of Video4Linux options
#
# Media controller options
#
CONFIG_MEDIA_CONTROLLER_DVB=y
# end of Media controller options
#
# Digital TV options
#
# CONFIG_DVB_MMAP is not set
CONFIG_DVB_NET=y
CONFIG_DVB_MAX_ADAPTERS=8
CONFIG_DVB_DYNAMIC_MINORS=y
# CONFIG_DVB_DEMUX_SECTION_LOSS_LOG is not set
# CONFIG_DVB_ULE_DEBUG is not set
# end of Digital TV options
#
# Media drivers
#
#
# Drivers filtered as selected at 'Filter media drivers'
#
#
# Media drivers
#
CONFIG_MEDIA_USB_SUPPORT=y
#
# Webcam devices
#
CONFIG_USB_GSPCA=y
CONFIG_USB_GSPCA_BENQ=y
CONFIG_USB_GSPCA_CONEX=y
CONFIG_USB_GSPCA_CPIA1=y
# CONFIG_USB_GSPCA_DTCS033 is not set
CONFIG_USB_GSPCA_ETOMS=y
CONFIG_USB_GSPCA_FINEPIX=y
CONFIG_USB_GSPCA_JEILINJ=y
CONFIG_USB_GSPCA_JL2005BCD=y
# CONFIG_USB_GSPCA_KINECT is not set
CONFIG_USB_GSPCA_KONICA=y
CONFIG_USB_GSPCA_MARS=y
CONFIG_USB_GSPCA_MR97310A=y
CONFIG_USB_GSPCA_NW80X=y
CONFIG_USB_GSPCA_OV519=y
CONFIG_USB_GSPCA_OV534=y
CONFIG_USB_GSPCA_OV534_9=y
CONFIG_USB_GSPCA_PAC207=y
CONFIG_USB_GSPCA_PAC7302=y
CONFIG_USB_GSPCA_PAC7311=y
CONFIG_USB_GSPCA_SE401=y
CONFIG_USB_GSPCA_SN9C2028=y
CONFIG_USB_GSPCA_SN9C20X=y
CONFIG_USB_GSPCA_SONIXB=y
CONFIG_USB_GSPCA_SONIXJ=y
CONFIG_USB_GSPCA_SPCA1528=y
CONFIG_USB_GSPCA_SPCA500=y
CONFIG_USB_GSPCA_SPCA501=y
CONFIG_USB_GSPCA_SPCA505=y
CONFIG_USB_GSPCA_SPCA506=y
CONFIG_USB_GSPCA_SPCA508=y
CONFIG_USB_GSPCA_SPCA561=y
CONFIG_USB_GSPCA_SQ905=y
CONFIG_USB_GSPCA_SQ905C=y
CONFIG_USB_GSPCA_SQ930X=y
CONFIG_USB_GSPCA_STK014=y
# CONFIG_USB_GSPCA_STK1135 is not set
CONFIG_USB_GSPCA_STV0680=y
CONFIG_USB_GSPCA_SUNPLUS=y
CONFIG_USB_GSPCA_T613=y
CONFIG_USB_GSPCA_TOPRO=y
# CONFIG_USB_GSPCA_TOUPTEK is not set
CONFIG_USB_GSPCA_TV8532=y
CONFIG_USB_GSPCA_VC032X=y
CONFIG_USB_GSPCA_VICAM=y
CONFIG_USB_GSPCA_XIRLINK_CIT=y
CONFIG_USB_GSPCA_ZC3XX=y
CONFIG_USB_GL860=y
CONFIG_USB_M5602=y
CONFIG_USB_STV06XX=y
CONFIG_USB_PWC=y
# CONFIG_USB_PWC_DEBUG is not set
CONFIG_USB_PWC_INPUT_EVDEV=y
CONFIG_USB_S2255=y
# CONFIG_VIDEO_USBTV is not set
CONFIG_USB_VIDEO_CLASS=y
CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
#
# Analog TV USB devices
#
# CONFIG_VIDEO_GO7007 is not set
CONFIG_VIDEO_HDPVR=y
CONFIG_VIDEO_PVRUSB2=y
CONFIG_VIDEO_PVRUSB2_SYSFS=y
CONFIG_VIDEO_PVRUSB2_DVB=y
# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set
# CONFIG_VIDEO_STK1160 is not set
#
# Analog/digital TV USB devices
#
CONFIG_VIDEO_AU0828=y
CONFIG_VIDEO_AU0828_V4L2=y
# CONFIG_VIDEO_AU0828_RC is not set
CONFIG_VIDEO_CX231XX=y
CONFIG_VIDEO_CX231XX_RC=y
CONFIG_VIDEO_CX231XX_ALSA=y
CONFIG_VIDEO_CX231XX_DVB=y
#
# Digital TV USB devices
#
# CONFIG_DVB_AS102 is not set
CONFIG_DVB_B2C2_FLEXCOP_USB=y
# CONFIG_DVB_B2C2_FLEXCOP_USB_DEBUG is not set
CONFIG_DVB_USB_V2=y
CONFIG_DVB_USB_AF9015=y
CONFIG_DVB_USB_AF9035=y
CONFIG_DVB_USB_ANYSEE=y
CONFIG_DVB_USB_AU6610=y
CONFIG_DVB_USB_AZ6007=y
CONFIG_DVB_USB_CE6230=y
# CONFIG_DVB_USB_DVBSKY is not set
CONFIG_DVB_USB_EC168=y
CONFIG_DVB_USB_GL861=y
CONFIG_DVB_USB_LME2510=y
CONFIG_DVB_USB_MXL111SF=y
CONFIG_DVB_USB_RTL28XXU=y
# CONFIG_DVB_USB_ZD1301 is not set
CONFIG_DVB_USB=y
# CONFIG_DVB_USB_DEBUG is not set
CONFIG_DVB_USB_A800=y
CONFIG_DVB_USB_AF9005=y
CONFIG_DVB_USB_AF9005_REMOTE=y
CONFIG_DVB_USB_AZ6027=y
CONFIG_DVB_USB_CINERGY_T2=y
CONFIG_DVB_USB_CXUSB=y
# CONFIG_DVB_USB_CXUSB_ANALOG is not set
CONFIG_DVB_USB_DIB0700=y
CONFIG_DVB_USB_DIB3000MC=y
CONFIG_DVB_USB_DIBUSB_MB=y
# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set
CONFIG_DVB_USB_DIBUSB_MC=y
CONFIG_DVB_USB_DIGITV=y
CONFIG_DVB_USB_DTT200U=y
CONFIG_DVB_USB_DTV5100=y
CONFIG_DVB_USB_DW2102=y
CONFIG_DVB_USB_GP8PSK=y
CONFIG_DVB_USB_M920X=y
CONFIG_DVB_USB_NOVA_T_USB2=y
CONFIG_DVB_USB_OPERA1=y
CONFIG_DVB_USB_PCTV452E=y
CONFIG_DVB_USB_TECHNISAT_USB2=y
CONFIG_DVB_USB_TTUSB2=y
CONFIG_DVB_USB_UMT_010=y
CONFIG_DVB_USB_VP702X=y
CONFIG_DVB_USB_VP7045=y
CONFIG_SMS_USB_DRV=y
CONFIG_DVB_TTUSB_BUDGET=y
CONFIG_DVB_TTUSB_DEC=y
#
# Webcam, TV (analog/digital) USB devices
#
CONFIG_VIDEO_EM28XX=y
# CONFIG_VIDEO_EM28XX_V4L2 is not set
CONFIG_VIDEO_EM28XX_ALSA=y
CONFIG_VIDEO_EM28XX_DVB=y
CONFIG_VIDEO_EM28XX_RC=y
CONFIG_MEDIA_PCI_SUPPORT=y
#
# Media capture support
#
# CONFIG_VIDEO_MGB4 is not set
# CONFIG_VIDEO_SOLO6X10 is not set
# CONFIG_VIDEO_TW5864 is not set
# CONFIG_VIDEO_TW68 is not set
# CONFIG_VIDEO_TW686X is not set
# CONFIG_VIDEO_ZORAN is not set
#
# Media capture/analog TV support
#
# CONFIG_VIDEO_DT3155 is not set
CONFIG_VIDEO_IVTV=y
# CONFIG_VIDEO_IVTV_ALSA is not set
CONFIG_VIDEO_FB_IVTV=y
# CONFIG_VIDEO_FB_IVTV_FORCE_PAT is not set
# CONFIG_VIDEO_HEXIUM_GEMINI is not set
# CONFIG_VIDEO_HEXIUM_ORION is not set
# CONFIG_VIDEO_MXB is not set
#
# Media capture/analog/hybrid TV support
#
CONFIG_VIDEO_BT848=y
CONFIG_DVB_BT8XX=y
CONFIG_VIDEO_CX18=y
# CONFIG_VIDEO_CX18_ALSA is not set
CONFIG_VIDEO_CX23885=y
CONFIG_MEDIA_ALTERA_CI=y
# CONFIG_VIDEO_CX25821 is not set
CONFIG_VIDEO_CX88=y
CONFIG_VIDEO_CX88_ALSA=y
CONFIG_VIDEO_CX88_BLACKBIRD=y
CONFIG_VIDEO_CX88_DVB=y
# CONFIG_VIDEO_CX88_ENABLE_VP3054 is not set
CONFIG_VIDEO_CX88_MPEG=y
CONFIG_VIDEO_SAA7134=y
CONFIG_VIDEO_SAA7134_ALSA=y
CONFIG_VIDEO_SAA7134_RC=y
CONFIG_VIDEO_SAA7134_DVB=y
CONFIG_VIDEO_SAA7164=y
#
# Media digital TV PCI Adapters
#
CONFIG_DVB_B2C2_FLEXCOP_PCI=y
# CONFIG_DVB_B2C2_FLEXCOP_PCI_DEBUG is not set
CONFIG_DVB_DDBRIDGE=y
# CONFIG_DVB_DDBRIDGE_MSIENABLE is not set
CONFIG_DVB_DM1105=y
CONFIG_MANTIS_CORE=y
CONFIG_DVB_MANTIS=y
CONFIG_DVB_HOPPER=y
# CONFIG_DVB_NETUP_UNIDVB is not set
CONFIG_DVB_NGENE=y
CONFIG_DVB_PLUTO2=y
CONFIG_DVB_PT1=y
# CONFIG_DVB_PT3 is not set
# CONFIG_DVB_SMIPCIE is not set
CONFIG_DVB_BUDGET_CORE=y
CONFIG_DVB_BUDGET=y
CONFIG_DVB_BUDGET_CI=y
CONFIG_DVB_BUDGET_AV=y
# CONFIG_VIDEO_IPU3_CIO2 is not set
# CONFIG_VIDEO_INTEL_IPU6 is not set
# CONFIG_INTEL_VSC is not set
# CONFIG_IPU_BRIDGE is not set
CONFIG_RADIO_ADAPTERS=y
# CONFIG_RADIO_MAXIRADIO is not set
# CONFIG_RADIO_SAA7706H is not set
# CONFIG_RADIO_SHARK is not set
# CONFIG_RADIO_SHARK2 is not set
# CONFIG_RADIO_SI4713 is not set
CONFIG_RADIO_TEA575X=y
# CONFIG_RADIO_TEA5764 is not set
# CONFIG_RADIO_TEF6862 is not set
# CONFIG_RADIO_WL1273 is not set
# CONFIG_USB_DSBR is not set
# CONFIG_USB_KEENE is not set
# CONFIG_USB_MA901 is not set
# CONFIG_USB_MR800 is not set
# CONFIG_USB_RAREMONO is not set
# CONFIG_RADIO_SI470X is not set
CONFIG_MEDIA_PLATFORM_DRIVERS=y
# CONFIG_V4L_PLATFORM_DRIVERS is not set
# CONFIG_DVB_PLATFORM_DRIVERS is not set
# CONFIG_V4L_MEM2MEM_DRIVERS is not set
#
# Allegro DVT media platform drivers
#
#
# Amlogic media platform drivers
#
#
# Amphion drivers
#
#
# Aspeed media platform drivers
#
#
# Atmel media platform drivers
#
#
# Cadence media platform drivers
#
# CONFIG_VIDEO_CADENCE_CSI2RX is not set
# CONFIG_VIDEO_CADENCE_CSI2TX is not set
#
# Chips&Media media platform drivers
#
#
# Intel media platform drivers
#
#
# Marvell media platform drivers
#
#
# Mediatek media platform drivers
#
#
# Microchip Technology, Inc. media platform drivers
#
#
# Nuvoton media platform drivers
#
#
# NVidia media platform drivers
#
#
# NXP media platform drivers
#
#
# Qualcomm media platform drivers
#
#
# Raspberry Pi media platform drivers
#
# CONFIG_VIDEO_RP1_CFE is not set
#
# Renesas media platform drivers
#
#
# Rockchip media platform drivers
#
#
# Samsung media platform drivers
#
#
# STMicroelectronics media platform drivers
#
#
# Sunxi media platform drivers
#
#
# Texas Instruments drivers
#
#
# Verisilicon media platform drivers
#
#
# VIA media platform drivers
#
#
# Xilinx media platform drivers
#
#
# MMC/SDIO DVB adapters
#
CONFIG_SMS_SDIO_DRV=y
#
# FireWire (IEEE 1394) Adapters
#
CONFIG_DVB_FIREDTV=y
CONFIG_DVB_FIREDTV_INPUT=y
CONFIG_MEDIA_COMMON_OPTIONS=y
#
# common driver options
#
CONFIG_CYPRESS_FIRMWARE=y
CONFIG_TTPCI_EEPROM=y
CONFIG_UVC_COMMON=y
CONFIG_VIDEO_CX2341X=y
CONFIG_VIDEO_TVEEPROM=y
CONFIG_DVB_B2C2_FLEXCOP=y
CONFIG_VIDEO_SAA7146=y
CONFIG_VIDEO_SAA7146_VV=y
CONFIG_SMS_SIANO_MDTV=y
CONFIG_SMS_SIANO_RC=y
# CONFIG_SMS_SIANO_DEBUGFS is not set
CONFIG_VIDEOBUF2_CORE=y
CONFIG_VIDEOBUF2_V4L2=y
CONFIG_VIDEOBUF2_MEMOPS=y
CONFIG_VIDEOBUF2_VMALLOC=y
CONFIG_VIDEOBUF2_DMA_SG=y
CONFIG_VIDEOBUF2_DVB=y
# end of Media drivers
CONFIG_MEDIA_HIDE_ANCILLARY_SUBDRV=y
#
# Media ancillary drivers
#
CONFIG_MEDIA_ATTACH=y
#
# IR I2C driver auto-selected by 'Autoselect ancillary drivers'
#
CONFIG_VIDEO_IR_I2C=y
CONFIG_VIDEO_CAMERA_SENSOR=y
# CONFIG_VIDEO_ALVIUM_CSI2 is not set
# CONFIG_VIDEO_AR0521 is not set
# CONFIG_VIDEO_GC0308 is not set
# CONFIG_VIDEO_GC05A2 is not set
# CONFIG_VIDEO_GC08A3 is not set
# CONFIG_VIDEO_GC2145 is not set
# CONFIG_VIDEO_HI556 is not set
# CONFIG_VIDEO_HI846 is not set
# CONFIG_VIDEO_HI847 is not set
# CONFIG_VIDEO_IMX208 is not set
# CONFIG_VIDEO_IMX214 is not set
# CONFIG_VIDEO_IMX219 is not set
# CONFIG_VIDEO_IMX258 is not set
# CONFIG_VIDEO_IMX274 is not set
# CONFIG_VIDEO_IMX283 is not set
# CONFIG_VIDEO_IMX290 is not set
# CONFIG_VIDEO_IMX296 is not set
# CONFIG_VIDEO_IMX319 is not set
# CONFIG_VIDEO_IMX355 is not set
# CONFIG_VIDEO_MT9M001 is not set
# CONFIG_VIDEO_MT9M111 is not set
# CONFIG_VIDEO_MT9M114 is not set
# CONFIG_VIDEO_MT9P031 is not set
# CONFIG_VIDEO_MT9T112 is not set
# CONFIG_VIDEO_MT9V011 is not set
# CONFIG_VIDEO_MT9V032 is not set
# CONFIG_VIDEO_MT9V111 is not set
# CONFIG_VIDEO_OG01A1B is not set
# CONFIG_VIDEO_OV01A10 is not set
# CONFIG_VIDEO_OV02A10 is not set
# CONFIG_VIDEO_OV08D10 is not set
# CONFIG_VIDEO_OV08X40 is not set
# CONFIG_VIDEO_OV13858 is not set
# CONFIG_VIDEO_OV13B10 is not set
# CONFIG_VIDEO_OV2640 is not set
# CONFIG_VIDEO_OV2659 is not set
# CONFIG_VIDEO_OV2680 is not set
# CONFIG_VIDEO_OV2685 is not set
# CONFIG_VIDEO_OV2740 is not set
# CONFIG_VIDEO_OV4689 is not set
# CONFIG_VIDEO_OV5647 is not set
# CONFIG_VIDEO_OV5648 is not set
# CONFIG_VIDEO_OV5670 is not set
# CONFIG_VIDEO_OV5675 is not set
# CONFIG_VIDEO_OV5693 is not set
# CONFIG_VIDEO_OV5695 is not set
# CONFIG_VIDEO_OV64A40 is not set
# CONFIG_VIDEO_OV6650 is not set
# CONFIG_VIDEO_OV7251 is not set
# CONFIG_VIDEO_OV7640 is not set
# CONFIG_VIDEO_OV7670 is not set
# CONFIG_VIDEO_OV772X is not set
# CONFIG_VIDEO_OV7740 is not set
# CONFIG_VIDEO_OV8856 is not set
# CONFIG_VIDEO_OV8858 is not set
# CONFIG_VIDEO_OV8865 is not set
# CONFIG_VIDEO_OV9640 is not set
# CONFIG_VIDEO_OV9650 is not set
# CONFIG_VIDEO_OV9734 is not set
# CONFIG_VIDEO_RDACM20 is not set
# CONFIG_VIDEO_RDACM21 is not set
# CONFIG_VIDEO_RJ54N1 is not set
# CONFIG_VIDEO_S5C73M3 is not set
# CONFIG_VIDEO_S5K5BAF is not set
# CONFIG_VIDEO_S5K6A3 is not set
# CONFIG_VIDEO_CCS is not set
# CONFIG_VIDEO_ET8EK8 is not set
#
# Camera ISPs
#
# CONFIG_VIDEO_THP7312 is not set
# end of Camera ISPs
#
# Lens drivers
#
# CONFIG_VIDEO_AD5820 is not set
# CONFIG_VIDEO_AK7375 is not set
# CONFIG_VIDEO_DW9714 is not set
# CONFIG_VIDEO_DW9719 is not set
# CONFIG_VIDEO_DW9768 is not set
# CONFIG_VIDEO_DW9807_VCM is not set
# end of Lens drivers
#
# Flash devices
#
# CONFIG_VIDEO_ADP1653 is not set
# CONFIG_VIDEO_LM3560 is not set
# CONFIG_VIDEO_LM3646 is not set
# end of Flash devices
#
# audio, video and radio I2C drivers auto-selected by 'Autoselect ancillary drivers'
#
CONFIG_VIDEO_CS3308=y
CONFIG_VIDEO_CS5345=y
CONFIG_VIDEO_CS53L32A=y
CONFIG_VIDEO_MSP3400=y
CONFIG_VIDEO_TDA7432=y
CONFIG_VIDEO_TVAUDIO=y
CONFIG_VIDEO_VP27SMPX=y
CONFIG_VIDEO_WM8739=y
CONFIG_VIDEO_WM8775=y
CONFIG_VIDEO_SAA6588=y
CONFIG_VIDEO_SAA711X=y
#
# Video and audio decoders
#
CONFIG_VIDEO_SAA717X=y
CONFIG_VIDEO_CX25840=y
CONFIG_VIDEO_SAA7127=y
CONFIG_VIDEO_UPD64031A=y
CONFIG_VIDEO_UPD64083=y
CONFIG_VIDEO_SAA6752HS=y
CONFIG_VIDEO_M52790=y
#
# Video serializers and deserializers
#
# end of Video serializers and deserializers
#
# SPI I2C drivers auto-selected by 'Autoselect ancillary drivers'
#
#
# Media SPI Adapters
#
# CONFIG_CXD2880_SPI_DRV is not set
# CONFIG_VIDEO_GS1662 is not set
# end of Media SPI Adapters
CONFIG_MEDIA_TUNER=y
#
# Tuner drivers auto-selected by 'Autoselect ancillary drivers'
#
CONFIG_MEDIA_TUNER_E4000=y
CONFIG_MEDIA_TUNER_FC0011=y
CONFIG_MEDIA_TUNER_FC0012=y
CONFIG_MEDIA_TUNER_FC0013=y
CONFIG_MEDIA_TUNER_FC2580=y
CONFIG_MEDIA_TUNER_IT913X=y
CONFIG_MEDIA_TUNER_M88RS6000T=y
CONFIG_MEDIA_TUNER_MAX2165=y
CONFIG_MEDIA_TUNER_MC44S803=y
CONFIG_MEDIA_TUNER_MT2060=y
CONFIG_MEDIA_TUNER_MT2063=y
CONFIG_MEDIA_TUNER_MT20XX=y
CONFIG_MEDIA_TUNER_MT2131=y
CONFIG_MEDIA_TUNER_MT2266=y
CONFIG_MEDIA_TUNER_MXL5005S=y
CONFIG_MEDIA_TUNER_MXL5007T=y
CONFIG_MEDIA_TUNER_QM1D1B0004=y
CONFIG_MEDIA_TUNER_QM1D1C0042=y
CONFIG_MEDIA_TUNER_QT1010=y
CONFIG_MEDIA_TUNER_R820T=y
CONFIG_MEDIA_TUNER_SI2157=y
CONFIG_MEDIA_TUNER_SIMPLE=y
CONFIG_MEDIA_TUNER_TDA18212=y
CONFIG_MEDIA_TUNER_TDA18218=y
CONFIG_MEDIA_TUNER_TDA18250=y
CONFIG_MEDIA_TUNER_TDA18271=y
CONFIG_MEDIA_TUNER_TDA827X=y
CONFIG_MEDIA_TUNER_TDA8290=y
CONFIG_MEDIA_TUNER_TDA9887=y
CONFIG_MEDIA_TUNER_TEA5761=y
CONFIG_MEDIA_TUNER_TEA5767=y
CONFIG_MEDIA_TUNER_TUA9001=y
CONFIG_MEDIA_TUNER_XC2028=y
CONFIG_MEDIA_TUNER_XC4000=y
CONFIG_MEDIA_TUNER_XC5000=y
#
# DVB Frontend drivers auto-selected by 'Autoselect ancillary drivers'
#
#
# Multistandard (satellite) frontends
#
CONFIG_DVB_M88DS3103=y
CONFIG_DVB_MXL5XX=y
CONFIG_DVB_STB0899=y
CONFIG_DVB_STB6100=y
CONFIG_DVB_STV090x=y
CONFIG_DVB_STV0910=y
CONFIG_DVB_STV6110x=y
CONFIG_DVB_STV6111=y
#
# Multistandard (cable + terrestrial) frontends
#
CONFIG_DVB_DRXK=y
CONFIG_DVB_MN88472=y
CONFIG_DVB_MN88473=y
CONFIG_DVB_SI2165=y
CONFIG_DVB_TDA18271C2DD=y
#
# DVB-S (satellite) frontends
#
CONFIG_DVB_CX24110=y
CONFIG_DVB_CX24116=y
CONFIG_DVB_CX24117=y
CONFIG_DVB_CX24120=y
CONFIG_DVB_CX24123=y
CONFIG_DVB_DS3000=y
CONFIG_DVB_MB86A16=y
CONFIG_DVB_MT312=y
CONFIG_DVB_S5H1420=y
CONFIG_DVB_SI21XX=y
CONFIG_DVB_STB6000=y
CONFIG_DVB_STV0288=y
CONFIG_DVB_STV0299=y
CONFIG_DVB_STV0900=y
CONFIG_DVB_STV6110=y
CONFIG_DVB_TDA10071=y
CONFIG_DVB_TDA10086=y
CONFIG_DVB_TDA8083=y
CONFIG_DVB_TDA8261=y
CONFIG_DVB_TDA826X=y
CONFIG_DVB_TS2020=y
CONFIG_DVB_TUA6100=y
CONFIG_DVB_TUNER_CX24113=y
CONFIG_DVB_TUNER_ITD1000=y
CONFIG_DVB_VES1X93=y
CONFIG_DVB_ZL10036=y
CONFIG_DVB_ZL10039=y
#
# DVB-T (terrestrial) frontends
#
CONFIG_DVB_AF9013=y
CONFIG_DVB_CX22700=y
CONFIG_DVB_CX22702=y
CONFIG_DVB_CXD2820R=y
CONFIG_DVB_CXD2841ER=y
CONFIG_DVB_DIB3000MB=y
CONFIG_DVB_DIB3000MC=y
CONFIG_DVB_DIB7000M=y
CONFIG_DVB_DIB7000P=y
CONFIG_DVB_DRXD=y
CONFIG_DVB_EC100=y
CONFIG_DVB_GP8PSK_FE=y
CONFIG_DVB_L64781=y
CONFIG_DVB_MT352=y
CONFIG_DVB_NXT6000=y
CONFIG_DVB_RTL2830=y
CONFIG_DVB_RTL2832=y
CONFIG_DVB_SI2168=y
CONFIG_DVB_SP887X=y
CONFIG_DVB_STV0367=y
CONFIG_DVB_TDA10048=y
CONFIG_DVB_TDA1004X=y
CONFIG_DVB_ZL10353=y
#
# DVB-C (cable) frontends
#
CONFIG_DVB_STV0297=y
CONFIG_DVB_TDA10021=y
CONFIG_DVB_TDA10023=y
CONFIG_DVB_VES1820=y
#
# ATSC (North American/Korean Terrestrial/Cable DTV) frontends
#
CONFIG_DVB_AU8522=y
CONFIG_DVB_AU8522_DTV=y
CONFIG_DVB_AU8522_V4L=y
CONFIG_DVB_BCM3510=y
CONFIG_DVB_LG2160=y
CONFIG_DVB_LGDT3305=y
CONFIG_DVB_LGDT3306A=y
CONFIG_DVB_LGDT330X=y
CONFIG_DVB_MXL692=y
CONFIG_DVB_NXT200X=y
CONFIG_DVB_OR51132=y
CONFIG_DVB_OR51211=y
CONFIG_DVB_S5H1409=y
CONFIG_DVB_S5H1411=y
#
# ISDB-T (terrestrial) frontends
#
CONFIG_DVB_DIB8000=y
CONFIG_DVB_MB86A20S=y
CONFIG_DVB_S921=y
#
# ISDB-S (satellite) & ISDB-T (terrestrial) frontends
#
CONFIG_DVB_TC90522=y
#
# Digital terrestrial only tuners/PLL
#
CONFIG_DVB_PLL=y
CONFIG_DVB_TUNER_DIB0070=y
CONFIG_DVB_TUNER_DIB0090=y
#
# SEC control devices for DVB-S
#
CONFIG_DVB_A8293=y
CONFIG_DVB_AF9033=y
CONFIG_DVB_ATBM8830=y
CONFIG_DVB_ISL6405=y
CONFIG_DVB_ISL6421=y
CONFIG_DVB_ISL6423=y
CONFIG_DVB_IX2505V=y
CONFIG_DVB_LGS8GXX=y
CONFIG_DVB_LNBH25=y
CONFIG_DVB_LNBP21=y
CONFIG_DVB_LNBP22=y
CONFIG_DVB_M88RS2000=y
CONFIG_DVB_TDA665x=y
CONFIG_DVB_DRX39XYJ=y
#
# Common Interface (EN50221) controller drivers
#
CONFIG_DVB_CXD2099=y
# end of Media ancillary drivers
#
# Graphics support
#
CONFIG_APERTURE_HELPERS=y
CONFIG_SCREEN_INFO=y
CONFIG_VIDEO=y
# CONFIG_AUXDISPLAY is not set
# CONFIG_PANEL is not set
# CONFIG_AGP is not set
CONFIG_VGA_SWITCHEROO=y
# CONFIG_DRM is not set
CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y
#
# Frame buffer Devices
#
CONFIG_FB=y
# CONFIG_FB_CIRRUS is not set
# CONFIG_FB_PM2 is not set
# CONFIG_FB_CYBER2000 is not set
# CONFIG_FB_ARC is not set
# CONFIG_FB_ASILIANT is not set
# CONFIG_FB_IMSTT is not set
# CONFIG_FB_VGA16 is not set
# CONFIG_FB_UVESA is not set
CONFIG_FB_VESA=y
CONFIG_FB_EFI=y
# CONFIG_FB_N411 is not set
# CONFIG_FB_HGA is not set
# CONFIG_FB_OPENCORES is not set
# CONFIG_FB_S1D13XXX is not set
# CONFIG_FB_NVIDIA is not set
# CONFIG_FB_RIVA is not set
# CONFIG_FB_I740 is not set
# CONFIG_FB_MATROX is not set
# CONFIG_FB_RADEON is not set
# CONFIG_FB_ATY128 is not set
# CONFIG_FB_ATY is not set
# CONFIG_FB_S3 is not set
# CONFIG_FB_SAVAGE is not set
# CONFIG_FB_SIS is not set
# CONFIG_FB_VIA is not set
# CONFIG_FB_NEOMAGIC is not set
# CONFIG_FB_KYRO is not set
# CONFIG_FB_3DFX is not set
# CONFIG_FB_VOODOO1 is not set
# CONFIG_FB_VT8623 is not set
# CONFIG_FB_TRIDENT is not set
# CONFIG_FB_ARK is not set
# CONFIG_FB_PM3 is not set
# CONFIG_FB_CARMINE is not set
# CONFIG_FB_SM501 is not set
# CONFIG_FB_SMSCUFX is not set
# CONFIG_FB_UDL is not set
# CONFIG_FB_IBM_GXT4500 is not set
# CONFIG_FB_VIRTUAL is not set
# CONFIG_XEN_FBDEV_FRONTEND is not set
# CONFIG_FB_METRONOME is not set
# CONFIG_FB_MB862XX is not set
CONFIG_FB_HYPERV=y
# CONFIG_FB_SIMPLE is not set
# CONFIG_FB_SSD1307 is not set
# CONFIG_FB_SM712 is not set
CONFIG_FB_CORE=y
CONFIG_FB_NOTIFY=y
# CONFIG_FIRMWARE_EDID is not set
CONFIG_FB_DEVICE=y
CONFIG_FB_CFB_FILLRECT=y
CONFIG_FB_CFB_COPYAREA=y
CONFIG_FB_CFB_IMAGEBLIT=y
CONFIG_FB_SYS_FILLRECT=y
CONFIG_FB_SYS_COPYAREA=y
CONFIG_FB_SYS_IMAGEBLIT=y
# CONFIG_FB_FOREIGN_ENDIAN is not set
CONFIG_FB_SYSMEM_FOPS=y
CONFIG_FB_DEFERRED_IO=y
CONFIG_FB_IOMEM_FOPS=y
CONFIG_FB_IOMEM_HELPERS=y
CONFIG_FB_IOMEM_HELPERS_DEFERRED=y
CONFIG_FB_SYSMEM_HELPERS=y
CONFIG_FB_SYSMEM_HELPERS_DEFERRED=y
# CONFIG_FB_MODE_HELPERS is not set
CONFIG_FB_TILEBLITTING=y
# end of Frame buffer Devices
#
# Backlight & LCD device support
#
CONFIG_LCD_CLASS_DEVICE=y
# CONFIG_LCD_L4F00242T03 is not set
# CONFIG_LCD_LMS283GF05 is not set
# CONFIG_LCD_LTV350QV is not set
# CONFIG_LCD_ILI922X is not set
# CONFIG_LCD_ILI9320 is not set
# CONFIG_LCD_TDO24M is not set
# CONFIG_LCD_VGG2432A4 is not set
CONFIG_LCD_PLATFORM=y
# CONFIG_LCD_AMS369FG06 is not set
# CONFIG_LCD_LMS501KF03 is not set
# CONFIG_LCD_HX8357 is not set
# CONFIG_LCD_OTM3225A is not set
CONFIG_BACKLIGHT_CLASS_DEVICE=y
# CONFIG_BACKLIGHT_KTD253 is not set
# CONFIG_BACKLIGHT_KTD2801 is not set
# CONFIG_BACKLIGHT_KTZ8866 is not set
# CONFIG_BACKLIGHT_PWM is not set
CONFIG_BACKLIGHT_APPLE=y
# CONFIG_BACKLIGHT_QCOM_WLED is not set
# CONFIG_BACKLIGHT_SAHARA is not set
# CONFIG_BACKLIGHT_ADP8860 is not set
# CONFIG_BACKLIGHT_ADP8870 is not set
# CONFIG_BACKLIGHT_LM3509 is not set
# CONFIG_BACKLIGHT_LM3630A is not set
# CONFIG_BACKLIGHT_LM3639 is not set
CONFIG_BACKLIGHT_LP855X=y
# CONFIG_BACKLIGHT_MP3309C is not set
# CONFIG_BACKLIGHT_GPIO is not set
# CONFIG_BACKLIGHT_LV5207LP is not set
# CONFIG_BACKLIGHT_BD6107 is not set
# CONFIG_BACKLIGHT_ARCXCNN is not set
# end of Backlight & LCD device support
#
# Console display driver support
#
CONFIG_VGA_CONSOLE=y
CONFIG_DUMMY_CONSOLE=y
CONFIG_DUMMY_CONSOLE_COLUMNS=80
CONFIG_DUMMY_CONSOLE_ROWS=25
CONFIG_FRAMEBUFFER_CONSOLE=y
# CONFIG_FRAMEBUFFER_CONSOLE_LEGACY_ACCELERATION is not set
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
# CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER is not set
# end of Console display driver support
CONFIG_LOGO=y
# CONFIG_LOGO_LINUX_MONO is not set
# CONFIG_LOGO_LINUX_VGA16 is not set
CONFIG_LOGO_LINUX_CLUT224=y
# end of Graphics support
CONFIG_SOUND=y
CONFIG_SOUND_OSS_CORE=y
CONFIG_SOUND_OSS_CORE_PRECLAIM=y
CONFIG_SND=y
CONFIG_SND_TIMER=y
CONFIG_SND_PCM=y
CONFIG_SND_PCM_ELD=y
CONFIG_SND_HWDEP=y
CONFIG_SND_SEQ_DEVICE=y
CONFIG_SND_RAWMIDI=y
CONFIG_SND_COMPRESS_OFFLOAD=y
CONFIG_SND_JACK=y
CONFIG_SND_JACK_INPUT_DEV=y
CONFIG_SND_OSSEMUL=y
# CONFIG_SND_MIXER_OSS is not set
# CONFIG_SND_PCM_OSS is not set
CONFIG_SND_PCM_TIMER=y
CONFIG_SND_HRTIMER=y
CONFIG_SND_DYNAMIC_MINORS=y
CONFIG_SND_MAX_CARDS=32
# CONFIG_SND_SUPPORT_OLD_API is not set
CONFIG_SND_PROC_FS=y
CONFIG_SND_VERBOSE_PROCFS=y
CONFIG_SND_CTL_FAST_LOOKUP=y
# CONFIG_SND_DEBUG is not set
# CONFIG_SND_CTL_INPUT_VALIDATION is not set
# CONFIG_SND_UTIMER is not set
CONFIG_SND_VMASTER=y
CONFIG_SND_DMA_SGBUF=y
CONFIG_SND_CTL_LED=y
CONFIG_SND_SEQUENCER=y
CONFIG_SND_SEQ_DUMMY=y
CONFIG_SND_SEQUENCER_OSS=y
CONFIG_SND_SEQ_HRTIMER_DEFAULT=y
CONFIG_SND_SEQ_MIDI_EVENT=y
CONFIG_SND_SEQ_MIDI=y
CONFIG_SND_SEQ_MIDI_EMUL=y
CONFIG_SND_SEQ_VIRMIDI=y
# CONFIG_SND_SEQ_UMP is not set
CONFIG_SND_MPU401_UART=y
CONFIG_SND_OPL3_LIB=y
CONFIG_SND_OPL3_LIB_SEQ=y
CONFIG_SND_VX_LIB=y
CONFIG_SND_AC97_CODEC=y
CONFIG_SND_DRIVERS=y
CONFIG_SND_PCSP=y
CONFIG_SND_DUMMY=y
CONFIG_SND_ALOOP=y
# CONFIG_SND_PCMTEST is not set
CONFIG_SND_VIRMIDI=y
CONFIG_SND_MTPAV=y
# CONFIG_SND_MTS64 is not set
# CONFIG_SND_SERIAL_U16550 is not set
CONFIG_SND_MPU401=y
# CONFIG_SND_PORTMAN2X4 is not set
CONFIG_SND_AC97_POWER_SAVE=y
CONFIG_SND_AC97_POWER_SAVE_DEFAULT=5
CONFIG_SND_PCI=y
CONFIG_SND_AD1889=y
# CONFIG_SND_ALS300 is not set
# CONFIG_SND_ALS4000 is not set
CONFIG_SND_ALI5451=y
CONFIG_SND_ASIHPI=y
CONFIG_SND_ATIIXP=y
CONFIG_SND_ATIIXP_MODEM=y
CONFIG_SND_AU8810=y
CONFIG_SND_AU8820=y
CONFIG_SND_AU8830=y
# CONFIG_SND_AW2 is not set
# CONFIG_SND_AZT3328 is not set
CONFIG_SND_BT87X=y
# CONFIG_SND_BT87X_OVERCLOCK is not set
CONFIG_SND_CA0106=y
CONFIG_SND_CMIPCI=y
CONFIG_SND_OXYGEN_LIB=y
CONFIG_SND_OXYGEN=y
# CONFIG_SND_CS4281 is not set
CONFIG_SND_CS46XX=y
CONFIG_SND_CS46XX_NEW_DSP=y
CONFIG_SND_CTXFI=y
CONFIG_SND_DARLA20=y
CONFIG_SND_GINA20=y
CONFIG_SND_LAYLA20=y
CONFIG_SND_DARLA24=y
CONFIG_SND_GINA24=y
CONFIG_SND_LAYLA24=y
CONFIG_SND_MONA=y
CONFIG_SND_MIA=y
CONFIG_SND_ECHO3G=y
CONFIG_SND_INDIGO=y
CONFIG_SND_INDIGOIO=y
CONFIG_SND_INDIGODJ=y
CONFIG_SND_INDIGOIOX=y
CONFIG_SND_INDIGODJX=y
CONFIG_SND_EMU10K1=y
CONFIG_SND_EMU10K1_SEQ=y
CONFIG_SND_EMU10K1X=y
CONFIG_SND_ENS1370=y
CONFIG_SND_ENS1371=y
# CONFIG_SND_ES1938 is not set
CONFIG_SND_ES1968=y
CONFIG_SND_ES1968_INPUT=y
CONFIG_SND_ES1968_RADIO=y
# CONFIG_SND_FM801 is not set
CONFIG_SND_HDSP=y
#
# Don't forget to add built-in firmwares for HDSP driver
#
CONFIG_SND_HDSPM=y
CONFIG_SND_ICE1712=y
CONFIG_SND_ICE1724=y
CONFIG_SND_INTEL8X0=y
CONFIG_SND_INTEL8X0M=y
CONFIG_SND_KORG1212=y
CONFIG_SND_LOLA=y
CONFIG_SND_LX6464ES=y
CONFIG_SND_MAESTRO3=y
CONFIG_SND_MAESTRO3_INPUT=y
CONFIG_SND_MIXART=y
# CONFIG_SND_NM256 is not set
CONFIG_SND_PCXHR=y
# CONFIG_SND_RIPTIDE is not set
CONFIG_SND_RME32=y
CONFIG_SND_RME96=y
CONFIG_SND_RME9652=y
# CONFIG_SND_SONICVIBES is not set
CONFIG_SND_TRIDENT=y
CONFIG_SND_VIA82XX=y
CONFIG_SND_VIA82XX_MODEM=y
CONFIG_SND_VIRTUOSO=y
CONFIG_SND_VX222=y
# CONFIG_SND_YMFPCI is not set
#
# HD-Audio
#
CONFIG_SND_HDA=y
CONFIG_SND_HDA_GENERIC_LEDS=y
CONFIG_SND_HDA_INTEL=y
CONFIG_SND_HDA_HWDEP=y
CONFIG_SND_HDA_RECONFIG=y
CONFIG_SND_HDA_INPUT_BEEP=y
CONFIG_SND_HDA_INPUT_BEEP_MODE=0
CONFIG_SND_HDA_PATCH_LOADER=y
CONFIG_SND_HDA_SCODEC_COMPONENT=y
# CONFIG_SND_HDA_SCODEC_CS35L41_I2C is not set
# CONFIG_SND_HDA_SCODEC_CS35L41_SPI is not set
# CONFIG_SND_HDA_SCODEC_CS35L56_I2C is not set
# CONFIG_SND_HDA_SCODEC_CS35L56_SPI is not set
# CONFIG_SND_HDA_SCODEC_TAS2781_I2C is not set
# CONFIG_SND_HDA_SCODEC_TAS2781_SPI is not set
CONFIG_SND_HDA_CODEC_REALTEK=y
CONFIG_SND_HDA_CODEC_ANALOG=y
CONFIG_SND_HDA_CODEC_SIGMATEL=y
CONFIG_SND_HDA_CODEC_VIA=y
CONFIG_SND_HDA_CODEC_HDMI=y
CONFIG_SND_HDA_CODEC_CIRRUS=y
# CONFIG_SND_HDA_CODEC_CS8409 is not set
CONFIG_SND_HDA_CODEC_CONEXANT=y
# CONFIG_SND_HDA_CODEC_SENARYTECH is not set
CONFIG_SND_HDA_CODEC_CA0110=y
CONFIG_SND_HDA_CODEC_CA0132=y
CONFIG_SND_HDA_CODEC_CA0132_DSP=y
CONFIG_SND_HDA_CODEC_CMEDIA=y
CONFIG_SND_HDA_CODEC_SI3054=y
CONFIG_SND_HDA_GENERIC=y
CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0
# CONFIG_SND_HDA_INTEL_HDMI_SILENT_STREAM is not set
# CONFIG_SND_HDA_CTL_DEV_ID is not set
# end of HD-Audio
CONFIG_SND_HDA_CORE=y
CONFIG_SND_HDA_DSP_LOADER=y
CONFIG_SND_HDA_PREALLOC_SIZE=0
CONFIG_SND_INTEL_NHLT=y
CONFIG_SND_INTEL_DSP_CONFIG=y
CONFIG_SND_INTEL_SOUNDWIRE_ACPI=y
# CONFIG_SND_SPI is not set
CONFIG_SND_USB=y
CONFIG_SND_USB_AUDIO=y
# CONFIG_SND_USB_AUDIO_MIDI_V2 is not set
CONFIG_SND_USB_AUDIO_USE_MEDIA_CONTROLLER=y
CONFIG_SND_USB_UA101=y
CONFIG_SND_USB_USX2Y=y
CONFIG_SND_USB_CAIAQ=y
CONFIG_SND_USB_CAIAQ_INPUT=y
CONFIG_SND_USB_US122L=y
CONFIG_SND_USB_6FIRE=y
CONFIG_SND_USB_HIFACE=y
CONFIG_SND_BCD2000=y
CONFIG_SND_USB_LINE6=y
CONFIG_SND_USB_POD=y
CONFIG_SND_USB_PODHD=y
CONFIG_SND_USB_TONEPORT=y
CONFIG_SND_USB_VARIAX=y
CONFIG_SND_FIREWIRE=y
CONFIG_SND_FIREWIRE_LIB=y
CONFIG_SND_DICE=y
CONFIG_SND_OXFW=y
CONFIG_SND_ISIGHT=y
CONFIG_SND_FIREWORKS=y
CONFIG_SND_BEBOB=y
CONFIG_SND_FIREWIRE_DIGI00X=y
CONFIG_SND_FIREWIRE_TASCAM=y
CONFIG_SND_FIREWIRE_MOTU=y
CONFIG_SND_FIREFACE=y
CONFIG_SND_SOC=y
CONFIG_SND_SOC_COMPRESS=y
CONFIG_SND_SOC_ACPI=y
# CONFIG_SND_SOC_ADI is not set
# CONFIG_SND_SOC_AMD_ACP is not set
# CONFIG_SND_SOC_AMD_ACP3x is not set
# CONFIG_SND_SOC_AMD_RENOIR is not set
# CONFIG_SND_SOC_AMD_ACP5x is not set
# CONFIG_SND_SOC_AMD_ACP6x is not set
# CONFIG_SND_AMD_ACP_CONFIG is not set
# CONFIG_SND_SOC_AMD_ACP_COMMON is not set
# CONFIG_SND_SOC_AMD_RPL_ACP6x is not set
# CONFIG_SND_ATMEL_SOC is not set
# CONFIG_SND_BCM63XX_I2S_WHISTLER is not set
# CONFIG_SND_DESIGNWARE_I2S is not set
#
# SoC Audio for Freescale CPUs
#
#
# Common SoC Audio options for Freescale CPUs:
#
# CONFIG_SND_SOC_FSL_ASRC is not set
# CONFIG_SND_SOC_FSL_SAI is not set
# CONFIG_SND_SOC_FSL_AUDMIX is not set
# CONFIG_SND_SOC_FSL_SSI is not set
# CONFIG_SND_SOC_FSL_SPDIF is not set
# CONFIG_SND_SOC_FSL_ESAI is not set
# CONFIG_SND_SOC_FSL_MICFIL is not set
# CONFIG_SND_SOC_FSL_XCVR is not set
# CONFIG_SND_SOC_IMX_AUDMUX is not set
# end of SoC Audio for Freescale CPUs
# CONFIG_SND_SOC_CHV3_I2S is not set
# CONFIG_SND_I2S_HI6210_I2S is not set
#
# SoC Audio for Loongson CPUs
#
# end of SoC Audio for Loongson CPUs
# CONFIG_SND_SOC_IMG is not set
CONFIG_SND_SOC_INTEL_SST_TOPLEVEL=y
# CONFIG_SND_SOC_INTEL_CATPT is not set
CONFIG_SND_SST_ATOM_HIFI2_PLATFORM=y
# CONFIG_SND_SST_ATOM_HIFI2_PLATFORM_PCI is not set
CONFIG_SND_SST_ATOM_HIFI2_PLATFORM_ACPI=y
CONFIG_SND_SOC_ACPI_INTEL_MATCH=y
CONFIG_SND_SOC_ACPI_INTEL_SDCA_QUIRKS=y
# CONFIG_SND_SOC_INTEL_AVS is not set
CONFIG_SND_SOC_INTEL_MACH=y
# CONFIG_SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES is not set
CONFIG_SND_SOC_INTEL_BYTCR_RT5640_MACH=y
CONFIG_SND_SOC_INTEL_BYTCR_RT5651_MACH=y
CONFIG_SND_SOC_INTEL_CHT_BSW_RT5672_MACH=y
CONFIG_SND_SOC_INTEL_CHT_BSW_RT5645_MACH=y
CONFIG_SND_SOC_INTEL_CHT_BSW_MAX98090_TI_MACH=y
CONFIG_SND_SOC_INTEL_CHT_BSW_NAU8824_MACH=y
# CONFIG_SND_SOC_INTEL_BYT_CHT_CX2072X_MACH is not set
CONFIG_SND_SOC_INTEL_BYT_CHT_DA7213_MACH=y
CONFIG_SND_SOC_INTEL_BYT_CHT_ES8316_MACH=y
CONFIG_SND_SOC_INTEL_BYT_CHT_NOCODEC_MACH=y
# CONFIG_SND_SOC_MTK_BTCVSD is not set
CONFIG_SND_SOC_SDCA=y
CONFIG_SND_SOC_SDCA_OPTIONAL=y
# CONFIG_SND_SOC_SOF_TOPLEVEL is not set
#
# STMicroelectronics STM32 SOC audio support
#
# end of STMicroelectronics STM32 SOC audio support
# CONFIG_SND_SOC_XILINX_I2S is not set
# CONFIG_SND_SOC_XILINX_AUDIO_FORMATTER is not set
# CONFIG_SND_SOC_XILINX_SPDIF is not set
# CONFIG_SND_SOC_XTFPGA_I2S is not set
CONFIG_SND_SOC_I2C_AND_SPI=y
#
# CODEC drivers
#
# CONFIG_SND_SOC_AC97_CODEC is not set
# CONFIG_SND_SOC_ADAU1372_I2C is not set
# CONFIG_SND_SOC_ADAU1372_SPI is not set
# CONFIG_SND_SOC_ADAU1373 is not set
# CONFIG_SND_SOC_ADAU1701 is not set
# CONFIG_SND_SOC_ADAU1761_I2C is not set
# CONFIG_SND_SOC_ADAU1761_SPI is not set
# CONFIG_SND_SOC_ADAU7002 is not set
# CONFIG_SND_SOC_ADAU7118_HW is not set
# CONFIG_SND_SOC_ADAU7118_I2C is not set
# CONFIG_SND_SOC_AK4104 is not set
# CONFIG_SND_SOC_AK4118 is not set
# CONFIG_SND_SOC_AK4375 is not set
# CONFIG_SND_SOC_AK4458 is not set
# CONFIG_SND_SOC_AK4554 is not set
# CONFIG_SND_SOC_AK4613 is not set
# CONFIG_SND_SOC_AK4619 is not set
# CONFIG_SND_SOC_AK4642 is not set
# CONFIG_SND_SOC_AK5386 is not set
# CONFIG_SND_SOC_AK5558 is not set
# CONFIG_SND_SOC_ALC5623 is not set
# CONFIG_SND_SOC_AUDIO_IIO_AUX is not set
# CONFIG_SND_SOC_AW8738 is not set
# CONFIG_SND_SOC_AW88395 is not set
# CONFIG_SND_SOC_AW88166 is not set
# CONFIG_SND_SOC_AW88261 is not set
# CONFIG_SND_SOC_AW88081 is not set
# CONFIG_SND_SOC_AW87390 is not set
# CONFIG_SND_SOC_AW88399 is not set
# CONFIG_SND_SOC_BD28623 is not set
# CONFIG_SND_SOC_BT_SCO is not set
# CONFIG_SND_SOC_CHV3_CODEC is not set
# CONFIG_SND_SOC_CS35L32 is not set
# CONFIG_SND_SOC_CS35L33 is not set
# CONFIG_SND_SOC_CS35L34 is not set
# CONFIG_SND_SOC_CS35L35 is not set
# CONFIG_SND_SOC_CS35L36 is not set
# CONFIG_SND_SOC_CS35L41_SPI is not set
# CONFIG_SND_SOC_CS35L41_I2C is not set
# CONFIG_SND_SOC_CS35L45_SPI is not set
# CONFIG_SND_SOC_CS35L45_I2C is not set
# CONFIG_SND_SOC_CS35L56_I2C is not set
# CONFIG_SND_SOC_CS35L56_SPI is not set
# CONFIG_SND_SOC_CS42L42 is not set
# CONFIG_SND_SOC_CS42L51_I2C is not set
# CONFIG_SND_SOC_CS42L52 is not set
# CONFIG_SND_SOC_CS42L56 is not set
# CONFIG_SND_SOC_CS42L73 is not set
# CONFIG_SND_SOC_CS42L83 is not set
# CONFIG_SND_SOC_CS42L84 is not set
# CONFIG_SND_SOC_CS4234 is not set
# CONFIG_SND_SOC_CS4265 is not set
# CONFIG_SND_SOC_CS4270 is not set
# CONFIG_SND_SOC_CS4271_I2C is not set
# CONFIG_SND_SOC_CS4271_SPI is not set
# CONFIG_SND_SOC_CS42XX8_I2C is not set
# CONFIG_SND_SOC_CS43130 is not set
# CONFIG_SND_SOC_CS4341 is not set
# CONFIG_SND_SOC_CS4349 is not set
# CONFIG_SND_SOC_CS53L30 is not set
# CONFIG_SND_SOC_CS530X_I2C is not set
# CONFIG_SND_SOC_CX2072X is not set
CONFIG_SND_SOC_DA7213=y
CONFIG_SND_SOC_DMIC=y
# CONFIG_SND_SOC_ES7134 is not set
# CONFIG_SND_SOC_ES7241 is not set
CONFIG_SND_SOC_ES83XX_DSM_COMMON=y
# CONFIG_SND_SOC_ES8311 is not set
CONFIG_SND_SOC_ES8316=y
# CONFIG_SND_SOC_ES8323 is not set
# CONFIG_SND_SOC_ES8326 is not set
# CONFIG_SND_SOC_ES8328_I2C is not set
# CONFIG_SND_SOC_ES8328_SPI is not set
# CONFIG_SND_SOC_GTM601 is not set
# CONFIG_SND_SOC_HDA is not set
# CONFIG_SND_SOC_ICS43432 is not set
# CONFIG_SND_SOC_IDT821034 is not set
# CONFIG_SND_SOC_MAX98088 is not set
CONFIG_SND_SOC_MAX98090=y
CONFIG_SND_SOC_MAX98357A=y
# CONFIG_SND_SOC_MAX98504 is not set
# CONFIG_SND_SOC_MAX9867 is not set
CONFIG_SND_SOC_MAX98927=y
# CONFIG_SND_SOC_MAX98520 is not set
# CONFIG_SND_SOC_MAX98373_I2C is not set
# CONFIG_SND_SOC_MAX98388 is not set
CONFIG_SND_SOC_MAX98390=y
# CONFIG_SND_SOC_MAX98396 is not set
# CONFIG_SND_SOC_MAX9860 is not set
# CONFIG_SND_SOC_MSM8916_WCD_DIGITAL is not set
# CONFIG_SND_SOC_PCM1681 is not set
# CONFIG_SND_SOC_PCM1789_I2C is not set
# CONFIG_SND_SOC_PCM179X_I2C is not set
# CONFIG_SND_SOC_PCM179X_SPI is not set
# CONFIG_SND_SOC_PCM186X_I2C is not set
# CONFIG_SND_SOC_PCM186X_SPI is not set
# CONFIG_SND_SOC_PCM3060_I2C is not set
# CONFIG_SND_SOC_PCM3060_SPI is not set
# CONFIG_SND_SOC_PCM3168A_I2C is not set
# CONFIG_SND_SOC_PCM3168A_SPI is not set
# CONFIG_SND_SOC_PCM5102A is not set
# CONFIG_SND_SOC_PCM512x_I2C is not set
# CONFIG_SND_SOC_PCM512x_SPI is not set
# CONFIG_SND_SOC_PCM6240 is not set
# CONFIG_SND_SOC_PEB2466 is not set
CONFIG_SND_SOC_RL6231=y
# CONFIG_SND_SOC_RT5616 is not set
# CONFIG_SND_SOC_RT5631 is not set
CONFIG_SND_SOC_RT5640=y
CONFIG_SND_SOC_RT5645=y
CONFIG_SND_SOC_RT5651=y
# CONFIG_SND_SOC_RT5659 is not set
CONFIG_SND_SOC_RT5670=y
# CONFIG_SND_SOC_RT9120 is not set
# CONFIG_SND_SOC_RTQ9128 is not set
# CONFIG_SND_SOC_SGTL5000 is not set
# CONFIG_SND_SOC_SIMPLE_AMPLIFIER is not set
# CONFIG_SND_SOC_SIMPLE_MUX is not set
# CONFIG_SND_SOC_SMA1303 is not set
# CONFIG_SND_SOC_SMA1307 is not set
# CONFIG_SND_SOC_SPDIF is not set
# CONFIG_SND_SOC_SRC4XXX_I2C is not set
# CONFIG_SND_SOC_SSM2305 is not set
# CONFIG_SND_SOC_SSM2518 is not set
# CONFIG_SND_SOC_SSM2602_SPI is not set
# CONFIG_SND_SOC_SSM2602_I2C is not set
CONFIG_SND_SOC_SSM4567=y
# CONFIG_SND_SOC_STA32X is not set
# CONFIG_SND_SOC_STA350 is not set
# CONFIG_SND_SOC_STI_SAS is not set
# CONFIG_SND_SOC_TAS2552 is not set
# CONFIG_SND_SOC_TAS2562 is not set
# CONFIG_SND_SOC_TAS2764 is not set
# CONFIG_SND_SOC_TAS2770 is not set
# CONFIG_SND_SOC_TAS2780 is not set
# CONFIG_SND_SOC_TAS2781_I2C is not set
# CONFIG_SND_SOC_TAS5086 is not set
# CONFIG_SND_SOC_TAS571X is not set
# CONFIG_SND_SOC_TAS5720 is not set
# CONFIG_SND_SOC_TAS5805M is not set
# CONFIG_SND_SOC_TAS6424 is not set
# CONFIG_SND_SOC_TDA7419 is not set
# CONFIG_SND_SOC_TFA9879 is not set
# CONFIG_SND_SOC_TFA989X is not set
# CONFIG_SND_SOC_TLV320ADC3XXX is not set
# CONFIG_SND_SOC_TLV320AIC23_I2C is not set
# CONFIG_SND_SOC_TLV320AIC23_SPI is not set
# CONFIG_SND_SOC_TLV320AIC31XX is not set
# CONFIG_SND_SOC_TLV320AIC32X4_I2C is not set
# CONFIG_SND_SOC_TLV320AIC32X4_SPI is not set
# CONFIG_SND_SOC_TLV320AIC3X_I2C is not set
# CONFIG_SND_SOC_TLV320AIC3X_SPI is not set
# CONFIG_SND_SOC_TLV320ADCX140 is not set
CONFIG_SND_SOC_TS3A227E=y
# CONFIG_SND_SOC_TSCS42XX is not set
# CONFIG_SND_SOC_TSCS454 is not set
# CONFIG_SND_SOC_UDA1334 is not set
# CONFIG_SND_SOC_UDA1342 is not set
# CONFIG_SND_SOC_WM8510 is not set
# CONFIG_SND_SOC_WM8523 is not set
# CONFIG_SND_SOC_WM8524 is not set
# CONFIG_SND_SOC_WM8580 is not set
# CONFIG_SND_SOC_WM8711 is not set
# CONFIG_SND_SOC_WM8728 is not set
# CONFIG_SND_SOC_WM8731_I2C is not set
# CONFIG_SND_SOC_WM8731_SPI is not set
# CONFIG_SND_SOC_WM8737 is not set
# CONFIG_SND_SOC_WM8741 is not set
# CONFIG_SND_SOC_WM8750 is not set
# CONFIG_SND_SOC_WM8753 is not set
# CONFIG_SND_SOC_WM8770 is not set
# CONFIG_SND_SOC_WM8776 is not set
# CONFIG_SND_SOC_WM8782 is not set
# CONFIG_SND_SOC_WM8804_I2C is not set
# CONFIG_SND_SOC_WM8804_SPI is not set
# CONFIG_SND_SOC_WM8903 is not set
# CONFIG_SND_SOC_WM8904 is not set
# CONFIG_SND_SOC_WM8940 is not set
# CONFIG_SND_SOC_WM8960 is not set
# CONFIG_SND_SOC_WM8961 is not set
# CONFIG_SND_SOC_WM8962 is not set
# CONFIG_SND_SOC_WM8974 is not set
# CONFIG_SND_SOC_WM8978 is not set
# CONFIG_SND_SOC_WM8985 is not set
# CONFIG_SND_SOC_ZL38060 is not set
# CONFIG_SND_SOC_MAX9759 is not set
# CONFIG_SND_SOC_MT6351 is not set
# CONFIG_SND_SOC_MT6357 is not set
# CONFIG_SND_SOC_MT6358 is not set
# CONFIG_SND_SOC_MT6660 is not set
# CONFIG_SND_SOC_NAU8315 is not set
# CONFIG_SND_SOC_NAU8540 is not set
# CONFIG_SND_SOC_NAU8810 is not set
# CONFIG_SND_SOC_NAU8821 is not set
# CONFIG_SND_SOC_NAU8822 is not set
CONFIG_SND_SOC_NAU8824=y
# CONFIG_SND_SOC_NTP8918 is not set
# CONFIG_SND_SOC_NTP8835 is not set
# CONFIG_SND_SOC_TPA6130A2 is not set
# CONFIG_SND_SOC_LPASS_WSA_MACRO is not set
# CONFIG_SND_SOC_LPASS_VA_MACRO is not set
# CONFIG_SND_SOC_LPASS_RX_MACRO is not set
# CONFIG_SND_SOC_LPASS_TX_MACRO is not set
# end of CODEC drivers
# CONFIG_SND_SIMPLE_CARD is not set
CONFIG_SND_X86=y
CONFIG_SND_SYNTH_EMUX=y
CONFIG_SND_XEN_FRONTEND=y
# CONFIG_SND_VIRTIO is not set
CONFIG_AC97_BUS=y
CONFIG_HID_SUPPORT=y
CONFIG_HID=y
CONFIG_HID_BATTERY_STRENGTH=y
CONFIG_HIDRAW=y
CONFIG_UHID=y
CONFIG_HID_GENERIC=y
#
# Special HID drivers
#
CONFIG_HID_A4TECH=y
# CONFIG_HID_ACCUTOUCH is not set
CONFIG_HID_ACRUX=y
# CONFIG_HID_ACRUX_FF is not set
CONFIG_HID_APPLE=y
CONFIG_HID_APPLEIR=y
# CONFIG_HID_APPLETB_BL is not set
# CONFIG_HID_APPLETB_KBD is not set
CONFIG_HID_ASUS=y
CONFIG_HID_AUREAL=y
CONFIG_HID_BELKIN=y
CONFIG_HID_BETOP_FF=y
# CONFIG_HID_BIGBEN_FF is not set
CONFIG_HID_CHERRY=y
CONFIG_HID_CHICONY=y
CONFIG_HID_CORSAIR=y
# CONFIG_HID_COUGAR is not set
# CONFIG_HID_MACALLY is not set
CONFIG_HID_PRODIKEYS=y
CONFIG_HID_CMEDIA=y
# CONFIG_HID_CP2112 is not set
# CONFIG_HID_CREATIVE_SB0540 is not set
CONFIG_HID_CYPRESS=y
CONFIG_HID_DRAGONRISE=y
# CONFIG_DRAGONRISE_FF is not set
# CONFIG_HID_EMS_FF is not set
CONFIG_HID_ELAN=y
CONFIG_HID_ELECOM=y
CONFIG_HID_ELO=y
# CONFIG_HID_EVISION is not set
CONFIG_HID_EZKEY=y
# CONFIG_HID_FT260 is not set
CONFIG_HID_GEMBIRD=y
CONFIG_HID_GFRM=y
# CONFIG_HID_GLORIOUS is not set
CONFIG_HID_HOLTEK=y
# CONFIG_HOLTEK_FF is not set
# CONFIG_HID_GOODIX_SPI is not set
# CONFIG_HID_GOOGLE_STADIA_FF is not set
# CONFIG_HID_VIVALDI is not set
CONFIG_HID_GT683R=y
CONFIG_HID_KEYTOUCH=y
CONFIG_HID_KYE=y
# CONFIG_HID_KYSONA is not set
CONFIG_HID_UCLOGIC=y
CONFIG_HID_WALTOP=y
# CONFIG_HID_VIEWSONIC is not set
# CONFIG_HID_VRC2 is not set
# CONFIG_HID_XIAOMI is not set
CONFIG_HID_GYRATION=y
CONFIG_HID_ICADE=y
CONFIG_HID_ITE=y
CONFIG_HID_JABRA=y
CONFIG_HID_TWINHAN=y
CONFIG_HID_KENSINGTON=y
CONFIG_HID_LCPOWER=y
CONFIG_HID_LED=y
CONFIG_HID_LENOVO=y
# CONFIG_HID_LETSKETCH is not set
CONFIG_HID_MAGICMOUSE=y
# CONFIG_HID_MALTRON is not set
# CONFIG_HID_MAYFLASH is not set
# CONFIG_HID_MEGAWORLD_FF is not set
# CONFIG_HID_REDRAGON is not set
CONFIG_HID_MICROSOFT=y
CONFIG_HID_MONTEREY=y
CONFIG_HID_MULTITOUCH=y
# CONFIG_HID_NINTENDO is not set
CONFIG_HID_NTI=y
CONFIG_HID_NTRIG=y
CONFIG_HID_ORTEK=y
CONFIG_HID_PANTHERLORD=y
# CONFIG_PANTHERLORD_FF is not set
CONFIG_HID_PENMOUNT=y
CONFIG_HID_PETALYNX=y
CONFIG_HID_PICOLCD=y
CONFIG_HID_PICOLCD_FB=y
CONFIG_HID_PICOLCD_BACKLIGHT=y
CONFIG_HID_PICOLCD_LCD=y
CONFIG_HID_PICOLCD_LEDS=y
CONFIG_HID_PICOLCD_CIR=y
CONFIG_HID_PLANTRONICS=y
# CONFIG_HID_PXRC is not set
# CONFIG_HID_RAZER is not set
CONFIG_HID_PRIMAX=y
# CONFIG_HID_RETRODE is not set
CONFIG_HID_ROCCAT=y
CONFIG_HID_SAITEK=y
CONFIG_HID_SAMSUNG=y
# CONFIG_HID_SEMITEK is not set
# CONFIG_HID_SIGMAMICRO is not set
CONFIG_HID_SONY=y
CONFIG_SONY_FF=y
CONFIG_HID_SPEEDLINK=y
# CONFIG_HID_STEAM is not set
CONFIG_HID_STEELSERIES=y
CONFIG_HID_SUNPLUS=y
CONFIG_HID_RMI=y
CONFIG_HID_GREENASIA=y
# CONFIG_GREENASIA_FF is not set
CONFIG_HID_HYPERV_MOUSE=y
CONFIG_HID_SMARTJOYPLUS=y
# CONFIG_SMARTJOYPLUS_FF is not set
CONFIG_HID_TIVO=y
CONFIG_HID_TOPSEED=y
# CONFIG_HID_TOPRE is not set
CONFIG_HID_THINGM=y
CONFIG_HID_THRUSTMASTER=y
# CONFIG_THRUSTMASTER_FF is not set
# CONFIG_HID_UDRAW_PS3 is not set
# CONFIG_HID_U2FZERO is not set
# CONFIG_HID_UNIVERSAL_PIDFF is not set
CONFIG_HID_WACOM=y
CONFIG_HID_WIIMOTE=y
# CONFIG_HID_WINWING is not set
CONFIG_HID_XINMO=y
CONFIG_HID_ZEROPLUS=y
# CONFIG_ZEROPLUS_FF is not set
CONFIG_HID_ZYDACRON=y
CONFIG_HID_SENSOR_HUB=y
CONFIG_HID_SENSOR_CUSTOM_SENSOR=y
CONFIG_HID_ALPS=y
# CONFIG_HID_MCP2200 is not set
# CONFIG_HID_MCP2221 is not set
# end of Special HID drivers
#
# HID-BPF support
#
# CONFIG_HID_BPF is not set
# end of HID-BPF support
CONFIG_I2C_HID=y
# CONFIG_I2C_HID_ACPI is not set
# CONFIG_I2C_HID_OF is not set
#
# Intel ISH HID support
#
CONFIG_INTEL_ISH_HID=y
# CONFIG_INTEL_ISH_FIRMWARE_DOWNLOADER is not set
# end of Intel ISH HID support
#
# AMD SFH HID Support
#
# CONFIG_AMD_SFH_HID is not set
# end of AMD SFH HID Support
#
# Intel THC HID Support
#
# CONFIG_INTEL_THC_HID is not set
# end of Intel THC HID Support
#
# USB HID support
#
CONFIG_USB_HID=y
CONFIG_HID_PID=y
CONFIG_USB_HIDDEV=y
# end of USB HID support
CONFIG_USB_OHCI_LITTLE_ENDIAN=y
CONFIG_USB_SUPPORT=y
CONFIG_USB_COMMON=y
CONFIG_USB_LED_TRIG=y
# CONFIG_USB_ULPI_BUS is not set
# CONFIG_USB_CONN_GPIO is not set
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB=y
CONFIG_USB_PCI=y
CONFIG_USB_PCI_AMD=y
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
#
# Miscellaneous USB options
#
CONFIG_USB_DEFAULT_PERSIST=y
# CONFIG_USB_FEW_INIT_RETRIES is not set
# CONFIG_USB_DYNAMIC_MINORS is not set
# CONFIG_USB_OTG is not set
# CONFIG_USB_OTG_PRODUCTLIST is not set
CONFIG_USB_LEDS_TRIGGER_USBPORT=y
CONFIG_USB_AUTOSUSPEND_DELAY=2
CONFIG_USB_DEFAULT_AUTHORIZATION_MODE=1
CONFIG_USB_MON=y
#
# USB Host Controller Drivers
#
# CONFIG_USB_C67X00_HCD is not set
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_DBGCAP=y
CONFIG_USB_XHCI_PCI=y
# CONFIG_USB_XHCI_PCI_RENESAS is not set
CONFIG_USB_XHCI_PLATFORM=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_ROOT_HUB_TT=y
CONFIG_USB_EHCI_TT_NEWSCHED=y
CONFIG_USB_EHCI_PCI=y
# CONFIG_USB_EHCI_FSL is not set
# CONFIG_USB_EHCI_HCD_PLATFORM is not set
# CONFIG_USB_OXU210HP_HCD is not set
# CONFIG_USB_ISP116X_HCD is not set
# CONFIG_USB_MAX3421_HCD is not set
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_HCD_PCI=y
# CONFIG_USB_OHCI_HCD_PLATFORM is not set
CONFIG_USB_UHCI_HCD=y
# CONFIG_USB_SL811_HCD is not set
# CONFIG_USB_R8A66597_HCD is not set
# CONFIG_USB_HCD_BCMA is not set
# CONFIG_USB_HCD_TEST_MODE is not set
# CONFIG_USB_XEN_HCD is not set
#
# USB Device Class drivers
#
CONFIG_USB_ACM=y
CONFIG_USB_PRINTER=y
CONFIG_USB_WDM=y
CONFIG_USB_TMC=y
#
# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; see USB_STORAGE Help for more info
#
CONFIG_USB_STORAGE=y
# CONFIG_USB_STORAGE_DEBUG is not set
CONFIG_USB_STORAGE_REALTEK=y
CONFIG_REALTEK_AUTOPM=y
CONFIG_USB_STORAGE_DATAFAB=y
CONFIG_USB_STORAGE_FREECOM=y
CONFIG_USB_STORAGE_ISD200=y
CONFIG_USB_STORAGE_USBAT=y
CONFIG_USB_STORAGE_SDDR09=y
CONFIG_USB_STORAGE_SDDR55=y
CONFIG_USB_STORAGE_JUMPSHOT=y
CONFIG_USB_STORAGE_ALAUDA=y
CONFIG_USB_STORAGE_ONETOUCH=y
CONFIG_USB_STORAGE_KARMA=y
CONFIG_USB_STORAGE_CYPRESS_ATACB=y
CONFIG_USB_STORAGE_ENE_UB6250=y
CONFIG_USB_UAS=y
#
# USB Imaging devices
#
CONFIG_USB_MDC800=y
CONFIG_USB_MICROTEK=y
# CONFIG_USBIP_CORE is not set
#
# USB dual-mode controller drivers
#
# CONFIG_USB_CDNS_SUPPORT is not set
# CONFIG_USB_MUSB_HDRC is not set
# CONFIG_USB_DWC3 is not set
# CONFIG_USB_DWC2 is not set
# CONFIG_USB_CHIPIDEA is not set
# CONFIG_USB_ISP1760 is not set
#
# USB port drivers
#
CONFIG_USB_SERIAL=y
# CONFIG_USB_SERIAL_CONSOLE is not set
CONFIG_USB_SERIAL_GENERIC=y
# CONFIG_USB_SERIAL_SIMPLE is not set
CONFIG_USB_SERIAL_AIRCABLE=y
CONFIG_USB_SERIAL_ARK3116=y
CONFIG_USB_SERIAL_BELKIN=y
CONFIG_USB_SERIAL_CH341=y
CONFIG_USB_SERIAL_WHITEHEAT=y
CONFIG_USB_SERIAL_DIGI_ACCELEPORT=y
CONFIG_USB_SERIAL_CP210X=y
CONFIG_USB_SERIAL_CYPRESS_M8=y
CONFIG_USB_SERIAL_EMPEG=y
CONFIG_USB_SERIAL_FTDI_SIO=y
CONFIG_USB_SERIAL_VISOR=y
CONFIG_USB_SERIAL_IPAQ=y
CONFIG_USB_SERIAL_IR=y
CONFIG_USB_SERIAL_EDGEPORT=y
CONFIG_USB_SERIAL_EDGEPORT_TI=y
# CONFIG_USB_SERIAL_F81232 is not set
CONFIG_USB_SERIAL_F8153X=y
CONFIG_USB_SERIAL_GARMIN=y
CONFIG_USB_SERIAL_IPW=y
CONFIG_USB_SERIAL_IUU=y
CONFIG_USB_SERIAL_KEYSPAN_PDA=y
CONFIG_USB_SERIAL_KEYSPAN=y
CONFIG_USB_SERIAL_KLSI=y
CONFIG_USB_SERIAL_KOBIL_SCT=y
CONFIG_USB_SERIAL_MCT_U232=y
# CONFIG_USB_SERIAL_METRO is not set
CONFIG_USB_SERIAL_MOS7720=y
CONFIG_USB_SERIAL_MOS7715_PARPORT=y
CONFIG_USB_SERIAL_MOS7840=y
CONFIG_USB_SERIAL_MXUPORT=y
CONFIG_USB_SERIAL_NAVMAN=y
CONFIG_USB_SERIAL_PL2303=y
CONFIG_USB_SERIAL_OTI6858=y
CONFIG_USB_SERIAL_QCAUX=y
CONFIG_USB_SERIAL_QUALCOMM=y
CONFIG_USB_SERIAL_SPCP8X5=y
CONFIG_USB_SERIAL_SAFE=y
CONFIG_USB_SERIAL_SAFE_PADDED=y
CONFIG_USB_SERIAL_SIERRAWIRELESS=y
CONFIG_USB_SERIAL_SYMBOL=y
CONFIG_USB_SERIAL_TI=y
CONFIG_USB_SERIAL_CYBERJACK=y
CONFIG_USB_SERIAL_WWAN=y
CONFIG_USB_SERIAL_OPTION=y
CONFIG_USB_SERIAL_OMNINET=y
CONFIG_USB_SERIAL_OPTICON=y
CONFIG_USB_SERIAL_XSENS_MT=y
# CONFIG_USB_SERIAL_WISHBONE is not set
CONFIG_USB_SERIAL_SSU100=y
CONFIG_USB_SERIAL_QT2=y
CONFIG_USB_SERIAL_UPD78F0730=y
# CONFIG_USB_SERIAL_XR is not set
CONFIG_USB_SERIAL_DEBUG=y
#
# USB Miscellaneous drivers
#
CONFIG_USB_USS720=y
CONFIG_USB_EMI62=y
CONFIG_USB_EMI26=y
CONFIG_USB_ADUTUX=y
CONFIG_USB_SEVSEG=y
CONFIG_USB_LEGOTOWER=y
CONFIG_USB_LCD=y
# CONFIG_USB_CYPRESS_CY7C63 is not set
# CONFIG_USB_CYTHERM is not set
CONFIG_USB_IDMOUSE=y
CONFIG_USB_APPLEDISPLAY=y
# CONFIG_APPLE_MFI_FASTCHARGE is not set
# CONFIG_USB_LJCA is not set
CONFIG_USB_SISUSBVGA=y
CONFIG_USB_LD=y
# CONFIG_USB_TRANCEVIBRATOR is not set
CONFIG_USB_IOWARRIOR=y
# CONFIG_USB_TEST is not set
# CONFIG_USB_EHSET_TEST_FIXTURE is not set
CONFIG_USB_ISIGHTFW=y
# CONFIG_USB_YUREX is not set
CONFIG_USB_EZUSB_FX2=y
# CONFIG_USB_HUB_USB251XB is not set
CONFIG_USB_HSIC_USB3503=y
# CONFIG_USB_HSIC_USB4604 is not set
# CONFIG_USB_LINK_LAYER_TEST is not set
# CONFIG_USB_CHAOSKEY is not set
CONFIG_USB_ATM=y
CONFIG_USB_SPEEDTOUCH=y
CONFIG_USB_CXACRU=y
CONFIG_USB_UEAGLEATM=y
CONFIG_USB_XUSBATM=y
#
# USB Physical Layer drivers
#
# CONFIG_NOP_USB_XCEIV is not set
# CONFIG_USB_GPIO_VBUS is not set
# CONFIG_USB_ISP1301 is not set
# end of USB Physical Layer drivers
# CONFIG_USB_GADGET is not set
CONFIG_TYPEC=y
CONFIG_TYPEC_TCPM=y
CONFIG_TYPEC_TCPCI=y
CONFIG_TYPEC_RT1711H=y
# CONFIG_TYPEC_TCPCI_MAXIM is not set
CONFIG_TYPEC_FUSB302=y
CONFIG_TYPEC_UCSI=y
# CONFIG_UCSI_CCG is not set
CONFIG_UCSI_ACPI=y
# CONFIG_UCSI_STM32G0 is not set
CONFIG_TYPEC_TPS6598X=y
# CONFIG_TYPEC_ANX7411 is not set
# CONFIG_TYPEC_RT1719 is not set
# CONFIG_TYPEC_HD3SS3220 is not set
# CONFIG_TYPEC_STUSB160X is not set
# CONFIG_TYPEC_WUSB3801 is not set
#
# USB Type-C Multiplexer/DeMultiplexer Switch support
#
# CONFIG_TYPEC_MUX_FSA4480 is not set
# CONFIG_TYPEC_MUX_GPIO_SBU is not set
CONFIG_TYPEC_MUX_PI3USB30532=y
# CONFIG_TYPEC_MUX_IT5205 is not set
# CONFIG_TYPEC_MUX_NB7VPQ904M is not set
# CONFIG_TYPEC_MUX_PS883X is not set
# CONFIG_TYPEC_MUX_PTN36502 is not set
# CONFIG_TYPEC_MUX_TUSB1046 is not set
# CONFIG_TYPEC_MUX_WCD939X_USBSS is not set
# end of USB Type-C Multiplexer/DeMultiplexer Switch support
#
# USB Type-C Alternate Mode drivers
#
# CONFIG_TYPEC_TBT_ALTMODE is not set
# end of USB Type-C Alternate Mode drivers
CONFIG_USB_ROLE_SWITCH=y
CONFIG_USB_ROLES_INTEL_XHCI=y
CONFIG_MMC=y
CONFIG_MMC_BLOCK=y
CONFIG_MMC_BLOCK_MINORS=8
CONFIG_SDIO_UART=y
# CONFIG_MMC_TEST is not set
#
# MMC/SD/SDIO Host Controller Drivers
#
# CONFIG_MMC_DEBUG is not set
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_IO_ACCESSORS=y
CONFIG_MMC_SDHCI_UHS2=y
CONFIG_MMC_SDHCI_PCI=y
CONFIG_MMC_RICOH_MMC=y
CONFIG_MMC_SDHCI_ACPI=y
CONFIG_MMC_SDHCI_PLTFM=y
# CONFIG_MMC_SDHCI_F_SDH30 is not set
# CONFIG_MMC_WBSD is not set
CONFIG_MMC_TIFM_SD=y
# CONFIG_MMC_SPI is not set
CONFIG_MMC_CB710=y
CONFIG_MMC_VIA_SDMMC=y
CONFIG_MMC_VUB300=y
CONFIG_MMC_USHC=y
# CONFIG_MMC_USDHI6ROL0 is not set
CONFIG_MMC_REALTEK_PCI=y
CONFIG_MMC_REALTEK_USB=y
CONFIG_MMC_CQHCI=y
# CONFIG_MMC_HSQ is not set
# CONFIG_MMC_TOSHIBA_PCI is not set
# CONFIG_MMC_MTK is not set
CONFIG_MMC_SDHCI_XENON=y
# CONFIG_SCSI_UFSHCD is not set
CONFIG_MEMSTICK=y
# CONFIG_MEMSTICK_DEBUG is not set
#
# MemoryStick drivers
#
# CONFIG_MEMSTICK_UNSAFE_RESUME is not set
CONFIG_MSPRO_BLOCK=y
# CONFIG_MS_BLOCK is not set
#
# MemoryStick Host Controller Drivers
#
CONFIG_MEMSTICK_TIFM_MS=y
CONFIG_MEMSTICK_JMICRON_38X=y
CONFIG_MEMSTICK_R592=y
CONFIG_MEMSTICK_REALTEK_USB=y
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y
# CONFIG_LEDS_CLASS_FLASH is not set
# CONFIG_LEDS_CLASS_MULTICOLOR is not set
# CONFIG_LEDS_BRIGHTNESS_HW_CHANGED is not set
#
# LED drivers
#
# CONFIG_LEDS_APU is not set
# CONFIG_LEDS_AW200XX is not set
CONFIG_LEDS_LM3530=y
# CONFIG_LEDS_LM3532 is not set
# CONFIG_LEDS_LM3642 is not set
# CONFIG_LEDS_PCA9532 is not set
# CONFIG_LEDS_GPIO is not set
CONFIG_LEDS_LP3944=y
# CONFIG_LEDS_LP3952 is not set
# CONFIG_LEDS_PCA955X is not set
# CONFIG_LEDS_PCA963X is not set
# CONFIG_LEDS_PCA995X is not set
# CONFIG_LEDS_DAC124S085 is not set
# CONFIG_LEDS_PWM is not set
# CONFIG_LEDS_BD2606MVV is not set
# CONFIG_LEDS_BD2802 is not set
CONFIG_LEDS_INTEL_SS4200=y
# CONFIG_LEDS_LT3593 is not set
# CONFIG_LEDS_TCA6507 is not set
# CONFIG_LEDS_TLC591XX is not set
# CONFIG_LEDS_LM355x is not set
# CONFIG_LEDS_IS31FL319X is not set
#
# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM)
#
CONFIG_LEDS_BLINKM=y
CONFIG_LEDS_MLXCPLD=y
# CONFIG_LEDS_MLXREG is not set
# CONFIG_LEDS_USER is not set
# CONFIG_LEDS_NIC78BX is not set
# CONFIG_LEDS_SPI_BYTE is not set
#
# Flash and Torch LED drivers
#
#
# RGB LED drivers
#
#
# LED Triggers
#
CONFIG_LEDS_TRIGGERS=y
CONFIG_LEDS_TRIGGER_TIMER=y
CONFIG_LEDS_TRIGGER_ONESHOT=y
CONFIG_LEDS_TRIGGER_DISK=y
# CONFIG_LEDS_TRIGGER_MTD is not set
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
CONFIG_LEDS_TRIGGER_BACKLIGHT=y
# CONFIG_LEDS_TRIGGER_CPU is not set
# CONFIG_LEDS_TRIGGER_ACTIVITY is not set
# CONFIG_LEDS_TRIGGER_GPIO is not set
CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
#
# iptables trigger is under Netfilter config (LED target)
#
CONFIG_LEDS_TRIGGER_TRANSIENT=y
CONFIG_LEDS_TRIGGER_CAMERA=y
# CONFIG_LEDS_TRIGGER_PANIC is not set
# CONFIG_LEDS_TRIGGER_NETDEV is not set
# CONFIG_LEDS_TRIGGER_PATTERN is not set
# CONFIG_LEDS_TRIGGER_TTY is not set
# CONFIG_LEDS_TRIGGER_INPUT_EVENTS is not set
#
# Simatic LED drivers
#
# CONFIG_ACCESSIBILITY is not set
# CONFIG_INFINIBAND is not set
CONFIG_EDAC_ATOMIC_SCRUB=y
CONFIG_EDAC_SUPPORT=y
CONFIG_EDAC=y
CONFIG_EDAC_LEGACY_SYSFS=y
# CONFIG_EDAC_DEBUG is not set
CONFIG_EDAC_DECODE_MCE=y
CONFIG_EDAC_GHES=y
# CONFIG_EDAC_SCRUB is not set
# CONFIG_EDAC_ECS is not set
# CONFIG_EDAC_MEM_REPAIR is not set
CONFIG_EDAC_AMD64=y
CONFIG_EDAC_E752X=y
CONFIG_EDAC_I82975X=y
CONFIG_EDAC_I3000=y
CONFIG_EDAC_I3200=y
CONFIG_EDAC_IE31200=y
CONFIG_EDAC_X38=y
CONFIG_EDAC_I5400=y
CONFIG_EDAC_I7CORE=y
CONFIG_EDAC_I5100=y
CONFIG_EDAC_I7300=y
CONFIG_EDAC_SBRIDGE=y
CONFIG_EDAC_SKX=y
CONFIG_EDAC_I10NM=y
CONFIG_EDAC_PND2=y
# CONFIG_EDAC_IGEN6 is not set
CONFIG_RTC_LIB=y
CONFIG_RTC_MC146818_LIB=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_HCTOSYS=y
CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
# CONFIG_RTC_SYSTOHC is not set
# CONFIG_RTC_DEBUG is not set
CONFIG_RTC_NVMEM=y
#
# RTC interfaces
#
CONFIG_RTC_INTF_SYSFS=y
CONFIG_RTC_INTF_PROC=y
CONFIG_RTC_INTF_DEV=y
# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
# CONFIG_RTC_DRV_TEST is not set
#
# I2C RTC drivers
#
# CONFIG_RTC_DRV_ABB5ZES3 is not set
# CONFIG_RTC_DRV_ABEOZ9 is not set
# CONFIG_RTC_DRV_ABX80X is not set
CONFIG_RTC_DRV_DS1307=y
# CONFIG_RTC_DRV_DS1307_CENTURY is not set
CONFIG_RTC_DRV_DS1374=y
# CONFIG_RTC_DRV_DS1374_WDT is not set
CONFIG_RTC_DRV_DS1672=y
CONFIG_RTC_DRV_MAX6900=y
# CONFIG_RTC_DRV_MAX31335 is not set
CONFIG_RTC_DRV_RS5C372=y
CONFIG_RTC_DRV_ISL1208=y
CONFIG_RTC_DRV_ISL12022=y
CONFIG_RTC_DRV_X1205=y
CONFIG_RTC_DRV_PCF8523=y
# CONFIG_RTC_DRV_PCF85063 is not set
# CONFIG_RTC_DRV_PCF85363 is not set
CONFIG_RTC_DRV_PCF8563=y
CONFIG_RTC_DRV_PCF8583=y
CONFIG_RTC_DRV_M41T80=y
CONFIG_RTC_DRV_M41T80_WDT=y
CONFIG_RTC_DRV_BQ32K=y
# CONFIG_RTC_DRV_S35390A is not set
CONFIG_RTC_DRV_FM3130=y
# CONFIG_RTC_DRV_RX8010 is not set
# CONFIG_RTC_DRV_RX8111 is not set
CONFIG_RTC_DRV_RX8581=y
CONFIG_RTC_DRV_RX8025=y
CONFIG_RTC_DRV_EM3027=y
# CONFIG_RTC_DRV_RV3028 is not set
# CONFIG_RTC_DRV_RV3032 is not set
CONFIG_RTC_DRV_RV8803=y
# CONFIG_RTC_DRV_SD2405AL is not set
# CONFIG_RTC_DRV_SD3078 is not set
#
# SPI RTC drivers
#
# CONFIG_RTC_DRV_M41T93 is not set
# CONFIG_RTC_DRV_M41T94 is not set
# CONFIG_RTC_DRV_DS1302 is not set
# CONFIG_RTC_DRV_DS1305 is not set
# CONFIG_RTC_DRV_DS1343 is not set
# CONFIG_RTC_DRV_DS1347 is not set
# CONFIG_RTC_DRV_DS1390 is not set
# CONFIG_RTC_DRV_MAX6916 is not set
# CONFIG_RTC_DRV_R9701 is not set
CONFIG_RTC_DRV_RX4581=y
# CONFIG_RTC_DRV_RS5C348 is not set
# CONFIG_RTC_DRV_MAX6902 is not set
# CONFIG_RTC_DRV_PCF2123 is not set
# CONFIG_RTC_DRV_MCP795 is not set
CONFIG_RTC_I2C_AND_SPI=y
#
# SPI and I2C RTC drivers
#
CONFIG_RTC_DRV_DS3232=y
CONFIG_RTC_DRV_DS3232_HWMON=y
# CONFIG_RTC_DRV_PCF2127 is not set
CONFIG_RTC_DRV_RV3029C2=y
# CONFIG_RTC_DRV_RV3029_HWMON is not set
# CONFIG_RTC_DRV_RX6110 is not set
#
# Platform RTC drivers
#
CONFIG_RTC_DRV_CMOS=y
CONFIG_RTC_DRV_DS1286=y
CONFIG_RTC_DRV_DS1511=y
CONFIG_RTC_DRV_DS1553=y
# CONFIG_RTC_DRV_DS1685_FAMILY is not set
CONFIG_RTC_DRV_DS1742=y
CONFIG_RTC_DRV_DS2404=y
CONFIG_RTC_DRV_STK17TA8=y
# CONFIG_RTC_DRV_M48T86 is not set
CONFIG_RTC_DRV_M48T35=y
CONFIG_RTC_DRV_M48T59=y
CONFIG_RTC_DRV_MSM6242=y
CONFIG_RTC_DRV_RP5C01=y
#
# on-CPU RTC drivers
#
# CONFIG_RTC_DRV_FTRTC010 is not set
#
# HID Sensor RTC drivers
#
# CONFIG_RTC_DRV_HID_SENSOR_TIME is not set
# CONFIG_RTC_DRV_GOLDFISH is not set
CONFIG_DMADEVICES=y
# CONFIG_DMADEVICES_DEBUG is not set
#
# DMA Devices
#
CONFIG_DMA_ENGINE=y
CONFIG_DMA_VIRTUAL_CHANNELS=y
CONFIG_DMA_ACPI=y
# CONFIG_ALTERA_MSGDMA is not set
CONFIG_INTEL_IDMA64=y
CONFIG_INTEL_IDXD_BUS=y
CONFIG_INTEL_IDXD=y
# CONFIG_INTEL_IDXD_COMPAT is not set
CONFIG_INTEL_IDXD_SVM=y
CONFIG_INTEL_IDXD_PERFMON=y
CONFIG_INTEL_IOATDMA=y
# CONFIG_PLX_DMA is not set
# CONFIG_XILINX_DMA is not set
# CONFIG_XILINX_XDMA is not set
# CONFIG_AMD_PTDMA is not set
# CONFIG_AMD_QDMA is not set
# CONFIG_QCOM_HIDMA_MGMT is not set
# CONFIG_QCOM_HIDMA is not set
CONFIG_DW_DMAC_CORE=y
CONFIG_DW_DMAC=y
CONFIG_DW_DMAC_PCI=y
# CONFIG_DW_EDMA is not set
CONFIG_HSU_DMA=y
# CONFIG_SF_PDMA is not set
# CONFIG_INTEL_LDMA is not set
#
# DMA Clients
#
CONFIG_ASYNC_TX_DMA=y
CONFIG_DMATEST=y
CONFIG_DMA_ENGINE_RAID=y
#
# DMABUF options
#
CONFIG_SYNC_FILE=y
# CONFIG_SW_SYNC is not set
# CONFIG_UDMABUF is not set
# CONFIG_DMABUF_MOVE_NOTIFY is not set
# CONFIG_DMABUF_DEBUG is not set
# CONFIG_DMABUF_SELFTESTS is not set
# CONFIG_DMABUF_HEAPS is not set
# CONFIG_DMABUF_SYSFS_STATS is not set
# end of DMABUF options
CONFIG_DCA=y
CONFIG_UIO=y
CONFIG_UIO_CIF=y
CONFIG_UIO_PDRV_GENIRQ=y
# CONFIG_UIO_DMEM_GENIRQ is not set
CONFIG_UIO_AEC=y
CONFIG_UIO_SERCOS3=y
CONFIG_UIO_PCI_GENERIC=y
# CONFIG_UIO_NETX is not set
# CONFIG_UIO_MF624 is not set
CONFIG_UIO_HV_GENERIC=y
CONFIG_VFIO=y
CONFIG_VFIO_DEVICE_CDEV=y
CONFIG_VFIO_GROUP=y
CONFIG_VFIO_CONTAINER=y
CONFIG_VFIO_IOMMU_TYPE1=y
CONFIG_VFIO_NOIOMMU=y
CONFIG_VFIO_VIRQFD=y
# CONFIG_VFIO_DEBUGFS is not set
#
# VFIO support for PCI devices
#
CONFIG_VFIO_PCI_CORE=y
CONFIG_VFIO_PCI_INTX=y
CONFIG_VFIO_PCI=y
# CONFIG_VFIO_PCI_VGA is not set
# CONFIG_VFIO_PCI_IGD is not set
# CONFIG_MLX5_VFIO_PCI is not set
# CONFIG_VIRTIO_VFIO_PCI is not set
CONFIG_QAT_VFIO_PCI=m
# end of VFIO support for PCI devices
CONFIG_IRQ_BYPASS_MANAGER=y
# CONFIG_VIRT_DRIVERS is not set
CONFIG_VIRTIO_ANCHOR=y
CONFIG_VIRTIO=y
CONFIG_VIRTIO_PCI_LIB=y
CONFIG_VIRTIO_PCI_LIB_LEGACY=y
CONFIG_VIRTIO_MENU=y
CONFIG_VIRTIO_PCI=y
CONFIG_VIRTIO_PCI_ADMIN_LEGACY=y
CONFIG_VIRTIO_PCI_LEGACY=y
# CONFIG_VIRTIO_PMEM is not set
CONFIG_VIRTIO_BALLOON=y
CONFIG_VIRTIO_MEM=y
CONFIG_VIRTIO_INPUT=y
# CONFIG_VIRTIO_MMIO is not set
# CONFIG_VIRTIO_DEBUG is not set
# CONFIG_VDPA is not set
CONFIG_VHOST_TASK=y
CONFIG_VHOST_MENU=y
# CONFIG_VHOST_NET is not set
# CONFIG_VHOST_SCSI is not set
# CONFIG_VHOST_CROSS_ENDIAN_LEGACY is not set
#
# Microsoft Hyper-V guest support
#
CONFIG_HYPERV=y
# CONFIG_HYPERV_VTL_MODE is not set
CONFIG_HYPERV_TIMER=y
CONFIG_HYPERV_UTILS=y
CONFIG_HYPERV_BALLOON=y
# CONFIG_MSHV_ROOT is not set
# end of Microsoft Hyper-V guest support
#
# Xen driver support
#
CONFIG_XEN_BALLOON=y
# CONFIG_XEN_BALLOON_MEMORY_HOTPLUG is not set
CONFIG_XEN_SCRUB_PAGES_DEFAULT=y
CONFIG_XEN_DEV_EVTCHN=y
# CONFIG_XEN_BACKEND is not set
CONFIG_XENFS=y
CONFIG_XEN_COMPAT_XENFS=y
CONFIG_XEN_SYS_HYPERVISOR=y
CONFIG_XEN_XENBUS_FRONTEND=y
# CONFIG_XEN_GNTDEV is not set
# CONFIG_XEN_GRANT_DEV_ALLOC is not set
# CONFIG_XEN_GRANT_DMA_ALLOC is not set
# CONFIG_XEN_PVCALLS_FRONTEND is not set
CONFIG_XEN_PRIVCMD=y
CONFIG_XEN_EFI=y
CONFIG_XEN_AUTO_XLATE=y
CONFIG_XEN_ACPI=y
CONFIG_XEN_FRONT_PGDIR_SHBUF=y
# CONFIG_XEN_UNPOPULATED_ALLOC is not set
# CONFIG_XEN_VIRTIO is not set
# end of Xen driver support
# CONFIG_GREYBUS is not set
# CONFIG_COMEDI is not set
# CONFIG_STAGING is not set
# CONFIG_GOLDFISH is not set
# CONFIG_CHROME_PLATFORMS is not set
CONFIG_MELLANOX_PLATFORM=y
CONFIG_MLX_PLATFORM=y
CONFIG_MLXREG_HOTPLUG=y
# CONFIG_MLXREG_IO is not set
# CONFIG_MLXREG_LC is not set
# CONFIG_NVSW_SN2201 is not set
CONFIG_SURFACE_PLATFORMS=y
# CONFIG_SURFACE3_WMI is not set
# CONFIG_SURFACE_3_POWER_OPREGION is not set
# CONFIG_SURFACE_GPE is not set
# CONFIG_SURFACE_HOTPLUG is not set
# CONFIG_SURFACE_PRO3_BUTTON is not set
CONFIG_X86_PLATFORM_DEVICES=y
CONFIG_ACPI_WMI=y
CONFIG_WMI_BMOF=y
# CONFIG_HUAWEI_WMI is not set
# CONFIG_UV_SYSFS is not set
CONFIG_MXM_WMI=y
# CONFIG_NVIDIA_WMI_EC_BACKLIGHT is not set
# CONFIG_XIAOMI_WMI is not set
# CONFIG_GIGABYTE_WMI is not set
# CONFIG_YOGABOOK is not set
CONFIG_ACERHDF=y
# CONFIG_ACER_WIRELESS is not set
CONFIG_ACER_WMI=y
#
# AMD HSMP Driver
#
# CONFIG_AMD_HSMP_ACPI is not set
# CONFIG_AMD_HSMP_PLAT is not set
# end of AMD HSMP Driver
# CONFIG_AMD_PMC is not set
# CONFIG_AMD_3D_VCACHE is not set
# CONFIG_AMD_WBRF is not set
# CONFIG_ADV_SWBUTTON is not set
CONFIG_APPLE_GMUX=y
CONFIG_ASUS_LAPTOP=y
# CONFIG_ASUS_WIRELESS is not set
CONFIG_ASUS_WMI=y
CONFIG_ASUS_NB_WMI=y
# CONFIG_ASUS_TF103C_DOCK is not set
# CONFIG_MERAKI_MX100 is not set
CONFIG_EEEPC_LAPTOP=y
CONFIG_EEEPC_WMI=y
# CONFIG_X86_PLATFORM_DRIVERS_DELL is not set
CONFIG_AMILO_RFKILL=y
CONFIG_FUJITSU_LAPTOP=y
CONFIG_FUJITSU_TABLET=y
# CONFIG_GPD_POCKET_FAN is not set
# CONFIG_X86_PLATFORM_DRIVERS_HP is not set
# CONFIG_WIRELESS_HOTKEY is not set
# CONFIG_IBM_RTL is not set
CONFIG_IDEAPAD_LAPTOP=y
# CONFIG_LENOVO_WMI_HOTKEY_UTILITIES is not set
# CONFIG_LENOVO_YMC is not set
CONFIG_SENSORS_HDAPS=y
# CONFIG_THINKPAD_LMI is not set
# CONFIG_INTEL_ATOMISP2_PM is not set
CONFIG_INTEL_IFS=y
# CONFIG_INTEL_SAR_INT1092 is not set
CONFIG_INTEL_PMC_CORE=y
CONFIG_INTEL_PMT_CLASS=y
CONFIG_INTEL_PMT_TELEMETRY=y
CONFIG_INTEL_PMT_CRASHLOG=y
#
# Intel Speed Select Technology interface support
#
CONFIG_INTEL_SPEED_SELECT_TPMI=y
CONFIG_INTEL_SPEED_SELECT_INTERFACE=y
# end of Intel Speed Select Technology interface support
CONFIG_INTEL_WMI=y
# CONFIG_INTEL_WMI_SBL_FW_UPDATE is not set
CONFIG_INTEL_WMI_THUNDERBOLT=y
#
# Intel Uncore Frequency Control
#
CONFIG_INTEL_UNCORE_FREQ_CONTROL_TPMI=y
CONFIG_INTEL_UNCORE_FREQ_CONTROL=y
# end of Intel Uncore Frequency Control
CONFIG_INTEL_HID_EVENT=y
CONFIG_INTEL_VBTN=y
# CONFIG_INTEL_INT0002_VGPIO is not set
CONFIG_INTEL_OAKTRAIL=y
# CONFIG_INTEL_ISHTP_ECLITE is not set
# CONFIG_INTEL_PUNIT_IPC is not set
CONFIG_INTEL_RST=y
CONFIG_INTEL_SDSI=y
# CONFIG_INTEL_SMARTCONNECT is not set
CONFIG_INTEL_TPMI_POWER_DOMAINS=y
CONFIG_INTEL_TPMI=y
# CONFIG_INTEL_PLR_TPMI is not set
CONFIG_INTEL_TURBO_MAX_3=y
CONFIG_INTEL_VSEC=y
# CONFIG_ACPI_QUICKSTART is not set
# CONFIG_MEEGOPAD_ANX7428 is not set
# CONFIG_MSI_EC is not set
CONFIG_MSI_LAPTOP=y
CONFIG_MSI_WMI=y
# CONFIG_MSI_WMI_PLATFORM is not set
# CONFIG_PCENGINES_APU2 is not set
# CONFIG_BARCO_P50_GPIO is not set
# CONFIG_SAMSUNG_GALAXYBOOK is not set
CONFIG_SAMSUNG_LAPTOP=y
CONFIG_SAMSUNG_Q10=y
# CONFIG_ACPI_TOSHIBA is not set
CONFIG_TOSHIBA_BT_RFKILL=y
# CONFIG_TOSHIBA_HAPS is not set
# CONFIG_TOSHIBA_WMI is not set
CONFIG_ACPI_CMPC=y
CONFIG_COMPAL_LAPTOP=y
# CONFIG_LG_LAPTOP is not set
CONFIG_PANASONIC_LAPTOP=y
CONFIG_SONY_LAPTOP=y
CONFIG_SONYPI_COMPAT=y
# CONFIG_SYSTEM76_ACPI is not set
CONFIG_TOPSTAR_LAPTOP=y
# CONFIG_SERIAL_MULTI_INSTANTIATE is not set
# CONFIG_INSPUR_PLATFORM_PROFILE is not set
# CONFIG_LENOVO_WMI_CAMERA is not set
CONFIG_INTEL_IPS=y
# CONFIG_INTEL_SCU_PCI is not set
# CONFIG_INTEL_SCU_PLATFORM is not set
# CONFIG_SIEMENS_SIMATIC_IPC is not set
# CONFIG_WINMATE_FM07_KEYS is not set
# CONFIG_SEL3350_PLATFORM is not set
CONFIG_P2SB=y
CONFIG_HAVE_CLK=y
CONFIG_HAVE_CLK_PREPARE=y
CONFIG_COMMON_CLK=y
# CONFIG_LMK04832 is not set
# CONFIG_COMMON_CLK_MAX9485 is not set
# CONFIG_COMMON_CLK_SI5341 is not set
# CONFIG_COMMON_CLK_SI5351 is not set
# CONFIG_COMMON_CLK_SI544 is not set
# CONFIG_COMMON_CLK_CDCE706 is not set
# CONFIG_COMMON_CLK_CS2000_CP is not set
# CONFIG_COMMON_CLK_PWM is not set
# CONFIG_XILINX_VCU is not set
CONFIG_HWSPINLOCK=y
#
# Clock Source drivers
#
CONFIG_CLKEVT_I8253=y
CONFIG_I8253_LOCK=y
CONFIG_CLKBLD_I8253=y
# end of Clock Source drivers
CONFIG_MAILBOX=y
CONFIG_PCC=y
# CONFIG_ALTERA_MBOX is not set
CONFIG_IOMMU_IOVA=y
CONFIG_IOMMU_API=y
CONFIG_IOMMUFD_DRIVER=y
CONFIG_IOMMU_SUPPORT=y
#
# Generic IOMMU Pagetable Support
#
CONFIG_IOMMU_IO_PGTABLE=y
# end of Generic IOMMU Pagetable Support
# CONFIG_IOMMU_DEBUGFS is not set
# CONFIG_IOMMU_DEFAULT_DMA_STRICT is not set
# CONFIG_IOMMU_DEFAULT_DMA_LAZY is not set
CONFIG_IOMMU_DEFAULT_PASSTHROUGH=y
CONFIG_IOMMU_DMA=y
CONFIG_IOMMU_SVA=y
CONFIG_IOMMU_IOPF=y
CONFIG_AMD_IOMMU=y
CONFIG_DMAR_TABLE=y
CONFIG_INTEL_IOMMU=y
CONFIG_INTEL_IOMMU_SVM=y
# CONFIG_INTEL_IOMMU_DEFAULT_ON is not set
CONFIG_INTEL_IOMMU_FLOPPY_WA=y
# CONFIG_INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON is not set
CONFIG_INTEL_IOMMU_PERF_EVENTS=y
CONFIG_IOMMUFD_DRIVER_CORE=y
CONFIG_IOMMUFD=y
CONFIG_IRQ_REMAP=y
CONFIG_HYPERV_IOMMU=y
# CONFIG_VIRTIO_IOMMU is not set
#
# Remoteproc drivers
#
# CONFIG_REMOTEPROC is not set
# end of Remoteproc drivers
#
# Rpmsg drivers
#
# CONFIG_RPMSG_QCOM_GLINK_RPM is not set
# CONFIG_RPMSG_VIRTIO is not set
# end of Rpmsg drivers
# CONFIG_SOUNDWIRE is not set
#
# SOC (System On Chip) specific Drivers
#
#
# Amlogic SoC drivers
#
# end of Amlogic SoC drivers
#
# Broadcom SoC drivers
#
# end of Broadcom SoC drivers
#
# NXP/Freescale QorIQ SoC drivers
#
# end of NXP/Freescale QorIQ SoC drivers
#
# fujitsu SoC drivers
#
# end of fujitsu SoC drivers
#
# i.MX SoC drivers
#
# end of i.MX SoC drivers
#
# Enable LiteX SoC Builder specific drivers
#
# end of Enable LiteX SoC Builder specific drivers
# CONFIG_WPCM450_SOC is not set
#
# Qualcomm SoC drivers
#
# end of Qualcomm SoC drivers
# CONFIG_SOC_TI is not set
#
# Xilinx SoC drivers
#
# end of Xilinx SoC drivers
# end of SOC (System On Chip) specific Drivers
#
# PM Domains
#
#
# Amlogic PM Domains
#
# end of Amlogic PM Domains
#
# Broadcom PM Domains
#
# end of Broadcom PM Domains
#
# i.MX PM Domains
#
# end of i.MX PM Domains
#
# Qualcomm PM Domains
#
# end of Qualcomm PM Domains
# end of PM Domains
# CONFIG_PM_DEVFREQ is not set
# CONFIG_EXTCON is not set
# CONFIG_MEMORY is not set
CONFIG_IIO=y
CONFIG_IIO_BUFFER=y
# CONFIG_IIO_BUFFER_CB is not set
# CONFIG_IIO_BUFFER_DMA is not set
# CONFIG_IIO_BUFFER_DMAENGINE is not set
# CONFIG_IIO_BUFFER_HW_CONSUMER is not set
CONFIG_IIO_KFIFO_BUF=y
CONFIG_IIO_TRIGGERED_BUFFER=y
# CONFIG_IIO_CONFIGFS is not set
CONFIG_IIO_TRIGGER=y
CONFIG_IIO_CONSUMERS_PER_TRIGGER=2
# CONFIG_IIO_SW_DEVICE is not set
# CONFIG_IIO_SW_TRIGGER is not set
# CONFIG_IIO_TRIGGERED_EVENT is not set
#
# Accelerometers
#
# CONFIG_ADIS16201 is not set
# CONFIG_ADIS16209 is not set
# CONFIG_ADXL313_I2C is not set
# CONFIG_ADXL313_SPI is not set
# CONFIG_ADXL345_I2C is not set
# CONFIG_ADXL345_SPI is not set
# CONFIG_ADXL355_I2C is not set
# CONFIG_ADXL355_SPI is not set
# CONFIG_ADXL367_SPI is not set
# CONFIG_ADXL367_I2C is not set
# CONFIG_ADXL372_SPI is not set
# CONFIG_ADXL372_I2C is not set
# CONFIG_ADXL380_SPI is not set
# CONFIG_ADXL380_I2C is not set
# CONFIG_BMA180 is not set
# CONFIG_BMA220 is not set
# CONFIG_BMA400 is not set
# CONFIG_BMC150_ACCEL is not set
# CONFIG_BMI088_ACCEL is not set
# CONFIG_DA280 is not set
# CONFIG_DA311 is not set
# CONFIG_DMARD06 is not set
# CONFIG_DMARD09 is not set
# CONFIG_DMARD10 is not set
# CONFIG_FXLS8962AF_I2C is not set
# CONFIG_FXLS8962AF_SPI is not set
CONFIG_HID_SENSOR_ACCEL_3D=y
# CONFIG_IIO_KX022A_SPI is not set
# CONFIG_IIO_KX022A_I2C is not set
# CONFIG_KXSD9 is not set
# CONFIG_KXCJK1013 is not set
# CONFIG_MC3230 is not set
# CONFIG_MMA7455_I2C is not set
# CONFIG_MMA7455_SPI is not set
# CONFIG_MMA7660 is not set
# CONFIG_MMA8452 is not set
# CONFIG_MMA9551 is not set
# CONFIG_MMA9553 is not set
# CONFIG_MSA311 is not set
# CONFIG_MXC4005 is not set
# CONFIG_MXC6255 is not set
# CONFIG_SCA3000 is not set
# CONFIG_SCA3300 is not set
# CONFIG_STK8312 is not set
# CONFIG_STK8BA50 is not set
# end of Accelerometers
#
# Analog to digital converters
#
# CONFIG_AD4000 is not set
# CONFIG_AD4030 is not set
# CONFIG_AD4130 is not set
# CONFIG_AD4695 is not set
# CONFIG_AD4851 is not set
# CONFIG_AD7091R5 is not set
# CONFIG_AD7091R8 is not set
# CONFIG_AD7124 is not set
# CONFIG_AD7173 is not set
# CONFIG_AD7191 is not set
# CONFIG_AD7192 is not set
# CONFIG_AD7266 is not set
# CONFIG_AD7280 is not set
# CONFIG_AD7291 is not set
# CONFIG_AD7292 is not set
# CONFIG_AD7298 is not set
# CONFIG_AD7380 is not set
# CONFIG_AD7476 is not set
# CONFIG_AD7606_IFACE_PARALLEL is not set
# CONFIG_AD7606_IFACE_SPI is not set
# CONFIG_AD7625 is not set
# CONFIG_AD7766 is not set
# CONFIG_AD7768_1 is not set
# CONFIG_AD7779 is not set
# CONFIG_AD7780 is not set
# CONFIG_AD7791 is not set
# CONFIG_AD7793 is not set
# CONFIG_AD7887 is not set
# CONFIG_AD7923 is not set
# CONFIG_AD7944 is not set
# CONFIG_AD7949 is not set
# CONFIG_AD799X is not set
# CONFIG_AD9467 is not set
# CONFIG_ENVELOPE_DETECTOR is not set
# CONFIG_GEHC_PMC_ADC is not set
# CONFIG_HI8435 is not set
# CONFIG_HX711 is not set
# CONFIG_LTC2309 is not set
# CONFIG_LTC2471 is not set
# CONFIG_LTC2485 is not set
# CONFIG_LTC2496 is not set
# CONFIG_LTC2497 is not set
# CONFIG_MAX1027 is not set
# CONFIG_MAX11100 is not set
# CONFIG_MAX1118 is not set
# CONFIG_MAX11205 is not set
# CONFIG_MAX11410 is not set
# CONFIG_MAX1241 is not set
# CONFIG_MAX1363 is not set
# CONFIG_MAX34408 is not set
# CONFIG_MAX9611 is not set
# CONFIG_MCP320X is not set
# CONFIG_MCP3422 is not set
# CONFIG_MCP3564 is not set
# CONFIG_MCP3911 is not set
# CONFIG_NAU7802 is not set
# CONFIG_PAC1921 is not set
# CONFIG_PAC1934 is not set
# CONFIG_RICHTEK_RTQ6056 is not set
# CONFIG_SD_ADC_MODULATOR is not set
# CONFIG_TI_ADC081C is not set
# CONFIG_TI_ADC0832 is not set
# CONFIG_TI_ADC084S021 is not set
# CONFIG_TI_ADC12138 is not set
# CONFIG_TI_ADC108S102 is not set
# CONFIG_TI_ADC128S052 is not set
# CONFIG_TI_ADC161S626 is not set
# CONFIG_TI_ADS1015 is not set
# CONFIG_TI_ADS1119 is not set
# CONFIG_TI_ADS7138 is not set
# CONFIG_TI_ADS7924 is not set
# CONFIG_TI_ADS1100 is not set
# CONFIG_TI_ADS1298 is not set
# CONFIG_TI_ADS7950 is not set
# CONFIG_TI_ADS8344 is not set
# CONFIG_TI_ADS8688 is not set
# CONFIG_TI_ADS124S08 is not set
# CONFIG_TI_ADS131E08 is not set
# CONFIG_TI_LMP92064 is not set
# CONFIG_TI_TLC4541 is not set
# CONFIG_TI_TSC2046 is not set
# CONFIG_VF610_ADC is not set
# CONFIG_VIPERBOARD_ADC is not set
# CONFIG_XILINX_XADC is not set
# end of Analog to digital converters
#
# Analog to digital and digital to analog converters
#
# CONFIG_AD74115 is not set
# CONFIG_AD74413R is not set
# end of Analog to digital and digital to analog converters
#
# Analog Front Ends
#
# CONFIG_IIO_RESCALE is not set
# end of Analog Front Ends
#
# Amplifiers
#
# CONFIG_AD8366 is not set
# CONFIG_ADA4250 is not set
# CONFIG_HMC425 is not set
# end of Amplifiers
#
# Capacitance to digital converters
#
# CONFIG_AD7150 is not set
# CONFIG_AD7746 is not set
# end of Capacitance to digital converters
#
# Chemical Sensors
#
# CONFIG_AOSONG_AGS02MA is not set
# CONFIG_ATLAS_PH_SENSOR is not set
# CONFIG_ATLAS_EZO_SENSOR is not set
# CONFIG_BME680 is not set
# CONFIG_CCS811 is not set
# CONFIG_ENS160 is not set
# CONFIG_IAQCORE is not set
# CONFIG_SCD30_CORE is not set
# CONFIG_SCD4X is not set
# CONFIG_SENSIRION_SGP30 is not set
# CONFIG_SENSIRION_SGP40 is not set
# CONFIG_SPS30_I2C is not set
# CONFIG_SENSEAIR_SUNRISE_CO2 is not set
# CONFIG_VZ89X is not set
# end of Chemical Sensors
#
# Hid Sensor IIO Common
#
CONFIG_HID_SENSOR_IIO_COMMON=y
CONFIG_HID_SENSOR_IIO_TRIGGER=y
# end of Hid Sensor IIO Common
#
# IIO SCMI Sensors
#
# end of IIO SCMI Sensors
#
# SSP Sensor Common
#
# CONFIG_IIO_SSP_SENSORHUB is not set
# end of SSP Sensor Common
#
# Digital to analog converters
#
# CONFIG_AD3552R_HS is not set
# CONFIG_AD3552R is not set
# CONFIG_AD5064 is not set
# CONFIG_AD5360 is not set
# CONFIG_AD5380 is not set
# CONFIG_AD5421 is not set
# CONFIG_AD5446 is not set
# CONFIG_AD5449 is not set
# CONFIG_AD5592R is not set
# CONFIG_AD5593R is not set
# CONFIG_AD5504 is not set
# CONFIG_AD5624R_SPI is not set
# CONFIG_AD9739A is not set
# CONFIG_LTC2688 is not set
# CONFIG_AD5686_SPI is not set
# CONFIG_AD5696_I2C is not set
# CONFIG_AD5755 is not set
# CONFIG_AD5758 is not set
# CONFIG_AD5761 is not set
# CONFIG_AD5764 is not set
# CONFIG_AD5766 is not set
# CONFIG_AD5770R is not set
# CONFIG_AD5791 is not set
# CONFIG_AD7293 is not set
# CONFIG_AD7303 is not set
# CONFIG_AD8460 is not set
# CONFIG_AD8801 is not set
# CONFIG_BD79703 is not set
# CONFIG_DPOT_DAC is not set
# CONFIG_DS4424 is not set
# CONFIG_LTC1660 is not set
# CONFIG_LTC2632 is not set
# CONFIG_LTC2664 is not set
# CONFIG_M62332 is not set
# CONFIG_MAX517 is not set
# CONFIG_MAX5522 is not set
# CONFIG_MAX5821 is not set
# CONFIG_MCP4725 is not set
# CONFIG_MCP4728 is not set
# CONFIG_MCP4821 is not set
# CONFIG_MCP4922 is not set
# CONFIG_TI_DAC082S085 is not set
# CONFIG_TI_DAC5571 is not set
# CONFIG_TI_DAC7311 is not set
# CONFIG_TI_DAC7612 is not set
# CONFIG_VF610_DAC is not set
# end of Digital to analog converters
#
# IIO dummy driver
#
# end of IIO dummy driver
#
# Filters
#
# CONFIG_ADMV8818 is not set
# end of Filters
#
# Frequency Synthesizers DDS/PLL
#
#
# Clock Generator/Distribution
#
# CONFIG_AD9523 is not set
# end of Clock Generator/Distribution
#
# Phase-Locked Loop (PLL) frequency synthesizers
#
# CONFIG_ADF4350 is not set
# CONFIG_ADF4371 is not set
# CONFIG_ADF4377 is not set
# CONFIG_ADMFM2000 is not set
# CONFIG_ADMV1013 is not set
# CONFIG_ADMV1014 is not set
# CONFIG_ADMV4420 is not set
# CONFIG_ADRF6780 is not set
# end of Phase-Locked Loop (PLL) frequency synthesizers
# end of Frequency Synthesizers DDS/PLL
#
# Digital gyroscope sensors
#
# CONFIG_ADIS16080 is not set
# CONFIG_ADIS16130 is not set
# CONFIG_ADIS16136 is not set
# CONFIG_ADIS16260 is not set
# CONFIG_ADXRS290 is not set
# CONFIG_ADXRS450 is not set
# CONFIG_BMG160 is not set
# CONFIG_FXAS21002C is not set
CONFIG_HID_SENSOR_GYRO_3D=y
# CONFIG_MPU3050_I2C is not set
# CONFIG_IIO_ST_GYRO_3AXIS is not set
# CONFIG_ITG3200 is not set
# end of Digital gyroscope sensors
#
# Health Sensors
#
#
# Heart Rate Monitors
#
# CONFIG_AFE4403 is not set
# CONFIG_AFE4404 is not set
# CONFIG_MAX30100 is not set
# CONFIG_MAX30102 is not set
# end of Heart Rate Monitors
# end of Health Sensors
#
# Humidity sensors
#
# CONFIG_AM2315 is not set
# CONFIG_DHT11 is not set
# CONFIG_ENS210 is not set
# CONFIG_HDC100X is not set
# CONFIG_HDC2010 is not set
# CONFIG_HDC3020 is not set
CONFIG_HID_SENSOR_HUMIDITY=y
# CONFIG_HTS221 is not set
# CONFIG_HTU21 is not set
# CONFIG_SI7005 is not set
# CONFIG_SI7020 is not set
# end of Humidity sensors
#
# Inertial measurement units
#
# CONFIG_ADIS16400 is not set
# CONFIG_ADIS16460 is not set
# CONFIG_ADIS16475 is not set
# CONFIG_ADIS16480 is not set
# CONFIG_ADIS16550 is not set
# CONFIG_BMI160_I2C is not set
# CONFIG_BMI160_SPI is not set
# CONFIG_BMI270_I2C is not set
# CONFIG_BMI270_SPI is not set
# CONFIG_BMI323_I2C is not set
# CONFIG_BMI323_SPI is not set
# CONFIG_BOSCH_BNO055_I2C is not set
# CONFIG_FXOS8700_I2C is not set
# CONFIG_FXOS8700_SPI is not set
# CONFIG_KMX61 is not set
# CONFIG_INV_ICM42600_I2C is not set
# CONFIG_INV_ICM42600_SPI is not set
# CONFIG_INV_MPU6050_I2C is not set
# CONFIG_INV_MPU6050_SPI is not set
# CONFIG_SMI240 is not set
# CONFIG_IIO_ST_LSM6DSX is not set
# end of Inertial measurement units
#
# Light sensors
#
# CONFIG_ACPI_ALS is not set
# CONFIG_ADJD_S311 is not set
# CONFIG_ADUX1020 is not set
# CONFIG_AL3000A is not set
# CONFIG_AL3010 is not set
# CONFIG_AL3320A is not set
# CONFIG_APDS9160 is not set
# CONFIG_APDS9300 is not set
# CONFIG_APDS9306 is not set
# CONFIG_APDS9960 is not set
# CONFIG_AS73211 is not set
# CONFIG_BH1745 is not set
# CONFIG_BH1750 is not set
# CONFIG_BH1780 is not set
# CONFIG_CM32181 is not set
# CONFIG_CM3232 is not set
# CONFIG_CM3323 is not set
# CONFIG_CM3605 is not set
# CONFIG_CM36651 is not set
# CONFIG_GP2AP002 is not set
# CONFIG_GP2AP020A00F is not set
# CONFIG_SENSORS_ISL29018 is not set
# CONFIG_SENSORS_ISL29028 is not set
# CONFIG_ISL29125 is not set
# CONFIG_ISL76682 is not set
CONFIG_HID_SENSOR_ALS=y
CONFIG_HID_SENSOR_PROX=y
# CONFIG_JSA1212 is not set
# CONFIG_ROHM_BU27034 is not set
# CONFIG_RPR0521 is not set
# CONFIG_LTR390 is not set
# CONFIG_LTR501 is not set
# CONFIG_LTRF216A is not set
# CONFIG_LV0104CS is not set
# CONFIG_MAX44000 is not set
# CONFIG_MAX44009 is not set
# CONFIG_NOA1305 is not set
# CONFIG_OPT3001 is not set
# CONFIG_OPT4001 is not set
# CONFIG_OPT4060 is not set
# CONFIG_PA12203001 is not set
# CONFIG_SI1133 is not set
# CONFIG_SI1145 is not set
# CONFIG_STK3310 is not set
# CONFIG_ST_UVIS25 is not set
# CONFIG_TCS3414 is not set
# CONFIG_TCS3472 is not set
# CONFIG_SENSORS_TSL2563 is not set
# CONFIG_TSL2583 is not set
# CONFIG_TSL2591 is not set
# CONFIG_TSL2772 is not set
# CONFIG_TSL4531 is not set
# CONFIG_US5182D is not set
# CONFIG_VCNL4000 is not set
# CONFIG_VCNL4035 is not set
# CONFIG_VEML3235 is not set
# CONFIG_VEML6030 is not set
# CONFIG_VEML6040 is not set
# CONFIG_VEML6070 is not set
# CONFIG_VEML6075 is not set
# CONFIG_VL6180 is not set
# CONFIG_ZOPT2201 is not set
# end of Light sensors
#
# Magnetometer sensors
#
# CONFIG_AK8974 is not set
# CONFIG_AK8975 is not set
# CONFIG_AK09911 is not set
# CONFIG_ALS31300 is not set
# CONFIG_BMC150_MAGN_I2C is not set
# CONFIG_BMC150_MAGN_SPI is not set
# CONFIG_MAG3110 is not set
CONFIG_HID_SENSOR_MAGNETOMETER_3D=y
# CONFIG_MMC35240 is not set
# CONFIG_IIO_ST_MAGN_3AXIS is not set
# CONFIG_SENSORS_HMC5843_I2C is not set
# CONFIG_SENSORS_HMC5843_SPI is not set
# CONFIG_SENSORS_RM3100_I2C is not set
# CONFIG_SENSORS_RM3100_SPI is not set
# CONFIG_SI7210 is not set
# CONFIG_TI_TMAG5273 is not set
# CONFIG_YAMAHA_YAS530 is not set
# end of Magnetometer sensors
#
# Multiplexers
#
# CONFIG_IIO_MUX is not set
# end of Multiplexers
#
# Inclinometer sensors
#
CONFIG_HID_SENSOR_INCLINOMETER_3D=y
CONFIG_HID_SENSOR_DEVICE_ROTATION=y
# end of Inclinometer sensors
#
# Triggers - standalone
#
# CONFIG_IIO_INTERRUPT_TRIGGER is not set
# CONFIG_IIO_SYSFS_TRIGGER is not set
# end of Triggers - standalone
#
# Linear and angular position sensors
#
# CONFIG_HID_SENSOR_CUSTOM_INTEL_HINGE is not set
# end of Linear and angular position sensors
#
# Digital potentiometers
#
# CONFIG_AD5110 is not set
# CONFIG_AD5272 is not set
# CONFIG_DS1803 is not set
# CONFIG_MAX5432 is not set
# CONFIG_MAX5481 is not set
# CONFIG_MAX5487 is not set
# CONFIG_MCP4018 is not set
# CONFIG_MCP4131 is not set
# CONFIG_MCP4531 is not set
# CONFIG_MCP41010 is not set
# CONFIG_TPL0102 is not set
# CONFIG_X9250 is not set
# end of Digital potentiometers
#
# Digital potentiostats
#
# CONFIG_LMP91000 is not set
# end of Digital potentiostats
#
# Pressure sensors
#
# CONFIG_ABP060MG is not set
# CONFIG_ROHM_BM1390 is not set
# CONFIG_BMP280 is not set
# CONFIG_DLHL60D is not set
# CONFIG_DPS310 is not set
CONFIG_HID_SENSOR_PRESS=y
# CONFIG_HP03 is not set
# CONFIG_HSC030PA is not set
# CONFIG_ICP10100 is not set
# CONFIG_MPL115_I2C is not set
# CONFIG_MPL115_SPI is not set
# CONFIG_MPL3115 is not set
# CONFIG_MPRLS0025PA is not set
# CONFIG_MS5611 is not set
# CONFIG_MS5637 is not set
# CONFIG_SDP500 is not set
# CONFIG_IIO_ST_PRESS is not set
# CONFIG_T5403 is not set
# CONFIG_HP206C is not set
# CONFIG_ZPA2326 is not set
# end of Pressure sensors
#
# Lightning sensors
#
# CONFIG_AS3935 is not set
# end of Lightning sensors
#
# Proximity and distance sensors
#
# CONFIG_HX9023S is not set
# CONFIG_IRSD200 is not set
# CONFIG_ISL29501 is not set
# CONFIG_LIDAR_LITE_V2 is not set
# CONFIG_MB1232 is not set
# CONFIG_PING is not set
# CONFIG_RFD77402 is not set
# CONFIG_SRF04 is not set
# CONFIG_SX9310 is not set
# CONFIG_SX9324 is not set
# CONFIG_SX9360 is not set
# CONFIG_SX9500 is not set
# CONFIG_SRF08 is not set
# CONFIG_VCNL3020 is not set
# CONFIG_VL53L0X_I2C is not set
# CONFIG_AW96103 is not set
# end of Proximity and distance sensors
#
# Resolver to digital converters
#
# CONFIG_AD2S90 is not set
# CONFIG_AD2S1200 is not set
# CONFIG_AD2S1210 is not set
# end of Resolver to digital converters
#
# Temperature sensors
#
# CONFIG_LTC2983 is not set
# CONFIG_MAXIM_THERMOCOUPLE is not set
CONFIG_HID_SENSOR_TEMP=y
# CONFIG_MLX90614 is not set
# CONFIG_MLX90632 is not set
# CONFIG_MLX90635 is not set
# CONFIG_TMP006 is not set
# CONFIG_TMP007 is not set
# CONFIG_TMP117 is not set
# CONFIG_TSYS01 is not set
# CONFIG_TSYS02D is not set
# CONFIG_MAX30208 is not set
# CONFIG_MAX31856 is not set
# CONFIG_MAX31865 is not set
# CONFIG_MCP9600 is not set
# end of Temperature sensors
CONFIG_NTB=y
# CONFIG_NTB_MSI is not set
# CONFIG_NTB_AMD is not set
# CONFIG_NTB_IDT is not set
CONFIG_NTB_INTEL=y
# CONFIG_NTB_EPF is not set
# CONFIG_NTB_SWITCHTEC is not set
CONFIG_NTB_PINGPONG=y
CONFIG_NTB_TOOL=y
CONFIG_NTB_PERF=y
CONFIG_NTB_TRANSPORT=y
CONFIG_PWM=y
# CONFIG_PWM_DEBUG is not set
# CONFIG_PWM_CLK is not set
# CONFIG_PWM_DWC is not set
# CONFIG_PWM_GPIO is not set
CONFIG_PWM_LPSS=y
CONFIG_PWM_LPSS_PCI=y
CONFIG_PWM_LPSS_PLATFORM=y
# CONFIG_PWM_PCA9685 is not set
#
# IRQ chip support
#
# end of IRQ chip support
# CONFIG_IPACK_BUS is not set
# CONFIG_RESET_CONTROLLER is not set
#
# PHY Subsystem
#
# CONFIG_GENERIC_PHY is not set
# CONFIG_USB_LGM_PHY is not set
# CONFIG_PHY_CAN_TRANSCEIVER is not set
#
# PHY drivers for Broadcom platforms
#
# CONFIG_BCM_KONA_USB2_PHY is not set
# end of PHY drivers for Broadcom platforms
# CONFIG_PHY_PXA_28NM_HSIC is not set
# CONFIG_PHY_PXA_28NM_USB2 is not set
# CONFIG_PHY_CPCAP_USB is not set
# CONFIG_PHY_INTEL_LGM_EMMC is not set
# end of PHY Subsystem
CONFIG_POWERCAP=y
CONFIG_INTEL_RAPL_CORE=y
CONFIG_INTEL_RAPL=y
CONFIG_INTEL_RAPL_TPMI=y
CONFIG_IDLE_INJECT=y
# CONFIG_MCB is not set
#
# Performance monitor support
#
# CONFIG_DWC_PCIE_PMU is not set
CONFIG_CXL_PMU=y
# end of Performance monitor support
CONFIG_RAS=y
# CONFIG_RAS_CEC is not set
CONFIG_AMD_ATL=m
CONFIG_AMD_ATL_PRM=y
CONFIG_RAS_FMPM=m
CONFIG_USB4=y
# CONFIG_USB4_DEBUGFS_WRITE is not set
# CONFIG_USB4_DMA_TEST is not set
#
# Android
#
# CONFIG_ANDROID_BINDER_IPC is not set
# end of Android
CONFIG_LIBNVDIMM=y
CONFIG_BLK_DEV_PMEM=y
CONFIG_ND_CLAIM=y
CONFIG_ND_BTT=y
CONFIG_BTT=y
CONFIG_ND_PFN=y
CONFIG_NVDIMM_PFN=y
CONFIG_NVDIMM_DAX=y
CONFIG_NVDIMM_KEYS=y
# CONFIG_NVDIMM_SECURITY_TEST is not set
CONFIG_DAX=y
CONFIG_DEV_DAX=y
CONFIG_DEV_DAX_PMEM=y
CONFIG_DEV_DAX_HMEM=y
CONFIG_DEV_DAX_CXL=y
CONFIG_DEV_DAX_HMEM_DEVICES=y
CONFIG_DEV_DAX_KMEM=y
CONFIG_NVMEM=y
CONFIG_NVMEM_SYSFS=y
# CONFIG_NVMEM_LAYOUTS is not set
# CONFIG_NVMEM_RMEM is not set
#
# HW tracing support
#
# CONFIG_STM is not set
CONFIG_INTEL_TH=y
CONFIG_INTEL_TH_PCI=y
CONFIG_INTEL_TH_ACPI=y
CONFIG_INTEL_TH_GTH=y
CONFIG_INTEL_TH_MSU=y
CONFIG_INTEL_TH_PTI=y
# CONFIG_INTEL_TH_DEBUG is not set
# end of HW tracing support
# CONFIG_FPGA is not set
# CONFIG_TEE is not set
# CONFIG_SIOX is not set
# CONFIG_SLIMBUS is not set
# CONFIG_INTERCONNECT is not set
# CONFIG_COUNTER is not set
# CONFIG_MOST is not set
# CONFIG_PECI is not set
# CONFIG_HTE is not set
CONFIG_DPLL=y
# end of Device Drivers
#
# File systems
#
CONFIG_DCACHE_WORD_ACCESS=y
# CONFIG_VALIDATE_FS_PARSER is not set
CONFIG_FS_IOMAP=y
CONFIG_FS_STACK=y
CONFIG_BUFFER_HEAD=y
CONFIG_LEGACY_DIRECT_IO=y
# CONFIG_EXT2_FS is not set
CONFIG_EXT3_FS=y
# CONFIG_EXT3_FS_POSIX_ACL is not set
# CONFIG_EXT3_FS_SECURITY is not set
CONFIG_EXT4_FS=y
CONFIG_EXT4_USE_FOR_EXT2=y
CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_EXT4_FS_SECURITY=y
# CONFIG_EXT4_DEBUG is not set
CONFIG_JBD2=y
# CONFIG_JBD2_DEBUG is not set
CONFIG_FS_MBCACHE=y
# CONFIG_JFS_FS is not set
CONFIG_XFS_FS=y
# CONFIG_XFS_SUPPORT_V4 is not set
CONFIG_XFS_SUPPORT_ASCII_CI=y
# CONFIG_XFS_QUOTA is not set
CONFIG_XFS_POSIX_ACL=y
# CONFIG_XFS_RT is not set
# CONFIG_XFS_ONLINE_SCRUB is not set
# CONFIG_XFS_WARN is not set
# CONFIG_XFS_DEBUG is not set
# CONFIG_GFS2_FS is not set
# CONFIG_OCFS2_FS is not set
# CONFIG_BTRFS_FS is not set
# CONFIG_NILFS2_FS is not set
# CONFIG_F2FS_FS is not set
# CONFIG_BCACHEFS_FS is not set
# CONFIG_ZONEFS_FS is not set
CONFIG_FS_DAX=y
CONFIG_FS_DAX_PMD=y
CONFIG_FS_POSIX_ACL=y
CONFIG_EXPORTFS=y
CONFIG_EXPORTFS_BLOCK_OPS=y
CONFIG_FILE_LOCKING=y
CONFIG_FS_ENCRYPTION=y
CONFIG_FS_ENCRYPTION_ALGS=y
# CONFIG_FS_VERITY is not set
CONFIG_FSNOTIFY=y
CONFIG_DNOTIFY=y
CONFIG_INOTIFY_USER=y
CONFIG_FANOTIFY=y
CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y
CONFIG_QUOTA=y
CONFIG_QUOTA_NETLINK_INTERFACE=y
# CONFIG_QUOTA_DEBUG is not set
CONFIG_QUOTA_TREE=y
# CONFIG_QFMT_V1 is not set
CONFIG_QFMT_V2=y
CONFIG_QUOTACTL=y
CONFIG_AUTOFS_FS=y
CONFIG_FUSE_FS=y
CONFIG_CUSE=y
CONFIG_VIRTIO_FS=y
CONFIG_FUSE_DAX=y
CONFIG_FUSE_PASSTHROUGH=y
CONFIG_FUSE_IO_URING=y
CONFIG_OVERLAY_FS=y
# CONFIG_OVERLAY_FS_REDIRECT_DIR is not set
# CONFIG_OVERLAY_FS_REDIRECT_ALWAYS_FOLLOW is not set
# CONFIG_OVERLAY_FS_INDEX is not set
# CONFIG_OVERLAY_FS_XINO_AUTO is not set
# CONFIG_OVERLAY_FS_METACOPY is not set
# CONFIG_OVERLAY_FS_DEBUG is not set
#
# Caches
#
CONFIG_NETFS_SUPPORT=y
CONFIG_NETFS_STATS=y
# CONFIG_NETFS_DEBUG is not set
CONFIG_FSCACHE=y
CONFIG_FSCACHE_STATS=y
CONFIG_CACHEFILES=y
# CONFIG_CACHEFILES_DEBUG is not set
# CONFIG_CACHEFILES_ERROR_INJECTION is not set
CONFIG_CACHEFILES_ONDEMAND=y
# end of Caches
#
# CD-ROM/DVD Filesystems
#
CONFIG_ISO9660_FS=y
CONFIG_JOLIET=y
CONFIG_ZISOFS=y
# CONFIG_UDF_FS is not set
# end of CD-ROM/DVD Filesystems
#
# DOS/FAT/EXFAT/NT Filesystems
#
CONFIG_FAT_FS=y
CONFIG_MSDOS_FS=y
CONFIG_VFAT_FS=y
CONFIG_FAT_DEFAULT_CODEPAGE=437
CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
# CONFIG_FAT_DEFAULT_UTF8 is not set
CONFIG_EXFAT_FS=y
CONFIG_EXFAT_DEFAULT_IOCHARSET="utf8"
CONFIG_NTFS3_FS=y
# CONFIG_NTFS3_64BIT_CLUSTER is not set
CONFIG_NTFS3_LZX_XPRESS=y
CONFIG_NTFS3_FS_POSIX_ACL=y
CONFIG_NTFS_FS=y
# end of DOS/FAT/EXFAT/NT Filesystems
#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y
CONFIG_PROC_VMCORE=y
CONFIG_PROC_VMCORE_DEVICE_DUMP=y
CONFIG_PROC_SYSCTL=y
CONFIG_PROC_PAGE_MONITOR=y
CONFIG_PROC_CHILDREN=y
CONFIG_PROC_PID_ARCH_STATUS=y
CONFIG_PROC_CPU_RESCTRL=y
CONFIG_KERNFS=y
CONFIG_SYSFS=y
CONFIG_TMPFS=y
CONFIG_TMPFS_POSIX_ACL=y
CONFIG_TMPFS_XATTR=y
# CONFIG_TMPFS_INODE64 is not set
# CONFIG_TMPFS_QUOTA is not set
CONFIG_HUGETLBFS=y
# CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP_DEFAULT_ON is not set
CONFIG_HUGETLB_PAGE=y
CONFIG_HUGETLB_PAGE_OPTIMIZE_VMEMMAP=y
CONFIG_HUGETLB_PMD_PAGE_TABLE_SHARING=y
CONFIG_ARCH_HAS_GIGANTIC_PAGE=y
CONFIG_CONFIGFS_FS=y
CONFIG_EFIVAR_FS=y
# end of Pseudo filesystems
CONFIG_MISC_FILESYSTEMS=y
# CONFIG_ORANGEFS_FS is not set
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_ECRYPT_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_HFSPLUS_FS is not set
# CONFIG_BEFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_EFS_FS is not set
# CONFIG_JFFS2_FS is not set
# CONFIG_UBIFS_FS is not set
CONFIG_CRAMFS=y
CONFIG_CRAMFS_BLOCKDEV=y
# CONFIG_CRAMFS_MTD is not set
CONFIG_SQUASHFS=y
# CONFIG_SQUASHFS_FILE_CACHE is not set
CONFIG_SQUASHFS_FILE_DIRECT=y
CONFIG_SQUASHFS_DECOMP_SINGLE=y
# CONFIG_SQUASHFS_CHOICE_DECOMP_BY_MOUNT is not set
CONFIG_SQUASHFS_COMPILE_DECOMP_SINGLE=y
# CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI is not set
# CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI_PERCPU is not set
CONFIG_SQUASHFS_XATTR=y
CONFIG_SQUASHFS_ZLIB=y
# CONFIG_SQUASHFS_LZ4 is not set
CONFIG_SQUASHFS_LZO=y
CONFIG_SQUASHFS_XZ=y
# CONFIG_SQUASHFS_ZSTD is not set
# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set
# CONFIG_SQUASHFS_EMBEDDED is not set
CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
# CONFIG_VXFS_FS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_OMFS_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_QNX4FS_FS is not set
# CONFIG_QNX6FS_FS is not set
# CONFIG_ROMFS_FS is not set
CONFIG_PSTORE=y
CONFIG_PSTORE_DEFAULT_KMSG_BYTES=10240
CONFIG_PSTORE_COMPRESS=y
# CONFIG_PSTORE_CONSOLE is not set
# CONFIG_PSTORE_PMSG is not set
# CONFIG_PSTORE_FTRACE is not set
CONFIG_PSTORE_RAM=y
# CONFIG_PSTORE_BLK is not set
# CONFIG_UFS_FS is not set
CONFIG_EROFS_FS=y
# CONFIG_EROFS_FS_DEBUG is not set
CONFIG_EROFS_FS_XATTR=y
CONFIG_EROFS_FS_POSIX_ACL=y
CONFIG_EROFS_FS_SECURITY=y
CONFIG_EROFS_FS_BACKED_BY_FILE=y
# CONFIG_EROFS_FS_ZIP is not set
CONFIG_EROFS_FS_ONDEMAND=y
# CONFIG_NETWORK_FILESYSTEMS is not set
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="utf8"
CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_CODEPAGE_737=y
CONFIG_NLS_CODEPAGE_775=y
CONFIG_NLS_CODEPAGE_850=y
CONFIG_NLS_CODEPAGE_852=y
CONFIG_NLS_CODEPAGE_855=y
CONFIG_NLS_CODEPAGE_857=y
CONFIG_NLS_CODEPAGE_860=y
CONFIG_NLS_CODEPAGE_861=y
CONFIG_NLS_CODEPAGE_862=y
CONFIG_NLS_CODEPAGE_863=y
CONFIG_NLS_CODEPAGE_864=y
CONFIG_NLS_CODEPAGE_865=y
CONFIG_NLS_CODEPAGE_866=y
CONFIG_NLS_CODEPAGE_869=y
CONFIG_NLS_CODEPAGE_936=y
CONFIG_NLS_CODEPAGE_950=y
CONFIG_NLS_CODEPAGE_932=y
CONFIG_NLS_CODEPAGE_949=y
CONFIG_NLS_CODEPAGE_874=y
CONFIG_NLS_ISO8859_8=y
CONFIG_NLS_CODEPAGE_1250=y
CONFIG_NLS_CODEPAGE_1251=y
CONFIG_NLS_ASCII=y
CONFIG_NLS_ISO8859_1=y
CONFIG_NLS_ISO8859_2=y
CONFIG_NLS_ISO8859_3=y
CONFIG_NLS_ISO8859_4=y
CONFIG_NLS_ISO8859_5=y
CONFIG_NLS_ISO8859_6=y
CONFIG_NLS_ISO8859_7=y
CONFIG_NLS_ISO8859_9=y
CONFIG_NLS_ISO8859_13=y
CONFIG_NLS_ISO8859_14=y
CONFIG_NLS_ISO8859_15=y
CONFIG_NLS_KOI8_R=y
CONFIG_NLS_KOI8_U=y
CONFIG_NLS_MAC_ROMAN=y
CONFIG_NLS_MAC_CELTIC=y
CONFIG_NLS_MAC_CENTEURO=y
CONFIG_NLS_MAC_CROATIAN=y
CONFIG_NLS_MAC_CYRILLIC=y
CONFIG_NLS_MAC_GAELIC=y
CONFIG_NLS_MAC_GREEK=y
CONFIG_NLS_MAC_ICELAND=y
CONFIG_NLS_MAC_INUIT=y
CONFIG_NLS_MAC_ROMANIAN=y
CONFIG_NLS_MAC_TURKISH=y
CONFIG_NLS_UTF8=y
# CONFIG_DLM is not set
CONFIG_UNICODE=y
CONFIG_IO_WQ=y
# end of File systems
#
# Security options
#
CONFIG_KEYS=y
# CONFIG_KEYS_REQUEST_CACHE is not set
CONFIG_PERSISTENT_KEYRINGS=y
# CONFIG_BIG_KEYS is not set
CONFIG_TRUSTED_KEYS=y
CONFIG_HAVE_TRUSTED_KEYS=y
CONFIG_TRUSTED_KEYS_TPM=y
CONFIG_ENCRYPTED_KEYS=y
# CONFIG_USER_DECRYPTED_DATA is not set
# CONFIG_KEY_DH_OPERATIONS is not set
# CONFIG_SECURITY_DMESG_RESTRICT is not set
CONFIG_PROC_MEM_ALWAYS_FORCE=y
# CONFIG_PROC_MEM_FORCE_PTRACE is not set
# CONFIG_PROC_MEM_NO_FORCE is not set
CONFIG_SECURITY=y
CONFIG_HAS_SECURITY_AUDIT=y
CONFIG_SECURITYFS=y
CONFIG_SECURITY_NETWORK=y
CONFIG_SECURITY_NETWORK_XFRM=y
CONFIG_SECURITY_PATH=y
CONFIG_INTEL_TXT=y
CONFIG_LSM_MMAP_MIN_ADDR=65535
# CONFIG_STATIC_USERMODEHELPER is not set
CONFIG_SECURITY_SELINUX=y
CONFIG_SECURITY_SELINUX_BOOTPARAM=y
CONFIG_SECURITY_SELINUX_DEVELOP=y
CONFIG_SECURITY_SELINUX_AVC_STATS=y
CONFIG_SECURITY_SELINUX_SIDTAB_HASH_BITS=9
CONFIG_SECURITY_SELINUX_SID2STR_CACHE_SIZE=256
# CONFIG_SECURITY_SELINUX_DEBUG is not set
# CONFIG_SECURITY_SMACK is not set
# CONFIG_SECURITY_TOMOYO is not set
CONFIG_SECURITY_APPARMOR=y
# CONFIG_SECURITY_APPARMOR_DEBUG is not set
CONFIG_SECURITY_APPARMOR_INTROSPECT_POLICY=y
CONFIG_SECURITY_APPARMOR_HASH=y
CONFIG_SECURITY_APPARMOR_HASH_DEFAULT=y
CONFIG_SECURITY_APPARMOR_EXPORT_BINARY=y
CONFIG_SECURITY_APPARMOR_PARANOID_LOAD=y
# CONFIG_SECURITY_LOADPIN is not set
CONFIG_SECURITY_YAMA=y
# CONFIG_SECURITY_SAFESETID is not set
CONFIG_SECURITY_LOCKDOWN_LSM=y
CONFIG_SECURITY_LOCKDOWN_LSM_EARLY=y
CONFIG_LOCK_DOWN_KERNEL_FORCE_NONE=y
# CONFIG_LOCK_DOWN_KERNEL_FORCE_INTEGRITY is not set
# CONFIG_LOCK_DOWN_KERNEL_FORCE_CONFIDENTIALITY is not set
# CONFIG_SECURITY_LANDLOCK is not set
# CONFIG_SECURITY_IPE is not set
CONFIG_INTEGRITY=y
CONFIG_INTEGRITY_SIGNATURE=y
CONFIG_INTEGRITY_ASYMMETRIC_KEYS=y
CONFIG_INTEGRITY_TRUSTED_KEYRING=y
CONFIG_INTEGRITY_PLATFORM_KEYRING=y
# CONFIG_INTEGRITY_MACHINE_KEYRING is not set
CONFIG_LOAD_UEFI_KEYS=y
CONFIG_INTEGRITY_AUDIT=y
CONFIG_IMA=y
# CONFIG_IMA_KEXEC is not set
CONFIG_IMA_MEASURE_PCR_IDX=10
CONFIG_IMA_LSM_RULES=y
CONFIG_IMA_NG_TEMPLATE=y
# CONFIG_IMA_SIG_TEMPLATE is not set
CONFIG_IMA_DEFAULT_TEMPLATE="ima-ng"
# CONFIG_IMA_DEFAULT_HASH_SHA1 is not set
CONFIG_IMA_DEFAULT_HASH_SHA256=y
# CONFIG_IMA_DEFAULT_HASH_SHA512 is not set
# CONFIG_IMA_DEFAULT_HASH_WP512 is not set
# CONFIG_IMA_DEFAULT_HASH_SM3 is not set
CONFIG_IMA_DEFAULT_HASH="sha256"
# CONFIG_IMA_WRITE_POLICY is not set
CONFIG_IMA_READ_POLICY=y
CONFIG_IMA_APPRAISE=y
# CONFIG_IMA_ARCH_POLICY is not set
# CONFIG_IMA_APPRAISE_BUILD_POLICY is not set
CONFIG_IMA_APPRAISE_BOOTPARAM=y
CONFIG_IMA_APPRAISE_MODSIG=y
# CONFIG_IMA_KEYRINGS_PERMIT_SIGNED_BY_BUILTIN_OR_SECONDARY is not set
# CONFIG_IMA_BLACKLIST_KEYRING is not set
CONFIG_IMA_LOAD_X509=y
CONFIG_IMA_X509_PATH="/etc/keys/x509_ima.der"
# CONFIG_IMA_APPRAISE_SIGNED_INIT is not set
CONFIG_IMA_MEASURE_ASYMMETRIC_KEYS=y
CONFIG_IMA_QUEUE_EARLY_BOOT_KEYS=y
# CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT is not set
# CONFIG_IMA_DISABLE_HTABLE is not set
CONFIG_EVM=y
CONFIG_EVM_ATTR_FSUUID=y
# CONFIG_EVM_ADD_XATTRS is not set
CONFIG_EVM_LOAD_X509=y
CONFIG_EVM_X509_PATH="/etc/keys/x509_evm.der"
CONFIG_DEFAULT_SECURITY_SELINUX=y
# CONFIG_DEFAULT_SECURITY_APPARMOR is not set
# CONFIG_DEFAULT_SECURITY_DAC is not set
CONFIG_LSM="lockdown,yama,loadpin,safesetid,integrity,selinux,smack,tomoyo,apparmor,bpf"
#
# Kernel hardening options
#
#
# Memory initialization
#
CONFIG_INIT_STACK_NONE=y
# CONFIG_INIT_ON_ALLOC_DEFAULT_ON is not set
# CONFIG_INIT_ON_FREE_DEFAULT_ON is not set
# end of Memory initialization
#
# Bounds checking
#
CONFIG_FORTIFY_SOURCE=y
CONFIG_HARDENED_USERCOPY=y
CONFIG_HARDENED_USERCOPY_DEFAULT_ON=y
# end of Bounds checking
#
# Hardening of kernel data structures
#
CONFIG_LIST_HARDENED=y
# CONFIG_BUG_ON_DATA_CORRUPTION is not set
# end of Hardening of kernel data structures
CONFIG_RANDSTRUCT_NONE=y
# end of Kernel hardening options
# end of Security options
CONFIG_XOR_BLOCKS=y
CONFIG_ASYNC_CORE=y
CONFIG_ASYNC_MEMCPY=y
CONFIG_ASYNC_XOR=y
CONFIG_ASYNC_PQ=y
CONFIG_ASYNC_RAID6_RECOV=y
CONFIG_CRYPTO=y
#
# Crypto core or helper
#
CONFIG_CRYPTO_FIPS=y
CONFIG_CRYPTO_FIPS_NAME="Linux Kernel Cryptographic API"
# CONFIG_CRYPTO_FIPS_CUSTOM_VERSION is not set
CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_ALGAPI2=y
CONFIG_CRYPTO_AEAD=y
CONFIG_CRYPTO_AEAD2=y
CONFIG_CRYPTO_SIG=y
CONFIG_CRYPTO_SIG2=y
CONFIG_CRYPTO_SKCIPHER=y
CONFIG_CRYPTO_SKCIPHER2=y
CONFIG_CRYPTO_HASH=y
CONFIG_CRYPTO_HASH2=y
CONFIG_CRYPTO_RNG=y
CONFIG_CRYPTO_RNG2=y
CONFIG_CRYPTO_RNG_DEFAULT=y
CONFIG_CRYPTO_AKCIPHER2=y
CONFIG_CRYPTO_AKCIPHER=y
CONFIG_CRYPTO_KPP2=y
CONFIG_CRYPTO_KPP=y
CONFIG_CRYPTO_ACOMP2=y
CONFIG_CRYPTO_HKDF=y
CONFIG_CRYPTO_MANAGER=y
CONFIG_CRYPTO_MANAGER2=y
CONFIG_CRYPTO_USER=y
# CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set
# CONFIG_CRYPTO_MANAGER_EXTRA_TESTS is not set
CONFIG_CRYPTO_NULL=y
CONFIG_CRYPTO_NULL2=y
CONFIG_CRYPTO_PCRYPT=y
CONFIG_CRYPTO_CRYPTD=y
CONFIG_CRYPTO_AUTHENC=y
# CONFIG_CRYPTO_KRB5ENC is not set
CONFIG_CRYPTO_TEST=m
CONFIG_CRYPTO_SIMD=y
# end of Crypto core or helper
#
# Public-key cryptography
#
CONFIG_CRYPTO_RSA=y
CONFIG_CRYPTO_DH=y
# CONFIG_CRYPTO_DH_RFC7919_GROUPS is not set
CONFIG_CRYPTO_ECC=y
CONFIG_CRYPTO_ECDH=y
# CONFIG_CRYPTO_ECDSA is not set
# CONFIG_CRYPTO_ECRDSA is not set
# CONFIG_CRYPTO_CURVE25519 is not set
# end of Public-key cryptography
#
# Block ciphers
#
CONFIG_CRYPTO_AES=y
# CONFIG_CRYPTO_AES_TI is not set
CONFIG_CRYPTO_ANUBIS=y
# CONFIG_CRYPTO_ARIA is not set
CONFIG_CRYPTO_BLOWFISH=y
CONFIG_CRYPTO_BLOWFISH_COMMON=y
CONFIG_CRYPTO_CAMELLIA=y
CONFIG_CRYPTO_CAST_COMMON=y
CONFIG_CRYPTO_CAST5=y
CONFIG_CRYPTO_CAST6=y
CONFIG_CRYPTO_DES=y
CONFIG_CRYPTO_FCRYPT=y
CONFIG_CRYPTO_KHAZAD=y
CONFIG_CRYPTO_SEED=y
CONFIG_CRYPTO_SERPENT=y
CONFIG_CRYPTO_SM4=y
CONFIG_CRYPTO_SM4_GENERIC=y
CONFIG_CRYPTO_TEA=y
CONFIG_CRYPTO_TWOFISH=y
CONFIG_CRYPTO_TWOFISH_COMMON=y
# end of Block ciphers
#
# Length-preserving ciphers and modes
#
# CONFIG_CRYPTO_ADIANTUM is not set
CONFIG_CRYPTO_ARC4=y
CONFIG_CRYPTO_CHACHA20=y
CONFIG_CRYPTO_CBC=y
CONFIG_CRYPTO_CTR=y
CONFIG_CRYPTO_CTS=y
CONFIG_CRYPTO_ECB=y
# CONFIG_CRYPTO_HCTR2 is not set
CONFIG_CRYPTO_LRW=y
CONFIG_CRYPTO_PCBC=y
CONFIG_CRYPTO_XTS=y
CONFIG_CRYPTO_NHPOLY1305=y
# end of Length-preserving ciphers and modes
#
# AEAD (authenticated encryption with associated data) ciphers
#
# CONFIG_CRYPTO_AEGIS128 is not set
CONFIG_CRYPTO_CHACHA20POLY1305=y
CONFIG_CRYPTO_CCM=y
CONFIG_CRYPTO_GCM=y
CONFIG_CRYPTO_GENIV=y
CONFIG_CRYPTO_SEQIV=y
CONFIG_CRYPTO_ECHAINIV=y
CONFIG_CRYPTO_ESSIV=y
# end of AEAD (authenticated encryption with associated data) ciphers
#
# Hashes, digests, and MACs
#
CONFIG_CRYPTO_BLAKE2B=y
CONFIG_CRYPTO_CMAC=y
CONFIG_CRYPTO_GHASH=y
CONFIG_CRYPTO_HMAC=y
CONFIG_CRYPTO_MD4=y
CONFIG_CRYPTO_MD5=y
CONFIG_CRYPTO_MICHAEL_MIC=y
CONFIG_CRYPTO_POLY1305=y
CONFIG_CRYPTO_RMD160=y
CONFIG_CRYPTO_SHA1=y
CONFIG_CRYPTO_SHA256=y
CONFIG_CRYPTO_SHA512=y
CONFIG_CRYPTO_SHA3=y
CONFIG_CRYPTO_SM3=y
CONFIG_CRYPTO_SM3_GENERIC=y
# CONFIG_CRYPTO_STREEBOG is not set
CONFIG_CRYPTO_WP512=y
CONFIG_CRYPTO_XCBC=y
CONFIG_CRYPTO_XXHASH=y
# end of Hashes, digests, and MACs
#
# CRCs (cyclic redundancy checks)
#
CONFIG_CRYPTO_CRC32C=y
CONFIG_CRYPTO_CRC32=y
# end of CRCs (cyclic redundancy checks)
#
# Compression
#
CONFIG_CRYPTO_DEFLATE=y
CONFIG_CRYPTO_LZO=y
# CONFIG_CRYPTO_842 is not set
# CONFIG_CRYPTO_LZ4 is not set
# CONFIG_CRYPTO_LZ4HC is not set
CONFIG_CRYPTO_ZSTD=y
# end of Compression
#
# Random number generation
#
CONFIG_CRYPTO_ANSI_CPRNG=y
CONFIG_CRYPTO_DRBG_MENU=y
CONFIG_CRYPTO_DRBG_HMAC=y
CONFIG_CRYPTO_DRBG_HASH=y
CONFIG_CRYPTO_DRBG_CTR=y
CONFIG_CRYPTO_DRBG=y
CONFIG_CRYPTO_JITTERENTROPY=y
CONFIG_CRYPTO_JITTERENTROPY_MEMORY_BLOCKS=64
CONFIG_CRYPTO_JITTERENTROPY_MEMORY_BLOCKSIZE=32
CONFIG_CRYPTO_JITTERENTROPY_OSR=1
# end of Random number generation
#
# Userspace interface
#
CONFIG_CRYPTO_USER_API=y
CONFIG_CRYPTO_USER_API_HASH=y
CONFIG_CRYPTO_USER_API_SKCIPHER=y
CONFIG_CRYPTO_USER_API_RNG=y
# CONFIG_CRYPTO_USER_API_RNG_CAVP is not set
CONFIG_CRYPTO_USER_API_AEAD=y
CONFIG_CRYPTO_USER_API_ENABLE_OBSOLETE=y
# end of Userspace interface
CONFIG_CRYPTO_HASH_INFO=y
#
# Accelerated Cryptographic Algorithms for CPU (x86)
#
CONFIG_CRYPTO_AES_NI_INTEL=y
CONFIG_CRYPTO_BLOWFISH_X86_64=y
CONFIG_CRYPTO_CAMELLIA_X86_64=y
CONFIG_CRYPTO_CAMELLIA_AESNI_AVX_X86_64=y
CONFIG_CRYPTO_CAMELLIA_AESNI_AVX2_X86_64=y
CONFIG_CRYPTO_CAST5_AVX_X86_64=y
CONFIG_CRYPTO_CAST6_AVX_X86_64=y
CONFIG_CRYPTO_DES3_EDE_X86_64=y
CONFIG_CRYPTO_SERPENT_SSE2_X86_64=y
CONFIG_CRYPTO_SERPENT_AVX_X86_64=y
CONFIG_CRYPTO_SERPENT_AVX2_X86_64=y
CONFIG_CRYPTO_SM4_AESNI_AVX_X86_64=y
CONFIG_CRYPTO_SM4_AESNI_AVX2_X86_64=y
CONFIG_CRYPTO_TWOFISH_X86_64=y
CONFIG_CRYPTO_TWOFISH_X86_64_3WAY=y
CONFIG_CRYPTO_TWOFISH_AVX_X86_64=y
# CONFIG_CRYPTO_ARIA_AESNI_AVX_X86_64 is not set
# CONFIG_CRYPTO_ARIA_AESNI_AVX2_X86_64 is not set
# CONFIG_CRYPTO_ARIA_GFNI_AVX512_X86_64 is not set
CONFIG_CRYPTO_CHACHA20_X86_64=y
# CONFIG_CRYPTO_AEGIS128_AESNI_SSE2 is not set
CONFIG_CRYPTO_NHPOLY1305_SSE2=y
CONFIG_CRYPTO_NHPOLY1305_AVX2=y
# CONFIG_CRYPTO_BLAKE2S_X86 is not set
# CONFIG_CRYPTO_POLYVAL_CLMUL_NI is not set
CONFIG_CRYPTO_POLY1305_X86_64=y
CONFIG_CRYPTO_SHA1_SSSE3=y
CONFIG_CRYPTO_SHA256_SSSE3=y
CONFIG_CRYPTO_SHA512_SSSE3=y
CONFIG_CRYPTO_SM3_AVX_X86_64=y
CONFIG_CRYPTO_GHASH_CLMUL_NI_INTEL=y
# end of Accelerated Cryptographic Algorithms for CPU (x86)
CONFIG_CRYPTO_HW=y
CONFIG_CRYPTO_DEV_PADLOCK=y
CONFIG_CRYPTO_DEV_PADLOCK_AES=y
CONFIG_CRYPTO_DEV_PADLOCK_SHA=y
# CONFIG_CRYPTO_DEV_ATMEL_ECC is not set
# CONFIG_CRYPTO_DEV_ATMEL_SHA204A is not set
CONFIG_CRYPTO_DEV_CCP=y
CONFIG_CRYPTO_DEV_CCP_DD=y
CONFIG_CRYPTO_DEV_SP_CCP=y
CONFIG_CRYPTO_DEV_CCP_CRYPTO=y
CONFIG_CRYPTO_DEV_SP_PSP=y
# CONFIG_CRYPTO_DEV_CCP_DEBUGFS is not set
CONFIG_CRYPTO_DEV_NITROX=y
CONFIG_CRYPTO_DEV_NITROX_CNN55XX=y
CONFIG_CRYPTO_DEV_QAT=y
CONFIG_CRYPTO_DEV_QAT_DH895xCC=y
CONFIG_CRYPTO_DEV_QAT_C3XXX=y
CONFIG_CRYPTO_DEV_QAT_C62X=y
CONFIG_CRYPTO_DEV_QAT_4XXX=y
# CONFIG_CRYPTO_DEV_QAT_420XX is not set
CONFIG_CRYPTO_DEV_QAT_DH895xCCVF=y
CONFIG_CRYPTO_DEV_QAT_C3XXXVF=y
CONFIG_CRYPTO_DEV_QAT_C62XVF=y
# CONFIG_CRYPTO_DEV_QAT_ERROR_INJECTION is not set
CONFIG_CRYPTO_DEV_IAA_CRYPTO=m
CONFIG_CRYPTO_DEV_IAA_CRYPTO_STATS=y
CONFIG_CRYPTO_DEV_CHELSIO=y
# CONFIG_CRYPTO_DEV_VIRTIO is not set
# CONFIG_CRYPTO_DEV_SAFEXCEL is not set
# CONFIG_CRYPTO_DEV_AMLOGIC_GXL is not set
CONFIG_ASYMMETRIC_KEY_TYPE=y
CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y
CONFIG_X509_CERTIFICATE_PARSER=y
# CONFIG_PKCS8_PRIVATE_KEY_PARSER is not set
CONFIG_PKCS7_MESSAGE_PARSER=y
# CONFIG_PKCS7_TEST_KEY is not set
CONFIG_SIGNED_PE_FILE_VERIFICATION=y
# CONFIG_FIPS_SIGNATURE_SELFTEST is not set
#
# Certificates for signature checking
#
CONFIG_MODULE_SIG_KEY="certs/signing_key.pem"
CONFIG_MODULE_SIG_KEY_TYPE_RSA=y
CONFIG_SYSTEM_TRUSTED_KEYRING=y
CONFIG_SYSTEM_TRUSTED_KEYS=""
# CONFIG_SYSTEM_EXTRA_CERTIFICATE is not set
CONFIG_SECONDARY_TRUSTED_KEYRING=y
# CONFIG_SECONDARY_TRUSTED_KEYRING_SIGNED_BY_BUILTIN is not set
CONFIG_SYSTEM_BLACKLIST_KEYRING=y
CONFIG_SYSTEM_BLACKLIST_HASH_LIST=""
CONFIG_SYSTEM_REVOCATION_LIST=y
CONFIG_SYSTEM_REVOCATION_KEYS=""
# CONFIG_SYSTEM_BLACKLIST_AUTH_UPDATE is not set
# end of Certificates for signature checking
# CONFIG_CRYPTO_KRB5 is not set
CONFIG_BINARY_PRINTF=y
#
# Library routines
#
CONFIG_RAID6_PQ=y
CONFIG_RAID6_PQ_BENCHMARK=y
CONFIG_PACKING=y
CONFIG_BITREVERSE=y
CONFIG_GENERIC_STRNCPY_FROM_USER=y
CONFIG_GENERIC_STRNLEN_USER=y
CONFIG_GENERIC_NET_UTILS=y
CONFIG_CORDIC=y
# CONFIG_PRIME_NUMBERS is not set
CONFIG_RATIONAL=y
CONFIG_GENERIC_IOMAP=y
CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y
CONFIG_ARCH_HAS_FAST_MULTIPLIER=y
CONFIG_ARCH_USE_SYM_ANNOTATIONS=y
#
# Crypto library routines
#
CONFIG_CRYPTO_LIB_UTILS=y
CONFIG_CRYPTO_LIB_AES=y
CONFIG_CRYPTO_LIB_AESCFB=y
CONFIG_CRYPTO_LIB_AESGCM=y
CONFIG_CRYPTO_LIB_ARC4=y
CONFIG_CRYPTO_LIB_GF128MUL=y
CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
CONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA=y
CONFIG_CRYPTO_LIB_CHACHA_GENERIC=y
CONFIG_CRYPTO_LIB_CHACHA_INTERNAL=y
CONFIG_CRYPTO_LIB_DES=y
CONFIG_CRYPTO_LIB_POLY1305_RSIZE=11
CONFIG_CRYPTO_ARCH_HAVE_LIB_POLY1305=y
CONFIG_CRYPTO_LIB_POLY1305_GENERIC=y
CONFIG_CRYPTO_LIB_POLY1305_INTERNAL=y
CONFIG_CRYPTO_LIB_SHA1=y
CONFIG_CRYPTO_LIB_SHA256=y
# end of Crypto library routines
CONFIG_CRC_CCITT=y
CONFIG_CRC16=y
CONFIG_CRC_T10DIF=y
CONFIG_ARCH_HAS_CRC_T10DIF=y
CONFIG_CRC_T10DIF_ARCH=y
CONFIG_CRC_ITU_T=y
CONFIG_CRC32=y
CONFIG_ARCH_HAS_CRC32=y
CONFIG_CRC32_ARCH=y
CONFIG_CRC64=y
CONFIG_ARCH_HAS_CRC64=y
CONFIG_CRC64_ARCH=y
CONFIG_CRC8=y
CONFIG_CRC_OPTIMIZATIONS=y
CONFIG_XXHASH=y
# CONFIG_RANDOM32_SELFTEST is not set
CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=y
CONFIG_LZO_COMPRESS=y
CONFIG_LZO_DECOMPRESS=y
CONFIG_LZ4_DECOMPRESS=y
CONFIG_ZSTD_COMMON=y
CONFIG_ZSTD_COMPRESS=y
CONFIG_ZSTD_DECOMPRESS=y
CONFIG_XZ_DEC=y
CONFIG_XZ_DEC_X86=y
CONFIG_XZ_DEC_POWERPC=y
CONFIG_XZ_DEC_ARM=y
CONFIG_XZ_DEC_ARMTHUMB=y
CONFIG_XZ_DEC_ARM64=y
CONFIG_XZ_DEC_SPARC=y
CONFIG_XZ_DEC_RISCV=y
# CONFIG_XZ_DEC_MICROLZMA is not set
CONFIG_XZ_DEC_BCJ=y
# CONFIG_XZ_DEC_TEST is not set
CONFIG_DECOMPRESS_GZIP=y
CONFIG_DECOMPRESS_BZIP2=y
CONFIG_DECOMPRESS_LZMA=y
CONFIG_DECOMPRESS_XZ=y
CONFIG_DECOMPRESS_LZO=y
CONFIG_DECOMPRESS_LZ4=y
CONFIG_DECOMPRESS_ZSTD=y
CONFIG_GENERIC_ALLOCATOR=y
CONFIG_REED_SOLOMON=y
CONFIG_REED_SOLOMON_ENC8=y
CONFIG_REED_SOLOMON_DEC8=y
CONFIG_TEXTSEARCH=y
CONFIG_TEXTSEARCH_KMP=y
CONFIG_TEXTSEARCH_BM=y
CONFIG_TEXTSEARCH_FSM=y
CONFIG_BTREE=y
CONFIG_INTERVAL_TREE=y
CONFIG_INTERVAL_TREE_SPAN_ITER=y
CONFIG_XARRAY_MULTI=y
CONFIG_ASSOCIATIVE_ARRAY=y
CONFIG_CLOSURES=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_HAS_IOPORT_MAP=y
CONFIG_HAS_DMA=y
CONFIG_DMA_OPS_HELPERS=y
CONFIG_NEED_SG_DMA_FLAGS=y
CONFIG_NEED_SG_DMA_LENGTH=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_ARCH_DMA_ADDR_T_64BIT=y
CONFIG_ARCH_HAS_FORCE_DMA_UNENCRYPTED=y
CONFIG_SWIOTLB=y
# CONFIG_SWIOTLB_DYNAMIC is not set
CONFIG_DMA_NEED_SYNC=y
CONFIG_DMA_COHERENT_POOL=y
CONFIG_DMA_CMA=y
# CONFIG_DMA_NUMA_CMA is not set
#
# Default contiguous memory area size:
#
CONFIG_CMA_SIZE_MBYTES=0
CONFIG_CMA_SIZE_SEL_MBYTES=y
# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set
# CONFIG_CMA_SIZE_SEL_MIN is not set
# CONFIG_CMA_SIZE_SEL_MAX is not set
CONFIG_CMA_ALIGNMENT=8
# CONFIG_DMA_API_DEBUG is not set
# CONFIG_DMA_MAP_BENCHMARK is not set
CONFIG_SGL_ALLOC=y
CONFIG_CHECK_SIGNATURE=y
CONFIG_CPUMASK_OFFSTACK=y
CONFIG_CPU_RMAP=y
CONFIG_DQL=y
CONFIG_GLOB=y
# CONFIG_GLOB_SELFTEST is not set
CONFIG_NLATTR=y
CONFIG_CLZ_TAB=y
CONFIG_IRQ_POLL=y
CONFIG_MPILIB=y
CONFIG_SIGNATURE=y
CONFIG_DIMLIB=y
CONFIG_OID_REGISTRY=y
CONFIG_UCS2_STRING=y
CONFIG_HAVE_GENERIC_VDSO=y
CONFIG_GENERIC_GETTIMEOFDAY=y
CONFIG_GENERIC_VDSO_TIME_NS=y
CONFIG_GENERIC_VDSO_OVERFLOW_PROTECT=y
CONFIG_VDSO_GETRANDOM=y
CONFIG_GENERIC_VDSO_DATA_STORE=y
CONFIG_FONT_SUPPORT=y
# CONFIG_FONTS is not set
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
CONFIG_SG_POOL=y
CONFIG_ARCH_HAS_PMEM_API=y
CONFIG_MEMREGION=y
CONFIG_ARCH_HAS_CPU_CACHE_INVALIDATE_MEMREGION=y
CONFIG_ARCH_HAS_UACCESS_FLUSHCACHE=y
CONFIG_ARCH_HAS_COPY_MC=y
CONFIG_ARCH_STACKWALK=y
CONFIG_STACKDEPOT=y
CONFIG_STACKDEPOT_ALWAYS_INIT=y
CONFIG_STACKDEPOT_MAX_FRAMES=64
CONFIG_REF_TRACKER=y
CONFIG_SBITMAP=y
CONFIG_PARMAN=y
CONFIG_OBJAGG=y
# CONFIG_LWQ_TEST is not set
# end of Library routines
CONFIG_PLDMFW=y
CONFIG_ASN1_ENCODER=y
CONFIG_FIRMWARE_TABLE=y
CONFIG_UNION_FIND=y
CONFIG_MIN_HEAP=y
#
# Kernel hacking
#
#
# printk and dmesg options
#
CONFIG_PRINTK_TIME=y
CONFIG_PRINTK_CALLER=y
# CONFIG_STACKTRACE_BUILD_ID is not set
CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7
CONFIG_CONSOLE_LOGLEVEL_QUIET=4
CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4
CONFIG_BOOT_PRINTK_DELAY=y
CONFIG_DYNAMIC_DEBUG=y
CONFIG_DYNAMIC_DEBUG_CORE=y
CONFIG_SYMBOLIC_ERRNAME=y
CONFIG_DEBUG_BUGVERBOSE=y
# end of printk and dmesg options
CONFIG_DEBUG_KERNEL=y
CONFIG_DEBUG_MISC=y
#
# Compile-time checks and compiler options
#
CONFIG_DEBUG_INFO=y
CONFIG_AS_HAS_NON_CONST_ULEB128=y
# CONFIG_DEBUG_INFO_NONE is not set
# CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT is not set
CONFIG_DEBUG_INFO_DWARF4=y
# CONFIG_DEBUG_INFO_DWARF5 is not set
# CONFIG_DEBUG_INFO_REDUCED is not set
CONFIG_DEBUG_INFO_COMPRESSED_NONE=y
# CONFIG_DEBUG_INFO_COMPRESSED_ZLIB is not set
# CONFIG_DEBUG_INFO_SPLIT is not set
CONFIG_DEBUG_INFO_BTF=y
CONFIG_PAHOLE_HAS_SPLIT_BTF=y
CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
CONFIG_DEBUG_INFO_BTF_MODULES=y
# CONFIG_MODULE_ALLOW_BTF_MISMATCH is not set
# CONFIG_GDB_SCRIPTS is not set
CONFIG_FRAME_WARN=2048
CONFIG_STRIP_ASM_SYMS=y
# CONFIG_READABLE_ASM is not set
# CONFIG_HEADERS_INSTALL is not set
CONFIG_DEBUG_SECTION_MISMATCH=y
CONFIG_SECTION_MISMATCH_WARN_ONLY=y
CONFIG_OBJTOOL=y
# CONFIG_OBJTOOL_WERROR is not set
# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
# end of Compile-time checks and compiler options
#
# Generic Kernel Debugging Instruments
#
CONFIG_MAGIC_SYSRQ=y
CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1
CONFIG_MAGIC_SYSRQ_SERIAL=y
CONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE=""
CONFIG_DEBUG_FS=y
CONFIG_DEBUG_FS_ALLOW_ALL=y
# CONFIG_DEBUG_FS_DISALLOW_MOUNT is not set
# CONFIG_DEBUG_FS_ALLOW_NONE is not set
CONFIG_HAVE_ARCH_KGDB=y
CONFIG_KGDB=y
CONFIG_KGDB_HONOUR_BLOCKLIST=y
CONFIG_KGDB_SERIAL_CONSOLE=y
CONFIG_KGDB_TESTS=y
# CONFIG_KGDB_TESTS_ON_BOOT is not set
CONFIG_KGDB_LOW_LEVEL_TRAP=y
CONFIG_KGDB_KDB=y
CONFIG_KDB_DEFAULT_ENABLE=0x0
CONFIG_KDB_KEYBOARD=y
CONFIG_KDB_CONTINUE_CATASTROPHIC=0
CONFIG_ARCH_HAS_EARLY_DEBUG=y
CONFIG_ARCH_HAS_UBSAN=y
# CONFIG_UBSAN is not set
CONFIG_HAVE_ARCH_KCSAN=y
# end of Generic Kernel Debugging Instruments
#
# Networking Debugging
#
CONFIG_NET_DEV_REFCNT_TRACKER=y
CONFIG_NET_NS_REFCNT_TRACKER=y
# CONFIG_DEBUG_NET is not set
# CONFIG_DEBUG_NET_SMALL_RTNL is not set
# end of Networking Debugging
#
# Memory Debugging
#
# CONFIG_PAGE_EXTENSION is not set
# CONFIG_DEBUG_PAGEALLOC is not set
CONFIG_SLUB_DEBUG=y
# CONFIG_SLUB_DEBUG_ON is not set
CONFIG_SLUB_RCU_DEBUG=y
# CONFIG_PAGE_OWNER is not set
# CONFIG_PAGE_TABLE_CHECK is not set
# CONFIG_PAGE_POISONING is not set
# CONFIG_DEBUG_PAGE_REF is not set
# CONFIG_DEBUG_RODATA_TEST is not set
CONFIG_ARCH_HAS_DEBUG_WX=y
# CONFIG_DEBUG_WX is not set
CONFIG_ARCH_HAS_PTDUMP=y
# CONFIG_PTDUMP_DEBUGFS is not set
CONFIG_HAVE_DEBUG_KMEMLEAK=y
CONFIG_DEBUG_KMEMLEAK=y
CONFIG_DEBUG_KMEMLEAK_MEM_POOL_SIZE=16000
# CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF is not set
CONFIG_DEBUG_KMEMLEAK_AUTO_SCAN=y
# CONFIG_PER_VMA_LOCK_STATS is not set
# CONFIG_DEBUG_OBJECTS is not set
# CONFIG_SHRINKER_DEBUG is not set
# CONFIG_DEBUG_STACK_USAGE is not set
# CONFIG_SCHED_STACK_END_CHECK is not set
CONFIG_ARCH_HAS_DEBUG_VM_PGTABLE=y
# CONFIG_DEBUG_VFS is not set
# CONFIG_DEBUG_VM is not set
# CONFIG_DEBUG_VM_PGTABLE is not set
CONFIG_ARCH_HAS_DEBUG_VIRTUAL=y
# CONFIG_DEBUG_VIRTUAL is not set
CONFIG_DEBUG_MEMORY_INIT=y
# CONFIG_DEBUG_PER_CPU_MAPS is not set
# CONFIG_MEM_ALLOC_PROFILING is not set
CONFIG_HAVE_ARCH_KASAN=y
CONFIG_HAVE_ARCH_KASAN_VMALLOC=y
CONFIG_CC_HAS_KASAN_GENERIC=y
CONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=y
CONFIG_KASAN=y
CONFIG_KASAN_GENERIC=y
# CONFIG_KASAN_OUTLINE is not set
CONFIG_KASAN_INLINE=y
CONFIG_KASAN_STACK=y
# CONFIG_KASAN_VMALLOC is not set
# CONFIG_KASAN_EXTRA_INFO is not set
CONFIG_HAVE_ARCH_KFENCE=y
# CONFIG_KFENCE is not set
CONFIG_HAVE_ARCH_KMSAN=y
# end of Memory Debugging
CONFIG_DEBUG_SHIRQ=y
#
# Debug Oops, Lockups and Hangs
#
CONFIG_PANIC_ON_OOPS=y
CONFIG_PANIC_ON_OOPS_VALUE=1
CONFIG_PANIC_TIMEOUT=0
CONFIG_LOCKUP_DETECTOR=y
CONFIG_SOFTLOCKUP_DETECTOR=y
# CONFIG_SOFTLOCKUP_DETECTOR_INTR_STORM is not set
# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
CONFIG_HAVE_HARDLOCKUP_DETECTOR_BUDDY=y
CONFIG_HARDLOCKUP_DETECTOR=y
# CONFIG_HARDLOCKUP_DETECTOR_PREFER_BUDDY is not set
CONFIG_HARDLOCKUP_DETECTOR_PERF=y
# CONFIG_HARDLOCKUP_DETECTOR_BUDDY is not set
# CONFIG_HARDLOCKUP_DETECTOR_ARCH is not set
CONFIG_HARDLOCKUP_DETECTOR_COUNTS_HRTIMER=y
CONFIG_HARDLOCKUP_CHECK_TIMESTAMP=y
CONFIG_BOOTPARAM_HARDLOCKUP_PANIC=y
CONFIG_DETECT_HUNG_TASK=y
CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=120
# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
CONFIG_DETECT_HUNG_TASK_BLOCKER=y
# CONFIG_WQ_WATCHDOG is not set
# CONFIG_WQ_CPU_INTENSIVE_REPORT is not set
# CONFIG_TEST_LOCKUP is not set
# end of Debug Oops, Lockups and Hangs
#
# Scheduler Debugging
#
CONFIG_SCHED_INFO=y
CONFIG_SCHEDSTATS=y
# end of Scheduler Debugging
# CONFIG_DEBUG_PREEMPT is not set
#
# Lock Debugging (spinlocks, mutexes, etc...)
#
CONFIG_LOCK_DEBUGGING_SUPPORT=y
# CONFIG_PROVE_LOCKING is not set
# CONFIG_LOCK_STAT is not set
# CONFIG_DEBUG_RT_MUTEXES is not set
# CONFIG_DEBUG_SPINLOCK is not set
# CONFIG_DEBUG_MUTEXES is not set
# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set
# CONFIG_DEBUG_RWSEMS is not set
# CONFIG_DEBUG_LOCK_ALLOC is not set
# CONFIG_DEBUG_ATOMIC_SLEEP is not set
# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
# CONFIG_LOCK_TORTURE_TEST is not set
# CONFIG_WW_MUTEX_SELFTEST is not set
# CONFIG_SCF_TORTURE_TEST is not set
# CONFIG_CSD_LOCK_WAIT_DEBUG is not set
# end of Lock Debugging (spinlocks, mutexes, etc...)
# CONFIG_NMI_CHECK_CPU is not set
# CONFIG_DEBUG_IRQFLAGS is not set
CONFIG_STACKTRACE=y
# CONFIG_WARN_ALL_UNSEEDED_RANDOM is not set
# CONFIG_DEBUG_KOBJECT is not set
#
# Debug kernel data structures
#
CONFIG_DEBUG_LIST=y
# CONFIG_DEBUG_PLIST is not set
# CONFIG_DEBUG_SG is not set
# CONFIG_DEBUG_NOTIFIERS is not set
# CONFIG_DEBUG_CLOSURES is not set
# CONFIG_DEBUG_MAPLE_TREE is not set
# end of Debug kernel data structures
#
# RCU Debugging
#
# CONFIG_RCU_SCALE_TEST is not set
# CONFIG_RCU_TORTURE_TEST is not set
# CONFIG_RCU_REF_SCALE_TEST is not set
CONFIG_RCU_CPU_STALL_TIMEOUT=60
CONFIG_RCU_EXP_CPU_STALL_TIMEOUT=0
# CONFIG_RCU_CPU_STALL_CPUTIME is not set
# CONFIG_RCU_TRACE is not set
# CONFIG_RCU_EQS_DEBUG is not set
# end of RCU Debugging
# CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set
# CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set
# CONFIG_LATENCYTOP is not set
# CONFIG_DEBUG_CGROUP_REF is not set
CONFIG_USER_STACKTRACE_SUPPORT=y
CONFIG_NOP_TRACER=y
CONFIG_HAVE_RETHOOK=y
CONFIG_RETHOOK=y
CONFIG_HAVE_FUNCTION_TRACER=y
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
CONFIG_HAVE_FUNCTION_GRAPH_FREGS=y
CONFIG_HAVE_FTRACE_GRAPH_FUNC=y
CONFIG_HAVE_DYNAMIC_FTRACE=y
CONFIG_HAVE_DYNAMIC_FTRACE_WITH_REGS=y
CONFIG_HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS=y
CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS=y
CONFIG_HAVE_FTRACE_REGS_HAVING_PT_REGS=y
CONFIG_HAVE_DYNAMIC_FTRACE_NO_PATCHABLE=y
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
CONFIG_HAVE_FENTRY=y
CONFIG_HAVE_OBJTOOL_MCOUNT=y
CONFIG_HAVE_OBJTOOL_NOP_MCOUNT=y
CONFIG_HAVE_C_RECORDMCOUNT=y
CONFIG_HAVE_BUILDTIME_MCOUNT_SORT=y
CONFIG_BUILDTIME_MCOUNT_SORT=y
CONFIG_TRACER_MAX_TRACE=y
CONFIG_TRACE_CLOCK=y
CONFIG_RING_BUFFER=y
CONFIG_EVENT_TRACING=y
CONFIG_CONTEXT_SWITCH_TRACER=y
CONFIG_TRACING=y
CONFIG_GENERIC_TRACER=y
CONFIG_TRACING_SUPPORT=y
CONFIG_FTRACE=y
CONFIG_BOOTTIME_TRACING=y
CONFIG_FUNCTION_TRACER=y
CONFIG_FUNCTION_GRAPH_TRACER=y
# CONFIG_FUNCTION_GRAPH_RETVAL is not set
# CONFIG_FUNCTION_GRAPH_RETADDR is not set
CONFIG_FUNCTION_TRACE_ARGS=y
CONFIG_DYNAMIC_FTRACE=y
CONFIG_DYNAMIC_FTRACE_WITH_REGS=y
CONFIG_DYNAMIC_FTRACE_WITH_DIRECT_CALLS=y
CONFIG_DYNAMIC_FTRACE_WITH_ARGS=y
# CONFIG_FPROBE is not set
CONFIG_FUNCTION_PROFILER=y
CONFIG_STACK_TRACER=y
# CONFIG_IRQSOFF_TRACER is not set
# CONFIG_PREEMPT_TRACER is not set
CONFIG_SCHED_TRACER=y
CONFIG_HWLAT_TRACER=y
CONFIG_OSNOISE_TRACER=y
CONFIG_TIMERLAT_TRACER=y
# CONFIG_MMIOTRACE is not set
CONFIG_FTRACE_SYSCALLS=y
CONFIG_TRACER_SNAPSHOT=y
# CONFIG_TRACER_SNAPSHOT_PER_CPU_SWAP is not set
CONFIG_BRANCH_PROFILE_NONE=y
# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
CONFIG_BLK_DEV_IO_TRACE=y
CONFIG_PROBE_EVENTS_BTF_ARGS=y
CONFIG_KPROBE_EVENTS=y
# CONFIG_KPROBE_EVENTS_ON_NOTRACE is not set
CONFIG_UPROBE_EVENTS=y
CONFIG_BPF_EVENTS=y
CONFIG_DYNAMIC_EVENTS=y
CONFIG_PROBE_EVENTS=y
# CONFIG_BPF_KPROBE_OVERRIDE is not set
CONFIG_FTRACE_MCOUNT_RECORD=y
CONFIG_FTRACE_MCOUNT_USE_CC=y
CONFIG_TRACING_MAP=y
CONFIG_SYNTH_EVENTS=y
# CONFIG_USER_EVENTS is not set
CONFIG_HIST_TRIGGERS=y
# CONFIG_TRACE_EVENT_INJECT is not set
# CONFIG_TRACEPOINT_BENCHMARK is not set
# CONFIG_RING_BUFFER_BENCHMARK is not set
# CONFIG_TRACE_EVAL_MAP_FILE is not set
# CONFIG_FTRACE_RECORD_RECURSION is not set
# CONFIG_FTRACE_VALIDATE_RCU_IS_WATCHING is not set
# CONFIG_FTRACE_STARTUP_TEST is not set
# CONFIG_FTRACE_SORT_STARTUP_TEST is not set
# CONFIG_RING_BUFFER_STARTUP_TEST is not set
# CONFIG_RING_BUFFER_VALIDATE_TIME_DELTAS is not set
# CONFIG_PREEMPTIRQ_DELAY_TEST is not set
# CONFIG_SYNTH_EVENT_GEN_TEST is not set
# CONFIG_KPROBE_EVENT_GEN_TEST is not set
# CONFIG_HIST_TRIGGERS_DEBUG is not set
# CONFIG_RV is not set
CONFIG_PROVIDE_OHCI1394_DMA_INIT=y
# CONFIG_SAMPLES is not set
CONFIG_HAVE_SAMPLE_FTRACE_DIRECT=y
CONFIG_HAVE_SAMPLE_FTRACE_DIRECT_MULTI=y
CONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y
CONFIG_STRICT_DEVMEM=y
# CONFIG_IO_STRICT_DEVMEM is not set
#
# x86 Debugging
#
CONFIG_EARLY_PRINTK_USB=y
# CONFIG_X86_VERBOSE_BOOTUP is not set
CONFIG_EARLY_PRINTK=y
CONFIG_EARLY_PRINTK_DBGP=y
CONFIG_EARLY_PRINTK_USB_XDBC=y
# CONFIG_EFI_PGT_DUMP is not set
# CONFIG_DEBUG_TLBFLUSH is not set
CONFIG_HAVE_MMIOTRACE_SUPPORT=y
CONFIG_X86_DECODER_SELFTEST=y
CONFIG_IO_DELAY_0X80=y
# CONFIG_IO_DELAY_0XED is not set
# CONFIG_IO_DELAY_UDELAY is not set
# CONFIG_IO_DELAY_NONE is not set
CONFIG_DEBUG_BOOT_PARAMS=y
# CONFIG_CPA_DEBUG is not set
# CONFIG_DEBUG_ENTRY is not set
# CONFIG_DEBUG_NMI_SELFTEST is not set
# CONFIG_X86_DEBUG_FPU is not set
# CONFIG_PUNIT_ATOM_DEBUG is not set
CONFIG_UNWINDER_ORC=y
# CONFIG_UNWINDER_FRAME_POINTER is not set
# end of x86 Debugging
#
# Kernel Testing and Coverage
#
# CONFIG_KUNIT is not set
# CONFIG_NOTIFIER_ERROR_INJECTION is not set
CONFIG_FUNCTION_ERROR_INJECTION=y
CONFIG_FAULT_INJECTION=y
CONFIG_FAILSLAB=y
CONFIG_FAIL_PAGE_ALLOC=y
CONFIG_FAULT_INJECTION_USERCOPY=y
CONFIG_FAIL_MAKE_REQUEST=y
CONFIG_FAIL_IO_TIMEOUT=y
CONFIG_FAIL_FUTEX=y
CONFIG_FAULT_INJECTION_DEBUG_FS=y
CONFIG_FAIL_FUNCTION=y
CONFIG_FAIL_MMC_REQUEST=y
# CONFIG_FAIL_SKB_REALLOC is not set
CONFIG_FAULT_INJECTION_CONFIGFS=y
# CONFIG_FAULT_INJECTION_STACKTRACE_FILTER is not set
CONFIG_ARCH_HAS_KCOV=y
CONFIG_CC_HAS_SANCOV_TRACE_PC=y
CONFIG_KCOV=y
CONFIG_KCOV_ENABLE_COMPARISONS=y
CONFIG_KCOV_INSTRUMENT_ALL=y
CONFIG_KCOV_IRQ_AREA_SIZE=0x40000
# CONFIG_KCOV_SELFTEST is not set
# CONFIG_RUNTIME_TESTING_MENU is not set
CONFIG_ARCH_USE_MEMTEST=y
# CONFIG_MEMTEST is not set
# CONFIG_HYPERV_TESTING is not set
# end of Kernel Testing and Coverage
#
# Rust hacking
#
# end of Rust hacking
# end of Kernel hacking
CONFIG_IO_URING_ZCRX=y
Return-Path: <linux-kernel+bounces-673191-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id EF78041E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:27:15 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 43FAF189433F
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:27:29 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id A12D028ECE2;
Wed, 4 Jun 2025 12:27:08 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="rxOfor8O";
dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="erBq3IwW";
dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="rxOfor8O";
dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="erBq3IwW"
Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D90F79F2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:27:06 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749040027; cv=none; b=Kl2NonVSPbxpYSysB6tKwIz/DJbbq6Hw6qJYSVixFnvMkwJcWTf1mLimEMWwWA1MdFu+kworkvS1j3x/44uJk6QdTP20fuP6SDG2y5BzXFv2RGBXZG0aVSxQ4XOlzZgaRBjZiZaWIoWRoLcYJhtwlsCs9Q06PnHizhVbpdTNMM4=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749040027; c=relaxed/simple;
bh=oLP1nPL6gqLNtqwAV0glykOIgDFPZ4ZCJKTPFaQz4nE=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=a9o2jZ5zz+diIEDfi6C6EYV3Kv/u2xKB0qyrnCBUp4AcXEusYmus6fpSqoS1yF8qfe2bUQSXqOkUkcAAWtKqLKcO21V7XYEue2EM4Q7I3g4LdhYkb9cYRt/mSk/CFQDjMFbw4l48lkbKjt6q8avD+RNvbZkTOY0NgaK1a6HGjPI=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=rxOfor8O; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=erBq3IwW; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=rxOfor8O; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=erBq3IwW; arc=none smtp.client-ip=195.135.223.130
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de
Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(No client certificate requested)
by smtp-out1.suse.de (Postfix) with ESMTPS id 718CC21F19;
Wed, 4 Jun 2025 12:27:04 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa;
t=1749040024; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version:content-type:content-type:
in-reply-to:in-reply-to:references:references;
bh=oX0kM1so1dy8pP/ofGOK/RfWJhxo67WnVOlO1z5oEhM=;
b=rxOfor8OgUrR/1UVw8dr5VVU+FzfPqBRAWxVCmbDEsIJM1zXswPslV66kNoIC3ssmLMxvT
C0S3ZQ6LgBQQq0P1Q5C86zXAR7CnMlEHaIcqYcENiqH3XToL9tHQUqEcLxSreHOtP3Pj2Z
7+u9Q7UZWAPlsZawSTC0W5/HShylQ5E=
DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de;
s=susede2_ed25519; t=1749040024;
h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version:content-type:content-type:
in-reply-to:in-reply-to:references:references;
bh=oX0kM1so1dy8pP/ofGOK/RfWJhxo67WnVOlO1z5oEhM=;
b=erBq3IwW3E0mI9V5yVPXBKmKuNfsiiBav06xnm8dhJ5XG7NNDAIO4bJ+yOWGT6i9itUrvs
/nWBBe+8FMAgyjAQ==
Authentication-Results: smtp-out1.suse.de;
none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa;
t=1749040024; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version:content-type:content-type:
in-reply-to:in-reply-to:references:references;
bh=oX0kM1so1dy8pP/ofGOK/RfWJhxo67WnVOlO1z5oEhM=;
b=rxOfor8OgUrR/1UVw8dr5VVU+FzfPqBRAWxVCmbDEsIJM1zXswPslV66kNoIC3ssmLMxvT
C0S3ZQ6LgBQQq0P1Q5C86zXAR7CnMlEHaIcqYcENiqH3XToL9tHQUqEcLxSreHOtP3Pj2Z
7+u9Q7UZWAPlsZawSTC0W5/HShylQ5E=
DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de;
s=susede2_ed25519; t=1749040024;
h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version:content-type:content-type:
in-reply-to:in-reply-to:references:references;
bh=oX0kM1so1dy8pP/ofGOK/RfWJhxo67WnVOlO1z5oEhM=;
b=erBq3IwW3E0mI9V5yVPXBKmKuNfsiiBav06xnm8dhJ5XG7NNDAIO4bJ+yOWGT6i9itUrvs
/nWBBe+8FMAgyjAQ==
Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(No client certificate requested)
by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 13BD913A63;
Wed, 4 Jun 2025 12:27:03 +0000 (UTC)
Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167])
by imap1.dmz-prg2.suse.org with ESMTPSA
id QI72AZc7QGgvTgAAD6G6ig
(envelope-from <osalvador@xxxxxxx>); Wed, 04 Jun 2025 12:27:03 +0000
Date: Wed, 4 Jun 2025 14:26:57 +0200
From: Oscar Salvador <osalvador@xxxxxxx>
To: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>
Cc: Mike Rapoport <rppt@xxxxxxxxxx>, David Hildenbrand <david@xxxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
Barry Song <baohua@xxxxxxxxxx>,
"Liam R . Howlett" <Liam.Howlett@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>,
Suren Baghdasaryan <surenb@xxxxxxxxxx>,
Michal Hocko <mhocko@xxxxxxxx>, Muchun Song <muchun.song@xxxxxxxxx>,
Huacai Chen <chenhuacai@xxxxxxxxxx>,
WANG Xuerui <kernel@xxxxxxxxxx>, Jonas Bonn <jonas@xxxxxxxxxxxx>,
Stefan Kristiansson <stefan.kristiansson@xxxxxxxxxxxxx>,
Stafford Horne <shorne@xxxxxxxxx>,
Paul Walmsley <paul.walmsley@xxxxxxxxxx>,
Palmer Dabbelt <palmer@xxxxxxxxxxx>,
Albert Ou <aou@xxxxxxxxxxxxxxxxx>, Alexandre Ghiti <alex@xxxxxxxx>,
Jann Horn <jannh@xxxxxxxxxx>, loongarch@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-openrisc@xxxxxxxxxxxxxxx,
linux-riscv@xxxxxxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx
Subject: Re: [PATCH RESEND] mm/pagewalk: split walk_page_range_novma() into
kernel/user parts
Message-ID: <aEA7kW-D35lDzN2K@localhost.localdomain>
References: <20250603192213.182931-1-lorenzo.stoakes@xxxxxxxxxx>
<51ec4269-b132-4163-9cb5-766042a3769d@xxxxxxxxxx>
<aD_-qdg2OvKQIyRg@xxxxxxxxxx>
<d0df9d25-f6c7-46ce-9808-cc92855d6e9d@lucifer.local>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <d0df9d25-f6c7-46ce-9808-cc92855d6e9d@lucifer.local>
X-Spamd-Result: default: False [-4.30 / 50.00];
BAYES_HAM(-3.00)[99.99%];
NEURAL_HAM_LONG(-1.00)[-0.999];
NEURAL_HAM_SHORT(-0.20)[-0.999];
MIME_GOOD(-0.10)[text/plain];
RCVD_TLS_ALL(0.00)[];
RCVD_VIA_SMTP_AUTH(0.00)[];
MIME_TRACE(0.00)[0:+];
ARC_NA(0.00)[];
RCPT_COUNT_TWELVE(0.00)[25];
MISSING_XM_UA(0.00)[];
FREEMAIL_ENVRCPT(0.00)[gmail.com];
DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519];
FROM_HAS_DN(0.00)[];
FREEMAIL_CC(0.00)[kernel.org,redhat.com,linux-foundation.org,oracle.com,suse.cz,google.com,suse.com,linux.dev,xen0n.name,southpole.se,saunalahti.fi,gmail.com,sifive.com,dabbelt.com,eecs.berkeley.edu,ghiti.fr,lists.linux.dev,vger.kernel.org,lists.infradead.org,kvack.org];
TO_DN_SOME(0.00)[];
FROM_EQ_ENVFROM(0.00)[];
TO_MATCH_ENVRCPT_ALL(0.00)[];
RCVD_COUNT_TWO(0.00)[2];
FUZZY_BLOCKED(0.00)[rspamd.com];
DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo]
X-Spam-Level:
X-Spam-Score: -4.30
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 10:09:05AM +0100, Lorenzo Stoakes wrote:
Nice idea to move to mm/internal.h also :) I like this...
Will fixup on respin
Dumb question but IIUC, walk_page_range_novma() will only be used by
ptdump from now on, so why not stick it into mm/ptdump.c, which is where
the only user of it lives?
--
Oscar Salvador
SUSE Labs
Return-Path: <linux-kernel+bounces-673192-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 9FFFF41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:29:04 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 3AE48188FF1A
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:29:11 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 47A4528ECD9;
Wed, 4 Jun 2025 12:28:50 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="VwplEXUK"
Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id A5E4928E575
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:28:47 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749040129; cv=none; b=s3ScSyrfmaVo6ZLvnyX8XuvrMV9W7z3kKED4QUW6zBzn88tIrWjYu1uQ9Wn+Safj/l69fsEUyXrlH84eH0v1pRDoMCTmzQmCsRgAhtZLCdioLYCXotGQCHi8x5S/lQu8jQCnddFvz11bbiJo5H0i5LD4sET7pnZ4Jg/HcNmm4fU=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749040129; c=relaxed/simple;
bh=zjDDB5TW++8UXKoaEJDw0k+J96PErHvkj6jidnGYHio=;
h=Message-ID:Date:MIME-Version:From:Subject:To:References:
In-Reply-To:Content-Type; b=KQzlVs9JcixOMc3qsXTlFEWPQzNXXOgweA1sUXJVRx+hMa6fMA8W/ouP8NVEYmAztW+XyHhEWBFSuaiu/uop7P8XLp/rCInWAaNeNEi4YZqI4agpKXiGmSJsZ5XnKgIRV9UEmUoDdCh00FhasUwqeRaTHzRkU75cl7LD403OUa8=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=VwplEXUK; arc=none smtp.client-ip=209.85.128.47
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org
Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-450ccda1a6eso61820205e9.2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 05:28:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=linaro.org; s=google; t=1749040126; x=1749644926; darn=vger.kernel.org;
h=content-transfer-encoding:in-reply-to:organization:autocrypt
:content-language:references:to:subject:reply-to:from:user-agent
:mime-version:date:message-id:from:to:cc:subject:date:message-id
:reply-to;
bh=tHUZpm8njqGD1R+5qQCk1RIh5pT7PqWdA9OuJlsd1W4=;
b=VwplEXUKBuBGFeDBkGKyvm68SxCEiF48KfW9BkaapvOvrdSfkjUWq5RBxgFhPVqpd3
9KR35/GaFPtg1G+zP25n8iI6SxyBC8B/FBaXrOo+PdsW6aLeIRIE1ZWx18c6xTygLRHk
cOzaGOexEnoiUWawgpbcknVhxvWxDZypNP6RrCP7P3srTbiZw809jYr8MLDbzGSzBPbB
DjTusJUime8euKnuOKwBBjdjjwOmd7Hz9gq3pX1m4NGKJKSaQtSNgFSXs8ztivm7xxC7
v8Ak9e3DGwVSsA9wpissAw59FNV/MDUW4rUkXep2HzHaJ1E0LkMwyo0J831Gl5thHVJz
WeTA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749040126; x=1749644926;
h=content-transfer-encoding:in-reply-to:organization:autocrypt
:content-language:references:to:subject:reply-to:from:user-agent
:mime-version:date:message-id:x-gm-message-state:from:to:cc:subject
:date:message-id:reply-to;
bh=tHUZpm8njqGD1R+5qQCk1RIh5pT7PqWdA9OuJlsd1W4=;
b=ZR2c+tewpNJk3av+lDxQFY3LItokgYaopmZlOY8COpSGig6+EFRFFZJpTJlQCnjFUE
aMHGbPadNWQ8INQXAabFc/hMOSC4hLXxv8w7IRdZWft7oWAzTixWVWwHgr51RsLDJC/G
RpVl1YzwY6ah7ShzekJ5sVwOu7ST5OppzqIT3tIHBf1ptCxtaFDE77c3DY3LTCF2ABRb
NB1Fvc13thdne4te5lgvlXy9EWQuWXhrT4PGkkMW+JggOMNcTSe+8LN59l9n4R69z+In
wV1x6LxR+/oKvbxrf6btZ07LKDg66bTLBNXWf9tiijc1n6F/g4IqNT7pYpyJrdkOjKSD
930w==
X-Forwarded-Encrypted: i=1; AJvYcCUi2hB68odjIus7RVZdbpHYINYqFuEW33wdYXRDb1f80anaShJixHAn3nLa0QZrfrFCTXIo7NowHgNM+m8=@vger.kernel.org
X-Gm-Message-State: AOJu0YwHro+x7TxQnUdN5wuvqzZg6nknlQQ3Ud9ZZsTnFEYNIVPvaQ+X
A7k++9/h3gACBrIuDimESyxGKnIR91gi1FJx5twLmIFfI0+rfPbTI8xxbOiSDtYcaA4Zz9YncL8
AHyd2
X-Gm-Gg: ASbGncusK9bvU1/5CGvusgxQoMn+IUa1SoEtkTmpWSsSPsoondSj5q7AI+EJi1CwEIc
Vj1UrIMgBqo4XFcG5FhCnVwFNF7yhpMpfLSOEAuepUfVnwbGVkh86oOrBHtxAWaC/yz3xf+goyU
9J3toKH+9fBVeqbJkPzemx5iwxECODJ7XQWZ/vKn8aXuoav46uPUueH7H5DfqdocU5Sq950yvKB
/rVXdmcsaAJkIyaTqn607Nh6vGVhxNT9RLnpQmj3zDLgitYow/SR7S/OEavO6t/5IQFXECclYQF
WACCAmDMlSqfmr2XWSauuHMnfVE7egrRi+rBQG6SRnqJ1dXaE4nfR5rjbsW/23eeE9wMeR9iZtD
Vqntm7ADCDN0t6IWK+vBpHtqDUkSItW2f2zta
X-Google-Smtp-Source: AGHT+IGDdLAfgUp5HWmKCRd1uJdegDgfmDSuEKDECzU4lLA24gzbXSvP/6fE/XhTFHX4AkEn5oZjvw==
X-Received: by 2002:a05:600c:8b25:b0:442:ffb1:b58 with SMTP id 5b1f17b1804b1-451f0a77006mr27764845e9.12.1749040125854;
Wed, 04 Jun 2025 05:28:45 -0700 (PDT)
Received: from ?IPV6:2a01:e0a:3d9:2080:fef9:cf1c:18f:2ab8? ([2a01:e0a:3d9:2080:fef9:cf1c:18f:2ab8])
by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a4efe5b8a8sm21295168f8f.5.2025.06.04.05.28.45
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 05:28:45 -0700 (PDT)
Message-ID: <315f5ec8-a022-4da0-80d4-8ddbea0778ae@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 14:28:44 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
From: Neil Armstrong <neil.armstrong@xxxxxxxxxx>
Reply-To: Neil Armstrong <neil.armstrong@xxxxxxxxxx>
Subject: Re: [PATCH] MAINTAINERS: Update my email address for DRM Panel
reviews
To: Jessica Zhang <jessica.zhang@xxxxxxxxxxxxxxxx>,
linux-kernel@xxxxxxxxxxxxxxx
References: <20250603-panel-maintainer-update-v1-1-224aaa222d99@xxxxxxxxxxxxxxxx>
Content-Language: en-US, fr
Autocrypt: addr=neil.armstrong@xxxxxxxxxx; keydata=
xsBNBE1ZBs8BCAD78xVLsXPwV/2qQx2FaO/7mhWL0Qodw8UcQJnkrWmgTFRobtTWxuRx8WWP
GTjuhvbleoQ5Cxjr+v+1ARGCH46MxFP5DwauzPekwJUD5QKZlaw/bURTLmS2id5wWi3lqVH4
BVF2WzvGyyeV1o4RTCYDnZ9VLLylJ9bneEaIs/7cjCEbipGGFlfIML3sfqnIvMAxIMZrvcl9
qPV2k+KQ7q+aXavU5W+yLNn7QtXUB530Zlk/d2ETgzQ5FLYYnUDAaRl+8JUTjc0CNOTpCeik
80TZcE6f8M76Xa6yU8VcNko94Ck7iB4vj70q76P/J7kt98hklrr85/3NU3oti3nrIHmHABEB
AAHNKk5laWwgQXJtc3Ryb25nIDxuZWlsLmFybXN0cm9uZ0BsaW5hcm8ub3JnPsLAkQQTAQoA
OwIbIwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgBYhBInsPQWERiF0UPIoSBaat7Gkz/iuBQJk
Q5wSAhkBAAoJEBaat7Gkz/iuyhMIANiD94qDtUTJRfEW6GwXmtKWwl/mvqQtaTtZID2dos04
YqBbshiJbejgVJjy+HODcNUIKBB3PSLaln4ltdsV73SBcwUNdzebfKspAQunCM22Mn6FBIxQ
GizsMLcP/0FX4en9NaKGfK6ZdKK6kN1GR9YffMJd2P08EO8mHowmSRe/ExAODhAs9W7XXExw
UNCY4pVJyRPpEhv373vvff60bHxc1k/FF9WaPscMt7hlkbFLUs85kHtQAmr8pV5Hy9ezsSRa
GzJmiVclkPc2BY592IGBXRDQ38urXeM4nfhhvqA50b/nAEXc6FzqgXqDkEIwR66/Gbp0t3+r
yQzpKRyQif3OwE0ETVkGzwEIALyKDN/OGURaHBVzwjgYq+ZtifvekdrSNl8TIDH8g1xicBYp
QTbPn6bbSZbdvfeQPNCcD4/EhXZuhQXMcoJsQQQnO4vwVULmPGgtGf8PVc7dxKOeta+qUh6+
SRh3vIcAUFHDT3f/Zdspz+e2E0hPV2hiSvICLk11qO6cyJE13zeNFoeY3ggrKY+IzbFomIZY
4yG6xI99NIPEVE9lNBXBKIlewIyVlkOaYvJWSV+p5gdJXOvScNN1epm5YHmf9aE2ZjnqZGoM
Mtsyw18YoX9BqMFInxqYQQ3j/HpVgTSvmo5ea5qQDDUaCsaTf8UeDcwYOtgI8iL4oHcsGtUX
oUk33HEAEQEAAcLAXwQYAQIACQUCTVkGzwIbDAAKCRAWmrexpM/4rrXiB/sGbkQ6itMrAIfn
M7IbRuiSZS1unlySUVYu3SD6YBYnNi3G5EpbwfBNuT3H8//rVvtOFK4OD8cRYkxXRQmTvqa3
3eDIHu/zr1HMKErm+2SD6PO9umRef8V82o2oaCLvf4WeIssFjwB0b6a12opuRP7yo3E3gTCS
KmbUuLv1CtxKQF+fUV1cVaTPMyT25Od+RC1K+iOR0F54oUJvJeq7fUzbn/KdlhA8XPGzwGRy
4zcsPWvwnXgfe5tk680fEKZVwOZKIEuJC3v+/yZpQzDvGYJvbyix0lHnrCzq43WefRHI5XTT
QbM0WUIBIcGmq38+OgUsMYu4NzLu7uZFAcmp6h8g
Organization: Linaro
In-Reply-To: <20250603-panel-maintainer-update-v1-1-224aaa222d99@xxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 04/06/2025 03:18, Jessica Zhang wrote:
Update my email with *.qualcomm.com address
Signed-off-by: Jessica Zhang <jessica.zhang@xxxxxxxxxxxxxxxx>
---
MAINTAINERS | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index ac8da9a3baa3..e94d21953227 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -8208,7 +8208,7 @@ F: drivers/gpu/drm/clients/drm_log.c
DRM PANEL DRIVERS
M: Neil Armstrong <neil.armstrong@xxxxxxxxxx>
-R: Jessica Zhang <quic_jesszhan@xxxxxxxxxxx>
+R: Jessica Zhang <jessica.zhang@xxxxxxxxxxxxxxxx>
L: dri-devel@xxxxxxxxxxxxxxxxxxxxx
S: Maintained
T: git https://gitlab.freedesktop.org/drm/misc/kernel.git
---
base-commit: 0f6afbb2ae6c9bd2acd5acf75762fec68bc6fab0
change-id: 20250603-panel-maintainer-update-dd26f90ade0a
Best regards,
Acked-by: Neil Armstrong <neil.armstrong@xxxxxxxxxx>
Return-Path: <linux-kernel+bounces-673193-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id B268641E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:29:29 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 933557A43FB
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:28:09 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id BA43C28ECDD;
Wed, 4 Jun 2025 12:29:18 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="K/4E5nk3"
Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 01E8A28D8ED
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:29:14 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.42
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749040157; cv=none; b=Bso4zNqkBMRYLMY+KM8ODGH1pWKqcme1pB1TpmoGmZOUAUX+wgTHNXPp/pB37pS1kYEPGq7riwj6XLYZDfnU/4AvqJLwID0zO/on1Wx4kISzUQUXlHmWi4dt5bZvePQ/O/plK15Mpq5Br/9N5L8V/6ffzsBEn51K3A4Y01Unz8E=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749040157; c=relaxed/simple;
bh=ULFNDPnm3+qsry1f77pFQpUZJmv8SW+h00LKUdNxlGY=;
h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References:
In-Reply-To:Content-Type; b=Ft6BtApn6OzH43zW5mtsPLREW+MAjR5cxg9Wxg0arjS2cOyxLMNufHpiATLE5xU87hjvpGSxt1ycomHCFk0Lm6tpQuWsloknHcc/DO1d+tS7EOoUkTdMNKWMXScNKocMI7YT72FTqe5OD9+aNxcQAzbl1QXLyMTDuNOekBqZOAE=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=K/4E5nk3; arc=none smtp.client-ip=209.85.221.42
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org
Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-3a4f379662cso5379573f8f.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 05:29:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=linaro.org; s=google; t=1749040153; x=1749644953; darn=vger.kernel.org;
h=content-transfer-encoding:in-reply-to:organization:autocrypt
:content-language:references:cc:to:subject:reply-to:from:user-agent
:mime-version:date:message-id:from:to:cc:subject:date:message-id
:reply-to;
bh=QVfy2CpvBk3MsiLsYhxYE+mgkyJuV5n7k3uqs9AC104=;
b=K/4E5nk3yOF0ml3ljPfRlvXWzb1u2FwfWABju3Pg4foTdGiv5wSA/NW+44bSgldlDR
cjDMZ3Z0Mg+3LpyT709R3EZcR+X7QVnrj4EnY9tje/tvNz8MoGJjOGzu/NREJOilNREm
YxX2UeWv7Z58OZ3QYkl0YkzTza9Y6wS8C4laJZt8nDMPN3QzGt0f2+bNMJ2FALH55bSk
/tNKqZmbcmiGUcEVO39exdBxIRgRu7iDpw4CPXMkfUdL0/SzDSydnPwujWdKld/j1Ebf
y6OCyfCV/pc8Zj6z5t11OLjdFMWcBBGyd4O65L4z6IG6zZr1Ql4g9vH2rjRVZ81U9Non
kpRw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749040153; x=1749644953;
h=content-transfer-encoding:in-reply-to:organization:autocrypt
:content-language:references:cc:to:subject:reply-to:from:user-agent
:mime-version:date:message-id:x-gm-message-state:from:to:cc:subject
:date:message-id:reply-to;
bh=QVfy2CpvBk3MsiLsYhxYE+mgkyJuV5n7k3uqs9AC104=;
b=TZAWbk3UDxkmcG6Ly4XhOGsYdXmrVhcrbAnfdgN4E9VeQiF3xMheRDxdfUIQ3VDwnC
/62pLkdlbNknBqsVthfUDKtoTNXNNIrMIMiUYNpdtDYLtfJFg6zWjgRP5Fe6zsplW2v5
nnwNHYHRlj1WnLS52TWDgyp250tEiDAF6VRPpq5VbLPDM8dIyzu4XBMxlRrDMxAQdyzW
i+qQQiR72XkJRzINEqyuvdgNIMmGd4m8gwm6h4rdjgJtjUGbRKqf/2mKePKlPV+ebk+2
O1NfEOMKOc/uzpmJIlTmH407O9RmCiqxlfDrqiojGZTMpXpYZ2sNBgQmRtQDf9FG36Bg
S//Q==
X-Forwarded-Encrypted: i=1; AJvYcCWcmAl4U7f5MLT5Az7JTo50PKRQSM2GCM+Z1ONKZ/BMce5dZD/fo3p13KWKZuWCkEDRJ0qO6r1Qqq8nmGE=@vger.kernel.org
X-Gm-Message-State: AOJu0YyZM0npudyb2GsDDTgy0upOtIHPjNo89xWlZkvs7G8GZrcYfr1J
kwamX0QyOWdLbs4rnQo2HSoeClswB0qUxr5DNov0TYeMgilW+aOTAIS9r2Qo+7d9l6U=
X-Gm-Gg: ASbGncvUzUMJ30kjRPtFWu0ZJWhRHcTa1CP4du42IjDcUpHDt0EU9kR1cdhTOEdnbH+
5aQfHcJq35WdrvdGadVmbZx59Elt7YTiTIpxO9WG+lmNQDUDWRAVyamHqHDOk/8U6Wnq3Q14tce
QFLXcneyq+lxyi3CtyTc4lWTGHXM809f6IAqx9M5RW8z9ofBiFSkaL6G9sRKsVObublpxQzsg5J
3bWO0cvbign0nFg0WFiuWyay1NWLlQwXNQ8sWofJJtmksL0OcUWk6rVx+LMJHniy3QEfan9jzTa
B73pQOs1NHfZEumSkJNx/FWdsEqhbeEdmbCXc1vzAbRmOsc0WUsw9IEfBE+lvL3jLGsUvhhNcZe
dfG1W3wHMLU0V3TTVIa5noUsuiJAjWMyTu65r
X-Google-Smtp-Source: AGHT+IFbZzzXIZYRmNVttFy6UZkVLmONQDN5/oxjc1R4rO6jeaovt23EuVBiRT3lHV9syJ/ZBBw/dg==
X-Received: by 2002:a5d:5f54:0:b0:3a4:cb4f:ac2a with SMTP id ffacd0b85a97d-3a51d935a05mr2296824f8f.21.1749040153247;
Wed, 04 Jun 2025 05:29:13 -0700 (PDT)
Received: from ?IPV6:2a01:e0a:3d9:2080:fef9:cf1c:18f:2ab8? ([2a01:e0a:3d9:2080:fef9:cf1c:18f:2ab8])
by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-450d7f8ed32sm196056845e9.1.2025.06.04.05.29.12
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 05:29:12 -0700 (PDT)
Message-ID: <1f6bcfb1-80f4-4ff0-8dcc-8fc9c3b9d2fd@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 14:29:12 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
From: neil.armstrong@xxxxxxxxxx
Reply-To: Neil Armstrong <neil.armstrong@xxxxxxxxxx>
Subject: Re: [PATCH 1/2] MAINTAINERS: Update the e-mail address of Manivannan
Sadhasivam
To: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>,
bhelgaas@xxxxxxxxxx
Cc: linux-pci@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
linux-arm-msm@xxxxxxxxxxxxxxx
References: <20250604120833.32791-1-manivannan.sadhasivam@xxxxxxxxxx>
<20250604120833.32791-2-manivannan.sadhasivam@xxxxxxxxxx>
Content-Language: en-US, fr
Autocrypt: addr=neil.armstrong@xxxxxxxxxx; keydata=
xsBNBE1ZBs8BCAD78xVLsXPwV/2qQx2FaO/7mhWL0Qodw8UcQJnkrWmgTFRobtTWxuRx8WWP
GTjuhvbleoQ5Cxjr+v+1ARGCH46MxFP5DwauzPekwJUD5QKZlaw/bURTLmS2id5wWi3lqVH4
BVF2WzvGyyeV1o4RTCYDnZ9VLLylJ9bneEaIs/7cjCEbipGGFlfIML3sfqnIvMAxIMZrvcl9
qPV2k+KQ7q+aXavU5W+yLNn7QtXUB530Zlk/d2ETgzQ5FLYYnUDAaRl+8JUTjc0CNOTpCeik
80TZcE6f8M76Xa6yU8VcNko94Ck7iB4vj70q76P/J7kt98hklrr85/3NU3oti3nrIHmHABEB
AAHNKk5laWwgQXJtc3Ryb25nIDxuZWlsLmFybXN0cm9uZ0BsaW5hcm8ub3JnPsLAkQQTAQoA
OwIbIwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgBYhBInsPQWERiF0UPIoSBaat7Gkz/iuBQJk
Q5wSAhkBAAoJEBaat7Gkz/iuyhMIANiD94qDtUTJRfEW6GwXmtKWwl/mvqQtaTtZID2dos04
YqBbshiJbejgVJjy+HODcNUIKBB3PSLaln4ltdsV73SBcwUNdzebfKspAQunCM22Mn6FBIxQ
GizsMLcP/0FX4en9NaKGfK6ZdKK6kN1GR9YffMJd2P08EO8mHowmSRe/ExAODhAs9W7XXExw
UNCY4pVJyRPpEhv373vvff60bHxc1k/FF9WaPscMt7hlkbFLUs85kHtQAmr8pV5Hy9ezsSRa
GzJmiVclkPc2BY592IGBXRDQ38urXeM4nfhhvqA50b/nAEXc6FzqgXqDkEIwR66/Gbp0t3+r
yQzpKRyQif3OwE0ETVkGzwEIALyKDN/OGURaHBVzwjgYq+ZtifvekdrSNl8TIDH8g1xicBYp
QTbPn6bbSZbdvfeQPNCcD4/EhXZuhQXMcoJsQQQnO4vwVULmPGgtGf8PVc7dxKOeta+qUh6+
SRh3vIcAUFHDT3f/Zdspz+e2E0hPV2hiSvICLk11qO6cyJE13zeNFoeY3ggrKY+IzbFomIZY
4yG6xI99NIPEVE9lNBXBKIlewIyVlkOaYvJWSV+p5gdJXOvScNN1epm5YHmf9aE2ZjnqZGoM
Mtsyw18YoX9BqMFInxqYQQ3j/HpVgTSvmo5ea5qQDDUaCsaTf8UeDcwYOtgI8iL4oHcsGtUX
oUk33HEAEQEAAcLAXwQYAQIACQUCTVkGzwIbDAAKCRAWmrexpM/4rrXiB/sGbkQ6itMrAIfn
M7IbRuiSZS1unlySUVYu3SD6YBYnNi3G5EpbwfBNuT3H8//rVvtOFK4OD8cRYkxXRQmTvqa3
3eDIHu/zr1HMKErm+2SD6PO9umRef8V82o2oaCLvf4WeIssFjwB0b6a12opuRP7yo3E3gTCS
KmbUuLv1CtxKQF+fUV1cVaTPMyT25Od+RC1K+iOR0F54oUJvJeq7fUzbn/KdlhA8XPGzwGRy
4zcsPWvwnXgfe5tk680fEKZVwOZKIEuJC3v+/yZpQzDvGYJvbyix0lHnrCzq43WefRHI5XTT
QbM0WUIBIcGmq38+OgUsMYu4NzLu7uZFAcmp6h8g
Organization: Linaro
In-Reply-To: <20250604120833.32791-2-manivannan.sadhasivam@xxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 04/06/2025 14:08, Manivannan Sadhasivam wrote:
My Linaro email is going to bounce soon, so switch to the kernel.org alias.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
---
MAINTAINERS | 38 +++++++++++++++++++-------------------
1 file changed, 19 insertions(+), 19 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 690e48c20fb5..f39b6fca3ab8 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2102,7 +2102,7 @@ F: arch/arm/plat-*/
ARM/ACTIONS SEMI ARCHITECTURE
M: Andreas Färber <afaerber@xxxxxxx>
-M: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
+M: Manivannan Sadhasivam <mani@xxxxxxxxxx>
L: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx (moderated for non-subscribers)
L: linux-actions@xxxxxxxxxxxxxxxxxxx (moderated for non-subscribers)
S: Maintained
@@ -2354,7 +2354,7 @@ F: arch/arm/boot/dts/intel/axm/
F: arch/arm/mach-axxia/
ARM/BITMAIN ARCHITECTURE
-M: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
+M: Manivannan Sadhasivam <mani@xxxxxxxxxx>
L: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx (moderated for non-subscribers)
S: Maintained
F: Documentation/devicetree/bindings/arm/bitmain.yaml
@@ -3022,7 +3022,7 @@ F: include/linux/soc/qcom/
F: include/soc/qcom/
ARM/RDA MICRO ARCHITECTURE
-M: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
+M: Manivannan Sadhasivam <mani@xxxxxxxxxx>
L: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx (moderated for non-subscribers)
L: linux-unisoc@xxxxxxxxxxxxxxxxxxx (moderated for non-subscribers)
S: Maintained
@@ -3725,7 +3725,7 @@ F: Documentation/admin-guide/aoe/
F: drivers/block/aoe/
ATC260X PMIC MFD DRIVER
-M: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
+M: Manivannan Sadhasivam <mani@xxxxxxxxxx>
M: Cristian Ciocaltea <cristian.ciocaltea@xxxxxxxxx>
L: linux-actions@xxxxxxxxxxxxxxxxxxx
S: Maintained
@@ -6730,7 +6730,7 @@ S: Orphan
F: drivers/mtd/nand/raw/denali*
DESIGNWARE EDMA CORE IP DRIVER
-M: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
+M: Manivannan Sadhasivam <mani@xxxxxxxxxx>
L: dmaengine@xxxxxxxxxxxxxxx
S: Maintained
F: drivers/dma/dw-edma/
@@ -8546,7 +8546,7 @@ S: Maintained
F: drivers/edac/pnd2_edac.[ch]
EDAC-QCOM
-M: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
+M: Manivannan Sadhasivam <mani@xxxxxxxxxx>
L: linux-arm-msm@xxxxxxxxxxxxxxx
L: linux-edac@xxxxxxxxxxxxxxx
S: Maintained
@@ -14702,7 +14702,7 @@ F: drivers/hid/hid-mcp2221.c
MCP251XFD SPI-CAN NETWORK DRIVER
M: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>
-M: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
+M: Manivannan Sadhasivam <mani@xxxxxxxxxx>
R: Thomas Kopp <thomas.kopp@xxxxxxxxxxxxx>
L: linux-can@xxxxxxxxxxxxxxx
S: Maintained
@@ -15849,7 +15849,7 @@ F: arch/arm64/boot/dts/marvell/armada-3720-eDPU.dts
F: arch/arm64/boot/dts/marvell/armada-3720-uDPU.*
MHI BUS
-M: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
+M: Manivannan Sadhasivam <mani@xxxxxxxxxx>
L: mhi@xxxxxxxxxxxxxxx
L: linux-arm-msm@xxxxxxxxxxxxxxx
S: Maintained
@@ -18752,7 +18752,7 @@ F: drivers/pci/controller/dwc/pci-exynos.c
PCI DRIVER FOR SYNOPSYS DESIGNWARE
M: Jingoo Han <jingoohan1@xxxxxxxxx>
-M: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
+M: Manivannan Sadhasivam <mani@xxxxxxxxxx>
L: linux-pci@xxxxxxxxxxxxxxx
S: Maintained
F: Documentation/devicetree/bindings/pci/snps,dw-pcie-ep.yaml
@@ -18787,7 +18787,7 @@ F: Documentation/devicetree/bindings/pci/xilinx-versal-cpm.yaml
F: drivers/pci/controller/pcie-xilinx-cpm.c
PCI ENDPOINT SUBSYSTEM
-M: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
+M: Manivannan Sadhasivam <mani@xxxxxxxxxx>
M: Krzysztof Wilczyński <kw@xxxxxxxxx>
R: Kishon Vijay Abraham I <kishon@xxxxxxxxxx>
L: linux-pci@xxxxxxxxxxxxxxx
@@ -18840,7 +18840,7 @@ F: drivers/pci/controller/pci-xgene-msi.c
PCI NATIVE HOST BRIDGE AND ENDPOINT DRIVERS
M: Lorenzo Pieralisi <lpieralisi@xxxxxxxxxx>
M: Krzysztof Wilczyński <kw@xxxxxxxxx>
-M: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
+M: Manivannan Sadhasivam <mani@xxxxxxxxxx>
R: Rob Herring <robh@xxxxxxxxxx>
L: linux-pci@xxxxxxxxxxxxxxx
S: Supported
@@ -18997,7 +18997,7 @@ F: Documentation/devicetree/bindings/pci/microchip*
F: drivers/pci/controller/plda/*microchip*
PCIE DRIVER FOR QUALCOMM MSM
-M: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
+M: Manivannan Sadhasivam <mani@xxxxxxxxxx>
L: linux-pci@xxxxxxxxxxxxxxx
L: linux-arm-msm@xxxxxxxxxxxxxxx
S: Maintained
@@ -19033,7 +19033,7 @@ F: Documentation/devicetree/bindings/pci/starfive,jh7110-pcie.yaml
F: drivers/pci/controller/plda/pcie-starfive.c
PCIE ENDPOINT DRIVER FOR QUALCOMM
-M: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
+M: Manivannan Sadhasivam <mani@xxxxxxxxxx>
L: linux-pci@xxxxxxxxxxxxxxx
L: linux-arm-msm@xxxxxxxxxxxxxxx
S: Maintained
@@ -20154,7 +20154,7 @@ F: drivers/iommu/arm/arm-smmu/arm-smmu-qcom*
F: drivers/iommu/msm_iommu*
QUALCOMM IPC ROUTER (QRTR) DRIVER
-M: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
+M: Manivannan Sadhasivam <mani@xxxxxxxxxx>
L: linux-arm-msm@xxxxxxxxxxxxxxx
S: Maintained
F: include/trace/events/qrtr.h
@@ -20162,7 +20162,7 @@ F: include/uapi/linux/qrtr.h
F: net/qrtr/
QUALCOMM IPCC MAILBOX DRIVER
-M: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
+M: Manivannan Sadhasivam <mani@xxxxxxxxxx>
L: linux-arm-msm@xxxxxxxxxxxxxxx
S: Supported
F: Documentation/devicetree/bindings/mailbox/qcom-ipcc.yaml
@@ -20196,7 +20196,7 @@ F: Documentation/devicetree/bindings/media/qcom,*-iris.yaml
F: drivers/media/platform/qcom/iris/
QUALCOMM NAND CONTROLLER DRIVER
-M: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
+M: Manivannan Sadhasivam <mani@xxxxxxxxxx>
L: linux-mtd@xxxxxxxxxxxxxxxxxxx
L: linux-arm-msm@xxxxxxxxxxxxxxx
S: Maintained
@@ -22731,7 +22731,7 @@ F: Documentation/devicetree/bindings/media/i2c/sony,imx283.yaml
F: drivers/media/i2c/imx283.c
SONY IMX290 SENSOR DRIVER
-M: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
+M: Manivannan Sadhasivam <mani@xxxxxxxxxx>
L: linux-media@xxxxxxxxxxxxxxx
S: Maintained
T: git git://linuxtv.org/media.git
@@ -22740,7 +22740,7 @@ F: drivers/media/i2c/imx290.c
SONY IMX296 SENSOR DRIVER
M: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
-M: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
+M: Manivannan Sadhasivam <mani@xxxxxxxxxx>
L: linux-media@xxxxxxxxxxxxxxx
S: Maintained
T: git git://linuxtv.org/media.git
@@ -25041,7 +25041,7 @@ S: Maintained
F: drivers/ufs/host/ufs-mediatek*
UNIVERSAL FLASH STORAGE HOST CONTROLLER DRIVER QUALCOMM HOOKS
-M: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
+M: Manivannan Sadhasivam <mani@xxxxxxxxxx>
L: linux-arm-msm@xxxxxxxxxxxxxxx
L: linux-scsi@xxxxxxxxxxxxxxx
S: Maintained
Acked-by: Neil Armstrong <neil.armstrong@xxxxxxxxxx>
Return-Path: <linux-kernel+bounces-673194-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id E1B3E41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:29:39 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id EA0B1188F151
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:29:49 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 193DC28F51A;
Wed, 4 Jun 2025 12:29:20 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="kqEo0JN4";
dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="BP6QPYlh"
Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 59B7C28ECE2;
Wed, 4 Jun 2025 12:29:17 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.165.32
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749040159; cv=fail; b=Bq9750MuTJEFmhUC3JfgkXxpgt3MGkvNomxU6s2e3umMrmZnXcv8mT9CzT7lV2xv+Y/PcYQbKqEeiidoM7jrHoQQA6q/hxDvoR5/tsJyfOU6hjIk2YvPeJ7EZKmm0/3/u6yZcMMQCXlArlBlc7bxsJhg/JkzkWe/Qr1neHg0qKA=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749040159; c=relaxed/simple;
bh=hIObgNEoAusVwXfyuQJUkEcyAX9xmgiPQL7Ntx6Z2D4=;
h=Date:From:To:Cc:Subject:Message-ID:References:Content-Type:
Content-Disposition:In-Reply-To:MIME-Version; b=EZRJPBxTti5xkdW+1mBEjfktfprWo81zJxkCdfqsdSnvLW1vMv0Ptmo7whFRVM5mgX+w2h/l8np6iIzPSfYd0JyjvQ6MFx4PN9OU1IDMDWGTNdK/Rf1pMlNdQ8tjbfHtYPhv6sncUhi9LbTO/+QxzxbUe1evICLAffLe6Nk9TqQ=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=kqEo0JN4; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=BP6QPYlh; arc=fail smtp.client-ip=205.220.165.32
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com
Received: from pps.filterd (m0333521.ppops.net [127.0.0.1])
by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5549Mgsm012305;
Wed, 4 Jun 2025 12:28:51 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc
:content-type:date:from:in-reply-to:message-id:mime-version
:references:subject:to; s=corp-2025-04-25; bh=S8ux9laDrq1VlnF3Nv
OrfGZ85nvj+izGg6V4C3rLB2g=; b=kqEo0JN4cCvcJpoWPLXhmHevSBMTo1He1d
W89WMqPiewqzNZ80hZmavA+GiXKpXvqtox3YK60XrYoCbo/FTuP5KEktJ53wROgf
IKMRq4p20fvcxYJ1nqLpvybvZZ0HzOA2hliyoW70riYavj4aLum2SvjpVHjvmO1U
vkro9wSxq3WBdp3VWYWacemN2lQ01z7Qmw9/uZN/3vspZDiVAIVm6y0HJOUrVRQw
vr4FqM9l1oPzuia8WTKc47SMqDKvak0ML2T9hJNN12CLq8yl5wKrnaT9lZz+ZvRr
pIk7o8/OuhcxFuaKrIM40xvvO8UdKiZqBXy4IkOytGmvGDnXGO6A==
Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129])
by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 471g8bkujh-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 04 Jun 2025 12:28:50 +0000 (GMT)
Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1])
by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 554ADNxx034896;
Wed, 4 Jun 2025 12:28:50 GMT
Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11on2050.outbound.protection.outlook.com [40.107.236.50])
by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 46yr7axhq6-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 04 Jun 2025 12:28:49 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=B3TZKdfjFIVhrazjjH9pCSCvwiggIg43jX2j7w/3SuNwZLmDiJpJ4n8nH01eZbSd+3JyA0N0hUSWKT7ni7KANxtM7QZ95h3nhSoYprbyIp+BqGgw8Xy4ydTR2x5iiWVK+YuV+pZCSTHHN2bwx3uGL1kEfaM1HCs2pVXSU9nztO04ZABBcIF+upgVkdS+2v7mocHyxQZPkv7mEnTdoNgp/dcRQAH2d1O0kJZNhDeKc5+v7OX8bRmvHc+izRlc0KKy4NjfX78PKndc3J8pTj7O1Bejmq/oz0QdcpmwbSHB03D5TxISxhNBvxuAlGkoO0tl2Ox806r7NtQyGNEpm5ejJQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=S8ux9laDrq1VlnF3NvOrfGZ85nvj+izGg6V4C3rLB2g=;
b=ebgNZxWbQmzqvGOPjXJVhI3jn2X474voxCcTxdiEbC1eikXKD6swpclKLVFim7pQ+PUWHCXocsw2eTrzVN3lllJrG/jgs/9a75CPtgmbK5HMJISg0GFzAcGgATy0OE6sfbGRwtoVscSzp6dF530xAGMA6/RxMePdsc/RiJ4wpgyYI+3L+w3EuwTzmAZzUFE4pELgE+pfvzVx6d8Msj25S2L0M+UeZBeG8Lki8B0id1Zt/N/ENE2D9WCZsVvnayeGP4/YLLuiKokOKpqy+1N3/wRZhYgKlnhzT2E3X/UfQAY76qvd0Kxo+WT3ofRGjMNWxYE92dTduF49xfVmlWQhsQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com;
dkim=pass header.d=oracle.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=S8ux9laDrq1VlnF3NvOrfGZ85nvj+izGg6V4C3rLB2g=;
b=BP6QPYlhjlBWUPKilhMPJU0ujFEArP8zU3hg+qjtX9+ZnBYopa8rwnEdcyb58qglc/hagwNZGKWKNpWmI6RnGn5oc+DwFEZFbv+AT5iA2arw/Sx4VlEpRUFvRmNtbTF3exLTw6W7vAcsI7SrPsczS7MtN6vLd9Q8mHXjxYh7NsE=
Received: from DM4PR10MB8218.namprd10.prod.outlook.com (2603:10b6:8:1cc::16)
by DS7PR10MB4863.namprd10.prod.outlook.com (2603:10b6:5:297::17) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.34; Wed, 4 Jun
2025 12:28:47 +0000
Received: from DM4PR10MB8218.namprd10.prod.outlook.com
([fe80::2650:55cf:2816:5f2]) by DM4PR10MB8218.namprd10.prod.outlook.com
([fe80::2650:55cf:2816:5f2%6]) with mapi id 15.20.8746.041; Wed, 4 Jun 2025
12:28:47 +0000
Date: Wed, 4 Jun 2025 13:28:45 +0100
From: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>
To: Matthew Wilcox <willy@xxxxxxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
Shakeel Butt <shakeel.butt@xxxxxxxxx>,
"Liam R . Howlett" <Liam.Howlett@xxxxxxxxxx>,
David Hildenbrand <david@xxxxxxxxxx>, Vlastimil Babka <vbabka@xxxxxxx>,
Jann Horn <jannh@xxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>,
Christian Brauner <brauner@xxxxxxxxxx>, SeongJae Park <sj@xxxxxxxxxx>,
Usama Arif <usamaarif642@xxxxxxxxx>, Mike Rapoport <rppt@xxxxxxxxxx>,
Johannes Weiner <hannes@xxxxxxxxxxx>, Barry Song <21cnbao@xxxxxxxxx>,
linux-mm@xxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-api@xxxxxxxxxxxxxxx,
Pedro Falcato <pfalcato@xxxxxxx>
Subject: Re: [DISCUSSION] proposed mctl() API
Message-ID: <12d7db2e-3a2c-47a2-a973-4110d2424c71@lucifer.local>
References: <85778a76-7dc8-4ea8-8827-acb45f74ee05@lucifer.local>
<aDh9LtSLCiTLjg2X@xxxxxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <aDh9LtSLCiTLjg2X@xxxxxxxxxxxxxxxxxxxx>
X-ClientProxiedBy: LO4P265CA0144.GBRP265.PROD.OUTLOOK.COM
(2603:10a6:600:2c4::17) To DM4PR10MB8218.namprd10.prod.outlook.com
(2603:10b6:8:1cc::16)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: DM4PR10MB8218:EE_|DS7PR10MB4863:EE_
X-MS-Office365-Filtering-Correlation-Id: e26cdbbd-01bc-414d-b92c-08dda3635a97
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|7416014|376014|1800799024;
X-Microsoft-Antispam-Message-Info:
=?us-ascii?Q?8mPD5GfLHiS0MNhT33rQCGwyzeSUDiuyFPXfXXcGb7HdbQGFyDo7lgiAyWl3?=
=?us-ascii?Q?hcSA+BbI5WZqEVDA43MkFIfQf/LlUVJ1fn2LwB9cH9TbqIZs9vVdWl4zxLgn?=
=?us-ascii?Q?rVnjFz3L5N6HwuljQeBnEadNuLo+l6NkYwu3vE47SfazdHAauJxTvOdIl70F?=
=?us-ascii?Q?JEmOrvTCV37MHHR78xOI+LJym0aJfUMVFlQ4DM6AJnCw8E5yBtzPoOMfKFQW?=
=?us-ascii?Q?MtMKGMTNjjwaNA2x6SzgCMXnN3uLFflA5UuYnWMMK1vR/njPvbjsDWKDosYa?=
=?us-ascii?Q?80kGGaz82rRzuJBzhxxnGaNPAcphSOjrm3dNzvlPeUhBHnP+1QZ5rSTCOGt7?=
=?us-ascii?Q?P4jQqBgvazxvId0a/ETME0i6WS1CjDd/wDway6hBU/P/8ik6h+Qbow1y11Qk?=
=?us-ascii?Q?3U2+JIQ1asTty5biNzFitywdQH6Zl4RkmEvFU+2Vr9mJnrRZpBoQLfeK98EI?=
=?us-ascii?Q?XDCrM6NchhkcZ0Ega5bvM+ou8XS425SrlzPw9f5TZNml0EqFhQUMpcFMBMEr?=
=?us-ascii?Q?ax3GJ9KCwtwFAJ4cdSi6/0HhL2/a3clUkwU90cS/e57MKnlXANUuaNFNRsuK?=
=?us-ascii?Q?Kgeefj0Ni5ZH88M81H8vdz9kv+56A29xWWo0ySE+7R0lhUgpuc9SGq8l1UNn?=
=?us-ascii?Q?u8oNMWHCD42X4PHC3V7UN5XEmfmWSEFKIMmbXfWMtsn6BCME7Su8ZfkUTAkF?=
=?us-ascii?Q?x/YsdzuhzdNw05ktRCx/h5oTRz5/afPvNZuWC/g50WLh2QtbjAKH3qPlV4L0?=
=?us-ascii?Q?S+26cqrtuDy6HtRPi7SuJAEZonKS/3jbSk15rolT36AgF6oFg77JQl8GOHFh?=
=?us-ascii?Q?o5/XyVp68L3xcTGthq0D3L6LiaCAokUxiTcCnq3Pk3fpaTtCSt4AUpNyVSDO?=
=?us-ascii?Q?Pj8MudzEWgCqSuRbojDHsaphdcMHAr/UWjHV2l0jKEG/YXJw3FXGjlZxy1g6?=
=?us-ascii?Q?3hpyjEjFzYFFgXohRxXzCrLFA+PR2aWa4czDdKWHwX4zB1ocOUGg6/jFLGHW?=
=?us-ascii?Q?n+ye51/i2ooun6XUG+dV4agptd1UnHb/OqDDx/GoeqU+9g4SuMkp/jEvi3Es?=
=?us-ascii?Q?u7U2v7E1wzAA1ekEVRnq5cKnr5PrvOyU1Y4qcNC9GaGLpXYA105XED4ZPe+O?=
=?us-ascii?Q?cAKCVGKn+gIyALH/vCzAsbD8c+TjKD3fqUZzBv5oL8fhBaOzA00/9q8tkFxD?=
=?us-ascii?Q?YfI/gKMUmq5Hhvx+NbPHDZnuU7VvZdH4bkI4OQBZg8iVEEVD5VOrLVtLCVEs?=
=?us-ascii?Q?LfDg+yUwfQSCSHjNvYHUxYVfniM/Bkf09bLmZ7I05EDqU2YMlwFUwMr7aWwq?=
=?us-ascii?Q?Kuvj/e9/hBKXvnzU99/4XPcNzpJcmzlY+UH/gEU4Aa9LlkHqmEQLJ9zY0KJ9?=
=?us-ascii?Q?nX1OJ8AQJJ+VTHF875Z6jb2PwSEMXyzqrHgiQ1Fj6N0J4lr5AHPT8/cOtisv?=
=?us-ascii?Q?dbOZ/e+iOaw=3D?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR10MB8218.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(7416014)(376014)(1800799024);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?us-ascii?Q?Isb2Wia9XkWC9kKh3LKBhuDZvfJxjCTNeTjUMuWb7CRr54UBe7JqJVlp1dNC?=
=?us-ascii?Q?JG7MW8bsPBHgm2FAFZJQ/p9/2rqfza4s0DB/F/e9PhR5Pcjk+u/tsQCjkBFC?=
=?us-ascii?Q?Jzk7dCcXoKbEI6ir+KzoGnh9TT6rwKT3xaEVKx5O+khULUWDFsaU6EShb2kw?=
=?us-ascii?Q?jGbZtgevGAxDRhLOTecgikLAOyQACyeS76Mcj/vkLG6J6tkDVfa9DC/vguAl?=
=?us-ascii?Q?p0pDTrIBXgs6OW2Fje3mRGZsHXcncA/xtydqbDilP8U+CqGVaP0AIItfYLhX?=
=?us-ascii?Q?TXultGT11ljNFeFhrNQbajz9k0DwRMcQ4C9x78YvcrbYdMsnQUYK7T6/IpGz?=
=?us-ascii?Q?v2SLcShlCQbGj0Cw91qhb3od5u8S8M0p+co9p7GqW81n90KJXyHRpEHnkhew?=
=?us-ascii?Q?WoWhgOAEECzAbIxll0ft2+18TDkMeKuTksPFx1gBwC9TqIssc/Qh2OlLHPxS?=
=?us-ascii?Q?/IH0qkuiC0do1N9c+B9v+lkagkAurFVoeqRI2IFEOwZ0QqQTjc6kzMR0wsUD?=
=?us-ascii?Q?qg8aH77eWuMksCZ7A9jwDlQR4IWFNM3gpw4cSh5Ma7gVhY89t1x7asWT0grY?=
=?us-ascii?Q?UfI5Wpy2G4VNkGX7maOgpalPp32En5TpDUW+W+aF8GwMqYT66hOUi/pdnUOS?=
=?us-ascii?Q?j4OmekM0TVsU2vbZcyZUJEAFflUxnwN+jfvuPAGaZKYxX+JrpLgeC1a2/Ig/?=
=?us-ascii?Q?z89TD6P+DcU3l/YMTiqeN02xisIfvESkY+qg/0/EWBA7MtGKgBI8CZCHxe7C?=
=?us-ascii?Q?ibDmLsOuz9LbqbI9hVqgx3EnSFlmnB7xcfajvx/rTceYxtRPbL00rYWOUzX8?=
=?us-ascii?Q?IEH7MAfIMYFjLnq3WyhRfB1sH6ZL2W1kr/FeWFxmAXs96PXCydA4M/b3oOt2?=
=?us-ascii?Q?pPXZpb/7evf3M8+r7IPoBeVZnVmJntACPOntmfhq18ksbkGpxy9MnDO4eRPY?=
=?us-ascii?Q?NuEZmMql5cK3D5ve9dyS+SyuNaA4eKPJ6D2BTSRCKdr0N9+2NibGSYk2kuz1?=
=?us-ascii?Q?ldwOketx8sUS8xSs178M8srGO08BqZTAxV39WoxDK5YBPLVt8Dqezi85clG2?=
=?us-ascii?Q?Me6ZbxCjrwTOYzcZVEckrv5vtfxQEPur9dvR0gwRqFRiY9+cDCJ5uw6W4fXV?=
=?us-ascii?Q?/KYVm+/eq3deiVfNzYjjDq14iDKDjqYsLMtW4cR5Cs1CKwrobkBx6LwoI0h3?=
=?us-ascii?Q?JH17Ofd7XKjd3pOy6WKyQyTZYS074N9/1f7YOupp73O9aCj/5zNFPfWQERqU?=
=?us-ascii?Q?HdrbvlymbutGncKBatV03ZhqWIahJccwvYvpJAMwfBADHNmeaNKypRq29oNk?=
=?us-ascii?Q?Jc1n0uxCd1ZAaAZs8uBfYVP382YkvmhXGXCrRHJA3wd5CUHV11OITu1mlo4n?=
=?us-ascii?Q?x+H7fis7fyJKWA882aLyrhe/a8su27mmGYoMuK15Pm+OTw4DHBtXuxPhIo2p?=
=?us-ascii?Q?OrKPuCPz8uWniooqkIvT/Q+YQze+ZYCis7Uw75g5uSTrtILz4ogn6D7U00go?=
=?us-ascii?Q?ZIU3TobMYo3iXZRkH7/rMjTu9dVkzCwgoHkpOD1dJsjdMRixk3VB5SOx2YzM?=
=?us-ascii?Q?3oWdiv6MrKRO/OKYsarL/ADUECj1IwODDoIHpxU9vaDjZ38uzQXSSRO7evPy?=
=?us-ascii?Q?pw=3D=3D?=
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0:
dsRb2f4/3rsRowS/pmfybifBt/na9YTyV6yFnFZeZa3kgbSaq2eF8WPP4HSJ/Uu8UvOHFBAVVHzz+1GxuWdnBtiBug7weqr5hDnlcXYYNOXdk9a4YZr1mcS4nMwU30CQqbML/ht9NveOktGEfVQYCEzlt+Be9bI3PgYrZA+3LInL2YGzFkbkkETH5sKCIsOWnaG5dBnXTyCcN2UKCCIJ7Ksfz9bSVq0Ez0RY4xPbZWGx8/9yI5NzyI0ER8R2jGrrh8vLp1uuMFomKGg6Be3Gkm3szrX9Jsi+2dvPXe3h2l0/TysRAnxs+yztbOYXWniKUWj9n9AC6fWH//QMfq0CLnOSEuIsR0lq7EyyhJyeHDGtxy62Sqt5RCSjdVhaIlF9c0+UxyQzAjwUWQgY3ggk1BBfjOnZ/0HvBU0yJL6uZLvejQpiXI72IU4WqVOkRJ3xZsYucxFDErhF8/kmFrZRs05EN+YwI04cJc8HSPP97EoZKJchhNN8p46LX0laB/X9vKGoZGilwZd44DVJYkMHSWjyVyBS+kdbl2sMTkHrg0xolqqRJrkHJMX+3tm8l3vYtrk7qtGrY69hNzI7L3zNA27PxNqjkxjOdYJoAM6fkeY=
X-OriginatorOrg: oracle.com
X-MS-Exchange-CrossTenant-Network-Message-Id: e26cdbbd-01bc-414d-b92c-08dda3635a97
X-MS-Exchange-CrossTenant-AuthSource: DM4PR10MB8218.namprd10.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 12:28:47.4170
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: SmaByHSHFr3K3D2AyioAy7/rjMnZdqzmPNcIGcZ9Cu2OlDKwv73Zs6h82HliWETjKuEkgLMcrSekbkOVyn2WEhjmq56ZvHswf0fn1WOpqHE=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR10MB4863
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 mlxlogscore=999
bulkscore=0 spamscore=0 suspectscore=0 malwarescore=0 mlxscore=0
adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1
engine=8.12.0-2505160000 definitions=main-2506040094
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDA5NCBTYWx0ZWRfX0MD3Y1ZsUDNj aw/sqjxa+/EvF1ldyQF4UIhN6FbYt5kLNDvRWa/+6J2MW356nQXo/ru/ImMU0Co70Z/YWPdyjko IPZcCjGcPuqPlBpz61t2arhLRczqJasv3eWgjJKZsDLyeZXWnmYumKUA6MA+s40ytaAIbw7EVDS
P/mx+h9pteGVWzb23ddXRWsJC2AU15UEldG71nRyXrjf6v8BEemz/8iyraGaMVU33U3AKvZTx4y cEJzLJC8rCpnYf0gbROmZuHC7/fkohlH39oa80JlNXAGBjz5cOho73mconMNHEI/HHgG49BnwYH NTGkhOJrQLVaMM9sc+OeDSF6bkuJFHAvd+xQQIIEt0t21TPxrkGiPPPhRhHoTsmdVpvOs/fysjY
8c0eIiFhpjgWEyA4mRfTQRF/kY1Uy3FTFhoO8jkN8BJqqVJ+nKlIQXSAVfJVBIhlYGXUzFrl
X-Proofpoint-GUID: tFFiuak-o7u2WKrY_zZ0W9NmSZd2Rxbd
X-Proofpoint-ORIG-GUID: tFFiuak-o7u2WKrY_zZ0W9NmSZd2Rxbd
X-Authority-Analysis: v=2.4 cv=H+Dbw/Yi c=1 sm=1 tr=0 ts=68403c02 b=1 cx=c_pps a=WeWmnZmh0fydH62SvGsd2A==:117 a=WeWmnZmh0fydH62SvGsd2A==:17 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19
a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=6IFa9wvqVegA:10 a=GoEa3M9JfhUA:10 a=JBLUMK9MvXQNA3m-8AwA:9 a=CjuIK1q_8ugA:10
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Thu, May 29, 2025 at 04:28:46PM +0100, Matthew Wilcox wrote:
On Thu, May 29, 2025 at 03:43:26PM +0100, Lorenzo Stoakes wrote:
> After discussions in various threads (Usama's series adding a new prctl()
> in [0], and a proposal to adapt process_madvise() to do the same -
> conception in [1] and RFC in [2]), it seems fairly clear that it would make
> sense to explore a dedicated API to explicitly allow for actions which
> affect the virtual address space as a whole.
>
> Also, Barry is implementing a feature (currently under RFC) which could
> additionally make use of this API (see [3]).
I think the reason that you're having trouble coming up with a good
place to put these ideas is because they are all bad ideas. Do none of
them. Problem solved.
People should put more effort into allocating THPs automatically and
monitoring where they're helping performance and where they're hurting
performance, instead of coming up with these baroque reasons to blame
the sysadmin for not having tweaked some magic knob.
Barry's problem is that we're all nervous about possibly regressing
performance on some unknown workloads. Just try Barry's proposal, see
if anyone actually compains or if we're just afraid of our own shadows.
So from my perspective - I very much agree with the concept of doing nothing
here, ideally :)
But I feel we need to look at this problem from both the short term and the
long term - in the long run I absolutely agree with what you say.
In the short term this proposal is broadly 'what is the least worst means
of establishing policy like this?'.
I think there is broad agreement that prctl() is sub-optimal, so an
mm-specific API makes sense.
So it comes down to a question of - how badly do we need to be able to do
this _now_?
Return-Path: <linux-kernel+bounces-673195-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id DB8D441E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:30:11 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id A09391890834
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:30:10 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 8325A28ECD9;
Wed, 4 Jun 2025 12:29:35 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="G8voyw2u"
Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id C367A28EA69
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:29:31 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.48
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749040174; cv=none; b=lZOLcK8/2KTV+V2ZnUWUmehwrrv7nr31DpzUGid70Ipmqxxx6TNcYyzs3zsq+Td3p9eIGizn00Z1v0nrK3+YEadFI8Rd2AY1zh9zl1LQMtUJ9loMrF4M2VdB/UuXnlqpSKHUd8aV7N4OAKDPBG3E33qhCdhzGwN+j45jCr90Fy0=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749040174; c=relaxed/simple;
bh=jJAJ2zNRS4Mcm3SBhX/rRP1UzssTd1Y00hBueZo4LTs=;
h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References:
In-Reply-To:Content-Type; b=gClM2+uBJOL1Iro24ez3jHAr+X9a8wa4zceLWjjGycDNOSVpJAjjeUywecnEOYr2jhG6y7l7FZ/AmKncS+qn8cPjvvFEPgJWk/zCM6Yyd/bfOQabpBkOECZSgkD3VDsbEhJDrhx/BCxIccbjzXjKdhQFnb/DsVW+GM8qm5LmZgY=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=G8voyw2u; arc=none smtp.client-ip=209.85.221.48
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org
Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-3a522224582so282840f8f.3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 05:29:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=linaro.org; s=google; t=1749040170; x=1749644970; darn=vger.kernel.org;
h=content-transfer-encoding:in-reply-to:organization:autocrypt
:content-language:references:cc:to:subject:reply-to:from:user-agent
:mime-version:date:message-id:from:to:cc:subject:date:message-id
:reply-to;
bh=rlUevRnkRKcLl384cvLF8laETHh3L8+aAG0Z3FSxUTk=;
b=G8voyw2ucePadkaSRs17pdS+esFxGSwCoQ7WwvdU/jDbAEiYmy8A2j0L9us4J4TTt6
kwl2BGgcisj7bQGx/ok+U7hkK6+pYDLpXHm0MTdR9IcO/c785JBamvelVyscVSgJRC8G
+nWv5+TvTX/S4u390QcD8/RHgh79WKxWOgWhZpIinXA0Hwuup2RFFkndgbN2vAH90KcB
+Ix7nglPjjixuXUyl/4NUo4CZXk5LT/kD8+4tk+h2ZUsb+BKRuQE8+obBboZR/T0p0M7
5dnxxOMjb/J/G/BwL/6y/yzr4K+uqw2vy5YYvDxNFbrlCdZMvJ7yGur2PHld7JbyASsk
ASjQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749040170; x=1749644970;
h=content-transfer-encoding:in-reply-to:organization:autocrypt
:content-language:references:cc:to:subject:reply-to:from:user-agent
:mime-version:date:message-id:x-gm-message-state:from:to:cc:subject
:date:message-id:reply-to;
bh=rlUevRnkRKcLl384cvLF8laETHh3L8+aAG0Z3FSxUTk=;
b=PCn/LWGiYDnsRph2hN5oTZa/QiAeKysOEg3FQMaFno6+jVrJwF8UXrtJjAP7hUdIDv
RXvW9IqJZ4lX7jIN6k53AosC9+BARn9VJpHkrSvVio/nAuMx+kz6UynsheJjzxQffyCy
gJYo7l6zFUrrj7d9Pwe9KHB7c1z2LgvDHgas9/wS6O2DRFAjnOVCl9dQ115LdxPWgBsk
96SwL5fHpCojLY5qIRk6Hp6uRLOYZ0HSHX/7N5JmZsjfzGVem4yq4cgLsdbFN7nJ0ceU
VkP7s4TDBf1lH8s9DPps9VDEh/p+aFhc2zdJtYTn5h9sV9JJY3CRUIoKLJjn8wcehtuc
rjeA==
X-Forwarded-Encrypted: i=1; AJvYcCVJ2w4uRg2Q00AML4KOMunXZeHKsAnBFdum0LUhzIrLdmKgbF2KXGmDEE4BSPTddEl0KlUN3Oo3x438XyM=@vger.kernel.org
X-Gm-Message-State: AOJu0YxAfMeS6aMmHb1bv1EuIVoCdzWF/GcXs1dpYCTwjNxMAeg5He34
OpGkO7o3J7lNtRwi7Fda3T/DDCMgjpr3jLYdlSrV6bBhXUUvueJRllsX0dZAHdAuzMQ=
X-Gm-Gg: ASbGncvntsbrfUMNF5UOmzknAvo5PMoBzfcmeQFkIWEUmonZ2fYpb/fiN10tRAFyHgi
zKP/CGfASCZWNBk7bQe4e4qztJsaLpPrzfXECZgMaRekWMEAfQz2RzlhuaWtpgbJ4P2hVVuLWry
0PnrHV9PIxRwZD0VaYTcb6ZyJ7p/GDFLAdn2zBXr+iz5BxGHixzZ8ZH7eVvvJXl85j7BR2hRG44
1mKLyKINhPNS7YJeOlJr5njVsKmueNALbsdmMTzaVrlocPHABxH1ZDqVRYQWPSLpfq1btPzq7AI
O5y3ZAWn5Va4pTfmm6K4fJhr1Gsq82Elwx31QLC6w3wtImAl0F1ceegf3Vhr7cWS6I2lqOwJaYk
vuXmQMVXkPVz3FBVvMsKn7AbJ2Q==
X-Google-Smtp-Source: AGHT+IFAqt37X/nVv/2RwOdCdcs4UXjT/VL/HCTdp4l4p06zsedWg/2pZgay4ZmFeC40lhzrgmbAuw==
X-Received: by 2002:a05:6000:1a8d:b0:3a4:cbc6:9db0 with SMTP id ffacd0b85a97d-3a51dc49afcmr2088240f8f.51.1749040170100;
Wed, 04 Jun 2025 05:29:30 -0700 (PDT)
Received: from ?IPV6:2a01:e0a:3d9:2080:fef9:cf1c:18f:2ab8? ([2a01:e0a:3d9:2080:fef9:cf1c:18f:2ab8])
by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-450d7fb7e41sm194312145e9.26.2025.06.04.05.29.29
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 05:29:29 -0700 (PDT)
Message-ID: <6976052f-a3b8-48b8-97f5-4fea7538e976@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 14:29:29 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
From: neil.armstrong@xxxxxxxxxx
Reply-To: Neil Armstrong <neil.armstrong@xxxxxxxxxx>
Subject: Re: [PATCH 2/2] mailmap: Add a new entry for Manivannan Sadhasivam
To: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>,
bhelgaas@xxxxxxxxxx
Cc: linux-pci@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
linux-arm-msm@xxxxxxxxxxxxxxx
References: <20250604120833.32791-1-manivannan.sadhasivam@xxxxxxxxxx>
<20250604120833.32791-3-manivannan.sadhasivam@xxxxxxxxxx>
Content-Language: en-US, fr
Autocrypt: addr=neil.armstrong@xxxxxxxxxx; keydata=
xsBNBE1ZBs8BCAD78xVLsXPwV/2qQx2FaO/7mhWL0Qodw8UcQJnkrWmgTFRobtTWxuRx8WWP
GTjuhvbleoQ5Cxjr+v+1ARGCH46MxFP5DwauzPekwJUD5QKZlaw/bURTLmS2id5wWi3lqVH4
BVF2WzvGyyeV1o4RTCYDnZ9VLLylJ9bneEaIs/7cjCEbipGGFlfIML3sfqnIvMAxIMZrvcl9
qPV2k+KQ7q+aXavU5W+yLNn7QtXUB530Zlk/d2ETgzQ5FLYYnUDAaRl+8JUTjc0CNOTpCeik
80TZcE6f8M76Xa6yU8VcNko94Ck7iB4vj70q76P/J7kt98hklrr85/3NU3oti3nrIHmHABEB
AAHNKk5laWwgQXJtc3Ryb25nIDxuZWlsLmFybXN0cm9uZ0BsaW5hcm8ub3JnPsLAkQQTAQoA
OwIbIwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgBYhBInsPQWERiF0UPIoSBaat7Gkz/iuBQJk
Q5wSAhkBAAoJEBaat7Gkz/iuyhMIANiD94qDtUTJRfEW6GwXmtKWwl/mvqQtaTtZID2dos04
YqBbshiJbejgVJjy+HODcNUIKBB3PSLaln4ltdsV73SBcwUNdzebfKspAQunCM22Mn6FBIxQ
GizsMLcP/0FX4en9NaKGfK6ZdKK6kN1GR9YffMJd2P08EO8mHowmSRe/ExAODhAs9W7XXExw
UNCY4pVJyRPpEhv373vvff60bHxc1k/FF9WaPscMt7hlkbFLUs85kHtQAmr8pV5Hy9ezsSRa
GzJmiVclkPc2BY592IGBXRDQ38urXeM4nfhhvqA50b/nAEXc6FzqgXqDkEIwR66/Gbp0t3+r
yQzpKRyQif3OwE0ETVkGzwEIALyKDN/OGURaHBVzwjgYq+ZtifvekdrSNl8TIDH8g1xicBYp
QTbPn6bbSZbdvfeQPNCcD4/EhXZuhQXMcoJsQQQnO4vwVULmPGgtGf8PVc7dxKOeta+qUh6+
SRh3vIcAUFHDT3f/Zdspz+e2E0hPV2hiSvICLk11qO6cyJE13zeNFoeY3ggrKY+IzbFomIZY
4yG6xI99NIPEVE9lNBXBKIlewIyVlkOaYvJWSV+p5gdJXOvScNN1epm5YHmf9aE2ZjnqZGoM
Mtsyw18YoX9BqMFInxqYQQ3j/HpVgTSvmo5ea5qQDDUaCsaTf8UeDcwYOtgI8iL4oHcsGtUX
oUk33HEAEQEAAcLAXwQYAQIACQUCTVkGzwIbDAAKCRAWmrexpM/4rrXiB/sGbkQ6itMrAIfn
M7IbRuiSZS1unlySUVYu3SD6YBYnNi3G5EpbwfBNuT3H8//rVvtOFK4OD8cRYkxXRQmTvqa3
3eDIHu/zr1HMKErm+2SD6PO9umRef8V82o2oaCLvf4WeIssFjwB0b6a12opuRP7yo3E3gTCS
KmbUuLv1CtxKQF+fUV1cVaTPMyT25Od+RC1K+iOR0F54oUJvJeq7fUzbn/KdlhA8XPGzwGRy
4zcsPWvwnXgfe5tk680fEKZVwOZKIEuJC3v+/yZpQzDvGYJvbyix0lHnrCzq43WefRHI5XTT
QbM0WUIBIcGmq38+OgUsMYu4NzLu7uZFAcmp6h8g
Organization: Linaro
In-Reply-To: <20250604120833.32791-3-manivannan.sadhasivam@xxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 04/06/2025 14:08, Manivannan Sadhasivam wrote:
Map my Linaro e-mail address is going to bounce soon. So remap it to my
kernel.org alias.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
---
.mailmap | 1 +
1 file changed, 1 insertion(+)
diff --git a/.mailmap b/.mailmap
index a885e2eefc69..1e87b388f41b 100644
--- a/.mailmap
+++ b/.mailmap
@@ -458,6 +458,7 @@ Maheshwar Ajja <quic_majja@xxxxxxxxxxx> <majja@xxxxxxxxxxxxxx>
Malathi Gottam <quic_mgottam@xxxxxxxxxxx> <mgottam@xxxxxxxxxxxxxx>
Manikanta Pubbisetty <quic_mpubbise@xxxxxxxxxxx> <mpubbise@xxxxxxxxxxxxxx>
Manivannan Sadhasivam <mani@xxxxxxxxxx> <manivannanece23@xxxxxxxxx>
+Manivannan Sadhasivam <mani@xxxxxxxxxx> <manivannan.sadhasivam@xxxxxxxxxx>
Manoj Basapathi <quic_manojbm@xxxxxxxxxxx> <manojbm@xxxxxxxxxxxxxx>
Marcin Nowakowski <marcin.nowakowski@xxxxxxxx> <marcin.nowakowski@xxxxxxxxxx>
Marc Zyngier <maz@xxxxxxxxxx> <marc.zyngier@xxxxxxx>
Acked-by: Neil Armstrong <neil.armstrong@xxxxxxxxxx>
Return-Path: <linux-kernel+bounces-673196-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 0C5A741E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:31:15 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 5BA6D1890C15
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:31:28 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 135A928EA67;
Wed, 4 Jun 2025 12:31:07 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="FEnD/5b+"
Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3E0AB8494
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:31:04 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.42
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749040266; cv=none; b=NxkukikU0aVoC9fC/zdrkCaO2l79hfn2f08V5loziYcYs5CBcxLMoIrnB8Tj3DxucM55C8ZzXTFc8TlodeaZ6QwURYDE2Txq5twJ02uzeWH5idxcxz3I296/hUw6G089QcDLaTOYwd4q48u+PuVDxLIaj50bd5qluBO9yzPt2Bo=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749040266; c=relaxed/simple;
bh=WOP/Iq1wBy5gxtloo/z9u4rESYoQrzSQYdvcXAWOV0o=;
h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References:
In-Reply-To:Content-Type; b=E5g5Ua+ZK1brYnJUZA/d155Ft8jgwzj2/B6sfjOTCMfuyZxMgnhxFu0Fe91wHf4ILm2z0yGezeDyRJcvT2NcRftj8+12ETvPHIpA6BeKyhpbj/8ENStl1a+DrXuq7VdrclQJudtRrTUGvPF2DK0iHlXTfRE2hD3VuycRT/1/sDU=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=FEnD/5b+; arc=none smtp.client-ip=209.85.128.42
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org
Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-451d7b50815so28733845e9.2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 05:31:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=linaro.org; s=google; t=1749040262; x=1749645062; darn=vger.kernel.org;
h=content-transfer-encoding:in-reply-to:organization:autocrypt
:content-language:references:cc:to:subject:reply-to:from:user-agent
:mime-version:date:message-id:from:to:cc:subject:date:message-id
:reply-to;
bh=7yj0zlMR49toHUQXpYH0dEn/fkSQomXHurjcyLF6CYY=;
b=FEnD/5b+O2VBqZtZFG7ucwNqSR6w67M0sdAIZd06ZKa1FFw+lluxqE6vMWAqvPc69i
//AGR1wssUZYoDVZtS5IdmW4bLxJm+2aZTut6bIczEPRKaDZoieC9Hz6UZgtop6oqlTg
tmf7rakmIR2rzvtSNnJ2JBUod4Rt3cZQA/vanUGLxPrskfTjog6FOcRfHVpliWKF+oEC
yaVCZMrAJiKlTEUACh0g6FkTfWMajYj7Abh1J5Yz/BGLgzkxUJ8p+vKI5yv6ZJqwlhrJ
0Rv/lL8bpEpVIHZqT1o4JpqCXhWNEnacdPCIfoNtuRiHj0PHOBiyJ/J1Xmp0b5UmB5wY
ZkHw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749040262; x=1749645062;
h=content-transfer-encoding:in-reply-to:organization:autocrypt
:content-language:references:cc:to:subject:reply-to:from:user-agent
:mime-version:date:message-id:x-gm-message-state:from:to:cc:subject
:date:message-id:reply-to;
bh=7yj0zlMR49toHUQXpYH0dEn/fkSQomXHurjcyLF6CYY=;
b=CmrgybtT6XZsabBFSdB2h53+Ae99B5s4+7TOnqO5xWQSq2pTc4wxvCPTDoY5oz5ZgF
F+Akkc3NGyYNYziuP01HS04l1tMPvaEFmI/9owgBqrWMRi8QrUj+fgJD7+kfQTz2KfWL
0H1EAppU81rwhUADTiZNFQFf0MZ9HUlTx8kGdErSAUkkRQnQHLl13F8ETtQYB+yyPolS
mDF+SBLcsPV7M2pFlnF22slEl+ZKmcFhcc5TC1YbmP2/1oz7sa2NF3nM7IkIIi8nHOgq
2P1O1md7sKHF6S2P1VlfkB/9Jw6yHZBaQUOKP1HXUUZY3lY7eLARAufHbfX16g8PeOF0
Nl9Q==
X-Forwarded-Encrypted: i=1; AJvYcCUlDAC1Lq7EjPJWjBW8B7AMoQR4Ty6GrpNXEFWWLryirxaogsikn2itoshScJI2zDeGW8AEYLlIrhiyico=@vger.kernel.org
X-Gm-Message-State: AOJu0YwS7dxMhPZemCThDtp91MZ5qNNbs/xxouDGp32XRwsGpqynmuE7
YnCdKbV1p6C2krshOm8hkA3mQebvzHlYPE5VroKZiwM35+GQ1eCqNNa57i0UC02MbRU=
X-Gm-Gg: ASbGncu3Ov7Iky0LTzMyBI0Nik6438AjTNC9xwe/VZh6bsyJkgWWSGlXrP8FR2aqnKB
3nARtho3LMiThuTrztRbfK8ZW8FENWHBrC7T4UjPGVuG10O5thUyVhGcj+xjFwW3O4JlRSEu2ri
q8/TXoDlWZy8OOnmdZ5SDQjNZXuXFJpSAcyPtkFY1cw9lzM8aRBJLu1ujT5JBB/TJNo9TMJ4Iex
P44wDJO0wfr1Dd6bsCTH42vj3F6xIuKN/RkLxhOt1fjEJPw1JNWRbgl8OKSYNXIgvH23KA80ZnU
hXakJ/gw2UhFISvWq0/XPpdbqCqOrB3GUDh1BikeS0QBZ8lwC4NYMAGENgOAMJcseo76D1pEH2K
3Q3bS/PzudWJfXi9zWZGGqM1BFg==
X-Google-Smtp-Source: AGHT+IHdxMRv0eANYE7IAurtOvGkbnskamym6COdAUNLPO97TgAsV/C0AQYjvjwt6nEMINDfaFGG1w==
X-Received: by 2002:a5d:64e2:0:b0:3a4:e5bc:9892 with SMTP id ffacd0b85a97d-3a51d9305e1mr2186384f8f.21.1749040262472;
Wed, 04 Jun 2025 05:31:02 -0700 (PDT)
Received: from ?IPV6:2a01:e0a:3d9:2080:fef9:cf1c:18f:2ab8? ([2a01:e0a:3d9:2080:fef9:cf1c:18f:2ab8])
by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a4efe5b7a5sm21840554f8f.15.2025.06.04.05.31.01
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 05:31:02 -0700 (PDT)
Message-ID: <8d487a50-c253-4559-87f0-d10b21e31eb5@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 14:31:01 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
From: Neil Armstrong <neil.armstrong@xxxxxxxxxx>
Reply-To: Neil Armstrong <neil.armstrong@xxxxxxxxxx>
Subject: Re: [PATCH v2 3/7] phy: qcom: qmp-combo: introduce QPHY_MODE
To: Udipto Goswami <quic_ugoswami@xxxxxxxxxxx>, Vinod Koul
<vkoul@xxxxxxxxxx>, Kishon Vijay Abraham I <kishon@xxxxxxxxxx>,
Rob Herring <robh@xxxxxxxxxx>, Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>, Bjorn Andersson <andersson@xxxxxxxxxx>,
Konrad Dybcio <konrad.dybcio@xxxxxxxxxx>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@xxxxxxxxxx>
Cc: linux-arm-msm@xxxxxxxxxxxxxxx, linux-phy@xxxxxxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
References: <20240527-topic-sm8x50-upstream-phy-combo-typec-mux-v2-0-a03e68d7b8fc@xxxxxxxxxx>
<20240527-topic-sm8x50-upstream-phy-combo-typec-mux-v2-3-a03e68d7b8fc@xxxxxxxxxx>
<80b21999-f69a-4546-8b8a-2acb59df3fa1@xxxxxxxxxxx>
Content-Language: en-US, fr
Autocrypt: addr=neil.armstrong@xxxxxxxxxx; keydata=
xsBNBE1ZBs8BCAD78xVLsXPwV/2qQx2FaO/7mhWL0Qodw8UcQJnkrWmgTFRobtTWxuRx8WWP
GTjuhvbleoQ5Cxjr+v+1ARGCH46MxFP5DwauzPekwJUD5QKZlaw/bURTLmS2id5wWi3lqVH4
BVF2WzvGyyeV1o4RTCYDnZ9VLLylJ9bneEaIs/7cjCEbipGGFlfIML3sfqnIvMAxIMZrvcl9
qPV2k+KQ7q+aXavU5W+yLNn7QtXUB530Zlk/d2ETgzQ5FLYYnUDAaRl+8JUTjc0CNOTpCeik
80TZcE6f8M76Xa6yU8VcNko94Ck7iB4vj70q76P/J7kt98hklrr85/3NU3oti3nrIHmHABEB
AAHNKk5laWwgQXJtc3Ryb25nIDxuZWlsLmFybXN0cm9uZ0BsaW5hcm8ub3JnPsLAkQQTAQoA
OwIbIwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgBYhBInsPQWERiF0UPIoSBaat7Gkz/iuBQJk
Q5wSAhkBAAoJEBaat7Gkz/iuyhMIANiD94qDtUTJRfEW6GwXmtKWwl/mvqQtaTtZID2dos04
YqBbshiJbejgVJjy+HODcNUIKBB3PSLaln4ltdsV73SBcwUNdzebfKspAQunCM22Mn6FBIxQ
GizsMLcP/0FX4en9NaKGfK6ZdKK6kN1GR9YffMJd2P08EO8mHowmSRe/ExAODhAs9W7XXExw
UNCY4pVJyRPpEhv373vvff60bHxc1k/FF9WaPscMt7hlkbFLUs85kHtQAmr8pV5Hy9ezsSRa
GzJmiVclkPc2BY592IGBXRDQ38urXeM4nfhhvqA50b/nAEXc6FzqgXqDkEIwR66/Gbp0t3+r
yQzpKRyQif3OwE0ETVkGzwEIALyKDN/OGURaHBVzwjgYq+ZtifvekdrSNl8TIDH8g1xicBYp
QTbPn6bbSZbdvfeQPNCcD4/EhXZuhQXMcoJsQQQnO4vwVULmPGgtGf8PVc7dxKOeta+qUh6+
SRh3vIcAUFHDT3f/Zdspz+e2E0hPV2hiSvICLk11qO6cyJE13zeNFoeY3ggrKY+IzbFomIZY
4yG6xI99NIPEVE9lNBXBKIlewIyVlkOaYvJWSV+p5gdJXOvScNN1epm5YHmf9aE2ZjnqZGoM
Mtsyw18YoX9BqMFInxqYQQ3j/HpVgTSvmo5ea5qQDDUaCsaTf8UeDcwYOtgI8iL4oHcsGtUX
oUk33HEAEQEAAcLAXwQYAQIACQUCTVkGzwIbDAAKCRAWmrexpM/4rrXiB/sGbkQ6itMrAIfn
M7IbRuiSZS1unlySUVYu3SD6YBYnNi3G5EpbwfBNuT3H8//rVvtOFK4OD8cRYkxXRQmTvqa3
3eDIHu/zr1HMKErm+2SD6PO9umRef8V82o2oaCLvf4WeIssFjwB0b6a12opuRP7yo3E3gTCS
KmbUuLv1CtxKQF+fUV1cVaTPMyT25Od+RC1K+iOR0F54oUJvJeq7fUzbn/KdlhA8XPGzwGRy
4zcsPWvwnXgfe5tk680fEKZVwOZKIEuJC3v+/yZpQzDvGYJvbyix0lHnrCzq43WefRHI5XTT
QbM0WUIBIcGmq38+OgUsMYu4NzLu7uZFAcmp6h8g
Organization: Linaro
In-Reply-To: <80b21999-f69a-4546-8b8a-2acb59df3fa1@xxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 04/06/2025 13:25, Udipto Goswami wrote:
On 5/27/2024 2:12 PM, Neil Armstrong wrote:
Introduce an enum for the QMP Combo PHY modes, use it in the
QMP commmon phy init function and default to COMBO mode.
Signed-off-by: Neil Armstrong <neil.armstrong@xxxxxxxxxx>
---
drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 41 +++++++++++++++++++++++++++----
1 file changed, 36 insertions(+), 5 deletions(-)
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
index 183cd9cd1884..788e4c05eaf2 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
@@ -61,6 +61,12 @@
#define PHY_INIT_COMPLETE_TIMEOUT 10000
+enum qphy_mode {
+ QPHY_MODE_COMBO = 0,
Hi Neil,
I have a doubt here, shouldn't this be aligned with what typec_altmode has ?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/linux/usb/typec_altmode.h?h=v6.15#n113
This patch marks COMBO mode as 0
when the mux_set when called from pmic_glink_altmode.c
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/soc/qcom/pmic_glink_altmode.c?h=v6.15#n160
the state will start from 2 if i'm not wrong ?
For the similar implmentation I referring to fsa4480.c which seems to be using the enums from typec_altmode.c therefore asking.
Those enums are local to the driver, not related to altmode bits at all,
they represent the 3 possible states of the combo phy.
Neil
Thanks,
-Udipto
+ QPHY_MODE_DP_ONLY,
+ QPHY_MODE_USB_ONLY,
+};
+
/* set of registers with offsets different per-PHY */
enum qphy_reg_layout {
/* PCS registers */
@@ -1503,6 +1509,7 @@ struct qmp_combo {
struct mutex phy_mutex;
int init_count;
+ enum qphy_mode init_mode;
struct phy *usb_phy;
enum phy_mode mode;
@@ -2589,12 +2596,33 @@ static int qmp_combo_com_init(struct qmp_combo *qmp, bool force)
if (qmp->orientation == TYPEC_ORIENTATION_REVERSE)
val |= SW_PORTSELECT_VAL;
writel(val, com + QPHY_V3_DP_COM_TYPEC_CTRL);
- writel(USB3_MODE | DP_MODE, com + QPHY_V3_DP_COM_PHY_MODE_CTRL);
- /* bring both QMP USB and QMP DP PHYs PCS block out of reset */
- qphy_clrbits(com, QPHY_V3_DP_COM_RESET_OVRD_CTRL,
- SW_DPPHY_RESET_MUX | SW_DPPHY_RESET |
- SW_USB3PHY_RESET_MUX | SW_USB3PHY_RESET);
+ switch (qmp->init_mode) {
+ case QPHY_MODE_COMBO:
+ writel(USB3_MODE | DP_MODE, com + QPHY_V3_DP_COM_PHY_MODE_CTRL);
+
+ /* bring both QMP USB and QMP DP PHYs PCS block out of reset */
+ qphy_clrbits(com, QPHY_V3_DP_COM_RESET_OVRD_CTRL,
+ SW_DPPHY_RESET_MUX | SW_DPPHY_RESET |
+ SW_USB3PHY_RESET_MUX | SW_USB3PHY_RESET);
+ break;
+
+ case QPHY_MODE_DP_ONLY:
+ writel(DP_MODE, com + QPHY_V3_DP_COM_PHY_MODE_CTRL);
+
+ /* bring QMP DP PHY PCS block out of reset */
+ qphy_clrbits(com, QPHY_V3_DP_COM_RESET_OVRD_CTRL,
+ SW_DPPHY_RESET_MUX | SW_DPPHY_RESET);
+ break;
+
+ case QPHY_MODE_USB_ONLY:
+ writel(USB3_MODE, com + QPHY_V3_DP_COM_PHY_MODE_CTRL);
+
+ /* bring QMP USB PHY PCS block out of reset */
+ qphy_clrbits(com, QPHY_V3_DP_COM_RESET_OVRD_CTRL,
+ SW_USB3PHY_RESET_MUX | SW_USB3PHY_RESET);
+ break;
+ }
qphy_clrbits(com, QPHY_V3_DP_COM_SWI_CTRL, 0x03);
qphy_clrbits(com, QPHY_V3_DP_COM_SW_RESET, SW_RESET);
@@ -3603,6 +3631,9 @@ static int qmp_combo_probe(struct platform_device *pdev)
if (ret)
goto err_node_put;
+ /* Set PHY_MODE as combo by default */
+ qmp->init_mode = QPHY_MODE_COMBO;
+
qmp->usb_phy = devm_phy_create(dev, usb_np, &qmp_combo_usb_phy_ops);
if (IS_ERR(qmp->usb_phy)) {
ret = PTR_ERR(qmp->usb_phy);
Return-Path: <linux-kernel+bounces-673197-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id B3B1E41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:31:28 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 58EC43A622A
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:31:06 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id B6D8528ECEC;
Wed, 4 Jun 2025 12:31:16 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="DvliSg9D"
Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1EB718494;
Wed, 4 Jun 2025 12:31:13 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749040276; cv=none; b=WbaHVi728mGQyTYeeKMr3tEXeTdjgfySca2tF2pVrvtHGKufUngtwV5fooHNIMVO010LjkBZbAAwO5TWdbp4GggvvwuqtFGOPIW57eTEoKgC71+Ai/QuAaF4GJa+Jy6dmlvDMtlzNW4/q0nNxBtH3yAVaIIOCXRYooZkf80epio=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749040276; c=relaxed/simple;
bh=3a8a3VNtDPC5P7znjUS9D0EHfuwYumd32SWxjdL1tZk=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=bW9SbtdWQtKGFUKI60H1khOX7fDCbN+SinSHi2ypqHbikLLSOIF4/Hcl/RLZ1ytxedYtds91ygjFlF4N0a8AvpTsHjvNUKPiohO1M0cxu/YXTfJRNvAwMLVGdYwuewaK9pFkVLoAfBAXgGKvPkAFb2XRGXSv4veIAs8gPScwloU=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=DvliSg9D; arc=none smtp.client-ip=156.67.10.101
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch;
s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version:
References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject:
Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:
Content-ID:Content-Description:Content-Disposition:In-Reply-To:References;
bh=826RNNo4pLf5DowBri4/2RCK+Kg2Gne6GYyzYhuVGIU=; b=DvliSg9DsB0+0yzG6i6MTfbD9F
qLnL4Z+3badsfgFU8A9QOfj1hK4a1swl277066wiJAm/v2DxDgPJ5wW5oznCwVWizGWaL6tE++JLL
DUDlTGHrqpPWw5Qjn8H0ytmSwsfCc1nB1qgdK/ZFnvS1SdCnw0xVtz+3soskS/24ICLY=;
Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2)
(envelope-from <andrew@xxxxxxx>)
id 1uMnGp-00EgEC-KG; Wed, 04 Jun 2025 14:31:03 +0200
Date: Wed, 4 Jun 2025 14:31:03 +0200
From: Andrew Lunn <andrew@xxxxxxx>
To: "Joseph, Abin" <Abin.Joseph@xxxxxxx>
Cc: "nicolas.ferre@xxxxxxxxxxxxx" <nicolas.ferre@xxxxxxxxxxxxx>,
"claudiu.beznea@xxxxxxxxx" <claudiu.beznea@xxxxxxxxx>,
"andrew+netdev@xxxxxxx" <andrew+netdev@xxxxxxx>,
"davem@xxxxxxxxxxxxx" <davem@xxxxxxxxxxxxx>,
"edumazet@xxxxxxxxxx" <edumazet@xxxxxxxxxx>,
"kuba@xxxxxxxxxx" <kuba@xxxxxxxxxx>,
"pabeni@xxxxxxxxxx" <pabeni@xxxxxxxxxx>,
"git (AMD-Xilinx)" <git@xxxxxxx>,
"netdev@xxxxxxxxxxxxxxx" <netdev@xxxxxxxxxxxxxxx>,
"linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>
Subject: Re: [PATCH net-next] net: macb: Add shutdown operation support
Message-ID: <7a8bf428-1332-44f9-bb59-321989ec2578@xxxxxxx>
References: <20250603152724.3004759-1-abin.joseph@xxxxxxx>
<3f3a9687-1dea-41fb-8567-1186d4fa2df2@xxxxxxx>
<CH3PR12MB9171B307A46A01455DBBA241FC6CA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <CH3PR12MB9171B307A46A01455DBBA241FC6CA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Yes, I tested this on a device which was admin down using "ifconfig eth0 down".
ifconfig has been deprecated for over a decade. I suggest you stop
using it.
I observed that macb_close() is invoked only once, specifically when
the interface is bought down. During the kexec call the shutdown
hook is triggered, but the close() won't be called In this scenario.
Implementations vary quite a bit, so i have no idea what is actually
correct. But my aesthetic sense is calling dev_close() without a
matching dev_open() up is wrong. Please could you expand the commit
message, because i had a look at some other .shutdown functions and
they are careful to not call dev_close() unless the interface is admin
up. Some take, RTNL, some don't. So a good commit message which
explaining why you change is correct would be good.
Andrew
Return-Path: <linux-kernel+bounces-673198-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 12A2141E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:32:27 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 8A7BC7A1A6D
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:31:02 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 9016F28F51D;
Wed, 4 Jun 2025 12:32:10 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="OkAvOxw3"
Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 25A0E4C92;
Wed, 4 Jun 2025 12:32:07 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.65
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749040329; cv=none; b=gEjHodq6p+JRrL5aNBPm1Uw5VlmUMgBvSObBGQa2WSU5hghPX/A2S9dnBCdMDsGTNq0pYch56zLVxki086KF5oK1ziqTpQ4ZPofjTCgWWSlam6e67KEwlAgkTqv8YRPpo/yfyGrcWwAOwFjZT+e1Y6VcaskLYVB6PyWqYXDT6jw=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749040329; c=relaxed/simple;
bh=PSAtI+pLo/Q2Xlq1c9GfZ74wRv6150SmJdXYrUeDBp4=;
h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=brdQEUVdysTx2N2HQVNtmLlNe84ih+yGcW6ncMtmqZUkC8N3sOqgbMSzWs+ZqO/VTs60xTZEpCxS5mBbZUSkkXRdHjHKlcFnmn7GWTdCF6ydsT+fWGNfHJ8jsmc7wDRPXShQki7RRpz+qszgWuloEdh1EdtOEH46EhY+CD2HR1o=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=OkAvOxw3; arc=none smtp.client-ip=209.85.128.65
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
Received: by mail-wm1-f65.google.com with SMTP id 5b1f17b1804b1-442f9043f56so41733455e9.0;
Wed, 04 Jun 2025 05:32:07 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1749040326; x=1749645126; darn=vger.kernel.org;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:from:to:cc:subject:date:message-id:reply-to;
bh=A8kZ/aDiYOkf9h5oCh4UvH8Rt42D9SQNqq0ELvzG+vI=;
b=OkAvOxw31Fm1Tpgm8b8hawEVTETYJtWTo6qeVa9VVujvjX4d2gpCtihp4sOL6b2fFU
ixtv2lXPXikHc1Ys4REP0VIXWNFz8E8MdLD7g/9Kb52pkMU0KbhNJy3coF4YhQvUqEC7
liEfq4DEVhWckKueBfjULTpLkXexeiKzk9cnTjeIJSzK2B1hae8X7d7L75ZTJ+17sUZL
UI1Fi8h4XpKWAXqArCgU1E3P1vuHGyZJpHxTkM5UXRfS8400+4gLy14YRtnZFKo2hrI2
ei7f7ajgoRysb2A3bq8MpTTEGzK8WdFhMOhXqFwvwMwE+5O3AZlHLVpxQDQlkN6v6+BK
pBDA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749040326; x=1749645126;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=A8kZ/aDiYOkf9h5oCh4UvH8Rt42D9SQNqq0ELvzG+vI=;
b=E4zBgFDL6t2pFwFVup0eyVqhi7Z8r9Px9ApRlPoYz4Fx/PBWkjFc5rP9wyQMGoe2AU
zVLUeST4vncP5118CDmZdAMi17KPkdsadQ53LLdZWr8B9kfElRK/LjR1HuUZba3boWsV
cl24JQcd7of8dtRB86e0wMf1MwVe3ATqEnmTBu73UF0NR1K6MN3gagZ4B2c1XelbLhhA
aij17VKHwputM6ZvcSYpjqjhrNpvAy/4MCGvIn87fp1wQp5YDRnHn5YMT4AakKxJxkmJ
0lRcwdKo+pbAY3vZyJCfQxqC7v/HoKmkpsij8OyyZ7sR06xdx7y2ZQIHPEFGMtjGJAXn
g5bw==
X-Forwarded-Encrypted: i=1; AJvYcCV0cZqmUGfep74hg0DC0rjfcahDMQizctHuhOXvUSYpfm1xmd5CCoC9W4iPHwNo7eTovb5WOSqQEQI3gNWasdg=@vger.kernel.org, AJvYcCVG1ittkFYFvdRSvHd4p2z/oIACkbML6NYn6BPUkzHAUuChWH21a/Cb3B+wqHF4hfUkl5ZM3kBI/muJi4B2@xxxxxxxxxxxxxxx, AJvYcCVVyouKx/j6FiM0RylnpsT/81gJ/syHOPirJA7PtH0Y5f8VqeZdmjEuGUJM1hjEhjfYIdT9iuX2oOXSjA==@vger.kernel.org, AJvYcCVbqix9064ZNmnTbxkDDGTX3L6S7IxUtL6Lf4Rc/G6cj/y9+y70/slvYYAXvkVhEnGOti96rbRKcWPw@xxxxxxxxxxxxxxx
X-Gm-Message-State: AOJu0YxrC9Obk49RfpHfWCkij1VjQzFn0IxMBOMjbGqLlz8JH1MNQsJq
GnhjDXmVmxFu6dMx6DMGauL3p7hZ2VAI0g+oK6g8s7ZUVghEneAUGTeu
X-Gm-Gg: ASbGncvA+EGlyGgyfvh4nW18V9cxdEDuBnDQs23HbVkIKu05xzah9hS9jWA7W/CqZKK
IckNY29B38FkDjs3JhbnDoinv+Ue/y2O+v+BSwv+755u5tlEYtYFsww+ob+wb1VhS8L7JjpFr6M
L59f8Gcy2kChR+zz34qelvtO9uGqRaAdklCFjOHjGXUFLCtymMRwlRANJBF1IDUP3QuKqnA4z6r
b1E8SHmx7WF7BchASoR4TsUUVUhrB7WLPq9G513SbH+yJE8GPaVEkECO68+X8zdbpKpwN9HYG3h
SBIw0+gRNrlaHPBDn6pZSnFfQ05Z1ZtusIqffgDy+2YMgEdMeCjI24HpnpYXQGYpfRxeWL5zoXJ
2QTTFO/BXUYIXqd3WdyKQ0xqucHq2
X-Google-Smtp-Source: AGHT+IGdLaFVhNtwtOVwGjagea6FvBR1QsRFelh3QuUgD4knq/vMES6atm6mlno8cGKeqS0tJEseEQ==
X-Received: by 2002:a05:600c:350b:b0:43d:17f1:2640 with SMTP id 5b1f17b1804b1-451f0b209d8mr23102975e9.26.1749040326138;
Wed, 04 Jun 2025 05:32:06 -0700 (PDT)
Received: from igor-korotin-Precision-Tower-3620.airspan.com ([188.39.32.4])
by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-450d8006c21sm194467085e9.33.2025.06.04.05.32.04
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 05:32:05 -0700 (PDT)
From: Igor Korotin <igor.korotin.linux@xxxxxxxxx>
To: Miguel Ojeda <ojeda@xxxxxxxxxx>,
Alex Gaynor <alex.gaynor@xxxxxxxxx>,
Rob Herring <robh@xxxxxxxxxx>,
Saravana Kannan <saravanak@xxxxxxxxxx>,
"Rafael J . Wysocki" <rafael@xxxxxxxxxx>,
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>,
rust-for-linux@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx,
linux-acpi@xxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx
Cc: Boqun Feng <boqun.feng@xxxxxxxxx>,
Gary Guo <gary@xxxxxxxxxxx>,
=?UTF-8?q?Bj=C3=B6rn=20Roy=20Baron?= <bjorn3_gh@xxxxxxxxxxxxxx>,
Benno Lossin <benno.lossin@xxxxxxxxx>,
Andreas Hindborg <a.hindborg@xxxxxxxxxx>,
Alice Ryhl <aliceryhl@xxxxxxxxxx>,
Trevor Gross <tmgross@xxxxxxxxx>,
Danilo Krummrich <dakr@xxxxxxxxxx>,
Len Brown <lenb@xxxxxxxxxx>,
Viresh Kumar <viresh.kumar@xxxxxxxxxx>,
Wedson Almeida Filho <wedsonaf@xxxxxxxxx>,
Alex Hung <alex.hung@xxxxxxx>,
Tamir Duberstein <tamird@xxxxxxxxx>,
FUJITA Tomonori <fujita.tomonori@xxxxxxxxx>,
Xiangfei Ding <dingxiangfei2009@xxxxxxxxx>,
Igor Korotin <igor.korotin.linux@xxxxxxxxx>
Subject: [PATCH v1 0/5] rust: Add ACPI match table support for Rust drivers
Date: Wed, 4 Jun 2025 13:29:39 +0100
Message-ID: <20250604122945.3445776-1-igor.korotin.linux@xxxxxxxxx>
X-Mailer: git-send-email 2.43.0
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
This patch series introduces support for ACPI match tables in Rust
drivers.
Currently, Rust abstractions support only Open Firmware (OF) device
matching. This series extends the driver model to support ACPI-based
matching, enabling Rust drivers to bind to ACPI-described devices.
Changes include:
- A new `acpi::DeviceId` abstraction for working with
`struct acpi_device_id`.
- A helper function `is_of_node()` for determining fwnode types.
- Updates to the core `Adapter` trait and `platform::Driver` to support
optional ACPI ID tables.
- A sample implementation in the Rust platform driver, demonstrating
multi-bus matching.
This is especially useful for writing drivers that work across platforms
using both OF and ACPI.
Tested using QEMU with a custom SSDT that creates an ACPI device matching
the sample Rust platform driver.
Igor Korotin (5):
rust: acpi: add `acpi::DeviceId` abstraction
rust: helpers: Add `is_of_node` helper function
rust: driver: Add ACPI id table support to Adapter trait
rust: platform: Add ACPI match table support to `Driver` trait
samples: rust: add ACPI match table example to platform driver
MAINTAINERS | 2 +
rust/bindings/bindings_helper.h | 1 +
rust/helpers/helpers.c | 1 +
rust/helpers/of.c | 6 +++
rust/kernel/acpi.rs | 62 ++++++++++++++++++++++++++++
rust/kernel/driver.rs | 58 ++++++++++++++++++++++++--
rust/kernel/lib.rs | 1 +
rust/kernel/platform.rs | 17 +++++++-
samples/rust/rust_driver_platform.rs | 41 +++++++++++++++++-
9 files changed, 183 insertions(+), 6 deletions(-)
create mode 100644 rust/helpers/of.c
create mode 100644 rust/kernel/acpi.rs
--
2.43.0
Return-Path: <linux-kernel+bounces-673199-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id A4A4041E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:32:45 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id C061F1894C82
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:32:58 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 1C53828F942;
Wed, 4 Jun 2025 12:32:20 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mJXJo3u9"
Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8D06A28F929;
Wed, 4 Jun 2025 12:32:17 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.67
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749040339; cv=none; b=q5KKbVi/bcKR9ogsuacrSY+494FTtWn+LOVvUa8bRbIHxuBaAr1xoX3jjGqLwnBFXkGszzrf17aG6L3SmzYs1JViW4Jj5XwkAfY2cwmdUT5LW3xLvOv9R0Z6VgJWLTW47fgVfKoMi4lxbQHiEkJC5gmNdXF7sr10Aff+7OJfVQQ=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749040339; c=relaxed/simple;
bh=B6QRYSwoEPKAw0CBU9/MKKr2LpuO0A+Kmwo/HZhwp2c=;
h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version; b=lsxP9qK2HkvAItZFyuDLuUN1htjlpqagCVvuXsSlSDjNJa4/Csb1JvDPymZSAuwEZUQkIYeATgFUMhsqoPHJfkR/nXY6kRJbsvZR1W3a2IFhrJOm8Q9YUNpiZJAmWwxq1FyKFCTAzug9OVpBrzr8XHUh7gNNwMF7+ZzRNIoGJQU=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=mJXJo3u9; arc=none smtp.client-ip=209.85.221.67
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
Received: by mail-wr1-f67.google.com with SMTP id ffacd0b85a97d-3a374f727dbso5912881f8f.0;
Wed, 04 Jun 2025 05:32:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1749040336; x=1749645136; darn=vger.kernel.org;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:from:to:cc:subject:date
:message-id:reply-to;
bh=2F7GrQ5ZHjP6suHBJXzOsQaZFBrj5luNHrI/XyyD2TE=;
b=mJXJo3u9xwPWKoJjPkypG6bn2wAkNiibra0tqugwDYfNAmcFCd1fgwK99W8nNq6OYD
aLuqxLEptG+Xe3bU8G/Nw38tSX/ftpbKGuQY8jQLPhzZpH+YE63zm+buQKbuVS57VIN6
PGTs2V+Ffrt39iLgwUqXtIYsrlphoThcvp2pgmFCaiktua8u6ET9eMjbKZUAR8vXWKQ2
z3t2fac84tKw/D8HYYGiU6Euek8K6gjqD+fKpSznF/OgJIVYSLvFXR1Vy9nBP8OgGkGC
/ZgeJhMcK4eLlD8jGxdvW2ErRqWK+m2AdcPzedTXhOUw5/4IY0EyoQLWWlOkBtMXTx3N
2uqQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749040336; x=1749645136;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=2F7GrQ5ZHjP6suHBJXzOsQaZFBrj5luNHrI/XyyD2TE=;
b=gNVjR96Atpf77y221YLnlA/bZMVIFuhGz67Nd/ck6lmrzK352Jl13UrgFoHBQ6oPVg
iv0wMIt6ZlX/M1PTiVc8MeSo5JYr/uxLCfLQCKo8rXYhCHYDQupUpIwjfF7OqtamyKjY
VZwvCLsogBH8Z3Dm1NkHERctC/qrJD8y9j6Kih7le1TWR7ZlOApiFgz4Kg0ivcWoTDUW
RgXfs+g4wxXwDsrmxFUY/S+45Hr5OpW5XYTSPJdpSdpzumdjY35xGT+dAJeT5VIU7IOx
iqqJENN73nYcpuMhl596DcjqV+hL+J6x+mfjmcCAz3ugIy+1b0tgHCJvqvq70NFU2vKz
hfgQ==
X-Forwarded-Encrypted: i=1; AJvYcCWASuHyDLDxe2pEGlENxegm77Q6kIhBE+CVx4oq41o1Mz3MAP5honUkSQRYJ+eWqCRYpqDWdD54gwRotA==@vger.kernel.org, AJvYcCWMxIZP/RL6AVppQuSUkUHPeZOIs7gLDv02kPfH4ho/ygaRd37CsCv3Clr6tZCi9GAxLLeeT2yH3zwwI1PhJvY=@vger.kernel.org, AJvYcCX+stnmli2CPQH1FF4QdQcJDSL4pduSq3R/MPEjaTAc1e8+L9+59P1nZTdxeQesEBghTZe/oeJYBMumeRYM@xxxxxxxxxxxxxxx, AJvYcCX5DIvw3wr0OSCRSATyXgICo8fmBk9k4t7bCZ9plpr5xuDPKXiTlMasxTyhUe9OBXCc8Gzcsobtrloo@xxxxxxxxxxxxxxx
X-Gm-Message-State: AOJu0Yykt4WGpxXiSaUcyj/4O3dx0XrICD46PApKkHw0mmIAytBeUKml
cPevO6PUG7sD1VU5wOLWwG6o9y6/rkGd1G+LmgJeER/RVLOZv1j6QzvI
X-Gm-Gg: ASbGncsV1lxuFtB776WtLoPZTg2cFC/HhkEgzdC6bUV8W9Wf6dTzeOFQib5aMX3R82Q
orM2KXiGl6vgn5POZLJQ9ES2bfCwG2isST3kggtD6Kb1ksjwksm/ozGlqS2ugl5esVohNaScozq
BcjVYmJk8FxCYTC34Avy4VWipbOoooIhz0zSC6SEwsov0FIAyhK3vsH/2CjYt3m46ERKmdvA3f4
t//PcTAqODt72TmDKiKqz7iKbgd+k+kXsEwsB9OmhA6kvUjJm+Ht1BmXGKjwJavt4QvXGiXRJTf
fZAEziR/20NAyzM17YAg05VxhQZvQVti5NUDOGRzkcP1dHT3tJAx8jYNioLJhgH/jSCxtBwXOKH
S9VOLxsSGaH+ksu5oh91+tED4AxaU
X-Google-Smtp-Source: AGHT+IG/YAHVEgsT0iwtMleHoRoZoKaEfTJVyrwismrWf/GQQyXUTjEX15d+2pC18p8+ckzjRlUlFA==
X-Received: by 2002:a05:6000:2489:b0:3a4:f644:95f0 with SMTP id ffacd0b85a97d-3a51d9791a6mr2036983f8f.54.1749040335466;
Wed, 04 Jun 2025 05:32:15 -0700 (PDT)
Received: from igor-korotin-Precision-Tower-3620.airspan.com ([188.39.32.4])
by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-450d8006c21sm194467085e9.33.2025.06.04.05.32.14
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 05:32:14 -0700 (PDT)
From: Igor Korotin <igor.korotin.linux@xxxxxxxxx>
To: Miguel Ojeda <ojeda@xxxxxxxxxx>,
Alex Gaynor <alex.gaynor@xxxxxxxxx>,
Rob Herring <robh@xxxxxxxxxx>,
Saravana Kannan <saravanak@xxxxxxxxxx>,
"Rafael J . Wysocki" <rafael@xxxxxxxxxx>,
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>,
rust-for-linux@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx,
linux-acpi@xxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx
Cc: Boqun Feng <boqun.feng@xxxxxxxxx>,
Gary Guo <gary@xxxxxxxxxxx>,
=?UTF-8?q?Bj=C3=B6rn=20Roy=20Baron?= <bjorn3_gh@xxxxxxxxxxxxxx>,
Benno Lossin <benno.lossin@xxxxxxxxx>,
Andreas Hindborg <a.hindborg@xxxxxxxxxx>,
Alice Ryhl <aliceryhl@xxxxxxxxxx>,
Trevor Gross <tmgross@xxxxxxxxx>,
Danilo Krummrich <dakr@xxxxxxxxxx>,
Len Brown <lenb@xxxxxxxxxx>,
Viresh Kumar <viresh.kumar@xxxxxxxxxx>,
Wedson Almeida Filho <wedsonaf@xxxxxxxxx>,
Alex Hung <alex.hung@xxxxxxx>,
Tamir Duberstein <tamird@xxxxxxxxx>,
FUJITA Tomonori <fujita.tomonori@xxxxxxxxx>,
Xiangfei Ding <dingxiangfei2009@xxxxxxxxx>,
Igor Korotin <igor.korotin.linux@xxxxxxxxx>
Subject: [PATCH v1 1/5] rust: acpi: add `acpi::DeviceId` abstraction
Date: Wed, 4 Jun 2025 13:29:40 +0100
Message-ID: <20250604122945.3445776-2-igor.korotin.linux@xxxxxxxxx>
X-Mailer: git-send-email 2.43.0
In-Reply-To: <20250604122945.3445776-1-igor.korotin.linux@xxxxxxxxx>
References: <20250604122945.3445776-1-igor.korotin.linux@xxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
`acpi::DeviceId` is an abstraction around `struct acpi_device_id`.
This is used by subsequent patches, in particular the i2c driver
abstractions, to create ACPI device ID tables.
Signed-off-by: Igor Korotin <igor.korotin.linux@xxxxxxxxx>
---
MAINTAINERS | 1 +
rust/kernel/acpi.rs | 62 +++++++++++++++++++++++++++++++++++++++++++++
rust/kernel/lib.rs | 1 +
3 files changed, 64 insertions(+)
create mode 100644 rust/kernel/acpi.rs
diff --git a/MAINTAINERS b/MAINTAINERS
index b659fb27ab63..5f8dfae08454 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -302,6 +302,7 @@ F: include/linux/acpi.h
F: include/linux/fwnode.h
F: include/linux/fw_table.h
F: lib/fw_table.c
+F: rust/kernel/acpi.rs
F: tools/power/acpi/
ACPI APEI
diff --git a/rust/kernel/acpi.rs b/rust/kernel/acpi.rs
new file mode 100644
index 000000000000..2f526a0b2ed9
--- /dev/null
+++ b/rust/kernel/acpi.rs
@@ -0,0 +1,62 @@
+// SPDX-License-Identifier: GPL-2.0
+
+//! Advanced Configuration and Power Interface abstractions.
+
+use crate::{bindings, device_id::RawDeviceId, prelude::*};
+
+/// IdTable type for ACPI drivers.
+pub type IdTable<T> = &'static dyn kernel::device_id::IdTable<DeviceId, T>;
+
+/// An ACPI device id.
+#[repr(transparent)]
+#[derive(Clone, Copy)]
+pub struct DeviceId(bindings::acpi_device_id);
+
+// SAFETY:
+// * `DeviceId` is a `#[repr(transparent)` wrapper of `struct acpi_device_id` and does not add
+// additional invariants, so it's safe to transmute to `RawType`.
+// * `DRIVER_DATA_OFFSET` is the offset to the `data` field.
+unsafe impl RawDeviceId for DeviceId {
+ type RawType = bindings::acpi_device_id;
+
+ const DRIVER_DATA_OFFSET: usize = core::mem::offset_of!(bindings::acpi_device_id, driver_data);
+
+ fn index(&self) -> usize {
+ self.0.driver_data as _
+ }
+}
+
+impl DeviceId {
+ const ACPI_ID_LEN: usize = 16;
+
+ /// Create a new device id from an ACPI 'id' string.
+ pub const fn new(id: &'static CStr) -> Self {
+ assert!(id.len() <= Self::ACPI_ID_LEN, "ID exceeds 16 bytes");
+ let src = id.as_bytes_with_nul();
+ // Replace with `bindings::acpi_device_id::default()` once stabilized for `const`.
+ // SAFETY: FFI type is valid to be zero-initialized.
+ let mut acpi: bindings::acpi_device_id = unsafe { core::mem::zeroed() };
+ let mut i = 0;
+ while i < src.len() {
+ acpi.id[i] = src[i];
+ i += 1;
+ }
+
+ Self(acpi)
+ }
+}
+
+/// Create an ACPI `IdTable` with an "alias" for modpost.
+#[macro_export]
+macro_rules! acpi_device_table {
+ ($table_name:ident, $module_table_name:ident, $id_info_type: ty, $table_data: expr) => {
+ const $table_name: $crate::device_id::IdArray<
+ $crate::acpi::DeviceId,
+ $id_info_type,
+ { $table_data.len() },
+ > = $crate::device_id::IdArray::new($table_data);
+
+ $crate::module_device_table!("acpi", $module_table_name, $table_name);
+ };
+}
+
diff --git a/rust/kernel/lib.rs b/rust/kernel/lib.rs
index 6e9287136cac..c2761bc7cfe6 100644
--- a/rust/kernel/lib.rs
+++ b/rust/kernel/lib.rs
@@ -51,6 +51,7 @@
pub use ffi;
+pub mod acpi;
pub mod alloc;
#[cfg(CONFIG_BLOCK)]
pub mod block;
--
2.43.0
Return-Path: <linux-kernel+bounces-673200-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 4DBD341E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:33:10 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id E11511725FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:32:59 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 3602C28FA85;
Wed, 4 Jun 2025 12:32:22 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="CoA3e9R+"
Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8F4B828F930;
Wed, 4 Jun 2025 12:32:19 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.66
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749040341; cv=none; b=HbDaNxosk/POjzmpHx6WdrrxMgDaYWvnZO+HZClyGPKbZGiV9R+XoFmam0T5QL/yx7I4FHFkvLgAo7IryeU8zB7kuJRSlpezgb0mBnMKpiVlYkcRppPhq9dH0LQw8w8XuSLj4jSPu5/fIZr8yT/Aj2WY8G+p/VaWGtDIEYTGwIs=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749040341; c=relaxed/simple;
bh=pwyfEO34JmMzSrSCOCcsHlL2iqGjz85h0/93mVFh7sA=;
h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version; b=NYZGaslQe9OfejcLN59zvtlwWvN1zU7ZtM92e6bmOBeuee9K87MYdd0BoFxCDVOL9/JjXhH9DbaIsXqPgm9s0jbTmCdwckalTGcdmZ7RdA6r4QAQi/Zf2sY18wGbE1150KMpHtvsEwOPfU+s2ZhMBXbyhNVP7wo3BcvwVbjJ4X8=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=CoA3e9R+; arc=none smtp.client-ip=209.85.128.66
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
Received: by mail-wm1-f66.google.com with SMTP id 5b1f17b1804b1-43edecbfb94so75477125e9.1;
Wed, 04 Jun 2025 05:32:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1749040338; x=1749645138; darn=vger.kernel.org;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:from:to:cc:subject:date
:message-id:reply-to;
bh=b1m1B6nQXZ8mPeTAYsXRWJ8xyXAKXvkl9Kc6auAK6DM=;
b=CoA3e9R+TEMzvDgf+I27IRAgZHMvSdcZP+YupLwIvZ/GS5Mv1rkdTUvotDTjqygKwJ
HRU6L6na4s9knKj+uMCIjMSzSWzevsTi6te13bCaMJWl68FmYuPXJXSVIC8MsXIv0/1N
yCQOg+hR5ya97C7kJpLDx6cYbA8qBRy3Yabr8oQtD9VMWdedgkSYYY7xWmeI1B60HU8b
V0AFWri6grZLWFnG2L9dOmlBIL2soT9RL2NVK7OD2gxi1g7ydCALBJVD+Ks2VAkYhFQq
QjS2hwDJuf4SvpO2XntBdh4jAATTNIEkNXNXZKqkwv62KUG6HMAuXutbdzaYISGk2swK
RmFg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749040338; x=1749645138;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=b1m1B6nQXZ8mPeTAYsXRWJ8xyXAKXvkl9Kc6auAK6DM=;
b=fyCaiyX4xuQKThvZZCUMYSYLhm6IYJdIrUVIylYO3Qsh//EptzniN71d/PyxSrOpb7
OtaVJn0m+5JBltid+kPSm1RQ87UIcFYtWpgF1q0TPLn12xZCANUphEX8+ksgCP4Y46hD
/tSLcx5SL3WBi/Klzbdc9OsCE6JF3wpaVDGaYwDQZY9QL1HZ0cotg6c/FZMdmTk596kG
o4tw4sJDlSeqFSrz81GGJxBb8IoGHIHC1omY3bGDsjueSwwssw4FLk04jcKfzeLPtvvQ
kxGd9TKya3JgFO2ZVHsl+vda/VZk6ZsVQ7kcP4isvh0H39XJ55fv5yjyjh1eotCv0k18
Ilmw==
X-Forwarded-Encrypted: i=1; AJvYcCVFCDtTCXqPsewgs11757CpX50hTGIO7hQhwC+1SPkLZ12qRO6x7fZoEj+2k4BQ864mq8HgvuytoZkh8g==@vger.kernel.org, AJvYcCVq4FBrN9C8z6vC3BnZdUiJZwgEDR/XFoIK6YV71JOBTW3KKUJ38x9KiS7cilHWma65jcsmSdm3ACY/@vger.kernel.org, AJvYcCWXXs/uy+vbGrN3SfBAZ7x8Uy/rlHddxfBURdjNaedjVSGEDE6bEql4SPt5Nq8jE/e5i9VZk+PZJbDyOSQv@xxxxxxxxxxxxxxx, AJvYcCX6juoxa4D51ZYj3axJfDUoiGeUm7hOqs2+oaeBZVad4RNFC7VpB4i2MeVfa/XxknmhrbX2yUDNfWX6t8UIOH4=@vger.kernel.org
X-Gm-Message-State: AOJu0YylFN4eSHSc+MRWvFaIYSGDagTA0pdFsAEmSaXx5+MEeRDJkcxS
24nFWQr24XL/ZCyqyQw32439edhoo+xjLslDho1m4xs2XzoyLy1EcjpZ
X-Gm-Gg: ASbGncs67OJh67JDbq4vQ7EAZ3how2OHC0VR/XiJtkaTsRQVL5T4JxM+jxxcJHMJrfK
UPVHJU3v7gu8zjdW29qZipZlXrPIoc+DnV/PCQAc/fYef3vrcliCjyUAB3WcMTn/AJ3idvc9nHf
vXy+KS4PqLrJE3vxSyNk40T58S7bhI8dxEUVitm5drkYw2FjnFyXcB6d/pV+9tbrWhl9t/of5M5
GG/HJfF2kznRz6RJKLC+V+vIEDCWlulUwCgK6GCTGb24FrKrVw8F3A9fUlv6FG4cNBjOD62owKU
kcw8KtdKdGKKpGrz6N1+mk/gaqsqyR5mEnlIsskp4LUf/3Sn9Fm+R5Ind0zC2RVRtEMJWPn0gMF
t3Mak0Q+ouZmmq+oQm+Y6uVcx4MTE
X-Google-Smtp-Source: AGHT+IHYOI06cvRGt50ykegAltB4i7nq6E7sxnPwIWOb+6NGXuDFwm3fuQ2tv8cYgQ2DY3Jdaf0AXw==
X-Received: by 2002:a05:600c:1e08:b0:441:d438:505c with SMTP id 5b1f17b1804b1-451f0b54b6fmr23276895e9.32.1749040337673;
Wed, 04 Jun 2025 05:32:17 -0700 (PDT)
Received: from igor-korotin-Precision-Tower-3620.airspan.com ([188.39.32.4])
by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-450d8006c21sm194467085e9.33.2025.06.04.05.32.16
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 05:32:16 -0700 (PDT)
From: Igor Korotin <igor.korotin.linux@xxxxxxxxx>
To: Miguel Ojeda <ojeda@xxxxxxxxxx>,
Alex Gaynor <alex.gaynor@xxxxxxxxx>,
Rob Herring <robh@xxxxxxxxxx>,
Saravana Kannan <saravanak@xxxxxxxxxx>,
"Rafael J . Wysocki" <rafael@xxxxxxxxxx>,
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>,
rust-for-linux@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx,
linux-acpi@xxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx
Cc: Boqun Feng <boqun.feng@xxxxxxxxx>,
Gary Guo <gary@xxxxxxxxxxx>,
=?UTF-8?q?Bj=C3=B6rn=20Roy=20Baron?= <bjorn3_gh@xxxxxxxxxxxxxx>,
Benno Lossin <benno.lossin@xxxxxxxxx>,
Andreas Hindborg <a.hindborg@xxxxxxxxxx>,
Alice Ryhl <aliceryhl@xxxxxxxxxx>,
Trevor Gross <tmgross@xxxxxxxxx>,
Danilo Krummrich <dakr@xxxxxxxxxx>,
Len Brown <lenb@xxxxxxxxxx>,
Viresh Kumar <viresh.kumar@xxxxxxxxxx>,
Wedson Almeida Filho <wedsonaf@xxxxxxxxx>,
Alex Hung <alex.hung@xxxxxxx>,
Tamir Duberstein <tamird@xxxxxxxxx>,
FUJITA Tomonori <fujita.tomonori@xxxxxxxxx>,
Xiangfei Ding <dingxiangfei2009@xxxxxxxxx>,
Igor Korotin <igor.korotin.linux@xxxxxxxxx>
Subject: [PATCH v1 2/5] rust: helpers: Add `is_of_node` helper function
Date: Wed, 4 Jun 2025 13:29:41 +0100
Message-ID: <20250604122945.3445776-3-igor.korotin.linux@xxxxxxxxx>
X-Mailer: git-send-email 2.43.0
In-Reply-To: <20250604122945.3445776-1-igor.korotin.linux@xxxxxxxxx>
References: <20250604122945.3445776-1-igor.korotin.linux@xxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Add a helper function to determine whether a given device appears to be
an Open Firmware (OF) node.
This function will be used in Rust driver abstractions to support both
ACPI and OF matching simultaneously in subsequent patches.
Signed-off-by: Igor Korotin <igor.korotin.linux@xxxxxxxxx>
---
MAINTAINERS | 1 +
rust/helpers/helpers.c | 1 +
rust/helpers/of.c | 6 ++++++
3 files changed, 8 insertions(+)
create mode 100644 rust/helpers/of.c
diff --git a/MAINTAINERS b/MAINTAINERS
index 5f8dfae08454..d6cadaa592aa 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -18215,6 +18215,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git
F: Documentation/ABI/testing/sysfs-firmware-ofw
F: drivers/of/
F: include/linux/of*.h
+F: rust/helpers/of.c
F: rust/kernel/of.rs
F: scripts/dtc/
F: tools/testing/selftests/dt/
diff --git a/rust/helpers/helpers.c b/rust/helpers/helpers.c
index 80785b1e7a63..2fc5242aa47a 100644
--- a/rust/helpers/helpers.c
+++ b/rust/helpers/helpers.c
@@ -21,6 +21,7 @@
#include "jump_label.c"
#include "kunit.c"
#include "mutex.c"
+#include "of.c"
#include "page.c"
#include "platform.c"
#include "pci.c"
diff --git a/rust/helpers/of.c b/rust/helpers/of.c
new file mode 100644
index 000000000000..8913eaced716
--- /dev/null
+++ b/rust/helpers/of.c
@@ -0,0 +1,6 @@
+#include <linux/of.h>
+
+bool rust_helper_is_of_node(const struct fwnode_handle *fwnode)
+{
+ return is_of_node(fwnode);
+}
--
2.43.0
Return-Path: <linux-kernel+bounces-673201-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id AFBED41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:33:20 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 5288B3A6093
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:32:56 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 17E1028FAB6;
Wed, 4 Jun 2025 12:32:27 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QKacmE3f"
Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8163628FA9A;
Wed, 4 Jun 2025 12:32:24 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.67
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749040346; cv=none; b=RORpP8aWzPJL0JDr3/y2swEla0C8NOQEuCJhMsV6xirBbTMpjmfczQTVzH08TZ6BzU+ASL/vKs7stZnJSjfD1a6o3fM8vOjJ5AgusE9ze2zRYdWwyW+h5pagnk3Uv9JSEzeW0ffc5LgXbsyEYmuP7jc3ifSHTGFd9vGtV5kfffc=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749040346; c=relaxed/simple;
bh=EKuEJj1hiN5FAUPJllRUOb+XzT5dqu2BT3noUkRJ9Rw=;
h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version; b=RTSrMKbbFDb+l2lv+5UbO5jL0xdf1fgsTlj0vtST8U3qGftEoTcyRgSGz8Kvh0VwEuabtsxBGSJ5dUCKBDbVnyXQYE4wBtJGkd5FE0WXZJ8sm+iFk9iNzXLs9tsNp7d9socNjVNtiHT7q7cRgLnO55OhKVCaJoF6xGXrR0qFH1g=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=QKacmE3f; arc=none smtp.client-ip=209.85.128.67
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
Received: by mail-wm1-f67.google.com with SMTP id 5b1f17b1804b1-450caff6336so42011355e9.3;
Wed, 04 Jun 2025 05:32:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1749040342; x=1749645142; darn=vger.kernel.org;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:from:to:cc:subject:date
:message-id:reply-to;
bh=Zb6n4xN+CaXNZLNAdkRh4qtNOwrRTbDiXvfunUMx5/8=;
b=QKacmE3fBKmoq77l2hVR+i2gvGWOO5Hqq8jpQ/sc8zOZ5xsaDwBhZaz0lhGxS95TSO
VrICSgyQOLiWvN7Sw9OHOG6pMOkAAJv0AZEv0G1oVJgx5jfKvk0Mxa4sxo7dRe9yUfmT
tjRnqlk0bCWzU5UTxHLxZBWJ7Zv1sRuhyI17upTiVuvfpMVPlemy8PBW5SDwyXvVWP7B
8pfMJAPNyz9CPN4jGCBaGpimw6cyowGN9SU+ywXXWCZTdzOvA3SyNF8RzCH8MBdw7EWz
jOQ7aXsFbIjBfDomhNc9r4hppHqAx444VQIAWiM7bDdNtimHGwKtMDTaraiU40VmJqk5
0qzw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749040343; x=1749645143;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=Zb6n4xN+CaXNZLNAdkRh4qtNOwrRTbDiXvfunUMx5/8=;
b=ksElP5p2Pb0PQFkVyeDaIWaXiF1O1lYYwcGKdbcclvcHb8zVdIdWyloPffj4lO6/BY
dG17q8cFnc+LXs/ge4BRxF5DkKURENppwiZ5IrfXtt50n/96EpuN3CbmMF2Ov4eMyj3y
gLtuaLuKME7qF82ovoaC+XkUiMpyFGV55gKFQgkq3jMgsScOed6a5N4lCNGBmWn05knP
ezpjeEy8By/tPtNnx2HFQXD4IKDRGazoKlHaIXVILDKjrkhpDaiuAP4fJVYbI5TFmdPw
gALvu7+2bzAAfa15Jx0GaAiBPXNBIANq0C0aIwmuiL0zcHEcWqF/pSJGt69yO8wM3yhu
RYRQ==
X-Forwarded-Encrypted: i=1; AJvYcCUAWdgzvA14/xwV+zUXdP0j8Pvd4gthI5nQPNwlXMiMiNERoev8X6RLSEhvpUfDjfueZXZVkORozhVVb79T@xxxxxxxxxxxxxxx, AJvYcCULXgIlbgxxlV6rCb4nQehUSYVIY7NECsRrze6vgXPFuxW8UMickqf7v9wf0zG0bUCMQZaezCeg7J5w/XFJUSo=@vger.kernel.org, AJvYcCVg+KOJ2lqEaN6q8S7FjcmjNH7Z1mzI/Ue/r6jU2k2ALVjM4N8KKmKEO66eFb2nA4FUKRfNGG7VBtT6Kg==@vger.kernel.org, AJvYcCWRWpzjH55Y47ixlK5U/ncVR2uOjoy09eK1SItuJxe9jN76JFBkzVbKetM5eGdZil4jfRwahpMfPqDl@xxxxxxxxxxxxxxx
X-Gm-Message-State: AOJu0YwixhAFX+s1mMAPRizzJEtox/EbxIPnJl5Gx1TkLs+WpR4Itlbn
bMnIKNIwKgg+0y+WMAjpCwqyAFL9zaqJaoGStEL8SRmY8lsORJGqKVXj8by9PFWC
X-Gm-Gg: ASbGncuZHUkf6MbKWyU4Vt380mRvwudnFxQ2c3AiiJhvm8UvxON8pNb3qfuuDSftzZh
qNiQZssF6aScWradmO1PrtcSaDlSa5TVc4o5cd6fMFtV/0saUiEIOSlnREd1K8toNbo5xMCis+K
pL+Op3SPY58BiUiLjIrVlTdHmTUfRUpDS1k3XXyv5VOuxD4mIpXoRCa/mjgMLiEVx2JynUIOnyu
WSXfC+YYzFd5NVwTCSQAWsQfBN8qg50pOxS///13CxEMIde6yFNohxY/3CKq0b4kd0Y2k6G1qsr
af2o4mm4U+Cwe3GT+xkp+7rc5XSxORHDa00/BgGtFt0tDzvj7LazkUT+u02zqwh+1NP837Rntb6
LPJYYrleRqb9p08LaLlQFZK5W+HGhuRDuPeZOy5c=
X-Google-Smtp-Source: AGHT+IFhjQKYa6TmqFc5RdnTJpBhC99HefNd12BPqVLoU7t0wxGN1xn/KoXcIxM1eKnDWp8Oj5kJJA==
X-Received: by 2002:a05:600c:4686:b0:43b:ce36:7574 with SMTP id 5b1f17b1804b1-451f0a8a2b9mr21941225e9.11.1749040342334;
Wed, 04 Jun 2025 05:32:22 -0700 (PDT)
Received: from igor-korotin-Precision-Tower-3620.airspan.com ([188.39.32.4])
by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-450d8006c21sm194467085e9.33.2025.06.04.05.32.20
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 05:32:20 -0700 (PDT)
From: Igor Korotin <igor.korotin.linux@xxxxxxxxx>
To: Miguel Ojeda <ojeda@xxxxxxxxxx>,
Alex Gaynor <alex.gaynor@xxxxxxxxx>,
Rob Herring <robh@xxxxxxxxxx>,
Saravana Kannan <saravanak@xxxxxxxxxx>,
"Rafael J . Wysocki" <rafael@xxxxxxxxxx>,
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>,
rust-for-linux@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx,
linux-acpi@xxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx
Cc: Boqun Feng <boqun.feng@xxxxxxxxx>,
Gary Guo <gary@xxxxxxxxxxx>,
=?UTF-8?q?Bj=C3=B6rn=20Roy=20Baron?= <bjorn3_gh@xxxxxxxxxxxxxx>,
Benno Lossin <benno.lossin@xxxxxxxxx>,
Andreas Hindborg <a.hindborg@xxxxxxxxxx>,
Alice Ryhl <aliceryhl@xxxxxxxxxx>,
Trevor Gross <tmgross@xxxxxxxxx>,
Danilo Krummrich <dakr@xxxxxxxxxx>,
Len Brown <lenb@xxxxxxxxxx>,
Viresh Kumar <viresh.kumar@xxxxxxxxxx>,
Wedson Almeida Filho <wedsonaf@xxxxxxxxx>,
Alex Hung <alex.hung@xxxxxxx>,
Tamir Duberstein <tamird@xxxxxxxxx>,
FUJITA Tomonori <fujita.tomonori@xxxxxxxxx>,
Xiangfei Ding <dingxiangfei2009@xxxxxxxxx>,
Igor Korotin <igor.korotin.linux@xxxxxxxxx>
Subject: [PATCH v1 4/5] rust: platform: Add ACPI match table support to `Driver` trait
Date: Wed, 4 Jun 2025 13:29:43 +0100
Message-ID: <20250604122945.3445776-5-igor.korotin.linux@xxxxxxxxx>
X-Mailer: git-send-email 2.43.0
In-Reply-To: <20250604122945.3445776-1-igor.korotin.linux@xxxxxxxxx>
References: <20250604122945.3445776-1-igor.korotin.linux@xxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Extend the `platform::Driver` trait to support ACPI device matching by
adding the `ACPI_ID_TABLE` constant.
This allows Rust platform drivers to define ACPI match tables alongside
their existing OF match tables.
These changes mirror the existing OF support and allow Rust platform
drivers to match devices based on ACPI identifiers.
To avoid breaking compilation, a stub ACPI match table definition is
added to the Rust sample platform driver. Functional support for ACPI
matching in the sample driver will be provided in a follow-up patch.
Signed-off-by: Igor Korotin <igor.korotin.linux@xxxxxxxxx>
---
rust/kernel/platform.rs | 14 ++++++++++++--
samples/rust/rust_driver_platform.rs | 3 ++-
2 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/rust/kernel/platform.rs b/rust/kernel/platform.rs
index 3cc9fe6ccfcf..e6cc878a5a37 100644
--- a/rust/kernel/platform.rs
+++ b/rust/kernel/platform.rs
@@ -39,12 +39,18 @@ unsafe fn register(
None => core::ptr::null(),
};
+ let acpi_table = match T::ACPI_ID_TABLE {
+ Some(table) => table.as_ptr(),
+ None => core::ptr::null(),
+ };
+
// SAFETY: It's safe to set the fields of `struct platform_driver` on initialization.
unsafe {
(*pdrv.get()).driver.name = name.as_char_ptr();
(*pdrv.get()).probe = Some(Self::probe_callback);
(*pdrv.get()).remove = Some(Self::remove_callback);
(*pdrv.get()).driver.of_match_table = of_table;
+ (*pdrv.get()).driver.acpi_match_table = acpi_table;
}
// SAFETY: `pdrv` is guaranteed to be a valid `RegType`.
@@ -98,7 +104,7 @@ fn of_id_table() -> Option<of::IdTable<Self::IdInfo>> {
}
fn acpi_id_table() -> Option<acpi::IdTable<Self::IdInfo>> {
- None
+ T::ACPI_ID_TABLE
}
}
@@ -129,7 +135,7 @@ macro_rules! module_platform_driver {
/// # Example
///
///```
-/// # use kernel::{bindings, c_str, device::Core, of, platform};
+/// # use kernel::{acpi, bindings, c_str, device::Core, of, platform};
///
/// struct MyDriver;
///
@@ -145,6 +151,7 @@ macro_rules! module_platform_driver {
/// impl platform::Driver for MyDriver {
/// type IdInfo = ();
/// const OF_ID_TABLE: Option<of::IdTable<Self::IdInfo>> = Some(&OF_TABLE);
+/// const ACPI_ID_TABLE: Option<acpi::IdTable<Self::IdInfo>> = Some(&ACPI_TABLE);
///
/// fn probe(
/// _pdev: &platform::Device<Core>,
@@ -165,6 +172,9 @@ pub trait Driver: Send {
/// The table of OF device ids supported by the driver.
const OF_ID_TABLE: Option<of::IdTable<Self::IdInfo>>;
+ /// The table of ACPI device ids supported by the driver.
+ const ACPI_ID_TABLE: Option<acpi::IdTable<Self::IdInfo>>;
+
/// Platform driver probe.
///
/// Called when a new platform device is added or discovered.
diff --git a/samples/rust/rust_driver_platform.rs b/samples/rust/rust_driver_platform.rs
index 8b42b3cfb363..e3992e7a71e9 100644
--- a/samples/rust/rust_driver_platform.rs
+++ b/samples/rust/rust_driver_platform.rs
@@ -2,7 +2,7 @@
//! Rust Platform driver sample.
-use kernel::{c_str, device::Core, of, platform, prelude::*, types::ARef};
+use kernel::{acpi, c_str, device::Core, of, platform, prelude::*, types::ARef};
struct SampleDriver {
pdev: ARef<platform::Device>,
@@ -20,6 +20,7 @@ struct SampleDriver {
impl platform::Driver for SampleDriver {
type IdInfo = Info;
const OF_ID_TABLE: Option<of::IdTable<Self::IdInfo>> = Some(&OF_TABLE);
+ const ACPI_ID_TABLE: Option<acpi::IdTable<Self::IdInfo>> = None;
fn probe(
pdev: &platform::Device<Core>,
--
2.43.0
Return-Path: <linux-kernel+bounces-673202-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id F34EB41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:33:35 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 7D7CB3A5FF9
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:33:12 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 84EB728FFCE;
Wed, 4 Jun 2025 12:32:33 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ryATeKJS"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 86C8F1E522;
Wed, 4 Jun 2025 12:32:32 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749040352; cv=none; b=V9sqw3p5LFxM4FWEju28l2eaxknSge99Pxt6rTPQlSzt4Rnc4K27Y2yVuyQBmELGi7Yd1xWbv0tQ35YnzpQhl2S8apPnC0c/hwqhggPG3uQKcyN6WEiy7Tpo/JQ5Dg71ObWzhS+arChqh8ulEA9nCD8BbYLf/QGum6Vpl4gCXQE=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749040352; c=relaxed/simple;
bh=mLZQYCpTNUqM/1tCyZE09oapdxkD7YSl8k8SirzlWtw=;
h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References:
Content-Type:MIME-Version; b=GtbGxLln85l+S7YHkR4+E0RzZxZ7M0PUqpOvSDz/6M4tcUA5ZROp4cYDBZ0DLtXGM4/Px4xP6X1mtzOouU4rcuiofTyRkd+prEOUViIZP0VUFOfXEVQdhBssB4vm0wybTWbewO1kLKWYJkVHhRSqpBEZkiReWvpBViuZHwDJgjc=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ryATeKJS; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1F6DDC4CEE7;
Wed, 4 Jun 2025 12:32:30 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749040352;
bh=mLZQYCpTNUqM/1tCyZE09oapdxkD7YSl8k8SirzlWtw=;
h=Subject:From:To:Cc:Date:In-Reply-To:References:From;
b=ryATeKJSm+Q2F7n9q011EWbhtZQbtrXhNXI0uoZYVIvGrnU+OHf++5oy3xf2ztQMV
D+zzAC4yi/ABKoQJAJlfzfIkGwm4PUsgY4jxsAPKs4Q6XqhIA/F1Tez8970BWBuC9x
P3ro7EX7kZ72259+SiPHDPe93h2U8WE3BzlXEbNrU/tQST5mHxyNZxT9VC1Eb3piu6
ZF0USYLHyRYUyVgjc9RqtLJSDIDvWzvJswWmaR/LElrykAND9tb6FaC2L2KifTaVpL
rGPMhwf/hGxEr1SbSoYB0TQFErECFwZmw1hZJx1Z3yfkuYKRNzQPIvshoc1B9ycSYw
loMFjGtsvJgFA==
Message-ID: <0c0e8c720705d86b37a103346bccc36de4f5b025.camel@xxxxxxxxxx>
Subject: Re: [PATCH v13 0/9] ref_tracker: add ability to register a debugfs
file for a ref_tracker_dir
From: Jeff Layton <jlayton@xxxxxxxxxx>
To: Jakub Kicinski <kuba@xxxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, "David S. Miller"
<davem@xxxxxxxxxxxxx>, Eric Dumazet <edumazet@xxxxxxxxxx>, Paolo Abeni
<pabeni@xxxxxxxxxx>, Simon Horman <horms@xxxxxxxxxx>, Maarten Lankhorst
<maarten.lankhorst@xxxxxxxxxxxxxxx>, Maxime Ripard <mripard@xxxxxxxxxx>,
Thomas Zimmermann <tzimmermann@xxxxxxx>, David Airlie <airlied@xxxxxxxxx>,
Simona Vetter <simona@xxxxxxxx>, Jani Nikula
<jani.nikula@xxxxxxxxxxxxxxx>, Joonas Lahtinen
<joonas.lahtinen@xxxxxxxxxxxxxxx>, Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>,
Tvrtko Ursulin <tursulin@xxxxxxxxxxx>, Krzysztof Karas
<krzysztof.karas@xxxxxxxxx>, Kuniyuki Iwashima <kuniyu@xxxxxxxxxx>, Qasim
Ijaz <qasdev00@xxxxxxxxx>, Nathan Chancellor <nathan@xxxxxxxxxx>, Andrew
Lunn <andrew@xxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx,
netdev@xxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx,
intel-gfx@xxxxxxxxxxxxxxxxxxxxx, Thomas =?ISO-8859-1?Q?Wei=DFschuh?=
<thomas.weissschuh@xxxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 08:32:29 -0400
In-Reply-To: <20250603192949.3a7fc085@xxxxxxxxxx>
References: <20250603-reftrack-dbgfs-v13-0-7b2a425019d8@xxxxxxxxxx>
<20250603192949.3a7fc085@xxxxxxxxxx>
Autocrypt: addr=jlayton@xxxxxxxxxx; prefer-encrypt=mutual;
keydata=mQINBE6V0TwBEADXhJg7s8wFDwBMEvn0qyhAnzFLTOCHooMZyx7XO7dAiIhDSi7G1NPxw
n8jdFUQMCR/GlpozMFlSFiZXiObE7sef9rTtM68ukUyZM4pJ9l0KjQNgDJ6Fr342Htkjxu/kFV1Wv
egyjnSsFt7EGoDjdKqr1TS9syJYFjagYtvWk/UfHlW09X+jOh4vYtfX7iYSx/NfqV3W1D7EDi0PqV
T2h6v8i8YqsATFPwO4nuiTmL6I40ZofxVd+9wdRI4Db8yUNA4ZSP2nqLcLtFjClYRBoJvRWvsv4lm
0OX6MYPtv76hka8lW4mnRmZqqx3UtfHX/hF/zH24Gj7A6sYKYLCU3YrI2Ogiu7/ksKcl7goQjpvtV
YrOOI5VGLHge0awt7bhMCTM9KAfPc+xL/ZxAMVWd3NCk5SamL2cE99UWgtvNOIYU8m6EjTLhsj8sn
VluJH0/RcxEeFbnSaswVChNSGa7mXJrTR22lRL6ZPjdMgS2Km90haWPRc8Wolcz07Y2se0xpGVLEQ
cDEsvv5IMmeMe1/qLZ6NaVkNuL3WOXvxaVT9USW1+/SGipO2IpKJjeDZfehlB/kpfF24+RrK+seQf
CBYyUE8QJpvTZyfUHNYldXlrjO6n5MdOempLqWpfOmcGkwnyNRBR46g/jf8KnPRwXs509yAqDB6sE
LZH+yWr9LQZEwARAQABtCVKZWZmIExheXRvbiA8amxheXRvbkBwb29jaGllcmVkcy5uZXQ+iQI7BB
MBAgAlAhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAUCTpXWPAIZAQAKCRAADmhBGVaCFc65D/4
gBLNMHopQYgG/9RIM3kgFCCQV0pLv0hcg1cjr+bPI5f1PzJoOVi9s0wBDHwp8+vtHgYhM54yt43uI
7Htij0RHFL5eFqoVT4TSfAg2qlvNemJEOY0e4daljjmZM7UtmpGs9NN0r9r50W82eb5Kw5bc/r0km
R/arUS2st+ecRsCnwAOj6HiURwIgfDMHGPtSkoPpu3DDp/cjcYUg3HaOJuTjtGHFH963B+f+hyQ2B
rQZBBE76ErgTDJ2Db9Ey0kw7VEZ4I2nnVUY9B5dE2pJFVO5HJBMp30fUGKvwaKqYCU2iAKxdmJXRI
ONb7dSde8LqZahuunPDMZyMA5+mkQl7kpIpR6kVDIiqmxzRuPeiMP7O2FCUlS2DnJnRVrHmCljLkZ
Wf7ZUA22wJpepBligemtSRSbqCyZ3B48zJ8g5B8xLEntPo/NknSJaYRvfEQqGxgk5kkNWMIMDkfQO
lDSXZvoxqU9wFH/9jTv1/6p8dHeGM0BsbBLMqQaqnWiVt5mG92E1zkOW69LnoozE6Le+12DsNW7Rj
iR5K+27MObjXEYIW7FIvNN/TQ6U1EOsdxwB8o//Yfc3p2QqPr5uS93SDDan5ehH59BnHpguTc27Xi
QQZ9EGiieCUx6Zh2ze3X2UW9YNzE15uKwkkuEIj60NvQRmEDfweYfOfPVOueC+iFifbQgSmVmZiBM
YXl0b24gPGpsYXl0b25AcmVkaGF0LmNvbT6JAjgEEwECACIFAk6V0q0CGwMGCwkIBwMCBhUIAgkKC
wQWAgMBAh4BAheAAAoJEAAOaEEZVoIViKUQALpvsacTMWWOd7SlPFzIYy2/fjvKlfB/Xs4YdNcf9q
LqF+lk2RBUHdR/dGwZpvw/OLmnZ8TryDo2zXVJNWEEUFNc7wQpl3i78r6UU/GUY/RQmOgPhs3epQC
3PMJj4xFx+VuVcf/MXgDDdBUHaCTT793hyBeDbQuciARDJAW24Q1RCmjcwWIV/pgrlFa4lAXsmhoa
c8UPc82Ijrs6ivlTweFf16VBc4nSLX5FB3ls7S5noRhm5/Zsd4PGPgIHgCZcPgkAnU1S/A/rSqf3F
LpU+CbVBDvlVAnOq9gfNF+QiTlOHdZVIe4gEYAU3CUjbleywQqV02BKxPVM0C5/oVjMVx3bri75n1
TkBYGmqAXy9usCkHIsG5CBHmphv9MHmqMZQVsxvCzfnI5IO1+7MoloeeW/lxuyd0pU88dZsV/riHw
87i2GJUJtVlMl5IGBNFpqoNUoqmvRfEMeXhy/kUX4Xc03I1coZIgmwLmCSXwx9MaCPFzV/dOOrju2
xjO+2sYyB5BNtxRqUEyXglpujFZqJxxau7E0eXoYgoY9gtFGsspzFkVNntamVXEWVVgzJJr/EWW0y
+jNd54MfPRqH+eCGuqlnNLktSAVz1MvVRY1dxUltSlDZT7P2bUoMorIPu8p7ZCg9dyX1+9T6Muc5d
Hxf/BBP/ir+3e8JTFQBFOiLNdFtB9KZWZmIExheXRvbiA8amxheXRvbkBzYW1iYS5vcmc+iQI4BBM
BAgAiBQJOldK9AhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRAADmhBGVaCFWgWD/0ZRi4h
N9FK2BdQs9RwNnFZUr7JidAWfCrs37XrA/56olQl3ojn0fQtrP4DbTmCuh0SfMijB24psy1GnkPep
naQ6VRf7Dxg/Y8muZELSOtsv2CKt3/02J1BBitrkkqmHyni5fLLYYg6fub0T/8Kwo1qGPdu1hx2BQ
RERYtQ/S5d/T0cACdlzi6w8rs5f09hU9Tu4qV1JLKmBTgUWKN969HPRkxiojLQziHVyM/weR5Reu6
FZVNuVBGqBD+sfk/c98VJHjsQhYJijcsmgMb1NohAzwrBKcSGKOWJToGEO/1RkIN8tqGnYNp2G+aR
685D0chgTl1WzPRM6mFG1+n2b2RR95DxumKVpwBwdLPoCkI24JkeDJ7lXSe3uFWISstFGt0HL8Eew
P8RuGC8s5h7Ct91HMNQTbjgA+Vi1foWUVXpEintAKgoywaIDlJfTZIl6Ew8ETN/7DLy8bXYgq0Xzh
aKg3CnOUuGQV5/nl4OAX/3jocT5Cz/OtAiNYj5mLPeL5z2ZszjoCAH6caqsF2oLyAnLqRgDgR+wTQ
T6gMhr2IRsl+cp8gPHBwQ4uZMb+X00c/Amm9VfviT+BI7B66cnC7Zv6Gvmtu2rEjWDGWPqUgccB7h
dMKnKDthkA227/82tYoFiFMb/NwtgGrn5n2vwJyKN6SEoygGrNt0SI84y6hEVbQlSmVmZiBMYXl0b
24gPGpsYXl0b25AcHJpbWFyeWRhdGEuY29tPokCOQQTAQIAIwUCU4xmKQIbAwcLCQgHAwIBBhUIAg
kKCwQWAgMBAh4BAheAAAoJEAAOaEEZVoIV1H0P/j4OUTwFd7BBbpoSp695qb6HqCzWMuExsp8nZjr
uymMaeZbGr3OWMNEXRI1FWNHMtcMHWLP/RaDqCJil28proO+PQ/yPhsr2QqJcW4nr91tBrv/MqItu
AXLYlsgXqp4BxLP67bzRJ1Bd2x0bWXurpEXY//VBOLnODqThGEcL7jouwjmnRh9FTKZfBDpFRaEfD
FOXIfAkMKBa/c9TQwRpx2DPsl3eFWVCNuNGKeGsirLqCxUg5kWTxEorROppz9oU4HPicL6rRH22Ce
6nOAON2vHvhkUuO3GbffhrcsPD4DaYup4ic+DxWm+DaSSRJ+e1yJvwi6NmQ9P9UAuLG93S2MdNNbo
sZ9P8k2mTOVKMc+GooI9Ve/vH8unwitwo7ORMVXhJeU6Q0X7zf3SjwDq2lBhn1DSuTsn2DbsNTiDv
qrAaCvbsTsw+SZRwF85eG67eAwouYk+dnKmp1q57LDKMyzysij2oDKbcBlwB/TeX16p8+LxECv51a
sjS9TInnipssssUDrHIvoTTXWcz7Y5wIngxDFwT8rPY3EggzLGfK5Zx2Q5S/N0FfmADmKknG/D8qG
IcJE574D956tiUDKN4I+/g125ORR1v7bP+OIaayAvq17RP+qcAqkxc0x8iCYVCYDouDyNvWPGRhbL
UO7mlBpjW9jK9e2fvZY9iw3QzIPGKtClKZWZmIExheXRvbiA8amVmZi5sYXl0b25AcHJpbWFyeWRh
dGEuY29tPokCOQQTAQIAIwUCU4xmUAIbAwcLCQgHAwIBBhUIAgkKCwQWAgMBAh4BAheAAAoJEAAOa
EEZVoIVzJoQALFCS6n/FHQS+hIzHIb56JbokhK0AFqoLVzLKzrnaeXhE5isWcVg0eoV2oTScIwUSU
apy94if69tnUo4Q7YNt8/6yFM6hwZAxFjOXR0ciGE3Q+Z1zi49Ox51yjGMQGxlakV9ep4sV/d5a50
M+LFTmYSAFp6HY23JN9PkjVJC4PUv5DYRbOZ6Y1+TfXKBAewMVqtwT1Y+LPlfmI8dbbbuUX/kKZ5d
dhV2736fgyfpslvJKYl0YifUOVy4D1G/oSycyHkJG78OvX4JKcf2kKzVvg7/Rnv+AueCfFQ6nGwPn
0P91I7TEOC4XfZ6a1K3uTp4fPPs1Wn75X7K8lzJP/p8lme40uqwAyBjk+IA5VGd+CVRiyJTpGZwA0
jwSYLyXboX+Dqm9pSYzmC9+/AE7lIgpWj+3iNisp1SWtHc4pdtQ5EU2SEz8yKvDbD0lNDbv4ljI7e
flPsvN6vOrxz24mCliEco5DwhpaaSnzWnbAPXhQDWb/lUgs/JNk8dtwmvWnqCwRqElMLVisAbJmC0
BhZ/Ab4sph3EaiZfdXKhiQqSGdK4La3OTJOJYZphPdGgnkvDV9Pl1QZ0ijXQrVIy3zd6VCNaKYq7B
AKidn5g/2Q8oio9Tf4XfdZ9dtwcB+bwDJFgvvDYaZ5bI3ln4V3EyW5i2NfXazz/GA/I/ZtbsigCFc
8ftCBKZWZmIExheXRvbiA8amxheXRvbkBrZXJuZWwub3JnPokCOAQTAQIAIgUCWe8u6AIbAwYLCQg
HAwIGFQgCCQoLBBYCAwECHgECF4AACgkQAA5oQRlWghUuCg/+Lb/xGxZD2Q1oJVAE37uW308UpVSD
2tAMJUvFTdDbfe3zKlPDTuVsyNsALBGclPLagJ5ZTP+Vp2irAN9uwBuacBOTtmOdz4ZN2tdvNgozz
uxp4CHBDVzAslUi2idy+xpsp47DWPxYFIRP3M8QG/aNW052LaPc0cedYxp8+9eiVUNpxF4SiU4i9J
DfX/sn9XcfoVZIxMpCRE750zvJvcCUz9HojsrMQ1NFc7MFT1z3MOW2/RlzPcog7xvR5ENPH19ojRD
CHqumUHRry+RF0lH00clzX/W8OrQJZtoBPXv9ahka/Vp7kEulcBJr1cH5Wz/WprhsIM7U9pse1f1g
Yy9YbXtWctUz8uvDR7shsQxAhX3qO7DilMtuGo1v97I/Kx4gXQ52syh/w6EBny71CZrOgD6kJwPVV
AaM1LRC28muq91WCFhs/nzHozpbzcheyGtMUI2Ao4K6mnY+3zIuXPygZMFr9KXE6fF7HzKxKuZMJO
aEZCiDOq0anx6FmOzs5E6Jqdpo/mtI8beK+BE7Va6ni7YrQlnT0i3vaTVMTiCThbqsB20VrbMjlhp
f8lfK1XVNbRq/R7GZ9zHESlsa35ha60yd/j3pu5hT2xyy8krV8vGhHvnJ1XRMJBAB/UYb6FyC7S+m
QZIQXVeAA+smfTT0tDrisj1U5x6ZB9b3nBg65kc=
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
User-Agent: Evolution 3.56.2 (3.56.2-1.fc42)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Tue, 2025-06-03 at 19:29 -0700, Jakub Kicinski wrote:
On Tue, 03 Jun 2025 07:27:11 -0400 Jeff Layton wrote:
> For those just joining in, this series adds a new top-level
> "ref_tracker" debugfs directory, and has each ref_tracker_dir register =
a
> file in there as part of its initialization. It also adds the ability t=
o
> register a symlink with a more human-usable name that points to the
> file, and does some general cleanup of how the ref_tracker object names
> are handled.
>=20
> This reposting is mostly to address Krzysztof's comments. I've dropped
> the i915 patch, and rebased the rest of the series on top.
>=20
> Note that I still see debugfs: warnings in the i915 driver even when we
> gate the registration of the debugfs file on the classname pointer bein=
g
> NULL. Here is a CI report from v12:
>=20
> https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_148490v8/bat-arl=
s-6/igt@i915_selftest@live@xxxxxxxxxxxxxxxx
>=20
> I think the i915 driver is doing something it shouldn't with these
> objects. They seem to be initialized more than once, which could lead
> to leaked ref_tracker objects. It would be good for one of the i915
> maintainers to comment on whether this is a real problem.
=20
I still see the fs crashes:
https://netdev-3.bots.linux.dev/vmksft-packetdrill-dbg/results/149560/2-t=
cp-slow-start-slow-start-app-limited-pkt/stderr
I'll hide this series from patchwork for now. We will pull from Linus
on Thu, I'll reactivate it and let's see if the problem was already
fixed.
Sorry, I never got any mail about those failures. I would have looked
at that sooner. It looks like the last netns reference can be put in a
rcu callback? That makes sense.
I think ref_tracker_dir_exit() has to remain safe to call from any
context. Perhaps we can defer the dentry deletion to the system_wq?
We can drop this series for now. I'll have to think about this.
Thanks,
--=20
Jeff Layton <jlayton@xxxxxxxxxx>
Return-Path: <linux-kernel+bounces-673204-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 3962141E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:34:19 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 8D8E53A4D0A
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:33:57 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id B9AC628FA86;
Wed, 4 Jun 2025 12:33:16 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b="o1cdBzAc"
Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id D97CE28FA87
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:33:13 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.47
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749040395; cv=none; b=N9uqTHbbuaK3N2bY8DPk/UkG102L3fl0RgoTtEiqnpIf9YioaIX4txWelmeG4SKKoi5Jq5UUlPMaSVhD2DBUwSz9pzl/ZaCn25dqoTmUHXCQRrHEb2kticKrZo+ynj91Qgr+q5oykYB8b36E/ZXvJV5qvIY1wlRw7NxKBvAFesY=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749040395; c=relaxed/simple;
bh=Iet6vLa5JxyIOQRwCEwcG2MBQCOuUEBjVBgpY9LE5gM=;
h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
To:Cc:Content-Type; b=cwigtErQhOm9Hm84vmjCYfUa3s7MfSmluTFUWliRMpg8vrigg4cFU54vlAwoNAKOC20usWx0CwhLsWjd9zjQM4MqJShLr+7tigJTaFXUKPOsEguHYc8MLII+xReYGzx3xRyETz+silBPq6QiuLbYle7PJhn3cr6hU4GpQzEIjxQ=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl; spf=none smtp.mailfrom=bgdev.pl; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b=o1cdBzAc; arc=none smtp.client-ip=209.85.167.47
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl
Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bgdev.pl
Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-55350d0eedeso3216319e87.2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 05:33:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1749040392; x=1749645192; darn=vger.kernel.org;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:from:to:cc:subject:date
:message-id:reply-to;
bh=40H+9TTXhZnTaMd2EZ6HBT4RNOeVTmMt2oQhHbe4EDQ=;
b=o1cdBzAchTp1XJUOFxY3DjPTJ9A3yyk3qLnu/I+xFsRwze3jOsM9Y2EiJzikQg2YzC
mQqeDPmGi+hZQaMNQLnZo6iNooqaJxeEKY/oewV4UNcw+nkxxY7TkCQuT8yC6iUyUj7J
k+R/aDxjoMVRRtZ8+9WoeNZaZb2oaEnfD0UNOxqj2xau7yU1Ba9rm+Dq3Ns2sphCVvuN
hxhFk3x1mT6iW39GdqjIWgSUZkkvNbF0wbw1GUhs/KKFLLOO146tvmJDFY26zo3vnCQk
myCyjxbsHd9kOl8fKuNLvursOzdK/2RiC7yHTskhea91johqzszR66CYQAo+AJtT/tdF
El1w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749040392; x=1749645192;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=40H+9TTXhZnTaMd2EZ6HBT4RNOeVTmMt2oQhHbe4EDQ=;
b=FjKY8Jj9HoTOfXJMeHvamhOw1yAGFBMjYhg462LAkqreuRY/0HPgPPhnhs7sHFMIWl
JqxKEyziipuCPiWvnKfLh+Tn/+C4rbIL4trvOgXio63u8OkMujFdKfR8wRJJwqkURbVv
I4IWzPg/qZKtqBDZmVCcFxxDAbrO/SMbJU1As7vtc+es2oMIe5RIbv/CIaMSkLpTgEo2
Iql80dKZEDNXVkJKPbVy5WULhJDdXtbnTnKMWioaVGnAH4+9r16xdiRSi5yyuzU0nEDl
8UuxkAAeGxGp7PgyLewIVog/+SDdT9B1SkLuP16+HcOSOIOnqQO07xjSMw4oLptKEAxE
BUQQ==
X-Forwarded-Encrypted: i=1; AJvYcCWzo6nIfjIPexHD7Pe1mBalyaM4BZ3VkoaO2qpYptsVKmegKiEzGV+qtaG6/lGxmXruhUsWcXUOrutytvs=@vger.kernel.org
X-Gm-Message-State: AOJu0Yw8GidfeOQJ/1W3awA8tcCT9Spt/wmAGN4I9j2PyjRv1MwzYEhn
28FC3UjPyM0Vm/3//f7eQKmDJAP2TiMFheyASMC+AQaBrjIaHI7bw5EnXRJm0umtvvW4SeTIYVc
QqPSZpEkEQ7jp2sQtIbWe7l9N1cJFMLqNk0ky+r/mAQ==
X-Gm-Gg: ASbGncv6+OYcSe3JKSuvOtlTYzkNK9MEW1DVHPBjtqXlOdFoNOlGeDLQrYu0JUbroCX
LTJ6yeHiK8G9bdEHfHaDqkbKKm21s4oMIkSW9cYyEfPfZph/19tJByhCGFA9JI1FWW2ixY3NNNa
3K+E48Cc7xlS56o1C9HXnCOxU+X9hSyy9NdfAB1IibrAB0ob1mA3TWiHI3qc1iipsC
X-Google-Smtp-Source: AGHT+IFq6pmnr37tc/Op7F/Fey62yojVdrF7s5RRVTPIUfG0sHj3PJlgFBWhtvoFugeUVElYakwUgAd29fPyfsZ3DLg=
X-Received: by 2002:a05:6512:3e20:b0:553:252f:adf8 with SMTP id
2adb3069b0e04-55356ae0e10mr766979e87.9.1749040391631; Wed, 04 Jun 2025
05:33:11 -0700 (PDT)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
References: <20250530-apr_14_for_sending-v3-0-83d5744d997c@xxxxxxxxxxx>
<CGME20250529222408eucas1p20f62cea4c9c64bb5dda6db1fd38fb333@xxxxxxxxxxxxxxxxxxxx>
<20250530-apr_14_for_sending-v3-6-83d5744d997c@xxxxxxxxxxx>
<20250603-gleaming-mammoth-of-kindness-538add@kuoka> <c49ae9f2-3c3c-4253-be85-8fe5bbb4b42e@xxxxxxxxxxx>
In-Reply-To: <c49ae9f2-3c3c-4253-be85-8fe5bbb4b42e@xxxxxxxxxxx>
From: Bartosz Golaszewski <brgl@xxxxxxxx>
Date: Wed, 4 Jun 2025 14:33:00 +0200
X-Gm-Features: AX0GCFuJQtZdn8gggvUkoP6l-v_fzn9vXleutgIfablo4CyL1FqiXWHXgL-Yqpk
Message-ID: <CAMRc=Me75aGMic-GZuqCe+v=8MmmK8DCyfVZj=ELR4VuG-_qDQ@xxxxxxxxxxxxxx>
Subject: Re: [PATCH v3 6/8] riscv: dts: thead: Add GPU power sequencer node
To: Michal Wilczynski <m.wilczynski@xxxxxxxxxxx>
Cc: Krzysztof Kozlowski <krzk@xxxxxxxxxx>, Drew Fustini <drew@xxxxxxxx>, Guo Ren <guoren@xxxxxxxxxx>,
Fu Wei <wefu@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>,
Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>, Frank Binns <frank.binns@xxxxxxxxxx>,
Matt Coster <matt.coster@xxxxxxxxxx>,
Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>, Maxime Ripard <mripard@xxxxxxxxxx>,
Thomas Zimmermann <tzimmermann@xxxxxxx>, David Airlie <airlied@xxxxxxxxx>, Simona Vetter <simona@xxxxxxxx>,
Paul Walmsley <paul.walmsley@xxxxxxxxxx>, Palmer Dabbelt <palmer@xxxxxxxxxxx>,
Albert Ou <aou@xxxxxxxxxxxxxxxxx>, Alexandre Ghiti <alex@xxxxxxxx>,
Ulf Hansson <ulf.hansson@xxxxxxxxxx>, Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>,
linux-riscv@xxxxxxxxxxxxxxxxxxx, devicetree@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-pm@xxxxxxxxxxxxxxx,
dri-devel@xxxxxxxxxxxxxxxxxxxxx
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Tue, Jun 3, 2025 at 8:45=E2=80=AFPM Michal Wilczynski
<m.wilczynski@xxxxxxxxxxx> wrote:
On 6/3/25 15:22, Krzysztof Kozlowski wrote:
> On Fri, May 30, 2025 at 12:23:53AM GMT, Michal Wilczynski wrote:
>> Add the device tree node for the T-HEAD TH1520 GPU power sequencer
>> (gpu_pwrseq) to the th1520.dtsi file.
>>
>> This node instantiates the thead,th1520-gpu-pwrseq driver, which
>
> Explain the hardware, not what drivers do.
>
>> is responsible for managing the GPU's power-on/off sequence. The node
>> specifies the gpu-clkgen reset, which is one of the resources
>> controlled by this sequencer.
>>
>> Signed-off-by: Michal Wilczynski <m.wilczynski@xxxxxxxxxxx>
>> ---
>> arch/riscv/boot/dts/thead/th1520.dtsi | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
>> diff --git a/arch/riscv/boot/dts/thead/th1520.dtsi b/arch/riscv/boot/d=
ts/thead/th1520.dtsi
>> index bdbb1b985b0b76cf669a9bf40c6ec37258329056..6170eec79e919b606a2046=
ac8f52db07e47ef441 100644
>> --- a/arch/riscv/boot/dts/thead/th1520.dtsi
>> +++ b/arch/riscv/boot/dts/thead/th1520.dtsi
>> @@ -238,6 +238,12 @@ aon: aon {
>> #power-domain-cells =3D <1>;
>> };
>>
>> + gpu_pwrseq: pwrseq {
>
> Node names should be generic. See also an explanation and list of
> examples (not exhaustive) in DT specification:
> https://protect2.fireeye.com/v1/url?k=3Da53ea5d3-c4434f50-a53f2e9c-74fe=
48600158-c81092475ef416b3&q=3D1&e=3Dd333d06b-0b06-493e-a358-e29ca542dfe7&u=
=3Dhttps%3A%2F%2Fdevicetree-specification.readthedocs.io%2Fen%2Flatest%2Fch=
apter2-devicetree-basics.html%23generic-names-recommendation
>
>> + compatible =3D "thead,th1520-gpu-pwrseq";
>> + resets =3D <&rst TH1520_RESET_ID_GPU_CLKGEN>;
>> + reset-names =3D "gpu-clkgen";
>
> What is the point of pwrseq if there is no consumer/user of it? Looks
> like simple placeholder and anyway maybe the future consumer should jus=
t
> use reset directly.
Yeah I think you're right, I wanted to explore adding the pwrseq
provider in separate node per discussion in v2 [1]. But for the v4 I
think I'll revert to the v2 way of handling this reset [2].
[1] - https://lore.kernel.org/all/CAPDyKFpi6_CD++a9sbGBvJCuBSQS6YcpNttkRQ=
hQMTWy1yyrRg@xxxxxxxxxxxxxx/
[2] - https://lore.kernel.org/all/20250414-apr_14_for_sending-v2-2-70c5af=
2af96c@xxxxxxxxxxx/
I think you still need to connect the GPU node with its pwrseq
provider (which will be the aon node in this case). But you already
have this link - the aon power domain. You can parse it in the pwrseq
match callback to determine which GPU is powered by which AON module.
Bart
Return-Path: <linux-kernel+bounces-673203-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id CB51641E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:34:36 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 426CB18891FE
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:34:14 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 9869B28F936;
Wed, 4 Jun 2025 12:32:49 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="bCs5mJrp";
dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="BPMAI6WI"
Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 186B228F51A;
Wed, 4 Jun 2025 12:32:46 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.165.32
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749040368; cv=fail; b=dk0TsgHbBIgwglShsYFZVTmd4dl4sGmla03emZiEbt/LKnkSGFaqNgocyRtVVpw/erPyRB49ghUYxmybmeay1syohCyJN5xIiHZDuTapLQXkReFbGv89PJiXAOFP2/I5KQ8AdKevGn8afRALB6fP+/pIreo21OIeqmx6/HumF2M=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749040368; c=relaxed/simple;
bh=2gpClC2EPXwTtmzo1zOTgbCyJrFkGyCkXx17U7Y8Lnw=;
h=Date:From:To:Cc:Subject:Message-ID:References:Content-Type:
Content-Disposition:In-Reply-To:MIME-Version; b=bWfMWv/9OzpPVRhMkTac6HoDOfxFRGUOnXe3rfsSPIEPrCOEPLb99gk97EO8tsoyreAXos/PU364/CESpd5I1sd7SxKHaihmJ4Aek3A+LTbTkYrYJrf6g38/pKrt/a01MEn3mIvghNgEQTTCnD4anmQlv2PHutYe4n+bS8twSvg=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=bCs5mJrp; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=BPMAI6WI; arc=fail smtp.client-ip=205.220.165.32
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com
Received: from pps.filterd (m0246629.ppops.net [127.0.0.1])
by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5549NdSQ018925;
Wed, 4 Jun 2025 12:32:07 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc
:content-type:date:from:in-reply-to:message-id:mime-version
:references:subject:to; s=corp-2025-04-25; bh=2gpClC2EPXwTtmzo1z
OTgbCyJrFkGyCkXx17U7Y8Lnw=; b=bCs5mJrpxuKGKacTXEIwBJkQn6FMCLPsp/
vPqR5scy1vbVUYaBd2A+2n5e8Z6BCtxIfXh+cWUd1djq7bDrzjX4zgR/uB9mlBeF
osQeOGINyHz74qxRLpOdEsc3uajp/9qGKcYOoUWv2JNFKI/gboIiVrCvwTzNRH0W
xq3sNxes7s32j2R0jGYrKsp7rtkkkGpiFKIBcSRa4bxn/G49F3miFqzRV0xioMbR
gArS2j99s1NsO3QTgcSsmbS0Mg5X9umGfjPDy2LQbL+kE18rRg3S4esRxg2I7uBa
x1bI1mAWgrNmBwfg79FH+BnFF7915kyzVen24UzoL+RFz1lVVfXQ==
Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20])
by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 471gwhbr81-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 04 Jun 2025 12:32:07 +0000 (GMT)
Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1])
by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 554AN9m5030676;
Wed, 4 Jun 2025 12:32:06 GMT
Received: from byapr05cu005.outbound.protection.outlook.com (mail-westusazon11010064.outbound.protection.outlook.com [52.101.85.64])
by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 46yr7apw92-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 04 Jun 2025 12:32:06 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=bqxWDVDS5aTspreluUccJKkXIf/N3NBgLpRh6OJVU0diJvFfZ53qbxNzpjfYQzbnMIc+KaDIcMXf4rXzS1TwvsEAw5H3+DrUY2j4qzuW7e+az6qYPnACVeOP25dPctqPvw1sciRIy5RhkICFCGAolVajjTlBR/L5D9KczPktxcaEexNbAFyqT3PafLwTVg7jEn54V0r3AJzDDK8oqPcJoLAuAIF5OjJohi9qwiUaFPz/a6+Fe4ih1u48750zkz8mxZdQ+0sxN7QqHcJh0uRFdypG2IBtHUTyEREx4IG1RJzaDhiJpGv66aZMqI/RqEHMVaZBpumRvU3wvOivKyiX9Q==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=2gpClC2EPXwTtmzo1zOTgbCyJrFkGyCkXx17U7Y8Lnw=;
b=GGShWYv4Jy43SQGiNyrV0kV7gjVusCD7vMSgXam/Vr6RHXXlQnsjgxddD1y1GUgXadmK+A8QDmjp9Zh0jiE3/aK9L18cf3S5UEGMg/GS+DVzqfCAJuagb+rpNYsEE3BINI9yOEArvBC453Tuu6jgaiTNwCoM/sXJuUQjcEGLeiL8j+unVbR/iD0uYLc+0bhRE9RCicCsYho9WBH2m3ZigX5BC/nh0Nkohxkkz4CVozSnR+3BDBlSxDcOlrXjeMzB4D//JBMmRTnHgTh/kEsFhw8CVaIhooKajQje6o6kNMpn8ykV3XDdXIQ44W9FKUURCtQDUoglE6G5Sg2rLBJlVQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com;
dkim=pass header.d=oracle.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=2gpClC2EPXwTtmzo1zOTgbCyJrFkGyCkXx17U7Y8Lnw=;
b=BPMAI6WIBJ8b2onTtron0ImPhhKiY/esrrK6bfvHFLQQjbnLMdEW85oK/KsQudaDUc2PR5xgOr5i8Iwg77VRtnb2Ldg9vq9riK7cUbW8aoBsxEW/WGDirEKXr7guCEH7b8UF45jGgEItyUGgKQBHlEGjaUVUfTxgkChS9AFbqP4=
Received: from DM4PR10MB8218.namprd10.prod.outlook.com (2603:10b6:8:1cc::16)
by CO1PR10MB4737.namprd10.prod.outlook.com (2603:10b6:303:91::17) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8722.29; Wed, 4 Jun
2025 12:32:01 +0000
Received: from DM4PR10MB8218.namprd10.prod.outlook.com
([fe80::2650:55cf:2816:5f2]) by DM4PR10MB8218.namprd10.prod.outlook.com
([fe80::2650:55cf:2816:5f2%6]) with mapi id 15.20.8746.041; Wed, 4 Jun 2025
12:32:01 +0000
Date: Wed, 4 Jun 2025 13:31:59 +0100
From: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>
To: Oscar Salvador <osalvador@xxxxxxx>
Cc: Mike Rapoport <rppt@xxxxxxxxxx>, David Hildenbrand <david@xxxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
Barry Song <baohua@xxxxxxxxxx>,
"Liam R . Howlett" <Liam.Howlett@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>,
Suren Baghdasaryan <surenb@xxxxxxxxxx>, Michal Hocko <mhocko@xxxxxxxx>,
Muchun Song <muchun.song@xxxxxxxxx>,
Huacai Chen <chenhuacai@xxxxxxxxxx>, WANG Xuerui <kernel@xxxxxxxxxx>,
Jonas Bonn <jonas@xxxxxxxxxxxx>,
Stefan Kristiansson <stefan.kristiansson@xxxxxxxxxxxxx>,
Stafford Horne <shorne@xxxxxxxxx>,
Paul Walmsley <paul.walmsley@xxxxxxxxxx>,
Palmer Dabbelt <palmer@xxxxxxxxxxx>, Albert Ou <aou@xxxxxxxxxxxxxxxxx>,
Alexandre Ghiti <alex@xxxxxxxx>, Jann Horn <jannh@xxxxxxxxxx>,
loongarch@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
linux-openrisc@xxxxxxxxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx,
linux-mm@xxxxxxxxx
Subject: Re: [PATCH RESEND] mm/pagewalk: split walk_page_range_novma() into
kernel/user parts
Message-ID: <659ad3c5-138c-473e-81fe-a64772c34e5b@lucifer.local>
References: <20250603192213.182931-1-lorenzo.stoakes@xxxxxxxxxx>
<51ec4269-b132-4163-9cb5-766042a3769d@xxxxxxxxxx>
<aD_-qdg2OvKQIyRg@xxxxxxxxxx>
<d0df9d25-f6c7-46ce-9808-cc92855d6e9d@lucifer.local>
<aEA7kW-D35lDzN2K@localhost.localdomain>
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <aEA7kW-D35lDzN2K@localhost.localdomain>
X-ClientProxiedBy: LO4P123CA0202.GBRP123.PROD.OUTLOOK.COM
(2603:10a6:600:1a5::9) To DM4PR10MB8218.namprd10.prod.outlook.com
(2603:10b6:8:1cc::16)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: DM4PR10MB8218:EE_|CO1PR10MB4737:EE_
X-MS-Office365-Filtering-Correlation-Id: 6767cbef-ccff-4ab3-5ca1-08dda363ce7a
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|7416014|1800799024|376014;
X-Microsoft-Antispam-Message-Info:
=?us-ascii?Q?BwqtNl69D30/KNSICIUSlqnoZ2UWtRV+yfiUuP//uSYsoCxbYzGajssQAgv0?=
=?us-ascii?Q?60qVPLzfIzmIaofAZVLWBRS0vj6mCpPjRG5TVN0fGHrOqPgo+ebsFzEeQJFg?=
=?us-ascii?Q?oF64rWTOJbEmfe3DzeGw0LymJv//aqmUu9Nn+dPIr7eTMtIT3hMJW2rJUnqB?=
=?us-ascii?Q?ZqV80oX/2lz8wOnJsMm1XWlO/lMJvwYU7cPRjm9XAfkU2Lbd4VmsCAw1eZMi?=
=?us-ascii?Q?o9B2koY8s2qqrV2BF1KCL7Is88hlkS0t+aKFIDIihtbMqswnnjVlAk+L1hOp?=
=?us-ascii?Q?SQ/nuxONMkfXlB9y6LAKz9hsbafsW7463AFOdZPLe3XeFaI51zkXD/Os6hc5?=
=?us-ascii?Q?3WwsqI86b3wfSTMwtiFjDcdjBAjkoRqCIFtu+gbrFxp80uFKd0u5SVZEFGPe?=
=?us-ascii?Q?lrmC7sp/6DRg/cavcLiZGeUuhjHeI98XJzbFRMfryMEk3TULns5KZfOHIujI?=
=?us-ascii?Q?JqlZrckasp1X72vlqbvTrrUjueRzSLBUeCKFY6w1V8QygcEnOSv3+cvDa6Xq?=
=?us-ascii?Q?xi62H9rDsjFoGuoXtu5MFvtV4gyPaPXuBfcK3jSovxhV4PMCluLGfevsh4/t?=
=?us-ascii?Q?Xy50Q+Z/x9bx6iyXR7RokCxTAZ9hZeUKDDopnnVgXE97mP71OQ8nkddtnmV0?=
=?us-ascii?Q?lcbG0xhqUlnCn4kJx42BYNdjoF7XiDEFADXpHgFXjN9X2gw4yQtm/GH/D4AB?=
=?us-ascii?Q?5JaXI2PbgEKz4ku0usapEplRHt/5vN6qQFJMMWjZ5olUcn/35p2aiF1HVaAp?=
=?us-ascii?Q?wE2cesZZrDacwBkkdWbJ1YZZvPNH4sj6RRbdCxsBWmKZfTmttuuBVzMT8JhJ?=
=?us-ascii?Q?anuddItgYc5JTEex7+zFI9iLNfhQfoIHG/zJQo1tDKcveUU+KpdRSqwMBgR2?=
=?us-ascii?Q?XgQM5j5QqxHpuuudJn4sBw9S+39xLIlA0uXJ37CiyVjacBDs9/gK2p3Fica9?=
=?us-ascii?Q?PzDULjodJHPpCz/J2jHfkKyv8/tboBkzSEw4joA/RXm1EUqkqejkHoeNNxu6?=
=?us-ascii?Q?9g9pOEK+gJZdc2FImMeYnW8iAUrgCCWV1siIwaTBjIMRVGIaBR4sctPAoxID?=
=?us-ascii?Q?6l5XyKEqvd6soWuae5fd2L1uyXy9ebcVk5zQLnIkrySxInoZ3MF+LsAU91yy?=
=?us-ascii?Q?BbMrSqFzNQyS9AIoll+LD5wSl4tM3KQCDLGZNogpzKTyNUGdaL64YLGQfo4z?=
=?us-ascii?Q?vtJBR1IU04hrmf0k59uLEQpWb8PL8hOncueNZst7sQzGchBY5uOgAAYvB5uQ?=
=?us-ascii?Q?TkaNnDebA+fBVAM5oxhN6EjaJLWdx3/wP2dINIHNXqrfGdr9JtfOCTr1P9Rv?=
=?us-ascii?Q?l/EqnHnomkqLa8mApm6Rm9OFPyO+0tcEE3fvtULKVFec1E/6f122kjPD4fZv?=
=?us-ascii?Q?RIGTfclWaYO5wDJJabPCdDxk4nfLDtCkILJ6b+smLrPDUC75Hhjw/imBPxDg?=
=?us-ascii?Q?R+aLYJp+BBE=3D?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR10MB8218.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(7416014)(1800799024)(376014);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?us-ascii?Q?mODAkP04t0jmrpqLNvWnXnF6GJ7GcdLnma7/8J3WXmO9WLXsWeQxH0iGY48K?=
=?us-ascii?Q?+aWlLDYfmrQL1Yb3BxYoJV6qLw9YCe6QzfDoNidRfUv2ZBgc/+BBWSJW7AmZ?=
=?us-ascii?Q?nSjvNyd9BX9RjpCICIKSdn7koP8Z8yPbsB3fwhn2lPRFmbegWoLxxRTqGK4W?=
=?us-ascii?Q?a266OVv82XFNhmyqAEAgwwsSd5xrvT46ETEXFd+J9klQJBWHt27aon4XOX82?=
=?us-ascii?Q?q0YX1fPQAvJ1oBHLGhNb0vVwtAnIFOXZnk5XDtJ3umQnPUdjexb+6OgA2NGY?=
=?us-ascii?Q?wCEs137QkNZFyXLgtDfuTfOBO1MixZZmk7seJZ7PUz6mMXD63SzYwzKPh5yb?=
=?us-ascii?Q?l8E+YnHJCmu0/85Rw7Q+6KNqYA1h+vjEZ7/gLj/YqrK9/HvJuR9aZSDpeVvS?=
=?us-ascii?Q?mlMiQyXrMQjc2CjeqIkKUSvwZ6N37LgFDLxh/OrDsobRpSZzOia8yjplz+N9?=
=?us-ascii?Q?wjqNPflwGdoRYJ9c9b6ItX3FGE+B1ncOQV5Dj0zmzzcGDoiXLL2U4diyTzrs?=
=?us-ascii?Q?TCyMRHDxIPRdbzviHifibrUcdcYVtGqUYw0aBkz0odTn6lhsp+OnojwW7Lcx?=
=?us-ascii?Q?brgTZid1UVY8XAAEPB90lLHx3tBLtazRwzmmHQUbj7KChY1kOxBNZ+ffOFyU?=
=?us-ascii?Q?whvrL7R02XWBWvcba6H14b4N+vQtEf1wiyjf7rOxT/fz+DLEYgMmRgeqCXnR?=
=?us-ascii?Q?EulUmQKS0/JU+vMGEljaeIWEqU7/pZyhp/LCBQ0FpEp3NIGC+OXgTr2PL5YA?=
=?us-ascii?Q?YrGqCmdeDprC/Zry55CO427SmpOlhu8bW21MENCH4oQ+e+LRjvkd+vv7vG/C?=
=?us-ascii?Q?YSb9jkBAYldTCpPyaWCQq3txwaWSXgW8igG2ek/u2ZUpu9VSJ8vBa3wo8JlT?=
=?us-ascii?Q?piXWVdidHx1q2gigU5V9/sn0LlkhJWi4ynC3vQ5I+6XoPKlIUQT0z/3bZGPf?=
=?us-ascii?Q?yHHF/7lxBBHYGZ+kdCWwWSguYP1NB38IzTOvAUjL/i0E25Z+psPIGy0+Lh3B?=
=?us-ascii?Q?vJTTSLmMx0GVuzlXAX1hWmq6KOR7YCQV/ATZe6WevyDVqIcJQVnzDg94/DkV?=
=?us-ascii?Q?BDiGLqDW2Vy4F+9l2zmGd7HXzi0MeaCVCyabCHAIQKWlzrwCH8w9aRT0vREb?=
=?us-ascii?Q?a6rhj6baiV6CpPpt9z9AkfY7+AkOFvpvK7NLrhYp3iDSsj65hEtCZTeLJWym?=
=?us-ascii?Q?mIvaJemeFhQgeIihiXlT1pMg460B7z1hfKo7PC1nSpHtrGZT4DI77b+MDCcO?=
=?us-ascii?Q?GGYyY2sIfXfUzted3dySQ3dDeBmdvA3SVWI3R9n9oZSm05polsOVR+dDt1In?=
=?us-ascii?Q?n5sfQRiiRBcqvQPTPKle3ontFLC+Yt80pPay6co5xgFfhl/2aYVoTS/rp+Fw?=
=?us-ascii?Q?urSbipfnFG/WzZGHFM5AxqKRdEySFQzHb4+Ti1Wm0SPzoeMqDGdVGjNbjTao?=
=?us-ascii?Q?Vh6/933GhKZgXKuq/lbb0yXmTyxU0wbGmINl8laIrJ7TevE4H0tqSfQoBjj9?=
=?us-ascii?Q?z+6Ero2VOfHFpTmhOerv7BtXMYWlmpD3onGIq6XQdWDW2CmSuey1bU4djfdL?=
=?us-ascii?Q?cXpvukgDQ1KTLM2O7/5HcTOFr0+fYkR+Ejj9sRH95K7d6XbAaQ9wvUHz4yY5?=
=?us-ascii?Q?zg=3D=3D?=
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0:
sHrCzEH3nniGx/kScwhLCRB5hGIJC2y2Rem4X9OGywtoB3zkeCfqH6K2YPcuONXUglSuimfHAfKBi08sv0+rLBCRs2ojqdQSwC6ugDCJ7DOaBbf/fhA5Bx6CcTJIbdUAG5XCAtE7C2tOoeYjgmMmz9lNjwWJXLr4ig/TzcQKtjqJ7/5Te0SeHTRXM0nRJGGnsmLo8dTvSqhkOa4YsFAGKKvGpzeP+C7UiLHweS7JxXmA+aFL2JdZQUaJDu/ASREcT56tSl8WxQG8xhU9fWABdDrwvawLYCDHf41mYQW7jmbaCeOMdCURNvEGrKsEAbBn+LRKWRsJ+JaaKyZV5x9neh5r7oOEfjK5APp8wnmZ8WYx5entUwmHonmpGqfI4e2iM0PhlsHDWOXmLLtnFax57hZT+t8oaDYLCggnvjdCEsyL7j0sqDqNwH9waQJO+0dqd0NhoZ3g8JWJGP5eK63I6CucI8fPhk24Be8j+6I7LK8q6lDAwUP0cg9UxL/sz6d4mBUtePXDZweCqE62r1ESX4ER+sT4nktRYlti0edrAML1fC3kuHY5e1jPzau0oYRci9JKs4qD9fcBBbJXO6AfDV6VFY/CZN1R3TzS+vULQlc=
X-OriginatorOrg: oracle.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 6767cbef-ccff-4ab3-5ca1-08dda363ce7a
X-MS-Exchange-CrossTenant-AuthSource: DM4PR10MB8218.namprd10.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 12:32:01.8461
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: QgSS4NZIIvxtw2LB5X0TGXZUflKacemOC6y6vMPm7RBiMbcSYvgsPr8OKR7IY/e7siM/XoC6aM8GQ1OlTmJ8sM8Rcl6ORy+f3K5Vz4wEdAc=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR10MB4737
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 malwarescore=0
suspectscore=0 phishscore=0 adultscore=0 spamscore=0 mlxlogscore=999
mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1
engine=8.12.0-2505160000 definitions=main-2506040094
X-Authority-Analysis: v=2.4 cv=Wu0rMcfv c=1 sm=1 tr=0 ts=68403cc7 b=1 cx=c_pps a=e1sVV491RgrpLwSTMOnk8w==:117 a=e1sVV491RgrpLwSTMOnk8w==:17 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19
a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=6IFa9wvqVegA:10 a=GoEa3M9JfhUA:10 a=olpZHVVchgdMGqTVwmkA:9 a=CjuIK1q_8ugA:10 cc=ntf awl=host:14714
X-Proofpoint-GUID: M17ffWvFjMMZY1PWV2sSsLBGj8u2UHNP
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDA5NCBTYWx0ZWRfX/ReMgFlEIKlr O6jiOSj4NnIiTdrchLSSClX/Aeeoys3093Sy/Dd32MjR/v30t8dBi8fv3CrZH5idplBWjVbBHwI fI5eOtDgx0JKWiS4A8O5KYZlak7LZCbJARDK2mq73KzX0sbOaGiOtq9yoGBz0OSFLkGef3N0l8a
knBjrEbjVB7pENTAFUiyD1/x0VHOIPY/BB9TahviWpr9jHlUVTtJG55EN+tpqH9g5mjLs1c89JW x6uvMDBgPfz0AjkNx0Y/hiIKyMLcyrHCWbBzoEm+mNhlZoCDUitfdPcPQfjnACZkaf1n7YSKd2J 30rgO+rvZSmaKQHIZyCHmmZp/cXCoUHKW99oFfx/8tcq3kzIgrIwqAgnWVAtWX34QTe/8aIxFfU
2I0aywnzizAsTFd9kLuuVzBdA42xxCoXZxjLlvk/MJq9FUVcCZXEq+SjgyLY+eB9ThNPBQxg
X-Proofpoint-ORIG-GUID: M17ffWvFjMMZY1PWV2sSsLBGj8u2UHNP
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 02:26:57PM +0200, Oscar Salvador wrote:
On Wed, Jun 04, 2025 at 10:09:05AM +0100, Lorenzo Stoakes wrote:
> Nice idea to move to mm/internal.h also :) I like this...
>
> Will fixup on respin
Dumb question but IIUC, walk_page_range_novma() will only be used by
ptdump from now on, so why not stick it into mm/ptdump.c, which is where
the only user of it lives?
There's no such thing as a dumb question :) Even though I have maybe tested
that concept in the past personally ;)
I think mm/internal.h is fine, would be weird to have the declaration in
mm/ptdump.c but implemented elsewhere and obviously we need to keep the
page walking stuff together.
So I think it is best to keep it in internal.h
--
Oscar Salvador
SUSE Labs
Return-Path: <linux-kernel+bounces-673205-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id C7D0141E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:35:34 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id A674D7A5A85
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:33:18 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 96C9028FAAC;
Wed, 4 Jun 2025 12:33:30 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="hsrFCLWI"
Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3CC9728F52F
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:33:27 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.48
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749040409; cv=none; b=k8UTwZaLp+e5i55hVeUk0zdld80AZT9jd0acqZH5z83oJkcKtqhc/R1xy7RYjcgm/hdYGAgk90o2R86ue9+aiW1tmdz4OTbxe8YxC9zjIhM2r3ydPJcY+AeUGhUc7zxwRFo9x36ALAGZyh68U6TqyL2zimzo4PvKe66fdyyFSbs=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749040409; c=relaxed/simple;
bh=V0HyZf2gOux8fh6ZwdvPK3QndkbmomnelOEU2Zv5HCA=;
h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
To:Cc:Content-Type; b=irHH24tevBJyzy3wGdJBEIZKMT96/FoMhkukeiEmWkqjZFsAv7Zb9feaz4bWFb9+OfepRLyragWuhHW/j5zuIR8vwbVzvGFa+SiXkoYZX9N1yFHTM1zSq5FXjTkZpIQUEG7HNO5+hJ/z7llQltBBRGcPraUfPBJqvNQ1gKJx+XY=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=hsrFCLWI; arc=none smtp.client-ip=209.85.208.48
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com
Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-5f438523d6fso8216a12.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 05:33:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=google.com; s=20230601; t=1749040406; x=1749645206; darn=vger.kernel.org;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:from:to:cc:subject:date
:message-id:reply-to;
bh=35jbq/O8qXde5Ngmc6+WbHTRIiZn6TNHGMbDQohlu8w=;
b=hsrFCLWIAOWhebqGyUZPtdQiZWeUYZKwaAtNcpfSAqWeVouWHi0M/5TD2Di9VQCtRP
jdSwt/0xs9eW8OefEDLGLkPwmFfHP7GTABu4L2uz3hpIvnhBgK1EJlVAt0pQhf0n3VA8
NrtqpLE6osBZTi2hIVgt7CQ4DOrl1BJRWqrwLKzxDwmocr8We8G5cV6wSN8ntgrEFvy7
sEuZ6YL4U/5FYU7ELSGlRr23+05RfUqhSYJTyga3RigflH6EFcC1p7Z959GF+5DYR6GD
CTLB3AMhptlavftfwC8J46PwFd80NW75YrtjFLCRQ6c99+rkwV8HDA3WqB3RViFUy/aZ
Tt9Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749040406; x=1749645206;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=35jbq/O8qXde5Ngmc6+WbHTRIiZn6TNHGMbDQohlu8w=;
b=vIa4bh1e1r4L2XotdAfSN8VafNI9kH0Tjx6GR/0TU+sPFEyvdzEHa0yzUTEvlMsWhy
qkxw7CVz3gdx0gmFlpOTS7HYYifUdtFpX6z2kdYSWr+aFNvRtJNR0o54Q0iqOYfWWu5L
Vs3ssy0LATyk7WdWwOtUbIidoVgjG/ZnNEHMDhgEfEnEZuCJ5z3ucK0IQf+6Hfuzto8O
tF6FmQJoCIkYcKR9flwfBjN+l5zIIylaVnFA8Jz8v91jqphRBDpLYz4vEq9C6kWHCtYf
i9sf3eyOPM5QSCOZ3L00NXdlK4+OStZCgptRGWjm5Cg4jv6EoMA3BbPFjjG353ns991K
Fl1g==
X-Forwarded-Encrypted: i=1; AJvYcCUq00uiMR40u7uCYaOWZT6rb3ZALdx7bERlyczjRflepE1Vs6CGQZfl2Xwk30dT4TQN7VqznSqJ+M2BkBA=@vger.kernel.org
X-Gm-Message-State: AOJu0Ywv4joHNwbYieu0+IPKzpIWXGkIgg29cCwr8DvdRgQNZ3bpxSof
mhP1OvtIpi5dDDhTs4a+zDbsLow+2tIGo+s8D1jU+yQv7QL79tsNAoSH+rbEt62KtmuKLVxQjeh
8DQFFr2leEfKhy9kJsejSrqQPQUAsOW9uB0M0zX5d
X-Gm-Gg: ASbGnctwQxmFK8PXlArhzHLk0hEhW9/94cYTGYLDVqP+4oP00weISNyoDvMcjM8DL31
0hMsKbXcMpxMKznydQHP9vgbQWE1Gi7BOOTBxRquacrUQ7hb0VELArcKeRTFNjb1GHgt26EKxPS
7onMO+zaAaIqdJrqZIggU1tsudx+Q8inNUWYDzEJN/elj6D6nRx0pK6G/7Cqr5AimHxjOncA==
X-Google-Smtp-Source: AGHT+IEk7Imp1OmtRA2HzCYp4F71lZI1Ku2lyPIaNKIN7oFD91XLzjJ08tylnHIxk+wRTMTPFlqyiLvnzmyaMN9jvCE=
X-Received: by 2002:a05:6402:1485:b0:607:1323:9c2c with SMTP id
4fb4d7f45d1cf-60713239d19mr4733a12.7.1749040406204; Wed, 04 Jun 2025 05:33:26
-0700 (PDT)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
References: <20250604082449.2029156-1-guanyulin@xxxxxxxxxx> <2025060407-geologic-excuse-9ca5@gregkh>
In-Reply-To: <2025060407-geologic-excuse-9ca5@gregkh>
From: Guan-Yu Lin <guanyulin@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 20:32:00 +0800
X-Gm-Features: AX0GCFt2T0HkBN4LrA4l1V6h8zyLMTF_heB40M61uF7A7sSq23-qzTh9t4bgM-A
Message-ID: <CAOuDEK1471toXVEiNySQtmrRTSPwzo840Q2d5pw9M4fCOfsgTg@xxxxxxxxxxxxxx>
Subject: Re: [PATCH v14 0/4] Support system sleep with offloaded usb transfers
To: Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx>
Cc: mathias.nyman@xxxxxxxxx, gargaditya08@xxxxxxxx, kekrby@xxxxxxxxx,
jeff.johnson@xxxxxxxxxxxxxxxx, quic_zijuhu@xxxxxxxxxxx,
andriy.shevchenko@xxxxxxxxxxxxxxx, ben@xxxxxxxxxxxxxxx, broonie@xxxxxxxxxx,
quic_wcheng@xxxxxxxxxxx, krzysztof.kozlowski@xxxxxxxxxx,
sumit.garg@xxxxxxxxxx, linux-usb@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-11.0 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 4, 2025 at 6:56=E2=80=AFPM Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx>=
wrote:
On Wed, Jun 04, 2025 at 08:23:06AM +0000, Guan-Yu Lin wrote:
Is there a reason you aren't cc:ing the developers from a "big android
device company" that is currently testing and finding problems with this
patchset in their device testing? I will require their signed-off-by or
tested-by in order to even consider accepting this patch series based on
the issues they seem to be finding with it in an
internal-company-bug-reporting-platform that I seem to be also copied
on.
thanks,
greg k-h
I'm not sure if the company wants to reveal its testing right now
since the company raised the problem with the internal system. Hence,
we still use the internal system to communicate with them. We
understand that "signed-off-by"/"tested-by" tags are required to merge
the code, so we'll keep working closely with multiple companies to
achieve this.
Regards,
Guan-Yu
Return-Path: <linux-kernel+bounces-673206-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 13FF641E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:35:42 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 8D16D173B00
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:34:59 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 4FD7028F936;
Wed, 4 Jun 2025 12:34:19 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=technica-engineering.de header.i=@technica-engineering.de header.b="Lwzy8AmT"
Received: from PA4PR04CU001.outbound.protection.outlook.com (mail-francecentralazon11023117.outbound.protection.outlook.com [40.107.162.117])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9594828ECF1;
Wed, 4 Jun 2025 12:34:16 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.162.117
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749040458; cv=fail; b=kq60PM/69cT+8wVP5/LMNT/LA+xXn9VJbOTmKB3w/4QfhWFBrP5HWj6ktaaNLSigoYn26ObFMSNovxfLjkD46PA1DqLdipb+cERiGZ/FRg8d0eeGGx1abSAMRaELuJ9jbkZcDdnlaI7WfaHeyfHIJznyM29FOtdyoqzk0yigVr8=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749040458; c=relaxed/simple;
bh=/zdeBRzQXESFvSukdpEyV6Inv8QSONsFOHxqns46bK4=;
h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=PUjq89aHjO3+AMek0LRsTPi/3VeFZ324UE+TrKS8HSUts088Oz9Z35DPYT7wzOh8s+l/auKvHeeBzSuNuZx2xGeHmOK96gTeSgfpICzlGy1BER9pW1Gr+Qdp/pjPwsSFSEBWhDvF6eINf7FUhqqIIbZIQpyiUjWbkGl+PcJs/kc=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=technica-engineering.de; spf=pass smtp.mailfrom=technica-engineering.de; dkim=pass (1024-bit key) header.d=technica-engineering.de header.i=@technica-engineering.de header.b=Lwzy8AmT; arc=fail smtp.client-ip=40.107.162.117
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=technica-engineering.de
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=technica-engineering.de
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=gfaWMcEFjRBt2gy/Q8pKnjkEtpj/mepGWgeVKxA+IPc+t6GZhQzqkjhwGz/25pUiN/mYcCpRd3LCtEsew+Dw7R7T0iS+dV6DhPBz5YChS1ODyN41Ugn84T124n8GY8CYX4ptYsK1lxRsgd8KAMpFZ106i0oEK5D0MJw2um2nf8CRbOFmdfNwfAxorNze54Xj/IZZhCS+v+pabSkieFkGBJynuTgHqlaz/iKxO33k5wPajrfS7HzpeRNhjoZtDm0dq8ojEVpy/3MMnDgjyv8rgWK83iO9sB1uhq6udRxu5yC8ZgDkR/KXJMQAbVSErl2WqstlOaWMqZBLgbtumrD5Ng==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=V3zTbvcd0itzE+wrkAjTVxk03xkbgKE/Fqu0GZG43dk=;
b=rkDAN1K741CwPuGC/bLmyhCkc6T9FAY2vcT+oMmQ2m0jl0qcJ/K233YnaJ1EZy5lnmJ7N+La5DbrkA1tDv3nPy21BxFyHzmUvZXlw3Of6WNqG6kc/rgYe6HFHnv54gA1K4Jx1a/e/FUP9ACcYxxgcxP5Qxuy8yIZ+4gNIv7nSTPjwWWOkElsJeso7fb6gZmApUjXrOAOjetQJ2PGhJBY84K+byD+tXhT7EytXEuHaPAos7dEluL1ZtioGYxuWNtEhAufcfKQC7zvByR3KcU0RpBQz4SMgzm+RASz2dGKRT66hRP1577pp2FM9xwJyqjmbFwzxg7P5NJL4ic7m6cqOg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is
2.136.200.136) smtp.rcpttodomain=davemloft.net
smtp.mailfrom=technica-engineering.de; dmarc=fail (p=reject sp=reject
pct=100) action=oreject header.from=technica-engineering.de; dkim=none
(message not signed); arc=none (0)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=technica-engineering.de; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=V3zTbvcd0itzE+wrkAjTVxk03xkbgKE/Fqu0GZG43dk=;
b=Lwzy8AmT9gjWR7vl5NaZ2jW0FU/n0pyK2T7Ik8TjvLv6wwj+bD4RPEXBSeWDwrwIHyeJ1e7vebCmx/NC4ipxzZ3v4xB/MxCo93OyE+sojPeVxFbh3inTM9RABQWtKN75d3mwHE4u0RCAejWPP6GB2YsWCS8gJIZGB6oi74o1CPI=
Received: from DU2PR04CA0171.eurprd04.prod.outlook.com (2603:10a6:10:2b0::26)
by VI0PR08MB10488.eurprd08.prod.outlook.com (2603:10a6:800:203::7) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.34; Wed, 4 Jun
2025 12:34:11 +0000
Received: from DU6PEPF00009526.eurprd02.prod.outlook.com
(2603:10a6:10:2b0:cafe::b5) by DU2PR04CA0171.outlook.office365.com
(2603:10a6:10:2b0::26) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8792.19 via Frontend Transport; Wed,
4 Jun 2025 12:34:11 +0000
X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 2.136.200.136)
smtp.mailfrom=technica-engineering.de; dkim=none (message not signed)
header.d=none;dmarc=fail action=oreject header.from=technica-engineering.de;
Received-SPF: Fail (protection.outlook.com: domain of technica-engineering.de
does not designate 2.136.200.136 as permitted sender)
receiver=protection.outlook.com; client-ip=2.136.200.136;
helo=jump.ad.technica-electronics.es;
Received: from jump.ad.technica-electronics.es (2.136.200.136) by
DU6PEPF00009526.mail.protection.outlook.com (10.167.8.7) with Microsoft SMTP
Server id 15.20.8792.29 via Frontend Transport; Wed, 4 Jun 2025 12:34:10
+0000
Received: from dalek.ad.technica-electronics.es (unknown [10.10.2.101])
by jump.ad.technica-electronics.es (Postfix) with ESMTP id 00F0440296;
Wed, 4 Jun 2025 14:34:09 +0200 (CEST)
From: carlos.fernandez@xxxxxxxxxxxxxxxxxxxxxxx
To: andreu.montiel@xxxxxxxxxxxxxxxxxxxxxxx
Cc: carlos.fernandez@xxxxxxxxxxxxxxxxxxxxxxx,
Andreu Montiel <Andreu.Montiel@xxxxxxxxxxxxxxxxxxxxxxx>,
Sabrina Dubroca <sd@xxxxxxxxxxxxxxx>,
Andrew Lunn <andrew+netdev@xxxxxxx>,
"David S. Miller" <davem@xxxxxxxxxxxxx>,
Eric Dumazet <edumazet@xxxxxxxxxx>,
Jakub Kicinski <kuba@xxxxxxxxxx>,
Paolo Abeni <pabeni@xxxxxxxxxx>,
Hannes Frederic Sowa <hannes@xxxxxxxxxxxxxxxxxxx>,
netdev@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
Subject: [PATCH net v3] macsec: MACsec SCI assignment for ES = 0
Date: Wed, 4 Jun 2025 14:33:55 +0200
Message-ID: <20250604123407.2795263-1-carlos.fernandez@xxxxxxxxxxxxxxxxxxxxxxx>
X-Mailer: git-send-email 2.43.0
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-EOPAttributedMessage: 0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: DU6PEPF00009526:EE_|VI0PR08MB10488:EE_
Content-Type: text/plain
X-MS-Office365-Filtering-Correlation-Id: 138a6405-bf99-4e21-b99d-08dda3641b42
X-MS-Exchange-AtpMessageProperties: SA
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam:
BCL:0;ARA:13230040|82310400026|7416014|1800799024|376014|36860700013;
X-Microsoft-Antispam-Message-Info:
=?us-ascii?Q?ewvWkZC95af5RaTJCIF5TPu+rNvDYF9NG3jAjaNko3OPuOAcrNbEytRQy9cc?=
=?us-ascii?Q?/3wezNVyhUJh1PJnhJyTR8Zz4O91btkjNUAY7spEWF0fFyYtCGEKp3SW68Vo?=
=?us-ascii?Q?T5iX8sOUVgrgqTjxpi9cTddCXjHNbl7vveVZyIlGr6+1hTx/TzdGmkuAs2Nm?=
=?us-ascii?Q?6CT83kj8XQY1/NbGBq6uL5MIKKgPwlvZbZJHGBsqoHnyBJ+MAUpWIYSL5uej?=
=?us-ascii?Q?nSQB9V+dkJBMkctrPQ08e3PsxMtsC1tUEZmtE39t4cRDl2akNWN+OKw5KPSK?=
=?us-ascii?Q?HSa7+cI37gdxtROe+sXw1CN7wechW923IBwCelUP2OkxFGOnpXy38Q0TRkT2?=
=?us-ascii?Q?gKfGrG9ekv+ckkyD4dCrEMn04b0o4O4Q08mjEd2nlkeXcOJyFsra6yenGjyN?=
=?us-ascii?Q?oyKqqwtxqauq+6kj5FzA/0a/1ZLDfCFUkDCm/Q2MIVKorbM7d1bLbOfx9Lhq?=
=?us-ascii?Q?mgnDzvH16janjAFKqcb5OBd5EjL52Ze6Z9Uu27j85bnCUU5qsk92Oe4yAtas?=
=?us-ascii?Q?1pYOcqFpBnJ2J0yKDKLCPP8gpljo/9XfLzTyTsBJWR2lLKuFHOIxhWE3g6aO?=
=?us-ascii?Q?9D2AFQe0wP1DmgDEF9WKql7XNH8nTrU2OF6jtLyvoeI7XUsngs9hPmzqxBH/?=
=?us-ascii?Q?ZWX6b8ptO+DxaNEeBJXdNoF/ZbC+DbuAXHBpMmgwI7CAnBCc1bTQXxf/H/LF?=
=?us-ascii?Q?51ipgWLxOBFbI3826mnqe0gcuUbqYIr8si7eaalzok9DjNDO0FFolZJv2E+5?=
=?us-ascii?Q?tLiafn0UgznRVYh2AGf1I3luhSQyGw22Niqdwbyy6P8hroSd5v6VrAoZIbCm?=
=?us-ascii?Q?aOsIeJnsD3xC0KJ0XwiGHz54A3WRcPflrQh86m1IBX9zTV3kePQzROorfuax?=
=?us-ascii?Q?xLjtNhvsxjD9pldAkuzgzwmNH/NsCE2JpsISKg9qsyzoC+R35fx1tz9hH4T9?=
=?us-ascii?Q?w4wlt5ubzoMPB0tXuh+Ls1Y4MxBOpSs483yxYRog4XX/mMHXzZ+vJ/MkHlJf?=
=?us-ascii?Q?jJKtKYmvMlh+cDTDYi+aTwKEfoRFSYoVoL5ryx+rxxsC/9J0iiMC/0kcQruQ?=
=?us-ascii?Q?GHZ+xwk3BRIMEr20UcQ/FUlvSr8piy/7fpQrkMMwtSENIkXAXUipdXehB/r2?=
=?us-ascii?Q?mc5Zn4QFXuzIw1lwaV5xBMfLPqv6zCoxvJZvWxguIP+/Fpa4Ip7HJgjE5foQ?=
=?us-ascii?Q?ZPGpd4D8nNxMxJDu2Yccv+5TFlMrwK0eHxoZ1V/eS/Nb/mSteCKA2d/s0MeS?=
=?us-ascii?Q?hN2fBxM56IYQYkj01ebC1lpXnKppDyDS6K1QAzAPur/VR8ZnLBxm1rgaDyU9?=
=?us-ascii?Q?nvgCTN8EBD88rxp9Rpl9RAaNpxcZirXu+5lr48GHW5987cm7geJQ2UtHdp/C?=
=?us-ascii?Q?aVd6jkhcb84ZEsOmd1TSC8TnRPvZq2q/XjrUNjo7IkTlcoyaPt1HLZBIT0JN?=
=?us-ascii?Q?G6l7XkVlqPz0zuZY7iENXFqadE0MjhNHojNmlmxYA6by2HMn+hLnE8oXFngk?=
=?us-ascii?Q?c0Bqc7M/KkNSnbY7j5VBYrIeavo+rUxfNnKd574NxHhDgguKSAAVPfMkoA?=
=?us-ascii?Q?=3D=3D?=
X-Forefront-Antispam-Report:
CIP:2.136.200.136;CTRY:ES;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:jump.ad.technica-electronics.es;PTR:136.red-2-136-200.staticip.rima-tde.net;CAT:NONE;SFS:(13230040)(82310400026)(7416014)(1800799024)(376014)(36860700013);DIR:OUT;SFP:1102;
X-OriginatorOrg: technica-engineering.de
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 12:34:10.4619
(UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: 138a6405-bf99-4e21-b99d-08dda3641b42
X-MS-Exchange-CrossTenant-Id: 1f04372a-6892-44e3-8f58-03845e1a70c1
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=1f04372a-6892-44e3-8f58-03845e1a70c1;Ip=[2.136.200.136];Helo=[jump.ad.technica-electronics.es]
X-MS-Exchange-CrossTenant-AuthSource:
DU6PEPF00009526.eurprd02.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI0PR08MB10488
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
From: Carlos Fernandez <carlos.fernandez@xxxxxxxxxxxxxxxxxxxxxxx>
According to 802.1AE standard, when ES and SC flags in TCI are zero,
used SCI should be the current active SC_RX. Current code uses the
header MAC address. Without this patch, when ES flag is 0 (using a
bridge or switch), header MAC will not fit the SCI and MACSec frames
will be discarted.
Fixes: c09440f7dcb3 ("macsec: introduce IEEE 802.1AE driver")
Co-developed-by: Andreu Montiel <Andreu.Montiel@xxxxxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Andreu Montiel <Andreu.Montiel@xxxxxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Carlos Fernandez <carlos.fernandez@xxxxxxxxxxxxxxxxxxxxxxx>
---
v3:
* Wrong drop frame afer macsec_frame_sci
* Wrong Fixes tag in message
v2: https://patchwork.kernel.org/project/netdevbpf/patch/20250604113213.2595524-1-carlos.fernandez@xxxxxxxxxxxxxxxxxxxxxxx/
* Active sci lookup logic in a separate helper.
* Unnecessary loops avoided.
* Check RXSC is exactly one for lower device.
* Drops frame in case of error.
v1: https://patchwork.kernel.org/project/netdevbpf/patch/20250529124455.2761783-1-carlos.fernandez@xxxxxxxxxxxxxxxxxxxxxxx/
drivers/net/macsec.c | 40 ++++++++++++++++++++++++++++++++++------
1 file changed, 34 insertions(+), 6 deletions(-)
diff --git a/drivers/net/macsec.c b/drivers/net/macsec.c
index 3d315e30ee47..7edbe76b5455 100644
--- a/drivers/net/macsec.c
+++ b/drivers/net/macsec.c
@@ -247,15 +247,39 @@ static sci_t make_sci(const u8 *addr, __be16 port)
return sci;
}
-static sci_t macsec_frame_sci(struct macsec_eth_header *hdr, bool sci_present)
+static sci_t macsec_active_sci(struct macsec_secy *secy)
{
- sci_t sci;
+ struct macsec_rx_sc *rx_sc = rcu_dereference_bh(secy->rx_sc);
+
+ /* Case single RX SC */
+ if (rx_sc && !rcu_dereference_bh(rx_sc->next))
+ return (rx_sc->active) ? rx_sc->sci : 0;
+ /* Case no RX SC or multiple */
+ else
+ return 0;
+}
+
+static sci_t macsec_frame_sci(struct macsec_eth_header *hdr, bool sci_present,
+ struct macsec_rxh_data *rxd)
+{
+ struct macsec_dev *macsec;
+ sci_t sci = 0;
- if (sci_present)
+ /* SC = 1 */
+ if (sci_present) {
memcpy(&sci, hdr->secure_channel_id,
sizeof(hdr->secure_channel_id));
- else
+ /* SC = 0; ES = 0 */
+ } else if ((!(hdr->tci_an & (MACSEC_TCI_ES | MACSEC_TCI_SC))) &&
+ (list_is_singular(&rxd->secys))) {
+ /* Only one SECY should exist on this scenario */
+ macsec = list_first_or_null_rcu(&rxd->secys, struct macsec_dev,
+ secys);
+ if (macsec)
+ return macsec_active_sci(&macsec->secy);
+ } else {
sci = make_sci(hdr->eth.h_source, MACSEC_PORT_ES);
+ }
return sci;
}
@@ -1109,7 +1133,7 @@ static rx_handler_result_t macsec_handle_frame(struct sk_buff **pskb)
struct macsec_rxh_data *rxd;
struct macsec_dev *macsec;
unsigned int len;
- sci_t sci;
+ sci_t sci = 0;
u32 hdr_pn;
bool cbit;
struct pcpu_rx_sc_stats *rxsc_stats;
@@ -1156,11 +1180,14 @@ static rx_handler_result_t macsec_handle_frame(struct sk_buff **pskb)
macsec_skb_cb(skb)->has_sci = !!(hdr->tci_an & MACSEC_TCI_SC);
macsec_skb_cb(skb)->assoc_num = hdr->tci_an & MACSEC_AN_MASK;
- sci = macsec_frame_sci(hdr, macsec_skb_cb(skb)->has_sci);
rcu_read_lock();
rxd = macsec_data_rcu(skb->dev);
+ sci = macsec_frame_sci(hdr, macsec_skb_cb(skb)->has_sci, rxd);
+ if (!sci)
+ goto drop_nosc;
+
list_for_each_entry_rcu(macsec, &rxd->secys, secys) {
struct macsec_rx_sc *sc = find_rx_sc(&macsec->secy, sci);
@@ -1283,6 +1310,7 @@ static rx_handler_result_t macsec_handle_frame(struct sk_buff **pskb)
macsec_rxsa_put(rx_sa);
drop_nosa:
macsec_rxsc_put(rx_sc);
+drop_nosc:
rcu_read_unlock();
drop_direct:
kfree_skb(skb);
--
2.43.0
Return-Path: <linux-kernel+bounces-673207-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 0371C41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:36:03 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id B028C179ABF
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:35:16 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 9DFE228F958;
Wed, 4 Jun 2025 12:34:38 +0000 (UTC)
Received: from mail.stoffel.org (mail.stoffel.org [172.104.24.175])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7C1B028EA73;
Wed, 4 Jun 2025 12:34:36 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=172.104.24.175
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749040478; cv=none; b=nJESt7x8U/NHDt75K2znyM7yC3rC1EQqPdPRz4lIDCeL1K8VNIVrXbHB15dVO5ZBa5QqDpW2/gk8Aad/YAWSLXuQDwvdyJLSI7+RXmoLF/33HTGUav+o9u09yr4Q8qNPwqelafooKfR6AsAk+gb+OkWQNYjjSxKNp/GYfp86kXY=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749040478; c=relaxed/simple;
bh=3rt8h5n8yYtwwyAoB+3rT9wHFljX3vMTDPW/1JK5jIc=;
h=MIME-Version:Content-Type:Message-ID:Date:From:To:Cc:Subject:
In-Reply-To:References; b=SV+qHyZL+ywSRZ6DqNFv9bKllwZd2NLPEW26x4B1iESBGSaaZTZoGwDaPdtE7uaZIHyvRxK6Qtl7tB7Po2y5kwyAoe5CtUmhmgsimOulzmFhGqhJIFkrwO3wq59fUXVEqXJkl2wArZjo56vveeH+lbvn3LxRlP0YJN3SHcgvdf0=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=stoffel.org; spf=pass smtp.mailfrom=stoffel.org; arc=none smtp.client-ip=172.104.24.175
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=stoffel.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=stoffel.org
Received: from quad.stoffel.org (syn-097-095-183-072.res.spectrum.com [97.95.183.72])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits))
(No client certificate requested)
by mail.stoffel.org (Postfix) with ESMTPSA id 6CB071E38B;
Wed, 4 Jun 2025 08:34:35 -0400 (EDT)
Received: by quad.stoffel.org (Postfix, from userid 1000)
id 1EC26A1041; Wed, 4 Jun 2025 08:34:35 -0400 (EDT)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-ID: <26688.15707.98922.15948@xxxxxxxxxxxxxxxxx>
Date: Wed, 4 Jun 2025 08:34:35 -0400
From: "John Stoffel" <john@xxxxxxxxxxx>
To: David Niklas <simd@xxxxxxxxxxx>
Cc: Linux RAID <linux-raid@xxxxxxxxxxxxxxx>,
linux-kernel@xxxxxxxxxxxxxxx
X-Clacks-Overhead: GNU Terry Pratchett
Subject: Re: Need help increasing raid scan efficiency.
In-Reply-To: <20250602210514.7acd5325@xxxxxxxxxxxxxxxxxxxxx>
References: <20250602210514.7acd5325@xxxxxxxxxxxxxxxxxxxxx>
X-Mailer: VM 8.3.x under 28.2 (x86_64-pc-linux-gnu)
X-Spam-Status: No, score=-6.5 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
"David" == David Niklas <simd@xxxxxxxxxxx> writes:
My PC suffered a rather nasty case of HW failure recently where the
MB would break the CPU and RAM. I ended up with different data on
different members of my RAID6 array.
Ouch, this is not good. But you have RAID6, so it should be ok...
I wanted to scan through the drives and take some checksums of
various files in an attempt to ascertain which drives took the most
data corruption damage, to try and find the date that the damage
started occurring (as it was unclear when exactly this began), and
to try and rescue some of the data off of the good pairs.
What are you comparing the checksums too? Just because you assemble
drives 1 and 2 and read the filesystem, then assemble drives 3 and 4
into another array, how do you know which checksum is correct if they
differ?
So I setup the array into read-only mode and started the array with
only two of the drives. Drives 0 and 1. Then I proceeded to try and
start a second pair, drives 2 and 3, so that I could scan them
simultaneously. With the intent of then switching it over to 0 and
2 and 1 and 3, then 0 and 3 and 1 and 2.
I'm not sure this is really going to work how you think....
This failed with the error message:
# mdadm --assemble -o --run /dev/md128 /dev/sdc /dev/sdd
mdadm: Found some drive for array that is already active: /dev/md127
This is not un-expected. You already have md127 setup using the same
UUID, and mdadm is doing the right thing to refuse to assemble a
different array name with the same underlying UUID.
But if you have four drives, you've got four sets of checksums to
calculate for each file, which is going to take time. And I think
just doing it one pair of disks at a time is the safest way. Your
data is important to you, obviously, but how much is it worth?
Can you afford to get some replacement disks, or even just a single
large disk and them dump all your files onto a new single disk to try
and save what you have, even if it's corrupted?
Any ideas as to how I can get mdadm to run the array as I requested
above? I did try --force, but mdadm refused to listen.
And for good reason. You might be able to do an overlayfs on each
pair, then go in and change the UUID of the second pair to something
different, and then start the array with a new name and disk member
UUIDs.
But it's alot of hacking for probably not much payout.
Have you found a file with corruption? If so, have you done a quick
test where you do the four pairs of the array assembled and checked
just that one single file to see if the checksum differs?
And again, if it does differ, how do you decide what is the correct
data?
I would strongly suspect that the data is corrupted no matter what.
In any case, good luck! Maybe the raid6check tool will help, but I'd
rather try to at least use your most recent backup as a check.
John
Return-Path: <linux-kernel+bounces-673208-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id CBA6641E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:36:55 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 27403189B507
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:35:47 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 35F0928F519;
Wed, 4 Jun 2025 12:35:24 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="EUKZNTVg"
Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id AA22913AD1C;
Wed, 4 Jun 2025 12:35:21 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749040523; cv=none; b=j/jPy9N6QI2NAYbK4GxGeSwZswL9XPxgIvQtJvftx94Hk3nHuoQyjhQebgPPRoSwJF3kAPVqg5uhdTsJ87gujY99BPf3j7Cv+LQkP78we3lZiuZ3HoaSTd3kWXL9pGrEZWLiguiRT/uXzLtLAtQiRkhJR4hyBQnuAOYyhCeg8o0=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749040523; c=relaxed/simple;
bh=pzB2r9AuYbhlH2cLpCTOjuhSRLK5nxjnZ5tOE00lqPg=;
h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From:
In-Reply-To:Content-Type; b=ckVb4fD48QT/wrP8Xu52WpQnDtQcQ3P1rLa0xIeohwW2DDNx7qgsl3V9kvb2OGa21pJQyuPX4KlQkEq6QYKj/Vdf0CTpR1ZGij+ztoe05rbLyWwE01+0Av0bXMMAXwgnJ/8M49YzQz3bacKSIUXvPT5ib9GERlBp8ExPgy6hwCg=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=EUKZNTVg; arc=none smtp.client-ip=205.220.180.131
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com
Received: from pps.filterd (m0279868.ppops.net [127.0.0.1])
by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 554AhpJE023156;
Wed, 4 Jun 2025 12:35:12 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=
cc:content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=qcppdkim1; bh=
lQCzdXCBuvZMUMNTaFYO+4zUpBo1D8sZNSPcz5eyBuI=; b=EUKZNTVgKiyjvYzE
RPfhObsr/zSb1B9xa5WRVtia5wGxvfC/d2KCFjBjRikm9YqJ2THKmoA7Y87qV6ln
PSLiHjeLp5P4EnP/YJ6MgYcuaJG9QLs9sU/tzwMd//W5ejxJZDKMAIgkj2ceKJ3a
spY4/JB0UoXU+OP+oTlUXHE3icZxgZGlhPU2LY1vcM2hf0/VB0RinpONRY3ENEXb
wuZpBDwgvp3DyqPruxzsgTOQX4xJXaEsUiL3SqYm6YOSZDt3Gdpu0/5nnOZk62sa
djB271O7TgmlNGg2RuLx7GjdVxNqXdVvZez+2miv9YiUkAp5nD0O1CTa9jgQnSmm
joblEQ==
Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254])
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 472mn008ux-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 12:35:12 +0000 (GMT)
Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231])
by NASANPPMTA04.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 554CZBko016918
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 4 Jun 2025 12:35:11 GMT
Received: from [10.50.19.162] (10.80.80.8) by nasanex01a.na.qualcomm.com
(10.52.223.231) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Wed, 4 Jun 2025
05:35:07 -0700
Message-ID: <4504e16a-f4c4-1f68-fa91-d3641a3decbe@xxxxxxxxxxx>
Date: Wed, 4 Jun 2025 18:05:04 +0530
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Subject: Re: [PATCH] media: venus: Fix MSM8998 frequency table
To: Konrad Dybcio <konradybcio@xxxxxxxxxx>,
Dikshita Agarwal
<quic_dikshita@xxxxxxxxxxx>,
Bryan O'Donoghue <bryan.odonoghue@xxxxxxxxxx>,
Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>,
Stanimir Varbanov
<stanimir.k.varbanov@xxxxxxxxx>,
Marc Gonzalez <mgonzalez@xxxxxxxxxx>,
Pierre-Hugues Husson <phhusson@xxxxxxxxxx>,
Hans Verkuil <hverkuil@xxxxxxxxx>
CC: Marijn Suijten <marijn.suijten@xxxxxxxxxxxxxx>,
<linux-media@xxxxxxxxxxxxxxx>, <linux-arm-msm@xxxxxxxxxxxxxxx>,
<linux-kernel@xxxxxxxxxxxxxxx>,
Konrad Dybcio
<konrad.dybcio@xxxxxxxxxxxxxxxx>
References: <20250531-topic-venus_98_tbl-v1-1-68e5523a39dc@xxxxxxxxxxxxxxxx>
Content-Language: en-US
From: Vikash Garodia <quic_vgarodia@xxxxxxxxxxx>
In-Reply-To: <20250531-topic-venus_98_tbl-v1-1-68e5523a39dc@xxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To
nasanex01a.na.qualcomm.com (10.52.223.231)
X-QCInternal: smtphost
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085
X-Proofpoint-ORIG-GUID: AgF96cHK_rht01NW1ZGMCujyOSyIvlAU
X-Proofpoint-GUID: AgF96cHK_rht01NW1ZGMCujyOSyIvlAU
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDA5NSBTYWx0ZWRfXzGDt6pi+M68Z
EhaCAqazL25NGYD/aDQSfzVZMuMzncSMK6esvvFbxNDFfNJSN4pG/qE+6h5y5lyxS9cbXb9C+4U
OJgTBi18RH2WjAvfIUFKrkW1stkdFOMkS6dTfZeP6/Dka/EV21Qc2Z2NRnhF8aGRvZYHqwiPOFe
Zg3XU8ys64hhE2SXMKtkjNMquAHpNDgIkvNVeOt3n+Wpigb6/3goGjlF5TL+g8mjyh50m+qhMM/
ksZdTO7gQSYzldwHMjxtsrlp6IGiEx3NVj1TDyVKbhq6vvjIX5+7TBdmTZfJK300HBJhU0/xv4T
IcZ9lPF/3RhGlZah5gUIckh3quz4/DS21f5h4IZeu2qpYazov8SwYMqO0j0vzFH1lQMetfcg68w
lvcY490Wuhk9TZ5MJDsWrgaem440kt5VJ9LI7KiVK1tJvUIjxS+uQBVdmed+zRCvq3X3hI6M
X-Authority-Analysis: v=2.4 cv=Y8/4sgeN c=1 sm=1 tr=0 ts=68403d80 cx=c_pps
a=JYp8KDb2vCoCEuGobkYCKw==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17
a=GEpy-HfZoHoA:10 a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10 a=EUspDBNiAAAA:8
a=HQS51YnNDeexhmgAX-4A:9 a=QEXdDO2ut3YA:10
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
mlxscore=0 lowpriorityscore=0 mlxlogscore=999 spamscore=0 phishscore=0
clxscore=1011 impostorscore=0 bulkscore=0 suspectscore=0 priorityscore=1501
malwarescore=0 adultscore=0 classifier=spam authscore=0 authtc=n/a authcc=
route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000
definitions=main-2506040095
X-Spam-Status: No, score=-6.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
NICE_REPLY_A,RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 5/31/2025 5:52 PM, Konrad Dybcio wrote:
From: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
Fill in the correct data for the production SKU.
Fixes: 193b3dac29a4 ("media: venus: add msm8998 support")
Signed-off-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
---
drivers/media/platform/qcom/venus/core.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
index d305d74bb152d21133c4dfa23805b17274426a5c..2bb514c322692475ed58198e17f906f894d81cf4 100644
--- a/drivers/media/platform/qcom/venus/core.c
+++ b/drivers/media/platform/qcom/venus/core.c
@@ -709,11 +709,11 @@ static const struct venus_resources msm8996_res = {
};
static const struct freq_tbl msm8998_freq_table[] = {
- { 1944000, 465000000 }, /* 4k UHD @ 60 (decode only) */
- { 972000, 465000000 }, /* 4k UHD @ 30 */
- { 489600, 360000000 }, /* 1080p @ 60 */
- { 244800, 186000000 }, /* 1080p @ 30 */
- { 108000, 100000000 }, /* 720p @ 30 */
+ { 1728000, 533000000 }, /* 4k UHD @ 60 (decode only) */
+ { 1036800, 444000000 }, /* 2k @ 120 */
+ { 829440, 355200000 }, /* 4k @ 44 */
+ { 489600, 269330000 },/* 4k @ 30 */
+ { 108000, 200000000 }, /* 1080p @ 60 */
What has ideally changed in production SKU which led to this change. Pls add
this info.
Regards,
Vikash
};
static const struct reg_val msm8998_reg_preset[] = {
---
base-commit: 2a628f951ed54c30a232230b5b58349d2a8dbb11
change-id: 20250531-topic-venus_98_tbl-5765675a4ce5
Best regards,
Return-Path: <linux-kernel+bounces-673209-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 7058041E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:37:21 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id C95AD18871C0
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:37:26 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 2721D28E61C;
Wed, 4 Jun 2025 12:37:06 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="lgV3DI+/"
Received: from mail-pg1-f182.google.com (mail-pg1-f182.google.com [209.85.215.182])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 33994202C43;
Wed, 4 Jun 2025 12:37:03 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.182
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749040625; cv=none; b=IwKj5eg2jG0eTHv1oIKIlrG33GOVC8gRrFEs0wJWKdfsch79ko5ETfOHgUYLqltaYsdMt0y5+zpSvLFRq5nnCE8cEparBBku2w2vI2qlH0f65oewmYkJRu58WjS8ma3eXwM3XEaYw9QRlm260tKF8tvBseFgEkAQYB4qYscNv1k=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749040625; c=relaxed/simple;
bh=TGmacJKp81+zfiDnoff8USezbd7Awguz0mg5GPA6mJs=;
h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
To:Cc:Content-Type; b=M5seHTOFYnRwW3b6KNhuv3mWiQ10set0Ns8+yFYoNF6eO+CJTYPJVWnfjUiOLNLQ6g7Wt8JhhzpbR4XU8P9PF0ZQmPdq0lxkPIxPBJ5Ija5E0UlAwjZqxgwaHjpAVLnq1P9AT9la3y8v04VECOK1O9ln4hTX68oaG4h5VEhznpk=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=lgV3DI+/; arc=none smtp.client-ip=209.85.215.182
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
Received: by mail-pg1-f182.google.com with SMTP id 41be03b00d2f7-b1276984386so502098a12.0;
Wed, 04 Jun 2025 05:37:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1749040623; x=1749645423; darn=vger.kernel.org;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:from:to:cc:subject:date
:message-id:reply-to;
bh=TGmacJKp81+zfiDnoff8USezbd7Awguz0mg5GPA6mJs=;
b=lgV3DI+/uc1B708/Br5LAzOuXqNY7CfMI+PYe/QkGBjuix0JdWUIEtJB67wrRrizpF
FfP6UhAdMj2wskzHh5RpDHJdHKLcYQXVx0qVfTNalBmMnYumLmQ7gUtsCrIcrzbwxeqt
URAg/f5ML3WcgHyVkdmlswxrBDB72A2DKTIFnTCQTTlzFiZ+L6tcyByJ4+gNoIKHH6h1
p+j8KAVcC61ZnCVuNOIePyvZuSC65uCroxVwumnFGf2kdk9v5oV9dzbObeP0H/miFwmf
BTesKAmpP/2mhVQ61/Ua1d/+ISuJeplh3a1SZfeUzUZfTfVkV2HjghsXJHLeg819FA4o
nzpg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749040623; x=1749645423;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=TGmacJKp81+zfiDnoff8USezbd7Awguz0mg5GPA6mJs=;
b=GP+Dmo3PRkUKrlHjrkwA5/MDJFX/p9gxgzz9KOyH2UZNsfEaQaiajM11JB/Y3/l5ON
2EmGRpQ7moVSUm0P73kiZrtFk6jqeri2Pbf/KApUgGOKZSDNN6oaG2OK78aooAQxydjo
8Jo0+UxtqCVZYrACGKMtKnN+o7w4GV67lAvN6PfBZ3J+q1ONpRjp5XU4MoX8EVvpOjz5
QgBYI4VxMbpxujOWzZUQSZMlNIL0S+fyGh85CCVsvj5KsD9tb0h75y8Q1hfTxQcb97Wi
lTXsnzupICLF9p/Rouf4W14Z7hMgAHOpPp61jzFItVGrp6oLT2C1pfYFgv0h6OO8UthN
2yfQ==
X-Forwarded-Encrypted: i=1; AJvYcCUgEbd5m4F4x/Lyi2ypCvC/Hq0vSYT3P8VwLN/OeuPgK7EbzJu8VCNOzOeE+rxZt2JvMUEEf3940A+cJy+dnm0=@vger.kernel.org, AJvYcCVMtprOXMeTIdfub+vOdNob4IrhiO6al7yOnchY3Vj77iifHcRNd7pm7TDXGmw1nd1yPEVIfsw3anCjGRc=@vger.kernel.org
X-Gm-Message-State: AOJu0Yxqcq7zcinWHafY+ELrA26qBIq2U+dOGTwVjYTEPe13u1q/QGLZ
qg9l+8j43+66qNN2w22C5EVTVN8fmCnBdlo76MsFZI1uAHQtBZdfmYFCuI/D1/Q+VjwRO5XhwqL
UivabRARK06EN9ko51TvyzPLjfxUyIUE=
X-Gm-Gg: ASbGncvCf1gvejDY8l9Vpeqyh+PUyJS09LLXj4Gyvz9tMtzfjfpVhwMysJybOVifjSL
3pO0EGTQmmciTHe2nmmX9KRO+F24P4tFWzBOd1OwjCu3QSOLmWmZExBnDmX8ionRYYmnCYUxR2u
xHR10EylAnQa48EylIxmpF5Wbh7P+KtBSe
X-Google-Smtp-Source: AGHT+IHHF+VR96AMO4wKfH2HPUEELwexGsqIepbUHKs7SdVl2eou39ao3VcOuVg/aXiqNHhy6dMSCpdf/4YSsTPPOr8=
X-Received: by 2002:a17:90b:2ec3:b0:311:c939:c855 with SMTP id
98e67ed59e1d1-3130cda9d5dmr1503790a91.3.1749040623285; Wed, 04 Jun 2025
05:37:03 -0700 (PDT)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
References: <20250603205416.49281-1-dakr@xxxxxxxxxx>
In-Reply-To: <20250603205416.49281-1-dakr@xxxxxxxxxx>
From: Miguel Ojeda <miguel.ojeda.sandonis@xxxxxxxxx>
Date: Wed, 4 Jun 2025 14:36:51 +0200
X-Gm-Features: AX0GCFvPlShaBPnN8nC2tMhvUVT9ssC4YUWURCehQJwrzE-EudYdYaOGvbMEbj8
Message-ID: <CANiq72nfOcOGJuktzSpNAUWwekaZ98JL7c1FhMKCjPSG80JMPA@xxxxxxxxxxxxxx>
Subject: Re: [PATCH 0/3] Fix race condition in Devres
To: Danilo Krummrich <dakr@xxxxxxxxxx>
Cc: gregkh@xxxxxxxxxxxxxxxxxxx, rafael@xxxxxxxxxx, ojeda@xxxxxxxxxx,
alex.gaynor@xxxxxxxxx, boqun.feng@xxxxxxxxx, gary@xxxxxxxxxxx,
bjorn3_gh@xxxxxxxxxxxxxx, benno.lossin@xxxxxxxxx, a.hindborg@xxxxxxxxxx,
aliceryhl@xxxxxxxxxx, tmgross@xxxxxxxxx, chrisi.schrefl@xxxxxxxxx,
rust-for-linux@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Tue, Jun 3, 2025 at 10:54=E2=80=AFPM Danilo Krummrich <dakr@xxxxxxxxxx> =
wrote:
None of the upstream users of Devres is prone to this race, hence we do n=
ot
necessarily have to backport this -- yet, it must be fixed.
We generally backport even soundness fixes when they do not affect
actual upstream code, so we should probably try.
On the other hand, v6.14.y may go out of support soon (a few weeks I
assume) and this does not affect LTSs.
Cheers,
Miguel
Return-Path: <linux-kernel+bounces-673210-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 6D6BF41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:37:47 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 1C5F3188306E
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:38:01 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id CF47028ECEF;
Wed, 4 Jun 2025 12:37:39 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="iryXm66a"
Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6FB8813AD1C;
Wed, 4 Jun 2025 12:37:36 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.92.199
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749040659; cv=none; b=SJ5wliPd7sxtFFW69prdhuWI+mk+wSmmdYl5G4nHuRq28LDQDFb3+WECbaUxQmr7rnWx+GNOr5CXLvHOLi12uBU+tSP8eBRhFDrxWOXufBiaKarfE3Tc20uKprakad2+FvW2NIAGnG1GlOcSHij9/ksM7qEeiXBhwCOtFpcXoMI=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749040659; c=relaxed/simple;
bh=OdkD+MODyORjWGw/yjTomTLFd2F+IeytQ1n613BMIAo=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=eGrVLFjrRsmk7pqdUIgiRbcZKF0HMVFn/GGASeACy9oyBJCDfFr7Vgs8KCw3If1J4GW/wVN0S4208kentAngj8ZaVJyjpL0EETZVwxurYN8qVk6A1jIkcHlZSepuiA84JSp7rysVXhXlzTOsYoq5uHM6BIxZ7Sg4p2tOVmXhKKo=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=iryXm66a; arc=none smtp.client-ip=90.155.92.199
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org
Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version:
References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:
Content-Transfer-Encoding:Content-ID:Content-Description;
bh=egLrzXjNAUuKfQLdddD0K8slsgz2ryPJgQoyPWELHWI=; b=iryXm66aJPrn3fFNGyydYrr1z+
Bf2iWSovX7QI361HrNo/XIL4dEvRJmGnF/Aovhp71kJ1zXQMbqxIMtfpBZo1LW6uHCwNxl3yI5nhN
4naAUk8KFOBkI+v+1ovLaIorZ5g5NIGFuMh8H3YPlMJJ7yyn6gIm/R1oKUqUzDhlg4BHrAE1iuWu4
imhLviXGBfjykkntSsd8pGhiPfwaWD6eyPJegIxhaM1fhRl6mD7iBCkdgQxWnWqGDI63QBGg9MgeF
86DhkDNpWIpWOvCmwPdiazrrF49H1ZdCKiPcVdLBKSmCcYyl8FAgfsnhiOirKl1misILATB1eIkfo
MgEI6HNA==;
Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net)
by desiato.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux))
id 1uMnN0-00000000ttB-0yu9;
Wed, 04 Jun 2025 12:37:26 +0000
Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000)
id 1EA0230078B; Wed, 4 Jun 2025 14:37:25 +0200 (CEST)
Date: Wed, 4 Jun 2025 14:37:25 +0200
From: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
To: Yeoreum Yun <yeoreum.yun@xxxxxxx>
Cc: Leo Yan <leo.yan@xxxxxxx>, mingo@xxxxxxxxxx, mingo@xxxxxxxxxx,
acme@xxxxxxxxxx, namhyung@xxxxxxxxxx, mark.rutland@xxxxxxx,
alexander.shishkin@xxxxxxxxxxxxxxx, jolsa@xxxxxxxxxx,
irogers@xxxxxxxxxx, adrian.hunter@xxxxxxxxx,
kan.liang@xxxxxxxxxxxxxxx, linux-perf-users@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, David Wang <00107082@xxxxxxx>
Subject: Re: [PATCH 1/1] perf/core: fix dangling cgroup pointer in cpuctx
Message-ID: <20250604123725.GJ38114@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20250602184049.4010919-1-yeoreum.yun@xxxxxxx>
<20250603140040.GB8020@xxxxxxxxxxxxxxx>
<20250603144414.GC38114@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
<20250604080339.GB35970@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
<aEAau+v4qBQSt13s@xxxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <aEAau+v4qBQSt13s@xxxxxxxxxxxxxxx>
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 11:06:51AM +0100, Yeoreum Yun wrote:
> - EXIT means task that the even was assigned to died, but child events
> still live, and further children can still be created. But the event
> itself will never be active again. It can only transition to
> {REVOKED,DEAD};
I have a slight quetions. after parent event set EXIT,
Does EXIT event should be inherited?
for example
parent task(0, ...) -> parent_event(0, parent_event:NULL)
` child_task(1, parent:0) -> child_event(1, parent_event:0)
` child_task(2, parent:1) -> child_event(2, parent_event:0)
In this case when parent task(0) is exited,
parent->event will be set as EXIT state.
But suppose the child_task(2) try to fork (child_task3) and
inherit the event (create child_event(3, parent_event:0),
and at the fork, forking can observe the parent event state as "EXIT".
In thie situation why child_event(3, parent_event:0) should be created for
child_task(3)?
Yes. You set out to monitor the whole hierarchy, so any child created
after the first task should be monitored, until such time that you close
the event.
Notably, a fair number of daemons go about their business by explicitly
closing their original task in order to detach from the tty.
Also, per the context switch optimization the original event doesn't
need to stay with the original parent, it can end up on a random child.
Return-Path: <linux-kernel+bounces-673211-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 8177F41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:38:15 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 9D5C63A6027
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:37:53 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 0B8EF28ECEA;
Wed, 4 Jun 2025 12:38:10 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="2PCQSYk1";
dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="e2Iho95T";
dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="2PCQSYk1";
dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="e2Iho95T"
Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7895A13AD1C
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:38:07 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749040689; cv=none; b=BMAPLfqgwjxnr7RaP6x9tlem05VXaGEQMED/+1NaYitPwUERpZ4/w/ploU/SI6erYTTYmbuh4htplLwAMx4sKZynqnLwcsmmkonJMpKkrb6SmOC/PGbWIaSGjFf3r9DY3ddnEP5FRkajI0psGqX/lbtSS1XtGRt8BxVlobum76Q=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749040689; c=relaxed/simple;
bh=7uNXIwV/i1nPAy/jNobUr42qsAtwGK0nGFPoE7RIFZI=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=dHCh3KS2/ogSGToC7W6BlvzMf8fXszXfCk/aG/Kj6R9M5wSMxf2gJo+kISIr3I9sAwj2+nF7HNFg8Zlqq0RrKajAEq7OJ77+UojM0l+OPfrP1uptx3KidpB3KFwWzYwTUCeRl7AsEviD9hEhvXvzO5lnFsdxAKlaH9d9U/J+Y9w=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=2PCQSYk1; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=e2Iho95T; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=2PCQSYk1; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=e2Iho95T; arc=none smtp.client-ip=195.135.223.130
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de
Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(No client certificate requested)
by smtp-out1.suse.de (Postfix) with ESMTPS id 8569A21170;
Wed, 4 Jun 2025 12:38:05 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa;
t=1749040685; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version:content-type:content-type:
in-reply-to:in-reply-to:references:references;
bh=sK4fJiQQfbJ0KUB/pSNHrTq2CqbwKDdWTRAtN+ykQpA=;
b=2PCQSYk1LNb4l1OOxs1xP5+n7ldYg4wxBW1dAXAU+3OS0O2EmleGpgnTxuJ+bxMibjDhv/
xHpQW09cr1Vni0yzpse18LqWze9w1lXNYfZDJEmA2X04UTKEIiGl7EK8yPcYkc0+wbD6lQ
Dg6eVYaNI6Dec3G33SPq9lH90i4gf8g=
DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de;
s=susede2_ed25519; t=1749040685;
h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version:content-type:content-type:
in-reply-to:in-reply-to:references:references;
bh=sK4fJiQQfbJ0KUB/pSNHrTq2CqbwKDdWTRAtN+ykQpA=;
b=e2Iho95T/pGji/VS2o+oHEEtFSYBe9KEQFwfJn9Q85g6hpg+hSscz7klso4Q7oPd0El25+
+iOMKu1EvJx6VuDw==
Authentication-Results: smtp-out1.suse.de;
dkim=pass header.d=suse.de header.s=susede2_rsa header.b=2PCQSYk1;
dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=e2Iho95T
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa;
t=1749040685; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version:content-type:content-type:
in-reply-to:in-reply-to:references:references;
bh=sK4fJiQQfbJ0KUB/pSNHrTq2CqbwKDdWTRAtN+ykQpA=;
b=2PCQSYk1LNb4l1OOxs1xP5+n7ldYg4wxBW1dAXAU+3OS0O2EmleGpgnTxuJ+bxMibjDhv/
xHpQW09cr1Vni0yzpse18LqWze9w1lXNYfZDJEmA2X04UTKEIiGl7EK8yPcYkc0+wbD6lQ
Dg6eVYaNI6Dec3G33SPq9lH90i4gf8g=
DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de;
s=susede2_ed25519; t=1749040685;
h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version:content-type:content-type:
in-reply-to:in-reply-to:references:references;
bh=sK4fJiQQfbJ0KUB/pSNHrTq2CqbwKDdWTRAtN+ykQpA=;
b=e2Iho95T/pGji/VS2o+oHEEtFSYBe9KEQFwfJn9Q85g6hpg+hSscz7klso4Q7oPd0El25+
+iOMKu1EvJx6VuDw==
Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(No client certificate requested)
by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id EF70F13A63;
Wed, 4 Jun 2025 12:38:04 +0000 (UTC)
Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167])
by imap1.dmz-prg2.suse.org with ESMTPSA
id K6e8Nyw+QGjuUQAAD6G6ig
(envelope-from <osalvador@xxxxxxx>); Wed, 04 Jun 2025 12:38:04 +0000
Date: Wed, 4 Jun 2025 14:38:03 +0200
From: Oscar Salvador <osalvador@xxxxxxx>
To: David Hildenbrand <david@xxxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>,
Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>,
Harry Yoo <harry.yoo@xxxxxxxxxx>, Rakie Kim <rakie.kim@xxxxxx>,
Hyeonggon Yoo <42.hyeyoo@xxxxxxxxx>, linux-mm@xxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
Subject: Re: [PATCH v4 2/3] mm,memory_hotplug: Implement numa node notifier
Message-ID: <aEA-K3hTvhtdUxuA@localhost.localdomain>
References: <20250603110850.192912-1-osalvador@xxxxxxx>
<20250603110850.192912-3-osalvador@xxxxxxx>
<ddcdd8b9-566c-4f6c-b1f7-861e93a80fbb@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <ddcdd8b9-566c-4f6c-b1f7-861e93a80fbb@xxxxxxxxxx>
X-Spamd-Result: default: False [-3.01 / 50.00];
BAYES_HAM(-3.00)[100.00%];
SUSPICIOUS_RECIPS(1.50)[];
NEURAL_HAM_LONG(-1.00)[-1.000];
NEURAL_HAM_SHORT(-0.20)[-1.000];
R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519];
MIME_GOOD(-0.10)[text/plain];
MX_GOOD(-0.01)[];
RCVD_TLS_ALL(0.00)[];
TAGGED_RCPT(0.00)[];
FUZZY_BLOCKED(0.00)[rspamd.com];
ARC_NA(0.00)[];
RCVD_VIA_SMTP_AUTH(0.00)[];
MIME_TRACE(0.00)[0:+];
MISSING_XM_UA(0.00)[];
RCPT_COUNT_SEVEN(0.00)[9];
FREEMAIL_ENVRCPT(0.00)[gmail.com];
DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519];
FROM_HAS_DN(0.00)[];
FREEMAIL_CC(0.00)[linux-foundation.org,suse.cz,huawei.com,oracle.com,sk.com,gmail.com,kvack.org,vger.kernel.org];
TO_DN_SOME(0.00)[];
FROM_EQ_ENVFROM(0.00)[];
TO_MATCH_ENVRCPT_ALL(0.00)[];
DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,suse.de:dkim];
RCVD_COUNT_TWO(0.00)[2];
DKIM_TRACE(0.00)[suse.de:+]
X-Spam-Level:
X-Rspamd-Queue-Id: 8569A21170
X-Rspamd-Action: no action
X-Rspamd-Server: rspamd1.dmz-prg2.suse.org
X-Spam-Score: -3.01
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 02:03:23PM +0200, David Hildenbrand wrote:
> diff --git a/include/linux/memory.h b/include/linux/memory.h
> index 5ec4e6d209b9..8c5c88eaffb3 100644
> --- a/include/linux/memory.h
> +++ b/include/linux/memory.h
> @@ -99,6 +99,14 @@ int set_memory_block_size_order(unsigned int order);
> #define MEM_PREPARE_ONLINE (1<<6)
> #define MEM_FINISH_OFFLINE (1<<7)
> +/* These states are used for numa node notifiers */
> +#define NODE_BECOMING_MEM_AWARE (1<<0)
> +#define NODE_BECAME_MEM_AWARE (1<<1)
> +#define NODE_BECOMING_MEMORYLESS (1<<2)
> +#define NODE_BECAME_MEMORYLESS (1<<3)
> +#define NODE_CANCEL_MEM_AWARE (1<<4)
> +#define NODE_CANCEL_MEMORYLESS (1<<5)
Very nitpicky: MEM vs. MEMORY inconsistency. Also, I am not sure about
"MEMORYLESS vs. MEMORY AWARE" terminology (opposite of aware is not less)
and "BECOMING" vs. "CANCEL" ...
Heh, that is why I'm not in the marketing field :-)
There must be something better ... but what is it. :)
NODE_ADDING_FIRST_MEMORY
NODE_ADDED_FIRST_MEMORY
NODE_CANCEL_ADDING_FIRST_MEMORY
NODE_REMOVING_LAST_MEMORY
NODE_REMOVED_LAST_MEMORY
NODE_CANCEL_REMOVING_LAST_MEMORY
Maybe something like that? I still don't quite like the "CANCEL" stuff.
NODE_ADDING_FIRST_MEMORY
NODE_ADDED_FIRST_MEMORY
NODE_NOT_ADDED_FIRST_MEMORY
NODE_REMOVING_LAST_MEMORY
NODE_REMOVED_LAST_MEMORY
NODE_NOT_REMOVED_LAST_MEMORY
If I were to pick one, I'd go with NODE_ADDING_FIRST_MEMORY/NODE_REMOVING_LAST_MEMORY.
I think those make it easier to grasp.
Hm ...
> +
> struct memory_notify {
> /*
> * The altmap_start_pfn and altmap_nr_pages fields are designated for
> @@ -109,7 +117,10 @@ struct memory_notify {
> unsigned long altmap_nr_pages;
> unsigned long start_pfn;
> unsigned long nr_pages;
> - int status_change_nid_normal;
> + int status_change_nid;
> +};
Could/should that be a separate patch after patch #1 removed the last user?
Also, I think the sequence should be (this patch is getting hard to review
for me due to the size):
#1 existing patch 1
#2 remove status_change_nid_normal
#3 introduce node notifier
#4-#X: convert individual users to node notifier
#X+1: change status_change_nid to always just indicate the nid, renaming
it on the way (incl current patch #3)
When you say #4-#X, you mean a separate patch per converting user?
So, one for memtier, one for cxl, one for hmat, etc.?
> +
> +struct node_notify {
> int status_change_nid;
This should be called "nid" right from the start.
Copy that.
> @@ -157,15 +168,34 @@ static inline unsigned long memory_block_advised_max_size(void)
> {
> return 0;
> }
> +
[...]
> * {on,off}lining is constrained to full memory sections (or more
> @@ -1194,11 +1172,22 @@ int online_pages(unsigned long pfn, unsigned long nr_pages,
> /* associate pfn range with the zone */
> move_pfn_range_to_zone(zone, pfn, nr_pages, NULL, MIGRATE_ISOLATE);
> - arg.start_pfn = pfn;
> - arg.nr_pages = nr_pages;
> - node_states_check_changes_online(nr_pages, zone, &arg);
> + node_arg.status_change_nid = NUMA_NO_NODE;
> + if (!node_state(nid, N_MEMORY)) {
> + /* Node is becoming memory aware. Notify consumers */
> + cancel_node_notifier_on_err = true;
> + node_arg.status_change_nid = nid;
> + ret = node_notify(NODE_BECOMING_MEM_AWARE, &node_arg);
> + ret = notifier_to_errno(ret);
> + if (ret)
> + goto failed_addition;
> + }
I assume without NUMA, that code would never trigger? I mean, the whole
notifier doesn't make sense without CONFIG_NUMA :)
So, glad you asked because it forced me to look again.
And I think we might have some divergences there, so I will sort it out
in the next respin.
Thanks for the feedback ;-)
--
Oscar Salvador
SUSE Labs
Return-Path: <linux-kernel+bounces-673212-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id CBD4741E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:38:31 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 7F62F172857
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:38:29 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 0DBF828ECFD;
Wed, 4 Jun 2025 12:38:24 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="z2xSW+QB"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 443A328D8DD;
Wed, 4 Jun 2025 12:38:22 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749040703; cv=none; b=Xfim9p1F5I/QKZTM/YONwAcphsjLrwdkbCNsSr61wMj63weFJR7kJgvu6WqbmHzO1PktjdEZPVlc/e00UYpqaU70yRRGUmsijyRAWBScnOzRMFse146O1IB2CthW09NVcjpnrXALJD98S/DU7pOlczZllGiSlhD6/y9u2f4tB34=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749040703; c=relaxed/simple;
bh=7tHoRWpClE5dLKc7eKaOJE0EBswVDCbH75bRZ0dvDtw=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=n8t8YR6egeW11X3ucyif9MlFfhFZ4zEqC33j7zT5Mpo1rZG0Nh9CbM+ALqCP0/GM1KW8bn/CS634JhmYYNY6E6jmS5xlzS21ICRxGpwfDNMwY43JDSoW6/thuSTb7vdKDYPYvwrvbylxEyu3X8Khfz9NOLJ5a/M4pdpHsO93Gsc=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=z2xSW+QB; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1572BC4CEEF;
Wed, 4 Jun 2025 12:38:21 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org;
s=korg; t=1749040702;
bh=7tHoRWpClE5dLKc7eKaOJE0EBswVDCbH75bRZ0dvDtw=;
h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
b=z2xSW+QBOUmyM2yWlcdXcasGDUIDdoKL+FVRkca1oDExVNmQFUMTFBhfYxzMf081m
seIkXDCaBdvIqEkSL21CwhsLPL5o2rEjQhPoKgmelIB+BIwGgqCOsPipyrZ1oSCNCy
2amykKUElpsO18F5eiHtk0mj5QVMWgFQ7KK1sCsE=
Date: Wed, 4 Jun 2025 14:38:19 +0200
From: Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx>
To: Chen Ridong <chenridong@xxxxxxxxxxxxxxx>
Cc: catalin.marinas@xxxxxxx, will@xxxxxxxxxx, ardb@xxxxxxxxxx,
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
stable@xxxxxxxxxxxxxxx, lujialin4@xxxxxxxxxx, chenridong@xxxxxxxxxx
Subject: Re: [PATCH stable 6.6.y] arm64: kaslr: fix nokaslr cmdline parsing
Message-ID: <2025060409-fidgeting-basil-abf7@gregkh>
References: <20250603125233.2707474-1-chenridong@xxxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20250603125233.2707474-1-chenridong@xxxxxxxxxxxxxxx>
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Tue, Jun 03, 2025 at 12:52:33PM +0000, Chen Ridong wrote:
From: Chen Ridong <chenridong@xxxxxxxxxx>
Currently, when the command line contains "nokaslrxxx", it was incorrectly
treated as a request to disable KASLR virtual memory. However, the behavior
is different from physical address handling.
This issue exists before the commit af73b9a2dd39 ("arm64: kaslr: Use
feature override instead of parsing the cmdline again"). This patch fixes
the parsing logic for the 'nokaslr' command line argument. Only the exact
strings, 'nokaslr', will disable KASLR. Other inputs such as 'xxnokaslr',
'xxnokaslrxx', or 'xxnokaslr=xx' will not disable KASLR.
Fixes: f80fb3a3d508 ("arm64: add support for kernel ASLR")
Cc: stable@xxxxxxxxxxxxxxx # <= v6.6
Signed-off-by: Chen Ridong <chenridong@xxxxxxxxxx>
---
arch/arm64/kernel/pi/kaslr_early.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
<formletter>
This is not the correct way to submit patches for inclusion in the
stable kernel tree. Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.
</formletter>
Return-Path: <linux-kernel+bounces-673213-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 9AD9A41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:40:56 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id B604D17231A
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:40:57 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 22D2D28F51B;
Wed, 4 Jun 2025 12:40:49 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="a4gbI2uK"
Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 64CBD28EA41
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:40:45 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.118.77.11
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749040848; cv=none; b=XuZtUEYDUclTS6IJFzyihRrFiJsG/14MUvEhPVbsFgmmwdeZ+dTYwVr3xAnJeQvxMVQjOlDRGYqLoItVGkrKObTxywbwAqP+OdLu8U1IuRIzHAGZqO9a4S56sHM+HWrERXRBqOlvzpxifGMSSuWclR2sW2MpthEMzwPqqWDI3u4=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749040848; c=relaxed/simple;
bh=JZodZ9P1TWqjuyQ7ANQr6qONcAswGVx2ceY2TIRVpsc=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:From:In-Reply-To:
Content-Type:References; b=We1V+N6ncn+yBL+IxCiYCGqsrx8SFdX/7HlTjDtRKmr/2WmlvkNoWThWlyElRdBRtiu6wjLxOH9Sx2CH857+DiC1EEyooTSwCfpcZBTib2+a2G92Z6KblqmoVI3qk0cc5VE9pmR0NBwNgpaoyQCpXuu5yp9sRMbogvA1cghPStI=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com; spf=pass smtp.mailfrom=samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=a4gbI2uK; arc=none smtp.client-ip=210.118.77.11
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=samsung.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=samsung.com
Received: from eucas1p1.samsung.com (unknown [182.198.249.206])
by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20250604124043euoutp0135d754fbb7f8fbdb550b60b297388614~F12FYaDck1443714437euoutp01r
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:40:43 +0000 (GMT)
DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20250604124043euoutp0135d754fbb7f8fbdb550b60b297388614~F12FYaDck1443714437euoutp01r
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com;
s=mail20170921; t=1749040843;
bh=kAukIWR6u4Jom32Pa8uBS4iyUUF+BImaglA4PV9oEzQ=;
h=Date:Subject:To:Cc:From:In-Reply-To:References:From;
b=a4gbI2uKh9qSnXTOnisyHBycy4qQuffoUBlkfZVmQG43tehnzN4fdakk6Y0isqje/
tqqU+P3e1u06PJ0Qzx2wVKoxUwR9kowkZGrAOL+XMoBDH2Qq7UffB8MS3ZIZBPjRpy
olmcUWBNOqbeovuk1A1whOHyaiVBG+9DqWHXci+E=
Received: from eusmtip2.samsung.com (unknown [203.254.199.222]) by
eucas1p1.samsung.com (KnoxPortal) with ESMTPA id
20250604124042eucas1p18959bb4cf78c93c05cdaad2ee125c276~F12Eqw0oR1319513195eucas1p1z;
Wed, 4 Jun 2025 12:40:42 +0000 (GMT)
Received: from [192.168.1.44] (unknown [106.210.136.40]) by
eusmtip2.samsung.com (KnoxPortal) with ESMTPA id
20250604124041eusmtip29c8ca08943a9ca4c8ebeb77dd5466bfd~F12DrZDyv0267302673eusmtip2e;
Wed, 4 Jun 2025 12:40:41 +0000 (GMT)
Message-ID: <a68e3bee-f4ad-4d73-a5a8-e39772c41711@xxxxxxxxxxx>
Date: Wed, 4 Jun 2025 14:40:41 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v3 7/8] riscv: dts: thead: th1520: Add IMG BXM-4-64 GPU
node
To: Ulf Hansson <ulf.hansson@xxxxxxxxxx>
Cc: Drew Fustini <drew@xxxxxxxx>, Guo Ren <guoren@xxxxxxxxxx>, Fu Wei
<wefu@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>, Krzysztof Kozlowski
<krzk+dt@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>, Bartosz
Golaszewski <brgl@xxxxxxxx>, Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>, Frank
Binns <frank.binns@xxxxxxxxxx>, Matt Coster <matt.coster@xxxxxxxxxx>,
Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>, Maxime Ripard
<mripard@xxxxxxxxxx>, Thomas Zimmermann <tzimmermann@xxxxxxx>, David Airlie
<airlied@xxxxxxxxx>, Simona Vetter <simona@xxxxxxxx>, Paul Walmsley
<paul.walmsley@xxxxxxxxxx>, Palmer Dabbelt <palmer@xxxxxxxxxxx>, Albert Ou
<aou@xxxxxxxxxxxxxxxxx>, Alexandre Ghiti <alex@xxxxxxxx>, Marek Szyprowski
<m.szyprowski@xxxxxxxxxxx>, linux-riscv@xxxxxxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
linux-pm@xxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx
Content-Language: en-US
From: Michal Wilczynski <m.wilczynski@xxxxxxxxxxx>
In-Reply-To: <CAPDyKFpYfZNthdRN=pCv4FEdFCzrKEH4aFBy4ew-xLKtpbJ5Tg@xxxxxxxxxxxxxx>
Content-Transfer-Encoding: 7bit
X-CMS-MailID: 20250604124042eucas1p18959bb4cf78c93c05cdaad2ee125c276
X-Msg-Generator: CA
Content-Type: text/plain; charset="utf-8"
X-RootMTR: 20250529222410eucas1p2e1d41a2fc717caef1aed51367a7db944
X-EPHeader: CA
X-CMS-RootMailID: 20250529222410eucas1p2e1d41a2fc717caef1aed51367a7db944
References: <CGME20250529222410eucas1p2e1d41a2fc717caef1aed51367a7db944@xxxxxxxxxxxxxxxxxxxx>
<20250530-apr_14_for_sending-v3-0-83d5744d997c@xxxxxxxxxxx>
<20250530-apr_14_for_sending-v3-7-83d5744d997c@xxxxxxxxxxx>
<CAPDyKFpYfZNthdRN=pCv4FEdFCzrKEH4aFBy4ew-xLKtpbJ5Tg@xxxxxxxxxxxxxx>
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 6/3/25 14:27, Ulf Hansson wrote:
On Fri, 30 May 2025 at 00:24, Michal Wilczynski
<m.wilczynski@xxxxxxxxxxx> wrote:
Add a device tree node for the IMG BXM-4-64 GPU present in the T-HEAD
TH1520 SoC used by the Lichee Pi 4A board. This node enables support for
the GPU using the drm/imagination driver.
By adding this node, the kernel can recognize and initialize the GPU,
providing graphics acceleration capabilities on the Lichee Pi 4A and
other boards based on the TH1520 SoC.
Add fixed clock gpu_mem_clk, as the MEM clock on the T-HEAD SoC can't be
controlled programatically.
Signed-off-by: Michal Wilczynski <m.wilczynski@xxxxxxxxxxx>
---
arch/riscv/boot/dts/thead/th1520.dtsi | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/arch/riscv/boot/dts/thead/th1520.dtsi b/arch/riscv/boot/dts/thead/th1520.dtsi
index 6170eec79e919b606a2046ac8f52db07e47ef441..ee937bbdb7c08439a70306f035b1cc82ddb4bae2 100644
--- a/arch/riscv/boot/dts/thead/th1520.dtsi
+++ b/arch/riscv/boot/dts/thead/th1520.dtsi
@@ -225,6 +225,13 @@ aonsys_clk: clock-73728000 {
#clock-cells = <0>;
};
+ gpu_mem_clk: mem-clk {
+ compatible = "fixed-clock";
+ clock-frequency = <0>;
+ clock-output-names = "gpu_mem_clk";
+ #clock-cells = <0>;
+ };
+
stmmac_axi_config: stmmac-axi-config {
snps,wr_osr_lmt = <15>;
snps,rd_osr_lmt = <15>;
@@ -504,6 +511,21 @@ clk: clock-controller@ffef010000 {
#clock-cells = <1>;
};
+ gpu: gpu@ffef400000 {
+ compatible = "thead,th1520-gpu", "img,img-bxm-4-64",
+ "img,img-rogue";
+ reg = <0xff 0xef400000 0x0 0x100000>;
+ interrupt-parent = <&plic>;
+ interrupts = <102 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&clk_vo CLK_GPU_CORE>,
+ <&gpu_mem_clk>,
+ <&clk_vo CLK_GPU_CFG_ACLK>;
+ clock-names = "core", "mem", "sys";
+ power-domains = <&aon TH1520_GPU_PD>;
+ power-domain-names = "a";
If the power-domain-names are really needed, please pick a
useful/descriptive name.
Yeah they are required. Even though this convention doesn't seem to be
enforced by the dt-binding it seems like it's hard-coded into the driver
330e76d31697 ("drm/imagination: Add power domain control"). So I don't
think I have any choice here.
[...]
Kind regards
Uffe
Best regards,
--
Michal Wilczynski <m.wilczynski@xxxxxxxxxxx>
Return-Path: <linux-kernel+bounces-673214-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id EC6DA41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:41:19 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 2A2811893A33
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:41:33 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 870A128FA88;
Wed, 4 Jun 2025 12:40:51 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Py/AWMKV"
Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id D36A528F519;
Wed, 4 Jun 2025 12:40:48 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.181
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749040850; cv=none; b=JjFQmg+ZkCzcU9xdSgs9///G+FC5KwEpcubPSELoUzGXlPgiV3y7mXxzCcU3pNpvScAJMzfDIZ+F5jVOkgk3VU+JRhqNXv6AOwQU1PqExXDyINgt5szI481hTCZwuqXUnf/YvimjrvoRj9IoolIOEdKU3SULz8fuPxM+u+jmHrs=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749040850; c=relaxed/simple;
bh=N8uiVae6oE1XXvRHce8cbIz1nvFVH2qSLdUR8H3ZAP0=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=jLISFQFgb65V8PFxYcTxWMUSasLlL1dT0oYBMED1vB8D9QTc5U13Gcm9TK+bWjfwd3OYRoRky1VwNXJnEuUnlvatRylS2YlJa74/MvckjbBJKNP7y5XLW18OtPCUeKDMaYEiZyXHKRbanUn+ULqJFvF5cCHtHCcL9e7ziZ9CHN8=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Py/AWMKV; arc=none smtp.client-ip=209.85.214.181
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-234b9dfb842so63824745ad.1;
Wed, 04 Jun 2025 05:40:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1749040848; x=1749645648; darn=vger.kernel.org;
h=content-transfer-encoding:in-reply-to:autocrypt:from
:content-language:references:cc:to:subject:user-agent:mime-version
:date:message-id:sender:from:to:cc:subject:date:message-id:reply-to;
bh=YcEj/aWZNhqGZpBtE8sRSulKBrrHvintUVW8xwBX/OU=;
b=Py/AWMKViHuAtW8TZz3hhYp/9otIMUiqDPo/V+6Dk4yNcwHEabinT4F7SU83Kdcri7
UDEI0YPDxcbP6wZwU/eheM0Koal5DO8ydRkpcg3Z5XoIRb7Qw1MgZG227w0pRzhFQxam
T5l6llkaJFKpF/7JIu2DeM8TttsGOEZiMGtC30ZKVqbmCL11gnTRM6vgUp7cLq2usxwf
QlzhOPiow8YQrQGudut63MWCuqEFD3Ja8xQ8HUL10Jl0oMg2SABRuckiiD6mTtYoMKx7
OgFN8faO7+bgOPKS7ghCPZeEsBkUoEmqn5OEYcNAdFQmdA5OhLa1glIJ/Dw0to3V/2Fw
1flg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749040848; x=1749645648;
h=content-transfer-encoding:in-reply-to:autocrypt:from
:content-language:references:cc:to:subject:user-agent:mime-version
:date:message-id:sender:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to;
bh=YcEj/aWZNhqGZpBtE8sRSulKBrrHvintUVW8xwBX/OU=;
b=LgVS48X4PU0j3E1avlRUFYJfWPKgqMBpnslaYPNosUpZqIgUiZMe0VWm6ysTmwB/Ca
Q6Hmse6h7OcwPpaWoVupdIXDfFS0qD1RtEepuW6jVI0Rt2R7Qfkur8Q5oNBRRfcJGI2/
Kh0AwjK0UT6iwioX8HCCx9Mg+0PeyjszKvwbtvhBVEVLG2SNc2bybShiev1ezYn5HosQ
3d3KrPinNB9y3xNHslf+aft0YRbk+Q02HIVvGkCQtzR2K+mAcdX5XPidyyeTaXjTaUA+
QwdrIJliTKWKB/NHiTAq5ZBDBRm2y4kHH7yLC8iSVANZc5AH8yiert9llaXfY0m7v6Kt
YCmg==
X-Forwarded-Encrypted: i=1; AJvYcCUD4VanUPzOCOh3dZed971yaOGqcQ+LbYHKvHpm1yg/D8YTiwJ1xNKIYhEEEKG6IdnxNWcb9w8BEAQR@xxxxxxxxxxxxxxx, AJvYcCVEWokfpd+wnS4seIYOkIAF2d+qMqUqdcdQJ6CC6fxFoRBEVERh5MwtF0S2hUasVraXWLbSPDG79R4zJA==@vger.kernel.org, AJvYcCVUwurfT9NpOkImFYR3sX+S6ACrIch+RU4yb1MZ/Ae36as4fuIpUFEQjXAW+F/veXdZt+Ic+um6PuDmfO8=@vger.kernel.org, AJvYcCVl4QwRjZ7cbMVJtQ6b4ichJ98AoJxkGDrPzFHGvEgH/2AG0CErk6+JPUJweTavvDv/xQi/qeRq@xxxxxxxxxxxxxxx, AJvYcCWHkwml0ipQ9/xbT00haEwC6UWSeThx+ueat4pRUK1i8b+Cy8wBjMz8gg/ieqXetZkQgV6E4qV1EfzG@xxxxxxxxxxxxxxx, AJvYcCWlSIhTuWJZjnhaj3yz19a8b3slwceF1krBvvaSySU93olsXv3haF6rkLv5f2BpVjbmyj7hQKLqyLPgFpgvpOA=@vger.kernel.org, AJvYcCWmuI13FNiRBf9sPuUmBtrHINGlETz6YOSnCIMFtPcqadG4q3FfhbFcDhablaUoJ3cWcaxGykUYeIY=@vger.kernel.org, AJvYcCXBlZtuxxZCQKekiOa10rwZBYJh/teFXrAbcTHBtODTFIazthnigVE4tDGdwNCtciZqh/tVsXP5X8bn@xxxxxxxxxxxxxxx
X-Gm-Message-State: AOJu0Yznub9MmIqACUPcW9xfsr3JslSbYKxQk5hqy6aSBfg+QV2/uYhS
1AG7yWhII9gtdJg5M76PNstG77SkFcyKlpIhdBf3d3KrH5yeEolF2g76
X-Gm-Gg: ASbGnctEry1mhQB+5mHi+vxaBeyfP2cPXUiilk2KUHSl/Ch4qVvpBQfLNpJPeHrbB+p
kK4xXIROKmsJozaGoctMwehXVuNGfwmaRExtFjhktddytvq8m5FW2+brH1U1lth9Kom5MV0Z4Ej
6GFjYBiziUBIKAc34rGG7g/q3JE5lJTW5fvuu+A5syTZqNTcnCEdbGuIhgbG3Vwcxi9cmEb4xlT
tRI1uXI806MPfZyuPC16tb+V2UpbsnZcemE5RK7ntXuNNYtj9CcH4avr6AbfxVyk8HE6mL0x8x4
DfjxoNdTrICiJK1ulCRVxz9oRUiPXZsnovLE6HZu/UOgnAUl25+DbbhDeFZQMkTMCpZFS2W5rys
qbWayYz1YMmfe7uqzAMh+W7d1
X-Google-Smtp-Source: AGHT+IERU/kiPfbUxJ4S1Wpefai0KxefbnmPlZ3YVymeooCAaPKk9C+duebTa/GriRuybAh8KfqKEQ==
X-Received: by 2002:a17:902:7c12:b0:234:98eb:8eda with SMTP id d9443c01a7336-235e11cb8e4mr32732355ad.28.1749040847880;
Wed, 04 Jun 2025 05:40:47 -0700 (PDT)
Received: from ?IPV6:2600:1700:e321:62f0:da43:aeff:fecc:bfd5? ([2600:1700:e321:62f0:da43:aeff:fecc:bfd5])
by smtp.gmail.com with ESMTPSA id d9443c01a7336-23506d22d0dsm102769895ad.257.2025.06.04.05.40.45
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 05:40:47 -0700 (PDT)
Sender: Guenter Roeck <groeck7@xxxxxxxxx>
Message-ID: <12098259-32c4-4524-813e-38aeced837a0@xxxxxxxxxxxx>
Date: Wed, 4 Jun 2025 05:40:44 -0700
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v12 1/7] mfd: Add core driver for Nuvoton NCT6694
To: Oliver Neukum <oneukum@xxxxxxxx>, a0282524688@xxxxxxxxx, lee@xxxxxxxxxx,
linus.walleij@xxxxxxxxxx, brgl@xxxxxxxx, andi.shyti@xxxxxxxxxx,
mkl@xxxxxxxxxxxxxx, mailhol.vincent@xxxxxxxxxx, andrew+netdev@xxxxxxx,
davem@xxxxxxxxxxxxx, edumazet@xxxxxxxxxx, kuba@xxxxxxxxxx,
pabeni@xxxxxxxxxx, wim@xxxxxxxxxxxxxxxxxx, jdelvare@xxxxxxxx,
alexandre.belloni@xxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-gpio@xxxxxxxxxxxxxxx,
linux-i2c@xxxxxxxxxxxxxxx, linux-can@xxxxxxxxxxxxxxx,
netdev@xxxxxxxxxxxxxxx, linux-watchdog@xxxxxxxxxxxxxxx,
linux-hwmon@xxxxxxxxxxxxxxx, linux-rtc@xxxxxxxxxxxxxxx,
linux-usb@xxxxxxxxxxxxxxx, Ming Yu <tmyu0@xxxxxxxxxxx>
References: <20250604041418.1188792-1-tmyu0@xxxxxxxxxxx>
<20250604041418.1188792-2-tmyu0@xxxxxxxxxxx>
<b4c15a6b-0906-4fea-b218-4467afdd8345@xxxxxxxx>
Content-Language: en-US
From: Guenter Roeck <linux@xxxxxxxxxxxx>
Autocrypt: addr=linux@xxxxxxxxxxxx; keydata=
xsFNBE6H1WcBEACu6jIcw5kZ5dGeJ7E7B2uweQR/4FGxH10/H1O1+ApmcQ9i87XdZQiB9cpN
RYHA7RCEK2dh6dDccykQk3bC90xXMPg+O3R+C/SkwcnUak1UZaeK/SwQbq/t0tkMzYDRxfJ7
nyFiKxUehbNF3r9qlJgPqONwX5vJy4/GvDHdddSCxV41P/ejsZ8PykxyJs98UWhF54tGRWFl
7i1xvaDB9lN5WTLRKSO7wICuLiSz5WZHXMkyF4d+/O5ll7yz/o/JxK5vO/sduYDIlFTvBZDh
gzaEtNf5tQjsjG4io8E0Yq0ViobLkS2RTNZT8ICq/Jmvl0SpbHRvYwa2DhNsK0YjHFQBB0FX
IdhdUEzNefcNcYvqigJpdICoP2e4yJSyflHFO4dr0OrdnGLe1Zi/8Xo/2+M1dSSEt196rXaC
kwu2KgIgmkRBb3cp2vIBBIIowU8W3qC1+w+RdMUrZxKGWJ3juwcgveJlzMpMZNyM1jobSXZ0
VHGMNJ3MwXlrEFPXaYJgibcg6brM6wGfX/LBvc/haWw4yO24lT5eitm4UBdIy9pKkKmHHh7s
jfZJkB5fWKVdoCv/omy6UyH6ykLOPFugl+hVL2Prf8xrXuZe1CMS7ID9Lc8FaL1ROIN/W8Vk
BIsJMaWOhks//7d92Uf3EArDlDShwR2+D+AMon8NULuLBHiEUQARAQABzTJHdWVudGVyIFJv
ZWNrIChMaW51eCBhY2NvdW50KSA8bGludXhAcm9lY2stdXMubmV0PsLBgQQTAQIAKwIbAwYL
CQgHAwIGFQgCCQoLBBYCAwECHgECF4ACGQEFAmgrMyQFCSbODQkACgkQyx8mb86fmYGcWRAA
oRwrk7V8fULqnGGpBIjp7pvR187Yzx+lhMGUHuM5H56TFEqeVwCMLWB2x1YRolYbY4MEFlQg
VUFcfeW0OknSr1s6wtrtQm0gdkolM8OcCL9ptTHOg1mmXa4YpW8QJiL0AVtbpE9BroeWGl9v
2TGILPm9mVp+GmMQgkNeCS7Jonq5f5pDUGumAMguWzMFEg+Imt9wr2YA7aGen7KPSqJeQPpj
onPKhu7O/KJKkuC50ylxizHzmGx+IUSmOZxN950pZUFvVZH9CwhAAl+NYUtcF5ry/uSYG2U7
DCvpzqOryJRemKN63qt1bjF6cltsXwxjKOw6CvdjJYA3n6xCWLuJ6yk6CAy1Ukh545NhgBAs
rGGVkl6TUBi0ixL3EF3RWLa9IMDcHN32r7OBhw6vbul8HqyTFZWY2ksTvlTl+qG3zV6AJuzT
WdXmbcKN+TdhO5XlxVlbZoCm7ViBj1+PvIFQZCnLAhqSd/DJlhaq8fFXx1dCUPgQDcD+wo65
qulV/NijfU8bzFfEPgYP/3LP+BSAyFs33y/mdP8kbMxSCjnLEhimQMrSSo/To1Gxp5C97fw5
3m1CaMILGKCmfI1B8iA8zd8ib7t1Rg0qCwcAnvsM36SkrID32GfFbv873bNskJCHAISK3Xkz
qo7IYZmjk/IJGbsiGzxUhvicwkgKE9r7a1rOwU0ETofVZwEQALlLbQeBDTDbwQYrj0gbx3bq
7kpKABxN2MqeuqGr02DpS9883d/t7ontxasXoEz2GTioevvRmllJlPQERVxM8gQoNg22twF7
pB/zsrIjxkE9heE4wYfN1AyzT+AxgYN6f8hVQ7Nrc9XgZZe+8IkuW/Nf64KzNJXnSH4u6nJM
J2+Dt274YoFcXR1nG76Q259mKwzbCukKbd6piL+VsT/qBrLhZe9Ivbjq5WMdkQKnP7gYKCAi
pNVJC4enWfivZsYupMd9qn7Uv/oCZDYoBTdMSBUblaLMwlcjnPpOYK5rfHvC4opxl+P/Vzyz
6WC2TLkPtKvYvXmdsI6rnEI4Uucg0Au/Ulg7aqqKhzGPIbVaL+U0Wk82nz6hz+WP2ggTrY1w
ZlPlRt8WM9w6WfLf2j+PuGklj37m+KvaOEfLsF1v464dSpy1tQVHhhp8LFTxh/6RWkRIR2uF
I4v3Xu/k5D0LhaZHpQ4C+xKsQxpTGuYh2tnRaRL14YMW1dlI3HfeB2gj7Yc8XdHh9vkpPyuT
nY/ZsFbnvBtiw7GchKKri2gDhRb2QNNDyBnQn5mRFw7CyuFclAksOdV/sdpQnYlYcRQWOUGY
HhQ5eqTRZjm9z+qQe/T0HQpmiPTqQcIaG/edgKVTUjITfA7AJMKLQHgp04Vylb+G6jocnQQX
JqvvP09whbqrABEBAAHCwWUEGAECAA8CGwwFAmgrMyQFCSbODQkACgkQyx8mb86fmYHlgg/9
H5JeDmB4jsreE9Bn621wZk7NMzxy9STxiVKSh8Mq4pb+IDu1RU2iLyetCY1TiJlcxnE362kj
njrfAdqyPteHM+LU59NtEbGwrfcXdQoh4XdMuPA5ADetPLma3YiRa3VsVkLwpnR7ilgwQw6u
dycEaOxQ7LUXCs0JaGVVP25Z2hMkHBwx6BlW6EZLNgzGI2rswSZ7SKcsBd1IRHVf0miwIFYy
j/UEfAFNW+tbtKPNn3xZTLs3quQN7GdYLh+J0XxITpBZaFOpwEKV+VS36pSLnNl0T5wm0E/y
scPJ0OVY7ly5Vm1nnoH4licaU5Y1nSkFR/j2douI5P7Cj687WuNMC6CcFd6j72kRfxklOqXw
zvy+2NEcXyziiLXp84130yxAKXfluax9sZhhrhKT6VrD45S6N3HxJpXQ/RY/EX35neH2/F7B
RgSloce2+zWfpELyS1qRkCUTt1tlGV2p+y2BPfXzrHn2vxvbhEn1QpQ6t+85FKN8YEhJEygJ
F0WaMvQMNrk9UAUziVcUkLU52NS9SXqpVg8vgrO0JKx97IXFPcNh0DWsSj/0Y8HO/RDkGXYn
FDMj7fZSPKyPQPmEHg+W/KzxSSfdgWIHF2QaQ0b2q1wOSec4Rti52ohmNSY+KNIW/zODhugJ
np3900V20aS7eD9K8GTU0TGC1pyz6IVJwIE=
In-Reply-To: <b4c15a6b-0906-4fea-b218-4467afdd8345@xxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 6/4/25 03:11, Oliver Neukum wrote:
On 04.06.25 06:14, a0282524688@xxxxxxxxx wrote:
From: Ming Yu <tmyu0@xxxxxxxxxxx>
The Nuvoton NCT6694 provides an USB interface to the host to
access its features.
Sub-devices can use the USB functions nct6694_read_msg() and
nct6694_write_msg() to issue a command. They can also request
interrupt that will be called when the USB device receives its
interrupt pipe.
Signed-off-by: Ming Yu <tmyu0@xxxxxxxxxxx>
---
...
+static void usb_int_callback(struct urb *urb)
+{
+ struct nct6694 *nct6694 = urb->context;
+ unsigned int *int_status = urb->transfer_buffer;
+ int ret;
+
+ switch (urb->status) {
+ case 0:
+ break;
+ case -ECONNRESET:
+ case -ENOENT:
+ case -ESHUTDOWN:
+ return;
+ default:
+ goto resubmit;
+ }
+
+ while (*int_status) {
+ int irq = __ffs(*int_status);
+
+ generic_handle_irq_safe(irq_find_mapping(nct6694->domain, irq));
+ *int_status &= ~BIT(irq);
+ }
Does modifying the byte have any benefit?
Not sure if I understand the question, and assuming your question is regarding
*int_status: *int_status!=0 is the loop invariant, so, yes, modifying it does
have a benefit.
I'd be more concerned that transfer_buffer is the raw buffer, and that data
read from it is not endianness converted. That makes me wonder if and how the
code would work on a big endian system.
Guenter
Return-Path: <linux-kernel+bounces-673215-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 147D641E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:44:13 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 42A23189594A
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:44:26 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id D689328ECEE;
Wed, 4 Jun 2025 12:44:05 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="IcOf3EWo";
dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="p04YYldN";
dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="IcOf3EWo";
dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="p04YYldN"
Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id A80F128D8C5
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:44:03 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749041045; cv=none; b=p1OUVFedHE9dDxSAL5ssd9Vf1+/nTqIKZ0TnKmDoeQfxMdhOTWDC2x22/GsSTKHdDOG8gNbO3Ii+7y1tOgu/DhUd5DTaYfMTi7Yc30B+DvWoO7+qJ6BnCPabjo/AVh9o1zm8JoSLznCcsvr8OUv6C+PiOhhfeC1yT6BBYuU6eog=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749041045; c=relaxed/simple;
bh=DtJJ+9PwKO//7uayEv6jnuC0oRYmGm3D6FieBnUN2K4=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=dLeDIt3QkPzgVfeNfW0VVyD/J3zG9WE+rwmI+6eIkrtNiquWq94jUGl9oPap0p36+r0EINoPKqZU9tbOc2wMRNKnvhi2vsQJvTdiVc5grWklbSqSwCo7oii/jckyo/B9WmSGjIQBnk86wSJN9sPPAkgO8d+lmRvPRL7oQSgURDc=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=IcOf3EWo; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=p04YYldN; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=IcOf3EWo; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=p04YYldN; arc=none smtp.client-ip=195.135.223.130
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de
Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(No client certificate requested)
by smtp-out1.suse.de (Postfix) with ESMTPS id A90C82123D;
Wed, 4 Jun 2025 12:44:01 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa;
t=1749041041; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version:content-type:content-type:
in-reply-to:in-reply-to:references:references;
bh=im3r5Zh1u+5gCVjUWa8hcLEV/Y5bfG/UMN+4ZEhBTvc=;
b=IcOf3EWogi09alHNv9zuMRSG5ALXwNS/bfRWi5gUBIfuKgqXPwVOqMG0IH55IwiEzwVKUa
lFUZf6OMScHFwxE+JbxCEAu5rExS8qrobGhuT0m0yN5rK2x2Dp0RHde258E6WmuHVek0XJ
GwrOnZq+96RmBk4pdyQPfyvYqVa7+L8=
DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de;
s=susede2_ed25519; t=1749041041;
h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version:content-type:content-type:
in-reply-to:in-reply-to:references:references;
bh=im3r5Zh1u+5gCVjUWa8hcLEV/Y5bfG/UMN+4ZEhBTvc=;
b=p04YYldNlnTL6/rR+IgOoeW7ROTl8T6cR+fKv8E+KWHWnT1x9kUkmshSX8CHsEf0ULa40m
NR6br2O03j7mXVBw==
Authentication-Results: smtp-out1.suse.de;
dkim=pass header.d=suse.de header.s=susede2_rsa header.b=IcOf3EWo;
dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=p04YYldN
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa;
t=1749041041; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version:content-type:content-type:
in-reply-to:in-reply-to:references:references;
bh=im3r5Zh1u+5gCVjUWa8hcLEV/Y5bfG/UMN+4ZEhBTvc=;
b=IcOf3EWogi09alHNv9zuMRSG5ALXwNS/bfRWi5gUBIfuKgqXPwVOqMG0IH55IwiEzwVKUa
lFUZf6OMScHFwxE+JbxCEAu5rExS8qrobGhuT0m0yN5rK2x2Dp0RHde258E6WmuHVek0XJ
GwrOnZq+96RmBk4pdyQPfyvYqVa7+L8=
DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de;
s=susede2_ed25519; t=1749041041;
h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version:content-type:content-type:
in-reply-to:in-reply-to:references:references;
bh=im3r5Zh1u+5gCVjUWa8hcLEV/Y5bfG/UMN+4ZEhBTvc=;
b=p04YYldNlnTL6/rR+IgOoeW7ROTl8T6cR+fKv8E+KWHWnT1x9kUkmshSX8CHsEf0ULa40m
NR6br2O03j7mXVBw==
Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(No client certificate requested)
by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id AC4491369A;
Wed, 4 Jun 2025 12:44:00 +0000 (UTC)
Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167])
by imap1.dmz-prg2.suse.org with ESMTPSA
id LY1VJ5A/QGjkUwAAD6G6ig
(envelope-from <osalvador@xxxxxxx>); Wed, 04 Jun 2025 12:44:00 +0000
Date: Wed, 4 Jun 2025 14:43:59 +0200
From: Oscar Salvador <osalvador@xxxxxxx>
To: Zi Yan <ziy@xxxxxxxxxx>
Cc: david@xxxxxxxxxx, Liam.Howlett@xxxxxxxxxx, akpm@xxxxxxxxxxxxxxxxxxxx,
isaacmanjarres@xxxxxxxxxx, jyescas@xxxxxxxxxx,
kaleshsingh@xxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
linux-mm@xxxxxxxxx, lorenzo.stoakes@xxxxxxxxxx,
masahiroy@xxxxxxxxxx, mhocko@xxxxxxxx, minchan@xxxxxxxxxx,
rppt@xxxxxxxxxx, surenb@xxxxxxxxxx, tjmercier@xxxxxxxxxx,
vbabka@xxxxxxx
Subject: Re: [PATCH] mm: rename CONFIG_PAGE_BLOCK_ORDER to
CONFIG_PAGE_BLOCK_ORDER_CEIL.
Message-ID: <aEA_j-OAwAfAchQf@localhost.localdomain>
References: <20250603154843.1565239-1-ziy@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20250603154843.1565239-1-ziy@xxxxxxxxxx>
X-Spamd-Result: default: False [-4.51 / 50.00];
BAYES_HAM(-3.00)[99.99%];
NEURAL_HAM_LONG(-1.00)[-1.000];
R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519];
NEURAL_HAM_SHORT(-0.20)[-1.000];
MIME_GOOD(-0.10)[text/plain];
MX_GOOD(-0.01)[];
ARC_NA(0.00)[];
RCVD_VIA_SMTP_AUTH(0.00)[];
RCVD_TLS_ALL(0.00)[];
MISSING_XM_UA(0.00)[];
MIME_TRACE(0.00)[0:+];
TO_DN_SOME(0.00)[];
RCPT_COUNT_TWELVE(0.00)[17];
RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from];
FUZZY_BLOCKED(0.00)[rspamd.com];
SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from];
FROM_EQ_ENVFROM(0.00)[];
FROM_HAS_DN(0.00)[];
RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received];
RCVD_COUNT_TWO(0.00)[2];
TO_MATCH_ENVRCPT_ALL(0.00)[];
DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:dkim,suse.de:email,imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns];
DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519];
DKIM_TRACE(0.00)[suse.de:+]
X-Spam-Level:
X-Rspamd-Queue-Id: A90C82123D
X-Rspamd-Action: no action
X-Rspamd-Server: rspamd1.dmz-prg2.suse.org
X-Spam-Score: -4.51
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Tue, Jun 03, 2025 at 11:48:43AM -0400, Zi Yan wrote:
The config is in fact an additional upper limit of pageblock_order, so
rename it to avoid confusion.
Fixes: e13e7922d034 ("mm: add CONFIG_PAGE_BLOCK_ORDER to select page block order")
Signed-off-by: Zi Yan <ziy@xxxxxxxxxx>
Reviewed-by: Oscar Salvador <osalvador@xxxxxxx>
--
Oscar Salvador
SUSE Labs
Return-Path: <linux-kernel+bounces-673216-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 9F18D41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:45:08 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id CC4041895C13
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:45:21 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id F1F7328D8FB;
Wed, 4 Jun 2025 12:45:03 +0000 (UTC)
Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 495C428F922;
Wed, 4 Jun 2025 12:44:58 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.199
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749041103; cv=none; b=tJBBtJQcG7uMEmcpQlKcqBLDFu5tdWxH+KVH6VDZ3I/pGzgV9eACWdx/VnkAVZXFFH3KMCsDxhVPrkGPqJEHn/GxDoKL+cDlLZTyTXFV1GKwDPWfKIJwAmkH2tDuO0AFCwsKp0YFpKrII2hK1q7jDdwOSg575TbbvwsfWbejl6I=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749041103; c=relaxed/simple;
bh=8RrE2NkvATIdxMorjU1REsdBWsFeOBZlNKTl1wu5q4c=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=RjsOw44aMHci2f0daGXU6L1aWGxxIb1j/pdaYgIR/1RkWsBz/O/vyGAQUc29GPU0yoCe3XcXp9cFgIlHnuwxoc6hokQhtBEttXAq+ysRkXFqgwYS/CkivMzylbAIxAfn9U2rYr7Mq9dfezbb9nSvaBe6GdAXEr3jMRX50vBUIc4=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ghiti.fr; spf=pass smtp.mailfrom=ghiti.fr; arc=none smtp.client-ip=217.70.183.199
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ghiti.fr
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ghiti.fr
Received: by mail.gandi.net (Postfix) with ESMTPSA id B189A439BC;
Wed, 4 Jun 2025 12:44:54 +0000 (UTC)
Message-ID: <c239ee1b-f201-4e7b-80f8-03a7fb02b666@xxxxxxxx>
Date: Wed, 4 Jun 2025 14:44:54 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: Broken 32-bit riscv debug build with ZSTD and FTRACE
To: Marco Bonelli <marco@xxxxxxxxxx>,
"linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>
Cc: "terrelln@xxxxxx" <terrelln@xxxxxx>,
"rostedt@xxxxxxxxxxx" <rostedt@xxxxxxxxxxx>,
"mhiramat@xxxxxxxxxx" <mhiramat@xxxxxxxxxx>,
"mark.rutland@xxxxxxx" <mark.rutland@xxxxxxx>,
"linux-trace-kernel@xxxxxxxxxxxxxxx" <linux-trace-kernel@xxxxxxxxxxxxxxx>,
"paul.walmsley@xxxxxxxxxx" <paul.walmsley@xxxxxxxxxx>,
"palmer@xxxxxxxxxxx" <palmer@xxxxxxxxxxx>,
"aou@xxxxxxxxxxxxxxxxx" <aou@xxxxxxxxxxxxxxxxx>,
"linux-riscv@xxxxxxxxxxxxxxxxxxx" <linux-riscv@xxxxxxxxxxxxxxxxxxx>
References: <960240908.630790.1748641210849@xxxxxxxxxxxxxxxx>
<1552795452.650306.1748692371190@xxxxxxxxxxxxxxxx>
Content-Language: en-US
From: Alexandre Ghiti <alex@xxxxxxxx>
In-Reply-To: <1552795452.650306.1748692371190@xxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-GND-State: clean
X-GND-Score: -100
X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddugddvudeiucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeenucfhrhhomheptehlvgigrghnughrvgcuifhhihhtihcuoegrlhgvgiesghhhihhtihdrfhhrqeenucggtffrrghtthgvrhhnpeetieeitefghfeuvddvjeeiudehheeiffffgeeviedtleehgeffgfdtveekteehudenucffohhmrghinhepihhnfhhrrgguvggrugdrohhrghenucfkphepudelfedrfeefrdehjedrudelleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduleefrdeffedrheejrdduleelpdhhvghloheplgduledvrdduieekrddvuddrvdeingdpmhgrihhlfhhrohhmpegrlhgvgiesghhhihhtihdrfhhrpdhnsggprhgtphhtthhopeduuddprhgtphhtthhopehmrghrtghosehmvggsvghimhdrnhgvthdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehtvghrrhgvlhhlnhesfhgsrdgtohhmpdhrtghpthhtoheprhhoshhtvgguthesghhoohgumhhishdrohhrghdprhgtphhtthhopehmhhhirhgrmhgrtheskhgvrhhnvghlrdhorhhgpdhrtghpthhtohepm
hgrrhhkrdhruhhtlhgrnhgusegrrhhmrdgtohhmpdhrtghpthhtoheplhhinhhugidqthhrrggtvgdqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohepphgruhhlrdifrghlmhhslhgvhiesshhifhhivhgvrdgtohhm
X-GND-Sasl: alex@xxxxxxxx
X-Spam-Status: No, score=-3.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hi Marco,
On 5/31/25 13:52, Marco Bonelli wrote:
Steps to reproduce:
export ARCH=riscv CROSS_COMPILE=riscv32-linux-
make distclean
make defconfig
make 32-bit.config
./scripts/config \
-e DEBUG_KERNEL \
-e DEBUG_INFO \
-e DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT \
-d DEBUG_INFO_NONE \
-d DEBUG_INFO_REDUCED
make olddefconfig
make -j vmlinux
Sorry, forgot to add "-e FTRACE" to the steps above. Here it is:
export ARCH=riscv CROSS_COMPILE=riscv32-linux-
make distclean
make defconfig
make 32-bit.config
./scripts/config \
-e DEBUG_KERNEL \
-e DEBUG_INFO \
-e DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT \
-d DEBUG_INFO_NONE \
-d DEBUG_INFO_REDUCED \
-e FTRACE
make olddefconfig
make -j vmlinux
Everything else still applies.
--
Marco Bonelli
_______________________________________________
linux-riscv mailing list
linux-riscv@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/linux-riscv
First, thanks for the report!
I unfortunately cannot reproduce this issue locally, I tried on both
v6.15 and latest linus master, with gcc 13.1.0 and gcc 14.2.0 . I made
sure that I have FTRACE, ZSTD_COMPRESS and DEBUG_INFO enabled.
Can you attach your full config?
Thanks,
Alex
Return-Path: <linux-kernel+bounces-673217-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 632DC41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:46:33 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 8A2B97A25D9
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:45:13 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 896F728ECDD;
Wed, 4 Jun 2025 12:46:23 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="aP0TCoLo"
Received: from out30-110.freemail.mail.aliyun.com (out30-110.freemail.mail.aliyun.com [115.124.30.110])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4BA5624DCF9;
Wed, 4 Jun 2025 12:46:17 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.110
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749041182; cv=none; b=q1Cf6aWsDm6XwxWtgduowmcGfsabd/eVyOuQzG37NjkvH++W2fsIvkJaMISJkexGSQHenLpZm6YLMaO2F2ySLH0UEQXlNzHnPED2YHmSGJ6lS5moXD/Jo9zMYVcHgkfTjSHbBxGtMhEd+vxJTyqck1TfuXVr/n5+N++w1eBgOME=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749041182; c=relaxed/simple;
bh=Jj5d5qdiuvNZV+1ZocrmbCC3IGMI4hi5uTm1a75PdYA=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=DwL/+vmV4ukHF9K92UCm0D3SLo9HRT1DOa1VuGVkUCylwwAn2ayGSIOmRRcMIU01FVCPsji+cYxBBRXJ+iiRC0WumLo79YQOZQPJy7nZ0hH+0LBfCFVEd/9XelBmyx3wEwQs7t2A+zlddg9/nTutf87PJoLqRVnMb9GD2DG0ED8=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=aP0TCoLo; arc=none smtp.client-ip=115.124.30.110
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com
DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed;
d=linux.alibaba.com; s=default;
t=1749041169; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type;
bh=TPLFxmuO1Q5FsFGt4jj6PdsNEZVTzIdznxUKQp9Xs4o=;
b=aP0TCoLo+hrHR3m6LmEXykmRNzuv/qqlwIe5N2b5VaP8UvceZeIJbqYYVB9Uu4b+vuF4fJl/nwseLLtQ2/arykUp/7v5SQsGKSFKKp8y+LYXegJZP8hgEKCxZ6LleiYaTqMSjDjQBKnXOqT0wT2ZiKk4id1q2LaKmtjnysy90ng=
Received: from 30.121.8.237(mailfrom:baolin.wang@xxxxxxxxxxxxxxxxx fp:SMTPD_---0Wd4RjKR_1749041167 cluster:ay36)
by smtp.aliyun-inc.com;
Wed, 04 Jun 2025 20:46:07 +0800
Message-ID: <250ec733-8b2d-4c56-858c-6aada9544a55@xxxxxxxxxxxxxxxxx>
Date: Wed, 4 Jun 2025 20:46:02 +0800
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH] mm: fix the inaccurate memory statistics issue for users
To: Shakeel Butt <shakeel.butt@xxxxxxxxx>, Michal Hocko <mhocko@xxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, david@xxxxxxxxxx,
lorenzo.stoakes@xxxxxxxxxx, Liam.Howlett@xxxxxxxxxx, vbabka@xxxxxxx,
rppt@xxxxxxxxxx, surenb@xxxxxxxxxx, donettom@xxxxxxxxxxxxx,
aboorvad@xxxxxxxxxxxxx, sj@xxxxxxxxxx, linux-mm@xxxxxxxxx,
linux-fsdevel@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
References: <4f0fd51eb4f48c1a34226456b7a8b4ebff11bf72.1748051851.git.baolin.wang@xxxxxxxxxxxxxxxxx>
<20250529205313.a1285b431bbec2c54d80266d@xxxxxxxxxxxxxxxxxxxx>
<aDm1GCV8yToFG1cq@tiehlicka>
<72f0dc8c-def3-447c-b54e-c390705f8c26@xxxxxxxxxxxxxxxxx>
<aD6vHzRhwyTxBqcl@tiehlicka>
<ef2c9e13-cb38-4447-b595-f461f3f25432@xxxxxxxxxxxxxxxxx>
<aD7OM5Mrg5jnEnBc@tiehlicka>
<7307bb7a-7c45-43f7-b073-acd9e1389000@xxxxxxxxxxxxxxxxx>
<aD8LKHfCca1wQ5pS@tiehlicka>
<obfnlpvc4tmb6gbd4mw7h7jamp3kouyhnpl4cusetyctswznod@yr6dyrsbay6w>
From: Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx>
In-Reply-To: <obfnlpvc4tmb6gbd4mw7h7jamp3kouyhnpl4cusetyctswznod@yr6dyrsbay6w>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-10.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,
USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 2025/6/4 01:29, Shakeel Butt wrote:
On Tue, Jun 03, 2025 at 04:48:08PM +0200, Michal Hocko wrote:
On Tue 03-06-25 22:22:46, Baolin Wang wrote:
Let me try to clarify further.
The 'mm->rss_stat' is updated by using add_mm_counter(),
dec/inc_mm_counter(), which are all wrappers around
percpu_counter_add_batch(). In percpu_counter_add_batch(), there is percpu
batch caching to avoid 'fbc->lock' contention.
OK, this is exactly the line of argument I was looking for. If _all_
updates done in the kernel are using batching and therefore the lock is
only held every N (percpu_counter_batch) updates then a risk of locking
contention would be decreased. This is worth having a note in the
changelog.
OK.
This patch changes task_mem()
and task_statm() to get the accurate mm counters under the 'fbc->lock', but
this will not exacerbate kernel 'mm->rss_stat' lock contention due to the
the percpu batch caching of the mm counters.
You might argue that my test cases cannot demonstrate an actual lock
contention, but they have already shown that there is no significant
'fbc->lock' contention when the kernel updates 'mm->rss_stat'.
I was arguing that `top -d 1' doesn't really represent a potential
adverse usage. These proc files are generally readable so I would be
expecting something like busy loop read while process tries to update
counters to see the worst case scenario. If that is barely visible then
we can conclude a normal use wouldn't even notice.
OK.
Baolin, please run stress-ng command that stresses minor anon page
faults in multiple threads and then run multiple bash scripts which cat
/proc/pidof(stress-ng)/status. That should be how much the stress-ng
process is impacted by the parallel status readers versus without them.
Sure. Thanks Shakeel. I run the stress-ng with the 'stress-ng --fault 32
--perf -t 1m' command, while simultaneously running the following
scripts to read the /proc/pidof(stress-ng)/status for each thread.
From the following data, I did not observe any obvious impact of this
patch on the stress-ng tests when repeatedly reading the
/proc/pidof(stress-ng)/status.
w/o patch
stress-ng: info: [6891] 3,993,235,331,584 CPU Cycles
59.767 B/sec
stress-ng: info: [6891] 1,472,101,565,760 Instructions
22.033 B/sec (0.369 instr. per cycle)
stress-ng: info: [6891] 36,287,456 Page Faults Total
0.543 M/sec
stress-ng: info: [6891] 36,287,456 Page Faults Minor
0.543 M/sec
w/ patch
stress-ng: info: [6872] 4,018,592,975,968 CPU Cycles
60.177 B/sec
stress-ng: info: [6872] 1,484,856,150,976 Instructions
22.235 B/sec (0.369 instr. per cycle)
stress-ng: info: [6872] 36,547,456 Page Faults Total
0.547 M/sec
stress-ng: info: [6872] 36,547,456 Page Faults Minor
0.547 M/sec
=========================
#!/bin/bash
# Get the PIDs of stress-ng processes
PIDS=$(pgrep stress-ng)
# Loop through each PID and monitor /proc/[pid]/status
for PID in $PIDS; do
while true; do
cat /proc/$PID/status
usleep 100000
done &
done
Return-Path: <linux-kernel+bounces-673218-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 3A75641E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:46:55 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id A5BA31895B2C
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:47:08 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 708B628DF55;
Wed, 4 Jun 2025 12:46:47 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Ia0N+eAW"
Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id DD09D28B7ED
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:46:44 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.50
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749041206; cv=none; b=YhD5nt9nIFAwxGquLOjyidVOlIkZZaBRU/VZISKq4arcyCJ9f6YudQWb2AWOovehQ/EblpARZtOvqAJ7cPwvx+LUir6dyHijCuPDww27WU6NdnHk4fYxrhaBLSbXfHHrS09eY1u2qu+rORK2LiTTZuHcEuMAWY2geJ5SznDHM/A=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749041206; c=relaxed/simple;
bh=kGTwydqDMCIPl1CpZID+y6ccqB84UAx9ACYmkDc7hJg=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=R2Q9I+ZeCA6AlYaLEmA1gmHyqtUqSnwgb813xoLOYzYXBwmsIIOffasCjJwSF4mrz1Xr9pi14meGu1GcOJ5qqffeq2ym98GJwz2OrNSD3esd+LDeYlbcUVJXkPttnWfpwg6l3g9Ifw5x7qXmKMcM+BaN0qt9tTrO6UIk+P/5GpI=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=Ia0N+eAW; arc=none smtp.client-ip=209.85.208.50
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org
Received: by mail-ed1-f50.google.com with SMTP id 4fb4d7f45d1cf-5efe8d9ebdfso13151146a12.3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 05:46:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=linaro.org; s=google; t=1749041203; x=1749646003; darn=vger.kernel.org;
h=in-reply-to:content-disposition:mime-version:references:message-id
:subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to;
bh=F6qdJO3p1x1A/ngwXZAm0UCO5G7hC2bDfKwNoG0neIM=;
b=Ia0N+eAWw0RMn7qQ2DLnwDjzHtu0CoS6kblI8MC+dHTfNxWtYaB64YEQ5Xz5/DGyWl
CTCe9R5zlkgZji4NQAs0qi2yTSNoa6/dR8OJl2jwvjG3fTiQIxp+TtmgavvCKsa0Hr8h
7/33rwjR5oUZCIORhShDNvfk5HWNjxuBxepxQGSsmcVODjWDEOE8Fcjw3UHzGyotYyyR
ZbjWFNQbqVn/WjC4di0odXWufJFU+snScR61sycc67e7GkOYWfxC2jViZggMA8fX4g0Z
mZtZqg5E7f5KX4YroXJ8ZkWY1zznmWW1tmMfwmSYsxtr672t0b1f0diyeqVWCY479/Bn
h7NQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749041203; x=1749646003;
h=in-reply-to:content-disposition:mime-version:references:message-id
:subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to;
bh=F6qdJO3p1x1A/ngwXZAm0UCO5G7hC2bDfKwNoG0neIM=;
b=JwuO/RspRKpgJRKLGKTu8aXU4mTkHEHf0wgR4OV28JsKRaGIHaENKAkLpl0gbpUDaH
VKgtjKjfnHvvXzDnqOpieRs8oQj7tidXGmMjmn0s5bEVxbgIuUkOXI0wV5bnFC6f54/W
hJps2lYq+6Vm1l0dw6jZ3t5TEN/wafoGtlAiQQF70TP4GCWJyH+T59gJyQp7krNflKyj
7+ct2tqWI0AQoXd5qqfLasfxu0hCGGZJKPUfkHQybJnkA7Y0kDpHIZ6NTc16y/kKV8FR
ABuEyuThbkJxQp2aTWPlPBt6vHl//sJXauoyNaBWcU4RKujha5+D0JVIuoNCkwLXC79l
xKLw==
X-Forwarded-Encrypted: i=1; AJvYcCW9DH5rZ+ug8H5VA14cUldYn+KnxwBu18fFK7v27J63rf52PYWdhT+qidsxdi1fGuMBVSxucu6we6ZXnQw=@vger.kernel.org
X-Gm-Message-State: AOJu0Yw2D88cde9qy4/BF6Of5p4t0M+BmlZj6HFN2DKDzggtFP8t7Mo2
0gFOsYaGaLDyDOr9H2ydflJbXzHHqigvxJPijY7BtqJo4GA7O8R2A9NayfX6tKEkj6s=
X-Gm-Gg: ASbGncvctG2y5EGYx9AjkVT6arlkBGqqF2KVos8wmT2yeGdpLPDN4cYPB67kYK+sDjX
c6vHXmyNtQhiVDyGDTGX6P9p6KKUXLo9qS/dGycchaUzZ+gVr6NX5FmQFXky3aYnfS8jSYSMRbX
NZijGg5JAr+WPzFgbKb3Phl8zDlhHbn0f58grXYh7YntRgOTOGWPhh3sli2f8E+AkZfJHLDBw+o
jO42k7/Tg4gFO7KN5VJ6G5IPxBItVP0M5+K3JwkeTs17lFM/gtZrPDr9o/WsU4hYBtKl7H2BLWQ
E0hVoYUBtlgrfeFnMj5eOiuxVNgUC6NzFagc5M0ECnsfFev+AQY+ELdgRP4=
X-Google-Smtp-Source: AGHT+IH3hjyMtS7nUHzS5hLiFEDH6xWffHB5UpuCedgbYbZsl9L/r1OhGo56kbxkn7IVvP66st9SWg==
X-Received: by 2002:a17:907:1ca1:b0:ad2:2dc9:e3d3 with SMTP id a640c23a62f3a-addf8ffa8d4mr256307466b.57.1749041203137;
Wed, 04 Jun 2025 05:46:43 -0700 (PDT)
Received: from linaro.org ([62.231.96.41])
by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ada5dd04551sm1102106966b.93.2025.06.04.05.46.41
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 05:46:42 -0700 (PDT)
Date: Wed, 4 Jun 2025 15:46:41 +0300
From: Abel Vesa <abel.vesa@xxxxxxxxxx>
To: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
Cc: Vinod Koul <vkoul@xxxxxxxxxx>,
Kishon Vijay Abraham I <kishon@xxxxxxxxxx>,
Neil Armstrong <neil.armstrong@xxxxxxxxxx>,
linux-arm-msm@xxxxxxxxxxxxxxx, linux-phy@xxxxxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
Subject: Re: [PATCH v2] phy: use per-PHY lockdep keys
Message-ID: <aEBAMUdAVPB+cN78@xxxxxxxxxx>
References: <20250530-phy-subinit-v2-1-09dfe80e82a8@xxxxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20250530-phy-subinit-v2-1-09dfe80e82a8@xxxxxxxxxxxxxxxx>
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 25-05-30 19:08:28, Dmitry Baryshkov wrote:
If the PHY driver uses another PHY internally (e.g. in case of eUSB2,
repeaters are represented as PHYs), then it would trigger the following
lockdep splat because all PHYs use a single static lockdep key and thus
lockdep can not identify whether there is a dependency or not and
reports a false positive.
Make PHY subsystem use dynamic lockdep keys, assigning each driver a
separate key. This way lockdep can correctly identify dependency graph
between mutexes.
[...]
Fixes: 3584f6392f09 ("phy: qcom: phy-qcom-snps-eusb2: Add support for eUSB2 repeater")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
I'm OK with this as a temporary workaround, at least until we figure out
a way to have chained PHYs in the generic framework. I think long-term,
the PHY framework should be the one to call the ops of the child PHY on
behalf of the parent.
For now, this LGTM:
Reviewed-by: Abel Vesa <abel.vesa@xxxxxxxxxx>
Return-Path: <linux-kernel+bounces-673219-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 3220941E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:48:42 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 2952E3A5DB3
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:48:20 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id BB8A428E594;
Wed, 4 Jun 2025 12:48:36 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="D9IRWFvD"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id DBC8D24DCF9
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:48:33 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749041315; cv=none; b=GoQEd7Q/UievUv8kb0UenxIPpekrox7Cn8leNzFfkGyFYOIMDnh6nPbSQONC3wMmfmfTh7C62CNZxstsAdkfZQMGUF6S5q6HTe+iqD3dNY2YECdng/ppHiemLPi+aiVlz9H63CIT4zio2VNBnsXP+eeUHmttRUouIFMFd54z4SM=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749041315; c=relaxed/simple;
bh=j8kfcfU5sJX8+yJp89WFjNqGUdAf9gIl614lAbvkqzk=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=SXyqSrIo6E+YDYhRi/PfZG/SmfgNNYiY50AH7CnfqzJfDT2g5wbjZRAat7JbUOfW4FtvQbprMiRKWd/SwbmOs9gOWSYGMmfaN9Wjv77313ktvju04asQHItrpTTZ9RsF8JDsD047Y5QRG4c0GVAYEQUmKHSZHCqwSFzInQPawZc=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=D9IRWFvD; arc=none smtp.client-ip=170.10.129.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749041309;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=nkl2JIgedI+lh+fHfhg8esoPVeYFJN0tO6EBmBp+OMQ=;
b=D9IRWFvDAhXb5PK8ezfP+ck78zP/bS7/Swi+iLLbaxOKknOZCki/f+14MBQAibA65TsfOw
xUSnW8lECDPl7119OJvsc81VjfQHAxpv7zGWA434vadL6iAHaQIWbuay/K8Bi036Tuz46d
G2ppbQGrXilAnFr6+Z6ckATlxUmYAYU=
Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com
[209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-563-1f2K9JCKOl-S7wgTDJy0GQ-1; Wed, 04 Jun 2025 08:47:46 -0400
X-MC-Unique: 1f2K9JCKOl-S7wgTDJy0GQ-1
X-Mimecast-MFC-AGG-ID: 1f2K9JCKOl-S7wgTDJy0GQ_1749041250
Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-3a503f28b09so468977f8f.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 05:47:39 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749041250; x=1749646050;
h=content-transfer-encoding:in-reply-to:organization:autocrypt
:content-language:from:references:cc:to:subject:user-agent
:mime-version:date:message-id:x-gm-message-state:from:to:cc:subject
:date:message-id:reply-to;
bh=nkl2JIgedI+lh+fHfhg8esoPVeYFJN0tO6EBmBp+OMQ=;
b=PavKpZDeP2NbkdJcGoPqYH56N95eZJn0phCM96p1wtDSsdRqit9dUXBrLqGjg0NdMu
OMhwf0TxbHjGISMutKEu3XETRH0roZSd5dIAf0At8NzTexEHZAdKnCDaZmQ6Xcd82wuH
7gDZ3g5qfk+bcM/erccZsPz8cIK6B/jJs+TJ75iDif7NG7f8zLOaIsoFl15jB8RpiTk3
eJFmU/nUg9jmTPqGAozkUBJGR2gfiGIsRdErHo7pNGuGuOzVHXume3vOdpcPgZV9HAe1
61f15StGEmf//CYRKDREW2iTmcnyG5wrB+FLYfddVN6SpWGP1capc7xNlgz6bNUVvJTh
VrnA==
X-Forwarded-Encrypted: i=1; AJvYcCVRX1vtv4GERNQ+mP/CNOwWYobqhXS6pYZ/53c3rheehEYjC37O1oRO6nkW2R/pRV1XnT/yJLvrsRIie+U=@vger.kernel.org
X-Gm-Message-State: AOJu0YzJpLIJzyF/y7Wg9CoMtieVW2PduiEaOcwlRR2r8cOfoMgaLBEu
nHUumW1eaMiqThNnmzodib7jStCtX0vQtMzEUO2bMKd6bQBoIKiFCpcTPGvDVALkdJqXTV6FDSU
D/+8y+AeSDspZq7jZPgWpW25B+P+qN2JxmtRDg4ymizlMG2+3XKhXD3VDp+lP52CeA6xxG6jrzV
Km
X-Gm-Gg: ASbGncu+sl1otpMLFGkyxgmS8yiblLfxCx2DRxvfmaZupd7RTMpJsaT3UiZwFrh8BXJ
w6kgEV6tgxeunAGheaaPIkfv+KhLB7pu2psVTaLCj6KZau30JK+YgnBBUtZZo/ReFxhiQWVXYo+
zidmBoYSJx01LypLSHrTjxJ8MVBq1jS8MV4gzufkZdYh9CH38bfvvd/a+Z8S6oWEjiR2JBe991m
2i9wMm8QyBH0xPjWjmK+9Gehgf2DmsKD+YgbTmMhr/Sw51cL1aKSVDeBN+v8x4VwWoyQV3BKkA4
C7poDc9cx/3XZoO3/nexBzrQEI9EotV8C5/22MR2xF4SbU3iGqesgdXKGf6GKYV1ty2vVWu66wr
798D2hAkfIypnFhf0SNd4bSMnSHWwZQy0IGFfQ0aIzUosvFHMCg==
X-Received: by 2002:a05:6000:208a:b0:3a1:f724:eb15 with SMTP id ffacd0b85a97d-3a51d5071a1mr2456910f8f.2.1749041250077;
Wed, 04 Jun 2025 05:47:30 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IH2ikj7SNZj+e8kpLXQxObBNug4vHxRmdavde46XRKhzFX4HfEx52ROo2DmOQ3b+1NNGe0NjA==
X-Received: by 2002:a05:6000:208a:b0:3a1:f724:eb15 with SMTP id ffacd0b85a97d-3a51d5071a1mr2456890f8f.2.1749041249698;
Wed, 04 Jun 2025 05:47:29 -0700 (PDT)
Received: from ?IPV6:2003:d8:2f1b:b800:6fdb:1af2:4fbd:1fdf? (p200300d82f1bb8006fdb1af24fbd1fdf.dip0.t-ipconnect.de. [2003:d8:2f1b:b800:6fdb:1af2:4fbd:1fdf])
by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a524896574sm561497f8f.56.2025.06.04.05.47.28
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 05:47:29 -0700 (PDT)
Message-ID: <9a845c21-5cfb-4535-97bd-0b02f5852457@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 14:47:28 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v4 2/3] mm,memory_hotplug: Implement numa node notifier
To: Oscar Salvador <osalvador@xxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>,
Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>,
Harry Yoo <harry.yoo@xxxxxxxxxx>, Rakie Kim <rakie.kim@xxxxxx>,
Hyeonggon Yoo <42.hyeyoo@xxxxxxxxx>, linux-mm@xxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
References: <20250603110850.192912-1-osalvador@xxxxxxx>
<20250603110850.192912-3-osalvador@xxxxxxx>
<ddcdd8b9-566c-4f6c-b1f7-861e93a80fbb@xxxxxxxxxx>
<aEA-K3hTvhtdUxuA@localhost.localdomain>
From: David Hildenbrand <david@xxxxxxxxxx>
Content-Language: en-US
Autocrypt: addr=david@xxxxxxxxxx; keydata=
xsFNBFXLn5EBEAC+zYvAFJxCBY9Tr1xZgcESmxVNI/0ffzE/ZQOiHJl6mGkmA1R7/uUpiCjJ
dBrn+lhhOYjjNefFQou6478faXE6o2AhmebqT4KiQoUQFV4R7y1KMEKoSyy8hQaK1umALTdL
QZLQMzNE74ap+GDK0wnacPQFpcG1AE9RMq3aeErY5tujekBS32jfC/7AnH7I0v1v1TbbK3Gp
XNeiN4QroO+5qaSr0ID2sz5jtBLRb15RMre27E1ImpaIv2Jw8NJgW0k/D1RyKCwaTsgRdwuK
Kx/Y91XuSBdz0uOyU/S8kM1+ag0wvsGlpBVxRR/xw/E8M7TEwuCZQArqqTCmkG6HGcXFT0V9
PXFNNgV5jXMQRwU0O/ztJIQqsE5LsUomE//bLwzj9IVsaQpKDqW6TAPjcdBDPLHvriq7kGjt
WhVhdl0qEYB8lkBEU7V2Yb+SYhmhpDrti9Fq1EsmhiHSkxJcGREoMK/63r9WLZYI3+4W2rAc
UucZa4OT27U5ZISjNg3Ev0rxU5UH2/pT4wJCfxwocmqaRr6UYmrtZmND89X0KigoFD/XSeVv
jwBRNjPAubK9/k5NoRrYqztM9W6sJqrH8+UWZ1Idd/DdmogJh0gNC0+N42Za9yBRURfIdKSb
B3JfpUqcWwE7vUaYrHG1nw54pLUoPG6sAA7Mehl3nd4pZUALHwARAQABzSREYXZpZCBIaWxk
ZW5icmFuZCA8ZGF2aWRAcmVkaGF0LmNvbT7CwZgEEwEIAEICGwMGCwkIBwMCBhUIAgkKCwQW
AgMBAh4BAheAAhkBFiEEG9nKrXNcTDpGDfzKTd4Q9wD/g1oFAl8Ox4kFCRKpKXgACgkQTd4Q
9wD/g1oHcA//a6Tj7SBNjFNM1iNhWUo1lxAja0lpSodSnB2g4FCZ4R61SBR4l/psBL73xktp
rDHrx4aSpwkRP6Epu6mLvhlfjmkRG4OynJ5HG1gfv7RJJfnUdUM1z5kdS8JBrOhMJS2c/gPf
wv1TGRq2XdMPnfY2o0CxRqpcLkx4vBODvJGl2mQyJF/gPepdDfcT8/PY9BJ7FL6Hrq1gnAo4
3Iv9qV0JiT2wmZciNyYQhmA1V6dyTRiQ4YAc31zOo2IM+xisPzeSHgw3ONY/XhYvfZ9r7W1l
pNQdc2G+o4Di9NPFHQQhDw3YTRR1opJaTlRDzxYxzU6ZnUUBghxt9cwUWTpfCktkMZiPSDGd
KgQBjnweV2jw9UOTxjb4LXqDjmSNkjDdQUOU69jGMUXgihvo4zhYcMX8F5gWdRtMR7DzW/YE
BgVcyxNkMIXoY1aYj6npHYiNQesQlqjU6azjbH70/SXKM5tNRplgW8TNprMDuntdvV9wNkFs
9TyM02V5aWxFfI42+aivc4KEw69SE9KXwC7FSf5wXzuTot97N9Phj/Z3+jx443jo2NR34XgF
89cct7wJMjOF7bBefo0fPPZQuIma0Zym71cP61OP/i11ahNye6HGKfxGCOcs5wW9kRQEk8P9
M/k2wt3mt/fCQnuP/mWutNPt95w9wSsUyATLmtNrwccz63XOwU0EVcufkQEQAOfX3n0g0fZz
Bgm/S2zF/kxQKCEKP8ID+Vz8sy2GpDvveBq4H2Y34XWsT1zLJdvqPI4af4ZSMxuerWjXbVWb
T6d4odQIG0fKx4F8NccDqbgHeZRNajXeeJ3R7gAzvWvQNLz4piHrO/B4tf8svmRBL0ZB5P5A
2uhdwLU3NZuK22zpNn4is87BPWF8HhY0L5fafgDMOqnf4guJVJPYNPhUFzXUbPqOKOkL8ojk
CXxkOFHAbjstSK5Ca3fKquY3rdX3DNo+EL7FvAiw1mUtS+5GeYE+RMnDCsVFm/C7kY8c2d0G
NWkB9pJM5+mnIoFNxy7YBcldYATVeOHoY4LyaUWNnAvFYWp08dHWfZo9WCiJMuTfgtH9tc75
7QanMVdPt6fDK8UUXIBLQ2TWr/sQKE9xtFuEmoQGlE1l6bGaDnnMLcYu+Asp3kDT0w4zYGsx
5r6XQVRH4+5N6eHZiaeYtFOujp5n+pjBaQK7wUUjDilPQ5QMzIuCL4YjVoylWiBNknvQWBXS
lQCWmavOT9sttGQXdPCC5ynI+1ymZC1ORZKANLnRAb0NH/UCzcsstw2TAkFnMEbo9Zu9w7Kv
AxBQXWeXhJI9XQssfrf4Gusdqx8nPEpfOqCtbbwJMATbHyqLt7/oz/5deGuwxgb65pWIzufa
N7eop7uh+6bezi+rugUI+w6DABEBAAHCwXwEGAEIACYCGwwWIQQb2cqtc1xMOkYN/MpN3hD3
AP+DWgUCXw7HsgUJEqkpoQAKCRBN3hD3AP+DWrrpD/4qS3dyVRxDcDHIlmguXjC1Q5tZTwNB
boaBTPHSy/Nksu0eY7x6HfQJ3xajVH32Ms6t1trDQmPx2iP5+7iDsb7OKAb5eOS8h+BEBDeq
3ecsQDv0fFJOA9ag5O3LLNk+3x3q7e0uo06XMaY7UHS341ozXUUI7wC7iKfoUTv03iO9El5f
XpNMx/YrIMduZ2+nd9Di7o5+KIwlb2mAB9sTNHdMrXesX8eBL6T9b+MZJk+mZuPxKNVfEQMQ
a5SxUEADIPQTPNvBewdeI80yeOCrN+Zzwy/Mrx9EPeu59Y5vSJOx/z6OUImD/GhX7Xvkt3kq
Er5KTrJz3++B6SH9pum9PuoE/k+nntJkNMmQpR4MCBaV/J9gIOPGodDKnjdng+mXliF3Ptu6
3oxc2RCyGzTlxyMwuc2U5Q7KtUNTdDe8T0uE+9b8BLMVQDDfJjqY0VVqSUwImzTDLX9S4g/8
kC4HRcclk8hpyhY2jKGluZO0awwTIMgVEzmTyBphDg/Gx7dZU1Xf8HFuE+UZ5UDHDTnwgv7E
th6RC9+WrhDNspZ9fJjKWRbveQgUFCpe1sa77LAw+XFrKmBHXp9ZVIe90RMe2tRL06BGiRZr
jPrnvUsUUsjRoRNJjKKA/REq+sAnhkNPPZ/NNMjaZ5b8Tovi8C0tmxiCHaQYqj7G2rgnT0kt
WNyWQQ==
Organization: Red Hat
In-Reply-To: <aEA-K3hTvhtdUxuA@localhost.localdomain>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 04.06.25 14:38, Oscar Salvador wrote:
On Wed, Jun 04, 2025 at 02:03:23PM +0200, David Hildenbrand wrote:
diff --git a/include/linux/memory.h b/include/linux/memory.h
index 5ec4e6d209b9..8c5c88eaffb3 100644
--- a/include/linux/memory.h
+++ b/include/linux/memory.h
@@ -99,6 +99,14 @@ int set_memory_block_size_order(unsigned int order);
#define MEM_PREPARE_ONLINE (1<<6)
#define MEM_FINISH_OFFLINE (1<<7)
+/* These states are used for numa node notifiers */
+#define NODE_BECOMING_MEM_AWARE (1<<0)
+#define NODE_BECAME_MEM_AWARE (1<<1)
+#define NODE_BECOMING_MEMORYLESS (1<<2)
+#define NODE_BECAME_MEMORYLESS (1<<3)
+#define NODE_CANCEL_MEM_AWARE (1<<4)
+#define NODE_CANCEL_MEMORYLESS (1<<5)
Very nitpicky: MEM vs. MEMORY inconsistency. Also, I am not sure about
"MEMORYLESS vs. MEMORY AWARE" terminology (opposite of aware is not less)
and "BECOMING" vs. "CANCEL" ...
Heh, that is why I'm not in the marketing field :-)
There must be something better ... but what is it. :)
NODE_ADDING_FIRST_MEMORY
NODE_ADDED_FIRST_MEMORY
NODE_CANCEL_ADDING_FIRST_MEMORY
NODE_REMOVING_LAST_MEMORY
NODE_REMOVED_LAST_MEMORY
NODE_CANCEL_REMOVING_LAST_MEMORY
Maybe something like that? I still don't quite like the "CANCEL" stuff.
NODE_ADDING_FIRST_MEMORY
NODE_ADDED_FIRST_MEMORY
NODE_NOT_ADDED_FIRST_MEMORY
NODE_REMOVING_LAST_MEMORY
NODE_REMOVED_LAST_MEMORY
NODE_NOT_REMOVED_LAST_MEMORY
If I were to pick one, I'd go with NODE_ADDING_FIRST_MEMORY/NODE_REMOVING_LAST_MEMORY.
I think those make it easier to grasp.
Just to clarify, these were the 3 notifiers each that belong together. I
was not sure about NODE_CANCEL_ADDING_FIRST_MEMORY vs.
NODE_NOT_ADDED_FIRST_MEMORY.
Hm ...
+
struct memory_notify {
/*
* The altmap_start_pfn and altmap_nr_pages fields are designated for
@@ -109,7 +117,10 @@ struct memory_notify {
unsigned long altmap_nr_pages;
unsigned long start_pfn;
unsigned long nr_pages;
- int status_change_nid_normal;
+ int status_change_nid;
+};
Could/should that be a separate patch after patch #1 removed the last user?
Also, I think the sequence should be (this patch is getting hard to review
for me due to the size):
#1 existing patch 1
#2 remove status_change_nid_normal
#3 introduce node notifier
#4-#X: convert individual users to node notifier
#X+1: change status_change_nid to always just indicate the nid, renaming
it on the way (incl current patch #3)
When you say #4-#X, you mean a separate patch per converting user?
So, one for memtier, one for cxl, one for hmat, etc.?
Yes.
--
Cheers,
David / dhildenb
Return-Path: <linux-kernel+bounces-673220-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 1847741E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:50:14 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 703C13A5FE7
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:49:52 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 53EC528E594;
Wed, 4 Jun 2025 12:50:08 +0000 (UTC)
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id E0ED933DF
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:50:07 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749041407; cv=none; b=PdB1eBhIP58Rh9a07hqzR6nQzPaGZWNh6iHizryogG5N0RYSt/kyKuO7f05C7wu8hopw+gjyXO28BjGVaw8k8A0AtYkSrUPk9lk9Tc2D6HQRDZoe+sNyBR0aHJE70MazFIXAy/s/UT3ZE4LBhMRSvRfFPijl99nYM4/tRZt3GY8=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749041407; c=relaxed/simple;
bh=fO/l2Y5rPdaqTWh8tBMxPdAKRiamZOULj2hqaRpi8JY=;
h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type; b=nxL8tUhAwGmHGh7JBdvNhcGoVn1Au5FTb3bR9y+kz0fYl4IFxyczNmHXIvDDhenx2uV1uTKNeWM0gMJoW9732gYx4eaql43YjHj1ovQUr+psFf4raLjUlRB0LSDElC+p7fqyW3mQGLp+1slX0Ho8cvasC3Uc6M075QZDzE08kB4=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7D820C4CEE7;
Wed, 4 Jun 2025 12:50:05 +0000 (UTC)
Date: Wed, 4 Jun 2025 08:51:21 -0400
From: Steven Rostedt <rostedt@xxxxxxxxxxx>
To: LKML <linux-kernel@xxxxxxxxxxxxxxx>
Cc: Thomas =?UTF-8?B?SGVsbHN0csO2bQ==?= <thomas.hellstrom@xxxxxxxxxxxxxxx>,
Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>, Matthew Wilcox
<willy@xxxxxxxxxxxxx>, LKML <linux-kernel@xxxxxxxxxxxxxxx>,
linux-mm@xxxxxxxxx, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Christian
Koenig <christian.koenig@xxxxxxx>, Huang Rui <ray.huang@xxxxxxx>, Matthew
Auld <matthew.auld@xxxxxxxxx>, Matthew Brost <matthew.brost@xxxxxxxxx>,
dri-devel@xxxxxxxxxxxxxxxxxxxxx, Maarten Lankhorst
<maarten.lankhorst@xxxxxxxxxxxxxxx>, Maxime Ripard <mripard@xxxxxxxxxx>,
Thomas Zimmermann <tzimmermann@xxxxxxx>, David Airlie <airlied@xxxxxxxxx>,
Simona Vetter <simona@xxxxxxxx>
Subject: [PATCH v2] drm/ttm: Fix compile error when CONFIG_SHMEM is not set
Message-ID: <20250604085121.324be8c1@xxxxxxxxxxxxxxxxxx>
X-Mailer: Claws Mail 3.20.0git84 (GTK+ 2.24.33; x86_64-pc-linux-gnu)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
From: Steven Rostedt <rostedt@xxxxxxxxxxx>
When CONFIG_SHMEM is not set, the following compiler error occurs:
ld: vmlinux.o: in function `ttm_backup_backup_page':
(.text+0x10363bc): undefined reference to `shmem_writeout'
make[3]: *** [/work/build/trace/nobackup/linux.git/scripts/Makefile.vmlinux:91: vmlinux.unstripped] Error 1
make[2]: *** [/work/build/trace/nobackup/linux.git/Makefile:1241: vmlinux] Error 2
make[1]: *** [/work/build/trace/nobackup/linux.git/Makefile:248: __sub-make] Error 2
make[1]: Leaving directory '/work/build/nobackup/tracetest'
make: *** [Makefile:248: __sub-make] Error 2
This is due to the replacement of writepage and calling swap_writeout()
and shmem_writeout() directly. The issue is that when CONFIG_SHMEM is not
defined, shmem_writeout() is also not defined.
The function ttm_backup_backup_page() called mapping->a_ops->writepage()
which was then changed to call shmem_writeout() directly.
Even before commit 84798514db50 ("mm: Remove swap_writepage() and
shmem_writepage()"), it didn't make sense to call anything other than
shmem_writeout() as the ttm_backup deals only with shmem folios.
Have DRM_TTM config option select SHMEM to guarantee that shmem_writeout()
is available.
Link: https://lore.kernel.org/all/20250602170500.48713a2b@xxxxxxxxxxxxxxxxxx/
Suggested-by: Hugh Dickins <hughd@xxxxxxxxxx>
Fixes: 84798514db50 ("mm: Remove swap_writepage() and shmem_writepage()")
Signed-off-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx>
---
Changes since v1: https://lore.kernel.org/all/20250602170500.48713a2b@xxxxxxxxxxxxxxxxxx/
- Instead of adding a shmem_writeout() stub, just make CONFIG_DRM_TTM
select CONFIG_SHMEM (Hugh Dickins)
drivers/gpu/drm/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index f094797f3b2b..ded28c71d89c 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -188,6 +188,7 @@ source "drivers/gpu/drm/display/Kconfig"
config DRM_TTM
tristate
depends on DRM && MMU
+ select SHMEM
help
GPU memory management subsystem for devices with multiple
GPU memory types. Will be enabled automatically if a device driver
--
2.47.2
Return-Path: <linux-kernel+bounces-673221-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 3DCF641E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:52:04 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 5B38C3A506A
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:51:41 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 1AEFE28EA41;
Wed, 4 Jun 2025 12:51:59 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="BPHmtb7S"
Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id B4DEF33DF
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:51:56 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.15
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749041518; cv=none; b=sjs7Uo5NWbtzjwkA5o7zAbTCtxLecUt3K2cv0nW708QCHxKtiCURB2c9YPm53voX6Ud/4sHA/idD2HNOUuJ/skvGgmMLpRhvs9nrRwjBPkvqzJeE4bkyCXHygcS/qgSR6hmfbHvV1yo6eTAzPkIcpc91ndfbRm83qeSLU+nJESQ=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749041518; c=relaxed/simple;
bh=6DsbJp3huQy2CaTfbfR0iFAPFfUmFh8cI/ypYNf0QLM=;
h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References:
Content-Type:MIME-Version; b=gSZg5lkrFVrS8uGwB3M92Y6lUKs6nEuCENxI2ri6t3BeRRnejq300YK6EoiB5iCw/Ot1oz2BaOEzSVsOfYdVQnRBgoXhLwrGlwFn2ipkvBLJHsA+UvM4Jy6zkdHmTtBWrAsY/rBHAwHwBE8eGA/bdAFFk8Ib0afQPASnZ6n6wao=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=BPHmtb7S; arc=none smtp.client-ip=192.198.163.15
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com
Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
t=1749041516; x=1780577516;
h=message-id:subject:from:to:cc:date:in-reply-to:
references:content-transfer-encoding:mime-version;
bh=6DsbJp3huQy2CaTfbfR0iFAPFfUmFh8cI/ypYNf0QLM=;
b=BPHmtb7Sar2stI48Cto7l7e13FLo5W3o5xqXPrYfUfrwY2KlfLFV70t7
1zQxUJfHSkekmkBed89xFgmGUoyH5BFajR/wa1V0k7yfNuIOPZP22JjLD
u1HfcKPNkj6+M+qApscDOUAgLGgeOEIemLl4AegKmiZlsJnOr48S5rf+8
/x6OmfT+y1zEaE93UkY2NFBZkusqE33QKDhQEeS6FmeYMJO71vbx/gRfX
HKxGpIXM0GxCAiAmAE6G/7G6z++JfBOv9dGNZl95M1QGY4RW7cE3Pju3C
edHqb3bIrIoYqP2vdjysImrKS+ONsmC6h2Ti79uYxoKRtkTHguW2pMqZn
A==;
X-CSE-ConnectionGUID: 98sV05tTQmGf232Zpe7MrQ==
X-CSE-MsgGUID: Y9oDDTDWQyaM3X71oeCsGA==
X-IronPort-AV: E=McAfee;i="6800,10657,11454"; a="51265010"
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="51265010"
Received: from fmviesa007.fm.intel.com ([10.60.135.147])
by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 05:51:56 -0700
X-CSE-ConnectionGUID: QffnyYzYSLeykVg1A7rVNQ==
X-CSE-MsgGUID: SnEBvwtpQSq+xiFL8jzcsA==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="145140884"
Received: from pgcooper-mobl3.ger.corp.intel.com (HELO [10.245.245.121]) ([10.245.245.121])
by fmviesa007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 05:51:53 -0700
Message-ID: <6b3a37712330ec4b17968075f71296717db54046.camel@xxxxxxxxxxxxxxx>
Subject: Re: [PATCH v2] drm/ttm: Fix compile error when CONFIG_SHMEM is not
set
From: Thomas =?ISO-8859-1?Q?Hellstr=F6m?= <thomas.hellstrom@xxxxxxxxxxxxxxx>
To: Steven Rostedt <rostedt@xxxxxxxxxxx>, LKML <linux-kernel@xxxxxxxxxxxxxxx>
Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>, Matthew Wilcox
<willy@xxxxxxxxxxxxx>, linux-mm@xxxxxxxxx, Andrew Morton
<akpm@xxxxxxxxxxxxxxxxxxxx>, Christian Koenig <christian.koenig@xxxxxxx>,
Huang Rui <ray.huang@xxxxxxx>, Matthew Auld <matthew.auld@xxxxxxxxx>,
Matthew Brost <matthew.brost@xxxxxxxxx>, dri-devel@xxxxxxxxxxxxxxxxxxxxx,
Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>, Maxime Ripard
<mripard@xxxxxxxxxx>, Thomas Zimmermann <tzimmermann@xxxxxxx>, David
Airlie <airlied@xxxxxxxxx>, Simona Vetter <simona@xxxxxxxx>
Date: Wed, 04 Jun 2025 14:51:49 +0200
In-Reply-To: <20250604085121.324be8c1@xxxxxxxxxxxxxxxxxx>
References: <20250604085121.324be8c1@xxxxxxxxxxxxxxxxxx>
Organization: Intel Sweden AB, Registration Number: 556189-6027
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
User-Agent: Evolution 3.54.3 (3.54.3-1.fc41)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, 2025-06-04 at 08:51 -0400, Steven Rostedt wrote:
From: Steven Rostedt <rostedt@xxxxxxxxxxx>
=20
When CONFIG_SHMEM is not set, the following compiler error occurs:
=20
ld: vmlinux.o: in function `ttm_backup_backup_page':
(.text+0x10363bc): undefined reference to `shmem_writeout'
make[3]: ***
[/work/build/trace/nobackup/linux.git/scripts/Makefile.vmlinux:91:
vmlinux.unstripped] Error 1
make[2]: *** [/work/build/trace/nobackup/linux.git/Makefile:1241:
vmlinux] Error 2
make[1]: *** [/work/build/trace/nobackup/linux.git/Makefile:248:
__sub-make] Error 2
make[1]: Leaving directory '/work/build/nobackup/tracetest'
make: *** [Makefile:248: __sub-make] Error 2
=20
This is due to the replacement of writepage and calling
swap_writeout()
and shmem_writeout() directly. The issue is that when CONFIG_SHMEM is
not
defined, shmem_writeout() is also not defined.
=20
The function ttm_backup_backup_page() called mapping->a_ops-
>writepage()
which was then changed to call shmem_writeout() directly.
=20
Even before commit 84798514db50 ("mm: Remove swap_writepage() and
shmem_writepage()"), it didn't make sense to call anything other than
shmem_writeout() as the ttm_backup deals only with shmem folios.
=20
Have DRM_TTM config option select SHMEM to guarantee that
shmem_writeout()
is available.
=20
Link:
https://lore.kernel.org/all/20250602170500.48713a2b@xxxxxxxxxxxxxxxxxx/
=20
Suggested-by: Hugh Dickins <hughd@xxxxxxxxxx>
Fixes: 84798514db50 ("mm: Remove swap_writepage() and
shmem_writepage()")
Signed-off-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx>
---
Changes since v1:
https://lore.kernel.org/all/20250602170500.48713a2b@xxxxxxxxxxxxxxxxxx/
=20
- Instead of adding a shmem_writeout() stub, just make CONFIG_DRM_TTM
=C2=A0 select CONFIG_SHMEM (Hugh Dickins)
=20
=C2=A0drivers/gpu/drm/Kconfig | 1 +
=C2=A01 file changed, 1 insertion(+)
=20
diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index f094797f3b2b..ded28c71d89c 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -188,6 +188,7 @@ source "drivers/gpu/drm/display/Kconfig"
=C2=A0config DRM_TTM
=C2=A0 tristate
=C2=A0 depends on DRM && MMU
+ select SHMEM
=C2=A0 help
=C2=A0 =C2=A0 GPU memory management subsystem for devices with multiple
=C2=A0 =C2=A0 GPU memory types. Will be enabled automatically if a
device driver
Reviewed-by: Thomas Hellstr=C3=B6m <thomas.hellstrom@xxxxxxxxxxxxxxx>
Thanks,
Thomas
Return-Path: <linux-kernel+bounces-673222-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id E9CD041E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:53:14 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id ED8F57A7874
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:51:54 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id C037428ECE0;
Wed, 4 Jun 2025 12:53:04 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=lwn.net header.i=@lwn.net header.b="ZlNJidwy"
Received: from ms.lwn.net (ms.lwn.net [45.79.88.28])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9445F33DF;
Wed, 4 Jun 2025 12:53:02 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.79.88.28
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749041584; cv=none; b=KzgHQGNIeRPNnXnZxH1wfDbTThpbEsFqowZedGGgtCh5qAGVZOpilfKg7AU5hnMZTFvfhfCdQn/qLkB4DAdiennpKnOPRPiK8CsxSUNDVu87zX9FLKk0DH9PFJj+A2gAN0zuBfRqfM4cdYWL86OHfKuxE8yTUTwGZYv2ouxRqnI=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749041584; c=relaxed/simple;
bh=qj1wXFWn/k0q+9pBku0c2DhqWxiMsO51WgTTVtOCaRQ=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID:
MIME-Version:Content-Type; b=PdZ4rPu3s4wgi91+NlrJdnD2UOEIQdahaB076NcC9kYK3P+jDH/BE8tO5bsoqtuEICfUVnc+DVC/xBu+y0gZ7IHZadbQ54yQYesFBHcqzss7FPFDR64L+cG80uh/A1Wkxs75LeR7bo0chLEXzaPFDbmpdfs6fABx7ywF1yUj22c=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lwn.net; spf=pass smtp.mailfrom=lwn.net; dkim=pass (2048-bit key) header.d=lwn.net header.i=@lwn.net header.b=ZlNJidwy; arc=none smtp.client-ip=45.79.88.28
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lwn.net
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lwn.net
DKIM-Filter: OpenDKIM Filter v2.11.0 ms.lwn.net 8B39E41A90
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lwn.net; s=20201203;
t=1749041581; bh=LjjTe/RnLIgB3GLa+a3sJGMhTl4SyHlvR/y+FhkSjTo=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
b=ZlNJidwyK++0BfHq3lI+mJ5k5aMXddZE07omGrpON7mgqblWJEKoNiGhrZOy6s2XC
2v90BXtTL+hSEQxGk2g12vWK/ZUvJFuALy1FkIHqEb+bY3id6afnYJlCFFZAYXcCae
BrQHH35QFQSrl+U7bDv8JG/ELWXVLESsKHkmwufXbt+n6rGf4E45DXkrRnj/mXN27E
tb3kFTIZ63fYBr6ZqLn3WfElwrCueasFmQ9AC4DwHL1ABRS4jDsfqH8sX+GY075xmC
B+K/FhCHJSQTzQec0leodvOpvUd3D+nOq8N7QyeSARlThPIY/kGQGscC4AtI+8kGTb
Ax91xER7jgBpw==
Received: from localhost (unknown [IPv6:2601:280:4600:2da9::1fe])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
(No client certificate requested)
by ms.lwn.net (Postfix) with ESMTPSA id 8B39E41A90;
Wed, 4 Jun 2025 12:53:01 +0000 (UTC)
From: Jonathan Corbet <corbet@xxxxxxx>
To: Roman Kisel <romank@xxxxxxxxxxxxxxxxxxx>, alok.a.tiwari@xxxxxxxxxx,
arnd@xxxxxxxx, bp@xxxxxxxxx, dave.hansen@xxxxxxxxxxxxxxx,
decui@xxxxxxxxxxxxx, haiyangz@xxxxxxxxxxxxx, hpa@xxxxxxxxx,
kys@xxxxxxxxxxxxx, mingo@xxxxxxxxxx, mhklinux@xxxxxxxxxxx,
tglx@xxxxxxxxxxxxx, wei.liu@xxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx,
linux-doc@xxxxxxxxxxxxxxx, linux-hyperv@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, x86@xxxxxxxxxx
Cc: apais@xxxxxxxxxxxxx, benhill@xxxxxxxxxxxxx, bperkins@xxxxxxxxxxxxx,
sunilmut@xxxxxxxxxxxxx
Subject: Re: [PATCH hyperv-next v3 01/15] Documentation: hyperv:
Confidential VMBus
In-Reply-To: <20250604004341.7194-2-romank@xxxxxxxxxxxxxxxxxxx>
References: <20250604004341.7194-1-romank@xxxxxxxxxxxxxxxxxxx>
<20250604004341.7194-2-romank@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 06:53:00 -0600
Message-ID: <87ecvzk6s3.fsf@xxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Roman Kisel <romank@xxxxxxxxxxxxxxxxxxx> writes:
Define what the confidential VMBus is and describe what advantages
it offers on the capable hardware.
Signed-off-by: Roman Kisel <romank@xxxxxxxxxxxxxxxxxxx>
Reviewed-by: Alok Tiwari <alok.a.tiwari@xxxxxxxxxx>
---
Documentation/virt/hyperv/coco.rst | 125 ++++++++++++++++++++++++++++-
1 file changed, 124 insertions(+), 1 deletion(-)
diff --git a/Documentation/virt/hyperv/coco.rst b/Documentation/virt/hyperv/coco.rst
index c15d6fe34b4e..b4904b64219d 100644
--- a/Documentation/virt/hyperv/coco.rst
+++ b/Documentation/virt/hyperv/coco.rst
[...]
+
+Here is the data flow for a conventional VMBus connection and the Confidential
+VMBus connection (C stands for the client or VSC, S for the server or VSP):
+
++---- GUEST ----+ +----- DEVICE ----+ +----- HOST -----+
+| | | | | |
+| | | | | |
+| | | ========== |
+| | | | | |
+| | | | | |
+| | | | | |
++----- C -------+ +-----------------+ +------- S ------+
This will generate all kinds of errors during the docs build and will
not give the results you are looking for - please actually build the
docs after making a change like this.
You need to put the diagram into a literal block.
Thanks,
jon
Return-Path: <linux-kernel+bounces-673223-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id DF75341E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:54:12 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id D47EE7A2824
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:52:52 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 15A9828ECE0;
Wed, 4 Jun 2025 12:54:03 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NHFbq4D+"
Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id C70D433DF;
Wed, 4 Jun 2025 12:53:59 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.173
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749041642; cv=none; b=Rj6LO06/q+ZOOYZi5dj0sAFz92WZGGud+4GblMUGdo2vMuCM3bKvXwAcfMFxS1Co1o6DoV2g7A0Rkw5XsZlrGdHLxIPr05XsxRYZp3L4tAZVkGZt/kPyNICotrvvxTuAr6dZYwoMmbbuPIsXOy4M1l9SRe/7jhGj0e59abEdTv4=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749041642; c=relaxed/simple;
bh=OZD7WcCyUzuzO15vKiLDI+M51i40/S5ipWMFGVsv91s=;
h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
To:Cc:Content-Type; b=QfQm1P1IaWHfTDfV9wbZKaji4vDnmhhiK6sM2Hf1pVIqpZZnHDuo3E/llF7us7rpNqn+kmHapxx4/EuG+Sj3+l2pOb5n+ilrEV/3/dWzFK268Zmfz23eJqxjIrD9PRN6hSQWllS6Na4PBMpNGIQi5PE1o8IxQmTl2NFv/dKoihA=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=NHFbq4D+; arc=none smtp.client-ip=209.85.215.173
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
Received: by mail-pg1-f173.google.com with SMTP id 41be03b00d2f7-b2c4331c50eso5152273a12.3;
Wed, 04 Jun 2025 05:53:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1749041639; x=1749646439; darn=vger.kernel.org;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:from:to:cc:subject:date
:message-id:reply-to;
bh=XjvlidjGUQC4SxdMsrlPY8e5lq5D3hS45/TeUXFKOwY=;
b=NHFbq4D+W5xsXctSChJ77ZSsMofdK3Qcpnhg+q6CGCOhhhhoZ5Z61ptjnX70ww0Ih8
J0JAjoG4o8I4NdD8CdDzv1goiMTB/iWOx9rSYzhEVVcYtXxLYS9BEDFmC3uWeZKoPHTd
dMLIYk/f7ZVUKO2qvG2lWZ7+pTaff9tnprAf56RtikUatuVlD7FLH0Ah4qucTlq8Po/t
1k55Fwl4TenVAMoQrTkYdunr8xjpvme+l0wLJlSECJwbZJeKXLaAWUoI8xdoErgT7c6V
Q7RCsWa8CyVPjibQVnDqT7ASsCsltQHAcR0o7GcgVYnUhMV4kom/FCdBtaABkzP2+oJu
Y0ew==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749041639; x=1749646439;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=XjvlidjGUQC4SxdMsrlPY8e5lq5D3hS45/TeUXFKOwY=;
b=NDnfXOAaoDr05OBCveK5je4WjXpFxXBsn1xLdLZ7dVHFyuA7X/M4AAg5qrHa7iOnKP
q6SWbcEyaEzopzpY6i7hDUsR1DtHZ9WChnE5nlI9jEtCH3MgwW2kXrRsR+zx/M3yjGKf
u3lQhnmX1pVfRyVcrZUqSC1Ku6atqmOGEoixDBiVckhAzWmBRoKQDrv8RdFtpxaDQkyV
2wIJhZ/cXZf1uHutBKJuyHq2Pll8TFhLyj1s7MU8UUL2ClAJYtoH3hrZ0ugHt9Q8nced
rpXoCw7ngSJAWG8fVsyAAmO9RV4y2OKJtc5X+flz9A1nCKJ6/W8IwTaDUiemmbj6qWSb
a2gw==
X-Forwarded-Encrypted: i=1; AJvYcCUBH5WmiHKez6naSUQwNOWrxeRoyNb7e/7k7YE5nZkWFEpj5kUdX+Uo5i2E4U81oKWXdDkr+BJ2H4QmCg7IpXf/6Q==@vger.kernel.org, AJvYcCVRI9O681Zsn6T7SjHUWB3HOVCSLKnFzgoUKP99qyNY8mcNI28HisUQ0ir+VIsjWZkQ7Y4IhM0MLcPG@xxxxxxxxxxxxxxx, AJvYcCWPozl9uNmem+5SZczJJy72C04Msx6K0DiUEGN/Xsw3bLUZJvj971mj4gmi1fVAlZg+PuwYEGN/f//kUvI7@xxxxxxxxxxxxxxx
X-Gm-Message-State: AOJu0Yyp0Cbyhlsjff2HlZNhwoz0548v7U2dGUgE7EZy8HdPvmN0GlwK
l0SHpOwGgozp81h3myNc6ri0y3cA8/i2tbIChNLMoqUb7+cyWcBYVmUC+pO6QRS+f6/u0ekbWVN
0hXDu70hvfHzti2Bk1F/l/KTjvN6xqSw=
X-Gm-Gg: ASbGncsTLkG2osdg7hJrkb4lB3TzGu2L/n109LjUfgTmre+Jj7tN6QYPTRCU+6SaKss
26uORTSso5fWYLbSXRTEPlIIOK3849s9vaRl4OnnU0ni90xVKhVBSAZBCwgPPR4j2r6PsyTd0Ak
XkwOYTDA1gX8z74V/c0fZ5NtN5HzOnbA==
X-Google-Smtp-Source: AGHT+IF8BahbWPg3PJ0D16BlqIY1qWwOW5iNYKdNrQkdBaMB8hXbKb0RJuekC/SLvpfEpMn9z+5vwKt1GFfdaEoA8s0=
X-Received: by 2002:a17:90b:35c5:b0:311:be51:bdf8 with SMTP id
98e67ed59e1d1-3130cd6d85emr4203307a91.3.1749041638951; Wed, 04 Jun 2025
05:53:58 -0700 (PDT)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
References: <20250604-imx95-rproc-1-v1-0-a6e5f512731c@xxxxxxx> <20250604-imx95-rproc-1-v1-2-a6e5f512731c@xxxxxxx>
In-Reply-To: <20250604-imx95-rproc-1-v1-2-a6e5f512731c@xxxxxxx>
From: Daniel Baluta <daniel.baluta@xxxxxxxxx>
Date: Wed, 4 Jun 2025 15:55:55 +0300
X-Gm-Features: AX0GCFuQSVALoqDz8lEd52R5b_qpD5ZIb0xjVNRy7BAJHJd7nx_8wHvUzvLriIg
Message-ID: <CAEnQRZByPkxojykJ3w-Mxko08Nc5txsOCL4vy+P76HuTy3YTaA@xxxxxxxxxxxxxx>
Subject: Re: [PATCH 2/3] remoteproc: imx_rproc: Add support for System Manager API
To: "Peng Fan (OSS)" <peng.fan@xxxxxxxxxxx>
Cc: Bjorn Andersson <andersson@xxxxxxxxxx>, Mathieu Poirier <mathieu.poirier@xxxxxxxxxx>,
Rob Herring <robh@xxxxxxxxxx>, Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>,
Shawn Guo <shawnguo@xxxxxxxxxx>, Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>,
Pengutronix Kernel Team <kernel@xxxxxxxxxxxxxx>, Fabio Estevam <festevam@xxxxxxxxx>,
Iuliana Prodan <iuliana.prodan@xxxxxxx>, Daniel Baluta <daniel.baluta@xxxxxxx>,
linux-remoteproc@xxxxxxxxxxxxxxx, devicetree@xxxxxxxxxxxxxxx,
imx@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, Peng Fan <peng.fan@xxxxxxx>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hi Peng,
Thanks a lot for the patches. Comments inline:
On Wed, Jun 4, 2025 at 5:36=E2=80=AFAM Peng Fan (OSS) <peng.fan@xxxxxxxxxxx=
wrote:
From: Peng Fan <peng.fan@xxxxxxx>
i.MX95 features a Cortex-M33 core, six Cortex-A55 cores, and
one Cortex-M7 core. The System Control Management Interface(SCMI)
firmware runs on the M33 core. The i.MX95 SCMI firmware named System
Manager(SM) includes vendor extension protocols, Logical Machine
Management(LMM) protocol and CPU protocol and etc.
There are three cases for M7:
(1) M7 in a separate Logical Machine(LM) that Linux couldn't control it.
couldn't -> can't
(2) M7 in a separate Logical Machine that Linux could control it using
LMM protocol
could -> can
(3) M7 runs in same Logical Machine as A55, so Linux could control it
using CPU protocol
could -> can
So extend the driver to using LMM and CPU protocol to manage the M7 core.
- Add IMX_RPROC_SM to indicate the remotecores runs on a SoC that
has System Manager.
remotecores -> remote core
- Compare linux LM ID(got using scmi_imx_lmm_info) and M7 LM ID(got
from DTB), if same, use CPU protocol to start/stop. Otherwise, use
LMM protocol to start/stop.
Whether using CPU or LMM protocol to start/stop, the M7 status
detection could use CPU protocol to detect started or not. So
in imx_rproc_detect_mode, use scmi_imx_cpu_started to check the
status of M7.
- For above case 1 and 2, Use SCMI_IMX_LMM_POWER_ON to detect whether
the M7 LM is under control of A55 LM.
Current setup relies on pre-Linux software(U-Boot) to do
M7 TCM ECC initialization. In future, we could add the support in Linux
to decouple U-Boot and Linux.
Signed-off-by: Peng Fan <peng.fan@xxxxxxx>
---
drivers/remoteproc/imx_rproc.c | 139 +++++++++++++++++++++++++++++++++++=
+++++-
drivers/remoteproc/imx_rproc.h | 2 +
2 files changed, 139 insertions(+), 2 deletions(-)
diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rpro=
c.c
index 74299af1d7f10a0db794de494c52304b2323b89f..0649faa98725db99366946c65=
edf5b7daff78316 100644
--- a/drivers/remoteproc/imx_rproc.c
+++ b/drivers/remoteproc/imx_rproc.c
@@ -8,6 +8,7 @@
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/firmware/imx/sci.h>
+#include <linux/firmware/imx/sm.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/mailbox_client.h>
@@ -21,6 +22,7 @@
#include <linux/reboot.h>
#include <linux/regmap.h>
#include <linux/remoteproc.h>
+#include <linux/scmi_imx_protocol.h>
#include <linux/workqueue.h>
#include "imx_rproc.h"
@@ -91,6 +93,11 @@ struct imx_rproc_mem {
#define ATT_CORE_MASK 0xffff
#define ATT_CORE(I) BIT((I))
+/* Logical Machine Operation */
+#define IMX_RPROC_FLAGS_SM_LMM_OP BIT(0)
+/* Linux has permission to handle the Logical Machine of remote cores */
+#define IMX_RPROC_FLAGS_SM_LMM_AVAIL BIT(1)
+
static int imx_rproc_xtr_mbox_init(struct rproc *rproc, bool tx_block);
static void imx_rproc_free_mbox(struct rproc *rproc);
@@ -115,6 +122,22 @@ struct imx_rproc {
u32 entry; /* cpu start addr=
ess */
u32 core_index;
struct dev_pm_domain_list *pd_list;
+ /* For i.MX System Manager based systems */
+ u32 cpuid;
+ u32 lmid;
+ u32 flags;
+};
+
+static const struct imx_rproc_att imx_rproc_att_imx95_m7[] =3D {
+ /* dev addr , sys addr , size , flags */
+ /* TCM CODE NON-SECURE */
+ { 0x00000000, 0x203C0000, 0x00040000, ATT_OWN | ATT_IOMEM },
+
+ /* TCM SYS NON-SECURE*/
+ { 0x20000000, 0x20400000, 0x00040000, ATT_OWN | ATT_IOMEM },
+
+ /* DDR */
+ { 0x80000000, 0x80000000, 0x50000000, 0 },
};
^ this belongs to patch 3/3
Otherwise, patch looks good to me.
Return-Path: <linux-kernel+bounces-673224-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id D0D7041E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:55:01 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 17E93175C04
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:55:03 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 8988328EA53;
Wed, 4 Jun 2025 12:54:56 +0000 (UTC)
Received: from foss.arm.com (foss.arm.com [217.140.110.172])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 0999333DF
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:54:53 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749041696; cv=none; b=CY1rX+B42qLMUUZUm7QabPh6nfkDvOCpyr3j2Jx89IOQXW7sVN56VWhNC7wLtv5E0K14vZBvi+835zpTu+98H4Exqbp2jxyALKcGXECYXbsTjHo1wx/MvStZzP/pt03q76w2PJBgm8y42ZcaBU67Sd9Nd+yv1+9jdMXUy14/BAA=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749041696; c=relaxed/simple;
bh=INwy6LZxuX1AbPHLzx6aiRllCElXrw/mrvB9bQcaRo4=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=ajC10PYVkaIXFAgBzZz/dY2BXQnWIlCnhgG2y7H0MVhZ/2XRUz6pnYzh3/5/Xjf51hxBo4IMOEhtVh85uTdtRz2iB+QYDyfkUXiZOBlCPLr4tdpMZvUUfi2X16QamImVINko0sJvgCr719+EU5lVAueiQcv8rLDS4bsh0tgeuSI=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com
Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14])
by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 06E1A1758;
Wed, 4 Jun 2025 05:54:36 -0700 (PDT)
Received: from [10.1.27.175] (XHFQ2J9959.cambridge.arm.com [10.1.27.175])
by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EA0ED3F5A1;
Wed, 4 Jun 2025 05:54:50 -0700 (PDT)
Message-ID: <bced1b03-1a74-48f9-a4c9-c7feaf9786df@xxxxxxx>
Date: Wed, 4 Jun 2025 13:54:49 +0100
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v6] arm64/mm: Optimize loop to reduce redundant operations
of contpte_ptep_get
Content-Language: en-GB
To: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Xavier <xavier_qy@xxxxxxx>
Cc: will@xxxxxxxxxx, 21cnbao@xxxxxxxxx, dev.jain@xxxxxxx,
ioworker0@xxxxxxxxx, catalin.marinas@xxxxxxx, david@xxxxxxxxxx,
gshan@xxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, willy@xxxxxxxxxxxxx, ziy@xxxxxxxxxx,
Barry Song <baohua@xxxxxxxxxx>
References: <20250510125948.2383778-1-xavier_qy@xxxxxxx>
<6f9842a2.7c3c.19734ce1860.Coremail.xavier_qy@xxxxxxx>
<20250603193124.347804cb5a19c9941a354ff4@xxxxxxxxxxxxxxxxxxxx>
From: Ryan Roberts <ryan.roberts@xxxxxxx>
In-Reply-To: <20250603193124.347804cb5a19c9941a354ff4@xxxxxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 04/06/2025 03:31, Andrew Morton wrote:
On Tue, 3 Jun 2025 16:00:11 +0800 (CST) Xavier <xavier_qy@xxxxxxx> wrote:
It has been three weeks since the submission of Patch v6. I take the liberty of
asking whether you still have any comments or suggestions on this version,
and whether the test data indicates that it is ready for merging. I sincerely
look forward to your valuable feedback and guidance.
It was late in the 6.15-rcX cycle and I was hoping that arm people
would handle this.
It would be better if the patches had cc:linux-mm@xxxxxxxxx.
I'll grab it and shall include it in -next after -rc1. If ARM people
want to grab it, please do so and I'll autodrop the mm.git copy.
Appologies for radio silence; As Catalin and I both said before, the arm email
servers drop all mail from Xavier <xavier_qy@xxxxxxx> on the floor. I'm not sure
why, but any chance you could use a different email account to make this smoother?
I'm doing some testing of this now and will respond properly in the next few
days. But I don't personally like the complexity of the patch and am not totally
clear on if this is likely to show a real benefit in real-world use cases (as I
commented previously).
I'll respond properly once I have some results.
Given this is only touching arm64, I'd really prefer that this go via arm64 if
at all.
Thanks,
Ryan
Return-Path: <linux-kernel+bounces-673225-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 06F3941E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:55:34 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id F33423A69A4
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:55:06 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 8EB6128E594;
Wed, 4 Jun 2025 12:55:19 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="XVrnjEKC";
dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="XVrnjEKC"
Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2045.outbound.protection.outlook.com [40.107.249.45])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6836128EA53;
Wed, 4 Jun 2025 12:55:13 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.249.45
ARC-Seal:i=3; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749041718; cv=fail; b=ELlh8JN9aDDmxrI9oSXfKoXt3nJ44FDxJGnpswEz7Gm9L3L5fjKmKpZra8IP5ZbAQt8FOJOHEDTbBOuHYApd+q2Ywez6HlWEUbfb9iv7oslsXZm7nrkoILUvTDsVJH5Ds/un5K42rqpaEgqpEoVEWsjNy80EAy4c9/CBbqqXYn4=
ARC-Message-Signature:i=3; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749041718; c=relaxed/simple;
bh=cuZyO5KbqgHQJXX1CtzevAsy06/j/0dXTzOXr+6OAGQ=;
h=Date:From:To:Cc:Subject:Message-ID:References:Content-Type:
Content-Disposition:In-Reply-To:MIME-Version; b=Z3m0auxSyKlDb44fYefq3ARa6IuItGsRrqqC8k7cEQ3HUdbTzHeMAtMX7O9lbrIeeNNeAFzJzSvtklHZQhq6PkajEinygJEWF60BHrugM4AclGlRIK9GO8YnONPQWie4dCtqfsFOIV27MK3gdptS2dlLCwid6Jn2+dxA0/fjqbY=
ARC-Authentication-Results:i=3; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=XVrnjEKC; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=XVrnjEKC; arc=fail smtp.client-ip=40.107.249.45
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com
ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass;
b=X7PqiCSH4PFSjwtNgOKK8a6BjoG37KA4/jqBWJsPbyF1CdTqO2NWg+9eP7SxZSipxtb5ifp7H6wAfY637tw+vS6EGmTNeToWtR62leXwIhS/OBo0KaN2DNWJgdAKxJCEq8iGDBJc3KRp6jVdPMsZIPOuqOeieyorTxHII9jsx1SPxP1G0jkULFRifyJoGhXBz+DHv2YS7rit3T9ziLQCQhrNRps8viThW8OdZPK2HOJPpSu7sDbsUyiyG1HS67aB0NWr0CflRKCxYcdEQ+Xywh0kFtvHcn5cltHeMN6wgA9M/zPzEOJhebQ+Et8PdnyNl1jAbsguOjlDI9YNkmKR5Q==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=cuZyO5KbqgHQJXX1CtzevAsy06/j/0dXTzOXr+6OAGQ=;
b=mUZMChWPI16zf3G8jSVmLqx69UqO13pWxsAlVsItPbEbDA1mtlb4zyLtf/ncSKacbvwUiRMV1MF14OeyFz1mFrWQvoEorUzradU75Y00lYhjCRt5P52yciZkDtLcfmeOf3hpwlX6Kf5H2L4yimtHyPq1ZYouQ6sB3soAe35dHobWTlJkXwXAzX2C+0XPjO3WeeJDZwDRdgu9kcPuVX6l0sjpqLLTn5E7As1Tcfet+J0T8BCjIhrZi1IrBefUI1EuyjqIHTow7OpBp5FF24JzT8em2XHxOmYZDd6AqNY+B6LliWAlwRr+AjtYJMW0OfbKFbalLEYRBCzZgSze7kiT/g==
ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is
4.158.2.129) smtp.rcpttodomain=infradead.org smtp.mailfrom=arm.com;
dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com;
dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1
spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com]
dmarc=[1,1,header.from=arm.com])
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=cuZyO5KbqgHQJXX1CtzevAsy06/j/0dXTzOXr+6OAGQ=;
b=XVrnjEKCB4qPCG1WqQtAUMK5QHg2S1eIk5C320/c63NUFE9XxZ1pTdbjTp8n71+uujJORfwmVls2dEtfmgITdPKiqYNLt+4PYURg0JOQjJQhhuFhmpvrRyk6anX/zy27JrYMr0BiQJVJDu9R5n8UJDpCCdcSGs/+eA++SSAgT+M=
Received: from DUZPR01CA0171.eurprd01.prod.exchangelabs.com
(2603:10a6:10:4b3::17) by DBAPR08MB5864.eurprd08.prod.outlook.com
(2603:10a6:10:1a0::13) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.34; Wed, 4 Jun
2025 12:55:11 +0000
Received: from DU2PEPF00028D11.eurprd03.prod.outlook.com
(2603:10a6:10:4b3:cafe::fb) by DUZPR01CA0171.outlook.office365.com
(2603:10a6:10:4b3::17) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8792.24 via Frontend Transport; Wed,
4 Jun 2025 12:55:10 +0000
X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 4.158.2.129)
smtp.mailfrom=arm.com; dkim=pass (signature was verified)
header.d=arm.com;dmarc=pass action=none header.from=arm.com;
Received-SPF: Pass (protection.outlook.com: domain of arm.com designates
4.158.2.129 as permitted sender) receiver=protection.outlook.com;
client-ip=4.158.2.129; helo=outbound-uk1.az.dlp.m.darktrace.com; pr=C
Received: from outbound-uk1.az.dlp.m.darktrace.com (4.158.2.129) by
DU2PEPF00028D11.mail.protection.outlook.com (10.167.242.25) with Microsoft
SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8792.29
via Frontend Transport; Wed, 4 Jun 2025 12:55:10 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=mSDmvj45VqKXjcPMtYk48I38xtECdCFIaWUfN7Ek2BErnbXlf4KDJ15sn41zDdrG2sRHBKpJDE/Pkx7sNNDCy7hYxskvBGtAzK7mhy1D8o6bIk7P3z45YmzPiEp3eobz7ofLfcfKEpzz5IqlFT1sKm99pDvU0BCSTblB+go/Oce7EE87CPWDvbjLjdnK5Hf99eOky4uwK/D/JB+plllMTaIl2i18r6VfxPwCMSCogKKm8Ebq9SX2Yo4dz3pW9hLdsMnVtVF06Xbs6ds/4+LrZfAzDKedAY3C8IouezsIKYG5XVKKfN81M4e+PjBBOXdpfNIlqysov/TteqLkv5M+1g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=cuZyO5KbqgHQJXX1CtzevAsy06/j/0dXTzOXr+6OAGQ=;
b=bTI/xMuwIYaHcY7KxGe1l2cXFDvBtgeEGO42mbS6k5MPeNSq1F02/agARyv1WqWZgYMgH9MiLNwQ4zxJkfgQXnuht0ha4yD57ogXp/ojh6WL1nvr0hK0zBqnIuBkbnuWcgC8lVYsl/BdkvjBmkbX8m2J4mJo2WUtw+L44tOcCNbKj8qSzW26Nj7QK0s33vh0tkvjhe27qujheI3ikoDJ9MxGhAlTzIA7QZtcsfOhyByCBHn3zQkgcM/pxeQc50hi+XPK/QGx1is2r4V5WrF1QSWiI32kmu89px8mfPDGuoEPX/g59KxZP4do7OBmEyfzz32CzGKG/oTuMuHZsJX41Q==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass
header.d=arm.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=cuZyO5KbqgHQJXX1CtzevAsy06/j/0dXTzOXr+6OAGQ=;
b=XVrnjEKCB4qPCG1WqQtAUMK5QHg2S1eIk5C320/c63NUFE9XxZ1pTdbjTp8n71+uujJORfwmVls2dEtfmgITdPKiqYNLt+4PYURg0JOQjJQhhuFhmpvrRyk6anX/zy27JrYMr0BiQJVJDu9R5n8UJDpCCdcSGs/+eA++SSAgT+M=
Authentication-Results-Original: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=arm.com;
Received: from GV1PR08MB10521.eurprd08.prod.outlook.com
(2603:10a6:150:163::20) by AM8PR08MB5682.eurprd08.prod.outlook.com
(2603:10a6:20b:1c5::14) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8813.20; Wed, 4 Jun
2025 12:54:38 +0000
Received: from GV1PR08MB10521.eurprd08.prod.outlook.com
([fe80::d430:4ef9:b30b:c739]) by GV1PR08MB10521.eurprd08.prod.outlook.com
([fe80::d430:4ef9:b30b:c739%7]) with mapi id 15.20.8792.033; Wed, 4 Jun 2025
12:54:37 +0000
Date: Wed, 4 Jun 2025 13:54:34 +0100
From: Yeoreum Yun <yeoreum.yun@xxxxxxx>
To: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Leo Yan <leo.yan@xxxxxxx>, mingo@xxxxxxxxxx, mingo@xxxxxxxxxx,
acme@xxxxxxxxxx, namhyung@xxxxxxxxxx, mark.rutland@xxxxxxx,
alexander.shishkin@xxxxxxxxxxxxxxx, jolsa@xxxxxxxxxx,
irogers@xxxxxxxxxx, adrian.hunter@xxxxxxxxx,
kan.liang@xxxxxxxxxxxxxxx, linux-perf-users@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, David Wang <00107082@xxxxxxx>
Subject: Re: [PATCH 1/1] perf/core: fix dangling cgroup pointer in cpuctx
Message-ID: <aEBCCvKKS1OLP1Z0@xxxxxxxxxxxxxxx>
References: <20250602184049.4010919-1-yeoreum.yun@xxxxxxx>
<20250603140040.GB8020@xxxxxxxxxxxxxxx>
<20250603144414.GC38114@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
<20250604080339.GB35970@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
<aEAau+v4qBQSt13s@xxxxxxxxxxxxxxx>
<20250604123725.GJ38114@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20250604123725.GJ38114@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
X-ClientProxiedBy: LO6P265CA0030.GBRP265.PROD.OUTLOOK.COM
(2603:10a6:600:2ff::20) To GV1PR08MB10521.eurprd08.prod.outlook.com
(2603:10a6:150:163::20)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-TrafficTypeDiagnostic:
GV1PR08MB10521:EE_|AM8PR08MB5682:EE_|DU2PEPF00028D11:EE_|DBAPR08MB5864:EE_
X-MS-Office365-Filtering-Correlation-Id: 19618585-1808-40ca-a1d5-08dda3670a8d
x-checkrecipientrouted: true
NoDisclaimer: true
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam-Untrusted:
BCL:0;ARA:13230040|1800799024|366016|376014|7416014;
X-Microsoft-Antispam-Message-Info-Original:
=?us-ascii?Q?AHmm+Vf/TtYaK/7A2wAZSc+o0uqui1r8eBfRkbi65YJiGlWoW2ACA/tgE2nL?=
=?us-ascii?Q?InJLKUjMlcEeRh9db5VfL87hr/jQh3kMCCVaz+wjbvrXO59qcMZIHHcya+c0?=
=?us-ascii?Q?NVz4xpdyUJtRUjPS2kuZUztP/4GSNGw+HwOpOTVCjHFA8VsNWtqbcr2OJZnu?=
=?us-ascii?Q?HZcqaYXLrh2jdrlJlo0vxQD69UfP4uf2QiQGTYMl+11Of7rQ6slFpVQ6He3f?=
=?us-ascii?Q?sC/SdCf87GhjvlKFxY1EJi82j4iS7+n7MyGnMYv6AGIGnKDa+S+vdmfR8CCG?=
=?us-ascii?Q?BNrYzwUbHXkWFmumNzIrzBpwaeivVxvzBDsLOIordjfgrQ3DsY/enN8VH19K?=
=?us-ascii?Q?xlRp2al46PfMUsEPs1BemkanXPHykZ0hgoW0wuwOGTw52vymS4hZBIZQhe8M?=
=?us-ascii?Q?djejdiO/vPqqT7wIAa1iK9lKJLDsiZR5tc82kLv/XHYLFgVZciwXjYoMwtjb?=
=?us-ascii?Q?PnHmx7AyVkKVB0Ul1Pt92G4AZ41N+iYUEUGze5FSM/bbcavlgdsNgGJHmQQ1?=
=?us-ascii?Q?0uTjMcqs8zA3mj0MZk28mcNrwv6KBdxl5BPrHp7G4iN6g0BvJFqI0oJ4AiRj?=
=?us-ascii?Q?e8GOqTWkzFm7r6je5xCv4XAr3iW8FVJJ7FWQqNtbnjJEwGmtk3+zJyFYEcJn?=
=?us-ascii?Q?p743UQAObDPCsTrJqhY29jj/mU5u77jBHO0rKZim/ELILizOk3sFuyfcZUbl?=
=?us-ascii?Q?wT2IvwXhphoHws1l9EO7BxG4DY2LT0M1X5ZbJEZ6Aa98iR9ZclICSMb9A1tW?=
=?us-ascii?Q?KKguts3ZHnZQTX2vr1pT9KFr6D9OkLIwArTM9st3TOEvzJGJziCfRgeDpuPg?=
=?us-ascii?Q?YRvG/WKiDXz5tDYuVRSycPJF/fV5HcxznEpHkHiuedTAjDhCVgXH7nctF6p5?=
=?us-ascii?Q?XSPEMbOBcSDz5NDZhKsMIkrHbqM/xQ4r/8K0eRtHQUzFUSrBq70RTsyw4S8l?=
=?us-ascii?Q?n4OzapSMy6ucBbyZSQa/gQ2hg5dhw9llqFDQFssLFGybKF+50Lz5CWAlGqEf?=
=?us-ascii?Q?/4NohAOmFFRbFUYQ19tb+EsY8PrUa3MtDSc+fA+snUwB8ZWXejab/JC/Id5j?=
=?us-ascii?Q?b5JY8rLC7/PZXhyWsG9HE6t+94xR6gS6SV+0JL/q2vy5pfpyV+VvuaxQ9pEc?=
=?us-ascii?Q?HdaqdkZeOeTcgHflLsDExd12xWXUroqC8w/EA7YdAvd96EfeKWurHV6PVloF?=
=?us-ascii?Q?86RHHk/oBIrojp4/xxjIjzs0Cffa7z1o+Cdcckl92LYregO+4xpeq7+9Q0Pu?=
=?us-ascii?Q?Ga6ab1hu4tb0nXqLJTizUSen7KzW4iKGxCKgSui2sxRDmxDBL/2si+fp4q+q?=
=?us-ascii?Q?d9aZ6IduopY3gzZiVSQJrm10Ui2JH/ZTo/PezQ9y71DdSASbCl48uUGIQx+z?=
=?us-ascii?Q?/QwtF3hj5IzWzkfqg2asLyYlzAejuGwMBEIapS3Nn1l++Er/xO0/j7M0YBQP?=
=?us-ascii?Q?B438vinDSn8=3D?=
X-Forefront-Antispam-Report-Untrusted:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:GV1PR08MB10521.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(7416014);DIR:OUT;SFP:1101;
X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR08MB5682
X-EOPAttributedMessage: 0
X-MS-Exchange-Transport-CrossTenantHeadersStripped:
DU2PEPF00028D11.eurprd03.prod.outlook.com
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id-Prvs:
a707addf-88e8-429c-04f9-08dda366f650
X-Microsoft-Antispam:
BCL:0;ARA:13230040|82310400026|1800799024|376014|7416014|36860700013|35042699022|14060799003;
X-Microsoft-Antispam-Message-Info:
=?us-ascii?Q?I/PbGoOzC65OLRVY7hAZFbUGKd+sklUBrHJsHFEmacCe1y+kn3hAaB+l81u+?=
=?us-ascii?Q?CFUinYD1RzOJ8sqc+/EAiyJElEGtFJMDvd2vI8Y1lv5Tb9Grmjqmoqj4mLZT?=
=?us-ascii?Q?fXAB8LVqBKVliT8YeG0cx5Bi+nvAp81Rnib5E9J2k0E+BdnxcwsXIaMI481b?=
=?us-ascii?Q?IiToR3CWweZ1bJZfkErORg01oi14dIb/PlW1Y2/mYgOzmb+4xyXwgP/RCVHv?=
=?us-ascii?Q?PTqyt25u4QkQQJOaxjKDAT7aGBwJ8KVuroxiFQEWcunC3rtRlDi9n7azoVsB?=
=?us-ascii?Q?dOuG1/uI6oRzJV00FQUNMczCWVj1WziaBrGdDNdo2YDro5Kj9kJbY3wA//po?=
=?us-ascii?Q?onAZ6a5Gey5PSlJuU6Kl4FVc2d2hUr1kdcsJv4d0npqG+IUMQa5p1E37DP/t?=
=?us-ascii?Q?kq66Lvl7pTDXuDGclP2tuCZR5+5O5lgf2znfSr9cAlMehtSq6NYf61janAOl?=
=?us-ascii?Q?xKbOzaO/v+Q9w6xA7LME1p3BRfTEvqgoD0MXISTJediGoikzk/IYL7xFdGnt?=
=?us-ascii?Q?hd1csuh2k2t8dT9ukbzo4/1YHU3gVCgVxwM0iPaYQw2He5jyS/O3gWCfqqE1?=
=?us-ascii?Q?tsIbaF32zxZAKs2OTXGhpLhlhvkcJbHY+t9IaL5tpvsjI62Wxdmm+QF3+dRG?=
=?us-ascii?Q?yMLd/AKSeVCkC/YCPjAAqrSOEEn2/RtTF+DOL7sW0y+e6BeNzUXh33qh2bdo?=
=?us-ascii?Q?jOmUb1PotCJc3csELysYw6V4yT7LokyMiTQm5095NG03esS+xo2M1/DHotzO?=
=?us-ascii?Q?CzCPZgU/f/8QTdFHT7MnLkmXxJG6GpHAT7QoU7dBkiBm5HnPlVschcHVky8J?=
=?us-ascii?Q?h7dTLH1upXIrZrg275rMiBeEte1nlT3DMldJO/qeBntATYSNm8IrncUElzci?=
=?us-ascii?Q?RwOCwKJZwmkXE7sAXA18ssE5pk+W2dw95K3+63WvNdlLnG4/zhIvuDXr/3iK?=
=?us-ascii?Q?xvSuIK4rJfNdrGNzQNe7ZdSPV54RzP6f9U6CS1af6DsheW/+L5OCSyqlI6vn?=
=?us-ascii?Q?5SJP0V4ypH+qQanpbquaP87WWTfJcZ8Cbr912ybOoyPvPzXYaOHdGommWBTR?=
=?us-ascii?Q?AFiEfmzt5bOqB+alt9nNpsDJcPlF1MPDnafhsejKyaqjY5rhtdocaTzBlFId?=
=?us-ascii?Q?tuA8Iwzsctm7wNwRlmqHUEOAMCyJ5D/Nm4ti8ewjz1b2BnRk+IW6ePB4PujY?=
=?us-ascii?Q?Sfad69EAsDRCbpdPp76k6Bbh3TnkYFDDE1FfLYYvWRrPXsE2Cqmzhe5jo3bv?=
=?us-ascii?Q?5o6JakPH6Im8YN0OT/fiCudZFAtqhpGylJxGg9UO6hWPDVyL6n3rahdkqTtu?=
=?us-ascii?Q?SOKSuiUebr8SQKOizjoNHXgV6OYCBtuSBIfsfCmifwAmdai838E+ftzwqPTa?=
=?us-ascii?Q?jegvp/yhwCW5rB4ktRxqb7NVwjgXx7zEv+a1mvs86Cxw0rhRB0qFKhEBAuRO?=
=?us-ascii?Q?AhrByS4wIfKOs41mEPoQHE0poB70V9lDVxyUp1T4UrmZXRO+IaCjtaaDRqMP?=
=?us-ascii?Q?fOHXsCwzgxhGMjaaqQtQXYltlBxBKTHE5fpJ?=
X-Forefront-Antispam-Report:
CIP:4.158.2.129;CTRY:GB;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:outbound-uk1.az.dlp.m.darktrace.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(82310400026)(1800799024)(376014)(7416014)(36860700013)(35042699022)(14060799003);DIR:OUT;SFP:1101;
X-OriginatorOrg: arm.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 12:55:10.9469
(UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: 19618585-1808-40ca-a1d5-08dda3670a8d
X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[4.158.2.129];Helo=[outbound-uk1.az.dlp.m.darktrace.com]
X-MS-Exchange-CrossTenant-AuthSource:
DU2PEPF00028D11.eurprd03.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR08MB5864
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
[...]
> But suppose the child_task(2) try to fork (child_task3) and
> inherit the event (create child_event(3, parent_event:0),
> and at the fork, forking can observe the parent event state as "EXIT".
> In thie situation why child_event(3, parent_event:0) should be created for
> child_task(3)?
Yes. You set out to monitor the whole hierarchy, so any child created
after the first task should be monitored, until such time that you close
the event.
Notably, a fair number of daemons go about their business by explicitly
closing their original task in order to detach from the tty.
Also, per the context switch optimization the original event doesn't
need to stay with the original parent, it can end up on a random child.
Ahh I overlooked daemon case. Thanks for clarification..!
--
Sincerely,
Yeoreum Yun
Return-Path: <linux-kernel+bounces-673226-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id BDCCE41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:56:15 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 1F4781897F7A
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:56:29 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 30D8828F51A;
Wed, 4 Jun 2025 12:56:10 +0000 (UTC)
Received: from TWMBX01.aspeed.com (mail.aspeedtech.com [211.20.114.72])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5A61F33DF;
Wed, 4 Jun 2025 12:56:06 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.20.114.72
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749041769; cv=none; b=Bm4sVRqo3mE6jkthFMMfsQXpSXWtPU5snz2QuSD3IOqJ1juWwEDSdouYo5hQvTkpdx9CGo/6VjksWb0ew/T0ce7vp3+rkyfkjGbVUIq59bUpSzfDSHdxoftIQk1gcwgDNCbCuqfdCpOBnZ9yD2rql+fe/v8ugH9u42QgGjc/jXE=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749041769; c=relaxed/simple;
bh=7IeDi/oHtkSF4YfsrwGMjCTravKUvrJO792i/uQpnEk=;
h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=uO5AsqE95z1GoSYoT7O/2PO11CyXAiZr80nzFnS5IhKKCfgfsT8BNyxCEWXZ3M8H4s4aqWsZVvTqpJ8+xsSNGpiaV3gerRqRg/UvLEhE0EgE0vUYjDBndYJ5Guy3lFg6F/guIXJHjJj9cbOzttqHjafbVfitCSb5MsXQytjaYNk=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com; spf=pass smtp.mailfrom=aspeedtech.com; arc=none smtp.client-ip=211.20.114.72
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aspeedtech.com
Received: from TWMBX01.aspeed.com (192.168.0.62) by TWMBX01.aspeed.com
(192.168.0.62) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.10; Wed, 4 Jun
2025 20:55:58 +0800
Received: from twmbx02.aspeed.com (192.168.10.13) by TWMBX01.aspeed.com
(192.168.0.62) with Microsoft SMTP Server id 15.2.1748.10 via Frontend
Transport; Wed, 4 Jun 2025 20:55:58 +0800
From: Jammy Huang <jammy_huang@xxxxxxxxxxxxxx>
To: <jassisinghbrar@xxxxxxxxx>, <robh@xxxxxxxxxx>, <krzk+dt@xxxxxxxxxx>,
<conor+dt@xxxxxxxxxx>, <joel@xxxxxxxxx>, <andrew@xxxxxxxxxxxxxxxxxxxx>,
<jammy_huang@xxxxxxxxxxxxxx>, <devicetree@xxxxxxxxxxxxxxx>,
<linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, <linux-aspeed@xxxxxxxxxxxxxxxx>,
<linux-kernel@xxxxxxxxxxxxxxx>
Subject: [PATCH v2 0/2] ASPEED: Add mailbox driver for AST2700 series
Date: Wed, 4 Jun 2025 20:55:56 +0800
Message-ID: <20250604125558.1614523-1-jammy_huang@xxxxxxxxxxxxxx>
X-Mailer: git-send-email 2.34.1
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain
X-Spam-Status: No, score=-3.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Add mailbox controller driver for AST27XX SoCs, which provides
independent tx/rx mailbox between different processors. There are 4
channels for each tx/rx mailbox and each channel has an 32-byte FIFO.
v2 changes:
- Update document
Jammy Huang (2):
dt-bindings: mailbox: Add ASPEED AST2700 series SoC
mailbox: aspeed: add mailbox driver for AST27XX series SoC
.../mailbox/aspeed,ast2700-mailbox.yaml | 57 +++++
drivers/mailbox/Kconfig | 8 +
drivers/mailbox/Makefile | 2 +
drivers/mailbox/ast2700-mailbox.c | 226 ++++++++++++++++++
4 files changed, 293 insertions(+)
create mode 100644 Documentation/devicetree/bindings/mailbox/aspeed,ast2700-mailbox.yaml
create mode 100644 drivers/mailbox/ast2700-mailbox.c
base-commit: 546b1c9e93c2bb8cf5ed24e0be1c86bb089b3253
--
2.25.1
Return-Path: <linux-kernel+bounces-673227-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 4526B41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:56:43 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 87F68177039
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:56:34 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 75B4728FA9C;
Wed, 4 Jun 2025 12:56:12 +0000 (UTC)
Received: from TWMBX01.aspeed.com (mail.aspeedtech.com [211.20.114.72])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 021D028ECF1;
Wed, 4 Jun 2025 12:56:09 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.20.114.72
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749041772; cv=none; b=lRYDZiIleP9BWA93rbZT7W2sgB5C0QgoTvl1RvIbHPdAb15KK/MCwv17CosTMfHv8e2TwvreBGD6nsXttn9TAbu3f3khgyt99vuhG7FhVS9yjbr9aKQo61t+qRIZsHsGABYtV7BD0NtvgcRQf1haQc9k99yrH2russ3Gy3AKpsM=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749041772; c=relaxed/simple;
bh=ST6N4j9IChqiI6wPSq7CVWYl+PD/5nV20ZnabquehuM=;
h=From:To:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version:Content-Type; b=RBU77mMKHuDeLn2aJxW1rO2C6cCJGta0CDyKepZvZtwNOC1iidA6npo8oyy/eQSoKRXyKJnmsJFs0n2vheSS/eMCwCQiN+bv8GthYRlIJ5Usi/T0RgjuC7ciwEOk1B34qPLGrtMH/plSmUU6DQyZQ6LQDrhuIUVr1ImfeJPfPCM=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com; spf=pass smtp.mailfrom=aspeedtech.com; arc=none smtp.client-ip=211.20.114.72
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aspeedtech.com
Received: from TWMBX01.aspeed.com (192.168.0.62) by TWMBX01.aspeed.com
(192.168.0.62) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.10; Wed, 4 Jun
2025 20:55:58 +0800
Received: from twmbx02.aspeed.com (192.168.10.13) by TWMBX01.aspeed.com
(192.168.0.62) with Microsoft SMTP Server id 15.2.1748.10 via Frontend
Transport; Wed, 4 Jun 2025 20:55:58 +0800
From: Jammy Huang <jammy_huang@xxxxxxxxxxxxxx>
To: <jassisinghbrar@xxxxxxxxx>, <robh@xxxxxxxxxx>, <krzk+dt@xxxxxxxxxx>,
<conor+dt@xxxxxxxxxx>, <joel@xxxxxxxxx>, <andrew@xxxxxxxxxxxxxxxxxxxx>,
<jammy_huang@xxxxxxxxxxxxxx>, <devicetree@xxxxxxxxxxxxxxx>,
<linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, <linux-aspeed@xxxxxxxxxxxxxxxx>,
<linux-kernel@xxxxxxxxxxxxxxx>
Subject: [PATCH v2 1/2] dt-bindings: mailbox: Add ASPEED AST2700 series SoC
Date: Wed, 4 Jun 2025 20:55:57 +0800
Message-ID: <20250604125558.1614523-2-jammy_huang@xxxxxxxxxxxxxx>
X-Mailer: git-send-email 2.34.1
In-Reply-To: <20250604125558.1614523-1-jammy_huang@xxxxxxxxxxxxxx>
References: <20250604125558.1614523-1-jammy_huang@xxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain
X-Spam-Status: No, score=-3.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Introduce the mailbox module for AST27XX series SoC, which is responsible
for interchanging messages between asymmetric processors.
Signed-off-by: Jammy Huang <jammy_huang@xxxxxxxxxxxxxx>
---
.../mailbox/aspeed,ast2700-mailbox.yaml | 57 +++++++++++++++++++
1 file changed, 57 insertions(+)
create mode 100644 Documentation/devicetree/bindings/mailbox/aspeed,ast2700-mailbox.yaml
diff --git a/Documentation/devicetree/bindings/mailbox/aspeed,ast2700-mailbox.yaml b/Documentation/devicetree/bindings/mailbox/aspeed,ast2700-mailbox.yaml
new file mode 100644
index 000000000000..1ab1ba3ea44f
--- /dev/null
+++ b/Documentation/devicetree/bindings/mailbox/aspeed,ast2700-mailbox.yaml
@@ -0,0 +1,57 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mailbox/aspeed,ast2700-mailbox.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ASPEED AST2700 mailbox controller
+
+maintainers:
+ - Jammy Huang <jammy_huang@xxxxxxxxxxxxxx>
+
+description:
+ ASPEED AST2700 has multiple processors that need to communicate with each
+ other. The mailbox controller provides a way for these processors to send
+ messages to each other. It is a hardware-based inter-processor communication
+ mechanism that allows processors to send and receive messages through
+ dedicated channels.
+ The mailbox's tx/rx are independent, meaning that one processor can send a
+ message while another processor is receiving a message simultaneously.
+ There are 4 channels available for both tx and rx operations. Each channel
+ has a FIFO buffer that can hold messages of a fixed size (32 bytes in this
+ case).
+ The mailbox controller also supports interrupt generation, allowing
+ processors to notify each other when a message is available or when an event
+ occurs.
+
+properties:
+ compatible:
+ const: aspeed,ast2700-mailbox
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ "#mbox-cells":
+ const: 1
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - "#mbox-cells"
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+ mailbox@12c1c200 {
+ compatible = "aspeed,ast2700-mailbox";
+ reg = <0x0 0x12c1c200 0x0 0x200>;
+ interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
+ #mbox-cells = <1>;
+ };
--
2.25.1
Return-Path: <linux-kernel+bounces-673228-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 030C441E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:57:17 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 948143A382B
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:56:21 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 18A7D28FABA;
Wed, 4 Jun 2025 12:56:15 +0000 (UTC)
Received: from TWMBX01.aspeed.com (mail.aspeedtech.com [211.20.114.72])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 46C0C28FA99;
Wed, 4 Jun 2025 12:56:12 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.20.114.72
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749041774; cv=none; b=EwWW3ZPk4Fdz4XacJloSdfc7HBscD8LHbVDWo9gmJkBS2LCQlIxLb5zMMwHupfxuaNQruN5NQSFVas9H+215UugYJ+baLvG8UIUTrvJrCIZ8CHbi4p0fxZ05W/mMTFaVP/QYAzp4d+CAK5VGfrYsJeoO3+PTciRqOthZjDaM1CE=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749041774; c=relaxed/simple;
bh=ZnivPXkqK4wMKidOpOSkoH7UR5KhHsgZC9GxUrrMCBg=;
h=From:To:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version:Content-Type; b=qLJaJQH5/YWtXysnqfMWWqZS+4cMprP+PkldQKeg0gwFHaAT6GndQJHO6anuS7fKLrhQyE+CWqKz/7oZ+XOHoMK9ZLp7md16ttDyfCAlquG6pf2D6cIpWQ5Yq2ZVTV3rg1maMlygcuaFvWa8ELCCG9EvwqkSQPOoE24W9J5+/tc=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com; spf=pass smtp.mailfrom=aspeedtech.com; arc=none smtp.client-ip=211.20.114.72
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aspeedtech.com
Received: from TWMBX01.aspeed.com (192.168.0.62) by TWMBX01.aspeed.com
(192.168.0.62) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.10; Wed, 4 Jun
2025 20:55:59 +0800
Received: from twmbx02.aspeed.com (192.168.10.13) by TWMBX01.aspeed.com
(192.168.0.62) with Microsoft SMTP Server id 15.2.1748.10 via Frontend
Transport; Wed, 4 Jun 2025 20:55:59 +0800
From: Jammy Huang <jammy_huang@xxxxxxxxxxxxxx>
To: <jassisinghbrar@xxxxxxxxx>, <robh@xxxxxxxxxx>, <krzk+dt@xxxxxxxxxx>,
<conor+dt@xxxxxxxxxx>, <joel@xxxxxxxxx>, <andrew@xxxxxxxxxxxxxxxxxxxx>,
<jammy_huang@xxxxxxxxxxxxxx>, <devicetree@xxxxxxxxxxxxxxx>,
<linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, <linux-aspeed@xxxxxxxxxxxxxxxx>,
<linux-kernel@xxxxxxxxxxxxxxx>
Subject: [PATCH v2 2/2] mailbox: aspeed: add mailbox driver for AST27XX series SoC
Date: Wed, 4 Jun 2025 20:55:58 +0800
Message-ID: <20250604125558.1614523-3-jammy_huang@xxxxxxxxxxxxxx>
X-Mailer: git-send-email 2.34.1
In-Reply-To: <20250604125558.1614523-1-jammy_huang@xxxxxxxxxxxxxx>
References: <20250604125558.1614523-1-jammy_huang@xxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain
X-Spam-Status: No, score=-3.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Add mailbox controller driver for AST27XX SoCs, which provides
independent tx/rx mailbox between different processors. There are 4
channels for each tx/rx mailbox and each channel has an 32-byte FIFO.
Signed-off-by: Jammy Huang <jammy_huang@xxxxxxxxxxxxxx>
---
drivers/mailbox/Kconfig | 8 ++
drivers/mailbox/Makefile | 2 +
drivers/mailbox/ast2700-mailbox.c | 226 ++++++++++++++++++++++++++++++
3 files changed, 236 insertions(+)
create mode 100644 drivers/mailbox/ast2700-mailbox.c
diff --git a/drivers/mailbox/Kconfig b/drivers/mailbox/Kconfig
index 68eeed660a4a..1c38cd570091 100644
--- a/drivers/mailbox/Kconfig
+++ b/drivers/mailbox/Kconfig
@@ -340,4 +340,12 @@ config THEAD_TH1520_MBOX
kernel is running, and E902 core used for power management among other
things.
+config AST2700_MBOX
+ tristate "ASPEED AST2700 IPC driver"
+ depends on ARCH_ASPEED || COMPILE_TEST
+ help
+ Mailbox driver implementation for ASPEED AST27XX SoCs. This driver
+ can be used to send message between different processors in SoC.
+ The driver provides mailbox support for sending interrupts to the
+ clients. Say Y here if you want to build this driver.
endif
diff --git a/drivers/mailbox/Makefile b/drivers/mailbox/Makefile
index 13a3448b3271..9a9add9a7548 100644
--- a/drivers/mailbox/Makefile
+++ b/drivers/mailbox/Makefile
@@ -72,3 +72,5 @@ obj-$(CONFIG_QCOM_CPUCP_MBOX) += qcom-cpucp-mbox.o
obj-$(CONFIG_QCOM_IPCC) += qcom-ipcc.o
obj-$(CONFIG_THEAD_TH1520_MBOX) += mailbox-th1520.o
+
+obj-$(CONFIG_AST2700_MBOX) += ast2700-mailbox.o
diff --git a/drivers/mailbox/ast2700-mailbox.c b/drivers/mailbox/ast2700-mailbox.c
new file mode 100644
index 000000000000..0ee10bd3a6e1
--- /dev/null
+++ b/drivers/mailbox/ast2700-mailbox.c
@@ -0,0 +1,226 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright Aspeed Technology Inc. (C) 2025. All rights reserved
+ */
+
+#include <linux/interrupt.h>
+#include <linux/io.h>
+#include <linux/iopoll.h>
+#include <linux/kernel.h>
+#include <linux/mailbox_controller.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/platform_device.h>
+#include <linux/slab.h>
+
+/* Each bit in the register represents an IPC ID */
+#define IPCR_TX_TRIG 0x00
+#define IPCR_TX_ENABLE 0x04
+#define IPCR_RX_ENABLE 0x104
+#define IPCR_TX_STATUS 0x08
+#define IPCR_RX_STATUS 0x108
+#define RX_IRQ(n) BIT(0 + 1 * (n))
+#define RX_IRQ_MASK 0xf
+#define IPCR_TX_DATA 0x10
+#define IPCR_RX_DATA 0x110
+
+struct ast2700_mbox_data {
+ u8 num_chans;
+ u8 msg_size;
+};
+
+struct ast2700_mbox {
+ struct mbox_controller mbox;
+ const struct ast2700_mbox_data *drv_data;
+ void __iomem *regs;
+ u32 *rx_buff;
+};
+
+static inline int ch_num(struct mbox_chan *chan)
+{
+ return chan - chan->mbox->chans;
+}
+
+static inline int ast2700_mbox_tx_done(struct ast2700_mbox *mb, int idx)
+{
+ return !(readl(mb->regs + IPCR_TX_STATUS) & BIT(idx));
+}
+
+static irqreturn_t ast2700_mbox_irq(int irq, void *p)
+{
+ struct ast2700_mbox *mb = p;
+ void __iomem *data_reg;
+ int num_words;
+ u32 *word_data;
+ u32 status;
+ int n;
+
+ /* Only examine channels that are currently enabled. */
+ status = readl(mb->regs + IPCR_RX_ENABLE) &
+ readl(mb->regs + IPCR_RX_STATUS);
+
+ if (!(status & RX_IRQ_MASK))
+ return IRQ_NONE;
+
+ for (n = 0; n < mb->mbox.num_chans; ++n) {
+ struct mbox_chan *chan = &mb->mbox.chans[n];
+
+ if (!(status & RX_IRQ(n)))
+ continue;
+
+ for (data_reg = mb->regs + IPCR_RX_DATA + mb->drv_data->msg_size * n,
+ word_data = chan->con_priv,
+ num_words = (mb->drv_data->msg_size / sizeof(u32));
+ num_words; num_words--, data_reg += sizeof(u32), word_data++)
+ *word_data = readl(data_reg);
+
+ mbox_chan_received_data(chan, chan->con_priv);
+
+ /* The IRQ can be cleared only once the FIFO is empty. */
+ writel(RX_IRQ(n), mb->regs + IPCR_RX_STATUS);
+ }
+
+ return IRQ_HANDLED;
+}
+
+static int ast2700_mbox_send_data(struct mbox_chan *chan, void *data)
+{
+ struct ast2700_mbox *mb = dev_get_drvdata(chan->mbox->dev);
+ void __iomem *data_reg;
+ u32 *word_data;
+ int num_words;
+ int idx = ch_num(chan);
+
+ if (!(readl(mb->regs + IPCR_TX_ENABLE) & BIT(idx))) {
+ dev_warn(mb->mbox.dev, "%s: Ch-%d not enabled yet\n", __func__, idx);
+ return -EBUSY;
+ }
+
+ if (!(ast2700_mbox_tx_done(mb, idx))) {
+ dev_warn(mb->mbox.dev, "%s: Ch-%d last data has not finished\n", __func__, idx);
+ return -EBUSY;
+ }
+
+ for (data_reg = mb->regs + IPCR_TX_DATA + mb->drv_data->msg_size * idx,
+ num_words = (mb->drv_data->msg_size / sizeof(u32)),
+ word_data = (u32 *)data;
+ num_words; num_words--, data_reg += sizeof(u32), word_data++)
+ writel(*word_data, data_reg);
+
+ writel(BIT(idx), mb->regs + IPCR_TX_TRIG);
+ dev_dbg(mb->mbox.dev, "%s: Ch-%d sent\n", __func__, idx);
+
+ return 0;
+}
+
+static int ast2700_mbox_startup(struct mbox_chan *chan)
+{
+ struct ast2700_mbox *mb = dev_get_drvdata(chan->mbox->dev);
+ int idx = ch_num(chan);
+ void __iomem *reg = mb->regs + IPCR_RX_ENABLE;
+
+ writel_relaxed(readl_relaxed(reg) | BIT(idx), reg);
+
+ return 0;
+}
+
+static void ast2700_mbox_shutdown(struct mbox_chan *chan)
+{
+ struct ast2700_mbox *mb = dev_get_drvdata(chan->mbox->dev);
+ int idx = ch_num(chan);
+ void __iomem *reg = mb->regs + IPCR_RX_ENABLE;
+
+ writel_relaxed(readl_relaxed(reg) & ~BIT(idx), reg);
+}
+
+static bool ast2700_mbox_last_tx_done(struct mbox_chan *chan)
+{
+ struct ast2700_mbox *mb = dev_get_drvdata(chan->mbox->dev);
+ int idx = ch_num(chan);
+
+ return ast2700_mbox_tx_done(mb, idx) ? true : false;
+}
+
+static const struct mbox_chan_ops ast2700_mbox_chan_ops = {
+ .send_data = ast2700_mbox_send_data,
+ .startup = ast2700_mbox_startup,
+ .shutdown = ast2700_mbox_shutdown,
+ .last_tx_done = ast2700_mbox_last_tx_done,
+};
+
+static int ast2700_mbox_probe(struct platform_device *pdev)
+{
+ struct ast2700_mbox *mb;
+ const struct ast2700_mbox_data *drv_data;
+ struct device *dev = &pdev->dev;
+ int irq, ret;
+
+ if (!pdev->dev.of_node)
+ return -ENODEV;
+
+ drv_data = (const struct ast2700_mbox_data *)device_get_match_data(&pdev->dev);
+
+ mb = devm_kzalloc(dev, sizeof(*mb), GFP_KERNEL);
+ if (!mb)
+ return -ENOMEM;
+
+ mb->mbox.chans = devm_kcalloc(&pdev->dev, drv_data->num_chans,
+ sizeof(*mb->mbox.chans), GFP_KERNEL);
+ if (!mb->mbox.chans)
+ return -ENOMEM;
+
+ for (int i = 0; i < drv_data->num_chans; i++) {
+ mb->mbox.chans[i].con_priv = devm_kcalloc(dev, drv_data->msg_size,
+ sizeof(u8), GFP_KERNEL);
+ if (!mb->mbox.chans[i].con_priv)
+ return -ENOMEM;
+ }
+
+ platform_set_drvdata(pdev, mb);
+
+ mb->regs = devm_platform_ioremap_resource(pdev, 0);
+ if (IS_ERR(mb->regs))
+ return PTR_ERR(mb->regs);
+
+ mb->drv_data = drv_data;
+ mb->mbox.dev = dev;
+ mb->mbox.num_chans = drv_data->num_chans;
+ mb->mbox.ops = &ast2700_mbox_chan_ops;
+ mb->mbox.txdone_irq = false;
+ mb->mbox.txdone_poll = true;
+ mb->mbox.txpoll_period = 5;
+
+ irq = platform_get_irq(pdev, 0);
+ if (irq < 0)
+ return irq;
+
+ ret = devm_request_irq(dev, irq, ast2700_mbox_irq, 0, dev_name(dev), mb);
+ if (ret)
+ return ret;
+
+ return devm_mbox_controller_register(dev, &mb->mbox);
+}
+
+static const struct ast2700_mbox_data ast2700_drv_data = {
+ .num_chans = 4,
+ .msg_size = 0x20,
+};
+
+static const struct of_device_id ast2700_mbox_of_match[] = {
+ { .compatible = "aspeed,ast2700-mailbox", .data = &ast2700_drv_data },
+ {}
+};
+MODULE_DEVICE_TABLE(of, ast2700_mbox_of_match);
+
+static struct platform_driver ast2700_mbox_driver = {
+ .driver = {
+ .name = "ast2700-mailbox",
+ .of_match_table = ast2700_mbox_of_match,
+ },
+ .probe = ast2700_mbox_probe,
+};
+module_platform_driver(ast2700_mbox_driver);
+
+MODULE_AUTHOR("Jammy Huang <jammy_huang@xxxxxxxxxxxxxx>");
+MODULE_DESCRIPTION("ASPEED AST2700 IPC driver");
+MODULE_LICENSE("GPL");
--
2.25.1
Return-Path: <linux-kernel+bounces-673229-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 2A54041E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 08:58:04 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 60B1916E920
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:58:03 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 7D18528F51A;
Wed, 4 Jun 2025 12:57:56 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="o+v7j5zI"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id B4B0328EA41;
Wed, 4 Jun 2025 12:57:55 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749041875; cv=none; b=B+9EV82CMNjJt8mh2vtO1JIQ0bmIorkNiUkAMyZ5tLR9t0cKrZxzk0wsXdvBQPHflKocXFolofCFcQJ/cyVWeVO3iIomoXTxiFeHJ8Ic0EABBv62QERsRYq3e9Xm0q3No85ZAMurH8vq198Qe29jOA6Nk2jDzlTUJIVt9MK6SMU=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749041875; c=relaxed/simple;
bh=11Nvyf99vShbEe5kd9DPHaYjIK6DlkTUxpTez7hCfzQ=;
h=Message-ID:Date:MIME-Version:Subject:To:References:From:
In-Reply-To:Content-Type; b=gnFn5GasU6neJJljkzFzvBKJu+yCRr7pHwxvMfp8rDPuYQp0cOw3HjZj3gMFWbvZXIpASIimKydr3aZnDbQxOV2END2cl0ATVM6wL67CeiiwsnVhpb/nszLi7bjTEopLrFM07GrAWC2+ecshEkbPgB/YyuvMrJ6AK+WeizljYow=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=o+v7j5zI; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 67214C4CEE7;
Wed, 4 Jun 2025 12:57:52 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749041875;
bh=11Nvyf99vShbEe5kd9DPHaYjIK6DlkTUxpTez7hCfzQ=;
h=Date:Subject:To:References:From:In-Reply-To:From;
b=o+v7j5zI+LWg7vNB5DNBrpIGRPnB6q3/yw78eqkYtgUGj698Y6lzeJexJNJPZyxUF
yZ646odrQ+f9E9PenAQcVYroKzTD4N+3UlQsO8K3LzMxz/hQ+UYp/+GWcouIU1XDHR
x1RvJhlpD8ahRmwyTQfkEy5/R8uiykITFqrJQwS6jFZb/ORKEEXYVGNPs83zk6/7oo
pwb0EKkenNav9r8WbcRKL399Z7/u/HE0/3jkUE43HuDG4k6mjmDZJzZMR2L3RGCvA7
M/raMH4e4+2HXAXd7oi8tI2sYbNnBPx0gb0nzktBtNsPFk4Gn9HeP8xY7vh5CnbfGH
gSjLrGstxN7sw==
Message-ID: <e967473f-f1cc-42d8-9786-437f52db4162@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 14:57:50 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v2 0/2] ASPEED: Add mailbox driver for AST2700 series
To: Jammy Huang <jammy_huang@xxxxxxxxxxxxxx>, jassisinghbrar@xxxxxxxxx,
robh@xxxxxxxxxx, krzk+dt@xxxxxxxxxx, conor+dt@xxxxxxxxxx, joel@xxxxxxxxx,
andrew@xxxxxxxxxxxxxxxxxxxx, devicetree@xxxxxxxxxxxxxxx,
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-aspeed@xxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
References: <20250604125558.1614523-1-jammy_huang@xxxxxxxxxxxxxx>
Content-Language: en-US
From: Krzysztof Kozlowski <krzk@xxxxxxxxxx>
Autocrypt: addr=krzk@xxxxxxxxxx; keydata=
xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79
cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu
JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH
gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE
J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj
NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS
BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU
vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM
Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD
TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzSVLcnp5c3p0b2Yg
S296bG93c2tpIDxrcnprQGtlcm5lbC5vcmc+wsGVBBMBCgA/AhsDBgsJCAcDAgYVCAIJCgsE
FgIDAQIeAQIXgBYhBJvQfg4MUfjVlne3VBuTQ307QWKbBQJoF1BKBQkWlnSaAAoJEBuTQ307
QWKbHukP/3t4tRp/bvDnxJfmNdNVn0gv9ep3L39IntPalBFwRKytqeQkzAju0whYWg+R/rwp
+r2I1Fzwt7+PTjsnMFlh1AZxGDmP5MFkzVsMnfX1lGiXhYSOMP97XL6R1QSXxaWOpGNCDaUl
ajorB0lJDcC0q3xAdwzRConxYVhlgmTrRiD8oLlSCD5baEAt5Zw17UTNDnDGmZQKR0fqLpWy
786Lm5OScb7DjEgcA2PRm17st4UQ1kF0rQHokVaotxRM74PPDB8bCsunlghJl1DRK9s1aSuN
hL1Pv9VD8b4dFNvCo7b4hfAANPU67W40AaaGZ3UAfmw+1MYyo4QuAZGKzaP2ukbdCD/DYnqi
tJy88XqWtyb4UQWKNoQqGKzlYXdKsldYqrLHGoMvj1UN9XcRtXHST/IaLn72o7j7/h/Ac5EL
8lSUVIG4TYn59NyxxAXa07Wi6zjVL1U11fTnFmE29ALYQEXKBI3KUO1A3p4sQWzU7uRmbuxn
naUmm8RbpMcOfa9JjlXCLmQ5IP7Rr5tYZUCkZz08LIfF8UMXwH7OOEX87Y++EkAB+pzKZNNd
hwoXulTAgjSy+OiaLtuCys9VdXLZ3Zy314azaCU3BoWgaMV0eAW/+gprWMXQM1lrlzvwlD/k
whyy9wGf0AEPpLssLVt9VVxNjo6BIkt6d1pMg6mHsUEVzsFNBFVDXDQBEADNkrQYSREUL4D3
Gws46JEoZ9HEQOKtkrwjrzlw/tCmqVzERRPvz2Xg8n7+HRCrgqnodIYoUh5WsU84N03KlLue
MNsWLJBvBaubYN4JuJIdRr4dS4oyF1/fQAQPHh8Thpiz0SAZFx6iWKB7Qrz3OrGCjTPcW6ei
OMheesVS5hxietSmlin+SilmIAPZHx7n242u6kdHOh+/SyLImKn/dh9RzatVpUKbv34eP1wA
GldWsRxbf3WP9pFNObSzI/Bo3kA89Xx2rO2roC+Gq4LeHvo7ptzcLcrqaHUAcZ3CgFG88CnA
6z6lBZn0WyewEcPOPdcUB2Q7D/NiUY+HDiV99rAYPJztjeTrBSTnHeSBPb+qn5ZZGQwIdUW9
YegxWKvXXHTwB5eMzo/RB6vffwqcnHDoe0q7VgzRRZJwpi6aMIXLfeWZ5Wrwaw2zldFuO4Dt
91pFzBSOIpeMtfgb/Pfe/a1WJ/GgaIRIBE+NUqckM+3zJHGmVPqJP/h2Iwv6nw8U+7Yyl6gU
BLHFTg2hYnLFJI4Xjg+AX1hHFVKmvl3VBHIsBv0oDcsQWXqY+NaFahT0lRPjYtrTa1v3tem/
JoFzZ4B0p27K+qQCF2R96hVvuEyjzBmdq2esyE6zIqftdo4MOJho8uctOiWbwNNq2U9pPWmu
4vXVFBYIGmpyNPYzRm0QPwARAQABwsF8BBgBCgAmAhsMFiEEm9B+DgxR+NWWd7dUG5NDfTtB
YpsFAmgXUF8FCRaWWyoACgkQG5NDfTtBYptO0w//dlXJs5/42hAXKsk+PDg3wyEFb4NpyA1v
qmx7SfAzk9Hf6lWwU1O6AbqNMbh6PjEwadKUk1m04S7EjdQLsj/MBSgoQtCT3MDmWUUtHZd5
RYIPnPq3WVB47GtuO6/u375tsxhtf7vt95QSYJwCB+ZUgo4T+FV4hquZ4AsRkbgavtIzQisg
Dgv76tnEv3YHV8Jn9mi/Bu0FURF+5kpdMfgo1sq6RXNQ//TVf8yFgRtTUdXxW/qHjlYURrm2
H4kutobVEIxiyu6m05q3e9eZB/TaMMNVORx+1kM3j7f0rwtEYUFzY1ygQfpcMDPl7pRYoJjB
dSsm0ZuzDaCwaxg2t8hqQJBzJCezTOIkjHUsWAK+tEbU4Z4SnNpCyM3fBqsgYdJxjyC/tWVT
AQ18NRLtPw7tK1rdcwCl0GFQHwSwk5pDpz1NH40e6lU+NcXSeiqkDDRkHlftKPV/dV+lQXiu
jWt87ecuHlpL3uuQ0ZZNWqHgZoQLXoqC2ZV5KrtKWb/jyiFX/sxSrodALf0zf+tfHv0FZWT2
zHjUqd0t4njD/UOsuIMOQn4Ig0SdivYPfZukb5cdasKJukG1NOpbW7yRNivaCnfZz6dTawXw
XRIV/KDsHQiyVxKvN73bThKhONkcX2LWuD928tAR6XMM2G5ovxLe09vuOzzfTWQDsm++9UKF a/A=
In-Reply-To: <20250604125558.1614523-1-jammy_huang@xxxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 04/06/2025 14:55, Jammy Huang wrote:
Add mailbox controller driver for AST27XX SoCs, which provides
independent tx/rx mailbox between different processors. There are 4
channels for each tx/rx mailbox and each channel has an 32-byte FIFO.
v2 changes:
- Update document
This is vague. What did you update there?
Best regards,
Krzysztof
Return-Path: <linux-kernel+bounces-673230-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id E68E341E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:00:20 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 089181895E79
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:00:34 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 15DA228F94C;
Wed, 4 Jun 2025 13:00:12 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="MRCsfPn2"
Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id BEC68175A5
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:00:09 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749042011; cv=none; b=YP4sS+Vf5qxA/xn9s1gaYFp7aO+b8OT/jf6o7CBDQTrM6dnTBfOpA9vJ3vyYfD6z6O/bK8fLmwTi2+gtpVpYjd/sweEGwEoO3lEO6yy1PP/moRsWK1wAIAdh1cK2DqmRFHJG/6CC1N0wWWFnI9DkcMUssFpy8c6qV/OXzKmPvRw=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749042011; c=relaxed/simple;
bh=8XVhguz1+Ed3YcXtVsOgIGoJBaQuam99SMuhMvkOoBQ=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=jKLc+4W8xuJwYA1urk1wJ1mYH3UsMyBALWDlgbhFvXMYg81YGTa9sQR3yFDDaEHMpDU73R5kIewqlpV50is9Aq76dc+nOA8MUWBhnr0XRvCDd9M+anVF2IftJcUysw0HD0kj0JINvFgSpwWPR62UUesXqDuaItp3fTwRL9FUxp4=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=MRCsfPn2; arc=none smtp.client-ip=205.220.168.131
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com
Received: from pps.filterd (m0279862.ppops.net [127.0.0.1])
by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5549qWmB012597
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:00:08 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h=
cc:content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=qcppdkim1; bh=
3yULVZvEmG9t/23IJG8ShwjnKhSSSSZCNlyggUkvwyY=; b=MRCsfPn2CoGwnkir
1jg+wgvLYQIX+E5BbJ2vWKbYgwI8Pht+dg9r7oCoajhFwawI0OZLZETd5UfJWhSw
Y8dqZUa7egZgknY0YPGyLK59vJHQaEGuewv7+b+xO+dj0jzLwh9U+k+oKowz1nhg
kWESiOHHBv1sLh8vYynXyumbrfnQj+vriomqFb9IBjV8FPZyddN6Cud4RpfFv/5y
Nn5gsVXg1n6Ttq7xasYEyYMQxxWcw27pcUL3s5qEomxD9LAHXGQZscElxovZYcy1
EL8m0oDyLMfGJpmHl7v/1j0vdjPzgi7bWDCxtYoGwF9IbTMVZrF6WsSYRFSw8Wpg
fTA4NA==
Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199])
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 472be81sw3-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT)
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 13:00:08 +0000 (GMT)
Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-7d09b74dc4bso148465785a.2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 06:00:08 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749042007; x=1749646807;
h=content-transfer-encoding:in-reply-to:from:content-language
:references:cc:to:subject:user-agent:mime-version:date:message-id
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=3yULVZvEmG9t/23IJG8ShwjnKhSSSSZCNlyggUkvwyY=;
b=JEoTr9MhYwRdNJGG6nf8mVFq/fkGuckGBYKSr3zLlK2J9ad/XUrzy0QuaV9SU25BS6
WeRUHi9ELwQCJVbAVbQ5V4HChw0rzKr2d3SUHqypEDndkUSVCg+RryDwH4b6KmGXKxeW
AiPGY1dQPZhX33YK7vxJcKbX5A201tHCzv9UQAtj8rGnLp0SZH8L6TjmlUTX3+zF2LV3
d6Q0eMqy62lhzJ+x4Omc72vokj3imG7VR5/Cn/ov5vZ3ypfeobCTuUjK1C61MNhrEWDT
d8bP+LZnmzJMgYn3zRfgl08tGIGpCSz+BNfwa8triJUEdRTR4w5z7TOIg2n0Eo5fs46f
j3GQ==
X-Forwarded-Encrypted: i=1; AJvYcCXjFEdhpRDnCQCqKhPAK7QZZgCyu9ICoJsYF4WsixsXKJ4sfGSnZSB5X9Erv917RJd1+X4hAQWf6PEV2QQ=@vger.kernel.org
X-Gm-Message-State: AOJu0YyXgwyw6vwMyJb74NPrWgqtuRX2fB7Xl50lws5unu4L59e3Fu/P
F8nbwrsPuVf00l40XwOTBfjEsGvQsIaJ8elThbWgvDO8if2RTwR00vRQbgt+2AozU46JW17gBJM
33e3qKDwLnXr6SUTK0MNk9brqK+NMvZX2IwD9FuUWdN31wxABvtXhnUtuVTscoexfqH8=
X-Gm-Gg: ASbGnctMmg/aiASsx598cHKS1937SmyFLyf9WtCH8BraVajR/qjhYw4PzskOIEah1QX
iHXOlg6TsV8hGynlRl6OgUDhjH6BMqa5yxPg0kElkRqww6ZTyuf6miDIa6dmRuweXAFOSxIJ4Eg
u/WOi1S89c9eoOKq/SaRRYyZ3/6eKc1JTjpHr+12cKNXi9JFpi9u5rUhcKvUVncYlTr7ZikG9yt
Vrt90A6FUYuA86r60AUJOnwL9K+nJmoTXgpb6ZAlo14XYOSza8RFa/2Z6IUDBDzc64p4uHY0RJ6
m/QugKS5sgN97aV9gc5sI8LPODJaJEVzKiZyksbtVbXu+l+pffKBTDc5QiyJycMwJQ==
X-Received: by 2002:a05:620a:191b:b0:7c9:23d7:6dd6 with SMTP id af79cd13be357-7d2199090a7mr174139785a.13.1749042006670;
Wed, 04 Jun 2025 06:00:06 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IEn4xJuvGOLTe7ZTBVF2ik8xPdkhjFGFOvWwDjwbyfQtIsf2eqrG3bthpaWtCLfw7+RR9Tkxg==
X-Received: by 2002:a05:620a:191b:b0:7c9:23d7:6dd6 with SMTP id af79cd13be357-7d2199090a7mr174136985a.13.1749042006140;
Wed, 04 Jun 2025 06:00:06 -0700 (PDT)
Received: from [192.168.65.90] (078088045245.garwolin.vectranet.pl. [78.88.45.245])
by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ada6ad39565sm1094145666b.134.2025.06.04.06.00.04
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 06:00:05 -0700 (PDT)
Message-ID: <aeda0cf4-fd8a-4f3f-a3ea-922d5b0ceec0@xxxxxxxxxxxxxxxx>
Date: Wed, 4 Jun 2025 15:00:02 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH] media: venus: Fix MSM8998 frequency table
To: Vikash Garodia <quic_vgarodia@xxxxxxxxxxx>,
Konrad Dybcio <konradybcio@xxxxxxxxxx>,
Dikshita Agarwal <quic_dikshita@xxxxxxxxxxx>,
Bryan O'Donoghue <bryan.odonoghue@xxxxxxxxxx>,
Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>,
Stanimir Varbanov <stanimir.k.varbanov@xxxxxxxxx>,
Marc Gonzalez <mgonzalez@xxxxxxxxxx>,
Pierre-Hugues Husson <phhusson@xxxxxxxxxx>,
Hans Verkuil <hverkuil@xxxxxxxxx>
Cc: Marijn Suijten <marijn.suijten@xxxxxxxxxxxxxx>,
linux-media@xxxxxxxxxxxxxxx, linux-arm-msm@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx,
Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
References: <20250531-topic-venus_98_tbl-v1-1-68e5523a39dc@xxxxxxxxxxxxxxxx>
<4504e16a-f4c4-1f68-fa91-d3641a3decbe@xxxxxxxxxxx>
Content-Language: en-US
From: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
In-Reply-To: <4504e16a-f4c4-1f68-fa91-d3641a3decbe@xxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Authority-Analysis: v=2.4 cv=bNYWIO+Z c=1 sm=1 tr=0 ts=68404358 cx=c_pps
a=HLyN3IcIa5EE8TELMZ618Q==:117 a=FpWmc02/iXfjRdCD7H54yg==:17
a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10 a=EUspDBNiAAAA:8 a=beIa89I-peMrsPrHJCYA:9
a=QEXdDO2ut3YA:10 a=bTQJ7kPSJx9SKPbeHEYW:22
X-Proofpoint-GUID: 5i0D93dA1xvZXkzrkXaERSmwg8gW2Qaj
X-Proofpoint-ORIG-GUID: 5i0D93dA1xvZXkzrkXaERSmwg8gW2Qaj
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDA5OCBTYWx0ZWRfXxJ8T1RbkXfId
oS+8tm3h0Rpl1duHCwJrR8rTQLkyyQPQ20SkjXJtOevrkSq+QuNHwwzpOIAIiJ0epgU4Ac0xAWZ
IORQ9ACQxaizxxkpyXYMTyHaawCv4RF4kz0y0pH7G4iwcegQuBNzHNY1DO8qE3tMtqayrJXRY7T
CBlnKeneUg4lKQwUVJ4mRzOcE41znaJW4xC7w8vhzCuPttVvJzMA8ulQ3e1v7xBr6Hf0+ZHgF3f
i+aLY/jDnzvdYxzAHStVou+BOCz3E5D4rAmF/AfYWEzez+RNhmrZ8v+G+LjhemUikzZm74gVtRk
sop6PFfmuEDm5lpFtG5/reYe2NkAu6Zl9QUZaIPUZhWrsZYVr6Yk/WO+JZx0BnuCu2pmYciw6nF
1jSDyuDf0aHQWUTCEsCdrKzLW5ueZNAwowgYw+FuHlSIGAC7cxgQ2WJovRtVXeInSSDr/FqW
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
lowpriorityscore=0 malwarescore=0 phishscore=0 priorityscore=1501
suspectscore=0 mlxscore=0 impostorscore=0 spamscore=0 clxscore=1015
mlxlogscore=999 adultscore=0 bulkscore=0 classifier=spam authscore=0
authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1
engine=8.19.0-2505280000 definitions=main-2506040098
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 6/4/25 2:35 PM, Vikash Garodia wrote:
On 5/31/2025 5:52 PM, Konrad Dybcio wrote:
From: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
Fill in the correct data for the production SKU.
Fixes: 193b3dac29a4 ("media: venus: add msm8998 support")
Signed-off-by: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
---
drivers/media/platform/qcom/venus/core.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c
index d305d74bb152d21133c4dfa23805b17274426a5c..2bb514c322692475ed58198e17f906f894d81cf4 100644
--- a/drivers/media/platform/qcom/venus/core.c
+++ b/drivers/media/platform/qcom/venus/core.c
@@ -709,11 +709,11 @@ static const struct venus_resources msm8996_res = {
};
static const struct freq_tbl msm8998_freq_table[] = {
- { 1944000, 465000000 }, /* 4k UHD @ 60 (decode only) */
- { 972000, 465000000 }, /* 4k UHD @ 30 */
- { 489600, 360000000 }, /* 1080p @ 60 */
- { 244800, 186000000 }, /* 1080p @ 30 */
- { 108000, 100000000 }, /* 720p @ 30 */
+ { 1728000, 533000000 }, /* 4k UHD @ 60 (decode only) */
+ { 1036800, 444000000 }, /* 2k @ 120 */
+ { 829440, 355200000 }, /* 4k @ 44 */
+ { 489600, 269330000 },/* 4k @ 30 */
+ { 108000, 200000000 }, /* 1080p @ 60 */
What has ideally changed in production SKU which led to this change. Pls add
this info.
I have no clue what's the root reason for the clock plan change, probably
some hw bugs were ironed out and higher clocks were deemed stable
Konrad
Return-Path: <linux-kernel+bounces-673231-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 6979741E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:06:13 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id D7D5A7A9A89
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:04:52 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 7BE7C28F538;
Wed, 4 Jun 2025 13:06:03 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="2hrG7euS"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id CBE7426AC3;
Wed, 4 Jun 2025 13:06:01 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749042361; cv=none; b=EfeM3zbw9OByhqM+N9mRD1ZqOk0xb53iZYlbdJ6mKVHepo0s51KwmgqWWiQIEay05xSC8jwNAaWN617vRqoCzvANaLyDcPssLG3eqXBGVS9mm4TnPQ5dhPOFhlX4flMKIkUT3HcfAjOxMybTin62Ta2NM+OPt58DlWDL/zQIXVE=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749042361; c=relaxed/simple;
bh=VqTV+nJz0ytxttXPlUQ/iAedCX5a5P9HkTM1urLY2XU=;
h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=q4W20+PGwGpT0weZhdXPT5BYcNiFZCV0LmXvkJEjNyZtuVbz1RqPYFaKWX9M/sqp/ODqS3a7sly7jifwGBqt+4NWQQf0bDwFN4cUAEOVpAU8A4KVBPGFJGsNNfRGV2vrawyUxHbO48lAgUlG8kMJ9HHp/bsPA6Q/QU4CHbWnriA=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=2hrG7euS; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id B7571C4CEE7;
Wed, 4 Jun 2025 13:06:00 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org;
s=korg; t=1749042361;
bh=VqTV+nJz0ytxttXPlUQ/iAedCX5a5P9HkTM1urLY2XU=;
h=From:To:Cc:Subject:Date:From;
b=2hrG7euSL6QTi7r6FrfQcVCq4iuLLzb7yg3EErKi0F0tvJO8ZFMJaFK+zH0xJGUzP
jKfT+GXFGgVd0Xrfe7GInHSoqHdRlmbN38uS3KcSwDAgVT/im5E2wd8CJvMKt6hOpc
4z0N3zagSkKUXpkjiDfVp6v3d3LXSA4xfUnq02OM=
From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
To: linux-kernel@xxxxxxxxxxxxxxx,
akpm@xxxxxxxxxxxxxxxxxxxx,
torvalds@xxxxxxxxxxxxxxxxxxxx,
stable@xxxxxxxxxxxxxxx
Cc: lwn@xxxxxxx,
jslaby@xxxxxxx,
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Subject: Linux 5.4.294
Date: Wed, 4 Jun 2025 15:05:56 +0200
Message-ID: <2025060457-precinct-hedge-839f@gregkh>
X-Mailer: git-send-email 2.49.0
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
I'm announcing the release of the 5.4.294 kernel.
All users of the 5.4 kernel series must upgrade.
The updated 5.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.4.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/admin-guide/kernel-parameters.txt | 2
Makefile | 14
arch/arm/boot/dts/tegra114.dtsi | 2
arch/arm64/boot/dts/rockchip/px30.dtsi | 4
arch/mips/include/asm/ftrace.h | 16
arch/mips/include/asm/ptrace.h | 3
arch/mips/kernel/pm-cps.c | 30 -
arch/parisc/math-emu/driver.c | 16
arch/powerpc/kernel/prom_init.c | 4
arch/um/Makefile | 1
arch/um/kernel/mem.c | 1
arch/x86/include/asm/nmi.h | 2
arch/x86/kernel/cpu/bugs.c | 10
arch/x86/kernel/nmi.c | 42 +
arch/x86/kernel/reboot.c | 10
arch/x86/um/os-Linux/mcontext.c | 3
crypto/algif_hash.c | 4
drivers/acpi/Kconfig | 2
drivers/acpi/hed.c | 7
drivers/acpi/pptt.c | 11
drivers/clocksource/i8253.c | 6
drivers/cpuidle/governors/menu.c | 13
drivers/dma/dmatest.c | 6
drivers/edac/altera_edac.c | 9
drivers/edac/altera_edac.h | 2
drivers/edac/ie31200_edac.c | 28 -
drivers/fpga/altera-cvp.c | 2
drivers/gpu/drm/amd/amdkfd/kfd_process.c | 16
drivers/gpu/drm/drm_atomic_helper.c | 28 +
drivers/gpu/drm/drm_edid.c | 1
drivers/gpu/drm/i915/gvt/opregion.c | 8
drivers/gpu/drm/mediatek/mtk_dpi.c | 5
drivers/hid/hid-ids.h | 4
drivers/hid/hid-quirks.c | 2
drivers/hid/usbhid/usbkbd.c | 2
drivers/hwmon/gpio-fan.c | 16
drivers/hwmon/xgene-hwmon.c | 2
drivers/i2c/busses/i2c-imx-lpi2c.c | 4
drivers/i2c/busses/i2c-pxa.c | 5
drivers/iio/accel/adis16201.c | 4
drivers/iio/adc/ad7606_spi.c | 2
drivers/iio/adc/ad7768-1.c | 2
drivers/iio/adc/dln2-adc.c | 2
drivers/iio/chemical/sps30.c | 2
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c | 6
drivers/infiniband/sw/rxe/rxe_cq.c | 5
drivers/input/mouse/synaptics.c | 5
drivers/iommu/amd_iommu_init.c | 8
drivers/irqchip/irq-gic-v2m.c | 8
drivers/mailbox/mailbox.c | 7
drivers/md/dm-cache-target.c | 24
drivers/md/dm-integrity.c | 2
drivers/md/dm-table.c | 9
drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c | 3
drivers/media/usb/cx231xx/cx231xx-417.c | 2
drivers/mmc/host/sdhci-pci-core.c | 6
drivers/mmc/host/sdhci.c | 9
drivers/net/bonding/bond_main.c | 2
drivers/net/dsa/b53/b53_common.c | 2
drivers/net/dsa/sja1105/sja1105_main.c | 6
drivers/net/ethernet/amd/xgbe/xgbe-desc.c | 9
drivers/net/ethernet/amd/xgbe/xgbe-dev.c | 24
drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 11
drivers/net/ethernet/amd/xgbe/xgbe.h | 4
drivers/net/ethernet/apm/xgene-v2/main.c | 4
drivers/net/ethernet/dlink/dl2k.c | 2
drivers/net/ethernet/dlink/dl2k.h | 2
drivers/net/ethernet/freescale/fec_main.c | 7
drivers/net/ethernet/mellanox/mlx4/alloc.c | 6
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 5
drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c | 3
drivers/net/ethernet/mellanox/mlx5/core/events.c | 11
drivers/net/ethernet/mellanox/mlx5/core/health.c | 1
drivers/net/ethernet/mellanox/mlx5/core/rdma.c | 2
drivers/net/ethernet/microchip/lan743x_main.c | 75 +-
drivers/net/ethernet/microchip/lan743x_main.h | 21
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c | 7
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 2
drivers/net/ieee802154/ca8210.c | 9
drivers/net/vxlan.c | 18
drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 6
drivers/net/wireless/realtek/rtw88/main.c | 17
drivers/net/wireless/realtek/rtw88/rtw8822b.c | 14
drivers/nvdimm/label.c | 3
drivers/nvme/host/core.c | 3
drivers/nvme/host/tcp.c | 31 +
drivers/nvme/target/tcp.c | 3
drivers/of/device.c | 7
drivers/pci/controller/dwc/pci-imx6.c | 5
drivers/pci/setup-bus.c | 6
drivers/phy/phy-core.c | 7
drivers/phy/renesas/phy-rcar-gen3-usb2.c | 7
drivers/phy/tegra/xusb.c | 8
drivers/pinctrl/bcm/pinctrl-bcm281xx.c | 44 -
drivers/pinctrl/devicetree.c | 10
drivers/pinctrl/meson/pinctrl-meson.c | 2
drivers/platform/x86/asus-wmi.c | 3
drivers/platform/x86/fujitsu-laptop.c | 33 +
drivers/platform/x86/thinkpad_acpi.c | 7
drivers/regulator/ad5398.c | 12
drivers/rtc/rtc-ds1307.c | 4
drivers/scsi/lpfc/lpfc_hbadisc.c | 17
drivers/scsi/mpt3sas/mpt3sas_ctl.c | 12
drivers/scsi/st.c | 29 -
drivers/scsi/st.h | 2
drivers/spi/spi-fsl-dspi.c | 20
drivers/spi/spi-loopback-test.c | 2
drivers/spi/spi-sun4i.c | 5
drivers/staging/axis-fifo/axis-fifo.c | 415 +++++----------
drivers/staging/axis-fifo/axis-fifo.txt | 18
drivers/staging/iio/adc/ad7816.c | 2
drivers/target/iscsi/iscsi_target.c | 2
drivers/target/target_core_file.c | 3
drivers/target/target_core_iblock.c | 4
drivers/target/target_core_sbc.c | 6
drivers/usb/chipidea/ci_hdrc_imx.c | 42 -
drivers/usb/class/usbtmc.c | 59 +-
drivers/usb/host/uhci-platform.c | 2
drivers/usb/typec/tcpm/tcpm.c | 2
drivers/usb/typec/ucsi/displayport.c | 2
drivers/video/fbdev/core/tileblit.c | 37 +
drivers/video/fbdev/fsl-diu-fb.c | 1
drivers/xen/platform-pci.c | 4
drivers/xen/swiotlb-xen.c | 18
drivers/xen/xenbus/xenbus.h | 2
drivers/xen/xenbus/xenbus_comms.c | 9
drivers/xen/xenbus/xenbus_dev_frontend.c | 2
drivers/xen/xenbus/xenbus_probe.c | 14
drivers/xen/xenbus/xenbus_xs.c | 18
fs/btrfs/extent_io.c | 7
fs/btrfs/send.c | 6
fs/cifs/readdir.c | 7
fs/coredump.c | 80 ++
fs/ext4/balloc.c | 4
fs/namespace.c | 9
fs/nfs/callback_proc.c | 2
fs/nfs/filelayout/filelayoutdev.c | 6
fs/nfs/flexfilelayout/flexfilelayout.c | 1
fs/nfs/flexfilelayout/flexfilelayoutdev.c | 6
fs/nfs/nfs4proc.c | 9
fs/nfs/nfs4state.c | 10
fs/nfs/pnfs.c | 29 -
fs/nfs/pnfs.h | 5
fs/nfs/pnfs_nfs.c | 9
fs/ocfs2/journal.c | 80 ++
fs/ocfs2/journal.h | 1
fs/ocfs2/ocfs2.h | 17
fs/ocfs2/quota_local.c | 9
fs/ocfs2/super.c | 3
fs/orangefs/inode.c | 7
include/drm/drm_atomic.h | 23
include/linux/binfmts.h | 1
include/linux/dma-mapping.h | 12
include/linux/mlx4/device.h | 2
include/linux/pid.h | 5
include/linux/rcutree.h | 2
include/linux/types.h | 3
include/sound/pcm.h | 2
include/trace/events/btrfs.h | 2
include/uapi/linux/types.h | 1
kernel/cgroup/cgroup.c | 2
kernel/fork.c | 108 +++
kernel/params.c | 4
kernel/rcu/tree_plugin.h | 11
kernel/time/posix-timers.c | 1
kernel/trace/trace.c | 5
lib/dynamic_queue_limits.c | 2
mm/memcontrol.c | 6
mm/page_alloc.c | 8
net/bridge/br_nf_core.c | 7
net/bridge/br_private.h | 1
net/can/bcm.c | 79 +-
net/core/pktgen.c | 13
net/ipv4/fib_rules.c | 4
net/ipv6/fib6_rules.c | 4
net/llc/af_llc.c | 8
net/netfilter/ipset/ip_set_hash_gen.h | 2
net/netfilter/nf_conntrack_standalone.c | 12
net/netfilter/nf_tables_api.c | 51 +
net/openvswitch/actions.c | 3
net/sched/sch_drr.c | 9
net/sched/sch_hfsc.c | 15
net/sched/sch_htb.c | 13
net/sched/sch_qfq.c | 11
net/sunrpc/clnt.c | 3
net/xfrm/xfrm_policy.c | 3
net/xfrm/xfrm_state.c | 3
scripts/config | 26
scripts/kconfig/merge_config.sh | 4
security/smack/smackfs.c | 4
sound/core/oss/pcm_oss.c | 3
sound/core/pcm_native.c | 11
sound/pci/es1968.c | 6
sound/sh/Kconfig | 2
sound/soc/intel/boards/bytcr_rt5640.c | 13
sound/soc/soc-ops.c | 29 +
tools/bpf/bpftool/common.c | 3
tools/build/Makefile.build | 6
198 files changed, 1680 insertions(+), 838 deletions(-)
Abdun Nihaal (1):
qlcnic: fix memory leak in qlcnic_sriov_channel_cfg_cmd()
Aditya Garg (3):
Input: synaptics - enable InterTouch on Dynabook Portege X30L-G
Input: synaptics - enable InterTouch on Dell Precision M3800
Input: synaptics - enable InterTouch on TUXEDO InfinityBook Pro 14 v5
Al Viro (2):
do_umount(): add missing barrier before refcount checks in sync case
__legitimize_mnt(): check for MNT_SYNC_UMOUNT should be under mount_lock
Alessandro Grassi (1):
spi: spi-sun4i: fix early activation
Alexander Stein (2):
usb: chipidea: ci_hdrc_imx: use dev_err_probe()
hwmon: (gpio-fan) Add missing mutex locks
Alexandre Belloni (1):
rtc: ds1307: stop disabling alarms on probe
Alexei Lazar (1):
net/mlx5: Extend Ethtool loopback selftest to support non-linear SKB
Alexey Charkov (1):
usb: uhci-platform: Make the clock really optional
Alexey Denisov (1):
lan743x: fix endianness when accessing descriptors
Alistair Francis (1):
nvmet-tcp: don't restore null sk_state_change
Andreas Schwab (1):
powerpc/prom_init: Fixup missing #size-cells on PowerBook6,7
Andrei Kuchynski (1):
usb: typec: ucsi: displayport: Fix NULL pointer access
Andrey Vatoropin (1):
hwmon: (xgene-hwmon) use appropriate type for the latency value
Andy Shevchenko (2):
types: Complement the aligned types with signed 64-bit one
ieee802154: ca8210: Use proper setters and getters for bitwise types
Angelo Dureghello (1):
iio: adc: ad7606: fix serial register access
AngeloGioacchino Del Regno (1):
drm/mediatek: mtk_dpi: Add checks for reg_h_fre_con existence
Ankur Arora (2):
rcu: handle quiescent states for PREEMPT_RCU=n, PREEMPT_COUNT=y
rcu: fix header guard for rcu_all_qs()
Arnd Bergmann (2):
net: xgene-v2: remove incorrect ACPI_PTR annotation
EDAC/ie31200: work around false positive build warning
Artur Weber (1):
pinctrl: bcm281xx: Use "unsigned int" instead of bare "unsigned"
Benjamin Berg (1):
um: Store full CSGSFS and SS register from mcontext
Benjamin Marzinski (1):
dm: always update the array size in realloc_argv on success
Bibo Mao (1):
MIPS: Use arch specific syscall name match function
Bitterblue Smith (2):
wifi: rtw88: Fix rtw_init_ht_cap() for RTL8814AU
wifi: rtw88: Don't use static local variable in rtw8822b_set_tx_power_index_by_rate
Breno Leitao (2):
x86/bugs: Make spectre user default depend on MITIGATION_SPECTRE_V2
memcg: always call cond_resched() after fn()
Christian Brauner (5):
coredump: fix error handling for replace_fd()
pidfd: check pid has attached task in fdinfo
pid: add pidfd_prepare()
fork: use pidfd_prepare()
coredump: hand a pidfd to the usermode coredump helper
Christian Göttsche (1):
ext4: reorder capability check last
Clark Wang (1):
i2c: imx-lpi2c: Fix clock count when probe defers
Claudiu Beznea (1):
phy: renesas: rcar-gen3-usb2: Set timing registers only once
Colin Ian King (1):
lan743x: remove redundant initialization of variable current_head_index
Cong Wang (3):
sch_htb: make htb_qlen_notify() idempotent
sch_htb: make htb_deactivate() idempotent
sch_hfsc: Fix qlen accounting bug when using peek in hfsc_enqueue()
Daniel Gomez (1):
kconfig: merge_config: use an empty file as initfile
Daniel Wagner (1):
nvme: unblock ctrl state transition for firmware update
Dave Penkler (3):
usb: usbtmc: Fix erroneous get_stb ioctl error returns
usb: usbtmc: Fix erroneous wait_srq ioctl return
usb: usbtmc: Fix erroneous generic_read ioctl return
David Lechner (1):
iio: chemical: sps30: use aligned_s64 for timestamp
Dmitry Antipov (1):
module: ensure that kobject_put() is safe for module type kobjects
Dmitry Baryshkov (1):
phy: core: don't require set_mode() callback for phy_get_mode() to work
Dmitry Bogdanov (1):
scsi: target: iscsi: Fix timeout on deleted connection
Dmitry Torokhov (1):
Input: synaptics - enable SMBus for HP Elitebook 850 G1
Eelco Chaudron (1):
openvswitch: Fix unsafe attribute parsing in output_userspace()
Eric Dumazet (1):
posix-timers: Add cond_resched() to posix_timer_add() search loop
Erick Shepherd (2):
mmc: host: Wait for Vdd to settle on card power off
mmc: sdhci: Disable SD card clock before changing parameters
Fedor Pchelkin (1):
usb: chipidea: ci_hdrc_imx: implement usb_phy_init() error handling
Filipe Manana (1):
btrfs: send: return -ENAMETOOLONG when attempting a path that is too long
Florian Westphal (2):
netfilter: nf_tables: pass nft_chain to destroy function, not nft_ctx
netfilter: nf_tables: do not defer rule destruction via call_rcu
Frediano Ziglio (1):
xen: Add support for XenServer 6.1 platform device
Gabriel Shahrouzi (4):
staging: iio: adc: ad7816: Correct conditional logic for store mode
iio: adis16201: Correct inclinometer channel resolution
staging: axis-fifo: Remove hardware resets for user errors
staging: axis-fifo: Correct handling of tx_fifo_depth for size validation
Geert Uytterhoeven (2):
spi: loopback-test: Do not split 1024-byte hexdumps
ALSA: sh: SND_AICA should depend on SH_DMA_API
Goldwyn Rodrigues (1):
btrfs: correct the order of prelim_ref arguments in btrfs__prelim_ref
Greg Kroah-Hartman (1):
Linux 5.4.294
Hangbin Liu (1):
bonding: report duplicate MAC address in all situations
Hans Verkuil (1):
media: cx231xx: set device_caps for 417
Hans de Goede (1):
platform/x86: asus-wmi: Fix wlan_ctrl_by_user detection
Heiko Stuebner (1):
arm64: dts: rockchip: fix iface clock-name on px30 iommus
Helge Deller (1):
parisc: Fix double SIGFPE crash
Ian Rogers (1):
tools/build: Don't pass test log files to linker
Ido Schimmel (2):
vxlan: Annotate FDB data races
bridge: netfilter: Fix forwarding of fragmented packets
Ilia Gavrilov (1):
llc: fix data loss when reading from a socket in llc_ui_recvmsg()
Ilpo Järvinen (1):
PCI: Fix old_size lower bound in calculate_iosize() too
Isaac Scott (1):
regulator: ad5398: Add device tree support
Ivan Pravdin (1):
crypto: algif_hash - fix double free in hash_accept
Jan Kara (3):
ocfs2: switch osb->disable_recovery to enum
ocfs2: implement handshaking with ocfs2 recovery thread
ocfs2: stop quota recovery before disabling quotas
Jani Nikula (1):
drm/i915/gvt: fix unterminated-string-initialization warning
Jason Andryuk (2):
xenbus: Use kref to track req lifetime
xenbus: Allow PVH dom0 a non-local xenstore
Jeff Layton (1):
nfs: don't share pNFS DS connections between net namespaces
Jeongjun Park (1):
tracing: Fix oob write in trace_seq_to_buffer()
Jeremy Linton (1):
ACPI: PPTT: Fix processor subtable walk
Jessica Zhang (1):
drm: Add valid clones check
Jing Su (1):
dql: Fix dql->limit value when reset.
John Chau (1):
platform/x86: thinkpad_acpi: Support also NEC Lavie X1475JAS
Jonas Gorski (1):
net: dsa: b53: fix learning on VLAN unaware bridges
Jonathan Cameron (2):
iio: adc: dln2: Use aligned_s64 for timestamp
iio: adc: ad7768-1: Fix insufficient alignment of timestamp.
Jozsef Kadlecsik (1):
netfilter: ipset: fix region locking in hash types
Juergen Gross (1):
xen/swiotlb: relax alignment requirements
Justin Tee (1):
scsi: lpfc: Handle duplicate D_IDs in ndlp search-by D_ID routine
Kai Mäkisara (3):
scsi: st: Tighten the page format heuristics with MODE SELECT
scsi: st: ERASE does not change tape location
scsi: st: Restore some drive settings after reset
Kees Cook (1):
net/mlx4_core: Avoid impossible mlx4_db_alloc() order value
Konstantin Andreev (1):
smack: recognize ipv4 CIPSO w/o categories
Kuhanh Murugasen Krishnan (1):
fpga: altera-cvp: Increase credit timeout
Kuniyuki Iwashima (1):
ip: fib_rules: Fetch net from fib_rule in fib[46]_rule_configure().
Larisa Grigore (1):
spi: spi-fsl-dspi: restrict register range for regmap access
Li Lingfeng (1):
nfs: handle failure of nfs_get_lock_context in unlock path
Ma Ke (1):
phy: Fix error handling in tegra_xusb_port_init
Manuel Fombuena (1):
Input: synaptics - enable InterTouch on Dynabook Portege X30-D
Maor Gottlieb (1):
net/mlx5: E-Switch, Initialize MAC Address for Default GID
Marek Szyprowski (1):
dma-mapping: avoid potential unused data compilation warning
Mark Harmstone (1):
btrfs: avoid linker error in btrfs_find_create_tree_block()
Mark Pearson (1):
platform/x86: thinkpad_acpi: Ignore battery threshold change event notification
Markus Elfring (1):
media: c8sectpfe: Call of_node_put(i2c_bus) only once in c8sectpfe_probe()
Martin Blumenstingl (1):
pinctrl: meson: define the pull up/down resistor value as 60 kOhm
Martin Povišer (1):
ASoC: ops: Enforce platform maximum on initial value
Masahiro Yamada (1):
um: let 'make clean' properly clean underlying SUBARCH as well
Matthew Wilcox (Oracle) (1):
orangefs: Do not truncate file size
Mattias Barthel (1):
net: fec: ERR007885 Workaround for conventional TX
Michael Liang (1):
nvme-tcp: fix premature queue removal and I/O failover
Mike Christie (1):
scsi: target: Fix WRITE_SAME No Data Buffer crash
Mikulas Patocka (2):
dm-integrity: fix a warning on invalid table line
dm: restrict dm device size to 2^63-512 bytes
Milton Barrera (1):
HID: quirks: Add ADATA XPG alpha wireless mouse support
Ming-Hung Tsai (1):
dm cache: prevent BUG_ON by blocking retries on failed device resumes
Moshe Shemesh (1):
net/mlx5: Avoid report two health errors on same syndrome
Nathan Chancellor (1):
kbuild: Disable -Wdefault-const-init-unsafe
Nathan Lynch (1):
dmaengine: Revert "dmaengine: dmatest: Fix dmatest waiting less when interrupted"
Nicolas Bouchinet (1):
netfilter: conntrack: Bound nf_conntrack sysctl writes
Niravkumar L Rabara (2):
EDAC/altera: Test the correct error reg offset
EDAC/altera: Set DDR and SDMMC interrupt mask before registration
Oliver Hartkopp (2):
can: bcm: add locking for bcm_op runtime updates
can: bcm: add missing rcu read protection for procfs content
Oliver Neukum (1):
USB: usbtmc: use interruptible sleep in usbtmc_read
Pablo Neira Ayuso (1):
netfilter: nf_tables: wait for rcu grace period on net_device removal
Paul Burton (1):
MIPS: pm-cps: Use per-CPU variables as per-CPU, not per-core
Paul Chaignon (1):
xfrm: Sanitize marks before insert
Paul Kocialkowski (1):
net: dwmac-sun8i: Use parsed internal PHY address instead of 1
Pavel Paklov (1):
iommu/amd: Fix potential buffer overflow in parse_ivrs_acpihid
Pedro Tammela (1):
net_sched: hfsc: Address reentrant enqueue adding class to eltree twice
Peter Chen (2):
usb: chipidea: imx: change hsic power regulator as optional
usb: chipidea: imx: refine the error handling for hsic
Peter Seiderer (2):
net: pktgen: fix mpls maximum labels list parsing
net: pktgen: fix access outside of user given buffer in pktgen_thread_write()
Philip Yang (1):
drm/amdkfd: KFD release_work possible circular locking
Quentin Deslandes (2):
staging: axis-fifo: replace spinlock with mutex
staging: axis-fifo: avoid parsing ignored device tree properties
RD Babiera (1):
usb: typec: tcpm: delay SNK_TRY_WAIT_DEBOUNCE to SRC_TRYWAIT transition
Rafael J. Wysocki (1):
cpuidle: menu: Avoid discarding useful information
Richard Zhu (1):
PCI: imx6: Skip controller_id generation logic for i.MX7D
Robert Richter (1):
libnvdimm/labels: Fix divide error in nd_label_data_init()
Sebastian Andrzej Siewior (1):
clocksource/i8253: Use raw_spinlock_irqsave() in clockevent_i8253_disable()
Sergey Shtylyov (1):
of: module: add buffer overflow check in of_modalias()
Seyediman Seyedarab (1):
kbuild: fix argument parsing in scripts/config
Shahar Shitrit (2):
net/mlx5: Modify LSB bitmask in temperature event to include only the first bit
net/mlx5: Apply rate-limiting to high temperature warning
Shivasharan S (1):
scsi: mpt3sas: Send a diag reset if target reset fails
Shixiong Ou (1):
fbdev: fsl-diu-fb: add missing device_remove_file()
Silvano Seva (2):
iio: imu: st_lsm6dsx: fix possible lockup in st_lsm6dsx_read_fifo
iio: imu: st_lsm6dsx: fix possible lockup in st_lsm6dsx_read_tagged_fifo
Simon Horman (1):
net: dlink: Correct endianness handling of led_mode
Simona Vetter (1):
drm/atomic: clarify the rules around drm_atomic_state->allow_modeset
Suzuki K Poulose (1):
irqchip/gic-v2m: Prevent use after free of gicv2m_get_fwnode()
Svyatoslav Ryhel (1):
ARM: tegra: Switch DSI-B clock parent to PLLD on Tegra114
Takashi Iwai (2):
ASoC: Intel: bytcr_rt5640: Add DMI quirk for Acer Aspire SW3-013
ALSA: pcm: Fix race of buffer access at PCM OSS layer
Thangaraj Samynathan (1):
net: lan743x: Fix memleak issue when GSO enabled
Thomas Gleixner (1):
irqchip/gic-v2m: Mark a few functions __init
Thorsten Blum (1):
MIPS: Fix MAX_REG_OFFSET
Tianyang Zhang (1):
mm/page_alloc.c: avoid infinite retries caused by cpuset race
Tiwei Bie (1):
um: Update min_low_pfn to match changes in uml_reserved
Trond Myklebust (5):
NFSv4/pnfs: pnfs_set_layout_stateid() should update the layout cred
NFSv4/pnfs: Reset the layout state after a layoutreturn
NFSv4: Treat ENETUNREACH errors as fatal for state recovery
SUNRPC: rpc_clnt_set_transport() must not change the autobind setting
pNFS/flexfiles: Report ENETDOWN as a connection error
Tudor Ambarus (2):
dm: fix copying after src array boundaries
mailbox: use error ret code of of_parse_phandle_with_args()
Valentin Caron (1):
pinctrl: devicetree: do not goto err when probing hogs in pinctrl_dt_to_map
Valtteri Koskivuori (1):
platform/x86: fujitsu-laptop: Support Lifebook S2110 hotkeys
Victor Nogueira (3):
net_sched: drr: Fix double list add in class with netem as child qdisc
net_sched: hfsc: Fix a UAF vulnerability in class with netem as child qdisc
net_sched: qfq: Fix double list add in class with netem as child qdisc
Viktor Malik (1):
bpftool: Fix readlink usage in get_fd_type
Vishal Badole (1):
amd-xgbe: Fix to ensure dependent features are toggled with RX checksum offload
Vitalii Mordan (1):
i2c: pxa: fix call balance of i2c->clk handling routines
Vladimir Oltean (1):
net: dsa: sja1105: discard incoming frames in BR_STATE_LISTENING
Waiman Long (1):
x86/nmi: Add an emergency handler in nmi_desc & use it in nmi_shootdown_cpus()
Wang Zhaolong (2):
smb: client: Fix use-after-free in cifs_fill_dirent
smb: client: Reset all search buffer pointers when releasing buffer
Wentao Liang (2):
wifi: brcm80211: fmac: Add error handling for brcmf_usb_dl_writeimage()
ALSA: es1968: Add error handling for snd_pcm_hw_constraint_pow2()
William Tu (2):
net/mlx5e: set the tx_queue_len for pfifo_fast
net/mlx5e: reduce rep rxq depth to 256 for ECPF
Xiang wangx (1):
irqchip/gic-v2m: Add const to of_device_id
Xiaofei Tan (1):
ACPI: HED: Always initialize before evged
Zhu Yanjun (1):
RDMA/rxe: Fix slab-use-after-free Read in rxe_queue_cleanup bug
Zsolt Kajtar (1):
fbdev: core: tileblit: Implement missing margin clearing for tileblit
feijuan.li (1):
drm/edid: fixed the bug that hdr metadata was not reset
gaoxu (1):
cgroup: Fix compilation issue due to cgroup_mutex not being exported
junan (1):
HID: usbkbd: Fix the bit shift number for LED_KANA
Return-Path: <linux-kernel+bounces-673233-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 22DE141E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:06:29 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 1F629175D1F
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:06:30 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 1317E28F935;
Wed, 4 Jun 2025 13:06:13 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="CJXeRWkc"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id DAFCB28F504;
Wed, 4 Jun 2025 13:06:10 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749042371; cv=none; b=q8LFIyPfziOMZFfgL2M3WpfV2aGNApKPstvkTrz2nhjfUgpwS9hPYoY8w7MdIuTE8bttLwMAaU3g6ALgn3oNyJp3Bx4OOaDh3iWy0jiAZCj0RlEP8xGlCXCQkDqLojBqybEHLNe9OS2LKNgAYay0Ujsmnvyc2Vn1YEN/q7dRAH8=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749042371; c=relaxed/simple;
bh=3Sn2A+AaqB0IIAFR9JXycPZBT+glYfkk/znxDon+1rk=;
h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=FsRtUDmCLVJXZcboAMLwb98F0RrFSU7sXCZuNgnWX9aCk/zkFd3CARu5rseGFtuJafa5+brAblsfYIxsrV8uVarQ+WlT1Li3kEv7G5BEr1arraeSeDHEVzc8ddQsTmeaCS2Q6GaQ3ssALX3aMdEspfovqFQJxrHFFurRtOLQ6+A=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=CJXeRWkc; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id CE990C4CEE7;
Wed, 4 Jun 2025 13:06:09 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org;
s=korg; t=1749042370;
bh=3Sn2A+AaqB0IIAFR9JXycPZBT+glYfkk/znxDon+1rk=;
h=From:To:Cc:Subject:Date:From;
b=CJXeRWkcek7a1SVqaPBzDGWwK/s+dDTxXZvYtkK+ory9qM68xNB/wkbVjRxc16KRD
jytOK7cwEaws8ftb5+yeK15fp9GpkSrfow4AB5BHyIoj9+epTxavc9cjrqKPfHovxA
n835ltlo0rkQunAayyWeGd6UWPDcmYQjgV8KAr3s=
From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
To: linux-kernel@xxxxxxxxxxxxxxx,
akpm@xxxxxxxxxxxxxxxxxxxx,
torvalds@xxxxxxxxxxxxxxxxxxxx,
stable@xxxxxxxxxxxxxxx
Cc: lwn@xxxxxxx,
jslaby@xxxxxxx,
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Subject: Linux 5.10.238
Date: Wed, 4 Jun 2025 15:06:02 +0200
Message-ID: <2025060403-reappear-jacket-275f@gregkh>
X-Mailer: git-send-email 2.49.0
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
I'm announcing the release of the 5.10.238 kernel.
All users of the 5.10 kernel series must upgrade.
The updated 5.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.10.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/admin-guide/kernel-parameters.txt | 2
Makefile | 14
arch/arm/boot/dts/tegra114.dtsi | 2
arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi | 2
arch/arm64/include/asm/pgtable.h | 3
arch/mips/include/asm/ftrace.h | 16
arch/mips/include/asm/ptrace.h | 3
arch/mips/kernel/pm-cps.c | 30 +
arch/parisc/math-emu/driver.c | 16
arch/powerpc/kernel/prom_init.c | 4
arch/um/Makefile | 1
arch/um/kernel/mem.c | 1
arch/x86/events/amd/ibs.c | 3
arch/x86/include/asm/nmi.h | 2
arch/x86/include/asm/perf_event.h | 1
arch/x86/kernel/cpu/bugs.c | 10
arch/x86/kernel/nmi.c | 42 ++
arch/x86/kernel/reboot.c | 10
arch/x86/um/os-Linux/mcontext.c | 3
crypto/algif_hash.c | 4
drivers/acpi/Kconfig | 2
drivers/acpi/hed.c | 7
drivers/acpi/pptt.c | 11
drivers/char/tpm/tpm_tis_core.h | 2
drivers/clk/imx/clk-imx8mp.c | 151 +++++++++
drivers/clocksource/i8253.c | 6
drivers/clocksource/mips-gic-timer.c | 6
drivers/cpuidle/governors/menu.c | 13
drivers/dma/dmatest.c | 6
drivers/dma/ti/k3-udma.c | 10
drivers/edac/altera_edac.c | 9
drivers/edac/altera_edac.h | 2
drivers/edac/ie31200_edac.c | 28 -
drivers/fpga/altera-cvp.c | 2
drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 10
drivers/gpu/drm/amd/amdkfd/kfd_process.c | 16
drivers/gpu/drm/amd/display/dc/core/dc.c | 1
drivers/gpu/drm/ast/ast_mode.c | 10
drivers/gpu/drm/drm_atomic_helper.c | 28 +
drivers/gpu/drm/drm_edid.c | 1
drivers/gpu/drm/i915/gvt/opregion.c | 8
drivers/gpu/drm/mediatek/mtk_dpi.c | 5
drivers/gpu/drm/meson/meson_vclk.c | 6
drivers/gpu/drm/nouveau/nouveau_fence.c | 2
drivers/gpu/drm/panel/panel-simple.c | 25 -
drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 17 -
drivers/hid/hid-ids.h | 4
drivers/hid/hid-quirks.c | 2
drivers/hid/usbhid/usbkbd.c | 2
drivers/hwmon/gpio-fan.c | 16
drivers/hwmon/xgene-hwmon.c | 2
drivers/i2c/busses/i2c-imx-lpi2c.c | 4
drivers/i2c/busses/i2c-pxa.c | 5
drivers/i2c/busses/i2c-qup.c | 36 ++
drivers/iio/accel/adis16201.c | 4
drivers/iio/adc/ad7606_spi.c | 2
drivers/iio/adc/ad7768-1.c | 2
drivers/iio/adc/dln2-adc.c | 2
drivers/iio/chemical/sps30.c | 2
drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c | 6
drivers/infiniband/sw/rxe/rxe_cq.c | 5
drivers/input/mouse/synaptics.c | 5
drivers/iommu/amd/init.c | 8
drivers/iommu/intel/iommu.c | 4
drivers/irqchip/irq-gic-v2m.c | 8
drivers/mailbox/mailbox.c | 7
drivers/md/dm-cache-target.c | 24 +
drivers/md/dm-integrity.c | 2
drivers/md/dm-table.c | 9
drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c | 3
drivers/media/usb/cx231xx/cx231xx-417.c | 2
drivers/media/v4l2-core/v4l2-subdev.c | 2
drivers/mmc/host/renesas_sdhi_core.c | 10
drivers/mmc/host/sdhci-pci-core.c | 6
drivers/mmc/host/sdhci.c | 9
drivers/net/bonding/bond_main.c | 2
drivers/net/can/c_can/c_can_platform.c | 2
drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c | 2
drivers/net/dsa/b53/b53_common.c | 11
drivers/net/dsa/sja1105/sja1105_main.c | 6
drivers/net/ethernet/amd/xgbe/xgbe-desc.c | 9
drivers/net/ethernet/amd/xgbe/xgbe-dev.c | 24 +
drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 11
drivers/net/ethernet/amd/xgbe/xgbe.h | 4
drivers/net/ethernet/apm/xgene-v2/main.c | 4
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 36 +-
drivers/net/ethernet/cadence/macb_main.c | 19 -
drivers/net/ethernet/dlink/dl2k.c | 2
drivers/net/ethernet/dlink/dl2k.h | 2
drivers/net/ethernet/freescale/fec_main.c | 7
drivers/net/ethernet/intel/ice/ice_arfs.c | 9
drivers/net/ethernet/intel/ice/ice_lib.c | 5
drivers/net/ethernet/intel/ice/ice_main.c | 20 -
drivers/net/ethernet/mellanox/mlx4/alloc.c | 6
drivers/net/ethernet/mellanox/mlx4/en_tx.c | 2
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 5
drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c | 3
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 5
drivers/net/ethernet/mellanox/mlx5/core/events.c | 11
drivers/net/ethernet/mellanox/mlx5/core/health.c | 1
drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c | 1
drivers/net/ethernet/mellanox/mlx5/core/rdma.c | 12
drivers/net/ethernet/mellanox/mlx5/core/rdma.h | 4
drivers/net/ethernet/microchip/lan743x_main.c | 8
drivers/net/ethernet/microchip/lan743x_main.h | 1
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c | 7
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 2
drivers/net/ethernet/ti/cpsw_new.c | 1
drivers/net/ieee802154/ca8210.c | 9
drivers/net/vxlan/vxlan_core.c | 18 -
drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c | 6
drivers/net/wireless/mediatek/mt76/dma.c | 1
drivers/net/wireless/realtek/rtw88/main.c | 40 --
drivers/net/wireless/realtek/rtw88/reg.h | 3
drivers/net/wireless/realtek/rtw88/rtw8822b.c | 14
drivers/net/wireless/realtek/rtw88/util.c | 3
drivers/nvdimm/label.c | 3
drivers/nvme/host/core.c | 3
drivers/nvme/host/tcp.c | 31 +
drivers/nvme/target/tcp.c | 3
drivers/of/device.c | 7
drivers/pci/controller/dwc/pci-imx6.c | 5
drivers/pci/controller/pcie-brcmstb.c | 5
drivers/pci/setup-bus.c | 6
drivers/perf/arm-cmn.c | 2
drivers/phy/phy-core.c | 7
drivers/phy/renesas/phy-rcar-gen3-usb2.c | 7
drivers/phy/tegra/xusb.c | 8
drivers/pinctrl/bcm/pinctrl-bcm281xx.c | 44 +-
drivers/pinctrl/devicetree.c | 10
drivers/pinctrl/meson/pinctrl-meson.c | 2
drivers/platform/x86/asus-wmi.c | 3
drivers/platform/x86/fujitsu-laptop.c | 33 +-
drivers/platform/x86/thinkpad_acpi.c | 7
drivers/regulator/ad5398.c | 12
drivers/rtc/rtc-ds1307.c | 4
drivers/rtc/rtc-rv3032.c | 2
drivers/scsi/lpfc/lpfc_hbadisc.c | 17 -
drivers/scsi/mpt3sas/mpt3sas_ctl.c | 12
drivers/scsi/st.c | 29 +
drivers/scsi/st.h | 2
drivers/soc/ti/k3-socinfo.c | 13
drivers/spi/spi-fsl-dspi.c | 46 ++
drivers/spi/spi-loopback-test.c | 2
drivers/spi/spi-sun4i.c | 5
drivers/spi/spi-zynqmp-gqspi.c | 20 -
drivers/staging/axis-fifo/axis-fifo.c | 14
drivers/staging/iio/adc/ad7816.c | 2
drivers/target/iscsi/iscsi_target.c | 2
drivers/target/target_core_file.c | 3
drivers/target/target_core_iblock.c | 4
drivers/target/target_core_sbc.c | 6
drivers/thermal/qoriq_thermal.c | 13
drivers/usb/chipidea/ci_hdrc_imx.c | 36 +-
drivers/usb/class/usbtmc.c | 59 ++-
drivers/usb/gadget/udc/tegra-xudc.c | 4
drivers/usb/host/uhci-platform.c | 2
drivers/usb/host/xhci-tegra.c | 3
drivers/usb/typec/altmodes/displayport.c | 18 -
drivers/usb/typec/tcpm/tcpm.c | 2
drivers/usb/typec/ucsi/displayport.c | 2
drivers/usb/typec/ucsi/ucsi_ccg.c | 5
drivers/video/fbdev/core/bitblit.c | 5
drivers/video/fbdev/core/fbcon.c | 10
drivers/video/fbdev/core/fbcon.h | 38 --
drivers/video/fbdev/core/fbcon_ccw.c | 5
drivers/video/fbdev/core/fbcon_cw.c | 5
drivers/video/fbdev/core/fbcon_ud.c | 5
drivers/video/fbdev/core/tileblit.c | 45 ++
drivers/video/fbdev/fsl-diu-fb.c | 1
drivers/xen/platform-pci.c | 4
drivers/xen/swiotlb-xen.c | 18 -
drivers/xen/xenbus/xenbus.h | 2
drivers/xen/xenbus/xenbus_comms.c | 9
drivers/xen/xenbus/xenbus_dev_frontend.c | 2
drivers/xen/xenbus/xenbus_probe.c | 14
drivers/xen/xenbus/xenbus_xs.c | 18 -
fs/btrfs/extent-tree.c | 25 +
fs/btrfs/extent_io.c | 7
fs/btrfs/send.c | 6
fs/cifs/readdir.c | 7
fs/coredump.c | 81 ++++-
fs/ext4/balloc.c | 4
fs/namespace.c | 9
fs/nfs/delegation.c | 3
fs/nfs/filelayout/filelayoutdev.c | 6
fs/nfs/flexfilelayout/flexfilelayout.c | 1
fs/nfs/flexfilelayout/flexfilelayoutdev.c | 6
fs/nfs/nfs4proc.c | 9
fs/nfs/nfs4state.c | 10
fs/nfs/pnfs.c | 9
fs/nfs/pnfs.h | 4
fs/nfs/pnfs_nfs.c | 9
fs/ocfs2/journal.c | 80 +++-
fs/ocfs2/journal.h | 1
fs/ocfs2/ocfs2.h | 17 -
fs/ocfs2/quota_local.c | 9
fs/ocfs2/super.c | 3
fs/orangefs/inode.c | 7
include/drm/drm_atomic.h | 23 +
include/linux/binfmts.h | 1
include/linux/dma-mapping.h | 12
include/linux/ipv6.h | 1
include/linux/mlx4/device.h | 2
include/linux/pid.h | 1
include/linux/rcupdate.h | 3
include/linux/rcutree.h | 2
include/linux/tpm.h | 2
include/linux/types.h | 3
include/media/v4l2-subdev.h | 4
include/net/netfilter/nf_tables.h | 2
include/net/sch_generic.h | 15
include/sound/pcm.h | 2
include/trace/events/btrfs.h | 2
include/uapi/linux/types.h | 1
kernel/cgroup/cgroup.c | 2
kernel/fork.c | 98 +++++-
kernel/padata.c | 3
kernel/params.c | 4
kernel/rcu/tree_plugin.h | 11
kernel/time/posix-timers.c | 1
kernel/trace/trace.c | 5
lib/dynamic_queue_limits.c | 2
mm/memcontrol.c | 6
mm/page_alloc.c | 8
net/bridge/br_nf_core.c | 7
net/bridge/br_private.h | 1
net/can/bcm.c | 79 +++-
net/can/gw.c | 165 ++++++----
net/core/pktgen.c | 13
net/ipv4/fib_frontend.c | 18 -
net/ipv4/fib_rules.c | 4
net/ipv4/fib_trie.c | 22 -
net/ipv4/inet_hashtables.c | 37 +-
net/ipv4/tcp_input.c | 56 +--
net/ipv4/udp_offload.c | 61 +++
net/ipv6/fib6_rules.c | 4
net/ipv6/ip6_output.c | 9
net/llc/af_llc.c | 8
net/netfilter/ipset/ip_set_hash_gen.h | 2
net/netfilter/nf_conntrack_standalone.c | 12
net/netfilter/nf_tables_api.c | 54 ++-
net/netfilter/nft_immediate.c | 2
net/openvswitch/actions.c | 3
net/sched/act_mirred.c | 22 -
net/sched/sch_codel.c | 2
net/sched/sch_drr.c | 9
net/sched/sch_ets.c | 9
net/sched/sch_fq.c | 2
net/sched/sch_fq_codel.c | 2
net/sched/sch_fq_pie.c | 2
net/sched/sch_hfsc.c | 15
net/sched/sch_hhf.c | 2
net/sched/sch_pie.c | 2
net/sched/sch_qfq.c | 11
net/sunrpc/clnt.c | 3
net/sunrpc/rpcb_clnt.c | 5
net/tipc/crypto.c | 5
net/xfrm/xfrm_policy.c | 3
net/xfrm/xfrm_state.c | 3
samples/ftrace/sample-trace-array.c | 2
scripts/config | 26 -
scripts/kconfig/merge_config.sh | 4
security/smack/smackfs.c | 4
sound/core/oss/pcm_oss.c | 3
sound/core/pcm_native.c | 11
sound/pci/es1968.c | 6
sound/pci/hda/patch_realtek.c | 42 ++
sound/sh/Kconfig | 2
sound/soc/codecs/tas2764.c | 51 +--
sound/soc/intel/boards/bytcr_rt5640.c | 13
sound/soc/qcom/qdsp6/q6afe-clocks.c | 209 ++++++-------
sound/soc/qcom/qdsp6/q6afe.c | 2
sound/soc/qcom/qdsp6/q6afe.h | 2
sound/soc/soc-dai.c | 8
sound/soc/soc-ops.c | 29 +
sound/usb/format.c | 3
tools/bpf/bpftool/common.c | 3
tools/build/Makefile.build | 6
tools/lib/bpf/libbpf.c | 2
tools/testing/selftests/vm/compaction_test.c | 19 -
281 files changed, 2381 insertions(+), 1039 deletions(-)
Abdun Nihaal (1):
qlcnic: fix memory leak in qlcnic_sriov_channel_cfg_cmd()
Aditya Garg (3):
Input: synaptics - enable InterTouch on Dynabook Portege X30L-G
Input: synaptics - enable InterTouch on Dell Precision M3800
Input: synaptics - enable InterTouch on TUXEDO InfinityBook Pro 14 v5
Ahmad Fatoum (1):
clk: imx8mp: inform CCF of maximum frequency of clocks
Al Viro (2):
do_umount(): add missing barrier before refcount checks in sync case
__legitimize_mnt(): check for MNT_SYNC_UMOUNT should be under mount_lock
Alessandro Grassi (1):
spi: spi-sun4i: fix early activation
Alexander Lobakin (1):
ice: arfs: fix use-after-free when freeing @rx_cpu_rmap
Alexander Stein (2):
usb: chipidea: ci_hdrc_imx: use dev_err_probe()
hwmon: (gpio-fan) Add missing mutex locks
Alexander Sverdlin (1):
net: ethernet: ti: cpsw_new: populate netdev of_node
Alexandre Belloni (2):
rtc: rv3032: fix EERD location
rtc: ds1307: stop disabling alarms on probe
Alexei Lazar (1):
net/mlx5: Extend Ethtool loopback selftest to support non-linear SKB
Alexey Charkov (1):
usb: uhci-platform: Make the clock really optional
Alice Guo (1):
thermal/drivers/qoriq: Power down TMU on system suspend
Alistair Francis (1):
nvmet-tcp: don't restore null sk_state_change
Andreas Schwab (1):
powerpc/prom_init: Fixup missing #size-cells on PowerBook6,7
Andrei Kuchynski (1):
usb: typec: ucsi: displayport: Fix NULL pointer access
Andrew Davis (1):
soc: ti: k3-socinfo: Do not use syscon helper to build regmap
Andrey Vatoropin (1):
hwmon: (xgene-hwmon) use appropriate type for the latency value
Andy Shevchenko (2):
types: Complement the aligned types with signed 64-bit one
ieee802154: ca8210: Use proper setters and getters for bitwise types
Angelo Dureghello (1):
iio: adc: ad7606: fix serial register access
AngeloGioacchino Del Regno (1):
drm/mediatek: mtk_dpi: Add checks for reg_h_fre_con existence
Ankur Arora (2):
rcu: handle quiescent states for PREEMPT_RCU=n, PREEMPT_COUNT=y
rcu: fix header guard for rcu_all_qs()
Arnd Bergmann (2):
net: xgene-v2: remove incorrect ACPI_PTR annotation
EDAC/ie31200: work around false positive build warning
Artur Weber (1):
pinctrl: bcm281xx: Use "unsigned int" instead of bare "unsigned"
Benjamin Berg (1):
um: Store full CSGSFS and SS register from mcontext
Benjamin Marzinski (1):
dm: always update the array size in realloc_argv on success
Bibo Mao (1):
MIPS: Use arch specific syscall name match function
Bitterblue Smith (5):
wifi: rtw88: Fix rtw_init_vht_cap() for RTL8814AU
wifi: rtw88: Fix rtw_init_ht_cap() for RTL8814AU
wifi: rtw88: Fix rtw_desc_to_mcsrate() to handle MCS16-31
wifi: rtw88: Fix download_firmware_validate() for RTL8814AU
wifi: rtw88: Don't use static local variable in rtw8822b_set_tx_power_index_by_rate
Bogdan-Gabriel Roman (1):
spi: spi-fsl-dspi: Halt the module after a new message transfer
Breno Leitao (2):
x86/bugs: Make spectre user default depend on MITIGATION_SPECTRE_V2
memcg: always call cond_resched() after fn()
Chris Mi (1):
net/mlx5: E-switch, Fix error handling for enabling roce
Christian Brauner (4):
coredump: fix error handling for replace_fd()
pid: add pidfd_prepare()
fork: use pidfd_prepare()
coredump: hand a pidfd to the usermode coredump helper
Christian Göttsche (1):
ext4: reorder capability check last
Christian Hewitt (1):
Revert "drm/meson: vclk: fix calculation of 59.94 fractional rates"
Clark Wang (1):
i2c: imx-lpi2c: Fix clock count when probe defers
Claudiu Beznea (1):
phy: renesas: rcar-gen3-usb2: Set timing registers only once
Cong Wang (2):
net_sched: Flush gso_skb list too during ->change()
sch_hfsc: Fix qlen accounting bug when using peek in hfsc_enqueue()
Dan Carpenter (1):
usb: typec: fix potential array underflow in ucsi_ccg_sync_control()
Daniel Gomez (1):
kconfig: merge_config: use an empty file as initfile
Daniel Wagner (1):
nvme: unblock ctrl state transition for firmware update
Dave Penkler (3):
usb: usbtmc: Fix erroneous get_stb ioctl error returns
usb: usbtmc: Fix erroneous wait_srq ioctl return
usb: usbtmc: Fix erroneous generic_read ioctl return
David Lechner (1):
iio: chemical: sps30: use aligned_s64 for timestamp
Diogo Ivo (1):
arm64: tegra: p2597: Fix gpio for vdd-1v8-dis regulator
Dmitry Antipov (1):
module: ensure that kobject_put() is safe for module type kobjects
Dmitry Baryshkov (2):
ASoC: q6afe-clocks: fix reprobing of the driver
phy: core: don't require set_mode() callback for phy_get_mode() to work
Dmitry Bogdanov (1):
scsi: target: iscsi: Fix timeout on deleted connection
Dmitry Torokhov (1):
Input: synaptics - enable SMBus for HP Elitebook 850 G1
Dominik Grzegorzek (1):
padata: do not leak refcount in reorder_work
Eelco Chaudron (1):
openvswitch: Fix unsafe attribute parsing in output_userspace()
Eric Dumazet (3):
can: gw: use call_rcu() instead of costly synchronize_rcu()
posix-timers: Add cond_resched() to posix_timer_add() search loop
tcp: bring back NUMA dispersion in inet_ehash_locks_alloc()
Erick Shepherd (2):
mmc: host: Wait for Vdd to settle on card power off
mmc: sdhci: Disable SD card clock before changing parameters
Fedor Pchelkin (2):
usb: chipidea: ci_hdrc_imx: implement usb_phy_init() error handling
wifi: mt76: disable napi on driver removal
Felix Fietkau (1):
net: ipv6: fix UDPv6 GSO segmentation with NAT
Feng Tang (1):
selftests/mm: compaction_test: support platform with huge mount of memory
Filipe Manana (2):
btrfs: don't BUG_ON() when 0 reference count at btrfs_lookup_extent_info()
btrfs: send: return -ENAMETOOLONG when attempting a path that is too long
Florian Westphal (2):
netfilter: nf_tables: pass nft_chain to destroy function, not nft_ctx
netfilter: nf_tables: do not defer rule destruction via call_rcu
Frediano Ziglio (1):
xen: Add support for XenServer 6.1 platform device
GONG Ruiqi (1):
usb: typec: fix pm usage counter imbalance in ucsi_ccg_sync_control()
Gabriel Shahrouzi (4):
staging: iio: adc: ad7816: Correct conditional logic for store mode
staging: axis-fifo: Remove hardware resets for user errors
staging: axis-fifo: Correct handling of tx_fifo_depth for size validation
iio: adis16201: Correct inclinometer channel resolution
Geert Uytterhoeven (2):
spi: loopback-test: Do not split 1024-byte hexdumps
ALSA: sh: SND_AICA should depend on SH_DMA_API
Goldwyn Rodrigues (1):
btrfs: correct the order of prelim_ref arguments in btrfs__prelim_ref
Greg Kroah-Hartman (1):
Linux 5.10.238
Hangbin Liu (1):
bonding: report duplicate MAC address in all situations
Hans Verkuil (1):
media: cx231xx: set device_caps for 417
Hans de Goede (1):
platform/x86: asus-wmi: Fix wlan_ctrl_by_user detection
Hector Martin (1):
ASoC: tas2764: Power up/down amp on mute ops
Helge Deller (1):
parisc: Fix double SIGFPE crash
Ian Rogers (1):
tools/build: Don't pass test log files to linker
Ido Schimmel (2):
vxlan: Annotate FDB data races
bridge: netfilter: Fix forwarding of fragmented packets
Ilia Gavrilov (1):
llc: fix data loss when reading from a socket in llc_ui_recvmsg()
Ilpo Järvinen (2):
tcp: reorganize tcp_in_ack_event() and tcp_count_delivered()
PCI: Fix old_size lower bound in calculate_iosize() too
Isaac Scott (1):
regulator: ad5398: Add device tree support
Ivan Pravdin (1):
crypto: algif_hash - fix double free in hash_accept
Jakub Kicinski (2):
net/sched: act_mirred: don't override retval if we already lost the skb
eth: mlx4: don't try to complete XDP frames in netpoll
Jan Kara (3):
ocfs2: switch osb->disable_recovery to enum
ocfs2: implement handshaking with ocfs2 recovery thread
ocfs2: stop quota recovery before disabling quotas
Jani Nikula (1):
drm/i915/gvt: fix unterminated-string-initialization warning
Jason Andryuk (2):
xenbus: Use kref to track req lifetime
xenbus: Allow PVH dom0 a non-local xenstore
Jeff Layton (1):
nfs: don't share pNFS DS connections between net namespaces
Jeongjun Park (1):
tracing: Fix oob write in trace_seq_to_buffer()
Jeremy Linton (1):
ACPI: PPTT: Fix processor subtable walk
Jessica Zhang (1):
drm: Add valid clones check
Jim Lin (1):
usb: host: tegra: Prevent host controller crash when OTG port is used
Jing Su (1):
dql: Fix dql->limit value when reset.
Joachim Priesner (1):
ALSA: usb-audio: Add second USB ID for Jabra Evolve 65 headset
John Chau (1):
platform/x86: thinkpad_acpi: Support also NEC Lavie X1475JAS
Jonas Gorski (3):
net: dsa: b53: allow leaky reserved multicast
net: dsa: b53: fix VLAN ID for untagged vlan on bridge leave
net: dsa: b53: fix learning on VLAN unaware bridges
Jonathan Cameron (2):
iio: adc: dln2: Use aligned_s64 for timestamp
iio: adc: ad7768-1: Fix insufficient alignment of timestamp.
Jozsef Kadlecsik (1):
netfilter: ipset: fix region locking in hash types
Juergen Gross (1):
xen/swiotlb: relax alignment requirements
Justin Tee (1):
scsi: lpfc: Handle duplicate D_IDs in ndlp search-by D_ID routine
Kai Mäkisara (3):
scsi: st: Tighten the page format heuristics with MODE SELECT
scsi: st: ERASE does not change tape location
scsi: st: Restore some drive settings after reset
Kees Cook (1):
net/mlx4_core: Avoid impossible mlx4_db_alloc() order value
Kevin Baker (1):
drm/panel: simple: Update timings for AUO G101EVN010
Konstantin Andreev (1):
smack: recognize ipv4 CIPSO w/o categories
Krzysztof Kozlowski (1):
can: c_can: Use of_property_present() to test existence of DT property
Kuhanh Murugasen Krishnan (1):
fpga: altera-cvp: Increase credit timeout
Kuninori Morimoto (1):
ASoC: soc-dai: check return value at snd_soc_dai_set_tdm_slot()
Kuniyuki Iwashima (2):
ipv4: fib: Move fib_valid_key_len() to rtm_to_fib_config().
ip: fib_rules: Fetch net from fib_rule in fib[46]_rule_configure().
Larisa Grigore (2):
spi: spi-fsl-dspi: restrict register range for regmap access
spi: spi-fsl-dspi: Reset SR flags before sending a new message
Li Lingfeng (1):
nfs: handle failure of nfs_get_lock_context in unlock path
Ma Ke (1):
phy: Fix error handling in tegra_xusb_port_init
Manuel Fombuena (1):
Input: synaptics - enable InterTouch on Dynabook Portege X30-D
Maor Gottlieb (1):
net/mlx5: E-Switch, Initialize MAC Address for Default GID
Marc Kleine-Budde (1):
can: mcp251xfd: mcp251xfd_remove(): fix order of unregistration calls
Marek Szyprowski (1):
dma-mapping: avoid potential unused data compilation warning
Mark Harmstone (1):
btrfs: avoid linker error in btrfs_find_create_tree_block()
Mark Pearson (1):
platform/x86: thinkpad_acpi: Ignore battery threshold change event notification
Markus Elfring (1):
media: c8sectpfe: Call of_node_put(i2c_bus) only once in c8sectpfe_probe()
Martin Blumenstingl (1):
pinctrl: meson: define the pull up/down resistor value as 60 kOhm
Martin Povišer (1):
ASoC: ops: Enforce platform maximum on initial value
Masahiro Yamada (1):
um: let 'make clean' properly clean underlying SUBARCH as well
Mathieu Othacehe (1):
net: cadence: macb: Fix a possible deadlock in macb_halt_tx.
Matthew Wilcox (Oracle) (1):
orangefs: Do not truncate file size
Mattias Barthel (1):
net: fec: ERR007885 Workaround for conventional TX
Michael Chan (1):
bnxt_en: Fix ethtool -d byte order for 32-bit values
Michael Liang (1):
nvme-tcp: fix premature queue removal and I/O failover
Michal Suchanek (1):
tpm: tis: Double the timeout B to 4s
Mike Christie (1):
scsi: target: Fix WRITE_SAME No Data Buffer crash
Mikulas Patocka (2):
dm-integrity: fix a warning on invalid table line
dm: restrict dm device size to 2^63-512 bytes
Milton Barrera (1):
HID: quirks: Add ADATA XPG alpha wireless mouse support
Ming-Hung Tsai (1):
dm cache: prevent BUG_ON by blocking retries on failed device resumes
Mingcong Bai (1):
iommu/vt-d: Apply quirk_iommu_igfx for 8086:0044 (QM57/QS57)
Moshe Shemesh (1):
net/mlx5: Avoid report two health errors on same syndrome
Nandakumar Edamana (1):
libbpf: Fix out-of-bound read
Nathan Chancellor (1):
kbuild: Disable -Wdefault-const-init-unsafe
Nathan Lynch (1):
dmaengine: Revert "dmaengine: dmatest: Fix dmatest waiting less when interrupted"
Nicolas Bouchinet (1):
netfilter: conntrack: Bound nf_conntrack sysctl writes
Niravkumar L Rabara (2):
EDAC/altera: Test the correct error reg offset
EDAC/altera: Set DDR and SDMMC interrupt mask before registration
Oliver Hartkopp (3):
can: gw: fix RCU/BH usage in cgw_create_job()
can: bcm: add locking for bcm_op runtime updates
can: bcm: add missing rcu read protection for procfs content
Oliver Neukum (1):
USB: usbtmc: use interruptible sleep in usbtmc_read
Pablo Neira Ayuso (1):
netfilter: nf_tables: wait for rcu grace period on net_device removal
Paul Burton (2):
MIPS: pm-cps: Use per-CPU variables as per-CPU, not per-core
clocksource: mips-gic-timer: Enable counter when CPUs start
Paul Chaignon (1):
xfrm: Sanitize marks before insert
Paul Kocialkowski (1):
net: dwmac-sun8i: Use parsed internal PHY address instead of 1
Pavel Paklov (1):
iommu/amd: Fix potential buffer overflow in parse_ivrs_acpihid
Pedro Tammela (1):
net_sched: hfsc: Address reentrant enqueue adding class to eltree twice
Peter Seiderer (2):
net: pktgen: fix mpls maximum labels list parsing
net: pktgen: fix access outside of user given buffer in pktgen_thread_write()
Philip Yang (1):
drm/amdkfd: KFD release_work possible circular locking
Philipp Stanner (1):
drm/nouveau: Fix WARN_ON in nouveau_fence_context_kill()
RD Babiera (2):
usb: typec: tcpm: delay SNK_TRY_WAIT_DEBOUNCE to SRC_TRYWAIT transition
usb: typec: altmodes/displayport: create sysfs nodes as driver's default device attribute group
Rafael J. Wysocki (1):
cpuidle: menu: Avoid discarding useful information
Ravi Bangoria (1):
perf/amd/ibs: Fix perf_ibs_op.cnt_mask for CurCnt
Richard Zhu (1):
PCI: imx6: Skip controller_id generation logic for i.MX7D
Robert Richter (1):
libnvdimm/labels: Fix divide error in nd_label_data_init()
Robin Murphy (1):
perf/arm-cmn: Initialise cmn->cpu earlier
Ronald Wahl (1):
dmaengine: ti: k3-udma: Add missing locking
Ruslan Piasetskyi (1):
mmc: renesas_sdhi: Fix error handling in renesas_sdhi_probe
Ryan Roberts (1):
arm64/mm: Check PUD_TYPE_TABLE in pud_bad()
Sakari Ailus (1):
media: v4l: Memset argument to 0 before calling get_mbus_config pad op
Sean Anderson (1):
spi: zynqmp-gqspi: Always acknowledge interrupts
Sebastian Andrzej Siewior (1):
clocksource/i8253: Use raw_spinlock_irqsave() in clockevent_i8253_disable()
Sergey Shtylyov (1):
of: module: add buffer overflow check in of_modalias()
Seyediman Seyedarab (1):
kbuild: fix argument parsing in scripts/config
Shahar Shitrit (2):
net/mlx5: Modify LSB bitmask in temperature event to include only the first bit
net/mlx5: Apply rate-limiting to high temperature warning
Shivasharan S (1):
scsi: mpt3sas: Send a diag reset if target reset fails
Shixiong Ou (1):
fbdev: fsl-diu-fb: add missing device_remove_file()
Silvano Seva (2):
iio: imu: st_lsm6dsx: fix possible lockup in st_lsm6dsx_read_fifo
iio: imu: st_lsm6dsx: fix possible lockup in st_lsm6dsx_read_tagged_fifo
Simon Horman (1):
net: dlink: Correct endianness handling of led_mode
Simona Vetter (1):
drm/atomic: clarify the rules around drm_atomic_state->allow_modeset
Stanimir Varbanov (2):
PCI: brcmstb: Expand inbound window size up to 64GB
PCI: brcmstb: Add a softdep to MIP MSI-X driver
Stephan Gerhold (1):
i2c: qup: Vote for interconnect bandwidth to DRAM
Steven Rostedt (1):
tracing: samples: Initialize trace_array_printk() with the correct function
Suzuki K Poulose (1):
irqchip/gic-v2m: Prevent use after free of gicv2m_get_fwnode()
Svyatoslav Ryhel (1):
ARM: tegra: Switch DSI-B clock parent to PLLD on Tegra114
Takashi Iwai (3):
ASoC: Intel: bytcr_rt5640: Add DMI quirk for Acer Aspire SW3-013
ALSA: hda/realtek: Add quirk for HP Spectre x360 15-df1xxx
ALSA: pcm: Fix race of buffer access at PCM OSS layer
Thangaraj Samynathan (1):
net: lan743x: Fix memleak issue when GSO enabled
Thomas Gleixner (1):
irqchip/gic-v2m: Mark a few functions __init
Thomas Zimmermann (1):
drm/ast: Find VBIOS mode from regular display size
Thorsten Blum (1):
MIPS: Fix MAX_REG_OFFSET
Tianyang Zhang (1):
mm/page_alloc.c: avoid infinite retries caused by cpuset race
Tiwei Bie (1):
um: Update min_low_pfn to match changes in uml_reserved
Tom Chung (1):
drm/amd/display: Initial psr_version with correct setting
Trond Myklebust (6):
NFSv4/pnfs: Reset the layout state after a layoutreturn
NFSv4: Check for delegation validity in nfs_start_delegation_return_locked()
NFSv4: Treat ENETUNREACH errors as fatal for state recovery
SUNRPC: rpc_clnt_set_transport() must not change the autobind setting
SUNRPC: rpcbind should never reset the port to the value '0'
pNFS/flexfiles: Report ENETDOWN as a connection error
Tudor Ambarus (2):
dm: fix copying after src array boundaries
mailbox: use error ret code of of_parse_phandle_with_args()
Uladzislau Rezki (Sony) (1):
rcu/kvfree: Add kvfree_rcu_mightsleep() and kfree_rcu_mightsleep()
Valentin Caron (1):
pinctrl: devicetree: do not goto err when probing hogs in pinctrl_dt_to_map
Valtteri Koskivuori (1):
platform/x86: fujitsu-laptop: Support Lifebook S2110 hotkeys
Victor Lu (1):
drm/amdgpu: Do not program AGP BAR regs under SRIOV in gfxhub_v1_0.c
Victor Nogueira (4):
net_sched: drr: Fix double list add in class with netem as child qdisc
net_sched: hfsc: Fix a UAF vulnerability in class with netem as child qdisc
net_sched: ets: Fix double list add in class with netem as child qdisc
net_sched: qfq: Fix double list add in class with netem as child qdisc
Viktor Malik (1):
bpftool: Fix readlink usage in get_fd_type
Vishal Badole (1):
amd-xgbe: Fix to ensure dependent features are toggled with RX checksum offload
Vitalii Mordan (1):
i2c: pxa: fix call balance of i2c->clk handling routines
Vladimir Oltean (1):
net: dsa: sja1105: discard incoming frames in BR_STATE_LISTENING
Waiman Long (1):
x86/nmi: Add an emergency handler in nmi_desc & use it in nmi_shootdown_cpus()
Wang Liang (1):
net/tipc: fix slab-use-after-free Read in tipc_aead_encrypt_done
Wang Zhaolong (2):
smb: client: Fix use-after-free in cifs_fill_dirent
smb: client: Reset all search buffer pointers when releasing buffer
Wayne Chang (1):
usb: gadget: tegra-xudc: ACK ST_RC after clearing CTRL_RUN
Wenpeng Liang (1):
net/mlx5: Remove return statement exist at the end of void function
Wentao Liang (2):
wifi: brcm80211: fmac: Add error handling for brcmf_usb_dl_writeimage()
ALSA: es1968: Add error handling for snd_pcm_hw_constraint_pow2()
Willem de Bruijn (1):
ipv6: save dontfrag in cork
William Tu (2):
net/mlx5e: set the tx_queue_len for pfifo_fast
net/mlx5e: reduce rep rxq depth to 256 for ECPF
Xiang wangx (1):
irqchip/gic-v2m: Add const to of_device_id
Xiaofei Tan (1):
ACPI: HED: Always initialize before evged
Yemike Abhilash Chandra (1):
dmaengine: ti: k3-udma: Use cap_mask directly from dma_device structure instead of a local copy
Zack Rusin (1):
drm/vmwgfx: Fix a deadlock in dma buf fence polling
Zhu Yanjun (1):
RDMA/rxe: Fix slab-use-after-free Read in rxe_queue_cleanup bug
Zsolt Kajtar (2):
fbcon: Use correct erase colour for clearing in fbcon
fbdev: core: tileblit: Implement missing margin clearing for tileblit
feijuan.li (1):
drm/edid: fixed the bug that hdr metadata was not reset
gaoxu (1):
cgroup: Fix compilation issue due to cgroup_mutex not being exported
junan (1):
HID: usbkbd: Fix the bit shift number for LED_KANA
Return-Path: <linux-kernel+bounces-673232-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 7B53D41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:06:46 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 0E74E175B21
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:06:47 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id EF30028FA82;
Wed, 4 Jun 2025 13:06:17 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="oRH2aMQA"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 195BE28F94C;
Wed, 4 Jun 2025 13:06:07 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749042368; cv=none; b=enAA6MSmCSO/h/GM+bHVixKBGQ1whOapzLNsFQ9muP7PlwrtKl2W9ks7KJ7i5xkX8B8obpKUmafR8bNFdZgNAGiHzjUsuB5djsgW/WrFADbFTAZFyS4+6BwssxmJ+sb/bJnIUIN8SFDBMres7WMqn1naAcxuom8JXtYUYyM+S20=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749042368; c=relaxed/simple;
bh=j62zJn+ao7/rhYXtyDYArzg1KEzC6tS1JKwOQP0zn2Y=;
h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version; b=ewcmDbf+5QGNLan6fYbyX8iQFovzQ2XQVX/ZXGZyPkAQzNbkr+SA2kpNu28qPn/tnbwujuJ62pCgU18RTluNnhBvUyD3YuLHlitjuZCJN0svqDinpz2uomXnpesoCadJF+iZxdO+2NvAfLCSRQoICm/UtL84hriJJ07n17DxeTM=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=oRH2aMQA; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 96DF8C4CEE7;
Wed, 4 Jun 2025 13:06:06 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org;
s=korg; t=1749042367;
bh=j62zJn+ao7/rhYXtyDYArzg1KEzC6tS1JKwOQP0zn2Y=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=oRH2aMQAlD8ymeZOmix1GGTO+O3zQUPS3wW/Qgg4fFL4HbKLDha/2qUapmqcUhAIl
wjCHQrslixUr3JDV1qo7dZr+fZXsiIOff4ol3IGCijdm/Pj5skkDOat3lYYdI82304
ytc594BxIiuHX39CD26JDbqcgqtOk22xtXbP+eFg=
From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
To: linux-kernel@xxxxxxxxxxxxxxx,
akpm@xxxxxxxxxxxxxxxxxxxx,
torvalds@xxxxxxxxxxxxxxxxxxxx,
stable@xxxxxxxxxxxxxxx
Cc: lwn@xxxxxxx,
jslaby@xxxxxxx,
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Subject: Re: Linux 5.4.294
Date: Wed, 4 Jun 2025 15:05:57 +0200
Message-ID: <2025060457-data-magician-5792@gregkh>
X-Mailer: git-send-email 2.49.0
In-Reply-To: <2025060457-precinct-hedge-839f@gregkh>
References: <2025060457-precinct-hedge-839f@gregkh>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 9975dcab99c3..6d9acc3f977b 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -4600,6 +4600,8 @@
Selecting 'on' will also enable the mitigation
against user space to user space task attacks.
+ Selecting specific mitigation does not force enable
+ user mitigations.
Selecting 'off' will disable both the kernel and
the user space protections.
diff --git a/Makefile b/Makefile
index 70d2e8cc6f9f..cc8e29781c25 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 5
PATCHLEVEL = 4
-SUBLEVEL = 293
+SUBLEVEL = 294
EXTRAVERSION =
NAME = Kleptomaniac Octopus
@@ -770,6 +770,18 @@ KBUILD_CFLAGS += -Wno-tautological-compare
# source of a reference will be _MergedGlobals and not on of the whitelisted names.
# See modpost pattern 2
KBUILD_CFLAGS += -mno-global-merge
+
+# Clang may emit a warning when a const variable, such as the dummy variables
+# in typecheck(), or const member of an aggregate type are not initialized,
+# which can result in unexpected behavior. However, in many audited cases of
+# the "field" variant of the warning, this is intentional because the field is
+# never used within a particular call path, the field is within a union with
+# other non-const members, or the containing object is not const so the field
+# can be modified via memcpy() / memset(). While the variable warning also gets
+# disabled with this same switch, there should not be too much coverage lost
+# because -Wuninitialized will still flag when an uninitialized const variable
+# is used.
+KBUILD_CFLAGS += $(call cc-disable-warning, default-const-init-unsafe)
else
# Warn about unmarked fall-throughs in switch statement.
diff --git a/arch/arm/boot/dts/tegra114.dtsi b/arch/arm/boot/dts/tegra114.dtsi
index 0d7a6327e404..fe1ebc3c5aa8 100644
--- a/arch/arm/boot/dts/tegra114.dtsi
+++ b/arch/arm/boot/dts/tegra114.dtsi
@@ -123,7 +123,7 @@
reg = <0x54400000 0x00040000>;
clocks = <&tegra_car TEGRA114_CLK_DSIB>,
<&tegra_car TEGRA114_CLK_DSIBLP>,
- <&tegra_car TEGRA114_CLK_PLL_D2_OUT0>;
+ <&tegra_car TEGRA114_CLK_PLL_D_OUT0>;
clock-names = "dsi", "lp", "parent";
resets = <&tegra_car 82>;
reset-names = "dsi";
diff --git a/arch/arm64/boot/dts/rockchip/px30.dtsi b/arch/arm64/boot/dts/rockchip/px30.dtsi
index 652998c83640..aff72ebfc68d 100644
--- a/arch/arm64/boot/dts/rockchip/px30.dtsi
+++ b/arch/arm64/boot/dts/rockchip/px30.dtsi
@@ -839,7 +839,7 @@
interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "vopb_mmu";
clocks = <&cru ACLK_VOPB>, <&cru HCLK_VOPB>;
- clock-names = "aclk", "hclk";
+ clock-names = "aclk", "iface";
power-domains = <&power PX30_PD_VO>;
#iommu-cells = <0>;
status = "disabled";
@@ -871,7 +871,7 @@
interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "vopl_mmu";
clocks = <&cru ACLK_VOPL>, <&cru HCLK_VOPL>;
- clock-names = "aclk", "hclk";
+ clock-names = "aclk", "iface";
power-domains = <&power PX30_PD_VO>;
#iommu-cells = <0>;
status = "disabled";
diff --git a/arch/mips/include/asm/ftrace.h b/arch/mips/include/asm/ftrace.h
index b463f2aa5a61..7acbe701afd6 100644
--- a/arch/mips/include/asm/ftrace.h
+++ b/arch/mips/include/asm/ftrace.h
@@ -87,4 +87,20 @@ struct dyn_arch_ftrace {
#endif /* CONFIG_DYNAMIC_FTRACE */
#endif /* __ASSEMBLY__ */
#endif /* CONFIG_FUNCTION_TRACER */
+
+#ifdef CONFIG_FTRACE_SYSCALLS
+#ifndef __ASSEMBLY__
+/*
+ * Some syscall entry functions on mips start with "__sys_" (fork and clone,
+ * for instance). We should also match the sys_ variant with those.
+ */
+#define ARCH_HAS_SYSCALL_MATCH_SYM_NAME
+static inline bool arch_syscall_match_sym_name(const char *sym,
+ const char *name)
+{
+ return !strcmp(sym, name) ||
+ (!strncmp(sym, "__sys_", 6) && !strcmp(sym + 6, name + 4));
+}
+#endif /* __ASSEMBLY__ */
+#endif /* CONFIG_FTRACE_SYSCALLS */
#endif /* _ASM_MIPS_FTRACE_H */
diff --git a/arch/mips/include/asm/ptrace.h b/arch/mips/include/asm/ptrace.h
index ae578860f729..4ec9b306556f 100644
--- a/arch/mips/include/asm/ptrace.h
+++ b/arch/mips/include/asm/ptrace.h
@@ -65,7 +65,8 @@ static inline void instruction_pointer_set(struct pt_regs *regs,
/* Query offset/name of register from its name/offset */
extern int regs_query_register_offset(const char *name);
-#define MAX_REG_OFFSET (offsetof(struct pt_regs, __last))
+#define MAX_REG_OFFSET \
+ (offsetof(struct pt_regs, __last) - sizeof(unsigned long))
/**
* regs_get_register() - get register value from its offset
diff --git a/arch/mips/kernel/pm-cps.c b/arch/mips/kernel/pm-cps.c
index a26f40db15d0..cb09536fb986 100644
--- a/arch/mips/kernel/pm-cps.c
+++ b/arch/mips/kernel/pm-cps.c
@@ -56,10 +56,7 @@ static DEFINE_PER_CPU_ALIGNED(u32*, ready_count);
/* Indicates online CPUs coupled with the current CPU */
static DEFINE_PER_CPU_ALIGNED(cpumask_t, online_coupled);
-/*
- * Used to synchronize entry to deep idle states. Actually per-core rather
- * than per-CPU.
- */
+/* Used to synchronize entry to deep idle states */
static DEFINE_PER_CPU_ALIGNED(atomic_t, pm_barrier);
/* Saved CPU state across the CPS_PM_POWER_GATED state */
@@ -118,9 +115,10 @@ int cps_pm_enter_state(enum cps_pm_state state)
cps_nc_entry_fn entry;
struct core_boot_config *core_cfg;
struct vpe_boot_config *vpe_cfg;
+ atomic_t *barrier;
/* Check that there is an entry function for this state */
- entry = per_cpu(nc_asm_enter, core)[state];
+ entry = per_cpu(nc_asm_enter, cpu)[state];
if (!entry)
return -EINVAL;
@@ -156,7 +154,7 @@ int cps_pm_enter_state(enum cps_pm_state state)
smp_mb__after_atomic();
/* Create a non-coherent mapping of the core ready_count */
- core_ready_count = per_cpu(ready_count, core);
+ core_ready_count = per_cpu(ready_count, cpu);
nc_addr = kmap_noncoherent(virt_to_page(core_ready_count),
(unsigned long)core_ready_count);
nc_addr += ((unsigned long)core_ready_count & ~PAGE_MASK);
@@ -164,7 +162,8 @@ int cps_pm_enter_state(enum cps_pm_state state)
/* Ensure ready_count is zero-initialised before the assembly runs */
WRITE_ONCE(*nc_core_ready_count, 0);
- coupled_barrier(&per_cpu(pm_barrier, core), online);
+ barrier = &per_cpu(pm_barrier, cpumask_first(&cpu_sibling_map[cpu]));
+ coupled_barrier(barrier, online);
/* Run the generated entry code */
left = entry(online, nc_core_ready_count);
@@ -635,12 +634,14 @@ static void *cps_gen_entry_code(unsigned cpu, enum cps_pm_state state)
static int cps_pm_online_cpu(unsigned int cpu)
{
- enum cps_pm_state state;
- unsigned core = cpu_core(&cpu_data[cpu]);
+ unsigned int sibling, core;
void *entry_fn, *core_rc;
+ enum cps_pm_state state;
+
+ core = cpu_core(&cpu_data[cpu]);
for (state = CPS_PM_NC_WAIT; state < CPS_PM_STATE_COUNT; state++) {
- if (per_cpu(nc_asm_enter, core)[state])
+ if (per_cpu(nc_asm_enter, cpu)[state])
continue;
if (!test_bit(state, state_support))
continue;
@@ -652,16 +653,19 @@ static int cps_pm_online_cpu(unsigned int cpu)
clear_bit(state, state_support);
}
- per_cpu(nc_asm_enter, core)[state] = entry_fn;
+ for_each_cpu(sibling, &cpu_sibling_map[cpu])
+ per_cpu(nc_asm_enter, sibling)[state] = entry_fn;
}
- if (!per_cpu(ready_count, core)) {
+ if (!per_cpu(ready_count, cpu)) {
core_rc = kmalloc(sizeof(u32), GFP_KERNEL);
if (!core_rc) {
pr_err("Failed allocate core %u ready_count\n", core);
return -ENOMEM;
}
- per_cpu(ready_count, core) = core_rc;
+
+ for_each_cpu(sibling, &cpu_sibling_map[cpu])
+ per_cpu(ready_count, sibling) = core_rc;
}
return 0;
diff --git a/arch/parisc/math-emu/driver.c b/arch/parisc/math-emu/driver.c
index 6ce427b58836..ecd27b48d61f 100644
--- a/arch/parisc/math-emu/driver.c
+++ b/arch/parisc/math-emu/driver.c
@@ -103,9 +103,19 @@ handle_fpe(struct pt_regs *regs)
memcpy(regs->fr, frcopy, sizeof regs->fr);
if (signalcode != 0) {
- force_sig_fault(signalcode >> 24, signalcode & 0xffffff,
- (void __user *) regs->iaoq[0]);
- return -1;
+ int sig = signalcode >> 24;
+
+ if (sig == SIGFPE) {
+ /*
+ * Clear floating point trap bit to avoid trapping
+ * again on the first floating-point instruction in
+ * the userspace signal handler.
+ */
+ regs->fr[0] &= ~(1ULL << 38);
+ }
+ force_sig_fault(sig, signalcode & 0xffffff,
+ (void __user *) regs->iaoq[0]);
+ return -1;
}
return signalcode ? -1 : 0;
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index b7ef63614417..e0abb13b5806 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -2906,11 +2906,11 @@ static void __init fixup_device_tree_pmac(void)
char type[8];
phandle node;
- // Some pmacs are missing #size-cells on escc nodes
+ // Some pmacs are missing #size-cells on escc or i2s nodes
for (node = 0; prom_next_node(&node); ) {
type[0] = '\0';
prom_getprop(node, "device_type", type, sizeof(type));
- if (prom_strcmp(type, "escc"))
+ if (prom_strcmp(type, "escc") && prom_strcmp(type, "i2s"))
continue;
if (prom_getproplen(node, "#size-cells") != PROM_ERROR)
diff --git a/arch/um/Makefile b/arch/um/Makefile
index 94cea8d46b22..daec900ed463 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -154,5 +154,6 @@ MRPROPER_DIRS += arch/$(SUBARCH)/include/generated
archclean:
@find . \( -name '*.bb' -o -name '*.bbg' -o -name '*.da' \
-o -name '*.gcov' \) -type f -print | xargs rm -f
+ $(Q)$(MAKE) -f $(srctree)/Makefile ARCH=$(HEADER_ARCH) clean
export HEADER_ARCH SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS DEV_NULL_PATH
diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c
index 417ff647fb37..06fb50218136 100644
--- a/arch/um/kernel/mem.c
+++ b/arch/um/kernel/mem.c
@@ -49,6 +49,7 @@ void __init mem_init(void)
map_memory(brk_end, __pa(brk_end), uml_reserved - brk_end, 1, 1, 0);
memblock_free(__pa(brk_end), uml_reserved - brk_end);
uml_reserved = brk_end;
+ min_low_pfn = PFN_UP(__pa(uml_reserved));
/* this will put all low memory onto the freelists */
memblock_free_all();
diff --git a/arch/x86/include/asm/nmi.h b/arch/x86/include/asm/nmi.h
index 9d5d949e662e..dfb483c8c98b 100644
--- a/arch/x86/include/asm/nmi.h
+++ b/arch/x86/include/asm/nmi.h
@@ -59,6 +59,8 @@ int __register_nmi_handler(unsigned int, struct nmiaction *);
void unregister_nmi_handler(unsigned int, const char *);
+void set_emergency_nmi_handler(unsigned int type, nmi_handler_t handler);
+
void stop_nmi(void);
void restart_nmi(void);
void local_touch_nmi(void);
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index 4f803aed2ef0..0f523ebfbabf 100644
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -1050,9 +1050,13 @@ static __ro_after_init enum spectre_v2_mitigation_cmd spectre_v2_cmd;
static enum spectre_v2_user_cmd __init
spectre_v2_parse_user_cmdline(void)
{
+ enum spectre_v2_user_cmd mode;
char arg[20];
int ret, i;
+ mode = IS_ENABLED(CONFIG_MITIGATION_SPECTRE_V2) ?
+ SPECTRE_V2_USER_CMD_AUTO : SPECTRE_V2_USER_CMD_NONE;
+
switch (spectre_v2_cmd) {
case SPECTRE_V2_CMD_NONE:
return SPECTRE_V2_USER_CMD_NONE;
@@ -1065,7 +1069,7 @@ spectre_v2_parse_user_cmdline(void)
ret = cmdline_find_option(boot_command_line, "spectre_v2_user",
arg, sizeof(arg));
if (ret < 0)
- return SPECTRE_V2_USER_CMD_AUTO;
+ return mode;
for (i = 0; i < ARRAY_SIZE(v2_user_options); i++) {
if (match_option(arg, ret, v2_user_options[i].option)) {
@@ -1075,8 +1079,8 @@ spectre_v2_parse_user_cmdline(void)
}
}
- pr_err("Unknown user space protection option (%s). Switching to AUTO select\n", arg);
- return SPECTRE_V2_USER_CMD_AUTO;
+ pr_err("Unknown user space protection option (%s). Switching to default\n", arg);
+ return mode;
}
static inline bool spectre_v2_in_eibrs_mode(enum spectre_v2_mitigation mode)
diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c
index 5bb001c0c771..d5c572bca8b1 100644
--- a/arch/x86/kernel/nmi.c
+++ b/arch/x86/kernel/nmi.c
@@ -41,8 +41,12 @@
#define CREATE_TRACE_POINTS
#include <trace/events/nmi.h>
+/*
+ * An emergency handler can be set in any context including NMI
+ */
struct nmi_desc {
raw_spinlock_t lock;
+ nmi_handler_t emerg_handler;
struct list_head head;
};
@@ -124,9 +128,22 @@ static void nmi_check_duration(struct nmiaction *action, u64 duration)
static int nmi_handle(unsigned int type, struct pt_regs *regs)
{
struct nmi_desc *desc = nmi_to_desc(type);
+ nmi_handler_t ehandler;
struct nmiaction *a;
int handled=0;
+ /*
+ * Call the emergency handler, if set
+ *
+ * In the case of crash_nmi_callback() emergency handler, it will
+ * return in the case of the crashing CPU to enable it to complete
+ * other necessary crashing actions ASAP. Other handlers in the
+ * linked list won't need to be run.
+ */
+ ehandler = desc->emerg_handler;
+ if (ehandler)
+ return ehandler(type, regs);
+
rcu_read_lock();
/*
@@ -212,6 +229,31 @@ void unregister_nmi_handler(unsigned int type, const char *name)
}
EXPORT_SYMBOL_GPL(unregister_nmi_handler);
+/**
+ * set_emergency_nmi_handler - Set emergency handler
+ * @type: NMI type
+ * @handler: the emergency handler to be stored
+ *
+ * Set an emergency NMI handler which, if set, will preempt all the other
+ * handlers in the linked list. If a NULL handler is passed in, it will clear
+ * it. It is expected that concurrent calls to this function will not happen
+ * or the system is screwed beyond repair.
+ */
+void set_emergency_nmi_handler(unsigned int type, nmi_handler_t handler)
+{
+ struct nmi_desc *desc = nmi_to_desc(type);
+
+ if (WARN_ON_ONCE(desc->emerg_handler == handler))
+ return;
+ desc->emerg_handler = handler;
+
+ /*
+ * Ensure the emergency handler is visible to other CPUs before
+ * function return
+ */
+ smp_wmb();
+}
+
static void
pci_serr_error(unsigned char reason, struct pt_regs *regs)
{
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index 6fede2f00104..17e378db513d 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -875,15 +875,11 @@ void nmi_shootdown_cpus(nmi_shootdown_cb callback)
shootdown_callback = callback;
atomic_set(&waiting_for_crash_ipi, num_online_cpus() - 1);
- /* Would it be better to replace the trap vector here? */
- if (register_nmi_handler(NMI_LOCAL, crash_nmi_callback,
- NMI_FLAG_FIRST, "crash"))
- return; /* Return what? */
+
/*
- * Ensure the new callback function is set before sending
- * out the NMI
+ * Set emergency handler to preempt other handlers.
*/
- wmb();
+ set_emergency_nmi_handler(NMI_LOCAL, crash_nmi_callback);
apic_send_IPI_allbutself(NMI_VECTOR);
diff --git a/arch/x86/um/os-Linux/mcontext.c b/arch/x86/um/os-Linux/mcontext.c
index 49c3744cac37..81b9d1f9f4e6 100644
--- a/arch/x86/um/os-Linux/mcontext.c
+++ b/arch/x86/um/os-Linux/mcontext.c
@@ -26,7 +26,6 @@ void get_regs_from_mc(struct uml_pt_regs *regs, mcontext_t *mc)
COPY(RIP);
COPY2(EFLAGS, EFL);
COPY2(CS, CSGSFS);
- regs->gp[CS / sizeof(unsigned long)] &= 0xffff;
- regs->gp[CS / sizeof(unsigned long)] |= 3;
+ regs->gp[SS / sizeof(unsigned long)] = mc->gregs[REG_CSGSFS] >> 48;
#endif
}
diff --git a/crypto/algif_hash.c b/crypto/algif_hash.c
index 8673ac8828e9..a4c4790bbd6e 100644
--- a/crypto/algif_hash.c
+++ b/crypto/algif_hash.c
@@ -262,10 +262,6 @@ static int hash_accept(struct socket *sock, struct socket *newsock, int flags,
return err;
err = crypto_ahash_import(&ctx2->req, state);
- if (err) {
- sock_orphan(sk2);
- sock_put(sk2);
- }
return err;
}
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index ebe1e9e5fd81..3902fe64c484 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -431,7 +431,7 @@ config ACPI_SBS
the modules will be called sbs and sbshc.
config ACPI_HED
- tristate "Hardware Error Device"
+ bool "Hardware Error Device"
help
This driver supports the Hardware Error Device (PNP0C33),
which is used to report some hardware errors notified via
diff --git a/drivers/acpi/hed.c b/drivers/acpi/hed.c
index cf148287e2ba..75166839c99e 100644
--- a/drivers/acpi/hed.c
+++ b/drivers/acpi/hed.c
@@ -72,7 +72,12 @@ static struct acpi_driver acpi_hed_driver = {
.notify = acpi_hed_notify,
},
};
-module_acpi_driver(acpi_hed_driver);
+
+static int __init acpi_hed_driver_init(void)
+{
+ return acpi_bus_register_driver(&acpi_hed_driver);
+}
+subsys_initcall(acpi_hed_driver_init);
ACPI_MODULE_NAME("hed");
MODULE_AUTHOR("Huang Ying");
diff --git a/drivers/acpi/pptt.c b/drivers/acpi/pptt.c
index c1c7727ab932..762849825428 100644
--- a/drivers/acpi/pptt.c
+++ b/drivers/acpi/pptt.c
@@ -218,16 +218,18 @@ static int acpi_pptt_leaf_node(struct acpi_table_header *table_hdr,
sizeof(struct acpi_table_pptt));
proc_sz = sizeof(struct acpi_pptt_processor);
- while ((unsigned long)entry + proc_sz < table_end) {
+ /* ignore subtable types that are smaller than a processor node */
+ while ((unsigned long)entry + proc_sz <= table_end) {
cpu_node = (struct acpi_pptt_processor *)entry;
+
if (entry->type == ACPI_PPTT_TYPE_PROCESSOR &&
cpu_node->parent == node_entry)
return 0;
if (entry->length == 0)
return 0;
+
entry = ACPI_ADD_PTR(struct acpi_subtable_header, entry,
entry->length);
-
}
return 1;
}
@@ -260,15 +262,18 @@ static struct acpi_pptt_processor *acpi_find_processor_node(struct acpi_table_he
proc_sz = sizeof(struct acpi_pptt_processor);
/* find the processor structure associated with this cpuid */
- while ((unsigned long)entry + proc_sz < table_end) {
+ while ((unsigned long)entry + proc_sz <= table_end) {
cpu_node = (struct acpi_pptt_processor *)entry;
if (entry->length == 0) {
pr_warn("Invalid zero length subtable\n");
break;
}
+ /* entry->length may not equal proc_sz, revalidate the processor structure length */
if (entry->type == ACPI_PPTT_TYPE_PROCESSOR &&
acpi_cpu_id == cpu_node->acpi_processor_id &&
+ (unsigned long)entry + entry->length <= table_end &&
+ entry->length == proc_sz + cpu_node->number_of_priv_resources * sizeof(u32) &&
acpi_pptt_leaf_node(table_hdr, cpu_node)) {
return (struct acpi_pptt_processor *)entry;
}
diff --git a/drivers/clocksource/i8253.c b/drivers/clocksource/i8253.c
index 39f7c2d736d1..9a91ce66e16e 100644
--- a/drivers/clocksource/i8253.c
+++ b/drivers/clocksource/i8253.c
@@ -103,7 +103,9 @@ int __init clocksource_i8253_init(void)
#ifdef CONFIG_CLKEVT_I8253
void clockevent_i8253_disable(void)
{
- raw_spin_lock(&i8253_lock);
+ unsigned long flags;
+
+ raw_spin_lock_irqsave(&i8253_lock, flags);
/*
* Writing the MODE register should stop the counter, according to
@@ -133,7 +135,7 @@ void clockevent_i8253_disable(void)
outb_p(0x30, PIT_MODE);
- raw_spin_unlock(&i8253_lock);
+ raw_spin_unlock_irqrestore(&i8253_lock, flags);
}
static int pit_shutdown(struct clock_event_device *evt)
diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c
index e5a5d0c8d66b..bb7288f6adbf 100644
--- a/drivers/cpuidle/governors/menu.c
+++ b/drivers/cpuidle/governors/menu.c
@@ -259,8 +259,19 @@ static unsigned int get_typical_interval(struct menu_device *data,
* This can deal with workloads that have long pauses interspersed
* with sporadic activity with a bunch of short pauses.
*/
- if ((divisor * 4) <= INTERVALS * 3)
+ if (divisor * 4 <= INTERVALS * 3) {
+ /*
+ * If there are sufficiently many data points still under
+ * consideration after the outliers have been eliminated,
+ * returning without a prediction would be a mistake because it
+ * is likely that the next interval will not exceed the current
+ * maximum, so return the latter in that case.
+ */
+ if (divisor >= INTERVALS / 2)
+ return max;
+
return UINT_MAX;
+ }
thresh = max - 1;
goto again;
diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
index 6dfa1e038726..238936e2dfe2 100644
--- a/drivers/dma/dmatest.c
+++ b/drivers/dma/dmatest.c
@@ -809,9 +809,9 @@ static int dmatest_func(void *data)
} else {
dma_async_issue_pending(chan);
- wait_event_timeout(thread->done_wait,
- done->done,
- msecs_to_jiffies(params->timeout));
+ wait_event_freezable_timeout(thread->done_wait,
+ done->done,
+ msecs_to_jiffies(params->timeout));
status = dma_async_is_tx_complete(chan, cookie, NULL,
NULL);
diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c
index a09a5041e74c..ecc5248f014f 100644
--- a/drivers/edac/altera_edac.c
+++ b/drivers/edac/altera_edac.c
@@ -96,7 +96,7 @@ static irqreturn_t altr_sdram_mc_err_handler(int irq, void *dev_id)
if (status & priv->ecc_stat_ce_mask) {
regmap_read(drvdata->mc_vbase, priv->ecc_saddr_offset,
&err_addr);
- if (priv->ecc_uecnt_offset)
+ if (priv->ecc_cecnt_offset)
regmap_read(drvdata->mc_vbase, priv->ecc_cecnt_offset,
&err_count);
edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci, err_count,
@@ -1103,9 +1103,6 @@ altr_init_a10_ecc_block(struct device_node *np, u32 irq_mask,
}
}
- /* Interrupt mode set to every SBERR */
- regmap_write(ecc_mgr_map, ALTR_A10_ECC_INTMODE_OFST,
- ALTR_A10_ECC_INTMODE);
/* Enable ECC */
ecc_set_bits(ecc_ctrl_en_mask, (ecc_block_base +
ALTR_A10_ECC_CTRL_OFST));
@@ -2213,6 +2210,10 @@ static int altr_edac_a10_probe(struct platform_device *pdev)
return PTR_ERR(edac->ecc_mgr_map);
}
+ /* Set irq mask for DDR SBE to avoid any pending irq before registration */
+ regmap_write(edac->ecc_mgr_map, A10_SYSMGR_ECC_INTMASK_SET_OFST,
+ (A10_SYSMGR_ECC_INTMASK_SDMMCB | A10_SYSMGR_ECC_INTMASK_DDR0));
+
edac->irq_chip.name = pdev->dev.of_node->name;
edac->irq_chip.irq_mask = a10_eccmgr_irq_mask;
edac->irq_chip.irq_unmask = a10_eccmgr_irq_unmask;
diff --git a/drivers/edac/altera_edac.h b/drivers/edac/altera_edac.h
index 3727e72c8c2e..7248d24c4908 100644
--- a/drivers/edac/altera_edac.h
+++ b/drivers/edac/altera_edac.h
@@ -249,6 +249,8 @@ struct altr_sdram_mc_data {
#define A10_SYSMGR_ECC_INTMASK_SET_OFST 0x94
#define A10_SYSMGR_ECC_INTMASK_CLR_OFST 0x98
#define A10_SYSMGR_ECC_INTMASK_OCRAM BIT(1)
+#define A10_SYSMGR_ECC_INTMASK_SDMMCB BIT(16)
+#define A10_SYSMGR_ECC_INTMASK_DDR0 BIT(17)
#define A10_SYSMGR_ECC_INTSTAT_SERR_OFST 0x9C
#define A10_SYSMGR_ECC_INTSTAT_DERR_OFST 0xA0
diff --git a/drivers/edac/ie31200_edac.c b/drivers/edac/ie31200_edac.c
index d3d9916b1ba3..f865528728d7 100644
--- a/drivers/edac/ie31200_edac.c
+++ b/drivers/edac/ie31200_edac.c
@@ -398,10 +398,9 @@ static int ie31200_probe1(struct pci_dev *pdev, int dev_idx)
int i, j, ret;
struct mem_ctl_info *mci = NULL;
struct edac_mc_layer layers[2];
- struct dimm_data dimm_info[IE31200_CHANNELS][IE31200_DIMMS_PER_CHANNEL];
void __iomem *window;
struct ie31200_priv *priv;
- u32 addr_decode, mad_offset;
+ u32 addr_decode[IE31200_CHANNELS], mad_offset;
/*
* Kaby Lake, Coffee Lake seem to work like Skylake. Please re-visit
@@ -459,19 +458,10 @@ static int ie31200_probe1(struct pci_dev *pdev, int dev_idx)
mad_offset = IE31200_MAD_DIMM_0_OFFSET;
}
- /* populate DIMM info */
for (i = 0; i < IE31200_CHANNELS; i++) {
- addr_decode = readl(window + mad_offset +
+ addr_decode[i] = readl(window + mad_offset +
(i * 4));
- edac_dbg(0, "addr_decode: 0x%x\n", addr_decode);
- for (j = 0; j < IE31200_DIMMS_PER_CHANNEL; j++) {
- populate_dimm_info(&dimm_info[i][j], addr_decode, j,
- skl);
- edac_dbg(0, "size: 0x%x, rank: %d, width: %d\n",
- dimm_info[i][j].size,
- dimm_info[i][j].dual_rank,
- dimm_info[i][j].x16_width);
- }
+ edac_dbg(0, "addr_decode: 0x%x\n", addr_decode[i]);
}
/*
@@ -482,14 +472,22 @@ static int ie31200_probe1(struct pci_dev *pdev, int dev_idx)
*/
for (i = 0; i < IE31200_DIMMS_PER_CHANNEL; i++) {
for (j = 0; j < IE31200_CHANNELS; j++) {
+ struct dimm_data dimm_info;
struct dimm_info *dimm;
unsigned long nr_pages;
- nr_pages = IE31200_PAGES(dimm_info[j][i].size, skl);
+ populate_dimm_info(&dimm_info, addr_decode[j], i,
+ skl);
+ edac_dbg(0, "size: 0x%x, rank: %d, width: %d\n",
+ dimm_info.size,
+ dimm_info.dual_rank,
+ dimm_info.x16_width);
+
+ nr_pages = IE31200_PAGES(dimm_info.size, skl);
if (nr_pages == 0)
continue;
- if (dimm_info[j][i].dual_rank) {
+ if (dimm_info.dual_rank) {
nr_pages = nr_pages / 2;
dimm = EDAC_DIMM_PTR(mci->layers, mci->dimms,
mci->n_layers, (i * 2) + 1,
diff --git a/drivers/fpga/altera-cvp.c b/drivers/fpga/altera-cvp.c
index 4e0edb60bfba..d107ad73a188 100644
--- a/drivers/fpga/altera-cvp.c
+++ b/drivers/fpga/altera-cvp.c
@@ -52,7 +52,7 @@
/* V2 Defines */
#define VSE_CVP_TX_CREDITS 0x49 /* 8bit */
-#define V2_CREDIT_TIMEOUT_US 20000
+#define V2_CREDIT_TIMEOUT_US 40000
#define V2_CHECK_CREDIT_US 10
#define V2_POLL_TIMEOUT_US 1000000
#define V2_USER_TIMEOUT_US 500000
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
index 662e4d973f13..b07deeb98747 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
@@ -277,6 +277,14 @@ struct kfd_process *kfd_create_process(struct file *filep)
if (thread->group_leader->mm != thread->mm)
return ERR_PTR(-EINVAL);
+ /* If the process just called exec(3), it is possible that the
+ * cleanup of the kfd_process (following the release of the mm
+ * of the old process image) is still in the cleanup work queue.
+ * Make sure to drain any job before trying to recreate any
+ * resource for this process.
+ */
+ flush_workqueue(kfd_process_wq);
+
/*
* take kfd processes mutex before starting of process creation
* so there won't be a case where two threads of the same process
@@ -289,14 +297,6 @@ struct kfd_process *kfd_create_process(struct file *filep)
if (process) {
pr_debug("Process already found\n");
} else {
- /* If the process just called exec(3), it is possible that the
- * cleanup of the kfd_process (following the release of the mm
- * of the old process image) is still in the cleanup work queue.
- * Make sure to drain any job before trying to recreate any
- * resource for this process.
- */
- flush_workqueue(kfd_process_wq);
-
process = create_process(thread);
if (IS_ERR(process))
goto out;
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index 70d97a7fc686..678dba387d83 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -561,6 +561,30 @@ mode_valid(struct drm_atomic_state *state)
return 0;
}
+static int drm_atomic_check_valid_clones(struct drm_atomic_state *state,
+ struct drm_crtc *crtc)
+{
+ struct drm_encoder *drm_enc;
+ struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state,
+ crtc);
+
+ drm_for_each_encoder_mask(drm_enc, crtc->dev, crtc_state->encoder_mask) {
+ if (!drm_enc->possible_clones) {
+ DRM_DEBUG("enc%d possible_clones is 0\n", drm_enc->base.id);
+ continue;
+ }
+
+ if ((crtc_state->encoder_mask & drm_enc->possible_clones) !=
+ crtc_state->encoder_mask) {
+ DRM_DEBUG("crtc%d failed valid clone check for mask 0x%x\n",
+ crtc->base.id, crtc_state->encoder_mask);
+ return -EINVAL;
+ }
+ }
+
+ return 0;
+}
+
/**
* drm_atomic_helper_check_modeset - validate state object for modeset changes
* @dev: DRM device
@@ -724,6 +748,10 @@ drm_atomic_helper_check_modeset(struct drm_device *dev,
ret = drm_atomic_add_affected_planes(state, crtc);
if (ret != 0)
return ret;
+
+ ret = drm_atomic_check_valid_clones(state, crtc);
+ if (ret != 0)
+ return ret;
}
/*
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 7b27fe16bcbb..ec4f403a7e09 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -4629,6 +4629,7 @@ drm_reset_display_info(struct drm_connector *connector)
info->has_hdmi_infoframe = false;
info->rgb_quant_range_selectable = false;
memset(&info->hdmi, 0, sizeof(info->hdmi));
+ memset(&connector->hdr_sink_metadata, 0, sizeof(connector->hdr_sink_metadata));
info->non_desktop = 0;
}
diff --git a/drivers/gpu/drm/i915/gvt/opregion.c b/drivers/gpu/drm/i915/gvt/opregion.c
index 867e7629025b..7d347e2944a0 100644
--- a/drivers/gpu/drm/i915/gvt/opregion.c
+++ b/drivers/gpu/drm/i915/gvt/opregion.c
@@ -223,7 +223,8 @@ int intel_vgpu_init_opregion(struct intel_vgpu *vgpu)
u8 *buf;
struct opregion_header *header;
struct vbt v;
- const char opregion_signature[16] = OPREGION_SIGNATURE;
+
+ static_assert(sizeof(header->signature) == sizeof(OPREGION_SIGNATURE) - 1);
gvt_dbg_core("init vgpu%d opregion\n", vgpu->id);
vgpu_opregion(vgpu)->va = (void *)__get_free_pages(GFP_KERNEL |
@@ -237,8 +238,9 @@ int intel_vgpu_init_opregion(struct intel_vgpu *vgpu)
/* emulated opregion with VBT mailbox only */
buf = (u8 *)vgpu_opregion(vgpu)->va;
header = (struct opregion_header *)buf;
- memcpy(header->signature, opregion_signature,
- sizeof(opregion_signature));
+
+ memcpy(header->signature, OPREGION_SIGNATURE, sizeof(header->signature));
+
header->size = 0x8;
header->opregion_ver = 0x02000000;
header->mboxes = MBOX_VBT;
diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
index 191e0cec004b..6d105e8aae45 100644
--- a/drivers/gpu/drm/mediatek/mtk_dpi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
@@ -337,12 +337,13 @@ static void mtk_dpi_config_swap_input(struct mtk_dpi *dpi, bool enable)
static void mtk_dpi_config_2n_h_fre(struct mtk_dpi *dpi)
{
- mtk_dpi_mask(dpi, dpi->conf->reg_h_fre_con, H_FRE_2N, H_FRE_2N);
+ if (dpi->conf->reg_h_fre_con)
+ mtk_dpi_mask(dpi, dpi->conf->reg_h_fre_con, H_FRE_2N, H_FRE_2N);
}
static void mtk_dpi_config_disable_edge(struct mtk_dpi *dpi)
{
- if (dpi->conf->edge_sel_en)
+ if (dpi->conf->edge_sel_en && dpi->conf->reg_h_fre_con)
mtk_dpi_mask(dpi, dpi->conf->reg_h_fre_con, 0, EDGE_SEL_EN);
}
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index d5369577b475..356916608cc4 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -40,6 +40,10 @@
#define USB_VENDOR_ID_ACTIONSTAR 0x2101
#define USB_DEVICE_ID_ACTIONSTAR_1011 0x1011
+#define USB_VENDOR_ID_ADATA_XPG 0x125f
+#define USB_VENDOR_ID_ADATA_XPG_WL_GAMING_MOUSE 0x7505
+#define USB_VENDOR_ID_ADATA_XPG_WL_GAMING_MOUSE_DONGLE 0x7506
+
#define USB_VENDOR_ID_ADS_TECH 0x06e1
#define USB_DEVICE_ID_ADS_TECH_RADIO_SI470X 0xa155
diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c
index 9b375ca53946..ff1a9d142cdd 100644
--- a/drivers/hid/hid-quirks.c
+++ b/drivers/hid/hid-quirks.c
@@ -27,6 +27,8 @@
static const struct hid_device_id hid_quirks[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_AASHIMA, USB_DEVICE_ID_AASHIMA_GAMEPAD), HID_QUIRK_BADPAD },
{ HID_USB_DEVICE(USB_VENDOR_ID_AASHIMA, USB_DEVICE_ID_AASHIMA_PREDATOR), HID_QUIRK_BADPAD },
+ { HID_USB_DEVICE(USB_VENDOR_ID_ADATA_XPG, USB_VENDOR_ID_ADATA_XPG_WL_GAMING_MOUSE), HID_QUIRK_ALWAYS_POLL },
+ { HID_USB_DEVICE(USB_VENDOR_ID_ADATA_XPG, USB_VENDOR_ID_ADATA_XPG_WL_GAMING_MOUSE_DONGLE), HID_QUIRK_ALWAYS_POLL },
{ HID_USB_DEVICE(USB_VENDOR_ID_AFATECH, USB_DEVICE_ID_AFATECH_AF9016), HID_QUIRK_FULLSPEED_INTERVAL },
{ HID_USB_DEVICE(USB_VENDOR_ID_AIREN, USB_DEVICE_ID_AIREN_SLIMPLUS), HID_QUIRK_NOGET },
{ HID_USB_DEVICE(USB_VENDOR_ID_AKAI_09E8, USB_DEVICE_ID_AKAI_09E8_MIDIMIX), HID_QUIRK_NO_INIT_REPORTS },
diff --git a/drivers/hid/usbhid/usbkbd.c b/drivers/hid/usbhid/usbkbd.c
index d5b7a696a68c..50c5b204bf04 100644
--- a/drivers/hid/usbhid/usbkbd.c
+++ b/drivers/hid/usbhid/usbkbd.c
@@ -160,7 +160,7 @@ static int usb_kbd_event(struct input_dev *dev, unsigned int type,
return -1;
spin_lock_irqsave(&kbd->leds_lock, flags);
- kbd->newleds = (!!test_bit(LED_KANA, dev->led) << 3) | (!!test_bit(LED_COMPOSE, dev->led) << 3) |
+ kbd->newleds = (!!test_bit(LED_KANA, dev->led) << 4) | (!!test_bit(LED_COMPOSE, dev->led) << 3) |
(!!test_bit(LED_SCROLLL, dev->led) << 2) | (!!test_bit(LED_CAPSL, dev->led) << 1) |
(!!test_bit(LED_NUML, dev->led));
diff --git a/drivers/hwmon/gpio-fan.c b/drivers/hwmon/gpio-fan.c
index d96e435cc42b..e0b3917dfe6f 100644
--- a/drivers/hwmon/gpio-fan.c
+++ b/drivers/hwmon/gpio-fan.c
@@ -394,7 +394,12 @@ static int gpio_fan_set_cur_state(struct thermal_cooling_device *cdev,
if (state >= fan_data->num_speed)
return -EINVAL;
+ mutex_lock(&fan_data->lock);
+
set_fan_speed(fan_data, state);
+
+ mutex_unlock(&fan_data->lock);
+
return 0;
}
@@ -490,7 +495,11 @@ MODULE_DEVICE_TABLE(of, of_gpio_fan_match);
static void gpio_fan_stop(void *data)
{
+ struct gpio_fan_data *fan_data = data;
+
+ mutex_lock(&fan_data->lock);
set_fan_speed(data, 0);
+ mutex_unlock(&fan_data->lock);
}
static int gpio_fan_probe(struct platform_device *pdev)
@@ -564,7 +573,9 @@ static int gpio_fan_suspend(struct device *dev)
if (fan_data->gpios) {
fan_data->resume_speed = fan_data->speed_index;
+ mutex_lock(&fan_data->lock);
set_fan_speed(fan_data, 0);
+ mutex_unlock(&fan_data->lock);
}
return 0;
@@ -574,8 +585,11 @@ static int gpio_fan_resume(struct device *dev)
{
struct gpio_fan_data *fan_data = dev_get_drvdata(dev);
- if (fan_data->gpios)
+ if (fan_data->gpios) {
+ mutex_lock(&fan_data->lock);
set_fan_speed(fan_data, fan_data->resume_speed);
+ mutex_unlock(&fan_data->lock);
+ }
return 0;
}
diff --git a/drivers/hwmon/xgene-hwmon.c b/drivers/hwmon/xgene-hwmon.c
index 559a73bab51e..15889bcc8587 100644
--- a/drivers/hwmon/xgene-hwmon.c
+++ b/drivers/hwmon/xgene-hwmon.c
@@ -110,7 +110,7 @@ struct xgene_hwmon_dev {
phys_addr_t comm_base_addr;
void *pcc_comm_addr;
- u64 usecs_lat;
+ unsigned int usecs_lat;
};
/*
diff --git a/drivers/i2c/busses/i2c-imx-lpi2c.c b/drivers/i2c/busses/i2c-imx-lpi2c.c
index 89faef6f013b..c800a8303328 100644
--- a/drivers/i2c/busses/i2c-imx-lpi2c.c
+++ b/drivers/i2c/busses/i2c-imx-lpi2c.c
@@ -624,9 +624,9 @@ static int lpi2c_imx_probe(struct platform_device *pdev)
return 0;
rpm_disable:
- pm_runtime_put(&pdev->dev);
- pm_runtime_disable(&pdev->dev);
pm_runtime_dont_use_autosuspend(&pdev->dev);
+ pm_runtime_put_sync(&pdev->dev);
+ pm_runtime_disable(&pdev->dev);
return ret;
}
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
index d0c557c8d80f..c5a6e7527baf 100644
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -1284,7 +1284,10 @@ static int i2c_pxa_probe(struct platform_device *dev)
i2c->adap.name);
}
- clk_prepare_enable(i2c->clk);
+ ret = clk_prepare_enable(i2c->clk);
+ if (ret)
+ return dev_err_probe(&dev->dev, ret,
+ "failed to enable clock\n");
if (i2c->use_pio) {
i2c->adap.algo = &i2c_pxa_pio_algorithm;
diff --git a/drivers/iio/accel/adis16201.c b/drivers/iio/accel/adis16201.c
index 2de45587569a..de01af6e52b4 100644
--- a/drivers/iio/accel/adis16201.c
+++ b/drivers/iio/accel/adis16201.c
@@ -214,9 +214,9 @@ static const struct iio_chan_spec adis16201_channels[] = {
BIT(IIO_CHAN_INFO_CALIBBIAS), 0, 14),
ADIS_AUX_ADC_CHAN(ADIS16201_AUX_ADC_REG, ADIS16201_SCAN_AUX_ADC, 0, 12),
ADIS_INCLI_CHAN(X, ADIS16201_XINCL_OUT_REG, ADIS16201_SCAN_INCLI_X,
- BIT(IIO_CHAN_INFO_CALIBBIAS), 0, 14),
+ BIT(IIO_CHAN_INFO_CALIBBIAS), 0, 12),
ADIS_INCLI_CHAN(Y, ADIS16201_YINCL_OUT_REG, ADIS16201_SCAN_INCLI_Y,
- BIT(IIO_CHAN_INFO_CALIBBIAS), 0, 14),
+ BIT(IIO_CHAN_INFO_CALIBBIAS), 0, 12),
IIO_CHAN_SOFT_TIMESTAMP(7)
};
diff --git a/drivers/iio/adc/ad7606_spi.c b/drivers/iio/adc/ad7606_spi.c
index e1ad2cd61b7f..e9f4043966ae 100644
--- a/drivers/iio/adc/ad7606_spi.c
+++ b/drivers/iio/adc/ad7606_spi.c
@@ -127,7 +127,7 @@ static int ad7606_spi_reg_read(struct ad7606_state *st, unsigned int addr)
{
.tx_buf = &st->d16[0],
.len = 2,
- .cs_change = 0,
+ .cs_change = 1,
}, {
.rx_buf = &st->d16[1],
.len = 2,
diff --git a/drivers/iio/adc/ad7768-1.c b/drivers/iio/adc/ad7768-1.c
index c1adb95f2a46..fd9aea145320 100644
--- a/drivers/iio/adc/ad7768-1.c
+++ b/drivers/iio/adc/ad7768-1.c
@@ -168,7 +168,7 @@ struct ad7768_state {
union {
struct {
__be32 chan;
- s64 timestamp;
+ aligned_s64 timestamp;
} scan;
__be32 d32;
u8 d8[2];
diff --git a/drivers/iio/adc/dln2-adc.c b/drivers/iio/adc/dln2-adc.c
index 2e37834633ff..02addbd33ebe 100644
--- a/drivers/iio/adc/dln2-adc.c
+++ b/drivers/iio/adc/dln2-adc.c
@@ -483,7 +483,7 @@ static irqreturn_t dln2_adc_trigger_h(int irq, void *p)
struct iio_dev *indio_dev = pf->indio_dev;
struct {
__le16 values[DLN2_ADC_MAX_CHANNELS];
- int64_t timestamp_space;
+ aligned_s64 timestamp_space;
} data;
struct dln2_adc_get_all_vals dev_data;
struct dln2_adc *dln2 = iio_priv(indio_dev);
diff --git a/drivers/iio/chemical/sps30.c b/drivers/iio/chemical/sps30.c
index c0845d892faa..0e466106becb 100644
--- a/drivers/iio/chemical/sps30.c
+++ b/drivers/iio/chemical/sps30.c
@@ -232,7 +232,7 @@ static irqreturn_t sps30_trigger_handler(int irq, void *p)
int ret;
struct {
s32 data[4]; /* PM1, PM2P5, PM4, PM10 */
- s64 ts;
+ aligned_s64 ts;
} scan;
mutex_lock(&state->lock);
diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
index d1f2109012ed..e78e631361cb 100644
--- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
+++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
@@ -360,6 +360,9 @@ int st_lsm6dsx_read_fifo(struct st_lsm6dsx_hw *hw)
if (fifo_status & cpu_to_le16(ST_LSM6DSX_FIFO_EMPTY_MASK))
return 0;
+ if (!pattern_len)
+ pattern_len = ST_LSM6DSX_SAMPLE_SIZE;
+
fifo_len = (le16_to_cpu(fifo_status) & fifo_diff_mask) *
ST_LSM6DSX_CHAN_SIZE;
fifo_len = (fifo_len / pattern_len) * pattern_len;
@@ -538,6 +541,9 @@ int st_lsm6dsx_read_tagged_fifo(struct st_lsm6dsx_hw *hw)
if (!fifo_len)
return 0;
+ if (!pattern_len)
+ pattern_len = ST_LSM6DSX_TAGGED_SAMPLE_SIZE;
+
for (read_len = 0; read_len < fifo_len; read_len += pattern_len) {
err = st_lsm6dsx_read_block(hw,
ST_LSM6DSX_REG_FIFO_OUT_TAG_ADDR,
diff --git a/drivers/infiniband/sw/rxe/rxe_cq.c b/drivers/infiniband/sw/rxe/rxe_cq.c
index ad3090131126..81f66ba6bf35 100644
--- a/drivers/infiniband/sw/rxe/rxe_cq.c
+++ b/drivers/infiniband/sw/rxe/rxe_cq.c
@@ -96,11 +96,8 @@ int rxe_cq_from_init(struct rxe_dev *rxe, struct rxe_cq *cq, int cqe,
err = do_mmap_info(rxe, uresp ? &uresp->mi : NULL, udata,
cq->queue->buf, cq->queue->buf_size, &cq->queue->ip);
- if (err) {
- vfree(cq->queue->buf);
- kfree(cq->queue);
+ if (err)
return err;
- }
if (uresp)
cq->is_user = 1;
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index 9cfd2c1d4e3a..fc23ea8afbe8 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -163,6 +163,7 @@ static const char * const topbuttonpad_pnp_ids[] = {
static const char * const smbus_pnp_ids[] = {
/* all of the topbuttonpad_pnp_ids are valid, we just add some extras */
+ "DLL060d", /* Dell Precision M3800 */
"LEN0048", /* X1 Carbon 3 */
"LEN0046", /* X250 */
"LEN0049", /* Yoga 11e */
@@ -185,10 +186,14 @@ static const char * const smbus_pnp_ids[] = {
"LEN2044", /* L470 */
"LEN2054", /* E480 */
"LEN2055", /* E580 */
+ "SYN1221", /* TUXEDO InfinityBook Pro 14 v5 */
+ "SYN3003", /* HP EliteBook 850 G1 */
"SYN3052", /* HP EliteBook 840 G4 */
"SYN3221", /* HP 15-ay000 */
"SYN323d", /* HP Spectre X360 13-w013dx */
"SYN3257", /* HP Envy 13-ad105ng */
+ "TOS01f6", /* Dynabook Portege X30L-G */
+ "TOS0213", /* Dynabook Portege X30-D */
NULL
};
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c
index 0abb714fdbf1..de29512c75cc 100644
--- a/drivers/iommu/amd_iommu_init.c
+++ b/drivers/iommu/amd_iommu_init.c
@@ -3124,6 +3124,14 @@ static int __init parse_ivrs_acpihid(char *str)
while (*uid == '0' && *(uid + 1))
uid++;
+ if (strlen(hid) >= ACPIHID_HID_LEN) {
+ pr_err("Invalid command line: hid is too long\n");
+ return 1;
+ } else if (strlen(uid) >= ACPIHID_UID_LEN) {
+ pr_err("Invalid command line: uid is too long\n");
+ return 1;
+ }
+
i = early_acpihid_map_size++;
memcpy(early_acpihid_map[i].hid, hid, strlen(hid));
memcpy(early_acpihid_map[i].uid, uid, strlen(uid));
diff --git a/drivers/irqchip/irq-gic-v2m.c b/drivers/irqchip/irq-gic-v2m.c
index 11efd6c6b111..2468b285c77c 100644
--- a/drivers/irqchip/irq-gic-v2m.c
+++ b/drivers/irqchip/irq-gic-v2m.c
@@ -262,7 +262,7 @@ static struct msi_domain_info gicv2m_pmsi_domain_info = {
.chip = &gicv2m_pmsi_irq_chip,
};
-static void gicv2m_teardown(void)
+static void __init gicv2m_teardown(void)
{
struct v2m_data *v2m, *tmp;
@@ -277,7 +277,7 @@ static void gicv2m_teardown(void)
}
}
-static int gicv2m_allocate_domains(struct irq_domain *parent)
+static __init int gicv2m_allocate_domains(struct irq_domain *parent)
{
struct irq_domain *inner_domain, *pci_domain, *plat_domain;
struct v2m_data *v2m;
@@ -407,7 +407,7 @@ static int __init gicv2m_init_one(struct fwnode_handle *fwnode,
return ret;
}
-static struct of_device_id gicv2m_device_id[] = {
+static __initconst struct of_device_id gicv2m_device_id[] = {
{ .compatible = "arm,gic-v2m-frame", },
{},
};
@@ -472,7 +472,7 @@ static struct fwnode_handle *gicv2m_get_fwnode(struct device *dev)
return data->fwnode;
}
-static bool acpi_check_amazon_graviton_quirks(void)
+static __init bool acpi_check_amazon_graviton_quirks(void)
{
static struct acpi_table_madt *madt;
acpi_status status;
diff --git a/drivers/mailbox/mailbox.c b/drivers/mailbox/mailbox.c
index 4229b9b5da98..6f54501dc776 100644
--- a/drivers/mailbox/mailbox.c
+++ b/drivers/mailbox/mailbox.c
@@ -350,11 +350,12 @@ struct mbox_chan *mbox_request_channel(struct mbox_client *cl, int index)
mutex_lock(&con_mutex);
- if (of_parse_phandle_with_args(dev->of_node, "mboxes",
- "#mbox-cells", index, &spec)) {
+ ret = of_parse_phandle_with_args(dev->of_node, "mboxes", "#mbox-cells",
+ index, &spec);
+ if (ret) {
dev_dbg(dev, "%s: can't parse \"mboxes\" property\n", __func__);
mutex_unlock(&con_mutex);
- return ERR_PTR(-ENODEV);
+ return ERR_PTR(ret);
}
chan = ERR_PTR(-EPROBE_DEFER);
diff --git a/drivers/md/dm-cache-target.c b/drivers/md/dm-cache-target.c
index c1d2e3376afc..0aa22a994c86 100644
--- a/drivers/md/dm-cache-target.c
+++ b/drivers/md/dm-cache-target.c
@@ -2996,6 +2996,27 @@ static dm_cblock_t get_cache_dev_size(struct cache *cache)
return to_cblock(size);
}
+static bool can_resume(struct cache *cache)
+{
+ /*
+ * Disallow retrying the resume operation for devices that failed the
+ * first resume attempt, as the failure leaves the policy object partially
+ * initialized. Retrying could trigger BUG_ON when loading cache mappings
+ * into the incomplete policy object.
+ */
+ if (cache->sized && !cache->loaded_mappings) {
+ if (get_cache_mode(cache) != CM_WRITE)
+ DMERR("%s: unable to resume a failed-loaded cache, please check metadata.",
+ cache_device_name(cache));
+ else
+ DMERR("%s: unable to resume cache due to missing proper cache table reload",
+ cache_device_name(cache));
+ return false;
+ }
+
+ return true;
+}
+
static bool can_resize(struct cache *cache, dm_cblock_t new_size)
{
if (from_cblock(new_size) > from_cblock(cache->cache_size)) {
@@ -3044,6 +3065,9 @@ static int cache_preresume(struct dm_target *ti)
struct cache *cache = ti->private;
dm_cblock_t csize = get_cache_dev_size(cache);
+ if (!can_resume(cache))
+ return -EINVAL;
+
/*
* Check to see if the cache has resized.
*/
diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c
index 37ab8e05db85..15580ba773e7 100644
--- a/drivers/md/dm-integrity.c
+++ b/drivers/md/dm-integrity.c
@@ -4199,7 +4199,7 @@ static void dm_integrity_dtr(struct dm_target *ti)
BUG_ON(!RB_EMPTY_ROOT(&ic->in_progress));
BUG_ON(!list_empty(&ic->wait_list));
- if (ic->mode == 'B')
+ if (ic->mode == 'B' && ic->bitmap_flush_work.work.func)
cancel_delayed_work_sync(&ic->bitmap_flush_work);
if (ic->metadata_wq)
destroy_workqueue(ic->metadata_wq);
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index fcb9e2775f78..7002846afb30 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -573,8 +573,9 @@ static char **realloc_argv(unsigned *size, char **old_argv)
gfp = GFP_NOIO;
}
argv = kmalloc_array(new_size, sizeof(*argv), gfp);
- if (argv && old_argv) {
- memcpy(argv, old_argv, *size * sizeof(*argv));
+ if (argv) {
+ if (old_argv)
+ memcpy(argv, old_argv, *size * sizeof(*argv));
*size = new_size;
}
@@ -741,6 +742,10 @@ int dm_table_add_target(struct dm_table *t, const char *type,
DMERR("%s: zero-length target", dm_device_name(t->md));
return -EINVAL;
}
+ if (start + len < start || start + len > LLONG_MAX >> SECTOR_SHIFT) {
+ DMERR("%s: too large device", dm_device_name(t->md));
+ return -EINVAL;
+ }
tgt->type = dm_get_target_type(type);
if (!tgt->type) {
diff --git a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
index 69070b706831..8229fbb88a8d 100644
--- a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
+++ b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
@@ -813,13 +813,12 @@ static int c8sectpfe_probe(struct platform_device *pdev)
}
tsin->i2c_adapter =
of_find_i2c_adapter_by_node(i2c_bus);
+ of_node_put(i2c_bus);
if (!tsin->i2c_adapter) {
dev_err(&pdev->dev, "No i2c adapter found\n");
- of_node_put(i2c_bus);
ret = -ENODEV;
goto err_clk_disable;
}
- of_node_put(i2c_bus);
tsin->rst_gpio = of_get_named_gpio(child, "reset-gpios", 0);
diff --git a/drivers/media/usb/cx231xx/cx231xx-417.c b/drivers/media/usb/cx231xx/cx231xx-417.c
index 6d218a036966..a9d080823f10 100644
--- a/drivers/media/usb/cx231xx/cx231xx-417.c
+++ b/drivers/media/usb/cx231xx/cx231xx-417.c
@@ -1966,6 +1966,8 @@ static void cx231xx_video_dev_init(
vfd->lock = &dev->lock;
vfd->release = video_device_release_empty;
vfd->ctrl_handler = &dev->mpeg_ctrl_handler.hdl;
+ vfd->device_caps = V4L2_CAP_READWRITE | V4L2_CAP_STREAMING |
+ V4L2_CAP_VIDEO_CAPTURE;
video_set_drvdata(vfd, dev);
if (dev->tuner_type == TUNER_ABSENT) {
v4l2_disable_ioctl(vfd, VIDIOC_G_FREQUENCY);
diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
index 390caef1bdab..22978057b94a 100644
--- a/drivers/mmc/host/sdhci-pci-core.c
+++ b/drivers/mmc/host/sdhci-pci-core.c
@@ -669,8 +669,12 @@ static void sdhci_intel_set_power(struct sdhci_host *host, unsigned char mode,
sdhci_set_power(host, mode, vdd);
- if (mode == MMC_POWER_OFF)
+ if (mode == MMC_POWER_OFF) {
+ if (slot->chip->pdev->device == PCI_DEVICE_ID_INTEL_APL_SD ||
+ slot->chip->pdev->device == PCI_DEVICE_ID_INTEL_BYT_SD)
+ usleep_range(15000, 17500);
return;
+ }
/*
* Bus power might not enable after D3 -> D0 transition due to the
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 4004e4e7b622..f8d0a0e49abe 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1708,10 +1708,15 @@ void sdhci_set_clock(struct sdhci_host *host, unsigned int clock)
host->mmc->actual_clock = 0;
- sdhci_writew(host, 0, SDHCI_CLOCK_CONTROL);
+ clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL);
+ if (clk & SDHCI_CLOCK_CARD_EN)
+ sdhci_writew(host, clk & ~SDHCI_CLOCK_CARD_EN,
+ SDHCI_CLOCK_CONTROL);
- if (clock == 0)
+ if (clock == 0) {
+ sdhci_writew(host, 0, SDHCI_CLOCK_CONTROL);
return;
+ }
clk = sdhci_calc_clk(host, clock, &host->mmc->actual_clock);
sdhci_enable_clk(host, clk);
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 89797b257573..3b235a269c1b 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -1954,7 +1954,7 @@ static int __bond_release_one(struct net_device *bond_dev,
RCU_INIT_POINTER(bond->current_arp_slave, NULL);
- if (!all && (!bond->params.fail_over_mac ||
+ if (!all && (bond->params.fail_over_mac != BOND_FOM_ACTIVE ||
BOND_MODE(bond) != BOND_MODE_ACTIVEBACKUP)) {
if (ether_addr_equal_64bits(bond_dev->dev_addr, slave->perm_hwaddr) &&
bond_has_slaves(bond))
diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
index 9f5852657852..d41c9006a028 100644
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
@@ -381,7 +381,7 @@ static void b53_enable_vlan(struct b53_device *dev, bool enable,
vc4 |= VC4_ING_VID_VIO_DROP << VC4_ING_VID_CHECK_S;
vc5 |= VC5_DROP_VTABLE_MISS;
} else {
- vc4 |= VC4_ING_VID_VIO_FWD << VC4_ING_VID_CHECK_S;
+ vc4 |= VC4_NO_ING_VID_CHK << VC4_ING_VID_CHECK_S;
vc5 &= ~VC5_DROP_VTABLE_MISS;
}
diff --git a/drivers/net/dsa/sja1105/sja1105_main.c b/drivers/net/dsa/sja1105/sja1105_main.c
index eab861352bf2..007eb05ed659 100644
--- a/drivers/net/dsa/sja1105/sja1105_main.c
+++ b/drivers/net/dsa/sja1105/sja1105_main.c
@@ -1390,6 +1390,7 @@ static void sja1105_bridge_stp_state_set(struct dsa_switch *ds, int port,
switch (state) {
case BR_STATE_DISABLED:
case BR_STATE_BLOCKING:
+ case BR_STATE_LISTENING:
/* From UM10944 description of DRPDTAG (why put this there?):
* "Management traffic flows to the port regardless of the state
* of the INGRESS flag". So BPDUs are still be allowed to pass.
@@ -1399,11 +1400,6 @@ static void sja1105_bridge_stp_state_set(struct dsa_switch *ds, int port,
mac[port].egress = false;
mac[port].dyn_learn = false;
break;
- case BR_STATE_LISTENING:
- mac[port].ingress = true;
- mac[port].egress = false;
- mac[port].dyn_learn = false;
- break;
case BR_STATE_LEARNING:
mac[port].ingress = true;
mac[port].egress = false;
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-desc.c b/drivers/net/ethernet/amd/xgbe/xgbe-desc.c
index 230726d7b74f..d41b58fad37b 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-desc.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-desc.c
@@ -373,8 +373,13 @@ static int xgbe_map_rx_buffer(struct xgbe_prv_data *pdata,
}
/* Set up the header page info */
- xgbe_set_buffer_data(&rdata->rx.hdr, &ring->rx_hdr_pa,
- XGBE_SKB_ALLOC_SIZE);
+ if (pdata->netdev->features & NETIF_F_RXCSUM) {
+ xgbe_set_buffer_data(&rdata->rx.hdr, &ring->rx_hdr_pa,
+ XGBE_SKB_ALLOC_SIZE);
+ } else {
+ xgbe_set_buffer_data(&rdata->rx.hdr, &ring->rx_hdr_pa,
+ pdata->rx_buf_size);
+ }
/* Set up the buffer page info */
xgbe_set_buffer_data(&rdata->rx.buf, &ring->rx_buf_pa,
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-dev.c b/drivers/net/ethernet/amd/xgbe/xgbe-dev.c
index decc1c09a031..0f7d33632853 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-dev.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-dev.c
@@ -320,6 +320,18 @@ static void xgbe_config_sph_mode(struct xgbe_prv_data *pdata)
XGMAC_IOWRITE_BITS(pdata, MAC_RCR, HDSMS, XGBE_SPH_HDSMS_SIZE);
}
+static void xgbe_disable_sph_mode(struct xgbe_prv_data *pdata)
+{
+ unsigned int i;
+
+ for (i = 0; i < pdata->channel_count; i++) {
+ if (!pdata->channel[i]->rx_ring)
+ break;
+
+ XGMAC_DMA_IOWRITE_BITS(pdata->channel[i], DMA_CH_CR, SPH, 0);
+ }
+}
+
static int xgbe_write_rss_reg(struct xgbe_prv_data *pdata, unsigned int type,
unsigned int index, unsigned int val)
{
@@ -3495,8 +3507,12 @@ static int xgbe_init(struct xgbe_prv_data *pdata)
xgbe_config_tx_coalesce(pdata);
xgbe_config_rx_buffer_size(pdata);
xgbe_config_tso_mode(pdata);
- xgbe_config_sph_mode(pdata);
- xgbe_config_rss(pdata);
+
+ if (pdata->netdev->features & NETIF_F_RXCSUM) {
+ xgbe_config_sph_mode(pdata);
+ xgbe_config_rss(pdata);
+ }
+
desc_if->wrapper_tx_desc_init(pdata);
desc_if->wrapper_rx_desc_init(pdata);
xgbe_enable_dma_interrupts(pdata);
@@ -3650,5 +3666,9 @@ void xgbe_init_function_ptrs_dev(struct xgbe_hw_if *hw_if)
hw_if->disable_vxlan = xgbe_disable_vxlan;
hw_if->set_vxlan_id = xgbe_set_vxlan_id;
+ /* For Split Header*/
+ hw_if->enable_sph = xgbe_config_sph_mode;
+ hw_if->disable_sph = xgbe_disable_sph_mode;
+
DBGPR("<--xgbe_init_function_ptrs\n");
}
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
index 504fbd43be7d..de10e7e3a68d 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
@@ -2372,10 +2372,17 @@ static int xgbe_set_features(struct net_device *netdev,
if (ret)
return ret;
- if ((features & NETIF_F_RXCSUM) && !rxcsum)
+ if ((features & NETIF_F_RXCSUM) && !rxcsum) {
+ hw_if->enable_sph(pdata);
+ hw_if->enable_vxlan(pdata);
hw_if->enable_rx_csum(pdata);
- else if (!(features & NETIF_F_RXCSUM) && rxcsum)
+ schedule_work(&pdata->restart_work);
+ } else if (!(features & NETIF_F_RXCSUM) && rxcsum) {
+ hw_if->disable_sph(pdata);
+ hw_if->disable_vxlan(pdata);
hw_if->disable_rx_csum(pdata);
+ schedule_work(&pdata->restart_work);
+ }
if ((features & NETIF_F_HW_VLAN_CTAG_RX) && !rxvlan)
hw_if->enable_rx_vlan_stripping(pdata);
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe.h b/drivers/net/ethernet/amd/xgbe/xgbe.h
index 729307a96c50..a27979ef7b1c 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe.h
+++ b/drivers/net/ethernet/amd/xgbe/xgbe.h
@@ -834,6 +834,10 @@ struct xgbe_hw_if {
void (*enable_vxlan)(struct xgbe_prv_data *);
void (*disable_vxlan)(struct xgbe_prv_data *);
void (*set_vxlan_id)(struct xgbe_prv_data *);
+
+ /* For Split Header */
+ void (*enable_sph)(struct xgbe_prv_data *pdata);
+ void (*disable_sph)(struct xgbe_prv_data *pdata);
};
/* This structure represents implementation specific routines for an
diff --git a/drivers/net/ethernet/apm/xgene-v2/main.c b/drivers/net/ethernet/apm/xgene-v2/main.c
index 848be6bf2fd1..514a121d96ae 100644
--- a/drivers/net/ethernet/apm/xgene-v2/main.c
+++ b/drivers/net/ethernet/apm/xgene-v2/main.c
@@ -9,8 +9,6 @@
#include "main.h"
-static const struct acpi_device_id xge_acpi_match[];
-
static int xge_get_resources(struct xge_pdata *pdata)
{
struct platform_device *pdev;
@@ -733,7 +731,7 @@ MODULE_DEVICE_TABLE(acpi, xge_acpi_match);
static struct platform_driver xge_driver = {
.driver = {
.name = "xgene-enet-v2",
- .acpi_match_table = ACPI_PTR(xge_acpi_match),
+ .acpi_match_table = xge_acpi_match,
},
.probe = xge_probe,
.remove = xge_remove,
diff --git a/drivers/net/ethernet/dlink/dl2k.c b/drivers/net/ethernet/dlink/dl2k.c
index 55e720d2ea0c..eb2315764134 100644
--- a/drivers/net/ethernet/dlink/dl2k.c
+++ b/drivers/net/ethernet/dlink/dl2k.c
@@ -358,7 +358,7 @@ parse_eeprom (struct net_device *dev)
dev->dev_addr[i] = psrom->mac_addr[i];
if (np->chip_id == CHIP_IP1000A) {
- np->led_mode = psrom->led_mode;
+ np->led_mode = le16_to_cpu(psrom->led_mode);
return 0;
}
diff --git a/drivers/net/ethernet/dlink/dl2k.h b/drivers/net/ethernet/dlink/dl2k.h
index 195dc6cfd895..0e33e2eaae96 100644
--- a/drivers/net/ethernet/dlink/dl2k.h
+++ b/drivers/net/ethernet/dlink/dl2k.h
@@ -335,7 +335,7 @@ typedef struct t_SROM {
u16 sub_system_id; /* 0x06 */
u16 pci_base_1; /* 0x08 (IP1000A only) */
u16 pci_base_2; /* 0x0a (IP1000A only) */
- u16 led_mode; /* 0x0c (IP1000A only) */
+ __le16 led_mode; /* 0x0c (IP1000A only) */
u16 reserved1[9]; /* 0x0e-0x1f */
u8 mac_addr[6]; /* 0x20-0x25 */
u8 reserved2[10]; /* 0x26-0x2f */
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 5660a83356eb..fd7c504b44f2 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -605,7 +605,12 @@ static int fec_enet_txq_submit_skb(struct fec_enet_priv_tx_q *txq,
txq->bd.cur = bdp;
/* Trigger transmission start */
- writel(0, txq->bd.reg_desc_active);
+ if (!(fep->quirks & FEC_QUIRK_ERR007885) ||
+ !readl(txq->bd.reg_desc_active) ||
+ !readl(txq->bd.reg_desc_active) ||
+ !readl(txq->bd.reg_desc_active) ||
+ !readl(txq->bd.reg_desc_active))
+ writel(0, txq->bd.reg_desc_active);
return 0;
}
diff --git a/drivers/net/ethernet/mellanox/mlx4/alloc.c b/drivers/net/ethernet/mellanox/mlx4/alloc.c
index b330020dc0d6..f2bded847e61 100644
--- a/drivers/net/ethernet/mellanox/mlx4/alloc.c
+++ b/drivers/net/ethernet/mellanox/mlx4/alloc.c
@@ -682,9 +682,9 @@ static struct mlx4_db_pgdir *mlx4_alloc_db_pgdir(struct device *dma_device)
}
static int mlx4_alloc_db_from_pgdir(struct mlx4_db_pgdir *pgdir,
- struct mlx4_db *db, int order)
+ struct mlx4_db *db, unsigned int order)
{
- int o;
+ unsigned int o;
int i;
for (o = order; o <= 1; ++o) {
@@ -712,7 +712,7 @@ static int mlx4_alloc_db_from_pgdir(struct mlx4_db_pgdir *pgdir,
return 0;
}
-int mlx4_db_alloc(struct mlx4_dev *dev, struct mlx4_db *db, int order)
+int mlx4_db_alloc(struct mlx4_dev *dev, struct mlx4_db *db, unsigned int order)
{
struct mlx4_priv *priv = mlx4_priv(dev);
struct mlx4_db_pgdir *pgdir;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
index a40fecfdb10c..479304afdada 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
@@ -53,6 +53,7 @@
#define MLX5E_REP_PARAMS_DEF_LOG_SQ_SIZE \
max(0x7, MLX5E_PARAMS_MINIMUM_LOG_SQ_SIZE)
#define MLX5E_REP_PARAMS_DEF_NUM_CHANNELS 1
+#define MLX5E_REP_PARAMS_DEF_LOG_RQ_SIZE 0x8
static const char mlx5e_rep_driver_name[] = "mlx5e_rep";
@@ -1430,6 +1431,8 @@ static void mlx5e_build_rep_params(struct net_device *netdev)
/* RQ */
mlx5e_build_rq_params(mdev, params);
+ if (!mlx5e_is_uplink_rep(priv) && mlx5_core_is_ecpf(mdev))
+ params->log_rq_mtu_frames = MLX5E_REP_PARAMS_DEF_LOG_RQ_SIZE;
/* CQ moderation params */
params->rx_dim_enabled = MLX5_CAP_GEN(mdev, cq_moderation);
@@ -1470,6 +1473,8 @@ static void mlx5e_build_rep_netdev(struct net_device *netdev)
}
netdev->watchdog_timeo = 15 * HZ;
+ if (mlx5_core_is_ecpf(mdev))
+ netdev->tx_queue_len = 1 << MLX5E_REP_PARAMS_DEF_LOG_SQ_SIZE;
netdev->features |= NETIF_F_NETNS_LOCAL;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c b/drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c
index bbff8d8ded76..abb88a61e4d9 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c
@@ -189,6 +189,9 @@ mlx5e_test_loopback_validate(struct sk_buff *skb,
struct udphdr *udph;
struct iphdr *iph;
+ if (skb_linearize(skb))
+ goto out;
+
/* We are only going to peek, no need to clone the SKB */
if (MLX5E_TEST_PKT_SIZE - ETH_HLEN > skb_headlen(skb))
goto out;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/events.c b/drivers/net/ethernet/mellanox/mlx5/core/events.c
index 3ce17c3d7a00..5e8db7a6185a 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/events.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/events.c
@@ -156,11 +156,16 @@ static int temp_warn(struct notifier_block *nb, unsigned long type, void *data)
u64 value_msb;
value_lsb = be64_to_cpu(eqe->data.temp_warning.sensor_warning_lsb);
+ /* bit 1-63 are not supported for NICs,
+ * hence read only bit 0 (asic) from lsb.
+ */
+ value_lsb &= 0x1;
value_msb = be64_to_cpu(eqe->data.temp_warning.sensor_warning_msb);
- mlx5_core_warn(events->dev,
- "High temperature on sensors with bit set %llx %llx",
- value_msb, value_lsb);
+ if (net_ratelimit())
+ mlx5_core_warn(events->dev,
+ "High temperature on sensors with bit set %llx %llx",
+ value_msb, value_lsb);
return NOTIFY_OK;
}
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/health.c b/drivers/net/ethernet/mellanox/mlx5/core/health.c
index d4ad0e4192bb..44e3f8cfecac 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/health.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/health.c
@@ -736,6 +736,7 @@ static void poll_health(struct timer_list *t)
health->prev = count;
if (health->miss_counter == MAX_MISSES) {
mlx5_core_err(dev, "device's health compromised - reached miss count\n");
+ health->synd = ioread8(&h->synd);
print_health_info(dev);
queue_work(health->wq, &health->report_work);
}
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/rdma.c b/drivers/net/ethernet/mellanox/mlx5/core/rdma.c
index 2389239acadc..945d90844f0c 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/rdma.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/rdma.c
@@ -130,8 +130,8 @@ static void mlx5_rdma_make_default_gid(struct mlx5_core_dev *dev, union ib_gid *
static int mlx5_rdma_add_roce_addr(struct mlx5_core_dev *dev)
{
+ u8 mac[ETH_ALEN] = {};
union ib_gid gid;
- u8 mac[ETH_ALEN];
mlx5_rdma_make_default_gid(dev, &gid);
return mlx5_core_roce_gid_set(dev, 0,
diff --git a/drivers/net/ethernet/microchip/lan743x_main.c b/drivers/net/ethernet/microchip/lan743x_main.c
index 6458dbd6c631..a69a34d93ad6 100644
--- a/drivers/net/ethernet/microchip/lan743x_main.c
+++ b/drivers/net/ethernet/microchip/lan743x_main.c
@@ -1221,7 +1221,7 @@ static void lan743x_tx_release_desc(struct lan743x_tx *tx,
if (!(buffer_info->flags & TX_BUFFER_INFO_FLAG_ACTIVE))
goto done;
- descriptor_type = (descriptor->data0) &
+ descriptor_type = le32_to_cpu(descriptor->data0) &
TX_DESC_DATA0_DTYPE_MASK_;
if (descriptor_type == TX_DESC_DATA0_DTYPE_DATA_)
goto clean_up_data_descriptor;
@@ -1281,7 +1281,7 @@ static int lan743x_tx_next_index(struct lan743x_tx *tx, int index)
static void lan743x_tx_release_completed_descriptors(struct lan743x_tx *tx)
{
- while ((*tx->head_cpu_ptr) != (tx->last_head)) {
+ while (le32_to_cpu(*tx->head_cpu_ptr) != (tx->last_head)) {
lan743x_tx_release_desc(tx, tx->last_head, false);
tx->last_head = lan743x_tx_next_index(tx, tx->last_head);
}
@@ -1367,10 +1367,10 @@ static int lan743x_tx_frame_start(struct lan743x_tx *tx,
if (dma_mapping_error(dev, dma_ptr))
return -ENOMEM;
- tx_descriptor->data1 = DMA_ADDR_LOW32(dma_ptr);
- tx_descriptor->data2 = DMA_ADDR_HIGH32(dma_ptr);
- tx_descriptor->data3 = (frame_length << 16) &
- TX_DESC_DATA3_FRAME_LENGTH_MSS_MASK_;
+ tx_descriptor->data1 = cpu_to_le32(DMA_ADDR_LOW32(dma_ptr));
+ tx_descriptor->data2 = cpu_to_le32(DMA_ADDR_HIGH32(dma_ptr));
+ tx_descriptor->data3 = cpu_to_le32((frame_length << 16) &
+ TX_DESC_DATA3_FRAME_LENGTH_MSS_MASK_);
buffer_info->skb = NULL;
buffer_info->dma_ptr = dma_ptr;
@@ -1409,9 +1409,10 @@ static void lan743x_tx_frame_add_lso(struct lan743x_tx *tx,
if (nr_frags <= 0) {
tx->frame_data0 |= TX_DESC_DATA0_LS_;
tx->frame_data0 |= TX_DESC_DATA0_IOC_;
+ tx->frame_last = tx->frame_first;
}
tx_descriptor = &tx->ring_cpu_ptr[tx->frame_tail];
- tx_descriptor->data0 = tx->frame_data0;
+ tx_descriptor->data0 = cpu_to_le32(tx->frame_data0);
/* move to next descriptor */
tx->frame_tail = lan743x_tx_next_index(tx, tx->frame_tail);
@@ -1455,7 +1456,7 @@ static int lan743x_tx_frame_add_fragment(struct lan743x_tx *tx,
/* wrap up previous descriptor */
tx_descriptor = &tx->ring_cpu_ptr[tx->frame_tail];
- tx_descriptor->data0 = tx->frame_data0;
+ tx_descriptor->data0 = cpu_to_le32(tx->frame_data0);
/* move to next descriptor */
tx->frame_tail = lan743x_tx_next_index(tx, tx->frame_tail);
@@ -1478,13 +1479,14 @@ static int lan743x_tx_frame_add_fragment(struct lan743x_tx *tx,
tx->frame_first = 0;
tx->frame_data0 = 0;
tx->frame_tail = 0;
+ tx->frame_last = 0;
return -ENOMEM;
}
- tx_descriptor->data1 = DMA_ADDR_LOW32(dma_ptr);
- tx_descriptor->data2 = DMA_ADDR_HIGH32(dma_ptr);
- tx_descriptor->data3 = (frame_length << 16) &
- TX_DESC_DATA3_FRAME_LENGTH_MSS_MASK_;
+ tx_descriptor->data1 = cpu_to_le32(DMA_ADDR_LOW32(dma_ptr));
+ tx_descriptor->data2 = cpu_to_le32(DMA_ADDR_HIGH32(dma_ptr));
+ tx_descriptor->data3 = cpu_to_le32((frame_length << 16) &
+ TX_DESC_DATA3_FRAME_LENGTH_MSS_MASK_);
buffer_info->skb = NULL;
buffer_info->dma_ptr = dma_ptr;
@@ -1518,17 +1520,19 @@ static void lan743x_tx_frame_end(struct lan743x_tx *tx,
TX_DESC_DATA0_DTYPE_DATA_) {
tx->frame_data0 |= TX_DESC_DATA0_LS_;
tx->frame_data0 |= TX_DESC_DATA0_IOC_;
+ tx->frame_last = tx->frame_tail;
}
- tx_descriptor = &tx->ring_cpu_ptr[tx->frame_tail];
- buffer_info = &tx->buffer_info[tx->frame_tail];
+ tx_descriptor = &tx->ring_cpu_ptr[tx->frame_last];
+ buffer_info = &tx->buffer_info[tx->frame_last];
buffer_info->skb = skb;
if (time_stamp)
buffer_info->flags |= TX_BUFFER_INFO_FLAG_TIMESTAMP_REQUESTED;
if (ignore_sync)
buffer_info->flags |= TX_BUFFER_INFO_FLAG_IGNORE_SYNC;
- tx_descriptor->data0 = tx->frame_data0;
+ tx_descriptor = &tx->ring_cpu_ptr[tx->frame_tail];
+ tx_descriptor->data0 = cpu_to_le32(tx->frame_data0);
tx->frame_tail = lan743x_tx_next_index(tx, tx->frame_tail);
tx->last_tail = tx->frame_tail;
@@ -1946,11 +1950,11 @@ static int lan743x_rx_init_ring_element(struct lan743x_rx *rx, int index,
}
buffer_info->buffer_length = length;
- descriptor->data1 = DMA_ADDR_LOW32(buffer_info->dma_ptr);
- descriptor->data2 = DMA_ADDR_HIGH32(buffer_info->dma_ptr);
+ descriptor->data1 = cpu_to_le32(DMA_ADDR_LOW32(buffer_info->dma_ptr));
+ descriptor->data2 = cpu_to_le32(DMA_ADDR_HIGH32(buffer_info->dma_ptr));
descriptor->data3 = 0;
- descriptor->data0 = (RX_DESC_DATA0_OWN_ |
- (length & RX_DESC_DATA0_BUF_LENGTH_MASK_));
+ descriptor->data0 = cpu_to_le32((RX_DESC_DATA0_OWN_ |
+ (length & RX_DESC_DATA0_BUF_LENGTH_MASK_)));
skb_reserve(buffer_info->skb, RX_HEAD_PADDING);
lan743x_rx_update_tail(rx, index);
@@ -1965,12 +1969,12 @@ static void lan743x_rx_reuse_ring_element(struct lan743x_rx *rx, int index)
descriptor = &rx->ring_cpu_ptr[index];
buffer_info = &rx->buffer_info[index];
- descriptor->data1 = DMA_ADDR_LOW32(buffer_info->dma_ptr);
- descriptor->data2 = DMA_ADDR_HIGH32(buffer_info->dma_ptr);
+ descriptor->data1 = cpu_to_le32(DMA_ADDR_LOW32(buffer_info->dma_ptr));
+ descriptor->data2 = cpu_to_le32(DMA_ADDR_HIGH32(buffer_info->dma_ptr));
descriptor->data3 = 0;
- descriptor->data0 = (RX_DESC_DATA0_OWN_ |
+ descriptor->data0 = cpu_to_le32((RX_DESC_DATA0_OWN_ |
((buffer_info->buffer_length) &
- RX_DESC_DATA0_BUF_LENGTH_MASK_));
+ RX_DESC_DATA0_BUF_LENGTH_MASK_)));
lan743x_rx_update_tail(rx, index);
}
@@ -2004,14 +2008,13 @@ static int lan743x_rx_process_packet(struct lan743x_rx *rx)
{
struct skb_shared_hwtstamps *hwtstamps = NULL;
int result = RX_PROCESS_RESULT_NOTHING_TO_DO;
+ int current_head_index = le32_to_cpu(*rx->head_cpu_ptr);
struct lan743x_rx_buffer_info *buffer_info;
struct lan743x_rx_descriptor *descriptor;
- int current_head_index = -1;
int extension_index = -1;
int first_index = -1;
int last_index = -1;
- current_head_index = *rx->head_cpu_ptr;
if (current_head_index < 0 || current_head_index >= rx->ring_size)
goto done;
@@ -2020,14 +2023,14 @@ static int lan743x_rx_process_packet(struct lan743x_rx *rx)
if (rx->last_head != current_head_index) {
descriptor = &rx->ring_cpu_ptr[rx->last_head];
- if (descriptor->data0 & RX_DESC_DATA0_OWN_)
+ if (le32_to_cpu(descriptor->data0) & RX_DESC_DATA0_OWN_)
goto done;
- if (!(descriptor->data0 & RX_DESC_DATA0_FS_))
+ if (!(le32_to_cpu(descriptor->data0) & RX_DESC_DATA0_FS_))
goto done;
first_index = rx->last_head;
- if (descriptor->data0 & RX_DESC_DATA0_LS_) {
+ if (le32_to_cpu(descriptor->data0) & RX_DESC_DATA0_LS_) {
last_index = rx->last_head;
} else {
int index;
@@ -2035,10 +2038,10 @@ static int lan743x_rx_process_packet(struct lan743x_rx *rx)
index = lan743x_rx_next_index(rx, first_index);
while (index != current_head_index) {
descriptor = &rx->ring_cpu_ptr[index];
- if (descriptor->data0 & RX_DESC_DATA0_OWN_)
+ if (le32_to_cpu(descriptor->data0) & RX_DESC_DATA0_OWN_)
goto done;
- if (descriptor->data0 & RX_DESC_DATA0_LS_) {
+ if (le32_to_cpu(descriptor->data0) & RX_DESC_DATA0_LS_) {
last_index = index;
break;
}
@@ -2047,17 +2050,17 @@ static int lan743x_rx_process_packet(struct lan743x_rx *rx)
}
if (last_index >= 0) {
descriptor = &rx->ring_cpu_ptr[last_index];
- if (descriptor->data0 & RX_DESC_DATA0_EXT_) {
+ if (le32_to_cpu(descriptor->data0) & RX_DESC_DATA0_EXT_) {
/* extension is expected to follow */
int index = lan743x_rx_next_index(rx,
last_index);
if (index != current_head_index) {
descriptor = &rx->ring_cpu_ptr[index];
- if (descriptor->data0 &
+ if (le32_to_cpu(descriptor->data0) &
RX_DESC_DATA0_OWN_) {
goto done;
}
- if (descriptor->data0 &
+ if (le32_to_cpu(descriptor->data0) &
RX_DESC_DATA0_EXT_) {
extension_index = index;
} else {
@@ -2110,7 +2113,7 @@ static int lan743x_rx_process_packet(struct lan743x_rx *rx)
}
buffer_info->skb = NULL;
packet_length = RX_DESC_DATA0_FRAME_LENGTH_GET_
- (descriptor->data0);
+ (le32_to_cpu(descriptor->data0));
skb_put(skb, packet_length - 4);
skb->protocol = eth_type_trans(skb,
rx->adapter->netdev);
@@ -2148,8 +2151,8 @@ static int lan743x_rx_process_packet(struct lan743x_rx *rx)
descriptor = &rx->ring_cpu_ptr[extension_index];
buffer_info = &rx->buffer_info[extension_index];
- ts_sec = descriptor->data1;
- ts_nsec = (descriptor->data2 &
+ ts_sec = le32_to_cpu(descriptor->data1);
+ ts_nsec = (le32_to_cpu(descriptor->data2) &
RX_DESC_DATA2_TS_NS_MASK_);
lan743x_rx_reuse_ring_element(rx, extension_index);
real_last_index = extension_index;
diff --git a/drivers/net/ethernet/microchip/lan743x_main.h b/drivers/net/ethernet/microchip/lan743x_main.h
index 1fbcef391098..44b107caba84 100644
--- a/drivers/net/ethernet/microchip/lan743x_main.h
+++ b/drivers/net/ethernet/microchip/lan743x_main.h
@@ -652,10 +652,11 @@ struct lan743x_tx {
u32 frame_first;
u32 frame_data0;
u32 frame_tail;
+ u32 frame_last;
struct lan743x_tx_buffer_info *buffer_info;
- u32 *head_cpu_ptr;
+ __le32 *head_cpu_ptr;
dma_addr_t head_dma_ptr;
int last_head;
int last_tail;
@@ -685,7 +686,7 @@ struct lan743x_rx {
struct lan743x_rx_buffer_info *buffer_info;
- u32 *head_cpu_ptr;
+ __le32 *head_cpu_ptr;
dma_addr_t head_dma_ptr;
u32 last_head;
u32 last_tail;
@@ -769,10 +770,10 @@ struct lan743x_adapter {
#define TX_DESC_DATA3_FRAME_LENGTH_MSS_MASK_ (0x3FFF0000)
struct lan743x_tx_descriptor {
- u32 data0;
- u32 data1;
- u32 data2;
- u32 data3;
+ __le32 data0;
+ __le32 data1;
+ __le32 data2;
+ __le32 data3;
} __aligned(DEFAULT_DMA_DESCRIPTOR_SPACING);
#define TX_BUFFER_INFO_FLAG_ACTIVE BIT(0)
@@ -807,10 +808,10 @@ struct lan743x_tx_buffer_info {
#define RX_HEAD_PADDING NET_IP_ALIGN
struct lan743x_rx_descriptor {
- u32 data0;
- u32 data1;
- u32 data2;
- u32 data3;
+ __le32 data0;
+ __le32 data1;
+ __le32 data2;
+ __le32 data3;
} __aligned(DEFAULT_DMA_DESCRIPTOR_SPACING);
#define RX_BUFFER_INFO_FLAG_ACTIVE BIT(0)
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
index 5d8b9e10ddf8..d6fcef1651a7 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
@@ -1486,8 +1486,11 @@ static int qlcnic_sriov_channel_cfg_cmd(struct qlcnic_adapter *adapter, u8 cmd_o
}
cmd_op = (cmd.rsp.arg[0] & 0xff);
- if (cmd.rsp.arg[0] >> 25 == 2)
- return 2;
+ if (cmd.rsp.arg[0] >> 25 == 2) {
+ ret = 2;
+ goto out;
+ }
+
if (cmd_op == QLCNIC_BC_CMD_CHANNEL_INIT)
set_bit(QLC_BC_VF_STATE, &vf->state);
else
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
index 497ce6e6b16f..99387e39c04e 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
@@ -919,7 +919,7 @@ static int sun8i_dwmac_set_syscon(struct stmmac_priv *priv)
/* of_mdio_parse_addr returns a valid (0 ~ 31) PHY
* address. No need to mask it again.
*/
- reg |= 1 << H3_EPHY_ADDR_SHIFT;
+ reg |= ret << H3_EPHY_ADDR_SHIFT;
} else {
/* For SoCs without internal PHY the PHY selection bit should be
* set to 0 (external PHY).
diff --git a/drivers/net/ieee802154/ca8210.c b/drivers/net/ieee802154/ca8210.c
index d394e2b65054..d99976034027 100644
--- a/drivers/net/ieee802154/ca8210.c
+++ b/drivers/net/ieee802154/ca8210.c
@@ -1487,8 +1487,7 @@ static u8 mcps_data_request(
command.pdata.data_req.src_addr_mode = src_addr_mode;
command.pdata.data_req.dst.mode = dst_address_mode;
if (dst_address_mode != MAC_MODE_NO_ADDR) {
- command.pdata.data_req.dst.pan_id[0] = LS_BYTE(dst_pan_id);
- command.pdata.data_req.dst.pan_id[1] = MS_BYTE(dst_pan_id);
+ put_unaligned_le16(dst_pan_id, command.pdata.data_req.dst.pan_id);
if (dst_address_mode == MAC_MODE_SHORT_ADDR) {
command.pdata.data_req.dst.address[0] = LS_BYTE(
dst_addr->short_address
@@ -1837,12 +1836,12 @@ static int ca8210_skb_rx(
}
hdr.source.mode = data_ind[0];
dev_dbg(&priv->spi->dev, "srcAddrMode: %#03x\n", hdr.source.mode);
- hdr.source.pan_id = *(u16 *)&data_ind[1];
+ hdr.source.pan_id = cpu_to_le16(get_unaligned_le16(&data_ind[1]));
dev_dbg(&priv->spi->dev, "srcPanId: %#06x\n", hdr.source.pan_id);
memcpy(&hdr.source.extended_addr, &data_ind[3], 8);
hdr.dest.mode = data_ind[11];
dev_dbg(&priv->spi->dev, "dstAddrMode: %#03x\n", hdr.dest.mode);
- hdr.dest.pan_id = *(u16 *)&data_ind[12];
+ hdr.dest.pan_id = cpu_to_le16(get_unaligned_le16(&data_ind[12]));
dev_dbg(&priv->spi->dev, "dstPanId: %#06x\n", hdr.dest.pan_id);
memcpy(&hdr.dest.extended_addr, &data_ind[14], 8);
@@ -1969,7 +1968,7 @@ static int ca8210_skb_tx(
status = mcps_data_request(
header.source.mode,
header.dest.mode,
- header.dest.pan_id,
+ le16_to_cpu(header.dest.pan_id),
(union macaddr *)&header.dest.extended_addr,
skb->len - mac_len,
&skb->data[mac_len],
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index ce11fb2b0556..7105ac37f341 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -302,9 +302,9 @@ static int vxlan_fdb_info(struct sk_buff *skb, struct vxlan_dev *vxlan,
nla_put_u32(skb, NDA_IFINDEX, rdst->remote_ifindex))
goto nla_put_failure;
- ci.ndm_used = jiffies_to_clock_t(now - fdb->used);
+ ci.ndm_used = jiffies_to_clock_t(now - READ_ONCE(fdb->used));
ci.ndm_confirmed = 0;
- ci.ndm_updated = jiffies_to_clock_t(now - fdb->updated);
+ ci.ndm_updated = jiffies_to_clock_t(now - READ_ONCE(fdb->updated));
ci.ndm_refcnt = 0;
if (nla_put(skb, NDA_CACHEINFO, sizeof(ci), &ci))
@@ -510,8 +510,8 @@ static struct vxlan_fdb *vxlan_find_mac(struct vxlan_dev *vxlan,
struct vxlan_fdb *f;
f = __vxlan_find_mac(vxlan, mac, vni);
- if (f && f->used != jiffies)
- f->used = jiffies;
+ if (f && READ_ONCE(f->used) != jiffies)
+ WRITE_ONCE(f->used, jiffies);
return f;
}
@@ -942,12 +942,12 @@ static int vxlan_fdb_update_existing(struct vxlan_dev *vxlan,
!(f->flags & NTF_VXLAN_ADDED_BY_USER)) {
if (f->state != state) {
f->state = state;
- f->updated = jiffies;
+ WRITE_ONCE(f->updated, jiffies);
notify = 1;
}
if (f->flags != fdb_flags) {
f->flags = fdb_flags;
- f->updated = jiffies;
+ WRITE_ONCE(f->updated, jiffies);
notify = 1;
}
}
@@ -974,7 +974,7 @@ static int vxlan_fdb_update_existing(struct vxlan_dev *vxlan,
}
if (ndm_flags & NTF_USE)
- f->used = jiffies;
+ WRITE_ONCE(f->used, jiffies);
if (notify) {
if (rd == NULL)
@@ -1351,7 +1351,7 @@ static bool vxlan_snoop(struct net_device *dev,
src_mac, &rdst->remote_ip.sa, &src_ip->sa);
rdst->remote_ip = *src_ip;
- f->updated = jiffies;
+ WRITE_ONCE(f->updated, jiffies);
vxlan_fdb_notify(vxlan, f, rdst, RTM_NEWNEIGH, true, NULL);
} else {
u32 hash_index = fdb_head_index(vxlan, src_mac, vni);
@@ -2748,7 +2748,7 @@ static void vxlan_cleanup(struct timer_list *t)
if (f->flags & NTF_EXT_LEARNED)
continue;
- timeout = f->used + vxlan->cfg.age_interval * HZ;
+ timeout = READ_ONCE(f->used) + vxlan->cfg.age_interval * HZ;
if (time_before_eq(timeout, jiffies)) {
netdev_dbg(vxlan->dev,
"garbage collect %pM\n",
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
index 3b897f040371..943aae63ec35 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
@@ -866,14 +866,16 @@ brcmf_usb_dl_writeimage(struct brcmf_usbdev_info *devinfo, u8 *fw, int fwlen)
}
/* 1) Prepare USB boot loader for runtime image */
- brcmf_usb_dl_cmd(devinfo, DL_START, &state, sizeof(state));
+ err = brcmf_usb_dl_cmd(devinfo, DL_START, &state, sizeof(state));
+ if (err)
+ goto fail;
rdlstate = le32_to_cpu(state.state);
rdlbytes = le32_to_cpu(state.bytes);
/* 2) Check we are in the Waiting state */
if (rdlstate != DL_WAITING) {
- brcmf_err("Failed to DL_START\n");
+ brcmf_err("Invalid DL state: %u\n", rdlstate);
err = -EINVAL;
goto fail;
}
diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c
index 15c7a6fc37b9..e4d487468c4d 100644
--- a/drivers/net/wireless/realtek/rtw88/main.c
+++ b/drivers/net/wireless/realtek/rtw88/main.c
@@ -766,6 +766,7 @@ static void rtw_init_ht_cap(struct rtw_dev *rtwdev,
struct ieee80211_sta_ht_cap *ht_cap)
{
struct rtw_efuse *efuse = &rtwdev->efuse;
+ int i;
ht_cap->ht_supported = true;
ht_cap->cap = 0;
@@ -780,17 +781,11 @@ static void rtw_init_ht_cap(struct rtw_dev *rtwdev,
ht_cap->ampdu_factor = IEEE80211_HT_MAX_AMPDU_64K;
ht_cap->ampdu_density = IEEE80211_HT_MPDU_DENSITY_16;
ht_cap->mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED;
- if (efuse->hw_cap.nss > 1) {
- ht_cap->mcs.rx_mask[0] = 0xFF;
- ht_cap->mcs.rx_mask[1] = 0xFF;
- ht_cap->mcs.rx_mask[4] = 0x01;
- ht_cap->mcs.rx_highest = cpu_to_le16(300);
- } else {
- ht_cap->mcs.rx_mask[0] = 0xFF;
- ht_cap->mcs.rx_mask[1] = 0x00;
- ht_cap->mcs.rx_mask[4] = 0x01;
- ht_cap->mcs.rx_highest = cpu_to_le16(150);
- }
+
+ for (i = 0; i < efuse->hw_cap.nss; i++)
+ ht_cap->mcs.rx_mask[i] = 0xFF;
+ ht_cap->mcs.rx_mask[4] = 0x01;
+ ht_cap->mcs.rx_highest = cpu_to_le16(150 * efuse->hw_cap.nss);
}
static void rtw_init_vht_cap(struct rtw_dev *rtwdev,
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822b.c b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
index 63abda3b0ebf..004a85448ce9 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8822b.c
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
@@ -864,11 +864,11 @@ static void rtw8822b_query_rx_desc(struct rtw_dev *rtwdev, u8 *rx_desc,
}
static void
-rtw8822b_set_tx_power_index_by_rate(struct rtw_dev *rtwdev, u8 path, u8 rs)
+rtw8822b_set_tx_power_index_by_rate(struct rtw_dev *rtwdev, u8 path,
+ u8 rs, u32 *phy_pwr_idx)
{
struct rtw_hal *hal = &rtwdev->hal;
static const u32 offset_txagc[2] = {0x1d00, 0x1d80};
- static u32 phy_pwr_idx;
u8 rate, rate_idx, pwr_index, shift;
int j;
@@ -876,12 +876,12 @@ rtw8822b_set_tx_power_index_by_rate(struct rtw_dev *rtwdev, u8 path, u8 rs)
rate = rtw_rate_section[rs][j];
pwr_index = hal->tx_pwr_tbl[path][rate];
shift = rate & 0x3;
- phy_pwr_idx |= ((u32)pwr_index << (shift * 8));
+ *phy_pwr_idx |= ((u32)pwr_index << (shift * 8));
if (shift == 0x3) {
rate_idx = rate & 0xfc;
rtw_write32(rtwdev, offset_txagc[path] + rate_idx,
- phy_pwr_idx);
- phy_pwr_idx = 0;
+ *phy_pwr_idx);
+ *phy_pwr_idx = 0;
}
}
}
@@ -889,11 +889,13 @@ rtw8822b_set_tx_power_index_by_rate(struct rtw_dev *rtwdev, u8 path, u8 rs)
static void rtw8822b_set_tx_power_index(struct rtw_dev *rtwdev)
{
struct rtw_hal *hal = &rtwdev->hal;
+ u32 phy_pwr_idx = 0;
int rs, path;
for (path = 0; path < hal->rf_path_num; path++) {
for (rs = 0; rs < RTW_RATE_SECTION_MAX; rs++)
- rtw8822b_set_tx_power_index_by_rate(rtwdev, path, rs);
+ rtw8822b_set_tx_power_index_by_rate(rtwdev, path, rs,
+ &phy_pwr_idx);
}
}
diff --git a/drivers/nvdimm/label.c b/drivers/nvdimm/label.c
index 9251441fd8a3..5251058adc4d 100644
--- a/drivers/nvdimm/label.c
+++ b/drivers/nvdimm/label.c
@@ -421,7 +421,8 @@ int nd_label_data_init(struct nvdimm_drvdata *ndd)
if (ndd->data)
return 0;
- if (ndd->nsarea.status || ndd->nsarea.max_xfer == 0) {
+ if (ndd->nsarea.status || ndd->nsarea.max_xfer == 0 ||
+ ndd->nsarea.config_size == 0) {
dev_dbg(ndd->dev, "failed to init config data area: (%u:%u)\n",
ndd->nsarea.max_xfer, ndd->nsarea.config_size);
return -ENXIO;
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 9816debe5cb5..94c8ef4a54d3 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -3980,7 +3980,8 @@ static void nvme_fw_act_work(struct work_struct *work)
msleep(100);
}
- if (!nvme_change_ctrl_state(ctrl, NVME_CTRL_LIVE))
+ if (!nvme_change_ctrl_state(ctrl, NVME_CTRL_CONNECTING) ||
+ !nvme_change_ctrl_state(ctrl, NVME_CTRL_LIVE))
return;
nvme_start_queues(ctrl);
diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
index 61296032ce6d..364f83c92b18 100644
--- a/drivers/nvme/host/tcp.c
+++ b/drivers/nvme/host/tcp.c
@@ -1423,7 +1423,7 @@ static void __nvme_tcp_stop_queue(struct nvme_tcp_queue *queue)
cancel_work_sync(&queue->io_work);
}
-static void nvme_tcp_stop_queue(struct nvme_ctrl *nctrl, int qid)
+static void nvme_tcp_stop_queue_nowait(struct nvme_ctrl *nctrl, int qid)
{
struct nvme_tcp_ctrl *ctrl = to_tcp_ctrl(nctrl);
struct nvme_tcp_queue *queue = &ctrl->queues[qid];
@@ -1433,6 +1433,31 @@ static void nvme_tcp_stop_queue(struct nvme_ctrl *nctrl, int qid)
__nvme_tcp_stop_queue(queue);
}
+static void nvme_tcp_wait_queue(struct nvme_ctrl *nctrl, int qid)
+{
+ struct nvme_tcp_ctrl *ctrl = to_tcp_ctrl(nctrl);
+ struct nvme_tcp_queue *queue = &ctrl->queues[qid];
+ int timeout = 100;
+
+ while (timeout > 0) {
+ if (!test_bit(NVME_TCP_Q_ALLOCATED, &queue->flags) ||
+ !sk_wmem_alloc_get(queue->sock->sk))
+ return;
+ msleep(2);
+ timeout -= 2;
+ }
+ dev_warn(nctrl->device,
+ "qid %d: timeout draining sock wmem allocation expired\n",
+ qid);
+}
+
+static void nvme_tcp_stop_queue(struct nvme_ctrl *nctrl, int qid)
+{
+ nvme_tcp_stop_queue_nowait(nctrl, qid);
+ nvme_tcp_wait_queue(nctrl, qid);
+}
+
+
static void nvme_tcp_setup_sock_ops(struct nvme_tcp_queue *queue)
{
write_lock_bh(&queue->sock->sk->sk_callback_lock);
@@ -1539,7 +1564,9 @@ static void nvme_tcp_stop_io_queues(struct nvme_ctrl *ctrl)
int i;
for (i = 1; i < ctrl->queue_count; i++)
- nvme_tcp_stop_queue(ctrl, i);
+ nvme_tcp_stop_queue_nowait(ctrl, i);
+ for (i = 1; i < ctrl->queue_count; i++)
+ nvme_tcp_wait_queue(ctrl, i);
}
static int nvme_tcp_start_io_queues(struct nvme_ctrl *ctrl)
diff --git a/drivers/nvme/target/tcp.c b/drivers/nvme/target/tcp.c
index 11c8506e04ca..bac81baa49c1 100644
--- a/drivers/nvme/target/tcp.c
+++ b/drivers/nvme/target/tcp.c
@@ -1338,6 +1338,9 @@ static void nvmet_tcp_restore_socket_callbacks(struct nvmet_tcp_queue *queue)
{
struct socket *sock = queue->sock;
+ if (!queue->state_change)
+ return;
+
write_lock_bh(&sock->sk->sk_callback_lock);
sock->sk->sk_data_ready = queue->data_ready;
sock->sk->sk_state_change = queue->state_change;
diff --git a/drivers/of/device.c b/drivers/of/device.c
index 7fb870097a84..ee3467730dac 100644
--- a/drivers/of/device.c
+++ b/drivers/of/device.c
@@ -213,14 +213,15 @@ static ssize_t of_device_get_modalias(struct device *dev, char *str, ssize_t len
csize = snprintf(str, len, "of:N%pOFn%c%s", dev->of_node, 'T',
of_node_get_device_type(dev->of_node));
tsize = csize;
+ if (csize >= len)
+ csize = len > 0 ? len - 1 : 0;
len -= csize;
- if (str)
- str += csize;
+ str += csize;
of_property_for_each_string(dev->of_node, "compatible", p, compat) {
csize = strlen(compat) + 1;
tsize += csize;
- if (csize > len)
+ if (csize >= len)
continue;
csize = snprintf(str, len, "C%s", compat);
diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
index 30c259f63239..86cdd27cdd3b 100644
--- a/drivers/pci/controller/dwc/pci-imx6.c
+++ b/drivers/pci/controller/dwc/pci-imx6.c
@@ -1112,11 +1112,10 @@ static int imx6_pcie_probe(struct platform_device *pdev)
dev_err(dev, "pcie_aux clock source missing or invalid\n");
return PTR_ERR(imx6_pcie->pcie_aux);
}
- /* fall through */
- case IMX7D:
if (dbi_base->start == IMX8MQ_PCIE2_BASE_ADDR)
imx6_pcie->controller_id = 1;
-
+ /* fall through */
+ case IMX7D:
imx6_pcie->pciephy_reset = devm_reset_control_get_exclusive(dev,
"pciephy");
if (IS_ERR(imx6_pcie->pciephy_reset)) {
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 32e34ade736c..1793e1084aeb 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -800,11 +800,9 @@ static resource_size_t calculate_iosize(resource_size_t size,
size = (size & 0xff) + ((size & ~0xffUL) << 2);
#endif
size = size + size1;
- if (size < old_size)
- size = old_size;
- size = ALIGN(max(size, add_size) + children_add_size, align);
- return size;
+ size = max(size, add_size) + children_add_size;
+ return ALIGN(max(size, old_size), align);
}
static resource_size_t calculate_memsize(resource_size_t size,
diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
index c94a0d2c4516..917e01af4769 100644
--- a/drivers/phy/phy-core.c
+++ b/drivers/phy/phy-core.c
@@ -360,13 +360,14 @@ EXPORT_SYMBOL_GPL(phy_power_off);
int phy_set_mode_ext(struct phy *phy, enum phy_mode mode, int submode)
{
- int ret;
+ int ret = 0;
- if (!phy || !phy->ops->set_mode)
+ if (!phy)
return 0;
mutex_lock(&phy->mutex);
- ret = phy->ops->set_mode(phy, mode, submode);
+ if (phy->ops->set_mode)
+ ret = phy->ops->set_mode(phy, mode, submode);
if (!ret)
phy->attrs.mode = mode;
mutex_unlock(&phy->mutex);
diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
index ddc41db1f65a..d28a313a3b13 100644
--- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c
+++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
@@ -427,8 +427,11 @@ static int rcar_gen3_phy_usb2_init(struct phy *p)
val = readl(usb2_base + USB2_INT_ENABLE);
val |= USB2_INT_ENABLE_UCOM_INTEN | rphy->int_enable_bits;
writel(val, usb2_base + USB2_INT_ENABLE);
- writel(USB2_SPD_RSM_TIMSET_INIT, usb2_base + USB2_SPD_RSM_TIMSET);
- writel(USB2_OC_TIMSET_INIT, usb2_base + USB2_OC_TIMSET);
+
+ if (!rcar_gen3_is_any_rphy_initialized(channel)) {
+ writel(USB2_SPD_RSM_TIMSET_INIT, usb2_base + USB2_SPD_RSM_TIMSET);
+ writel(USB2_OC_TIMSET_INIT, usb2_base + USB2_OC_TIMSET);
+ }
/* Initialize otg part */
if (channel->is_otg_channel) {
diff --git a/drivers/phy/tegra/xusb.c b/drivers/phy/tegra/xusb.c
index efe7abf459fd..6caceab9b382 100644
--- a/drivers/phy/tegra/xusb.c
+++ b/drivers/phy/tegra/xusb.c
@@ -526,16 +526,16 @@ static int tegra_xusb_port_init(struct tegra_xusb_port *port,
err = dev_set_name(&port->dev, "%s-%u", name, index);
if (err < 0)
- goto unregister;
+ goto put_device;
err = device_add(&port->dev);
if (err < 0)
- goto unregister;
+ goto put_device;
return 0;
-unregister:
- device_unregister(&port->dev);
+put_device:
+ put_device(&port->dev);
return err;
}
diff --git a/drivers/pinctrl/bcm/pinctrl-bcm281xx.c b/drivers/pinctrl/bcm/pinctrl-bcm281xx.c
index 3452005342ad..69e8d7856fff 100644
--- a/drivers/pinctrl/bcm/pinctrl-bcm281xx.c
+++ b/drivers/pinctrl/bcm/pinctrl-bcm281xx.c
@@ -79,7 +79,7 @@ static enum bcm281xx_pin_type hdmi_pin = BCM281XX_PIN_TYPE_HDMI;
struct bcm281xx_pin_function {
const char *name;
const char * const *groups;
- const unsigned ngroups;
+ const unsigned int ngroups;
};
/**
@@ -91,10 +91,10 @@ struct bcm281xx_pinctrl_data {
/* List of all pins */
const struct pinctrl_pin_desc *pins;
- const unsigned npins;
+ const unsigned int npins;
const struct bcm281xx_pin_function *functions;
- const unsigned nfunctions;
+ const unsigned int nfunctions;
struct regmap *regmap;
};
@@ -948,7 +948,7 @@ static struct bcm281xx_pinctrl_data bcm281xx_pinctrl = {
};
static inline enum bcm281xx_pin_type pin_type_get(struct pinctrl_dev *pctldev,
- unsigned pin)
+ unsigned int pin)
{
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
@@ -992,7 +992,7 @@ static int bcm281xx_pinctrl_get_groups_count(struct pinctrl_dev *pctldev)
}
static const char *bcm281xx_pinctrl_get_group_name(struct pinctrl_dev *pctldev,
- unsigned group)
+ unsigned int group)
{
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
@@ -1000,9 +1000,9 @@ static const char *bcm281xx_pinctrl_get_group_name(struct pinctrl_dev *pctldev,
}
static int bcm281xx_pinctrl_get_group_pins(struct pinctrl_dev *pctldev,
- unsigned group,
+ unsigned int group,
const unsigned **pins,
- unsigned *num_pins)
+ unsigned int *num_pins)
{
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
@@ -1014,7 +1014,7 @@ static int bcm281xx_pinctrl_get_group_pins(struct pinctrl_dev *pctldev,
static void bcm281xx_pinctrl_pin_dbg_show(struct pinctrl_dev *pctldev,
struct seq_file *s,
- unsigned offset)
+ unsigned int offset)
{
seq_printf(s, " %s", dev_name(pctldev->dev));
}
@@ -1036,7 +1036,7 @@ static int bcm281xx_pinctrl_get_fcns_count(struct pinctrl_dev *pctldev)
}
static const char *bcm281xx_pinctrl_get_fcn_name(struct pinctrl_dev *pctldev,
- unsigned function)
+ unsigned int function)
{
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
@@ -1044,9 +1044,9 @@ static const char *bcm281xx_pinctrl_get_fcn_name(struct pinctrl_dev *pctldev,
}
static int bcm281xx_pinctrl_get_fcn_groups(struct pinctrl_dev *pctldev,
- unsigned function,
+ unsigned int function,
const char * const **groups,
- unsigned * const num_groups)
+ unsigned int * const num_groups)
{
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
@@ -1057,8 +1057,8 @@ static int bcm281xx_pinctrl_get_fcn_groups(struct pinctrl_dev *pctldev,
}
static int bcm281xx_pinmux_set(struct pinctrl_dev *pctldev,
- unsigned function,
- unsigned group)
+ unsigned int function,
+ unsigned int group)
{
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
const struct bcm281xx_pin_function *f = &pdata->functions[function];
@@ -1089,7 +1089,7 @@ static const struct pinmux_ops bcm281xx_pinctrl_pinmux_ops = {
};
static int bcm281xx_pinctrl_pin_config_get(struct pinctrl_dev *pctldev,
- unsigned pin,
+ unsigned int pin,
unsigned long *config)
{
return -ENOTSUPP;
@@ -1098,9 +1098,9 @@ static int bcm281xx_pinctrl_pin_config_get(struct pinctrl_dev *pctldev,
/* Goes through the configs and update register val/mask */
static int bcm281xx_std_pin_update(struct pinctrl_dev *pctldev,
- unsigned pin,
+ unsigned int pin,
unsigned long *configs,
- unsigned num_configs,
+ unsigned int num_configs,
u32 *val,
u32 *mask)
{
@@ -1214,9 +1214,9 @@ static const u16 bcm281xx_pullup_map[] = {
/* Goes through the configs and update register val/mask */
static int bcm281xx_i2c_pin_update(struct pinctrl_dev *pctldev,
- unsigned pin,
+ unsigned int pin,
unsigned long *configs,
- unsigned num_configs,
+ unsigned int num_configs,
u32 *val,
u32 *mask)
{
@@ -1284,9 +1284,9 @@ static int bcm281xx_i2c_pin_update(struct pinctrl_dev *pctldev,
/* Goes through the configs and update register val/mask */
static int bcm281xx_hdmi_pin_update(struct pinctrl_dev *pctldev,
- unsigned pin,
+ unsigned int pin,
unsigned long *configs,
- unsigned num_configs,
+ unsigned int num_configs,
u32 *val,
u32 *mask)
{
@@ -1328,9 +1328,9 @@ static int bcm281xx_hdmi_pin_update(struct pinctrl_dev *pctldev,
}
static int bcm281xx_pinctrl_pin_config_set(struct pinctrl_dev *pctldev,
- unsigned pin,
+ unsigned int pin,
unsigned long *configs,
- unsigned num_configs)
+ unsigned int num_configs)
{
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
enum bcm281xx_pin_type pin_type;
diff --git a/drivers/pinctrl/devicetree.c b/drivers/pinctrl/devicetree.c
index 200357094e3b..e9bfb96a2e0e 100644
--- a/drivers/pinctrl/devicetree.c
+++ b/drivers/pinctrl/devicetree.c
@@ -141,10 +141,14 @@ static int dt_to_map_one_config(struct pinctrl *p,
pctldev = get_pinctrl_dev_from_of_node(np_pctldev);
if (pctldev)
break;
- /* Do not defer probing of hogs (circular loop) */
+ /*
+ * Do not defer probing of hogs (circular loop)
+ *
+ * Return 1 to let the caller catch the case.
+ */
if (np_pctldev == p->dev->of_node) {
of_node_put(np_pctldev);
- return -ENODEV;
+ return 1;
}
}
of_node_put(np_pctldev);
@@ -268,6 +272,8 @@ int pinctrl_dt_to_map(struct pinctrl *p, struct pinctrl_dev *pctldev)
ret = dt_to_map_one_config(p, pctldev, statename,
np_config);
of_node_put(np_config);
+ if (ret == 1)
+ continue;
if (ret < 0)
goto err;
}
diff --git a/drivers/pinctrl/meson/pinctrl-meson.c b/drivers/pinctrl/meson/pinctrl-meson.c
index aba479a1150c..f3b381370e5e 100644
--- a/drivers/pinctrl/meson/pinctrl-meson.c
+++ b/drivers/pinctrl/meson/pinctrl-meson.c
@@ -480,7 +480,7 @@ static int meson_pinconf_get(struct pinctrl_dev *pcdev, unsigned int pin,
case PIN_CONFIG_BIAS_PULL_DOWN:
case PIN_CONFIG_BIAS_PULL_UP:
if (meson_pinconf_get_pull(pc, pin) == param)
- arg = 1;
+ arg = 60000;
else
return -EINVAL;
break;
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index 761cab698c75..9e8be6c52e3d 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -2458,7 +2458,8 @@ static int asus_wmi_add(struct platform_device *pdev)
goto fail_leds;
asus_wmi_get_devstate(asus, ASUS_WMI_DEVID_WLAN, &result);
- if (result & (ASUS_WMI_DSTS_PRESENCE_BIT | ASUS_WMI_DSTS_USER_BIT))
+ if ((result & (ASUS_WMI_DSTS_PRESENCE_BIT | ASUS_WMI_DSTS_USER_BIT)) ==
+ (ASUS_WMI_DSTS_PRESENCE_BIT | ASUS_WMI_DSTS_USER_BIT))
asus->driver->wlan_ctrl_by_user = 1;
if (!(asus->driver->wlan_ctrl_by_user && ashs_present())) {
diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
index 80929380ec7e..04ccfdd99e27 100644
--- a/drivers/platform/x86/fujitsu-laptop.c
+++ b/drivers/platform/x86/fujitsu-laptop.c
@@ -17,13 +17,13 @@
/*
* fujitsu-laptop.c - Fujitsu laptop support, providing access to additional
* features made available on a range of Fujitsu laptops including the
- * P2xxx/P5xxx/S6xxx/S7xxx series.
+ * P2xxx/P5xxx/S2xxx/S6xxx/S7xxx series.
*
* This driver implements a vendor-specific backlight control interface for
* Fujitsu laptops and provides support for hotkeys present on certain Fujitsu
* laptops.
*
- * This driver has been tested on a Fujitsu Lifebook S6410, S7020 and
+ * This driver has been tested on a Fujitsu Lifebook S2110, S6410, S7020 and
* P8010. It should work on most P-series and S-series Lifebooks, but
* YMMV.
*
@@ -102,7 +102,11 @@
#define KEY2_CODE 0x411
#define KEY3_CODE 0x412
#define KEY4_CODE 0x413
-#define KEY5_CODE 0x420
+#define KEY5_CODE 0x414
+#define KEY6_CODE 0x415
+#define KEY7_CODE 0x416
+#define KEY8_CODE 0x417
+#define KEY9_CODE 0x420
/* Hotkey ringbuffer limits */
#define MAX_HOTKEY_RINGBUFFER_SIZE 100
@@ -450,7 +454,7 @@ static const struct key_entry keymap_default[] = {
{ KE_KEY, KEY2_CODE, { KEY_PROG2 } },
{ KE_KEY, KEY3_CODE, { KEY_PROG3 } },
{ KE_KEY, KEY4_CODE, { KEY_PROG4 } },
- { KE_KEY, KEY5_CODE, { KEY_RFKILL } },
+ { KE_KEY, KEY9_CODE, { KEY_RFKILL } },
/* Soft keys read from status flags */
{ KE_KEY, FLAG_RFKILL, { KEY_RFKILL } },
{ KE_KEY, FLAG_TOUCHPAD_TOGGLE, { KEY_TOUCHPAD_TOGGLE } },
@@ -474,6 +478,18 @@ static const struct key_entry keymap_p8010[] = {
{ KE_END, 0 }
};
+static const struct key_entry keymap_s2110[] = {
+ { KE_KEY, KEY1_CODE, { KEY_PROG1 } }, /* "A" */
+ { KE_KEY, KEY2_CODE, { KEY_PROG2 } }, /* "B" */
+ { KE_KEY, KEY3_CODE, { KEY_WWW } }, /* "Internet" */
+ { KE_KEY, KEY4_CODE, { KEY_EMAIL } }, /* "E-mail" */
+ { KE_KEY, KEY5_CODE, { KEY_STOPCD } },
+ { KE_KEY, KEY6_CODE, { KEY_PLAYPAUSE } },
+ { KE_KEY, KEY7_CODE, { KEY_PREVIOUSSONG } },
+ { KE_KEY, KEY8_CODE, { KEY_NEXTSONG } },
+ { KE_END, 0 }
+};
+
static const struct key_entry *keymap = keymap_default;
static int fujitsu_laptop_dmi_keymap_override(const struct dmi_system_id *id)
@@ -511,6 +527,15 @@ static const struct dmi_system_id fujitsu_laptop_dmi_table[] = {
},
.driver_data = (void *)keymap_p8010
},
+ {
+ .callback = fujitsu_laptop_dmi_keymap_override,
+ .ident = "Fujitsu LifeBook S2110",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK S2110"),
+ },
+ .driver_data = (void *)keymap_s2110
+ },
{}
};
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index fbb9a5c7f8b8..9eb74d9e1519 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -195,6 +195,7 @@ enum tpacpi_hkey_event_t {
/* Thermal events */
TP_HKEY_EV_ALARM_BAT_HOT = 0x6011, /* battery too hot */
TP_HKEY_EV_ALARM_BAT_XHOT = 0x6012, /* battery critically hot */
+ TP_HKEY_EV_ALARM_BAT_LIM_CHANGE = 0x6013, /* battery charge limit changed*/
TP_HKEY_EV_ALARM_SENSOR_HOT = 0x6021, /* sensor too hot */
TP_HKEY_EV_ALARM_SENSOR_XHOT = 0x6022, /* sensor critically hot */
TP_HKEY_EV_THM_TABLE_CHANGED = 0x6030, /* windows; thermal table changed */
@@ -4059,6 +4060,10 @@ static bool hotkey_notify_6xxx(const u32 hkey,
pr_alert("THERMAL EMERGENCY: battery is extremely hot!\n");
/* recommended action: immediate sleep/hibernate */
break;
+ case TP_HKEY_EV_ALARM_BAT_LIM_CHANGE:
+ pr_debug("Battery Info: battery charge threshold changed\n");
+ /* User changed charging threshold. No action needed */
+ return true;
case TP_HKEY_EV_ALARM_SENSOR_HOT:
pr_crit("THERMAL ALARM: a sensor reports something is too hot!\n");
/* recommended action: warn user through gui, that */
@@ -10112,6 +10117,8 @@ static int __must_check __init get_thinkpad_model_data(
tp->vendor = PCI_VENDOR_ID_IBM;
else if (dmi_name_in_vendors("LENOVO"))
tp->vendor = PCI_VENDOR_ID_LENOVO;
+ else if (dmi_name_in_vendors("NEC"))
+ tp->vendor = PCI_VENDOR_ID_LENOVO;
else
return 0;
diff --git a/drivers/regulator/ad5398.c b/drivers/regulator/ad5398.c
index 75f432f61e91..f4d6e62bd963 100644
--- a/drivers/regulator/ad5398.c
+++ b/drivers/regulator/ad5398.c
@@ -14,6 +14,7 @@
#include <linux/platform_device.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>
+#include <linux/regulator/of_regulator.h>
#define AD5398_CURRENT_EN_MASK 0x8000
@@ -221,15 +222,20 @@ static int ad5398_probe(struct i2c_client *client,
const struct ad5398_current_data_format *df =
(struct ad5398_current_data_format *)id->driver_data;
- if (!init_data)
- return -EINVAL;
-
chip = devm_kzalloc(&client->dev, sizeof(*chip), GFP_KERNEL);
if (!chip)
return -ENOMEM;
config.dev = &client->dev;
+ if (client->dev.of_node)
+ init_data = of_get_regulator_init_data(&client->dev,
+ client->dev.of_node,
+ &ad5398_reg);
+ if (!init_data)
+ return -EINVAL;
+
config.init_data = init_data;
+ config.of_node = client->dev.of_node;
config.driver_data = chip;
chip->client = client;
diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c
index 99b93f56a2d5..40532a36ae67 100644
--- a/drivers/rtc/rtc-ds1307.c
+++ b/drivers/rtc/rtc-ds1307.c
@@ -1680,10 +1680,8 @@ static int ds1307_probe(struct i2c_client *client,
* For some variants, be sure alarms can trigger when we're
* running on Vbackup (BBSQI/BBSQW)
*/
- if (want_irq || ds1307_can_wakeup_device) {
+ if (want_irq || ds1307_can_wakeup_device)
regs[0] |= DS1337_BIT_INTCN | chip->bbsqi_bit;
- regs[0] &= ~(DS1337_BIT_A2IE | DS1337_BIT_A1IE);
- }
regmap_write(ds1307->regmap, DS1337_REG_CONTROL,
regs[0]);
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
index 0abce779fbb1..3238222b89fa 100644
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
@@ -5357,6 +5357,7 @@ static struct lpfc_nodelist *
__lpfc_findnode_did(struct lpfc_vport *vport, uint32_t did)
{
struct lpfc_nodelist *ndlp;
+ struct lpfc_nodelist *np = NULL;
uint32_t data1;
list_for_each_entry(ndlp, &vport->fc_nodes, nlp_listp) {
@@ -5371,14 +5372,20 @@ __lpfc_findnode_did(struct lpfc_vport *vport, uint32_t did)
ndlp, ndlp->nlp_DID,
ndlp->nlp_flag, data1, ndlp->nlp_rpi,
ndlp->active_rrqs_xri_bitmap);
- return ndlp;
+
+ /* Check for new or potentially stale node */
+ if (ndlp->nlp_state != NLP_STE_UNUSED_NODE)
+ return ndlp;
+ np = ndlp;
}
}
- /* FIND node did <did> NOT FOUND */
- lpfc_printf_vlog(vport, KERN_INFO, LOG_NODE,
- "0932 FIND node did x%x NOT FOUND.\n", did);
- return NULL;
+ if (!np)
+ /* FIND node did <did> NOT FOUND */
+ lpfc_printf_vlog(vport, KERN_INFO, LOG_NODE,
+ "0932 FIND node did x%x NOT FOUND.\n", did);
+
+ return np;
}
struct lpfc_nodelist *
diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
index 1c5c172315de..377e941d93e3 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_ctl.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
@@ -662,6 +662,7 @@ _ctl_do_mpt_command(struct MPT3SAS_ADAPTER *ioc, struct mpt3_ioctl_command karg,
size_t data_in_sz = 0;
long ret;
u16 device_handle = MPT3SAS_INVALID_DEVICE_HANDLE;
+ int tm_ret;
issue_reset = 0;
@@ -1094,16 +1095,23 @@ _ctl_do_mpt_command(struct MPT3SAS_ADAPTER *ioc, struct mpt3_ioctl_command karg,
if (pcie_device && (!ioc->tm_custom_handling) &&
(!(mpt3sas_scsih_is_pcie_scsi_device(
pcie_device->device_info))))
- mpt3sas_scsih_issue_locked_tm(ioc,
+ tm_ret = mpt3sas_scsih_issue_locked_tm(ioc,
le16_to_cpu(mpi_request->FunctionDependent1),
0, MPI2_SCSITASKMGMT_TASKTYPE_TARGET_RESET, 0,
0, pcie_device->reset_timeout,
MPI26_SCSITASKMGMT_MSGFLAGS_PROTOCOL_LVL_RST_PCIE);
else
- mpt3sas_scsih_issue_locked_tm(ioc,
+ tm_ret = mpt3sas_scsih_issue_locked_tm(ioc,
le16_to_cpu(mpi_request->FunctionDependent1),
0, MPI2_SCSITASKMGMT_TASKTYPE_TARGET_RESET, 0,
0, 30, MPI2_SCSITASKMGMT_MSGFLAGS_LINK_RESET);
+
+ if (tm_ret != SUCCESS) {
+ ioc_info(ioc,
+ "target reset failed, issue hard reset: handle (0x%04x)\n",
+ le16_to_cpu(mpi_request->FunctionDependent1));
+ mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER);
+ }
} else
mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER);
}
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index 2b5e3e2ba3b8..d4aef346bfee 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -949,7 +949,6 @@ static void reset_state(struct scsi_tape *STp)
STp->partition = find_partition(STp);
if (STp->partition < 0)
STp->partition = 0;
- STp->new_partition = STp->partition;
}
}
@@ -2889,7 +2888,6 @@ static int st_int_ioctl(struct scsi_tape *STp, unsigned int cmd_in, unsigned lon
timeout = STp->long_timeout * 8;
DEBC_printk(STp, "Erasing tape.\n");
- fileno = blkno = at_sm = 0;
break;
case MTSETBLK: /* Set block length */
case MTSETDENSITY: /* Set tape density */
@@ -2922,14 +2920,17 @@ static int st_int_ioctl(struct scsi_tape *STp, unsigned int cmd_in, unsigned lon
if (cmd_in == MTSETDENSITY) {
(STp->buffer)->b_data[4] = arg;
STp->density_changed = 1; /* At least we tried ;-) */
+ STp->changed_density = arg;
} else if (cmd_in == SET_DENS_AND_BLK)
(STp->buffer)->b_data[4] = arg >> 24;
else
(STp->buffer)->b_data[4] = STp->density;
if (cmd_in == MTSETBLK || cmd_in == SET_DENS_AND_BLK) {
ltmp = arg & MT_ST_BLKSIZE_MASK;
- if (cmd_in == MTSETBLK)
+ if (cmd_in == MTSETBLK) {
STp->blksize_changed = 1; /* At least we tried ;-) */
+ STp->changed_blksize = arg;
+ }
} else
ltmp = STp->block_size;
(STp->buffer)->b_data[9] = (ltmp >> 16);
@@ -3076,7 +3077,9 @@ static int st_int_ioctl(struct scsi_tape *STp, unsigned int cmd_in, unsigned lon
cmd_in == MTSETDRVBUFFER ||
cmd_in == SET_DENS_AND_BLK) {
if (cmdstatp->sense_hdr.sense_key == ILLEGAL_REQUEST &&
- !(STp->use_pf & PF_TESTED)) {
+ cmdstatp->sense_hdr.asc == 0x24 &&
+ (STp->device)->scsi_level <= SCSI_2 &&
+ !(STp->use_pf & PF_TESTED)) {
/* Try the other possible state of Page Format if not
already tried */
STp->use_pf = (STp->use_pf ^ USE_PF) | PF_TESTED;
@@ -3628,9 +3631,25 @@ static long st_ioctl(struct file *file, unsigned int cmd_in, unsigned long arg)
retval = (-EIO);
goto out;
}
- reset_state(STp);
+ reset_state(STp); /* Clears pos_unknown */
/* remove this when the midlevel properly clears was_reset */
STp->device->was_reset = 0;
+
+ /* Fix the device settings after reset, ignore errors */
+ if (mtc.mt_op == MTREW || mtc.mt_op == MTSEEK ||
+ mtc.mt_op == MTEOM) {
+ if (STp->can_partitions) {
+ /* STp->new_partition contains the
+ * latest partition set
+ */
+ STp->partition = 0;
+ switch_partition(STp);
+ }
+ if (STp->density_changed)
+ st_int_ioctl(STp, MTSETDENSITY, STp->changed_density);
+ if (STp->blksize_changed)
+ st_int_ioctl(STp, MTSETBLK, STp->changed_blksize);
+ }
}
if (mtc.mt_op != MTNOP && mtc.mt_op != MTSETBLK &&
diff --git a/drivers/scsi/st.h b/drivers/scsi/st.h
index 95d2e7a7988d..c9947abb0a45 100644
--- a/drivers/scsi/st.h
+++ b/drivers/scsi/st.h
@@ -168,12 +168,14 @@ struct scsi_tape {
unsigned char compression_changed;
unsigned char drv_buffer;
unsigned char density;
+ unsigned char changed_density;
unsigned char door_locked;
unsigned char autorew_dev; /* auto-rewind device */
unsigned char rew_at_close; /* rewind necessary at close */
unsigned char inited;
unsigned char cleaning_req; /* cleaning requested? */
int block_size;
+ int changed_blksize;
int min_block;
int max_block;
int recover_count; /* From tape opening */
diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c
index 351b2989db07..1d94fc89602f 100644
--- a/drivers/spi/spi-fsl-dspi.c
+++ b/drivers/spi/spi-fsl-dspi.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0+
//
// Copyright 2013 Freescale Semiconductor, Inc.
-// Copyright 2020 NXP
+// Copyright 2020-2025 NXP
//
// Freescale DSPI driver
// This file contains a driver for the Freescale DSPI
@@ -946,6 +946,20 @@ static int dspi_resume(struct device *dev)
static SIMPLE_DEV_PM_OPS(dspi_pm, dspi_suspend, dspi_resume);
+static const struct regmap_range dspi_yes_ranges[] = {
+ regmap_reg_range(SPI_MCR, SPI_MCR),
+ regmap_reg_range(SPI_TCR, SPI_CTAR(3)),
+ regmap_reg_range(SPI_SR, SPI_TXFR3),
+ regmap_reg_range(SPI_RXFR0, SPI_RXFR3),
+ regmap_reg_range(SPI_CTARE(0), SPI_CTARE(3)),
+ regmap_reg_range(SPI_SREX, SPI_SREX),
+};
+
+static const struct regmap_access_table dspi_access_table = {
+ .yes_ranges = dspi_yes_ranges,
+ .n_yes_ranges = ARRAY_SIZE(dspi_yes_ranges),
+};
+
static const struct regmap_range dspi_volatile_ranges[] = {
regmap_reg_range(SPI_MCR, SPI_TCR),
regmap_reg_range(SPI_SR, SPI_SR),
@@ -963,6 +977,8 @@ static const struct regmap_config dspi_regmap_config = {
.reg_stride = 4,
.max_register = 0x88,
.volatile_table = &dspi_volatile_table,
+ .rd_table = &dspi_access_table,
+ .wr_table = &dspi_access_table,
};
static const struct regmap_range dspi_xspi_volatile_ranges[] = {
@@ -984,6 +1000,8 @@ static const struct regmap_config dspi_xspi_regmap_config[] = {
.reg_stride = 4,
.max_register = 0x13c,
.volatile_table = &dspi_xspi_volatile_table,
+ .rd_table = &dspi_access_table,
+ .wr_table = &dspi_access_table,
},
{
.name = "pushr",
diff --git a/drivers/spi/spi-loopback-test.c b/drivers/spi/spi-loopback-test.c
index 69a9df2cbbcf..0f571ff13237 100644
--- a/drivers/spi/spi-loopback-test.c
+++ b/drivers/spi/spi-loopback-test.c
@@ -377,7 +377,7 @@ MODULE_LICENSE("GPL");
static void spi_test_print_hex_dump(char *pre, const void *ptr, size_t len)
{
/* limit the hex_dump */
- if (len < 1024) {
+ if (len <= 1024) {
print_hex_dump(KERN_INFO, pre,
DUMP_PREFIX_OFFSET, 16, 1,
ptr, len, 0);
diff --git a/drivers/spi/spi-sun4i.c b/drivers/spi/spi-sun4i.c
index cbfac6596fad..2bdac65789b6 100644
--- a/drivers/spi/spi-sun4i.c
+++ b/drivers/spi/spi-sun4i.c
@@ -263,6 +263,9 @@ static int sun4i_spi_transfer_one(struct spi_master *master,
else
reg |= SUN4I_CTL_DHB;
+ /* Now that the settings are correct, enable the interface */
+ reg |= SUN4I_CTL_ENABLE;
+
sun4i_spi_write(sspi, SUN4I_CTL_REG, reg);
/* Ensure that we have a parent clock fast enough */
@@ -403,7 +406,7 @@ static int sun4i_spi_runtime_resume(struct device *dev)
}
sun4i_spi_write(sspi, SUN4I_CTL_REG,
- SUN4I_CTL_ENABLE | SUN4I_CTL_MASTER | SUN4I_CTL_TP);
+ SUN4I_CTL_MASTER | SUN4I_CTL_TP);
return 0;
diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-fifo/axis-fifo.c
index 805437fa249a..4dd2c8e9b787 100644
--- a/drivers/staging/axis-fifo/axis-fifo.c
+++ b/drivers/staging/axis-fifo/axis-fifo.c
@@ -16,7 +16,7 @@
#include <linux/kernel.h>
#include <linux/wait.h>
-#include <linux/spinlock_types.h>
+#include <linux/mutex.h>
#include <linux/device.h>
#include <linux/cdev.h>
#include <linux/init.h>
@@ -134,9 +134,9 @@ struct axis_fifo {
int has_tx_fifo; /* whether the IP has the tx fifo enabled */
wait_queue_head_t read_queue; /* wait queue for asynchronos read */
- spinlock_t read_queue_lock; /* lock for reading waitqueue */
+ struct mutex read_lock; /* lock for reading */
wait_queue_head_t write_queue; /* wait queue for asynchronos write */
- spinlock_t write_queue_lock; /* lock for writing waitqueue */
+ struct mutex write_lock; /* lock for writing */
unsigned int write_flags; /* write file flags */
unsigned int read_flags; /* read file flags */
@@ -337,7 +337,21 @@ static void reset_ip_core(struct axis_fifo *fifo)
iowrite32(XLLF_INT_ALL_MASK, fifo->base_addr + XLLF_ISR_OFFSET);
}
-/* reads a single packet from the fifo as dictated by the tlast signal */
+/**
+ * axis_fifo_write() - Read a packet from AXIS-FIFO character device.
+ * @f Open file.
+ * @buf User space buffer to read to.
+ * @len User space buffer length.
+ * @off Buffer offset.
+ *
+ * As defined by the device's documentation, we need to check the device's
+ * occupancy before reading the length register and then the data. All these
+ * operations must be executed atomically, in order and one after the other
+ * without missing any.
+ *
+ * Returns the number of bytes read from the device or negative error code
+ * on failure.
+ */
static ssize_t axis_fifo_read(struct file *f, char __user *buf,
size_t len, loff_t *off)
{
@@ -351,60 +365,61 @@ static ssize_t axis_fifo_read(struct file *f, char __user *buf,
u32 tmp_buf[READ_BUF_SIZE];
if (fifo->read_flags & O_NONBLOCK) {
- /* opened in non-blocking mode
- * return if there are no packets available
+ /*
+ * Device opened in non-blocking mode. Try to lock it and then
+ * check if any packet is available.
*/
- if (!ioread32(fifo->base_addr + XLLF_RDFO_OFFSET))
+ if (!mutex_trylock(&fifo->read_lock))
return -EAGAIN;
+
+ if (!ioread32(fifo->base_addr + XLLF_RDFO_OFFSET)) {
+ ret = -EAGAIN;
+ goto end_unlock;
+ }
} else {
/* opened in blocking mode
* wait for a packet available interrupt (or timeout)
* if nothing is currently available
*/
- spin_lock_irq(&fifo->read_queue_lock);
- ret = wait_event_interruptible_lock_irq_timeout
- (fifo->read_queue,
- ioread32(fifo->base_addr + XLLF_RDFO_OFFSET),
- fifo->read_queue_lock,
- (read_timeout >= 0) ? msecs_to_jiffies(read_timeout) :
+ mutex_lock(&fifo->read_lock);
+ ret = wait_event_interruptible_timeout(fifo->read_queue,
+ ioread32(fifo->base_addr + XLLF_RDFO_OFFSET),
+ (read_timeout >= 0) ? msecs_to_jiffies(read_timeout) :
MAX_SCHEDULE_TIMEOUT);
- spin_unlock_irq(&fifo->read_queue_lock);
- if (ret == 0) {
- /* timeout occurred */
- dev_dbg(fifo->dt_device, "read timeout");
- return -EAGAIN;
- } else if (ret == -ERESTARTSYS) {
- /* signal received */
- return -ERESTARTSYS;
- } else if (ret < 0) {
- dev_err(fifo->dt_device, "wait_event_interruptible_timeout() error in read (ret=%i)\n",
- ret);
- return ret;
+ if (ret <= 0) {
+ if (ret == 0) {
+ ret = -EAGAIN;
+ } else if (ret != -ERESTARTSYS) {
+ dev_err(fifo->dt_device, "wait_event_interruptible_timeout() error in read (ret=%i)\n",
+ ret);
+ }
+
+ goto end_unlock;
}
}
bytes_available = ioread32(fifo->base_addr + XLLF_RLR_OFFSET);
if (!bytes_available) {
- dev_err(fifo->dt_device, "received a packet of length 0 - fifo core will be reset\n");
- reset_ip_core(fifo);
- return -EIO;
+ dev_err(fifo->dt_device, "received a packet of length 0\n");
+ ret = -EIO;
+ goto end_unlock;
}
if (bytes_available > len) {
- dev_err(fifo->dt_device, "user read buffer too small (available bytes=%zu user buffer bytes=%zu) - fifo core will be reset\n",
+ dev_err(fifo->dt_device, "user read buffer too small (available bytes=%zu user buffer bytes=%zu)\n",
bytes_available, len);
- reset_ip_core(fifo);
- return -EINVAL;
+ ret = -EINVAL;
+ goto end_unlock;
}
if (bytes_available % sizeof(u32)) {
/* this probably can't happen unless IP
* registers were previously mishandled
*/
- dev_err(fifo->dt_device, "received a packet that isn't word-aligned - fifo core will be reset\n");
- reset_ip_core(fifo);
- return -EIO;
+ dev_err(fifo->dt_device, "received a packet that isn't word-aligned\n");
+ ret = -EIO;
+ goto end_unlock;
}
words_available = bytes_available / sizeof(u32);
@@ -423,17 +438,37 @@ static ssize_t axis_fifo_read(struct file *f, char __user *buf,
if (copy_to_user(buf + copied * sizeof(u32), tmp_buf,
copy * sizeof(u32))) {
- reset_ip_core(fifo);
- return -EFAULT;
+ ret = -EFAULT;
+ goto end_unlock;
}
copied += copy;
words_available -= copy;
}
- return bytes_available;
+ ret = bytes_available;
+
+end_unlock:
+ mutex_unlock(&fifo->read_lock);
+
+ return ret;
}
+/**
+ * axis_fifo_write() - Write buffer to AXIS-FIFO character device.
+ * @f Open file.
+ * @buf User space buffer to write to the device.
+ * @len User space buffer length.
+ * @off Buffer offset.
+ *
+ * As defined by the device's documentation, we need to write to the device's
+ * data buffer then to the device's packet length register atomically. Also,
+ * we need to lock before checking if the device has available space to avoid
+ * any concurrency issue.
+ *
+ * Returns the number of bytes written to the device or negative error code
+ * on failure.
+ */
static ssize_t axis_fifo_write(struct file *f, const char __user *buf,
size_t len, loff_t *off)
{
@@ -466,12 +501,17 @@ static ssize_t axis_fifo_write(struct file *f, const char __user *buf,
}
if (fifo->write_flags & O_NONBLOCK) {
- /* opened in non-blocking mode
- * return if there is not enough room available in the fifo
+ /*
+ * Device opened in non-blocking mode. Try to lock it and then
+ * check if there is any room to write the given buffer.
*/
+ if (!mutex_trylock(&fifo->write_lock))
+ return -EAGAIN;
+
if (words_to_write > ioread32(fifo->base_addr +
XLLF_TDFV_OFFSET)) {
- return -EAGAIN;
+ ret = -EAGAIN;
+ goto end_unlock;
}
} else {
/* opened in blocking mode */
@@ -479,30 +519,22 @@ static ssize_t axis_fifo_write(struct file *f, const char __user *buf,
/* wait for an interrupt (or timeout) if there isn't
* currently enough room in the fifo
*/
- spin_lock_irq(&fifo->write_queue_lock);
- ret = wait_event_interruptible_lock_irq_timeout
- (fifo->write_queue,
- ioread32(fifo->base_addr + XLLF_TDFV_OFFSET)
+ mutex_lock(&fifo->write_lock);
+ ret = wait_event_interruptible_timeout(fifo->write_queue,
+ ioread32(fifo->base_addr + XLLF_TDFV_OFFSET)
>= words_to_write,
- fifo->write_queue_lock,
- (write_timeout >= 0) ?
- msecs_to_jiffies(write_timeout) :
+ (write_timeout >= 0) ? msecs_to_jiffies(write_timeout) :
MAX_SCHEDULE_TIMEOUT);
- spin_unlock_irq(&fifo->write_queue_lock);
- if (ret == 0) {
- /* timeout occurred */
- dev_dbg(fifo->dt_device, "write timeout\n");
- return -EAGAIN;
- } else if (ret == -ERESTARTSYS) {
- /* signal received */
- return -ERESTARTSYS;
- } else if (ret < 0) {
- /* unknown error */
- dev_err(fifo->dt_device,
- "wait_event_interruptible_timeout() error in write (ret=%i)\n",
- ret);
- return ret;
+ if (ret <= 0) {
+ if (ret == 0) {
+ ret = -EAGAIN;
+ } else if (ret != -ERESTARTSYS) {
+ dev_err(fifo->dt_device, "wait_event_interruptible_timeout() error in write (ret=%i)\n",
+ ret);
+ }
+
+ goto end_unlock;
}
}
@@ -515,8 +547,8 @@ static ssize_t axis_fifo_write(struct file *f, const char __user *buf,
if (copy_from_user(tmp_buf, buf + copied * sizeof(u32),
copy * sizeof(u32))) {
- reset_ip_core(fifo);
- return -EFAULT;
+ ret = -EFAULT;
+ goto end_unlock;
}
for (i = 0; i < copy; i++)
@@ -527,10 +559,15 @@ static ssize_t axis_fifo_write(struct file *f, const char __user *buf,
words_to_write -= copy;
}
+ ret = copied * sizeof(u32);
+
/* write packet size to fifo */
- iowrite32(copied * sizeof(u32), fifo->base_addr + XLLF_TLR_OFFSET);
+ iowrite32(ret, fifo->base_addr + XLLF_TLR_OFFSET);
- return (ssize_t)copied * sizeof(u32);
+end_unlock:
+ mutex_unlock(&fifo->write_lock);
+
+ return ret;
}
static irqreturn_t axis_fifo_irq(int irq, void *dw)
@@ -701,6 +738,65 @@ static int get_dts_property(struct axis_fifo *fifo,
return 0;
}
+static int axis_fifo_parse_dt(struct axis_fifo *fifo)
+{
+ int ret;
+ unsigned int value;
+
+ ret = get_dts_property(fifo, "xlnx,axi-str-rxd-tdata-width", &value);
+ if (ret) {
+ dev_err(fifo->dt_device, "missing xlnx,axi-str-rxd-tdata-width property\n");
+ goto end;
+ } else if (value != 32) {
+ dev_err(fifo->dt_device, "xlnx,axi-str-rxd-tdata-width only supports 32 bits\n");
+ ret = -EIO;
+ goto end;
+ }
+
+ ret = get_dts_property(fifo, "xlnx,axi-str-txd-tdata-width", &value);
+ if (ret) {
+ dev_err(fifo->dt_device, "missing xlnx,axi-str-txd-tdata-width property\n");
+ goto end;
+ } else if (value != 32) {
+ dev_err(fifo->dt_device, "xlnx,axi-str-txd-tdata-width only supports 32 bits\n");
+ ret = -EIO;
+ goto end;
+ }
+
+ ret = get_dts_property(fifo, "xlnx,rx-fifo-depth",
+ &fifo->rx_fifo_depth);
+ if (ret) {
+ dev_err(fifo->dt_device, "missing xlnx,rx-fifo-depth property\n");
+ ret = -EIO;
+ goto end;
+ }
+
+ ret = get_dts_property(fifo, "xlnx,tx-fifo-depth",
+ &fifo->tx_fifo_depth);
+ if (ret) {
+ dev_err(fifo->dt_device, "missing xlnx,tx-fifo-depth property\n");
+ ret = -EIO;
+ goto end;
+ }
+
+ ret = get_dts_property(fifo, "xlnx,use-rx-data", &fifo->has_rx_fifo);
+ if (ret) {
+ dev_err(fifo->dt_device, "missing xlnx,use-rx-data property\n");
+ ret = -EIO;
+ goto end;
+ }
+
+ ret = get_dts_property(fifo, "xlnx,use-tx-data", &fifo->has_tx_fifo);
+ if (ret) {
+ dev_err(fifo->dt_device, "missing xlnx,use-tx-data property\n");
+ ret = -EIO;
+ goto end;
+ }
+
+end:
+ return ret;
+}
+
static int axis_fifo_probe(struct platform_device *pdev)
{
struct resource *r_irq; /* interrupt resources */
@@ -712,34 +808,6 @@ static int axis_fifo_probe(struct platform_device *pdev)
int rc = 0; /* error return value */
- /* IP properties from device tree */
- unsigned int rxd_tdata_width;
- unsigned int txc_tdata_width;
- unsigned int txd_tdata_width;
- unsigned int tdest_width;
- unsigned int tid_width;
- unsigned int tuser_width;
- unsigned int data_interface_type;
- unsigned int has_tdest;
- unsigned int has_tid;
- unsigned int has_tkeep;
- unsigned int has_tstrb;
- unsigned int has_tuser;
- unsigned int rx_fifo_depth;
- unsigned int rx_programmable_empty_threshold;
- unsigned int rx_programmable_full_threshold;
- unsigned int axi_id_width;
- unsigned int axi4_data_width;
- unsigned int select_xpm;
- unsigned int tx_fifo_depth;
- unsigned int tx_programmable_empty_threshold;
- unsigned int tx_programmable_full_threshold;
- unsigned int use_rx_cut_through;
- unsigned int use_rx_data;
- unsigned int use_tx_control;
- unsigned int use_tx_cut_through;
- unsigned int use_tx_data;
-
/* ----------------------------
* init wrapper device
* ----------------------------
@@ -756,8 +824,8 @@ static int axis_fifo_probe(struct platform_device *pdev)
init_waitqueue_head(&fifo->read_queue);
init_waitqueue_head(&fifo->write_queue);
- spin_lock_init(&fifo->read_queue_lock);
- spin_lock_init(&fifo->write_queue_lock);
+ mutex_init(&fifo->read_lock);
+ mutex_init(&fifo->write_lock);
/* ----------------------------
* init device memory space
@@ -806,164 +874,9 @@ static int axis_fifo_probe(struct platform_device *pdev)
* ----------------------------
*/
- /* retrieve device tree properties */
- rc = get_dts_property(fifo, "xlnx,axi-str-rxd-tdata-width",
- &rxd_tdata_width);
- if (rc)
- goto err_unmap;
- rc = get_dts_property(fifo, "xlnx,axi-str-txc-tdata-width",
- &txc_tdata_width);
- if (rc)
- goto err_unmap;
- rc = get_dts_property(fifo, "xlnx,axi-str-txd-tdata-width",
- &txd_tdata_width);
- if (rc)
- goto err_unmap;
- rc = get_dts_property(fifo, "xlnx,axis-tdest-width", &tdest_width);
- if (rc)
- goto err_unmap;
- rc = get_dts_property(fifo, "xlnx,axis-tid-width", &tid_width);
- if (rc)
- goto err_unmap;
- rc = get_dts_property(fifo, "xlnx,axis-tuser-width", &tuser_width);
- if (rc)
- goto err_unmap;
- rc = get_dts_property(fifo, "xlnx,data-interface-type",
- &data_interface_type);
- if (rc)
- goto err_unmap;
- rc = get_dts_property(fifo, "xlnx,has-axis-tdest", &has_tdest);
- if (rc)
- goto err_unmap;
- rc = get_dts_property(fifo, "xlnx,has-axis-tid", &has_tid);
- if (rc)
- goto err_unmap;
- rc = get_dts_property(fifo, "xlnx,has-axis-tkeep", &has_tkeep);
- if (rc)
- goto err_unmap;
- rc = get_dts_property(fifo, "xlnx,has-axis-tstrb", &has_tstrb);
- if (rc)
- goto err_unmap;
- rc = get_dts_property(fifo, "xlnx,has-axis-tuser", &has_tuser);
- if (rc)
- goto err_unmap;
- rc = get_dts_property(fifo, "xlnx,rx-fifo-depth", &rx_fifo_depth);
+ rc = axis_fifo_parse_dt(fifo);
if (rc)
goto err_unmap;
- rc = get_dts_property(fifo, "xlnx,rx-fifo-pe-threshold",
- &rx_programmable_empty_threshold);
- if (rc)
- goto err_unmap;
- rc = get_dts_property(fifo, "xlnx,rx-fifo-pf-threshold",
- &rx_programmable_full_threshold);
- if (rc)
- goto err_unmap;
- rc = get_dts_property(fifo, "xlnx,s-axi-id-width", &axi_id_width);
- if (rc)
- goto err_unmap;
- rc = get_dts_property(fifo, "xlnx,s-axi4-data-width", &axi4_data_width);
- if (rc)
- goto err_unmap;
- rc = get_dts_property(fifo, "xlnx,select-xpm", &select_xpm);
- if (rc)
- goto err_unmap;
- rc = get_dts_property(fifo, "xlnx,tx-fifo-depth", &tx_fifo_depth);
- if (rc)
- goto err_unmap;
- rc = get_dts_property(fifo, "xlnx,tx-fifo-pe-threshold",
- &tx_programmable_empty_threshold);
- if (rc)
- goto err_unmap;
- rc = get_dts_property(fifo, "xlnx,tx-fifo-pf-threshold",
- &tx_programmable_full_threshold);
- if (rc)
- goto err_unmap;
- rc = get_dts_property(fifo, "xlnx,use-rx-cut-through",
- &use_rx_cut_through);
- if (rc)
- goto err_unmap;
- rc = get_dts_property(fifo, "xlnx,use-rx-data", &use_rx_data);
- if (rc)
- goto err_unmap;
- rc = get_dts_property(fifo, "xlnx,use-tx-ctrl", &use_tx_control);
- if (rc)
- goto err_unmap;
- rc = get_dts_property(fifo, "xlnx,use-tx-cut-through",
- &use_tx_cut_through);
- if (rc)
- goto err_unmap;
- rc = get_dts_property(fifo, "xlnx,use-tx-data", &use_tx_data);
- if (rc)
- goto err_unmap;
-
- /* check validity of device tree properties */
- if (rxd_tdata_width != 32) {
- dev_err(fifo->dt_device,
- "rxd_tdata_width width [%u] unsupported\n",
- rxd_tdata_width);
- rc = -EIO;
- goto err_unmap;
- }
- if (txd_tdata_width != 32) {
- dev_err(fifo->dt_device,
- "txd_tdata_width width [%u] unsupported\n",
- txd_tdata_width);
- rc = -EIO;
- goto err_unmap;
- }
- if (has_tdest) {
- dev_err(fifo->dt_device, "tdest not supported\n");
- rc = -EIO;
- goto err_unmap;
- }
- if (has_tid) {
- dev_err(fifo->dt_device, "tid not supported\n");
- rc = -EIO;
- goto err_unmap;
- }
- if (has_tkeep) {
- dev_err(fifo->dt_device, "tkeep not supported\n");
- rc = -EIO;
- goto err_unmap;
- }
- if (has_tstrb) {
- dev_err(fifo->dt_device, "tstrb not supported\n");
- rc = -EIO;
- goto err_unmap;
- }
- if (has_tuser) {
- dev_err(fifo->dt_device, "tuser not supported\n");
- rc = -EIO;
- goto err_unmap;
- }
- if (use_rx_cut_through) {
- dev_err(fifo->dt_device, "rx cut-through not supported\n");
- rc = -EIO;
- goto err_unmap;
- }
- if (use_tx_cut_through) {
- dev_err(fifo->dt_device, "tx cut-through not supported\n");
- rc = -EIO;
- goto err_unmap;
- }
- if (use_tx_control) {
- dev_err(fifo->dt_device, "tx control not supported\n");
- rc = -EIO;
- goto err_unmap;
- }
-
- /* TODO
- * these exist in the device tree but it's unclear what they do
- * - select-xpm
- * - data-interface-type
- */
-
- /* set device wrapper properties based on IP config */
- fifo->rx_fifo_depth = rx_fifo_depth;
- /* IP sets TDFV to fifo depth - 4 so we will do the same */
- fifo->tx_fifo_depth = tx_fifo_depth - 4;
- fifo->has_rx_fifo = use_rx_data;
- fifo->has_tx_fifo = use_tx_data;
reset_ip_core(fifo);
diff --git a/drivers/staging/axis-fifo/axis-fifo.txt b/drivers/staging/axis-fifo/axis-fifo.txt
index 85d88c010e72..5828e1b8e822 100644
--- a/drivers/staging/axis-fifo/axis-fifo.txt
+++ b/drivers/staging/axis-fifo/axis-fifo.txt
@@ -25,10 +25,10 @@ Required properties:
- xlnx,axi-str-txc-tdata-width: Should be <0x20>
- xlnx,axi-str-txd-protocol: Should be "XIL_AXI_STREAM_ETH_DATA"
- xlnx,axi-str-txd-tdata-width: Should be <0x20>
-- xlnx,axis-tdest-width: AXI-Stream TDEST width
-- xlnx,axis-tid-width: AXI-Stream TID width
-- xlnx,axis-tuser-width: AXI-Stream TUSER width
-- xlnx,data-interface-type: Should be <0x0>
+- xlnx,axis-tdest-width: AXI-Stream TDEST width (ignored by the driver)
+- xlnx,axis-tid-width: AXI-Stream TID width (ignored by the driver)
+- xlnx,axis-tuser-width: AXI-Stream TUSER width (ignored by the driver)
+- xlnx,data-interface-type: Should be <0x0> (ignored by the driver)
- xlnx,has-axis-tdest: Should be <0x0> (this feature isn't supported)
- xlnx,has-axis-tid: Should be <0x0> (this feature isn't supported)
- xlnx,has-axis-tkeep: Should be <0x0> (this feature isn't supported)
@@ -36,13 +36,17 @@ Required properties:
- xlnx,has-axis-tuser: Should be <0x0> (this feature isn't supported)
- xlnx,rx-fifo-depth: Depth of RX FIFO in words
- xlnx,rx-fifo-pe-threshold: RX programmable empty interrupt threshold
+ (ignored by the driver)
- xlnx,rx-fifo-pf-threshold: RX programmable full interrupt threshold
-- xlnx,s-axi-id-width: Should be <0x4>
-- xlnx,s-axi4-data-width: Should be <0x20>
-- xlnx,select-xpm: Should be <0x0>
+ (ignored by the driver)
+- xlnx,s-axi-id-width: Should be <0x4> (ignored by the driver)
+- xlnx,s-axi4-data-width: Should be <0x20> (ignored by the driver)
+- xlnx,select-xpm: Should be <0x0> (ignored by the driver)
- xlnx,tx-fifo-depth: Depth of TX FIFO in words
- xlnx,tx-fifo-pe-threshold: TX programmable empty interrupt threshold
+ (ignored by the driver)
- xlnx,tx-fifo-pf-threshold: TX programmable full interrupt threshold
+ (ignored by the driver)
- xlnx,use-rx-cut-through: Should be <0x0> (this feature isn't supported)
- xlnx,use-rx-data: <0x1> if RX FIFO is enabled, <0x0> otherwise
- xlnx,use-tx-ctrl: Should be <0x0> (this feature isn't supported)
diff --git a/drivers/staging/iio/adc/ad7816.c b/drivers/staging/iio/adc/ad7816.c
index a9985a7f8199..c1f583895070 100644
--- a/drivers/staging/iio/adc/ad7816.c
+++ b/drivers/staging/iio/adc/ad7816.c
@@ -136,7 +136,7 @@ static ssize_t ad7816_store_mode(struct device *dev,
struct iio_dev *indio_dev = dev_to_iio_dev(dev);
struct ad7816_chip_info *chip = iio_priv(indio_dev);
- if (strcmp(buf, "full")) {
+ if (strcmp(buf, "full") == 0) {
gpiod_set_value(chip->rdwr_pin, 1);
chip->mode = AD7816_FULL;
} else {
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
index ab2f0ceb1e23..b610c99c9c2d 100644
--- a/drivers/target/iscsi/iscsi_target.c
+++ b/drivers/target/iscsi/iscsi_target.c
@@ -4168,8 +4168,8 @@ int iscsit_close_connection(
spin_unlock(&iscsit_global->ts_bitmap_lock);
iscsit_stop_timers_for_cmds(conn);
- iscsit_stop_nopin_response_timer(conn);
iscsit_stop_nopin_timer(conn);
+ iscsit_stop_nopin_response_timer(conn);
if (conn->conn_transport->iscsit_wait_conn)
conn->conn_transport->iscsit_wait_conn(conn);
diff --git a/drivers/target/target_core_file.c b/drivers/target/target_core_file.c
index 18fbbe510d01..eb3eae8f799a 100644
--- a/drivers/target/target_core_file.c
+++ b/drivers/target/target_core_file.c
@@ -455,6 +455,9 @@ fd_execute_write_same(struct se_cmd *cmd)
return TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;
}
+ if (!cmd->t_data_nents)
+ return TCM_INVALID_CDB_FIELD;
+
if (cmd->t_data_nents > 1 ||
cmd->t_data_sg[0].length != cmd->se_dev->dev_attrib.block_size) {
pr_err("WRITE_SAME: Illegal SGL t_data_nents: %u length: %u"
diff --git a/drivers/target/target_core_iblock.c b/drivers/target/target_core_iblock.c
index 1c181d31f4c8..19cf5bdbb03d 100644
--- a/drivers/target/target_core_iblock.c
+++ b/drivers/target/target_core_iblock.c
@@ -458,6 +458,10 @@ iblock_execute_write_same(struct se_cmd *cmd)
" backends not supported\n");
return TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;
}
+
+ if (!cmd->t_data_nents)
+ return TCM_INVALID_CDB_FIELD;
+
sg = &cmd->t_data_sg[0];
if (cmd->t_data_nents > 1 ||
diff --git a/drivers/target/target_core_sbc.c b/drivers/target/target_core_sbc.c
index e63c163dba78..6f6db650e938 100644
--- a/drivers/target/target_core_sbc.c
+++ b/drivers/target/target_core_sbc.c
@@ -312,6 +312,12 @@ sbc_setup_write_same(struct se_cmd *cmd, unsigned char flags, struct sbc_ops *op
pr_warn("WRITE SAME with ANCHOR not supported\n");
return TCM_INVALID_CDB_FIELD;
}
+
+ if (flags & 0x01) {
+ pr_warn("WRITE SAME with NDOB not supported\n");
+ return TCM_INVALID_CDB_FIELD;
+ }
+
/*
* Special case for WRITE_SAME w/ UNMAP=1 that ends up getting
* translated into block discard requests within backend code.
diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c
index 0fe545815c5c..d4566b5ec348 100644
--- a/drivers/usb/chipidea/ci_hdrc_imx.c
+++ b/drivers/usb/chipidea/ci_hdrc_imx.c
@@ -340,11 +340,11 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
pdata.flags |= CI_HDRC_IMX_IS_HSIC;
data->usbmisc_data->hsic = 1;
data->pinctrl = devm_pinctrl_get(dev);
- if (IS_ERR(data->pinctrl)) {
- dev_err(dev, "pinctrl get failed, err=%ld\n",
- PTR_ERR(data->pinctrl));
- return PTR_ERR(data->pinctrl);
- }
+ if (PTR_ERR(data->pinctrl) == -ENODEV)
+ data->pinctrl = NULL;
+ else if (IS_ERR(data->pinctrl))
+ return dev_err_probe(dev, PTR_ERR(data->pinctrl),
+ "pinctrl get failed\n");
pinctrl_hsic_idle = pinctrl_lookup_state(data->pinctrl, "idle");
if (IS_ERR(pinctrl_hsic_idle)) {
@@ -369,17 +369,14 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
return PTR_ERR(data->pinctrl_hsic_active);
}
- data->hsic_pad_regulator = devm_regulator_get(dev, "hsic");
- if (PTR_ERR(data->hsic_pad_regulator) == -EPROBE_DEFER) {
- return -EPROBE_DEFER;
- } else if (PTR_ERR(data->hsic_pad_regulator) == -ENODEV) {
+ data->hsic_pad_regulator =
+ devm_regulator_get_optional(dev, "hsic");
+ if (PTR_ERR(data->hsic_pad_regulator) == -ENODEV) {
/* no pad regualator is needed */
data->hsic_pad_regulator = NULL;
- } else if (IS_ERR(data->hsic_pad_regulator)) {
- dev_err(dev, "Get HSIC pad regulator error: %ld\n",
- PTR_ERR(data->hsic_pad_regulator));
- return PTR_ERR(data->hsic_pad_regulator);
- }
+ } else if (IS_ERR(data->hsic_pad_regulator))
+ return dev_err_probe(dev, PTR_ERR(data->hsic_pad_regulator),
+ "Get HSIC pad regulator error\n");
if (data->hsic_pad_regulator) {
ret = regulator_enable(data->hsic_pad_regulator);
@@ -420,7 +417,11 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
of_usb_get_phy_mode(np) == USBPHY_INTERFACE_MODE_ULPI) {
pdata.flags |= CI_HDRC_OVERRIDE_PHY_CONTROL;
data->override_phy_control = true;
- usb_phy_init(pdata.usb_phy);
+ ret = usb_phy_init(pdata.usb_phy);
+ if (ret) {
+ dev_err(dev, "Failed to init phy\n");
+ goto err_clk;
+ }
}
if (pdata.flags & CI_HDRC_SUPPORTS_RUNTIME_PM)
@@ -429,7 +430,7 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
ret = imx_usbmisc_init(data->usbmisc_data);
if (ret) {
dev_err(dev, "usbmisc init failed, ret=%d\n", ret);
- goto err_clk;
+ goto phy_shutdown;
}
data->ci_pdev = ci_hdrc_add_device(dev,
@@ -437,10 +438,8 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
&pdata);
if (IS_ERR(data->ci_pdev)) {
ret = PTR_ERR(data->ci_pdev);
- if (ret != -EPROBE_DEFER)
- dev_err(dev, "ci_hdrc_add_device failed, err=%d\n",
- ret);
- goto err_clk;
+ dev_err_probe(dev, ret, "ci_hdrc_add_device failed\n");
+ goto phy_shutdown;
}
ret = imx_usbmisc_init_post(data->usbmisc_data);
@@ -460,6 +459,9 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
disable_device:
ci_hdrc_remove_device(data->ci_pdev);
+phy_shutdown:
+ if (data->override_phy_control)
+ usb_phy_shutdown(data->phy);
err_clk:
imx_disable_unprepare_clks(dev);
disable_hsic_regulator:
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
index 00345a51f18d..67e96fc4f9b5 100644
--- a/drivers/usb/class/usbtmc.c
+++ b/drivers/usb/class/usbtmc.c
@@ -485,6 +485,7 @@ static int usbtmc488_ioctl_read_stb(struct usbtmc_file_data *file_data,
u8 tag;
__u8 stb;
int rv;
+ long wait_rv;
dev_dbg(dev, "Enter ioctl_read_stb iin_ep_present: %d\n",
data->iin_ep_present);
@@ -527,16 +528,17 @@ static int usbtmc488_ioctl_read_stb(struct usbtmc_file_data *file_data,
}
if (data->iin_ep_present) {
- rv = wait_event_interruptible_timeout(
+ wait_rv = wait_event_interruptible_timeout(
data->waitq,
atomic_read(&data->iin_data_valid) != 0,
file_data->timeout);
- if (rv < 0) {
- dev_dbg(dev, "wait interrupted %d\n", rv);
+ if (wait_rv < 0) {
+ dev_dbg(dev, "wait interrupted %ld\n", wait_rv);
+ rv = wait_rv;
goto exit;
}
- if (rv == 0) {
+ if (wait_rv == 0) {
dev_dbg(dev, "wait timed out\n");
rv = -ETIMEDOUT;
goto exit;
@@ -556,6 +558,8 @@ static int usbtmc488_ioctl_read_stb(struct usbtmc_file_data *file_data,
rv = put_user(stb, (__u8 __user *)arg);
dev_dbg(dev, "stb:0x%02x received %d\n", (unsigned int)stb, rv);
+ rv = 0;
+
exit:
/* bump interrupt bTag */
data->iin_bTag += 1;
@@ -572,9 +576,9 @@ static int usbtmc488_ioctl_wait_srq(struct usbtmc_file_data *file_data,
{
struct usbtmc_device_data *data = file_data->data;
struct device *dev = &data->intf->dev;
- int rv;
u32 timeout;
unsigned long expire;
+ long wait_rv;
if (!data->iin_ep_present) {
dev_dbg(dev, "no interrupt endpoint present\n");
@@ -588,25 +592,24 @@ static int usbtmc488_ioctl_wait_srq(struct usbtmc_file_data *file_data,
mutex_unlock(&data->io_mutex);
- rv = wait_event_interruptible_timeout(
- data->waitq,
- atomic_read(&file_data->srq_asserted) != 0 ||
- atomic_read(&file_data->closing),
- expire);
+ wait_rv = wait_event_interruptible_timeout(
+ data->waitq,
+ atomic_read(&file_data->srq_asserted) != 0 ||
+ atomic_read(&file_data->closing),
+ expire);
mutex_lock(&data->io_mutex);
/* Note! disconnect or close could be called in the meantime */
if (atomic_read(&file_data->closing) || data->zombie)
- rv = -ENODEV;
+ return -ENODEV;
- if (rv < 0) {
- /* dev can be invalid now! */
- pr_debug("%s - wait interrupted %d\n", __func__, rv);
- return rv;
+ if (wait_rv < 0) {
+ dev_dbg(dev, "%s - wait interrupted %ld\n", __func__, wait_rv);
+ return wait_rv;
}
- if (rv == 0) {
+ if (wait_rv == 0) {
dev_dbg(dev, "%s - wait timed out\n", __func__);
return -ETIMEDOUT;
}
@@ -800,6 +803,7 @@ static ssize_t usbtmc_generic_read(struct usbtmc_file_data *file_data,
unsigned long expire;
int bufcount = 1;
int again = 0;
+ long wait_rv;
/* mutex already locked */
@@ -912,19 +916,24 @@ static ssize_t usbtmc_generic_read(struct usbtmc_file_data *file_data,
if (!(flags & USBTMC_FLAG_ASYNC)) {
dev_dbg(dev, "%s: before wait time %lu\n",
__func__, expire);
- retval = wait_event_interruptible_timeout(
+ wait_rv = wait_event_interruptible_timeout(
file_data->wait_bulk_in,
usbtmc_do_transfer(file_data),
expire);
- dev_dbg(dev, "%s: wait returned %d\n",
- __func__, retval);
+ dev_dbg(dev, "%s: wait returned %ld\n",
+ __func__, wait_rv);
- if (retval <= 0) {
- if (retval == 0)
- retval = -ETIMEDOUT;
+ if (wait_rv < 0) {
+ retval = wait_rv;
goto error;
}
+
+ if (wait_rv == 0) {
+ retval = -ETIMEDOUT;
+ goto error;
+ }
+
}
urb = usb_get_from_anchor(&file_data->in_anchor);
@@ -1350,7 +1359,10 @@ static ssize_t usbtmc_read(struct file *filp, char __user *buf,
if (!buffer)
return -ENOMEM;
- mutex_lock(&data->io_mutex);
+ retval = mutex_lock_interruptible(&data->io_mutex);
+ if (retval < 0)
+ goto exit_nolock;
+
if (data->zombie) {
retval = -ENODEV;
goto exit;
@@ -1473,6 +1485,7 @@ static ssize_t usbtmc_read(struct file *filp, char __user *buf,
exit:
mutex_unlock(&data->io_mutex);
+exit_nolock:
kfree(buffer);
return retval;
}
diff --git a/drivers/usb/host/uhci-platform.c b/drivers/usb/host/uhci-platform.c
index be9e9db7cad1..c0834bac4c95 100644
--- a/drivers/usb/host/uhci-platform.c
+++ b/drivers/usb/host/uhci-platform.c
@@ -122,7 +122,7 @@ static int uhci_hcd_platform_probe(struct platform_device *pdev)
}
/* Get and enable clock if any specified */
- uhci->clk = devm_clk_get(&pdev->dev, NULL);
+ uhci->clk = devm_clk_get_optional(&pdev->dev, NULL);
if (IS_ERR(uhci->clk)) {
ret = PTR_ERR(uhci->clk);
goto err_rmr;
diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
index c626a6acfad6..d60ed6735c34 100644
--- a/drivers/usb/typec/tcpm/tcpm.c
+++ b/drivers/usb/typec/tcpm/tcpm.c
@@ -3787,7 +3787,7 @@ static void _tcpm_cc_change(struct tcpm_port *port, enum typec_cc_status cc1,
case SNK_TRY_WAIT_DEBOUNCE:
if (!tcpm_port_is_sink(port)) {
port->max_wait = 0;
- tcpm_set_state(port, SRC_TRYWAIT, 0);
+ tcpm_set_state(port, SRC_TRYWAIT, PD_T_PD_DEBOUNCE);
}
break;
case SRC_TRY_WAIT:
diff --git a/drivers/usb/typec/ucsi/displayport.c b/drivers/usb/typec/ucsi/displayport.c
index f67c5a304155..79692b13a873 100644
--- a/drivers/usb/typec/ucsi/displayport.c
+++ b/drivers/usb/typec/ucsi/displayport.c
@@ -272,6 +272,8 @@ void ucsi_displayport_remove_partner(struct typec_altmode *alt)
if (!dp)
return;
+ cancel_work_sync(&dp->work);
+
dp->data.conf = 0;
dp->data.status = 0;
dp->initialized = false;
diff --git a/drivers/video/fbdev/core/tileblit.c b/drivers/video/fbdev/core/tileblit.c
index adff8d6ffe6f..64c60fcb92d7 100644
--- a/drivers/video/fbdev/core/tileblit.c
+++ b/drivers/video/fbdev/core/tileblit.c
@@ -77,7 +77,42 @@ static void tile_putcs(struct vc_data *vc, struct fb_info *info,
static void tile_clear_margins(struct vc_data *vc, struct fb_info *info,
int color, int bottom_only)
{
- return;
+ unsigned int cw = vc->vc_font.width;
+ unsigned int ch = vc->vc_font.height;
+ unsigned int rw = info->var.xres - (vc->vc_cols*cw);
+ unsigned int bh = info->var.yres - (vc->vc_rows*ch);
+ unsigned int rs = info->var.xres - rw;
+ unsigned int bs = info->var.yres - bh;
+ unsigned int vwt = info->var.xres_virtual / cw;
+ unsigned int vht = info->var.yres_virtual / ch;
+ struct fb_tilerect rect;
+
+ rect.index = vc->vc_video_erase_char &
+ ((vc->vc_hi_font_mask) ? 0x1ff : 0xff);
+ rect.fg = color;
+ rect.bg = color;
+
+ if ((int) rw > 0 && !bottom_only) {
+ rect.sx = (info->var.xoffset + rs + cw - 1) / cw;
+ rect.sy = 0;
+ rect.width = (rw + cw - 1) / cw;
+ rect.height = vht;
+ if (rect.width + rect.sx > vwt)
+ rect.width = vwt - rect.sx;
+ if (rect.sx < vwt)
+ info->tileops->fb_tilefill(info, &rect);
+ }
+
+ if ((int) bh > 0) {
+ rect.sx = info->var.xoffset / cw;
+ rect.sy = (info->var.yoffset + bs) / ch;
+ rect.width = rs / cw;
+ rect.height = (bh + ch - 1) / ch;
+ if (rect.height + rect.sy > vht)
+ rect.height = vht - rect.sy;
+ if (rect.sy < vht)
+ info->tileops->fb_tilefill(info, &rect);
+ }
}
static void tile_cursor(struct vc_data *vc, struct fb_info *info, int mode,
diff --git a/drivers/video/fbdev/fsl-diu-fb.c b/drivers/video/fbdev/fsl-diu-fb.c
index d4c2a6b3839e..3dc399704adc 100644
--- a/drivers/video/fbdev/fsl-diu-fb.c
+++ b/drivers/video/fbdev/fsl-diu-fb.c
@@ -1828,6 +1828,7 @@ static int fsl_diu_remove(struct platform_device *pdev)
int i;
data = dev_get_drvdata(&pdev->dev);
+ device_remove_file(&pdev->dev, &data->dev_attr);
disable_lcdc(&data->fsl_diu_info[0]);
free_irq(data->irq, data->diu_reg);
diff --git a/drivers/xen/platform-pci.c b/drivers/xen/platform-pci.c
index e1cb277a9e16..69bceab71c3f 100644
--- a/drivers/xen/platform-pci.c
+++ b/drivers/xen/platform-pci.c
@@ -26,6 +26,8 @@
#define DRV_NAME "xen-platform-pci"
+#define PCI_DEVICE_ID_XEN_PLATFORM_XS61 0x0002
+
static unsigned long platform_mmio;
static unsigned long platform_mmio_alloc;
static unsigned long platform_mmiolen;
@@ -167,6 +169,8 @@ static int platform_pci_probe(struct pci_dev *pdev,
static const struct pci_device_id platform_pci_tbl[] = {
{PCI_VENDOR_ID_XEN, PCI_DEVICE_ID_XEN_PLATFORM,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+ {PCI_VENDOR_ID_XEN, PCI_DEVICE_ID_XEN_PLATFORM_XS61,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{0,}
};
diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c
index 5bd29d0bffa2..382ee7dc3d5d 100644
--- a/drivers/xen/swiotlb-xen.c
+++ b/drivers/xen/swiotlb-xen.c
@@ -85,19 +85,21 @@ static inline dma_addr_t xen_virt_to_bus(void *address)
return xen_phys_to_bus(virt_to_phys(address));
}
+static inline bool range_requires_alignment(phys_addr_t p, size_t size)
+{
+ phys_addr_t algn = 1ULL << (get_order(size) + PAGE_SHIFT);
+ phys_addr_t bus_addr = pfn_to_bfn(XEN_PFN_DOWN(p)) << XEN_PAGE_SHIFT;
+
+ return IS_ALIGNED(p, algn) && !IS_ALIGNED(bus_addr, algn);
+}
+
static inline int range_straddles_page_boundary(phys_addr_t p, size_t size)
{
unsigned long next_bfn, xen_pfn = XEN_PFN_DOWN(p);
unsigned int i, nr_pages = XEN_PFN_UP(xen_offset_in_page(p) + size);
- phys_addr_t algn = 1ULL << (get_order(size) + PAGE_SHIFT);
next_bfn = pfn_to_bfn(xen_pfn);
- /* If buffer is physically aligned, ensure DMA alignment. */
- if (IS_ALIGNED(p, algn) &&
- !IS_ALIGNED((phys_addr_t)next_bfn << XEN_PAGE_SHIFT, algn))
- return 1;
-
for (i = 1; i < nr_pages; i++)
if (pfn_to_bfn(++xen_pfn) != ++next_bfn)
return 1;
@@ -320,7 +322,8 @@ xen_swiotlb_alloc_coherent(struct device *hwdev, size_t size,
phys = *dma_handle;
dev_addr = xen_phys_to_bus(phys);
if (((dev_addr + size - 1 <= dma_mask)) &&
- !range_straddles_page_boundary(phys, size))
+ !range_straddles_page_boundary(phys, size) &&
+ !range_requires_alignment(phys, size))
*dma_handle = dev_addr;
else {
if (xen_create_contiguous_region(phys, order,
@@ -360,6 +363,7 @@ xen_swiotlb_free_coherent(struct device *hwdev, size_t size, void *vaddr,
if (!WARN_ON((dev_addr + size - 1 > dma_mask) ||
range_straddles_page_boundary(phys, size)) &&
+ !range_requires_alignment(phys, size) &&
TestClearPageXenRemapped(page))
xen_destroy_contiguous_region(phys, order);
diff --git a/drivers/xen/xenbus/xenbus.h b/drivers/xen/xenbus/xenbus.h
index 88516a8a9f93..39e8aee26378 100644
--- a/drivers/xen/xenbus/xenbus.h
+++ b/drivers/xen/xenbus/xenbus.h
@@ -77,6 +77,7 @@ enum xb_req_state {
struct xb_req_data {
struct list_head list;
wait_queue_head_t wq;
+ struct kref kref;
struct xsd_sockmsg msg;
uint32_t caller_req_id;
enum xsd_sockmsg_type type;
@@ -103,6 +104,7 @@ int xb_init_comms(void);
void xb_deinit_comms(void);
int xs_watch_msg(struct xs_watch_event *event);
void xs_request_exit(struct xb_req_data *req);
+void xs_free_req(struct kref *kref);
int xenbus_match(struct device *_dev, struct device_driver *_drv);
int xenbus_dev_probe(struct device *_dev);
diff --git a/drivers/xen/xenbus/xenbus_comms.c b/drivers/xen/xenbus/xenbus_comms.c
index e5fda0256feb..82df2da1b880 100644
--- a/drivers/xen/xenbus/xenbus_comms.c
+++ b/drivers/xen/xenbus/xenbus_comms.c
@@ -309,8 +309,8 @@ static int process_msg(void)
virt_wmb();
req->state = xb_req_state_got_reply;
req->cb(req);
- } else
- kfree(req);
+ }
+ kref_put(&req->kref, xs_free_req);
}
mutex_unlock(&xs_response_mutex);
@@ -386,14 +386,13 @@ static int process_writes(void)
state.req->msg.type = XS_ERROR;
state.req->err = err;
list_del(&state.req->list);
- if (state.req->state == xb_req_state_aborted)
- kfree(state.req);
- else {
+ if (state.req->state != xb_req_state_aborted) {
/* write err, then update state */
virt_wmb();
state.req->state = xb_req_state_got_reply;
wake_up(&state.req->wq);
}
+ kref_put(&state.req->kref, xs_free_req);
mutex_unlock(&xb_write_mutex);
diff --git a/drivers/xen/xenbus/xenbus_dev_frontend.c b/drivers/xen/xenbus/xenbus_dev_frontend.c
index 0792fda49a15..c495cff3da30 100644
--- a/drivers/xen/xenbus/xenbus_dev_frontend.c
+++ b/drivers/xen/xenbus/xenbus_dev_frontend.c
@@ -406,7 +406,7 @@ void xenbus_dev_queue_reply(struct xb_req_data *req)
mutex_unlock(&u->reply_mutex);
kfree(req->body);
- kfree(req);
+ kref_put(&req->kref, xs_free_req);
kref_put(&u->kref, xenbus_file_free);
diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c
index fd686b962727..17705f82f85f 100644
--- a/drivers/xen/xenbus/xenbus_probe.c
+++ b/drivers/xen/xenbus/xenbus_probe.c
@@ -881,9 +881,15 @@ static int __init xenbus_init(void)
if (xen_pv_domain())
xen_store_domain_type = XS_PV;
if (xen_hvm_domain())
+ {
xen_store_domain_type = XS_HVM;
- if (xen_hvm_domain() && xen_initial_domain())
- xen_store_domain_type = XS_LOCAL;
+ err = hvm_get_parameter(HVM_PARAM_STORE_EVTCHN, &v);
+ if (err)
+ goto out_error;
+ xen_store_evtchn = (int)v;
+ if (!v && xen_initial_domain())
+ xen_store_domain_type = XS_LOCAL;
+ }
if (xen_pv_domain() && !xen_start_info->store_evtchn)
xen_store_domain_type = XS_LOCAL;
if (xen_pv_domain() && xen_start_info->store_evtchn)
@@ -902,10 +908,6 @@ static int __init xenbus_init(void)
xen_store_interface = gfn_to_virt(xen_store_gfn);
break;
case XS_HVM:
- err = hvm_get_parameter(HVM_PARAM_STORE_EVTCHN, &v);
- if (err)
- goto out_error;
- xen_store_evtchn = (int)v;
err = hvm_get_parameter(HVM_PARAM_STORE_PFN, &v);
if (err)
goto out_error;
diff --git a/drivers/xen/xenbus/xenbus_xs.c b/drivers/xen/xenbus/xenbus_xs.c
index 12e02eb01f59..a4dd92719e7a 100644
--- a/drivers/xen/xenbus/xenbus_xs.c
+++ b/drivers/xen/xenbus/xenbus_xs.c
@@ -112,6 +112,12 @@ static void xs_suspend_exit(void)
wake_up_all(&xs_state_enter_wq);
}
+void xs_free_req(struct kref *kref)
+{
+ struct xb_req_data *req = container_of(kref, struct xb_req_data, kref);
+ kfree(req);
+}
+
static uint32_t xs_request_enter(struct xb_req_data *req)
{
uint32_t rq_id;
@@ -237,6 +243,12 @@ static void xs_send(struct xb_req_data *req, struct xsd_sockmsg *msg)
req->caller_req_id = req->msg.req_id;
req->msg.req_id = xs_request_enter(req);
+ /*
+ * Take 2nd ref. One for this thread, and the second for the
+ * xenbus_thread.
+ */
+ kref_get(&req->kref);
+
mutex_lock(&xb_write_mutex);
list_add_tail(&req->list, &xb_write_list);
notify = list_is_singular(&xb_write_list);
@@ -261,8 +273,8 @@ static void *xs_wait_for_reply(struct xb_req_data *req, struct xsd_sockmsg *msg)
if (req->state == xb_req_state_queued ||
req->state == xb_req_state_wait_reply)
req->state = xb_req_state_aborted;
- else
- kfree(req);
+
+ kref_put(&req->kref, xs_free_req);
mutex_unlock(&xb_write_mutex);
return ret;
@@ -291,6 +303,7 @@ int xenbus_dev_request_and_reply(struct xsd_sockmsg *msg, void *par)
req->cb = xenbus_dev_queue_reply;
req->par = par;
req->user_req = true;
+ kref_init(&req->kref);
xs_send(req, msg);
@@ -319,6 +332,7 @@ static void *xs_talkv(struct xenbus_transaction t,
req->num_vecs = num_vecs;
req->cb = xs_wake_up;
req->user_req = false;
+ kref_init(&req->kref);
msg.req_id = 0;
msg.tx_id = t.id;
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 04788940afaf..64af1c7f95c2 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -5134,10 +5134,10 @@ struct extent_buffer *find_extent_buffer(struct btrfs_fs_info *fs_info,
return NULL;
}
-#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
struct extent_buffer *alloc_test_extent_buffer(struct btrfs_fs_info *fs_info,
u64 start)
{
+#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
struct extent_buffer *eb, *exists = NULL;
int ret;
@@ -5173,8 +5173,11 @@ struct extent_buffer *alloc_test_extent_buffer(struct btrfs_fs_info *fs_info,
free_eb:
btrfs_release_extent_buffer(eb);
return exists;
-}
+#else
+ /* Stub to avoid linker error when compiled with optimizations turned off. */
+ return NULL;
#endif
+}
struct extent_buffer *alloc_extent_buffer(struct btrfs_fs_info *fs_info,
u64 start)
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index e1063ef3dece..b0933d952593 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -397,10 +397,8 @@ static int fs_path_ensure_buf(struct fs_path *p, int len)
if (p->buf_len >= len)
return 0;
- if (len > PATH_MAX) {
- WARN_ON(1);
- return -ENOMEM;
- }
+ if (WARN_ON(len > PATH_MAX))
+ return -ENAMETOOLONG;
path_len = p->end - p->start;
old_buf_len = p->buf_len;
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c
index 3925a7bfc74d..c3156f602b20 100644
--- a/fs/cifs/readdir.c
+++ b/fs/cifs/readdir.c
@@ -621,7 +621,10 @@ find_cifs_entry(const unsigned int xid, struct cifs_tcon *tcon, loff_t pos,
else
cifs_buf_release(cfile->srch_inf.
ntwrk_buf_start);
+ /* Reset all pointers to the network buffer to prevent stale references */
cfile->srch_inf.ntwrk_buf_start = NULL;
+ cfile->srch_inf.srch_entries_start = NULL;
+ cfile->srch_inf.last_entry = NULL;
}
rc = initiate_cifs_search(xid, file);
if (rc) {
@@ -644,11 +647,11 @@ find_cifs_entry(const unsigned int xid, struct cifs_tcon *tcon, loff_t pos,
rc = server->ops->query_dir_next(xid, tcon, &cfile->fid,
search_flags,
&cfile->srch_inf);
+ if (rc)
+ return -ENOENT;
/* FindFirst/Next set last_entry to NULL on malformed reply */
if (cfile->srch_inf.last_entry)
cifs_save_resume_key(cfile->srch_inf.last_entry, cfile);
- if (rc)
- return -ENOENT;
}
if (index_to_find < cfile->srch_inf.index_of_last_entry) {
/* we found the buffer that contains the entry */
diff --git a/fs/coredump.c b/fs/coredump.c
index f34767eedf38..615e3231a96b 100644
--- a/fs/coredump.c
+++ b/fs/coredump.c
@@ -52,6 +52,13 @@
#include <trace/events/sched.h>
+/*
+ * File descriptor number for the pidfd for the thread-group leader of
+ * the coredumping task installed into the usermode helper's file
+ * descriptor table.
+ */
+#define COREDUMP_PIDFD_NUMBER 3
+
int core_uses_pid;
unsigned int core_pipe_limit;
char core_pattern[CORENAME_MAX_SIZE] = "core";
@@ -314,6 +321,27 @@ static int format_corename(struct core_name *cn, struct coredump_params *cprm,
err = cn_printf(cn, "%lu",
rlimit(RLIMIT_CORE));
break;
+ /* pidfd number */
+ case 'F': {
+ /*
+ * Installing a pidfd only makes sense if
+ * we actually spawn a usermode helper.
+ */
+ if (!ispipe)
+ break;
+
+ /*
+ * Note that we'll install a pidfd for the
+ * thread-group leader. We know that task
+ * linkage hasn't been removed yet and even if
+ * this @current isn't the actual thread-group
+ * leader we know that the thread-group leader
+ * cannot be reaped until @current has exited.
+ */
+ cprm->pid = task_tgid(current);
+ err = cn_printf(cn, "%d", COREDUMP_PIDFD_NUMBER);
+ break;
+ }
default:
break;
}
@@ -537,7 +565,7 @@ static void wait_for_dump_helpers(struct file *file)
}
/*
- * umh_pipe_setup
+ * umh_coredump_setup
* helper function to customize the process used
* to collect the core in userspace. Specifically
* it sets up a pipe and installs it as fd 0 (stdin)
@@ -547,21 +575,61 @@ static void wait_for_dump_helpers(struct file *file)
* is a special value that we use to trap recursive
* core dumps
*/
-static int umh_pipe_setup(struct subprocess_info *info, struct cred *new)
+static int umh_coredump_setup(struct subprocess_info *info, struct cred *new)
{
struct file *files[2];
+ struct file *pidfs_file = NULL;
struct coredump_params *cp = (struct coredump_params *)info->data;
- int err = create_pipe_files(files, 0);
+ int err;
+
+ if (cp->pid) {
+ int fd;
+
+ fd = pidfd_prepare(cp->pid, 0, &pidfs_file);
+ if (fd < 0)
+ return fd;
+
+ /*
+ * We don't care about the fd. We also cannot simply
+ * replace it below because dup2() will refuse to close
+ * this file descriptor if its in a larval state. So
+ * close it!
+ */
+ put_unused_fd(fd);
+
+ /*
+ * Usermode helpers are childen of either
+ * system_unbound_wq or of kthreadd. So we know that
+ * we're starting off with a clean file descriptor
+ * table. So we should always be able to use
+ * COREDUMP_PIDFD_NUMBER as our file descriptor value.
+ */
+ err = replace_fd(COREDUMP_PIDFD_NUMBER, pidfs_file, 0);
+ if (err < 0)
+ goto out_fail;
+
+ pidfs_file = NULL;
+ }
+
+ err = create_pipe_files(files, 0);
if (err)
- return err;
+ goto out_fail;
cp->file = files[1];
err = replace_fd(0, files[0], 0);
fput(files[0]);
+ if (err < 0)
+ goto out_fail;
+
/* and disallow core files too */
current->signal->rlim[RLIMIT_CORE] = (struct rlimit){1, 1};
+ err = 0;
+
+out_fail:
+ if (pidfs_file)
+ fput(pidfs_file);
return err;
}
@@ -638,7 +706,7 @@ void do_coredump(const kernel_siginfo_t *siginfo)
}
if (cprm.limit == 1) {
- /* See umh_pipe_setup() which sets RLIMIT_CORE = 1.
+ /* See umh_coredump_setup() which sets RLIMIT_CORE = 1.
*
* Normally core limits are irrelevant to pipes, since
* we're not writing to the file system, but we use
@@ -683,7 +751,7 @@ void do_coredump(const kernel_siginfo_t *siginfo)
retval = -ENOMEM;
sub_info = call_usermodehelper_setup(helper_argv[0],
helper_argv, NULL, GFP_KERNEL,
- umh_pipe_setup, NULL, &cprm);
+ umh_coredump_setup, NULL, &cprm);
if (sub_info)
retval = call_usermodehelper_exec(sub_info,
UMH_WAIT_EXEC);
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c
index b68cee75f5c5..a32eb67a8f0e 100644
--- a/fs/ext4/balloc.c
+++ b/fs/ext4/balloc.c
@@ -609,8 +609,8 @@ static int ext4_has_free_clusters(struct ext4_sb_info *sbi,
/* Hm, nope. Are (enough) root reserved clusters available? */
if (uid_eq(sbi->s_resuid, current_fsuid()) ||
(!gid_eq(sbi->s_resgid, GLOBAL_ROOT_GID) && in_group_p(sbi->s_resgid)) ||
- capable(CAP_SYS_RESOURCE) ||
- (flags & EXT4_MB_USE_ROOT_BLOCKS)) {
+ (flags & EXT4_MB_USE_ROOT_BLOCKS) ||
+ capable(CAP_SYS_RESOURCE)) {
if (free_clusters >= (nclusters + dirty_clusters +
resv_clusters))
diff --git a/fs/namespace.c b/fs/namespace.c
index 281f08eaba5b..a5cb608778b1 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -569,15 +569,11 @@ int __legitimize_mnt(struct vfsmount *bastard, unsigned seq)
return 0;
mnt = real_mount(bastard);
mnt_add_count(mnt, 1);
- smp_mb(); // see mntput_no_expire()
+ smp_mb(); // see mntput_no_expire() and do_umount()
if (likely(!read_seqretry(&mount_lock, seq)))
return 0;
- if (bastard->mnt_flags & MNT_SYNC_UMOUNT) {
- mnt_add_count(mnt, -1);
- return 1;
- }
lock_mount_hash();
- if (unlikely(bastard->mnt_flags & MNT_DOOMED)) {
+ if (unlikely(bastard->mnt_flags & (MNT_SYNC_UMOUNT | MNT_DOOMED))) {
mnt_add_count(mnt, -1);
unlock_mount_hash();
return 1;
@@ -1588,6 +1584,7 @@ static int do_umount(struct mount *mnt, int flags)
umount_tree(mnt, UMOUNT_PROPAGATE);
retval = 0;
} else {
+ smp_mb(); // paired with __legitimize_mnt()
shrink_submounts(mnt);
retval = -EBUSY;
if (!propagate_mount_busy(mnt, 2)) {
diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c
index 31922657e836..1397e0816ba0 100644
--- a/fs/nfs/callback_proc.c
+++ b/fs/nfs/callback_proc.c
@@ -284,7 +284,7 @@ static u32 initiate_file_draining(struct nfs_client *clp,
goto unlock;
}
- pnfs_set_layout_stateid(lo, &args->cbl_stateid, true);
+ pnfs_set_layout_stateid(lo, &args->cbl_stateid, NULL, true);
switch (pnfs_mark_matching_lsegs_return(lo, &free_me_list,
&args->cbl_range,
be32_to_cpu(args->cbl_stateid.seqid))) {
diff --git a/fs/nfs/filelayout/filelayoutdev.c b/fs/nfs/filelayout/filelayoutdev.c
index d913e818858f..82bba1ede717 100644
--- a/fs/nfs/filelayout/filelayoutdev.c
+++ b/fs/nfs/filelayout/filelayoutdev.c
@@ -75,6 +75,7 @@ nfs4_fl_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
struct page *scratch;
struct list_head dsaddrs;
struct nfs4_pnfs_ds_addr *da;
+ struct net *net = server->nfs_client->cl_net;
/* set up xdr stream */
scratch = alloc_page(gfp_flags);
@@ -160,8 +161,7 @@ nfs4_fl_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
mp_count = be32_to_cpup(p); /* multipath count */
for (j = 0; j < mp_count; j++) {
- da = nfs4_decode_mp_ds_addr(server->nfs_client->cl_net,
- &stream, gfp_flags);
+ da = nfs4_decode_mp_ds_addr(net, &stream, gfp_flags);
if (da)
list_add_tail(&da->da_node, &dsaddrs);
}
@@ -171,7 +171,7 @@ nfs4_fl_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
goto out_err_free_deviceid;
}
- dsaddr->ds_list[i] = nfs4_pnfs_ds_add(&dsaddrs, gfp_flags);
+ dsaddr->ds_list[i] = nfs4_pnfs_ds_add(net, &dsaddrs, gfp_flags);
if (!dsaddr->ds_list[i])
goto out_err_drain_dsaddrs;
diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c
index 1b88b78f40be..3b4f93dcf323 100644
--- a/fs/nfs/flexfilelayout/flexfilelayout.c
+++ b/fs/nfs/flexfilelayout/flexfilelayout.c
@@ -1285,6 +1285,7 @@ static void ff_layout_io_track_ds_error(struct pnfs_layout_segment *lseg,
case -ECONNRESET:
case -EHOSTDOWN:
case -EHOSTUNREACH:
+ case -ENETDOWN:
case -ENETUNREACH:
case -EADDRINUSE:
case -ENOBUFS:
diff --git a/fs/nfs/flexfilelayout/flexfilelayoutdev.c b/fs/nfs/flexfilelayout/flexfilelayoutdev.c
index 1f12297109b4..e6d7473e1a32 100644
--- a/fs/nfs/flexfilelayout/flexfilelayoutdev.c
+++ b/fs/nfs/flexfilelayout/flexfilelayoutdev.c
@@ -49,6 +49,7 @@ nfs4_ff_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
struct nfs4_pnfs_ds_addr *da;
struct nfs4_ff_layout_ds *new_ds = NULL;
struct nfs4_ff_ds_version *ds_versions = NULL;
+ struct net *net = server->nfs_client->cl_net;
u32 mp_count;
u32 version_count;
__be32 *p;
@@ -80,8 +81,7 @@ nfs4_ff_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
for (i = 0; i < mp_count; i++) {
/* multipath ds */
- da = nfs4_decode_mp_ds_addr(server->nfs_client->cl_net,
- &stream, gfp_flags);
+ da = nfs4_decode_mp_ds_addr(net, &stream, gfp_flags);
if (da)
list_add_tail(&da->da_node, &dsaddrs);
}
@@ -147,7 +147,7 @@ nfs4_ff_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
new_ds->ds_versions = ds_versions;
new_ds->ds_versions_cnt = version_count;
- new_ds->ds = nfs4_pnfs_ds_add(&dsaddrs, gfp_flags);
+ new_ds->ds = nfs4_pnfs_ds_add(net, &dsaddrs, gfp_flags);
if (!new_ds->ds)
goto out_err_drain_dsaddrs;
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 632cea3fb91d..3477da3c2190 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -6573,10 +6573,18 @@ static struct nfs4_unlockdata *nfs4_alloc_unlockdata(struct file_lock *fl,
struct nfs4_unlockdata *p;
struct nfs4_state *state = lsp->ls_state;
struct inode *inode = state->inode;
+ struct nfs_lock_context *l_ctx;
p = kzalloc(sizeof(*p), GFP_NOFS);
if (p == NULL)
return NULL;
+ l_ctx = nfs_get_lock_context(ctx);
+ if (!IS_ERR(l_ctx)) {
+ p->l_ctx = l_ctx;
+ } else {
+ kfree(p);
+ return NULL;
+ }
p->arg.fh = NFS_FH(inode);
p->arg.fl = &p->fl;
p->arg.seqid = seqid;
@@ -6584,7 +6592,6 @@ static struct nfs4_unlockdata *nfs4_alloc_unlockdata(struct file_lock *fl,
p->lsp = lsp;
/* Ensure we don't close file until we're done freeing locks! */
p->ctx = get_nfs_open_context(ctx);
- p->l_ctx = nfs_get_lock_context(ctx);
locks_init_lock(&p->fl);
locks_copy_lock(&p->fl, fl);
p->server = NFS_SERVER(inode);
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 1d38484e0a53..b64a3751c3e4 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -2655,7 +2655,15 @@ static void nfs4_state_manager(struct nfs_client *clp)
pr_warn_ratelimited("NFS: state manager%s%s failed on NFSv4 server %s"
" with error %d\n", section_sep, section,
clp->cl_hostname, -status);
- ssleep(1);
+ switch (status) {
+ case -ENETDOWN:
+ case -ENETUNREACH:
+ nfs_mark_client_ready(clp, -EIO);
+ break;
+ default:
+ ssleep(1);
+ break;
+ }
out_drain:
memalloc_nofs_restore(memflags);
nfs4_end_drain_session(clp);
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 90961dae4dc3..d91576a587e4 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -710,6 +710,14 @@ pnfs_mark_matching_lsegs_invalid(struct pnfs_layout_hdr *lo,
return remaining;
}
+static void pnfs_reset_return_info(struct pnfs_layout_hdr *lo)
+{
+ struct pnfs_layout_segment *lseg;
+
+ list_for_each_entry(lseg, &lo->plh_return_segs, pls_list)
+ pnfs_set_plh_return_info(lo, lseg->pls_range.iomode, 0);
+}
+
static void
pnfs_free_returned_lsegs(struct pnfs_layout_hdr *lo,
struct list_head *free_me,
@@ -943,10 +951,21 @@ pnfs_destroy_all_layouts(struct nfs_client *clp)
pnfs_destroy_layouts_byclid(clp, false);
}
+static void
+pnfs_set_layout_cred(struct pnfs_layout_hdr *lo, const struct cred *cred)
+{
+ const struct cred *old;
+
+ if (cred && cred_fscmp(lo->plh_lc_cred, cred) != 0) {
+ old = xchg(&lo->plh_lc_cred, get_cred(cred));
+ put_cred(old);
+ }
+}
+
/* update lo->plh_stateid with new if is more recent */
void
pnfs_set_layout_stateid(struct pnfs_layout_hdr *lo, const nfs4_stateid *new,
- bool update_barrier)
+ const struct cred *cred, bool update_barrier)
{
u32 oldseq, newseq, new_barrier = 0;
@@ -954,6 +973,7 @@ pnfs_set_layout_stateid(struct pnfs_layout_hdr *lo, const nfs4_stateid *new,
newseq = be32_to_cpu(new->seqid);
if (!pnfs_layout_is_valid(lo)) {
+ pnfs_set_layout_cred(lo, cred);
nfs4_stateid_copy(&lo->plh_stateid, new);
lo->plh_barrier = newseq;
pnfs_clear_layoutreturn_info(lo);
@@ -1149,7 +1169,8 @@ void pnfs_layoutreturn_free_lsegs(struct pnfs_layout_hdr *lo,
pnfs_mark_matching_lsegs_invalid(lo, &freeme, range, seq);
pnfs_free_returned_lsegs(lo, &freeme, range, seq);
- pnfs_set_layout_stateid(lo, stateid, true);
+ pnfs_set_layout_stateid(lo, stateid, NULL, true);
+ pnfs_reset_return_info(lo);
} else
pnfs_mark_layout_stateid_invalid(lo, &freeme);
out_unlock:
@@ -2382,14 +2403,14 @@ pnfs_layout_process(struct nfs4_layoutget *lgp)
if (!pnfs_layout_is_valid(lo)) {
/* We have a completely new layout */
- pnfs_set_layout_stateid(lo, &res->stateid, true);
+ pnfs_set_layout_stateid(lo, &res->stateid, lgp->cred, true);
} else if (nfs4_stateid_match_other(&lo->plh_stateid, &res->stateid)) {
/* existing state ID, make sure the sequence number matches. */
if (pnfs_layout_stateid_blocked(lo, &res->stateid)) {
dprintk("%s forget reply due to sequence\n", __func__);
goto out_forget;
}
- pnfs_set_layout_stateid(lo, &res->stateid, false);
+ pnfs_set_layout_stateid(lo, &res->stateid, lgp->cred, false);
} else {
/*
* We got an entirely new state ID. Mark all segments for the
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
index 68339680bb7d..7976886a47db 100644
--- a/fs/nfs/pnfs.h
+++ b/fs/nfs/pnfs.h
@@ -57,6 +57,7 @@ struct nfs4_pnfs_ds {
struct list_head ds_node; /* nfs4_pnfs_dev_hlist dev_dslist */
char *ds_remotestr; /* comma sep list of addrs */
struct list_head ds_addrs;
+ const struct net *ds_net;
struct nfs_client *ds_clp;
refcount_t ds_count;
unsigned long ds_state;
@@ -270,6 +271,7 @@ bool nfs4_layout_refresh_old_stateid(nfs4_stateid *dst,
void pnfs_put_layout_hdr(struct pnfs_layout_hdr *lo);
void pnfs_set_layout_stateid(struct pnfs_layout_hdr *lo,
const nfs4_stateid *new,
+ const struct cred *cred,
bool update_barrier);
int pnfs_mark_matching_lsegs_invalid(struct pnfs_layout_hdr *lo,
struct list_head *tmp_list,
@@ -377,7 +379,8 @@ int pnfs_generic_commit_pagelist(struct inode *inode,
int pnfs_generic_scan_commit_lists(struct nfs_commit_info *cinfo, int max);
void pnfs_generic_write_commit_done(struct rpc_task *task, void *data);
void nfs4_pnfs_ds_put(struct nfs4_pnfs_ds *ds);
-struct nfs4_pnfs_ds *nfs4_pnfs_ds_add(struct list_head *dsaddrs,
+struct nfs4_pnfs_ds *nfs4_pnfs_ds_add(const struct net *net,
+ struct list_head *dsaddrs,
gfp_t gfp_flags);
void nfs4_pnfs_v3_ds_connect_unload(void);
int nfs4_pnfs_ds_connect(struct nfs_server *mds_srv, struct nfs4_pnfs_ds *ds,
diff --git a/fs/nfs/pnfs_nfs.c b/fs/nfs/pnfs_nfs.c
index aff44a7b98f8..e2d90239d042 100644
--- a/fs/nfs/pnfs_nfs.c
+++ b/fs/nfs/pnfs_nfs.c
@@ -414,12 +414,12 @@ _same_data_server_addrs_locked(const struct list_head *dsaddrs1,
* Lookup DS by addresses. nfs4_ds_cache_lock is held
*/
static struct nfs4_pnfs_ds *
-_data_server_lookup_locked(const struct list_head *dsaddrs)
+_data_server_lookup_locked(const struct net *net, const struct list_head *dsaddrs)
{
struct nfs4_pnfs_ds *ds;
list_for_each_entry(ds, &nfs4_data_server_cache, ds_node)
- if (_same_data_server_addrs_locked(&ds->ds_addrs, dsaddrs))
+ if (ds->ds_net == net && _same_data_server_addrs_locked(&ds->ds_addrs, dsaddrs))
return ds;
return NULL;
}
@@ -512,7 +512,7 @@ nfs4_pnfs_remotestr(struct list_head *dsaddrs, gfp_t gfp_flags)
* uncached and return cached struct nfs4_pnfs_ds.
*/
struct nfs4_pnfs_ds *
-nfs4_pnfs_ds_add(struct list_head *dsaddrs, gfp_t gfp_flags)
+nfs4_pnfs_ds_add(const struct net *net, struct list_head *dsaddrs, gfp_t gfp_flags)
{
struct nfs4_pnfs_ds *tmp_ds, *ds = NULL;
char *remotestr;
@@ -530,13 +530,14 @@ nfs4_pnfs_ds_add(struct list_head *dsaddrs, gfp_t gfp_flags)
remotestr = nfs4_pnfs_remotestr(dsaddrs, gfp_flags);
spin_lock(&nfs4_ds_cache_lock);
- tmp_ds = _data_server_lookup_locked(dsaddrs);
+ tmp_ds = _data_server_lookup_locked(net, dsaddrs);
if (tmp_ds == NULL) {
INIT_LIST_HEAD(&ds->ds_addrs);
list_splice_init(dsaddrs, &ds->ds_addrs);
ds->ds_remotestr = remotestr;
refcount_set(&ds->ds_count, 1);
INIT_LIST_HEAD(&ds->ds_node);
+ ds->ds_net = net;
ds->ds_clp = NULL;
list_add(&ds->ds_node, &nfs4_data_server_cache);
dprintk("%s add new data server %s\n", __func__,
diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c
index 69490c613076..fa3da4b23d67 100644
--- a/fs/ocfs2/journal.c
+++ b/fs/ocfs2/journal.c
@@ -175,7 +175,7 @@ int ocfs2_recovery_init(struct ocfs2_super *osb)
struct ocfs2_recovery_map *rm;
mutex_init(&osb->recovery_lock);
- osb->disable_recovery = 0;
+ osb->recovery_state = OCFS2_REC_ENABLED;
osb->recovery_thread_task = NULL;
init_waitqueue_head(&osb->recovery_event);
@@ -194,31 +194,53 @@ int ocfs2_recovery_init(struct ocfs2_super *osb)
return 0;
}
-/* we can't grab the goofy sem lock from inside wait_event, so we use
- * memory barriers to make sure that we'll see the null task before
- * being woken up */
static int ocfs2_recovery_thread_running(struct ocfs2_super *osb)
{
- mb();
return osb->recovery_thread_task != NULL;
}
-void ocfs2_recovery_exit(struct ocfs2_super *osb)
+static void ocfs2_recovery_disable(struct ocfs2_super *osb,
+ enum ocfs2_recovery_state state)
{
- struct ocfs2_recovery_map *rm;
-
- /* disable any new recovery threads and wait for any currently
- * running ones to exit. Do this before setting the vol_state. */
mutex_lock(&osb->recovery_lock);
- osb->disable_recovery = 1;
+ /*
+ * If recovery thread is not running, we can directly transition to
+ * final state.
+ */
+ if (!ocfs2_recovery_thread_running(osb)) {
+ osb->recovery_state = state + 1;
+ goto out_lock;
+ }
+ osb->recovery_state = state;
+ /* Wait for recovery thread to acknowledge state transition */
+ wait_event_cmd(osb->recovery_event,
+ !ocfs2_recovery_thread_running(osb) ||
+ osb->recovery_state >= state + 1,
+ mutex_unlock(&osb->recovery_lock),
+ mutex_lock(&osb->recovery_lock));
+out_lock:
mutex_unlock(&osb->recovery_lock);
- wait_event(osb->recovery_event, !ocfs2_recovery_thread_running(osb));
- /* At this point, we know that no more recovery threads can be
- * launched, so wait for any recovery completion work to
- * complete. */
+ /*
+ * At this point we know that no more recovery work can be queued so
+ * wait for any recovery completion work to complete.
+ */
if (osb->ocfs2_wq)
flush_workqueue(osb->ocfs2_wq);
+}
+
+void ocfs2_recovery_disable_quota(struct ocfs2_super *osb)
+{
+ ocfs2_recovery_disable(osb, OCFS2_REC_QUOTA_WANT_DISABLE);
+}
+
+void ocfs2_recovery_exit(struct ocfs2_super *osb)
+{
+ struct ocfs2_recovery_map *rm;
+
+ /* disable any new recovery threads and wait for any currently
+ * running ones to exit. Do this before setting the vol_state. */
+ ocfs2_recovery_disable(osb, OCFS2_REC_WANT_DISABLE);
/*
* Now that recovery is shut down, and the osb is about to be
@@ -1391,6 +1413,18 @@ static int __ocfs2_recovery_thread(void *arg)
}
}
restart:
+ if (quota_enabled) {
+ mutex_lock(&osb->recovery_lock);
+ /* Confirm that recovery thread will no longer recover quotas */
+ if (osb->recovery_state == OCFS2_REC_QUOTA_WANT_DISABLE) {
+ osb->recovery_state = OCFS2_REC_QUOTA_DISABLED;
+ wake_up(&osb->recovery_event);
+ }
+ if (osb->recovery_state >= OCFS2_REC_QUOTA_DISABLED)
+ quota_enabled = 0;
+ mutex_unlock(&osb->recovery_lock);
+ }
+
status = ocfs2_super_lock(osb, 1);
if (status < 0) {
mlog_errno(status);
@@ -1488,13 +1522,13 @@ static int __ocfs2_recovery_thread(void *arg)
ocfs2_free_replay_slots(osb);
osb->recovery_thread_task = NULL;
- mb(); /* sync with ocfs2_recovery_thread_running */
+ if (osb->recovery_state == OCFS2_REC_WANT_DISABLE)
+ osb->recovery_state = OCFS2_REC_DISABLED;
wake_up(&osb->recovery_event);
mutex_unlock(&osb->recovery_lock);
- if (quota_enabled)
- kfree(rm_quota);
+ kfree(rm_quota);
/* no one is callint kthread_stop() for us so the kthread() api
* requires that we call do_exit(). And it isn't exported, but
@@ -1504,14 +1538,16 @@ static int __ocfs2_recovery_thread(void *arg)
void ocfs2_recovery_thread(struct ocfs2_super *osb, int node_num)
{
+ int was_set = -1;
+
mutex_lock(&osb->recovery_lock);
+ if (osb->recovery_state < OCFS2_REC_WANT_DISABLE)
+ was_set = ocfs2_recovery_map_set(osb, node_num);
trace_ocfs2_recovery_thread(node_num, osb->node_num,
- osb->disable_recovery, osb->recovery_thread_task,
- osb->disable_recovery ?
- -1 : ocfs2_recovery_map_set(osb, node_num));
+ osb->recovery_state, osb->recovery_thread_task, was_set);
- if (osb->disable_recovery)
+ if (osb->recovery_state >= OCFS2_REC_WANT_DISABLE)
goto out;
if (osb->recovery_thread_task)
diff --git a/fs/ocfs2/journal.h b/fs/ocfs2/journal.h
index eb7a21bac71e..b6f1a628b7c0 100644
--- a/fs/ocfs2/journal.h
+++ b/fs/ocfs2/journal.h
@@ -150,6 +150,7 @@ void ocfs2_wait_for_recovery(struct ocfs2_super *osb);
int ocfs2_recovery_init(struct ocfs2_super *osb);
void ocfs2_recovery_exit(struct ocfs2_super *osb);
+void ocfs2_recovery_disable_quota(struct ocfs2_super *osb);
int ocfs2_compute_replay_slots(struct ocfs2_super *osb);
void ocfs2_free_replay_slots(struct ocfs2_super *osb);
diff --git a/fs/ocfs2/ocfs2.h b/fs/ocfs2/ocfs2.h
index 0a8cd8e59a92..5cea6942c1bd 100644
--- a/fs/ocfs2/ocfs2.h
+++ b/fs/ocfs2/ocfs2.h
@@ -286,6 +286,21 @@ enum ocfs2_mount_options
#define OCFS2_OSB_ERROR_FS 0x0004
#define OCFS2_DEFAULT_ATIME_QUANTUM 60
+enum ocfs2_recovery_state {
+ OCFS2_REC_ENABLED = 0,
+ OCFS2_REC_QUOTA_WANT_DISABLE,
+ /*
+ * Must be OCFS2_REC_QUOTA_WANT_DISABLE + 1 for
+ * ocfs2_recovery_disable_quota() to work.
+ */
+ OCFS2_REC_QUOTA_DISABLED,
+ OCFS2_REC_WANT_DISABLE,
+ /*
+ * Must be OCFS2_REC_WANT_DISABLE + 1 for ocfs2_recovery_exit() to work
+ */
+ OCFS2_REC_DISABLED,
+};
+
struct ocfs2_journal;
struct ocfs2_slot_info;
struct ocfs2_recovery_map;
@@ -348,7 +363,7 @@ struct ocfs2_super
struct ocfs2_recovery_map *recovery_map;
struct ocfs2_replay_map *replay_map;
struct task_struct *recovery_thread_task;
- int disable_recovery;
+ enum ocfs2_recovery_state recovery_state;
wait_queue_head_t checkpoint_event;
struct ocfs2_journal *journal;
unsigned long osb_commit_interval;
diff --git a/fs/ocfs2/quota_local.c b/fs/ocfs2/quota_local.c
index 77d5aa90338f..1baa68c01c67 100644
--- a/fs/ocfs2/quota_local.c
+++ b/fs/ocfs2/quota_local.c
@@ -453,8 +453,7 @@ struct ocfs2_quota_recovery *ocfs2_begin_quota_recovery(
/* Sync changes in local quota file into global quota file and
* reinitialize local quota file.
- * The function expects local quota file to be already locked and
- * s_umount locked in shared mode. */
+ * The function expects local quota file to be already locked. */
static int ocfs2_recover_local_quota_file(struct inode *lqinode,
int type,
struct ocfs2_quota_recovery *rec)
@@ -585,7 +584,6 @@ int ocfs2_finish_quota_recovery(struct ocfs2_super *osb,
{
unsigned int ino[OCFS2_MAXQUOTAS] = { LOCAL_USER_QUOTA_SYSTEM_INODE,
LOCAL_GROUP_QUOTA_SYSTEM_INODE };
- struct super_block *sb = osb->sb;
struct ocfs2_local_disk_dqinfo *ldinfo;
struct buffer_head *bh;
handle_t *handle;
@@ -597,7 +595,6 @@ int ocfs2_finish_quota_recovery(struct ocfs2_super *osb,
printk(KERN_NOTICE "ocfs2: Finishing quota recovery on device (%s) for "
"slot %u\n", osb->dev_str, slot_num);
- down_read(&sb->s_umount);
for (type = 0; type < OCFS2_MAXQUOTAS; type++) {
if (list_empty(&(rec->r_list[type])))
continue;
@@ -674,7 +671,6 @@ int ocfs2_finish_quota_recovery(struct ocfs2_super *osb,
break;
}
out:
- up_read(&sb->s_umount);
kfree(rec);
return status;
}
@@ -840,8 +836,7 @@ static int ocfs2_local_free_info(struct super_block *sb, int type)
ocfs2_release_local_quota_bitmaps(&oinfo->dqi_chunk);
/*
- * s_umount held in exclusive mode protects us against racing with
- * recovery thread...
+ * ocfs2_dismount_volume() has already aborted quota recovery...
*/
if (oinfo->dqi_rec) {
ocfs2_free_quota_recovery(oinfo->dqi_rec);
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index 6ce2c9fbb9db..0768746381ae 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -1876,6 +1876,9 @@ static void ocfs2_dismount_volume(struct super_block *sb, int mnt_err)
/* Orphan scan should be stopped as early as possible */
ocfs2_orphan_scan_stop(osb);
+ /* Stop quota recovery so that we can disable quotas */
+ ocfs2_recovery_disable_quota(osb);
+
ocfs2_disable_quotas(osb);
/* All dquots should be freed by now */
diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c
index 636892ffec0b..238773a508ba 100644
--- a/fs/orangefs/inode.c
+++ b/fs/orangefs/inode.c
@@ -22,9 +22,9 @@ static int orangefs_writepage_locked(struct page *page,
struct orangefs_write_range *wr = NULL;
struct iov_iter iter;
struct bio_vec bv;
- size_t len, wlen;
+ size_t wlen;
ssize_t ret;
- loff_t off;
+ loff_t len, off;
set_page_writeback(page);
@@ -98,8 +98,7 @@ static int orangefs_writepages_work(struct orangefs_writepages *ow,
struct orangefs_write_range *wrp, wr;
struct iov_iter iter;
ssize_t ret;
- size_t len;
- loff_t off;
+ loff_t len, off;
int i;
len = i_size_read(inode);
diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h
index 927e1205d7aa..202975db784c 100644
--- a/include/drm/drm_atomic.h
+++ b/include/drm/drm_atomic.h
@@ -323,8 +323,27 @@ struct drm_atomic_state {
*
* Allow full modeset. This is used by the ATOMIC IOCTL handler to
* implement the DRM_MODE_ATOMIC_ALLOW_MODESET flag. Drivers should
- * never consult this flag, instead looking at the output of
- * drm_atomic_crtc_needs_modeset().
+ * generally not consult this flag, but instead look at the output of
+ * drm_atomic_crtc_needs_modeset(). The detailed rules are:
+ *
+ * - Drivers must not consult @allow_modeset in the atomic commit path.
+ * Use drm_atomic_crtc_needs_modeset() instead.
+ *
+ * - Drivers must consult @allow_modeset before adding unrelated struct
+ * drm_crtc_state to this commit by calling
+ * drm_atomic_get_crtc_state(). See also the warning in the
+ * documentation for that function.
+ *
+ * - Drivers must never change this flag, it is under the exclusive
+ * control of userspace.
+ *
+ * - Drivers may consult @allow_modeset in the atomic check path, if
+ * they have the choice between an optimal hardware configuration
+ * which requires a modeset, and a less optimal configuration which
+ * can be committed without a modeset. An example would be suboptimal
+ * scanout FIFO allocation resulting in increased idle power
+ * consumption. This allows userspace to avoid flickering and delays
+ * for the normal composition loop at reasonable cost.
*/
bool allow_modeset : 1;
bool legacy_cursor_update : 1;
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h
index a345d9fed3d8..9be00e48b3c3 100644
--- a/include/linux/binfmts.h
+++ b/include/linux/binfmts.h
@@ -93,6 +93,7 @@ struct coredump_params {
unsigned long mm_flags;
loff_t written;
loff_t pos;
+ struct pid *pid;
};
/*
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index 87cbae4b051f..ead09620e213 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -895,10 +895,14 @@ static inline int dma_mmap_wc(struct device *dev,
#else
#define DEFINE_DMA_UNMAP_ADDR(ADDR_NAME)
#define DEFINE_DMA_UNMAP_LEN(LEN_NAME)
-#define dma_unmap_addr(PTR, ADDR_NAME) (0)
-#define dma_unmap_addr_set(PTR, ADDR_NAME, VAL) do { } while (0)
-#define dma_unmap_len(PTR, LEN_NAME) (0)
-#define dma_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0)
+#define dma_unmap_addr(PTR, ADDR_NAME) \
+ ({ typeof(PTR) __p __maybe_unused = PTR; 0; })
+#define dma_unmap_addr_set(PTR, ADDR_NAME, VAL) \
+ do { typeof(PTR) __p __maybe_unused = PTR; } while (0)
+#define dma_unmap_len(PTR, LEN_NAME) \
+ ({ typeof(PTR) __p __maybe_unused = PTR; 0; })
+#define dma_unmap_len_set(PTR, LEN_NAME, VAL) \
+ do { typeof(PTR) __p __maybe_unused = PTR; } while (0)
#endif
#endif
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h
index 35b4e324e17f..7c399831540d 100644
--- a/include/linux/mlx4/device.h
+++ b/include/linux/mlx4/device.h
@@ -1128,7 +1128,7 @@ int mlx4_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt,
int mlx4_buf_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt,
struct mlx4_buf *buf);
-int mlx4_db_alloc(struct mlx4_dev *dev, struct mlx4_db *db, int order);
+int mlx4_db_alloc(struct mlx4_dev *dev, struct mlx4_db *db, unsigned int order);
void mlx4_db_free(struct mlx4_dev *dev, struct mlx4_db *db);
int mlx4_alloc_hwq_res(struct mlx4_dev *dev, struct mlx4_hwq_resources *wqres,
diff --git a/include/linux/pid.h b/include/linux/pid.h
index 9645b1194c98..5216973610fd 100644
--- a/include/linux/pid.h
+++ b/include/linux/pid.h
@@ -75,6 +75,7 @@ extern const struct file_operations pidfd_fops;
struct file;
extern struct pid *pidfd_pid(const struct file *file);
+int pidfd_prepare(struct pid *pid, unsigned int flags, struct file **ret);
static inline struct pid *get_pid(struct pid *pid)
{
@@ -85,6 +86,10 @@ static inline struct pid *get_pid(struct pid *pid)
extern void put_pid(struct pid *pid);
extern struct task_struct *pid_task(struct pid *pid, enum pid_type);
+static inline bool pid_has_task(struct pid *pid, enum pid_type type)
+{
+ return !hlist_empty(&pid->tasks[type]);
+}
extern struct task_struct *get_pid_task(struct pid *pid, enum pid_type);
extern struct pid *get_task_pid(struct task_struct *task, enum pid_type type);
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h
index 18b1ed9864b0..5d39875c6594 100644
--- a/include/linux/rcutree.h
+++ b/include/linux/rcutree.h
@@ -53,7 +53,7 @@ void rcu_scheduler_starting(void);
extern int rcu_scheduler_active __read_mostly;
void rcu_end_inkernel_boot(void);
bool rcu_is_watching(void);
-#ifndef CONFIG_PREEMPTION
+#ifndef CONFIG_PREEMPT_RCU
void rcu_all_qs(void);
#endif
diff --git a/include/linux/types.h b/include/linux/types.h
index 05030f608be3..71e55c06c963 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -114,8 +114,9 @@ typedef u64 u_int64_t;
typedef s64 int64_t;
#endif
-/* this is a special 64bit data type that is 8-byte aligned */
+/* These are the special 64-bit data types that are 8-byte aligned */
#define aligned_u64 __aligned_u64
+#define aligned_s64 __aligned_s64
#define aligned_be64 __aligned_be64
#define aligned_le64 __aligned_le64
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index 299e35458863..b887ffee0153 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -1319,6 +1319,8 @@ int snd_pcm_lib_mmap_iomem(struct snd_pcm_substream *substream, struct vm_area_s
#define snd_pcm_lib_mmap_iomem NULL
#endif
+void snd_pcm_runtime_buffer_set_silence(struct snd_pcm_runtime *runtime);
+
/**
* snd_pcm_limit_isa_dma_size - Get the max size fitting with ISA DMA transfer
* @dma: DMA number
diff --git a/include/trace/events/btrfs.h b/include/trace/events/btrfs.h
index 94a3adb65b8a..fe4d7e165050 100644
--- a/include/trace/events/btrfs.h
+++ b/include/trace/events/btrfs.h
@@ -1773,7 +1773,7 @@ DECLARE_EVENT_CLASS(btrfs__prelim_ref,
TP_PROTO(const struct btrfs_fs_info *fs_info,
const struct prelim_ref *oldref,
const struct prelim_ref *newref, u64 tree_size),
- TP_ARGS(fs_info, newref, oldref, tree_size),
+ TP_ARGS(fs_info, oldref, newref, tree_size),
TP_STRUCT__entry_btrfs(
__field( u64, root_id )
diff --git a/include/uapi/linux/types.h b/include/uapi/linux/types.h
index 2fce8b6876e9..cf5f4617ba5a 100644
--- a/include/uapi/linux/types.h
+++ b/include/uapi/linux/types.h
@@ -46,6 +46,7 @@ typedef __u32 __bitwise __wsum;
* No conversions are necessary between 32-bit user-space and a 64-bit kernel.
*/
#define __aligned_u64 __u64 __attribute__((aligned(8)))
+#define __aligned_s64 __s64 __attribute__((aligned(8)))
#define __aligned_be64 __be64 __attribute__((aligned(8)))
#define __aligned_le64 __le64 __attribute__((aligned(8)))
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index 273a8a42cb72..801022a8899b 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -81,7 +81,7 @@
DEFINE_MUTEX(cgroup_mutex);
DEFINE_SPINLOCK(css_set_lock);
-#ifdef CONFIG_PROVE_RCU
+#if (defined CONFIG_PROVE_RCU || defined CONFIG_LOCKDEP)
EXPORT_SYMBOL_GPL(cgroup_mutex);
EXPORT_SYMBOL_GPL(css_set_lock);
#endif
diff --git a/kernel/fork.c b/kernel/fork.c
index 1728aa77861c..e71f96bff1dc 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1703,10 +1703,16 @@ static int pidfd_release(struct inode *inode, struct file *file)
#ifdef CONFIG_PROC_FS
static void pidfd_show_fdinfo(struct seq_file *m, struct file *f)
{
- struct pid_namespace *ns = proc_pid_ns(file_inode(m->file));
struct pid *pid = f->private_data;
+ struct pid_namespace *ns;
+ pid_t nr = -1;
- seq_put_decimal_ull(m, "Pid:\t", pid_nr_ns(pid, ns));
+ if (likely(pid_has_task(pid, PIDTYPE_PID))) {
+ ns = proc_pid_ns(file_inode(m->file));
+ nr = pid_nr_ns(pid, ns);
+ }
+
+ seq_put_decimal_ll(m, "Pid:\t", nr);
seq_putc(m, '\n');
}
#endif
@@ -1744,6 +1750,91 @@ const struct file_operations pidfd_fops = {
#endif
};
+/**
+ * __pidfd_prepare - allocate a new pidfd_file and reserve a pidfd
+ * @pid: the struct pid for which to create a pidfd
+ * @flags: flags of the new @pidfd
+ * @pidfd: the pidfd to return
+ *
+ * Allocate a new file that stashes @pid and reserve a new pidfd number in the
+ * caller's file descriptor table. The pidfd is reserved but not installed yet.
+
+ * The helper doesn't perform checks on @pid which makes it useful for pidfds
+ * created via CLONE_PIDFD where @pid has no task attached when the pidfd and
+ * pidfd file are prepared.
+ *
+ * If this function returns successfully the caller is responsible to either
+ * call fd_install() passing the returned pidfd and pidfd file as arguments in
+ * order to install the pidfd into its file descriptor table or they must use
+ * put_unused_fd() and fput() on the returned pidfd and pidfd file
+ * respectively.
+ *
+ * This function is useful when a pidfd must already be reserved but there
+ * might still be points of failure afterwards and the caller wants to ensure
+ * that no pidfd is leaked into its file descriptor table.
+ *
+ * Return: On success, a reserved pidfd is returned from the function and a new
+ * pidfd file is returned in the last argument to the function. On
+ * error, a negative error code is returned from the function and the
+ * last argument remains unchanged.
+ */
+static int __pidfd_prepare(struct pid *pid, unsigned int flags, struct file **ret)
+{
+ int pidfd;
+ struct file *pidfd_file;
+
+ if (flags & ~(O_NONBLOCK | O_RDWR | O_CLOEXEC))
+ return -EINVAL;
+
+ pidfd = get_unused_fd_flags(O_RDWR | O_CLOEXEC);
+ if (pidfd < 0)
+ return pidfd;
+
+ pidfd_file = anon_inode_getfile("[pidfd]", &pidfd_fops, pid,
+ flags | O_RDWR | O_CLOEXEC);
+ if (IS_ERR(pidfd_file)) {
+ put_unused_fd(pidfd);
+ return PTR_ERR(pidfd_file);
+ }
+ get_pid(pid); /* held by pidfd_file now */
+ *ret = pidfd_file;
+ return pidfd;
+}
+
+/**
+ * pidfd_prepare - allocate a new pidfd_file and reserve a pidfd
+ * @pid: the struct pid for which to create a pidfd
+ * @flags: flags of the new @pidfd
+ * @pidfd: the pidfd to return
+ *
+ * Allocate a new file that stashes @pid and reserve a new pidfd number in the
+ * caller's file descriptor table. The pidfd is reserved but not installed yet.
+ *
+ * The helper verifies that @pid is used as a thread group leader.
+ *
+ * If this function returns successfully the caller is responsible to either
+ * call fd_install() passing the returned pidfd and pidfd file as arguments in
+ * order to install the pidfd into its file descriptor table or they must use
+ * put_unused_fd() and fput() on the returned pidfd and pidfd file
+ * respectively.
+ *
+ * This function is useful when a pidfd must already be reserved but there
+ * might still be points of failure afterwards and the caller wants to ensure
+ * that no pidfd is leaked into its file descriptor table.
+ *
+ * Return: On success, a reserved pidfd is returned from the function and a new
+ * pidfd file is returned in the last argument to the function. On
+ * error, a negative error code is returned from the function and the
+ * last argument remains unchanged.
+ */
+int pidfd_prepare(struct pid *pid, unsigned int flags, struct file **ret)
+{
+ if (!pid || !pid_has_task(pid, PIDTYPE_TGID))
+ return -EINVAL;
+
+ return __pidfd_prepare(pid, flags, ret);
+}
+
static void __delayed_free_task(struct rcu_head *rhp)
{
struct task_struct *tsk = container_of(rhp, struct task_struct, rcu);
@@ -2064,21 +2155,12 @@ static __latent_entropy struct task_struct *copy_process(
* if the fd table isn't shared).
*/
if (clone_flags & CLONE_PIDFD) {
- retval = get_unused_fd_flags(O_RDWR | O_CLOEXEC);
+ /* Note that no task has been attached to @pid yet. */
+ retval = __pidfd_prepare(pid, O_RDWR | O_CLOEXEC, &pidfile);
if (retval < 0)
goto bad_fork_free_pid;
-
pidfd = retval;
- pidfile = anon_inode_getfile("[pidfd]", &pidfd_fops, pid,
- O_RDWR | O_CLOEXEC);
- if (IS_ERR(pidfile)) {
- put_unused_fd(pidfd);
- retval = PTR_ERR(pidfile);
- goto bad_fork_free_pid;
- }
- get_pid(pid); /* held by pidfile now */
-
retval = put_user(pidfd, args->pidfd);
if (retval)
goto bad_fork_put_pidfd;
diff --git a/kernel/params.c b/kernel/params.c
index b638476d12de..6639d6eec6bd 100644
--- a/kernel/params.c
+++ b/kernel/params.c
@@ -946,7 +946,9 @@ int module_sysfs_initialized;
static void module_kobj_release(struct kobject *kobj)
{
struct module_kobject *mk = to_module_kobject(kobj);
- complete(mk->kobj_completion);
+
+ if (mk->kobj_completion)
+ complete(mk->kobj_completion);
}
struct kobj_type module_ktype = {
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index 2c127d438fe0..1d9f2831b54e 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -902,13 +902,16 @@ static void rcu_preempt_check_blocked_tasks(struct rcu_node *rnp)
*/
static void rcu_flavor_sched_clock_irq(int user)
{
- if (user || rcu_is_cpu_rrupt_from_idle()) {
+ if (user || rcu_is_cpu_rrupt_from_idle() ||
+ (IS_ENABLED(CONFIG_PREEMPT_COUNT) &&
+ (preempt_count() == HARDIRQ_OFFSET))) {
/*
* Get here if this CPU took its interrupt from user
- * mode or from the idle loop, and if this is not a
- * nested interrupt. In this case, the CPU is in
- * a quiescent state, so note it.
+ * mode, from the idle loop without this being a nested
+ * interrupt, or while not holding the task preempt count
+ * (with PREEMPT_COUNT=y). In this case, the CPU is in a
+ * quiescent state, so note it.
*
* No memory barrier is required here because rcu_qs()
* references only CPU-local variables that other CPUs
diff --git a/kernel/time/posix-timers.c b/kernel/time/posix-timers.c
index f3b8313475ac..2a2e4f6622ae 100644
--- a/kernel/time/posix-timers.c
+++ b/kernel/time/posix-timers.c
@@ -159,6 +159,7 @@ static int posix_timer_add(struct k_itimer *timer)
return id;
}
spin_unlock(&hash_lock);
+ cond_resched();
}
/* POSIX return code when no timer ID could be allocated */
return -EAGAIN;
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index d084334193bd..06c12d873c17 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -6331,13 +6331,14 @@ static ssize_t tracing_splice_read_pipe(struct file *filp,
/* Copy the data into the page, so we can start over. */
ret = trace_seq_to_buffer(&iter->seq,
page_address(spd.pages[i]),
- trace_seq_used(&iter->seq));
+ min((size_t)trace_seq_used(&iter->seq),
+ PAGE_SIZE));
if (ret < 0) {
__free_page(spd.pages[i]);
break;
}
spd.partial[i].offset = 0;
- spd.partial[i].len = trace_seq_used(&iter->seq);
+ spd.partial[i].len = ret;
trace_seq_init(&iter->seq);
}
diff --git a/lib/dynamic_queue_limits.c b/lib/dynamic_queue_limits.c
index e659a027036e..f6807062b32a 100644
--- a/lib/dynamic_queue_limits.c
+++ b/lib/dynamic_queue_limits.c
@@ -116,7 +116,7 @@ EXPORT_SYMBOL(dql_completed);
void dql_reset(struct dql *dql)
{
/* Reset all dynamic values */
- dql->limit = 0;
+ dql->limit = dql->min_limit;
dql->num_queued = 0;
dql->num_completed = 0;
dql->last_obj_cnt = 0;
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 6f5565553e5f..2026e32d62a6 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1221,7 +1221,6 @@ int mem_cgroup_scan_tasks(struct mem_cgroup *memcg,
{
struct mem_cgroup *iter;
int ret = 0;
- int i = 0;
BUG_ON(memcg == root_mem_cgroup);
@@ -1231,10 +1230,9 @@ int mem_cgroup_scan_tasks(struct mem_cgroup *memcg,
css_task_iter_start(&iter->css, CSS_TASK_ITER_PROCS, &it);
while (!ret && (task = css_task_iter_next(&it))) {
- /* Avoid potential softlockup warning */
- if ((++i & 1023) == 0)
- cond_resched();
ret = fn(task, arg);
+ /* Avoid potential softlockup warning */
+ cond_resched();
}
css_task_iter_end(&it);
if (ret) {
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index a0c01c3575bc..66e4b78786a9 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -4573,6 +4573,14 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
}
retry:
+ /*
+ * Deal with possible cpuset update races or zonelist updates to avoid
+ * infinite retries.
+ */
+ if (check_retry_cpuset(cpuset_mems_cookie, ac) ||
+ check_retry_zonelist(zonelist_iter_cookie))
+ goto restart;
+
/* Ensure kswapd doesn't accidentally go to sleep as long as we loop */
if (alloc_flags & ALLOC_KSWAPD)
wake_all_kswapds(order, gfp_mask, ac);
diff --git a/net/bridge/br_nf_core.c b/net/bridge/br_nf_core.c
index 8c69f0c95a8e..b8c8deb87407 100644
--- a/net/bridge/br_nf_core.c
+++ b/net/bridge/br_nf_core.c
@@ -65,17 +65,14 @@ static struct dst_ops fake_dst_ops = {
* ipt_REJECT needs it. Future netfilter modules might
* require us to fill additional fields.
*/
-static const u32 br_dst_default_metrics[RTAX_MAX] = {
- [RTAX_MTU - 1] = 1500,
-};
-
void br_netfilter_rtable_init(struct net_bridge *br)
{
struct rtable *rt = &br->fake_rtable;
atomic_set(&rt->dst.__refcnt, 1);
rt->dst.dev = br->dev;
- dst_init_metrics(&rt->dst, br_dst_default_metrics, true);
+ dst_init_metrics(&rt->dst, br->metrics, false);
+ dst_metric_set(&rt->dst, RTAX_MTU, br->dev->mtu);
rt->dst.flags = DST_NOXFRM | DST_FAKE_RTABLE;
rt->dst.ops = &fake_dst_ops;
}
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
index 5ba4620727a7..eb0b1b513feb 100644
--- a/net/bridge/br_private.h
+++ b/net/bridge/br_private.h
@@ -346,6 +346,7 @@ struct net_bridge {
struct rtable fake_rtable;
struct rt6_info fake_rt6_info;
};
+ u32 metrics[RTAX_MAX];
#endif
u16 group_fwd_mask;
u16 group_fwd_mask_required;
diff --git a/net/can/bcm.c b/net/can/bcm.c
index 1b5409b39a75..ccf15fc2353c 100644
--- a/net/can/bcm.c
+++ b/net/can/bcm.c
@@ -58,6 +58,7 @@
#include <linux/can/skb.h>
#include <linux/can/bcm.h>
#include <linux/slab.h>
+#include <linux/spinlock.h>
#include <net/sock.h>
#include <net/net_namespace.h>
@@ -122,6 +123,7 @@ struct bcm_op {
struct canfd_frame last_sframe;
struct sock *sk;
struct net_device *rx_reg_dev;
+ spinlock_t bcm_tx_lock; /* protect currframe/count in runtime updates */
};
struct bcm_sock {
@@ -207,7 +209,9 @@ static int bcm_proc_show(struct seq_file *m, void *v)
seq_printf(m, " / bound %s", bcm_proc_getifname(net, ifname, bo->ifindex));
seq_printf(m, " <<<\n");
- list_for_each_entry(op, &bo->rx_ops, list) {
+ rcu_read_lock();
+
+ list_for_each_entry_rcu(op, &bo->rx_ops, list) {
unsigned long reduction;
@@ -263,6 +267,9 @@ static int bcm_proc_show(struct seq_file *m, void *v)
seq_printf(m, "# sent %ld\n", op->frames_abs);
}
seq_putc(m, '\n');
+
+ rcu_read_unlock();
+
return 0;
}
#endif /* CONFIG_PROC_FS */
@@ -275,13 +282,18 @@ static void bcm_can_tx(struct bcm_op *op)
{
struct sk_buff *skb;
struct net_device *dev;
- struct canfd_frame *cf = op->frames + op->cfsiz * op->currframe;
+ struct canfd_frame *cf;
int err;
/* no target device? => exit */
if (!op->ifindex)
return;
+ /* read currframe under lock protection */
+ spin_lock_bh(&op->bcm_tx_lock);
+ cf = op->frames + op->cfsiz * op->currframe;
+ spin_unlock_bh(&op->bcm_tx_lock);
+
dev = dev_get_by_index(sock_net(op->sk), op->ifindex);
if (!dev) {
/* RFC: should this bcm_op remove itself here? */
@@ -302,6 +314,10 @@ static void bcm_can_tx(struct bcm_op *op)
skb->dev = dev;
can_skb_set_owner(skb, op->sk);
err = can_send(skb, 1);
+
+ /* update currframe and count under lock protection */
+ spin_lock_bh(&op->bcm_tx_lock);
+
if (!err)
op->frames_abs++;
@@ -310,6 +326,11 @@ static void bcm_can_tx(struct bcm_op *op)
/* reached last frame? */
if (op->currframe >= op->nframes)
op->currframe = 0;
+
+ if (op->count > 0)
+ op->count--;
+
+ spin_unlock_bh(&op->bcm_tx_lock);
out:
dev_put(dev);
}
@@ -406,7 +427,7 @@ static enum hrtimer_restart bcm_tx_timeout_handler(struct hrtimer *hrtimer)
struct bcm_msg_head msg_head;
if (op->kt_ival1 && (op->count > 0)) {
- op->count--;
+ bcm_can_tx(op);
if (!op->count && (op->flags & TX_COUNTEVT)) {
/* create notification to user */
@@ -421,7 +442,6 @@ static enum hrtimer_restart bcm_tx_timeout_handler(struct hrtimer *hrtimer)
bcm_send_to_user(op, &msg_head, NULL, 0);
}
- bcm_can_tx(op);
} else if (op->kt_ival2) {
bcm_can_tx(op);
@@ -798,7 +818,7 @@ static int bcm_delete_rx_op(struct list_head *ops, struct bcm_msg_head *mh,
REGMASK(op->can_id),
bcm_rx_handler, op);
- list_del(&op->list);
+ list_del_rcu(&op->list);
bcm_remove_op(op);
return 1; /* done */
}
@@ -818,7 +838,7 @@ static int bcm_delete_tx_op(struct list_head *ops, struct bcm_msg_head *mh,
list_for_each_entry_safe(op, n, ops, list) {
if ((op->can_id == mh->can_id) && (op->ifindex == ifindex) &&
(op->flags & CAN_FD_FRAME) == (mh->flags & CAN_FD_FRAME)) {
- list_del(&op->list);
+ list_del_rcu(&op->list);
bcm_remove_op(op);
return 1; /* done */
}
@@ -911,6 +931,27 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
}
op->flags = msg_head->flags;
+ /* only lock for unlikely count/nframes/currframe changes */
+ if (op->nframes != msg_head->nframes ||
+ op->flags & TX_RESET_MULTI_IDX ||
+ op->flags & SETTIMER) {
+
+ spin_lock_bh(&op->bcm_tx_lock);
+
+ if (op->nframes != msg_head->nframes ||
+ op->flags & TX_RESET_MULTI_IDX) {
+ /* potentially update changed nframes */
+ op->nframes = msg_head->nframes;
+ /* restart multiple frame transmission */
+ op->currframe = 0;
+ }
+
+ if (op->flags & SETTIMER)
+ op->count = msg_head->count;
+
+ spin_unlock_bh(&op->bcm_tx_lock);
+ }
+
} else {
/* insert new BCM operation for the given can_id */
@@ -918,9 +959,14 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
if (!op)
return -ENOMEM;
+ spin_lock_init(&op->bcm_tx_lock);
op->can_id = msg_head->can_id;
op->cfsiz = CFSIZ(msg_head->flags);
op->flags = msg_head->flags;
+ op->nframes = msg_head->nframes;
+
+ if (op->flags & SETTIMER)
+ op->count = msg_head->count;
/* create array for CAN frames and copy the data */
if (msg_head->nframes > 1) {
@@ -979,22 +1025,8 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
} /* if ((op = bcm_find_op(&bo->tx_ops, msg_head->can_id, ifindex))) */
- if (op->nframes != msg_head->nframes) {
- op->nframes = msg_head->nframes;
- /* start multiple frame transmission with index 0 */
- op->currframe = 0;
- }
-
- /* check flags */
-
- if (op->flags & TX_RESET_MULTI_IDX) {
- /* start multiple frame transmission with index 0 */
- op->currframe = 0;
- }
-
if (op->flags & SETTIMER) {
/* set timer values */
- op->count = msg_head->count;
op->ival1 = msg_head->ival1;
op->ival2 = msg_head->ival2;
op->kt_ival1 = bcm_timeval_to_ktime(msg_head->ival1);
@@ -1011,11 +1043,8 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
op->flags |= TX_ANNOUNCE;
}
- if (op->flags & TX_ANNOUNCE) {
+ if (op->flags & TX_ANNOUNCE)
bcm_can_tx(op);
- if (op->count)
- op->count--;
- }
if (op->flags & STARTTIMER)
bcm_tx_start_timer(op);
@@ -1231,7 +1260,7 @@ static int bcm_rx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
bcm_rx_handler, op, "bcm", sk);
if (err) {
/* this bcm rx op is broken -> remove it */
- list_del(&op->list);
+ list_del_rcu(&op->list);
bcm_remove_op(op);
return err;
}
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 5e9bd9d80b39..4fd66e6466d2 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -805,6 +805,10 @@ static ssize_t get_labels(const char __user *buffer, struct pktgen_dev *pkt_dev)
pkt_dev->nr_labels = 0;
do {
__u32 tmp;
+
+ if (n >= MAX_MPLS_LABELS)
+ return -E2BIG;
+
len = hex32_arg(&buffer[i], 8, &tmp);
if (len <= 0)
return len;
@@ -816,8 +820,6 @@ static ssize_t get_labels(const char __user *buffer, struct pktgen_dev *pkt_dev)
return -EFAULT;
i++;
n++;
- if (n >= MAX_MPLS_LABELS)
- return -E2BIG;
} while (c == ',');
pkt_dev->nr_labels = n;
@@ -1768,8 +1770,8 @@ static ssize_t pktgen_thread_write(struct file *file,
i = len;
/* Read variable name */
-
- len = strn_len(&user_buffer[i], sizeof(name) - 1);
+ max = min(sizeof(name) - 1, count - i);
+ len = strn_len(&user_buffer[i], max);
if (len < 0)
return len;
@@ -1799,7 +1801,8 @@ static ssize_t pktgen_thread_write(struct file *file,
if (!strcmp(name, "add_device")) {
char f[32];
memset(f, 0, 32);
- len = strn_len(&user_buffer[i], sizeof(f) - 1);
+ max = min(sizeof(f) - 1, count - i);
+ len = strn_len(&user_buffer[i], max);
if (len < 0) {
ret = len;
goto out;
diff --git a/net/ipv4/fib_rules.c b/net/ipv4/fib_rules.c
index e9a3cc9e98df..1617ea18fae3 100644
--- a/net/ipv4/fib_rules.c
+++ b/net/ipv4/fib_rules.c
@@ -220,9 +220,9 @@ static int fib4_rule_configure(struct fib_rule *rule, struct sk_buff *skb,
struct nlattr **tb,
struct netlink_ext_ack *extack)
{
- struct net *net = sock_net(skb->sk);
+ struct fib4_rule *rule4 = (struct fib4_rule *)rule;
+ struct net *net = rule->fr_net;
int err = -EINVAL;
- struct fib4_rule *rule4 = (struct fib4_rule *) rule;
if (frh->tos & ~IPTOS_TOS_MASK) {
NL_SET_ERR_MSG(extack, "Invalid tos");
diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c
index 3cf9dc223103..acb8610c9a9d 100644
--- a/net/ipv6/fib6_rules.c
+++ b/net/ipv6/fib6_rules.c
@@ -344,9 +344,9 @@ static int fib6_rule_configure(struct fib_rule *rule, struct sk_buff *skb,
struct nlattr **tb,
struct netlink_ext_ack *extack)
{
+ struct fib6_rule *rule6 = (struct fib6_rule *)rule;
+ struct net *net = rule->fr_net;
int err = -EINVAL;
- struct net *net = sock_net(skb->sk);
- struct fib6_rule *rule6 = (struct fib6_rule *) rule;
if (rule->action == FR_ACT_TO_TBL && !rule->l3mdev) {
if (rule->table == RT6_TABLE_UNSPEC) {
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c
index d57bfce94d60..390fcbe885b1 100644
--- a/net/llc/af_llc.c
+++ b/net/llc/af_llc.c
@@ -885,15 +885,15 @@ static int llc_ui_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
if (sk->sk_type != SOCK_STREAM)
goto copy_uaddr;
+ /* Partial read */
+ if (used + offset < skb_len)
+ continue;
+
if (!(flags & MSG_PEEK)) {
skb_unlink(skb, &sk->sk_receive_queue);
kfree_skb(skb);
*seq = 0;
}
-
- /* Partial read */
- if (used + offset < skb_len)
- continue;
} while (len > 0);
out:
diff --git a/net/netfilter/ipset/ip_set_hash_gen.h b/net/netfilter/ipset/ip_set_hash_gen.h
index 30b8b3fad150..297631f9717b 100644
--- a/net/netfilter/ipset/ip_set_hash_gen.h
+++ b/net/netfilter/ipset/ip_set_hash_gen.h
@@ -88,7 +88,7 @@ struct hbucket {
#define ahash_sizeof_regions(htable_bits) \
(ahash_numof_locks(htable_bits) * sizeof(struct ip_set_region))
#define ahash_region(n, htable_bits) \
- ((n) % ahash_numof_locks(htable_bits))
+ ((n) / jhash_size(HTABLE_REGION_BITS))
#define ahash_bucket_start(h, htable_bits) \
((htable_bits) < HTABLE_REGION_BITS ? 0 \
: (h) * jhash_size(HTABLE_REGION_BITS))
diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c
index 1e3dbed9d784..de330dffa0a2 100644
--- a/net/netfilter/nf_conntrack_standalone.c
+++ b/net/netfilter/nf_conntrack_standalone.c
@@ -608,7 +608,9 @@ static struct ctl_table nf_ct_sysctl_table[] = {
.data = &nf_conntrack_max,
.maxlen = sizeof(int),
.mode = 0644,
- .proc_handler = proc_dointvec,
+ .proc_handler = proc_dointvec_minmax,
+ .extra1 = SYSCTL_ZERO,
+ .extra2 = SYSCTL_INT_MAX,
},
[NF_SYSCTL_CT_COUNT] = {
.procname = "nf_conntrack_count",
@@ -647,7 +649,9 @@ static struct ctl_table nf_ct_sysctl_table[] = {
.data = &nf_ct_expect_max,
.maxlen = sizeof(int),
.mode = 0644,
- .proc_handler = proc_dointvec,
+ .proc_handler = proc_dointvec_minmax,
+ .extra1 = SYSCTL_ONE,
+ .extra2 = SYSCTL_INT_MAX,
},
[NF_SYSCTL_CT_ACCT] = {
.procname = "nf_conntrack_acct",
@@ -926,7 +930,9 @@ static struct ctl_table nf_ct_netfilter_table[] = {
.data = &nf_conntrack_max,
.maxlen = sizeof(int),
.mode = 0644,
- .proc_handler = proc_dointvec,
+ .proc_handler = proc_dointvec_minmax,
+ .extra1 = SYSCTL_ZERO,
+ .extra2 = SYSCTL_INT_MAX,
},
{ }
};
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index 7812cc3cc751..9e20fb759cb8 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -1675,10 +1675,8 @@ static void nf_tables_chain_free_chain_rules(struct nft_chain *chain)
kvfree(chain->rules_next);
}
-static void nf_tables_chain_destroy(struct nft_ctx *ctx)
+void nf_tables_chain_destroy(struct nft_chain *chain)
{
- struct nft_chain *chain = ctx->chain;
-
if (WARN_ON(chain->use > 0))
return;
@@ -1929,7 +1927,7 @@ static int nf_tables_addchain(struct nft_ctx *ctx, u8 family, u8 genmask,
err_use:
nf_tables_unregister_hook(net, table, chain);
err1:
- nf_tables_chain_destroy(ctx);
+ nf_tables_chain_destroy(chain);
return err;
}
@@ -2825,6 +2823,8 @@ static void nf_tables_rule_destroy(const struct nft_ctx *ctx,
static void nf_tables_rule_release(const struct nft_ctx *ctx,
struct nft_rule *rule)
{
+ lockdep_commit_lock_is_held(ctx->net);
+
nft_rule_expr_deactivate(ctx, rule, NFT_TRANS_RELEASE);
nf_tables_rule_destroy(ctx, rule);
}
@@ -4173,6 +4173,8 @@ void nf_tables_deactivate_set(const struct nft_ctx *ctx, struct nft_set *set,
struct nft_set_binding *binding,
enum nft_trans_phase phase)
{
+ lockdep_commit_lock_is_held(ctx->net);
+
switch (phase) {
case NFT_TRANS_PREPARE_ERROR:
nft_set_trans_unbind(ctx, set);
@@ -6905,7 +6907,7 @@ static void nft_commit_release(struct nft_trans *trans)
kfree(nft_trans_chain_name(trans));
break;
case NFT_MSG_DELCHAIN:
- nf_tables_chain_destroy(&trans->ctx);
+ nf_tables_chain_destroy(trans->ctx.chain);
break;
case NFT_MSG_DELRULE:
nf_tables_rule_destroy(&trans->ctx, nft_trans_rule(trans));
@@ -7582,7 +7584,7 @@ static void nf_tables_abort_release(struct nft_trans *trans)
nf_tables_table_destroy(&trans->ctx);
break;
case NFT_MSG_NEWCHAIN:
- nf_tables_chain_destroy(&trans->ctx);
+ nf_tables_chain_destroy(trans->ctx.chain);
break;
case NFT_MSG_NEWRULE:
nf_tables_rule_destroy(&trans->ctx, nft_trans_rule(trans));
@@ -8218,23 +8220,43 @@ int nft_data_dump(struct sk_buff *skb, int attr, const struct nft_data *data,
}
EXPORT_SYMBOL_GPL(nft_data_dump);
-int __nft_release_basechain(struct nft_ctx *ctx)
+static void __nft_release_basechain_now(struct nft_ctx *ctx)
{
struct nft_rule *rule, *nr;
- if (WARN_ON(!nft_is_base_chain(ctx->chain)))
- return 0;
-
- nf_tables_unregister_hook(ctx->net, ctx->chain->table, ctx->chain);
list_for_each_entry_safe(rule, nr, &ctx->chain->rules, list) {
list_del(&rule->list);
- nft_use_dec(&ctx->chain->use);
nf_tables_rule_release(ctx, rule);
}
+ nf_tables_chain_destroy(ctx->chain);
+}
+
+int __nft_release_basechain(struct nft_ctx *ctx)
+{
+ struct nft_rule *rule;
+
+ if (WARN_ON_ONCE(!nft_is_base_chain(ctx->chain)))
+ return 0;
+
+ nf_tables_unregister_hook(ctx->net, ctx->chain->table, ctx->chain);
+ list_for_each_entry(rule, &ctx->chain->rules, list)
+ nft_use_dec(&ctx->chain->use);
+
nft_chain_del(ctx->chain);
nft_use_dec(&ctx->table->use);
- nf_tables_chain_destroy(ctx);
+ if (!maybe_get_net(ctx->net)) {
+ __nft_release_basechain_now(ctx);
+ return 0;
+ }
+
+ /* wait for ruleset dumps to complete. Owning chain is no longer in
+ * lists, so new dumps can't find any of these rules anymore.
+ */
+ synchronize_rcu();
+
+ __nft_release_basechain_now(ctx);
+ put_net(ctx->net);
return 0;
}
EXPORT_SYMBOL_GPL(__nft_release_basechain);
@@ -8300,10 +8322,9 @@ static void __nft_release_table(struct net *net, struct nft_table *table)
nft_obj_destroy(&ctx, obj);
}
list_for_each_entry_safe(chain, nc, &table->chains, list) {
- ctx.chain = chain;
nft_chain_del(chain);
nft_use_dec(&table->use);
- nf_tables_chain_destroy(&ctx);
+ nf_tables_chain_destroy(chain);
}
list_del(&table->list);
nf_tables_table_destroy(&ctx);
diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c
index 815a55fa7356..5af7fe6312cf 100644
--- a/net/openvswitch/actions.c
+++ b/net/openvswitch/actions.c
@@ -967,8 +967,7 @@ static int output_userspace(struct datapath *dp, struct sk_buff *skb,
upcall.cmd = OVS_PACKET_CMD_ACTION;
upcall.mru = OVS_CB(skb)->mru;
- for (a = nla_data(attr), rem = nla_len(attr); rem > 0;
- a = nla_next(a, &rem)) {
+ nla_for_each_nested(a, attr, rem) {
switch (nla_type(a)) {
case OVS_USERSPACE_ATTR_USERDATA:
upcall.userdata = a;
diff --git a/net/sched/sch_drr.c b/net/sched/sch_drr.c
index 07a2b0b35495..1a0571806342 100644
--- a/net/sched/sch_drr.c
+++ b/net/sched/sch_drr.c
@@ -36,6 +36,11 @@ struct drr_sched {
struct Qdisc_class_hash clhash;
};
+static bool cl_is_active(struct drr_class *cl)
+{
+ return !list_empty(&cl->alist);
+}
+
static struct drr_class *drr_find_class(struct Qdisc *sch, u32 classid)
{
struct drr_sched *q = qdisc_priv(sch);
@@ -344,7 +349,6 @@ static int drr_enqueue(struct sk_buff *skb, struct Qdisc *sch,
struct drr_sched *q = qdisc_priv(sch);
struct drr_class *cl;
int err = 0;
- bool first;
cl = drr_classify(skb, sch, &err);
if (cl == NULL) {
@@ -354,7 +358,6 @@ static int drr_enqueue(struct sk_buff *skb, struct Qdisc *sch,
return err;
}
- first = !cl->qdisc->q.qlen;
err = qdisc_enqueue(skb, cl->qdisc, to_free);
if (unlikely(err != NET_XMIT_SUCCESS)) {
if (net_xmit_drop_count(err)) {
@@ -364,7 +367,7 @@ static int drr_enqueue(struct sk_buff *skb, struct Qdisc *sch,
return err;
}
- if (first) {
+ if (!cl_is_active(cl)) {
list_add_tail(&cl->alist, &q->active);
cl->deficit = cl->quantum;
}
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c
index 79c63c4610d3..0f57dd39b6b8 100644
--- a/net/sched/sch_hfsc.c
+++ b/net/sched/sch_hfsc.c
@@ -176,6 +176,11 @@ struct hfsc_sched {
#define HT_INFINITY 0xffffffffffffffffULL /* infinite time value */
+static bool cl_in_el_or_vttree(struct hfsc_class *cl)
+{
+ return ((cl->cl_flags & HFSC_FSC) && cl->cl_nactive) ||
+ ((cl->cl_flags & HFSC_RSC) && !RB_EMPTY_NODE(&cl->el_node));
+}
/*
* eligible tree holds backlogged classes being sorted by their eligible times.
@@ -1038,6 +1043,8 @@ hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid,
if (cl == NULL)
return -ENOBUFS;
+ RB_CLEAR_NODE(&cl->el_node);
+
err = tcf_block_get(&cl->block, &cl->filter_list, sch, extack);
if (err) {
kfree(cl);
@@ -1573,7 +1580,10 @@ hfsc_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free)
return err;
}
- if (first) {
+ sch->qstats.backlog += len;
+ sch->q.qlen++;
+
+ if (first && !cl_in_el_or_vttree(cl)) {
if (cl->cl_flags & HFSC_RSC)
init_ed(cl, len);
if (cl->cl_flags & HFSC_FSC)
@@ -1588,9 +1598,6 @@ hfsc_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free)
}
- sch->qstats.backlog += len;
- sch->q.qlen++;
-
return NET_XMIT_SUCCESS;
}
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index 4cdf2dd04701..c618aae25b09 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -331,7 +331,8 @@ static void htb_add_to_wait_tree(struct htb_sched *q,
*/
static inline void htb_next_rb_node(struct rb_node **n)
{
- *n = rb_next(*n);
+ if (*n)
+ *n = rb_next(*n);
}
/**
@@ -573,8 +574,8 @@ static inline void htb_activate(struct htb_sched *q, struct htb_class *cl)
*/
static inline void htb_deactivate(struct htb_sched *q, struct htb_class *cl)
{
- WARN_ON(!cl->prio_activity);
-
+ if (!cl->prio_activity)
+ return;
htb_deactivate_prios(q, cl);
cl->prio_activity = 0;
}
@@ -1280,8 +1281,7 @@ static int htb_delete(struct Qdisc *sch, unsigned long arg)
if (cl->parent)
cl->parent->children--;
- if (cl->prio_activity)
- htb_deactivate(q, cl);
+ htb_deactivate(q, cl);
if (cl->cmode != HTB_CAN_SEND)
htb_safe_rb_erase(&cl->pq_node,
@@ -1406,8 +1406,7 @@ static int htb_change_class(struct Qdisc *sch, u32 classid,
/* turn parent into inner node */
qdisc_purge_queue(parent->leaf.q);
parent_qdisc = parent->leaf.q;
- if (parent->prio_activity)
- htb_deactivate(q, parent);
+ htb_deactivate(q, parent);
/* remove from evt list because of level change */
if (parent->cmode != HTB_CAN_SEND) {
diff --git a/net/sched/sch_qfq.c b/net/sched/sch_qfq.c
index 6e9e3405f26b..c466d255f786 100644
--- a/net/sched/sch_qfq.c
+++ b/net/sched/sch_qfq.c
@@ -203,6 +203,11 @@ struct qfq_sched {
*/
enum update_reason {enqueue, requeue};
+static bool cl_is_active(struct qfq_class *cl)
+{
+ return !list_empty(&cl->alist);
+}
+
static struct qfq_class *qfq_find_class(struct Qdisc *sch, u32 classid)
{
struct qfq_sched *q = qdisc_priv(sch);
@@ -1218,7 +1223,6 @@ static int qfq_enqueue(struct sk_buff *skb, struct Qdisc *sch,
struct qfq_class *cl;
struct qfq_aggregate *agg;
int err = 0;
- bool first;
cl = qfq_classify(skb, sch, &err);
if (cl == NULL) {
@@ -1240,7 +1244,6 @@ static int qfq_enqueue(struct sk_buff *skb, struct Qdisc *sch,
}
gso_segs = skb_is_gso(skb) ? skb_shinfo(skb)->gso_segs : 1;
- first = !cl->qdisc->q.qlen;
err = qdisc_enqueue(skb, cl->qdisc, to_free);
if (unlikely(err != NET_XMIT_SUCCESS)) {
pr_debug("qfq_enqueue: enqueue failed %d\n", err);
@@ -1257,8 +1260,8 @@ static int qfq_enqueue(struct sk_buff *skb, struct Qdisc *sch,
++sch->q.qlen;
agg = cl->agg;
- /* if the queue was not empty, then done here */
- if (!first) {
+ /* if the class is active, then done here */
+ if (cl_is_active(cl)) {
if (unlikely(skb == cl->qdisc->ops->peek(cl->qdisc)) &&
list_first_entry(&agg->active, struct qfq_class, alist)
== cl && cl->deficit < len)
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index f689c7b0c304..d67cb10a11db 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -277,9 +277,6 @@ static struct rpc_xprt *rpc_clnt_set_transport(struct rpc_clnt *clnt,
old = rcu_dereference_protected(clnt->cl_xprt,
lockdep_is_held(&clnt->cl_lock));
- if (!xprt_bound(xprt))
- clnt->cl_autobind = 1;
-
clnt->cl_timeout = timeout;
rcu_assign_pointer(clnt->cl_xprt, xprt);
spin_unlock(&clnt->cl_lock);
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index bffac2f4b581..78f69ee65d0e 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -1571,6 +1571,9 @@ int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl)
struct xfrm_policy *delpol;
struct hlist_head *chain;
+ /* Sanitize mark before store */
+ policy->mark.v &= policy->mark.m;
+
spin_lock_bh(&net->xfrm.xfrm_policy_lock);
chain = policy_hash_bysel(net, &policy->selector, policy->family, dir);
if (chain)
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index e8be18bff096..7380aa3a5f0f 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -1244,6 +1244,9 @@ static void __xfrm_state_insert(struct xfrm_state *x)
list_add(&x->km.all, &net->xfrm.state_all);
+ /* Sanitize mark before store */
+ x->mark.v &= x->mark.m;
+
h = xfrm_dst_hash(net, &x->id.daddr, &x->props.saddr,
x->props.reqid, x->props.family);
hlist_add_head_rcu(&x->bydst, net->xfrm.state_bydst + h);
diff --git a/scripts/config b/scripts/config
index 8c8d7c3d7acc..330bef88fd5e 100755
--- a/scripts/config
+++ b/scripts/config
@@ -32,6 +32,7 @@ commands:
Disable option directly after other option
--module-after|-M beforeopt option
Turn option into module directly after other option
+ --refresh Refresh the config using old settings
commands can be repeated multiple times
@@ -124,16 +125,22 @@ undef_var() {
txt_delete "^# $name is not set" "$FN"
}
-if [ "$1" = "--file" ]; then
- FN="$2"
- if [ "$FN" = "" ] ; then
- usage
+FN=.config
+CMDS=()
+while [[ $# -gt 0 ]]; do
+ if [ "$1" = "--file" ]; then
+ if [ "$2" = "" ]; then
+ usage
+ fi
+ FN="$2"
+ shift 2
+ else
+ CMDS+=("$1")
+ shift
fi
- shift 2
-else
- FN=.config
-fi
+done
+set -- "${CMDS[@]}"
if [ "$1" = "" ] ; then
usage
fi
@@ -217,9 +224,8 @@ while [ "$1" != "" ] ; do
set_var "${CONFIG_}$B" "${CONFIG_}$B=m" "${CONFIG_}$A"
;;
- # undocumented because it ignores --file (fixme)
--refresh)
- yes "" | make oldconfig
+ yes "" | make oldconfig KCONFIG_CONFIG=$FN
;;
*)
diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh
index d7d5c58b8b6a..557f37f481fd 100755
--- a/scripts/kconfig/merge_config.sh
+++ b/scripts/kconfig/merge_config.sh
@@ -98,8 +98,8 @@ INITFILE=$1
shift;
if [ ! -r "$INITFILE" ]; then
- echo "The base file '$INITFILE' does not exist. Exit." >&2
- exit 1
+ echo "The base file '$INITFILE' does not exist. Creating one..." >&2
+ touch "$INITFILE"
fi
MERGE_LIST=$*
diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c
index ddb0a292802e..526598b40b13 100644
--- a/security/smack/smackfs.c
+++ b/security/smack/smackfs.c
@@ -921,6 +921,10 @@ static ssize_t smk_set_cipso(struct file *file, const char __user *buf,
if (rc >= 0) {
old_cat = skp->smk_netlabel.attr.mls.cat;
rcu_assign_pointer(skp->smk_netlabel.attr.mls.cat, ncats.attr.mls.cat);
+ if (ncats.attr.mls.cat)
+ skp->smk_netlabel.flags |= NETLBL_SECATTR_MLS_CAT;
+ else
+ skp->smk_netlabel.flags &= ~(u32)NETLBL_SECATTR_MLS_CAT;
skp->smk_netlabel.attr.mls.lvl = ncats.attr.mls.lvl;
synchronize_rcu();
netlbl_catmap_free(old_cat);
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c
index 51d2911366e9..dc5aac6749fc 100644
--- a/sound/core/oss/pcm_oss.c
+++ b/sound/core/oss/pcm_oss.c
@@ -1081,8 +1081,7 @@ static int snd_pcm_oss_change_params_locked(struct snd_pcm_substream *substream)
runtime->oss.params = 0;
runtime->oss.prepare = 1;
runtime->oss.buffer_used = 0;
- if (runtime->dma_area)
- snd_pcm_format_set_silence(runtime->format, runtime->dma_area, bytes_to_samples(runtime, runtime->dma_bytes));
+ snd_pcm_runtime_buffer_set_silence(runtime);
runtime->oss.period_frames = snd_pcm_alsa_frames(substream, oss_period_size);
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 57a4991fa0f3..cef58e0828c4 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -648,6 +648,17 @@ static void snd_pcm_buffer_access_unlock(struct snd_pcm_runtime *runtime)
atomic_inc(&runtime->buffer_accessing);
}
+/* fill the PCM buffer with the current silence format; called from pcm_oss.c */
+void snd_pcm_runtime_buffer_set_silence(struct snd_pcm_runtime *runtime)
+{
+ snd_pcm_buffer_access_lock(runtime);
+ if (runtime->dma_area)
+ snd_pcm_format_set_silence(runtime->format, runtime->dma_area,
+ bytes_to_samples(runtime, runtime->dma_bytes));
+ snd_pcm_buffer_access_unlock(runtime);
+}
+EXPORT_SYMBOL_GPL(snd_pcm_runtime_buffer_set_silence);
+
#if IS_ENABLED(CONFIG_SND_PCM_OSS)
#define is_oss_stream(substream) ((substream)->oss.oss)
#else
diff --git a/sound/pci/es1968.c b/sound/pci/es1968.c
index 974142535a25..686d3bfd1e10 100644
--- a/sound/pci/es1968.c
+++ b/sound/pci/es1968.c
@@ -1575,7 +1575,7 @@ static int snd_es1968_capture_open(struct snd_pcm_substream *substream)
struct snd_pcm_runtime *runtime = substream->runtime;
struct es1968 *chip = snd_pcm_substream_chip(substream);
struct esschan *es;
- int apu1, apu2;
+ int err, apu1, apu2;
apu1 = snd_es1968_alloc_apu_pair(chip, ESM_APU_PCM_CAPTURE);
if (apu1 < 0)
@@ -1618,7 +1618,9 @@ static int snd_es1968_capture_open(struct snd_pcm_substream *substream)
runtime->hw = snd_es1968_capture;
runtime->hw.buffer_bytes_max = runtime->hw.period_bytes_max =
calc_available_memory_size(chip) - 1024; /* keep MIXBUF size */
- snd_pcm_hw_constraint_pow2(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES);
+ err = snd_pcm_hw_constraint_pow2(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES);
+ if (err < 0)
+ return err;
spin_lock_irq(&chip->substream_lock);
list_add(&es->list, &chip->substream_list);
diff --git a/sound/sh/Kconfig b/sound/sh/Kconfig
index b75fbb3236a7..f5fa09d740b4 100644
--- a/sound/sh/Kconfig
+++ b/sound/sh/Kconfig
@@ -14,7 +14,7 @@ if SND_SUPERH
config SND_AICA
tristate "Dreamcast Yamaha AICA sound"
- depends on SH_DREAMCAST
+ depends on SH_DREAMCAST && SH_DMA_API
select SND_PCM
select G2_DMA
help
diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c
index 104cfb56d225..5a8e86ba2900 100644
--- a/sound/soc/intel/boards/bytcr_rt5640.c
+++ b/sound/soc/intel/boards/bytcr_rt5640.c
@@ -428,6 +428,19 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = {
BYT_RT5640_SSP0_AIF2 |
BYT_RT5640_MCLK_EN),
},
+ { /* Acer Aspire SW3-013 */
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Aspire SW3-013"),
+ },
+ .driver_data = (void *)(BYT_RT5640_DMIC1_MAP |
+ BYT_RT5640_JD_SRC_JD2_IN4N |
+ BYT_RT5640_OVCD_TH_2000UA |
+ BYT_RT5640_OVCD_SF_0P75 |
+ BYT_RT5640_DIFF_MIC |
+ BYT_RT5640_SSP0_AIF1 |
+ BYT_RT5640_MCLK_EN),
+ },
{
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
diff --git a/sound/soc/soc-ops.c b/sound/soc/soc-ops.c
index 08ed973b2d97..a3b1f1c064dd 100644
--- a/sound/soc/soc-ops.c
+++ b/sound/soc/soc-ops.c
@@ -635,6 +635,33 @@ int snd_soc_get_volsw_range(struct snd_kcontrol *kcontrol,
}
EXPORT_SYMBOL_GPL(snd_soc_get_volsw_range);
+static int snd_soc_clip_to_platform_max(struct snd_kcontrol *kctl)
+{
+ struct soc_mixer_control *mc = (struct soc_mixer_control *)kctl->private_value;
+ struct snd_ctl_elem_value uctl;
+ int ret;
+
+ if (!mc->platform_max)
+ return 0;
+
+ ret = kctl->get(kctl, &uctl);
+ if (ret < 0)
+ return ret;
+
+ if (uctl.value.integer.value[0] > mc->platform_max)
+ uctl.value.integer.value[0] = mc->platform_max;
+
+ if (snd_soc_volsw_is_stereo(mc) &&
+ uctl.value.integer.value[1] > mc->platform_max)
+ uctl.value.integer.value[1] = mc->platform_max;
+
+ ret = kctl->put(kctl, &uctl);
+ if (ret < 0)
+ return ret;
+
+ return 0;
+}
+
/**
* snd_soc_limit_volume - Set new limit to an existing volume control.
*
@@ -667,7 +694,7 @@ int snd_soc_limit_volume(struct snd_soc_card *card,
mc = (struct soc_mixer_control *)kctl->private_value;
if (max <= mc->max) {
mc->platform_max = max;
- ret = 0;
+ ret = snd_soc_clip_to_platform_max(kctl);
}
}
return ret;
diff --git a/tools/bpf/bpftool/common.c b/tools/bpf/bpftool/common.c
index a209f53901b8..91bf7575493b 100644
--- a/tools/bpf/bpftool/common.c
+++ b/tools/bpf/bpftool/common.c
@@ -283,10 +283,11 @@ int get_fd_type(int fd)
p_err("can't read link type: %s", strerror(errno));
return -1;
}
- if (n == sizeof(path)) {
+ if (n == sizeof(buf)) {
p_err("can't read link type: path too long!");
return -1;
}
+ buf[n] = '\0';
if (strstr(buf, "bpf-map"))
return BPF_OBJ_MAP;
diff --git a/tools/build/Makefile.build b/tools/build/Makefile.build
index cd72016c3cfa..ab0630ae6be8 100644
--- a/tools/build/Makefile.build
+++ b/tools/build/Makefile.build
@@ -130,6 +130,10 @@ objprefix := $(subst ./,,$(OUTPUT)$(dir)/)
obj-y := $(addprefix $(objprefix),$(obj-y))
subdir-obj-y := $(addprefix $(objprefix),$(subdir-obj-y))
+# Separate out test log files from real build objects.
+test-y := $(filter %_log, $(obj-y))
+obj-y := $(filter-out %_log, $(obj-y))
+
# Final '$(obj)-in.o' object
in-target := $(objprefix)$(obj)-in.o
@@ -140,7 +144,7 @@ $(subdir-y):
$(sort $(subdir-obj-y)): $(subdir-y) ;
-$(in-target): $(obj-y) FORCE
+$(in-target): $(obj-y) $(test-y) FORCE
$(call rule_mkdir)
$(call if_changed,$(host)ld_multi)
Return-Path: <linux-kernel+bounces-673236-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 8D28741E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:07:00 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id A5BA21757F5
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:07:01 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 4BDEE28FAA7;
Wed, 4 Jun 2025 13:06:25 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="qore9tRG"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id D29F628F952;
Wed, 4 Jun 2025 13:06:22 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749042382; cv=none; b=DAJiUTJrfJqb594wh8C6haNd7Lylf8G2qB+Zz/tkjxSuq9uHQUmQsVHeTlVc7Ns5/mWMRK8gA6BXenXl3TKFsxoLiRbczReImY/aLPi2dppzGWiRlfKXmpGxmCcfmpUskoKTtdu8ELQafOlkH6sSjjoNg6NeYPsC9WPH2wGVKc8=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749042382; c=relaxed/simple;
bh=QrtfAATpL1nMU+wz2C/Eqp61Gjum9kUwADYIU6GzntY=;
h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=KXVB57Jv1YmmIi338pS9QW+RNiWlBJdsyFshSW6KdvbtiGvyI6WzHLOo/MiPllVj/aSBg9QH3i1oM1aC/yDqyOcsuE1/xTR6PV1lN7qmZaoO06lPYHTAwXI6uTTElo0P71x9IED+iiOY+4ARdT6lrv81W9r6mkfQ3b15RVR7/pw=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=qore9tRG; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id B5D04C4CEE7;
Wed, 4 Jun 2025 13:06:21 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org;
s=korg; t=1749042382;
bh=QrtfAATpL1nMU+wz2C/Eqp61Gjum9kUwADYIU6GzntY=;
h=From:To:Cc:Subject:Date:From;
b=qore9tRGfJ2Qj+pORicjCYAloJuk1lFWrNggRlvYun837nUgjGxaUkzO+7DeUjUXc
AqThlzbNnsawiVKbdrxBRJkKDY7mezgMd5JbuVwui9wRPYQss2+71KNKH0GEvGXtKA
ZVjBtrz4A+ScKl+WsY9o5PviZaJABh40UdcMLopM=
From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
To: linux-kernel@xxxxxxxxxxxxxxx,
akpm@xxxxxxxxxxxxxxxxxxxx,
torvalds@xxxxxxxxxxxxxxxxxxxx,
stable@xxxxxxxxxxxxxxx
Cc: lwn@xxxxxxx,
jslaby@xxxxxxx,
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Subject: Linux 5.15.185
Date: Wed, 4 Jun 2025 15:06:08 +0200
Message-ID: <2025060408-mammogram-poise-e141@gregkh>
X-Mailer: git-send-email 2.49.0
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
I'm announcing the release of the 5.15.185 kernel.
All users of the 5.15 kernel series must upgrade.
The updated 5.15.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.15.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/admin-guide/kernel-parameters.txt | 2
Makefile | 14
arch/arm/boot/dts/tegra114.dtsi | 2
arch/arm/mach-at91/pm.c | 21 -
arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts | 38 +-
arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts | 14
arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi | 22 -
arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi | 2
arch/arm64/boot/dts/qcom/sm8350.dtsi | 2
arch/arm64/include/asm/pgtable.h | 3
arch/mips/include/asm/ftrace.h | 16 +
arch/mips/kernel/pm-cps.c | 30 +
arch/powerpc/kernel/prom_init.c | 4
arch/powerpc/perf/core-book3s.c | 20 +
arch/powerpc/perf/isa207-common.c | 4
arch/um/Makefile | 1
arch/um/kernel/mem.c | 1
arch/x86/boot/genimage.sh | 5
arch/x86/events/amd/ibs.c | 3
arch/x86/include/asm/alternative.h | 2
arch/x86/include/asm/nmi.h | 2
arch/x86/include/asm/perf_event.h | 1
arch/x86/kernel/cpu/bugs.c | 10
arch/x86/kernel/nmi.c | 42 ++
arch/x86/kernel/reboot.c | 10
arch/x86/mm/kaslr.c | 10
arch/x86/um/os-Linux/mcontext.c | 3
crypto/algif_hash.c | 4
crypto/lzo-rle.c | 2
crypto/lzo.c | 2
drivers/acpi/Kconfig | 2
drivers/acpi/hed.c | 7
drivers/auxdisplay/charlcd.c | 5
drivers/auxdisplay/charlcd.h | 5
drivers/auxdisplay/hd44780.c | 2
drivers/auxdisplay/lcd2s.c | 2
drivers/auxdisplay/panel.c | 2
drivers/char/tpm/tpm_tis_core.h | 2
drivers/clk/imx/clk-imx8mp.c | 151 ++++++++++
drivers/clk/qcom/camcc-sm8250.c | 56 +--
drivers/clocksource/mips-gic-timer.c | 6
drivers/cpufreq/tegra186-cpufreq.c | 7
drivers/cpuidle/governors/menu.c | 13
drivers/crypto/marvell/octeontx2/otx2_cptvf_reqmgr.c | 7
drivers/edac/ie31200_edac.c | 28 -
drivers/firmware/arm_ffa/bus.c | 1
drivers/fpga/altera-cvp.c | 2
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 5
drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 10
drivers/gpu/drm/amd/amdkfd/kfd_process.c | 16 -
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 5
drivers/gpu/drm/amd/display/dc/core/dc.c | 1
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c | 11
drivers/gpu/drm/ast/ast_mode.c | 10
drivers/gpu/drm/drm_atomic_helper.c | 28 +
drivers/gpu/drm/drm_edid.c | 1
drivers/gpu/drm/i915/gvt/opregion.c | 8
drivers/gpu/drm/mediatek/mtk_dpi.c | 5
drivers/hid/hid-ids.h | 4
drivers/hid/hid-quirks.c | 2
drivers/hid/usbhid/usbkbd.c | 2
drivers/hwmon/gpio-fan.c | 16 -
drivers/hwmon/xgene-hwmon.c | 2
drivers/i2c/busses/i2c-pxa.c | 5
drivers/i2c/busses/i2c-qup.c | 36 ++
drivers/i3c/master/svc-i3c-master.c | 2
drivers/infiniband/core/umem.c | 36 +-
drivers/infiniband/core/uverbs_cmd.c | 144 +++++----
drivers/infiniband/core/verbs.c | 11
drivers/mailbox/mailbox.c | 7
drivers/md/dm-cache-target.c | 24 +
drivers/md/dm-table.c | 4
drivers/media/platform/qcom/camss/camss-csid.c | 60 ++-
drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c | 3
drivers/media/usb/cx231xx/cx231xx-417.c | 2
drivers/media/usb/uvc/uvc_v4l2.c | 6
drivers/media/v4l2-core/v4l2-subdev.c | 2
drivers/mmc/host/sdhci-pci-core.c | 6
drivers/mmc/host/sdhci.c | 9
drivers/net/bonding/bond_main.c | 2
drivers/net/can/c_can/c_can_platform.c | 2
drivers/net/ethernet/apm/xgene-v2/main.c | 4
drivers/net/ethernet/freescale/enetc/enetc.c | 16 -
drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c | 15
drivers/net/ethernet/mellanox/mlx4/alloc.c | 6
drivers/net/ethernet/mellanox/mlx4/en_tx.c | 2
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 5
drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c | 3
drivers/net/ethernet/mellanox/mlx5/core/events.c | 11
drivers/net/ethernet/mellanox/mlx5/core/health.c | 1
drivers/net/ethernet/microsoft/mana/gdma_main.c | 2
drivers/net/ethernet/realtek/r8169_main.c | 1
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 2
drivers/net/ethernet/ti/cpsw_new.c | 1
drivers/net/ieee802154/ca8210.c | 9
drivers/net/usb/r8152.c | 1
drivers/net/vxlan/vxlan_core.c | 18 -
drivers/net/wireless/ath/ath9k/init.c | 4
drivers/net/wireless/mediatek/mt76/mt76.h | 1
drivers/net/wireless/mediatek/mt76/mt76x0/pci.c | 3
drivers/net/wireless/mediatek/mt76/mt76x0/usb.c | 3
drivers/net/wireless/mediatek/mt76/mt76x2/pci.c | 3
drivers/net/wireless/mediatek/mt76/mt76x2/usb.c | 3
drivers/net/wireless/mediatek/mt76/tx.c | 3
drivers/net/wireless/realtek/rtw88/main.c | 40 --
drivers/net/wireless/realtek/rtw88/reg.h | 3
drivers/net/wireless/realtek/rtw88/rtw8822b.c | 14
drivers/net/wireless/realtek/rtw88/util.c | 3
drivers/nvdimm/label.c | 3
drivers/nvme/host/pci.c | 2
drivers/nvme/target/tcp.c | 3
drivers/pci/Kconfig | 6
drivers/pci/controller/dwc/pcie-designware-ep.c | 2
drivers/pci/controller/pcie-brcmstb.c | 5
drivers/pci/controller/vmd.c | 20 +
drivers/pci/setup-bus.c | 6
drivers/perf/arm-cmn.c | 2
drivers/phy/phy-core.c | 7
drivers/pinctrl/bcm/pinctrl-bcm281xx.c | 44 +-
drivers/pinctrl/devicetree.c | 10
drivers/pinctrl/meson/pinctrl-meson.c | 2
drivers/platform/x86/dell/dell-wmi-sysman/passobj-attributes.c | 2
drivers/platform/x86/fujitsu-laptop.c | 33 +-
drivers/platform/x86/thinkpad_acpi.c | 7
drivers/regulator/ad5398.c | 12
drivers/remoteproc/qcom_wcnss.c | 34 +-
drivers/rtc/rtc-ds1307.c | 4
drivers/rtc/rtc-rv3032.c | 2
drivers/scsi/lpfc/lpfc_hbadisc.c | 17 -
drivers/scsi/mpt3sas/mpt3sas_ctl.c | 12
drivers/scsi/st.c | 29 +
drivers/scsi/st.h | 2
drivers/soc/ti/k3-socinfo.c | 13
drivers/spi/spi-fsl-dspi.c | 46 ++-
drivers/spi/spi-sun4i.c | 5
drivers/spi/spi-zynqmp-gqspi.c | 20 -
drivers/target/iscsi/iscsi_target.c | 2
drivers/thermal/qoriq_thermal.c | 13
drivers/vfio/pci/vfio_pci_config.c | 3
drivers/vfio/pci/vfio_pci_core.c | 10
drivers/vfio/pci/vfio_pci_intrs.c | 2
drivers/video/fbdev/core/bitblit.c | 5
drivers/video/fbdev/core/fbcon.c | 10
drivers/video/fbdev/core/fbcon.h | 38 --
drivers/video/fbdev/core/fbcon_ccw.c | 5
drivers/video/fbdev/core/fbcon_cw.c | 5
drivers/video/fbdev/core/fbcon_ud.c | 5
drivers/video/fbdev/core/tileblit.c | 45 ++
drivers/video/fbdev/fsl-diu-fb.c | 1
drivers/virtio/virtio_ring.c | 2
drivers/xen/platform-pci.c | 4
drivers/xen/swiotlb-xen.c | 18 -
drivers/xen/xenbus/xenbus_probe.c | 14
fs/btrfs/block-group.c | 18 -
fs/btrfs/discard.c | 34 +-
fs/btrfs/extent_io.c | 7
fs/btrfs/send.c | 6
fs/cifs/readdir.c | 7
fs/coredump.c | 80 ++++-
fs/dlm/lowcomms.c | 4
fs/ext4/balloc.c | 4
fs/namespace.c | 6
fs/nfs/delegation.c | 3
fs/nfs/filelayout/filelayoutdev.c | 6
fs/nfs/flexfilelayout/flexfilelayout.c | 1
fs/nfs/flexfilelayout/flexfilelayoutdev.c | 6
fs/nfs/nfs4state.c | 10
fs/nfs/pnfs.h | 4
fs/nfs/pnfs_nfs.c | 9
fs/orangefs/inode.c | 7
include/drm/drm_atomic.h | 23 +
include/linux/binfmts.h | 1
include/linux/dma-mapping.h | 12
include/linux/ipv6.h | 1
include/linux/lzo.h | 8
include/linux/mlx4/device.h | 2
include/linux/pid.h | 1
include/linux/rcutree.h | 2
include/linux/tpm.h | 2
include/linux/trace.h | 4
include/linux/trace_seq.h | 8
include/linux/usb/r8152.h | 1
include/media/v4l2-subdev.h | 4
include/rdma/uverbs_std_types.h | 2
include/sound/pcm.h | 2
include/trace/events/btrfs.h | 2
kernel/bpf/hashtab.c | 2
kernel/cgroup/cgroup.c | 2
kernel/fork.c | 98 +++++-
kernel/padata.c | 3
kernel/rcu/tree_plugin.h | 11
kernel/softirq.c | 18 +
kernel/time/posix-timers.c | 1
kernel/time/timer_list.c | 4
kernel/trace/trace.c | 11
kernel/trace/trace.h | 16 -
lib/dynamic_queue_limits.c | 2
lib/lzo/Makefile | 2
lib/lzo/lzo1x_compress.c | 102 +++++-
lib/lzo/lzo1x_compress_safe.c | 18 +
mm/memcontrol.c | 6
mm/page_alloc.c | 8
net/bluetooth/l2cap_core.c | 15
net/bridge/br_nf_core.c | 7
net/bridge/br_private.h | 1
net/can/bcm.c | 79 +++--
net/core/pktgen.c | 13
net/ipv4/fib_frontend.c | 18 +
net/ipv4/fib_rules.c | 4
net/ipv4/fib_trie.c | 22 -
net/ipv4/inet_hashtables.c | 37 +-
net/ipv4/tcp_input.c | 56 ++-
net/ipv6/fib6_rules.c | 4
net/ipv6/ip6_output.c | 9
net/llc/af_llc.c | 8
net/mac80211/mlme.c | 4
net/netfilter/nf_conntrack_standalone.c | 12
net/sched/sch_hfsc.c | 15
net/sunrpc/clnt.c | 3
net/sunrpc/rpcb_clnt.c | 5
net/tipc/crypto.c | 5
net/xfrm/xfrm_policy.c | 3
net/xfrm/xfrm_state.c | 3
samples/bpf/Makefile | 2
scripts/config | 26 +
scripts/kconfig/merge_config.sh | 4
security/smack/smackfs.c | 4
sound/core/oss/pcm_oss.c | 3
sound/core/pcm_native.c | 11
sound/pci/hda/patch_realtek.c | 42 ++
sound/soc/codecs/mt6359-accdet.h | 9
sound/soc/codecs/tas2764.c | 51 +--
sound/soc/fsl/imx-card.c | 2
sound/soc/intel/boards/bytcr_rt5640.c | 13
sound/soc/qcom/sm8250.c | 3
sound/soc/soc-dai.c | 8
sound/soc/soc-ops.c | 29 +
tools/bpf/bpftool/common.c | 3
tools/build/Makefile.build | 6
tools/lib/bpf/libbpf.c | 2
tools/testing/selftests/net/gro.sh | 3
241 files changed, 2043 insertions(+), 878 deletions(-)
Aaron Kling (1):
cpufreq: tegra186: Share policy per cluster
Ahmad Fatoum (1):
clk: imx8mp: inform CCF of maximum frequency of clocks
Al Viro (1):
__legitimize_mnt(): check for MNT_SYNC_UMOUNT should be under mount_lock
Aleksander Jan Bajkowski (1):
r8152: add vendor/device ID pair for Dell Alienware AW1022z
Alessandro Grassi (1):
spi: spi-sun4i: fix early activation
Alex Williamson (1):
vfio/pci: Handle INTx IRQ_NOTCONNECTED
Alexander Stein (1):
hwmon: (gpio-fan) Add missing mutex locks
Alexander Sverdlin (1):
net: ethernet: ti: cpsw_new: populate netdev of_node
Alexandre Belloni (2):
rtc: rv3032: fix EERD location
rtc: ds1307: stop disabling alarms on probe
Alexei Lazar (1):
net/mlx5: Extend Ethtool loopback selftest to support non-linear SKB
Alexey Klimov (1):
ASoC: qcom: sm8250: explicitly set format in sm8250_be_hw_params_fixup()
Alice Guo (1):
thermal/drivers/qoriq: Power down TMU on system suspend
Alistair Francis (1):
nvmet-tcp: don't restore null sk_state_change
Alok Tiwari (1):
arm64: dts: qcom: sm8350: Fix typo in pil_camera_mem node
Andreas Schwab (1):
powerpc/prom_init: Fixup missing #size-cells on PowerBook6,7
Andrew Davis (1):
soc: ti: k3-socinfo: Do not use syscon helper to build regmap
Andrey Vatoropin (1):
hwmon: (xgene-hwmon) use appropriate type for the latency value
Andy Shevchenko (3):
tracing: Mark binary printing functions with __printf() attribute
auxdisplay: charlcd: Partially revert "Move hwidth and bwidth to struct hd44780_common"
ieee802154: ca8210: Use proper setters and getters for bitwise types
AngeloGioacchino Del Regno (1):
drm/mediatek: mtk_dpi: Add checks for reg_h_fre_con existence
Ankur Arora (2):
rcu: handle quiescent states for PREEMPT_RCU=n, PREEMPT_COUNT=y
rcu: fix header guard for rcu_all_qs()
Arnd Bergmann (2):
net: xgene-v2: remove incorrect ACPI_PTR annotation
EDAC/ie31200: work around false positive build warning
Artur Weber (1):
pinctrl: bcm281xx: Use "unsigned int" instead of bare "unsigned"
Athira Rajeev (1):
arch/powerpc/perf: Check the instruction type before creating sample with perf_mem_data_src
Balbir Singh (1):
x86/kaslr: Reduce KASLR entropy on most x86 systems
Benjamin Berg (1):
um: Store full CSGSFS and SS register from mcontext
Bibo Mao (1):
MIPS: Use arch specific syscall name match function
Bitterblue Smith (5):
wifi: rtw88: Fix rtw_init_vht_cap() for RTL8814AU
wifi: rtw88: Fix rtw_init_ht_cap() for RTL8814AU
wifi: rtw88: Fix rtw_desc_to_mcsrate() to handle MCS16-31
wifi: rtw88: Fix download_firmware_validate() for RTL8814AU
wifi: rtw88: Don't use static local variable in rtw8822b_set_tx_power_index_by_rate
Bogdan-Gabriel Roman (1):
spi: spi-fsl-dspi: Halt the module after a new message transfer
Boris Burkov (1):
btrfs: make btrfs_discard_workfn() block_group ref explicit
Brandon Kammerdiener (1):
bpf: fix possible endless loop in BPF map iteration
Breno Leitao (2):
x86/bugs: Make spectre user default depend on MITIGATION_SPECTRE_V2
memcg: always call cond_resched() after fn()
Chenyuan Yang (1):
ASoC: imx-card: Adjust over allocation of memory in imx_card_parse_of()
Christian Brauner (4):
coredump: fix error handling for replace_fd()
pid: add pidfd_prepare()
fork: use pidfd_prepare()
coredump: hand a pidfd to the usermode coredump helper
Christian Göttsche (1):
ext4: reorder capability check last
Cong Wang (1):
sch_hfsc: Fix qlen accounting bug when using peek in hfsc_enqueue()
Daniel Gomez (1):
kconfig: merge_config: use an empty file as initfile
Depeng Shao (1):
media: qcom: camss: csid: Only add TPG v4l2 ctrl if TPG hardware is available
Diogo Ivo (1):
arm64: tegra: p2597: Fix gpio for vdd-1v8-dis regulator
Dmitry Baryshkov (1):
phy: core: don't require set_mode() callback for phy_get_mode() to work
Dmitry Bogdanov (1):
scsi: target: iscsi: Fix timeout on deleted connection
Dominik Grzegorzek (1):
padata: do not leak refcount in reorder_work
Eric Dumazet (2):
posix-timers: Add cond_resched() to posix_timer_add() search loop
tcp: bring back NUMA dispersion in inet_ehash_locks_alloc()
Erick Shepherd (2):
mmc: host: Wait for Vdd to settle on card power off
mmc: sdhci: Disable SD card clock before changing parameters
Felix Fietkau (1):
wifi: mt76: only mark tx-status-failed frames as ACKed on mt76x0/2
Filipe Manana (2):
btrfs: get zone unusable bytes while holding lock at btrfs_reclaim_bgs_work()
btrfs: send: return -ENAMETOOLONG when attempting a path that is too long
Frank Li (1):
PCI: dwc: ep: Ensure proper iteration over outbound map windows
Frediano Ziglio (1):
xen: Add support for XenServer 6.1 platform device
Goldwyn Rodrigues (1):
btrfs: correct the order of prelim_ref arguments in btrfs__prelim_ref
Greg Kroah-Hartman (1):
Linux 5.15.185
Hangbin Liu (1):
bonding: report duplicate MAC address in all situations
Hans Verkuil (1):
media: cx231xx: set device_caps for 417
Haoran Jiang (1):
samples/bpf: Fix compilation failure for samples/bpf on LoongArch Fedora
Hector Martin (1):
ASoC: tas2764: Power up/down amp on mute ops
Heiner Kallweit (1):
r8169: don't scan PHY addresses > 0
Heming Zhao (1):
dlm: make tcp still work in multi-link env
Herbert Xu (1):
crypto: lzo - Fix compression buffer overrun
Ian Rogers (1):
tools/build: Don't pass test log files to linker
Ido Schimmel (2):
vxlan: Annotate FDB data races
bridge: netfilter: Fix forwarding of fragmented packets
Ilia Gavrilov (1):
llc: fix data loss when reading from a socket in llc_ui_recvmsg()
Ilpo Järvinen (2):
tcp: reorganize tcp_in_ack_event() and tcp_count_delivered()
PCI: Fix old_size lower bound in calculate_iosize() too
Ilya Guterman (1):
nvme-pci: add NVME_QUIRK_NO_DEEPEST_PS quirk for SOLIDIGM P44 Pro
Isaac Scott (1):
regulator: ad5398: Add device tree support
Ivan Pravdin (1):
crypto: algif_hash - fix double free in hash_accept
Jakub Kicinski (1):
eth: mlx4: don't try to complete XDP frames in netpoll
Jani Nikula (1):
drm/i915/gvt: fix unterminated-string-initialization warning
Jason Andryuk (1):
xenbus: Allow PVH dom0 a non-local xenstore
Jeff Layton (1):
nfs: don't share pNFS DS connections between net namespaces
Jernej Skrabec (1):
Revert "arm64: dts: allwinner: h6: Use RSB for AXP805 PMIC connection"
Jessica Zhang (1):
drm: Add valid clones check
Jiang Liu (1):
drm/amdgpu: reset psp->cmd to NULL after releasing the buffer
Jing Su (1):
dql: Fix dql->limit value when reset.
Johannes Berg (2):
wifi: mac80211: don't unconditionally call drv_mgd_complete_tx()
wifi: mac80211: remove misplaced drv_mgd_complete_tx() call
John Chau (1):
platform/x86: thinkpad_acpi: Support also NEC Lavie X1475JAS
Jordan Crouse (1):
clk: qcom: camcc-sm8250: Use clk_rcg2_shared_ops for some RCGs
Juergen Gross (1):
xen/swiotlb: relax alignment requirements
Justin Tee (1):
scsi: lpfc: Handle duplicate D_IDs in ndlp search-by D_ID routine
Kai Mäkisara (3):
scsi: st: Tighten the page format heuristics with MODE SELECT
scsi: st: ERASE does not change tape location
scsi: st: Restore some drive settings after reset
Kees Cook (1):
net/mlx4_core: Avoid impossible mlx4_db_alloc() order value
Kevin Krakauer (1):
selftests/net: have `gro.sh -t` return a correct exit code
Konstantin Andreev (1):
smack: recognize ipv4 CIPSO w/o categories
Konstantin Taranov (1):
net/mana: fix warning in the writer of client oob
Krzysztof Kozlowski (1):
can: c_can: Use of_property_present() to test existence of DT property
Kuhanh Murugasen Krishnan (1):
fpga: altera-cvp: Increase credit timeout
Kuninori Morimoto (1):
ASoC: soc-dai: check return value at snd_soc_dai_set_tdm_slot()
Kuniyuki Iwashima (2):
ipv4: fib: Move fib_valid_key_len() to rtm_to_fib_config().
ip: fib_rules: Fetch net from fib_rule in fib[46]_rule_configure().
Larisa Grigore (2):
spi: spi-fsl-dspi: restrict register range for regmap access
spi: spi-fsl-dspi: Reset SR flags before sending a new message
Li Bin (1):
ARM: at91: pm: fix at91_suspend_finish for ZQ calibration
Luiz Augusto von Dentz (1):
Bluetooth: L2CAP: Fix not checking l2cap_chan security level
Maher Sanalla (1):
RDMA/uverbs: Propagate errors from rdma_lookup_get_uobject()
Marek Szyprowski (1):
dma-mapping: avoid potential unused data compilation warning
Mario Limonciello (1):
Revert "drm/amd: Keep display off while going into S4"
Mark Harmstone (1):
btrfs: avoid linker error in btrfs_find_create_tree_block()
Mark Pearson (1):
platform/x86: thinkpad_acpi: Ignore battery threshold change event notification
Markus Elfring (1):
media: c8sectpfe: Call of_node_put(i2c_bus) only once in c8sectpfe_probe()
Martin Blumenstingl (1):
pinctrl: meson: define the pull up/down resistor value as 60 kOhm
Martin Povišer (1):
ASoC: ops: Enforce platform maximum on initial value
Masahiro Yamada (1):
um: let 'make clean' properly clean underlying SUBARCH as well
Matthew Wilcox (Oracle) (1):
orangefs: Do not truncate file size
Matti Lehtimäki (2):
remoteproc: qcom_wcnss: Handle platforms with only single power domain
remoteproc: qcom_wcnss: Fix on platforms without fallback regulators
Michael Margolin (1):
RDMA/core: Fix best page size finding when it can cross SG entries
Michal Suchanek (1):
tpm: tis: Double the timeout B to 4s
Mikulas Patocka (1):
dm: restrict dm device size to 2^63-512 bytes
Milton Barrera (1):
HID: quirks: Add ADATA XPG alpha wireless mouse support
Ming-Hung Tsai (1):
dm cache: prevent BUG_ON by blocking retries on failed device resumes
Moshe Shemesh (1):
net/mlx5: Avoid report two health errors on same syndrome
Nandakumar Edamana (1):
libbpf: Fix out-of-bound read
Nathan Chancellor (2):
kbuild: Disable -Wdefault-const-init-unsafe
i3c: master: svc: Fix implicit fallthrough in svc_i3c_master_ibi_work()
Nicolas Bouchinet (1):
netfilter: conntrack: Bound nf_conntrack sysctl writes
Nir Lichtman (1):
x86/build: Fix broken copy command in genimage.sh when making isoimage
Nícolas F. R. A. Prado (1):
ASoC: mediatek: mt6359: Add stub for mt6359_accdet_enable_jack_detect
Oliver Hartkopp (2):
can: bcm: add locking for bcm_op runtime updates
can: bcm: add missing rcu read protection for procfs content
Paul Burton (2):
MIPS: pm-cps: Use per-CPU variables as per-CPU, not per-core
clocksource: mips-gic-timer: Enable counter when CPUs start
Paul Chaignon (1):
xfrm: Sanitize marks before insert
Paul Kocialkowski (1):
net: dwmac-sun8i: Use parsed internal PHY address instead of 1
Pawan Gupta (1):
x86/its: Fix undefined reference to cpu_wants_rethunk_at()
Pedro Tammela (1):
net_sched: hfsc: Address reentrant enqueue adding class to eltree twice
Peter Seiderer (2):
net: pktgen: fix mpls maximum labels list parsing
net: pktgen: fix access outside of user given buffer in pktgen_thread_write()
Philip Yang (1):
drm/amdkfd: KFD release_work possible circular locking
Rafael J. Wysocki (1):
cpuidle: menu: Avoid discarding useful information
Ravi Bangoria (1):
perf/amd/ibs: Fix perf_ibs_op.cnt_mask for CurCnt
Ricardo Ribalda (1):
media: uvcvideo: Add sanity check to uvc_ioctl_xu_ctrl_map
Robert Richter (1):
libnvdimm/labels: Fix divide error in nd_label_data_init()
Robin Murphy (1):
perf/arm-cmn: Initialise cmn->cpu earlier
Roger Pau Monne (1):
PCI: vmd: Disable MSI remapping bypass under Xen
Rosen Penev (1):
wifi: ath9k: return by of_get_mac_address
Ryan Roberts (1):
arm64/mm: Check PUD_TYPE_TABLE in pud_bad()
Ryo Takakura (1):
lockdep: Fix wait context check on softirq for PREEMPT_RT
Sakari Ailus (1):
media: v4l: Memset argument to 0 before calling get_mbus_config pad op
Sean Anderson (1):
spi: zynqmp-gqspi: Always acknowledge interrupts
Seyediman Seyedarab (1):
kbuild: fix argument parsing in scripts/config
Shahar Shitrit (2):
net/mlx5: Modify LSB bitmask in temperature event to include only the first bit
net/mlx5: Apply rate-limiting to high temperature warning
Shashank Gupta (1):
crypto: octeontx2 - suppress auth failure screaming due to negative tests
Shivasharan S (1):
scsi: mpt3sas: Send a diag reset if target reset fails
Shixiong Ou (1):
fbdev: fsl-diu-fb: add missing device_remove_file()
Simona Vetter (1):
drm/atomic: clarify the rules around drm_atomic_state->allow_modeset
Stanimir Varbanov (2):
PCI: brcmstb: Expand inbound window size up to 64GB
PCI: brcmstb: Add a softdep to MIP MSI-X driver
Stanley Chu (1):
i3c: master: svc: Fix missing STOP for master request
Stephan Gerhold (1):
i2c: qup: Vote for interconnect bandwidth to DRAM
Subbaraya Sundeep (1):
octeontx2-af: Set LMT_ENA bit for APR table entries
Svyatoslav Ryhel (1):
ARM: tegra: Switch DSI-B clock parent to PLLD on Tegra114
Takashi Iwai (3):
ASoC: Intel: bytcr_rt5640: Add DMI quirk for Acer Aspire SW3-013
ALSA: hda/realtek: Add quirk for HP Spectre x360 15-df1xxx
ALSA: pcm: Fix race of buffer access at PCM OSS layer
Thomas Weißschuh (1):
timer_list: Don't use %pK through printk()
Thomas Zimmermann (1):
drm/ast: Find VBIOS mode from regular display size
Tianyang Zhang (1):
mm/page_alloc.c: avoid infinite retries caused by cpuset race
Tiwei Bie (1):
um: Update min_low_pfn to match changes in uml_reserved
Tom Chung (1):
drm/amd/display: Initial psr_version with correct setting
Trond Myklebust (5):
NFSv4: Check for delegation validity in nfs_start_delegation_return_locked()
NFSv4: Treat ENETUNREACH errors as fatal for state recovery
SUNRPC: rpc_clnt_set_transport() must not change the autobind setting
SUNRPC: rpcbind should never reset the port to the value '0'
pNFS/flexfiles: Report ENETDOWN as a connection error
Tudor Ambarus (1):
mailbox: use error ret code of of_parse_phandle_with_args()
Valentin Caron (1):
pinctrl: devicetree: do not goto err when probing hogs in pinctrl_dt_to_map
Valtteri Koskivuori (1):
platform/x86: fujitsu-laptop: Support Lifebook S2110 hotkeys
Victor Lu (1):
drm/amdgpu: Do not program AGP BAR regs under SRIOV in gfxhub_v1_0.c
Viktor Malik (1):
bpftool: Fix readlink usage in get_fd_type
Viresh Kumar (1):
firmware: arm_ffa: Set dma_mask for ffa devices
Vitalii Mordan (1):
i2c: pxa: fix call balance of i2c->clk handling routines
Vladimir Moskovkin (1):
platform/x86: dell-wmi-sysman: Avoid buffer overflow in current_password_store()
Vladimir Oltean (1):
net: enetc: refactor bulk flipping of RX buffers to separate function
Waiman Long (1):
x86/nmi: Add an emergency handler in nmi_desc & use it in nmi_shootdown_cpus()
Wang Liang (1):
net/tipc: fix slab-use-after-free Read in tipc_aead_encrypt_done
Wang Zhaolong (2):
smb: client: Fix use-after-free in cifs_fill_dirent
smb: client: Reset all search buffer pointers when releasing buffer
Willem de Bruijn (1):
ipv6: save dontfrag in cork
William Tu (2):
net/mlx5e: set the tx_queue_len for pfifo_fast
net/mlx5e: reduce rep rxq depth to 256 for ECPF
Xiaofei Tan (1):
ACPI: HED: Always initialize before evged
Yihan Zhu (1):
drm/amd/display: handle max_downscale_src_width fail check
Zhongqiu Han (1):
virtio_ring: Fix data race by tagging event_triggered as racy for KCSAN
Zsolt Kajtar (2):
fbcon: Use correct erase colour for clearing in fbcon
fbdev: core: tileblit: Implement missing margin clearing for tileblit
feijuan.li (1):
drm/edid: fixed the bug that hdr metadata was not reset
gaoxu (1):
cgroup: Fix compilation issue due to cgroup_mutex not being exported
junan (1):
HID: usbkbd: Fix the bit shift number for LED_KANA
Return-Path: <linux-kernel+bounces-673235-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 9DE4741E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:07:24 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 1278A17365D
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:07:25 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 97D8F28FABB;
Wed, 4 Jun 2025 13:06:33 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="ShdbD8BO"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4ACE028FA8E;
Wed, 4 Jun 2025 13:06:19 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749042379; cv=none; b=on+OHB1hg5w4WfDv1jPP+2I7ydeufNHKI59lnd/orKmL70aHRRcStpfsfWEq7F9FpLGop1uy5tXSM3S45NqZQpXHhKEEWm8IrgIXcQrpDsKH8zWcnaK4dxMg6zgKN7iOK5hg7m4Q2OhbdNLZlw+VgXmnU3rYEMQXAYZpUf3uM7Y=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749042379; c=relaxed/simple;
bh=JnvyDVqRFA5lHY9Wo9H4Ac7Y04AyMHv0E8HNMIvfZwA=;
h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version; b=UBYiR8a6ZUFc9XeLrOKLwgwvMYhIWB8auYjT7hektdzaLNwF9gahAJ2N1gnBgXyNSpaPSkocEef6QYs5YJZpMRBephb326vUh2uc8EuDDD2opL9gURGMA4ZkrXqqULygF0eMUfrUSwDN8rku6xvm1In9mLAvm3nhJcf5E9yuthk=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ShdbD8BO; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 20D6BC4CEF0;
Wed, 4 Jun 2025 13:06:17 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org;
s=korg; t=1749042379;
bh=JnvyDVqRFA5lHY9Wo9H4Ac7Y04AyMHv0E8HNMIvfZwA=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=ShdbD8BOY5UhdhKC3Ou9w1fYy3itVtNsjfv0zCFHTy77BsHIa4DW+4VhOyDFr8eF0
kbpFrgf++ftvZcOHeJX+CFT3szxin5J9ewMkosVoa7/zW+UQ1OoZVqzKaPKXIBcRRP
Gw1kYL6JjNDS99H43ieLmSU5W/C4wgfAWkZoZU9w=
From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
To: linux-kernel@xxxxxxxxxxxxxxx,
akpm@xxxxxxxxxxxxxxxxxxxx,
torvalds@xxxxxxxxxxxxxxxxxxxx,
stable@xxxxxxxxxxxxxxx
Cc: lwn@xxxxxxx,
jslaby@xxxxxxx,
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Subject: Re: Linux 5.15.185
Date: Wed, 4 Jun 2025 15:06:09 +0200
Message-ID: <2025060408-sandbox-getting-edee@gregkh>
X-Mailer: git-send-email 2.49.0
In-Reply-To: <2025060408-mammogram-poise-e141@gregkh>
References: <2025060408-mammogram-poise-e141@gregkh>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 4bc5d8c97d09..e0670357d23f 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -5445,6 +5445,8 @@
Selecting 'on' will also enable the mitigation
against user space to user space task attacks.
+ Selecting specific mitigation does not force enable
+ user mitigations.
Selecting 'off' will disable both the kernel and
the user space protections.
diff --git a/Makefile b/Makefile
index 0840259608be..74f8a3f0ae19 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 5
PATCHLEVEL = 15
-SUBLEVEL = 184
+SUBLEVEL = 185
EXTRAVERSION =
NAME = Trick or Treat
@@ -814,6 +814,18 @@ KBUILD_CFLAGS += -Wno-gnu
# source of a reference will be _MergedGlobals and not on of the whitelisted names.
# See modpost pattern 2
KBUILD_CFLAGS += -mno-global-merge
+
+# Clang may emit a warning when a const variable, such as the dummy variables
+# in typecheck(), or const member of an aggregate type are not initialized,
+# which can result in unexpected behavior. However, in many audited cases of
+# the "field" variant of the warning, this is intentional because the field is
+# never used within a particular call path, the field is within a union with
+# other non-const members, or the containing object is not const so the field
+# can be modified via memcpy() / memset(). While the variable warning also gets
+# disabled with this same switch, there should not be too much coverage lost
+# because -Wuninitialized will still flag when an uninitialized const variable
+# is used.
+KBUILD_CFLAGS += $(call cc-disable-warning, default-const-init-unsafe)
else
# Warn about unmarked fall-throughs in switch statement.
diff --git a/arch/arm/boot/dts/tegra114.dtsi b/arch/arm/boot/dts/tegra114.dtsi
index fb99b3e971c3..c00097794dab 100644
--- a/arch/arm/boot/dts/tegra114.dtsi
+++ b/arch/arm/boot/dts/tegra114.dtsi
@@ -126,7 +126,7 @@ dsi@54400000 {
reg = <0x54400000 0x00040000>;
clocks = <&tegra_car TEGRA114_CLK_DSIB>,
<&tegra_car TEGRA114_CLK_DSIBLP>,
- <&tegra_car TEGRA114_CLK_PLL_D2_OUT0>;
+ <&tegra_car TEGRA114_CLK_PLL_D_OUT0>;
clock-names = "dsi", "lp", "parent";
resets = <&tegra_car 82>;
reset-names = "dsi";
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
index 91efc3d4de61..777a8834b43e 100644
--- a/arch/arm/mach-at91/pm.c
+++ b/arch/arm/mach-at91/pm.c
@@ -350,11 +350,12 @@ extern u32 at91_pm_suspend_in_sram_sz;
static int at91_suspend_finish(unsigned long val)
{
- unsigned char modified_gray_code[] = {
- 0x00, 0x01, 0x02, 0x03, 0x06, 0x07, 0x04, 0x05, 0x0c, 0x0d,
- 0x0e, 0x0f, 0x0a, 0x0b, 0x08, 0x09, 0x18, 0x19, 0x1a, 0x1b,
- 0x1e, 0x1f, 0x1c, 0x1d, 0x14, 0x15, 0x16, 0x17, 0x12, 0x13,
- 0x10, 0x11,
+ /* SYNOPSYS workaround to fix a bug in the calibration logic */
+ unsigned char modified_fix_code[] = {
+ 0x00, 0x01, 0x01, 0x06, 0x07, 0x0c, 0x06, 0x07, 0x0b, 0x18,
+ 0x0a, 0x0b, 0x0c, 0x0d, 0x0d, 0x0a, 0x13, 0x13, 0x12, 0x13,
+ 0x14, 0x15, 0x15, 0x12, 0x18, 0x19, 0x19, 0x1e, 0x1f, 0x14,
+ 0x1e, 0x1f,
};
unsigned int tmp, index;
int i;
@@ -365,25 +366,25 @@ static int at91_suspend_finish(unsigned long val)
* restore the ZQ0SR0 with the value saved here. But the
* calibration is buggy and restoring some values from ZQ0SR0
* is forbidden and risky thus we need to provide processed
- * values for these (modified gray code values).
+ * values for these.
*/
tmp = readl(soc_pm.data.ramc_phy + DDR3PHY_ZQ0SR0);
/* Store pull-down output impedance select. */
index = (tmp >> DDR3PHY_ZQ0SR0_PDO_OFF) & 0x1f;
- soc_pm.bu->ddr_phy_calibration[0] = modified_gray_code[index];
+ soc_pm.bu->ddr_phy_calibration[0] = modified_fix_code[index] << DDR3PHY_ZQ0SR0_PDO_OFF;
/* Store pull-up output impedance select. */
index = (tmp >> DDR3PHY_ZQ0SR0_PUO_OFF) & 0x1f;
- soc_pm.bu->ddr_phy_calibration[0] |= modified_gray_code[index];
+ soc_pm.bu->ddr_phy_calibration[0] |= modified_fix_code[index] << DDR3PHY_ZQ0SR0_PUO_OFF;
/* Store pull-down on-die termination impedance select. */
index = (tmp >> DDR3PHY_ZQ0SR0_PDODT_OFF) & 0x1f;
- soc_pm.bu->ddr_phy_calibration[0] |= modified_gray_code[index];
+ soc_pm.bu->ddr_phy_calibration[0] |= modified_fix_code[index] << DDR3PHY_ZQ0SR0_PDODT_OFF;
/* Store pull-up on-die termination impedance select. */
index = (tmp >> DDR3PHY_ZQ0SRO_PUODT_OFF) & 0x1f;
- soc_pm.bu->ddr_phy_calibration[0] |= modified_gray_code[index];
+ soc_pm.bu->ddr_phy_calibration[0] |= modified_fix_code[index] << DDR3PHY_ZQ0SRO_PUODT_OFF;
/*
* The 1st 8 words of memory might get corrupted in the process
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
index 6249e9e02928..f6efa69ce4b7 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
@@ -150,28 +150,12 @@ &pio {
vcc-pg-supply = <®_aldo1>;
};
-&r_ir {
- linux,rc-map-name = "rc-beelink-gs1";
- status = "okay";
-};
-
-&r_pio {
- /*
- * FIXME: We can't add that supply for now since it would
- * create a circular dependency between pinctrl, the regulator
- * and the RSB Bus.
- *
- * vcc-pl-supply = <®_aldo1>;
- */
- vcc-pm-supply = <®_aldo1>;
-};
-
-&r_rsb {
+&r_i2c {
status = "okay";
- axp805: pmic@745 {
+ axp805: pmic@36 {
compatible = "x-powers,axp805", "x-powers,axp806";
- reg = <0x745>;
+ reg = <0x36>;
interrupt-parent = <&r_intc>;
interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_LOW>;
interrupt-controller;
@@ -289,6 +273,22 @@ sw {
};
};
+&r_ir {
+ linux,rc-map-name = "rc-beelink-gs1";
+ status = "okay";
+};
+
+&r_pio {
+ /*
+ * PL0 and PL1 are used for PMIC I2C
+ * don't enable the pl-supply else
+ * it will fail at boot
+ *
+ * vcc-pl-supply = <®_aldo1>;
+ */
+ vcc-pm-supply = <®_aldo1>;
+};
+
&spdif {
status = "okay";
};
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
index c45d7b7fb39a..19339644a68a 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
@@ -175,16 +175,12 @@ &pio {
vcc-pg-supply = <®_vcc_wifi_io>;
};
-&r_ir {
- status = "okay";
-};
-
-&r_rsb {
+&r_i2c {
status = "okay";
- axp805: pmic@745 {
+ axp805: pmic@36 {
compatible = "x-powers,axp805", "x-powers,axp806";
- reg = <0x745>;
+ reg = <0x36>;
interrupt-parent = <&r_intc>;
interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_LOW>;
interrupt-controller;
@@ -295,6 +291,10 @@ sw {
};
};
+&r_ir {
+ status = "okay";
+};
+
&rtc {
clocks = <&ext_osc32k>;
};
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
index 92745128fcfe..4ec4996592be 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
@@ -112,20 +112,12 @@ &pio {
vcc-pg-supply = <®_aldo1>;
};
-&r_ir {
- status = "okay";
-};
-
-&r_pio {
- vcc-pm-supply = <®_bldo3>;
-};
-
-&r_rsb {
+&r_i2c {
status = "okay";
- axp805: pmic@745 {
+ axp805: pmic@36 {
compatible = "x-powers,axp805", "x-powers,axp806";
- reg = <0x745>;
+ reg = <0x36>;
interrupt-parent = <&r_intc>;
interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_LOW>;
interrupt-controller;
@@ -240,6 +232,14 @@ sw {
};
};
+&r_ir {
+ status = "okay";
+};
+
+&r_pio {
+ vcc-pm-supply = <®_bldo3>;
+};
+
&rtc {
clocks = <&ext_osc32k>;
};
diff --git a/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi b/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi
index d8409c1b4380..4abd8b14b8a5 100644
--- a/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi
@@ -1638,7 +1638,7 @@ vdd_1v8_dis: regulator@7 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
- gpio = <&exp1 14 GPIO_ACTIVE_HIGH>;
+ gpio = <&exp1 9 GPIO_ACTIVE_HIGH>;
enable-active-high;
vin-supply = <&vdd_1v8>;
};
diff --git a/arch/arm64/boot/dts/qcom/sm8350.dtsi b/arch/arm64/boot/dts/qcom/sm8350.dtsi
index df02fe5ceee9..67fb7a16cc10 100644
--- a/arch/arm64/boot/dts/qcom/sm8350.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8350.dtsi
@@ -240,7 +240,7 @@ cdsp_secure_heap: memory@80c00000 {
no-map;
};
- pil_camera_mem: mmeory@85200000 {
+ pil_camera_mem: memory@85200000 {
reg = <0x0 0x85200000 0x0 0x500000>;
no-map;
};
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
index b5e969bc074d..a0bfa9cd76da 100644
--- a/arch/arm64/include/asm/pgtable.h
+++ b/arch/arm64/include/asm/pgtable.h
@@ -623,7 +623,8 @@ static inline unsigned long pmd_page_vaddr(pmd_t pmd)
pr_err("%s:%d: bad pmd %016llx.\n", __FILE__, __LINE__, pmd_val(e))
#define pud_none(pud) (!pud_val(pud))
-#define pud_bad(pud) (!pud_table(pud))
+#define pud_bad(pud) ((pud_val(pud) & PUD_TYPE_MASK) != \
+ PUD_TYPE_TABLE)
#define pud_present(pud) pte_present(pud_pte(pud))
#define pud_leaf(pud) (pud_present(pud) && !pud_table(pud))
#define pud_valid(pud) pte_valid(pud_pte(pud))
diff --git a/arch/mips/include/asm/ftrace.h b/arch/mips/include/asm/ftrace.h
index db497a8167da..e3212f44446f 100644
--- a/arch/mips/include/asm/ftrace.h
+++ b/arch/mips/include/asm/ftrace.h
@@ -87,4 +87,20 @@ struct dyn_arch_ftrace {
#endif /* CONFIG_DYNAMIC_FTRACE */
#endif /* __ASSEMBLY__ */
#endif /* CONFIG_FUNCTION_TRACER */
+
+#ifdef CONFIG_FTRACE_SYSCALLS
+#ifndef __ASSEMBLY__
+/*
+ * Some syscall entry functions on mips start with "__sys_" (fork and clone,
+ * for instance). We should also match the sys_ variant with those.
+ */
+#define ARCH_HAS_SYSCALL_MATCH_SYM_NAME
+static inline bool arch_syscall_match_sym_name(const char *sym,
+ const char *name)
+{
+ return !strcmp(sym, name) ||
+ (!strncmp(sym, "__sys_", 6) && !strcmp(sym + 6, name + 4));
+}
+#endif /* __ASSEMBLY__ */
+#endif /* CONFIG_FTRACE_SYSCALLS */
#endif /* _ASM_MIPS_FTRACE_H */
diff --git a/arch/mips/kernel/pm-cps.c b/arch/mips/kernel/pm-cps.c
index 9bf60d7d44d3..a7bcf2b814c8 100644
--- a/arch/mips/kernel/pm-cps.c
+++ b/arch/mips/kernel/pm-cps.c
@@ -56,10 +56,7 @@ static DEFINE_PER_CPU_ALIGNED(u32*, ready_count);
/* Indicates online CPUs coupled with the current CPU */
static DEFINE_PER_CPU_ALIGNED(cpumask_t, online_coupled);
-/*
- * Used to synchronize entry to deep idle states. Actually per-core rather
- * than per-CPU.
- */
+/* Used to synchronize entry to deep idle states */
static DEFINE_PER_CPU_ALIGNED(atomic_t, pm_barrier);
/* Saved CPU state across the CPS_PM_POWER_GATED state */
@@ -118,9 +115,10 @@ int cps_pm_enter_state(enum cps_pm_state state)
cps_nc_entry_fn entry;
struct core_boot_config *core_cfg;
struct vpe_boot_config *vpe_cfg;
+ atomic_t *barrier;
/* Check that there is an entry function for this state */
- entry = per_cpu(nc_asm_enter, core)[state];
+ entry = per_cpu(nc_asm_enter, cpu)[state];
if (!entry)
return -EINVAL;
@@ -156,7 +154,7 @@ int cps_pm_enter_state(enum cps_pm_state state)
smp_mb__after_atomic();
/* Create a non-coherent mapping of the core ready_count */
- core_ready_count = per_cpu(ready_count, core);
+ core_ready_count = per_cpu(ready_count, cpu);
nc_addr = kmap_noncoherent(virt_to_page(core_ready_count),
(unsigned long)core_ready_count);
nc_addr += ((unsigned long)core_ready_count & ~PAGE_MASK);
@@ -164,7 +162,8 @@ int cps_pm_enter_state(enum cps_pm_state state)
/* Ensure ready_count is zero-initialised before the assembly runs */
WRITE_ONCE(*nc_core_ready_count, 0);
- coupled_barrier(&per_cpu(pm_barrier, core), online);
+ barrier = &per_cpu(pm_barrier, cpumask_first(&cpu_sibling_map[cpu]));
+ coupled_barrier(barrier, online);
/* Run the generated entry code */
left = entry(online, nc_core_ready_count);
@@ -635,12 +634,14 @@ static void *cps_gen_entry_code(unsigned cpu, enum cps_pm_state state)
static int cps_pm_online_cpu(unsigned int cpu)
{
- enum cps_pm_state state;
- unsigned core = cpu_core(&cpu_data[cpu]);
+ unsigned int sibling, core;
void *entry_fn, *core_rc;
+ enum cps_pm_state state;
+
+ core = cpu_core(&cpu_data[cpu]);
for (state = CPS_PM_NC_WAIT; state < CPS_PM_STATE_COUNT; state++) {
- if (per_cpu(nc_asm_enter, core)[state])
+ if (per_cpu(nc_asm_enter, cpu)[state])
continue;
if (!test_bit(state, state_support))
continue;
@@ -652,16 +653,19 @@ static int cps_pm_online_cpu(unsigned int cpu)
clear_bit(state, state_support);
}
- per_cpu(nc_asm_enter, core)[state] = entry_fn;
+ for_each_cpu(sibling, &cpu_sibling_map[cpu])
+ per_cpu(nc_asm_enter, sibling)[state] = entry_fn;
}
- if (!per_cpu(ready_count, core)) {
+ if (!per_cpu(ready_count, cpu)) {
core_rc = kmalloc(sizeof(u32), GFP_KERNEL);
if (!core_rc) {
pr_err("Failed allocate core %u ready_count\n", core);
return -ENOMEM;
}
- per_cpu(ready_count, core) = core_rc;
+
+ for_each_cpu(sibling, &cpu_sibling_map[cpu])
+ per_cpu(ready_count, sibling) = core_rc;
}
return 0;
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 302c2acc8dcb..491de25e38a8 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -2978,11 +2978,11 @@ static void __init fixup_device_tree_pmac(void)
char type[8];
phandle node;
- // Some pmacs are missing #size-cells on escc nodes
+ // Some pmacs are missing #size-cells on escc or i2s nodes
for (node = 0; prom_next_node(&node); ) {
type[0] = '\0';
prom_getprop(node, "device_type", type, sizeof(type));
- if (prom_strcmp(type, "escc"))
+ if (prom_strcmp(type, "escc") && prom_strcmp(type, "i2s"))
continue;
if (prom_getproplen(node, "#size-cells") != PROM_ERROR)
diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c
index c9fc0edf56b1..c6d083a82d80 100644
--- a/arch/powerpc/perf/core-book3s.c
+++ b/arch/powerpc/perf/core-book3s.c
@@ -2183,6 +2183,10 @@ static struct pmu power_pmu = {
#define PERF_SAMPLE_ADDR_TYPE (PERF_SAMPLE_ADDR | \
PERF_SAMPLE_PHYS_ADDR | \
PERF_SAMPLE_DATA_PAGE_SIZE)
+
+#define SIER_TYPE_SHIFT 15
+#define SIER_TYPE_MASK (0x7ull << SIER_TYPE_SHIFT)
+
/*
* A counter has overflowed; update its count and record
* things if requested. Note that interrupts are hard-disabled
@@ -2251,6 +2255,22 @@ static void record_and_restart(struct perf_event *event, unsigned long val,
is_kernel_addr(mfspr(SPRN_SIAR)))
record = 0;
+ /*
+ * SIER[46-48] presents instruction type of the sampled instruction.
+ * In ISA v3.0 and before values "0" and "7" are considered reserved.
+ * In ISA v3.1, value "7" has been used to indicate "larx/stcx".
+ * Drop the sample if "type" has reserved values for this field with a
+ * ISA version check.
+ */
+ if (event->attr.sample_type & PERF_SAMPLE_DATA_SRC &&
+ ppmu->get_mem_data_src) {
+ val = (regs->dar & SIER_TYPE_MASK) >> SIER_TYPE_SHIFT;
+ if (val == 0 || (val == 7 && !cpu_has_feature(CPU_FTR_ARCH_31))) {
+ record = 0;
+ atomic64_inc(&event->lost_samples);
+ }
+ }
+
/*
* Finally record data if requested.
*/
diff --git a/arch/powerpc/perf/isa207-common.c b/arch/powerpc/perf/isa207-common.c
index 027a2add780e..9ffe3106c9b1 100644
--- a/arch/powerpc/perf/isa207-common.c
+++ b/arch/powerpc/perf/isa207-common.c
@@ -275,8 +275,10 @@ void isa207_get_mem_data_src(union perf_mem_data_src *dsrc, u32 flags,
sier = mfspr(SPRN_SIER);
val = (sier & ISA207_SIER_TYPE_MASK) >> ISA207_SIER_TYPE_SHIFT;
- if (val != 1 && val != 2 && !(val == 7 && cpu_has_feature(CPU_FTR_ARCH_31)))
+ if (val != 1 && val != 2 && !(val == 7 && cpu_has_feature(CPU_FTR_ARCH_31))) {
+ dsrc->val = 0;
return;
+ }
idx = (sier & ISA207_SIER_LDST_MASK) >> ISA207_SIER_LDST_SHIFT;
sub_idx = (sier & ISA207_SIER_DATA_SRC_MASK) >> ISA207_SIER_DATA_SRC_SHIFT;
diff --git a/arch/um/Makefile b/arch/um/Makefile
index 3dbd0e3b660e..1257ef03d1b7 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -153,5 +153,6 @@ MRPROPER_FILES += $(HOST_DIR)/include/generated
archclean:
@find . \( -name '*.bb' -o -name '*.bbg' -o -name '*.da' \
-o -name '*.gcov' \) -type f -print | xargs rm -f
+ $(Q)$(MAKE) -f $(srctree)/Makefile ARCH=$(HEADER_ARCH) clean
export HEADER_ARCH SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS DEV_NULL_PATH
diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c
index 8e636ce02949..50be04f7b40f 100644
--- a/arch/um/kernel/mem.c
+++ b/arch/um/kernel/mem.c
@@ -49,6 +49,7 @@ void __init mem_init(void)
map_memory(brk_end, __pa(brk_end), uml_reserved - brk_end, 1, 1, 0);
memblock_free(__pa(brk_end), uml_reserved - brk_end);
uml_reserved = brk_end;
+ min_low_pfn = PFN_UP(__pa(uml_reserved));
/* this will put all low memory onto the freelists */
memblock_free_all();
diff --git a/arch/x86/boot/genimage.sh b/arch/x86/boot/genimage.sh
index 0673fdfc1a11..a8a9b1daffac 100644
--- a/arch/x86/boot/genimage.sh
+++ b/arch/x86/boot/genimage.sh
@@ -22,6 +22,7 @@
# This script requires:
# bash
# syslinux
+# genisoimage
# mtools (for fdimage* and hdimage)
# edk2/OVMF (for hdimage)
#
@@ -250,7 +251,9 @@ geniso() {
cp "$isolinux" "$ldlinux" "$tmp_dir"
cp "$FBZIMAGE" "$tmp_dir"/linux
echo default linux "$KCMDLINE" > "$tmp_dir"/isolinux.cfg
- cp "${FDINITRDS[@]}" "$tmp_dir"/
+ if [ ${#FDINITRDS[@]} -gt 0 ]; then
+ cp "${FDINITRDS[@]}" "$tmp_dir"/
+ fi
genisoimage -J -r -appid 'LINUX_BOOT' -input-charset=utf-8 \
-quiet -o "$FIMAGE" -b isolinux.bin \
-c boot.cat -no-emul-boot -boot-load-size 4 \
diff --git a/arch/x86/events/amd/ibs.c b/arch/x86/events/amd/ibs.c
index b605e08f9a8e..2b8305602994 100644
--- a/arch/x86/events/amd/ibs.c
+++ b/arch/x86/events/amd/ibs.c
@@ -803,7 +803,8 @@ static __init int perf_event_ibs_init(void)
if (ibs_caps & IBS_CAPS_OPCNTEXT) {
perf_ibs_op.max_period |= IBS_OP_MAX_CNT_EXT_MASK;
perf_ibs_op.config_mask |= IBS_OP_MAX_CNT_EXT_MASK;
- perf_ibs_op.cnt_mask |= IBS_OP_MAX_CNT_EXT_MASK;
+ perf_ibs_op.cnt_mask |= (IBS_OP_MAX_CNT_EXT_MASK |
+ IBS_OP_CUR_CNT_EXT_MASK);
}
ret = perf_ibs_pmu_init(&perf_ibs_op, "ibs_op");
diff --git a/arch/x86/include/asm/alternative.h b/arch/x86/include/asm/alternative.h
index 1797f80c10de..a5f704dbb4a1 100644
--- a/arch/x86/include/asm/alternative.h
+++ b/arch/x86/include/asm/alternative.h
@@ -98,7 +98,7 @@ static inline u8 *its_static_thunk(int reg)
}
#endif
-#ifdef CONFIG_RETHUNK
+#if defined(CONFIG_RETHUNK) && defined(CONFIG_STACK_VALIDATION)
extern bool cpu_wants_rethunk(void);
extern bool cpu_wants_rethunk_at(void *addr);
#else
diff --git a/arch/x86/include/asm/nmi.h b/arch/x86/include/asm/nmi.h
index 1cb9c17a4cb4..affe5522961a 100644
--- a/arch/x86/include/asm/nmi.h
+++ b/arch/x86/include/asm/nmi.h
@@ -58,6 +58,8 @@ int __register_nmi_handler(unsigned int, struct nmiaction *);
void unregister_nmi_handler(unsigned int, const char *);
+void set_emergency_nmi_handler(unsigned int type, nmi_handler_t handler);
+
void stop_nmi(void);
void restart_nmi(void);
void local_touch_nmi(void);
diff --git a/arch/x86/include/asm/perf_event.h b/arch/x86/include/asm/perf_event.h
index 0e4efcde0783..cbfca9d2c419 100644
--- a/arch/x86/include/asm/perf_event.h
+++ b/arch/x86/include/asm/perf_event.h
@@ -417,6 +417,7 @@ struct pebs_xmm {
*/
#define IBS_OP_CUR_CNT (0xFFF80ULL<<32)
#define IBS_OP_CUR_CNT_RAND (0x0007FULL<<32)
+#define IBS_OP_CUR_CNT_EXT_MASK (0x7FULL<<52)
#define IBS_OP_CNT_CTL (1ULL<<19)
#define IBS_OP_VAL (1ULL<<18)
#define IBS_OP_ENABLE (1ULL<<17)
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index 63af3d73d19e..30b9292ac58f 100644
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -1382,9 +1382,13 @@ static __ro_after_init enum spectre_v2_mitigation_cmd spectre_v2_cmd;
static enum spectre_v2_user_cmd __init
spectre_v2_parse_user_cmdline(void)
{
+ enum spectre_v2_user_cmd mode;
char arg[20];
int ret, i;
+ mode = IS_ENABLED(CONFIG_MITIGATION_SPECTRE_V2) ?
+ SPECTRE_V2_USER_CMD_AUTO : SPECTRE_V2_USER_CMD_NONE;
+
switch (spectre_v2_cmd) {
case SPECTRE_V2_CMD_NONE:
return SPECTRE_V2_USER_CMD_NONE;
@@ -1397,7 +1401,7 @@ spectre_v2_parse_user_cmdline(void)
ret = cmdline_find_option(boot_command_line, "spectre_v2_user",
arg, sizeof(arg));
if (ret < 0)
- return SPECTRE_V2_USER_CMD_AUTO;
+ return mode;
for (i = 0; i < ARRAY_SIZE(v2_user_options); i++) {
if (match_option(arg, ret, v2_user_options[i].option)) {
@@ -1407,8 +1411,8 @@ spectre_v2_parse_user_cmdline(void)
}
}
- pr_err("Unknown user space protection option (%s). Switching to AUTO select\n", arg);
- return SPECTRE_V2_USER_CMD_AUTO;
+ pr_err("Unknown user space protection option (%s). Switching to default\n", arg);
+ return mode;
}
static inline bool spectre_v2_in_eibrs_mode(enum spectre_v2_mitigation mode)
diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c
index b892fe7035db..a858d8e5d610 100644
--- a/arch/x86/kernel/nmi.c
+++ b/arch/x86/kernel/nmi.c
@@ -38,8 +38,12 @@
#define CREATE_TRACE_POINTS
#include <trace/events/nmi.h>
+/*
+ * An emergency handler can be set in any context including NMI
+ */
struct nmi_desc {
raw_spinlock_t lock;
+ nmi_handler_t emerg_handler;
struct list_head head;
};
@@ -121,9 +125,22 @@ static void nmi_check_duration(struct nmiaction *action, u64 duration)
static int nmi_handle(unsigned int type, struct pt_regs *regs)
{
struct nmi_desc *desc = nmi_to_desc(type);
+ nmi_handler_t ehandler;
struct nmiaction *a;
int handled=0;
+ /*
+ * Call the emergency handler, if set
+ *
+ * In the case of crash_nmi_callback() emergency handler, it will
+ * return in the case of the crashing CPU to enable it to complete
+ * other necessary crashing actions ASAP. Other handlers in the
+ * linked list won't need to be run.
+ */
+ ehandler = desc->emerg_handler;
+ if (ehandler)
+ return ehandler(type, regs);
+
rcu_read_lock();
/*
@@ -209,6 +226,31 @@ void unregister_nmi_handler(unsigned int type, const char *name)
}
EXPORT_SYMBOL_GPL(unregister_nmi_handler);
+/**
+ * set_emergency_nmi_handler - Set emergency handler
+ * @type: NMI type
+ * @handler: the emergency handler to be stored
+ *
+ * Set an emergency NMI handler which, if set, will preempt all the other
+ * handlers in the linked list. If a NULL handler is passed in, it will clear
+ * it. It is expected that concurrent calls to this function will not happen
+ * or the system is screwed beyond repair.
+ */
+void set_emergency_nmi_handler(unsigned int type, nmi_handler_t handler)
+{
+ struct nmi_desc *desc = nmi_to_desc(type);
+
+ if (WARN_ON_ONCE(desc->emerg_handler == handler))
+ return;
+ desc->emerg_handler = handler;
+
+ /*
+ * Ensure the emergency handler is visible to other CPUs before
+ * function return
+ */
+ smp_wmb();
+}
+
static void
pci_serr_error(unsigned char reason, struct pt_regs *regs)
{
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index deedd77c7593..d8f7f8e43e19 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -874,15 +874,11 @@ void nmi_shootdown_cpus(nmi_shootdown_cb callback)
shootdown_callback = callback;
atomic_set(&waiting_for_crash_ipi, num_online_cpus() - 1);
- /* Would it be better to replace the trap vector here? */
- if (register_nmi_handler(NMI_LOCAL, crash_nmi_callback,
- NMI_FLAG_FIRST, "crash"))
- return; /* Return what? */
+
/*
- * Ensure the new callback function is set before sending
- * out the NMI
+ * Set emergency handler to preempt other handlers.
*/
- wmb();
+ set_emergency_nmi_handler(NMI_LOCAL, crash_nmi_callback);
apic_send_IPI_allbutself(NMI_VECTOR);
diff --git a/arch/x86/mm/kaslr.c b/arch/x86/mm/kaslr.c
index 37db264866b6..2ef1951ce1fd 100644
--- a/arch/x86/mm/kaslr.c
+++ b/arch/x86/mm/kaslr.c
@@ -96,8 +96,14 @@ void __init kernel_randomize_memory(void)
memory_tb = DIV_ROUND_UP(max_pfn << PAGE_SHIFT, 1UL << TB_SHIFT) +
CONFIG_RANDOMIZE_MEMORY_PHYSICAL_PADDING;
- /* Adapt physical memory region size based on available memory */
- if (memory_tb < kaslr_regions[0].size_tb)
+ /*
+ * Adapt physical memory region size based on available memory,
+ * except when CONFIG_PCI_P2PDMA is enabled. P2PDMA exposes the
+ * device BAR space assuming the direct map space is large enough
+ * for creating a ZONE_DEVICE mapping in the direct map corresponding
+ * to the physical BAR address.
+ */
+ if (!IS_ENABLED(CONFIG_PCI_P2PDMA) && (memory_tb < kaslr_regions[0].size_tb))
kaslr_regions[0].size_tb = memory_tb;
/*
diff --git a/arch/x86/um/os-Linux/mcontext.c b/arch/x86/um/os-Linux/mcontext.c
index 49c3744cac37..81b9d1f9f4e6 100644
--- a/arch/x86/um/os-Linux/mcontext.c
+++ b/arch/x86/um/os-Linux/mcontext.c
@@ -26,7 +26,6 @@ void get_regs_from_mc(struct uml_pt_regs *regs, mcontext_t *mc)
COPY(RIP);
COPY2(EFLAGS, EFL);
COPY2(CS, CSGSFS);
- regs->gp[CS / sizeof(unsigned long)] &= 0xffff;
- regs->gp[CS / sizeof(unsigned long)] |= 3;
+ regs->gp[SS / sizeof(unsigned long)] = mc->gregs[REG_CSGSFS] >> 48;
#endif
}
diff --git a/crypto/algif_hash.c b/crypto/algif_hash.c
index 50f7b22f1b48..be21cfdc6dbc 100644
--- a/crypto/algif_hash.c
+++ b/crypto/algif_hash.c
@@ -262,10 +262,6 @@ static int hash_accept(struct socket *sock, struct socket *newsock, int flags,
return err;
err = crypto_ahash_import(&ctx2->req, state);
- if (err) {
- sock_orphan(sk2);
- sock_put(sk2);
- }
return err;
}
diff --git a/crypto/lzo-rle.c b/crypto/lzo-rle.c
index 0631d975bfac..0abc2d87f042 100644
--- a/crypto/lzo-rle.c
+++ b/crypto/lzo-rle.c
@@ -55,7 +55,7 @@ static int __lzorle_compress(const u8 *src, unsigned int slen,
size_t tmp_len = *dlen; /* size_t(ulong) <-> uint on 64 bit */
int err;
- err = lzorle1x_1_compress(src, slen, dst, &tmp_len, ctx);
+ err = lzorle1x_1_compress_safe(src, slen, dst, &tmp_len, ctx);
if (err != LZO_E_OK)
return -EINVAL;
diff --git a/crypto/lzo.c b/crypto/lzo.c
index ebda132dd22b..8338851c7406 100644
--- a/crypto/lzo.c
+++ b/crypto/lzo.c
@@ -55,7 +55,7 @@ static int __lzo_compress(const u8 *src, unsigned int slen,
size_t tmp_len = *dlen; /* size_t(ulong) <-> uint on 64 bit */
int err;
- err = lzo1x_1_compress(src, slen, dst, &tmp_len, ctx);
+ err = lzo1x_1_compress_safe(src, slen, dst, &tmp_len, ctx);
if (err != LZO_E_OK)
return -EINVAL;
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index 1da360c51d66..6a178e38fc4a 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -437,7 +437,7 @@ config ACPI_SBS
the modules will be called sbs and sbshc.
config ACPI_HED
- tristate "Hardware Error Device"
+ bool "Hardware Error Device"
help
This driver supports the Hardware Error Device (PNP0C33),
which is used to report some hardware errors notified via
diff --git a/drivers/acpi/hed.c b/drivers/acpi/hed.c
index 60a2939cde6c..e8e9b1ac06b8 100644
--- a/drivers/acpi/hed.c
+++ b/drivers/acpi/hed.c
@@ -72,7 +72,12 @@ static struct acpi_driver acpi_hed_driver = {
.notify = acpi_hed_notify,
},
};
-module_acpi_driver(acpi_hed_driver);
+
+static int __init acpi_hed_driver_init(void)
+{
+ return acpi_bus_register_driver(&acpi_hed_driver);
+}
+subsys_initcall(acpi_hed_driver_init);
MODULE_AUTHOR("Huang Ying");
MODULE_DESCRIPTION("ACPI Hardware Error Device Driver");
diff --git a/drivers/auxdisplay/charlcd.c b/drivers/auxdisplay/charlcd.c
index 6c010d4efa4a..313bb7ebc2cf 100644
--- a/drivers/auxdisplay/charlcd.c
+++ b/drivers/auxdisplay/charlcd.c
@@ -594,18 +594,19 @@ static int charlcd_init(struct charlcd *lcd)
return 0;
}
-struct charlcd *charlcd_alloc(void)
+struct charlcd *charlcd_alloc(unsigned int drvdata_size)
{
struct charlcd_priv *priv;
struct charlcd *lcd;
- priv = kzalloc(sizeof(*priv), GFP_KERNEL);
+ priv = kzalloc(sizeof(*priv) + drvdata_size, GFP_KERNEL);
if (!priv)
return NULL;
priv->esc_seq.len = -1;
lcd = &priv->lcd;
+ lcd->drvdata = priv->drvdata;
return lcd;
}
diff --git a/drivers/auxdisplay/charlcd.h b/drivers/auxdisplay/charlcd.h
index eed80063a6d2..4bbf106b2dd8 100644
--- a/drivers/auxdisplay/charlcd.h
+++ b/drivers/auxdisplay/charlcd.h
@@ -49,7 +49,7 @@ struct charlcd {
unsigned long y;
} addr;
- void *drvdata;
+ void *drvdata; /* Set by charlcd_alloc() */
};
/**
@@ -93,7 +93,8 @@ struct charlcd_ops {
};
void charlcd_backlight(struct charlcd *lcd, enum charlcd_onoff on);
-struct charlcd *charlcd_alloc(void);
+
+struct charlcd *charlcd_alloc(unsigned int drvdata_size);
void charlcd_free(struct charlcd *lcd);
int charlcd_register(struct charlcd *lcd);
diff --git a/drivers/auxdisplay/hd44780.c b/drivers/auxdisplay/hd44780.c
index 8b690f59df27..ebaf0ff518f4 100644
--- a/drivers/auxdisplay/hd44780.c
+++ b/drivers/auxdisplay/hd44780.c
@@ -226,7 +226,7 @@ static int hd44780_probe(struct platform_device *pdev)
if (!hdc)
return -ENOMEM;
- lcd = charlcd_alloc();
+ lcd = charlcd_alloc(0);
if (!lcd)
goto fail1;
diff --git a/drivers/auxdisplay/lcd2s.c b/drivers/auxdisplay/lcd2s.c
index 2578b2d45439..2ee6875044a9 100644
--- a/drivers/auxdisplay/lcd2s.c
+++ b/drivers/auxdisplay/lcd2s.c
@@ -307,7 +307,7 @@ static int lcd2s_i2c_probe(struct i2c_client *i2c,
if (err < 0)
return err;
- lcd = charlcd_alloc();
+ lcd = charlcd_alloc(0);
if (!lcd)
return -ENOMEM;
diff --git a/drivers/auxdisplay/panel.c b/drivers/auxdisplay/panel.c
index eba04c0de7eb..0f3999b665e7 100644
--- a/drivers/auxdisplay/panel.c
+++ b/drivers/auxdisplay/panel.c
@@ -835,7 +835,7 @@ static void lcd_init(void)
if (!hdc)
return;
- charlcd = charlcd_alloc();
+ charlcd = charlcd_alloc(0);
if (!charlcd) {
kfree(hdc);
return;
diff --git a/drivers/char/tpm/tpm_tis_core.h b/drivers/char/tpm/tpm_tis_core.h
index 464ed352ab2e..ed7b2caa9ebb 100644
--- a/drivers/char/tpm/tpm_tis_core.h
+++ b/drivers/char/tpm/tpm_tis_core.h
@@ -53,7 +53,7 @@ enum tis_int_flags {
enum tis_defaults {
TIS_MEM_LEN = 0x5000,
TIS_SHORT_TIMEOUT = 750, /* ms */
- TIS_LONG_TIMEOUT = 2000, /* 2 sec */
+ TIS_LONG_TIMEOUT = 4000, /* 4 secs */
TIS_TIMEOUT_MIN_ATML = 14700, /* usecs */
TIS_TIMEOUT_MAX_ATML = 15000, /* usecs */
};
diff --git a/drivers/clk/imx/clk-imx8mp.c b/drivers/clk/imx/clk-imx8mp.c
index 0f9ec5e0f5f8..0541ddfdf102 100644
--- a/drivers/clk/imx/clk-imx8mp.c
+++ b/drivers/clk/imx/clk-imx8mp.c
@@ -8,6 +8,7 @@
#include <linux/err.h>
#include <linux/io.h>
#include <linux/module.h>
+#include <linux/units.h>
#include <linux/of_address.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
@@ -405,11 +406,151 @@ static const char * const imx8mp_clkout_sels[] = {"audio_pll1_out", "audio_pll2_
static struct clk_hw **hws;
static struct clk_hw_onecell_data *clk_hw_data;
+struct imx8mp_clock_constraints {
+ unsigned int clkid;
+ u32 maxrate;
+};
+
+/*
+ * Below tables are taken from IMX8MPCEC Rev. 2.1, 07/2023
+ * Table 13. Maximum frequency of modules.
+ * Probable typos fixed are marked with a comment.
+ */
+static const struct imx8mp_clock_constraints imx8mp_clock_common_constraints[] = {
+ { IMX8MP_CLK_A53_DIV, 1000 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ENET_AXI, 266666667 }, /* Datasheet claims 266MHz */
+ { IMX8MP_CLK_NAND_USDHC_BUS, 266666667 }, /* Datasheet claims 266MHz */
+ { IMX8MP_CLK_MEDIA_APB, 200 * HZ_PER_MHZ },
+ { IMX8MP_CLK_HDMI_APB, 133333333 }, /* Datasheet claims 133MHz */
+ { IMX8MP_CLK_ML_AXI, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_AHB, 133333333 },
+ { IMX8MP_CLK_IPG_ROOT, 66666667 },
+ { IMX8MP_CLK_AUDIO_AHB, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_DISP2_PIX, 170 * HZ_PER_MHZ },
+ { IMX8MP_CLK_DRAM_ALT, 666666667 },
+ { IMX8MP_CLK_DRAM_APB, 200 * HZ_PER_MHZ },
+ { IMX8MP_CLK_CAN1, 80 * HZ_PER_MHZ },
+ { IMX8MP_CLK_CAN2, 80 * HZ_PER_MHZ },
+ { IMX8MP_CLK_PCIE_AUX, 10 * HZ_PER_MHZ },
+ { IMX8MP_CLK_I2C5, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_I2C6, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_SAI1, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_SAI2, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_SAI3, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_SAI5, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_SAI6, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_ENET_QOS, 125 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ENET_QOS_TIMER, 200 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ENET_REF, 125 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ENET_TIMER, 125 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ENET_PHY_REF, 125 * HZ_PER_MHZ },
+ { IMX8MP_CLK_NAND, 500 * HZ_PER_MHZ },
+ { IMX8MP_CLK_QSPI, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_USDHC1, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_USDHC2, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_I2C1, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_I2C2, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_I2C3, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_I2C4, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_UART1, 80 * HZ_PER_MHZ },
+ { IMX8MP_CLK_UART2, 80 * HZ_PER_MHZ },
+ { IMX8MP_CLK_UART3, 80 * HZ_PER_MHZ },
+ { IMX8MP_CLK_UART4, 80 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ECSPI1, 80 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ECSPI2, 80 * HZ_PER_MHZ },
+ { IMX8MP_CLK_PWM1, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_PWM2, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_PWM3, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_PWM4, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_GPT1, 100 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPT2, 100 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPT3, 100 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPT4, 100 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPT5, 100 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPT6, 100 * HZ_PER_MHZ },
+ { IMX8MP_CLK_WDOG, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_IPP_DO_CLKO1, 200 * HZ_PER_MHZ },
+ { IMX8MP_CLK_IPP_DO_CLKO2, 200 * HZ_PER_MHZ },
+ { IMX8MP_CLK_HDMI_REF_266M, 266 * HZ_PER_MHZ },
+ { IMX8MP_CLK_USDHC3, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_MIPI_PHY1_REF, 300 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_DISP1_PIX, 250 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_CAM2_PIX, 277 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_LDB, 595 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_MIPI_TEST_BYTE, 200 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ECSPI3, 80 * HZ_PER_MHZ },
+ { IMX8MP_CLK_PDM, 200 * HZ_PER_MHZ },
+ { IMX8MP_CLK_SAI7, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_MAIN_AXI, 400 * HZ_PER_MHZ },
+ { /* Sentinel */ }
+};
+
+static const struct imx8mp_clock_constraints imx8mp_clock_nominal_constraints[] = {
+ { IMX8MP_CLK_M7_CORE, 600 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ML_CORE, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPU3D_CORE, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPU3D_SHADER_CORE, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPU2D_CORE, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_AUDIO_AXI_SRC, 600 * HZ_PER_MHZ },
+ { IMX8MP_CLK_HSIO_AXI, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_ISP, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_VPU_BUS, 600 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_AXI, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_HDMI_AXI, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPU_AXI, 600 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPU_AHB, 300 * HZ_PER_MHZ },
+ { IMX8MP_CLK_NOC, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_NOC_IO, 600 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ML_AHB, 300 * HZ_PER_MHZ },
+ { IMX8MP_CLK_VPU_G1, 600 * HZ_PER_MHZ },
+ { IMX8MP_CLK_VPU_G2, 500 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_CAM1_PIX, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_VPU_VC8000E, 400 * HZ_PER_MHZ }, /* Datasheet claims 500MHz */
+ { IMX8MP_CLK_DRAM_CORE, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GIC, 400 * HZ_PER_MHZ },
+ { /* Sentinel */ }
+};
+
+static const struct imx8mp_clock_constraints imx8mp_clock_overdrive_constraints[] = {
+ { IMX8MP_CLK_M7_CORE, 800 * HZ_PER_MHZ},
+ { IMX8MP_CLK_ML_CORE, 1000 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPU3D_CORE, 1000 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPU3D_SHADER_CORE, 1000 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPU2D_CORE, 1000 * HZ_PER_MHZ },
+ { IMX8MP_CLK_AUDIO_AXI_SRC, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_HSIO_AXI, 500 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_ISP, 500 * HZ_PER_MHZ },
+ { IMX8MP_CLK_VPU_BUS, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_AXI, 500 * HZ_PER_MHZ },
+ { IMX8MP_CLK_HDMI_AXI, 500 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPU_AXI, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPU_AHB, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_NOC, 1000 * HZ_PER_MHZ },
+ { IMX8MP_CLK_NOC_IO, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ML_AHB, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_VPU_G1, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_VPU_G2, 700 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_CAM1_PIX, 500 * HZ_PER_MHZ },
+ { IMX8MP_CLK_VPU_VC8000E, 500 * HZ_PER_MHZ }, /* Datasheet claims 400MHz */
+ { IMX8MP_CLK_DRAM_CORE, 1000 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GIC, 500 * HZ_PER_MHZ },
+ { /* Sentinel */ }
+};
+
+static void imx8mp_clocks_apply_constraints(const struct imx8mp_clock_constraints constraints[])
+{
+ const struct imx8mp_clock_constraints *constr;
+
+ for (constr = constraints; constr->clkid; constr++)
+ clk_hw_set_rate_range(hws[constr->clkid], 0, constr->maxrate);
+}
+
static int imx8mp_clocks_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct device_node *np;
void __iomem *anatop_base, *ccm_base;
+ const char *opmode;
int err;
np = of_find_compatible_node(NULL, NULL, "fsl,imx8mp-anatop");
@@ -720,6 +861,16 @@ static int imx8mp_clocks_probe(struct platform_device *pdev)
imx_check_clk_hws(hws, IMX8MP_CLK_END);
+ imx8mp_clocks_apply_constraints(imx8mp_clock_common_constraints);
+
+ err = of_property_read_string(np, "fsl,operating-mode", &opmode);
+ if (!err) {
+ if (!strcmp(opmode, "nominal"))
+ imx8mp_clocks_apply_constraints(imx8mp_clock_nominal_constraints);
+ else if (!strcmp(opmode, "overdrive"))
+ imx8mp_clocks_apply_constraints(imx8mp_clock_overdrive_constraints);
+ }
+
err = of_clk_add_hw_provider(np, of_clk_hw_onecell_get, clk_hw_data);
if (err < 0) {
dev_err(dev, "failed to register hws for i.MX8MP\n");
diff --git a/drivers/clk/qcom/camcc-sm8250.c b/drivers/clk/qcom/camcc-sm8250.c
index 9b32c56a5bc5..e29706d78287 100644
--- a/drivers/clk/qcom/camcc-sm8250.c
+++ b/drivers/clk/qcom/camcc-sm8250.c
@@ -411,7 +411,7 @@ static struct clk_rcg2 cam_cc_bps_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -433,7 +433,7 @@ static struct clk_rcg2 cam_cc_camnoc_axi_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -454,7 +454,7 @@ static struct clk_rcg2 cam_cc_cci_0_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -469,7 +469,7 @@ static struct clk_rcg2 cam_cc_cci_1_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -490,7 +490,7 @@ static struct clk_rcg2 cam_cc_cphy_rx_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -511,7 +511,7 @@ static struct clk_rcg2 cam_cc_csi0phytimer_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -526,7 +526,7 @@ static struct clk_rcg2 cam_cc_csi1phytimer_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -556,7 +556,7 @@ static struct clk_rcg2 cam_cc_csi3phytimer_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -571,7 +571,7 @@ static struct clk_rcg2 cam_cc_csi4phytimer_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -586,7 +586,7 @@ static struct clk_rcg2 cam_cc_csi5phytimer_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -611,7 +611,7 @@ static struct clk_rcg2 cam_cc_fast_ahb_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -634,7 +634,7 @@ static struct clk_rcg2 cam_cc_fd_core_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -649,7 +649,7 @@ static struct clk_rcg2 cam_cc_icp_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -673,7 +673,7 @@ static struct clk_rcg2 cam_cc_ife_0_clk_src = {
.parent_data = cam_cc_parent_data_2,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_2),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -710,7 +710,7 @@ static struct clk_rcg2 cam_cc_ife_0_csid_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -734,7 +734,7 @@ static struct clk_rcg2 cam_cc_ife_1_clk_src = {
.parent_data = cam_cc_parent_data_3,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_3),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -749,7 +749,7 @@ static struct clk_rcg2 cam_cc_ife_1_csid_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -771,7 +771,7 @@ static struct clk_rcg2 cam_cc_ife_lite_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -786,7 +786,7 @@ static struct clk_rcg2 cam_cc_ife_lite_csid_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -810,7 +810,7 @@ static struct clk_rcg2 cam_cc_ipe_0_clk_src = {
.parent_data = cam_cc_parent_data_4,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_4),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -825,7 +825,7 @@ static struct clk_rcg2 cam_cc_jpeg_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -847,7 +847,7 @@ static struct clk_rcg2 cam_cc_mclk0_clk_src = {
.parent_data = cam_cc_parent_data_1,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_1),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -862,7 +862,7 @@ static struct clk_rcg2 cam_cc_mclk1_clk_src = {
.parent_data = cam_cc_parent_data_1,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_1),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -877,7 +877,7 @@ static struct clk_rcg2 cam_cc_mclk2_clk_src = {
.parent_data = cam_cc_parent_data_1,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_1),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -892,7 +892,7 @@ static struct clk_rcg2 cam_cc_mclk3_clk_src = {
.parent_data = cam_cc_parent_data_1,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_1),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -907,7 +907,7 @@ static struct clk_rcg2 cam_cc_mclk4_clk_src = {
.parent_data = cam_cc_parent_data_1,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_1),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -922,7 +922,7 @@ static struct clk_rcg2 cam_cc_mclk5_clk_src = {
.parent_data = cam_cc_parent_data_1,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_1),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -993,7 +993,7 @@ static struct clk_rcg2 cam_cc_slow_ahb_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
diff --git a/drivers/clocksource/mips-gic-timer.c b/drivers/clocksource/mips-gic-timer.c
index be4175f415ba..1946691f6b32 100644
--- a/drivers/clocksource/mips-gic-timer.c
+++ b/drivers/clocksource/mips-gic-timer.c
@@ -119,6 +119,9 @@ static void gic_update_frequency(void *data)
static int gic_starting_cpu(unsigned int cpu)
{
+ /* Ensure the GIC counter is running */
+ clear_gic_config(GIC_CONFIG_COUNTSTOP);
+
gic_clockevent_cpu_init(cpu, this_cpu_ptr(&gic_clockevent_device));
return 0;
}
@@ -253,9 +256,6 @@ static int __init gic_clocksource_of_init(struct device_node *node)
pr_warn("Unable to register clock notifier\n");
}
- /* And finally start the counter */
- clear_gic_config(GIC_CONFIG_COUNTSTOP);
-
/*
* It's safe to use the MIPS GIC timer as a sched clock source only if
* its ticks are stable, which is true on either the platforms with
diff --git a/drivers/cpufreq/tegra186-cpufreq.c b/drivers/cpufreq/tegra186-cpufreq.c
index 5d1943e787b0..19597246f9cc 100644
--- a/drivers/cpufreq/tegra186-cpufreq.c
+++ b/drivers/cpufreq/tegra186-cpufreq.c
@@ -73,11 +73,18 @@ static int tegra186_cpufreq_init(struct cpufreq_policy *policy)
{
struct tegra186_cpufreq_data *data = cpufreq_get_driver_data();
unsigned int cluster = data->cpus[policy->cpu].bpmp_cluster_id;
+ u32 cpu;
policy->freq_table = data->clusters[cluster].table;
policy->cpuinfo.transition_latency = 300 * 1000;
policy->driver_data = NULL;
+ /* set same policy for all cpus in a cluster */
+ for (cpu = 0; cpu < ARRAY_SIZE(tegra186_cpus); cpu++) {
+ if (data->cpus[cpu].bpmp_cluster_id == cluster)
+ cpumask_set_cpu(cpu, policy->cpus);
+ }
+
return 0;
}
diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c
index 2e5670446991..e1e2721beb75 100644
--- a/drivers/cpuidle/governors/menu.c
+++ b/drivers/cpuidle/governors/menu.c
@@ -249,8 +249,19 @@ static unsigned int get_typical_interval(struct menu_device *data,
* This can deal with workloads that have long pauses interspersed
* with sporadic activity with a bunch of short pauses.
*/
- if ((divisor * 4) <= INTERVALS * 3)
+ if (divisor * 4 <= INTERVALS * 3) {
+ /*
+ * If there are sufficiently many data points still under
+ * consideration after the outliers have been eliminated,
+ * returning without a prediction would be a mistake because it
+ * is likely that the next interval will not exceed the current
+ * maximum, so return the latter in that case.
+ */
+ if (divisor >= INTERVALS / 2)
+ return max;
+
return UINT_MAX;
+ }
thresh = max - 1;
goto again;
diff --git a/drivers/crypto/marvell/octeontx2/otx2_cptvf_reqmgr.c b/drivers/crypto/marvell/octeontx2/otx2_cptvf_reqmgr.c
index 811ded72ce5f..798bb40fed68 100644
--- a/drivers/crypto/marvell/octeontx2/otx2_cptvf_reqmgr.c
+++ b/drivers/crypto/marvell/octeontx2/otx2_cptvf_reqmgr.c
@@ -410,9 +410,10 @@ static int cpt_process_ccode(struct otx2_cptlfs_info *lfs,
break;
}
- dev_err(&pdev->dev,
- "Request failed with software error code 0x%x\n",
- cpt_status->s.uc_compcode);
+ pr_debug("Request failed with software error code 0x%x: algo = %s driver = %s\n",
+ cpt_status->s.uc_compcode,
+ info->req->areq->tfm->__crt_alg->cra_name,
+ info->req->areq->tfm->__crt_alg->cra_driver_name);
otx2_cpt_dump_sg_list(pdev, info->req);
break;
}
diff --git a/drivers/edac/ie31200_edac.c b/drivers/edac/ie31200_edac.c
index acb011cfd8c4..5e61ca1b72e0 100644
--- a/drivers/edac/ie31200_edac.c
+++ b/drivers/edac/ie31200_edac.c
@@ -397,10 +397,9 @@ static int ie31200_probe1(struct pci_dev *pdev, int dev_idx)
int i, j, ret;
struct mem_ctl_info *mci = NULL;
struct edac_mc_layer layers[2];
- struct dimm_data dimm_info[IE31200_CHANNELS][IE31200_DIMMS_PER_CHANNEL];
void __iomem *window;
struct ie31200_priv *priv;
- u32 addr_decode, mad_offset;
+ u32 addr_decode[IE31200_CHANNELS], mad_offset;
/*
* Kaby Lake, Coffee Lake seem to work like Skylake. Please re-visit
@@ -458,19 +457,10 @@ static int ie31200_probe1(struct pci_dev *pdev, int dev_idx)
mad_offset = IE31200_MAD_DIMM_0_OFFSET;
}
- /* populate DIMM info */
for (i = 0; i < IE31200_CHANNELS; i++) {
- addr_decode = readl(window + mad_offset +
+ addr_decode[i] = readl(window + mad_offset +
(i * 4));
- edac_dbg(0, "addr_decode: 0x%x\n", addr_decode);
- for (j = 0; j < IE31200_DIMMS_PER_CHANNEL; j++) {
- populate_dimm_info(&dimm_info[i][j], addr_decode, j,
- skl);
- edac_dbg(0, "size: 0x%x, rank: %d, width: %d\n",
- dimm_info[i][j].size,
- dimm_info[i][j].dual_rank,
- dimm_info[i][j].x16_width);
- }
+ edac_dbg(0, "addr_decode: 0x%x\n", addr_decode[i]);
}
/*
@@ -481,14 +471,22 @@ static int ie31200_probe1(struct pci_dev *pdev, int dev_idx)
*/
for (i = 0; i < IE31200_DIMMS_PER_CHANNEL; i++) {
for (j = 0; j < IE31200_CHANNELS; j++) {
+ struct dimm_data dimm_info;
struct dimm_info *dimm;
unsigned long nr_pages;
- nr_pages = IE31200_PAGES(dimm_info[j][i].size, skl);
+ populate_dimm_info(&dimm_info, addr_decode[j], i,
+ skl);
+ edac_dbg(0, "size: 0x%x, rank: %d, width: %d\n",
+ dimm_info.size,
+ dimm_info.dual_rank,
+ dimm_info.x16_width);
+
+ nr_pages = IE31200_PAGES(dimm_info.size, skl);
if (nr_pages == 0)
continue;
- if (dimm_info[j][i].dual_rank) {
+ if (dimm_info.dual_rank) {
nr_pages = nr_pages / 2;
dimm = edac_get_dimm(mci, (i * 2) + 1, j, 0);
dimm->nr_pages = nr_pages;
diff --git a/drivers/firmware/arm_ffa/bus.c b/drivers/firmware/arm_ffa/bus.c
index f79ba6f733ba..27820a59ce25 100644
--- a/drivers/firmware/arm_ffa/bus.c
+++ b/drivers/firmware/arm_ffa/bus.c
@@ -190,6 +190,7 @@ struct ffa_device *ffa_device_register(const uuid_t *uuid, int vm_id)
dev = &ffa_dev->dev;
dev->bus = &ffa_bus_type;
dev->release = ffa_release_device;
+ dev->dma_mask = &dev->coherent_dma_mask;
dev_set_name(&ffa_dev->dev, "arm-ffa-%d", id);
ffa_dev->id = id;
diff --git a/drivers/fpga/altera-cvp.c b/drivers/fpga/altera-cvp.c
index ccf4546eff29..34254911c01b 100644
--- a/drivers/fpga/altera-cvp.c
+++ b/drivers/fpga/altera-cvp.c
@@ -52,7 +52,7 @@
/* V2 Defines */
#define VSE_CVP_TX_CREDITS 0x49 /* 8bit */
-#define V2_CREDIT_TIMEOUT_US 20000
+#define V2_CREDIT_TIMEOUT_US 40000
#define V2_CHECK_CREDIT_US 10
#define V2_POLL_TIMEOUT_US 1000000
#define V2_USER_TIMEOUT_US 500000
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index a8b7f0aeacf8..64bf24b64446 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
@@ -353,7 +353,6 @@ static int psp_sw_fini(void *handle)
{
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
struct psp_context *psp = &adev->psp;
- struct psp_gfx_cmd_resp *cmd = psp->cmd;
psp_memory_training_fini(psp);
if (psp->sos_fw) {
@@ -373,8 +372,8 @@ static int psp_sw_fini(void *handle)
adev->asic_type == CHIP_SIENNA_CICHLID)
psp_sysfs_fini(adev);
- kfree(cmd);
- cmd = NULL;
+ kfree(psp->cmd);
+ psp->cmd = NULL;
amdgpu_bo_free_kernel(&psp->fw_pri_bo,
&psp->fw_pri_mc_addr, &psp->fw_pri_buf);
diff --git a/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c b/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c
index f51fd0688eca..9b881d8413b1 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c
@@ -92,12 +92,12 @@ static void gfxhub_v1_0_init_system_aperture_regs(struct amdgpu_device *adev)
{
uint64_t value;
- /* Program the AGP BAR */
- WREG32_SOC15_RLC(GC, 0, mmMC_VM_AGP_BASE, 0);
- WREG32_SOC15_RLC(GC, 0, mmMC_VM_AGP_BOT, adev->gmc.agp_start >> 24);
- WREG32_SOC15_RLC(GC, 0, mmMC_VM_AGP_TOP, adev->gmc.agp_end >> 24);
-
if (!amdgpu_sriov_vf(adev) || adev->asic_type <= CHIP_VEGA10) {
+ /* Program the AGP BAR */
+ WREG32_SOC15_RLC(GC, 0, mmMC_VM_AGP_BASE, 0);
+ WREG32_SOC15_RLC(GC, 0, mmMC_VM_AGP_BOT, adev->gmc.agp_start >> 24);
+ WREG32_SOC15_RLC(GC, 0, mmMC_VM_AGP_TOP, adev->gmc.agp_end >> 24);
+
/* Program the system aperture low logical page number. */
WREG32_SOC15_RLC(GC, 0, mmMC_VM_SYSTEM_APERTURE_LOW_ADDR,
min(adev->gmc.fb_start, adev->gmc.agp_start) >> 18);
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
index 49810642bc2b..7ef6e61aa043 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
@@ -807,6 +807,14 @@ struct kfd_process *kfd_create_process(struct file *filep)
if (thread->group_leader->mm != thread->mm)
return ERR_PTR(-EINVAL);
+ /* If the process just called exec(3), it is possible that the
+ * cleanup of the kfd_process (following the release of the mm
+ * of the old process image) is still in the cleanup work queue.
+ * Make sure to drain any job before trying to recreate any
+ * resource for this process.
+ */
+ flush_workqueue(kfd_process_wq);
+
/*
* take kfd processes mutex before starting of process creation
* so there won't be a case where two threads of the same process
@@ -819,14 +827,6 @@ struct kfd_process *kfd_create_process(struct file *filep)
if (process) {
pr_debug("Process already found\n");
} else {
- /* If the process just called exec(3), it is possible that the
- * cleanup of the kfd_process (following the release of the mm
- * of the old process image) is still in the cleanup work queue.
- * Make sure to drain any job before trying to recreate any
- * resource for this process.
- */
- flush_workqueue(kfd_process_wq);
-
process = create_process(thread);
if (IS_ERR(process))
goto out;
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 25e1908b2fd3..e9f592bdac27 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -2710,11 +2710,6 @@ static int dm_resume(void *handle)
return 0;
}
-
- /* leave display off for S4 sequence */
- if (adev->in_s4)
- return 0;
-
/* Recreate dc_state - DC invalidates it when setting power state to S3. */
dc_release_state(dm_state->context);
dm_state->context = dc_create_state(dm->dc);
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index d3d638252e2b..e1085c316b78 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -248,6 +248,7 @@ static bool create_links(
link->link_id.type = OBJECT_TYPE_CONNECTOR;
link->link_id.id = CONNECTOR_ID_VIRTUAL;
link->link_id.enum_id = ENUM_ID_1;
+ link->psr_settings.psr_version = DC_PSR_VERSION_UNSUPPORTED;
link->link_enc = kzalloc(sizeof(*link->link_enc), GFP_KERNEL);
if (!link->link_enc) {
diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c
index 0601c17426af..27932a32057e 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c
@@ -386,11 +386,6 @@ bool dpp3_get_optimal_number_of_taps(
int min_taps_y, min_taps_c;
enum lb_memory_config lb_config;
- if (scl_data->viewport.width > scl_data->h_active &&
- dpp->ctx->dc->debug.max_downscale_src_width != 0 &&
- scl_data->viewport.width > dpp->ctx->dc->debug.max_downscale_src_width)
- return false;
-
/*
* Set default taps if none are provided
* From programming guide: taps = min{ ceil(2*H_RATIO,1), 8} for downscaling
@@ -428,6 +423,12 @@ bool dpp3_get_optimal_number_of_taps(
else
scl_data->taps.h_taps_c = in_taps->h_taps_c;
+ // Avoid null data in the scl data with this early return, proceed non-adaptive calcualtion first
+ if (scl_data->viewport.width > scl_data->h_active &&
+ dpp->ctx->dc->debug.max_downscale_src_width != 0 &&
+ scl_data->viewport.width > dpp->ctx->dc->debug.max_downscale_src_width)
+ return false;
+
/*Ensure we can support the requested number of vtaps*/
min_taps_y = dc_fixpt_ceil(scl_data->ratios.vert);
min_taps_c = dc_fixpt_ceil(scl_data->ratios.vert_c);
diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c
index 08ed0d08d03b..87d31d3b0e35 100644
--- a/drivers/gpu/drm/ast/ast_mode.c
+++ b/drivers/gpu/drm/ast/ast_mode.c
@@ -105,7 +105,7 @@ static bool ast_get_vbios_mode_info(const struct drm_format_info *format,
return false;
}
- switch (mode->crtc_hdisplay) {
+ switch (mode->hdisplay) {
case 640:
vbios_mode->enh_table = &res_640x480[refresh_rate_index];
break;
@@ -116,7 +116,7 @@ static bool ast_get_vbios_mode_info(const struct drm_format_info *format,
vbios_mode->enh_table = &res_1024x768[refresh_rate_index];
break;
case 1280:
- if (mode->crtc_vdisplay == 800)
+ if (mode->vdisplay == 800)
vbios_mode->enh_table = &res_1280x800[refresh_rate_index];
else
vbios_mode->enh_table = &res_1280x1024[refresh_rate_index];
@@ -128,7 +128,7 @@ static bool ast_get_vbios_mode_info(const struct drm_format_info *format,
vbios_mode->enh_table = &res_1440x900[refresh_rate_index];
break;
case 1600:
- if (mode->crtc_vdisplay == 900)
+ if (mode->vdisplay == 900)
vbios_mode->enh_table = &res_1600x900[refresh_rate_index];
else
vbios_mode->enh_table = &res_1600x1200[refresh_rate_index];
@@ -137,7 +137,7 @@ static bool ast_get_vbios_mode_info(const struct drm_format_info *format,
vbios_mode->enh_table = &res_1680x1050[refresh_rate_index];
break;
case 1920:
- if (mode->crtc_vdisplay == 1080)
+ if (mode->vdisplay == 1080)
vbios_mode->enh_table = &res_1920x1080[refresh_rate_index];
else
vbios_mode->enh_table = &res_1920x1200[refresh_rate_index];
@@ -181,6 +181,7 @@ static bool ast_get_vbios_mode_info(const struct drm_format_info *format,
hborder = (vbios_mode->enh_table->flags & HBorder) ? 8 : 0;
vborder = (vbios_mode->enh_table->flags & VBorder) ? 8 : 0;
+ adjusted_mode->crtc_hdisplay = vbios_mode->enh_table->hde;
adjusted_mode->crtc_htotal = vbios_mode->enh_table->ht;
adjusted_mode->crtc_hblank_start = vbios_mode->enh_table->hde + hborder;
adjusted_mode->crtc_hblank_end = vbios_mode->enh_table->ht - hborder;
@@ -190,6 +191,7 @@ static bool ast_get_vbios_mode_info(const struct drm_format_info *format,
vbios_mode->enh_table->hfp +
vbios_mode->enh_table->hsync);
+ adjusted_mode->crtc_vdisplay = vbios_mode->enh_table->vde;
adjusted_mode->crtc_vtotal = vbios_mode->enh_table->vt;
adjusted_mode->crtc_vblank_start = vbios_mode->enh_table->vde + vborder;
adjusted_mode->crtc_vblank_end = vbios_mode->enh_table->vt - vborder;
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index bd01d925769d..db3c58013c00 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -563,6 +563,30 @@ mode_valid(struct drm_atomic_state *state)
return 0;
}
+static int drm_atomic_check_valid_clones(struct drm_atomic_state *state,
+ struct drm_crtc *crtc)
+{
+ struct drm_encoder *drm_enc;
+ struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state,
+ crtc);
+
+ drm_for_each_encoder_mask(drm_enc, crtc->dev, crtc_state->encoder_mask) {
+ if (!drm_enc->possible_clones) {
+ DRM_DEBUG("enc%d possible_clones is 0\n", drm_enc->base.id);
+ continue;
+ }
+
+ if ((crtc_state->encoder_mask & drm_enc->possible_clones) !=
+ crtc_state->encoder_mask) {
+ DRM_DEBUG("crtc%d failed valid clone check for mask 0x%x\n",
+ crtc->base.id, crtc_state->encoder_mask);
+ return -EINVAL;
+ }
+ }
+
+ return 0;
+}
+
/**
* drm_atomic_helper_check_modeset - validate state object for modeset changes
* @dev: DRM device
@@ -729,6 +753,10 @@ drm_atomic_helper_check_modeset(struct drm_device *dev,
ret = drm_atomic_add_affected_planes(state, crtc);
if (ret != 0)
return ret;
+
+ ret = drm_atomic_check_valid_clones(state, crtc);
+ if (ret != 0)
+ return ret;
}
/*
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 720956893b56..f067dcbc7cf1 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -5172,6 +5172,7 @@ drm_reset_display_info(struct drm_connector *connector)
info->has_hdmi_infoframe = false;
info->rgb_quant_range_selectable = false;
memset(&info->hdmi, 0, sizeof(info->hdmi));
+ memset(&connector->hdr_sink_metadata, 0, sizeof(connector->hdr_sink_metadata));
info->non_desktop = 0;
memset(&info->monitor_range, 0, sizeof(info->monitor_range));
diff --git a/drivers/gpu/drm/i915/gvt/opregion.c b/drivers/gpu/drm/i915/gvt/opregion.c
index 33569b910ed5..fbf1e67913f6 100644
--- a/drivers/gpu/drm/i915/gvt/opregion.c
+++ b/drivers/gpu/drm/i915/gvt/opregion.c
@@ -222,7 +222,8 @@ int intel_vgpu_init_opregion(struct intel_vgpu *vgpu)
u8 *buf;
struct opregion_header *header;
struct vbt v;
- const char opregion_signature[16] = OPREGION_SIGNATURE;
+
+ static_assert(sizeof(header->signature) == sizeof(OPREGION_SIGNATURE) - 1);
gvt_dbg_core("init vgpu%d opregion\n", vgpu->id);
vgpu_opregion(vgpu)->va = (void *)__get_free_pages(GFP_KERNEL |
@@ -236,8 +237,9 @@ int intel_vgpu_init_opregion(struct intel_vgpu *vgpu)
/* emulated opregion with VBT mailbox only */
buf = (u8 *)vgpu_opregion(vgpu)->va;
header = (struct opregion_header *)buf;
- memcpy(header->signature, opregion_signature,
- sizeof(opregion_signature));
+
+ memcpy(header->signature, OPREGION_SIGNATURE, sizeof(header->signature));
+
header->size = 0x8;
header->opregion_ver = 0x02000000;
header->mboxes = MBOX_VBT;
diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
index 9518672dc21b..3f39109b6915 100644
--- a/drivers/gpu/drm/mediatek/mtk_dpi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
@@ -346,12 +346,13 @@ static void mtk_dpi_config_swap_input(struct mtk_dpi *dpi, bool enable)
static void mtk_dpi_config_2n_h_fre(struct mtk_dpi *dpi)
{
- mtk_dpi_mask(dpi, dpi->conf->reg_h_fre_con, H_FRE_2N, H_FRE_2N);
+ if (dpi->conf->reg_h_fre_con)
+ mtk_dpi_mask(dpi, dpi->conf->reg_h_fre_con, H_FRE_2N, H_FRE_2N);
}
static void mtk_dpi_config_disable_edge(struct mtk_dpi *dpi)
{
- if (dpi->conf->edge_sel_en)
+ if (dpi->conf->edge_sel_en && dpi->conf->reg_h_fre_con)
mtk_dpi_mask(dpi, dpi->conf->reg_h_fre_con, 0, EDGE_SEL_EN);
}
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index 44825a916eeb..08494eb65209 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -41,6 +41,10 @@
#define USB_VENDOR_ID_ACTIONSTAR 0x2101
#define USB_DEVICE_ID_ACTIONSTAR_1011 0x1011
+#define USB_VENDOR_ID_ADATA_XPG 0x125f
+#define USB_VENDOR_ID_ADATA_XPG_WL_GAMING_MOUSE 0x7505
+#define USB_VENDOR_ID_ADATA_XPG_WL_GAMING_MOUSE_DONGLE 0x7506
+
#define USB_VENDOR_ID_ADS_TECH 0x06e1
#define USB_DEVICE_ID_ADS_TECH_RADIO_SI470X 0xa155
diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c
index b5ad4c87daac..126cadb117fe 100644
--- a/drivers/hid/hid-quirks.c
+++ b/drivers/hid/hid-quirks.c
@@ -27,6 +27,8 @@
static const struct hid_device_id hid_quirks[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_AASHIMA, USB_DEVICE_ID_AASHIMA_GAMEPAD), HID_QUIRK_BADPAD },
{ HID_USB_DEVICE(USB_VENDOR_ID_AASHIMA, USB_DEVICE_ID_AASHIMA_PREDATOR), HID_QUIRK_BADPAD },
+ { HID_USB_DEVICE(USB_VENDOR_ID_ADATA_XPG, USB_VENDOR_ID_ADATA_XPG_WL_GAMING_MOUSE), HID_QUIRK_ALWAYS_POLL },
+ { HID_USB_DEVICE(USB_VENDOR_ID_ADATA_XPG, USB_VENDOR_ID_ADATA_XPG_WL_GAMING_MOUSE_DONGLE), HID_QUIRK_ALWAYS_POLL },
{ HID_USB_DEVICE(USB_VENDOR_ID_AFATECH, USB_DEVICE_ID_AFATECH_AF9016), HID_QUIRK_FULLSPEED_INTERVAL },
{ HID_USB_DEVICE(USB_VENDOR_ID_AIREN, USB_DEVICE_ID_AIREN_SLIMPLUS), HID_QUIRK_NOGET },
{ HID_USB_DEVICE(USB_VENDOR_ID_AKAI_09E8, USB_DEVICE_ID_AKAI_09E8_MIDIMIX), HID_QUIRK_NO_INIT_REPORTS },
diff --git a/drivers/hid/usbhid/usbkbd.c b/drivers/hid/usbhid/usbkbd.c
index df02002066ce..1d94d246f816 100644
--- a/drivers/hid/usbhid/usbkbd.c
+++ b/drivers/hid/usbhid/usbkbd.c
@@ -160,7 +160,7 @@ static int usb_kbd_event(struct input_dev *dev, unsigned int type,
return -1;
spin_lock_irqsave(&kbd->leds_lock, flags);
- kbd->newleds = (!!test_bit(LED_KANA, dev->led) << 3) | (!!test_bit(LED_COMPOSE, dev->led) << 3) |
+ kbd->newleds = (!!test_bit(LED_KANA, dev->led) << 4) | (!!test_bit(LED_COMPOSE, dev->led) << 3) |
(!!test_bit(LED_SCROLLL, dev->led) << 2) | (!!test_bit(LED_CAPSL, dev->led) << 1) |
(!!test_bit(LED_NUML, dev->led));
diff --git a/drivers/hwmon/gpio-fan.c b/drivers/hwmon/gpio-fan.c
index fbf3f5a4ecb6..6d518c10723a 100644
--- a/drivers/hwmon/gpio-fan.c
+++ b/drivers/hwmon/gpio-fan.c
@@ -394,7 +394,12 @@ static int gpio_fan_set_cur_state(struct thermal_cooling_device *cdev,
if (state >= fan_data->num_speed)
return -EINVAL;
+ mutex_lock(&fan_data->lock);
+
set_fan_speed(fan_data, state);
+
+ mutex_unlock(&fan_data->lock);
+
return 0;
}
@@ -490,7 +495,11 @@ MODULE_DEVICE_TABLE(of, of_gpio_fan_match);
static void gpio_fan_stop(void *data)
{
+ struct gpio_fan_data *fan_data = data;
+
+ mutex_lock(&fan_data->lock);
set_fan_speed(data, 0);
+ mutex_unlock(&fan_data->lock);
}
static int gpio_fan_probe(struct platform_device *pdev)
@@ -564,7 +573,9 @@ static int gpio_fan_suspend(struct device *dev)
if (fan_data->gpios) {
fan_data->resume_speed = fan_data->speed_index;
+ mutex_lock(&fan_data->lock);
set_fan_speed(fan_data, 0);
+ mutex_unlock(&fan_data->lock);
}
return 0;
@@ -574,8 +585,11 @@ static int gpio_fan_resume(struct device *dev)
{
struct gpio_fan_data *fan_data = dev_get_drvdata(dev);
- if (fan_data->gpios)
+ if (fan_data->gpios) {
+ mutex_lock(&fan_data->lock);
set_fan_speed(fan_data, fan_data->resume_speed);
+ mutex_unlock(&fan_data->lock);
+ }
return 0;
}
diff --git a/drivers/hwmon/xgene-hwmon.c b/drivers/hwmon/xgene-hwmon.c
index 60a8ff56c38e..9e82ba43f5cd 100644
--- a/drivers/hwmon/xgene-hwmon.c
+++ b/drivers/hwmon/xgene-hwmon.c
@@ -110,7 +110,7 @@ struct xgene_hwmon_dev {
phys_addr_t comm_base_addr;
void *pcc_comm_addr;
- u64 usecs_lat;
+ unsigned int usecs_lat;
};
/*
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
index 35ca2c02c9b9..7fdc7f213b11 100644
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -1508,7 +1508,10 @@ static int i2c_pxa_probe(struct platform_device *dev)
i2c->adap.name);
}
- clk_prepare_enable(i2c->clk);
+ ret = clk_prepare_enable(i2c->clk);
+ if (ret)
+ return dev_err_probe(&dev->dev, ret,
+ "failed to enable clock\n");
if (i2c->use_pio) {
i2c->adap.algo = &i2c_pxa_pio_algorithm;
diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c
index b89eca2398d9..a2fb9dd58c95 100644
--- a/drivers/i2c/busses/i2c-qup.c
+++ b/drivers/i2c/busses/i2c-qup.c
@@ -14,6 +14,7 @@
#include <linux/dma-mapping.h>
#include <linux/err.h>
#include <linux/i2c.h>
+#include <linux/interconnect.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/module.h>
@@ -150,6 +151,8 @@
/* TAG length for DATA READ in RX FIFO */
#define READ_RX_TAGS_LEN 2
+#define QUP_BUS_WIDTH 8
+
static unsigned int scl_freq;
module_param_named(scl_freq, scl_freq, uint, 0444);
MODULE_PARM_DESC(scl_freq, "SCL frequency override");
@@ -227,6 +230,7 @@ struct qup_i2c_dev {
int irq;
struct clk *clk;
struct clk *pclk;
+ struct icc_path *icc_path;
struct i2c_adapter adap;
int clk_ctl;
@@ -255,6 +259,10 @@ struct qup_i2c_dev {
/* To configure when bus is in run state */
u32 config_run;
+ /* bandwidth votes */
+ u32 src_clk_freq;
+ u32 cur_bw_clk_freq;
+
/* dma parameters */
bool is_dma;
/* To check if the current transfer is using DMA */
@@ -453,6 +461,23 @@ static int qup_i2c_bus_active(struct qup_i2c_dev *qup, int len)
return ret;
}
+static int qup_i2c_vote_bw(struct qup_i2c_dev *qup, u32 clk_freq)
+{
+ u32 needed_peak_bw;
+ int ret;
+
+ if (qup->cur_bw_clk_freq == clk_freq)
+ return 0;
+
+ needed_peak_bw = Bps_to_icc(clk_freq * QUP_BUS_WIDTH);
+ ret = icc_set_bw(qup->icc_path, 0, needed_peak_bw);
+ if (ret)
+ return ret;
+
+ qup->cur_bw_clk_freq = clk_freq;
+ return 0;
+}
+
static void qup_i2c_write_tx_fifo_v1(struct qup_i2c_dev *qup)
{
struct qup_i2c_block *blk = &qup->blk;
@@ -840,6 +865,10 @@ static int qup_i2c_bam_xfer(struct i2c_adapter *adap, struct i2c_msg *msg,
int ret = 0;
int idx = 0;
+ ret = qup_i2c_vote_bw(qup, qup->src_clk_freq);
+ if (ret)
+ return ret;
+
enable_irq(qup->irq);
ret = qup_i2c_req_dma(qup);
@@ -1645,6 +1674,7 @@ static void qup_i2c_disable_clocks(struct qup_i2c_dev *qup)
config = readl(qup->base + QUP_CONFIG);
config |= QUP_CLOCK_AUTO_GATE;
writel(config, qup->base + QUP_CONFIG);
+ qup_i2c_vote_bw(qup, 0);
clk_disable_unprepare(qup->pclk);
}
@@ -1745,6 +1775,11 @@ static int qup_i2c_probe(struct platform_device *pdev)
goto fail_dma;
}
qup->is_dma = true;
+
+ qup->icc_path = devm_of_icc_get(&pdev->dev, NULL);
+ if (IS_ERR(qup->icc_path))
+ return dev_err_probe(&pdev->dev, PTR_ERR(qup->icc_path),
+ "failed to get interconnect path\n");
}
nodma:
@@ -1793,6 +1828,7 @@ static int qup_i2c_probe(struct platform_device *pdev)
qup_i2c_enable_clocks(qup);
src_clk_freq = clk_get_rate(qup->clk);
}
+ qup->src_clk_freq = src_clk_freq;
/*
* Bootloaders might leave a pending interrupt on certain QUP's,
diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c
index 368429a34d60..62a4d06bcfb5 100644
--- a/drivers/i3c/master/svc-i3c-master.c
+++ b/drivers/i3c/master/svc-i3c-master.c
@@ -437,6 +437,8 @@ static void svc_i3c_master_ibi_work(struct work_struct *work)
queue_work(master->base.wq, &master->hj_work);
break;
case SVC_I3C_MSTATUS_IBITYPE_MASTER_REQUEST:
+ svc_i3c_master_emit_stop(master);
+ break;
default:
break;
}
diff --git a/drivers/infiniband/core/umem.c b/drivers/infiniband/core/umem.c
index 8ce569bf7525..1d154055a335 100644
--- a/drivers/infiniband/core/umem.c
+++ b/drivers/infiniband/core/umem.c
@@ -80,9 +80,12 @@ unsigned long ib_umem_find_best_pgsz(struct ib_umem *umem,
unsigned long pgsz_bitmap,
unsigned long virt)
{
- struct scatterlist *sg;
+ unsigned long curr_len = 0;
+ dma_addr_t curr_base = ~0;
unsigned long va, pgoff;
+ struct scatterlist *sg;
dma_addr_t mask;
+ dma_addr_t end;
int i;
umem->iova = va = virt;
@@ -107,17 +110,30 @@ unsigned long ib_umem_find_best_pgsz(struct ib_umem *umem,
pgoff = umem->address & ~PAGE_MASK;
for_each_sgtable_dma_sg(&umem->sgt_append.sgt, sg, i) {
- /* Walk SGL and reduce max page size if VA/PA bits differ
- * for any address.
+ /* If the current entry is physically contiguous with the previous
+ * one, no need to take its start addresses into consideration.
*/
- mask |= (sg_dma_address(sg) + pgoff) ^ va;
+ if (check_add_overflow(curr_base, curr_len, &end) ||
+ end != sg_dma_address(sg)) {
+
+ curr_base = sg_dma_address(sg);
+ curr_len = 0;
+
+ /* Reduce max page size if VA/PA bits differ */
+ mask |= (curr_base + pgoff) ^ va;
+
+ /* The alignment of any VA matching a discontinuity point
+ * in the physical memory sets the maximum possible page
+ * size as this must be a starting point of a new page that
+ * needs to be aligned.
+ */
+ if (i != 0)
+ mask |= va;
+ }
+
+ curr_len += sg_dma_len(sg);
va += sg_dma_len(sg) - pgoff;
- /* Except for the last entry, the ending iova alignment sets
- * the maximum possible page size as the low bits of the iova
- * must be zero when starting the next chunk.
- */
- if (i != (umem->sgt_append.sgt.nents - 1))
- mask |= va;
+
pgoff = 0;
}
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
index 7797f0e4daba..de631a6abe48 100644
--- a/drivers/infiniband/core/uverbs_cmd.c
+++ b/drivers/infiniband/core/uverbs_cmd.c
@@ -718,8 +718,8 @@ static int ib_uverbs_reg_mr(struct uverbs_attr_bundle *attrs)
goto err_free;
pd = uobj_get_obj_read(pd, UVERBS_OBJECT_PD, cmd.pd_handle, attrs);
- if (!pd) {
- ret = -EINVAL;
+ if (IS_ERR(pd)) {
+ ret = PTR_ERR(pd);
goto err_free;
}
@@ -809,8 +809,8 @@ static int ib_uverbs_rereg_mr(struct uverbs_attr_bundle *attrs)
if (cmd.flags & IB_MR_REREG_PD) {
new_pd = uobj_get_obj_read(pd, UVERBS_OBJECT_PD, cmd.pd_handle,
attrs);
- if (!new_pd) {
- ret = -EINVAL;
+ if (IS_ERR(new_pd)) {
+ ret = PTR_ERR(new_pd);
goto put_uobjs;
}
} else {
@@ -919,8 +919,8 @@ static int ib_uverbs_alloc_mw(struct uverbs_attr_bundle *attrs)
return PTR_ERR(uobj);
pd = uobj_get_obj_read(pd, UVERBS_OBJECT_PD, cmd.pd_handle, attrs);
- if (!pd) {
- ret = -EINVAL;
+ if (IS_ERR(pd)) {
+ ret = PTR_ERR(pd);
goto err_free;
}
@@ -1127,8 +1127,8 @@ static int ib_uverbs_resize_cq(struct uverbs_attr_bundle *attrs)
return ret;
cq = uobj_get_obj_read(cq, UVERBS_OBJECT_CQ, cmd.cq_handle, attrs);
- if (!cq)
- return -EINVAL;
+ if (IS_ERR(cq))
+ return PTR_ERR(cq);
ret = cq->device->ops.resize_cq(cq, cmd.cqe, &attrs->driver_udata);
if (ret)
@@ -1189,8 +1189,8 @@ static int ib_uverbs_poll_cq(struct uverbs_attr_bundle *attrs)
return ret;
cq = uobj_get_obj_read(cq, UVERBS_OBJECT_CQ, cmd.cq_handle, attrs);
- if (!cq)
- return -EINVAL;
+ if (IS_ERR(cq))
+ return PTR_ERR(cq);
/* we copy a struct ib_uverbs_poll_cq_resp to user space */
header_ptr = attrs->ucore.outbuf;
@@ -1238,8 +1238,8 @@ static int ib_uverbs_req_notify_cq(struct uverbs_attr_bundle *attrs)
return ret;
cq = uobj_get_obj_read(cq, UVERBS_OBJECT_CQ, cmd.cq_handle, attrs);
- if (!cq)
- return -EINVAL;
+ if (IS_ERR(cq))
+ return PTR_ERR(cq);
ib_req_notify_cq(cq, cmd.solicited_only ?
IB_CQ_SOLICITED : IB_CQ_NEXT_COMP);
@@ -1321,8 +1321,8 @@ static int create_qp(struct uverbs_attr_bundle *attrs,
ind_tbl = uobj_get_obj_read(rwq_ind_table,
UVERBS_OBJECT_RWQ_IND_TBL,
cmd->rwq_ind_tbl_handle, attrs);
- if (!ind_tbl) {
- ret = -EINVAL;
+ if (IS_ERR(ind_tbl)) {
+ ret = PTR_ERR(ind_tbl);
goto err_put;
}
@@ -1360,8 +1360,10 @@ static int create_qp(struct uverbs_attr_bundle *attrs,
if (cmd->is_srq) {
srq = uobj_get_obj_read(srq, UVERBS_OBJECT_SRQ,
cmd->srq_handle, attrs);
- if (!srq || srq->srq_type == IB_SRQT_XRC) {
- ret = -EINVAL;
+ if (IS_ERR(srq) ||
+ srq->srq_type == IB_SRQT_XRC) {
+ ret = IS_ERR(srq) ? PTR_ERR(srq) :
+ -EINVAL;
goto err_put;
}
}
@@ -1371,23 +1373,29 @@ static int create_qp(struct uverbs_attr_bundle *attrs,
rcq = uobj_get_obj_read(
cq, UVERBS_OBJECT_CQ,
cmd->recv_cq_handle, attrs);
- if (!rcq) {
- ret = -EINVAL;
+ if (IS_ERR(rcq)) {
+ ret = PTR_ERR(rcq);
goto err_put;
}
}
}
}
- if (has_sq)
+ if (has_sq) {
scq = uobj_get_obj_read(cq, UVERBS_OBJECT_CQ,
cmd->send_cq_handle, attrs);
+ if (IS_ERR(scq)) {
+ ret = PTR_ERR(scq);
+ goto err_put;
+ }
+ }
+
if (!ind_tbl && cmd->qp_type != IB_QPT_XRC_INI)
rcq = rcq ?: scq;
pd = uobj_get_obj_read(pd, UVERBS_OBJECT_PD, cmd->pd_handle,
attrs);
- if (!pd || (!scq && has_sq)) {
- ret = -EINVAL;
+ if (IS_ERR(pd)) {
+ ret = PTR_ERR(pd);
goto err_put;
}
@@ -1483,18 +1491,18 @@ static int create_qp(struct uverbs_attr_bundle *attrs,
err_put:
if (!IS_ERR(xrcd_uobj))
uobj_put_read(xrcd_uobj);
- if (pd)
+ if (!IS_ERR_OR_NULL(pd))
uobj_put_obj_read(pd);
- if (scq)
+ if (!IS_ERR_OR_NULL(scq))
rdma_lookup_put_uobject(&scq->uobject->uevent.uobject,
UVERBS_LOOKUP_READ);
- if (rcq && rcq != scq)
+ if (!IS_ERR_OR_NULL(rcq) && rcq != scq)
rdma_lookup_put_uobject(&rcq->uobject->uevent.uobject,
UVERBS_LOOKUP_READ);
- if (srq)
+ if (!IS_ERR_OR_NULL(srq))
rdma_lookup_put_uobject(&srq->uobject->uevent.uobject,
UVERBS_LOOKUP_READ);
- if (ind_tbl)
+ if (!IS_ERR_OR_NULL(ind_tbl))
uobj_put_obj_read(ind_tbl);
uobj_alloc_abort(&obj->uevent.uobject, attrs);
@@ -1656,8 +1664,8 @@ static int ib_uverbs_query_qp(struct uverbs_attr_bundle *attrs)
}
qp = uobj_get_obj_read(qp, UVERBS_OBJECT_QP, cmd.qp_handle, attrs);
- if (!qp) {
- ret = -EINVAL;
+ if (IS_ERR(qp)) {
+ ret = PTR_ERR(qp);
goto out;
}
@@ -1762,8 +1770,8 @@ static int modify_qp(struct uverbs_attr_bundle *attrs,
qp = uobj_get_obj_read(qp, UVERBS_OBJECT_QP, cmd->base.qp_handle,
attrs);
- if (!qp) {
- ret = -EINVAL;
+ if (IS_ERR(qp)) {
+ ret = PTR_ERR(qp);
goto out;
}
@@ -2028,8 +2036,8 @@ static int ib_uverbs_post_send(struct uverbs_attr_bundle *attrs)
return -ENOMEM;
qp = uobj_get_obj_read(qp, UVERBS_OBJECT_QP, cmd.qp_handle, attrs);
- if (!qp) {
- ret = -EINVAL;
+ if (IS_ERR(qp)) {
+ ret = PTR_ERR(qp);
goto out;
}
@@ -2066,9 +2074,9 @@ static int ib_uverbs_post_send(struct uverbs_attr_bundle *attrs)
ud->ah = uobj_get_obj_read(ah, UVERBS_OBJECT_AH,
user_wr->wr.ud.ah, attrs);
- if (!ud->ah) {
+ if (IS_ERR(ud->ah)) {
+ ret = PTR_ERR(ud->ah);
kfree(ud);
- ret = -EINVAL;
goto out_put;
}
ud->remote_qpn = user_wr->wr.ud.remote_qpn;
@@ -2305,8 +2313,8 @@ static int ib_uverbs_post_recv(struct uverbs_attr_bundle *attrs)
return PTR_ERR(wr);
qp = uobj_get_obj_read(qp, UVERBS_OBJECT_QP, cmd.qp_handle, attrs);
- if (!qp) {
- ret = -EINVAL;
+ if (IS_ERR(qp)) {
+ ret = PTR_ERR(qp);
goto out;
}
@@ -2356,8 +2364,8 @@ static int ib_uverbs_post_srq_recv(struct uverbs_attr_bundle *attrs)
return PTR_ERR(wr);
srq = uobj_get_obj_read(srq, UVERBS_OBJECT_SRQ, cmd.srq_handle, attrs);
- if (!srq) {
- ret = -EINVAL;
+ if (IS_ERR(srq)) {
+ ret = PTR_ERR(srq);
goto out;
}
@@ -2413,8 +2421,8 @@ static int ib_uverbs_create_ah(struct uverbs_attr_bundle *attrs)
}
pd = uobj_get_obj_read(pd, UVERBS_OBJECT_PD, cmd.pd_handle, attrs);
- if (!pd) {
- ret = -EINVAL;
+ if (IS_ERR(pd)) {
+ ret = PTR_ERR(pd);
goto err;
}
@@ -2483,8 +2491,8 @@ static int ib_uverbs_attach_mcast(struct uverbs_attr_bundle *attrs)
return ret;
qp = uobj_get_obj_read(qp, UVERBS_OBJECT_QP, cmd.qp_handle, attrs);
- if (!qp)
- return -EINVAL;
+ if (IS_ERR(qp))
+ return PTR_ERR(qp);
obj = qp->uobject;
@@ -2533,8 +2541,8 @@ static int ib_uverbs_detach_mcast(struct uverbs_attr_bundle *attrs)
return ret;
qp = uobj_get_obj_read(qp, UVERBS_OBJECT_QP, cmd.qp_handle, attrs);
- if (!qp)
- return -EINVAL;
+ if (IS_ERR(qp))
+ return PTR_ERR(qp);
obj = qp->uobject;
mutex_lock(&obj->mcast_lock);
@@ -2668,8 +2676,8 @@ static int kern_spec_to_ib_spec_action(struct uverbs_attr_bundle *attrs,
UVERBS_OBJECT_FLOW_ACTION,
kern_spec->action.handle,
attrs);
- if (!ib_spec->action.act)
- return -EINVAL;
+ if (IS_ERR(ib_spec->action.act))
+ return PTR_ERR(ib_spec->action.act);
ib_spec->action.size =
sizeof(struct ib_flow_spec_action_handle);
flow_resources_add(uflow_res,
@@ -2686,8 +2694,8 @@ static int kern_spec_to_ib_spec_action(struct uverbs_attr_bundle *attrs,
UVERBS_OBJECT_COUNTERS,
kern_spec->flow_count.handle,
attrs);
- if (!ib_spec->flow_count.counters)
- return -EINVAL;
+ if (IS_ERR(ib_spec->flow_count.counters))
+ return PTR_ERR(ib_spec->flow_count.counters);
ib_spec->flow_count.size =
sizeof(struct ib_flow_spec_action_count);
flow_resources_add(uflow_res,
@@ -2905,14 +2913,14 @@ static int ib_uverbs_ex_create_wq(struct uverbs_attr_bundle *attrs)
return PTR_ERR(obj);
pd = uobj_get_obj_read(pd, UVERBS_OBJECT_PD, cmd.pd_handle, attrs);
- if (!pd) {
- err = -EINVAL;
+ if (IS_ERR(pd)) {
+ err = PTR_ERR(pd);
goto err_uobj;
}
cq = uobj_get_obj_read(cq, UVERBS_OBJECT_CQ, cmd.cq_handle, attrs);
- if (!cq) {
- err = -EINVAL;
+ if (IS_ERR(cq)) {
+ err = PTR_ERR(cq);
goto err_put_pd;
}
@@ -3013,8 +3021,8 @@ static int ib_uverbs_ex_modify_wq(struct uverbs_attr_bundle *attrs)
return -EINVAL;
wq = uobj_get_obj_read(wq, UVERBS_OBJECT_WQ, cmd.wq_handle, attrs);
- if (!wq)
- return -EINVAL;
+ if (IS_ERR(wq))
+ return PTR_ERR(wq);
if (cmd.attr_mask & IB_WQ_FLAGS) {
wq_attr.flags = cmd.flags;
@@ -3097,8 +3105,8 @@ static int ib_uverbs_ex_create_rwq_ind_table(struct uverbs_attr_bundle *attrs)
num_read_wqs++) {
wq = uobj_get_obj_read(wq, UVERBS_OBJECT_WQ,
wqs_handles[num_read_wqs], attrs);
- if (!wq) {
- err = -EINVAL;
+ if (IS_ERR(wq)) {
+ err = PTR_ERR(wq);
goto put_wqs;
}
@@ -3253,8 +3261,8 @@ static int ib_uverbs_ex_create_flow(struct uverbs_attr_bundle *attrs)
}
qp = uobj_get_obj_read(qp, UVERBS_OBJECT_QP, cmd.qp_handle, attrs);
- if (!qp) {
- err = -EINVAL;
+ if (IS_ERR(qp)) {
+ err = PTR_ERR(qp);
goto err_uobj;
}
@@ -3400,15 +3408,15 @@ static int __uverbs_create_xsrq(struct uverbs_attr_bundle *attrs,
if (ib_srq_has_cq(cmd->srq_type)) {
attr.ext.cq = uobj_get_obj_read(cq, UVERBS_OBJECT_CQ,
cmd->cq_handle, attrs);
- if (!attr.ext.cq) {
- ret = -EINVAL;
+ if (IS_ERR(attr.ext.cq)) {
+ ret = PTR_ERR(attr.ext.cq);
goto err_put_xrcd;
}
}
pd = uobj_get_obj_read(pd, UVERBS_OBJECT_PD, cmd->pd_handle, attrs);
- if (!pd) {
- ret = -EINVAL;
+ if (IS_ERR(pd)) {
+ ret = PTR_ERR(pd);
goto err_put_cq;
}
@@ -3515,8 +3523,8 @@ static int ib_uverbs_modify_srq(struct uverbs_attr_bundle *attrs)
return ret;
srq = uobj_get_obj_read(srq, UVERBS_OBJECT_SRQ, cmd.srq_handle, attrs);
- if (!srq)
- return -EINVAL;
+ if (IS_ERR(srq))
+ return PTR_ERR(srq);
attr.max_wr = cmd.max_wr;
attr.srq_limit = cmd.srq_limit;
@@ -3543,8 +3551,8 @@ static int ib_uverbs_query_srq(struct uverbs_attr_bundle *attrs)
return ret;
srq = uobj_get_obj_read(srq, UVERBS_OBJECT_SRQ, cmd.srq_handle, attrs);
- if (!srq)
- return -EINVAL;
+ if (IS_ERR(srq))
+ return PTR_ERR(srq);
ret = ib_query_srq(srq, &attr);
@@ -3669,8 +3677,8 @@ static int ib_uverbs_ex_modify_cq(struct uverbs_attr_bundle *attrs)
return -EOPNOTSUPP;
cq = uobj_get_obj_read(cq, UVERBS_OBJECT_CQ, cmd.cq_handle, attrs);
- if (!cq)
- return -EINVAL;
+ if (IS_ERR(cq))
+ return PTR_ERR(cq);
ret = rdma_set_cq_moderation(cq, cmd.attr.cq_count, cmd.attr.cq_period);
diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c
index cae013130eb1..bdc9564f0ff8 100644
--- a/drivers/infiniband/core/verbs.c
+++ b/drivers/infiniband/core/verbs.c
@@ -2967,22 +2967,23 @@ EXPORT_SYMBOL(__rdma_block_iter_start);
bool __rdma_block_iter_next(struct ib_block_iter *biter)
{
unsigned int block_offset;
- unsigned int sg_delta;
+ unsigned int delta;
if (!biter->__sg_nents || !biter->__sg)
return false;
biter->__dma_addr = sg_dma_address(biter->__sg) + biter->__sg_advance;
block_offset = biter->__dma_addr & (BIT_ULL(biter->__pg_bit) - 1);
- sg_delta = BIT_ULL(biter->__pg_bit) - block_offset;
+ delta = BIT_ULL(biter->__pg_bit) - block_offset;
- if (sg_dma_len(biter->__sg) - biter->__sg_advance > sg_delta) {
- biter->__sg_advance += sg_delta;
- } else {
+ while (biter->__sg_nents && biter->__sg &&
+ sg_dma_len(biter->__sg) - biter->__sg_advance <= delta) {
+ delta -= sg_dma_len(biter->__sg) - biter->__sg_advance;
biter->__sg_advance = 0;
biter->__sg = sg_next(biter->__sg);
biter->__sg_nents--;
}
+ biter->__sg_advance += delta;
return true;
}
diff --git a/drivers/mailbox/mailbox.c b/drivers/mailbox/mailbox.c
index 4229b9b5da98..6f54501dc776 100644
--- a/drivers/mailbox/mailbox.c
+++ b/drivers/mailbox/mailbox.c
@@ -350,11 +350,12 @@ struct mbox_chan *mbox_request_channel(struct mbox_client *cl, int index)
mutex_lock(&con_mutex);
- if (of_parse_phandle_with_args(dev->of_node, "mboxes",
- "#mbox-cells", index, &spec)) {
+ ret = of_parse_phandle_with_args(dev->of_node, "mboxes", "#mbox-cells",
+ index, &spec);
+ if (ret) {
dev_dbg(dev, "%s: can't parse \"mboxes\" property\n", __func__);
mutex_unlock(&con_mutex);
- return ERR_PTR(-ENODEV);
+ return ERR_PTR(ret);
}
chan = ERR_PTR(-EPROBE_DEFER);
diff --git a/drivers/md/dm-cache-target.c b/drivers/md/dm-cache-target.c
index 1864e8180be8..1660d4fec751 100644
--- a/drivers/md/dm-cache-target.c
+++ b/drivers/md/dm-cache-target.c
@@ -2883,6 +2883,27 @@ static dm_cblock_t get_cache_dev_size(struct cache *cache)
return to_cblock(size);
}
+static bool can_resume(struct cache *cache)
+{
+ /*
+ * Disallow retrying the resume operation for devices that failed the
+ * first resume attempt, as the failure leaves the policy object partially
+ * initialized. Retrying could trigger BUG_ON when loading cache mappings
+ * into the incomplete policy object.
+ */
+ if (cache->sized && !cache->loaded_mappings) {
+ if (get_cache_mode(cache) != CM_WRITE)
+ DMERR("%s: unable to resume a failed-loaded cache, please check metadata.",
+ cache_device_name(cache));
+ else
+ DMERR("%s: unable to resume cache due to missing proper cache table reload",
+ cache_device_name(cache));
+ return false;
+ }
+
+ return true;
+}
+
static bool can_resize(struct cache *cache, dm_cblock_t new_size)
{
if (from_cblock(new_size) > from_cblock(cache->cache_size)) {
@@ -2931,6 +2952,9 @@ static int cache_preresume(struct dm_target *ti)
struct cache *cache = ti->private;
dm_cblock_t csize = get_cache_dev_size(cache);
+ if (!can_resume(cache))
+ return -EINVAL;
+
/*
* Check to see if the cache has resized.
*/
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index 5a66be3b2a63..0f815bcf751f 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -661,6 +661,10 @@ int dm_table_add_target(struct dm_table *t, const char *type,
DMERR("%s: zero-length target", dm_device_name(t->md));
return -EINVAL;
}
+ if (start + len < start || start + len > LLONG_MAX >> SECTOR_SHIFT) {
+ DMERR("%s: too large device", dm_device_name(t->md));
+ return -EINVAL;
+ }
tgt->type = dm_get_target_type(type);
if (!tgt->type) {
diff --git a/drivers/media/platform/qcom/camss/camss-csid.c b/drivers/media/platform/qcom/camss/camss-csid.c
index 2a294587ec9d..5583cbea12f3 100644
--- a/drivers/media/platform/qcom/camss/camss-csid.c
+++ b/drivers/media/platform/qcom/camss/camss-csid.c
@@ -219,11 +219,13 @@ static int csid_set_stream(struct v4l2_subdev *sd, int enable)
int ret;
if (enable) {
- ret = v4l2_ctrl_handler_setup(&csid->ctrls);
- if (ret < 0) {
- dev_err(csid->camss->dev,
- "could not sync v4l2 controls: %d\n", ret);
- return ret;
+ if (csid->testgen.nmodes != CSID_PAYLOAD_MODE_DISABLED) {
+ ret = v4l2_ctrl_handler_setup(&csid->ctrls);
+ if (ret < 0) {
+ dev_err(csid->camss->dev,
+ "could not sync v4l2 controls: %d\n", ret);
+ return ret;
+ }
}
if (!csid->testgen.enabled &&
@@ -298,7 +300,8 @@ static void csid_try_format(struct csid_device *csid,
break;
case MSM_CSID_PAD_SRC:
- if (csid->testgen_mode->cur.val == 0) {
+ if (csid->testgen.nmodes == CSID_PAYLOAD_MODE_DISABLED ||
+ csid->testgen_mode->cur.val == 0) {
/* Test generator is disabled, */
/* keep pad formats in sync */
u32 code = fmt->code;
@@ -348,7 +351,8 @@ static int csid_enum_mbus_code(struct v4l2_subdev *sd,
code->code = csid->formats[code->index].code;
} else {
- if (csid->testgen_mode->cur.val == 0) {
+ if (csid->testgen.nmodes == CSID_PAYLOAD_MODE_DISABLED ||
+ csid->testgen_mode->cur.val == 0) {
struct v4l2_mbus_framefmt *sink_fmt;
sink_fmt = __csid_get_format(csid, sd_state,
@@ -707,7 +711,8 @@ static int csid_link_setup(struct media_entity *entity,
/* If test generator is enabled */
/* do not allow a link from CSIPHY to CSID */
- if (csid->testgen_mode->cur.val != 0)
+ if (csid->testgen.nmodes != CSID_PAYLOAD_MODE_DISABLED &&
+ csid->testgen_mode->cur.val != 0)
return -EBUSY;
sd = media_entity_to_v4l2_subdev(remote->entity);
@@ -800,24 +805,27 @@ int msm_csid_register_entity(struct csid_device *csid,
MSM_CSID_NAME, csid->id);
v4l2_set_subdevdata(sd, csid);
- ret = v4l2_ctrl_handler_init(&csid->ctrls, 1);
- if (ret < 0) {
- dev_err(dev, "Failed to init ctrl handler: %d\n", ret);
- return ret;
- }
+ if (csid->testgen.nmodes != CSID_PAYLOAD_MODE_DISABLED) {
+ ret = v4l2_ctrl_handler_init(&csid->ctrls, 1);
+ if (ret < 0) {
+ dev_err(dev, "Failed to init ctrl handler: %d\n", ret);
+ return ret;
+ }
- csid->testgen_mode = v4l2_ctrl_new_std_menu_items(&csid->ctrls,
- &csid_ctrl_ops, V4L2_CID_TEST_PATTERN,
- csid->testgen.nmodes, 0, 0,
- csid->testgen.modes);
+ csid->testgen_mode =
+ v4l2_ctrl_new_std_menu_items(&csid->ctrls,
+ &csid_ctrl_ops, V4L2_CID_TEST_PATTERN,
+ csid->testgen.nmodes, 0, 0,
+ csid->testgen.modes);
- if (csid->ctrls.error) {
- dev_err(dev, "Failed to init ctrl: %d\n", csid->ctrls.error);
- ret = csid->ctrls.error;
- goto free_ctrl;
- }
+ if (csid->ctrls.error) {
+ dev_err(dev, "Failed to init ctrl: %d\n", csid->ctrls.error);
+ ret = csid->ctrls.error;
+ goto free_ctrl;
+ }
- csid->subdev.ctrl_handler = &csid->ctrls;
+ csid->subdev.ctrl_handler = &csid->ctrls;
+ }
ret = csid_init_formats(sd, NULL);
if (ret < 0) {
@@ -848,7 +856,8 @@ int msm_csid_register_entity(struct csid_device *csid,
media_cleanup:
media_entity_cleanup(&sd->entity);
free_ctrl:
- v4l2_ctrl_handler_free(&csid->ctrls);
+ if (csid->testgen.nmodes != CSID_PAYLOAD_MODE_DISABLED)
+ v4l2_ctrl_handler_free(&csid->ctrls);
return ret;
}
@@ -861,5 +870,6 @@ void msm_csid_unregister_entity(struct csid_device *csid)
{
v4l2_device_unregister_subdev(&csid->subdev);
media_entity_cleanup(&csid->subdev.entity);
- v4l2_ctrl_handler_free(&csid->ctrls);
+ if (csid->testgen.nmodes != CSID_PAYLOAD_MODE_DISABLED)
+ v4l2_ctrl_handler_free(&csid->ctrls);
}
diff --git a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
index 88d0188397e7..28aab5a8336e 100644
--- a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
+++ b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
@@ -811,13 +811,12 @@ static int c8sectpfe_probe(struct platform_device *pdev)
}
tsin->i2c_adapter =
of_find_i2c_adapter_by_node(i2c_bus);
+ of_node_put(i2c_bus);
if (!tsin->i2c_adapter) {
dev_err(&pdev->dev, "No i2c adapter found\n");
- of_node_put(i2c_bus);
ret = -ENODEV;
goto err_node_put;
}
- of_node_put(i2c_bus);
tsin->rst_gpio = of_get_named_gpio(child, "reset-gpios", 0);
diff --git a/drivers/media/usb/cx231xx/cx231xx-417.c b/drivers/media/usb/cx231xx/cx231xx-417.c
index c5e21785fafe..02343e88cc61 100644
--- a/drivers/media/usb/cx231xx/cx231xx-417.c
+++ b/drivers/media/usb/cx231xx/cx231xx-417.c
@@ -1722,6 +1722,8 @@ static void cx231xx_video_dev_init(
vfd->lock = &dev->lock;
vfd->release = video_device_release_empty;
vfd->ctrl_handler = &dev->mpeg_ctrl_handler.hdl;
+ vfd->device_caps = V4L2_CAP_READWRITE | V4L2_CAP_STREAMING |
+ V4L2_CAP_VIDEO_CAPTURE;
video_set_drvdata(vfd, dev);
if (dev->tuner_type == TUNER_ABSENT) {
v4l2_disable_ioctl(vfd, VIDIOC_G_FREQUENCY);
diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c
index a86d470a9f98..2f8b485ddde0 100644
--- a/drivers/media/usb/uvc/uvc_v4l2.c
+++ b/drivers/media/usb/uvc/uvc_v4l2.c
@@ -35,6 +35,12 @@ static int uvc_ioctl_ctrl_map(struct uvc_video_chain *chain,
unsigned int size;
int ret;
+ if (xmap->data_type > UVC_CTRL_DATA_TYPE_BITMASK) {
+ uvc_dbg(chain->dev, CONTROL,
+ "Unsupported UVC data type %u\n", xmap->data_type);
+ return -EINVAL;
+ }
+
map = kzalloc(sizeof(*map), GFP_KERNEL);
if (map == NULL)
return -ENOMEM;
diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c
index 5d27a27cc2f2..6f2267625c7e 100644
--- a/drivers/media/v4l2-core/v4l2-subdev.c
+++ b/drivers/media/v4l2-core/v4l2-subdev.c
@@ -314,6 +314,8 @@ static int call_enum_dv_timings(struct v4l2_subdev *sd,
static int call_get_mbus_config(struct v4l2_subdev *sd, unsigned int pad,
struct v4l2_mbus_config *config)
{
+ memset(config, 0, sizeof(*config));
+
return check_pad(sd, pad) ? :
sd->ops->pad->get_mbus_config(sd, pad, config);
}
diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
index bdb82c1265ed..b4226ba1a1b3 100644
--- a/drivers/mmc/host/sdhci-pci-core.c
+++ b/drivers/mmc/host/sdhci-pci-core.c
@@ -677,8 +677,12 @@ static void sdhci_intel_set_power(struct sdhci_host *host, unsigned char mode,
sdhci_set_power(host, mode, vdd);
- if (mode == MMC_POWER_OFF)
+ if (mode == MMC_POWER_OFF) {
+ if (slot->chip->pdev->device == PCI_DEVICE_ID_INTEL_APL_SD ||
+ slot->chip->pdev->device == PCI_DEVICE_ID_INTEL_BYT_SD)
+ usleep_range(15000, 17500);
return;
+ }
/*
* Bus power might not enable after D3 -> D0 transition due to the
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index c0900b2f7b5c..97eeb0c61bae 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2009,10 +2009,15 @@ void sdhci_set_clock(struct sdhci_host *host, unsigned int clock)
host->mmc->actual_clock = 0;
- sdhci_writew(host, 0, SDHCI_CLOCK_CONTROL);
+ clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL);
+ if (clk & SDHCI_CLOCK_CARD_EN)
+ sdhci_writew(host, clk & ~SDHCI_CLOCK_CARD_EN,
+ SDHCI_CLOCK_CONTROL);
- if (clock == 0)
+ if (clock == 0) {
+ sdhci_writew(host, 0, SDHCI_CLOCK_CONTROL);
return;
+ }
clk = sdhci_calc_clk(host, clock, &host->mmc->actual_clock);
sdhci_enable_clk(host, clk);
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 75499e2967e8..6bdc29d04a58 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -2355,7 +2355,7 @@ static int __bond_release_one(struct net_device *bond_dev,
RCU_INIT_POINTER(bond->current_arp_slave, NULL);
- if (!all && (!bond->params.fail_over_mac ||
+ if (!all && (bond->params.fail_over_mac != BOND_FOM_ACTIVE ||
BOND_MODE(bond) != BOND_MODE_ACTIVEBACKUP)) {
if (ether_addr_equal_64bits(bond_dev->dev_addr, slave->perm_hwaddr) &&
bond_has_slaves(bond))
diff --git a/drivers/net/can/c_can/c_can_platform.c b/drivers/net/can/c_can/c_can_platform.c
index c5d7093d5413..c29862b3bb1f 100644
--- a/drivers/net/can/c_can/c_can_platform.c
+++ b/drivers/net/can/c_can/c_can_platform.c
@@ -334,7 +334,7 @@ static int c_can_plat_probe(struct platform_device *pdev)
/* Check if we need custom RAMINIT via syscon. Mostly for TI
* platforms. Only supported with DT boot.
*/
- if (np && of_property_read_bool(np, "syscon-raminit")) {
+ if (np && of_property_present(np, "syscon-raminit")) {
u32 id;
struct c_can_raminit *raminit = &priv->raminit_sys;
diff --git a/drivers/net/ethernet/apm/xgene-v2/main.c b/drivers/net/ethernet/apm/xgene-v2/main.c
index 80399c8980bd..627f86014100 100644
--- a/drivers/net/ethernet/apm/xgene-v2/main.c
+++ b/drivers/net/ethernet/apm/xgene-v2/main.c
@@ -9,8 +9,6 @@
#include "main.h"
-static const struct acpi_device_id xge_acpi_match[];
-
static int xge_get_resources(struct xge_pdata *pdata)
{
struct platform_device *pdev;
@@ -733,7 +731,7 @@ MODULE_DEVICE_TABLE(acpi, xge_acpi_match);
static struct platform_driver xge_driver = {
.driver = {
.name = "xgene-enet-v2",
- .acpi_match_table = ACPI_PTR(xge_acpi_match),
+ .acpi_match_table = xge_acpi_match,
},
.probe = xge_probe,
.remove = xge_remove,
diff --git a/drivers/net/ethernet/freescale/enetc/enetc.c b/drivers/net/ethernet/freescale/enetc/enetc.c
index 612872c8c8e3..1068a5ea17b7 100644
--- a/drivers/net/ethernet/freescale/enetc/enetc.c
+++ b/drivers/net/ethernet/freescale/enetc/enetc.c
@@ -1264,6 +1264,16 @@ static void enetc_xdp_drop(struct enetc_bdr *rx_ring, int rx_ring_first,
}
}
+static void enetc_bulk_flip_buff(struct enetc_bdr *rx_ring, int rx_ring_first,
+ int rx_ring_last)
+{
+ while (rx_ring_first != rx_ring_last) {
+ enetc_flip_rx_buff(rx_ring,
+ &rx_ring->rx_swbd[rx_ring_first]);
+ enetc_bdr_idx_inc(rx_ring, &rx_ring_first);
+ }
+}
+
static int enetc_clean_rx_ring_xdp(struct enetc_bdr *rx_ring,
struct napi_struct *napi, int work_limit,
struct bpf_prog *prog)
@@ -1379,11 +1389,7 @@ static int enetc_clean_rx_ring_xdp(struct enetc_bdr *rx_ring,
enetc_xdp_drop(rx_ring, orig_i, i);
rx_ring->stats.xdp_redirect_failures++;
} else {
- while (orig_i != i) {
- enetc_flip_rx_buff(rx_ring,
- &rx_ring->rx_swbd[orig_i]);
- enetc_bdr_idx_inc(rx_ring, &orig_i);
- }
+ enetc_bulk_flip_buff(rx_ring, orig_i, i);
xdp_redirect_frm_cnt++;
rx_ring->stats.xdp_redirect++;
}
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c
index 25713287a288..39870e419ccb 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c
@@ -15,13 +15,17 @@
#define LMT_TBL_OP_WRITE 1
#define LMT_MAP_TABLE_SIZE (128 * 1024)
#define LMT_MAPTBL_ENTRY_SIZE 16
+#define LMT_MAX_VFS 256
+
+#define LMT_MAP_ENTRY_ENA BIT_ULL(20)
+#define LMT_MAP_ENTRY_LINES GENMASK_ULL(18, 16)
/* Function to perform operations (read/write) on lmtst map table */
static int lmtst_map_table_ops(struct rvu *rvu, u32 index, u64 *val,
int lmt_tbl_op)
{
void __iomem *lmt_map_base;
- u64 tbl_base;
+ u64 tbl_base, cfg;
tbl_base = rvu_read64(rvu, BLKADDR_APR, APR_AF_LMT_MAP_BASE);
@@ -35,6 +39,13 @@ static int lmtst_map_table_ops(struct rvu *rvu, u32 index, u64 *val,
*val = readq(lmt_map_base + index);
} else {
writeq((*val), (lmt_map_base + index));
+
+ cfg = FIELD_PREP(LMT_MAP_ENTRY_ENA, 0x1);
+ /* 2048 LMTLINES */
+ cfg |= FIELD_PREP(LMT_MAP_ENTRY_LINES, 0x6);
+
+ writeq(cfg, (lmt_map_base + (index + 8)));
+
/* Flushing the AP interceptor cache to make APR_LMT_MAP_ENTRY_S
* changes effective. Write 1 for flush and read is being used as a
* barrier and sets up a data dependency. Write to 0 after a write
@@ -52,7 +63,7 @@ static int lmtst_map_table_ops(struct rvu *rvu, u32 index, u64 *val,
#define LMT_MAP_TBL_W1_OFF 8
static u32 rvu_get_lmtst_tbl_index(struct rvu *rvu, u16 pcifunc)
{
- return ((rvu_get_pf(pcifunc) * rvu->hw->total_vfs) +
+ return ((rvu_get_pf(pcifunc) * LMT_MAX_VFS) +
(pcifunc & RVU_PFVF_FUNC_MASK)) * LMT_MAPTBL_ENTRY_SIZE;
}
diff --git a/drivers/net/ethernet/mellanox/mlx4/alloc.c b/drivers/net/ethernet/mellanox/mlx4/alloc.c
index b330020dc0d6..f2bded847e61 100644
--- a/drivers/net/ethernet/mellanox/mlx4/alloc.c
+++ b/drivers/net/ethernet/mellanox/mlx4/alloc.c
@@ -682,9 +682,9 @@ static struct mlx4_db_pgdir *mlx4_alloc_db_pgdir(struct device *dma_device)
}
static int mlx4_alloc_db_from_pgdir(struct mlx4_db_pgdir *pgdir,
- struct mlx4_db *db, int order)
+ struct mlx4_db *db, unsigned int order)
{
- int o;
+ unsigned int o;
int i;
for (o = order; o <= 1; ++o) {
@@ -712,7 +712,7 @@ static int mlx4_alloc_db_from_pgdir(struct mlx4_db_pgdir *pgdir,
return 0;
}
-int mlx4_db_alloc(struct mlx4_dev *dev, struct mlx4_db *db, int order)
+int mlx4_db_alloc(struct mlx4_dev *dev, struct mlx4_db *db, unsigned int order)
{
struct mlx4_priv *priv = mlx4_priv(dev);
struct mlx4_db_pgdir *pgdir;
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_tx.c b/drivers/net/ethernet/mellanox/mlx4/en_tx.c
index c56b9dba4c71..ed695f7443a8 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_tx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_tx.c
@@ -445,6 +445,8 @@ int mlx4_en_process_tx_cq(struct net_device *dev,
if (unlikely(!priv->port_up))
return 0;
+ if (unlikely(!napi_budget) && cq->type == TX_XDP)
+ return 0;
netdev_txq_bql_complete_prefetchw(ring->tx_queue);
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
index de168d8cf33f..8e44fa0d3f37 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
@@ -58,6 +58,7 @@
#define MLX5E_REP_PARAMS_DEF_LOG_SQ_SIZE \
max(0x7, MLX5E_PARAMS_MINIMUM_LOG_SQ_SIZE)
#define MLX5E_REP_PARAMS_DEF_NUM_CHANNELS 1
+#define MLX5E_REP_PARAMS_DEF_LOG_RQ_SIZE 0x8
static const char mlx5e_rep_driver_name[] = "mlx5e_rep";
@@ -615,6 +616,8 @@ static void mlx5e_build_rep_params(struct net_device *netdev)
/* RQ */
mlx5e_build_rq_params(mdev, params);
+ if (!mlx5e_is_uplink_rep(priv) && mlx5_core_is_ecpf(mdev))
+ params->log_rq_mtu_frames = MLX5E_REP_PARAMS_DEF_LOG_RQ_SIZE;
/* CQ moderation params */
params->rx_dim_enabled = MLX5_CAP_GEN(mdev, cq_moderation);
@@ -642,6 +645,8 @@ static void mlx5e_build_rep_netdev(struct net_device *netdev,
netdev->ethtool_ops = &mlx5e_rep_ethtool_ops;
netdev->watchdog_timeo = 15 * HZ;
+ if (mlx5_core_is_ecpf(mdev))
+ netdev->tx_queue_len = 1 << MLX5E_REP_PARAMS_DEF_LOG_SQ_SIZE;
#if IS_ENABLED(CONFIG_MLX5_CLS_ACT)
netdev->hw_features |= NETIF_F_HW_TC;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c b/drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c
index ce8ab1f01876..c380340b8166 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c
@@ -188,6 +188,9 @@ mlx5e_test_loopback_validate(struct sk_buff *skb,
struct udphdr *udph;
struct iphdr *iph;
+ if (skb_linearize(skb))
+ goto out;
+
/* We are only going to peek, no need to clone the SKB */
if (MLX5E_TEST_PKT_SIZE - ETH_HLEN > skb_headlen(skb))
goto out;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/events.c b/drivers/net/ethernet/mellanox/mlx5/core/events.c
index a1ac3a654962..15d90d68b1ff 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/events.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/events.c
@@ -160,11 +160,16 @@ static int temp_warn(struct notifier_block *nb, unsigned long type, void *data)
u64 value_msb;
value_lsb = be64_to_cpu(eqe->data.temp_warning.sensor_warning_lsb);
+ /* bit 1-63 are not supported for NICs,
+ * hence read only bit 0 (asic) from lsb.
+ */
+ value_lsb &= 0x1;
value_msb = be64_to_cpu(eqe->data.temp_warning.sensor_warning_msb);
- mlx5_core_warn(events->dev,
- "High temperature on sensors with bit set %llx %llx",
- value_msb, value_lsb);
+ if (net_ratelimit())
+ mlx5_core_warn(events->dev,
+ "High temperature on sensors with bit set %llx %llx",
+ value_msb, value_lsb);
return NOTIFY_OK;
}
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/health.c b/drivers/net/ethernet/mellanox/mlx5/core/health.c
index 1504856fafde..2a0b111fbcd3 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/health.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/health.c
@@ -737,6 +737,7 @@ static void poll_health(struct timer_list *t)
health->prev = count;
if (health->miss_counter == MAX_MISSES) {
mlx5_core_err(dev, "device's health compromised - reached miss count\n");
+ health->synd = ioread8(&h->synd);
print_health_info(dev);
queue_work(health->wq, &health->report_work);
}
diff --git a/drivers/net/ethernet/microsoft/mana/gdma_main.c b/drivers/net/ethernet/microsoft/mana/gdma_main.c
index 0fb42193643d..7864611f55a7 100644
--- a/drivers/net/ethernet/microsoft/mana/gdma_main.c
+++ b/drivers/net/ethernet/microsoft/mana/gdma_main.c
@@ -957,7 +957,7 @@ static u32 mana_gd_write_client_oob(const struct gdma_wqe_request *wqe_req,
header->inline_oob_size_div4 = client_oob_size / sizeof(u32);
if (oob_in_sgl) {
- WARN_ON_ONCE(!pad_data || wqe_req->num_sge < 2);
+ WARN_ON_ONCE(wqe_req->num_sge < 2);
header->client_oob_in_sgl = 1;
diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index d9d19ea77d20..1ea30c9b8c07 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -5185,6 +5185,7 @@ static int r8169_mdio_register(struct rtl8169_private *tp)
new_bus->priv = tp;
new_bus->parent = &pdev->dev;
new_bus->irq[0] = PHY_MAC_INTERRUPT;
+ new_bus->phy_mask = GENMASK(31, 1);
snprintf(new_bus->id, MII_BUS_ID_SIZE, "r8169-%x-%x",
pci_domain_nr(pdev->bus), pci_dev_id(pdev));
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
index fda53b4b9406..b2ec44f84ff5 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
@@ -957,7 +957,7 @@ static int sun8i_dwmac_set_syscon(struct device *dev,
/* of_mdio_parse_addr returns a valid (0 ~ 31) PHY
* address. No need to mask it again.
*/
- reg |= 1 << H3_EPHY_ADDR_SHIFT;
+ reg |= ret << H3_EPHY_ADDR_SHIFT;
} else {
/* For SoCs without internal PHY the PHY selection bit should be
* set to 0 (external PHY).
diff --git a/drivers/net/ethernet/ti/cpsw_new.c b/drivers/net/ethernet/ti/cpsw_new.c
index 13e34ad72f26..923746ba87a6 100644
--- a/drivers/net/ethernet/ti/cpsw_new.c
+++ b/drivers/net/ethernet/ti/cpsw_new.c
@@ -1418,6 +1418,7 @@ static int cpsw_create_ports(struct cpsw_common *cpsw)
ndev->netdev_ops = &cpsw_netdev_ops;
ndev->ethtool_ops = &cpsw_ethtool_ops;
SET_NETDEV_DEV(ndev, dev);
+ ndev->dev.of_node = slave_data->slave_node;
if (!napi_ndev) {
/* CPSW Host port CPDMA interface is shared between
diff --git a/drivers/net/ieee802154/ca8210.c b/drivers/net/ieee802154/ca8210.c
index d6dafd9876d2..ef8904a0530b 100644
--- a/drivers/net/ieee802154/ca8210.c
+++ b/drivers/net/ieee802154/ca8210.c
@@ -1488,8 +1488,7 @@ static u8 mcps_data_request(
command.pdata.data_req.src_addr_mode = src_addr_mode;
command.pdata.data_req.dst.mode = dst_address_mode;
if (dst_address_mode != MAC_MODE_NO_ADDR) {
- command.pdata.data_req.dst.pan_id[0] = LS_BYTE(dst_pan_id);
- command.pdata.data_req.dst.pan_id[1] = MS_BYTE(dst_pan_id);
+ put_unaligned_le16(dst_pan_id, command.pdata.data_req.dst.pan_id);
if (dst_address_mode == MAC_MODE_SHORT_ADDR) {
command.pdata.data_req.dst.address[0] = LS_BYTE(
dst_addr->short_address
@@ -1838,12 +1837,12 @@ static int ca8210_skb_rx(
}
hdr.source.mode = data_ind[0];
dev_dbg(&priv->spi->dev, "srcAddrMode: %#03x\n", hdr.source.mode);
- hdr.source.pan_id = *(u16 *)&data_ind[1];
+ hdr.source.pan_id = cpu_to_le16(get_unaligned_le16(&data_ind[1]));
dev_dbg(&priv->spi->dev, "srcPanId: %#06x\n", hdr.source.pan_id);
memcpy(&hdr.source.extended_addr, &data_ind[3], 8);
hdr.dest.mode = data_ind[11];
dev_dbg(&priv->spi->dev, "dstAddrMode: %#03x\n", hdr.dest.mode);
- hdr.dest.pan_id = *(u16 *)&data_ind[12];
+ hdr.dest.pan_id = cpu_to_le16(get_unaligned_le16(&data_ind[12]));
dev_dbg(&priv->spi->dev, "dstPanId: %#06x\n", hdr.dest.pan_id);
memcpy(&hdr.dest.extended_addr, &data_ind[14], 8);
@@ -1970,7 +1969,7 @@ static int ca8210_skb_tx(
status = mcps_data_request(
header.source.mode,
header.dest.mode,
- header.dest.pan_id,
+ le16_to_cpu(header.dest.pan_id),
(union macaddr *)&header.dest.extended_addr,
skb->len - mac_len,
&skb->data[mac_len],
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index abf4a488075e..6cde3d262d41 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -9853,6 +9853,7 @@ static const struct usb_device_id rtl8152_table[] = {
{ USB_DEVICE(VENDOR_ID_NVIDIA, 0x09ff) },
{ USB_DEVICE(VENDOR_ID_TPLINK, 0x0601) },
{ USB_DEVICE(VENDOR_ID_DLINK, 0xb301) },
+ { USB_DEVICE(VENDOR_ID_DELL, 0xb097) },
{ USB_DEVICE(VENDOR_ID_ASUS, 0x1976) },
{}
};
diff --git a/drivers/net/vxlan/vxlan_core.c b/drivers/net/vxlan/vxlan_core.c
index 65a2f4ab8997..9c4d7bedc764 100644
--- a/drivers/net/vxlan/vxlan_core.c
+++ b/drivers/net/vxlan/vxlan_core.c
@@ -334,9 +334,9 @@ static int vxlan_fdb_info(struct sk_buff *skb, struct vxlan_dev *vxlan,
be32_to_cpu(fdb->vni)))
goto nla_put_failure;
- ci.ndm_used = jiffies_to_clock_t(now - fdb->used);
+ ci.ndm_used = jiffies_to_clock_t(now - READ_ONCE(fdb->used));
ci.ndm_confirmed = 0;
- ci.ndm_updated = jiffies_to_clock_t(now - fdb->updated);
+ ci.ndm_updated = jiffies_to_clock_t(now - READ_ONCE(fdb->updated));
ci.ndm_refcnt = 0;
if (nla_put(skb, NDA_CACHEINFO, sizeof(ci), &ci))
@@ -542,8 +542,8 @@ static struct vxlan_fdb *vxlan_find_mac(struct vxlan_dev *vxlan,
struct vxlan_fdb *f;
f = __vxlan_find_mac(vxlan, mac, vni);
- if (f && f->used != jiffies)
- f->used = jiffies;
+ if (f && READ_ONCE(f->used) != jiffies)
+ WRITE_ONCE(f->used, jiffies);
return f;
}
@@ -1073,12 +1073,12 @@ static int vxlan_fdb_update_existing(struct vxlan_dev *vxlan,
!(f->flags & NTF_VXLAN_ADDED_BY_USER)) {
if (f->state != state) {
f->state = state;
- f->updated = jiffies;
+ WRITE_ONCE(f->updated, jiffies);
notify = 1;
}
if (f->flags != fdb_flags) {
f->flags = fdb_flags;
- f->updated = jiffies;
+ WRITE_ONCE(f->updated, jiffies);
notify = 1;
}
}
@@ -1112,7 +1112,7 @@ static int vxlan_fdb_update_existing(struct vxlan_dev *vxlan,
}
if (ndm_flags & NTF_USE)
- f->used = jiffies;
+ WRITE_ONCE(f->used, jiffies);
if (notify) {
if (rd == NULL)
@@ -1525,7 +1525,7 @@ static bool vxlan_snoop(struct net_device *dev,
src_mac, &rdst->remote_ip.sa, &src_ip->sa);
rdst->remote_ip = *src_ip;
- f->updated = jiffies;
+ WRITE_ONCE(f->updated, jiffies);
vxlan_fdb_notify(vxlan, f, rdst, RTM_NEWNEIGH, true, NULL);
} else {
u32 hash_index = fdb_head_index(vxlan, src_mac, vni);
@@ -3000,7 +3000,7 @@ static void vxlan_cleanup(struct timer_list *t)
if (f->flags & NTF_EXT_LEARNED)
continue;
- timeout = f->used + vxlan->cfg.age_interval * HZ;
+ timeout = READ_ONCE(f->used) + vxlan->cfg.age_interval * HZ;
if (time_before_eq(timeout, jiffies)) {
netdev_dbg(vxlan->dev,
"garbage collect %pM\n",
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index e9a36dd7144f..bbc9d570c4e3 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -639,7 +639,9 @@ static int ath9k_of_init(struct ath_softc *sc)
ah->ah_flags |= AH_NO_EEP_SWAP;
}
- of_get_mac_address(np, common->macaddr);
+ ret = of_get_mac_address(np, common->macaddr);
+ if (ret == -EPROBE_DEFER)
+ return ret;
return 0;
}
diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h
index 27f04fb2796d..5a90fa556203 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76.h
@@ -345,6 +345,7 @@ struct mt76_hw_cap {
#define MT_DRV_RX_DMA_HDR BIT(3)
#define MT_DRV_HW_MGMT_TXQ BIT(4)
#define MT_DRV_AMSDU_OFFLOAD BIT(5)
+#define MT_DRV_IGNORE_TXS_FAILED BIT(6)
struct mt76_driver_ops {
u32 drv_flags;
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/pci.c b/drivers/net/wireless/mediatek/mt76/mt76x0/pci.c
index b795e7245c07..3255f9c0ef71 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x0/pci.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x0/pci.c
@@ -151,7 +151,8 @@ mt76x0e_probe(struct pci_dev *pdev, const struct pci_device_id *id)
static const struct mt76_driver_ops drv_ops = {
.txwi_size = sizeof(struct mt76x02_txwi),
.drv_flags = MT_DRV_TX_ALIGNED4_SKBS |
- MT_DRV_SW_RX_AIRTIME,
+ MT_DRV_SW_RX_AIRTIME |
+ MT_DRV_IGNORE_TXS_FAILED,
.survey_flags = SURVEY_INFO_TIME_TX,
.update_survey = mt76x02_update_channel,
.tx_prepare_skb = mt76x02_tx_prepare_skb,
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c b/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c
index f2b2fa733845..7a4d62bff28f 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c
@@ -209,7 +209,8 @@ static int mt76x0u_probe(struct usb_interface *usb_intf,
const struct usb_device_id *id)
{
static const struct mt76_driver_ops drv_ops = {
- .drv_flags = MT_DRV_SW_RX_AIRTIME,
+ .drv_flags = MT_DRV_SW_RX_AIRTIME |
+ MT_DRV_IGNORE_TXS_FAILED,
.survey_flags = SURVEY_INFO_TIME_TX,
.update_survey = mt76x02_update_channel,
.tx_prepare_skb = mt76x02u_tx_prepare_skb,
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2/pci.c b/drivers/net/wireless/mediatek/mt76/mt76x2/pci.c
index 5cd0379d86de..4e369bd87c90 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x2/pci.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x2/pci.c
@@ -22,7 +22,8 @@ mt76x2e_probe(struct pci_dev *pdev, const struct pci_device_id *id)
static const struct mt76_driver_ops drv_ops = {
.txwi_size = sizeof(struct mt76x02_txwi),
.drv_flags = MT_DRV_TX_ALIGNED4_SKBS |
- MT_DRV_SW_RX_AIRTIME,
+ MT_DRV_SW_RX_AIRTIME |
+ MT_DRV_IGNORE_TXS_FAILED,
.survey_flags = SURVEY_INFO_TIME_TX,
.update_survey = mt76x02_update_channel,
.tx_prepare_skb = mt76x02_tx_prepare_skb,
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2/usb.c b/drivers/net/wireless/mediatek/mt76/mt76x2/usb.c
index 9369515f36a3..09b01e09bcfe 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x2/usb.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x2/usb.c
@@ -29,7 +29,8 @@ static int mt76x2u_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{
static const struct mt76_driver_ops drv_ops = {
- .drv_flags = MT_DRV_SW_RX_AIRTIME,
+ .drv_flags = MT_DRV_SW_RX_AIRTIME |
+ MT_DRV_IGNORE_TXS_FAILED,
.survey_flags = SURVEY_INFO_TIME_TX,
.update_survey = mt76x02_update_channel,
.tx_prepare_skb = mt76x02u_tx_prepare_skb,
diff --git a/drivers/net/wireless/mediatek/mt76/tx.c b/drivers/net/wireless/mediatek/mt76/tx.c
index 134a735a0632..3fbf0153d13c 100644
--- a/drivers/net/wireless/mediatek/mt76/tx.c
+++ b/drivers/net/wireless/mediatek/mt76/tx.c
@@ -93,7 +93,8 @@ __mt76_tx_status_skb_done(struct mt76_dev *dev, struct sk_buff *skb, u8 flags,
__skb_unlink(skb, &dev->status_list);
/* Tx status can be unreliable. if it fails, mark the frame as ACKed */
- if (flags & MT_TX_CB_TXS_FAILED) {
+ if (flags & MT_TX_CB_TXS_FAILED &&
+ (dev->drv->drv_flags & MT_DRV_IGNORE_TXS_FAILED)) {
info->status.rates[0].count = 0;
info->status.rates[0].idx = -1;
info->flags |= IEEE80211_TX_STAT_ACK;
diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c
index 23971a5737cf..5101db5ab6d2 100644
--- a/drivers/net/wireless/realtek/rtw88/main.c
+++ b/drivers/net/wireless/realtek/rtw88/main.c
@@ -1330,6 +1330,7 @@ static void rtw_init_ht_cap(struct rtw_dev *rtwdev,
struct ieee80211_sta_ht_cap *ht_cap)
{
struct rtw_efuse *efuse = &rtwdev->efuse;
+ int i;
ht_cap->ht_supported = true;
ht_cap->cap = 0;
@@ -1349,25 +1350,20 @@ static void rtw_init_ht_cap(struct rtw_dev *rtwdev,
ht_cap->ampdu_factor = IEEE80211_HT_MAX_AMPDU_64K;
ht_cap->ampdu_density = IEEE80211_HT_MPDU_DENSITY_16;
ht_cap->mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED;
- if (efuse->hw_cap.nss > 1) {
- ht_cap->mcs.rx_mask[0] = 0xFF;
- ht_cap->mcs.rx_mask[1] = 0xFF;
- ht_cap->mcs.rx_mask[4] = 0x01;
- ht_cap->mcs.rx_highest = cpu_to_le16(300);
- } else {
- ht_cap->mcs.rx_mask[0] = 0xFF;
- ht_cap->mcs.rx_mask[1] = 0x00;
- ht_cap->mcs.rx_mask[4] = 0x01;
- ht_cap->mcs.rx_highest = cpu_to_le16(150);
- }
+
+ for (i = 0; i < efuse->hw_cap.nss; i++)
+ ht_cap->mcs.rx_mask[i] = 0xFF;
+ ht_cap->mcs.rx_mask[4] = 0x01;
+ ht_cap->mcs.rx_highest = cpu_to_le16(150 * efuse->hw_cap.nss);
}
static void rtw_init_vht_cap(struct rtw_dev *rtwdev,
struct ieee80211_sta_vht_cap *vht_cap)
{
struct rtw_efuse *efuse = &rtwdev->efuse;
- u16 mcs_map;
+ u16 mcs_map = 0;
__le16 highest;
+ int i;
if (efuse->hw_cap.ptcl != EFUSE_HW_CAP_IGNORE &&
efuse->hw_cap.ptcl != EFUSE_HW_CAP_PTCL_VHT)
@@ -1390,21 +1386,15 @@ static void rtw_init_vht_cap(struct rtw_dev *rtwdev,
if (rtw_chip_has_rx_ldpc(rtwdev))
vht_cap->cap |= IEEE80211_VHT_CAP_RXLDPC;
- mcs_map = IEEE80211_VHT_MCS_SUPPORT_0_9 << 0 |
- IEEE80211_VHT_MCS_NOT_SUPPORTED << 4 |
- IEEE80211_VHT_MCS_NOT_SUPPORTED << 6 |
- IEEE80211_VHT_MCS_NOT_SUPPORTED << 8 |
- IEEE80211_VHT_MCS_NOT_SUPPORTED << 10 |
- IEEE80211_VHT_MCS_NOT_SUPPORTED << 12 |
- IEEE80211_VHT_MCS_NOT_SUPPORTED << 14;
- if (efuse->hw_cap.nss > 1) {
- highest = cpu_to_le16(780);
- mcs_map |= IEEE80211_VHT_MCS_SUPPORT_0_9 << 2;
- } else {
- highest = cpu_to_le16(390);
- mcs_map |= IEEE80211_VHT_MCS_NOT_SUPPORTED << 2;
+ for (i = 0; i < 8; i++) {
+ if (i < efuse->hw_cap.nss)
+ mcs_map |= IEEE80211_VHT_MCS_SUPPORT_0_9 << (i * 2);
+ else
+ mcs_map |= IEEE80211_VHT_MCS_NOT_SUPPORTED << (i * 2);
}
+ highest = cpu_to_le16(390 * efuse->hw_cap.nss);
+
vht_cap->vht_mcs.rx_mcs_map = cpu_to_le16(mcs_map);
vht_cap->vht_mcs.tx_mcs_map = cpu_to_le16(mcs_map);
vht_cap->vht_mcs.rx_highest = highest;
diff --git a/drivers/net/wireless/realtek/rtw88/reg.h b/drivers/net/wireless/realtek/rtw88/reg.h
index c0fb1e446245..3e5bd64bc09c 100644
--- a/drivers/net/wireless/realtek/rtw88/reg.h
+++ b/drivers/net/wireless/realtek/rtw88/reg.h
@@ -107,6 +107,7 @@
#define BIT_SHIFT_ROM_PGE 16
#define BIT_FW_INIT_RDY BIT(15)
#define BIT_FW_DW_RDY BIT(14)
+#define BIT_CPU_CLK_SEL (BIT(12) | BIT(13))
#define BIT_RPWM_TOGGLE BIT(7)
#define BIT_RAM_DL_SEL BIT(7) /* legacy only */
#define BIT_DMEM_CHKSUM_OK BIT(6)
@@ -124,7 +125,7 @@
BIT_CHECK_SUM_OK)
#define FW_READY_LEGACY (BIT_MCUFWDL_RDY | BIT_FWDL_CHK_RPT | \
BIT_WINTINI_RDY | BIT_RAM_DL_SEL)
-#define FW_READY_MASK 0xffff
+#define FW_READY_MASK (0xffff & ~BIT_CPU_CLK_SEL)
#define REG_MCU_TST_CFG 0x84
#define VAL_FW_TRIGGER 0x1
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822b.c b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
index 247f26e3e819..63ecac7201a1 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8822b.c
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
@@ -954,11 +954,11 @@ static void rtw8822b_query_rx_desc(struct rtw_dev *rtwdev, u8 *rx_desc,
}
static void
-rtw8822b_set_tx_power_index_by_rate(struct rtw_dev *rtwdev, u8 path, u8 rs)
+rtw8822b_set_tx_power_index_by_rate(struct rtw_dev *rtwdev, u8 path,
+ u8 rs, u32 *phy_pwr_idx)
{
struct rtw_hal *hal = &rtwdev->hal;
static const u32 offset_txagc[2] = {0x1d00, 0x1d80};
- static u32 phy_pwr_idx;
u8 rate, rate_idx, pwr_index, shift;
int j;
@@ -966,12 +966,12 @@ rtw8822b_set_tx_power_index_by_rate(struct rtw_dev *rtwdev, u8 path, u8 rs)
rate = rtw_rate_section[rs][j];
pwr_index = hal->tx_pwr_tbl[path][rate];
shift = rate & 0x3;
- phy_pwr_idx |= ((u32)pwr_index << (shift * 8));
+ *phy_pwr_idx |= ((u32)pwr_index << (shift * 8));
if (shift == 0x3) {
rate_idx = rate & 0xfc;
rtw_write32(rtwdev, offset_txagc[path] + rate_idx,
- phy_pwr_idx);
- phy_pwr_idx = 0;
+ *phy_pwr_idx);
+ *phy_pwr_idx = 0;
}
}
}
@@ -979,11 +979,13 @@ rtw8822b_set_tx_power_index_by_rate(struct rtw_dev *rtwdev, u8 path, u8 rs)
static void rtw8822b_set_tx_power_index(struct rtw_dev *rtwdev)
{
struct rtw_hal *hal = &rtwdev->hal;
+ u32 phy_pwr_idx = 0;
int rs, path;
for (path = 0; path < hal->rf_path_num; path++) {
for (rs = 0; rs < RTW_RATE_SECTION_MAX; rs++)
- rtw8822b_set_tx_power_index_by_rate(rtwdev, path, rs);
+ rtw8822b_set_tx_power_index_by_rate(rtwdev, path, rs,
+ &phy_pwr_idx);
}
}
diff --git a/drivers/net/wireless/realtek/rtw88/util.c b/drivers/net/wireless/realtek/rtw88/util.c
index 2c515af214e7..bfd017d53fef 100644
--- a/drivers/net/wireless/realtek/rtw88/util.c
+++ b/drivers/net/wireless/realtek/rtw88/util.c
@@ -101,7 +101,8 @@ void rtw_desc_to_mcsrate(u16 rate, u8 *mcs, u8 *nss)
*nss = 4;
*mcs = rate - DESC_RATEVHT4SS_MCS0;
} else if (rate >= DESC_RATEMCS0 &&
- rate <= DESC_RATEMCS15) {
+ rate <= DESC_RATEMCS31) {
+ *nss = 0;
*mcs = rate - DESC_RATEMCS0;
}
}
diff --git a/drivers/nvdimm/label.c b/drivers/nvdimm/label.c
index 7f473f9db300..e1b511d09295 100644
--- a/drivers/nvdimm/label.c
+++ b/drivers/nvdimm/label.c
@@ -437,7 +437,8 @@ int nd_label_data_init(struct nvdimm_drvdata *ndd)
if (ndd->data)
return 0;
- if (ndd->nsarea.status || ndd->nsarea.max_xfer == 0) {
+ if (ndd->nsarea.status || ndd->nsarea.max_xfer == 0 ||
+ ndd->nsarea.config_size == 0) {
dev_dbg(ndd->dev, "failed to init config data area: (%u:%u)\n",
ndd->nsarea.max_xfer, ndd->nsarea.config_size);
return -ENXIO;
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index a3c5af95e8f3..5f60a6ca247f 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -3448,6 +3448,8 @@ static const struct pci_device_id nvme_id_table[] = {
.driver_data = NVME_QUIRK_NO_DEEPEST_PS, },
{ PCI_DEVICE(0x1e49, 0x0041), /* ZHITAI TiPro7000 NVMe SSD */
.driver_data = NVME_QUIRK_NO_DEEPEST_PS, },
+ { PCI_DEVICE(0x025e, 0xf1ac), /* SOLIDIGM P44 pro SSDPFKKW020X7 */
+ .driver_data = NVME_QUIRK_NO_DEEPEST_PS, },
{ PCI_DEVICE(0xc0a9, 0x540a), /* Crucial P2 */
.driver_data = NVME_QUIRK_BOGUS_NID, },
{ PCI_DEVICE(0x1d97, 0x2263), /* Lexar NM610 */
diff --git a/drivers/nvme/target/tcp.c b/drivers/nvme/target/tcp.c
index 2bf2c775f745..18127bbc6423 100644
--- a/drivers/nvme/target/tcp.c
+++ b/drivers/nvme/target/tcp.c
@@ -1425,6 +1425,9 @@ static void nvmet_tcp_restore_socket_callbacks(struct nvmet_tcp_queue *queue)
{
struct socket *sock = queue->sock;
+ if (!queue->state_change)
+ return;
+
write_lock_bh(&sock->sk->sk_callback_lock);
sock->sk->sk_data_ready = queue->data_ready;
sock->sk->sk_state_change = queue->state_change;
diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
index 43e615aa12ff..8ed3bf14f0ce 100644
--- a/drivers/pci/Kconfig
+++ b/drivers/pci/Kconfig
@@ -176,6 +176,12 @@ config PCI_P2PDMA
P2P DMA transactions must be between devices behind the same root
port.
+ Enabling this option will reduce the entropy of x86 KASLR memory
+ regions. For example - on a 46 bit system, the entropy goes down
+ from 16 bits to 15 bits. The actual reduction in entropy depends
+ on the physical address bits, on processor features, kernel config
+ (5 level page table) and physical memory present on the system.
+
If unsure, say N.
config PCI_LABEL
diff --git a/drivers/pci/controller/dwc/pcie-designware-ep.c b/drivers/pci/controller/dwc/pcie-designware-ep.c
index fc92d30a0ad9..5502751334cc 100644
--- a/drivers/pci/controller/dwc/pcie-designware-ep.c
+++ b/drivers/pci/controller/dwc/pcie-designware-ep.c
@@ -267,7 +267,7 @@ static int dw_pcie_find_index(struct dw_pcie_ep *ep, phys_addr_t addr,
u32 index;
struct dw_pcie *pci = to_dw_pcie_from_ep(ep);
- for (index = 0; index < pci->num_ob_windows; index++) {
+ for_each_set_bit(index, ep->ob_window_map, pci->num_ob_windows) {
if (ep->outbound_addr[index] != addr)
continue;
*atu_index = index;
diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c
index 6a676bde5e2c..e984b57dd0d8 100644
--- a/drivers/pci/controller/pcie-brcmstb.c
+++ b/drivers/pci/controller/pcie-brcmstb.c
@@ -308,8 +308,8 @@ static int brcm_pcie_encode_ibar_size(u64 size)
if (log2_in >= 12 && log2_in <= 15)
/* Covers 4KB to 32KB (inclusive) */
return (log2_in - 12) + 0x1c;
- else if (log2_in >= 16 && log2_in <= 35)
- /* Covers 64KB to 32GB, (inclusive) */
+ else if (log2_in >= 16 && log2_in <= 36)
+ /* Covers 64KB to 64GB, (inclusive) */
return log2_in - 15;
/* Something is awry so disable */
return 0;
@@ -1352,3 +1352,4 @@ module_platform_driver(brcm_pcie_driver);
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Broadcom STB PCIe RC driver");
MODULE_AUTHOR("Broadcom");
+MODULE_SOFTDEP("pre: irq_bcm2712_mip");
diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c
index 1195c570599c..846590706a38 100644
--- a/drivers/pci/controller/vmd.c
+++ b/drivers/pci/controller/vmd.c
@@ -17,6 +17,8 @@
#include <linux/rculist.h>
#include <linux/rcupdate.h>
+#include <xen/xen.h>
+
#include <asm/irqdomain.h>
#include <asm/device.h>
#include <asm/msi.h>
@@ -826,6 +828,24 @@ static int vmd_probe(struct pci_dev *dev, const struct pci_device_id *id)
struct vmd_dev *vmd;
int err;
+ if (xen_domain()) {
+ /*
+ * Xen doesn't have knowledge about devices in the VMD bus
+ * because the config space of devices behind the VMD bridge is
+ * not known to Xen, and hence Xen cannot discover or configure
+ * them in any way.
+ *
+ * Bypass of MSI remapping won't work in that case as direct
+ * write by Linux to the MSI entries won't result in functional
+ * interrupts, as Xen is the entity that manages the host
+ * interrupt controller and must configure interrupts. However
+ * multiplexing of interrupts by the VMD bridge will work under
+ * Xen, so force the usage of that mode which must always be
+ * supported by VMD bridges.
+ */
+ features &= ~VMD_FEAT_CAN_BYPASS_MSI_REMAP;
+ }
+
if (resource_size(&dev->resource[VMD_CFGBAR]) < (1 << 20))
return -ENOMEM;
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index a159bfdfa251..04c3ae8efc0f 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -806,11 +806,9 @@ static resource_size_t calculate_iosize(resource_size_t size,
size = (size & 0xff) + ((size & ~0xffUL) << 2);
#endif
size = size + size1;
- if (size < old_size)
- size = old_size;
- size = ALIGN(max(size, add_size) + children_add_size, align);
- return size;
+ size = max(size, add_size) + children_add_size;
+ return ALIGN(max(size, old_size), align);
}
static resource_size_t calculate_memsize(resource_size_t size,
diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
index e2a055ba0b7a..cabeff8c944b 100644
--- a/drivers/perf/arm-cmn.c
+++ b/drivers/perf/arm-cmn.c
@@ -1512,6 +1512,7 @@ static int arm_cmn_probe(struct platform_device *pdev)
return -ENOMEM;
cmn->dev = &pdev->dev;
+ cmn->cpu = raw_smp_processor_id();
platform_set_drvdata(pdev, cmn);
if (has_acpi_companion(cmn->dev))
@@ -1533,7 +1534,6 @@ static int arm_cmn_probe(struct platform_device *pdev)
if (err)
return err;
- cmn->cpu = raw_smp_processor_id();
cmn->pmu = (struct pmu) {
.module = THIS_MODULE,
.attr_groups = arm_cmn_attr_groups,
diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
index e2bfd56d5086..21f12aeb7747 100644
--- a/drivers/phy/phy-core.c
+++ b/drivers/phy/phy-core.c
@@ -360,13 +360,14 @@ EXPORT_SYMBOL_GPL(phy_power_off);
int phy_set_mode_ext(struct phy *phy, enum phy_mode mode, int submode)
{
- int ret;
+ int ret = 0;
- if (!phy || !phy->ops->set_mode)
+ if (!phy)
return 0;
mutex_lock(&phy->mutex);
- ret = phy->ops->set_mode(phy, mode, submode);
+ if (phy->ops->set_mode)
+ ret = phy->ops->set_mode(phy, mode, submode);
if (!ret)
phy->attrs.mode = mode;
mutex_unlock(&phy->mutex);
diff --git a/drivers/pinctrl/bcm/pinctrl-bcm281xx.c b/drivers/pinctrl/bcm/pinctrl-bcm281xx.c
index fbfddcc39d5c..6ab3481ba902 100644
--- a/drivers/pinctrl/bcm/pinctrl-bcm281xx.c
+++ b/drivers/pinctrl/bcm/pinctrl-bcm281xx.c
@@ -79,7 +79,7 @@ static enum bcm281xx_pin_type hdmi_pin = BCM281XX_PIN_TYPE_HDMI;
struct bcm281xx_pin_function {
const char *name;
const char * const *groups;
- const unsigned ngroups;
+ const unsigned int ngroups;
};
/*
@@ -91,10 +91,10 @@ struct bcm281xx_pinctrl_data {
/* List of all pins */
const struct pinctrl_pin_desc *pins;
- const unsigned npins;
+ const unsigned int npins;
const struct bcm281xx_pin_function *functions;
- const unsigned nfunctions;
+ const unsigned int nfunctions;
struct regmap *regmap;
};
@@ -948,7 +948,7 @@ static struct bcm281xx_pinctrl_data bcm281xx_pinctrl = {
};
static inline enum bcm281xx_pin_type pin_type_get(struct pinctrl_dev *pctldev,
- unsigned pin)
+ unsigned int pin)
{
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
@@ -992,7 +992,7 @@ static int bcm281xx_pinctrl_get_groups_count(struct pinctrl_dev *pctldev)
}
static const char *bcm281xx_pinctrl_get_group_name(struct pinctrl_dev *pctldev,
- unsigned group)
+ unsigned int group)
{
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
@@ -1000,9 +1000,9 @@ static const char *bcm281xx_pinctrl_get_group_name(struct pinctrl_dev *pctldev,
}
static int bcm281xx_pinctrl_get_group_pins(struct pinctrl_dev *pctldev,
- unsigned group,
+ unsigned int group,
const unsigned **pins,
- unsigned *num_pins)
+ unsigned int *num_pins)
{
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
@@ -1014,7 +1014,7 @@ static int bcm281xx_pinctrl_get_group_pins(struct pinctrl_dev *pctldev,
static void bcm281xx_pinctrl_pin_dbg_show(struct pinctrl_dev *pctldev,
struct seq_file *s,
- unsigned offset)
+ unsigned int offset)
{
seq_printf(s, " %s", dev_name(pctldev->dev));
}
@@ -1036,7 +1036,7 @@ static int bcm281xx_pinctrl_get_fcns_count(struct pinctrl_dev *pctldev)
}
static const char *bcm281xx_pinctrl_get_fcn_name(struct pinctrl_dev *pctldev,
- unsigned function)
+ unsigned int function)
{
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
@@ -1044,9 +1044,9 @@ static const char *bcm281xx_pinctrl_get_fcn_name(struct pinctrl_dev *pctldev,
}
static int bcm281xx_pinctrl_get_fcn_groups(struct pinctrl_dev *pctldev,
- unsigned function,
+ unsigned int function,
const char * const **groups,
- unsigned * const num_groups)
+ unsigned int * const num_groups)
{
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
@@ -1057,8 +1057,8 @@ static int bcm281xx_pinctrl_get_fcn_groups(struct pinctrl_dev *pctldev,
}
static int bcm281xx_pinmux_set(struct pinctrl_dev *pctldev,
- unsigned function,
- unsigned group)
+ unsigned int function,
+ unsigned int group)
{
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
const struct bcm281xx_pin_function *f = &pdata->functions[function];
@@ -1089,7 +1089,7 @@ static const struct pinmux_ops bcm281xx_pinctrl_pinmux_ops = {
};
static int bcm281xx_pinctrl_pin_config_get(struct pinctrl_dev *pctldev,
- unsigned pin,
+ unsigned int pin,
unsigned long *config)
{
return -ENOTSUPP;
@@ -1098,9 +1098,9 @@ static int bcm281xx_pinctrl_pin_config_get(struct pinctrl_dev *pctldev,
/* Goes through the configs and update register val/mask */
static int bcm281xx_std_pin_update(struct pinctrl_dev *pctldev,
- unsigned pin,
+ unsigned int pin,
unsigned long *configs,
- unsigned num_configs,
+ unsigned int num_configs,
u32 *val,
u32 *mask)
{
@@ -1214,9 +1214,9 @@ static const u16 bcm281xx_pullup_map[] = {
/* Goes through the configs and update register val/mask */
static int bcm281xx_i2c_pin_update(struct pinctrl_dev *pctldev,
- unsigned pin,
+ unsigned int pin,
unsigned long *configs,
- unsigned num_configs,
+ unsigned int num_configs,
u32 *val,
u32 *mask)
{
@@ -1284,9 +1284,9 @@ static int bcm281xx_i2c_pin_update(struct pinctrl_dev *pctldev,
/* Goes through the configs and update register val/mask */
static int bcm281xx_hdmi_pin_update(struct pinctrl_dev *pctldev,
- unsigned pin,
+ unsigned int pin,
unsigned long *configs,
- unsigned num_configs,
+ unsigned int num_configs,
u32 *val,
u32 *mask)
{
@@ -1328,9 +1328,9 @@ static int bcm281xx_hdmi_pin_update(struct pinctrl_dev *pctldev,
}
static int bcm281xx_pinctrl_pin_config_set(struct pinctrl_dev *pctldev,
- unsigned pin,
+ unsigned int pin,
unsigned long *configs,
- unsigned num_configs)
+ unsigned int num_configs)
{
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
enum bcm281xx_pin_type pin_type;
diff --git a/drivers/pinctrl/devicetree.c b/drivers/pinctrl/devicetree.c
index 0220228c5040..d9279fc7be83 100644
--- a/drivers/pinctrl/devicetree.c
+++ b/drivers/pinctrl/devicetree.c
@@ -143,10 +143,14 @@ static int dt_to_map_one_config(struct pinctrl *p,
pctldev = get_pinctrl_dev_from_of_node(np_pctldev);
if (pctldev)
break;
- /* Do not defer probing of hogs (circular loop) */
+ /*
+ * Do not defer probing of hogs (circular loop)
+ *
+ * Return 1 to let the caller catch the case.
+ */
if (np_pctldev == p->dev->of_node) {
of_node_put(np_pctldev);
- return -ENODEV;
+ return 1;
}
}
of_node_put(np_pctldev);
@@ -265,6 +269,8 @@ int pinctrl_dt_to_map(struct pinctrl *p, struct pinctrl_dev *pctldev)
ret = dt_to_map_one_config(p, pctldev, statename,
np_config);
of_node_put(np_config);
+ if (ret == 1)
+ continue;
if (ret < 0)
goto err;
}
diff --git a/drivers/pinctrl/meson/pinctrl-meson.c b/drivers/pinctrl/meson/pinctrl-meson.c
index 49851444a6e3..d239ad85a510 100644
--- a/drivers/pinctrl/meson/pinctrl-meson.c
+++ b/drivers/pinctrl/meson/pinctrl-meson.c
@@ -486,7 +486,7 @@ static int meson_pinconf_get(struct pinctrl_dev *pcdev, unsigned int pin,
case PIN_CONFIG_BIAS_PULL_DOWN:
case PIN_CONFIG_BIAS_PULL_UP:
if (meson_pinconf_get_pull(pc, pin) == param)
- arg = 1;
+ arg = 60000;
else
return -EINVAL;
break;
diff --git a/drivers/platform/x86/dell/dell-wmi-sysman/passobj-attributes.c b/drivers/platform/x86/dell/dell-wmi-sysman/passobj-attributes.c
index 230e6ee96636..d8f1bf5e58a0 100644
--- a/drivers/platform/x86/dell/dell-wmi-sysman/passobj-attributes.c
+++ b/drivers/platform/x86/dell/dell-wmi-sysman/passobj-attributes.c
@@ -45,7 +45,7 @@ static ssize_t current_password_store(struct kobject *kobj,
int length;
length = strlen(buf);
- if (buf[length-1] == '\n')
+ if (length && buf[length - 1] == '\n')
length--;
/* firmware does verifiation of min/max password length,
diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
index 80929380ec7e..04ccfdd99e27 100644
--- a/drivers/platform/x86/fujitsu-laptop.c
+++ b/drivers/platform/x86/fujitsu-laptop.c
@@ -17,13 +17,13 @@
/*
* fujitsu-laptop.c - Fujitsu laptop support, providing access to additional
* features made available on a range of Fujitsu laptops including the
- * P2xxx/P5xxx/S6xxx/S7xxx series.
+ * P2xxx/P5xxx/S2xxx/S6xxx/S7xxx series.
*
* This driver implements a vendor-specific backlight control interface for
* Fujitsu laptops and provides support for hotkeys present on certain Fujitsu
* laptops.
*
- * This driver has been tested on a Fujitsu Lifebook S6410, S7020 and
+ * This driver has been tested on a Fujitsu Lifebook S2110, S6410, S7020 and
* P8010. It should work on most P-series and S-series Lifebooks, but
* YMMV.
*
@@ -102,7 +102,11 @@
#define KEY2_CODE 0x411
#define KEY3_CODE 0x412
#define KEY4_CODE 0x413
-#define KEY5_CODE 0x420
+#define KEY5_CODE 0x414
+#define KEY6_CODE 0x415
+#define KEY7_CODE 0x416
+#define KEY8_CODE 0x417
+#define KEY9_CODE 0x420
/* Hotkey ringbuffer limits */
#define MAX_HOTKEY_RINGBUFFER_SIZE 100
@@ -450,7 +454,7 @@ static const struct key_entry keymap_default[] = {
{ KE_KEY, KEY2_CODE, { KEY_PROG2 } },
{ KE_KEY, KEY3_CODE, { KEY_PROG3 } },
{ KE_KEY, KEY4_CODE, { KEY_PROG4 } },
- { KE_KEY, KEY5_CODE, { KEY_RFKILL } },
+ { KE_KEY, KEY9_CODE, { KEY_RFKILL } },
/* Soft keys read from status flags */
{ KE_KEY, FLAG_RFKILL, { KEY_RFKILL } },
{ KE_KEY, FLAG_TOUCHPAD_TOGGLE, { KEY_TOUCHPAD_TOGGLE } },
@@ -474,6 +478,18 @@ static const struct key_entry keymap_p8010[] = {
{ KE_END, 0 }
};
+static const struct key_entry keymap_s2110[] = {
+ { KE_KEY, KEY1_CODE, { KEY_PROG1 } }, /* "A" */
+ { KE_KEY, KEY2_CODE, { KEY_PROG2 } }, /* "B" */
+ { KE_KEY, KEY3_CODE, { KEY_WWW } }, /* "Internet" */
+ { KE_KEY, KEY4_CODE, { KEY_EMAIL } }, /* "E-mail" */
+ { KE_KEY, KEY5_CODE, { KEY_STOPCD } },
+ { KE_KEY, KEY6_CODE, { KEY_PLAYPAUSE } },
+ { KE_KEY, KEY7_CODE, { KEY_PREVIOUSSONG } },
+ { KE_KEY, KEY8_CODE, { KEY_NEXTSONG } },
+ { KE_END, 0 }
+};
+
static const struct key_entry *keymap = keymap_default;
static int fujitsu_laptop_dmi_keymap_override(const struct dmi_system_id *id)
@@ -511,6 +527,15 @@ static const struct dmi_system_id fujitsu_laptop_dmi_table[] = {
},
.driver_data = (void *)keymap_p8010
},
+ {
+ .callback = fujitsu_laptop_dmi_keymap_override,
+ .ident = "Fujitsu LifeBook S2110",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK S2110"),
+ },
+ .driver_data = (void *)keymap_s2110
+ },
{}
};
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 5e44a4338706..9b700a3ad7b2 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -203,6 +203,7 @@ enum tpacpi_hkey_event_t {
/* Thermal events */
TP_HKEY_EV_ALARM_BAT_HOT = 0x6011, /* battery too hot */
TP_HKEY_EV_ALARM_BAT_XHOT = 0x6012, /* battery critically hot */
+ TP_HKEY_EV_ALARM_BAT_LIM_CHANGE = 0x6013, /* battery charge limit changed*/
TP_HKEY_EV_ALARM_SENSOR_HOT = 0x6021, /* sensor too hot */
TP_HKEY_EV_ALARM_SENSOR_XHOT = 0x6022, /* sensor critically hot */
TP_HKEY_EV_THM_TABLE_CHANGED = 0x6030, /* windows; thermal table changed */
@@ -4075,6 +4076,10 @@ static bool hotkey_notify_6xxx(const u32 hkey,
pr_alert("THERMAL EMERGENCY: battery is extremely hot!\n");
/* recommended action: immediate sleep/hibernate */
break;
+ case TP_HKEY_EV_ALARM_BAT_LIM_CHANGE:
+ pr_debug("Battery Info: battery charge threshold changed\n");
+ /* User changed charging threshold. No action needed */
+ return true;
case TP_HKEY_EV_ALARM_SENSOR_HOT:
pr_crit("THERMAL ALARM: a sensor reports something is too hot!\n");
/* recommended action: warn user through gui, that */
@@ -10935,6 +10940,8 @@ static int __must_check __init get_thinkpad_model_data(
tp->vendor = PCI_VENDOR_ID_IBM;
else if (dmi_name_in_vendors("LENOVO"))
tp->vendor = PCI_VENDOR_ID_LENOVO;
+ else if (dmi_name_in_vendors("NEC"))
+ tp->vendor = PCI_VENDOR_ID_LENOVO;
else
return 0;
diff --git a/drivers/regulator/ad5398.c b/drivers/regulator/ad5398.c
index 75f432f61e91..f4d6e62bd963 100644
--- a/drivers/regulator/ad5398.c
+++ b/drivers/regulator/ad5398.c
@@ -14,6 +14,7 @@
#include <linux/platform_device.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>
+#include <linux/regulator/of_regulator.h>
#define AD5398_CURRENT_EN_MASK 0x8000
@@ -221,15 +222,20 @@ static int ad5398_probe(struct i2c_client *client,
const struct ad5398_current_data_format *df =
(struct ad5398_current_data_format *)id->driver_data;
- if (!init_data)
- return -EINVAL;
-
chip = devm_kzalloc(&client->dev, sizeof(*chip), GFP_KERNEL);
if (!chip)
return -ENOMEM;
config.dev = &client->dev;
+ if (client->dev.of_node)
+ init_data = of_get_regulator_init_data(&client->dev,
+ client->dev.of_node,
+ &ad5398_reg);
+ if (!init_data)
+ return -EINVAL;
+
config.init_data = init_data;
+ config.of_node = client->dev.of_node;
config.driver_data = chip;
chip->client = client;
diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c
index 97a0c0dc4c77..90c09cde6e0f 100644
--- a/drivers/remoteproc/qcom_wcnss.c
+++ b/drivers/remoteproc/qcom_wcnss.c
@@ -118,10 +118,10 @@ static const struct wcnss_data pronto_v1_data = {
.pmu_offset = 0x1004,
.spare_offset = 0x1088,
- .pd_names = { "mx", "cx" },
+ .pd_names = { "cx", "mx" },
.vregs = (struct wcnss_vreg_info[]) {
- { "vddmx", 950000, 1150000, 0 },
{ "vddcx", .super_turbo = true},
+ { "vddmx", 950000, 1150000, 0 },
{ "vddpx", 1800000, 1800000, 0 },
},
.num_pd_vregs = 2,
@@ -132,10 +132,10 @@ static const struct wcnss_data pronto_v2_data = {
.pmu_offset = 0x1004,
.spare_offset = 0x1088,
- .pd_names = { "mx", "cx" },
+ .pd_names = { "cx", "mx" },
.vregs = (struct wcnss_vreg_info[]) {
- { "vddmx", 1287500, 1287500, 0 },
{ "vddcx", .super_turbo = true },
+ { "vddmx", 1287500, 1287500, 0 },
{ "vddpx", 1800000, 1800000, 0 },
},
.num_pd_vregs = 2,
@@ -387,8 +387,17 @@ static irqreturn_t wcnss_stop_ack_interrupt(int irq, void *dev)
static int wcnss_init_pds(struct qcom_wcnss *wcnss,
const char * const pd_names[WCNSS_MAX_PDS])
{
+ struct device *dev = wcnss->dev;
int i, ret;
+ /* Handle single power domain */
+ if (dev->pm_domain) {
+ wcnss->pds[0] = dev;
+ wcnss->num_pds = 1;
+ pm_runtime_enable(dev);
+ return 0;
+ }
+
for (i = 0; i < WCNSS_MAX_PDS; i++) {
if (!pd_names[i])
break;
@@ -408,8 +417,15 @@ static int wcnss_init_pds(struct qcom_wcnss *wcnss,
static void wcnss_release_pds(struct qcom_wcnss *wcnss)
{
+ struct device *dev = wcnss->dev;
int i;
+ /* Handle single power domain */
+ if (wcnss->num_pds == 1 && dev->pm_domain) {
+ pm_runtime_disable(dev);
+ return;
+ }
+
for (i = 0; i < wcnss->num_pds; i++)
dev_pm_domain_detach(wcnss->pds[i], false);
}
@@ -427,10 +443,14 @@ static int wcnss_init_regulators(struct qcom_wcnss *wcnss,
* the regulators for the power domains. For old device trees we need to
* reserve extra space to manage them through the regulator interface.
*/
- if (wcnss->num_pds)
- info += num_pd_vregs;
- else
+ if (wcnss->num_pds) {
+ info += wcnss->num_pds;
+ /* Handle single power domain case */
+ if (wcnss->num_pds < num_pd_vregs)
+ num_vregs += num_pd_vregs - wcnss->num_pds;
+ } else {
num_vregs += num_pd_vregs;
+ }
bulk = devm_kcalloc(wcnss->dev,
num_vregs, sizeof(struct regulator_bulk_data),
diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c
index 336cb9aa5e33..d5a7a377e4a6 100644
--- a/drivers/rtc/rtc-ds1307.c
+++ b/drivers/rtc/rtc-ds1307.c
@@ -1802,10 +1802,8 @@ static int ds1307_probe(struct i2c_client *client,
* For some variants, be sure alarms can trigger when we're
* running on Vbackup (BBSQI/BBSQW)
*/
- if (want_irq || ds1307_can_wakeup_device) {
+ if (want_irq || ds1307_can_wakeup_device)
regs[0] |= DS1337_BIT_INTCN | chip->bbsqi_bit;
- regs[0] &= ~(DS1337_BIT_A2IE | DS1337_BIT_A1IE);
- }
regmap_write(ds1307->regmap, DS1337_REG_CONTROL,
regs[0]);
diff --git a/drivers/rtc/rtc-rv3032.c b/drivers/rtc/rtc-rv3032.c
index 1b62ed2f1459..6b7712f0b09c 100644
--- a/drivers/rtc/rtc-rv3032.c
+++ b/drivers/rtc/rtc-rv3032.c
@@ -69,7 +69,7 @@
#define RV3032_CLKOUT2_FD_MSK GENMASK(6, 5)
#define RV3032_CLKOUT2_OS BIT(7)
-#define RV3032_CTRL1_EERD BIT(3)
+#define RV3032_CTRL1_EERD BIT(2)
#define RV3032_CTRL1_WADA BIT(5)
#define RV3032_CTRL2_STOP BIT(0)
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
index 54aff304cdcf..d04669ae878b 100644
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
@@ -5631,6 +5631,7 @@ static struct lpfc_nodelist *
__lpfc_findnode_did(struct lpfc_vport *vport, uint32_t did)
{
struct lpfc_nodelist *ndlp;
+ struct lpfc_nodelist *np = NULL;
uint32_t data1;
list_for_each_entry(ndlp, &vport->fc_nodes, nlp_listp) {
@@ -5645,14 +5646,20 @@ __lpfc_findnode_did(struct lpfc_vport *vport, uint32_t did)
ndlp, ndlp->nlp_DID,
ndlp->nlp_flag, data1, ndlp->nlp_rpi,
ndlp->active_rrqs_xri_bitmap);
- return ndlp;
+
+ /* Check for new or potentially stale node */
+ if (ndlp->nlp_state != NLP_STE_UNUSED_NODE)
+ return ndlp;
+ np = ndlp;
}
}
- /* FIND node did <did> NOT FOUND */
- lpfc_printf_vlog(vport, KERN_INFO, LOG_NODE,
- "0932 FIND node did x%x NOT FOUND.\n", did);
- return NULL;
+ if (!np)
+ /* FIND node did <did> NOT FOUND */
+ lpfc_printf_vlog(vport, KERN_INFO, LOG_NODE,
+ "0932 FIND node did x%x NOT FOUND.\n", did);
+
+ return np;
}
struct lpfc_nodelist *
diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
index 20336175c14f..81cd96b93bdf 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_ctl.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
@@ -678,6 +678,7 @@ _ctl_do_mpt_command(struct MPT3SAS_ADAPTER *ioc, struct mpt3_ioctl_command karg,
size_t data_in_sz = 0;
long ret;
u16 device_handle = MPT3SAS_INVALID_DEVICE_HANDLE;
+ int tm_ret;
issue_reset = 0;
@@ -1111,18 +1112,25 @@ _ctl_do_mpt_command(struct MPT3SAS_ADAPTER *ioc, struct mpt3_ioctl_command karg,
if (pcie_device && (!ioc->tm_custom_handling) &&
(!(mpt3sas_scsih_is_pcie_scsi_device(
pcie_device->device_info))))
- mpt3sas_scsih_issue_locked_tm(ioc,
+ tm_ret = mpt3sas_scsih_issue_locked_tm(ioc,
le16_to_cpu(mpi_request->FunctionDependent1),
0, 0, 0,
MPI2_SCSITASKMGMT_TASKTYPE_TARGET_RESET, 0,
0, pcie_device->reset_timeout,
MPI26_SCSITASKMGMT_MSGFLAGS_PROTOCOL_LVL_RST_PCIE);
else
- mpt3sas_scsih_issue_locked_tm(ioc,
+ tm_ret = mpt3sas_scsih_issue_locked_tm(ioc,
le16_to_cpu(mpi_request->FunctionDependent1),
0, 0, 0,
MPI2_SCSITASKMGMT_TASKTYPE_TARGET_RESET, 0,
0, 30, MPI2_SCSITASKMGMT_MSGFLAGS_LINK_RESET);
+
+ if (tm_ret != SUCCESS) {
+ ioc_info(ioc,
+ "target reset failed, issue hard reset: handle (0x%04x)\n",
+ le16_to_cpu(mpi_request->FunctionDependent1));
+ mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER);
+ }
} else
mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER);
}
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index 956b3b9c5aad..dc0c6508d254 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -947,7 +947,6 @@ static void reset_state(struct scsi_tape *STp)
STp->partition = find_partition(STp);
if (STp->partition < 0)
STp->partition = 0;
- STp->new_partition = STp->partition;
}
}
@@ -2884,7 +2883,6 @@ static int st_int_ioctl(struct scsi_tape *STp, unsigned int cmd_in, unsigned lon
timeout = STp->long_timeout * 8;
DEBC_printk(STp, "Erasing tape.\n");
- fileno = blkno = at_sm = 0;
break;
case MTSETBLK: /* Set block length */
case MTSETDENSITY: /* Set tape density */
@@ -2917,14 +2915,17 @@ static int st_int_ioctl(struct scsi_tape *STp, unsigned int cmd_in, unsigned lon
if (cmd_in == MTSETDENSITY) {
(STp->buffer)->b_data[4] = arg;
STp->density_changed = 1; /* At least we tried ;-) */
+ STp->changed_density = arg;
} else if (cmd_in == SET_DENS_AND_BLK)
(STp->buffer)->b_data[4] = arg >> 24;
else
(STp->buffer)->b_data[4] = STp->density;
if (cmd_in == MTSETBLK || cmd_in == SET_DENS_AND_BLK) {
ltmp = arg & MT_ST_BLKSIZE_MASK;
- if (cmd_in == MTSETBLK)
+ if (cmd_in == MTSETBLK) {
STp->blksize_changed = 1; /* At least we tried ;-) */
+ STp->changed_blksize = arg;
+ }
} else
ltmp = STp->block_size;
(STp->buffer)->b_data[9] = (ltmp >> 16);
@@ -3071,7 +3072,9 @@ static int st_int_ioctl(struct scsi_tape *STp, unsigned int cmd_in, unsigned lon
cmd_in == MTSETDRVBUFFER ||
cmd_in == SET_DENS_AND_BLK) {
if (cmdstatp->sense_hdr.sense_key == ILLEGAL_REQUEST &&
- !(STp->use_pf & PF_TESTED)) {
+ cmdstatp->sense_hdr.asc == 0x24 &&
+ (STp->device)->scsi_level <= SCSI_2 &&
+ !(STp->use_pf & PF_TESTED)) {
/* Try the other possible state of Page Format if not
already tried */
STp->use_pf = (STp->use_pf ^ USE_PF) | PF_TESTED;
@@ -3623,9 +3626,25 @@ static long st_ioctl(struct file *file, unsigned int cmd_in, unsigned long arg)
retval = (-EIO);
goto out;
}
- reset_state(STp);
+ reset_state(STp); /* Clears pos_unknown */
/* remove this when the midlevel properly clears was_reset */
STp->device->was_reset = 0;
+
+ /* Fix the device settings after reset, ignore errors */
+ if (mtc.mt_op == MTREW || mtc.mt_op == MTSEEK ||
+ mtc.mt_op == MTEOM) {
+ if (STp->can_partitions) {
+ /* STp->new_partition contains the
+ * latest partition set
+ */
+ STp->partition = 0;
+ switch_partition(STp);
+ }
+ if (STp->density_changed)
+ st_int_ioctl(STp, MTSETDENSITY, STp->changed_density);
+ if (STp->blksize_changed)
+ st_int_ioctl(STp, MTSETBLK, STp->changed_blksize);
+ }
}
if (mtc.mt_op != MTNOP && mtc.mt_op != MTSETBLK &&
diff --git a/drivers/scsi/st.h b/drivers/scsi/st.h
index c0ef0d9aaf8a..f6ac5ffe7df6 100644
--- a/drivers/scsi/st.h
+++ b/drivers/scsi/st.h
@@ -166,12 +166,14 @@ struct scsi_tape {
unsigned char compression_changed;
unsigned char drv_buffer;
unsigned char density;
+ unsigned char changed_density;
unsigned char door_locked;
unsigned char autorew_dev; /* auto-rewind device */
unsigned char rew_at_close; /* rewind necessary at close */
unsigned char inited;
unsigned char cleaning_req; /* cleaning requested? */
int block_size;
+ int changed_blksize;
int min_block;
int max_block;
int recover_count; /* From tape opening */
diff --git a/drivers/soc/ti/k3-socinfo.c b/drivers/soc/ti/k3-socinfo.c
index fd91129de6e5..76a4e6eac8b5 100644
--- a/drivers/soc/ti/k3-socinfo.c
+++ b/drivers/soc/ti/k3-socinfo.c
@@ -58,6 +58,12 @@ k3_chipinfo_partno_to_names(unsigned int partno,
return -EINVAL;
}
+static const struct regmap_config k3_chipinfo_regmap_cfg = {
+ .reg_bits = 32,
+ .val_bits = 32,
+ .reg_stride = 4,
+};
+
static int k3_chipinfo_probe(struct platform_device *pdev)
{
struct device_node *node = pdev->dev.of_node;
@@ -65,13 +71,18 @@ static int k3_chipinfo_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct soc_device *soc_dev;
struct regmap *regmap;
+ void __iomem *base;
u32 partno_id;
u32 variant;
u32 jtag_id;
u32 mfg;
int ret;
- regmap = device_node_to_regmap(node);
+ base = devm_platform_ioremap_resource(pdev, 0);
+ if (IS_ERR(base))
+ return PTR_ERR(base);
+
+ regmap = regmap_init_mmio(dev, base, &k3_chipinfo_regmap_cfg);
if (IS_ERR(regmap))
return PTR_ERR(regmap);
diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c
index 0d9201a2999d..eda7ed618369 100644
--- a/drivers/spi/spi-fsl-dspi.c
+++ b/drivers/spi/spi-fsl-dspi.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0+
//
// Copyright 2013 Freescale Semiconductor, Inc.
-// Copyright 2020 NXP
+// Copyright 2020-2025 NXP
//
// Freescale DSPI driver
// This file contains a driver for the Freescale DSPI
@@ -61,6 +61,7 @@
#define SPI_SR_TFIWF BIT(18)
#define SPI_SR_RFDF BIT(17)
#define SPI_SR_CMDFFF BIT(16)
+#define SPI_SR_TXRXS BIT(30)
#define SPI_SR_CLEAR (SPI_SR_TCFQF | \
SPI_SR_TFUF | SPI_SR_TFFF | \
SPI_SR_CMDTCF | SPI_SR_SPEF | \
@@ -907,9 +908,20 @@ static int dspi_transfer_one_message(struct spi_controller *ctlr,
struct spi_device *spi = message->spi;
struct spi_transfer *transfer;
int status = 0;
+ u32 val = 0;
+ bool cs_change = false;
message->actual_length = 0;
+ /* Put DSPI in running mode if halted. */
+ regmap_read(dspi->regmap, SPI_MCR, &val);
+ if (val & SPI_MCR_HALT) {
+ regmap_update_bits(dspi->regmap, SPI_MCR, SPI_MCR_HALT, 0);
+ while (regmap_read(dspi->regmap, SPI_SR, &val) >= 0 &&
+ !(val & SPI_SR_TXRXS))
+ ;
+ }
+
list_for_each_entry(transfer, &message->transfers, transfer_list) {
dspi->cur_transfer = transfer;
dspi->cur_msg = message;
@@ -934,6 +946,7 @@ static int dspi_transfer_one_message(struct spi_controller *ctlr,
dspi->tx_cmd |= SPI_PUSHR_CMD_CONT;
}
+ cs_change = transfer->cs_change;
dspi->tx = transfer->tx_buf;
dspi->rx = transfer->rx_buf;
dspi->len = transfer->len;
@@ -943,6 +956,8 @@ static int dspi_transfer_one_message(struct spi_controller *ctlr,
SPI_MCR_CLR_TXF | SPI_MCR_CLR_RXF,
SPI_MCR_CLR_TXF | SPI_MCR_CLR_RXF);
+ regmap_write(dspi->regmap, SPI_SR, SPI_SR_CLEAR);
+
spi_take_timestamp_pre(dspi->ctlr, dspi->cur_transfer,
dspi->progress, !dspi->irq);
@@ -966,6 +981,15 @@ static int dspi_transfer_one_message(struct spi_controller *ctlr,
spi_transfer_delay_exec(transfer);
}
+ if (status || !cs_change) {
+ /* Put DSPI in stop mode */
+ regmap_update_bits(dspi->regmap, SPI_MCR,
+ SPI_MCR_HALT, SPI_MCR_HALT);
+ while (regmap_read(dspi->regmap, SPI_SR, &val) >= 0 &&
+ val & SPI_SR_TXRXS)
+ ;
+ }
+
message->status = status;
spi_finalize_current_message(ctlr);
@@ -1128,6 +1152,20 @@ static int dspi_resume(struct device *dev)
static SIMPLE_DEV_PM_OPS(dspi_pm, dspi_suspend, dspi_resume);
+static const struct regmap_range dspi_yes_ranges[] = {
+ regmap_reg_range(SPI_MCR, SPI_MCR),
+ regmap_reg_range(SPI_TCR, SPI_CTAR(3)),
+ regmap_reg_range(SPI_SR, SPI_TXFR3),
+ regmap_reg_range(SPI_RXFR0, SPI_RXFR3),
+ regmap_reg_range(SPI_CTARE(0), SPI_CTARE(3)),
+ regmap_reg_range(SPI_SREX, SPI_SREX),
+};
+
+static const struct regmap_access_table dspi_access_table = {
+ .yes_ranges = dspi_yes_ranges,
+ .n_yes_ranges = ARRAY_SIZE(dspi_yes_ranges),
+};
+
static const struct regmap_range dspi_volatile_ranges[] = {
regmap_reg_range(SPI_MCR, SPI_TCR),
regmap_reg_range(SPI_SR, SPI_SR),
@@ -1145,6 +1183,8 @@ static const struct regmap_config dspi_regmap_config = {
.reg_stride = 4,
.max_register = 0x88,
.volatile_table = &dspi_volatile_table,
+ .rd_table = &dspi_access_table,
+ .wr_table = &dspi_access_table,
};
static const struct regmap_range dspi_xspi_volatile_ranges[] = {
@@ -1166,6 +1206,8 @@ static const struct regmap_config dspi_xspi_regmap_config[] = {
.reg_stride = 4,
.max_register = 0x13c,
.volatile_table = &dspi_xspi_volatile_table,
+ .rd_table = &dspi_access_table,
+ .wr_table = &dspi_access_table,
},
{
.name = "pushr",
@@ -1188,6 +1230,8 @@ static int dspi_init(struct fsl_dspi *dspi)
if (!spi_controller_is_slave(dspi->ctlr))
mcr |= SPI_MCR_MASTER;
+ mcr |= SPI_MCR_HALT;
+
regmap_write(dspi->regmap, SPI_MCR, mcr);
regmap_write(dspi->regmap, SPI_SR, SPI_SR_CLEAR);
diff --git a/drivers/spi/spi-sun4i.c b/drivers/spi/spi-sun4i.c
index 1fdfc6e6691d..a8fba310d700 100644
--- a/drivers/spi/spi-sun4i.c
+++ b/drivers/spi/spi-sun4i.c
@@ -263,6 +263,9 @@ static int sun4i_spi_transfer_one(struct spi_master *master,
else
reg |= SUN4I_CTL_DHB;
+ /* Now that the settings are correct, enable the interface */
+ reg |= SUN4I_CTL_ENABLE;
+
sun4i_spi_write(sspi, SUN4I_CTL_REG, reg);
/* Ensure that we have a parent clock fast enough */
@@ -403,7 +406,7 @@ static int sun4i_spi_runtime_resume(struct device *dev)
}
sun4i_spi_write(sspi, SUN4I_CTL_REG,
- SUN4I_CTL_ENABLE | SUN4I_CTL_MASTER | SUN4I_CTL_TP);
+ SUN4I_CTL_MASTER | SUN4I_CTL_TP);
return 0;
diff --git a/drivers/spi/spi-zynqmp-gqspi.c b/drivers/spi/spi-zynqmp-gqspi.c
index 1847e3485dfe..77aef2a26561 100644
--- a/drivers/spi/spi-zynqmp-gqspi.c
+++ b/drivers/spi/spi-zynqmp-gqspi.c
@@ -691,7 +691,6 @@ static void zynqmp_process_dma_irq(struct zynqmp_qspi *xqspi)
static irqreturn_t zynqmp_qspi_irq(int irq, void *dev_id)
{
struct zynqmp_qspi *xqspi = (struct zynqmp_qspi *)dev_id;
- irqreturn_t ret = IRQ_NONE;
u32 status, mask, dma_status = 0;
status = zynqmp_gqspi_read(xqspi, GQSPI_ISR_OFST);
@@ -706,27 +705,24 @@ static irqreturn_t zynqmp_qspi_irq(int irq, void *dev_id)
dma_status);
}
- if (mask & GQSPI_ISR_TXNOT_FULL_MASK) {
+ if (!mask && !dma_status)
+ return IRQ_NONE;
+
+ if (mask & GQSPI_ISR_TXNOT_FULL_MASK)
zynqmp_qspi_filltxfifo(xqspi, GQSPI_TX_FIFO_FILL);
- ret = IRQ_HANDLED;
- }
- if (dma_status & GQSPI_QSPIDMA_DST_I_STS_DONE_MASK) {
+ if (dma_status & GQSPI_QSPIDMA_DST_I_STS_DONE_MASK)
zynqmp_process_dma_irq(xqspi);
- ret = IRQ_HANDLED;
- } else if (!(mask & GQSPI_IER_RXEMPTY_MASK) &&
- (mask & GQSPI_IER_GENFIFOEMPTY_MASK)) {
+ else if (!(mask & GQSPI_IER_RXEMPTY_MASK) &&
+ (mask & GQSPI_IER_GENFIFOEMPTY_MASK))
zynqmp_qspi_readrxfifo(xqspi, GQSPI_RX_FIFO_FILL);
- ret = IRQ_HANDLED;
- }
if (xqspi->bytes_to_receive == 0 && xqspi->bytes_to_transfer == 0 &&
((status & GQSPI_IRQ_MASK) == GQSPI_IRQ_MASK)) {
zynqmp_gqspi_write(xqspi, GQSPI_IDR_OFST, GQSPI_ISR_IDR_MASK);
complete(&xqspi->data_completion);
- ret = IRQ_HANDLED;
}
- return ret;
+ return IRQ_HANDLED;
}
/**
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
index 686a9e5918e2..b07271870132 100644
--- a/drivers/target/iscsi/iscsi_target.c
+++ b/drivers/target/iscsi/iscsi_target.c
@@ -4170,8 +4170,8 @@ int iscsit_close_connection(
spin_unlock(&iscsit_global->ts_bitmap_lock);
iscsit_stop_timers_for_cmds(conn);
- iscsit_stop_nopin_response_timer(conn);
iscsit_stop_nopin_timer(conn);
+ iscsit_stop_nopin_response_timer(conn);
if (conn->conn_transport->iscsit_wait_conn)
conn->conn_transport->iscsit_wait_conn(conn);
diff --git a/drivers/thermal/qoriq_thermal.c b/drivers/thermal/qoriq_thermal.c
index 73049f9bea25..34a5fbcc3d20 100644
--- a/drivers/thermal/qoriq_thermal.c
+++ b/drivers/thermal/qoriq_thermal.c
@@ -19,6 +19,7 @@
#define SITES_MAX 16
#define TMR_DISABLE 0x0
#define TMR_ME 0x80000000
+#define TMR_CMD BIT(29)
#define TMR_ALPF 0x0c000000
#define TMR_ALPF_V2 0x03000000
#define TMTMIR_DEFAULT 0x0000000f
@@ -345,6 +346,12 @@ static int __maybe_unused qoriq_tmu_suspend(struct device *dev)
if (ret)
return ret;
+ if (data->ver > TMU_VER1) {
+ ret = regmap_set_bits(data->regmap, REGS_TMR, TMR_CMD);
+ if (ret)
+ return ret;
+ }
+
clk_disable_unprepare(data->clk);
return 0;
@@ -359,6 +366,12 @@ static int __maybe_unused qoriq_tmu_resume(struct device *dev)
if (ret)
return ret;
+ if (data->ver > TMU_VER1) {
+ ret = regmap_clear_bits(data->regmap, REGS_TMR, TMR_CMD);
+ if (ret)
+ return ret;
+ }
+
/* Enable monitoring */
return regmap_update_bits(data->regmap, REGS_TMR, TMR_ME, TMR_ME);
}
diff --git a/drivers/vfio/pci/vfio_pci_config.c b/drivers/vfio/pci/vfio_pci_config.c
index 63f6308b0f8c..fdff3359849c 100644
--- a/drivers/vfio/pci/vfio_pci_config.c
+++ b/drivers/vfio/pci/vfio_pci_config.c
@@ -1756,7 +1756,8 @@ int vfio_config_init(struct vfio_pci_core_device *vdev)
cpu_to_le16(PCI_COMMAND_MEMORY);
}
- if (!IS_ENABLED(CONFIG_VFIO_PCI_INTX) || vdev->nointx)
+ if (!IS_ENABLED(CONFIG_VFIO_PCI_INTX) || vdev->nointx ||
+ vdev->pdev->irq == IRQ_NOTCONNECTED)
vconfig[PCI_INTERRUPT_PIN] = 0;
ret = vfio_cap_init(vdev);
diff --git a/drivers/vfio/pci/vfio_pci_core.c b/drivers/vfio/pci/vfio_pci_core.c
index f3916e6b16b9..ea4e75be1884 100644
--- a/drivers/vfio/pci/vfio_pci_core.c
+++ b/drivers/vfio/pci/vfio_pci_core.c
@@ -481,15 +481,7 @@ EXPORT_SYMBOL_GPL(vfio_pci_core_finish_enable);
static int vfio_pci_get_irq_count(struct vfio_pci_core_device *vdev, int irq_type)
{
if (irq_type == VFIO_PCI_INTX_IRQ_INDEX) {
- u8 pin;
-
- if (!IS_ENABLED(CONFIG_VFIO_PCI_INTX) ||
- vdev->nointx || vdev->pdev->is_virtfn)
- return 0;
-
- pci_read_config_byte(vdev->pdev, PCI_INTERRUPT_PIN, &pin);
-
- return pin ? 1 : 0;
+ return vdev->vconfig[PCI_INTERRUPT_PIN] ? 1 : 0;
} else if (irq_type == VFIO_PCI_MSI_IRQ_INDEX) {
u8 pos;
u16 flags;
diff --git a/drivers/vfio/pci/vfio_pci_intrs.c b/drivers/vfio/pci/vfio_pci_intrs.c
index f20512c413f7..5ade5b81a0ff 100644
--- a/drivers/vfio/pci/vfio_pci_intrs.c
+++ b/drivers/vfio/pci/vfio_pci_intrs.c
@@ -173,7 +173,7 @@ static int vfio_intx_enable(struct vfio_pci_core_device *vdev,
if (!is_irq_none(vdev))
return -EINVAL;
- if (!pdev->irq)
+ if (!pdev->irq || pdev->irq == IRQ_NOTCONNECTED)
return -ENODEV;
name = kasprintf(GFP_KERNEL, "vfio-intx(%s)", pci_name(pdev));
diff --git a/drivers/video/fbdev/core/bitblit.c b/drivers/video/fbdev/core/bitblit.c
index 8587c9da0670..42e681a78136 100644
--- a/drivers/video/fbdev/core/bitblit.c
+++ b/drivers/video/fbdev/core/bitblit.c
@@ -59,12 +59,11 @@ static void bit_bmove(struct vc_data *vc, struct fb_info *info, int sy,
}
static void bit_clear(struct vc_data *vc, struct fb_info *info, int sy,
- int sx, int height, int width)
+ int sx, int height, int width, int fg, int bg)
{
- int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
struct fb_fillrect region;
- region.color = attr_bgcol_ec(bgshift, vc, info);
+ region.color = bg;
region.dx = sx * vc->vc_font.width;
region.dy = sy * vc->vc_font.height;
region.width = width * vc->vc_font.width;
diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
index b163b54b868e..805a4745abd8 100644
--- a/drivers/video/fbdev/core/fbcon.c
+++ b/drivers/video/fbdev/core/fbcon.c
@@ -1249,7 +1249,7 @@ static void fbcon_clear(struct vc_data *vc, int sy, int sx, int height,
{
struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]];
struct fbcon_ops *ops = info->fbcon_par;
-
+ int fg, bg;
struct fbcon_display *p = &fb_display[vc->vc_num];
u_int y_break;
@@ -1270,16 +1270,18 @@ static void fbcon_clear(struct vc_data *vc, int sy, int sx, int height,
fbcon_clear_margins(vc, 0);
}
+ fg = get_color(vc, info, vc->vc_video_erase_char, 1);
+ bg = get_color(vc, info, vc->vc_video_erase_char, 0);
/* Split blits that cross physical y_wrap boundary */
y_break = p->vrows - p->yscroll;
if (sy < y_break && sy + height - 1 >= y_break) {
u_int b = y_break - sy;
- ops->clear(vc, info, real_y(p, sy), sx, b, width);
+ ops->clear(vc, info, real_y(p, sy), sx, b, width, fg, bg);
ops->clear(vc, info, real_y(p, sy + b), sx, height - b,
- width);
+ width, fg, bg);
} else
- ops->clear(vc, info, real_y(p, sy), sx, height, width);
+ ops->clear(vc, info, real_y(p, sy), sx, height, width, fg, bg);
}
static void fbcon_putcs(struct vc_data *vc, const unsigned short *s,
diff --git a/drivers/video/fbdev/core/fbcon.h b/drivers/video/fbdev/core/fbcon.h
index 0f16cbc99e6a..3e1ec454b8aa 100644
--- a/drivers/video/fbdev/core/fbcon.h
+++ b/drivers/video/fbdev/core/fbcon.h
@@ -57,7 +57,7 @@ struct fbcon_ops {
void (*bmove)(struct vc_data *vc, struct fb_info *info, int sy,
int sx, int dy, int dx, int height, int width);
void (*clear)(struct vc_data *vc, struct fb_info *info, int sy,
- int sx, int height, int width);
+ int sx, int height, int width, int fb, int bg);
void (*putcs)(struct vc_data *vc, struct fb_info *info,
const unsigned short *s, int count, int yy, int xx,
int fg, int bg);
@@ -118,42 +118,6 @@ static inline int mono_col(const struct fb_info *info)
return (~(0xfff << max_len)) & 0xff;
}
-static inline int attr_col_ec(int shift, struct vc_data *vc,
- struct fb_info *info, int is_fg)
-{
- int is_mono01;
- int col;
- int fg;
- int bg;
-
- if (!vc)
- return 0;
-
- if (vc->vc_can_do_color)
- return is_fg ? attr_fgcol(shift,vc->vc_video_erase_char)
- : attr_bgcol(shift,vc->vc_video_erase_char);
-
- if (!info)
- return 0;
-
- col = mono_col(info);
- is_mono01 = info->fix.visual == FB_VISUAL_MONO01;
-
- if (attr_reverse(vc->vc_video_erase_char)) {
- fg = is_mono01 ? col : 0;
- bg = is_mono01 ? 0 : col;
- }
- else {
- fg = is_mono01 ? 0 : col;
- bg = is_mono01 ? col : 0;
- }
-
- return is_fg ? fg : bg;
-}
-
-#define attr_bgcol_ec(bgshift, vc, info) attr_col_ec(bgshift, vc, info, 0)
-#define attr_fgcol_ec(fgshift, vc, info) attr_col_ec(fgshift, vc, info, 1)
-
/*
* Scroll Method
*/
diff --git a/drivers/video/fbdev/core/fbcon_ccw.c b/drivers/video/fbdev/core/fbcon_ccw.c
index 2789ace79634..9f4d65478554 100644
--- a/drivers/video/fbdev/core/fbcon_ccw.c
+++ b/drivers/video/fbdev/core/fbcon_ccw.c
@@ -78,14 +78,13 @@ static void ccw_bmove(struct vc_data *vc, struct fb_info *info, int sy,
}
static void ccw_clear(struct vc_data *vc, struct fb_info *info, int sy,
- int sx, int height, int width)
+ int sx, int height, int width, int fg, int bg)
{
struct fbcon_ops *ops = info->fbcon_par;
struct fb_fillrect region;
- int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
u32 vyres = GETVYRES(ops->p, info);
- region.color = attr_bgcol_ec(bgshift,vc,info);
+ region.color = bg;
region.dx = sy * vc->vc_font.height;
region.dy = vyres - ((sx + width) * vc->vc_font.width);
region.height = width * vc->vc_font.width;
diff --git a/drivers/video/fbdev/core/fbcon_cw.c b/drivers/video/fbdev/core/fbcon_cw.c
index 86a254c1b2b7..b18e31886da1 100644
--- a/drivers/video/fbdev/core/fbcon_cw.c
+++ b/drivers/video/fbdev/core/fbcon_cw.c
@@ -63,14 +63,13 @@ static void cw_bmove(struct vc_data *vc, struct fb_info *info, int sy,
}
static void cw_clear(struct vc_data *vc, struct fb_info *info, int sy,
- int sx, int height, int width)
+ int sx, int height, int width, int fg, int bg)
{
struct fbcon_ops *ops = info->fbcon_par;
struct fb_fillrect region;
- int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
u32 vxres = GETVXRES(ops->p, info);
- region.color = attr_bgcol_ec(bgshift,vc,info);
+ region.color = bg;
region.dx = vxres - ((sy + height) * vc->vc_font.height);
region.dy = sx * vc->vc_font.width;
region.height = width * vc->vc_font.width;
diff --git a/drivers/video/fbdev/core/fbcon_ud.c b/drivers/video/fbdev/core/fbcon_ud.c
index 23bc045769d0..b6b074cfd9dc 100644
--- a/drivers/video/fbdev/core/fbcon_ud.c
+++ b/drivers/video/fbdev/core/fbcon_ud.c
@@ -64,15 +64,14 @@ static void ud_bmove(struct vc_data *vc, struct fb_info *info, int sy,
}
static void ud_clear(struct vc_data *vc, struct fb_info *info, int sy,
- int sx, int height, int width)
+ int sx, int height, int width, int fg, int bg)
{
struct fbcon_ops *ops = info->fbcon_par;
struct fb_fillrect region;
- int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
u32 vyres = GETVYRES(ops->p, info);
u32 vxres = GETVXRES(ops->p, info);
- region.color = attr_bgcol_ec(bgshift,vc,info);
+ region.color = bg;
region.dy = vyres - ((sy + height) * vc->vc_font.height);
region.dx = vxres - ((sx + width) * vc->vc_font.width);
region.width = width * vc->vc_font.width;
diff --git a/drivers/video/fbdev/core/tileblit.c b/drivers/video/fbdev/core/tileblit.c
index 2768eff247ba..b3aa0c6620c7 100644
--- a/drivers/video/fbdev/core/tileblit.c
+++ b/drivers/video/fbdev/core/tileblit.c
@@ -32,16 +32,14 @@ static void tile_bmove(struct vc_data *vc, struct fb_info *info, int sy,
}
static void tile_clear(struct vc_data *vc, struct fb_info *info, int sy,
- int sx, int height, int width)
+ int sx, int height, int width, int fg, int bg)
{
struct fb_tilerect rect;
- int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
- int fgshift = (vc->vc_hi_font_mask) ? 9 : 8;
rect.index = vc->vc_video_erase_char &
((vc->vc_hi_font_mask) ? 0x1ff : 0xff);
- rect.fg = attr_fgcol_ec(fgshift, vc, info);
- rect.bg = attr_bgcol_ec(bgshift, vc, info);
+ rect.fg = fg;
+ rect.bg = bg;
rect.sx = sx;
rect.sy = sy;
rect.width = width;
@@ -76,7 +74,42 @@ static void tile_putcs(struct vc_data *vc, struct fb_info *info,
static void tile_clear_margins(struct vc_data *vc, struct fb_info *info,
int color, int bottom_only)
{
- return;
+ unsigned int cw = vc->vc_font.width;
+ unsigned int ch = vc->vc_font.height;
+ unsigned int rw = info->var.xres - (vc->vc_cols*cw);
+ unsigned int bh = info->var.yres - (vc->vc_rows*ch);
+ unsigned int rs = info->var.xres - rw;
+ unsigned int bs = info->var.yres - bh;
+ unsigned int vwt = info->var.xres_virtual / cw;
+ unsigned int vht = info->var.yres_virtual / ch;
+ struct fb_tilerect rect;
+
+ rect.index = vc->vc_video_erase_char &
+ ((vc->vc_hi_font_mask) ? 0x1ff : 0xff);
+ rect.fg = color;
+ rect.bg = color;
+
+ if ((int) rw > 0 && !bottom_only) {
+ rect.sx = (info->var.xoffset + rs + cw - 1) / cw;
+ rect.sy = 0;
+ rect.width = (rw + cw - 1) / cw;
+ rect.height = vht;
+ if (rect.width + rect.sx > vwt)
+ rect.width = vwt - rect.sx;
+ if (rect.sx < vwt)
+ info->tileops->fb_tilefill(info, &rect);
+ }
+
+ if ((int) bh > 0) {
+ rect.sx = info->var.xoffset / cw;
+ rect.sy = (info->var.yoffset + bs) / ch;
+ rect.width = rs / cw;
+ rect.height = (bh + ch - 1) / ch;
+ if (rect.height + rect.sy > vht)
+ rect.height = vht - rect.sy;
+ if (rect.sy < vht)
+ info->tileops->fb_tilefill(info, &rect);
+ }
}
static void tile_cursor(struct vc_data *vc, struct fb_info *info, int mode,
diff --git a/drivers/video/fbdev/fsl-diu-fb.c b/drivers/video/fbdev/fsl-diu-fb.c
index ce3c5b0b8f4e..53be4ab374cc 100644
--- a/drivers/video/fbdev/fsl-diu-fb.c
+++ b/drivers/video/fbdev/fsl-diu-fb.c
@@ -1829,6 +1829,7 @@ static int fsl_diu_remove(struct platform_device *pdev)
int i;
data = dev_get_drvdata(&pdev->dev);
+ device_remove_file(&pdev->dev, &data->dev_attr);
disable_lcdc(&data->fsl_diu_info[0]);
free_irq(data->irq, data->diu_reg);
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index 067b68168f93..b541d861475e 100644
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -2125,7 +2125,7 @@ bool virtqueue_enable_cb_delayed(struct virtqueue *_vq)
struct vring_virtqueue *vq = to_vvq(_vq);
if (vq->event_triggered)
- vq->event_triggered = false;
+ data_race(vq->event_triggered = false);
return vq->packed_ring ? virtqueue_enable_cb_delayed_packed(_vq) :
virtqueue_enable_cb_delayed_split(_vq);
diff --git a/drivers/xen/platform-pci.c b/drivers/xen/platform-pci.c
index 6ebd819338ec..2c77cac5594b 100644
--- a/drivers/xen/platform-pci.c
+++ b/drivers/xen/platform-pci.c
@@ -26,6 +26,8 @@
#define DRV_NAME "xen-platform-pci"
+#define PCI_DEVICE_ID_XEN_PLATFORM_XS61 0x0002
+
static unsigned long platform_mmio;
static unsigned long platform_mmio_alloc;
static unsigned long platform_mmiolen;
@@ -174,6 +176,8 @@ static int platform_pci_probe(struct pci_dev *pdev,
static const struct pci_device_id platform_pci_tbl[] = {
{PCI_VENDOR_ID_XEN, PCI_DEVICE_ID_XEN_PLATFORM,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+ {PCI_VENDOR_ID_XEN, PCI_DEVICE_ID_XEN_PLATFORM_XS61,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{0,}
};
diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c
index 0392841a822f..65da97be0628 100644
--- a/drivers/xen/swiotlb-xen.c
+++ b/drivers/xen/swiotlb-xen.c
@@ -75,19 +75,21 @@ static inline phys_addr_t xen_dma_to_phys(struct device *dev,
return xen_bus_to_phys(dev, dma_to_phys(dev, dma_addr));
}
+static inline bool range_requires_alignment(phys_addr_t p, size_t size)
+{
+ phys_addr_t algn = 1ULL << (get_order(size) + PAGE_SHIFT);
+ phys_addr_t bus_addr = pfn_to_bfn(XEN_PFN_DOWN(p)) << XEN_PAGE_SHIFT;
+
+ return IS_ALIGNED(p, algn) && !IS_ALIGNED(bus_addr, algn);
+}
+
static inline int range_straddles_page_boundary(phys_addr_t p, size_t size)
{
unsigned long next_bfn, xen_pfn = XEN_PFN_DOWN(p);
unsigned int i, nr_pages = XEN_PFN_UP(xen_offset_in_page(p) + size);
- phys_addr_t algn = 1ULL << (get_order(size) + PAGE_SHIFT);
next_bfn = pfn_to_bfn(xen_pfn);
- /* If buffer is physically aligned, ensure DMA alignment. */
- if (IS_ALIGNED(p, algn) &&
- !IS_ALIGNED((phys_addr_t)next_bfn << XEN_PAGE_SHIFT, algn))
- return 1;
-
for (i = 1; i < nr_pages; i++)
if (pfn_to_bfn(++xen_pfn) != ++next_bfn)
return 1;
@@ -306,7 +308,8 @@ xen_swiotlb_alloc_coherent(struct device *hwdev, size_t size,
phys = dma_to_phys(hwdev, *dma_handle);
dev_addr = xen_phys_to_dma(hwdev, phys);
if (((dev_addr + size - 1 <= dma_mask)) &&
- !range_straddles_page_boundary(phys, size))
+ !range_straddles_page_boundary(phys, size) &&
+ !range_requires_alignment(phys, size))
*dma_handle = dev_addr;
else {
if (xen_create_contiguous_region(phys, order,
@@ -347,6 +350,7 @@ xen_swiotlb_free_coherent(struct device *hwdev, size_t size, void *vaddr,
if (!WARN_ON((dev_addr + size - 1 > dma_mask) ||
range_straddles_page_boundary(phys, size)) &&
+ !range_requires_alignment(phys, size) &&
TestClearPageXenRemapped(page))
xen_destroy_contiguous_region(phys, order);
diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c
index e680bd1adf9c..2068f83556b7 100644
--- a/drivers/xen/xenbus/xenbus_probe.c
+++ b/drivers/xen/xenbus/xenbus_probe.c
@@ -927,9 +927,15 @@ static int __init xenbus_init(void)
if (xen_pv_domain())
xen_store_domain_type = XS_PV;
if (xen_hvm_domain())
+ {
xen_store_domain_type = XS_HVM;
- if (xen_hvm_domain() && xen_initial_domain())
- xen_store_domain_type = XS_LOCAL;
+ err = hvm_get_parameter(HVM_PARAM_STORE_EVTCHN, &v);
+ if (err)
+ goto out_error;
+ xen_store_evtchn = (int)v;
+ if (!v && xen_initial_domain())
+ xen_store_domain_type = XS_LOCAL;
+ }
if (xen_pv_domain() && !xen_start_info->store_evtchn)
xen_store_domain_type = XS_LOCAL;
if (xen_pv_domain() && xen_start_info->store_evtchn)
@@ -948,10 +954,6 @@ static int __init xenbus_init(void)
xen_store_interface = gfn_to_virt(xen_store_gfn);
break;
case XS_HVM:
- err = hvm_get_parameter(HVM_PARAM_STORE_EVTCHN, &v);
- if (err)
- goto out_error;
- xen_store_evtchn = (int)v;
err = hvm_get_parameter(HVM_PARAM_STORE_PFN, &v);
if (err)
goto out_error;
diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c
index 2c5bd2ad69f3..614917cac0e7 100644
--- a/fs/btrfs/block-group.c
+++ b/fs/btrfs/block-group.c
@@ -1543,6 +1543,17 @@ void btrfs_reclaim_bgs_work(struct work_struct *work)
up_write(&space_info->groups_sem);
goto next;
}
+
+ /*
+ * Cache the zone_unusable value before turning the block group
+ * to read only. As soon as the block group is read only it's
+ * zone_unusable value gets moved to the block group's read-only
+ * bytes and isn't available for calculations anymore. We also
+ * cache it before unlocking the block group, to prevent races
+ * (reports from KCSAN and such tools) with tasks updating it.
+ */
+ zone_unusable = bg->zone_unusable;
+
spin_unlock(&bg->lock);
/*
@@ -1558,13 +1569,6 @@ void btrfs_reclaim_bgs_work(struct work_struct *work)
goto next;
}
- /*
- * Cache the zone_unusable value before turning the block group
- * to read only. As soon as the blog group is read only it's
- * zone_unusable value gets moved to the block group's read-only
- * bytes and isn't available for calculations anymore.
- */
- zone_unusable = bg->zone_unusable;
ret = inc_block_group_ro(bg, 0);
up_write(&space_info->groups_sem);
if (ret < 0)
diff --git a/fs/btrfs/discard.c b/fs/btrfs/discard.c
index 7b2f77a8aa98..a90f3cb83c70 100644
--- a/fs/btrfs/discard.c
+++ b/fs/btrfs/discard.c
@@ -152,13 +152,7 @@ static bool remove_from_discard_list(struct btrfs_discard_ctl *discard_ctl,
block_group->discard_eligible_time = 0;
queued = !list_empty(&block_group->discard_list);
list_del_init(&block_group->discard_list);
- /*
- * If the block group is currently running in the discard workfn, we
- * don't want to deref it, since it's still being used by the workfn.
- * The workfn will notice this case and deref the block group when it is
- * finished.
- */
- if (queued && !running)
+ if (queued)
btrfs_put_block_group(block_group);
spin_unlock(&discard_ctl->lock);
@@ -256,9 +250,10 @@ static struct btrfs_block_group *peek_discard_list(
block_group->discard_cursor = block_group->start;
block_group->discard_state = BTRFS_DISCARD_EXTENTS;
}
- discard_ctl->block_group = block_group;
}
if (block_group) {
+ btrfs_get_block_group(block_group);
+ discard_ctl->block_group = block_group;
*discard_state = block_group->discard_state;
*discard_index = block_group->discard_index;
}
@@ -482,9 +477,20 @@ static void btrfs_discard_workfn(struct work_struct *work)
block_group = peek_discard_list(discard_ctl, &discard_state,
&discard_index, now);
- if (!block_group || !btrfs_run_discard_work(discard_ctl))
+ if (!block_group)
return;
+ if (!btrfs_run_discard_work(discard_ctl)) {
+ spin_lock(&discard_ctl->lock);
+ btrfs_put_block_group(block_group);
+ discard_ctl->block_group = NULL;
+ spin_unlock(&discard_ctl->lock);
+ return;
+ }
if (now < block_group->discard_eligible_time) {
+ spin_lock(&discard_ctl->lock);
+ btrfs_put_block_group(block_group);
+ discard_ctl->block_group = NULL;
+ spin_unlock(&discard_ctl->lock);
btrfs_discard_schedule_work(discard_ctl, false);
return;
}
@@ -536,15 +542,7 @@ static void btrfs_discard_workfn(struct work_struct *work)
spin_lock(&discard_ctl->lock);
discard_ctl->prev_discard = trimmed;
discard_ctl->prev_discard_time = now;
- /*
- * If the block group was removed from the discard list while it was
- * running in this workfn, then we didn't deref it, since this function
- * still owned that reference. But we set the discard_ctl->block_group
- * back to NULL, so we can use that condition to know that now we need
- * to deref the block_group.
- */
- if (discard_ctl->block_group == NULL)
- btrfs_put_block_group(block_group);
+ btrfs_put_block_group(block_group);
discard_ctl->block_group = NULL;
__btrfs_discard_schedule_work(discard_ctl, now, false);
spin_unlock(&discard_ctl->lock);
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index a1946d62911c..39619fd6d6aa 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -6024,10 +6024,10 @@ struct extent_buffer *find_extent_buffer(struct btrfs_fs_info *fs_info,
return eb;
}
-#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
struct extent_buffer *alloc_test_extent_buffer(struct btrfs_fs_info *fs_info,
u64 start)
{
+#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
struct extent_buffer *eb, *exists = NULL;
int ret;
@@ -6063,8 +6063,11 @@ struct extent_buffer *alloc_test_extent_buffer(struct btrfs_fs_info *fs_info,
free_eb:
btrfs_release_extent_buffer(eb);
return exists;
-}
+#else
+ /* Stub to avoid linker error when compiled with optimizations turned off. */
+ return NULL;
#endif
+}
static struct extent_buffer *grab_extent_buffer(
struct btrfs_fs_info *fs_info, struct page *page)
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index 577980b33aeb..a46076788bd7 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -400,10 +400,8 @@ static int fs_path_ensure_buf(struct fs_path *p, int len)
if (p->buf_len >= len)
return 0;
- if (len > PATH_MAX) {
- WARN_ON(1);
- return -ENOMEM;
- }
+ if (WARN_ON(len > PATH_MAX))
+ return -ENAMETOOLONG;
path_len = p->end - p->start;
old_buf_len = p->buf_len;
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c
index 1929e80c09ee..6aa3c267f4ca 100644
--- a/fs/cifs/readdir.c
+++ b/fs/cifs/readdir.c
@@ -762,7 +762,10 @@ find_cifs_entry(const unsigned int xid, struct cifs_tcon *tcon, loff_t pos,
else
cifs_buf_release(cfile->srch_inf.
ntwrk_buf_start);
+ /* Reset all pointers to the network buffer to prevent stale references */
cfile->srch_inf.ntwrk_buf_start = NULL;
+ cfile->srch_inf.srch_entries_start = NULL;
+ cfile->srch_inf.last_entry = NULL;
}
rc = initiate_cifs_search(xid, file, full_path);
if (rc) {
@@ -785,11 +788,11 @@ find_cifs_entry(const unsigned int xid, struct cifs_tcon *tcon, loff_t pos,
rc = server->ops->query_dir_next(xid, tcon, &cfile->fid,
search_flags,
&cfile->srch_inf);
+ if (rc)
+ return -ENOENT;
/* FindFirst/Next set last_entry to NULL on malformed reply */
if (cfile->srch_inf.last_entry)
cifs_save_resume_key(cfile->srch_inf.last_entry, cfile);
- if (rc)
- return -ENOENT;
}
if (index_to_find < cfile->srch_inf.index_of_last_entry) {
/* we found the buffer that contains the entry */
diff --git a/fs/coredump.c b/fs/coredump.c
index 26eb5a095832..5e5c1d72d63b 100644
--- a/fs/coredump.c
+++ b/fs/coredump.c
@@ -56,6 +56,13 @@
static bool dump_vma_snapshot(struct coredump_params *cprm);
static void free_vma_snapshot(struct coredump_params *cprm);
+/*
+ * File descriptor number for the pidfd for the thread-group leader of
+ * the coredumping task installed into the usermode helper's file
+ * descriptor table.
+ */
+#define COREDUMP_PIDFD_NUMBER 3
+
int core_uses_pid;
unsigned int core_pipe_limit;
char core_pattern[CORENAME_MAX_SIZE] = "core";
@@ -327,6 +334,27 @@ static int format_corename(struct core_name *cn, struct coredump_params *cprm,
err = cn_printf(cn, "%lu",
rlimit(RLIMIT_CORE));
break;
+ /* pidfd number */
+ case 'F': {
+ /*
+ * Installing a pidfd only makes sense if
+ * we actually spawn a usermode helper.
+ */
+ if (!ispipe)
+ break;
+
+ /*
+ * Note that we'll install a pidfd for the
+ * thread-group leader. We know that task
+ * linkage hasn't been removed yet and even if
+ * this @current isn't the actual thread-group
+ * leader we know that the thread-group leader
+ * cannot be reaped until @current has exited.
+ */
+ cprm->pid = task_tgid(current);
+ err = cn_printf(cn, "%d", COREDUMP_PIDFD_NUMBER);
+ break;
+ }
default:
break;
}
@@ -550,7 +578,7 @@ static void wait_for_dump_helpers(struct file *file)
}
/*
- * umh_pipe_setup
+ * umh_coredump_setup
* helper function to customize the process used
* to collect the core in userspace. Specifically
* it sets up a pipe and installs it as fd 0 (stdin)
@@ -560,21 +588,61 @@ static void wait_for_dump_helpers(struct file *file)
* is a special value that we use to trap recursive
* core dumps
*/
-static int umh_pipe_setup(struct subprocess_info *info, struct cred *new)
+static int umh_coredump_setup(struct subprocess_info *info, struct cred *new)
{
struct file *files[2];
+ struct file *pidfs_file = NULL;
struct coredump_params *cp = (struct coredump_params *)info->data;
- int err = create_pipe_files(files, 0);
+ int err;
+
+ if (cp->pid) {
+ int fd;
+
+ fd = pidfd_prepare(cp->pid, 0, &pidfs_file);
+ if (fd < 0)
+ return fd;
+
+ /*
+ * We don't care about the fd. We also cannot simply
+ * replace it below because dup2() will refuse to close
+ * this file descriptor if its in a larval state. So
+ * close it!
+ */
+ put_unused_fd(fd);
+
+ /*
+ * Usermode helpers are childen of either
+ * system_unbound_wq or of kthreadd. So we know that
+ * we're starting off with a clean file descriptor
+ * table. So we should always be able to use
+ * COREDUMP_PIDFD_NUMBER as our file descriptor value.
+ */
+ err = replace_fd(COREDUMP_PIDFD_NUMBER, pidfs_file, 0);
+ if (err < 0)
+ goto out_fail;
+
+ pidfs_file = NULL;
+ }
+
+ err = create_pipe_files(files, 0);
if (err)
- return err;
+ goto out_fail;
cp->file = files[1];
err = replace_fd(0, files[0], 0);
fput(files[0]);
+ if (err < 0)
+ goto out_fail;
+
/* and disallow core files too */
current->signal->rlim[RLIMIT_CORE] = (struct rlimit){1, 1};
+ err = 0;
+
+out_fail:
+ if (pidfs_file)
+ fput(pidfs_file);
return err;
}
@@ -651,7 +719,7 @@ void do_coredump(const kernel_siginfo_t *siginfo)
}
if (cprm.limit == 1) {
- /* See umh_pipe_setup() which sets RLIMIT_CORE = 1.
+ /* See umh_coredump_setup() which sets RLIMIT_CORE = 1.
*
* Normally core limits are irrelevant to pipes, since
* we're not writing to the file system, but we use
@@ -696,7 +764,7 @@ void do_coredump(const kernel_siginfo_t *siginfo)
retval = -ENOMEM;
sub_info = call_usermodehelper_setup(helper_argv[0],
helper_argv, NULL, GFP_KERNEL,
- umh_pipe_setup, NULL, &cprm);
+ umh_coredump_setup, NULL, &cprm);
if (sub_info)
retval = call_usermodehelper_exec(sub_info,
UMH_WAIT_EXEC);
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index 1eb95ba7e777..5b5342555407 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -1852,8 +1852,8 @@ static int dlm_tcp_listen_validate(void)
{
/* We don't support multi-homed hosts */
if (dlm_local_count > 1) {
- log_print("TCP protocol can't handle multi-homed hosts, try SCTP");
- return -EINVAL;
+ log_print("Detect multi-homed hosts but use only the first IP address.");
+ log_print("Try SCTP, if you want to enable multi-link.");
}
return 0;
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c
index c23ac149601e..d6872b71657b 100644
--- a/fs/ext4/balloc.c
+++ b/fs/ext4/balloc.c
@@ -637,8 +637,8 @@ static int ext4_has_free_clusters(struct ext4_sb_info *sbi,
/* Hm, nope. Are (enough) root reserved clusters available? */
if (uid_eq(sbi->s_resuid, current_fsuid()) ||
(!gid_eq(sbi->s_resgid, GLOBAL_ROOT_GID) && in_group_p(sbi->s_resgid)) ||
- capable(CAP_SYS_RESOURCE) ||
- (flags & EXT4_MB_USE_ROOT_BLOCKS)) {
+ (flags & EXT4_MB_USE_ROOT_BLOCKS) ||
+ capable(CAP_SYS_RESOURCE)) {
if (free_clusters >= (nclusters + dirty_clusters +
resv_clusters))
diff --git a/fs/namespace.c b/fs/namespace.c
index 27ec6d0a68ff..a99a060e8931 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -589,12 +589,8 @@ int __legitimize_mnt(struct vfsmount *bastard, unsigned seq)
smp_mb(); // see mntput_no_expire() and do_umount()
if (likely(!read_seqretry(&mount_lock, seq)))
return 0;
- if (bastard->mnt_flags & MNT_SYNC_UMOUNT) {
- mnt_add_count(mnt, -1);
- return 1;
- }
lock_mount_hash();
- if (unlikely(bastard->mnt_flags & MNT_DOOMED)) {
+ if (unlikely(bastard->mnt_flags & (MNT_SYNC_UMOUNT | MNT_DOOMED))) {
mnt_add_count(mnt, -1);
unlock_mount_hash();
return 1;
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c
index 0c14ff09cfbe..45ef1b6f868b 100644
--- a/fs/nfs/delegation.c
+++ b/fs/nfs/delegation.c
@@ -297,7 +297,8 @@ nfs_start_delegation_return_locked(struct nfs_inode *nfsi)
if (delegation == NULL)
goto out;
spin_lock(&delegation->lock);
- if (!test_and_set_bit(NFS_DELEGATION_RETURNING, &delegation->flags)) {
+ if (delegation->inode &&
+ !test_and_set_bit(NFS_DELEGATION_RETURNING, &delegation->flags)) {
clear_bit(NFS_DELEGATION_RETURN_DELAYED, &delegation->flags);
/* Refcount matched in nfs_end_delegation_return() */
ret = nfs_get_delegation(delegation);
diff --git a/fs/nfs/filelayout/filelayoutdev.c b/fs/nfs/filelayout/filelayoutdev.c
index 86c3f7e69ec4..e6bf55e37521 100644
--- a/fs/nfs/filelayout/filelayoutdev.c
+++ b/fs/nfs/filelayout/filelayoutdev.c
@@ -75,6 +75,7 @@ nfs4_fl_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
struct page *scratch;
struct list_head dsaddrs;
struct nfs4_pnfs_ds_addr *da;
+ struct net *net = server->nfs_client->cl_net;
/* set up xdr stream */
scratch = alloc_page(gfp_flags);
@@ -160,8 +161,7 @@ nfs4_fl_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
mp_count = be32_to_cpup(p); /* multipath count */
for (j = 0; j < mp_count; j++) {
- da = nfs4_decode_mp_ds_addr(server->nfs_client->cl_net,
- &stream, gfp_flags);
+ da = nfs4_decode_mp_ds_addr(net, &stream, gfp_flags);
if (da)
list_add_tail(&da->da_node, &dsaddrs);
}
@@ -171,7 +171,7 @@ nfs4_fl_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
goto out_err_free_deviceid;
}
- dsaddr->ds_list[i] = nfs4_pnfs_ds_add(&dsaddrs, gfp_flags);
+ dsaddr->ds_list[i] = nfs4_pnfs_ds_add(net, &dsaddrs, gfp_flags);
if (!dsaddr->ds_list[i])
goto out_err_drain_dsaddrs;
diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c
index 4fed292de029..a55eec241657 100644
--- a/fs/nfs/flexfilelayout/flexfilelayout.c
+++ b/fs/nfs/flexfilelayout/flexfilelayout.c
@@ -1258,6 +1258,7 @@ static void ff_layout_io_track_ds_error(struct pnfs_layout_segment *lseg,
case -ECONNRESET:
case -EHOSTDOWN:
case -EHOSTUNREACH:
+ case -ENETDOWN:
case -ENETUNREACH:
case -EADDRINUSE:
case -ENOBUFS:
diff --git a/fs/nfs/flexfilelayout/flexfilelayoutdev.c b/fs/nfs/flexfilelayout/flexfilelayoutdev.c
index bfa7202ca7be..4b0cdddce6eb 100644
--- a/fs/nfs/flexfilelayout/flexfilelayoutdev.c
+++ b/fs/nfs/flexfilelayout/flexfilelayoutdev.c
@@ -49,6 +49,7 @@ nfs4_ff_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
struct nfs4_pnfs_ds_addr *da;
struct nfs4_ff_layout_ds *new_ds = NULL;
struct nfs4_ff_ds_version *ds_versions = NULL;
+ struct net *net = server->nfs_client->cl_net;
u32 mp_count;
u32 version_count;
__be32 *p;
@@ -80,8 +81,7 @@ nfs4_ff_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
for (i = 0; i < mp_count; i++) {
/* multipath ds */
- da = nfs4_decode_mp_ds_addr(server->nfs_client->cl_net,
- &stream, gfp_flags);
+ da = nfs4_decode_mp_ds_addr(net, &stream, gfp_flags);
if (da)
list_add_tail(&da->da_node, &dsaddrs);
}
@@ -147,7 +147,7 @@ nfs4_ff_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
new_ds->ds_versions = ds_versions;
new_ds->ds_versions_cnt = version_count;
- new_ds->ds = nfs4_pnfs_ds_add(&dsaddrs, gfp_flags);
+ new_ds->ds = nfs4_pnfs_ds_add(net, &dsaddrs, gfp_flags);
if (!new_ds->ds)
goto out_err_drain_dsaddrs;
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 76e2cdddf95c..b1dec7a9bd72 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -2726,7 +2726,15 @@ static void nfs4_state_manager(struct nfs_client *clp)
pr_warn_ratelimited("NFS: state manager%s%s failed on NFSv4 server %s"
" with error %d\n", section_sep, section,
clp->cl_hostname, -status);
- ssleep(1);
+ switch (status) {
+ case -ENETDOWN:
+ case -ENETUNREACH:
+ nfs_mark_client_ready(clp, -EIO);
+ break;
+ default:
+ ssleep(1);
+ break;
+ }
out_drain:
memalloc_nofs_restore(memflags);
nfs4_end_drain_session(clp);
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
index f331f067691b..dcc01a06d39f 100644
--- a/fs/nfs/pnfs.h
+++ b/fs/nfs/pnfs.h
@@ -59,6 +59,7 @@ struct nfs4_pnfs_ds {
struct list_head ds_node; /* nfs4_pnfs_dev_hlist dev_dslist */
char *ds_remotestr; /* comma sep list of addrs */
struct list_head ds_addrs;
+ const struct net *ds_net;
struct nfs_client *ds_clp;
refcount_t ds_count;
unsigned long ds_state;
@@ -403,7 +404,8 @@ int pnfs_generic_commit_pagelist(struct inode *inode,
int pnfs_generic_scan_commit_lists(struct nfs_commit_info *cinfo, int max);
void pnfs_generic_write_commit_done(struct rpc_task *task, void *data);
void nfs4_pnfs_ds_put(struct nfs4_pnfs_ds *ds);
-struct nfs4_pnfs_ds *nfs4_pnfs_ds_add(struct list_head *dsaddrs,
+struct nfs4_pnfs_ds *nfs4_pnfs_ds_add(const struct net *net,
+ struct list_head *dsaddrs,
gfp_t gfp_flags);
void nfs4_pnfs_v3_ds_connect_unload(void);
int nfs4_pnfs_ds_connect(struct nfs_server *mds_srv, struct nfs4_pnfs_ds *ds,
diff --git a/fs/nfs/pnfs_nfs.c b/fs/nfs/pnfs_nfs.c
index 6b681f0c5df0..29c1c7f80b1d 100644
--- a/fs/nfs/pnfs_nfs.c
+++ b/fs/nfs/pnfs_nfs.c
@@ -651,12 +651,12 @@ _same_data_server_addrs_locked(const struct list_head *dsaddrs1,
* Lookup DS by addresses. nfs4_ds_cache_lock is held
*/
static struct nfs4_pnfs_ds *
-_data_server_lookup_locked(const struct list_head *dsaddrs)
+_data_server_lookup_locked(const struct net *net, const struct list_head *dsaddrs)
{
struct nfs4_pnfs_ds *ds;
list_for_each_entry(ds, &nfs4_data_server_cache, ds_node)
- if (_same_data_server_addrs_locked(&ds->ds_addrs, dsaddrs))
+ if (ds->ds_net == net && _same_data_server_addrs_locked(&ds->ds_addrs, dsaddrs))
return ds;
return NULL;
}
@@ -763,7 +763,7 @@ nfs4_pnfs_remotestr(struct list_head *dsaddrs, gfp_t gfp_flags)
* uncached and return cached struct nfs4_pnfs_ds.
*/
struct nfs4_pnfs_ds *
-nfs4_pnfs_ds_add(struct list_head *dsaddrs, gfp_t gfp_flags)
+nfs4_pnfs_ds_add(const struct net *net, struct list_head *dsaddrs, gfp_t gfp_flags)
{
struct nfs4_pnfs_ds *tmp_ds, *ds = NULL;
char *remotestr;
@@ -781,13 +781,14 @@ nfs4_pnfs_ds_add(struct list_head *dsaddrs, gfp_t gfp_flags)
remotestr = nfs4_pnfs_remotestr(dsaddrs, gfp_flags);
spin_lock(&nfs4_ds_cache_lock);
- tmp_ds = _data_server_lookup_locked(dsaddrs);
+ tmp_ds = _data_server_lookup_locked(net, dsaddrs);
if (tmp_ds == NULL) {
INIT_LIST_HEAD(&ds->ds_addrs);
list_splice_init(dsaddrs, &ds->ds_addrs);
ds->ds_remotestr = remotestr;
refcount_set(&ds->ds_count, 1);
INIT_LIST_HEAD(&ds->ds_node);
+ ds->ds_net = net;
ds->ds_clp = NULL;
list_add(&ds->ds_node, &nfs4_data_server_cache);
dprintk("%s add new data server %s\n", __func__,
diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c
index c1bb4c4b5d67..0cf3dcb76d2f 100644
--- a/fs/orangefs/inode.c
+++ b/fs/orangefs/inode.c
@@ -23,9 +23,9 @@ static int orangefs_writepage_locked(struct page *page,
struct orangefs_write_range *wr = NULL;
struct iov_iter iter;
struct bio_vec bv;
- size_t len, wlen;
+ size_t wlen;
ssize_t ret;
- loff_t off;
+ loff_t len, off;
set_page_writeback(page);
@@ -94,8 +94,7 @@ static int orangefs_writepages_work(struct orangefs_writepages *ow,
struct orangefs_write_range *wrp, wr;
struct iov_iter iter;
ssize_t ret;
- size_t len;
- loff_t off;
+ loff_t len, off;
int i;
len = i_size_read(inode);
diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h
index 1701c2128a5c..1b8dd160c51f 100644
--- a/include/drm/drm_atomic.h
+++ b/include/drm/drm_atomic.h
@@ -353,8 +353,27 @@ struct drm_atomic_state {
*
* Allow full modeset. This is used by the ATOMIC IOCTL handler to
* implement the DRM_MODE_ATOMIC_ALLOW_MODESET flag. Drivers should
- * never consult this flag, instead looking at the output of
- * drm_atomic_crtc_needs_modeset().
+ * generally not consult this flag, but instead look at the output of
+ * drm_atomic_crtc_needs_modeset(). The detailed rules are:
+ *
+ * - Drivers must not consult @allow_modeset in the atomic commit path.
+ * Use drm_atomic_crtc_needs_modeset() instead.
+ *
+ * - Drivers must consult @allow_modeset before adding unrelated struct
+ * drm_crtc_state to this commit by calling
+ * drm_atomic_get_crtc_state(). See also the warning in the
+ * documentation for that function.
+ *
+ * - Drivers must never change this flag, it is under the exclusive
+ * control of userspace.
+ *
+ * - Drivers may consult @allow_modeset in the atomic check path, if
+ * they have the choice between an optimal hardware configuration
+ * which requires a modeset, and a less optimal configuration which
+ * can be committed without a modeset. An example would be suboptimal
+ * scanout FIFO allocation resulting in increased idle power
+ * consumption. This allows userspace to avoid flickering and delays
+ * for the normal composition loop at reasonable cost.
*/
bool allow_modeset : 1;
/**
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h
index f821b7243361..d6282c038dc8 100644
--- a/include/linux/binfmts.h
+++ b/include/linux/binfmts.h
@@ -90,6 +90,7 @@ struct coredump_params {
int vma_count;
size_t vma_data_size;
struct core_vma_metadata *vma_meta;
+ struct pid *pid;
};
/*
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index fe3849434b2a..d7b91f82b0dc 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -595,10 +595,14 @@ static inline int dma_mmap_wc(struct device *dev,
#else
#define DEFINE_DMA_UNMAP_ADDR(ADDR_NAME)
#define DEFINE_DMA_UNMAP_LEN(LEN_NAME)
-#define dma_unmap_addr(PTR, ADDR_NAME) (0)
-#define dma_unmap_addr_set(PTR, ADDR_NAME, VAL) do { } while (0)
-#define dma_unmap_len(PTR, LEN_NAME) (0)
-#define dma_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0)
+#define dma_unmap_addr(PTR, ADDR_NAME) \
+ ({ typeof(PTR) __p __maybe_unused = PTR; 0; })
+#define dma_unmap_addr_set(PTR, ADDR_NAME, VAL) \
+ do { typeof(PTR) __p __maybe_unused = PTR; } while (0)
+#define dma_unmap_len(PTR, LEN_NAME) \
+ ({ typeof(PTR) __p __maybe_unused = PTR; 0; })
+#define dma_unmap_len_set(PTR, LEN_NAME, VAL) \
+ do { typeof(PTR) __p __maybe_unused = PTR; } while (0)
#endif
#endif /* _LINUX_DMA_MAPPING_H */
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index b6fb76568b01..5dfd663b70a2 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -195,6 +195,7 @@ struct inet6_cork {
struct ipv6_txoptions *opt;
u8 hop_limit;
u8 tclass;
+ u8 dontfrag:1;
};
/**
diff --git a/include/linux/lzo.h b/include/linux/lzo.h
index e95c7d1092b2..4d30e3624acd 100644
--- a/include/linux/lzo.h
+++ b/include/linux/lzo.h
@@ -24,10 +24,18 @@
int lzo1x_1_compress(const unsigned char *src, size_t src_len,
unsigned char *dst, size_t *dst_len, void *wrkmem);
+/* Same as above but does not write more than dst_len to dst. */
+int lzo1x_1_compress_safe(const unsigned char *src, size_t src_len,
+ unsigned char *dst, size_t *dst_len, void *wrkmem);
+
/* This requires 'wrkmem' of size LZO1X_1_MEM_COMPRESS */
int lzorle1x_1_compress(const unsigned char *src, size_t src_len,
unsigned char *dst, size_t *dst_len, void *wrkmem);
+/* Same as above but does not write more than dst_len to dst. */
+int lzorle1x_1_compress_safe(const unsigned char *src, size_t src_len,
+ unsigned char *dst, size_t *dst_len, void *wrkmem);
+
/* safe decompression with overrun testing */
int lzo1x_decompress_safe(const unsigned char *src, size_t src_len,
unsigned char *dst, size_t *dst_len);
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h
index 30bb59fe970c..40ebf0502f42 100644
--- a/include/linux/mlx4/device.h
+++ b/include/linux/mlx4/device.h
@@ -1115,7 +1115,7 @@ int mlx4_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt,
int mlx4_buf_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt,
struct mlx4_buf *buf);
-int mlx4_db_alloc(struct mlx4_dev *dev, struct mlx4_db *db, int order);
+int mlx4_db_alloc(struct mlx4_dev *dev, struct mlx4_db *db, unsigned int order);
void mlx4_db_free(struct mlx4_dev *dev, struct mlx4_db *db);
int mlx4_alloc_hwq_res(struct mlx4_dev *dev, struct mlx4_hwq_resources *wqres,
diff --git a/include/linux/pid.h b/include/linux/pid.h
index af308e15f174..f47868537209 100644
--- a/include/linux/pid.h
+++ b/include/linux/pid.h
@@ -79,6 +79,7 @@ struct file;
extern struct pid *pidfd_pid(const struct file *file);
struct pid *pidfd_get_pid(unsigned int fd, unsigned int *flags);
int pidfd_create(struct pid *pid, unsigned int flags);
+int pidfd_prepare(struct pid *pid, unsigned int flags, struct file **ret);
static inline struct pid *get_pid(struct pid *pid)
{
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h
index 53209d669400..3828ff8a2f9c 100644
--- a/include/linux/rcutree.h
+++ b/include/linux/rcutree.h
@@ -66,7 +66,7 @@ extern int rcu_scheduler_active __read_mostly;
void rcu_end_inkernel_boot(void);
bool rcu_inkernel_boot_has_ended(void);
bool rcu_is_watching(void);
-#ifndef CONFIG_PREEMPTION
+#ifndef CONFIG_PREEMPT_RCU
void rcu_all_qs(void);
#endif
diff --git a/include/linux/tpm.h b/include/linux/tpm.h
index 12d827734686..2652de93e97b 100644
--- a/include/linux/tpm.h
+++ b/include/linux/tpm.h
@@ -181,7 +181,7 @@ enum tpm2_const {
enum tpm2_timeouts {
TPM2_TIMEOUT_A = 750,
- TPM2_TIMEOUT_B = 2000,
+ TPM2_TIMEOUT_B = 4000,
TPM2_TIMEOUT_C = 200,
TPM2_TIMEOUT_D = 30,
TPM2_DURATION_SHORT = 20,
diff --git a/include/linux/trace.h b/include/linux/trace.h
index 2a70a447184c..bb4d84f1c58c 100644
--- a/include/linux/trace.h
+++ b/include/linux/trace.h
@@ -72,8 +72,8 @@ static inline int unregister_ftrace_export(struct trace_export *export)
static inline void trace_printk_init_buffers(void)
{
}
-static inline int trace_array_printk(struct trace_array *tr, unsigned long ip,
- const char *fmt, ...)
+static inline __printf(3, 4)
+int trace_array_printk(struct trace_array *tr, unsigned long ip, const char *fmt, ...)
{
return 0;
}
diff --git a/include/linux/trace_seq.h b/include/linux/trace_seq.h
index 5a2c650d9e1c..c230cbd25aee 100644
--- a/include/linux/trace_seq.h
+++ b/include/linux/trace_seq.h
@@ -77,8 +77,8 @@ extern __printf(2, 3)
void trace_seq_printf(struct trace_seq *s, const char *fmt, ...);
extern __printf(2, 0)
void trace_seq_vprintf(struct trace_seq *s, const char *fmt, va_list args);
-extern void
-trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary);
+extern __printf(2, 0)
+void trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary);
extern int trace_print_seq(struct seq_file *m, struct trace_seq *s);
extern int trace_seq_to_user(struct trace_seq *s, char __user *ubuf,
int cnt);
@@ -100,8 +100,8 @@ extern int trace_seq_hex_dump(struct trace_seq *s, const char *prefix_str,
static inline void trace_seq_printf(struct trace_seq *s, const char *fmt, ...)
{
}
-static inline void
-trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary)
+static inline __printf(2, 0)
+void trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary)
{
}
diff --git a/include/linux/usb/r8152.h b/include/linux/usb/r8152.h
index 33a4c146dc19..2ca60828f28b 100644
--- a/include/linux/usb/r8152.h
+++ b/include/linux/usb/r8152.h
@@ -30,6 +30,7 @@
#define VENDOR_ID_NVIDIA 0x0955
#define VENDOR_ID_TPLINK 0x2357
#define VENDOR_ID_DLINK 0x2001
+#define VENDOR_ID_DELL 0x413c
#define VENDOR_ID_ASUS 0x0b05
#if IS_REACHABLE(CONFIG_USB_RTL8152)
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index 9a476f902c42..262b5e5cebc4 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -714,7 +714,9 @@ struct v4l2_subdev_state {
* possible configuration from the remote end, likely calling
* this operation as close as possible to stream on time. The
* operation shall fail if the pad index it has been called on
- * is not valid or in case of unrecoverable failures.
+ * is not valid or in case of unrecoverable failures. The
+ * config argument has been memset to 0 just before calling
+ * the op.
*
* @set_mbus_config: set the media bus configuration of a remote sub-device.
* This operations is intended to allow, in combination with
diff --git a/include/rdma/uverbs_std_types.h b/include/rdma/uverbs_std_types.h
index fe0512116958..555ea3d142a4 100644
--- a/include/rdma/uverbs_std_types.h
+++ b/include/rdma/uverbs_std_types.h
@@ -34,7 +34,7 @@
static inline void *_uobj_get_obj_read(struct ib_uobject *uobj)
{
if (IS_ERR(uobj))
- return NULL;
+ return ERR_CAST(uobj);
return uobj->object;
}
#define uobj_get_obj_read(_object, _type, _id, _attrs) \
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index 5de4bd872fa8..fa2319268924 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -1384,6 +1384,8 @@ int snd_pcm_lib_mmap_iomem(struct snd_pcm_substream *substream, struct vm_area_s
#define snd_pcm_lib_mmap_iomem NULL
#endif
+void snd_pcm_runtime_buffer_set_silence(struct snd_pcm_runtime *runtime);
+
/**
* snd_pcm_limit_isa_dma_size - Get the max size fitting with ISA DMA transfer
* @dma: DMA number
diff --git a/include/trace/events/btrfs.h b/include/trace/events/btrfs.h
index 9271b5dfae4c..a5f77b685c55 100644
--- a/include/trace/events/btrfs.h
+++ b/include/trace/events/btrfs.h
@@ -1788,7 +1788,7 @@ DECLARE_EVENT_CLASS(btrfs__prelim_ref,
TP_PROTO(const struct btrfs_fs_info *fs_info,
const struct prelim_ref *oldref,
const struct prelim_ref *newref, u64 tree_size),
- TP_ARGS(fs_info, newref, oldref, tree_size),
+ TP_ARGS(fs_info, oldref, newref, tree_size),
TP_STRUCT__entry_btrfs(
__field( u64, root_id )
diff --git a/kernel/bpf/hashtab.c b/kernel/bpf/hashtab.c
index d08fe64e0e45..24258c54057d 100644
--- a/kernel/bpf/hashtab.c
+++ b/kernel/bpf/hashtab.c
@@ -2102,7 +2102,7 @@ static int bpf_for_each_hash_elem(struct bpf_map *map, void *callback_fn,
b = &htab->buckets[i];
rcu_read_lock();
head = &b->head;
- hlist_nulls_for_each_entry_rcu(elem, n, head, hash_node) {
+ hlist_nulls_for_each_entry_safe(elem, n, head, hash_node) {
key = elem->key;
if (is_percpu) {
/* current cpu value for percpu map */
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index 1e87257fe469..1a3b2e1436db 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -89,7 +89,7 @@
DEFINE_MUTEX(cgroup_mutex);
DEFINE_SPINLOCK(css_set_lock);
-#ifdef CONFIG_PROVE_RCU
+#if (defined CONFIG_PROVE_RCU || defined CONFIG_LOCKDEP)
EXPORT_SYMBOL_GPL(cgroup_mutex);
EXPORT_SYMBOL_GPL(css_set_lock);
#endif
diff --git a/kernel/fork.c b/kernel/fork.c
index 23ffcf8a859c..22313f31dd8c 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1895,6 +1895,91 @@ const struct file_operations pidfd_fops = {
#endif
};
+/**
+ * __pidfd_prepare - allocate a new pidfd_file and reserve a pidfd
+ * @pid: the struct pid for which to create a pidfd
+ * @flags: flags of the new @pidfd
+ * @pidfd: the pidfd to return
+ *
+ * Allocate a new file that stashes @pid and reserve a new pidfd number in the
+ * caller's file descriptor table. The pidfd is reserved but not installed yet.
+
+ * The helper doesn't perform checks on @pid which makes it useful for pidfds
+ * created via CLONE_PIDFD where @pid has no task attached when the pidfd and
+ * pidfd file are prepared.
+ *
+ * If this function returns successfully the caller is responsible to either
+ * call fd_install() passing the returned pidfd and pidfd file as arguments in
+ * order to install the pidfd into its file descriptor table or they must use
+ * put_unused_fd() and fput() on the returned pidfd and pidfd file
+ * respectively.
+ *
+ * This function is useful when a pidfd must already be reserved but there
+ * might still be points of failure afterwards and the caller wants to ensure
+ * that no pidfd is leaked into its file descriptor table.
+ *
+ * Return: On success, a reserved pidfd is returned from the function and a new
+ * pidfd file is returned in the last argument to the function. On
+ * error, a negative error code is returned from the function and the
+ * last argument remains unchanged.
+ */
+static int __pidfd_prepare(struct pid *pid, unsigned int flags, struct file **ret)
+{
+ int pidfd;
+ struct file *pidfd_file;
+
+ if (flags & ~(O_NONBLOCK | O_RDWR | O_CLOEXEC))
+ return -EINVAL;
+
+ pidfd = get_unused_fd_flags(O_RDWR | O_CLOEXEC);
+ if (pidfd < 0)
+ return pidfd;
+
+ pidfd_file = anon_inode_getfile("[pidfd]", &pidfd_fops, pid,
+ flags | O_RDWR | O_CLOEXEC);
+ if (IS_ERR(pidfd_file)) {
+ put_unused_fd(pidfd);
+ return PTR_ERR(pidfd_file);
+ }
+ get_pid(pid); /* held by pidfd_file now */
+ *ret = pidfd_file;
+ return pidfd;
+}
+
+/**
+ * pidfd_prepare - allocate a new pidfd_file and reserve a pidfd
+ * @pid: the struct pid for which to create a pidfd
+ * @flags: flags of the new @pidfd
+ * @pidfd: the pidfd to return
+ *
+ * Allocate a new file that stashes @pid and reserve a new pidfd number in the
+ * caller's file descriptor table. The pidfd is reserved but not installed yet.
+ *
+ * The helper verifies that @pid is used as a thread group leader.
+ *
+ * If this function returns successfully the caller is responsible to either
+ * call fd_install() passing the returned pidfd and pidfd file as arguments in
+ * order to install the pidfd into its file descriptor table or they must use
+ * put_unused_fd() and fput() on the returned pidfd and pidfd file
+ * respectively.
+ *
+ * This function is useful when a pidfd must already be reserved but there
+ * might still be points of failure afterwards and the caller wants to ensure
+ * that no pidfd is leaked into its file descriptor table.
+ *
+ * Return: On success, a reserved pidfd is returned from the function and a new
+ * pidfd file is returned in the last argument to the function. On
+ * error, a negative error code is returned from the function and the
+ * last argument remains unchanged.
+ */
+int pidfd_prepare(struct pid *pid, unsigned int flags, struct file **ret)
+{
+ if (!pid || !pid_has_task(pid, PIDTYPE_TGID))
+ return -EINVAL;
+
+ return __pidfd_prepare(pid, flags, ret);
+}
+
static void __delayed_free_task(struct rcu_head *rhp)
{
struct task_struct *tsk = container_of(rhp, struct task_struct, rcu);
@@ -2232,21 +2317,12 @@ static __latent_entropy struct task_struct *copy_process(
* if the fd table isn't shared).
*/
if (clone_flags & CLONE_PIDFD) {
- retval = get_unused_fd_flags(O_RDWR | O_CLOEXEC);
+ /* Note that no task has been attached to @pid yet. */
+ retval = __pidfd_prepare(pid, O_RDWR | O_CLOEXEC, &pidfile);
if (retval < 0)
goto bad_fork_free_pid;
-
pidfd = retval;
- pidfile = anon_inode_getfile("[pidfd]", &pidfd_fops, pid,
- O_RDWR | O_CLOEXEC);
- if (IS_ERR(pidfile)) {
- put_unused_fd(pidfd);
- retval = PTR_ERR(pidfile);
- goto bad_fork_free_pid;
- }
- get_pid(pid); /* held by pidfile now */
-
retval = put_user(pidfd, args->pidfd);
if (retval)
goto bad_fork_put_pidfd;
diff --git a/kernel/padata.c b/kernel/padata.c
index db45af7728cb..b443e19e64cf 100644
--- a/kernel/padata.c
+++ b/kernel/padata.c
@@ -350,7 +350,8 @@ static void padata_reorder(struct parallel_data *pd)
* To avoid UAF issue, add pd ref here, and put pd ref after reorder_work finish.
*/
padata_get_pd(pd);
- queue_work(pinst->serial_wq, &pd->reorder_work);
+ if (!queue_work(pinst->serial_wq, &pd->reorder_work))
+ padata_put_pd(pd);
}
}
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index b48b42d76474..9e84d603e882 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -945,13 +945,16 @@ static void rcu_preempt_check_blocked_tasks(struct rcu_node *rnp)
*/
static void rcu_flavor_sched_clock_irq(int user)
{
- if (user || rcu_is_cpu_rrupt_from_idle()) {
+ if (user || rcu_is_cpu_rrupt_from_idle() ||
+ (IS_ENABLED(CONFIG_PREEMPT_COUNT) &&
+ (preempt_count() == HARDIRQ_OFFSET))) {
/*
* Get here if this CPU took its interrupt from user
- * mode or from the idle loop, and if this is not a
- * nested interrupt. In this case, the CPU is in
- * a quiescent state, so note it.
+ * mode, from the idle loop without this being a nested
+ * interrupt, or while not holding the task preempt count
+ * (with PREEMPT_COUNT=y). In this case, the CPU is in a
+ * quiescent state, so note it.
*
* No memory barrier is required here because rcu_qs()
* references only CPU-local variables that other CPUs
diff --git a/kernel/softirq.c b/kernel/softirq.c
index dc60f0c66a25..d63d827da2d6 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -140,6 +140,18 @@ static DEFINE_PER_CPU(struct softirq_ctrl, softirq_ctrl) = {
.lock = INIT_LOCAL_LOCK(softirq_ctrl.lock),
};
+#ifdef CONFIG_DEBUG_LOCK_ALLOC
+static struct lock_class_key bh_lock_key;
+struct lockdep_map bh_lock_map = {
+ .name = "local_bh",
+ .key = &bh_lock_key,
+ .wait_type_outer = LD_WAIT_FREE,
+ .wait_type_inner = LD_WAIT_CONFIG, /* PREEMPT_RT makes BH preemptible. */
+ .lock_type = LD_LOCK_PERCPU,
+};
+EXPORT_SYMBOL_GPL(bh_lock_map);
+#endif
+
/**
* local_bh_blocked() - Check for idle whether BH processing is blocked
*
@@ -162,6 +174,8 @@ void __local_bh_disable_ip(unsigned long ip, unsigned int cnt)
WARN_ON_ONCE(in_hardirq());
+ lock_map_acquire_read(&bh_lock_map);
+
/* First entry of a task into a BH disabled section? */
if (!current->softirq_disable_cnt) {
if (preemptible()) {
@@ -225,6 +239,8 @@ void __local_bh_enable_ip(unsigned long ip, unsigned int cnt)
WARN_ON_ONCE(in_irq());
lockdep_assert_irqs_enabled();
+ lock_map_release(&bh_lock_map);
+
local_irq_save(flags);
curcnt = __this_cpu_read(softirq_ctrl.cnt);
@@ -275,6 +291,8 @@ static inline void ksoftirqd_run_begin(void)
/* Counterpart to ksoftirqd_run_begin() */
static inline void ksoftirqd_run_end(void)
{
+ /* pairs with the lock_map_acquire_read() in ksoftirqd_run_begin() */
+ lock_map_release(&bh_lock_map);
__local_bh_enable(SOFTIRQ_OFFSET, true);
WARN_ON_ONCE(in_interrupt());
local_irq_enable();
diff --git a/kernel/time/posix-timers.c b/kernel/time/posix-timers.c
index 2d6cf93ca370..fc08d4ccdeeb 100644
--- a/kernel/time/posix-timers.c
+++ b/kernel/time/posix-timers.c
@@ -161,6 +161,7 @@ static int posix_timer_add(struct k_itimer *timer)
return id;
}
spin_unlock(&hash_lock);
+ cond_resched();
}
/* POSIX return code when no timer ID could be allocated */
return -EAGAIN;
diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c
index ed7d6ad694fb..20a5e6962b69 100644
--- a/kernel/time/timer_list.c
+++ b/kernel/time/timer_list.c
@@ -46,7 +46,7 @@ static void
print_timer(struct seq_file *m, struct hrtimer *taddr, struct hrtimer *timer,
int idx, u64 now)
{
- SEQ_printf(m, " #%d: <%pK>, %ps", idx, taddr, timer->function);
+ SEQ_printf(m, " #%d: <%p>, %ps", idx, taddr, timer->function);
SEQ_printf(m, ", S:%02x", timer->state);
SEQ_printf(m, "\n");
SEQ_printf(m, " # expires at %Lu-%Lu nsecs [in %Ld to %Ld nsecs]\n",
@@ -98,7 +98,7 @@ print_active_timers(struct seq_file *m, struct hrtimer_clock_base *base,
static void
print_base(struct seq_file *m, struct hrtimer_clock_base *base, u64 now)
{
- SEQ_printf(m, " .base: %pK\n", base);
+ SEQ_printf(m, " .base: %p\n", base);
SEQ_printf(m, " .index: %d\n", base->index);
SEQ_printf(m, " .resolution: %u nsecs\n", hrtimer_resolution);
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index baf2867e6dbe..c4fd5deca4a0 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -3402,10 +3402,9 @@ int trace_vbprintk(unsigned long ip, const char *fmt, va_list args)
}
EXPORT_SYMBOL_GPL(trace_vbprintk);
-__printf(3, 0)
-static int
-__trace_array_vprintk(struct trace_buffer *buffer,
- unsigned long ip, const char *fmt, va_list args)
+static __printf(3, 0)
+int __trace_array_vprintk(struct trace_buffer *buffer,
+ unsigned long ip, const char *fmt, va_list args)
{
struct trace_event_call *call = &event_print;
struct ring_buffer_event *event;
@@ -3458,7 +3457,6 @@ __trace_array_vprintk(struct trace_buffer *buffer,
return len;
}
-__printf(3, 0)
int trace_array_vprintk(struct trace_array *tr,
unsigned long ip, const char *fmt, va_list args)
{
@@ -3485,7 +3483,6 @@ int trace_array_vprintk(struct trace_array *tr,
* Note, trace_array_init_printk() must be called on @tr before this
* can be used.
*/
-__printf(3, 0)
int trace_array_printk(struct trace_array *tr,
unsigned long ip, const char *fmt, ...)
{
@@ -3530,7 +3527,6 @@ int trace_array_init_printk(struct trace_array *tr)
}
EXPORT_SYMBOL_GPL(trace_array_init_printk);
-__printf(3, 4)
int trace_array_printk_buf(struct trace_buffer *buffer,
unsigned long ip, const char *fmt, ...)
{
@@ -3546,7 +3542,6 @@ int trace_array_printk_buf(struct trace_buffer *buffer,
return ret;
}
-__printf(2, 0)
int trace_vprintk(unsigned long ip, const char *fmt, va_list args)
{
return trace_array_vprintk(&global_trace, ip, fmt, args);
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index 449a8bd873cf..49b4353997fa 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -781,13 +781,15 @@ static inline void __init disable_tracing_selftest(const char *reason)
extern void *head_page(struct trace_array_cpu *data);
extern unsigned long long ns2usecs(u64 nsec);
-extern int
-trace_vbprintk(unsigned long ip, const char *fmt, va_list args);
-extern int
-trace_vprintk(unsigned long ip, const char *fmt, va_list args);
-extern int
-trace_array_vprintk(struct trace_array *tr,
- unsigned long ip, const char *fmt, va_list args);
+
+__printf(2, 0)
+int trace_vbprintk(unsigned long ip, const char *fmt, va_list args);
+__printf(2, 0)
+int trace_vprintk(unsigned long ip, const char *fmt, va_list args);
+__printf(3, 0)
+int trace_array_vprintk(struct trace_array *tr,
+ unsigned long ip, const char *fmt, va_list args);
+__printf(3, 4)
int trace_array_printk_buf(struct trace_buffer *buffer,
unsigned long ip, const char *fmt, ...);
void trace_printk_seq(struct trace_seq *s);
diff --git a/lib/dynamic_queue_limits.c b/lib/dynamic_queue_limits.c
index fde0aa244148..a75a9ca46b59 100644
--- a/lib/dynamic_queue_limits.c
+++ b/lib/dynamic_queue_limits.c
@@ -116,7 +116,7 @@ EXPORT_SYMBOL(dql_completed);
void dql_reset(struct dql *dql)
{
/* Reset all dynamic values */
- dql->limit = 0;
+ dql->limit = dql->min_limit;
dql->num_queued = 0;
dql->num_completed = 0;
dql->last_obj_cnt = 0;
diff --git a/lib/lzo/Makefile b/lib/lzo/Makefile
index 2f58fafbbddd..fc7b2b7ef4b2 100644
--- a/lib/lzo/Makefile
+++ b/lib/lzo/Makefile
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-only
-lzo_compress-objs := lzo1x_compress.o
+lzo_compress-objs := lzo1x_compress.o lzo1x_compress_safe.o
lzo_decompress-objs := lzo1x_decompress_safe.o
obj-$(CONFIG_LZO_COMPRESS) += lzo_compress.o
diff --git a/lib/lzo/lzo1x_compress.c b/lib/lzo/lzo1x_compress.c
index 76758e9296ba..469c143f7585 100644
--- a/lib/lzo/lzo1x_compress.c
+++ b/lib/lzo/lzo1x_compress.c
@@ -18,11 +18,22 @@
#include <linux/lzo.h>
#include "lzodefs.h"
-static noinline size_t
-lzo1x_1_do_compress(const unsigned char *in, size_t in_len,
- unsigned char *out, size_t *out_len,
- size_t ti, void *wrkmem, signed char *state_offset,
- const unsigned char bitstream_version)
+#undef LZO_UNSAFE
+
+#ifndef LZO_SAFE
+#define LZO_UNSAFE 1
+#define LZO_SAFE(name) name
+#define HAVE_OP(x) 1
+#endif
+
+#define NEED_OP(x) if (!HAVE_OP(x)) goto output_overrun
+
+static noinline int
+LZO_SAFE(lzo1x_1_do_compress)(const unsigned char *in, size_t in_len,
+ unsigned char **out, unsigned char *op_end,
+ size_t *tp, void *wrkmem,
+ signed char *state_offset,
+ const unsigned char bitstream_version)
{
const unsigned char *ip;
unsigned char *op;
@@ -30,8 +41,9 @@ lzo1x_1_do_compress(const unsigned char *in, size_t in_len,
const unsigned char * const ip_end = in + in_len - 20;
const unsigned char *ii;
lzo_dict_t * const dict = (lzo_dict_t *) wrkmem;
+ size_t ti = *tp;
- op = out;
+ op = *out;
ip = in;
ii = ip;
ip += ti < 4 ? 4 - ti : 0;
@@ -118,25 +130,32 @@ lzo1x_1_do_compress(const unsigned char *in, size_t in_len,
if (t != 0) {
if (t <= 3) {
op[*state_offset] |= t;
+ NEED_OP(4);
COPY4(op, ii);
op += t;
} else if (t <= 16) {
+ NEED_OP(17);
*op++ = (t - 3);
COPY8(op, ii);
COPY8(op + 8, ii + 8);
op += t;
} else {
if (t <= 18) {
+ NEED_OP(1);
*op++ = (t - 3);
} else {
size_t tt = t - 18;
+ NEED_OP(1);
*op++ = 0;
while (unlikely(tt > 255)) {
tt -= 255;
+ NEED_OP(1);
*op++ = 0;
}
+ NEED_OP(1);
*op++ = tt;
}
+ NEED_OP(t);
do {
COPY8(op, ii);
COPY8(op + 8, ii + 8);
@@ -153,6 +172,7 @@ lzo1x_1_do_compress(const unsigned char *in, size_t in_len,
if (unlikely(run_length)) {
ip += run_length;
run_length -= MIN_ZERO_RUN_LENGTH;
+ NEED_OP(4);
put_unaligned_le32((run_length << 21) | 0xfffc18
| (run_length & 0x7), op);
op += 4;
@@ -245,10 +265,12 @@ lzo1x_1_do_compress(const unsigned char *in, size_t in_len,
ip += m_len;
if (m_len <= M2_MAX_LEN && m_off <= M2_MAX_OFFSET) {
m_off -= 1;
+ NEED_OP(2);
*op++ = (((m_len - 1) << 5) | ((m_off & 7) << 2));
*op++ = (m_off >> 3);
} else if (m_off <= M3_MAX_OFFSET) {
m_off -= 1;
+ NEED_OP(1);
if (m_len <= M3_MAX_LEN)
*op++ = (M3_MARKER | (m_len - 2));
else {
@@ -256,14 +278,18 @@ lzo1x_1_do_compress(const unsigned char *in, size_t in_len,
*op++ = M3_MARKER | 0;
while (unlikely(m_len > 255)) {
m_len -= 255;
+ NEED_OP(1);
*op++ = 0;
}
+ NEED_OP(1);
*op++ = (m_len);
}
+ NEED_OP(2);
*op++ = (m_off << 2);
*op++ = (m_off >> 6);
} else {
m_off -= 0x4000;
+ NEED_OP(1);
if (m_len <= M4_MAX_LEN)
*op++ = (M4_MARKER | ((m_off >> 11) & 8)
| (m_len - 2));
@@ -284,11 +310,14 @@ lzo1x_1_do_compress(const unsigned char *in, size_t in_len,
m_len -= M4_MAX_LEN;
*op++ = (M4_MARKER | ((m_off >> 11) & 8));
while (unlikely(m_len > 255)) {
+ NEED_OP(1);
m_len -= 255;
*op++ = 0;
}
+ NEED_OP(1);
*op++ = (m_len);
}
+ NEED_OP(2);
*op++ = (m_off << 2);
*op++ = (m_off >> 6);
}
@@ -297,14 +326,20 @@ lzo1x_1_do_compress(const unsigned char *in, size_t in_len,
ii = ip;
goto next;
}
- *out_len = op - out;
- return in_end - (ii - ti);
+ *out = op;
+ *tp = in_end - (ii - ti);
+ return LZO_E_OK;
+
+output_overrun:
+ return LZO_E_OUTPUT_OVERRUN;
}
-static int lzogeneric1x_1_compress(const unsigned char *in, size_t in_len,
- unsigned char *out, size_t *out_len,
- void *wrkmem, const unsigned char bitstream_version)
+static int LZO_SAFE(lzogeneric1x_1_compress)(
+ const unsigned char *in, size_t in_len,
+ unsigned char *out, size_t *out_len,
+ void *wrkmem, const unsigned char bitstream_version)
{
+ unsigned char * const op_end = out + *out_len;
const unsigned char *ip = in;
unsigned char *op = out;
unsigned char *data_start;
@@ -328,14 +363,18 @@ static int lzogeneric1x_1_compress(const unsigned char *in, size_t in_len,
while (l > 20) {
size_t ll = l <= (m4_max_offset + 1) ? l : (m4_max_offset + 1);
uintptr_t ll_end = (uintptr_t) ip + ll;
+ int err;
+
if ((ll_end + ((t + ll) >> 5)) <= ll_end)
break;
BUILD_BUG_ON(D_SIZE * sizeof(lzo_dict_t) > LZO1X_1_MEM_COMPRESS);
memset(wrkmem, 0, D_SIZE * sizeof(lzo_dict_t));
- t = lzo1x_1_do_compress(ip, ll, op, out_len, t, wrkmem,
- &state_offset, bitstream_version);
+ err = LZO_SAFE(lzo1x_1_do_compress)(
+ ip, ll, &op, op_end, &t, wrkmem,
+ &state_offset, bitstream_version);
+ if (err != LZO_E_OK)
+ return err;
ip += ll;
- op += *out_len;
l -= ll;
}
t += l;
@@ -344,20 +383,26 @@ static int lzogeneric1x_1_compress(const unsigned char *in, size_t in_len,
const unsigned char *ii = in + in_len - t;
if (op == data_start && t <= 238) {
+ NEED_OP(1);
*op++ = (17 + t);
} else if (t <= 3) {
op[state_offset] |= t;
} else if (t <= 18) {
+ NEED_OP(1);
*op++ = (t - 3);
} else {
size_t tt = t - 18;
+ NEED_OP(1);
*op++ = 0;
while (tt > 255) {
tt -= 255;
+ NEED_OP(1);
*op++ = 0;
}
+ NEED_OP(1);
*op++ = tt;
}
+ NEED_OP(t);
if (t >= 16) do {
COPY8(op, ii);
COPY8(op + 8, ii + 8);
@@ -370,31 +415,38 @@ static int lzogeneric1x_1_compress(const unsigned char *in, size_t in_len,
} while (--t > 0);
}
+ NEED_OP(3);
*op++ = M4_MARKER | 1;
*op++ = 0;
*op++ = 0;
*out_len = op - out;
return LZO_E_OK;
+
+output_overrun:
+ return LZO_E_OUTPUT_OVERRUN;
}
-int lzo1x_1_compress(const unsigned char *in, size_t in_len,
- unsigned char *out, size_t *out_len,
- void *wrkmem)
+int LZO_SAFE(lzo1x_1_compress)(const unsigned char *in, size_t in_len,
+ unsigned char *out, size_t *out_len,
+ void *wrkmem)
{
- return lzogeneric1x_1_compress(in, in_len, out, out_len, wrkmem, 0);
+ return LZO_SAFE(lzogeneric1x_1_compress)(
+ in, in_len, out, out_len, wrkmem, 0);
}
-int lzorle1x_1_compress(const unsigned char *in, size_t in_len,
- unsigned char *out, size_t *out_len,
- void *wrkmem)
+int LZO_SAFE(lzorle1x_1_compress)(const unsigned char *in, size_t in_len,
+ unsigned char *out, size_t *out_len,
+ void *wrkmem)
{
- return lzogeneric1x_1_compress(in, in_len, out, out_len,
- wrkmem, LZO_VERSION);
+ return LZO_SAFE(lzogeneric1x_1_compress)(
+ in, in_len, out, out_len, wrkmem, LZO_VERSION);
}
-EXPORT_SYMBOL_GPL(lzo1x_1_compress);
-EXPORT_SYMBOL_GPL(lzorle1x_1_compress);
+EXPORT_SYMBOL_GPL(LZO_SAFE(lzo1x_1_compress));
+EXPORT_SYMBOL_GPL(LZO_SAFE(lzorle1x_1_compress));
+#ifndef LZO_UNSAFE
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("LZO1X-1 Compressor");
+#endif
diff --git a/lib/lzo/lzo1x_compress_safe.c b/lib/lzo/lzo1x_compress_safe.c
new file mode 100644
index 000000000000..371c9f849492
--- /dev/null
+++ b/lib/lzo/lzo1x_compress_safe.c
@@ -0,0 +1,18 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * LZO1X Compressor from LZO
+ *
+ * Copyright (C) 1996-2012 Markus F.X.J. Oberhumer <markus@xxxxxxxxxxxxx>
+ *
+ * The full LZO package can be found at:
+ * http://www.oberhumer.com/opensource/lzo/
+ *
+ * Changed for Linux kernel use by:
+ * Nitin Gupta <nitingupta910@xxxxxxxxx>
+ * Richard Purdie <rpurdie@xxxxxxxxxxxxxx>
+ */
+
+#define LZO_SAFE(name) name##_safe
+#define HAVE_OP(x) ((size_t)(op_end - op) >= (size_t)(x))
+
+#include "lzo1x_compress.c"
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 804f7be74a65..9ee63ebab506 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1194,7 +1194,6 @@ int mem_cgroup_scan_tasks(struct mem_cgroup *memcg,
{
struct mem_cgroup *iter;
int ret = 0;
- int i = 0;
BUG_ON(memcg == root_mem_cgroup);
@@ -1204,10 +1203,9 @@ int mem_cgroup_scan_tasks(struct mem_cgroup *memcg,
css_task_iter_start(&iter->css, CSS_TASK_ITER_PROCS, &it);
while (!ret && (task = css_task_iter_next(&it))) {
- /* Avoid potential softlockup warning */
- if ((++i & 1023) == 0)
- cond_resched();
ret = fn(task, arg);
+ /* Avoid potential softlockup warning */
+ cond_resched();
}
css_task_iter_end(&it);
if (ret) {
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index c177d3ab3bd0..8a1d1c1ca445 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5057,6 +5057,14 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
}
retry:
+ /*
+ * Deal with possible cpuset update races or zonelist updates to avoid
+ * infinite retries.
+ */
+ if (check_retry_cpuset(cpuset_mems_cookie, ac) ||
+ check_retry_zonelist(zonelist_iter_cookie))
+ goto restart;
+
/* Ensure kswapd doesn't accidentally go to sleep as long as we loop */
if (alloc_flags & ALLOC_KSWAPD)
wake_all_kswapds(order, gfp_mask, ac);
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index d34e161a30b3..872a0249f53c 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -1537,7 +1537,8 @@ static void l2cap_request_info(struct l2cap_conn *conn)
sizeof(req), &req);
}
-static bool l2cap_check_enc_key_size(struct hci_conn *hcon)
+static bool l2cap_check_enc_key_size(struct hci_conn *hcon,
+ struct l2cap_chan *chan)
{
/* The minimum encryption key size needs to be enforced by the
* host stack before establishing any L2CAP connections. The
@@ -1551,7 +1552,7 @@ static bool l2cap_check_enc_key_size(struct hci_conn *hcon)
int min_key_size = hcon->hdev->min_enc_key_size;
/* On FIPS security level, key size must be 16 bytes */
- if (hcon->sec_level == BT_SECURITY_FIPS)
+ if (chan->sec_level == BT_SECURITY_FIPS)
min_key_size = 16;
return (!test_bit(HCI_CONN_ENCRYPT, &hcon->flags) ||
@@ -1579,7 +1580,7 @@ static void l2cap_do_start(struct l2cap_chan *chan)
!__l2cap_no_conn_pending(chan))
return;
- if (l2cap_check_enc_key_size(conn->hcon))
+ if (l2cap_check_enc_key_size(conn->hcon, chan))
l2cap_start_connection(chan);
else
__set_chan_timer(chan, L2CAP_DISC_TIMEOUT);
@@ -1661,7 +1662,7 @@ static void l2cap_conn_start(struct l2cap_conn *conn)
continue;
}
- if (l2cap_check_enc_key_size(conn->hcon))
+ if (l2cap_check_enc_key_size(conn->hcon, chan))
l2cap_start_connection(chan);
else
l2cap_chan_close(chan, ECONNREFUSED);
@@ -4163,7 +4164,7 @@ static struct l2cap_chan *l2cap_connect(struct l2cap_conn *conn,
/* Check if the ACL is secure enough (if not SDP) */
if (psm != cpu_to_le16(L2CAP_PSM_SDP) &&
(!hci_conn_check_link_mode(conn->hcon) ||
- !l2cap_check_enc_key_size(conn->hcon))) {
+ !l2cap_check_enc_key_size(conn->hcon, pchan))) {
conn->disc_reason = HCI_ERROR_AUTH_FAILURE;
result = L2CAP_CR_SEC_BLOCK;
goto response;
@@ -8373,7 +8374,7 @@ static void l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt)
}
if (chan->state == BT_CONNECT) {
- if (!status && l2cap_check_enc_key_size(hcon))
+ if (!status && l2cap_check_enc_key_size(hcon, chan))
l2cap_start_connection(chan);
else
__set_chan_timer(chan, L2CAP_DISC_TIMEOUT);
@@ -8383,7 +8384,7 @@ static void l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt)
struct l2cap_conn_rsp rsp;
__u16 res, stat;
- if (!status && l2cap_check_enc_key_size(hcon)) {
+ if (!status && l2cap_check_enc_key_size(hcon, chan)) {
if (test_bit(FLAG_DEFER_SETUP, &chan->flags)) {
res = L2CAP_CR_PEND;
stat = L2CAP_CS_AUTHOR_PEND;
diff --git a/net/bridge/br_nf_core.c b/net/bridge/br_nf_core.c
index 8c69f0c95a8e..b8c8deb87407 100644
--- a/net/bridge/br_nf_core.c
+++ b/net/bridge/br_nf_core.c
@@ -65,17 +65,14 @@ static struct dst_ops fake_dst_ops = {
* ipt_REJECT needs it. Future netfilter modules might
* require us to fill additional fields.
*/
-static const u32 br_dst_default_metrics[RTAX_MAX] = {
- [RTAX_MTU - 1] = 1500,
-};
-
void br_netfilter_rtable_init(struct net_bridge *br)
{
struct rtable *rt = &br->fake_rtable;
atomic_set(&rt->dst.__refcnt, 1);
rt->dst.dev = br->dev;
- dst_init_metrics(&rt->dst, br_dst_default_metrics, true);
+ dst_init_metrics(&rt->dst, br->metrics, false);
+ dst_metric_set(&rt->dst, RTAX_MTU, br->dev->mtu);
rt->dst.flags = DST_NOXFRM | DST_FAKE_RTABLE;
rt->dst.ops = &fake_dst_ops;
}
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
index fe61d3b8d0cc..1718168bd927 100644
--- a/net/bridge/br_private.h
+++ b/net/bridge/br_private.h
@@ -466,6 +466,7 @@ struct net_bridge {
struct rtable fake_rtable;
struct rt6_info fake_rt6_info;
};
+ u32 metrics[RTAX_MAX];
#endif
u16 group_fwd_mask;
u16 group_fwd_mask_required;
diff --git a/net/can/bcm.c b/net/can/bcm.c
index 5a8bcfe9e3f0..e2325f5ba7e5 100644
--- a/net/can/bcm.c
+++ b/net/can/bcm.c
@@ -58,6 +58,7 @@
#include <linux/can/skb.h>
#include <linux/can/bcm.h>
#include <linux/slab.h>
+#include <linux/spinlock.h>
#include <net/sock.h>
#include <net/net_namespace.h>
@@ -120,6 +121,7 @@ struct bcm_op {
struct canfd_frame last_sframe;
struct sock *sk;
struct net_device *rx_reg_dev;
+ spinlock_t bcm_tx_lock; /* protect currframe/count in runtime updates */
};
struct bcm_sock {
@@ -205,7 +207,9 @@ static int bcm_proc_show(struct seq_file *m, void *v)
seq_printf(m, " / bound %s", bcm_proc_getifname(net, ifname, bo->ifindex));
seq_printf(m, " <<<\n");
- list_for_each_entry(op, &bo->rx_ops, list) {
+ rcu_read_lock();
+
+ list_for_each_entry_rcu(op, &bo->rx_ops, list) {
unsigned long reduction;
@@ -261,6 +265,9 @@ static int bcm_proc_show(struct seq_file *m, void *v)
seq_printf(m, "# sent %ld\n", op->frames_abs);
}
seq_putc(m, '\n');
+
+ rcu_read_unlock();
+
return 0;
}
#endif /* CONFIG_PROC_FS */
@@ -273,13 +280,18 @@ static void bcm_can_tx(struct bcm_op *op)
{
struct sk_buff *skb;
struct net_device *dev;
- struct canfd_frame *cf = op->frames + op->cfsiz * op->currframe;
+ struct canfd_frame *cf;
int err;
/* no target device? => exit */
if (!op->ifindex)
return;
+ /* read currframe under lock protection */
+ spin_lock_bh(&op->bcm_tx_lock);
+ cf = op->frames + op->cfsiz * op->currframe;
+ spin_unlock_bh(&op->bcm_tx_lock);
+
dev = dev_get_by_index(sock_net(op->sk), op->ifindex);
if (!dev) {
/* RFC: should this bcm_op remove itself here? */
@@ -300,6 +312,10 @@ static void bcm_can_tx(struct bcm_op *op)
skb->dev = dev;
can_skb_set_owner(skb, op->sk);
err = can_send(skb, 1);
+
+ /* update currframe and count under lock protection */
+ spin_lock_bh(&op->bcm_tx_lock);
+
if (!err)
op->frames_abs++;
@@ -308,6 +324,11 @@ static void bcm_can_tx(struct bcm_op *op)
/* reached last frame? */
if (op->currframe >= op->nframes)
op->currframe = 0;
+
+ if (op->count > 0)
+ op->count--;
+
+ spin_unlock_bh(&op->bcm_tx_lock);
out:
dev_put(dev);
}
@@ -404,7 +425,7 @@ static enum hrtimer_restart bcm_tx_timeout_handler(struct hrtimer *hrtimer)
struct bcm_msg_head msg_head;
if (op->kt_ival1 && (op->count > 0)) {
- op->count--;
+ bcm_can_tx(op);
if (!op->count && (op->flags & TX_COUNTEVT)) {
/* create notification to user */
@@ -419,7 +440,6 @@ static enum hrtimer_restart bcm_tx_timeout_handler(struct hrtimer *hrtimer)
bcm_send_to_user(op, &msg_head, NULL, 0);
}
- bcm_can_tx(op);
} else if (op->kt_ival2) {
bcm_can_tx(op);
@@ -796,7 +816,7 @@ static int bcm_delete_rx_op(struct list_head *ops, struct bcm_msg_head *mh,
REGMASK(op->can_id),
bcm_rx_handler, op);
- list_del(&op->list);
+ list_del_rcu(&op->list);
bcm_remove_op(op);
return 1; /* done */
}
@@ -816,7 +836,7 @@ static int bcm_delete_tx_op(struct list_head *ops, struct bcm_msg_head *mh,
list_for_each_entry_safe(op, n, ops, list) {
if ((op->can_id == mh->can_id) && (op->ifindex == ifindex) &&
(op->flags & CAN_FD_FRAME) == (mh->flags & CAN_FD_FRAME)) {
- list_del(&op->list);
+ list_del_rcu(&op->list);
bcm_remove_op(op);
return 1; /* done */
}
@@ -909,6 +929,27 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
}
op->flags = msg_head->flags;
+ /* only lock for unlikely count/nframes/currframe changes */
+ if (op->nframes != msg_head->nframes ||
+ op->flags & TX_RESET_MULTI_IDX ||
+ op->flags & SETTIMER) {
+
+ spin_lock_bh(&op->bcm_tx_lock);
+
+ if (op->nframes != msg_head->nframes ||
+ op->flags & TX_RESET_MULTI_IDX) {
+ /* potentially update changed nframes */
+ op->nframes = msg_head->nframes;
+ /* restart multiple frame transmission */
+ op->currframe = 0;
+ }
+
+ if (op->flags & SETTIMER)
+ op->count = msg_head->count;
+
+ spin_unlock_bh(&op->bcm_tx_lock);
+ }
+
} else {
/* insert new BCM operation for the given can_id */
@@ -916,9 +957,14 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
if (!op)
return -ENOMEM;
+ spin_lock_init(&op->bcm_tx_lock);
op->can_id = msg_head->can_id;
op->cfsiz = CFSIZ(msg_head->flags);
op->flags = msg_head->flags;
+ op->nframes = msg_head->nframes;
+
+ if (op->flags & SETTIMER)
+ op->count = msg_head->count;
/* create array for CAN frames and copy the data */
if (msg_head->nframes > 1) {
@@ -977,22 +1023,8 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
} /* if ((op = bcm_find_op(&bo->tx_ops, msg_head->can_id, ifindex))) */
- if (op->nframes != msg_head->nframes) {
- op->nframes = msg_head->nframes;
- /* start multiple frame transmission with index 0 */
- op->currframe = 0;
- }
-
- /* check flags */
-
- if (op->flags & TX_RESET_MULTI_IDX) {
- /* start multiple frame transmission with index 0 */
- op->currframe = 0;
- }
-
if (op->flags & SETTIMER) {
/* set timer values */
- op->count = msg_head->count;
op->ival1 = msg_head->ival1;
op->ival2 = msg_head->ival2;
op->kt_ival1 = bcm_timeval_to_ktime(msg_head->ival1);
@@ -1009,11 +1041,8 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
op->flags |= TX_ANNOUNCE;
}
- if (op->flags & TX_ANNOUNCE) {
+ if (op->flags & TX_ANNOUNCE)
bcm_can_tx(op);
- if (op->count)
- op->count--;
- }
if (op->flags & STARTTIMER)
bcm_tx_start_timer(op);
@@ -1229,7 +1258,7 @@ static int bcm_rx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
bcm_rx_handler, op, "bcm", sk);
if (err) {
/* this bcm rx op is broken -> remove it */
- list_del(&op->list);
+ list_del_rcu(&op->list);
bcm_remove_op(op);
return err;
}
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 5d5f03471eb0..2b7b1de70cf4 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -896,6 +896,10 @@ static ssize_t get_labels(const char __user *buffer, struct pktgen_dev *pkt_dev)
pkt_dev->nr_labels = 0;
do {
__u32 tmp;
+
+ if (n >= MAX_MPLS_LABELS)
+ return -E2BIG;
+
len = hex32_arg(&buffer[i], 8, &tmp);
if (len <= 0)
return len;
@@ -907,8 +911,6 @@ static ssize_t get_labels(const char __user *buffer, struct pktgen_dev *pkt_dev)
return -EFAULT;
i++;
n++;
- if (n >= MAX_MPLS_LABELS)
- return -E2BIG;
} while (c == ',');
pkt_dev->nr_labels = n;
@@ -1874,8 +1876,8 @@ static ssize_t pktgen_thread_write(struct file *file,
i = len;
/* Read variable name */
-
- len = strn_len(&user_buffer[i], sizeof(name) - 1);
+ max = min(sizeof(name) - 1, count - i);
+ len = strn_len(&user_buffer[i], max);
if (len < 0)
return len;
@@ -1905,7 +1907,8 @@ static ssize_t pktgen_thread_write(struct file *file,
if (!strcmp(name, "add_device")) {
char f[32];
memset(f, 0, 32);
- len = strn_len(&user_buffer[i], sizeof(f) - 1);
+ max = min(sizeof(f) - 1, count - i);
+ len = strn_len(&user_buffer[i], max);
if (len < 0) {
ret = len;
goto out;
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
index 545dd994f060..ced6bd48bb41 100644
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -817,19 +817,33 @@ static int rtm_to_fib_config(struct net *net, struct sk_buff *skb,
}
}
+ if (cfg->fc_dst_len > 32) {
+ NL_SET_ERR_MSG(extack, "Invalid prefix length");
+ err = -EINVAL;
+ goto errout;
+ }
+
+ if (cfg->fc_dst_len < 32 && (ntohl(cfg->fc_dst) << cfg->fc_dst_len)) {
+ NL_SET_ERR_MSG(extack, "Invalid prefix for given prefix length");
+ err = -EINVAL;
+ goto errout;
+ }
+
if (cfg->fc_nh_id) {
if (cfg->fc_oif || cfg->fc_gw_family ||
cfg->fc_encap || cfg->fc_mp) {
NL_SET_ERR_MSG(extack,
"Nexthop specification and nexthop id are mutually exclusive");
- return -EINVAL;
+ err = -EINVAL;
+ goto errout;
}
}
if (has_gw && has_via) {
NL_SET_ERR_MSG(extack,
"Nexthop configuration can not contain both GATEWAY and VIA");
- return -EINVAL;
+ err = -EINVAL;
+ goto errout;
}
if (!cfg->fc_table)
diff --git a/net/ipv4/fib_rules.c b/net/ipv4/fib_rules.c
index d279cb8ac158..a270951386e1 100644
--- a/net/ipv4/fib_rules.c
+++ b/net/ipv4/fib_rules.c
@@ -226,9 +226,9 @@ static int fib4_rule_configure(struct fib_rule *rule, struct sk_buff *skb,
struct nlattr **tb,
struct netlink_ext_ack *extack)
{
- struct net *net = sock_net(skb->sk);
+ struct fib4_rule *rule4 = (struct fib4_rule *)rule;
+ struct net *net = rule->fr_net;
int err = -EINVAL;
- struct fib4_rule *rule4 = (struct fib4_rule *) rule;
if (frh->tos & ~IPTOS_TOS_MASK) {
NL_SET_ERR_MSG(extack, "Invalid tos");
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
index ec0113ecf394..8ab6ad65d0b8 100644
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -1187,22 +1187,6 @@ static int fib_insert_alias(struct trie *t, struct key_vector *tp,
return 0;
}
-static bool fib_valid_key_len(u32 key, u8 plen, struct netlink_ext_ack *extack)
-{
- if (plen > KEYLENGTH) {
- NL_SET_ERR_MSG(extack, "Invalid prefix length");
- return false;
- }
-
- if ((plen < KEYLENGTH) && (key << plen)) {
- NL_SET_ERR_MSG(extack,
- "Invalid prefix for given prefix length");
- return false;
- }
-
- return true;
-}
-
static void fib_remove_alias(struct trie *t, struct key_vector *tp,
struct key_vector *l, struct fib_alias *old);
@@ -1223,9 +1207,6 @@ int fib_table_insert(struct net *net, struct fib_table *tb,
key = ntohl(cfg->fc_dst);
- if (!fib_valid_key_len(key, plen, extack))
- return -EINVAL;
-
pr_debug("Insert table=%u %08x/%d\n", tb->tb_id, key, plen);
fi = fib_create_info(cfg, extack);
@@ -1715,9 +1696,6 @@ int fib_table_delete(struct net *net, struct fib_table *tb,
key = ntohl(cfg->fc_dst);
- if (!fib_valid_key_len(key, plen, extack))
- return -EINVAL;
-
l = fib_find_node(t, &tp, key);
if (!l)
return -ESRCH;
diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c
index a2ab164e815a..7d2c21c3cfd4 100644
--- a/net/ipv4/inet_hashtables.c
+++ b/net/ipv4/inet_hashtables.c
@@ -879,22 +879,37 @@ int inet_ehash_locks_alloc(struct inet_hashinfo *hashinfo)
{
unsigned int locksz = sizeof(spinlock_t);
unsigned int i, nblocks = 1;
+ spinlock_t *ptr = NULL;
- if (locksz != 0) {
- /* allocate 2 cache lines or at least one spinlock per cpu */
- nblocks = max(2U * L1_CACHE_BYTES / locksz, 1U);
- nblocks = roundup_pow_of_two(nblocks * num_possible_cpus());
+ if (locksz == 0)
+ goto set_mask;
- /* no more locks than number of hash buckets */
- nblocks = min(nblocks, hashinfo->ehash_mask + 1);
+ /* Allocate 2 cache lines or at least one spinlock per cpu. */
+ nblocks = max(2U * L1_CACHE_BYTES / locksz, 1U) * num_possible_cpus();
- hashinfo->ehash_locks = kvmalloc_array(nblocks, locksz, GFP_KERNEL);
- if (!hashinfo->ehash_locks)
- return -ENOMEM;
+ /* At least one page per NUMA node. */
+ nblocks = max(nblocks, num_online_nodes() * PAGE_SIZE / locksz);
+
+ nblocks = roundup_pow_of_two(nblocks);
+
+ /* No more locks than number of hash buckets. */
+ nblocks = min(nblocks, hashinfo->ehash_mask + 1);
- for (i = 0; i < nblocks; i++)
- spin_lock_init(&hashinfo->ehash_locks[i]);
+ if (num_online_nodes() > 1) {
+ /* Use vmalloc() to allow NUMA policy to spread pages
+ * on all available nodes if desired.
+ */
+ ptr = vmalloc_array(nblocks, locksz);
+ }
+ if (!ptr) {
+ ptr = kvmalloc_array(nblocks, locksz, GFP_KERNEL);
+ if (!ptr)
+ return -ENOMEM;
}
+ for (i = 0; i < nblocks; i++)
+ spin_lock_init(&ptr[i]);
+ hashinfo->ehash_locks = ptr;
+set_mask:
hashinfo->ehash_locks_mask = nblocks - 1;
return 0;
}
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 6bd28ac949b4..8859a38b45d5 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -404,6 +404,20 @@ static bool tcp_ecn_rcv_ecn_echo(const struct tcp_sock *tp, const struct tcphdr
return false;
}
+static void tcp_count_delivered_ce(struct tcp_sock *tp, u32 ecn_count)
+{
+ tp->delivered_ce += ecn_count;
+}
+
+/* Updates the delivered and delivered_ce counts */
+static void tcp_count_delivered(struct tcp_sock *tp, u32 delivered,
+ bool ece_ack)
+{
+ tp->delivered += delivered;
+ if (ece_ack)
+ tcp_count_delivered_ce(tp, delivered);
+}
+
/* Buffer size and advertised window tuning.
*
* 1. Tuning sk->sk_sndbuf, when connection enters established state.
@@ -1112,15 +1126,6 @@ void tcp_mark_skb_lost(struct sock *sk, struct sk_buff *skb)
}
}
-/* Updates the delivered and delivered_ce counts */
-static void tcp_count_delivered(struct tcp_sock *tp, u32 delivered,
- bool ece_ack)
-{
- tp->delivered += delivered;
- if (ece_ack)
- tp->delivered_ce += delivered;
-}
-
/* This procedure tags the retransmission queue when SACKs arrive.
*
* We have three tag bits: SACKED(S), RETRANS(R) and LOST(L).
@@ -3776,12 +3781,23 @@ static void tcp_process_tlp_ack(struct sock *sk, u32 ack, int flag)
}
}
-static inline void tcp_in_ack_event(struct sock *sk, u32 flags)
+static void tcp_in_ack_event(struct sock *sk, int flag)
{
const struct inet_connection_sock *icsk = inet_csk(sk);
- if (icsk->icsk_ca_ops->in_ack_event)
- icsk->icsk_ca_ops->in_ack_event(sk, flags);
+ if (icsk->icsk_ca_ops->in_ack_event) {
+ u32 ack_ev_flags = 0;
+
+ if (flag & FLAG_WIN_UPDATE)
+ ack_ev_flags |= CA_ACK_WIN_UPDATE;
+ if (flag & FLAG_SLOWPATH) {
+ ack_ev_flags |= CA_ACK_SLOWPATH;
+ if (flag & FLAG_ECE)
+ ack_ev_flags |= CA_ACK_ECE;
+ }
+
+ icsk->icsk_ca_ops->in_ack_event(sk, ack_ev_flags);
+ }
}
/* Congestion control has updated the cwnd already. So if we're in
@@ -3898,12 +3914,8 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag)
tcp_snd_una_update(tp, ack);
flag |= FLAG_WIN_UPDATE;
- tcp_in_ack_event(sk, CA_ACK_WIN_UPDATE);
-
NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPHPACKS);
} else {
- u32 ack_ev_flags = CA_ACK_SLOWPATH;
-
if (ack_seq != TCP_SKB_CB(skb)->end_seq)
flag |= FLAG_DATA;
else
@@ -3915,19 +3927,12 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag)
flag |= tcp_sacktag_write_queue(sk, skb, prior_snd_una,
&sack_state);
- if (tcp_ecn_rcv_ecn_echo(tp, tcp_hdr(skb))) {
+ if (tcp_ecn_rcv_ecn_echo(tp, tcp_hdr(skb)))
flag |= FLAG_ECE;
- ack_ev_flags |= CA_ACK_ECE;
- }
if (sack_state.sack_delivered)
tcp_count_delivered(tp, sack_state.sack_delivered,
flag & FLAG_ECE);
-
- if (flag & FLAG_WIN_UPDATE)
- ack_ev_flags |= CA_ACK_WIN_UPDATE;
-
- tcp_in_ack_event(sk, ack_ev_flags);
}
/* This is a deviation from RFC3168 since it states that:
@@ -3954,6 +3959,8 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag)
tcp_rack_update_reo_wnd(sk, &rs);
+ tcp_in_ack_event(sk, flag);
+
if (tp->tlp_high_seq)
tcp_process_tlp_ack(sk, ack, flag);
@@ -3985,6 +3992,7 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag)
return 1;
no_queue:
+ tcp_in_ack_event(sk, flag);
/* If data was DSACKed, see if we can undo a cwnd reduction. */
if (flag & FLAG_DSACKING_ACK) {
tcp_fastretrans_alert(sk, prior_snd_una, num_dupack, &flag,
diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c
index a4caaead74c1..a20ef3ab059c 100644
--- a/net/ipv6/fib6_rules.c
+++ b/net/ipv6/fib6_rules.c
@@ -353,9 +353,9 @@ static int fib6_rule_configure(struct fib_rule *rule, struct sk_buff *skb,
struct nlattr **tb,
struct netlink_ext_ack *extack)
{
+ struct fib6_rule *rule6 = (struct fib6_rule *)rule;
+ struct net *net = rule->fr_net;
int err = -EINVAL;
- struct net *net = sock_net(skb->sk);
- struct fib6_rule *rule6 = (struct fib6_rule *) rule;
if (rule->action == FR_ACT_TO_TBL && !rule->l3mdev) {
if (rule->table == RT6_TABLE_UNSPEC) {
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 4fcff4fe5a98..a71b7a106995 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -1428,6 +1428,7 @@ static int ip6_setup_cork(struct sock *sk, struct inet_cork_full *cork,
cork->fl.u.ip6 = *fl6;
v6_cork->hop_limit = ipc6->hlimit;
v6_cork->tclass = ipc6->tclass;
+ v6_cork->dontfrag = ipc6->dontfrag;
if (rt->dst.flags & DST_XFRM_TUNNEL)
mtu = np->pmtudisc >= IPV6_PMTUDISC_PROBE ?
READ_ONCE(rt->dst.dev->mtu) : dst_mtu(&rt->dst);
@@ -1462,7 +1463,7 @@ static int __ip6_append_data(struct sock *sk,
int getfrag(void *from, char *to, int offset,
int len, int odd, struct sk_buff *skb),
void *from, size_t length, int transhdrlen,
- unsigned int flags, struct ipcm6_cookie *ipc6)
+ unsigned int flags)
{
struct sk_buff *skb, *skb_prev = NULL;
unsigned int maxfraglen, fragheaderlen, mtu, orig_mtu, pmtu;
@@ -1519,7 +1520,7 @@ static int __ip6_append_data(struct sock *sk,
if (headersize + transhdrlen > mtu)
goto emsgsize;
- if (cork->length + length > mtu - headersize && ipc6->dontfrag &&
+ if (cork->length + length > mtu - headersize && v6_cork->dontfrag &&
(sk->sk_protocol == IPPROTO_UDP ||
sk->sk_protocol == IPPROTO_RAW)) {
ipv6_local_rxpmtu(sk, fl6, mtu - headersize +
@@ -1836,7 +1837,7 @@ int ip6_append_data(struct sock *sk,
return __ip6_append_data(sk, fl6, &sk->sk_write_queue, &inet->cork.base,
&np->cork, sk_page_frag(sk), getfrag,
- from, length, transhdrlen, flags, ipc6);
+ from, length, transhdrlen, flags);
}
EXPORT_SYMBOL_GPL(ip6_append_data);
@@ -2031,7 +2032,7 @@ struct sk_buff *ip6_make_skb(struct sock *sk,
err = __ip6_append_data(sk, fl6, &queue, &cork->base, &v6_cork,
¤t->task_frag, getfrag, from,
length + exthdrlen, transhdrlen + exthdrlen,
- flags, ipc6);
+ flags);
if (err) {
__ip6_flush_pending_frames(sk, &queue, cork, &v6_cork);
return ERR_PTR(err);
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c
index 70973bf18ee3..0be9dbf38fe7 100644
--- a/net/llc/af_llc.c
+++ b/net/llc/af_llc.c
@@ -886,15 +886,15 @@ static int llc_ui_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
if (sk->sk_type != SOCK_STREAM)
goto copy_uaddr;
+ /* Partial read */
+ if (used + offset < skb_len)
+ continue;
+
if (!(flags & MSG_PEEK)) {
skb_unlink(skb, &sk->sk_receive_queue);
kfree_skb(skb);
*seq = 0;
}
-
- /* Partial read */
- if (used + offset < skb_len)
- continue;
} while (len > 0);
out:
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index b71d3a03032e..ae379bd9dccc 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -2336,7 +2336,8 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
if (tx)
ieee80211_flush_queues(local, sdata, false);
- drv_mgd_complete_tx(sdata->local, sdata, &info);
+ if (tx || frame_buf)
+ drv_mgd_complete_tx(sdata->local, sdata, &info);
/* clear bssid only after building the needed mgmt frames */
eth_zero_addr(ifmgd->bssid);
@@ -5951,7 +5952,6 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
ieee80211_report_disconnect(sdata, frame_buf,
sizeof(frame_buf), true,
req->reason_code, false);
- drv_mgd_complete_tx(sdata->local, sdata, &info);
return 0;
}
diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c
index 7515705583bc..770590041c54 100644
--- a/net/netfilter/nf_conntrack_standalone.c
+++ b/net/netfilter/nf_conntrack_standalone.c
@@ -629,7 +629,9 @@ static struct ctl_table nf_ct_sysctl_table[] = {
.data = &nf_conntrack_max,
.maxlen = sizeof(int),
.mode = 0644,
- .proc_handler = proc_dointvec,
+ .proc_handler = proc_dointvec_minmax,
+ .extra1 = SYSCTL_ZERO,
+ .extra2 = SYSCTL_INT_MAX,
},
[NF_SYSCTL_CT_COUNT] = {
.procname = "nf_conntrack_count",
@@ -665,7 +667,9 @@ static struct ctl_table nf_ct_sysctl_table[] = {
.data = &nf_ct_expect_max,
.maxlen = sizeof(int),
.mode = 0644,
- .proc_handler = proc_dointvec,
+ .proc_handler = proc_dointvec_minmax,
+ .extra1 = SYSCTL_ONE,
+ .extra2 = SYSCTL_INT_MAX,
},
[NF_SYSCTL_CT_ACCT] = {
.procname = "nf_conntrack_acct",
@@ -976,7 +980,9 @@ static struct ctl_table nf_ct_netfilter_table[] = {
.data = &nf_conntrack_max,
.maxlen = sizeof(int),
.mode = 0644,
- .proc_handler = proc_dointvec,
+ .proc_handler = proc_dointvec_minmax,
+ .extra1 = SYSCTL_ZERO,
+ .extra2 = SYSCTL_INT_MAX,
},
{ }
};
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c
index d6c5fc543f65..ca17a5f98a92 100644
--- a/net/sched/sch_hfsc.c
+++ b/net/sched/sch_hfsc.c
@@ -176,6 +176,11 @@ struct hfsc_sched {
#define HT_INFINITY 0xffffffffffffffffULL /* infinite time value */
+static bool cl_in_el_or_vttree(struct hfsc_class *cl)
+{
+ return ((cl->cl_flags & HFSC_FSC) && cl->cl_nactive) ||
+ ((cl->cl_flags & HFSC_RSC) && !RB_EMPTY_NODE(&cl->el_node));
+}
/*
* eligible tree holds backlogged classes being sorted by their eligible times.
@@ -1038,6 +1043,8 @@ hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid,
if (cl == NULL)
return -ENOBUFS;
+ RB_CLEAR_NODE(&cl->el_node);
+
err = tcf_block_get(&cl->block, &cl->filter_list, sch, extack);
if (err) {
kfree(cl);
@@ -1572,7 +1579,10 @@ hfsc_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free)
return err;
}
- if (first && !cl->cl_nactive) {
+ sch->qstats.backlog += len;
+ sch->q.qlen++;
+
+ if (first && !cl_in_el_or_vttree(cl)) {
if (cl->cl_flags & HFSC_RSC)
init_ed(cl, len);
if (cl->cl_flags & HFSC_FSC)
@@ -1587,9 +1597,6 @@ hfsc_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free)
}
- sch->qstats.backlog += len;
- sch->q.qlen++;
-
return NET_XMIT_SUCCESS;
}
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 5de2fc7af268..48ffdd419253 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -275,9 +275,6 @@ static struct rpc_xprt *rpc_clnt_set_transport(struct rpc_clnt *clnt,
old = rcu_dereference_protected(clnt->cl_xprt,
lockdep_is_held(&clnt->cl_lock));
- if (!xprt_bound(xprt))
- clnt->cl_autobind = 1;
-
clnt->cl_timeout = timeout;
rcu_assign_pointer(clnt->cl_xprt, xprt);
spin_unlock(&clnt->cl_lock);
diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c
index 638b14f28101..c49f9295fce9 100644
--- a/net/sunrpc/rpcb_clnt.c
+++ b/net/sunrpc/rpcb_clnt.c
@@ -797,9 +797,10 @@ static void rpcb_getport_done(struct rpc_task *child, void *data)
}
trace_rpcb_setport(child, map->r_status, map->r_port);
- xprt->ops->set_port(xprt, map->r_port);
- if (map->r_port)
+ if (map->r_port) {
+ xprt->ops->set_port(xprt, map->r_port);
xprt_set_bound(xprt);
+ }
}
/*
diff --git a/net/tipc/crypto.c b/net/tipc/crypto.c
index b09c4a17b283..35e0ffa1bd84 100644
--- a/net/tipc/crypto.c
+++ b/net/tipc/crypto.c
@@ -828,12 +828,16 @@ static int tipc_aead_encrypt(struct tipc_aead *aead, struct sk_buff *skb,
goto exit;
}
+ /* Get net to avoid freed tipc_crypto when delete namespace */
+ get_net(aead->crypto->net);
+
/* Now, do encrypt */
rc = crypto_aead_encrypt(req);
if (rc == -EINPROGRESS || rc == -EBUSY)
return rc;
tipc_bearer_put(b);
+ put_net(aead->crypto->net);
exit:
kfree(ctx);
@@ -871,6 +875,7 @@ static void tipc_aead_encrypt_done(struct crypto_async_request *base, int err)
kfree(tx_ctx);
tipc_bearer_put(b);
tipc_aead_put(aead);
+ put_net(net);
}
/**
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index 55ef8e832924..16958656b6d4 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -1594,6 +1594,9 @@ int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl)
struct xfrm_policy *delpol;
struct hlist_head *chain;
+ /* Sanitize mark before store */
+ policy->mark.v &= policy->mark.m;
+
spin_lock_bh(&net->xfrm.xfrm_policy_lock);
chain = policy_hash_bysel(net, &policy->selector, policy->family, dir);
if (chain)
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index ff8159bae7bb..c1bc5d780f64 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -1277,6 +1277,9 @@ static void __xfrm_state_insert(struct xfrm_state *x)
list_add(&x->km.all, &net->xfrm.state_all);
+ /* Sanitize mark before store */
+ x->mark.v &= x->mark.m;
+
h = xfrm_dst_hash(net, &x->id.daddr, &x->props.saddr,
x->props.reqid, x->props.family);
hlist_add_head_rcu(&x->bydst, net->xfrm.state_bydst + h);
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index e2c9ea65df9f..9edf83eb2a99 100644
--- a/samples/bpf/Makefile
+++ b/samples/bpf/Makefile
@@ -438,7 +438,7 @@ $(obj)/%.o: $(src)/%.c
@echo " CLANG-bpf " $@
$(Q)$(CLANG) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(BPF_EXTRA_CFLAGS) \
-I$(obj) -I$(srctree)/tools/testing/selftests/bpf/ \
- -I$(LIBBPF_INCLUDE) \
+ -I$(LIBBPF_INCLUDE) $(CLANG_SYS_INCLUDES) \
-D__KERNEL__ -D__BPF_TRACING__ -Wno-unused-value -Wno-pointer-sign \
-D__TARGET_ARCH_$(SRCARCH) -Wno-compare-distinct-pointer-types \
-Wno-gnu-variable-sized-type-not-at-end \
diff --git a/scripts/config b/scripts/config
index ff88e2faefd3..ea475c07de28 100755
--- a/scripts/config
+++ b/scripts/config
@@ -32,6 +32,7 @@ commands:
Disable option directly after other option
--module-after|-M beforeopt option
Turn option into module directly after other option
+ --refresh Refresh the config using old settings
commands can be repeated multiple times
@@ -124,16 +125,22 @@ undef_var() {
txt_delete "^# $name is not set" "$FN"
}
-if [ "$1" = "--file" ]; then
- FN="$2"
- if [ "$FN" = "" ] ; then
- usage
+FN=.config
+CMDS=()
+while [[ $# -gt 0 ]]; do
+ if [ "$1" = "--file" ]; then
+ if [ "$2" = "" ]; then
+ usage
+ fi
+ FN="$2"
+ shift 2
+ else
+ CMDS+=("$1")
+ shift
fi
- shift 2
-else
- FN=.config
-fi
+done
+set -- "${CMDS[@]}"
if [ "$1" = "" ] ; then
usage
fi
@@ -217,9 +224,8 @@ while [ "$1" != "" ] ; do
set_var "${CONFIG_}$B" "${CONFIG_}$B=m" "${CONFIG_}$A"
;;
- # undocumented because it ignores --file (fixme)
--refresh)
- yes "" | make oldconfig
+ yes "" | make oldconfig KCONFIG_CONFIG=$FN
;;
*)
diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh
index 72da3b8d6f30..151f9938abaa 100755
--- a/scripts/kconfig/merge_config.sh
+++ b/scripts/kconfig/merge_config.sh
@@ -105,8 +105,8 @@ INITFILE=$1
shift;
if [ ! -r "$INITFILE" ]; then
- echo "The base file '$INITFILE' does not exist. Exit." >&2
- exit 1
+ echo "The base file '$INITFILE' does not exist. Creating one..." >&2
+ touch "$INITFILE"
fi
MERGE_LIST=$*
diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c
index f6961a889529..0feaa29cc024 100644
--- a/security/smack/smackfs.c
+++ b/security/smack/smackfs.c
@@ -921,6 +921,10 @@ static ssize_t smk_set_cipso(struct file *file, const char __user *buf,
if (rc >= 0) {
old_cat = skp->smk_netlabel.attr.mls.cat;
rcu_assign_pointer(skp->smk_netlabel.attr.mls.cat, ncats.attr.mls.cat);
+ if (ncats.attr.mls.cat)
+ skp->smk_netlabel.flags |= NETLBL_SECATTR_MLS_CAT;
+ else
+ skp->smk_netlabel.flags &= ~(u32)NETLBL_SECATTR_MLS_CAT;
skp->smk_netlabel.attr.mls.lvl = ncats.attr.mls.lvl;
synchronize_rcu();
netlbl_catmap_free(old_cat);
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c
index 8a458c167452..a2b9d1f0b072 100644
--- a/sound/core/oss/pcm_oss.c
+++ b/sound/core/oss/pcm_oss.c
@@ -1079,8 +1079,7 @@ static int snd_pcm_oss_change_params_locked(struct snd_pcm_substream *substream)
runtime->oss.params = 0;
runtime->oss.prepare = 1;
runtime->oss.buffer_used = 0;
- if (runtime->dma_area)
- snd_pcm_format_set_silence(runtime->format, runtime->dma_area, bytes_to_samples(runtime, runtime->dma_bytes));
+ snd_pcm_runtime_buffer_set_silence(runtime);
runtime->oss.period_frames = snd_pcm_alsa_frames(substream, oss_period_size);
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 56b4a25fc6f0..d6169fee5ea0 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -703,6 +703,17 @@ static void snd_pcm_buffer_access_unlock(struct snd_pcm_runtime *runtime)
atomic_inc(&runtime->buffer_accessing);
}
+/* fill the PCM buffer with the current silence format; called from pcm_oss.c */
+void snd_pcm_runtime_buffer_set_silence(struct snd_pcm_runtime *runtime)
+{
+ snd_pcm_buffer_access_lock(runtime);
+ if (runtime->dma_area)
+ snd_pcm_format_set_silence(runtime->format, runtime->dma_area,
+ bytes_to_samples(runtime, runtime->dma_bytes));
+ snd_pcm_buffer_access_unlock(runtime);
+}
+EXPORT_SYMBOL_GPL(snd_pcm_runtime_buffer_set_silence);
+
#if IS_ENABLED(CONFIG_SND_PCM_OSS)
#define is_oss_stream(substream) ((substream)->oss.oss)
#else
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index e1de24c9f626..7a8ac8d3d217 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -6758,6 +6758,41 @@ static void alc285_fixup_hp_spectre_x360_eb1(struct hda_codec *codec,
}
}
+/* GPIO1 = amplifier on/off */
+static void alc285_fixup_hp_spectre_x360_df1(struct hda_codec *codec,
+ const struct hda_fixup *fix,
+ int action)
+{
+ struct alc_spec *spec = codec->spec;
+ static const hda_nid_t conn[] = { 0x02 };
+ static const struct hda_pintbl pincfgs[] = {
+ { 0x14, 0x90170110 }, /* front/high speakers */
+ { 0x17, 0x90170130 }, /* back/bass speakers */
+ { }
+ };
+
+ // enable mute led
+ alc285_fixup_hp_mute_led_coefbit(codec, fix, action);
+
+ switch (action) {
+ case HDA_FIXUP_ACT_PRE_PROBE:
+ /* needed for amp of back speakers */
+ spec->gpio_mask |= 0x01;
+ spec->gpio_dir |= 0x01;
+ snd_hda_apply_pincfgs(codec, pincfgs);
+ /* share DAC to have unified volume control */
+ snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn), conn);
+ snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
+ break;
+ case HDA_FIXUP_ACT_INIT:
+ /* need to toggle GPIO to enable the amp of back speakers */
+ alc_update_gpio_data(codec, 0x01, true);
+ msleep(100);
+ alc_update_gpio_data(codec, 0x01, false);
+ break;
+ }
+}
+
static void alc285_fixup_hp_spectre_x360(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{
@@ -7040,6 +7075,7 @@ enum {
ALC280_FIXUP_HP_9480M,
ALC245_FIXUP_HP_X360_AMP,
ALC285_FIXUP_HP_SPECTRE_X360_EB1,
+ ALC285_FIXUP_HP_SPECTRE_X360_DF1,
ALC285_FIXUP_HP_ENVY_X360,
ALC288_FIXUP_DELL_HEADSET_MODE,
ALC288_FIXUP_DELL1_MIC_NO_PRESENCE,
@@ -8881,6 +8917,10 @@ static const struct hda_fixup alc269_fixups[] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc285_fixup_hp_spectre_x360_eb1
},
+ [ALC285_FIXUP_HP_SPECTRE_X360_DF1] = {
+ .type = HDA_FIXUP_FUNC,
+ .v.func = alc285_fixup_hp_spectre_x360_df1
+ },
[ALC285_FIXUP_HP_ENVY_X360] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc285_fixup_hp_envy_x360,
@@ -9286,6 +9326,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x86c1, "HP Laptop 15-da3001TU", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
SND_PCI_QUIRK(0x103c, 0x86c7, "HP Envy AiO 32", ALC274_FIXUP_HP_ENVY_GPIO),
SND_PCI_QUIRK(0x103c, 0x86e7, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
+ SND_PCI_QUIRK(0x103c, 0x863e, "HP Spectre x360 15-df1xxx", ALC285_FIXUP_HP_SPECTRE_X360_DF1),
SND_PCI_QUIRK(0x103c, 0x86e8, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
SND_PCI_QUIRK(0x103c, 0x86f9, "HP Spectre x360 13-aw0xxx", ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED),
SND_PCI_QUIRK(0x103c, 0x8716, "HP Elite Dragonfly G2 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
@@ -9832,6 +9873,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
{.id = ALC295_FIXUP_HP_OMEN, .name = "alc295-hp-omen"},
{.id = ALC285_FIXUP_HP_SPECTRE_X360, .name = "alc285-hp-spectre-x360"},
{.id = ALC285_FIXUP_HP_SPECTRE_X360_EB1, .name = "alc285-hp-spectre-x360-eb1"},
+ {.id = ALC285_FIXUP_HP_SPECTRE_X360_DF1, .name = "alc285-hp-spectre-x360-df1"},
{.id = ALC285_FIXUP_HP_ENVY_X360, .name = "alc285-hp-envy-x360"},
{.id = ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP, .name = "alc287-ideapad-bass-spk-amp"},
{.id = ALC623_FIXUP_LENOVO_THINKSTATION_P340, .name = "alc623-lenovo-thinkstation-p340"},
diff --git a/sound/soc/codecs/mt6359-accdet.h b/sound/soc/codecs/mt6359-accdet.h
index c234f2f4276a..78ada3a5bfae 100644
--- a/sound/soc/codecs/mt6359-accdet.h
+++ b/sound/soc/codecs/mt6359-accdet.h
@@ -123,6 +123,15 @@ struct mt6359_accdet {
struct workqueue_struct *jd_workqueue;
};
+#if IS_ENABLED(CONFIG_SND_SOC_MT6359_ACCDET)
int mt6359_accdet_enable_jack_detect(struct snd_soc_component *component,
struct snd_soc_jack *jack);
+#else
+static inline int
+mt6359_accdet_enable_jack_detect(struct snd_soc_component *component,
+ struct snd_soc_jack *jack)
+{
+ return -EOPNOTSUPP;
+}
+#endif
#endif
diff --git a/sound/soc/codecs/tas2764.c b/sound/soc/codecs/tas2764.c
index 273bf4027a6e..559a160e1f4d 100644
--- a/sound/soc/codecs/tas2764.c
+++ b/sound/soc/codecs/tas2764.c
@@ -130,33 +130,6 @@ static SOC_ENUM_SINGLE_DECL(
static const struct snd_kcontrol_new tas2764_asi1_mux =
SOC_DAPM_ENUM("ASI1 Source", tas2764_ASI1_src_enum);
-static int tas2764_dac_event(struct snd_soc_dapm_widget *w,
- struct snd_kcontrol *kcontrol, int event)
-{
- struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
- struct tas2764_priv *tas2764 = snd_soc_component_get_drvdata(component);
- int ret;
-
- switch (event) {
- case SND_SOC_DAPM_POST_PMU:
- tas2764->dac_powered = true;
- ret = tas2764_update_pwr_ctrl(tas2764);
- break;
- case SND_SOC_DAPM_PRE_PMD:
- tas2764->dac_powered = false;
- ret = tas2764_update_pwr_ctrl(tas2764);
- break;
- default:
- dev_err(tas2764->dev, "Unsupported event\n");
- return -EINVAL;
- }
-
- if (ret < 0)
- return ret;
-
- return 0;
-}
-
static const struct snd_kcontrol_new isense_switch =
SOC_DAPM_SINGLE("Switch", TAS2764_PWR_CTRL, TAS2764_ISENSE_POWER_EN, 1, 1);
static const struct snd_kcontrol_new vsense_switch =
@@ -169,8 +142,7 @@ static const struct snd_soc_dapm_widget tas2764_dapm_widgets[] = {
1, &isense_switch),
SND_SOC_DAPM_SWITCH("VSENSE", TAS2764_PWR_CTRL, TAS2764_VSENSE_POWER_EN,
1, &vsense_switch),
- SND_SOC_DAPM_DAC_E("DAC", NULL, SND_SOC_NOPM, 0, 0, tas2764_dac_event,
- SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD),
+ SND_SOC_DAPM_DAC("DAC", NULL, SND_SOC_NOPM, 0, 0),
SND_SOC_DAPM_OUTPUT("OUT"),
SND_SOC_DAPM_SIGGEN("VMON"),
SND_SOC_DAPM_SIGGEN("IMON")
@@ -191,9 +163,28 @@ static int tas2764_mute(struct snd_soc_dai *dai, int mute, int direction)
{
struct tas2764_priv *tas2764 =
snd_soc_component_get_drvdata(dai->component);
+ int ret;
+
+ if (!mute) {
+ tas2764->dac_powered = true;
+ ret = tas2764_update_pwr_ctrl(tas2764);
+ if (ret)
+ return ret;
+ }
tas2764->unmuted = !mute;
- return tas2764_update_pwr_ctrl(tas2764);
+ ret = tas2764_update_pwr_ctrl(tas2764);
+ if (ret)
+ return ret;
+
+ if (mute) {
+ tas2764->dac_powered = false;
+ ret = tas2764_update_pwr_ctrl(tas2764);
+ if (ret)
+ return ret;
+ }
+
+ return 0;
}
static int tas2764_set_bitwidth(struct tas2764_priv *tas2764, int bitwidth)
diff --git a/sound/soc/fsl/imx-card.c b/sound/soc/fsl/imx-card.c
index 2b64c0384b6b..9b14cda56b06 100644
--- a/sound/soc/fsl/imx-card.c
+++ b/sound/soc/fsl/imx-card.c
@@ -517,7 +517,7 @@ static int imx_card_parse_of(struct imx_card_data *data)
if (!card->dai_link)
return -ENOMEM;
- data->link_data = devm_kcalloc(dev, num_links, sizeof(*link), GFP_KERNEL);
+ data->link_data = devm_kcalloc(dev, num_links, sizeof(*link_data), GFP_KERNEL);
if (!data->link_data)
return -ENOMEM;
diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c
index 721b9971fd74..4954e8c494c6 100644
--- a/sound/soc/intel/boards/bytcr_rt5640.c
+++ b/sound/soc/intel/boards/bytcr_rt5640.c
@@ -573,6 +573,19 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = {
BYT_RT5640_SSP0_AIF2 |
BYT_RT5640_MCLK_EN),
},
+ { /* Acer Aspire SW3-013 */
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Aspire SW3-013"),
+ },
+ .driver_data = (void *)(BYT_RT5640_DMIC1_MAP |
+ BYT_RT5640_JD_SRC_JD2_IN4N |
+ BYT_RT5640_OVCD_TH_2000UA |
+ BYT_RT5640_OVCD_SF_0P75 |
+ BYT_RT5640_DIFF_MIC |
+ BYT_RT5640_SSP0_AIF1 |
+ BYT_RT5640_MCLK_EN),
+ },
{
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
diff --git a/sound/soc/qcom/sm8250.c b/sound/soc/qcom/sm8250.c
index a38a741ace37..34a6349754fb 100644
--- a/sound/soc/qcom/sm8250.c
+++ b/sound/soc/qcom/sm8250.c
@@ -7,6 +7,7 @@
#include <sound/soc.h>
#include <sound/soc-dapm.h>
#include <sound/pcm.h>
+#include <sound/pcm_params.h>
#include <linux/soundwire/sdw.h>
#include "qdsp6/q6afe.h"
#include "common.h"
@@ -27,9 +28,11 @@ static int sm8250_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
SNDRV_PCM_HW_PARAM_RATE);
struct snd_interval *channels = hw_param_interval(params,
SNDRV_PCM_HW_PARAM_CHANNELS);
+ struct snd_mask *fmt = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
rate->min = rate->max = 48000;
channels->min = channels->max = 2;
+ snd_mask_set_format(fmt, SNDRV_PCM_FORMAT_S16_LE);
return 0;
}
diff --git a/sound/soc/soc-dai.c b/sound/soc/soc-dai.c
index 3db0fcf24385..05a9404544de 100644
--- a/sound/soc/soc-dai.c
+++ b/sound/soc/soc-dai.c
@@ -271,10 +271,11 @@ int snd_soc_dai_set_tdm_slot(struct snd_soc_dai *dai,
if (dai->driver->ops &&
dai->driver->ops->xlate_tdm_slot_mask)
- dai->driver->ops->xlate_tdm_slot_mask(slots,
- &tx_mask, &rx_mask);
+ ret = dai->driver->ops->xlate_tdm_slot_mask(slots, &tx_mask, &rx_mask);
else
- snd_soc_xlate_tdm_slot_mask(slots, &tx_mask, &rx_mask);
+ ret = snd_soc_xlate_tdm_slot_mask(slots, &tx_mask, &rx_mask);
+ if (ret)
+ goto err;
dai->tx_mask = tx_mask;
dai->rx_mask = rx_mask;
@@ -283,6 +284,7 @@ int snd_soc_dai_set_tdm_slot(struct snd_soc_dai *dai,
dai->driver->ops->set_tdm_slot)
ret = dai->driver->ops->set_tdm_slot(dai, tx_mask, rx_mask,
slots, slot_width);
+err:
return soc_dai_ret(dai, ret);
}
EXPORT_SYMBOL_GPL(snd_soc_dai_set_tdm_slot);
diff --git a/sound/soc/soc-ops.c b/sound/soc/soc-ops.c
index d8d0a26a554d..9eb4181c6697 100644
--- a/sound/soc/soc-ops.c
+++ b/sound/soc/soc-ops.c
@@ -621,6 +621,33 @@ int snd_soc_get_volsw_range(struct snd_kcontrol *kcontrol,
}
EXPORT_SYMBOL_GPL(snd_soc_get_volsw_range);
+static int snd_soc_clip_to_platform_max(struct snd_kcontrol *kctl)
+{
+ struct soc_mixer_control *mc = (struct soc_mixer_control *)kctl->private_value;
+ struct snd_ctl_elem_value uctl;
+ int ret;
+
+ if (!mc->platform_max)
+ return 0;
+
+ ret = kctl->get(kctl, &uctl);
+ if (ret < 0)
+ return ret;
+
+ if (uctl.value.integer.value[0] > mc->platform_max)
+ uctl.value.integer.value[0] = mc->platform_max;
+
+ if (snd_soc_volsw_is_stereo(mc) &&
+ uctl.value.integer.value[1] > mc->platform_max)
+ uctl.value.integer.value[1] = mc->platform_max;
+
+ ret = kctl->put(kctl, &uctl);
+ if (ret < 0)
+ return ret;
+
+ return 0;
+}
+
/**
* snd_soc_limit_volume - Set new limit to an existing volume control.
*
@@ -645,7 +672,7 @@ int snd_soc_limit_volume(struct snd_soc_card *card,
struct soc_mixer_control *mc = (struct soc_mixer_control *)kctl->private_value;
if (max <= mc->max - mc->min) {
mc->platform_max = max;
- ret = 0;
+ ret = snd_soc_clip_to_platform_max(kctl);
}
}
return ret;
diff --git a/tools/bpf/bpftool/common.c b/tools/bpf/bpftool/common.c
index e4c65d34fe74..2b4773e00ab6 100644
--- a/tools/bpf/bpftool/common.c
+++ b/tools/bpf/bpftool/common.c
@@ -318,10 +318,11 @@ int get_fd_type(int fd)
p_err("can't read link type: %s", strerror(errno));
return -1;
}
- if (n == sizeof(path)) {
+ if (n == sizeof(buf)) {
p_err("can't read link type: path too long!");
return -1;
}
+ buf[n] = '\0';
if (strstr(buf, "bpf-map"))
return BPF_OBJ_MAP;
diff --git a/tools/build/Makefile.build b/tools/build/Makefile.build
index 715092fc6a23..6a043b729b36 100644
--- a/tools/build/Makefile.build
+++ b/tools/build/Makefile.build
@@ -130,6 +130,10 @@ objprefix := $(subst ./,,$(OUTPUT)$(dir)/)
obj-y := $(addprefix $(objprefix),$(obj-y))
subdir-obj-y := $(addprefix $(objprefix),$(subdir-obj-y))
+# Separate out test log files from real build objects.
+test-y := $(filter %_log, $(obj-y))
+obj-y := $(filter-out %_log, $(obj-y))
+
# Final '$(obj)-in.o' object
in-target := $(objprefix)$(obj)-in.o
@@ -140,7 +144,7 @@ $(subdir-y):
$(sort $(subdir-obj-y)): $(subdir-y) ;
-$(in-target): $(obj-y) FORCE
+$(in-target): $(obj-y) $(test-y) FORCE
$(call rule_mkdir)
$(call if_changed,$(host)ld_multi)
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index 294fdba9c76f..40e0d84e3d8e 100644
--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf/libbpf.c
@@ -1567,7 +1567,7 @@ static int set_kcfg_value_str(struct extern_desc *ext, char *ext_val,
}
len = strlen(value);
- if (value[len - 1] != '"') {
+ if (len < 2 || value[len - 1] != '"') {
pr_warn("extern (kcfg) '%s': invalid string config '%s'\n",
ext->name, value);
return -EINVAL;
diff --git a/tools/testing/selftests/net/gro.sh b/tools/testing/selftests/net/gro.sh
index 342ad27f631b..e771f5f7faa2 100755
--- a/tools/testing/selftests/net/gro.sh
+++ b/tools/testing/selftests/net/gro.sh
@@ -95,5 +95,6 @@ trap cleanup EXIT
if [[ "${test}" == "all" ]]; then
run_all_tests
else
- run_test "${proto}" "${test}"
+ exit_code=$(run_test "${proto}" "${test}")
+ exit $exit_code
fi;
Return-Path: <linux-kernel+bounces-673234-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 7991241E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:07:33 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 8F6563A670A
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:06:59 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 51F4C28FAA3;
Wed, 4 Jun 2025 13:06:32 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="daaHNy2z"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 50BBF28F943;
Wed, 4 Jun 2025 13:06:15 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749042376; cv=none; b=dJaf+Swk8ncmzk/uymJDDkzIOmdOGd7FWN7DyqR8LjDc7ClsQfc6+XhMrohqrv1X/lZB1GkYbrC0nHxsArQ2WMLRev1yaXpM+Aza5ozHMsYgnubSTIdCk+aQKFe1lfVUm/rnCoSRs7ltwQmHX85+3aduTKyXvVKc2zR2sMeZgM8=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749042376; c=relaxed/simple;
bh=w90sv7vWxUKcj6bUcD+sAgG6sJuNwDin9jqPb2pKETM=;
h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version; b=OpqEd4CLV/6UCJnnohaFuH0aWO3j4v3gezOqE3FioGcXWXL9nQqVdro2iJhfX6VfLKZGEsjP+z1Ut5q0PIVGXDSulF7iKZMZm91Ix1om2c7XhxBaxhs3ktEDnlaxweCHyBc4s5l/UpO5rDO3mAO/1totVcm8Nasqp706gUeczE8=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=daaHNy2z; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id BCDFBC4CEE7;
Wed, 4 Jun 2025 13:06:14 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org;
s=korg; t=1749042375;
bh=w90sv7vWxUKcj6bUcD+sAgG6sJuNwDin9jqPb2pKETM=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=daaHNy2zno96ZKxDHdwY6bp5C3gf9aG3V6/M6vS7vkQSY2S+ZteeY31b9sJhrDINc
5BJLD2+V/AAdP/yxafFe+DUIXUt3jRAnMmr8QciDNbtDzBHNZ1M+xY0phduR1gaVXF
CAy7p1ZO16Xbd/kH/IZp+eJNkYl5HOAHsjIU9Ylc=
From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
To: linux-kernel@xxxxxxxxxxxxxxx,
akpm@xxxxxxxxxxxxxxxxxxxx,
torvalds@xxxxxxxxxxxxxxxxxxxx,
stable@xxxxxxxxxxxxxxx
Cc: lwn@xxxxxxx,
jslaby@xxxxxxx,
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Subject: Re: Linux 5.10.238
Date: Wed, 4 Jun 2025 15:06:03 +0200
Message-ID: <2025060403-fancied-portion-4a33@gregkh>
X-Mailer: git-send-email 2.49.0
In-Reply-To: <2025060403-reappear-jacket-275f@gregkh>
References: <2025060403-reappear-jacket-275f@gregkh>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 88110e74b3f7..12af5b0ecc8e 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -5122,6 +5122,8 @@
Selecting 'on' will also enable the mitigation
against user space to user space task attacks.
+ Selecting specific mitigation does not force enable
+ user mitigations.
Selecting 'off' will disable both the kernel and
the user space protections.
diff --git a/Makefile b/Makefile
index b0e2f455eb87..7d94034c906d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 5
PATCHLEVEL = 10
-SUBLEVEL = 237
+SUBLEVEL = 238
EXTRAVERSION =
NAME = Dare mighty things
@@ -795,6 +795,18 @@ KBUILD_CFLAGS += -Wno-gnu
# source of a reference will be _MergedGlobals and not on of the whitelisted names.
# See modpost pattern 2
KBUILD_CFLAGS += -mno-global-merge
+
+# Clang may emit a warning when a const variable, such as the dummy variables
+# in typecheck(), or const member of an aggregate type are not initialized,
+# which can result in unexpected behavior. However, in many audited cases of
+# the "field" variant of the warning, this is intentional because the field is
+# never used within a particular call path, the field is within a union with
+# other non-const members, or the containing object is not const so the field
+# can be modified via memcpy() / memset(). While the variable warning also gets
+# disabled with this same switch, there should not be too much coverage lost
+# because -Wuninitialized will still flag when an uninitialized const variable
+# is used.
+KBUILD_CFLAGS += $(call cc-disable-warning, default-const-init-unsafe)
else
# Warn about unmarked fall-throughs in switch statement.
diff --git a/arch/arm/boot/dts/tegra114.dtsi b/arch/arm/boot/dts/tegra114.dtsi
index fb99b3e971c3..c00097794dab 100644
--- a/arch/arm/boot/dts/tegra114.dtsi
+++ b/arch/arm/boot/dts/tegra114.dtsi
@@ -126,7 +126,7 @@ dsi@54400000 {
reg = <0x54400000 0x00040000>;
clocks = <&tegra_car TEGRA114_CLK_DSIB>,
<&tegra_car TEGRA114_CLK_DSIBLP>,
- <&tegra_car TEGRA114_CLK_PLL_D2_OUT0>;
+ <&tegra_car TEGRA114_CLK_PLL_D_OUT0>;
clock-names = "dsi", "lp", "parent";
resets = <&tegra_car 82>;
reset-names = "dsi";
diff --git a/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi b/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi
index a9caaf7c0d67..c04772a9740e 100644
--- a/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi
@@ -1638,7 +1638,7 @@ vdd_1v8_dis: regulator@7 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
- gpio = <&exp1 14 GPIO_ACTIVE_HIGH>;
+ gpio = <&exp1 9 GPIO_ACTIVE_HIGH>;
enable-active-high;
vin-supply = <&vdd_1v8>;
};
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
index 7756a365d4c4..d92b5aed354e 100644
--- a/arch/arm64/include/asm/pgtable.h
+++ b/arch/arm64/include/asm/pgtable.h
@@ -601,7 +601,8 @@ static inline unsigned long pmd_page_vaddr(pmd_t pmd)
pr_err("%s:%d: bad pmd %016llx.\n", __FILE__, __LINE__, pmd_val(e))
#define pud_none(pud) (!pud_val(pud))
-#define pud_bad(pud) (!pud_table(pud))
+#define pud_bad(pud) ((pud_val(pud) & PUD_TYPE_MASK) != \
+ PUD_TYPE_TABLE)
#define pud_present(pud) pte_present(pud_pte(pud))
#define pud_leaf(pud) (pud_present(pud) && !pud_table(pud))
#define pud_valid(pud) pte_valid(pud_pte(pud))
diff --git a/arch/mips/include/asm/ftrace.h b/arch/mips/include/asm/ftrace.h
index b463f2aa5a61..7acbe701afd6 100644
--- a/arch/mips/include/asm/ftrace.h
+++ b/arch/mips/include/asm/ftrace.h
@@ -87,4 +87,20 @@ struct dyn_arch_ftrace {
#endif /* CONFIG_DYNAMIC_FTRACE */
#endif /* __ASSEMBLY__ */
#endif /* CONFIG_FUNCTION_TRACER */
+
+#ifdef CONFIG_FTRACE_SYSCALLS
+#ifndef __ASSEMBLY__
+/*
+ * Some syscall entry functions on mips start with "__sys_" (fork and clone,
+ * for instance). We should also match the sys_ variant with those.
+ */
+#define ARCH_HAS_SYSCALL_MATCH_SYM_NAME
+static inline bool arch_syscall_match_sym_name(const char *sym,
+ const char *name)
+{
+ return !strcmp(sym, name) ||
+ (!strncmp(sym, "__sys_", 6) && !strcmp(sym + 6, name + 4));
+}
+#endif /* __ASSEMBLY__ */
+#endif /* CONFIG_FTRACE_SYSCALLS */
#endif /* _ASM_MIPS_FTRACE_H */
diff --git a/arch/mips/include/asm/ptrace.h b/arch/mips/include/asm/ptrace.h
index ae578860f729..4ec9b306556f 100644
--- a/arch/mips/include/asm/ptrace.h
+++ b/arch/mips/include/asm/ptrace.h
@@ -65,7 +65,8 @@ static inline void instruction_pointer_set(struct pt_regs *regs,
/* Query offset/name of register from its name/offset */
extern int regs_query_register_offset(const char *name);
-#define MAX_REG_OFFSET (offsetof(struct pt_regs, __last))
+#define MAX_REG_OFFSET \
+ (offsetof(struct pt_regs, __last) - sizeof(unsigned long))
/**
* regs_get_register() - get register value from its offset
diff --git a/arch/mips/kernel/pm-cps.c b/arch/mips/kernel/pm-cps.c
index 9bf60d7d44d3..a7bcf2b814c8 100644
--- a/arch/mips/kernel/pm-cps.c
+++ b/arch/mips/kernel/pm-cps.c
@@ -56,10 +56,7 @@ static DEFINE_PER_CPU_ALIGNED(u32*, ready_count);
/* Indicates online CPUs coupled with the current CPU */
static DEFINE_PER_CPU_ALIGNED(cpumask_t, online_coupled);
-/*
- * Used to synchronize entry to deep idle states. Actually per-core rather
- * than per-CPU.
- */
+/* Used to synchronize entry to deep idle states */
static DEFINE_PER_CPU_ALIGNED(atomic_t, pm_barrier);
/* Saved CPU state across the CPS_PM_POWER_GATED state */
@@ -118,9 +115,10 @@ int cps_pm_enter_state(enum cps_pm_state state)
cps_nc_entry_fn entry;
struct core_boot_config *core_cfg;
struct vpe_boot_config *vpe_cfg;
+ atomic_t *barrier;
/* Check that there is an entry function for this state */
- entry = per_cpu(nc_asm_enter, core)[state];
+ entry = per_cpu(nc_asm_enter, cpu)[state];
if (!entry)
return -EINVAL;
@@ -156,7 +154,7 @@ int cps_pm_enter_state(enum cps_pm_state state)
smp_mb__after_atomic();
/* Create a non-coherent mapping of the core ready_count */
- core_ready_count = per_cpu(ready_count, core);
+ core_ready_count = per_cpu(ready_count, cpu);
nc_addr = kmap_noncoherent(virt_to_page(core_ready_count),
(unsigned long)core_ready_count);
nc_addr += ((unsigned long)core_ready_count & ~PAGE_MASK);
@@ -164,7 +162,8 @@ int cps_pm_enter_state(enum cps_pm_state state)
/* Ensure ready_count is zero-initialised before the assembly runs */
WRITE_ONCE(*nc_core_ready_count, 0);
- coupled_barrier(&per_cpu(pm_barrier, core), online);
+ barrier = &per_cpu(pm_barrier, cpumask_first(&cpu_sibling_map[cpu]));
+ coupled_barrier(barrier, online);
/* Run the generated entry code */
left = entry(online, nc_core_ready_count);
@@ -635,12 +634,14 @@ static void *cps_gen_entry_code(unsigned cpu, enum cps_pm_state state)
static int cps_pm_online_cpu(unsigned int cpu)
{
- enum cps_pm_state state;
- unsigned core = cpu_core(&cpu_data[cpu]);
+ unsigned int sibling, core;
void *entry_fn, *core_rc;
+ enum cps_pm_state state;
+
+ core = cpu_core(&cpu_data[cpu]);
for (state = CPS_PM_NC_WAIT; state < CPS_PM_STATE_COUNT; state++) {
- if (per_cpu(nc_asm_enter, core)[state])
+ if (per_cpu(nc_asm_enter, cpu)[state])
continue;
if (!test_bit(state, state_support))
continue;
@@ -652,16 +653,19 @@ static int cps_pm_online_cpu(unsigned int cpu)
clear_bit(state, state_support);
}
- per_cpu(nc_asm_enter, core)[state] = entry_fn;
+ for_each_cpu(sibling, &cpu_sibling_map[cpu])
+ per_cpu(nc_asm_enter, sibling)[state] = entry_fn;
}
- if (!per_cpu(ready_count, core)) {
+ if (!per_cpu(ready_count, cpu)) {
core_rc = kmalloc(sizeof(u32), GFP_KERNEL);
if (!core_rc) {
pr_err("Failed allocate core %u ready_count\n", core);
return -ENOMEM;
}
- per_cpu(ready_count, core) = core_rc;
+
+ for_each_cpu(sibling, &cpu_sibling_map[cpu])
+ per_cpu(ready_count, sibling) = core_rc;
}
return 0;
diff --git a/arch/parisc/math-emu/driver.c b/arch/parisc/math-emu/driver.c
index 6ce427b58836..ecd27b48d61f 100644
--- a/arch/parisc/math-emu/driver.c
+++ b/arch/parisc/math-emu/driver.c
@@ -103,9 +103,19 @@ handle_fpe(struct pt_regs *regs)
memcpy(regs->fr, frcopy, sizeof regs->fr);
if (signalcode != 0) {
- force_sig_fault(signalcode >> 24, signalcode & 0xffffff,
- (void __user *) regs->iaoq[0]);
- return -1;
+ int sig = signalcode >> 24;
+
+ if (sig == SIGFPE) {
+ /*
+ * Clear floating point trap bit to avoid trapping
+ * again on the first floating-point instruction in
+ * the userspace signal handler.
+ */
+ regs->fr[0] &= ~(1ULL << 38);
+ }
+ force_sig_fault(sig, signalcode & 0xffffff,
+ (void __user *) regs->iaoq[0]);
+ return -1;
}
return signalcode ? -1 : 0;
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 9a753c4dafab..b29135dd7334 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -2944,11 +2944,11 @@ static void __init fixup_device_tree_pmac(void)
char type[8];
phandle node;
- // Some pmacs are missing #size-cells on escc nodes
+ // Some pmacs are missing #size-cells on escc or i2s nodes
for (node = 0; prom_next_node(&node); ) {
type[0] = '\0';
prom_getprop(node, "device_type", type, sizeof(type));
- if (prom_strcmp(type, "escc"))
+ if (prom_strcmp(type, "escc") && prom_strcmp(type, "i2s"))
continue;
if (prom_getproplen(node, "#size-cells") != PROM_ERROR)
diff --git a/arch/um/Makefile b/arch/um/Makefile
index 4211e23a2f68..e2caca06c155 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -153,5 +153,6 @@ MRPROPER_FILES += $(HOST_DIR)/include/generated
archclean:
@find . \( -name '*.bb' -o -name '*.bbg' -o -name '*.da' \
-o -name '*.gcov' \) -type f -print | xargs rm -f
+ $(Q)$(MAKE) -f $(srctree)/Makefile ARCH=$(HEADER_ARCH) clean
export HEADER_ARCH SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS DEV_NULL_PATH
diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c
index 9242dc91d751..268a238f4f9c 100644
--- a/arch/um/kernel/mem.c
+++ b/arch/um/kernel/mem.c
@@ -49,6 +49,7 @@ void __init mem_init(void)
map_memory(brk_end, __pa(brk_end), uml_reserved - brk_end, 1, 1, 0);
memblock_free(__pa(brk_end), uml_reserved - brk_end);
uml_reserved = brk_end;
+ min_low_pfn = PFN_UP(__pa(uml_reserved));
/* this will put all low memory onto the freelists */
memblock_free_all();
diff --git a/arch/x86/events/amd/ibs.c b/arch/x86/events/amd/ibs.c
index 354d52e17ef5..8525b7960787 100644
--- a/arch/x86/events/amd/ibs.c
+++ b/arch/x86/events/amd/ibs.c
@@ -808,7 +808,8 @@ static __init int perf_event_ibs_init(void)
if (ibs_caps & IBS_CAPS_OPCNTEXT) {
perf_ibs_op.max_period |= IBS_OP_MAX_CNT_EXT_MASK;
perf_ibs_op.config_mask |= IBS_OP_MAX_CNT_EXT_MASK;
- perf_ibs_op.cnt_mask |= IBS_OP_MAX_CNT_EXT_MASK;
+ perf_ibs_op.cnt_mask |= (IBS_OP_MAX_CNT_EXT_MASK |
+ IBS_OP_CUR_CNT_EXT_MASK);
}
ret = perf_ibs_pmu_init(&perf_ibs_op, "ibs_op");
diff --git a/arch/x86/include/asm/nmi.h b/arch/x86/include/asm/nmi.h
index 9d5d949e662e..dfb483c8c98b 100644
--- a/arch/x86/include/asm/nmi.h
+++ b/arch/x86/include/asm/nmi.h
@@ -59,6 +59,8 @@ int __register_nmi_handler(unsigned int, struct nmiaction *);
void unregister_nmi_handler(unsigned int, const char *);
+void set_emergency_nmi_handler(unsigned int type, nmi_handler_t handler);
+
void stop_nmi(void);
void restart_nmi(void);
void local_touch_nmi(void);
diff --git a/arch/x86/include/asm/perf_event.h b/arch/x86/include/asm/perf_event.h
index a4e4bbb7795d..63fc0f50cd38 100644
--- a/arch/x86/include/asm/perf_event.h
+++ b/arch/x86/include/asm/perf_event.h
@@ -402,6 +402,7 @@ struct pebs_xmm {
*/
#define IBS_OP_CUR_CNT (0xFFF80ULL<<32)
#define IBS_OP_CUR_CNT_RAND (0x0007FULL<<32)
+#define IBS_OP_CUR_CNT_EXT_MASK (0x7FULL<<52)
#define IBS_OP_CNT_CTL (1ULL<<19)
#define IBS_OP_VAL (1ULL<<18)
#define IBS_OP_ENABLE (1ULL<<17)
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index 045ab6d0a98b..9b3611e4cb80 100644
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -1231,9 +1231,13 @@ static __ro_after_init enum spectre_v2_mitigation_cmd spectre_v2_cmd;
static enum spectre_v2_user_cmd __init
spectre_v2_parse_user_cmdline(void)
{
+ enum spectre_v2_user_cmd mode;
char arg[20];
int ret, i;
+ mode = IS_ENABLED(CONFIG_MITIGATION_SPECTRE_V2) ?
+ SPECTRE_V2_USER_CMD_AUTO : SPECTRE_V2_USER_CMD_NONE;
+
switch (spectre_v2_cmd) {
case SPECTRE_V2_CMD_NONE:
return SPECTRE_V2_USER_CMD_NONE;
@@ -1246,7 +1250,7 @@ spectre_v2_parse_user_cmdline(void)
ret = cmdline_find_option(boot_command_line, "spectre_v2_user",
arg, sizeof(arg));
if (ret < 0)
- return SPECTRE_V2_USER_CMD_AUTO;
+ return mode;
for (i = 0; i < ARRAY_SIZE(v2_user_options); i++) {
if (match_option(arg, ret, v2_user_options[i].option)) {
@@ -1256,8 +1260,8 @@ spectre_v2_parse_user_cmdline(void)
}
}
- pr_err("Unknown user space protection option (%s). Switching to AUTO select\n", arg);
- return SPECTRE_V2_USER_CMD_AUTO;
+ pr_err("Unknown user space protection option (%s). Switching to default\n", arg);
+ return mode;
}
static inline bool spectre_v2_in_eibrs_mode(enum spectre_v2_mitigation mode)
diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c
index f2e53b20df7e..09997eee7b6f 100644
--- a/arch/x86/kernel/nmi.c
+++ b/arch/x86/kernel/nmi.c
@@ -38,8 +38,12 @@
#define CREATE_TRACE_POINTS
#include <trace/events/nmi.h>
+/*
+ * An emergency handler can be set in any context including NMI
+ */
struct nmi_desc {
raw_spinlock_t lock;
+ nmi_handler_t emerg_handler;
struct list_head head;
};
@@ -121,9 +125,22 @@ static void nmi_check_duration(struct nmiaction *action, u64 duration)
static int nmi_handle(unsigned int type, struct pt_regs *regs)
{
struct nmi_desc *desc = nmi_to_desc(type);
+ nmi_handler_t ehandler;
struct nmiaction *a;
int handled=0;
+ /*
+ * Call the emergency handler, if set
+ *
+ * In the case of crash_nmi_callback() emergency handler, it will
+ * return in the case of the crashing CPU to enable it to complete
+ * other necessary crashing actions ASAP. Other handlers in the
+ * linked list won't need to be run.
+ */
+ ehandler = desc->emerg_handler;
+ if (ehandler)
+ return ehandler(type, regs);
+
rcu_read_lock();
/*
@@ -209,6 +226,31 @@ void unregister_nmi_handler(unsigned int type, const char *name)
}
EXPORT_SYMBOL_GPL(unregister_nmi_handler);
+/**
+ * set_emergency_nmi_handler - Set emergency handler
+ * @type: NMI type
+ * @handler: the emergency handler to be stored
+ *
+ * Set an emergency NMI handler which, if set, will preempt all the other
+ * handlers in the linked list. If a NULL handler is passed in, it will clear
+ * it. It is expected that concurrent calls to this function will not happen
+ * or the system is screwed beyond repair.
+ */
+void set_emergency_nmi_handler(unsigned int type, nmi_handler_t handler)
+{
+ struct nmi_desc *desc = nmi_to_desc(type);
+
+ if (WARN_ON_ONCE(desc->emerg_handler == handler))
+ return;
+ desc->emerg_handler = handler;
+
+ /*
+ * Ensure the emergency handler is visible to other CPUs before
+ * function return
+ */
+ smp_wmb();
+}
+
static void
pci_serr_error(unsigned char reason, struct pt_regs *regs)
{
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index 4d8c0e258150..a09060b9bd15 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -874,15 +874,11 @@ void nmi_shootdown_cpus(nmi_shootdown_cb callback)
shootdown_callback = callback;
atomic_set(&waiting_for_crash_ipi, num_online_cpus() - 1);
- /* Would it be better to replace the trap vector here? */
- if (register_nmi_handler(NMI_LOCAL, crash_nmi_callback,
- NMI_FLAG_FIRST, "crash"))
- return; /* Return what? */
+
/*
- * Ensure the new callback function is set before sending
- * out the NMI
+ * Set emergency handler to preempt other handlers.
*/
- wmb();
+ set_emergency_nmi_handler(NMI_LOCAL, crash_nmi_callback);
apic_send_IPI_allbutself(NMI_VECTOR);
diff --git a/arch/x86/um/os-Linux/mcontext.c b/arch/x86/um/os-Linux/mcontext.c
index 49c3744cac37..81b9d1f9f4e6 100644
--- a/arch/x86/um/os-Linux/mcontext.c
+++ b/arch/x86/um/os-Linux/mcontext.c
@@ -26,7 +26,6 @@ void get_regs_from_mc(struct uml_pt_regs *regs, mcontext_t *mc)
COPY(RIP);
COPY2(EFLAGS, EFL);
COPY2(CS, CSGSFS);
- regs->gp[CS / sizeof(unsigned long)] &= 0xffff;
- regs->gp[CS / sizeof(unsigned long)] |= 3;
+ regs->gp[SS / sizeof(unsigned long)] = mc->gregs[REG_CSGSFS] >> 48;
#endif
}
diff --git a/crypto/algif_hash.c b/crypto/algif_hash.c
index 50f7b22f1b48..be21cfdc6dbc 100644
--- a/crypto/algif_hash.c
+++ b/crypto/algif_hash.c
@@ -262,10 +262,6 @@ static int hash_accept(struct socket *sock, struct socket *newsock, int flags,
return err;
err = crypto_ahash_import(&ctx2->req, state);
- if (err) {
- sock_orphan(sk2);
- sock_put(sk2);
- }
return err;
}
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index b5ea34c340cc..3ef66a39111c 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -432,7 +432,7 @@ config ACPI_SBS
the modules will be called sbs and sbshc.
config ACPI_HED
- tristate "Hardware Error Device"
+ bool "Hardware Error Device"
help
This driver supports the Hardware Error Device (PNP0C33),
which is used to report some hardware errors notified via
diff --git a/drivers/acpi/hed.c b/drivers/acpi/hed.c
index cf148287e2ba..75166839c99e 100644
--- a/drivers/acpi/hed.c
+++ b/drivers/acpi/hed.c
@@ -72,7 +72,12 @@ static struct acpi_driver acpi_hed_driver = {
.notify = acpi_hed_notify,
},
};
-module_acpi_driver(acpi_hed_driver);
+
+static int __init acpi_hed_driver_init(void)
+{
+ return acpi_bus_register_driver(&acpi_hed_driver);
+}
+subsys_initcall(acpi_hed_driver_init);
ACPI_MODULE_NAME("hed");
MODULE_AUTHOR("Huang Ying");
diff --git a/drivers/acpi/pptt.c b/drivers/acpi/pptt.c
index 38581001811b..78be329c2d7c 100644
--- a/drivers/acpi/pptt.c
+++ b/drivers/acpi/pptt.c
@@ -219,16 +219,18 @@ static int acpi_pptt_leaf_node(struct acpi_table_header *table_hdr,
sizeof(struct acpi_table_pptt));
proc_sz = sizeof(struct acpi_pptt_processor);
- while ((unsigned long)entry + proc_sz < table_end) {
+ /* ignore subtable types that are smaller than a processor node */
+ while ((unsigned long)entry + proc_sz <= table_end) {
cpu_node = (struct acpi_pptt_processor *)entry;
+
if (entry->type == ACPI_PPTT_TYPE_PROCESSOR &&
cpu_node->parent == node_entry)
return 0;
if (entry->length == 0)
return 0;
+
entry = ACPI_ADD_PTR(struct acpi_subtable_header, entry,
entry->length);
-
}
return 1;
}
@@ -261,15 +263,18 @@ static struct acpi_pptt_processor *acpi_find_processor_node(struct acpi_table_he
proc_sz = sizeof(struct acpi_pptt_processor);
/* find the processor structure associated with this cpuid */
- while ((unsigned long)entry + proc_sz < table_end) {
+ while ((unsigned long)entry + proc_sz <= table_end) {
cpu_node = (struct acpi_pptt_processor *)entry;
if (entry->length == 0) {
pr_warn("Invalid zero length subtable\n");
break;
}
+ /* entry->length may not equal proc_sz, revalidate the processor structure length */
if (entry->type == ACPI_PPTT_TYPE_PROCESSOR &&
acpi_cpu_id == cpu_node->acpi_processor_id &&
+ (unsigned long)entry + entry->length <= table_end &&
+ entry->length == proc_sz + cpu_node->number_of_priv_resources * sizeof(u32) &&
acpi_pptt_leaf_node(table_hdr, cpu_node)) {
return (struct acpi_pptt_processor *)entry;
}
diff --git a/drivers/char/tpm/tpm_tis_core.h b/drivers/char/tpm/tpm_tis_core.h
index 464ed352ab2e..ed7b2caa9ebb 100644
--- a/drivers/char/tpm/tpm_tis_core.h
+++ b/drivers/char/tpm/tpm_tis_core.h
@@ -53,7 +53,7 @@ enum tis_int_flags {
enum tis_defaults {
TIS_MEM_LEN = 0x5000,
TIS_SHORT_TIMEOUT = 750, /* ms */
- TIS_LONG_TIMEOUT = 2000, /* 2 sec */
+ TIS_LONG_TIMEOUT = 4000, /* 4 secs */
TIS_TIMEOUT_MIN_ATML = 14700, /* usecs */
TIS_TIMEOUT_MAX_ATML = 15000, /* usecs */
};
diff --git a/drivers/clk/imx/clk-imx8mp.c b/drivers/clk/imx/clk-imx8mp.c
index 385653fe3966..aebeb4d3c8dd 100644
--- a/drivers/clk/imx/clk-imx8mp.c
+++ b/drivers/clk/imx/clk-imx8mp.c
@@ -8,6 +8,7 @@
#include <linux/err.h>
#include <linux/io.h>
#include <linux/module.h>
+#include <linux/units.h>
#include <linux/of_address.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
@@ -417,11 +418,151 @@ static const char * const imx8mp_clkout_sels[] = {"audio_pll1_out", "audio_pll2_
static struct clk_hw **hws;
static struct clk_hw_onecell_data *clk_hw_data;
+struct imx8mp_clock_constraints {
+ unsigned int clkid;
+ u32 maxrate;
+};
+
+/*
+ * Below tables are taken from IMX8MPCEC Rev. 2.1, 07/2023
+ * Table 13. Maximum frequency of modules.
+ * Probable typos fixed are marked with a comment.
+ */
+static const struct imx8mp_clock_constraints imx8mp_clock_common_constraints[] = {
+ { IMX8MP_CLK_A53_DIV, 1000 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ENET_AXI, 266666667 }, /* Datasheet claims 266MHz */
+ { IMX8MP_CLK_NAND_USDHC_BUS, 266666667 }, /* Datasheet claims 266MHz */
+ { IMX8MP_CLK_MEDIA_APB, 200 * HZ_PER_MHZ },
+ { IMX8MP_CLK_HDMI_APB, 133333333 }, /* Datasheet claims 133MHz */
+ { IMX8MP_CLK_ML_AXI, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_AHB, 133333333 },
+ { IMX8MP_CLK_IPG_ROOT, 66666667 },
+ { IMX8MP_CLK_AUDIO_AHB, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_DISP2_PIX, 170 * HZ_PER_MHZ },
+ { IMX8MP_CLK_DRAM_ALT, 666666667 },
+ { IMX8MP_CLK_DRAM_APB, 200 * HZ_PER_MHZ },
+ { IMX8MP_CLK_CAN1, 80 * HZ_PER_MHZ },
+ { IMX8MP_CLK_CAN2, 80 * HZ_PER_MHZ },
+ { IMX8MP_CLK_PCIE_AUX, 10 * HZ_PER_MHZ },
+ { IMX8MP_CLK_I2C5, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_I2C6, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_SAI1, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_SAI2, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_SAI3, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_SAI5, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_SAI6, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_ENET_QOS, 125 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ENET_QOS_TIMER, 200 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ENET_REF, 125 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ENET_TIMER, 125 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ENET_PHY_REF, 125 * HZ_PER_MHZ },
+ { IMX8MP_CLK_NAND, 500 * HZ_PER_MHZ },
+ { IMX8MP_CLK_QSPI, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_USDHC1, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_USDHC2, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_I2C1, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_I2C2, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_I2C3, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_I2C4, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_UART1, 80 * HZ_PER_MHZ },
+ { IMX8MP_CLK_UART2, 80 * HZ_PER_MHZ },
+ { IMX8MP_CLK_UART3, 80 * HZ_PER_MHZ },
+ { IMX8MP_CLK_UART4, 80 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ECSPI1, 80 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ECSPI2, 80 * HZ_PER_MHZ },
+ { IMX8MP_CLK_PWM1, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_PWM2, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_PWM3, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_PWM4, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_GPT1, 100 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPT2, 100 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPT3, 100 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPT4, 100 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPT5, 100 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPT6, 100 * HZ_PER_MHZ },
+ { IMX8MP_CLK_WDOG, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_IPP_DO_CLKO1, 200 * HZ_PER_MHZ },
+ { IMX8MP_CLK_IPP_DO_CLKO2, 200 * HZ_PER_MHZ },
+ { IMX8MP_CLK_HDMI_REF_266M, 266 * HZ_PER_MHZ },
+ { IMX8MP_CLK_USDHC3, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_MIPI_PHY1_REF, 300 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_DISP1_PIX, 250 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_CAM2_PIX, 277 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_LDB, 595 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_MIPI_TEST_BYTE, 200 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ECSPI3, 80 * HZ_PER_MHZ },
+ { IMX8MP_CLK_PDM, 200 * HZ_PER_MHZ },
+ { IMX8MP_CLK_SAI7, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_MAIN_AXI, 400 * HZ_PER_MHZ },
+ { /* Sentinel */ }
+};
+
+static const struct imx8mp_clock_constraints imx8mp_clock_nominal_constraints[] = {
+ { IMX8MP_CLK_M7_CORE, 600 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ML_CORE, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPU3D_CORE, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPU3D_SHADER_CORE, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPU2D_CORE, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_AUDIO_AXI_SRC, 600 * HZ_PER_MHZ },
+ { IMX8MP_CLK_HSIO_AXI, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_ISP, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_VPU_BUS, 600 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_AXI, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_HDMI_AXI, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPU_AXI, 600 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPU_AHB, 300 * HZ_PER_MHZ },
+ { IMX8MP_CLK_NOC, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_NOC_IO, 600 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ML_AHB, 300 * HZ_PER_MHZ },
+ { IMX8MP_CLK_VPU_G1, 600 * HZ_PER_MHZ },
+ { IMX8MP_CLK_VPU_G2, 500 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_CAM1_PIX, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_VPU_VC8000E, 400 * HZ_PER_MHZ }, /* Datasheet claims 500MHz */
+ { IMX8MP_CLK_DRAM_CORE, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GIC, 400 * HZ_PER_MHZ },
+ { /* Sentinel */ }
+};
+
+static const struct imx8mp_clock_constraints imx8mp_clock_overdrive_constraints[] = {
+ { IMX8MP_CLK_M7_CORE, 800 * HZ_PER_MHZ},
+ { IMX8MP_CLK_ML_CORE, 1000 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPU3D_CORE, 1000 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPU3D_SHADER_CORE, 1000 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPU2D_CORE, 1000 * HZ_PER_MHZ },
+ { IMX8MP_CLK_AUDIO_AXI_SRC, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_HSIO_AXI, 500 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_ISP, 500 * HZ_PER_MHZ },
+ { IMX8MP_CLK_VPU_BUS, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_AXI, 500 * HZ_PER_MHZ },
+ { IMX8MP_CLK_HDMI_AXI, 500 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPU_AXI, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPU_AHB, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_NOC, 1000 * HZ_PER_MHZ },
+ { IMX8MP_CLK_NOC_IO, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ML_AHB, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_VPU_G1, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_VPU_G2, 700 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_CAM1_PIX, 500 * HZ_PER_MHZ },
+ { IMX8MP_CLK_VPU_VC8000E, 500 * HZ_PER_MHZ }, /* Datasheet claims 400MHz */
+ { IMX8MP_CLK_DRAM_CORE, 1000 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GIC, 500 * HZ_PER_MHZ },
+ { /* Sentinel */ }
+};
+
+static void imx8mp_clocks_apply_constraints(const struct imx8mp_clock_constraints constraints[])
+{
+ const struct imx8mp_clock_constraints *constr;
+
+ for (constr = constraints; constr->clkid; constr++)
+ clk_hw_set_rate_range(hws[constr->clkid], 0, constr->maxrate);
+}
+
static int imx8mp_clocks_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct device_node *np = dev->of_node;
void __iomem *anatop_base, *ccm_base;
+ const char *opmode;
int err;
np = of_find_compatible_node(NULL, NULL, "fsl,imx8mp-anatop");
@@ -736,6 +877,16 @@ static int imx8mp_clocks_probe(struct platform_device *pdev)
imx_check_clk_hws(hws, IMX8MP_CLK_END);
+ imx8mp_clocks_apply_constraints(imx8mp_clock_common_constraints);
+
+ err = of_property_read_string(np, "fsl,operating-mode", &opmode);
+ if (!err) {
+ if (!strcmp(opmode, "nominal"))
+ imx8mp_clocks_apply_constraints(imx8mp_clock_nominal_constraints);
+ else if (!strcmp(opmode, "overdrive"))
+ imx8mp_clocks_apply_constraints(imx8mp_clock_overdrive_constraints);
+ }
+
err = of_clk_add_hw_provider(np, of_clk_hw_onecell_get, clk_hw_data);
if (err < 0) {
dev_err(dev, "failed to register hws for i.MX8MP\n");
diff --git a/drivers/clocksource/i8253.c b/drivers/clocksource/i8253.c
index 39f7c2d736d1..9a91ce66e16e 100644
--- a/drivers/clocksource/i8253.c
+++ b/drivers/clocksource/i8253.c
@@ -103,7 +103,9 @@ int __init clocksource_i8253_init(void)
#ifdef CONFIG_CLKEVT_I8253
void clockevent_i8253_disable(void)
{
- raw_spin_lock(&i8253_lock);
+ unsigned long flags;
+
+ raw_spin_lock_irqsave(&i8253_lock, flags);
/*
* Writing the MODE register should stop the counter, according to
@@ -133,7 +135,7 @@ void clockevent_i8253_disable(void)
outb_p(0x30, PIT_MODE);
- raw_spin_unlock(&i8253_lock);
+ raw_spin_unlock_irqrestore(&i8253_lock, flags);
}
static int pit_shutdown(struct clock_event_device *evt)
diff --git a/drivers/clocksource/mips-gic-timer.c b/drivers/clocksource/mips-gic-timer.c
index be4175f415ba..1946691f6b32 100644
--- a/drivers/clocksource/mips-gic-timer.c
+++ b/drivers/clocksource/mips-gic-timer.c
@@ -119,6 +119,9 @@ static void gic_update_frequency(void *data)
static int gic_starting_cpu(unsigned int cpu)
{
+ /* Ensure the GIC counter is running */
+ clear_gic_config(GIC_CONFIG_COUNTSTOP);
+
gic_clockevent_cpu_init(cpu, this_cpu_ptr(&gic_clockevent_device));
return 0;
}
@@ -253,9 +256,6 @@ static int __init gic_clocksource_of_init(struct device_node *node)
pr_warn("Unable to register clock notifier\n");
}
- /* And finally start the counter */
- clear_gic_config(GIC_CONFIG_COUNTSTOP);
-
/*
* It's safe to use the MIPS GIC timer as a sched clock source only if
* its ticks are stable, which is true on either the platforms with
diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c
index b0a7ad566081..a95cc8f024fd 100644
--- a/drivers/cpuidle/governors/menu.c
+++ b/drivers/cpuidle/governors/menu.c
@@ -249,8 +249,19 @@ static unsigned int get_typical_interval(struct menu_device *data,
* This can deal with workloads that have long pauses interspersed
* with sporadic activity with a bunch of short pauses.
*/
- if ((divisor * 4) <= INTERVALS * 3)
+ if (divisor * 4 <= INTERVALS * 3) {
+ /*
+ * If there are sufficiently many data points still under
+ * consideration after the outliers have been eliminated,
+ * returning without a prediction would be a mistake because it
+ * is likely that the next interval will not exceed the current
+ * maximum, so return the latter in that case.
+ */
+ if (divisor >= INTERVALS / 2)
+ return max;
+
return UINT_MAX;
+ }
thresh = max - 1;
goto again;
diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
index 915724fd7ea6..a3a172173e34 100644
--- a/drivers/dma/dmatest.c
+++ b/drivers/dma/dmatest.c
@@ -825,9 +825,9 @@ static int dmatest_func(void *data)
} else {
dma_async_issue_pending(chan);
- wait_event_timeout(thread->done_wait,
- done->done,
- msecs_to_jiffies(params->timeout));
+ wait_event_freezable_timeout(thread->done_wait,
+ done->done,
+ msecs_to_jiffies(params->timeout));
status = dma_async_is_tx_complete(chan, cookie, NULL,
NULL);
diff --git a/drivers/dma/ti/k3-udma.c b/drivers/dma/ti/k3-udma.c
index 15eecb757619..1f01bd483c6b 100644
--- a/drivers/dma/ti/k3-udma.c
+++ b/drivers/dma/ti/k3-udma.c
@@ -962,8 +962,11 @@ static void udma_check_tx_completion(struct work_struct *work)
u32 residue_diff;
ktime_t time_diff;
unsigned long delay;
+ unsigned long flags;
while (1) {
+ spin_lock_irqsave(&uc->vc.lock, flags);
+
if (uc->desc) {
/* Get previous residue and time stamp */
residue_diff = uc->tx_drain.residue;
@@ -998,6 +1001,8 @@ static void udma_check_tx_completion(struct work_struct *work)
break;
}
+ spin_unlock_irqrestore(&uc->vc.lock, flags);
+
usleep_range(ktime_to_us(delay),
ktime_to_us(delay) + 10);
continue;
@@ -1014,6 +1019,8 @@ static void udma_check_tx_completion(struct work_struct *work)
break;
}
+
+ spin_unlock_irqrestore(&uc->vc.lock, flags);
}
static irqreturn_t udma_ring_irq_handler(int irq, void *data)
@@ -3075,7 +3082,6 @@ static struct dma_chan *udma_of_xlate(struct of_phandle_args *dma_spec,
struct of_dma *ofdma)
{
struct udma_dev *ud = ofdma->of_dma_data;
- dma_cap_mask_t mask = ud->ddev.cap_mask;
struct udma_filter_param filter_param;
struct dma_chan *chan;
@@ -3088,7 +3094,7 @@ static struct dma_chan *udma_of_xlate(struct of_phandle_args *dma_spec,
else
filter_param.atype = 0;
- chan = __dma_request_channel(&mask, udma_dma_filter_fn, &filter_param,
+ chan = __dma_request_channel(&ud->ddev.cap_mask, udma_dma_filter_fn, &filter_param,
ofdma->of_node);
if (!chan) {
dev_err(ud->dev, "get channel fail in %s.\n", __func__);
diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c
index be38fd71f731..99aaada3a2d9 100644
--- a/drivers/edac/altera_edac.c
+++ b/drivers/edac/altera_edac.c
@@ -97,7 +97,7 @@ static irqreturn_t altr_sdram_mc_err_handler(int irq, void *dev_id)
if (status & priv->ecc_stat_ce_mask) {
regmap_read(drvdata->mc_vbase, priv->ecc_saddr_offset,
&err_addr);
- if (priv->ecc_uecnt_offset)
+ if (priv->ecc_cecnt_offset)
regmap_read(drvdata->mc_vbase, priv->ecc_cecnt_offset,
&err_count);
edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci, err_count,
@@ -1006,9 +1006,6 @@ altr_init_a10_ecc_block(struct device_node *np, u32 irq_mask,
}
}
- /* Interrupt mode set to every SBERR */
- regmap_write(ecc_mgr_map, ALTR_A10_ECC_INTMODE_OFST,
- ALTR_A10_ECC_INTMODE);
/* Enable ECC */
ecc_set_bits(ecc_ctrl_en_mask, (ecc_block_base +
ALTR_A10_ECC_CTRL_OFST));
@@ -2089,6 +2086,10 @@ static int altr_edac_a10_probe(struct platform_device *pdev)
return PTR_ERR(edac->ecc_mgr_map);
}
+ /* Set irq mask for DDR SBE to avoid any pending irq before registration */
+ regmap_write(edac->ecc_mgr_map, A10_SYSMGR_ECC_INTMASK_SET_OFST,
+ (A10_SYSMGR_ECC_INTMASK_SDMMCB | A10_SYSMGR_ECC_INTMASK_DDR0));
+
edac->irq_chip.name = pdev->dev.of_node->name;
edac->irq_chip.irq_mask = a10_eccmgr_irq_mask;
edac->irq_chip.irq_unmask = a10_eccmgr_irq_unmask;
diff --git a/drivers/edac/altera_edac.h b/drivers/edac/altera_edac.h
index 3727e72c8c2e..7248d24c4908 100644
--- a/drivers/edac/altera_edac.h
+++ b/drivers/edac/altera_edac.h
@@ -249,6 +249,8 @@ struct altr_sdram_mc_data {
#define A10_SYSMGR_ECC_INTMASK_SET_OFST 0x94
#define A10_SYSMGR_ECC_INTMASK_CLR_OFST 0x98
#define A10_SYSMGR_ECC_INTMASK_OCRAM BIT(1)
+#define A10_SYSMGR_ECC_INTMASK_SDMMCB BIT(16)
+#define A10_SYSMGR_ECC_INTMASK_DDR0 BIT(17)
#define A10_SYSMGR_ECC_INTSTAT_SERR_OFST 0x9C
#define A10_SYSMGR_ECC_INTSTAT_DERR_OFST 0xA0
diff --git a/drivers/edac/ie31200_edac.c b/drivers/edac/ie31200_edac.c
index cad20e87783b..79a6612bd01e 100644
--- a/drivers/edac/ie31200_edac.c
+++ b/drivers/edac/ie31200_edac.c
@@ -398,10 +398,9 @@ static int ie31200_probe1(struct pci_dev *pdev, int dev_idx)
int i, j, ret;
struct mem_ctl_info *mci = NULL;
struct edac_mc_layer layers[2];
- struct dimm_data dimm_info[IE31200_CHANNELS][IE31200_DIMMS_PER_CHANNEL];
void __iomem *window;
struct ie31200_priv *priv;
- u32 addr_decode, mad_offset;
+ u32 addr_decode[IE31200_CHANNELS], mad_offset;
/*
* Kaby Lake, Coffee Lake seem to work like Skylake. Please re-visit
@@ -459,19 +458,10 @@ static int ie31200_probe1(struct pci_dev *pdev, int dev_idx)
mad_offset = IE31200_MAD_DIMM_0_OFFSET;
}
- /* populate DIMM info */
for (i = 0; i < IE31200_CHANNELS; i++) {
- addr_decode = readl(window + mad_offset +
+ addr_decode[i] = readl(window + mad_offset +
(i * 4));
- edac_dbg(0, "addr_decode: 0x%x\n", addr_decode);
- for (j = 0; j < IE31200_DIMMS_PER_CHANNEL; j++) {
- populate_dimm_info(&dimm_info[i][j], addr_decode, j,
- skl);
- edac_dbg(0, "size: 0x%x, rank: %d, width: %d\n",
- dimm_info[i][j].size,
- dimm_info[i][j].dual_rank,
- dimm_info[i][j].x16_width);
- }
+ edac_dbg(0, "addr_decode: 0x%x\n", addr_decode[i]);
}
/*
@@ -482,14 +472,22 @@ static int ie31200_probe1(struct pci_dev *pdev, int dev_idx)
*/
for (i = 0; i < IE31200_DIMMS_PER_CHANNEL; i++) {
for (j = 0; j < IE31200_CHANNELS; j++) {
+ struct dimm_data dimm_info;
struct dimm_info *dimm;
unsigned long nr_pages;
- nr_pages = IE31200_PAGES(dimm_info[j][i].size, skl);
+ populate_dimm_info(&dimm_info, addr_decode[j], i,
+ skl);
+ edac_dbg(0, "size: 0x%x, rank: %d, width: %d\n",
+ dimm_info.size,
+ dimm_info.dual_rank,
+ dimm_info.x16_width);
+
+ nr_pages = IE31200_PAGES(dimm_info.size, skl);
if (nr_pages == 0)
continue;
- if (dimm_info[j][i].dual_rank) {
+ if (dimm_info.dual_rank) {
nr_pages = nr_pages / 2;
dimm = edac_get_dimm(mci, (i * 2) + 1, j, 0);
dimm->nr_pages = nr_pages;
diff --git a/drivers/fpga/altera-cvp.c b/drivers/fpga/altera-cvp.c
index 4e0edb60bfba..d107ad73a188 100644
--- a/drivers/fpga/altera-cvp.c
+++ b/drivers/fpga/altera-cvp.c
@@ -52,7 +52,7 @@
/* V2 Defines */
#define VSE_CVP_TX_CREDITS 0x49 /* 8bit */
-#define V2_CREDIT_TIMEOUT_US 20000
+#define V2_CREDIT_TIMEOUT_US 40000
#define V2_CHECK_CREDIT_US 10
#define V2_POLL_TIMEOUT_US 1000000
#define V2_USER_TIMEOUT_US 500000
diff --git a/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c b/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c
index fad887a66886..7949a87b03a8 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c
@@ -70,12 +70,12 @@ static void gfxhub_v1_0_init_system_aperture_regs(struct amdgpu_device *adev)
{
uint64_t value;
- /* Program the AGP BAR */
- WREG32_SOC15_RLC(GC, 0, mmMC_VM_AGP_BASE, 0);
- WREG32_SOC15_RLC(GC, 0, mmMC_VM_AGP_BOT, adev->gmc.agp_start >> 24);
- WREG32_SOC15_RLC(GC, 0, mmMC_VM_AGP_TOP, adev->gmc.agp_end >> 24);
-
if (!amdgpu_sriov_vf(adev) || adev->asic_type <= CHIP_VEGA10) {
+ /* Program the AGP BAR */
+ WREG32_SOC15_RLC(GC, 0, mmMC_VM_AGP_BASE, 0);
+ WREG32_SOC15_RLC(GC, 0, mmMC_VM_AGP_BOT, adev->gmc.agp_start >> 24);
+ WREG32_SOC15_RLC(GC, 0, mmMC_VM_AGP_TOP, adev->gmc.agp_end >> 24);
+
/* Program the system aperture low logical page number. */
WREG32_SOC15_RLC(GC, 0, mmMC_VM_SYSTEM_APERTURE_LOW_ADDR,
min(adev->gmc.fb_start, adev->gmc.agp_start) >> 18);
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
index 184527afe2bd..05d2598f516d 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
@@ -755,6 +755,14 @@ struct kfd_process *kfd_create_process(struct file *filep)
if (thread->group_leader->mm != thread->mm)
return ERR_PTR(-EINVAL);
+ /* If the process just called exec(3), it is possible that the
+ * cleanup of the kfd_process (following the release of the mm
+ * of the old process image) is still in the cleanup work queue.
+ * Make sure to drain any job before trying to recreate any
+ * resource for this process.
+ */
+ flush_workqueue(kfd_process_wq);
+
/*
* take kfd processes mutex before starting of process creation
* so there won't be a case where two threads of the same process
@@ -767,14 +775,6 @@ struct kfd_process *kfd_create_process(struct file *filep)
if (process) {
pr_debug("Process already found\n");
} else {
- /* If the process just called exec(3), it is possible that the
- * cleanup of the kfd_process (following the release of the mm
- * of the old process image) is still in the cleanup work queue.
- * Make sure to drain any job before trying to recreate any
- * resource for this process.
- */
- flush_workqueue(kfd_process_wq);
-
process = create_process(thread);
if (IS_ERR(process))
goto out;
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index 84fb1377ec93..88a9473ccf53 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -228,6 +228,7 @@ static bool create_links(
link->link_id.type = OBJECT_TYPE_CONNECTOR;
link->link_id.id = CONNECTOR_ID_VIRTUAL;
link->link_id.enum_id = ENUM_ID_1;
+ link->psr_settings.psr_version = DC_PSR_VERSION_UNSUPPORTED;
link->link_enc = kzalloc(sizeof(*link->link_enc), GFP_KERNEL);
if (!link->link_enc) {
diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c
index d27f2840b955..9c8595a98609 100644
--- a/drivers/gpu/drm/ast/ast_mode.c
+++ b/drivers/gpu/drm/ast/ast_mode.c
@@ -104,7 +104,7 @@ static bool ast_get_vbios_mode_info(const struct drm_format_info *format,
return false;
}
- switch (mode->crtc_hdisplay) {
+ switch (mode->hdisplay) {
case 640:
vbios_mode->enh_table = &res_640x480[refresh_rate_index];
break;
@@ -115,7 +115,7 @@ static bool ast_get_vbios_mode_info(const struct drm_format_info *format,
vbios_mode->enh_table = &res_1024x768[refresh_rate_index];
break;
case 1280:
- if (mode->crtc_vdisplay == 800)
+ if (mode->vdisplay == 800)
vbios_mode->enh_table = &res_1280x800[refresh_rate_index];
else
vbios_mode->enh_table = &res_1280x1024[refresh_rate_index];
@@ -127,7 +127,7 @@ static bool ast_get_vbios_mode_info(const struct drm_format_info *format,
vbios_mode->enh_table = &res_1440x900[refresh_rate_index];
break;
case 1600:
- if (mode->crtc_vdisplay == 900)
+ if (mode->vdisplay == 900)
vbios_mode->enh_table = &res_1600x900[refresh_rate_index];
else
vbios_mode->enh_table = &res_1600x1200[refresh_rate_index];
@@ -136,7 +136,7 @@ static bool ast_get_vbios_mode_info(const struct drm_format_info *format,
vbios_mode->enh_table = &res_1680x1050[refresh_rate_index];
break;
case 1920:
- if (mode->crtc_vdisplay == 1080)
+ if (mode->vdisplay == 1080)
vbios_mode->enh_table = &res_1920x1080[refresh_rate_index];
else
vbios_mode->enh_table = &res_1920x1200[refresh_rate_index];
@@ -180,6 +180,7 @@ static bool ast_get_vbios_mode_info(const struct drm_format_info *format,
hborder = (vbios_mode->enh_table->flags & HBorder) ? 8 : 0;
vborder = (vbios_mode->enh_table->flags & VBorder) ? 8 : 0;
+ adjusted_mode->crtc_hdisplay = vbios_mode->enh_table->hde;
adjusted_mode->crtc_htotal = vbios_mode->enh_table->ht;
adjusted_mode->crtc_hblank_start = vbios_mode->enh_table->hde + hborder;
adjusted_mode->crtc_hblank_end = vbios_mode->enh_table->ht - hborder;
@@ -189,6 +190,7 @@ static bool ast_get_vbios_mode_info(const struct drm_format_info *format,
vbios_mode->enh_table->hfp +
vbios_mode->enh_table->hsync);
+ adjusted_mode->crtc_vdisplay = vbios_mode->enh_table->vde;
adjusted_mode->crtc_vtotal = vbios_mode->enh_table->vt;
adjusted_mode->crtc_vblank_start = vbios_mode->enh_table->vde + vborder;
adjusted_mode->crtc_vblank_end = vbios_mode->enh_table->vt - vborder;
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index dee3b81dec58..8612dd552d39 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -557,6 +557,30 @@ mode_valid(struct drm_atomic_state *state)
return 0;
}
+static int drm_atomic_check_valid_clones(struct drm_atomic_state *state,
+ struct drm_crtc *crtc)
+{
+ struct drm_encoder *drm_enc;
+ struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state,
+ crtc);
+
+ drm_for_each_encoder_mask(drm_enc, crtc->dev, crtc_state->encoder_mask) {
+ if (!drm_enc->possible_clones) {
+ DRM_DEBUG("enc%d possible_clones is 0\n", drm_enc->base.id);
+ continue;
+ }
+
+ if ((crtc_state->encoder_mask & drm_enc->possible_clones) !=
+ crtc_state->encoder_mask) {
+ DRM_DEBUG("crtc%d failed valid clone check for mask 0x%x\n",
+ crtc->base.id, crtc_state->encoder_mask);
+ return -EINVAL;
+ }
+ }
+
+ return 0;
+}
+
/**
* drm_atomic_helper_check_modeset - validate state object for modeset changes
* @dev: DRM device
@@ -720,6 +744,10 @@ drm_atomic_helper_check_modeset(struct drm_device *dev,
ret = drm_atomic_add_affected_planes(state, crtc);
if (ret != 0)
return ret;
+
+ ret = drm_atomic_check_valid_clones(state, crtc);
+ if (ret != 0)
+ return ret;
}
/*
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 39eb39e78d7a..c3b4a84a9f91 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -5097,6 +5097,7 @@ drm_reset_display_info(struct drm_connector *connector)
info->has_hdmi_infoframe = false;
info->rgb_quant_range_selectable = false;
memset(&info->hdmi, 0, sizeof(info->hdmi));
+ memset(&connector->hdr_sink_metadata, 0, sizeof(connector->hdr_sink_metadata));
info->non_desktop = 0;
memset(&info->monitor_range, 0, sizeof(info->monitor_range));
diff --git a/drivers/gpu/drm/i915/gvt/opregion.c b/drivers/gpu/drm/i915/gvt/opregion.c
index 33569b910ed5..fbf1e67913f6 100644
--- a/drivers/gpu/drm/i915/gvt/opregion.c
+++ b/drivers/gpu/drm/i915/gvt/opregion.c
@@ -222,7 +222,8 @@ int intel_vgpu_init_opregion(struct intel_vgpu *vgpu)
u8 *buf;
struct opregion_header *header;
struct vbt v;
- const char opregion_signature[16] = OPREGION_SIGNATURE;
+
+ static_assert(sizeof(header->signature) == sizeof(OPREGION_SIGNATURE) - 1);
gvt_dbg_core("init vgpu%d opregion\n", vgpu->id);
vgpu_opregion(vgpu)->va = (void *)__get_free_pages(GFP_KERNEL |
@@ -236,8 +237,9 @@ int intel_vgpu_init_opregion(struct intel_vgpu *vgpu)
/* emulated opregion with VBT mailbox only */
buf = (u8 *)vgpu_opregion(vgpu)->va;
header = (struct opregion_header *)buf;
- memcpy(header->signature, opregion_signature,
- sizeof(opregion_signature));
+
+ memcpy(header->signature, OPREGION_SIGNATURE, sizeof(header->signature));
+
header->size = 0x8;
header->opregion_ver = 0x02000000;
header->mboxes = MBOX_VBT;
diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
index ac75c10aed2f..3a58d3dfd558 100644
--- a/drivers/gpu/drm/mediatek/mtk_dpi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
@@ -340,12 +340,13 @@ static void mtk_dpi_config_swap_input(struct mtk_dpi *dpi, bool enable)
static void mtk_dpi_config_2n_h_fre(struct mtk_dpi *dpi)
{
- mtk_dpi_mask(dpi, dpi->conf->reg_h_fre_con, H_FRE_2N, H_FRE_2N);
+ if (dpi->conf->reg_h_fre_con)
+ mtk_dpi_mask(dpi, dpi->conf->reg_h_fre_con, H_FRE_2N, H_FRE_2N);
}
static void mtk_dpi_config_disable_edge(struct mtk_dpi *dpi)
{
- if (dpi->conf->edge_sel_en)
+ if (dpi->conf->edge_sel_en && dpi->conf->reg_h_fre_con)
mtk_dpi_mask(dpi, dpi->conf->reg_h_fre_con, 0, EDGE_SEL_EN);
}
diff --git a/drivers/gpu/drm/meson/meson_vclk.c b/drivers/gpu/drm/meson/meson_vclk.c
index 37127ba40aa9..0eb86943a358 100644
--- a/drivers/gpu/drm/meson/meson_vclk.c
+++ b/drivers/gpu/drm/meson/meson_vclk.c
@@ -790,13 +790,13 @@ meson_vclk_vic_supported_freq(struct meson_drm *priv, unsigned int phy_freq,
FREQ_1000_1001(params[i].pixel_freq));
DRM_DEBUG_DRIVER("i = %d phy_freq = %d alt = %d\n",
i, params[i].phy_freq,
- FREQ_1000_1001(params[i].phy_freq/1000)*1000);
+ FREQ_1000_1001(params[i].phy_freq/10)*10);
/* Match strict frequency */
if (phy_freq == params[i].phy_freq &&
vclk_freq == params[i].vclk_freq)
return MODE_OK;
/* Match 1000/1001 variant */
- if (phy_freq == (FREQ_1000_1001(params[i].phy_freq/1000)*1000) &&
+ if (phy_freq == (FREQ_1000_1001(params[i].phy_freq/10)*10) &&
vclk_freq == FREQ_1000_1001(params[i].vclk_freq))
return MODE_OK;
}
@@ -1070,7 +1070,7 @@ void meson_vclk_setup(struct meson_drm *priv, unsigned int target,
for (freq = 0 ; params[freq].pixel_freq ; ++freq) {
if ((phy_freq == params[freq].phy_freq ||
- phy_freq == FREQ_1000_1001(params[freq].phy_freq/1000)*1000) &&
+ phy_freq == FREQ_1000_1001(params[freq].phy_freq/10)*10) &&
(vclk_freq == params[freq].vclk_freq ||
vclk_freq == FREQ_1000_1001(params[freq].vclk_freq))) {
if (vclk_freq != params[freq].vclk_freq)
diff --git a/drivers/gpu/drm/nouveau/nouveau_fence.c b/drivers/gpu/drm/nouveau/nouveau_fence.c
index e5dcbf67de7e..d31bf9e49bcd 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fence.c
+++ b/drivers/gpu/drm/nouveau/nouveau_fence.c
@@ -95,7 +95,7 @@ nouveau_fence_context_kill(struct nouveau_fence_chan *fctx, int error)
while (!list_empty(&fctx->pending)) {
fence = list_entry(fctx->pending.next, typeof(*fence), head);
- if (error)
+ if (error && !dma_fence_is_signaled_locked(&fence->base))
dma_fence_set_error(&fence->base, error);
if (nouveau_fence_signal(fence))
diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 07b59021008e..9cc9c950604a 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -964,27 +964,28 @@ static const struct panel_desc auo_g070vvn01 = {
},
};
-static const struct drm_display_mode auo_g101evn010_mode = {
- .clock = 68930,
- .hdisplay = 1280,
- .hsync_start = 1280 + 82,
- .hsync_end = 1280 + 82 + 2,
- .htotal = 1280 + 82 + 2 + 84,
- .vdisplay = 800,
- .vsync_start = 800 + 8,
- .vsync_end = 800 + 8 + 2,
- .vtotal = 800 + 8 + 2 + 6,
+static const struct display_timing auo_g101evn010_timing = {
+ .pixelclock = { 64000000, 68930000, 85000000 },
+ .hactive = { 1280, 1280, 1280 },
+ .hfront_porch = { 8, 64, 256 },
+ .hback_porch = { 8, 64, 256 },
+ .hsync_len = { 40, 168, 767 },
+ .vactive = { 800, 800, 800 },
+ .vfront_porch = { 4, 8, 100 },
+ .vback_porch = { 4, 8, 100 },
+ .vsync_len = { 8, 16, 223 },
};
static const struct panel_desc auo_g101evn010 = {
- .modes = &auo_g101evn010_mode,
- .num_modes = 1,
+ .timings = &auo_g101evn010_timing,
+ .num_timings = 1,
.bpc = 6,
.size = {
.width = 216,
.height = 135,
},
.bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
+ .bus_flags = DRM_BUS_FLAG_DE_HIGH,
.connector_type = DRM_MODE_CONNECTOR_LVDS,
};
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
index 6bacdb7583df..0505f87d13c0 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
@@ -32,7 +32,6 @@
#define VMW_FENCE_WRAP (1 << 31)
struct vmw_fence_manager {
- int num_fence_objects;
struct vmw_private *dev_priv;
spinlock_t lock;
struct list_head fence_list;
@@ -113,13 +112,13 @@ static void vmw_fence_obj_destroy(struct dma_fence *f)
{
struct vmw_fence_obj *fence =
container_of(f, struct vmw_fence_obj, base);
-
struct vmw_fence_manager *fman = fman_from_fence(fence);
- spin_lock(&fman->lock);
- list_del_init(&fence->head);
- --fman->num_fence_objects;
- spin_unlock(&fman->lock);
+ if (!list_empty(&fence->head)) {
+ spin_lock(&fman->lock);
+ list_del_init(&fence->head);
+ spin_unlock(&fman->lock);
+ }
fence->destroy(fence);
}
@@ -250,7 +249,6 @@ static const struct dma_fence_ops vmw_fence_ops = {
.release = vmw_fence_obj_destroy,
};
-
/**
* Execute signal actions on fences recently signaled.
* This is done from a workqueue so we don't have to execute
@@ -353,7 +351,6 @@ static int vmw_fence_obj_init(struct vmw_fence_manager *fman,
goto out_unlock;
}
list_add_tail(&fence->head, &fman->fence_list);
- ++fman->num_fence_objects;
out_unlock:
spin_unlock(&fman->lock);
@@ -402,7 +399,7 @@ static bool vmw_fence_goal_new_locked(struct vmw_fence_manager *fman,
{
u32 goal_seqno;
u32 *fifo_mem;
- struct vmw_fence_obj *fence;
+ struct vmw_fence_obj *fence, *next_fence;
if (likely(!fman->seqno_valid))
return false;
@@ -413,7 +410,7 @@ static bool vmw_fence_goal_new_locked(struct vmw_fence_manager *fman,
return false;
fman->seqno_valid = false;
- list_for_each_entry(fence, &fman->fence_list, head) {
+ list_for_each_entry_safe(fence, next_fence, &fman->fence_list, head) {
if (!list_empty(&fence->seq_passed_actions)) {
fman->seqno_valid = true;
vmw_mmio_write(fence->base.seqno,
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index d86720fce48f..4b8f8e0ce8ca 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -41,6 +41,10 @@
#define USB_VENDOR_ID_ACTIONSTAR 0x2101
#define USB_DEVICE_ID_ACTIONSTAR_1011 0x1011
+#define USB_VENDOR_ID_ADATA_XPG 0x125f
+#define USB_VENDOR_ID_ADATA_XPG_WL_GAMING_MOUSE 0x7505
+#define USB_VENDOR_ID_ADATA_XPG_WL_GAMING_MOUSE_DONGLE 0x7506
+
#define USB_VENDOR_ID_ADS_TECH 0x06e1
#define USB_DEVICE_ID_ADS_TECH_RADIO_SI470X 0xa155
diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c
index 9c1afe9cdddf..b3e7ede8f398 100644
--- a/drivers/hid/hid-quirks.c
+++ b/drivers/hid/hid-quirks.c
@@ -27,6 +27,8 @@
static const struct hid_device_id hid_quirks[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_AASHIMA, USB_DEVICE_ID_AASHIMA_GAMEPAD), HID_QUIRK_BADPAD },
{ HID_USB_DEVICE(USB_VENDOR_ID_AASHIMA, USB_DEVICE_ID_AASHIMA_PREDATOR), HID_QUIRK_BADPAD },
+ { HID_USB_DEVICE(USB_VENDOR_ID_ADATA_XPG, USB_VENDOR_ID_ADATA_XPG_WL_GAMING_MOUSE), HID_QUIRK_ALWAYS_POLL },
+ { HID_USB_DEVICE(USB_VENDOR_ID_ADATA_XPG, USB_VENDOR_ID_ADATA_XPG_WL_GAMING_MOUSE_DONGLE), HID_QUIRK_ALWAYS_POLL },
{ HID_USB_DEVICE(USB_VENDOR_ID_AFATECH, USB_DEVICE_ID_AFATECH_AF9016), HID_QUIRK_FULLSPEED_INTERVAL },
{ HID_USB_DEVICE(USB_VENDOR_ID_AIREN, USB_DEVICE_ID_AIREN_SLIMPLUS), HID_QUIRK_NOGET },
{ HID_USB_DEVICE(USB_VENDOR_ID_AKAI_09E8, USB_DEVICE_ID_AKAI_09E8_MIDIMIX), HID_QUIRK_NO_INIT_REPORTS },
diff --git a/drivers/hid/usbhid/usbkbd.c b/drivers/hid/usbhid/usbkbd.c
index d5b7a696a68c..50c5b204bf04 100644
--- a/drivers/hid/usbhid/usbkbd.c
+++ b/drivers/hid/usbhid/usbkbd.c
@@ -160,7 +160,7 @@ static int usb_kbd_event(struct input_dev *dev, unsigned int type,
return -1;
spin_lock_irqsave(&kbd->leds_lock, flags);
- kbd->newleds = (!!test_bit(LED_KANA, dev->led) << 3) | (!!test_bit(LED_COMPOSE, dev->led) << 3) |
+ kbd->newleds = (!!test_bit(LED_KANA, dev->led) << 4) | (!!test_bit(LED_COMPOSE, dev->led) << 3) |
(!!test_bit(LED_SCROLLL, dev->led) << 2) | (!!test_bit(LED_CAPSL, dev->led) << 1) |
(!!test_bit(LED_NUML, dev->led));
diff --git a/drivers/hwmon/gpio-fan.c b/drivers/hwmon/gpio-fan.c
index d96e435cc42b..e0b3917dfe6f 100644
--- a/drivers/hwmon/gpio-fan.c
+++ b/drivers/hwmon/gpio-fan.c
@@ -394,7 +394,12 @@ static int gpio_fan_set_cur_state(struct thermal_cooling_device *cdev,
if (state >= fan_data->num_speed)
return -EINVAL;
+ mutex_lock(&fan_data->lock);
+
set_fan_speed(fan_data, state);
+
+ mutex_unlock(&fan_data->lock);
+
return 0;
}
@@ -490,7 +495,11 @@ MODULE_DEVICE_TABLE(of, of_gpio_fan_match);
static void gpio_fan_stop(void *data)
{
+ struct gpio_fan_data *fan_data = data;
+
+ mutex_lock(&fan_data->lock);
set_fan_speed(data, 0);
+ mutex_unlock(&fan_data->lock);
}
static int gpio_fan_probe(struct platform_device *pdev)
@@ -564,7 +573,9 @@ static int gpio_fan_suspend(struct device *dev)
if (fan_data->gpios) {
fan_data->resume_speed = fan_data->speed_index;
+ mutex_lock(&fan_data->lock);
set_fan_speed(fan_data, 0);
+ mutex_unlock(&fan_data->lock);
}
return 0;
@@ -574,8 +585,11 @@ static int gpio_fan_resume(struct device *dev)
{
struct gpio_fan_data *fan_data = dev_get_drvdata(dev);
- if (fan_data->gpios)
+ if (fan_data->gpios) {
+ mutex_lock(&fan_data->lock);
set_fan_speed(fan_data, fan_data->resume_speed);
+ mutex_unlock(&fan_data->lock);
+ }
return 0;
}
diff --git a/drivers/hwmon/xgene-hwmon.c b/drivers/hwmon/xgene-hwmon.c
index 559a73bab51e..15889bcc8587 100644
--- a/drivers/hwmon/xgene-hwmon.c
+++ b/drivers/hwmon/xgene-hwmon.c
@@ -110,7 +110,7 @@ struct xgene_hwmon_dev {
phys_addr_t comm_base_addr;
void *pcc_comm_addr;
- u64 usecs_lat;
+ unsigned int usecs_lat;
};
/*
diff --git a/drivers/i2c/busses/i2c-imx-lpi2c.c b/drivers/i2c/busses/i2c-imx-lpi2c.c
index c688f11ae5c9..96a4ce9c8d25 100644
--- a/drivers/i2c/busses/i2c-imx-lpi2c.c
+++ b/drivers/i2c/busses/i2c-imx-lpi2c.c
@@ -616,9 +616,9 @@ static int lpi2c_imx_probe(struct platform_device *pdev)
return 0;
rpm_disable:
- pm_runtime_put(&pdev->dev);
- pm_runtime_disable(&pdev->dev);
pm_runtime_dont_use_autosuspend(&pdev->dev);
+ pm_runtime_put_sync(&pdev->dev);
+ pm_runtime_disable(&pdev->dev);
return ret;
}
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
index 35ca2c02c9b9..7fdc7f213b11 100644
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -1508,7 +1508,10 @@ static int i2c_pxa_probe(struct platform_device *dev)
i2c->adap.name);
}
- clk_prepare_enable(i2c->clk);
+ ret = clk_prepare_enable(i2c->clk);
+ if (ret)
+ return dev_err_probe(&dev->dev, ret,
+ "failed to enable clock\n");
if (i2c->use_pio) {
i2c->adap.algo = &i2c_pxa_pio_algorithm;
diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c
index 576c12670bd8..8fd51de64d96 100644
--- a/drivers/i2c/busses/i2c-qup.c
+++ b/drivers/i2c/busses/i2c-qup.c
@@ -14,6 +14,7 @@
#include <linux/dma-mapping.h>
#include <linux/err.h>
#include <linux/i2c.h>
+#include <linux/interconnect.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/module.h>
@@ -150,6 +151,8 @@
/* TAG length for DATA READ in RX FIFO */
#define READ_RX_TAGS_LEN 2
+#define QUP_BUS_WIDTH 8
+
static unsigned int scl_freq;
module_param_named(scl_freq, scl_freq, uint, 0444);
MODULE_PARM_DESC(scl_freq, "SCL frequency override");
@@ -227,6 +230,7 @@ struct qup_i2c_dev {
int irq;
struct clk *clk;
struct clk *pclk;
+ struct icc_path *icc_path;
struct i2c_adapter adap;
int clk_ctl;
@@ -255,6 +259,10 @@ struct qup_i2c_dev {
/* To configure when bus is in run state */
u32 config_run;
+ /* bandwidth votes */
+ u32 src_clk_freq;
+ u32 cur_bw_clk_freq;
+
/* dma parameters */
bool is_dma;
/* To check if the current transfer is using DMA */
@@ -453,6 +461,23 @@ static int qup_i2c_bus_active(struct qup_i2c_dev *qup, int len)
return ret;
}
+static int qup_i2c_vote_bw(struct qup_i2c_dev *qup, u32 clk_freq)
+{
+ u32 needed_peak_bw;
+ int ret;
+
+ if (qup->cur_bw_clk_freq == clk_freq)
+ return 0;
+
+ needed_peak_bw = Bps_to_icc(clk_freq * QUP_BUS_WIDTH);
+ ret = icc_set_bw(qup->icc_path, 0, needed_peak_bw);
+ if (ret)
+ return ret;
+
+ qup->cur_bw_clk_freq = clk_freq;
+ return 0;
+}
+
static void qup_i2c_write_tx_fifo_v1(struct qup_i2c_dev *qup)
{
struct qup_i2c_block *blk = &qup->blk;
@@ -840,6 +865,10 @@ static int qup_i2c_bam_xfer(struct i2c_adapter *adap, struct i2c_msg *msg,
int ret = 0;
int idx = 0;
+ ret = qup_i2c_vote_bw(qup, qup->src_clk_freq);
+ if (ret)
+ return ret;
+
enable_irq(qup->irq);
ret = qup_i2c_req_dma(qup);
@@ -1645,6 +1674,7 @@ static void qup_i2c_disable_clocks(struct qup_i2c_dev *qup)
config = readl(qup->base + QUP_CONFIG);
config |= QUP_CLOCK_AUTO_GATE;
writel(config, qup->base + QUP_CONFIG);
+ qup_i2c_vote_bw(qup, 0);
clk_disable_unprepare(qup->pclk);
}
@@ -1745,6 +1775,11 @@ static int qup_i2c_probe(struct platform_device *pdev)
goto fail_dma;
}
qup->is_dma = true;
+
+ qup->icc_path = devm_of_icc_get(&pdev->dev, NULL);
+ if (IS_ERR(qup->icc_path))
+ return dev_err_probe(&pdev->dev, PTR_ERR(qup->icc_path),
+ "failed to get interconnect path\n");
}
nodma:
@@ -1793,6 +1828,7 @@ static int qup_i2c_probe(struct platform_device *pdev)
qup_i2c_enable_clocks(qup);
src_clk_freq = clk_get_rate(qup->clk);
}
+ qup->src_clk_freq = src_clk_freq;
/*
* Bootloaders might leave a pending interrupt on certain QUP's,
diff --git a/drivers/iio/accel/adis16201.c b/drivers/iio/accel/adis16201.c
index b4ae4f86da3e..9b60ac5dadf0 100644
--- a/drivers/iio/accel/adis16201.c
+++ b/drivers/iio/accel/adis16201.c
@@ -214,9 +214,9 @@ static const struct iio_chan_spec adis16201_channels[] = {
BIT(IIO_CHAN_INFO_CALIBBIAS), 0, 14),
ADIS_AUX_ADC_CHAN(ADIS16201_AUX_ADC_REG, ADIS16201_SCAN_AUX_ADC, 0, 12),
ADIS_INCLI_CHAN(X, ADIS16201_XINCL_OUT_REG, ADIS16201_SCAN_INCLI_X,
- BIT(IIO_CHAN_INFO_CALIBBIAS), 0, 14),
+ BIT(IIO_CHAN_INFO_CALIBBIAS), 0, 12),
ADIS_INCLI_CHAN(Y, ADIS16201_YINCL_OUT_REG, ADIS16201_SCAN_INCLI_Y,
- BIT(IIO_CHAN_INFO_CALIBBIAS), 0, 14),
+ BIT(IIO_CHAN_INFO_CALIBBIAS), 0, 12),
IIO_CHAN_SOFT_TIMESTAMP(7)
};
diff --git a/drivers/iio/adc/ad7606_spi.c b/drivers/iio/adc/ad7606_spi.c
index e1ad2cd61b7f..e9f4043966ae 100644
--- a/drivers/iio/adc/ad7606_spi.c
+++ b/drivers/iio/adc/ad7606_spi.c
@@ -127,7 +127,7 @@ static int ad7606_spi_reg_read(struct ad7606_state *st, unsigned int addr)
{
.tx_buf = &st->d16[0],
.len = 2,
- .cs_change = 0,
+ .cs_change = 1,
}, {
.rx_buf = &st->d16[1],
.len = 2,
diff --git a/drivers/iio/adc/ad7768-1.c b/drivers/iio/adc/ad7768-1.c
index 2445ebc551dd..9580a7f7f73d 100644
--- a/drivers/iio/adc/ad7768-1.c
+++ b/drivers/iio/adc/ad7768-1.c
@@ -168,7 +168,7 @@ struct ad7768_state {
union {
struct {
__be32 chan;
- s64 timestamp;
+ aligned_s64 timestamp;
} scan;
__be32 d32;
u8 d8[2];
diff --git a/drivers/iio/adc/dln2-adc.c b/drivers/iio/adc/dln2-adc.c
index 58b3f6065db0..e29eb38a5069 100644
--- a/drivers/iio/adc/dln2-adc.c
+++ b/drivers/iio/adc/dln2-adc.c
@@ -483,7 +483,7 @@ static irqreturn_t dln2_adc_trigger_h(int irq, void *p)
struct iio_dev *indio_dev = pf->indio_dev;
struct {
__le16 values[DLN2_ADC_MAX_CHANNELS];
- int64_t timestamp_space;
+ aligned_s64 timestamp_space;
} data;
struct dln2_adc_get_all_vals dev_data;
struct dln2_adc *dln2 = iio_priv(indio_dev);
diff --git a/drivers/iio/chemical/sps30.c b/drivers/iio/chemical/sps30.c
index 2ea9a5c4d846..002628e31b5c 100644
--- a/drivers/iio/chemical/sps30.c
+++ b/drivers/iio/chemical/sps30.c
@@ -232,7 +232,7 @@ static irqreturn_t sps30_trigger_handler(int irq, void *p)
int ret;
struct {
s32 data[4]; /* PM1, PM2P5, PM4, PM10 */
- s64 ts;
+ aligned_s64 ts;
} scan;
mutex_lock(&state->lock);
diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
index 12ed0a2e55e4..2e6c634c56c7 100644
--- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
+++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_buffer.c
@@ -369,6 +369,9 @@ int st_lsm6dsx_read_fifo(struct st_lsm6dsx_hw *hw)
if (fifo_status & cpu_to_le16(ST_LSM6DSX_FIFO_EMPTY_MASK))
return 0;
+ if (!pattern_len)
+ pattern_len = ST_LSM6DSX_SAMPLE_SIZE;
+
fifo_len = (le16_to_cpu(fifo_status) & fifo_diff_mask) *
ST_LSM6DSX_CHAN_SIZE;
fifo_len = (fifo_len / pattern_len) * pattern_len;
@@ -586,6 +589,9 @@ int st_lsm6dsx_read_tagged_fifo(struct st_lsm6dsx_hw *hw)
if (!fifo_len)
return 0;
+ if (!pattern_len)
+ pattern_len = ST_LSM6DSX_TAGGED_SAMPLE_SIZE;
+
for (read_len = 0; read_len < fifo_len; read_len += pattern_len) {
err = st_lsm6dsx_read_block(hw,
ST_LSM6DSX_REG_FIFO_OUT_TAG_ADDR,
diff --git a/drivers/infiniband/sw/rxe/rxe_cq.c b/drivers/infiniband/sw/rxe/rxe_cq.c
index 43394c3f29d4..129576a79698 100644
--- a/drivers/infiniband/sw/rxe/rxe_cq.c
+++ b/drivers/infiniband/sw/rxe/rxe_cq.c
@@ -69,11 +69,8 @@ int rxe_cq_from_init(struct rxe_dev *rxe, struct rxe_cq *cq, int cqe,
err = do_mmap_info(rxe, uresp ? &uresp->mi : NULL, udata,
cq->queue->buf, cq->queue->buf_size, &cq->queue->ip);
- if (err) {
- vfree(cq->queue->buf);
- kfree(cq->queue);
+ if (err)
return err;
- }
if (uresp)
cq->is_user = 1;
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index 82504b0ce01b..284eb7e4a2ae 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -163,6 +163,7 @@ static const char * const topbuttonpad_pnp_ids[] = {
static const char * const smbus_pnp_ids[] = {
/* all of the topbuttonpad_pnp_ids are valid, we just add some extras */
+ "DLL060d", /* Dell Precision M3800 */
"LEN0048", /* X1 Carbon 3 */
"LEN0046", /* X250 */
"LEN0049", /* Yoga 11e */
@@ -187,11 +188,15 @@ static const char * const smbus_pnp_ids[] = {
"LEN2054", /* E480 */
"LEN2055", /* E580 */
"LEN2068", /* T14 Gen 1 */
+ "SYN1221", /* TUXEDO InfinityBook Pro 14 v5 */
+ "SYN3003", /* HP EliteBook 850 G1 */
"SYN3015", /* HP EliteBook 840 G2 */
"SYN3052", /* HP EliteBook 840 G4 */
"SYN3221", /* HP 15-ay000 */
"SYN323d", /* HP Spectre X360 13-w013dx */
"SYN3257", /* HP Envy 13-ad105ng */
+ "TOS01f6", /* Dynabook Portege X30L-G */
+ "TOS0213", /* Dynabook Portege X30-D */
NULL
};
diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c
index 917ee5a67e78..e09391ab3deb 100644
--- a/drivers/iommu/amd/init.c
+++ b/drivers/iommu/amd/init.c
@@ -3243,6 +3243,14 @@ static int __init parse_ivrs_acpihid(char *str)
while (*uid == '0' && *(uid + 1))
uid++;
+ if (strlen(hid) >= ACPIHID_HID_LEN) {
+ pr_err("Invalid command line: hid is too long\n");
+ return 1;
+ } else if (strlen(uid) >= ACPIHID_UID_LEN) {
+ pr_err("Invalid command line: uid is too long\n");
+ return 1;
+ }
+
i = early_acpihid_map_size++;
memcpy(early_acpihid_map[i].hid, hid, strlen(hid));
memcpy(early_acpihid_map[i].uid, uid, strlen(uid));
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index c694ecbd304e..4c100e192223 100644
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -6234,6 +6234,9 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e30, quirk_iommu_igfx);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e40, quirk_iommu_igfx);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x2e90, quirk_iommu_igfx);
+/* QM57/QS57 integrated gfx malfunctions with dmar */
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0044, quirk_iommu_igfx);
+
/* Broadwell igfx malfunctions with dmar */
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x1606, quirk_iommu_igfx);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x160B, quirk_iommu_igfx);
@@ -6311,7 +6314,6 @@ static void quirk_calpella_no_shadow_gtt(struct pci_dev *dev)
}
}
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0040, quirk_calpella_no_shadow_gtt);
-DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0044, quirk_calpella_no_shadow_gtt);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0062, quirk_calpella_no_shadow_gtt);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x006a, quirk_calpella_no_shadow_gtt);
diff --git a/drivers/irqchip/irq-gic-v2m.c b/drivers/irqchip/irq-gic-v2m.c
index 205a27519607..b17deec1c5d4 100644
--- a/drivers/irqchip/irq-gic-v2m.c
+++ b/drivers/irqchip/irq-gic-v2m.c
@@ -263,7 +263,7 @@ static struct msi_domain_info gicv2m_pmsi_domain_info = {
.chip = &gicv2m_pmsi_irq_chip,
};
-static void gicv2m_teardown(void)
+static void __init gicv2m_teardown(void)
{
struct v2m_data *v2m, *tmp;
@@ -278,7 +278,7 @@ static void gicv2m_teardown(void)
}
}
-static int gicv2m_allocate_domains(struct irq_domain *parent)
+static __init int gicv2m_allocate_domains(struct irq_domain *parent)
{
struct irq_domain *inner_domain, *pci_domain, *plat_domain;
struct v2m_data *v2m;
@@ -408,7 +408,7 @@ static int __init gicv2m_init_one(struct fwnode_handle *fwnode,
return ret;
}
-static struct of_device_id gicv2m_device_id[] = {
+static __initconst struct of_device_id gicv2m_device_id[] = {
{ .compatible = "arm,gic-v2m-frame", },
{},
};
@@ -473,7 +473,7 @@ static struct fwnode_handle *gicv2m_get_fwnode(struct device *dev)
return data->fwnode;
}
-static bool acpi_check_amazon_graviton_quirks(void)
+static __init bool acpi_check_amazon_graviton_quirks(void)
{
static struct acpi_table_madt *madt;
acpi_status status;
diff --git a/drivers/mailbox/mailbox.c b/drivers/mailbox/mailbox.c
index 4229b9b5da98..6f54501dc776 100644
--- a/drivers/mailbox/mailbox.c
+++ b/drivers/mailbox/mailbox.c
@@ -350,11 +350,12 @@ struct mbox_chan *mbox_request_channel(struct mbox_client *cl, int index)
mutex_lock(&con_mutex);
- if (of_parse_phandle_with_args(dev->of_node, "mboxes",
- "#mbox-cells", index, &spec)) {
+ ret = of_parse_phandle_with_args(dev->of_node, "mboxes", "#mbox-cells",
+ index, &spec);
+ if (ret) {
dev_dbg(dev, "%s: can't parse \"mboxes\" property\n", __func__);
mutex_unlock(&con_mutex);
- return ERR_PTR(-ENODEV);
+ return ERR_PTR(ret);
}
chan = ERR_PTR(-EPROBE_DEFER);
diff --git a/drivers/md/dm-cache-target.c b/drivers/md/dm-cache-target.c
index 8a03357f8c93..fc6ad47c08b5 100644
--- a/drivers/md/dm-cache-target.c
+++ b/drivers/md/dm-cache-target.c
@@ -2958,6 +2958,27 @@ static dm_cblock_t get_cache_dev_size(struct cache *cache)
return to_cblock(size);
}
+static bool can_resume(struct cache *cache)
+{
+ /*
+ * Disallow retrying the resume operation for devices that failed the
+ * first resume attempt, as the failure leaves the policy object partially
+ * initialized. Retrying could trigger BUG_ON when loading cache mappings
+ * into the incomplete policy object.
+ */
+ if (cache->sized && !cache->loaded_mappings) {
+ if (get_cache_mode(cache) != CM_WRITE)
+ DMERR("%s: unable to resume a failed-loaded cache, please check metadata.",
+ cache_device_name(cache));
+ else
+ DMERR("%s: unable to resume cache due to missing proper cache table reload",
+ cache_device_name(cache));
+ return false;
+ }
+
+ return true;
+}
+
static bool can_resize(struct cache *cache, dm_cblock_t new_size)
{
if (from_cblock(new_size) > from_cblock(cache->cache_size)) {
@@ -3006,6 +3027,9 @@ static int cache_preresume(struct dm_target *ti)
struct cache *cache = ti->private;
dm_cblock_t csize = get_cache_dev_size(cache);
+ if (!can_resume(cache))
+ return -EINVAL;
+
/*
* Check to see if the cache has resized.
*/
diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c
index 934887f8a855..07a7b4e51f0e 100644
--- a/drivers/md/dm-integrity.c
+++ b/drivers/md/dm-integrity.c
@@ -4392,7 +4392,7 @@ static void dm_integrity_dtr(struct dm_target *ti)
BUG_ON(!RB_EMPTY_ROOT(&ic->in_progress));
BUG_ON(!list_empty(&ic->wait_list));
- if (ic->mode == 'B')
+ if (ic->mode == 'B' && ic->bitmap_flush_work.work.func)
cancel_delayed_work_sync(&ic->bitmap_flush_work);
if (ic->metadata_wq)
destroy_workqueue(ic->metadata_wq);
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index 31bcdcd93c7a..4351de47fa77 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -513,8 +513,9 @@ static char **realloc_argv(unsigned *size, char **old_argv)
gfp = GFP_NOIO;
}
argv = kmalloc_array(new_size, sizeof(*argv), gfp);
- if (argv && old_argv) {
- memcpy(argv, old_argv, *size * sizeof(*argv));
+ if (argv) {
+ if (old_argv)
+ memcpy(argv, old_argv, *size * sizeof(*argv));
*size = new_size;
}
@@ -681,6 +682,10 @@ int dm_table_add_target(struct dm_table *t, const char *type,
DMERR("%s: zero-length target", dm_device_name(t->md));
return -EINVAL;
}
+ if (start + len < start || start + len > LLONG_MAX >> SECTOR_SHIFT) {
+ DMERR("%s: too large device", dm_device_name(t->md));
+ return -EINVAL;
+ }
tgt->type = dm_get_target_type(type);
if (!tgt->type) {
diff --git a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
index b7e0ec265b70..6e3b3643a2cd 100644
--- a/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
+++ b/drivers/media/platform/sti/c8sectpfe/c8sectpfe-core.c
@@ -811,13 +811,12 @@ static int c8sectpfe_probe(struct platform_device *pdev)
}
tsin->i2c_adapter =
of_find_i2c_adapter_by_node(i2c_bus);
+ of_node_put(i2c_bus);
if (!tsin->i2c_adapter) {
dev_err(&pdev->dev, "No i2c adapter found\n");
- of_node_put(i2c_bus);
ret = -ENODEV;
goto err_clk_disable;
}
- of_node_put(i2c_bus);
tsin->rst_gpio = of_get_named_gpio(child, "reset-gpios", 0);
diff --git a/drivers/media/usb/cx231xx/cx231xx-417.c b/drivers/media/usb/cx231xx/cx231xx-417.c
index c5e21785fafe..02343e88cc61 100644
--- a/drivers/media/usb/cx231xx/cx231xx-417.c
+++ b/drivers/media/usb/cx231xx/cx231xx-417.c
@@ -1722,6 +1722,8 @@ static void cx231xx_video_dev_init(
vfd->lock = &dev->lock;
vfd->release = video_device_release_empty;
vfd->ctrl_handler = &dev->mpeg_ctrl_handler.hdl;
+ vfd->device_caps = V4L2_CAP_READWRITE | V4L2_CAP_STREAMING |
+ V4L2_CAP_VIDEO_CAPTURE;
video_set_drvdata(vfd, dev);
if (dev->tuner_type == TUNER_ABSENT) {
v4l2_disable_ioctl(vfd, VIDIOC_G_FREQUENCY);
diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c
index fbf0dcb313c8..67d3e6511a14 100644
--- a/drivers/media/v4l2-core/v4l2-subdev.c
+++ b/drivers/media/v4l2-core/v4l2-subdev.c
@@ -312,6 +312,8 @@ static int call_enum_dv_timings(struct v4l2_subdev *sd,
static int call_get_mbus_config(struct v4l2_subdev *sd, unsigned int pad,
struct v4l2_mbus_config *config)
{
+ memset(config, 0, sizeof(*config));
+
return check_pad(sd, pad) ? :
sd->ops->pad->get_mbus_config(sd, pad, config);
}
diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
index 24e524a1b927..a15b44ca87d3 100644
--- a/drivers/mmc/host/renesas_sdhi_core.c
+++ b/drivers/mmc/host/renesas_sdhi_core.c
@@ -1108,26 +1108,26 @@ int renesas_sdhi_probe(struct platform_device *pdev,
num_irqs = platform_irq_count(pdev);
if (num_irqs < 0) {
ret = num_irqs;
- goto eirq;
+ goto edisclk;
}
/* There must be at least one IRQ source */
if (!num_irqs) {
ret = -ENXIO;
- goto eirq;
+ goto edisclk;
}
for (i = 0; i < num_irqs; i++) {
irq = platform_get_irq(pdev, i);
if (irq < 0) {
ret = irq;
- goto eirq;
+ goto edisclk;
}
ret = devm_request_irq(&pdev->dev, irq, tmio_mmc_irq, 0,
dev_name(&pdev->dev), host);
if (ret)
- goto eirq;
+ goto edisclk;
}
ret = tmio_mmc_host_probe(host);
@@ -1139,8 +1139,6 @@ int renesas_sdhi_probe(struct platform_device *pdev,
return ret;
-eirq:
- tmio_mmc_host_remove(host);
edisclk:
renesas_sdhi_clk_disable(host);
efree:
diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
index 67d9dd2165ec..376959569353 100644
--- a/drivers/mmc/host/sdhci-pci-core.c
+++ b/drivers/mmc/host/sdhci-pci-core.c
@@ -666,8 +666,12 @@ static void sdhci_intel_set_power(struct sdhci_host *host, unsigned char mode,
sdhci_set_power(host, mode, vdd);
- if (mode == MMC_POWER_OFF)
+ if (mode == MMC_POWER_OFF) {
+ if (slot->chip->pdev->device == PCI_DEVICE_ID_INTEL_APL_SD ||
+ slot->chip->pdev->device == PCI_DEVICE_ID_INTEL_BYT_SD)
+ usleep_range(15000, 17500);
return;
+ }
/*
* Bus power might not enable after D3 -> D0 transition due to the
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 9091930f5859..3d601a3f31c1 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2010,10 +2010,15 @@ void sdhci_set_clock(struct sdhci_host *host, unsigned int clock)
host->mmc->actual_clock = 0;
- sdhci_writew(host, 0, SDHCI_CLOCK_CONTROL);
+ clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL);
+ if (clk & SDHCI_CLOCK_CARD_EN)
+ sdhci_writew(host, clk & ~SDHCI_CLOCK_CARD_EN,
+ SDHCI_CLOCK_CONTROL);
- if (clock == 0)
+ if (clock == 0) {
+ sdhci_writew(host, 0, SDHCI_CLOCK_CONTROL);
return;
+ }
clk = sdhci_calc_clk(host, clock, &host->mmc->actual_clock);
sdhci_enable_clk(host, clk);
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 7caaf5b49c7b..c5ccd42af528 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -2239,7 +2239,7 @@ static int __bond_release_one(struct net_device *bond_dev,
RCU_INIT_POINTER(bond->current_arp_slave, NULL);
- if (!all && (!bond->params.fail_over_mac ||
+ if (!all && (bond->params.fail_over_mac != BOND_FOM_ACTIVE ||
BOND_MODE(bond) != BOND_MODE_ACTIVEBACKUP)) {
if (ether_addr_equal_64bits(bond_dev->dev_addr, slave->perm_hwaddr) &&
bond_has_slaves(bond))
diff --git a/drivers/net/can/c_can/c_can_platform.c b/drivers/net/can/c_can/c_can_platform.c
index 8f0dde85e3da..1e0bf3405394 100644
--- a/drivers/net/can/c_can/c_can_platform.c
+++ b/drivers/net/can/c_can/c_can_platform.c
@@ -330,7 +330,7 @@ static int c_can_plat_probe(struct platform_device *pdev)
/* Check if we need custom RAMINIT via syscon. Mostly for TI
* platforms. Only supported with DT boot.
*/
- if (np && of_property_read_bool(np, "syscon-raminit")) {
+ if (np && of_property_present(np, "syscon-raminit")) {
u32 id;
struct c_can_raminit *raminit = &priv->raminit_sys;
diff --git a/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c b/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c
index 189d22658813..3d1ac72f689e 100644
--- a/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c
+++ b/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c
@@ -2889,8 +2889,8 @@ static int mcp251xfd_remove(struct spi_device *spi)
struct mcp251xfd_priv *priv = spi_get_drvdata(spi);
struct net_device *ndev = priv->ndev;
- can_rx_offload_del(&priv->offload);
mcp251xfd_unregister(priv);
+ can_rx_offload_del(&priv->offload);
spi->max_speed_hz = priv->spi_max_speed_hz_orig;
free_candev(ndev);
diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
index d3428e62bef2..39a56cedbc1f 100644
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
@@ -373,15 +373,17 @@ static void b53_enable_vlan(struct b53_device *dev, bool enable,
b53_read8(dev, B53_VLAN_PAGE, B53_VLAN_CTRL5, &vc5);
}
+ vc1 &= ~VC1_RX_MCST_FWD_EN;
+
if (enable) {
vc0 |= VC0_VLAN_EN | VC0_VID_CHK_EN | VC0_VID_HASH_VID;
- vc1 |= VC1_RX_MCST_UNTAG_EN | VC1_RX_MCST_FWD_EN;
+ vc1 |= VC1_RX_MCST_UNTAG_EN;
vc4 &= ~VC4_ING_VID_CHECK_MASK;
if (enable_filtering) {
vc4 |= VC4_ING_VID_VIO_DROP << VC4_ING_VID_CHECK_S;
vc5 |= VC5_DROP_VTABLE_MISS;
} else {
- vc4 |= VC4_ING_VID_VIO_FWD << VC4_ING_VID_CHECK_S;
+ vc4 |= VC4_NO_ING_VID_CHK << VC4_ING_VID_CHECK_S;
vc5 &= ~VC5_DROP_VTABLE_MISS;
}
@@ -393,7 +395,7 @@ static void b53_enable_vlan(struct b53_device *dev, bool enable,
} else {
vc0 &= ~(VC0_VLAN_EN | VC0_VID_CHK_EN | VC0_VID_HASH_VID);
- vc1 &= ~(VC1_RX_MCST_UNTAG_EN | VC1_RX_MCST_FWD_EN);
+ vc1 &= ~VC1_RX_MCST_UNTAG_EN;
vc4 &= ~VC4_ING_VID_CHECK_MASK;
vc5 &= ~VC5_DROP_VTABLE_MISS;
@@ -1870,7 +1872,7 @@ EXPORT_SYMBOL(b53_br_join);
void b53_br_leave(struct dsa_switch *ds, int port, struct net_device *br)
{
struct b53_device *dev = ds->priv;
- struct b53_vlan *vl = &dev->vlans[0];
+ struct b53_vlan *vl;
s8 cpu_port = dsa_to_port(ds, port)->cpu_dp->index;
unsigned int i;
u16 pvlan, reg, pvid;
@@ -1896,6 +1898,7 @@ void b53_br_leave(struct dsa_switch *ds, int port, struct net_device *br)
dev->ports[port].vlan_ctl_mask = pvlan;
pvid = b53_default_pvid(dev);
+ vl = &dev->vlans[pvid];
/* Make this port join all VLANs without VLAN entries */
if (is58xx(dev)) {
diff --git a/drivers/net/dsa/sja1105/sja1105_main.c b/drivers/net/dsa/sja1105/sja1105_main.c
index 4362fe0f346d..5f5e5b8267e0 100644
--- a/drivers/net/dsa/sja1105/sja1105_main.c
+++ b/drivers/net/dsa/sja1105/sja1105_main.c
@@ -1644,6 +1644,7 @@ static void sja1105_bridge_stp_state_set(struct dsa_switch *ds, int port,
switch (state) {
case BR_STATE_DISABLED:
case BR_STATE_BLOCKING:
+ case BR_STATE_LISTENING:
/* From UM10944 description of DRPDTAG (why put this there?):
* "Management traffic flows to the port regardless of the state
* of the INGRESS flag". So BPDUs are still be allowed to pass.
@@ -1653,11 +1654,6 @@ static void sja1105_bridge_stp_state_set(struct dsa_switch *ds, int port,
mac[port].egress = false;
mac[port].dyn_learn = false;
break;
- case BR_STATE_LISTENING:
- mac[port].ingress = true;
- mac[port].egress = false;
- mac[port].dyn_learn = false;
- break;
case BR_STATE_LEARNING:
mac[port].ingress = true;
mac[port].egress = false;
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-desc.c b/drivers/net/ethernet/amd/xgbe/xgbe-desc.c
index 230726d7b74f..d41b58fad37b 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-desc.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-desc.c
@@ -373,8 +373,13 @@ static int xgbe_map_rx_buffer(struct xgbe_prv_data *pdata,
}
/* Set up the header page info */
- xgbe_set_buffer_data(&rdata->rx.hdr, &ring->rx_hdr_pa,
- XGBE_SKB_ALLOC_SIZE);
+ if (pdata->netdev->features & NETIF_F_RXCSUM) {
+ xgbe_set_buffer_data(&rdata->rx.hdr, &ring->rx_hdr_pa,
+ XGBE_SKB_ALLOC_SIZE);
+ } else {
+ xgbe_set_buffer_data(&rdata->rx.hdr, &ring->rx_hdr_pa,
+ pdata->rx_buf_size);
+ }
/* Set up the buffer page info */
xgbe_set_buffer_data(&rdata->rx.buf, &ring->rx_buf_pa,
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-dev.c b/drivers/net/ethernet/amd/xgbe/xgbe-dev.c
index decc1c09a031..0f7d33632853 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-dev.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-dev.c
@@ -320,6 +320,18 @@ static void xgbe_config_sph_mode(struct xgbe_prv_data *pdata)
XGMAC_IOWRITE_BITS(pdata, MAC_RCR, HDSMS, XGBE_SPH_HDSMS_SIZE);
}
+static void xgbe_disable_sph_mode(struct xgbe_prv_data *pdata)
+{
+ unsigned int i;
+
+ for (i = 0; i < pdata->channel_count; i++) {
+ if (!pdata->channel[i]->rx_ring)
+ break;
+
+ XGMAC_DMA_IOWRITE_BITS(pdata->channel[i], DMA_CH_CR, SPH, 0);
+ }
+}
+
static int xgbe_write_rss_reg(struct xgbe_prv_data *pdata, unsigned int type,
unsigned int index, unsigned int val)
{
@@ -3495,8 +3507,12 @@ static int xgbe_init(struct xgbe_prv_data *pdata)
xgbe_config_tx_coalesce(pdata);
xgbe_config_rx_buffer_size(pdata);
xgbe_config_tso_mode(pdata);
- xgbe_config_sph_mode(pdata);
- xgbe_config_rss(pdata);
+
+ if (pdata->netdev->features & NETIF_F_RXCSUM) {
+ xgbe_config_sph_mode(pdata);
+ xgbe_config_rss(pdata);
+ }
+
desc_if->wrapper_tx_desc_init(pdata);
desc_if->wrapper_rx_desc_init(pdata);
xgbe_enable_dma_interrupts(pdata);
@@ -3650,5 +3666,9 @@ void xgbe_init_function_ptrs_dev(struct xgbe_hw_if *hw_if)
hw_if->disable_vxlan = xgbe_disable_vxlan;
hw_if->set_vxlan_id = xgbe_set_vxlan_id;
+ /* For Split Header*/
+ hw_if->enable_sph = xgbe_config_sph_mode;
+ hw_if->disable_sph = xgbe_disable_sph_mode;
+
DBGPR("<--xgbe_init_function_ptrs\n");
}
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
index 23401958bc13..8926011604e3 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
+++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
@@ -2264,10 +2264,17 @@ static int xgbe_set_features(struct net_device *netdev,
if (ret)
return ret;
- if ((features & NETIF_F_RXCSUM) && !rxcsum)
+ if ((features & NETIF_F_RXCSUM) && !rxcsum) {
+ hw_if->enable_sph(pdata);
+ hw_if->enable_vxlan(pdata);
hw_if->enable_rx_csum(pdata);
- else if (!(features & NETIF_F_RXCSUM) && rxcsum)
+ schedule_work(&pdata->restart_work);
+ } else if (!(features & NETIF_F_RXCSUM) && rxcsum) {
+ hw_if->disable_sph(pdata);
+ hw_if->disable_vxlan(pdata);
hw_if->disable_rx_csum(pdata);
+ schedule_work(&pdata->restart_work);
+ }
if ((features & NETIF_F_HW_VLAN_CTAG_RX) && !rxvlan)
hw_if->enable_rx_vlan_stripping(pdata);
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe.h b/drivers/net/ethernet/amd/xgbe/xgbe.h
index e0b8f3c4cc0b..0493de8ee545 100644
--- a/drivers/net/ethernet/amd/xgbe/xgbe.h
+++ b/drivers/net/ethernet/amd/xgbe/xgbe.h
@@ -833,6 +833,10 @@ struct xgbe_hw_if {
void (*enable_vxlan)(struct xgbe_prv_data *);
void (*disable_vxlan)(struct xgbe_prv_data *);
void (*set_vxlan_id)(struct xgbe_prv_data *);
+
+ /* For Split Header */
+ void (*enable_sph)(struct xgbe_prv_data *pdata);
+ void (*disable_sph)(struct xgbe_prv_data *pdata);
};
/* This structure represents implementation specific routines for an
diff --git a/drivers/net/ethernet/apm/xgene-v2/main.c b/drivers/net/ethernet/apm/xgene-v2/main.c
index 80399c8980bd..627f86014100 100644
--- a/drivers/net/ethernet/apm/xgene-v2/main.c
+++ b/drivers/net/ethernet/apm/xgene-v2/main.c
@@ -9,8 +9,6 @@
#include "main.h"
-static const struct acpi_device_id xge_acpi_match[];
-
static int xge_get_resources(struct xge_pdata *pdata)
{
struct platform_device *pdev;
@@ -733,7 +731,7 @@ MODULE_DEVICE_TABLE(acpi, xge_acpi_match);
static struct platform_driver xge_driver = {
.driver = {
.name = "xgene-enet-v2",
- .acpi_match_table = ACPI_PTR(xge_acpi_match),
+ .acpi_match_table = xge_acpi_match,
},
.probe = xge_probe,
.remove = xge_remove,
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
index 2984234df67e..4dfb65b0bf1c 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
@@ -1344,6 +1344,17 @@ static int bnxt_get_regs_len(struct net_device *dev)
return reg_len;
}
+#define BNXT_PCIE_32B_ENTRY(start, end) \
+ { offsetof(struct pcie_ctx_hw_stats, start), \
+ offsetof(struct pcie_ctx_hw_stats, end) }
+
+static const struct {
+ u16 start;
+ u16 end;
+} bnxt_pcie_32b_entries[] = {
+ BNXT_PCIE_32B_ENTRY(pcie_ltssm_histogram[0], pcie_ltssm_histogram[3]),
+};
+
static void bnxt_get_regs(struct net_device *dev, struct ethtool_regs *regs,
void *_p)
{
@@ -1372,12 +1383,27 @@ static void bnxt_get_regs(struct net_device *dev, struct ethtool_regs *regs,
mutex_lock(&bp->hwrm_cmd_lock);
rc = _hwrm_send_message(bp, &req, sizeof(req), HWRM_CMD_TIMEOUT);
if (!rc) {
- __le64 *src = (__le64 *)hw_pcie_stats;
- u64 *dst = (u64 *)(_p + BNXT_PXP_REG_LEN);
- int i;
+ u8 *dst = (u8 *)(_p + BNXT_PXP_REG_LEN);
+ u8 *src = (u8 *)hw_pcie_stats;
+ int i, j;
+
+ for (i = 0, j = 0; i < sizeof(*hw_pcie_stats); ) {
+ if (i >= bnxt_pcie_32b_entries[j].start &&
+ i <= bnxt_pcie_32b_entries[j].end) {
+ u32 *dst32 = (u32 *)(dst + i);
+
+ *dst32 = le32_to_cpu(*(__le32 *)(src + i));
+ i += 4;
+ if (i > bnxt_pcie_32b_entries[j].end &&
+ j < ARRAY_SIZE(bnxt_pcie_32b_entries) - 1)
+ j++;
+ } else {
+ u64 *dst64 = (u64 *)(dst + i);
- for (i = 0; i < sizeof(*hw_pcie_stats) / sizeof(__le64); i++)
- dst[i] = le64_to_cpu(src[i]);
+ *dst64 = le64_to_cpu(*(__le64 *)(src + i));
+ i += 8;
+ }
+ }
}
mutex_unlock(&bp->hwrm_cmd_lock);
dma_free_coherent(&bp->pdev->dev, sizeof(*hw_pcie_stats), hw_pcie_stats,
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index 0f18837def3c..74f3cabf8ed6 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -826,22 +826,15 @@ static void macb_update_stats(struct macb *bp)
static int macb_halt_tx(struct macb *bp)
{
- unsigned long halt_time, timeout;
- u32 status;
+ u32 status;
macb_writel(bp, NCR, macb_readl(bp, NCR) | MACB_BIT(THALT));
- timeout = jiffies + usecs_to_jiffies(MACB_HALT_TIMEOUT);
- do {
- halt_time = jiffies;
- status = macb_readl(bp, TSR);
- if (!(status & MACB_BIT(TGO)))
- return 0;
-
- udelay(250);
- } while (time_before(halt_time, timeout));
-
- return -ETIMEDOUT;
+ /* Poll TSR until TGO is cleared or timeout. */
+ return read_poll_timeout_atomic(macb_readl, status,
+ !(status & MACB_BIT(TGO)),
+ 250, MACB_HALT_TIMEOUT, false,
+ bp, TSR);
}
static void macb_tx_unmap(struct macb *bp, struct macb_tx_skb *tx_skb)
diff --git a/drivers/net/ethernet/dlink/dl2k.c b/drivers/net/ethernet/dlink/dl2k.c
index 734acb834c98..66e0fbdcef22 100644
--- a/drivers/net/ethernet/dlink/dl2k.c
+++ b/drivers/net/ethernet/dlink/dl2k.c
@@ -353,7 +353,7 @@ parse_eeprom (struct net_device *dev)
dev->dev_addr[i] = psrom->mac_addr[i];
if (np->chip_id == CHIP_IP1000A) {
- np->led_mode = psrom->led_mode;
+ np->led_mode = le16_to_cpu(psrom->led_mode);
return 0;
}
diff --git a/drivers/net/ethernet/dlink/dl2k.h b/drivers/net/ethernet/dlink/dl2k.h
index 195dc6cfd895..0e33e2eaae96 100644
--- a/drivers/net/ethernet/dlink/dl2k.h
+++ b/drivers/net/ethernet/dlink/dl2k.h
@@ -335,7 +335,7 @@ typedef struct t_SROM {
u16 sub_system_id; /* 0x06 */
u16 pci_base_1; /* 0x08 (IP1000A only) */
u16 pci_base_2; /* 0x0a (IP1000A only) */
- u16 led_mode; /* 0x0c (IP1000A only) */
+ __le16 led_mode; /* 0x0c (IP1000A only) */
u16 reserved1[9]; /* 0x0e-0x1f */
u8 mac_addr[6]; /* 0x20-0x25 */
u8 reserved2[10]; /* 0x26-0x2f */
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 8e30e999456d..805434ba3035 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -602,7 +602,12 @@ static int fec_enet_txq_submit_skb(struct fec_enet_priv_tx_q *txq,
txq->bd.cur = bdp;
/* Trigger transmission start */
- writel(0, txq->bd.reg_desc_active);
+ if (!(fep->quirks & FEC_QUIRK_ERR007885) ||
+ !readl(txq->bd.reg_desc_active) ||
+ !readl(txq->bd.reg_desc_active) ||
+ !readl(txq->bd.reg_desc_active) ||
+ !readl(txq->bd.reg_desc_active))
+ writel(0, txq->bd.reg_desc_active);
return 0;
}
diff --git a/drivers/net/ethernet/intel/ice/ice_arfs.c b/drivers/net/ethernet/intel/ice/ice_arfs.c
index 632f16ffee40..085b1a0d67c5 100644
--- a/drivers/net/ethernet/intel/ice/ice_arfs.c
+++ b/drivers/net/ethernet/intel/ice/ice_arfs.c
@@ -577,7 +577,7 @@ void ice_free_cpu_rx_rmap(struct ice_vsi *vsi)
{
struct net_device *netdev;
- if (!vsi || vsi->type != ICE_VSI_PF || !vsi->arfs_fltr_list)
+ if (!vsi || vsi->type != ICE_VSI_PF)
return;
netdev = vsi->netdev;
@@ -600,7 +600,7 @@ int ice_set_cpu_rx_rmap(struct ice_vsi *vsi)
int base_idx, i;
if (!vsi || vsi->type != ICE_VSI_PF)
- return -EINVAL;
+ return 0;
pf = vsi->back;
netdev = vsi->netdev;
@@ -638,7 +638,6 @@ void ice_remove_arfs(struct ice_pf *pf)
if (!pf_vsi)
return;
- ice_free_cpu_rx_rmap(pf_vsi);
ice_clear_arfs(pf_vsi);
}
@@ -655,9 +654,5 @@ void ice_rebuild_arfs(struct ice_pf *pf)
return;
ice_remove_arfs(pf);
- if (ice_set_cpu_rx_rmap(pf_vsi)) {
- dev_err(ice_pf_to_dev(pf), "Failed to rebuild aRFS\n");
- return;
- }
ice_init_arfs(pf_vsi);
}
diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c
index e99c8c10bc61..d3e5bf180c37 100644
--- a/drivers/net/ethernet/intel/ice/ice_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_lib.c
@@ -2411,6 +2411,8 @@ void ice_vsi_free_irq(struct ice_vsi *vsi)
return;
vsi->irqs_ready = false;
+ ice_free_cpu_rx_rmap(vsi);
+
ice_for_each_q_vector(vsi, i) {
u16 vector = i + base;
int irq_num;
@@ -2424,7 +2426,8 @@ void ice_vsi_free_irq(struct ice_vsi *vsi)
continue;
/* clear the affinity notifier in the IRQ descriptor */
- irq_set_affinity_notifier(irq_num, NULL);
+ if (!IS_ENABLED(CONFIG_RFS_ACCEL))
+ irq_set_affinity_notifier(irq_num, NULL);
/* clear the affinity_mask in the IRQ descriptor */
irq_set_affinity_hint(irq_num, NULL);
diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c
index 035bc90c8124..a337a6826a84 100644
--- a/drivers/net/ethernet/intel/ice/ice_main.c
+++ b/drivers/net/ethernet/intel/ice/ice_main.c
@@ -2247,6 +2247,13 @@ static int ice_vsi_req_irq_msix(struct ice_vsi *vsi, char *basename)
irq_set_affinity_hint(irq_num, &q_vector->affinity_mask);
}
+ err = ice_set_cpu_rx_rmap(vsi);
+ if (err) {
+ netdev_err(vsi->netdev, "Failed to setup CPU RMAP on VSI %u: %pe\n",
+ vsi->vsi_num, ERR_PTR(err));
+ goto free_q_irqs;
+ }
+
vsi->irqs_ready = true;
return 0;
@@ -3242,22 +3249,12 @@ static int ice_setup_pf_sw(struct ice_pf *pf)
*/
ice_napi_add(vsi);
- status = ice_set_cpu_rx_rmap(vsi);
- if (status) {
- dev_err(ice_pf_to_dev(pf), "Failed to set CPU Rx map VSI %d error %d\n",
- vsi->vsi_num, status);
- status = -EINVAL;
- goto unroll_napi_add;
- }
status = ice_init_mac_fltr(pf);
if (status)
- goto free_cpu_rx_map;
+ goto unroll_napi_add;
return status;
-free_cpu_rx_map:
- ice_free_cpu_rx_rmap(vsi);
-
unroll_napi_add:
if (vsi) {
ice_napi_del(vsi);
@@ -4598,7 +4595,6 @@ static int __maybe_unused ice_suspend(struct device *dev)
continue;
ice_vsi_free_q_vectors(pf->vsi[v]);
}
- ice_free_cpu_rx_rmap(ice_get_main_vsi(pf));
ice_clear_interrupt_scheme(pf);
pci_save_state(pdev);
diff --git a/drivers/net/ethernet/mellanox/mlx4/alloc.c b/drivers/net/ethernet/mellanox/mlx4/alloc.c
index b330020dc0d6..f2bded847e61 100644
--- a/drivers/net/ethernet/mellanox/mlx4/alloc.c
+++ b/drivers/net/ethernet/mellanox/mlx4/alloc.c
@@ -682,9 +682,9 @@ static struct mlx4_db_pgdir *mlx4_alloc_db_pgdir(struct device *dma_device)
}
static int mlx4_alloc_db_from_pgdir(struct mlx4_db_pgdir *pgdir,
- struct mlx4_db *db, int order)
+ struct mlx4_db *db, unsigned int order)
{
- int o;
+ unsigned int o;
int i;
for (o = order; o <= 1; ++o) {
@@ -712,7 +712,7 @@ static int mlx4_alloc_db_from_pgdir(struct mlx4_db_pgdir *pgdir,
return 0;
}
-int mlx4_db_alloc(struct mlx4_dev *dev, struct mlx4_db *db, int order)
+int mlx4_db_alloc(struct mlx4_dev *dev, struct mlx4_db *db, unsigned int order)
{
struct mlx4_priv *priv = mlx4_priv(dev);
struct mlx4_db_pgdir *pgdir;
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_tx.c b/drivers/net/ethernet/mellanox/mlx4/en_tx.c
index 59b097cda327..6c52ddef88a6 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_tx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_tx.c
@@ -445,6 +445,8 @@ int mlx4_en_process_tx_cq(struct net_device *dev,
if (unlikely(!priv->port_up))
return 0;
+ if (unlikely(!napi_budget) && cq->type == TX_XDP)
+ return 0;
netdev_txq_bql_complete_prefetchw(ring->tx_queue);
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
index 6512bb231e7e..2fb1fe9a8eee 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
@@ -53,6 +53,7 @@
#define MLX5E_REP_PARAMS_DEF_LOG_SQ_SIZE \
max(0x7, MLX5E_PARAMS_MINIMUM_LOG_SQ_SIZE)
#define MLX5E_REP_PARAMS_DEF_NUM_CHANNELS 1
+#define MLX5E_REP_PARAMS_DEF_LOG_RQ_SIZE 0x8
static const char mlx5e_rep_driver_name[] = "mlx5e_rep";
@@ -702,6 +703,8 @@ static void mlx5e_build_rep_params(struct net_device *netdev)
/* RQ */
mlx5e_build_rq_params(mdev, params);
+ if (!mlx5e_is_uplink_rep(priv) && mlx5_core_is_ecpf(mdev))
+ params->log_rq_mtu_frames = MLX5E_REP_PARAMS_DEF_LOG_RQ_SIZE;
/* CQ moderation params */
params->rx_dim_enabled = MLX5_CAP_GEN(mdev, cq_moderation);
@@ -740,6 +743,8 @@ static void mlx5e_build_rep_netdev(struct net_device *netdev)
}
netdev->watchdog_timeo = 15 * HZ;
+ if (mlx5_core_is_ecpf(mdev))
+ netdev->tx_queue_len = 1 << MLX5E_REP_PARAMS_DEF_LOG_SQ_SIZE;
netdev->features |= NETIF_F_NETNS_LOCAL;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c b/drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c
index ce8ab1f01876..c380340b8166 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c
@@ -188,6 +188,9 @@ mlx5e_test_loopback_validate(struct sk_buff *skb,
struct udphdr *udph;
struct iphdr *iph;
+ if (skb_linearize(skb))
+ goto out;
+
/* We are only going to peek, no need to clone the SKB */
if (MLX5E_TEST_PKT_SIZE - ETH_HLEN > skb_headlen(skb))
goto out;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
index ccc7dd3e738a..7c6646f932b6 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
@@ -2317,7 +2317,9 @@ int esw_offloads_enable(struct mlx5_eswitch *esw)
esw->offloads.encap = DEVLINK_ESWITCH_ENCAP_MODE_NONE;
mutex_init(&esw->offloads.termtbl_mutex);
- mlx5_rdma_enable_roce(esw->dev);
+ err = mlx5_rdma_enable_roce(esw->dev);
+ if (err)
+ goto err_roce;
err = mlx5_esw_host_number_init(esw);
if (err)
@@ -2366,6 +2368,7 @@ int esw_offloads_enable(struct mlx5_eswitch *esw)
err_metadata:
esw->flags &= ~MLX5_ESWITCH_VPORT_MATCH_METADATA;
mlx5_rdma_disable_roce(esw->dev);
+err_roce:
mutex_destroy(&esw->offloads.termtbl_mutex);
return err;
}
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/events.c b/drivers/net/ethernet/mellanox/mlx5/core/events.c
index 3ce17c3d7a00..5e8db7a6185a 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/events.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/events.c
@@ -156,11 +156,16 @@ static int temp_warn(struct notifier_block *nb, unsigned long type, void *data)
u64 value_msb;
value_lsb = be64_to_cpu(eqe->data.temp_warning.sensor_warning_lsb);
+ /* bit 1-63 are not supported for NICs,
+ * hence read only bit 0 (asic) from lsb.
+ */
+ value_lsb &= 0x1;
value_msb = be64_to_cpu(eqe->data.temp_warning.sensor_warning_msb);
- mlx5_core_warn(events->dev,
- "High temperature on sensors with bit set %llx %llx",
- value_msb, value_lsb);
+ if (net_ratelimit())
+ mlx5_core_warn(events->dev,
+ "High temperature on sensors with bit set %llx %llx",
+ value_msb, value_lsb);
return NOTIFY_OK;
}
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/health.c b/drivers/net/ethernet/mellanox/mlx5/core/health.c
index f42e118f3290..d48912d7afe5 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/health.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/health.c
@@ -733,6 +733,7 @@ static void poll_health(struct timer_list *t)
health->prev = count;
if (health->miss_counter == MAX_MISSES) {
mlx5_core_err(dev, "device's health compromised - reached miss count\n");
+ health->synd = ioread8(&h->synd);
print_health_info(dev);
queue_work(health->wq, &health->report_work);
}
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c b/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c
index 6fd974920394..2f886bd77664 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c
@@ -88,7 +88,6 @@ static void irq_set_name(char *name, int vecidx)
snprintf(name, MLX5_MAX_IRQ_NAME, "mlx5_comp%d",
vecidx - MLX5_IRQ_VEC_COMP_BASE);
- return;
}
static int request_irqs(struct mlx5_core_dev *dev, int nvec)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/rdma.c b/drivers/net/ethernet/mellanox/mlx5/core/rdma.c
index 2389239acadc..e61a4fa46d77 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/rdma.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/rdma.c
@@ -130,8 +130,8 @@ static void mlx5_rdma_make_default_gid(struct mlx5_core_dev *dev, union ib_gid *
static int mlx5_rdma_add_roce_addr(struct mlx5_core_dev *dev)
{
+ u8 mac[ETH_ALEN] = {};
union ib_gid gid;
- u8 mac[ETH_ALEN];
mlx5_rdma_make_default_gid(dev, &gid);
return mlx5_core_roce_gid_set(dev, 0,
@@ -152,17 +152,17 @@ void mlx5_rdma_disable_roce(struct mlx5_core_dev *dev)
mlx5_nic_vport_disable_roce(dev);
}
-void mlx5_rdma_enable_roce(struct mlx5_core_dev *dev)
+int mlx5_rdma_enable_roce(struct mlx5_core_dev *dev)
{
int err;
if (!MLX5_CAP_GEN(dev, roce))
- return;
+ return 0;
err = mlx5_nic_vport_enable_roce(dev);
if (err) {
mlx5_core_err(dev, "Failed to enable RoCE: %d\n", err);
- return;
+ return err;
}
err = mlx5_rdma_add_roce_addr(dev);
@@ -177,11 +177,11 @@ void mlx5_rdma_enable_roce(struct mlx5_core_dev *dev)
goto del_roce_addr;
}
- return;
+ return err;
del_roce_addr:
mlx5_rdma_del_roce_addr(dev);
disable_roce:
mlx5_nic_vport_disable_roce(dev);
- return;
+ return err;
}
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/rdma.h b/drivers/net/ethernet/mellanox/mlx5/core/rdma.h
index 750cff2a71a4..3d9e76c3d42f 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/rdma.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/rdma.h
@@ -8,12 +8,12 @@
#ifdef CONFIG_MLX5_ESWITCH
-void mlx5_rdma_enable_roce(struct mlx5_core_dev *dev);
+int mlx5_rdma_enable_roce(struct mlx5_core_dev *dev);
void mlx5_rdma_disable_roce(struct mlx5_core_dev *dev);
#else /* CONFIG_MLX5_ESWITCH */
-static inline void mlx5_rdma_enable_roce(struct mlx5_core_dev *dev) {}
+static inline int mlx5_rdma_enable_roce(struct mlx5_core_dev *dev) { return 0; }
static inline void mlx5_rdma_disable_roce(struct mlx5_core_dev *dev) {}
#endif /* CONFIG_MLX5_ESWITCH */
diff --git a/drivers/net/ethernet/microchip/lan743x_main.c b/drivers/net/ethernet/microchip/lan743x_main.c
index 50cb1c5251f7..a0f490a90757 100644
--- a/drivers/net/ethernet/microchip/lan743x_main.c
+++ b/drivers/net/ethernet/microchip/lan743x_main.c
@@ -1475,6 +1475,7 @@ static void lan743x_tx_frame_add_lso(struct lan743x_tx *tx,
if (nr_frags <= 0) {
tx->frame_data0 |= TX_DESC_DATA0_LS_;
tx->frame_data0 |= TX_DESC_DATA0_IOC_;
+ tx->frame_last = tx->frame_first;
}
tx_descriptor = &tx->ring_cpu_ptr[tx->frame_tail];
tx_descriptor->data0 = cpu_to_le32(tx->frame_data0);
@@ -1544,6 +1545,7 @@ static int lan743x_tx_frame_add_fragment(struct lan743x_tx *tx,
tx->frame_first = 0;
tx->frame_data0 = 0;
tx->frame_tail = 0;
+ tx->frame_last = 0;
return -ENOMEM;
}
@@ -1584,16 +1586,18 @@ static void lan743x_tx_frame_end(struct lan743x_tx *tx,
TX_DESC_DATA0_DTYPE_DATA_) {
tx->frame_data0 |= TX_DESC_DATA0_LS_;
tx->frame_data0 |= TX_DESC_DATA0_IOC_;
+ tx->frame_last = tx->frame_tail;
}
- tx_descriptor = &tx->ring_cpu_ptr[tx->frame_tail];
- buffer_info = &tx->buffer_info[tx->frame_tail];
+ tx_descriptor = &tx->ring_cpu_ptr[tx->frame_last];
+ buffer_info = &tx->buffer_info[tx->frame_last];
buffer_info->skb = skb;
if (time_stamp)
buffer_info->flags |= TX_BUFFER_INFO_FLAG_TIMESTAMP_REQUESTED;
if (ignore_sync)
buffer_info->flags |= TX_BUFFER_INFO_FLAG_IGNORE_SYNC;
+ tx_descriptor = &tx->ring_cpu_ptr[tx->frame_tail];
tx_descriptor->data0 = cpu_to_le32(tx->frame_data0);
tx->frame_tail = lan743x_tx_next_index(tx, tx->frame_tail);
tx->last_tail = tx->frame_tail;
diff --git a/drivers/net/ethernet/microchip/lan743x_main.h b/drivers/net/ethernet/microchip/lan743x_main.h
index 751f2bc9ce84..2a40cc827b18 100644
--- a/drivers/net/ethernet/microchip/lan743x_main.h
+++ b/drivers/net/ethernet/microchip/lan743x_main.h
@@ -657,6 +657,7 @@ struct lan743x_tx {
u32 frame_first;
u32 frame_data0;
u32 frame_tail;
+ u32 frame_last;
struct lan743x_tx_buffer_info *buffer_info;
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
index 256b19f68cae..bf510d3882cf 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
@@ -1485,8 +1485,11 @@ static int qlcnic_sriov_channel_cfg_cmd(struct qlcnic_adapter *adapter, u8 cmd_o
}
cmd_op = (cmd.rsp.arg[0] & 0xff);
- if (cmd.rsp.arg[0] >> 25 == 2)
- return 2;
+ if (cmd.rsp.arg[0] >> 25 == 2) {
+ ret = 2;
+ goto out;
+ }
+
if (cmd_op == QLCNIC_BC_CMD_CHANNEL_INIT)
set_bit(QLC_BC_VF_STATE, &vf->state);
else
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
index 958bbcfc2668..d04bc6597e0f 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
@@ -936,7 +936,7 @@ static int sun8i_dwmac_set_syscon(struct device *dev,
/* of_mdio_parse_addr returns a valid (0 ~ 31) PHY
* address. No need to mask it again.
*/
- reg |= 1 << H3_EPHY_ADDR_SHIFT;
+ reg |= ret << H3_EPHY_ADDR_SHIFT;
} else {
/* For SoCs without internal PHY the PHY selection bit should be
* set to 0 (external PHY).
diff --git a/drivers/net/ethernet/ti/cpsw_new.c b/drivers/net/ethernet/ti/cpsw_new.c
index a1ee205d6a88..d6f8d3e757a2 100644
--- a/drivers/net/ethernet/ti/cpsw_new.c
+++ b/drivers/net/ethernet/ti/cpsw_new.c
@@ -1427,6 +1427,7 @@ static int cpsw_create_ports(struct cpsw_common *cpsw)
ndev->netdev_ops = &cpsw_netdev_ops;
ndev->ethtool_ops = &cpsw_ethtool_ops;
SET_NETDEV_DEV(ndev, dev);
+ ndev->dev.of_node = slave_data->slave_node;
if (!napi_ndev) {
/* CPSW Host port CPDMA interface is shared between
diff --git a/drivers/net/ieee802154/ca8210.c b/drivers/net/ieee802154/ca8210.c
index 9a082910ec59..35e2b7eb3076 100644
--- a/drivers/net/ieee802154/ca8210.c
+++ b/drivers/net/ieee802154/ca8210.c
@@ -1488,8 +1488,7 @@ static u8 mcps_data_request(
command.pdata.data_req.src_addr_mode = src_addr_mode;
command.pdata.data_req.dst.mode = dst_address_mode;
if (dst_address_mode != MAC_MODE_NO_ADDR) {
- command.pdata.data_req.dst.pan_id[0] = LS_BYTE(dst_pan_id);
- command.pdata.data_req.dst.pan_id[1] = MS_BYTE(dst_pan_id);
+ put_unaligned_le16(dst_pan_id, command.pdata.data_req.dst.pan_id);
if (dst_address_mode == MAC_MODE_SHORT_ADDR) {
command.pdata.data_req.dst.address[0] = LS_BYTE(
dst_addr->short_address
@@ -1838,12 +1837,12 @@ static int ca8210_skb_rx(
}
hdr.source.mode = data_ind[0];
dev_dbg(&priv->spi->dev, "srcAddrMode: %#03x\n", hdr.source.mode);
- hdr.source.pan_id = *(u16 *)&data_ind[1];
+ hdr.source.pan_id = cpu_to_le16(get_unaligned_le16(&data_ind[1]));
dev_dbg(&priv->spi->dev, "srcPanId: %#06x\n", hdr.source.pan_id);
memcpy(&hdr.source.extended_addr, &data_ind[3], 8);
hdr.dest.mode = data_ind[11];
dev_dbg(&priv->spi->dev, "dstAddrMode: %#03x\n", hdr.dest.mode);
- hdr.dest.pan_id = *(u16 *)&data_ind[12];
+ hdr.dest.pan_id = cpu_to_le16(get_unaligned_le16(&data_ind[12]));
dev_dbg(&priv->spi->dev, "dstPanId: %#06x\n", hdr.dest.pan_id);
memcpy(&hdr.dest.extended_addr, &data_ind[14], 8);
@@ -1970,7 +1969,7 @@ static int ca8210_skb_tx(
status = mcps_data_request(
header.source.mode,
header.dest.mode,
- header.dest.pan_id,
+ le16_to_cpu(header.dest.pan_id),
(union macaddr *)&header.dest.extended_addr,
skb->len - mac_len,
&skb->data[mac_len],
diff --git a/drivers/net/vxlan/vxlan_core.c b/drivers/net/vxlan/vxlan_core.c
index ec67d2eb05ec..7d7aa7d76880 100644
--- a/drivers/net/vxlan/vxlan_core.c
+++ b/drivers/net/vxlan/vxlan_core.c
@@ -333,9 +333,9 @@ static int vxlan_fdb_info(struct sk_buff *skb, struct vxlan_dev *vxlan,
be32_to_cpu(fdb->vni)))
goto nla_put_failure;
- ci.ndm_used = jiffies_to_clock_t(now - fdb->used);
+ ci.ndm_used = jiffies_to_clock_t(now - READ_ONCE(fdb->used));
ci.ndm_confirmed = 0;
- ci.ndm_updated = jiffies_to_clock_t(now - fdb->updated);
+ ci.ndm_updated = jiffies_to_clock_t(now - READ_ONCE(fdb->updated));
ci.ndm_refcnt = 0;
if (nla_put(skb, NDA_CACHEINFO, sizeof(ci), &ci))
@@ -541,8 +541,8 @@ static struct vxlan_fdb *vxlan_find_mac(struct vxlan_dev *vxlan,
struct vxlan_fdb *f;
f = __vxlan_find_mac(vxlan, mac, vni);
- if (f && f->used != jiffies)
- f->used = jiffies;
+ if (f && READ_ONCE(f->used) != jiffies)
+ WRITE_ONCE(f->used, jiffies);
return f;
}
@@ -1072,12 +1072,12 @@ static int vxlan_fdb_update_existing(struct vxlan_dev *vxlan,
!(f->flags & NTF_VXLAN_ADDED_BY_USER)) {
if (f->state != state) {
f->state = state;
- f->updated = jiffies;
+ WRITE_ONCE(f->updated, jiffies);
notify = 1;
}
if (f->flags != fdb_flags) {
f->flags = fdb_flags;
- f->updated = jiffies;
+ WRITE_ONCE(f->updated, jiffies);
notify = 1;
}
}
@@ -1111,7 +1111,7 @@ static int vxlan_fdb_update_existing(struct vxlan_dev *vxlan,
}
if (ndm_flags & NTF_USE)
- f->used = jiffies;
+ WRITE_ONCE(f->used, jiffies);
if (notify) {
if (rd == NULL)
@@ -1524,7 +1524,7 @@ static bool vxlan_snoop(struct net_device *dev,
src_mac, &rdst->remote_ip.sa, &src_ip->sa);
rdst->remote_ip = *src_ip;
- f->updated = jiffies;
+ WRITE_ONCE(f->updated, jiffies);
vxlan_fdb_notify(vxlan, f, rdst, RTM_NEWNEIGH, true, NULL);
} else {
u32 hash_index = fdb_head_index(vxlan, src_mac, vni);
@@ -2999,7 +2999,7 @@ static void vxlan_cleanup(struct timer_list *t)
if (f->flags & NTF_EXT_LEARNED)
continue;
- timeout = f->used + vxlan->cfg.age_interval * HZ;
+ timeout = READ_ONCE(f->used) + vxlan->cfg.age_interval * HZ;
if (time_before_eq(timeout, jiffies)) {
netdev_dbg(vxlan->dev,
"garbage collect %pM\n",
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
index 9fb68c2dc7e3..8c12aaffe719 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/usb.c
@@ -903,14 +903,16 @@ brcmf_usb_dl_writeimage(struct brcmf_usbdev_info *devinfo, u8 *fw, int fwlen)
}
/* 1) Prepare USB boot loader for runtime image */
- brcmf_usb_dl_cmd(devinfo, DL_START, &state, sizeof(state));
+ err = brcmf_usb_dl_cmd(devinfo, DL_START, &state, sizeof(state));
+ if (err)
+ goto fail;
rdlstate = le32_to_cpu(state.state);
rdlbytes = le32_to_cpu(state.bytes);
/* 2) Check we are in the Waiting state */
if (rdlstate != DL_WAITING) {
- brcmf_err("Failed to DL_START\n");
+ brcmf_err("Invalid DL state: %u\n", rdlstate);
err = -EINVAL;
goto fail;
}
diff --git a/drivers/net/wireless/mediatek/mt76/dma.c b/drivers/net/wireless/mediatek/mt76/dma.c
index 7991705e9d13..082eec4208c5 100644
--- a/drivers/net/wireless/mediatek/mt76/dma.c
+++ b/drivers/net/wireless/mediatek/mt76/dma.c
@@ -666,6 +666,7 @@ void mt76_dma_cleanup(struct mt76_dev *dev)
int i;
mt76_worker_disable(&dev->tx_worker);
+ napi_disable(&dev->tx_napi);
netif_napi_del(&dev->tx_napi);
for (i = 0; i < ARRAY_SIZE(dev->q_tx); i++)
mt76_dma_tx_cleanup(dev, i, true);
diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c
index 91eea38f62cd..ab302e2ce9a2 100644
--- a/drivers/net/wireless/realtek/rtw88/main.c
+++ b/drivers/net/wireless/realtek/rtw88/main.c
@@ -1141,6 +1141,7 @@ static void rtw_init_ht_cap(struct rtw_dev *rtwdev,
struct ieee80211_sta_ht_cap *ht_cap)
{
struct rtw_efuse *efuse = &rtwdev->efuse;
+ int i;
ht_cap->ht_supported = true;
ht_cap->cap = 0;
@@ -1158,25 +1159,20 @@ static void rtw_init_ht_cap(struct rtw_dev *rtwdev,
ht_cap->ampdu_factor = IEEE80211_HT_MAX_AMPDU_64K;
ht_cap->ampdu_density = IEEE80211_HT_MPDU_DENSITY_16;
ht_cap->mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED;
- if (efuse->hw_cap.nss > 1) {
- ht_cap->mcs.rx_mask[0] = 0xFF;
- ht_cap->mcs.rx_mask[1] = 0xFF;
- ht_cap->mcs.rx_mask[4] = 0x01;
- ht_cap->mcs.rx_highest = cpu_to_le16(300);
- } else {
- ht_cap->mcs.rx_mask[0] = 0xFF;
- ht_cap->mcs.rx_mask[1] = 0x00;
- ht_cap->mcs.rx_mask[4] = 0x01;
- ht_cap->mcs.rx_highest = cpu_to_le16(150);
- }
+
+ for (i = 0; i < efuse->hw_cap.nss; i++)
+ ht_cap->mcs.rx_mask[i] = 0xFF;
+ ht_cap->mcs.rx_mask[4] = 0x01;
+ ht_cap->mcs.rx_highest = cpu_to_le16(150 * efuse->hw_cap.nss);
}
static void rtw_init_vht_cap(struct rtw_dev *rtwdev,
struct ieee80211_sta_vht_cap *vht_cap)
{
struct rtw_efuse *efuse = &rtwdev->efuse;
- u16 mcs_map;
+ u16 mcs_map = 0;
__le16 highest;
+ int i;
if (efuse->hw_cap.ptcl != EFUSE_HW_CAP_IGNORE &&
efuse->hw_cap.ptcl != EFUSE_HW_CAP_PTCL_VHT)
@@ -1199,21 +1195,15 @@ static void rtw_init_vht_cap(struct rtw_dev *rtwdev,
if (rtw_chip_has_rx_ldpc(rtwdev))
vht_cap->cap |= IEEE80211_VHT_CAP_RXLDPC;
- mcs_map = IEEE80211_VHT_MCS_SUPPORT_0_9 << 0 |
- IEEE80211_VHT_MCS_NOT_SUPPORTED << 4 |
- IEEE80211_VHT_MCS_NOT_SUPPORTED << 6 |
- IEEE80211_VHT_MCS_NOT_SUPPORTED << 8 |
- IEEE80211_VHT_MCS_NOT_SUPPORTED << 10 |
- IEEE80211_VHT_MCS_NOT_SUPPORTED << 12 |
- IEEE80211_VHT_MCS_NOT_SUPPORTED << 14;
- if (efuse->hw_cap.nss > 1) {
- highest = cpu_to_le16(780);
- mcs_map |= IEEE80211_VHT_MCS_SUPPORT_0_9 << 2;
- } else {
- highest = cpu_to_le16(390);
- mcs_map |= IEEE80211_VHT_MCS_NOT_SUPPORTED << 2;
+ for (i = 0; i < 8; i++) {
+ if (i < efuse->hw_cap.nss)
+ mcs_map |= IEEE80211_VHT_MCS_SUPPORT_0_9 << (i * 2);
+ else
+ mcs_map |= IEEE80211_VHT_MCS_NOT_SUPPORTED << (i * 2);
}
+ highest = cpu_to_le16(390 * efuse->hw_cap.nss);
+
vht_cap->vht_mcs.rx_mcs_map = cpu_to_le16(mcs_map);
vht_cap->vht_mcs.tx_mcs_map = cpu_to_le16(mcs_map);
vht_cap->vht_mcs.rx_highest = highest;
diff --git a/drivers/net/wireless/realtek/rtw88/reg.h b/drivers/net/wireless/realtek/rtw88/reg.h
index 9088bfb2a315..27de6eeb4ad6 100644
--- a/drivers/net/wireless/realtek/rtw88/reg.h
+++ b/drivers/net/wireless/realtek/rtw88/reg.h
@@ -107,6 +107,7 @@
#define BIT_SHIFT_ROM_PGE 16
#define BIT_FW_INIT_RDY BIT(15)
#define BIT_FW_DW_RDY BIT(14)
+#define BIT_CPU_CLK_SEL (BIT(12) | BIT(13))
#define BIT_RPWM_TOGGLE BIT(7)
#define BIT_RAM_DL_SEL BIT(7) /* legacy only */
#define BIT_DMEM_CHKSUM_OK BIT(6)
@@ -124,7 +125,7 @@
BIT_CHECK_SUM_OK)
#define FW_READY_LEGACY (BIT_MCUFWDL_RDY | BIT_FWDL_CHK_RPT | \
BIT_WINTINI_RDY | BIT_RAM_DL_SEL)
-#define FW_READY_MASK 0xffff
+#define FW_READY_MASK (0xffff & ~BIT_CPU_CLK_SEL)
#define REG_MCU_TST_CFG 0x84
#define VAL_FW_TRIGGER 0x1
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822b.c b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
index dbfd67c3f598..1478cb22cf5f 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8822b.c
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
@@ -954,11 +954,11 @@ static void rtw8822b_query_rx_desc(struct rtw_dev *rtwdev, u8 *rx_desc,
}
static void
-rtw8822b_set_tx_power_index_by_rate(struct rtw_dev *rtwdev, u8 path, u8 rs)
+rtw8822b_set_tx_power_index_by_rate(struct rtw_dev *rtwdev, u8 path,
+ u8 rs, u32 *phy_pwr_idx)
{
struct rtw_hal *hal = &rtwdev->hal;
static const u32 offset_txagc[2] = {0x1d00, 0x1d80};
- static u32 phy_pwr_idx;
u8 rate, rate_idx, pwr_index, shift;
int j;
@@ -966,12 +966,12 @@ rtw8822b_set_tx_power_index_by_rate(struct rtw_dev *rtwdev, u8 path, u8 rs)
rate = rtw_rate_section[rs][j];
pwr_index = hal->tx_pwr_tbl[path][rate];
shift = rate & 0x3;
- phy_pwr_idx |= ((u32)pwr_index << (shift * 8));
+ *phy_pwr_idx |= ((u32)pwr_index << (shift * 8));
if (shift == 0x3) {
rate_idx = rate & 0xfc;
rtw_write32(rtwdev, offset_txagc[path] + rate_idx,
- phy_pwr_idx);
- phy_pwr_idx = 0;
+ *phy_pwr_idx);
+ *phy_pwr_idx = 0;
}
}
}
@@ -979,11 +979,13 @@ rtw8822b_set_tx_power_index_by_rate(struct rtw_dev *rtwdev, u8 path, u8 rs)
static void rtw8822b_set_tx_power_index(struct rtw_dev *rtwdev)
{
struct rtw_hal *hal = &rtwdev->hal;
+ u32 phy_pwr_idx = 0;
int rs, path;
for (path = 0; path < hal->rf_path_num; path++) {
for (rs = 0; rs < RTW_RATE_SECTION_MAX; rs++)
- rtw8822b_set_tx_power_index_by_rate(rtwdev, path, rs);
+ rtw8822b_set_tx_power_index_by_rate(rtwdev, path, rs,
+ &phy_pwr_idx);
}
}
diff --git a/drivers/net/wireless/realtek/rtw88/util.c b/drivers/net/wireless/realtek/rtw88/util.c
index 2c515af214e7..bfd017d53fef 100644
--- a/drivers/net/wireless/realtek/rtw88/util.c
+++ b/drivers/net/wireless/realtek/rtw88/util.c
@@ -101,7 +101,8 @@ void rtw_desc_to_mcsrate(u16 rate, u8 *mcs, u8 *nss)
*nss = 4;
*mcs = rate - DESC_RATEVHT4SS_MCS0;
} else if (rate >= DESC_RATEMCS0 &&
- rate <= DESC_RATEMCS15) {
+ rate <= DESC_RATEMCS31) {
+ *nss = 0;
*mcs = rate - DESC_RATEMCS0;
}
}
diff --git a/drivers/nvdimm/label.c b/drivers/nvdimm/label.c
index 9251441fd8a3..5251058adc4d 100644
--- a/drivers/nvdimm/label.c
+++ b/drivers/nvdimm/label.c
@@ -421,7 +421,8 @@ int nd_label_data_init(struct nvdimm_drvdata *ndd)
if (ndd->data)
return 0;
- if (ndd->nsarea.status || ndd->nsarea.max_xfer == 0) {
+ if (ndd->nsarea.status || ndd->nsarea.max_xfer == 0 ||
+ ndd->nsarea.config_size == 0) {
dev_dbg(ndd->dev, "failed to init config data area: (%u:%u)\n",
ndd->nsarea.max_xfer, ndd->nsarea.config_size);
return -ENXIO;
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index b19fba64beb0..cb9b38e142ed 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -4429,7 +4429,8 @@ static void nvme_fw_act_work(struct work_struct *work)
msleep(100);
}
- if (!nvme_change_ctrl_state(ctrl, NVME_CTRL_LIVE))
+ if (!nvme_change_ctrl_state(ctrl, NVME_CTRL_CONNECTING) ||
+ !nvme_change_ctrl_state(ctrl, NVME_CTRL_LIVE))
return;
nvme_start_queues(ctrl);
diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
index 93835c019b8e..7709a604d0be 100644
--- a/drivers/nvme/host/tcp.c
+++ b/drivers/nvme/host/tcp.c
@@ -1573,7 +1573,7 @@ static void __nvme_tcp_stop_queue(struct nvme_tcp_queue *queue)
cancel_work_sync(&queue->io_work);
}
-static void nvme_tcp_stop_queue(struct nvme_ctrl *nctrl, int qid)
+static void nvme_tcp_stop_queue_nowait(struct nvme_ctrl *nctrl, int qid)
{
struct nvme_tcp_ctrl *ctrl = to_tcp_ctrl(nctrl);
struct nvme_tcp_queue *queue = &ctrl->queues[qid];
@@ -1584,6 +1584,31 @@ static void nvme_tcp_stop_queue(struct nvme_ctrl *nctrl, int qid)
mutex_unlock(&queue->queue_lock);
}
+static void nvme_tcp_wait_queue(struct nvme_ctrl *nctrl, int qid)
+{
+ struct nvme_tcp_ctrl *ctrl = to_tcp_ctrl(nctrl);
+ struct nvme_tcp_queue *queue = &ctrl->queues[qid];
+ int timeout = 100;
+
+ while (timeout > 0) {
+ if (!test_bit(NVME_TCP_Q_ALLOCATED, &queue->flags) ||
+ !sk_wmem_alloc_get(queue->sock->sk))
+ return;
+ msleep(2);
+ timeout -= 2;
+ }
+ dev_warn(nctrl->device,
+ "qid %d: timeout draining sock wmem allocation expired\n",
+ qid);
+}
+
+static void nvme_tcp_stop_queue(struct nvme_ctrl *nctrl, int qid)
+{
+ nvme_tcp_stop_queue_nowait(nctrl, qid);
+ nvme_tcp_wait_queue(nctrl, qid);
+}
+
+
static void nvme_tcp_setup_sock_ops(struct nvme_tcp_queue *queue)
{
write_lock_bh(&queue->sock->sk->sk_callback_lock);
@@ -1691,7 +1716,9 @@ static void nvme_tcp_stop_io_queues(struct nvme_ctrl *ctrl)
int i;
for (i = 1; i < ctrl->queue_count; i++)
- nvme_tcp_stop_queue(ctrl, i);
+ nvme_tcp_stop_queue_nowait(ctrl, i);
+ for (i = 1; i < ctrl->queue_count; i++)
+ nvme_tcp_wait_queue(ctrl, i);
}
static int nvme_tcp_start_io_queues(struct nvme_ctrl *ctrl)
diff --git a/drivers/nvme/target/tcp.c b/drivers/nvme/target/tcp.c
index 754a963867dc..6019eee1f9bd 100644
--- a/drivers/nvme/target/tcp.c
+++ b/drivers/nvme/target/tcp.c
@@ -1395,6 +1395,9 @@ static void nvmet_tcp_restore_socket_callbacks(struct nvmet_tcp_queue *queue)
{
struct socket *sock = queue->sock;
+ if (!queue->state_change)
+ return;
+
write_lock_bh(&sock->sk->sk_callback_lock);
sock->sk->sk_data_ready = queue->data_ready;
sock->sk->sk_state_change = queue->state_change;
diff --git a/drivers/of/device.c b/drivers/of/device.c
index 3a547793135c..93f08f18f6b3 100644
--- a/drivers/of/device.c
+++ b/drivers/of/device.c
@@ -231,14 +231,15 @@ static ssize_t of_device_get_modalias(struct device *dev, char *str, ssize_t len
csize = snprintf(str, len, "of:N%pOFn%c%s", dev->of_node, 'T',
of_node_get_device_type(dev->of_node));
tsize = csize;
+ if (csize >= len)
+ csize = len > 0 ? len - 1 : 0;
len -= csize;
- if (str)
- str += csize;
+ str += csize;
of_property_for_each_string(dev->of_node, "compatible", p, compat) {
csize = strlen(compat) + 1;
tsize += csize;
- if (csize > len)
+ if (csize >= len)
continue;
csize = snprintf(str, len, "C%s", compat);
diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
index 8117f2dad86c..a68c7e273586 100644
--- a/drivers/pci/controller/dwc/pci-imx6.c
+++ b/drivers/pci/controller/dwc/pci-imx6.c
@@ -1092,11 +1092,10 @@ static int imx6_pcie_probe(struct platform_device *pdev)
if (IS_ERR(imx6_pcie->pcie_aux))
return dev_err_probe(dev, PTR_ERR(imx6_pcie->pcie_aux),
"pcie_aux clock source missing or invalid\n");
- fallthrough;
- case IMX7D:
if (dbi_base->start == IMX8MQ_PCIE2_BASE_ADDR)
imx6_pcie->controller_id = 1;
-
+ fallthrough;
+ case IMX7D:
imx6_pcie->pciephy_reset = devm_reset_control_get_exclusive(dev,
"pciephy");
if (IS_ERR(imx6_pcie->pciephy_reset)) {
diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c
index bbc9786bc36c..85be07e8b418 100644
--- a/drivers/pci/controller/pcie-brcmstb.c
+++ b/drivers/pci/controller/pcie-brcmstb.c
@@ -300,8 +300,8 @@ static int brcm_pcie_encode_ibar_size(u64 size)
if (log2_in >= 12 && log2_in <= 15)
/* Covers 4KB to 32KB (inclusive) */
return (log2_in - 12) + 0x1c;
- else if (log2_in >= 16 && log2_in <= 35)
- /* Covers 64KB to 32GB, (inclusive) */
+ else if (log2_in >= 16 && log2_in <= 36)
+ /* Covers 64KB to 64GB, (inclusive) */
return log2_in - 15;
/* Something is awry so disable */
return 0;
@@ -1326,3 +1326,4 @@ module_platform_driver(brcm_pcie_driver);
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Broadcom STB PCIe RC driver");
MODULE_AUTHOR("Broadcom");
+MODULE_SOFTDEP("pre: irq_bcm2712_mip");
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index a159bfdfa251..04c3ae8efc0f 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -806,11 +806,9 @@ static resource_size_t calculate_iosize(resource_size_t size,
size = (size & 0xff) + ((size & ~0xffUL) << 2);
#endif
size = size + size1;
- if (size < old_size)
- size = old_size;
- size = ALIGN(max(size, add_size) + children_add_size, align);
- return size;
+ size = max(size, add_size) + children_add_size;
+ return ALIGN(max(size, old_size), align);
}
static resource_size_t calculate_memsize(resource_size_t size,
diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
index ac4428e8fae9..4294ba946b9c 100644
--- a/drivers/perf/arm-cmn.c
+++ b/drivers/perf/arm-cmn.c
@@ -1512,6 +1512,7 @@ static int arm_cmn_probe(struct platform_device *pdev)
return -ENOMEM;
cmn->dev = &pdev->dev;
+ cmn->cpu = raw_smp_processor_id();
platform_set_drvdata(pdev, cmn);
if (has_acpi_companion(cmn->dev))
@@ -1533,7 +1534,6 @@ static int arm_cmn_probe(struct platform_device *pdev)
if (err)
return err;
- cmn->cpu = raw_smp_processor_id();
cmn->pmu = (struct pmu) {
.module = THIS_MODULE,
.attr_groups = arm_cmn_attr_groups,
diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
index 1bcdef37e8aa..dac0f7f4f3d3 100644
--- a/drivers/phy/phy-core.c
+++ b/drivers/phy/phy-core.c
@@ -360,13 +360,14 @@ EXPORT_SYMBOL_GPL(phy_power_off);
int phy_set_mode_ext(struct phy *phy, enum phy_mode mode, int submode)
{
- int ret;
+ int ret = 0;
- if (!phy || !phy->ops->set_mode)
+ if (!phy)
return 0;
mutex_lock(&phy->mutex);
- ret = phy->ops->set_mode(phy, mode, submode);
+ if (phy->ops->set_mode)
+ ret = phy->ops->set_mode(phy, mode, submode);
if (!ret)
phy->attrs.mode = mode;
mutex_unlock(&phy->mutex);
diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
index c0802152f30b..ea01a121b8fc 100644
--- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c
+++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
@@ -429,8 +429,11 @@ static int rcar_gen3_phy_usb2_init(struct phy *p)
val = readl(usb2_base + USB2_INT_ENABLE);
val |= USB2_INT_ENABLE_UCOM_INTEN | rphy->int_enable_bits;
writel(val, usb2_base + USB2_INT_ENABLE);
- writel(USB2_SPD_RSM_TIMSET_INIT, usb2_base + USB2_SPD_RSM_TIMSET);
- writel(USB2_OC_TIMSET_INIT, usb2_base + USB2_OC_TIMSET);
+
+ if (!rcar_gen3_is_any_rphy_initialized(channel)) {
+ writel(USB2_SPD_RSM_TIMSET_INIT, usb2_base + USB2_SPD_RSM_TIMSET);
+ writel(USB2_OC_TIMSET_INIT, usb2_base + USB2_OC_TIMSET);
+ }
/* Initialize otg part */
if (channel->is_otg_channel) {
diff --git a/drivers/phy/tegra/xusb.c b/drivers/phy/tegra/xusb.c
index 8bd8d1f8eba2..e654ddb1a42b 100644
--- a/drivers/phy/tegra/xusb.c
+++ b/drivers/phy/tegra/xusb.c
@@ -536,16 +536,16 @@ static int tegra_xusb_port_init(struct tegra_xusb_port *port,
err = dev_set_name(&port->dev, "%s-%u", name, index);
if (err < 0)
- goto unregister;
+ goto put_device;
err = device_add(&port->dev);
if (err < 0)
- goto unregister;
+ goto put_device;
return 0;
-unregister:
- device_unregister(&port->dev);
+put_device:
+ put_device(&port->dev);
return err;
}
diff --git a/drivers/pinctrl/bcm/pinctrl-bcm281xx.c b/drivers/pinctrl/bcm/pinctrl-bcm281xx.c
index fbfddcc39d5c..6ab3481ba902 100644
--- a/drivers/pinctrl/bcm/pinctrl-bcm281xx.c
+++ b/drivers/pinctrl/bcm/pinctrl-bcm281xx.c
@@ -79,7 +79,7 @@ static enum bcm281xx_pin_type hdmi_pin = BCM281XX_PIN_TYPE_HDMI;
struct bcm281xx_pin_function {
const char *name;
const char * const *groups;
- const unsigned ngroups;
+ const unsigned int ngroups;
};
/*
@@ -91,10 +91,10 @@ struct bcm281xx_pinctrl_data {
/* List of all pins */
const struct pinctrl_pin_desc *pins;
- const unsigned npins;
+ const unsigned int npins;
const struct bcm281xx_pin_function *functions;
- const unsigned nfunctions;
+ const unsigned int nfunctions;
struct regmap *regmap;
};
@@ -948,7 +948,7 @@ static struct bcm281xx_pinctrl_data bcm281xx_pinctrl = {
};
static inline enum bcm281xx_pin_type pin_type_get(struct pinctrl_dev *pctldev,
- unsigned pin)
+ unsigned int pin)
{
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
@@ -992,7 +992,7 @@ static int bcm281xx_pinctrl_get_groups_count(struct pinctrl_dev *pctldev)
}
static const char *bcm281xx_pinctrl_get_group_name(struct pinctrl_dev *pctldev,
- unsigned group)
+ unsigned int group)
{
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
@@ -1000,9 +1000,9 @@ static const char *bcm281xx_pinctrl_get_group_name(struct pinctrl_dev *pctldev,
}
static int bcm281xx_pinctrl_get_group_pins(struct pinctrl_dev *pctldev,
- unsigned group,
+ unsigned int group,
const unsigned **pins,
- unsigned *num_pins)
+ unsigned int *num_pins)
{
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
@@ -1014,7 +1014,7 @@ static int bcm281xx_pinctrl_get_group_pins(struct pinctrl_dev *pctldev,
static void bcm281xx_pinctrl_pin_dbg_show(struct pinctrl_dev *pctldev,
struct seq_file *s,
- unsigned offset)
+ unsigned int offset)
{
seq_printf(s, " %s", dev_name(pctldev->dev));
}
@@ -1036,7 +1036,7 @@ static int bcm281xx_pinctrl_get_fcns_count(struct pinctrl_dev *pctldev)
}
static const char *bcm281xx_pinctrl_get_fcn_name(struct pinctrl_dev *pctldev,
- unsigned function)
+ unsigned int function)
{
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
@@ -1044,9 +1044,9 @@ static const char *bcm281xx_pinctrl_get_fcn_name(struct pinctrl_dev *pctldev,
}
static int bcm281xx_pinctrl_get_fcn_groups(struct pinctrl_dev *pctldev,
- unsigned function,
+ unsigned int function,
const char * const **groups,
- unsigned * const num_groups)
+ unsigned int * const num_groups)
{
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
@@ -1057,8 +1057,8 @@ static int bcm281xx_pinctrl_get_fcn_groups(struct pinctrl_dev *pctldev,
}
static int bcm281xx_pinmux_set(struct pinctrl_dev *pctldev,
- unsigned function,
- unsigned group)
+ unsigned int function,
+ unsigned int group)
{
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
const struct bcm281xx_pin_function *f = &pdata->functions[function];
@@ -1089,7 +1089,7 @@ static const struct pinmux_ops bcm281xx_pinctrl_pinmux_ops = {
};
static int bcm281xx_pinctrl_pin_config_get(struct pinctrl_dev *pctldev,
- unsigned pin,
+ unsigned int pin,
unsigned long *config)
{
return -ENOTSUPP;
@@ -1098,9 +1098,9 @@ static int bcm281xx_pinctrl_pin_config_get(struct pinctrl_dev *pctldev,
/* Goes through the configs and update register val/mask */
static int bcm281xx_std_pin_update(struct pinctrl_dev *pctldev,
- unsigned pin,
+ unsigned int pin,
unsigned long *configs,
- unsigned num_configs,
+ unsigned int num_configs,
u32 *val,
u32 *mask)
{
@@ -1214,9 +1214,9 @@ static const u16 bcm281xx_pullup_map[] = {
/* Goes through the configs and update register val/mask */
static int bcm281xx_i2c_pin_update(struct pinctrl_dev *pctldev,
- unsigned pin,
+ unsigned int pin,
unsigned long *configs,
- unsigned num_configs,
+ unsigned int num_configs,
u32 *val,
u32 *mask)
{
@@ -1284,9 +1284,9 @@ static int bcm281xx_i2c_pin_update(struct pinctrl_dev *pctldev,
/* Goes through the configs and update register val/mask */
static int bcm281xx_hdmi_pin_update(struct pinctrl_dev *pctldev,
- unsigned pin,
+ unsigned int pin,
unsigned long *configs,
- unsigned num_configs,
+ unsigned int num_configs,
u32 *val,
u32 *mask)
{
@@ -1328,9 +1328,9 @@ static int bcm281xx_hdmi_pin_update(struct pinctrl_dev *pctldev,
}
static int bcm281xx_pinctrl_pin_config_set(struct pinctrl_dev *pctldev,
- unsigned pin,
+ unsigned int pin,
unsigned long *configs,
- unsigned num_configs)
+ unsigned int num_configs)
{
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
enum bcm281xx_pin_type pin_type;
diff --git a/drivers/pinctrl/devicetree.c b/drivers/pinctrl/devicetree.c
index 0220228c5040..d9279fc7be83 100644
--- a/drivers/pinctrl/devicetree.c
+++ b/drivers/pinctrl/devicetree.c
@@ -143,10 +143,14 @@ static int dt_to_map_one_config(struct pinctrl *p,
pctldev = get_pinctrl_dev_from_of_node(np_pctldev);
if (pctldev)
break;
- /* Do not defer probing of hogs (circular loop) */
+ /*
+ * Do not defer probing of hogs (circular loop)
+ *
+ * Return 1 to let the caller catch the case.
+ */
if (np_pctldev == p->dev->of_node) {
of_node_put(np_pctldev);
- return -ENODEV;
+ return 1;
}
}
of_node_put(np_pctldev);
@@ -265,6 +269,8 @@ int pinctrl_dt_to_map(struct pinctrl *p, struct pinctrl_dev *pctldev)
ret = dt_to_map_one_config(p, pctldev, statename,
np_config);
of_node_put(np_config);
+ if (ret == 1)
+ continue;
if (ret < 0)
goto err;
}
diff --git a/drivers/pinctrl/meson/pinctrl-meson.c b/drivers/pinctrl/meson/pinctrl-meson.c
index 20683cd072bb..ae72edba8a1f 100644
--- a/drivers/pinctrl/meson/pinctrl-meson.c
+++ b/drivers/pinctrl/meson/pinctrl-meson.c
@@ -483,7 +483,7 @@ static int meson_pinconf_get(struct pinctrl_dev *pcdev, unsigned int pin,
case PIN_CONFIG_BIAS_PULL_DOWN:
case PIN_CONFIG_BIAS_PULL_UP:
if (meson_pinconf_get_pull(pc, pin) == param)
- arg = 1;
+ arg = 60000;
else
return -EINVAL;
break;
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index 931656494768..265232d1b9a8 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -2739,7 +2739,8 @@ static int asus_wmi_add(struct platform_device *pdev)
goto fail_leds;
asus_wmi_get_devstate(asus, ASUS_WMI_DEVID_WLAN, &result);
- if (result & (ASUS_WMI_DSTS_PRESENCE_BIT | ASUS_WMI_DSTS_USER_BIT))
+ if ((result & (ASUS_WMI_DSTS_PRESENCE_BIT | ASUS_WMI_DSTS_USER_BIT)) ==
+ (ASUS_WMI_DSTS_PRESENCE_BIT | ASUS_WMI_DSTS_USER_BIT))
asus->driver->wlan_ctrl_by_user = 1;
if (!(asus->driver->wlan_ctrl_by_user && ashs_present())) {
diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
index 80929380ec7e..04ccfdd99e27 100644
--- a/drivers/platform/x86/fujitsu-laptop.c
+++ b/drivers/platform/x86/fujitsu-laptop.c
@@ -17,13 +17,13 @@
/*
* fujitsu-laptop.c - Fujitsu laptop support, providing access to additional
* features made available on a range of Fujitsu laptops including the
- * P2xxx/P5xxx/S6xxx/S7xxx series.
+ * P2xxx/P5xxx/S2xxx/S6xxx/S7xxx series.
*
* This driver implements a vendor-specific backlight control interface for
* Fujitsu laptops and provides support for hotkeys present on certain Fujitsu
* laptops.
*
- * This driver has been tested on a Fujitsu Lifebook S6410, S7020 and
+ * This driver has been tested on a Fujitsu Lifebook S2110, S6410, S7020 and
* P8010. It should work on most P-series and S-series Lifebooks, but
* YMMV.
*
@@ -102,7 +102,11 @@
#define KEY2_CODE 0x411
#define KEY3_CODE 0x412
#define KEY4_CODE 0x413
-#define KEY5_CODE 0x420
+#define KEY5_CODE 0x414
+#define KEY6_CODE 0x415
+#define KEY7_CODE 0x416
+#define KEY8_CODE 0x417
+#define KEY9_CODE 0x420
/* Hotkey ringbuffer limits */
#define MAX_HOTKEY_RINGBUFFER_SIZE 100
@@ -450,7 +454,7 @@ static const struct key_entry keymap_default[] = {
{ KE_KEY, KEY2_CODE, { KEY_PROG2 } },
{ KE_KEY, KEY3_CODE, { KEY_PROG3 } },
{ KE_KEY, KEY4_CODE, { KEY_PROG4 } },
- { KE_KEY, KEY5_CODE, { KEY_RFKILL } },
+ { KE_KEY, KEY9_CODE, { KEY_RFKILL } },
/* Soft keys read from status flags */
{ KE_KEY, FLAG_RFKILL, { KEY_RFKILL } },
{ KE_KEY, FLAG_TOUCHPAD_TOGGLE, { KEY_TOUCHPAD_TOGGLE } },
@@ -474,6 +478,18 @@ static const struct key_entry keymap_p8010[] = {
{ KE_END, 0 }
};
+static const struct key_entry keymap_s2110[] = {
+ { KE_KEY, KEY1_CODE, { KEY_PROG1 } }, /* "A" */
+ { KE_KEY, KEY2_CODE, { KEY_PROG2 } }, /* "B" */
+ { KE_KEY, KEY3_CODE, { KEY_WWW } }, /* "Internet" */
+ { KE_KEY, KEY4_CODE, { KEY_EMAIL } }, /* "E-mail" */
+ { KE_KEY, KEY5_CODE, { KEY_STOPCD } },
+ { KE_KEY, KEY6_CODE, { KEY_PLAYPAUSE } },
+ { KE_KEY, KEY7_CODE, { KEY_PREVIOUSSONG } },
+ { KE_KEY, KEY8_CODE, { KEY_NEXTSONG } },
+ { KE_END, 0 }
+};
+
static const struct key_entry *keymap = keymap_default;
static int fujitsu_laptop_dmi_keymap_override(const struct dmi_system_id *id)
@@ -511,6 +527,15 @@ static const struct dmi_system_id fujitsu_laptop_dmi_table[] = {
},
.driver_data = (void *)keymap_p8010
},
+ {
+ .callback = fujitsu_laptop_dmi_keymap_override,
+ .ident = "Fujitsu LifeBook S2110",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK S2110"),
+ },
+ .driver_data = (void *)keymap_s2110
+ },
{}
};
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index c07b3bcbf795..5a8434da60e7 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -195,6 +195,7 @@ enum tpacpi_hkey_event_t {
/* Thermal events */
TP_HKEY_EV_ALARM_BAT_HOT = 0x6011, /* battery too hot */
TP_HKEY_EV_ALARM_BAT_XHOT = 0x6012, /* battery critically hot */
+ TP_HKEY_EV_ALARM_BAT_LIM_CHANGE = 0x6013, /* battery charge limit changed*/
TP_HKEY_EV_ALARM_SENSOR_HOT = 0x6021, /* sensor too hot */
TP_HKEY_EV_ALARM_SENSOR_XHOT = 0x6022, /* sensor critically hot */
TP_HKEY_EV_THM_TABLE_CHANGED = 0x6030, /* windows; thermal table changed */
@@ -4049,6 +4050,10 @@ static bool hotkey_notify_6xxx(const u32 hkey,
pr_alert("THERMAL EMERGENCY: battery is extremely hot!\n");
/* recommended action: immediate sleep/hibernate */
break;
+ case TP_HKEY_EV_ALARM_BAT_LIM_CHANGE:
+ pr_debug("Battery Info: battery charge threshold changed\n");
+ /* User changed charging threshold. No action needed */
+ return true;
case TP_HKEY_EV_ALARM_SENSOR_HOT:
pr_crit("THERMAL ALARM: a sensor reports something is too hot!\n");
/* recommended action: warn user through gui, that */
@@ -10233,6 +10238,8 @@ static int __must_check __init get_thinkpad_model_data(
tp->vendor = PCI_VENDOR_ID_IBM;
else if (dmi_name_in_vendors("LENOVO"))
tp->vendor = PCI_VENDOR_ID_LENOVO;
+ else if (dmi_name_in_vendors("NEC"))
+ tp->vendor = PCI_VENDOR_ID_LENOVO;
else
return 0;
diff --git a/drivers/regulator/ad5398.c b/drivers/regulator/ad5398.c
index 75f432f61e91..f4d6e62bd963 100644
--- a/drivers/regulator/ad5398.c
+++ b/drivers/regulator/ad5398.c
@@ -14,6 +14,7 @@
#include <linux/platform_device.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>
+#include <linux/regulator/of_regulator.h>
#define AD5398_CURRENT_EN_MASK 0x8000
@@ -221,15 +222,20 @@ static int ad5398_probe(struct i2c_client *client,
const struct ad5398_current_data_format *df =
(struct ad5398_current_data_format *)id->driver_data;
- if (!init_data)
- return -EINVAL;
-
chip = devm_kzalloc(&client->dev, sizeof(*chip), GFP_KERNEL);
if (!chip)
return -ENOMEM;
config.dev = &client->dev;
+ if (client->dev.of_node)
+ init_data = of_get_regulator_init_data(&client->dev,
+ client->dev.of_node,
+ &ad5398_reg);
+ if (!init_data)
+ return -EINVAL;
+
config.init_data = init_data;
+ config.of_node = client->dev.of_node;
config.driver_data = chip;
chip->client = client;
diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c
index 07a9cc91671b..3a2401ce2ec9 100644
--- a/drivers/rtc/rtc-ds1307.c
+++ b/drivers/rtc/rtc-ds1307.c
@@ -1864,10 +1864,8 @@ static int ds1307_probe(struct i2c_client *client,
* For some variants, be sure alarms can trigger when we're
* running on Vbackup (BBSQI/BBSQW)
*/
- if (want_irq || ds1307_can_wakeup_device) {
+ if (want_irq || ds1307_can_wakeup_device)
regs[0] |= DS1337_BIT_INTCN | chip->bbsqi_bit;
- regs[0] &= ~(DS1337_BIT_A2IE | DS1337_BIT_A1IE);
- }
regmap_write(ds1307->regmap, DS1337_REG_CONTROL,
regs[0]);
diff --git a/drivers/rtc/rtc-rv3032.c b/drivers/rtc/rtc-rv3032.c
index 9e6166864bd7..acae15c34d12 100644
--- a/drivers/rtc/rtc-rv3032.c
+++ b/drivers/rtc/rtc-rv3032.c
@@ -69,7 +69,7 @@
#define RV3032_CLKOUT2_FD_MSK GENMASK(6, 5)
#define RV3032_CLKOUT2_OS BIT(7)
-#define RV3032_CTRL1_EERD BIT(3)
+#define RV3032_CTRL1_EERD BIT(2)
#define RV3032_CTRL1_WADA BIT(5)
#define RV3032_CTRL2_STOP BIT(0)
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
index 3ff76ca147a5..353c360b0c6a 100644
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
@@ -5407,6 +5407,7 @@ static struct lpfc_nodelist *
__lpfc_findnode_did(struct lpfc_vport *vport, uint32_t did)
{
struct lpfc_nodelist *ndlp;
+ struct lpfc_nodelist *np = NULL;
uint32_t data1;
list_for_each_entry(ndlp, &vport->fc_nodes, nlp_listp) {
@@ -5421,14 +5422,20 @@ __lpfc_findnode_did(struct lpfc_vport *vport, uint32_t did)
ndlp, ndlp->nlp_DID,
ndlp->nlp_flag, data1, ndlp->nlp_rpi,
ndlp->active_rrqs_xri_bitmap);
- return ndlp;
+
+ /* Check for new or potentially stale node */
+ if (ndlp->nlp_state != NLP_STE_UNUSED_NODE)
+ return ndlp;
+ np = ndlp;
}
}
- /* FIND node did <did> NOT FOUND */
- lpfc_printf_vlog(vport, KERN_INFO, LOG_NODE,
- "0932 FIND node did x%x NOT FOUND.\n", did);
- return NULL;
+ if (!np)
+ /* FIND node did <did> NOT FOUND */
+ lpfc_printf_vlog(vport, KERN_INFO, LOG_NODE,
+ "0932 FIND node did x%x NOT FOUND.\n", did);
+
+ return np;
}
struct lpfc_nodelist *
diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
index edd26a2570fa..8ce77fbe4e3f 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_ctl.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
@@ -676,6 +676,7 @@ _ctl_do_mpt_command(struct MPT3SAS_ADAPTER *ioc, struct mpt3_ioctl_command karg,
size_t data_in_sz = 0;
long ret;
u16 device_handle = MPT3SAS_INVALID_DEVICE_HANDLE;
+ int tm_ret;
issue_reset = 0;
@@ -1107,18 +1108,25 @@ _ctl_do_mpt_command(struct MPT3SAS_ADAPTER *ioc, struct mpt3_ioctl_command karg,
if (pcie_device && (!ioc->tm_custom_handling) &&
(!(mpt3sas_scsih_is_pcie_scsi_device(
pcie_device->device_info))))
- mpt3sas_scsih_issue_locked_tm(ioc,
+ tm_ret = mpt3sas_scsih_issue_locked_tm(ioc,
le16_to_cpu(mpi_request->FunctionDependent1),
0, 0, 0,
MPI2_SCSITASKMGMT_TASKTYPE_TARGET_RESET, 0,
0, pcie_device->reset_timeout,
MPI26_SCSITASKMGMT_MSGFLAGS_PROTOCOL_LVL_RST_PCIE);
else
- mpt3sas_scsih_issue_locked_tm(ioc,
+ tm_ret = mpt3sas_scsih_issue_locked_tm(ioc,
le16_to_cpu(mpi_request->FunctionDependent1),
0, 0, 0,
MPI2_SCSITASKMGMT_TASKTYPE_TARGET_RESET, 0,
0, 30, MPI2_SCSITASKMGMT_MSGFLAGS_LINK_RESET);
+
+ if (tm_ret != SUCCESS) {
+ ioc_info(ioc,
+ "target reset failed, issue hard reset: handle (0x%04x)\n",
+ le16_to_cpu(mpi_request->FunctionDependent1));
+ mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER);
+ }
} else
mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER);
}
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index 465fe83b49e9..23bbb062c2aa 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -951,7 +951,6 @@ static void reset_state(struct scsi_tape *STp)
STp->partition = find_partition(STp);
if (STp->partition < 0)
STp->partition = 0;
- STp->new_partition = STp->partition;
}
}
@@ -2889,7 +2888,6 @@ static int st_int_ioctl(struct scsi_tape *STp, unsigned int cmd_in, unsigned lon
timeout = STp->long_timeout * 8;
DEBC_printk(STp, "Erasing tape.\n");
- fileno = blkno = at_sm = 0;
break;
case MTSETBLK: /* Set block length */
case MTSETDENSITY: /* Set tape density */
@@ -2922,14 +2920,17 @@ static int st_int_ioctl(struct scsi_tape *STp, unsigned int cmd_in, unsigned lon
if (cmd_in == MTSETDENSITY) {
(STp->buffer)->b_data[4] = arg;
STp->density_changed = 1; /* At least we tried ;-) */
+ STp->changed_density = arg;
} else if (cmd_in == SET_DENS_AND_BLK)
(STp->buffer)->b_data[4] = arg >> 24;
else
(STp->buffer)->b_data[4] = STp->density;
if (cmd_in == MTSETBLK || cmd_in == SET_DENS_AND_BLK) {
ltmp = arg & MT_ST_BLKSIZE_MASK;
- if (cmd_in == MTSETBLK)
+ if (cmd_in == MTSETBLK) {
STp->blksize_changed = 1; /* At least we tried ;-) */
+ STp->changed_blksize = arg;
+ }
} else
ltmp = STp->block_size;
(STp->buffer)->b_data[9] = (ltmp >> 16);
@@ -3076,7 +3077,9 @@ static int st_int_ioctl(struct scsi_tape *STp, unsigned int cmd_in, unsigned lon
cmd_in == MTSETDRVBUFFER ||
cmd_in == SET_DENS_AND_BLK) {
if (cmdstatp->sense_hdr.sense_key == ILLEGAL_REQUEST &&
- !(STp->use_pf & PF_TESTED)) {
+ cmdstatp->sense_hdr.asc == 0x24 &&
+ (STp->device)->scsi_level <= SCSI_2 &&
+ !(STp->use_pf & PF_TESTED)) {
/* Try the other possible state of Page Format if not
already tried */
STp->use_pf = (STp->use_pf ^ USE_PF) | PF_TESTED;
@@ -3627,9 +3630,25 @@ static long st_ioctl_common(struct file *file, unsigned int cmd_in, void __user
retval = (-EIO);
goto out;
}
- reset_state(STp);
+ reset_state(STp); /* Clears pos_unknown */
/* remove this when the midlevel properly clears was_reset */
STp->device->was_reset = 0;
+
+ /* Fix the device settings after reset, ignore errors */
+ if (mtc.mt_op == MTREW || mtc.mt_op == MTSEEK ||
+ mtc.mt_op == MTEOM) {
+ if (STp->can_partitions) {
+ /* STp->new_partition contains the
+ * latest partition set
+ */
+ STp->partition = 0;
+ switch_partition(STp);
+ }
+ if (STp->density_changed)
+ st_int_ioctl(STp, MTSETDENSITY, STp->changed_density);
+ if (STp->blksize_changed)
+ st_int_ioctl(STp, MTSETBLK, STp->changed_blksize);
+ }
}
if (mtc.mt_op != MTNOP && mtc.mt_op != MTSETBLK &&
diff --git a/drivers/scsi/st.h b/drivers/scsi/st.h
index 95d2e7a7988d..c9947abb0a45 100644
--- a/drivers/scsi/st.h
+++ b/drivers/scsi/st.h
@@ -168,12 +168,14 @@ struct scsi_tape {
unsigned char compression_changed;
unsigned char drv_buffer;
unsigned char density;
+ unsigned char changed_density;
unsigned char door_locked;
unsigned char autorew_dev; /* auto-rewind device */
unsigned char rew_at_close; /* rewind necessary at close */
unsigned char inited;
unsigned char cleaning_req; /* cleaning requested? */
int block_size;
+ int changed_blksize;
int min_block;
int max_block;
int recover_count; /* From tape opening */
diff --git a/drivers/soc/ti/k3-socinfo.c b/drivers/soc/ti/k3-socinfo.c
index bbbc2d2b7091..4d8948165487 100644
--- a/drivers/soc/ti/k3-socinfo.c
+++ b/drivers/soc/ti/k3-socinfo.c
@@ -57,6 +57,12 @@ k3_chipinfo_partno_to_names(unsigned int partno,
return -EINVAL;
}
+static const struct regmap_config k3_chipinfo_regmap_cfg = {
+ .reg_bits = 32,
+ .val_bits = 32,
+ .reg_stride = 4,
+};
+
static int k3_chipinfo_probe(struct platform_device *pdev)
{
struct device_node *node = pdev->dev.of_node;
@@ -64,13 +70,18 @@ static int k3_chipinfo_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct soc_device *soc_dev;
struct regmap *regmap;
+ void __iomem *base;
u32 partno_id;
u32 variant;
u32 jtag_id;
u32 mfg;
int ret;
- regmap = device_node_to_regmap(node);
+ base = devm_platform_ioremap_resource(pdev, 0);
+ if (IS_ERR(base))
+ return PTR_ERR(base);
+
+ regmap = regmap_init_mmio(dev, base, &k3_chipinfo_regmap_cfg);
if (IS_ERR(regmap))
return PTR_ERR(regmap);
diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c
index 0d9201a2999d..eda7ed618369 100644
--- a/drivers/spi/spi-fsl-dspi.c
+++ b/drivers/spi/spi-fsl-dspi.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0+
//
// Copyright 2013 Freescale Semiconductor, Inc.
-// Copyright 2020 NXP
+// Copyright 2020-2025 NXP
//
// Freescale DSPI driver
// This file contains a driver for the Freescale DSPI
@@ -61,6 +61,7 @@
#define SPI_SR_TFIWF BIT(18)
#define SPI_SR_RFDF BIT(17)
#define SPI_SR_CMDFFF BIT(16)
+#define SPI_SR_TXRXS BIT(30)
#define SPI_SR_CLEAR (SPI_SR_TCFQF | \
SPI_SR_TFUF | SPI_SR_TFFF | \
SPI_SR_CMDTCF | SPI_SR_SPEF | \
@@ -907,9 +908,20 @@ static int dspi_transfer_one_message(struct spi_controller *ctlr,
struct spi_device *spi = message->spi;
struct spi_transfer *transfer;
int status = 0;
+ u32 val = 0;
+ bool cs_change = false;
message->actual_length = 0;
+ /* Put DSPI in running mode if halted. */
+ regmap_read(dspi->regmap, SPI_MCR, &val);
+ if (val & SPI_MCR_HALT) {
+ regmap_update_bits(dspi->regmap, SPI_MCR, SPI_MCR_HALT, 0);
+ while (regmap_read(dspi->regmap, SPI_SR, &val) >= 0 &&
+ !(val & SPI_SR_TXRXS))
+ ;
+ }
+
list_for_each_entry(transfer, &message->transfers, transfer_list) {
dspi->cur_transfer = transfer;
dspi->cur_msg = message;
@@ -934,6 +946,7 @@ static int dspi_transfer_one_message(struct spi_controller *ctlr,
dspi->tx_cmd |= SPI_PUSHR_CMD_CONT;
}
+ cs_change = transfer->cs_change;
dspi->tx = transfer->tx_buf;
dspi->rx = transfer->rx_buf;
dspi->len = transfer->len;
@@ -943,6 +956,8 @@ static int dspi_transfer_one_message(struct spi_controller *ctlr,
SPI_MCR_CLR_TXF | SPI_MCR_CLR_RXF,
SPI_MCR_CLR_TXF | SPI_MCR_CLR_RXF);
+ regmap_write(dspi->regmap, SPI_SR, SPI_SR_CLEAR);
+
spi_take_timestamp_pre(dspi->ctlr, dspi->cur_transfer,
dspi->progress, !dspi->irq);
@@ -966,6 +981,15 @@ static int dspi_transfer_one_message(struct spi_controller *ctlr,
spi_transfer_delay_exec(transfer);
}
+ if (status || !cs_change) {
+ /* Put DSPI in stop mode */
+ regmap_update_bits(dspi->regmap, SPI_MCR,
+ SPI_MCR_HALT, SPI_MCR_HALT);
+ while (regmap_read(dspi->regmap, SPI_SR, &val) >= 0 &&
+ val & SPI_SR_TXRXS)
+ ;
+ }
+
message->status = status;
spi_finalize_current_message(ctlr);
@@ -1128,6 +1152,20 @@ static int dspi_resume(struct device *dev)
static SIMPLE_DEV_PM_OPS(dspi_pm, dspi_suspend, dspi_resume);
+static const struct regmap_range dspi_yes_ranges[] = {
+ regmap_reg_range(SPI_MCR, SPI_MCR),
+ regmap_reg_range(SPI_TCR, SPI_CTAR(3)),
+ regmap_reg_range(SPI_SR, SPI_TXFR3),
+ regmap_reg_range(SPI_RXFR0, SPI_RXFR3),
+ regmap_reg_range(SPI_CTARE(0), SPI_CTARE(3)),
+ regmap_reg_range(SPI_SREX, SPI_SREX),
+};
+
+static const struct regmap_access_table dspi_access_table = {
+ .yes_ranges = dspi_yes_ranges,
+ .n_yes_ranges = ARRAY_SIZE(dspi_yes_ranges),
+};
+
static const struct regmap_range dspi_volatile_ranges[] = {
regmap_reg_range(SPI_MCR, SPI_TCR),
regmap_reg_range(SPI_SR, SPI_SR),
@@ -1145,6 +1183,8 @@ static const struct regmap_config dspi_regmap_config = {
.reg_stride = 4,
.max_register = 0x88,
.volatile_table = &dspi_volatile_table,
+ .rd_table = &dspi_access_table,
+ .wr_table = &dspi_access_table,
};
static const struct regmap_range dspi_xspi_volatile_ranges[] = {
@@ -1166,6 +1206,8 @@ static const struct regmap_config dspi_xspi_regmap_config[] = {
.reg_stride = 4,
.max_register = 0x13c,
.volatile_table = &dspi_xspi_volatile_table,
+ .rd_table = &dspi_access_table,
+ .wr_table = &dspi_access_table,
},
{
.name = "pushr",
@@ -1188,6 +1230,8 @@ static int dspi_init(struct fsl_dspi *dspi)
if (!spi_controller_is_slave(dspi->ctlr))
mcr |= SPI_MCR_MASTER;
+ mcr |= SPI_MCR_HALT;
+
regmap_write(dspi->regmap, SPI_MCR, mcr);
regmap_write(dspi->regmap, SPI_SR, SPI_SR_CLEAR);
diff --git a/drivers/spi/spi-loopback-test.c b/drivers/spi/spi-loopback-test.c
index 4d4f77a186a9..89fccb9da1b8 100644
--- a/drivers/spi/spi-loopback-test.c
+++ b/drivers/spi/spi-loopback-test.c
@@ -383,7 +383,7 @@ MODULE_LICENSE("GPL");
static void spi_test_print_hex_dump(char *pre, const void *ptr, size_t len)
{
/* limit the hex_dump */
- if (len < 1024) {
+ if (len <= 1024) {
print_hex_dump(KERN_INFO, pre,
DUMP_PREFIX_OFFSET, 16, 1,
ptr, len, 0);
diff --git a/drivers/spi/spi-sun4i.c b/drivers/spi/spi-sun4i.c
index 1fdfc6e6691d..a8fba310d700 100644
--- a/drivers/spi/spi-sun4i.c
+++ b/drivers/spi/spi-sun4i.c
@@ -263,6 +263,9 @@ static int sun4i_spi_transfer_one(struct spi_master *master,
else
reg |= SUN4I_CTL_DHB;
+ /* Now that the settings are correct, enable the interface */
+ reg |= SUN4I_CTL_ENABLE;
+
sun4i_spi_write(sspi, SUN4I_CTL_REG, reg);
/* Ensure that we have a parent clock fast enough */
@@ -403,7 +406,7 @@ static int sun4i_spi_runtime_resume(struct device *dev)
}
sun4i_spi_write(sspi, SUN4I_CTL_REG,
- SUN4I_CTL_ENABLE | SUN4I_CTL_MASTER | SUN4I_CTL_TP);
+ SUN4I_CTL_MASTER | SUN4I_CTL_TP);
return 0;
diff --git a/drivers/spi/spi-zynqmp-gqspi.c b/drivers/spi/spi-zynqmp-gqspi.c
index 3d3ac48243eb..408b83882dae 100644
--- a/drivers/spi/spi-zynqmp-gqspi.c
+++ b/drivers/spi/spi-zynqmp-gqspi.c
@@ -689,7 +689,6 @@ static void zynqmp_process_dma_irq(struct zynqmp_qspi *xqspi)
static irqreturn_t zynqmp_qspi_irq(int irq, void *dev_id)
{
struct zynqmp_qspi *xqspi = (struct zynqmp_qspi *)dev_id;
- irqreturn_t ret = IRQ_NONE;
u32 status, mask, dma_status = 0;
status = zynqmp_gqspi_read(xqspi, GQSPI_ISR_OFST);
@@ -704,27 +703,24 @@ static irqreturn_t zynqmp_qspi_irq(int irq, void *dev_id)
dma_status);
}
- if (mask & GQSPI_ISR_TXNOT_FULL_MASK) {
+ if (!mask && !dma_status)
+ return IRQ_NONE;
+
+ if (mask & GQSPI_ISR_TXNOT_FULL_MASK)
zynqmp_qspi_filltxfifo(xqspi, GQSPI_TX_FIFO_FILL);
- ret = IRQ_HANDLED;
- }
- if (dma_status & GQSPI_QSPIDMA_DST_I_STS_DONE_MASK) {
+ if (dma_status & GQSPI_QSPIDMA_DST_I_STS_DONE_MASK)
zynqmp_process_dma_irq(xqspi);
- ret = IRQ_HANDLED;
- } else if (!(mask & GQSPI_IER_RXEMPTY_MASK) &&
- (mask & GQSPI_IER_GENFIFOEMPTY_MASK)) {
+ else if (!(mask & GQSPI_IER_RXEMPTY_MASK) &&
+ (mask & GQSPI_IER_GENFIFOEMPTY_MASK))
zynqmp_qspi_readrxfifo(xqspi, GQSPI_RX_FIFO_FILL);
- ret = IRQ_HANDLED;
- }
if (xqspi->bytes_to_receive == 0 && xqspi->bytes_to_transfer == 0 &&
((status & GQSPI_IRQ_MASK) == GQSPI_IRQ_MASK)) {
zynqmp_gqspi_write(xqspi, GQSPI_IDR_OFST, GQSPI_ISR_IDR_MASK);
complete(&xqspi->data_completion);
- ret = IRQ_HANDLED;
}
- return ret;
+ return IRQ_HANDLED;
}
/**
diff --git a/drivers/staging/axis-fifo/axis-fifo.c b/drivers/staging/axis-fifo/axis-fifo.c
index 2bb1c2e9cb57..a005ddd6bc47 100644
--- a/drivers/staging/axis-fifo/axis-fifo.c
+++ b/drivers/staging/axis-fifo/axis-fifo.c
@@ -401,16 +401,14 @@ static ssize_t axis_fifo_read(struct file *f, char __user *buf,
bytes_available = ioread32(fifo->base_addr + XLLF_RLR_OFFSET);
if (!bytes_available) {
- dev_err(fifo->dt_device, "received a packet of length 0 - fifo core will be reset\n");
- reset_ip_core(fifo);
+ dev_err(fifo->dt_device, "received a packet of length 0\n");
ret = -EIO;
goto end_unlock;
}
if (bytes_available > len) {
- dev_err(fifo->dt_device, "user read buffer too small (available bytes=%zu user buffer bytes=%zu) - fifo core will be reset\n",
+ dev_err(fifo->dt_device, "user read buffer too small (available bytes=%zu user buffer bytes=%zu)\n",
bytes_available, len);
- reset_ip_core(fifo);
ret = -EINVAL;
goto end_unlock;
}
@@ -419,8 +417,7 @@ static ssize_t axis_fifo_read(struct file *f, char __user *buf,
/* this probably can't happen unless IP
* registers were previously mishandled
*/
- dev_err(fifo->dt_device, "received a packet that isn't word-aligned - fifo core will be reset\n");
- reset_ip_core(fifo);
+ dev_err(fifo->dt_device, "received a packet that isn't word-aligned\n");
ret = -EIO;
goto end_unlock;
}
@@ -441,7 +438,6 @@ static ssize_t axis_fifo_read(struct file *f, char __user *buf,
if (copy_to_user(buf + copied * sizeof(u32), tmp_buf,
copy * sizeof(u32))) {
- reset_ip_core(fifo);
ret = -EFAULT;
goto end_unlock;
}
@@ -552,7 +548,6 @@ static ssize_t axis_fifo_write(struct file *f, const char __user *buf,
if (copy_from_user(tmp_buf, buf + copied * sizeof(u32),
copy * sizeof(u32))) {
- reset_ip_core(fifo);
ret = -EFAULT;
goto end_unlock;
}
@@ -785,9 +780,6 @@ static int axis_fifo_parse_dt(struct axis_fifo *fifo)
goto end;
}
- /* IP sets TDFV to fifo depth - 4 so we will do the same */
- fifo->tx_fifo_depth -= 4;
-
ret = get_dts_property(fifo, "xlnx,use-rx-data", &fifo->has_rx_fifo);
if (ret) {
dev_err(fifo->dt_device, "missing xlnx,use-rx-data property\n");
diff --git a/drivers/staging/iio/adc/ad7816.c b/drivers/staging/iio/adc/ad7816.c
index 6c14d7bcdd67..081b17f49863 100644
--- a/drivers/staging/iio/adc/ad7816.c
+++ b/drivers/staging/iio/adc/ad7816.c
@@ -136,7 +136,7 @@ static ssize_t ad7816_store_mode(struct device *dev,
struct iio_dev *indio_dev = dev_to_iio_dev(dev);
struct ad7816_chip_info *chip = iio_priv(indio_dev);
- if (strcmp(buf, "full")) {
+ if (strcmp(buf, "full") == 0) {
gpiod_set_value(chip->rdwr_pin, 1);
chip->mode = AD7816_FULL;
} else {
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
index 075e2a6fb474..48fe53323f84 100644
--- a/drivers/target/iscsi/iscsi_target.c
+++ b/drivers/target/iscsi/iscsi_target.c
@@ -4168,8 +4168,8 @@ int iscsit_close_connection(
spin_unlock(&iscsit_global->ts_bitmap_lock);
iscsit_stop_timers_for_cmds(conn);
- iscsit_stop_nopin_response_timer(conn);
iscsit_stop_nopin_timer(conn);
+ iscsit_stop_nopin_response_timer(conn);
if (conn->conn_transport->iscsit_wait_conn)
conn->conn_transport->iscsit_wait_conn(conn);
diff --git a/drivers/target/target_core_file.c b/drivers/target/target_core_file.c
index 18fbbe510d01..eb3eae8f799a 100644
--- a/drivers/target/target_core_file.c
+++ b/drivers/target/target_core_file.c
@@ -455,6 +455,9 @@ fd_execute_write_same(struct se_cmd *cmd)
return TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;
}
+ if (!cmd->t_data_nents)
+ return TCM_INVALID_CDB_FIELD;
+
if (cmd->t_data_nents > 1 ||
cmd->t_data_sg[0].length != cmd->se_dev->dev_attrib.block_size) {
pr_err("WRITE_SAME: Illegal SGL t_data_nents: %u length: %u"
diff --git a/drivers/target/target_core_iblock.c b/drivers/target/target_core_iblock.c
index f2bd2e207e0b..db4f1ae3d6fc 100644
--- a/drivers/target/target_core_iblock.c
+++ b/drivers/target/target_core_iblock.c
@@ -458,6 +458,10 @@ iblock_execute_write_same(struct se_cmd *cmd)
" backends not supported\n");
return TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;
}
+
+ if (!cmd->t_data_nents)
+ return TCM_INVALID_CDB_FIELD;
+
sg = &cmd->t_data_sg[0];
if (cmd->t_data_nents > 1 ||
diff --git a/drivers/target/target_core_sbc.c b/drivers/target/target_core_sbc.c
index 47c5f26e6012..f2809c44988b 100644
--- a/drivers/target/target_core_sbc.c
+++ b/drivers/target/target_core_sbc.c
@@ -312,6 +312,12 @@ sbc_setup_write_same(struct se_cmd *cmd, unsigned char flags, struct sbc_ops *op
pr_warn("WRITE SAME with ANCHOR not supported\n");
return TCM_INVALID_CDB_FIELD;
}
+
+ if (flags & 0x01) {
+ pr_warn("WRITE SAME with NDOB not supported\n");
+ return TCM_INVALID_CDB_FIELD;
+ }
+
/*
* Special case for WRITE_SAME w/ UNMAP=1 that ends up getting
* translated into block discard requests within backend code.
diff --git a/drivers/thermal/qoriq_thermal.c b/drivers/thermal/qoriq_thermal.c
index 73049f9bea25..34a5fbcc3d20 100644
--- a/drivers/thermal/qoriq_thermal.c
+++ b/drivers/thermal/qoriq_thermal.c
@@ -19,6 +19,7 @@
#define SITES_MAX 16
#define TMR_DISABLE 0x0
#define TMR_ME 0x80000000
+#define TMR_CMD BIT(29)
#define TMR_ALPF 0x0c000000
#define TMR_ALPF_V2 0x03000000
#define TMTMIR_DEFAULT 0x0000000f
@@ -345,6 +346,12 @@ static int __maybe_unused qoriq_tmu_suspend(struct device *dev)
if (ret)
return ret;
+ if (data->ver > TMU_VER1) {
+ ret = regmap_set_bits(data->regmap, REGS_TMR, TMR_CMD);
+ if (ret)
+ return ret;
+ }
+
clk_disable_unprepare(data->clk);
return 0;
@@ -359,6 +366,12 @@ static int __maybe_unused qoriq_tmu_resume(struct device *dev)
if (ret)
return ret;
+ if (data->ver > TMU_VER1) {
+ ret = regmap_clear_bits(data->regmap, REGS_TMR, TMR_CMD);
+ if (ret)
+ return ret;
+ }
+
/* Enable monitoring */
return regmap_update_bits(data->regmap, REGS_TMR, TMR_ME, TMR_ME);
}
diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c
index a54c3cff6c28..03d883f5a4cc 100644
--- a/drivers/usb/chipidea/ci_hdrc_imx.c
+++ b/drivers/usb/chipidea/ci_hdrc_imx.c
@@ -360,25 +360,18 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
data->pinctrl = devm_pinctrl_get(dev);
if (PTR_ERR(data->pinctrl) == -ENODEV)
data->pinctrl = NULL;
- else if (IS_ERR(data->pinctrl)) {
- if (PTR_ERR(data->pinctrl) != -EPROBE_DEFER)
- dev_err(dev, "pinctrl get failed, err=%ld\n",
- PTR_ERR(data->pinctrl));
- return PTR_ERR(data->pinctrl);
- }
+ else if (IS_ERR(data->pinctrl))
+ return dev_err_probe(dev, PTR_ERR(data->pinctrl),
+ "pinctrl get failed\n");
data->hsic_pad_regulator =
devm_regulator_get_optional(dev, "hsic");
if (PTR_ERR(data->hsic_pad_regulator) == -ENODEV) {
/* no pad regualator is needed */
data->hsic_pad_regulator = NULL;
- } else if (IS_ERR(data->hsic_pad_regulator)) {
- if (PTR_ERR(data->hsic_pad_regulator) != -EPROBE_DEFER)
- dev_err(dev,
- "Get HSIC pad regulator error: %ld\n",
- PTR_ERR(data->hsic_pad_regulator));
- return PTR_ERR(data->hsic_pad_regulator);
- }
+ } else if (IS_ERR(data->hsic_pad_regulator))
+ return dev_err_probe(dev, PTR_ERR(data->hsic_pad_regulator),
+ "Get HSIC pad regulator error\n");
if (data->hsic_pad_regulator) {
ret = regulator_enable(data->hsic_pad_regulator);
@@ -453,7 +446,11 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
of_usb_get_phy_mode(np) == USBPHY_INTERFACE_MODE_ULPI) {
pdata.flags |= CI_HDRC_OVERRIDE_PHY_CONTROL;
data->override_phy_control = true;
- usb_phy_init(pdata.usb_phy);
+ ret = usb_phy_init(pdata.usb_phy);
+ if (ret) {
+ dev_err(dev, "Failed to init phy\n");
+ goto err_clk;
+ }
}
if (pdata.flags & CI_HDRC_SUPPORTS_RUNTIME_PM)
@@ -462,7 +459,7 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
ret = imx_usbmisc_init(data->usbmisc_data);
if (ret) {
dev_err(dev, "usbmisc init failed, ret=%d\n", ret);
- goto err_clk;
+ goto phy_shutdown;
}
data->ci_pdev = ci_hdrc_add_device(dev,
@@ -470,10 +467,8 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
&pdata);
if (IS_ERR(data->ci_pdev)) {
ret = PTR_ERR(data->ci_pdev);
- if (ret != -EPROBE_DEFER)
- dev_err(dev, "ci_hdrc_add_device failed, err=%d\n",
- ret);
- goto err_clk;
+ dev_err_probe(dev, ret, "ci_hdrc_add_device failed\n");
+ goto phy_shutdown;
}
if (data->usbmisc_data) {
@@ -507,6 +502,9 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
disable_device:
ci_hdrc_remove_device(data->ci_pdev);
+phy_shutdown:
+ if (data->override_phy_control)
+ usb_phy_shutdown(data->phy);
err_clk:
imx_disable_unprepare_clks(dev);
disable_hsic_regulator:
diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c
index 78adc112a77b..f76fedd8fa90 100644
--- a/drivers/usb/class/usbtmc.c
+++ b/drivers/usb/class/usbtmc.c
@@ -485,6 +485,7 @@ static int usbtmc488_ioctl_read_stb(struct usbtmc_file_data *file_data,
u8 tag;
__u8 stb;
int rv;
+ long wait_rv;
dev_dbg(dev, "Enter ioctl_read_stb iin_ep_present: %d\n",
data->iin_ep_present);
@@ -527,16 +528,17 @@ static int usbtmc488_ioctl_read_stb(struct usbtmc_file_data *file_data,
}
if (data->iin_ep_present) {
- rv = wait_event_interruptible_timeout(
+ wait_rv = wait_event_interruptible_timeout(
data->waitq,
atomic_read(&data->iin_data_valid) != 0,
file_data->timeout);
- if (rv < 0) {
- dev_dbg(dev, "wait interrupted %d\n", rv);
+ if (wait_rv < 0) {
+ dev_dbg(dev, "wait interrupted %ld\n", wait_rv);
+ rv = wait_rv;
goto exit;
}
- if (rv == 0) {
+ if (wait_rv == 0) {
dev_dbg(dev, "wait timed out\n");
rv = -ETIMEDOUT;
goto exit;
@@ -556,6 +558,8 @@ static int usbtmc488_ioctl_read_stb(struct usbtmc_file_data *file_data,
rv = put_user(stb, (__u8 __user *)arg);
dev_dbg(dev, "stb:0x%02x received %d\n", (unsigned int)stb, rv);
+ rv = 0;
+
exit:
/* bump interrupt bTag */
data->iin_bTag += 1;
@@ -572,9 +576,9 @@ static int usbtmc488_ioctl_wait_srq(struct usbtmc_file_data *file_data,
{
struct usbtmc_device_data *data = file_data->data;
struct device *dev = &data->intf->dev;
- int rv;
u32 timeout;
unsigned long expire;
+ long wait_rv;
if (!data->iin_ep_present) {
dev_dbg(dev, "no interrupt endpoint present\n");
@@ -588,25 +592,24 @@ static int usbtmc488_ioctl_wait_srq(struct usbtmc_file_data *file_data,
mutex_unlock(&data->io_mutex);
- rv = wait_event_interruptible_timeout(
- data->waitq,
- atomic_read(&file_data->srq_asserted) != 0 ||
- atomic_read(&file_data->closing),
- expire);
+ wait_rv = wait_event_interruptible_timeout(
+ data->waitq,
+ atomic_read(&file_data->srq_asserted) != 0 ||
+ atomic_read(&file_data->closing),
+ expire);
mutex_lock(&data->io_mutex);
/* Note! disconnect or close could be called in the meantime */
if (atomic_read(&file_data->closing) || data->zombie)
- rv = -ENODEV;
+ return -ENODEV;
- if (rv < 0) {
- /* dev can be invalid now! */
- pr_debug("%s - wait interrupted %d\n", __func__, rv);
- return rv;
+ if (wait_rv < 0) {
+ dev_dbg(dev, "%s - wait interrupted %ld\n", __func__, wait_rv);
+ return wait_rv;
}
- if (rv == 0) {
+ if (wait_rv == 0) {
dev_dbg(dev, "%s - wait timed out\n", __func__);
return -ETIMEDOUT;
}
@@ -800,6 +803,7 @@ static ssize_t usbtmc_generic_read(struct usbtmc_file_data *file_data,
unsigned long expire;
int bufcount = 1;
int again = 0;
+ long wait_rv;
/* mutex already locked */
@@ -912,19 +916,24 @@ static ssize_t usbtmc_generic_read(struct usbtmc_file_data *file_data,
if (!(flags & USBTMC_FLAG_ASYNC)) {
dev_dbg(dev, "%s: before wait time %lu\n",
__func__, expire);
- retval = wait_event_interruptible_timeout(
+ wait_rv = wait_event_interruptible_timeout(
file_data->wait_bulk_in,
usbtmc_do_transfer(file_data),
expire);
- dev_dbg(dev, "%s: wait returned %d\n",
- __func__, retval);
+ dev_dbg(dev, "%s: wait returned %ld\n",
+ __func__, wait_rv);
- if (retval <= 0) {
- if (retval == 0)
- retval = -ETIMEDOUT;
+ if (wait_rv < 0) {
+ retval = wait_rv;
goto error;
}
+
+ if (wait_rv == 0) {
+ retval = -ETIMEDOUT;
+ goto error;
+ }
+
}
urb = usb_get_from_anchor(&file_data->in_anchor);
@@ -1350,7 +1359,10 @@ static ssize_t usbtmc_read(struct file *filp, char __user *buf,
if (!buffer)
return -ENOMEM;
- mutex_lock(&data->io_mutex);
+ retval = mutex_lock_interruptible(&data->io_mutex);
+ if (retval < 0)
+ goto exit_nolock;
+
if (data->zombie) {
retval = -ENODEV;
goto exit;
@@ -1473,6 +1485,7 @@ static ssize_t usbtmc_read(struct file *filp, char __user *buf,
exit:
mutex_unlock(&data->io_mutex);
+exit_nolock:
kfree(buffer);
return retval;
}
diff --git a/drivers/usb/gadget/udc/tegra-xudc.c b/drivers/usb/gadget/udc/tegra-xudc.c
index 9d3e36c867e8..7f159ed1fa41 100644
--- a/drivers/usb/gadget/udc/tegra-xudc.c
+++ b/drivers/usb/gadget/udc/tegra-xudc.c
@@ -1737,6 +1737,10 @@ static int __tegra_xudc_ep_disable(struct tegra_xudc_ep *ep)
val = xudc_readl(xudc, CTRL);
val &= ~CTRL_RUN;
xudc_writel(xudc, val, CTRL);
+
+ val = xudc_readl(xudc, ST);
+ if (val & ST_RC)
+ xudc_writel(xudc, ST_RC, ST);
}
dev_info(xudc->dev, "ep %u disabled\n", ep->index);
diff --git a/drivers/usb/host/uhci-platform.c b/drivers/usb/host/uhci-platform.c
index be9e9db7cad1..c0834bac4c95 100644
--- a/drivers/usb/host/uhci-platform.c
+++ b/drivers/usb/host/uhci-platform.c
@@ -122,7 +122,7 @@ static int uhci_hcd_platform_probe(struct platform_device *pdev)
}
/* Get and enable clock if any specified */
- uhci->clk = devm_clk_get(&pdev->dev, NULL);
+ uhci->clk = devm_clk_get_optional(&pdev->dev, NULL);
if (IS_ERR(uhci->clk)) {
ret = PTR_ERR(uhci->clk);
goto err_rmr;
diff --git a/drivers/usb/host/xhci-tegra.c b/drivers/usb/host/xhci-tegra.c
index ffb09737b5d0..e2cd145ed495 100644
--- a/drivers/usb/host/xhci-tegra.c
+++ b/drivers/usb/host/xhci-tegra.c
@@ -1178,6 +1178,7 @@ static void tegra_xhci_id_work(struct work_struct *work)
tegra->otg_usb3_port = tegra_xusb_padctl_get_usb3_companion(tegra->padctl,
tegra->otg_usb2_port);
+ pm_runtime_get_sync(tegra->dev);
if (tegra->host_mode) {
/* switch to host mode */
if (tegra->otg_usb3_port >= 0) {
@@ -1207,6 +1208,7 @@ static void tegra_xhci_id_work(struct work_struct *work)
}
tegra_xhci_set_port_power(tegra, true, true);
+ pm_runtime_mark_last_busy(tegra->dev);
} else {
if (tegra->otg_usb3_port >= 0)
@@ -1214,6 +1216,7 @@ static void tegra_xhci_id_work(struct work_struct *work)
tegra_xhci_set_port_power(tegra, true, false);
}
+ pm_runtime_put_autosuspend(tegra->dev);
}
static int tegra_xusb_get_usb2_port(struct tegra_xusb *tegra,
diff --git a/drivers/usb/typec/altmodes/displayport.c b/drivers/usb/typec/altmodes/displayport.c
index def903e9d2ab..e0456e5e10b6 100644
--- a/drivers/usb/typec/altmodes/displayport.c
+++ b/drivers/usb/typec/altmodes/displayport.c
@@ -527,15 +527,20 @@ static ssize_t pin_assignment_show(struct device *dev,
}
static DEVICE_ATTR_RW(pin_assignment);
-static struct attribute *dp_altmode_attrs[] = {
+static struct attribute *displayport_attrs[] = {
&dev_attr_configuration.attr,
&dev_attr_pin_assignment.attr,
NULL
};
-static const struct attribute_group dp_altmode_group = {
+static const struct attribute_group displayport_group = {
.name = "displayport",
- .attrs = dp_altmode_attrs,
+ .attrs = displayport_attrs,
+};
+
+static const struct attribute_group *displayport_groups[] = {
+ &displayport_group,
+ NULL,
};
int dp_altmode_probe(struct typec_altmode *alt)
@@ -543,7 +548,6 @@ int dp_altmode_probe(struct typec_altmode *alt)
const struct typec_altmode *port = typec_altmode_get_partner(alt);
struct fwnode_handle *fwnode;
struct dp_altmode *dp;
- int ret;
/* FIXME: Port can only be DFP_U. */
@@ -554,10 +558,6 @@ int dp_altmode_probe(struct typec_altmode *alt)
DP_CAP_PIN_ASSIGN_DFP_D(alt->vdo)))
return -ENODEV;
- ret = sysfs_create_group(&alt->dev.kobj, &dp_altmode_group);
- if (ret)
- return ret;
-
dp = devm_kzalloc(&alt->dev, sizeof(*dp), GFP_KERNEL);
if (!dp)
return -ENOMEM;
@@ -588,7 +588,6 @@ void dp_altmode_remove(struct typec_altmode *alt)
{
struct dp_altmode *dp = typec_altmode_get_drvdata(alt);
- sysfs_remove_group(&alt->dev.kobj, &dp_altmode_group);
cancel_work_sync(&dp->work);
if (dp->connector_fwnode) {
@@ -613,6 +612,7 @@ static struct typec_altmode_driver dp_altmode_driver = {
.driver = {
.name = "typec_displayport",
.owner = THIS_MODULE,
+ .dev_groups = displayport_groups,
},
};
module_typec_altmode_driver(dp_altmode_driver);
diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c
index c37240a34899..a6ee9fae875a 100644
--- a/drivers/usb/typec/tcpm/tcpm.c
+++ b/drivers/usb/typec/tcpm/tcpm.c
@@ -4019,7 +4019,7 @@ static void _tcpm_cc_change(struct tcpm_port *port, enum typec_cc_status cc1,
case SNK_TRY_WAIT_DEBOUNCE:
if (!tcpm_port_is_sink(port)) {
port->max_wait = 0;
- tcpm_set_state(port, SRC_TRYWAIT, 0);
+ tcpm_set_state(port, SRC_TRYWAIT, PD_T_PD_DEBOUNCE);
}
break;
case SRC_TRY_WAIT:
diff --git a/drivers/usb/typec/ucsi/displayport.c b/drivers/usb/typec/ucsi/displayport.c
index 4446c4066679..60c871fa58d6 100644
--- a/drivers/usb/typec/ucsi/displayport.c
+++ b/drivers/usb/typec/ucsi/displayport.c
@@ -270,6 +270,8 @@ void ucsi_displayport_remove_partner(struct typec_altmode *alt)
if (!dp)
return;
+ cancel_work_sync(&dp->work);
+
dp->data.conf = 0;
dp->data.status = 0;
dp->initialized = false;
diff --git a/drivers/usb/typec/ucsi/ucsi_ccg.c b/drivers/usb/typec/ucsi/ucsi_ccg.c
index fb6211efb5d8..dffdb5eb506b 100644
--- a/drivers/usb/typec/ucsi/ucsi_ccg.c
+++ b/drivers/usb/typec/ucsi/ucsi_ccg.c
@@ -573,6 +573,10 @@ static int ucsi_ccg_sync_write(struct ucsi *ucsi, unsigned int offset,
uc->has_multiple_dp) {
con_index = (uc->last_cmd_sent >> 16) &
UCSI_CMD_CONNECTOR_MASK;
+ if (con_index == 0) {
+ ret = -EINVAL;
+ goto err_put;
+ }
con = &uc->ucsi->connector[con_index - 1];
ucsi_ccg_update_set_new_cam_cmd(uc, con, (u64 *)val);
}
@@ -587,6 +591,7 @@ static int ucsi_ccg_sync_write(struct ucsi *ucsi, unsigned int offset,
err_clear_bit:
clear_bit(DEV_CMD_PENDING, &uc->flags);
+err_put:
pm_runtime_put_sync(uc->dev);
mutex_unlock(&uc->lock);
diff --git a/drivers/video/fbdev/core/bitblit.c b/drivers/video/fbdev/core/bitblit.c
index 8e095b0982db..bb821b68f88c 100644
--- a/drivers/video/fbdev/core/bitblit.c
+++ b/drivers/video/fbdev/core/bitblit.c
@@ -59,12 +59,11 @@ static void bit_bmove(struct vc_data *vc, struct fb_info *info, int sy,
}
static void bit_clear(struct vc_data *vc, struct fb_info *info, int sy,
- int sx, int height, int width)
+ int sx, int height, int width, int fg, int bg)
{
- int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
struct fb_fillrect region;
- region.color = attr_bgcol_ec(bgshift, vc, info);
+ region.color = bg;
region.dx = sx * vc->vc_font.width;
region.dy = sy * vc->vc_font.height;
region.width = width * vc->vc_font.width;
diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
index 6d58c8a5cb44..080b615a5581 100644
--- a/drivers/video/fbdev/core/fbcon.c
+++ b/drivers/video/fbdev/core/fbcon.c
@@ -1266,7 +1266,7 @@ static void fbcon_clear(struct vc_data *vc, int sy, int sx, int height,
{
struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]];
struct fbcon_ops *ops = info->fbcon_par;
-
+ int fg, bg;
struct fbcon_display *p = &fb_display[vc->vc_num];
u_int y_break;
@@ -1287,16 +1287,18 @@ static void fbcon_clear(struct vc_data *vc, int sy, int sx, int height,
fbcon_clear_margins(vc, 0);
}
+ fg = get_color(vc, info, vc->vc_video_erase_char, 1);
+ bg = get_color(vc, info, vc->vc_video_erase_char, 0);
/* Split blits that cross physical y_wrap boundary */
y_break = p->vrows - p->yscroll;
if (sy < y_break && sy + height - 1 >= y_break) {
u_int b = y_break - sy;
- ops->clear(vc, info, real_y(p, sy), sx, b, width);
+ ops->clear(vc, info, real_y(p, sy), sx, b, width, fg, bg);
ops->clear(vc, info, real_y(p, sy + b), sx, height - b,
- width);
+ width, fg, bg);
} else
- ops->clear(vc, info, real_y(p, sy), sx, height, width);
+ ops->clear(vc, info, real_y(p, sy), sx, height, width, fg, bg);
}
static void fbcon_putcs(struct vc_data *vc, const unsigned short *s,
diff --git a/drivers/video/fbdev/core/fbcon.h b/drivers/video/fbdev/core/fbcon.h
index 0f16cbc99e6a..3e1ec454b8aa 100644
--- a/drivers/video/fbdev/core/fbcon.h
+++ b/drivers/video/fbdev/core/fbcon.h
@@ -57,7 +57,7 @@ struct fbcon_ops {
void (*bmove)(struct vc_data *vc, struct fb_info *info, int sy,
int sx, int dy, int dx, int height, int width);
void (*clear)(struct vc_data *vc, struct fb_info *info, int sy,
- int sx, int height, int width);
+ int sx, int height, int width, int fb, int bg);
void (*putcs)(struct vc_data *vc, struct fb_info *info,
const unsigned short *s, int count, int yy, int xx,
int fg, int bg);
@@ -118,42 +118,6 @@ static inline int mono_col(const struct fb_info *info)
return (~(0xfff << max_len)) & 0xff;
}
-static inline int attr_col_ec(int shift, struct vc_data *vc,
- struct fb_info *info, int is_fg)
-{
- int is_mono01;
- int col;
- int fg;
- int bg;
-
- if (!vc)
- return 0;
-
- if (vc->vc_can_do_color)
- return is_fg ? attr_fgcol(shift,vc->vc_video_erase_char)
- : attr_bgcol(shift,vc->vc_video_erase_char);
-
- if (!info)
- return 0;
-
- col = mono_col(info);
- is_mono01 = info->fix.visual == FB_VISUAL_MONO01;
-
- if (attr_reverse(vc->vc_video_erase_char)) {
- fg = is_mono01 ? col : 0;
- bg = is_mono01 ? 0 : col;
- }
- else {
- fg = is_mono01 ? 0 : col;
- bg = is_mono01 ? col : 0;
- }
-
- return is_fg ? fg : bg;
-}
-
-#define attr_bgcol_ec(bgshift, vc, info) attr_col_ec(bgshift, vc, info, 0)
-#define attr_fgcol_ec(fgshift, vc, info) attr_col_ec(fgshift, vc, info, 1)
-
/*
* Scroll Method
*/
diff --git a/drivers/video/fbdev/core/fbcon_ccw.c b/drivers/video/fbdev/core/fbcon_ccw.c
index f75b24c32d49..40c7d5793ccf 100644
--- a/drivers/video/fbdev/core/fbcon_ccw.c
+++ b/drivers/video/fbdev/core/fbcon_ccw.c
@@ -78,14 +78,13 @@ static void ccw_bmove(struct vc_data *vc, struct fb_info *info, int sy,
}
static void ccw_clear(struct vc_data *vc, struct fb_info *info, int sy,
- int sx, int height, int width)
+ int sx, int height, int width, int fg, int bg)
{
struct fbcon_ops *ops = info->fbcon_par;
struct fb_fillrect region;
- int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
u32 vyres = GETVYRES(ops->p, info);
- region.color = attr_bgcol_ec(bgshift,vc,info);
+ region.color = bg;
region.dx = sy * vc->vc_font.height;
region.dy = vyres - ((sx + width) * vc->vc_font.width);
region.height = width * vc->vc_font.width;
diff --git a/drivers/video/fbdev/core/fbcon_cw.c b/drivers/video/fbdev/core/fbcon_cw.c
index cf03dc62f35d..933e4ed52d39 100644
--- a/drivers/video/fbdev/core/fbcon_cw.c
+++ b/drivers/video/fbdev/core/fbcon_cw.c
@@ -63,14 +63,13 @@ static void cw_bmove(struct vc_data *vc, struct fb_info *info, int sy,
}
static void cw_clear(struct vc_data *vc, struct fb_info *info, int sy,
- int sx, int height, int width)
+ int sx, int height, int width, int fg, int bg)
{
struct fbcon_ops *ops = info->fbcon_par;
struct fb_fillrect region;
- int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
u32 vxres = GETVXRES(ops->p, info);
- region.color = attr_bgcol_ec(bgshift,vc,info);
+ region.color = bg;
region.dx = vxres - ((sy + height) * vc->vc_font.height);
region.dy = sx * vc->vc_font.width;
region.height = width * vc->vc_font.width;
diff --git a/drivers/video/fbdev/core/fbcon_ud.c b/drivers/video/fbdev/core/fbcon_ud.c
index c5d2da731d68..abd23f37815f 100644
--- a/drivers/video/fbdev/core/fbcon_ud.c
+++ b/drivers/video/fbdev/core/fbcon_ud.c
@@ -64,15 +64,14 @@ static void ud_bmove(struct vc_data *vc, struct fb_info *info, int sy,
}
static void ud_clear(struct vc_data *vc, struct fb_info *info, int sy,
- int sx, int height, int width)
+ int sx, int height, int width, int fg, int bg)
{
struct fbcon_ops *ops = info->fbcon_par;
struct fb_fillrect region;
- int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
u32 vyres = GETVYRES(ops->p, info);
u32 vxres = GETVXRES(ops->p, info);
- region.color = attr_bgcol_ec(bgshift,vc,info);
+ region.color = bg;
region.dy = vyres - ((sy + height) * vc->vc_font.height);
region.dx = vxres - ((sx + width) * vc->vc_font.width);
region.width = width * vc->vc_font.width;
diff --git a/drivers/video/fbdev/core/tileblit.c b/drivers/video/fbdev/core/tileblit.c
index 628fe5e010c0..ef20824e9c7b 100644
--- a/drivers/video/fbdev/core/tileblit.c
+++ b/drivers/video/fbdev/core/tileblit.c
@@ -33,16 +33,14 @@ static void tile_bmove(struct vc_data *vc, struct fb_info *info, int sy,
}
static void tile_clear(struct vc_data *vc, struct fb_info *info, int sy,
- int sx, int height, int width)
+ int sx, int height, int width, int fg, int bg)
{
struct fb_tilerect rect;
- int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
- int fgshift = (vc->vc_hi_font_mask) ? 9 : 8;
rect.index = vc->vc_video_erase_char &
((vc->vc_hi_font_mask) ? 0x1ff : 0xff);
- rect.fg = attr_fgcol_ec(fgshift, vc, info);
- rect.bg = attr_bgcol_ec(bgshift, vc, info);
+ rect.fg = fg;
+ rect.bg = bg;
rect.sx = sx;
rect.sy = sy;
rect.width = width;
@@ -77,7 +75,42 @@ static void tile_putcs(struct vc_data *vc, struct fb_info *info,
static void tile_clear_margins(struct vc_data *vc, struct fb_info *info,
int color, int bottom_only)
{
- return;
+ unsigned int cw = vc->vc_font.width;
+ unsigned int ch = vc->vc_font.height;
+ unsigned int rw = info->var.xres - (vc->vc_cols*cw);
+ unsigned int bh = info->var.yres - (vc->vc_rows*ch);
+ unsigned int rs = info->var.xres - rw;
+ unsigned int bs = info->var.yres - bh;
+ unsigned int vwt = info->var.xres_virtual / cw;
+ unsigned int vht = info->var.yres_virtual / ch;
+ struct fb_tilerect rect;
+
+ rect.index = vc->vc_video_erase_char &
+ ((vc->vc_hi_font_mask) ? 0x1ff : 0xff);
+ rect.fg = color;
+ rect.bg = color;
+
+ if ((int) rw > 0 && !bottom_only) {
+ rect.sx = (info->var.xoffset + rs + cw - 1) / cw;
+ rect.sy = 0;
+ rect.width = (rw + cw - 1) / cw;
+ rect.height = vht;
+ if (rect.width + rect.sx > vwt)
+ rect.width = vwt - rect.sx;
+ if (rect.sx < vwt)
+ info->tileops->fb_tilefill(info, &rect);
+ }
+
+ if ((int) bh > 0) {
+ rect.sx = info->var.xoffset / cw;
+ rect.sy = (info->var.yoffset + bs) / ch;
+ rect.width = rs / cw;
+ rect.height = (bh + ch - 1) / ch;
+ if (rect.height + rect.sy > vht)
+ rect.height = vht - rect.sy;
+ if (rect.sy < vht)
+ info->tileops->fb_tilefill(info, &rect);
+ }
}
static void tile_cursor(struct vc_data *vc, struct fb_info *info, int mode,
diff --git a/drivers/video/fbdev/fsl-diu-fb.c b/drivers/video/fbdev/fsl-diu-fb.c
index 5d564e8670c5..6f2606932867 100644
--- a/drivers/video/fbdev/fsl-diu-fb.c
+++ b/drivers/video/fbdev/fsl-diu-fb.c
@@ -1830,6 +1830,7 @@ static int fsl_diu_remove(struct platform_device *pdev)
int i;
data = dev_get_drvdata(&pdev->dev);
+ device_remove_file(&pdev->dev, &data->dev_attr);
disable_lcdc(&data->fsl_diu_info[0]);
free_irq(data->irq, data->diu_reg);
diff --git a/drivers/xen/platform-pci.c b/drivers/xen/platform-pci.c
index 804d8f4d0e73..e7a95f7926c4 100644
--- a/drivers/xen/platform-pci.c
+++ b/drivers/xen/platform-pci.c
@@ -26,6 +26,8 @@
#define DRV_NAME "xen-platform-pci"
+#define PCI_DEVICE_ID_XEN_PLATFORM_XS61 0x0002
+
static unsigned long platform_mmio;
static unsigned long platform_mmio_alloc;
static unsigned long platform_mmiolen;
@@ -167,6 +169,8 @@ static int platform_pci_probe(struct pci_dev *pdev,
static const struct pci_device_id platform_pci_tbl[] = {
{PCI_VENDOR_ID_XEN, PCI_DEVICE_ID_XEN_PLATFORM,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+ {PCI_VENDOR_ID_XEN, PCI_DEVICE_ID_XEN_PLATFORM_XS61,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{0,}
};
diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c
index 000d02ea4f7d..d8efb8ea23a0 100644
--- a/drivers/xen/swiotlb-xen.c
+++ b/drivers/xen/swiotlb-xen.c
@@ -87,19 +87,21 @@ static inline dma_addr_t xen_virt_to_bus(struct device *dev, void *address)
return xen_phys_to_dma(dev, virt_to_phys(address));
}
+static inline bool range_requires_alignment(phys_addr_t p, size_t size)
+{
+ phys_addr_t algn = 1ULL << (get_order(size) + PAGE_SHIFT);
+ phys_addr_t bus_addr = pfn_to_bfn(XEN_PFN_DOWN(p)) << XEN_PAGE_SHIFT;
+
+ return IS_ALIGNED(p, algn) && !IS_ALIGNED(bus_addr, algn);
+}
+
static inline int range_straddles_page_boundary(phys_addr_t p, size_t size)
{
unsigned long next_bfn, xen_pfn = XEN_PFN_DOWN(p);
unsigned int i, nr_pages = XEN_PFN_UP(xen_offset_in_page(p) + size);
- phys_addr_t algn = 1ULL << (get_order(size) + PAGE_SHIFT);
next_bfn = pfn_to_bfn(xen_pfn);
- /* If buffer is physically aligned, ensure DMA alignment. */
- if (IS_ALIGNED(p, algn) &&
- !IS_ALIGNED((phys_addr_t)next_bfn << XEN_PAGE_SHIFT, algn))
- return 1;
-
for (i = 1; i < nr_pages; i++)
if (pfn_to_bfn(++xen_pfn) != ++next_bfn)
return 1;
@@ -321,7 +323,8 @@ xen_swiotlb_alloc_coherent(struct device *hwdev, size_t size,
phys = dma_to_phys(hwdev, *dma_handle);
dev_addr = xen_phys_to_dma(hwdev, phys);
if (((dev_addr + size - 1 <= dma_mask)) &&
- !range_straddles_page_boundary(phys, size))
+ !range_straddles_page_boundary(phys, size) &&
+ !range_requires_alignment(phys, size))
*dma_handle = dev_addr;
else {
if (xen_create_contiguous_region(phys, order,
@@ -362,6 +365,7 @@ xen_swiotlb_free_coherent(struct device *hwdev, size_t size, void *vaddr,
if (!WARN_ON((dev_addr + size - 1 > dma_mask) ||
range_straddles_page_boundary(phys, size)) &&
+ !range_requires_alignment(phys, size) &&
TestClearPageXenRemapped(page))
xen_destroy_contiguous_region(phys, order);
diff --git a/drivers/xen/xenbus/xenbus.h b/drivers/xen/xenbus/xenbus.h
index 2a93b7c9c159..f1576988a28a 100644
--- a/drivers/xen/xenbus/xenbus.h
+++ b/drivers/xen/xenbus/xenbus.h
@@ -77,6 +77,7 @@ enum xb_req_state {
struct xb_req_data {
struct list_head list;
wait_queue_head_t wq;
+ struct kref kref;
struct xsd_sockmsg msg;
uint32_t caller_req_id;
enum xsd_sockmsg_type type;
@@ -103,6 +104,7 @@ int xb_init_comms(void);
void xb_deinit_comms(void);
int xs_watch_msg(struct xs_watch_event *event);
void xs_request_exit(struct xb_req_data *req);
+void xs_free_req(struct kref *kref);
int xenbus_match(struct device *_dev, struct device_driver *_drv);
int xenbus_dev_probe(struct device *_dev);
diff --git a/drivers/xen/xenbus/xenbus_comms.c b/drivers/xen/xenbus/xenbus_comms.c
index e5fda0256feb..82df2da1b880 100644
--- a/drivers/xen/xenbus/xenbus_comms.c
+++ b/drivers/xen/xenbus/xenbus_comms.c
@@ -309,8 +309,8 @@ static int process_msg(void)
virt_wmb();
req->state = xb_req_state_got_reply;
req->cb(req);
- } else
- kfree(req);
+ }
+ kref_put(&req->kref, xs_free_req);
}
mutex_unlock(&xs_response_mutex);
@@ -386,14 +386,13 @@ static int process_writes(void)
state.req->msg.type = XS_ERROR;
state.req->err = err;
list_del(&state.req->list);
- if (state.req->state == xb_req_state_aborted)
- kfree(state.req);
- else {
+ if (state.req->state != xb_req_state_aborted) {
/* write err, then update state */
virt_wmb();
state.req->state = xb_req_state_got_reply;
wake_up(&state.req->wq);
}
+ kref_put(&state.req->kref, xs_free_req);
mutex_unlock(&xb_write_mutex);
diff --git a/drivers/xen/xenbus/xenbus_dev_frontend.c b/drivers/xen/xenbus/xenbus_dev_frontend.c
index 0792fda49a15..c495cff3da30 100644
--- a/drivers/xen/xenbus/xenbus_dev_frontend.c
+++ b/drivers/xen/xenbus/xenbus_dev_frontend.c
@@ -406,7 +406,7 @@ void xenbus_dev_queue_reply(struct xb_req_data *req)
mutex_unlock(&u->reply_mutex);
kfree(req->body);
- kfree(req);
+ kref_put(&req->kref, xs_free_req);
kref_put(&u->kref, xenbus_file_free);
diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c
index 743795d402cb..fb5358a73820 100644
--- a/drivers/xen/xenbus/xenbus_probe.c
+++ b/drivers/xen/xenbus/xenbus_probe.c
@@ -864,9 +864,15 @@ static int __init xenbus_init(void)
if (xen_pv_domain())
xen_store_domain_type = XS_PV;
if (xen_hvm_domain())
+ {
xen_store_domain_type = XS_HVM;
- if (xen_hvm_domain() && xen_initial_domain())
- xen_store_domain_type = XS_LOCAL;
+ err = hvm_get_parameter(HVM_PARAM_STORE_EVTCHN, &v);
+ if (err)
+ goto out_error;
+ xen_store_evtchn = (int)v;
+ if (!v && xen_initial_domain())
+ xen_store_domain_type = XS_LOCAL;
+ }
if (xen_pv_domain() && !xen_start_info->store_evtchn)
xen_store_domain_type = XS_LOCAL;
if (xen_pv_domain() && xen_start_info->store_evtchn)
@@ -885,10 +891,6 @@ static int __init xenbus_init(void)
xen_store_interface = gfn_to_virt(xen_store_gfn);
break;
case XS_HVM:
- err = hvm_get_parameter(HVM_PARAM_STORE_EVTCHN, &v);
- if (err)
- goto out_error;
- xen_store_evtchn = (int)v;
err = hvm_get_parameter(HVM_PARAM_STORE_PFN, &v);
if (err)
goto out_error;
diff --git a/drivers/xen/xenbus/xenbus_xs.c b/drivers/xen/xenbus/xenbus_xs.c
index 12e02eb01f59..a4dd92719e7a 100644
--- a/drivers/xen/xenbus/xenbus_xs.c
+++ b/drivers/xen/xenbus/xenbus_xs.c
@@ -112,6 +112,12 @@ static void xs_suspend_exit(void)
wake_up_all(&xs_state_enter_wq);
}
+void xs_free_req(struct kref *kref)
+{
+ struct xb_req_data *req = container_of(kref, struct xb_req_data, kref);
+ kfree(req);
+}
+
static uint32_t xs_request_enter(struct xb_req_data *req)
{
uint32_t rq_id;
@@ -237,6 +243,12 @@ static void xs_send(struct xb_req_data *req, struct xsd_sockmsg *msg)
req->caller_req_id = req->msg.req_id;
req->msg.req_id = xs_request_enter(req);
+ /*
+ * Take 2nd ref. One for this thread, and the second for the
+ * xenbus_thread.
+ */
+ kref_get(&req->kref);
+
mutex_lock(&xb_write_mutex);
list_add_tail(&req->list, &xb_write_list);
notify = list_is_singular(&xb_write_list);
@@ -261,8 +273,8 @@ static void *xs_wait_for_reply(struct xb_req_data *req, struct xsd_sockmsg *msg)
if (req->state == xb_req_state_queued ||
req->state == xb_req_state_wait_reply)
req->state = xb_req_state_aborted;
- else
- kfree(req);
+
+ kref_put(&req->kref, xs_free_req);
mutex_unlock(&xb_write_mutex);
return ret;
@@ -291,6 +303,7 @@ int xenbus_dev_request_and_reply(struct xsd_sockmsg *msg, void *par)
req->cb = xenbus_dev_queue_reply;
req->par = par;
req->user_req = true;
+ kref_init(&req->kref);
xs_send(req, msg);
@@ -319,6 +332,7 @@ static void *xs_talkv(struct xenbus_transaction t,
req->num_vecs = num_vecs;
req->cb = xs_wake_up;
req->user_req = false;
+ kref_init(&req->kref);
msg.req_id = 0;
msg.tx_id = t.id;
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index cf2b65be04b5..d652d4091b2b 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -174,6 +174,14 @@ int btrfs_lookup_extent_info(struct btrfs_trans_handle *trans,
ei = btrfs_item_ptr(leaf, path->slots[0],
struct btrfs_extent_item);
num_refs = btrfs_extent_refs(leaf, ei);
+ if (unlikely(num_refs == 0)) {
+ ret = -EUCLEAN;
+ btrfs_err(fs_info,
+ "unexpected zero reference count for extent item (%llu %u %llu)",
+ key.objectid, key.type, key.offset);
+ btrfs_abort_transaction(trans, ret);
+ goto out_free;
+ }
extent_flags = btrfs_extent_flags(leaf, ei);
} else {
ret = -EINVAL;
@@ -185,8 +193,6 @@ int btrfs_lookup_extent_info(struct btrfs_trans_handle *trans,
goto out_free;
}
-
- BUG_ON(num_refs == 0);
} else {
num_refs = 0;
extent_flags = 0;
@@ -216,10 +222,19 @@ int btrfs_lookup_extent_info(struct btrfs_trans_handle *trans,
goto search_again;
}
spin_lock(&head->lock);
- if (head->extent_op && head->extent_op->update_flags)
+ if (head->extent_op && head->extent_op->update_flags) {
extent_flags |= head->extent_op->flags_to_set;
- else
- BUG_ON(num_refs == 0);
+ } else if (unlikely(num_refs == 0)) {
+ spin_unlock(&head->lock);
+ mutex_unlock(&head->mutex);
+ spin_unlock(&delayed_refs->lock);
+ ret = -EUCLEAN;
+ btrfs_err(fs_info,
+ "unexpected zero reference count for extent %llu (%s)",
+ bytenr, metadata ? "metadata" : "data");
+ btrfs_abort_transaction(trans, ret);
+ goto out_free;
+ }
num_refs += head->ref_mod;
spin_unlock(&head->lock);
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 9cef930c4ecf..8498994ef5c6 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -5134,10 +5134,10 @@ struct extent_buffer *find_extent_buffer(struct btrfs_fs_info *fs_info,
return NULL;
}
-#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
struct extent_buffer *alloc_test_extent_buffer(struct btrfs_fs_info *fs_info,
u64 start)
{
+#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
struct extent_buffer *eb, *exists = NULL;
int ret;
@@ -5173,8 +5173,11 @@ struct extent_buffer *alloc_test_extent_buffer(struct btrfs_fs_info *fs_info,
free_eb:
btrfs_release_extent_buffer(eb);
return exists;
-}
+#else
+ /* Stub to avoid linker error when compiled with optimizations turned off. */
+ return NULL;
#endif
+}
struct extent_buffer *alloc_extent_buffer(struct btrfs_fs_info *fs_info,
u64 start)
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index a9e72f42e91e..3e7bb24eb227 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -390,10 +390,8 @@ static int fs_path_ensure_buf(struct fs_path *p, int len)
if (p->buf_len >= len)
return 0;
- if (len > PATH_MAX) {
- WARN_ON(1);
- return -ENOMEM;
- }
+ if (WARN_ON(len > PATH_MAX))
+ return -ENAMETOOLONG;
path_len = p->end - p->start;
old_buf_len = p->buf_len;
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c
index 799be3a5d25e..9e62d75f2465 100644
--- a/fs/cifs/readdir.c
+++ b/fs/cifs/readdir.c
@@ -755,7 +755,10 @@ find_cifs_entry(const unsigned int xid, struct cifs_tcon *tcon, loff_t pos,
else
cifs_buf_release(cfile->srch_inf.
ntwrk_buf_start);
+ /* Reset all pointers to the network buffer to prevent stale references */
cfile->srch_inf.ntwrk_buf_start = NULL;
+ cfile->srch_inf.srch_entries_start = NULL;
+ cfile->srch_inf.last_entry = NULL;
}
rc = initiate_cifs_search(xid, file, full_path);
if (rc) {
@@ -778,11 +781,11 @@ find_cifs_entry(const unsigned int xid, struct cifs_tcon *tcon, loff_t pos,
rc = server->ops->query_dir_next(xid, tcon, &cfile->fid,
search_flags,
&cfile->srch_inf);
+ if (rc)
+ return -ENOENT;
/* FindFirst/Next set last_entry to NULL on malformed reply */
if (cfile->srch_inf.last_entry)
cifs_save_resume_key(cfile->srch_inf.last_entry, cfile);
- if (rc)
- return -ENOENT;
}
if (index_to_find < cfile->srch_inf.index_of_last_entry) {
/* we found the buffer that contains the entry */
diff --git a/fs/coredump.c b/fs/coredump.c
index 7b085975ea16..7e5ac34112bd 100644
--- a/fs/coredump.c
+++ b/fs/coredump.c
@@ -42,6 +42,7 @@
#include <linux/path.h>
#include <linux/timekeeping.h>
#include <linux/elf.h>
+#include <uapi/linux/pidfd.h>
#include <linux/uaccess.h>
#include <asm/mmu_context.h>
@@ -56,6 +57,13 @@
static bool dump_vma_snapshot(struct coredump_params *cprm);
static void free_vma_snapshot(struct coredump_params *cprm);
+/*
+ * File descriptor number for the pidfd for the thread-group leader of
+ * the coredumping task installed into the usermode helper's file
+ * descriptor table.
+ */
+#define COREDUMP_PIDFD_NUMBER 3
+
int core_uses_pid;
unsigned int core_pipe_limit;
char core_pattern[CORENAME_MAX_SIZE] = "core";
@@ -327,6 +335,27 @@ static int format_corename(struct core_name *cn, struct coredump_params *cprm,
err = cn_printf(cn, "%lu",
rlimit(RLIMIT_CORE));
break;
+ /* pidfd number */
+ case 'F': {
+ /*
+ * Installing a pidfd only makes sense if
+ * we actually spawn a usermode helper.
+ */
+ if (!ispipe)
+ break;
+
+ /*
+ * Note that we'll install a pidfd for the
+ * thread-group leader. We know that task
+ * linkage hasn't been removed yet and even if
+ * this @current isn't the actual thread-group
+ * leader we know that the thread-group leader
+ * cannot be reaped until @current has exited.
+ */
+ cprm->pid = task_tgid(current);
+ err = cn_printf(cn, "%d", COREDUMP_PIDFD_NUMBER);
+ break;
+ }
default:
break;
}
@@ -550,7 +579,7 @@ static void wait_for_dump_helpers(struct file *file)
}
/*
- * umh_pipe_setup
+ * umh_coredump_setup
* helper function to customize the process used
* to collect the core in userspace. Specifically
* it sets up a pipe and installs it as fd 0 (stdin)
@@ -560,21 +589,61 @@ static void wait_for_dump_helpers(struct file *file)
* is a special value that we use to trap recursive
* core dumps
*/
-static int umh_pipe_setup(struct subprocess_info *info, struct cred *new)
+static int umh_coredump_setup(struct subprocess_info *info, struct cred *new)
{
struct file *files[2];
+ struct file *pidfs_file = NULL;
struct coredump_params *cp = (struct coredump_params *)info->data;
- int err = create_pipe_files(files, 0);
+ int err;
+
+ if (cp->pid) {
+ int fd;
+
+ fd = pidfd_prepare(cp->pid, 0, &pidfs_file);
+ if (fd < 0)
+ return fd;
+
+ /*
+ * We don't care about the fd. We also cannot simply
+ * replace it below because dup2() will refuse to close
+ * this file descriptor if its in a larval state. So
+ * close it!
+ */
+ put_unused_fd(fd);
+
+ /*
+ * Usermode helpers are childen of either
+ * system_unbound_wq or of kthreadd. So we know that
+ * we're starting off with a clean file descriptor
+ * table. So we should always be able to use
+ * COREDUMP_PIDFD_NUMBER as our file descriptor value.
+ */
+ err = replace_fd(COREDUMP_PIDFD_NUMBER, pidfs_file, 0);
+ if (err < 0)
+ goto out_fail;
+
+ pidfs_file = NULL;
+ }
+
+ err = create_pipe_files(files, 0);
if (err)
- return err;
+ goto out_fail;
cp->file = files[1];
err = replace_fd(0, files[0], 0);
fput(files[0]);
+ if (err < 0)
+ goto out_fail;
+
/* and disallow core files too */
current->signal->rlim[RLIMIT_CORE] = (struct rlimit){1, 1};
+ err = 0;
+
+out_fail:
+ if (pidfs_file)
+ fput(pidfs_file);
return err;
}
@@ -651,7 +720,7 @@ void do_coredump(const kernel_siginfo_t *siginfo)
}
if (cprm.limit == 1) {
- /* See umh_pipe_setup() which sets RLIMIT_CORE = 1.
+ /* See umh_coredump_setup() which sets RLIMIT_CORE = 1.
*
* Normally core limits are irrelevant to pipes, since
* we're not writing to the file system, but we use
@@ -696,7 +765,7 @@ void do_coredump(const kernel_siginfo_t *siginfo)
retval = -ENOMEM;
sub_info = call_usermodehelper_setup(helper_argv[0],
helper_argv, NULL, GFP_KERNEL,
- umh_pipe_setup, NULL, &cprm);
+ umh_coredump_setup, NULL, &cprm);
if (sub_info)
retval = call_usermodehelper_exec(sub_info,
UMH_WAIT_EXEC);
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c
index bdbf130416c7..be267cd9dea7 100644
--- a/fs/ext4/balloc.c
+++ b/fs/ext4/balloc.c
@@ -637,8 +637,8 @@ static int ext4_has_free_clusters(struct ext4_sb_info *sbi,
/* Hm, nope. Are (enough) root reserved clusters available? */
if (uid_eq(sbi->s_resuid, current_fsuid()) ||
(!gid_eq(sbi->s_resgid, GLOBAL_ROOT_GID) && in_group_p(sbi->s_resgid)) ||
- capable(CAP_SYS_RESOURCE) ||
- (flags & EXT4_MB_USE_ROOT_BLOCKS)) {
+ (flags & EXT4_MB_USE_ROOT_BLOCKS) ||
+ capable(CAP_SYS_RESOURCE)) {
if (free_clusters >= (nclusters + dirty_clusters +
resv_clusters))
diff --git a/fs/namespace.c b/fs/namespace.c
index 2f97112657ad..869cc6e06d88 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -569,15 +569,11 @@ int __legitimize_mnt(struct vfsmount *bastard, unsigned seq)
return 0;
mnt = real_mount(bastard);
mnt_add_count(mnt, 1);
- smp_mb(); // see mntput_no_expire()
+ smp_mb(); // see mntput_no_expire() and do_umount()
if (likely(!read_seqretry(&mount_lock, seq)))
return 0;
- if (bastard->mnt_flags & MNT_SYNC_UMOUNT) {
- mnt_add_count(mnt, -1);
- return 1;
- }
lock_mount_hash();
- if (unlikely(bastard->mnt_flags & MNT_DOOMED)) {
+ if (unlikely(bastard->mnt_flags & (MNT_SYNC_UMOUNT | MNT_DOOMED))) {
mnt_add_count(mnt, -1);
unlock_mount_hash();
return 1;
@@ -1638,6 +1634,7 @@ static int do_umount(struct mount *mnt, int flags)
umount_tree(mnt, UMOUNT_PROPAGATE);
retval = 0;
} else {
+ smp_mb(); // paired with __legitimize_mnt()
shrink_submounts(mnt);
retval = -EBUSY;
if (!propagate_mount_busy(mnt, 2)) {
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c
index dbed8d44d805..f3bb987e9dba 100644
--- a/fs/nfs/delegation.c
+++ b/fs/nfs/delegation.c
@@ -297,7 +297,8 @@ nfs_start_delegation_return_locked(struct nfs_inode *nfsi)
if (delegation == NULL)
goto out;
spin_lock(&delegation->lock);
- if (!test_and_set_bit(NFS_DELEGATION_RETURNING, &delegation->flags)) {
+ if (delegation->inode &&
+ !test_and_set_bit(NFS_DELEGATION_RETURNING, &delegation->flags)) {
clear_bit(NFS_DELEGATION_RETURN_DELAYED, &delegation->flags);
/* Refcount matched in nfs_end_delegation_return() */
ret = nfs_get_delegation(delegation);
diff --git a/fs/nfs/filelayout/filelayoutdev.c b/fs/nfs/filelayout/filelayoutdev.c
index 86c3f7e69ec4..e6bf55e37521 100644
--- a/fs/nfs/filelayout/filelayoutdev.c
+++ b/fs/nfs/filelayout/filelayoutdev.c
@@ -75,6 +75,7 @@ nfs4_fl_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
struct page *scratch;
struct list_head dsaddrs;
struct nfs4_pnfs_ds_addr *da;
+ struct net *net = server->nfs_client->cl_net;
/* set up xdr stream */
scratch = alloc_page(gfp_flags);
@@ -160,8 +161,7 @@ nfs4_fl_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
mp_count = be32_to_cpup(p); /* multipath count */
for (j = 0; j < mp_count; j++) {
- da = nfs4_decode_mp_ds_addr(server->nfs_client->cl_net,
- &stream, gfp_flags);
+ da = nfs4_decode_mp_ds_addr(net, &stream, gfp_flags);
if (da)
list_add_tail(&da->da_node, &dsaddrs);
}
@@ -171,7 +171,7 @@ nfs4_fl_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
goto out_err_free_deviceid;
}
- dsaddr->ds_list[i] = nfs4_pnfs_ds_add(&dsaddrs, gfp_flags);
+ dsaddr->ds_list[i] = nfs4_pnfs_ds_add(net, &dsaddrs, gfp_flags);
if (!dsaddr->ds_list[i])
goto out_err_drain_dsaddrs;
diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c
index 1af0b8ad83f2..ce9c2d1f54ae 100644
--- a/fs/nfs/flexfilelayout/flexfilelayout.c
+++ b/fs/nfs/flexfilelayout/flexfilelayout.c
@@ -1260,6 +1260,7 @@ static void ff_layout_io_track_ds_error(struct pnfs_layout_segment *lseg,
case -ECONNRESET:
case -EHOSTDOWN:
case -EHOSTUNREACH:
+ case -ENETDOWN:
case -ENETUNREACH:
case -EADDRINUSE:
case -ENOBUFS:
diff --git a/fs/nfs/flexfilelayout/flexfilelayoutdev.c b/fs/nfs/flexfilelayout/flexfilelayoutdev.c
index bfa7202ca7be..4b0cdddce6eb 100644
--- a/fs/nfs/flexfilelayout/flexfilelayoutdev.c
+++ b/fs/nfs/flexfilelayout/flexfilelayoutdev.c
@@ -49,6 +49,7 @@ nfs4_ff_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
struct nfs4_pnfs_ds_addr *da;
struct nfs4_ff_layout_ds *new_ds = NULL;
struct nfs4_ff_ds_version *ds_versions = NULL;
+ struct net *net = server->nfs_client->cl_net;
u32 mp_count;
u32 version_count;
__be32 *p;
@@ -80,8 +81,7 @@ nfs4_ff_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
for (i = 0; i < mp_count; i++) {
/* multipath ds */
- da = nfs4_decode_mp_ds_addr(server->nfs_client->cl_net,
- &stream, gfp_flags);
+ da = nfs4_decode_mp_ds_addr(net, &stream, gfp_flags);
if (da)
list_add_tail(&da->da_node, &dsaddrs);
}
@@ -147,7 +147,7 @@ nfs4_ff_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
new_ds->ds_versions = ds_versions;
new_ds->ds_versions_cnt = version_count;
- new_ds->ds = nfs4_pnfs_ds_add(&dsaddrs, gfp_flags);
+ new_ds->ds = nfs4_pnfs_ds_add(net, &dsaddrs, gfp_flags);
if (!new_ds->ds)
goto out_err_drain_dsaddrs;
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index ac3fab214df1..1005ecf7c250 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -6732,10 +6732,18 @@ static struct nfs4_unlockdata *nfs4_alloc_unlockdata(struct file_lock *fl,
struct nfs4_unlockdata *p;
struct nfs4_state *state = lsp->ls_state;
struct inode *inode = state->inode;
+ struct nfs_lock_context *l_ctx;
p = kzalloc(sizeof(*p), GFP_NOFS);
if (p == NULL)
return NULL;
+ l_ctx = nfs_get_lock_context(ctx);
+ if (!IS_ERR(l_ctx)) {
+ p->l_ctx = l_ctx;
+ } else {
+ kfree(p);
+ return NULL;
+ }
p->arg.fh = NFS_FH(inode);
p->arg.fl = &p->fl;
p->arg.seqid = seqid;
@@ -6743,7 +6751,6 @@ static struct nfs4_unlockdata *nfs4_alloc_unlockdata(struct file_lock *fl,
p->lsp = lsp;
/* Ensure we don't close file until we're done freeing locks! */
p->ctx = get_nfs_open_context(ctx);
- p->l_ctx = nfs_get_lock_context(ctx);
locks_init_lock(&p->fl);
locks_copy_lock(&p->fl, fl);
p->server = NFS_SERVER(inode);
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 807dd6f17e1b..e3cabced1aea 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -2719,7 +2719,15 @@ static void nfs4_state_manager(struct nfs_client *clp)
pr_warn_ratelimited("NFS: state manager%s%s failed on NFSv4 server %s"
" with error %d\n", section_sep, section,
clp->cl_hostname, -status);
- ssleep(1);
+ switch (status) {
+ case -ENETDOWN:
+ case -ENETUNREACH:
+ nfs_mark_client_ready(clp, -EIO);
+ break;
+ default:
+ ssleep(1);
+ break;
+ }
out_drain:
memalloc_nofs_restore(memflags);
nfs4_end_drain_session(clp);
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 39ac4824b97d..1800836306a5 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -733,6 +733,14 @@ pnfs_mark_matching_lsegs_invalid(struct pnfs_layout_hdr *lo,
return remaining;
}
+static void pnfs_reset_return_info(struct pnfs_layout_hdr *lo)
+{
+ struct pnfs_layout_segment *lseg;
+
+ list_for_each_entry(lseg, &lo->plh_return_segs, pls_list)
+ pnfs_set_plh_return_info(lo, lseg->pls_range.iomode, 0);
+}
+
static void
pnfs_free_returned_lsegs(struct pnfs_layout_hdr *lo,
struct list_head *free_me,
@@ -1183,6 +1191,7 @@ void pnfs_layoutreturn_free_lsegs(struct pnfs_layout_hdr *lo,
pnfs_mark_matching_lsegs_invalid(lo, &freeme, range, seq);
pnfs_free_returned_lsegs(lo, &freeme, range, seq);
pnfs_set_layout_stateid(lo, stateid, NULL, true);
+ pnfs_reset_return_info(lo);
} else
pnfs_mark_layout_stateid_invalid(lo, &freeme);
out_unlock:
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
index a7cf84a6673b..f88b0cf00f21 100644
--- a/fs/nfs/pnfs.h
+++ b/fs/nfs/pnfs.h
@@ -57,6 +57,7 @@ struct nfs4_pnfs_ds {
struct list_head ds_node; /* nfs4_pnfs_dev_hlist dev_dslist */
char *ds_remotestr; /* comma sep list of addrs */
struct list_head ds_addrs;
+ const struct net *ds_net;
struct nfs_client *ds_clp;
refcount_t ds_count;
unsigned long ds_state;
@@ -405,7 +406,8 @@ int pnfs_generic_commit_pagelist(struct inode *inode,
int pnfs_generic_scan_commit_lists(struct nfs_commit_info *cinfo, int max);
void pnfs_generic_write_commit_done(struct rpc_task *task, void *data);
void nfs4_pnfs_ds_put(struct nfs4_pnfs_ds *ds);
-struct nfs4_pnfs_ds *nfs4_pnfs_ds_add(struct list_head *dsaddrs,
+struct nfs4_pnfs_ds *nfs4_pnfs_ds_add(const struct net *net,
+ struct list_head *dsaddrs,
gfp_t gfp_flags);
void nfs4_pnfs_v3_ds_connect_unload(void);
int nfs4_pnfs_ds_connect(struct nfs_server *mds_srv, struct nfs4_pnfs_ds *ds,
diff --git a/fs/nfs/pnfs_nfs.c b/fs/nfs/pnfs_nfs.c
index a2ad8bb87e2d..461c00c1338c 100644
--- a/fs/nfs/pnfs_nfs.c
+++ b/fs/nfs/pnfs_nfs.c
@@ -651,12 +651,12 @@ _same_data_server_addrs_locked(const struct list_head *dsaddrs1,
* Lookup DS by addresses. nfs4_ds_cache_lock is held
*/
static struct nfs4_pnfs_ds *
-_data_server_lookup_locked(const struct list_head *dsaddrs)
+_data_server_lookup_locked(const struct net *net, const struct list_head *dsaddrs)
{
struct nfs4_pnfs_ds *ds;
list_for_each_entry(ds, &nfs4_data_server_cache, ds_node)
- if (_same_data_server_addrs_locked(&ds->ds_addrs, dsaddrs))
+ if (ds->ds_net == net && _same_data_server_addrs_locked(&ds->ds_addrs, dsaddrs))
return ds;
return NULL;
}
@@ -749,7 +749,7 @@ nfs4_pnfs_remotestr(struct list_head *dsaddrs, gfp_t gfp_flags)
* uncached and return cached struct nfs4_pnfs_ds.
*/
struct nfs4_pnfs_ds *
-nfs4_pnfs_ds_add(struct list_head *dsaddrs, gfp_t gfp_flags)
+nfs4_pnfs_ds_add(const struct net *net, struct list_head *dsaddrs, gfp_t gfp_flags)
{
struct nfs4_pnfs_ds *tmp_ds, *ds = NULL;
char *remotestr;
@@ -767,13 +767,14 @@ nfs4_pnfs_ds_add(struct list_head *dsaddrs, gfp_t gfp_flags)
remotestr = nfs4_pnfs_remotestr(dsaddrs, gfp_flags);
spin_lock(&nfs4_ds_cache_lock);
- tmp_ds = _data_server_lookup_locked(dsaddrs);
+ tmp_ds = _data_server_lookup_locked(net, dsaddrs);
if (tmp_ds == NULL) {
INIT_LIST_HEAD(&ds->ds_addrs);
list_splice_init(dsaddrs, &ds->ds_addrs);
ds->ds_remotestr = remotestr;
refcount_set(&ds->ds_count, 1);
INIT_LIST_HEAD(&ds->ds_node);
+ ds->ds_net = net;
ds->ds_clp = NULL;
list_add(&ds->ds_node, &nfs4_data_server_cache);
dprintk("%s add new data server %s\n", __func__,
diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c
index c319495988b6..02a1d2e99af1 100644
--- a/fs/ocfs2/journal.c
+++ b/fs/ocfs2/journal.c
@@ -175,7 +175,7 @@ int ocfs2_recovery_init(struct ocfs2_super *osb)
struct ocfs2_recovery_map *rm;
mutex_init(&osb->recovery_lock);
- osb->disable_recovery = 0;
+ osb->recovery_state = OCFS2_REC_ENABLED;
osb->recovery_thread_task = NULL;
init_waitqueue_head(&osb->recovery_event);
@@ -194,31 +194,53 @@ int ocfs2_recovery_init(struct ocfs2_super *osb)
return 0;
}
-/* we can't grab the goofy sem lock from inside wait_event, so we use
- * memory barriers to make sure that we'll see the null task before
- * being woken up */
static int ocfs2_recovery_thread_running(struct ocfs2_super *osb)
{
- mb();
return osb->recovery_thread_task != NULL;
}
-void ocfs2_recovery_exit(struct ocfs2_super *osb)
+static void ocfs2_recovery_disable(struct ocfs2_super *osb,
+ enum ocfs2_recovery_state state)
{
- struct ocfs2_recovery_map *rm;
-
- /* disable any new recovery threads and wait for any currently
- * running ones to exit. Do this before setting the vol_state. */
mutex_lock(&osb->recovery_lock);
- osb->disable_recovery = 1;
+ /*
+ * If recovery thread is not running, we can directly transition to
+ * final state.
+ */
+ if (!ocfs2_recovery_thread_running(osb)) {
+ osb->recovery_state = state + 1;
+ goto out_lock;
+ }
+ osb->recovery_state = state;
+ /* Wait for recovery thread to acknowledge state transition */
+ wait_event_cmd(osb->recovery_event,
+ !ocfs2_recovery_thread_running(osb) ||
+ osb->recovery_state >= state + 1,
+ mutex_unlock(&osb->recovery_lock),
+ mutex_lock(&osb->recovery_lock));
+out_lock:
mutex_unlock(&osb->recovery_lock);
- wait_event(osb->recovery_event, !ocfs2_recovery_thread_running(osb));
- /* At this point, we know that no more recovery threads can be
- * launched, so wait for any recovery completion work to
- * complete. */
+ /*
+ * At this point we know that no more recovery work can be queued so
+ * wait for any recovery completion work to complete.
+ */
if (osb->ocfs2_wq)
flush_workqueue(osb->ocfs2_wq);
+}
+
+void ocfs2_recovery_disable_quota(struct ocfs2_super *osb)
+{
+ ocfs2_recovery_disable(osb, OCFS2_REC_QUOTA_WANT_DISABLE);
+}
+
+void ocfs2_recovery_exit(struct ocfs2_super *osb)
+{
+ struct ocfs2_recovery_map *rm;
+
+ /* disable any new recovery threads and wait for any currently
+ * running ones to exit. Do this before setting the vol_state. */
+ ocfs2_recovery_disable(osb, OCFS2_REC_WANT_DISABLE);
/*
* Now that recovery is shut down, and the osb is about to be
@@ -1412,6 +1434,18 @@ static int __ocfs2_recovery_thread(void *arg)
}
}
restart:
+ if (quota_enabled) {
+ mutex_lock(&osb->recovery_lock);
+ /* Confirm that recovery thread will no longer recover quotas */
+ if (osb->recovery_state == OCFS2_REC_QUOTA_WANT_DISABLE) {
+ osb->recovery_state = OCFS2_REC_QUOTA_DISABLED;
+ wake_up(&osb->recovery_event);
+ }
+ if (osb->recovery_state >= OCFS2_REC_QUOTA_DISABLED)
+ quota_enabled = 0;
+ mutex_unlock(&osb->recovery_lock);
+ }
+
status = ocfs2_super_lock(osb, 1);
if (status < 0) {
mlog_errno(status);
@@ -1509,13 +1543,13 @@ static int __ocfs2_recovery_thread(void *arg)
ocfs2_free_replay_slots(osb);
osb->recovery_thread_task = NULL;
- mb(); /* sync with ocfs2_recovery_thread_running */
+ if (osb->recovery_state == OCFS2_REC_WANT_DISABLE)
+ osb->recovery_state = OCFS2_REC_DISABLED;
wake_up(&osb->recovery_event);
mutex_unlock(&osb->recovery_lock);
- if (quota_enabled)
- kfree(rm_quota);
+ kfree(rm_quota);
/* no one is callint kthread_stop() for us so the kthread() api
* requires that we call do_exit(). And it isn't exported, but
@@ -1525,14 +1559,16 @@ static int __ocfs2_recovery_thread(void *arg)
void ocfs2_recovery_thread(struct ocfs2_super *osb, int node_num)
{
+ int was_set = -1;
+
mutex_lock(&osb->recovery_lock);
+ if (osb->recovery_state < OCFS2_REC_WANT_DISABLE)
+ was_set = ocfs2_recovery_map_set(osb, node_num);
trace_ocfs2_recovery_thread(node_num, osb->node_num,
- osb->disable_recovery, osb->recovery_thread_task,
- osb->disable_recovery ?
- -1 : ocfs2_recovery_map_set(osb, node_num));
+ osb->recovery_state, osb->recovery_thread_task, was_set);
- if (osb->disable_recovery)
+ if (osb->recovery_state >= OCFS2_REC_WANT_DISABLE)
goto out;
if (osb->recovery_thread_task)
diff --git a/fs/ocfs2/journal.h b/fs/ocfs2/journal.h
index bc5d77cb3c50..141182422eab 100644
--- a/fs/ocfs2/journal.h
+++ b/fs/ocfs2/journal.h
@@ -150,6 +150,7 @@ void ocfs2_wait_for_recovery(struct ocfs2_super *osb);
int ocfs2_recovery_init(struct ocfs2_super *osb);
void ocfs2_recovery_exit(struct ocfs2_super *osb);
+void ocfs2_recovery_disable_quota(struct ocfs2_super *osb);
int ocfs2_compute_replay_slots(struct ocfs2_super *osb);
void ocfs2_free_replay_slots(struct ocfs2_super *osb);
diff --git a/fs/ocfs2/ocfs2.h b/fs/ocfs2/ocfs2.h
index 0a8cd8e59a92..5cea6942c1bd 100644
--- a/fs/ocfs2/ocfs2.h
+++ b/fs/ocfs2/ocfs2.h
@@ -286,6 +286,21 @@ enum ocfs2_mount_options
#define OCFS2_OSB_ERROR_FS 0x0004
#define OCFS2_DEFAULT_ATIME_QUANTUM 60
+enum ocfs2_recovery_state {
+ OCFS2_REC_ENABLED = 0,
+ OCFS2_REC_QUOTA_WANT_DISABLE,
+ /*
+ * Must be OCFS2_REC_QUOTA_WANT_DISABLE + 1 for
+ * ocfs2_recovery_disable_quota() to work.
+ */
+ OCFS2_REC_QUOTA_DISABLED,
+ OCFS2_REC_WANT_DISABLE,
+ /*
+ * Must be OCFS2_REC_WANT_DISABLE + 1 for ocfs2_recovery_exit() to work
+ */
+ OCFS2_REC_DISABLED,
+};
+
struct ocfs2_journal;
struct ocfs2_slot_info;
struct ocfs2_recovery_map;
@@ -348,7 +363,7 @@ struct ocfs2_super
struct ocfs2_recovery_map *recovery_map;
struct ocfs2_replay_map *replay_map;
struct task_struct *recovery_thread_task;
- int disable_recovery;
+ enum ocfs2_recovery_state recovery_state;
wait_queue_head_t checkpoint_event;
struct ocfs2_journal *journal;
unsigned long osb_commit_interval;
diff --git a/fs/ocfs2/quota_local.c b/fs/ocfs2/quota_local.c
index 77d5aa90338f..1baa68c01c67 100644
--- a/fs/ocfs2/quota_local.c
+++ b/fs/ocfs2/quota_local.c
@@ -453,8 +453,7 @@ struct ocfs2_quota_recovery *ocfs2_begin_quota_recovery(
/* Sync changes in local quota file into global quota file and
* reinitialize local quota file.
- * The function expects local quota file to be already locked and
- * s_umount locked in shared mode. */
+ * The function expects local quota file to be already locked. */
static int ocfs2_recover_local_quota_file(struct inode *lqinode,
int type,
struct ocfs2_quota_recovery *rec)
@@ -585,7 +584,6 @@ int ocfs2_finish_quota_recovery(struct ocfs2_super *osb,
{
unsigned int ino[OCFS2_MAXQUOTAS] = { LOCAL_USER_QUOTA_SYSTEM_INODE,
LOCAL_GROUP_QUOTA_SYSTEM_INODE };
- struct super_block *sb = osb->sb;
struct ocfs2_local_disk_dqinfo *ldinfo;
struct buffer_head *bh;
handle_t *handle;
@@ -597,7 +595,6 @@ int ocfs2_finish_quota_recovery(struct ocfs2_super *osb,
printk(KERN_NOTICE "ocfs2: Finishing quota recovery on device (%s) for "
"slot %u\n", osb->dev_str, slot_num);
- down_read(&sb->s_umount);
for (type = 0; type < OCFS2_MAXQUOTAS; type++) {
if (list_empty(&(rec->r_list[type])))
continue;
@@ -674,7 +671,6 @@ int ocfs2_finish_quota_recovery(struct ocfs2_super *osb,
break;
}
out:
- up_read(&sb->s_umount);
kfree(rec);
return status;
}
@@ -840,8 +836,7 @@ static int ocfs2_local_free_info(struct super_block *sb, int type)
ocfs2_release_local_quota_bitmaps(&oinfo->dqi_chunk);
/*
- * s_umount held in exclusive mode protects us against racing with
- * recovery thread...
+ * ocfs2_dismount_volume() has already aborted quota recovery...
*/
if (oinfo->dqi_rec) {
ocfs2_free_quota_recovery(oinfo->dqi_rec);
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index 1c59eca29b22..41ecdfa9b31e 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -1876,6 +1876,9 @@ static void ocfs2_dismount_volume(struct super_block *sb, int mnt_err)
/* Orphan scan should be stopped as early as possible */
ocfs2_orphan_scan_stop(osb);
+ /* Stop quota recovery so that we can disable quotas */
+ ocfs2_recovery_disable_quota(osb);
+
ocfs2_disable_quotas(osb);
/* All dquots should be freed by now */
diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c
index 48f0547d4850..cd70ded309e4 100644
--- a/fs/orangefs/inode.c
+++ b/fs/orangefs/inode.c
@@ -22,9 +22,9 @@ static int orangefs_writepage_locked(struct page *page,
struct orangefs_write_range *wr = NULL;
struct iov_iter iter;
struct bio_vec bv;
- size_t len, wlen;
+ size_t wlen;
ssize_t ret;
- loff_t off;
+ loff_t len, off;
set_page_writeback(page);
@@ -93,8 +93,7 @@ static int orangefs_writepages_work(struct orangefs_writepages *ow,
struct orangefs_write_range *wrp, wr;
struct iov_iter iter;
ssize_t ret;
- size_t len;
- loff_t off;
+ loff_t len, off;
int i;
len = i_size_read(inode);
diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h
index d07c851d255b..4a245d79ba6b 100644
--- a/include/drm/drm_atomic.h
+++ b/include/drm/drm_atomic.h
@@ -332,8 +332,27 @@ struct drm_atomic_state {
*
* Allow full modeset. This is used by the ATOMIC IOCTL handler to
* implement the DRM_MODE_ATOMIC_ALLOW_MODESET flag. Drivers should
- * never consult this flag, instead looking at the output of
- * drm_atomic_crtc_needs_modeset().
+ * generally not consult this flag, but instead look at the output of
+ * drm_atomic_crtc_needs_modeset(). The detailed rules are:
+ *
+ * - Drivers must not consult @allow_modeset in the atomic commit path.
+ * Use drm_atomic_crtc_needs_modeset() instead.
+ *
+ * - Drivers must consult @allow_modeset before adding unrelated struct
+ * drm_crtc_state to this commit by calling
+ * drm_atomic_get_crtc_state(). See also the warning in the
+ * documentation for that function.
+ *
+ * - Drivers must never change this flag, it is under the exclusive
+ * control of userspace.
+ *
+ * - Drivers may consult @allow_modeset in the atomic check path, if
+ * they have the choice between an optimal hardware configuration
+ * which requires a modeset, and a less optimal configuration which
+ * can be committed without a modeset. An example would be suboptimal
+ * scanout FIFO allocation resulting in increased idle power
+ * consumption. This allows userspace to avoid flickering and delays
+ * for the normal composition loop at reasonable cost.
*/
bool allow_modeset : 1;
bool legacy_cursor_update : 1;
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h
index c26ce73dcb08..2218121cf8f2 100644
--- a/include/linux/binfmts.h
+++ b/include/linux/binfmts.h
@@ -89,6 +89,7 @@ struct coredump_params {
int vma_count;
size_t vma_data_size;
struct core_vma_metadata *vma_meta;
+ struct pid *pid;
};
/*
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index a7d70cdee25e..fb48f8ba5dcc 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -568,10 +568,14 @@ static inline int dma_mmap_wc(struct device *dev,
#else
#define DEFINE_DMA_UNMAP_ADDR(ADDR_NAME)
#define DEFINE_DMA_UNMAP_LEN(LEN_NAME)
-#define dma_unmap_addr(PTR, ADDR_NAME) (0)
-#define dma_unmap_addr_set(PTR, ADDR_NAME, VAL) do { } while (0)
-#define dma_unmap_len(PTR, LEN_NAME) (0)
-#define dma_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0)
+#define dma_unmap_addr(PTR, ADDR_NAME) \
+ ({ typeof(PTR) __p __maybe_unused = PTR; 0; })
+#define dma_unmap_addr_set(PTR, ADDR_NAME, VAL) \
+ do { typeof(PTR) __p __maybe_unused = PTR; } while (0)
+#define dma_unmap_len(PTR, LEN_NAME) \
+ ({ typeof(PTR) __p __maybe_unused = PTR; 0; })
+#define dma_unmap_len_set(PTR, LEN_NAME, VAL) \
+ do { typeof(PTR) __p __maybe_unused = PTR; } while (0)
#endif
/*
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index d758c131ed5e..89b3527e0367 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -189,6 +189,7 @@ struct inet6_cork {
struct ipv6_txoptions *opt;
u8 hop_limit;
u8 tclass;
+ u8 dontfrag:1;
};
/**
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h
index eb8169c03d89..0eb04d537038 100644
--- a/include/linux/mlx4/device.h
+++ b/include/linux/mlx4/device.h
@@ -1116,7 +1116,7 @@ int mlx4_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt,
int mlx4_buf_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt,
struct mlx4_buf *buf);
-int mlx4_db_alloc(struct mlx4_dev *dev, struct mlx4_db *db, int order);
+int mlx4_db_alloc(struct mlx4_dev *dev, struct mlx4_db *db, unsigned int order);
void mlx4_db_free(struct mlx4_dev *dev, struct mlx4_db *db);
int mlx4_alloc_hwq_res(struct mlx4_dev *dev, struct mlx4_hwq_resources *wqres,
diff --git a/include/linux/pid.h b/include/linux/pid.h
index af308e15f174..f47868537209 100644
--- a/include/linux/pid.h
+++ b/include/linux/pid.h
@@ -79,6 +79,7 @@ struct file;
extern struct pid *pidfd_pid(const struct file *file);
struct pid *pidfd_get_pid(unsigned int fd, unsigned int *flags);
int pidfd_create(struct pid *pid, unsigned int flags);
+int pidfd_prepare(struct pid *pid, unsigned int flags, struct file **ret);
static inline struct pid *get_pid(struct pid *pid)
{
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index 9db6710e6ee7..9b3e01db654e 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -987,6 +987,9 @@ do { \
#define kvfree_rcu(...) KVFREE_GET_MACRO(__VA_ARGS__, \
kvfree_rcu_arg_2, kvfree_rcu_arg_1)(__VA_ARGS__)
+#define kvfree_rcu_mightsleep(ptr) kvfree_rcu_arg_1(ptr)
+#define kfree_rcu_mightsleep(ptr) kvfree_rcu_mightsleep(ptr)
+
#define KVFREE_GET_MACRO(_1, _2, NAME, ...) NAME
#define kvfree_rcu_arg_2(ptr, rhf) kfree_rcu(ptr, rhf)
#define kvfree_rcu_arg_1(ptr) \
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h
index 59eb5cd567d7..92f04fcb8947 100644
--- a/include/linux/rcutree.h
+++ b/include/linux/rcutree.h
@@ -64,7 +64,7 @@ extern int rcu_scheduler_active __read_mostly;
void rcu_end_inkernel_boot(void);
bool rcu_inkernel_boot_has_ended(void);
bool rcu_is_watching(void);
-#ifndef CONFIG_PREEMPTION
+#ifndef CONFIG_PREEMPT_RCU
void rcu_all_qs(void);
#endif
diff --git a/include/linux/tpm.h b/include/linux/tpm.h
index 95c3069823f9..7868e847eee0 100644
--- a/include/linux/tpm.h
+++ b/include/linux/tpm.h
@@ -174,7 +174,7 @@ enum tpm2_const {
enum tpm2_timeouts {
TPM2_TIMEOUT_A = 750,
- TPM2_TIMEOUT_B = 2000,
+ TPM2_TIMEOUT_B = 4000,
TPM2_TIMEOUT_C = 200,
TPM2_TIMEOUT_D = 30,
TPM2_DURATION_SHORT = 20,
diff --git a/include/linux/types.h b/include/linux/types.h
index a147977602b5..cb496d6a8d79 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -109,8 +109,9 @@ typedef u64 u_int64_t;
typedef s64 int64_t;
#endif
-/* this is a special 64bit data type that is 8-byte aligned */
+/* These are the special 64-bit data types that are 8-byte aligned */
#define aligned_u64 __aligned_u64
+#define aligned_s64 __aligned_s64
#define aligned_be64 __aligned_be64
#define aligned_le64 __aligned_le64
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index 73150520c02d..ffc6d122f91e 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -676,7 +676,9 @@ struct v4l2_subdev_pad_config {
* possible configuration from the remote end, likely calling
* this operation as close as possible to stream on time. The
* operation shall fail if the pad index it has been called on
- * is not valid or in case of unrecoverable failures.
+ * is not valid or in case of unrecoverable failures. The
+ * config argument has been memset to 0 just before calling
+ * the op.
*
* @set_mbus_config: set the media bus configuration of a remote sub-device.
* This operations is intended to allow, in combination with
diff --git a/include/net/netfilter/nf_tables.h b/include/net/netfilter/nf_tables.h
index cb13e604dc34..25dd157728a3 100644
--- a/include/net/netfilter/nf_tables.h
+++ b/include/net/netfilter/nf_tables.h
@@ -1018,7 +1018,7 @@ static inline bool nft_chain_is_bound(struct nft_chain *chain)
int nft_chain_add(struct nft_table *table, struct nft_chain *chain);
void nft_chain_del(struct nft_chain *chain);
-void nf_tables_chain_destroy(struct nft_ctx *ctx);
+void nf_tables_chain_destroy(struct nft_chain *chain);
struct nft_stats {
u64 bytes;
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index 4db11c4695cf..a4c670ad8c4a 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -1036,6 +1036,21 @@ static inline struct sk_buff *__qdisc_dequeue_head(struct qdisc_skb_head *qh)
return skb;
}
+static inline struct sk_buff *qdisc_dequeue_internal(struct Qdisc *sch, bool direct)
+{
+ struct sk_buff *skb;
+
+ skb = __skb_dequeue(&sch->gso_skb);
+ if (skb) {
+ sch->q.qlen--;
+ return skb;
+ }
+ if (direct)
+ return __qdisc_dequeue_head(&sch->q);
+ else
+ return sch->dequeue(sch);
+}
+
static inline struct sk_buff *qdisc_dequeue_head(struct Qdisc *sch)
{
struct sk_buff *skb = __qdisc_dequeue_head(&sch->q);
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index 6554a9f71c62..c573c6a7da12 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -1334,6 +1334,8 @@ int snd_pcm_lib_mmap_iomem(struct snd_pcm_substream *substream, struct vm_area_s
#define snd_pcm_lib_mmap_iomem NULL
#endif
+void snd_pcm_runtime_buffer_set_silence(struct snd_pcm_runtime *runtime);
+
/**
* snd_pcm_limit_isa_dma_size - Get the max size fitting with ISA DMA transfer
* @dma: DMA number
diff --git a/include/trace/events/btrfs.h b/include/trace/events/btrfs.h
index 041be3ce1071..d8aa1d357024 100644
--- a/include/trace/events/btrfs.h
+++ b/include/trace/events/btrfs.h
@@ -1788,7 +1788,7 @@ DECLARE_EVENT_CLASS(btrfs__prelim_ref,
TP_PROTO(const struct btrfs_fs_info *fs_info,
const struct prelim_ref *oldref,
const struct prelim_ref *newref, u64 tree_size),
- TP_ARGS(fs_info, newref, oldref, tree_size),
+ TP_ARGS(fs_info, oldref, newref, tree_size),
TP_STRUCT__entry_btrfs(
__field( u64, root_id )
diff --git a/include/uapi/linux/types.h b/include/uapi/linux/types.h
index f6d2f83cbe29..aa96c4589b71 100644
--- a/include/uapi/linux/types.h
+++ b/include/uapi/linux/types.h
@@ -46,6 +46,7 @@ typedef __u32 __bitwise __wsum;
* No conversions are necessary between 32-bit user-space and a 64-bit kernel.
*/
#define __aligned_u64 __u64 __attribute__((aligned(8)))
+#define __aligned_s64 __s64 __attribute__((aligned(8)))
#define __aligned_be64 __be64 __attribute__((aligned(8)))
#define __aligned_le64 __le64 __attribute__((aligned(8)))
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index efeb0b742750..37d7a99be8f0 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -81,7 +81,7 @@
DEFINE_MUTEX(cgroup_mutex);
DEFINE_SPINLOCK(css_set_lock);
-#ifdef CONFIG_PROVE_RCU
+#if (defined CONFIG_PROVE_RCU || defined CONFIG_LOCKDEP)
EXPORT_SYMBOL_GPL(cgroup_mutex);
EXPORT_SYMBOL_GPL(css_set_lock);
#endif
diff --git a/kernel/fork.c b/kernel/fork.c
index 8b8a5a172b15..6ece27056fe9 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1820,6 +1820,91 @@ const struct file_operations pidfd_fops = {
#endif
};
+/**
+ * __pidfd_prepare - allocate a new pidfd_file and reserve a pidfd
+ * @pid: the struct pid for which to create a pidfd
+ * @flags: flags of the new @pidfd
+ * @pidfd: the pidfd to return
+ *
+ * Allocate a new file that stashes @pid and reserve a new pidfd number in the
+ * caller's file descriptor table. The pidfd is reserved but not installed yet.
+
+ * The helper doesn't perform checks on @pid which makes it useful for pidfds
+ * created via CLONE_PIDFD where @pid has no task attached when the pidfd and
+ * pidfd file are prepared.
+ *
+ * If this function returns successfully the caller is responsible to either
+ * call fd_install() passing the returned pidfd and pidfd file as arguments in
+ * order to install the pidfd into its file descriptor table or they must use
+ * put_unused_fd() and fput() on the returned pidfd and pidfd file
+ * respectively.
+ *
+ * This function is useful when a pidfd must already be reserved but there
+ * might still be points of failure afterwards and the caller wants to ensure
+ * that no pidfd is leaked into its file descriptor table.
+ *
+ * Return: On success, a reserved pidfd is returned from the function and a new
+ * pidfd file is returned in the last argument to the function. On
+ * error, a negative error code is returned from the function and the
+ * last argument remains unchanged.
+ */
+static int __pidfd_prepare(struct pid *pid, unsigned int flags, struct file **ret)
+{
+ int pidfd;
+ struct file *pidfd_file;
+
+ if (flags & ~(O_NONBLOCK | O_RDWR | O_CLOEXEC))
+ return -EINVAL;
+
+ pidfd = get_unused_fd_flags(O_RDWR | O_CLOEXEC);
+ if (pidfd < 0)
+ return pidfd;
+
+ pidfd_file = anon_inode_getfile("[pidfd]", &pidfd_fops, pid,
+ flags | O_RDWR | O_CLOEXEC);
+ if (IS_ERR(pidfd_file)) {
+ put_unused_fd(pidfd);
+ return PTR_ERR(pidfd_file);
+ }
+ get_pid(pid); /* held by pidfd_file now */
+ *ret = pidfd_file;
+ return pidfd;
+}
+
+/**
+ * pidfd_prepare - allocate a new pidfd_file and reserve a pidfd
+ * @pid: the struct pid for which to create a pidfd
+ * @flags: flags of the new @pidfd
+ * @pidfd: the pidfd to return
+ *
+ * Allocate a new file that stashes @pid and reserve a new pidfd number in the
+ * caller's file descriptor table. The pidfd is reserved but not installed yet.
+ *
+ * The helper verifies that @pid is used as a thread group leader.
+ *
+ * If this function returns successfully the caller is responsible to either
+ * call fd_install() passing the returned pidfd and pidfd file as arguments in
+ * order to install the pidfd into its file descriptor table or they must use
+ * put_unused_fd() and fput() on the returned pidfd and pidfd file
+ * respectively.
+ *
+ * This function is useful when a pidfd must already be reserved but there
+ * might still be points of failure afterwards and the caller wants to ensure
+ * that no pidfd is leaked into its file descriptor table.
+ *
+ * Return: On success, a reserved pidfd is returned from the function and a new
+ * pidfd file is returned in the last argument to the function. On
+ * error, a negative error code is returned from the function and the
+ * last argument remains unchanged.
+ */
+int pidfd_prepare(struct pid *pid, unsigned int flags, struct file **ret)
+{
+ if (!pid || !pid_has_task(pid, PIDTYPE_TGID))
+ return -EINVAL;
+
+ return __pidfd_prepare(pid, flags, ret);
+}
+
static void __delayed_free_task(struct rcu_head *rhp)
{
struct task_struct *tsk = container_of(rhp, struct task_struct, rcu);
@@ -2153,21 +2238,12 @@ static __latent_entropy struct task_struct *copy_process(
* if the fd table isn't shared).
*/
if (clone_flags & CLONE_PIDFD) {
- retval = get_unused_fd_flags(O_RDWR | O_CLOEXEC);
+ /* Note that no task has been attached to @pid yet. */
+ retval = __pidfd_prepare(pid, O_RDWR | O_CLOEXEC, &pidfile);
if (retval < 0)
goto bad_fork_free_pid;
-
pidfd = retval;
- pidfile = anon_inode_getfile("[pidfd]", &pidfd_fops, pid,
- O_RDWR | O_CLOEXEC);
- if (IS_ERR(pidfile)) {
- put_unused_fd(pidfd);
- retval = PTR_ERR(pidfile);
- goto bad_fork_free_pid;
- }
- get_pid(pid); /* held by pidfile now */
-
retval = put_user(pidfd, args->pidfd);
if (retval)
goto bad_fork_put_pidfd;
diff --git a/kernel/padata.c b/kernel/padata.c
index c7aa60907fdf..1bd61add0915 100644
--- a/kernel/padata.c
+++ b/kernel/padata.c
@@ -363,7 +363,8 @@ static void padata_reorder(struct parallel_data *pd)
* To avoid UAF issue, add pd ref here, and put pd ref after reorder_work finish.
*/
padata_get_pd(pd);
- queue_work(pinst->serial_wq, &pd->reorder_work);
+ if (!queue_work(pinst->serial_wq, &pd->reorder_work))
+ padata_put_pd(pd);
}
}
diff --git a/kernel/params.c b/kernel/params.c
index eb00abef7076..0df4a315760d 100644
--- a/kernel/params.c
+++ b/kernel/params.c
@@ -947,7 +947,9 @@ int module_sysfs_initialized;
static void module_kobj_release(struct kobject *kobj)
{
struct module_kobject *mk = to_module_kobject(kobj);
- complete(mk->kobj_completion);
+
+ if (mk->kobj_completion)
+ complete(mk->kobj_completion);
}
struct kobj_type module_ktype = {
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index f5ba0740f9b5..c07a84197173 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -919,13 +919,16 @@ static void rcu_preempt_check_blocked_tasks(struct rcu_node *rnp)
*/
static void rcu_flavor_sched_clock_irq(int user)
{
- if (user || rcu_is_cpu_rrupt_from_idle()) {
+ if (user || rcu_is_cpu_rrupt_from_idle() ||
+ (IS_ENABLED(CONFIG_PREEMPT_COUNT) &&
+ (preempt_count() == HARDIRQ_OFFSET))) {
/*
* Get here if this CPU took its interrupt from user
- * mode or from the idle loop, and if this is not a
- * nested interrupt. In this case, the CPU is in
- * a quiescent state, so note it.
+ * mode, from the idle loop without this being a nested
+ * interrupt, or while not holding the task preempt count
+ * (with PREEMPT_COUNT=y). In this case, the CPU is in a
+ * quiescent state, so note it.
*
* No memory barrier is required here because rcu_qs()
* references only CPU-local variables that other CPUs
diff --git a/kernel/time/posix-timers.c b/kernel/time/posix-timers.c
index 29569b1c3d8c..3a68c650ff2a 100644
--- a/kernel/time/posix-timers.c
+++ b/kernel/time/posix-timers.c
@@ -161,6 +161,7 @@ static int posix_timer_add(struct k_itimer *timer)
return id;
}
spin_unlock(&hash_lock);
+ cond_resched();
}
/* POSIX return code when no timer ID could be allocated */
return -EAGAIN;
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index ca39a647f2ef..d63d388acffc 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -6685,13 +6685,14 @@ static ssize_t tracing_splice_read_pipe(struct file *filp,
/* Copy the data into the page, so we can start over. */
ret = trace_seq_to_buffer(&iter->seq,
page_address(spd.pages[i]),
- trace_seq_used(&iter->seq));
+ min((size_t)trace_seq_used(&iter->seq),
+ PAGE_SIZE));
if (ret < 0) {
__free_page(spd.pages[i]);
break;
}
spd.partial[i].offset = 0;
- spd.partial[i].len = trace_seq_used(&iter->seq);
+ spd.partial[i].len = ret;
trace_seq_init(&iter->seq);
}
diff --git a/lib/dynamic_queue_limits.c b/lib/dynamic_queue_limits.c
index fde0aa244148..a75a9ca46b59 100644
--- a/lib/dynamic_queue_limits.c
+++ b/lib/dynamic_queue_limits.c
@@ -116,7 +116,7 @@ EXPORT_SYMBOL(dql_completed);
void dql_reset(struct dql *dql)
{
/* Reset all dynamic values */
- dql->limit = 0;
+ dql->limit = dql->min_limit;
dql->num_queued = 0;
dql->num_completed = 0;
dql->last_obj_cnt = 0;
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 14f26b3b0204..142b4d5e08fe 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1312,7 +1312,6 @@ int mem_cgroup_scan_tasks(struct mem_cgroup *memcg,
{
struct mem_cgroup *iter;
int ret = 0;
- int i = 0;
BUG_ON(memcg == root_mem_cgroup);
@@ -1322,10 +1321,9 @@ int mem_cgroup_scan_tasks(struct mem_cgroup *memcg,
css_task_iter_start(&iter->css, CSS_TASK_ITER_PROCS, &it);
while (!ret && (task = css_task_iter_next(&it))) {
- /* Avoid potential softlockup warning */
- if ((++i & 1023) == 0)
- cond_resched();
ret = fn(task, arg);
+ /* Avoid potential softlockup warning */
+ cond_resched();
}
css_task_iter_end(&it);
if (ret) {
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 4675a8df0ec9..59e1fcc05566 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -4758,6 +4758,14 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
}
retry:
+ /*
+ * Deal with possible cpuset update races or zonelist updates to avoid
+ * infinite retries.
+ */
+ if (check_retry_cpuset(cpuset_mems_cookie, ac) ||
+ check_retry_zonelist(zonelist_iter_cookie))
+ goto restart;
+
/* Ensure kswapd doesn't accidentally go to sleep as long as we loop */
if (alloc_flags & ALLOC_KSWAPD)
wake_all_kswapds(order, gfp_mask, ac);
diff --git a/net/bridge/br_nf_core.c b/net/bridge/br_nf_core.c
index 8c69f0c95a8e..b8c8deb87407 100644
--- a/net/bridge/br_nf_core.c
+++ b/net/bridge/br_nf_core.c
@@ -65,17 +65,14 @@ static struct dst_ops fake_dst_ops = {
* ipt_REJECT needs it. Future netfilter modules might
* require us to fill additional fields.
*/
-static const u32 br_dst_default_metrics[RTAX_MAX] = {
- [RTAX_MTU - 1] = 1500,
-};
-
void br_netfilter_rtable_init(struct net_bridge *br)
{
struct rtable *rt = &br->fake_rtable;
atomic_set(&rt->dst.__refcnt, 1);
rt->dst.dev = br->dev;
- dst_init_metrics(&rt->dst, br_dst_default_metrics, true);
+ dst_init_metrics(&rt->dst, br->metrics, false);
+ dst_metric_set(&rt->dst, RTAX_MTU, br->dev->mtu);
rt->dst.flags = DST_NOXFRM | DST_FAKE_RTABLE;
rt->dst.ops = &fake_dst_ops;
}
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
index 2b88b17cc8b2..259b43b435a9 100644
--- a/net/bridge/br_private.h
+++ b/net/bridge/br_private.h
@@ -400,6 +400,7 @@ struct net_bridge {
struct rtable fake_rtable;
struct rt6_info fake_rt6_info;
};
+ u32 metrics[RTAX_MAX];
#endif
u16 group_fwd_mask;
u16 group_fwd_mask_required;
diff --git a/net/can/bcm.c b/net/can/bcm.c
index cb849b5a8c14..200b66e85c1c 100644
--- a/net/can/bcm.c
+++ b/net/can/bcm.c
@@ -58,6 +58,7 @@
#include <linux/can/skb.h>
#include <linux/can/bcm.h>
#include <linux/slab.h>
+#include <linux/spinlock.h>
#include <net/sock.h>
#include <net/net_namespace.h>
@@ -120,6 +121,7 @@ struct bcm_op {
struct canfd_frame last_sframe;
struct sock *sk;
struct net_device *rx_reg_dev;
+ spinlock_t bcm_tx_lock; /* protect currframe/count in runtime updates */
};
struct bcm_sock {
@@ -205,7 +207,9 @@ static int bcm_proc_show(struct seq_file *m, void *v)
seq_printf(m, " / bound %s", bcm_proc_getifname(net, ifname, bo->ifindex));
seq_printf(m, " <<<\n");
- list_for_each_entry(op, &bo->rx_ops, list) {
+ rcu_read_lock();
+
+ list_for_each_entry_rcu(op, &bo->rx_ops, list) {
unsigned long reduction;
@@ -261,6 +265,9 @@ static int bcm_proc_show(struct seq_file *m, void *v)
seq_printf(m, "# sent %ld\n", op->frames_abs);
}
seq_putc(m, '\n');
+
+ rcu_read_unlock();
+
return 0;
}
#endif /* CONFIG_PROC_FS */
@@ -273,13 +280,18 @@ static void bcm_can_tx(struct bcm_op *op)
{
struct sk_buff *skb;
struct net_device *dev;
- struct canfd_frame *cf = op->frames + op->cfsiz * op->currframe;
+ struct canfd_frame *cf;
int err;
/* no target device? => exit */
if (!op->ifindex)
return;
+ /* read currframe under lock protection */
+ spin_lock_bh(&op->bcm_tx_lock);
+ cf = op->frames + op->cfsiz * op->currframe;
+ spin_unlock_bh(&op->bcm_tx_lock);
+
dev = dev_get_by_index(sock_net(op->sk), op->ifindex);
if (!dev) {
/* RFC: should this bcm_op remove itself here? */
@@ -300,6 +312,10 @@ static void bcm_can_tx(struct bcm_op *op)
skb->dev = dev;
can_skb_set_owner(skb, op->sk);
err = can_send(skb, 1);
+
+ /* update currframe and count under lock protection */
+ spin_lock_bh(&op->bcm_tx_lock);
+
if (!err)
op->frames_abs++;
@@ -308,6 +324,11 @@ static void bcm_can_tx(struct bcm_op *op)
/* reached last frame? */
if (op->currframe >= op->nframes)
op->currframe = 0;
+
+ if (op->count > 0)
+ op->count--;
+
+ spin_unlock_bh(&op->bcm_tx_lock);
out:
dev_put(dev);
}
@@ -404,7 +425,7 @@ static enum hrtimer_restart bcm_tx_timeout_handler(struct hrtimer *hrtimer)
struct bcm_msg_head msg_head;
if (op->kt_ival1 && (op->count > 0)) {
- op->count--;
+ bcm_can_tx(op);
if (!op->count && (op->flags & TX_COUNTEVT)) {
/* create notification to user */
@@ -419,7 +440,6 @@ static enum hrtimer_restart bcm_tx_timeout_handler(struct hrtimer *hrtimer)
bcm_send_to_user(op, &msg_head, NULL, 0);
}
- bcm_can_tx(op);
} else if (op->kt_ival2) {
bcm_can_tx(op);
@@ -796,7 +816,7 @@ static int bcm_delete_rx_op(struct list_head *ops, struct bcm_msg_head *mh,
REGMASK(op->can_id),
bcm_rx_handler, op);
- list_del(&op->list);
+ list_del_rcu(&op->list);
bcm_remove_op(op);
return 1; /* done */
}
@@ -816,7 +836,7 @@ static int bcm_delete_tx_op(struct list_head *ops, struct bcm_msg_head *mh,
list_for_each_entry_safe(op, n, ops, list) {
if ((op->can_id == mh->can_id) && (op->ifindex == ifindex) &&
(op->flags & CAN_FD_FRAME) == (mh->flags & CAN_FD_FRAME)) {
- list_del(&op->list);
+ list_del_rcu(&op->list);
bcm_remove_op(op);
return 1; /* done */
}
@@ -909,6 +929,27 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
}
op->flags = msg_head->flags;
+ /* only lock for unlikely count/nframes/currframe changes */
+ if (op->nframes != msg_head->nframes ||
+ op->flags & TX_RESET_MULTI_IDX ||
+ op->flags & SETTIMER) {
+
+ spin_lock_bh(&op->bcm_tx_lock);
+
+ if (op->nframes != msg_head->nframes ||
+ op->flags & TX_RESET_MULTI_IDX) {
+ /* potentially update changed nframes */
+ op->nframes = msg_head->nframes;
+ /* restart multiple frame transmission */
+ op->currframe = 0;
+ }
+
+ if (op->flags & SETTIMER)
+ op->count = msg_head->count;
+
+ spin_unlock_bh(&op->bcm_tx_lock);
+ }
+
} else {
/* insert new BCM operation for the given can_id */
@@ -916,9 +957,14 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
if (!op)
return -ENOMEM;
+ spin_lock_init(&op->bcm_tx_lock);
op->can_id = msg_head->can_id;
op->cfsiz = CFSIZ(msg_head->flags);
op->flags = msg_head->flags;
+ op->nframes = msg_head->nframes;
+
+ if (op->flags & SETTIMER)
+ op->count = msg_head->count;
/* create array for CAN frames and copy the data */
if (msg_head->nframes > 1) {
@@ -977,22 +1023,8 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
} /* if ((op = bcm_find_op(&bo->tx_ops, msg_head->can_id, ifindex))) */
- if (op->nframes != msg_head->nframes) {
- op->nframes = msg_head->nframes;
- /* start multiple frame transmission with index 0 */
- op->currframe = 0;
- }
-
- /* check flags */
-
- if (op->flags & TX_RESET_MULTI_IDX) {
- /* start multiple frame transmission with index 0 */
- op->currframe = 0;
- }
-
if (op->flags & SETTIMER) {
/* set timer values */
- op->count = msg_head->count;
op->ival1 = msg_head->ival1;
op->ival2 = msg_head->ival2;
op->kt_ival1 = bcm_timeval_to_ktime(msg_head->ival1);
@@ -1009,11 +1041,8 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
op->flags |= TX_ANNOUNCE;
}
- if (op->flags & TX_ANNOUNCE) {
+ if (op->flags & TX_ANNOUNCE)
bcm_can_tx(op);
- if (op->count)
- op->count--;
- }
if (op->flags & STARTTIMER)
bcm_tx_start_timer(op);
@@ -1229,7 +1258,7 @@ static int bcm_rx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
bcm_rx_handler, op, "bcm", sk);
if (err) {
/* this bcm rx op is broken -> remove it */
- list_del(&op->list);
+ list_del_rcu(&op->list);
bcm_remove_op(op);
return err;
}
diff --git a/net/can/gw.c b/net/can/gw.c
index cbb46d3aa963..59b9f3e579f7 100644
--- a/net/can/gw.c
+++ b/net/can/gw.c
@@ -130,7 +130,7 @@ struct cgw_job {
u32 handled_frames;
u32 dropped_frames;
u32 deleted_frames;
- struct cf_mod mod;
+ struct cf_mod __rcu *cf_mod;
union {
/* CAN frame data source */
struct net_device *dev;
@@ -397,6 +397,7 @@ static void can_can_gw_rcv(struct sk_buff *skb, void *data)
struct cgw_job *gwj = (struct cgw_job *)data;
struct canfd_frame *cf;
struct sk_buff *nskb;
+ struct cf_mod *mod;
int modidx = 0;
/* process strictly Classic CAN or CAN FD frames */
@@ -444,7 +445,8 @@ static void can_can_gw_rcv(struct sk_buff *skb, void *data)
* When there is at least one modification function activated,
* we need to copy the skb as we want to modify skb->data.
*/
- if (gwj->mod.modfunc[0])
+ mod = rcu_dereference(gwj->cf_mod);
+ if (mod->modfunc[0])
nskb = skb_copy(skb, GFP_ATOMIC);
else
nskb = skb_clone(skb, GFP_ATOMIC);
@@ -467,8 +469,8 @@ static void can_can_gw_rcv(struct sk_buff *skb, void *data)
cf = (struct canfd_frame *)nskb->data;
/* perform preprocessed modification functions if there are any */
- while (modidx < MAX_MODFUNCTIONS && gwj->mod.modfunc[modidx])
- (*gwj->mod.modfunc[modidx++])(cf, &gwj->mod);
+ while (modidx < MAX_MODFUNCTIONS && mod->modfunc[modidx])
+ (*mod->modfunc[modidx++])(cf, mod);
/* Has the CAN frame been modified? */
if (modidx) {
@@ -484,11 +486,11 @@ static void can_can_gw_rcv(struct sk_buff *skb, void *data)
}
/* check for checksum updates */
- if (gwj->mod.csumfunc.crc8)
- (*gwj->mod.csumfunc.crc8)(cf, &gwj->mod.csum.crc8);
+ if (mod->csumfunc.crc8)
+ (*mod->csumfunc.crc8)(cf, &mod->csum.crc8);
- if (gwj->mod.csumfunc.xor)
- (*gwj->mod.csumfunc.xor)(cf, &gwj->mod.csum.xor);
+ if (mod->csumfunc.xor)
+ (*mod->csumfunc.xor)(cf, &mod->csum.xor);
}
/* clear the skb timestamp if not configured the other way */
@@ -515,6 +517,24 @@ static inline void cgw_unregister_filter(struct net *net, struct cgw_job *gwj)
gwj->ccgw.filter.can_mask, can_can_gw_rcv, gwj);
}
+static void cgw_job_free_rcu(struct rcu_head *rcu_head)
+{
+ struct cgw_job *gwj = container_of(rcu_head, struct cgw_job, rcu);
+
+ /* cgw_job::cf_mod is always accessed from the same cgw_job object within
+ * the same RCU read section. Once cgw_job is scheduled for removal,
+ * cf_mod can also be removed without mandating an additional grace period.
+ */
+ kfree(rcu_access_pointer(gwj->cf_mod));
+ kmem_cache_free(cgw_cache, gwj);
+}
+
+/* Return cgw_job::cf_mod with RTNL protected section */
+static struct cf_mod *cgw_job_cf_mod(struct cgw_job *gwj)
+{
+ return rcu_dereference_protected(gwj->cf_mod, rtnl_is_locked());
+}
+
static int cgw_notifier(struct notifier_block *nb,
unsigned long msg, void *ptr)
{
@@ -534,8 +554,7 @@ static int cgw_notifier(struct notifier_block *nb,
if (gwj->src.dev == dev || gwj->dst.dev == dev) {
hlist_del(&gwj->list);
cgw_unregister_filter(net, gwj);
- synchronize_rcu();
- kmem_cache_free(cgw_cache, gwj);
+ call_rcu(&gwj->rcu, cgw_job_free_rcu);
}
}
}
@@ -548,6 +567,7 @@ static int cgw_put_job(struct sk_buff *skb, struct cgw_job *gwj, int type,
{
struct rtcanmsg *rtcan;
struct nlmsghdr *nlh;
+ struct cf_mod *mod;
nlh = nlmsg_put(skb, pid, seq, type, sizeof(*rtcan), flags);
if (!nlh)
@@ -582,82 +602,83 @@ static int cgw_put_job(struct sk_buff *skb, struct cgw_job *gwj, int type,
goto cancel;
}
+ mod = cgw_job_cf_mod(gwj);
if (gwj->flags & CGW_FLAGS_CAN_FD) {
struct cgw_fdframe_mod mb;
- if (gwj->mod.modtype.and) {
- memcpy(&mb.cf, &gwj->mod.modframe.and, sizeof(mb.cf));
- mb.modtype = gwj->mod.modtype.and;
+ if (mod->modtype.and) {
+ memcpy(&mb.cf, &mod->modframe.and, sizeof(mb.cf));
+ mb.modtype = mod->modtype.and;
if (nla_put(skb, CGW_FDMOD_AND, sizeof(mb), &mb) < 0)
goto cancel;
}
- if (gwj->mod.modtype.or) {
- memcpy(&mb.cf, &gwj->mod.modframe.or, sizeof(mb.cf));
- mb.modtype = gwj->mod.modtype.or;
+ if (mod->modtype.or) {
+ memcpy(&mb.cf, &mod->modframe.or, sizeof(mb.cf));
+ mb.modtype = mod->modtype.or;
if (nla_put(skb, CGW_FDMOD_OR, sizeof(mb), &mb) < 0)
goto cancel;
}
- if (gwj->mod.modtype.xor) {
- memcpy(&mb.cf, &gwj->mod.modframe.xor, sizeof(mb.cf));
- mb.modtype = gwj->mod.modtype.xor;
+ if (mod->modtype.xor) {
+ memcpy(&mb.cf, &mod->modframe.xor, sizeof(mb.cf));
+ mb.modtype = mod->modtype.xor;
if (nla_put(skb, CGW_FDMOD_XOR, sizeof(mb), &mb) < 0)
goto cancel;
}
- if (gwj->mod.modtype.set) {
- memcpy(&mb.cf, &gwj->mod.modframe.set, sizeof(mb.cf));
- mb.modtype = gwj->mod.modtype.set;
+ if (mod->modtype.set) {
+ memcpy(&mb.cf, &mod->modframe.set, sizeof(mb.cf));
+ mb.modtype = mod->modtype.set;
if (nla_put(skb, CGW_FDMOD_SET, sizeof(mb), &mb) < 0)
goto cancel;
}
} else {
struct cgw_frame_mod mb;
- if (gwj->mod.modtype.and) {
- memcpy(&mb.cf, &gwj->mod.modframe.and, sizeof(mb.cf));
- mb.modtype = gwj->mod.modtype.and;
+ if (mod->modtype.and) {
+ memcpy(&mb.cf, &mod->modframe.and, sizeof(mb.cf));
+ mb.modtype = mod->modtype.and;
if (nla_put(skb, CGW_MOD_AND, sizeof(mb), &mb) < 0)
goto cancel;
}
- if (gwj->mod.modtype.or) {
- memcpy(&mb.cf, &gwj->mod.modframe.or, sizeof(mb.cf));
- mb.modtype = gwj->mod.modtype.or;
+ if (mod->modtype.or) {
+ memcpy(&mb.cf, &mod->modframe.or, sizeof(mb.cf));
+ mb.modtype = mod->modtype.or;
if (nla_put(skb, CGW_MOD_OR, sizeof(mb), &mb) < 0)
goto cancel;
}
- if (gwj->mod.modtype.xor) {
- memcpy(&mb.cf, &gwj->mod.modframe.xor, sizeof(mb.cf));
- mb.modtype = gwj->mod.modtype.xor;
+ if (mod->modtype.xor) {
+ memcpy(&mb.cf, &mod->modframe.xor, sizeof(mb.cf));
+ mb.modtype = mod->modtype.xor;
if (nla_put(skb, CGW_MOD_XOR, sizeof(mb), &mb) < 0)
goto cancel;
}
- if (gwj->mod.modtype.set) {
- memcpy(&mb.cf, &gwj->mod.modframe.set, sizeof(mb.cf));
- mb.modtype = gwj->mod.modtype.set;
+ if (mod->modtype.set) {
+ memcpy(&mb.cf, &mod->modframe.set, sizeof(mb.cf));
+ mb.modtype = mod->modtype.set;
if (nla_put(skb, CGW_MOD_SET, sizeof(mb), &mb) < 0)
goto cancel;
}
}
- if (gwj->mod.uid) {
- if (nla_put_u32(skb, CGW_MOD_UID, gwj->mod.uid) < 0)
+ if (mod->uid) {
+ if (nla_put_u32(skb, CGW_MOD_UID, mod->uid) < 0)
goto cancel;
}
- if (gwj->mod.csumfunc.crc8) {
+ if (mod->csumfunc.crc8) {
if (nla_put(skb, CGW_CS_CRC8, CGW_CS_CRC8_LEN,
- &gwj->mod.csum.crc8) < 0)
+ &mod->csum.crc8) < 0)
goto cancel;
}
- if (gwj->mod.csumfunc.xor) {
+ if (mod->csumfunc.xor) {
if (nla_put(skb, CGW_CS_XOR, CGW_CS_XOR_LEN,
- &gwj->mod.csum.xor) < 0)
+ &mod->csum.xor) < 0)
goto cancel;
}
@@ -991,7 +1012,7 @@ static int cgw_create_job(struct sk_buff *skb, struct nlmsghdr *nlh,
struct net *net = sock_net(skb->sk);
struct rtcanmsg *r;
struct cgw_job *gwj;
- struct cf_mod mod;
+ struct cf_mod *mod;
struct can_can_gw ccgw;
u8 limhops = 0;
int err = 0;
@@ -1010,37 +1031,48 @@ static int cgw_create_job(struct sk_buff *skb, struct nlmsghdr *nlh,
if (r->gwtype != CGW_TYPE_CAN_CAN)
return -EINVAL;
- err = cgw_parse_attr(nlh, &mod, CGW_TYPE_CAN_CAN, &ccgw, &limhops);
+ mod = kmalloc(sizeof(*mod), GFP_KERNEL);
+ if (!mod)
+ return -ENOMEM;
+
+ err = cgw_parse_attr(nlh, mod, CGW_TYPE_CAN_CAN, &ccgw, &limhops);
if (err < 0)
- return err;
+ goto out_free_cf;
- if (mod.uid) {
+ if (mod->uid) {
ASSERT_RTNL();
/* check for updating an existing job with identical uid */
hlist_for_each_entry(gwj, &net->can.cgw_list, list) {
- if (gwj->mod.uid != mod.uid)
+ struct cf_mod *old_cf;
+
+ old_cf = cgw_job_cf_mod(gwj);
+ if (old_cf->uid != mod->uid)
continue;
/* interfaces & filters must be identical */
- if (memcmp(&gwj->ccgw, &ccgw, sizeof(ccgw)))
- return -EINVAL;
+ if (memcmp(&gwj->ccgw, &ccgw, sizeof(ccgw))) {
+ err = -EINVAL;
+ goto out_free_cf;
+ }
- /* update modifications with disabled softirq & quit */
- local_bh_disable();
- memcpy(&gwj->mod, &mod, sizeof(mod));
- local_bh_enable();
+ rcu_assign_pointer(gwj->cf_mod, mod);
+ kfree_rcu_mightsleep(old_cf);
return 0;
}
}
/* ifindex == 0 is not allowed for job creation */
- if (!ccgw.src_idx || !ccgw.dst_idx)
- return -ENODEV;
+ if (!ccgw.src_idx || !ccgw.dst_idx) {
+ err = -ENODEV;
+ goto out_free_cf;
+ }
gwj = kmem_cache_alloc(cgw_cache, GFP_KERNEL);
- if (!gwj)
- return -ENOMEM;
+ if (!gwj) {
+ err = -ENOMEM;
+ goto out_free_cf;
+ }
gwj->handled_frames = 0;
gwj->dropped_frames = 0;
@@ -1050,7 +1082,7 @@ static int cgw_create_job(struct sk_buff *skb, struct nlmsghdr *nlh,
gwj->limit_hops = limhops;
/* insert already parsed information */
- memcpy(&gwj->mod, &mod, sizeof(mod));
+ RCU_INIT_POINTER(gwj->cf_mod, mod);
memcpy(&gwj->ccgw, &ccgw, sizeof(ccgw));
err = -ENODEV;
@@ -1077,9 +1109,11 @@ static int cgw_create_job(struct sk_buff *skb, struct nlmsghdr *nlh,
if (!err)
hlist_add_head_rcu(&gwj->list, &net->can.cgw_list);
out:
- if (err)
+ if (err) {
kmem_cache_free(cgw_cache, gwj);
-
+out_free_cf:
+ kfree(mod);
+ }
return err;
}
@@ -1093,8 +1127,7 @@ static void cgw_remove_all_jobs(struct net *net)
hlist_for_each_entry_safe(gwj, nx, &net->can.cgw_list, list) {
hlist_del(&gwj->list);
cgw_unregister_filter(net, gwj);
- synchronize_rcu();
- kmem_cache_free(cgw_cache, gwj);
+ call_rcu(&gwj->rcu, cgw_job_free_rcu);
}
}
@@ -1140,19 +1173,22 @@ static int cgw_remove_job(struct sk_buff *skb, struct nlmsghdr *nlh,
/* remove only the first matching entry */
hlist_for_each_entry_safe(gwj, nx, &net->can.cgw_list, list) {
+ struct cf_mod *cf_mod;
+
if (gwj->flags != r->flags)
continue;
if (gwj->limit_hops != limhops)
continue;
+ cf_mod = cgw_job_cf_mod(gwj);
/* we have a match when uid is enabled and identical */
- if (gwj->mod.uid || mod.uid) {
- if (gwj->mod.uid != mod.uid)
+ if (cf_mod->uid || mod.uid) {
+ if (cf_mod->uid != mod.uid)
continue;
} else {
/* no uid => check for identical modifications */
- if (memcmp(&gwj->mod, &mod, sizeof(mod)))
+ if (memcmp(cf_mod, &mod, sizeof(mod)))
continue;
}
@@ -1162,8 +1198,7 @@ static int cgw_remove_job(struct sk_buff *skb, struct nlmsghdr *nlh,
hlist_del(&gwj->list);
cgw_unregister_filter(net, gwj);
- synchronize_rcu();
- kmem_cache_free(cgw_cache, gwj);
+ call_rcu(&gwj->rcu, cgw_job_free_rcu);
err = 0;
break;
}
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index c1e3d3bea128..57502e862846 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -805,6 +805,10 @@ static ssize_t get_labels(const char __user *buffer, struct pktgen_dev *pkt_dev)
pkt_dev->nr_labels = 0;
do {
__u32 tmp;
+
+ if (n >= MAX_MPLS_LABELS)
+ return -E2BIG;
+
len = hex32_arg(&buffer[i], 8, &tmp);
if (len <= 0)
return len;
@@ -816,8 +820,6 @@ static ssize_t get_labels(const char __user *buffer, struct pktgen_dev *pkt_dev)
return -EFAULT;
i++;
n++;
- if (n >= MAX_MPLS_LABELS)
- return -E2BIG;
} while (c == ',');
pkt_dev->nr_labels = n;
@@ -1768,8 +1770,8 @@ static ssize_t pktgen_thread_write(struct file *file,
i = len;
/* Read variable name */
-
- len = strn_len(&user_buffer[i], sizeof(name) - 1);
+ max = min(sizeof(name) - 1, count - i);
+ len = strn_len(&user_buffer[i], max);
if (len < 0)
return len;
@@ -1799,7 +1801,8 @@ static ssize_t pktgen_thread_write(struct file *file,
if (!strcmp(name, "add_device")) {
char f[32];
memset(f, 0, 32);
- len = strn_len(&user_buffer[i], sizeof(f) - 1);
+ max = min(sizeof(f) - 1, count - i);
+ len = strn_len(&user_buffer[i], max);
if (len < 0) {
ret = len;
goto out;
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
index 5e2a003cd83c..f902cd8cb852 100644
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -817,19 +817,33 @@ static int rtm_to_fib_config(struct net *net, struct sk_buff *skb,
}
}
+ if (cfg->fc_dst_len > 32) {
+ NL_SET_ERR_MSG(extack, "Invalid prefix length");
+ err = -EINVAL;
+ goto errout;
+ }
+
+ if (cfg->fc_dst_len < 32 && (ntohl(cfg->fc_dst) << cfg->fc_dst_len)) {
+ NL_SET_ERR_MSG(extack, "Invalid prefix for given prefix length");
+ err = -EINVAL;
+ goto errout;
+ }
+
if (cfg->fc_nh_id) {
if (cfg->fc_oif || cfg->fc_gw_family ||
cfg->fc_encap || cfg->fc_mp) {
NL_SET_ERR_MSG(extack,
"Nexthop specification and nexthop id are mutually exclusive");
- return -EINVAL;
+ err = -EINVAL;
+ goto errout;
}
}
if (has_gw && has_via) {
NL_SET_ERR_MSG(extack,
"Nexthop configuration can not contain both GATEWAY and VIA");
- return -EINVAL;
+ err = -EINVAL;
+ goto errout;
}
if (!cfg->fc_table)
diff --git a/net/ipv4/fib_rules.c b/net/ipv4/fib_rules.c
index d279cb8ac158..a270951386e1 100644
--- a/net/ipv4/fib_rules.c
+++ b/net/ipv4/fib_rules.c
@@ -226,9 +226,9 @@ static int fib4_rule_configure(struct fib_rule *rule, struct sk_buff *skb,
struct nlattr **tb,
struct netlink_ext_ack *extack)
{
- struct net *net = sock_net(skb->sk);
+ struct fib4_rule *rule4 = (struct fib4_rule *)rule;
+ struct net *net = rule->fr_net;
int err = -EINVAL;
- struct fib4_rule *rule4 = (struct fib4_rule *) rule;
if (frh->tos & ~IPTOS_TOS_MASK) {
NL_SET_ERR_MSG(extack, "Invalid tos");
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
index 1bdcdc79d43f..6c53381fa36f 100644
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -1145,22 +1145,6 @@ static int fib_insert_alias(struct trie *t, struct key_vector *tp,
return 0;
}
-static bool fib_valid_key_len(u32 key, u8 plen, struct netlink_ext_ack *extack)
-{
- if (plen > KEYLENGTH) {
- NL_SET_ERR_MSG(extack, "Invalid prefix length");
- return false;
- }
-
- if ((plen < KEYLENGTH) && (key << plen)) {
- NL_SET_ERR_MSG(extack,
- "Invalid prefix for given prefix length");
- return false;
- }
-
- return true;
-}
-
static void fib_remove_alias(struct trie *t, struct key_vector *tp,
struct key_vector *l, struct fib_alias *old);
@@ -1181,9 +1165,6 @@ int fib_table_insert(struct net *net, struct fib_table *tb,
key = ntohl(cfg->fc_dst);
- if (!fib_valid_key_len(key, plen, extack))
- return -EINVAL;
-
pr_debug("Insert table=%u %08x/%d\n", tb->tb_id, key, plen);
fi = fib_create_info(cfg, extack);
@@ -1671,9 +1652,6 @@ int fib_table_delete(struct net *net, struct fib_table *tb,
key = ntohl(cfg->fc_dst);
- if (!fib_valid_key_len(key, plen, extack))
- return -EINVAL;
-
l = fib_find_node(t, &tp, key);
if (!l)
return -ESRCH;
diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c
index 0fb5d758264f..fea74ab2a4be 100644
--- a/net/ipv4/inet_hashtables.c
+++ b/net/ipv4/inet_hashtables.c
@@ -934,22 +934,37 @@ int inet_ehash_locks_alloc(struct inet_hashinfo *hashinfo)
{
unsigned int locksz = sizeof(spinlock_t);
unsigned int i, nblocks = 1;
+ spinlock_t *ptr = NULL;
- if (locksz != 0) {
- /* allocate 2 cache lines or at least one spinlock per cpu */
- nblocks = max(2U * L1_CACHE_BYTES / locksz, 1U);
- nblocks = roundup_pow_of_two(nblocks * num_possible_cpus());
+ if (locksz == 0)
+ goto set_mask;
- /* no more locks than number of hash buckets */
- nblocks = min(nblocks, hashinfo->ehash_mask + 1);
+ /* Allocate 2 cache lines or at least one spinlock per cpu. */
+ nblocks = max(2U * L1_CACHE_BYTES / locksz, 1U) * num_possible_cpus();
- hashinfo->ehash_locks = kvmalloc_array(nblocks, locksz, GFP_KERNEL);
- if (!hashinfo->ehash_locks)
- return -ENOMEM;
+ /* At least one page per NUMA node. */
+ nblocks = max(nblocks, num_online_nodes() * PAGE_SIZE / locksz);
+
+ nblocks = roundup_pow_of_two(nblocks);
+
+ /* No more locks than number of hash buckets. */
+ nblocks = min(nblocks, hashinfo->ehash_mask + 1);
- for (i = 0; i < nblocks; i++)
- spin_lock_init(&hashinfo->ehash_locks[i]);
+ if (num_online_nodes() > 1) {
+ /* Use vmalloc() to allow NUMA policy to spread pages
+ * on all available nodes if desired.
+ */
+ ptr = vmalloc_array(nblocks, locksz);
+ }
+ if (!ptr) {
+ ptr = kvmalloc_array(nblocks, locksz, GFP_KERNEL);
+ if (!ptr)
+ return -ENOMEM;
}
+ for (i = 0; i < nblocks; i++)
+ spin_lock_init(&ptr[i]);
+ hashinfo->ehash_locks = ptr;
+set_mask:
hashinfo->ehash_locks_mask = nblocks - 1;
return 0;
}
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 6b926c71b6f3..7c2e714527f6 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -403,6 +403,20 @@ static bool tcp_ecn_rcv_ecn_echo(const struct tcp_sock *tp, const struct tcphdr
return false;
}
+static void tcp_count_delivered_ce(struct tcp_sock *tp, u32 ecn_count)
+{
+ tp->delivered_ce += ecn_count;
+}
+
+/* Updates the delivered and delivered_ce counts */
+static void tcp_count_delivered(struct tcp_sock *tp, u32 delivered,
+ bool ece_ack)
+{
+ tp->delivered += delivered;
+ if (ece_ack)
+ tcp_count_delivered_ce(tp, delivered);
+}
+
/* Buffer size and advertised window tuning.
*
* 1. Tuning sk->sk_sndbuf, when connection enters established state.
@@ -1102,15 +1116,6 @@ void tcp_mark_skb_lost(struct sock *sk, struct sk_buff *skb)
}
}
-/* Updates the delivered and delivered_ce counts */
-static void tcp_count_delivered(struct tcp_sock *tp, u32 delivered,
- bool ece_ack)
-{
- tp->delivered += delivered;
- if (ece_ack)
- tp->delivered_ce += delivered;
-}
-
/* This procedure tags the retransmission queue when SACKs arrive.
*
* We have three tag bits: SACKED(S), RETRANS(R) and LOST(L).
@@ -3735,12 +3740,23 @@ static void tcp_process_tlp_ack(struct sock *sk, u32 ack, int flag)
}
}
-static inline void tcp_in_ack_event(struct sock *sk, u32 flags)
+static void tcp_in_ack_event(struct sock *sk, int flag)
{
const struct inet_connection_sock *icsk = inet_csk(sk);
- if (icsk->icsk_ca_ops->in_ack_event)
- icsk->icsk_ca_ops->in_ack_event(sk, flags);
+ if (icsk->icsk_ca_ops->in_ack_event) {
+ u32 ack_ev_flags = 0;
+
+ if (flag & FLAG_WIN_UPDATE)
+ ack_ev_flags |= CA_ACK_WIN_UPDATE;
+ if (flag & FLAG_SLOWPATH) {
+ ack_ev_flags |= CA_ACK_SLOWPATH;
+ if (flag & FLAG_ECE)
+ ack_ev_flags |= CA_ACK_ECE;
+ }
+
+ icsk->icsk_ca_ops->in_ack_event(sk, ack_ev_flags);
+ }
}
/* Congestion control has updated the cwnd already. So if we're in
@@ -3857,12 +3873,8 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag)
tcp_snd_una_update(tp, ack);
flag |= FLAG_WIN_UPDATE;
- tcp_in_ack_event(sk, CA_ACK_WIN_UPDATE);
-
NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPHPACKS);
} else {
- u32 ack_ev_flags = CA_ACK_SLOWPATH;
-
if (ack_seq != TCP_SKB_CB(skb)->end_seq)
flag |= FLAG_DATA;
else
@@ -3874,19 +3886,12 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag)
flag |= tcp_sacktag_write_queue(sk, skb, prior_snd_una,
&sack_state);
- if (tcp_ecn_rcv_ecn_echo(tp, tcp_hdr(skb))) {
+ if (tcp_ecn_rcv_ecn_echo(tp, tcp_hdr(skb)))
flag |= FLAG_ECE;
- ack_ev_flags |= CA_ACK_ECE;
- }
if (sack_state.sack_delivered)
tcp_count_delivered(tp, sack_state.sack_delivered,
flag & FLAG_ECE);
-
- if (flag & FLAG_WIN_UPDATE)
- ack_ev_flags |= CA_ACK_WIN_UPDATE;
-
- tcp_in_ack_event(sk, ack_ev_flags);
}
/* This is a deviation from RFC3168 since it states that:
@@ -3913,6 +3918,8 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag)
tcp_rack_update_reo_wnd(sk, &rs);
+ tcp_in_ack_event(sk, flag);
+
if (tp->tlp_high_seq)
tcp_process_tlp_ack(sk, ack, flag);
@@ -3944,6 +3951,7 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag)
return 1;
no_queue:
+ tcp_in_ack_event(sk, flag);
/* If data was DSACKed, see if we can undo a cwnd reduction. */
if (flag & FLAG_DSACKING_ACK) {
tcp_fastretrans_alert(sk, prior_snd_una, num_dupack, &flag,
diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c
index b6952b88b505..73beaa7e2d70 100644
--- a/net/ipv4/udp_offload.c
+++ b/net/ipv4/udp_offload.c
@@ -242,6 +242,62 @@ static struct sk_buff *__udpv4_gso_segment_list_csum(struct sk_buff *segs)
return segs;
}
+static void __udpv6_gso_segment_csum(struct sk_buff *seg,
+ struct in6_addr *oldip,
+ const struct in6_addr *newip,
+ __be16 *oldport, __be16 newport)
+{
+ struct udphdr *uh = udp_hdr(seg);
+
+ if (ipv6_addr_equal(oldip, newip) && *oldport == newport)
+ return;
+
+ if (uh->check) {
+ inet_proto_csum_replace16(&uh->check, seg, oldip->s6_addr32,
+ newip->s6_addr32, true);
+
+ inet_proto_csum_replace2(&uh->check, seg, *oldport, newport,
+ false);
+ if (!uh->check)
+ uh->check = CSUM_MANGLED_0;
+ }
+
+ *oldip = *newip;
+ *oldport = newport;
+}
+
+static struct sk_buff *__udpv6_gso_segment_list_csum(struct sk_buff *segs)
+{
+ const struct ipv6hdr *iph;
+ const struct udphdr *uh;
+ struct ipv6hdr *iph2;
+ struct sk_buff *seg;
+ struct udphdr *uh2;
+
+ seg = segs;
+ uh = udp_hdr(seg);
+ iph = ipv6_hdr(seg);
+ uh2 = udp_hdr(seg->next);
+ iph2 = ipv6_hdr(seg->next);
+
+ if (!(*(const u32 *)&uh->source ^ *(const u32 *)&uh2->source) &&
+ ipv6_addr_equal(&iph->saddr, &iph2->saddr) &&
+ ipv6_addr_equal(&iph->daddr, &iph2->daddr))
+ return segs;
+
+ while ((seg = seg->next)) {
+ uh2 = udp_hdr(seg);
+ iph2 = ipv6_hdr(seg);
+
+ __udpv6_gso_segment_csum(seg, &iph2->saddr, &iph->saddr,
+ &uh2->source, uh->source);
+ __udpv6_gso_segment_csum(seg, &iph2->daddr, &iph->daddr,
+ &uh2->dest, uh->dest);
+ }
+
+ return segs;
+}
+
static struct sk_buff *__udp_gso_segment_list(struct sk_buff *skb,
netdev_features_t features,
bool is_ipv6)
@@ -254,7 +310,10 @@ static struct sk_buff *__udp_gso_segment_list(struct sk_buff *skb,
udp_hdr(skb)->len = htons(sizeof(struct udphdr) + mss);
- return is_ipv6 ? skb : __udpv4_gso_segment_list_csum(skb);
+ if (is_ipv6)
+ return __udpv6_gso_segment_list_csum(skb);
+ else
+ return __udpv4_gso_segment_list_csum(skb);
}
struct sk_buff *__udp_gso_segment(struct sk_buff *gso_skb,
diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c
index cf9a44fb8243..0d4e82744921 100644
--- a/net/ipv6/fib6_rules.c
+++ b/net/ipv6/fib6_rules.c
@@ -353,9 +353,9 @@ static int fib6_rule_configure(struct fib_rule *rule, struct sk_buff *skb,
struct nlattr **tb,
struct netlink_ext_ack *extack)
{
+ struct fib6_rule *rule6 = (struct fib6_rule *)rule;
+ struct net *net = rule->fr_net;
int err = -EINVAL;
- struct net *net = sock_net(skb->sk);
- struct fib6_rule *rule6 = (struct fib6_rule *) rule;
if (rule->action == FR_ACT_TO_TBL && !rule->l3mdev) {
if (rule->table == RT6_TABLE_UNSPEC) {
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 426330b8dfa4..f024d89cb0f8 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -1416,6 +1416,7 @@ static int ip6_setup_cork(struct sock *sk, struct inet_cork_full *cork,
cork->fl.u.ip6 = *fl6;
v6_cork->hop_limit = ipc6->hlimit;
v6_cork->tclass = ipc6->tclass;
+ v6_cork->dontfrag = ipc6->dontfrag;
if (rt->dst.flags & DST_XFRM_TUNNEL)
mtu = np->pmtudisc >= IPV6_PMTUDISC_PROBE ?
READ_ONCE(rt->dst.dev->mtu) : dst_mtu(&rt->dst);
@@ -1450,7 +1451,7 @@ static int __ip6_append_data(struct sock *sk,
int getfrag(void *from, char *to, int offset,
int len, int odd, struct sk_buff *skb),
void *from, size_t length, int transhdrlen,
- unsigned int flags, struct ipcm6_cookie *ipc6)
+ unsigned int flags)
{
struct sk_buff *skb, *skb_prev = NULL;
unsigned int maxfraglen, fragheaderlen, mtu, orig_mtu, pmtu;
@@ -1507,7 +1508,7 @@ static int __ip6_append_data(struct sock *sk,
if (headersize + transhdrlen > mtu)
goto emsgsize;
- if (cork->length + length > mtu - headersize && ipc6->dontfrag &&
+ if (cork->length + length > mtu - headersize && v6_cork->dontfrag &&
(sk->sk_protocol == IPPROTO_UDP ||
sk->sk_protocol == IPPROTO_RAW)) {
ipv6_local_rxpmtu(sk, fl6, mtu - headersize +
@@ -1825,7 +1826,7 @@ int ip6_append_data(struct sock *sk,
return __ip6_append_data(sk, fl6, &sk->sk_write_queue, &inet->cork.base,
&np->cork, sk_page_frag(sk), getfrag,
- from, length, transhdrlen, flags, ipc6);
+ from, length, transhdrlen, flags);
}
EXPORT_SYMBOL_GPL(ip6_append_data);
@@ -2020,7 +2021,7 @@ struct sk_buff *ip6_make_skb(struct sock *sk,
err = __ip6_append_data(sk, fl6, &queue, &cork->base, &v6_cork,
¤t->task_frag, getfrag, from,
length + exthdrlen, transhdrlen + exthdrlen,
- flags, ipc6);
+ flags);
if (err) {
__ip6_flush_pending_frames(sk, &queue, cork, &v6_cork);
return ERR_PTR(err);
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c
index dae978badd26..5065b9622ada 100644
--- a/net/llc/af_llc.c
+++ b/net/llc/af_llc.c
@@ -887,15 +887,15 @@ static int llc_ui_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
if (sk->sk_type != SOCK_STREAM)
goto copy_uaddr;
+ /* Partial read */
+ if (used + offset < skb_len)
+ continue;
+
if (!(flags & MSG_PEEK)) {
skb_unlink(skb, &sk->sk_receive_queue);
kfree_skb(skb);
*seq = 0;
}
-
- /* Partial read */
- if (used + offset < skb_len)
- continue;
} while (len > 0);
out:
diff --git a/net/netfilter/ipset/ip_set_hash_gen.h b/net/netfilter/ipset/ip_set_hash_gen.h
index 093ec5214008..636118b0f2ef 100644
--- a/net/netfilter/ipset/ip_set_hash_gen.h
+++ b/net/netfilter/ipset/ip_set_hash_gen.h
@@ -88,7 +88,7 @@ struct hbucket {
#define ahash_sizeof_regions(htable_bits) \
(ahash_numof_locks(htable_bits) * sizeof(struct ip_set_region))
#define ahash_region(n, htable_bits) \
- ((n) % ahash_numof_locks(htable_bits))
+ ((n) / jhash_size(HTABLE_REGION_BITS))
#define ahash_bucket_start(h, htable_bits) \
((htable_bits) < HTABLE_REGION_BITS ? 0 \
: (h) * jhash_size(HTABLE_REGION_BITS))
diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c
index 8498bf27a353..abf558868db1 100644
--- a/net/netfilter/nf_conntrack_standalone.c
+++ b/net/netfilter/nf_conntrack_standalone.c
@@ -613,7 +613,9 @@ static struct ctl_table nf_ct_sysctl_table[] = {
.data = &nf_conntrack_max,
.maxlen = sizeof(int),
.mode = 0644,
- .proc_handler = proc_dointvec,
+ .proc_handler = proc_dointvec_minmax,
+ .extra1 = SYSCTL_ZERO,
+ .extra2 = SYSCTL_INT_MAX,
},
[NF_SYSCTL_CT_COUNT] = {
.procname = "nf_conntrack_count",
@@ -652,7 +654,9 @@ static struct ctl_table nf_ct_sysctl_table[] = {
.data = &nf_ct_expect_max,
.maxlen = sizeof(int),
.mode = 0644,
- .proc_handler = proc_dointvec,
+ .proc_handler = proc_dointvec_minmax,
+ .extra1 = SYSCTL_ONE,
+ .extra2 = SYSCTL_INT_MAX,
},
[NF_SYSCTL_CT_ACCT] = {
.procname = "nf_conntrack_acct",
@@ -931,7 +935,9 @@ static struct ctl_table nf_ct_netfilter_table[] = {
.data = &nf_conntrack_max,
.maxlen = sizeof(int),
.mode = 0644,
- .proc_handler = proc_dointvec,
+ .proc_handler = proc_dointvec_minmax,
+ .extra1 = SYSCTL_ZERO,
+ .extra2 = SYSCTL_INT_MAX,
},
{ }
};
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index 04fda8c14e04..ff419ecb268a 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -1911,9 +1911,9 @@ static void nf_tables_chain_free_chain_rules(struct nft_chain *chain)
kvfree(chain->rules_next);
}
-void nf_tables_chain_destroy(struct nft_ctx *ctx)
+void nf_tables_chain_destroy(struct nft_chain *chain)
{
- struct nft_chain *chain = ctx->chain;
+ const struct nft_table *table = chain->table;
struct nft_hook *hook, *next;
if (WARN_ON(chain->use > 0))
@@ -1925,7 +1925,7 @@ void nf_tables_chain_destroy(struct nft_ctx *ctx)
if (nft_is_base_chain(chain)) {
struct nft_base_chain *basechain = nft_base_chain(chain);
- if (nft_base_chain_netdev(ctx->family, basechain->ops.hooknum)) {
+ if (nft_base_chain_netdev(table->family, basechain->ops.hooknum)) {
list_for_each_entry_safe(hook, next,
&basechain->hook_list, list) {
list_del_rcu(&hook->list);
@@ -2367,7 +2367,7 @@ static int nf_tables_addchain(struct nft_ctx *ctx, u8 family, u8 genmask,
err_use:
nf_tables_unregister_hook(net, table, chain);
err_destroy_chain:
- nf_tables_chain_destroy(ctx);
+ nf_tables_chain_destroy(chain);
return err;
}
@@ -3344,8 +3344,11 @@ void nf_tables_rule_destroy(const struct nft_ctx *ctx, struct nft_rule *rule)
kfree(rule);
}
+/* can only be used if rule is no longer visible to dumps */
static void nf_tables_rule_release(const struct nft_ctx *ctx, struct nft_rule *rule)
{
+ lockdep_commit_lock_is_held(ctx->net);
+
nft_rule_expr_deactivate(ctx, rule, NFT_TRANS_RELEASE);
nf_tables_rule_destroy(ctx, rule);
}
@@ -4857,6 +4860,8 @@ void nf_tables_deactivate_set(const struct nft_ctx *ctx, struct nft_set *set,
struct nft_set_binding *binding,
enum nft_trans_phase phase)
{
+ lockdep_commit_lock_is_held(ctx->net);
+
switch (phase) {
case NFT_TRANS_PREPARE_ERROR:
nft_set_trans_unbind(ctx, set);
@@ -7999,7 +8004,7 @@ static void nft_commit_release(struct nft_trans *trans)
kfree(nft_trans_chain_name(trans));
break;
case NFT_MSG_DELCHAIN:
- nf_tables_chain_destroy(&trans->ctx);
+ nf_tables_chain_destroy(nft_trans_chain(trans));
break;
case NFT_MSG_DELRULE:
nf_tables_rule_destroy(&trans->ctx, nft_trans_rule(trans));
@@ -8840,7 +8845,7 @@ static void nf_tables_abort_release(struct nft_trans *trans)
nf_tables_table_destroy(&trans->ctx);
break;
case NFT_MSG_NEWCHAIN:
- nf_tables_chain_destroy(&trans->ctx);
+ nf_tables_chain_destroy(nft_trans_chain(trans));
break;
case NFT_MSG_NEWRULE:
nf_tables_rule_destroy(&trans->ctx, nft_trans_rule(trans));
@@ -9559,23 +9564,43 @@ int nft_data_dump(struct sk_buff *skb, int attr, const struct nft_data *data,
}
EXPORT_SYMBOL_GPL(nft_data_dump);
-int __nft_release_basechain(struct nft_ctx *ctx)
+static void __nft_release_basechain_now(struct nft_ctx *ctx)
{
struct nft_rule *rule, *nr;
- if (WARN_ON(!nft_is_base_chain(ctx->chain)))
- return 0;
-
- nf_tables_unregister_hook(ctx->net, ctx->chain->table, ctx->chain);
list_for_each_entry_safe(rule, nr, &ctx->chain->rules, list) {
list_del(&rule->list);
- nft_use_dec(&ctx->chain->use);
nf_tables_rule_release(ctx, rule);
}
+ nf_tables_chain_destroy(ctx->chain);
+}
+
+int __nft_release_basechain(struct nft_ctx *ctx)
+{
+ struct nft_rule *rule;
+
+ if (WARN_ON_ONCE(!nft_is_base_chain(ctx->chain)))
+ return 0;
+
+ nf_tables_unregister_hook(ctx->net, ctx->chain->table, ctx->chain);
+ list_for_each_entry(rule, &ctx->chain->rules, list)
+ nft_use_dec(&ctx->chain->use);
+
nft_chain_del(ctx->chain);
nft_use_dec(&ctx->table->use);
- nf_tables_chain_destroy(ctx);
+ if (!maybe_get_net(ctx->net)) {
+ __nft_release_basechain_now(ctx);
+ return 0;
+ }
+
+ /* wait for ruleset dumps to complete. Owning chain is no longer in
+ * lists, so new dumps can't find any of these rules anymore.
+ */
+ synchronize_rcu();
+
+ __nft_release_basechain_now(ctx);
+ put_net(ctx->net);
return 0;
}
EXPORT_SYMBOL_GPL(__nft_release_basechain);
@@ -9646,10 +9671,9 @@ static void __nft_release_table(struct net *net, struct nft_table *table)
nft_obj_destroy(&ctx, obj);
}
list_for_each_entry_safe(chain, nc, &table->chains, list) {
- ctx.chain = chain;
nft_chain_del(chain);
nft_use_dec(&table->use);
- nf_tables_chain_destroy(&ctx);
+ nf_tables_chain_destroy(chain);
}
list_del(&table->list);
nf_tables_table_destroy(&ctx);
diff --git a/net/netfilter/nft_immediate.c b/net/netfilter/nft_immediate.c
index d154fe67ca8a..a889cf1d863e 100644
--- a/net/netfilter/nft_immediate.c
+++ b/net/netfilter/nft_immediate.c
@@ -221,7 +221,7 @@ static void nft_immediate_destroy(const struct nft_ctx *ctx,
list_del(&rule->list);
nf_tables_rule_destroy(&chain_ctx, rule);
}
- nf_tables_chain_destroy(&chain_ctx);
+ nf_tables_chain_destroy(chain);
break;
default:
break;
diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c
index a02ea493c269..c3ca4ae11c09 100644
--- a/net/openvswitch/actions.c
+++ b/net/openvswitch/actions.c
@@ -953,8 +953,7 @@ static int output_userspace(struct datapath *dp, struct sk_buff *skb,
upcall.cmd = OVS_PACKET_CMD_ACTION;
upcall.mru = OVS_CB(skb)->mru;
- for (a = nla_data(attr), rem = nla_len(attr); rem > 0;
- a = nla_next(a, &rem)) {
+ nla_for_each_nested(a, attr, rem) {
switch (nla_type(a)) {
case OVS_USERSPACE_ATTR_USERDATA:
upcall.userdata = a;
diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c
index 91a19460cb57..07b9f8335f05 100644
--- a/net/sched/act_mirred.c
+++ b/net/sched/act_mirred.c
@@ -256,31 +256,31 @@ static int tcf_mirred_act(struct sk_buff *skb, const struct tc_action *a,
m_mac_header_xmit = READ_ONCE(m->tcfm_mac_header_xmit);
m_eaction = READ_ONCE(m->tcfm_eaction);
+ is_redirect = tcf_mirred_is_act_redirect(m_eaction);
retval = READ_ONCE(m->tcf_action);
dev = rcu_dereference_bh(m->tcfm_dev);
if (unlikely(!dev)) {
pr_notice_once("tc mirred: target device is gone\n");
- goto out;
+ goto err_cant_do;
}
if (unlikely(!(dev->flags & IFF_UP)) || !netif_carrier_ok(dev)) {
net_notice_ratelimited("tc mirred to Houston: device %s is down\n",
dev->name);
- goto out;
+ goto err_cant_do;
}
/* we could easily avoid the clone only if called by ingress and clsact;
* since we can't easily detect the clsact caller, skip clone only for
* ingress - that covers the TC S/W datapath.
*/
- is_redirect = tcf_mirred_is_act_redirect(m_eaction);
at_ingress = skb_at_tc_ingress(skb);
use_reinsert = at_ingress && is_redirect &&
tcf_mirred_can_reinsert(retval);
if (!use_reinsert) {
skb2 = skb_clone(skb, GFP_ATOMIC);
if (!skb2)
- goto out;
+ goto err_cant_do;
}
want_ingress = tcf_mirred_act_wants_ingress(m_eaction);
@@ -323,12 +323,16 @@ static int tcf_mirred_act(struct sk_buff *skb, const struct tc_action *a,
}
err = tcf_mirred_forward(want_ingress, skb2);
- if (err) {
-out:
+ if (err)
tcf_action_inc_overlimit_qstats(&m->common);
- if (tcf_mirred_is_act_redirect(m_eaction))
- retval = TC_ACT_SHOT;
- }
+ __this_cpu_dec(mirred_nest_level);
+
+ return retval;
+
+err_cant_do:
+ if (is_redirect)
+ retval = TC_ACT_SHOT;
+ tcf_action_inc_overlimit_qstats(&m->common);
__this_cpu_dec(mirred_nest_level);
return retval;
diff --git a/net/sched/sch_codel.c b/net/sched/sch_codel.c
index 30169b3adbbb..d99c7386e24e 100644
--- a/net/sched/sch_codel.c
+++ b/net/sched/sch_codel.c
@@ -174,7 +174,7 @@ static int codel_change(struct Qdisc *sch, struct nlattr *opt,
qlen = sch->q.qlen;
while (sch->q.qlen > sch->limit) {
- struct sk_buff *skb = __qdisc_dequeue_head(&sch->q);
+ struct sk_buff *skb = qdisc_dequeue_internal(sch, true);
dropped += qdisc_pkt_len(skb);
qdisc_qstats_backlog_dec(sch, skb);
diff --git a/net/sched/sch_drr.c b/net/sched/sch_drr.c
index 08424aac6da8..7ddf73f5a418 100644
--- a/net/sched/sch_drr.c
+++ b/net/sched/sch_drr.c
@@ -36,6 +36,11 @@ struct drr_sched {
struct Qdisc_class_hash clhash;
};
+static bool cl_is_active(struct drr_class *cl)
+{
+ return !list_empty(&cl->alist);
+}
+
static struct drr_class *drr_find_class(struct Qdisc *sch, u32 classid)
{
struct drr_sched *q = qdisc_priv(sch);
@@ -344,7 +349,6 @@ static int drr_enqueue(struct sk_buff *skb, struct Qdisc *sch,
struct drr_sched *q = qdisc_priv(sch);
struct drr_class *cl;
int err = 0;
- bool first;
cl = drr_classify(skb, sch, &err);
if (cl == NULL) {
@@ -354,7 +358,6 @@ static int drr_enqueue(struct sk_buff *skb, struct Qdisc *sch,
return err;
}
- first = !cl->qdisc->q.qlen;
err = qdisc_enqueue(skb, cl->qdisc, to_free);
if (unlikely(err != NET_XMIT_SUCCESS)) {
if (net_xmit_drop_count(err)) {
@@ -364,7 +367,7 @@ static int drr_enqueue(struct sk_buff *skb, struct Qdisc *sch,
return err;
}
- if (first) {
+ if (!cl_is_active(cl)) {
list_add_tail(&cl->alist, &q->active);
cl->deficit = cl->quantum;
}
diff --git a/net/sched/sch_ets.c b/net/sched/sch_ets.c
index 0afd9187f836..35b8577aef7d 100644
--- a/net/sched/sch_ets.c
+++ b/net/sched/sch_ets.c
@@ -74,6 +74,11 @@ static const struct nla_policy ets_class_policy[TCA_ETS_MAX + 1] = {
[TCA_ETS_QUANTA_BAND] = { .type = NLA_U32 },
};
+static bool cl_is_active(struct ets_class *cl)
+{
+ return !list_empty(&cl->alist);
+}
+
static int ets_quantum_parse(struct Qdisc *sch, const struct nlattr *attr,
unsigned int *quantum,
struct netlink_ext_ack *extack)
@@ -424,7 +429,6 @@ static int ets_qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch,
struct ets_sched *q = qdisc_priv(sch);
struct ets_class *cl;
int err = 0;
- bool first;
cl = ets_classify(skb, sch, &err);
if (!cl) {
@@ -434,7 +438,6 @@ static int ets_qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch,
return err;
}
- first = !cl->qdisc->q.qlen;
err = qdisc_enqueue(skb, cl->qdisc, to_free);
if (unlikely(err != NET_XMIT_SUCCESS)) {
if (net_xmit_drop_count(err)) {
@@ -444,7 +447,7 @@ static int ets_qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch,
return err;
}
- if (first && !ets_class_is_strict(q, cl)) {
+ if (!cl_is_active(cl) && !ets_class_is_strict(q, cl)) {
list_add_tail(&cl->alist, &q->active);
cl->deficit = cl->quantum;
}
diff --git a/net/sched/sch_fq.c b/net/sched/sch_fq.c
index 5a1274199fe3..65b12b39e2ec 100644
--- a/net/sched/sch_fq.c
+++ b/net/sched/sch_fq.c
@@ -904,7 +904,7 @@ static int fq_change(struct Qdisc *sch, struct nlattr *opt,
sch_tree_lock(sch);
}
while (sch->q.qlen > sch->limit) {
- struct sk_buff *skb = fq_dequeue(sch);
+ struct sk_buff *skb = qdisc_dequeue_internal(sch, false);
if (!skb)
break;
diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c
index 01d6eea5b0ce..60dbc549e991 100644
--- a/net/sched/sch_fq_codel.c
+++ b/net/sched/sch_fq_codel.c
@@ -429,7 +429,7 @@ static int fq_codel_change(struct Qdisc *sch, struct nlattr *opt,
while (sch->q.qlen > sch->limit ||
q->memory_usage > q->memory_limit) {
- struct sk_buff *skb = fq_codel_dequeue(sch);
+ struct sk_buff *skb = qdisc_dequeue_internal(sch, false);
q->cstats.drop_len += qdisc_pkt_len(skb);
rtnl_kfree_skbs(skb, skb);
diff --git a/net/sched/sch_fq_pie.c b/net/sched/sch_fq_pie.c
index a5b63158f081..d4bfa3382e11 100644
--- a/net/sched/sch_fq_pie.c
+++ b/net/sched/sch_fq_pie.c
@@ -360,7 +360,7 @@ static int fq_pie_change(struct Qdisc *sch, struct nlattr *opt,
/* Drop excess packets if new limit is lower */
while (sch->q.qlen > sch->limit) {
- struct sk_buff *skb = fq_pie_qdisc_dequeue(sch);
+ struct sk_buff *skb = qdisc_dequeue_internal(sch, false);
len_dropped += qdisc_pkt_len(skb);
num_dropped += 1;
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c
index aad090fd165b..443db2c08a09 100644
--- a/net/sched/sch_hfsc.c
+++ b/net/sched/sch_hfsc.c
@@ -176,6 +176,11 @@ struct hfsc_sched {
#define HT_INFINITY 0xffffffffffffffffULL /* infinite time value */
+static bool cl_in_el_or_vttree(struct hfsc_class *cl)
+{
+ return ((cl->cl_flags & HFSC_FSC) && cl->cl_nactive) ||
+ ((cl->cl_flags & HFSC_RSC) && !RB_EMPTY_NODE(&cl->el_node));
+}
/*
* eligible tree holds backlogged classes being sorted by their eligible times.
@@ -1038,6 +1043,8 @@ hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid,
if (cl == NULL)
return -ENOBUFS;
+ RB_CLEAR_NODE(&cl->el_node);
+
err = tcf_block_get(&cl->block, &cl->filter_list, sch, extack);
if (err) {
kfree(cl);
@@ -1571,7 +1578,10 @@ hfsc_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free)
return err;
}
- if (first) {
+ sch->qstats.backlog += len;
+ sch->q.qlen++;
+
+ if (first && !cl_in_el_or_vttree(cl)) {
if (cl->cl_flags & HFSC_RSC)
init_ed(cl, len);
if (cl->cl_flags & HFSC_FSC)
@@ -1586,9 +1596,6 @@ hfsc_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free)
}
- sch->qstats.backlog += len;
- sch->q.qlen++;
-
return NET_XMIT_SUCCESS;
}
diff --git a/net/sched/sch_hhf.c b/net/sched/sch_hhf.c
index 420ede875322..433bddcbc0c7 100644
--- a/net/sched/sch_hhf.c
+++ b/net/sched/sch_hhf.c
@@ -563,7 +563,7 @@ static int hhf_change(struct Qdisc *sch, struct nlattr *opt,
qlen = sch->q.qlen;
prev_backlog = sch->qstats.backlog;
while (sch->q.qlen > sch->limit) {
- struct sk_buff *skb = hhf_dequeue(sch);
+ struct sk_buff *skb = qdisc_dequeue_internal(sch, false);
rtnl_kfree_skbs(skb, skb);
}
diff --git a/net/sched/sch_pie.c b/net/sched/sch_pie.c
index c65077f0c0f3..47f5d4adb5a3 100644
--- a/net/sched/sch_pie.c
+++ b/net/sched/sch_pie.c
@@ -193,7 +193,7 @@ static int pie_change(struct Qdisc *sch, struct nlattr *opt,
/* Drop excess packets if new limit is lower */
qlen = sch->q.qlen;
while (sch->q.qlen > sch->limit) {
- struct sk_buff *skb = __qdisc_dequeue_head(&sch->q);
+ struct sk_buff *skb = qdisc_dequeue_internal(sch, true);
dropped += qdisc_pkt_len(skb);
qdisc_qstats_backlog_dec(sch, skb);
diff --git a/net/sched/sch_qfq.c b/net/sched/sch_qfq.c
index ebf9f473c939..1ee15db5fcc8 100644
--- a/net/sched/sch_qfq.c
+++ b/net/sched/sch_qfq.c
@@ -204,6 +204,11 @@ struct qfq_sched {
*/
enum update_reason {enqueue, requeue};
+static bool cl_is_active(struct qfq_class *cl)
+{
+ return !list_empty(&cl->alist);
+}
+
static struct qfq_class *qfq_find_class(struct Qdisc *sch, u32 classid)
{
struct qfq_sched *q = qdisc_priv(sch);
@@ -1222,7 +1227,6 @@ static int qfq_enqueue(struct sk_buff *skb, struct Qdisc *sch,
struct qfq_class *cl;
struct qfq_aggregate *agg;
int err = 0;
- bool first;
cl = qfq_classify(skb, sch, &err);
if (cl == NULL) {
@@ -1244,7 +1248,6 @@ static int qfq_enqueue(struct sk_buff *skb, struct Qdisc *sch,
}
gso_segs = skb_is_gso(skb) ? skb_shinfo(skb)->gso_segs : 1;
- first = !cl->qdisc->q.qlen;
err = qdisc_enqueue(skb, cl->qdisc, to_free);
if (unlikely(err != NET_XMIT_SUCCESS)) {
pr_debug("qfq_enqueue: enqueue failed %d\n", err);
@@ -1261,8 +1264,8 @@ static int qfq_enqueue(struct sk_buff *skb, struct Qdisc *sch,
++sch->q.qlen;
agg = cl->agg;
- /* if the queue was not empty, then done here */
- if (!first) {
+ /* if the class is active, then done here */
+ if (cl_is_active(cl)) {
if (unlikely(skb == cl->qdisc->ops->peek(cl->qdisc)) &&
list_first_entry(&agg->active, struct qfq_class, alist)
== cl && cl->deficit < len)
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 7ec5b0bc48eb..0a4b4870c4d9 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -273,9 +273,6 @@ static struct rpc_xprt *rpc_clnt_set_transport(struct rpc_clnt *clnt,
old = rcu_dereference_protected(clnt->cl_xprt,
lockdep_is_held(&clnt->cl_lock));
- if (!xprt_bound(xprt))
- clnt->cl_autobind = 1;
-
clnt->cl_timeout = timeout;
rcu_assign_pointer(clnt->cl_xprt, xprt);
spin_unlock(&clnt->cl_lock);
diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c
index 8fad45320e1b..f1bb4fd2a270 100644
--- a/net/sunrpc/rpcb_clnt.c
+++ b/net/sunrpc/rpcb_clnt.c
@@ -794,9 +794,10 @@ static void rpcb_getport_done(struct rpc_task *child, void *data)
}
trace_rpcb_setport(child, map->r_status, map->r_port);
- xprt->ops->set_port(xprt, map->r_port);
- if (map->r_port)
+ if (map->r_port) {
+ xprt->ops->set_port(xprt, map->r_port);
xprt_set_bound(xprt);
+ }
}
/*
diff --git a/net/tipc/crypto.c b/net/tipc/crypto.c
index bf384bd12696..159d891b81c5 100644
--- a/net/tipc/crypto.c
+++ b/net/tipc/crypto.c
@@ -821,12 +821,16 @@ static int tipc_aead_encrypt(struct tipc_aead *aead, struct sk_buff *skb,
goto exit;
}
+ /* Get net to avoid freed tipc_crypto when delete namespace */
+ get_net(aead->crypto->net);
+
/* Now, do encrypt */
rc = crypto_aead_encrypt(req);
if (rc == -EINPROGRESS || rc == -EBUSY)
return rc;
tipc_bearer_put(b);
+ put_net(aead->crypto->net);
exit:
kfree(ctx);
@@ -864,6 +868,7 @@ static void tipc_aead_encrypt_done(struct crypto_async_request *base, int err)
kfree(tx_ctx);
tipc_bearer_put(b);
tipc_aead_put(aead);
+ put_net(net);
}
/**
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index a1a662a55c2a..64b971bb1d36 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -1594,6 +1594,9 @@ int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl)
struct xfrm_policy *delpol;
struct hlist_head *chain;
+ /* Sanitize mark before store */
+ policy->mark.v &= policy->mark.m;
+
spin_lock_bh(&net->xfrm.xfrm_policy_lock);
chain = policy_hash_bysel(net, &policy->selector, policy->family, dir);
if (chain)
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index 94179ff475f2..da2d7012e5c7 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -1249,6 +1249,9 @@ static void __xfrm_state_insert(struct xfrm_state *x)
list_add(&x->km.all, &net->xfrm.state_all);
+ /* Sanitize mark before store */
+ x->mark.v &= x->mark.m;
+
h = xfrm_dst_hash(net, &x->id.daddr, &x->props.saddr,
x->props.reqid, x->props.family);
hlist_add_head_rcu(&x->bydst, net->xfrm.state_bydst + h);
diff --git a/samples/ftrace/sample-trace-array.c b/samples/ftrace/sample-trace-array.c
index 6aba02a31c96..77685a7eb767 100644
--- a/samples/ftrace/sample-trace-array.c
+++ b/samples/ftrace/sample-trace-array.c
@@ -112,7 +112,7 @@ static int __init sample_trace_array_init(void)
/*
* If context specific per-cpu buffers havent already been allocated.
*/
- trace_printk_init_buffers();
+ trace_array_init_printk(tr);
simple_tsk = kthread_run(simple_thread, NULL, "sample-instance");
if (IS_ERR(simple_tsk)) {
diff --git a/scripts/config b/scripts/config
index 8c8d7c3d7acc..330bef88fd5e 100755
--- a/scripts/config
+++ b/scripts/config
@@ -32,6 +32,7 @@ commands:
Disable option directly after other option
--module-after|-M beforeopt option
Turn option into module directly after other option
+ --refresh Refresh the config using old settings
commands can be repeated multiple times
@@ -124,16 +125,22 @@ undef_var() {
txt_delete "^# $name is not set" "$FN"
}
-if [ "$1" = "--file" ]; then
- FN="$2"
- if [ "$FN" = "" ] ; then
- usage
+FN=.config
+CMDS=()
+while [[ $# -gt 0 ]]; do
+ if [ "$1" = "--file" ]; then
+ if [ "$2" = "" ]; then
+ usage
+ fi
+ FN="$2"
+ shift 2
+ else
+ CMDS+=("$1")
+ shift
fi
- shift 2
-else
- FN=.config
-fi
+done
+set -- "${CMDS[@]}"
if [ "$1" = "" ] ; then
usage
fi
@@ -217,9 +224,8 @@ while [ "$1" != "" ] ; do
set_var "${CONFIG_}$B" "${CONFIG_}$B=m" "${CONFIG_}$A"
;;
- # undocumented because it ignores --file (fixme)
--refresh)
- yes "" | make oldconfig
+ yes "" | make oldconfig KCONFIG_CONFIG=$FN
;;
*)
diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh
index d7d5c58b8b6a..557f37f481fd 100755
--- a/scripts/kconfig/merge_config.sh
+++ b/scripts/kconfig/merge_config.sh
@@ -98,8 +98,8 @@ INITFILE=$1
shift;
if [ ! -r "$INITFILE" ]; then
- echo "The base file '$INITFILE' does not exist. Exit." >&2
- exit 1
+ echo "The base file '$INITFILE' does not exist. Creating one..." >&2
+ touch "$INITFILE"
fi
MERGE_LIST=$*
diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c
index 44f0b5148a5b..6402626e47c6 100644
--- a/security/smack/smackfs.c
+++ b/security/smack/smackfs.c
@@ -921,6 +921,10 @@ static ssize_t smk_set_cipso(struct file *file, const char __user *buf,
if (rc >= 0) {
old_cat = skp->smk_netlabel.attr.mls.cat;
rcu_assign_pointer(skp->smk_netlabel.attr.mls.cat, ncats.attr.mls.cat);
+ if (ncats.attr.mls.cat)
+ skp->smk_netlabel.flags |= NETLBL_SECATTR_MLS_CAT;
+ else
+ skp->smk_netlabel.flags &= ~(u32)NETLBL_SECATTR_MLS_CAT;
skp->smk_netlabel.attr.mls.lvl = ncats.attr.mls.lvl;
synchronize_rcu();
netlbl_catmap_free(old_cat);
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c
index de6f94bee50b..8eb5fef41dbe 100644
--- a/sound/core/oss/pcm_oss.c
+++ b/sound/core/oss/pcm_oss.c
@@ -1078,8 +1078,7 @@ static int snd_pcm_oss_change_params_locked(struct snd_pcm_substream *substream)
runtime->oss.params = 0;
runtime->oss.prepare = 1;
runtime->oss.buffer_used = 0;
- if (runtime->dma_area)
- snd_pcm_format_set_silence(runtime->format, runtime->dma_area, bytes_to_samples(runtime, runtime->dma_bytes));
+ snd_pcm_runtime_buffer_set_silence(runtime);
runtime->oss.period_frames = snd_pcm_alsa_frames(substream, oss_period_size);
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 9425fcd30c4c..98bd6fe850d3 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -685,6 +685,17 @@ static void snd_pcm_buffer_access_unlock(struct snd_pcm_runtime *runtime)
atomic_inc(&runtime->buffer_accessing);
}
+/* fill the PCM buffer with the current silence format; called from pcm_oss.c */
+void snd_pcm_runtime_buffer_set_silence(struct snd_pcm_runtime *runtime)
+{
+ snd_pcm_buffer_access_lock(runtime);
+ if (runtime->dma_area)
+ snd_pcm_format_set_silence(runtime->format, runtime->dma_area,
+ bytes_to_samples(runtime, runtime->dma_bytes));
+ snd_pcm_buffer_access_unlock(runtime);
+}
+EXPORT_SYMBOL_GPL(snd_pcm_runtime_buffer_set_silence);
+
#if IS_ENABLED(CONFIG_SND_PCM_OSS)
#define is_oss_stream(substream) ((substream)->oss.oss)
#else
diff --git a/sound/pci/es1968.c b/sound/pci/es1968.c
index 34332d008b27..32e38a70af93 100644
--- a/sound/pci/es1968.c
+++ b/sound/pci/es1968.c
@@ -1573,7 +1573,7 @@ static int snd_es1968_capture_open(struct snd_pcm_substream *substream)
struct snd_pcm_runtime *runtime = substream->runtime;
struct es1968 *chip = snd_pcm_substream_chip(substream);
struct esschan *es;
- int apu1, apu2;
+ int err, apu1, apu2;
apu1 = snd_es1968_alloc_apu_pair(chip, ESM_APU_PCM_CAPTURE);
if (apu1 < 0)
@@ -1616,7 +1616,9 @@ static int snd_es1968_capture_open(struct snd_pcm_substream *substream)
runtime->hw = snd_es1968_capture;
runtime->hw.buffer_bytes_max = runtime->hw.period_bytes_max =
calc_available_memory_size(chip) - 1024; /* keep MIXBUF size */
- snd_pcm_hw_constraint_pow2(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES);
+ err = snd_pcm_hw_constraint_pow2(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES);
+ if (err < 0)
+ return err;
spin_lock_irq(&chip->substream_lock);
list_add(&es->list, &chip->substream_list);
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 3fdd2337919e..b2df53215279 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -6702,6 +6702,41 @@ static void alc285_fixup_hp_spectre_x360_eb1(struct hda_codec *codec,
}
}
+/* GPIO1 = amplifier on/off */
+static void alc285_fixup_hp_spectre_x360_df1(struct hda_codec *codec,
+ const struct hda_fixup *fix,
+ int action)
+{
+ struct alc_spec *spec = codec->spec;
+ static const hda_nid_t conn[] = { 0x02 };
+ static const struct hda_pintbl pincfgs[] = {
+ { 0x14, 0x90170110 }, /* front/high speakers */
+ { 0x17, 0x90170130 }, /* back/bass speakers */
+ { }
+ };
+
+ // enable mute led
+ alc285_fixup_hp_mute_led_coefbit(codec, fix, action);
+
+ switch (action) {
+ case HDA_FIXUP_ACT_PRE_PROBE:
+ /* needed for amp of back speakers */
+ spec->gpio_mask |= 0x01;
+ spec->gpio_dir |= 0x01;
+ snd_hda_apply_pincfgs(codec, pincfgs);
+ /* share DAC to have unified volume control */
+ snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn), conn);
+ snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
+ break;
+ case HDA_FIXUP_ACT_INIT:
+ /* need to toggle GPIO to enable the amp of back speakers */
+ alc_update_gpio_data(codec, 0x01, true);
+ msleep(100);
+ alc_update_gpio_data(codec, 0x01, false);
+ break;
+ }
+}
+
static void alc285_fixup_hp_spectre_x360(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{
@@ -6984,6 +7019,7 @@ enum {
ALC280_FIXUP_HP_9480M,
ALC245_FIXUP_HP_X360_AMP,
ALC285_FIXUP_HP_SPECTRE_X360_EB1,
+ ALC285_FIXUP_HP_SPECTRE_X360_DF1,
ALC285_FIXUP_HP_ENVY_X360,
ALC288_FIXUP_DELL_HEADSET_MODE,
ALC288_FIXUP_DELL1_MIC_NO_PRESENCE,
@@ -8818,6 +8854,10 @@ static const struct hda_fixup alc269_fixups[] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc285_fixup_hp_spectre_x360_eb1
},
+ [ALC285_FIXUP_HP_SPECTRE_X360_DF1] = {
+ .type = HDA_FIXUP_FUNC,
+ .v.func = alc285_fixup_hp_spectre_x360_df1
+ },
[ALC285_FIXUP_HP_ENVY_X360] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc285_fixup_hp_envy_x360,
@@ -9223,6 +9263,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x86c1, "HP Laptop 15-da3001TU", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
SND_PCI_QUIRK(0x103c, 0x86c7, "HP Envy AiO 32", ALC274_FIXUP_HP_ENVY_GPIO),
SND_PCI_QUIRK(0x103c, 0x86e7, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
+ SND_PCI_QUIRK(0x103c, 0x863e, "HP Spectre x360 15-df1xxx", ALC285_FIXUP_HP_SPECTRE_X360_DF1),
SND_PCI_QUIRK(0x103c, 0x86e8, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
SND_PCI_QUIRK(0x103c, 0x86f9, "HP Spectre x360 13-aw0xxx", ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED),
SND_PCI_QUIRK(0x103c, 0x8716, "HP Elite Dragonfly G2 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
@@ -9750,6 +9791,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
{.id = ALC295_FIXUP_HP_OMEN, .name = "alc295-hp-omen"},
{.id = ALC285_FIXUP_HP_SPECTRE_X360, .name = "alc285-hp-spectre-x360"},
{.id = ALC285_FIXUP_HP_SPECTRE_X360_EB1, .name = "alc285-hp-spectre-x360-eb1"},
+ {.id = ALC285_FIXUP_HP_SPECTRE_X360_DF1, .name = "alc285-hp-spectre-x360-df1"},
{.id = ALC285_FIXUP_HP_ENVY_X360, .name = "alc285-hp-envy-x360"},
{.id = ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP, .name = "alc287-ideapad-bass-spk-amp"},
{.id = ALC623_FIXUP_LENOVO_THINKSTATION_P340, .name = "alc623-lenovo-thinkstation-p340"},
diff --git a/sound/sh/Kconfig b/sound/sh/Kconfig
index b75fbb3236a7..f5fa09d740b4 100644
--- a/sound/sh/Kconfig
+++ b/sound/sh/Kconfig
@@ -14,7 +14,7 @@ if SND_SUPERH
config SND_AICA
tristate "Dreamcast Yamaha AICA sound"
- depends on SH_DREAMCAST
+ depends on SH_DREAMCAST && SH_DMA_API
select SND_PCM
select G2_DMA
help
diff --git a/sound/soc/codecs/tas2764.c b/sound/soc/codecs/tas2764.c
index dd8eeafa223e..e09480e4c54c 100644
--- a/sound/soc/codecs/tas2764.c
+++ b/sound/soc/codecs/tas2764.c
@@ -130,33 +130,6 @@ static SOC_ENUM_SINGLE_DECL(
static const struct snd_kcontrol_new tas2764_asi1_mux =
SOC_DAPM_ENUM("ASI1 Source", tas2764_ASI1_src_enum);
-static int tas2764_dac_event(struct snd_soc_dapm_widget *w,
- struct snd_kcontrol *kcontrol, int event)
-{
- struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
- struct tas2764_priv *tas2764 = snd_soc_component_get_drvdata(component);
- int ret;
-
- switch (event) {
- case SND_SOC_DAPM_POST_PMU:
- tas2764->dac_powered = true;
- ret = tas2764_update_pwr_ctrl(tas2764);
- break;
- case SND_SOC_DAPM_PRE_PMD:
- tas2764->dac_powered = false;
- ret = tas2764_update_pwr_ctrl(tas2764);
- break;
- default:
- dev_err(tas2764->dev, "Unsupported event\n");
- return -EINVAL;
- }
-
- if (ret < 0)
- return ret;
-
- return 0;
-}
-
static const struct snd_kcontrol_new isense_switch =
SOC_DAPM_SINGLE("Switch", TAS2764_PWR_CTRL, TAS2764_ISENSE_POWER_EN, 1, 1);
static const struct snd_kcontrol_new vsense_switch =
@@ -169,8 +142,7 @@ static const struct snd_soc_dapm_widget tas2764_dapm_widgets[] = {
1, &isense_switch),
SND_SOC_DAPM_SWITCH("VSENSE", TAS2764_PWR_CTRL, TAS2764_VSENSE_POWER_EN,
1, &vsense_switch),
- SND_SOC_DAPM_DAC_E("DAC", NULL, SND_SOC_NOPM, 0, 0, tas2764_dac_event,
- SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD),
+ SND_SOC_DAPM_DAC("DAC", NULL, SND_SOC_NOPM, 0, 0),
SND_SOC_DAPM_OUTPUT("OUT"),
SND_SOC_DAPM_SIGGEN("VMON"),
SND_SOC_DAPM_SIGGEN("IMON")
@@ -191,9 +163,28 @@ static int tas2764_mute(struct snd_soc_dai *dai, int mute, int direction)
{
struct tas2764_priv *tas2764 =
snd_soc_component_get_drvdata(dai->component);
+ int ret;
+
+ if (!mute) {
+ tas2764->dac_powered = true;
+ ret = tas2764_update_pwr_ctrl(tas2764);
+ if (ret)
+ return ret;
+ }
tas2764->unmuted = !mute;
- return tas2764_update_pwr_ctrl(tas2764);
+ ret = tas2764_update_pwr_ctrl(tas2764);
+ if (ret)
+ return ret;
+
+ if (mute) {
+ tas2764->dac_powered = false;
+ ret = tas2764_update_pwr_ctrl(tas2764);
+ if (ret)
+ return ret;
+ }
+
+ return 0;
}
static int tas2764_set_bitwidth(struct tas2764_priv *tas2764, int bitwidth)
diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c
index 06559f2afe32..b4b2781ad22e 100644
--- a/sound/soc/intel/boards/bytcr_rt5640.c
+++ b/sound/soc/intel/boards/bytcr_rt5640.c
@@ -431,6 +431,19 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = {
BYT_RT5640_SSP0_AIF2 |
BYT_RT5640_MCLK_EN),
},
+ { /* Acer Aspire SW3-013 */
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Aspire SW3-013"),
+ },
+ .driver_data = (void *)(BYT_RT5640_DMIC1_MAP |
+ BYT_RT5640_JD_SRC_JD2_IN4N |
+ BYT_RT5640_OVCD_TH_2000UA |
+ BYT_RT5640_OVCD_SF_0P75 |
+ BYT_RT5640_DIFF_MIC |
+ BYT_RT5640_SSP0_AIF1 |
+ BYT_RT5640_MCLK_EN),
+ },
{
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
diff --git a/sound/soc/qcom/qdsp6/q6afe-clocks.c b/sound/soc/qcom/qdsp6/q6afe-clocks.c
index acfc0c698f6a..9431656283cd 100644
--- a/sound/soc/qcom/qdsp6/q6afe-clocks.c
+++ b/sound/soc/qcom/qdsp6/q6afe-clocks.c
@@ -11,33 +11,29 @@
#include <linux/slab.h>
#include "q6afe.h"
-#define Q6AFE_CLK(id) &(struct q6afe_clk) { \
+#define Q6AFE_CLK(id) { \
.clk_id = id, \
.afe_clk_id = Q6AFE_##id, \
.name = #id, \
- .attributes = LPASS_CLK_ATTRIBUTE_COUPLE_NO, \
.rate = 19200000, \
- .hw.init = &(struct clk_init_data) { \
- .ops = &clk_q6afe_ops, \
- .name = #id, \
- }, \
}
-#define Q6AFE_VOTE_CLK(id, blkid, n) &(struct q6afe_clk) { \
+#define Q6AFE_VOTE_CLK(id, blkid, n) { \
.clk_id = id, \
.afe_clk_id = blkid, \
- .name = #n, \
- .hw.init = &(struct clk_init_data) { \
- .ops = &clk_vote_q6afe_ops, \
- .name = #id, \
- }, \
+ .name = n, \
}
-struct q6afe_clk {
- struct device *dev;
+struct q6afe_clk_init {
int clk_id;
int afe_clk_id;
char *name;
+ int rate;
+};
+
+struct q6afe_clk {
+ struct device *dev;
+ int afe_clk_id;
int attributes;
int rate;
uint32_t handle;
@@ -48,8 +44,7 @@ struct q6afe_clk {
struct q6afe_cc {
struct device *dev;
- struct q6afe_clk **clks;
- int num_clks;
+ struct q6afe_clk *clks[Q6AFE_MAX_CLK_ID];
};
static int clk_q6afe_prepare(struct clk_hw *hw)
@@ -105,7 +100,7 @@ static int clk_vote_q6afe_block(struct clk_hw *hw)
struct q6afe_clk *clk = to_q6afe_clk(hw);
return q6afe_vote_lpass_core_hw(clk->dev, clk->afe_clk_id,
- clk->name, &clk->handle);
+ clk_hw_get_name(&clk->hw), &clk->handle);
}
static void clk_unvote_q6afe_block(struct clk_hw *hw)
@@ -120,84 +115,76 @@ static const struct clk_ops clk_vote_q6afe_ops = {
.unprepare = clk_unvote_q6afe_block,
};
-struct q6afe_clk *q6afe_clks[Q6AFE_MAX_CLK_ID] = {
- [LPASS_CLK_ID_PRI_MI2S_IBIT] = Q6AFE_CLK(LPASS_CLK_ID_PRI_MI2S_IBIT),
- [LPASS_CLK_ID_PRI_MI2S_EBIT] = Q6AFE_CLK(LPASS_CLK_ID_PRI_MI2S_EBIT),
- [LPASS_CLK_ID_SEC_MI2S_IBIT] = Q6AFE_CLK(LPASS_CLK_ID_SEC_MI2S_IBIT),
- [LPASS_CLK_ID_SEC_MI2S_EBIT] = Q6AFE_CLK(LPASS_CLK_ID_SEC_MI2S_EBIT),
- [LPASS_CLK_ID_TER_MI2S_IBIT] = Q6AFE_CLK(LPASS_CLK_ID_TER_MI2S_IBIT),
- [LPASS_CLK_ID_TER_MI2S_EBIT] = Q6AFE_CLK(LPASS_CLK_ID_TER_MI2S_EBIT),
- [LPASS_CLK_ID_QUAD_MI2S_IBIT] = Q6AFE_CLK(LPASS_CLK_ID_QUAD_MI2S_IBIT),
- [LPASS_CLK_ID_QUAD_MI2S_EBIT] = Q6AFE_CLK(LPASS_CLK_ID_QUAD_MI2S_EBIT),
- [LPASS_CLK_ID_SPEAKER_I2S_IBIT] =
- Q6AFE_CLK(LPASS_CLK_ID_SPEAKER_I2S_IBIT),
- [LPASS_CLK_ID_SPEAKER_I2S_EBIT] =
- Q6AFE_CLK(LPASS_CLK_ID_SPEAKER_I2S_EBIT),
- [LPASS_CLK_ID_SPEAKER_I2S_OSR] =
- Q6AFE_CLK(LPASS_CLK_ID_SPEAKER_I2S_OSR),
- [LPASS_CLK_ID_QUI_MI2S_IBIT] = Q6AFE_CLK(LPASS_CLK_ID_QUI_MI2S_IBIT),
- [LPASS_CLK_ID_QUI_MI2S_EBIT] = Q6AFE_CLK(LPASS_CLK_ID_QUI_MI2S_EBIT),
- [LPASS_CLK_ID_SEN_MI2S_IBIT] = Q6AFE_CLK(LPASS_CLK_ID_SEN_MI2S_IBIT),
- [LPASS_CLK_ID_SEN_MI2S_EBIT] = Q6AFE_CLK(LPASS_CLK_ID_SEN_MI2S_EBIT),
- [LPASS_CLK_ID_INT0_MI2S_IBIT] = Q6AFE_CLK(LPASS_CLK_ID_INT0_MI2S_IBIT),
- [LPASS_CLK_ID_INT1_MI2S_IBIT] = Q6AFE_CLK(LPASS_CLK_ID_INT1_MI2S_IBIT),
- [LPASS_CLK_ID_INT2_MI2S_IBIT] = Q6AFE_CLK(LPASS_CLK_ID_INT2_MI2S_IBIT),
- [LPASS_CLK_ID_INT3_MI2S_IBIT] = Q6AFE_CLK(LPASS_CLK_ID_INT3_MI2S_IBIT),
- [LPASS_CLK_ID_INT4_MI2S_IBIT] = Q6AFE_CLK(LPASS_CLK_ID_INT4_MI2S_IBIT),
- [LPASS_CLK_ID_INT5_MI2S_IBIT] = Q6AFE_CLK(LPASS_CLK_ID_INT5_MI2S_IBIT),
- [LPASS_CLK_ID_INT6_MI2S_IBIT] = Q6AFE_CLK(LPASS_CLK_ID_INT6_MI2S_IBIT),
- [LPASS_CLK_ID_QUI_MI2S_OSR] = Q6AFE_CLK(LPASS_CLK_ID_QUI_MI2S_OSR),
- [LPASS_CLK_ID_PRI_PCM_IBIT] = Q6AFE_CLK(LPASS_CLK_ID_PRI_PCM_IBIT),
- [LPASS_CLK_ID_PRI_PCM_EBIT] = Q6AFE_CLK(LPASS_CLK_ID_PRI_PCM_EBIT),
- [LPASS_CLK_ID_SEC_PCM_IBIT] = Q6AFE_CLK(LPASS_CLK_ID_SEC_PCM_IBIT),
- [LPASS_CLK_ID_SEC_PCM_EBIT] = Q6AFE_CLK(LPASS_CLK_ID_SEC_PCM_EBIT),
- [LPASS_CLK_ID_TER_PCM_IBIT] = Q6AFE_CLK(LPASS_CLK_ID_TER_PCM_IBIT),
- [LPASS_CLK_ID_TER_PCM_EBIT] = Q6AFE_CLK(LPASS_CLK_ID_TER_PCM_EBIT),
- [LPASS_CLK_ID_QUAD_PCM_IBIT] = Q6AFE_CLK(LPASS_CLK_ID_QUAD_PCM_IBIT),
- [LPASS_CLK_ID_QUAD_PCM_EBIT] = Q6AFE_CLK(LPASS_CLK_ID_QUAD_PCM_EBIT),
- [LPASS_CLK_ID_QUIN_PCM_IBIT] = Q6AFE_CLK(LPASS_CLK_ID_QUIN_PCM_IBIT),
- [LPASS_CLK_ID_QUIN_PCM_EBIT] = Q6AFE_CLK(LPASS_CLK_ID_QUIN_PCM_EBIT),
- [LPASS_CLK_ID_QUI_PCM_OSR] = Q6AFE_CLK(LPASS_CLK_ID_QUI_PCM_OSR),
- [LPASS_CLK_ID_PRI_TDM_IBIT] = Q6AFE_CLK(LPASS_CLK_ID_PRI_TDM_IBIT),
- [LPASS_CLK_ID_PRI_TDM_EBIT] = Q6AFE_CLK(LPASS_CLK_ID_PRI_TDM_EBIT),
- [LPASS_CLK_ID_SEC_TDM_IBIT] = Q6AFE_CLK(LPASS_CLK_ID_SEC_TDM_IBIT),
- [LPASS_CLK_ID_SEC_TDM_EBIT] = Q6AFE_CLK(LPASS_CLK_ID_SEC_TDM_EBIT),
- [LPASS_CLK_ID_TER_TDM_IBIT] = Q6AFE_CLK(LPASS_CLK_ID_TER_TDM_IBIT),
- [LPASS_CLK_ID_TER_TDM_EBIT] = Q6AFE_CLK(LPASS_CLK_ID_TER_TDM_EBIT),
- [LPASS_CLK_ID_QUAD_TDM_IBIT] = Q6AFE_CLK(LPASS_CLK_ID_QUAD_TDM_IBIT),
- [LPASS_CLK_ID_QUAD_TDM_EBIT] = Q6AFE_CLK(LPASS_CLK_ID_QUAD_TDM_EBIT),
- [LPASS_CLK_ID_QUIN_TDM_IBIT] = Q6AFE_CLK(LPASS_CLK_ID_QUIN_TDM_IBIT),
- [LPASS_CLK_ID_QUIN_TDM_EBIT] = Q6AFE_CLK(LPASS_CLK_ID_QUIN_TDM_EBIT),
- [LPASS_CLK_ID_QUIN_TDM_OSR] = Q6AFE_CLK(LPASS_CLK_ID_QUIN_TDM_OSR),
- [LPASS_CLK_ID_MCLK_1] = Q6AFE_CLK(LPASS_CLK_ID_MCLK_1),
- [LPASS_CLK_ID_MCLK_2] = Q6AFE_CLK(LPASS_CLK_ID_MCLK_2),
- [LPASS_CLK_ID_MCLK_3] = Q6AFE_CLK(LPASS_CLK_ID_MCLK_3),
- [LPASS_CLK_ID_MCLK_4] = Q6AFE_CLK(LPASS_CLK_ID_MCLK_4),
- [LPASS_CLK_ID_INTERNAL_DIGITAL_CODEC_CORE] =
- Q6AFE_CLK(LPASS_CLK_ID_INTERNAL_DIGITAL_CODEC_CORE),
- [LPASS_CLK_ID_INT_MCLK_0] = Q6AFE_CLK(LPASS_CLK_ID_INT_MCLK_0),
- [LPASS_CLK_ID_INT_MCLK_1] = Q6AFE_CLK(LPASS_CLK_ID_INT_MCLK_1),
- [LPASS_CLK_ID_WSA_CORE_MCLK] = Q6AFE_CLK(LPASS_CLK_ID_WSA_CORE_MCLK),
- [LPASS_CLK_ID_WSA_CORE_NPL_MCLK] =
- Q6AFE_CLK(LPASS_CLK_ID_WSA_CORE_NPL_MCLK),
- [LPASS_CLK_ID_VA_CORE_MCLK] = Q6AFE_CLK(LPASS_CLK_ID_VA_CORE_MCLK),
- [LPASS_CLK_ID_TX_CORE_MCLK] = Q6AFE_CLK(LPASS_CLK_ID_TX_CORE_MCLK),
- [LPASS_CLK_ID_TX_CORE_NPL_MCLK] =
- Q6AFE_CLK(LPASS_CLK_ID_TX_CORE_NPL_MCLK),
- [LPASS_CLK_ID_RX_CORE_MCLK] = Q6AFE_CLK(LPASS_CLK_ID_RX_CORE_MCLK),
- [LPASS_CLK_ID_RX_CORE_NPL_MCLK] =
- Q6AFE_CLK(LPASS_CLK_ID_RX_CORE_NPL_MCLK),
- [LPASS_CLK_ID_VA_CORE_2X_MCLK] =
- Q6AFE_CLK(LPASS_CLK_ID_VA_CORE_2X_MCLK),
- [LPASS_HW_AVTIMER_VOTE] = Q6AFE_VOTE_CLK(LPASS_HW_AVTIMER_VOTE,
- Q6AFE_LPASS_CORE_AVTIMER_BLOCK,
- "LPASS_AVTIMER_MACRO"),
- [LPASS_HW_MACRO_VOTE] = Q6AFE_VOTE_CLK(LPASS_HW_MACRO_VOTE,
- Q6AFE_LPASS_CORE_HW_MACRO_BLOCK,
- "LPASS_HW_MACRO"),
- [LPASS_HW_DCODEC_VOTE] = Q6AFE_VOTE_CLK(LPASS_HW_DCODEC_VOTE,
- Q6AFE_LPASS_CORE_HW_DCODEC_BLOCK,
- "LPASS_HW_DCODEC"),
+static const struct q6afe_clk_init q6afe_clks[] = {
+ Q6AFE_CLK(LPASS_CLK_ID_PRI_MI2S_IBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_PRI_MI2S_EBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_SEC_MI2S_IBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_SEC_MI2S_EBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_TER_MI2S_IBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_TER_MI2S_EBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_QUAD_MI2S_IBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_QUAD_MI2S_EBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_SPEAKER_I2S_IBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_SPEAKER_I2S_EBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_SPEAKER_I2S_OSR),
+ Q6AFE_CLK(LPASS_CLK_ID_QUI_MI2S_IBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_QUI_MI2S_EBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_SEN_MI2S_IBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_SEN_MI2S_EBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_INT0_MI2S_IBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_INT1_MI2S_IBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_INT2_MI2S_IBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_INT3_MI2S_IBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_INT4_MI2S_IBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_INT5_MI2S_IBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_INT6_MI2S_IBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_QUI_MI2S_OSR),
+ Q6AFE_CLK(LPASS_CLK_ID_PRI_PCM_IBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_PRI_PCM_EBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_SEC_PCM_IBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_SEC_PCM_EBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_TER_PCM_IBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_TER_PCM_EBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_QUAD_PCM_IBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_QUAD_PCM_EBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_QUIN_PCM_IBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_QUIN_PCM_EBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_QUI_PCM_OSR),
+ Q6AFE_CLK(LPASS_CLK_ID_PRI_TDM_IBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_PRI_TDM_EBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_SEC_TDM_IBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_SEC_TDM_EBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_TER_TDM_IBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_TER_TDM_EBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_QUAD_TDM_IBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_QUAD_TDM_EBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_QUIN_TDM_IBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_QUIN_TDM_EBIT),
+ Q6AFE_CLK(LPASS_CLK_ID_QUIN_TDM_OSR),
+ Q6AFE_CLK(LPASS_CLK_ID_MCLK_1),
+ Q6AFE_CLK(LPASS_CLK_ID_MCLK_2),
+ Q6AFE_CLK(LPASS_CLK_ID_MCLK_3),
+ Q6AFE_CLK(LPASS_CLK_ID_MCLK_4),
+ Q6AFE_CLK(LPASS_CLK_ID_INTERNAL_DIGITAL_CODEC_CORE),
+ Q6AFE_CLK(LPASS_CLK_ID_INT_MCLK_0),
+ Q6AFE_CLK(LPASS_CLK_ID_INT_MCLK_1),
+ Q6AFE_CLK(LPASS_CLK_ID_WSA_CORE_MCLK),
+ Q6AFE_CLK(LPASS_CLK_ID_WSA_CORE_NPL_MCLK),
+ Q6AFE_CLK(LPASS_CLK_ID_VA_CORE_MCLK),
+ Q6AFE_CLK(LPASS_CLK_ID_TX_CORE_MCLK),
+ Q6AFE_CLK(LPASS_CLK_ID_TX_CORE_NPL_MCLK),
+ Q6AFE_CLK(LPASS_CLK_ID_RX_CORE_MCLK),
+ Q6AFE_CLK(LPASS_CLK_ID_RX_CORE_NPL_MCLK),
+ Q6AFE_CLK(LPASS_CLK_ID_VA_CORE_2X_MCLK),
+ Q6AFE_VOTE_CLK(LPASS_HW_AVTIMER_VOTE,
+ Q6AFE_LPASS_CORE_AVTIMER_BLOCK,
+ "LPASS_AVTIMER_MACRO"),
+ Q6AFE_VOTE_CLK(LPASS_HW_MACRO_VOTE,
+ Q6AFE_LPASS_CORE_HW_MACRO_BLOCK,
+ "LPASS_HW_MACRO"),
+ Q6AFE_VOTE_CLK(LPASS_HW_DCODEC_VOTE,
+ Q6AFE_LPASS_CORE_HW_DCODEC_BLOCK,
+ "LPASS_HW_DCODEC"),
};
static struct clk_hw *q6afe_of_clk_hw_get(struct of_phandle_args *clkspec,
@@ -207,7 +194,7 @@ static struct clk_hw *q6afe_of_clk_hw_get(struct of_phandle_args *clkspec,
unsigned int idx = clkspec->args[0];
unsigned int attr = clkspec->args[1];
- if (idx >= cc->num_clks || attr > LPASS_CLK_ATTRIBUTE_COUPLE_DIVISOR) {
+ if (idx >= Q6AFE_MAX_CLK_ID || attr > LPASS_CLK_ATTRIBUTE_COUPLE_DIVISOR) {
dev_err(cc->dev, "Invalid clk specifier (%d, %d)\n", idx, attr);
return ERR_PTR(-EINVAL);
}
@@ -230,20 +217,36 @@ static int q6afe_clock_dev_probe(struct platform_device *pdev)
if (!cc)
return -ENOMEM;
- cc->clks = &q6afe_clks[0];
- cc->num_clks = ARRAY_SIZE(q6afe_clks);
+ cc->dev = dev;
for (i = 0; i < ARRAY_SIZE(q6afe_clks); i++) {
- if (!q6afe_clks[i])
- continue;
+ unsigned int id = q6afe_clks[i].clk_id;
+ struct clk_init_data init = {
+ .name = q6afe_clks[i].name,
+ };
+ struct q6afe_clk *clk;
+
+ clk = devm_kzalloc(dev, sizeof(*clk), GFP_KERNEL);
+ if (!clk)
+ return -ENOMEM;
+
+ clk->dev = dev;
+ clk->afe_clk_id = q6afe_clks[i].afe_clk_id;
+ clk->rate = q6afe_clks[i].rate;
+ clk->hw.init = &init;
+
+ if (clk->rate)
+ init.ops = &clk_q6afe_ops;
+ else
+ init.ops = &clk_vote_q6afe_ops;
- q6afe_clks[i]->dev = dev;
+ cc->clks[id] = clk;
- ret = devm_clk_hw_register(dev, &q6afe_clks[i]->hw);
+ ret = devm_clk_hw_register(dev, &clk->hw);
if (ret)
return ret;
}
- ret = of_clk_add_hw_provider(dev->of_node, q6afe_of_clk_hw_get, cc);
+ ret = devm_of_clk_add_hw_provider(dev, q6afe_of_clk_hw_get, cc);
if (ret)
return ret;
diff --git a/sound/soc/qcom/qdsp6/q6afe.c b/sound/soc/qcom/qdsp6/q6afe.c
index 0ca1e4aae518..7be495336446 100644
--- a/sound/soc/qcom/qdsp6/q6afe.c
+++ b/sound/soc/qcom/qdsp6/q6afe.c
@@ -1681,7 +1681,7 @@ int q6afe_unvote_lpass_core_hw(struct device *dev, uint32_t hw_block_id,
EXPORT_SYMBOL(q6afe_unvote_lpass_core_hw);
int q6afe_vote_lpass_core_hw(struct device *dev, uint32_t hw_block_id,
- char *client_name, uint32_t *client_handle)
+ const char *client_name, uint32_t *client_handle)
{
struct q6afe *afe = dev_get_drvdata(dev->parent);
struct afe_cmd_remote_lpass_core_hw_vote_request *vote_cfg;
diff --git a/sound/soc/qcom/qdsp6/q6afe.h b/sound/soc/qcom/qdsp6/q6afe.h
index 22e10269aa10..3845b56c0ed3 100644
--- a/sound/soc/qcom/qdsp6/q6afe.h
+++ b/sound/soc/qcom/qdsp6/q6afe.h
@@ -236,7 +236,7 @@ int q6afe_port_set_sysclk(struct q6afe_port *port, int clk_id,
int q6afe_set_lpass_clock(struct device *dev, int clk_id, int clk_src,
int clk_root, unsigned int freq);
int q6afe_vote_lpass_core_hw(struct device *dev, uint32_t hw_block_id,
- char *client_name, uint32_t *client_handle);
+ const char *client_name, uint32_t *client_handle);
int q6afe_unvote_lpass_core_hw(struct device *dev, uint32_t hw_block_id,
uint32_t client_handle);
#endif /* __Q6AFE_H__ */
diff --git a/sound/soc/soc-dai.c b/sound/soc/soc-dai.c
index 4705c3da6280..f9aba413e495 100644
--- a/sound/soc/soc-dai.c
+++ b/sound/soc/soc-dai.c
@@ -208,10 +208,11 @@ int snd_soc_dai_set_tdm_slot(struct snd_soc_dai *dai,
if (dai->driver->ops &&
dai->driver->ops->xlate_tdm_slot_mask)
- dai->driver->ops->xlate_tdm_slot_mask(slots,
- &tx_mask, &rx_mask);
+ ret = dai->driver->ops->xlate_tdm_slot_mask(slots, &tx_mask, &rx_mask);
else
- snd_soc_xlate_tdm_slot_mask(slots, &tx_mask, &rx_mask);
+ ret = snd_soc_xlate_tdm_slot_mask(slots, &tx_mask, &rx_mask);
+ if (ret)
+ goto err;
dai->tx_mask = tx_mask;
dai->rx_mask = rx_mask;
@@ -220,6 +221,7 @@ int snd_soc_dai_set_tdm_slot(struct snd_soc_dai *dai,
dai->driver->ops->set_tdm_slot)
ret = dai->driver->ops->set_tdm_slot(dai, tx_mask, rx_mask,
slots, slot_width);
+err:
return soc_dai_ret(dai, ret);
}
EXPORT_SYMBOL_GPL(snd_soc_dai_set_tdm_slot);
diff --git a/sound/soc/soc-ops.c b/sound/soc/soc-ops.c
index a83cd8d8a963..55f7c7999330 100644
--- a/sound/soc/soc-ops.c
+++ b/sound/soc/soc-ops.c
@@ -615,6 +615,33 @@ int snd_soc_get_volsw_range(struct snd_kcontrol *kcontrol,
}
EXPORT_SYMBOL_GPL(snd_soc_get_volsw_range);
+static int snd_soc_clip_to_platform_max(struct snd_kcontrol *kctl)
+{
+ struct soc_mixer_control *mc = (struct soc_mixer_control *)kctl->private_value;
+ struct snd_ctl_elem_value uctl;
+ int ret;
+
+ if (!mc->platform_max)
+ return 0;
+
+ ret = kctl->get(kctl, &uctl);
+ if (ret < 0)
+ return ret;
+
+ if (uctl.value.integer.value[0] > mc->platform_max)
+ uctl.value.integer.value[0] = mc->platform_max;
+
+ if (snd_soc_volsw_is_stereo(mc) &&
+ uctl.value.integer.value[1] > mc->platform_max)
+ uctl.value.integer.value[1] = mc->platform_max;
+
+ ret = kctl->put(kctl, &uctl);
+ if (ret < 0)
+ return ret;
+
+ return 0;
+}
+
/**
* snd_soc_limit_volume - Set new limit to an existing volume control.
*
@@ -640,7 +667,7 @@ int snd_soc_limit_volume(struct snd_soc_card *card,
mc = (struct soc_mixer_control *)kctl->private_value;
if (max <= mc->max) {
mc->platform_max = max;
- ret = 0;
+ ret = snd_soc_clip_to_platform_max(kctl);
}
}
return ret;
diff --git a/sound/usb/format.c b/sound/usb/format.c
index 552094012c49..593f1acd8fd3 100644
--- a/sound/usb/format.c
+++ b/sound/usb/format.c
@@ -251,7 +251,8 @@ static int parse_audio_format_rates_v1(struct snd_usb_audio *chip, struct audiof
}
/* Jabra Evolve 65 headset */
- if (chip->usb_id == USB_ID(0x0b0e, 0x030b)) {
+ if (chip->usb_id == USB_ID(0x0b0e, 0x030b) ||
+ chip->usb_id == USB_ID(0x0b0e, 0x030c)) {
/* only 48kHz for playback while keeping 16kHz for capture */
if (fp->nr_rates != 1)
return set_fixed_rate(fp, 48000, SNDRV_PCM_RATE_48000);
diff --git a/tools/bpf/bpftool/common.c b/tools/bpf/bpftool/common.c
index eefa2b34e641..33065b17900f 100644
--- a/tools/bpf/bpftool/common.c
+++ b/tools/bpf/bpftool/common.c
@@ -311,10 +311,11 @@ int get_fd_type(int fd)
p_err("can't read link type: %s", strerror(errno));
return -1;
}
- if (n == sizeof(path)) {
+ if (n == sizeof(buf)) {
p_err("can't read link type: path too long!");
return -1;
}
+ buf[n] = '\0';
if (strstr(buf, "bpf-map"))
return BPF_OBJ_MAP;
diff --git a/tools/build/Makefile.build b/tools/build/Makefile.build
index cd72016c3cfa..ab0630ae6be8 100644
--- a/tools/build/Makefile.build
+++ b/tools/build/Makefile.build
@@ -130,6 +130,10 @@ objprefix := $(subst ./,,$(OUTPUT)$(dir)/)
obj-y := $(addprefix $(objprefix),$(obj-y))
subdir-obj-y := $(addprefix $(objprefix),$(subdir-obj-y))
+# Separate out test log files from real build objects.
+test-y := $(filter %_log, $(obj-y))
+obj-y := $(filter-out %_log, $(obj-y))
+
# Final '$(obj)-in.o' object
in-target := $(objprefix)$(obj)-in.o
@@ -140,7 +144,7 @@ $(subdir-y):
$(sort $(subdir-obj-y)): $(subdir-y) ;
-$(in-target): $(obj-y) FORCE
+$(in-target): $(obj-y) $(test-y) FORCE
$(call rule_mkdir)
$(call if_changed,$(host)ld_multi)
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index 33cdcfe10634..f65e03e7cf94 100644
--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf/libbpf.c
@@ -1503,7 +1503,7 @@ static int set_kcfg_value_str(struct extern_desc *ext, char *ext_val,
}
len = strlen(value);
- if (value[len - 1] != '"') {
+ if (len < 2 || value[len - 1] != '"') {
pr_warn("extern (kcfg) '%s': invalid string config '%s'\n",
ext->name, value);
return -EINVAL;
diff --git a/tools/testing/selftests/vm/compaction_test.c b/tools/testing/selftests/vm/compaction_test.c
index 7c260060a1a6..00ebd9d508ff 100644
--- a/tools/testing/selftests/vm/compaction_test.c
+++ b/tools/testing/selftests/vm/compaction_test.c
@@ -89,6 +89,8 @@ int check_compaction(unsigned long mem_free, unsigned long hugepage_size)
int compaction_index = 0;
char initial_nr_hugepages[20] = {0};
char nr_hugepages[20] = {0};
+ char target_nr_hugepages[24] = {0};
+ int slen;
/* We want to test with 80% of available memory. Else, OOM killer comes
in to play */
@@ -118,11 +120,18 @@ int check_compaction(unsigned long mem_free, unsigned long hugepage_size)
lseek(fd, 0, SEEK_SET);
- /* Request a large number of huge pages. The Kernel will allocate
- as much as it can */
- if (write(fd, "100000", (6*sizeof(char))) != (6*sizeof(char))) {
- ksft_test_result_fail("Failed to write 100000 to /proc/sys/vm/nr_hugepages: %s\n",
- strerror(errno));
+ /*
+ * Request huge pages for about half of the free memory. The Kernel
+ * will allocate as much as it can, and we expect it will get at least 1/3
+ */
+ nr_hugepages_ul = mem_free / hugepage_size / 2;
+ snprintf(target_nr_hugepages, sizeof(target_nr_hugepages),
+ "%lu", nr_hugepages_ul);
+
+ slen = strlen(target_nr_hugepages);
+ if (write(fd, target_nr_hugepages, slen) != slen) {
+ ksft_test_result_fail("Failed to write %lu to /proc/sys/vm/nr_hugepages: %s\n",
+ nr_hugepages_ul, strerror(errno));
goto close_fd;
}
Return-Path: <linux-kernel+bounces-673237-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 6355041E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:08:23 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 0259B7A9C2C
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:07:03 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 40D2B28FAA0;
Wed, 4 Jun 2025 13:07:17 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="sY53joT4"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 56A6E28F53F;
Wed, 4 Jun 2025 13:07:14 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749042434; cv=none; b=LctZKONaLT/ERmGrCZgJLiRlFMphyYTCsPJuC/ju9pTuZ+Sc7d3VkuNg20t41pUfdvXwq7sMhmwJhOgwrUJDF+uiQBjHM+5hrjUBiJpI3ZT8bcc97/t3PqRJ5JG4uX54CVZOgZv4mgdD2VCEDjAWiNgZO8YI2tIBh9gmLqysJzg=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749042434; c=relaxed/simple;
bh=qAuqGJ6n0PXxXmEWJzzaRYWljesroHgVB8cYB5nmskM=;
h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=mifoZxl64dqff0Eb7P59CDSHE9swl5pRv9fAZbYnUBMnYHMiAYnbHosOiTVwL974RgVz9xydans9gujjvpmFMrt6R4LcZalWLU6HuA6WXvCFljp82/d2Rpxc8oe2hBqNcA1S5oRruggMLze+fYLMDUT5bAWEr0MXPUd6xiH0by0=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=sY53joT4; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id A5033C4CEE7;
Wed, 4 Jun 2025 13:07:13 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org;
s=korg; t=1749042434;
bh=qAuqGJ6n0PXxXmEWJzzaRYWljesroHgVB8cYB5nmskM=;
h=From:To:Cc:Subject:Date:From;
b=sY53joT4gMgPLdIs+6p3ggdMiBS2nPBTgbTYyugk0qgIL819nn3y1lTuRzBCKzI9T
pk2rp7UxI0iNkCys9BEasanO84xGVU7tvs2IzSddkCuaQrkrvrc1PV3NMLc9Ov4eS9
rk/GT8sajlzPoBHIGvNWkHysJ40ucWOAy3iGEBPI=
From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
To: linux-kernel@xxxxxxxxxxxxxxx,
akpm@xxxxxxxxxxxxxxxxxxxx,
torvalds@xxxxxxxxxxxxxxxxxxxx,
stable@xxxxxxxxxxxxxxx
Cc: lwn@xxxxxxx,
jslaby@xxxxxxx,
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Subject: Linux 6.1.141
Date: Wed, 4 Jun 2025 15:07:09 +0200
Message-ID: <2025060410-directory-replace-61df@gregkh>
X-Mailer: git-send-email 2.49.0
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
I'm announcing the release of the 6.1.141 kernel.
All users of the 6.1 kernel series must upgrade.
The updated 6.1.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.1.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/admin-guide/kernel-parameters.txt | 2
Documentation/driver-api/serial/driver.rst | 2
Documentation/hwmon/dell-smm-hwmon.rst | 14
Makefile | 14
arch/arm/boot/dts/tegra114.dtsi | 2
arch/arm/mach-at91/pm.c | 21
arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts | 38
arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts | 14
arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi | 22
arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi | 2
arch/arm64/boot/dts/qcom/sm8350.dtsi | 2
arch/arm64/include/asm/cputype.h | 2
arch/arm64/include/asm/pgtable.h | 3
arch/arm64/kernel/proton-pack.c | 1
arch/mips/include/asm/ftrace.h | 16
arch/mips/kernel/pm-cps.c | 30
arch/powerpc/kernel/prom_init.c | 4
arch/powerpc/perf/core-book3s.c | 20
arch/powerpc/perf/isa207-common.c | 4
arch/um/Makefile | 1
arch/um/kernel/mem.c | 1
arch/x86/boot/genimage.sh | 5
arch/x86/events/amd/ibs.c | 3
arch/x86/include/asm/nmi.h | 2
arch/x86/include/asm/perf_event.h | 1
arch/x86/kernel/cpu/bugs.c | 10
arch/x86/kernel/nmi.c | 42
arch/x86/kernel/reboot.c | 10
arch/x86/mm/init.c | 9
arch/x86/mm/init_64.c | 15
arch/x86/mm/kaslr.c | 10
arch/x86/um/os-Linux/mcontext.c | 3
crypto/algif_hash.c | 4
crypto/lzo-rle.c | 2
crypto/lzo.c | 2
drivers/acpi/Kconfig | 2
drivers/acpi/hed.c | 7
drivers/auxdisplay/charlcd.c | 5
drivers/auxdisplay/charlcd.h | 5
drivers/auxdisplay/hd44780.c | 2
drivers/auxdisplay/lcd2s.c | 2
drivers/auxdisplay/panel.c | 2
drivers/clk/imx/clk-imx8mp.c | 151 ++
drivers/clk/qcom/camcc-sm8250.c | 56
drivers/clk/qcom/clk-alpha-pll.c | 52
drivers/clk/sunxi-ng/ccu-sun20i-d1.c | 44
drivers/clk/sunxi-ng/ccu_mp.h | 22
drivers/clocksource/mips-gic-timer.c | 6
drivers/cpufreq/tegra186-cpufreq.c | 7
drivers/cpuidle/governors/menu.c | 13
drivers/crypto/marvell/octeontx2/otx2_cptvf_reqmgr.c | 7
drivers/dma/idxd/cdev.c | 128 +
drivers/dma/idxd/idxd.h | 7
drivers/dma/idxd/init.c | 2
drivers/dma/idxd/sysfs.c | 1
drivers/edac/ie31200_edac.c | 28
drivers/firmware/arm_ffa/bus.c | 1
drivers/fpga/altera-cvp.c | 2
drivers/gpio/gpio-pca953x.c | 114 -
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 30
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 7
drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 10
drivers/gpu/drm/amd/amdkfd/kfd_process.c | 16
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c | 20
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c | 13
drivers/gpu/drm/amd/display/dc/core/dc.c | 1
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c | 11
drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c | 42
drivers/gpu/drm/ast/ast_mode.c | 10
drivers/gpu/drm/drm_atomic_helper.c | 28
drivers/gpu/drm/drm_edid.c | 1
drivers/gpu/drm/mediatek/mtk_dpi.c | 5
drivers/gpu/drm/panel/panel-edp.c | 1
drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 6
drivers/hid/hid-ids.h | 4
drivers/hid/hid-quirks.c | 2
drivers/hid/usbhid/usbkbd.c | 2
drivers/hwmon/dell-smm-hwmon.c | 5
drivers/hwmon/gpio-fan.c | 16
drivers/hwmon/xgene-hwmon.c | 2
drivers/i2c/busses/i2c-pxa.c | 5
drivers/i2c/busses/i2c-qup.c | 36
drivers/i3c/master/svc-i3c-master.c | 4
drivers/infiniband/core/umem.c | 36
drivers/infiniband/core/uverbs_cmd.c | 144 +-
drivers/infiniband/core/verbs.c | 11
drivers/iommu/amd/io_pgtable_v2.c | 2
drivers/iommu/dma-iommu.c | 28
drivers/leds/rgb/leds-pwm-multicolor.c | 5
drivers/mailbox/mailbox.c | 7
drivers/md/dm-cache-target.c | 24
drivers/md/dm-table.c | 4
drivers/md/dm.c | 8
drivers/media/i2c/adv7180.c | 34
drivers/media/platform/qcom/camss/camss-csid.c | 60
drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.c | 3
drivers/media/test-drivers/vivid/vivid-kthread-cap.c | 11
drivers/media/test-drivers/vivid/vivid-kthread-out.c | 11
drivers/media/test-drivers/vivid/vivid-kthread-touch.c | 11
drivers/media/test-drivers/vivid/vivid-sdr-cap.c | 11
drivers/media/usb/cx231xx/cx231xx-417.c | 2
drivers/media/usb/uvc/uvc_v4l2.c | 6
drivers/mmc/host/dw_mmc-exynos.c | 41
drivers/mmc/host/sdhci-pci-core.c | 6
drivers/mmc/host/sdhci.c | 9
drivers/net/bonding/bond_main.c | 2
drivers/net/can/c_can/c_can_platform.c | 2
drivers/net/can/slcan/slcan-core.c | 26
drivers/net/ethernet/apm/xgene-v2/main.c | 4
drivers/net/ethernet/freescale/enetc/enetc.c | 16
drivers/net/ethernet/intel/ice/ice_ethtool.c | 3
drivers/net/ethernet/intel/ice/ice_virtchnl.c | 1
drivers/net/ethernet/marvell/octeontx2/Kconfig | 1
drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c | 24
drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c | 11
drivers/net/ethernet/marvell/octeontx2/nic/cn10k.c | 6
drivers/net/ethernet/marvell/octeontx2/nic/cn10k.h | 2
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c | 130 +
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h | 9
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 18
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c | 49
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.h | 7
drivers/net/ethernet/marvell/octeontx2/nic/qos_sq.c | 2
drivers/net/ethernet/mediatek/mtk_ppe_offload.c | 22
drivers/net/ethernet/mellanox/mlx4/alloc.c | 6
drivers/net/ethernet/mellanox/mlx4/en_tx.c | 2
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 5
drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c | 3
drivers/net/ethernet/mellanox/mlx5/core/events.c | 11
drivers/net/ethernet/mellanox/mlx5/core/health.c | 1
drivers/net/ethernet/microchip/lan743x_main.c | 19
drivers/net/ethernet/microsoft/mana/gdma_main.c | 2
drivers/net/ethernet/realtek/r8169_main.c | 1
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 2
drivers/net/ethernet/ti/am65-cpsw-nuss.c | 2
drivers/net/ethernet/ti/cpsw_new.c | 1
drivers/net/ieee802154/ca8210.c | 9
drivers/net/phy/phylink.c | 2
drivers/net/usb/r8152.c | 1
drivers/net/vxlan/vxlan_core.c | 36
drivers/net/wireless/ath/ath9k/init.c | 4
drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 2
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 17
drivers/net/wireless/realtek/rtw88/main.c | 40
drivers/net/wireless/realtek/rtw88/reg.h | 3
drivers/net/wireless/realtek/rtw88/rtw8822b.c | 14
drivers/net/wireless/realtek/rtw88/util.c | 3
drivers/net/wireless/realtek/rtw89/fw.c | 2
drivers/net/wireless/realtek/rtw89/regd.c | 2
drivers/net/wireless/realtek/rtw89/ser.c | 4
drivers/nvdimm/label.c | 3
drivers/nvme/host/pci.c | 2
drivers/nvme/target/tcp.c | 3
drivers/pci/Kconfig | 6
drivers/pci/controller/dwc/pcie-designware-ep.c | 2
drivers/pci/controller/pcie-brcmstb.c | 5
drivers/pci/controller/vmd.c | 20
drivers/pci/setup-bus.c | 6
drivers/perf/arm-cmn.c | 10
drivers/phy/phy-core.c | 7
drivers/phy/renesas/phy-rcar-gen3-usb2.c | 143 +-
drivers/pinctrl/bcm/pinctrl-bcm281xx.c | 44
drivers/pinctrl/devicetree.c | 10
drivers/pinctrl/meson/pinctrl-meson.c | 2
drivers/pinctrl/tegra/pinctrl-tegra.c | 59
drivers/pinctrl/tegra/pinctrl-tegra.h | 6
drivers/platform/x86/dell/dell-wmi-sysman/passobj-attributes.c | 2
drivers/platform/x86/fujitsu-laptop.c | 33
drivers/platform/x86/thinkpad_acpi.c | 7
drivers/regulator/ad5398.c | 12
drivers/remoteproc/qcom_wcnss.c | 34
drivers/rtc/rtc-ds1307.c | 4
drivers/rtc/rtc-rv3032.c | 2
drivers/s390/crypto/vfio_ap_ops.c | 72 -
drivers/scsi/lpfc/lpfc_hbadisc.c | 17
drivers/scsi/lpfc/lpfc_init.c | 2
drivers/scsi/mpi3mr/mpi3mr_fw.c | 3
drivers/scsi/mpt3sas/mpt3sas_ctl.c | 12
drivers/scsi/st.c | 29
drivers/scsi/st.h | 2
drivers/soc/apple/rtkit-internal.h | 1
drivers/soc/apple/rtkit.c | 58
drivers/soc/imx/gpcv2.c | 2
drivers/soc/ti/k3-socinfo.c | 13
drivers/spi/spi-fsl-dspi.c | 46
drivers/spi/spi-sun4i.c | 5
drivers/spi/spi-zynqmp-gqspi.c | 20
drivers/target/iscsi/iscsi_target.c | 2
drivers/thermal/qoriq_thermal.c | 13
drivers/thunderbolt/retimer.c | 8
drivers/tty/serial/8250/8250_port.c | 2
drivers/tty/serial/atmel_serial.c | 2
drivers/tty/serial/imx.c | 2
drivers/tty/serial/serial_mctrl_gpio.c | 34
drivers/tty/serial/serial_mctrl_gpio.h | 17
drivers/tty/serial/sh-sci.c | 98 +
drivers/tty/serial/stm32-usart.c | 2
drivers/vfio/pci/vfio_pci_config.c | 3
drivers/vfio/pci/vfio_pci_core.c | 10
drivers/vfio/pci/vfio_pci_intrs.c | 2
drivers/video/fbdev/core/bitblit.c | 5
drivers/video/fbdev/core/fbcon.c | 10
drivers/video/fbdev/core/fbcon.h | 38
drivers/video/fbdev/core/fbcon_ccw.c | 5
drivers/video/fbdev/core/fbcon_cw.c | 5
drivers/video/fbdev/core/fbcon_ud.c | 5
drivers/video/fbdev/core/tileblit.c | 45
drivers/video/fbdev/fsl-diu-fb.c | 1
drivers/virtio/virtio_ring.c | 2
drivers/xen/platform-pci.c | 4
drivers/xen/xenbus/xenbus_probe.c | 14
fs/btrfs/block-group.c | 18
fs/btrfs/discard.c | 34
fs/btrfs/disk-io.c | 28
fs/btrfs/extent_io.c | 7
fs/btrfs/relocation.c | 6
fs/btrfs/send.c | 6
fs/coredump.c | 81 +
fs/dlm/lowcomms.c | 4
fs/ext4/balloc.c | 4
fs/ext4/super.c | 12
fs/fuse/dir.c | 2
fs/gfs2/glock.c | 11
fs/namespace.c | 6
fs/nfs/client.c | 2
fs/nfs/delegation.c | 3
fs/nfs/dir.c | 15
fs/nfs/filelayout/filelayoutdev.c | 6
fs/nfs/flexfilelayout/flexfilelayout.c | 1
fs/nfs/flexfilelayout/flexfilelayoutdev.c | 6
fs/nfs/inode.c | 2
fs/nfs/internal.h | 5
fs/nfs/nfs3proc.c | 2
fs/nfs/nfs4proc.c | 9
fs/nfs/nfs4state.c | 10
fs/nfs/pnfs.h | 4
fs/nfs/pnfs_nfs.c | 9
fs/orangefs/inode.c | 7
fs/smb/client/cifsproto.h | 3
fs/smb/client/connect.c | 30
fs/smb/client/link.c | 8
fs/smb/client/readdir.c | 7
fs/smb/client/smb1ops.c | 7
fs/smb/client/smb2file.c | 11
fs/smb/client/smb2ops.c | 3
fs/smb/client/transport.c | 2
fs/smb/server/vfs.c | 14
include/drm/drm_atomic.h | 23
include/linux/coredump.h | 1
include/linux/dma-mapping.h | 12
include/linux/hrtimer.h | 1
include/linux/ipv6.h | 1
include/linux/lzo.h | 8
include/linux/mlx4/device.h | 2
include/linux/msi.h | 33
include/linux/nfs_fs_sb.h | 12
include/linux/perf_event.h | 8
include/linux/pid.h | 1
include/linux/rcupdate.h | 2
include/linux/rcutree.h | 2
include/linux/trace.h | 4
include/linux/trace_seq.h | 8
include/linux/usb/r8152.h | 1
include/net/af_unix.h | 48
include/net/scm.h | 11
include/net/xfrm.h | 1
include/rdma/uverbs_std_types.h | 2
include/sound/hda_codec.h | 1
include/sound/pcm.h | 2
include/trace/events/btrfs.h | 2
io_uring/fdinfo.c | 4
io_uring/io_uring.c | 1
kernel/bpf/hashtab.c | 2
kernel/bpf/syscall.c | 4
kernel/cgroup/cgroup.c | 2
kernel/events/core.c | 33
kernel/events/hw_breakpoint.c | 5
kernel/events/ring_buffer.c | 1
kernel/fork.c | 98 +
kernel/padata.c | 3
kernel/pid.c | 19
kernel/rcu/tree_plugin.h | 22
kernel/softirq.c | 18
kernel/time/hrtimer.c | 103 +
kernel/time/posix-timers.c | 1
kernel/time/timer_list.c | 4
kernel/trace/trace.c | 11
kernel/trace/trace.h | 16
lib/dynamic_queue_limits.c | 2
lib/lzo/Makefile | 2
lib/lzo/lzo1x_compress.c | 102 +
lib/lzo/lzo1x_compress_safe.c | 18
mm/memcontrol.c | 6
mm/page_alloc.c | 8
net/Makefile | 2
net/bluetooth/l2cap_core.c | 15
net/bridge/br_nf_core.c | 7
net/bridge/br_private.h | 1
net/can/bcm.c | 79 -
net/core/pktgen.c | 13
net/core/scm.c | 17
net/ipv4/esp4.c | 49
net/ipv4/fib_frontend.c | 18
net/ipv4/fib_rules.c | 4
net/ipv4/fib_trie.c | 22
net/ipv4/inet_hashtables.c | 37
net/ipv4/tcp_input.c | 56
net/ipv6/esp6.c | 49
net/ipv6/fib6_rules.c | 4
net/ipv6/ip6_output.c | 9
net/llc/af_llc.c | 8
net/mac80211/mlme.c | 4
net/netfilter/nf_conntrack_standalone.c | 12
net/sched/sch_hfsc.c | 15
net/smc/smc_pnet.c | 8
net/sunrpc/clnt.c | 3
net/sunrpc/rpcb_clnt.c | 5
net/sunrpc/sched.c | 2
net/tipc/crypto.c | 5
net/unix/Kconfig | 11
net/unix/Makefile | 2
net/unix/af_unix.c | 120 +
net/unix/garbage.c | 691 ++++++----
net/unix/scm.c | 154 --
net/unix/scm.h | 10
net/xfrm/xfrm_policy.c | 3
net/xfrm/xfrm_state.c | 6
samples/bpf/Makefile | 2
scripts/config | 26
scripts/kconfig/merge_config.sh | 4
security/smack/smackfs.c | 4
sound/core/oss/pcm_oss.c | 3
sound/core/pcm_native.c | 11
sound/core/seq/seq_clientmgr.c | 5
sound/core/seq/seq_memory.c | 1
sound/pci/hda/hda_beep.c | 15
sound/pci/hda/patch_realtek.c | 77 +
sound/soc/codecs/mt6359-accdet.h | 9
sound/soc/codecs/pcm3168a.c | 6
sound/soc/codecs/tas2764.c | 53
sound/soc/fsl/imx-card.c | 2
sound/soc/intel/boards/bytcr_rt5640.c | 13
sound/soc/qcom/sm8250.c | 3
sound/soc/soc-dai.c | 8
sound/soc/soc-ops.c | 29
sound/soc/sunxi/sun4i-codec.c | 53
tools/bpf/bpftool/common.c | 3
tools/build/Makefile.build | 6
tools/lib/bpf/libbpf.c | 2
tools/objtool/check.c | 11
tools/testing/kunit/qemu_configs/x86_64.py | 4
tools/testing/selftests/bpf/prog_tests/sockmap_ktls.c | 1
tools/testing/selftests/net/gro.sh | 3
354 files changed, 4184 insertions(+), 1986 deletions(-)
Aaron Kling (1):
cpufreq: tegra186: Share policy per cluster
Ahmad Fatoum (2):
clk: imx8mp: inform CCF of maximum frequency of clocks
pmdomain: imx: gpcv2: use proper helper for property detection
Al Viro (1):
__legitimize_mnt(): check for MNT_SYNC_UMOUNT should be under mount_lock
Aleksander Jan Bajkowski (1):
r8152: add vendor/device ID pair for Dell Alienware AW1022z
Alessandro Grassi (1):
spi: spi-sun4i: fix early activation
Alex Deucher (1):
drm/amd/display/dm: drop hw_support check in amdgpu_dm_i2c_xfer()
Alex Williamson (1):
vfio/pci: Handle INTx IRQ_NOTCONNECTED
Alexander Mikhalitsyn (1):
af_unix: Kconfig: make CONFIG_UNIX bool
Alexander Stein (1):
hwmon: (gpio-fan) Add missing mutex locks
Alexander Sverdlin (1):
net: ethernet: ti: cpsw_new: populate netdev of_node
Alexandre Belloni (2):
rtc: rv3032: fix EERD location
rtc: ds1307: stop disabling alarms on probe
Alexei Lazar (1):
net/mlx5: Extend Ethtool loopback selftest to support non-linear SKB
Alexey Klimov (1):
ASoC: qcom: sm8250: explicitly set format in sm8250_be_hw_params_fixup()
Alexis Lothoré (1):
serial: mctrl_gpio: split disable_ms into sync and no_sync APIs
Alice Guo (1):
thermal/drivers/qoriq: Power down TMU on system suspend
Alistair Francis (1):
nvmet-tcp: don't restore null sk_state_change
Alok Tiwari (1):
arm64: dts: qcom: sm8350: Fix typo in pil_camera_mem node
Andre Przywara (1):
clk: sunxi-ng: d1: Add missing divider for MMC mod clocks
Andreas Gruenbacher (1):
gfs2: Check for empty queue in run_queue
Andreas Schwab (1):
powerpc/prom_init: Fixup missing #size-cells on PowerBook6,7
Andrew Davis (1):
soc: ti: k3-socinfo: Do not use syscon helper to build regmap
Andrey Vatoropin (1):
hwmon: (xgene-hwmon) use appropriate type for the latency value
Andy Shevchenko (6):
gpio: pca953x: Add missing header(s)
gpio: pca953x: Split pca953x_restore_context() and pca953x_save_context()
gpio: pca953x: Simplify code with cleanup helpers
tracing: Mark binary printing functions with __printf() attribute
auxdisplay: charlcd: Partially revert "Move hwidth and bwidth to struct hd44780_common"
ieee802154: ca8210: Use proper setters and getters for bitwise types
Andy Yan (1):
drm/rockchip: vop2: Add uv swap for cluster window
AngeloGioacchino Del Regno (1):
drm/mediatek: mtk_dpi: Add checks for reg_h_fre_con existence
Ankur Arora (3):
rcu: handle quiescent states for PREEMPT_RCU=n, PREEMPT_COUNT=y
rcu: handle unstable rdp in rcu_read_unlock_strict()
rcu: fix header guard for rcu_all_qs()
Anthony Krowiak (1):
s390/vfio-ap: Fix no AP queue sharing allowed message written to kernel log
Arnd Bergmann (2):
net: xgene-v2: remove incorrect ACPI_PTR annotation
EDAC/ie31200: work around false positive build warning
Artur Weber (1):
pinctrl: bcm281xx: Use "unsigned int" instead of bare "unsigned"
Athira Rajeev (1):
arch/powerpc/perf: Check the instruction type before creating sample with perf_mem_data_src
Balbir Singh (2):
x86/kaslr: Reduce KASLR entropy on most x86 systems
x86/mm/init: Handle the special case of device private pages in add_pages(), to not increase max_pfn and trigger dma_addressing_limited() bounce buffers bounce buffers
Baokun Li (1):
ext4: reject the 'data_err=abort' option in nojournal mode
Benjamin Berg (1):
um: Store full CSGSFS and SS register from mcontext
Bibo Mao (1):
MIPS: Use arch specific syscall name match function
Bitterblue Smith (5):
wifi: rtw88: Fix rtw_init_vht_cap() for RTL8814AU
wifi: rtw88: Fix rtw_init_ht_cap() for RTL8814AU
wifi: rtw88: Fix rtw_desc_to_mcsrate() to handle MCS16-31
wifi: rtw88: Fix download_firmware_validate() for RTL8814AU
wifi: rtw88: Don't use static local variable in rtw8822b_set_tx_power_index_by_rate
Bogdan-Gabriel Roman (1):
spi: spi-fsl-dspi: Halt the module after a new message transfer
Boris Burkov (2):
btrfs: make btrfs_discard_workfn() block_group ref explicit
btrfs: check folio mapping after unlock in relocate_one_folio()
Brandon Kammerdiener (1):
bpf: fix possible endless loop in BPF map iteration
Brendan Jackman (1):
kunit: tool: Use qboot on QEMU x86_64
Breno Leitao (2):
x86/bugs: Make spectre user default depend on MITIGATION_SPECTRE_V2
memcg: always call cond_resched() after fn()
Carlos Sanchez (1):
can: slcan: allow reception of short error messages
Cezary Rojewski (1):
ASoC: codecs: pcm3168a: Allow for 24-bit in provider mode
Chenyuan Yang (1):
ASoC: imx-card: Adjust over allocation of memory in imx_card_parse_of()
Choong Yong Liang (1):
net: phylink: use pl->link_interface in phylink_expects_phy()
Christian Brauner (4):
coredump: fix error handling for replace_fd()
pid: add pidfd_prepare()
fork: use pidfd_prepare()
coredump: hand a pidfd to the usermode coredump helper
Christian Göttsche (1):
ext4: reorder capability check last
Claudiu Beznea (5):
phy: renesas: rcar-gen3-usb2: Add support to initialize the bus
phy: renesas: rcar-gen3-usb2: Move IRQ request in probe
phy: renesas: rcar-gen3-usb2: Lock around hardware registers and driver data
phy: renesas: rcar-gen3-usb2: Assert PLL reset on PHY power off
serial: sh-sci: Update the suspend/resume support
Cong Wang (1):
sch_hfsc: Fix qlen accounting bug when using peek in hfsc_enqueue()
Dan Carpenter (1):
pinctrl: tegra: Fix off by one in tegra_pinctrl_get_group()
Daniel Gomez (1):
kconfig: merge_config: use an empty file as initfile
Dave Jiang (2):
dmaengine: idxd: add per DSA wq workqueue for processing cr faults
dmaengine: idxd: Fix ->poll() return value
Depeng Shao (1):
media: qcom: camss: csid: Only add TPG v4l2 ctrl if TPG hardware is available
Diogo Ivo (1):
arm64: tegra: p2597: Fix gpio for vdd-1v8-dis regulator
Dmitry Baryshkov (1):
phy: core: don't require set_mode() callback for phy_get_mode() to work
Dmitry Bogdanov (1):
scsi: target: iscsi: Fix timeout on deleted connection
Dominik Grzegorzek (1):
padata: do not leak refcount in reorder_work
Douglas Anderson (1):
drm/panel-edp: Add Starry 116KHD024006
Ed Burcher (1):
ALSA: hda/realtek: Add quirk for Lenovo Yoga Pro 7 14ASP10
Emanuele Ghidoli (1):
gpio: pca953x: fix IRQ storm on system wake up
Eric Dumazet (2):
posix-timers: Add cond_resched() to posix_timer_add() search loop
tcp: bring back NUMA dispersion in inet_ehash_locks_alloc()
Eric Woudstra (1):
net: ethernet: mtk_ppe_offload: Allow QinQ, double ETH_P_8021Q only
Erick Shepherd (2):
mmc: host: Wait for Vdd to settle on card power off
mmc: sdhci: Disable SD card clock before changing parameters
Felix Kuehling (1):
drm/amdgpu: Allow P2P access through XGMI
Fenghua Yu (1):
dmaengine: idxd: add idxd_copy_cr() to copy user completion record during page fault handling
Filipe Manana (3):
btrfs: fix non-empty delayed iputs list on unmount due to async workers
btrfs: get zone unusable bytes while holding lock at btrfs_reclaim_bgs_work()
btrfs: send: return -ENAMETOOLONG when attempting a path that is too long
Frank Li (2):
PCI: dwc: ep: Ensure proper iteration over outbound map windows
i3c: master: svc: Flush FIFO before sending Dynamic Address Assignment(DAA)
Frederic Weisbecker (1):
hrtimers: Force migrate away hrtimers queued after CPUHP_AP_HRTIMERS_DYING
Frediano Ziglio (1):
xen: Add support for XenServer 6.1 platform device
Geert Uytterhoeven (1):
serial: sh-sci: Save and restore more registers
Geetha sowjanya (1):
octeontx2-af: Fix APR entry mapping based on APR_LMT_CFG
Goldwyn Rodrigues (1):
btrfs: correct the order of prelim_ref arguments in btrfs__prelim_ref
Greg Kroah-Hartman (1):
Linux 6.1.141
Guangguan Wang (1):
net/smc: use the correct ndev to find pnetid by pnetid table
Hangbin Liu (1):
bonding: report duplicate MAC address in all situations
Hans Verkuil (2):
media: cx231xx: set device_caps for 417
media: test-drivers: vivid: don't call schedule in loop
Haoran Jiang (1):
samples/bpf: Fix compilation failure for samples/bpf on LoongArch Fedora
Harshit Mogalapalli (1):
dmaengine: idxd: Fix passing freed memory in idxd_cdev_open()
Hector Martin (4):
soc: apple: rtkit: Implement OSLog buffers properly
ASoC: tas2764: Add reg defaults for TAS2764_INT_CLK_CFG
ASoC: tas2764: Mark SW_RESET as volatile
ASoC: tas2764: Power up/down amp on mute ops
Heiner Kallweit (1):
r8169: don't scan PHY addresses > 0
Heming Zhao (1):
dlm: make tcp still work in multi-link env
Herbert Xu (1):
crypto: lzo - Fix compression buffer overrun
Ian Rogers (1):
tools/build: Don't pass test log files to linker
Ido Schimmel (2):
vxlan: Annotate FDB data races
bridge: netfilter: Fix forwarding of fragmented packets
Ihor Solodrai (1):
selftests/bpf: Mitigate sockmap_ktls disconnect_after_delete failure
Ilia Gavrilov (1):
llc: fix data loss when reading from a socket in llc_ui_recvmsg()
Ilpo Järvinen (2):
tcp: reorganize tcp_in_ack_event() and tcp_count_delivered()
PCI: Fix old_size lower bound in calculate_iosize() too
Ilya Guterman (1):
nvme-pci: add NVME_QUIRK_NO_DEEPEST_PS quirk for SOLIDIGM P44 Pro
Isaac Scott (1):
regulator: ad5398: Add device tree support
Ivan Pravdin (1):
crypto: algif_hash - fix double free in hash_accept
Jacob Keller (1):
ice: fix vf->num_mac count with port representors
Jakub Kicinski (1):
eth: mlx4: don't try to complete XDP frames in netpoll
Janne Grunau (1):
soc: apple: rtkit: Use high prio work queue
Jason Andryuk (1):
xenbus: Allow PVH dom0 a non-local xenstore
Jason Gunthorpe (1):
genirq/msi: Store the IOMMU IOVA directly in msi_desc instead of iommu_cookie
Jeff Layton (1):
nfs: don't share pNFS DS connections between net namespaces
Jens Axboe (1):
io_uring/fdinfo: annotate racy sq/cq head/tail reads
Jernej Skrabec (1):
Revert "arm64: dts: allwinner: h6: Use RSB for AXP805 PMIC connection"
Jessica Zhang (1):
drm: Add valid clones check
Jiang Liu (1):
drm/amdgpu: reset psp->cmd to NULL after releasing the buffer
Jing Su (1):
dql: Fix dql->limit value when reset.
Jing Zhou (1):
drm/amd/display: Guard against setting dispclk low for dcn31x
Jinliang Zheng (1):
dm: fix unconditional IO throttle caused by REQ_PREFLUSH
Jinqian Yang (1):
arm64: Add support for HIP09 Spectre-BHB mitigation
Johannes Berg (3):
wifi: mac80211: don't unconditionally call drv_mgd_complete_tx()
wifi: mac80211: remove misplaced drv_mgd_complete_tx() call
wifi: iwlwifi: add support for Killer on MTL
John Chau (1):
platform/x86: thinkpad_acpi: Support also NEC Lavie X1475JAS
Jordan Crouse (1):
clk: qcom: camcc-sm8250: Use clk_rcg2_shared_ops for some RCGs
Josh Poimboeuf (1):
objtool: Properly disable uaccess validation
Justin Tee (2):
scsi: lpfc: Handle duplicate D_IDs in ndlp search-by D_ID routine
scsi: lpfc: Free phba irq in lpfc_sli4_enable_msi() when pci_irq_vector() fails
Kai Mäkisara (3):
scsi: st: Tighten the page format heuristics with MODE SELECT
scsi: st: ERASE does not change tape location
scsi: st: Restore some drive settings after reset
Kaustabh Chakraborty (1):
mmc: dw_mmc: add exynos7870 DW MMC support
Kees Cook (1):
net/mlx4_core: Avoid impossible mlx4_db_alloc() order value
Kevin Krakauer (1):
selftests/net: have `gro.sh -t` return a correct exit code
Konstantin Andreev (1):
smack: recognize ipv4 CIPSO w/o categories
Konstantin Taranov (1):
net/mana: fix warning in the writer of client oob
Krzysztof Kozlowski (2):
can: c_can: Use of_property_present() to test existence of DT property
clk: qcom: clk-alpha-pll: Do not use random stack value for recalc rate
Kuhanh Murugasen Krishnan (1):
fpga: altera-cvp: Increase credit timeout
Kuninori Morimoto (1):
ASoC: soc-dai: check return value at snd_soc_dai_set_tdm_slot()
Kuniyuki Iwashima (26):
ipv4: fib: Move fib_valid_key_len() to rtm_to_fib_config().
ip: fib_rules: Fetch net from fib_rule in fib[46]_rule_configure().
af_unix: Return struct unix_sock from unix_get_socket().
af_unix: Run GC on only one CPU.
af_unix: Try to run GC async.
af_unix: Replace BUG_ON() with WARN_ON_ONCE().
af_unix: Remove io_uring code for GC.
af_unix: Remove CONFIG_UNIX_SCM.
af_unix: Allocate struct unix_vertex for each inflight AF_UNIX fd.
af_unix: Allocate struct unix_edge for each inflight AF_UNIX fd.
af_unix: Link struct unix_edge when queuing skb.
af_unix: Bulk update unix_tot_inflight/unix_inflight when queuing skb.
af_unix: Iterate all vertices by DFS.
af_unix: Detect Strongly Connected Components.
af_unix: Save listener for embryo socket.
af_unix: Fix up unix_edge.successor for embryo socket.
af_unix: Save O(n) setup of Tarjan's algo.
af_unix: Skip GC if no cycle exists.
af_unix: Avoid Tarjan's algorithm if unnecessary.
af_unix: Assign a unique index to SCC.
af_unix: Detect dead SCC.
af_unix: Replace garbage collection algorithm.
af_unix: Remove lock dance in unix_peek_fds().
af_unix: Try not to hold unix_gc_lock during accept().
af_unix: Don't access successor in unix_del_edges() during GC.
af_unix: Add dead flag to struct scm_fp_list.
Kurt Borja (1):
hwmon: (dell-smm) Increment the number of fans
Larisa Grigore (2):
spi: spi-fsl-dspi: restrict register range for regmap access
spi: spi-fsl-dspi: Reset SR flags before sending a new message
Li Bin (1):
ARM: at91: pm: fix at91_suspend_finish for ZQ calibration
Luiz Augusto von Dentz (1):
Bluetooth: L2CAP: Fix not checking l2cap_chan security level
Maciej S. Szmigiero (1):
ALSA: hda/realtek: Enable PC beep passthrough for HP EliteBook 855 G7
Maher Sanalla (1):
RDMA/uverbs: Propagate errors from rdma_lookup_get_uobject()
Marek Szyprowski (1):
dma-mapping: avoid potential unused data compilation warning
Mario Limonciello (1):
Revert "drm/amd: Keep display off while going into S4"
Mark Harmstone (1):
btrfs: avoid linker error in btrfs_find_create_tree_block()
Mark Pearson (1):
platform/x86: thinkpad_acpi: Ignore battery threshold change event notification
Markus Elfring (1):
media: c8sectpfe: Call of_node_put(i2c_bus) only once in c8sectpfe_probe()
Martin Blumenstingl (1):
pinctrl: meson: define the pull up/down resistor value as 60 kOhm
Martin Povišer (1):
ASoC: ops: Enforce platform maximum on initial value
Masahiro Yamada (1):
um: let 'make clean' properly clean underlying SUBARCH as well
Matt Johnston (1):
fuse: Return EPERM rather than ENOSYS from link()
Matthew Wilcox (Oracle) (1):
orangefs: Do not truncate file size
Matti Lehtimäki (2):
remoteproc: qcom_wcnss: Handle platforms with only single power domain
remoteproc: qcom_wcnss: Fix on platforms without fallback regulators
Michael Margolin (1):
RDMA/core: Fix best page size finding when it can cross SG entries
Michal Luczaj (1):
af_unix: Fix garbage collection of embryos carrying OOB with SCM_RIGHTS
Michal Swiatkowski (1):
ice: count combined queues using Rx/Tx count
Mika Westerberg (1):
thunderbolt: Do not add non-active NVM if NVM upgrade is disabled for retimer
Mikulas Patocka (1):
dm: restrict dm device size to 2^63-512 bytes
Milton Barrera (1):
HID: quirks: Add ADATA XPG alpha wireless mouse support
Ming-Hung Tsai (1):
dm cache: prevent BUG_ON by blocking retries on failed device resumes
Moshe Shemesh (1):
net/mlx5: Avoid report two health errors on same syndrome
Mykyta Yatsenko (1):
bpf: Return prog btf_id without capable check
Namjae Jeon (1):
ksmbd: fix stream write failure
Nandakumar Edamana (1):
libbpf: Fix out-of-bound read
Nathan Chancellor (2):
kbuild: Disable -Wdefault-const-init-unsafe
i3c: master: svc: Fix implicit fallthrough in svc_i3c_master_ibi_work()
Nicolas Bouchinet (1):
netfilter: conntrack: Bound nf_conntrack sysctl writes
Niklas Söderlund (1):
media: adv7180: Disable test-pattern control on adv7180
Nir Lichtman (1):
x86/build: Fix broken copy command in genimage.sh when making isoimage
Nishanth Menon (1):
net: ethernet: ti: am65-cpsw: Lower random mac address error print to info
Nícolas F. R. A. Prado (1):
ASoC: mediatek: mt6359: Add stub for mt6359_accdet_enable_jack_detect
Oliver Hartkopp (2):
can: bcm: add locking for bcm_op runtime updates
can: bcm: add missing rcu read protection for procfs content
Pali Rohár (4):
cifs: Add fallback for SMB2 CREATE without FILE_READ_ATTRIBUTES
cifs: Fix querying and creating MF symlinks over SMB1
cifs: Fix negotiate retry functionality
cifs: Fix establishing NetBIOS session for SMB2+ connection
Paul Burton (2):
MIPS: pm-cps: Use per-CPU variables as per-CPU, not per-core
clocksource: mips-gic-timer: Enable counter when CPUs start
Paul Chaignon (1):
xfrm: Sanitize marks before insert
Paul Kocialkowski (1):
net: dwmac-sun8i: Use parsed internal PHY address instead of 1
Pavel Begunkov (1):
io_uring: fix overflow resched cqe reordering
Pedro Tammela (1):
net_sched: hfsc: Address reentrant enqueue adding class to eltree twice
Peter Seiderer (2):
net: pktgen: fix mpls maximum labels list parsing
net: pktgen: fix access outside of user given buffer in pktgen_thread_write()
Peter Zijlstra (Intel) (1):
perf: Avoid the read if the count is already updated
Petr Machata (1):
vxlan: Join / leave MC group after remote changes
Philip Redkin (1):
x86/mm: Check return value from memblock_phys_alloc_range()
Philip Yang (1):
drm/amdkfd: KFD release_work possible circular locking
Ping-Ke Shih (2):
wifi: rtw89: fw: propagate error code from rtw89_h2c_tx()
wifi: rtw89: add wiphy_lock() to work that isn't held wiphy_lock() yet
Prathamesh Shete (1):
pinctrl-tegra: Restore SFSEL bit when freeing pins
Qu Wenruo (1):
btrfs: run btrfs_error_commit_super() early
Rafael J. Wysocki (1):
cpuidle: menu: Avoid discarding useful information
Ranjan Kumar (1):
scsi: mpi3mr: Add level check to control event logging
Ratheesh Kannoth (4):
octeontx2-pf: Add support for page pool
octeontx2-pf: fix page_pool creation fail for rings > 32k
octeontx2-pf: Fix page pool cache index corruption.
octeontx2-pf: Fix page pool frag allocation warning
Ravi Bangoria (1):
perf/amd/ibs: Fix perf_ibs_op.cnt_mask for CurCnt
Ricardo Ribalda (1):
media: uvcvideo: Add sanity check to uvc_ioctl_xu_ctrl_map
Robert Richter (1):
libnvdimm/labels: Fix divide error in nd_label_data_init()
Robin Murphy (2):
perf/arm-cmn: Fix REQ2/SNP2 mixup
perf/arm-cmn: Initialise cmn->cpu earlier
Roger Pau Monne (1):
PCI: vmd: Disable MSI remapping bypass under Xen
Rosen Penev (1):
wifi: ath9k: return by of_get_mac_address
Ryan Roberts (1):
arm64/mm: Check PUD_TYPE_TABLE in pud_bad()
Ryan Walklin (1):
ASoC: sun4i-codec: support hp-det-gpios property
Ryo Takakura (1):
lockdep: Fix wait context check on softirq for PREEMPT_RT
Sabrina Dubroca (1):
espintcp: remove encap socket caching to avoid reference leak
Saket Kumar Bhaskar (1):
perf/hw_breakpoint: Return EOPNOTSUPP for unsupported breakpoint type
Sean Anderson (1):
spi: zynqmp-gqspi: Always acknowledge interrupts
Seyediman Seyedarab (1):
kbuild: fix argument parsing in scripts/config
Shahar Shitrit (2):
net/mlx5: Modify LSB bitmask in temperature event to include only the first bit
net/mlx5: Apply rate-limiting to high temperature warning
Shashank Gupta (1):
crypto: octeontx2 - suppress auth failure screaming due to negative tests
Shigeru Yoshida (1):
af_unix: Fix uninit-value in __unix_walk_scc()
Shivasharan S (1):
scsi: mpt3sas: Send a diag reset if target reset fails
Shiwu Zhang (1):
drm/amdgpu: enlarge the VBIOS binary size limit
Shixiong Ou (1):
fbdev: fsl-diu-fb: add missing device_remove_file()
Simona Vetter (1):
drm/atomic: clarify the rules around drm_atomic_state->allow_modeset
Soeren Moch (1):
wifi: rtl8xxxu: retry firmware download on error
Stanimir Varbanov (2):
PCI: brcmstb: Expand inbound window size up to 64GB
PCI: brcmstb: Add a softdep to MIP MSI-X driver
Stanley Chu (1):
i3c: master: svc: Fix missing STOP for master request
Stephan Gerhold (1):
i2c: qup: Vote for interconnect bandwidth to DRAM
Subbaraya Sundeep (1):
octeontx2-af: Set LMT_ENA bit for APR table entries
Suman Ghosh (1):
octeontx2-pf: Add AF_XDP non-zero copy support
Svyatoslav Ryhel (1):
ARM: tegra: Switch DSI-B clock parent to PLLD on Tegra114
Takashi Iwai (4):
ALSA: seq: Improve data consistency at polling
ASoC: Intel: bytcr_rt5640: Add DMI quirk for Acer Aspire SW3-013
ALSA: hda/realtek: Add quirk for HP Spectre x360 15-df1xxx
ALSA: pcm: Fix race of buffer access at PCM OSS layer
Thangaraj Samynathan (1):
net: lan743x: Restore SGMII CTRL register on resume
Thomas Weißschuh (1):
timer_list: Don't use %pK through printk()
Thomas Zimmermann (1):
drm/ast: Find VBIOS mode from regular display size
Tianyang Zhang (1):
mm/page_alloc.c: avoid infinite retries caused by cpuset race
Tiwei Bie (1):
um: Update min_low_pfn to match changes in uml_reserved
Tom Chung (1):
drm/amd/display: Initial psr_version with correct setting
Trond Myklebust (8):
NFSv4: Check for delegation validity in nfs_start_delegation_return_locked()
NFS: Don't allow waiting for exiting tasks
SUNRPC: Don't allow waiting for exiting tasks
NFSv4: Treat ENETUNREACH errors as fatal for state recovery
SUNRPC: rpc_clnt_set_transport() must not change the autobind setting
SUNRPC: rpcbind should never reset the port to the value '0'
pNFS/flexfiles: Report ENETDOWN as a connection error
NFS: Avoid flushing data while holding directory locks in nfs_rename()
Tudor Ambarus (1):
mailbox: use error ret code of of_parse_phandle_with_args()
Valentin Caron (1):
pinctrl: devicetree: do not goto err when probing hogs in pinctrl_dt_to_map
Valtteri Koskivuori (1):
platform/x86: fujitsu-laptop: Support Lifebook S2110 hotkeys
Vasant Hegde (1):
iommu/amd/pgtbl_v2: Improve error handling
Victor Lu (1):
drm/amdgpu: Do not program AGP BAR regs under SRIOV in gfxhub_v1_0.c
Viktor Malik (1):
bpftool: Fix readlink usage in get_fd_type
Vinicius Costa Gomes (1):
dmaengine: idxd: Fix allowing write() from different address spaces
Viresh Kumar (1):
firmware: arm_ffa: Set dma_mask for ffa devices
Vitalii Mordan (1):
i2c: pxa: fix call balance of i2c->clk handling routines
Vladimir Moskovkin (1):
platform/x86: dell-wmi-sysman: Avoid buffer overflow in current_password_store()
Vladimir Oltean (1):
net: enetc: refactor bulk flipping of RX buffers to separate function
Waiman Long (1):
x86/nmi: Add an emergency handler in nmi_desc & use it in nmi_shootdown_cpus()
Wang Liang (1):
net/tipc: fix slab-use-after-free Read in tipc_aead_encrypt_done
Wang Zhaolong (2):
smb: client: Fix use-after-free in cifs_fill_dirent
smb: client: Reset all search buffer pointers when releasing buffer
Willem de Bruijn (1):
ipv6: save dontfrag in cork
William Tu (2):
net/mlx5e: set the tx_queue_len for pfifo_fast
net/mlx5e: reduce rep rxq depth to 256 for ECPF
Xiaofei Tan (1):
ACPI: HED: Always initialize before evged
Yihan Zhu (1):
drm/amd/display: handle max_downscale_src_width fail check
Yuanjun Gong (1):
leds: pwm-multicolor: Add check for fwnode_property_read_u32
Zhikai Zhai (1):
drm/amd/display: calculate the remain segments for all pipes
Zhongqiu Han (1):
virtio_ring: Fix data race by tagging event_triggered as racy for KCSAN
Zsolt Kajtar (2):
fbcon: Use correct erase colour for clearing in fbcon
fbdev: core: tileblit: Implement missing margin clearing for tileblit
feijuan.li (1):
drm/edid: fixed the bug that hdr metadata was not reset
gaoxu (1):
cgroup: Fix compilation issue due to cgroup_mutex not being exported
junan (1):
HID: usbkbd: Fix the bit shift number for LED_KANA
Return-Path: <linux-kernel+bounces-673240-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id B3EAA41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:08:58 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 5F2B6177E1E
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:08:48 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 91A5128FAA3;
Wed, 4 Jun 2025 13:07:26 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=aspeedtech.com header.i=@aspeedtech.com header.b="WkIu4MXO"
Received: from SEYPR02CU001.outbound.protection.outlook.com (mail-koreacentralazon11023080.outbound.protection.outlook.com [40.107.44.80])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 15DAA28FFC5;
Wed, 4 Jun 2025 13:07:22 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.44.80
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749042445; cv=fail; b=gsuQSmk3PB97pr4Mkm9XkT8lIiENC7qatLxDxoZas9afs/yfz4gnQWCy6uw6ojb2C1LcZ4GXIn/rWZmpQGTbQ0NV1GhpWT2U4xBct9hoOiFYjJ7nPK6/zoAlQ8CGUpORtYBdYrqLYNHFNn/tyZD2VMgu8vbYW842MzfiHOmcQnY=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749042445; c=relaxed/simple;
bh=6jVnkjT6e2SZXWSCKEXlSFjwyyqyFjvjocdOvctZ5Qs=;
h=From:To:Subject:Date:Message-ID:References:In-Reply-To:
Content-Type:MIME-Version; b=oEWsLPFeXjoUvJyaBllCUSsqdDUTMhdWWtLwVq2h6yq8Q2M78be+ObKG3amMVVQbeGnyLCuoURl3bMEjhZncKEoVdDqx7iTlq8NDb1OYxlHxevCLZgvm7WMHjcRqI2QyPwyt7RFL3gj/tvBNXl+vBUl6pG3b+/o+KRviK+ZUFhM=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com; spf=pass smtp.mailfrom=aspeedtech.com; dkim=pass (2048-bit key) header.d=aspeedtech.com header.i=@aspeedtech.com header.b=WkIu4MXO; arc=fail smtp.client-ip=40.107.44.80
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aspeedtech.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aspeedtech.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=hT5IkW4ggCpbeDCl19cx1ctmIyBtudGSrWFPk1c8Ur61zyut7ouS/yCG9TL5tZO5+H0PxRNJ1+zvcmgzGPwiXjk8ofedwEBOx8Wx1UnbTn1y8OArdnzpFIKBCLH4Bfzk22d0wS/pUsz5f/4QWOe1QOih2474SwvYx4zpFfNVIUWxn5qME1MGd4RIt7fT/AKgN5jn/rpCbMtklJj61nQZuckb/X/CHU2A8I/nwfL39nsub/UA9Is1VzFLCOMOnAIlvwzoWepulwSog6zeznDk71doBJVLda/eDPwHsyLmbX5z/520YMgQjaEqpCEWWM2nAQQdpIecqEWCmhJohO+mHg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=6jVnkjT6e2SZXWSCKEXlSFjwyyqyFjvjocdOvctZ5Qs=;
b=h6AFH9l1F1U80RetjQTGox9zy+hF7BrkVg8nuVD139DR3NVFFEE6p5BrST2zdXpRt62OUXhMD1dZBr8ipjr1jErSIJCmuax/L4QWjt+qMvUCgMaq2sDydljx3Ebxfyg9GZ7FsWlKJLDq9yG9/hPIGYdOwGeZU9mgOnVIkD3Mvq+pRnbmJHe86Lq4yO8mSt/X8mlY0g54UlfT/2uRrA7HG8qUafMNNLsi40kK3QO/mfN1dx1JoMPrHYhp1PX2/yEEB+kVqn9IeZCT0tqqCinQUzLvYVRyf8sOaofkXSddxMCXiPGvSbqET9mJPpbZo8EV0vLXUIIukybgnoQoZa5FEQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=aspeedtech.com; dmarc=pass action=none
header.from=aspeedtech.com; dkim=pass header.d=aspeedtech.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aspeedtech.com;
s=selector2;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=6jVnkjT6e2SZXWSCKEXlSFjwyyqyFjvjocdOvctZ5Qs=;
b=WkIu4MXO1gNVnKLStBaN0CeiT9PfrWMA25q7J8SctQu93hN87yaZXEBV5nr8KFz9t59fcUmqN3K5QVxX0ZVjNK6uzhVK4MIRp6DQUA6tDTLfmeH7t05CiQZjWI7UbyxPBJe26qrQxJEbXP/hPmsagEUSmW6D2o066IGUW9g6RfGsUvSWTNHE0gPar6GiCEJv0zhR64ZOVXPVQ5G500jmshvA6omxVwzkc1JgOpnEiPIWD6ib/63N/tFzkfVK9VsenE/WVEMnv607Y0lZh0ABhQ/YZDKSJFwi7MbFZqa+k/C3ewqnxJjNF8pA6yDnPYvGQbNVW6AsAsffiBUEYVLM5g==
Received: from SEZPR06MB6569.apcprd06.prod.outlook.com (2603:1096:101:189::10)
by SE2PPF9C0841AEE.apcprd06.prod.outlook.com (2603:1096:108:1::7e4) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8813.20; Wed, 4 Jun
2025 13:07:17 +0000
Received: from SEZPR06MB6569.apcprd06.prod.outlook.com
([fe80::e0b0:e0eb:f378:e316]) by SEZPR06MB6569.apcprd06.prod.outlook.com
([fe80::e0b0:e0eb:f378:e316%6]) with mapi id 15.20.8769.037; Wed, 4 Jun 2025
13:07:16 +0000
From: Jammy Huang <jammy_huang@xxxxxxxxxxxxxx>
To: Krzysztof Kozlowski <krzk@xxxxxxxxxx>, "jassisinghbrar@xxxxxxxxx"
<jassisinghbrar@xxxxxxxxx>, "robh@xxxxxxxxxx" <robh@xxxxxxxxxx>,
"krzk+dt@xxxxxxxxxx" <krzk+dt@xxxxxxxxxx>, "conor+dt@xxxxxxxxxx"
<conor+dt@xxxxxxxxxx>, "joel@xxxxxxxxx" <joel@xxxxxxxxx>,
"andrew@xxxxxxxxxxxxxxxxxxxx" <andrew@xxxxxxxxxxxxxxxxxxxx>,
"devicetree@xxxxxxxxxxxxxxx" <devicetree@xxxxxxxxxxxxxxx>,
"linux-arm-kernel@xxxxxxxxxxxxxxxxxxx"
<linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, "linux-aspeed@xxxxxxxxxxxxxxxx"
<linux-aspeed@xxxxxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx"
<linux-kernel@xxxxxxxxxxxxxxx>
Subject: RE: [PATCH v2 0/2] ASPEED: Add mailbox driver for AST2700 series
Thread-Topic: [PATCH v2 0/2] ASPEED: Add mailbox driver for AST2700 series
Thread-Index: AQHb1VAJRfMyqLL9+Eu9cibno2aoCbPy9e0AgAABJjA=
Date: Wed, 4 Jun 2025 13:07:16 +0000
Message-ID:
<SEZPR06MB65691F4A1A28AC189D38A55EF16CA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20250604125558.1614523-1-jammy_huang@xxxxxxxxxxxxxx>
<e967473f-f1cc-42d8-9786-437f52db4162@xxxxxxxxxx>
In-Reply-To: <e967473f-f1cc-42d8-9786-437f52db4162@xxxxxxxxxx>
Accept-Language: zh-TW, en-US
Content-Language: zh-TW
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=aspeedtech.com;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: SEZPR06MB6569:EE_|SE2PPF9C0841AEE:EE_
x-ms-office365-filtering-correlation-id: bc481d65-4941-4ae2-f875-08dda368bb36
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam:
BCL:0;ARA:13230040|1800799024|7416014|376014|366016|921020|38070700018;
x-microsoft-antispam-message-info:
=?utf-8?B?RmhhRDJlcFZZblIyeUpmVnVnYmQra2VNNm9WM2ZKV1pJbWpyRk5jdkw2RXBV?=
=?utf-8?B?UXBLRUdjenBPUkIzR202dHM3T2NZVGtRcU9KdWVkOVQ0UkMxdnRjcXYzSnVs?=
=?utf-8?B?QzhhZTBzVWF5d2hONTZvOFU2a21LbmMwbjRuWHlBdVNFL0RrVlNYdEdJZEFR?=
=?utf-8?B?YWNaYnBqZjUwaWR2R1ZtRGl1RFl6dGVnSVc0QVNjY0szZWYyMUZ0aEtybnJB?=
=?utf-8?B?d1FWemE4ZnIzVmRjcDBLOGprZWI2TVhSRnRSaEF3dmdIWFZYc2dBeWpyUVRK?=
=?utf-8?B?VnRzZlV3bUlHSVlyV3prdWFEQnJEUXd1Q2lPMWp6YTV1dWxSaWhEMjUvOHlK?=
=?utf-8?B?Tms1VVZXalZiN1hrQnp5TlBWdXJrK2pGSEkwT2xOL3RlYUZ0ZWRMQ3BsNlAy?=
=?utf-8?B?UVNvaVlFZDNqVWVpSWRwcVFkSWlRbjZncE4yWjlQb2VwM3RjOFIydzVOVnRF?=
=?utf-8?B?Ujl4bjFEeGRvek41SlF0b0k4ZDBkQ2w3WVpFcTV2eDh2SWVHMWxsVjJHanhH?=
=?utf-8?B?d0IwUEdSTTdITkcrNWlvM1dKSEpKWkRIVmI2UlZEQ21UR0dINS9HcTg4UGEy?=
=?utf-8?B?OW9KWnUwYjYycTJPeXYwbUozSFUzbnR2OHNuTDQvSTZCT0YzbUVtRS9QdzN6?=
=?utf-8?B?V0VsTzdxbVNiZjMvTDdCRHNnL1N1eTBIcVVrMFViVlIxcUdUemNpZitQQkdE?=
=?utf-8?B?RWYxaUVjNG44YzM4ZjdORXBqeXFmM01YWVBtWlpzbjgyN051NGJVMkU4TG1k?=
=?utf-8?B?Slh2bko1VFN6VGFmL0xvd0FSNHpQUUtrWnZuWUlUT2tJZ3FSYm1jMVF2SExB?=
=?utf-8?B?dHlVZEhqSE1FU0FlS0d5c0YrRngwa0pld3psNVRtUGlPemZ5aGlWVW0wK0g3?=
=?utf-8?B?UTV1NTNaS29LaFhiNWRzMCtHdWUzK3BFempNWFhhVm9reUlON1NTV2w4T25Q?=
=?utf-8?B?ZzdXN1BmUExYZTdXNkMxMnl6VWtoSmVmblprelpRWW1iL1B2YmZGSVBscThx?=
=?utf-8?B?bE4yR1BSM3h1V3NiR1p1YW5XMUlXckRqL2ZBcFBYRmdyeWE5TlNHS2tEYWUx?=
=?utf-8?B?YmxQa2dsVUI3NVYzQ0hjZWRqdzBNQVRuQXltRkg3aWdabnAvVEhCN1ZFWHdW?=
=?utf-8?B?K3NYdlBJaEJKYlVqOXdnQkFucWZlbDd5OXREYmtBNmoraUVUbzJXY1BBelN6?=
=?utf-8?B?M3hOVkVLRnVXRjVSTFdpQjZZbnVaSERMOTkzM1lnK2JqN0hRK25OS1FYbzgy?=
=?utf-8?B?R1lhUHFJWFNiYTk4Mk82SjJPVERCRVpONWEzV3ZTaUNScS9qWmwwSmVLOGRP?=
=?utf-8?B?WEcwT2NrMldjME1nWlhmTGtHdnluaDdzMnI1NnZHZ3FTVkYvR0ZmR3h4RUE3?=
=?utf-8?B?VEN2ekZuZC9NYVBZSFYxK2tqRWlXNWtDZDhzWVYvMWxJU1Q0Z1ZtUnl0NDVC?=
=?utf-8?B?TVIwaGp4Rm9TTndMS2xpbHBVVmpPNkczSWpDaHRSeGRQK2tXTzRzV2NjOC9w?=
=?utf-8?B?R1o3L3V5L3pYRFBZbEdTV3l0OUYwc0ZyOFdqVVVwNHlhckxUU2ZYR3E3N3Y2?=
=?utf-8?B?ZU1mWDlGOWo4a1NnUURhb2daTjlsckVjSUp5ZWl3Mmx4RjhEdThjbVpMSVIr?=
=?utf-8?B?d0pJQmhlU1c4RmZya29FRElLamtLQ1A2cVY0STZwUVdKMXNMWjVnWnpiaFFz?=
=?utf-8?B?NzBqMm5QQTJIbTlKUWRLMXYyejdTMTBPVmNGZHkvZDZkVWVLb0ljbFFRNVRX?=
=?utf-8?B?dFRSb1lLRFU1TTJsMDJjZnVXYmMvZjZBelVoWnVKOHFYTjZnTi9HeDJ3T0Mx?=
=?utf-8?B?SGp3b0JhdFlCdUdOMTZwNkhFQytlYm9RZUtaSy94Snc2ZGRiWlgxMTNTWk5R?=
=?utf-8?B?UlllZ0xVbUdOUXd4RWVHdHNDWXVzUlJ2cUt6ZkVueEtBSW1FSGkvcjVZVitp?=
=?utf-8?B?S1BXNVBoSG1JMGlRK0hZQXR0R3RpVmtDZGo4bWtuMTVRcXlDOFlCSUZCS2Z3?=
=?utf-8?Q?UvMGOIQSEgACyiGFWZ7hN2LJYQAasw=3D?=
x-forefront-antispam-report:
CIP:255.255.255.255;CTRY:;LANG:zh-tw;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB6569.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(7416014)(376014)(366016)(921020)(38070700018);DIR:OUT;SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0:
=?utf-8?B?bDFwUHlqVTlLWHRsVGF4Vnc3OVdJMTZ1aVIrdWlVaDlINW5BTExiMDVhSDBC?=
=?utf-8?B?ME8yOW5WSjBKNHowL05kcVhnOXNUaFdHeGFka1Z5ZExzZGpRbVo3TWd2WExa?=
=?utf-8?B?cFlhYXpNTFMrVkZzN3VBT0FEUXhqaldpYnkxZmlCTjN0SWJlK2tyK1BWcnJU?=
=?utf-8?B?L0NQaERsNmZPbDJCVTIwVVQ5RVI1SGNSVUlxNFVYRW9oUlRmWmhNN2MvQnRp?=
=?utf-8?B?L3dIRkhqZG90WjNIQ2RoTTBCd0laOWo3OWduNjIyWWNwb3Y0WTgxRnJFL0RM?=
=?utf-8?B?azkwYk1zc3YvcTA4a2lNNXNXK3VqUWdqTkkwVzRVTWxkM3h1ZXhVSUt3b05H?=
=?utf-8?B?YnQvaCs1b1YwcFdldlBwd0RkQWhFM0dORytvVW1rUWZtZUROZHhjV2YxRENB?=
=?utf-8?B?M3E1VlNVYm0yRVV0bENBa0lINEwxM0srdVBLMldQcVV3RG42eXJiTkpla1Na?=
=?utf-8?B?d2ZjVERacTVFaVNYSmpKMzMzZHRaWXJCY1BZWGVDMHJadGo4TDhXakYyekdX?=
=?utf-8?B?YkZGZHIyeEhCZEhBZEtaWXB6enVSNXdtYkpVd0RGQVhZMVJmRnAxL3p0NGNh?=
=?utf-8?B?bysxVDExbEVYZG5JNGRZMGdvMVRsNDliVnVxV2wreFpVYUV5NnhCN1YraFJw?=
=?utf-8?B?UFZpR1pIUEs3TmlOaCtZUlNRRDVEVDVxMnlLMTBCakd1b2Z6SzFvT1lZVDRK?=
=?utf-8?B?a244L2hiQmVNWlhKQytXb0hydW84MG9BbkVQZWRPODVuNGxtbEZZZkhmZ2lC?=
=?utf-8?B?WkRNN0Y2YllsQTdUbExZUDN2MDl3QWNIZE9SRER1WS94blA3dmtSVVFZM2d6?=
=?utf-8?B?SXBCRVlPd3ZSZU1FcmVWQ0JrcWI2aURJcXlnT0p2blVBWkM5NEdsNHJrY3JU?=
=?utf-8?B?bTBBL2F2ZlQxS0lnckxNUDRPMkpOOUpkMDRCUEtRdzVmVUtySFQzSWdDN1RD?=
=?utf-8?B?dzJFNzhnd3JDVmdCajdXL0w2R1pKQk84dkdnNERQdzVReUxrS0tGNEhIUW02?=
=?utf-8?B?cDFTdDNSYkVVTlR5Nm00Y1RhVEo3V0owcWhXWTlxZnZpYTFNQmpzNkNsMytl?=
=?utf-8?B?Y0pkc2FudGtJQkhzTzg5Y2RMWmdmMmdhUHE4Rmg0K3p1bFQxOWdwUUc5dDJG?=
=?utf-8?B?T29UeUpaS2VWMXVrblRFaFUrK1FKNmtKQmxXbmFkS3I0b3BXeUc2Q1lHOU15?=
=?utf-8?B?c0JjaHd3Q091cUVhNHhrTHlXZ1VNQUhJUzAxYlAyTGQ0Z3dxVVQ5TVVZazUx?=
=?utf-8?B?WXNYQWNTM2F5R3lucUZoMWZ6dWpIMlZpT2RaelFSRVRGaXFCMnZWM2J5OUlH?=
=?utf-8?B?TU5Fcis4TzRXb1J1ZjFWMlRjNlFQcGpiMUVENWsvWExBWGRKYVNVMHFITklP?=
=?utf-8?B?ZWF4eXRMTWdvUTkrWSsyVG9nTytXV3FLeFd3MmZDNC9JOUF4REx1UkNnc1RS?=
=?utf-8?B?V2VoN2Y2b0lDMlNka3U1VXNLbXlvVU4vS1lIUHVGOTNaY0dyaVJCaEh5TnVt?=
=?utf-8?B?MjhwM21PZ0VRTkEzRjIzUld2bWlaZGN2OS85SVpnc0Z5MEFpZ2U4OUYxZ0l6?=
=?utf-8?B?eEltL3JORHg2aE9NNTlReURSY1dKYlFjVjBmakxLY2h1elpXODcwTGRZTW5K?=
=?utf-8?B?ZnhEdk5KeVZheHFORzlzSHh6TmRJNVFXWEswQTAxRFZ2RFJ4d3ZJYytyL1J3?=
=?utf-8?B?MEFOL0lFTDRSM0xPS21IVnA1SFplNzZvTkJUUGErblZiU08xTkpzVlRZSXZC?=
=?utf-8?B?NzQwRzdLQy9ObENvMWJ5TVJVWUhTdS9FUGZsUjlCNjhMK3NRdktPWlc5YkdN?=
=?utf-8?B?TDQweHhVK0Z1MWdYRkxON2o0ak5uSm9OQUZ3d0c4aHhVTEd6WHlsd3M4QTVT?=
=?utf-8?B?T0ZuOEQwbVI5WjM2dTJXTzFEbzNjcnR4NTlBL2xpaVMveXNhNkJFM1B2K2xL?=
=?utf-8?B?dW9KcGtTQTVaSlRVN2lIYVdVM3FUT3FEUXVjWk00c3VWbTdQMUdpdHlWcTRj?=
=?utf-8?B?U3o4d1JrdkJSNUluSUF5NWFha2FOY0JyV2ZHbDBoQkxXc003MG5iRnVzbFJZ?=
=?utf-8?B?NGpIa2dwMXl2cFI0d2VFbC9DelVXUFJkZ29TWjlSTWRtSndkTi9wNGo0eC9V?=
=?utf-8?B?YXYwOTdUSnkwV09tUmtXM01Sb3Vzb1FkQk5XREM3VkVoeWo0Q2ZSQnE2anZL?=
=?utf-8?B?OUE9PQ==?=
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-OriginatorOrg: aspeedtech.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB6569.apcprd06.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: bc481d65-4941-4ae2-f875-08dda368bb36
X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jun 2025 13:07:16.9010
(UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 43d4aa98-e35b-4575-8939-080e90d5a249
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: gE4xtAj0AzdtUurpFeES4ecoe/2apsumkkBCfbDoIQ+Gy4MvpeQwIauv0RwXeP0/rQMUku8F0LqIK7/SNFQ7oxDzvMajcPJQT6zR9mggzCQ=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SE2PPF9C0841AEE
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
PiBPbiAwNC8wNi8yMDI1IDE0OjU1LCBKYW1teSBIdWFuZyB3cm90ZToNCj4gPiBBZGQgbWFpbGJv
eCBjb250cm9sbGVyIGRyaXZlciBmb3IgQVNUMjdYWCBTb0NzLCB3aGljaCBwcm92aWRlcw0KPiA+
IGluZGVwZW5kZW50IHR4L3J4IG1haWxib3ggYmV0d2VlbiBkaWZmZXJlbnQgcHJvY2Vzc29ycy4g
VGhlcmUgYXJlIDQNCj4gPiBjaGFubmVscyBmb3IgZWFjaCB0eC9yeCBtYWlsYm94IGFuZCBlYWNo
IGNoYW5uZWwgaGFzIGFuIDMyLWJ5dGUgRklGTy4NCj4gPg0KPiA+ICB2MiBjaGFuZ2VzOg0KPiA+
ICAgLSBVcGRhdGUgZG9jdW1lbnQNCj4gDQo+IFRoaXMgaXMgdmFndWUuIFdoYXQgZGlkIHlvdSB1
cGRhdGUgdGhlcmU/DQpTb3JyeSwgbGV0IG1lIHN1cHBseSBzb21lIGluZm9ybWF0aW9uIGFzIGJl
bG93Lg0KIDEuIENvcnJlY3QgZXJyb3IgaW4gZHRzIGV4YW1wbGUuDQogMi4gRHJvcCBkZXNjcmlw
dGlvbiBmb3IgbWJveC1jZWxsIGFzIHlvdSBzdWdnZXN0ZWQgcHJldmlvdXNseS4NCg0KPiANCj4g
QmVzdCByZWdhcmRzLA0KPiBLcnp5c3p0b2YNCg0KQmVzdCByZWdhcmRzLA0KSmFtbXkNCg==
Return-Path: <linux-kernel+bounces-673242-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 5A12841E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:09:17 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id BB0E63A68EB
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:08:53 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 3DF2A2900A3;
Wed, 4 Jun 2025 13:07:33 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="CG4GQp1p"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 26ED9290096;
Wed, 4 Jun 2025 13:07:31 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749042452; cv=none; b=AbKymV3nAv9H3yI1inLls+Q6aIK3dwEALZQtN0gwe+TEN8K07Q+UzAb1wYneo+3FW9EKaJUWVk8Jp3JS+ZuklSitCoUfck6O/WzDWoQxn2FKBUzcoznN8ps6c91GiRhYtlQsIkGpNNp9EPY6tRn7AoKnNAp6tlU8qgbiH/sm6IE=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749042452; c=relaxed/simple;
bh=YnbVhycwNlCAmLvUJ5SxF0iHmjf6LW/tw6qgy9F6qpU=;
h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=muuw2P8LWMLt+LoVyYa93Hdyx8FuyK7sWsV2UeuqJFMmZlNVHKtG2lrTAnOMen1no/Vyfvn8lOn5jRmaMyGH7IrVMfWhgPvV2QMxpB4gn8unVyu8kB5xEvSs4UPJxbqy0/hq7HR6sXIwTX2E31r1T9JfSuPipJh2xuYdJY0S/T8=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=CG4GQp1p; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 35CD5C4CEE7;
Wed, 4 Jun 2025 13:07:31 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org;
s=korg; t=1749042451;
bh=YnbVhycwNlCAmLvUJ5SxF0iHmjf6LW/tw6qgy9F6qpU=;
h=From:To:Cc:Subject:Date:From;
b=CG4GQp1pwDGzlQFCDiZ0oMHSsN3PtbR1qdmAcB13sG5qeeF8e9f+Pms/4wIPA6IT/
YasIF22rO1I63XAJMb9n4411i55FApyC85p3iQEqu8JjfFYBb7Rv5vNxyFjiTixx+o
RC+TT1kB9ktZOTP4LW+5JjMxWjOutXI0pMdbvUbo=
From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
To: linux-kernel@xxxxxxxxxxxxxxx,
akpm@xxxxxxxxxxxxxxxxxxxx,
torvalds@xxxxxxxxxxxxxxxxxxxx,
stable@xxxxxxxxxxxxxxx
Cc: lwn@xxxxxxx,
jslaby@xxxxxxx,
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Subject: Linux 6.12.32
Date: Wed, 4 Jun 2025 15:07:27 +0200
Message-ID: <2025060428-exile-lubricate-e455@gregkh>
X-Mailer: git-send-email 2.49.0
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
I'm announcing the release of the 6.12.32 kernel.
All users of the 6.12 kernel series must upgrade.
The updated 6.12.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.12.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2
arch/arm64/boot/dts/qcom/ipq9574.dtsi | 2
arch/arm64/boot/dts/qcom/sa8775p.dtsi | 246 ----------
arch/arm64/boot/dts/qcom/sm8350.dtsi | 2
arch/arm64/boot/dts/qcom/sm8450.dtsi | 2
arch/arm64/boot/dts/qcom/sm8550.dtsi | 2
arch/arm64/boot/dts/qcom/sm8650.dtsi | 2
arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts | 4
arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts | 7
arch/arm64/boot/dts/qcom/x1e80100-qcp.dts | 6
arch/arm64/boot/dts/qcom/x1e80100.dtsi | 10
arch/arm64/boot/dts/ti/k3-am62-main.dtsi | 2
arch/arm64/boot/dts/ti/k3-am62a-main.dtsi | 2
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi | 2
arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-imx219.dtso | 3
arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-ov5640.dtso | 2
arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-tevi-ov5640.dtso | 2
arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 2
arch/arm64/boot/dts/ti/k3-am68-sk-base-board.dts | 13
arch/arm64/boot/dts/ti/k3-j721e-sk-csi2-dual-imx219.dtso | 35 +
arch/arm64/boot/dts/ti/k3-j721e-sk.dts | 31 +
arch/arm64/boot/dts/ti/k3-j722s-evm.dts | 8
arch/arm64/boot/dts/ti/k3-j722s-main.dtsi | 4
arch/arm64/boot/dts/ti/k3-j784s4-j742s2-main-common.dtsi | 2
arch/um/Makefile | 1
drivers/char/tpm/tpm-buf.c | 6
drivers/dma/idxd/cdev.c | 4
drivers/gpio/gpio-virtuser.c | 12
drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_translation_helper.c | 20
drivers/gpu/drm/amd/display/dc/link/link_dpms.c | 13
drivers/gpu/drm/xe/regs/xe_gt_regs.h | 1
drivers/gpu/drm/xe/xe_lrc.c | 4
drivers/gpu/drm/xe/xe_lrc_types.h | 4
drivers/gpu/drm/xe/xe_wa.c | 4
drivers/hid/hid-ids.h | 4
drivers/hid/hid-quirks.c | 2
drivers/net/can/kvaser_pciefd.c | 81 +--
drivers/net/ethernet/ti/am65-cpsw-nuss.c | 2
drivers/nvme/host/pci.c | 2
drivers/perf/arm-cmn.c | 11
drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c | 2
drivers/phy/starfive/phy-jh7110-usb.c | 7
drivers/platform/x86/fujitsu-laptop.c | 33 +
drivers/platform/x86/thinkpad_acpi.c | 7
drivers/spi/spi-sun4i.c | 5
fs/coredump.c | 65 ++
fs/nfs/client.c | 2
fs/nfs/dir.c | 15
fs/nfs/filelayout/filelayoutdev.c | 6
fs/nfs/flexfilelayout/flexfilelayoutdev.c | 6
fs/nfs/pnfs.h | 4
fs/nfs/pnfs_nfs.c | 9
fs/smb/server/oplock.c | 7
include/linux/coredump.h | 1
include/linux/nfs_fs_sb.h | 12
net/sched/sch_hfsc.c | 9
sound/pci/hda/patch_realtek.c | 5
57 files changed, 406 insertions(+), 353 deletions(-)
Alessandro Grassi (1):
spi: spi-sun4i: fix early activation
Algea Cao (1):
phy: phy-rockchip-samsung-hdptx: Fix PHY PLL output 50.25MHz error
Alok Tiwari (1):
arm64: dts: qcom: sm8350: Fix typo in pil_camera_mem node
Aradhya Bhatia (1):
drm/xe/xe2hpg: Add Wa_22021007897
Aurabindo Pillai (1):
drm/amd/display: check stream id dml21 wrapper to get plane_id
Axel Forsman (1):
can: kvaser_pciefd: Force IRQ edge in case of nested IRQ
Christian Brauner (2):
coredump: fix error handling for replace_fd()
coredump: hand a pidfd to the usermode coredump helper
George Shen (1):
drm/amd/display: fix link_set_dpms_off multi-display MST corner case
Greg Kroah-Hartman (1):
Linux 6.12.32
Hal Feng (1):
phy: starfive: jh7110-usb: Fix USB 2.0 host occasional detection failure
Ilya Guterman (1):
nvme-pci: add NVME_QUIRK_NO_DEEPEST_PS quirk for SOLIDIGM P44 Pro
Jeff Layton (1):
nfs: don't share pNFS DS connections between net namespaces
Johan Hovold (2):
arm64: dts: qcom: x1e80100-qcp: mark l12b and l15b always-on
arm64: dts: qcom: x1e80100-yoga-slim7x: mark l12b and l15b always-on
John Chau (1):
platform/x86: thinkpad_acpi: Support also NEC Lavie X1475JAS
Judith Mendez (4):
arm64: dts: ti: k3-am62-main: Set eMMC clock parent to default
arm64: dts: ti: k3-am62a-main: Set eMMC clock parent to default
arm64: dts: ti: k3-am62p-j722s-common-main: Set eMMC clock parent to default
arm64: dts: ti: k3-am65-main: Add missing taps to sdhci0
Kailang Yang (1):
ALSA: hda/realtek - restore auto-mute mode for Dell Chrome platform
Karthik Sanagavarapu (1):
arm64: dts: qcom: sa8775p: Remove cdsp compute-cb@10
Ling Xu (1):
arm64: dts: qcom: sa8775p: Remove extra entries from the iommus property
Mark Pearson (1):
platform/x86: thinkpad_acpi: Ignore battery threshold change event notification
Markus Burri (1):
gpio: virtuser: fix potential out-of-bound write
Masahiro Yamada (1):
um: let 'make clean' properly clean underlying SUBARCH as well
Milton Barrera (1):
HID: quirks: Add ADATA XPG alpha wireless mouse support
Namjae Jeon (1):
ksmbd: use list_first_entry_or_null for opinfo_get_list()
Nishanth Menon (1):
net: ethernet: ti: am65-cpsw: Lower random mac address error print to info
Pedro Tammela (1):
net_sched: hfsc: Address reentrant enqueue adding class to eltree twice
Purva Yeshi (2):
dmaengine: idxd: cdev: Fix uninitialized use of sva in idxd_cdev_open
char: tpm: tpm-buf: Add sanity check fallback in read helpers
Robin Murphy (3):
perf/arm-cmn: Fix REQ2/SNP2 mixup
perf/arm-cmn: Initialise cmn->cpu earlier
perf/arm-cmn: Add CMN S3 ACPI binding
Siddharth Vadapalli (3):
arm64: dts: ti: k3-j722s-evm: Enable "serdes_wiz0" and "serdes_wiz1"
arm64: dts: ti: k3-j722s-main: Disable "serdes_wiz0" and "serdes_wiz1"
arm64: dts: ti: k3-j784s4-j742s2-main-common: Fix length of serdes_ln_ctrl
Stephan Gerhold (8):
arm64: dts: qcom: ipq9574: Add missing properties for cryptobam
arm64: dts: qcom: sm8450: Add missing properties for cryptobam
arm64: dts: qcom: sm8550: Add missing properties for cryptobam
arm64: dts: qcom: sm8650: Add missing properties for cryptobam
arm64: dts: qcom: x1e80100-asus-vivobook-s15: Fix vreg_l2j_1p2 voltage
arm64: dts: qcom: x1e80100-lenovo-yoga-slim7x: Fix vreg_l2j_1p2 voltage
arm64: dts: qcom: x1e80100-qcp: Fix vreg_l2j_1p2 voltage
arm64: dts: qcom: x1e80100: Fix video thermal zone
Trond Myklebust (1):
NFS: Avoid flushing data while holding directory locks in nfs_rename()
Umesh Nerlige Ramappa (1):
drm/xe: Save the gt pointer in lrc and drop the tile
Valtteri Koskivuori (1):
platform/x86: fujitsu-laptop: Support Lifebook S2110 hotkeys
Yemike Abhilash Chandra (7):
arm64: dts: ti: k3-am62x: Remove clock-names property from IMX219 overlay
arm64: dts: ti: k3-am62x: Rename I2C switch to I2C mux in IMX219 overlay
arm64: dts: ti: k3-am62x: Rename I2C switch to I2C mux in OV5640 overlay
arm64: dts: ti: k3-am68-sk: Fix regulator hierarchy
arm64: dts: ti: k3-j721e-sk: Add DT nodes for power regulators
arm64: dts: ti: k3-j721e-sk: Remove clock-names property from IMX219 overlay
arm64: dts: ti: k3-j721e-sk: Add requiried voltage supplies for IMX219
Return-Path: <linux-kernel+bounces-673239-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 0E43841E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:09:28 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id DC473189921A
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:09:15 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 0760F28FFF2;
Wed, 4 Jun 2025 13:07:29 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="f8yj+ydC"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 249C028FAB7;
Wed, 4 Jun 2025 13:07:23 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749042444; cv=none; b=JXh3d67nTxD+FQm4faIFTkzUG2AQrPXVM3AVaDqlDT46peT6ydB/d07EdBK5SF8Lv8+nKx8klRgwhbvbazvb2rydWT4SEe8p9uKsldQfdsjuwyoUihpaqSGzV2vYkj0anVlB+idk4gvep9nWEeqJotrNQUpCVDBhaTEbuD7vQ4Y=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749042444; c=relaxed/simple;
bh=jRxBzdjyiXwO84RFHzQhUM/LnC+aLffYcd39nJ0bwoE=;
h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=sw0MgeVZtsWdvp1O0Xhf1Xa1aPbEUr1Rtccs5UkfTqF285hf6dt055Ad9rd3Y3W3J67bXjoZY3op4pFnYMBqNzg5mhgPpP+TfHBSeeJp8tV03THjAbhsA1D1x4Cf8RHriUh5eeRHoxNA8lQOYeN7AQVOsfSppk6hRTX78mqhfMg=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=f8yj+ydC; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id D63F5C4CEE7;
Wed, 4 Jun 2025 13:07:22 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org;
s=korg; t=1749042443;
bh=jRxBzdjyiXwO84RFHzQhUM/LnC+aLffYcd39nJ0bwoE=;
h=From:To:Cc:Subject:Date:From;
b=f8yj+ydC7+qC3bjLnyGWwGiwVKHaZoEtr7wwGsOHn5mWyMjo/ckpMamFiQOWXrqAD
Km/MDyyhsWX5Qop+xyqw3Dla1/17L6Tw/hQnDKYMcFiuf5MP92sN3FCBJl6mPXf0nZ
H8XMbLHOEvXD6u7Mrxiol0Cz+1nZPPVTLimJOB80=
From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
To: linux-kernel@xxxxxxxxxxxxxxx,
akpm@xxxxxxxxxxxxxxxxxxxx,
torvalds@xxxxxxxxxxxxxxxxxxxx,
stable@xxxxxxxxxxxxxxx
Cc: lwn@xxxxxxx,
jslaby@xxxxxxx,
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Subject: Linux 6.6.93
Date: Wed, 4 Jun 2025 15:07:15 +0200
Message-ID: <2025060416-stroller-construct-ec65@gregkh>
X-Mailer: git-send-email 2.49.0
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
I'm announcing the release of the 6.6.93 kernel.
All users of the 6.6 kernel series must upgrade.
The updated 6.6.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.6.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Documentation/ABI/stable/sysfs-driver-dma-idxd | 6
Documentation/admin-guide/kernel-parameters.txt | 2
Documentation/driver-api/serial/driver.rst | 2
Documentation/hwmon/dell-smm-hwmon.rst | 14
Makefile | 2
arch/arm/boot/dts/nvidia/tegra114.dtsi | 2
arch/arm/mach-at91/pm.c | 21
arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts | 38
arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts | 14
arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi | 22
arch/arm64/boot/dts/marvell/armada-3720-uDPU.dtsi | 8
arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi | 2
arch/arm64/boot/dts/nvidia/tegra234-p3740-0002+p3701-0008.dts | 10
arch/arm64/boot/dts/qcom/ipq9574.dtsi | 2
arch/arm64/boot/dts/qcom/sm8350.dtsi | 2
arch/arm64/boot/dts/qcom/sm8450.dtsi | 2
arch/arm64/boot/dts/qcom/sm8550.dtsi | 2
arch/arm64/boot/dts/ti/k3-am68-sk-base-board.dts | 13
arch/arm64/boot/dts/xilinx/zynqmp-clk-ccf.dtsi | 15
arch/arm64/include/asm/cputype.h | 2
arch/arm64/include/asm/pgtable.h | 3
arch/arm64/kernel/proton-pack.c | 1
arch/mips/include/asm/ftrace.h | 16
arch/mips/kernel/pm-cps.c | 30
arch/powerpc/include/asm/mmzone.h | 1
arch/powerpc/kernel/prom_init.c | 4
arch/powerpc/mm/book3s64/radix_pgtable.c | 3
arch/powerpc/mm/numa.c | 2
arch/powerpc/perf/core-book3s.c | 20
arch/powerpc/perf/isa207-common.c | 4
arch/powerpc/platforms/pseries/iommu.c | 29
arch/riscv/include/asm/page.h | 12
arch/riscv/include/asm/pgtable.h | 2
arch/s390/hypfs/hypfs_diag_fs.c | 2
arch/um/Makefile | 1
arch/um/kernel/mem.c | 1
arch/x86/Makefile | 2
arch/x86/boot/genimage.sh | 5
arch/x86/entry/entry.S | 2
arch/x86/events/amd/ibs.c | 20
arch/x86/include/asm/bug.h | 5
arch/x86/include/asm/ibt.h | 4
arch/x86/include/asm/nmi.h | 2
arch/x86/include/asm/perf_event.h | 1
arch/x86/kernel/cpu/bugs.c | 10
arch/x86/kernel/nmi.c | 42
arch/x86/kernel/reboot.c | 10
arch/x86/kernel/traps.c | 82 -
arch/x86/mm/init.c | 9
arch/x86/mm/init_64.c | 15
arch/x86/mm/kaslr.c | 10
arch/x86/um/os-Linux/mcontext.c | 3
crypto/ahash.c | 4
crypto/algif_hash.c | 4
crypto/lzo-rle.c | 2
crypto/lzo.c | 2
crypto/skcipher.c | 1
drivers/accel/qaic/qaic_drv.c | 2
drivers/acpi/Kconfig | 2
drivers/acpi/acpi_pnp.c | 2
drivers/acpi/hed.c | 7
drivers/auxdisplay/charlcd.c | 5
drivers/auxdisplay/charlcd.h | 5
drivers/auxdisplay/hd44780.c | 2
drivers/auxdisplay/lcd2s.c | 2
drivers/auxdisplay/panel.c | 2
drivers/bluetooth/btusb.c | 98 -
drivers/clk/clk-s2mps11.c | 3
drivers/clk/imx/clk-imx8mp.c | 151 ++
drivers/clk/qcom/Kconfig | 2
drivers/clk/qcom/camcc-sm8250.c | 56
drivers/clk/qcom/clk-alpha-pll.c | 52
drivers/clk/sunxi-ng/ccu-sun20i-d1.c | 44
drivers/clk/sunxi-ng/ccu_mp.h | 22
drivers/clocksource/mips-gic-timer.c | 6
drivers/cpufreq/cpufreq-dt-platdev.c | 1
drivers/cpufreq/tegra186-cpufreq.c | 7
drivers/cpuidle/governors/menu.c | 13
drivers/crypto/marvell/octeontx2/otx2_cptvf_reqmgr.c | 7
drivers/dma/fsl-edma-main.c | 2
drivers/dma/idxd/cdev.c | 20
drivers/dma/idxd/dma.c | 6
drivers/dma/idxd/idxd.h | 9
drivers/dma/idxd/sysfs.c | 34
drivers/edac/ie31200_edac.c | 28
drivers/firmware/arm_ffa/bus.c | 1
drivers/firmware/arm_ffa/driver.c | 8
drivers/firmware/arm_scmi/bus.c | 19
drivers/fpga/altera-cvp.c | 2
drivers/gpio/gpio-pca953x.c | 111 -
drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c | 30
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 7
drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 10
drivers/gpu/drm/amd/amdgpu/mmhub_v1_7.c | 25
drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c | 27
drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c | 31
drivers/gpu/drm/amd/amdgpu/nv.c | 16
drivers/gpu/drm/amd/amdgpu/soc21.c | 10
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 39
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager_cik.c | 69
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager_vi.c | 71 -
drivers/gpu/drm/amd/amdkfd/kfd_process.c | 16
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c | 22
drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c | 15
drivers/gpu/drm/amd/display/dc/core/dc.c | 1
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 3
drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c | 11
drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c | 42
drivers/gpu/drm/amd/display/dc/inc/core_types.h | 2
drivers/gpu/drm/amd/display/dc/link/link_dpms.c | 13
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c | 33
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_phy.c | 8
drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training_8b_10b.c | 7
drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c | 25
drivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_9_4_1_offset.h | 32
drivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_9_4_1_sh_mask.h | 48
drivers/gpu/drm/ast/ast_mode.c | 10
drivers/gpu/drm/bridge/adv7511/adv7511_audio.c | 2
drivers/gpu/drm/drm_atomic_helper.c | 28
drivers/gpu/drm/drm_edid.c | 1
drivers/gpu/drm/drm_gem.c | 4
drivers/gpu/drm/mediatek/mtk_dpi.c | 5
drivers/gpu/drm/panel/panel-edp.c | 1
drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 6
drivers/gpu/drm/v3d/v3d_drv.c | 25
drivers/hid/hid-ids.h | 4
drivers/hid/hid-quirks.c | 2
drivers/hid/usbhid/usbkbd.c | 2
drivers/hwmon/dell-smm-hwmon.c | 5
drivers/hwmon/gpio-fan.c | 16
drivers/hwmon/xgene-hwmon.c | 2
drivers/hwtracing/intel_th/Kconfig | 1
drivers/hwtracing/intel_th/msu.c | 31
drivers/i2c/busses/i2c-designware-common.c | 1
drivers/i2c/busses/i2c-designware-core.h | 5
drivers/i2c/busses/i2c-designware-master.c | 43
drivers/i2c/busses/i2c-designware-pcidrv.c | 40
drivers/i2c/busses/i2c-designware-platdrv.c | 54
drivers/i2c/busses/i2c-designware-slave.c | 3
drivers/i2c/busses/i2c-pxa.c | 5
drivers/i2c/busses/i2c-qup.c | 36
drivers/i3c/master/svc-i3c-master.c | 4
drivers/infiniband/core/umem.c | 36
drivers/infiniband/core/uverbs_cmd.c | 144 +-
drivers/infiniband/core/verbs.c | 11
drivers/input/joystick/xpad.c | 3
drivers/iommu/amd/io_pgtable_v2.c | 2
drivers/iommu/dma-iommu.c | 28
drivers/leds/rgb/leds-pwm-multicolor.c | 5
drivers/leds/trigger/ledtrig-netdev.c | 16
drivers/mailbox/mailbox.c | 7
drivers/mailbox/pcc.c | 8
drivers/md/dm-cache-target.c | 24
drivers/md/dm-table.c | 4
drivers/md/dm.c | 8
drivers/media/i2c/adv7180.c | 34
drivers/media/i2c/imx219.c | 2
drivers/media/i2c/tc358746.c | 19
drivers/media/platform/qcom/camss/camss-csid.c | 60
drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.c | 3
drivers/media/test-drivers/vivid/vivid-kthread-cap.c | 11
drivers/media/test-drivers/vivid/vivid-kthread-out.c | 11
drivers/media/test-drivers/vivid/vivid-kthread-touch.c | 11
drivers/media/test-drivers/vivid/vivid-sdr-cap.c | 11
drivers/media/usb/cx231xx/cx231xx-417.c | 2
drivers/media/usb/uvc/uvc_ctrl.c | 77 -
drivers/media/usb/uvc/uvc_v4l2.c | 6
drivers/media/v4l2-core/v4l2-subdev.c | 2
drivers/mfd/tps65219.c | 7
drivers/mmc/host/dw_mmc-exynos.c | 41
drivers/mmc/host/sdhci-pci-core.c | 6
drivers/mmc/host/sdhci.c | 9
drivers/net/bonding/bond_main.c | 2
drivers/net/can/c_can/c_can_platform.c | 2
drivers/net/can/kvaser_pciefd.c | 88 -
drivers/net/can/slcan/slcan-core.c | 26
drivers/net/ethernet/amd/pds_core/core.c | 5
drivers/net/ethernet/amd/pds_core/core.h | 2
drivers/net/ethernet/apm/xgene-v2/main.c | 4
drivers/net/ethernet/freescale/enetc/enetc.c | 16
drivers/net/ethernet/freescale/fec_main.c | 52
drivers/net/ethernet/intel/ice/ice_ethtool.c | 3
drivers/net/ethernet/intel/ice/ice_irq.c | 25
drivers/net/ethernet/intel/ice/ice_lag.c | 6
drivers/net/ethernet/intel/ice/ice_lib.c | 2
drivers/net/ethernet/intel/ice/ice_virtchnl.c | 1
drivers/net/ethernet/marvell/octeontx2/af/cgx.c | 14
drivers/net/ethernet/marvell/octeontx2/af/rvu.h | 2
drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c | 24
drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c | 11
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c | 8
drivers/net/ethernet/mediatek/mtk_ppe_offload.c | 22
drivers/net/ethernet/mellanox/mlx4/alloc.c | 6
drivers/net/ethernet/mellanox/mlx4/en_tx.c | 2
drivers/net/ethernet/mellanox/mlx5/core/en.h | 2
drivers/net/ethernet/mellanox/mlx5/core/en/params.c | 15
drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 7
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 5
drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c | 3
drivers/net/ethernet/mellanox/mlx5/core/esw/legacy.c | 2
drivers/net/ethernet/mellanox/mlx5/core/events.c | 11
drivers/net/ethernet/mellanox/mlx5/core/fs_ft_pool.c | 6
drivers/net/ethernet/mellanox/mlx5/core/fs_ft_pool.h | 2
drivers/net/ethernet/mellanox/mlx5/core/health.c | 1
drivers/net/ethernet/mellanox/mlx5/core/lib/fs_chains.c | 3
drivers/net/ethernet/microchip/lan743x_main.c | 19
drivers/net/ethernet/microsoft/mana/gdma_main.c | 2
drivers/net/ethernet/realtek/r8169_main.c | 1
drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c | 2
drivers/net/ethernet/ti/am65-cpsw-nuss.c | 2
drivers/net/ethernet/ti/cpsw_new.c | 1
drivers/net/ieee802154/ca8210.c | 9
drivers/net/phy/phylink.c | 2
drivers/net/usb/r8152.c | 1
drivers/net/vxlan/vxlan_core.c | 36
drivers/net/wireless/ath/ath12k/core.h | 1
drivers/net/wireless/ath/ath12k/dp_tx.c | 6
drivers/net/wireless/ath/ath12k/hal_desc.h | 2
drivers/net/wireless/ath/ath12k/pci.c | 13
drivers/net/wireless/ath/ath12k/wmi.c | 4
drivers/net/wireless/ath/ath9k/init.c | 4
drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c | 10
drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 2
drivers/net/wireless/mediatek/mt76/mt76.h | 1
drivers/net/wireless/mediatek/mt76/mt76_connac3_mac.h | 3
drivers/net/wireless/mediatek/mt76/mt76x0/pci.c | 3
drivers/net/wireless/mediatek/mt76/mt76x0/usb.c | 3
drivers/net/wireless/mediatek/mt76/mt76x2/pci.c | 3
drivers/net/wireless/mediatek/mt76/mt76x2/usb.c | 3
drivers/net/wireless/mediatek/mt76/mt7996/mac.c | 4
drivers/net/wireless/mediatek/mt76/tx.c | 3
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 17
drivers/net/wireless/realtek/rtw88/mac.c | 6
drivers/net/wireless/realtek/rtw88/main.c | 40
drivers/net/wireless/realtek/rtw88/reg.h | 3
drivers/net/wireless/realtek/rtw88/rtw8822b.c | 14
drivers/net/wireless/realtek/rtw88/util.c | 3
drivers/net/wireless/realtek/rtw89/fw.c | 2
drivers/net/wireless/realtek/rtw89/regd.c | 2
drivers/net/wireless/realtek/rtw89/ser.c | 4
drivers/nvdimm/label.c | 3
drivers/nvme/host/pci.c | 8
drivers/nvme/target/tcp.c | 3
drivers/nvmem/core.c | 16
drivers/nvmem/qfprom.c | 26
drivers/nvmem/rockchip-otp.c | 17
drivers/pci/Kconfig | 6
drivers/pci/controller/dwc/pcie-designware-ep.c | 2
drivers/pci/controller/pcie-brcmstb.c | 5
drivers/pci/controller/vmd.c | 20
drivers/pci/setup-bus.c | 6
drivers/perf/arm-cmn.c | 10
drivers/perf/arm_pmuv3.c | 4
drivers/phy/phy-core.c | 7
drivers/phy/renesas/phy-rcar-gen3-usb2.c | 143 +-
drivers/phy/starfive/phy-jh7110-usb.c | 7
drivers/pinctrl/bcm/pinctrl-bcm281xx.c | 44
drivers/pinctrl/devicetree.c | 10
drivers/pinctrl/meson/pinctrl-meson.c | 2
drivers/pinctrl/qcom/pinctrl-apq8064.c | 2
drivers/pinctrl/qcom/pinctrl-apq8084.c | 2
drivers/pinctrl/qcom/pinctrl-ipq4019.c | 2
drivers/pinctrl/qcom/pinctrl-ipq5018.c | 2
drivers/pinctrl/qcom/pinctrl-ipq5332.c | 2
drivers/pinctrl/qcom/pinctrl-ipq6018.c | 2
drivers/pinctrl/qcom/pinctrl-ipq8064.c | 2
drivers/pinctrl/qcom/pinctrl-ipq8074.c | 2
drivers/pinctrl/qcom/pinctrl-ipq9574.c | 2
drivers/pinctrl/qcom/pinctrl-mdm9607.c | 2
drivers/pinctrl/qcom/pinctrl-mdm9615.c | 2
drivers/pinctrl/qcom/pinctrl-msm.c | 27
drivers/pinctrl/qcom/pinctrl-msm.h | 2
drivers/pinctrl/qcom/pinctrl-msm8226.c | 2
drivers/pinctrl/qcom/pinctrl-msm8660.c | 2
drivers/pinctrl/qcom/pinctrl-msm8909.c | 2
drivers/pinctrl/qcom/pinctrl-msm8916.c | 2
drivers/pinctrl/qcom/pinctrl-msm8953.c | 2
drivers/pinctrl/qcom/pinctrl-msm8960.c | 2
drivers/pinctrl/qcom/pinctrl-msm8976.c | 2
drivers/pinctrl/qcom/pinctrl-msm8994.c | 2
drivers/pinctrl/qcom/pinctrl-msm8996.c | 2
drivers/pinctrl/qcom/pinctrl-msm8998.c | 2
drivers/pinctrl/qcom/pinctrl-msm8x74.c | 2
drivers/pinctrl/qcom/pinctrl-qcm2290.c | 2
drivers/pinctrl/qcom/pinctrl-qcs404.c | 2
drivers/pinctrl/qcom/pinctrl-qdf2xxx.c | 2
drivers/pinctrl/qcom/pinctrl-qdu1000.c | 2
drivers/pinctrl/qcom/pinctrl-sa8775p.c | 2
drivers/pinctrl/qcom/pinctrl-sc7180.c | 2
drivers/pinctrl/qcom/pinctrl-sc7280.c | 2
drivers/pinctrl/qcom/pinctrl-sc8180x.c | 2
drivers/pinctrl/qcom/pinctrl-sc8280xp.c | 2
drivers/pinctrl/qcom/pinctrl-sdm660.c | 2
drivers/pinctrl/qcom/pinctrl-sdm670.c | 2
drivers/pinctrl/qcom/pinctrl-sdm845.c | 2
drivers/pinctrl/qcom/pinctrl-sdx55.c | 2
drivers/pinctrl/qcom/pinctrl-sdx65.c | 2
drivers/pinctrl/qcom/pinctrl-sdx75.c | 2
drivers/pinctrl/qcom/pinctrl-sm6115.c | 2
drivers/pinctrl/qcom/pinctrl-sm6125.c | 2
drivers/pinctrl/qcom/pinctrl-sm6350.c | 2
drivers/pinctrl/qcom/pinctrl-sm6375.c | 2
drivers/pinctrl/qcom/pinctrl-sm7150.c | 2
drivers/pinctrl/qcom/pinctrl-sm8150.c | 2
drivers/pinctrl/qcom/pinctrl-sm8250.c | 2
drivers/pinctrl/qcom/pinctrl-sm8350.c | 2
drivers/pinctrl/qcom/pinctrl-sm8450.c | 2
drivers/pinctrl/qcom/pinctrl-sm8550.c | 2
drivers/pinctrl/tegra/pinctrl-tegra.c | 59
drivers/pinctrl/tegra/pinctrl-tegra.h | 6
drivers/platform/x86/dell/dell-wmi-sysman/passobj-attributes.c | 2
drivers/platform/x86/fujitsu-laptop.c | 33
drivers/platform/x86/thinkpad_acpi.c | 7
drivers/pmdomain/imx/gpcv2.c | 2
drivers/regulator/ad5398.c | 12
drivers/remoteproc/qcom_wcnss.c | 34
drivers/rtc/rtc-ds1307.c | 4
drivers/rtc/rtc-rv3032.c | 2
drivers/s390/crypto/vfio_ap_ops.c | 72 -
drivers/scsi/lpfc/lpfc_hbadisc.c | 17
drivers/scsi/lpfc/lpfc_init.c | 2
drivers/scsi/mpi3mr/mpi3mr_fw.c | 3
drivers/scsi/mpt3sas/mpt3sas_ctl.c | 12
drivers/scsi/st.c | 29
drivers/scsi/st.h | 2
drivers/soc/apple/rtkit-internal.h | 1
drivers/soc/apple/rtkit.c | 58
drivers/soc/ti/k3-socinfo.c | 13
drivers/soundwire/amd_manager.c | 2
drivers/soundwire/bus.c | 9
drivers/spi/spi-fsl-dspi.c | 46
drivers/spi/spi-rockchip.c | 2
drivers/spi/spi-sun4i.c | 5
drivers/spi/spi-zynqmp-gqspi.c | 20
drivers/target/iscsi/iscsi_target.c | 2
drivers/target/target_core_spc.c | 14
drivers/thermal/intel/x86_pkg_temp_thermal.c | 1
drivers/thermal/qoriq_thermal.c | 13
drivers/thunderbolt/retimer.c | 8
drivers/tty/serial/8250/8250_port.c | 2
drivers/tty/serial/atmel_serial.c | 2
drivers/tty/serial/imx.c | 2
drivers/tty/serial/serial_mctrl_gpio.c | 34
drivers/tty/serial/serial_mctrl_gpio.h | 17
drivers/tty/serial/sh-sci.c | 98 +
drivers/tty/serial/stm32-usart.c | 2
drivers/ufs/core/ufshcd.c | 29
drivers/usb/host/xhci-ring.c | 12
drivers/vdpa/mlx5/net/mlx5_vnet.c | 3
drivers/vfio/pci/vfio_pci_config.c | 3
drivers/vfio/pci/vfio_pci_core.c | 10
drivers/vfio/pci/vfio_pci_intrs.c | 2
drivers/vhost/scsi.c | 23
drivers/video/fbdev/core/bitblit.c | 5
drivers/video/fbdev/core/fbcon.c | 10
drivers/video/fbdev/core/fbcon.h | 38
drivers/video/fbdev/core/fbcon_ccw.c | 5
drivers/video/fbdev/core/fbcon_cw.c | 5
drivers/video/fbdev/core/fbcon_ud.c | 5
drivers/video/fbdev/core/tileblit.c | 45
drivers/video/fbdev/fsl-diu-fb.c | 1
drivers/virtio/virtio_ring.c | 2
drivers/watchdog/aspeed_wdt.c | 81 +
drivers/xen/platform-pci.c | 4
drivers/xen/xenbus/xenbus_probe.c | 14
fs/btrfs/block-group.c | 18
fs/btrfs/discard.c | 34
fs/btrfs/disk-io.c | 28
fs/btrfs/extent_io.c | 7
fs/btrfs/relocation.c | 6
fs/btrfs/scrub.c | 4
fs/btrfs/send.c | 6
fs/coredump.c | 81 +
fs/dlm/lowcomms.c | 4
fs/ext4/balloc.c | 4
fs/ext4/ext4.h | 5
fs/ext4/extents.c | 19
fs/ext4/inode.c | 81 -
fs/ext4/page-io.c | 16
fs/ext4/super.c | 19
fs/f2fs/sysfs.c | 74 -
fs/fuse/dir.c | 2
fs/gfs2/glock.c | 11
fs/jbd2/recovery.c | 11
fs/namespace.c | 6
fs/nfs/client.c | 2
fs/nfs/delegation.c | 3
fs/nfs/dir.c | 15
fs/nfs/filelayout/filelayoutdev.c | 6
fs/nfs/flexfilelayout/flexfilelayout.c | 1
fs/nfs/flexfilelayout/flexfilelayoutdev.c | 6
fs/nfs/inode.c | 2
fs/nfs/internal.h | 5
fs/nfs/nfs3proc.c | 2
fs/nfs/nfs4proc.c | 9
fs/nfs/nfs4state.c | 10
fs/nfs/pnfs.h | 4
fs/nfs/pnfs_nfs.c | 9
fs/orangefs/inode.c | 7
fs/pstore/inode.c | 2
fs/pstore/internal.h | 4
fs/pstore/platform.c | 11
fs/smb/client/cifsacl.c | 17
fs/smb/client/cifspdu.h | 5
fs/smb/client/cifsproto.h | 7
fs/smb/client/cifssmb.c | 57
fs/smb/client/connect.c | 30
fs/smb/client/fs_context.c | 2
fs/smb/client/fs_context.h | 3
fs/smb/client/link.c | 8
fs/smb/client/readdir.c | 7
fs/smb/client/smb1ops.c | 228 ++-
fs/smb/client/smb2file.c | 11
fs/smb/client/smb2ops.c | 30
fs/smb/client/transport.c | 2
fs/smb/common/smb2pdu.h | 3
fs/smb/server/oplock.c | 7
fs/smb/server/vfs.c | 14
include/crypto/hash.h | 3
include/drm/drm_atomic.h | 23
include/drm/drm_gem.h | 13
include/linux/bpf-cgroup.h | 1
include/linux/coredump.h | 1
include/linux/dma-mapping.h | 12
include/linux/highmem.h | 6
include/linux/hrtimer.h | 1
include/linux/ipv6.h | 1
include/linux/lzo.h | 8
include/linux/mlx4/device.h | 2
include/linux/mlx5/fs.h | 2
include/linux/msi.h | 33
include/linux/nfs_fs_sb.h | 12
include/linux/page-flags.h | 7
include/linux/perf_event.h | 8
include/linux/rcupdate.h | 2
include/linux/rcutree.h | 2
include/linux/trace.h | 4
include/linux/trace_seq.h | 8
include/linux/usb/r8152.h | 1
include/media/v4l2-subdev.h | 4
include/net/af_unix.h | 49
include/net/scm.h | 11
include/net/xfrm.h | 1
include/rdma/uverbs_std_types.h | 2
include/sound/hda_codec.h | 1
include/sound/pcm.h | 2
include/trace/events/btrfs.h | 2
include/uapi/linux/bpf.h | 1
include/uapi/linux/idxd.h | 1
include/ufs/ufs_quirks.h | 6
io_uring/fdinfo.c | 4
io_uring/io_uring.c | 1
kernel/bpf/cgroup.c | 33
kernel/bpf/hashtab.c | 2
kernel/bpf/syscall.c | 7
kernel/bpf/verifier.c | 4
kernel/cgroup/cgroup.c | 2
kernel/events/core.c | 33
kernel/events/hw_breakpoint.c | 5
kernel/events/ring_buffer.c | 1
kernel/fork.c | 9
kernel/padata.c | 3
kernel/printk/printk.c | 14
kernel/rcu/tree_plugin.h | 22
kernel/sched/fair.c | 6
kernel/softirq.c | 18
kernel/time/hrtimer.c | 103 +
kernel/time/posix-timers.c | 1
kernel/time/timer_list.c | 4
kernel/trace/trace.c | 11
kernel/trace/trace.h | 16
lib/dynamic_queue_limits.c | 2
lib/lzo/Makefile | 2
lib/lzo/lzo1x_compress.c | 102 +
lib/lzo/lzo1x_compress_safe.c | 18
mm/memcontrol.c | 6
mm/page_alloc.c | 8
net/Makefile | 2
net/bluetooth/l2cap_core.c | 15
net/bridge/br_mdb.c | 2
net/bridge/br_nf_core.c | 7
net/bridge/br_private.h | 1
net/can/bcm.c | 79 -
net/core/pktgen.c | 13
net/core/scm.c | 17
net/ipv4/esp4.c | 49
net/ipv4/fib_frontend.c | 18
net/ipv4/fib_rules.c | 4
net/ipv4/fib_trie.c | 22
net/ipv4/inet_hashtables.c | 37
net/ipv4/ip_gre.c | 16
net/ipv4/tcp_input.c | 56
net/ipv6/esp6.c | 49
net/ipv6/fib6_rules.c | 4
net/ipv6/ip6_output.c | 9
net/llc/af_llc.c | 8
net/mac80211/mlme.c | 4
net/netfilter/nf_conntrack_standalone.c | 12
net/sched/sch_hfsc.c | 15
net/smc/smc_pnet.c | 8
net/sunrpc/clnt.c | 3
net/sunrpc/rpcb_clnt.c | 5
net/sunrpc/sched.c | 2
net/tipc/crypto.c | 5
net/unix/Kconfig | 5
net/unix/Makefile | 2
net/unix/af_unix.c | 120 +
net/unix/garbage.c | 691 ++++++----
net/unix/scm.c | 161 --
net/unix/scm.h | 10
net/xfrm/xfrm_policy.c | 3
net/xfrm/xfrm_state.c | 6
samples/bpf/Makefile | 2
scripts/config | 26
scripts/kconfig/merge_config.sh | 4
security/integrity/ima/ima_main.c | 4
security/smack/smackfs.c | 21
sound/core/oss/pcm_oss.c | 3
sound/core/pcm_native.c | 11
sound/core/seq/seq_clientmgr.c | 5
sound/core/seq/seq_memory.c | 1
sound/pci/hda/hda_beep.c | 15
sound/pci/hda/patch_realtek.c | 77 +
sound/soc/codecs/cs42l43-jack.c | 7
sound/soc/codecs/mt6359-accdet.h | 9
sound/soc/codecs/pcm3168a.c | 6
sound/soc/codecs/rt722-sdca-sdw.c | 49
sound/soc/codecs/tas2764.c | 53
sound/soc/fsl/imx-card.c | 2
sound/soc/intel/boards/bytcr_rt5640.c | 13
sound/soc/mediatek/mt8188/mt8188-afe-clk.c | 8
sound/soc/mediatek/mt8188/mt8188-afe-clk.h | 8
sound/soc/mediatek/mt8188/mt8188-afe-pcm.c | 4
sound/soc/qcom/sm8250.c | 3
sound/soc/soc-dai.c | 8
sound/soc/soc-ops.c | 29
sound/soc/sof/ipc4-control.c | 11
sound/soc/sof/ipc4-pcm.c | 3
sound/soc/sof/topology.c | 18
sound/soc/sunxi/sun4i-codec.c | 53
tools/bpf/bpftool/common.c | 3
tools/build/Makefile.build | 6
tools/include/uapi/linux/bpf.h | 1
tools/lib/bpf/libbpf.c | 2
tools/net/ynl/lib/ynl.c | 2
tools/objtool/check.c | 21
tools/testing/kunit/qemu_configs/x86_64.py | 4
tools/testing/selftests/bpf/prog_tests/sockmap_ktls.c | 1
tools/testing/selftests/net/forwarding/bridge_mdb.sh | 2
tools/testing/selftests/net/gro.sh | 3
551 files changed, 5714 insertions(+), 2737 deletions(-)
Aaron Kling (1):
cpufreq: tegra186: Share policy per cluster
Ahmad Fatoum (2):
clk: imx8mp: inform CCF of maximum frequency of clocks
pmdomain: imx: gpcv2: use proper helper for property detection
Al Viro (2):
hypfs_create_cpu_files(): add missing check for hypfs_mkdir() failure
__legitimize_mnt(): check for MNT_SYNC_UMOUNT should be under mount_lock
Aleksander Jan Bajkowski (1):
r8152: add vendor/device ID pair for Dell Alienware AW1022z
Alessandro Grassi (1):
spi: spi-sun4i: fix early activation
Alex Deucher (1):
drm/amd/display/dm: drop hw_support check in amdgpu_dm_i2c_xfer()
Alex Williamson (1):
vfio/pci: Handle INTx IRQ_NOTCONNECTED
Alexander Stein (1):
hwmon: (gpio-fan) Add missing mutex locks
Alexander Sverdlin (1):
net: ethernet: ti: cpsw_new: populate netdev of_node
Alexandre Belloni (2):
rtc: rv3032: fix EERD location
rtc: ds1307: stop disabling alarms on probe
Alexei Lazar (1):
net/mlx5: Extend Ethtool loopback selftest to support non-linear SKB
Alexey Dobriyan (1):
x86/boot: Compile boot code with -std=gnu11 too
Alexey Klimov (1):
ASoC: qcom: sm8250: explicitly set format in sm8250_be_hw_params_fixup()
Alexis Lothoré (1):
serial: mctrl_gpio: split disable_ms into sync and no_sync APIs
Alice Guo (1):
thermal/drivers/qoriq: Power down TMU on system suspend
Alistair Francis (1):
nvmet-tcp: don't restore null sk_state_change
Alok Tiwari (1):
arm64: dts: qcom: sm8350: Fix typo in pil_camera_mem node
Andre Przywara (1):
clk: sunxi-ng: d1: Add missing divider for MMC mod clocks
Andreas Gruenbacher (1):
gfs2: Check for empty queue in run_queue
Andreas Schwab (1):
powerpc/prom_init: Fixup missing #size-cells on PowerBook6,7
Andrew Davis (1):
soc: ti: k3-socinfo: Do not use syscon helper to build regmap
Andrey Vatoropin (1):
hwmon: (xgene-hwmon) use appropriate type for the latency value
André Draszik (1):
clk: s2mps11: initialise clk_hw_onecell_data::num before accessing ::hws[] in probe()
Andy Shevchenko (7):
gpio: pca953x: Split pca953x_restore_context() and pca953x_save_context()
gpio: pca953x: Simplify code with cleanup helpers
i2c: designware: Remove ->disable() callback
i2c: designware: Use temporary variable for struct device
tracing: Mark binary printing functions with __printf() attribute
auxdisplay: charlcd: Partially revert "Move hwidth and bwidth to struct hd44780_common"
ieee802154: ca8210: Use proper setters and getters for bitwise types
Andy Yan (1):
drm/rockchip: vop2: Add uv swap for cluster window
AngeloGioacchino Del Regno (1):
drm/mediatek: mtk_dpi: Add checks for reg_h_fre_con existence
Ankur Arora (3):
rcu: handle quiescent states for PREEMPT_RCU=n, PREEMPT_COUNT=y
rcu: handle unstable rdp in rcu_read_unlock_strict()
rcu: fix header guard for rcu_all_qs()
Anthony Krowiak (1):
s390/vfio-ap: Fix no AP queue sharing allowed message written to kernel log
Arnd Bergmann (3):
net: xgene-v2: remove incorrect ACPI_PTR annotation
EDAC/ie31200: work around false positive build warning
watchdog: aspeed: fix 64-bit division
Artur Weber (1):
pinctrl: bcm281xx: Use "unsigned int" instead of bare "unsigned"
Athira Rajeev (1):
arch/powerpc/perf: Check the instruction type before creating sample with perf_mem_data_src
Avula Sri Charan (1):
wifi: ath12k: Avoid napi_sync() before napi_enable()
Axel Forsman (2):
can: kvaser_pciefd: Continue parsing DMA buf after dropped RX
can: kvaser_pciefd: Force IRQ edge in case of nested IRQ
Balbir Singh (2):
x86/kaslr: Reduce KASLR entropy on most x86 systems
x86/mm/init: Handle the special case of device private pages in add_pages(), to not increase max_pfn and trigger dma_addressing_limited() bounce buffers bounce buffers
Baokun Li (2):
ext4: reject the 'data_err=abort' option in nojournal mode
ext4: do not convert the unwritten extents if data writeback fails
Benjamin Berg (1):
um: Store full CSGSFS and SS register from mcontext
Benjamin Lin (1):
wifi: mt76: mt7996: revise TXS size
Bibo Mao (1):
MIPS: Use arch specific syscall name match function
Bitterblue Smith (6):
wifi: rtw88: Fix rtw_init_vht_cap() for RTL8814AU
wifi: rtw88: Fix rtw_init_ht_cap() for RTL8814AU
wifi: rtw88: Fix rtw_desc_to_mcsrate() to handle MCS16-31
wifi: rtw88: Fix download_firmware_validate() for RTL8814AU
wifi: rtw88: Fix __rtw_download_firmware() for RTL8814AU
wifi: rtw88: Don't use static local variable in rtw8822b_set_tx_power_index_by_rate
Bogdan-Gabriel Roman (1):
spi: spi-fsl-dspi: Halt the module after a new message transfer
Boris Burkov (2):
btrfs: make btrfs_discard_workfn() block_group ref explicit
btrfs: check folio mapping after unlock in relocate_one_folio()
Brandon Kammerdiener (1):
bpf: fix possible endless loop in BPF map iteration
Brendan Jackman (1):
kunit: tool: Use qboot on QEMU x86_64
Breno Leitao (2):
x86/bugs: Make spectre user default depend on MITIGATION_SPECTRE_V2
memcg: always call cond_resched() after fn()
Brett Creeley (1):
pds_core: Prevent possible adminq overflow/stuck condition
Carlos Sanchez (1):
can: slcan: allow reception of short error messages
Carolina Jubran (1):
net/mlx5e: Avoid WARN_ON when configuring MQPRIO with HTB offload enabled
Cezary Rojewski (1):
ASoC: codecs: pcm3168a: Allow for 24-bit in provider mode
Chaohai Chen (1):
scsi: target: spc: Fix loop traversal in spc_rsoc_get_descr()
Charlene Liu (1):
drm/amd/display: remove minimum Dispclk and apply oem panel timing.
Charles Keepax (3):
ASoC: rt722-sdca: Add some missing readable registers
ASoC: cs42l43: Disable headphone clamps during type detection
soundwire: bus: Fix race on the creation of the IRQ domain
Chenyuan Yang (1):
ASoC: imx-card: Adjust over allocation of memory in imx_card_parse_of()
Chin-Ting Kuo (1):
watchdog: aspeed: Update bootstatus handling
Choong Yong Liang (1):
net: phylink: use pl->link_interface in phylink_expects_phy()
Christian Brauner (2):
coredump: fix error handling for replace_fd()
coredump: hand a pidfd to the usermode coredump helper
Christian Göttsche (1):
ext4: reorder capability check last
Christophe JAILLET (1):
i2c: designware: Fix an error handling path in i2c_dw_pci_probe()
Claudiu Beznea (5):
phy: renesas: rcar-gen3-usb2: Add support to initialize the bus
phy: renesas: rcar-gen3-usb2: Move IRQ request in probe
phy: renesas: rcar-gen3-usb2: Lock around hardware registers and driver data
phy: renesas: rcar-gen3-usb2: Assert PLL reset on PHY power off
serial: sh-sci: Update the suspend/resume support
Cong Wang (1):
sch_hfsc: Fix qlen accounting bug when using peek in hfsc_enqueue()
Csókás, Bence (1):
net: fec: Refactor MAC reset to function
Dan Carpenter (1):
pinctrl: tegra: Fix off by one in tegra_pinctrl_get_group()
Daniel Gomez (1):
kconfig: merge_config: use an empty file as initfile
Dave Ertman (1):
ice: Fix LACP bonds without SRIOV environment
Dave Jiang (2):
dmaengine: idxd: add wq driver name support for accel-config user tool
dmaengine: idxd: Fix ->poll() return value
David Hildenbrand (1):
kernel/fork: only call untrack_pfn_clear() on VMAs duplicated for fork()
David Plowman (1):
media: i2c: imx219: Correct the minimum vblanking value
David Rosca (1):
drm/amdgpu: Update SRIOV video codec caps
David Wei (1):
tools: ynl-gen: validate 0 len strings from kernel
Depeng Shao (1):
media: qcom: camss: csid: Only add TPG v4l2 ctrl if TPG hardware is available
Diogo Ivo (2):
ACPI: PNP: Add Intel OC Watchdog IDs to non-PNP device list
arm64: tegra: p2597: Fix gpio for vdd-1v8-dis regulator
Dmitry Baryshkov (5):
nvmem: core: verify cell's raw_len
nvmem: core: update raw_len if the bit reading is required
nvmem: qfprom: switch to 4-byte aligned reads
phy: core: don't require set_mode() callback for phy_get_mode() to work
pinctrl: qcom: switch to devm_register_sys_off_handler()
Dmitry Bogdanov (1):
scsi: target: iscsi: Fix timeout on deleted connection
Dominik Grzegorzek (1):
padata: do not leak refcount in reorder_work
Dongli Zhang (1):
vhost-scsi: protect vq->log_used with vq->mutex
Douglas Anderson (1):
drm/panel-edp: Add Starry 116KHD024006
Ed Burcher (1):
ALSA: hda/realtek: Add quirk for Lenovo Yoga Pro 7 14ASP10
Eduard Zingerman (1):
bpf: don't do clean_live_states when state->loop_entry->branches > 0
Emanuele Ghidoli (1):
gpio: pca953x: fix IRQ storm on system wake up
En-Wei Wu (1):
Bluetooth: btusb: use skb_pull to avoid unsafe access in QCA dump handling
Eric Dumazet (2):
posix-timers: Add cond_resched() to posix_timer_add() search loop
tcp: bring back NUMA dispersion in inet_ehash_locks_alloc()
Eric Woudstra (1):
net: ethernet: mtk_ppe_offload: Allow QinQ, double ETH_P_8021Q only
Erick Shepherd (2):
mmc: host: Wait for Vdd to settle on card power off
mmc: sdhci: Disable SD card clock before changing parameters
Felix Fietkau (1):
wifi: mt76: only mark tx-status-failed frames as ACKed on mt76x0/2
Felix Kuehling (1):
drm/amdgpu: Allow P2P access through XGMI
Filipe Manana (3):
btrfs: fix non-empty delayed iputs list on unmount due to async workers
btrfs: get zone unusable bytes while holding lock at btrfs_reclaim_bgs_work()
btrfs: send: return -ENAMETOOLONG when attempting a path that is too long
Frank Li (2):
PCI: dwc: ep: Ensure proper iteration over outbound map windows
i3c: master: svc: Flush FIFO before sending Dynamic Address Assignment(DAA)
Frederic Weisbecker (1):
hrtimers: Force migrate away hrtimers queued after CPUHP_AP_HRTIMERS_DYING
Frederick Lawler (1):
ima: process_measurement() needlessly takes inode_lock() on MAY_READ
Frediano Ziglio (1):
xen: Add support for XenServer 6.1 platform device
Gabor Juhos (1):
arm64: dts: marvell: uDPU: define pinctrl state for alarm LEDs
Gaurav Batra (1):
powerpc/pseries/iommu: memory notifier incorrectly adds TCEs for pmemory
Geert Uytterhoeven (2):
ipv4: ip_gre: Fix set but not used warning in ipgre_err() if IPv4-only
serial: sh-sci: Save and restore more registers
Geetha sowjanya (1):
octeontx2-af: Fix APR entry mapping based on APR_LMT_CFG
George Shen (3):
drm/amd/display: Skip checking FRL_MODE bit for PCON BW determination
drm/amd/display: Update CR AUX RD interval interpretation
drm/amd/display: fix link_set_dpms_off multi-display MST corner case
Goldwyn Rodrigues (1):
btrfs: correct the order of prelim_ref arguments in btrfs__prelim_ref
Greg Kroah-Hartman (1):
Linux 6.6.93
Guangguan Wang (1):
net/smc: use the correct ndev to find pnetid by pnetid table
Hal Feng (1):
phy: starfive: jh7110-usb: Fix USB 2.0 host occasional detection failure
Hangbin Liu (1):
bonding: report duplicate MAC address in all situations
Hans Verkuil (2):
media: cx231xx: set device_caps for 417
media: test-drivers: vivid: don't call schedule in loop
Haoran Jiang (1):
samples/bpf: Fix compilation failure for samples/bpf on LoongArch Fedora
Hariprasad Kelam (1):
Octeontx2-af: RPM: Register driver with PCI subsys IDs
Harish Kasiviswanathan (2):
drm/amdkfd: Set per-process flags only once cik/vi
drm/amdgpu: Set snoop bit for SDMA for MI series
Harry VanZyllDeJong (1):
drm/amd/display: Add support for disconnected eDP streams
Hector Martin (4):
soc: apple: rtkit: Implement OSLog buffers properly
ASoC: tas2764: Add reg defaults for TAS2764_INT_CLK_CFG
ASoC: tas2764: Mark SW_RESET as volatile
ASoC: tas2764: Power up/down amp on mute ops
Heiko Stuebner (2):
nvmem: rockchip-otp: Move read-offset into variant-data
nvmem: rockchip-otp: add rk3576 variant data
Heiner Kallweit (1):
r8169: don't scan PHY addresses > 0
Heming Zhao (1):
dlm: make tcp still work in multi-link env
Herbert Xu (3):
crypto: lzo - Fix compression buffer overrun
crypto: ahash - Set default reqsize from ahash_alg
crypto: skcipher - Zap type in crypto_alloc_sync_skcipher
Ian Rogers (1):
tools/build: Don't pass test log files to linker
Ido Schimmel (2):
vxlan: Annotate FDB data races
bridge: netfilter: Fix forwarding of fragmented packets
Ihor Solodrai (1):
selftests/bpf: Mitigate sockmap_ktls disconnect_after_delete failure
Ilia Gavrilov (1):
llc: fix data loss when reading from a socket in llc_ui_recvmsg()
Ilpo Järvinen (2):
tcp: reorganize tcp_in_ack_event() and tcp_count_delivered()
PCI: Fix old_size lower bound in calculate_iosize() too
Ilya Bakoulin (1):
drm/amd/display: Don't try AUX transactions on disconnected link
Ilya Guterman (1):
nvme-pci: add NVME_QUIRK_NO_DEEPEST_PS quirk for SOLIDIGM P44 Pro
Ingo Molnar (1):
x86/stackprotector/64: Only export __ref_stack_chk_guard on CONFIG_SMP
Isaac Scott (1):
regulator: ad5398: Add device tree support
Ivan Pravdin (1):
crypto: algif_hash - fix double free in hash_accept
Jacob Keller (1):
ice: fix vf->num_mac count with port representors
Jaegeuk Kim (1):
f2fs: introduce f2fs_base_attr for global sysfs entries
Jakub Kicinski (1):
eth: mlx4: don't try to complete XDP frames in netpoll
Jan Kara (1):
jbd2: do not try to recover wiped journal
Janne Grunau (1):
soc: apple: rtkit: Use high prio work queue
Jarkko Nikula (1):
i2c: designware: Uniform initialization flow for polling mode
Jason Andryuk (1):
xenbus: Allow PVH dom0 a non-local xenstore
Jason Gunthorpe (1):
genirq/msi: Store the IOMMU IOVA directly in msi_desc instead of iommu_cookie
Jeff Layton (1):
nfs: don't share pNFS DS connections between net namespaces
Jens Axboe (1):
io_uring/fdinfo: annotate racy sq/cq head/tail reads
Jernej Skrabec (1):
Revert "arm64: dts: allwinner: h6: Use RSB for AXP805 PMIC connection"
Jessica Zhang (1):
drm: Add valid clones check
Jiang Liu (1):
drm/amdgpu: reset psp->cmd to NULL after releasing the buffer
Jing Su (1):
dql: Fix dql->limit value when reset.
Jing Zhou (1):
drm/amd/display: Guard against setting dispclk low for dcn31x
Jinliang Zheng (1):
dm: fix unconditional IO throttle caused by REQ_PREFLUSH
Jinqian Yang (1):
arm64: Add support for HIP09 Spectre-BHB mitigation
Johannes Berg (4):
wifi: iwlwifi: fix debug actions order
wifi: mac80211: don't unconditionally call drv_mgd_complete_tx()
wifi: mac80211: remove misplaced drv_mgd_complete_tx() call
wifi: iwlwifi: add support for Killer on MTL
John Chau (1):
platform/x86: thinkpad_acpi: Support also NEC Lavie X1475JAS
Jon Hunter (1):
arm64: tegra: Resize aperture for the IGX PCIe C5 slot
Jordan Crouse (1):
clk: qcom: camcc-sm8250: Use clk_rcg2_shared_ops for some RCGs
Josh Poimboeuf (2):
objtool: Properly disable uaccess validation
objtool: Fix error handling inconsistencies in check()
Joshua Aberback (1):
drm/amd/display: Increase block_sequence array size
Justin Tee (2):
scsi: lpfc: Handle duplicate D_IDs in ndlp search-by D_ID routine
scsi: lpfc: Free phba irq in lpfc_sli4_enable_msi() when pci_irq_vector() fails
Kai Mäkisara (3):
scsi: st: Tighten the page format heuristics with MODE SELECT
scsi: st: ERASE does not change tape location
scsi: st: Restore some drive settings after reset
Kai Vehmanen (1):
ASoc: SOF: topology: connect DAI to a single DAI link
Karl Chan (1):
clk: qcom: ipq5018: allow it to be bulid on arm32
Kaustabh Chakraborty (1):
mmc: dw_mmc: add exynos7870 DW MMC support
Kees Cook (2):
net/mlx4_core: Avoid impossible mlx4_db_alloc() order value
pstore: Change kmsg_bytes storage size to u32
Kevin Krakauer (1):
selftests/net: have `gro.sh -t` return a correct exit code
Konstantin Andreev (2):
smack: recognize ipv4 CIPSO w/o categories
smack: Revert "smackfs: Added check catlen"
Konstantin Shkolnyy (1):
vdpa/mlx5: Fix mlx5_vdpa_get_config() endianness on big-endian machines
Konstantin Taranov (1):
net/mana: fix warning in the writer of client oob
Krzysztof Kozlowski (2):
can: c_can: Use of_property_present() to test existence of DT property
clk: qcom: clk-alpha-pll: Do not use random stack value for recalc rate
Kuhanh Murugasen Krishnan (1):
fpga: altera-cvp: Increase credit timeout
Kuninori Morimoto (1):
ASoC: soc-dai: check return value at snd_soc_dai_set_tdm_slot()
Kuniyuki Iwashima (26):
ipv4: fib: Move fib_valid_key_len() to rtm_to_fib_config().
ip: fib_rules: Fetch net from fib_rule in fib[46]_rule_configure().
af_unix: Return struct unix_sock from unix_get_socket().
af_unix: Run GC on only one CPU.
af_unix: Try to run GC async.
af_unix: Replace BUG_ON() with WARN_ON_ONCE().
af_unix: Remove io_uring code for GC.
af_unix: Remove CONFIG_UNIX_SCM.
af_unix: Allocate struct unix_vertex for each inflight AF_UNIX fd.
af_unix: Allocate struct unix_edge for each inflight AF_UNIX fd.
af_unix: Link struct unix_edge when queuing skb.
af_unix: Bulk update unix_tot_inflight/unix_inflight when queuing skb.
af_unix: Iterate all vertices by DFS.
af_unix: Detect Strongly Connected Components.
af_unix: Save listener for embryo socket.
af_unix: Fix up unix_edge.successor for embryo socket.
af_unix: Save O(n) setup of Tarjan's algo.
af_unix: Skip GC if no cycle exists.
af_unix: Avoid Tarjan's algorithm if unnecessary.
af_unix: Assign a unique index to SCC.
af_unix: Detect dead SCC.
af_unix: Replace garbage collection algorithm.
af_unix: Remove lock dance in unix_peek_fds().
af_unix: Try not to hold unix_gc_lock during accept().
af_unix: Don't access successor in unix_del_edges() during GC.
af_unix: Add dead flag to struct scm_fp_list.
Kurt Borja (1):
hwmon: (dell-smm) Increment the number of fans
Larisa Grigore (2):
spi: spi-fsl-dspi: restrict register range for regmap access
spi: spi-fsl-dspi: Reset SR flags before sending a new message
Leon Huang (1):
drm/amd/display: Fix incorrect DPCD configs while Replay/PSR switch
Li Bin (1):
ARM: at91: pm: fix at91_suspend_finish for ZQ calibration
Lorenzo Stoakes (1):
intel_th: avoid using deprecated page->mapping, index fields
Luis de Arquer (1):
spi-rockchip: Fix register out of bounds access
Luiz Augusto von Dentz (1):
Bluetooth: L2CAP: Fix not checking l2cap_chan security level
Maciej S. Szmigiero (1):
ALSA: hda/realtek: Enable PC beep passthrough for HP EliteBook 855 G7
Maher Sanalla (1):
RDMA/uverbs: Propagate errors from rdma_lookup_get_uobject()
Manish Pandey (1):
scsi: ufs: Introduce quirk to extend PA_HIBERN8TIME for UFS devices
Marcos Paulo de Souza (1):
printk: Check CON_SUSPEND when unblanking a console
Marek Szyprowski (1):
dma-mapping: avoid potential unused data compilation warning
Marek Vasut (1):
leds: trigger: netdev: Configure LED blink interval for HW offload
Mario Limonciello (1):
Revert "drm/amd: Keep display off while going into S4"
Mark Harmstone (1):
btrfs: avoid linker error in btrfs_find_create_tree_block()
Mark Pearson (1):
platform/x86: thinkpad_acpi: Ignore battery threshold change event notification
Markus Elfring (1):
media: c8sectpfe: Call of_node_put(i2c_bus) only once in c8sectpfe_probe()
Martin Blumenstingl (1):
pinctrl: meson: define the pull up/down resistor value as 60 kOhm
Martin Povišer (1):
ASoC: ops: Enforce platform maximum on initial value
Masahiro Yamada (1):
um: let 'make clean' properly clean underlying SUBARCH as well
Matt Johnston (1):
fuse: Return EPERM rather than ENOSYS from link()
Matthew Wilcox (Oracle) (2):
orangefs: Do not truncate file size
highmem: add folio_test_partial_kmap()
Matthias Fend (1):
media: tc358746: improve calculation of the D-PHY timing registers
Matti Lehtimäki (2):
remoteproc: qcom_wcnss: Handle platforms with only single power domain
remoteproc: qcom_wcnss: Fix on platforms without fallback regulators
Michael Margolin (1):
RDMA/core: Fix best page size finding when it can cross SG entries
Michal Luczaj (1):
af_unix: Fix garbage collection of embryos carrying OOB with SCM_RIGHTS
Michal Pecio (1):
usb: xhci: Don't change the status of stalled TDs on failed Stop EP
Michal Swiatkowski (2):
ice: treat dyn_allowed only as suggestion
ice: count combined queues using Rx/Tx count
Mika Westerberg (1):
thunderbolt: Do not add non-active NVM if NVM upgrade is disabled for retimer
Mike Christie (1):
vhost-scsi: Return queue full for page alloc failures during copy
Mikulas Patocka (1):
dm: restrict dm device size to 2^63-512 bytes
Milton Barrera (1):
HID: quirks: Add ADATA XPG alpha wireless mouse support
Ming-Hung Tsai (1):
dm cache: prevent BUG_ON by blocking retries on failed device resumes
Moshe Shemesh (1):
net/mlx5: Avoid report two health errors on same syndrome
Mykyta Yatsenko (1):
bpf: Return prog btf_id without capable check
Naman Trivedi (1):
arm64: zynqmp: add clock-output-names property in clock nodes
Namjae Jeon (3):
cifs: add validation check for the fields in smb_aces
ksmbd: fix stream write failure
ksmbd: use list_first_entry_or_null for opinfo_get_list()
Nandakumar Edamana (1):
libbpf: Fix out-of-bound read
Nathan Chancellor (1):
i3c: master: svc: Fix implicit fallthrough in svc_i3c_master_ibi_work()
Nicolas Bouchinet (1):
netfilter: conntrack: Bound nf_conntrack sysctl writes
Nicolas Bretz (1):
ext4: on a remount, only log the ro or r/w state when it has changed
Nicolas Escande (1):
wifi: ath12k: fix ath12k_hal_tx_cmd_ext_desc_setup() info1 override
Niklas Söderlund (1):
media: adv7180: Disable test-pattern control on adv7180
Nir Lichtman (1):
x86/build: Fix broken copy command in genimage.sh when making isoimage
Nishanth Menon (1):
net: ethernet: ti: am65-cpsw: Lower random mac address error print to info
Nícolas F. R. A. Prado (3):
ASoC: mediatek: mt6359: Add stub for mt6359_accdet_enable_jack_detect
ASoC: mediatek: mt8188: Treat DMIC_GAINx_CUR as non-volatile
ASoC: mediatek: mt8188: Add reference for dmic clocks
Oliver Hartkopp (2):
can: bcm: add locking for bcm_op runtime updates
can: bcm: add missing rcu read protection for procfs content
Olivier Moysan (1):
drm: bridge: adv7511: fill stream capabilities
P Praneesh (1):
wifi: ath12k: Fix end offset bit definition in monitor ring descriptor
Pali Rohár (6):
cifs: Add fallback for SMB2 CREATE without FILE_READ_ATTRIBUTES
cifs: Fix querying and creating MF symlinks over SMB1
cifs: Fix negotiate retry functionality
cifs: Fix establishing NetBIOS session for SMB2+ connection
cifs: Fix and improve cifs_query_path_info() and cifs_query_file_info()
cifs: Fix changing times and read-only attr over SMB1 smb_set_file_info() function
Patrisious Haddad (1):
net/mlx5: Change POOL_NEXT_SIZE define value and make it global
Paul Burton (2):
MIPS: pm-cps: Use per-CPU variables as per-CPU, not per-core
clocksource: mips-gic-timer: Enable counter when CPUs start
Paul Chaignon (1):
xfrm: Sanitize marks before insert
Paul Kocialkowski (1):
net: dwmac-sun8i: Use parsed internal PHY address instead of 1
Pavel Begunkov (1):
io_uring: fix overflow resched cqe reordering
Pedro Tammela (1):
net_sched: hfsc: Address reentrant enqueue adding class to eltree twice
Pengyu Luo (1):
cpufreq: Add SM8650 to cpufreq-dt-platdev blocklist
Peter Seiderer (2):
net: pktgen: fix mpls maximum labels list parsing
net: pktgen: fix access outside of user given buffer in pktgen_thread_write()
Peter Ujfalusi (2):
ASoC: SOF: ipc4-control: Use SOF_CTRL_CMD_BINARY as numid for bytes_ext
ASoC: SOF: ipc4-pcm: Delay reporting is only supported for playback direction
Peter Zijlstra (1):
x86/traps: Cleanup and robustify decode_bug()
Peter Zijlstra (Intel) (1):
perf: Avoid the read if the count is already updated
Petr Machata (2):
vxlan: Join / leave MC group after remote changes
bridge: mdb: Allow replace of a host-joined group
Philip Redkin (1):
x86/mm: Check return value from memblock_phys_alloc_range()
Philip Yang (1):
drm/amdkfd: KFD release_work possible circular locking
Ping-Ke Shih (2):
wifi: rtw89: fw: propagate error code from rtw89_h2c_tx()
wifi: rtw89: add wiphy_lock() to work that isn't held wiphy_lock() yet
Prathamesh Shete (1):
pinctrl-tegra: Restore SFSEL bit when freeing pins
Purva Yeshi (1):
dmaengine: idxd: cdev: Fix uninitialized use of sva in idxd_cdev_open
Qu Wenruo (2):
btrfs: run btrfs_error_commit_super() early
btrfs: avoid NULL pointer dereference if no valid csum tree
Rafael J. Wysocki (1):
cpuidle: menu: Avoid discarding useful information
Ramasamy Kaliappan (1):
wifi: ath12k: Improve BSS discovery with hidden SSID in 6 GHz band
Ranjan Kumar (1):
scsi: mpi3mr: Add level check to control event logging
Ravi Bangoria (2):
perf/amd/ibs: Fix perf_ibs_op.cnt_mask for CurCnt
perf/amd/ibs: Fix ->config to sample period calculation for OP PMU
Ricardo Ribalda (2):
media: uvcvideo: Add sanity check to uvc_ioctl_xu_ctrl_map
media: uvcvideo: Handle uvc menu translation inside uvc_get_le_value
Ritesh Harjani (IBM) (1):
book3s64/radix: Fix compile errors when CONFIG_ARCH_WANT_OPTIMIZE_DAX_VMEMMAP=n
Rob Herring (Arm) (1):
perf: arm_pmuv3: Call kvm_vcpu_pmu_resync_el0() before enabling counters
Robert Richter (1):
libnvdimm/labels: Fix divide error in nd_label_data_init()
Robin Murphy (2):
perf/arm-cmn: Fix REQ2/SNP2 mixup
perf/arm-cmn: Initialise cmn->cpu earlier
Roger Pau Monne (1):
PCI: vmd: Disable MSI remapping bypass under Xen
Rosen Penev (1):
wifi: ath9k: return by of_get_mac_address
Ryan Roberts (1):
arm64/mm: Check PUD_TYPE_TABLE in pud_bad()
Ryan Walklin (1):
ASoC: sun4i-codec: support hp-det-gpios property
Ryo Takakura (1):
lockdep: Fix wait context check on softirq for PREEMPT_RT
Sabrina Dubroca (1):
espintcp: remove encap socket caching to avoid reference leak
Sakari Ailus (1):
media: v4l: Memset argument to 0 before calling get_mbus_config pad op
Saket Kumar Bhaskar (1):
perf/hw_breakpoint: Return EOPNOTSUPP for unsupported breakpoint type
Samuel Holland (1):
riscv: Allow NOMMU kernels to access all of RAM
Sean Anderson (1):
spi: zynqmp-gqspi: Always acknowledge interrupts
Seyediman Seyedarab (1):
kbuild: fix argument parsing in scripts/config
Shahar Shitrit (2):
net/mlx5: Modify LSB bitmask in temperature event to include only the first bit
net/mlx5: Apply rate-limiting to high temperature warning
Shashank Gupta (1):
crypto: octeontx2 - suppress auth failure screaming due to negative tests
Shigeru Yoshida (1):
af_unix: Fix uninit-value in __unix_walk_scc()
Shivasharan S (1):
scsi: mpt3sas: Send a diag reset if target reset fails
Shiwu Zhang (1):
drm/amdgpu: enlarge the VBIOS binary size limit
Shixiong Ou (1):
fbdev: fsl-diu-fb: add missing device_remove_file()
Shree Ramamoorthy (1):
mfd: tps65219: Remove TPS65219_REG_TI_DEV_ID check
Simona Vetter (1):
drm/atomic: clarify the rules around drm_atomic_state->allow_modeset
Soeren Moch (1):
wifi: rtl8xxxu: retry firmware download on error
Stanimir Varbanov (2):
PCI: brcmstb: Expand inbound window size up to 64GB
PCI: brcmstb: Add a softdep to MIP MSI-X driver
Stanley Chu (1):
i3c: master: svc: Fix missing STOP for master request
Stefan Wahren (2):
drm/v3d: Add clock handling
dmaengine: fsl-edma: Fix return code for unhandled interrupts
Stephan Gerhold (4):
i2c: qup: Vote for interconnect bandwidth to DRAM
arm64: dts: qcom: ipq9574: Add missing properties for cryptobam
arm64: dts: qcom: sm8450: Add missing properties for cryptobam
arm64: dts: qcom: sm8550: Add missing properties for cryptobam
Subbaraya Sundeep (1):
octeontx2-af: Set LMT_ENA bit for APR table entries
Sudeep Holla (3):
mailbox: pcc: Use acpi_os_ioremap() instead of ioremap()
firmware: arm_ffa: Reject higher major version as incompatible
firmware: arm_scmi: Relax duplicate name constraint across protocol ids
Suman Ghosh (1):
octeontx2-pf: Add AF_XDP non-zero copy support
Svyatoslav Ryhel (1):
ARM: tegra: Switch DSI-B clock parent to PLLD on Tegra114
Takashi Iwai (4):
ALSA: seq: Improve data consistency at polling
ASoC: Intel: bytcr_rt5640: Add DMI quirk for Acer Aspire SW3-013
ALSA: hda/realtek: Add quirk for HP Spectre x360 15-df1xxx
ALSA: pcm: Fix race of buffer access at PCM OSS layer
Thangaraj Samynathan (1):
net: lan743x: Restore SGMII CTRL register on resume
Thomas Weißschuh (1):
timer_list: Don't use %pK through printk()
Thomas Zimmermann (3):
drm/gem: Test for imported GEM buffers with helper
drm/ast: Find VBIOS mode from regular display size
drm/gem: Internally test import_attach for imported objects
Tianyang Zhang (1):
mm/page_alloc.c: avoid infinite retries caused by cpuset race
Tiwei Bie (1):
um: Update min_low_pfn to match changes in uml_reserved
Tom Chung (1):
drm/amd/display: Initial psr_version with correct setting
Trond Myklebust (8):
NFSv4: Check for delegation validity in nfs_start_delegation_return_locked()
NFS: Don't allow waiting for exiting tasks
SUNRPC: Don't allow waiting for exiting tasks
NFSv4: Treat ENETUNREACH errors as fatal for state recovery
SUNRPC: rpc_clnt_set_transport() must not change the autobind setting
SUNRPC: rpcbind should never reset the port to the value '0'
pNFS/flexfiles: Report ENETDOWN as a connection error
NFS: Avoid flushing data while holding directory locks in nfs_rename()
Tudor Ambarus (1):
mailbox: use error ret code of of_parse_phandle_with_args()
Uwe Kleine-König (1):
pinctrl: qcom/msm: Convert to platform remove callback returning void
Valentin Caron (1):
pinctrl: devicetree: do not goto err when probing hogs in pinctrl_dt_to_map
Valtteri Koskivuori (1):
platform/x86: fujitsu-laptop: Support Lifebook S2110 hotkeys
Vasant Hegde (1):
iommu/amd/pgtbl_v2: Improve error handling
Vicki Pfau (1):
Input: xpad - add more controllers
Victor Lu (1):
drm/amdgpu: Do not program AGP BAR regs under SRIOV in gfxhub_v1_0.c
Vijendar Mukunda (1):
soundwire: amd: change the soundwire wake enable/disable sequence
Viktor Malik (1):
bpftool: Fix readlink usage in get_fd_type
Vinicius Costa Gomes (1):
dmaengine: idxd: Fix allowing write() from different address spaces
Vinith Kumar R (1):
wifi: ath12k: Report proper tx completion status to mac80211
Viresh Kumar (1):
firmware: arm_ffa: Set dma_mask for ffa devices
Vitalii Mordan (1):
i2c: pxa: fix call balance of i2c->clk handling routines
Vladimir Moskovkin (1):
platform/x86: dell-wmi-sysman: Avoid buffer overflow in current_password_store()
Vladimir Oltean (1):
net: enetc: refactor bulk flipping of RX buffers to separate function
Waiman Long (1):
x86/nmi: Add an emergency handler in nmi_desc & use it in nmi_shootdown_cpus()
Wang Liang (1):
net/tipc: fix slab-use-after-free Read in tipc_aead_encrypt_done
Wang Zhaolong (3):
smb: client: Store original IO parameters and prevent zero IO sizes
smb: client: Fix use-after-free in cifs_fill_dirent
smb: client: Reset all search buffer pointers when releasing buffer
Wentao Guan (2):
nvme-pci: add quirks for device 126f:1001
nvme-pci: add quirks for WDC Blue SN550 15b7:5009
Willem de Bruijn (1):
ipv6: save dontfrag in cork
William Tu (3):
net/mlx5e: set the tx_queue_len for pfifo_fast
net/mlx5e: reduce rep rxq depth to 256 for ECPF
net/mlx5e: reduce the max log mpwrq sz for ECPF and reps
Xiaofei Tan (1):
ACPI: HED: Always initialize before evged
Yemike Abhilash Chandra (1):
arm64: dts: ti: k3-am68-sk: Fix regulator hierarchy
Yihan Zhu (1):
drm/amd/display: handle max_downscale_src_width fail check
Yonghong Song (1):
bpf: Allow pre-ordering for bpf cgroup progs
Youssef Samir (1):
accel/qaic: Mask out SR-IOV PCI resources
Yuanjun Gong (1):
leds: pwm-multicolor: Add check for fwnode_property_read_u32
Zhang Rui (1):
thermal: intel: x86_pkg_temp_thermal: Fix bogus trip temperature
Zhang Yi (2):
ext4: don't write back data before punch hole in nojournal mode
ext4: remove writable userspace mappings before truncating page cache
Zhikai Zhai (1):
drm/amd/display: calculate the remain segments for all pipes
Zhongqiu Han (1):
virtio_ring: Fix data race by tagging event_triggered as racy for KCSAN
Zsolt Kajtar (2):
fbcon: Use correct erase colour for clearing in fbcon
fbdev: core: tileblit: Implement missing margin clearing for tileblit
feijuan.li (1):
drm/edid: fixed the bug that hdr metadata was not reset
gaoxu (1):
cgroup: Fix compilation issue due to cgroup_mutex not being exported
junan (1):
HID: usbkbd: Fix the bit shift number for LED_KANA
zihan zhou (1):
sched: Reduce the default slice to avoid tasks getting an extra tick
Return-Path: <linux-kernel+bounces-673244-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 05C6141E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:10:01 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id C92E3178FA8
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:09:45 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id AD8EB290BDA;
Wed, 4 Jun 2025 13:07:41 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="JNbZAHLX"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7CA40290BC8;
Wed, 4 Jun 2025 13:07:40 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749042460; cv=none; b=Cw2HV9CtAGXQhqjSQ1Q6N9jE8sWXisOnX3Zn9PPcrRdNFGtQF0+giI5WVM4ZO20npiKuXT6tKqarEllSd3KQnpDMJitLrOPthM+Z46WGBbFZRAZpbxX2YpWsHd+Ycrn3CohLhEn2fOrbV5RysNCEkh8bU7zCsLtutbTmt0RYtxs=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749042460; c=relaxed/simple;
bh=kdMBXsfn38QcEibyN76/lcT4C2epGwHE/sJbI4Uz574=;
h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=OjD2893RHrI7ydZWtWmi4xXReUbOq5xmU4CXPHCcPLO3hWTP2Xp4RmNIEugJM173BvrCzNPp5QP+D4Kp0cD+KEWKnRQWasHmTdqhqTJXzUmQ97+swMY9Nra48H3hs7scIRmkErhqR1KlI4PMbK8tdCO4jJfzIKOROCg4j5jrRzo=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=JNbZAHLX; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id A2A37C4CEF0;
Wed, 4 Jun 2025 13:07:39 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org;
s=korg; t=1749042460;
bh=kdMBXsfn38QcEibyN76/lcT4C2epGwHE/sJbI4Uz574=;
h=From:To:Cc:Subject:Date:From;
b=JNbZAHLXAGnS6awRNeHQpQ/63o3kihJV4aw1r3+AYWCAJRaWREHj/BObz8cPYObZE
qj+oWTWQhsQ5mQCSWLqK3KgB5uPuiPzqTn3V6WeicMeIOSixnh4MUBCPbUYJArI4HS
I551zf+1o12SihOQHqNcfnMhPuHqJlo0hRyUJqgw=
From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
To: linux-kernel@xxxxxxxxxxxxxxx,
akpm@xxxxxxxxxxxxxxxxxxxx,
torvalds@xxxxxxxxxxxxxxxxxxxx,
stable@xxxxxxxxxxxxxxx
Cc: lwn@xxxxxxx,
jslaby@xxxxxxx,
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Subject: Linux 6.14.10
Date: Wed, 4 Jun 2025 15:07:32 +0200
Message-ID: <2025060433-cyclic-dares-5e34@gregkh>
X-Mailer: git-send-email 2.49.0
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
I'm announcing the release of the 6.14.10 kernel.
All users of the 6.14 kernel series must upgrade.
The updated 6.14.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.14.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2
arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi | 4
arch/arm64/boot/dts/qcom/ipq9574.dtsi | 2
arch/arm64/boot/dts/qcom/sa8775p.dtsi | 248 --------
arch/arm64/boot/dts/qcom/sm8350.dtsi | 2
arch/arm64/boot/dts/qcom/sm8450.dtsi | 2
arch/arm64/boot/dts/qcom/sm8550.dtsi | 2
arch/arm64/boot/dts/qcom/sm8650.dtsi | 2
arch/arm64/boot/dts/qcom/x1e001de-devkit.dts | 6
arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts | 4
arch/arm64/boot/dts/qcom/x1e80100-dell-xps13-9345.dts | 2
arch/arm64/boot/dts/qcom/x1e80100-hp-omnibook-x14.dts | 14
arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts | 7
arch/arm64/boot/dts/qcom/x1e80100-qcp.dts | 6
arch/arm64/boot/dts/qcom/x1e80100.dtsi | 309 +++++-----
arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 40 -
arch/arm64/boot/dts/ti/k3-am62-main.dtsi | 2
arch/arm64/boot/dts/ti/k3-am62a-main.dtsi | 2
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi | 2
arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-imx219.dtso | 3
arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-ov5640.dtso | 2
arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-tevi-ov5640.dtso | 2
arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 2
arch/arm64/boot/dts/ti/k3-am68-sk-base-board.dts | 13
arch/arm64/boot/dts/ti/k3-j721e-sk-csi2-dual-imx219.dtso | 35 +
arch/arm64/boot/dts/ti/k3-j721e-sk.dts | 31 +
arch/arm64/boot/dts/ti/k3-j722s-evm.dts | 8
arch/arm64/boot/dts/ti/k3-j722s-main.dtsi | 4
arch/arm64/boot/dts/ti/k3-j784s4-j742s2-main-common.dtsi | 2
arch/um/Makefile | 1
drivers/char/tpm/tpm-buf.c | 6
drivers/dma/idxd/cdev.c | 4
drivers/gpio/gpio-virtuser.c | 12
drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_translation_helper.c | 20
drivers/gpu/drm/amd/display/dc/link/link_dpms.c | 13
drivers/gpu/drm/xe/regs/xe_gt_regs.h | 1
drivers/gpu/drm/xe/xe_lrc.c | 4
drivers/gpu/drm/xe/xe_lrc_types.h | 4
drivers/gpu/drm/xe/xe_wa.c | 4
drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c | 5
drivers/hid/hid-ids.h | 4
drivers/hid/hid-quirks.c | 2
drivers/iommu/iommu.c | 26
drivers/net/can/kvaser_pciefd.c | 81 +-
drivers/net/ethernet/ti/am65-cpsw-nuss.c | 2
drivers/nvme/host/core.c | 30
drivers/nvme/host/multipath.c | 3
drivers/nvme/host/nvme.h | 3
drivers/nvme/host/pci.c | 2
drivers/nvme/target/pci-epf.c | 10
drivers/perf/arm-cmn.c | 11
drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c | 2
drivers/phy/starfive/phy-jh7110-usb.c | 7
drivers/platform/x86/fujitsu-laptop.c | 33 -
drivers/platform/x86/thinkpad_acpi.c | 7
drivers/spi/spi-sun4i.c | 5
fs/coredump.c | 65 +-
fs/nfs/client.c | 2
fs/nfs/dir.c | 15
fs/nfs/filelayout/filelayoutdev.c | 6
fs/nfs/flexfilelayout/flexfilelayoutdev.c | 6
fs/nfs/pnfs.h | 4
fs/nfs/pnfs_nfs.c | 9
fs/smb/server/oplock.c | 7
include/linux/coredump.h | 1
include/linux/iommu.h | 2
include/linux/nfs_fs_sb.h | 12
kernel/module/Kconfig | 5
net/sched/sch_hfsc.c | 9
sound/pci/hda/patch_realtek.c | 5
70 files changed, 672 insertions(+), 538 deletions(-)
Abel Vesa (1):
arm64: dts: qcom: x1e80100: Fix PCIe 3rd controller DBI size
Alan Adamson (2):
nvme: multipath: enable BLK_FEAT_ATOMIC_WRITES for multipathing
nvme: all namespaces in a subsystem must adhere to a common atomic write size
Alessandro Grassi (1):
spi: spi-sun4i: fix early activation
Algea Cao (1):
phy: phy-rockchip-samsung-hdptx: Fix PHY PLL output 50.25MHz error
Alok Tiwari (1):
arm64: dts: qcom: sm8350: Fix typo in pil_camera_mem node
Aradhya Bhatia (1):
drm/xe/xe2hpg: Add Wa_22021007897
Aurabindo Pillai (1):
drm/amd/display: check stream id dml21 wrapper to get plane_id
Axel Forsman (1):
can: kvaser_pciefd: Force IRQ edge in case of nested IRQ
Christian Brauner (2):
coredump: fix error handling for replace_fd()
coredump: hand a pidfd to the usermode coredump helper
Damien Le Moal (1):
nvmet: pci-epf: cleanup nvmet_pci_epf_raise_irq()
George Shen (1):
drm/amd/display: fix link_set_dpms_off multi-display MST corner case
Greg Kroah-Hartman (1):
Linux 6.14.10
Hal Feng (1):
phy: starfive: jh7110-usb: Fix USB 2.0 host occasional detection failure
Ilya Guterman (1):
nvme-pci: add NVME_QUIRK_NO_DEEPEST_PS quirk for SOLIDIGM P44 Pro
Jeff Layton (1):
nfs: don't share pNFS DS connections between net namespaces
Johan Hovold (5):
arm64: dts: qcom: x1e001de-devkit: mark l12b and l15b always-on
arm64: dts: qcom: x1e80100-dell-xps13-9345: mark l12b and l15b always-on
arm64: dts: qcom: x1e80100-hp-x14: mark l12b and l15b always-on
arm64: dts: qcom: x1e80100-qcp: mark l12b and l15b always-on
arm64: dts: qcom: x1e80100-yoga-slim7x: mark l12b and l15b always-on
John Chau (1):
platform/x86: thinkpad_acpi: Support also NEC Lavie X1475JAS
Judith Mendez (4):
arm64: dts: ti: k3-am62-main: Set eMMC clock parent to default
arm64: dts: ti: k3-am62a-main: Set eMMC clock parent to default
arm64: dts: ti: k3-am62p-j722s-common-main: Set eMMC clock parent to default
arm64: dts: ti: k3-am65-main: Add missing taps to sdhci0
Juerg Haefliger (1):
arm64: dts: qcom: x1e80100-hp-omnibook-x14: Enable SMB2360 0 and 1
Kailang Yang (1):
ALSA: hda/realtek - restore auto-mute mode for Dell Chrome platform
Karthik Sanagavarapu (1):
arm64: dts: qcom: sa8775p: Remove cdsp compute-cb@10
Ling Xu (1):
arm64: dts: qcom: sa8775p: Remove extra entries from the iommus property
Lukasz Czechowski (1):
arm64: dts: rockchip: fix internal USB hub instability on RK3399 Puma
Mario Limonciello (1):
HID: amd_sfh: Avoid clearing reports for SRA sensor
Mark Pearson (1):
platform/x86: thinkpad_acpi: Ignore battery threshold change event notification
Markus Burri (1):
gpio: virtuser: fix potential out-of-bound write
Masahiro Yamada (1):
um: let 'make clean' properly clean underlying SUBARCH as well
Milton Barrera (1):
HID: quirks: Add ADATA XPG alpha wireless mouse support
Namjae Jeon (1):
ksmbd: use list_first_entry_or_null for opinfo_get_list()
Niravkumar L Rabara (1):
arm64: dts: socfpga: agilex5: fix gpio0 address
Nishanth Menon (1):
net: ethernet: ti: am65-cpsw: Lower random mac address error print to info
Pedro Tammela (1):
net_sched: hfsc: Address reentrant enqueue adding class to eltree twice
Purva Yeshi (2):
dmaengine: idxd: cdev: Fix uninitialized use of sva in idxd_cdev_open
char: tpm: tpm-buf: Add sanity check fallback in read helpers
Robin Murphy (4):
perf/arm-cmn: Fix REQ2/SNP2 mixup
perf/arm-cmn: Initialise cmn->cpu earlier
perf/arm-cmn: Add CMN S3 ACPI binding
iommu: Handle yet another race around registration
Sami Tolvanen (1):
kbuild: Require pahole <v1.28 or >v1.29 with GENDWARFKSYMS on X86
Siddharth Vadapalli (3):
arm64: dts: ti: k3-j722s-evm: Enable "serdes_wiz0" and "serdes_wiz1"
arm64: dts: ti: k3-j722s-main: Disable "serdes_wiz0" and "serdes_wiz1"
arm64: dts: ti: k3-j784s4-j742s2-main-common: Fix length of serdes_ln_ctrl
Stephan Gerhold (13):
arm64: dts: qcom: ipq9574: Add missing properties for cryptobam
arm64: dts: qcom: sa8775p: Add missing properties for cryptobam
arm64: dts: qcom: sm8450: Add missing properties for cryptobam
arm64: dts: qcom: sm8550: Add missing properties for cryptobam
arm64: dts: qcom: sm8650: Add missing properties for cryptobam
arm64: dts: qcom: x1e001de-devkit: Fix vreg_l2j_1p2 voltage
arm64: dts: qcom: x1e80100-asus-vivobook-s15: Fix vreg_l2j_1p2 voltage
arm64: dts: qcom: x1e80100-hp-omnibook-x14: Fix vreg_l2j_1p2 voltage
arm64: dts: qcom: x1e80100-lenovo-yoga-slim7x: Fix vreg_l2j_1p2 voltage
arm64: dts: qcom: x1e80100-qcp: Fix vreg_l2j_1p2 voltage
arm64: dts: qcom: x1e80100: Fix video thermal zone
arm64: dts: qcom: x1e80100: Apply consistent critical thermal shutdown
arm64: dts: qcom: x1e80100: Add GPU cooling
Trond Myklebust (1):
NFS: Avoid flushing data while holding directory locks in nfs_rename()
Umesh Nerlige Ramappa (1):
drm/xe: Save the gt pointer in lrc and drop the tile
Valtteri Koskivuori (1):
platform/x86: fujitsu-laptop: Support Lifebook S2110 hotkeys
Yemike Abhilash Chandra (7):
arm64: dts: ti: k3-am62x: Remove clock-names property from IMX219 overlay
arm64: dts: ti: k3-am62x: Rename I2C switch to I2C mux in IMX219 overlay
arm64: dts: ti: k3-am62x: Rename I2C switch to I2C mux in OV5640 overlay
arm64: dts: ti: k3-am68-sk: Fix regulator hierarchy
arm64: dts: ti: k3-j721e-sk: Add DT nodes for power regulators
arm64: dts: ti: k3-j721e-sk: Remove clock-names property from IMX219 overlay
arm64: dts: ti: k3-j721e-sk: Add requiried voltage supplies for IMX219
Return-Path: <linux-kernel+bounces-673243-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 0FF3141E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:10:06 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id AB28E179079
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:09:49 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id E2EDC290BDD;
Wed, 4 Jun 2025 13:07:41 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="EKuBFW8B"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 590D1290BB1;
Wed, 4 Jun 2025 13:07:37 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749042457; cv=none; b=Eqg6G9Pl/9K8Fd4R4Bo9kVJjXK+CeWTlx/vsBev2YRroSXRwq1jHy4Z8COTjWAFialRxSLXKSwPltSd6vjfjehVO7Wv+5bFb7WNm1fnuANOqSi8t4NmTq3/OsyVcQGYtxjmheNTNs5AcSg07k8XfEnLWd4wEo+Jx8xhIvar8+LM=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749042457; c=relaxed/simple;
bh=43OWA7Qeiq8r1g4FO5Z6ePoi9K1B6Ho251GSgks6Oyg=;
h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version; b=HP/bq2JDvRmc4MIo6UGIfgbX+1OL0rEX1sJz0LOJXV85DLvjdrZoJPutO/Puvur2yXQeRJH5FuG5mDoxYCyttUY4z9YAWW3tpbGqrl/ovaa33ilU9/sSHkJ6ToS9lMqPgM/UAsgKG/DwM4NhztyeCkdJvKrs/RtX+40JBFDCnkY=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=EKuBFW8B; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7256AC4CEEF;
Wed, 4 Jun 2025 13:07:36 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org;
s=korg; t=1749042457;
bh=43OWA7Qeiq8r1g4FO5Z6ePoi9K1B6Ho251GSgks6Oyg=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=EKuBFW8B8PUkCyLPG2q0yLT1b6uHMmmUeobWVcbCBf2im8VIjFd6EIgaQHUlCkIrm
cr2U/vpNdVk5foOjzQdlRsFC8Emp+egtX1PSTKFQRT41zvMOzQUVMipDF5NXMDNeP9
tbvmnFpauwVpFxwf2ZRltzOYB5Qc2rhwNqjcZ9Fc=
From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
To: linux-kernel@xxxxxxxxxxxxxxx,
akpm@xxxxxxxxxxxxxxxxxxxx,
torvalds@xxxxxxxxxxxxxxxxxxxx,
stable@xxxxxxxxxxxxxxx
Cc: lwn@xxxxxxx,
jslaby@xxxxxxx,
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Subject: Re: Linux 6.12.32
Date: Wed, 4 Jun 2025 15:07:28 +0200
Message-ID: <2025060428-daily-hydrant-6faa@gregkh>
X-Mailer: git-send-email 2.49.0
In-Reply-To: <2025060428-exile-lubricate-e455@gregkh>
References: <2025060428-exile-lubricate-e455@gregkh>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
diff --git a/Makefile b/Makefile
index 18c2a7cf9e91..1e6a6c66403f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 6
PATCHLEVEL = 12
-SUBLEVEL = 31
+SUBLEVEL = 32
EXTRAVERSION =
NAME = Baby Opossum Posse
diff --git a/arch/arm64/boot/dts/qcom/ipq9574.dtsi b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
index 08a82a5cf667..81ccd0600c5a 100644
--- a/arch/arm64/boot/dts/qcom/ipq9574.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
@@ -261,6 +261,8 @@ cryptobam: dma-controller@704000 {
interrupts = <GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>;
#dma-cells = <1>;
qcom,ee = <1>;
+ qcom,num-ees = <4>;
+ num-channels = <16>;
qcom,controlled-remotely;
};
diff --git a/arch/arm64/boot/dts/qcom/sa8775p.dtsi b/arch/arm64/boot/dts/qcom/sa8775p.dtsi
index 8a21448c0fa8..b28fa598cebb 100644
--- a/arch/arm64/boot/dts/qcom/sa8775p.dtsi
+++ b/arch/arm64/boot/dts/qcom/sa8775p.dtsi
@@ -4012,15 +4012,7 @@ compute-cb@1 {
compatible = "qcom,fastrpc-compute-cb";
reg = <1>;
iommus = <&apps_smmu 0x2141 0x04a0>,
- <&apps_smmu 0x2161 0x04a0>,
- <&apps_smmu 0x2181 0x0400>,
- <&apps_smmu 0x21c1 0x04a0>,
- <&apps_smmu 0x21e1 0x04a0>,
- <&apps_smmu 0x2541 0x04a0>,
- <&apps_smmu 0x2561 0x04a0>,
- <&apps_smmu 0x2581 0x0400>,
- <&apps_smmu 0x25c1 0x04a0>,
- <&apps_smmu 0x25e1 0x04a0>;
+ <&apps_smmu 0x2181 0x0400>;
dma-coherent;
};
@@ -4028,15 +4020,7 @@ compute-cb@2 {
compatible = "qcom,fastrpc-compute-cb";
reg = <2>;
iommus = <&apps_smmu 0x2142 0x04a0>,
- <&apps_smmu 0x2162 0x04a0>,
- <&apps_smmu 0x2182 0x0400>,
- <&apps_smmu 0x21c2 0x04a0>,
- <&apps_smmu 0x21e2 0x04a0>,
- <&apps_smmu 0x2542 0x04a0>,
- <&apps_smmu 0x2562 0x04a0>,
- <&apps_smmu 0x2582 0x0400>,
- <&apps_smmu 0x25c2 0x04a0>,
- <&apps_smmu 0x25e2 0x04a0>;
+ <&apps_smmu 0x2182 0x0400>;
dma-coherent;
};
@@ -4044,15 +4028,7 @@ compute-cb@3 {
compatible = "qcom,fastrpc-compute-cb";
reg = <3>;
iommus = <&apps_smmu 0x2143 0x04a0>,
- <&apps_smmu 0x2163 0x04a0>,
- <&apps_smmu 0x2183 0x0400>,
- <&apps_smmu 0x21c3 0x04a0>,
- <&apps_smmu 0x21e3 0x04a0>,
- <&apps_smmu 0x2543 0x04a0>,
- <&apps_smmu 0x2563 0x04a0>,
- <&apps_smmu 0x2583 0x0400>,
- <&apps_smmu 0x25c3 0x04a0>,
- <&apps_smmu 0x25e3 0x04a0>;
+ <&apps_smmu 0x2183 0x0400>;
dma-coherent;
};
@@ -4060,15 +4036,7 @@ compute-cb@4 {
compatible = "qcom,fastrpc-compute-cb";
reg = <4>;
iommus = <&apps_smmu 0x2144 0x04a0>,
- <&apps_smmu 0x2164 0x04a0>,
- <&apps_smmu 0x2184 0x0400>,
- <&apps_smmu 0x21c4 0x04a0>,
- <&apps_smmu 0x21e4 0x04a0>,
- <&apps_smmu 0x2544 0x04a0>,
- <&apps_smmu 0x2564 0x04a0>,
- <&apps_smmu 0x2584 0x0400>,
- <&apps_smmu 0x25c4 0x04a0>,
- <&apps_smmu 0x25e4 0x04a0>;
+ <&apps_smmu 0x2184 0x0400>;
dma-coherent;
};
@@ -4076,15 +4044,7 @@ compute-cb@5 {
compatible = "qcom,fastrpc-compute-cb";
reg = <5>;
iommus = <&apps_smmu 0x2145 0x04a0>,
- <&apps_smmu 0x2165 0x04a0>,
- <&apps_smmu 0x2185 0x0400>,
- <&apps_smmu 0x21c5 0x04a0>,
- <&apps_smmu 0x21e5 0x04a0>,
- <&apps_smmu 0x2545 0x04a0>,
- <&apps_smmu 0x2565 0x04a0>,
- <&apps_smmu 0x2585 0x0400>,
- <&apps_smmu 0x25c5 0x04a0>,
- <&apps_smmu 0x25e5 0x04a0>;
+ <&apps_smmu 0x2185 0x0400>;
dma-coherent;
};
@@ -4092,15 +4052,7 @@ compute-cb@6 {
compatible = "qcom,fastrpc-compute-cb";
reg = <6>;
iommus = <&apps_smmu 0x2146 0x04a0>,
- <&apps_smmu 0x2166 0x04a0>,
- <&apps_smmu 0x2186 0x0400>,
- <&apps_smmu 0x21c6 0x04a0>,
- <&apps_smmu 0x21e6 0x04a0>,
- <&apps_smmu 0x2546 0x04a0>,
- <&apps_smmu 0x2566 0x04a0>,
- <&apps_smmu 0x2586 0x0400>,
- <&apps_smmu 0x25c6 0x04a0>,
- <&apps_smmu 0x25e6 0x04a0>;
+ <&apps_smmu 0x2186 0x0400>;
dma-coherent;
};
@@ -4108,15 +4060,7 @@ compute-cb@7 {
compatible = "qcom,fastrpc-compute-cb";
reg = <7>;
iommus = <&apps_smmu 0x2147 0x04a0>,
- <&apps_smmu 0x2167 0x04a0>,
- <&apps_smmu 0x2187 0x0400>,
- <&apps_smmu 0x21c7 0x04a0>,
- <&apps_smmu 0x21e7 0x04a0>,
- <&apps_smmu 0x2547 0x04a0>,
- <&apps_smmu 0x2567 0x04a0>,
- <&apps_smmu 0x2587 0x0400>,
- <&apps_smmu 0x25c7 0x04a0>,
- <&apps_smmu 0x25e7 0x04a0>;
+ <&apps_smmu 0x2187 0x0400>;
dma-coherent;
};
@@ -4124,15 +4068,7 @@ compute-cb@8 {
compatible = "qcom,fastrpc-compute-cb";
reg = <8>;
iommus = <&apps_smmu 0x2148 0x04a0>,
- <&apps_smmu 0x2168 0x04a0>,
- <&apps_smmu 0x2188 0x0400>,
- <&apps_smmu 0x21c8 0x04a0>,
- <&apps_smmu 0x21e8 0x04a0>,
- <&apps_smmu 0x2548 0x04a0>,
- <&apps_smmu 0x2568 0x04a0>,
- <&apps_smmu 0x2588 0x0400>,
- <&apps_smmu 0x25c8 0x04a0>,
- <&apps_smmu 0x25e8 0x04a0>;
+ <&apps_smmu 0x2188 0x0400>;
dma-coherent;
};
@@ -4140,31 +4076,7 @@ compute-cb@9 {
compatible = "qcom,fastrpc-compute-cb";
reg = <9>;
iommus = <&apps_smmu 0x2149 0x04a0>,
- <&apps_smmu 0x2169 0x04a0>,
- <&apps_smmu 0x2189 0x0400>,
- <&apps_smmu 0x21c9 0x04a0>,
- <&apps_smmu 0x21e9 0x04a0>,
- <&apps_smmu 0x2549 0x04a0>,
- <&apps_smmu 0x2569 0x04a0>,
- <&apps_smmu 0x2589 0x0400>,
- <&apps_smmu 0x25c9 0x04a0>,
- <&apps_smmu 0x25e9 0x04a0>;
- dma-coherent;
- };
-
- compute-cb@10 {
- compatible = "qcom,fastrpc-compute-cb";
- reg = <10>;
- iommus = <&apps_smmu 0x214a 0x04a0>,
- <&apps_smmu 0x216a 0x04a0>,
- <&apps_smmu 0x218a 0x0400>,
- <&apps_smmu 0x21ca 0x04a0>,
- <&apps_smmu 0x21ea 0x04a0>,
- <&apps_smmu 0x254a 0x04a0>,
- <&apps_smmu 0x256a 0x04a0>,
- <&apps_smmu 0x258a 0x0400>,
- <&apps_smmu 0x25ca 0x04a0>,
- <&apps_smmu 0x25ea 0x04a0>;
+ <&apps_smmu 0x2189 0x0400>;
dma-coherent;
};
@@ -4172,15 +4084,7 @@ compute-cb@11 {
compatible = "qcom,fastrpc-compute-cb";
reg = <11>;
iommus = <&apps_smmu 0x214b 0x04a0>,
- <&apps_smmu 0x216b 0x04a0>,
- <&apps_smmu 0x218b 0x0400>,
- <&apps_smmu 0x21cb 0x04a0>,
- <&apps_smmu 0x21eb 0x04a0>,
- <&apps_smmu 0x254b 0x04a0>,
- <&apps_smmu 0x256b 0x04a0>,
- <&apps_smmu 0x258b 0x0400>,
- <&apps_smmu 0x25cb 0x04a0>,
- <&apps_smmu 0x25eb 0x04a0>;
+ <&apps_smmu 0x218b 0x0400>;
dma-coherent;
};
};
@@ -4240,15 +4144,7 @@ compute-cb@1 {
compatible = "qcom,fastrpc-compute-cb";
reg = <1>;
iommus = <&apps_smmu 0x2941 0x04a0>,
- <&apps_smmu 0x2961 0x04a0>,
- <&apps_smmu 0x2981 0x0400>,
- <&apps_smmu 0x29c1 0x04a0>,
- <&apps_smmu 0x29e1 0x04a0>,
- <&apps_smmu 0x2d41 0x04a0>,
- <&apps_smmu 0x2d61 0x04a0>,
- <&apps_smmu 0x2d81 0x0400>,
- <&apps_smmu 0x2dc1 0x04a0>,
- <&apps_smmu 0x2de1 0x04a0>;
+ <&apps_smmu 0x2981 0x0400>;
dma-coherent;
};
@@ -4256,15 +4152,7 @@ compute-cb@2 {
compatible = "qcom,fastrpc-compute-cb";
reg = <2>;
iommus = <&apps_smmu 0x2942 0x04a0>,
- <&apps_smmu 0x2962 0x04a0>,
- <&apps_smmu 0x2982 0x0400>,
- <&apps_smmu 0x29c2 0x04a0>,
- <&apps_smmu 0x29e2 0x04a0>,
- <&apps_smmu 0x2d42 0x04a0>,
- <&apps_smmu 0x2d62 0x04a0>,
- <&apps_smmu 0x2d82 0x0400>,
- <&apps_smmu 0x2dc2 0x04a0>,
- <&apps_smmu 0x2de2 0x04a0>;
+ <&apps_smmu 0x2982 0x0400>;
dma-coherent;
};
@@ -4272,15 +4160,7 @@ compute-cb@3 {
compatible = "qcom,fastrpc-compute-cb";
reg = <3>;
iommus = <&apps_smmu 0x2943 0x04a0>,
- <&apps_smmu 0x2963 0x04a0>,
- <&apps_smmu 0x2983 0x0400>,
- <&apps_smmu 0x29c3 0x04a0>,
- <&apps_smmu 0x29e3 0x04a0>,
- <&apps_smmu 0x2d43 0x04a0>,
- <&apps_smmu 0x2d63 0x04a0>,
- <&apps_smmu 0x2d83 0x0400>,
- <&apps_smmu 0x2dc3 0x04a0>,
- <&apps_smmu 0x2de3 0x04a0>;
+ <&apps_smmu 0x2983 0x0400>;
dma-coherent;
};
@@ -4288,15 +4168,7 @@ compute-cb@4 {
compatible = "qcom,fastrpc-compute-cb";
reg = <4>;
iommus = <&apps_smmu 0x2944 0x04a0>,
- <&apps_smmu 0x2964 0x04a0>,
- <&apps_smmu 0x2984 0x0400>,
- <&apps_smmu 0x29c4 0x04a0>,
- <&apps_smmu 0x29e4 0x04a0>,
- <&apps_smmu 0x2d44 0x04a0>,
- <&apps_smmu 0x2d64 0x04a0>,
- <&apps_smmu 0x2d84 0x0400>,
- <&apps_smmu 0x2dc4 0x04a0>,
- <&apps_smmu 0x2de4 0x04a0>;
+ <&apps_smmu 0x2984 0x0400>;
dma-coherent;
};
@@ -4304,15 +4176,7 @@ compute-cb@5 {
compatible = "qcom,fastrpc-compute-cb";
reg = <5>;
iommus = <&apps_smmu 0x2945 0x04a0>,
- <&apps_smmu 0x2965 0x04a0>,
- <&apps_smmu 0x2985 0x0400>,
- <&apps_smmu 0x29c5 0x04a0>,
- <&apps_smmu 0x29e5 0x04a0>,
- <&apps_smmu 0x2d45 0x04a0>,
- <&apps_smmu 0x2d65 0x04a0>,
- <&apps_smmu 0x2d85 0x0400>,
- <&apps_smmu 0x2dc5 0x04a0>,
- <&apps_smmu 0x2de5 0x04a0>;
+ <&apps_smmu 0x2985 0x0400>;
dma-coherent;
};
@@ -4320,15 +4184,7 @@ compute-cb@6 {
compatible = "qcom,fastrpc-compute-cb";
reg = <6>;
iommus = <&apps_smmu 0x2946 0x04a0>,
- <&apps_smmu 0x2966 0x04a0>,
- <&apps_smmu 0x2986 0x0400>,
- <&apps_smmu 0x29c6 0x04a0>,
- <&apps_smmu 0x29e6 0x04a0>,
- <&apps_smmu 0x2d46 0x04a0>,
- <&apps_smmu 0x2d66 0x04a0>,
- <&apps_smmu 0x2d86 0x0400>,
- <&apps_smmu 0x2dc6 0x04a0>,
- <&apps_smmu 0x2de6 0x04a0>;
+ <&apps_smmu 0x2986 0x0400>;
dma-coherent;
};
@@ -4336,15 +4192,7 @@ compute-cb@7 {
compatible = "qcom,fastrpc-compute-cb";
reg = <7>;
iommus = <&apps_smmu 0x2947 0x04a0>,
- <&apps_smmu 0x2967 0x04a0>,
- <&apps_smmu 0x2987 0x0400>,
- <&apps_smmu 0x29c7 0x04a0>,
- <&apps_smmu 0x29e7 0x04a0>,
- <&apps_smmu 0x2d47 0x04a0>,
- <&apps_smmu 0x2d67 0x04a0>,
- <&apps_smmu 0x2d87 0x0400>,
- <&apps_smmu 0x2dc7 0x04a0>,
- <&apps_smmu 0x2de7 0x04a0>;
+ <&apps_smmu 0x2987 0x0400>;
dma-coherent;
};
@@ -4352,15 +4200,7 @@ compute-cb@8 {
compatible = "qcom,fastrpc-compute-cb";
reg = <8>;
iommus = <&apps_smmu 0x2948 0x04a0>,
- <&apps_smmu 0x2968 0x04a0>,
- <&apps_smmu 0x2988 0x0400>,
- <&apps_smmu 0x29c8 0x04a0>,
- <&apps_smmu 0x29e8 0x04a0>,
- <&apps_smmu 0x2d48 0x04a0>,
- <&apps_smmu 0x2d68 0x04a0>,
- <&apps_smmu 0x2d88 0x0400>,
- <&apps_smmu 0x2dc8 0x04a0>,
- <&apps_smmu 0x2de8 0x04a0>;
+ <&apps_smmu 0x2988 0x0400>;
dma-coherent;
};
@@ -4368,15 +4208,7 @@ compute-cb@9 {
compatible = "qcom,fastrpc-compute-cb";
reg = <9>;
iommus = <&apps_smmu 0x2949 0x04a0>,
- <&apps_smmu 0x2969 0x04a0>,
- <&apps_smmu 0x2989 0x0400>,
- <&apps_smmu 0x29c9 0x04a0>,
- <&apps_smmu 0x29e9 0x04a0>,
- <&apps_smmu 0x2d49 0x04a0>,
- <&apps_smmu 0x2d69 0x04a0>,
- <&apps_smmu 0x2d89 0x0400>,
- <&apps_smmu 0x2dc9 0x04a0>,
- <&apps_smmu 0x2de9 0x04a0>;
+ <&apps_smmu 0x2989 0x0400>;
dma-coherent;
};
@@ -4384,15 +4216,7 @@ compute-cb@10 {
compatible = "qcom,fastrpc-compute-cb";
reg = <10>;
iommus = <&apps_smmu 0x294a 0x04a0>,
- <&apps_smmu 0x296a 0x04a0>,
- <&apps_smmu 0x298a 0x0400>,
- <&apps_smmu 0x29ca 0x04a0>,
- <&apps_smmu 0x29ea 0x04a0>,
- <&apps_smmu 0x2d4a 0x04a0>,
- <&apps_smmu 0x2d6a 0x04a0>,
- <&apps_smmu 0x2d8a 0x0400>,
- <&apps_smmu 0x2dca 0x04a0>,
- <&apps_smmu 0x2dea 0x04a0>;
+ <&apps_smmu 0x298a 0x0400>;
dma-coherent;
};
@@ -4400,15 +4224,7 @@ compute-cb@11 {
compatible = "qcom,fastrpc-compute-cb";
reg = <11>;
iommus = <&apps_smmu 0x294b 0x04a0>,
- <&apps_smmu 0x296b 0x04a0>,
- <&apps_smmu 0x298b 0x0400>,
- <&apps_smmu 0x29cb 0x04a0>,
- <&apps_smmu 0x29eb 0x04a0>,
- <&apps_smmu 0x2d4b 0x04a0>,
- <&apps_smmu 0x2d6b 0x04a0>,
- <&apps_smmu 0x2d8b 0x0400>,
- <&apps_smmu 0x2dcb 0x04a0>,
- <&apps_smmu 0x2deb 0x04a0>;
+ <&apps_smmu 0x298b 0x0400>;
dma-coherent;
};
@@ -4416,15 +4232,7 @@ compute-cb@12 {
compatible = "qcom,fastrpc-compute-cb";
reg = <12>;
iommus = <&apps_smmu 0x294c 0x04a0>,
- <&apps_smmu 0x296c 0x04a0>,
- <&apps_smmu 0x298c 0x0400>,
- <&apps_smmu 0x29cc 0x04a0>,
- <&apps_smmu 0x29ec 0x04a0>,
- <&apps_smmu 0x2d4c 0x04a0>,
- <&apps_smmu 0x2d6c 0x04a0>,
- <&apps_smmu 0x2d8c 0x0400>,
- <&apps_smmu 0x2dcc 0x04a0>,
- <&apps_smmu 0x2dec 0x04a0>;
+ <&apps_smmu 0x298c 0x0400>;
dma-coherent;
};
@@ -4432,15 +4240,7 @@ compute-cb@13 {
compatible = "qcom,fastrpc-compute-cb";
reg = <13>;
iommus = <&apps_smmu 0x294d 0x04a0>,
- <&apps_smmu 0x296d 0x04a0>,
- <&apps_smmu 0x298d 0x0400>,
- <&apps_smmu 0x29Cd 0x04a0>,
- <&apps_smmu 0x29ed 0x04a0>,
- <&apps_smmu 0x2d4d 0x04a0>,
- <&apps_smmu 0x2d6d 0x04a0>,
- <&apps_smmu 0x2d8d 0x0400>,
- <&apps_smmu 0x2dcd 0x04a0>,
- <&apps_smmu 0x2ded 0x04a0>;
+ <&apps_smmu 0x298d 0x0400>;
dma-coherent;
};
};
diff --git a/arch/arm64/boot/dts/qcom/sm8350.dtsi b/arch/arm64/boot/dts/qcom/sm8350.dtsi
index 46adf10e5fe4..404473fa491a 100644
--- a/arch/arm64/boot/dts/qcom/sm8350.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8350.dtsi
@@ -455,7 +455,7 @@ cdsp_secure_heap: memory@80c00000 {
no-map;
};
- pil_camera_mem: mmeory@85200000 {
+ pil_camera_mem: memory@85200000 {
reg = <0x0 0x85200000 0x0 0x500000>;
no-map;
};
diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi
index d664a88a018e..58ed68f534e5 100644
--- a/arch/arm64/boot/dts/qcom/sm8450.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi
@@ -4553,6 +4553,8 @@ cryptobam: dma-controller@1dc4000 {
interrupts = <GIC_SPI 272 IRQ_TYPE_LEVEL_HIGH>;
#dma-cells = <1>;
qcom,ee = <0>;
+ qcom,num-ees = <4>;
+ num-channels = <16>;
qcom,controlled-remotely;
iommus = <&apps_smmu 0x584 0x11>,
<&apps_smmu 0x588 0x0>,
diff --git a/arch/arm64/boot/dts/qcom/sm8550.dtsi b/arch/arm64/boot/dts/qcom/sm8550.dtsi
index 9ecf4a7fc328..cfdd30009015 100644
--- a/arch/arm64/boot/dts/qcom/sm8550.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8550.dtsi
@@ -1952,6 +1952,8 @@ cryptobam: dma-controller@1dc4000 {
interrupts = <GIC_SPI 272 IRQ_TYPE_LEVEL_HIGH>;
#dma-cells = <1>;
qcom,ee = <0>;
+ qcom,num-ees = <4>;
+ num-channels = <20>;
qcom,controlled-remotely;
iommus = <&apps_smmu 0x480 0x0>,
<&apps_smmu 0x481 0x0>;
diff --git a/arch/arm64/boot/dts/qcom/sm8650.dtsi b/arch/arm64/boot/dts/qcom/sm8650.dtsi
index 416cfb71878a..fddf979de38d 100644
--- a/arch/arm64/boot/dts/qcom/sm8650.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8650.dtsi
@@ -2495,6 +2495,8 @@ cryptobam: dma-controller@1dc4000 {
<&apps_smmu 0x481 0>;
qcom,ee = <0>;
+ qcom,num-ees = <4>;
+ num-channels = <20>;
qcom,controlled-remotely;
};
diff --git a/arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts b/arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts
index b2cf080cab56..ce3fa29de7b4 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts
+++ b/arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts
@@ -314,8 +314,8 @@ vreg_l1j_0p8: ldo1 {
vreg_l2j_1p2: ldo2 {
regulator-name = "vreg_l2j_1p2";
- regulator-min-microvolt = <1200000>;
- regulator-max-microvolt = <1200000>;
+ regulator-min-microvolt = <1256000>;
+ regulator-max-microvolt = <1256000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
diff --git a/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts b/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts
index e9ed723f9038..07c2fdfe7ce1 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts
+++ b/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts
@@ -266,6 +266,7 @@ vreg_l12b_1p2: ldo12 {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-always-on;
};
vreg_l14b_3p0: ldo14 {
@@ -280,8 +281,8 @@ vreg_l15b_1p8: ldo15 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-always-on;
};
-
};
regulators-1 {
@@ -484,8 +485,8 @@ vreg_l1j_0p8: ldo1 {
vreg_l2j_1p2: ldo2 {
regulator-name = "vreg_l2j_1p2";
- regulator-min-microvolt = <1200000>;
- regulator-max-microvolt = <1200000>;
+ regulator-min-microvolt = <1256000>;
+ regulator-max-microvolt = <1256000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
diff --git a/arch/arm64/boot/dts/qcom/x1e80100-qcp.dts b/arch/arm64/boot/dts/qcom/x1e80100-qcp.dts
index af76aa034d0e..9062eb6766f2 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100-qcp.dts
+++ b/arch/arm64/boot/dts/qcom/x1e80100-qcp.dts
@@ -356,6 +356,7 @@ vreg_l12b_1p2: ldo12 {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-always-on;
};
vreg_l13b_3p0: ldo13 {
@@ -377,6 +378,7 @@ vreg_l15b_1p8: ldo15 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-always-on;
};
vreg_l16b_2p9: ldo16 {
@@ -594,8 +596,8 @@ vreg_l1j_0p8: ldo1 {
vreg_l2j_1p2: ldo2 {
regulator-name = "vreg_l2j_1p2";
- regulator-min-microvolt = <1200000>;
- regulator-max-microvolt = <1200000>;
+ regulator-min-microvolt = <1256000>;
+ regulator-max-microvolt = <1256000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
diff --git a/arch/arm64/boot/dts/qcom/x1e80100.dtsi b/arch/arm64/boot/dts/qcom/x1e80100.dtsi
index 91e4fbca19f9..5a5abd5fa658 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100.dtsi
+++ b/arch/arm64/boot/dts/qcom/x1e80100.dtsi
@@ -6682,15 +6682,19 @@ mem-critical {
};
video-thermal {
- polling-delay-passive = <250>;
-
thermal-sensors = <&tsens0 12>;
trips {
trip-point0 {
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+
+ video-critical {
temperature = <125000>;
hysteresis = <1000>;
- type = "passive";
+ type = "critical";
};
};
};
diff --git a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
index 60c6814206a1..3f3a31eced97 100644
--- a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
@@ -552,8 +552,6 @@ sdhci0: mmc@fa10000 {
power-domains = <&k3_pds 57 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 57 5>, <&k3_clks 57 6>;
clock-names = "clk_ahb", "clk_xin";
- assigned-clocks = <&k3_clks 57 6>;
- assigned-clock-parents = <&k3_clks 57 8>;
bus-width = <8>;
mmc-ddr-1_8v;
mmc-hs200-1_8v;
diff --git a/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi
index 56945d29e015..45d68a0d1b59 100644
--- a/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi
@@ -575,8 +575,6 @@ sdhci0: mmc@fa10000 {
power-domains = <&k3_pds 57 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 57 5>, <&k3_clks 57 6>;
clock-names = "clk_ahb", "clk_xin";
- assigned-clocks = <&k3_clks 57 6>;
- assigned-clock-parents = <&k3_clks 57 8>;
bus-width = <8>;
mmc-hs200-1_8v;
ti,clkbuf-sel = <0x7>;
diff --git a/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi
index 9b6f51379108..77fe2b27cb58 100644
--- a/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi
@@ -564,8 +564,6 @@ sdhci0: mmc@fa10000 {
power-domains = <&k3_pds 57 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 57 1>, <&k3_clks 57 2>;
clock-names = "clk_ahb", "clk_xin";
- assigned-clocks = <&k3_clks 57 2>;
- assigned-clock-parents = <&k3_clks 57 4>;
bus-width = <8>;
mmc-ddr-1_8v;
mmc-hs200-1_8v;
diff --git a/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-imx219.dtso b/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-imx219.dtso
index 76ca02127f95..dd090813a32d 100644
--- a/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-imx219.dtso
+++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-imx219.dtso
@@ -22,7 +22,7 @@ &main_i2c2 {
#size-cells = <0>;
status = "okay";
- i2c-switch@71 {
+ i2c-mux@71 {
compatible = "nxp,pca9543";
#address-cells = <1>;
#size-cells = <0>;
@@ -39,7 +39,6 @@ ov5640: camera@10 {
reg = <0x10>;
clocks = <&clk_imx219_fixed>;
- clock-names = "xclk";
reset-gpios = <&exp1 13 GPIO_ACTIVE_HIGH>;
diff --git a/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-ov5640.dtso b/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-ov5640.dtso
index ccc7f5e43184..7fc7c95f5cd5 100644
--- a/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-ov5640.dtso
+++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-ov5640.dtso
@@ -22,7 +22,7 @@ &main_i2c2 {
#size-cells = <0>;
status = "okay";
- i2c-switch@71 {
+ i2c-mux@71 {
compatible = "nxp,pca9543";
#address-cells = <1>;
#size-cells = <0>;
diff --git a/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-tevi-ov5640.dtso b/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-tevi-ov5640.dtso
index 4eaf9d757dd0..b6bfdfbbdd98 100644
--- a/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-tevi-ov5640.dtso
+++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-tevi-ov5640.dtso
@@ -22,7 +22,7 @@ &main_i2c2 {
#size-cells = <0>;
status = "okay";
- i2c-switch@71 {
+ i2c-mux@71 {
compatible = "nxp,pca9543";
#address-cells = <1>;
#size-cells = <0>;
diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
index 1f1af7ea2330..0534b5348347 100644
--- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
@@ -449,6 +449,8 @@ sdhci0: mmc@4f80000 {
ti,otap-del-sel-mmc-hs = <0x0>;
ti,otap-del-sel-ddr52 = <0x5>;
ti,otap-del-sel-hs200 = <0x5>;
+ ti,itap-del-sel-legacy = <0xa>;
+ ti,itap-del-sel-mmc-hs = <0x1>;
ti,itap-del-sel-ddr52 = <0x0>;
dma-coherent;
status = "disabled";
diff --git a/arch/arm64/boot/dts/ti/k3-am68-sk-base-board.dts b/arch/arm64/boot/dts/ti/k3-am68-sk-base-board.dts
index d5ceab79536c..b40496097f82 100644
--- a/arch/arm64/boot/dts/ti/k3-am68-sk-base-board.dts
+++ b/arch/arm64/boot/dts/ti/k3-am68-sk-base-board.dts
@@ -44,6 +44,17 @@ vusb_main: regulator-vusb-main5v0 {
regulator-boot-on;
};
+ vsys_5v0: regulator-vsys5v0 {
+ /* Output of LM61460 */
+ compatible = "regulator-fixed";
+ regulator-name = "vsys_5v0";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vusb_main>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
vsys_3v3: regulator-vsys3v3 {
/* Output of LM5141 */
compatible = "regulator-fixed";
@@ -76,7 +87,7 @@ vdd_sd_dv: regulator-tlv71033 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
regulator-boot-on;
- vin-supply = <&vsys_3v3>;
+ vin-supply = <&vsys_5v0>;
gpios = <&main_gpio0 49 GPIO_ACTIVE_HIGH>;
states = <1800000 0x0>,
<3300000 0x1>;
diff --git a/arch/arm64/boot/dts/ti/k3-j721e-sk-csi2-dual-imx219.dtso b/arch/arm64/boot/dts/ti/k3-j721e-sk-csi2-dual-imx219.dtso
index 47bb5480b5b0..4eb3cffab032 100644
--- a/arch/arm64/boot/dts/ti/k3-j721e-sk-csi2-dual-imx219.dtso
+++ b/arch/arm64/boot/dts/ti/k3-j721e-sk-csi2-dual-imx219.dtso
@@ -19,6 +19,33 @@ clk_imx219_fixed: imx219-xclk {
#clock-cells = <0>;
clock-frequency = <24000000>;
};
+
+ reg_2p8v: regulator-2p8v {
+ compatible = "regulator-fixed";
+ regulator-name = "2P8V";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ vin-supply = <&vdd_sd_dv>;
+ regulator-always-on;
+ };
+
+ reg_1p8v: regulator-1p8v {
+ compatible = "regulator-fixed";
+ regulator-name = "1P8V";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ vin-supply = <&vdd_sd_dv>;
+ regulator-always-on;
+ };
+
+ reg_1p2v: regulator-1p2v {
+ compatible = "regulator-fixed";
+ regulator-name = "1P2V";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ vin-supply = <&vdd_sd_dv>;
+ regulator-always-on;
+ };
};
&csi_mux {
@@ -34,7 +61,9 @@ imx219_0: imx219-0@10 {
reg = <0x10>;
clocks = <&clk_imx219_fixed>;
- clock-names = "xclk";
+ VANA-supply = <®_2p8v>;
+ VDIG-supply = <®_1p8v>;
+ VDDL-supply = <®_1p2v>;
port {
csi2_cam0: endpoint {
@@ -56,7 +85,9 @@ imx219_1: imx219-1@10 {
reg = <0x10>;
clocks = <&clk_imx219_fixed>;
- clock-names = "xclk";
+ VANA-supply = <®_2p8v>;
+ VDIG-supply = <®_1p8v>;
+ VDDL-supply = <®_1p2v>;
port {
csi2_cam1: endpoint {
diff --git a/arch/arm64/boot/dts/ti/k3-j721e-sk.dts b/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
index 6285e8d94dde..c8d7eb1814f0 100644
--- a/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
@@ -184,6 +184,17 @@ vsys_3v3: fixedregulator-vsys3v3 {
regulator-boot-on;
};
+ vsys_5v0: fixedregulator-vsys5v0 {
+ /* Output of LM61460 */
+ compatible = "regulator-fixed";
+ regulator-name = "vsys_5v0";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vusb_main>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
vdd_mmc1: fixedregulator-sd {
compatible = "regulator-fixed";
pinctrl-names = "default";
@@ -211,6 +222,20 @@ vdd_sd_dv_alt: gpio-regulator-tps659411 {
<3300000 0x1>;
};
+ vdd_sd_dv: gpio-regulator-TLV71033 {
+ compatible = "regulator-gpio";
+ pinctrl-names = "default";
+ pinctrl-0 = <&vdd_sd_dv_pins_default>;
+ regulator-name = "tlv71033";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ vin-supply = <&vsys_5v0>;
+ gpios = <&main_gpio0 118 GPIO_ACTIVE_HIGH>;
+ states = <1800000 0x0>,
+ <3300000 0x1>;
+ };
+
transceiver1: can-phy1 {
compatible = "ti,tcan1042";
#phy-cells = <0>;
@@ -608,6 +633,12 @@ J721E_WKUP_IOPAD(0xd4, PIN_OUTPUT, 7) /* (G26) WKUP_GPIO0_9 */
>;
};
+ vdd_sd_dv_pins_default: vdd-sd-dv-default-pins {
+ pinctrl-single,pins = <
+ J721E_IOPAD(0x1dc, PIN_OUTPUT, 7) /* (Y1) SPI1_CLK.GPIO0_118 */
+ >;
+ };
+
wkup_uart0_pins_default: wkup-uart0-default-pins {
pinctrl-single,pins = <
J721E_WKUP_IOPAD(0xa0, PIN_INPUT, 0) /* (J29) WKUP_UART0_RXD */
diff --git a/arch/arm64/boot/dts/ti/k3-j722s-evm.dts b/arch/arm64/boot/dts/ti/k3-j722s-evm.dts
index a00f4a7d20d9..710f80a14b64 100644
--- a/arch/arm64/boot/dts/ti/k3-j722s-evm.dts
+++ b/arch/arm64/boot/dts/ti/k3-j722s-evm.dts
@@ -720,6 +720,10 @@ &serdes_ln_ctrl {
<J722S_SERDES1_LANE0_PCIE0_LANE0>;
};
+&serdes_wiz0 {
+ status = "okay";
+};
+
&serdes0 {
status = "okay";
serdes0_usb_link: phy@0 {
@@ -731,6 +735,10 @@ serdes0_usb_link: phy@0 {
};
};
+&serdes_wiz1 {
+ status = "okay";
+};
+
&serdes1 {
status = "okay";
serdes1_pcie_link: phy@0 {
diff --git a/arch/arm64/boot/dts/ti/k3-j722s-main.dtsi b/arch/arm64/boot/dts/ti/k3-j722s-main.dtsi
index ed6f4ba08afc..ec8fcf9d16d6 100644
--- a/arch/arm64/boot/dts/ti/k3-j722s-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j722s-main.dtsi
@@ -32,6 +32,8 @@ serdes_wiz0: phy@f000000 {
assigned-clocks = <&k3_clks 279 1>;
assigned-clock-parents = <&k3_clks 279 5>;
+ status = "disabled";
+
serdes0: serdes@f000000 {
compatible = "ti,j721e-serdes-10g";
reg = <0x0f000000 0x00010000>;
@@ -70,6 +72,8 @@ serdes_wiz1: phy@f010000 {
assigned-clocks = <&k3_clks 280 1>;
assigned-clock-parents = <&k3_clks 280 5>;
+ status = "disabled";
+
serdes1: serdes@f010000 {
compatible = "ti,j721e-serdes-10g";
reg = <0x0f010000 0x00010000>;
diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-j742s2-main-common.dtsi b/arch/arm64/boot/dts/ti/k3-j784s4-j742s2-main-common.dtsi
index 2bf4547485e1..013c0d25d348 100644
--- a/arch/arm64/boot/dts/ti/k3-j784s4-j742s2-main-common.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j784s4-j742s2-main-common.dtsi
@@ -77,7 +77,7 @@ pcie1_ctrl: pcie1-ctrl@4074 {
serdes_ln_ctrl: mux-controller@4080 {
compatible = "reg-mux";
- reg = <0x00004080 0x30>;
+ reg = <0x00004080 0x50>;
#mux-control-cells = <1>;
mux-reg-masks = <0x0 0x3>, <0x4 0x3>, /* SERDES0 lane0/1 select */
<0x8 0x3>, <0xc 0x3>, /* SERDES0 lane2/3 select */
diff --git a/arch/um/Makefile b/arch/um/Makefile
index 00b63bac5eff..3317d87e2092 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -151,5 +151,6 @@ MRPROPER_FILES += $(HOST_DIR)/include/generated
archclean:
@find . \( -name '*.bb' -o -name '*.bbg' -o -name '*.da' \
-o -name '*.gcov' \) -type f -print | xargs rm -f
+ $(Q)$(MAKE) -f $(srctree)/Makefile ARCH=$(HEADER_ARCH) clean
export HEADER_ARCH SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING DEV_NULL_PATH
diff --git a/drivers/char/tpm/tpm-buf.c b/drivers/char/tpm/tpm-buf.c
index e49a19fea3bd..dc882fc9fa9e 100644
--- a/drivers/char/tpm/tpm-buf.c
+++ b/drivers/char/tpm/tpm-buf.c
@@ -201,7 +201,7 @@ static void tpm_buf_read(struct tpm_buf *buf, off_t *offset, size_t count, void
*/
u8 tpm_buf_read_u8(struct tpm_buf *buf, off_t *offset)
{
- u8 value;
+ u8 value = 0;
tpm_buf_read(buf, offset, sizeof(value), &value);
@@ -218,7 +218,7 @@ EXPORT_SYMBOL_GPL(tpm_buf_read_u8);
*/
u16 tpm_buf_read_u16(struct tpm_buf *buf, off_t *offset)
{
- u16 value;
+ u16 value = 0;
tpm_buf_read(buf, offset, sizeof(value), &value);
@@ -235,7 +235,7 @@ EXPORT_SYMBOL_GPL(tpm_buf_read_u16);
*/
u32 tpm_buf_read_u32(struct tpm_buf *buf, off_t *offset)
{
- u32 value;
+ u32 value = 0;
tpm_buf_read(buf, offset, sizeof(value), &value);
diff --git a/drivers/dma/idxd/cdev.c b/drivers/dma/idxd/cdev.c
index 22aa2bab3693..19a58c4ecef3 100644
--- a/drivers/dma/idxd/cdev.c
+++ b/drivers/dma/idxd/cdev.c
@@ -225,7 +225,7 @@ static int idxd_cdev_open(struct inode *inode, struct file *filp)
struct idxd_wq *wq;
struct device *dev, *fdev;
int rc = 0;
- struct iommu_sva *sva;
+ struct iommu_sva *sva = NULL;
unsigned int pasid;
struct idxd_cdev *idxd_cdev;
@@ -322,7 +322,7 @@ static int idxd_cdev_open(struct inode *inode, struct file *filp)
if (device_user_pasid_enabled(idxd))
idxd_xa_pasid_remove(ctx);
failed_get_pasid:
- if (device_user_pasid_enabled(idxd))
+ if (device_user_pasid_enabled(idxd) && !IS_ERR_OR_NULL(sva))
iommu_sva_unbind_device(sva);
failed:
mutex_unlock(&wq->wq_lock);
diff --git a/drivers/gpio/gpio-virtuser.c b/drivers/gpio/gpio-virtuser.c
index e89f299f2140..dcecb7a25911 100644
--- a/drivers/gpio/gpio-virtuser.c
+++ b/drivers/gpio/gpio-virtuser.c
@@ -400,10 +400,15 @@ static ssize_t gpio_virtuser_direction_do_write(struct file *file,
char buf[32], *trimmed;
int ret, dir, val = 0;
- ret = simple_write_to_buffer(buf, sizeof(buf), ppos, user_buf, count);
+ if (count >= sizeof(buf))
+ return -EINVAL;
+
+ ret = simple_write_to_buffer(buf, sizeof(buf) - 1, ppos, user_buf, count);
if (ret < 0)
return ret;
+ buf[ret] = '\0';
+
trimmed = strim(buf);
if (strcmp(trimmed, "input") == 0) {
@@ -622,12 +627,15 @@ static ssize_t gpio_virtuser_consumer_write(struct file *file,
char buf[GPIO_VIRTUSER_NAME_BUF_LEN + 2];
int ret;
+ if (count >= sizeof(buf))
+ return -EINVAL;
+
ret = simple_write_to_buffer(buf, GPIO_VIRTUSER_NAME_BUF_LEN, ppos,
user_buf, count);
if (ret < 0)
return ret;
- buf[strlen(buf) - 1] = '\0';
+ buf[ret] = '\0';
ret = gpiod_set_consumer_name(data->ad.desc, buf);
if (ret)
diff --git a/drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_translation_helper.c b/drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_translation_helper.c
index 55014c152116..7e3d506bb79b 100644
--- a/drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_translation_helper.c
+++ b/drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_translation_helper.c
@@ -887,7 +887,7 @@ static void populate_dml21_plane_config_from_plane_state(struct dml2_context *dm
}
//TODO : Could be possibly moved to a common helper layer.
-static bool dml21_wrapper_get_plane_id(const struct dc_state *context, const struct dc_plane_state *plane, unsigned int *plane_id)
+static bool dml21_wrapper_get_plane_id(const struct dc_state *context, unsigned int stream_id, const struct dc_plane_state *plane, unsigned int *plane_id)
{
int i, j;
@@ -895,10 +895,12 @@ static bool dml21_wrapper_get_plane_id(const struct dc_state *context, const str
return false;
for (i = 0; i < context->stream_count; i++) {
- for (j = 0; j < context->stream_status[i].plane_count; j++) {
- if (context->stream_status[i].plane_states[j] == plane) {
- *plane_id = (i << 16) | j;
- return true;
+ if (context->streams[i]->stream_id == stream_id) {
+ for (j = 0; j < context->stream_status[i].plane_count; j++) {
+ if (context->stream_status[i].plane_states[j] == plane) {
+ *plane_id = (i << 16) | j;
+ return true;
+ }
}
}
}
@@ -921,14 +923,14 @@ static unsigned int map_stream_to_dml21_display_cfg(const struct dml2_context *d
return location;
}
-static unsigned int map_plane_to_dml21_display_cfg(const struct dml2_context *dml_ctx,
+static unsigned int map_plane_to_dml21_display_cfg(const struct dml2_context *dml_ctx, unsigned int stream_id,
const struct dc_plane_state *plane, const struct dc_state *context)
{
unsigned int plane_id;
int i = 0;
int location = -1;
- if (!dml21_wrapper_get_plane_id(context, plane, &plane_id)) {
+ if (!dml21_wrapper_get_plane_id(context, stream_id, plane, &plane_id)) {
ASSERT(false);
return -1;
}
@@ -1013,7 +1015,7 @@ bool dml21_map_dc_state_into_dml_display_cfg(const struct dc *in_dc, struct dc_s
dml_dispcfg->plane_descriptors[disp_cfg_plane_location].stream_index = disp_cfg_stream_location;
} else {
for (plane_index = 0; plane_index < context->stream_status[stream_index].plane_count; plane_index++) {
- disp_cfg_plane_location = map_plane_to_dml21_display_cfg(dml_ctx, context->stream_status[stream_index].plane_states[plane_index], context);
+ disp_cfg_plane_location = map_plane_to_dml21_display_cfg(dml_ctx, context->streams[stream_index]->stream_id, context->stream_status[stream_index].plane_states[plane_index], context);
if (disp_cfg_plane_location < 0)
disp_cfg_plane_location = dml_dispcfg->num_planes++;
@@ -1024,7 +1026,7 @@ bool dml21_map_dc_state_into_dml_display_cfg(const struct dc *in_dc, struct dc_s
populate_dml21_plane_config_from_plane_state(dml_ctx, &dml_dispcfg->plane_descriptors[disp_cfg_plane_location], context->stream_status[stream_index].plane_states[plane_index], context, stream_index);
dml_dispcfg->plane_descriptors[disp_cfg_plane_location].stream_index = disp_cfg_stream_location;
- if (dml21_wrapper_get_plane_id(context, context->stream_status[stream_index].plane_states[plane_index], &dml_ctx->v21.dml_to_dc_pipe_mapping.disp_cfg_to_plane_id[disp_cfg_plane_location]))
+ if (dml21_wrapper_get_plane_id(context, context->streams[stream_index]->stream_id, context->stream_status[stream_index].plane_states[plane_index], &dml_ctx->v21.dml_to_dc_pipe_mapping.disp_cfg_to_plane_id[disp_cfg_plane_location]))
dml_ctx->v21.dml_to_dc_pipe_mapping.disp_cfg_to_plane_id_valid[disp_cfg_plane_location] = true;
/* apply forced pstate policy */
diff --git a/drivers/gpu/drm/amd/display/dc/link/link_dpms.c b/drivers/gpu/drm/amd/display/dc/link/link_dpms.c
index c4e03482ba9a..aa2800129767 100644
--- a/drivers/gpu/drm/amd/display/dc/link/link_dpms.c
+++ b/drivers/gpu/drm/amd/display/dc/link/link_dpms.c
@@ -148,6 +148,7 @@ void link_blank_dp_stream(struct dc_link *link, bool hw_init)
void link_set_all_streams_dpms_off_for_link(struct dc_link *link)
{
struct pipe_ctx *pipes[MAX_PIPES];
+ struct dc_stream_state *streams[MAX_PIPES];
struct dc_state *state = link->dc->current_state;
uint8_t count;
int i;
@@ -160,10 +161,18 @@ void link_set_all_streams_dpms_off_for_link(struct dc_link *link)
link_get_master_pipes_with_dpms_on(link, state, &count, pipes);
+ /* The subsequent call to dc_commit_updates_for_stream for a full update
+ * will release the current state and swap to a new state. Releasing the
+ * current state results in the stream pointers in the pipe_ctx structs
+ * to be zero'd. Hence, cache all streams prior to dc_commit_updates_for_stream.
+ */
+ for (i = 0; i < count; i++)
+ streams[i] = pipes[i]->stream;
+
for (i = 0; i < count; i++) {
- stream_update.stream = pipes[i]->stream;
+ stream_update.stream = streams[i];
dc_commit_updates_for_stream(link->ctx->dc, NULL, 0,
- pipes[i]->stream, &stream_update,
+ streams[i], &stream_update,
state);
}
diff --git a/drivers/gpu/drm/xe/regs/xe_gt_regs.h b/drivers/gpu/drm/xe/regs/xe_gt_regs.h
index 5404de2aea54..c160b015d178 100644
--- a/drivers/gpu/drm/xe/regs/xe_gt_regs.h
+++ b/drivers/gpu/drm/xe/regs/xe_gt_regs.h
@@ -157,6 +157,7 @@
#define XEHPG_SC_INSTDONE_EXTRA2 XE_REG_MCR(0x7108)
#define COMMON_SLICE_CHICKEN4 XE_REG(0x7300, XE_REG_OPTION_MASKED)
+#define SBE_PUSH_CONSTANT_BEHIND_FIX_ENABLE REG_BIT(12)
#define DISABLE_TDC_LOAD_BALANCING_CALC REG_BIT(6)
#define COMMON_SLICE_CHICKEN3 XE_REG(0x7304, XE_REG_OPTION_MASKED)
diff --git a/drivers/gpu/drm/xe/xe_lrc.c b/drivers/gpu/drm/xe/xe_lrc.c
index 2d4e38b3bab1..ce6d2167b94a 100644
--- a/drivers/gpu/drm/xe/xe_lrc.c
+++ b/drivers/gpu/drm/xe/xe_lrc.c
@@ -874,7 +874,7 @@ static void *empty_lrc_data(struct xe_hw_engine *hwe)
static void xe_lrc_set_ppgtt(struct xe_lrc *lrc, struct xe_vm *vm)
{
- u64 desc = xe_vm_pdp4_descriptor(vm, lrc->tile);
+ u64 desc = xe_vm_pdp4_descriptor(vm, gt_to_tile(lrc->gt));
xe_lrc_write_ctx_reg(lrc, CTX_PDP0_UDW, upper_32_bits(desc));
xe_lrc_write_ctx_reg(lrc, CTX_PDP0_LDW, lower_32_bits(desc));
@@ -905,6 +905,7 @@ static int xe_lrc_init(struct xe_lrc *lrc, struct xe_hw_engine *hwe,
int err;
kref_init(&lrc->refcount);
+ lrc->gt = gt;
lrc->flags = 0;
lrc_size = ring_size + xe_gt_lrc_size(gt, hwe->class);
if (xe_gt_has_indirect_ring_state(gt))
@@ -923,7 +924,6 @@ static int xe_lrc_init(struct xe_lrc *lrc, struct xe_hw_engine *hwe,
return PTR_ERR(lrc->bo);
lrc->size = lrc_size;
- lrc->tile = gt_to_tile(hwe->gt);
lrc->ring.size = ring_size;
lrc->ring.tail = 0;
lrc->ctx_timestamp = 0;
diff --git a/drivers/gpu/drm/xe/xe_lrc_types.h b/drivers/gpu/drm/xe/xe_lrc_types.h
index 71ecb453f811..cd38586ae989 100644
--- a/drivers/gpu/drm/xe/xe_lrc_types.h
+++ b/drivers/gpu/drm/xe/xe_lrc_types.h
@@ -25,8 +25,8 @@ struct xe_lrc {
/** @size: size of lrc including any indirect ring state page */
u32 size;
- /** @tile: tile which this LRC belongs to */
- struct xe_tile *tile;
+ /** @gt: gt which this LRC belongs to */
+ struct xe_gt *gt;
/** @flags: LRC flags */
#define XE_LRC_FLAG_INDIRECT_RING_STATE 0x1
diff --git a/drivers/gpu/drm/xe/xe_wa.c b/drivers/gpu/drm/xe/xe_wa.c
index 0a1905f8d380..aea6034a8107 100644
--- a/drivers/gpu/drm/xe/xe_wa.c
+++ b/drivers/gpu/drm/xe/xe_wa.c
@@ -783,6 +783,10 @@ static const struct xe_rtp_entry_sr lrc_was[] = {
XE_RTP_RULES(GRAPHICS_VERSION(2001), ENGINE_CLASS(RENDER)),
XE_RTP_ACTIONS(SET(CHICKEN_RASTER_1, DIS_CLIP_NEGATIVE_BOUNDING_BOX))
},
+ { XE_RTP_NAME("22021007897"),
+ XE_RTP_RULES(GRAPHICS_VERSION(2001), ENGINE_CLASS(RENDER)),
+ XE_RTP_ACTIONS(SET(COMMON_SLICE_CHICKEN4, SBE_PUSH_CONSTANT_BEHIND_FIX_ENABLE))
+ },
/* Xe3_LPG */
{ XE_RTP_NAME("14021490052"),
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index 92baa34f42f2..c6424f625948 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -41,6 +41,10 @@
#define USB_VENDOR_ID_ACTIONSTAR 0x2101
#define USB_DEVICE_ID_ACTIONSTAR_1011 0x1011
+#define USB_VENDOR_ID_ADATA_XPG 0x125f
+#define USB_VENDOR_ID_ADATA_XPG_WL_GAMING_MOUSE 0x7505
+#define USB_VENDOR_ID_ADATA_XPG_WL_GAMING_MOUSE_DONGLE 0x7506
+
#define USB_VENDOR_ID_ADS_TECH 0x06e1
#define USB_DEVICE_ID_ADS_TECH_RADIO_SI470X 0xa155
diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c
index 5d7a418ccdbe..73979643315b 100644
--- a/drivers/hid/hid-quirks.c
+++ b/drivers/hid/hid-quirks.c
@@ -27,6 +27,8 @@
static const struct hid_device_id hid_quirks[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_AASHIMA, USB_DEVICE_ID_AASHIMA_GAMEPAD), HID_QUIRK_BADPAD },
{ HID_USB_DEVICE(USB_VENDOR_ID_AASHIMA, USB_DEVICE_ID_AASHIMA_PREDATOR), HID_QUIRK_BADPAD },
+ { HID_USB_DEVICE(USB_VENDOR_ID_ADATA_XPG, USB_VENDOR_ID_ADATA_XPG_WL_GAMING_MOUSE), HID_QUIRK_ALWAYS_POLL },
+ { HID_USB_DEVICE(USB_VENDOR_ID_ADATA_XPG, USB_VENDOR_ID_ADATA_XPG_WL_GAMING_MOUSE_DONGLE), HID_QUIRK_ALWAYS_POLL },
{ HID_USB_DEVICE(USB_VENDOR_ID_AFATECH, USB_DEVICE_ID_AFATECH_AF9016), HID_QUIRK_FULLSPEED_INTERVAL },
{ HID_USB_DEVICE(USB_VENDOR_ID_AIREN, USB_DEVICE_ID_AIREN_SLIMPLUS), HID_QUIRK_NOGET },
{ HID_USB_DEVICE(USB_VENDOR_ID_AKAI_09E8, USB_DEVICE_ID_AKAI_09E8_MIDIMIX), HID_QUIRK_NO_INIT_REPORTS },
diff --git a/drivers/net/can/kvaser_pciefd.c b/drivers/net/can/kvaser_pciefd.c
index 020e5897812f..3cf100780599 100644
--- a/drivers/net/can/kvaser_pciefd.c
+++ b/drivers/net/can/kvaser_pciefd.c
@@ -1670,24 +1670,28 @@ static int kvaser_pciefd_read_buffer(struct kvaser_pciefd *pcie, int dma_buf)
return res;
}
-static u32 kvaser_pciefd_receive_irq(struct kvaser_pciefd *pcie)
+static void kvaser_pciefd_receive_irq(struct kvaser_pciefd *pcie)
{
+ void __iomem *srb_cmd_reg = KVASER_PCIEFD_SRB_ADDR(pcie) + KVASER_PCIEFD_SRB_CMD_REG;
u32 irq = ioread32(KVASER_PCIEFD_SRB_ADDR(pcie) + KVASER_PCIEFD_SRB_IRQ_REG);
- if (irq & KVASER_PCIEFD_SRB_IRQ_DPD0)
+ iowrite32(irq, KVASER_PCIEFD_SRB_ADDR(pcie) + KVASER_PCIEFD_SRB_IRQ_REG);
+
+ if (irq & KVASER_PCIEFD_SRB_IRQ_DPD0) {
kvaser_pciefd_read_buffer(pcie, 0);
+ iowrite32(KVASER_PCIEFD_SRB_CMD_RDB0, srb_cmd_reg); /* Rearm buffer */
+ }
- if (irq & KVASER_PCIEFD_SRB_IRQ_DPD1)
+ if (irq & KVASER_PCIEFD_SRB_IRQ_DPD1) {
kvaser_pciefd_read_buffer(pcie, 1);
+ iowrite32(KVASER_PCIEFD_SRB_CMD_RDB1, srb_cmd_reg); /* Rearm buffer */
+ }
if (unlikely(irq & KVASER_PCIEFD_SRB_IRQ_DOF0 ||
irq & KVASER_PCIEFD_SRB_IRQ_DOF1 ||
irq & KVASER_PCIEFD_SRB_IRQ_DUF0 ||
irq & KVASER_PCIEFD_SRB_IRQ_DUF1))
dev_err(&pcie->pci->dev, "DMA IRQ error 0x%08X\n", irq);
-
- iowrite32(irq, KVASER_PCIEFD_SRB_ADDR(pcie) + KVASER_PCIEFD_SRB_IRQ_REG);
- return irq;
}
static void kvaser_pciefd_transmit_irq(struct kvaser_pciefd_can *can)
@@ -1715,29 +1719,22 @@ static irqreturn_t kvaser_pciefd_irq_handler(int irq, void *dev)
struct kvaser_pciefd *pcie = (struct kvaser_pciefd *)dev;
const struct kvaser_pciefd_irq_mask *irq_mask = pcie->driver_data->irq_mask;
u32 pci_irq = ioread32(KVASER_PCIEFD_PCI_IRQ_ADDR(pcie));
- u32 srb_irq = 0;
- u32 srb_release = 0;
int i;
if (!(pci_irq & irq_mask->all))
return IRQ_NONE;
+ iowrite32(0, KVASER_PCIEFD_PCI_IEN_ADDR(pcie));
+
if (pci_irq & irq_mask->kcan_rx0)
- srb_irq = kvaser_pciefd_receive_irq(pcie);
+ kvaser_pciefd_receive_irq(pcie);
for (i = 0; i < pcie->nr_channels; i++) {
if (pci_irq & irq_mask->kcan_tx[i])
kvaser_pciefd_transmit_irq(pcie->can[i]);
}
- if (srb_irq & KVASER_PCIEFD_SRB_IRQ_DPD0)
- srb_release |= KVASER_PCIEFD_SRB_CMD_RDB0;
-
- if (srb_irq & KVASER_PCIEFD_SRB_IRQ_DPD1)
- srb_release |= KVASER_PCIEFD_SRB_CMD_RDB1;
-
- if (srb_release)
- iowrite32(srb_release, KVASER_PCIEFD_SRB_ADDR(pcie) + KVASER_PCIEFD_SRB_CMD_REG);
+ iowrite32(irq_mask->all, KVASER_PCIEFD_PCI_IEN_ADDR(pcie));
return IRQ_HANDLED;
}
@@ -1757,13 +1754,22 @@ static void kvaser_pciefd_teardown_can_ctrls(struct kvaser_pciefd *pcie)
}
}
+static void kvaser_pciefd_disable_irq_srcs(struct kvaser_pciefd *pcie)
+{
+ unsigned int i;
+
+ /* Masking PCI_IRQ is insufficient as running ISR will unmask it */
+ iowrite32(0, KVASER_PCIEFD_SRB_ADDR(pcie) + KVASER_PCIEFD_SRB_IEN_REG);
+ for (i = 0; i < pcie->nr_channels; ++i)
+ iowrite32(0, pcie->can[i]->reg_base + KVASER_PCIEFD_KCAN_IEN_REG);
+}
+
static int kvaser_pciefd_probe(struct pci_dev *pdev,
const struct pci_device_id *id)
{
int ret;
struct kvaser_pciefd *pcie;
const struct kvaser_pciefd_irq_mask *irq_mask;
- void __iomem *irq_en_base;
pcie = devm_kzalloc(&pdev->dev, sizeof(*pcie), GFP_KERNEL);
if (!pcie)
@@ -1829,8 +1835,7 @@ static int kvaser_pciefd_probe(struct pci_dev *pdev,
KVASER_PCIEFD_SRB_ADDR(pcie) + KVASER_PCIEFD_SRB_IEN_REG);
/* Enable PCI interrupts */
- irq_en_base = KVASER_PCIEFD_PCI_IEN_ADDR(pcie);
- iowrite32(irq_mask->all, irq_en_base);
+ iowrite32(irq_mask->all, KVASER_PCIEFD_PCI_IEN_ADDR(pcie));
/* Ready the DMA buffers */
iowrite32(KVASER_PCIEFD_SRB_CMD_RDB0,
KVASER_PCIEFD_SRB_ADDR(pcie) + KVASER_PCIEFD_SRB_CMD_REG);
@@ -1844,8 +1849,7 @@ static int kvaser_pciefd_probe(struct pci_dev *pdev,
return 0;
err_free_irq:
- /* Disable PCI interrupts */
- iowrite32(0, irq_en_base);
+ kvaser_pciefd_disable_irq_srcs(pcie);
free_irq(pcie->pci->irq, pcie);
err_pci_free_irq_vectors:
@@ -1868,35 +1872,26 @@ static int kvaser_pciefd_probe(struct pci_dev *pdev,
return ret;
}
-static void kvaser_pciefd_remove_all_ctrls(struct kvaser_pciefd *pcie)
-{
- int i;
-
- for (i = 0; i < pcie->nr_channels; i++) {
- struct kvaser_pciefd_can *can = pcie->can[i];
-
- if (can) {
- iowrite32(0, can->reg_base + KVASER_PCIEFD_KCAN_IEN_REG);
- unregister_candev(can->can.dev);
- del_timer(&can->bec_poll_timer);
- kvaser_pciefd_pwm_stop(can);
- free_candev(can->can.dev);
- }
- }
-}
-
static void kvaser_pciefd_remove(struct pci_dev *pdev)
{
struct kvaser_pciefd *pcie = pci_get_drvdata(pdev);
+ unsigned int i;
- kvaser_pciefd_remove_all_ctrls(pcie);
+ for (i = 0; i < pcie->nr_channels; ++i) {
+ struct kvaser_pciefd_can *can = pcie->can[i];
- /* Disable interrupts */
- iowrite32(0, KVASER_PCIEFD_SRB_ADDR(pcie) + KVASER_PCIEFD_SRB_CTRL_REG);
- iowrite32(0, KVASER_PCIEFD_PCI_IEN_ADDR(pcie));
+ unregister_candev(can->can.dev);
+ del_timer(&can->bec_poll_timer);
+ kvaser_pciefd_pwm_stop(can);
+ }
+ kvaser_pciefd_disable_irq_srcs(pcie);
free_irq(pcie->pci->irq, pcie);
pci_free_irq_vectors(pcie->pci);
+
+ for (i = 0; i < pcie->nr_channels; ++i)
+ free_candev(pcie->can[i]->can.dev);
+
pci_iounmap(pdev, pcie->reg_base);
pci_release_regions(pdev);
pci_disable_device(pdev);
diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
index a21e7c0afbfd..61788a43cb86 100644
--- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c
+++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
@@ -2699,7 +2699,7 @@ static int am65_cpsw_nuss_init_slave_ports(struct am65_cpsw_common *common)
port->slave.mac_addr);
if (!is_valid_ether_addr(port->slave.mac_addr)) {
eth_random_addr(port->slave.mac_addr);
- dev_err(dev, "Use random MAC address\n");
+ dev_info(dev, "Use random MAC address\n");
}
}
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index cd8a10f6accf..37fd1a8ace12 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -3701,6 +3701,8 @@ static const struct pci_device_id nvme_id_table[] = {
.driver_data = NVME_QUIRK_NO_DEEPEST_PS, },
{ PCI_DEVICE(0x1e49, 0x0041), /* ZHITAI TiPro7000 NVMe SSD */
.driver_data = NVME_QUIRK_NO_DEEPEST_PS, },
+ { PCI_DEVICE(0x025e, 0xf1ac), /* SOLIDIGM P44 pro SSDPFKKW020X7 */
+ .driver_data = NVME_QUIRK_NO_DEEPEST_PS, },
{ PCI_DEVICE(0xc0a9, 0x540a), /* Crucial P2 */
.driver_data = NVME_QUIRK_BOGUS_NID, },
{ PCI_DEVICE(0x1d97, 0x2263), /* Lexar NM610 */
diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
index 30506c43776f..ff17e0f95fbb 100644
--- a/drivers/perf/arm-cmn.c
+++ b/drivers/perf/arm-cmn.c
@@ -727,8 +727,8 @@ static umode_t arm_cmn_event_attr_is_visible(struct kobject *kobj,
if ((chan == 5 && cmn->rsp_vc_num < 2) ||
(chan == 6 && cmn->dat_vc_num < 2) ||
- (chan == 7 && cmn->snp_vc_num < 2) ||
- (chan == 8 && cmn->req_vc_num < 2))
+ (chan == 7 && cmn->req_vc_num < 2) ||
+ (chan == 8 && cmn->snp_vc_num < 2))
return 0;
}
@@ -884,8 +884,8 @@ static umode_t arm_cmn_event_attr_is_visible(struct kobject *kobj,
_CMN_EVENT_XP(pub_##_name, (_event) | (4 << 5)), \
_CMN_EVENT_XP(rsp2_##_name, (_event) | (5 << 5)), \
_CMN_EVENT_XP(dat2_##_name, (_event) | (6 << 5)), \
- _CMN_EVENT_XP(snp2_##_name, (_event) | (7 << 5)), \
- _CMN_EVENT_XP(req2_##_name, (_event) | (8 << 5))
+ _CMN_EVENT_XP(req2_##_name, (_event) | (7 << 5)), \
+ _CMN_EVENT_XP(snp2_##_name, (_event) | (8 << 5))
#define CMN_EVENT_XP_DAT(_name, _event) \
_CMN_EVENT_XP_PORT(dat_##_name, (_event) | (3 << 5)), \
@@ -2557,6 +2557,7 @@ static int arm_cmn_probe(struct platform_device *pdev)
cmn->dev = &pdev->dev;
cmn->part = (unsigned long)device_get_match_data(cmn->dev);
+ cmn->cpu = cpumask_local_spread(0, dev_to_node(cmn->dev));
platform_set_drvdata(pdev, cmn);
if (cmn->part == PART_CMN600 && has_acpi_companion(cmn->dev)) {
@@ -2584,7 +2585,6 @@ static int arm_cmn_probe(struct platform_device *pdev)
if (err)
return err;
- cmn->cpu = cpumask_local_spread(0, dev_to_node(cmn->dev));
cmn->pmu = (struct pmu) {
.module = THIS_MODULE,
.parent = cmn->dev,
@@ -2650,6 +2650,7 @@ static const struct acpi_device_id arm_cmn_acpi_match[] = {
{ "ARMHC600", PART_CMN600 },
{ "ARMHC650" },
{ "ARMHC700" },
+ { "ARMHC003" },
{}
};
MODULE_DEVICE_TABLE(acpi, arm_cmn_acpi_match);
diff --git a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
index dc6e01dff5c7..9b99fdd43f5f 100644
--- a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
+++ b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
@@ -328,6 +328,8 @@ static const struct ropll_config ropll_tmds_cfg[] = {
1, 1, 0, 0x20, 0x0c, 1, 0x0e, 0, 0, },
{ 650000, 162, 162, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 54, 0, 16, 4, 1,
1, 1, 0, 0x20, 0x0c, 1, 0x0e, 0, 0, },
+ { 502500, 84, 84, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1, 11, 1, 4, 5,
+ 4, 11, 1, 0, 0x20, 0x0c, 1, 0x0e, 0, 0, },
{ 337500, 0x70, 0x70, 1, 1, 0xf, 1, 1, 1, 1, 1, 1, 1, 0x2, 0, 0x01, 5,
1, 1, 1, 0, 0x20, 0x0c, 1, 0x0e, 0, 0, },
{ 400000, 100, 100, 1, 1, 11, 1, 1, 0, 1, 0, 1, 1, 0x9, 0, 0x05, 0,
diff --git a/drivers/phy/starfive/phy-jh7110-usb.c b/drivers/phy/starfive/phy-jh7110-usb.c
index cb5454fbe2c8..b505d89860b4 100644
--- a/drivers/phy/starfive/phy-jh7110-usb.c
+++ b/drivers/phy/starfive/phy-jh7110-usb.c
@@ -18,6 +18,8 @@
#include <linux/usb/of.h>
#define USB_125M_CLK_RATE 125000000
+#define USB_CLK_MODE_OFF 0x0
+#define USB_CLK_MODE_RX_NORMAL_PWR BIT(1)
#define USB_LS_KEEPALIVE_OFF 0x4
#define USB_LS_KEEPALIVE_ENABLE BIT(4)
@@ -78,6 +80,7 @@ static int jh7110_usb2_phy_init(struct phy *_phy)
{
struct jh7110_usb2_phy *phy = phy_get_drvdata(_phy);
int ret;
+ unsigned int val;
ret = clk_set_rate(phy->usb_125m_clk, USB_125M_CLK_RATE);
if (ret)
@@ -87,6 +90,10 @@ static int jh7110_usb2_phy_init(struct phy *_phy)
if (ret)
return ret;
+ val = readl(phy->regs + USB_CLK_MODE_OFF);
+ val |= USB_CLK_MODE_RX_NORMAL_PWR;
+ writel(val, phy->regs + USB_CLK_MODE_OFF);
+
return 0;
}
diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
index ae992ac1ab4a..6d5300c54a42 100644
--- a/drivers/platform/x86/fujitsu-laptop.c
+++ b/drivers/platform/x86/fujitsu-laptop.c
@@ -17,13 +17,13 @@
/*
* fujitsu-laptop.c - Fujitsu laptop support, providing access to additional
* features made available on a range of Fujitsu laptops including the
- * P2xxx/P5xxx/S6xxx/S7xxx series.
+ * P2xxx/P5xxx/S2xxx/S6xxx/S7xxx series.
*
* This driver implements a vendor-specific backlight control interface for
* Fujitsu laptops and provides support for hotkeys present on certain Fujitsu
* laptops.
*
- * This driver has been tested on a Fujitsu Lifebook S6410, S7020 and
+ * This driver has been tested on a Fujitsu Lifebook S2110, S6410, S7020 and
* P8010. It should work on most P-series and S-series Lifebooks, but
* YMMV.
*
@@ -107,7 +107,11 @@
#define KEY2_CODE 0x411
#define KEY3_CODE 0x412
#define KEY4_CODE 0x413
-#define KEY5_CODE 0x420
+#define KEY5_CODE 0x414
+#define KEY6_CODE 0x415
+#define KEY7_CODE 0x416
+#define KEY8_CODE 0x417
+#define KEY9_CODE 0x420
/* Hotkey ringbuffer limits */
#define MAX_HOTKEY_RINGBUFFER_SIZE 100
@@ -560,7 +564,7 @@ static const struct key_entry keymap_default[] = {
{ KE_KEY, KEY2_CODE, { KEY_PROG2 } },
{ KE_KEY, KEY3_CODE, { KEY_PROG3 } },
{ KE_KEY, KEY4_CODE, { KEY_PROG4 } },
- { KE_KEY, KEY5_CODE, { KEY_RFKILL } },
+ { KE_KEY, KEY9_CODE, { KEY_RFKILL } },
/* Soft keys read from status flags */
{ KE_KEY, FLAG_RFKILL, { KEY_RFKILL } },
{ KE_KEY, FLAG_TOUCHPAD_TOGGLE, { KEY_TOUCHPAD_TOGGLE } },
@@ -584,6 +588,18 @@ static const struct key_entry keymap_p8010[] = {
{ KE_END, 0 }
};
+static const struct key_entry keymap_s2110[] = {
+ { KE_KEY, KEY1_CODE, { KEY_PROG1 } }, /* "A" */
+ { KE_KEY, KEY2_CODE, { KEY_PROG2 } }, /* "B" */
+ { KE_KEY, KEY3_CODE, { KEY_WWW } }, /* "Internet" */
+ { KE_KEY, KEY4_CODE, { KEY_EMAIL } }, /* "E-mail" */
+ { KE_KEY, KEY5_CODE, { KEY_STOPCD } },
+ { KE_KEY, KEY6_CODE, { KEY_PLAYPAUSE } },
+ { KE_KEY, KEY7_CODE, { KEY_PREVIOUSSONG } },
+ { KE_KEY, KEY8_CODE, { KEY_NEXTSONG } },
+ { KE_END, 0 }
+};
+
static const struct key_entry *keymap = keymap_default;
static int fujitsu_laptop_dmi_keymap_override(const struct dmi_system_id *id)
@@ -621,6 +637,15 @@ static const struct dmi_system_id fujitsu_laptop_dmi_table[] = {
},
.driver_data = (void *)keymap_p8010
},
+ {
+ .callback = fujitsu_laptop_dmi_keymap_override,
+ .ident = "Fujitsu LifeBook S2110",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK S2110"),
+ },
+ .driver_data = (void *)keymap_s2110
+ },
{}
};
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index dea40da86755..0528af4ed8d6 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -232,6 +232,7 @@ enum tpacpi_hkey_event_t {
/* Thermal events */
TP_HKEY_EV_ALARM_BAT_HOT = 0x6011, /* battery too hot */
TP_HKEY_EV_ALARM_BAT_XHOT = 0x6012, /* battery critically hot */
+ TP_HKEY_EV_ALARM_BAT_LIM_CHANGE = 0x6013, /* battery charge limit changed*/
TP_HKEY_EV_ALARM_SENSOR_HOT = 0x6021, /* sensor too hot */
TP_HKEY_EV_ALARM_SENSOR_XHOT = 0x6022, /* sensor critically hot */
TP_HKEY_EV_THM_TABLE_CHANGED = 0x6030, /* windows; thermal table changed */
@@ -3778,6 +3779,10 @@ static bool hotkey_notify_6xxx(const u32 hkey, bool *send_acpi_ev)
pr_alert("THERMAL EMERGENCY: battery is extremely hot!\n");
/* recommended action: immediate sleep/hibernate */
break;
+ case TP_HKEY_EV_ALARM_BAT_LIM_CHANGE:
+ pr_debug("Battery Info: battery charge threshold changed\n");
+ /* User changed charging threshold. No action needed */
+ return true;
case TP_HKEY_EV_ALARM_SENSOR_HOT:
pr_crit("THERMAL ALARM: a sensor reports something is too hot!\n");
/* recommended action: warn user through gui, that */
@@ -11472,6 +11477,8 @@ static int __must_check __init get_thinkpad_model_data(
tp->vendor = PCI_VENDOR_ID_IBM;
else if (dmi_name_in_vendors("LENOVO"))
tp->vendor = PCI_VENDOR_ID_LENOVO;
+ else if (dmi_name_in_vendors("NEC"))
+ tp->vendor = PCI_VENDOR_ID_LENOVO;
else
return 0;
diff --git a/drivers/spi/spi-sun4i.c b/drivers/spi/spi-sun4i.c
index 2ee6755b43f5..3019f57e6584 100644
--- a/drivers/spi/spi-sun4i.c
+++ b/drivers/spi/spi-sun4i.c
@@ -264,6 +264,9 @@ static int sun4i_spi_transfer_one(struct spi_controller *host,
else
reg |= SUN4I_CTL_DHB;
+ /* Now that the settings are correct, enable the interface */
+ reg |= SUN4I_CTL_ENABLE;
+
sun4i_spi_write(sspi, SUN4I_CTL_REG, reg);
/* Ensure that we have a parent clock fast enough */
@@ -404,7 +407,7 @@ static int sun4i_spi_runtime_resume(struct device *dev)
}
sun4i_spi_write(sspi, SUN4I_CTL_REG,
- SUN4I_CTL_ENABLE | SUN4I_CTL_MASTER | SUN4I_CTL_TP);
+ SUN4I_CTL_MASTER | SUN4I_CTL_TP);
return 0;
diff --git a/fs/coredump.c b/fs/coredump.c
index 2b8c36c9660c..64894ba6efca 100644
--- a/fs/coredump.c
+++ b/fs/coredump.c
@@ -43,6 +43,8 @@
#include <linux/timekeeping.h>
#include <linux/sysctl.h>
#include <linux/elf.h>
+#include <linux/pidfs.h>
+#include <uapi/linux/pidfd.h>
#include <linux/uaccess.h>
#include <asm/mmu_context.h>
@@ -60,6 +62,12 @@ static void free_vma_snapshot(struct coredump_params *cprm);
#define CORE_FILE_NOTE_SIZE_DEFAULT (4*1024*1024)
/* Define a reasonable max cap */
#define CORE_FILE_NOTE_SIZE_MAX (16*1024*1024)
+/*
+ * File descriptor number for the pidfd for the thread-group leader of
+ * the coredumping task installed into the usermode helper's file
+ * descriptor table.
+ */
+#define COREDUMP_PIDFD_NUMBER 3
static int core_uses_pid;
static unsigned int core_pipe_limit;
@@ -339,6 +347,27 @@ static int format_corename(struct core_name *cn, struct coredump_params *cprm,
case 'C':
err = cn_printf(cn, "%d", cprm->cpu);
break;
+ /* pidfd number */
+ case 'F': {
+ /*
+ * Installing a pidfd only makes sense if
+ * we actually spawn a usermode helper.
+ */
+ if (!ispipe)
+ break;
+
+ /*
+ * Note that we'll install a pidfd for the
+ * thread-group leader. We know that task
+ * linkage hasn't been removed yet and even if
+ * this @current isn't the actual thread-group
+ * leader we know that the thread-group leader
+ * cannot be reaped until @current has exited.
+ */
+ cprm->pid = task_tgid(current);
+ err = cn_printf(cn, "%d", COREDUMP_PIDFD_NUMBER);
+ break;
+ }
default:
break;
}
@@ -493,7 +522,7 @@ static void wait_for_dump_helpers(struct file *file)
}
/*
- * umh_pipe_setup
+ * umh_coredump_setup
* helper function to customize the process used
* to collect the core in userspace. Specifically
* it sets up a pipe and installs it as fd 0 (stdin)
@@ -503,11 +532,32 @@ static void wait_for_dump_helpers(struct file *file)
* is a special value that we use to trap recursive
* core dumps
*/
-static int umh_pipe_setup(struct subprocess_info *info, struct cred *new)
+static int umh_coredump_setup(struct subprocess_info *info, struct cred *new)
{
struct file *files[2];
struct coredump_params *cp = (struct coredump_params *)info->data;
- int err = create_pipe_files(files, 0);
+ int err;
+
+ if (cp->pid) {
+ struct file *pidfs_file __free(fput) = NULL;
+
+ pidfs_file = pidfs_alloc_file(cp->pid, O_RDWR);
+ if (IS_ERR(pidfs_file))
+ return PTR_ERR(pidfs_file);
+
+ /*
+ * Usermode helpers are childen of either
+ * system_unbound_wq or of kthreadd. So we know that
+ * we're starting off with a clean file descriptor
+ * table. So we should always be able to use
+ * COREDUMP_PIDFD_NUMBER as our file descriptor value.
+ */
+ err = replace_fd(COREDUMP_PIDFD_NUMBER, pidfs_file, 0);
+ if (err < 0)
+ return err;
+ }
+
+ err = create_pipe_files(files, 0);
if (err)
return err;
@@ -515,10 +565,13 @@ static int umh_pipe_setup(struct subprocess_info *info, struct cred *new)
err = replace_fd(0, files[0], 0);
fput(files[0]);
+ if (err < 0)
+ return err;
+
/* and disallow core files too */
current->signal->rlim[RLIMIT_CORE] = (struct rlimit){1, 1};
- return err;
+ return 0;
}
void do_coredump(const kernel_siginfo_t *siginfo)
@@ -593,7 +646,7 @@ void do_coredump(const kernel_siginfo_t *siginfo)
}
if (cprm.limit == 1) {
- /* See umh_pipe_setup() which sets RLIMIT_CORE = 1.
+ /* See umh_coredump_setup() which sets RLIMIT_CORE = 1.
*
* Normally core limits are irrelevant to pipes, since
* we're not writing to the file system, but we use
@@ -632,7 +685,7 @@ void do_coredump(const kernel_siginfo_t *siginfo)
retval = -ENOMEM;
sub_info = call_usermodehelper_setup(helper_argv[0],
helper_argv, NULL, GFP_KERNEL,
- umh_pipe_setup, NULL, &cprm);
+ umh_coredump_setup, NULL, &cprm);
if (sub_info)
retval = call_usermodehelper_exec(sub_info,
UMH_WAIT_EXEC);
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 03ecc7765615..4503758e9594 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -1096,6 +1096,8 @@ struct nfs_server *nfs_create_server(struct fs_context *fc)
if (server->namelen == 0 || server->namelen > NFS2_MAXNAMLEN)
server->namelen = NFS2_MAXNAMLEN;
}
+ /* Linux 'subtree_check' borkenness mandates this setting */
+ server->fh_expire_type = NFS_FH_VOL_RENAME;
if (!(fattr->valid & NFS_ATTR_FATTR)) {
error = ctx->nfs_mod->rpc_ops->getattr(server, ctx->mntfh,
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 492cffd9d3d8..f9f4a92f63e9 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -2690,6 +2690,18 @@ nfs_unblock_rename(struct rpc_task *task, struct nfs_renamedata *data)
unblock_revalidate(new_dentry);
}
+static bool nfs_rename_is_unsafe_cross_dir(struct dentry *old_dentry,
+ struct dentry *new_dentry)
+{
+ struct nfs_server *server = NFS_SB(old_dentry->d_sb);
+
+ if (old_dentry->d_parent != new_dentry->d_parent)
+ return false;
+ if (server->fh_expire_type & NFS_FH_RENAME_UNSAFE)
+ return !(server->fh_expire_type & NFS_FH_NOEXPIRE_WITH_OPEN);
+ return true;
+}
+
/*
* RENAME
* FIXME: Some nfsds, like the Linux user space nfsd, may generate a
@@ -2777,7 +2789,8 @@ int nfs_rename(struct mnt_idmap *idmap, struct inode *old_dir,
}
- if (S_ISREG(old_inode->i_mode))
+ if (S_ISREG(old_inode->i_mode) &&
+ nfs_rename_is_unsafe_cross_dir(old_dentry, new_dentry))
nfs_sync_inode(old_inode);
task = nfs_async_rename(old_dir, new_dir, old_dentry, new_dentry,
must_unblock ? nfs_unblock_rename : NULL);
diff --git a/fs/nfs/filelayout/filelayoutdev.c b/fs/nfs/filelayout/filelayoutdev.c
index 4fa304fa5bc4..29d9234d5c08 100644
--- a/fs/nfs/filelayout/filelayoutdev.c
+++ b/fs/nfs/filelayout/filelayoutdev.c
@@ -76,6 +76,7 @@ nfs4_fl_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
struct page *scratch;
struct list_head dsaddrs;
struct nfs4_pnfs_ds_addr *da;
+ struct net *net = server->nfs_client->cl_net;
/* set up xdr stream */
scratch = alloc_page(gfp_flags);
@@ -159,8 +160,7 @@ nfs4_fl_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
mp_count = be32_to_cpup(p); /* multipath count */
for (j = 0; j < mp_count; j++) {
- da = nfs4_decode_mp_ds_addr(server->nfs_client->cl_net,
- &stream, gfp_flags);
+ da = nfs4_decode_mp_ds_addr(net, &stream, gfp_flags);
if (da)
list_add_tail(&da->da_node, &dsaddrs);
}
@@ -170,7 +170,7 @@ nfs4_fl_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
goto out_err_free_deviceid;
}
- dsaddr->ds_list[i] = nfs4_pnfs_ds_add(&dsaddrs, gfp_flags);
+ dsaddr->ds_list[i] = nfs4_pnfs_ds_add(net, &dsaddrs, gfp_flags);
if (!dsaddr->ds_list[i])
goto out_err_drain_dsaddrs;
trace_fl_getdevinfo(server, &pdev->dev_id, dsaddr->ds_list[i]->ds_remotestr);
diff --git a/fs/nfs/flexfilelayout/flexfilelayoutdev.c b/fs/nfs/flexfilelayout/flexfilelayoutdev.c
index e58bedfb1dcc..4a304cf17c4b 100644
--- a/fs/nfs/flexfilelayout/flexfilelayoutdev.c
+++ b/fs/nfs/flexfilelayout/flexfilelayoutdev.c
@@ -49,6 +49,7 @@ nfs4_ff_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
struct nfs4_pnfs_ds_addr *da;
struct nfs4_ff_layout_ds *new_ds = NULL;
struct nfs4_ff_ds_version *ds_versions = NULL;
+ struct net *net = server->nfs_client->cl_net;
u32 mp_count;
u32 version_count;
__be32 *p;
@@ -80,8 +81,7 @@ nfs4_ff_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
for (i = 0; i < mp_count; i++) {
/* multipath ds */
- da = nfs4_decode_mp_ds_addr(server->nfs_client->cl_net,
- &stream, gfp_flags);
+ da = nfs4_decode_mp_ds_addr(net, &stream, gfp_flags);
if (da)
list_add_tail(&da->da_node, &dsaddrs);
}
@@ -149,7 +149,7 @@ nfs4_ff_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
new_ds->ds_versions = ds_versions;
new_ds->ds_versions_cnt = version_count;
- new_ds->ds = nfs4_pnfs_ds_add(&dsaddrs, gfp_flags);
+ new_ds->ds = nfs4_pnfs_ds_add(net, &dsaddrs, gfp_flags);
if (!new_ds->ds)
goto out_err_drain_dsaddrs;
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
index 30d2613e912b..91ff877185c8 100644
--- a/fs/nfs/pnfs.h
+++ b/fs/nfs/pnfs.h
@@ -60,6 +60,7 @@ struct nfs4_pnfs_ds {
struct list_head ds_node; /* nfs4_pnfs_dev_hlist dev_dslist */
char *ds_remotestr; /* comma sep list of addrs */
struct list_head ds_addrs;
+ const struct net *ds_net;
struct nfs_client *ds_clp;
refcount_t ds_count;
unsigned long ds_state;
@@ -415,7 +416,8 @@ int pnfs_generic_commit_pagelist(struct inode *inode,
int pnfs_generic_scan_commit_lists(struct nfs_commit_info *cinfo, int max);
void pnfs_generic_write_commit_done(struct rpc_task *task, void *data);
void nfs4_pnfs_ds_put(struct nfs4_pnfs_ds *ds);
-struct nfs4_pnfs_ds *nfs4_pnfs_ds_add(struct list_head *dsaddrs,
+struct nfs4_pnfs_ds *nfs4_pnfs_ds_add(const struct net *net,
+ struct list_head *dsaddrs,
gfp_t gfp_flags);
void nfs4_pnfs_v3_ds_connect_unload(void);
int nfs4_pnfs_ds_connect(struct nfs_server *mds_srv, struct nfs4_pnfs_ds *ds,
diff --git a/fs/nfs/pnfs_nfs.c b/fs/nfs/pnfs_nfs.c
index dbef837e871a..2ee20a0f0b36 100644
--- a/fs/nfs/pnfs_nfs.c
+++ b/fs/nfs/pnfs_nfs.c
@@ -604,12 +604,12 @@ _same_data_server_addrs_locked(const struct list_head *dsaddrs1,
* Lookup DS by addresses. nfs4_ds_cache_lock is held
*/
static struct nfs4_pnfs_ds *
-_data_server_lookup_locked(const struct list_head *dsaddrs)
+_data_server_lookup_locked(const struct net *net, const struct list_head *dsaddrs)
{
struct nfs4_pnfs_ds *ds;
list_for_each_entry(ds, &nfs4_data_server_cache, ds_node)
- if (_same_data_server_addrs_locked(&ds->ds_addrs, dsaddrs))
+ if (ds->ds_net == net && _same_data_server_addrs_locked(&ds->ds_addrs, dsaddrs))
return ds;
return NULL;
}
@@ -716,7 +716,7 @@ nfs4_pnfs_remotestr(struct list_head *dsaddrs, gfp_t gfp_flags)
* uncached and return cached struct nfs4_pnfs_ds.
*/
struct nfs4_pnfs_ds *
-nfs4_pnfs_ds_add(struct list_head *dsaddrs, gfp_t gfp_flags)
+nfs4_pnfs_ds_add(const struct net *net, struct list_head *dsaddrs, gfp_t gfp_flags)
{
struct nfs4_pnfs_ds *tmp_ds, *ds = NULL;
char *remotestr;
@@ -734,13 +734,14 @@ nfs4_pnfs_ds_add(struct list_head *dsaddrs, gfp_t gfp_flags)
remotestr = nfs4_pnfs_remotestr(dsaddrs, gfp_flags);
spin_lock(&nfs4_ds_cache_lock);
- tmp_ds = _data_server_lookup_locked(dsaddrs);
+ tmp_ds = _data_server_lookup_locked(net, dsaddrs);
if (tmp_ds == NULL) {
INIT_LIST_HEAD(&ds->ds_addrs);
list_splice_init(dsaddrs, &ds->ds_addrs);
ds->ds_remotestr = remotestr;
refcount_set(&ds->ds_count, 1);
INIT_LIST_HEAD(&ds->ds_node);
+ ds->ds_net = net;
ds->ds_clp = NULL;
list_add(&ds->ds_node, &nfs4_data_server_cache);
dprintk("%s add new data server %s\n", __func__,
diff --git a/fs/smb/server/oplock.c b/fs/smb/server/oplock.c
index 03f606afad93..d7a8a580d013 100644
--- a/fs/smb/server/oplock.c
+++ b/fs/smb/server/oplock.c
@@ -146,12 +146,9 @@ static struct oplock_info *opinfo_get_list(struct ksmbd_inode *ci)
{
struct oplock_info *opinfo;
- if (list_empty(&ci->m_op_list))
- return NULL;
-
down_read(&ci->m_lock);
- opinfo = list_first_entry(&ci->m_op_list, struct oplock_info,
- op_entry);
+ opinfo = list_first_entry_or_null(&ci->m_op_list, struct oplock_info,
+ op_entry);
if (opinfo) {
if (opinfo->conn == NULL ||
!atomic_inc_not_zero(&opinfo->refcount))
diff --git a/include/linux/coredump.h b/include/linux/coredump.h
index 77e6e195d1d6..76e41805b92d 100644
--- a/include/linux/coredump.h
+++ b/include/linux/coredump.h
@@ -28,6 +28,7 @@ struct coredump_params {
int vma_count;
size_t vma_data_size;
struct core_vma_metadata *vma_meta;
+ struct pid *pid;
};
extern unsigned int core_file_note_size_limit;
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h
index 81ab18658d72..2cff5cafbaa7 100644
--- a/include/linux/nfs_fs_sb.h
+++ b/include/linux/nfs_fs_sb.h
@@ -211,6 +211,15 @@ struct nfs_server {
char *fscache_uniq; /* Uniquifier (or NULL) */
#endif
+ /* The following #defines numerically match the NFSv4 equivalents */
+#define NFS_FH_NOEXPIRE_WITH_OPEN (0x1)
+#define NFS_FH_VOLATILE_ANY (0x2)
+#define NFS_FH_VOL_MIGRATION (0x4)
+#define NFS_FH_VOL_RENAME (0x8)
+#define NFS_FH_RENAME_UNSAFE (NFS_FH_VOLATILE_ANY | NFS_FH_VOL_RENAME)
+ u32 fh_expire_type; /* V4 bitmask representing file
+ handle volatility type for
+ this filesystem */
u32 pnfs_blksize; /* layout_blksize attr */
#if IS_ENABLED(CONFIG_NFS_V4)
u32 attr_bitmask[3];/* V4 bitmask representing the set
@@ -234,9 +243,6 @@ struct nfs_server {
u32 acl_bitmask; /* V4 bitmask representing the ACEs
that are supported on this
filesystem */
- u32 fh_expire_type; /* V4 bitmask representing file
- handle volatility type for
- this filesystem */
struct pnfs_layoutdriver_type *pnfs_curr_ld; /* Active layout driver */
struct rpc_wait_queue roc_rpcwaitq;
void *pnfs_ld_data; /* per mount point data */
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c
index 7986145a527c..5a7745170e84 100644
--- a/net/sched/sch_hfsc.c
+++ b/net/sched/sch_hfsc.c
@@ -175,6 +175,11 @@ struct hfsc_sched {
#define HT_INFINITY 0xffffffffffffffffULL /* infinite time value */
+static bool cl_in_el_or_vttree(struct hfsc_class *cl)
+{
+ return ((cl->cl_flags & HFSC_FSC) && cl->cl_nactive) ||
+ ((cl->cl_flags & HFSC_RSC) && !RB_EMPTY_NODE(&cl->el_node));
+}
/*
* eligible tree holds backlogged classes being sorted by their eligible times.
@@ -1040,6 +1045,8 @@ hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid,
if (cl == NULL)
return -ENOBUFS;
+ RB_CLEAR_NODE(&cl->el_node);
+
err = tcf_block_get(&cl->block, &cl->filter_list, sch, extack);
if (err) {
kfree(cl);
@@ -1572,7 +1579,7 @@ hfsc_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free)
sch->qstats.backlog += len;
sch->q.qlen++;
- if (first && !cl->cl_nactive) {
+ if (first && !cl_in_el_or_vttree(cl)) {
if (cl->cl_flags & HFSC_RSC)
init_ed(cl, len);
if (cl->cl_flags & HFSC_FSC)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 13ffc9a6555f..dce568091200 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -6813,7 +6813,10 @@ static void alc256_fixup_chromebook(struct hda_codec *codec,
switch (action) {
case HDA_FIXUP_ACT_PRE_PROBE:
- spec->gen.suppress_auto_mute = 1;
+ if (codec->core.subsystem_id == 0x10280d76)
+ spec->gen.suppress_auto_mute = 0;
+ else
+ spec->gen.suppress_auto_mute = 1;
spec->gen.suppress_auto_mic = 1;
spec->en_3kpull_low = false;
break;
Return-Path: <linux-kernel+bounces-673245-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id E515A41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:10:21 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 2AA917A7465
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:09:02 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 68A2128FA95;
Wed, 4 Jun 2025 13:07:51 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="1SIEPWu8"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 96D43290D9A;
Wed, 4 Jun 2025 13:07:45 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749042465; cv=none; b=KpdyBQsvziWemb16DMrCKiJmVUmP8nh/Yzm8U/hwHOfH1kPXn684zLCGWpkjow4RFdMPyDAYxuklXs0nRU/BUsC90YLXaGUFl9jCSNXOVvh1WTuMa/9nTlzL/qMsP8W70kwYONjQxgP7qJA+lKL8LJF7qEFyZg47oQJ5St21zBE=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749042465; c=relaxed/simple;
bh=5wRPi6cU+Md6vZ13A5JitznyWYikQyVq5lfv9do3vg8=;
h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version; b=nrp3vMevvulC/+gP3LHAOErjonWH36W3JnrYMv8KP6pEOzQ/nVTq7SfJjaK0SWTZnT/qIgB2qqIWv445GNCj7/mDxZCZk5mXzNT6/gmIawF1Kx7aGDlTa2ALOfI3+eVbOrGcZFK2T+oY+HsO9HHuIAhCAZmm5kSred7UJuT8Ubg=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=1SIEPWu8; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5E08CC4CEE7;
Wed, 4 Jun 2025 13:07:44 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org;
s=korg; t=1749042465;
bh=5wRPi6cU+Md6vZ13A5JitznyWYikQyVq5lfv9do3vg8=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=1SIEPWu8HeOuCO5uIb/kJ/lh1y5MVLzTwjKa1MKFFtuCJq0Y39LVwgyLmYDgv8DUC
ybPI4gJhB/+Qclw12FWxs1KwTYBFk30dhpCfERhv03pF+QS3Q6sSivx6bfUVR8mefG
8Neie4vx7aK6DbZdEYLH3ZZgpL4bmr/UzAs2GS7U=
From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
To: linux-kernel@xxxxxxxxxxxxxxx,
akpm@xxxxxxxxxxxxxxxxxxxx,
torvalds@xxxxxxxxxxxxxxxxxxxx,
stable@xxxxxxxxxxxxxxx
Cc: lwn@xxxxxxx,
jslaby@xxxxxxx,
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Subject: Re: Linux 6.14.10
Date: Wed, 4 Jun 2025 15:07:33 +0200
Message-ID: <2025060433-saga-deport-f96d@gregkh>
X-Mailer: git-send-email 2.49.0
In-Reply-To: <2025060433-cyclic-dares-5e34@gregkh>
References: <2025060433-cyclic-dares-5e34@gregkh>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
diff --git a/Makefile b/Makefile
index 884279eb952d..0f3aad52b3de 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 6
PATCHLEVEL = 14
-SUBLEVEL = 9
+SUBLEVEL = 10
EXTRAVERSION =
NAME = Baby Opossum Posse
diff --git a/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi b/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi
index 51c6e19e40b8..7d9394a04302 100644
--- a/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi
+++ b/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi
@@ -222,9 +222,9 @@ i3c1: i3c@10da1000 {
status = "disabled";
};
- gpio0: gpio@ffc03200 {
+ gpio0: gpio@10c03200 {
compatible = "snps,dw-apb-gpio";
- reg = <0xffc03200 0x100>;
+ reg = <0x10c03200 0x100>;
#address-cells = <1>;
#size-cells = <0>;
resets = <&rst GPIO0_RESET>;
diff --git a/arch/arm64/boot/dts/qcom/ipq9574.dtsi b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
index 942290028972..3c02351fbb15 100644
--- a/arch/arm64/boot/dts/qcom/ipq9574.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
@@ -378,6 +378,8 @@ cryptobam: dma-controller@704000 {
interrupts = <GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>;
#dma-cells = <1>;
qcom,ee = <1>;
+ qcom,num-ees = <4>;
+ num-channels = <16>;
qcom,controlled-remotely;
};
diff --git a/arch/arm64/boot/dts/qcom/sa8775p.dtsi b/arch/arm64/boot/dts/qcom/sa8775p.dtsi
index 3394ae2d1300..2329460b2103 100644
--- a/arch/arm64/boot/dts/qcom/sa8775p.dtsi
+++ b/arch/arm64/boot/dts/qcom/sa8775p.dtsi
@@ -2413,6 +2413,8 @@ cryptobam: dma-controller@1dc4000 {
interrupts = <GIC_SPI 272 IRQ_TYPE_LEVEL_HIGH>;
#dma-cells = <1>;
qcom,ee = <0>;
+ qcom,num-ees = <4>;
+ num-channels = <20>;
qcom,controlled-remotely;
iommus = <&apps_smmu 0x480 0x00>,
<&apps_smmu 0x481 0x00>;
@@ -4903,15 +4905,7 @@ compute-cb@1 {
compatible = "qcom,fastrpc-compute-cb";
reg = <1>;
iommus = <&apps_smmu 0x2141 0x04a0>,
- <&apps_smmu 0x2161 0x04a0>,
- <&apps_smmu 0x2181 0x0400>,
- <&apps_smmu 0x21c1 0x04a0>,
- <&apps_smmu 0x21e1 0x04a0>,
- <&apps_smmu 0x2541 0x04a0>,
- <&apps_smmu 0x2561 0x04a0>,
- <&apps_smmu 0x2581 0x0400>,
- <&apps_smmu 0x25c1 0x04a0>,
- <&apps_smmu 0x25e1 0x04a0>;
+ <&apps_smmu 0x2181 0x0400>;
dma-coherent;
};
@@ -4919,15 +4913,7 @@ compute-cb@2 {
compatible = "qcom,fastrpc-compute-cb";
reg = <2>;
iommus = <&apps_smmu 0x2142 0x04a0>,
- <&apps_smmu 0x2162 0x04a0>,
- <&apps_smmu 0x2182 0x0400>,
- <&apps_smmu 0x21c2 0x04a0>,
- <&apps_smmu 0x21e2 0x04a0>,
- <&apps_smmu 0x2542 0x04a0>,
- <&apps_smmu 0x2562 0x04a0>,
- <&apps_smmu 0x2582 0x0400>,
- <&apps_smmu 0x25c2 0x04a0>,
- <&apps_smmu 0x25e2 0x04a0>;
+ <&apps_smmu 0x2182 0x0400>;
dma-coherent;
};
@@ -4935,15 +4921,7 @@ compute-cb@3 {
compatible = "qcom,fastrpc-compute-cb";
reg = <3>;
iommus = <&apps_smmu 0x2143 0x04a0>,
- <&apps_smmu 0x2163 0x04a0>,
- <&apps_smmu 0x2183 0x0400>,
- <&apps_smmu 0x21c3 0x04a0>,
- <&apps_smmu 0x21e3 0x04a0>,
- <&apps_smmu 0x2543 0x04a0>,
- <&apps_smmu 0x2563 0x04a0>,
- <&apps_smmu 0x2583 0x0400>,
- <&apps_smmu 0x25c3 0x04a0>,
- <&apps_smmu 0x25e3 0x04a0>;
+ <&apps_smmu 0x2183 0x0400>;
dma-coherent;
};
@@ -4951,15 +4929,7 @@ compute-cb@4 {
compatible = "qcom,fastrpc-compute-cb";
reg = <4>;
iommus = <&apps_smmu 0x2144 0x04a0>,
- <&apps_smmu 0x2164 0x04a0>,
- <&apps_smmu 0x2184 0x0400>,
- <&apps_smmu 0x21c4 0x04a0>,
- <&apps_smmu 0x21e4 0x04a0>,
- <&apps_smmu 0x2544 0x04a0>,
- <&apps_smmu 0x2564 0x04a0>,
- <&apps_smmu 0x2584 0x0400>,
- <&apps_smmu 0x25c4 0x04a0>,
- <&apps_smmu 0x25e4 0x04a0>;
+ <&apps_smmu 0x2184 0x0400>;
dma-coherent;
};
@@ -4967,15 +4937,7 @@ compute-cb@5 {
compatible = "qcom,fastrpc-compute-cb";
reg = <5>;
iommus = <&apps_smmu 0x2145 0x04a0>,
- <&apps_smmu 0x2165 0x04a0>,
- <&apps_smmu 0x2185 0x0400>,
- <&apps_smmu 0x21c5 0x04a0>,
- <&apps_smmu 0x21e5 0x04a0>,
- <&apps_smmu 0x2545 0x04a0>,
- <&apps_smmu 0x2565 0x04a0>,
- <&apps_smmu 0x2585 0x0400>,
- <&apps_smmu 0x25c5 0x04a0>,
- <&apps_smmu 0x25e5 0x04a0>;
+ <&apps_smmu 0x2185 0x0400>;
dma-coherent;
};
@@ -4983,15 +4945,7 @@ compute-cb@6 {
compatible = "qcom,fastrpc-compute-cb";
reg = <6>;
iommus = <&apps_smmu 0x2146 0x04a0>,
- <&apps_smmu 0x2166 0x04a0>,
- <&apps_smmu 0x2186 0x0400>,
- <&apps_smmu 0x21c6 0x04a0>,
- <&apps_smmu 0x21e6 0x04a0>,
- <&apps_smmu 0x2546 0x04a0>,
- <&apps_smmu 0x2566 0x04a0>,
- <&apps_smmu 0x2586 0x0400>,
- <&apps_smmu 0x25c6 0x04a0>,
- <&apps_smmu 0x25e6 0x04a0>;
+ <&apps_smmu 0x2186 0x0400>;
dma-coherent;
};
@@ -4999,15 +4953,7 @@ compute-cb@7 {
compatible = "qcom,fastrpc-compute-cb";
reg = <7>;
iommus = <&apps_smmu 0x2147 0x04a0>,
- <&apps_smmu 0x2167 0x04a0>,
- <&apps_smmu 0x2187 0x0400>,
- <&apps_smmu 0x21c7 0x04a0>,
- <&apps_smmu 0x21e7 0x04a0>,
- <&apps_smmu 0x2547 0x04a0>,
- <&apps_smmu 0x2567 0x04a0>,
- <&apps_smmu 0x2587 0x0400>,
- <&apps_smmu 0x25c7 0x04a0>,
- <&apps_smmu 0x25e7 0x04a0>;
+ <&apps_smmu 0x2187 0x0400>;
dma-coherent;
};
@@ -5015,15 +4961,7 @@ compute-cb@8 {
compatible = "qcom,fastrpc-compute-cb";
reg = <8>;
iommus = <&apps_smmu 0x2148 0x04a0>,
- <&apps_smmu 0x2168 0x04a0>,
- <&apps_smmu 0x2188 0x0400>,
- <&apps_smmu 0x21c8 0x04a0>,
- <&apps_smmu 0x21e8 0x04a0>,
- <&apps_smmu 0x2548 0x04a0>,
- <&apps_smmu 0x2568 0x04a0>,
- <&apps_smmu 0x2588 0x0400>,
- <&apps_smmu 0x25c8 0x04a0>,
- <&apps_smmu 0x25e8 0x04a0>;
+ <&apps_smmu 0x2188 0x0400>;
dma-coherent;
};
@@ -5031,31 +4969,7 @@ compute-cb@9 {
compatible = "qcom,fastrpc-compute-cb";
reg = <9>;
iommus = <&apps_smmu 0x2149 0x04a0>,
- <&apps_smmu 0x2169 0x04a0>,
- <&apps_smmu 0x2189 0x0400>,
- <&apps_smmu 0x21c9 0x04a0>,
- <&apps_smmu 0x21e9 0x04a0>,
- <&apps_smmu 0x2549 0x04a0>,
- <&apps_smmu 0x2569 0x04a0>,
- <&apps_smmu 0x2589 0x0400>,
- <&apps_smmu 0x25c9 0x04a0>,
- <&apps_smmu 0x25e9 0x04a0>;
- dma-coherent;
- };
-
- compute-cb@10 {
- compatible = "qcom,fastrpc-compute-cb";
- reg = <10>;
- iommus = <&apps_smmu 0x214a 0x04a0>,
- <&apps_smmu 0x216a 0x04a0>,
- <&apps_smmu 0x218a 0x0400>,
- <&apps_smmu 0x21ca 0x04a0>,
- <&apps_smmu 0x21ea 0x04a0>,
- <&apps_smmu 0x254a 0x04a0>,
- <&apps_smmu 0x256a 0x04a0>,
- <&apps_smmu 0x258a 0x0400>,
- <&apps_smmu 0x25ca 0x04a0>,
- <&apps_smmu 0x25ea 0x04a0>;
+ <&apps_smmu 0x2189 0x0400>;
dma-coherent;
};
@@ -5063,15 +4977,7 @@ compute-cb@11 {
compatible = "qcom,fastrpc-compute-cb";
reg = <11>;
iommus = <&apps_smmu 0x214b 0x04a0>,
- <&apps_smmu 0x216b 0x04a0>,
- <&apps_smmu 0x218b 0x0400>,
- <&apps_smmu 0x21cb 0x04a0>,
- <&apps_smmu 0x21eb 0x04a0>,
- <&apps_smmu 0x254b 0x04a0>,
- <&apps_smmu 0x256b 0x04a0>,
- <&apps_smmu 0x258b 0x0400>,
- <&apps_smmu 0x25cb 0x04a0>,
- <&apps_smmu 0x25eb 0x04a0>;
+ <&apps_smmu 0x218b 0x0400>;
dma-coherent;
};
};
@@ -5131,15 +5037,7 @@ compute-cb@1 {
compatible = "qcom,fastrpc-compute-cb";
reg = <1>;
iommus = <&apps_smmu 0x2941 0x04a0>,
- <&apps_smmu 0x2961 0x04a0>,
- <&apps_smmu 0x2981 0x0400>,
- <&apps_smmu 0x29c1 0x04a0>,
- <&apps_smmu 0x29e1 0x04a0>,
- <&apps_smmu 0x2d41 0x04a0>,
- <&apps_smmu 0x2d61 0x04a0>,
- <&apps_smmu 0x2d81 0x0400>,
- <&apps_smmu 0x2dc1 0x04a0>,
- <&apps_smmu 0x2de1 0x04a0>;
+ <&apps_smmu 0x2981 0x0400>;
dma-coherent;
};
@@ -5147,15 +5045,7 @@ compute-cb@2 {
compatible = "qcom,fastrpc-compute-cb";
reg = <2>;
iommus = <&apps_smmu 0x2942 0x04a0>,
- <&apps_smmu 0x2962 0x04a0>,
- <&apps_smmu 0x2982 0x0400>,
- <&apps_smmu 0x29c2 0x04a0>,
- <&apps_smmu 0x29e2 0x04a0>,
- <&apps_smmu 0x2d42 0x04a0>,
- <&apps_smmu 0x2d62 0x04a0>,
- <&apps_smmu 0x2d82 0x0400>,
- <&apps_smmu 0x2dc2 0x04a0>,
- <&apps_smmu 0x2de2 0x04a0>;
+ <&apps_smmu 0x2982 0x0400>;
dma-coherent;
};
@@ -5163,15 +5053,7 @@ compute-cb@3 {
compatible = "qcom,fastrpc-compute-cb";
reg = <3>;
iommus = <&apps_smmu 0x2943 0x04a0>,
- <&apps_smmu 0x2963 0x04a0>,
- <&apps_smmu 0x2983 0x0400>,
- <&apps_smmu 0x29c3 0x04a0>,
- <&apps_smmu 0x29e3 0x04a0>,
- <&apps_smmu 0x2d43 0x04a0>,
- <&apps_smmu 0x2d63 0x04a0>,
- <&apps_smmu 0x2d83 0x0400>,
- <&apps_smmu 0x2dc3 0x04a0>,
- <&apps_smmu 0x2de3 0x04a0>;
+ <&apps_smmu 0x2983 0x0400>;
dma-coherent;
};
@@ -5179,15 +5061,7 @@ compute-cb@4 {
compatible = "qcom,fastrpc-compute-cb";
reg = <4>;
iommus = <&apps_smmu 0x2944 0x04a0>,
- <&apps_smmu 0x2964 0x04a0>,
- <&apps_smmu 0x2984 0x0400>,
- <&apps_smmu 0x29c4 0x04a0>,
- <&apps_smmu 0x29e4 0x04a0>,
- <&apps_smmu 0x2d44 0x04a0>,
- <&apps_smmu 0x2d64 0x04a0>,
- <&apps_smmu 0x2d84 0x0400>,
- <&apps_smmu 0x2dc4 0x04a0>,
- <&apps_smmu 0x2de4 0x04a0>;
+ <&apps_smmu 0x2984 0x0400>;
dma-coherent;
};
@@ -5195,15 +5069,7 @@ compute-cb@5 {
compatible = "qcom,fastrpc-compute-cb";
reg = <5>;
iommus = <&apps_smmu 0x2945 0x04a0>,
- <&apps_smmu 0x2965 0x04a0>,
- <&apps_smmu 0x2985 0x0400>,
- <&apps_smmu 0x29c5 0x04a0>,
- <&apps_smmu 0x29e5 0x04a0>,
- <&apps_smmu 0x2d45 0x04a0>,
- <&apps_smmu 0x2d65 0x04a0>,
- <&apps_smmu 0x2d85 0x0400>,
- <&apps_smmu 0x2dc5 0x04a0>,
- <&apps_smmu 0x2de5 0x04a0>;
+ <&apps_smmu 0x2985 0x0400>;
dma-coherent;
};
@@ -5211,15 +5077,7 @@ compute-cb@6 {
compatible = "qcom,fastrpc-compute-cb";
reg = <6>;
iommus = <&apps_smmu 0x2946 0x04a0>,
- <&apps_smmu 0x2966 0x04a0>,
- <&apps_smmu 0x2986 0x0400>,
- <&apps_smmu 0x29c6 0x04a0>,
- <&apps_smmu 0x29e6 0x04a0>,
- <&apps_smmu 0x2d46 0x04a0>,
- <&apps_smmu 0x2d66 0x04a0>,
- <&apps_smmu 0x2d86 0x0400>,
- <&apps_smmu 0x2dc6 0x04a0>,
- <&apps_smmu 0x2de6 0x04a0>;
+ <&apps_smmu 0x2986 0x0400>;
dma-coherent;
};
@@ -5227,15 +5085,7 @@ compute-cb@7 {
compatible = "qcom,fastrpc-compute-cb";
reg = <7>;
iommus = <&apps_smmu 0x2947 0x04a0>,
- <&apps_smmu 0x2967 0x04a0>,
- <&apps_smmu 0x2987 0x0400>,
- <&apps_smmu 0x29c7 0x04a0>,
- <&apps_smmu 0x29e7 0x04a0>,
- <&apps_smmu 0x2d47 0x04a0>,
- <&apps_smmu 0x2d67 0x04a0>,
- <&apps_smmu 0x2d87 0x0400>,
- <&apps_smmu 0x2dc7 0x04a0>,
- <&apps_smmu 0x2de7 0x04a0>;
+ <&apps_smmu 0x2987 0x0400>;
dma-coherent;
};
@@ -5243,15 +5093,7 @@ compute-cb@8 {
compatible = "qcom,fastrpc-compute-cb";
reg = <8>;
iommus = <&apps_smmu 0x2948 0x04a0>,
- <&apps_smmu 0x2968 0x04a0>,
- <&apps_smmu 0x2988 0x0400>,
- <&apps_smmu 0x29c8 0x04a0>,
- <&apps_smmu 0x29e8 0x04a0>,
- <&apps_smmu 0x2d48 0x04a0>,
- <&apps_smmu 0x2d68 0x04a0>,
- <&apps_smmu 0x2d88 0x0400>,
- <&apps_smmu 0x2dc8 0x04a0>,
- <&apps_smmu 0x2de8 0x04a0>;
+ <&apps_smmu 0x2988 0x0400>;
dma-coherent;
};
@@ -5259,15 +5101,7 @@ compute-cb@9 {
compatible = "qcom,fastrpc-compute-cb";
reg = <9>;
iommus = <&apps_smmu 0x2949 0x04a0>,
- <&apps_smmu 0x2969 0x04a0>,
- <&apps_smmu 0x2989 0x0400>,
- <&apps_smmu 0x29c9 0x04a0>,
- <&apps_smmu 0x29e9 0x04a0>,
- <&apps_smmu 0x2d49 0x04a0>,
- <&apps_smmu 0x2d69 0x04a0>,
- <&apps_smmu 0x2d89 0x0400>,
- <&apps_smmu 0x2dc9 0x04a0>,
- <&apps_smmu 0x2de9 0x04a0>;
+ <&apps_smmu 0x2989 0x0400>;
dma-coherent;
};
@@ -5275,15 +5109,7 @@ compute-cb@10 {
compatible = "qcom,fastrpc-compute-cb";
reg = <10>;
iommus = <&apps_smmu 0x294a 0x04a0>,
- <&apps_smmu 0x296a 0x04a0>,
- <&apps_smmu 0x298a 0x0400>,
- <&apps_smmu 0x29ca 0x04a0>,
- <&apps_smmu 0x29ea 0x04a0>,
- <&apps_smmu 0x2d4a 0x04a0>,
- <&apps_smmu 0x2d6a 0x04a0>,
- <&apps_smmu 0x2d8a 0x0400>,
- <&apps_smmu 0x2dca 0x04a0>,
- <&apps_smmu 0x2dea 0x04a0>;
+ <&apps_smmu 0x298a 0x0400>;
dma-coherent;
};
@@ -5291,15 +5117,7 @@ compute-cb@11 {
compatible = "qcom,fastrpc-compute-cb";
reg = <11>;
iommus = <&apps_smmu 0x294b 0x04a0>,
- <&apps_smmu 0x296b 0x04a0>,
- <&apps_smmu 0x298b 0x0400>,
- <&apps_smmu 0x29cb 0x04a0>,
- <&apps_smmu 0x29eb 0x04a0>,
- <&apps_smmu 0x2d4b 0x04a0>,
- <&apps_smmu 0x2d6b 0x04a0>,
- <&apps_smmu 0x2d8b 0x0400>,
- <&apps_smmu 0x2dcb 0x04a0>,
- <&apps_smmu 0x2deb 0x04a0>;
+ <&apps_smmu 0x298b 0x0400>;
dma-coherent;
};
@@ -5307,15 +5125,7 @@ compute-cb@12 {
compatible = "qcom,fastrpc-compute-cb";
reg = <12>;
iommus = <&apps_smmu 0x294c 0x04a0>,
- <&apps_smmu 0x296c 0x04a0>,
- <&apps_smmu 0x298c 0x0400>,
- <&apps_smmu 0x29cc 0x04a0>,
- <&apps_smmu 0x29ec 0x04a0>,
- <&apps_smmu 0x2d4c 0x04a0>,
- <&apps_smmu 0x2d6c 0x04a0>,
- <&apps_smmu 0x2d8c 0x0400>,
- <&apps_smmu 0x2dcc 0x04a0>,
- <&apps_smmu 0x2dec 0x04a0>;
+ <&apps_smmu 0x298c 0x0400>;
dma-coherent;
};
@@ -5323,15 +5133,7 @@ compute-cb@13 {
compatible = "qcom,fastrpc-compute-cb";
reg = <13>;
iommus = <&apps_smmu 0x294d 0x04a0>,
- <&apps_smmu 0x296d 0x04a0>,
- <&apps_smmu 0x298d 0x0400>,
- <&apps_smmu 0x29Cd 0x04a0>,
- <&apps_smmu 0x29ed 0x04a0>,
- <&apps_smmu 0x2d4d 0x04a0>,
- <&apps_smmu 0x2d6d 0x04a0>,
- <&apps_smmu 0x2d8d 0x0400>,
- <&apps_smmu 0x2dcd 0x04a0>,
- <&apps_smmu 0x2ded 0x04a0>;
+ <&apps_smmu 0x298d 0x0400>;
dma-coherent;
};
};
diff --git a/arch/arm64/boot/dts/qcom/sm8350.dtsi b/arch/arm64/boot/dts/qcom/sm8350.dtsi
index 69da30f35baa..f055600d6cfe 100644
--- a/arch/arm64/boot/dts/qcom/sm8350.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8350.dtsi
@@ -455,7 +455,7 @@ cdsp_secure_heap: memory@80c00000 {
no-map;
};
- pil_camera_mem: mmeory@85200000 {
+ pil_camera_mem: memory@85200000 {
reg = <0x0 0x85200000 0x0 0x500000>;
no-map;
};
diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi
index 9c809fc5fa45..419df72cd04b 100644
--- a/arch/arm64/boot/dts/qcom/sm8450.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi
@@ -5283,6 +5283,8 @@ cryptobam: dma-controller@1dc4000 {
interrupts = <GIC_SPI 272 IRQ_TYPE_LEVEL_HIGH>;
#dma-cells = <1>;
qcom,ee = <0>;
+ qcom,num-ees = <4>;
+ num-channels = <16>;
qcom,controlled-remotely;
iommus = <&apps_smmu 0x584 0x11>,
<&apps_smmu 0x588 0x0>,
diff --git a/arch/arm64/boot/dts/qcom/sm8550.dtsi b/arch/arm64/boot/dts/qcom/sm8550.dtsi
index eac8de4005d8..ac3e00ad4177 100644
--- a/arch/arm64/boot/dts/qcom/sm8550.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8550.dtsi
@@ -1957,6 +1957,8 @@ cryptobam: dma-controller@1dc4000 {
interrupts = <GIC_SPI 272 IRQ_TYPE_LEVEL_HIGH>;
#dma-cells = <1>;
qcom,ee = <0>;
+ qcom,num-ees = <4>;
+ num-channels = <20>;
qcom,controlled-remotely;
iommus = <&apps_smmu 0x480 0x0>,
<&apps_smmu 0x481 0x0>;
diff --git a/arch/arm64/boot/dts/qcom/sm8650.dtsi b/arch/arm64/boot/dts/qcom/sm8650.dtsi
index 86684cb9a932..c8a2a76a98f0 100644
--- a/arch/arm64/boot/dts/qcom/sm8650.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8650.dtsi
@@ -2533,6 +2533,8 @@ cryptobam: dma-controller@1dc4000 {
<&apps_smmu 0x481 0>;
qcom,ee = <0>;
+ qcom,num-ees = <4>;
+ num-channels = <20>;
qcom,controlled-remotely;
};
diff --git a/arch/arm64/boot/dts/qcom/x1e001de-devkit.dts b/arch/arm64/boot/dts/qcom/x1e001de-devkit.dts
index 5e3970b26e2f..f5063a0df9fb 100644
--- a/arch/arm64/boot/dts/qcom/x1e001de-devkit.dts
+++ b/arch/arm64/boot/dts/qcom/x1e001de-devkit.dts
@@ -507,6 +507,7 @@ vreg_l12b_1p2: ldo12 {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-always-on;
};
vreg_l13b_3p0: ldo13 {
@@ -528,6 +529,7 @@ vreg_l15b_1p8: ldo15 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-always-on;
};
vreg_l16b_2p9: ldo16 {
@@ -745,8 +747,8 @@ vreg_l1j_0p8: ldo1 {
vreg_l2j_1p2: ldo2 {
regulator-name = "vreg_l2j_1p2";
- regulator-min-microvolt = <1200000>;
- regulator-max-microvolt = <1200000>;
+ regulator-min-microvolt = <1256000>;
+ regulator-max-microvolt = <1256000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
diff --git a/arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts b/arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts
index 53781f9b13af..f53067463b76 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts
+++ b/arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts
@@ -330,8 +330,8 @@ vreg_l1j_0p8: ldo1 {
vreg_l2j_1p2: ldo2 {
regulator-name = "vreg_l2j_1p2";
- regulator-min-microvolt = <1200000>;
- regulator-max-microvolt = <1200000>;
+ regulator-min-microvolt = <1256000>;
+ regulator-max-microvolt = <1256000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
diff --git a/arch/arm64/boot/dts/qcom/x1e80100-dell-xps13-9345.dts b/arch/arm64/boot/dts/qcom/x1e80100-dell-xps13-9345.dts
index 86e87f03b0ec..90f588ed7d63 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100-dell-xps13-9345.dts
+++ b/arch/arm64/boot/dts/qcom/x1e80100-dell-xps13-9345.dts
@@ -359,6 +359,7 @@ vreg_l12b_1p2: ldo12 {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-always-on;
};
vreg_l13b_3p0: ldo13 {
@@ -380,6 +381,7 @@ vreg_l15b_1p8: ldo15 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-always-on;
};
vreg_l17b_2p5: ldo17 {
diff --git a/arch/arm64/boot/dts/qcom/x1e80100-hp-omnibook-x14.dts b/arch/arm64/boot/dts/qcom/x1e80100-hp-omnibook-x14.dts
index cd860a246c45..929da9ecddc4 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100-hp-omnibook-x14.dts
+++ b/arch/arm64/boot/dts/qcom/x1e80100-hp-omnibook-x14.dts
@@ -633,6 +633,7 @@ vreg_l12b_1p2: ldo12 {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-always-on;
};
vreg_l13b_3p0: ldo13 {
@@ -654,6 +655,7 @@ vreg_l15b_1p8: ldo15 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-always-on;
};
vreg_l16b_2p9: ldo16 {
@@ -871,8 +873,8 @@ vreg_l1j_0p8: ldo1 {
vreg_l2j_1p2: ldo2 {
regulator-name = "vreg_l2j_1p2";
- regulator-min-microvolt = <1200000>;
- regulator-max-microvolt = <1200000>;
+ regulator-min-microvolt = <1256000>;
+ regulator-max-microvolt = <1256000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
@@ -1352,18 +1354,22 @@ &remoteproc_cdsp {
status = "okay";
};
+&smb2360_0 {
+ status = "okay";
+};
+
&smb2360_0_eusb2_repeater {
vdd18-supply = <&vreg_l3d_1p8>;
vdd3-supply = <&vreg_l2b_3p0>;
+};
+&smb2360_1 {
status = "okay";
};
&smb2360_1_eusb2_repeater {
vdd18-supply = <&vreg_l3d_1p8>;
vdd3-supply = <&vreg_l14b_3p0>;
-
- status = "okay";
};
&swr0 {
diff --git a/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts b/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts
index a3d53f2ba2c3..744a66ae5bdc 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts
+++ b/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts
@@ -290,6 +290,7 @@ vreg_l12b_1p2: ldo12 {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-always-on;
};
vreg_l14b_3p0: ldo14 {
@@ -304,8 +305,8 @@ vreg_l15b_1p8: ldo15 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-always-on;
};
-
};
regulators-1 {
@@ -508,8 +509,8 @@ vreg_l1j_0p8: ldo1 {
vreg_l2j_1p2: ldo2 {
regulator-name = "vreg_l2j_1p2";
- regulator-min-microvolt = <1200000>;
- regulator-max-microvolt = <1200000>;
+ regulator-min-microvolt = <1256000>;
+ regulator-max-microvolt = <1256000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
diff --git a/arch/arm64/boot/dts/qcom/x1e80100-qcp.dts b/arch/arm64/boot/dts/qcom/x1e80100-qcp.dts
index ec594628304a..f06f45478846 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100-qcp.dts
+++ b/arch/arm64/boot/dts/qcom/x1e80100-qcp.dts
@@ -437,6 +437,7 @@ vreg_l12b_1p2: ldo12 {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-always-on;
};
vreg_l13b_3p0: ldo13 {
@@ -458,6 +459,7 @@ vreg_l15b_1p8: ldo15 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-always-on;
};
vreg_l16b_2p9: ldo16 {
@@ -675,8 +677,8 @@ vreg_l1j_0p8: ldo1 {
vreg_l2j_1p2: ldo2 {
regulator-name = "vreg_l2j_1p2";
- regulator-min-microvolt = <1200000>;
- regulator-max-microvolt = <1200000>;
+ regulator-min-microvolt = <1256000>;
+ regulator-max-microvolt = <1256000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
diff --git a/arch/arm64/boot/dts/qcom/x1e80100.dtsi b/arch/arm64/boot/dts/qcom/x1e80100.dtsi
index 4936fa5b98ff..5aeecf711340 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100.dtsi
+++ b/arch/arm64/boot/dts/qcom/x1e80100.dtsi
@@ -20,6 +20,7 @@
#include <dt-bindings/soc/qcom,gpr.h>
#include <dt-bindings/soc/qcom,rpmh-rsc.h>
#include <dt-bindings/sound/qcom,q6dsp-lpass-ports.h>
+#include <dt-bindings/thermal/thermal.h>
/ {
interrupt-parent = <&intc>;
@@ -3125,7 +3126,7 @@ pcie3: pcie@1bd0000 {
device_type = "pci";
compatible = "qcom,pcie-x1e80100";
reg = <0x0 0x01bd0000 0x0 0x3000>,
- <0x0 0x78000000 0x0 0xf1d>,
+ <0x0 0x78000000 0x0 0xf20>,
<0x0 0x78000f40 0x0 0xa8>,
<0x0 0x78001000 0x0 0x1000>,
<0x0 0x78100000 0x0 0x100000>,
@@ -8457,8 +8458,8 @@ trip-point0 {
};
aoss0-critical {
- temperature = <125000>;
- hysteresis = <0>;
+ temperature = <115000>;
+ hysteresis = <1000>;
type = "critical";
};
};
@@ -8483,7 +8484,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -8509,7 +8510,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -8535,7 +8536,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -8561,7 +8562,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -8587,7 +8588,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -8613,7 +8614,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -8639,7 +8640,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -8665,7 +8666,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -8683,8 +8684,8 @@ trip-point0 {
};
cpuss2-critical {
- temperature = <125000>;
- hysteresis = <0>;
+ temperature = <115000>;
+ hysteresis = <1000>;
type = "critical";
};
};
@@ -8701,8 +8702,8 @@ trip-point0 {
};
cpuss2-critical {
- temperature = <125000>;
- hysteresis = <0>;
+ temperature = <115000>;
+ hysteresis = <1000>;
type = "critical";
};
};
@@ -8719,7 +8720,7 @@ trip-point0 {
};
mem-critical {
- temperature = <125000>;
+ temperature = <115000>;
hysteresis = <0>;
type = "critical";
};
@@ -8727,15 +8728,19 @@ mem-critical {
};
video-thermal {
- polling-delay-passive = <250>;
-
thermal-sensors = <&tsens0 12>;
trips {
trip-point0 {
- temperature = <125000>;
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+
+ video-critical {
+ temperature = <115000>;
hysteresis = <1000>;
- type = "passive";
+ type = "critical";
};
};
};
@@ -8751,8 +8756,8 @@ trip-point0 {
};
aoss0-critical {
- temperature = <125000>;
- hysteresis = <0>;
+ temperature = <115000>;
+ hysteresis = <1000>;
type = "critical";
};
};
@@ -8777,7 +8782,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -8803,7 +8808,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -8829,7 +8834,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -8855,7 +8860,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -8881,7 +8886,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -8907,7 +8912,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -8933,7 +8938,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -8959,7 +8964,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -8977,8 +8982,8 @@ trip-point0 {
};
cpuss2-critical {
- temperature = <125000>;
- hysteresis = <0>;
+ temperature = <115000>;
+ hysteresis = <1000>;
type = "critical";
};
};
@@ -8995,8 +9000,8 @@ trip-point0 {
};
cpuss2-critical {
- temperature = <125000>;
- hysteresis = <0>;
+ temperature = <115000>;
+ hysteresis = <1000>;
type = "critical";
};
};
@@ -9013,8 +9018,8 @@ trip-point0 {
};
aoss0-critical {
- temperature = <125000>;
- hysteresis = <0>;
+ temperature = <115000>;
+ hysteresis = <1000>;
type = "critical";
};
};
@@ -9039,7 +9044,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -9065,7 +9070,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -9091,7 +9096,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -9117,7 +9122,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -9143,7 +9148,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -9169,7 +9174,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -9195,7 +9200,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -9221,7 +9226,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -9239,8 +9244,8 @@ trip-point0 {
};
cpuss2-critical {
- temperature = <125000>;
- hysteresis = <0>;
+ temperature = <115000>;
+ hysteresis = <1000>;
type = "critical";
};
};
@@ -9257,8 +9262,8 @@ trip-point0 {
};
cpuss2-critical {
- temperature = <125000>;
- hysteresis = <0>;
+ temperature = <115000>;
+ hysteresis = <1000>;
type = "critical";
};
};
@@ -9275,8 +9280,8 @@ trip-point0 {
};
aoss0-critical {
- temperature = <125000>;
- hysteresis = <0>;
+ temperature = <115000>;
+ hysteresis = <1000>;
type = "critical";
};
};
@@ -9293,8 +9298,8 @@ trip-point0 {
};
nsp0-critical {
- temperature = <125000>;
- hysteresis = <0>;
+ temperature = <115000>;
+ hysteresis = <1000>;
type = "critical";
};
};
@@ -9311,8 +9316,8 @@ trip-point0 {
};
nsp1-critical {
- temperature = <125000>;
- hysteresis = <0>;
+ temperature = <115000>;
+ hysteresis = <1000>;
type = "critical";
};
};
@@ -9329,8 +9334,8 @@ trip-point0 {
};
nsp2-critical {
- temperature = <125000>;
- hysteresis = <0>;
+ temperature = <115000>;
+ hysteresis = <1000>;
type = "critical";
};
};
@@ -9347,33 +9352,34 @@ trip-point0 {
};
nsp3-critical {
- temperature = <125000>;
- hysteresis = <0>;
+ temperature = <115000>;
+ hysteresis = <1000>;
type = "critical";
};
};
};
gpuss-0-thermal {
- polling-delay-passive = <10>;
+ polling-delay-passive = <200>;
thermal-sensors = <&tsens3 5>;
- trips {
- trip-point0 {
- temperature = <85000>;
- hysteresis = <1000>;
- type = "passive";
+ cooling-maps {
+ map0 {
+ trip = <&gpuss0_alert0>;
+ cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
+ };
- trip-point1 {
- temperature = <90000>;
+ trips {
+ gpuss0_alert0: trip-point0 {
+ temperature = <95000>;
hysteresis = <1000>;
- type = "hot";
+ type = "passive";
};
- trip-point2 {
- temperature = <125000>;
+ gpu-critical {
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -9381,25 +9387,26 @@ trip-point2 {
};
gpuss-1-thermal {
- polling-delay-passive = <10>;
+ polling-delay-passive = <200>;
thermal-sensors = <&tsens3 6>;
- trips {
- trip-point0 {
- temperature = <85000>;
- hysteresis = <1000>;
- type = "passive";
+ cooling-maps {
+ map0 {
+ trip = <&gpuss1_alert0>;
+ cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
+ };
- trip-point1 {
- temperature = <90000>;
+ trips {
+ gpuss1_alert0: trip-point0 {
+ temperature = <95000>;
hysteresis = <1000>;
- type = "hot";
+ type = "passive";
};
- trip-point2 {
- temperature = <125000>;
+ gpu-critical {
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -9407,25 +9414,26 @@ trip-point2 {
};
gpuss-2-thermal {
- polling-delay-passive = <10>;
+ polling-delay-passive = <200>;
thermal-sensors = <&tsens3 7>;
- trips {
- trip-point0 {
- temperature = <85000>;
- hysteresis = <1000>;
- type = "passive";
+ cooling-maps {
+ map0 {
+ trip = <&gpuss2_alert0>;
+ cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
+ };
- trip-point1 {
- temperature = <90000>;
+ trips {
+ gpuss2_alert0: trip-point0 {
+ temperature = <95000>;
hysteresis = <1000>;
- type = "hot";
+ type = "passive";
};
- trip-point2 {
- temperature = <125000>;
+ gpu-critical {
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -9433,25 +9441,26 @@ trip-point2 {
};
gpuss-3-thermal {
- polling-delay-passive = <10>;
+ polling-delay-passive = <200>;
thermal-sensors = <&tsens3 8>;
- trips {
- trip-point0 {
- temperature = <85000>;
- hysteresis = <1000>;
- type = "passive";
+ cooling-maps {
+ map0 {
+ trip = <&gpuss3_alert0>;
+ cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
+ };
- trip-point1 {
- temperature = <90000>;
+ trips {
+ gpuss3_alert0: trip-point0 {
+ temperature = <95000>;
hysteresis = <1000>;
- type = "hot";
+ type = "passive";
};
- trip-point2 {
- temperature = <125000>;
+ gpu-critical {
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -9459,25 +9468,26 @@ trip-point2 {
};
gpuss-4-thermal {
- polling-delay-passive = <10>;
+ polling-delay-passive = <200>;
thermal-sensors = <&tsens3 9>;
- trips {
- trip-point0 {
- temperature = <85000>;
- hysteresis = <1000>;
- type = "passive";
+ cooling-maps {
+ map0 {
+ trip = <&gpuss4_alert0>;
+ cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
+ };
- trip-point1 {
- temperature = <90000>;
+ trips {
+ gpuss4_alert0: trip-point0 {
+ temperature = <95000>;
hysteresis = <1000>;
- type = "hot";
+ type = "passive";
};
- trip-point2 {
- temperature = <125000>;
+ gpu-critical {
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -9485,25 +9495,26 @@ trip-point2 {
};
gpuss-5-thermal {
- polling-delay-passive = <10>;
+ polling-delay-passive = <200>;
thermal-sensors = <&tsens3 10>;
- trips {
- trip-point0 {
- temperature = <85000>;
- hysteresis = <1000>;
- type = "passive";
+ cooling-maps {
+ map0 {
+ trip = <&gpuss5_alert0>;
+ cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
+ };
- trip-point1 {
- temperature = <90000>;
+ trips {
+ gpuss5_alert0: trip-point0 {
+ temperature = <95000>;
hysteresis = <1000>;
- type = "hot";
+ type = "passive";
};
- trip-point2 {
- temperature = <125000>;
+ gpu-critical {
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -9511,25 +9522,26 @@ trip-point2 {
};
gpuss-6-thermal {
- polling-delay-passive = <10>;
+ polling-delay-passive = <200>;
thermal-sensors = <&tsens3 11>;
- trips {
- trip-point0 {
- temperature = <85000>;
- hysteresis = <1000>;
- type = "passive";
+ cooling-maps {
+ map0 {
+ trip = <&gpuss6_alert0>;
+ cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
+ };
- trip-point1 {
- temperature = <90000>;
+ trips {
+ gpuss6_alert0: trip-point0 {
+ temperature = <95000>;
hysteresis = <1000>;
- type = "hot";
+ type = "passive";
};
- trip-point2 {
- temperature = <125000>;
+ gpu-critical {
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -9537,25 +9549,26 @@ trip-point2 {
};
gpuss-7-thermal {
- polling-delay-passive = <10>;
+ polling-delay-passive = <200>;
thermal-sensors = <&tsens3 12>;
- trips {
- trip-point0 {
- temperature = <85000>;
- hysteresis = <1000>;
- type = "passive";
+ cooling-maps {
+ map0 {
+ trip = <&gpuss7_alert0>;
+ cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
+ };
- trip-point1 {
- temperature = <90000>;
+ trips {
+ gpuss7_alert0: trip-point0 {
+ temperature = <95000>;
hysteresis = <1000>;
- type = "hot";
+ type = "passive";
};
- trip-point2 {
- temperature = <125000>;
+ gpu-critical {
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -9574,7 +9587,7 @@ trip-point0 {
camera0-critical {
temperature = <115000>;
- hysteresis = <0>;
+ hysteresis = <1000>;
type = "critical";
};
};
@@ -9592,7 +9605,7 @@ trip-point0 {
camera0-critical {
temperature = <115000>;
- hysteresis = <0>;
+ hysteresis = <1000>;
type = "critical";
};
};
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
index 995b30a7aae0..dd5a9bca26d1 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
@@ -60,16 +60,6 @@ vcc3v3_sys: regulator-vcc3v3-sys {
vin-supply = <&vcc5v0_sys>;
};
- vcc5v0_host: regulator-vcc5v0-host {
- compatible = "regulator-fixed";
- gpio = <&gpio4 RK_PA3 GPIO_ACTIVE_LOW>;
- pinctrl-names = "default";
- pinctrl-0 = <&vcc5v0_host_en>;
- regulator-name = "vcc5v0_host";
- regulator-always-on;
- vin-supply = <&vcc5v0_sys>;
- };
-
vcc5v0_sys: regulator-vcc5v0-sys {
compatible = "regulator-fixed";
regulator-name = "vcc5v0_sys";
@@ -521,10 +511,10 @@ pmic_int_l: pmic-int-l {
};
};
- usb2 {
- vcc5v0_host_en: vcc5v0-host-en {
+ usb {
+ cy3304_reset: cy3304-reset {
rockchip,pins =
- <4 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
+ <4 RK_PA3 RK_FUNC_GPIO &pcfg_output_high>;
};
};
@@ -591,7 +581,6 @@ u2phy1_otg: otg-port {
};
u2phy1_host: host-port {
- phy-supply = <&vcc5v0_host>;
status = "okay";
};
};
@@ -603,6 +592,29 @@ &usbdrd3_1 {
&usbdrd_dwc3_1 {
status = "okay";
dr_mode = "host";
+ pinctrl-names = "default";
+ pinctrl-0 = <&cy3304_reset>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ hub_2_0: hub@1 {
+ compatible = "usb4b4,6502", "usb4b4,6506";
+ reg = <1>;
+ peer-hub = <&hub_3_0>;
+ reset-gpios = <&gpio4 RK_PA3 GPIO_ACTIVE_HIGH>;
+ vdd-supply = <&vcc1v2_phy>;
+ vdd2-supply = <&vcc3v3_sys>;
+
+ };
+
+ hub_3_0: hub@2 {
+ compatible = "usb4b4,6500", "usb4b4,6504";
+ reg = <2>;
+ peer-hub = <&hub_2_0>;
+ reset-gpios = <&gpio4 RK_PA3 GPIO_ACTIVE_HIGH>;
+ vdd-supply = <&vcc1v2_phy>;
+ vdd2-supply = <&vcc3v3_sys>;
+ };
};
&usb_host1_ehci {
diff --git a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
index 7d355aa73ea2..0c286f600296 100644
--- a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
@@ -552,8 +552,6 @@ sdhci0: mmc@fa10000 {
power-domains = <&k3_pds 57 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 57 5>, <&k3_clks 57 6>;
clock-names = "clk_ahb", "clk_xin";
- assigned-clocks = <&k3_clks 57 6>;
- assigned-clock-parents = <&k3_clks 57 8>;
bus-width = <8>;
mmc-ddr-1_8v;
mmc-hs200-1_8v;
diff --git a/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi
index a1daba7b1fad..455ccc770f16 100644
--- a/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi
@@ -575,8 +575,6 @@ sdhci0: mmc@fa10000 {
power-domains = <&k3_pds 57 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 57 5>, <&k3_clks 57 6>;
clock-names = "clk_ahb", "clk_xin";
- assigned-clocks = <&k3_clks 57 6>;
- assigned-clock-parents = <&k3_clks 57 8>;
bus-width = <8>;
mmc-hs200-1_8v;
ti,clkbuf-sel = <0x7>;
diff --git a/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi
index 6e3beb5c2e01..f9b5c97518d6 100644
--- a/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi
@@ -564,8 +564,6 @@ sdhci0: mmc@fa10000 {
power-domains = <&k3_pds 57 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 57 1>, <&k3_clks 57 2>;
clock-names = "clk_ahb", "clk_xin";
- assigned-clocks = <&k3_clks 57 2>;
- assigned-clock-parents = <&k3_clks 57 4>;
bus-width = <8>;
mmc-ddr-1_8v;
mmc-hs200-1_8v;
diff --git a/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-imx219.dtso b/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-imx219.dtso
index 76ca02127f95..dd090813a32d 100644
--- a/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-imx219.dtso
+++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-imx219.dtso
@@ -22,7 +22,7 @@ &main_i2c2 {
#size-cells = <0>;
status = "okay";
- i2c-switch@71 {
+ i2c-mux@71 {
compatible = "nxp,pca9543";
#address-cells = <1>;
#size-cells = <0>;
@@ -39,7 +39,6 @@ ov5640: camera@10 {
reg = <0x10>;
clocks = <&clk_imx219_fixed>;
- clock-names = "xclk";
reset-gpios = <&exp1 13 GPIO_ACTIVE_HIGH>;
diff --git a/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-ov5640.dtso b/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-ov5640.dtso
index ccc7f5e43184..7fc7c95f5cd5 100644
--- a/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-ov5640.dtso
+++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-ov5640.dtso
@@ -22,7 +22,7 @@ &main_i2c2 {
#size-cells = <0>;
status = "okay";
- i2c-switch@71 {
+ i2c-mux@71 {
compatible = "nxp,pca9543";
#address-cells = <1>;
#size-cells = <0>;
diff --git a/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-tevi-ov5640.dtso b/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-tevi-ov5640.dtso
index 4eaf9d757dd0..b6bfdfbbdd98 100644
--- a/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-tevi-ov5640.dtso
+++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-tevi-ov5640.dtso
@@ -22,7 +22,7 @@ &main_i2c2 {
#size-cells = <0>;
status = "okay";
- i2c-switch@71 {
+ i2c-mux@71 {
compatible = "nxp,pca9543";
#address-cells = <1>;
#size-cells = <0>;
diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
index 94a812a1355b..5ebf7ada6e48 100644
--- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
@@ -449,6 +449,8 @@ sdhci0: mmc@4f80000 {
ti,otap-del-sel-mmc-hs = <0x0>;
ti,otap-del-sel-ddr52 = <0x5>;
ti,otap-del-sel-hs200 = <0x5>;
+ ti,itap-del-sel-legacy = <0xa>;
+ ti,itap-del-sel-mmc-hs = <0x1>;
ti,itap-del-sel-ddr52 = <0x0>;
dma-coherent;
status = "disabled";
diff --git a/arch/arm64/boot/dts/ti/k3-am68-sk-base-board.dts b/arch/arm64/boot/dts/ti/k3-am68-sk-base-board.dts
index 11522b36e0ce..5fa70a874d7b 100644
--- a/arch/arm64/boot/dts/ti/k3-am68-sk-base-board.dts
+++ b/arch/arm64/boot/dts/ti/k3-am68-sk-base-board.dts
@@ -44,6 +44,17 @@ vusb_main: regulator-vusb-main5v0 {
regulator-boot-on;
};
+ vsys_5v0: regulator-vsys5v0 {
+ /* Output of LM61460 */
+ compatible = "regulator-fixed";
+ regulator-name = "vsys_5v0";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vusb_main>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
vsys_3v3: regulator-vsys3v3 {
/* Output of LM5141 */
compatible = "regulator-fixed";
@@ -76,7 +87,7 @@ vdd_sd_dv: regulator-tlv71033 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
regulator-boot-on;
- vin-supply = <&vsys_3v3>;
+ vin-supply = <&vsys_5v0>;
gpios = <&main_gpio0 49 GPIO_ACTIVE_HIGH>;
states = <1800000 0x0>,
<3300000 0x1>;
diff --git a/arch/arm64/boot/dts/ti/k3-j721e-sk-csi2-dual-imx219.dtso b/arch/arm64/boot/dts/ti/k3-j721e-sk-csi2-dual-imx219.dtso
index 47bb5480b5b0..4eb3cffab032 100644
--- a/arch/arm64/boot/dts/ti/k3-j721e-sk-csi2-dual-imx219.dtso
+++ b/arch/arm64/boot/dts/ti/k3-j721e-sk-csi2-dual-imx219.dtso
@@ -19,6 +19,33 @@ clk_imx219_fixed: imx219-xclk {
#clock-cells = <0>;
clock-frequency = <24000000>;
};
+
+ reg_2p8v: regulator-2p8v {
+ compatible = "regulator-fixed";
+ regulator-name = "2P8V";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ vin-supply = <&vdd_sd_dv>;
+ regulator-always-on;
+ };
+
+ reg_1p8v: regulator-1p8v {
+ compatible = "regulator-fixed";
+ regulator-name = "1P8V";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ vin-supply = <&vdd_sd_dv>;
+ regulator-always-on;
+ };
+
+ reg_1p2v: regulator-1p2v {
+ compatible = "regulator-fixed";
+ regulator-name = "1P2V";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ vin-supply = <&vdd_sd_dv>;
+ regulator-always-on;
+ };
};
&csi_mux {
@@ -34,7 +61,9 @@ imx219_0: imx219-0@10 {
reg = <0x10>;
clocks = <&clk_imx219_fixed>;
- clock-names = "xclk";
+ VANA-supply = <®_2p8v>;
+ VDIG-supply = <®_1p8v>;
+ VDDL-supply = <®_1p2v>;
port {
csi2_cam0: endpoint {
@@ -56,7 +85,9 @@ imx219_1: imx219-1@10 {
reg = <0x10>;
clocks = <&clk_imx219_fixed>;
- clock-names = "xclk";
+ VANA-supply = <®_2p8v>;
+ VDIG-supply = <®_1p8v>;
+ VDDL-supply = <®_1p2v>;
port {
csi2_cam1: endpoint {
diff --git a/arch/arm64/boot/dts/ti/k3-j721e-sk.dts b/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
index 69b3d1ed8a21..9fd32f020010 100644
--- a/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
@@ -184,6 +184,17 @@ vsys_3v3: fixedregulator-vsys3v3 {
regulator-boot-on;
};
+ vsys_5v0: fixedregulator-vsys5v0 {
+ /* Output of LM61460 */
+ compatible = "regulator-fixed";
+ regulator-name = "vsys_5v0";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vusb_main>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
vdd_mmc1: fixedregulator-sd {
compatible = "regulator-fixed";
pinctrl-names = "default";
@@ -211,6 +222,20 @@ vdd_sd_dv_alt: gpio-regulator-tps659411 {
<3300000 0x1>;
};
+ vdd_sd_dv: gpio-regulator-TLV71033 {
+ compatible = "regulator-gpio";
+ pinctrl-names = "default";
+ pinctrl-0 = <&vdd_sd_dv_pins_default>;
+ regulator-name = "tlv71033";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ vin-supply = <&vsys_5v0>;
+ gpios = <&main_gpio0 118 GPIO_ACTIVE_HIGH>;
+ states = <1800000 0x0>,
+ <3300000 0x1>;
+ };
+
transceiver1: can-phy1 {
compatible = "ti,tcan1042";
#phy-cells = <0>;
@@ -613,6 +638,12 @@ J721E_WKUP_IOPAD(0xd4, PIN_OUTPUT, 7) /* (G26) WKUP_GPIO0_9 */
>;
};
+ vdd_sd_dv_pins_default: vdd-sd-dv-default-pins {
+ pinctrl-single,pins = <
+ J721E_IOPAD(0x1dc, PIN_OUTPUT, 7) /* (Y1) SPI1_CLK.GPIO0_118 */
+ >;
+ };
+
wkup_uart0_pins_default: wkup-uart0-default-pins {
pinctrl-single,pins = <
J721E_WKUP_IOPAD(0xa0, PIN_INPUT, 0) /* (J29) WKUP_UART0_RXD */
diff --git a/arch/arm64/boot/dts/ti/k3-j722s-evm.dts b/arch/arm64/boot/dts/ti/k3-j722s-evm.dts
index adee69607fdb..2503580254ad 100644
--- a/arch/arm64/boot/dts/ti/k3-j722s-evm.dts
+++ b/arch/arm64/boot/dts/ti/k3-j722s-evm.dts
@@ -815,6 +815,10 @@ &serdes_ln_ctrl {
<J722S_SERDES1_LANE0_PCIE0_LANE0>;
};
+&serdes_wiz0 {
+ status = "okay";
+};
+
&serdes0 {
status = "okay";
serdes0_usb_link: phy@0 {
@@ -826,6 +830,10 @@ serdes0_usb_link: phy@0 {
};
};
+&serdes_wiz1 {
+ status = "okay";
+};
+
&serdes1 {
status = "okay";
serdes1_pcie_link: phy@0 {
diff --git a/arch/arm64/boot/dts/ti/k3-j722s-main.dtsi b/arch/arm64/boot/dts/ti/k3-j722s-main.dtsi
index 6da7b3a2943c..43204084568c 100644
--- a/arch/arm64/boot/dts/ti/k3-j722s-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j722s-main.dtsi
@@ -32,6 +32,8 @@ serdes_wiz0: phy@f000000 {
assigned-clocks = <&k3_clks 279 1>;
assigned-clock-parents = <&k3_clks 279 5>;
+ status = "disabled";
+
serdes0: serdes@f000000 {
compatible = "ti,j721e-serdes-10g";
reg = <0x0f000000 0x00010000>;
@@ -70,6 +72,8 @@ serdes_wiz1: phy@f010000 {
assigned-clocks = <&k3_clks 280 1>;
assigned-clock-parents = <&k3_clks 280 5>;
+ status = "disabled";
+
serdes1: serdes@f010000 {
compatible = "ti,j721e-serdes-10g";
reg = <0x0f010000 0x00010000>;
diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-j742s2-main-common.dtsi b/arch/arm64/boot/dts/ti/k3-j784s4-j742s2-main-common.dtsi
index 1944616ab357..1fc0a11c5ab4 100644
--- a/arch/arm64/boot/dts/ti/k3-j784s4-j742s2-main-common.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j784s4-j742s2-main-common.dtsi
@@ -77,7 +77,7 @@ pcie1_ctrl: pcie1-ctrl@4074 {
serdes_ln_ctrl: mux-controller@4080 {
compatible = "reg-mux";
- reg = <0x00004080 0x30>;
+ reg = <0x00004080 0x50>;
#mux-control-cells = <1>;
mux-reg-masks = <0x0 0x3>, <0x4 0x3>, /* SERDES0 lane0/1 select */
<0x8 0x3>, <0xc 0x3>, /* SERDES0 lane2/3 select */
diff --git a/arch/um/Makefile b/arch/um/Makefile
index 1d36a613aad8..9ed792e565c9 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -154,5 +154,6 @@ MRPROPER_FILES += $(HOST_DIR)/include/generated
archclean:
@find . \( -name '*.bb' -o -name '*.bbg' -o -name '*.da' \
-o -name '*.gcov' \) -type f -print | xargs rm -f
+ $(Q)$(MAKE) -f $(srctree)/Makefile ARCH=$(HEADER_ARCH) clean
export HEADER_ARCH SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING DEV_NULL_PATH
diff --git a/drivers/char/tpm/tpm-buf.c b/drivers/char/tpm/tpm-buf.c
index e49a19fea3bd..dc882fc9fa9e 100644
--- a/drivers/char/tpm/tpm-buf.c
+++ b/drivers/char/tpm/tpm-buf.c
@@ -201,7 +201,7 @@ static void tpm_buf_read(struct tpm_buf *buf, off_t *offset, size_t count, void
*/
u8 tpm_buf_read_u8(struct tpm_buf *buf, off_t *offset)
{
- u8 value;
+ u8 value = 0;
tpm_buf_read(buf, offset, sizeof(value), &value);
@@ -218,7 +218,7 @@ EXPORT_SYMBOL_GPL(tpm_buf_read_u8);
*/
u16 tpm_buf_read_u16(struct tpm_buf *buf, off_t *offset)
{
- u16 value;
+ u16 value = 0;
tpm_buf_read(buf, offset, sizeof(value), &value);
@@ -235,7 +235,7 @@ EXPORT_SYMBOL_GPL(tpm_buf_read_u16);
*/
u32 tpm_buf_read_u32(struct tpm_buf *buf, off_t *offset)
{
- u32 value;
+ u32 value = 0;
tpm_buf_read(buf, offset, sizeof(value), &value);
diff --git a/drivers/dma/idxd/cdev.c b/drivers/dma/idxd/cdev.c
index cd57067e8218..6d12033649f8 100644
--- a/drivers/dma/idxd/cdev.c
+++ b/drivers/dma/idxd/cdev.c
@@ -222,7 +222,7 @@ static int idxd_cdev_open(struct inode *inode, struct file *filp)
struct idxd_wq *wq;
struct device *dev, *fdev;
int rc = 0;
- struct iommu_sva *sva;
+ struct iommu_sva *sva = NULL;
unsigned int pasid;
struct idxd_cdev *idxd_cdev;
@@ -317,7 +317,7 @@ static int idxd_cdev_open(struct inode *inode, struct file *filp)
if (device_user_pasid_enabled(idxd))
idxd_xa_pasid_remove(ctx);
failed_get_pasid:
- if (device_user_pasid_enabled(idxd))
+ if (device_user_pasid_enabled(idxd) && !IS_ERR_OR_NULL(sva))
iommu_sva_unbind_device(sva);
failed:
mutex_unlock(&wq->wq_lock);
diff --git a/drivers/gpio/gpio-virtuser.c b/drivers/gpio/gpio-virtuser.c
index e89f299f2140..dcecb7a25911 100644
--- a/drivers/gpio/gpio-virtuser.c
+++ b/drivers/gpio/gpio-virtuser.c
@@ -400,10 +400,15 @@ static ssize_t gpio_virtuser_direction_do_write(struct file *file,
char buf[32], *trimmed;
int ret, dir, val = 0;
- ret = simple_write_to_buffer(buf, sizeof(buf), ppos, user_buf, count);
+ if (count >= sizeof(buf))
+ return -EINVAL;
+
+ ret = simple_write_to_buffer(buf, sizeof(buf) - 1, ppos, user_buf, count);
if (ret < 0)
return ret;
+ buf[ret] = '\0';
+
trimmed = strim(buf);
if (strcmp(trimmed, "input") == 0) {
@@ -622,12 +627,15 @@ static ssize_t gpio_virtuser_consumer_write(struct file *file,
char buf[GPIO_VIRTUSER_NAME_BUF_LEN + 2];
int ret;
+ if (count >= sizeof(buf))
+ return -EINVAL;
+
ret = simple_write_to_buffer(buf, GPIO_VIRTUSER_NAME_BUF_LEN, ppos,
user_buf, count);
if (ret < 0)
return ret;
- buf[strlen(buf) - 1] = '\0';
+ buf[ret] = '\0';
ret = gpiod_set_consumer_name(data->ad.desc, buf);
if (ret)
diff --git a/drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_translation_helper.c b/drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_translation_helper.c
index 0c8ec30ea672..731fbd4bc600 100644
--- a/drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_translation_helper.c
+++ b/drivers/gpu/drm/amd/display/dc/dml2/dml21/dml21_translation_helper.c
@@ -910,7 +910,7 @@ static void populate_dml21_plane_config_from_plane_state(struct dml2_context *dm
}
//TODO : Could be possibly moved to a common helper layer.
-static bool dml21_wrapper_get_plane_id(const struct dc_state *context, const struct dc_plane_state *plane, unsigned int *plane_id)
+static bool dml21_wrapper_get_plane_id(const struct dc_state *context, unsigned int stream_id, const struct dc_plane_state *plane, unsigned int *plane_id)
{
int i, j;
@@ -918,10 +918,12 @@ static bool dml21_wrapper_get_plane_id(const struct dc_state *context, const str
return false;
for (i = 0; i < context->stream_count; i++) {
- for (j = 0; j < context->stream_status[i].plane_count; j++) {
- if (context->stream_status[i].plane_states[j] == plane) {
- *plane_id = (i << 16) | j;
- return true;
+ if (context->streams[i]->stream_id == stream_id) {
+ for (j = 0; j < context->stream_status[i].plane_count; j++) {
+ if (context->stream_status[i].plane_states[j] == plane) {
+ *plane_id = (i << 16) | j;
+ return true;
+ }
}
}
}
@@ -944,14 +946,14 @@ static unsigned int map_stream_to_dml21_display_cfg(const struct dml2_context *d
return location;
}
-static unsigned int map_plane_to_dml21_display_cfg(const struct dml2_context *dml_ctx,
+static unsigned int map_plane_to_dml21_display_cfg(const struct dml2_context *dml_ctx, unsigned int stream_id,
const struct dc_plane_state *plane, const struct dc_state *context)
{
unsigned int plane_id;
int i = 0;
int location = -1;
- if (!dml21_wrapper_get_plane_id(context, plane, &plane_id)) {
+ if (!dml21_wrapper_get_plane_id(context, stream_id, plane, &plane_id)) {
ASSERT(false);
return -1;
}
@@ -1037,7 +1039,7 @@ bool dml21_map_dc_state_into_dml_display_cfg(const struct dc *in_dc, struct dc_s
dml_dispcfg->plane_descriptors[disp_cfg_plane_location].stream_index = disp_cfg_stream_location;
} else {
for (plane_index = 0; plane_index < context->stream_status[stream_index].plane_count; plane_index++) {
- disp_cfg_plane_location = map_plane_to_dml21_display_cfg(dml_ctx, context->stream_status[stream_index].plane_states[plane_index], context);
+ disp_cfg_plane_location = map_plane_to_dml21_display_cfg(dml_ctx, context->streams[stream_index]->stream_id, context->stream_status[stream_index].plane_states[plane_index], context);
if (disp_cfg_plane_location < 0)
disp_cfg_plane_location = dml_dispcfg->num_planes++;
@@ -1048,7 +1050,7 @@ bool dml21_map_dc_state_into_dml_display_cfg(const struct dc *in_dc, struct dc_s
populate_dml21_plane_config_from_plane_state(dml_ctx, &dml_dispcfg->plane_descriptors[disp_cfg_plane_location], context->stream_status[stream_index].plane_states[plane_index], context, stream_index);
dml_dispcfg->plane_descriptors[disp_cfg_plane_location].stream_index = disp_cfg_stream_location;
- if (dml21_wrapper_get_plane_id(context, context->stream_status[stream_index].plane_states[plane_index], &dml_ctx->v21.dml_to_dc_pipe_mapping.disp_cfg_to_plane_id[disp_cfg_plane_location]))
+ if (dml21_wrapper_get_plane_id(context, context->streams[stream_index]->stream_id, context->stream_status[stream_index].plane_states[plane_index], &dml_ctx->v21.dml_to_dc_pipe_mapping.disp_cfg_to_plane_id[disp_cfg_plane_location]))
dml_ctx->v21.dml_to_dc_pipe_mapping.disp_cfg_to_plane_id_valid[disp_cfg_plane_location] = true;
/* apply forced pstate policy */
diff --git a/drivers/gpu/drm/amd/display/dc/link/link_dpms.c b/drivers/gpu/drm/amd/display/dc/link/link_dpms.c
index ec7de9c01fab..e95ec72b4096 100644
--- a/drivers/gpu/drm/amd/display/dc/link/link_dpms.c
+++ b/drivers/gpu/drm/amd/display/dc/link/link_dpms.c
@@ -148,6 +148,7 @@ void link_blank_dp_stream(struct dc_link *link, bool hw_init)
void link_set_all_streams_dpms_off_for_link(struct dc_link *link)
{
struct pipe_ctx *pipes[MAX_PIPES];
+ struct dc_stream_state *streams[MAX_PIPES];
struct dc_state *state = link->dc->current_state;
uint8_t count;
int i;
@@ -160,10 +161,18 @@ void link_set_all_streams_dpms_off_for_link(struct dc_link *link)
link_get_master_pipes_with_dpms_on(link, state, &count, pipes);
+ /* The subsequent call to dc_commit_updates_for_stream for a full update
+ * will release the current state and swap to a new state. Releasing the
+ * current state results in the stream pointers in the pipe_ctx structs
+ * to be zero'd. Hence, cache all streams prior to dc_commit_updates_for_stream.
+ */
+ for (i = 0; i < count; i++)
+ streams[i] = pipes[i]->stream;
+
for (i = 0; i < count; i++) {
- stream_update.stream = pipes[i]->stream;
+ stream_update.stream = streams[i];
dc_commit_updates_for_stream(link->ctx->dc, NULL, 0,
- pipes[i]->stream, &stream_update,
+ streams[i], &stream_update,
state);
}
diff --git a/drivers/gpu/drm/xe/regs/xe_gt_regs.h b/drivers/gpu/drm/xe/regs/xe_gt_regs.h
index d0ea8a55fd9c..ab95d3545a72 100644
--- a/drivers/gpu/drm/xe/regs/xe_gt_regs.h
+++ b/drivers/gpu/drm/xe/regs/xe_gt_regs.h
@@ -157,6 +157,7 @@
#define XEHPG_SC_INSTDONE_EXTRA2 XE_REG_MCR(0x7108)
#define COMMON_SLICE_CHICKEN4 XE_REG(0x7300, XE_REG_OPTION_MASKED)
+#define SBE_PUSH_CONSTANT_BEHIND_FIX_ENABLE REG_BIT(12)
#define DISABLE_TDC_LOAD_BALANCING_CALC REG_BIT(6)
#define COMMON_SLICE_CHICKEN3 XE_REG(0x7304, XE_REG_OPTION_MASKED)
diff --git a/drivers/gpu/drm/xe/xe_lrc.c b/drivers/gpu/drm/xe/xe_lrc.c
index 2a953c4f7d5d..5d7629bb6b8d 100644
--- a/drivers/gpu/drm/xe/xe_lrc.c
+++ b/drivers/gpu/drm/xe/xe_lrc.c
@@ -864,7 +864,7 @@ static void *empty_lrc_data(struct xe_hw_engine *hwe)
static void xe_lrc_set_ppgtt(struct xe_lrc *lrc, struct xe_vm *vm)
{
- u64 desc = xe_vm_pdp4_descriptor(vm, lrc->tile);
+ u64 desc = xe_vm_pdp4_descriptor(vm, gt_to_tile(lrc->gt));
xe_lrc_write_ctx_reg(lrc, CTX_PDP0_UDW, upper_32_bits(desc));
xe_lrc_write_ctx_reg(lrc, CTX_PDP0_LDW, lower_32_bits(desc));
@@ -895,6 +895,7 @@ static int xe_lrc_init(struct xe_lrc *lrc, struct xe_hw_engine *hwe,
int err;
kref_init(&lrc->refcount);
+ lrc->gt = gt;
lrc->flags = 0;
lrc_size = ring_size + xe_gt_lrc_size(gt, hwe->class);
if (xe_gt_has_indirect_ring_state(gt))
@@ -913,7 +914,6 @@ static int xe_lrc_init(struct xe_lrc *lrc, struct xe_hw_engine *hwe,
return PTR_ERR(lrc->bo);
lrc->size = lrc_size;
- lrc->tile = gt_to_tile(hwe->gt);
lrc->ring.size = ring_size;
lrc->ring.tail = 0;
lrc->ctx_timestamp = 0;
diff --git a/drivers/gpu/drm/xe/xe_lrc_types.h b/drivers/gpu/drm/xe/xe_lrc_types.h
index 71ecb453f811..cd38586ae989 100644
--- a/drivers/gpu/drm/xe/xe_lrc_types.h
+++ b/drivers/gpu/drm/xe/xe_lrc_types.h
@@ -25,8 +25,8 @@ struct xe_lrc {
/** @size: size of lrc including any indirect ring state page */
u32 size;
- /** @tile: tile which this LRC belongs to */
- struct xe_tile *tile;
+ /** @gt: gt which this LRC belongs to */
+ struct xe_gt *gt;
/** @flags: LRC flags */
#define XE_LRC_FLAG_INDIRECT_RING_STATE 0x1
diff --git a/drivers/gpu/drm/xe/xe_wa.c b/drivers/gpu/drm/xe/xe_wa.c
index 65bfb2f894d0..56257430b364 100644
--- a/drivers/gpu/drm/xe/xe_wa.c
+++ b/drivers/gpu/drm/xe/xe_wa.c
@@ -801,6 +801,10 @@ static const struct xe_rtp_entry_sr lrc_was[] = {
XE_RTP_RULES(GRAPHICS_VERSION(2001), ENGINE_CLASS(RENDER)),
XE_RTP_ACTIONS(SET(CHICKEN_RASTER_1, DIS_CLIP_NEGATIVE_BOUNDING_BOX))
},
+ { XE_RTP_NAME("22021007897"),
+ XE_RTP_RULES(GRAPHICS_VERSION(2001), ENGINE_CLASS(RENDER)),
+ XE_RTP_ACTIONS(SET(COMMON_SLICE_CHICKEN4, SBE_PUSH_CONSTANT_BEHIND_FIX_ENABLE))
+ },
/* Xe3_LPG */
{ XE_RTP_NAME("14021490052"),
diff --git a/drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c b/drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c
index a02969fd5068..08acc707938d 100644
--- a/drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c
+++ b/drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c
@@ -83,6 +83,9 @@ static int amd_sfh_hid_client_deinit(struct amd_mp2_dev *privdata)
case ALS_IDX:
privdata->dev_en.is_als_present = false;
break;
+ case SRA_IDX:
+ privdata->dev_en.is_sra_present = false;
+ break;
}
if (cl_data->sensor_sts[i] == SENSOR_ENABLED) {
@@ -235,6 +238,8 @@ static int amd_sfh1_1_hid_client_init(struct amd_mp2_dev *privdata)
cleanup:
amd_sfh_hid_client_deinit(privdata);
for (i = 0; i < cl_data->num_hid_devices; i++) {
+ if (cl_data->sensor_idx[i] == SRA_IDX)
+ continue;
devm_kfree(dev, cl_data->feature_report[i]);
devm_kfree(dev, in_data->input_report[i]);
devm_kfree(dev, cl_data->report_descr[i]);
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index 288a2b864cc4..1062731315a2 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -41,6 +41,10 @@
#define USB_VENDOR_ID_ACTIONSTAR 0x2101
#define USB_DEVICE_ID_ACTIONSTAR_1011 0x1011
+#define USB_VENDOR_ID_ADATA_XPG 0x125f
+#define USB_VENDOR_ID_ADATA_XPG_WL_GAMING_MOUSE 0x7505
+#define USB_VENDOR_ID_ADATA_XPG_WL_GAMING_MOUSE_DONGLE 0x7506
+
#define USB_VENDOR_ID_ADS_TECH 0x06e1
#define USB_DEVICE_ID_ADS_TECH_RADIO_SI470X 0xa155
diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c
index 5d7a418ccdbe..73979643315b 100644
--- a/drivers/hid/hid-quirks.c
+++ b/drivers/hid/hid-quirks.c
@@ -27,6 +27,8 @@
static const struct hid_device_id hid_quirks[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_AASHIMA, USB_DEVICE_ID_AASHIMA_GAMEPAD), HID_QUIRK_BADPAD },
{ HID_USB_DEVICE(USB_VENDOR_ID_AASHIMA, USB_DEVICE_ID_AASHIMA_PREDATOR), HID_QUIRK_BADPAD },
+ { HID_USB_DEVICE(USB_VENDOR_ID_ADATA_XPG, USB_VENDOR_ID_ADATA_XPG_WL_GAMING_MOUSE), HID_QUIRK_ALWAYS_POLL },
+ { HID_USB_DEVICE(USB_VENDOR_ID_ADATA_XPG, USB_VENDOR_ID_ADATA_XPG_WL_GAMING_MOUSE_DONGLE), HID_QUIRK_ALWAYS_POLL },
{ HID_USB_DEVICE(USB_VENDOR_ID_AFATECH, USB_DEVICE_ID_AFATECH_AF9016), HID_QUIRK_FULLSPEED_INTERVAL },
{ HID_USB_DEVICE(USB_VENDOR_ID_AIREN, USB_DEVICE_ID_AIREN_SLIMPLUS), HID_QUIRK_NOGET },
{ HID_USB_DEVICE(USB_VENDOR_ID_AKAI_09E8, USB_DEVICE_ID_AKAI_09E8_MIDIMIX), HID_QUIRK_NO_INIT_REPORTS },
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 3a2804a98203..6e59b2c4c39b 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -273,6 +273,8 @@ int iommu_device_register(struct iommu_device *iommu,
err = bus_iommu_probe(iommu_buses[i]);
if (err)
iommu_device_unregister(iommu);
+ else
+ WRITE_ONCE(iommu->ready, true);
return err;
}
EXPORT_SYMBOL_GPL(iommu_device_register);
@@ -2801,31 +2803,39 @@ bool iommu_default_passthrough(void)
}
EXPORT_SYMBOL_GPL(iommu_default_passthrough);
-const struct iommu_ops *iommu_ops_from_fwnode(const struct fwnode_handle *fwnode)
+static const struct iommu_device *iommu_from_fwnode(const struct fwnode_handle *fwnode)
{
- const struct iommu_ops *ops = NULL;
- struct iommu_device *iommu;
+ const struct iommu_device *iommu, *ret = NULL;
spin_lock(&iommu_device_lock);
list_for_each_entry(iommu, &iommu_device_list, list)
if (iommu->fwnode == fwnode) {
- ops = iommu->ops;
+ ret = iommu;
break;
}
spin_unlock(&iommu_device_lock);
- return ops;
+ return ret;
+}
+
+const struct iommu_ops *iommu_ops_from_fwnode(const struct fwnode_handle *fwnode)
+{
+ const struct iommu_device *iommu = iommu_from_fwnode(fwnode);
+
+ return iommu ? iommu->ops : NULL;
}
int iommu_fwspec_init(struct device *dev, struct fwnode_handle *iommu_fwnode)
{
- const struct iommu_ops *ops = iommu_ops_from_fwnode(iommu_fwnode);
+ const struct iommu_device *iommu = iommu_from_fwnode(iommu_fwnode);
struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev);
- if (!ops)
+ if (!iommu)
return driver_deferred_probe_check_state(dev);
+ if (!dev->iommu && !READ_ONCE(iommu->ready))
+ return -EPROBE_DEFER;
if (fwspec)
- return ops == iommu_fwspec_ops(fwspec) ? 0 : -EINVAL;
+ return iommu->ops == iommu_fwspec_ops(fwspec) ? 0 : -EINVAL;
if (!dev_iommu_get(dev))
return -ENOMEM;
diff --git a/drivers/net/can/kvaser_pciefd.c b/drivers/net/can/kvaser_pciefd.c
index 4f177ca1b998..efc40125593d 100644
--- a/drivers/net/can/kvaser_pciefd.c
+++ b/drivers/net/can/kvaser_pciefd.c
@@ -1673,24 +1673,28 @@ static int kvaser_pciefd_read_buffer(struct kvaser_pciefd *pcie, int dma_buf)
return res;
}
-static u32 kvaser_pciefd_receive_irq(struct kvaser_pciefd *pcie)
+static void kvaser_pciefd_receive_irq(struct kvaser_pciefd *pcie)
{
+ void __iomem *srb_cmd_reg = KVASER_PCIEFD_SRB_ADDR(pcie) + KVASER_PCIEFD_SRB_CMD_REG;
u32 irq = ioread32(KVASER_PCIEFD_SRB_ADDR(pcie) + KVASER_PCIEFD_SRB_IRQ_REG);
- if (irq & KVASER_PCIEFD_SRB_IRQ_DPD0)
+ iowrite32(irq, KVASER_PCIEFD_SRB_ADDR(pcie) + KVASER_PCIEFD_SRB_IRQ_REG);
+
+ if (irq & KVASER_PCIEFD_SRB_IRQ_DPD0) {
kvaser_pciefd_read_buffer(pcie, 0);
+ iowrite32(KVASER_PCIEFD_SRB_CMD_RDB0, srb_cmd_reg); /* Rearm buffer */
+ }
- if (irq & KVASER_PCIEFD_SRB_IRQ_DPD1)
+ if (irq & KVASER_PCIEFD_SRB_IRQ_DPD1) {
kvaser_pciefd_read_buffer(pcie, 1);
+ iowrite32(KVASER_PCIEFD_SRB_CMD_RDB1, srb_cmd_reg); /* Rearm buffer */
+ }
if (unlikely(irq & KVASER_PCIEFD_SRB_IRQ_DOF0 ||
irq & KVASER_PCIEFD_SRB_IRQ_DOF1 ||
irq & KVASER_PCIEFD_SRB_IRQ_DUF0 ||
irq & KVASER_PCIEFD_SRB_IRQ_DUF1))
dev_err(&pcie->pci->dev, "DMA IRQ error 0x%08X\n", irq);
-
- iowrite32(irq, KVASER_PCIEFD_SRB_ADDR(pcie) + KVASER_PCIEFD_SRB_IRQ_REG);
- return irq;
}
static void kvaser_pciefd_transmit_irq(struct kvaser_pciefd_can *can)
@@ -1718,29 +1722,22 @@ static irqreturn_t kvaser_pciefd_irq_handler(int irq, void *dev)
struct kvaser_pciefd *pcie = (struct kvaser_pciefd *)dev;
const struct kvaser_pciefd_irq_mask *irq_mask = pcie->driver_data->irq_mask;
u32 pci_irq = ioread32(KVASER_PCIEFD_PCI_IRQ_ADDR(pcie));
- u32 srb_irq = 0;
- u32 srb_release = 0;
int i;
if (!(pci_irq & irq_mask->all))
return IRQ_NONE;
+ iowrite32(0, KVASER_PCIEFD_PCI_IEN_ADDR(pcie));
+
if (pci_irq & irq_mask->kcan_rx0)
- srb_irq = kvaser_pciefd_receive_irq(pcie);
+ kvaser_pciefd_receive_irq(pcie);
for (i = 0; i < pcie->nr_channels; i++) {
if (pci_irq & irq_mask->kcan_tx[i])
kvaser_pciefd_transmit_irq(pcie->can[i]);
}
- if (srb_irq & KVASER_PCIEFD_SRB_IRQ_DPD0)
- srb_release |= KVASER_PCIEFD_SRB_CMD_RDB0;
-
- if (srb_irq & KVASER_PCIEFD_SRB_IRQ_DPD1)
- srb_release |= KVASER_PCIEFD_SRB_CMD_RDB1;
-
- if (srb_release)
- iowrite32(srb_release, KVASER_PCIEFD_SRB_ADDR(pcie) + KVASER_PCIEFD_SRB_CMD_REG);
+ iowrite32(irq_mask->all, KVASER_PCIEFD_PCI_IEN_ADDR(pcie));
return IRQ_HANDLED;
}
@@ -1760,13 +1757,22 @@ static void kvaser_pciefd_teardown_can_ctrls(struct kvaser_pciefd *pcie)
}
}
+static void kvaser_pciefd_disable_irq_srcs(struct kvaser_pciefd *pcie)
+{
+ unsigned int i;
+
+ /* Masking PCI_IRQ is insufficient as running ISR will unmask it */
+ iowrite32(0, KVASER_PCIEFD_SRB_ADDR(pcie) + KVASER_PCIEFD_SRB_IEN_REG);
+ for (i = 0; i < pcie->nr_channels; ++i)
+ iowrite32(0, pcie->can[i]->reg_base + KVASER_PCIEFD_KCAN_IEN_REG);
+}
+
static int kvaser_pciefd_probe(struct pci_dev *pdev,
const struct pci_device_id *id)
{
int ret;
struct kvaser_pciefd *pcie;
const struct kvaser_pciefd_irq_mask *irq_mask;
- void __iomem *irq_en_base;
pcie = devm_kzalloc(&pdev->dev, sizeof(*pcie), GFP_KERNEL);
if (!pcie)
@@ -1832,8 +1838,7 @@ static int kvaser_pciefd_probe(struct pci_dev *pdev,
KVASER_PCIEFD_SRB_ADDR(pcie) + KVASER_PCIEFD_SRB_IEN_REG);
/* Enable PCI interrupts */
- irq_en_base = KVASER_PCIEFD_PCI_IEN_ADDR(pcie);
- iowrite32(irq_mask->all, irq_en_base);
+ iowrite32(irq_mask->all, KVASER_PCIEFD_PCI_IEN_ADDR(pcie));
/* Ready the DMA buffers */
iowrite32(KVASER_PCIEFD_SRB_CMD_RDB0,
KVASER_PCIEFD_SRB_ADDR(pcie) + KVASER_PCIEFD_SRB_CMD_REG);
@@ -1847,8 +1852,7 @@ static int kvaser_pciefd_probe(struct pci_dev *pdev,
return 0;
err_free_irq:
- /* Disable PCI interrupts */
- iowrite32(0, irq_en_base);
+ kvaser_pciefd_disable_irq_srcs(pcie);
free_irq(pcie->pci->irq, pcie);
err_pci_free_irq_vectors:
@@ -1871,35 +1875,26 @@ static int kvaser_pciefd_probe(struct pci_dev *pdev,
return ret;
}
-static void kvaser_pciefd_remove_all_ctrls(struct kvaser_pciefd *pcie)
-{
- int i;
-
- for (i = 0; i < pcie->nr_channels; i++) {
- struct kvaser_pciefd_can *can = pcie->can[i];
-
- if (can) {
- iowrite32(0, can->reg_base + KVASER_PCIEFD_KCAN_IEN_REG);
- unregister_candev(can->can.dev);
- del_timer(&can->bec_poll_timer);
- kvaser_pciefd_pwm_stop(can);
- free_candev(can->can.dev);
- }
- }
-}
-
static void kvaser_pciefd_remove(struct pci_dev *pdev)
{
struct kvaser_pciefd *pcie = pci_get_drvdata(pdev);
+ unsigned int i;
- kvaser_pciefd_remove_all_ctrls(pcie);
+ for (i = 0; i < pcie->nr_channels; ++i) {
+ struct kvaser_pciefd_can *can = pcie->can[i];
- /* Disable interrupts */
- iowrite32(0, KVASER_PCIEFD_SRB_ADDR(pcie) + KVASER_PCIEFD_SRB_CTRL_REG);
- iowrite32(0, KVASER_PCIEFD_PCI_IEN_ADDR(pcie));
+ unregister_candev(can->can.dev);
+ del_timer(&can->bec_poll_timer);
+ kvaser_pciefd_pwm_stop(can);
+ }
+ kvaser_pciefd_disable_irq_srcs(pcie);
free_irq(pcie->pci->irq, pcie);
pci_free_irq_vectors(pcie->pci);
+
+ for (i = 0; i < pcie->nr_channels; ++i)
+ free_candev(pcie->can[i]->can.dev);
+
pci_iounmap(pdev, pcie->reg_base);
pci_release_regions(pdev);
pci_disable_device(pdev);
diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
index cac67babe455..114110740716 100644
--- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c
+++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
@@ -2775,7 +2775,7 @@ static int am65_cpsw_nuss_init_slave_ports(struct am65_cpsw_common *common)
port->slave.mac_addr);
if (!is_valid_ether_addr(port->slave.mac_addr)) {
eth_random_addr(port->slave.mac_addr);
- dev_err(dev, "Use random MAC address\n");
+ dev_info(dev, "Use random MAC address\n");
}
}
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index a27149e37a98..8863c9fcb4aa 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -2059,7 +2059,21 @@ static bool nvme_update_disk_info(struct nvme_ns *ns, struct nvme_id_ns *id,
if (id->nsfeat & NVME_NS_FEAT_ATOMICS && id->nawupf)
atomic_bs = (1 + le16_to_cpu(id->nawupf)) * bs;
else
- atomic_bs = (1 + ns->ctrl->subsys->awupf) * bs;
+ atomic_bs = (1 + ns->ctrl->awupf) * bs;
+
+ /*
+ * Set subsystem atomic bs.
+ */
+ if (ns->ctrl->subsys->atomic_bs) {
+ if (atomic_bs != ns->ctrl->subsys->atomic_bs) {
+ dev_err_ratelimited(ns->ctrl->device,
+ "%s: Inconsistent Atomic Write Size, Namespace will not be added: Subsystem=%d bytes, Controller/Namespace=%d bytes\n",
+ ns->disk ? ns->disk->disk_name : "?",
+ ns->ctrl->subsys->atomic_bs,
+ atomic_bs);
+ }
+ } else
+ ns->ctrl->subsys->atomic_bs = atomic_bs;
nvme_update_atomic_write_disk_info(ns, id, lim, bs, atomic_bs);
}
@@ -2201,6 +2215,17 @@ static int nvme_update_ns_info_block(struct nvme_ns *ns,
nvme_set_chunk_sectors(ns, id, &lim);
if (!nvme_update_disk_info(ns, id, &lim))
capacity = 0;
+
+ /*
+ * Validate the max atomic write size fits within the subsystem's
+ * atomic write capabilities.
+ */
+ if (lim.atomic_write_hw_max > ns->ctrl->subsys->atomic_bs) {
+ blk_mq_unfreeze_queue(ns->disk->queue, memflags);
+ ret = -ENXIO;
+ goto out;
+ }
+
nvme_config_discard(ns, &lim);
if (IS_ENABLED(CONFIG_BLK_DEV_ZONED) &&
ns->head->ids.csi == NVME_CSI_ZNS)
@@ -3031,7 +3056,6 @@ static int nvme_init_subsystem(struct nvme_ctrl *ctrl, struct nvme_id_ctrl *id)
kfree(subsys);
return -EINVAL;
}
- subsys->awupf = le16_to_cpu(id->awupf);
nvme_mpath_default_iopolicy(subsys);
subsys->dev.class = &nvme_subsys_class;
@@ -3441,7 +3465,7 @@ static int nvme_init_identify(struct nvme_ctrl *ctrl)
dev_pm_qos_expose_latency_tolerance(ctrl->device);
else if (!ctrl->apst_enabled && prev_apst_enabled)
dev_pm_qos_hide_latency_tolerance(ctrl->device);
-
+ ctrl->awupf = le16_to_cpu(id->awupf);
out_free:
kfree(id);
return ret;
diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
index f39823cde62c..ac17e650327f 100644
--- a/drivers/nvme/host/multipath.c
+++ b/drivers/nvme/host/multipath.c
@@ -638,7 +638,8 @@ int nvme_mpath_alloc_disk(struct nvme_ctrl *ctrl, struct nvme_ns_head *head)
blk_set_stacking_limits(&lim);
lim.dma_alignment = 3;
- lim.features |= BLK_FEAT_IO_STAT | BLK_FEAT_NOWAIT | BLK_FEAT_POLL;
+ lim.features |= BLK_FEAT_IO_STAT | BLK_FEAT_NOWAIT |
+ BLK_FEAT_POLL | BLK_FEAT_ATOMIC_WRITES;
if (head->ids.csi == NVME_CSI_ZNS)
lim.features |= BLK_FEAT_ZONED;
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index 7be92d07430e..3804f91b1942 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -410,6 +410,7 @@ struct nvme_ctrl {
enum nvme_ctrl_type cntrltype;
enum nvme_dctype dctype;
+ u16 awupf; /* 0's based value. */
};
static inline enum nvme_ctrl_state nvme_ctrl_state(struct nvme_ctrl *ctrl)
@@ -442,11 +443,11 @@ struct nvme_subsystem {
u8 cmic;
enum nvme_subsys_type subtype;
u16 vendor_id;
- u16 awupf; /* 0's based awupf value. */
struct ida ns_ida;
#ifdef CONFIG_NVME_MULTIPATH
enum nvme_iopolicy iopolicy;
#endif
+ u32 atomic_bs;
};
/*
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index abd097eba662..28f560f86e91 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -3742,6 +3742,8 @@ static const struct pci_device_id nvme_id_table[] = {
.driver_data = NVME_QUIRK_NO_DEEPEST_PS, },
{ PCI_DEVICE(0x1e49, 0x0041), /* ZHITAI TiPro7000 NVMe SSD */
.driver_data = NVME_QUIRK_NO_DEEPEST_PS, },
+ { PCI_DEVICE(0x025e, 0xf1ac), /* SOLIDIGM P44 pro SSDPFKKW020X7 */
+ .driver_data = NVME_QUIRK_NO_DEEPEST_PS, },
{ PCI_DEVICE(0xc0a9, 0x540a), /* Crucial P2 */
.driver_data = NVME_QUIRK_BOGUS_NID, },
{ PCI_DEVICE(0x1d97, 0x2263), /* Lexar NM610 */
diff --git a/drivers/nvme/target/pci-epf.c b/drivers/nvme/target/pci-epf.c
index fbc167f47d8a..17c0e5ee731a 100644
--- a/drivers/nvme/target/pci-epf.c
+++ b/drivers/nvme/target/pci-epf.c
@@ -596,9 +596,6 @@ static bool nvmet_pci_epf_should_raise_irq(struct nvmet_pci_epf_ctrl *ctrl,
struct nvmet_pci_epf_irq_vector *iv = cq->iv;
bool ret;
- if (!test_bit(NVMET_PCI_EPF_Q_IRQ_ENABLED, &cq->flags))
- return false;
-
/* IRQ coalescing for the admin queue is not allowed. */
if (!cq->qid)
return true;
@@ -625,7 +622,8 @@ static void nvmet_pci_epf_raise_irq(struct nvmet_pci_epf_ctrl *ctrl,
struct pci_epf *epf = nvme_epf->epf;
int ret = 0;
- if (!test_bit(NVMET_PCI_EPF_Q_LIVE, &cq->flags))
+ if (!test_bit(NVMET_PCI_EPF_Q_LIVE, &cq->flags) ||
+ !test_bit(NVMET_PCI_EPF_Q_IRQ_ENABLED, &cq->flags))
return;
mutex_lock(&ctrl->irq_lock);
@@ -656,7 +654,9 @@ static void nvmet_pci_epf_raise_irq(struct nvmet_pci_epf_ctrl *ctrl,
}
if (ret)
- dev_err(ctrl->dev, "Failed to raise IRQ (err=%d)\n", ret);
+ dev_err_ratelimited(ctrl->dev,
+ "CQ[%u]: Failed to raise IRQ (err=%d)\n",
+ cq->qid, ret);
unlock:
mutex_unlock(&ctrl->irq_lock);
diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
index ef959e66db7c..0ba0f545b118 100644
--- a/drivers/perf/arm-cmn.c
+++ b/drivers/perf/arm-cmn.c
@@ -727,8 +727,8 @@ static umode_t arm_cmn_event_attr_is_visible(struct kobject *kobj,
if ((chan == 5 && cmn->rsp_vc_num < 2) ||
(chan == 6 && cmn->dat_vc_num < 2) ||
- (chan == 7 && cmn->snp_vc_num < 2) ||
- (chan == 8 && cmn->req_vc_num < 2))
+ (chan == 7 && cmn->req_vc_num < 2) ||
+ (chan == 8 && cmn->snp_vc_num < 2))
return 0;
}
@@ -884,8 +884,8 @@ static umode_t arm_cmn_event_attr_is_visible(struct kobject *kobj,
_CMN_EVENT_XP(pub_##_name, (_event) | (4 << 5)), \
_CMN_EVENT_XP(rsp2_##_name, (_event) | (5 << 5)), \
_CMN_EVENT_XP(dat2_##_name, (_event) | (6 << 5)), \
- _CMN_EVENT_XP(snp2_##_name, (_event) | (7 << 5)), \
- _CMN_EVENT_XP(req2_##_name, (_event) | (8 << 5))
+ _CMN_EVENT_XP(req2_##_name, (_event) | (7 << 5)), \
+ _CMN_EVENT_XP(snp2_##_name, (_event) | (8 << 5))
#define CMN_EVENT_XP_DAT(_name, _event) \
_CMN_EVENT_XP_PORT(dat_##_name, (_event) | (3 << 5)), \
@@ -2557,6 +2557,7 @@ static int arm_cmn_probe(struct platform_device *pdev)
cmn->dev = &pdev->dev;
cmn->part = (unsigned long)device_get_match_data(cmn->dev);
+ cmn->cpu = cpumask_local_spread(0, dev_to_node(cmn->dev));
platform_set_drvdata(pdev, cmn);
if (cmn->part == PART_CMN600 && has_acpi_companion(cmn->dev)) {
@@ -2584,7 +2585,6 @@ static int arm_cmn_probe(struct platform_device *pdev)
if (err)
return err;
- cmn->cpu = cpumask_local_spread(0, dev_to_node(cmn->dev));
cmn->pmu = (struct pmu) {
.module = THIS_MODULE,
.parent = cmn->dev,
@@ -2650,6 +2650,7 @@ static const struct acpi_device_id arm_cmn_acpi_match[] = {
{ "ARMHC600", PART_CMN600 },
{ "ARMHC650" },
{ "ARMHC700" },
+ { "ARMHC003" },
{}
};
MODULE_DEVICE_TABLE(acpi, arm_cmn_acpi_match);
diff --git a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
index 920abf6fa9bd..28a4235bfd5f 100644
--- a/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
+++ b/drivers/phy/rockchip/phy-rockchip-samsung-hdptx.c
@@ -325,6 +325,8 @@ static const struct ropll_config ropll_tmds_cfg[] = {
1, 1, 0, 0x20, 0x0c, 1, 0x0e, 0, 0, },
{ 650000, 162, 162, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 54, 0, 16, 4, 1,
1, 1, 0, 0x20, 0x0c, 1, 0x0e, 0, 0, },
+ { 502500, 84, 84, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1, 11, 1, 4, 5,
+ 4, 11, 1, 0, 0x20, 0x0c, 1, 0x0e, 0, 0, },
{ 337500, 0x70, 0x70, 1, 1, 0xf, 1, 1, 1, 1, 1, 1, 1, 0x2, 0, 0x01, 5,
1, 1, 1, 0, 0x20, 0x0c, 1, 0x0e, 0, 0, },
{ 400000, 100, 100, 1, 1, 11, 1, 1, 0, 1, 0, 1, 1, 0x9, 0, 0x05, 0,
diff --git a/drivers/phy/starfive/phy-jh7110-usb.c b/drivers/phy/starfive/phy-jh7110-usb.c
index cb5454fbe2c8..b505d89860b4 100644
--- a/drivers/phy/starfive/phy-jh7110-usb.c
+++ b/drivers/phy/starfive/phy-jh7110-usb.c
@@ -18,6 +18,8 @@
#include <linux/usb/of.h>
#define USB_125M_CLK_RATE 125000000
+#define USB_CLK_MODE_OFF 0x0
+#define USB_CLK_MODE_RX_NORMAL_PWR BIT(1)
#define USB_LS_KEEPALIVE_OFF 0x4
#define USB_LS_KEEPALIVE_ENABLE BIT(4)
@@ -78,6 +80,7 @@ static int jh7110_usb2_phy_init(struct phy *_phy)
{
struct jh7110_usb2_phy *phy = phy_get_drvdata(_phy);
int ret;
+ unsigned int val;
ret = clk_set_rate(phy->usb_125m_clk, USB_125M_CLK_RATE);
if (ret)
@@ -87,6 +90,10 @@ static int jh7110_usb2_phy_init(struct phy *_phy)
if (ret)
return ret;
+ val = readl(phy->regs + USB_CLK_MODE_OFF);
+ val |= USB_CLK_MODE_RX_NORMAL_PWR;
+ writel(val, phy->regs + USB_CLK_MODE_OFF);
+
return 0;
}
diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
index a0eae24ca9e6..162809140f68 100644
--- a/drivers/platform/x86/fujitsu-laptop.c
+++ b/drivers/platform/x86/fujitsu-laptop.c
@@ -17,13 +17,13 @@
/*
* fujitsu-laptop.c - Fujitsu laptop support, providing access to additional
* features made available on a range of Fujitsu laptops including the
- * P2xxx/P5xxx/S6xxx/S7xxx series.
+ * P2xxx/P5xxx/S2xxx/S6xxx/S7xxx series.
*
* This driver implements a vendor-specific backlight control interface for
* Fujitsu laptops and provides support for hotkeys present on certain Fujitsu
* laptops.
*
- * This driver has been tested on a Fujitsu Lifebook S6410, S7020 and
+ * This driver has been tested on a Fujitsu Lifebook S2110, S6410, S7020 and
* P8010. It should work on most P-series and S-series Lifebooks, but
* YMMV.
*
@@ -107,7 +107,11 @@
#define KEY2_CODE 0x411
#define KEY3_CODE 0x412
#define KEY4_CODE 0x413
-#define KEY5_CODE 0x420
+#define KEY5_CODE 0x414
+#define KEY6_CODE 0x415
+#define KEY7_CODE 0x416
+#define KEY8_CODE 0x417
+#define KEY9_CODE 0x420
/* Hotkey ringbuffer limits */
#define MAX_HOTKEY_RINGBUFFER_SIZE 100
@@ -560,7 +564,7 @@ static const struct key_entry keymap_default[] = {
{ KE_KEY, KEY2_CODE, { KEY_PROG2 } },
{ KE_KEY, KEY3_CODE, { KEY_PROG3 } },
{ KE_KEY, KEY4_CODE, { KEY_PROG4 } },
- { KE_KEY, KEY5_CODE, { KEY_RFKILL } },
+ { KE_KEY, KEY9_CODE, { KEY_RFKILL } },
/* Soft keys read from status flags */
{ KE_KEY, FLAG_RFKILL, { KEY_RFKILL } },
{ KE_KEY, FLAG_TOUCHPAD_TOGGLE, { KEY_TOUCHPAD_TOGGLE } },
@@ -584,6 +588,18 @@ static const struct key_entry keymap_p8010[] = {
{ KE_END, 0 }
};
+static const struct key_entry keymap_s2110[] = {
+ { KE_KEY, KEY1_CODE, { KEY_PROG1 } }, /* "A" */
+ { KE_KEY, KEY2_CODE, { KEY_PROG2 } }, /* "B" */
+ { KE_KEY, KEY3_CODE, { KEY_WWW } }, /* "Internet" */
+ { KE_KEY, KEY4_CODE, { KEY_EMAIL } }, /* "E-mail" */
+ { KE_KEY, KEY5_CODE, { KEY_STOPCD } },
+ { KE_KEY, KEY6_CODE, { KEY_PLAYPAUSE } },
+ { KE_KEY, KEY7_CODE, { KEY_PREVIOUSSONG } },
+ { KE_KEY, KEY8_CODE, { KEY_NEXTSONG } },
+ { KE_END, 0 }
+};
+
static const struct key_entry *keymap = keymap_default;
static int fujitsu_laptop_dmi_keymap_override(const struct dmi_system_id *id)
@@ -621,6 +637,15 @@ static const struct dmi_system_id fujitsu_laptop_dmi_table[] = {
},
.driver_data = (void *)keymap_p8010
},
+ {
+ .callback = fujitsu_laptop_dmi_keymap_override,
+ .ident = "Fujitsu LifeBook S2110",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK S2110"),
+ },
+ .driver_data = (void *)keymap_s2110
+ },
{}
};
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 2ff38ca9ddb4..d0376ee1f8ce 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -232,6 +232,7 @@ enum tpacpi_hkey_event_t {
/* Thermal events */
TP_HKEY_EV_ALARM_BAT_HOT = 0x6011, /* battery too hot */
TP_HKEY_EV_ALARM_BAT_XHOT = 0x6012, /* battery critically hot */
+ TP_HKEY_EV_ALARM_BAT_LIM_CHANGE = 0x6013, /* battery charge limit changed*/
TP_HKEY_EV_ALARM_SENSOR_HOT = 0x6021, /* sensor too hot */
TP_HKEY_EV_ALARM_SENSOR_XHOT = 0x6022, /* sensor critically hot */
TP_HKEY_EV_THM_TABLE_CHANGED = 0x6030, /* windows; thermal table changed */
@@ -3780,6 +3781,10 @@ static bool hotkey_notify_6xxx(const u32 hkey, bool *send_acpi_ev)
pr_alert("THERMAL EMERGENCY: battery is extremely hot!\n");
/* recommended action: immediate sleep/hibernate */
break;
+ case TP_HKEY_EV_ALARM_BAT_LIM_CHANGE:
+ pr_debug("Battery Info: battery charge threshold changed\n");
+ /* User changed charging threshold. No action needed */
+ return true;
case TP_HKEY_EV_ALARM_SENSOR_HOT:
pr_crit("THERMAL ALARM: a sensor reports something is too hot!\n");
/* recommended action: warn user through gui, that */
@@ -11481,6 +11486,8 @@ static int __must_check __init get_thinkpad_model_data(
tp->vendor = PCI_VENDOR_ID_IBM;
else if (dmi_name_in_vendors("LENOVO"))
tp->vendor = PCI_VENDOR_ID_LENOVO;
+ else if (dmi_name_in_vendors("NEC"))
+ tp->vendor = PCI_VENDOR_ID_LENOVO;
else
return 0;
diff --git a/drivers/spi/spi-sun4i.c b/drivers/spi/spi-sun4i.c
index fcbe864c9b7d..4b070377e3d1 100644
--- a/drivers/spi/spi-sun4i.c
+++ b/drivers/spi/spi-sun4i.c
@@ -264,6 +264,9 @@ static int sun4i_spi_transfer_one(struct spi_controller *host,
else
reg |= SUN4I_CTL_DHB;
+ /* Now that the settings are correct, enable the interface */
+ reg |= SUN4I_CTL_ENABLE;
+
sun4i_spi_write(sspi, SUN4I_CTL_REG, reg);
/* Ensure that we have a parent clock fast enough */
@@ -404,7 +407,7 @@ static int sun4i_spi_runtime_resume(struct device *dev)
}
sun4i_spi_write(sspi, SUN4I_CTL_REG,
- SUN4I_CTL_ENABLE | SUN4I_CTL_MASTER | SUN4I_CTL_TP);
+ SUN4I_CTL_MASTER | SUN4I_CTL_TP);
return 0;
diff --git a/fs/coredump.c b/fs/coredump.c
index 4ebec51fe4f2..d56f5421e62c 100644
--- a/fs/coredump.c
+++ b/fs/coredump.c
@@ -43,6 +43,8 @@
#include <linux/timekeeping.h>
#include <linux/sysctl.h>
#include <linux/elf.h>
+#include <linux/pidfs.h>
+#include <uapi/linux/pidfd.h>
#include <linux/uaccess.h>
#include <asm/mmu_context.h>
@@ -60,6 +62,12 @@ static void free_vma_snapshot(struct coredump_params *cprm);
#define CORE_FILE_NOTE_SIZE_DEFAULT (4*1024*1024)
/* Define a reasonable max cap */
#define CORE_FILE_NOTE_SIZE_MAX (16*1024*1024)
+/*
+ * File descriptor number for the pidfd for the thread-group leader of
+ * the coredumping task installed into the usermode helper's file
+ * descriptor table.
+ */
+#define COREDUMP_PIDFD_NUMBER 3
static int core_uses_pid;
static unsigned int core_pipe_limit;
@@ -339,6 +347,27 @@ static int format_corename(struct core_name *cn, struct coredump_params *cprm,
case 'C':
err = cn_printf(cn, "%d", cprm->cpu);
break;
+ /* pidfd number */
+ case 'F': {
+ /*
+ * Installing a pidfd only makes sense if
+ * we actually spawn a usermode helper.
+ */
+ if (!ispipe)
+ break;
+
+ /*
+ * Note that we'll install a pidfd for the
+ * thread-group leader. We know that task
+ * linkage hasn't been removed yet and even if
+ * this @current isn't the actual thread-group
+ * leader we know that the thread-group leader
+ * cannot be reaped until @current has exited.
+ */
+ cprm->pid = task_tgid(current);
+ err = cn_printf(cn, "%d", COREDUMP_PIDFD_NUMBER);
+ break;
+ }
default:
break;
}
@@ -493,7 +522,7 @@ static void wait_for_dump_helpers(struct file *file)
}
/*
- * umh_pipe_setup
+ * umh_coredump_setup
* helper function to customize the process used
* to collect the core in userspace. Specifically
* it sets up a pipe and installs it as fd 0 (stdin)
@@ -503,11 +532,32 @@ static void wait_for_dump_helpers(struct file *file)
* is a special value that we use to trap recursive
* core dumps
*/
-static int umh_pipe_setup(struct subprocess_info *info, struct cred *new)
+static int umh_coredump_setup(struct subprocess_info *info, struct cred *new)
{
struct file *files[2];
struct coredump_params *cp = (struct coredump_params *)info->data;
- int err = create_pipe_files(files, 0);
+ int err;
+
+ if (cp->pid) {
+ struct file *pidfs_file __free(fput) = NULL;
+
+ pidfs_file = pidfs_alloc_file(cp->pid, O_RDWR);
+ if (IS_ERR(pidfs_file))
+ return PTR_ERR(pidfs_file);
+
+ /*
+ * Usermode helpers are childen of either
+ * system_unbound_wq or of kthreadd. So we know that
+ * we're starting off with a clean file descriptor
+ * table. So we should always be able to use
+ * COREDUMP_PIDFD_NUMBER as our file descriptor value.
+ */
+ err = replace_fd(COREDUMP_PIDFD_NUMBER, pidfs_file, 0);
+ if (err < 0)
+ return err;
+ }
+
+ err = create_pipe_files(files, 0);
if (err)
return err;
@@ -515,10 +565,13 @@ static int umh_pipe_setup(struct subprocess_info *info, struct cred *new)
err = replace_fd(0, files[0], 0);
fput(files[0]);
+ if (err < 0)
+ return err;
+
/* and disallow core files too */
current->signal->rlim[RLIMIT_CORE] = (struct rlimit){1, 1};
- return err;
+ return 0;
}
void do_coredump(const kernel_siginfo_t *siginfo)
@@ -593,7 +646,7 @@ void do_coredump(const kernel_siginfo_t *siginfo)
}
if (cprm.limit == 1) {
- /* See umh_pipe_setup() which sets RLIMIT_CORE = 1.
+ /* See umh_coredump_setup() which sets RLIMIT_CORE = 1.
*
* Normally core limits are irrelevant to pipes, since
* we're not writing to the file system, but we use
@@ -632,7 +685,7 @@ void do_coredump(const kernel_siginfo_t *siginfo)
retval = -ENOMEM;
sub_info = call_usermodehelper_setup(helper_argv[0],
helper_argv, NULL, GFP_KERNEL,
- umh_pipe_setup, NULL, &cprm);
+ umh_coredump_setup, NULL, &cprm);
if (sub_info)
retval = call_usermodehelper_exec(sub_info,
UMH_WAIT_EXEC);
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 3b0918ade53c..a10d39150abc 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -1100,6 +1100,8 @@ struct nfs_server *nfs_create_server(struct fs_context *fc)
if (server->namelen == 0 || server->namelen > NFS2_MAXNAMLEN)
server->namelen = NFS2_MAXNAMLEN;
}
+ /* Linux 'subtree_check' borkenness mandates this setting */
+ server->fh_expire_type = NFS_FH_VOL_RENAME;
if (!(fattr->valid & NFS_ATTR_FATTR)) {
error = ctx->nfs_mod->rpc_ops->getattr(server, ctx->mntfh,
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 2b04038b0e40..34f3471ce813 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -2678,6 +2678,18 @@ nfs_unblock_rename(struct rpc_task *task, struct nfs_renamedata *data)
unblock_revalidate(new_dentry);
}
+static bool nfs_rename_is_unsafe_cross_dir(struct dentry *old_dentry,
+ struct dentry *new_dentry)
+{
+ struct nfs_server *server = NFS_SB(old_dentry->d_sb);
+
+ if (old_dentry->d_parent != new_dentry->d_parent)
+ return false;
+ if (server->fh_expire_type & NFS_FH_RENAME_UNSAFE)
+ return !(server->fh_expire_type & NFS_FH_NOEXPIRE_WITH_OPEN);
+ return true;
+}
+
/*
* RENAME
* FIXME: Some nfsds, like the Linux user space nfsd, may generate a
@@ -2765,7 +2777,8 @@ int nfs_rename(struct mnt_idmap *idmap, struct inode *old_dir,
}
- if (S_ISREG(old_inode->i_mode))
+ if (S_ISREG(old_inode->i_mode) &&
+ nfs_rename_is_unsafe_cross_dir(old_dentry, new_dentry))
nfs_sync_inode(old_inode);
task = nfs_async_rename(old_dir, new_dir, old_dentry, new_dentry,
must_unblock ? nfs_unblock_rename : NULL);
diff --git a/fs/nfs/filelayout/filelayoutdev.c b/fs/nfs/filelayout/filelayoutdev.c
index 4fa304fa5bc4..29d9234d5c08 100644
--- a/fs/nfs/filelayout/filelayoutdev.c
+++ b/fs/nfs/filelayout/filelayoutdev.c
@@ -76,6 +76,7 @@ nfs4_fl_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
struct page *scratch;
struct list_head dsaddrs;
struct nfs4_pnfs_ds_addr *da;
+ struct net *net = server->nfs_client->cl_net;
/* set up xdr stream */
scratch = alloc_page(gfp_flags);
@@ -159,8 +160,7 @@ nfs4_fl_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
mp_count = be32_to_cpup(p); /* multipath count */
for (j = 0; j < mp_count; j++) {
- da = nfs4_decode_mp_ds_addr(server->nfs_client->cl_net,
- &stream, gfp_flags);
+ da = nfs4_decode_mp_ds_addr(net, &stream, gfp_flags);
if (da)
list_add_tail(&da->da_node, &dsaddrs);
}
@@ -170,7 +170,7 @@ nfs4_fl_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
goto out_err_free_deviceid;
}
- dsaddr->ds_list[i] = nfs4_pnfs_ds_add(&dsaddrs, gfp_flags);
+ dsaddr->ds_list[i] = nfs4_pnfs_ds_add(net, &dsaddrs, gfp_flags);
if (!dsaddr->ds_list[i])
goto out_err_drain_dsaddrs;
trace_fl_getdevinfo(server, &pdev->dev_id, dsaddr->ds_list[i]->ds_remotestr);
diff --git a/fs/nfs/flexfilelayout/flexfilelayoutdev.c b/fs/nfs/flexfilelayout/flexfilelayoutdev.c
index e58bedfb1dcc..4a304cf17c4b 100644
--- a/fs/nfs/flexfilelayout/flexfilelayoutdev.c
+++ b/fs/nfs/flexfilelayout/flexfilelayoutdev.c
@@ -49,6 +49,7 @@ nfs4_ff_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
struct nfs4_pnfs_ds_addr *da;
struct nfs4_ff_layout_ds *new_ds = NULL;
struct nfs4_ff_ds_version *ds_versions = NULL;
+ struct net *net = server->nfs_client->cl_net;
u32 mp_count;
u32 version_count;
__be32 *p;
@@ -80,8 +81,7 @@ nfs4_ff_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
for (i = 0; i < mp_count; i++) {
/* multipath ds */
- da = nfs4_decode_mp_ds_addr(server->nfs_client->cl_net,
- &stream, gfp_flags);
+ da = nfs4_decode_mp_ds_addr(net, &stream, gfp_flags);
if (da)
list_add_tail(&da->da_node, &dsaddrs);
}
@@ -149,7 +149,7 @@ nfs4_ff_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
new_ds->ds_versions = ds_versions;
new_ds->ds_versions_cnt = version_count;
- new_ds->ds = nfs4_pnfs_ds_add(&dsaddrs, gfp_flags);
+ new_ds->ds = nfs4_pnfs_ds_add(net, &dsaddrs, gfp_flags);
if (!new_ds->ds)
goto out_err_drain_dsaddrs;
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
index 30d2613e912b..91ff877185c8 100644
--- a/fs/nfs/pnfs.h
+++ b/fs/nfs/pnfs.h
@@ -60,6 +60,7 @@ struct nfs4_pnfs_ds {
struct list_head ds_node; /* nfs4_pnfs_dev_hlist dev_dslist */
char *ds_remotestr; /* comma sep list of addrs */
struct list_head ds_addrs;
+ const struct net *ds_net;
struct nfs_client *ds_clp;
refcount_t ds_count;
unsigned long ds_state;
@@ -415,7 +416,8 @@ int pnfs_generic_commit_pagelist(struct inode *inode,
int pnfs_generic_scan_commit_lists(struct nfs_commit_info *cinfo, int max);
void pnfs_generic_write_commit_done(struct rpc_task *task, void *data);
void nfs4_pnfs_ds_put(struct nfs4_pnfs_ds *ds);
-struct nfs4_pnfs_ds *nfs4_pnfs_ds_add(struct list_head *dsaddrs,
+struct nfs4_pnfs_ds *nfs4_pnfs_ds_add(const struct net *net,
+ struct list_head *dsaddrs,
gfp_t gfp_flags);
void nfs4_pnfs_v3_ds_connect_unload(void);
int nfs4_pnfs_ds_connect(struct nfs_server *mds_srv, struct nfs4_pnfs_ds *ds,
diff --git a/fs/nfs/pnfs_nfs.c b/fs/nfs/pnfs_nfs.c
index dbef837e871a..2ee20a0f0b36 100644
--- a/fs/nfs/pnfs_nfs.c
+++ b/fs/nfs/pnfs_nfs.c
@@ -604,12 +604,12 @@ _same_data_server_addrs_locked(const struct list_head *dsaddrs1,
* Lookup DS by addresses. nfs4_ds_cache_lock is held
*/
static struct nfs4_pnfs_ds *
-_data_server_lookup_locked(const struct list_head *dsaddrs)
+_data_server_lookup_locked(const struct net *net, const struct list_head *dsaddrs)
{
struct nfs4_pnfs_ds *ds;
list_for_each_entry(ds, &nfs4_data_server_cache, ds_node)
- if (_same_data_server_addrs_locked(&ds->ds_addrs, dsaddrs))
+ if (ds->ds_net == net && _same_data_server_addrs_locked(&ds->ds_addrs, dsaddrs))
return ds;
return NULL;
}
@@ -716,7 +716,7 @@ nfs4_pnfs_remotestr(struct list_head *dsaddrs, gfp_t gfp_flags)
* uncached and return cached struct nfs4_pnfs_ds.
*/
struct nfs4_pnfs_ds *
-nfs4_pnfs_ds_add(struct list_head *dsaddrs, gfp_t gfp_flags)
+nfs4_pnfs_ds_add(const struct net *net, struct list_head *dsaddrs, gfp_t gfp_flags)
{
struct nfs4_pnfs_ds *tmp_ds, *ds = NULL;
char *remotestr;
@@ -734,13 +734,14 @@ nfs4_pnfs_ds_add(struct list_head *dsaddrs, gfp_t gfp_flags)
remotestr = nfs4_pnfs_remotestr(dsaddrs, gfp_flags);
spin_lock(&nfs4_ds_cache_lock);
- tmp_ds = _data_server_lookup_locked(dsaddrs);
+ tmp_ds = _data_server_lookup_locked(net, dsaddrs);
if (tmp_ds == NULL) {
INIT_LIST_HEAD(&ds->ds_addrs);
list_splice_init(dsaddrs, &ds->ds_addrs);
ds->ds_remotestr = remotestr;
refcount_set(&ds->ds_count, 1);
INIT_LIST_HEAD(&ds->ds_node);
+ ds->ds_net = net;
ds->ds_clp = NULL;
list_add(&ds->ds_node, &nfs4_data_server_cache);
dprintk("%s add new data server %s\n", __func__,
diff --git a/fs/smb/server/oplock.c b/fs/smb/server/oplock.c
index 03f606afad93..d7a8a580d013 100644
--- a/fs/smb/server/oplock.c
+++ b/fs/smb/server/oplock.c
@@ -146,12 +146,9 @@ static struct oplock_info *opinfo_get_list(struct ksmbd_inode *ci)
{
struct oplock_info *opinfo;
- if (list_empty(&ci->m_op_list))
- return NULL;
-
down_read(&ci->m_lock);
- opinfo = list_first_entry(&ci->m_op_list, struct oplock_info,
- op_entry);
+ opinfo = list_first_entry_or_null(&ci->m_op_list, struct oplock_info,
+ op_entry);
if (opinfo) {
if (opinfo->conn == NULL ||
!atomic_inc_not_zero(&opinfo->refcount))
diff --git a/include/linux/coredump.h b/include/linux/coredump.h
index 77e6e195d1d6..76e41805b92d 100644
--- a/include/linux/coredump.h
+++ b/include/linux/coredump.h
@@ -28,6 +28,7 @@ struct coredump_params {
int vma_count;
size_t vma_data_size;
struct core_vma_metadata *vma_meta;
+ struct pid *pid;
};
extern unsigned int core_file_note_size_limit;
diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index 87cbe47b323e..0ba67935f530 100644
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
@@ -735,6 +735,7 @@ struct iommu_domain_ops {
* @dev: struct device for sysfs handling
* @singleton_group: Used internally for drivers that have only one group
* @max_pasids: number of supported PASIDs
+ * @ready: set once iommu_device_register() has completed successfully
*/
struct iommu_device {
struct list_head list;
@@ -743,6 +744,7 @@ struct iommu_device {
struct device *dev;
struct iommu_group *singleton_group;
u32 max_pasids;
+ bool ready;
};
/**
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h
index 108862d81b57..8baaad2dfbe4 100644
--- a/include/linux/nfs_fs_sb.h
+++ b/include/linux/nfs_fs_sb.h
@@ -210,6 +210,15 @@ struct nfs_server {
char *fscache_uniq; /* Uniquifier (or NULL) */
#endif
+ /* The following #defines numerically match the NFSv4 equivalents */
+#define NFS_FH_NOEXPIRE_WITH_OPEN (0x1)
+#define NFS_FH_VOLATILE_ANY (0x2)
+#define NFS_FH_VOL_MIGRATION (0x4)
+#define NFS_FH_VOL_RENAME (0x8)
+#define NFS_FH_RENAME_UNSAFE (NFS_FH_VOLATILE_ANY | NFS_FH_VOL_RENAME)
+ u32 fh_expire_type; /* V4 bitmask representing file
+ handle volatility type for
+ this filesystem */
u32 pnfs_blksize; /* layout_blksize attr */
#if IS_ENABLED(CONFIG_NFS_V4)
u32 attr_bitmask[3];/* V4 bitmask representing the set
@@ -233,9 +242,6 @@ struct nfs_server {
u32 acl_bitmask; /* V4 bitmask representing the ACEs
that are supported on this
filesystem */
- u32 fh_expire_type; /* V4 bitmask representing file
- handle volatility type for
- this filesystem */
struct pnfs_layoutdriver_type *pnfs_curr_ld; /* Active layout driver */
struct rpc_wait_queue roc_rpcwaitq;
void *pnfs_ld_data; /* per mount point data */
diff --git a/kernel/module/Kconfig b/kernel/module/Kconfig
index d7762ef5949a..39278737bb68 100644
--- a/kernel/module/Kconfig
+++ b/kernel/module/Kconfig
@@ -192,6 +192,11 @@ config GENDWARFKSYMS
depends on !DEBUG_INFO_REDUCED && !DEBUG_INFO_SPLIT
# Requires ELF object files.
depends on !LTO
+ # To avoid conflicts with the discarded __gendwarfksyms_ptr symbols on
+ # X86, requires pahole before commit 47dcb534e253 ("btf_encoder: Stop
+ # indexing symbols for VARs") or after commit 9810758003ce ("btf_encoder:
+ # Verify 0 address DWARF variables are in ELF section").
+ depends on !X86 || !DEBUG_INFO_BTF || PAHOLE_VERSION < 128 || PAHOLE_VERSION > 129
help
Calculate symbol versions from DWARF debugging information using
gendwarfksyms. Requires DEBUG_INFO to be enabled.
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c
index 7986145a527c..5a7745170e84 100644
--- a/net/sched/sch_hfsc.c
+++ b/net/sched/sch_hfsc.c
@@ -175,6 +175,11 @@ struct hfsc_sched {
#define HT_INFINITY 0xffffffffffffffffULL /* infinite time value */
+static bool cl_in_el_or_vttree(struct hfsc_class *cl)
+{
+ return ((cl->cl_flags & HFSC_FSC) && cl->cl_nactive) ||
+ ((cl->cl_flags & HFSC_RSC) && !RB_EMPTY_NODE(&cl->el_node));
+}
/*
* eligible tree holds backlogged classes being sorted by their eligible times.
@@ -1040,6 +1045,8 @@ hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid,
if (cl == NULL)
return -ENOBUFS;
+ RB_CLEAR_NODE(&cl->el_node);
+
err = tcf_block_get(&cl->block, &cl->filter_list, sch, extack);
if (err) {
kfree(cl);
@@ -1572,7 +1579,7 @@ hfsc_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free)
sch->qstats.backlog += len;
sch->q.qlen++;
- if (first && !cl->cl_nactive) {
+ if (first && !cl_in_el_or_vttree(cl)) {
if (cl->cl_flags & HFSC_RSC)
init_ed(cl, len);
if (cl->cl_flags & HFSC_FSC)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 9e5c36ad8f52..3f09ceac08ad 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -6811,7 +6811,10 @@ static void alc256_fixup_chromebook(struct hda_codec *codec,
switch (action) {
case HDA_FIXUP_ACT_PRE_PROBE:
- spec->gen.suppress_auto_mute = 1;
+ if (codec->core.subsystem_id == 0x10280d76)
+ spec->gen.suppress_auto_mute = 0;
+ else
+ spec->gen.suppress_auto_mute = 1;
spec->gen.suppress_auto_mic = 1;
spec->en_3kpull_low = false;
break;
Return-Path: <linux-kernel+bounces-673246-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 347C741E003FB
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:10:58 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 2BD3C3A6C34
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:10:36 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 16C3C28F959;
Wed, 4 Jun 2025 13:08:16 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="w/FfYPHH"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 15D8E28F935;
Wed, 4 Jun 2025 13:08:13 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749042495; cv=none; b=upCjdpMH5kK7Reupd3hDgDQMVn51S/ZFvOaOlcJJZYnlD61RnA0S56rfVxeX9FbIuhQa2JD+XwPJF8trlP5gwUSocIAnXuiIRO3CuElLoea/porRCMNNJT09mCiawOfZ7EOcwuEZZ5NJc26w625bIjNXvLl958+cPnstR3QLYac=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749042495; c=relaxed/simple;
bh=UR8I1JXHlwp7wjKuuuJEtkxlyaVUMaHRzGq+2e6KiGQ=;
h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=hRC5sDUp2JA7Z2PlAEM9hzBH6xp5XLlK2iILW4Xhhgsvqj86bBlNthJkV4wd/CflfvFb7gQv244fxaer9H4KlHIi9HLYLvr47mNyOpziw0Big+lKuKrhrztdlk2buX5bEq738y5h9fUqTzcxzu3DAogu7U+T1WtbGwweFXa+rkg=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=w/FfYPHH; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 36D0EC4CEEF;
Wed, 4 Jun 2025 13:08:13 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org;
s=korg; t=1749042493;
bh=UR8I1JXHlwp7wjKuuuJEtkxlyaVUMaHRzGq+2e6KiGQ=;
h=From:To:Cc:Subject:Date:From;
b=w/FfYPHHYWVSrXYZacCXq9qNRGndclMtlgep61STtrVV7mLhzeSiRdR5VSlVNyP2H
1EzSXgY6XWa7MXLvVljnX/e1slQRyekluSbx/K2bQJpeaLZZOmnioTlAPm9q2B+oUF
FHqFNM+VXYixPp4ba7B+N9De5+wuIZ2O8I2zH/90=
From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
To: linux-kernel@xxxxxxxxxxxxxxx,
akpm@xxxxxxxxxxxxxxxxxxxx,
torvalds@xxxxxxxxxxxxxxxxxxxx,
stable@xxxxxxxxxxxxxxx
Cc: lwn@xxxxxxx,
jslaby@xxxxxxx,
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Subject: Linux 6.15.1
Date: Wed, 4 Jun 2025 15:08:09 +0200
Message-ID: <2025060455-steering-surfboard-abe4@gregkh>
X-Mailer: git-send-email 2.49.0
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
I'm announcing the release of the 6.15.1 kernel.
All users of the 6.15 kernel series must upgrade.
The updated 6.15.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-6.15.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2
arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi | 4
arch/arm64/boot/dts/qcom/ipq9574.dtsi | 2
arch/arm64/boot/dts/qcom/sa8775p.dtsi | 248 +-----------
arch/arm64/boot/dts/qcom/sm8350.dtsi | 2
arch/arm64/boot/dts/qcom/sm8450.dtsi | 2
arch/arm64/boot/dts/qcom/sm8550.dtsi | 2
arch/arm64/boot/dts/qcom/sm8650.dtsi | 2
arch/arm64/boot/dts/qcom/x1e001de-devkit.dts | 6
arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts | 4
arch/arm64/boot/dts/qcom/x1e80100-dell-xps13-9345.dts | 2
arch/arm64/boot/dts/qcom/x1e80100-hp-omnibook-x14.dts | 14
arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts | 7
arch/arm64/boot/dts/qcom/x1e80100-qcp.dts | 6
arch/arm64/boot/dts/qcom/x1e80100.dtsi | 309 +++++++--------
arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 40 +
arch/arm64/boot/dts/rockchip/rk3576.dtsi | 2
arch/arm64/boot/dts/ti/k3-am62-main.dtsi | 2
arch/arm64/boot/dts/ti/k3-am62a-main.dtsi | 2
arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi | 2
arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-imx219.dtso | 3
arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-ov5640.dtso | 2
arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-tevi-ov5640.dtso | 2
arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 2
arch/arm64/boot/dts/ti/k3-am68-sk-base-board.dts | 13
arch/arm64/boot/dts/ti/k3-j721e-sk-csi2-dual-imx219.dtso | 35 +
arch/arm64/boot/dts/ti/k3-j721e-sk.dts | 31 +
arch/arm64/boot/dts/ti/k3-j722s-evm.dts | 8
arch/arm64/boot/dts/ti/k3-j722s-main.dtsi | 4
arch/arm64/boot/dts/ti/k3-j784s4-j742s2-main-common.dtsi | 2
drivers/iommu/iommu.c | 34 +
drivers/perf/arm-cmn.c | 11
fs/coredump.c | 65 ++-
fs/pidfs.c | 1
include/linux/coredump.h | 1
include/linux/iommu.h | 2
net/sched/sch_hfsc.c | 9
37 files changed, 446 insertions(+), 439 deletions(-)
Abel Vesa (1):
arm64: dts: qcom: x1e80100: Fix PCIe 3rd controller DBI size
Alok Tiwari (1):
arm64: dts: qcom: sm8350: Fix typo in pil_camera_mem node
Christian Brauner (3):
pidfs: move O_RDWR into pidfs_alloc_file()
coredump: fix error handling for replace_fd()
coredump: hand a pidfd to the usermode coredump helper
Greg Kroah-Hartman (1):
Linux 6.15.1
Johan Hovold (5):
arm64: dts: qcom: x1e001de-devkit: mark l12b and l15b always-on
arm64: dts: qcom: x1e80100-dell-xps13-9345: mark l12b and l15b always-on
arm64: dts: qcom: x1e80100-hp-x14: mark l12b and l15b always-on
arm64: dts: qcom: x1e80100-qcp: mark l12b and l15b always-on
arm64: dts: qcom: x1e80100-yoga-slim7x: mark l12b and l15b always-on
Judith Mendez (4):
arm64: dts: ti: k3-am62-main: Set eMMC clock parent to default
arm64: dts: ti: k3-am62a-main: Set eMMC clock parent to default
arm64: dts: ti: k3-am62p-j722s-common-main: Set eMMC clock parent to default
arm64: dts: ti: k3-am65-main: Add missing taps to sdhci0
Juerg Haefliger (1):
arm64: dts: qcom: x1e80100-hp-omnibook-x14: Enable SMB2360 0 and 1
Karthik Sanagavarapu (1):
arm64: dts: qcom: sa8775p: Remove cdsp compute-cb@10
Ling Xu (1):
arm64: dts: qcom: sa8775p: Remove extra entries from the iommus property
Lukasz Czechowski (1):
arm64: dts: rockchip: fix internal USB hub instability on RK3399 Puma
Niravkumar L Rabara (1):
arm64: dts: socfpga: agilex5: fix gpio0 address
Pedro Tammela (1):
net_sched: hfsc: Address reentrant enqueue adding class to eltree twice
Robin Murphy (5):
perf/arm-cmn: Fix REQ2/SNP2 mixup
perf/arm-cmn: Initialise cmn->cpu earlier
perf/arm-cmn: Add CMN S3 ACPI binding
iommu: Avoid introducing more races
iommu: Handle yet another race around registration
Sebastian Reichel (1):
arm64: dts: rockchip: Add missing SFC power-domains to rk3576
Siddharth Vadapalli (3):
arm64: dts: ti: k3-j722s-evm: Enable "serdes_wiz0" and "serdes_wiz1"
arm64: dts: ti: k3-j722s-main: Disable "serdes_wiz0" and "serdes_wiz1"
arm64: dts: ti: k3-j784s4-j742s2-main-common: Fix length of serdes_ln_ctrl
Stephan Gerhold (13):
arm64: dts: qcom: ipq9574: Add missing properties for cryptobam
arm64: dts: qcom: sa8775p: Add missing properties for cryptobam
arm64: dts: qcom: sm8450: Add missing properties for cryptobam
arm64: dts: qcom: sm8550: Add missing properties for cryptobam
arm64: dts: qcom: sm8650: Add missing properties for cryptobam
arm64: dts: qcom: x1e001de-devkit: Fix vreg_l2j_1p2 voltage
arm64: dts: qcom: x1e80100-asus-vivobook-s15: Fix vreg_l2j_1p2 voltage
arm64: dts: qcom: x1e80100-hp-omnibook-x14: Fix vreg_l2j_1p2 voltage
arm64: dts: qcom: x1e80100-lenovo-yoga-slim7x: Fix vreg_l2j_1p2 voltage
arm64: dts: qcom: x1e80100-qcp: Fix vreg_l2j_1p2 voltage
arm64: dts: qcom: x1e80100: Fix video thermal zone
arm64: dts: qcom: x1e80100: Apply consistent critical thermal shutdown
arm64: dts: qcom: x1e80100: Add GPU cooling
Yemike Abhilash Chandra (7):
arm64: dts: ti: k3-am62x: Remove clock-names property from IMX219 overlay
arm64: dts: ti: k3-am62x: Rename I2C switch to I2C mux in IMX219 overlay
arm64: dts: ti: k3-am62x: Rename I2C switch to I2C mux in OV5640 overlay
arm64: dts: ti: k3-am68-sk: Fix regulator hierarchy
arm64: dts: ti: k3-j721e-sk: Add DT nodes for power regulators
arm64: dts: ti: k3-j721e-sk: Remove clock-names property from IMX219 overlay
arm64: dts: ti: k3-j721e-sk: Add requiried voltage supplies for IMX219
Return-Path: <linux-kernel+bounces-673238-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 905F241E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:10:53 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 63301189A708
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:10:32 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 2191A28FAB7;
Wed, 4 Jun 2025 13:07:47 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="jtvQDxHd"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 100E628FAAA;
Wed, 4 Jun 2025 13:07:20 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749042441; cv=none; b=avktIbIu7rcRufPi7z2p6NXXhXZ093+BLgoyPH67q1F3jOwfcgh9ib4m05stDq4Y/oMQ/7bh+38EFmDDh1/6i9pZsOmFl7ks0ionqj515hOTuhEnMrnO2nOtxKJ4yJ8tt/ZweyOIFhfOtnFzClLoesZGRwZaj3ui6dM4xKXTEUg=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749042441; c=relaxed/simple;
bh=uElf6KYnyw6Y2WJgt1NyJdbBMKJhipcJgxoNi4ztXJ0=;
h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version; b=DOO/7dzrlbl9IU9MRsnp4YbhKiyCjjZIvEPhB0sUzZXgdFM8Wmqm8uLrXowX8KHoO6pyVjgQUZMBzXd8iEoq0xXJeDmbaZnQzZNv1Hz5JXWxuUkeHFbS/yRmBOti9IvUslSM7z1nivIhReFPlLYrypbokGx7nd8rNNOjYl4TqVo=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=jtvQDxHd; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 23C83C4CEE7;
Wed, 4 Jun 2025 13:07:18 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org;
s=korg; t=1749042440;
bh=uElf6KYnyw6Y2WJgt1NyJdbBMKJhipcJgxoNi4ztXJ0=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=jtvQDxHdrpieO9t5QMQAEn2FAsCgF2UqIJbpUbpDdA6RzScsjJo7/k8zxt28P2Qsb
lvRUxXTUCisoyt1QNaZ2M1qr6Jvta68lQwAogIrbP3QsuyQnf3rENMKlHU9MzYvH5M
Osff0XvQCeqhZTOGlvDy9yeE0aCL+9V+bfXubqH0=
From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
To: linux-kernel@xxxxxxxxxxxxxxx,
akpm@xxxxxxxxxxxxxxxxxxxx,
torvalds@xxxxxxxxxxxxxxxxxxxx,
stable@xxxxxxxxxxxxxxx
Cc: lwn@xxxxxxx,
jslaby@xxxxxxx,
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Subject: Re: Linux 6.1.141
Date: Wed, 4 Jun 2025 15:07:10 +0200
Message-ID: <2025060410-ravishing-yiddish-bd79@gregkh>
X-Mailer: git-send-email 2.49.0
In-Reply-To: <2025060410-directory-replace-61df@gregkh>
References: <2025060410-directory-replace-61df@gregkh>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 6938c8cd7a6f..15e40774e9bc 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -5780,6 +5780,8 @@
Selecting 'on' will also enable the mitigation
against user space to user space task attacks.
+ Selecting specific mitigation does not force enable
+ user mitigations.
Selecting 'off' will disable both the kernel and
the user space protections.
diff --git a/Documentation/driver-api/serial/driver.rst b/Documentation/driver-api/serial/driver.rst
index 23c6b956cd90..9436f7c11306 100644
--- a/Documentation/driver-api/serial/driver.rst
+++ b/Documentation/driver-api/serial/driver.rst
@@ -100,4 +100,4 @@ Some helpers are provided in order to set/get modem control lines via GPIO.
.. kernel-doc:: drivers/tty/serial/serial_mctrl_gpio.c
:identifiers: mctrl_gpio_init mctrl_gpio_free mctrl_gpio_to_gpiod
mctrl_gpio_set mctrl_gpio_get mctrl_gpio_enable_ms
- mctrl_gpio_disable_ms
+ mctrl_gpio_disable_ms_sync mctrl_gpio_disable_ms_no_sync
diff --git a/Documentation/hwmon/dell-smm-hwmon.rst b/Documentation/hwmon/dell-smm-hwmon.rst
index d8f1d6859b96..1c12fbba440b 100644
--- a/Documentation/hwmon/dell-smm-hwmon.rst
+++ b/Documentation/hwmon/dell-smm-hwmon.rst
@@ -32,12 +32,12 @@ Temperature sensors and fans can be queried and set via the standard
=============================== ======= =======================================
Name Perm Description
=============================== ======= =======================================
-fan[1-3]_input RO Fan speed in RPM.
-fan[1-3]_label RO Fan label.
-fan[1-3]_min RO Minimal Fan speed in RPM
-fan[1-3]_max RO Maximal Fan speed in RPM
-fan[1-3]_target RO Expected Fan speed in RPM
-pwm[1-3] RW Control the fan PWM duty-cycle.
+fan[1-4]_input RO Fan speed in RPM.
+fan[1-4]_label RO Fan label.
+fan[1-4]_min RO Minimal Fan speed in RPM
+fan[1-4]_max RO Maximal Fan speed in RPM
+fan[1-4]_target RO Expected Fan speed in RPM
+pwm[1-4] RW Control the fan PWM duty-cycle.
pwm1_enable WO Enable or disable automatic BIOS fan
control (not supported on all laptops,
see below for details).
@@ -93,7 +93,7 @@ Again, when you find new codes, we'd be happy to have your patches!
---------------------------
The driver also exports the fans as thermal cooling devices with
-``type`` set to ``dell-smm-fan[1-3]``. This allows for easy fan control
+``type`` set to ``dell-smm-fan[1-4]``. This allows for easy fan control
using one of the thermal governors.
Module parameters
diff --git a/Makefile b/Makefile
index f86e26fa0b31..70969a997a7f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 6
PATCHLEVEL = 1
-SUBLEVEL = 140
+SUBLEVEL = 141
EXTRAVERSION =
NAME = Curry Ramen
@@ -875,6 +875,18 @@ ifdef CONFIG_CC_IS_CLANG
KBUILD_CPPFLAGS += -Qunused-arguments
# The kernel builds with '-std=gnu11' so use of GNU extensions is acceptable.
KBUILD_CFLAGS += -Wno-gnu
+
+# Clang may emit a warning when a const variable, such as the dummy variables
+# in typecheck(), or const member of an aggregate type are not initialized,
+# which can result in unexpected behavior. However, in many audited cases of
+# the "field" variant of the warning, this is intentional because the field is
+# never used within a particular call path, the field is within a union with
+# other non-const members, or the containing object is not const so the field
+# can be modified via memcpy() / memset(). While the variable warning also gets
+# disabled with this same switch, there should not be too much coverage lost
+# because -Wuninitialized will still flag when an uninitialized const variable
+# is used.
+KBUILD_CFLAGS += $(call cc-disable-warning, default-const-init-unsafe)
else
# gcc inanely warns about local variables called 'main'
diff --git a/arch/arm/boot/dts/tegra114.dtsi b/arch/arm/boot/dts/tegra114.dtsi
index 09996acad639..bb23bb39dd5b 100644
--- a/arch/arm/boot/dts/tegra114.dtsi
+++ b/arch/arm/boot/dts/tegra114.dtsi
@@ -139,7 +139,7 @@ dsib: dsi@54400000 {
reg = <0x54400000 0x00040000>;
clocks = <&tegra_car TEGRA114_CLK_DSIB>,
<&tegra_car TEGRA114_CLK_DSIBLP>,
- <&tegra_car TEGRA114_CLK_PLL_D2_OUT0>;
+ <&tegra_car TEGRA114_CLK_PLL_D_OUT0>;
clock-names = "dsi", "lp", "parent";
resets = <&tegra_car 82>;
reset-names = "dsi";
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
index 4d0d0d49a744..77aec670f635 100644
--- a/arch/arm/mach-at91/pm.c
+++ b/arch/arm/mach-at91/pm.c
@@ -537,11 +537,12 @@ extern u32 at91_pm_suspend_in_sram_sz;
static int at91_suspend_finish(unsigned long val)
{
- unsigned char modified_gray_code[] = {
- 0x00, 0x01, 0x02, 0x03, 0x06, 0x07, 0x04, 0x05, 0x0c, 0x0d,
- 0x0e, 0x0f, 0x0a, 0x0b, 0x08, 0x09, 0x18, 0x19, 0x1a, 0x1b,
- 0x1e, 0x1f, 0x1c, 0x1d, 0x14, 0x15, 0x16, 0x17, 0x12, 0x13,
- 0x10, 0x11,
+ /* SYNOPSYS workaround to fix a bug in the calibration logic */
+ unsigned char modified_fix_code[] = {
+ 0x00, 0x01, 0x01, 0x06, 0x07, 0x0c, 0x06, 0x07, 0x0b, 0x18,
+ 0x0a, 0x0b, 0x0c, 0x0d, 0x0d, 0x0a, 0x13, 0x13, 0x12, 0x13,
+ 0x14, 0x15, 0x15, 0x12, 0x18, 0x19, 0x19, 0x1e, 0x1f, 0x14,
+ 0x1e, 0x1f,
};
unsigned int tmp, index;
int i;
@@ -552,25 +553,25 @@ static int at91_suspend_finish(unsigned long val)
* restore the ZQ0SR0 with the value saved here. But the
* calibration is buggy and restoring some values from ZQ0SR0
* is forbidden and risky thus we need to provide processed
- * values for these (modified gray code values).
+ * values for these.
*/
tmp = readl(soc_pm.data.ramc_phy + DDR3PHY_ZQ0SR0);
/* Store pull-down output impedance select. */
index = (tmp >> DDR3PHY_ZQ0SR0_PDO_OFF) & 0x1f;
- soc_pm.bu->ddr_phy_calibration[0] = modified_gray_code[index];
+ soc_pm.bu->ddr_phy_calibration[0] = modified_fix_code[index] << DDR3PHY_ZQ0SR0_PDO_OFF;
/* Store pull-up output impedance select. */
index = (tmp >> DDR3PHY_ZQ0SR0_PUO_OFF) & 0x1f;
- soc_pm.bu->ddr_phy_calibration[0] |= modified_gray_code[index];
+ soc_pm.bu->ddr_phy_calibration[0] |= modified_fix_code[index] << DDR3PHY_ZQ0SR0_PUO_OFF;
/* Store pull-down on-die termination impedance select. */
index = (tmp >> DDR3PHY_ZQ0SR0_PDODT_OFF) & 0x1f;
- soc_pm.bu->ddr_phy_calibration[0] |= modified_gray_code[index];
+ soc_pm.bu->ddr_phy_calibration[0] |= modified_fix_code[index] << DDR3PHY_ZQ0SR0_PDODT_OFF;
/* Store pull-up on-die termination impedance select. */
index = (tmp >> DDR3PHY_ZQ0SRO_PUODT_OFF) & 0x1f;
- soc_pm.bu->ddr_phy_calibration[0] |= modified_gray_code[index];
+ soc_pm.bu->ddr_phy_calibration[0] |= modified_fix_code[index] << DDR3PHY_ZQ0SRO_PUODT_OFF;
/*
* The 1st 8 words of memory might get corrupted in the process
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
index 381d58cea092..c854c7e31051 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
@@ -151,28 +151,12 @@ &pio {
vcc-pg-supply = <®_aldo1>;
};
-&r_ir {
- linux,rc-map-name = "rc-beelink-gs1";
- status = "okay";
-};
-
-&r_pio {
- /*
- * FIXME: We can't add that supply for now since it would
- * create a circular dependency between pinctrl, the regulator
- * and the RSB Bus.
- *
- * vcc-pl-supply = <®_aldo1>;
- */
- vcc-pm-supply = <®_aldo1>;
-};
-
-&r_rsb {
+&r_i2c {
status = "okay";
- axp805: pmic@745 {
+ axp805: pmic@36 {
compatible = "x-powers,axp805", "x-powers,axp806";
- reg = <0x745>;
+ reg = <0x36>;
interrupt-parent = <&r_intc>;
interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_LOW>;
interrupt-controller;
@@ -290,6 +274,22 @@ sw {
};
};
+&r_ir {
+ linux,rc-map-name = "rc-beelink-gs1";
+ status = "okay";
+};
+
+&r_pio {
+ /*
+ * PL0 and PL1 are used for PMIC I2C
+ * don't enable the pl-supply else
+ * it will fail at boot
+ *
+ * vcc-pl-supply = <®_aldo1>;
+ */
+ vcc-pm-supply = <®_aldo1>;
+};
+
&spdif {
pinctrl-names = "default";
pinctrl-0 = <&spdif_tx_pin>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
index 6fc65e8db220..8c476e089185 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
@@ -175,16 +175,12 @@ &pio {
vcc-pg-supply = <®_vcc_wifi_io>;
};
-&r_ir {
- status = "okay";
-};
-
-&r_rsb {
+&r_i2c {
status = "okay";
- axp805: pmic@745 {
+ axp805: pmic@36 {
compatible = "x-powers,axp805", "x-powers,axp806";
- reg = <0x745>;
+ reg = <0x36>;
interrupt-parent = <&r_intc>;
interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_LOW>;
interrupt-controller;
@@ -295,6 +291,10 @@ sw {
};
};
+&r_ir {
+ status = "okay";
+};
+
&rtc {
clocks = <&ext_osc32k>;
};
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
index 92745128fcfe..4ec4996592be 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
@@ -112,20 +112,12 @@ &pio {
vcc-pg-supply = <®_aldo1>;
};
-&r_ir {
- status = "okay";
-};
-
-&r_pio {
- vcc-pm-supply = <®_bldo3>;
-};
-
-&r_rsb {
+&r_i2c {
status = "okay";
- axp805: pmic@745 {
+ axp805: pmic@36 {
compatible = "x-powers,axp805", "x-powers,axp806";
- reg = <0x745>;
+ reg = <0x36>;
interrupt-parent = <&r_intc>;
interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_LOW>;
interrupt-controller;
@@ -240,6 +232,14 @@ sw {
};
};
+&r_ir {
+ status = "okay";
+};
+
+&r_pio {
+ vcc-pm-supply = <®_bldo3>;
+};
+
&rtc {
clocks = <&ext_osc32k>;
};
diff --git a/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi b/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi
index 634373a423ef..481a88d83a65 100644
--- a/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi
@@ -1631,7 +1631,7 @@ vdd_1v8_dis: regulator-vdd-1v8-dis {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
- gpio = <&exp1 14 GPIO_ACTIVE_HIGH>;
+ gpio = <&exp1 9 GPIO_ACTIVE_HIGH>;
enable-active-high;
vin-supply = <&vdd_1v8>;
};
diff --git a/arch/arm64/boot/dts/qcom/sm8350.dtsi b/arch/arm64/boot/dts/qcom/sm8350.dtsi
index 5a4972afc977..75292ec3ee77 100644
--- a/arch/arm64/boot/dts/qcom/sm8350.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8350.dtsi
@@ -421,7 +421,7 @@ cdsp_secure_heap: memory@80c00000 {
no-map;
};
- pil_camera_mem: mmeory@85200000 {
+ pil_camera_mem: memory@85200000 {
reg = <0x0 0x85200000 0x0 0x500000>;
no-map;
};
diff --git a/arch/arm64/include/asm/cputype.h b/arch/arm64/include/asm/cputype.h
index fe022fe2d4f6..41612b03af63 100644
--- a/arch/arm64/include/asm/cputype.h
+++ b/arch/arm64/include/asm/cputype.h
@@ -132,6 +132,7 @@
#define FUJITSU_CPU_PART_A64FX 0x001
#define HISI_CPU_PART_TSV110 0xD01
+#define HISI_CPU_PART_HIP09 0xD02
#define APPLE_CPU_PART_M1_ICESTORM 0x022
#define APPLE_CPU_PART_M1_FIRESTORM 0x023
@@ -201,6 +202,7 @@
#define MIDR_NVIDIA_CARMEL MIDR_CPU_MODEL(ARM_CPU_IMP_NVIDIA, NVIDIA_CPU_PART_CARMEL)
#define MIDR_FUJITSU_A64FX MIDR_CPU_MODEL(ARM_CPU_IMP_FUJITSU, FUJITSU_CPU_PART_A64FX)
#define MIDR_HISI_TSV110 MIDR_CPU_MODEL(ARM_CPU_IMP_HISI, HISI_CPU_PART_TSV110)
+#define MIDR_HISI_HIP09 MIDR_CPU_MODEL(ARM_CPU_IMP_HISI, HISI_CPU_PART_HIP09)
#define MIDR_APPLE_M1_ICESTORM MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_M1_ICESTORM)
#define MIDR_APPLE_M1_FIRESTORM MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_M1_FIRESTORM)
#define MIDR_APPLE_M1_ICESTORM_PRO MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_M1_ICESTORM_PRO)
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
index 1d713cfb0af1..426c3cb3e3bb 100644
--- a/arch/arm64/include/asm/pgtable.h
+++ b/arch/arm64/include/asm/pgtable.h
@@ -677,7 +677,8 @@ static inline unsigned long pmd_page_vaddr(pmd_t pmd)
pr_err("%s:%d: bad pmd %016llx.\n", __FILE__, __LINE__, pmd_val(e))
#define pud_none(pud) (!pud_val(pud))
-#define pud_bad(pud) (!pud_table(pud))
+#define pud_bad(pud) ((pud_val(pud) & PUD_TYPE_MASK) != \
+ PUD_TYPE_TABLE)
#define pud_present(pud) pte_present(pud_pte(pud))
#define pud_leaf(pud) (pud_present(pud) && !pud_table(pud))
#define pud_valid(pud) pte_valid(pud_pte(pud))
diff --git a/arch/arm64/kernel/proton-pack.c b/arch/arm64/kernel/proton-pack.c
index fcc641f30c93..4978c466e325 100644
--- a/arch/arm64/kernel/proton-pack.c
+++ b/arch/arm64/kernel/proton-pack.c
@@ -916,6 +916,7 @@ static u8 spectre_bhb_loop_affected(void)
MIDR_ALL_VERSIONS(MIDR_CORTEX_A77),
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N1),
MIDR_ALL_VERSIONS(MIDR_QCOM_KRYO_4XX_GOLD),
+ MIDR_ALL_VERSIONS(MIDR_HISI_HIP09),
{},
};
static const struct midr_range spectre_bhb_k11_list[] = {
diff --git a/arch/mips/include/asm/ftrace.h b/arch/mips/include/asm/ftrace.h
index db497a8167da..e3212f44446f 100644
--- a/arch/mips/include/asm/ftrace.h
+++ b/arch/mips/include/asm/ftrace.h
@@ -87,4 +87,20 @@ struct dyn_arch_ftrace {
#endif /* CONFIG_DYNAMIC_FTRACE */
#endif /* __ASSEMBLY__ */
#endif /* CONFIG_FUNCTION_TRACER */
+
+#ifdef CONFIG_FTRACE_SYSCALLS
+#ifndef __ASSEMBLY__
+/*
+ * Some syscall entry functions on mips start with "__sys_" (fork and clone,
+ * for instance). We should also match the sys_ variant with those.
+ */
+#define ARCH_HAS_SYSCALL_MATCH_SYM_NAME
+static inline bool arch_syscall_match_sym_name(const char *sym,
+ const char *name)
+{
+ return !strcmp(sym, name) ||
+ (!strncmp(sym, "__sys_", 6) && !strcmp(sym + 6, name + 4));
+}
+#endif /* __ASSEMBLY__ */
+#endif /* CONFIG_FTRACE_SYSCALLS */
#endif /* _ASM_MIPS_FTRACE_H */
diff --git a/arch/mips/kernel/pm-cps.c b/arch/mips/kernel/pm-cps.c
index 9bf60d7d44d3..a7bcf2b814c8 100644
--- a/arch/mips/kernel/pm-cps.c
+++ b/arch/mips/kernel/pm-cps.c
@@ -56,10 +56,7 @@ static DEFINE_PER_CPU_ALIGNED(u32*, ready_count);
/* Indicates online CPUs coupled with the current CPU */
static DEFINE_PER_CPU_ALIGNED(cpumask_t, online_coupled);
-/*
- * Used to synchronize entry to deep idle states. Actually per-core rather
- * than per-CPU.
- */
+/* Used to synchronize entry to deep idle states */
static DEFINE_PER_CPU_ALIGNED(atomic_t, pm_barrier);
/* Saved CPU state across the CPS_PM_POWER_GATED state */
@@ -118,9 +115,10 @@ int cps_pm_enter_state(enum cps_pm_state state)
cps_nc_entry_fn entry;
struct core_boot_config *core_cfg;
struct vpe_boot_config *vpe_cfg;
+ atomic_t *barrier;
/* Check that there is an entry function for this state */
- entry = per_cpu(nc_asm_enter, core)[state];
+ entry = per_cpu(nc_asm_enter, cpu)[state];
if (!entry)
return -EINVAL;
@@ -156,7 +154,7 @@ int cps_pm_enter_state(enum cps_pm_state state)
smp_mb__after_atomic();
/* Create a non-coherent mapping of the core ready_count */
- core_ready_count = per_cpu(ready_count, core);
+ core_ready_count = per_cpu(ready_count, cpu);
nc_addr = kmap_noncoherent(virt_to_page(core_ready_count),
(unsigned long)core_ready_count);
nc_addr += ((unsigned long)core_ready_count & ~PAGE_MASK);
@@ -164,7 +162,8 @@ int cps_pm_enter_state(enum cps_pm_state state)
/* Ensure ready_count is zero-initialised before the assembly runs */
WRITE_ONCE(*nc_core_ready_count, 0);
- coupled_barrier(&per_cpu(pm_barrier, core), online);
+ barrier = &per_cpu(pm_barrier, cpumask_first(&cpu_sibling_map[cpu]));
+ coupled_barrier(barrier, online);
/* Run the generated entry code */
left = entry(online, nc_core_ready_count);
@@ -635,12 +634,14 @@ static void *cps_gen_entry_code(unsigned cpu, enum cps_pm_state state)
static int cps_pm_online_cpu(unsigned int cpu)
{
- enum cps_pm_state state;
- unsigned core = cpu_core(&cpu_data[cpu]);
+ unsigned int sibling, core;
void *entry_fn, *core_rc;
+ enum cps_pm_state state;
+
+ core = cpu_core(&cpu_data[cpu]);
for (state = CPS_PM_NC_WAIT; state < CPS_PM_STATE_COUNT; state++) {
- if (per_cpu(nc_asm_enter, core)[state])
+ if (per_cpu(nc_asm_enter, cpu)[state])
continue;
if (!test_bit(state, state_support))
continue;
@@ -652,16 +653,19 @@ static int cps_pm_online_cpu(unsigned int cpu)
clear_bit(state, state_support);
}
- per_cpu(nc_asm_enter, core)[state] = entry_fn;
+ for_each_cpu(sibling, &cpu_sibling_map[cpu])
+ per_cpu(nc_asm_enter, sibling)[state] = entry_fn;
}
- if (!per_cpu(ready_count, core)) {
+ if (!per_cpu(ready_count, cpu)) {
core_rc = kmalloc(sizeof(u32), GFP_KERNEL);
if (!core_rc) {
pr_err("Failed allocate core %u ready_count\n", core);
return -ENOMEM;
}
- per_cpu(ready_count, core) = core_rc;
+
+ for_each_cpu(sibling, &cpu_sibling_map[cpu])
+ per_cpu(ready_count, sibling) = core_rc;
}
return 0;
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index a6090896f749..ac669e58e202 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -2974,11 +2974,11 @@ static void __init fixup_device_tree_pmac(void)
char type[8];
phandle node;
- // Some pmacs are missing #size-cells on escc nodes
+ // Some pmacs are missing #size-cells on escc or i2s nodes
for (node = 0; prom_next_node(&node); ) {
type[0] = '\0';
prom_getprop(node, "device_type", type, sizeof(type));
- if (prom_strcmp(type, "escc"))
+ if (prom_strcmp(type, "escc") && prom_strcmp(type, "i2s"))
continue;
if (prom_getproplen(node, "#size-cells") != PROM_ERROR)
diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c
index e3c31c771ce9..470d7715ecf4 100644
--- a/arch/powerpc/perf/core-book3s.c
+++ b/arch/powerpc/perf/core-book3s.c
@@ -2229,6 +2229,10 @@ static struct pmu power_pmu = {
#define PERF_SAMPLE_ADDR_TYPE (PERF_SAMPLE_ADDR | \
PERF_SAMPLE_PHYS_ADDR | \
PERF_SAMPLE_DATA_PAGE_SIZE)
+
+#define SIER_TYPE_SHIFT 15
+#define SIER_TYPE_MASK (0x7ull << SIER_TYPE_SHIFT)
+
/*
* A counter has overflowed; update its count and record
* things if requested. Note that interrupts are hard-disabled
@@ -2297,6 +2301,22 @@ static void record_and_restart(struct perf_event *event, unsigned long val,
is_kernel_addr(mfspr(SPRN_SIAR)))
record = 0;
+ /*
+ * SIER[46-48] presents instruction type of the sampled instruction.
+ * In ISA v3.0 and before values "0" and "7" are considered reserved.
+ * In ISA v3.1, value "7" has been used to indicate "larx/stcx".
+ * Drop the sample if "type" has reserved values for this field with a
+ * ISA version check.
+ */
+ if (event->attr.sample_type & PERF_SAMPLE_DATA_SRC &&
+ ppmu->get_mem_data_src) {
+ val = (regs->dar & SIER_TYPE_MASK) >> SIER_TYPE_SHIFT;
+ if (val == 0 || (val == 7 && !cpu_has_feature(CPU_FTR_ARCH_31))) {
+ record = 0;
+ atomic64_inc(&event->lost_samples);
+ }
+ }
+
/*
* Finally record data if requested.
*/
diff --git a/arch/powerpc/perf/isa207-common.c b/arch/powerpc/perf/isa207-common.c
index 56301b2bc8ae..031a2b63c171 100644
--- a/arch/powerpc/perf/isa207-common.c
+++ b/arch/powerpc/perf/isa207-common.c
@@ -321,8 +321,10 @@ void isa207_get_mem_data_src(union perf_mem_data_src *dsrc, u32 flags,
sier = mfspr(SPRN_SIER);
val = (sier & ISA207_SIER_TYPE_MASK) >> ISA207_SIER_TYPE_SHIFT;
- if (val != 1 && val != 2 && !(val == 7 && cpu_has_feature(CPU_FTR_ARCH_31)))
+ if (val != 1 && val != 2 && !(val == 7 && cpu_has_feature(CPU_FTR_ARCH_31))) {
+ dsrc->val = 0;
return;
+ }
idx = (sier & ISA207_SIER_LDST_MASK) >> ISA207_SIER_LDST_SHIFT;
sub_idx = (sier & ISA207_SIER_DATA_SRC_MASK) >> ISA207_SIER_DATA_SRC_SHIFT;
diff --git a/arch/um/Makefile b/arch/um/Makefile
index 778c50f27399..25d0501549f5 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -155,5 +155,6 @@ MRPROPER_FILES += $(HOST_DIR)/include/generated
archclean:
@find . \( -name '*.bb' -o -name '*.bbg' -o -name '*.da' \
-o -name '*.gcov' \) -type f -print | xargs rm -f
+ $(Q)$(MAKE) -f $(srctree)/Makefile ARCH=$(HEADER_ARCH) clean
export HEADER_ARCH SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS DEV_NULL_PATH
diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c
index 38d5a71a579b..f6c766b2bdf5 100644
--- a/arch/um/kernel/mem.c
+++ b/arch/um/kernel/mem.c
@@ -68,6 +68,7 @@ void __init mem_init(void)
map_memory(brk_end, __pa(brk_end), uml_reserved - brk_end, 1, 1, 0);
memblock_free((void *)brk_end, uml_reserved - brk_end);
uml_reserved = brk_end;
+ min_low_pfn = PFN_UP(__pa(uml_reserved));
/* this will put all low memory onto the freelists */
memblock_free_all();
diff --git a/arch/x86/boot/genimage.sh b/arch/x86/boot/genimage.sh
index c9299aeb7333..3882ead513f7 100644
--- a/arch/x86/boot/genimage.sh
+++ b/arch/x86/boot/genimage.sh
@@ -22,6 +22,7 @@
# This script requires:
# bash
# syslinux
+# genisoimage
# mtools (for fdimage* and hdimage)
# edk2/OVMF (for hdimage)
#
@@ -251,7 +252,9 @@ geniso() {
cp "$isolinux" "$ldlinux" "$tmp_dir"
cp "$FBZIMAGE" "$tmp_dir"/linux
echo default linux "$KCMDLINE" > "$tmp_dir"/isolinux.cfg
- cp "${FDINITRDS[@]}" "$tmp_dir"/
+ if [ ${#FDINITRDS[@]} -gt 0 ]; then
+ cp "${FDINITRDS[@]}" "$tmp_dir"/
+ fi
genisoimage -J -r -appid 'LINUX_BOOT' -input-charset=utf-8 \
-quiet -o "$FIMAGE" -b isolinux.bin \
-c boot.cat -no-emul-boot -boot-load-size 4 \
diff --git a/arch/x86/events/amd/ibs.c b/arch/x86/events/amd/ibs.c
index 37cbbc5c659a..8c385e231e07 100644
--- a/arch/x86/events/amd/ibs.c
+++ b/arch/x86/events/amd/ibs.c
@@ -1216,7 +1216,8 @@ static __init int perf_ibs_op_init(void)
if (ibs_caps & IBS_CAPS_OPCNTEXT) {
perf_ibs_op.max_period |= IBS_OP_MAX_CNT_EXT_MASK;
perf_ibs_op.config_mask |= IBS_OP_MAX_CNT_EXT_MASK;
- perf_ibs_op.cnt_mask |= IBS_OP_MAX_CNT_EXT_MASK;
+ perf_ibs_op.cnt_mask |= (IBS_OP_MAX_CNT_EXT_MASK |
+ IBS_OP_CUR_CNT_EXT_MASK);
}
if (ibs_caps & IBS_CAPS_ZEN4)
diff --git a/arch/x86/include/asm/nmi.h b/arch/x86/include/asm/nmi.h
index 5c5f1e56c404..6f3d145670a9 100644
--- a/arch/x86/include/asm/nmi.h
+++ b/arch/x86/include/asm/nmi.h
@@ -59,6 +59,8 @@ int __register_nmi_handler(unsigned int, struct nmiaction *);
void unregister_nmi_handler(unsigned int, const char *);
+void set_emergency_nmi_handler(unsigned int type, nmi_handler_t handler);
+
void stop_nmi(void);
void restart_nmi(void);
void local_touch_nmi(void);
diff --git a/arch/x86/include/asm/perf_event.h b/arch/x86/include/asm/perf_event.h
index 4d810b9478a4..fa3576ef19da 100644
--- a/arch/x86/include/asm/perf_event.h
+++ b/arch/x86/include/asm/perf_event.h
@@ -456,6 +456,7 @@ struct pebs_xmm {
*/
#define IBS_OP_CUR_CNT (0xFFF80ULL<<32)
#define IBS_OP_CUR_CNT_RAND (0x0007FULL<<32)
+#define IBS_OP_CUR_CNT_EXT_MASK (0x7FULL<<52)
#define IBS_OP_CNT_CTL (1ULL<<19)
#define IBS_OP_VAL (1ULL<<18)
#define IBS_OP_ENABLE (1ULL<<17)
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index 766cee7fa905..7233474c798f 100644
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -1382,9 +1382,13 @@ static __ro_after_init enum spectre_v2_mitigation_cmd spectre_v2_cmd;
static enum spectre_v2_user_cmd __init
spectre_v2_parse_user_cmdline(void)
{
+ enum spectre_v2_user_cmd mode;
char arg[20];
int ret, i;
+ mode = IS_ENABLED(CONFIG_MITIGATION_SPECTRE_V2) ?
+ SPECTRE_V2_USER_CMD_AUTO : SPECTRE_V2_USER_CMD_NONE;
+
switch (spectre_v2_cmd) {
case SPECTRE_V2_CMD_NONE:
return SPECTRE_V2_USER_CMD_NONE;
@@ -1397,7 +1401,7 @@ spectre_v2_parse_user_cmdline(void)
ret = cmdline_find_option(boot_command_line, "spectre_v2_user",
arg, sizeof(arg));
if (ret < 0)
- return SPECTRE_V2_USER_CMD_AUTO;
+ return mode;
for (i = 0; i < ARRAY_SIZE(v2_user_options); i++) {
if (match_option(arg, ret, v2_user_options[i].option)) {
@@ -1407,8 +1411,8 @@ spectre_v2_parse_user_cmdline(void)
}
}
- pr_err("Unknown user space protection option (%s). Switching to AUTO select\n", arg);
- return SPECTRE_V2_USER_CMD_AUTO;
+ pr_err("Unknown user space protection option (%s). Switching to default\n", arg);
+ return mode;
}
static inline bool spectre_v2_in_eibrs_mode(enum spectre_v2_mitigation mode)
diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c
index ed6cce6c3950..b9a128546970 100644
--- a/arch/x86/kernel/nmi.c
+++ b/arch/x86/kernel/nmi.c
@@ -38,8 +38,12 @@
#define CREATE_TRACE_POINTS
#include <trace/events/nmi.h>
+/*
+ * An emergency handler can be set in any context including NMI
+ */
struct nmi_desc {
raw_spinlock_t lock;
+ nmi_handler_t emerg_handler;
struct list_head head;
};
@@ -121,9 +125,22 @@ static void nmi_check_duration(struct nmiaction *action, u64 duration)
static int nmi_handle(unsigned int type, struct pt_regs *regs)
{
struct nmi_desc *desc = nmi_to_desc(type);
+ nmi_handler_t ehandler;
struct nmiaction *a;
int handled=0;
+ /*
+ * Call the emergency handler, if set
+ *
+ * In the case of crash_nmi_callback() emergency handler, it will
+ * return in the case of the crashing CPU to enable it to complete
+ * other necessary crashing actions ASAP. Other handlers in the
+ * linked list won't need to be run.
+ */
+ ehandler = desc->emerg_handler;
+ if (ehandler)
+ return ehandler(type, regs);
+
rcu_read_lock();
/*
@@ -213,6 +230,31 @@ void unregister_nmi_handler(unsigned int type, const char *name)
}
EXPORT_SYMBOL_GPL(unregister_nmi_handler);
+/**
+ * set_emergency_nmi_handler - Set emergency handler
+ * @type: NMI type
+ * @handler: the emergency handler to be stored
+ *
+ * Set an emergency NMI handler which, if set, will preempt all the other
+ * handlers in the linked list. If a NULL handler is passed in, it will clear
+ * it. It is expected that concurrent calls to this function will not happen
+ * or the system is screwed beyond repair.
+ */
+void set_emergency_nmi_handler(unsigned int type, nmi_handler_t handler)
+{
+ struct nmi_desc *desc = nmi_to_desc(type);
+
+ if (WARN_ON_ONCE(desc->emerg_handler == handler))
+ return;
+ desc->emerg_handler = handler;
+
+ /*
+ * Ensure the emergency handler is visible to other CPUs before
+ * function return
+ */
+ smp_wmb();
+}
+
static void
pci_serr_error(unsigned char reason, struct pt_regs *regs)
{
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index 299b970e5f82..d9dbcd1cf75f 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -896,15 +896,11 @@ void nmi_shootdown_cpus(nmi_shootdown_cb callback)
shootdown_callback = callback;
atomic_set(&waiting_for_crash_ipi, num_online_cpus() - 1);
- /* Would it be better to replace the trap vector here? */
- if (register_nmi_handler(NMI_LOCAL, crash_nmi_callback,
- NMI_FLAG_FIRST, "crash"))
- return; /* Return what? */
+
/*
- * Ensure the new callback function is set before sending
- * out the NMI
+ * Set emergency handler to preempt other handlers.
*/
- wmb();
+ set_emergency_nmi_handler(NMI_LOCAL, crash_nmi_callback);
apic_send_IPI_allbutself(NMI_VECTOR);
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
index ab697ee64528..446bf7fbc325 100644
--- a/arch/x86/mm/init.c
+++ b/arch/x86/mm/init.c
@@ -654,8 +654,13 @@ static void __init memory_map_top_down(unsigned long map_start,
*/
addr = memblock_phys_alloc_range(PMD_SIZE, PMD_SIZE, map_start,
map_end);
- memblock_phys_free(addr, PMD_SIZE);
- real_end = addr + PMD_SIZE;
+ if (!addr) {
+ pr_warn("Failed to release memory for alloc_low_pages()");
+ real_end = max(map_start, ALIGN_DOWN(map_end, PMD_SIZE));
+ } else {
+ memblock_phys_free(addr, PMD_SIZE);
+ real_end = addr + PMD_SIZE;
+ }
/* step_size need to be small so pgt_buf from BRK could cover it */
step_size = PMD_SIZE;
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index 851711509d38..9d75b89fa257 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -959,9 +959,18 @@ int add_pages(int nid, unsigned long start_pfn, unsigned long nr_pages,
ret = __add_pages(nid, start_pfn, nr_pages, params);
WARN_ON_ONCE(ret);
- /* update max_pfn, max_low_pfn and high_memory */
- update_end_of_memory_vars(start_pfn << PAGE_SHIFT,
- nr_pages << PAGE_SHIFT);
+ /*
+ * Special case: add_pages() is called by memremap_pages() for adding device
+ * private pages. Do not bump up max_pfn in the device private path,
+ * because max_pfn changes affect dma_addressing_limited().
+ *
+ * dma_addressing_limited() returning true when max_pfn is the device's
+ * addressable memory can force device drivers to use bounce buffers
+ * and impact their performance negatively:
+ */
+ if (!params->pgmap)
+ /* update max_pfn, max_low_pfn and high_memory */
+ update_end_of_memory_vars(start_pfn << PAGE_SHIFT, nr_pages << PAGE_SHIFT);
return ret;
}
diff --git a/arch/x86/mm/kaslr.c b/arch/x86/mm/kaslr.c
index 230f1dee4f09..e0b0ec0f8245 100644
--- a/arch/x86/mm/kaslr.c
+++ b/arch/x86/mm/kaslr.c
@@ -109,8 +109,14 @@ void __init kernel_randomize_memory(void)
memory_tb = DIV_ROUND_UP(max_pfn << PAGE_SHIFT, 1UL << TB_SHIFT) +
CONFIG_RANDOMIZE_MEMORY_PHYSICAL_PADDING;
- /* Adapt physical memory region size based on available memory */
- if (memory_tb < kaslr_regions[0].size_tb)
+ /*
+ * Adapt physical memory region size based on available memory,
+ * except when CONFIG_PCI_P2PDMA is enabled. P2PDMA exposes the
+ * device BAR space assuming the direct map space is large enough
+ * for creating a ZONE_DEVICE mapping in the direct map corresponding
+ * to the physical BAR address.
+ */
+ if (!IS_ENABLED(CONFIG_PCI_P2PDMA) && (memory_tb < kaslr_regions[0].size_tb))
kaslr_regions[0].size_tb = memory_tb;
/*
diff --git a/arch/x86/um/os-Linux/mcontext.c b/arch/x86/um/os-Linux/mcontext.c
index 49c3744cac37..81b9d1f9f4e6 100644
--- a/arch/x86/um/os-Linux/mcontext.c
+++ b/arch/x86/um/os-Linux/mcontext.c
@@ -26,7 +26,6 @@ void get_regs_from_mc(struct uml_pt_regs *regs, mcontext_t *mc)
COPY(RIP);
COPY2(EFLAGS, EFL);
COPY2(CS, CSGSFS);
- regs->gp[CS / sizeof(unsigned long)] &= 0xffff;
- regs->gp[CS / sizeof(unsigned long)] |= 3;
+ regs->gp[SS / sizeof(unsigned long)] = mc->gregs[REG_CSGSFS] >> 48;
#endif
}
diff --git a/crypto/algif_hash.c b/crypto/algif_hash.c
index 1d017ec5c63c..84f4e9c2b5d9 100644
--- a/crypto/algif_hash.c
+++ b/crypto/algif_hash.c
@@ -263,10 +263,6 @@ static int hash_accept(struct socket *sock, struct socket *newsock, int flags,
return err;
err = crypto_ahash_import(&ctx2->req, state);
- if (err) {
- sock_orphan(sk2);
- sock_put(sk2);
- }
return err;
}
diff --git a/crypto/lzo-rle.c b/crypto/lzo-rle.c
index 0631d975bfac..0abc2d87f042 100644
--- a/crypto/lzo-rle.c
+++ b/crypto/lzo-rle.c
@@ -55,7 +55,7 @@ static int __lzorle_compress(const u8 *src, unsigned int slen,
size_t tmp_len = *dlen; /* size_t(ulong) <-> uint on 64 bit */
int err;
- err = lzorle1x_1_compress(src, slen, dst, &tmp_len, ctx);
+ err = lzorle1x_1_compress_safe(src, slen, dst, &tmp_len, ctx);
if (err != LZO_E_OK)
return -EINVAL;
diff --git a/crypto/lzo.c b/crypto/lzo.c
index ebda132dd22b..8338851c7406 100644
--- a/crypto/lzo.c
+++ b/crypto/lzo.c
@@ -55,7 +55,7 @@ static int __lzo_compress(const u8 *src, unsigned int slen,
size_t tmp_len = *dlen; /* size_t(ulong) <-> uint on 64 bit */
int err;
- err = lzo1x_1_compress(src, slen, dst, &tmp_len, ctx);
+ err = lzo1x_1_compress_safe(src, slen, dst, &tmp_len, ctx);
if (err != LZO_E_OK)
return -EINVAL;
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index 473241b5193f..596e96d3b3bd 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -438,7 +438,7 @@ config ACPI_SBS
the modules will be called sbs and sbshc.
config ACPI_HED
- tristate "Hardware Error Device"
+ bool "Hardware Error Device"
help
This driver supports the Hardware Error Device (PNP0C33),
which is used to report some hardware errors notified via
diff --git a/drivers/acpi/hed.c b/drivers/acpi/hed.c
index 60a2939cde6c..e8e9b1ac06b8 100644
--- a/drivers/acpi/hed.c
+++ b/drivers/acpi/hed.c
@@ -72,7 +72,12 @@ static struct acpi_driver acpi_hed_driver = {
.notify = acpi_hed_notify,
},
};
-module_acpi_driver(acpi_hed_driver);
+
+static int __init acpi_hed_driver_init(void)
+{
+ return acpi_bus_register_driver(&acpi_hed_driver);
+}
+subsys_initcall(acpi_hed_driver_init);
MODULE_AUTHOR("Huang Ying");
MODULE_DESCRIPTION("ACPI Hardware Error Device Driver");
diff --git a/drivers/auxdisplay/charlcd.c b/drivers/auxdisplay/charlcd.c
index 6d309e4971b6..e243291a7e77 100644
--- a/drivers/auxdisplay/charlcd.c
+++ b/drivers/auxdisplay/charlcd.c
@@ -594,18 +594,19 @@ static int charlcd_init(struct charlcd *lcd)
return 0;
}
-struct charlcd *charlcd_alloc(void)
+struct charlcd *charlcd_alloc(unsigned int drvdata_size)
{
struct charlcd_priv *priv;
struct charlcd *lcd;
- priv = kzalloc(sizeof(*priv), GFP_KERNEL);
+ priv = kzalloc(sizeof(*priv) + drvdata_size, GFP_KERNEL);
if (!priv)
return NULL;
priv->esc_seq.len = -1;
lcd = &priv->lcd;
+ lcd->drvdata = priv->drvdata;
return lcd;
}
diff --git a/drivers/auxdisplay/charlcd.h b/drivers/auxdisplay/charlcd.h
index eed80063a6d2..4bbf106b2dd8 100644
--- a/drivers/auxdisplay/charlcd.h
+++ b/drivers/auxdisplay/charlcd.h
@@ -49,7 +49,7 @@ struct charlcd {
unsigned long y;
} addr;
- void *drvdata;
+ void *drvdata; /* Set by charlcd_alloc() */
};
/**
@@ -93,7 +93,8 @@ struct charlcd_ops {
};
void charlcd_backlight(struct charlcd *lcd, enum charlcd_onoff on);
-struct charlcd *charlcd_alloc(void);
+
+struct charlcd *charlcd_alloc(unsigned int drvdata_size);
void charlcd_free(struct charlcd *lcd);
int charlcd_register(struct charlcd *lcd);
diff --git a/drivers/auxdisplay/hd44780.c b/drivers/auxdisplay/hd44780.c
index 8b690f59df27..ebaf0ff518f4 100644
--- a/drivers/auxdisplay/hd44780.c
+++ b/drivers/auxdisplay/hd44780.c
@@ -226,7 +226,7 @@ static int hd44780_probe(struct platform_device *pdev)
if (!hdc)
return -ENOMEM;
- lcd = charlcd_alloc();
+ lcd = charlcd_alloc(0);
if (!lcd)
goto fail1;
diff --git a/drivers/auxdisplay/lcd2s.c b/drivers/auxdisplay/lcd2s.c
index 135831a16514..2b597f226c0c 100644
--- a/drivers/auxdisplay/lcd2s.c
+++ b/drivers/auxdisplay/lcd2s.c
@@ -307,7 +307,7 @@ static int lcd2s_i2c_probe(struct i2c_client *i2c)
if (err < 0)
return err;
- lcd = charlcd_alloc();
+ lcd = charlcd_alloc(0);
if (!lcd)
return -ENOMEM;
diff --git a/drivers/auxdisplay/panel.c b/drivers/auxdisplay/panel.c
index eba04c0de7eb..0f3999b665e7 100644
--- a/drivers/auxdisplay/panel.c
+++ b/drivers/auxdisplay/panel.c
@@ -835,7 +835,7 @@ static void lcd_init(void)
if (!hdc)
return;
- charlcd = charlcd_alloc();
+ charlcd = charlcd_alloc(0);
if (!charlcd) {
kfree(hdc);
return;
diff --git a/drivers/clk/imx/clk-imx8mp.c b/drivers/clk/imx/clk-imx8mp.c
index 444dfd6adfe6..a74b73cd243e 100644
--- a/drivers/clk/imx/clk-imx8mp.c
+++ b/drivers/clk/imx/clk-imx8mp.c
@@ -8,6 +8,7 @@
#include <linux/err.h>
#include <linux/io.h>
#include <linux/module.h>
+#include <linux/units.h>
#include <linux/of_address.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
@@ -405,11 +406,151 @@ static const char * const imx8mp_clkout_sels[] = {"audio_pll1_out", "audio_pll2_
static struct clk_hw **hws;
static struct clk_hw_onecell_data *clk_hw_data;
+struct imx8mp_clock_constraints {
+ unsigned int clkid;
+ u32 maxrate;
+};
+
+/*
+ * Below tables are taken from IMX8MPCEC Rev. 2.1, 07/2023
+ * Table 13. Maximum frequency of modules.
+ * Probable typos fixed are marked with a comment.
+ */
+static const struct imx8mp_clock_constraints imx8mp_clock_common_constraints[] = {
+ { IMX8MP_CLK_A53_DIV, 1000 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ENET_AXI, 266666667 }, /* Datasheet claims 266MHz */
+ { IMX8MP_CLK_NAND_USDHC_BUS, 266666667 }, /* Datasheet claims 266MHz */
+ { IMX8MP_CLK_MEDIA_APB, 200 * HZ_PER_MHZ },
+ { IMX8MP_CLK_HDMI_APB, 133333333 }, /* Datasheet claims 133MHz */
+ { IMX8MP_CLK_ML_AXI, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_AHB, 133333333 },
+ { IMX8MP_CLK_IPG_ROOT, 66666667 },
+ { IMX8MP_CLK_AUDIO_AHB, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_DISP2_PIX, 170 * HZ_PER_MHZ },
+ { IMX8MP_CLK_DRAM_ALT, 666666667 },
+ { IMX8MP_CLK_DRAM_APB, 200 * HZ_PER_MHZ },
+ { IMX8MP_CLK_CAN1, 80 * HZ_PER_MHZ },
+ { IMX8MP_CLK_CAN2, 80 * HZ_PER_MHZ },
+ { IMX8MP_CLK_PCIE_AUX, 10 * HZ_PER_MHZ },
+ { IMX8MP_CLK_I2C5, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_I2C6, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_SAI1, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_SAI2, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_SAI3, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_SAI5, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_SAI6, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_ENET_QOS, 125 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ENET_QOS_TIMER, 200 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ENET_REF, 125 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ENET_TIMER, 125 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ENET_PHY_REF, 125 * HZ_PER_MHZ },
+ { IMX8MP_CLK_NAND, 500 * HZ_PER_MHZ },
+ { IMX8MP_CLK_QSPI, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_USDHC1, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_USDHC2, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_I2C1, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_I2C2, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_I2C3, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_I2C4, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_UART1, 80 * HZ_PER_MHZ },
+ { IMX8MP_CLK_UART2, 80 * HZ_PER_MHZ },
+ { IMX8MP_CLK_UART3, 80 * HZ_PER_MHZ },
+ { IMX8MP_CLK_UART4, 80 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ECSPI1, 80 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ECSPI2, 80 * HZ_PER_MHZ },
+ { IMX8MP_CLK_PWM1, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_PWM2, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_PWM3, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_PWM4, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_GPT1, 100 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPT2, 100 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPT3, 100 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPT4, 100 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPT5, 100 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPT6, 100 * HZ_PER_MHZ },
+ { IMX8MP_CLK_WDOG, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_IPP_DO_CLKO1, 200 * HZ_PER_MHZ },
+ { IMX8MP_CLK_IPP_DO_CLKO2, 200 * HZ_PER_MHZ },
+ { IMX8MP_CLK_HDMI_REF_266M, 266 * HZ_PER_MHZ },
+ { IMX8MP_CLK_USDHC3, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_MIPI_PHY1_REF, 300 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_DISP1_PIX, 250 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_CAM2_PIX, 277 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_LDB, 595 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_MIPI_TEST_BYTE, 200 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ECSPI3, 80 * HZ_PER_MHZ },
+ { IMX8MP_CLK_PDM, 200 * HZ_PER_MHZ },
+ { IMX8MP_CLK_SAI7, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_MAIN_AXI, 400 * HZ_PER_MHZ },
+ { /* Sentinel */ }
+};
+
+static const struct imx8mp_clock_constraints imx8mp_clock_nominal_constraints[] = {
+ { IMX8MP_CLK_M7_CORE, 600 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ML_CORE, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPU3D_CORE, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPU3D_SHADER_CORE, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPU2D_CORE, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_AUDIO_AXI_SRC, 600 * HZ_PER_MHZ },
+ { IMX8MP_CLK_HSIO_AXI, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_ISP, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_VPU_BUS, 600 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_AXI, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_HDMI_AXI, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPU_AXI, 600 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPU_AHB, 300 * HZ_PER_MHZ },
+ { IMX8MP_CLK_NOC, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_NOC_IO, 600 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ML_AHB, 300 * HZ_PER_MHZ },
+ { IMX8MP_CLK_VPU_G1, 600 * HZ_PER_MHZ },
+ { IMX8MP_CLK_VPU_G2, 500 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_CAM1_PIX, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_VPU_VC8000E, 400 * HZ_PER_MHZ }, /* Datasheet claims 500MHz */
+ { IMX8MP_CLK_DRAM_CORE, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GIC, 400 * HZ_PER_MHZ },
+ { /* Sentinel */ }
+};
+
+static const struct imx8mp_clock_constraints imx8mp_clock_overdrive_constraints[] = {
+ { IMX8MP_CLK_M7_CORE, 800 * HZ_PER_MHZ},
+ { IMX8MP_CLK_ML_CORE, 1000 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPU3D_CORE, 1000 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPU3D_SHADER_CORE, 1000 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPU2D_CORE, 1000 * HZ_PER_MHZ },
+ { IMX8MP_CLK_AUDIO_AXI_SRC, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_HSIO_AXI, 500 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_ISP, 500 * HZ_PER_MHZ },
+ { IMX8MP_CLK_VPU_BUS, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_AXI, 500 * HZ_PER_MHZ },
+ { IMX8MP_CLK_HDMI_AXI, 500 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPU_AXI, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPU_AHB, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_NOC, 1000 * HZ_PER_MHZ },
+ { IMX8MP_CLK_NOC_IO, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ML_AHB, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_VPU_G1, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_VPU_G2, 700 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_CAM1_PIX, 500 * HZ_PER_MHZ },
+ { IMX8MP_CLK_VPU_VC8000E, 500 * HZ_PER_MHZ }, /* Datasheet claims 400MHz */
+ { IMX8MP_CLK_DRAM_CORE, 1000 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GIC, 500 * HZ_PER_MHZ },
+ { /* Sentinel */ }
+};
+
+static void imx8mp_clocks_apply_constraints(const struct imx8mp_clock_constraints constraints[])
+{
+ const struct imx8mp_clock_constraints *constr;
+
+ for (constr = constraints; constr->clkid; constr++)
+ clk_hw_set_rate_range(hws[constr->clkid], 0, constr->maxrate);
+}
+
static int imx8mp_clocks_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct device_node *np;
void __iomem *anatop_base, *ccm_base;
+ const char *opmode;
int err;
np = of_find_compatible_node(NULL, NULL, "fsl,imx8mp-anatop");
@@ -704,6 +845,16 @@ static int imx8mp_clocks_probe(struct platform_device *pdev)
imx_check_clk_hws(hws, IMX8MP_CLK_END);
+ imx8mp_clocks_apply_constraints(imx8mp_clock_common_constraints);
+
+ err = of_property_read_string(np, "fsl,operating-mode", &opmode);
+ if (!err) {
+ if (!strcmp(opmode, "nominal"))
+ imx8mp_clocks_apply_constraints(imx8mp_clock_nominal_constraints);
+ else if (!strcmp(opmode, "overdrive"))
+ imx8mp_clocks_apply_constraints(imx8mp_clock_overdrive_constraints);
+ }
+
err = of_clk_add_hw_provider(np, of_clk_hw_onecell_get, clk_hw_data);
if (err < 0) {
dev_err(dev, "failed to register hws for i.MX8MP\n");
diff --git a/drivers/clk/qcom/camcc-sm8250.c b/drivers/clk/qcom/camcc-sm8250.c
index 9b32c56a5bc5..e29706d78287 100644
--- a/drivers/clk/qcom/camcc-sm8250.c
+++ b/drivers/clk/qcom/camcc-sm8250.c
@@ -411,7 +411,7 @@ static struct clk_rcg2 cam_cc_bps_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -433,7 +433,7 @@ static struct clk_rcg2 cam_cc_camnoc_axi_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -454,7 +454,7 @@ static struct clk_rcg2 cam_cc_cci_0_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -469,7 +469,7 @@ static struct clk_rcg2 cam_cc_cci_1_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -490,7 +490,7 @@ static struct clk_rcg2 cam_cc_cphy_rx_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -511,7 +511,7 @@ static struct clk_rcg2 cam_cc_csi0phytimer_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -526,7 +526,7 @@ static struct clk_rcg2 cam_cc_csi1phytimer_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -556,7 +556,7 @@ static struct clk_rcg2 cam_cc_csi3phytimer_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -571,7 +571,7 @@ static struct clk_rcg2 cam_cc_csi4phytimer_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -586,7 +586,7 @@ static struct clk_rcg2 cam_cc_csi5phytimer_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -611,7 +611,7 @@ static struct clk_rcg2 cam_cc_fast_ahb_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -634,7 +634,7 @@ static struct clk_rcg2 cam_cc_fd_core_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -649,7 +649,7 @@ static struct clk_rcg2 cam_cc_icp_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -673,7 +673,7 @@ static struct clk_rcg2 cam_cc_ife_0_clk_src = {
.parent_data = cam_cc_parent_data_2,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_2),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -710,7 +710,7 @@ static struct clk_rcg2 cam_cc_ife_0_csid_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -734,7 +734,7 @@ static struct clk_rcg2 cam_cc_ife_1_clk_src = {
.parent_data = cam_cc_parent_data_3,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_3),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -749,7 +749,7 @@ static struct clk_rcg2 cam_cc_ife_1_csid_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -771,7 +771,7 @@ static struct clk_rcg2 cam_cc_ife_lite_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -786,7 +786,7 @@ static struct clk_rcg2 cam_cc_ife_lite_csid_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -810,7 +810,7 @@ static struct clk_rcg2 cam_cc_ipe_0_clk_src = {
.parent_data = cam_cc_parent_data_4,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_4),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -825,7 +825,7 @@ static struct clk_rcg2 cam_cc_jpeg_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -847,7 +847,7 @@ static struct clk_rcg2 cam_cc_mclk0_clk_src = {
.parent_data = cam_cc_parent_data_1,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_1),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -862,7 +862,7 @@ static struct clk_rcg2 cam_cc_mclk1_clk_src = {
.parent_data = cam_cc_parent_data_1,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_1),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -877,7 +877,7 @@ static struct clk_rcg2 cam_cc_mclk2_clk_src = {
.parent_data = cam_cc_parent_data_1,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_1),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -892,7 +892,7 @@ static struct clk_rcg2 cam_cc_mclk3_clk_src = {
.parent_data = cam_cc_parent_data_1,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_1),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -907,7 +907,7 @@ static struct clk_rcg2 cam_cc_mclk4_clk_src = {
.parent_data = cam_cc_parent_data_1,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_1),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -922,7 +922,7 @@ static struct clk_rcg2 cam_cc_mclk5_clk_src = {
.parent_data = cam_cc_parent_data_1,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_1),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -993,7 +993,7 @@ static struct clk_rcg2 cam_cc_slow_ahb_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
diff --git a/drivers/clk/qcom/clk-alpha-pll.c b/drivers/clk/qcom/clk-alpha-pll.c
index e63a90db1505..c591fa1ad802 100644
--- a/drivers/clk/qcom/clk-alpha-pll.c
+++ b/drivers/clk/qcom/clk-alpha-pll.c
@@ -561,14 +561,19 @@ clk_alpha_pll_recalc_rate(struct clk_hw *hw, unsigned long parent_rate)
struct clk_alpha_pll *pll = to_clk_alpha_pll(hw);
u32 alpha_width = pll_alpha_width(pll);
- regmap_read(pll->clkr.regmap, PLL_L_VAL(pll), &l);
+ if (regmap_read(pll->clkr.regmap, PLL_L_VAL(pll), &l))
+ return 0;
+
+ if (regmap_read(pll->clkr.regmap, PLL_USER_CTL(pll), &ctl))
+ return 0;
- regmap_read(pll->clkr.regmap, PLL_USER_CTL(pll), &ctl);
if (ctl & PLL_ALPHA_EN) {
- regmap_read(pll->clkr.regmap, PLL_ALPHA_VAL(pll), &low);
+ if (regmap_read(pll->clkr.regmap, PLL_ALPHA_VAL(pll), &low))
+ return 0;
if (alpha_width > 32) {
- regmap_read(pll->clkr.regmap, PLL_ALPHA_VAL_U(pll),
- &high);
+ if (regmap_read(pll->clkr.regmap, PLL_ALPHA_VAL_U(pll),
+ &high))
+ return 0;
a = (u64)high << 32 | low;
} else {
a = low & GENMASK(alpha_width - 1, 0);
@@ -760,8 +765,11 @@ alpha_pll_huayra_recalc_rate(struct clk_hw *hw, unsigned long parent_rate)
struct clk_alpha_pll *pll = to_clk_alpha_pll(hw);
u32 l, alpha = 0, ctl, alpha_m, alpha_n;
- regmap_read(pll->clkr.regmap, PLL_L_VAL(pll), &l);
- regmap_read(pll->clkr.regmap, PLL_USER_CTL(pll), &ctl);
+ if (regmap_read(pll->clkr.regmap, PLL_L_VAL(pll), &l))
+ return 0;
+
+ if (regmap_read(pll->clkr.regmap, PLL_USER_CTL(pll), &ctl))
+ return 0;
if (ctl & PLL_ALPHA_EN) {
regmap_read(pll->clkr.regmap, PLL_ALPHA_VAL(pll), &alpha);
@@ -955,8 +963,11 @@ clk_trion_pll_recalc_rate(struct clk_hw *hw, unsigned long parent_rate)
struct clk_alpha_pll *pll = to_clk_alpha_pll(hw);
u32 l, frac, alpha_width = pll_alpha_width(pll);
- regmap_read(pll->clkr.regmap, PLL_L_VAL(pll), &l);
- regmap_read(pll->clkr.regmap, PLL_ALPHA_VAL(pll), &frac);
+ if (regmap_read(pll->clkr.regmap, PLL_L_VAL(pll), &l))
+ return 0;
+
+ if (regmap_read(pll->clkr.regmap, PLL_ALPHA_VAL(pll), &frac))
+ return 0;
return alpha_pll_calc_rate(parent_rate, l, frac, alpha_width);
}
@@ -1014,7 +1025,8 @@ clk_alpha_pll_postdiv_recalc_rate(struct clk_hw *hw, unsigned long parent_rate)
struct clk_alpha_pll_postdiv *pll = to_clk_alpha_pll_postdiv(hw);
u32 ctl;
- regmap_read(pll->clkr.regmap, PLL_USER_CTL(pll), &ctl);
+ if (regmap_read(pll->clkr.regmap, PLL_USER_CTL(pll), &ctl))
+ return 0;
ctl >>= PLL_POST_DIV_SHIFT;
ctl &= PLL_POST_DIV_MASK(pll);
@@ -1230,8 +1242,11 @@ static unsigned long alpha_pll_fabia_recalc_rate(struct clk_hw *hw,
struct clk_alpha_pll *pll = to_clk_alpha_pll(hw);
u32 l, frac, alpha_width = pll_alpha_width(pll);
- regmap_read(pll->clkr.regmap, PLL_L_VAL(pll), &l);
- regmap_read(pll->clkr.regmap, PLL_FRAC(pll), &frac);
+ if (regmap_read(pll->clkr.regmap, PLL_L_VAL(pll), &l))
+ return 0;
+
+ if (regmap_read(pll->clkr.regmap, PLL_FRAC(pll), &frac))
+ return 0;
return alpha_pll_calc_rate(parent_rate, l, frac, alpha_width);
}
@@ -1381,7 +1396,8 @@ clk_trion_pll_postdiv_recalc_rate(struct clk_hw *hw, unsigned long parent_rate)
struct regmap *regmap = pll->clkr.regmap;
u32 i, div = 1, val;
- regmap_read(regmap, PLL_USER_CTL(pll), &val);
+ if (regmap_read(regmap, PLL_USER_CTL(pll), &val))
+ return 0;
val >>= pll->post_div_shift;
val &= PLL_POST_DIV_MASK(pll);
@@ -2254,9 +2270,12 @@ static unsigned long alpha_pll_lucid_evo_recalc_rate(struct clk_hw *hw,
struct regmap *regmap = pll->clkr.regmap;
u32 l, frac;
- regmap_read(regmap, PLL_L_VAL(pll), &l);
+ if (regmap_read(regmap, PLL_L_VAL(pll), &l))
+ return 0;
l &= LUCID_EVO_PLL_L_VAL_MASK;
- regmap_read(regmap, PLL_ALPHA_VAL(pll), &frac);
+
+ if (regmap_read(regmap, PLL_ALPHA_VAL(pll), &frac))
+ return 0;
return alpha_pll_calc_rate(parent_rate, l, frac, pll_alpha_width(pll));
}
@@ -2331,7 +2350,8 @@ static unsigned long clk_rivian_evo_pll_recalc_rate(struct clk_hw *hw,
struct clk_alpha_pll *pll = to_clk_alpha_pll(hw);
u32 l;
- regmap_read(pll->clkr.regmap, PLL_L_VAL(pll), &l);
+ if (regmap_read(pll->clkr.regmap, PLL_L_VAL(pll), &l))
+ return 0;
return parent_rate * l;
}
diff --git a/drivers/clk/sunxi-ng/ccu-sun20i-d1.c b/drivers/clk/sunxi-ng/ccu-sun20i-d1.c
index cb4bf038e17f..89d8bf4a30a2 100644
--- a/drivers/clk/sunxi-ng/ccu-sun20i-d1.c
+++ b/drivers/clk/sunxi-ng/ccu-sun20i-d1.c
@@ -412,19 +412,23 @@ static const struct clk_parent_data mmc0_mmc1_parents[] = {
{ .hw = &pll_periph0_2x_clk.common.hw },
{ .hw = &pll_audio1_div2_clk.common.hw },
};
-static SUNXI_CCU_MP_DATA_WITH_MUX_GATE(mmc0_clk, "mmc0", mmc0_mmc1_parents, 0x830,
- 0, 4, /* M */
- 8, 2, /* P */
- 24, 3, /* mux */
- BIT(31), /* gate */
- 0);
-
-static SUNXI_CCU_MP_DATA_WITH_MUX_GATE(mmc1_clk, "mmc1", mmc0_mmc1_parents, 0x834,
- 0, 4, /* M */
- 8, 2, /* P */
- 24, 3, /* mux */
- BIT(31), /* gate */
- 0);
+static SUNXI_CCU_MP_DATA_WITH_MUX_GATE_POSTDIV(mmc0_clk, "mmc0",
+ mmc0_mmc1_parents, 0x830,
+ 0, 4, /* M */
+ 8, 2, /* P */
+ 24, 3, /* mux */
+ BIT(31), /* gate */
+ 2, /* post-div */
+ 0);
+
+static SUNXI_CCU_MP_DATA_WITH_MUX_GATE_POSTDIV(mmc1_clk, "mmc1",
+ mmc0_mmc1_parents, 0x834,
+ 0, 4, /* M */
+ 8, 2, /* P */
+ 24, 3, /* mux */
+ BIT(31), /* gate */
+ 2, /* post-div */
+ 0);
static const struct clk_parent_data mmc2_parents[] = {
{ .fw_name = "hosc" },
@@ -433,12 +437,14 @@ static const struct clk_parent_data mmc2_parents[] = {
{ .hw = &pll_periph0_800M_clk.common.hw },
{ .hw = &pll_audio1_div2_clk.common.hw },
};
-static SUNXI_CCU_MP_DATA_WITH_MUX_GATE(mmc2_clk, "mmc2", mmc2_parents, 0x838,
- 0, 4, /* M */
- 8, 2, /* P */
- 24, 3, /* mux */
- BIT(31), /* gate */
- 0);
+static SUNXI_CCU_MP_DATA_WITH_MUX_GATE_POSTDIV(mmc2_clk, "mmc2", mmc2_parents,
+ 0x838,
+ 0, 4, /* M */
+ 8, 2, /* P */
+ 24, 3, /* mux */
+ BIT(31), /* gate */
+ 2, /* post-div */
+ 0);
static SUNXI_CCU_GATE_HWS(bus_mmc0_clk, "bus-mmc0", psi_ahb_hws,
0x84c, BIT(0), 0);
diff --git a/drivers/clk/sunxi-ng/ccu_mp.h b/drivers/clk/sunxi-ng/ccu_mp.h
index 6e50f3728fb5..7d836a9fb3db 100644
--- a/drivers/clk/sunxi-ng/ccu_mp.h
+++ b/drivers/clk/sunxi-ng/ccu_mp.h
@@ -52,6 +52,28 @@ struct ccu_mp {
} \
}
+#define SUNXI_CCU_MP_DATA_WITH_MUX_GATE_POSTDIV(_struct, _name, _parents, \
+ _reg, \
+ _mshift, _mwidth, \
+ _pshift, _pwidth, \
+ _muxshift, _muxwidth, \
+ _gate, _postdiv, _flags)\
+ struct ccu_mp _struct = { \
+ .enable = _gate, \
+ .m = _SUNXI_CCU_DIV(_mshift, _mwidth), \
+ .p = _SUNXI_CCU_DIV(_pshift, _pwidth), \
+ .mux = _SUNXI_CCU_MUX(_muxshift, _muxwidth), \
+ .fixed_post_div = _postdiv, \
+ .common = { \
+ .reg = _reg, \
+ .features = CCU_FEATURE_FIXED_POSTDIV, \
+ .hw.init = CLK_HW_INIT_PARENTS_DATA(_name, \
+ _parents, \
+ &ccu_mp_ops, \
+ _flags), \
+ } \
+ }
+
#define SUNXI_CCU_MP_WITH_MUX_GATE(_struct, _name, _parents, _reg, \
_mshift, _mwidth, \
_pshift, _pwidth, \
diff --git a/drivers/clocksource/mips-gic-timer.c b/drivers/clocksource/mips-gic-timer.c
index b3ae38f36720..39c70b5ac44c 100644
--- a/drivers/clocksource/mips-gic-timer.c
+++ b/drivers/clocksource/mips-gic-timer.c
@@ -114,6 +114,9 @@ static void gic_update_frequency(void *data)
static int gic_starting_cpu(unsigned int cpu)
{
+ /* Ensure the GIC counter is running */
+ clear_gic_config(GIC_CONFIG_COUNTSTOP);
+
gic_clockevent_cpu_init(cpu, this_cpu_ptr(&gic_clockevent_device));
return 0;
}
@@ -248,9 +251,6 @@ static int __init gic_clocksource_of_init(struct device_node *node)
pr_warn("Unable to register clock notifier\n");
}
- /* And finally start the counter */
- clear_gic_config(GIC_CONFIG_COUNTSTOP);
-
/*
* It's safe to use the MIPS GIC timer as a sched clock source only if
* its ticks are stable, which is true on either the platforms with
diff --git a/drivers/cpufreq/tegra186-cpufreq.c b/drivers/cpufreq/tegra186-cpufreq.c
index 6c88827f4e62..1d6b54303723 100644
--- a/drivers/cpufreq/tegra186-cpufreq.c
+++ b/drivers/cpufreq/tegra186-cpufreq.c
@@ -73,11 +73,18 @@ static int tegra186_cpufreq_init(struct cpufreq_policy *policy)
{
struct tegra186_cpufreq_data *data = cpufreq_get_driver_data();
unsigned int cluster = data->cpus[policy->cpu].bpmp_cluster_id;
+ u32 cpu;
policy->freq_table = data->clusters[cluster].table;
policy->cpuinfo.transition_latency = 300 * 1000;
policy->driver_data = NULL;
+ /* set same policy for all cpus in a cluster */
+ for (cpu = 0; cpu < ARRAY_SIZE(tegra186_cpus); cpu++) {
+ if (data->cpus[cpu].bpmp_cluster_id == cluster)
+ cpumask_set_cpu(cpu, policy->cpus);
+ }
+
return 0;
}
diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c
index c4922684f305..4edac724983a 100644
--- a/drivers/cpuidle/governors/menu.c
+++ b/drivers/cpuidle/governors/menu.c
@@ -249,8 +249,19 @@ static unsigned int get_typical_interval(struct menu_device *data,
* This can deal with workloads that have long pauses interspersed
* with sporadic activity with a bunch of short pauses.
*/
- if ((divisor * 4) <= INTERVALS * 3)
+ if (divisor * 4 <= INTERVALS * 3) {
+ /*
+ * If there are sufficiently many data points still under
+ * consideration after the outliers have been eliminated,
+ * returning without a prediction would be a mistake because it
+ * is likely that the next interval will not exceed the current
+ * maximum, so return the latter in that case.
+ */
+ if (divisor >= INTERVALS / 2)
+ return max;
+
return UINT_MAX;
+ }
thresh = max - 1;
goto again;
diff --git a/drivers/crypto/marvell/octeontx2/otx2_cptvf_reqmgr.c b/drivers/crypto/marvell/octeontx2/otx2_cptvf_reqmgr.c
index 811ded72ce5f..798bb40fed68 100644
--- a/drivers/crypto/marvell/octeontx2/otx2_cptvf_reqmgr.c
+++ b/drivers/crypto/marvell/octeontx2/otx2_cptvf_reqmgr.c
@@ -410,9 +410,10 @@ static int cpt_process_ccode(struct otx2_cptlfs_info *lfs,
break;
}
- dev_err(&pdev->dev,
- "Request failed with software error code 0x%x\n",
- cpt_status->s.uc_compcode);
+ pr_debug("Request failed with software error code 0x%x: algo = %s driver = %s\n",
+ cpt_status->s.uc_compcode,
+ info->req->areq->tfm->__crt_alg->cra_name,
+ info->req->areq->tfm->__crt_alg->cra_driver_name);
otx2_cpt_dump_sg_list(pdev, info->req);
break;
}
diff --git a/drivers/dma/idxd/cdev.c b/drivers/dma/idxd/cdev.c
index 9f8adb7013eb..9b07474f450b 100644
--- a/drivers/dma/idxd/cdev.c
+++ b/drivers/dma/idxd/cdev.c
@@ -12,7 +12,9 @@
#include <linux/fs.h>
#include <linux/poll.h>
#include <linux/iommu.h>
+#include <linux/highmem.h>
#include <uapi/linux/idxd.h>
+#include <linux/xarray.h>
#include "registers.h"
#include "idxd.h"
@@ -35,6 +37,7 @@ struct idxd_user_context {
struct idxd_wq *wq;
struct task_struct *task;
unsigned int pasid;
+ struct mm_struct *mm;
unsigned int flags;
struct iommu_sva *sva;
};
@@ -69,6 +72,19 @@ static inline struct idxd_wq *inode_wq(struct inode *inode)
return idxd_cdev->wq;
}
+static void idxd_xa_pasid_remove(struct idxd_user_context *ctx)
+{
+ struct idxd_wq *wq = ctx->wq;
+ void *ptr;
+
+ mutex_lock(&wq->uc_lock);
+ ptr = xa_cmpxchg(&wq->upasid_xa, ctx->pasid, ctx, NULL, GFP_KERNEL);
+ if (ptr != (void *)ctx)
+ dev_warn(&wq->idxd->pdev->dev, "xarray cmpxchg failed for pasid %u\n",
+ ctx->pasid);
+ mutex_unlock(&wq->uc_lock);
+}
+
static int idxd_cdev_open(struct inode *inode, struct file *filp)
{
struct idxd_user_context *ctx;
@@ -109,20 +125,25 @@ static int idxd_cdev_open(struct inode *inode, struct file *filp)
pasid = iommu_sva_get_pasid(sva);
if (pasid == IOMMU_PASID_INVALID) {
- iommu_sva_unbind_device(sva);
rc = -EINVAL;
- goto failed;
+ goto failed_get_pasid;
}
ctx->sva = sva;
ctx->pasid = pasid;
+ ctx->mm = current->mm;
+
+ mutex_lock(&wq->uc_lock);
+ rc = xa_insert(&wq->upasid_xa, pasid, ctx, GFP_KERNEL);
+ mutex_unlock(&wq->uc_lock);
+ if (rc < 0)
+ dev_warn(dev, "PASID entry already exist in xarray.\n");
if (wq_dedicated(wq)) {
rc = idxd_wq_set_pasid(wq, pasid);
if (rc < 0) {
- iommu_sva_unbind_device(sva);
dev_err(dev, "wq set pasid failed: %d\n", rc);
- goto failed;
+ goto failed_set_pasid;
}
}
}
@@ -131,7 +152,13 @@ static int idxd_cdev_open(struct inode *inode, struct file *filp)
mutex_unlock(&wq->wq_lock);
return 0;
- failed:
+failed_set_pasid:
+ if (device_user_pasid_enabled(idxd))
+ idxd_xa_pasid_remove(ctx);
+failed_get_pasid:
+ if (device_user_pasid_enabled(idxd))
+ iommu_sva_unbind_device(sva);
+failed:
mutex_unlock(&wq->wq_lock);
kfree(ctx);
return rc;
@@ -162,8 +189,10 @@ static int idxd_cdev_release(struct inode *node, struct file *filep)
}
}
- if (ctx->sva)
+ if (ctx->sva) {
iommu_sva_unbind_device(ctx->sva);
+ idxd_xa_pasid_remove(ctx);
+ }
kfree(ctx);
mutex_lock(&wq->wq_lock);
idxd_wq_put(wq);
@@ -210,6 +239,9 @@ static int idxd_cdev_mmap(struct file *filp, struct vm_area_struct *vma)
if (!idxd->user_submission_safe && !capable(CAP_SYS_RAWIO))
return -EPERM;
+ if (current->mm != ctx->mm)
+ return -EPERM;
+
rc = check_vma(wq, vma, __func__);
if (rc < 0)
return rc;
@@ -276,6 +308,9 @@ static ssize_t idxd_cdev_write(struct file *filp, const char __user *buf, size_t
ssize_t written = 0;
int i;
+ if (current->mm != ctx->mm)
+ return -EPERM;
+
for (i = 0; i < len/sizeof(struct dsa_hw_desc); i++) {
int rc = idxd_submit_user_descriptor(ctx, udesc + i);
@@ -296,6 +331,9 @@ static __poll_t idxd_cdev_poll(struct file *filp,
struct idxd_device *idxd = wq->idxd;
__poll_t out = 0;
+ if (current->mm != ctx->mm)
+ return POLLNVAL;
+
poll_wait(filp, &wq->err_queue, wait);
spin_lock(&idxd->dev_lock);
if (idxd->sw_err.valid)
@@ -408,6 +446,13 @@ static int idxd_user_drv_probe(struct idxd_dev *idxd_dev)
}
mutex_lock(&wq->wq_lock);
+
+ wq->wq = create_workqueue(dev_name(wq_confdev(wq)));
+ if (!wq->wq) {
+ rc = -ENOMEM;
+ goto wq_err;
+ }
+
wq->type = IDXD_WQT_USER;
rc = drv_enable_wq(wq);
if (rc < 0)
@@ -426,7 +471,9 @@ static int idxd_user_drv_probe(struct idxd_dev *idxd_dev)
err_cdev:
drv_disable_wq(wq);
err:
+ destroy_workqueue(wq->wq);
wq->type = IDXD_WQT_NONE;
+wq_err:
mutex_unlock(&wq->wq_lock);
return rc;
}
@@ -439,6 +486,8 @@ static void idxd_user_drv_remove(struct idxd_dev *idxd_dev)
idxd_wq_del_cdev(wq);
drv_disable_wq(wq);
wq->type = IDXD_WQT_NONE;
+ destroy_workqueue(wq->wq);
+ wq->wq = NULL;
mutex_unlock(&wq->wq_lock);
}
@@ -485,3 +534,70 @@ void idxd_cdev_remove(void)
ida_destroy(&ictx[i].minor_ida);
}
}
+
+/**
+ * idxd_copy_cr - copy completion record to user address space found by wq and
+ * PASID
+ * @wq: work queue
+ * @pasid: PASID
+ * @addr: user fault address to write
+ * @cr: completion record
+ * @len: number of bytes to copy
+ *
+ * This is called by a work that handles completion record fault.
+ *
+ * Return: number of bytes copied.
+ */
+int idxd_copy_cr(struct idxd_wq *wq, ioasid_t pasid, unsigned long addr,
+ void *cr, int len)
+{
+ struct device *dev = &wq->idxd->pdev->dev;
+ int left = len, status_size = 1;
+ struct idxd_user_context *ctx;
+ struct mm_struct *mm;
+
+ mutex_lock(&wq->uc_lock);
+
+ ctx = xa_load(&wq->upasid_xa, pasid);
+ if (!ctx) {
+ dev_warn(dev, "No user context\n");
+ goto out;
+ }
+
+ mm = ctx->mm;
+ /*
+ * The completion record fault handling work is running in kernel
+ * thread context. It temporarily switches to the mm to copy cr
+ * to addr in the mm.
+ */
+ kthread_use_mm(mm);
+ left = copy_to_user((void __user *)addr + status_size, cr + status_size,
+ len - status_size);
+ /*
+ * Copy status only after the rest of completion record is copied
+ * successfully so that the user gets the complete completion record
+ * when a non-zero status is polled.
+ */
+ if (!left) {
+ u8 status;
+
+ /*
+ * Ensure that the completion record's status field is written
+ * after the rest of the completion record has been written.
+ * This ensures that the user receives the correct completion
+ * record information once polling for a non-zero status.
+ */
+ wmb();
+ status = *(u8 *)cr;
+ if (put_user(status, (u8 __user *)addr))
+ left += status_size;
+ } else {
+ left += status_size;
+ }
+ kthread_unuse_mm(mm);
+
+out:
+ mutex_unlock(&wq->uc_lock);
+
+ return len - left;
+}
diff --git a/drivers/dma/idxd/idxd.h b/drivers/dma/idxd/idxd.h
index 14c6ef987fed..c3ace4aed0fc 100644
--- a/drivers/dma/idxd/idxd.h
+++ b/drivers/dma/idxd/idxd.h
@@ -185,6 +185,7 @@ struct idxd_wq {
struct idxd_dev idxd_dev;
struct idxd_cdev *idxd_cdev;
struct wait_queue_head err_queue;
+ struct workqueue_struct *wq;
struct idxd_device *idxd;
int id;
struct idxd_irq_entry ie;
@@ -214,6 +215,10 @@ struct idxd_wq {
char name[WQ_NAME_SIZE + 1];
u64 max_xfer_bytes;
u32 max_batch_size;
+
+ /* Lock to protect upasid_xa access. */
+ struct mutex uc_lock;
+ struct xarray upasid_xa;
};
struct idxd_engine {
@@ -665,6 +670,8 @@ void idxd_cdev_remove(void);
int idxd_cdev_get_major(struct idxd_device *idxd);
int idxd_wq_add_cdev(struct idxd_wq *wq);
void idxd_wq_del_cdev(struct idxd_wq *wq);
+int idxd_copy_cr(struct idxd_wq *wq, ioasid_t pasid, unsigned long addr,
+ void *buf, int len);
/* perfmon */
#if IS_ENABLED(CONFIG_INTEL_IDXD_PERFMON)
diff --git a/drivers/dma/idxd/init.c b/drivers/dma/idxd/init.c
index 7cb76db5ad60..ea651d5cf332 100644
--- a/drivers/dma/idxd/init.c
+++ b/drivers/dma/idxd/init.c
@@ -218,6 +218,8 @@ static int idxd_setup_wqs(struct idxd_device *idxd)
}
bitmap_copy(wq->opcap_bmap, idxd->opcap_bmap, IDXD_MAX_OPCAP_BITS);
}
+ mutex_init(&wq->uc_lock);
+ xa_init(&wq->upasid_xa);
idxd->wqs[i] = wq;
}
diff --git a/drivers/dma/idxd/sysfs.c b/drivers/dma/idxd/sysfs.c
index c811757d0f97..0689464c4816 100644
--- a/drivers/dma/idxd/sysfs.c
+++ b/drivers/dma/idxd/sysfs.c
@@ -1315,6 +1315,7 @@ static void idxd_conf_wq_release(struct device *dev)
bitmap_free(wq->opcap_bmap);
kfree(wq->wqcfg);
+ xa_destroy(&wq->upasid_xa);
kfree(wq);
}
diff --git a/drivers/edac/ie31200_edac.c b/drivers/edac/ie31200_edac.c
index 56be8ef40f37..e3635fba63b4 100644
--- a/drivers/edac/ie31200_edac.c
+++ b/drivers/edac/ie31200_edac.c
@@ -405,10 +405,9 @@ static int ie31200_probe1(struct pci_dev *pdev, int dev_idx)
int i, j, ret;
struct mem_ctl_info *mci = NULL;
struct edac_mc_layer layers[2];
- struct dimm_data dimm_info[IE31200_CHANNELS][IE31200_DIMMS_PER_CHANNEL];
void __iomem *window;
struct ie31200_priv *priv;
- u32 addr_decode, mad_offset;
+ u32 addr_decode[IE31200_CHANNELS], mad_offset;
/*
* Kaby Lake, Coffee Lake seem to work like Skylake. Please re-visit
@@ -466,19 +465,10 @@ static int ie31200_probe1(struct pci_dev *pdev, int dev_idx)
mad_offset = IE31200_MAD_DIMM_0_OFFSET;
}
- /* populate DIMM info */
for (i = 0; i < IE31200_CHANNELS; i++) {
- addr_decode = readl(window + mad_offset +
+ addr_decode[i] = readl(window + mad_offset +
(i * 4));
- edac_dbg(0, "addr_decode: 0x%x\n", addr_decode);
- for (j = 0; j < IE31200_DIMMS_PER_CHANNEL; j++) {
- populate_dimm_info(&dimm_info[i][j], addr_decode, j,
- skl);
- edac_dbg(0, "size: 0x%x, rank: %d, width: %d\n",
- dimm_info[i][j].size,
- dimm_info[i][j].dual_rank,
- dimm_info[i][j].x16_width);
- }
+ edac_dbg(0, "addr_decode: 0x%x\n", addr_decode[i]);
}
/*
@@ -489,14 +479,22 @@ static int ie31200_probe1(struct pci_dev *pdev, int dev_idx)
*/
for (i = 0; i < IE31200_DIMMS_PER_CHANNEL; i++) {
for (j = 0; j < IE31200_CHANNELS; j++) {
+ struct dimm_data dimm_info;
struct dimm_info *dimm;
unsigned long nr_pages;
- nr_pages = IE31200_PAGES(dimm_info[j][i].size, skl);
+ populate_dimm_info(&dimm_info, addr_decode[j], i,
+ skl);
+ edac_dbg(0, "size: 0x%x, rank: %d, width: %d\n",
+ dimm_info.size,
+ dimm_info.dual_rank,
+ dimm_info.x16_width);
+
+ nr_pages = IE31200_PAGES(dimm_info.size, skl);
if (nr_pages == 0)
continue;
- if (dimm_info[j][i].dual_rank) {
+ if (dimm_info.dual_rank) {
nr_pages = nr_pages / 2;
dimm = edac_get_dimm(mci, (i * 2) + 1, j, 0);
dimm->nr_pages = nr_pages;
diff --git a/drivers/firmware/arm_ffa/bus.c b/drivers/firmware/arm_ffa/bus.c
index 248594b59c64..5bda5d7ade42 100644
--- a/drivers/firmware/arm_ffa/bus.c
+++ b/drivers/firmware/arm_ffa/bus.c
@@ -191,6 +191,7 @@ struct ffa_device *ffa_device_register(const uuid_t *uuid, int vm_id,
dev = &ffa_dev->dev;
dev->bus = &ffa_bus_type;
dev->release = ffa_release_device;
+ dev->dma_mask = &dev->coherent_dma_mask;
dev_set_name(&ffa_dev->dev, "arm-ffa-%d", id);
ffa_dev->id = id;
diff --git a/drivers/fpga/altera-cvp.c b/drivers/fpga/altera-cvp.c
index 4ffb9da537d8..5295ff90482b 100644
--- a/drivers/fpga/altera-cvp.c
+++ b/drivers/fpga/altera-cvp.c
@@ -52,7 +52,7 @@
/* V2 Defines */
#define VSE_CVP_TX_CREDITS 0x49 /* 8bit */
-#define V2_CREDIT_TIMEOUT_US 20000
+#define V2_CREDIT_TIMEOUT_US 40000
#define V2_CHECK_CREDIT_US 10
#define V2_POLL_TIMEOUT_US 1000000
#define V2_USER_TIMEOUT_US 500000
diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
index 262b3d276df7..f81d79a297a5 100644
--- a/drivers/gpio/gpio-pca953x.c
+++ b/drivers/gpio/gpio-pca953x.c
@@ -10,8 +10,9 @@
#include <linux/acpi.h>
#include <linux/bitmap.h>
-#include <linux/gpio/driver.h>
+#include <linux/cleanup.h>
#include <linux/gpio/consumer.h>
+#include <linux/gpio/driver.h>
#include <linux/i2c.h>
#include <linux/init.h>
#include <linux/interrupt.h>
@@ -20,6 +21,7 @@
#include <linux/platform_data/pca953x.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
+#include <linux/seq_file.h>
#include <linux/slab.h>
#include <asm/unaligned.h>
@@ -522,12 +524,10 @@ static int pca953x_gpio_direction_input(struct gpio_chip *gc, unsigned off)
struct pca953x_chip *chip = gpiochip_get_data(gc);
u8 dirreg = chip->recalc_addr(chip, chip->regs->direction, off);
u8 bit = BIT(off % BANK_SZ);
- int ret;
- mutex_lock(&chip->i2c_lock);
- ret = regmap_write_bits(chip->regmap, dirreg, bit, bit);
- mutex_unlock(&chip->i2c_lock);
- return ret;
+ guard(mutex)(&chip->i2c_lock);
+
+ return regmap_write_bits(chip->regmap, dirreg, bit, bit);
}
static int pca953x_gpio_direction_output(struct gpio_chip *gc,
@@ -539,17 +539,15 @@ static int pca953x_gpio_direction_output(struct gpio_chip *gc,
u8 bit = BIT(off % BANK_SZ);
int ret;
- mutex_lock(&chip->i2c_lock);
+ guard(mutex)(&chip->i2c_lock);
+
/* set output level */
ret = regmap_write_bits(chip->regmap, outreg, bit, val ? bit : 0);
if (ret)
- goto exit;
+ return ret;
/* then direction */
- ret = regmap_write_bits(chip->regmap, dirreg, bit, 0);
-exit:
- mutex_unlock(&chip->i2c_lock);
- return ret;
+ return regmap_write_bits(chip->regmap, dirreg, bit, 0);
}
static int pca953x_gpio_get_value(struct gpio_chip *gc, unsigned off)
@@ -560,9 +558,8 @@ static int pca953x_gpio_get_value(struct gpio_chip *gc, unsigned off)
u32 reg_val;
int ret;
- mutex_lock(&chip->i2c_lock);
- ret = regmap_read(chip->regmap, inreg, ®_val);
- mutex_unlock(&chip->i2c_lock);
+ scoped_guard(mutex, &chip->i2c_lock)
+ ret = regmap_read(chip->regmap, inreg, ®_val);
if (ret < 0)
return ret;
@@ -575,9 +572,9 @@ static void pca953x_gpio_set_value(struct gpio_chip *gc, unsigned off, int val)
u8 outreg = chip->recalc_addr(chip, chip->regs->output, off);
u8 bit = BIT(off % BANK_SZ);
- mutex_lock(&chip->i2c_lock);
+ guard(mutex)(&chip->i2c_lock);
+
regmap_write_bits(chip->regmap, outreg, bit, val ? bit : 0);
- mutex_unlock(&chip->i2c_lock);
}
static int pca953x_gpio_get_direction(struct gpio_chip *gc, unsigned off)
@@ -588,9 +585,8 @@ static int pca953x_gpio_get_direction(struct gpio_chip *gc, unsigned off)
u32 reg_val;
int ret;
- mutex_lock(&chip->i2c_lock);
- ret = regmap_read(chip->regmap, dirreg, ®_val);
- mutex_unlock(&chip->i2c_lock);
+ scoped_guard(mutex, &chip->i2c_lock)
+ ret = regmap_read(chip->regmap, dirreg, ®_val);
if (ret < 0)
return ret;
@@ -607,9 +603,8 @@ static int pca953x_gpio_get_multiple(struct gpio_chip *gc,
DECLARE_BITMAP(reg_val, MAX_LINE);
int ret;
- mutex_lock(&chip->i2c_lock);
- ret = pca953x_read_regs(chip, chip->regs->input, reg_val);
- mutex_unlock(&chip->i2c_lock);
+ scoped_guard(mutex, &chip->i2c_lock)
+ ret = pca953x_read_regs(chip, chip->regs->input, reg_val);
if (ret)
return ret;
@@ -624,16 +619,15 @@ static void pca953x_gpio_set_multiple(struct gpio_chip *gc,
DECLARE_BITMAP(reg_val, MAX_LINE);
int ret;
- mutex_lock(&chip->i2c_lock);
+ guard(mutex)(&chip->i2c_lock);
+
ret = pca953x_read_regs(chip, chip->regs->output, reg_val);
if (ret)
- goto exit;
+ return;
bitmap_replace(reg_val, reg_val, bits, mask, gc->ngpio);
pca953x_write_regs(chip, chip->regs->output, reg_val);
-exit:
- mutex_unlock(&chip->i2c_lock);
}
static int pca953x_gpio_set_pull_up_down(struct pca953x_chip *chip,
@@ -641,7 +635,6 @@ static int pca953x_gpio_set_pull_up_down(struct pca953x_chip *chip,
unsigned long config)
{
enum pin_config_param param = pinconf_to_config_param(config);
-
u8 pull_en_reg = chip->recalc_addr(chip, PCAL953X_PULL_EN, offset);
u8 pull_sel_reg = chip->recalc_addr(chip, PCAL953X_PULL_SEL, offset);
u8 bit = BIT(offset % BANK_SZ);
@@ -654,7 +647,7 @@ static int pca953x_gpio_set_pull_up_down(struct pca953x_chip *chip,
if (!(chip->driver_data & PCA_PCAL))
return -ENOTSUPP;
- mutex_lock(&chip->i2c_lock);
+ guard(mutex)(&chip->i2c_lock);
/* Configure pull-up/pull-down */
if (param == PIN_CONFIG_BIAS_PULL_UP)
@@ -664,17 +657,13 @@ static int pca953x_gpio_set_pull_up_down(struct pca953x_chip *chip,
else
ret = 0;
if (ret)
- goto exit;
+ return ret;
/* Disable/Enable pull-up/pull-down */
if (param == PIN_CONFIG_BIAS_DISABLE)
- ret = regmap_write_bits(chip->regmap, pull_en_reg, bit, 0);
+ return regmap_write_bits(chip->regmap, pull_en_reg, bit, 0);
else
- ret = regmap_write_bits(chip->regmap, pull_en_reg, bit, bit);
-
-exit:
- mutex_unlock(&chip->i2c_lock);
- return ret;
+ return regmap_write_bits(chip->regmap, pull_en_reg, bit, bit);
}
static int pca953x_gpio_set_config(struct gpio_chip *gc, unsigned int offset,
@@ -887,10 +876,8 @@ static irqreturn_t pca953x_irq_handler(int irq, void *devid)
bitmap_zero(pending, MAX_LINE);
- mutex_lock(&chip->i2c_lock);
- ret = pca953x_irq_pending(chip, pending);
- mutex_unlock(&chip->i2c_lock);
-
+ scoped_guard(mutex, &chip->i2c_lock)
+ ret = pca953x_irq_pending(chip, pending);
if (ret) {
ret = 0;
@@ -1199,9 +1186,9 @@ static void pca953x_remove(struct i2c_client *client)
}
#ifdef CONFIG_PM_SLEEP
-static int pca953x_regcache_sync(struct device *dev)
+static int pca953x_regcache_sync(struct pca953x_chip *chip)
{
- struct pca953x_chip *chip = dev_get_drvdata(dev);
+ struct device *dev = &chip->client->dev;
int ret;
u8 regaddr;
@@ -1248,13 +1235,38 @@ static int pca953x_regcache_sync(struct device *dev)
return 0;
}
+static int pca953x_restore_context(struct pca953x_chip *chip)
+{
+ int ret;
+
+ guard(mutex)(&chip->i2c_lock);
+
+ if (chip->client->irq > 0)
+ enable_irq(chip->client->irq);
+ regcache_cache_only(chip->regmap, false);
+ regcache_mark_dirty(chip->regmap);
+ ret = pca953x_regcache_sync(chip);
+ if (ret)
+ return ret;
+
+ return regcache_sync(chip->regmap);
+}
+
+static void pca953x_save_context(struct pca953x_chip *chip)
+{
+ guard(mutex)(&chip->i2c_lock);
+
+ /* Disable IRQ to prevent early triggering while regmap "cache only" is on */
+ if (chip->client->irq > 0)
+ disable_irq(chip->client->irq);
+ regcache_cache_only(chip->regmap, true);
+}
+
static int pca953x_suspend(struct device *dev)
{
struct pca953x_chip *chip = dev_get_drvdata(dev);
- mutex_lock(&chip->i2c_lock);
- regcache_cache_only(chip->regmap, true);
- mutex_unlock(&chip->i2c_lock);
+ pca953x_save_context(chip);
if (atomic_read(&chip->wakeup_path))
device_set_wakeup_path(dev);
@@ -1277,17 +1289,7 @@ static int pca953x_resume(struct device *dev)
}
}
- mutex_lock(&chip->i2c_lock);
- regcache_cache_only(chip->regmap, false);
- regcache_mark_dirty(chip->regmap);
- ret = pca953x_regcache_sync(dev);
- if (ret) {
- mutex_unlock(&chip->i2c_lock);
- return ret;
- }
-
- ret = regcache_sync(chip->regmap);
- mutex_unlock(&chip->i2c_lock);
+ ret = pca953x_restore_context(chip);
if (ret) {
dev_err(dev, "Failed to restore register map: %d\n", ret);
return ret;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
index ab06cb4d7b35..4dcc7de961d0 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
@@ -42,6 +42,29 @@
#include <linux/pci-p2pdma.h>
#include <linux/pm_runtime.h>
+static const struct dma_buf_attach_ops amdgpu_dma_buf_attach_ops;
+
+/**
+ * dma_buf_attach_adev - Helper to get adev of an attachment
+ *
+ * @attach: attachment
+ *
+ * Returns:
+ * A struct amdgpu_device * if the attaching device is an amdgpu device or
+ * partition, NULL otherwise.
+ */
+static struct amdgpu_device *dma_buf_attach_adev(struct dma_buf_attachment *attach)
+{
+ if (attach->importer_ops == &amdgpu_dma_buf_attach_ops) {
+ struct drm_gem_object *obj = attach->importer_priv;
+ struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj);
+
+ return amdgpu_ttm_adev(bo->tbo.bdev);
+ }
+
+ return NULL;
+}
+
/**
* amdgpu_dma_buf_attach - &dma_buf_ops.attach implementation
*
@@ -53,12 +76,14 @@
static int amdgpu_dma_buf_attach(struct dma_buf *dmabuf,
struct dma_buf_attachment *attach)
{
+ struct amdgpu_device *attach_adev = dma_buf_attach_adev(attach);
struct drm_gem_object *obj = dmabuf->priv;
struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj);
struct amdgpu_device *adev = amdgpu_ttm_adev(bo->tbo.bdev);
int r;
- if (pci_p2pdma_distance(adev->pdev, attach->dev, false) < 0)
+ if (!amdgpu_dmabuf_is_xgmi_accessible(attach_adev, bo) &&
+ pci_p2pdma_distance(adev->pdev, attach->dev, false) < 0)
attach->peer2peer = false;
r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
@@ -479,6 +504,9 @@ bool amdgpu_dmabuf_is_xgmi_accessible(struct amdgpu_device *adev,
struct drm_gem_object *obj = &bo->tbo.base;
struct drm_gem_object *gobj;
+ if (!adev)
+ return false;
+
if (obj->import_attach) {
struct dma_buf *dma_buf = obj->import_attach->dmabuf;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index f8740ad08af4..ae6643c8ade6 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
@@ -43,7 +43,7 @@
#include "amdgpu_securedisplay.h"
#include "amdgpu_atomfirmware.h"
-#define AMD_VBIOS_FILE_MAX_SIZE_B (1024*1024*3)
+#define AMD_VBIOS_FILE_MAX_SIZE_B (1024*1024*16)
static int psp_sysfs_init(struct amdgpu_device *adev);
static void psp_sysfs_fini(struct amdgpu_device *adev);
@@ -484,7 +484,6 @@ static int psp_sw_fini(void *handle)
{
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
struct psp_context *psp = &adev->psp;
- struct psp_gfx_cmd_resp *cmd = psp->cmd;
psp_memory_training_fini(psp);
if (psp->sos_fw) {
@@ -511,8 +510,8 @@ static int psp_sw_fini(void *handle)
adev->ip_versions[MP0_HWIP][0] == IP_VERSION(11, 0, 7))
psp_sysfs_fini(adev);
- kfree(cmd);
- cmd = NULL;
+ kfree(psp->cmd);
+ psp->cmd = NULL;
psp_free_shared_bufs(psp);
diff --git a/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c b/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c
index ec4d5e15b766..de74686cb1db 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c
@@ -92,12 +92,12 @@ static void gfxhub_v1_0_init_system_aperture_regs(struct amdgpu_device *adev)
{
uint64_t value;
- /* Program the AGP BAR */
- WREG32_SOC15_RLC(GC, 0, mmMC_VM_AGP_BASE, 0);
- WREG32_SOC15_RLC(GC, 0, mmMC_VM_AGP_BOT, adev->gmc.agp_start >> 24);
- WREG32_SOC15_RLC(GC, 0, mmMC_VM_AGP_TOP, adev->gmc.agp_end >> 24);
-
if (!amdgpu_sriov_vf(adev) || adev->asic_type <= CHIP_VEGA10) {
+ /* Program the AGP BAR */
+ WREG32_SOC15_RLC(GC, 0, mmMC_VM_AGP_BASE, 0);
+ WREG32_SOC15_RLC(GC, 0, mmMC_VM_AGP_BOT, adev->gmc.agp_start >> 24);
+ WREG32_SOC15_RLC(GC, 0, mmMC_VM_AGP_TOP, adev->gmc.agp_end >> 24);
+
/* Program the system aperture low logical page number. */
WREG32_SOC15_RLC(GC, 0, mmMC_VM_SYSTEM_APERTURE_LOW_ADDR,
min(adev->gmc.fb_start, adev->gmc.agp_start) >> 18);
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
index bc01c5173ab9..fd7fecaa9254 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
@@ -813,6 +813,14 @@ struct kfd_process *kfd_create_process(struct file *filep)
if (thread->group_leader->mm != thread->mm)
return ERR_PTR(-EINVAL);
+ /* If the process just called exec(3), it is possible that the
+ * cleanup of the kfd_process (following the release of the mm
+ * of the old process image) is still in the cleanup work queue.
+ * Make sure to drain any job before trying to recreate any
+ * resource for this process.
+ */
+ flush_workqueue(kfd_process_wq);
+
/*
* take kfd processes mutex before starting of process creation
* so there won't be a case where two threads of the same process
@@ -825,14 +833,6 @@ struct kfd_process *kfd_create_process(struct file *filep)
if (process) {
pr_debug("Process already found\n");
} else {
- /* If the process just called exec(3), it is possible that the
- * cleanup of the kfd_process (following the release of the mm
- * of the old process image) is still in the cleanup work queue.
- * Make sure to drain any job before trying to recreate any
- * resource for this process.
- */
- flush_workqueue(kfd_process_wq);
-
process = create_process(thread);
if (IS_ERR(process))
goto out;
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 0d8c020cd121..64f626cc7913 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -2897,11 +2897,6 @@ static int dm_resume(void *handle)
return 0;
}
-
- /* leave display off for S4 sequence */
- if (adev->in_s4)
- return 0;
-
/* Recreate dc_state - DC invalidates it when setting power state to S3. */
dc_release_state(dm_state->context);
dm_state->context = dc_create_state(dm->dc);
@@ -7281,7 +7276,7 @@ static int amdgpu_dm_i2c_xfer(struct i2c_adapter *i2c_adap,
int i;
int result = -EIO;
- if (!ddc_service->ddc_pin || !ddc_service->ddc_pin->hw_info.hw_supported)
+ if (!ddc_service->ddc_pin)
return result;
cmd.payloads = kcalloc(num, sizeof(struct i2c_payload), GFP_KERNEL);
diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c
index 09eb1bc9aa03..9549f9c15229 100644
--- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c
+++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c
@@ -116,7 +116,7 @@ static void dcn315_update_clocks(struct clk_mgr *clk_mgr_base,
struct clk_mgr_internal *clk_mgr = TO_CLK_MGR_INTERNAL(clk_mgr_base);
struct dc_clocks *new_clocks = &context->bw_ctx.bw.dcn.clk;
struct dc *dc = clk_mgr_base->ctx->dc;
- int display_count;
+ int display_count = 0;
bool update_dppclk = false;
bool update_dispclk = false;
bool dpp_clock_lowered = false;
@@ -192,15 +192,19 @@ static void dcn315_update_clocks(struct clk_mgr *clk_mgr_base,
update_dppclk = true;
}
- if (should_set_clock(safe_to_lower, new_clocks->dispclk_khz, clk_mgr_base->clks.dispclk_khz)) {
- /* No need to apply the w/a if we haven't taken over from bios yet */
- if (clk_mgr_base->clks.dispclk_khz)
- dcn315_disable_otg_wa(clk_mgr_base, context, true);
+ if (should_set_clock(safe_to_lower, new_clocks->dispclk_khz, clk_mgr_base->clks.dispclk_khz) &&
+ (new_clocks->dispclk_khz > 0 || (safe_to_lower && display_count == 0))) {
+ int requested_dispclk_khz = new_clocks->dispclk_khz;
+ dcn315_disable_otg_wa(clk_mgr_base, context, true);
+
+ /* Clamp the requested clock to PMFW based on their limit. */
+ if (dc->debug.min_disp_clk_khz > 0 && requested_dispclk_khz < dc->debug.min_disp_clk_khz)
+ requested_dispclk_khz = dc->debug.min_disp_clk_khz;
+
+ dcn315_smu_set_dispclk(clk_mgr, requested_dispclk_khz);
clk_mgr_base->clks.dispclk_khz = new_clocks->dispclk_khz;
- dcn315_smu_set_dispclk(clk_mgr, clk_mgr_base->clks.dispclk_khz);
- if (clk_mgr_base->clks.dispclk_khz)
- dcn315_disable_otg_wa(clk_mgr_base, context, false);
+ dcn315_disable_otg_wa(clk_mgr_base, context, false);
update_dispclk = true;
}
diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c
index 29d2003fb712..afce15aa2ff1 100644
--- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c
+++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c
@@ -153,7 +153,7 @@ static void dcn316_update_clocks(struct clk_mgr *clk_mgr_base,
struct clk_mgr_internal *clk_mgr = TO_CLK_MGR_INTERNAL(clk_mgr_base);
struct dc_clocks *new_clocks = &context->bw_ctx.bw.dcn.clk;
struct dc *dc = clk_mgr_base->ctx->dc;
- int display_count;
+ int display_count = 0;
bool update_dppclk = false;
bool update_dispclk = false;
bool dpp_clock_lowered = false;
@@ -226,11 +226,18 @@ static void dcn316_update_clocks(struct clk_mgr *clk_mgr_base,
update_dppclk = true;
}
- if (should_set_clock(safe_to_lower, new_clocks->dispclk_khz, clk_mgr_base->clks.dispclk_khz)) {
+ if (should_set_clock(safe_to_lower, new_clocks->dispclk_khz, clk_mgr_base->clks.dispclk_khz) &&
+ (new_clocks->dispclk_khz > 0 || (safe_to_lower && display_count == 0))) {
+ int requested_dispclk_khz = new_clocks->dispclk_khz;
+
dcn316_disable_otg_wa(clk_mgr_base, context, safe_to_lower, true);
+ /* Clamp the requested clock to PMFW based on their limit. */
+ if (dc->debug.min_disp_clk_khz > 0 && requested_dispclk_khz < dc->debug.min_disp_clk_khz)
+ requested_dispclk_khz = dc->debug.min_disp_clk_khz;
+
+ dcn316_smu_set_dispclk(clk_mgr, requested_dispclk_khz);
clk_mgr_base->clks.dispclk_khz = new_clocks->dispclk_khz;
- dcn316_smu_set_dispclk(clk_mgr, clk_mgr_base->clks.dispclk_khz);
dcn316_disable_otg_wa(clk_mgr_base, context, safe_to_lower, false);
update_dispclk = true;
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index 2721842af806..10672bb90a02 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -267,6 +267,7 @@ static bool create_links(
link->link_id.type = OBJECT_TYPE_CONNECTOR;
link->link_id.id = CONNECTOR_ID_VIRTUAL;
link->link_id.enum_id = ENUM_ID_1;
+ link->psr_settings.psr_version = DC_PSR_VERSION_UNSUPPORTED;
link->link_enc = kzalloc(sizeof(*link->link_enc), GFP_KERNEL);
if (!link->link_enc) {
diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c
index 50dc83404644..4ce45f1bdac0 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c
@@ -392,11 +392,6 @@ bool dpp3_get_optimal_number_of_taps(
int min_taps_y, min_taps_c;
enum lb_memory_config lb_config;
- if (scl_data->viewport.width > scl_data->h_active &&
- dpp->ctx->dc->debug.max_downscale_src_width != 0 &&
- scl_data->viewport.width > dpp->ctx->dc->debug.max_downscale_src_width)
- return false;
-
/*
* Set default taps if none are provided
* From programming guide: taps = min{ ceil(2*H_RATIO,1), 8} for downscaling
@@ -434,6 +429,12 @@ bool dpp3_get_optimal_number_of_taps(
else
scl_data->taps.h_taps_c = in_taps->h_taps_c;
+ // Avoid null data in the scl data with this early return, proceed non-adaptive calcualtion first
+ if (scl_data->viewport.width > scl_data->h_active &&
+ dpp->ctx->dc->debug.max_downscale_src_width != 0 &&
+ scl_data->viewport.width > dpp->ctx->dc->debug.max_downscale_src_width)
+ return false;
+
/*Ensure we can support the requested number of vtaps*/
min_taps_y = dc_fixpt_ceil(scl_data->ratios.vert);
min_taps_c = dc_fixpt_ceil(scl_data->ratios.vert_c);
diff --git a/drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c b/drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c
index 958170fbfece..9d643c79afea 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c
@@ -1717,7 +1717,7 @@ static int dcn315_populate_dml_pipes_from_context(
pipes[pipe_cnt].dout.dsc_input_bpc = 0;
DC_FP_START();
dcn31_zero_pipe_dcc_fraction(pipes, pipe_cnt);
- if (pixel_rate_crb && !pipe->top_pipe && !pipe->prev_odm_pipe) {
+ if (pixel_rate_crb) {
int bpp = source_format_to_bpp(pipes[pipe_cnt].pipe.src.source_format);
/* Ceil to crb segment size */
int approx_det_segs_required_for_pstate = dcn_get_approx_det_segs_required_for_pstate(
@@ -1768,28 +1768,26 @@ static int dcn315_populate_dml_pipes_from_context(
continue;
}
- if (!pipe->top_pipe && !pipe->prev_odm_pipe) {
- bool split_required = pipe->stream->timing.pix_clk_100hz >= dcn_get_max_non_odm_pix_rate_100hz(&dc->dml.soc)
- || (pipe->plane_state && pipe->plane_state->src_rect.width > 5120);
-
- if (remaining_det_segs > MIN_RESERVED_DET_SEGS && crb_pipes != 0)
- pipes[pipe_cnt].pipe.src.det_size_override += (remaining_det_segs - MIN_RESERVED_DET_SEGS) / crb_pipes +
- (crb_idx < (remaining_det_segs - MIN_RESERVED_DET_SEGS) % crb_pipes ? 1 : 0);
- if (pipes[pipe_cnt].pipe.src.det_size_override > 2 * DCN3_15_MAX_DET_SEGS) {
- /* Clamp to 2 pipe split max det segments */
- remaining_det_segs += pipes[pipe_cnt].pipe.src.det_size_override - 2 * (DCN3_15_MAX_DET_SEGS);
- pipes[pipe_cnt].pipe.src.det_size_override = 2 * DCN3_15_MAX_DET_SEGS;
- }
- if (pipes[pipe_cnt].pipe.src.det_size_override > DCN3_15_MAX_DET_SEGS || split_required) {
- /* If we are splitting we must have an even number of segments */
- remaining_det_segs += pipes[pipe_cnt].pipe.src.det_size_override % 2;
- pipes[pipe_cnt].pipe.src.det_size_override -= pipes[pipe_cnt].pipe.src.det_size_override % 2;
- }
- /* Convert segments into size for DML use */
- pipes[pipe_cnt].pipe.src.det_size_override *= DCN3_15_CRB_SEGMENT_SIZE_KB;
-
- crb_idx++;
+ bool split_required = pipe->stream->timing.pix_clk_100hz >= dcn_get_max_non_odm_pix_rate_100hz(&dc->dml.soc)
+ || (pipe->plane_state && pipe->plane_state->src_rect.width > 5120);
+
+ if (remaining_det_segs > MIN_RESERVED_DET_SEGS && crb_pipes != 0)
+ pipes[pipe_cnt].pipe.src.det_size_override += (remaining_det_segs - MIN_RESERVED_DET_SEGS) / crb_pipes +
+ (crb_idx < (remaining_det_segs - MIN_RESERVED_DET_SEGS) % crb_pipes ? 1 : 0);
+ if (pipes[pipe_cnt].pipe.src.det_size_override > 2 * DCN3_15_MAX_DET_SEGS) {
+ /* Clamp to 2 pipe split max det segments */
+ remaining_det_segs += pipes[pipe_cnt].pipe.src.det_size_override - 2 * (DCN3_15_MAX_DET_SEGS);
+ pipes[pipe_cnt].pipe.src.det_size_override = 2 * DCN3_15_MAX_DET_SEGS;
+ }
+ if (pipes[pipe_cnt].pipe.src.det_size_override > DCN3_15_MAX_DET_SEGS || split_required) {
+ /* If we are splitting we must have an even number of segments */
+ remaining_det_segs += pipes[pipe_cnt].pipe.src.det_size_override % 2;
+ pipes[pipe_cnt].pipe.src.det_size_override -= pipes[pipe_cnt].pipe.src.det_size_override % 2;
}
+ /* Convert segments into size for DML use */
+ pipes[pipe_cnt].pipe.src.det_size_override *= DCN3_15_CRB_SEGMENT_SIZE_KB;
+
+ crb_idx++;
pipe_cnt++;
}
}
diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c
index 1bc0220e6783..9fe856fd8a84 100644
--- a/drivers/gpu/drm/ast/ast_mode.c
+++ b/drivers/gpu/drm/ast/ast_mode.c
@@ -103,7 +103,7 @@ static bool ast_get_vbios_mode_info(const struct drm_format_info *format,
return false;
}
- switch (mode->crtc_hdisplay) {
+ switch (mode->hdisplay) {
case 640:
vbios_mode->enh_table = &res_640x480[refresh_rate_index];
break;
@@ -117,7 +117,7 @@ static bool ast_get_vbios_mode_info(const struct drm_format_info *format,
vbios_mode->enh_table = &res_1152x864[refresh_rate_index];
break;
case 1280:
- if (mode->crtc_vdisplay == 800)
+ if (mode->vdisplay == 800)
vbios_mode->enh_table = &res_1280x800[refresh_rate_index];
else
vbios_mode->enh_table = &res_1280x1024[refresh_rate_index];
@@ -129,7 +129,7 @@ static bool ast_get_vbios_mode_info(const struct drm_format_info *format,
vbios_mode->enh_table = &res_1440x900[refresh_rate_index];
break;
case 1600:
- if (mode->crtc_vdisplay == 900)
+ if (mode->vdisplay == 900)
vbios_mode->enh_table = &res_1600x900[refresh_rate_index];
else
vbios_mode->enh_table = &res_1600x1200[refresh_rate_index];
@@ -138,7 +138,7 @@ static bool ast_get_vbios_mode_info(const struct drm_format_info *format,
vbios_mode->enh_table = &res_1680x1050[refresh_rate_index];
break;
case 1920:
- if (mode->crtc_vdisplay == 1080)
+ if (mode->vdisplay == 1080)
vbios_mode->enh_table = &res_1920x1080[refresh_rate_index];
else
vbios_mode->enh_table = &res_1920x1200[refresh_rate_index];
@@ -182,6 +182,7 @@ static bool ast_get_vbios_mode_info(const struct drm_format_info *format,
hborder = (vbios_mode->enh_table->flags & HBorder) ? 8 : 0;
vborder = (vbios_mode->enh_table->flags & VBorder) ? 8 : 0;
+ adjusted_mode->crtc_hdisplay = vbios_mode->enh_table->hde;
adjusted_mode->crtc_htotal = vbios_mode->enh_table->ht;
adjusted_mode->crtc_hblank_start = vbios_mode->enh_table->hde + hborder;
adjusted_mode->crtc_hblank_end = vbios_mode->enh_table->ht - hborder;
@@ -191,6 +192,7 @@ static bool ast_get_vbios_mode_info(const struct drm_format_info *format,
vbios_mode->enh_table->hfp +
vbios_mode->enh_table->hsync);
+ adjusted_mode->crtc_vdisplay = vbios_mode->enh_table->vde;
adjusted_mode->crtc_vtotal = vbios_mode->enh_table->vt;
adjusted_mode->crtc_vblank_start = vbios_mode->enh_table->vde + vborder;
adjusted_mode->crtc_vblank_end = vbios_mode->enh_table->vt - vborder;
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index 66d223c2d9ab..e737e45a3a70 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -573,6 +573,30 @@ mode_valid(struct drm_atomic_state *state)
return 0;
}
+static int drm_atomic_check_valid_clones(struct drm_atomic_state *state,
+ struct drm_crtc *crtc)
+{
+ struct drm_encoder *drm_enc;
+ struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state,
+ crtc);
+
+ drm_for_each_encoder_mask(drm_enc, crtc->dev, crtc_state->encoder_mask) {
+ if (!drm_enc->possible_clones) {
+ DRM_DEBUG("enc%d possible_clones is 0\n", drm_enc->base.id);
+ continue;
+ }
+
+ if ((crtc_state->encoder_mask & drm_enc->possible_clones) !=
+ crtc_state->encoder_mask) {
+ DRM_DEBUG("crtc%d failed valid clone check for mask 0x%x\n",
+ crtc->base.id, crtc_state->encoder_mask);
+ return -EINVAL;
+ }
+ }
+
+ return 0;
+}
+
/**
* drm_atomic_helper_check_modeset - validate state object for modeset changes
* @dev: DRM device
@@ -744,6 +768,10 @@ drm_atomic_helper_check_modeset(struct drm_device *dev,
ret = drm_atomic_add_affected_planes(state, crtc);
if (ret != 0)
return ret;
+
+ ret = drm_atomic_check_valid_clones(state, crtc);
+ if (ret != 0)
+ return ret;
}
/*
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 5ed77e3361fd..fc6028aae9bd 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -6164,6 +6164,7 @@ static void drm_reset_display_info(struct drm_connector *connector)
info->has_hdmi_infoframe = false;
info->rgb_quant_range_selectable = false;
memset(&info->hdmi, 0, sizeof(info->hdmi));
+ memset(&connector->hdr_sink_metadata, 0, sizeof(connector->hdr_sink_metadata));
info->edid_hdmi_rgb444_dc_modes = 0;
info->edid_hdmi_ycbcr444_dc_modes = 0;
diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
index 1fa958e8c40a..5ad9c384046c 100644
--- a/drivers/gpu/drm/mediatek/mtk_dpi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
@@ -406,12 +406,13 @@ static void mtk_dpi_config_swap_input(struct mtk_dpi *dpi, bool enable)
static void mtk_dpi_config_2n_h_fre(struct mtk_dpi *dpi)
{
- mtk_dpi_mask(dpi, dpi->conf->reg_h_fre_con, H_FRE_2N, H_FRE_2N);
+ if (dpi->conf->reg_h_fre_con)
+ mtk_dpi_mask(dpi, dpi->conf->reg_h_fre_con, H_FRE_2N, H_FRE_2N);
}
static void mtk_dpi_config_disable_edge(struct mtk_dpi *dpi)
{
- if (dpi->conf->edge_sel_en)
+ if (dpi->conf->edge_sel_en && dpi->conf->reg_h_fre_con)
mtk_dpi_mask(dpi, dpi->conf->reg_h_fre_con, 0, EDGE_SEL_EN);
}
diff --git a/drivers/gpu/drm/panel/panel-edp.c b/drivers/gpu/drm/panel/panel-edp.c
index 2c14779a39e8..1ef1b4c966d2 100644
--- a/drivers/gpu/drm/panel/panel-edp.c
+++ b/drivers/gpu/drm/panel/panel-edp.c
@@ -1944,6 +1944,7 @@ static const struct edp_panel_entry edp_panels[] = {
EDP_PANEL_ENTRY('S', 'H', 'P', 0x1523, &sharp_lq140m1jw46.delay, "LQ140M1JW46"),
EDP_PANEL_ENTRY('S', 'H', 'P', 0x154c, &delay_200_500_p2e100, "LQ116M1JW10"),
+ EDP_PANEL_ENTRY('S', 'T', 'A', 0x0004, &delay_200_500_e200, "116KHD024006"),
EDP_PANEL_ENTRY('S', 'T', 'A', 0x0100, &delay_100_500_e200, "2081116HHD028001-51D"),
{ /* sentinal */ }
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
index 955ef2caac89..6efa0a51b7d6 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
@@ -1289,10 +1289,8 @@ static void vop2_plane_atomic_update(struct drm_plane *plane,
rb_swap = vop2_win_rb_swap(fb->format->format);
vop2_win_write(win, VOP2_WIN_RB_SWAP, rb_swap);
- if (!vop2_cluster_window(win)) {
- uv_swap = vop2_win_uv_swap(fb->format->format);
- vop2_win_write(win, VOP2_WIN_UV_SWAP, uv_swap);
- }
+ uv_swap = vop2_win_uv_swap(fb->format->format);
+ vop2_win_write(win, VOP2_WIN_UV_SWAP, uv_swap);
if (fb->format->is_yuv) {
vop2_win_write(win, VOP2_WIN_UV_VIR, DIV_ROUND_UP(fb->pitches[1], 4));
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index 4187d890bcc1..e078d2ac92c8 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -41,6 +41,10 @@
#define USB_VENDOR_ID_ACTIONSTAR 0x2101
#define USB_DEVICE_ID_ACTIONSTAR_1011 0x1011
+#define USB_VENDOR_ID_ADATA_XPG 0x125f
+#define USB_VENDOR_ID_ADATA_XPG_WL_GAMING_MOUSE 0x7505
+#define USB_VENDOR_ID_ADATA_XPG_WL_GAMING_MOUSE_DONGLE 0x7506
+
#define USB_VENDOR_ID_ADS_TECH 0x06e1
#define USB_DEVICE_ID_ADS_TECH_RADIO_SI470X 0xa155
diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c
index 875c44e5cf6c..d8c5c7d451ef 100644
--- a/drivers/hid/hid-quirks.c
+++ b/drivers/hid/hid-quirks.c
@@ -27,6 +27,8 @@
static const struct hid_device_id hid_quirks[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_AASHIMA, USB_DEVICE_ID_AASHIMA_GAMEPAD), HID_QUIRK_BADPAD },
{ HID_USB_DEVICE(USB_VENDOR_ID_AASHIMA, USB_DEVICE_ID_AASHIMA_PREDATOR), HID_QUIRK_BADPAD },
+ { HID_USB_DEVICE(USB_VENDOR_ID_ADATA_XPG, USB_VENDOR_ID_ADATA_XPG_WL_GAMING_MOUSE), HID_QUIRK_ALWAYS_POLL },
+ { HID_USB_DEVICE(USB_VENDOR_ID_ADATA_XPG, USB_VENDOR_ID_ADATA_XPG_WL_GAMING_MOUSE_DONGLE), HID_QUIRK_ALWAYS_POLL },
{ HID_USB_DEVICE(USB_VENDOR_ID_AFATECH, USB_DEVICE_ID_AFATECH_AF9016), HID_QUIRK_FULLSPEED_INTERVAL },
{ HID_USB_DEVICE(USB_VENDOR_ID_AIREN, USB_DEVICE_ID_AIREN_SLIMPLUS), HID_QUIRK_NOGET },
{ HID_USB_DEVICE(USB_VENDOR_ID_AKAI_09E8, USB_DEVICE_ID_AKAI_09E8_MIDIMIX), HID_QUIRK_NO_INIT_REPORTS },
diff --git a/drivers/hid/usbhid/usbkbd.c b/drivers/hid/usbhid/usbkbd.c
index c439ed2f16db..af6bc76dbf64 100644
--- a/drivers/hid/usbhid/usbkbd.c
+++ b/drivers/hid/usbhid/usbkbd.c
@@ -160,7 +160,7 @@ static int usb_kbd_event(struct input_dev *dev, unsigned int type,
return -1;
spin_lock_irqsave(&kbd->leds_lock, flags);
- kbd->newleds = (!!test_bit(LED_KANA, dev->led) << 3) | (!!test_bit(LED_COMPOSE, dev->led) << 3) |
+ kbd->newleds = (!!test_bit(LED_KANA, dev->led) << 4) | (!!test_bit(LED_COMPOSE, dev->led) << 3) |
(!!test_bit(LED_SCROLLL, dev->led) << 2) | (!!test_bit(LED_CAPSL, dev->led) << 1) |
(!!test_bit(LED_NUML, dev->led));
diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c
index 1572b5416015..dbcb8f362061 100644
--- a/drivers/hwmon/dell-smm-hwmon.c
+++ b/drivers/hwmon/dell-smm-hwmon.c
@@ -67,7 +67,7 @@
#define I8K_POWER_BATTERY 0x01
#define DELL_SMM_NO_TEMP 10
-#define DELL_SMM_NO_FANS 3
+#define DELL_SMM_NO_FANS 4
struct dell_smm_data {
struct mutex i8k_mutex; /* lock for sensors writes */
@@ -940,11 +940,14 @@ static const struct hwmon_channel_info *dell_smm_info[] = {
HWMON_F_INPUT | HWMON_F_LABEL | HWMON_F_MIN | HWMON_F_MAX |
HWMON_F_TARGET,
HWMON_F_INPUT | HWMON_F_LABEL | HWMON_F_MIN | HWMON_F_MAX |
+ HWMON_F_TARGET,
+ HWMON_F_INPUT | HWMON_F_LABEL | HWMON_F_MIN | HWMON_F_MAX |
HWMON_F_TARGET
),
HWMON_CHANNEL_INFO(pwm,
HWMON_PWM_INPUT | HWMON_PWM_ENABLE,
HWMON_PWM_INPUT,
+ HWMON_PWM_INPUT,
HWMON_PWM_INPUT
),
NULL
diff --git a/drivers/hwmon/gpio-fan.c b/drivers/hwmon/gpio-fan.c
index ba408942dbe7..f1926b9171e0 100644
--- a/drivers/hwmon/gpio-fan.c
+++ b/drivers/hwmon/gpio-fan.c
@@ -392,7 +392,12 @@ static int gpio_fan_set_cur_state(struct thermal_cooling_device *cdev,
if (state >= fan_data->num_speed)
return -EINVAL;
+ mutex_lock(&fan_data->lock);
+
set_fan_speed(fan_data, state);
+
+ mutex_unlock(&fan_data->lock);
+
return 0;
}
@@ -488,7 +493,11 @@ MODULE_DEVICE_TABLE(of, of_gpio_fan_match);
static void gpio_fan_stop(void *data)
{
+ struct gpio_fan_data *fan_data = data;
+
+ mutex_lock(&fan_data->lock);
set_fan_speed(data, 0);
+ mutex_unlock(&fan_data->lock);
}
static int gpio_fan_probe(struct platform_device *pdev)
@@ -561,7 +570,9 @@ static int gpio_fan_suspend(struct device *dev)
if (fan_data->gpios) {
fan_data->resume_speed = fan_data->speed_index;
+ mutex_lock(&fan_data->lock);
set_fan_speed(fan_data, 0);
+ mutex_unlock(&fan_data->lock);
}
return 0;
@@ -571,8 +582,11 @@ static int gpio_fan_resume(struct device *dev)
{
struct gpio_fan_data *fan_data = dev_get_drvdata(dev);
- if (fan_data->gpios)
+ if (fan_data->gpios) {
+ mutex_lock(&fan_data->lock);
set_fan_speed(fan_data, fan_data->resume_speed);
+ mutex_unlock(&fan_data->lock);
+ }
return 0;
}
diff --git a/drivers/hwmon/xgene-hwmon.c b/drivers/hwmon/xgene-hwmon.c
index 207084d55044..6768dbf39039 100644
--- a/drivers/hwmon/xgene-hwmon.c
+++ b/drivers/hwmon/xgene-hwmon.c
@@ -111,7 +111,7 @@ struct xgene_hwmon_dev {
phys_addr_t comm_base_addr;
void *pcc_comm_addr;
- u64 usecs_lat;
+ unsigned int usecs_lat;
};
/*
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
index ade3f0ea5955..8263e017577d 100644
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -1508,7 +1508,10 @@ static int i2c_pxa_probe(struct platform_device *dev)
i2c->adap.name);
}
- clk_prepare_enable(i2c->clk);
+ ret = clk_prepare_enable(i2c->clk);
+ if (ret)
+ return dev_err_probe(&dev->dev, ret,
+ "failed to enable clock\n");
if (i2c->use_pio) {
i2c->adap.algo = &i2c_pxa_pio_algorithm;
diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c
index 78682388e02e..82de4651d18f 100644
--- a/drivers/i2c/busses/i2c-qup.c
+++ b/drivers/i2c/busses/i2c-qup.c
@@ -14,6 +14,7 @@
#include <linux/dma-mapping.h>
#include <linux/err.h>
#include <linux/i2c.h>
+#include <linux/interconnect.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/module.h>
@@ -150,6 +151,8 @@
/* TAG length for DATA READ in RX FIFO */
#define READ_RX_TAGS_LEN 2
+#define QUP_BUS_WIDTH 8
+
static unsigned int scl_freq;
module_param_named(scl_freq, scl_freq, uint, 0444);
MODULE_PARM_DESC(scl_freq, "SCL frequency override");
@@ -227,6 +230,7 @@ struct qup_i2c_dev {
int irq;
struct clk *clk;
struct clk *pclk;
+ struct icc_path *icc_path;
struct i2c_adapter adap;
int clk_ctl;
@@ -255,6 +259,10 @@ struct qup_i2c_dev {
/* To configure when bus is in run state */
u32 config_run;
+ /* bandwidth votes */
+ u32 src_clk_freq;
+ u32 cur_bw_clk_freq;
+
/* dma parameters */
bool is_dma;
/* To check if the current transfer is using DMA */
@@ -453,6 +461,23 @@ static int qup_i2c_bus_active(struct qup_i2c_dev *qup, int len)
return ret;
}
+static int qup_i2c_vote_bw(struct qup_i2c_dev *qup, u32 clk_freq)
+{
+ u32 needed_peak_bw;
+ int ret;
+
+ if (qup->cur_bw_clk_freq == clk_freq)
+ return 0;
+
+ needed_peak_bw = Bps_to_icc(clk_freq * QUP_BUS_WIDTH);
+ ret = icc_set_bw(qup->icc_path, 0, needed_peak_bw);
+ if (ret)
+ return ret;
+
+ qup->cur_bw_clk_freq = clk_freq;
+ return 0;
+}
+
static void qup_i2c_write_tx_fifo_v1(struct qup_i2c_dev *qup)
{
struct qup_i2c_block *blk = &qup->blk;
@@ -840,6 +865,10 @@ static int qup_i2c_bam_xfer(struct i2c_adapter *adap, struct i2c_msg *msg,
int ret = 0;
int idx = 0;
+ ret = qup_i2c_vote_bw(qup, qup->src_clk_freq);
+ if (ret)
+ return ret;
+
enable_irq(qup->irq);
ret = qup_i2c_req_dma(qup);
@@ -1645,6 +1674,7 @@ static void qup_i2c_disable_clocks(struct qup_i2c_dev *qup)
config = readl(qup->base + QUP_CONFIG);
config |= QUP_CLOCK_AUTO_GATE;
writel(config, qup->base + QUP_CONFIG);
+ qup_i2c_vote_bw(qup, 0);
clk_disable_unprepare(qup->pclk);
}
@@ -1745,6 +1775,11 @@ static int qup_i2c_probe(struct platform_device *pdev)
goto fail_dma;
}
qup->is_dma = true;
+
+ qup->icc_path = devm_of_icc_get(&pdev->dev, NULL);
+ if (IS_ERR(qup->icc_path))
+ return dev_err_probe(&pdev->dev, PTR_ERR(qup->icc_path),
+ "failed to get interconnect path\n");
}
nodma:
@@ -1793,6 +1828,7 @@ static int qup_i2c_probe(struct platform_device *pdev)
qup_i2c_enable_clocks(qup);
src_clk_freq = clk_get_rate(qup->clk);
}
+ qup->src_clk_freq = src_clk_freq;
/*
* Bootloaders might leave a pending interrupt on certain QUP's,
diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c
index 38095649ed27..9b287f92d078 100644
--- a/drivers/i3c/master/svc-i3c-master.c
+++ b/drivers/i3c/master/svc-i3c-master.c
@@ -495,6 +495,8 @@ static void svc_i3c_master_ibi_work(struct work_struct *work)
queue_work(master->base.wq, &master->hj_work);
break;
case SVC_I3C_MSTATUS_IBITYPE_MASTER_REQUEST:
+ svc_i3c_master_emit_stop(master);
+ break;
default:
break;
}
@@ -832,6 +834,8 @@ static int svc_i3c_master_do_daa_locked(struct svc_i3c_master *master,
u32 reg;
int ret, i;
+ svc_i3c_master_flush_fifo(master);
+
while (true) {
/* Enter/proceed with DAA */
writel(SVC_I3C_MCTRL_REQUEST_PROC_DAA |
diff --git a/drivers/infiniband/core/umem.c b/drivers/infiniband/core/umem.c
index 8ce569bf7525..1d154055a335 100644
--- a/drivers/infiniband/core/umem.c
+++ b/drivers/infiniband/core/umem.c
@@ -80,9 +80,12 @@ unsigned long ib_umem_find_best_pgsz(struct ib_umem *umem,
unsigned long pgsz_bitmap,
unsigned long virt)
{
- struct scatterlist *sg;
+ unsigned long curr_len = 0;
+ dma_addr_t curr_base = ~0;
unsigned long va, pgoff;
+ struct scatterlist *sg;
dma_addr_t mask;
+ dma_addr_t end;
int i;
umem->iova = va = virt;
@@ -107,17 +110,30 @@ unsigned long ib_umem_find_best_pgsz(struct ib_umem *umem,
pgoff = umem->address & ~PAGE_MASK;
for_each_sgtable_dma_sg(&umem->sgt_append.sgt, sg, i) {
- /* Walk SGL and reduce max page size if VA/PA bits differ
- * for any address.
+ /* If the current entry is physically contiguous with the previous
+ * one, no need to take its start addresses into consideration.
*/
- mask |= (sg_dma_address(sg) + pgoff) ^ va;
+ if (check_add_overflow(curr_base, curr_len, &end) ||
+ end != sg_dma_address(sg)) {
+
+ curr_base = sg_dma_address(sg);
+ curr_len = 0;
+
+ /* Reduce max page size if VA/PA bits differ */
+ mask |= (curr_base + pgoff) ^ va;
+
+ /* The alignment of any VA matching a discontinuity point
+ * in the physical memory sets the maximum possible page
+ * size as this must be a starting point of a new page that
+ * needs to be aligned.
+ */
+ if (i != 0)
+ mask |= va;
+ }
+
+ curr_len += sg_dma_len(sg);
va += sg_dma_len(sg) - pgoff;
- /* Except for the last entry, the ending iova alignment sets
- * the maximum possible page size as the low bits of the iova
- * must be zero when starting the next chunk.
- */
- if (i != (umem->sgt_append.sgt.nents - 1))
- mask |= va;
+
pgoff = 0;
}
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
index c6053e82ecf6..33e2fe0facd5 100644
--- a/drivers/infiniband/core/uverbs_cmd.c
+++ b/drivers/infiniband/core/uverbs_cmd.c
@@ -718,8 +718,8 @@ static int ib_uverbs_reg_mr(struct uverbs_attr_bundle *attrs)
goto err_free;
pd = uobj_get_obj_read(pd, UVERBS_OBJECT_PD, cmd.pd_handle, attrs);
- if (!pd) {
- ret = -EINVAL;
+ if (IS_ERR(pd)) {
+ ret = PTR_ERR(pd);
goto err_free;
}
@@ -809,8 +809,8 @@ static int ib_uverbs_rereg_mr(struct uverbs_attr_bundle *attrs)
if (cmd.flags & IB_MR_REREG_PD) {
new_pd = uobj_get_obj_read(pd, UVERBS_OBJECT_PD, cmd.pd_handle,
attrs);
- if (!new_pd) {
- ret = -EINVAL;
+ if (IS_ERR(new_pd)) {
+ ret = PTR_ERR(new_pd);
goto put_uobjs;
}
} else {
@@ -919,8 +919,8 @@ static int ib_uverbs_alloc_mw(struct uverbs_attr_bundle *attrs)
return PTR_ERR(uobj);
pd = uobj_get_obj_read(pd, UVERBS_OBJECT_PD, cmd.pd_handle, attrs);
- if (!pd) {
- ret = -EINVAL;
+ if (IS_ERR(pd)) {
+ ret = PTR_ERR(pd);
goto err_free;
}
@@ -1127,8 +1127,8 @@ static int ib_uverbs_resize_cq(struct uverbs_attr_bundle *attrs)
return ret;
cq = uobj_get_obj_read(cq, UVERBS_OBJECT_CQ, cmd.cq_handle, attrs);
- if (!cq)
- return -EINVAL;
+ if (IS_ERR(cq))
+ return PTR_ERR(cq);
ret = cq->device->ops.resize_cq(cq, cmd.cqe, &attrs->driver_udata);
if (ret)
@@ -1189,8 +1189,8 @@ static int ib_uverbs_poll_cq(struct uverbs_attr_bundle *attrs)
return ret;
cq = uobj_get_obj_read(cq, UVERBS_OBJECT_CQ, cmd.cq_handle, attrs);
- if (!cq)
- return -EINVAL;
+ if (IS_ERR(cq))
+ return PTR_ERR(cq);
/* we copy a struct ib_uverbs_poll_cq_resp to user space */
header_ptr = attrs->ucore.outbuf;
@@ -1238,8 +1238,8 @@ static int ib_uverbs_req_notify_cq(struct uverbs_attr_bundle *attrs)
return ret;
cq = uobj_get_obj_read(cq, UVERBS_OBJECT_CQ, cmd.cq_handle, attrs);
- if (!cq)
- return -EINVAL;
+ if (IS_ERR(cq))
+ return PTR_ERR(cq);
ib_req_notify_cq(cq, cmd.solicited_only ?
IB_CQ_SOLICITED : IB_CQ_NEXT_COMP);
@@ -1321,8 +1321,8 @@ static int create_qp(struct uverbs_attr_bundle *attrs,
ind_tbl = uobj_get_obj_read(rwq_ind_table,
UVERBS_OBJECT_RWQ_IND_TBL,
cmd->rwq_ind_tbl_handle, attrs);
- if (!ind_tbl) {
- ret = -EINVAL;
+ if (IS_ERR(ind_tbl)) {
+ ret = PTR_ERR(ind_tbl);
goto err_put;
}
@@ -1360,8 +1360,10 @@ static int create_qp(struct uverbs_attr_bundle *attrs,
if (cmd->is_srq) {
srq = uobj_get_obj_read(srq, UVERBS_OBJECT_SRQ,
cmd->srq_handle, attrs);
- if (!srq || srq->srq_type == IB_SRQT_XRC) {
- ret = -EINVAL;
+ if (IS_ERR(srq) ||
+ srq->srq_type == IB_SRQT_XRC) {
+ ret = IS_ERR(srq) ? PTR_ERR(srq) :
+ -EINVAL;
goto err_put;
}
}
@@ -1371,23 +1373,29 @@ static int create_qp(struct uverbs_attr_bundle *attrs,
rcq = uobj_get_obj_read(
cq, UVERBS_OBJECT_CQ,
cmd->recv_cq_handle, attrs);
- if (!rcq) {
- ret = -EINVAL;
+ if (IS_ERR(rcq)) {
+ ret = PTR_ERR(rcq);
goto err_put;
}
}
}
}
- if (has_sq)
+ if (has_sq) {
scq = uobj_get_obj_read(cq, UVERBS_OBJECT_CQ,
cmd->send_cq_handle, attrs);
+ if (IS_ERR(scq)) {
+ ret = PTR_ERR(scq);
+ goto err_put;
+ }
+ }
+
if (!ind_tbl && cmd->qp_type != IB_QPT_XRC_INI)
rcq = rcq ?: scq;
pd = uobj_get_obj_read(pd, UVERBS_OBJECT_PD, cmd->pd_handle,
attrs);
- if (!pd || (!scq && has_sq)) {
- ret = -EINVAL;
+ if (IS_ERR(pd)) {
+ ret = PTR_ERR(pd);
goto err_put;
}
@@ -1482,18 +1490,18 @@ static int create_qp(struct uverbs_attr_bundle *attrs,
err_put:
if (!IS_ERR(xrcd_uobj))
uobj_put_read(xrcd_uobj);
- if (pd)
+ if (!IS_ERR_OR_NULL(pd))
uobj_put_obj_read(pd);
- if (scq)
+ if (!IS_ERR_OR_NULL(scq))
rdma_lookup_put_uobject(&scq->uobject->uevent.uobject,
UVERBS_LOOKUP_READ);
- if (rcq && rcq != scq)
+ if (!IS_ERR_OR_NULL(rcq) && rcq != scq)
rdma_lookup_put_uobject(&rcq->uobject->uevent.uobject,
UVERBS_LOOKUP_READ);
- if (srq)
+ if (!IS_ERR_OR_NULL(srq))
rdma_lookup_put_uobject(&srq->uobject->uevent.uobject,
UVERBS_LOOKUP_READ);
- if (ind_tbl)
+ if (!IS_ERR_OR_NULL(ind_tbl))
uobj_put_obj_read(ind_tbl);
uobj_alloc_abort(&obj->uevent.uobject, attrs);
@@ -1655,8 +1663,8 @@ static int ib_uverbs_query_qp(struct uverbs_attr_bundle *attrs)
}
qp = uobj_get_obj_read(qp, UVERBS_OBJECT_QP, cmd.qp_handle, attrs);
- if (!qp) {
- ret = -EINVAL;
+ if (IS_ERR(qp)) {
+ ret = PTR_ERR(qp);
goto out;
}
@@ -1761,8 +1769,8 @@ static int modify_qp(struct uverbs_attr_bundle *attrs,
qp = uobj_get_obj_read(qp, UVERBS_OBJECT_QP, cmd->base.qp_handle,
attrs);
- if (!qp) {
- ret = -EINVAL;
+ if (IS_ERR(qp)) {
+ ret = PTR_ERR(qp);
goto out;
}
@@ -2027,8 +2035,8 @@ static int ib_uverbs_post_send(struct uverbs_attr_bundle *attrs)
return -ENOMEM;
qp = uobj_get_obj_read(qp, UVERBS_OBJECT_QP, cmd.qp_handle, attrs);
- if (!qp) {
- ret = -EINVAL;
+ if (IS_ERR(qp)) {
+ ret = PTR_ERR(qp);
goto out;
}
@@ -2065,9 +2073,9 @@ static int ib_uverbs_post_send(struct uverbs_attr_bundle *attrs)
ud->ah = uobj_get_obj_read(ah, UVERBS_OBJECT_AH,
user_wr->wr.ud.ah, attrs);
- if (!ud->ah) {
+ if (IS_ERR(ud->ah)) {
+ ret = PTR_ERR(ud->ah);
kfree(ud);
- ret = -EINVAL;
goto out_put;
}
ud->remote_qpn = user_wr->wr.ud.remote_qpn;
@@ -2304,8 +2312,8 @@ static int ib_uverbs_post_recv(struct uverbs_attr_bundle *attrs)
return PTR_ERR(wr);
qp = uobj_get_obj_read(qp, UVERBS_OBJECT_QP, cmd.qp_handle, attrs);
- if (!qp) {
- ret = -EINVAL;
+ if (IS_ERR(qp)) {
+ ret = PTR_ERR(qp);
goto out;
}
@@ -2355,8 +2363,8 @@ static int ib_uverbs_post_srq_recv(struct uverbs_attr_bundle *attrs)
return PTR_ERR(wr);
srq = uobj_get_obj_read(srq, UVERBS_OBJECT_SRQ, cmd.srq_handle, attrs);
- if (!srq) {
- ret = -EINVAL;
+ if (IS_ERR(srq)) {
+ ret = PTR_ERR(srq);
goto out;
}
@@ -2412,8 +2420,8 @@ static int ib_uverbs_create_ah(struct uverbs_attr_bundle *attrs)
}
pd = uobj_get_obj_read(pd, UVERBS_OBJECT_PD, cmd.pd_handle, attrs);
- if (!pd) {
- ret = -EINVAL;
+ if (IS_ERR(pd)) {
+ ret = PTR_ERR(pd);
goto err;
}
@@ -2482,8 +2490,8 @@ static int ib_uverbs_attach_mcast(struct uverbs_attr_bundle *attrs)
return ret;
qp = uobj_get_obj_read(qp, UVERBS_OBJECT_QP, cmd.qp_handle, attrs);
- if (!qp)
- return -EINVAL;
+ if (IS_ERR(qp))
+ return PTR_ERR(qp);
obj = qp->uobject;
@@ -2532,8 +2540,8 @@ static int ib_uverbs_detach_mcast(struct uverbs_attr_bundle *attrs)
return ret;
qp = uobj_get_obj_read(qp, UVERBS_OBJECT_QP, cmd.qp_handle, attrs);
- if (!qp)
- return -EINVAL;
+ if (IS_ERR(qp))
+ return PTR_ERR(qp);
obj = qp->uobject;
mutex_lock(&obj->mcast_lock);
@@ -2667,8 +2675,8 @@ static int kern_spec_to_ib_spec_action(struct uverbs_attr_bundle *attrs,
UVERBS_OBJECT_FLOW_ACTION,
kern_spec->action.handle,
attrs);
- if (!ib_spec->action.act)
- return -EINVAL;
+ if (IS_ERR(ib_spec->action.act))
+ return PTR_ERR(ib_spec->action.act);
ib_spec->action.size =
sizeof(struct ib_flow_spec_action_handle);
flow_resources_add(uflow_res,
@@ -2685,8 +2693,8 @@ static int kern_spec_to_ib_spec_action(struct uverbs_attr_bundle *attrs,
UVERBS_OBJECT_COUNTERS,
kern_spec->flow_count.handle,
attrs);
- if (!ib_spec->flow_count.counters)
- return -EINVAL;
+ if (IS_ERR(ib_spec->flow_count.counters))
+ return PTR_ERR(ib_spec->flow_count.counters);
ib_spec->flow_count.size =
sizeof(struct ib_flow_spec_action_count);
flow_resources_add(uflow_res,
@@ -2904,14 +2912,14 @@ static int ib_uverbs_ex_create_wq(struct uverbs_attr_bundle *attrs)
return PTR_ERR(obj);
pd = uobj_get_obj_read(pd, UVERBS_OBJECT_PD, cmd.pd_handle, attrs);
- if (!pd) {
- err = -EINVAL;
+ if (IS_ERR(pd)) {
+ err = PTR_ERR(pd);
goto err_uobj;
}
cq = uobj_get_obj_read(cq, UVERBS_OBJECT_CQ, cmd.cq_handle, attrs);
- if (!cq) {
- err = -EINVAL;
+ if (IS_ERR(cq)) {
+ err = PTR_ERR(cq);
goto err_put_pd;
}
@@ -3012,8 +3020,8 @@ static int ib_uverbs_ex_modify_wq(struct uverbs_attr_bundle *attrs)
return -EINVAL;
wq = uobj_get_obj_read(wq, UVERBS_OBJECT_WQ, cmd.wq_handle, attrs);
- if (!wq)
- return -EINVAL;
+ if (IS_ERR(wq))
+ return PTR_ERR(wq);
if (cmd.attr_mask & IB_WQ_FLAGS) {
wq_attr.flags = cmd.flags;
@@ -3096,8 +3104,8 @@ static int ib_uverbs_ex_create_rwq_ind_table(struct uverbs_attr_bundle *attrs)
num_read_wqs++) {
wq = uobj_get_obj_read(wq, UVERBS_OBJECT_WQ,
wqs_handles[num_read_wqs], attrs);
- if (!wq) {
- err = -EINVAL;
+ if (IS_ERR(wq)) {
+ err = PTR_ERR(wq);
goto put_wqs;
}
@@ -3252,8 +3260,8 @@ static int ib_uverbs_ex_create_flow(struct uverbs_attr_bundle *attrs)
}
qp = uobj_get_obj_read(qp, UVERBS_OBJECT_QP, cmd.qp_handle, attrs);
- if (!qp) {
- err = -EINVAL;
+ if (IS_ERR(qp)) {
+ err = PTR_ERR(qp);
goto err_uobj;
}
@@ -3399,15 +3407,15 @@ static int __uverbs_create_xsrq(struct uverbs_attr_bundle *attrs,
if (ib_srq_has_cq(cmd->srq_type)) {
attr.ext.cq = uobj_get_obj_read(cq, UVERBS_OBJECT_CQ,
cmd->cq_handle, attrs);
- if (!attr.ext.cq) {
- ret = -EINVAL;
+ if (IS_ERR(attr.ext.cq)) {
+ ret = PTR_ERR(attr.ext.cq);
goto err_put_xrcd;
}
}
pd = uobj_get_obj_read(pd, UVERBS_OBJECT_PD, cmd->pd_handle, attrs);
- if (!pd) {
- ret = -EINVAL;
+ if (IS_ERR(pd)) {
+ ret = PTR_ERR(pd);
goto err_put_cq;
}
@@ -3514,8 +3522,8 @@ static int ib_uverbs_modify_srq(struct uverbs_attr_bundle *attrs)
return ret;
srq = uobj_get_obj_read(srq, UVERBS_OBJECT_SRQ, cmd.srq_handle, attrs);
- if (!srq)
- return -EINVAL;
+ if (IS_ERR(srq))
+ return PTR_ERR(srq);
attr.max_wr = cmd.max_wr;
attr.srq_limit = cmd.srq_limit;
@@ -3542,8 +3550,8 @@ static int ib_uverbs_query_srq(struct uverbs_attr_bundle *attrs)
return ret;
srq = uobj_get_obj_read(srq, UVERBS_OBJECT_SRQ, cmd.srq_handle, attrs);
- if (!srq)
- return -EINVAL;
+ if (IS_ERR(srq))
+ return PTR_ERR(srq);
ret = ib_query_srq(srq, &attr);
@@ -3668,8 +3676,8 @@ static int ib_uverbs_ex_modify_cq(struct uverbs_attr_bundle *attrs)
return -EOPNOTSUPP;
cq = uobj_get_obj_read(cq, UVERBS_OBJECT_CQ, cmd.cq_handle, attrs);
- if (!cq)
- return -EINVAL;
+ if (IS_ERR(cq))
+ return PTR_ERR(cq);
ret = rdma_set_cq_moderation(cq, cmd.attr.cq_count, cmd.attr.cq_period);
diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c
index b99b3cc283b6..97a116960f31 100644
--- a/drivers/infiniband/core/verbs.c
+++ b/drivers/infiniband/core/verbs.c
@@ -2959,22 +2959,23 @@ EXPORT_SYMBOL(__rdma_block_iter_start);
bool __rdma_block_iter_next(struct ib_block_iter *biter)
{
unsigned int block_offset;
- unsigned int sg_delta;
+ unsigned int delta;
if (!biter->__sg_nents || !biter->__sg)
return false;
biter->__dma_addr = sg_dma_address(biter->__sg) + biter->__sg_advance;
block_offset = biter->__dma_addr & (BIT_ULL(biter->__pg_bit) - 1);
- sg_delta = BIT_ULL(biter->__pg_bit) - block_offset;
+ delta = BIT_ULL(biter->__pg_bit) - block_offset;
- if (sg_dma_len(biter->__sg) - biter->__sg_advance > sg_delta) {
- biter->__sg_advance += sg_delta;
- } else {
+ while (biter->__sg_nents && biter->__sg &&
+ sg_dma_len(biter->__sg) - biter->__sg_advance <= delta) {
+ delta -= sg_dma_len(biter->__sg) - biter->__sg_advance;
biter->__sg_advance = 0;
biter->__sg = sg_next(biter->__sg);
biter->__sg_nents--;
}
+ biter->__sg_advance += delta;
return true;
}
diff --git a/drivers/iommu/amd/io_pgtable_v2.c b/drivers/iommu/amd/io_pgtable_v2.c
index 232d17bd941f..c86cbbc21e88 100644
--- a/drivers/iommu/amd/io_pgtable_v2.c
+++ b/drivers/iommu/amd/io_pgtable_v2.c
@@ -264,7 +264,7 @@ static int iommu_v2_map_pages(struct io_pgtable_ops *ops, unsigned long iova,
map_size = get_alloc_page_size(pgsize);
pte = v2_alloc_pte(pdom->iop.pgd, iova, map_size, &updated);
if (!pte) {
- ret = -EINVAL;
+ ret = -ENOMEM;
goto out;
}
diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c
index 3fa66dba0a32..cbf9ec320691 100644
--- a/drivers/iommu/dma-iommu.c
+++ b/drivers/iommu/dma-iommu.c
@@ -1661,7 +1661,7 @@ int iommu_dma_prepare_msi(struct msi_desc *desc, phys_addr_t msi_addr)
static DEFINE_MUTEX(msi_prepare_lock); /* see below */
if (!domain || !domain->iova_cookie) {
- desc->iommu_cookie = NULL;
+ msi_desc_set_iommu_msi_iova(desc, 0, 0);
return 0;
}
@@ -1673,11 +1673,12 @@ int iommu_dma_prepare_msi(struct msi_desc *desc, phys_addr_t msi_addr)
mutex_lock(&msi_prepare_lock);
msi_page = iommu_dma_get_msi_page(dev, msi_addr, domain);
mutex_unlock(&msi_prepare_lock);
-
- msi_desc_set_iommu_cookie(desc, msi_page);
-
if (!msi_page)
return -ENOMEM;
+
+ msi_desc_set_iommu_msi_iova(
+ desc, msi_page->iova,
+ ilog2(cookie_msi_granule(domain->iova_cookie)));
return 0;
}
@@ -1688,18 +1689,15 @@ int iommu_dma_prepare_msi(struct msi_desc *desc, phys_addr_t msi_addr)
*/
void iommu_dma_compose_msi_msg(struct msi_desc *desc, struct msi_msg *msg)
{
- struct device *dev = msi_desc_to_dev(desc);
- const struct iommu_domain *domain = iommu_get_domain_for_dev(dev);
- const struct iommu_dma_msi_page *msi_page;
+#ifdef CONFIG_IRQ_MSI_IOMMU
+ if (desc->iommu_msi_shift) {
+ u64 msi_iova = desc->iommu_msi_iova << desc->iommu_msi_shift;
- msi_page = msi_desc_get_iommu_cookie(desc);
-
- if (!domain || !domain->iova_cookie || WARN_ON(!msi_page))
- return;
-
- msg->address_hi = upper_32_bits(msi_page->iova);
- msg->address_lo &= cookie_msi_granule(domain->iova_cookie) - 1;
- msg->address_lo += lower_32_bits(msi_page->iova);
+ msg->address_hi = upper_32_bits(msi_iova);
+ msg->address_lo = lower_32_bits(msi_iova) |
+ (msg->address_lo & ((1 << desc->iommu_msi_shift) - 1));
+ }
+#endif
}
static int iommu_dma_init(void)
diff --git a/drivers/leds/rgb/leds-pwm-multicolor.c b/drivers/leds/rgb/leds-pwm-multicolor.c
index da9d2218ae18..97aa06e2ff60 100644
--- a/drivers/leds/rgb/leds-pwm-multicolor.c
+++ b/drivers/leds/rgb/leds-pwm-multicolor.c
@@ -135,8 +135,11 @@ static int led_pwm_mc_probe(struct platform_device *pdev)
/* init the multicolor's LED class device */
cdev = &priv->mc_cdev.led_cdev;
- fwnode_property_read_u32(mcnode, "max-brightness",
+ ret = fwnode_property_read_u32(mcnode, "max-brightness",
&cdev->max_brightness);
+ if (ret)
+ goto release_mcnode;
+
cdev->flags = LED_CORE_SUSPENDRESUME;
cdev->brightness_set_blocking = led_pwm_mc_set;
diff --git a/drivers/mailbox/mailbox.c b/drivers/mailbox/mailbox.c
index 4229b9b5da98..6f54501dc776 100644
--- a/drivers/mailbox/mailbox.c
+++ b/drivers/mailbox/mailbox.c
@@ -350,11 +350,12 @@ struct mbox_chan *mbox_request_channel(struct mbox_client *cl, int index)
mutex_lock(&con_mutex);
- if (of_parse_phandle_with_args(dev->of_node, "mboxes",
- "#mbox-cells", index, &spec)) {
+ ret = of_parse_phandle_with_args(dev->of_node, "mboxes", "#mbox-cells",
+ index, &spec);
+ if (ret) {
dev_dbg(dev, "%s: can't parse \"mboxes\" property\n", __func__);
mutex_unlock(&con_mutex);
- return ERR_PTR(-ENODEV);
+ return ERR_PTR(ret);
}
chan = ERR_PTR(-EPROBE_DEFER);
diff --git a/drivers/md/dm-cache-target.c b/drivers/md/dm-cache-target.c
index e714114d495a..66608b42ee1a 100644
--- a/drivers/md/dm-cache-target.c
+++ b/drivers/md/dm-cache-target.c
@@ -2875,6 +2875,27 @@ static dm_cblock_t get_cache_dev_size(struct cache *cache)
return to_cblock(size);
}
+static bool can_resume(struct cache *cache)
+{
+ /*
+ * Disallow retrying the resume operation for devices that failed the
+ * first resume attempt, as the failure leaves the policy object partially
+ * initialized. Retrying could trigger BUG_ON when loading cache mappings
+ * into the incomplete policy object.
+ */
+ if (cache->sized && !cache->loaded_mappings) {
+ if (get_cache_mode(cache) != CM_WRITE)
+ DMERR("%s: unable to resume a failed-loaded cache, please check metadata.",
+ cache_device_name(cache));
+ else
+ DMERR("%s: unable to resume cache due to missing proper cache table reload",
+ cache_device_name(cache));
+ return false;
+ }
+
+ return true;
+}
+
static bool can_resize(struct cache *cache, dm_cblock_t new_size)
{
if (from_cblock(new_size) > from_cblock(cache->cache_size)) {
@@ -2923,6 +2944,9 @@ static int cache_preresume(struct dm_target *ti)
struct cache *cache = ti->private;
dm_cblock_t csize = get_cache_dev_size(cache);
+ if (!can_resume(cache))
+ return -EINVAL;
+
/*
* Check to see if the cache has resized.
*/
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index a20cf54d12dc..8b23b8bc5a03 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -671,6 +671,10 @@ int dm_table_add_target(struct dm_table *t, const char *type,
DMERR("%s: zero-length target", dm_device_name(t->md));
return -EINVAL;
}
+ if (start + len < start || start + len > LLONG_MAX >> SECTOR_SHIFT) {
+ DMERR("%s: too large device", dm_device_name(t->md));
+ return -EINVAL;
+ }
ti->type = dm_get_target_type(type);
if (!ti->type) {
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index f70129bc703b..4767265793de 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -1523,14 +1523,18 @@ static void __send_empty_flush(struct clone_info *ci)
{
struct dm_table *t = ci->map;
struct bio flush_bio;
+ blk_opf_t opf = REQ_OP_WRITE | REQ_PREFLUSH | REQ_SYNC;
+
+ if ((ci->io->orig_bio->bi_opf & (REQ_IDLE | REQ_SYNC)) ==
+ (REQ_IDLE | REQ_SYNC))
+ opf |= REQ_IDLE;
/*
* Use an on-stack bio for this, it's safe since we don't
* need to reference it after submit. It's just used as
* the basis for the clone(s).
*/
- bio_init(&flush_bio, ci->io->md->disk->part0, NULL, 0,
- REQ_OP_WRITE | REQ_PREFLUSH | REQ_SYNC);
+ bio_init(&flush_bio, ci->io->md->disk->part0, NULL, 0, opf);
ci->bio = &flush_bio;
ci->sector_count = 0;
diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c
index 216fe396973f..46912a7b671a 100644
--- a/drivers/media/i2c/adv7180.c
+++ b/drivers/media/i2c/adv7180.c
@@ -194,6 +194,7 @@ struct adv7180_state;
#define ADV7180_FLAG_V2 BIT(1)
#define ADV7180_FLAG_MIPI_CSI2 BIT(2)
#define ADV7180_FLAG_I2P BIT(3)
+#define ADV7180_FLAG_TEST_PATTERN BIT(4)
struct adv7180_chip_info {
unsigned int flags;
@@ -673,11 +674,15 @@ static int adv7180_init_controls(struct adv7180_state *state)
ADV7180_HUE_MAX, 1, ADV7180_HUE_DEF);
v4l2_ctrl_new_custom(&state->ctrl_hdl, &adv7180_ctrl_fast_switch, NULL);
- v4l2_ctrl_new_std_menu_items(&state->ctrl_hdl, &adv7180_ctrl_ops,
- V4L2_CID_TEST_PATTERN,
- ARRAY_SIZE(test_pattern_menu) - 1,
- 0, ARRAY_SIZE(test_pattern_menu) - 1,
- test_pattern_menu);
+ if (state->chip_info->flags & ADV7180_FLAG_TEST_PATTERN) {
+ v4l2_ctrl_new_std_menu_items(&state->ctrl_hdl,
+ &adv7180_ctrl_ops,
+ V4L2_CID_TEST_PATTERN,
+ ARRAY_SIZE(test_pattern_menu) - 1,
+ 0,
+ ARRAY_SIZE(test_pattern_menu) - 1,
+ test_pattern_menu);
+ }
state->sd.ctrl_handler = &state->ctrl_hdl;
if (state->ctrl_hdl.error) {
@@ -1209,7 +1214,7 @@ static const struct adv7180_chip_info adv7182_info = {
};
static const struct adv7180_chip_info adv7280_info = {
- .flags = ADV7180_FLAG_V2 | ADV7180_FLAG_I2P,
+ .flags = ADV7180_FLAG_V2 | ADV7180_FLAG_I2P | ADV7180_FLAG_TEST_PATTERN,
.valid_input_mask = BIT(ADV7182_INPUT_CVBS_AIN1) |
BIT(ADV7182_INPUT_CVBS_AIN2) |
BIT(ADV7182_INPUT_CVBS_AIN3) |
@@ -1223,7 +1228,8 @@ static const struct adv7180_chip_info adv7280_info = {
};
static const struct adv7180_chip_info adv7280_m_info = {
- .flags = ADV7180_FLAG_V2 | ADV7180_FLAG_MIPI_CSI2 | ADV7180_FLAG_I2P,
+ .flags = ADV7180_FLAG_V2 | ADV7180_FLAG_MIPI_CSI2 | ADV7180_FLAG_I2P |
+ ADV7180_FLAG_TEST_PATTERN,
.valid_input_mask = BIT(ADV7182_INPUT_CVBS_AIN1) |
BIT(ADV7182_INPUT_CVBS_AIN2) |
BIT(ADV7182_INPUT_CVBS_AIN3) |
@@ -1244,7 +1250,8 @@ static const struct adv7180_chip_info adv7280_m_info = {
};
static const struct adv7180_chip_info adv7281_info = {
- .flags = ADV7180_FLAG_V2 | ADV7180_FLAG_MIPI_CSI2,
+ .flags = ADV7180_FLAG_V2 | ADV7180_FLAG_MIPI_CSI2 |
+ ADV7180_FLAG_TEST_PATTERN,
.valid_input_mask = BIT(ADV7182_INPUT_CVBS_AIN1) |
BIT(ADV7182_INPUT_CVBS_AIN2) |
BIT(ADV7182_INPUT_CVBS_AIN7) |
@@ -1259,7 +1266,8 @@ static const struct adv7180_chip_info adv7281_info = {
};
static const struct adv7180_chip_info adv7281_m_info = {
- .flags = ADV7180_FLAG_V2 | ADV7180_FLAG_MIPI_CSI2,
+ .flags = ADV7180_FLAG_V2 | ADV7180_FLAG_MIPI_CSI2 |
+ ADV7180_FLAG_TEST_PATTERN,
.valid_input_mask = BIT(ADV7182_INPUT_CVBS_AIN1) |
BIT(ADV7182_INPUT_CVBS_AIN2) |
BIT(ADV7182_INPUT_CVBS_AIN3) |
@@ -1279,7 +1287,8 @@ static const struct adv7180_chip_info adv7281_m_info = {
};
static const struct adv7180_chip_info adv7281_ma_info = {
- .flags = ADV7180_FLAG_V2 | ADV7180_FLAG_MIPI_CSI2,
+ .flags = ADV7180_FLAG_V2 | ADV7180_FLAG_MIPI_CSI2 |
+ ADV7180_FLAG_TEST_PATTERN,
.valid_input_mask = BIT(ADV7182_INPUT_CVBS_AIN1) |
BIT(ADV7182_INPUT_CVBS_AIN2) |
BIT(ADV7182_INPUT_CVBS_AIN3) |
@@ -1304,7 +1313,7 @@ static const struct adv7180_chip_info adv7281_ma_info = {
};
static const struct adv7180_chip_info adv7282_info = {
- .flags = ADV7180_FLAG_V2 | ADV7180_FLAG_I2P,
+ .flags = ADV7180_FLAG_V2 | ADV7180_FLAG_I2P | ADV7180_FLAG_TEST_PATTERN,
.valid_input_mask = BIT(ADV7182_INPUT_CVBS_AIN1) |
BIT(ADV7182_INPUT_CVBS_AIN2) |
BIT(ADV7182_INPUT_CVBS_AIN7) |
@@ -1319,7 +1328,8 @@ static const struct adv7180_chip_info adv7282_info = {
};
static const struct adv7180_chip_info adv7282_m_info = {
- .flags = ADV7180_FLAG_V2 | ADV7180_FLAG_MIPI_CSI2 | ADV7180_FLAG_I2P,
+ .flags = ADV7180_FLAG_V2 | ADV7180_FLAG_MIPI_CSI2 | ADV7180_FLAG_I2P |
+ ADV7180_FLAG_TEST_PATTERN,
.valid_input_mask = BIT(ADV7182_INPUT_CVBS_AIN1) |
BIT(ADV7182_INPUT_CVBS_AIN2) |
BIT(ADV7182_INPUT_CVBS_AIN3) |
diff --git a/drivers/media/platform/qcom/camss/camss-csid.c b/drivers/media/platform/qcom/camss/camss-csid.c
index 6360314f04a6..b90e2e690f3a 100644
--- a/drivers/media/platform/qcom/camss/camss-csid.c
+++ b/drivers/media/platform/qcom/camss/camss-csid.c
@@ -239,11 +239,13 @@ static int csid_set_stream(struct v4l2_subdev *sd, int enable)
int ret;
if (enable) {
- ret = v4l2_ctrl_handler_setup(&csid->ctrls);
- if (ret < 0) {
- dev_err(csid->camss->dev,
- "could not sync v4l2 controls: %d\n", ret);
- return ret;
+ if (csid->testgen.nmodes != CSID_PAYLOAD_MODE_DISABLED) {
+ ret = v4l2_ctrl_handler_setup(&csid->ctrls);
+ if (ret < 0) {
+ dev_err(csid->camss->dev,
+ "could not sync v4l2 controls: %d\n", ret);
+ return ret;
+ }
}
if (!csid->testgen.enabled &&
@@ -318,7 +320,8 @@ static void csid_try_format(struct csid_device *csid,
break;
case MSM_CSID_PAD_SRC:
- if (csid->testgen_mode->cur.val == 0) {
+ if (csid->testgen.nmodes == CSID_PAYLOAD_MODE_DISABLED ||
+ csid->testgen_mode->cur.val == 0) {
/* Test generator is disabled, */
/* keep pad formats in sync */
u32 code = fmt->code;
@@ -368,7 +371,8 @@ static int csid_enum_mbus_code(struct v4l2_subdev *sd,
code->code = csid->formats[code->index].code;
} else {
- if (csid->testgen_mode->cur.val == 0) {
+ if (csid->testgen.nmodes == CSID_PAYLOAD_MODE_DISABLED ||
+ csid->testgen_mode->cur.val == 0) {
struct v4l2_mbus_framefmt *sink_fmt;
sink_fmt = __csid_get_format(csid, sd_state,
@@ -750,7 +754,8 @@ static int csid_link_setup(struct media_entity *entity,
/* If test generator is enabled */
/* do not allow a link from CSIPHY to CSID */
- if (csid->testgen_mode->cur.val != 0)
+ if (csid->testgen.nmodes != CSID_PAYLOAD_MODE_DISABLED &&
+ csid->testgen_mode->cur.val != 0)
return -EBUSY;
sd = media_entity_to_v4l2_subdev(remote->entity);
@@ -843,24 +848,27 @@ int msm_csid_register_entity(struct csid_device *csid,
MSM_CSID_NAME, csid->id);
v4l2_set_subdevdata(sd, csid);
- ret = v4l2_ctrl_handler_init(&csid->ctrls, 1);
- if (ret < 0) {
- dev_err(dev, "Failed to init ctrl handler: %d\n", ret);
- return ret;
- }
+ if (csid->testgen.nmodes != CSID_PAYLOAD_MODE_DISABLED) {
+ ret = v4l2_ctrl_handler_init(&csid->ctrls, 1);
+ if (ret < 0) {
+ dev_err(dev, "Failed to init ctrl handler: %d\n", ret);
+ return ret;
+ }
- csid->testgen_mode = v4l2_ctrl_new_std_menu_items(&csid->ctrls,
- &csid_ctrl_ops, V4L2_CID_TEST_PATTERN,
- csid->testgen.nmodes, 0, 0,
- csid->testgen.modes);
+ csid->testgen_mode =
+ v4l2_ctrl_new_std_menu_items(&csid->ctrls,
+ &csid_ctrl_ops, V4L2_CID_TEST_PATTERN,
+ csid->testgen.nmodes, 0, 0,
+ csid->testgen.modes);
- if (csid->ctrls.error) {
- dev_err(dev, "Failed to init ctrl: %d\n", csid->ctrls.error);
- ret = csid->ctrls.error;
- goto free_ctrl;
- }
+ if (csid->ctrls.error) {
+ dev_err(dev, "Failed to init ctrl: %d\n", csid->ctrls.error);
+ ret = csid->ctrls.error;
+ goto free_ctrl;
+ }
- csid->subdev.ctrl_handler = &csid->ctrls;
+ csid->subdev.ctrl_handler = &csid->ctrls;
+ }
ret = csid_init_formats(sd, NULL);
if (ret < 0) {
@@ -891,7 +899,8 @@ int msm_csid_register_entity(struct csid_device *csid,
media_cleanup:
media_entity_cleanup(&sd->entity);
free_ctrl:
- v4l2_ctrl_handler_free(&csid->ctrls);
+ if (csid->testgen.nmodes != CSID_PAYLOAD_MODE_DISABLED)
+ v4l2_ctrl_handler_free(&csid->ctrls);
return ret;
}
@@ -904,5 +913,6 @@ void msm_csid_unregister_entity(struct csid_device *csid)
{
v4l2_device_unregister_subdev(&csid->subdev);
media_entity_cleanup(&csid->subdev.entity);
- v4l2_ctrl_handler_free(&csid->ctrls);
+ if (csid->testgen.nmodes != CSID_PAYLOAD_MODE_DISABLED)
+ v4l2_ctrl_handler_free(&csid->ctrls);
}
diff --git a/drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.c b/drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.c
index 1dbb89f0ddb8..b2a977f1ec18 100644
--- a/drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.c
+++ b/drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.c
@@ -802,13 +802,12 @@ static int c8sectpfe_probe(struct platform_device *pdev)
}
tsin->i2c_adapter =
of_find_i2c_adapter_by_node(i2c_bus);
+ of_node_put(i2c_bus);
if (!tsin->i2c_adapter) {
dev_err(&pdev->dev, "No i2c adapter found\n");
- of_node_put(i2c_bus);
ret = -ENODEV;
goto err_node_put;
}
- of_node_put(i2c_bus);
tsin->rst_gpio = of_get_named_gpio(child, "reset-gpios", 0);
diff --git a/drivers/media/test-drivers/vivid/vivid-kthread-cap.c b/drivers/media/test-drivers/vivid/vivid-kthread-cap.c
index 690daada7db4..54e6a6772035 100644
--- a/drivers/media/test-drivers/vivid/vivid-kthread-cap.c
+++ b/drivers/media/test-drivers/vivid/vivid-kthread-cap.c
@@ -894,9 +894,14 @@ static int vivid_thread_vid_cap(void *data)
next_jiffies_since_start = jiffies_since_start;
wait_jiffies = next_jiffies_since_start - jiffies_since_start;
- while (time_is_after_jiffies(cur_jiffies + wait_jiffies) &&
- !kthread_should_stop())
- schedule();
+ if (!time_is_after_jiffies(cur_jiffies + wait_jiffies))
+ continue;
+
+ wait_queue_head_t wait;
+
+ init_waitqueue_head(&wait);
+ wait_event_interruptible_timeout(wait, kthread_should_stop(),
+ cur_jiffies + wait_jiffies - jiffies);
}
dprintk(dev, 1, "Video Capture Thread End\n");
return 0;
diff --git a/drivers/media/test-drivers/vivid/vivid-kthread-out.c b/drivers/media/test-drivers/vivid/vivid-kthread-out.c
index 0833e021bb11..8a17a01e6e42 100644
--- a/drivers/media/test-drivers/vivid/vivid-kthread-out.c
+++ b/drivers/media/test-drivers/vivid/vivid-kthread-out.c
@@ -235,9 +235,14 @@ static int vivid_thread_vid_out(void *data)
next_jiffies_since_start = jiffies_since_start;
wait_jiffies = next_jiffies_since_start - jiffies_since_start;
- while (time_is_after_jiffies(cur_jiffies + wait_jiffies) &&
- !kthread_should_stop())
- schedule();
+ if (!time_is_after_jiffies(cur_jiffies + wait_jiffies))
+ continue;
+
+ wait_queue_head_t wait;
+
+ init_waitqueue_head(&wait);
+ wait_event_interruptible_timeout(wait, kthread_should_stop(),
+ cur_jiffies + wait_jiffies - jiffies);
}
dprintk(dev, 1, "Video Output Thread End\n");
return 0;
diff --git a/drivers/media/test-drivers/vivid/vivid-kthread-touch.c b/drivers/media/test-drivers/vivid/vivid-kthread-touch.c
index fa711ee36a3f..c862689786b6 100644
--- a/drivers/media/test-drivers/vivid/vivid-kthread-touch.c
+++ b/drivers/media/test-drivers/vivid/vivid-kthread-touch.c
@@ -135,9 +135,14 @@ static int vivid_thread_touch_cap(void *data)
next_jiffies_since_start = jiffies_since_start;
wait_jiffies = next_jiffies_since_start - jiffies_since_start;
- while (time_is_after_jiffies(cur_jiffies + wait_jiffies) &&
- !kthread_should_stop())
- schedule();
+ if (!time_is_after_jiffies(cur_jiffies + wait_jiffies))
+ continue;
+
+ wait_queue_head_t wait;
+
+ init_waitqueue_head(&wait);
+ wait_event_interruptible_timeout(wait, kthread_should_stop(),
+ cur_jiffies + wait_jiffies - jiffies);
}
dprintk(dev, 1, "Touch Capture Thread End\n");
return 0;
diff --git a/drivers/media/test-drivers/vivid/vivid-sdr-cap.c b/drivers/media/test-drivers/vivid/vivid-sdr-cap.c
index 0ae5628b86c9..abccd1d0109e 100644
--- a/drivers/media/test-drivers/vivid/vivid-sdr-cap.c
+++ b/drivers/media/test-drivers/vivid/vivid-sdr-cap.c
@@ -206,9 +206,14 @@ static int vivid_thread_sdr_cap(void *data)
next_jiffies_since_start = jiffies_since_start;
wait_jiffies = next_jiffies_since_start - jiffies_since_start;
- while (time_is_after_jiffies(cur_jiffies + wait_jiffies) &&
- !kthread_should_stop())
- schedule();
+ if (!time_is_after_jiffies(cur_jiffies + wait_jiffies))
+ continue;
+
+ wait_queue_head_t wait;
+
+ init_waitqueue_head(&wait);
+ wait_event_interruptible_timeout(wait, kthread_should_stop(),
+ cur_jiffies + wait_jiffies - jiffies);
}
dprintk(dev, 1, "SDR Capture Thread End\n");
return 0;
diff --git a/drivers/media/usb/cx231xx/cx231xx-417.c b/drivers/media/usb/cx231xx/cx231xx-417.c
index c5e21785fafe..02343e88cc61 100644
--- a/drivers/media/usb/cx231xx/cx231xx-417.c
+++ b/drivers/media/usb/cx231xx/cx231xx-417.c
@@ -1722,6 +1722,8 @@ static void cx231xx_video_dev_init(
vfd->lock = &dev->lock;
vfd->release = video_device_release_empty;
vfd->ctrl_handler = &dev->mpeg_ctrl_handler.hdl;
+ vfd->device_caps = V4L2_CAP_READWRITE | V4L2_CAP_STREAMING |
+ V4L2_CAP_VIDEO_CAPTURE;
video_set_drvdata(vfd, dev);
if (dev->tuner_type == TUNER_ABSENT) {
v4l2_disable_ioctl(vfd, VIDIOC_G_FREQUENCY);
diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c
index bd4677a6e653..0aaa4fce61da 100644
--- a/drivers/media/usb/uvc/uvc_v4l2.c
+++ b/drivers/media/usb/uvc/uvc_v4l2.c
@@ -36,6 +36,12 @@ static int uvc_ioctl_ctrl_map(struct uvc_video_chain *chain,
unsigned int size;
int ret;
+ if (xmap->data_type > UVC_CTRL_DATA_TYPE_BITMASK) {
+ uvc_dbg(chain->dev, CONTROL,
+ "Unsupported UVC data type %u\n", xmap->data_type);
+ return -EINVAL;
+ }
+
map = kzalloc(sizeof(*map), GFP_KERNEL);
if (map == NULL)
return -ENOMEM;
diff --git a/drivers/mmc/host/dw_mmc-exynos.c b/drivers/mmc/host/dw_mmc-exynos.c
index 9f20ac524c8b..2a5c3c822f6a 100644
--- a/drivers/mmc/host/dw_mmc-exynos.c
+++ b/drivers/mmc/host/dw_mmc-exynos.c
@@ -28,6 +28,8 @@ enum dw_mci_exynos_type {
DW_MCI_TYPE_EXYNOS5420_SMU,
DW_MCI_TYPE_EXYNOS7,
DW_MCI_TYPE_EXYNOS7_SMU,
+ DW_MCI_TYPE_EXYNOS7870,
+ DW_MCI_TYPE_EXYNOS7870_SMU,
DW_MCI_TYPE_ARTPEC8,
};
@@ -70,6 +72,12 @@ static struct dw_mci_exynos_compatible {
}, {
.compatible = "samsung,exynos7-dw-mshc-smu",
.ctrl_type = DW_MCI_TYPE_EXYNOS7_SMU,
+ }, {
+ .compatible = "samsung,exynos7870-dw-mshc",
+ .ctrl_type = DW_MCI_TYPE_EXYNOS7870,
+ }, {
+ .compatible = "samsung,exynos7870-dw-mshc-smu",
+ .ctrl_type = DW_MCI_TYPE_EXYNOS7870_SMU,
}, {
.compatible = "axis,artpec8-dw-mshc",
.ctrl_type = DW_MCI_TYPE_ARTPEC8,
@@ -86,6 +94,8 @@ static inline u8 dw_mci_exynos_get_ciu_div(struct dw_mci *host)
return EXYNOS4210_FIXED_CIU_CLK_DIV;
else if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS7 ||
priv->ctrl_type == DW_MCI_TYPE_EXYNOS7_SMU ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870 ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870_SMU ||
priv->ctrl_type == DW_MCI_TYPE_ARTPEC8)
return SDMMC_CLKSEL_GET_DIV(mci_readl(host, CLKSEL64)) + 1;
else
@@ -101,7 +111,8 @@ static void dw_mci_exynos_config_smu(struct dw_mci *host)
* set for non-ecryption mode at this time.
*/
if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS5420_SMU ||
- priv->ctrl_type == DW_MCI_TYPE_EXYNOS7_SMU) {
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7_SMU ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870_SMU) {
mci_writel(host, MPSBEGIN0, 0);
mci_writel(host, MPSEND0, SDMMC_ENDING_SEC_NR_MAX);
mci_writel(host, MPSCTRL0, SDMMC_MPSCTRL_SECURE_WRITE_BIT |
@@ -127,6 +138,12 @@ static int dw_mci_exynos_priv_init(struct dw_mci *host)
DQS_CTRL_GET_RD_DELAY(priv->saved_strobe_ctrl);
}
+ if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870 ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870_SMU) {
+ /* Quirk needed for certain Exynos SoCs */
+ host->quirks |= DW_MMC_QUIRK_FIFO64_32;
+ }
+
if (priv->ctrl_type == DW_MCI_TYPE_ARTPEC8) {
/* Quirk needed for the ARTPEC-8 SoC */
host->quirks |= DW_MMC_QUIRK_EXTENDED_TMOUT;
@@ -144,6 +161,8 @@ static void dw_mci_exynos_set_clksel_timing(struct dw_mci *host, u32 timing)
if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS7 ||
priv->ctrl_type == DW_MCI_TYPE_EXYNOS7_SMU ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870 ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870_SMU ||
priv->ctrl_type == DW_MCI_TYPE_ARTPEC8)
clksel = mci_readl(host, CLKSEL64);
else
@@ -153,6 +172,8 @@ static void dw_mci_exynos_set_clksel_timing(struct dw_mci *host, u32 timing)
if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS7 ||
priv->ctrl_type == DW_MCI_TYPE_EXYNOS7_SMU ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870 ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870_SMU ||
priv->ctrl_type == DW_MCI_TYPE_ARTPEC8)
mci_writel(host, CLKSEL64, clksel);
else
@@ -223,6 +244,8 @@ static int dw_mci_exynos_resume_noirq(struct device *dev)
if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS7 ||
priv->ctrl_type == DW_MCI_TYPE_EXYNOS7_SMU ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870 ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870_SMU ||
priv->ctrl_type == DW_MCI_TYPE_ARTPEC8)
clksel = mci_readl(host, CLKSEL64);
else
@@ -231,6 +254,8 @@ static int dw_mci_exynos_resume_noirq(struct device *dev)
if (clksel & SDMMC_CLKSEL_WAKEUP_INT) {
if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS7 ||
priv->ctrl_type == DW_MCI_TYPE_EXYNOS7_SMU ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870 ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870_SMU ||
priv->ctrl_type == DW_MCI_TYPE_ARTPEC8)
mci_writel(host, CLKSEL64, clksel);
else
@@ -410,6 +435,8 @@ static inline u8 dw_mci_exynos_get_clksmpl(struct dw_mci *host)
if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS7 ||
priv->ctrl_type == DW_MCI_TYPE_EXYNOS7_SMU ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870 ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870_SMU ||
priv->ctrl_type == DW_MCI_TYPE_ARTPEC8)
return SDMMC_CLKSEL_CCLK_SAMPLE(mci_readl(host, CLKSEL64));
else
@@ -423,6 +450,8 @@ static inline void dw_mci_exynos_set_clksmpl(struct dw_mci *host, u8 sample)
if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS7 ||
priv->ctrl_type == DW_MCI_TYPE_EXYNOS7_SMU ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870 ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870_SMU ||
priv->ctrl_type == DW_MCI_TYPE_ARTPEC8)
clksel = mci_readl(host, CLKSEL64);
else
@@ -430,6 +459,8 @@ static inline void dw_mci_exynos_set_clksmpl(struct dw_mci *host, u8 sample)
clksel = SDMMC_CLKSEL_UP_SAMPLE(clksel, sample);
if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS7 ||
priv->ctrl_type == DW_MCI_TYPE_EXYNOS7_SMU ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870 ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870_SMU ||
priv->ctrl_type == DW_MCI_TYPE_ARTPEC8)
mci_writel(host, CLKSEL64, clksel);
else
@@ -444,6 +475,8 @@ static inline u8 dw_mci_exynos_move_next_clksmpl(struct dw_mci *host)
if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS7 ||
priv->ctrl_type == DW_MCI_TYPE_EXYNOS7_SMU ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870 ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870_SMU ||
priv->ctrl_type == DW_MCI_TYPE_ARTPEC8)
clksel = mci_readl(host, CLKSEL64);
else
@@ -454,6 +487,8 @@ static inline u8 dw_mci_exynos_move_next_clksmpl(struct dw_mci *host)
if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS7 ||
priv->ctrl_type == DW_MCI_TYPE_EXYNOS7_SMU ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870 ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870_SMU ||
priv->ctrl_type == DW_MCI_TYPE_ARTPEC8)
mci_writel(host, CLKSEL64, clksel);
else
@@ -633,6 +668,10 @@ static const struct of_device_id dw_mci_exynos_match[] = {
.data = &exynos_drv_data, },
{ .compatible = "samsung,exynos7-dw-mshc-smu",
.data = &exynos_drv_data, },
+ { .compatible = "samsung,exynos7870-dw-mshc",
+ .data = &exynos_drv_data, },
+ { .compatible = "samsung,exynos7870-dw-mshc-smu",
+ .data = &exynos_drv_data, },
{ .compatible = "axis,artpec8-dw-mshc",
.data = &artpec_drv_data, },
{},
diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
index 5a5cc40d4bc3..c71d9956b398 100644
--- a/drivers/mmc/host/sdhci-pci-core.c
+++ b/drivers/mmc/host/sdhci-pci-core.c
@@ -613,8 +613,12 @@ static void sdhci_intel_set_power(struct sdhci_host *host, unsigned char mode,
sdhci_set_power(host, mode, vdd);
- if (mode == MMC_POWER_OFF)
+ if (mode == MMC_POWER_OFF) {
+ if (slot->chip->pdev->device == PCI_DEVICE_ID_INTEL_APL_SD ||
+ slot->chip->pdev->device == PCI_DEVICE_ID_INTEL_BYT_SD)
+ usleep_range(15000, 17500);
return;
+ }
/*
* Bus power might not enable after D3 -> D0 transition due to the
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 536d21028a11..6822a3249286 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2049,10 +2049,15 @@ void sdhci_set_clock(struct sdhci_host *host, unsigned int clock)
host->mmc->actual_clock = 0;
- sdhci_writew(host, 0, SDHCI_CLOCK_CONTROL);
+ clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL);
+ if (clk & SDHCI_CLOCK_CARD_EN)
+ sdhci_writew(host, clk & ~SDHCI_CLOCK_CARD_EN,
+ SDHCI_CLOCK_CONTROL);
- if (clock == 0)
+ if (clock == 0) {
+ sdhci_writew(host, 0, SDHCI_CLOCK_CONTROL);
return;
+ }
clk = sdhci_calc_clk(host, clock, &host->mmc->actual_clock);
sdhci_enable_clk(host, clk);
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index ded9e369e403..3cedadef9c8a 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -2431,7 +2431,7 @@ static int __bond_release_one(struct net_device *bond_dev,
RCU_INIT_POINTER(bond->current_arp_slave, NULL);
- if (!all && (!bond->params.fail_over_mac ||
+ if (!all && (bond->params.fail_over_mac != BOND_FOM_ACTIVE ||
BOND_MODE(bond) != BOND_MODE_ACTIVEBACKUP)) {
if (ether_addr_equal_64bits(bond_dev->dev_addr, slave->perm_hwaddr) &&
bond_has_slaves(bond))
diff --git a/drivers/net/can/c_can/c_can_platform.c b/drivers/net/can/c_can/c_can_platform.c
index c5d7093d5413..c29862b3bb1f 100644
--- a/drivers/net/can/c_can/c_can_platform.c
+++ b/drivers/net/can/c_can/c_can_platform.c
@@ -334,7 +334,7 @@ static int c_can_plat_probe(struct platform_device *pdev)
/* Check if we need custom RAMINIT via syscon. Mostly for TI
* platforms. Only supported with DT boot.
*/
- if (np && of_property_read_bool(np, "syscon-raminit")) {
+ if (np && of_property_present(np, "syscon-raminit")) {
u32 id;
struct c_can_raminit *raminit = &priv->raminit_sys;
diff --git a/drivers/net/can/slcan/slcan-core.c b/drivers/net/can/slcan/slcan-core.c
index f4db77007c13..982637f8ea2f 100644
--- a/drivers/net/can/slcan/slcan-core.c
+++ b/drivers/net/can/slcan/slcan-core.c
@@ -71,12 +71,21 @@ MODULE_AUTHOR("Dario Binacchi <dario.binacchi@xxxxxxxxxxxxxxxxxxxx>");
#define SLCAN_CMD_LEN 1
#define SLCAN_SFF_ID_LEN 3
#define SLCAN_EFF_ID_LEN 8
+#define SLCAN_DATA_LENGTH_LEN 1
+#define SLCAN_ERROR_LEN 1
#define SLCAN_STATE_LEN 1
#define SLCAN_STATE_BE_RXCNT_LEN 3
#define SLCAN_STATE_BE_TXCNT_LEN 3
-#define SLCAN_STATE_FRAME_LEN (1 + SLCAN_CMD_LEN + \
- SLCAN_STATE_BE_RXCNT_LEN + \
- SLCAN_STATE_BE_TXCNT_LEN)
+#define SLCAN_STATE_MSG_LEN (SLCAN_CMD_LEN + \
+ SLCAN_STATE_LEN + \
+ SLCAN_STATE_BE_RXCNT_LEN + \
+ SLCAN_STATE_BE_TXCNT_LEN)
+#define SLCAN_ERROR_MSG_LEN_MIN (SLCAN_CMD_LEN + \
+ SLCAN_ERROR_LEN + \
+ SLCAN_DATA_LENGTH_LEN)
+#define SLCAN_FRAME_MSG_LEN_MIN (SLCAN_CMD_LEN + \
+ SLCAN_SFF_ID_LEN + \
+ SLCAN_DATA_LENGTH_LEN)
struct slcan {
struct can_priv can;
@@ -176,6 +185,9 @@ static void slcan_bump_frame(struct slcan *sl)
u32 tmpid;
char *cmd = sl->rbuff;
+ if (sl->rcount < SLCAN_FRAME_MSG_LEN_MIN)
+ return;
+
skb = alloc_can_skb(sl->dev, &cf);
if (unlikely(!skb)) {
sl->dev->stats.rx_dropped++;
@@ -281,7 +293,7 @@ static void slcan_bump_state(struct slcan *sl)
return;
}
- if (state == sl->can.state || sl->rcount < SLCAN_STATE_FRAME_LEN)
+ if (state == sl->can.state || sl->rcount != SLCAN_STATE_MSG_LEN)
return;
cmd += SLCAN_STATE_BE_RXCNT_LEN + SLCAN_CMD_LEN + 1;
@@ -328,6 +340,9 @@ static void slcan_bump_err(struct slcan *sl)
bool rx_errors = false, tx_errors = false, rx_over_errors = false;
int i, len;
+ if (sl->rcount < SLCAN_ERROR_MSG_LEN_MIN)
+ return;
+
/* get len from sanitized ASCII value */
len = cmd[1];
if (len >= '0' && len < '9')
@@ -456,8 +471,7 @@ static void slcan_bump(struct slcan *sl)
static void slcan_unesc(struct slcan *sl, unsigned char s)
{
if ((s == '\r') || (s == '\a')) { /* CR or BEL ends the pdu */
- if (!test_and_clear_bit(SLF_ERROR, &sl->flags) &&
- sl->rcount > 4)
+ if (!test_and_clear_bit(SLF_ERROR, &sl->flags))
slcan_bump(sl);
sl->rcount = 0;
diff --git a/drivers/net/ethernet/apm/xgene-v2/main.c b/drivers/net/ethernet/apm/xgene-v2/main.c
index 379d19d18dbe..5808e3c73a8f 100644
--- a/drivers/net/ethernet/apm/xgene-v2/main.c
+++ b/drivers/net/ethernet/apm/xgene-v2/main.c
@@ -9,8 +9,6 @@
#include "main.h"
-static const struct acpi_device_id xge_acpi_match[];
-
static int xge_get_resources(struct xge_pdata *pdata)
{
struct platform_device *pdev;
@@ -733,7 +731,7 @@ MODULE_DEVICE_TABLE(acpi, xge_acpi_match);
static struct platform_driver xge_driver = {
.driver = {
.name = "xgene-enet-v2",
- .acpi_match_table = ACPI_PTR(xge_acpi_match),
+ .acpi_match_table = xge_acpi_match,
},
.probe = xge_probe,
.remove = xge_remove,
diff --git a/drivers/net/ethernet/freescale/enetc/enetc.c b/drivers/net/ethernet/freescale/enetc/enetc.c
index 230b317d93da..bf49c07c8b51 100644
--- a/drivers/net/ethernet/freescale/enetc/enetc.c
+++ b/drivers/net/ethernet/freescale/enetc/enetc.c
@@ -1536,6 +1536,16 @@ static void enetc_xdp_drop(struct enetc_bdr *rx_ring, int rx_ring_first,
}
}
+static void enetc_bulk_flip_buff(struct enetc_bdr *rx_ring, int rx_ring_first,
+ int rx_ring_last)
+{
+ while (rx_ring_first != rx_ring_last) {
+ enetc_flip_rx_buff(rx_ring,
+ &rx_ring->rx_swbd[rx_ring_first]);
+ enetc_bdr_idx_inc(rx_ring, &rx_ring_first);
+ }
+}
+
static int enetc_clean_rx_ring_xdp(struct enetc_bdr *rx_ring,
struct napi_struct *napi, int work_limit,
struct bpf_prog *prog)
@@ -1659,11 +1669,7 @@ static int enetc_clean_rx_ring_xdp(struct enetc_bdr *rx_ring,
enetc_xdp_drop(rx_ring, orig_i, i);
rx_ring->stats.xdp_redirect_failures++;
} else {
- while (orig_i != i) {
- enetc_flip_rx_buff(rx_ring,
- &rx_ring->rx_swbd[orig_i]);
- enetc_bdr_idx_inc(rx_ring, &orig_i);
- }
+ enetc_bulk_flip_buff(rx_ring, orig_i, i);
xdp_redirect_frm_cnt++;
rx_ring->stats.xdp_redirect++;
}
diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c
index a163e7717a53..1f62d1183156 100644
--- a/drivers/net/ethernet/intel/ice/ice_ethtool.c
+++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c
@@ -3373,8 +3373,7 @@ static u32 ice_get_combined_cnt(struct ice_vsi *vsi)
ice_for_each_q_vector(vsi, q_idx) {
struct ice_q_vector *q_vector = vsi->q_vectors[q_idx];
- if (q_vector->rx.rx_ring && q_vector->tx.tx_ring)
- combined++;
+ combined += min(q_vector->num_ring_tx, q_vector->num_ring_rx);
}
return combined;
diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl.c b/drivers/net/ethernet/intel/ice/ice_virtchnl.c
index 42d8e5e771b7..fa9d928081d6 100644
--- a/drivers/net/ethernet/intel/ice/ice_virtchnl.c
+++ b/drivers/net/ethernet/intel/ice/ice_virtchnl.c
@@ -3551,7 +3551,6 @@ static int ice_vc_repr_add_mac(struct ice_vf *vf, u8 *msg)
}
ice_vfhw_mac_add(vf, &al->list[i]);
- vf->num_mac++;
break;
}
diff --git a/drivers/net/ethernet/marvell/octeontx2/Kconfig b/drivers/net/ethernet/marvell/octeontx2/Kconfig
index 993ac180a5db..a32d85d6f599 100644
--- a/drivers/net/ethernet/marvell/octeontx2/Kconfig
+++ b/drivers/net/ethernet/marvell/octeontx2/Kconfig
@@ -32,6 +32,7 @@ config OCTEONTX2_PF
tristate "Marvell OcteonTX2 NIC Physical Function driver"
select OCTEONTX2_MBOX
select NET_DEVLINK
+ select PAGE_POOL
depends on (64BIT && COMPILE_TEST) || ARM64
select DIMLIB
depends on PCI
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c
index f9faa5b23bb9..5cd45846237e 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c
@@ -13,19 +13,26 @@
/* RVU LMTST */
#define LMT_TBL_OP_READ 0
#define LMT_TBL_OP_WRITE 1
-#define LMT_MAP_TABLE_SIZE (128 * 1024)
#define LMT_MAPTBL_ENTRY_SIZE 16
+#define LMT_MAX_VFS 256
+
+#define LMT_MAP_ENTRY_ENA BIT_ULL(20)
+#define LMT_MAP_ENTRY_LINES GENMASK_ULL(18, 16)
/* Function to perform operations (read/write) on lmtst map table */
static int lmtst_map_table_ops(struct rvu *rvu, u32 index, u64 *val,
int lmt_tbl_op)
{
void __iomem *lmt_map_base;
- u64 tbl_base;
+ u64 tbl_base, cfg;
+ int pfs, vfs;
tbl_base = rvu_read64(rvu, BLKADDR_APR, APR_AF_LMT_MAP_BASE);
+ cfg = rvu_read64(rvu, BLKADDR_APR, APR_AF_LMT_CFG);
+ vfs = 1 << (cfg & 0xF);
+ pfs = 1 << ((cfg >> 4) & 0x7);
- lmt_map_base = ioremap_wc(tbl_base, LMT_MAP_TABLE_SIZE);
+ lmt_map_base = ioremap_wc(tbl_base, pfs * vfs * LMT_MAPTBL_ENTRY_SIZE);
if (!lmt_map_base) {
dev_err(rvu->dev, "Failed to setup lmt map table mapping!!\n");
return -ENOMEM;
@@ -35,6 +42,13 @@ static int lmtst_map_table_ops(struct rvu *rvu, u32 index, u64 *val,
*val = readq(lmt_map_base + index);
} else {
writeq((*val), (lmt_map_base + index));
+
+ cfg = FIELD_PREP(LMT_MAP_ENTRY_ENA, 0x1);
+ /* 2048 LMTLINES */
+ cfg |= FIELD_PREP(LMT_MAP_ENTRY_LINES, 0x6);
+
+ writeq(cfg, (lmt_map_base + (index + 8)));
+
/* Flushing the AP interceptor cache to make APR_LMT_MAP_ENTRY_S
* changes effective. Write 1 for flush and read is being used as a
* barrier and sets up a data dependency. Write to 0 after a write
@@ -52,7 +66,7 @@ static int lmtst_map_table_ops(struct rvu *rvu, u32 index, u64 *val,
#define LMT_MAP_TBL_W1_OFF 8
static u32 rvu_get_lmtst_tbl_index(struct rvu *rvu, u16 pcifunc)
{
- return ((rvu_get_pf(pcifunc) * rvu->hw->total_vfs) +
+ return ((rvu_get_pf(pcifunc) * LMT_MAX_VFS) +
(pcifunc & RVU_PFVF_FUNC_MASK)) * LMT_MAPTBL_ENTRY_SIZE;
}
@@ -69,7 +83,7 @@ static int rvu_get_lmtaddr(struct rvu *rvu, u16 pcifunc,
mutex_lock(&rvu->rsrc_lock);
rvu_write64(rvu, BLKADDR_RVUM, RVU_AF_SMMU_ADDR_REQ, iova);
- pf = rvu_get_pf(pcifunc) & 0x1F;
+ pf = rvu_get_pf(pcifunc) & RVU_PFVF_PF_MASK;
val = BIT_ULL(63) | BIT_ULL(14) | BIT_ULL(13) | pf << 8 |
((pcifunc & RVU_PFVF_FUNC_MASK) & 0xFF);
rvu_write64(rvu, BLKADDR_RVUM, RVU_AF_SMMU_TXN_REQ, val);
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
index a3c1d82032f5..aa2ab987eb75 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
@@ -580,6 +580,7 @@ static ssize_t rvu_dbg_lmtst_map_table_display(struct file *filp,
u64 lmt_addr, val, tbl_base;
int pf, vf, num_vfs, hw_vfs;
void __iomem *lmt_map_base;
+ int apr_pfs, apr_vfs;
int buf_size = 10240;
size_t off = 0;
int index = 0;
@@ -595,8 +596,12 @@ static ssize_t rvu_dbg_lmtst_map_table_display(struct file *filp,
return -ENOMEM;
tbl_base = rvu_read64(rvu, BLKADDR_APR, APR_AF_LMT_MAP_BASE);
+ val = rvu_read64(rvu, BLKADDR_APR, APR_AF_LMT_CFG);
+ apr_vfs = 1 << (val & 0xF);
+ apr_pfs = 1 << ((val >> 4) & 0x7);
- lmt_map_base = ioremap_wc(tbl_base, 128 * 1024);
+ lmt_map_base = ioremap_wc(tbl_base, apr_pfs * apr_vfs *
+ LMT_MAPTBL_ENTRY_SIZE);
if (!lmt_map_base) {
dev_err(rvu->dev, "Failed to setup lmt map table mapping!!\n");
kfree(buf);
@@ -618,7 +623,7 @@ static ssize_t rvu_dbg_lmtst_map_table_display(struct file *filp,
off += scnprintf(&buf[off], buf_size - 1 - off, "PF%d \t\t\t",
pf);
- index = pf * rvu->hw->total_vfs * LMT_MAPTBL_ENTRY_SIZE;
+ index = pf * apr_vfs * LMT_MAPTBL_ENTRY_SIZE;
off += scnprintf(&buf[off], buf_size - 1 - off, " 0x%llx\t\t",
(tbl_base + index));
lmt_addr = readq(lmt_map_base + index);
@@ -631,7 +636,7 @@ static ssize_t rvu_dbg_lmtst_map_table_display(struct file *filp,
/* Reading num of VFs per PF */
rvu_get_pf_numvfs(rvu, pf, &num_vfs, &hw_vfs);
for (vf = 0; vf < num_vfs; vf++) {
- index = (pf * rvu->hw->total_vfs * 16) +
+ index = (pf * apr_vfs * LMT_MAPTBL_ENTRY_SIZE) +
((vf + 1) * LMT_MAPTBL_ENTRY_SIZE);
off += scnprintf(&buf[off], buf_size - 1 - off,
"PF%d:VF%d \t\t", pf, vf);
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/cn10k.c b/drivers/net/ethernet/marvell/octeontx2/nic/cn10k.c
index 8663bdf014d8..7417087b6db5 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/cn10k.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/cn10k.c
@@ -107,12 +107,13 @@ int cn10k_sq_aq_init(void *dev, u16 qidx, u16 sqb_aura)
}
#define NPA_MAX_BURST 16
-void cn10k_refill_pool_ptrs(void *dev, struct otx2_cq_queue *cq)
+int cn10k_refill_pool_ptrs(void *dev, struct otx2_cq_queue *cq)
{
struct otx2_nic *pfvf = dev;
+ int cnt = cq->pool_ptrs;
u64 ptrs[NPA_MAX_BURST];
- int num_ptrs = 1;
dma_addr_t bufptr;
+ int num_ptrs = 1;
/* Refill pool with new buffers */
while (cq->pool_ptrs) {
@@ -131,6 +132,7 @@ void cn10k_refill_pool_ptrs(void *dev, struct otx2_cq_queue *cq)
num_ptrs = 1;
}
}
+ return cnt - cq->pool_ptrs;
}
void cn10k_sqe_flush(void *dev, struct otx2_snd_queue *sq, int size, int qidx)
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/cn10k.h b/drivers/net/ethernet/marvell/octeontx2/nic/cn10k.h
index 8ae96815865e..c1861f7de254 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/cn10k.h
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/cn10k.h
@@ -24,7 +24,7 @@ static inline int mtu_to_dwrr_weight(struct otx2_nic *pfvf, int mtu)
return weight;
}
-void cn10k_refill_pool_ptrs(void *dev, struct otx2_cq_queue *cq);
+int cn10k_refill_pool_ptrs(void *dev, struct otx2_cq_queue *cq);
void cn10k_sqe_flush(void *dev, struct otx2_snd_queue *sq, int size, int qidx);
int cn10k_sq_aq_init(void *dev, u16 qidx, u16 sqb_aura);
int cn10k_lmtst_init(struct otx2_nic *pfvf);
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
index d05f91f97a9a..4fc73ac721b0 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
@@ -513,11 +513,32 @@ void otx2_config_irq_coalescing(struct otx2_nic *pfvf, int qidx)
(pfvf->hw.cq_ecount_wait - 1));
}
+static int otx2_alloc_pool_buf(struct otx2_nic *pfvf, struct otx2_pool *pool,
+ dma_addr_t *dma)
+{
+ unsigned int offset = 0;
+ struct page *page;
+ size_t sz;
+
+ sz = SKB_DATA_ALIGN(pool->rbsize);
+ sz = ALIGN(sz, OTX2_ALIGN);
+
+ page = page_pool_alloc_frag(pool->page_pool, &offset, sz, GFP_ATOMIC);
+ if (unlikely(!page))
+ return -ENOMEM;
+
+ *dma = page_pool_get_dma_addr(page) + offset;
+ return 0;
+}
+
static int __otx2_alloc_rbuf(struct otx2_nic *pfvf, struct otx2_pool *pool,
dma_addr_t *dma)
{
u8 *buf;
+ if (pool->page_pool)
+ return otx2_alloc_pool_buf(pfvf, pool, dma);
+
buf = napi_alloc_frag_align(pool->rbsize, OTX2_ALIGN);
if (unlikely(!buf))
return -ENOMEM;
@@ -546,20 +567,8 @@ int otx2_alloc_rbuf(struct otx2_nic *pfvf, struct otx2_pool *pool,
int otx2_alloc_buffer(struct otx2_nic *pfvf, struct otx2_cq_queue *cq,
dma_addr_t *dma)
{
- if (unlikely(__otx2_alloc_rbuf(pfvf, cq->rbpool, dma))) {
- struct refill_work *work;
- struct delayed_work *dwork;
-
- work = &pfvf->refill_wrk[cq->cq_idx];
- dwork = &work->pool_refill_work;
- /* Schedule a task if no other task is running */
- if (!cq->refill_task_sched) {
- cq->refill_task_sched = true;
- schedule_delayed_work(dwork,
- msecs_to_jiffies(100));
- }
+ if (unlikely(__otx2_alloc_rbuf(pfvf, cq->rbpool, dma)))
return -ENOMEM;
- }
return 0;
}
@@ -967,6 +976,7 @@ static int otx2_cq_init(struct otx2_nic *pfvf, u16 qidx)
int err, pool_id, non_xdp_queues;
struct nix_aq_enq_req *aq;
struct otx2_cq_queue *cq;
+ struct otx2_pool *pool;
cq = &qset->cq[qidx];
cq->cq_idx = qidx;
@@ -975,8 +985,13 @@ static int otx2_cq_init(struct otx2_nic *pfvf, u16 qidx)
cq->cq_type = CQ_RX;
cq->cint_idx = qidx;
cq->cqe_cnt = qset->rqe_cnt;
- if (pfvf->xdp_prog)
+ if (pfvf->xdp_prog) {
+ pool = &qset->pool[qidx];
xdp_rxq_info_reg(&cq->xdp_rxq, pfvf->netdev, qidx, 0);
+ xdp_rxq_info_reg_mem_model(&cq->xdp_rxq,
+ MEM_TYPE_PAGE_POOL,
+ pool->page_pool);
+ }
} else if (qidx < non_xdp_queues) {
cq->cq_type = CQ_TX;
cq->cint_idx = qidx - pfvf->hw.rx_queues;
@@ -1054,39 +1069,20 @@ static int otx2_cq_init(struct otx2_nic *pfvf, u16 qidx)
static void otx2_pool_refill_task(struct work_struct *work)
{
struct otx2_cq_queue *cq;
- struct otx2_pool *rbpool;
struct refill_work *wrk;
- int qidx, free_ptrs = 0;
struct otx2_nic *pfvf;
- dma_addr_t bufptr;
+ int qidx;
wrk = container_of(work, struct refill_work, pool_refill_work.work);
pfvf = wrk->pf;
qidx = wrk - pfvf->refill_wrk;
cq = &pfvf->qset.cq[qidx];
- rbpool = cq->rbpool;
- free_ptrs = cq->pool_ptrs;
- while (cq->pool_ptrs) {
- if (otx2_alloc_rbuf(pfvf, rbpool, &bufptr)) {
- /* Schedule a WQ if we fails to free atleast half of the
- * pointers else enable napi for this RQ.
- */
- if (!((free_ptrs - cq->pool_ptrs) > free_ptrs / 2)) {
- struct delayed_work *dwork;
-
- dwork = &wrk->pool_refill_work;
- schedule_delayed_work(dwork,
- msecs_to_jiffies(100));
- } else {
- cq->refill_task_sched = false;
- }
- return;
- }
- pfvf->hw_ops->aura_freeptr(pfvf, qidx, bufptr + OTX2_HEAD_ROOM);
- cq->pool_ptrs--;
- }
cq->refill_task_sched = false;
+
+ local_bh_disable();
+ napi_schedule(wrk->napi);
+ local_bh_enable();
}
int otx2_config_nix_queues(struct otx2_nic *pfvf)
@@ -1206,10 +1202,31 @@ void otx2_sq_free_sqbs(struct otx2_nic *pfvf)
}
}
+void otx2_free_bufs(struct otx2_nic *pfvf, struct otx2_pool *pool,
+ u64 iova, int size)
+{
+ struct page *page;
+ u64 pa;
+
+ pa = otx2_iova_to_phys(pfvf->iommu_domain, iova);
+ page = virt_to_head_page(phys_to_virt(pa));
+
+ if (pool->page_pool) {
+ page_pool_put_full_page(pool->page_pool, page, true);
+ } else {
+ dma_unmap_page_attrs(pfvf->dev, iova, size,
+ DMA_FROM_DEVICE,
+ DMA_ATTR_SKIP_CPU_SYNC);
+
+ put_page(page);
+ }
+}
+
void otx2_free_aura_ptr(struct otx2_nic *pfvf, int type)
{
int pool_id, pool_start = 0, pool_end = 0, size = 0;
- u64 iova, pa;
+ struct otx2_pool *pool;
+ u64 iova;
if (type == AURA_NIX_SQ) {
pool_start = otx2_get_pool_idx(pfvf, type, 0);
@@ -1225,15 +1242,13 @@ void otx2_free_aura_ptr(struct otx2_nic *pfvf, int type)
/* Free SQB and RQB pointers from the aura pool */
for (pool_id = pool_start; pool_id < pool_end; pool_id++) {
iova = otx2_aura_allocptr(pfvf, pool_id);
+ pool = &pfvf->qset.pool[pool_id];
while (iova) {
if (type == AURA_NIX_RQ)
iova -= OTX2_HEAD_ROOM;
- pa = otx2_iova_to_phys(pfvf->iommu_domain, iova);
- dma_unmap_page_attrs(pfvf->dev, iova, size,
- DMA_FROM_DEVICE,
- DMA_ATTR_SKIP_CPU_SYNC);
- put_page(virt_to_page(phys_to_virt(pa)));
+ otx2_free_bufs(pfvf, pool, iova, size);
+
iova = otx2_aura_allocptr(pfvf, pool_id);
}
}
@@ -1251,6 +1266,8 @@ void otx2_aura_pool_free(struct otx2_nic *pfvf)
pool = &pfvf->qset.pool[pool_id];
qmem_free(pfvf->dev, pool->stack);
qmem_free(pfvf->dev, pool->fc_addr);
+ page_pool_destroy(pool->page_pool);
+ pool->page_pool = NULL;
}
devm_kfree(pfvf->dev, pfvf->qset.pool);
pfvf->qset.pool = NULL;
@@ -1334,8 +1351,9 @@ int otx2_aura_init(struct otx2_nic *pfvf, int aura_id,
}
int otx2_pool_init(struct otx2_nic *pfvf, u16 pool_id,
- int stack_pages, int numptrs, int buf_size)
+ int stack_pages, int numptrs, int buf_size, int type)
{
+ struct page_pool_params pp_params = { 0 };
struct npa_aq_enq_req *aq;
struct otx2_pool *pool;
int err;
@@ -1379,6 +1397,23 @@ int otx2_pool_init(struct otx2_nic *pfvf, u16 pool_id,
aq->ctype = NPA_AQ_CTYPE_POOL;
aq->op = NPA_AQ_INSTOP_INIT;
+ if (type != AURA_NIX_RQ) {
+ pool->page_pool = NULL;
+ return 0;
+ }
+
+ pp_params.order = get_order(buf_size);
+ pp_params.flags = PP_FLAG_PAGE_FRAG | PP_FLAG_DMA_MAP;
+ pp_params.pool_size = min(OTX2_PAGE_POOL_SZ, numptrs);
+ pp_params.nid = NUMA_NO_NODE;
+ pp_params.dev = pfvf->dev;
+ pp_params.dma_dir = DMA_FROM_DEVICE;
+ pool->page_pool = page_pool_create(&pp_params);
+ if (IS_ERR(pool->page_pool)) {
+ netdev_err(pfvf->netdev, "Creation of page pool failed\n");
+ return PTR_ERR(pool->page_pool);
+ }
+
return 0;
}
@@ -1413,7 +1448,7 @@ int otx2_sq_aura_pool_init(struct otx2_nic *pfvf)
/* Initialize pool context */
err = otx2_pool_init(pfvf, pool_id, stack_pages,
- num_sqbs, hw->sqb_size);
+ num_sqbs, hw->sqb_size, AURA_NIX_SQ);
if (err)
goto fail;
}
@@ -1476,7 +1511,7 @@ int otx2_rq_aura_pool_init(struct otx2_nic *pfvf)
}
for (pool_id = 0; pool_id < hw->rqpool_cnt; pool_id++) {
err = otx2_pool_init(pfvf, pool_id, stack_pages,
- num_ptrs, pfvf->rbsize);
+ num_ptrs, pfvf->rbsize, AURA_NIX_RQ);
if (err)
goto fail;
}
@@ -1660,7 +1695,6 @@ int otx2_nix_config_bp(struct otx2_nic *pfvf, bool enable)
req->bpid_per_chan = 0;
#endif
-
return otx2_sync_mbox_msg(&pfvf->mbox);
}
EXPORT_SYMBOL(otx2_nix_config_bp);
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
index c15d1864a637..1d3c4180d341 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
@@ -280,6 +280,7 @@ struct flr_work {
struct refill_work {
struct delayed_work pool_refill_work;
struct otx2_nic *pf;
+ struct napi_struct *napi;
};
/* PTPv2 originTimestamp structure */
@@ -347,7 +348,7 @@ struct dev_hw_ops {
int (*sq_aq_init)(void *dev, u16 qidx, u16 sqb_aura);
void (*sqe_flush)(void *dev, struct otx2_snd_queue *sq,
int size, int qidx);
- void (*refill_pool_ptrs)(void *dev, struct otx2_cq_queue *cq);
+ int (*refill_pool_ptrs)(void *dev, struct otx2_cq_queue *cq);
void (*aura_freeptr)(void *dev, int aura, u64 buf);
};
@@ -934,7 +935,7 @@ int otx2_alloc_rbuf(struct otx2_nic *pfvf, struct otx2_pool *pool,
int otx2_rxtx_enable(struct otx2_nic *pfvf, bool enable);
void otx2_ctx_disable(struct mbox *mbox, int type, bool npa);
int otx2_nix_config_bp(struct otx2_nic *pfvf, bool enable);
-void otx2_cleanup_rx_cqes(struct otx2_nic *pfvf, struct otx2_cq_queue *cq);
+void otx2_cleanup_rx_cqes(struct otx2_nic *pfvf, struct otx2_cq_queue *cq, int qidx);
void otx2_cleanup_tx_cqes(struct otx2_nic *pfvf, struct otx2_cq_queue *cq);
int otx2_sq_init(struct otx2_nic *pfvf, u16 qidx, u16 sqb_aura);
int otx2_sq_aq_init(void *dev, u16 qidx, u16 sqb_aura);
@@ -942,7 +943,7 @@ int cn10k_sq_aq_init(void *dev, u16 qidx, u16 sqb_aura);
int otx2_alloc_buffer(struct otx2_nic *pfvf, struct otx2_cq_queue *cq,
dma_addr_t *dma);
int otx2_pool_init(struct otx2_nic *pfvf, u16 pool_id,
- int stack_pages, int numptrs, int buf_size);
+ int stack_pages, int numptrs, int buf_size, int type);
int otx2_aura_init(struct otx2_nic *pfvf, int aura_id,
int pool_id, int numptrs);
@@ -1012,6 +1013,8 @@ u16 otx2_get_max_mtu(struct otx2_nic *pfvf);
int otx2_handle_ntuple_tc_features(struct net_device *netdev,
netdev_features_t features);
int otx2_smq_flush(struct otx2_nic *pfvf, int smq);
+void otx2_free_bufs(struct otx2_nic *pfvf, struct otx2_pool *pool,
+ u64 iova, int size);
/* tc support */
int otx2_init_tc(struct otx2_nic *nic);
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
index 6b7fb324e756..c29cb56caf08 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
@@ -1591,7 +1591,9 @@ static void otx2_free_hw_resources(struct otx2_nic *pf)
struct nix_lf_free_req *free_req;
struct mbox *mbox = &pf->mbox;
struct otx2_cq_queue *cq;
+ struct otx2_pool *pool;
struct msg_req *req;
+ int pool_id;
int qidx;
/* Ensure all SQE are processed */
@@ -1618,7 +1620,7 @@ static void otx2_free_hw_resources(struct otx2_nic *pf)
for (qidx = 0; qidx < qset->cq_cnt; qidx++) {
cq = &qset->cq[qidx];
if (cq->cq_type == CQ_RX)
- otx2_cleanup_rx_cqes(pf, cq);
+ otx2_cleanup_rx_cqes(pf, cq, qidx);
else
otx2_cleanup_tx_cqes(pf, cq);
}
@@ -1629,6 +1631,13 @@ static void otx2_free_hw_resources(struct otx2_nic *pf)
/* Free RQ buffer pointers*/
otx2_free_aura_ptr(pf, AURA_NIX_RQ);
+ for (qidx = 0; qidx < pf->hw.rx_queues; qidx++) {
+ pool_id = otx2_get_pool_idx(pf, AURA_NIX_RQ, qidx);
+ pool = &pf->qset.pool[pool_id];
+ page_pool_destroy(pool->page_pool);
+ pool->page_pool = NULL;
+ }
+
otx2_free_cq_res(pf);
/* Free all ingress bandwidth profiles allocated */
@@ -1996,6 +2005,10 @@ int otx2_stop(struct net_device *netdev)
netif_tx_disable(netdev);
+ for (wrk = 0; wrk < pf->qset.cq_cnt; wrk++)
+ cancel_delayed_work_sync(&pf->refill_wrk[wrk].pool_refill_work);
+ devm_kfree(pf->dev, pf->refill_wrk);
+
otx2_free_hw_resources(pf);
otx2_free_cints(pf, pf->hw.cint_cnt);
otx2_disable_napi(pf);
@@ -2003,9 +2016,6 @@ int otx2_stop(struct net_device *netdev)
for (qidx = 0; qidx < netdev->num_tx_queues; qidx++)
netdev_tx_reset_queue(netdev_get_tx_queue(netdev, qidx));
- for (wrk = 0; wrk < pf->qset.cq_cnt; wrk++)
- cancel_delayed_work_sync(&pf->refill_wrk[wrk].pool_refill_work);
- devm_kfree(pf->dev, pf->refill_wrk);
kfree(qset->sq);
kfree(qset->cq);
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
index e579183e5239..31caf7a7a3ad 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
@@ -218,9 +218,6 @@ static bool otx2_skb_add_frag(struct otx2_nic *pfvf, struct sk_buff *skb,
skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags, page,
va - page_address(page) + off,
len - off, pfvf->rbsize);
-
- otx2_dma_unmap_page(pfvf, iova - OTX2_HEAD_ROOM,
- pfvf->rbsize, DMA_FROM_DEVICE);
return true;
}
@@ -383,6 +380,8 @@ static void otx2_rcv_pkt_handler(struct otx2_nic *pfvf,
if (pfvf->netdev->features & NETIF_F_RXCSUM)
skb->ip_summed = CHECKSUM_UNNECESSARY;
+ skb_mark_for_recycle(skb);
+
napi_gro_frags(napi);
}
@@ -429,9 +428,10 @@ static int otx2_rx_napi_handler(struct otx2_nic *pfvf,
return processed_cqe;
}
-void otx2_refill_pool_ptrs(void *dev, struct otx2_cq_queue *cq)
+int otx2_refill_pool_ptrs(void *dev, struct otx2_cq_queue *cq)
{
struct otx2_nic *pfvf = dev;
+ int cnt = cq->pool_ptrs;
dma_addr_t bufptr;
while (cq->pool_ptrs) {
@@ -440,6 +440,8 @@ void otx2_refill_pool_ptrs(void *dev, struct otx2_cq_queue *cq)
otx2_aura_freeptr(pfvf, cq->cq_idx, bufptr + OTX2_HEAD_ROOM);
cq->pool_ptrs--;
}
+
+ return cnt - cq->pool_ptrs;
}
static int otx2_tx_napi_handler(struct otx2_nic *pfvf,
@@ -533,6 +535,7 @@ int otx2_napi_handler(struct napi_struct *napi, int budget)
struct otx2_cq_queue *cq;
struct otx2_qset *qset;
struct otx2_nic *pfvf;
+ int filled_cnt = -1;
cq_poll = container_of(napi, struct otx2_cq_poll, napi);
pfvf = (struct otx2_nic *)cq_poll->dev;
@@ -553,7 +556,7 @@ int otx2_napi_handler(struct napi_struct *napi, int budget)
}
if (rx_cq && rx_cq->pool_ptrs)
- pfvf->hw_ops->refill_pool_ptrs(pfvf, rx_cq);
+ filled_cnt = pfvf->hw_ops->refill_pool_ptrs(pfvf, rx_cq);
/* Clear the IRQ */
otx2_write64(pfvf, NIX_LF_CINTX_INT(cq_poll->cint_idx), BIT_ULL(0));
@@ -566,9 +569,25 @@ int otx2_napi_handler(struct napi_struct *napi, int budget)
if (pfvf->flags & OTX2_FLAG_ADPTV_INT_COAL_ENABLED)
otx2_adjust_adaptive_coalese(pfvf, cq_poll);
- /* Re-enable interrupts */
- otx2_write64(pfvf, NIX_LF_CINTX_ENA_W1S(cq_poll->cint_idx),
- BIT_ULL(0));
+ if (unlikely(!filled_cnt)) {
+ struct refill_work *work;
+ struct delayed_work *dwork;
+
+ work = &pfvf->refill_wrk[cq->cq_idx];
+ dwork = &work->pool_refill_work;
+ /* Schedule a task if no other task is running */
+ if (!cq->refill_task_sched) {
+ work->napi = napi;
+ cq->refill_task_sched = true;
+ schedule_delayed_work(dwork,
+ msecs_to_jiffies(100));
+ }
+ } else {
+ /* Re-enable interrupts */
+ otx2_write64(pfvf,
+ NIX_LF_CINTX_ENA_W1S(cq_poll->cint_idx),
+ BIT_ULL(0));
+ }
}
return workdone;
}
@@ -1191,11 +1210,13 @@ bool otx2_sq_append_skb(struct net_device *netdev, struct otx2_snd_queue *sq,
}
EXPORT_SYMBOL(otx2_sq_append_skb);
-void otx2_cleanup_rx_cqes(struct otx2_nic *pfvf, struct otx2_cq_queue *cq)
+void otx2_cleanup_rx_cqes(struct otx2_nic *pfvf, struct otx2_cq_queue *cq, int qidx)
{
struct nix_cqe_rx_s *cqe;
+ struct otx2_pool *pool;
int processed_cqe = 0;
- u64 iova, pa;
+ u16 pool_id;
+ u64 iova;
if (pfvf->xdp_prog)
xdp_rxq_info_unreg(&cq->xdp_rxq);
@@ -1203,6 +1224,9 @@ void otx2_cleanup_rx_cqes(struct otx2_nic *pfvf, struct otx2_cq_queue *cq)
if (otx2_nix_cq_op_status(pfvf, cq) || !cq->pend_cqe)
return;
+ pool_id = otx2_get_pool_idx(pfvf, AURA_NIX_RQ, qidx);
+ pool = &pfvf->qset.pool[pool_id];
+
while (cq->pend_cqe) {
cqe = (struct nix_cqe_rx_s *)otx2_get_next_cqe(cq);
processed_cqe++;
@@ -1215,9 +1239,8 @@ void otx2_cleanup_rx_cqes(struct otx2_nic *pfvf, struct otx2_cq_queue *cq)
continue;
}
iova = cqe->sg.seg_addr - OTX2_HEAD_ROOM;
- pa = otx2_iova_to_phys(pfvf->iommu_domain, iova);
- otx2_dma_unmap_page(pfvf, iova, pfvf->rbsize, DMA_FROM_DEVICE);
- put_page(virt_to_page(phys_to_virt(pa)));
+
+ otx2_free_bufs(pfvf, pool, iova, pfvf->rbsize);
}
/* Free CQEs to HW */
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.h b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.h
index 7ab6db9a986f..a82ffca8ce1b 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.h
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.h
@@ -23,6 +23,8 @@
#define OTX2_ETH_HLEN (VLAN_ETH_HLEN + VLAN_HLEN)
#define OTX2_MIN_MTU 60
+#define OTX2_PAGE_POOL_SZ 2048
+
#define OTX2_MAX_GSO_SEGS 255
#define OTX2_MAX_FRAGS_IN_SQE 9
@@ -118,6 +120,7 @@ struct otx2_cq_poll {
struct otx2_pool {
struct qmem *stack;
struct qmem *fc_addr;
+ struct page_pool *page_pool;
u16 rbsize;
};
@@ -167,6 +170,6 @@ void cn10k_sqe_flush(void *dev, struct otx2_snd_queue *sq,
int size, int qidx);
void otx2_sqe_flush(void *dev, struct otx2_snd_queue *sq,
int size, int qidx);
-void otx2_refill_pool_ptrs(void *dev, struct otx2_cq_queue *cq);
-void cn10k_refill_pool_ptrs(void *dev, struct otx2_cq_queue *cq);
+int otx2_refill_pool_ptrs(void *dev, struct otx2_cq_queue *cq);
+int cn10k_refill_pool_ptrs(void *dev, struct otx2_cq_queue *cq);
#endif /* OTX2_TXRX_H */
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/qos_sq.c b/drivers/net/ethernet/marvell/octeontx2/nic/qos_sq.c
index e142d43f5a62..95a2c8e616bd 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/qos_sq.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/qos_sq.c
@@ -63,7 +63,7 @@ static int otx2_qos_sq_aura_pool_init(struct otx2_nic *pfvf, int qidx)
/* Initialize pool context */
err = otx2_pool_init(pfvf, pool_id, stack_pages,
- num_sqbs, hw->sqb_size);
+ num_sqbs, hw->sqb_size, AURA_NIX_SQ);
if (err)
goto aura_free;
diff --git a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
index 6a72687d5b83..8cb8d47227f5 100644
--- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
+++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
@@ -34,8 +34,10 @@ struct mtk_flow_data {
u16 vlan_in;
struct {
- u16 id;
- __be16 proto;
+ struct {
+ u16 id;
+ __be16 proto;
+ } vlans[2];
u8 num;
} vlan;
struct {
@@ -321,18 +323,19 @@ mtk_flow_offload_replace(struct mtk_eth *eth, struct flow_cls_offload *f)
case FLOW_ACTION_CSUM:
break;
case FLOW_ACTION_VLAN_PUSH:
- if (data.vlan.num == 1 ||
+ if (data.vlan.num + data.pppoe.num == 2 ||
act->vlan.proto != htons(ETH_P_8021Q))
return -EOPNOTSUPP;
- data.vlan.id = act->vlan.vid;
- data.vlan.proto = act->vlan.proto;
+ data.vlan.vlans[data.vlan.num].id = act->vlan.vid;
+ data.vlan.vlans[data.vlan.num].proto = act->vlan.proto;
data.vlan.num++;
break;
case FLOW_ACTION_VLAN_POP:
break;
case FLOW_ACTION_PPPOE_PUSH:
- if (data.pppoe.num == 1)
+ if (data.pppoe.num == 1 ||
+ data.vlan.num == 2)
return -EOPNOTSUPP;
data.pppoe.sid = act->pppoe.sid;
@@ -422,12 +425,9 @@ mtk_flow_offload_replace(struct mtk_eth *eth, struct flow_cls_offload *f)
if (offload_type == MTK_PPE_PKT_TYPE_BRIDGE)
foe.bridge.vlan = data.vlan_in;
- if (data.vlan.num == 1) {
- if (data.vlan.proto != htons(ETH_P_8021Q))
- return -EOPNOTSUPP;
+ for (i = 0; i < data.vlan.num; i++)
+ mtk_foe_entry_set_vlan(eth, &foe, data.vlan.vlans[i].id);
- mtk_foe_entry_set_vlan(eth, &foe, data.vlan.id);
- }
if (data.pppoe.num == 1)
mtk_foe_entry_set_pppoe(eth, &foe, data.pppoe.sid);
diff --git a/drivers/net/ethernet/mellanox/mlx4/alloc.c b/drivers/net/ethernet/mellanox/mlx4/alloc.c
index b330020dc0d6..f2bded847e61 100644
--- a/drivers/net/ethernet/mellanox/mlx4/alloc.c
+++ b/drivers/net/ethernet/mellanox/mlx4/alloc.c
@@ -682,9 +682,9 @@ static struct mlx4_db_pgdir *mlx4_alloc_db_pgdir(struct device *dma_device)
}
static int mlx4_alloc_db_from_pgdir(struct mlx4_db_pgdir *pgdir,
- struct mlx4_db *db, int order)
+ struct mlx4_db *db, unsigned int order)
{
- int o;
+ unsigned int o;
int i;
for (o = order; o <= 1; ++o) {
@@ -712,7 +712,7 @@ static int mlx4_alloc_db_from_pgdir(struct mlx4_db_pgdir *pgdir,
return 0;
}
-int mlx4_db_alloc(struct mlx4_dev *dev, struct mlx4_db *db, int order)
+int mlx4_db_alloc(struct mlx4_dev *dev, struct mlx4_db *db, unsigned int order)
{
struct mlx4_priv *priv = mlx4_priv(dev);
struct mlx4_db_pgdir *pgdir;
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_tx.c b/drivers/net/ethernet/mellanox/mlx4/en_tx.c
index 7fccf1a79f09..95eae224bbb4 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_tx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_tx.c
@@ -446,6 +446,8 @@ int mlx4_en_process_tx_cq(struct net_device *dev,
if (unlikely(!priv->port_up))
return 0;
+ if (unlikely(!napi_budget) && cq->type == TX_XDP)
+ return 0;
netdev_txq_bql_complete_prefetchw(ring->tx_queue);
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
index 5aeca9534f15..b4980245b50b 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
@@ -61,6 +61,7 @@
#define MLX5E_REP_PARAMS_DEF_LOG_SQ_SIZE \
max(0x7, MLX5E_PARAMS_MINIMUM_LOG_SQ_SIZE)
#define MLX5E_REP_PARAMS_DEF_NUM_CHANNELS 1
+#define MLX5E_REP_PARAMS_DEF_LOG_RQ_SIZE 0x8
static const char mlx5e_rep_driver_name[] = "mlx5e_rep";
@@ -705,6 +706,8 @@ static void mlx5e_build_rep_params(struct net_device *netdev)
/* RQ */
mlx5e_build_rq_params(mdev, params);
+ if (!mlx5e_is_uplink_rep(priv) && mlx5_core_is_ecpf(mdev))
+ params->log_rq_mtu_frames = MLX5E_REP_PARAMS_DEF_LOG_RQ_SIZE;
/* CQ moderation params */
params->rx_dim_enabled = MLX5_CAP_GEN(mdev, cq_moderation);
@@ -726,6 +729,8 @@ static void mlx5e_build_rep_netdev(struct net_device *netdev,
netdev->ethtool_ops = &mlx5e_rep_ethtool_ops;
netdev->watchdog_timeo = 15 * HZ;
+ if (mlx5_core_is_ecpf(mdev))
+ netdev->tx_queue_len = 1 << MLX5E_REP_PARAMS_DEF_LOG_SQ_SIZE;
#if IS_ENABLED(CONFIG_MLX5_CLS_ACT)
netdev->hw_features |= NETIF_F_HW_TC;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c b/drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c
index 08a75654f5f1..c170503b3aac 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c
@@ -165,6 +165,9 @@ mlx5e_test_loopback_validate(struct sk_buff *skb,
struct udphdr *udph;
struct iphdr *iph;
+ if (skb_linearize(skb))
+ goto out;
+
/* We are only going to peek, no need to clone the SKB */
if (MLX5E_TEST_PKT_SIZE - ETH_HLEN > skb_headlen(skb))
goto out;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/events.c b/drivers/net/ethernet/mellanox/mlx5/core/events.c
index 9459e56ee90a..6aa96d33c210 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/events.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/events.c
@@ -163,11 +163,16 @@ static int temp_warn(struct notifier_block *nb, unsigned long type, void *data)
u64 value_msb;
value_lsb = be64_to_cpu(eqe->data.temp_warning.sensor_warning_lsb);
+ /* bit 1-63 are not supported for NICs,
+ * hence read only bit 0 (asic) from lsb.
+ */
+ value_lsb &= 0x1;
value_msb = be64_to_cpu(eqe->data.temp_warning.sensor_warning_msb);
- mlx5_core_warn(events->dev,
- "High temperature on sensors with bit set %llx %llx",
- value_msb, value_lsb);
+ if (net_ratelimit())
+ mlx5_core_warn(events->dev,
+ "High temperature on sensors with bit set %llx %llx",
+ value_msb, value_lsb);
return NOTIFY_OK;
}
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/health.c b/drivers/net/ethernet/mellanox/mlx5/core/health.c
index 65483dab9057..b4faac12789d 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/health.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/health.c
@@ -850,6 +850,7 @@ static void poll_health(struct timer_list *t)
health->prev = count;
if (health->miss_counter == MAX_MISSES) {
mlx5_core_err(dev, "device's health compromised - reached miss count\n");
+ health->synd = ioread8(&h->synd);
print_health_info(dev);
queue_work(health->wq, &health->report_work);
}
diff --git a/drivers/net/ethernet/microchip/lan743x_main.c b/drivers/net/ethernet/microchip/lan743x_main.c
index 2e69ba0143b1..fd3555419179 100644
--- a/drivers/net/ethernet/microchip/lan743x_main.c
+++ b/drivers/net/ethernet/microchip/lan743x_main.c
@@ -3253,6 +3253,7 @@ static int lan743x_hardware_init(struct lan743x_adapter *adapter,
struct pci_dev *pdev)
{
struct lan743x_tx *tx;
+ u32 sgmii_ctl;
int index;
int ret;
@@ -3265,6 +3266,15 @@ static int lan743x_hardware_init(struct lan743x_adapter *adapter,
spin_lock_init(&adapter->eth_syslock_spinlock);
mutex_init(&adapter->sgmii_rw_lock);
pci11x1x_set_rfe_rd_fifo_threshold(adapter);
+ sgmii_ctl = lan743x_csr_read(adapter, SGMII_CTL);
+ if (adapter->is_sgmii_en) {
+ sgmii_ctl |= SGMII_CTL_SGMII_ENABLE_;
+ sgmii_ctl &= ~SGMII_CTL_SGMII_POWER_DN_;
+ } else {
+ sgmii_ctl &= ~SGMII_CTL_SGMII_ENABLE_;
+ sgmii_ctl |= SGMII_CTL_SGMII_POWER_DN_;
+ }
+ lan743x_csr_write(adapter, SGMII_CTL, sgmii_ctl);
} else {
adapter->max_tx_channels = LAN743X_MAX_TX_CHANNELS;
adapter->used_tx_channels = LAN743X_USED_TX_CHANNELS;
@@ -3313,7 +3323,6 @@ static int lan743x_hardware_init(struct lan743x_adapter *adapter,
static int lan743x_mdiobus_init(struct lan743x_adapter *adapter)
{
- u32 sgmii_ctl;
int ret;
adapter->mdiobus = devm_mdiobus_alloc(&adapter->pdev->dev);
@@ -3325,10 +3334,6 @@ static int lan743x_mdiobus_init(struct lan743x_adapter *adapter)
adapter->mdiobus->priv = (void *)adapter;
if (adapter->is_pci11x1x) {
if (adapter->is_sgmii_en) {
- sgmii_ctl = lan743x_csr_read(adapter, SGMII_CTL);
- sgmii_ctl |= SGMII_CTL_SGMII_ENABLE_;
- sgmii_ctl &= ~SGMII_CTL_SGMII_POWER_DN_;
- lan743x_csr_write(adapter, SGMII_CTL, sgmii_ctl);
netif_dbg(adapter, drv, adapter->netdev,
"SGMII operation\n");
adapter->mdiobus->probe_capabilities = MDIOBUS_C22_C45;
@@ -3338,10 +3343,6 @@ static int lan743x_mdiobus_init(struct lan743x_adapter *adapter)
netif_dbg(adapter, drv, adapter->netdev,
"lan743x-mdiobus-c45\n");
} else {
- sgmii_ctl = lan743x_csr_read(adapter, SGMII_CTL);
- sgmii_ctl &= ~SGMII_CTL_SGMII_ENABLE_;
- sgmii_ctl |= SGMII_CTL_SGMII_POWER_DN_;
- lan743x_csr_write(adapter, SGMII_CTL, sgmii_ctl);
netif_dbg(adapter, drv, adapter->netdev,
"RGMII operation\n");
// Only C22 support when RGMII I/F
diff --git a/drivers/net/ethernet/microsoft/mana/gdma_main.c b/drivers/net/ethernet/microsoft/mana/gdma_main.c
index d674ebda2053..9e55679796d9 100644
--- a/drivers/net/ethernet/microsoft/mana/gdma_main.c
+++ b/drivers/net/ethernet/microsoft/mana/gdma_main.c
@@ -995,7 +995,7 @@ static u32 mana_gd_write_client_oob(const struct gdma_wqe_request *wqe_req,
header->inline_oob_size_div4 = client_oob_size / sizeof(u32);
if (oob_in_sgl) {
- WARN_ON_ONCE(!pad_data || wqe_req->num_sge < 2);
+ WARN_ON_ONCE(wqe_req->num_sge < 2);
header->client_oob_in_sgl = 1;
diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index 4b461e93ffe9..6346821d480b 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -5156,6 +5156,7 @@ static int r8169_mdio_register(struct rtl8169_private *tp)
new_bus->priv = tp;
new_bus->parent = &pdev->dev;
new_bus->irq[0] = PHY_MAC_INTERRUPT;
+ new_bus->phy_mask = GENMASK(31, 1);
snprintf(new_bus->id, MII_BUS_ID_SIZE, "r8169-%x-%x",
pci_domain_nr(pdev->bus), pci_dev_id(pdev));
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
index f834472599f7..0921b78c6244 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
@@ -948,7 +948,7 @@ static int sun8i_dwmac_set_syscon(struct device *dev,
/* of_mdio_parse_addr returns a valid (0 ~ 31) PHY
* address. No need to mask it again.
*/
- reg |= 1 << H3_EPHY_ADDR_SHIFT;
+ reg |= ret << H3_EPHY_ADDR_SHIFT;
} else {
/* For SoCs without internal PHY the PHY selection bit should be
* set to 0 (external PHY).
diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
index 32828d4ac64c..a0a9e4e13e77 100644
--- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c
+++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
@@ -1918,7 +1918,7 @@ static int am65_cpsw_nuss_init_slave_ports(struct am65_cpsw_common *common)
port->slave.mac_addr);
if (!is_valid_ether_addr(port->slave.mac_addr)) {
eth_random_addr(port->slave.mac_addr);
- dev_err(dev, "Use random MAC address\n");
+ dev_info(dev, "Use random MAC address\n");
}
}
}
diff --git a/drivers/net/ethernet/ti/cpsw_new.c b/drivers/net/ethernet/ti/cpsw_new.c
index 6e70aa1cc7bf..42684cb83606 100644
--- a/drivers/net/ethernet/ti/cpsw_new.c
+++ b/drivers/net/ethernet/ti/cpsw_new.c
@@ -1411,6 +1411,7 @@ static int cpsw_create_ports(struct cpsw_common *cpsw)
ndev->netdev_ops = &cpsw_netdev_ops;
ndev->ethtool_ops = &cpsw_ethtool_ops;
SET_NETDEV_DEV(ndev, dev);
+ ndev->dev.of_node = slave_data->slave_node;
if (!napi_ndev) {
/* CPSW Host port CPDMA interface is shared between
diff --git a/drivers/net/ieee802154/ca8210.c b/drivers/net/ieee802154/ca8210.c
index 1659bbffdb91..463be34a4ca4 100644
--- a/drivers/net/ieee802154/ca8210.c
+++ b/drivers/net/ieee802154/ca8210.c
@@ -1446,8 +1446,7 @@ static u8 mcps_data_request(
command.pdata.data_req.src_addr_mode = src_addr_mode;
command.pdata.data_req.dst.mode = dst_address_mode;
if (dst_address_mode != MAC_MODE_NO_ADDR) {
- command.pdata.data_req.dst.pan_id[0] = LS_BYTE(dst_pan_id);
- command.pdata.data_req.dst.pan_id[1] = MS_BYTE(dst_pan_id);
+ put_unaligned_le16(dst_pan_id, command.pdata.data_req.dst.pan_id);
if (dst_address_mode == MAC_MODE_SHORT_ADDR) {
command.pdata.data_req.dst.address[0] = LS_BYTE(
dst_addr->short_address
@@ -1795,12 +1794,12 @@ static int ca8210_skb_rx(
}
hdr.source.mode = data_ind[0];
dev_dbg(&priv->spi->dev, "srcAddrMode: %#03x\n", hdr.source.mode);
- hdr.source.pan_id = *(u16 *)&data_ind[1];
+ hdr.source.pan_id = cpu_to_le16(get_unaligned_le16(&data_ind[1]));
dev_dbg(&priv->spi->dev, "srcPanId: %#06x\n", hdr.source.pan_id);
memcpy(&hdr.source.extended_addr, &data_ind[3], 8);
hdr.dest.mode = data_ind[11];
dev_dbg(&priv->spi->dev, "dstAddrMode: %#03x\n", hdr.dest.mode);
- hdr.dest.pan_id = *(u16 *)&data_ind[12];
+ hdr.dest.pan_id = cpu_to_le16(get_unaligned_le16(&data_ind[12]));
dev_dbg(&priv->spi->dev, "dstPanId: %#06x\n", hdr.dest.pan_id);
memcpy(&hdr.dest.extended_addr, &data_ind[14], 8);
@@ -1927,7 +1926,7 @@ static int ca8210_skb_tx(
status = mcps_data_request(
header.source.mode,
header.dest.mode,
- header.dest.pan_id,
+ le16_to_cpu(header.dest.pan_id),
(union macaddr *)&header.dest.extended_addr,
skb->len - mac_len,
&skb->data[mac_len],
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index fc58e4afb38d..3069a7df25d3 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -1566,7 +1566,7 @@ bool phylink_expects_phy(struct phylink *pl)
{
if (pl->cfg_link_an_mode == MLO_AN_FIXED ||
(pl->cfg_link_an_mode == MLO_AN_INBAND &&
- phy_interface_mode_is_8023z(pl->link_config.interface)))
+ phy_interface_mode_is_8023z(pl->link_interface)))
return false;
return true;
}
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 061a7a9afad0..c2b715541989 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -9880,6 +9880,7 @@ static const struct usb_device_id rtl8152_table[] = {
{ USB_DEVICE(VENDOR_ID_NVIDIA, 0x09ff) },
{ USB_DEVICE(VENDOR_ID_TPLINK, 0x0601) },
{ USB_DEVICE(VENDOR_ID_DLINK, 0xb301) },
+ { USB_DEVICE(VENDOR_ID_DELL, 0xb097) },
{ USB_DEVICE(VENDOR_ID_ASUS, 0x1976) },
{}
};
diff --git a/drivers/net/vxlan/vxlan_core.c b/drivers/net/vxlan/vxlan_core.c
index 50be5a3c4779..ef61eab81707 100644
--- a/drivers/net/vxlan/vxlan_core.c
+++ b/drivers/net/vxlan/vxlan_core.c
@@ -274,9 +274,9 @@ static int vxlan_fdb_info(struct sk_buff *skb, struct vxlan_dev *vxlan,
be32_to_cpu(fdb->vni)))
goto nla_put_failure;
- ci.ndm_used = jiffies_to_clock_t(now - fdb->used);
+ ci.ndm_used = jiffies_to_clock_t(now - READ_ONCE(fdb->used));
ci.ndm_confirmed = 0;
- ci.ndm_updated = jiffies_to_clock_t(now - fdb->updated);
+ ci.ndm_updated = jiffies_to_clock_t(now - READ_ONCE(fdb->updated));
ci.ndm_refcnt = 0;
if (nla_put(skb, NDA_CACHEINFO, sizeof(ci), &ci))
@@ -482,8 +482,8 @@ static struct vxlan_fdb *vxlan_find_mac(struct vxlan_dev *vxlan,
struct vxlan_fdb *f;
f = __vxlan_find_mac(vxlan, mac, vni);
- if (f && f->used != jiffies)
- f->used = jiffies;
+ if (f && READ_ONCE(f->used) != jiffies)
+ WRITE_ONCE(f->used, jiffies);
return f;
}
@@ -1057,12 +1057,12 @@ static int vxlan_fdb_update_existing(struct vxlan_dev *vxlan,
!(f->flags & NTF_VXLAN_ADDED_BY_USER)) {
if (f->state != state) {
f->state = state;
- f->updated = jiffies;
+ WRITE_ONCE(f->updated, jiffies);
notify = 1;
}
if (f->flags != fdb_flags) {
f->flags = fdb_flags;
- f->updated = jiffies;
+ WRITE_ONCE(f->updated, jiffies);
notify = 1;
}
}
@@ -1096,7 +1096,7 @@ static int vxlan_fdb_update_existing(struct vxlan_dev *vxlan,
}
if (ndm_flags & NTF_USE)
- f->used = jiffies;
+ WRITE_ONCE(f->used, jiffies);
if (notify) {
if (rd == NULL)
@@ -1525,7 +1525,7 @@ static bool vxlan_snoop(struct net_device *dev,
src_mac, &rdst->remote_ip.sa, &src_ip->sa);
rdst->remote_ip = *src_ip;
- f->updated = jiffies;
+ WRITE_ONCE(f->updated, jiffies);
vxlan_fdb_notify(vxlan, f, rdst, RTM_NEWNEIGH, true, NULL);
} else {
u32 hash_index = fdb_head_index(vxlan, src_mac, vni);
@@ -2936,7 +2936,7 @@ static void vxlan_cleanup(struct timer_list *t)
if (f->flags & NTF_EXT_LEARNED)
continue;
- timeout = f->used + vxlan->cfg.age_interval * HZ;
+ timeout = READ_ONCE(f->used) + vxlan->cfg.age_interval * HZ;
if (time_before_eq(timeout, jiffies)) {
netdev_dbg(vxlan->dev,
"garbage collect %pM\n",
@@ -4231,6 +4231,7 @@ static int vxlan_changelink(struct net_device *dev, struct nlattr *tb[],
struct netlink_ext_ack *extack)
{
struct vxlan_dev *vxlan = netdev_priv(dev);
+ bool rem_ip_changed, change_igmp;
struct net_device *lowerdev;
struct vxlan_config conf;
struct vxlan_rdst *dst;
@@ -4254,8 +4255,13 @@ static int vxlan_changelink(struct net_device *dev, struct nlattr *tb[],
if (err)
return err;
+ rem_ip_changed = !vxlan_addr_equal(&conf.remote_ip, &dst->remote_ip);
+ change_igmp = vxlan->dev->flags & IFF_UP &&
+ (rem_ip_changed ||
+ dst->remote_ifindex != conf.remote_ifindex);
+
/* handle default dst entry */
- if (!vxlan_addr_equal(&conf.remote_ip, &dst->remote_ip)) {
+ if (rem_ip_changed) {
u32 hash_index = fdb_head_index(vxlan, all_zeros_mac, conf.vni);
spin_lock_bh(&vxlan->hash_lock[hash_index]);
@@ -4299,6 +4305,9 @@ static int vxlan_changelink(struct net_device *dev, struct nlattr *tb[],
}
}
+ if (change_igmp && vxlan_addr_multicast(&dst->remote_ip))
+ err = vxlan_multicast_leave(vxlan);
+
if (conf.age_interval != vxlan->cfg.age_interval)
mod_timer(&vxlan->age_timer, jiffies);
@@ -4306,7 +4315,12 @@ static int vxlan_changelink(struct net_device *dev, struct nlattr *tb[],
if (lowerdev && lowerdev != dst->remote_dev)
dst->remote_dev = lowerdev;
vxlan_config_apply(dev, &conf, lowerdev, vxlan->net, true);
- return 0;
+
+ if (!err && change_igmp &&
+ vxlan_addr_multicast(&dst->remote_ip))
+ err = vxlan_multicast_join(vxlan);
+
+ return err;
}
static void vxlan_dellink(struct net_device *dev, struct list_head *head)
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index 4f00400c7ffb..58386906598a 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -691,7 +691,9 @@ static int ath9k_of_init(struct ath_softc *sc)
ah->ah_flags |= AH_NO_EEP_SWAP;
}
- of_get_mac_address(np, common->macaddr);
+ ret = of_get_mac_address(np, common->macaddr);
+ if (ret == -EPROBE_DEFER)
+ return ret;
return 0;
}
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
index 7f30e6add993..39ac9d81d10d 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
@@ -552,6 +552,8 @@ static const struct iwl_dev_info iwl_dev_info_table[] = {
IWL_DEV_INFO(0x7A70, 0x1692, iwlax411_2ax_cfg_so_gf4_a0, iwl_ax411_killer_1690i_name),
IWL_DEV_INFO(0x7AF0, 0x1691, iwlax411_2ax_cfg_so_gf4_a0, iwl_ax411_killer_1690s_name),
IWL_DEV_INFO(0x7AF0, 0x1692, iwlax411_2ax_cfg_so_gf4_a0, iwl_ax411_killer_1690i_name),
+ IWL_DEV_INFO(0x7F70, 0x1691, iwlax411_2ax_cfg_so_gf4_a0, iwl_ax411_killer_1690s_name),
+ IWL_DEV_INFO(0x7F70, 0x1692, iwlax411_2ax_cfg_so_gf4_a0, iwl_ax411_killer_1690i_name),
IWL_DEV_INFO(0x271C, 0x0214, iwl9260_2ac_cfg, iwl9260_1_name),
IWL_DEV_INFO(0x7E40, 0x1691, iwl_cfg_ma_a0_gf4_a0, iwl_ax411_killer_1690s_name),
diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
index 9ccf8550a067..cd22c756acc6 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
@@ -798,9 +798,10 @@ rtl8xxxu_writeN(struct rtl8xxxu_priv *priv, u16 addr, u8 *buf, u16 len)
return len;
write_error:
- dev_info(&udev->dev,
- "%s: Failed to write block at addr: %04x size: %04x\n",
- __func__, addr, blocksize);
+ if (rtl8xxxu_debug & RTL8XXXU_DEBUG_REG_WRITE)
+ dev_info(&udev->dev,
+ "%s: Failed to write block at addr: %04x size: %04x\n",
+ __func__, addr, blocksize);
return -EAGAIN;
}
@@ -3920,8 +3921,14 @@ static int rtl8xxxu_init_device(struct ieee80211_hw *hw)
*/
rtl8xxxu_write16(priv, REG_TRXFF_BNDY + 2, fops->trxff_boundary);
- ret = rtl8xxxu_download_firmware(priv);
- dev_dbg(dev, "%s: download_firmware %i\n", __func__, ret);
+ for (int retry = 5; retry >= 0 ; retry--) {
+ ret = rtl8xxxu_download_firmware(priv);
+ dev_dbg(dev, "%s: download_firmware %i\n", __func__, ret);
+ if (ret != -EAGAIN)
+ break;
+ if (retry)
+ dev_dbg(dev, "%s: retry firmware download\n", __func__);
+ }
if (ret)
goto exit;
ret = rtl8xxxu_start_firmware(priv);
diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c
index 7c390c2c608d..0a913cf6a615 100644
--- a/drivers/net/wireless/realtek/rtw88/main.c
+++ b/drivers/net/wireless/realtek/rtw88/main.c
@@ -1516,6 +1516,7 @@ static void rtw_init_ht_cap(struct rtw_dev *rtwdev,
{
const struct rtw_chip_info *chip = rtwdev->chip;
struct rtw_efuse *efuse = &rtwdev->efuse;
+ int i;
ht_cap->ht_supported = true;
ht_cap->cap = 0;
@@ -1535,25 +1536,20 @@ static void rtw_init_ht_cap(struct rtw_dev *rtwdev,
ht_cap->ampdu_factor = IEEE80211_HT_MAX_AMPDU_64K;
ht_cap->ampdu_density = chip->ampdu_density;
ht_cap->mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED;
- if (efuse->hw_cap.nss > 1) {
- ht_cap->mcs.rx_mask[0] = 0xFF;
- ht_cap->mcs.rx_mask[1] = 0xFF;
- ht_cap->mcs.rx_mask[4] = 0x01;
- ht_cap->mcs.rx_highest = cpu_to_le16(300);
- } else {
- ht_cap->mcs.rx_mask[0] = 0xFF;
- ht_cap->mcs.rx_mask[1] = 0x00;
- ht_cap->mcs.rx_mask[4] = 0x01;
- ht_cap->mcs.rx_highest = cpu_to_le16(150);
- }
+
+ for (i = 0; i < efuse->hw_cap.nss; i++)
+ ht_cap->mcs.rx_mask[i] = 0xFF;
+ ht_cap->mcs.rx_mask[4] = 0x01;
+ ht_cap->mcs.rx_highest = cpu_to_le16(150 * efuse->hw_cap.nss);
}
static void rtw_init_vht_cap(struct rtw_dev *rtwdev,
struct ieee80211_sta_vht_cap *vht_cap)
{
struct rtw_efuse *efuse = &rtwdev->efuse;
- u16 mcs_map;
+ u16 mcs_map = 0;
__le16 highest;
+ int i;
if (efuse->hw_cap.ptcl != EFUSE_HW_CAP_IGNORE &&
efuse->hw_cap.ptcl != EFUSE_HW_CAP_PTCL_VHT)
@@ -1576,21 +1572,15 @@ static void rtw_init_vht_cap(struct rtw_dev *rtwdev,
if (rtw_chip_has_rx_ldpc(rtwdev))
vht_cap->cap |= IEEE80211_VHT_CAP_RXLDPC;
- mcs_map = IEEE80211_VHT_MCS_SUPPORT_0_9 << 0 |
- IEEE80211_VHT_MCS_NOT_SUPPORTED << 4 |
- IEEE80211_VHT_MCS_NOT_SUPPORTED << 6 |
- IEEE80211_VHT_MCS_NOT_SUPPORTED << 8 |
- IEEE80211_VHT_MCS_NOT_SUPPORTED << 10 |
- IEEE80211_VHT_MCS_NOT_SUPPORTED << 12 |
- IEEE80211_VHT_MCS_NOT_SUPPORTED << 14;
- if (efuse->hw_cap.nss > 1) {
- highest = cpu_to_le16(780);
- mcs_map |= IEEE80211_VHT_MCS_SUPPORT_0_9 << 2;
- } else {
- highest = cpu_to_le16(390);
- mcs_map |= IEEE80211_VHT_MCS_NOT_SUPPORTED << 2;
+ for (i = 0; i < 8; i++) {
+ if (i < efuse->hw_cap.nss)
+ mcs_map |= IEEE80211_VHT_MCS_SUPPORT_0_9 << (i * 2);
+ else
+ mcs_map |= IEEE80211_VHT_MCS_NOT_SUPPORTED << (i * 2);
}
+ highest = cpu_to_le16(390 * efuse->hw_cap.nss);
+
vht_cap->vht_mcs.rx_mcs_map = cpu_to_le16(mcs_map);
vht_cap->vht_mcs.tx_mcs_map = cpu_to_le16(mcs_map);
vht_cap->vht_mcs.rx_highest = highest;
diff --git a/drivers/net/wireless/realtek/rtw88/reg.h b/drivers/net/wireless/realtek/rtw88/reg.h
index 03bd8dc53f72..08628ba3419d 100644
--- a/drivers/net/wireless/realtek/rtw88/reg.h
+++ b/drivers/net/wireless/realtek/rtw88/reg.h
@@ -107,6 +107,7 @@
#define BIT_SHIFT_ROM_PGE 16
#define BIT_FW_INIT_RDY BIT(15)
#define BIT_FW_DW_RDY BIT(14)
+#define BIT_CPU_CLK_SEL (BIT(12) | BIT(13))
#define BIT_RPWM_TOGGLE BIT(7)
#define BIT_RAM_DL_SEL BIT(7) /* legacy only */
#define BIT_DMEM_CHKSUM_OK BIT(6)
@@ -124,7 +125,7 @@
BIT_CHECK_SUM_OK)
#define FW_READY_LEGACY (BIT_MCUFWDL_RDY | BIT_FWDL_CHK_RPT | \
BIT_WINTINI_RDY | BIT_RAM_DL_SEL)
-#define FW_READY_MASK 0xffff
+#define FW_READY_MASK (0xffff & ~BIT_CPU_CLK_SEL)
#define REG_MCU_TST_CFG 0x84
#define VAL_FW_TRIGGER 0x1
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822b.c b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
index 690e35c98f6e..0b071a116c58 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8822b.c
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
@@ -957,11 +957,11 @@ static void rtw8822b_query_rx_desc(struct rtw_dev *rtwdev, u8 *rx_desc,
}
static void
-rtw8822b_set_tx_power_index_by_rate(struct rtw_dev *rtwdev, u8 path, u8 rs)
+rtw8822b_set_tx_power_index_by_rate(struct rtw_dev *rtwdev, u8 path,
+ u8 rs, u32 *phy_pwr_idx)
{
struct rtw_hal *hal = &rtwdev->hal;
static const u32 offset_txagc[2] = {0x1d00, 0x1d80};
- static u32 phy_pwr_idx;
u8 rate, rate_idx, pwr_index, shift;
int j;
@@ -969,12 +969,12 @@ rtw8822b_set_tx_power_index_by_rate(struct rtw_dev *rtwdev, u8 path, u8 rs)
rate = rtw_rate_section[rs][j];
pwr_index = hal->tx_pwr_tbl[path][rate];
shift = rate & 0x3;
- phy_pwr_idx |= ((u32)pwr_index << (shift * 8));
+ *phy_pwr_idx |= ((u32)pwr_index << (shift * 8));
if (shift == 0x3) {
rate_idx = rate & 0xfc;
rtw_write32(rtwdev, offset_txagc[path] + rate_idx,
- phy_pwr_idx);
- phy_pwr_idx = 0;
+ *phy_pwr_idx);
+ *phy_pwr_idx = 0;
}
}
}
@@ -982,11 +982,13 @@ rtw8822b_set_tx_power_index_by_rate(struct rtw_dev *rtwdev, u8 path, u8 rs)
static void rtw8822b_set_tx_power_index(struct rtw_dev *rtwdev)
{
struct rtw_hal *hal = &rtwdev->hal;
+ u32 phy_pwr_idx = 0;
int rs, path;
for (path = 0; path < hal->rf_path_num; path++) {
for (rs = 0; rs < RTW_RATE_SECTION_MAX; rs++)
- rtw8822b_set_tx_power_index_by_rate(rtwdev, path, rs);
+ rtw8822b_set_tx_power_index_by_rate(rtwdev, path, rs,
+ &phy_pwr_idx);
}
}
diff --git a/drivers/net/wireless/realtek/rtw88/util.c b/drivers/net/wireless/realtek/rtw88/util.c
index cdfd66a85075..43cd06aa39b1 100644
--- a/drivers/net/wireless/realtek/rtw88/util.c
+++ b/drivers/net/wireless/realtek/rtw88/util.c
@@ -101,7 +101,8 @@ void rtw_desc_to_mcsrate(u16 rate, u8 *mcs, u8 *nss)
*nss = 4;
*mcs = rate - DESC_RATEVHT4SS_MCS0;
} else if (rate >= DESC_RATEMCS0 &&
- rate <= DESC_RATEMCS15) {
+ rate <= DESC_RATEMCS31) {
+ *nss = 0;
*mcs = rate - DESC_RATEMCS0;
}
}
diff --git a/drivers/net/wireless/realtek/rtw89/fw.c b/drivers/net/wireless/realtek/rtw89/fw.c
index 1d57a8c5e97d..0f022a5192ac 100644
--- a/drivers/net/wireless/realtek/rtw89/fw.c
+++ b/drivers/net/wireless/realtek/rtw89/fw.c
@@ -373,7 +373,6 @@ static int __rtw89_fw_download_hdr(struct rtw89_dev *rtwdev, const u8 *fw, u32 l
ret = rtw89_h2c_tx(rtwdev, skb, false);
if (ret) {
rtw89_err(rtwdev, "failed to send h2c\n");
- ret = -1;
goto fail;
}
@@ -434,7 +433,6 @@ static int __rtw89_fw_download_main(struct rtw89_dev *rtwdev,
ret = rtw89_h2c_tx(rtwdev, skb, true);
if (ret) {
rtw89_err(rtwdev, "failed to send h2c\n");
- ret = -1;
goto fail;
}
diff --git a/drivers/net/wireless/realtek/rtw89/regd.c b/drivers/net/wireless/realtek/rtw89/regd.c
index 6e5a740b128f..2d31193fcc87 100644
--- a/drivers/net/wireless/realtek/rtw89/regd.c
+++ b/drivers/net/wireless/realtek/rtw89/regd.c
@@ -334,6 +334,7 @@ void rtw89_regd_notifier(struct wiphy *wiphy, struct regulatory_request *request
struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
struct rtw89_dev *rtwdev = hw->priv;
+ wiphy_lock(wiphy);
mutex_lock(&rtwdev->mutex);
rtw89_leave_ps_mode(rtwdev);
@@ -350,4 +351,5 @@ void rtw89_regd_notifier(struct wiphy *wiphy, struct regulatory_request *request
exit:
mutex_unlock(&rtwdev->mutex);
+ wiphy_unlock(wiphy);
}
diff --git a/drivers/net/wireless/realtek/rtw89/ser.c b/drivers/net/wireless/realtek/rtw89/ser.c
index afb1b41e1a9a..f5dacdc4d11a 100644
--- a/drivers/net/wireless/realtek/rtw89/ser.c
+++ b/drivers/net/wireless/realtek/rtw89/ser.c
@@ -153,9 +153,11 @@ static void ser_state_run(struct rtw89_ser *ser, u8 evt)
rtw89_debug(rtwdev, RTW89_DBG_SER, "ser: %s receive %s\n",
ser_st_name(ser), ser_ev_name(ser, evt));
+ wiphy_lock(rtwdev->hw->wiphy);
mutex_lock(&rtwdev->mutex);
rtw89_leave_lps(rtwdev);
mutex_unlock(&rtwdev->mutex);
+ wiphy_unlock(rtwdev->hw->wiphy);
ser->st_tbl[ser->state].st_func(ser, evt);
}
@@ -624,9 +626,11 @@ static void ser_l2_reset_st_hdl(struct rtw89_ser *ser, u8 evt)
switch (evt) {
case SER_EV_STATE_IN:
+ wiphy_lock(rtwdev->hw->wiphy);
mutex_lock(&rtwdev->mutex);
ser_l2_reset_st_pre_hdl(ser);
mutex_unlock(&rtwdev->mutex);
+ wiphy_unlock(rtwdev->hw->wiphy);
ieee80211_restart_hw(rtwdev->hw);
ser_set_alarm(ser, SER_RECFG_TIMEOUT, SER_EV_L2_RECFG_TIMEOUT);
diff --git a/drivers/nvdimm/label.c b/drivers/nvdimm/label.c
index 082253a3a956..04f4a049599a 100644
--- a/drivers/nvdimm/label.c
+++ b/drivers/nvdimm/label.c
@@ -442,7 +442,8 @@ int nd_label_data_init(struct nvdimm_drvdata *ndd)
if (ndd->data)
return 0;
- if (ndd->nsarea.status || ndd->nsarea.max_xfer == 0) {
+ if (ndd->nsarea.status || ndd->nsarea.max_xfer == 0 ||
+ ndd->nsarea.config_size == 0) {
dev_dbg(ndd->dev, "failed to init config data area: (%u:%u)\n",
ndd->nsarea.max_xfer, ndd->nsarea.config_size);
return -ENXIO;
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 49a3cb8f1f10..218c1d69090e 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -3592,6 +3592,8 @@ static const struct pci_device_id nvme_id_table[] = {
.driver_data = NVME_QUIRK_NO_DEEPEST_PS, },
{ PCI_DEVICE(0x1e49, 0x0041), /* ZHITAI TiPro7000 NVMe SSD */
.driver_data = NVME_QUIRK_NO_DEEPEST_PS, },
+ { PCI_DEVICE(0x025e, 0xf1ac), /* SOLIDIGM P44 pro SSDPFKKW020X7 */
+ .driver_data = NVME_QUIRK_NO_DEEPEST_PS, },
{ PCI_DEVICE(0xc0a9, 0x540a), /* Crucial P2 */
.driver_data = NVME_QUIRK_BOGUS_NID, },
{ PCI_DEVICE(0x1d97, 0x2263), /* Lexar NM610 */
diff --git a/drivers/nvme/target/tcp.c b/drivers/nvme/target/tcp.c
index 125e22bd34e2..eee052dbf80c 100644
--- a/drivers/nvme/target/tcp.c
+++ b/drivers/nvme/target/tcp.c
@@ -1417,6 +1417,9 @@ static void nvmet_tcp_restore_socket_callbacks(struct nvmet_tcp_queue *queue)
{
struct socket *sock = queue->sock;
+ if (!queue->state_change)
+ return;
+
write_lock_bh(&sock->sk->sk_callback_lock);
sock->sk->sk_data_ready = queue->data_ready;
sock->sk->sk_state_change = queue->state_change;
diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
index 55c028af4bd9..c4f9ac5c00c1 100644
--- a/drivers/pci/Kconfig
+++ b/drivers/pci/Kconfig
@@ -184,6 +184,12 @@ config PCI_P2PDMA
P2P DMA transactions must be between devices behind the same root
port.
+ Enabling this option will reduce the entropy of x86 KASLR memory
+ regions. For example - on a 46 bit system, the entropy goes down
+ from 16 bits to 15 bits. The actual reduction in entropy depends
+ on the physical address bits, on processor features, kernel config
+ (5 level page table) and physical memory present on the system.
+
If unsure, say N.
config PCI_LABEL
diff --git a/drivers/pci/controller/dwc/pcie-designware-ep.c b/drivers/pci/controller/dwc/pcie-designware-ep.c
index 449ad709495d..3b3f079d0d2d 100644
--- a/drivers/pci/controller/dwc/pcie-designware-ep.c
+++ b/drivers/pci/controller/dwc/pcie-designware-ep.c
@@ -283,7 +283,7 @@ static int dw_pcie_find_index(struct dw_pcie_ep *ep, phys_addr_t addr,
u32 index;
struct dw_pcie *pci = to_dw_pcie_from_ep(ep);
- for (index = 0; index < pci->num_ob_windows; index++) {
+ for_each_set_bit(index, ep->ob_window_map, pci->num_ob_windows) {
if (ep->outbound_addr[index] != addr)
continue;
*atu_index = index;
diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c
index 425db793080d..c89ad1f92a07 100644
--- a/drivers/pci/controller/pcie-brcmstb.c
+++ b/drivers/pci/controller/pcie-brcmstb.c
@@ -281,8 +281,8 @@ static int brcm_pcie_encode_ibar_size(u64 size)
if (log2_in >= 12 && log2_in <= 15)
/* Covers 4KB to 32KB (inclusive) */
return (log2_in - 12) + 0x1c;
- else if (log2_in >= 16 && log2_in <= 35)
- /* Covers 64KB to 32GB, (inclusive) */
+ else if (log2_in >= 16 && log2_in <= 36)
+ /* Covers 64KB to 64GB, (inclusive) */
return log2_in - 15;
/* Something is awry so disable */
return 0;
@@ -1619,3 +1619,4 @@ module_platform_driver(brcm_pcie_driver);
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Broadcom STB PCIe RC driver");
MODULE_AUTHOR("Broadcom");
+MODULE_SOFTDEP("pre: irq_bcm2712_mip");
diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c
index 09995b6e73bc..771ff0f6971f 100644
--- a/drivers/pci/controller/vmd.c
+++ b/drivers/pci/controller/vmd.c
@@ -17,6 +17,8 @@
#include <linux/rculist.h>
#include <linux/rcupdate.h>
+#include <xen/xen.h>
+
#include <asm/irqdomain.h>
#define VMD_CFGBAR 0
@@ -919,6 +921,24 @@ static int vmd_probe(struct pci_dev *dev, const struct pci_device_id *id)
struct vmd_dev *vmd;
int err;
+ if (xen_domain()) {
+ /*
+ * Xen doesn't have knowledge about devices in the VMD bus
+ * because the config space of devices behind the VMD bridge is
+ * not known to Xen, and hence Xen cannot discover or configure
+ * them in any way.
+ *
+ * Bypass of MSI remapping won't work in that case as direct
+ * write by Linux to the MSI entries won't result in functional
+ * interrupts, as Xen is the entity that manages the host
+ * interrupt controller and must configure interrupts. However
+ * multiplexing of interrupts by the VMD bridge will work under
+ * Xen, so force the usage of that mode which must always be
+ * supported by VMD bridges.
+ */
+ features &= ~VMD_FEAT_CAN_BYPASS_MSI_REMAP;
+ }
+
if (resource_size(&dev->resource[VMD_CFGBAR]) < (1 << 20))
return -ENOMEM;
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 8c1ad20a21ec..3ce68adda9b7 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -806,11 +806,9 @@ static resource_size_t calculate_iosize(resource_size_t size,
size = (size & 0xff) + ((size & ~0xffUL) << 2);
#endif
size = size + size1;
- if (size < old_size)
- size = old_size;
- size = ALIGN(max(size, add_size) + children_add_size, align);
- return size;
+ size = max(size, add_size) + children_add_size;
+ return ALIGN(max(size, old_size), align);
}
static resource_size_t calculate_memsize(resource_size_t size,
diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
index 4445cae427b2..b2e0a79254f1 100644
--- a/drivers/perf/arm-cmn.c
+++ b/drivers/perf/arm-cmn.c
@@ -675,8 +675,8 @@ static umode_t arm_cmn_event_attr_is_visible(struct kobject *kobj,
if ((chan == 5 && cmn->rsp_vc_num < 2) ||
(chan == 6 && cmn->dat_vc_num < 2) ||
- (chan == 7 && cmn->snp_vc_num < 2) ||
- (chan == 8 && cmn->req_vc_num < 2))
+ (chan == 7 && cmn->req_vc_num < 2) ||
+ (chan == 8 && cmn->snp_vc_num < 2))
return 0;
}
@@ -794,8 +794,8 @@ static umode_t arm_cmn_event_attr_is_visible(struct kobject *kobj,
_CMN_EVENT_XP(pub_##_name, (_event) | (4 << 5)), \
_CMN_EVENT_XP(rsp2_##_name, (_event) | (5 << 5)), \
_CMN_EVENT_XP(dat2_##_name, (_event) | (6 << 5)), \
- _CMN_EVENT_XP(snp2_##_name, (_event) | (7 << 5)), \
- _CMN_EVENT_XP(req2_##_name, (_event) | (8 << 5))
+ _CMN_EVENT_XP(req2_##_name, (_event) | (7 << 5)), \
+ _CMN_EVENT_XP(snp2_##_name, (_event) | (8 << 5))
static struct attribute *arm_cmn_event_attrs[] = {
@@ -2313,6 +2313,7 @@ static int arm_cmn_probe(struct platform_device *pdev)
cmn->dev = &pdev->dev;
cmn->part = (unsigned long)device_get_match_data(cmn->dev);
+ cmn->cpu = cpumask_local_spread(0, dev_to_node(cmn->dev));
platform_set_drvdata(pdev, cmn);
if (cmn->part == PART_CMN600 && has_acpi_companion(cmn->dev)) {
@@ -2340,7 +2341,6 @@ static int arm_cmn_probe(struct platform_device *pdev)
if (err)
return err;
- cmn->cpu = cpumask_local_spread(0, dev_to_node(cmn->dev));
cmn->pmu = (struct pmu) {
.module = THIS_MODULE,
.attr_groups = arm_cmn_attr_groups,
diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
index 0730fe80dc3c..069bcf49ee8f 100644
--- a/drivers/phy/phy-core.c
+++ b/drivers/phy/phy-core.c
@@ -398,13 +398,14 @@ EXPORT_SYMBOL_GPL(phy_power_off);
int phy_set_mode_ext(struct phy *phy, enum phy_mode mode, int submode)
{
- int ret;
+ int ret = 0;
- if (!phy || !phy->ops->set_mode)
+ if (!phy)
return 0;
mutex_lock(&phy->mutex);
- ret = phy->ops->set_mode(phy, mode, submode);
+ if (phy->ops->set_mode)
+ ret = phy->ops->set_mode(phy, mode, submode);
if (!ret)
phy->attrs.mode = mode;
mutex_unlock(&phy->mutex);
diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
index 3824e338b61e..024cc5ce68a3 100644
--- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c
+++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
@@ -9,6 +9,7 @@
* Copyright (C) 2014 Cogent Embedded, Inc.
*/
+#include <linux/cleanup.h>
#include <linux/extcon-provider.h>
#include <linux/interrupt.h>
#include <linux/io.h>
@@ -21,12 +22,14 @@
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/regulator/consumer.h>
+#include <linux/reset.h>
#include <linux/string.h>
#include <linux/usb/of.h>
#include <linux/workqueue.h>
/******* USB2.0 Host registers (original offset is +0x200) *******/
#define USB2_INT_ENABLE 0x000
+#define USB2_AHB_BUS_CTR 0x008
#define USB2_USBCTR 0x00c
#define USB2_SPD_RSM_TIMSET 0x10c
#define USB2_OC_TIMSET 0x110
@@ -42,6 +45,10 @@
#define USB2_INT_ENABLE_USBH_INTB_EN BIT(2) /* For EHCI */
#define USB2_INT_ENABLE_USBH_INTA_EN BIT(1) /* For OHCI */
+/* AHB_BUS_CTR */
+#define USB2_AHB_BUS_CTR_MBL_MASK GENMASK(1, 0)
+#define USB2_AHB_BUS_CTR_MBL_INCR4 2
+
/* USBCTR */
#define USB2_USBCTR_DIRPD BIT(2)
#define USB2_USBCTR_PLL_RST BIT(1)
@@ -112,10 +119,10 @@ struct rcar_gen3_chan {
struct extcon_dev *extcon;
struct rcar_gen3_phy rphys[NUM_OF_PHYS];
struct regulator *vbus;
+ struct reset_control *rstc;
struct work_struct work;
- struct mutex lock; /* protects rphys[...].powered */
+ spinlock_t lock; /* protects access to hardware and driver data structure. */
enum usb_dr_mode dr_mode;
- int irq;
u32 obint_enable_bits;
bool extcon_host;
bool is_otg_channel;
@@ -126,6 +133,7 @@ struct rcar_gen3_chan {
struct rcar_gen3_phy_drv_data {
const struct phy_ops *phy_usb2_ops;
bool no_adp_ctrl;
+ bool init_bus;
};
/*
@@ -340,6 +348,8 @@ static ssize_t role_store(struct device *dev, struct device_attribute *attr,
bool is_b_device;
enum phy_mode cur_mode, new_mode;
+ guard(spinlock_irqsave)(&ch->lock);
+
if (!ch->is_otg_channel || !rcar_gen3_is_any_otg_rphy_initialized(ch))
return -EIO;
@@ -407,7 +417,7 @@ static void rcar_gen3_init_otg(struct rcar_gen3_chan *ch)
val = readl(usb2_base + USB2_ADPCTRL);
writel(val | USB2_ADPCTRL_IDPULLUP, usb2_base + USB2_ADPCTRL);
}
- msleep(20);
+ mdelay(20);
writel(0xffffffff, usb2_base + USB2_OBINTSTA);
writel(ch->obint_enable_bits, usb2_base + USB2_OBINTEN);
@@ -419,16 +429,27 @@ static irqreturn_t rcar_gen3_phy_usb2_irq(int irq, void *_ch)
{
struct rcar_gen3_chan *ch = _ch;
void __iomem *usb2_base = ch->base;
- u32 status = readl(usb2_base + USB2_OBINTSTA);
+ struct device *dev = ch->dev;
irqreturn_t ret = IRQ_NONE;
+ u32 status;
+
+ pm_runtime_get_noresume(dev);
+
+ if (pm_runtime_suspended(dev))
+ goto rpm_put;
- if (status & ch->obint_enable_bits) {
- dev_vdbg(ch->dev, "%s: %08x\n", __func__, status);
- writel(ch->obint_enable_bits, usb2_base + USB2_OBINTSTA);
- rcar_gen3_device_recognition(ch);
- ret = IRQ_HANDLED;
+ scoped_guard(spinlock, &ch->lock) {
+ status = readl(usb2_base + USB2_OBINTSTA);
+ if (status & ch->obint_enable_bits) {
+ dev_vdbg(dev, "%s: %08x\n", __func__, status);
+ writel(ch->obint_enable_bits, usb2_base + USB2_OBINTSTA);
+ rcar_gen3_device_recognition(ch);
+ ret = IRQ_HANDLED;
+ }
}
+rpm_put:
+ pm_runtime_put_noidle(dev);
return ret;
}
@@ -438,17 +459,8 @@ static int rcar_gen3_phy_usb2_init(struct phy *p)
struct rcar_gen3_chan *channel = rphy->ch;
void __iomem *usb2_base = channel->base;
u32 val;
- int ret;
- if (!rcar_gen3_is_any_rphy_initialized(channel) && channel->irq >= 0) {
- INIT_WORK(&channel->work, rcar_gen3_phy_usb2_work);
- ret = request_irq(channel->irq, rcar_gen3_phy_usb2_irq,
- IRQF_SHARED, dev_name(channel->dev), channel);
- if (ret < 0) {
- dev_err(channel->dev, "No irq handler (%d)\n", channel->irq);
- return ret;
- }
- }
+ guard(spinlock_irqsave)(&channel->lock);
/* Initialize USB2 part */
val = readl(usb2_base + USB2_INT_ENABLE);
@@ -476,6 +488,8 @@ static int rcar_gen3_phy_usb2_exit(struct phy *p)
void __iomem *usb2_base = channel->base;
u32 val;
+ guard(spinlock_irqsave)(&channel->lock);
+
rphy->initialized = false;
val = readl(usb2_base + USB2_INT_ENABLE);
@@ -484,9 +498,6 @@ static int rcar_gen3_phy_usb2_exit(struct phy *p)
val &= ~USB2_INT_ENABLE_UCOM_INTEN;
writel(val, usb2_base + USB2_INT_ENABLE);
- if (channel->irq >= 0 && !rcar_gen3_is_any_rphy_initialized(channel))
- free_irq(channel->irq, channel);
-
return 0;
}
@@ -498,16 +509,17 @@ static int rcar_gen3_phy_usb2_power_on(struct phy *p)
u32 val;
int ret = 0;
- mutex_lock(&channel->lock);
- if (!rcar_gen3_are_all_rphys_power_off(channel))
- goto out;
-
if (channel->vbus) {
ret = regulator_enable(channel->vbus);
if (ret)
- goto out;
+ return ret;
}
+ guard(spinlock_irqsave)(&channel->lock);
+
+ if (!rcar_gen3_are_all_rphys_power_off(channel))
+ goto out;
+
val = readl(usb2_base + USB2_USBCTR);
val |= USB2_USBCTR_PLL_RST;
writel(val, usb2_base + USB2_USBCTR);
@@ -517,7 +529,6 @@ static int rcar_gen3_phy_usb2_power_on(struct phy *p)
out:
/* The powered flag should be set for any other phys anyway */
rphy->powered = true;
- mutex_unlock(&channel->lock);
return 0;
}
@@ -528,18 +539,20 @@ static int rcar_gen3_phy_usb2_power_off(struct phy *p)
struct rcar_gen3_chan *channel = rphy->ch;
int ret = 0;
- mutex_lock(&channel->lock);
- rphy->powered = false;
+ scoped_guard(spinlock_irqsave, &channel->lock) {
+ rphy->powered = false;
- if (!rcar_gen3_are_all_rphys_power_off(channel))
- goto out;
+ if (rcar_gen3_are_all_rphys_power_off(channel)) {
+ u32 val = readl(channel->base + USB2_USBCTR);
+
+ val |= USB2_USBCTR_PLL_RST;
+ writel(val, channel->base + USB2_USBCTR);
+ }
+ }
if (channel->vbus)
ret = regulator_disable(channel->vbus);
-out:
- mutex_unlock(&channel->lock);
-
return ret;
}
@@ -647,13 +660,42 @@ static enum usb_dr_mode rcar_gen3_get_dr_mode(struct device_node *np)
return candidate;
}
+static int rcar_gen3_phy_usb2_init_bus(struct rcar_gen3_chan *channel)
+{
+ struct device *dev = channel->dev;
+ int ret;
+ u32 val;
+
+ channel->rstc = devm_reset_control_array_get_shared(dev);
+ if (IS_ERR(channel->rstc))
+ return PTR_ERR(channel->rstc);
+
+ ret = pm_runtime_resume_and_get(dev);
+ if (ret)
+ return ret;
+
+ ret = reset_control_deassert(channel->rstc);
+ if (ret)
+ goto rpm_put;
+
+ val = readl(channel->base + USB2_AHB_BUS_CTR);
+ val &= ~USB2_AHB_BUS_CTR_MBL_MASK;
+ val |= USB2_AHB_BUS_CTR_MBL_INCR4;
+ writel(val, channel->base + USB2_AHB_BUS_CTR);
+
+rpm_put:
+ pm_runtime_put(dev);
+
+ return ret;
+}
+
static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
{
const struct rcar_gen3_phy_drv_data *phy_data;
struct device *dev = &pdev->dev;
struct rcar_gen3_chan *channel;
struct phy_provider *provider;
- int ret = 0, i;
+ int ret = 0, i, irq;
if (!dev->of_node) {
dev_err(dev, "This driver needs device tree\n");
@@ -669,8 +711,6 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
return PTR_ERR(channel->base);
channel->obint_enable_bits = USB2_OBINT_BITS;
- /* get irq number here and request_irq for OTG in phy_init */
- channel->irq = platform_get_irq_optional(pdev, 0);
channel->dr_mode = rcar_gen3_get_dr_mode(dev->of_node);
if (channel->dr_mode != USB_DR_MODE_UNKNOWN) {
channel->is_otg_channel = true;
@@ -700,11 +740,20 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
goto error;
}
+ platform_set_drvdata(pdev, channel);
+ channel->dev = dev;
+
+ if (phy_data->init_bus) {
+ ret = rcar_gen3_phy_usb2_init_bus(channel);
+ if (ret)
+ goto error;
+ }
+
channel->soc_no_adp_ctrl = phy_data->no_adp_ctrl;
if (phy_data->no_adp_ctrl)
channel->obint_enable_bits = USB2_OBINT_IDCHG_EN;
- mutex_init(&channel->lock);
+ spin_lock_init(&channel->lock);
for (i = 0; i < NUM_OF_PHYS; i++) {
channel->rphys[i].phy = devm_phy_create(dev, NULL,
phy_data->phy_usb2_ops);
@@ -727,8 +776,19 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
channel->vbus = NULL;
}
- platform_set_drvdata(pdev, channel);
- channel->dev = dev;
+ irq = platform_get_irq_optional(pdev, 0);
+ if (irq < 0 && irq != -ENXIO) {
+ ret = irq;
+ goto error;
+ } else if (irq > 0) {
+ INIT_WORK(&channel->work, rcar_gen3_phy_usb2_work);
+ ret = devm_request_irq(dev, irq, rcar_gen3_phy_usb2_irq,
+ IRQF_SHARED, dev_name(dev), channel);
+ if (ret < 0) {
+ dev_err(dev, "Failed to request irq (%d)\n", irq);
+ goto error;
+ }
+ }
provider = devm_of_phy_provider_register(dev, rcar_gen3_phy_usb2_xlate);
if (IS_ERR(provider)) {
@@ -756,6 +816,7 @@ static int rcar_gen3_phy_usb2_remove(struct platform_device *pdev)
if (channel->is_otg_channel)
device_remove_file(&pdev->dev, &dev_attr_role);
+ reset_control_assert(channel->rstc);
pm_runtime_disable(&pdev->dev);
return 0;
diff --git a/drivers/pinctrl/bcm/pinctrl-bcm281xx.c b/drivers/pinctrl/bcm/pinctrl-bcm281xx.c
index bba5496335ee..c313f0178957 100644
--- a/drivers/pinctrl/bcm/pinctrl-bcm281xx.c
+++ b/drivers/pinctrl/bcm/pinctrl-bcm281xx.c
@@ -69,7 +69,7 @@ static enum bcm281xx_pin_type hdmi_pin = BCM281XX_PIN_TYPE_HDMI;
struct bcm281xx_pin_function {
const char *name;
const char * const *groups;
- const unsigned ngroups;
+ const unsigned int ngroups;
};
/*
@@ -81,10 +81,10 @@ struct bcm281xx_pinctrl_data {
/* List of all pins */
const struct pinctrl_pin_desc *pins;
- const unsigned npins;
+ const unsigned int npins;
const struct bcm281xx_pin_function *functions;
- const unsigned nfunctions;
+ const unsigned int nfunctions;
struct regmap *regmap;
};
@@ -938,7 +938,7 @@ static struct bcm281xx_pinctrl_data bcm281xx_pinctrl = {
};
static inline enum bcm281xx_pin_type pin_type_get(struct pinctrl_dev *pctldev,
- unsigned pin)
+ unsigned int pin)
{
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
@@ -982,7 +982,7 @@ static int bcm281xx_pinctrl_get_groups_count(struct pinctrl_dev *pctldev)
}
static const char *bcm281xx_pinctrl_get_group_name(struct pinctrl_dev *pctldev,
- unsigned group)
+ unsigned int group)
{
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
@@ -990,9 +990,9 @@ static const char *bcm281xx_pinctrl_get_group_name(struct pinctrl_dev *pctldev,
}
static int bcm281xx_pinctrl_get_group_pins(struct pinctrl_dev *pctldev,
- unsigned group,
+ unsigned int group,
const unsigned **pins,
- unsigned *num_pins)
+ unsigned int *num_pins)
{
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
@@ -1004,7 +1004,7 @@ static int bcm281xx_pinctrl_get_group_pins(struct pinctrl_dev *pctldev,
static void bcm281xx_pinctrl_pin_dbg_show(struct pinctrl_dev *pctldev,
struct seq_file *s,
- unsigned offset)
+ unsigned int offset)
{
seq_printf(s, " %s", dev_name(pctldev->dev));
}
@@ -1026,7 +1026,7 @@ static int bcm281xx_pinctrl_get_fcns_count(struct pinctrl_dev *pctldev)
}
static const char *bcm281xx_pinctrl_get_fcn_name(struct pinctrl_dev *pctldev,
- unsigned function)
+ unsigned int function)
{
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
@@ -1034,9 +1034,9 @@ static const char *bcm281xx_pinctrl_get_fcn_name(struct pinctrl_dev *pctldev,
}
static int bcm281xx_pinctrl_get_fcn_groups(struct pinctrl_dev *pctldev,
- unsigned function,
+ unsigned int function,
const char * const **groups,
- unsigned * const num_groups)
+ unsigned int * const num_groups)
{
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
@@ -1047,8 +1047,8 @@ static int bcm281xx_pinctrl_get_fcn_groups(struct pinctrl_dev *pctldev,
}
static int bcm281xx_pinmux_set(struct pinctrl_dev *pctldev,
- unsigned function,
- unsigned group)
+ unsigned int function,
+ unsigned int group)
{
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
const struct bcm281xx_pin_function *f = &pdata->functions[function];
@@ -1079,7 +1079,7 @@ static const struct pinmux_ops bcm281xx_pinctrl_pinmux_ops = {
};
static int bcm281xx_pinctrl_pin_config_get(struct pinctrl_dev *pctldev,
- unsigned pin,
+ unsigned int pin,
unsigned long *config)
{
return -ENOTSUPP;
@@ -1088,9 +1088,9 @@ static int bcm281xx_pinctrl_pin_config_get(struct pinctrl_dev *pctldev,
/* Goes through the configs and update register val/mask */
static int bcm281xx_std_pin_update(struct pinctrl_dev *pctldev,
- unsigned pin,
+ unsigned int pin,
unsigned long *configs,
- unsigned num_configs,
+ unsigned int num_configs,
u32 *val,
u32 *mask)
{
@@ -1204,9 +1204,9 @@ static const u16 bcm281xx_pullup_map[] = {
/* Goes through the configs and update register val/mask */
static int bcm281xx_i2c_pin_update(struct pinctrl_dev *pctldev,
- unsigned pin,
+ unsigned int pin,
unsigned long *configs,
- unsigned num_configs,
+ unsigned int num_configs,
u32 *val,
u32 *mask)
{
@@ -1274,9 +1274,9 @@ static int bcm281xx_i2c_pin_update(struct pinctrl_dev *pctldev,
/* Goes through the configs and update register val/mask */
static int bcm281xx_hdmi_pin_update(struct pinctrl_dev *pctldev,
- unsigned pin,
+ unsigned int pin,
unsigned long *configs,
- unsigned num_configs,
+ unsigned int num_configs,
u32 *val,
u32 *mask)
{
@@ -1318,9 +1318,9 @@ static int bcm281xx_hdmi_pin_update(struct pinctrl_dev *pctldev,
}
static int bcm281xx_pinctrl_pin_config_set(struct pinctrl_dev *pctldev,
- unsigned pin,
+ unsigned int pin,
unsigned long *configs,
- unsigned num_configs)
+ unsigned int num_configs)
{
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
enum bcm281xx_pin_type pin_type;
diff --git a/drivers/pinctrl/devicetree.c b/drivers/pinctrl/devicetree.c
index 5ee746cb81f5..6520b88db110 100644
--- a/drivers/pinctrl/devicetree.c
+++ b/drivers/pinctrl/devicetree.c
@@ -143,10 +143,14 @@ static int dt_to_map_one_config(struct pinctrl *p,
pctldev = get_pinctrl_dev_from_of_node(np_pctldev);
if (pctldev)
break;
- /* Do not defer probing of hogs (circular loop) */
+ /*
+ * Do not defer probing of hogs (circular loop)
+ *
+ * Return 1 to let the caller catch the case.
+ */
if (np_pctldev == p->dev->of_node) {
of_node_put(np_pctldev);
- return -ENODEV;
+ return 1;
}
}
of_node_put(np_pctldev);
@@ -265,6 +269,8 @@ int pinctrl_dt_to_map(struct pinctrl *p, struct pinctrl_dev *pctldev)
ret = dt_to_map_one_config(p, pctldev, statename,
np_config);
of_node_put(np_config);
+ if (ret == 1)
+ continue;
if (ret < 0)
goto err;
}
diff --git a/drivers/pinctrl/meson/pinctrl-meson.c b/drivers/pinctrl/meson/pinctrl-meson.c
index 530f3f934e19..1f05f7f1a9ae 100644
--- a/drivers/pinctrl/meson/pinctrl-meson.c
+++ b/drivers/pinctrl/meson/pinctrl-meson.c
@@ -487,7 +487,7 @@ static int meson_pinconf_get(struct pinctrl_dev *pcdev, unsigned int pin,
case PIN_CONFIG_BIAS_PULL_DOWN:
case PIN_CONFIG_BIAS_PULL_UP:
if (meson_pinconf_get_pull(pc, pin) == param)
- arg = 1;
+ arg = 60000;
else
return -EINVAL;
break;
diff --git a/drivers/pinctrl/tegra/pinctrl-tegra.c b/drivers/pinctrl/tegra/pinctrl-tegra.c
index 30341c43da59..78de32666d56 100644
--- a/drivers/pinctrl/tegra/pinctrl-tegra.c
+++ b/drivers/pinctrl/tegra/pinctrl-tegra.c
@@ -278,8 +278,8 @@ static int tegra_pinctrl_set_mux(struct pinctrl_dev *pctldev,
return 0;
}
-static const struct tegra_pingroup *tegra_pinctrl_get_group(struct pinctrl_dev *pctldev,
- unsigned int offset)
+static int tegra_pinctrl_get_group_index(struct pinctrl_dev *pctldev,
+ unsigned int offset)
{
struct tegra_pmx *pmx = pinctrl_dev_get_drvdata(pctldev);
unsigned int group, num_pins, j;
@@ -292,12 +292,35 @@ static const struct tegra_pingroup *tegra_pinctrl_get_group(struct pinctrl_dev *
continue;
for (j = 0; j < num_pins; j++) {
if (offset == pins[j])
- return &pmx->soc->groups[group];
+ return group;
}
}
- dev_err(pctldev->dev, "Pingroup not found for pin %u\n", offset);
- return NULL;
+ return -EINVAL;
+}
+
+static const struct tegra_pingroup *tegra_pinctrl_get_group(struct pinctrl_dev *pctldev,
+ unsigned int offset,
+ int group_index)
+{
+ struct tegra_pmx *pmx = pinctrl_dev_get_drvdata(pctldev);
+
+ if (group_index < 0 || group_index >= pmx->soc->ngroups)
+ return NULL;
+
+ return &pmx->soc->groups[group_index];
+}
+
+static struct tegra_pingroup_config *tegra_pinctrl_get_group_config(struct pinctrl_dev *pctldev,
+ unsigned int offset,
+ int group_index)
+{
+ struct tegra_pmx *pmx = pinctrl_dev_get_drvdata(pctldev);
+
+ if (group_index < 0)
+ return NULL;
+
+ return &pmx->pingroup_configs[group_index];
}
static int tegra_pinctrl_gpio_request_enable(struct pinctrl_dev *pctldev,
@@ -306,12 +329,15 @@ static int tegra_pinctrl_gpio_request_enable(struct pinctrl_dev *pctldev,
{
struct tegra_pmx *pmx = pinctrl_dev_get_drvdata(pctldev);
const struct tegra_pingroup *group;
+ struct tegra_pingroup_config *config;
+ int group_index;
u32 value;
if (!pmx->soc->sfsel_in_mux)
return 0;
- group = tegra_pinctrl_get_group(pctldev, offset);
+ group_index = tegra_pinctrl_get_group_index(pctldev, offset);
+ group = tegra_pinctrl_get_group(pctldev, offset, group_index);
if (!group)
return -EINVAL;
@@ -319,7 +345,11 @@ static int tegra_pinctrl_gpio_request_enable(struct pinctrl_dev *pctldev,
if (group->mux_reg < 0 || group->sfsel_bit < 0)
return -EINVAL;
+ config = tegra_pinctrl_get_group_config(pctldev, offset, group_index);
+ if (!config)
+ return -EINVAL;
value = pmx_readl(pmx, group->mux_bank, group->mux_reg);
+ config->is_sfsel = (value & BIT(group->sfsel_bit)) != 0;
value &= ~BIT(group->sfsel_bit);
pmx_writel(pmx, value, group->mux_bank, group->mux_reg);
@@ -332,12 +362,15 @@ static void tegra_pinctrl_gpio_disable_free(struct pinctrl_dev *pctldev,
{
struct tegra_pmx *pmx = pinctrl_dev_get_drvdata(pctldev);
const struct tegra_pingroup *group;
+ struct tegra_pingroup_config *config;
+ int group_index;
u32 value;
if (!pmx->soc->sfsel_in_mux)
return;
- group = tegra_pinctrl_get_group(pctldev, offset);
+ group_index = tegra_pinctrl_get_group_index(pctldev, offset);
+ group = tegra_pinctrl_get_group(pctldev, offset, group_index);
if (!group)
return;
@@ -345,8 +378,12 @@ static void tegra_pinctrl_gpio_disable_free(struct pinctrl_dev *pctldev,
if (group->mux_reg < 0 || group->sfsel_bit < 0)
return;
+ config = tegra_pinctrl_get_group_config(pctldev, offset, group_index);
+ if (!config)
+ return;
value = pmx_readl(pmx, group->mux_bank, group->mux_reg);
- value |= BIT(group->sfsel_bit);
+ if (config->is_sfsel)
+ value |= BIT(group->sfsel_bit);
pmx_writel(pmx, value, group->mux_bank, group->mux_reg);
}
@@ -799,6 +836,12 @@ int tegra_pinctrl_probe(struct platform_device *pdev,
pmx->dev = &pdev->dev;
pmx->soc = soc_data;
+ pmx->pingroup_configs = devm_kcalloc(&pdev->dev,
+ pmx->soc->ngroups, sizeof(*pmx->pingroup_configs),
+ GFP_KERNEL);
+ if (!pmx->pingroup_configs)
+ return -ENOMEM;
+
/*
* Each mux group will appear in 4 functions' list of groups.
* This over-allocates slightly, since not all groups are mux groups.
diff --git a/drivers/pinctrl/tegra/pinctrl-tegra.h b/drivers/pinctrl/tegra/pinctrl-tegra.h
index f8269858eb78..ec5198d391ea 100644
--- a/drivers/pinctrl/tegra/pinctrl-tegra.h
+++ b/drivers/pinctrl/tegra/pinctrl-tegra.h
@@ -8,6 +8,10 @@
#ifndef __PINMUX_TEGRA_H__
#define __PINMUX_TEGRA_H__
+struct tegra_pingroup_config {
+ bool is_sfsel;
+};
+
struct tegra_pmx {
struct device *dev;
struct pinctrl_dev *pctl;
@@ -18,6 +22,8 @@ struct tegra_pmx {
int nbanks;
void __iomem **regs;
u32 *backup_regs;
+ /* Array of size soc->ngroups */
+ struct tegra_pingroup_config *pingroup_configs;
};
enum tegra_pinconf_param {
diff --git a/drivers/platform/x86/dell/dell-wmi-sysman/passobj-attributes.c b/drivers/platform/x86/dell/dell-wmi-sysman/passobj-attributes.c
index 230e6ee96636..d8f1bf5e58a0 100644
--- a/drivers/platform/x86/dell/dell-wmi-sysman/passobj-attributes.c
+++ b/drivers/platform/x86/dell/dell-wmi-sysman/passobj-attributes.c
@@ -45,7 +45,7 @@ static ssize_t current_password_store(struct kobject *kobj,
int length;
length = strlen(buf);
- if (buf[length-1] == '\n')
+ if (length && buf[length - 1] == '\n')
length--;
/* firmware does verifiation of min/max password length,
diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
index b543d117b12c..259eb2a2858f 100644
--- a/drivers/platform/x86/fujitsu-laptop.c
+++ b/drivers/platform/x86/fujitsu-laptop.c
@@ -17,13 +17,13 @@
/*
* fujitsu-laptop.c - Fujitsu laptop support, providing access to additional
* features made available on a range of Fujitsu laptops including the
- * P2xxx/P5xxx/S6xxx/S7xxx series.
+ * P2xxx/P5xxx/S2xxx/S6xxx/S7xxx series.
*
* This driver implements a vendor-specific backlight control interface for
* Fujitsu laptops and provides support for hotkeys present on certain Fujitsu
* laptops.
*
- * This driver has been tested on a Fujitsu Lifebook S6410, S7020 and
+ * This driver has been tested on a Fujitsu Lifebook S2110, S6410, S7020 and
* P8010. It should work on most P-series and S-series Lifebooks, but
* YMMV.
*
@@ -102,7 +102,11 @@
#define KEY2_CODE 0x411
#define KEY3_CODE 0x412
#define KEY4_CODE 0x413
-#define KEY5_CODE 0x420
+#define KEY5_CODE 0x414
+#define KEY6_CODE 0x415
+#define KEY7_CODE 0x416
+#define KEY8_CODE 0x417
+#define KEY9_CODE 0x420
/* Hotkey ringbuffer limits */
#define MAX_HOTKEY_RINGBUFFER_SIZE 100
@@ -450,7 +454,7 @@ static const struct key_entry keymap_default[] = {
{ KE_KEY, KEY2_CODE, { KEY_PROG2 } },
{ KE_KEY, KEY3_CODE, { KEY_PROG3 } },
{ KE_KEY, KEY4_CODE, { KEY_PROG4 } },
- { KE_KEY, KEY5_CODE, { KEY_RFKILL } },
+ { KE_KEY, KEY9_CODE, { KEY_RFKILL } },
/* Soft keys read from status flags */
{ KE_KEY, FLAG_RFKILL, { KEY_RFKILL } },
{ KE_KEY, FLAG_TOUCHPAD_TOGGLE, { KEY_TOUCHPAD_TOGGLE } },
@@ -474,6 +478,18 @@ static const struct key_entry keymap_p8010[] = {
{ KE_END, 0 }
};
+static const struct key_entry keymap_s2110[] = {
+ { KE_KEY, KEY1_CODE, { KEY_PROG1 } }, /* "A" */
+ { KE_KEY, KEY2_CODE, { KEY_PROG2 } }, /* "B" */
+ { KE_KEY, KEY3_CODE, { KEY_WWW } }, /* "Internet" */
+ { KE_KEY, KEY4_CODE, { KEY_EMAIL } }, /* "E-mail" */
+ { KE_KEY, KEY5_CODE, { KEY_STOPCD } },
+ { KE_KEY, KEY6_CODE, { KEY_PLAYPAUSE } },
+ { KE_KEY, KEY7_CODE, { KEY_PREVIOUSSONG } },
+ { KE_KEY, KEY8_CODE, { KEY_NEXTSONG } },
+ { KE_END, 0 }
+};
+
static const struct key_entry *keymap = keymap_default;
static int fujitsu_laptop_dmi_keymap_override(const struct dmi_system_id *id)
@@ -511,6 +527,15 @@ static const struct dmi_system_id fujitsu_laptop_dmi_table[] = {
},
.driver_data = (void *)keymap_p8010
},
+ {
+ .callback = fujitsu_laptop_dmi_keymap_override,
+ .ident = "Fujitsu LifeBook S2110",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK S2110"),
+ },
+ .driver_data = (void *)keymap_s2110
+ },
{}
};
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 26ca9c453a59..17d74434e604 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -211,6 +211,7 @@ enum tpacpi_hkey_event_t {
/* Thermal events */
TP_HKEY_EV_ALARM_BAT_HOT = 0x6011, /* battery too hot */
TP_HKEY_EV_ALARM_BAT_XHOT = 0x6012, /* battery critically hot */
+ TP_HKEY_EV_ALARM_BAT_LIM_CHANGE = 0x6013, /* battery charge limit changed*/
TP_HKEY_EV_ALARM_SENSOR_HOT = 0x6021, /* sensor too hot */
TP_HKEY_EV_ALARM_SENSOR_XHOT = 0x6022, /* sensor critically hot */
TP_HKEY_EV_THM_TABLE_CHANGED = 0x6030, /* windows; thermal table changed */
@@ -3948,6 +3949,10 @@ static bool hotkey_notify_6xxx(const u32 hkey,
pr_alert("THERMAL EMERGENCY: battery is extremely hot!\n");
/* recommended action: immediate sleep/hibernate */
break;
+ case TP_HKEY_EV_ALARM_BAT_LIM_CHANGE:
+ pr_debug("Battery Info: battery charge threshold changed\n");
+ /* User changed charging threshold. No action needed */
+ return true;
case TP_HKEY_EV_ALARM_SENSOR_HOT:
pr_crit("THERMAL ALARM: a sensor reports something is too hot!\n");
/* recommended action: warn user through gui, that */
@@ -11517,6 +11522,8 @@ static int __must_check __init get_thinkpad_model_data(
tp->vendor = PCI_VENDOR_ID_IBM;
else if (dmi_name_in_vendors("LENOVO"))
tp->vendor = PCI_VENDOR_ID_LENOVO;
+ else if (dmi_name_in_vendors("NEC"))
+ tp->vendor = PCI_VENDOR_ID_LENOVO;
else
return 0;
diff --git a/drivers/regulator/ad5398.c b/drivers/regulator/ad5398.c
index 75f432f61e91..f4d6e62bd963 100644
--- a/drivers/regulator/ad5398.c
+++ b/drivers/regulator/ad5398.c
@@ -14,6 +14,7 @@
#include <linux/platform_device.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>
+#include <linux/regulator/of_regulator.h>
#define AD5398_CURRENT_EN_MASK 0x8000
@@ -221,15 +222,20 @@ static int ad5398_probe(struct i2c_client *client,
const struct ad5398_current_data_format *df =
(struct ad5398_current_data_format *)id->driver_data;
- if (!init_data)
- return -EINVAL;
-
chip = devm_kzalloc(&client->dev, sizeof(*chip), GFP_KERNEL);
if (!chip)
return -ENOMEM;
config.dev = &client->dev;
+ if (client->dev.of_node)
+ init_data = of_get_regulator_init_data(&client->dev,
+ client->dev.of_node,
+ &ad5398_reg);
+ if (!init_data)
+ return -EINVAL;
+
config.init_data = init_data;
+ config.of_node = client->dev.of_node;
config.driver_data = chip;
chip->client = client;
diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c
index 68f37296b151..af96541c9b69 100644
--- a/drivers/remoteproc/qcom_wcnss.c
+++ b/drivers/remoteproc/qcom_wcnss.c
@@ -117,10 +117,10 @@ static const struct wcnss_data pronto_v1_data = {
.pmu_offset = 0x1004,
.spare_offset = 0x1088,
- .pd_names = { "mx", "cx" },
+ .pd_names = { "cx", "mx" },
.vregs = (struct wcnss_vreg_info[]) {
- { "vddmx", 950000, 1150000, 0 },
{ "vddcx", .super_turbo = true},
+ { "vddmx", 950000, 1150000, 0 },
{ "vddpx", 1800000, 1800000, 0 },
},
.num_pd_vregs = 2,
@@ -131,10 +131,10 @@ static const struct wcnss_data pronto_v2_data = {
.pmu_offset = 0x1004,
.spare_offset = 0x1088,
- .pd_names = { "mx", "cx" },
+ .pd_names = { "cx", "mx" },
.vregs = (struct wcnss_vreg_info[]) {
- { "vddmx", 1287500, 1287500, 0 },
{ "vddcx", .super_turbo = true },
+ { "vddmx", 1287500, 1287500, 0 },
{ "vddpx", 1800000, 1800000, 0 },
},
.num_pd_vregs = 2,
@@ -386,8 +386,17 @@ static irqreturn_t wcnss_stop_ack_interrupt(int irq, void *dev)
static int wcnss_init_pds(struct qcom_wcnss *wcnss,
const char * const pd_names[WCNSS_MAX_PDS])
{
+ struct device *dev = wcnss->dev;
int i, ret;
+ /* Handle single power domain */
+ if (dev->pm_domain) {
+ wcnss->pds[0] = dev;
+ wcnss->num_pds = 1;
+ pm_runtime_enable(dev);
+ return 0;
+ }
+
for (i = 0; i < WCNSS_MAX_PDS; i++) {
if (!pd_names[i])
break;
@@ -407,8 +416,15 @@ static int wcnss_init_pds(struct qcom_wcnss *wcnss,
static void wcnss_release_pds(struct qcom_wcnss *wcnss)
{
+ struct device *dev = wcnss->dev;
int i;
+ /* Handle single power domain */
+ if (wcnss->num_pds == 1 && dev->pm_domain) {
+ pm_runtime_disable(dev);
+ return;
+ }
+
for (i = 0; i < wcnss->num_pds; i++)
dev_pm_domain_detach(wcnss->pds[i], false);
}
@@ -426,10 +442,14 @@ static int wcnss_init_regulators(struct qcom_wcnss *wcnss,
* the regulators for the power domains. For old device trees we need to
* reserve extra space to manage them through the regulator interface.
*/
- if (wcnss->num_pds)
- info += num_pd_vregs;
- else
+ if (wcnss->num_pds) {
+ info += wcnss->num_pds;
+ /* Handle single power domain case */
+ if (wcnss->num_pds < num_pd_vregs)
+ num_vregs += num_pd_vregs - wcnss->num_pds;
+ } else {
num_vregs += num_pd_vregs;
+ }
bulk = devm_kcalloc(wcnss->dev,
num_vregs, sizeof(struct regulator_bulk_data),
diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c
index d51565bcc189..b7f8b3f9b059 100644
--- a/drivers/rtc/rtc-ds1307.c
+++ b/drivers/rtc/rtc-ds1307.c
@@ -1802,10 +1802,8 @@ static int ds1307_probe(struct i2c_client *client,
* For some variants, be sure alarms can trigger when we're
* running on Vbackup (BBSQI/BBSQW)
*/
- if (want_irq || ds1307_can_wakeup_device) {
+ if (want_irq || ds1307_can_wakeup_device)
regs[0] |= DS1337_BIT_INTCN | chip->bbsqi_bit;
- regs[0] &= ~(DS1337_BIT_A2IE | DS1337_BIT_A1IE);
- }
regmap_write(ds1307->regmap, DS1337_REG_CONTROL,
regs[0]);
diff --git a/drivers/rtc/rtc-rv3032.c b/drivers/rtc/rtc-rv3032.c
index c3bee305eacc..9c85ecd9afb8 100644
--- a/drivers/rtc/rtc-rv3032.c
+++ b/drivers/rtc/rtc-rv3032.c
@@ -69,7 +69,7 @@
#define RV3032_CLKOUT2_FD_MSK GENMASK(6, 5)
#define RV3032_CLKOUT2_OS BIT(7)
-#define RV3032_CTRL1_EERD BIT(3)
+#define RV3032_CTRL1_EERD BIT(2)
#define RV3032_CTRL1_WADA BIT(5)
#define RV3032_CTRL2_STOP BIT(0)
diff --git a/drivers/s390/crypto/vfio_ap_ops.c b/drivers/s390/crypto/vfio_ap_ops.c
index 86a8bd532489..11fe917fbd9d 100644
--- a/drivers/s390/crypto/vfio_ap_ops.c
+++ b/drivers/s390/crypto/vfio_ap_ops.c
@@ -789,48 +789,66 @@ static void vfio_ap_mdev_remove(struct mdev_device *mdev)
vfio_put_device(&matrix_mdev->vdev);
}
-#define MDEV_SHARING_ERR "Userspace may not re-assign queue %02lx.%04lx " \
- "already assigned to %s"
+#define MDEV_SHARING_ERR "Userspace may not assign queue %02lx.%04lx to mdev: already assigned to %s"
-static void vfio_ap_mdev_log_sharing_err(struct ap_matrix_mdev *matrix_mdev,
- unsigned long *apm,
- unsigned long *aqm)
+#define MDEV_IN_USE_ERR "Can not reserve queue %02lx.%04lx for host driver: in use by mdev"
+
+static void vfio_ap_mdev_log_sharing_err(struct ap_matrix_mdev *assignee,
+ struct ap_matrix_mdev *assigned_to,
+ unsigned long *apm, unsigned long *aqm)
{
unsigned long apid, apqi;
- const struct device *dev = mdev_dev(matrix_mdev->mdev);
- const char *mdev_name = dev_name(dev);
- for_each_set_bit_inv(apid, apm, AP_DEVICES)
+ for_each_set_bit_inv(apid, apm, AP_DEVICES) {
+ for_each_set_bit_inv(apqi, aqm, AP_DOMAINS) {
+ dev_warn(mdev_dev(assignee->mdev), MDEV_SHARING_ERR,
+ apid, apqi, dev_name(mdev_dev(assigned_to->mdev)));
+ }
+ }
+}
+
+static void vfio_ap_mdev_log_in_use_err(struct ap_matrix_mdev *assignee,
+ unsigned long *apm, unsigned long *aqm)
+{
+ unsigned long apid, apqi;
+
+ for_each_set_bit_inv(apid, apm, AP_DEVICES) {
for_each_set_bit_inv(apqi, aqm, AP_DOMAINS)
- dev_warn(dev, MDEV_SHARING_ERR, apid, apqi, mdev_name);
+ dev_warn(mdev_dev(assignee->mdev), MDEV_IN_USE_ERR, apid, apqi);
+ }
}
/**
* vfio_ap_mdev_verify_no_sharing - verify APQNs are not shared by matrix mdevs
*
+ * @assignee: the matrix mdev to which @mdev_apm and @mdev_aqm are being
+ * assigned; or, NULL if this function was called by the AP bus
+ * driver in_use callback to verify none of the APQNs being reserved
+ * for the host device driver are in use by a vfio_ap mediated device
* @mdev_apm: mask indicating the APIDs of the APQNs to be verified
* @mdev_aqm: mask indicating the APQIs of the APQNs to be verified
*
- * Verifies that each APQN derived from the Cartesian product of a bitmap of
- * AP adapter IDs and AP queue indexes is not configured for any matrix
- * mediated device. AP queue sharing is not allowed.
+ * Verifies that each APQN derived from the Cartesian product of APIDs
+ * represented by the bits set in @mdev_apm and the APQIs of the bits set in
+ * @mdev_aqm is not assigned to a mediated device other than the mdev to which
+ * the APQN is being assigned (@assignee). AP queue sharing is not allowed.
*
* Return: 0 if the APQNs are not shared; otherwise return -EADDRINUSE.
*/
-static int vfio_ap_mdev_verify_no_sharing(unsigned long *mdev_apm,
+static int vfio_ap_mdev_verify_no_sharing(struct ap_matrix_mdev *assignee,
+ unsigned long *mdev_apm,
unsigned long *mdev_aqm)
{
- struct ap_matrix_mdev *matrix_mdev;
+ struct ap_matrix_mdev *assigned_to;
DECLARE_BITMAP(apm, AP_DEVICES);
DECLARE_BITMAP(aqm, AP_DOMAINS);
- list_for_each_entry(matrix_mdev, &matrix_dev->mdev_list, node) {
+ list_for_each_entry(assigned_to, &matrix_dev->mdev_list, node) {
/*
- * If the input apm and aqm are fields of the matrix_mdev
- * object, then move on to the next matrix_mdev.
+ * If the mdev to which the mdev_apm and mdev_aqm is being
+ * assigned is the same as the mdev being verified
*/
- if (mdev_apm == matrix_mdev->matrix.apm &&
- mdev_aqm == matrix_mdev->matrix.aqm)
+ if (assignee == assigned_to)
continue;
memset(apm, 0, sizeof(apm));
@@ -840,15 +858,16 @@ static int vfio_ap_mdev_verify_no_sharing(unsigned long *mdev_apm,
* We work on full longs, as we can only exclude the leftover
* bits in non-inverse order. The leftover is all zeros.
*/
- if (!bitmap_and(apm, mdev_apm, matrix_mdev->matrix.apm,
- AP_DEVICES))
+ if (!bitmap_and(apm, mdev_apm, assigned_to->matrix.apm, AP_DEVICES))
continue;
- if (!bitmap_and(aqm, mdev_aqm, matrix_mdev->matrix.aqm,
- AP_DOMAINS))
+ if (!bitmap_and(aqm, mdev_aqm, assigned_to->matrix.aqm, AP_DOMAINS))
continue;
- vfio_ap_mdev_log_sharing_err(matrix_mdev, apm, aqm);
+ if (assignee)
+ vfio_ap_mdev_log_sharing_err(assignee, assigned_to, apm, aqm);
+ else
+ vfio_ap_mdev_log_in_use_err(assigned_to, apm, aqm);
return -EADDRINUSE;
}
@@ -877,7 +896,8 @@ static int vfio_ap_mdev_validate_masks(struct ap_matrix_mdev *matrix_mdev)
matrix_mdev->matrix.aqm))
return -EADDRNOTAVAIL;
- return vfio_ap_mdev_verify_no_sharing(matrix_mdev->matrix.apm,
+ return vfio_ap_mdev_verify_no_sharing(matrix_mdev,
+ matrix_mdev->matrix.apm,
matrix_mdev->matrix.aqm);
}
@@ -1945,7 +1965,7 @@ int vfio_ap_mdev_resource_in_use(unsigned long *apm, unsigned long *aqm)
mutex_lock(&matrix_dev->guests_lock);
mutex_lock(&matrix_dev->mdevs_lock);
- ret = vfio_ap_mdev_verify_no_sharing(apm, aqm);
+ ret = vfio_ap_mdev_verify_no_sharing(NULL, apm, aqm);
mutex_unlock(&matrix_dev->mdevs_lock);
mutex_unlock(&matrix_dev->guests_lock);
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
index 57be02f8d5c1..b04112c77fcd 100644
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
@@ -5619,6 +5619,7 @@ static struct lpfc_nodelist *
__lpfc_findnode_did(struct lpfc_vport *vport, uint32_t did)
{
struct lpfc_nodelist *ndlp;
+ struct lpfc_nodelist *np = NULL;
uint32_t data1;
list_for_each_entry(ndlp, &vport->fc_nodes, nlp_listp) {
@@ -5633,14 +5634,20 @@ __lpfc_findnode_did(struct lpfc_vport *vport, uint32_t did)
ndlp, ndlp->nlp_DID,
ndlp->nlp_flag, data1, ndlp->nlp_rpi,
ndlp->active_rrqs_xri_bitmap);
- return ndlp;
+
+ /* Check for new or potentially stale node */
+ if (ndlp->nlp_state != NLP_STE_UNUSED_NODE)
+ return ndlp;
+ np = ndlp;
}
}
- /* FIND node did <did> NOT FOUND */
- lpfc_printf_vlog(vport, KERN_INFO, LOG_NODE,
- "0932 FIND node did x%x NOT FOUND.\n", did);
- return NULL;
+ if (!np)
+ /* FIND node did <did> NOT FOUND */
+ lpfc_printf_vlog(vport, KERN_INFO, LOG_NODE,
+ "0932 FIND node did x%x NOT FOUND.\n", did);
+
+ return np;
}
struct lpfc_nodelist *
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 1a0bafde34d8..97f3c5240d57 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -13204,6 +13204,7 @@ lpfc_sli4_enable_msi(struct lpfc_hba *phba)
eqhdl = lpfc_get_eq_hdl(0);
rc = pci_irq_vector(phba->pcidev, 0);
if (rc < 0) {
+ free_irq(phba->pcidev->irq, phba);
pci_free_irq_vectors(phba->pcidev);
lpfc_printf_log(phba, KERN_WARNING, LOG_INIT,
"0496 MSI pci_irq_vec failed (%d)\n", rc);
@@ -13284,6 +13285,7 @@ lpfc_sli4_enable_intr(struct lpfc_hba *phba, uint32_t cfg_mode)
eqhdl = lpfc_get_eq_hdl(0);
retval = pci_irq_vector(phba->pcidev, 0);
if (retval < 0) {
+ free_irq(phba->pcidev->irq, phba);
lpfc_printf_log(phba, KERN_WARNING, LOG_INIT,
"0502 INTR pci_irq_vec failed (%d)\n",
retval);
diff --git a/drivers/scsi/mpi3mr/mpi3mr_fw.c b/drivers/scsi/mpi3mr/mpi3mr_fw.c
index 41636c4c43af..015a875a46a1 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_fw.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_fw.c
@@ -174,6 +174,9 @@ static void mpi3mr_print_event_data(struct mpi3mr_ioc *mrioc,
char *desc = NULL;
u16 event;
+ if (!(mrioc->logging_level & MPI3_DEBUG_EVENT))
+ return;
+
event = event_reply->event;
switch (event) {
diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
index fc5af6a5114e..863503e8a4d1 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_ctl.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
@@ -679,6 +679,7 @@ _ctl_do_mpt_command(struct MPT3SAS_ADAPTER *ioc, struct mpt3_ioctl_command karg,
size_t data_in_sz = 0;
long ret;
u16 device_handle = MPT3SAS_INVALID_DEVICE_HANDLE;
+ int tm_ret;
issue_reset = 0;
@@ -1120,18 +1121,25 @@ _ctl_do_mpt_command(struct MPT3SAS_ADAPTER *ioc, struct mpt3_ioctl_command karg,
if (pcie_device && (!ioc->tm_custom_handling) &&
(!(mpt3sas_scsih_is_pcie_scsi_device(
pcie_device->device_info))))
- mpt3sas_scsih_issue_locked_tm(ioc,
+ tm_ret = mpt3sas_scsih_issue_locked_tm(ioc,
le16_to_cpu(mpi_request->FunctionDependent1),
0, 0, 0,
MPI2_SCSITASKMGMT_TASKTYPE_TARGET_RESET, 0,
0, pcie_device->reset_timeout,
MPI26_SCSITASKMGMT_MSGFLAGS_PROTOCOL_LVL_RST_PCIE);
else
- mpt3sas_scsih_issue_locked_tm(ioc,
+ tm_ret = mpt3sas_scsih_issue_locked_tm(ioc,
le16_to_cpu(mpi_request->FunctionDependent1),
0, 0, 0,
MPI2_SCSITASKMGMT_TASKTYPE_TARGET_RESET, 0,
0, 30, MPI2_SCSITASKMGMT_MSGFLAGS_LINK_RESET);
+
+ if (tm_ret != SUCCESS) {
+ ioc_info(ioc,
+ "target reset failed, issue hard reset: handle (0x%04x)\n",
+ le16_to_cpu(mpi_request->FunctionDependent1));
+ mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER);
+ }
} else
mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER);
}
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index 7f107be34423..9ba5ad106b65 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -950,7 +950,6 @@ static void reset_state(struct scsi_tape *STp)
STp->partition = find_partition(STp);
if (STp->partition < 0)
STp->partition = 0;
- STp->new_partition = STp->partition;
}
}
@@ -2887,7 +2886,6 @@ static int st_int_ioctl(struct scsi_tape *STp, unsigned int cmd_in, unsigned lon
timeout = STp->long_timeout * 8;
DEBC_printk(STp, "Erasing tape.\n");
- fileno = blkno = at_sm = 0;
break;
case MTSETBLK: /* Set block length */
case MTSETDENSITY: /* Set tape density */
@@ -2920,14 +2918,17 @@ static int st_int_ioctl(struct scsi_tape *STp, unsigned int cmd_in, unsigned lon
if (cmd_in == MTSETDENSITY) {
(STp->buffer)->b_data[4] = arg;
STp->density_changed = 1; /* At least we tried ;-) */
+ STp->changed_density = arg;
} else if (cmd_in == SET_DENS_AND_BLK)
(STp->buffer)->b_data[4] = arg >> 24;
else
(STp->buffer)->b_data[4] = STp->density;
if (cmd_in == MTSETBLK || cmd_in == SET_DENS_AND_BLK) {
ltmp = arg & MT_ST_BLKSIZE_MASK;
- if (cmd_in == MTSETBLK)
+ if (cmd_in == MTSETBLK) {
STp->blksize_changed = 1; /* At least we tried ;-) */
+ STp->changed_blksize = arg;
+ }
} else
ltmp = STp->block_size;
(STp->buffer)->b_data[9] = (ltmp >> 16);
@@ -3074,7 +3075,9 @@ static int st_int_ioctl(struct scsi_tape *STp, unsigned int cmd_in, unsigned lon
cmd_in == MTSETDRVBUFFER ||
cmd_in == SET_DENS_AND_BLK) {
if (cmdstatp->sense_hdr.sense_key == ILLEGAL_REQUEST &&
- !(STp->use_pf & PF_TESTED)) {
+ cmdstatp->sense_hdr.asc == 0x24 &&
+ (STp->device)->scsi_level <= SCSI_2 &&
+ !(STp->use_pf & PF_TESTED)) {
/* Try the other possible state of Page Format if not
already tried */
STp->use_pf = (STp->use_pf ^ USE_PF) | PF_TESTED;
@@ -3626,9 +3629,25 @@ static long st_ioctl(struct file *file, unsigned int cmd_in, unsigned long arg)
retval = (-EIO);
goto out;
}
- reset_state(STp);
+ reset_state(STp); /* Clears pos_unknown */
/* remove this when the midlevel properly clears was_reset */
STp->device->was_reset = 0;
+
+ /* Fix the device settings after reset, ignore errors */
+ if (mtc.mt_op == MTREW || mtc.mt_op == MTSEEK ||
+ mtc.mt_op == MTEOM) {
+ if (STp->can_partitions) {
+ /* STp->new_partition contains the
+ * latest partition set
+ */
+ STp->partition = 0;
+ switch_partition(STp);
+ }
+ if (STp->density_changed)
+ st_int_ioctl(STp, MTSETDENSITY, STp->changed_density);
+ if (STp->blksize_changed)
+ st_int_ioctl(STp, MTSETBLK, STp->changed_blksize);
+ }
}
if (mtc.mt_op != MTNOP && mtc.mt_op != MTSETBLK &&
diff --git a/drivers/scsi/st.h b/drivers/scsi/st.h
index 7a68eaba7e81..2105c6a5b458 100644
--- a/drivers/scsi/st.h
+++ b/drivers/scsi/st.h
@@ -165,12 +165,14 @@ struct scsi_tape {
unsigned char compression_changed;
unsigned char drv_buffer;
unsigned char density;
+ unsigned char changed_density;
unsigned char door_locked;
unsigned char autorew_dev; /* auto-rewind device */
unsigned char rew_at_close; /* rewind necessary at close */
unsigned char inited;
unsigned char cleaning_req; /* cleaning requested? */
int block_size;
+ int changed_blksize;
int min_block;
int max_block;
int recover_count; /* From tape opening */
diff --git a/drivers/soc/apple/rtkit-internal.h b/drivers/soc/apple/rtkit-internal.h
index 24bd619ec5e4..1da1dfd9cb19 100644
--- a/drivers/soc/apple/rtkit-internal.h
+++ b/drivers/soc/apple/rtkit-internal.h
@@ -48,6 +48,7 @@ struct apple_rtkit {
struct apple_rtkit_shmem ioreport_buffer;
struct apple_rtkit_shmem crashlog_buffer;
+ struct apple_rtkit_shmem oslog_buffer;
struct apple_rtkit_shmem syslog_buffer;
char *syslog_msg_buffer;
diff --git a/drivers/soc/apple/rtkit.c b/drivers/soc/apple/rtkit.c
index 8ec74d7539eb..968f9f633393 100644
--- a/drivers/soc/apple/rtkit.c
+++ b/drivers/soc/apple/rtkit.c
@@ -65,8 +65,9 @@ enum {
#define APPLE_RTKIT_SYSLOG_MSG_SIZE GENMASK_ULL(31, 24)
#define APPLE_RTKIT_OSLOG_TYPE GENMASK_ULL(63, 56)
-#define APPLE_RTKIT_OSLOG_INIT 1
-#define APPLE_RTKIT_OSLOG_ACK 3
+#define APPLE_RTKIT_OSLOG_BUFFER_REQUEST 1
+#define APPLE_RTKIT_OSLOG_SIZE GENMASK_ULL(55, 36)
+#define APPLE_RTKIT_OSLOG_IOVA GENMASK_ULL(35, 0)
#define APPLE_RTKIT_MIN_SUPPORTED_VERSION 11
#define APPLE_RTKIT_MAX_SUPPORTED_VERSION 12
@@ -255,15 +256,21 @@ static int apple_rtkit_common_rx_get_buffer(struct apple_rtkit *rtk,
struct apple_rtkit_shmem *buffer,
u8 ep, u64 msg)
{
- size_t n_4kpages = FIELD_GET(APPLE_RTKIT_BUFFER_REQUEST_SIZE, msg);
u64 reply;
int err;
+ /* The different size vs. IOVA shifts look odd but are indeed correct this way */
+ if (ep == APPLE_RTKIT_EP_OSLOG) {
+ buffer->size = FIELD_GET(APPLE_RTKIT_OSLOG_SIZE, msg);
+ buffer->iova = FIELD_GET(APPLE_RTKIT_OSLOG_IOVA, msg) << 12;
+ } else {
+ buffer->size = FIELD_GET(APPLE_RTKIT_BUFFER_REQUEST_SIZE, msg) << 12;
+ buffer->iova = FIELD_GET(APPLE_RTKIT_BUFFER_REQUEST_IOVA, msg);
+ }
+
buffer->buffer = NULL;
buffer->iomem = NULL;
buffer->is_mapped = false;
- buffer->iova = FIELD_GET(APPLE_RTKIT_BUFFER_REQUEST_IOVA, msg);
- buffer->size = n_4kpages << 12;
dev_dbg(rtk->dev, "RTKit: buffer request for 0x%zx bytes at %pad\n",
buffer->size, &buffer->iova);
@@ -288,11 +295,21 @@ static int apple_rtkit_common_rx_get_buffer(struct apple_rtkit *rtk,
}
if (!buffer->is_mapped) {
- reply = FIELD_PREP(APPLE_RTKIT_SYSLOG_TYPE,
- APPLE_RTKIT_BUFFER_REQUEST);
- reply |= FIELD_PREP(APPLE_RTKIT_BUFFER_REQUEST_SIZE, n_4kpages);
- reply |= FIELD_PREP(APPLE_RTKIT_BUFFER_REQUEST_IOVA,
- buffer->iova);
+ /* oslog uses different fields and needs a shifted IOVA instead of size */
+ if (ep == APPLE_RTKIT_EP_OSLOG) {
+ reply = FIELD_PREP(APPLE_RTKIT_OSLOG_TYPE,
+ APPLE_RTKIT_OSLOG_BUFFER_REQUEST);
+ reply |= FIELD_PREP(APPLE_RTKIT_OSLOG_SIZE, buffer->size);
+ reply |= FIELD_PREP(APPLE_RTKIT_OSLOG_IOVA,
+ buffer->iova >> 12);
+ } else {
+ reply = FIELD_PREP(APPLE_RTKIT_SYSLOG_TYPE,
+ APPLE_RTKIT_BUFFER_REQUEST);
+ reply |= FIELD_PREP(APPLE_RTKIT_BUFFER_REQUEST_SIZE,
+ buffer->size >> 12);
+ reply |= FIELD_PREP(APPLE_RTKIT_BUFFER_REQUEST_IOVA,
+ buffer->iova);
+ }
apple_rtkit_send_message(rtk, ep, reply, NULL, false);
}
@@ -474,25 +491,18 @@ static void apple_rtkit_syslog_rx(struct apple_rtkit *rtk, u64 msg)
}
}
-static void apple_rtkit_oslog_rx_init(struct apple_rtkit *rtk, u64 msg)
-{
- u64 ack;
-
- dev_dbg(rtk->dev, "RTKit: oslog init: msg: 0x%llx\n", msg);
- ack = FIELD_PREP(APPLE_RTKIT_OSLOG_TYPE, APPLE_RTKIT_OSLOG_ACK);
- apple_rtkit_send_message(rtk, APPLE_RTKIT_EP_OSLOG, ack, NULL, false);
-}
-
static void apple_rtkit_oslog_rx(struct apple_rtkit *rtk, u64 msg)
{
u8 type = FIELD_GET(APPLE_RTKIT_OSLOG_TYPE, msg);
switch (type) {
- case APPLE_RTKIT_OSLOG_INIT:
- apple_rtkit_oslog_rx_init(rtk, msg);
+ case APPLE_RTKIT_OSLOG_BUFFER_REQUEST:
+ apple_rtkit_common_rx_get_buffer(rtk, &rtk->oslog_buffer,
+ APPLE_RTKIT_EP_OSLOG, msg);
break;
default:
- dev_warn(rtk->dev, "RTKit: Unknown oslog message: %llx\n", msg);
+ dev_warn(rtk->dev, "RTKit: Unknown oslog message: %llx\n",
+ msg);
}
}
@@ -731,7 +741,7 @@ static struct apple_rtkit *apple_rtkit_init(struct device *dev, void *cookie,
rtk->mbox_cl.rx_callback = &apple_rtkit_rx;
rtk->mbox_cl.tx_done = &apple_rtkit_tx_done;
- rtk->wq = alloc_ordered_workqueue("rtkit-%s", WQ_MEM_RECLAIM,
+ rtk->wq = alloc_ordered_workqueue("rtkit-%s", WQ_HIGHPRI | WQ_MEM_RECLAIM,
dev_name(rtk->dev));
if (!rtk->wq) {
ret = -ENOMEM;
@@ -773,6 +783,7 @@ int apple_rtkit_reinit(struct apple_rtkit *rtk)
apple_rtkit_free_buffer(rtk, &rtk->ioreport_buffer);
apple_rtkit_free_buffer(rtk, &rtk->crashlog_buffer);
+ apple_rtkit_free_buffer(rtk, &rtk->oslog_buffer);
apple_rtkit_free_buffer(rtk, &rtk->syslog_buffer);
kfree(rtk->syslog_msg_buffer);
@@ -935,6 +946,7 @@ static void apple_rtkit_free(void *data)
apple_rtkit_free_buffer(rtk, &rtk->ioreport_buffer);
apple_rtkit_free_buffer(rtk, &rtk->crashlog_buffer);
+ apple_rtkit_free_buffer(rtk, &rtk->oslog_buffer);
apple_rtkit_free_buffer(rtk, &rtk->syslog_buffer);
kfree(rtk->syslog_msg_buffer);
diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c
index 88aee59730e3..6d5b6ed36169 100644
--- a/drivers/soc/imx/gpcv2.c
+++ b/drivers/soc/imx/gpcv2.c
@@ -1347,7 +1347,7 @@ static int imx_pgc_domain_probe(struct platform_device *pdev)
}
if (IS_ENABLED(CONFIG_LOCKDEP) &&
- of_property_read_bool(domain->dev->of_node, "power-domains"))
+ of_property_present(domain->dev->of_node, "power-domains"))
lockdep_set_subclass(&domain->genpd.mlock, 1);
ret = of_genpd_add_provider_simple(domain->dev->of_node,
diff --git a/drivers/soc/ti/k3-socinfo.c b/drivers/soc/ti/k3-socinfo.c
index 91f441ee6175..5b0d8260918d 100644
--- a/drivers/soc/ti/k3-socinfo.c
+++ b/drivers/soc/ti/k3-socinfo.c
@@ -60,6 +60,12 @@ k3_chipinfo_partno_to_names(unsigned int partno,
return -EINVAL;
}
+static const struct regmap_config k3_chipinfo_regmap_cfg = {
+ .reg_bits = 32,
+ .val_bits = 32,
+ .reg_stride = 4,
+};
+
static int k3_chipinfo_probe(struct platform_device *pdev)
{
struct device_node *node = pdev->dev.of_node;
@@ -67,13 +73,18 @@ static int k3_chipinfo_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct soc_device *soc_dev;
struct regmap *regmap;
+ void __iomem *base;
u32 partno_id;
u32 variant;
u32 jtag_id;
u32 mfg;
int ret;
- regmap = device_node_to_regmap(node);
+ base = devm_platform_ioremap_resource(pdev, 0);
+ if (IS_ERR(base))
+ return PTR_ERR(base);
+
+ regmap = regmap_init_mmio(dev, base, &k3_chipinfo_regmap_cfg);
if (IS_ERR(regmap))
return PTR_ERR(regmap);
diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c
index 01930b52c4fb..5374c6d44519 100644
--- a/drivers/spi/spi-fsl-dspi.c
+++ b/drivers/spi/spi-fsl-dspi.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0+
//
// Copyright 2013 Freescale Semiconductor, Inc.
-// Copyright 2020 NXP
+// Copyright 2020-2025 NXP
//
// Freescale DSPI driver
// This file contains a driver for the Freescale DSPI
@@ -61,6 +61,7 @@
#define SPI_SR_TFIWF BIT(18)
#define SPI_SR_RFDF BIT(17)
#define SPI_SR_CMDFFF BIT(16)
+#define SPI_SR_TXRXS BIT(30)
#define SPI_SR_CLEAR (SPI_SR_TCFQF | \
SPI_SR_TFUF | SPI_SR_TFFF | \
SPI_SR_CMDTCF | SPI_SR_SPEF | \
@@ -907,9 +908,20 @@ static int dspi_transfer_one_message(struct spi_controller *ctlr,
struct spi_device *spi = message->spi;
struct spi_transfer *transfer;
int status = 0;
+ u32 val = 0;
+ bool cs_change = false;
message->actual_length = 0;
+ /* Put DSPI in running mode if halted. */
+ regmap_read(dspi->regmap, SPI_MCR, &val);
+ if (val & SPI_MCR_HALT) {
+ regmap_update_bits(dspi->regmap, SPI_MCR, SPI_MCR_HALT, 0);
+ while (regmap_read(dspi->regmap, SPI_SR, &val) >= 0 &&
+ !(val & SPI_SR_TXRXS))
+ ;
+ }
+
list_for_each_entry(transfer, &message->transfers, transfer_list) {
dspi->cur_transfer = transfer;
dspi->cur_msg = message;
@@ -934,6 +946,7 @@ static int dspi_transfer_one_message(struct spi_controller *ctlr,
dspi->tx_cmd |= SPI_PUSHR_CMD_CONT;
}
+ cs_change = transfer->cs_change;
dspi->tx = transfer->tx_buf;
dspi->rx = transfer->rx_buf;
dspi->len = transfer->len;
@@ -943,6 +956,8 @@ static int dspi_transfer_one_message(struct spi_controller *ctlr,
SPI_MCR_CLR_TXF | SPI_MCR_CLR_RXF,
SPI_MCR_CLR_TXF | SPI_MCR_CLR_RXF);
+ regmap_write(dspi->regmap, SPI_SR, SPI_SR_CLEAR);
+
spi_take_timestamp_pre(dspi->ctlr, dspi->cur_transfer,
dspi->progress, !dspi->irq);
@@ -966,6 +981,15 @@ static int dspi_transfer_one_message(struct spi_controller *ctlr,
spi_transfer_delay_exec(transfer);
}
+ if (status || !cs_change) {
+ /* Put DSPI in stop mode */
+ regmap_update_bits(dspi->regmap, SPI_MCR,
+ SPI_MCR_HALT, SPI_MCR_HALT);
+ while (regmap_read(dspi->regmap, SPI_SR, &val) >= 0 &&
+ val & SPI_SR_TXRXS)
+ ;
+ }
+
message->status = status;
spi_finalize_current_message(ctlr);
@@ -1128,6 +1152,20 @@ static int dspi_resume(struct device *dev)
static SIMPLE_DEV_PM_OPS(dspi_pm, dspi_suspend, dspi_resume);
+static const struct regmap_range dspi_yes_ranges[] = {
+ regmap_reg_range(SPI_MCR, SPI_MCR),
+ regmap_reg_range(SPI_TCR, SPI_CTAR(3)),
+ regmap_reg_range(SPI_SR, SPI_TXFR3),
+ regmap_reg_range(SPI_RXFR0, SPI_RXFR3),
+ regmap_reg_range(SPI_CTARE(0), SPI_CTARE(3)),
+ regmap_reg_range(SPI_SREX, SPI_SREX),
+};
+
+static const struct regmap_access_table dspi_access_table = {
+ .yes_ranges = dspi_yes_ranges,
+ .n_yes_ranges = ARRAY_SIZE(dspi_yes_ranges),
+};
+
static const struct regmap_range dspi_volatile_ranges[] = {
regmap_reg_range(SPI_MCR, SPI_TCR),
regmap_reg_range(SPI_SR, SPI_SR),
@@ -1145,6 +1183,8 @@ static const struct regmap_config dspi_regmap_config = {
.reg_stride = 4,
.max_register = 0x88,
.volatile_table = &dspi_volatile_table,
+ .rd_table = &dspi_access_table,
+ .wr_table = &dspi_access_table,
};
static const struct regmap_range dspi_xspi_volatile_ranges[] = {
@@ -1166,6 +1206,8 @@ static const struct regmap_config dspi_xspi_regmap_config[] = {
.reg_stride = 4,
.max_register = 0x13c,
.volatile_table = &dspi_xspi_volatile_table,
+ .rd_table = &dspi_access_table,
+ .wr_table = &dspi_access_table,
},
{
.name = "pushr",
@@ -1188,6 +1230,8 @@ static int dspi_init(struct fsl_dspi *dspi)
if (!spi_controller_is_slave(dspi->ctlr))
mcr |= SPI_MCR_MASTER;
+ mcr |= SPI_MCR_HALT;
+
regmap_write(dspi->regmap, SPI_MCR, mcr);
regmap_write(dspi->regmap, SPI_SR, SPI_SR_CLEAR);
diff --git a/drivers/spi/spi-sun4i.c b/drivers/spi/spi-sun4i.c
index 6000d0761206..6937f5c4d868 100644
--- a/drivers/spi/spi-sun4i.c
+++ b/drivers/spi/spi-sun4i.c
@@ -263,6 +263,9 @@ static int sun4i_spi_transfer_one(struct spi_master *master,
else
reg |= SUN4I_CTL_DHB;
+ /* Now that the settings are correct, enable the interface */
+ reg |= SUN4I_CTL_ENABLE;
+
sun4i_spi_write(sspi, SUN4I_CTL_REG, reg);
/* Ensure that we have a parent clock fast enough */
@@ -403,7 +406,7 @@ static int sun4i_spi_runtime_resume(struct device *dev)
}
sun4i_spi_write(sspi, SUN4I_CTL_REG,
- SUN4I_CTL_ENABLE | SUN4I_CTL_MASTER | SUN4I_CTL_TP);
+ SUN4I_CTL_MASTER | SUN4I_CTL_TP);
return 0;
diff --git a/drivers/spi/spi-zynqmp-gqspi.c b/drivers/spi/spi-zynqmp-gqspi.c
index c89544ae5ed9..fde7c3810359 100644
--- a/drivers/spi/spi-zynqmp-gqspi.c
+++ b/drivers/spi/spi-zynqmp-gqspi.c
@@ -698,7 +698,6 @@ static void zynqmp_process_dma_irq(struct zynqmp_qspi *xqspi)
static irqreturn_t zynqmp_qspi_irq(int irq, void *dev_id)
{
struct zynqmp_qspi *xqspi = (struct zynqmp_qspi *)dev_id;
- irqreturn_t ret = IRQ_NONE;
u32 status, mask, dma_status = 0;
status = zynqmp_gqspi_read(xqspi, GQSPI_ISR_OFST);
@@ -713,27 +712,24 @@ static irqreturn_t zynqmp_qspi_irq(int irq, void *dev_id)
dma_status);
}
- if (mask & GQSPI_ISR_TXNOT_FULL_MASK) {
+ if (!mask && !dma_status)
+ return IRQ_NONE;
+
+ if (mask & GQSPI_ISR_TXNOT_FULL_MASK)
zynqmp_qspi_filltxfifo(xqspi, GQSPI_TX_FIFO_FILL);
- ret = IRQ_HANDLED;
- }
- if (dma_status & GQSPI_QSPIDMA_DST_I_STS_DONE_MASK) {
+ if (dma_status & GQSPI_QSPIDMA_DST_I_STS_DONE_MASK)
zynqmp_process_dma_irq(xqspi);
- ret = IRQ_HANDLED;
- } else if (!(mask & GQSPI_IER_RXEMPTY_MASK) &&
- (mask & GQSPI_IER_GENFIFOEMPTY_MASK)) {
+ else if (!(mask & GQSPI_IER_RXEMPTY_MASK) &&
+ (mask & GQSPI_IER_GENFIFOEMPTY_MASK))
zynqmp_qspi_readrxfifo(xqspi, GQSPI_RX_FIFO_FILL);
- ret = IRQ_HANDLED;
- }
if (xqspi->bytes_to_receive == 0 && xqspi->bytes_to_transfer == 0 &&
((status & GQSPI_IRQ_MASK) == GQSPI_IRQ_MASK)) {
zynqmp_gqspi_write(xqspi, GQSPI_IDR_OFST, GQSPI_ISR_IDR_MASK);
complete(&xqspi->data_completion);
- ret = IRQ_HANDLED;
}
- return ret;
+ return IRQ_HANDLED;
}
/**
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
index 07e196b44b91..04d40e76772b 100644
--- a/drivers/target/iscsi/iscsi_target.c
+++ b/drivers/target/iscsi/iscsi_target.c
@@ -4314,8 +4314,8 @@ int iscsit_close_connection(
spin_unlock(&iscsit_global->ts_bitmap_lock);
iscsit_stop_timers_for_cmds(conn);
- iscsit_stop_nopin_response_timer(conn);
iscsit_stop_nopin_timer(conn);
+ iscsit_stop_nopin_response_timer(conn);
if (conn->conn_transport->iscsit_wait_conn)
conn->conn_transport->iscsit_wait_conn(conn);
diff --git a/drivers/thermal/qoriq_thermal.c b/drivers/thermal/qoriq_thermal.c
index d111e218f362..b33cb1d880b7 100644
--- a/drivers/thermal/qoriq_thermal.c
+++ b/drivers/thermal/qoriq_thermal.c
@@ -19,6 +19,7 @@
#define SITES_MAX 16
#define TMR_DISABLE 0x0
#define TMR_ME 0x80000000
+#define TMR_CMD BIT(29)
#define TMR_ALPF 0x0c000000
#define TMR_ALPF_V2 0x03000000
#define TMTMIR_DEFAULT 0x0000000f
@@ -345,6 +346,12 @@ static int __maybe_unused qoriq_tmu_suspend(struct device *dev)
if (ret)
return ret;
+ if (data->ver > TMU_VER1) {
+ ret = regmap_set_bits(data->regmap, REGS_TMR, TMR_CMD);
+ if (ret)
+ return ret;
+ }
+
clk_disable_unprepare(data->clk);
return 0;
@@ -359,6 +366,12 @@ static int __maybe_unused qoriq_tmu_resume(struct device *dev)
if (ret)
return ret;
+ if (data->ver > TMU_VER1) {
+ ret = regmap_clear_bits(data->regmap, REGS_TMR, TMR_CMD);
+ if (ret)
+ return ret;
+ }
+
/* Enable monitoring */
return regmap_update_bits(data->regmap, REGS_TMR, TMR_ME, TMR_ME);
}
diff --git a/drivers/thunderbolt/retimer.c b/drivers/thunderbolt/retimer.c
index 5bd5c22a5085..d2038337ea03 100644
--- a/drivers/thunderbolt/retimer.c
+++ b/drivers/thunderbolt/retimer.c
@@ -89,9 +89,11 @@ static int tb_retimer_nvm_add(struct tb_retimer *rt)
if (ret)
goto err_nvm;
- ret = tb_nvm_add_non_active(nvm, nvm_write);
- if (ret)
- goto err_nvm;
+ if (!rt->no_nvm_upgrade) {
+ ret = tb_nvm_add_non_active(nvm, nvm_write);
+ if (ret)
+ goto err_nvm;
+ }
rt->nvm = nvm;
return 0;
diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
index 711de54eda98..c1917774e0bb 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -1694,7 +1694,7 @@ static void serial8250_disable_ms(struct uart_port *port)
if (up->bugs & UART_BUG_NOMSR)
return;
- mctrl_gpio_disable_ms(up->gpios);
+ mctrl_gpio_disable_ms_no_sync(up->gpios);
up->ier &= ~UART_IER_MSI;
serial_port_out(port, UART_IER, up->ier);
diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index 6a9310379dc2..b3463cdd1d4b 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -692,7 +692,7 @@ static void atmel_disable_ms(struct uart_port *port)
atmel_port->ms_irq_enabled = false;
- mctrl_gpio_disable_ms(atmel_port->gpios);
+ mctrl_gpio_disable_ms_no_sync(atmel_port->gpios);
if (!mctrl_gpio_to_gpiod(atmel_port->gpios, UART_GPIO_CTS))
idr |= ATMEL_US_CTSIC;
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 94e0781e00e8..fe22ca009fb3 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -1586,7 +1586,7 @@ static void imx_uart_shutdown(struct uart_port *port)
imx_uart_dma_exit(sport);
}
- mctrl_gpio_disable_ms(sport->gpios);
+ mctrl_gpio_disable_ms_sync(sport->gpios);
spin_lock_irqsave(&sport->port.lock, flags);
ucr2 = imx_uart_readl(sport, UCR2);
diff --git a/drivers/tty/serial/serial_mctrl_gpio.c b/drivers/tty/serial/serial_mctrl_gpio.c
index 7d5aaa8d422b..d5fb293dd5a9 100644
--- a/drivers/tty/serial/serial_mctrl_gpio.c
+++ b/drivers/tty/serial/serial_mctrl_gpio.c
@@ -322,11 +322,7 @@ void mctrl_gpio_enable_ms(struct mctrl_gpios *gpios)
}
EXPORT_SYMBOL_GPL(mctrl_gpio_enable_ms);
-/**
- * mctrl_gpio_disable_ms - disable irqs and handling of changes to the ms lines
- * @gpios: gpios to disable
- */
-void mctrl_gpio_disable_ms(struct mctrl_gpios *gpios)
+static void mctrl_gpio_disable_ms(struct mctrl_gpios *gpios, bool sync)
{
enum mctrl_gpio_idx i;
@@ -342,10 +338,34 @@ void mctrl_gpio_disable_ms(struct mctrl_gpios *gpios)
if (!gpios->irq[i])
continue;
- disable_irq(gpios->irq[i]);
+ if (sync)
+ disable_irq(gpios->irq[i]);
+ else
+ disable_irq_nosync(gpios->irq[i]);
}
}
-EXPORT_SYMBOL_GPL(mctrl_gpio_disable_ms);
+
+/**
+ * mctrl_gpio_disable_ms_sync - disable irqs and handling of changes to the ms
+ * lines, and wait for any pending IRQ to be processed
+ * @gpios: gpios to disable
+ */
+void mctrl_gpio_disable_ms_sync(struct mctrl_gpios *gpios)
+{
+ mctrl_gpio_disable_ms(gpios, true);
+}
+EXPORT_SYMBOL_GPL(mctrl_gpio_disable_ms_sync);
+
+/**
+ * mctrl_gpio_disable_ms_no_sync - disable irqs and handling of changes to the
+ * ms lines, and return immediately
+ * @gpios: gpios to disable
+ */
+void mctrl_gpio_disable_ms_no_sync(struct mctrl_gpios *gpios)
+{
+ mctrl_gpio_disable_ms(gpios, false);
+}
+EXPORT_SYMBOL_GPL(mctrl_gpio_disable_ms_no_sync);
void mctrl_gpio_enable_irq_wake(struct mctrl_gpios *gpios)
{
diff --git a/drivers/tty/serial/serial_mctrl_gpio.h b/drivers/tty/serial/serial_mctrl_gpio.h
index fc76910fb105..79e97838ebe5 100644
--- a/drivers/tty/serial/serial_mctrl_gpio.h
+++ b/drivers/tty/serial/serial_mctrl_gpio.h
@@ -87,9 +87,16 @@ void mctrl_gpio_free(struct device *dev, struct mctrl_gpios *gpios);
void mctrl_gpio_enable_ms(struct mctrl_gpios *gpios);
/*
- * Disable gpio interrupts to report status line changes.
+ * Disable gpio interrupts to report status line changes, and block until
+ * any corresponding IRQ is processed
*/
-void mctrl_gpio_disable_ms(struct mctrl_gpios *gpios);
+void mctrl_gpio_disable_ms_sync(struct mctrl_gpios *gpios);
+
+/*
+ * Disable gpio interrupts to report status line changes, and return
+ * immediately
+ */
+void mctrl_gpio_disable_ms_no_sync(struct mctrl_gpios *gpios);
/*
* Enable gpio wakeup interrupts to enable wake up source.
@@ -148,7 +155,11 @@ static inline void mctrl_gpio_enable_ms(struct mctrl_gpios *gpios)
{
}
-static inline void mctrl_gpio_disable_ms(struct mctrl_gpios *gpios)
+static inline void mctrl_gpio_disable_ms_sync(struct mctrl_gpios *gpios)
+{
+}
+
+static inline void mctrl_gpio_disable_ms_no_sync(struct mctrl_gpios *gpios)
{
}
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index 6182ae5f6fa1..ed468b676f0b 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -105,6 +105,20 @@ struct plat_sci_reg {
u8 offset, size;
};
+struct sci_suspend_regs {
+ u16 scdl;
+ u16 sccks;
+ u16 scsmr;
+ u16 scscr;
+ u16 scfcr;
+ u16 scsptr;
+ u16 hssrr;
+ u16 scpcr;
+ u16 scpdr;
+ u8 scbrr;
+ u8 semr;
+};
+
struct sci_port_params {
const struct plat_sci_reg regs[SCIx_NR_REGS];
unsigned int fifosize;
@@ -135,6 +149,8 @@ struct sci_port {
struct dma_chan *chan_tx;
struct dma_chan *chan_rx;
+ struct reset_control *rstc;
+
#ifdef CONFIG_SERIAL_SH_SCI_DMA
struct dma_chan *chan_tx_saved;
struct dma_chan *chan_rx_saved;
@@ -154,6 +170,7 @@ struct sci_port {
int rx_trigger;
struct timer_list rx_fifo_timer;
int rx_fifo_timeout;
+ struct sci_suspend_regs suspend_regs;
u16 hscif_tot;
bool has_rtscts;
@@ -2182,7 +2199,7 @@ static void sci_shutdown(struct uart_port *port)
dev_dbg(port->dev, "%s(%d)\n", __func__, port->line);
s->autorts = false;
- mctrl_gpio_disable_ms(to_sci_port(port)->gpios);
+ mctrl_gpio_disable_ms_sync(to_sci_port(port)->gpios);
spin_lock_irqsave(&port->lock, flags);
sci_stop_rx(port);
@@ -3252,6 +3269,7 @@ static struct plat_sci_port *sci_parse_dt(struct platform_device *pdev,
}
sp = &sci_ports[id];
+ sp->rstc = rstc;
*dev_id = id;
p->type = SCI_OF_TYPE(data);
@@ -3400,13 +3418,77 @@ static int sci_probe(struct platform_device *dev)
return 0;
}
+static void sci_console_save(struct sci_port *s)
+{
+ struct sci_suspend_regs *regs = &s->suspend_regs;
+ struct uart_port *port = &s->port;
+
+ if (sci_getreg(port, SCDL)->size)
+ regs->scdl = sci_serial_in(port, SCDL);
+ if (sci_getreg(port, SCCKS)->size)
+ regs->sccks = sci_serial_in(port, SCCKS);
+ if (sci_getreg(port, SCSMR)->size)
+ regs->scsmr = sci_serial_in(port, SCSMR);
+ if (sci_getreg(port, SCSCR)->size)
+ regs->scscr = sci_serial_in(port, SCSCR);
+ if (sci_getreg(port, SCFCR)->size)
+ regs->scfcr = sci_serial_in(port, SCFCR);
+ if (sci_getreg(port, SCSPTR)->size)
+ regs->scsptr = sci_serial_in(port, SCSPTR);
+ if (sci_getreg(port, SCBRR)->size)
+ regs->scbrr = sci_serial_in(port, SCBRR);
+ if (sci_getreg(port, HSSRR)->size)
+ regs->hssrr = sci_serial_in(port, HSSRR);
+ if (sci_getreg(port, SCPCR)->size)
+ regs->scpcr = sci_serial_in(port, SCPCR);
+ if (sci_getreg(port, SCPDR)->size)
+ regs->scpdr = sci_serial_in(port, SCPDR);
+ if (sci_getreg(port, SEMR)->size)
+ regs->semr = sci_serial_in(port, SEMR);
+}
+
+static void sci_console_restore(struct sci_port *s)
+{
+ struct sci_suspend_regs *regs = &s->suspend_regs;
+ struct uart_port *port = &s->port;
+
+ if (sci_getreg(port, SCDL)->size)
+ sci_serial_out(port, SCDL, regs->scdl);
+ if (sci_getreg(port, SCCKS)->size)
+ sci_serial_out(port, SCCKS, regs->sccks);
+ if (sci_getreg(port, SCSMR)->size)
+ sci_serial_out(port, SCSMR, regs->scsmr);
+ if (sci_getreg(port, SCSCR)->size)
+ sci_serial_out(port, SCSCR, regs->scscr);
+ if (sci_getreg(port, SCFCR)->size)
+ sci_serial_out(port, SCFCR, regs->scfcr);
+ if (sci_getreg(port, SCSPTR)->size)
+ sci_serial_out(port, SCSPTR, regs->scsptr);
+ if (sci_getreg(port, SCBRR)->size)
+ sci_serial_out(port, SCBRR, regs->scbrr);
+ if (sci_getreg(port, HSSRR)->size)
+ sci_serial_out(port, HSSRR, regs->hssrr);
+ if (sci_getreg(port, SCPCR)->size)
+ sci_serial_out(port, SCPCR, regs->scpcr);
+ if (sci_getreg(port, SCPDR)->size)
+ sci_serial_out(port, SCPDR, regs->scpdr);
+ if (sci_getreg(port, SEMR)->size)
+ sci_serial_out(port, SEMR, regs->semr);
+}
+
static __maybe_unused int sci_suspend(struct device *dev)
{
struct sci_port *sport = dev_get_drvdata(dev);
- if (sport)
+ if (sport) {
uart_suspend_port(&sci_uart_driver, &sport->port);
+ if (!console_suspend_enabled && uart_console(&sport->port))
+ sci_console_save(sport);
+ else
+ return reset_control_assert(sport->rstc);
+ }
+
return 0;
}
@@ -3414,8 +3496,18 @@ static __maybe_unused int sci_resume(struct device *dev)
{
struct sci_port *sport = dev_get_drvdata(dev);
- if (sport)
+ if (sport) {
+ if (!console_suspend_enabled && uart_console(&sport->port)) {
+ sci_console_restore(sport);
+ } else {
+ int ret = reset_control_deassert(sport->rstc);
+
+ if (ret)
+ return ret;
+ }
+
uart_resume_port(&sci_uart_driver, &sport->port);
+ }
return 0;
}
diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c
index 7d11511c8c12..8670bb5042c4 100644
--- a/drivers/tty/serial/stm32-usart.c
+++ b/drivers/tty/serial/stm32-usart.c
@@ -850,7 +850,7 @@ static void stm32_usart_enable_ms(struct uart_port *port)
static void stm32_usart_disable_ms(struct uart_port *port)
{
- mctrl_gpio_disable_ms(to_stm32_port(port)->gpios);
+ mctrl_gpio_disable_ms_sync(to_stm32_port(port)->gpios);
}
/* Transmit stop */
diff --git a/drivers/vfio/pci/vfio_pci_config.c b/drivers/vfio/pci/vfio_pci_config.c
index 7902e1ec0fef..105243d83b2d 100644
--- a/drivers/vfio/pci/vfio_pci_config.c
+++ b/drivers/vfio/pci/vfio_pci_config.c
@@ -1806,7 +1806,8 @@ int vfio_config_init(struct vfio_pci_core_device *vdev)
cpu_to_le16(PCI_COMMAND_MEMORY);
}
- if (!IS_ENABLED(CONFIG_VFIO_PCI_INTX) || vdev->nointx)
+ if (!IS_ENABLED(CONFIG_VFIO_PCI_INTX) || vdev->nointx ||
+ vdev->pdev->irq == IRQ_NOTCONNECTED)
vconfig[PCI_INTERRUPT_PIN] = 0;
ret = vfio_cap_init(vdev);
diff --git a/drivers/vfio/pci/vfio_pci_core.c b/drivers/vfio/pci/vfio_pci_core.c
index f357fd157e1e..aa362b434413 100644
--- a/drivers/vfio/pci/vfio_pci_core.c
+++ b/drivers/vfio/pci/vfio_pci_core.c
@@ -719,15 +719,7 @@ EXPORT_SYMBOL_GPL(vfio_pci_core_finish_enable);
static int vfio_pci_get_irq_count(struct vfio_pci_core_device *vdev, int irq_type)
{
if (irq_type == VFIO_PCI_INTX_IRQ_INDEX) {
- u8 pin;
-
- if (!IS_ENABLED(CONFIG_VFIO_PCI_INTX) ||
- vdev->nointx || vdev->pdev->is_virtfn)
- return 0;
-
- pci_read_config_byte(vdev->pdev, PCI_INTERRUPT_PIN, &pin);
-
- return pin ? 1 : 0;
+ return vdev->vconfig[PCI_INTERRUPT_PIN] ? 1 : 0;
} else if (irq_type == VFIO_PCI_MSI_IRQ_INDEX) {
u8 pos;
u16 flags;
diff --git a/drivers/vfio/pci/vfio_pci_intrs.c b/drivers/vfio/pci/vfio_pci_intrs.c
index 5cbcde32ff79..64d78944efa5 100644
--- a/drivers/vfio/pci/vfio_pci_intrs.c
+++ b/drivers/vfio/pci/vfio_pci_intrs.c
@@ -207,7 +207,7 @@ static int vfio_intx_enable(struct vfio_pci_core_device *vdev,
if (!is_irq_none(vdev))
return -EINVAL;
- if (!pdev->irq)
+ if (!pdev->irq || pdev->irq == IRQ_NOTCONNECTED)
return -ENODEV;
name = kasprintf(GFP_KERNEL_ACCOUNT, "vfio-intx(%s)", pci_name(pdev));
diff --git a/drivers/video/fbdev/core/bitblit.c b/drivers/video/fbdev/core/bitblit.c
index 8587c9da0670..42e681a78136 100644
--- a/drivers/video/fbdev/core/bitblit.c
+++ b/drivers/video/fbdev/core/bitblit.c
@@ -59,12 +59,11 @@ static void bit_bmove(struct vc_data *vc, struct fb_info *info, int sy,
}
static void bit_clear(struct vc_data *vc, struct fb_info *info, int sy,
- int sx, int height, int width)
+ int sx, int height, int width, int fg, int bg)
{
- int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
struct fb_fillrect region;
- region.color = attr_bgcol_ec(bgshift, vc, info);
+ region.color = bg;
region.dx = sx * vc->vc_font.width;
region.dy = sy * vc->vc_font.height;
region.width = width * vc->vc_font.width;
diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
index e6640edec155..538e932055ca 100644
--- a/drivers/video/fbdev/core/fbcon.c
+++ b/drivers/video/fbdev/core/fbcon.c
@@ -1240,7 +1240,7 @@ static void fbcon_clear(struct vc_data *vc, int sy, int sx, int height,
{
struct fb_info *info = fbcon_info_from_console(vc->vc_num);
struct fbcon_ops *ops = info->fbcon_par;
-
+ int fg, bg;
struct fbcon_display *p = &fb_display[vc->vc_num];
u_int y_break;
@@ -1261,16 +1261,18 @@ static void fbcon_clear(struct vc_data *vc, int sy, int sx, int height,
fbcon_clear_margins(vc, 0);
}
+ fg = get_color(vc, info, vc->vc_video_erase_char, 1);
+ bg = get_color(vc, info, vc->vc_video_erase_char, 0);
/* Split blits that cross physical y_wrap boundary */
y_break = p->vrows - p->yscroll;
if (sy < y_break && sy + height - 1 >= y_break) {
u_int b = y_break - sy;
- ops->clear(vc, info, real_y(p, sy), sx, b, width);
+ ops->clear(vc, info, real_y(p, sy), sx, b, width, fg, bg);
ops->clear(vc, info, real_y(p, sy + b), sx, height - b,
- width);
+ width, fg, bg);
} else
- ops->clear(vc, info, real_y(p, sy), sx, height, width);
+ ops->clear(vc, info, real_y(p, sy), sx, height, width, fg, bg);
}
static void fbcon_putcs(struct vc_data *vc, const unsigned short *s,
diff --git a/drivers/video/fbdev/core/fbcon.h b/drivers/video/fbdev/core/fbcon.h
index 0eaf54a21151..25691d4b027b 100644
--- a/drivers/video/fbdev/core/fbcon.h
+++ b/drivers/video/fbdev/core/fbcon.h
@@ -55,7 +55,7 @@ struct fbcon_ops {
void (*bmove)(struct vc_data *vc, struct fb_info *info, int sy,
int sx, int dy, int dx, int height, int width);
void (*clear)(struct vc_data *vc, struct fb_info *info, int sy,
- int sx, int height, int width);
+ int sx, int height, int width, int fb, int bg);
void (*putcs)(struct vc_data *vc, struct fb_info *info,
const unsigned short *s, int count, int yy, int xx,
int fg, int bg);
@@ -116,42 +116,6 @@ static inline int mono_col(const struct fb_info *info)
return (~(0xfff << max_len)) & 0xff;
}
-static inline int attr_col_ec(int shift, struct vc_data *vc,
- struct fb_info *info, int is_fg)
-{
- int is_mono01;
- int col;
- int fg;
- int bg;
-
- if (!vc)
- return 0;
-
- if (vc->vc_can_do_color)
- return is_fg ? attr_fgcol(shift,vc->vc_video_erase_char)
- : attr_bgcol(shift,vc->vc_video_erase_char);
-
- if (!info)
- return 0;
-
- col = mono_col(info);
- is_mono01 = info->fix.visual == FB_VISUAL_MONO01;
-
- if (attr_reverse(vc->vc_video_erase_char)) {
- fg = is_mono01 ? col : 0;
- bg = is_mono01 ? 0 : col;
- }
- else {
- fg = is_mono01 ? 0 : col;
- bg = is_mono01 ? col : 0;
- }
-
- return is_fg ? fg : bg;
-}
-
-#define attr_bgcol_ec(bgshift, vc, info) attr_col_ec(bgshift, vc, info, 0)
-#define attr_fgcol_ec(fgshift, vc, info) attr_col_ec(fgshift, vc, info, 1)
-
/*
* Scroll Method
*/
diff --git a/drivers/video/fbdev/core/fbcon_ccw.c b/drivers/video/fbdev/core/fbcon_ccw.c
index 2789ace79634..9f4d65478554 100644
--- a/drivers/video/fbdev/core/fbcon_ccw.c
+++ b/drivers/video/fbdev/core/fbcon_ccw.c
@@ -78,14 +78,13 @@ static void ccw_bmove(struct vc_data *vc, struct fb_info *info, int sy,
}
static void ccw_clear(struct vc_data *vc, struct fb_info *info, int sy,
- int sx, int height, int width)
+ int sx, int height, int width, int fg, int bg)
{
struct fbcon_ops *ops = info->fbcon_par;
struct fb_fillrect region;
- int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
u32 vyres = GETVYRES(ops->p, info);
- region.color = attr_bgcol_ec(bgshift,vc,info);
+ region.color = bg;
region.dx = sy * vc->vc_font.height;
region.dy = vyres - ((sx + width) * vc->vc_font.width);
region.height = width * vc->vc_font.width;
diff --git a/drivers/video/fbdev/core/fbcon_cw.c b/drivers/video/fbdev/core/fbcon_cw.c
index 86a254c1b2b7..b18e31886da1 100644
--- a/drivers/video/fbdev/core/fbcon_cw.c
+++ b/drivers/video/fbdev/core/fbcon_cw.c
@@ -63,14 +63,13 @@ static void cw_bmove(struct vc_data *vc, struct fb_info *info, int sy,
}
static void cw_clear(struct vc_data *vc, struct fb_info *info, int sy,
- int sx, int height, int width)
+ int sx, int height, int width, int fg, int bg)
{
struct fbcon_ops *ops = info->fbcon_par;
struct fb_fillrect region;
- int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
u32 vxres = GETVXRES(ops->p, info);
- region.color = attr_bgcol_ec(bgshift,vc,info);
+ region.color = bg;
region.dx = vxres - ((sy + height) * vc->vc_font.height);
region.dy = sx * vc->vc_font.width;
region.height = width * vc->vc_font.width;
diff --git a/drivers/video/fbdev/core/fbcon_ud.c b/drivers/video/fbdev/core/fbcon_ud.c
index 23bc045769d0..b6b074cfd9dc 100644
--- a/drivers/video/fbdev/core/fbcon_ud.c
+++ b/drivers/video/fbdev/core/fbcon_ud.c
@@ -64,15 +64,14 @@ static void ud_bmove(struct vc_data *vc, struct fb_info *info, int sy,
}
static void ud_clear(struct vc_data *vc, struct fb_info *info, int sy,
- int sx, int height, int width)
+ int sx, int height, int width, int fg, int bg)
{
struct fbcon_ops *ops = info->fbcon_par;
struct fb_fillrect region;
- int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
u32 vyres = GETVYRES(ops->p, info);
u32 vxres = GETVXRES(ops->p, info);
- region.color = attr_bgcol_ec(bgshift,vc,info);
+ region.color = bg;
region.dy = vyres - ((sy + height) * vc->vc_font.height);
region.dx = vxres - ((sx + width) * vc->vc_font.width);
region.width = width * vc->vc_font.width;
diff --git a/drivers/video/fbdev/core/tileblit.c b/drivers/video/fbdev/core/tileblit.c
index 2768eff247ba..b3aa0c6620c7 100644
--- a/drivers/video/fbdev/core/tileblit.c
+++ b/drivers/video/fbdev/core/tileblit.c
@@ -32,16 +32,14 @@ static void tile_bmove(struct vc_data *vc, struct fb_info *info, int sy,
}
static void tile_clear(struct vc_data *vc, struct fb_info *info, int sy,
- int sx, int height, int width)
+ int sx, int height, int width, int fg, int bg)
{
struct fb_tilerect rect;
- int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
- int fgshift = (vc->vc_hi_font_mask) ? 9 : 8;
rect.index = vc->vc_video_erase_char &
((vc->vc_hi_font_mask) ? 0x1ff : 0xff);
- rect.fg = attr_fgcol_ec(fgshift, vc, info);
- rect.bg = attr_bgcol_ec(bgshift, vc, info);
+ rect.fg = fg;
+ rect.bg = bg;
rect.sx = sx;
rect.sy = sy;
rect.width = width;
@@ -76,7 +74,42 @@ static void tile_putcs(struct vc_data *vc, struct fb_info *info,
static void tile_clear_margins(struct vc_data *vc, struct fb_info *info,
int color, int bottom_only)
{
- return;
+ unsigned int cw = vc->vc_font.width;
+ unsigned int ch = vc->vc_font.height;
+ unsigned int rw = info->var.xres - (vc->vc_cols*cw);
+ unsigned int bh = info->var.yres - (vc->vc_rows*ch);
+ unsigned int rs = info->var.xres - rw;
+ unsigned int bs = info->var.yres - bh;
+ unsigned int vwt = info->var.xres_virtual / cw;
+ unsigned int vht = info->var.yres_virtual / ch;
+ struct fb_tilerect rect;
+
+ rect.index = vc->vc_video_erase_char &
+ ((vc->vc_hi_font_mask) ? 0x1ff : 0xff);
+ rect.fg = color;
+ rect.bg = color;
+
+ if ((int) rw > 0 && !bottom_only) {
+ rect.sx = (info->var.xoffset + rs + cw - 1) / cw;
+ rect.sy = 0;
+ rect.width = (rw + cw - 1) / cw;
+ rect.height = vht;
+ if (rect.width + rect.sx > vwt)
+ rect.width = vwt - rect.sx;
+ if (rect.sx < vwt)
+ info->tileops->fb_tilefill(info, &rect);
+ }
+
+ if ((int) bh > 0) {
+ rect.sx = info->var.xoffset / cw;
+ rect.sy = (info->var.yoffset + bs) / ch;
+ rect.width = rs / cw;
+ rect.height = (bh + ch - 1) / ch;
+ if (rect.height + rect.sy > vht)
+ rect.height = vht - rect.sy;
+ if (rect.sy < vht)
+ info->tileops->fb_tilefill(info, &rect);
+ }
}
static void tile_cursor(struct vc_data *vc, struct fb_info *info, int mode,
diff --git a/drivers/video/fbdev/fsl-diu-fb.c b/drivers/video/fbdev/fsl-diu-fb.c
index ce3c5b0b8f4e..53be4ab374cc 100644
--- a/drivers/video/fbdev/fsl-diu-fb.c
+++ b/drivers/video/fbdev/fsl-diu-fb.c
@@ -1829,6 +1829,7 @@ static int fsl_diu_remove(struct platform_device *pdev)
int i;
data = dev_get_drvdata(&pdev->dev);
+ device_remove_file(&pdev->dev, &data->dev_attr);
disable_lcdc(&data->fsl_diu_info[0]);
free_irq(data->irq, data->diu_reg);
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index 7d320f799ca1..06a64c4adc98 100644
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -2415,7 +2415,7 @@ bool virtqueue_enable_cb_delayed(struct virtqueue *_vq)
struct vring_virtqueue *vq = to_vvq(_vq);
if (vq->event_triggered)
- vq->event_triggered = false;
+ data_race(vq->event_triggered = false);
return vq->packed_ring ? virtqueue_enable_cb_delayed_packed(_vq) :
virtqueue_enable_cb_delayed_split(_vq);
diff --git a/drivers/xen/platform-pci.c b/drivers/xen/platform-pci.c
index 544d3f9010b9..1db82da56db6 100644
--- a/drivers/xen/platform-pci.c
+++ b/drivers/xen/platform-pci.c
@@ -26,6 +26,8 @@
#define DRV_NAME "xen-platform-pci"
+#define PCI_DEVICE_ID_XEN_PLATFORM_XS61 0x0002
+
static unsigned long platform_mmio;
static unsigned long platform_mmio_alloc;
static unsigned long platform_mmiolen;
@@ -174,6 +176,8 @@ static int platform_pci_probe(struct pci_dev *pdev,
static const struct pci_device_id platform_pci_tbl[] = {
{PCI_VENDOR_ID_XEN, PCI_DEVICE_ID_XEN_PLATFORM,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+ {PCI_VENDOR_ID_XEN, PCI_DEVICE_ID_XEN_PLATFORM_XS61,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{0,}
};
diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c
index 25164d56c9d9..d3b6908110c6 100644
--- a/drivers/xen/xenbus/xenbus_probe.c
+++ b/drivers/xen/xenbus/xenbus_probe.c
@@ -966,9 +966,15 @@ static int __init xenbus_init(void)
if (xen_pv_domain())
xen_store_domain_type = XS_PV;
if (xen_hvm_domain())
+ {
xen_store_domain_type = XS_HVM;
- if (xen_hvm_domain() && xen_initial_domain())
- xen_store_domain_type = XS_LOCAL;
+ err = hvm_get_parameter(HVM_PARAM_STORE_EVTCHN, &v);
+ if (err)
+ goto out_error;
+ xen_store_evtchn = (int)v;
+ if (!v && xen_initial_domain())
+ xen_store_domain_type = XS_LOCAL;
+ }
if (xen_pv_domain() && !xen_start_info->store_evtchn)
xen_store_domain_type = XS_LOCAL;
if (xen_pv_domain() && xen_start_info->store_evtchn)
@@ -987,10 +993,6 @@ static int __init xenbus_init(void)
xen_store_interface = gfn_to_virt(xen_store_gfn);
break;
case XS_HVM:
- err = hvm_get_parameter(HVM_PARAM_STORE_EVTCHN, &v);
- if (err)
- goto out_error;
- xen_store_evtchn = (int)v;
err = hvm_get_parameter(HVM_PARAM_STORE_PFN, &v);
if (err)
goto out_error;
diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c
index 0dcf7fecaf55..91440ef79a26 100644
--- a/fs/btrfs/block-group.c
+++ b/fs/btrfs/block-group.c
@@ -1678,6 +1678,17 @@ void btrfs_reclaim_bgs_work(struct work_struct *work)
up_write(&space_info->groups_sem);
goto next;
}
+
+ /*
+ * Cache the zone_unusable value before turning the block group
+ * to read only. As soon as the block group is read only it's
+ * zone_unusable value gets moved to the block group's read-only
+ * bytes and isn't available for calculations anymore. We also
+ * cache it before unlocking the block group, to prevent races
+ * (reports from KCSAN and such tools) with tasks updating it.
+ */
+ zone_unusable = bg->zone_unusable;
+
spin_unlock(&bg->lock);
/*
@@ -1693,13 +1704,6 @@ void btrfs_reclaim_bgs_work(struct work_struct *work)
goto next;
}
- /*
- * Cache the zone_unusable value before turning the block group
- * to read only. As soon as the blog group is read only it's
- * zone_unusable value gets moved to the block group's read-only
- * bytes and isn't available for calculations anymore.
- */
- zone_unusable = bg->zone_unusable;
ret = inc_block_group_ro(bg, 0);
up_write(&space_info->groups_sem);
if (ret < 0)
diff --git a/fs/btrfs/discard.c b/fs/btrfs/discard.c
index 7b2f77a8aa98..a90f3cb83c70 100644
--- a/fs/btrfs/discard.c
+++ b/fs/btrfs/discard.c
@@ -152,13 +152,7 @@ static bool remove_from_discard_list(struct btrfs_discard_ctl *discard_ctl,
block_group->discard_eligible_time = 0;
queued = !list_empty(&block_group->discard_list);
list_del_init(&block_group->discard_list);
- /*
- * If the block group is currently running in the discard workfn, we
- * don't want to deref it, since it's still being used by the workfn.
- * The workfn will notice this case and deref the block group when it is
- * finished.
- */
- if (queued && !running)
+ if (queued)
btrfs_put_block_group(block_group);
spin_unlock(&discard_ctl->lock);
@@ -256,9 +250,10 @@ static struct btrfs_block_group *peek_discard_list(
block_group->discard_cursor = block_group->start;
block_group->discard_state = BTRFS_DISCARD_EXTENTS;
}
- discard_ctl->block_group = block_group;
}
if (block_group) {
+ btrfs_get_block_group(block_group);
+ discard_ctl->block_group = block_group;
*discard_state = block_group->discard_state;
*discard_index = block_group->discard_index;
}
@@ -482,9 +477,20 @@ static void btrfs_discard_workfn(struct work_struct *work)
block_group = peek_discard_list(discard_ctl, &discard_state,
&discard_index, now);
- if (!block_group || !btrfs_run_discard_work(discard_ctl))
+ if (!block_group)
return;
+ if (!btrfs_run_discard_work(discard_ctl)) {
+ spin_lock(&discard_ctl->lock);
+ btrfs_put_block_group(block_group);
+ discard_ctl->block_group = NULL;
+ spin_unlock(&discard_ctl->lock);
+ return;
+ }
if (now < block_group->discard_eligible_time) {
+ spin_lock(&discard_ctl->lock);
+ btrfs_put_block_group(block_group);
+ discard_ctl->block_group = NULL;
+ spin_unlock(&discard_ctl->lock);
btrfs_discard_schedule_work(discard_ctl, false);
return;
}
@@ -536,15 +542,7 @@ static void btrfs_discard_workfn(struct work_struct *work)
spin_lock(&discard_ctl->lock);
discard_ctl->prev_discard = trimmed;
discard_ctl->prev_discard_time = now;
- /*
- * If the block group was removed from the discard list while it was
- * running in this workfn, then we didn't deref it, since this function
- * still owned that reference. But we set the discard_ctl->block_group
- * back to NULL, so we can use that condition to know that now we need
- * to deref the block_group.
- */
- if (discard_ctl->block_group == NULL)
- btrfs_put_block_group(block_group);
+ btrfs_put_block_group(block_group);
discard_ctl->block_group = NULL;
__btrfs_discard_schedule_work(discard_ctl, now, false);
spin_unlock(&discard_ctl->lock);
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index de4f590fe30f..8c0da0025bc7 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -4641,6 +4641,14 @@ void __cold close_ctree(struct btrfs_fs_info *fs_info)
/* clear out the rbtree of defraggable inodes */
btrfs_cleanup_defrag_inodes(fs_info);
+ /*
+ * Handle the error fs first, as it will flush and wait for all ordered
+ * extents. This will generate delayed iputs, thus we want to handle
+ * it first.
+ */
+ if (unlikely(BTRFS_FS_ERROR(fs_info)))
+ btrfs_error_commit_super(fs_info);
+
/*
* Wait for any fixup workers to complete.
* If we don't wait for them here and they are still running by the time
@@ -4661,6 +4669,19 @@ void __cold close_ctree(struct btrfs_fs_info *fs_info)
*/
btrfs_flush_workqueue(fs_info->delalloc_workers);
+ /*
+ * We can have ordered extents getting their last reference dropped from
+ * the fs_info->workers queue because for async writes for data bios we
+ * queue a work for that queue, at btrfs_wq_submit_bio(), that runs
+ * run_one_async_done() which calls btrfs_bio_end_io() in case the bio
+ * has an error, and that later function can do the final
+ * btrfs_put_ordered_extent() on the ordered extent attached to the bio,
+ * which adds a delayed iput for the inode. So we must flush the queue
+ * so that we don't have delayed iputs after committing the current
+ * transaction below and stopping the cleaner and transaction kthreads.
+ */
+ btrfs_flush_workqueue(fs_info->workers);
+
/*
* When finishing a compressed write bio we schedule a work queue item
* to finish an ordered extent - btrfs_finish_compressed_write_work()
@@ -4730,9 +4751,6 @@ void __cold close_ctree(struct btrfs_fs_info *fs_info)
btrfs_err(fs_info, "commit super ret %d", ret);
}
- if (BTRFS_FS_ERROR(fs_info))
- btrfs_error_commit_super(fs_info);
-
kthread_stop(fs_info->transaction_kthread);
kthread_stop(fs_info->cleaner_kthread);
@@ -4888,10 +4906,6 @@ static void btrfs_error_commit_super(struct btrfs_fs_info *fs_info)
/* cleanup FS via transaction */
btrfs_cleanup_transaction(fs_info);
- mutex_lock(&fs_info->cleaner_mutex);
- btrfs_run_delayed_iputs(fs_info);
- mutex_unlock(&fs_info->cleaner_mutex);
-
down_write(&fs_info->cleanup_work_sem);
up_write(&fs_info->cleanup_work_sem);
}
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 72227c0b4b5a..d5552875f872 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -4459,10 +4459,10 @@ struct extent_buffer *find_extent_buffer(struct btrfs_fs_info *fs_info,
return eb;
}
-#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
struct extent_buffer *alloc_test_extent_buffer(struct btrfs_fs_info *fs_info,
u64 start)
{
+#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
struct extent_buffer *eb, *exists = NULL;
int ret;
@@ -4498,8 +4498,11 @@ struct extent_buffer *alloc_test_extent_buffer(struct btrfs_fs_info *fs_info,
free_eb:
btrfs_release_extent_buffer(eb);
return exists;
-}
+#else
+ /* Stub to avoid linker error when compiled with optimizations turned off. */
+ return NULL;
#endif
+}
static struct extent_buffer *grab_extent_buffer(
struct btrfs_fs_info *fs_info, struct page *page)
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index d6cda0b2e925..fd6ea3fcab33 100644
--- a/fs/btrfs/relocation.c
+++ b/fs/btrfs/relocation.c
@@ -2977,6 +2977,7 @@ static int relocate_one_page(struct inode *inode, struct file_ra_state *ra,
int ret;
ASSERT(page_index <= last_index);
+again:
page = find_lock_page(inode->i_mapping, page_index);
if (!page) {
page_cache_sync_readahead(inode->i_mapping, ra, NULL,
@@ -2998,6 +2999,11 @@ static int relocate_one_page(struct inode *inode, struct file_ra_state *ra,
ret = -EIO;
goto release_page;
}
+ if (page->mapping != inode->i_mapping) {
+ unlock_page(page);
+ put_page(page);
+ goto again;
+ }
}
/*
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index a2b95ccb4cf5..0735decec99b 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -431,10 +431,8 @@ static int fs_path_ensure_buf(struct fs_path *p, int len)
if (p->buf_len >= len)
return 0;
- if (len > PATH_MAX) {
- WARN_ON(1);
- return -ENOMEM;
- }
+ if (WARN_ON(len > PATH_MAX))
+ return -ENAMETOOLONG;
path_len = p->end - p->start;
old_buf_len = p->buf_len;
diff --git a/fs/coredump.c b/fs/coredump.c
index 4d332f147137..b0d782367fcc 100644
--- a/fs/coredump.c
+++ b/fs/coredump.c
@@ -42,6 +42,7 @@
#include <linux/timekeeping.h>
#include <linux/sysctl.h>
#include <linux/elf.h>
+#include <uapi/linux/pidfd.h>
#include <linux/uaccess.h>
#include <asm/mmu_context.h>
@@ -56,6 +57,13 @@
static bool dump_vma_snapshot(struct coredump_params *cprm);
static void free_vma_snapshot(struct coredump_params *cprm);
+/*
+ * File descriptor number for the pidfd for the thread-group leader of
+ * the coredumping task installed into the usermode helper's file
+ * descriptor table.
+ */
+#define COREDUMP_PIDFD_NUMBER 3
+
static int core_uses_pid;
static unsigned int core_pipe_limit;
static char core_pattern[CORENAME_MAX_SIZE] = "core";
@@ -325,6 +333,27 @@ static int format_corename(struct core_name *cn, struct coredump_params *cprm,
err = cn_printf(cn, "%lu",
rlimit(RLIMIT_CORE));
break;
+ /* pidfd number */
+ case 'F': {
+ /*
+ * Installing a pidfd only makes sense if
+ * we actually spawn a usermode helper.
+ */
+ if (!ispipe)
+ break;
+
+ /*
+ * Note that we'll install a pidfd for the
+ * thread-group leader. We know that task
+ * linkage hasn't been removed yet and even if
+ * this @current isn't the actual thread-group
+ * leader we know that the thread-group leader
+ * cannot be reaped until @current has exited.
+ */
+ cprm->pid = task_tgid(current);
+ err = cn_printf(cn, "%d", COREDUMP_PIDFD_NUMBER);
+ break;
+ }
default:
break;
}
@@ -479,7 +508,7 @@ static void wait_for_dump_helpers(struct file *file)
}
/*
- * umh_pipe_setup
+ * umh_coredump_setup
* helper function to customize the process used
* to collect the core in userspace. Specifically
* it sets up a pipe and installs it as fd 0 (stdin)
@@ -489,21 +518,61 @@ static void wait_for_dump_helpers(struct file *file)
* is a special value that we use to trap recursive
* core dumps
*/
-static int umh_pipe_setup(struct subprocess_info *info, struct cred *new)
+static int umh_coredump_setup(struct subprocess_info *info, struct cred *new)
{
struct file *files[2];
+ struct file *pidfs_file = NULL;
struct coredump_params *cp = (struct coredump_params *)info->data;
- int err = create_pipe_files(files, 0);
+ int err;
+
+ if (cp->pid) {
+ int fd;
+
+ fd = pidfd_prepare(cp->pid, 0, &pidfs_file);
+ if (fd < 0)
+ return fd;
+
+ /*
+ * We don't care about the fd. We also cannot simply
+ * replace it below because dup2() will refuse to close
+ * this file descriptor if its in a larval state. So
+ * close it!
+ */
+ put_unused_fd(fd);
+
+ /*
+ * Usermode helpers are childen of either
+ * system_unbound_wq or of kthreadd. So we know that
+ * we're starting off with a clean file descriptor
+ * table. So we should always be able to use
+ * COREDUMP_PIDFD_NUMBER as our file descriptor value.
+ */
+ err = replace_fd(COREDUMP_PIDFD_NUMBER, pidfs_file, 0);
+ if (err < 0)
+ goto out_fail;
+
+ pidfs_file = NULL;
+ }
+
+ err = create_pipe_files(files, 0);
if (err)
- return err;
+ goto out_fail;
cp->file = files[1];
err = replace_fd(0, files[0], 0);
fput(files[0]);
+ if (err < 0)
+ goto out_fail;
+
/* and disallow core files too */
current->signal->rlim[RLIMIT_CORE] = (struct rlimit){1, 1};
+ err = 0;
+
+out_fail:
+ if (pidfs_file)
+ fput(pidfs_file);
return err;
}
@@ -580,7 +649,7 @@ void do_coredump(const kernel_siginfo_t *siginfo)
}
if (cprm.limit == 1) {
- /* See umh_pipe_setup() which sets RLIMIT_CORE = 1.
+ /* See umh_coredump_setup() which sets RLIMIT_CORE = 1.
*
* Normally core limits are irrelevant to pipes, since
* we're not writing to the file system, but we use
@@ -625,7 +694,7 @@ void do_coredump(const kernel_siginfo_t *siginfo)
retval = -ENOMEM;
sub_info = call_usermodehelper_setup(helper_argv[0],
helper_argv, NULL, GFP_KERNEL,
- umh_pipe_setup, NULL, &cprm);
+ umh_coredump_setup, NULL, &cprm);
if (sub_info)
retval = call_usermodehelper_exec(sub_info,
UMH_WAIT_EXEC);
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index 2c797eb519da..51a641822d6c 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -1863,8 +1863,8 @@ static int dlm_tcp_listen_validate(void)
{
/* We don't support multi-homed hosts */
if (dlm_local_count > 1) {
- log_print("TCP protocol can't handle multi-homed hosts, try SCTP");
- return -EINVAL;
+ log_print("Detect multi-homed hosts but use only the first IP address.");
+ log_print("Try SCTP, if you want to enable multi-link.");
}
return 0;
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c
index fbd0329cf254..9efe97f3721b 100644
--- a/fs/ext4/balloc.c
+++ b/fs/ext4/balloc.c
@@ -638,8 +638,8 @@ static int ext4_has_free_clusters(struct ext4_sb_info *sbi,
/* Hm, nope. Are (enough) root reserved clusters available? */
if (uid_eq(sbi->s_resuid, current_fsuid()) ||
(!gid_eq(sbi->s_resgid, GLOBAL_ROOT_GID) && in_group_p(sbi->s_resgid)) ||
- capable(CAP_SYS_RESOURCE) ||
- (flags & EXT4_MB_USE_ROOT_BLOCKS)) {
+ (flags & EXT4_MB_USE_ROOT_BLOCKS) ||
+ capable(CAP_SYS_RESOURCE)) {
if (free_clusters >= (nclusters + dirty_clusters +
resv_clusters))
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 7f0231b34905..f829f989f2b5 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -2741,6 +2741,13 @@ static int ext4_check_opt_consistency(struct fs_context *fc,
}
if (is_remount) {
+ if (!sbi->s_journal &&
+ ctx_test_mount_opt(ctx, EXT4_MOUNT_DATA_ERR_ABORT)) {
+ ext4_msg(NULL, KERN_WARNING,
+ "Remounting fs w/o journal so ignoring data_err option");
+ ctx_clear_mount_opt(ctx, EXT4_MOUNT_DATA_ERR_ABORT);
+ }
+
if (ctx_test_mount_opt(ctx, EXT4_MOUNT_DAX_ALWAYS) &&
(test_opt(sb, DATA_FLAGS) == EXT4_MOUNT_JOURNAL_DATA)) {
ext4_msg(NULL, KERN_ERR, "can't mount with "
@@ -5318,6 +5325,11 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb)
"data=, fs mounted w/o journal");
goto failed_mount3a;
}
+ if (test_opt(sb, DATA_ERR_ABORT)) {
+ ext4_msg(sb, KERN_ERR,
+ "can't mount with data_err=abort, fs mounted w/o journal");
+ goto failed_mount3a;
+ }
sbi->s_def_mount_opt &= ~EXT4_MOUNT_JOURNAL_CHECKSUM;
clear_opt(sb, JOURNAL_CHECKSUM);
clear_opt(sb, DATA_FLAGS);
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index c431abbf48e6..0dbacdd7bb0d 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -1068,6 +1068,8 @@ static int fuse_link(struct dentry *entry, struct inode *newdir,
else if (err == -EINTR)
fuse_invalidate_attr(inode);
+ if (err == -ENOSYS)
+ err = -EPERM;
return err;
}
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index 6ba8460f5331..428c1db295fa 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -885,11 +885,12 @@ static void run_queue(struct gfs2_glock *gl, const int nonblock)
__releases(&gl->gl_lockref.lock)
__acquires(&gl->gl_lockref.lock)
{
- struct gfs2_holder *gh = NULL;
+ struct gfs2_holder *gh;
if (test_and_set_bit(GLF_LOCK, &gl->gl_flags))
return;
+ /* While a demote is in progress, the GLF_LOCK flag must be set. */
GLOCK_BUG_ON(gl, test_bit(GLF_DEMOTE_IN_PROGRESS, &gl->gl_flags));
if (test_bit(GLF_DEMOTE, &gl->gl_flags) &&
@@ -901,18 +902,22 @@ __acquires(&gl->gl_lockref.lock)
set_bit(GLF_DEMOTE_IN_PROGRESS, &gl->gl_flags);
GLOCK_BUG_ON(gl, gl->gl_demote_state == LM_ST_EXCLUSIVE);
gl->gl_target = gl->gl_demote_state;
+ do_xmote(gl, NULL, gl->gl_target);
+ return;
} else {
if (test_bit(GLF_DEMOTE, &gl->gl_flags))
gfs2_demote_wake(gl);
if (do_promote(gl) == 0)
goto out_unlock;
gh = find_first_waiter(gl);
+ if (!gh)
+ goto out_unlock;
gl->gl_target = gh->gh_state;
if (!(gh->gh_flags & (LM_FLAG_TRY | LM_FLAG_TRY_1CB)))
do_error(gl, 0); /* Fail queued try locks */
+ do_xmote(gl, gh, gl->gl_target);
+ return;
}
- do_xmote(gl, gh, gl->gl_target);
- return;
out_sched:
clear_bit(GLF_LOCK, &gl->gl_flags);
diff --git a/fs/namespace.c b/fs/namespace.c
index 0dcd57a75ad4..211a81240680 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -632,12 +632,8 @@ int __legitimize_mnt(struct vfsmount *bastard, unsigned seq)
smp_mb(); // see mntput_no_expire() and do_umount()
if (likely(!read_seqretry(&mount_lock, seq)))
return 0;
- if (bastard->mnt_flags & MNT_SYNC_UMOUNT) {
- mnt_add_count(mnt, -1);
- return 1;
- }
lock_mount_hash();
- if (unlikely(bastard->mnt_flags & MNT_DOOMED)) {
+ if (unlikely(bastard->mnt_flags & (MNT_SYNC_UMOUNT | MNT_DOOMED))) {
mnt_add_count(mnt, -1);
unlock_mount_hash();
return 1;
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index a8930e6c417f..de4ad41b14e2 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -1052,6 +1052,8 @@ struct nfs_server *nfs_create_server(struct fs_context *fc)
if (server->namelen == 0 || server->namelen > NFS2_MAXNAMLEN)
server->namelen = NFS2_MAXNAMLEN;
}
+ /* Linux 'subtree_check' borkenness mandates this setting */
+ server->fh_expire_type = NFS_FH_VOL_RENAME;
if (!(fattr->valid & NFS_ATTR_FATTR)) {
error = ctx->nfs_mod->rpc_ops->getattr(server, ctx->mntfh,
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c
index 6363bbc37f42..17b38da17288 100644
--- a/fs/nfs/delegation.c
+++ b/fs/nfs/delegation.c
@@ -297,7 +297,8 @@ nfs_start_delegation_return_locked(struct nfs_inode *nfsi)
if (delegation == NULL)
goto out;
spin_lock(&delegation->lock);
- if (!test_and_set_bit(NFS_DELEGATION_RETURNING, &delegation->flags)) {
+ if (delegation->inode &&
+ !test_and_set_bit(NFS_DELEGATION_RETURNING, &delegation->flags)) {
clear_bit(NFS_DELEGATION_RETURN_DELAYED, &delegation->flags);
/* Refcount matched in nfs_end_delegation_return() */
ret = nfs_get_delegation(delegation);
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 70660ff248b7..1876978107ca 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -2632,6 +2632,18 @@ nfs_unblock_rename(struct rpc_task *task, struct nfs_renamedata *data)
unblock_revalidate(new_dentry);
}
+static bool nfs_rename_is_unsafe_cross_dir(struct dentry *old_dentry,
+ struct dentry *new_dentry)
+{
+ struct nfs_server *server = NFS_SB(old_dentry->d_sb);
+
+ if (old_dentry->d_parent != new_dentry->d_parent)
+ return false;
+ if (server->fh_expire_type & NFS_FH_RENAME_UNSAFE)
+ return !(server->fh_expire_type & NFS_FH_NOEXPIRE_WITH_OPEN);
+ return true;
+}
+
/*
* RENAME
* FIXME: Some nfsds, like the Linux user space nfsd, may generate a
@@ -2719,7 +2731,8 @@ int nfs_rename(struct user_namespace *mnt_userns, struct inode *old_dir,
}
- if (S_ISREG(old_inode->i_mode))
+ if (S_ISREG(old_inode->i_mode) &&
+ nfs_rename_is_unsafe_cross_dir(old_dentry, new_dentry))
nfs_sync_inode(old_inode);
task = nfs_async_rename(old_dir, new_dir, old_dentry, new_dentry,
must_unblock ? nfs_unblock_rename : NULL);
diff --git a/fs/nfs/filelayout/filelayoutdev.c b/fs/nfs/filelayout/filelayoutdev.c
index acf4b88889dc..d5f1fbfd9a0c 100644
--- a/fs/nfs/filelayout/filelayoutdev.c
+++ b/fs/nfs/filelayout/filelayoutdev.c
@@ -75,6 +75,7 @@ nfs4_fl_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
struct page *scratch;
struct list_head dsaddrs;
struct nfs4_pnfs_ds_addr *da;
+ struct net *net = server->nfs_client->cl_net;
/* set up xdr stream */
scratch = alloc_page(gfp_flags);
@@ -158,8 +159,7 @@ nfs4_fl_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
mp_count = be32_to_cpup(p); /* multipath count */
for (j = 0; j < mp_count; j++) {
- da = nfs4_decode_mp_ds_addr(server->nfs_client->cl_net,
- &stream, gfp_flags);
+ da = nfs4_decode_mp_ds_addr(net, &stream, gfp_flags);
if (da)
list_add_tail(&da->da_node, &dsaddrs);
}
@@ -169,7 +169,7 @@ nfs4_fl_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
goto out_err_free_deviceid;
}
- dsaddr->ds_list[i] = nfs4_pnfs_ds_add(&dsaddrs, gfp_flags);
+ dsaddr->ds_list[i] = nfs4_pnfs_ds_add(net, &dsaddrs, gfp_flags);
if (!dsaddr->ds_list[i])
goto out_err_drain_dsaddrs;
diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c
index 8056b05bd8dc..07e5ea64dcd6 100644
--- a/fs/nfs/flexfilelayout/flexfilelayout.c
+++ b/fs/nfs/flexfilelayout/flexfilelayout.c
@@ -1255,6 +1255,7 @@ static void ff_layout_io_track_ds_error(struct pnfs_layout_segment *lseg,
case -ECONNRESET:
case -EHOSTDOWN:
case -EHOSTUNREACH:
+ case -ENETDOWN:
case -ENETUNREACH:
case -EADDRINUSE:
case -ENOBUFS:
diff --git a/fs/nfs/flexfilelayout/flexfilelayoutdev.c b/fs/nfs/flexfilelayout/flexfilelayoutdev.c
index e028f5a0ef5f..d21c5ecfbf1c 100644
--- a/fs/nfs/flexfilelayout/flexfilelayoutdev.c
+++ b/fs/nfs/flexfilelayout/flexfilelayoutdev.c
@@ -49,6 +49,7 @@ nfs4_ff_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
struct nfs4_pnfs_ds_addr *da;
struct nfs4_ff_layout_ds *new_ds = NULL;
struct nfs4_ff_ds_version *ds_versions = NULL;
+ struct net *net = server->nfs_client->cl_net;
u32 mp_count;
u32 version_count;
__be32 *p;
@@ -80,8 +81,7 @@ nfs4_ff_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
for (i = 0; i < mp_count; i++) {
/* multipath ds */
- da = nfs4_decode_mp_ds_addr(server->nfs_client->cl_net,
- &stream, gfp_flags);
+ da = nfs4_decode_mp_ds_addr(net, &stream, gfp_flags);
if (da)
list_add_tail(&da->da_node, &dsaddrs);
}
@@ -149,7 +149,7 @@ nfs4_ff_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
new_ds->ds_versions = ds_versions;
new_ds->ds_versions_cnt = version_count;
- new_ds->ds = nfs4_pnfs_ds_add(&dsaddrs, gfp_flags);
+ new_ds->ds = nfs4_pnfs_ds_add(net, &dsaddrs, gfp_flags);
if (!new_ds->ds)
goto out_err_drain_dsaddrs;
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 964df0725f4c..f2e66b946f4b 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -74,6 +74,8 @@ nfs_fattr_to_ino_t(struct nfs_fattr *fattr)
int nfs_wait_bit_killable(struct wait_bit_key *key, int mode)
{
+ if (unlikely(nfs_current_task_exiting()))
+ return -EINTR;
schedule();
if (signal_pending_state(mode, current))
return -ERESTARTSYS;
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
index ece517ebcca0..84361674bffc 100644
--- a/fs/nfs/internal.h
+++ b/fs/nfs/internal.h
@@ -832,6 +832,11 @@ static inline u32 nfs_stateid_hash(const nfs4_stateid *stateid)
NFS4_STATEID_OTHER_SIZE);
}
+static inline bool nfs_current_task_exiting(void)
+{
+ return (current->flags & PF_EXITING) != 0;
+}
+
static inline bool nfs_error_is_fatal(int err)
{
switch (err) {
diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c
index 2e7579626cf0..f036d30f7515 100644
--- a/fs/nfs/nfs3proc.c
+++ b/fs/nfs/nfs3proc.c
@@ -39,7 +39,7 @@ nfs3_rpc_wrapper(struct rpc_clnt *clnt, struct rpc_message *msg, int flags)
__set_current_state(TASK_KILLABLE|TASK_FREEZABLE_UNSAFE);
schedule_timeout(NFS_JUKEBOX_RETRY_TIME);
res = -ERESTARTSYS;
- } while (!fatal_signal_pending(current));
+ } while (!fatal_signal_pending(current) && !nfs_current_task_exiting());
return res;
}
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index acef50824d1a..0f28607c5747 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -422,6 +422,8 @@ static int nfs4_delay_killable(long *timeout)
{
might_sleep();
+ if (unlikely(nfs_current_task_exiting()))
+ return -EINTR;
__set_current_state(TASK_KILLABLE|TASK_FREEZABLE_UNSAFE);
schedule_timeout(nfs4_update_delay(timeout));
if (!__fatal_signal_pending(current))
@@ -433,6 +435,8 @@ static int nfs4_delay_interruptible(long *timeout)
{
might_sleep();
+ if (unlikely(nfs_current_task_exiting()))
+ return -EINTR;
__set_current_state(TASK_INTERRUPTIBLE|TASK_FREEZABLE_UNSAFE);
schedule_timeout(nfs4_update_delay(timeout));
if (!signal_pending(current))
@@ -1712,7 +1716,8 @@ static void nfs_set_open_stateid_locked(struct nfs4_state *state,
rcu_read_unlock();
trace_nfs4_open_stateid_update_wait(state->inode, stateid, 0);
- if (!fatal_signal_pending(current)) {
+ if (!fatal_signal_pending(current) &&
+ !nfs_current_task_exiting()) {
if (schedule_timeout(5*HZ) == 0)
status = -EAGAIN;
else
@@ -3500,7 +3505,7 @@ static bool nfs4_refresh_open_old_stateid(nfs4_stateid *dst,
write_sequnlock(&state->seqlock);
trace_nfs4_close_stateid_update_wait(state->inode, dst, 0);
- if (fatal_signal_pending(current))
+ if (fatal_signal_pending(current) || nfs_current_task_exiting())
status = -EINTR;
else
if (schedule_timeout(5*HZ) != 0)
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 48ea40660422..80a7c5bd7a47 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -2737,7 +2737,15 @@ static void nfs4_state_manager(struct nfs_client *clp)
pr_warn_ratelimited("NFS: state manager%s%s failed on NFSv4 server %s"
" with error %d\n", section_sep, section,
clp->cl_hostname, -status);
- ssleep(1);
+ switch (status) {
+ case -ENETDOWN:
+ case -ENETUNREACH:
+ nfs_mark_client_ready(clp, -EIO);
+ break;
+ default:
+ ssleep(1);
+ break;
+ }
out_drain:
memalloc_nofs_restore(memflags);
nfs4_end_drain_session(clp);
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
index e3e6a41f19de..f5173c188184 100644
--- a/fs/nfs/pnfs.h
+++ b/fs/nfs/pnfs.h
@@ -59,6 +59,7 @@ struct nfs4_pnfs_ds {
struct list_head ds_node; /* nfs4_pnfs_dev_hlist dev_dslist */
char *ds_remotestr; /* comma sep list of addrs */
struct list_head ds_addrs;
+ const struct net *ds_net;
struct nfs_client *ds_clp;
refcount_t ds_count;
unsigned long ds_state;
@@ -405,7 +406,8 @@ int pnfs_generic_commit_pagelist(struct inode *inode,
int pnfs_generic_scan_commit_lists(struct nfs_commit_info *cinfo, int max);
void pnfs_generic_write_commit_done(struct rpc_task *task, void *data);
void nfs4_pnfs_ds_put(struct nfs4_pnfs_ds *ds);
-struct nfs4_pnfs_ds *nfs4_pnfs_ds_add(struct list_head *dsaddrs,
+struct nfs4_pnfs_ds *nfs4_pnfs_ds_add(const struct net *net,
+ struct list_head *dsaddrs,
gfp_t gfp_flags);
void nfs4_pnfs_v3_ds_connect_unload(void);
int nfs4_pnfs_ds_connect(struct nfs_server *mds_srv, struct nfs4_pnfs_ds *ds,
diff --git a/fs/nfs/pnfs_nfs.c b/fs/nfs/pnfs_nfs.c
index 47a8da3f5c9f..31afa88742f6 100644
--- a/fs/nfs/pnfs_nfs.c
+++ b/fs/nfs/pnfs_nfs.c
@@ -651,12 +651,12 @@ _same_data_server_addrs_locked(const struct list_head *dsaddrs1,
* Lookup DS by addresses. nfs4_ds_cache_lock is held
*/
static struct nfs4_pnfs_ds *
-_data_server_lookup_locked(const struct list_head *dsaddrs)
+_data_server_lookup_locked(const struct net *net, const struct list_head *dsaddrs)
{
struct nfs4_pnfs_ds *ds;
list_for_each_entry(ds, &nfs4_data_server_cache, ds_node)
- if (_same_data_server_addrs_locked(&ds->ds_addrs, dsaddrs))
+ if (ds->ds_net == net && _same_data_server_addrs_locked(&ds->ds_addrs, dsaddrs))
return ds;
return NULL;
}
@@ -763,7 +763,7 @@ nfs4_pnfs_remotestr(struct list_head *dsaddrs, gfp_t gfp_flags)
* uncached and return cached struct nfs4_pnfs_ds.
*/
struct nfs4_pnfs_ds *
-nfs4_pnfs_ds_add(struct list_head *dsaddrs, gfp_t gfp_flags)
+nfs4_pnfs_ds_add(const struct net *net, struct list_head *dsaddrs, gfp_t gfp_flags)
{
struct nfs4_pnfs_ds *tmp_ds, *ds = NULL;
char *remotestr;
@@ -781,13 +781,14 @@ nfs4_pnfs_ds_add(struct list_head *dsaddrs, gfp_t gfp_flags)
remotestr = nfs4_pnfs_remotestr(dsaddrs, gfp_flags);
spin_lock(&nfs4_ds_cache_lock);
- tmp_ds = _data_server_lookup_locked(dsaddrs);
+ tmp_ds = _data_server_lookup_locked(net, dsaddrs);
if (tmp_ds == NULL) {
INIT_LIST_HEAD(&ds->ds_addrs);
list_splice_init(dsaddrs, &ds->ds_addrs);
ds->ds_remotestr = remotestr;
refcount_set(&ds->ds_count, 1);
INIT_LIST_HEAD(&ds->ds_node);
+ ds->ds_net = net;
ds->ds_clp = NULL;
list_add(&ds->ds_node, &nfs4_data_server_cache);
dprintk("%s add new data server %s\n", __func__,
diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c
index b3bbb5a5787a..cc81ff6ac735 100644
--- a/fs/orangefs/inode.c
+++ b/fs/orangefs/inode.c
@@ -23,9 +23,9 @@ static int orangefs_writepage_locked(struct page *page,
struct orangefs_write_range *wr = NULL;
struct iov_iter iter;
struct bio_vec bv;
- size_t len, wlen;
+ size_t wlen;
ssize_t ret;
- loff_t off;
+ loff_t len, off;
set_page_writeback(page);
@@ -94,8 +94,7 @@ static int orangefs_writepages_work(struct orangefs_writepages *ow,
struct orangefs_write_range *wrp, wr;
struct iov_iter iter;
ssize_t ret;
- size_t len;
- loff_t off;
+ loff_t len, off;
int i;
len = i_size_read(inode);
diff --git a/fs/smb/client/cifsproto.h b/fs/smb/client/cifsproto.h
index d1fd54fb3cc1..9a30425b75a9 100644
--- a/fs/smb/client/cifsproto.h
+++ b/fs/smb/client/cifsproto.h
@@ -30,6 +30,9 @@ extern void cifs_small_buf_release(void *);
extern void free_rsp_buf(int, void *);
extern int smb_send(struct TCP_Server_Info *, struct smb_hdr *,
unsigned int /* length */);
+extern int smb_send_kvec(struct TCP_Server_Info *server,
+ struct msghdr *msg,
+ size_t *sent);
extern unsigned int _get_xid(void);
extern void _free_xid(unsigned int);
#define get_xid() \
diff --git a/fs/smb/client/connect.c b/fs/smb/client/connect.c
index 6aeb25006db8..76c04c4ed45f 100644
--- a/fs/smb/client/connect.c
+++ b/fs/smb/client/connect.c
@@ -2966,8 +2966,10 @@ ip_rfc1001_connect(struct TCP_Server_Info *server)
* sessinit is sent but no second negprot
*/
struct rfc1002_session_packet req = {};
- struct smb_hdr *smb_buf = (struct smb_hdr *)&req;
+ struct msghdr msg = {};
+ struct kvec iov = {};
unsigned int len;
+ size_t sent;
req.trailer.session_req.called_len = sizeof(req.trailer.session_req.called_name);
@@ -2996,10 +2998,18 @@ ip_rfc1001_connect(struct TCP_Server_Info *server)
* As per rfc1002, @len must be the number of bytes that follows the
* length field of a rfc1002 session request payload.
*/
- len = sizeof(req) - offsetof(struct rfc1002_session_packet, trailer.session_req);
+ len = sizeof(req.trailer.session_req);
+ req.type = RFC1002_SESSION_REQUEST;
+ req.flags = 0;
+ req.length = cpu_to_be16(len);
+ len += offsetof(typeof(req), trailer.session_req);
+ iov.iov_base = &req;
+ iov.iov_len = len;
+ iov_iter_kvec(&msg.msg_iter, ITER_SOURCE, &iov, 1, len);
+ rc = smb_send_kvec(server, &msg, &sent);
+ if (rc < 0 || len != sent)
+ return (rc == -EINTR || rc == -EAGAIN) ? rc : -ECONNABORTED;
- smb_buf->smb_buf_length = cpu_to_be32((RFC1002_SESSION_REQUEST << 24) | len);
- rc = smb_send(server, smb_buf, len);
/*
* RFC1001 layer in at least one server requires very short break before
* negprot presumably because not expecting negprot to follow so fast.
@@ -3008,7 +3018,7 @@ ip_rfc1001_connect(struct TCP_Server_Info *server)
*/
usleep_range(1000, 2000);
- return rc;
+ return 0;
}
static int
@@ -4178,11 +4188,13 @@ int
cifs_negotiate_protocol(const unsigned int xid, struct cifs_ses *ses,
struct TCP_Server_Info *server)
{
+ bool in_retry = false;
int rc = 0;
if (!server->ops->need_neg || !server->ops->negotiate)
return -ENOSYS;
+retry:
/* only send once per connect */
spin_lock(&server->srv_lock);
if (server->tcpStatus != CifsGood &&
@@ -4202,6 +4214,14 @@ cifs_negotiate_protocol(const unsigned int xid, struct cifs_ses *ses,
spin_unlock(&server->srv_lock);
rc = server->ops->negotiate(xid, ses, server);
+ if (rc == -EAGAIN) {
+ /* Allow one retry attempt */
+ if (!in_retry) {
+ in_retry = true;
+ goto retry;
+ }
+ rc = -EHOSTDOWN;
+ }
if (rc == 0) {
spin_lock(&server->srv_lock);
if (server->tcpStatus == CifsInNegotiate)
diff --git a/fs/smb/client/link.c b/fs/smb/client/link.c
index c0f101fc1e5d..d71feb3fdbd2 100644
--- a/fs/smb/client/link.c
+++ b/fs/smb/client/link.c
@@ -269,7 +269,7 @@ cifs_query_mf_symlink(unsigned int xid, struct cifs_tcon *tcon,
struct cifs_open_parms oparms;
struct cifs_io_parms io_parms = {0};
int buf_type = CIFS_NO_BUFFER;
- FILE_ALL_INFO file_info;
+ struct cifs_open_info_data query_data;
oparms = (struct cifs_open_parms) {
.tcon = tcon,
@@ -281,11 +281,11 @@ cifs_query_mf_symlink(unsigned int xid, struct cifs_tcon *tcon,
.fid = &fid,
};
- rc = CIFS_open(xid, &oparms, &oplock, &file_info);
+ rc = tcon->ses->server->ops->open(xid, &oparms, &oplock, &query_data);
if (rc)
return rc;
- if (file_info.EndOfFile != cpu_to_le64(CIFS_MF_SYMLINK_FILE_SIZE)) {
+ if (query_data.fi.EndOfFile != cpu_to_le64(CIFS_MF_SYMLINK_FILE_SIZE)) {
rc = -ENOENT;
/* it's not a symlink */
goto out;
@@ -324,7 +324,7 @@ cifs_create_mf_symlink(unsigned int xid, struct cifs_tcon *tcon,
.fid = &fid,
};
- rc = CIFS_open(xid, &oparms, &oplock, NULL);
+ rc = tcon->ses->server->ops->open(xid, &oparms, &oplock, NULL);
if (rc)
return rc;
diff --git a/fs/smb/client/readdir.c b/fs/smb/client/readdir.c
index 9a1f1913fb59..402ac06ae9b6 100644
--- a/fs/smb/client/readdir.c
+++ b/fs/smb/client/readdir.c
@@ -765,7 +765,10 @@ find_cifs_entry(const unsigned int xid, struct cifs_tcon *tcon, loff_t pos,
else
cifs_buf_release(cfile->srch_inf.
ntwrk_buf_start);
+ /* Reset all pointers to the network buffer to prevent stale references */
cfile->srch_inf.ntwrk_buf_start = NULL;
+ cfile->srch_inf.srch_entries_start = NULL;
+ cfile->srch_inf.last_entry = NULL;
}
rc = initiate_cifs_search(xid, file, full_path);
if (rc) {
@@ -788,11 +791,11 @@ find_cifs_entry(const unsigned int xid, struct cifs_tcon *tcon, loff_t pos,
rc = server->ops->query_dir_next(xid, tcon, &cfile->fid,
search_flags,
&cfile->srch_inf);
+ if (rc)
+ return -ENOENT;
/* FindFirst/Next set last_entry to NULL on malformed reply */
if (cfile->srch_inf.last_entry)
cifs_save_resume_key(cfile->srch_inf.last_entry, cfile);
- if (rc)
- return -ENOENT;
}
if (index_to_find < cfile->srch_inf.index_of_last_entry) {
/* we found the buffer that contains the entry */
diff --git a/fs/smb/client/smb1ops.c b/fs/smb/client/smb1ops.c
index 225cc7e0304c..1489b9d21b60 100644
--- a/fs/smb/client/smb1ops.c
+++ b/fs/smb/client/smb1ops.c
@@ -426,13 +426,6 @@ cifs_negotiate(const unsigned int xid,
{
int rc;
rc = CIFSSMBNegotiate(xid, ses, server);
- if (rc == -EAGAIN) {
- /* retry only once on 1st time connection */
- set_credits(server, 1);
- rc = CIFSSMBNegotiate(xid, ses, server);
- if (rc == -EAGAIN)
- rc = -EHOSTDOWN;
- }
return rc;
}
diff --git a/fs/smb/client/smb2file.c b/fs/smb/client/smb2file.c
index a7475bc05cac..afdc78e92ee9 100644
--- a/fs/smb/client/smb2file.c
+++ b/fs/smb/client/smb2file.c
@@ -108,16 +108,25 @@ int smb2_open_file(const unsigned int xid, struct cifs_open_parms *oparms, __u32
int err_buftype = CIFS_NO_BUFFER;
struct cifs_fid *fid = oparms->fid;
struct network_resiliency_req nr_ioctl_req;
+ bool retry_without_read_attributes = false;
smb2_path = cifs_convert_path_to_utf16(oparms->path, oparms->cifs_sb);
if (smb2_path == NULL)
return -ENOMEM;
- oparms->desired_access |= FILE_READ_ATTRIBUTES;
+ if (!(oparms->desired_access & FILE_READ_ATTRIBUTES)) {
+ oparms->desired_access |= FILE_READ_ATTRIBUTES;
+ retry_without_read_attributes = true;
+ }
smb2_oplock = SMB2_OPLOCK_LEVEL_BATCH;
rc = SMB2_open(xid, oparms, smb2_path, &smb2_oplock, smb2_data, NULL, &err_iov,
&err_buftype);
+ if (rc == -EACCES && retry_without_read_attributes) {
+ oparms->desired_access &= ~FILE_READ_ATTRIBUTES;
+ rc = SMB2_open(xid, oparms, smb2_path, &smb2_oplock, smb2_data, NULL, &err_iov,
+ &err_buftype);
+ }
if (rc && data) {
struct smb2_hdr *hdr = err_iov.iov_base;
diff --git a/fs/smb/client/smb2ops.c b/fs/smb/client/smb2ops.c
index a62f3e5a7689..c9b9892b510e 100644
--- a/fs/smb/client/smb2ops.c
+++ b/fs/smb/client/smb2ops.c
@@ -422,9 +422,6 @@ smb2_negotiate(const unsigned int xid,
server->CurrentMid = 0;
spin_unlock(&server->mid_lock);
rc = SMB2_negotiate(xid, ses, server);
- /* BB we probably don't need to retry with modern servers */
- if (rc == -EAGAIN)
- rc = -EHOSTDOWN;
return rc;
}
diff --git a/fs/smb/client/transport.c b/fs/smb/client/transport.c
index 3fdafb9297f1..d2867bd263c5 100644
--- a/fs/smb/client/transport.c
+++ b/fs/smb/client/transport.c
@@ -178,7 +178,7 @@ delete_mid(struct mid_q_entry *mid)
* Our basic "send data to server" function. Should be called with srv_mutex
* held. The caller is responsible for handling the results.
*/
-static int
+int
smb_send_kvec(struct TCP_Server_Info *server, struct msghdr *smb_msg,
size_t *sent)
{
diff --git a/fs/smb/server/vfs.c b/fs/smb/server/vfs.c
index cf1b241a1578..fa647b75fba8 100644
--- a/fs/smb/server/vfs.c
+++ b/fs/smb/server/vfs.c
@@ -423,10 +423,15 @@ static int ksmbd_vfs_stream_write(struct ksmbd_file *fp, char *buf, loff_t *pos,
ksmbd_debug(VFS, "write stream data pos : %llu, count : %zd\n",
*pos, count);
+ if (*pos >= XATTR_SIZE_MAX) {
+ pr_err("stream write position %lld is out of bounds\n", *pos);
+ return -EINVAL;
+ }
+
size = *pos + count;
if (size > XATTR_SIZE_MAX) {
size = XATTR_SIZE_MAX;
- count = (*pos + count) - XATTR_SIZE_MAX;
+ count = XATTR_SIZE_MAX - *pos;
}
v_len = ksmbd_vfs_getcasexattr(user_ns,
@@ -440,13 +445,6 @@ static int ksmbd_vfs_stream_write(struct ksmbd_file *fp, char *buf, loff_t *pos,
goto out;
}
- if (v_len <= *pos) {
- pr_err("stream write position %lld is out of bounds (stream length: %zd)\n",
- *pos, v_len);
- err = -EINVAL;
- goto out;
- }
-
if (v_len < size) {
wbuf = kvzalloc(size, GFP_KERNEL);
if (!wbuf) {
diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h
index 10b1990bc1f6..36225aedf613 100644
--- a/include/drm/drm_atomic.h
+++ b/include/drm/drm_atomic.h
@@ -372,8 +372,27 @@ struct drm_atomic_state {
*
* Allow full modeset. This is used by the ATOMIC IOCTL handler to
* implement the DRM_MODE_ATOMIC_ALLOW_MODESET flag. Drivers should
- * never consult this flag, instead looking at the output of
- * drm_atomic_crtc_needs_modeset().
+ * generally not consult this flag, but instead look at the output of
+ * drm_atomic_crtc_needs_modeset(). The detailed rules are:
+ *
+ * - Drivers must not consult @allow_modeset in the atomic commit path.
+ * Use drm_atomic_crtc_needs_modeset() instead.
+ *
+ * - Drivers must consult @allow_modeset before adding unrelated struct
+ * drm_crtc_state to this commit by calling
+ * drm_atomic_get_crtc_state(). See also the warning in the
+ * documentation for that function.
+ *
+ * - Drivers must never change this flag, it is under the exclusive
+ * control of userspace.
+ *
+ * - Drivers may consult @allow_modeset in the atomic check path, if
+ * they have the choice between an optimal hardware configuration
+ * which requires a modeset, and a less optimal configuration which
+ * can be committed without a modeset. An example would be suboptimal
+ * scanout FIFO allocation resulting in increased idle power
+ * consumption. This allows userspace to avoid flickering and delays
+ * for the normal composition loop at reasonable cost.
*/
bool allow_modeset : 1;
/**
diff --git a/include/linux/coredump.h b/include/linux/coredump.h
index 08a1d3e7e46d..2b7ec58299ca 100644
--- a/include/linux/coredump.h
+++ b/include/linux/coredump.h
@@ -28,6 +28,7 @@ struct coredump_params {
int vma_count;
size_t vma_data_size;
struct core_vma_metadata *vma_meta;
+ struct pid *pid;
};
/*
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index e13050eb9777..af3f39ecc1b8 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -598,10 +598,14 @@ static inline int dma_mmap_wc(struct device *dev,
#else
#define DEFINE_DMA_UNMAP_ADDR(ADDR_NAME)
#define DEFINE_DMA_UNMAP_LEN(LEN_NAME)
-#define dma_unmap_addr(PTR, ADDR_NAME) (0)
-#define dma_unmap_addr_set(PTR, ADDR_NAME, VAL) do { } while (0)
-#define dma_unmap_len(PTR, LEN_NAME) (0)
-#define dma_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0)
+#define dma_unmap_addr(PTR, ADDR_NAME) \
+ ({ typeof(PTR) __p __maybe_unused = PTR; 0; })
+#define dma_unmap_addr_set(PTR, ADDR_NAME, VAL) \
+ do { typeof(PTR) __p __maybe_unused = PTR; } while (0)
+#define dma_unmap_len(PTR, LEN_NAME) \
+ ({ typeof(PTR) __p __maybe_unused = PTR; 0; })
+#define dma_unmap_len_set(PTR, LEN_NAME, VAL) \
+ do { typeof(PTR) __p __maybe_unused = PTR; } while (0)
#endif
#endif /* _LINUX_DMA_MAPPING_H */
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 8f77bb0f4ae0..05f8b7d7d1e9 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -237,6 +237,7 @@ struct hrtimer_cpu_base {
ktime_t softirq_expires_next;
struct hrtimer *softirq_next_timer;
struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES];
+ call_single_data_t csd;
} ____cacheline_aligned;
static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time)
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index 9a44de45cc1f..9f27e004127b 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -199,6 +199,7 @@ struct inet6_cork {
struct ipv6_txoptions *opt;
u8 hop_limit;
u8 tclass;
+ u8 dontfrag:1;
};
/**
diff --git a/include/linux/lzo.h b/include/linux/lzo.h
index e95c7d1092b2..4d30e3624acd 100644
--- a/include/linux/lzo.h
+++ b/include/linux/lzo.h
@@ -24,10 +24,18 @@
int lzo1x_1_compress(const unsigned char *src, size_t src_len,
unsigned char *dst, size_t *dst_len, void *wrkmem);
+/* Same as above but does not write more than dst_len to dst. */
+int lzo1x_1_compress_safe(const unsigned char *src, size_t src_len,
+ unsigned char *dst, size_t *dst_len, void *wrkmem);
+
/* This requires 'wrkmem' of size LZO1X_1_MEM_COMPRESS */
int lzorle1x_1_compress(const unsigned char *src, size_t src_len,
unsigned char *dst, size_t *dst_len, void *wrkmem);
+/* Same as above but does not write more than dst_len to dst. */
+int lzorle1x_1_compress_safe(const unsigned char *src, size_t src_len,
+ unsigned char *dst, size_t *dst_len, void *wrkmem);
+
/* safe decompression with overrun testing */
int lzo1x_decompress_safe(const unsigned char *src, size_t src_len,
unsigned char *dst, size_t *dst_len);
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h
index 6646634a0b9d..0cb296f0f8d1 100644
--- a/include/linux/mlx4/device.h
+++ b/include/linux/mlx4/device.h
@@ -1115,7 +1115,7 @@ int mlx4_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt,
int mlx4_buf_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt,
struct mlx4_buf *buf);
-int mlx4_db_alloc(struct mlx4_dev *dev, struct mlx4_db *db, int order);
+int mlx4_db_alloc(struct mlx4_dev *dev, struct mlx4_db *db, unsigned int order);
void mlx4_db_free(struct mlx4_dev *dev, struct mlx4_db *db);
int mlx4_alloc_hwq_res(struct mlx4_dev *dev, struct mlx4_hwq_resources *wqres,
diff --git a/include/linux/msi.h b/include/linux/msi.h
index e5dfb9cf3aa1..1bf8d126f792 100644
--- a/include/linux/msi.h
+++ b/include/linux/msi.h
@@ -129,6 +129,10 @@ struct pci_msi_desc {
* @dev: Pointer to the device which uses this descriptor
* @msg: The last set MSI message cached for reuse
* @affinity: Optional pointer to a cpu affinity mask for this descriptor
+ * @iommu_msi_iova: Optional shifted IOVA from the IOMMU to override the msi_addr.
+ * Only used if iommu_msi_shift != 0
+ * @iommu_msi_shift: Indicates how many bits of the original address should be
+ * preserved when using iommu_msi_iova.
* @sysfs_attr: Pointer to sysfs device attribute
*
* @write_msi_msg: Callback that may be called when the MSI message
@@ -146,7 +150,8 @@ struct msi_desc {
struct msi_msg msg;
struct irq_affinity_desc *affinity;
#ifdef CONFIG_IRQ_MSI_IOMMU
- const void *iommu_cookie;
+ u64 iommu_msi_iova : 58;
+ u64 iommu_msi_shift : 6;
#endif
#ifdef CONFIG_SYSFS
struct device_attribute *sysfs_attrs;
@@ -214,28 +219,14 @@ struct msi_desc *msi_next_desc(struct device *dev, enum msi_desc_filter filter);
#define msi_desc_to_dev(desc) ((desc)->dev)
-#ifdef CONFIG_IRQ_MSI_IOMMU
-static inline const void *msi_desc_get_iommu_cookie(struct msi_desc *desc)
-{
- return desc->iommu_cookie;
-}
-
-static inline void msi_desc_set_iommu_cookie(struct msi_desc *desc,
- const void *iommu_cookie)
-{
- desc->iommu_cookie = iommu_cookie;
-}
-#else
-static inline const void *msi_desc_get_iommu_cookie(struct msi_desc *desc)
+static inline void msi_desc_set_iommu_msi_iova(struct msi_desc *desc, u64 msi_iova,
+ unsigned int msi_shift)
{
- return NULL;
-}
-
-static inline void msi_desc_set_iommu_cookie(struct msi_desc *desc,
- const void *iommu_cookie)
-{
-}
+#ifdef CONFIG_IRQ_MSI_IOMMU
+ desc->iommu_msi_iova = msi_iova >> msi_shift;
+ desc->iommu_msi_shift = msi_shift;
#endif
+}
#ifdef CONFIG_PCI_MSI
struct pci_dev *msi_desc_to_pci_dev(struct msi_desc *desc);
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h
index 9ea9f9087a71..a9671f930084 100644
--- a/include/linux/nfs_fs_sb.h
+++ b/include/linux/nfs_fs_sb.h
@@ -196,6 +196,15 @@ struct nfs_server {
char *fscache_uniq; /* Uniquifier (or NULL) */
#endif
+ /* The following #defines numerically match the NFSv4 equivalents */
+#define NFS_FH_NOEXPIRE_WITH_OPEN (0x1)
+#define NFS_FH_VOLATILE_ANY (0x2)
+#define NFS_FH_VOL_MIGRATION (0x4)
+#define NFS_FH_VOL_RENAME (0x8)
+#define NFS_FH_RENAME_UNSAFE (NFS_FH_VOLATILE_ANY | NFS_FH_VOL_RENAME)
+ u32 fh_expire_type; /* V4 bitmask representing file
+ handle volatility type for
+ this filesystem */
u32 pnfs_blksize; /* layout_blksize attr */
#if IS_ENABLED(CONFIG_NFS_V4)
u32 attr_bitmask[3];/* V4 bitmask representing the set
@@ -219,9 +228,6 @@ struct nfs_server {
u32 acl_bitmask; /* V4 bitmask representing the ACEs
that are supported on this
filesystem */
- u32 fh_expire_type; /* V4 bitmask representing file
- handle volatility type for
- this filesystem */
struct pnfs_layoutdriver_type *pnfs_curr_ld; /* Active layout driver */
struct rpc_wait_queue roc_rpcwaitq;
void *pnfs_ld_data; /* per mount point data */
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index 27b694552d58..41ff70f315a9 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -935,7 +935,13 @@ struct perf_output_handle {
struct perf_buffer *rb;
unsigned long wakeup;
unsigned long size;
- u64 aux_flags;
+ union {
+ u64 flags; /* perf_output*() */
+ u64 aux_flags; /* perf_aux_output*() */
+ struct {
+ u64 skip_read : 1;
+ };
+ };
union {
void *addr;
unsigned long head;
diff --git a/include/linux/pid.h b/include/linux/pid.h
index bf3af54de616..653a527574c4 100644
--- a/include/linux/pid.h
+++ b/include/linux/pid.h
@@ -80,6 +80,7 @@ extern struct pid *pidfd_pid(const struct file *file);
struct pid *pidfd_get_pid(unsigned int fd, unsigned int *flags);
struct task_struct *pidfd_get_task(int pidfd, unsigned int *flags);
int pidfd_create(struct pid *pid, unsigned int flags);
+int pidfd_prepare(struct pid *pid, unsigned int flags, struct file **ret);
static inline struct pid *get_pid(struct pid *pid)
{
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index aef8c7304d45..d1c35009831b 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -97,9 +97,9 @@ static inline void __rcu_read_lock(void)
static inline void __rcu_read_unlock(void)
{
- preempt_enable();
if (IS_ENABLED(CONFIG_RCU_STRICT_GRACE_PERIOD))
rcu_read_unlock_strict();
+ preempt_enable();
}
static inline int rcu_preempt_depth(void)
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h
index 5efb51486e8a..54483d5e6f91 100644
--- a/include/linux/rcutree.h
+++ b/include/linux/rcutree.h
@@ -105,7 +105,7 @@ extern int rcu_scheduler_active;
void rcu_end_inkernel_boot(void);
bool rcu_inkernel_boot_has_ended(void);
bool rcu_is_watching(void);
-#ifndef CONFIG_PREEMPTION
+#ifndef CONFIG_PREEMPT_RCU
void rcu_all_qs(void);
#endif
diff --git a/include/linux/trace.h b/include/linux/trace.h
index 2a70a447184c..bb4d84f1c58c 100644
--- a/include/linux/trace.h
+++ b/include/linux/trace.h
@@ -72,8 +72,8 @@ static inline int unregister_ftrace_export(struct trace_export *export)
static inline void trace_printk_init_buffers(void)
{
}
-static inline int trace_array_printk(struct trace_array *tr, unsigned long ip,
- const char *fmt, ...)
+static inline __printf(3, 4)
+int trace_array_printk(struct trace_array *tr, unsigned long ip, const char *fmt, ...)
{
return 0;
}
diff --git a/include/linux/trace_seq.h b/include/linux/trace_seq.h
index 5a2c650d9e1c..c230cbd25aee 100644
--- a/include/linux/trace_seq.h
+++ b/include/linux/trace_seq.h
@@ -77,8 +77,8 @@ extern __printf(2, 3)
void trace_seq_printf(struct trace_seq *s, const char *fmt, ...);
extern __printf(2, 0)
void trace_seq_vprintf(struct trace_seq *s, const char *fmt, va_list args);
-extern void
-trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary);
+extern __printf(2, 0)
+void trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary);
extern int trace_print_seq(struct seq_file *m, struct trace_seq *s);
extern int trace_seq_to_user(struct trace_seq *s, char __user *ubuf,
int cnt);
@@ -100,8 +100,8 @@ extern int trace_seq_hex_dump(struct trace_seq *s, const char *prefix_str,
static inline void trace_seq_printf(struct trace_seq *s, const char *fmt, ...)
{
}
-static inline void
-trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary)
+static inline __printf(2, 0)
+void trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary)
{
}
diff --git a/include/linux/usb/r8152.h b/include/linux/usb/r8152.h
index 33a4c146dc19..2ca60828f28b 100644
--- a/include/linux/usb/r8152.h
+++ b/include/linux/usb/r8152.h
@@ -30,6 +30,7 @@
#define VENDOR_ID_NVIDIA 0x0955
#define VENDOR_ID_TPLINK 0x2357
#define VENDOR_ID_DLINK 0x2001
+#define VENDOR_ID_DELL 0x413c
#define VENDOR_ID_ASUS 0x0b05
#if IS_REACHABLE(CONFIG_USB_RTL8152)
diff --git a/include/net/af_unix.h b/include/net/af_unix.h
index e7d71a516bd4..b1f82d74339e 100644
--- a/include/net/af_unix.h
+++ b/include/net/af_unix.h
@@ -8,20 +8,46 @@
#include <linux/refcount.h>
#include <net/sock.h>
-void unix_inflight(struct user_struct *user, struct file *fp);
-void unix_notinflight(struct user_struct *user, struct file *fp);
-void unix_destruct_scm(struct sk_buff *skb);
+#if IS_ENABLED(CONFIG_UNIX)
+struct unix_sock *unix_get_socket(struct file *filp);
+#else
+static inline struct unix_sock *unix_get_socket(struct file *filp)
+{
+ return NULL;
+}
+#endif
+
+extern unsigned int unix_tot_inflight;
+void unix_add_edges(struct scm_fp_list *fpl, struct unix_sock *receiver);
+void unix_del_edges(struct scm_fp_list *fpl);
+void unix_update_edges(struct unix_sock *receiver);
+int unix_prepare_fpl(struct scm_fp_list *fpl);
+void unix_destroy_fpl(struct scm_fp_list *fpl);
void unix_gc(void);
-void wait_for_unix_gc(void);
-struct sock *unix_get_socket(struct file *filp);
+void wait_for_unix_gc(struct scm_fp_list *fpl);
+
+struct unix_vertex {
+ struct list_head edges;
+ struct list_head entry;
+ struct list_head scc_entry;
+ unsigned long out_degree;
+ unsigned long index;
+ unsigned long scc_index;
+};
+
+struct unix_edge {
+ struct unix_sock *predecessor;
+ struct unix_sock *successor;
+ struct list_head vertex_entry;
+ struct list_head stack_entry;
+};
+
struct sock *unix_peer_get(struct sock *sk);
#define UNIX_HASH_MOD (256 - 1)
#define UNIX_HASH_SIZE (256 * 2)
#define UNIX_HASH_BITS 8
-extern unsigned int unix_tot_inflight;
-
struct unix_address {
refcount_t refcnt;
int len;
@@ -41,6 +67,7 @@ struct unix_skb_parms {
struct scm_stat {
atomic_t nr_fds;
+ unsigned long nr_unix_fds;
};
#define UNIXCB(skb) (*(struct unix_skb_parms *)&((skb)->cb))
@@ -53,12 +80,9 @@ struct unix_sock {
struct path path;
struct mutex iolock, bindlock;
struct sock *peer;
- struct list_head link;
- unsigned long inflight;
+ struct sock *listener;
+ struct unix_vertex *vertex;
spinlock_t lock;
- unsigned long gc_flags;
-#define UNIX_GC_CANDIDATE 0
-#define UNIX_GC_MAYBE_CYCLE 1
struct socket_wq peer_wq;
wait_queue_entry_t peer_wake;
struct scm_stat scm_stat;
diff --git a/include/net/scm.h b/include/net/scm.h
index 585adc1346bd..0be0dc3eb1dc 100644
--- a/include/net/scm.h
+++ b/include/net/scm.h
@@ -21,9 +21,20 @@ struct scm_creds {
kgid_t gid;
};
+#ifdef CONFIG_UNIX
+struct unix_edge;
+#endif
+
struct scm_fp_list {
short count;
+ short count_unix;
short max;
+#ifdef CONFIG_UNIX
+ bool inflight;
+ bool dead;
+ struct list_head vertices;
+ struct unix_edge *edges;
+#endif
struct user_struct *user;
struct file *fp[SCM_MAX_FD];
};
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index bf670929622d..64911162ab5f 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -212,7 +212,6 @@ struct xfrm_state {
/* Data for encapsulator */
struct xfrm_encap_tmpl *encap;
- struct sock __rcu *encap_sk;
/* Data for care-of address */
xfrm_address_t *coaddr;
diff --git a/include/rdma/uverbs_std_types.h b/include/rdma/uverbs_std_types.h
index fe0512116958..555ea3d142a4 100644
--- a/include/rdma/uverbs_std_types.h
+++ b/include/rdma/uverbs_std_types.h
@@ -34,7 +34,7 @@
static inline void *_uobj_get_obj_read(struct ib_uobject *uobj)
{
if (IS_ERR(uobj))
- return NULL;
+ return ERR_CAST(uobj);
return uobj->object;
}
#define uobj_get_obj_read(_object, _type, _id, _attrs) \
diff --git a/include/sound/hda_codec.h b/include/sound/hda_codec.h
index bbb7805e85d8..4ca45d5895df 100644
--- a/include/sound/hda_codec.h
+++ b/include/sound/hda_codec.h
@@ -199,6 +199,7 @@ struct hda_codec {
/* beep device */
struct hda_beep *beep;
unsigned int beep_mode;
+ bool beep_just_power_on;
/* widget capabilities cache */
u32 *wcaps;
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index 27040b472a4f..51881ffbd155 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -1429,6 +1429,8 @@ int snd_pcm_lib_mmap_iomem(struct snd_pcm_substream *substream, struct vm_area_s
#define snd_pcm_lib_mmap_iomem NULL
#endif
+void snd_pcm_runtime_buffer_set_silence(struct snd_pcm_runtime *runtime);
+
/**
* snd_pcm_limit_isa_dma_size - Get the max size fitting with ISA DMA transfer
* @dma: DMA number
diff --git a/include/trace/events/btrfs.h b/include/trace/events/btrfs.h
index 7a6c5a870d33..31847ccae493 100644
--- a/include/trace/events/btrfs.h
+++ b/include/trace/events/btrfs.h
@@ -1847,7 +1847,7 @@ DECLARE_EVENT_CLASS(btrfs__prelim_ref,
TP_PROTO(const struct btrfs_fs_info *fs_info,
const struct prelim_ref *oldref,
const struct prelim_ref *newref, u64 tree_size),
- TP_ARGS(fs_info, newref, oldref, tree_size),
+ TP_ARGS(fs_info, oldref, newref, tree_size),
TP_STRUCT__entry_btrfs(
__field( u64, root_id )
diff --git a/io_uring/fdinfo.c b/io_uring/fdinfo.c
index ea2c2ded4e41..4a5053169977 100644
--- a/io_uring/fdinfo.c
+++ b/io_uring/fdinfo.c
@@ -79,11 +79,11 @@ static __cold void __io_uring_show_fdinfo(struct io_ring_ctx *ctx,
seq_printf(m, "SqMask:\t0x%x\n", sq_mask);
seq_printf(m, "SqHead:\t%u\n", sq_head);
seq_printf(m, "SqTail:\t%u\n", sq_tail);
- seq_printf(m, "CachedSqHead:\t%u\n", ctx->cached_sq_head);
+ seq_printf(m, "CachedSqHead:\t%u\n", data_race(ctx->cached_sq_head));
seq_printf(m, "CqMask:\t0x%x\n", cq_mask);
seq_printf(m, "CqHead:\t%u\n", cq_head);
seq_printf(m, "CqTail:\t%u\n", cq_tail);
- seq_printf(m, "CachedCqTail:\t%u\n", ctx->cached_cq_tail);
+ seq_printf(m, "CachedCqTail:\t%u\n", data_race(ctx->cached_cq_tail));
seq_printf(m, "SQEs:\t%u\n", sq_tail - sq_head);
sq_entries = min(sq_tail - sq_head, ctx->sq_entries);
for (i = 0; i < sq_entries; i++) {
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index f39d66589180..ad462724246a 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -627,6 +627,7 @@ static bool __io_cqring_overflow_flush(struct io_ring_ctx *ctx, bool force)
* to care for a non-real case.
*/
if (need_resched()) {
+ ctx->cqe_sentinel = ctx->cqe_cached;
io_cq_unlock_post(ctx);
mutex_unlock(&ctx->uring_lock);
cond_resched();
diff --git a/kernel/bpf/hashtab.c b/kernel/bpf/hashtab.c
index dae9ed02a75b..06bc7f26be06 100644
--- a/kernel/bpf/hashtab.c
+++ b/kernel/bpf/hashtab.c
@@ -2172,7 +2172,7 @@ static int bpf_for_each_hash_elem(struct bpf_map *map, bpf_callback_t callback_f
b = &htab->buckets[i];
rcu_read_lock();
head = &b->head;
- hlist_nulls_for_each_entry_rcu(elem, n, head, hash_node) {
+ hlist_nulls_for_each_entry_safe(elem, n, head, hash_node) {
key = elem->key;
if (is_percpu) {
/* current cpu value for percpu map */
diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c
index 27fdf1b2fc46..b145f3ef3695 100644
--- a/kernel/bpf/syscall.c
+++ b/kernel/bpf/syscall.c
@@ -4005,6 +4005,8 @@ static int bpf_prog_get_info_by_fd(struct file *file,
info.recursion_misses = stats.misses;
info.verified_insns = prog->aux->verified_insns;
+ if (prog->aux->btf)
+ info.btf_id = btf_obj_id(prog->aux->btf);
if (!bpf_capable()) {
info.jited_prog_len = 0;
@@ -4151,8 +4153,6 @@ static int bpf_prog_get_info_by_fd(struct file *file,
}
}
- if (prog->aux->btf)
- info.btf_id = btf_obj_id(prog->aux->btf);
info.attach_btf_id = prog->aux->attach_btf_id;
if (attach_btf)
info.attach_btf_obj_id = btf_obj_id(attach_btf);
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index 6e54f0daebef..7997c8021b62 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -90,7 +90,7 @@
DEFINE_MUTEX(cgroup_mutex);
DEFINE_SPINLOCK(css_set_lock);
-#ifdef CONFIG_PROVE_RCU
+#if (defined CONFIG_PROVE_RCU || defined CONFIG_LOCKDEP)
EXPORT_SYMBOL_GPL(cgroup_mutex);
EXPORT_SYMBOL_GPL(css_set_lock);
#endif
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 8fc2bc5646ee..552bb00bfceb 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -1180,6 +1180,12 @@ static void perf_event_ctx_deactivate(struct perf_event_context *ctx)
list_del_init(&ctx->active_ctx_list);
}
+static inline void perf_pmu_read(struct perf_event *event)
+{
+ if (event->state == PERF_EVENT_STATE_ACTIVE)
+ event->pmu->read(event);
+}
+
static void get_ctx(struct perf_event_context *ctx)
{
refcount_inc(&ctx->refcount);
@@ -3389,8 +3395,7 @@ static void __perf_event_sync_stat(struct perf_event *event,
* we know the event must be on the current CPU, therefore we
* don't need to use it.
*/
- if (event->state == PERF_EVENT_STATE_ACTIVE)
- event->pmu->read(event);
+ perf_pmu_read(event);
perf_event_update_time(event);
@@ -4444,15 +4449,8 @@ static void __perf_event_read(void *info)
pmu->read(event);
- for_each_sibling_event(sub, event) {
- if (sub->state == PERF_EVENT_STATE_ACTIVE) {
- /*
- * Use sibling's PMU rather than @event's since
- * sibling could be on different (eg: software) PMU.
- */
- sub->pmu->read(sub);
- }
- }
+ for_each_sibling_event(sub, event)
+ perf_pmu_read(sub);
data->ret = pmu->commit_txn(pmu);
@@ -7101,9 +7099,8 @@ static void perf_output_read_group(struct perf_output_handle *handle,
if (read_format & PERF_FORMAT_TOTAL_TIME_RUNNING)
values[n++] = running;
- if ((leader != event) &&
- (leader->state == PERF_EVENT_STATE_ACTIVE))
- leader->pmu->read(leader);
+ if ((leader != event) && !handle->skip_read)
+ perf_pmu_read(leader);
values[n++] = perf_event_count(leader);
if (read_format & PERF_FORMAT_ID)
@@ -7116,9 +7113,8 @@ static void perf_output_read_group(struct perf_output_handle *handle,
for_each_sibling_event(sub, leader) {
n = 0;
- if ((sub != event) &&
- (sub->state == PERF_EVENT_STATE_ACTIVE))
- sub->pmu->read(sub);
+ if ((sub != event) && !handle->skip_read)
+ perf_pmu_read(sub);
values[n++] = perf_event_count(sub);
if (read_format & PERF_FORMAT_ID)
@@ -7173,6 +7169,9 @@ void perf_output_sample(struct perf_output_handle *handle,
{
u64 sample_type = data->type;
+ if (data->sample_flags & PERF_SAMPLE_READ)
+ handle->skip_read = 1;
+
perf_output_put(handle, *header);
if (sample_type & PERF_SAMPLE_IDENTIFIER)
diff --git a/kernel/events/hw_breakpoint.c b/kernel/events/hw_breakpoint.c
index c3797701339c..382a3b04f6d3 100644
--- a/kernel/events/hw_breakpoint.c
+++ b/kernel/events/hw_breakpoint.c
@@ -978,9 +978,10 @@ static int hw_breakpoint_event_init(struct perf_event *bp)
return -ENOENT;
/*
- * no branch sampling for breakpoint events
+ * Check if breakpoint type is supported before proceeding.
+ * Also, no branch sampling for breakpoint events.
*/
- if (has_branch_stack(bp))
+ if (!hw_breakpoint_slots_cached(find_slot_idx(bp->attr.bp_type)) || has_branch_stack(bp))
return -EOPNOTSUPP;
err = register_perf_hw_breakpoint(bp);
diff --git a/kernel/events/ring_buffer.c b/kernel/events/ring_buffer.c
index 3e1655374c2e..4c4894de6e5d 100644
--- a/kernel/events/ring_buffer.c
+++ b/kernel/events/ring_buffer.c
@@ -181,6 +181,7 @@ __perf_output_begin(struct perf_output_handle *handle,
handle->rb = rb;
handle->event = event;
+ handle->flags = 0;
have_lost = local_read(&rb->lost);
if (unlikely(have_lost)) {
diff --git a/kernel/fork.c b/kernel/fork.c
index 09a935724bd9..8cc313d27188 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1943,6 +1943,91 @@ const struct file_operations pidfd_fops = {
#endif
};
+/**
+ * __pidfd_prepare - allocate a new pidfd_file and reserve a pidfd
+ * @pid: the struct pid for which to create a pidfd
+ * @flags: flags of the new @pidfd
+ * @pidfd: the pidfd to return
+ *
+ * Allocate a new file that stashes @pid and reserve a new pidfd number in the
+ * caller's file descriptor table. The pidfd is reserved but not installed yet.
+
+ * The helper doesn't perform checks on @pid which makes it useful for pidfds
+ * created via CLONE_PIDFD where @pid has no task attached when the pidfd and
+ * pidfd file are prepared.
+ *
+ * If this function returns successfully the caller is responsible to either
+ * call fd_install() passing the returned pidfd and pidfd file as arguments in
+ * order to install the pidfd into its file descriptor table or they must use
+ * put_unused_fd() and fput() on the returned pidfd and pidfd file
+ * respectively.
+ *
+ * This function is useful when a pidfd must already be reserved but there
+ * might still be points of failure afterwards and the caller wants to ensure
+ * that no pidfd is leaked into its file descriptor table.
+ *
+ * Return: On success, a reserved pidfd is returned from the function and a new
+ * pidfd file is returned in the last argument to the function. On
+ * error, a negative error code is returned from the function and the
+ * last argument remains unchanged.
+ */
+static int __pidfd_prepare(struct pid *pid, unsigned int flags, struct file **ret)
+{
+ int pidfd;
+ struct file *pidfd_file;
+
+ if (flags & ~(O_NONBLOCK | O_RDWR | O_CLOEXEC))
+ return -EINVAL;
+
+ pidfd = get_unused_fd_flags(O_RDWR | O_CLOEXEC);
+ if (pidfd < 0)
+ return pidfd;
+
+ pidfd_file = anon_inode_getfile("[pidfd]", &pidfd_fops, pid,
+ flags | O_RDWR | O_CLOEXEC);
+ if (IS_ERR(pidfd_file)) {
+ put_unused_fd(pidfd);
+ return PTR_ERR(pidfd_file);
+ }
+ get_pid(pid); /* held by pidfd_file now */
+ *ret = pidfd_file;
+ return pidfd;
+}
+
+/**
+ * pidfd_prepare - allocate a new pidfd_file and reserve a pidfd
+ * @pid: the struct pid for which to create a pidfd
+ * @flags: flags of the new @pidfd
+ * @pidfd: the pidfd to return
+ *
+ * Allocate a new file that stashes @pid and reserve a new pidfd number in the
+ * caller's file descriptor table. The pidfd is reserved but not installed yet.
+ *
+ * The helper verifies that @pid is used as a thread group leader.
+ *
+ * If this function returns successfully the caller is responsible to either
+ * call fd_install() passing the returned pidfd and pidfd file as arguments in
+ * order to install the pidfd into its file descriptor table or they must use
+ * put_unused_fd() and fput() on the returned pidfd and pidfd file
+ * respectively.
+ *
+ * This function is useful when a pidfd must already be reserved but there
+ * might still be points of failure afterwards and the caller wants to ensure
+ * that no pidfd is leaked into its file descriptor table.
+ *
+ * Return: On success, a reserved pidfd is returned from the function and a new
+ * pidfd file is returned in the last argument to the function. On
+ * error, a negative error code is returned from the function and the
+ * last argument remains unchanged.
+ */
+int pidfd_prepare(struct pid *pid, unsigned int flags, struct file **ret)
+{
+ if (!pid || !pid_has_task(pid, PIDTYPE_TGID))
+ return -EINVAL;
+
+ return __pidfd_prepare(pid, flags, ret);
+}
+
static void __delayed_free_task(struct rcu_head *rhp)
{
struct task_struct *tsk = container_of(rhp, struct task_struct, rcu);
@@ -2293,21 +2378,12 @@ static __latent_entropy struct task_struct *copy_process(
* if the fd table isn't shared).
*/
if (clone_flags & CLONE_PIDFD) {
- retval = get_unused_fd_flags(O_RDWR | O_CLOEXEC);
+ /* Note that no task has been attached to @pid yet. */
+ retval = __pidfd_prepare(pid, O_RDWR | O_CLOEXEC, &pidfile);
if (retval < 0)
goto bad_fork_free_pid;
-
pidfd = retval;
- pidfile = anon_inode_getfile("[pidfd]", &pidfd_fops, pid,
- O_RDWR | O_CLOEXEC);
- if (IS_ERR(pidfile)) {
- put_unused_fd(pidfd);
- retval = PTR_ERR(pidfile);
- goto bad_fork_free_pid;
- }
- get_pid(pid); /* held by pidfile now */
-
retval = put_user(pidfd, args->pidfd);
if (retval)
goto bad_fork_put_pidfd;
diff --git a/kernel/padata.c b/kernel/padata.c
index e2bef90e6fd0..b3f79f23060c 100644
--- a/kernel/padata.c
+++ b/kernel/padata.c
@@ -350,7 +350,8 @@ static void padata_reorder(struct parallel_data *pd)
* To avoid UAF issue, add pd ref here, and put pd ref after reorder_work finish.
*/
padata_get_pd(pd);
- queue_work(pinst->serial_wq, &pd->reorder_work);
+ if (!queue_work(pinst->serial_wq, &pd->reorder_work))
+ padata_put_pd(pd);
}
}
diff --git a/kernel/pid.c b/kernel/pid.c
index 74834c04a081..8bce3aebc949 100644
--- a/kernel/pid.c
+++ b/kernel/pid.c
@@ -594,20 +594,15 @@ struct task_struct *pidfd_get_task(int pidfd, unsigned int *flags)
*/
int pidfd_create(struct pid *pid, unsigned int flags)
{
- int fd;
-
- if (!pid || !pid_has_task(pid, PIDTYPE_TGID))
- return -EINVAL;
+ int pidfd;
+ struct file *pidfd_file;
- if (flags & ~(O_NONBLOCK | O_RDWR | O_CLOEXEC))
- return -EINVAL;
-
- fd = anon_inode_getfd("[pidfd]", &pidfd_fops, get_pid(pid),
- flags | O_RDWR | O_CLOEXEC);
- if (fd < 0)
- put_pid(pid);
+ pidfd = pidfd_prepare(pid, flags, &pidfd_file);
+ if (pidfd < 0)
+ return pidfd;
- return fd;
+ fd_install(pidfd, pidfd_file);
+ return pidfd;
}
/**
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index 044026abfdd7..3929ef8148c1 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -821,8 +821,17 @@ void rcu_read_unlock_strict(void)
{
struct rcu_data *rdp;
- if (irqs_disabled() || preempt_count() || !rcu_state.gp_kthread)
+ if (irqs_disabled() || in_atomic_preempt_off() || !rcu_state.gp_kthread)
return;
+
+ /*
+ * rcu_report_qs_rdp() can only be invoked with a stable rdp and
+ * from the local CPU.
+ *
+ * The in_atomic_preempt_off() check ensures that we come here holding
+ * the last preempt_count (which will get dropped once we return to
+ * __rcu_read_unlock().
+ */
rdp = this_cpu_ptr(&rcu_data);
rdp->cpu_no_qs.b.norm = false;
rcu_report_qs_rdp(rdp);
@@ -963,13 +972,16 @@ static void rcu_preempt_check_blocked_tasks(struct rcu_node *rnp)
*/
static void rcu_flavor_sched_clock_irq(int user)
{
- if (user || rcu_is_cpu_rrupt_from_idle()) {
+ if (user || rcu_is_cpu_rrupt_from_idle() ||
+ (IS_ENABLED(CONFIG_PREEMPT_COUNT) &&
+ (preempt_count() == HARDIRQ_OFFSET))) {
/*
* Get here if this CPU took its interrupt from user
- * mode or from the idle loop, and if this is not a
- * nested interrupt. In this case, the CPU is in
- * a quiescent state, so note it.
+ * mode, from the idle loop without this being a nested
+ * interrupt, or while not holding the task preempt count
+ * (with PREEMPT_COUNT=y). In this case, the CPU is in a
+ * quiescent state, so note it.
*
* No memory barrier is required here because rcu_qs()
* references only CPU-local variables that other CPUs
diff --git a/kernel/softirq.c b/kernel/softirq.c
index 6665f5cd60cb..9ab5ca399a99 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -140,6 +140,18 @@ static DEFINE_PER_CPU(struct softirq_ctrl, softirq_ctrl) = {
.lock = INIT_LOCAL_LOCK(softirq_ctrl.lock),
};
+#ifdef CONFIG_DEBUG_LOCK_ALLOC
+static struct lock_class_key bh_lock_key;
+struct lockdep_map bh_lock_map = {
+ .name = "local_bh",
+ .key = &bh_lock_key,
+ .wait_type_outer = LD_WAIT_FREE,
+ .wait_type_inner = LD_WAIT_CONFIG, /* PREEMPT_RT makes BH preemptible. */
+ .lock_type = LD_LOCK_PERCPU,
+};
+EXPORT_SYMBOL_GPL(bh_lock_map);
+#endif
+
/**
* local_bh_blocked() - Check for idle whether BH processing is blocked
*
@@ -162,6 +174,8 @@ void __local_bh_disable_ip(unsigned long ip, unsigned int cnt)
WARN_ON_ONCE(in_hardirq());
+ lock_map_acquire_read(&bh_lock_map);
+
/* First entry of a task into a BH disabled section? */
if (!current->softirq_disable_cnt) {
if (preemptible()) {
@@ -225,6 +239,8 @@ void __local_bh_enable_ip(unsigned long ip, unsigned int cnt)
WARN_ON_ONCE(in_hardirq());
lockdep_assert_irqs_enabled();
+ lock_map_release(&bh_lock_map);
+
local_irq_save(flags);
curcnt = __this_cpu_read(softirq_ctrl.cnt);
@@ -275,6 +291,8 @@ static inline void ksoftirqd_run_begin(void)
/* Counterpart to ksoftirqd_run_begin() */
static inline void ksoftirqd_run_end(void)
{
+ /* pairs with the lock_map_acquire_read() in ksoftirqd_run_begin() */
+ lock_map_release(&bh_lock_map);
__local_bh_enable(SOFTIRQ_OFFSET, true);
WARN_ON_ONCE(in_interrupt());
local_irq_enable();
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index e60863ab74b5..b3860ec12450 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -58,6 +58,8 @@
#define HRTIMER_ACTIVE_SOFT (HRTIMER_ACTIVE_HARD << MASK_SHIFT)
#define HRTIMER_ACTIVE_ALL (HRTIMER_ACTIVE_SOFT | HRTIMER_ACTIVE_HARD)
+static void retrigger_next_event(void *arg);
+
/*
* The timer bases:
*
@@ -111,7 +113,8 @@ DEFINE_PER_CPU(struct hrtimer_cpu_base, hrtimer_bases) =
.clockid = CLOCK_TAI,
.get_time = &ktime_get_clocktai,
},
- }
+ },
+ .csd = CSD_INIT(retrigger_next_event, NULL)
};
static const int hrtimer_clock_to_base_table[MAX_CLOCKS] = {
@@ -124,6 +127,14 @@ static const int hrtimer_clock_to_base_table[MAX_CLOCKS] = {
[CLOCK_TAI] = HRTIMER_BASE_TAI,
};
+static inline bool hrtimer_base_is_online(struct hrtimer_cpu_base *base)
+{
+ if (!IS_ENABLED(CONFIG_HOTPLUG_CPU))
+ return true;
+ else
+ return likely(base->online);
+}
+
/*
* Functions and macros which are different for UP/SMP systems are kept in a
* single place
@@ -177,27 +188,54 @@ struct hrtimer_clock_base *lock_hrtimer_base(const struct hrtimer *timer,
}
/*
- * We do not migrate the timer when it is expiring before the next
- * event on the target cpu. When high resolution is enabled, we cannot
- * reprogram the target cpu hardware and we would cause it to fire
- * late. To keep it simple, we handle the high resolution enabled and
- * disabled case similar.
+ * Check if the elected target is suitable considering its next
+ * event and the hotplug state of the current CPU.
+ *
+ * If the elected target is remote and its next event is after the timer
+ * to queue, then a remote reprogram is necessary. However there is no
+ * guarantee the IPI handling the operation would arrive in time to meet
+ * the high resolution deadline. In this case the local CPU becomes a
+ * preferred target, unless it is offline.
+ *
+ * High and low resolution modes are handled the same way for simplicity.
*
* Called with cpu_base->lock of target cpu held.
*/
-static int
-hrtimer_check_target(struct hrtimer *timer, struct hrtimer_clock_base *new_base)
+static bool hrtimer_suitable_target(struct hrtimer *timer, struct hrtimer_clock_base *new_base,
+ struct hrtimer_cpu_base *new_cpu_base,
+ struct hrtimer_cpu_base *this_cpu_base)
{
ktime_t expires;
+ /*
+ * The local CPU clockevent can be reprogrammed. Also get_target_base()
+ * guarantees it is online.
+ */
+ if (new_cpu_base == this_cpu_base)
+ return true;
+
+ /*
+ * The offline local CPU can't be the default target if the
+ * next remote target event is after this timer. Keep the
+ * elected new base. An IPI will we issued to reprogram
+ * it as a last resort.
+ */
+ if (!hrtimer_base_is_online(this_cpu_base))
+ return true;
+
expires = ktime_sub(hrtimer_get_expires(timer), new_base->offset);
- return expires < new_base->cpu_base->expires_next;
+
+ return expires >= new_base->cpu_base->expires_next;
}
-static inline
-struct hrtimer_cpu_base *get_target_base(struct hrtimer_cpu_base *base,
- int pinned)
+static inline struct hrtimer_cpu_base *get_target_base(struct hrtimer_cpu_base *base, int pinned)
{
+ if (!hrtimer_base_is_online(base)) {
+ int cpu = cpumask_any_and(cpu_online_mask, housekeeping_cpumask(HK_TYPE_TIMER));
+
+ return &per_cpu(hrtimer_bases, cpu);
+ }
+
#if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ_COMMON)
if (static_branch_likely(&timers_migration_enabled) && !pinned)
return &per_cpu(hrtimer_bases, get_nohz_timer_target());
@@ -248,8 +286,8 @@ switch_hrtimer_base(struct hrtimer *timer, struct hrtimer_clock_base *base,
raw_spin_unlock(&base->cpu_base->lock);
raw_spin_lock(&new_base->cpu_base->lock);
- if (new_cpu_base != this_cpu_base &&
- hrtimer_check_target(timer, new_base)) {
+ if (!hrtimer_suitable_target(timer, new_base, new_cpu_base,
+ this_cpu_base)) {
raw_spin_unlock(&new_base->cpu_base->lock);
raw_spin_lock(&base->cpu_base->lock);
new_cpu_base = this_cpu_base;
@@ -258,8 +296,7 @@ switch_hrtimer_base(struct hrtimer *timer, struct hrtimer_clock_base *base,
}
WRITE_ONCE(timer->base, new_base);
} else {
- if (new_cpu_base != this_cpu_base &&
- hrtimer_check_target(timer, new_base)) {
+ if (!hrtimer_suitable_target(timer, new_base, new_cpu_base, this_cpu_base)) {
new_cpu_base = this_cpu_base;
goto again;
}
@@ -718,8 +755,6 @@ static inline int hrtimer_is_hres_enabled(void)
return hrtimer_hres_enabled;
}
-static void retrigger_next_event(void *arg);
-
/*
* Switch to high resolution mode
*/
@@ -1205,6 +1240,7 @@ static int __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,
u64 delta_ns, const enum hrtimer_mode mode,
struct hrtimer_clock_base *base)
{
+ struct hrtimer_cpu_base *this_cpu_base = this_cpu_ptr(&hrtimer_bases);
struct hrtimer_clock_base *new_base;
bool force_local, first;
@@ -1216,9 +1252,15 @@ static int __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,
* and enforce reprogramming after it is queued no matter whether
* it is the new first expiring timer again or not.
*/
- force_local = base->cpu_base == this_cpu_ptr(&hrtimer_bases);
+ force_local = base->cpu_base == this_cpu_base;
force_local &= base->cpu_base->next_timer == timer;
+ /*
+ * Don't force local queuing if this enqueue happens on a unplugged
+ * CPU after hrtimer_cpu_dying() has been invoked.
+ */
+ force_local &= this_cpu_base->online;
+
/*
* Remove an active timer from the queue. In case it is not queued
* on the current CPU, make sure that remove_hrtimer() updates the
@@ -1248,8 +1290,27 @@ static int __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,
}
first = enqueue_hrtimer(timer, new_base, mode);
- if (!force_local)
- return first;
+ if (!force_local) {
+ /*
+ * If the current CPU base is online, then the timer is
+ * never queued on a remote CPU if it would be the first
+ * expiring timer there.
+ */
+ if (hrtimer_base_is_online(this_cpu_base))
+ return first;
+
+ /*
+ * Timer was enqueued remote because the current base is
+ * already offline. If the timer is the first to expire,
+ * kick the remote CPU to reprogram the clock event.
+ */
+ if (first) {
+ struct hrtimer_cpu_base *new_cpu_base = new_base->cpu_base;
+
+ smp_call_function_single_async(new_cpu_base->cpu, &new_cpu_base->csd);
+ }
+ return 0;
+ }
/*
* Timer was forced to stay on the current CPU to avoid
diff --git a/kernel/time/posix-timers.c b/kernel/time/posix-timers.c
index 2d6cf93ca370..fc08d4ccdeeb 100644
--- a/kernel/time/posix-timers.c
+++ b/kernel/time/posix-timers.c
@@ -161,6 +161,7 @@ static int posix_timer_add(struct k_itimer *timer)
return id;
}
spin_unlock(&hash_lock);
+ cond_resched();
}
/* POSIX return code when no timer ID could be allocated */
return -EAGAIN;
diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c
index ed7d6ad694fb..20a5e6962b69 100644
--- a/kernel/time/timer_list.c
+++ b/kernel/time/timer_list.c
@@ -46,7 +46,7 @@ static void
print_timer(struct seq_file *m, struct hrtimer *taddr, struct hrtimer *timer,
int idx, u64 now)
{
- SEQ_printf(m, " #%d: <%pK>, %ps", idx, taddr, timer->function);
+ SEQ_printf(m, " #%d: <%p>, %ps", idx, taddr, timer->function);
SEQ_printf(m, ", S:%02x", timer->state);
SEQ_printf(m, "\n");
SEQ_printf(m, " # expires at %Lu-%Lu nsecs [in %Ld to %Ld nsecs]\n",
@@ -98,7 +98,7 @@ print_active_timers(struct seq_file *m, struct hrtimer_clock_base *base,
static void
print_base(struct seq_file *m, struct hrtimer_clock_base *base, u64 now)
{
- SEQ_printf(m, " .base: %pK\n", base);
+ SEQ_printf(m, " .base: %p\n", base);
SEQ_printf(m, " .index: %d\n", base->index);
SEQ_printf(m, " .resolution: %u nsecs\n", hrtimer_resolution);
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 9da29583dfbc..9e0b9c9a7dff 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -3422,10 +3422,9 @@ int trace_vbprintk(unsigned long ip, const char *fmt, va_list args)
}
EXPORT_SYMBOL_GPL(trace_vbprintk);
-__printf(3, 0)
-static int
-__trace_array_vprintk(struct trace_buffer *buffer,
- unsigned long ip, const char *fmt, va_list args)
+static __printf(3, 0)
+int __trace_array_vprintk(struct trace_buffer *buffer,
+ unsigned long ip, const char *fmt, va_list args)
{
struct trace_event_call *call = &event_print;
struct ring_buffer_event *event;
@@ -3478,7 +3477,6 @@ __trace_array_vprintk(struct trace_buffer *buffer,
return len;
}
-__printf(3, 0)
int trace_array_vprintk(struct trace_array *tr,
unsigned long ip, const char *fmt, va_list args)
{
@@ -3505,7 +3503,6 @@ int trace_array_vprintk(struct trace_array *tr,
* Note, trace_array_init_printk() must be called on @tr before this
* can be used.
*/
-__printf(3, 0)
int trace_array_printk(struct trace_array *tr,
unsigned long ip, const char *fmt, ...)
{
@@ -3550,7 +3547,6 @@ int trace_array_init_printk(struct trace_array *tr)
}
EXPORT_SYMBOL_GPL(trace_array_init_printk);
-__printf(3, 4)
int trace_array_printk_buf(struct trace_buffer *buffer,
unsigned long ip, const char *fmt, ...)
{
@@ -3566,7 +3562,6 @@ int trace_array_printk_buf(struct trace_buffer *buffer,
return ret;
}
-__printf(2, 0)
int trace_vprintk(unsigned long ip, const char *fmt, va_list args)
{
return trace_array_vprintk(&global_trace, ip, fmt, args);
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index aad7fcd84617..49b297ca7fc7 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -780,13 +780,15 @@ static inline void __init disable_tracing_selftest(const char *reason)
extern void *head_page(struct trace_array_cpu *data);
extern unsigned long long ns2usecs(u64 nsec);
-extern int
-trace_vbprintk(unsigned long ip, const char *fmt, va_list args);
-extern int
-trace_vprintk(unsigned long ip, const char *fmt, va_list args);
-extern int
-trace_array_vprintk(struct trace_array *tr,
- unsigned long ip, const char *fmt, va_list args);
+
+__printf(2, 0)
+int trace_vbprintk(unsigned long ip, const char *fmt, va_list args);
+__printf(2, 0)
+int trace_vprintk(unsigned long ip, const char *fmt, va_list args);
+__printf(3, 0)
+int trace_array_vprintk(struct trace_array *tr,
+ unsigned long ip, const char *fmt, va_list args);
+__printf(3, 4)
int trace_array_printk_buf(struct trace_buffer *buffer,
unsigned long ip, const char *fmt, ...);
void trace_printk_seq(struct trace_seq *s);
diff --git a/lib/dynamic_queue_limits.c b/lib/dynamic_queue_limits.c
index fde0aa244148..a75a9ca46b59 100644
--- a/lib/dynamic_queue_limits.c
+++ b/lib/dynamic_queue_limits.c
@@ -116,7 +116,7 @@ EXPORT_SYMBOL(dql_completed);
void dql_reset(struct dql *dql)
{
/* Reset all dynamic values */
- dql->limit = 0;
+ dql->limit = dql->min_limit;
dql->num_queued = 0;
dql->num_completed = 0;
dql->last_obj_cnt = 0;
diff --git a/lib/lzo/Makefile b/lib/lzo/Makefile
index 2f58fafbbddd..fc7b2b7ef4b2 100644
--- a/lib/lzo/Makefile
+++ b/lib/lzo/Makefile
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-only
-lzo_compress-objs := lzo1x_compress.o
+lzo_compress-objs := lzo1x_compress.o lzo1x_compress_safe.o
lzo_decompress-objs := lzo1x_decompress_safe.o
obj-$(CONFIG_LZO_COMPRESS) += lzo_compress.o
diff --git a/lib/lzo/lzo1x_compress.c b/lib/lzo/lzo1x_compress.c
index 9d31e7126606..f00dff9b9d4e 100644
--- a/lib/lzo/lzo1x_compress.c
+++ b/lib/lzo/lzo1x_compress.c
@@ -18,11 +18,22 @@
#include <linux/lzo.h>
#include "lzodefs.h"
-static noinline size_t
-lzo1x_1_do_compress(const unsigned char *in, size_t in_len,
- unsigned char *out, size_t *out_len,
- size_t ti, void *wrkmem, signed char *state_offset,
- const unsigned char bitstream_version)
+#undef LZO_UNSAFE
+
+#ifndef LZO_SAFE
+#define LZO_UNSAFE 1
+#define LZO_SAFE(name) name
+#define HAVE_OP(x) 1
+#endif
+
+#define NEED_OP(x) if (!HAVE_OP(x)) goto output_overrun
+
+static noinline int
+LZO_SAFE(lzo1x_1_do_compress)(const unsigned char *in, size_t in_len,
+ unsigned char **out, unsigned char *op_end,
+ size_t *tp, void *wrkmem,
+ signed char *state_offset,
+ const unsigned char bitstream_version)
{
const unsigned char *ip;
unsigned char *op;
@@ -30,8 +41,9 @@ lzo1x_1_do_compress(const unsigned char *in, size_t in_len,
const unsigned char * const ip_end = in + in_len - 20;
const unsigned char *ii;
lzo_dict_t * const dict = (lzo_dict_t *) wrkmem;
+ size_t ti = *tp;
- op = out;
+ op = *out;
ip = in;
ii = ip;
ip += ti < 4 ? 4 - ti : 0;
@@ -116,25 +128,32 @@ lzo1x_1_do_compress(const unsigned char *in, size_t in_len,
if (t != 0) {
if (t <= 3) {
op[*state_offset] |= t;
+ NEED_OP(4);
COPY4(op, ii);
op += t;
} else if (t <= 16) {
+ NEED_OP(17);
*op++ = (t - 3);
COPY8(op, ii);
COPY8(op + 8, ii + 8);
op += t;
} else {
if (t <= 18) {
+ NEED_OP(1);
*op++ = (t - 3);
} else {
size_t tt = t - 18;
+ NEED_OP(1);
*op++ = 0;
while (unlikely(tt > 255)) {
tt -= 255;
+ NEED_OP(1);
*op++ = 0;
}
+ NEED_OP(1);
*op++ = tt;
}
+ NEED_OP(t);
do {
COPY8(op, ii);
COPY8(op + 8, ii + 8);
@@ -151,6 +170,7 @@ lzo1x_1_do_compress(const unsigned char *in, size_t in_len,
if (unlikely(run_length)) {
ip += run_length;
run_length -= MIN_ZERO_RUN_LENGTH;
+ NEED_OP(4);
put_unaligned_le32((run_length << 21) | 0xfffc18
| (run_length & 0x7), op);
op += 4;
@@ -243,10 +263,12 @@ lzo1x_1_do_compress(const unsigned char *in, size_t in_len,
ip += m_len;
if (m_len <= M2_MAX_LEN && m_off <= M2_MAX_OFFSET) {
m_off -= 1;
+ NEED_OP(2);
*op++ = (((m_len - 1) << 5) | ((m_off & 7) << 2));
*op++ = (m_off >> 3);
} else if (m_off <= M3_MAX_OFFSET) {
m_off -= 1;
+ NEED_OP(1);
if (m_len <= M3_MAX_LEN)
*op++ = (M3_MARKER | (m_len - 2));
else {
@@ -254,14 +276,18 @@ lzo1x_1_do_compress(const unsigned char *in, size_t in_len,
*op++ = M3_MARKER | 0;
while (unlikely(m_len > 255)) {
m_len -= 255;
+ NEED_OP(1);
*op++ = 0;
}
+ NEED_OP(1);
*op++ = (m_len);
}
+ NEED_OP(2);
*op++ = (m_off << 2);
*op++ = (m_off >> 6);
} else {
m_off -= 0x4000;
+ NEED_OP(1);
if (m_len <= M4_MAX_LEN)
*op++ = (M4_MARKER | ((m_off >> 11) & 8)
| (m_len - 2));
@@ -282,11 +308,14 @@ lzo1x_1_do_compress(const unsigned char *in, size_t in_len,
m_len -= M4_MAX_LEN;
*op++ = (M4_MARKER | ((m_off >> 11) & 8));
while (unlikely(m_len > 255)) {
+ NEED_OP(1);
m_len -= 255;
*op++ = 0;
}
+ NEED_OP(1);
*op++ = (m_len);
}
+ NEED_OP(2);
*op++ = (m_off << 2);
*op++ = (m_off >> 6);
}
@@ -295,14 +324,20 @@ lzo1x_1_do_compress(const unsigned char *in, size_t in_len,
ii = ip;
goto next;
}
- *out_len = op - out;
- return in_end - (ii - ti);
+ *out = op;
+ *tp = in_end - (ii - ti);
+ return LZO_E_OK;
+
+output_overrun:
+ return LZO_E_OUTPUT_OVERRUN;
}
-static int lzogeneric1x_1_compress(const unsigned char *in, size_t in_len,
- unsigned char *out, size_t *out_len,
- void *wrkmem, const unsigned char bitstream_version)
+static int LZO_SAFE(lzogeneric1x_1_compress)(
+ const unsigned char *in, size_t in_len,
+ unsigned char *out, size_t *out_len,
+ void *wrkmem, const unsigned char bitstream_version)
{
+ unsigned char * const op_end = out + *out_len;
const unsigned char *ip = in;
unsigned char *op = out;
unsigned char *data_start;
@@ -326,14 +361,18 @@ static int lzogeneric1x_1_compress(const unsigned char *in, size_t in_len,
while (l > 20) {
size_t ll = min_t(size_t, l, m4_max_offset + 1);
uintptr_t ll_end = (uintptr_t) ip + ll;
+ int err;
+
if ((ll_end + ((t + ll) >> 5)) <= ll_end)
break;
BUILD_BUG_ON(D_SIZE * sizeof(lzo_dict_t) > LZO1X_1_MEM_COMPRESS);
memset(wrkmem, 0, D_SIZE * sizeof(lzo_dict_t));
- t = lzo1x_1_do_compress(ip, ll, op, out_len, t, wrkmem,
- &state_offset, bitstream_version);
+ err = LZO_SAFE(lzo1x_1_do_compress)(
+ ip, ll, &op, op_end, &t, wrkmem,
+ &state_offset, bitstream_version);
+ if (err != LZO_E_OK)
+ return err;
ip += ll;
- op += *out_len;
l -= ll;
}
t += l;
@@ -342,20 +381,26 @@ static int lzogeneric1x_1_compress(const unsigned char *in, size_t in_len,
const unsigned char *ii = in + in_len - t;
if (op == data_start && t <= 238) {
+ NEED_OP(1);
*op++ = (17 + t);
} else if (t <= 3) {
op[state_offset] |= t;
} else if (t <= 18) {
+ NEED_OP(1);
*op++ = (t - 3);
} else {
size_t tt = t - 18;
+ NEED_OP(1);
*op++ = 0;
while (tt > 255) {
tt -= 255;
+ NEED_OP(1);
*op++ = 0;
}
+ NEED_OP(1);
*op++ = tt;
}
+ NEED_OP(t);
if (t >= 16) do {
COPY8(op, ii);
COPY8(op + 8, ii + 8);
@@ -368,31 +413,38 @@ static int lzogeneric1x_1_compress(const unsigned char *in, size_t in_len,
} while (--t > 0);
}
+ NEED_OP(3);
*op++ = M4_MARKER | 1;
*op++ = 0;
*op++ = 0;
*out_len = op - out;
return LZO_E_OK;
+
+output_overrun:
+ return LZO_E_OUTPUT_OVERRUN;
}
-int lzo1x_1_compress(const unsigned char *in, size_t in_len,
- unsigned char *out, size_t *out_len,
- void *wrkmem)
+int LZO_SAFE(lzo1x_1_compress)(const unsigned char *in, size_t in_len,
+ unsigned char *out, size_t *out_len,
+ void *wrkmem)
{
- return lzogeneric1x_1_compress(in, in_len, out, out_len, wrkmem, 0);
+ return LZO_SAFE(lzogeneric1x_1_compress)(
+ in, in_len, out, out_len, wrkmem, 0);
}
-int lzorle1x_1_compress(const unsigned char *in, size_t in_len,
- unsigned char *out, size_t *out_len,
- void *wrkmem)
+int LZO_SAFE(lzorle1x_1_compress)(const unsigned char *in, size_t in_len,
+ unsigned char *out, size_t *out_len,
+ void *wrkmem)
{
- return lzogeneric1x_1_compress(in, in_len, out, out_len,
- wrkmem, LZO_VERSION);
+ return LZO_SAFE(lzogeneric1x_1_compress)(
+ in, in_len, out, out_len, wrkmem, LZO_VERSION);
}
-EXPORT_SYMBOL_GPL(lzo1x_1_compress);
-EXPORT_SYMBOL_GPL(lzorle1x_1_compress);
+EXPORT_SYMBOL_GPL(LZO_SAFE(lzo1x_1_compress));
+EXPORT_SYMBOL_GPL(LZO_SAFE(lzorle1x_1_compress));
+#ifndef LZO_UNSAFE
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("LZO1X-1 Compressor");
+#endif
diff --git a/lib/lzo/lzo1x_compress_safe.c b/lib/lzo/lzo1x_compress_safe.c
new file mode 100644
index 000000000000..371c9f849492
--- /dev/null
+++ b/lib/lzo/lzo1x_compress_safe.c
@@ -0,0 +1,18 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * LZO1X Compressor from LZO
+ *
+ * Copyright (C) 1996-2012 Markus F.X.J. Oberhumer <markus@xxxxxxxxxxxxx>
+ *
+ * The full LZO package can be found at:
+ * http://www.oberhumer.com/opensource/lzo/
+ *
+ * Changed for Linux kernel use by:
+ * Nitin Gupta <nitingupta910@xxxxxxxxx>
+ * Richard Purdie <rpurdie@xxxxxxxxxxxxxx>
+ */
+
+#define LZO_SAFE(name) name##_safe
+#define HAVE_OP(x) ((size_t)(op_end - op) >= (size_t)(x))
+
+#include "lzo1x_compress.c"
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 3f7cab196eb6..420efa1d2b20 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1242,7 +1242,6 @@ int mem_cgroup_scan_tasks(struct mem_cgroup *memcg,
{
struct mem_cgroup *iter;
int ret = 0;
- int i = 0;
BUG_ON(memcg == root_mem_cgroup);
@@ -1252,10 +1251,9 @@ int mem_cgroup_scan_tasks(struct mem_cgroup *memcg,
css_task_iter_start(&iter->css, CSS_TASK_ITER_PROCS, &it);
while (!ret && (task = css_task_iter_next(&it))) {
- /* Avoid potential softlockup warning */
- if ((++i & 1023) == 0)
- cond_resched();
ret = fn(task, arg);
+ /* Avoid potential softlockup warning */
+ cond_resched();
}
css_task_iter_end(&it);
if (ret) {
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 65ad214e21f3..5a2bae590ed7 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5195,6 +5195,14 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
}
retry:
+ /*
+ * Deal with possible cpuset update races or zonelist updates to avoid
+ * infinite retries.
+ */
+ if (check_retry_cpuset(cpuset_mems_cookie, ac) ||
+ check_retry_zonelist(zonelist_iter_cookie))
+ goto restart;
+
/* Ensure kswapd doesn't accidentally go to sleep as long as we loop */
if (alloc_flags & ALLOC_KSWAPD)
wake_all_kswapds(order, gfp_mask, ac);
diff --git a/net/Makefile b/net/Makefile
index 0914bea9c335..103cd8d61f68 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -17,7 +17,7 @@ obj-$(CONFIG_NETFILTER) += netfilter/
obj-$(CONFIG_INET) += ipv4/
obj-$(CONFIG_TLS) += tls/
obj-$(CONFIG_XFRM) += xfrm/
-obj-$(CONFIG_UNIX_SCM) += unix/
+obj-$(CONFIG_UNIX) += unix/
obj-y += ipv6/
obj-$(CONFIG_BPFILTER) += bpfilter/
obj-$(CONFIG_PACKET) += packet/
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 222105e24d2d..cb9b1edfcea2 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -1561,7 +1561,8 @@ static void l2cap_request_info(struct l2cap_conn *conn)
sizeof(req), &req);
}
-static bool l2cap_check_enc_key_size(struct hci_conn *hcon)
+static bool l2cap_check_enc_key_size(struct hci_conn *hcon,
+ struct l2cap_chan *chan)
{
/* The minimum encryption key size needs to be enforced by the
* host stack before establishing any L2CAP connections. The
@@ -1575,7 +1576,7 @@ static bool l2cap_check_enc_key_size(struct hci_conn *hcon)
int min_key_size = hcon->hdev->min_enc_key_size;
/* On FIPS security level, key size must be 16 bytes */
- if (hcon->sec_level == BT_SECURITY_FIPS)
+ if (chan->sec_level == BT_SECURITY_FIPS)
min_key_size = 16;
return (!test_bit(HCI_CONN_ENCRYPT, &hcon->flags) ||
@@ -1603,7 +1604,7 @@ static void l2cap_do_start(struct l2cap_chan *chan)
!__l2cap_no_conn_pending(chan))
return;
- if (l2cap_check_enc_key_size(conn->hcon))
+ if (l2cap_check_enc_key_size(conn->hcon, chan))
l2cap_start_connection(chan);
else
__set_chan_timer(chan, L2CAP_DISC_TIMEOUT);
@@ -1685,7 +1686,7 @@ static void l2cap_conn_start(struct l2cap_conn *conn)
continue;
}
- if (l2cap_check_enc_key_size(conn->hcon))
+ if (l2cap_check_enc_key_size(conn->hcon, chan))
l2cap_start_connection(chan);
else
l2cap_chan_close(chan, ECONNREFUSED);
@@ -4187,7 +4188,7 @@ static struct l2cap_chan *l2cap_connect(struct l2cap_conn *conn,
/* Check if the ACL is secure enough (if not SDP) */
if (psm != cpu_to_le16(L2CAP_PSM_SDP) &&
(!hci_conn_check_link_mode(conn->hcon) ||
- !l2cap_check_enc_key_size(conn->hcon))) {
+ !l2cap_check_enc_key_size(conn->hcon, pchan))) {
conn->disc_reason = HCI_ERROR_AUTH_FAILURE;
result = L2CAP_CR_SEC_BLOCK;
goto response;
@@ -8418,7 +8419,7 @@ static void l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt)
}
if (chan->state == BT_CONNECT) {
- if (!status && l2cap_check_enc_key_size(hcon))
+ if (!status && l2cap_check_enc_key_size(hcon, chan))
l2cap_start_connection(chan);
else
__set_chan_timer(chan, L2CAP_DISC_TIMEOUT);
@@ -8428,7 +8429,7 @@ static void l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt)
struct l2cap_conn_rsp rsp;
__u16 res, stat;
- if (!status && l2cap_check_enc_key_size(hcon)) {
+ if (!status && l2cap_check_enc_key_size(hcon, chan)) {
if (test_bit(FLAG_DEFER_SETUP, &chan->flags)) {
res = L2CAP_CR_PEND;
stat = L2CAP_CS_AUTHOR_PEND;
diff --git a/net/bridge/br_nf_core.c b/net/bridge/br_nf_core.c
index 8c69f0c95a8e..b8c8deb87407 100644
--- a/net/bridge/br_nf_core.c
+++ b/net/bridge/br_nf_core.c
@@ -65,17 +65,14 @@ static struct dst_ops fake_dst_ops = {
* ipt_REJECT needs it. Future netfilter modules might
* require us to fill additional fields.
*/
-static const u32 br_dst_default_metrics[RTAX_MAX] = {
- [RTAX_MTU - 1] = 1500,
-};
-
void br_netfilter_rtable_init(struct net_bridge *br)
{
struct rtable *rt = &br->fake_rtable;
atomic_set(&rt->dst.__refcnt, 1);
rt->dst.dev = br->dev;
- dst_init_metrics(&rt->dst, br_dst_default_metrics, true);
+ dst_init_metrics(&rt->dst, br->metrics, false);
+ dst_metric_set(&rt->dst, RTAX_MTU, br->dev->mtu);
rt->dst.flags = DST_NOXFRM | DST_FAKE_RTABLE;
rt->dst.ops = &fake_dst_ops;
}
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
index 940de9516768..19fb50549252 100644
--- a/net/bridge/br_private.h
+++ b/net/bridge/br_private.h
@@ -478,6 +478,7 @@ struct net_bridge {
struct rtable fake_rtable;
struct rt6_info fake_rt6_info;
};
+ u32 metrics[RTAX_MAX];
#endif
u16 group_fwd_mask;
u16 group_fwd_mask_required;
diff --git a/net/can/bcm.c b/net/can/bcm.c
index 3817692e83af..4fb5cfaf74f3 100644
--- a/net/can/bcm.c
+++ b/net/can/bcm.c
@@ -58,6 +58,7 @@
#include <linux/can/skb.h>
#include <linux/can/bcm.h>
#include <linux/slab.h>
+#include <linux/spinlock.h>
#include <net/sock.h>
#include <net/net_namespace.h>
@@ -120,6 +121,7 @@ struct bcm_op {
struct canfd_frame last_sframe;
struct sock *sk;
struct net_device *rx_reg_dev;
+ spinlock_t bcm_tx_lock; /* protect currframe/count in runtime updates */
};
struct bcm_sock {
@@ -205,7 +207,9 @@ static int bcm_proc_show(struct seq_file *m, void *v)
seq_printf(m, " / bound %s", bcm_proc_getifname(net, ifname, bo->ifindex));
seq_printf(m, " <<<\n");
- list_for_each_entry(op, &bo->rx_ops, list) {
+ rcu_read_lock();
+
+ list_for_each_entry_rcu(op, &bo->rx_ops, list) {
unsigned long reduction;
@@ -261,6 +265,9 @@ static int bcm_proc_show(struct seq_file *m, void *v)
seq_printf(m, "# sent %ld\n", op->frames_abs);
}
seq_putc(m, '\n');
+
+ rcu_read_unlock();
+
return 0;
}
#endif /* CONFIG_PROC_FS */
@@ -273,13 +280,18 @@ static void bcm_can_tx(struct bcm_op *op)
{
struct sk_buff *skb;
struct net_device *dev;
- struct canfd_frame *cf = op->frames + op->cfsiz * op->currframe;
+ struct canfd_frame *cf;
int err;
/* no target device? => exit */
if (!op->ifindex)
return;
+ /* read currframe under lock protection */
+ spin_lock_bh(&op->bcm_tx_lock);
+ cf = op->frames + op->cfsiz * op->currframe;
+ spin_unlock_bh(&op->bcm_tx_lock);
+
dev = dev_get_by_index(sock_net(op->sk), op->ifindex);
if (!dev) {
/* RFC: should this bcm_op remove itself here? */
@@ -300,6 +312,10 @@ static void bcm_can_tx(struct bcm_op *op)
skb->dev = dev;
can_skb_set_owner(skb, op->sk);
err = can_send(skb, 1);
+
+ /* update currframe and count under lock protection */
+ spin_lock_bh(&op->bcm_tx_lock);
+
if (!err)
op->frames_abs++;
@@ -308,6 +324,11 @@ static void bcm_can_tx(struct bcm_op *op)
/* reached last frame? */
if (op->currframe >= op->nframes)
op->currframe = 0;
+
+ if (op->count > 0)
+ op->count--;
+
+ spin_unlock_bh(&op->bcm_tx_lock);
out:
dev_put(dev);
}
@@ -404,7 +425,7 @@ static enum hrtimer_restart bcm_tx_timeout_handler(struct hrtimer *hrtimer)
struct bcm_msg_head msg_head;
if (op->kt_ival1 && (op->count > 0)) {
- op->count--;
+ bcm_can_tx(op);
if (!op->count && (op->flags & TX_COUNTEVT)) {
/* create notification to user */
@@ -419,7 +440,6 @@ static enum hrtimer_restart bcm_tx_timeout_handler(struct hrtimer *hrtimer)
bcm_send_to_user(op, &msg_head, NULL, 0);
}
- bcm_can_tx(op);
} else if (op->kt_ival2) {
bcm_can_tx(op);
@@ -801,7 +821,7 @@ static int bcm_delete_rx_op(struct list_head *ops, struct bcm_msg_head *mh,
REGMASK(op->can_id),
bcm_rx_handler, op);
- list_del(&op->list);
+ list_del_rcu(&op->list);
bcm_remove_op(op);
return 1; /* done */
}
@@ -821,7 +841,7 @@ static int bcm_delete_tx_op(struct list_head *ops, struct bcm_msg_head *mh,
list_for_each_entry_safe(op, n, ops, list) {
if ((op->can_id == mh->can_id) && (op->ifindex == ifindex) &&
(op->flags & CAN_FD_FRAME) == (mh->flags & CAN_FD_FRAME)) {
- list_del(&op->list);
+ list_del_rcu(&op->list);
bcm_remove_op(op);
return 1; /* done */
}
@@ -914,6 +934,27 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
}
op->flags = msg_head->flags;
+ /* only lock for unlikely count/nframes/currframe changes */
+ if (op->nframes != msg_head->nframes ||
+ op->flags & TX_RESET_MULTI_IDX ||
+ op->flags & SETTIMER) {
+
+ spin_lock_bh(&op->bcm_tx_lock);
+
+ if (op->nframes != msg_head->nframes ||
+ op->flags & TX_RESET_MULTI_IDX) {
+ /* potentially update changed nframes */
+ op->nframes = msg_head->nframes;
+ /* restart multiple frame transmission */
+ op->currframe = 0;
+ }
+
+ if (op->flags & SETTIMER)
+ op->count = msg_head->count;
+
+ spin_unlock_bh(&op->bcm_tx_lock);
+ }
+
} else {
/* insert new BCM operation for the given can_id */
@@ -921,9 +962,14 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
if (!op)
return -ENOMEM;
+ spin_lock_init(&op->bcm_tx_lock);
op->can_id = msg_head->can_id;
op->cfsiz = CFSIZ(msg_head->flags);
op->flags = msg_head->flags;
+ op->nframes = msg_head->nframes;
+
+ if (op->flags & SETTIMER)
+ op->count = msg_head->count;
/* create array for CAN frames and copy the data */
if (msg_head->nframes > 1) {
@@ -982,22 +1028,8 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
} /* if ((op = bcm_find_op(&bo->tx_ops, msg_head->can_id, ifindex))) */
- if (op->nframes != msg_head->nframes) {
- op->nframes = msg_head->nframes;
- /* start multiple frame transmission with index 0 */
- op->currframe = 0;
- }
-
- /* check flags */
-
- if (op->flags & TX_RESET_MULTI_IDX) {
- /* start multiple frame transmission with index 0 */
- op->currframe = 0;
- }
-
if (op->flags & SETTIMER) {
/* set timer values */
- op->count = msg_head->count;
op->ival1 = msg_head->ival1;
op->ival2 = msg_head->ival2;
op->kt_ival1 = bcm_timeval_to_ktime(msg_head->ival1);
@@ -1014,11 +1046,8 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
op->flags |= TX_ANNOUNCE;
}
- if (op->flags & TX_ANNOUNCE) {
+ if (op->flags & TX_ANNOUNCE)
bcm_can_tx(op);
- if (op->count)
- op->count--;
- }
if (op->flags & STARTTIMER)
bcm_tx_start_timer(op);
@@ -1234,7 +1263,7 @@ static int bcm_rx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
bcm_rx_handler, op, "bcm", sk);
if (err) {
/* this bcm rx op is broken -> remove it */
- list_del(&op->list);
+ list_del_rcu(&op->list);
bcm_remove_op(op);
return err;
}
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index a2fb951996b8..a2838c15aa9d 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -897,6 +897,10 @@ static ssize_t get_labels(const char __user *buffer, struct pktgen_dev *pkt_dev)
pkt_dev->nr_labels = 0;
do {
__u32 tmp;
+
+ if (n >= MAX_MPLS_LABELS)
+ return -E2BIG;
+
len = hex32_arg(&buffer[i], 8, &tmp);
if (len <= 0)
return len;
@@ -908,8 +912,6 @@ static ssize_t get_labels(const char __user *buffer, struct pktgen_dev *pkt_dev)
return -EFAULT;
i++;
n++;
- if (n >= MAX_MPLS_LABELS)
- return -E2BIG;
} while (c == ',');
pkt_dev->nr_labels = n;
@@ -1875,8 +1877,8 @@ static ssize_t pktgen_thread_write(struct file *file,
i = len;
/* Read variable name */
-
- len = strn_len(&user_buffer[i], sizeof(name) - 1);
+ max = min(sizeof(name) - 1, count - i);
+ len = strn_len(&user_buffer[i], max);
if (len < 0)
return len;
@@ -1906,7 +1908,8 @@ static ssize_t pktgen_thread_write(struct file *file,
if (!strcmp(name, "add_device")) {
char f[32];
memset(f, 0, 32);
- len = strn_len(&user_buffer[i], sizeof(f) - 1);
+ max = min(sizeof(f) - 1, count - i);
+ len = strn_len(&user_buffer[i], max);
if (len < 0) {
ret = len;
goto out;
diff --git a/net/core/scm.c b/net/core/scm.c
index a877c4ef4c25..cdd4e5befb14 100644
--- a/net/core/scm.c
+++ b/net/core/scm.c
@@ -36,6 +36,7 @@
#include <net/compat.h>
#include <net/scm.h>
#include <net/cls_cgroup.h>
+#include <net/af_unix.h>
/*
@@ -85,8 +86,15 @@ static int scm_fp_copy(struct cmsghdr *cmsg, struct scm_fp_list **fplp)
return -ENOMEM;
*fplp = fpl;
fpl->count = 0;
+ fpl->count_unix = 0;
fpl->max = SCM_MAX_FD;
fpl->user = NULL;
+#if IS_ENABLED(CONFIG_UNIX)
+ fpl->inflight = false;
+ fpl->dead = false;
+ fpl->edges = NULL;
+ INIT_LIST_HEAD(&fpl->vertices);
+#endif
}
fpp = &fpl->fp[fpl->count];
@@ -109,6 +117,9 @@ static int scm_fp_copy(struct cmsghdr *cmsg, struct scm_fp_list **fplp)
fput(file);
return -EINVAL;
}
+ if (unix_get_socket(file))
+ fpl->count_unix++;
+
*fpp++ = file;
fpl->count++;
}
@@ -367,8 +378,14 @@ struct scm_fp_list *scm_fp_dup(struct scm_fp_list *fpl)
if (new_fpl) {
for (i = 0; i < fpl->count; i++)
get_file(fpl->fp[i]);
+
new_fpl->max = new_fpl->count;
new_fpl->user = get_uid(fpl->user);
+#if IS_ENABLED(CONFIG_UNIX)
+ new_fpl->inflight = false;
+ new_fpl->edges = NULL;
+ INIT_LIST_HEAD(&new_fpl->vertices);
+#endif
}
return new_fpl;
}
diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c
index 419969b26822..8f5417ff355d 100644
--- a/net/ipv4/esp4.c
+++ b/net/ipv4/esp4.c
@@ -118,47 +118,16 @@ static void esp_ssg_unref(struct xfrm_state *x, void *tmp)
}
#ifdef CONFIG_INET_ESPINTCP
-struct esp_tcp_sk {
- struct sock *sk;
- struct rcu_head rcu;
-};
-
-static void esp_free_tcp_sk(struct rcu_head *head)
-{
- struct esp_tcp_sk *esk = container_of(head, struct esp_tcp_sk, rcu);
-
- sock_put(esk->sk);
- kfree(esk);
-}
-
static struct sock *esp_find_tcp_sk(struct xfrm_state *x)
{
struct xfrm_encap_tmpl *encap = x->encap;
struct net *net = xs_net(x);
- struct esp_tcp_sk *esk;
__be16 sport, dport;
- struct sock *nsk;
struct sock *sk;
- sk = rcu_dereference(x->encap_sk);
- if (sk && sk->sk_state == TCP_ESTABLISHED)
- return sk;
-
spin_lock_bh(&x->lock);
sport = encap->encap_sport;
dport = encap->encap_dport;
- nsk = rcu_dereference_protected(x->encap_sk,
- lockdep_is_held(&x->lock));
- if (sk && sk == nsk) {
- esk = kmalloc(sizeof(*esk), GFP_ATOMIC);
- if (!esk) {
- spin_unlock_bh(&x->lock);
- return ERR_PTR(-ENOMEM);
- }
- RCU_INIT_POINTER(x->encap_sk, NULL);
- esk->sk = sk;
- call_rcu(&esk->rcu, esp_free_tcp_sk);
- }
spin_unlock_bh(&x->lock);
sk = inet_lookup_established(net, net->ipv4.tcp_death_row.hashinfo, x->id.daddr.a4,
@@ -171,20 +140,6 @@ static struct sock *esp_find_tcp_sk(struct xfrm_state *x)
return ERR_PTR(-EINVAL);
}
- spin_lock_bh(&x->lock);
- nsk = rcu_dereference_protected(x->encap_sk,
- lockdep_is_held(&x->lock));
- if (encap->encap_sport != sport ||
- encap->encap_dport != dport) {
- sock_put(sk);
- sk = nsk ?: ERR_PTR(-EREMCHG);
- } else if (sk == nsk) {
- sock_put(sk);
- } else {
- rcu_assign_pointer(x->encap_sk, sk);
- }
- spin_unlock_bh(&x->lock);
-
return sk;
}
@@ -207,6 +162,8 @@ static int esp_output_tcp_finish(struct xfrm_state *x, struct sk_buff *skb)
err = espintcp_push_skb(sk, skb);
bh_unlock_sock(sk);
+ sock_put(sk);
+
out:
rcu_read_unlock();
return err;
@@ -391,6 +348,8 @@ static struct ip_esp_hdr *esp_output_tcp_encap(struct xfrm_state *x,
if (IS_ERR(sk))
return ERR_CAST(sk);
+ sock_put(sk);
+
*lenp = htons(len);
esph = (struct ip_esp_hdr *)(lenp + 1);
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
index 90ce87ffed46..7993ff46de23 100644
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -829,19 +829,33 @@ static int rtm_to_fib_config(struct net *net, struct sk_buff *skb,
}
}
+ if (cfg->fc_dst_len > 32) {
+ NL_SET_ERR_MSG(extack, "Invalid prefix length");
+ err = -EINVAL;
+ goto errout;
+ }
+
+ if (cfg->fc_dst_len < 32 && (ntohl(cfg->fc_dst) << cfg->fc_dst_len)) {
+ NL_SET_ERR_MSG(extack, "Invalid prefix for given prefix length");
+ err = -EINVAL;
+ goto errout;
+ }
+
if (cfg->fc_nh_id) {
if (cfg->fc_oif || cfg->fc_gw_family ||
cfg->fc_encap || cfg->fc_mp) {
NL_SET_ERR_MSG(extack,
"Nexthop specification and nexthop id are mutually exclusive");
- return -EINVAL;
+ err = -EINVAL;
+ goto errout;
}
}
if (has_gw && has_via) {
NL_SET_ERR_MSG(extack,
"Nexthop configuration can not contain both GATEWAY and VIA");
- return -EINVAL;
+ err = -EINVAL;
+ goto errout;
}
if (!cfg->fc_table)
diff --git a/net/ipv4/fib_rules.c b/net/ipv4/fib_rules.c
index 513f475c6a53..298a9944a3d1 100644
--- a/net/ipv4/fib_rules.c
+++ b/net/ipv4/fib_rules.c
@@ -222,9 +222,9 @@ static int fib4_rule_configure(struct fib_rule *rule, struct sk_buff *skb,
struct nlattr **tb,
struct netlink_ext_ack *extack)
{
- struct net *net = sock_net(skb->sk);
+ struct fib4_rule *rule4 = (struct fib4_rule *)rule;
+ struct net *net = rule->fr_net;
int err = -EINVAL;
- struct fib4_rule *rule4 = (struct fib4_rule *) rule;
if (!inet_validate_dscp(frh->tos)) {
NL_SET_ERR_MSG(extack,
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
index 77b97c48da5e..fa54b36b241a 100644
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -1192,22 +1192,6 @@ static int fib_insert_alias(struct trie *t, struct key_vector *tp,
return 0;
}
-static bool fib_valid_key_len(u32 key, u8 plen, struct netlink_ext_ack *extack)
-{
- if (plen > KEYLENGTH) {
- NL_SET_ERR_MSG(extack, "Invalid prefix length");
- return false;
- }
-
- if ((plen < KEYLENGTH) && (key << plen)) {
- NL_SET_ERR_MSG(extack,
- "Invalid prefix for given prefix length");
- return false;
- }
-
- return true;
-}
-
static void fib_remove_alias(struct trie *t, struct key_vector *tp,
struct key_vector *l, struct fib_alias *old);
@@ -1228,9 +1212,6 @@ int fib_table_insert(struct net *net, struct fib_table *tb,
key = ntohl(cfg->fc_dst);
- if (!fib_valid_key_len(key, plen, extack))
- return -EINVAL;
-
pr_debug("Insert table=%u %08x/%d\n", tb->tb_id, key, plen);
fi = fib_create_info(cfg, extack);
@@ -1723,9 +1704,6 @@ int fib_table_delete(struct net *net, struct fib_table *tb,
key = ntohl(cfg->fc_dst);
- if (!fib_valid_key_len(key, plen, extack))
- return -EINVAL;
-
l = fib_find_node(t, &tp, key);
if (!l)
return -ESRCH;
diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c
index 321f509f2347..5e7cdcebd64f 100644
--- a/net/ipv4/inet_hashtables.c
+++ b/net/ipv4/inet_hashtables.c
@@ -1218,22 +1218,37 @@ int inet_ehash_locks_alloc(struct inet_hashinfo *hashinfo)
{
unsigned int locksz = sizeof(spinlock_t);
unsigned int i, nblocks = 1;
+ spinlock_t *ptr = NULL;
- if (locksz != 0) {
- /* allocate 2 cache lines or at least one spinlock per cpu */
- nblocks = max(2U * L1_CACHE_BYTES / locksz, 1U);
- nblocks = roundup_pow_of_two(nblocks * num_possible_cpus());
+ if (locksz == 0)
+ goto set_mask;
- /* no more locks than number of hash buckets */
- nblocks = min(nblocks, hashinfo->ehash_mask + 1);
+ /* Allocate 2 cache lines or at least one spinlock per cpu. */
+ nblocks = max(2U * L1_CACHE_BYTES / locksz, 1U) * num_possible_cpus();
- hashinfo->ehash_locks = kvmalloc_array(nblocks, locksz, GFP_KERNEL);
- if (!hashinfo->ehash_locks)
- return -ENOMEM;
+ /* At least one page per NUMA node. */
+ nblocks = max(nblocks, num_online_nodes() * PAGE_SIZE / locksz);
+
+ nblocks = roundup_pow_of_two(nblocks);
+
+ /* No more locks than number of hash buckets. */
+ nblocks = min(nblocks, hashinfo->ehash_mask + 1);
- for (i = 0; i < nblocks; i++)
- spin_lock_init(&hashinfo->ehash_locks[i]);
+ if (num_online_nodes() > 1) {
+ /* Use vmalloc() to allow NUMA policy to spread pages
+ * on all available nodes if desired.
+ */
+ ptr = vmalloc_array(nblocks, locksz);
+ }
+ if (!ptr) {
+ ptr = kvmalloc_array(nblocks, locksz, GFP_KERNEL);
+ if (!ptr)
+ return -ENOMEM;
}
+ for (i = 0; i < nblocks; i++)
+ spin_lock_init(&ptr[i]);
+ hashinfo->ehash_locks = ptr;
+set_mask:
hashinfo->ehash_locks_mask = nblocks - 1;
return 0;
}
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 3b81f6df829f..db1a99df29d5 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -404,6 +404,20 @@ static bool tcp_ecn_rcv_ecn_echo(const struct tcp_sock *tp, const struct tcphdr
return false;
}
+static void tcp_count_delivered_ce(struct tcp_sock *tp, u32 ecn_count)
+{
+ tp->delivered_ce += ecn_count;
+}
+
+/* Updates the delivered and delivered_ce counts */
+static void tcp_count_delivered(struct tcp_sock *tp, u32 delivered,
+ bool ece_ack)
+{
+ tp->delivered += delivered;
+ if (ece_ack)
+ tcp_count_delivered_ce(tp, delivered);
+}
+
/* Buffer size and advertised window tuning.
*
* 1. Tuning sk->sk_sndbuf, when connection enters established state.
@@ -1119,15 +1133,6 @@ void tcp_mark_skb_lost(struct sock *sk, struct sk_buff *skb)
}
}
-/* Updates the delivered and delivered_ce counts */
-static void tcp_count_delivered(struct tcp_sock *tp, u32 delivered,
- bool ece_ack)
-{
- tp->delivered += delivered;
- if (ece_ack)
- tp->delivered_ce += delivered;
-}
-
/* This procedure tags the retransmission queue when SACKs arrive.
*
* We have three tag bits: SACKED(S), RETRANS(R) and LOST(L).
@@ -3783,12 +3788,23 @@ static void tcp_process_tlp_ack(struct sock *sk, u32 ack, int flag)
}
}
-static inline void tcp_in_ack_event(struct sock *sk, u32 flags)
+static void tcp_in_ack_event(struct sock *sk, int flag)
{
const struct inet_connection_sock *icsk = inet_csk(sk);
- if (icsk->icsk_ca_ops->in_ack_event)
- icsk->icsk_ca_ops->in_ack_event(sk, flags);
+ if (icsk->icsk_ca_ops->in_ack_event) {
+ u32 ack_ev_flags = 0;
+
+ if (flag & FLAG_WIN_UPDATE)
+ ack_ev_flags |= CA_ACK_WIN_UPDATE;
+ if (flag & FLAG_SLOWPATH) {
+ ack_ev_flags |= CA_ACK_SLOWPATH;
+ if (flag & FLAG_ECE)
+ ack_ev_flags |= CA_ACK_ECE;
+ }
+
+ icsk->icsk_ca_ops->in_ack_event(sk, ack_ev_flags);
+ }
}
/* Congestion control has updated the cwnd already. So if we're in
@@ -3905,12 +3921,8 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag)
tcp_snd_una_update(tp, ack);
flag |= FLAG_WIN_UPDATE;
- tcp_in_ack_event(sk, CA_ACK_WIN_UPDATE);
-
NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPHPACKS);
} else {
- u32 ack_ev_flags = CA_ACK_SLOWPATH;
-
if (ack_seq != TCP_SKB_CB(skb)->end_seq)
flag |= FLAG_DATA;
else
@@ -3922,19 +3934,12 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag)
flag |= tcp_sacktag_write_queue(sk, skb, prior_snd_una,
&sack_state);
- if (tcp_ecn_rcv_ecn_echo(tp, tcp_hdr(skb))) {
+ if (tcp_ecn_rcv_ecn_echo(tp, tcp_hdr(skb)))
flag |= FLAG_ECE;
- ack_ev_flags |= CA_ACK_ECE;
- }
if (sack_state.sack_delivered)
tcp_count_delivered(tp, sack_state.sack_delivered,
flag & FLAG_ECE);
-
- if (flag & FLAG_WIN_UPDATE)
- ack_ev_flags |= CA_ACK_WIN_UPDATE;
-
- tcp_in_ack_event(sk, ack_ev_flags);
}
/* This is a deviation from RFC3168 since it states that:
@@ -3961,6 +3966,8 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag)
tcp_rack_update_reo_wnd(sk, &rs);
+ tcp_in_ack_event(sk, flag);
+
if (tp->tlp_high_seq)
tcp_process_tlp_ack(sk, ack, flag);
@@ -3992,6 +3999,7 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag)
return 1;
no_queue:
+ tcp_in_ack_event(sk, flag);
/* If data was DSACKed, see if we can undo a cwnd reduction. */
if (flag & FLAG_DSACKING_ACK) {
tcp_fastretrans_alert(sk, prior_snd_una, num_dupack, &flag,
diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c
index a021c88d3d9b..085a83b807af 100644
--- a/net/ipv6/esp6.c
+++ b/net/ipv6/esp6.c
@@ -135,47 +135,16 @@ static void esp_ssg_unref(struct xfrm_state *x, void *tmp)
}
#ifdef CONFIG_INET6_ESPINTCP
-struct esp_tcp_sk {
- struct sock *sk;
- struct rcu_head rcu;
-};
-
-static void esp_free_tcp_sk(struct rcu_head *head)
-{
- struct esp_tcp_sk *esk = container_of(head, struct esp_tcp_sk, rcu);
-
- sock_put(esk->sk);
- kfree(esk);
-}
-
static struct sock *esp6_find_tcp_sk(struct xfrm_state *x)
{
struct xfrm_encap_tmpl *encap = x->encap;
struct net *net = xs_net(x);
- struct esp_tcp_sk *esk;
__be16 sport, dport;
- struct sock *nsk;
struct sock *sk;
- sk = rcu_dereference(x->encap_sk);
- if (sk && sk->sk_state == TCP_ESTABLISHED)
- return sk;
-
spin_lock_bh(&x->lock);
sport = encap->encap_sport;
dport = encap->encap_dport;
- nsk = rcu_dereference_protected(x->encap_sk,
- lockdep_is_held(&x->lock));
- if (sk && sk == nsk) {
- esk = kmalloc(sizeof(*esk), GFP_ATOMIC);
- if (!esk) {
- spin_unlock_bh(&x->lock);
- return ERR_PTR(-ENOMEM);
- }
- RCU_INIT_POINTER(x->encap_sk, NULL);
- esk->sk = sk;
- call_rcu(&esk->rcu, esp_free_tcp_sk);
- }
spin_unlock_bh(&x->lock);
sk = __inet6_lookup_established(net, net->ipv4.tcp_death_row.hashinfo, &x->id.daddr.in6,
@@ -188,20 +157,6 @@ static struct sock *esp6_find_tcp_sk(struct xfrm_state *x)
return ERR_PTR(-EINVAL);
}
- spin_lock_bh(&x->lock);
- nsk = rcu_dereference_protected(x->encap_sk,
- lockdep_is_held(&x->lock));
- if (encap->encap_sport != sport ||
- encap->encap_dport != dport) {
- sock_put(sk);
- sk = nsk ?: ERR_PTR(-EREMCHG);
- } else if (sk == nsk) {
- sock_put(sk);
- } else {
- rcu_assign_pointer(x->encap_sk, sk);
- }
- spin_unlock_bh(&x->lock);
-
return sk;
}
@@ -224,6 +179,8 @@ static int esp_output_tcp_finish(struct xfrm_state *x, struct sk_buff *skb)
err = espintcp_push_skb(sk, skb);
bh_unlock_sock(sk);
+ sock_put(sk);
+
out:
rcu_read_unlock();
return err;
@@ -427,6 +384,8 @@ static struct ip_esp_hdr *esp6_output_tcp_encap(struct xfrm_state *x,
if (IS_ERR(sk))
return ERR_CAST(sk);
+ sock_put(sk);
+
*lenp = htons(len);
esph = (struct ip_esp_hdr *)(lenp + 1);
diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c
index 6eeab21512ba..e0f0c5f8cccd 100644
--- a/net/ipv6/fib6_rules.c
+++ b/net/ipv6/fib6_rules.c
@@ -350,9 +350,9 @@ static int fib6_rule_configure(struct fib_rule *rule, struct sk_buff *skb,
struct nlattr **tb,
struct netlink_ext_ack *extack)
{
+ struct fib6_rule *rule6 = (struct fib6_rule *)rule;
+ struct net *net = rule->fr_net;
int err = -EINVAL;
- struct net *net = sock_net(skb->sk);
- struct fib6_rule *rule6 = (struct fib6_rule *) rule;
if (!inet_validate_dscp(frh->tos)) {
NL_SET_ERR_MSG(extack,
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index f7a225da8525..cfc276e5a249 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -1450,6 +1450,7 @@ static int ip6_setup_cork(struct sock *sk, struct inet_cork_full *cork,
}
v6_cork->hop_limit = ipc6->hlimit;
v6_cork->tclass = ipc6->tclass;
+ v6_cork->dontfrag = ipc6->dontfrag;
if (rt->dst.flags & DST_XFRM_TUNNEL)
mtu = np->pmtudisc >= IPV6_PMTUDISC_PROBE ?
READ_ONCE(rt->dst.dev->mtu) : dst_mtu(&rt->dst);
@@ -1483,7 +1484,7 @@ static int __ip6_append_data(struct sock *sk,
int getfrag(void *from, char *to, int offset,
int len, int odd, struct sk_buff *skb),
void *from, size_t length, int transhdrlen,
- unsigned int flags, struct ipcm6_cookie *ipc6)
+ unsigned int flags)
{
struct sk_buff *skb, *skb_prev = NULL;
struct inet_cork *cork = &cork_full->base;
@@ -1539,7 +1540,7 @@ static int __ip6_append_data(struct sock *sk,
if (headersize + transhdrlen > mtu)
goto emsgsize;
- if (cork->length + length > mtu - headersize && ipc6->dontfrag &&
+ if (cork->length + length > mtu - headersize && v6_cork->dontfrag &&
(sk->sk_protocol == IPPROTO_UDP ||
sk->sk_protocol == IPPROTO_ICMPV6 ||
sk->sk_protocol == IPPROTO_RAW)) {
@@ -1884,7 +1885,7 @@ int ip6_append_data(struct sock *sk,
return __ip6_append_data(sk, &sk->sk_write_queue, &inet->cork,
&np->cork, sk_page_frag(sk), getfrag,
- from, length, transhdrlen, flags, ipc6);
+ from, length, transhdrlen, flags);
}
EXPORT_SYMBOL_GPL(ip6_append_data);
@@ -2089,7 +2090,7 @@ struct sk_buff *ip6_make_skb(struct sock *sk,
err = __ip6_append_data(sk, &queue, cork, &v6_cork,
¤t->task_frag, getfrag, from,
length + exthdrlen, transhdrlen + exthdrlen,
- flags, ipc6);
+ flags);
if (err) {
__ip6_flush_pending_frames(sk, &queue, cork, &v6_cork);
return ERR_PTR(err);
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c
index 447031c5eac4..39c7d62c933f 100644
--- a/net/llc/af_llc.c
+++ b/net/llc/af_llc.c
@@ -888,15 +888,15 @@ static int llc_ui_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
if (sk->sk_type != SOCK_STREAM)
goto copy_uaddr;
+ /* Partial read */
+ if (used + offset < skb_len)
+ continue;
+
if (!(flags & MSG_PEEK)) {
skb_unlink(skb, &sk->sk_receive_queue);
kfree_skb(skb);
*seq = 0;
}
-
- /* Partial read */
- if (used + offset < skb_len)
- continue;
} while (len > 0);
out:
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 9a5530ca2f6b..b300972c3150 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -2896,7 +2896,8 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
if (tx)
ieee80211_flush_queues(local, sdata, false);
- drv_mgd_complete_tx(sdata->local, sdata, &info);
+ if (tx || frame_buf)
+ drv_mgd_complete_tx(sdata->local, sdata, &info);
/* clear AP addr only after building the needed mgmt frames */
eth_zero_addr(sdata->deflink.u.mgd.bssid);
@@ -7311,7 +7312,6 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
ieee80211_report_disconnect(sdata, frame_buf,
sizeof(frame_buf), true,
req->reason_code, false);
- drv_mgd_complete_tx(sdata->local, sdata, &info);
return 0;
}
diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c
index 52245dbfae31..c333132e2079 100644
--- a/net/netfilter/nf_conntrack_standalone.c
+++ b/net/netfilter/nf_conntrack_standalone.c
@@ -631,7 +631,9 @@ static struct ctl_table nf_ct_sysctl_table[] = {
.data = &nf_conntrack_max,
.maxlen = sizeof(int),
.mode = 0644,
- .proc_handler = proc_dointvec,
+ .proc_handler = proc_dointvec_minmax,
+ .extra1 = SYSCTL_ZERO,
+ .extra2 = SYSCTL_INT_MAX,
},
[NF_SYSCTL_CT_COUNT] = {
.procname = "nf_conntrack_count",
@@ -667,7 +669,9 @@ static struct ctl_table nf_ct_sysctl_table[] = {
.data = &nf_ct_expect_max,
.maxlen = sizeof(int),
.mode = 0644,
- .proc_handler = proc_dointvec,
+ .proc_handler = proc_dointvec_minmax,
+ .extra1 = SYSCTL_ONE,
+ .extra2 = SYSCTL_INT_MAX,
},
[NF_SYSCTL_CT_ACCT] = {
.procname = "nf_conntrack_acct",
@@ -970,7 +974,9 @@ static struct ctl_table nf_ct_netfilter_table[] = {
.data = &nf_conntrack_max,
.maxlen = sizeof(int),
.mode = 0644,
- .proc_handler = proc_dointvec,
+ .proc_handler = proc_dointvec_minmax,
+ .extra1 = SYSCTL_ZERO,
+ .extra2 = SYSCTL_INT_MAX,
},
{ }
};
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c
index fc1370c29373..61b91de8065f 100644
--- a/net/sched/sch_hfsc.c
+++ b/net/sched/sch_hfsc.c
@@ -176,6 +176,11 @@ struct hfsc_sched {
#define HT_INFINITY 0xffffffffffffffffULL /* infinite time value */
+static bool cl_in_el_or_vttree(struct hfsc_class *cl)
+{
+ return ((cl->cl_flags & HFSC_FSC) && cl->cl_nactive) ||
+ ((cl->cl_flags & HFSC_RSC) && !RB_EMPTY_NODE(&cl->el_node));
+}
/*
* eligible tree holds backlogged classes being sorted by their eligible times.
@@ -1041,6 +1046,8 @@ hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid,
if (cl == NULL)
return -ENOBUFS;
+ RB_CLEAR_NODE(&cl->el_node);
+
err = tcf_block_get(&cl->block, &cl->filter_list, sch, extack);
if (err) {
kfree(cl);
@@ -1568,7 +1575,10 @@ hfsc_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free)
return err;
}
- if (first && !cl->cl_nactive) {
+ sch->qstats.backlog += len;
+ sch->q.qlen++;
+
+ if (first && !cl_in_el_or_vttree(cl)) {
if (cl->cl_flags & HFSC_RSC)
init_ed(cl, len);
if (cl->cl_flags & HFSC_FSC)
@@ -1583,9 +1593,6 @@ hfsc_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free)
}
- sch->qstats.backlog += len;
- sch->q.qlen++;
-
return NET_XMIT_SUCCESS;
}
diff --git a/net/smc/smc_pnet.c b/net/smc/smc_pnet.c
index 399314cfab90..af12e0215274 100644
--- a/net/smc/smc_pnet.c
+++ b/net/smc/smc_pnet.c
@@ -1080,14 +1080,16 @@ static void smc_pnet_find_roce_by_pnetid(struct net_device *ndev,
struct smc_init_info *ini)
{
u8 ndev_pnetid[SMC_MAX_PNETID_LEN];
+ struct net_device *base_ndev;
struct net *net;
- ndev = pnet_find_base_ndev(ndev);
+ base_ndev = pnet_find_base_ndev(ndev);
net = dev_net(ndev);
- if (smc_pnetid_by_dev_port(ndev->dev.parent, ndev->dev_port,
+ if (smc_pnetid_by_dev_port(base_ndev->dev.parent, base_ndev->dev_port,
ndev_pnetid) &&
+ smc_pnet_find_ndev_pnetid_by_table(base_ndev, ndev_pnetid) &&
smc_pnet_find_ndev_pnetid_by_table(ndev, ndev_pnetid)) {
- smc_pnet_find_rdma_dev(ndev, ini);
+ smc_pnet_find_rdma_dev(base_ndev, ini);
return; /* pnetid could not be determined */
}
_smc_pnet_find_roce_by_pnetid(ndev_pnetid, ini, NULL, net);
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index b6529a9d37d3..a390a4e5592f 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -275,9 +275,6 @@ static struct rpc_xprt *rpc_clnt_set_transport(struct rpc_clnt *clnt,
old = rcu_dereference_protected(clnt->cl_xprt,
lockdep_is_held(&clnt->cl_lock));
- if (!xprt_bound(xprt))
- clnt->cl_autobind = 1;
-
clnt->cl_timeout = timeout;
rcu_assign_pointer(clnt->cl_xprt, xprt);
spin_unlock(&clnt->cl_lock);
diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c
index 82afb56695f8..1ec20163a0b7 100644
--- a/net/sunrpc/rpcb_clnt.c
+++ b/net/sunrpc/rpcb_clnt.c
@@ -797,9 +797,10 @@ static void rpcb_getport_done(struct rpc_task *child, void *data)
}
trace_rpcb_setport(child, map->r_status, map->r_port);
- xprt->ops->set_port(xprt, map->r_port);
- if (map->r_port)
+ if (map->r_port) {
+ xprt->ops->set_port(xprt, map->r_port);
xprt_set_bound(xprt);
+ }
}
/*
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c
index 9b45fbdc90ca..73bc39281ef5 100644
--- a/net/sunrpc/sched.c
+++ b/net/sunrpc/sched.c
@@ -276,6 +276,8 @@ EXPORT_SYMBOL_GPL(rpc_destroy_wait_queue);
static int rpc_wait_bit_killable(struct wait_bit_key *key, int mode)
{
+ if (unlikely(current->flags & PF_EXITING))
+ return -EINTR;
schedule();
if (signal_pending_state(mode, current))
return -ERESTARTSYS;
diff --git a/net/tipc/crypto.c b/net/tipc/crypto.c
index 25c18f8783ce..a9c02fac039b 100644
--- a/net/tipc/crypto.c
+++ b/net/tipc/crypto.c
@@ -817,12 +817,16 @@ static int tipc_aead_encrypt(struct tipc_aead *aead, struct sk_buff *skb,
goto exit;
}
+ /* Get net to avoid freed tipc_crypto when delete namespace */
+ get_net(aead->crypto->net);
+
/* Now, do encrypt */
rc = crypto_aead_encrypt(req);
if (rc == -EINPROGRESS || rc == -EBUSY)
return rc;
tipc_bearer_put(b);
+ put_net(aead->crypto->net);
exit:
kfree(ctx);
@@ -860,6 +864,7 @@ static void tipc_aead_encrypt_done(struct crypto_async_request *base, int err)
kfree(tx_ctx);
tipc_bearer_put(b);
tipc_aead_put(aead);
+ put_net(net);
}
/**
diff --git a/net/unix/Kconfig b/net/unix/Kconfig
index b7f811216820..8b5d04210d7c 100644
--- a/net/unix/Kconfig
+++ b/net/unix/Kconfig
@@ -4,7 +4,7 @@
#
config UNIX
- tristate "Unix domain sockets"
+ bool "Unix domain sockets"
help
If you say Y here, you will include support for Unix domain sockets;
sockets are the standard Unix mechanism for establishing and
@@ -14,17 +14,8 @@ config UNIX
an embedded system or something similar, you therefore definitely
want to say Y here.
- To compile this driver as a module, choose M here: the module will be
- called unix. Note that several important services won't work
- correctly if you say M here and then neglect to load the module.
-
Say Y unless you know what you are doing.
-config UNIX_SCM
- bool
- depends on UNIX
- default y
-
config AF_UNIX_OOB
bool
depends on UNIX
diff --git a/net/unix/Makefile b/net/unix/Makefile
index 20491825b4d0..4ddd125c4642 100644
--- a/net/unix/Makefile
+++ b/net/unix/Makefile
@@ -11,5 +11,3 @@ unix-$(CONFIG_BPF_SYSCALL) += unix_bpf.o
obj-$(CONFIG_UNIX_DIAG) += unix_diag.o
unix_diag-y := diag.o
-
-obj-$(CONFIG_UNIX_SCM) += scm.o
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 5ce60087086c..79b783a70c87 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -116,8 +116,6 @@
#include <linux/file.h>
#include <linux/btf_ids.h>
-#include "scm.h"
-
static atomic_long_t unix_nr_socks;
static struct hlist_head bsd_socket_buckets[UNIX_HASH_SIZE / 2];
static spinlock_t bsd_socket_locks[UNIX_HASH_SIZE / 2];
@@ -956,11 +954,11 @@ static struct sock *unix_create1(struct net *net, struct socket *sock, int kern,
sk->sk_max_ack_backlog = READ_ONCE(net->unx.sysctl_max_dgram_qlen);
sk->sk_destruct = unix_sock_destructor;
u = unix_sk(sk);
- u->inflight = 0;
+ u->listener = NULL;
+ u->vertex = NULL;
u->path.dentry = NULL;
u->path.mnt = NULL;
spin_lock_init(&u->lock);
- INIT_LIST_HEAD(&u->link);
mutex_init(&u->iolock); /* single task reading lock */
mutex_init(&u->bindlock); /* single task binding lock */
init_waitqueue_head(&u->peer_wait);
@@ -1559,6 +1557,7 @@ static int unix_stream_connect(struct socket *sock, struct sockaddr *uaddr,
newsk->sk_type = sk->sk_type;
init_peercred(newsk);
newu = unix_sk(newsk);
+ newu->listener = other;
RCU_INIT_POINTER(newsk->sk_wq, &newu->peer_wq);
otheru = unix_sk(other);
@@ -1652,8 +1651,8 @@ static int unix_accept(struct socket *sock, struct socket *newsock, int flags,
bool kern)
{
struct sock *sk = sock->sk;
- struct sock *tsk;
struct sk_buff *skb;
+ struct sock *tsk;
int err;
err = -EOPNOTSUPP;
@@ -1683,6 +1682,7 @@ static int unix_accept(struct socket *sock, struct socket *newsock, int flags,
/* attach accepted sock to socket */
unix_state_lock(tsk);
+ unix_update_edges(unix_sk(tsk));
newsock->state = SS_CONNECTED;
unix_sock_inherit_flags(sock, newsock);
sock_graft(tsk, newsock);
@@ -1726,51 +1726,65 @@ static int unix_getname(struct socket *sock, struct sockaddr *uaddr, int peer)
return err;
}
+/* The "user->unix_inflight" variable is protected by the garbage
+ * collection lock, and we just read it locklessly here. If you go
+ * over the limit, there might be a tiny race in actually noticing
+ * it across threads. Tough.
+ */
+static inline bool too_many_unix_fds(struct task_struct *p)
+{
+ struct user_struct *user = current_user();
+
+ if (unlikely(READ_ONCE(user->unix_inflight) > task_rlimit(p, RLIMIT_NOFILE)))
+ return !capable(CAP_SYS_RESOURCE) && !capable(CAP_SYS_ADMIN);
+ return false;
+}
+
+static int unix_attach_fds(struct scm_cookie *scm, struct sk_buff *skb)
+{
+ if (too_many_unix_fds(current))
+ return -ETOOMANYREFS;
+
+ /* Need to duplicate file references for the sake of garbage
+ * collection. Otherwise a socket in the fps might become a
+ * candidate for GC while the skb is not yet queued.
+ */
+ UNIXCB(skb).fp = scm_fp_dup(scm->fp);
+ if (!UNIXCB(skb).fp)
+ return -ENOMEM;
+
+ if (unix_prepare_fpl(UNIXCB(skb).fp))
+ return -ENOMEM;
+
+ return 0;
+}
+
+static void unix_detach_fds(struct scm_cookie *scm, struct sk_buff *skb)
+{
+ scm->fp = UNIXCB(skb).fp;
+ UNIXCB(skb).fp = NULL;
+
+ unix_destroy_fpl(scm->fp);
+}
+
static void unix_peek_fds(struct scm_cookie *scm, struct sk_buff *skb)
{
scm->fp = scm_fp_dup(UNIXCB(skb).fp);
+}
- /*
- * Garbage collection of unix sockets starts by selecting a set of
- * candidate sockets which have reference only from being in flight
- * (total_refs == inflight_refs). This condition is checked once during
- * the candidate collection phase, and candidates are marked as such, so
- * that non-candidates can later be ignored. While inflight_refs is
- * protected by unix_gc_lock, total_refs (file count) is not, hence this
- * is an instantaneous decision.
- *
- * Once a candidate, however, the socket must not be reinstalled into a
- * file descriptor while the garbage collection is in progress.
- *
- * If the above conditions are met, then the directed graph of
- * candidates (*) does not change while unix_gc_lock is held.
- *
- * Any operations that changes the file count through file descriptors
- * (dup, close, sendmsg) does not change the graph since candidates are
- * not installed in fds.
- *
- * Dequeing a candidate via recvmsg would install it into an fd, but
- * that takes unix_gc_lock to decrement the inflight count, so it's
- * serialized with garbage collection.
- *
- * MSG_PEEK is special in that it does not change the inflight count,
- * yet does install the socket into an fd. The following lock/unlock
- * pair is to ensure serialization with garbage collection. It must be
- * done between incrementing the file count and installing the file into
- * an fd.
- *
- * If garbage collection starts after the barrier provided by the
- * lock/unlock, then it will see the elevated refcount and not mark this
- * as a candidate. If a garbage collection is already in progress
- * before the file count was incremented, then the lock/unlock pair will
- * ensure that garbage collection is finished before progressing to
- * installing the fd.
- *
- * (*) A -> B where B is on the queue of A or B is on the queue of C
- * which is on the queue of listening socket A.
- */
- spin_lock(&unix_gc_lock);
- spin_unlock(&unix_gc_lock);
+static void unix_destruct_scm(struct sk_buff *skb)
+{
+ struct scm_cookie scm;
+
+ memset(&scm, 0, sizeof(scm));
+ scm.pid = UNIXCB(skb).pid;
+ if (UNIXCB(skb).fp)
+ unix_detach_fds(&scm, skb);
+
+ /* Alas, it calls VFS */
+ /* So fscking what? fput() had been SMP-safe since the last Summer */
+ scm_destroy(&scm);
+ sock_wfree(skb);
}
static int unix_scm_to_skb(struct scm_cookie *scm, struct sk_buff *skb, bool send_fds)
@@ -1845,8 +1859,10 @@ static void scm_stat_add(struct sock *sk, struct sk_buff *skb)
struct scm_fp_list *fp = UNIXCB(skb).fp;
struct unix_sock *u = unix_sk(sk);
- if (unlikely(fp && fp->count))
+ if (unlikely(fp && fp->count)) {
atomic_add(fp->count, &u->scm_stat.nr_fds);
+ unix_add_edges(fp, u);
+ }
}
static void scm_stat_del(struct sock *sk, struct sk_buff *skb)
@@ -1854,8 +1870,10 @@ static void scm_stat_del(struct sock *sk, struct sk_buff *skb)
struct scm_fp_list *fp = UNIXCB(skb).fp;
struct unix_sock *u = unix_sk(sk);
- if (unlikely(fp && fp->count))
+ if (unlikely(fp && fp->count)) {
atomic_sub(fp->count, &u->scm_stat.nr_fds);
+ unix_del_edges(fp);
+ }
}
/*
@@ -1875,11 +1893,12 @@ static int unix_dgram_sendmsg(struct socket *sock, struct msghdr *msg,
long timeo;
int err;
- wait_for_unix_gc();
err = scm_send(sock, msg, &scm, false);
if (err < 0)
return err;
+ wait_for_unix_gc(scm.fp);
+
err = -EOPNOTSUPP;
if (msg->msg_flags&MSG_OOB)
goto out;
@@ -2145,11 +2164,12 @@ static int unix_stream_sendmsg(struct socket *sock, struct msghdr *msg,
bool fds_sent = false;
int data_len;
- wait_for_unix_gc();
err = scm_send(sock, msg, &scm, false);
if (err < 0)
return err;
+ wait_for_unix_gc(scm.fp);
+
err = -EOPNOTSUPP;
if (msg->msg_flags & MSG_OOB) {
#if IS_ENABLED(CONFIG_AF_UNIX_OOB)
diff --git a/net/unix/garbage.c b/net/unix/garbage.c
index d2fc795394a5..23efb78fe9ef 100644
--- a/net/unix/garbage.c
+++ b/net/unix/garbage.c
@@ -81,278 +81,551 @@
#include <net/scm.h>
#include <net/tcp_states.h>
-#include "scm.h"
+struct unix_sock *unix_get_socket(struct file *filp)
+{
+ struct inode *inode = file_inode(filp);
+
+ /* Socket ? */
+ if (S_ISSOCK(inode->i_mode) && !(filp->f_mode & FMODE_PATH)) {
+ struct socket *sock = SOCKET_I(inode);
+ const struct proto_ops *ops;
+ struct sock *sk = sock->sk;
-/* Internal data structures and random procedures: */
+ ops = READ_ONCE(sock->ops);
-static LIST_HEAD(gc_candidates);
-static DECLARE_WAIT_QUEUE_HEAD(unix_gc_wait);
+ /* PF_UNIX ? */
+ if (sk && ops && ops->family == PF_UNIX)
+ return unix_sk(sk);
+ }
-static void scan_inflight(struct sock *x, void (*func)(struct unix_sock *),
- struct sk_buff_head *hitlist)
+ return NULL;
+}
+
+static struct unix_vertex *unix_edge_successor(struct unix_edge *edge)
{
- struct sk_buff *skb;
- struct sk_buff *next;
-
- spin_lock(&x->sk_receive_queue.lock);
- skb_queue_walk_safe(&x->sk_receive_queue, skb, next) {
- /* Do we have file descriptors ? */
- if (UNIXCB(skb).fp) {
- bool hit = false;
- /* Process the descriptors of this socket */
- int nfd = UNIXCB(skb).fp->count;
- struct file **fp = UNIXCB(skb).fp->fp;
-
- while (nfd--) {
- /* Get the socket the fd matches if it indeed does so */
- struct sock *sk = unix_get_socket(*fp++);
-
- if (sk) {
- struct unix_sock *u = unix_sk(sk);
-
- /* Ignore non-candidates, they could
- * have been added to the queues after
- * starting the garbage collection
- */
- if (test_bit(UNIX_GC_CANDIDATE, &u->gc_flags)) {
- hit = true;
-
- func(u);
- }
- }
- }
- if (hit && hitlist != NULL) {
- __skb_unlink(skb, &x->sk_receive_queue);
- __skb_queue_tail(hitlist, skb);
- }
- }
+ /* If an embryo socket has a fd,
+ * the listener indirectly holds the fd's refcnt.
+ */
+ if (edge->successor->listener)
+ return unix_sk(edge->successor->listener)->vertex;
+
+ return edge->successor->vertex;
+}
+
+static bool unix_graph_maybe_cyclic;
+static bool unix_graph_grouped;
+
+static void unix_update_graph(struct unix_vertex *vertex)
+{
+ /* If the receiver socket is not inflight, no cyclic
+ * reference could be formed.
+ */
+ if (!vertex)
+ return;
+
+ unix_graph_maybe_cyclic = true;
+ unix_graph_grouped = false;
+}
+
+static LIST_HEAD(unix_unvisited_vertices);
+
+enum unix_vertex_index {
+ UNIX_VERTEX_INDEX_MARK1,
+ UNIX_VERTEX_INDEX_MARK2,
+ UNIX_VERTEX_INDEX_START,
+};
+
+static unsigned long unix_vertex_unvisited_index = UNIX_VERTEX_INDEX_MARK1;
+
+static void unix_add_edge(struct scm_fp_list *fpl, struct unix_edge *edge)
+{
+ struct unix_vertex *vertex = edge->predecessor->vertex;
+
+ if (!vertex) {
+ vertex = list_first_entry(&fpl->vertices, typeof(*vertex), entry);
+ vertex->index = unix_vertex_unvisited_index;
+ vertex->out_degree = 0;
+ INIT_LIST_HEAD(&vertex->edges);
+ INIT_LIST_HEAD(&vertex->scc_entry);
+
+ list_move_tail(&vertex->entry, &unix_unvisited_vertices);
+ edge->predecessor->vertex = vertex;
}
- spin_unlock(&x->sk_receive_queue.lock);
+
+ vertex->out_degree++;
+ list_add_tail(&edge->vertex_entry, &vertex->edges);
+
+ unix_update_graph(unix_edge_successor(edge));
}
-static void scan_children(struct sock *x, void (*func)(struct unix_sock *),
- struct sk_buff_head *hitlist)
+static void unix_del_edge(struct scm_fp_list *fpl, struct unix_edge *edge)
{
- if (x->sk_state != TCP_LISTEN) {
- scan_inflight(x, func, hitlist);
- } else {
- struct sk_buff *skb;
- struct sk_buff *next;
- struct unix_sock *u;
- LIST_HEAD(embryos);
+ struct unix_vertex *vertex = edge->predecessor->vertex;
- /* For a listening socket collect the queued embryos
- * and perform a scan on them as well.
- */
- spin_lock(&x->sk_receive_queue.lock);
- skb_queue_walk_safe(&x->sk_receive_queue, skb, next) {
- u = unix_sk(skb->sk);
+ if (!fpl->dead)
+ unix_update_graph(unix_edge_successor(edge));
- /* An embryo cannot be in-flight, so it's safe
- * to use the list link.
- */
- BUG_ON(!list_empty(&u->link));
- list_add_tail(&u->link, &embryos);
- }
- spin_unlock(&x->sk_receive_queue.lock);
+ list_del(&edge->vertex_entry);
+ vertex->out_degree--;
- while (!list_empty(&embryos)) {
- u = list_entry(embryos.next, struct unix_sock, link);
- scan_inflight(&u->sk, func, hitlist);
- list_del_init(&u->link);
- }
+ if (!vertex->out_degree) {
+ edge->predecessor->vertex = NULL;
+ list_move_tail(&vertex->entry, &fpl->vertices);
}
}
-static void dec_inflight(struct unix_sock *usk)
+static void unix_free_vertices(struct scm_fp_list *fpl)
{
- usk->inflight--;
+ struct unix_vertex *vertex, *next_vertex;
+
+ list_for_each_entry_safe(vertex, next_vertex, &fpl->vertices, entry) {
+ list_del(&vertex->entry);
+ kfree(vertex);
+ }
}
-static void inc_inflight(struct unix_sock *usk)
+static DEFINE_SPINLOCK(unix_gc_lock);
+unsigned int unix_tot_inflight;
+
+void unix_add_edges(struct scm_fp_list *fpl, struct unix_sock *receiver)
{
- usk->inflight++;
+ int i = 0, j = 0;
+
+ spin_lock(&unix_gc_lock);
+
+ if (!fpl->count_unix)
+ goto out;
+
+ do {
+ struct unix_sock *inflight = unix_get_socket(fpl->fp[j++]);
+ struct unix_edge *edge;
+
+ if (!inflight)
+ continue;
+
+ edge = fpl->edges + i++;
+ edge->predecessor = inflight;
+ edge->successor = receiver;
+
+ unix_add_edge(fpl, edge);
+ } while (i < fpl->count_unix);
+
+ receiver->scm_stat.nr_unix_fds += fpl->count_unix;
+ WRITE_ONCE(unix_tot_inflight, unix_tot_inflight + fpl->count_unix);
+out:
+ WRITE_ONCE(fpl->user->unix_inflight, fpl->user->unix_inflight + fpl->count);
+
+ spin_unlock(&unix_gc_lock);
+
+ fpl->inflight = true;
+
+ unix_free_vertices(fpl);
}
-static void inc_inflight_move_tail(struct unix_sock *u)
+void unix_del_edges(struct scm_fp_list *fpl)
{
- u->inflight++;
+ struct unix_sock *receiver;
+ int i = 0;
+
+ spin_lock(&unix_gc_lock);
- /* If this still might be part of a cycle, move it to the end
- * of the list, so that it's checked even if it was already
- * passed over
+ if (!fpl->count_unix)
+ goto out;
+
+ do {
+ struct unix_edge *edge = fpl->edges + i++;
+
+ unix_del_edge(fpl, edge);
+ } while (i < fpl->count_unix);
+
+ if (!fpl->dead) {
+ receiver = fpl->edges[0].successor;
+ receiver->scm_stat.nr_unix_fds -= fpl->count_unix;
+ }
+ WRITE_ONCE(unix_tot_inflight, unix_tot_inflight - fpl->count_unix);
+out:
+ WRITE_ONCE(fpl->user->unix_inflight, fpl->user->unix_inflight - fpl->count);
+
+ spin_unlock(&unix_gc_lock);
+
+ fpl->inflight = false;
+}
+
+void unix_update_edges(struct unix_sock *receiver)
+{
+ /* nr_unix_fds is only updated under unix_state_lock().
+ * If it's 0 here, the embryo socket is not part of the
+ * inflight graph, and GC will not see it, so no lock needed.
*/
- if (test_bit(UNIX_GC_MAYBE_CYCLE, &u->gc_flags))
- list_move_tail(&u->link, &gc_candidates);
+ if (!receiver->scm_stat.nr_unix_fds) {
+ receiver->listener = NULL;
+ } else {
+ spin_lock(&unix_gc_lock);
+ unix_update_graph(unix_sk(receiver->listener)->vertex);
+ receiver->listener = NULL;
+ spin_unlock(&unix_gc_lock);
+ }
}
-static bool gc_in_progress;
-#define UNIX_INFLIGHT_TRIGGER_GC 16000
+int unix_prepare_fpl(struct scm_fp_list *fpl)
+{
+ struct unix_vertex *vertex;
+ int i;
+
+ if (!fpl->count_unix)
+ return 0;
+
+ for (i = 0; i < fpl->count_unix; i++) {
+ vertex = kmalloc(sizeof(*vertex), GFP_KERNEL);
+ if (!vertex)
+ goto err;
+
+ list_add(&vertex->entry, &fpl->vertices);
+ }
+
+ fpl->edges = kvmalloc_array(fpl->count_unix, sizeof(*fpl->edges),
+ GFP_KERNEL_ACCOUNT);
+ if (!fpl->edges)
+ goto err;
+
+ return 0;
-void wait_for_unix_gc(void)
+err:
+ unix_free_vertices(fpl);
+ return -ENOMEM;
+}
+
+void unix_destroy_fpl(struct scm_fp_list *fpl)
{
- /* If number of inflight sockets is insane,
- * force a garbage collect right now.
- * Paired with the WRITE_ONCE() in unix_inflight(),
- * unix_notinflight() and gc_in_progress().
- */
- if (READ_ONCE(unix_tot_inflight) > UNIX_INFLIGHT_TRIGGER_GC &&
- !READ_ONCE(gc_in_progress))
- unix_gc();
- wait_event(unix_gc_wait, !READ_ONCE(gc_in_progress));
+ if (fpl->inflight)
+ unix_del_edges(fpl);
+
+ kvfree(fpl->edges);
+ unix_free_vertices(fpl);
}
-/* The external entry point: unix_gc() */
-void unix_gc(void)
+static bool unix_vertex_dead(struct unix_vertex *vertex)
{
- struct sk_buff *next_skb, *skb;
+ struct unix_edge *edge;
struct unix_sock *u;
- struct unix_sock *next;
- struct sk_buff_head hitlist;
- struct list_head cursor;
- LIST_HEAD(not_cycle_list);
+ long total_ref;
- spin_lock(&unix_gc_lock);
+ list_for_each_entry(edge, &vertex->edges, vertex_entry) {
+ struct unix_vertex *next_vertex = unix_edge_successor(edge);
- /* Avoid a recursive GC. */
- if (gc_in_progress)
- goto out;
+ /* The vertex's fd can be received by a non-inflight socket. */
+ if (!next_vertex)
+ return false;
- /* Paired with READ_ONCE() in wait_for_unix_gc(). */
- WRITE_ONCE(gc_in_progress, true);
+ /* The vertex's fd can be received by an inflight socket in
+ * another SCC.
+ */
+ if (next_vertex->scc_index != vertex->scc_index)
+ return false;
+ }
- /* First, select candidates for garbage collection. Only
- * in-flight sockets are considered, and from those only ones
- * which don't have any external reference.
- *
- * Holding unix_gc_lock will protect these candidates from
- * being detached, and hence from gaining an external
- * reference. Since there are no possible receivers, all
- * buffers currently on the candidates' queues stay there
- * during the garbage collection.
- *
- * We also know that no new candidate can be added onto the
- * receive queues. Other, non candidate sockets _can_ be
- * added to queue, so we must make sure only to touch
- * candidates.
- *
- * Embryos, though never candidates themselves, affect which
- * candidates are reachable by the garbage collector. Before
- * being added to a listener's queue, an embryo may already
- * receive data carrying SCM_RIGHTS, potentially making the
- * passed socket a candidate that is not yet reachable by the
- * collector. It becomes reachable once the embryo is
- * enqueued. Therefore, we must ensure that no SCM-laden
- * embryo appears in a (candidate) listener's queue between
- * consecutive scan_children() calls.
- */
- list_for_each_entry_safe(u, next, &gc_inflight_list, link) {
- struct sock *sk = &u->sk;
- long total_refs;
-
- total_refs = file_count(sk->sk_socket->file);
-
- BUG_ON(!u->inflight);
- BUG_ON(total_refs < u->inflight);
- if (total_refs == u->inflight) {
- list_move_tail(&u->link, &gc_candidates);
- __set_bit(UNIX_GC_CANDIDATE, &u->gc_flags);
- __set_bit(UNIX_GC_MAYBE_CYCLE, &u->gc_flags);
-
- if (sk->sk_state == TCP_LISTEN) {
- unix_state_lock_nested(sk, U_LOCK_GC_LISTENER);
- unix_state_unlock(sk);
+ /* No receiver exists out of the same SCC. */
+
+ edge = list_first_entry(&vertex->edges, typeof(*edge), vertex_entry);
+ u = edge->predecessor;
+ total_ref = file_count(u->sk.sk_socket->file);
+
+ /* If not close()d, total_ref > out_degree. */
+ if (total_ref != vertex->out_degree)
+ return false;
+
+ return true;
+}
+
+enum unix_recv_queue_lock_class {
+ U_RECVQ_LOCK_NORMAL,
+ U_RECVQ_LOCK_EMBRYO,
+};
+
+static void unix_collect_queue(struct unix_sock *u, struct sk_buff_head *hitlist)
+{
+ skb_queue_splice_init(&u->sk.sk_receive_queue, hitlist);
+
+#if IS_ENABLED(CONFIG_AF_UNIX_OOB)
+ if (u->oob_skb) {
+ WARN_ON_ONCE(skb_unref(u->oob_skb));
+ u->oob_skb = NULL;
+ }
+#endif
+}
+
+static void unix_collect_skb(struct list_head *scc, struct sk_buff_head *hitlist)
+{
+ struct unix_vertex *vertex;
+
+ list_for_each_entry_reverse(vertex, scc, scc_entry) {
+ struct sk_buff_head *queue;
+ struct unix_edge *edge;
+ struct unix_sock *u;
+
+ edge = list_first_entry(&vertex->edges, typeof(*edge), vertex_entry);
+ u = edge->predecessor;
+ queue = &u->sk.sk_receive_queue;
+
+ spin_lock(&queue->lock);
+
+ if (u->sk.sk_state == TCP_LISTEN) {
+ struct sk_buff *skb;
+
+ skb_queue_walk(queue, skb) {
+ struct sk_buff_head *embryo_queue = &skb->sk->sk_receive_queue;
+
+ /* listener -> embryo order, the inversion never happens. */
+ spin_lock_nested(&embryo_queue->lock, U_RECVQ_LOCK_EMBRYO);
+ unix_collect_queue(unix_sk(skb->sk), hitlist);
+ spin_unlock(&embryo_queue->lock);
}
+ } else {
+ unix_collect_queue(u, hitlist);
}
+
+ spin_unlock(&queue->lock);
}
+}
- /* Now remove all internal in-flight reference to children of
- * the candidates.
- */
- list_for_each_entry(u, &gc_candidates, link)
- scan_children(&u->sk, dec_inflight, NULL);
+static bool unix_scc_cyclic(struct list_head *scc)
+{
+ struct unix_vertex *vertex;
+ struct unix_edge *edge;
- /* Restore the references for children of all candidates,
- * which have remaining references. Do this recursively, so
- * only those remain, which form cyclic references.
- *
- * Use a "cursor" link, to make the list traversal safe, even
- * though elements might be moved about.
+ /* SCC containing multiple vertices ? */
+ if (!list_is_singular(scc))
+ return true;
+
+ vertex = list_first_entry(scc, typeof(*vertex), scc_entry);
+
+ /* Self-reference or a embryo-listener circle ? */
+ list_for_each_entry(edge, &vertex->edges, vertex_entry) {
+ if (unix_edge_successor(edge) == vertex)
+ return true;
+ }
+
+ return false;
+}
+
+static LIST_HEAD(unix_visited_vertices);
+static unsigned long unix_vertex_grouped_index = UNIX_VERTEX_INDEX_MARK2;
+
+static void __unix_walk_scc(struct unix_vertex *vertex, unsigned long *last_index,
+ struct sk_buff_head *hitlist)
+{
+ LIST_HEAD(vertex_stack);
+ struct unix_edge *edge;
+ LIST_HEAD(edge_stack);
+
+next_vertex:
+ /* Push vertex to vertex_stack and mark it as on-stack
+ * (index >= UNIX_VERTEX_INDEX_START).
+ * The vertex will be popped when finalising SCC later.
*/
- list_add(&cursor, &gc_candidates);
- while (cursor.next != &gc_candidates) {
- u = list_entry(cursor.next, struct unix_sock, link);
+ list_add(&vertex->scc_entry, &vertex_stack);
+
+ vertex->index = *last_index;
+ vertex->scc_index = *last_index;
+ (*last_index)++;
+
+ /* Explore neighbour vertices (receivers of the current vertex's fd). */
+ list_for_each_entry(edge, &vertex->edges, vertex_entry) {
+ struct unix_vertex *next_vertex = unix_edge_successor(edge);
+
+ if (!next_vertex)
+ continue;
+
+ if (next_vertex->index == unix_vertex_unvisited_index) {
+ /* Iterative deepening depth first search
+ *
+ * 1. Push a forward edge to edge_stack and set
+ * the successor to vertex for the next iteration.
+ */
+ list_add(&edge->stack_entry, &edge_stack);
- /* Move cursor to after the current position. */
- list_move(&cursor, &u->link);
+ vertex = next_vertex;
+ goto next_vertex;
- if (u->inflight) {
- list_move_tail(&u->link, ¬_cycle_list);
- __clear_bit(UNIX_GC_MAYBE_CYCLE, &u->gc_flags);
- scan_children(&u->sk, inc_inflight_move_tail, NULL);
+ /* 2. Pop the edge directed to the current vertex
+ * and restore the ancestor for backtracking.
+ */
+prev_vertex:
+ edge = list_first_entry(&edge_stack, typeof(*edge), stack_entry);
+ list_del_init(&edge->stack_entry);
+
+ next_vertex = vertex;
+ vertex = edge->predecessor->vertex;
+
+ /* If the successor has a smaller scc_index, two vertices
+ * are in the same SCC, so propagate the smaller scc_index
+ * to skip SCC finalisation.
+ */
+ vertex->scc_index = min(vertex->scc_index, next_vertex->scc_index);
+ } else if (next_vertex->index != unix_vertex_grouped_index) {
+ /* Loop detected by a back/cross edge.
+ *
+ * The successor is on vertex_stack, so two vertices are in
+ * the same SCC. If the successor has a smaller *scc_index*,
+ * propagate it to skip SCC finalisation.
+ */
+ vertex->scc_index = min(vertex->scc_index, next_vertex->scc_index);
+ } else {
+ /* The successor was already grouped as another SCC */
}
}
- list_del(&cursor);
- /* Now gc_candidates contains only garbage. Restore original
- * inflight counters for these as well, and remove the skbuffs
- * which are creating the cycle(s).
- */
- skb_queue_head_init(&hitlist);
- list_for_each_entry(u, &gc_candidates, link) {
- scan_children(&u->sk, inc_inflight, &hitlist);
+ if (vertex->index == vertex->scc_index) {
+ struct unix_vertex *v;
+ struct list_head scc;
+ bool scc_dead = true;
-#if IS_ENABLED(CONFIG_AF_UNIX_OOB)
- if (u->oob_skb) {
- kfree_skb(u->oob_skb);
- u->oob_skb = NULL;
+ /* SCC finalised.
+ *
+ * If the scc_index was not updated, all the vertices above on
+ * vertex_stack are in the same SCC. Group them using scc_entry.
+ */
+ __list_cut_position(&scc, &vertex_stack, &vertex->scc_entry);
+
+ list_for_each_entry_reverse(v, &scc, scc_entry) {
+ /* Don't restart DFS from this vertex in unix_walk_scc(). */
+ list_move_tail(&v->entry, &unix_visited_vertices);
+
+ /* Mark vertex as off-stack. */
+ v->index = unix_vertex_grouped_index;
+
+ if (scc_dead)
+ scc_dead = unix_vertex_dead(v);
}
-#endif
+
+ if (scc_dead)
+ unix_collect_skb(&scc, hitlist);
+ else if (!unix_graph_maybe_cyclic)
+ unix_graph_maybe_cyclic = unix_scc_cyclic(&scc);
+
+ list_del(&scc);
}
- /* not_cycle_list contains those sockets which do not make up a
- * cycle. Restore these to the inflight list.
+ /* Need backtracking ? */
+ if (!list_empty(&edge_stack))
+ goto prev_vertex;
+}
+
+static void unix_walk_scc(struct sk_buff_head *hitlist)
+{
+ unsigned long last_index = UNIX_VERTEX_INDEX_START;
+
+ unix_graph_maybe_cyclic = false;
+
+ /* Visit every vertex exactly once.
+ * __unix_walk_scc() moves visited vertices to unix_visited_vertices.
*/
- while (!list_empty(¬_cycle_list)) {
- u = list_entry(not_cycle_list.next, struct unix_sock, link);
- __clear_bit(UNIX_GC_CANDIDATE, &u->gc_flags);
- list_move_tail(&u->link, &gc_inflight_list);
+ while (!list_empty(&unix_unvisited_vertices)) {
+ struct unix_vertex *vertex;
+
+ vertex = list_first_entry(&unix_unvisited_vertices, typeof(*vertex), entry);
+ __unix_walk_scc(vertex, &last_index, hitlist);
}
- spin_unlock(&unix_gc_lock);
+ list_replace_init(&unix_visited_vertices, &unix_unvisited_vertices);
+ swap(unix_vertex_unvisited_index, unix_vertex_grouped_index);
- /* We need io_uring to clean its registered files, ignore all io_uring
- * originated skbs. It's fine as io_uring doesn't keep references to
- * other io_uring instances and so killing all other files in the cycle
- * will put all io_uring references forcing it to go through normal
- * release.path eventually putting registered files.
- */
- skb_queue_walk_safe(&hitlist, skb, next_skb) {
- if (skb->scm_io_uring) {
- __skb_unlink(skb, &hitlist);
- skb_queue_tail(&skb->sk->sk_receive_queue, skb);
+ unix_graph_grouped = true;
+}
+
+static void unix_walk_scc_fast(struct sk_buff_head *hitlist)
+{
+ unix_graph_maybe_cyclic = false;
+
+ while (!list_empty(&unix_unvisited_vertices)) {
+ struct unix_vertex *vertex;
+ struct list_head scc;
+ bool scc_dead = true;
+
+ vertex = list_first_entry(&unix_unvisited_vertices, typeof(*vertex), entry);
+ list_add(&scc, &vertex->scc_entry);
+
+ list_for_each_entry_reverse(vertex, &scc, scc_entry) {
+ list_move_tail(&vertex->entry, &unix_visited_vertices);
+
+ if (scc_dead)
+ scc_dead = unix_vertex_dead(vertex);
}
+
+ if (scc_dead)
+ unix_collect_skb(&scc, hitlist);
+ else if (!unix_graph_maybe_cyclic)
+ unix_graph_maybe_cyclic = unix_scc_cyclic(&scc);
+
+ list_del(&scc);
}
- /* Here we are. Hitlist is filled. Die. */
- __skb_queue_purge(&hitlist);
+ list_replace_init(&unix_visited_vertices, &unix_unvisited_vertices);
+}
+
+static bool gc_in_progress;
+
+static void __unix_gc(struct work_struct *work)
+{
+ struct sk_buff_head hitlist;
+ struct sk_buff *skb;
spin_lock(&unix_gc_lock);
- /* There could be io_uring registered files, just push them back to
- * the inflight list
- */
- list_for_each_entry_safe(u, next, &gc_candidates, link)
- list_move_tail(&u->link, &gc_inflight_list);
+ if (!unix_graph_maybe_cyclic) {
+ spin_unlock(&unix_gc_lock);
+ goto skip_gc;
+ }
+
+ __skb_queue_head_init(&hitlist);
+
+ if (unix_graph_grouped)
+ unix_walk_scc_fast(&hitlist);
+ else
+ unix_walk_scc(&hitlist);
- /* All candidates should have been detached by now. */
- BUG_ON(!list_empty(&gc_candidates));
+ spin_unlock(&unix_gc_lock);
+
+ skb_queue_walk(&hitlist, skb) {
+ if (UNIXCB(skb).fp)
+ UNIXCB(skb).fp->dead = true;
+ }
- /* Paired with READ_ONCE() in wait_for_unix_gc(). */
+ __skb_queue_purge(&hitlist);
+skip_gc:
WRITE_ONCE(gc_in_progress, false);
+}
- wake_up(&unix_gc_wait);
+static DECLARE_WORK(unix_gc_work, __unix_gc);
- out:
- spin_unlock(&unix_gc_lock);
+void unix_gc(void)
+{
+ WRITE_ONCE(gc_in_progress, true);
+ queue_work(system_unbound_wq, &unix_gc_work);
+}
+
+#define UNIX_INFLIGHT_TRIGGER_GC 16000
+#define UNIX_INFLIGHT_SANE_USER (SCM_MAX_FD * 8)
+
+void wait_for_unix_gc(struct scm_fp_list *fpl)
+{
+ /* If number of inflight sockets is insane,
+ * force a garbage collect right now.
+ *
+ * Paired with the WRITE_ONCE() in unix_inflight(),
+ * unix_notinflight(), and __unix_gc().
+ */
+ if (READ_ONCE(unix_tot_inflight) > UNIX_INFLIGHT_TRIGGER_GC &&
+ !READ_ONCE(gc_in_progress))
+ unix_gc();
+
+ /* Penalise users who want to send AF_UNIX sockets
+ * but whose sockets have not been received yet.
+ */
+ if (!fpl || !fpl->count_unix ||
+ READ_ONCE(fpl->user->unix_inflight) < UNIX_INFLIGHT_SANE_USER)
+ return;
+
+ if (READ_ONCE(gc_in_progress))
+ flush_work(&unix_gc_work);
}
diff --git a/net/unix/scm.c b/net/unix/scm.c
deleted file mode 100644
index 4eff7da9f6f9..000000000000
--- a/net/unix/scm.c
+++ /dev/null
@@ -1,154 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/string.h>
-#include <linux/socket.h>
-#include <linux/net.h>
-#include <linux/fs.h>
-#include <net/af_unix.h>
-#include <net/scm.h>
-#include <linux/init.h>
-#include <linux/io_uring.h>
-
-#include "scm.h"
-
-unsigned int unix_tot_inflight;
-EXPORT_SYMBOL(unix_tot_inflight);
-
-LIST_HEAD(gc_inflight_list);
-EXPORT_SYMBOL(gc_inflight_list);
-
-DEFINE_SPINLOCK(unix_gc_lock);
-EXPORT_SYMBOL(unix_gc_lock);
-
-struct sock *unix_get_socket(struct file *filp)
-{
- struct sock *u_sock = NULL;
- struct inode *inode = file_inode(filp);
-
- /* Socket ? */
- if (S_ISSOCK(inode->i_mode) && !(filp->f_mode & FMODE_PATH)) {
- struct socket *sock = SOCKET_I(inode);
- struct sock *s = sock->sk;
-
- /* PF_UNIX ? */
- if (s && sock->ops && sock->ops->family == PF_UNIX)
- u_sock = s;
- }
-
- return u_sock;
-}
-EXPORT_SYMBOL(unix_get_socket);
-
-/* Keep the number of times in flight count for the file
- * descriptor if it is for an AF_UNIX socket.
- */
-void unix_inflight(struct user_struct *user, struct file *fp)
-{
- struct sock *s = unix_get_socket(fp);
-
- spin_lock(&unix_gc_lock);
-
- if (s) {
- struct unix_sock *u = unix_sk(s);
-
- if (!u->inflight) {
- BUG_ON(!list_empty(&u->link));
- list_add_tail(&u->link, &gc_inflight_list);
- } else {
- BUG_ON(list_empty(&u->link));
- }
- u->inflight++;
- /* Paired with READ_ONCE() in wait_for_unix_gc() */
- WRITE_ONCE(unix_tot_inflight, unix_tot_inflight + 1);
- }
- WRITE_ONCE(user->unix_inflight, user->unix_inflight + 1);
- spin_unlock(&unix_gc_lock);
-}
-
-void unix_notinflight(struct user_struct *user, struct file *fp)
-{
- struct sock *s = unix_get_socket(fp);
-
- spin_lock(&unix_gc_lock);
-
- if (s) {
- struct unix_sock *u = unix_sk(s);
-
- BUG_ON(!u->inflight);
- BUG_ON(list_empty(&u->link));
-
- u->inflight--;
- if (!u->inflight)
- list_del_init(&u->link);
- /* Paired with READ_ONCE() in wait_for_unix_gc() */
- WRITE_ONCE(unix_tot_inflight, unix_tot_inflight - 1);
- }
- WRITE_ONCE(user->unix_inflight, user->unix_inflight - 1);
- spin_unlock(&unix_gc_lock);
-}
-
-/*
- * The "user->unix_inflight" variable is protected by the garbage
- * collection lock, and we just read it locklessly here. If you go
- * over the limit, there might be a tiny race in actually noticing
- * it across threads. Tough.
- */
-static inline bool too_many_unix_fds(struct task_struct *p)
-{
- struct user_struct *user = current_user();
-
- if (unlikely(READ_ONCE(user->unix_inflight) > task_rlimit(p, RLIMIT_NOFILE)))
- return !capable(CAP_SYS_RESOURCE) && !capable(CAP_SYS_ADMIN);
- return false;
-}
-
-int unix_attach_fds(struct scm_cookie *scm, struct sk_buff *skb)
-{
- int i;
-
- if (too_many_unix_fds(current))
- return -ETOOMANYREFS;
-
- /*
- * Need to duplicate file references for the sake of garbage
- * collection. Otherwise a socket in the fps might become a
- * candidate for GC while the skb is not yet queued.
- */
- UNIXCB(skb).fp = scm_fp_dup(scm->fp);
- if (!UNIXCB(skb).fp)
- return -ENOMEM;
-
- for (i = scm->fp->count - 1; i >= 0; i--)
- unix_inflight(scm->fp->user, scm->fp->fp[i]);
- return 0;
-}
-EXPORT_SYMBOL(unix_attach_fds);
-
-void unix_detach_fds(struct scm_cookie *scm, struct sk_buff *skb)
-{
- int i;
-
- scm->fp = UNIXCB(skb).fp;
- UNIXCB(skb).fp = NULL;
-
- for (i = scm->fp->count-1; i >= 0; i--)
- unix_notinflight(scm->fp->user, scm->fp->fp[i]);
-}
-EXPORT_SYMBOL(unix_detach_fds);
-
-void unix_destruct_scm(struct sk_buff *skb)
-{
- struct scm_cookie scm;
-
- memset(&scm, 0, sizeof(scm));
- scm.pid = UNIXCB(skb).pid;
- if (UNIXCB(skb).fp)
- unix_detach_fds(&scm, skb);
-
- /* Alas, it calls VFS */
- /* So fscking what? fput() had been SMP-safe since the last Summer */
- scm_destroy(&scm);
- sock_wfree(skb);
-}
-EXPORT_SYMBOL(unix_destruct_scm);
diff --git a/net/unix/scm.h b/net/unix/scm.h
deleted file mode 100644
index 5a255a477f16..000000000000
--- a/net/unix/scm.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef NET_UNIX_SCM_H
-#define NET_UNIX_SCM_H
-
-extern struct list_head gc_inflight_list;
-extern spinlock_t unix_gc_lock;
-
-int unix_attach_fds(struct scm_cookie *scm, struct sk_buff *skb);
-void unix_detach_fds(struct scm_cookie *scm, struct sk_buff *skb);
-
-#endif
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index a022f4984687..e015ff225b27 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -1597,6 +1597,9 @@ int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl)
struct xfrm_policy *delpol;
struct hlist_head *chain;
+ /* Sanitize mark before store */
+ policy->mark.v &= policy->mark.m;
+
spin_lock_bh(&net->xfrm.xfrm_policy_lock);
chain = policy_hash_bysel(net, &policy->selector, policy->family, dir);
if (chain)
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index 2f4cf976b59a..58c53bb1c583 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -694,9 +694,6 @@ int __xfrm_state_delete(struct xfrm_state *x)
net->xfrm.state_num--;
spin_unlock(&net->xfrm.xfrm_state_lock);
- if (x->encap_sk)
- sock_put(rcu_dereference_raw(x->encap_sk));
-
xfrm_dev_state_delete(x);
/* All xfrm_state objects are created by xfrm_state_alloc.
@@ -1278,6 +1275,9 @@ static void __xfrm_state_insert(struct xfrm_state *x)
list_add(&x->km.all, &net->xfrm.state_all);
+ /* Sanitize mark before store */
+ x->mark.v &= x->mark.m;
+
h = xfrm_dst_hash(net, &x->id.daddr, &x->props.saddr,
x->props.reqid, x->props.family);
hlist_add_head_rcu(&x->bydst, net->xfrm.state_bydst + h);
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index 727da3c5879b..77bf18cfdae7 100644
--- a/samples/bpf/Makefile
+++ b/samples/bpf/Makefile
@@ -434,7 +434,7 @@ $(obj)/%.o: $(src)/%.c
@echo " CLANG-bpf " $@
$(Q)$(CLANG) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(BPF_EXTRA_CFLAGS) \
-I$(obj) -I$(srctree)/tools/testing/selftests/bpf/ \
- -I$(LIBBPF_INCLUDE) \
+ -I$(LIBBPF_INCLUDE) $(CLANG_SYS_INCLUDES) \
-D__KERNEL__ -D__BPF_TRACING__ -Wno-unused-value -Wno-pointer-sign \
-D__TARGET_ARCH_$(SRCARCH) -Wno-compare-distinct-pointer-types \
-Wno-gnu-variable-sized-type-not-at-end \
diff --git a/scripts/config b/scripts/config
index ff88e2faefd3..ea475c07de28 100755
--- a/scripts/config
+++ b/scripts/config
@@ -32,6 +32,7 @@ commands:
Disable option directly after other option
--module-after|-M beforeopt option
Turn option into module directly after other option
+ --refresh Refresh the config using old settings
commands can be repeated multiple times
@@ -124,16 +125,22 @@ undef_var() {
txt_delete "^# $name is not set" "$FN"
}
-if [ "$1" = "--file" ]; then
- FN="$2"
- if [ "$FN" = "" ] ; then
- usage
+FN=.config
+CMDS=()
+while [[ $# -gt 0 ]]; do
+ if [ "$1" = "--file" ]; then
+ if [ "$2" = "" ]; then
+ usage
+ fi
+ FN="$2"
+ shift 2
+ else
+ CMDS+=("$1")
+ shift
fi
- shift 2
-else
- FN=.config
-fi
+done
+set -- "${CMDS[@]}"
if [ "$1" = "" ] ; then
usage
fi
@@ -217,9 +224,8 @@ while [ "$1" != "" ] ; do
set_var "${CONFIG_}$B" "${CONFIG_}$B=m" "${CONFIG_}$A"
;;
- # undocumented because it ignores --file (fixme)
--refresh)
- yes "" | make oldconfig
+ yes "" | make oldconfig KCONFIG_CONFIG=$FN
;;
*)
diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh
index 72da3b8d6f30..151f9938abaa 100755
--- a/scripts/kconfig/merge_config.sh
+++ b/scripts/kconfig/merge_config.sh
@@ -105,8 +105,8 @@ INITFILE=$1
shift;
if [ ! -r "$INITFILE" ]; then
- echo "The base file '$INITFILE' does not exist. Exit." >&2
- exit 1
+ echo "The base file '$INITFILE' does not exist. Creating one..." >&2
+ touch "$INITFILE"
fi
MERGE_LIST=$*
diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c
index d955f3dcb3a5..9dca3672d82b 100644
--- a/security/smack/smackfs.c
+++ b/security/smack/smackfs.c
@@ -922,6 +922,10 @@ static ssize_t smk_set_cipso(struct file *file, const char __user *buf,
if (rc >= 0) {
old_cat = skp->smk_netlabel.attr.mls.cat;
rcu_assign_pointer(skp->smk_netlabel.attr.mls.cat, ncats.attr.mls.cat);
+ if (ncats.attr.mls.cat)
+ skp->smk_netlabel.flags |= NETLBL_SECATTR_MLS_CAT;
+ else
+ skp->smk_netlabel.flags &= ~(u32)NETLBL_SECATTR_MLS_CAT;
skp->smk_netlabel.attr.mls.lvl = ncats.attr.mls.lvl;
synchronize_rcu();
netlbl_catmap_free(old_cat);
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c
index ac2efeb63a39..2b9fada97532 100644
--- a/sound/core/oss/pcm_oss.c
+++ b/sound/core/oss/pcm_oss.c
@@ -1085,8 +1085,7 @@ static int snd_pcm_oss_change_params_locked(struct snd_pcm_substream *substream)
runtime->oss.params = 0;
runtime->oss.prepare = 1;
runtime->oss.buffer_used = 0;
- if (runtime->dma_area)
- snd_pcm_format_set_silence(runtime->format, runtime->dma_area, bytes_to_samples(runtime, runtime->dma_bytes));
+ snd_pcm_runtime_buffer_set_silence(runtime);
runtime->oss.period_frames = snd_pcm_alsa_frames(substream, oss_period_size);
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index f46b87ca76d0..bf752b188b05 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -703,6 +703,17 @@ static void snd_pcm_buffer_access_unlock(struct snd_pcm_runtime *runtime)
atomic_inc(&runtime->buffer_accessing);
}
+/* fill the PCM buffer with the current silence format; called from pcm_oss.c */
+void snd_pcm_runtime_buffer_set_silence(struct snd_pcm_runtime *runtime)
+{
+ snd_pcm_buffer_access_lock(runtime);
+ if (runtime->dma_area)
+ snd_pcm_format_set_silence(runtime->format, runtime->dma_area,
+ bytes_to_samples(runtime, runtime->dma_bytes));
+ snd_pcm_buffer_access_unlock(runtime);
+}
+EXPORT_SYMBOL_GPL(snd_pcm_runtime_buffer_set_silence);
+
#if IS_ENABLED(CONFIG_SND_PCM_OSS)
#define is_oss_stream(substream) ((substream)->oss.oss)
#else
diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c
index 2d707afa1ef1..1252ea7ad55e 100644
--- a/sound/core/seq/seq_clientmgr.c
+++ b/sound/core/seq/seq_clientmgr.c
@@ -1140,8 +1140,7 @@ static __poll_t snd_seq_poll(struct file *file, poll_table * wait)
if (snd_seq_file_flags(file) & SNDRV_SEQ_LFLG_OUTPUT) {
/* check if data is available in the pool */
- if (!snd_seq_write_pool_allocated(client) ||
- snd_seq_pool_poll_wait(client->pool, file, wait))
+ if (snd_seq_pool_poll_wait(client->pool, file, wait))
mask |= EPOLLOUT | EPOLLWRNORM;
}
@@ -2382,8 +2381,6 @@ int snd_seq_kernel_client_write_poll(int clientid, struct file *file, poll_table
if (client == NULL)
return -ENXIO;
- if (! snd_seq_write_pool_allocated(client))
- return 1;
if (snd_seq_pool_poll_wait(client->pool, file, wait))
return 1;
return 0;
diff --git a/sound/core/seq/seq_memory.c b/sound/core/seq/seq_memory.c
index 47ef6bc30c0e..e30b92d85079 100644
--- a/sound/core/seq/seq_memory.c
+++ b/sound/core/seq/seq_memory.c
@@ -366,6 +366,7 @@ int snd_seq_pool_poll_wait(struct snd_seq_pool *pool, struct file *file,
poll_table *wait)
{
poll_wait(file, &pool->output_sleep, wait);
+ guard(spinlock_irq)(&pool->lock);
return snd_seq_output_ok(pool);
}
diff --git a/sound/pci/hda/hda_beep.c b/sound/pci/hda/hda_beep.c
index e63621bcb214..1a684e47d4d1 100644
--- a/sound/pci/hda/hda_beep.c
+++ b/sound/pci/hda/hda_beep.c
@@ -31,8 +31,9 @@ static void generate_tone(struct hda_beep *beep, int tone)
beep->power_hook(beep, true);
beep->playing = 1;
}
- snd_hda_codec_write(codec, beep->nid, 0,
- AC_VERB_SET_BEEP_CONTROL, tone);
+ if (!codec->beep_just_power_on)
+ snd_hda_codec_write(codec, beep->nid, 0,
+ AC_VERB_SET_BEEP_CONTROL, tone);
if (!tone && beep->playing) {
beep->playing = 0;
if (beep->power_hook)
@@ -212,10 +213,12 @@ int snd_hda_attach_beep_device(struct hda_codec *codec, int nid)
struct hda_beep *beep;
int err;
- if (!snd_hda_get_bool_hint(codec, "beep"))
- return 0; /* disabled explicitly by hints */
- if (codec->beep_mode == HDA_BEEP_MODE_OFF)
- return 0; /* disabled by module option */
+ if (!codec->beep_just_power_on) {
+ if (!snd_hda_get_bool_hint(codec, "beep"))
+ return 0; /* disabled explicitly by hints */
+ if (codec->beep_mode == HDA_BEEP_MODE_OFF)
+ return 0; /* disabled by module option */
+ }
beep = kzalloc(sizeof(*beep), GFP_KERNEL);
if (beep == NULL)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 61b48f2418bf..115c675819e6 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -24,6 +24,7 @@
#include <sound/hda_codec.h>
#include "hda_local.h"
#include "hda_auto_parser.h"
+#include "hda_beep.h"
#include "hda_jack.h"
#include "hda_generic.h"
#include "hda_component.h"
@@ -6786,6 +6787,41 @@ static void alc285_fixup_hp_spectre_x360_eb1(struct hda_codec *codec,
}
}
+/* GPIO1 = amplifier on/off */
+static void alc285_fixup_hp_spectre_x360_df1(struct hda_codec *codec,
+ const struct hda_fixup *fix,
+ int action)
+{
+ struct alc_spec *spec = codec->spec;
+ static const hda_nid_t conn[] = { 0x02 };
+ static const struct hda_pintbl pincfgs[] = {
+ { 0x14, 0x90170110 }, /* front/high speakers */
+ { 0x17, 0x90170130 }, /* back/bass speakers */
+ { }
+ };
+
+ // enable mute led
+ alc285_fixup_hp_mute_led_coefbit(codec, fix, action);
+
+ switch (action) {
+ case HDA_FIXUP_ACT_PRE_PROBE:
+ /* needed for amp of back speakers */
+ spec->gpio_mask |= 0x01;
+ spec->gpio_dir |= 0x01;
+ snd_hda_apply_pincfgs(codec, pincfgs);
+ /* share DAC to have unified volume control */
+ snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn), conn);
+ snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
+ break;
+ case HDA_FIXUP_ACT_INIT:
+ /* need to toggle GPIO to enable the amp of back speakers */
+ alc_update_gpio_data(codec, 0x01, true);
+ msleep(100);
+ alc_update_gpio_data(codec, 0x01, false);
+ break;
+ }
+}
+
static void alc285_fixup_hp_spectre_x360(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{
@@ -6858,6 +6894,30 @@ static void alc285_fixup_hp_envy_x360(struct hda_codec *codec,
}
}
+static void alc285_fixup_hp_beep(struct hda_codec *codec,
+ const struct hda_fixup *fix, int action)
+{
+ if (action == HDA_FIXUP_ACT_PRE_PROBE) {
+ codec->beep_just_power_on = true;
+ } else if (action == HDA_FIXUP_ACT_INIT) {
+#ifdef CONFIG_SND_HDA_INPUT_BEEP
+ /*
+ * Just enable loopback to internal speaker and headphone jack.
+ * Disable amplification to get about the same beep volume as
+ * was on pure BIOS setup before loading the driver.
+ */
+ alc_update_coef_idx(codec, 0x36, 0x7070, BIT(13));
+
+ snd_hda_enable_beep_device(codec, 1);
+
+#if !IS_ENABLED(CONFIG_INPUT_PCSPKR)
+ dev_warn_once(hda_codec_dev(codec),
+ "enable CONFIG_INPUT_PCSPKR to get PC beeps\n");
+#endif
+#endif
+ }
+}
+
/* for hda_fixup_thinkpad_acpi() */
#include "thinkpad_helper.c"
@@ -7301,6 +7361,7 @@ enum {
ALC280_FIXUP_HP_9480M,
ALC245_FIXUP_HP_X360_AMP,
ALC285_FIXUP_HP_SPECTRE_X360_EB1,
+ ALC285_FIXUP_HP_SPECTRE_X360_DF1,
ALC285_FIXUP_HP_ENVY_X360,
ALC288_FIXUP_DELL_HEADSET_MODE,
ALC288_FIXUP_DELL1_MIC_NO_PRESENCE,
@@ -7400,6 +7461,7 @@ enum {
ALC285_FIXUP_HP_GPIO_LED,
ALC285_FIXUP_HP_MUTE_LED,
ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED,
+ ALC285_FIXUP_HP_BEEP_MICMUTE_LED,
ALC236_FIXUP_HP_MUTE_LED_COEFBIT2,
ALC236_FIXUP_HP_GPIO_LED,
ALC236_FIXUP_HP_MUTE_LED,
@@ -8947,6 +9009,12 @@ static const struct hda_fixup alc269_fixups[] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc285_fixup_hp_spectre_x360_mute_led,
},
+ [ALC285_FIXUP_HP_BEEP_MICMUTE_LED] = {
+ .type = HDA_FIXUP_FUNC,
+ .v.func = alc285_fixup_hp_beep,
+ .chained = true,
+ .chain_id = ALC285_FIXUP_HP_MUTE_LED,
+ },
[ALC236_FIXUP_HP_MUTE_LED_COEFBIT2] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc236_fixup_hp_mute_led_coefbit2,
@@ -9290,6 +9358,10 @@ static const struct hda_fixup alc269_fixups[] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc285_fixup_hp_spectre_x360_eb1
},
+ [ALC285_FIXUP_HP_SPECTRE_X360_DF1] = {
+ .type = HDA_FIXUP_FUNC,
+ .v.func = alc285_fixup_hp_spectre_x360_df1
+ },
[ALC285_FIXUP_HP_ENVY_X360] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc285_fixup_hp_envy_x360,
@@ -9850,6 +9922,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x86c1, "HP Laptop 15-da3001TU", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
SND_PCI_QUIRK(0x103c, 0x86c7, "HP Envy AiO 32", ALC274_FIXUP_HP_ENVY_GPIO),
SND_PCI_QUIRK(0x103c, 0x86e7, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
+ SND_PCI_QUIRK(0x103c, 0x863e, "HP Spectre x360 15-df1xxx", ALC285_FIXUP_HP_SPECTRE_X360_DF1),
SND_PCI_QUIRK(0x103c, 0x86e8, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
SND_PCI_QUIRK(0x103c, 0x86f9, "HP Spectre x360 13-aw0xxx", ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED),
SND_PCI_QUIRK(0x103c, 0x8716, "HP Elite Dragonfly G2 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
@@ -9860,7 +9933,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x8730, "HP ProBook 445 G7", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
SND_PCI_QUIRK(0x103c, 0x8735, "HP ProBook 435 G7", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
SND_PCI_QUIRK(0x103c, 0x8736, "HP", ALC285_FIXUP_HP_GPIO_AMP_INIT),
- SND_PCI_QUIRK(0x103c, 0x8760, "HP", ALC285_FIXUP_HP_MUTE_LED),
+ SND_PCI_QUIRK(0x103c, 0x8760, "HP EliteBook 8{4,5}5 G7", ALC285_FIXUP_HP_BEEP_MICMUTE_LED),
SND_PCI_QUIRK(0x103c, 0x876e, "HP ENVY x360 Convertible 13-ay0xxx", ALC245_FIXUP_HP_X360_MUTE_LEDS),
SND_PCI_QUIRK(0x103c, 0x877a, "HP", ALC285_FIXUP_HP_MUTE_LED),
SND_PCI_QUIRK(0x103c, 0x877d, "HP", ALC236_FIXUP_HP_MUTE_LED),
@@ -10306,6 +10379,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x17aa, 0x3866, "Lenovo 13X", ALC287_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x17aa, 0x3869, "Lenovo Yoga7 14IAL7", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
+ SND_PCI_QUIRK(0x17aa, 0x390d, "Lenovo Yoga Pro 7 14ASP10", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
SND_PCI_QUIRK(0x17aa, 0x3913, "Lenovo 145", ALC236_FIXUP_LENOVO_INV_DMIC),
SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC),
SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo B50-70", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
@@ -10559,6 +10633,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
{.id = ALC295_FIXUP_HP_OMEN, .name = "alc295-hp-omen"},
{.id = ALC285_FIXUP_HP_SPECTRE_X360, .name = "alc285-hp-spectre-x360"},
{.id = ALC285_FIXUP_HP_SPECTRE_X360_EB1, .name = "alc285-hp-spectre-x360-eb1"},
+ {.id = ALC285_FIXUP_HP_SPECTRE_X360_DF1, .name = "alc285-hp-spectre-x360-df1"},
{.id = ALC285_FIXUP_HP_ENVY_X360, .name = "alc285-hp-envy-x360"},
{.id = ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP, .name = "alc287-ideapad-bass-spk-amp"},
{.id = ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN, .name = "alc287-yoga9-bass-spk-pin"},
diff --git a/sound/soc/codecs/mt6359-accdet.h b/sound/soc/codecs/mt6359-accdet.h
index c234f2f4276a..78ada3a5bfae 100644
--- a/sound/soc/codecs/mt6359-accdet.h
+++ b/sound/soc/codecs/mt6359-accdet.h
@@ -123,6 +123,15 @@ struct mt6359_accdet {
struct workqueue_struct *jd_workqueue;
};
+#if IS_ENABLED(CONFIG_SND_SOC_MT6359_ACCDET)
int mt6359_accdet_enable_jack_detect(struct snd_soc_component *component,
struct snd_soc_jack *jack);
+#else
+static inline int
+mt6359_accdet_enable_jack_detect(struct snd_soc_component *component,
+ struct snd_soc_jack *jack)
+{
+ return -EOPNOTSUPP;
+}
+#endif
#endif
diff --git a/sound/soc/codecs/pcm3168a.c b/sound/soc/codecs/pcm3168a.c
index 9d6431338fb7..329549936bd5 100644
--- a/sound/soc/codecs/pcm3168a.c
+++ b/sound/soc/codecs/pcm3168a.c
@@ -494,9 +494,9 @@ static int pcm3168a_hw_params(struct snd_pcm_substream *substream,
}
break;
case 24:
- if (provider_mode || (format == SND_SOC_DAIFMT_DSP_A) ||
- (format == SND_SOC_DAIFMT_DSP_B)) {
- dev_err(component->dev, "24-bit slots not supported in provider mode, or consumer mode using DSP\n");
+ if (!provider_mode && ((format == SND_SOC_DAIFMT_DSP_A) ||
+ (format == SND_SOC_DAIFMT_DSP_B))) {
+ dev_err(component->dev, "24-bit slots not supported in consumer mode using DSP\n");
return -EINVAL;
}
break;
diff --git a/sound/soc/codecs/tas2764.c b/sound/soc/codecs/tas2764.c
index fc8479d3d285..10f0f07b90ff 100644
--- a/sound/soc/codecs/tas2764.c
+++ b/sound/soc/codecs/tas2764.c
@@ -182,33 +182,6 @@ static SOC_ENUM_SINGLE_DECL(
static const struct snd_kcontrol_new tas2764_asi1_mux =
SOC_DAPM_ENUM("ASI1 Source", tas2764_ASI1_src_enum);
-static int tas2764_dac_event(struct snd_soc_dapm_widget *w,
- struct snd_kcontrol *kcontrol, int event)
-{
- struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
- struct tas2764_priv *tas2764 = snd_soc_component_get_drvdata(component);
- int ret;
-
- switch (event) {
- case SND_SOC_DAPM_POST_PMU:
- tas2764->dac_powered = true;
- ret = tas2764_update_pwr_ctrl(tas2764);
- break;
- case SND_SOC_DAPM_PRE_PMD:
- tas2764->dac_powered = false;
- ret = tas2764_update_pwr_ctrl(tas2764);
- break;
- default:
- dev_err(tas2764->dev, "Unsupported event\n");
- return -EINVAL;
- }
-
- if (ret < 0)
- return ret;
-
- return 0;
-}
-
static const struct snd_kcontrol_new isense_switch =
SOC_DAPM_SINGLE("Switch", TAS2764_PWR_CTRL, TAS2764_ISENSE_POWER_EN, 1, 1);
static const struct snd_kcontrol_new vsense_switch =
@@ -221,8 +194,7 @@ static const struct snd_soc_dapm_widget tas2764_dapm_widgets[] = {
1, &isense_switch),
SND_SOC_DAPM_SWITCH("VSENSE", TAS2764_PWR_CTRL, TAS2764_VSENSE_POWER_EN,
1, &vsense_switch),
- SND_SOC_DAPM_DAC_E("DAC", NULL, SND_SOC_NOPM, 0, 0, tas2764_dac_event,
- SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD),
+ SND_SOC_DAPM_DAC("DAC", NULL, SND_SOC_NOPM, 0, 0),
SND_SOC_DAPM_OUTPUT("OUT"),
SND_SOC_DAPM_SIGGEN("VMON"),
SND_SOC_DAPM_SIGGEN("IMON")
@@ -243,9 +215,28 @@ static int tas2764_mute(struct snd_soc_dai *dai, int mute, int direction)
{
struct tas2764_priv *tas2764 =
snd_soc_component_get_drvdata(dai->component);
+ int ret;
+
+ if (!mute) {
+ tas2764->dac_powered = true;
+ ret = tas2764_update_pwr_ctrl(tas2764);
+ if (ret)
+ return ret;
+ }
tas2764->unmuted = !mute;
- return tas2764_update_pwr_ctrl(tas2764);
+ ret = tas2764_update_pwr_ctrl(tas2764);
+ if (ret)
+ return ret;
+
+ if (mute) {
+ tas2764->dac_powered = false;
+ ret = tas2764_update_pwr_ctrl(tas2764);
+ if (ret)
+ return ret;
+ }
+
+ return 0;
}
static int tas2764_set_bitwidth(struct tas2764_priv *tas2764, int bitwidth)
@@ -636,6 +627,7 @@ static const struct reg_default tas2764_reg_defaults[] = {
{ TAS2764_TDM_CFG2, 0x0a },
{ TAS2764_TDM_CFG3, 0x10 },
{ TAS2764_TDM_CFG5, 0x42 },
+ { TAS2764_INT_CLK_CFG, 0x19 },
};
static const struct regmap_range_cfg tas2764_regmap_ranges[] = {
@@ -653,6 +645,7 @@ static const struct regmap_range_cfg tas2764_regmap_ranges[] = {
static bool tas2764_volatile_register(struct device *dev, unsigned int reg)
{
switch (reg) {
+ case TAS2764_SW_RST:
case TAS2764_INT_LTCH0 ... TAS2764_INT_LTCH4:
case TAS2764_INT_CLK_CFG:
return true;
diff --git a/sound/soc/fsl/imx-card.c b/sound/soc/fsl/imx-card.c
index c6d55b21f949..11430f9f4996 100644
--- a/sound/soc/fsl/imx-card.c
+++ b/sound/soc/fsl/imx-card.c
@@ -517,7 +517,7 @@ static int imx_card_parse_of(struct imx_card_data *data)
if (!card->dai_link)
return -ENOMEM;
- data->link_data = devm_kcalloc(dev, num_links, sizeof(*link), GFP_KERNEL);
+ data->link_data = devm_kcalloc(dev, num_links, sizeof(*link_data), GFP_KERNEL);
if (!data->link_data)
return -ENOMEM;
diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c
index 67b343632a10..b00a9fdd7a9c 100644
--- a/sound/soc/intel/boards/bytcr_rt5640.c
+++ b/sound/soc/intel/boards/bytcr_rt5640.c
@@ -576,6 +576,19 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = {
BYT_RT5640_SSP0_AIF2 |
BYT_RT5640_MCLK_EN),
},
+ { /* Acer Aspire SW3-013 */
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Aspire SW3-013"),
+ },
+ .driver_data = (void *)(BYT_RT5640_DMIC1_MAP |
+ BYT_RT5640_JD_SRC_JD2_IN4N |
+ BYT_RT5640_OVCD_TH_2000UA |
+ BYT_RT5640_OVCD_SF_0P75 |
+ BYT_RT5640_DIFF_MIC |
+ BYT_RT5640_SSP0_AIF1 |
+ BYT_RT5640_MCLK_EN),
+ },
{
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
diff --git a/sound/soc/qcom/sm8250.c b/sound/soc/qcom/sm8250.c
index 41be09a07ca7..65e51b6b46ff 100644
--- a/sound/soc/qcom/sm8250.c
+++ b/sound/soc/qcom/sm8250.c
@@ -7,6 +7,7 @@
#include <sound/soc.h>
#include <sound/soc-dapm.h>
#include <sound/pcm.h>
+#include <sound/pcm_params.h>
#include <linux/soundwire/sdw.h>
#include <sound/jack.h>
#include <linux/input-event-codes.h>
@@ -39,9 +40,11 @@ static int sm8250_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
SNDRV_PCM_HW_PARAM_RATE);
struct snd_interval *channels = hw_param_interval(params,
SNDRV_PCM_HW_PARAM_CHANNELS);
+ struct snd_mask *fmt = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
rate->min = rate->max = 48000;
channels->min = channels->max = 2;
+ snd_mask_set_format(fmt, SNDRV_PCM_FORMAT_S16_LE);
return 0;
}
diff --git a/sound/soc/soc-dai.c b/sound/soc/soc-dai.c
index 49752af0e205..ba38b6e6b264 100644
--- a/sound/soc/soc-dai.c
+++ b/sound/soc/soc-dai.c
@@ -270,10 +270,11 @@ int snd_soc_dai_set_tdm_slot(struct snd_soc_dai *dai,
if (dai->driver->ops &&
dai->driver->ops->xlate_tdm_slot_mask)
- dai->driver->ops->xlate_tdm_slot_mask(slots,
- &tx_mask, &rx_mask);
+ ret = dai->driver->ops->xlate_tdm_slot_mask(slots, &tx_mask, &rx_mask);
else
- snd_soc_xlate_tdm_slot_mask(slots, &tx_mask, &rx_mask);
+ ret = snd_soc_xlate_tdm_slot_mask(slots, &tx_mask, &rx_mask);
+ if (ret)
+ goto err;
dai->tx_mask = tx_mask;
dai->rx_mask = rx_mask;
@@ -282,6 +283,7 @@ int snd_soc_dai_set_tdm_slot(struct snd_soc_dai *dai,
dai->driver->ops->set_tdm_slot)
ret = dai->driver->ops->set_tdm_slot(dai, tx_mask, rx_mask,
slots, slot_width);
+err:
return soc_dai_ret(dai, ret);
}
EXPORT_SYMBOL_GPL(snd_soc_dai_set_tdm_slot);
diff --git a/sound/soc/soc-ops.c b/sound/soc/soc-ops.c
index b4cfc34d00ee..eff1355cc3df 100644
--- a/sound/soc/soc-ops.c
+++ b/sound/soc/soc-ops.c
@@ -638,6 +638,33 @@ int snd_soc_get_volsw_range(struct snd_kcontrol *kcontrol,
}
EXPORT_SYMBOL_GPL(snd_soc_get_volsw_range);
+static int snd_soc_clip_to_platform_max(struct snd_kcontrol *kctl)
+{
+ struct soc_mixer_control *mc = (struct soc_mixer_control *)kctl->private_value;
+ struct snd_ctl_elem_value uctl;
+ int ret;
+
+ if (!mc->platform_max)
+ return 0;
+
+ ret = kctl->get(kctl, &uctl);
+ if (ret < 0)
+ return ret;
+
+ if (uctl.value.integer.value[0] > mc->platform_max)
+ uctl.value.integer.value[0] = mc->platform_max;
+
+ if (snd_soc_volsw_is_stereo(mc) &&
+ uctl.value.integer.value[1] > mc->platform_max)
+ uctl.value.integer.value[1] = mc->platform_max;
+
+ ret = kctl->put(kctl, &uctl);
+ if (ret < 0)
+ return ret;
+
+ return 0;
+}
+
/**
* snd_soc_limit_volume - Set new limit to an existing volume control.
*
@@ -662,7 +689,7 @@ int snd_soc_limit_volume(struct snd_soc_card *card,
struct soc_mixer_control *mc = (struct soc_mixer_control *)kctl->private_value;
if (max <= mc->max - mc->min) {
mc->platform_max = max;
- ret = 0;
+ ret = snd_soc_clip_to_platform_max(kctl);
}
}
return ret;
diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c
index 835dc3404367..1e310958f8c0 100644
--- a/sound/soc/sunxi/sun4i-codec.c
+++ b/sound/soc/sunxi/sun4i-codec.c
@@ -25,6 +25,7 @@
#include <linux/gpio/consumer.h>
#include <sound/core.h>
+#include <sound/jack.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
@@ -239,6 +240,7 @@ struct sun4i_codec {
struct clk *clk_module;
struct reset_control *rst;
struct gpio_desc *gpio_pa;
+ struct gpio_desc *gpio_hp;
/* ADC_FIFOC register is at different offset on different SoCs */
struct regmap_field *reg_adc_fifoc;
@@ -1273,6 +1275,49 @@ static struct snd_soc_dai_driver dummy_cpu_dai = {
},
};
+static struct snd_soc_jack sun4i_headphone_jack;
+
+static struct snd_soc_jack_pin sun4i_headphone_jack_pins[] = {
+ { .pin = "Headphone", .mask = SND_JACK_HEADPHONE },
+};
+
+static struct snd_soc_jack_gpio sun4i_headphone_jack_gpio = {
+ .name = "hp-det",
+ .report = SND_JACK_HEADPHONE,
+ .debounce_time = 150,
+};
+
+static int sun4i_codec_machine_init(struct snd_soc_pcm_runtime *rtd)
+{
+ struct snd_soc_card *card = rtd->card;
+ struct sun4i_codec *scodec = snd_soc_card_get_drvdata(card);
+ int ret;
+
+ if (scodec->gpio_hp) {
+ ret = snd_soc_card_jack_new_pins(card, "Headphone Jack",
+ SND_JACK_HEADPHONE,
+ &sun4i_headphone_jack,
+ sun4i_headphone_jack_pins,
+ ARRAY_SIZE(sun4i_headphone_jack_pins));
+ if (ret) {
+ dev_err(rtd->dev,
+ "Headphone jack creation failed: %d\n", ret);
+ return ret;
+ }
+
+ sun4i_headphone_jack_gpio.desc = scodec->gpio_hp;
+ ret = snd_soc_jack_add_gpios(&sun4i_headphone_jack, 1,
+ &sun4i_headphone_jack_gpio);
+
+ if (ret) {
+ dev_err(rtd->dev, "Headphone GPIO not added: %d\n", ret);
+ return ret;
+ }
+ }
+
+ return 0;
+}
+
static struct snd_soc_dai_link *sun4i_codec_create_link(struct device *dev,
int *num_links)
{
@@ -1298,6 +1343,7 @@ static struct snd_soc_dai_link *sun4i_codec_create_link(struct device *dev,
link->codecs->name = dev_name(dev);
link->platforms->name = dev_name(dev);
link->dai_fmt = SND_SOC_DAIFMT_I2S;
+ link->init = sun4i_codec_machine_init;
*num_links = 1;
@@ -1738,6 +1784,13 @@ static int sun4i_codec_probe(struct platform_device *pdev)
return ret;
}
+ scodec->gpio_hp = devm_gpiod_get_optional(&pdev->dev, "hp-det", GPIOD_IN);
+ if (IS_ERR(scodec->gpio_hp)) {
+ ret = PTR_ERR(scodec->gpio_hp);
+ dev_err_probe(&pdev->dev, ret, "Failed to get hp-det gpio\n");
+ return ret;
+ }
+
/* reg_field setup */
scodec->reg_adc_fifoc = devm_regmap_field_alloc(&pdev->dev,
scodec->regmap,
diff --git a/tools/bpf/bpftool/common.c b/tools/bpf/bpftool/common.c
index db02b000fbeb..eea00bc15b5c 100644
--- a/tools/bpf/bpftool/common.c
+++ b/tools/bpf/bpftool/common.c
@@ -384,10 +384,11 @@ int get_fd_type(int fd)
p_err("can't read link type: %s", strerror(errno));
return -1;
}
- if (n == sizeof(path)) {
+ if (n == sizeof(buf)) {
p_err("can't read link type: path too long!");
return -1;
}
+ buf[n] = '\0';
if (strstr(buf, "bpf-map"))
return BPF_OBJ_MAP;
diff --git a/tools/build/Makefile.build b/tools/build/Makefile.build
index 715092fc6a23..6a043b729b36 100644
--- a/tools/build/Makefile.build
+++ b/tools/build/Makefile.build
@@ -130,6 +130,10 @@ objprefix := $(subst ./,,$(OUTPUT)$(dir)/)
obj-y := $(addprefix $(objprefix),$(obj-y))
subdir-obj-y := $(addprefix $(objprefix),$(subdir-obj-y))
+# Separate out test log files from real build objects.
+test-y := $(filter %_log, $(obj-y))
+obj-y := $(filter-out %_log, $(obj-y))
+
# Final '$(obj)-in.o' object
in-target := $(objprefix)$(obj)-in.o
@@ -140,7 +144,7 @@ $(subdir-y):
$(sort $(subdir-obj-y)): $(subdir-y) ;
-$(in-target): $(obj-y) FORCE
+$(in-target): $(obj-y) $(test-y) FORCE
$(call rule_mkdir)
$(call if_changed,$(host)ld_multi)
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index a0fb50718dae..98d5e566e058 100644
--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf/libbpf.c
@@ -1751,7 +1751,7 @@ static int set_kcfg_value_str(struct extern_desc *ext, char *ext_val,
}
len = strlen(value);
- if (value[len - 1] != '"') {
+ if (len < 2 || value[len - 1] != '"') {
pr_warn("extern (kcfg) '%s': invalid string config '%s'\n",
ext->name, value);
return -EINVAL;
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 828c91aaf55b..bf75628c5389 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -3083,7 +3083,7 @@ static int handle_insn_ops(struct instruction *insn,
if (update_cfi_state(insn, next_insn, &state->cfi, op))
return 1;
- if (!insn->alt_group)
+ if (!opts.uaccess || !insn->alt_group)
continue;
if (op->dest.type == OP_DEST_PUSHF) {
@@ -3535,6 +3535,9 @@ static int validate_branch(struct objtool_file *file, struct symbol *func,
return 0;
case INSN_STAC:
+ if (!opts.uaccess)
+ break;
+
if (state.uaccess) {
WARN_FUNC("recursive UACCESS enable", sec, insn->offset);
return 1;
@@ -3544,6 +3547,9 @@ static int validate_branch(struct objtool_file *file, struct symbol *func,
break;
case INSN_CLAC:
+ if (!opts.uaccess)
+ break;
+
if (!state.uaccess && func) {
WARN_FUNC("redundant UACCESS disable", sec, insn->offset);
return 1;
@@ -3956,7 +3962,8 @@ static int validate_symbol(struct objtool_file *file, struct section *sec,
if (!insn || insn->ignore || insn->visited)
return 0;
- state->uaccess = sym->uaccess_safe;
+ if (opts.uaccess)
+ state->uaccess = sym->uaccess_safe;
ret = validate_branch(file, insn->func, insn, *state);
if (ret && opts.backtrace)
diff --git a/tools/testing/kunit/qemu_configs/x86_64.py b/tools/testing/kunit/qemu_configs/x86_64.py
index dc7949076863..4a6bf4e048f5 100644
--- a/tools/testing/kunit/qemu_configs/x86_64.py
+++ b/tools/testing/kunit/qemu_configs/x86_64.py
@@ -7,4 +7,6 @@ CONFIG_SERIAL_8250_CONSOLE=y''',
qemu_arch='x86_64',
kernel_path='arch/x86/boot/bzImage',
kernel_command_line='console=ttyS0',
- extra_qemu_params=[])
+ # qboot is faster than SeaBIOS and doesn't mess up
+ # the terminal.
+ extra_qemu_params=['-bios', 'qboot.rom'])
diff --git a/tools/testing/selftests/bpf/prog_tests/sockmap_ktls.c b/tools/testing/selftests/bpf/prog_tests/sockmap_ktls.c
index 2d0796314862..0a99fd404f6d 100644
--- a/tools/testing/selftests/bpf/prog_tests/sockmap_ktls.c
+++ b/tools/testing/selftests/bpf/prog_tests/sockmap_ktls.c
@@ -68,7 +68,6 @@ static void test_sockmap_ktls_disconnect_after_delete(int family, int map)
goto close_cli;
err = disconnect(cli);
- ASSERT_OK(err, "disconnect");
close_cli:
close(cli);
diff --git a/tools/testing/selftests/net/gro.sh b/tools/testing/selftests/net/gro.sh
index 342ad27f631b..e771f5f7faa2 100755
--- a/tools/testing/selftests/net/gro.sh
+++ b/tools/testing/selftests/net/gro.sh
@@ -95,5 +95,6 @@ trap cleanup EXIT
if [[ "${test}" == "all" ]]; then
run_all_tests
else
- run_test "${proto}" "${test}"
+ exit_code=$(run_test "${proto}" "${test}")
+ exit $exit_code
fi;
Return-Path: <linux-kernel+bounces-673241-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 1C1BF41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:11:16 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 3FA6A189A5AB
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:11:02 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id B150C28FA8A;
Wed, 4 Jun 2025 13:08:03 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="ZWNtIOjc"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 00CEE28FFDB;
Wed, 4 Jun 2025 13:07:28 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749042449; cv=none; b=MKVKxwcTJ0Qww2vPnFLlUkWjmIMgryD6AzBuPk2k9iHfxRyu2yUhJwHp8jzhAfXboKGm71ijyCenWG87JXeOXsMz4leBCGuIy2zKIP+fdLn/JQD6gkmIGYASdd2jz7u+vuCPwc4YkmY4gBGzWGTUK10nWSkLP7P7YarzP64l1ds=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749042449; c=relaxed/simple;
bh=njxhi9iO6Am++QYa/a6pA+3Lb6XnbKB9A9YYji5FsAY=;
h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version:Content-Type; b=m30GtgT+cyll5lYl/xzAK4TK62vSqhXF5WtlMiLtCNY/p7Tsqz5IxE0IyBFXCWtA7Bt5BfOv8cptTsRIAFqYSZzCe077qMXvzkM02b+3RUH+YPDn37I7WC70eRHSCHcoKDZNyUEATHLI5T9pJeTJMhcfjwlChIBNknp2A/7bR+w=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ZWNtIOjc; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 46D28C4CEE7;
Wed, 4 Jun 2025 13:07:27 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org;
s=korg; t=1749042448;
bh=njxhi9iO6Am++QYa/a6pA+3Lb6XnbKB9A9YYji5FsAY=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=ZWNtIOjcp24nKA/beUqVuc8iy0ow0t4rvHPx+e1WyQ/WmqLPFrB/hghCOcN6TK5FL
qGV0WH6Ibt178cv9ZLpttYEYQ3nwGNc2zauNT0yjKeZVUWYvDyYr09C38Op4iEP75m
AHRBXcxdUsv13MC/hZaZ4b9/zMopPem6Ft5QTbMg=
From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
To: linux-kernel@xxxxxxxxxxxxxxx,
akpm@xxxxxxxxxxxxxxxxxxxx,
torvalds@xxxxxxxxxxxxxxxxxxxx,
stable@xxxxxxxxxxxxxxx
Cc: lwn@xxxxxxx,
jslaby@xxxxxxx,
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Subject: Re: Linux 6.6.93
Date: Wed, 4 Jun 2025 15:07:16 +0200
Message-ID: <2025060416-amnesty-emblaze-e63d@gregkh>
X-Mailer: git-send-email 2.49.0
In-Reply-To: <2025060416-stroller-construct-ec65@gregkh>
References: <2025060416-stroller-construct-ec65@gregkh>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
diff --git a/Documentation/ABI/stable/sysfs-driver-dma-idxd b/Documentation/ABI/stable/sysfs-driver-dma-idxd
index 825e619250bf..f2ec42949a54 100644
--- a/Documentation/ABI/stable/sysfs-driver-dma-idxd
+++ b/Documentation/ABI/stable/sysfs-driver-dma-idxd
@@ -270,6 +270,12 @@ Description: Shows the operation capability bits displayed in bitmap format
correlates to the operations allowed. It's visible only
on platforms that support the capability.
+What: /sys/bus/dsa/devices/wq<m>.<n>/driver_name
+Date: Sept 8, 2023
+KernelVersion: 6.7.0
+Contact: dmaengine@xxxxxxxxxxxxxxx
+Description: Name of driver to be bounded to the wq.
+
What: /sys/bus/dsa/devices/engine<m>.<n>/group_id
Date: Oct 25, 2019
KernelVersion: 5.6.0
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index f95734ceb82b..315a817e3380 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -5978,6 +5978,8 @@
Selecting 'on' will also enable the mitigation
against user space to user space task attacks.
+ Selecting specific mitigation does not force enable
+ user mitigations.
Selecting 'off' will disable both the kernel and
the user space protections.
diff --git a/Documentation/driver-api/serial/driver.rst b/Documentation/driver-api/serial/driver.rst
index 84b43061c11b..60434f2b0286 100644
--- a/Documentation/driver-api/serial/driver.rst
+++ b/Documentation/driver-api/serial/driver.rst
@@ -103,4 +103,4 @@ Some helpers are provided in order to set/get modem control lines via GPIO.
.. kernel-doc:: drivers/tty/serial/serial_mctrl_gpio.c
:identifiers: mctrl_gpio_init mctrl_gpio_free mctrl_gpio_to_gpiod
mctrl_gpio_set mctrl_gpio_get mctrl_gpio_enable_ms
- mctrl_gpio_disable_ms
+ mctrl_gpio_disable_ms_sync mctrl_gpio_disable_ms_no_sync
diff --git a/Documentation/hwmon/dell-smm-hwmon.rst b/Documentation/hwmon/dell-smm-hwmon.rst
index d8f1d6859b96..1c12fbba440b 100644
--- a/Documentation/hwmon/dell-smm-hwmon.rst
+++ b/Documentation/hwmon/dell-smm-hwmon.rst
@@ -32,12 +32,12 @@ Temperature sensors and fans can be queried and set via the standard
=============================== ======= =======================================
Name Perm Description
=============================== ======= =======================================
-fan[1-3]_input RO Fan speed in RPM.
-fan[1-3]_label RO Fan label.
-fan[1-3]_min RO Minimal Fan speed in RPM
-fan[1-3]_max RO Maximal Fan speed in RPM
-fan[1-3]_target RO Expected Fan speed in RPM
-pwm[1-3] RW Control the fan PWM duty-cycle.
+fan[1-4]_input RO Fan speed in RPM.
+fan[1-4]_label RO Fan label.
+fan[1-4]_min RO Minimal Fan speed in RPM
+fan[1-4]_max RO Maximal Fan speed in RPM
+fan[1-4]_target RO Expected Fan speed in RPM
+pwm[1-4] RW Control the fan PWM duty-cycle.
pwm1_enable WO Enable or disable automatic BIOS fan
control (not supported on all laptops,
see below for details).
@@ -93,7 +93,7 @@ Again, when you find new codes, we'd be happy to have your patches!
---------------------------
The driver also exports the fans as thermal cooling devices with
-``type`` set to ``dell-smm-fan[1-3]``. This allows for easy fan control
+``type`` set to ``dell-smm-fan[1-4]``. This allows for easy fan control
using one of the thermal governors.
Module parameters
diff --git a/Makefile b/Makefile
index 51d975b35551..c9a1e2286b3a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 6
PATCHLEVEL = 6
-SUBLEVEL = 92
+SUBLEVEL = 93
EXTRAVERSION =
NAME = Pinguïn Aangedreven
diff --git a/arch/arm/boot/dts/nvidia/tegra114.dtsi b/arch/arm/boot/dts/nvidia/tegra114.dtsi
index 86f14e2fd29f..6c057b506951 100644
--- a/arch/arm/boot/dts/nvidia/tegra114.dtsi
+++ b/arch/arm/boot/dts/nvidia/tegra114.dtsi
@@ -139,7 +139,7 @@ dsib: dsi@54400000 {
reg = <0x54400000 0x00040000>;
clocks = <&tegra_car TEGRA114_CLK_DSIB>,
<&tegra_car TEGRA114_CLK_DSIBLP>,
- <&tegra_car TEGRA114_CLK_PLL_D2_OUT0>;
+ <&tegra_car TEGRA114_CLK_PLL_D_OUT0>;
clock-names = "dsi", "lp", "parent";
resets = <&tegra_car 82>;
reset-names = "dsi";
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
index 22ecaf09d00f..f635ad29511f 100644
--- a/arch/arm/mach-at91/pm.c
+++ b/arch/arm/mach-at91/pm.c
@@ -538,11 +538,12 @@ extern u32 at91_pm_suspend_in_sram_sz;
static int at91_suspend_finish(unsigned long val)
{
- unsigned char modified_gray_code[] = {
- 0x00, 0x01, 0x02, 0x03, 0x06, 0x07, 0x04, 0x05, 0x0c, 0x0d,
- 0x0e, 0x0f, 0x0a, 0x0b, 0x08, 0x09, 0x18, 0x19, 0x1a, 0x1b,
- 0x1e, 0x1f, 0x1c, 0x1d, 0x14, 0x15, 0x16, 0x17, 0x12, 0x13,
- 0x10, 0x11,
+ /* SYNOPSYS workaround to fix a bug in the calibration logic */
+ unsigned char modified_fix_code[] = {
+ 0x00, 0x01, 0x01, 0x06, 0x07, 0x0c, 0x06, 0x07, 0x0b, 0x18,
+ 0x0a, 0x0b, 0x0c, 0x0d, 0x0d, 0x0a, 0x13, 0x13, 0x12, 0x13,
+ 0x14, 0x15, 0x15, 0x12, 0x18, 0x19, 0x19, 0x1e, 0x1f, 0x14,
+ 0x1e, 0x1f,
};
unsigned int tmp, index;
int i;
@@ -553,25 +554,25 @@ static int at91_suspend_finish(unsigned long val)
* restore the ZQ0SR0 with the value saved here. But the
* calibration is buggy and restoring some values from ZQ0SR0
* is forbidden and risky thus we need to provide processed
- * values for these (modified gray code values).
+ * values for these.
*/
tmp = readl(soc_pm.data.ramc_phy + DDR3PHY_ZQ0SR0);
/* Store pull-down output impedance select. */
index = (tmp >> DDR3PHY_ZQ0SR0_PDO_OFF) & 0x1f;
- soc_pm.bu->ddr_phy_calibration[0] = modified_gray_code[index];
+ soc_pm.bu->ddr_phy_calibration[0] = modified_fix_code[index] << DDR3PHY_ZQ0SR0_PDO_OFF;
/* Store pull-up output impedance select. */
index = (tmp >> DDR3PHY_ZQ0SR0_PUO_OFF) & 0x1f;
- soc_pm.bu->ddr_phy_calibration[0] |= modified_gray_code[index];
+ soc_pm.bu->ddr_phy_calibration[0] |= modified_fix_code[index] << DDR3PHY_ZQ0SR0_PUO_OFF;
/* Store pull-down on-die termination impedance select. */
index = (tmp >> DDR3PHY_ZQ0SR0_PDODT_OFF) & 0x1f;
- soc_pm.bu->ddr_phy_calibration[0] |= modified_gray_code[index];
+ soc_pm.bu->ddr_phy_calibration[0] |= modified_fix_code[index] << DDR3PHY_ZQ0SR0_PDODT_OFF;
/* Store pull-up on-die termination impedance select. */
index = (tmp >> DDR3PHY_ZQ0SRO_PUODT_OFF) & 0x1f;
- soc_pm.bu->ddr_phy_calibration[0] |= modified_gray_code[index];
+ soc_pm.bu->ddr_phy_calibration[0] |= modified_fix_code[index] << DDR3PHY_ZQ0SRO_PUODT_OFF;
/*
* The 1st 8 words of memory might get corrupted in the process
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
index 381d58cea092..c854c7e31051 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
@@ -151,28 +151,12 @@ &pio {
vcc-pg-supply = <®_aldo1>;
};
-&r_ir {
- linux,rc-map-name = "rc-beelink-gs1";
- status = "okay";
-};
-
-&r_pio {
- /*
- * FIXME: We can't add that supply for now since it would
- * create a circular dependency between pinctrl, the regulator
- * and the RSB Bus.
- *
- * vcc-pl-supply = <®_aldo1>;
- */
- vcc-pm-supply = <®_aldo1>;
-};
-
-&r_rsb {
+&r_i2c {
status = "okay";
- axp805: pmic@745 {
+ axp805: pmic@36 {
compatible = "x-powers,axp805", "x-powers,axp806";
- reg = <0x745>;
+ reg = <0x36>;
interrupt-parent = <&r_intc>;
interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_LOW>;
interrupt-controller;
@@ -290,6 +274,22 @@ sw {
};
};
+&r_ir {
+ linux,rc-map-name = "rc-beelink-gs1";
+ status = "okay";
+};
+
+&r_pio {
+ /*
+ * PL0 and PL1 are used for PMIC I2C
+ * don't enable the pl-supply else
+ * it will fail at boot
+ *
+ * vcc-pl-supply = <®_aldo1>;
+ */
+ vcc-pm-supply = <®_aldo1>;
+};
+
&spdif {
pinctrl-names = "default";
pinctrl-0 = <&spdif_tx_pin>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
index 6fc65e8db220..8c476e089185 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-3.dts
@@ -175,16 +175,12 @@ &pio {
vcc-pg-supply = <®_vcc_wifi_io>;
};
-&r_ir {
- status = "okay";
-};
-
-&r_rsb {
+&r_i2c {
status = "okay";
- axp805: pmic@745 {
+ axp805: pmic@36 {
compatible = "x-powers,axp805", "x-powers,axp806";
- reg = <0x745>;
+ reg = <0x36>;
interrupt-parent = <&r_intc>;
interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_LOW>;
interrupt-controller;
@@ -295,6 +291,10 @@ sw {
};
};
+&r_ir {
+ status = "okay";
+};
+
&rtc {
clocks = <&ext_osc32k>;
};
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
index 92745128fcfe..4ec4996592be 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi.dtsi
@@ -112,20 +112,12 @@ &pio {
vcc-pg-supply = <®_aldo1>;
};
-&r_ir {
- status = "okay";
-};
-
-&r_pio {
- vcc-pm-supply = <®_bldo3>;
-};
-
-&r_rsb {
+&r_i2c {
status = "okay";
- axp805: pmic@745 {
+ axp805: pmic@36 {
compatible = "x-powers,axp805", "x-powers,axp806";
- reg = <0x745>;
+ reg = <0x36>;
interrupt-parent = <&r_intc>;
interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_LOW>;
interrupt-controller;
@@ -240,6 +232,14 @@ sw {
};
};
+&r_ir {
+ status = "okay";
+};
+
+&r_pio {
+ vcc-pm-supply = <®_bldo3>;
+};
+
&rtc {
clocks = <&ext_osc32k>;
};
diff --git a/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dtsi b/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dtsi
index 3f79923376fb..37244e8816d9 100644
--- a/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dtsi
@@ -26,6 +26,8 @@ memory@0 {
leds {
compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi_quad_pins>;
led-power1 {
label = "udpu:green:power";
@@ -82,8 +84,6 @@ &sdhci0 {
&spi0 {
status = "okay";
- pinctrl-names = "default";
- pinctrl-0 = <&spi_quad_pins>;
flash@0 {
compatible = "jedec,spi-nor";
@@ -108,6 +108,10 @@ partition@180000 {
};
};
+&spi_quad_pins {
+ function = "gpio";
+};
+
&pinctrl_nb {
i2c2_recovery_pins: i2c2-recovery-pins {
groups = "i2c2";
diff --git a/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi b/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi
index b4a1108c2dd7..0639f5ce1bd9 100644
--- a/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi
+++ b/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi
@@ -1635,7 +1635,7 @@ vdd_1v8_dis: regulator-vdd-1v8-dis {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-always-on;
- gpio = <&exp1 14 GPIO_ACTIVE_HIGH>;
+ gpio = <&exp1 9 GPIO_ACTIVE_HIGH>;
enable-active-high;
vin-supply = <&vdd_1v8>;
};
diff --git a/arch/arm64/boot/dts/nvidia/tegra234-p3740-0002+p3701-0008.dts b/arch/arm64/boot/dts/nvidia/tegra234-p3740-0002+p3701-0008.dts
index bac611d735c5..2fa48972b2a9 100644
--- a/arch/arm64/boot/dts/nvidia/tegra234-p3740-0002+p3701-0008.dts
+++ b/arch/arm64/boot/dts/nvidia/tegra234-p3740-0002+p3701-0008.dts
@@ -102,6 +102,16 @@ pcie@14160000 {
};
pcie@141a0000 {
+ reg = <0x00 0x141a0000 0x0 0x00020000 /* appl registers (128K) */
+ 0x00 0x3a000000 0x0 0x00040000 /* configuration space (256K) */
+ 0x00 0x3a040000 0x0 0x00040000 /* iATU_DMA reg space (256K) */
+ 0x00 0x3a080000 0x0 0x00040000 /* DBI reg space (256K) */
+ 0x2e 0x20000000 0x0 0x10000000>; /* ECAM (256MB) */
+
+ ranges = <0x81000000 0x00 0x3a100000 0x00 0x3a100000 0x0 0x00100000 /* downstream I/O (1MB) */
+ 0x82000000 0x00 0x40000000 0x2e 0x30000000 0x0 0x08000000 /* non-prefetchable memory (128MB) */
+ 0xc3000000 0x28 0x00000000 0x28 0x00000000 0x6 0x20000000>; /* prefetchable memory (25088MB) */
+
status = "okay";
vddio-pex-ctl-supply = <&vdd_1v8_ls>;
phys = <&p2u_nvhs_0>, <&p2u_nvhs_1>, <&p2u_nvhs_2>,
diff --git a/arch/arm64/boot/dts/qcom/ipq9574.dtsi b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
index 8a72ad4afd03..82e4fd5eb388 100644
--- a/arch/arm64/boot/dts/qcom/ipq9574.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
@@ -231,6 +231,8 @@ cryptobam: dma-controller@704000 {
interrupts = <GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>;
#dma-cells = <1>;
qcom,ee = <1>;
+ qcom,num-ees = <4>;
+ num-channels = <16>;
qcom,controlled-remotely;
};
diff --git a/arch/arm64/boot/dts/qcom/sm8350.dtsi b/arch/arm64/boot/dts/qcom/sm8350.dtsi
index 2a4d950ac02b..5376c0a00fab 100644
--- a/arch/arm64/boot/dts/qcom/sm8350.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8350.dtsi
@@ -442,7 +442,7 @@ cdsp_secure_heap: memory@80c00000 {
no-map;
};
- pil_camera_mem: mmeory@85200000 {
+ pil_camera_mem: memory@85200000 {
reg = <0x0 0x85200000 0x0 0x500000>;
no-map;
};
diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi
index 3b4d78823008..c1ed39cac8c5 100644
--- a/arch/arm64/boot/dts/qcom/sm8450.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi
@@ -4233,6 +4233,8 @@ cryptobam: dma-controller@1dc4000 {
interrupts = <GIC_SPI 272 IRQ_TYPE_LEVEL_HIGH>;
#dma-cells = <1>;
qcom,ee = <0>;
+ qcom,num-ees = <4>;
+ num-channels = <16>;
qcom,controlled-remotely;
iommus = <&apps_smmu 0x584 0x11>,
<&apps_smmu 0x588 0x0>,
diff --git a/arch/arm64/boot/dts/qcom/sm8550.dtsi b/arch/arm64/boot/dts/qcom/sm8550.dtsi
index bc9a1fca2db3..c14c6f8583d5 100644
--- a/arch/arm64/boot/dts/qcom/sm8550.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8550.dtsi
@@ -1866,6 +1866,8 @@ cryptobam: dma-controller@1dc4000 {
interrupts = <GIC_SPI 272 IRQ_TYPE_LEVEL_HIGH>;
#dma-cells = <1>;
qcom,ee = <0>;
+ qcom,num-ees = <4>;
+ num-channels = <20>;
qcom,controlled-remotely;
iommus = <&apps_smmu 0x480 0x0>,
<&apps_smmu 0x481 0x0>;
diff --git a/arch/arm64/boot/dts/ti/k3-am68-sk-base-board.dts b/arch/arm64/boot/dts/ti/k3-am68-sk-base-board.dts
index 5df5946687b3..2e92f4174b3c 100644
--- a/arch/arm64/boot/dts/ti/k3-am68-sk-base-board.dts
+++ b/arch/arm64/boot/dts/ti/k3-am68-sk-base-board.dts
@@ -43,6 +43,17 @@ vusb_main: regulator-vusb-main5v0 {
regulator-boot-on;
};
+ vsys_5v0: regulator-vsys5v0 {
+ /* Output of LM61460 */
+ compatible = "regulator-fixed";
+ regulator-name = "vsys_5v0";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vusb_main>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
vsys_3v3: regulator-vsys3v3 {
/* Output of LM5141 */
compatible = "regulator-fixed";
@@ -75,7 +86,7 @@ vdd_sd_dv: regulator-tlv71033 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
regulator-boot-on;
- vin-supply = <&vsys_3v3>;
+ vin-supply = <&vsys_5v0>;
gpios = <&main_gpio0 49 GPIO_ACTIVE_HIGH>;
states = <1800000 0x0>,
<3300000 0x1>;
diff --git a/arch/arm64/boot/dts/xilinx/zynqmp-clk-ccf.dtsi b/arch/arm64/boot/dts/xilinx/zynqmp-clk-ccf.dtsi
index ccaca29200bb..995bd8ce9d43 100644
--- a/arch/arm64/boot/dts/xilinx/zynqmp-clk-ccf.dtsi
+++ b/arch/arm64/boot/dts/xilinx/zynqmp-clk-ccf.dtsi
@@ -10,39 +10,44 @@
#include <dt-bindings/clock/xlnx-zynqmp-clk.h>
/ {
- pss_ref_clk: pss_ref_clk {
+ pss_ref_clk: pss-ref-clk {
bootph-all;
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <33333333>;
+ clock-output-names = "pss_ref_clk";
};
- video_clk: video_clk {
+ video_clk: video-clk {
bootph-all;
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <27000000>;
+ clock-output-names = "video_clk";
};
- pss_alt_ref_clk: pss_alt_ref_clk {
+ pss_alt_ref_clk: pss-alt-ref-clk {
bootph-all;
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <0>;
+ clock-output-names = "pss_alt_ref_clk";
};
- gt_crx_ref_clk: gt_crx_ref_clk {
+ gt_crx_ref_clk: gt-crx-ref-clk {
bootph-all;
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <108000000>;
+ clock-output-names = "gt_crx_ref_clk";
};
- aux_ref_clk: aux_ref_clk {
+ aux_ref_clk: aux-ref-clk {
bootph-all;
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <27000000>;
+ clock-output-names = "aux_ref_clk";
};
};
diff --git a/arch/arm64/include/asm/cputype.h b/arch/arm64/include/asm/cputype.h
index 8a6b7feca3e4..d92a0203e5a9 100644
--- a/arch/arm64/include/asm/cputype.h
+++ b/arch/arm64/include/asm/cputype.h
@@ -132,6 +132,7 @@
#define FUJITSU_CPU_PART_A64FX 0x001
#define HISI_CPU_PART_TSV110 0xD01
+#define HISI_CPU_PART_HIP09 0xD02
#define APPLE_CPU_PART_M1_ICESTORM 0x022
#define APPLE_CPU_PART_M1_FIRESTORM 0x023
@@ -208,6 +209,7 @@
#define MIDR_NVIDIA_CARMEL MIDR_CPU_MODEL(ARM_CPU_IMP_NVIDIA, NVIDIA_CPU_PART_CARMEL)
#define MIDR_FUJITSU_A64FX MIDR_CPU_MODEL(ARM_CPU_IMP_FUJITSU, FUJITSU_CPU_PART_A64FX)
#define MIDR_HISI_TSV110 MIDR_CPU_MODEL(ARM_CPU_IMP_HISI, HISI_CPU_PART_TSV110)
+#define MIDR_HISI_HIP09 MIDR_CPU_MODEL(ARM_CPU_IMP_HISI, HISI_CPU_PART_HIP09)
#define MIDR_APPLE_M1_ICESTORM MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_M1_ICESTORM)
#define MIDR_APPLE_M1_FIRESTORM MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_M1_FIRESTORM)
#define MIDR_APPLE_M1_ICESTORM_PRO MIDR_CPU_MODEL(ARM_CPU_IMP_APPLE, APPLE_CPU_PART_M1_ICESTORM_PRO)
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
index 07bdf5dd8ebe..0212129b13d0 100644
--- a/arch/arm64/include/asm/pgtable.h
+++ b/arch/arm64/include/asm/pgtable.h
@@ -679,7 +679,8 @@ static inline unsigned long pmd_page_vaddr(pmd_t pmd)
pr_err("%s:%d: bad pmd %016llx.\n", __FILE__, __LINE__, pmd_val(e))
#define pud_none(pud) (!pud_val(pud))
-#define pud_bad(pud) (!pud_table(pud))
+#define pud_bad(pud) ((pud_val(pud) & PUD_TYPE_MASK) != \
+ PUD_TYPE_TABLE)
#define pud_present(pud) pte_present(pud_pte(pud))
#define pud_leaf(pud) (pud_present(pud) && !pud_table(pud))
#define pud_valid(pud) pte_valid(pud_pte(pud))
diff --git a/arch/arm64/kernel/proton-pack.c b/arch/arm64/kernel/proton-pack.c
index 28c48bc9c095..2c81e0efaf37 100644
--- a/arch/arm64/kernel/proton-pack.c
+++ b/arch/arm64/kernel/proton-pack.c
@@ -904,6 +904,7 @@ static u8 spectre_bhb_loop_affected(void)
MIDR_ALL_VERSIONS(MIDR_CORTEX_A77),
MIDR_ALL_VERSIONS(MIDR_NEOVERSE_N1),
MIDR_ALL_VERSIONS(MIDR_QCOM_KRYO_4XX_GOLD),
+ MIDR_ALL_VERSIONS(MIDR_HISI_HIP09),
{},
};
static const struct midr_range spectre_bhb_k11_list[] = {
diff --git a/arch/mips/include/asm/ftrace.h b/arch/mips/include/asm/ftrace.h
index db497a8167da..e3212f44446f 100644
--- a/arch/mips/include/asm/ftrace.h
+++ b/arch/mips/include/asm/ftrace.h
@@ -87,4 +87,20 @@ struct dyn_arch_ftrace {
#endif /* CONFIG_DYNAMIC_FTRACE */
#endif /* __ASSEMBLY__ */
#endif /* CONFIG_FUNCTION_TRACER */
+
+#ifdef CONFIG_FTRACE_SYSCALLS
+#ifndef __ASSEMBLY__
+/*
+ * Some syscall entry functions on mips start with "__sys_" (fork and clone,
+ * for instance). We should also match the sys_ variant with those.
+ */
+#define ARCH_HAS_SYSCALL_MATCH_SYM_NAME
+static inline bool arch_syscall_match_sym_name(const char *sym,
+ const char *name)
+{
+ return !strcmp(sym, name) ||
+ (!strncmp(sym, "__sys_", 6) && !strcmp(sym + 6, name + 4));
+}
+#endif /* __ASSEMBLY__ */
+#endif /* CONFIG_FTRACE_SYSCALLS */
#endif /* _ASM_MIPS_FTRACE_H */
diff --git a/arch/mips/kernel/pm-cps.c b/arch/mips/kernel/pm-cps.c
index 9bf60d7d44d3..a7bcf2b814c8 100644
--- a/arch/mips/kernel/pm-cps.c
+++ b/arch/mips/kernel/pm-cps.c
@@ -56,10 +56,7 @@ static DEFINE_PER_CPU_ALIGNED(u32*, ready_count);
/* Indicates online CPUs coupled with the current CPU */
static DEFINE_PER_CPU_ALIGNED(cpumask_t, online_coupled);
-/*
- * Used to synchronize entry to deep idle states. Actually per-core rather
- * than per-CPU.
- */
+/* Used to synchronize entry to deep idle states */
static DEFINE_PER_CPU_ALIGNED(atomic_t, pm_barrier);
/* Saved CPU state across the CPS_PM_POWER_GATED state */
@@ -118,9 +115,10 @@ int cps_pm_enter_state(enum cps_pm_state state)
cps_nc_entry_fn entry;
struct core_boot_config *core_cfg;
struct vpe_boot_config *vpe_cfg;
+ atomic_t *barrier;
/* Check that there is an entry function for this state */
- entry = per_cpu(nc_asm_enter, core)[state];
+ entry = per_cpu(nc_asm_enter, cpu)[state];
if (!entry)
return -EINVAL;
@@ -156,7 +154,7 @@ int cps_pm_enter_state(enum cps_pm_state state)
smp_mb__after_atomic();
/* Create a non-coherent mapping of the core ready_count */
- core_ready_count = per_cpu(ready_count, core);
+ core_ready_count = per_cpu(ready_count, cpu);
nc_addr = kmap_noncoherent(virt_to_page(core_ready_count),
(unsigned long)core_ready_count);
nc_addr += ((unsigned long)core_ready_count & ~PAGE_MASK);
@@ -164,7 +162,8 @@ int cps_pm_enter_state(enum cps_pm_state state)
/* Ensure ready_count is zero-initialised before the assembly runs */
WRITE_ONCE(*nc_core_ready_count, 0);
- coupled_barrier(&per_cpu(pm_barrier, core), online);
+ barrier = &per_cpu(pm_barrier, cpumask_first(&cpu_sibling_map[cpu]));
+ coupled_barrier(barrier, online);
/* Run the generated entry code */
left = entry(online, nc_core_ready_count);
@@ -635,12 +634,14 @@ static void *cps_gen_entry_code(unsigned cpu, enum cps_pm_state state)
static int cps_pm_online_cpu(unsigned int cpu)
{
- enum cps_pm_state state;
- unsigned core = cpu_core(&cpu_data[cpu]);
+ unsigned int sibling, core;
void *entry_fn, *core_rc;
+ enum cps_pm_state state;
+
+ core = cpu_core(&cpu_data[cpu]);
for (state = CPS_PM_NC_WAIT; state < CPS_PM_STATE_COUNT; state++) {
- if (per_cpu(nc_asm_enter, core)[state])
+ if (per_cpu(nc_asm_enter, cpu)[state])
continue;
if (!test_bit(state, state_support))
continue;
@@ -652,16 +653,19 @@ static int cps_pm_online_cpu(unsigned int cpu)
clear_bit(state, state_support);
}
- per_cpu(nc_asm_enter, core)[state] = entry_fn;
+ for_each_cpu(sibling, &cpu_sibling_map[cpu])
+ per_cpu(nc_asm_enter, sibling)[state] = entry_fn;
}
- if (!per_cpu(ready_count, core)) {
+ if (!per_cpu(ready_count, cpu)) {
core_rc = kmalloc(sizeof(u32), GFP_KERNEL);
if (!core_rc) {
pr_err("Failed allocate core %u ready_count\n", core);
return -ENOMEM;
}
- per_cpu(ready_count, core) = core_rc;
+
+ for_each_cpu(sibling, &cpu_sibling_map[cpu])
+ per_cpu(ready_count, sibling) = core_rc;
}
return 0;
diff --git a/arch/powerpc/include/asm/mmzone.h b/arch/powerpc/include/asm/mmzone.h
index da827d2d0866..f2c4457c94c3 100644
--- a/arch/powerpc/include/asm/mmzone.h
+++ b/arch/powerpc/include/asm/mmzone.h
@@ -35,6 +35,7 @@ extern cpumask_var_t node_to_cpumask_map[];
#ifdef CONFIG_MEMORY_HOTPLUG
extern unsigned long max_pfn;
u64 memory_hotplug_max(void);
+u64 hot_add_drconf_memory_max(void);
#else
#define memory_hotplug_max() memblock_end_of_DRAM()
#endif
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index a6090896f749..ac669e58e202 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -2974,11 +2974,11 @@ static void __init fixup_device_tree_pmac(void)
char type[8];
phandle node;
- // Some pmacs are missing #size-cells on escc nodes
+ // Some pmacs are missing #size-cells on escc or i2s nodes
for (node = 0; prom_next_node(&node); ) {
type[0] = '\0';
prom_getprop(node, "device_type", type, sizeof(type));
- if (prom_strcmp(type, "escc"))
+ if (prom_strcmp(type, "escc") && prom_strcmp(type, "i2s"))
continue;
if (prom_getproplen(node, "#size-cells") != PROM_ERROR)
diff --git a/arch/powerpc/mm/book3s64/radix_pgtable.c b/arch/powerpc/mm/book3s64/radix_pgtable.c
index 28460e334080..aff3b37e32d6 100644
--- a/arch/powerpc/mm/book3s64/radix_pgtable.c
+++ b/arch/powerpc/mm/book3s64/radix_pgtable.c
@@ -912,7 +912,7 @@ int __meminit radix__vmemmap_create_mapping(unsigned long start,
return 0;
}
-
+#ifdef CONFIG_ARCH_WANT_OPTIMIZE_DAX_VMEMMAP
bool vmemmap_can_optimize(struct vmem_altmap *altmap, struct dev_pagemap *pgmap)
{
if (radix_enabled())
@@ -920,6 +920,7 @@ bool vmemmap_can_optimize(struct vmem_altmap *altmap, struct dev_pagemap *pgmap)
return false;
}
+#endif
int __meminit vmemmap_check_pmd(pmd_t *pmdp, int node,
unsigned long addr, unsigned long next)
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index f6c4ace3b221..65a9df0b9e5a 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -1342,7 +1342,7 @@ int hot_add_scn_to_nid(unsigned long scn_addr)
return nid;
}
-static u64 hot_add_drconf_memory_max(void)
+u64 hot_add_drconf_memory_max(void)
{
struct device_node *memory = NULL;
struct device_node *dn = NULL;
diff --git a/arch/powerpc/perf/core-book3s.c b/arch/powerpc/perf/core-book3s.c
index 10b946e9c6e7..4bb84dc4393f 100644
--- a/arch/powerpc/perf/core-book3s.c
+++ b/arch/powerpc/perf/core-book3s.c
@@ -2229,6 +2229,10 @@ static struct pmu power_pmu = {
#define PERF_SAMPLE_ADDR_TYPE (PERF_SAMPLE_ADDR | \
PERF_SAMPLE_PHYS_ADDR | \
PERF_SAMPLE_DATA_PAGE_SIZE)
+
+#define SIER_TYPE_SHIFT 15
+#define SIER_TYPE_MASK (0x7ull << SIER_TYPE_SHIFT)
+
/*
* A counter has overflowed; update its count and record
* things if requested. Note that interrupts are hard-disabled
@@ -2297,6 +2301,22 @@ static void record_and_restart(struct perf_event *event, unsigned long val,
is_kernel_addr(mfspr(SPRN_SIAR)))
record = 0;
+ /*
+ * SIER[46-48] presents instruction type of the sampled instruction.
+ * In ISA v3.0 and before values "0" and "7" are considered reserved.
+ * In ISA v3.1, value "7" has been used to indicate "larx/stcx".
+ * Drop the sample if "type" has reserved values for this field with a
+ * ISA version check.
+ */
+ if (event->attr.sample_type & PERF_SAMPLE_DATA_SRC &&
+ ppmu->get_mem_data_src) {
+ val = (regs->dar & SIER_TYPE_MASK) >> SIER_TYPE_SHIFT;
+ if (val == 0 || (val == 7 && !cpu_has_feature(CPU_FTR_ARCH_31))) {
+ record = 0;
+ atomic64_inc(&event->lost_samples);
+ }
+ }
+
/*
* Finally record data if requested.
*/
diff --git a/arch/powerpc/perf/isa207-common.c b/arch/powerpc/perf/isa207-common.c
index 56301b2bc8ae..031a2b63c171 100644
--- a/arch/powerpc/perf/isa207-common.c
+++ b/arch/powerpc/perf/isa207-common.c
@@ -321,8 +321,10 @@ void isa207_get_mem_data_src(union perf_mem_data_src *dsrc, u32 flags,
sier = mfspr(SPRN_SIER);
val = (sier & ISA207_SIER_TYPE_MASK) >> ISA207_SIER_TYPE_SHIFT;
- if (val != 1 && val != 2 && !(val == 7 && cpu_has_feature(CPU_FTR_ARCH_31)))
+ if (val != 1 && val != 2 && !(val == 7 && cpu_has_feature(CPU_FTR_ARCH_31))) {
+ dsrc->val = 0;
return;
+ }
idx = (sier & ISA207_SIER_LDST_MASK) >> ISA207_SIER_LDST_SHIFT;
sub_idx = (sier & ISA207_SIER_DATA_SRC_MASK) >> ISA207_SIER_DATA_SRC_SHIFT;
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
index b1e6d275cda9..bf02f94a973d 100644
--- a/arch/powerpc/platforms/pseries/iommu.c
+++ b/arch/powerpc/platforms/pseries/iommu.c
@@ -1183,17 +1183,13 @@ static LIST_HEAD(failed_ddw_pdn_list);
static phys_addr_t ddw_memory_hotplug_max(void)
{
- resource_size_t max_addr = memory_hotplug_max();
- struct device_node *memory;
+ resource_size_t max_addr;
- for_each_node_by_type(memory, "memory") {
- struct resource res;
-
- if (of_address_to_resource(memory, 0, &res))
- continue;
-
- max_addr = max_t(resource_size_t, max_addr, res.end + 1);
- }
+#if defined(CONFIG_NUMA) && defined(CONFIG_MEMORY_HOTPLUG)
+ max_addr = hot_add_drconf_memory_max();
+#else
+ max_addr = memblock_end_of_DRAM();
+#endif
return max_addr;
}
@@ -1471,7 +1467,7 @@ static bool enable_ddw(struct pci_dev *dev, struct device_node *pdn)
window->direct = true;
/* DDW maps the whole partition, so enable direct DMA mapping */
- ret = walk_system_ram_range(0, memblock_end_of_DRAM() >> PAGE_SHIFT,
+ ret = walk_system_ram_range(0, ddw_memory_hotplug_max() >> PAGE_SHIFT,
win64->value, tce_setrange_multi_pSeriesLP_walk);
if (ret) {
dev_info(&dev->dev, "failed to map DMA window for %pOF: %d\n",
@@ -1658,11 +1654,17 @@ static int iommu_mem_notifier(struct notifier_block *nb, unsigned long action,
struct memory_notify *arg = data;
int ret = 0;
+ /* This notifier can get called when onlining persistent memory as well.
+ * TCEs are not pre-mapped for persistent memory. Persistent memory will
+ * always be above ddw_memory_hotplug_max()
+ */
+
switch (action) {
case MEM_GOING_ONLINE:
spin_lock(&dma_win_list_lock);
list_for_each_entry(window, &dma_win_list, list) {
- if (window->direct) {
+ if (window->direct && (arg->start_pfn << PAGE_SHIFT) <
+ ddw_memory_hotplug_max()) {
ret |= tce_setrange_multi_pSeriesLP(arg->start_pfn,
arg->nr_pages, window->prop);
}
@@ -1674,7 +1676,8 @@ static int iommu_mem_notifier(struct notifier_block *nb, unsigned long action,
case MEM_OFFLINE:
spin_lock(&dma_win_list_lock);
list_for_each_entry(window, &dma_win_list, list) {
- if (window->direct) {
+ if (window->direct && (arg->start_pfn << PAGE_SHIFT) <
+ ddw_memory_hotplug_max()) {
ret |= tce_clearrange_multi_pSeriesLP(arg->start_pfn,
arg->nr_pages, window->prop);
}
diff --git a/arch/riscv/include/asm/page.h b/arch/riscv/include/asm/page.h
index 4d1f58848129..dbb9d0d0f405 100644
--- a/arch/riscv/include/asm/page.h
+++ b/arch/riscv/include/asm/page.h
@@ -26,12 +26,9 @@
* When not using MMU this corresponds to the first free page in
* physical memory (aligned on a page boundary).
*/
-#ifdef CONFIG_64BIT
#ifdef CONFIG_MMU
+#ifdef CONFIG_64BIT
#define PAGE_OFFSET kernel_map.page_offset
-#else
-#define PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL)
-#endif
/*
* By default, CONFIG_PAGE_OFFSET value corresponds to SV57 address space so
* define the PAGE_OFFSET value for SV48 and SV39.
@@ -41,6 +38,9 @@
#else
#define PAGE_OFFSET _AC(CONFIG_PAGE_OFFSET, UL)
#endif /* CONFIG_64BIT */
+#else
+#define PAGE_OFFSET ((unsigned long)phys_ram_base)
+#endif /* CONFIG_MMU */
#ifndef __ASSEMBLY__
@@ -97,11 +97,7 @@ typedef struct page *pgtable_t;
#define MIN_MEMBLOCK_ADDR 0
#endif
-#ifdef CONFIG_MMU
#define ARCH_PFN_OFFSET (PFN_DOWN((unsigned long)phys_ram_base))
-#else
-#define ARCH_PFN_OFFSET (PAGE_OFFSET >> PAGE_SHIFT)
-#endif /* CONFIG_MMU */
struct kernel_mapping {
unsigned long page_offset;
diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h
index f540b2625714..332a6bf72b1d 100644
--- a/arch/riscv/include/asm/pgtable.h
+++ b/arch/riscv/include/asm/pgtable.h
@@ -12,7 +12,7 @@
#include <asm/pgtable-bits.h>
#ifndef CONFIG_MMU
-#define KERNEL_LINK_ADDR PAGE_OFFSET
+#define KERNEL_LINK_ADDR _AC(CONFIG_PAGE_OFFSET, UL)
#define KERN_VIRT_SIZE (UL(-1))
#else
diff --git a/arch/s390/hypfs/hypfs_diag_fs.c b/arch/s390/hypfs/hypfs_diag_fs.c
index 00a6d370a280..280266a74f37 100644
--- a/arch/s390/hypfs/hypfs_diag_fs.c
+++ b/arch/s390/hypfs/hypfs_diag_fs.c
@@ -208,6 +208,8 @@ static int hypfs_create_cpu_files(struct dentry *cpus_dir, void *cpu_info)
snprintf(buffer, TMP_SIZE, "%d", cpu_info__cpu_addr(diag204_get_info_type(),
cpu_info));
cpu_dir = hypfs_mkdir(cpus_dir, buffer);
+ if (IS_ERR(cpu_dir))
+ return PTR_ERR(cpu_dir);
rc = hypfs_create_u64(cpu_dir, "mgmtime",
cpu_info__acc_time(diag204_get_info_type(), cpu_info) -
cpu_info__lp_time(diag204_get_info_type(), cpu_info));
diff --git a/arch/um/Makefile b/arch/um/Makefile
index 34957dcb88b9..744c5d0bdeb8 100644
--- a/arch/um/Makefile
+++ b/arch/um/Makefile
@@ -151,5 +151,6 @@ MRPROPER_FILES += $(HOST_DIR)/include/generated
archclean:
@find . \( -name '*.bb' -o -name '*.bbg' -o -name '*.da' \
-o -name '*.gcov' \) -type f -print | xargs rm -f
+ $(Q)$(MAKE) -f $(srctree)/Makefile ARCH=$(HEADER_ARCH) clean
export HEADER_ARCH SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING DEV_NULL_PATH
diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c
index 38d5a71a579b..f6c766b2bdf5 100644
--- a/arch/um/kernel/mem.c
+++ b/arch/um/kernel/mem.c
@@ -68,6 +68,7 @@ void __init mem_init(void)
map_memory(brk_end, __pa(brk_end), uml_reserved - brk_end, 1, 1, 0);
memblock_free((void *)brk_end, uml_reserved - brk_end);
uml_reserved = brk_end;
+ min_low_pfn = PFN_UP(__pa(uml_reserved));
/* this will put all low memory onto the freelists */
memblock_free_all();
diff --git a/arch/x86/Makefile b/arch/x86/Makefile
index c83582b5a010..6d593fb85a9e 100644
--- a/arch/x86/Makefile
+++ b/arch/x86/Makefile
@@ -43,7 +43,7 @@ endif
# How to compile the 16-bit code. Note we always compile for -march=i386;
# that way we can complain to the user if the CPU is insufficient.
-REALMODE_CFLAGS := -m16 -g -Os -DDISABLE_BRANCH_PROFILING -D__DISABLE_EXPORTS \
+REALMODE_CFLAGS := -std=gnu11 -m16 -g -Os -DDISABLE_BRANCH_PROFILING -D__DISABLE_EXPORTS \
-Wall -Wstrict-prototypes -march=i386 -mregparm=3 \
-fno-strict-aliasing -fomit-frame-pointer -fno-pic \
-mno-mmx -mno-sse $(call cc-option,-fcf-protection=none)
diff --git a/arch/x86/boot/genimage.sh b/arch/x86/boot/genimage.sh
index c9299aeb7333..3882ead513f7 100644
--- a/arch/x86/boot/genimage.sh
+++ b/arch/x86/boot/genimage.sh
@@ -22,6 +22,7 @@
# This script requires:
# bash
# syslinux
+# genisoimage
# mtools (for fdimage* and hdimage)
# edk2/OVMF (for hdimage)
#
@@ -251,7 +252,9 @@ geniso() {
cp "$isolinux" "$ldlinux" "$tmp_dir"
cp "$FBZIMAGE" "$tmp_dir"/linux
echo default linux "$KCMDLINE" > "$tmp_dir"/isolinux.cfg
- cp "${FDINITRDS[@]}" "$tmp_dir"/
+ if [ ${#FDINITRDS[@]} -gt 0 ]; then
+ cp "${FDINITRDS[@]}" "$tmp_dir"/
+ fi
genisoimage -J -r -appid 'LINUX_BOOT' -input-charset=utf-8 \
-quiet -o "$FIMAGE" -b isolinux.bin \
-c boot.cat -no-emul-boot -boot-load-size 4 \
diff --git a/arch/x86/entry/entry.S b/arch/x86/entry/entry.S
index 78fd2442b49d..ad292c0d971a 100644
--- a/arch/x86/entry/entry.S
+++ b/arch/x86/entry/entry.S
@@ -59,7 +59,7 @@ EXPORT_SYMBOL_GPL(mds_verw_sel);
* entirely in the C code, and use an alias emitted by the linker script
* instead.
*/
-#ifdef CONFIG_STACKPROTECTOR
+#if defined(CONFIG_STACKPROTECTOR) && defined(CONFIG_SMP)
EXPORT_SYMBOL(__ref_stack_chk_guard);
#endif
#endif
diff --git a/arch/x86/events/amd/ibs.c b/arch/x86/events/amd/ibs.c
index f483874fa20f..fac3d97111b0 100644
--- a/arch/x86/events/amd/ibs.c
+++ b/arch/x86/events/amd/ibs.c
@@ -272,7 +272,7 @@ static int perf_ibs_init(struct perf_event *event)
{
struct hw_perf_event *hwc = &event->hw;
struct perf_ibs *perf_ibs;
- u64 max_cnt, config;
+ u64 config;
int ret;
perf_ibs = get_ibs_pmu(event->attr.type);
@@ -306,10 +306,19 @@ static int perf_ibs_init(struct perf_event *event)
if (!hwc->sample_period)
hwc->sample_period = 0x10;
} else {
- max_cnt = config & perf_ibs->cnt_mask;
+ u64 period = 0;
+
+ if (perf_ibs == &perf_ibs_op) {
+ period = (config & IBS_OP_MAX_CNT) << 4;
+ if (ibs_caps & IBS_CAPS_OPCNTEXT)
+ period |= config & IBS_OP_MAX_CNT_EXT_MASK;
+ } else {
+ period = (config & IBS_FETCH_MAX_CNT) << 4;
+ }
+
config &= ~perf_ibs->cnt_mask;
- event->attr.sample_period = max_cnt << 4;
- hwc->sample_period = event->attr.sample_period;
+ event->attr.sample_period = period;
+ hwc->sample_period = period;
}
if (!hwc->sample_period)
@@ -1219,7 +1228,8 @@ static __init int perf_ibs_op_init(void)
if (ibs_caps & IBS_CAPS_OPCNTEXT) {
perf_ibs_op.max_period |= IBS_OP_MAX_CNT_EXT_MASK;
perf_ibs_op.config_mask |= IBS_OP_MAX_CNT_EXT_MASK;
- perf_ibs_op.cnt_mask |= IBS_OP_MAX_CNT_EXT_MASK;
+ perf_ibs_op.cnt_mask |= (IBS_OP_MAX_CNT_EXT_MASK |
+ IBS_OP_CUR_CNT_EXT_MASK);
}
if (ibs_caps & IBS_CAPS_ZEN4)
diff --git a/arch/x86/include/asm/bug.h b/arch/x86/include/asm/bug.h
index 806649c7f23d..9a0f29be1a9e 100644
--- a/arch/x86/include/asm/bug.h
+++ b/arch/x86/include/asm/bug.h
@@ -22,8 +22,9 @@
#define SECOND_BYTE_OPCODE_UD2 0x0b
#define BUG_NONE 0xffff
-#define BUG_UD1 0xfffe
-#define BUG_UD2 0xfffd
+#define BUG_UD2 0xfffe
+#define BUG_UD1 0xfffd
+#define BUG_UD1_UBSAN 0xfffc
#ifdef CONFIG_GENERIC_BUG
diff --git a/arch/x86/include/asm/ibt.h b/arch/x86/include/asm/ibt.h
index 1e59581d500c..b778ae6e67ee 100644
--- a/arch/x86/include/asm/ibt.h
+++ b/arch/x86/include/asm/ibt.h
@@ -41,7 +41,7 @@
_ASM_PTR fname "\n\t" \
".popsection\n\t"
-static inline __attribute_const__ u32 gen_endbr(void)
+static __always_inline __attribute_const__ u32 gen_endbr(void)
{
u32 endbr;
@@ -56,7 +56,7 @@ static inline __attribute_const__ u32 gen_endbr(void)
return endbr;
}
-static inline __attribute_const__ u32 gen_endbr_poison(void)
+static __always_inline __attribute_const__ u32 gen_endbr_poison(void)
{
/*
* 4 byte NOP that isn't NOP4 (in fact it is OSP NOP3), such that it
diff --git a/arch/x86/include/asm/nmi.h b/arch/x86/include/asm/nmi.h
index 5c5f1e56c404..6f3d145670a9 100644
--- a/arch/x86/include/asm/nmi.h
+++ b/arch/x86/include/asm/nmi.h
@@ -59,6 +59,8 @@ int __register_nmi_handler(unsigned int, struct nmiaction *);
void unregister_nmi_handler(unsigned int, const char *);
+void set_emergency_nmi_handler(unsigned int type, nmi_handler_t handler);
+
void stop_nmi(void);
void restart_nmi(void);
void local_touch_nmi(void);
diff --git a/arch/x86/include/asm/perf_event.h b/arch/x86/include/asm/perf_event.h
index 384e8a7db482..ba2a3935dc62 100644
--- a/arch/x86/include/asm/perf_event.h
+++ b/arch/x86/include/asm/perf_event.h
@@ -501,6 +501,7 @@ struct pebs_xmm {
*/
#define IBS_OP_CUR_CNT (0xFFF80ULL<<32)
#define IBS_OP_CUR_CNT_RAND (0x0007FULL<<32)
+#define IBS_OP_CUR_CNT_EXT_MASK (0x7FULL<<52)
#define IBS_OP_CNT_CTL (1ULL<<19)
#define IBS_OP_VAL (1ULL<<18)
#define IBS_OP_ENABLE (1ULL<<17)
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c
index 07b45bbf6348..e9c4bcb38f45 100644
--- a/arch/x86/kernel/cpu/bugs.c
+++ b/arch/x86/kernel/cpu/bugs.c
@@ -1442,9 +1442,13 @@ static __ro_after_init enum spectre_v2_mitigation_cmd spectre_v2_cmd;
static enum spectre_v2_user_cmd __init
spectre_v2_parse_user_cmdline(void)
{
+ enum spectre_v2_user_cmd mode;
char arg[20];
int ret, i;
+ mode = IS_ENABLED(CONFIG_MITIGATION_SPECTRE_V2) ?
+ SPECTRE_V2_USER_CMD_AUTO : SPECTRE_V2_USER_CMD_NONE;
+
switch (spectre_v2_cmd) {
case SPECTRE_V2_CMD_NONE:
return SPECTRE_V2_USER_CMD_NONE;
@@ -1457,7 +1461,7 @@ spectre_v2_parse_user_cmdline(void)
ret = cmdline_find_option(boot_command_line, "spectre_v2_user",
arg, sizeof(arg));
if (ret < 0)
- return SPECTRE_V2_USER_CMD_AUTO;
+ return mode;
for (i = 0; i < ARRAY_SIZE(v2_user_options); i++) {
if (match_option(arg, ret, v2_user_options[i].option)) {
@@ -1467,8 +1471,8 @@ spectre_v2_parse_user_cmdline(void)
}
}
- pr_err("Unknown user space protection option (%s). Switching to AUTO select\n", arg);
- return SPECTRE_V2_USER_CMD_AUTO;
+ pr_err("Unknown user space protection option (%s). Switching to default\n", arg);
+ return mode;
}
static inline bool spectre_v2_in_ibrs_mode(enum spectre_v2_mitigation mode)
diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c
index 6da2cfa23c29..35fd5f1444fd 100644
--- a/arch/x86/kernel/nmi.c
+++ b/arch/x86/kernel/nmi.c
@@ -39,8 +39,12 @@
#define CREATE_TRACE_POINTS
#include <trace/events/nmi.h>
+/*
+ * An emergency handler can be set in any context including NMI
+ */
struct nmi_desc {
raw_spinlock_t lock;
+ nmi_handler_t emerg_handler;
struct list_head head;
};
@@ -131,9 +135,22 @@ static void nmi_check_duration(struct nmiaction *action, u64 duration)
static int nmi_handle(unsigned int type, struct pt_regs *regs)
{
struct nmi_desc *desc = nmi_to_desc(type);
+ nmi_handler_t ehandler;
struct nmiaction *a;
int handled=0;
+ /*
+ * Call the emergency handler, if set
+ *
+ * In the case of crash_nmi_callback() emergency handler, it will
+ * return in the case of the crashing CPU to enable it to complete
+ * other necessary crashing actions ASAP. Other handlers in the
+ * linked list won't need to be run.
+ */
+ ehandler = desc->emerg_handler;
+ if (ehandler)
+ return ehandler(type, regs);
+
rcu_read_lock();
/*
@@ -223,6 +240,31 @@ void unregister_nmi_handler(unsigned int type, const char *name)
}
EXPORT_SYMBOL_GPL(unregister_nmi_handler);
+/**
+ * set_emergency_nmi_handler - Set emergency handler
+ * @type: NMI type
+ * @handler: the emergency handler to be stored
+ *
+ * Set an emergency NMI handler which, if set, will preempt all the other
+ * handlers in the linked list. If a NULL handler is passed in, it will clear
+ * it. It is expected that concurrent calls to this function will not happen
+ * or the system is screwed beyond repair.
+ */
+void set_emergency_nmi_handler(unsigned int type, nmi_handler_t handler)
+{
+ struct nmi_desc *desc = nmi_to_desc(type);
+
+ if (WARN_ON_ONCE(desc->emerg_handler == handler))
+ return;
+ desc->emerg_handler = handler;
+
+ /*
+ * Ensure the emergency handler is visible to other CPUs before
+ * function return
+ */
+ smp_wmb();
+}
+
static void
pci_serr_error(unsigned char reason, struct pt_regs *regs)
{
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c
index 830425e6d38e..456e61070a73 100644
--- a/arch/x86/kernel/reboot.c
+++ b/arch/x86/kernel/reboot.c
@@ -908,15 +908,11 @@ void nmi_shootdown_cpus(nmi_shootdown_cb callback)
shootdown_callback = callback;
atomic_set(&waiting_for_crash_ipi, num_online_cpus() - 1);
- /* Would it be better to replace the trap vector here? */
- if (register_nmi_handler(NMI_LOCAL, crash_nmi_callback,
- NMI_FLAG_FIRST, "crash"))
- return; /* Return what? */
+
/*
- * Ensure the new callback function is set before sending
- * out the NMI
+ * Set emergency handler to preempt other handlers.
*/
- wmb();
+ set_emergency_nmi_handler(NMI_LOCAL, crash_nmi_callback);
apic_send_IPI_allbutself(NMI_VECTOR);
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index d8d9bc5a9b32..8718d58dd0fb 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -92,10 +92,17 @@ __always_inline int is_valid_bugaddr(unsigned long addr)
/*
* Check for UD1 or UD2, accounting for Address Size Override Prefixes.
- * If it's a UD1, get the ModRM byte to pass along to UBSan.
+ * If it's a UD1, further decode to determine its use:
+ *
+ * UBSan{0}: 67 0f b9 00 ud1 (%eax),%eax
+ * UBSan{10}: 67 0f b9 40 10 ud1 0x10(%eax),%eax
+ * static_call: 0f b9 cc ud1 %esp,%ecx
+ *
+ * Notably UBSAN uses EAX, static_call uses ECX.
*/
-__always_inline int decode_bug(unsigned long addr, u32 *imm)
+__always_inline int decode_bug(unsigned long addr, s32 *imm, int *len)
{
+ unsigned long start = addr;
u8 v;
if (addr < TASK_SIZE_MAX)
@@ -108,24 +115,42 @@ __always_inline int decode_bug(unsigned long addr, u32 *imm)
return BUG_NONE;
v = *(u8 *)(addr++);
- if (v == SECOND_BYTE_OPCODE_UD2)
+ if (v == SECOND_BYTE_OPCODE_UD2) {
+ *len = addr - start;
return BUG_UD2;
+ }
- if (!IS_ENABLED(CONFIG_UBSAN_TRAP) || v != SECOND_BYTE_OPCODE_UD1)
+ if (v != SECOND_BYTE_OPCODE_UD1)
return BUG_NONE;
- /* Retrieve the immediate (type value) for the UBSAN UD1 */
- v = *(u8 *)(addr++);
- if (X86_MODRM_RM(v) == 4)
- addr++;
-
*imm = 0;
- if (X86_MODRM_MOD(v) == 1)
- *imm = *(u8 *)addr;
- else if (X86_MODRM_MOD(v) == 2)
- *imm = *(u32 *)addr;
- else
- WARN_ONCE(1, "Unexpected MODRM_MOD: %u\n", X86_MODRM_MOD(v));
+ v = *(u8 *)(addr++); /* ModRM */
+
+ if (X86_MODRM_MOD(v) != 3 && X86_MODRM_RM(v) == 4)
+ addr++; /* SIB */
+
+ /* Decode immediate, if present */
+ switch (X86_MODRM_MOD(v)) {
+ case 0: if (X86_MODRM_RM(v) == 5)
+ addr += 4; /* RIP + disp32 */
+ break;
+
+ case 1: *imm = *(s8 *)addr;
+ addr += 1;
+ break;
+
+ case 2: *imm = *(s32 *)addr;
+ addr += 4;
+ break;
+
+ case 3: break;
+ }
+
+ /* record instruction length */
+ *len = addr - start;
+
+ if (X86_MODRM_REG(v) == 0) /* EAX */
+ return BUG_UD1_UBSAN;
return BUG_UD1;
}
@@ -256,10 +281,10 @@ static inline void handle_invalid_op(struct pt_regs *regs)
static noinstr bool handle_bug(struct pt_regs *regs)
{
bool handled = false;
- int ud_type;
- u32 imm;
+ int ud_type, ud_len;
+ s32 ud_imm;
- ud_type = decode_bug(regs->ip, &imm);
+ ud_type = decode_bug(regs->ip, &ud_imm, &ud_len);
if (ud_type == BUG_NONE)
return handled;
@@ -279,15 +304,28 @@ static noinstr bool handle_bug(struct pt_regs *regs)
*/
if (regs->flags & X86_EFLAGS_IF)
raw_local_irq_enable();
- if (ud_type == BUG_UD2) {
+
+ switch (ud_type) {
+ case BUG_UD2:
if (report_bug(regs->ip, regs) == BUG_TRAP_TYPE_WARN ||
handle_cfi_failure(regs) == BUG_TRAP_TYPE_WARN) {
- regs->ip += LEN_UD2;
+ regs->ip += ud_len;
handled = true;
}
- } else if (IS_ENABLED(CONFIG_UBSAN_TRAP)) {
- pr_crit("%s at %pS\n", report_ubsan_failure(regs, imm), (void *)regs->ip);
+ break;
+
+ case BUG_UD1_UBSAN:
+ if (IS_ENABLED(CONFIG_UBSAN_TRAP)) {
+ pr_crit("%s at %pS\n",
+ report_ubsan_failure(regs, ud_imm),
+ (void *)regs->ip);
+ }
+ break;
+
+ default:
+ break;
}
+
if (regs->flags & X86_EFLAGS_IF)
raw_local_irq_disable();
instrumentation_end();
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c
index 71d29dd7ad76..6cbb5974e4f9 100644
--- a/arch/x86/mm/init.c
+++ b/arch/x86/mm/init.c
@@ -644,8 +644,13 @@ static void __init memory_map_top_down(unsigned long map_start,
*/
addr = memblock_phys_alloc_range(PMD_SIZE, PMD_SIZE, map_start,
map_end);
- memblock_phys_free(addr, PMD_SIZE);
- real_end = addr + PMD_SIZE;
+ if (!addr) {
+ pr_warn("Failed to release memory for alloc_low_pages()");
+ real_end = max(map_start, ALIGN_DOWN(map_end, PMD_SIZE));
+ } else {
+ memblock_phys_free(addr, PMD_SIZE);
+ real_end = addr + PMD_SIZE;
+ }
/* step_size need to be small so pgt_buf from BRK could cover it */
step_size = PMD_SIZE;
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index aa69353da49f..11eb93e13ce1 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -959,9 +959,18 @@ int add_pages(int nid, unsigned long start_pfn, unsigned long nr_pages,
ret = __add_pages(nid, start_pfn, nr_pages, params);
WARN_ON_ONCE(ret);
- /* update max_pfn, max_low_pfn and high_memory */
- update_end_of_memory_vars(start_pfn << PAGE_SHIFT,
- nr_pages << PAGE_SHIFT);
+ /*
+ * Special case: add_pages() is called by memremap_pages() for adding device
+ * private pages. Do not bump up max_pfn in the device private path,
+ * because max_pfn changes affect dma_addressing_limited().
+ *
+ * dma_addressing_limited() returning true when max_pfn is the device's
+ * addressable memory can force device drivers to use bounce buffers
+ * and impact their performance negatively:
+ */
+ if (!params->pgmap)
+ /* update max_pfn, max_low_pfn and high_memory */
+ update_end_of_memory_vars(start_pfn << PAGE_SHIFT, nr_pages << PAGE_SHIFT);
return ret;
}
diff --git a/arch/x86/mm/kaslr.c b/arch/x86/mm/kaslr.c
index 230f1dee4f09..e0b0ec0f8245 100644
--- a/arch/x86/mm/kaslr.c
+++ b/arch/x86/mm/kaslr.c
@@ -109,8 +109,14 @@ void __init kernel_randomize_memory(void)
memory_tb = DIV_ROUND_UP(max_pfn << PAGE_SHIFT, 1UL << TB_SHIFT) +
CONFIG_RANDOMIZE_MEMORY_PHYSICAL_PADDING;
- /* Adapt physical memory region size based on available memory */
- if (memory_tb < kaslr_regions[0].size_tb)
+ /*
+ * Adapt physical memory region size based on available memory,
+ * except when CONFIG_PCI_P2PDMA is enabled. P2PDMA exposes the
+ * device BAR space assuming the direct map space is large enough
+ * for creating a ZONE_DEVICE mapping in the direct map corresponding
+ * to the physical BAR address.
+ */
+ if (!IS_ENABLED(CONFIG_PCI_P2PDMA) && (memory_tb < kaslr_regions[0].size_tb))
kaslr_regions[0].size_tb = memory_tb;
/*
diff --git a/arch/x86/um/os-Linux/mcontext.c b/arch/x86/um/os-Linux/mcontext.c
index 49c3744cac37..81b9d1f9f4e6 100644
--- a/arch/x86/um/os-Linux/mcontext.c
+++ b/arch/x86/um/os-Linux/mcontext.c
@@ -26,7 +26,6 @@ void get_regs_from_mc(struct uml_pt_regs *regs, mcontext_t *mc)
COPY(RIP);
COPY2(EFLAGS, EFL);
COPY2(CS, CSGSFS);
- regs->gp[CS / sizeof(unsigned long)] &= 0xffff;
- regs->gp[CS / sizeof(unsigned long)] |= 3;
+ regs->gp[SS / sizeof(unsigned long)] = mc->gregs[REG_CSGSFS] >> 48;
#endif
}
diff --git a/crypto/ahash.c b/crypto/ahash.c
index 709ef0940799..6168f3532f55 100644
--- a/crypto/ahash.c
+++ b/crypto/ahash.c
@@ -427,6 +427,7 @@ static int crypto_ahash_init_tfm(struct crypto_tfm *tfm)
hash->setkey = ahash_nosetkey;
crypto_ahash_set_statesize(hash, alg->halg.statesize);
+ crypto_ahash_set_reqsize(hash, alg->reqsize);
if (tfm->__crt_alg->cra_type != &crypto_ahash_type)
return crypto_init_shash_ops_async(tfm);
@@ -599,6 +600,9 @@ static int ahash_prepare_alg(struct ahash_alg *alg)
if (alg->halg.statesize == 0)
return -EINVAL;
+ if (alg->reqsize && alg->reqsize < alg->halg.statesize)
+ return -EINVAL;
+
err = hash_prepare_alg(&alg->halg);
if (err)
return err;
diff --git a/crypto/algif_hash.c b/crypto/algif_hash.c
index e24c829d7a01..5ab7441734b8 100644
--- a/crypto/algif_hash.c
+++ b/crypto/algif_hash.c
@@ -265,10 +265,6 @@ static int hash_accept(struct socket *sock, struct socket *newsock, int flags,
goto out_free_state;
err = crypto_ahash_import(&ctx2->req, state);
- if (err) {
- sock_orphan(sk2);
- sock_put(sk2);
- }
out_free_state:
kfree_sensitive(state);
diff --git a/crypto/lzo-rle.c b/crypto/lzo-rle.c
index 0631d975bfac..0abc2d87f042 100644
--- a/crypto/lzo-rle.c
+++ b/crypto/lzo-rle.c
@@ -55,7 +55,7 @@ static int __lzorle_compress(const u8 *src, unsigned int slen,
size_t tmp_len = *dlen; /* size_t(ulong) <-> uint on 64 bit */
int err;
- err = lzorle1x_1_compress(src, slen, dst, &tmp_len, ctx);
+ err = lzorle1x_1_compress_safe(src, slen, dst, &tmp_len, ctx);
if (err != LZO_E_OK)
return -EINVAL;
diff --git a/crypto/lzo.c b/crypto/lzo.c
index ebda132dd22b..8338851c7406 100644
--- a/crypto/lzo.c
+++ b/crypto/lzo.c
@@ -55,7 +55,7 @@ static int __lzo_compress(const u8 *src, unsigned int slen,
size_t tmp_len = *dlen; /* size_t(ulong) <-> uint on 64 bit */
int err;
- err = lzo1x_1_compress(src, slen, dst, &tmp_len, ctx);
+ err = lzo1x_1_compress_safe(src, slen, dst, &tmp_len, ctx);
if (err != LZO_E_OK)
return -EINVAL;
diff --git a/crypto/skcipher.c b/crypto/skcipher.c
index 7b275716cf4e..acc879ed6031 100644
--- a/crypto/skcipher.c
+++ b/crypto/skcipher.c
@@ -811,6 +811,7 @@ struct crypto_sync_skcipher *crypto_alloc_sync_skcipher(
/* Only sync algorithms allowed. */
mask |= CRYPTO_ALG_ASYNC | CRYPTO_ALG_SKCIPHER_REQSIZE_LARGE;
+ type &= ~(CRYPTO_ALG_ASYNC | CRYPTO_ALG_SKCIPHER_REQSIZE_LARGE);
tfm = crypto_alloc_tfm(alg_name, &crypto_skcipher_type, type, mask);
diff --git a/drivers/accel/qaic/qaic_drv.c b/drivers/accel/qaic/qaic_drv.c
index b5de82e6eb4d..e69bfb30b44e 100644
--- a/drivers/accel/qaic/qaic_drv.c
+++ b/drivers/accel/qaic/qaic_drv.c
@@ -400,7 +400,7 @@ static int init_pci(struct qaic_device *qdev, struct pci_dev *pdev)
int bars;
int ret;
- bars = pci_select_bars(pdev, IORESOURCE_MEM);
+ bars = pci_select_bars(pdev, IORESOURCE_MEM) & 0x3f;
/* make sure the device has the expected BARs */
if (bars != (BIT(0) | BIT(2) | BIT(4))) {
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index cee82b473dc5..648228831f5e 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -438,7 +438,7 @@ config ACPI_SBS
the modules will be called sbs and sbshc.
config ACPI_HED
- tristate "Hardware Error Device"
+ bool "Hardware Error Device"
help
This driver supports the Hardware Error Device (PNP0C33),
which is used to report some hardware errors notified via
diff --git a/drivers/acpi/acpi_pnp.c b/drivers/acpi/acpi_pnp.c
index 01abf26764b0..3f5a1840f573 100644
--- a/drivers/acpi/acpi_pnp.c
+++ b/drivers/acpi/acpi_pnp.c
@@ -355,8 +355,10 @@ static bool acpi_pnp_match(const char *idstr, const struct acpi_device_id **matc
* device represented by it.
*/
static const struct acpi_device_id acpi_nonpnp_device_ids[] = {
+ {"INT3F0D"},
{"INTC1080"},
{"INTC1081"},
+ {"INTC1099"},
{""},
};
diff --git a/drivers/acpi/hed.c b/drivers/acpi/hed.c
index 46c6f8c35b43..2e01eaa8d8cd 100644
--- a/drivers/acpi/hed.c
+++ b/drivers/acpi/hed.c
@@ -80,7 +80,12 @@ static struct acpi_driver acpi_hed_driver = {
.remove = acpi_hed_remove,
},
};
-module_acpi_driver(acpi_hed_driver);
+
+static int __init acpi_hed_driver_init(void)
+{
+ return acpi_bus_register_driver(&acpi_hed_driver);
+}
+subsys_initcall(acpi_hed_driver_init);
MODULE_AUTHOR("Huang Ying");
MODULE_DESCRIPTION("ACPI Hardware Error Device Driver");
diff --git a/drivers/auxdisplay/charlcd.c b/drivers/auxdisplay/charlcd.c
index 6d309e4971b6..e243291a7e77 100644
--- a/drivers/auxdisplay/charlcd.c
+++ b/drivers/auxdisplay/charlcd.c
@@ -594,18 +594,19 @@ static int charlcd_init(struct charlcd *lcd)
return 0;
}
-struct charlcd *charlcd_alloc(void)
+struct charlcd *charlcd_alloc(unsigned int drvdata_size)
{
struct charlcd_priv *priv;
struct charlcd *lcd;
- priv = kzalloc(sizeof(*priv), GFP_KERNEL);
+ priv = kzalloc(sizeof(*priv) + drvdata_size, GFP_KERNEL);
if (!priv)
return NULL;
priv->esc_seq.len = -1;
lcd = &priv->lcd;
+ lcd->drvdata = priv->drvdata;
return lcd;
}
diff --git a/drivers/auxdisplay/charlcd.h b/drivers/auxdisplay/charlcd.h
index eed80063a6d2..4bbf106b2dd8 100644
--- a/drivers/auxdisplay/charlcd.h
+++ b/drivers/auxdisplay/charlcd.h
@@ -49,7 +49,7 @@ struct charlcd {
unsigned long y;
} addr;
- void *drvdata;
+ void *drvdata; /* Set by charlcd_alloc() */
};
/**
@@ -93,7 +93,8 @@ struct charlcd_ops {
};
void charlcd_backlight(struct charlcd *lcd, enum charlcd_onoff on);
-struct charlcd *charlcd_alloc(void);
+
+struct charlcd *charlcd_alloc(unsigned int drvdata_size);
void charlcd_free(struct charlcd *lcd);
int charlcd_register(struct charlcd *lcd);
diff --git a/drivers/auxdisplay/hd44780.c b/drivers/auxdisplay/hd44780.c
index 8b690f59df27..ebaf0ff518f4 100644
--- a/drivers/auxdisplay/hd44780.c
+++ b/drivers/auxdisplay/hd44780.c
@@ -226,7 +226,7 @@ static int hd44780_probe(struct platform_device *pdev)
if (!hdc)
return -ENOMEM;
- lcd = charlcd_alloc();
+ lcd = charlcd_alloc(0);
if (!lcd)
goto fail1;
diff --git a/drivers/auxdisplay/lcd2s.c b/drivers/auxdisplay/lcd2s.c
index 6422be0dfe20..0ecf6a9469f2 100644
--- a/drivers/auxdisplay/lcd2s.c
+++ b/drivers/auxdisplay/lcd2s.c
@@ -307,7 +307,7 @@ static int lcd2s_i2c_probe(struct i2c_client *i2c)
if (err < 0)
return err;
- lcd = charlcd_alloc();
+ lcd = charlcd_alloc(0);
if (!lcd)
return -ENOMEM;
diff --git a/drivers/auxdisplay/panel.c b/drivers/auxdisplay/panel.c
index eba04c0de7eb..0f3999b665e7 100644
--- a/drivers/auxdisplay/panel.c
+++ b/drivers/auxdisplay/panel.c
@@ -835,7 +835,7 @@ static void lcd_init(void)
if (!hdc)
return;
- charlcd = charlcd_alloc();
+ charlcd = charlcd_alloc(0);
if (!charlcd) {
kfree(hdc);
return;
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index d6195565ef7a..e0dd69889608 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -3525,9 +3525,8 @@ static void btusb_coredump_qca(struct hci_dev *hdev)
static int handle_dump_pkt_qca(struct hci_dev *hdev, struct sk_buff *skb)
{
int ret = 0;
+ unsigned int skip = 0;
u8 pkt_type;
- u8 *sk_ptr;
- unsigned int sk_len;
u16 seqno;
u32 dump_size;
@@ -3536,18 +3535,13 @@ static int handle_dump_pkt_qca(struct hci_dev *hdev, struct sk_buff *skb)
struct usb_device *udev = btdata->udev;
pkt_type = hci_skb_pkt_type(skb);
- sk_ptr = skb->data;
- sk_len = skb->len;
+ skip = sizeof(struct hci_event_hdr);
+ if (pkt_type == HCI_ACLDATA_PKT)
+ skip += sizeof(struct hci_acl_hdr);
- if (pkt_type == HCI_ACLDATA_PKT) {
- sk_ptr += HCI_ACL_HDR_SIZE;
- sk_len -= HCI_ACL_HDR_SIZE;
- }
-
- sk_ptr += HCI_EVENT_HDR_SIZE;
- sk_len -= HCI_EVENT_HDR_SIZE;
+ skb_pull(skb, skip);
+ dump_hdr = (struct qca_dump_hdr *)skb->data;
- dump_hdr = (struct qca_dump_hdr *)sk_ptr;
seqno = le16_to_cpu(dump_hdr->seqno);
if (seqno == 0) {
set_bit(BTUSB_HW_SSR_ACTIVE, &btdata->flags);
@@ -3567,16 +3561,15 @@ static int handle_dump_pkt_qca(struct hci_dev *hdev, struct sk_buff *skb)
btdata->qca_dump.ram_dump_size = dump_size;
btdata->qca_dump.ram_dump_seqno = 0;
- sk_ptr += offsetof(struct qca_dump_hdr, data0);
- sk_len -= offsetof(struct qca_dump_hdr, data0);
+
+ skb_pull(skb, offsetof(struct qca_dump_hdr, data0));
usb_disable_autosuspend(udev);
bt_dev_info(hdev, "%s memdump size(%u)\n",
(pkt_type == HCI_ACLDATA_PKT) ? "ACL" : "event",
dump_size);
} else {
- sk_ptr += offsetof(struct qca_dump_hdr, data);
- sk_len -= offsetof(struct qca_dump_hdr, data);
+ skb_pull(skb, offsetof(struct qca_dump_hdr, data));
}
if (!btdata->qca_dump.ram_dump_size) {
@@ -3596,7 +3589,6 @@ static int handle_dump_pkt_qca(struct hci_dev *hdev, struct sk_buff *skb)
return ret;
}
- skb_pull(skb, skb->len - sk_len);
hci_devcd_append(hdev, skb);
btdata->qca_dump.ram_dump_seqno++;
if (seqno == QCA_LAST_SEQUENCE_NUM) {
@@ -3624,68 +3616,58 @@ static int handle_dump_pkt_qca(struct hci_dev *hdev, struct sk_buff *skb)
/* Return: true if the ACL packet is a dump packet, false otherwise. */
static bool acl_pkt_is_dump_qca(struct hci_dev *hdev, struct sk_buff *skb)
{
- u8 *sk_ptr;
- unsigned int sk_len;
-
struct hci_event_hdr *event_hdr;
struct hci_acl_hdr *acl_hdr;
struct qca_dump_hdr *dump_hdr;
+ struct sk_buff *clone = skb_clone(skb, GFP_ATOMIC);
+ bool is_dump = false;
- sk_ptr = skb->data;
- sk_len = skb->len;
-
- acl_hdr = hci_acl_hdr(skb);
- if (le16_to_cpu(acl_hdr->handle) != QCA_MEMDUMP_ACL_HANDLE)
+ if (!clone)
return false;
- sk_ptr += HCI_ACL_HDR_SIZE;
- sk_len -= HCI_ACL_HDR_SIZE;
- event_hdr = (struct hci_event_hdr *)sk_ptr;
-
- if ((event_hdr->evt != HCI_VENDOR_PKT) ||
- (event_hdr->plen != (sk_len - HCI_EVENT_HDR_SIZE)))
- return false;
+ acl_hdr = skb_pull_data(clone, sizeof(*acl_hdr));
+ if (!acl_hdr || (le16_to_cpu(acl_hdr->handle) != QCA_MEMDUMP_ACL_HANDLE))
+ goto out;
- sk_ptr += HCI_EVENT_HDR_SIZE;
- sk_len -= HCI_EVENT_HDR_SIZE;
+ event_hdr = skb_pull_data(clone, sizeof(*event_hdr));
+ if (!event_hdr || (event_hdr->evt != HCI_VENDOR_PKT))
+ goto out;
- dump_hdr = (struct qca_dump_hdr *)sk_ptr;
- if ((sk_len < offsetof(struct qca_dump_hdr, data)) ||
- (dump_hdr->vse_class != QCA_MEMDUMP_VSE_CLASS) ||
- (dump_hdr->msg_type != QCA_MEMDUMP_MSG_TYPE))
- return false;
+ dump_hdr = skb_pull_data(clone, sizeof(*dump_hdr));
+ if (!dump_hdr || (dump_hdr->vse_class != QCA_MEMDUMP_VSE_CLASS) ||
+ (dump_hdr->msg_type != QCA_MEMDUMP_MSG_TYPE))
+ goto out;
- return true;
+ is_dump = true;
+out:
+ consume_skb(clone);
+ return is_dump;
}
/* Return: true if the event packet is a dump packet, false otherwise. */
static bool evt_pkt_is_dump_qca(struct hci_dev *hdev, struct sk_buff *skb)
{
- u8 *sk_ptr;
- unsigned int sk_len;
-
struct hci_event_hdr *event_hdr;
struct qca_dump_hdr *dump_hdr;
+ struct sk_buff *clone = skb_clone(skb, GFP_ATOMIC);
+ bool is_dump = false;
- sk_ptr = skb->data;
- sk_len = skb->len;
-
- event_hdr = hci_event_hdr(skb);
-
- if ((event_hdr->evt != HCI_VENDOR_PKT)
- || (event_hdr->plen != (sk_len - HCI_EVENT_HDR_SIZE)))
+ if (!clone)
return false;
- sk_ptr += HCI_EVENT_HDR_SIZE;
- sk_len -= HCI_EVENT_HDR_SIZE;
+ event_hdr = skb_pull_data(clone, sizeof(*event_hdr));
+ if (!event_hdr || (event_hdr->evt != HCI_VENDOR_PKT))
+ goto out;
- dump_hdr = (struct qca_dump_hdr *)sk_ptr;
- if ((sk_len < offsetof(struct qca_dump_hdr, data)) ||
- (dump_hdr->vse_class != QCA_MEMDUMP_VSE_CLASS) ||
- (dump_hdr->msg_type != QCA_MEMDUMP_MSG_TYPE))
- return false;
+ dump_hdr = skb_pull_data(clone, sizeof(*dump_hdr));
+ if (!dump_hdr || (dump_hdr->vse_class != QCA_MEMDUMP_VSE_CLASS) ||
+ (dump_hdr->msg_type != QCA_MEMDUMP_MSG_TYPE))
+ goto out;
- return true;
+ is_dump = true;
+out:
+ consume_skb(clone);
+ return is_dump;
}
static int btusb_recv_acl_qca(struct hci_dev *hdev, struct sk_buff *skb)
diff --git a/drivers/clk/clk-s2mps11.c b/drivers/clk/clk-s2mps11.c
index 38c456540d1b..337144570faf 100644
--- a/drivers/clk/clk-s2mps11.c
+++ b/drivers/clk/clk-s2mps11.c
@@ -137,6 +137,8 @@ static int s2mps11_clk_probe(struct platform_device *pdev)
if (!clk_data)
return -ENOMEM;
+ clk_data->num = S2MPS11_CLKS_NUM;
+
switch (hwid) {
case S2MPS11X:
s2mps11_reg = S2MPS11_REG_RTC_CTRL;
@@ -186,7 +188,6 @@ static int s2mps11_clk_probe(struct platform_device *pdev)
clk_data->hws[i] = &s2mps11_clks[i].hw;
}
- clk_data->num = S2MPS11_CLKS_NUM;
of_clk_add_hw_provider(s2mps11_clks->clk_np, of_clk_hw_onecell_get,
clk_data);
diff --git a/drivers/clk/imx/clk-imx8mp.c b/drivers/clk/imx/clk-imx8mp.c
index 747f5397692e..2a0804dd4b84 100644
--- a/drivers/clk/imx/clk-imx8mp.c
+++ b/drivers/clk/imx/clk-imx8mp.c
@@ -8,6 +8,7 @@
#include <linux/err.h>
#include <linux/io.h>
#include <linux/module.h>
+#include <linux/units.h>
#include <linux/of_address.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
@@ -406,11 +407,151 @@ static const char * const imx8mp_clkout_sels[] = {"audio_pll1_out", "audio_pll2_
static struct clk_hw **hws;
static struct clk_hw_onecell_data *clk_hw_data;
+struct imx8mp_clock_constraints {
+ unsigned int clkid;
+ u32 maxrate;
+};
+
+/*
+ * Below tables are taken from IMX8MPCEC Rev. 2.1, 07/2023
+ * Table 13. Maximum frequency of modules.
+ * Probable typos fixed are marked with a comment.
+ */
+static const struct imx8mp_clock_constraints imx8mp_clock_common_constraints[] = {
+ { IMX8MP_CLK_A53_DIV, 1000 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ENET_AXI, 266666667 }, /* Datasheet claims 266MHz */
+ { IMX8MP_CLK_NAND_USDHC_BUS, 266666667 }, /* Datasheet claims 266MHz */
+ { IMX8MP_CLK_MEDIA_APB, 200 * HZ_PER_MHZ },
+ { IMX8MP_CLK_HDMI_APB, 133333333 }, /* Datasheet claims 133MHz */
+ { IMX8MP_CLK_ML_AXI, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_AHB, 133333333 },
+ { IMX8MP_CLK_IPG_ROOT, 66666667 },
+ { IMX8MP_CLK_AUDIO_AHB, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_DISP2_PIX, 170 * HZ_PER_MHZ },
+ { IMX8MP_CLK_DRAM_ALT, 666666667 },
+ { IMX8MP_CLK_DRAM_APB, 200 * HZ_PER_MHZ },
+ { IMX8MP_CLK_CAN1, 80 * HZ_PER_MHZ },
+ { IMX8MP_CLK_CAN2, 80 * HZ_PER_MHZ },
+ { IMX8MP_CLK_PCIE_AUX, 10 * HZ_PER_MHZ },
+ { IMX8MP_CLK_I2C5, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_I2C6, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_SAI1, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_SAI2, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_SAI3, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_SAI5, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_SAI6, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_ENET_QOS, 125 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ENET_QOS_TIMER, 200 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ENET_REF, 125 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ENET_TIMER, 125 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ENET_PHY_REF, 125 * HZ_PER_MHZ },
+ { IMX8MP_CLK_NAND, 500 * HZ_PER_MHZ },
+ { IMX8MP_CLK_QSPI, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_USDHC1, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_USDHC2, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_I2C1, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_I2C2, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_I2C3, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_I2C4, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_UART1, 80 * HZ_PER_MHZ },
+ { IMX8MP_CLK_UART2, 80 * HZ_PER_MHZ },
+ { IMX8MP_CLK_UART3, 80 * HZ_PER_MHZ },
+ { IMX8MP_CLK_UART4, 80 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ECSPI1, 80 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ECSPI2, 80 * HZ_PER_MHZ },
+ { IMX8MP_CLK_PWM1, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_PWM2, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_PWM3, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_PWM4, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_GPT1, 100 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPT2, 100 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPT3, 100 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPT4, 100 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPT5, 100 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPT6, 100 * HZ_PER_MHZ },
+ { IMX8MP_CLK_WDOG, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_IPP_DO_CLKO1, 200 * HZ_PER_MHZ },
+ { IMX8MP_CLK_IPP_DO_CLKO2, 200 * HZ_PER_MHZ },
+ { IMX8MP_CLK_HDMI_REF_266M, 266 * HZ_PER_MHZ },
+ { IMX8MP_CLK_USDHC3, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_MIPI_PHY1_REF, 300 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_DISP1_PIX, 250 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_CAM2_PIX, 277 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_LDB, 595 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_MIPI_TEST_BYTE, 200 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ECSPI3, 80 * HZ_PER_MHZ },
+ { IMX8MP_CLK_PDM, 200 * HZ_PER_MHZ },
+ { IMX8MP_CLK_SAI7, 66666667 }, /* Datasheet claims 66MHz */
+ { IMX8MP_CLK_MAIN_AXI, 400 * HZ_PER_MHZ },
+ { /* Sentinel */ }
+};
+
+static const struct imx8mp_clock_constraints imx8mp_clock_nominal_constraints[] = {
+ { IMX8MP_CLK_M7_CORE, 600 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ML_CORE, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPU3D_CORE, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPU3D_SHADER_CORE, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPU2D_CORE, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_AUDIO_AXI_SRC, 600 * HZ_PER_MHZ },
+ { IMX8MP_CLK_HSIO_AXI, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_ISP, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_VPU_BUS, 600 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_AXI, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_HDMI_AXI, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPU_AXI, 600 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPU_AHB, 300 * HZ_PER_MHZ },
+ { IMX8MP_CLK_NOC, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_NOC_IO, 600 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ML_AHB, 300 * HZ_PER_MHZ },
+ { IMX8MP_CLK_VPU_G1, 600 * HZ_PER_MHZ },
+ { IMX8MP_CLK_VPU_G2, 500 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_CAM1_PIX, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_VPU_VC8000E, 400 * HZ_PER_MHZ }, /* Datasheet claims 500MHz */
+ { IMX8MP_CLK_DRAM_CORE, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GIC, 400 * HZ_PER_MHZ },
+ { /* Sentinel */ }
+};
+
+static const struct imx8mp_clock_constraints imx8mp_clock_overdrive_constraints[] = {
+ { IMX8MP_CLK_M7_CORE, 800 * HZ_PER_MHZ},
+ { IMX8MP_CLK_ML_CORE, 1000 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPU3D_CORE, 1000 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPU3D_SHADER_CORE, 1000 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPU2D_CORE, 1000 * HZ_PER_MHZ },
+ { IMX8MP_CLK_AUDIO_AXI_SRC, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_HSIO_AXI, 500 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_ISP, 500 * HZ_PER_MHZ },
+ { IMX8MP_CLK_VPU_BUS, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_AXI, 500 * HZ_PER_MHZ },
+ { IMX8MP_CLK_HDMI_AXI, 500 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPU_AXI, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GPU_AHB, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_NOC, 1000 * HZ_PER_MHZ },
+ { IMX8MP_CLK_NOC_IO, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_ML_AHB, 400 * HZ_PER_MHZ },
+ { IMX8MP_CLK_VPU_G1, 800 * HZ_PER_MHZ },
+ { IMX8MP_CLK_VPU_G2, 700 * HZ_PER_MHZ },
+ { IMX8MP_CLK_MEDIA_CAM1_PIX, 500 * HZ_PER_MHZ },
+ { IMX8MP_CLK_VPU_VC8000E, 500 * HZ_PER_MHZ }, /* Datasheet claims 400MHz */
+ { IMX8MP_CLK_DRAM_CORE, 1000 * HZ_PER_MHZ },
+ { IMX8MP_CLK_GIC, 500 * HZ_PER_MHZ },
+ { /* Sentinel */ }
+};
+
+static void imx8mp_clocks_apply_constraints(const struct imx8mp_clock_constraints constraints[])
+{
+ const struct imx8mp_clock_constraints *constr;
+
+ for (constr = constraints; constr->clkid; constr++)
+ clk_hw_set_rate_range(hws[constr->clkid], 0, constr->maxrate);
+}
+
static int imx8mp_clocks_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct device_node *np;
void __iomem *anatop_base, *ccm_base;
+ const char *opmode;
int err;
np = of_find_compatible_node(NULL, NULL, "fsl,imx8mp-anatop");
@@ -715,6 +856,16 @@ static int imx8mp_clocks_probe(struct platform_device *pdev)
imx_check_clk_hws(hws, IMX8MP_CLK_END);
+ imx8mp_clocks_apply_constraints(imx8mp_clock_common_constraints);
+
+ err = of_property_read_string(np, "fsl,operating-mode", &opmode);
+ if (!err) {
+ if (!strcmp(opmode, "nominal"))
+ imx8mp_clocks_apply_constraints(imx8mp_clock_nominal_constraints);
+ else if (!strcmp(opmode, "overdrive"))
+ imx8mp_clocks_apply_constraints(imx8mp_clock_overdrive_constraints);
+ }
+
err = of_clk_add_hw_provider(np, of_clk_hw_onecell_get, clk_hw_data);
if (err < 0) {
dev_err(dev, "failed to register hws for i.MX8MP\n");
diff --git a/drivers/clk/qcom/Kconfig b/drivers/clk/qcom/Kconfig
index 1de1661037b1..95cbea8d380c 100644
--- a/drivers/clk/qcom/Kconfig
+++ b/drivers/clk/qcom/Kconfig
@@ -148,7 +148,7 @@ config IPQ_GCC_4019
config IPQ_GCC_5018
tristate "IPQ5018 Global Clock Controller"
- depends on ARM64 || COMPILE_TEST
+ depends on ARM || ARM64 || COMPILE_TEST
help
Support for global clock controller on ipq5018 devices.
Say Y if you want to use peripheral devices such as UART, SPI,
diff --git a/drivers/clk/qcom/camcc-sm8250.c b/drivers/clk/qcom/camcc-sm8250.c
index 9b32c56a5bc5..e29706d78287 100644
--- a/drivers/clk/qcom/camcc-sm8250.c
+++ b/drivers/clk/qcom/camcc-sm8250.c
@@ -411,7 +411,7 @@ static struct clk_rcg2 cam_cc_bps_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -433,7 +433,7 @@ static struct clk_rcg2 cam_cc_camnoc_axi_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -454,7 +454,7 @@ static struct clk_rcg2 cam_cc_cci_0_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -469,7 +469,7 @@ static struct clk_rcg2 cam_cc_cci_1_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -490,7 +490,7 @@ static struct clk_rcg2 cam_cc_cphy_rx_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -511,7 +511,7 @@ static struct clk_rcg2 cam_cc_csi0phytimer_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -526,7 +526,7 @@ static struct clk_rcg2 cam_cc_csi1phytimer_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -556,7 +556,7 @@ static struct clk_rcg2 cam_cc_csi3phytimer_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -571,7 +571,7 @@ static struct clk_rcg2 cam_cc_csi4phytimer_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -586,7 +586,7 @@ static struct clk_rcg2 cam_cc_csi5phytimer_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -611,7 +611,7 @@ static struct clk_rcg2 cam_cc_fast_ahb_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -634,7 +634,7 @@ static struct clk_rcg2 cam_cc_fd_core_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -649,7 +649,7 @@ static struct clk_rcg2 cam_cc_icp_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -673,7 +673,7 @@ static struct clk_rcg2 cam_cc_ife_0_clk_src = {
.parent_data = cam_cc_parent_data_2,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_2),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -710,7 +710,7 @@ static struct clk_rcg2 cam_cc_ife_0_csid_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -734,7 +734,7 @@ static struct clk_rcg2 cam_cc_ife_1_clk_src = {
.parent_data = cam_cc_parent_data_3,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_3),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -749,7 +749,7 @@ static struct clk_rcg2 cam_cc_ife_1_csid_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -771,7 +771,7 @@ static struct clk_rcg2 cam_cc_ife_lite_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -786,7 +786,7 @@ static struct clk_rcg2 cam_cc_ife_lite_csid_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -810,7 +810,7 @@ static struct clk_rcg2 cam_cc_ipe_0_clk_src = {
.parent_data = cam_cc_parent_data_4,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_4),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -825,7 +825,7 @@ static struct clk_rcg2 cam_cc_jpeg_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -847,7 +847,7 @@ static struct clk_rcg2 cam_cc_mclk0_clk_src = {
.parent_data = cam_cc_parent_data_1,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_1),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -862,7 +862,7 @@ static struct clk_rcg2 cam_cc_mclk1_clk_src = {
.parent_data = cam_cc_parent_data_1,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_1),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -877,7 +877,7 @@ static struct clk_rcg2 cam_cc_mclk2_clk_src = {
.parent_data = cam_cc_parent_data_1,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_1),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -892,7 +892,7 @@ static struct clk_rcg2 cam_cc_mclk3_clk_src = {
.parent_data = cam_cc_parent_data_1,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_1),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -907,7 +907,7 @@ static struct clk_rcg2 cam_cc_mclk4_clk_src = {
.parent_data = cam_cc_parent_data_1,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_1),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -922,7 +922,7 @@ static struct clk_rcg2 cam_cc_mclk5_clk_src = {
.parent_data = cam_cc_parent_data_1,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_1),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
@@ -993,7 +993,7 @@ static struct clk_rcg2 cam_cc_slow_ahb_clk_src = {
.parent_data = cam_cc_parent_data_0,
.num_parents = ARRAY_SIZE(cam_cc_parent_data_0),
.flags = CLK_SET_RATE_PARENT,
- .ops = &clk_rcg2_ops,
+ .ops = &clk_rcg2_shared_ops,
},
};
diff --git a/drivers/clk/qcom/clk-alpha-pll.c b/drivers/clk/qcom/clk-alpha-pll.c
index 80aadafffacd..732ca46703ba 100644
--- a/drivers/clk/qcom/clk-alpha-pll.c
+++ b/drivers/clk/qcom/clk-alpha-pll.c
@@ -645,14 +645,19 @@ clk_alpha_pll_recalc_rate(struct clk_hw *hw, unsigned long parent_rate)
struct clk_alpha_pll *pll = to_clk_alpha_pll(hw);
u32 alpha_width = pll_alpha_width(pll);
- regmap_read(pll->clkr.regmap, PLL_L_VAL(pll), &l);
+ if (regmap_read(pll->clkr.regmap, PLL_L_VAL(pll), &l))
+ return 0;
+
+ if (regmap_read(pll->clkr.regmap, PLL_USER_CTL(pll), &ctl))
+ return 0;
- regmap_read(pll->clkr.regmap, PLL_USER_CTL(pll), &ctl);
if (ctl & PLL_ALPHA_EN) {
- regmap_read(pll->clkr.regmap, PLL_ALPHA_VAL(pll), &low);
+ if (regmap_read(pll->clkr.regmap, PLL_ALPHA_VAL(pll), &low))
+ return 0;
if (alpha_width > 32) {
- regmap_read(pll->clkr.regmap, PLL_ALPHA_VAL_U(pll),
- &high);
+ if (regmap_read(pll->clkr.regmap, PLL_ALPHA_VAL_U(pll),
+ &high))
+ return 0;
a = (u64)high << 32 | low;
} else {
a = low & GENMASK(alpha_width - 1, 0);
@@ -844,8 +849,11 @@ alpha_pll_huayra_recalc_rate(struct clk_hw *hw, unsigned long parent_rate)
struct clk_alpha_pll *pll = to_clk_alpha_pll(hw);
u32 l, alpha = 0, ctl, alpha_m, alpha_n;
- regmap_read(pll->clkr.regmap, PLL_L_VAL(pll), &l);
- regmap_read(pll->clkr.regmap, PLL_USER_CTL(pll), &ctl);
+ if (regmap_read(pll->clkr.regmap, PLL_L_VAL(pll), &l))
+ return 0;
+
+ if (regmap_read(pll->clkr.regmap, PLL_USER_CTL(pll), &ctl))
+ return 0;
if (ctl & PLL_ALPHA_EN) {
regmap_read(pll->clkr.regmap, PLL_ALPHA_VAL(pll), &alpha);
@@ -1039,8 +1047,11 @@ clk_trion_pll_recalc_rate(struct clk_hw *hw, unsigned long parent_rate)
struct clk_alpha_pll *pll = to_clk_alpha_pll(hw);
u32 l, frac, alpha_width = pll_alpha_width(pll);
- regmap_read(pll->clkr.regmap, PLL_L_VAL(pll), &l);
- regmap_read(pll->clkr.regmap, PLL_ALPHA_VAL(pll), &frac);
+ if (regmap_read(pll->clkr.regmap, PLL_L_VAL(pll), &l))
+ return 0;
+
+ if (regmap_read(pll->clkr.regmap, PLL_ALPHA_VAL(pll), &frac))
+ return 0;
return alpha_pll_calc_rate(parent_rate, l, frac, alpha_width);
}
@@ -1098,7 +1109,8 @@ clk_alpha_pll_postdiv_recalc_rate(struct clk_hw *hw, unsigned long parent_rate)
struct clk_alpha_pll_postdiv *pll = to_clk_alpha_pll_postdiv(hw);
u32 ctl;
- regmap_read(pll->clkr.regmap, PLL_USER_CTL(pll), &ctl);
+ if (regmap_read(pll->clkr.regmap, PLL_USER_CTL(pll), &ctl))
+ return 0;
ctl >>= PLL_POST_DIV_SHIFT;
ctl &= PLL_POST_DIV_MASK(pll);
@@ -1314,8 +1326,11 @@ static unsigned long alpha_pll_fabia_recalc_rate(struct clk_hw *hw,
struct clk_alpha_pll *pll = to_clk_alpha_pll(hw);
u32 l, frac, alpha_width = pll_alpha_width(pll);
- regmap_read(pll->clkr.regmap, PLL_L_VAL(pll), &l);
- regmap_read(pll->clkr.regmap, PLL_FRAC(pll), &frac);
+ if (regmap_read(pll->clkr.regmap, PLL_L_VAL(pll), &l))
+ return 0;
+
+ if (regmap_read(pll->clkr.regmap, PLL_FRAC(pll), &frac))
+ return 0;
return alpha_pll_calc_rate(parent_rate, l, frac, alpha_width);
}
@@ -1465,7 +1480,8 @@ clk_trion_pll_postdiv_recalc_rate(struct clk_hw *hw, unsigned long parent_rate)
struct regmap *regmap = pll->clkr.regmap;
u32 i, div = 1, val;
- regmap_read(regmap, PLL_USER_CTL(pll), &val);
+ if (regmap_read(regmap, PLL_USER_CTL(pll), &val))
+ return 0;
val >>= pll->post_div_shift;
val &= PLL_POST_DIV_MASK(pll);
@@ -2339,9 +2355,12 @@ static unsigned long alpha_pll_lucid_evo_recalc_rate(struct clk_hw *hw,
struct regmap *regmap = pll->clkr.regmap;
u32 l, frac;
- regmap_read(regmap, PLL_L_VAL(pll), &l);
+ if (regmap_read(regmap, PLL_L_VAL(pll), &l))
+ return 0;
l &= LUCID_EVO_PLL_L_VAL_MASK;
- regmap_read(regmap, PLL_ALPHA_VAL(pll), &frac);
+
+ if (regmap_read(regmap, PLL_ALPHA_VAL(pll), &frac))
+ return 0;
return alpha_pll_calc_rate(parent_rate, l, frac, pll_alpha_width(pll));
}
@@ -2416,7 +2435,8 @@ static unsigned long clk_rivian_evo_pll_recalc_rate(struct clk_hw *hw,
struct clk_alpha_pll *pll = to_clk_alpha_pll(hw);
u32 l;
- regmap_read(pll->clkr.regmap, PLL_L_VAL(pll), &l);
+ if (regmap_read(pll->clkr.regmap, PLL_L_VAL(pll), &l))
+ return 0;
return parent_rate * l;
}
diff --git a/drivers/clk/sunxi-ng/ccu-sun20i-d1.c b/drivers/clk/sunxi-ng/ccu-sun20i-d1.c
index f95c3615ca77..98f107e96317 100644
--- a/drivers/clk/sunxi-ng/ccu-sun20i-d1.c
+++ b/drivers/clk/sunxi-ng/ccu-sun20i-d1.c
@@ -412,19 +412,23 @@ static const struct clk_parent_data mmc0_mmc1_parents[] = {
{ .hw = &pll_periph0_2x_clk.common.hw },
{ .hw = &pll_audio1_div2_clk.common.hw },
};
-static SUNXI_CCU_MP_DATA_WITH_MUX_GATE(mmc0_clk, "mmc0", mmc0_mmc1_parents, 0x830,
- 0, 4, /* M */
- 8, 2, /* P */
- 24, 3, /* mux */
- BIT(31), /* gate */
- 0);
-
-static SUNXI_CCU_MP_DATA_WITH_MUX_GATE(mmc1_clk, "mmc1", mmc0_mmc1_parents, 0x834,
- 0, 4, /* M */
- 8, 2, /* P */
- 24, 3, /* mux */
- BIT(31), /* gate */
- 0);
+static SUNXI_CCU_MP_DATA_WITH_MUX_GATE_POSTDIV(mmc0_clk, "mmc0",
+ mmc0_mmc1_parents, 0x830,
+ 0, 4, /* M */
+ 8, 2, /* P */
+ 24, 3, /* mux */
+ BIT(31), /* gate */
+ 2, /* post-div */
+ 0);
+
+static SUNXI_CCU_MP_DATA_WITH_MUX_GATE_POSTDIV(mmc1_clk, "mmc1",
+ mmc0_mmc1_parents, 0x834,
+ 0, 4, /* M */
+ 8, 2, /* P */
+ 24, 3, /* mux */
+ BIT(31), /* gate */
+ 2, /* post-div */
+ 0);
static const struct clk_parent_data mmc2_parents[] = {
{ .fw_name = "hosc" },
@@ -433,12 +437,14 @@ static const struct clk_parent_data mmc2_parents[] = {
{ .hw = &pll_periph0_800M_clk.common.hw },
{ .hw = &pll_audio1_div2_clk.common.hw },
};
-static SUNXI_CCU_MP_DATA_WITH_MUX_GATE(mmc2_clk, "mmc2", mmc2_parents, 0x838,
- 0, 4, /* M */
- 8, 2, /* P */
- 24, 3, /* mux */
- BIT(31), /* gate */
- 0);
+static SUNXI_CCU_MP_DATA_WITH_MUX_GATE_POSTDIV(mmc2_clk, "mmc2", mmc2_parents,
+ 0x838,
+ 0, 4, /* M */
+ 8, 2, /* P */
+ 24, 3, /* mux */
+ BIT(31), /* gate */
+ 2, /* post-div */
+ 0);
static SUNXI_CCU_GATE_HWS(bus_mmc0_clk, "bus-mmc0", psi_ahb_hws,
0x84c, BIT(0), 0);
diff --git a/drivers/clk/sunxi-ng/ccu_mp.h b/drivers/clk/sunxi-ng/ccu_mp.h
index 6e50f3728fb5..7d836a9fb3db 100644
--- a/drivers/clk/sunxi-ng/ccu_mp.h
+++ b/drivers/clk/sunxi-ng/ccu_mp.h
@@ -52,6 +52,28 @@ struct ccu_mp {
} \
}
+#define SUNXI_CCU_MP_DATA_WITH_MUX_GATE_POSTDIV(_struct, _name, _parents, \
+ _reg, \
+ _mshift, _mwidth, \
+ _pshift, _pwidth, \
+ _muxshift, _muxwidth, \
+ _gate, _postdiv, _flags)\
+ struct ccu_mp _struct = { \
+ .enable = _gate, \
+ .m = _SUNXI_CCU_DIV(_mshift, _mwidth), \
+ .p = _SUNXI_CCU_DIV(_pshift, _pwidth), \
+ .mux = _SUNXI_CCU_MUX(_muxshift, _muxwidth), \
+ .fixed_post_div = _postdiv, \
+ .common = { \
+ .reg = _reg, \
+ .features = CCU_FEATURE_FIXED_POSTDIV, \
+ .hw.init = CLK_HW_INIT_PARENTS_DATA(_name, \
+ _parents, \
+ &ccu_mp_ops, \
+ _flags), \
+ } \
+ }
+
#define SUNXI_CCU_MP_WITH_MUX_GATE(_struct, _name, _parents, _reg, \
_mshift, _mwidth, \
_pshift, _pwidth, \
diff --git a/drivers/clocksource/mips-gic-timer.c b/drivers/clocksource/mips-gic-timer.c
index b3ae38f36720..39c70b5ac44c 100644
--- a/drivers/clocksource/mips-gic-timer.c
+++ b/drivers/clocksource/mips-gic-timer.c
@@ -114,6 +114,9 @@ static void gic_update_frequency(void *data)
static int gic_starting_cpu(unsigned int cpu)
{
+ /* Ensure the GIC counter is running */
+ clear_gic_config(GIC_CONFIG_COUNTSTOP);
+
gic_clockevent_cpu_init(cpu, this_cpu_ptr(&gic_clockevent_device));
return 0;
}
@@ -248,9 +251,6 @@ static int __init gic_clocksource_of_init(struct device_node *node)
pr_warn("Unable to register clock notifier\n");
}
- /* And finally start the counter */
- clear_gic_config(GIC_CONFIG_COUNTSTOP);
-
/*
* It's safe to use the MIPS GIC timer as a sched clock source only if
* its ticks are stable, which is true on either the platforms with
diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
index 09becf14653b..c58c1defd745 100644
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
@@ -165,6 +165,7 @@ static const struct of_device_id blocklist[] __initconst = {
{ .compatible = "qcom,sm8350", },
{ .compatible = "qcom,sm8450", },
{ .compatible = "qcom,sm8550", },
+ { .compatible = "qcom,sm8650", },
{ .compatible = "st,stih407", },
{ .compatible = "st,stih410", },
diff --git a/drivers/cpufreq/tegra186-cpufreq.c b/drivers/cpufreq/tegra186-cpufreq.c
index 7b8fcfa55038..4e5b6f9a56d1 100644
--- a/drivers/cpufreq/tegra186-cpufreq.c
+++ b/drivers/cpufreq/tegra186-cpufreq.c
@@ -73,11 +73,18 @@ static int tegra186_cpufreq_init(struct cpufreq_policy *policy)
{
struct tegra186_cpufreq_data *data = cpufreq_get_driver_data();
unsigned int cluster = data->cpus[policy->cpu].bpmp_cluster_id;
+ u32 cpu;
policy->freq_table = data->clusters[cluster].table;
policy->cpuinfo.transition_latency = 300 * 1000;
policy->driver_data = NULL;
+ /* set same policy for all cpus in a cluster */
+ for (cpu = 0; cpu < ARRAY_SIZE(tegra186_cpus); cpu++) {
+ if (data->cpus[cpu].bpmp_cluster_id == cluster)
+ cpumask_set_cpu(cpu, policy->cpus);
+ }
+
return 0;
}
diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c
index b96e3da0fedd..edd9a8fb9878 100644
--- a/drivers/cpuidle/governors/menu.c
+++ b/drivers/cpuidle/governors/menu.c
@@ -246,8 +246,19 @@ static unsigned int get_typical_interval(struct menu_device *data)
* This can deal with workloads that have long pauses interspersed
* with sporadic activity with a bunch of short pauses.
*/
- if ((divisor * 4) <= INTERVALS * 3)
+ if (divisor * 4 <= INTERVALS * 3) {
+ /*
+ * If there are sufficiently many data points still under
+ * consideration after the outliers have been eliminated,
+ * returning without a prediction would be a mistake because it
+ * is likely that the next interval will not exceed the current
+ * maximum, so return the latter in that case.
+ */
+ if (divisor >= INTERVALS / 2)
+ return max;
+
return UINT_MAX;
+ }
thresh = max - 1;
goto again;
diff --git a/drivers/crypto/marvell/octeontx2/otx2_cptvf_reqmgr.c b/drivers/crypto/marvell/octeontx2/otx2_cptvf_reqmgr.c
index 811ded72ce5f..798bb40fed68 100644
--- a/drivers/crypto/marvell/octeontx2/otx2_cptvf_reqmgr.c
+++ b/drivers/crypto/marvell/octeontx2/otx2_cptvf_reqmgr.c
@@ -410,9 +410,10 @@ static int cpt_process_ccode(struct otx2_cptlfs_info *lfs,
break;
}
- dev_err(&pdev->dev,
- "Request failed with software error code 0x%x\n",
- cpt_status->s.uc_compcode);
+ pr_debug("Request failed with software error code 0x%x: algo = %s driver = %s\n",
+ cpt_status->s.uc_compcode,
+ info->req->areq->tfm->__crt_alg->cra_name,
+ info->req->areq->tfm->__crt_alg->cra_driver_name);
otx2_cpt_dump_sg_list(pdev, info->req);
break;
}
diff --git a/drivers/dma/fsl-edma-main.c b/drivers/dma/fsl-edma-main.c
index cc9923ab686d..eccbcf67951f 100644
--- a/drivers/dma/fsl-edma-main.c
+++ b/drivers/dma/fsl-edma-main.c
@@ -58,7 +58,7 @@ static irqreturn_t fsl_edma3_tx_handler(int irq, void *dev_id)
intr = edma_readl_chreg(fsl_chan, ch_int);
if (!intr)
- return IRQ_HANDLED;
+ return IRQ_NONE;
edma_writel_chreg(fsl_chan, 1, ch_int);
diff --git a/drivers/dma/idxd/cdev.c b/drivers/dma/idxd/cdev.c
index c18633ad8455..7e3a67f9f0a6 100644
--- a/drivers/dma/idxd/cdev.c
+++ b/drivers/dma/idxd/cdev.c
@@ -225,7 +225,7 @@ static int idxd_cdev_open(struct inode *inode, struct file *filp)
struct idxd_wq *wq;
struct device *dev, *fdev;
int rc = 0;
- struct iommu_sva *sva;
+ struct iommu_sva *sva = NULL;
unsigned int pasid;
struct idxd_cdev *idxd_cdev;
@@ -322,7 +322,7 @@ static int idxd_cdev_open(struct inode *inode, struct file *filp)
if (device_user_pasid_enabled(idxd))
idxd_xa_pasid_remove(ctx);
failed_get_pasid:
- if (device_user_pasid_enabled(idxd))
+ if (device_user_pasid_enabled(idxd) && !IS_ERR_OR_NULL(sva))
iommu_sva_unbind_device(sva);
failed:
mutex_unlock(&wq->wq_lock);
@@ -412,6 +412,9 @@ static int idxd_cdev_mmap(struct file *filp, struct vm_area_struct *vma)
if (!idxd->user_submission_safe && !capable(CAP_SYS_RAWIO))
return -EPERM;
+ if (current->mm != ctx->mm)
+ return -EPERM;
+
rc = check_vma(wq, vma, __func__);
if (rc < 0)
return rc;
@@ -478,6 +481,9 @@ static ssize_t idxd_cdev_write(struct file *filp, const char __user *buf, size_t
ssize_t written = 0;
int i;
+ if (current->mm != ctx->mm)
+ return -EPERM;
+
for (i = 0; i < len/sizeof(struct dsa_hw_desc); i++) {
int rc = idxd_submit_user_descriptor(ctx, udesc + i);
@@ -498,6 +504,9 @@ static __poll_t idxd_cdev_poll(struct file *filp,
struct idxd_device *idxd = wq->idxd;
__poll_t out = 0;
+ if (current->mm != ctx->mm)
+ return POLLNVAL;
+
poll_wait(filp, &wq->err_queue, wait);
spin_lock(&idxd->dev_lock);
if (idxd->sw_err.valid)
@@ -584,6 +593,7 @@ void idxd_wq_del_cdev(struct idxd_wq *wq)
static int idxd_user_drv_probe(struct idxd_dev *idxd_dev)
{
+ struct device *dev = &idxd_dev->conf_dev;
struct idxd_wq *wq = idxd_dev_to_wq(idxd_dev);
struct idxd_device *idxd = wq->idxd;
int rc;
@@ -611,6 +621,12 @@ static int idxd_user_drv_probe(struct idxd_dev *idxd_dev)
mutex_lock(&wq->wq_lock);
+ if (!idxd_wq_driver_name_match(wq, dev)) {
+ idxd->cmd_status = IDXD_SCMD_WQ_NO_DRV_NAME;
+ rc = -ENODEV;
+ goto wq_err;
+ }
+
wq->wq = create_workqueue(dev_name(wq_confdev(wq)));
if (!wq->wq) {
rc = -ENOMEM;
diff --git a/drivers/dma/idxd/dma.c b/drivers/dma/idxd/dma.c
index 07623fb0f52f..47a01893cfdb 100644
--- a/drivers/dma/idxd/dma.c
+++ b/drivers/dma/idxd/dma.c
@@ -306,6 +306,12 @@ static int idxd_dmaengine_drv_probe(struct idxd_dev *idxd_dev)
return -ENXIO;
mutex_lock(&wq->wq_lock);
+ if (!idxd_wq_driver_name_match(wq, dev)) {
+ idxd->cmd_status = IDXD_SCMD_WQ_NO_DRV_NAME;
+ rc = -ENODEV;
+ goto err;
+ }
+
wq->type = IDXD_WQT_KERNEL;
rc = drv_enable_wq(wq);
diff --git a/drivers/dma/idxd/idxd.h b/drivers/dma/idxd/idxd.h
index bea10c5cdb76..fcbb8caea899 100644
--- a/drivers/dma/idxd/idxd.h
+++ b/drivers/dma/idxd/idxd.h
@@ -159,6 +159,8 @@ struct idxd_cdev {
int minor;
};
+#define DRIVER_NAME_SIZE 128
+
#define IDXD_ALLOCATED_BATCH_SIZE 128U
#define WQ_NAME_SIZE 1024
#define WQ_TYPE_SIZE 10
@@ -227,6 +229,8 @@ struct idxd_wq {
/* Lock to protect upasid_xa access. */
struct mutex uc_lock;
struct xarray upasid_xa;
+
+ char driver_name[DRIVER_NAME_SIZE + 1];
};
struct idxd_engine {
@@ -648,6 +652,11 @@ static inline void idxd_wqcfg_set_max_batch_shift(int idxd_type, union wqcfg *wq
wqcfg->max_batch_shift = max_batch_shift;
}
+static inline int idxd_wq_driver_name_match(struct idxd_wq *wq, struct device *dev)
+{
+ return (strncmp(wq->driver_name, dev->driver->name, strlen(dev->driver->name)) == 0);
+}
+
int __must_check __idxd_driver_register(struct idxd_device_driver *idxd_drv,
struct module *module, const char *mod_name);
#define idxd_driver_register(driver) \
diff --git a/drivers/dma/idxd/sysfs.c b/drivers/dma/idxd/sysfs.c
index 1fd5a93045f7..3a5ce477a81a 100644
--- a/drivers/dma/idxd/sysfs.c
+++ b/drivers/dma/idxd/sysfs.c
@@ -1282,6 +1282,39 @@ static ssize_t wq_op_config_store(struct device *dev, struct device_attribute *a
static struct device_attribute dev_attr_wq_op_config =
__ATTR(op_config, 0644, wq_op_config_show, wq_op_config_store);
+static ssize_t wq_driver_name_show(struct device *dev, struct device_attribute *attr, char *buf)
+{
+ struct idxd_wq *wq = confdev_to_wq(dev);
+
+ return sysfs_emit(buf, "%s\n", wq->driver_name);
+}
+
+static ssize_t wq_driver_name_store(struct device *dev, struct device_attribute *attr,
+ const char *buf, size_t count)
+{
+ struct idxd_wq *wq = confdev_to_wq(dev);
+ char *input, *pos;
+
+ if (wq->state != IDXD_WQ_DISABLED)
+ return -EPERM;
+
+ if (strlen(buf) > DRIVER_NAME_SIZE || strlen(buf) == 0)
+ return -EINVAL;
+
+ input = kstrndup(buf, count, GFP_KERNEL);
+ if (!input)
+ return -ENOMEM;
+
+ pos = strim(input);
+ memset(wq->driver_name, 0, DRIVER_NAME_SIZE + 1);
+ sprintf(wq->driver_name, "%s", pos);
+ kfree(input);
+ return count;
+}
+
+static struct device_attribute dev_attr_wq_driver_name =
+ __ATTR(driver_name, 0644, wq_driver_name_show, wq_driver_name_store);
+
static struct attribute *idxd_wq_attributes[] = {
&dev_attr_wq_clients.attr,
&dev_attr_wq_state.attr,
@@ -1301,6 +1334,7 @@ static struct attribute *idxd_wq_attributes[] = {
&dev_attr_wq_occupancy.attr,
&dev_attr_wq_enqcmds_retries.attr,
&dev_attr_wq_op_config.attr,
+ &dev_attr_wq_driver_name.attr,
NULL,
};
diff --git a/drivers/edac/ie31200_edac.c b/drivers/edac/ie31200_edac.c
index 56be8ef40f37..e3635fba63b4 100644
--- a/drivers/edac/ie31200_edac.c
+++ b/drivers/edac/ie31200_edac.c
@@ -405,10 +405,9 @@ static int ie31200_probe1(struct pci_dev *pdev, int dev_idx)
int i, j, ret;
struct mem_ctl_info *mci = NULL;
struct edac_mc_layer layers[2];
- struct dimm_data dimm_info[IE31200_CHANNELS][IE31200_DIMMS_PER_CHANNEL];
void __iomem *window;
struct ie31200_priv *priv;
- u32 addr_decode, mad_offset;
+ u32 addr_decode[IE31200_CHANNELS], mad_offset;
/*
* Kaby Lake, Coffee Lake seem to work like Skylake. Please re-visit
@@ -466,19 +465,10 @@ static int ie31200_probe1(struct pci_dev *pdev, int dev_idx)
mad_offset = IE31200_MAD_DIMM_0_OFFSET;
}
- /* populate DIMM info */
for (i = 0; i < IE31200_CHANNELS; i++) {
- addr_decode = readl(window + mad_offset +
+ addr_decode[i] = readl(window + mad_offset +
(i * 4));
- edac_dbg(0, "addr_decode: 0x%x\n", addr_decode);
- for (j = 0; j < IE31200_DIMMS_PER_CHANNEL; j++) {
- populate_dimm_info(&dimm_info[i][j], addr_decode, j,
- skl);
- edac_dbg(0, "size: 0x%x, rank: %d, width: %d\n",
- dimm_info[i][j].size,
- dimm_info[i][j].dual_rank,
- dimm_info[i][j].x16_width);
- }
+ edac_dbg(0, "addr_decode: 0x%x\n", addr_decode[i]);
}
/*
@@ -489,14 +479,22 @@ static int ie31200_probe1(struct pci_dev *pdev, int dev_idx)
*/
for (i = 0; i < IE31200_DIMMS_PER_CHANNEL; i++) {
for (j = 0; j < IE31200_CHANNELS; j++) {
+ struct dimm_data dimm_info;
struct dimm_info *dimm;
unsigned long nr_pages;
- nr_pages = IE31200_PAGES(dimm_info[j][i].size, skl);
+ populate_dimm_info(&dimm_info, addr_decode[j], i,
+ skl);
+ edac_dbg(0, "size: 0x%x, rank: %d, width: %d\n",
+ dimm_info.size,
+ dimm_info.dual_rank,
+ dimm_info.x16_width);
+
+ nr_pages = IE31200_PAGES(dimm_info.size, skl);
if (nr_pages == 0)
continue;
- if (dimm_info[j][i].dual_rank) {
+ if (dimm_info.dual_rank) {
nr_pages = nr_pages / 2;
dimm = edac_get_dimm(mci, (i * 2) + 1, j, 0);
dimm->nr_pages = nr_pages;
diff --git a/drivers/firmware/arm_ffa/bus.c b/drivers/firmware/arm_ffa/bus.c
index 7865438b3696..d885e1381072 100644
--- a/drivers/firmware/arm_ffa/bus.c
+++ b/drivers/firmware/arm_ffa/bus.c
@@ -191,6 +191,7 @@ struct ffa_device *ffa_device_register(const uuid_t *uuid, int vm_id,
dev = &ffa_dev->dev;
dev->bus = &ffa_bus_type;
dev->release = ffa_release_device;
+ dev->dma_mask = &dev->coherent_dma_mask;
dev_set_name(&ffa_dev->dev, "arm-ffa-%d", id);
ffa_dev->id = id;
diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/driver.c
index 7c2db3f01765..488f8345dd1b 100644
--- a/drivers/firmware/arm_ffa/driver.c
+++ b/drivers/firmware/arm_ffa/driver.c
@@ -121,6 +121,14 @@ static int ffa_version_check(u32 *version)
return -EOPNOTSUPP;
}
+ if (FFA_MAJOR_VERSION(ver.a0) > FFA_MAJOR_VERSION(FFA_DRIVER_VERSION)) {
+ pr_err("Incompatible v%d.%d! Latest supported v%d.%d\n",
+ FFA_MAJOR_VERSION(ver.a0), FFA_MINOR_VERSION(ver.a0),
+ FFA_MAJOR_VERSION(FFA_DRIVER_VERSION),
+ FFA_MINOR_VERSION(FFA_DRIVER_VERSION));
+ return -EINVAL;
+ }
+
if (ver.a0 < FFA_MIN_VERSION) {
pr_err("Incompatible v%d.%d! Earliest supported v%d.%d\n",
FFA_MAJOR_VERSION(ver.a0), FFA_MINOR_VERSION(ver.a0),
diff --git a/drivers/firmware/arm_scmi/bus.c b/drivers/firmware/arm_scmi/bus.c
index 51eeaf14367d..e1b949aedf9e 100644
--- a/drivers/firmware/arm_scmi/bus.c
+++ b/drivers/firmware/arm_scmi/bus.c
@@ -42,7 +42,7 @@ static atomic_t scmi_syspower_registered = ATOMIC_INIT(0);
* This helper let an SCMI driver request specific devices identified by the
* @id_table to be created for each active SCMI instance.
*
- * The requested device name MUST NOT be already existent for any protocol;
+ * The requested device name MUST NOT be already existent for this protocol;
* at first the freshly requested @id_table is annotated in the IDR table
* @scmi_requested_devices and then the requested device is advertised to any
* registered party via the @scmi_requested_devices_nh notification chain.
@@ -52,7 +52,6 @@ static atomic_t scmi_syspower_registered = ATOMIC_INIT(0);
static int scmi_protocol_device_request(const struct scmi_device_id *id_table)
{
int ret = 0;
- unsigned int id = 0;
struct list_head *head, *phead = NULL;
struct scmi_requested_dev *rdev;
@@ -67,19 +66,13 @@ static int scmi_protocol_device_request(const struct scmi_device_id *id_table)
}
/*
- * Search for the matching protocol rdev list and then search
- * of any existent equally named device...fails if any duplicate found.
+ * Find the matching protocol rdev list and then search of any
+ * existent equally named device...fails if any duplicate found.
*/
mutex_lock(&scmi_requested_devices_mtx);
- idr_for_each_entry(&scmi_requested_devices, head, id) {
- if (!phead) {
- /* A list found registered in the IDR is never empty */
- rdev = list_first_entry(head, struct scmi_requested_dev,
- node);
- if (rdev->id_table->protocol_id ==
- id_table->protocol_id)
- phead = head;
- }
+ phead = idr_find(&scmi_requested_devices, id_table->protocol_id);
+ if (phead) {
+ head = phead;
list_for_each_entry(rdev, head, node) {
if (!strcmp(rdev->id_table->name, id_table->name)) {
pr_err("Ignoring duplicate request [%d] %s\n",
diff --git a/drivers/fpga/altera-cvp.c b/drivers/fpga/altera-cvp.c
index 4ffb9da537d8..5295ff90482b 100644
--- a/drivers/fpga/altera-cvp.c
+++ b/drivers/fpga/altera-cvp.c
@@ -52,7 +52,7 @@
/* V2 Defines */
#define VSE_CVP_TX_CREDITS 0x49 /* 8bit */
-#define V2_CREDIT_TIMEOUT_US 20000
+#define V2_CREDIT_TIMEOUT_US 40000
#define V2_CHECK_CREDIT_US 10
#define V2_POLL_TIMEOUT_US 1000000
#define V2_USER_TIMEOUT_US 500000
diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
index b882b26ab500..faadbe66b23e 100644
--- a/drivers/gpio/gpio-pca953x.c
+++ b/drivers/gpio/gpio-pca953x.c
@@ -10,6 +10,7 @@
#include <linux/acpi.h>
#include <linux/bitmap.h>
+#include <linux/cleanup.h>
#include <linux/gpio/consumer.h>
#include <linux/gpio/driver.h>
#include <linux/i2c.h>
@@ -519,12 +520,10 @@ static int pca953x_gpio_direction_input(struct gpio_chip *gc, unsigned off)
struct pca953x_chip *chip = gpiochip_get_data(gc);
u8 dirreg = chip->recalc_addr(chip, chip->regs->direction, off);
u8 bit = BIT(off % BANK_SZ);
- int ret;
- mutex_lock(&chip->i2c_lock);
- ret = regmap_write_bits(chip->regmap, dirreg, bit, bit);
- mutex_unlock(&chip->i2c_lock);
- return ret;
+ guard(mutex)(&chip->i2c_lock);
+
+ return regmap_write_bits(chip->regmap, dirreg, bit, bit);
}
static int pca953x_gpio_direction_output(struct gpio_chip *gc,
@@ -536,17 +535,15 @@ static int pca953x_gpio_direction_output(struct gpio_chip *gc,
u8 bit = BIT(off % BANK_SZ);
int ret;
- mutex_lock(&chip->i2c_lock);
+ guard(mutex)(&chip->i2c_lock);
+
/* set output level */
ret = regmap_write_bits(chip->regmap, outreg, bit, val ? bit : 0);
if (ret)
- goto exit;
+ return ret;
/* then direction */
- ret = regmap_write_bits(chip->regmap, dirreg, bit, 0);
-exit:
- mutex_unlock(&chip->i2c_lock);
- return ret;
+ return regmap_write_bits(chip->regmap, dirreg, bit, 0);
}
static int pca953x_gpio_get_value(struct gpio_chip *gc, unsigned off)
@@ -557,9 +554,8 @@ static int pca953x_gpio_get_value(struct gpio_chip *gc, unsigned off)
u32 reg_val;
int ret;
- mutex_lock(&chip->i2c_lock);
- ret = regmap_read(chip->regmap, inreg, ®_val);
- mutex_unlock(&chip->i2c_lock);
+ scoped_guard(mutex, &chip->i2c_lock)
+ ret = regmap_read(chip->regmap, inreg, ®_val);
if (ret < 0)
return ret;
@@ -572,9 +568,9 @@ static void pca953x_gpio_set_value(struct gpio_chip *gc, unsigned off, int val)
u8 outreg = chip->recalc_addr(chip, chip->regs->output, off);
u8 bit = BIT(off % BANK_SZ);
- mutex_lock(&chip->i2c_lock);
+ guard(mutex)(&chip->i2c_lock);
+
regmap_write_bits(chip->regmap, outreg, bit, val ? bit : 0);
- mutex_unlock(&chip->i2c_lock);
}
static int pca953x_gpio_get_direction(struct gpio_chip *gc, unsigned off)
@@ -585,9 +581,8 @@ static int pca953x_gpio_get_direction(struct gpio_chip *gc, unsigned off)
u32 reg_val;
int ret;
- mutex_lock(&chip->i2c_lock);
- ret = regmap_read(chip->regmap, dirreg, ®_val);
- mutex_unlock(&chip->i2c_lock);
+ scoped_guard(mutex, &chip->i2c_lock)
+ ret = regmap_read(chip->regmap, dirreg, ®_val);
if (ret < 0)
return ret;
@@ -604,9 +599,8 @@ static int pca953x_gpio_get_multiple(struct gpio_chip *gc,
DECLARE_BITMAP(reg_val, MAX_LINE);
int ret;
- mutex_lock(&chip->i2c_lock);
- ret = pca953x_read_regs(chip, chip->regs->input, reg_val);
- mutex_unlock(&chip->i2c_lock);
+ scoped_guard(mutex, &chip->i2c_lock)
+ ret = pca953x_read_regs(chip, chip->regs->input, reg_val);
if (ret)
return ret;
@@ -621,16 +615,15 @@ static void pca953x_gpio_set_multiple(struct gpio_chip *gc,
DECLARE_BITMAP(reg_val, MAX_LINE);
int ret;
- mutex_lock(&chip->i2c_lock);
+ guard(mutex)(&chip->i2c_lock);
+
ret = pca953x_read_regs(chip, chip->regs->output, reg_val);
if (ret)
- goto exit;
+ return;
bitmap_replace(reg_val, reg_val, bits, mask, gc->ngpio);
pca953x_write_regs(chip, chip->regs->output, reg_val);
-exit:
- mutex_unlock(&chip->i2c_lock);
}
static int pca953x_gpio_set_pull_up_down(struct pca953x_chip *chip,
@@ -638,7 +631,6 @@ static int pca953x_gpio_set_pull_up_down(struct pca953x_chip *chip,
unsigned long config)
{
enum pin_config_param param = pinconf_to_config_param(config);
-
u8 pull_en_reg = chip->recalc_addr(chip, PCAL953X_PULL_EN, offset);
u8 pull_sel_reg = chip->recalc_addr(chip, PCAL953X_PULL_SEL, offset);
u8 bit = BIT(offset % BANK_SZ);
@@ -651,7 +643,7 @@ static int pca953x_gpio_set_pull_up_down(struct pca953x_chip *chip,
if (!(chip->driver_data & PCA_PCAL))
return -ENOTSUPP;
- mutex_lock(&chip->i2c_lock);
+ guard(mutex)(&chip->i2c_lock);
/* Configure pull-up/pull-down */
if (param == PIN_CONFIG_BIAS_PULL_UP)
@@ -661,17 +653,13 @@ static int pca953x_gpio_set_pull_up_down(struct pca953x_chip *chip,
else
ret = 0;
if (ret)
- goto exit;
+ return ret;
/* Disable/Enable pull-up/pull-down */
if (param == PIN_CONFIG_BIAS_DISABLE)
- ret = regmap_write_bits(chip->regmap, pull_en_reg, bit, 0);
+ return regmap_write_bits(chip->regmap, pull_en_reg, bit, 0);
else
- ret = regmap_write_bits(chip->regmap, pull_en_reg, bit, bit);
-
-exit:
- mutex_unlock(&chip->i2c_lock);
- return ret;
+ return regmap_write_bits(chip->regmap, pull_en_reg, bit, bit);
}
static int pca953x_gpio_set_config(struct gpio_chip *gc, unsigned int offset,
@@ -883,10 +871,8 @@ static irqreturn_t pca953x_irq_handler(int irq, void *devid)
bitmap_zero(pending, MAX_LINE);
- mutex_lock(&chip->i2c_lock);
- ret = pca953x_irq_pending(chip, pending);
- mutex_unlock(&chip->i2c_lock);
-
+ scoped_guard(mutex, &chip->i2c_lock)
+ ret = pca953x_irq_pending(chip, pending);
if (ret) {
ret = 0;
@@ -1168,9 +1154,9 @@ static int pca953x_probe(struct i2c_client *client)
}
#ifdef CONFIG_PM_SLEEP
-static int pca953x_regcache_sync(struct device *dev)
+static int pca953x_regcache_sync(struct pca953x_chip *chip)
{
- struct pca953x_chip *chip = dev_get_drvdata(dev);
+ struct device *dev = &chip->client->dev;
int ret;
u8 regaddr;
@@ -1217,13 +1203,38 @@ static int pca953x_regcache_sync(struct device *dev)
return 0;
}
+static int pca953x_restore_context(struct pca953x_chip *chip)
+{
+ int ret;
+
+ guard(mutex)(&chip->i2c_lock);
+
+ if (chip->client->irq > 0)
+ enable_irq(chip->client->irq);
+ regcache_cache_only(chip->regmap, false);
+ regcache_mark_dirty(chip->regmap);
+ ret = pca953x_regcache_sync(chip);
+ if (ret)
+ return ret;
+
+ return regcache_sync(chip->regmap);
+}
+
+static void pca953x_save_context(struct pca953x_chip *chip)
+{
+ guard(mutex)(&chip->i2c_lock);
+
+ /* Disable IRQ to prevent early triggering while regmap "cache only" is on */
+ if (chip->client->irq > 0)
+ disable_irq(chip->client->irq);
+ regcache_cache_only(chip->regmap, true);
+}
+
static int pca953x_suspend(struct device *dev)
{
struct pca953x_chip *chip = dev_get_drvdata(dev);
- mutex_lock(&chip->i2c_lock);
- regcache_cache_only(chip->regmap, true);
- mutex_unlock(&chip->i2c_lock);
+ pca953x_save_context(chip);
if (atomic_read(&chip->wakeup_path))
device_set_wakeup_path(dev);
@@ -1246,17 +1257,7 @@ static int pca953x_resume(struct device *dev)
}
}
- mutex_lock(&chip->i2c_lock);
- regcache_cache_only(chip->regmap, false);
- regcache_mark_dirty(chip->regmap);
- ret = pca953x_regcache_sync(dev);
- if (ret) {
- mutex_unlock(&chip->i2c_lock);
- return ret;
- }
-
- ret = regcache_sync(chip->regmap);
- mutex_unlock(&chip->i2c_lock);
+ ret = pca953x_restore_context(chip);
if (ret) {
dev_err(dev, "Failed to restore register map: %d\n", ret);
return ret;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
index be4cc4868a74..493e18bcea06 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
@@ -43,6 +43,29 @@
#include <linux/pci-p2pdma.h>
#include <linux/pm_runtime.h>
+static const struct dma_buf_attach_ops amdgpu_dma_buf_attach_ops;
+
+/**
+ * dma_buf_attach_adev - Helper to get adev of an attachment
+ *
+ * @attach: attachment
+ *
+ * Returns:
+ * A struct amdgpu_device * if the attaching device is an amdgpu device or
+ * partition, NULL otherwise.
+ */
+static struct amdgpu_device *dma_buf_attach_adev(struct dma_buf_attachment *attach)
+{
+ if (attach->importer_ops == &amdgpu_dma_buf_attach_ops) {
+ struct drm_gem_object *obj = attach->importer_priv;
+ struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj);
+
+ return amdgpu_ttm_adev(bo->tbo.bdev);
+ }
+
+ return NULL;
+}
+
/**
* amdgpu_dma_buf_attach - &dma_buf_ops.attach implementation
*
@@ -54,12 +77,14 @@
static int amdgpu_dma_buf_attach(struct dma_buf *dmabuf,
struct dma_buf_attachment *attach)
{
+ struct amdgpu_device *attach_adev = dma_buf_attach_adev(attach);
struct drm_gem_object *obj = dmabuf->priv;
struct amdgpu_bo *bo = gem_to_amdgpu_bo(obj);
struct amdgpu_device *adev = amdgpu_ttm_adev(bo->tbo.bdev);
int r;
- if (pci_p2pdma_distance(adev->pdev, attach->dev, false) < 0)
+ if (!amdgpu_dmabuf_is_xgmi_accessible(attach_adev, bo) &&
+ pci_p2pdma_distance(adev->pdev, attach->dev, false) < 0)
attach->peer2peer = false;
r = pm_runtime_get_sync(adev_to_drm(adev)->dev);
@@ -482,6 +507,9 @@ bool amdgpu_dmabuf_is_xgmi_accessible(struct amdgpu_device *adev,
struct drm_gem_object *obj = &bo->tbo.base;
struct drm_gem_object *gobj;
+ if (!adev)
+ return false;
+
if (obj->import_attach) {
struct dma_buf *dma_buf = obj->import_attach->dmabuf;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index 6a24e8ceb944..ffa5e72a84eb 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
@@ -43,7 +43,7 @@
#include "amdgpu_securedisplay.h"
#include "amdgpu_atomfirmware.h"
-#define AMD_VBIOS_FILE_MAX_SIZE_B (1024*1024*3)
+#define AMD_VBIOS_FILE_MAX_SIZE_B (1024*1024*16)
static int psp_load_smu_fw(struct psp_context *psp);
static int psp_rap_terminate(struct psp_context *psp);
@@ -506,7 +506,6 @@ static int psp_sw_fini(void *handle)
{
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
struct psp_context *psp = &adev->psp;
- struct psp_gfx_cmd_resp *cmd = psp->cmd;
psp_memory_training_fini(psp);
@@ -516,8 +515,8 @@ static int psp_sw_fini(void *handle)
amdgpu_ucode_release(&psp->cap_fw);
amdgpu_ucode_release(&psp->toc_fw);
- kfree(cmd);
- cmd = NULL;
+ kfree(psp->cmd);
+ psp->cmd = NULL;
psp_free_shared_bufs(psp);
diff --git a/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c b/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c
index 66c6bab75f8a..0d3d00681eda 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c
@@ -92,12 +92,12 @@ static void gfxhub_v1_0_init_system_aperture_regs(struct amdgpu_device *adev)
{
uint64_t value;
- /* Program the AGP BAR */
- WREG32_SOC15_RLC(GC, 0, mmMC_VM_AGP_BASE, 0);
- WREG32_SOC15_RLC(GC, 0, mmMC_VM_AGP_BOT, adev->gmc.agp_start >> 24);
- WREG32_SOC15_RLC(GC, 0, mmMC_VM_AGP_TOP, adev->gmc.agp_end >> 24);
-
if (!amdgpu_sriov_vf(adev) || adev->asic_type <= CHIP_VEGA10) {
+ /* Program the AGP BAR */
+ WREG32_SOC15_RLC(GC, 0, mmMC_VM_AGP_BASE, 0);
+ WREG32_SOC15_RLC(GC, 0, mmMC_VM_AGP_BOT, adev->gmc.agp_start >> 24);
+ WREG32_SOC15_RLC(GC, 0, mmMC_VM_AGP_TOP, adev->gmc.agp_end >> 24);
+
/* Program the system aperture low logical page number. */
WREG32_SOC15_RLC(GC, 0, mmMC_VM_SYSTEM_APERTURE_LOW_ADDR,
min(adev->gmc.fb_start, adev->gmc.agp_start) >> 18);
diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_7.c b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_7.c
index 9086f2fdfaf4..553f4f24f5ad 100644
--- a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_7.c
+++ b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_7.c
@@ -172,6 +172,30 @@ static void mmhub_v1_7_init_tlb_regs(struct amdgpu_device *adev)
WREG32_SOC15(MMHUB, 0, regMC_VM_MX_L1_TLB_CNTL, tmp);
}
+/* Set snoop bit for SDMA so that SDMA writes probe-invalidates RW lines */
+static void mmhub_v1_7_init_snoop_override_regs(struct amdgpu_device *adev)
+{
+ uint32_t tmp;
+ int i;
+ uint32_t distance = regDAGB1_WRCLI_GPU_SNOOP_OVERRIDE -
+ regDAGB0_WRCLI_GPU_SNOOP_OVERRIDE;
+
+ for (i = 0; i < 5; i++) { /* DAGB instances */
+ tmp = RREG32_SOC15_OFFSET(MMHUB, 0,
+ regDAGB0_WRCLI_GPU_SNOOP_OVERRIDE, i * distance);
+ tmp |= (1 << 15); /* SDMA client is BIT15 */
+ WREG32_SOC15_OFFSET(MMHUB, 0,
+ regDAGB0_WRCLI_GPU_SNOOP_OVERRIDE, i * distance, tmp);
+
+ tmp = RREG32_SOC15_OFFSET(MMHUB, 0,
+ regDAGB0_WRCLI_GPU_SNOOP_OVERRIDE_VALUE, i * distance);
+ tmp |= (1 << 15);
+ WREG32_SOC15_OFFSET(MMHUB, 0,
+ regDAGB0_WRCLI_GPU_SNOOP_OVERRIDE_VALUE, i * distance, tmp);
+ }
+
+}
+
static void mmhub_v1_7_init_cache_regs(struct amdgpu_device *adev)
{
uint32_t tmp;
@@ -337,6 +361,7 @@ static int mmhub_v1_7_gart_enable(struct amdgpu_device *adev)
mmhub_v1_7_init_system_aperture_regs(adev);
mmhub_v1_7_init_tlb_regs(adev);
mmhub_v1_7_init_cache_regs(adev);
+ mmhub_v1_7_init_snoop_override_regs(adev);
mmhub_v1_7_enable_system_domain(adev);
mmhub_v1_7_disable_identity_aperture(adev);
diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c
index 3d8e579d5c4e..c7bdccff785b 100644
--- a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c
+++ b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c
@@ -213,6 +213,32 @@ static void mmhub_v1_8_init_tlb_regs(struct amdgpu_device *adev)
}
}
+/* Set snoop bit for SDMA so that SDMA writes probe-invalidates RW lines */
+static void mmhub_v1_8_init_snoop_override_regs(struct amdgpu_device *adev)
+{
+ uint32_t tmp, inst_mask;
+ int i, j;
+ uint32_t distance = regDAGB1_WRCLI_GPU_SNOOP_OVERRIDE -
+ regDAGB0_WRCLI_GPU_SNOOP_OVERRIDE;
+
+ inst_mask = adev->aid_mask;
+ for_each_inst(i, inst_mask) {
+ for (j = 0; j < 5; j++) { /* DAGB instances */
+ tmp = RREG32_SOC15_OFFSET(MMHUB, i,
+ regDAGB0_WRCLI_GPU_SNOOP_OVERRIDE, j * distance);
+ tmp |= (1 << 15); /* SDMA client is BIT15 */
+ WREG32_SOC15_OFFSET(MMHUB, i,
+ regDAGB0_WRCLI_GPU_SNOOP_OVERRIDE, j * distance, tmp);
+
+ tmp = RREG32_SOC15_OFFSET(MMHUB, i,
+ regDAGB0_WRCLI_GPU_SNOOP_OVERRIDE_VALUE, j * distance);
+ tmp |= (1 << 15);
+ WREG32_SOC15_OFFSET(MMHUB, i,
+ regDAGB0_WRCLI_GPU_SNOOP_OVERRIDE_VALUE, j * distance, tmp);
+ }
+ }
+}
+
static void mmhub_v1_8_init_cache_regs(struct amdgpu_device *adev)
{
uint32_t tmp, inst_mask;
@@ -418,6 +444,7 @@ static int mmhub_v1_8_gart_enable(struct amdgpu_device *adev)
mmhub_v1_8_init_system_aperture_regs(adev);
mmhub_v1_8_init_tlb_regs(adev);
mmhub_v1_8_init_cache_regs(adev);
+ mmhub_v1_8_init_snoop_override_regs(adev);
mmhub_v1_8_enable_system_domain(adev);
mmhub_v1_8_disable_identity_aperture(adev);
diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c b/drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c
index 5718e4d40e66..9713cb59d1c1 100644
--- a/drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c
+++ b/drivers/gpu/drm/amd/amdgpu/mmhub_v9_4.c
@@ -198,6 +198,36 @@ static void mmhub_v9_4_init_tlb_regs(struct amdgpu_device *adev, int hubid)
hubid * MMHUB_INSTANCE_REGISTER_OFFSET, tmp);
}
+/* Set snoop bit for SDMA so that SDMA writes probe-invalidates RW lines */
+static void mmhub_v9_4_init_snoop_override_regs(struct amdgpu_device *adev, int hubid)
+{
+ uint32_t tmp;
+ int i;
+ uint32_t distance = mmDAGB1_WRCLI_GPU_SNOOP_OVERRIDE -
+ mmDAGB0_WRCLI_GPU_SNOOP_OVERRIDE;
+ uint32_t huboffset = hubid * MMHUB_INSTANCE_REGISTER_OFFSET;
+
+ for (i = 0; i < 5 - (2 * hubid); i++) {
+ /* DAGB instances 0 to 4 are in hub0 and 5 to 7 are in hub1 */
+ tmp = RREG32_SOC15_OFFSET(MMHUB, 0,
+ mmDAGB0_WRCLI_GPU_SNOOP_OVERRIDE,
+ huboffset + i * distance);
+ tmp |= (1 << 15); /* SDMA client is BIT15 */
+ WREG32_SOC15_OFFSET(MMHUB, 0,
+ mmDAGB0_WRCLI_GPU_SNOOP_OVERRIDE,
+ huboffset + i * distance, tmp);
+
+ tmp = RREG32_SOC15_OFFSET(MMHUB, 0,
+ mmDAGB0_WRCLI_GPU_SNOOP_OVERRIDE_VALUE,
+ huboffset + i * distance);
+ tmp |= (1 << 15);
+ WREG32_SOC15_OFFSET(MMHUB, 0,
+ mmDAGB0_WRCLI_GPU_SNOOP_OVERRIDE_VALUE,
+ huboffset + i * distance, tmp);
+ }
+
+}
+
static void mmhub_v9_4_init_cache_regs(struct amdgpu_device *adev, int hubid)
{
uint32_t tmp;
@@ -392,6 +422,7 @@ static int mmhub_v9_4_gart_enable(struct amdgpu_device *adev)
if (!amdgpu_sriov_vf(adev))
mmhub_v9_4_init_cache_regs(adev, i);
+ mmhub_v9_4_init_snoop_override_regs(adev, i);
mmhub_v9_4_enable_system_domain(adev, i);
if (!amdgpu_sriov_vf(adev))
mmhub_v9_4_disable_identity_aperture(adev, i);
diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c b/drivers/gpu/drm/amd/amdgpu/nv.c
index 7910c463ae38..82709e692f4c 100644
--- a/drivers/gpu/drm/amd/amdgpu/nv.c
+++ b/drivers/gpu/drm/amd/amdgpu/nv.c
@@ -142,23 +142,23 @@ static struct amdgpu_video_codec_info sriov_sc_video_codecs_encode_array[] = {
};
static struct amdgpu_video_codec_info sriov_sc_video_codecs_decode_array_vcn0[] = {
- {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG2, 4096, 4096, 3)},
- {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4, 4096, 4096, 5)},
+ {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG2, 1920, 1088, 3)},
+ {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4, 1920, 1088, 5)},
{codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4_AVC, 4096, 4096, 52)},
- {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_VC1, 4096, 4096, 4)},
+ {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_VC1, 1920, 1088, 4)},
{codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_HEVC, 8192, 4352, 186)},
- {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_JPEG, 4096, 4096, 0)},
+ {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_JPEG, 16384, 16384, 0)},
{codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_VP9, 8192, 4352, 0)},
{codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_AV1, 8192, 4352, 0)},
};
static struct amdgpu_video_codec_info sriov_sc_video_codecs_decode_array_vcn1[] = {
- {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG2, 4096, 4096, 3)},
- {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4, 4096, 4096, 5)},
+ {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG2, 1920, 1088, 3)},
+ {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4, 1920, 1088, 5)},
{codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4_AVC, 4096, 4096, 52)},
- {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_VC1, 4096, 4096, 4)},
+ {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_VC1, 1920, 1088, 4)},
{codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_HEVC, 8192, 4352, 186)},
- {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_JPEG, 4096, 4096, 0)},
+ {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_JPEG, 16384, 16384, 0)},
{codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_VP9, 8192, 4352, 0)},
};
diff --git a/drivers/gpu/drm/amd/amdgpu/soc21.c b/drivers/gpu/drm/amd/amdgpu/soc21.c
index 4712ffc0a482..7819f5d584f5 100644
--- a/drivers/gpu/drm/amd/amdgpu/soc21.c
+++ b/drivers/gpu/drm/amd/amdgpu/soc21.c
@@ -117,23 +117,17 @@ static struct amdgpu_video_codecs sriov_vcn_4_0_0_video_codecs_encode_vcn1 = {
};
static struct amdgpu_video_codec_info sriov_vcn_4_0_0_video_codecs_decode_array_vcn0[] = {
- {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG2, 4096, 4096, 3)},
- {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4, 4096, 4096, 5)},
{codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4_AVC, 4096, 4096, 52)},
- {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_VC1, 4096, 4096, 4)},
{codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_HEVC, 8192, 4352, 186)},
- {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_JPEG, 4096, 4096, 0)},
+ {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_JPEG, 16384, 16384, 0)},
{codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_VP9, 8192, 4352, 0)},
{codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_AV1, 8192, 4352, 0)},
};
static struct amdgpu_video_codec_info sriov_vcn_4_0_0_video_codecs_decode_array_vcn1[] = {
- {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG2, 4096, 4096, 3)},
- {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4, 4096, 4096, 5)},
{codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4_AVC, 4096, 4096, 52)},
- {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_VC1, 4096, 4096, 4)},
{codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_HEVC, 8192, 4352, 186)},
- {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_JPEG, 4096, 4096, 0)},
+ {codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_JPEG, 16384, 16384, 0)},
{codec_info_build(AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_VP9, 8192, 4352, 0)},
};
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
index 4d9a406925e1..fd4a75073364 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
@@ -2147,14 +2147,6 @@ static int destroy_queue_cpsch(struct device_queue_manager *dqm,
return retval;
}
-/*
- * Low bits must be 0000/FFFF as required by HW, high bits must be 0 to
- * stay in user mode.
- */
-#define APE1_FIXED_BITS_MASK 0xFFFF80000000FFFFULL
-/* APE1 limit is inclusive and 64K aligned. */
-#define APE1_LIMIT_ALIGNMENT 0xFFFF
-
static bool set_cache_memory_policy(struct device_queue_manager *dqm,
struct qcm_process_device *qpd,
enum cache_policy default_policy,
@@ -2169,34 +2161,6 @@ static bool set_cache_memory_policy(struct device_queue_manager *dqm,
dqm_lock(dqm);
- if (alternate_aperture_size == 0) {
- /* base > limit disables APE1 */
- qpd->sh_mem_ape1_base = 1;
- qpd->sh_mem_ape1_limit = 0;
- } else {
- /*
- * In FSA64, APE1_Base[63:0] = { 16{SH_MEM_APE1_BASE[31]},
- * SH_MEM_APE1_BASE[31:0], 0x0000 }
- * APE1_Limit[63:0] = { 16{SH_MEM_APE1_LIMIT[31]},
- * SH_MEM_APE1_LIMIT[31:0], 0xFFFF }
- * Verify that the base and size parameters can be
- * represented in this format and convert them.
- * Additionally restrict APE1 to user-mode addresses.
- */
-
- uint64_t base = (uintptr_t)alternate_aperture_base;
- uint64_t limit = base + alternate_aperture_size - 1;
-
- if (limit <= base || (base & APE1_FIXED_BITS_MASK) != 0 ||
- (limit & APE1_FIXED_BITS_MASK) != APE1_LIMIT_ALIGNMENT) {
- retval = false;
- goto out;
- }
-
- qpd->sh_mem_ape1_base = base >> 16;
- qpd->sh_mem_ape1_limit = limit >> 16;
- }
-
retval = dqm->asic_ops.set_cache_memory_policy(
dqm,
qpd,
@@ -2205,6 +2169,9 @@ static bool set_cache_memory_policy(struct device_queue_manager *dqm,
alternate_aperture_base,
alternate_aperture_size);
+ if (retval)
+ goto out;
+
if ((dqm->sched_policy == KFD_SCHED_POLICY_NO_HWS) && (qpd->vmid != 0))
program_sh_mem_settings(dqm, qpd);
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager_cik.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager_cik.c
index d4d95c7f2e5d..32bedef912b3 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager_cik.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager_cik.c
@@ -27,6 +27,14 @@
#include "oss/oss_2_4_sh_mask.h"
#include "gca/gfx_7_2_sh_mask.h"
+/*
+ * Low bits must be 0000/FFFF as required by HW, high bits must be 0 to
+ * stay in user mode.
+ */
+#define APE1_FIXED_BITS_MASK 0xFFFF80000000FFFFULL
+/* APE1 limit is inclusive and 64K aligned. */
+#define APE1_LIMIT_ALIGNMENT 0xFFFF
+
static bool set_cache_memory_policy_cik(struct device_queue_manager *dqm,
struct qcm_process_device *qpd,
enum cache_policy default_policy,
@@ -84,6 +92,36 @@ static bool set_cache_memory_policy_cik(struct device_queue_manager *dqm,
{
uint32_t default_mtype;
uint32_t ape1_mtype;
+ unsigned int temp;
+ bool retval = true;
+
+ if (alternate_aperture_size == 0) {
+ /* base > limit disables APE1 */
+ qpd->sh_mem_ape1_base = 1;
+ qpd->sh_mem_ape1_limit = 0;
+ } else {
+ /*
+ * In FSA64, APE1_Base[63:0] = { 16{SH_MEM_APE1_BASE[31]},
+ * SH_MEM_APE1_BASE[31:0], 0x0000 }
+ * APE1_Limit[63:0] = { 16{SH_MEM_APE1_LIMIT[31]},
+ * SH_MEM_APE1_LIMIT[31:0], 0xFFFF }
+ * Verify that the base and size parameters can be
+ * represented in this format and convert them.
+ * Additionally restrict APE1 to user-mode addresses.
+ */
+
+ uint64_t base = (uintptr_t)alternate_aperture_base;
+ uint64_t limit = base + alternate_aperture_size - 1;
+
+ if (limit <= base || (base & APE1_FIXED_BITS_MASK) != 0 ||
+ (limit & APE1_FIXED_BITS_MASK) != APE1_LIMIT_ALIGNMENT) {
+ retval = false;
+ goto out;
+ }
+
+ qpd->sh_mem_ape1_base = base >> 16;
+ qpd->sh_mem_ape1_limit = limit >> 16;
+ }
default_mtype = (default_policy == cache_policy_coherent) ?
MTYPE_NONCACHED :
@@ -97,37 +135,22 @@ static bool set_cache_memory_policy_cik(struct device_queue_manager *dqm,
| ALIGNMENT_MODE(SH_MEM_ALIGNMENT_MODE_UNALIGNED)
| DEFAULT_MTYPE(default_mtype)
| APE1_MTYPE(ape1_mtype);
-
- return true;
-}
-
-static int update_qpd_cik(struct device_queue_manager *dqm,
- struct qcm_process_device *qpd)
-{
- struct kfd_process_device *pdd;
- unsigned int temp;
-
- pdd = qpd_to_pdd(qpd);
-
- /* check if sh_mem_config register already configured */
- if (qpd->sh_mem_config == 0) {
- qpd->sh_mem_config =
- ALIGNMENT_MODE(SH_MEM_ALIGNMENT_MODE_UNALIGNED) |
- DEFAULT_MTYPE(MTYPE_NONCACHED) |
- APE1_MTYPE(MTYPE_NONCACHED);
- qpd->sh_mem_ape1_limit = 0;
- qpd->sh_mem_ape1_base = 0;
- }
-
/* On dGPU we're always in GPUVM64 addressing mode with 64-bit
* aperture addresses.
*/
- temp = get_sh_mem_bases_nybble_64(pdd);
+ temp = get_sh_mem_bases_nybble_64(qpd_to_pdd(qpd));
qpd->sh_mem_bases = compute_sh_mem_bases_64bit(temp);
pr_debug("is32bit process: %d sh_mem_bases nybble: 0x%X and register 0x%X\n",
qpd->pqm->process->is_32bit_user_mode, temp, qpd->sh_mem_bases);
+out:
+ return retval;
+}
+
+static int update_qpd_cik(struct device_queue_manager *dqm,
+ struct qcm_process_device *qpd)
+{
return 0;
}
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager_vi.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager_vi.c
index b291ee0fab94..320518f41890 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager_vi.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager_vi.c
@@ -27,6 +27,14 @@
#include "gca/gfx_8_0_sh_mask.h"
#include "oss/oss_3_0_sh_mask.h"
+/*
+ * Low bits must be 0000/FFFF as required by HW, high bits must be 0 to
+ * stay in user mode.
+ */
+#define APE1_FIXED_BITS_MASK 0xFFFF80000000FFFFULL
+/* APE1 limit is inclusive and 64K aligned. */
+#define APE1_LIMIT_ALIGNMENT 0xFFFF
+
static bool set_cache_memory_policy_vi(struct device_queue_manager *dqm,
struct qcm_process_device *qpd,
enum cache_policy default_policy,
@@ -85,6 +93,36 @@ static bool set_cache_memory_policy_vi(struct device_queue_manager *dqm,
{
uint32_t default_mtype;
uint32_t ape1_mtype;
+ unsigned int temp;
+ bool retval = true;
+
+ if (alternate_aperture_size == 0) {
+ /* base > limit disables APE1 */
+ qpd->sh_mem_ape1_base = 1;
+ qpd->sh_mem_ape1_limit = 0;
+ } else {
+ /*
+ * In FSA64, APE1_Base[63:0] = { 16{SH_MEM_APE1_BASE[31]},
+ * SH_MEM_APE1_BASE[31:0], 0x0000 }
+ * APE1_Limit[63:0] = { 16{SH_MEM_APE1_LIMIT[31]},
+ * SH_MEM_APE1_LIMIT[31:0], 0xFFFF }
+ * Verify that the base and size parameters can be
+ * represented in this format and convert them.
+ * Additionally restrict APE1 to user-mode addresses.
+ */
+
+ uint64_t base = (uintptr_t)alternate_aperture_base;
+ uint64_t limit = base + alternate_aperture_size - 1;
+
+ if (limit <= base || (base & APE1_FIXED_BITS_MASK) != 0 ||
+ (limit & APE1_FIXED_BITS_MASK) != APE1_LIMIT_ALIGNMENT) {
+ retval = false;
+ goto out;
+ }
+
+ qpd->sh_mem_ape1_base = base >> 16;
+ qpd->sh_mem_ape1_limit = limit >> 16;
+ }
default_mtype = (default_policy == cache_policy_coherent) ?
MTYPE_UC :
@@ -100,40 +138,21 @@ static bool set_cache_memory_policy_vi(struct device_queue_manager *dqm,
default_mtype << SH_MEM_CONFIG__DEFAULT_MTYPE__SHIFT |
ape1_mtype << SH_MEM_CONFIG__APE1_MTYPE__SHIFT;
- return true;
-}
-
-static int update_qpd_vi(struct device_queue_manager *dqm,
- struct qcm_process_device *qpd)
-{
- struct kfd_process_device *pdd;
- unsigned int temp;
-
- pdd = qpd_to_pdd(qpd);
-
- /* check if sh_mem_config register already configured */
- if (qpd->sh_mem_config == 0) {
- qpd->sh_mem_config =
- SH_MEM_ALIGNMENT_MODE_UNALIGNED <<
- SH_MEM_CONFIG__ALIGNMENT_MODE__SHIFT |
- MTYPE_UC <<
- SH_MEM_CONFIG__DEFAULT_MTYPE__SHIFT |
- MTYPE_UC <<
- SH_MEM_CONFIG__APE1_MTYPE__SHIFT;
-
- qpd->sh_mem_ape1_limit = 0;
- qpd->sh_mem_ape1_base = 0;
- }
-
/* On dGPU we're always in GPUVM64 addressing mode with 64-bit
* aperture addresses.
*/
- temp = get_sh_mem_bases_nybble_64(pdd);
+ temp = get_sh_mem_bases_nybble_64(qpd_to_pdd(qpd));
qpd->sh_mem_bases = compute_sh_mem_bases_64bit(temp);
pr_debug("sh_mem_bases nybble: 0x%X and register 0x%X\n",
temp, qpd->sh_mem_bases);
+out:
+ return retval;
+}
+static int update_qpd_vi(struct device_queue_manager *dqm,
+ struct qcm_process_device *qpd)
+{
return 0;
}
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
index a6d08dee74f6..93740b8fc3f4 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
@@ -812,6 +812,14 @@ struct kfd_process *kfd_create_process(struct task_struct *thread)
return ERR_PTR(-EINVAL);
}
+ /* If the process just called exec(3), it is possible that the
+ * cleanup of the kfd_process (following the release of the mm
+ * of the old process image) is still in the cleanup work queue.
+ * Make sure to drain any job before trying to recreate any
+ * resource for this process.
+ */
+ flush_workqueue(kfd_process_wq);
+
/*
* take kfd processes mutex before starting of process creation
* so there won't be a case where two threads of the same process
@@ -830,14 +838,6 @@ struct kfd_process *kfd_create_process(struct task_struct *thread)
if (process) {
pr_debug("Process already found\n");
} else {
- /* If the process just called exec(3), it is possible that the
- * cleanup of the kfd_process (following the release of the mm
- * of the old process image) is still in the cleanup work queue.
- * Make sure to drain any job before trying to recreate any
- * resource for this process.
- */
- flush_workqueue(kfd_process_wq);
-
process = create_process(thread);
if (IS_ERR(process))
goto out;
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index bcf0dc05c767..9189864c236a 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -2896,11 +2896,6 @@ static int dm_resume(void *handle)
return 0;
}
-
- /* leave display off for S4 sequence */
- if (adev->in_s4)
- return 0;
-
/* Recreate dc_state - DC invalidates it when setting power state to S3. */
dc_release_state(dm_state->context);
dm_state->context = dc_create_state(dm->dc);
@@ -7474,7 +7469,7 @@ static int amdgpu_dm_i2c_xfer(struct i2c_adapter *i2c_adap,
int i;
int result = -EIO;
- if (!ddc_service->ddc_pin || !ddc_service->ddc_pin->hw_info.hw_supported)
+ if (!ddc_service->ddc_pin)
return result;
cmd.payloads = kcalloc(num, sizeof(struct i2c_payload), GFP_KERNEL);
diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c
index d4d3f58a613f..327776eeb9f3 100644
--- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c
+++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn315/dcn315_clk_mgr.c
@@ -130,7 +130,7 @@ static void dcn315_update_clocks(struct clk_mgr *clk_mgr_base,
struct clk_mgr_internal *clk_mgr = TO_CLK_MGR_INTERNAL(clk_mgr_base);
struct dc_clocks *new_clocks = &context->bw_ctx.bw.dcn.clk;
struct dc *dc = clk_mgr_base->ctx->dc;
- int display_count;
+ int display_count = 0;
bool update_dppclk = false;
bool update_dispclk = false;
bool dpp_clock_lowered = false;
@@ -194,8 +194,6 @@ static void dcn315_update_clocks(struct clk_mgr *clk_mgr_base,
// workaround: Limit dppclk to 100Mhz to avoid lower eDP panel switch to plus 4K monitor underflow.
if (new_clocks->dppclk_khz < MIN_DPP_DISP_CLK)
new_clocks->dppclk_khz = MIN_DPP_DISP_CLK;
- if (new_clocks->dispclk_khz < MIN_DPP_DISP_CLK)
- new_clocks->dispclk_khz = MIN_DPP_DISP_CLK;
if (should_set_clock(safe_to_lower, new_clocks->dppclk_khz, clk_mgr->base.clks.dppclk_khz)) {
if (clk_mgr->base.clks.dppclk_khz > new_clocks->dppclk_khz)
@@ -204,15 +202,19 @@ static void dcn315_update_clocks(struct clk_mgr *clk_mgr_base,
update_dppclk = true;
}
- if (should_set_clock(safe_to_lower, new_clocks->dispclk_khz, clk_mgr_base->clks.dispclk_khz)) {
- /* No need to apply the w/a if we haven't taken over from bios yet */
- if (clk_mgr_base->clks.dispclk_khz)
- dcn315_disable_otg_wa(clk_mgr_base, context, true);
+ if (should_set_clock(safe_to_lower, new_clocks->dispclk_khz, clk_mgr_base->clks.dispclk_khz) &&
+ (new_clocks->dispclk_khz > 0 || (safe_to_lower && display_count == 0))) {
+ int requested_dispclk_khz = new_clocks->dispclk_khz;
+ dcn315_disable_otg_wa(clk_mgr_base, context, true);
+
+ /* Clamp the requested clock to PMFW based on their limit. */
+ if (dc->debug.min_disp_clk_khz > 0 && requested_dispclk_khz < dc->debug.min_disp_clk_khz)
+ requested_dispclk_khz = dc->debug.min_disp_clk_khz;
+
+ dcn315_smu_set_dispclk(clk_mgr, requested_dispclk_khz);
clk_mgr_base->clks.dispclk_khz = new_clocks->dispclk_khz;
- dcn315_smu_set_dispclk(clk_mgr, clk_mgr_base->clks.dispclk_khz);
- if (clk_mgr_base->clks.dispclk_khz)
- dcn315_disable_otg_wa(clk_mgr_base, context, false);
+ dcn315_disable_otg_wa(clk_mgr_base, context, false);
update_dispclk = true;
}
diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c
index a13ead3d21e3..f95e5e767eb1 100644
--- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c
+++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn316/dcn316_clk_mgr.c
@@ -140,7 +140,7 @@ static void dcn316_update_clocks(struct clk_mgr *clk_mgr_base,
struct clk_mgr_internal *clk_mgr = TO_CLK_MGR_INTERNAL(clk_mgr_base);
struct dc_clocks *new_clocks = &context->bw_ctx.bw.dcn.clk;
struct dc *dc = clk_mgr_base->ctx->dc;
- int display_count;
+ int display_count = 0;
bool update_dppclk = false;
bool update_dispclk = false;
bool dpp_clock_lowered = false;
@@ -201,8 +201,6 @@ static void dcn316_update_clocks(struct clk_mgr *clk_mgr_base,
// workaround: Limit dppclk to 100Mhz to avoid lower eDP panel switch to plus 4K monitor underflow.
if (new_clocks->dppclk_khz < 100000)
new_clocks->dppclk_khz = 100000;
- if (new_clocks->dispclk_khz < 100000)
- new_clocks->dispclk_khz = 100000;
if (should_set_clock(safe_to_lower, new_clocks->dppclk_khz, clk_mgr->base.clks.dppclk_khz)) {
if (clk_mgr->base.clks.dppclk_khz > new_clocks->dppclk_khz)
@@ -211,11 +209,18 @@ static void dcn316_update_clocks(struct clk_mgr *clk_mgr_base,
update_dppclk = true;
}
- if (should_set_clock(safe_to_lower, new_clocks->dispclk_khz, clk_mgr_base->clks.dispclk_khz)) {
+ if (should_set_clock(safe_to_lower, new_clocks->dispclk_khz, clk_mgr_base->clks.dispclk_khz) &&
+ (new_clocks->dispclk_khz > 0 || (safe_to_lower && display_count == 0))) {
+ int requested_dispclk_khz = new_clocks->dispclk_khz;
+
dcn316_disable_otg_wa(clk_mgr_base, context, safe_to_lower, true);
+ /* Clamp the requested clock to PMFW based on their limit. */
+ if (dc->debug.min_disp_clk_khz > 0 && requested_dispclk_khz < dc->debug.min_disp_clk_khz)
+ requested_dispclk_khz = dc->debug.min_disp_clk_khz;
+
+ dcn316_smu_set_dispclk(clk_mgr, requested_dispclk_khz);
clk_mgr_base->clks.dispclk_khz = new_clocks->dispclk_khz;
- dcn316_smu_set_dispclk(clk_mgr, clk_mgr_base->clks.dispclk_khz);
dcn316_disable_otg_wa(clk_mgr_base, context, safe_to_lower, false);
update_dispclk = true;
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c
index c2efe18ceacd..640d010b52be 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -266,6 +266,7 @@ static bool create_links(
link->link_id.type = OBJECT_TYPE_CONNECTOR;
link->link_id.id = CONNECTOR_ID_VIRTUAL;
link->link_id.enum_id = ENUM_ID_1;
+ link->psr_settings.psr_version = DC_PSR_VERSION_UNSUPPORTED;
link->link_enc = kzalloc(sizeof(*link->link_enc), GFP_KERNEL);
if (!link->link_enc) {
diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
index 7b5c1498941d..d389eeb264a7 100644
--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
+++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
@@ -1066,7 +1066,8 @@ void dce110_edp_backlight_control(
DC_LOG_DC("edp_receiver_ready_T9 skipped\n");
}
- if (!enable && link->dpcd_sink_ext_caps.bits.oled) {
+ if (!enable) {
+ /*follow oem panel config's requirement*/
pre_T11_delay += link->panel_config.pps.extra_pre_t11_ms;
msleep(pre_T11_delay);
}
diff --git a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c
index 50dc83404644..4ce45f1bdac0 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn30/dcn30_dpp.c
@@ -392,11 +392,6 @@ bool dpp3_get_optimal_number_of_taps(
int min_taps_y, min_taps_c;
enum lb_memory_config lb_config;
- if (scl_data->viewport.width > scl_data->h_active &&
- dpp->ctx->dc->debug.max_downscale_src_width != 0 &&
- scl_data->viewport.width > dpp->ctx->dc->debug.max_downscale_src_width)
- return false;
-
/*
* Set default taps if none are provided
* From programming guide: taps = min{ ceil(2*H_RATIO,1), 8} for downscaling
@@ -434,6 +429,12 @@ bool dpp3_get_optimal_number_of_taps(
else
scl_data->taps.h_taps_c = in_taps->h_taps_c;
+ // Avoid null data in the scl data with this early return, proceed non-adaptive calcualtion first
+ if (scl_data->viewport.width > scl_data->h_active &&
+ dpp->ctx->dc->debug.max_downscale_src_width != 0 &&
+ scl_data->viewport.width > dpp->ctx->dc->debug.max_downscale_src_width)
+ return false;
+
/*Ensure we can support the requested number of vtaps*/
min_taps_y = dc_fixpt_ceil(scl_data->ratios.vert);
min_taps_c = dc_fixpt_ceil(scl_data->ratios.vert_c);
diff --git a/drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c b/drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c
index 597fa0364a3a..d1601d61f05a 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn315/dcn315_resource.c
@@ -1692,7 +1692,7 @@ static int dcn315_populate_dml_pipes_from_context(
pipes[pipe_cnt].dout.dsc_input_bpc = 0;
DC_FP_START();
dcn31_zero_pipe_dcc_fraction(pipes, pipe_cnt);
- if (pixel_rate_crb && !pipe->top_pipe && !pipe->prev_odm_pipe) {
+ if (pixel_rate_crb) {
int bpp = source_format_to_bpp(pipes[pipe_cnt].pipe.src.source_format);
/* Ceil to crb segment size */
int approx_det_segs_required_for_pstate = dcn_get_approx_det_segs_required_for_pstate(
@@ -1749,28 +1749,26 @@ static int dcn315_populate_dml_pipes_from_context(
continue;
}
- if (!pipe->top_pipe && !pipe->prev_odm_pipe) {
- bool split_required = pipe->stream->timing.pix_clk_100hz >= dcn_get_max_non_odm_pix_rate_100hz(&dc->dml.soc)
- || (pipe->plane_state && pipe->plane_state->src_rect.width > 5120);
-
- if (remaining_det_segs > MIN_RESERVED_DET_SEGS && crb_pipes != 0)
- pipes[pipe_cnt].pipe.src.det_size_override += (remaining_det_segs - MIN_RESERVED_DET_SEGS) / crb_pipes +
- (crb_idx < (remaining_det_segs - MIN_RESERVED_DET_SEGS) % crb_pipes ? 1 : 0);
- if (pipes[pipe_cnt].pipe.src.det_size_override > 2 * DCN3_15_MAX_DET_SEGS) {
- /* Clamp to 2 pipe split max det segments */
- remaining_det_segs += pipes[pipe_cnt].pipe.src.det_size_override - 2 * (DCN3_15_MAX_DET_SEGS);
- pipes[pipe_cnt].pipe.src.det_size_override = 2 * DCN3_15_MAX_DET_SEGS;
- }
- if (pipes[pipe_cnt].pipe.src.det_size_override > DCN3_15_MAX_DET_SEGS || split_required) {
- /* If we are splitting we must have an even number of segments */
- remaining_det_segs += pipes[pipe_cnt].pipe.src.det_size_override % 2;
- pipes[pipe_cnt].pipe.src.det_size_override -= pipes[pipe_cnt].pipe.src.det_size_override % 2;
- }
- /* Convert segments into size for DML use */
- pipes[pipe_cnt].pipe.src.det_size_override *= DCN3_15_CRB_SEGMENT_SIZE_KB;
-
- crb_idx++;
+ bool split_required = pipe->stream->timing.pix_clk_100hz >= dcn_get_max_non_odm_pix_rate_100hz(&dc->dml.soc)
+ || (pipe->plane_state && pipe->plane_state->src_rect.width > 5120);
+
+ if (remaining_det_segs > MIN_RESERVED_DET_SEGS && crb_pipes != 0)
+ pipes[pipe_cnt].pipe.src.det_size_override += (remaining_det_segs - MIN_RESERVED_DET_SEGS) / crb_pipes +
+ (crb_idx < (remaining_det_segs - MIN_RESERVED_DET_SEGS) % crb_pipes ? 1 : 0);
+ if (pipes[pipe_cnt].pipe.src.det_size_override > 2 * DCN3_15_MAX_DET_SEGS) {
+ /* Clamp to 2 pipe split max det segments */
+ remaining_det_segs += pipes[pipe_cnt].pipe.src.det_size_override - 2 * (DCN3_15_MAX_DET_SEGS);
+ pipes[pipe_cnt].pipe.src.det_size_override = 2 * DCN3_15_MAX_DET_SEGS;
+ }
+ if (pipes[pipe_cnt].pipe.src.det_size_override > DCN3_15_MAX_DET_SEGS || split_required) {
+ /* If we are splitting we must have an even number of segments */
+ remaining_det_segs += pipes[pipe_cnt].pipe.src.det_size_override % 2;
+ pipes[pipe_cnt].pipe.src.det_size_override -= pipes[pipe_cnt].pipe.src.det_size_override % 2;
}
+ /* Convert segments into size for DML use */
+ pipes[pipe_cnt].pipe.src.det_size_override *= DCN3_15_CRB_SEGMENT_SIZE_KB;
+
+ crb_idx++;
pipe_cnt++;
}
}
diff --git a/drivers/gpu/drm/amd/display/dc/inc/core_types.h b/drivers/gpu/drm/amd/display/dc/inc/core_types.h
index eaad1260bfd1..4b284ce669ae 100644
--- a/drivers/gpu/drm/amd/display/dc/inc/core_types.h
+++ b/drivers/gpu/drm/amd/display/dc/inc/core_types.h
@@ -532,7 +532,7 @@ struct dc_state {
*/
struct bw_context bw_ctx;
- struct block_sequence block_sequence[50];
+ struct block_sequence block_sequence[100];
unsigned int block_sequence_steps;
struct dc_dmub_cmd dc_dmub_cmd[10];
unsigned int dmub_cmd_count;
diff --git a/drivers/gpu/drm/amd/display/dc/link/link_dpms.c b/drivers/gpu/drm/amd/display/dc/link/link_dpms.c
index 4901e27f678b..9b470812d96a 100644
--- a/drivers/gpu/drm/amd/display/dc/link/link_dpms.c
+++ b/drivers/gpu/drm/amd/display/dc/link/link_dpms.c
@@ -145,6 +145,7 @@ void link_blank_dp_stream(struct dc_link *link, bool hw_init)
void link_set_all_streams_dpms_off_for_link(struct dc_link *link)
{
struct pipe_ctx *pipes[MAX_PIPES];
+ struct dc_stream_state *streams[MAX_PIPES];
struct dc_state *state = link->dc->current_state;
uint8_t count;
int i;
@@ -157,10 +158,18 @@ void link_set_all_streams_dpms_off_for_link(struct dc_link *link)
link_get_master_pipes_with_dpms_on(link, state, &count, pipes);
+ /* The subsequent call to dc_commit_updates_for_stream for a full update
+ * will release the current state and swap to a new state. Releasing the
+ * current state results in the stream pointers in the pipe_ctx structs
+ * to be zero'd. Hence, cache all streams prior to dc_commit_updates_for_stream.
+ */
+ for (i = 0; i < count; i++)
+ streams[i] = pipes[i]->stream;
+
for (i = 0; i < count; i++) {
- stream_update.stream = pipes[i]->stream;
+ stream_update.stream = streams[i];
dc_commit_updates_for_stream(link->ctx->dc, NULL, 0,
- pipes[i]->stream, &stream_update,
+ streams[i], &stream_update,
state);
}
diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c
index 3d589072fe30..adf0ef8b70e4 100644
--- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c
+++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_capability.c
@@ -239,21 +239,21 @@ static uint32_t intersect_frl_link_bw_support(
{
uint32_t supported_bw_in_kbps = max_supported_frl_bw_in_kbps;
- // HDMI_ENCODED_LINK_BW bits are only valid if HDMI Link Configuration bit is 1 (FRL mode)
- if (hdmi_encoded_link_bw.bits.FRL_MODE) {
- if (hdmi_encoded_link_bw.bits.BW_48Gbps)
- supported_bw_in_kbps = 48000000;
- else if (hdmi_encoded_link_bw.bits.BW_40Gbps)
- supported_bw_in_kbps = 40000000;
- else if (hdmi_encoded_link_bw.bits.BW_32Gbps)
- supported_bw_in_kbps = 32000000;
- else if (hdmi_encoded_link_bw.bits.BW_24Gbps)
- supported_bw_in_kbps = 24000000;
- else if (hdmi_encoded_link_bw.bits.BW_18Gbps)
- supported_bw_in_kbps = 18000000;
- else if (hdmi_encoded_link_bw.bits.BW_9Gbps)
- supported_bw_in_kbps = 9000000;
- }
+ /* Skip checking FRL_MODE bit, as certain PCON will clear
+ * it despite supporting the link BW indicated in the other bits.
+ */
+ if (hdmi_encoded_link_bw.bits.BW_48Gbps)
+ supported_bw_in_kbps = 48000000;
+ else if (hdmi_encoded_link_bw.bits.BW_40Gbps)
+ supported_bw_in_kbps = 40000000;
+ else if (hdmi_encoded_link_bw.bits.BW_32Gbps)
+ supported_bw_in_kbps = 32000000;
+ else if (hdmi_encoded_link_bw.bits.BW_24Gbps)
+ supported_bw_in_kbps = 24000000;
+ else if (hdmi_encoded_link_bw.bits.BW_18Gbps)
+ supported_bw_in_kbps = 18000000;
+ else if (hdmi_encoded_link_bw.bits.BW_9Gbps)
+ supported_bw_in_kbps = 9000000;
return supported_bw_in_kbps;
}
@@ -920,6 +920,9 @@ bool link_decide_link_settings(struct dc_stream_state *stream,
* TODO: add MST specific link training routine
*/
decide_mst_link_settings(link, link_setting);
+ } else if (stream->signal == SIGNAL_TYPE_VIRTUAL) {
+ link_setting->lane_count = LANE_COUNT_FOUR;
+ link_setting->link_rate = LINK_RATE_HIGH3;
} else if (link->connector_signal == SIGNAL_TYPE_EDP) {
/* enable edp link optimization for DSC eDP case */
if (stream->timing.flags.DSC) {
diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_phy.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_phy.c
index 9bde0c8bf914..f01a3df58455 100644
--- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_phy.c
+++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_phy.c
@@ -74,7 +74,8 @@ void dp_disable_link_phy(struct dc_link *link,
struct dc *dc = link->ctx->dc;
if (!link->wa_flags.dp_keep_receiver_powered &&
- !link->skip_implict_edp_power_control)
+ !link->skip_implict_edp_power_control &&
+ link->type != dc_connection_none)
dpcd_write_rx_power_ctrl(link, false);
dc->hwss.disable_link_output(link, link_res, signal);
@@ -159,8 +160,9 @@ enum dc_status dp_set_fec_ready(struct dc_link *link, const struct link_resource
} else {
if (link->fec_state == dc_link_fec_ready) {
fec_config = 0;
- core_link_write_dpcd(link, DP_FEC_CONFIGURATION,
- &fec_config, sizeof(fec_config));
+ if (link->type != dc_connection_none)
+ core_link_write_dpcd(link, DP_FEC_CONFIGURATION,
+ &fec_config, sizeof(fec_config));
link_enc->funcs->fec_set_ready(link_enc, false);
link->fec_state = dc_link_fec_not_ready;
diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training_8b_10b.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training_8b_10b.c
index 2b4c15b0b407..52261e7c11c0 100644
--- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training_8b_10b.c
+++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_dp_training_8b_10b.c
@@ -36,7 +36,8 @@
link->ctx->logger
static int32_t get_cr_training_aux_rd_interval(struct dc_link *link,
- const struct dc_link_settings *link_settings)
+ const struct dc_link_settings *link_settings,
+ enum lttpr_mode lttpr_mode)
{
union training_aux_rd_interval training_rd_interval;
uint32_t wait_in_micro_secs = 100;
@@ -49,6 +50,8 @@ static int32_t get_cr_training_aux_rd_interval(struct dc_link *link,
DP_TRAINING_AUX_RD_INTERVAL,
(uint8_t *)&training_rd_interval,
sizeof(training_rd_interval));
+ if (lttpr_mode != LTTPR_MODE_NON_TRANSPARENT)
+ wait_in_micro_secs = 400;
if (training_rd_interval.bits.TRAINIG_AUX_RD_INTERVAL)
wait_in_micro_secs = training_rd_interval.bits.TRAINIG_AUX_RD_INTERVAL * 4000;
}
@@ -110,7 +113,6 @@ void decide_8b_10b_training_settings(
*/
lt_settings->link_settings.link_spread = link->dp_ss_off ?
LINK_SPREAD_DISABLED : LINK_SPREAD_05_DOWNSPREAD_30KHZ;
- lt_settings->cr_pattern_time = get_cr_training_aux_rd_interval(link, link_setting);
lt_settings->eq_pattern_time = get_eq_training_aux_rd_interval(link, link_setting);
lt_settings->pattern_for_cr = decide_cr_training_pattern(link_setting);
lt_settings->pattern_for_eq = decide_eq_training_pattern(link, link_setting);
@@ -119,6 +121,7 @@ void decide_8b_10b_training_settings(
lt_settings->disallow_per_lane_settings = true;
lt_settings->always_match_dpcd_with_hw_lane_settings = true;
lt_settings->lttpr_mode = dp_decide_8b_10b_lttpr_mode(link);
+ lt_settings->cr_pattern_time = get_cr_training_aux_rd_interval(link, link_setting, lt_settings->lttpr_mode);
dp_hw_to_dpcd_lane_settings(lt_settings, lt_settings->hw_lane_settings, lt_settings->dpcd_lane_settings);
}
diff --git a/drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c b/drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
index 13104d000b9e..d4d92da153ec 100644
--- a/drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
+++ b/drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c
@@ -662,6 +662,18 @@ bool edp_setup_psr(struct dc_link *link,
if (!link)
return false;
+ //Clear PSR cfg
+ memset(&psr_configuration, 0, sizeof(psr_configuration));
+ dm_helpers_dp_write_dpcd(
+ link->ctx,
+ link,
+ DP_PSR_EN_CFG,
+ &psr_configuration.raw,
+ sizeof(psr_configuration.raw));
+
+ if (link->psr_settings.psr_version == DC_PSR_VERSION_UNSUPPORTED)
+ return false;
+
dc = link->ctx->dc;
dmcu = dc->res_pool->dmcu;
psr = dc->res_pool->psr;
@@ -672,9 +684,6 @@ bool edp_setup_psr(struct dc_link *link,
if (!dc_get_edp_link_panel_inst(dc, link, &panel_inst))
return false;
-
- memset(&psr_configuration, 0, sizeof(psr_configuration));
-
psr_configuration.bits.ENABLE = 1;
psr_configuration.bits.CRC_VERIFICATION = 1;
psr_configuration.bits.FRAME_CAPTURE_INDICATION =
@@ -938,6 +947,16 @@ bool edp_setup_replay(struct dc_link *link, const struct dc_stream_state *stream
if (!link)
return false;
+ //Clear Replay config
+ dm_helpers_dp_write_dpcd(link->ctx, link,
+ DP_SINK_PR_ENABLE_AND_CONFIGURATION,
+ (uint8_t *)&(replay_config.raw), sizeof(uint8_t));
+
+ if (!(link->replay_settings.config.replay_supported))
+ return false;
+
+ link->replay_settings.config.replay_error_status.raw = 0;
+
dc = link->ctx->dc;
replay = dc->res_pool->replay;
diff --git a/drivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_9_4_1_offset.h b/drivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_9_4_1_offset.h
index c488d4a50cf4..b2252deabc17 100644
--- a/drivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_9_4_1_offset.h
+++ b/drivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_9_4_1_offset.h
@@ -203,6 +203,10 @@
#define mmDAGB0_WR_DATA_CREDIT_BASE_IDX 1
#define mmDAGB0_WR_MISC_CREDIT 0x0058
#define mmDAGB0_WR_MISC_CREDIT_BASE_IDX 1
+#define mmDAGB0_WRCLI_GPU_SNOOP_OVERRIDE 0x005b
+#define mmDAGB0_WRCLI_GPU_SNOOP_OVERRIDE_BASE_IDX 1
+#define mmDAGB0_WRCLI_GPU_SNOOP_OVERRIDE_VALUE 0x005c
+#define mmDAGB0_WRCLI_GPU_SNOOP_OVERRIDE_VALUE_BASE_IDX 1
#define mmDAGB0_WRCLI_ASK_PENDING 0x005d
#define mmDAGB0_WRCLI_ASK_PENDING_BASE_IDX 1
#define mmDAGB0_WRCLI_GO_PENDING 0x005e
@@ -455,6 +459,10 @@
#define mmDAGB1_WR_DATA_CREDIT_BASE_IDX 1
#define mmDAGB1_WR_MISC_CREDIT 0x00d8
#define mmDAGB1_WR_MISC_CREDIT_BASE_IDX 1
+#define mmDAGB1_WRCLI_GPU_SNOOP_OVERRIDE 0x00db
+#define mmDAGB1_WRCLI_GPU_SNOOP_OVERRIDE_BASE_IDX 1
+#define mmDAGB1_WRCLI_GPU_SNOOP_OVERRIDE_VALUE 0x00dc
+#define mmDAGB1_WRCLI_GPU_SNOOP_OVERRIDE_VALUE_BASE_IDX 1
#define mmDAGB1_WRCLI_ASK_PENDING 0x00dd
#define mmDAGB1_WRCLI_ASK_PENDING_BASE_IDX 1
#define mmDAGB1_WRCLI_GO_PENDING 0x00de
@@ -707,6 +715,10 @@
#define mmDAGB2_WR_DATA_CREDIT_BASE_IDX 1
#define mmDAGB2_WR_MISC_CREDIT 0x0158
#define mmDAGB2_WR_MISC_CREDIT_BASE_IDX 1
+#define mmDAGB2_WRCLI_GPU_SNOOP_OVERRIDE 0x015b
+#define mmDAGB2_WRCLI_GPU_SNOOP_OVERRIDE_BASE_IDX 1
+#define mmDAGB2_WRCLI_GPU_SNOOP_OVERRIDE_VALUE 0x015c
+#define mmDAGB2_WRCLI_GPU_SNOOP_OVERRIDE_VALUE_BASE_IDX 1
#define mmDAGB2_WRCLI_ASK_PENDING 0x015d
#define mmDAGB2_WRCLI_ASK_PENDING_BASE_IDX 1
#define mmDAGB2_WRCLI_GO_PENDING 0x015e
@@ -959,6 +971,10 @@
#define mmDAGB3_WR_DATA_CREDIT_BASE_IDX 1
#define mmDAGB3_WR_MISC_CREDIT 0x01d8
#define mmDAGB3_WR_MISC_CREDIT_BASE_IDX 1
+#define mmDAGB3_WRCLI_GPU_SNOOP_OVERRIDE 0x01db
+#define mmDAGB3_WRCLI_GPU_SNOOP_OVERRIDE_BASE_IDX 1
+#define mmDAGB3_WRCLI_GPU_SNOOP_OVERRIDE_VALUE 0x01dc
+#define mmDAGB3_WRCLI_GPU_SNOOP_OVERRIDE_VALUE_BASE_IDX 1
#define mmDAGB3_WRCLI_ASK_PENDING 0x01dd
#define mmDAGB3_WRCLI_ASK_PENDING_BASE_IDX 1
#define mmDAGB3_WRCLI_GO_PENDING 0x01de
@@ -1211,6 +1227,10 @@
#define mmDAGB4_WR_DATA_CREDIT_BASE_IDX 1
#define mmDAGB4_WR_MISC_CREDIT 0x0258
#define mmDAGB4_WR_MISC_CREDIT_BASE_IDX 1
+#define mmDAGB4_WRCLI_GPU_SNOOP_OVERRIDE 0x025b
+#define mmDAGB4_WRCLI_GPU_SNOOP_OVERRIDE_BASE_IDX 1
+#define mmDAGB4_WRCLI_GPU_SNOOP_OVERRIDE_VALUE 0x025c
+#define mmDAGB4_WRCLI_GPU_SNOOP_OVERRIDE_VALUE_BASE_IDX 1
#define mmDAGB4_WRCLI_ASK_PENDING 0x025d
#define mmDAGB4_WRCLI_ASK_PENDING_BASE_IDX 1
#define mmDAGB4_WRCLI_GO_PENDING 0x025e
@@ -4793,6 +4813,10 @@
#define mmDAGB5_WR_DATA_CREDIT_BASE_IDX 1
#define mmDAGB5_WR_MISC_CREDIT 0x3058
#define mmDAGB5_WR_MISC_CREDIT_BASE_IDX 1
+#define mmDAGB5_WRCLI_GPU_SNOOP_OVERRIDE 0x305b
+#define mmDAGB5_WRCLI_GPU_SNOOP_OVERRIDE_BASE_IDX 1
+#define mmDAGB5_WRCLI_GPU_SNOOP_OVERRIDE_VALUE 0x305c
+#define mmDAGB5_WRCLI_GPU_SNOOP_OVERRIDE_VALUE_BASE_IDX 1
#define mmDAGB5_WRCLI_ASK_PENDING 0x305d
#define mmDAGB5_WRCLI_ASK_PENDING_BASE_IDX 1
#define mmDAGB5_WRCLI_GO_PENDING 0x305e
@@ -5045,6 +5069,10 @@
#define mmDAGB6_WR_DATA_CREDIT_BASE_IDX 1
#define mmDAGB6_WR_MISC_CREDIT 0x30d8
#define mmDAGB6_WR_MISC_CREDIT_BASE_IDX 1
+#define mmDAGB6_WRCLI_GPU_SNOOP_OVERRIDE 0x30db
+#define mmDAGB6_WRCLI_GPU_SNOOP_OVERRIDE_BASE_IDX 1
+#define mmDAGB6_WRCLI_GPU_SNOOP_OVERRIDE_VALUE 0x30dc
+#define mmDAGB6_WRCLI_GPU_SNOOP_OVERRIDE_VALUE_BASE_IDX 1
#define mmDAGB6_WRCLI_ASK_PENDING 0x30dd
#define mmDAGB6_WRCLI_ASK_PENDING_BASE_IDX 1
#define mmDAGB6_WRCLI_GO_PENDING 0x30de
@@ -5297,6 +5325,10 @@
#define mmDAGB7_WR_DATA_CREDIT_BASE_IDX 1
#define mmDAGB7_WR_MISC_CREDIT 0x3158
#define mmDAGB7_WR_MISC_CREDIT_BASE_IDX 1
+#define mmDAGB7_WRCLI_GPU_SNOOP_OVERRIDE 0x315b
+#define mmDAGB7_WRCLI_GPU_SNOOP_OVERRIDE_BASE_IDX 1
+#define mmDAGB7_WRCLI_GPU_SNOOP_OVERRIDE_VALUE 0x315c
+#define mmDAGB7_WRCLI_GPU_SNOOP_OVERRIDE_VALUE_BASE_IDX 1
#define mmDAGB7_WRCLI_ASK_PENDING 0x315d
#define mmDAGB7_WRCLI_ASK_PENDING_BASE_IDX 1
#define mmDAGB7_WRCLI_GO_PENDING 0x315e
diff --git a/drivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_9_4_1_sh_mask.h b/drivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_9_4_1_sh_mask.h
index 2969fbf282b7..5069d2fd467f 100644
--- a/drivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_9_4_1_sh_mask.h
+++ b/drivers/gpu/drm/amd/include/asic_reg/mmhub/mmhub_9_4_1_sh_mask.h
@@ -1532,6 +1532,12 @@
//DAGB0_WRCLI_DBUS_GO_PENDING
#define DAGB0_WRCLI_DBUS_GO_PENDING__BUSY__SHIFT 0x0
#define DAGB0_WRCLI_DBUS_GO_PENDING__BUSY_MASK 0xFFFFFFFFL
+//DAGB0_WRCLI_GPU_SNOOP_OVERRIDE
+#define DAGB0_WRCLI_GPU_SNOOP_OVERRIDE__ENABLE__SHIFT 0x0
+#define DAGB0_WRCLI_GPU_SNOOP_OVERRIDE__ENABLE_MASK 0xFFFFFFFFL
+//DAGB0_WRCLI_GPU_SNOOP_OVERRIDE_VALUE
+#define DAGB0_WRCLI_GPU_SNOOP_OVERRIDE_VALUE__ENABLE__SHIFT 0x0
+#define DAGB0_WRCLI_GPU_SNOOP_OVERRIDE_VALUE__ENABLE_MASK 0xFFFFFFFFL
//DAGB0_DAGB_DLY
#define DAGB0_DAGB_DLY__DLY__SHIFT 0x0
#define DAGB0_DAGB_DLY__CLI__SHIFT 0x8
@@ -3207,6 +3213,12 @@
//DAGB1_WRCLI_DBUS_GO_PENDING
#define DAGB1_WRCLI_DBUS_GO_PENDING__BUSY__SHIFT 0x0
#define DAGB1_WRCLI_DBUS_GO_PENDING__BUSY_MASK 0xFFFFFFFFL
+//DAGB1_WRCLI_GPU_SNOOP_OVERRIDE
+#define DAGB1_WRCLI_GPU_SNOOP_OVERRIDE__ENABLE__SHIFT 0x0
+#define DAGB1_WRCLI_GPU_SNOOP_OVERRIDE__ENABLE_MASK 0xFFFFFFFFL
+//DAGB1_WRCLI_GPU_SNOOP_OVERRIDE_VALUE
+#define DAGB1_WRCLI_GPU_SNOOP_OVERRIDE_VALUE__ENABLE__SHIFT 0x0
+#define DAGB1_WRCLI_GPU_SNOOP_OVERRIDE_VALUE__ENABLE_MASK 0xFFFFFFFFL
//DAGB1_DAGB_DLY
#define DAGB1_DAGB_DLY__DLY__SHIFT 0x0
#define DAGB1_DAGB_DLY__CLI__SHIFT 0x8
@@ -4882,6 +4894,12 @@
//DAGB2_WRCLI_DBUS_GO_PENDING
#define DAGB2_WRCLI_DBUS_GO_PENDING__BUSY__SHIFT 0x0
#define DAGB2_WRCLI_DBUS_GO_PENDING__BUSY_MASK 0xFFFFFFFFL
+//DAGB2_WRCLI_GPU_SNOOP_OVERRIDE
+#define DAGB2_WRCLI_GPU_SNOOP_OVERRIDE__ENABLE__SHIFT 0x0
+#define DAGB2_WRCLI_GPU_SNOOP_OVERRIDE__ENABLE_MASK 0xFFFFFFFFL
+//DAGB2_WRCLI_GPU_SNOOP_OVERRIDE_VALUE
+#define DAGB2_WRCLI_GPU_SNOOP_OVERRIDE_VALUE__ENABLE__SHIFT 0x0
+#define DAGB2_WRCLI_GPU_SNOOP_OVERRIDE_VALUE__ENABLE_MASK 0xFFFFFFFFL
//DAGB2_DAGB_DLY
#define DAGB2_DAGB_DLY__DLY__SHIFT 0x0
#define DAGB2_DAGB_DLY__CLI__SHIFT 0x8
@@ -6557,6 +6575,12 @@
//DAGB3_WRCLI_DBUS_GO_PENDING
#define DAGB3_WRCLI_DBUS_GO_PENDING__BUSY__SHIFT 0x0
#define DAGB3_WRCLI_DBUS_GO_PENDING__BUSY_MASK 0xFFFFFFFFL
+//DAGB3_WRCLI_GPU_SNOOP_OVERRIDE
+#define DAGB3_WRCLI_GPU_SNOOP_OVERRIDE__ENABLE__SHIFT 0x0
+#define DAGB3_WRCLI_GPU_SNOOP_OVERRIDE__ENABLE_MASK 0xFFFFFFFFL
+//DAGB3_WRCLI_GPU_SNOOP_OVERRIDE_VALUE
+#define DAGB3_WRCLI_GPU_SNOOP_OVERRIDE_VALUE__ENABLE__SHIFT 0x0
+#define DAGB3_WRCLI_GPU_SNOOP_OVERRIDE_VALUE__ENABLE_MASK 0xFFFFFFFFL
//DAGB3_DAGB_DLY
#define DAGB3_DAGB_DLY__DLY__SHIFT 0x0
#define DAGB3_DAGB_DLY__CLI__SHIFT 0x8
@@ -8232,6 +8256,12 @@
//DAGB4_WRCLI_DBUS_GO_PENDING
#define DAGB4_WRCLI_DBUS_GO_PENDING__BUSY__SHIFT 0x0
#define DAGB4_WRCLI_DBUS_GO_PENDING__BUSY_MASK 0xFFFFFFFFL
+//DAGB4_WRCLI_GPU_SNOOP_OVERRIDE
+#define DAGB4_WRCLI_GPU_SNOOP_OVERRIDE__ENABLE__SHIFT 0x0
+#define DAGB4_WRCLI_GPU_SNOOP_OVERRIDE__ENABLE_MASK 0xFFFFFFFFL
+//DAGB4_WRCLI_GPU_SNOOP_OVERRIDE_VALUE
+#define DAGB4_WRCLI_GPU_SNOOP_OVERRIDE_VALUE__ENABLE__SHIFT 0x0
+#define DAGB4_WRCLI_GPU_SNOOP_OVERRIDE_VALUE__ENABLE_MASK 0xFFFFFFFFL
//DAGB4_DAGB_DLY
#define DAGB4_DAGB_DLY__DLY__SHIFT 0x0
#define DAGB4_DAGB_DLY__CLI__SHIFT 0x8
@@ -28737,6 +28767,12 @@
//DAGB5_WRCLI_DBUS_GO_PENDING
#define DAGB5_WRCLI_DBUS_GO_PENDING__BUSY__SHIFT 0x0
#define DAGB5_WRCLI_DBUS_GO_PENDING__BUSY_MASK 0xFFFFFFFFL
+//DAGB5_WRCLI_GPU_SNOOP_OVERRIDE
+#define DAGB5_WRCLI_GPU_SNOOP_OVERRIDE__ENABLE__SHIFT 0x0
+#define DAGB5_WRCLI_GPU_SNOOP_OVERRIDE__ENABLE_MASK 0xFFFFFFFFL
+//DAGB5_WRCLI_GPU_SNOOP_OVERRIDE_VALUE
+#define DAGB5_WRCLI_GPU_SNOOP_OVERRIDE_VALUE__ENABLE__SHIFT 0x0
+#define DAGB5_WRCLI_GPU_SNOOP_OVERRIDE_VALUE__ENABLE_MASK 0xFFFFFFFFL
//DAGB5_DAGB_DLY
#define DAGB5_DAGB_DLY__DLY__SHIFT 0x0
#define DAGB5_DAGB_DLY__CLI__SHIFT 0x8
@@ -30412,6 +30448,12 @@
//DAGB6_WRCLI_DBUS_GO_PENDING
#define DAGB6_WRCLI_DBUS_GO_PENDING__BUSY__SHIFT 0x0
#define DAGB6_WRCLI_DBUS_GO_PENDING__BUSY_MASK 0xFFFFFFFFL
+//DAGB6_WRCLI_GPU_SNOOP_OVERRIDE
+#define DAGB6_WRCLI_GPU_SNOOP_OVERRIDE__ENABLE__SHIFT 0x0
+#define DAGB6_WRCLI_GPU_SNOOP_OVERRIDE__ENABLE_MASK 0xFFFFFFFFL
+//DAGB6_WRCLI_GPU_SNOOP_OVERRIDE_VALUE
+#define DAGB6_WRCLI_GPU_SNOOP_OVERRIDE_VALUE__ENABLE__SHIFT 0x0
+#define DAGB6_WRCLI_GPU_SNOOP_OVERRIDE_VALUE__ENABLE_MASK 0xFFFFFFFFL
//DAGB6_DAGB_DLY
#define DAGB6_DAGB_DLY__DLY__SHIFT 0x0
#define DAGB6_DAGB_DLY__CLI__SHIFT 0x8
@@ -32087,6 +32129,12 @@
//DAGB7_WRCLI_DBUS_GO_PENDING
#define DAGB7_WRCLI_DBUS_GO_PENDING__BUSY__SHIFT 0x0
#define DAGB7_WRCLI_DBUS_GO_PENDING__BUSY_MASK 0xFFFFFFFFL
+//DAGB7_WRCLI_GPU_SNOOP_OVERRIDE
+#define DAGB7_WRCLI_GPU_SNOOP_OVERRIDE__ENABLE__SHIFT 0x0
+#define DAGB7_WRCLI_GPU_SNOOP_OVERRIDE__ENABLE_MASK 0xFFFFFFFFL
+//DAGB7_WRCLI_GPU_SNOOP_OVERRIDE_VALUE
+#define DAGB7_WRCLI_GPU_SNOOP_OVERRIDE_VALUE__ENABLE__SHIFT 0x0
+#define DAGB7_WRCLI_GPU_SNOOP_OVERRIDE_VALUE__ENABLE_MASK 0xFFFFFFFFL
//DAGB7_DAGB_DLY
#define DAGB7_DAGB_DLY__DLY__SHIFT 0x0
#define DAGB7_DAGB_DLY__CLI__SHIFT 0x8
diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c
index 3de0f457fff6..5f58da6ebaad 100644
--- a/drivers/gpu/drm/ast/ast_mode.c
+++ b/drivers/gpu/drm/ast/ast_mode.c
@@ -132,7 +132,7 @@ static bool ast_get_vbios_mode_info(const struct drm_format_info *format,
return false;
}
- switch (mode->crtc_hdisplay) {
+ switch (mode->hdisplay) {
case 640:
vbios_mode->enh_table = &res_640x480[refresh_rate_index];
break;
@@ -146,7 +146,7 @@ static bool ast_get_vbios_mode_info(const struct drm_format_info *format,
vbios_mode->enh_table = &res_1152x864[refresh_rate_index];
break;
case 1280:
- if (mode->crtc_vdisplay == 800)
+ if (mode->vdisplay == 800)
vbios_mode->enh_table = &res_1280x800[refresh_rate_index];
else
vbios_mode->enh_table = &res_1280x1024[refresh_rate_index];
@@ -158,7 +158,7 @@ static bool ast_get_vbios_mode_info(const struct drm_format_info *format,
vbios_mode->enh_table = &res_1440x900[refresh_rate_index];
break;
case 1600:
- if (mode->crtc_vdisplay == 900)
+ if (mode->vdisplay == 900)
vbios_mode->enh_table = &res_1600x900[refresh_rate_index];
else
vbios_mode->enh_table = &res_1600x1200[refresh_rate_index];
@@ -167,7 +167,7 @@ static bool ast_get_vbios_mode_info(const struct drm_format_info *format,
vbios_mode->enh_table = &res_1680x1050[refresh_rate_index];
break;
case 1920:
- if (mode->crtc_vdisplay == 1080)
+ if (mode->vdisplay == 1080)
vbios_mode->enh_table = &res_1920x1080[refresh_rate_index];
else
vbios_mode->enh_table = &res_1920x1200[refresh_rate_index];
@@ -211,6 +211,7 @@ static bool ast_get_vbios_mode_info(const struct drm_format_info *format,
hborder = (vbios_mode->enh_table->flags & HBorder) ? 8 : 0;
vborder = (vbios_mode->enh_table->flags & VBorder) ? 8 : 0;
+ adjusted_mode->crtc_hdisplay = vbios_mode->enh_table->hde;
adjusted_mode->crtc_htotal = vbios_mode->enh_table->ht;
adjusted_mode->crtc_hblank_start = vbios_mode->enh_table->hde + hborder;
adjusted_mode->crtc_hblank_end = vbios_mode->enh_table->ht - hborder;
@@ -220,6 +221,7 @@ static bool ast_get_vbios_mode_info(const struct drm_format_info *format,
vbios_mode->enh_table->hfp +
vbios_mode->enh_table->hsync);
+ adjusted_mode->crtc_vdisplay = vbios_mode->enh_table->vde;
adjusted_mode->crtc_vtotal = vbios_mode->enh_table->vt;
adjusted_mode->crtc_vblank_start = vbios_mode->enh_table->vde + vborder;
adjusted_mode->crtc_vblank_end = vbios_mode->enh_table->vt - vborder;
diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_audio.c b/drivers/gpu/drm/bridge/adv7511/adv7511_audio.c
index 8f786592143b..24e1e11acf69 100644
--- a/drivers/gpu/drm/bridge/adv7511/adv7511_audio.c
+++ b/drivers/gpu/drm/bridge/adv7511/adv7511_audio.c
@@ -244,7 +244,9 @@ static const struct hdmi_codec_pdata codec_data = {
.ops = &adv7511_codec_ops,
.max_i2s_channels = 2,
.i2s = 1,
+ .no_i2s_capture = 1,
.spdif = 1,
+ .no_spdif_capture = 1,
};
int adv7511_audio_init(struct device *dev, struct adv7511 *adv7511)
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index f3681970887c..1aa59586c8f8 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -573,6 +573,30 @@ mode_valid(struct drm_atomic_state *state)
return 0;
}
+static int drm_atomic_check_valid_clones(struct drm_atomic_state *state,
+ struct drm_crtc *crtc)
+{
+ struct drm_encoder *drm_enc;
+ struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state,
+ crtc);
+
+ drm_for_each_encoder_mask(drm_enc, crtc->dev, crtc_state->encoder_mask) {
+ if (!drm_enc->possible_clones) {
+ DRM_DEBUG("enc%d possible_clones is 0\n", drm_enc->base.id);
+ continue;
+ }
+
+ if ((crtc_state->encoder_mask & drm_enc->possible_clones) !=
+ crtc_state->encoder_mask) {
+ DRM_DEBUG("crtc%d failed valid clone check for mask 0x%x\n",
+ crtc->base.id, crtc_state->encoder_mask);
+ return -EINVAL;
+ }
+ }
+
+ return 0;
+}
+
/**
* drm_atomic_helper_check_modeset - validate state object for modeset changes
* @dev: DRM device
@@ -744,6 +768,10 @@ drm_atomic_helper_check_modeset(struct drm_device *dev,
ret = drm_atomic_add_affected_planes(state, crtc);
if (ret != 0)
return ret;
+
+ ret = drm_atomic_check_valid_clones(state, crtc);
+ if (ret != 0)
+ return ret;
}
/*
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index ad872c61aac0..c6e6e4766c8b 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -6471,6 +6471,7 @@ static void drm_reset_display_info(struct drm_connector *connector)
info->has_hdmi_infoframe = false;
info->rgb_quant_range_selectable = false;
memset(&info->hdmi, 0, sizeof(info->hdmi));
+ memset(&connector->hdr_sink_metadata, 0, sizeof(connector->hdr_sink_metadata));
info->edid_hdmi_rgb444_dc_modes = 0;
info->edid_hdmi_ycbcr444_dc_modes = 0;
diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
index 44a948b80ee1..deb93f78ce34 100644
--- a/drivers/gpu/drm/drm_gem.c
+++ b/drivers/gpu/drm/drm_gem.c
@@ -322,7 +322,7 @@ int drm_gem_dumb_map_offset(struct drm_file *file, struct drm_device *dev,
return -ENOENT;
/* Don't allow imported objects to be mapped */
- if (obj->import_attach) {
+ if (drm_gem_is_imported(obj)) {
ret = -EINVAL;
goto out;
}
@@ -1155,7 +1155,7 @@ void drm_gem_print_info(struct drm_printer *p, unsigned int indent,
drm_vma_node_start(&obj->vma_node));
drm_printf_indent(p, indent, "size=%zu\n", obj->size);
drm_printf_indent(p, indent, "imported=%s\n",
- str_yes_no(obj->import_attach));
+ str_yes_no(drm_gem_is_imported(obj)));
if (obj->funcs->print_info)
obj->funcs->print_info(p, indent, obj);
diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c
index 54fc3f819577..6391afdf202e 100644
--- a/drivers/gpu/drm/mediatek/mtk_dpi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dpi.c
@@ -410,12 +410,13 @@ static void mtk_dpi_config_swap_input(struct mtk_dpi *dpi, bool enable)
static void mtk_dpi_config_2n_h_fre(struct mtk_dpi *dpi)
{
- mtk_dpi_mask(dpi, dpi->conf->reg_h_fre_con, H_FRE_2N, H_FRE_2N);
+ if (dpi->conf->reg_h_fre_con)
+ mtk_dpi_mask(dpi, dpi->conf->reg_h_fre_con, H_FRE_2N, H_FRE_2N);
}
static void mtk_dpi_config_disable_edge(struct mtk_dpi *dpi)
{
- if (dpi->conf->edge_sel_en)
+ if (dpi->conf->edge_sel_en && dpi->conf->reg_h_fre_con)
mtk_dpi_mask(dpi, dpi->conf->reg_h_fre_con, 0, EDGE_SEL_EN);
}
diff --git a/drivers/gpu/drm/panel/panel-edp.c b/drivers/gpu/drm/panel/panel-edp.c
index 94fe2f3836a9..53b3b24d7d7c 100644
--- a/drivers/gpu/drm/panel/panel-edp.c
+++ b/drivers/gpu/drm/panel/panel-edp.c
@@ -1923,6 +1923,7 @@ static const struct edp_panel_entry edp_panels[] = {
EDP_PANEL_ENTRY('S', 'H', 'P', 0x1523, &sharp_lq140m1jw46.delay, "LQ140M1JW46"),
EDP_PANEL_ENTRY('S', 'H', 'P', 0x154c, &delay_200_500_p2e100, "LQ116M1JW10"),
+ EDP_PANEL_ENTRY('S', 'T', 'A', 0x0004, &delay_200_500_e200, "116KHD024006"),
EDP_PANEL_ENTRY('S', 'T', 'A', 0x0100, &delay_100_500_e200, "2081116HHD028001-51D"),
{ /* sentinal */ }
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
index d8f8c37c326c..0193d10867dd 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
@@ -1290,10 +1290,8 @@ static void vop2_plane_atomic_update(struct drm_plane *plane,
rb_swap = vop2_win_rb_swap(fb->format->format);
vop2_win_write(win, VOP2_WIN_RB_SWAP, rb_swap);
- if (!vop2_cluster_window(win)) {
- uv_swap = vop2_win_uv_swap(fb->format->format);
- vop2_win_write(win, VOP2_WIN_UV_SWAP, uv_swap);
- }
+ uv_swap = vop2_win_uv_swap(fb->format->format);
+ vop2_win_write(win, VOP2_WIN_UV_SWAP, uv_swap);
if (fb->format->is_yuv) {
vop2_win_write(win, VOP2_WIN_UV_VIR, DIV_ROUND_UP(fb->pitches[1], 4));
diff --git a/drivers/gpu/drm/v3d/v3d_drv.c b/drivers/gpu/drm/v3d/v3d_drv.c
index ffbbe9d527d3..0e8ea9901188 100644
--- a/drivers/gpu/drm/v3d/v3d_drv.c
+++ b/drivers/gpu/drm/v3d/v3d_drv.c
@@ -226,11 +226,21 @@ static int v3d_platform_drm_probe(struct platform_device *pdev)
if (ret)
return ret;
+ v3d->clk = devm_clk_get_optional(dev, NULL);
+ if (IS_ERR(v3d->clk))
+ return dev_err_probe(dev, PTR_ERR(v3d->clk), "Failed to get V3D clock\n");
+
+ ret = clk_prepare_enable(v3d->clk);
+ if (ret) {
+ dev_err(&pdev->dev, "Couldn't enable the V3D clock\n");
+ return ret;
+ }
+
mmu_debug = V3D_READ(V3D_MMU_DEBUG_INFO);
mask = DMA_BIT_MASK(30 + V3D_GET_FIELD(mmu_debug, V3D_MMU_PA_WIDTH));
ret = dma_set_mask_and_coherent(dev, mask);
if (ret)
- return ret;
+ goto clk_disable;
v3d->va_width = 30 + V3D_GET_FIELD(mmu_debug, V3D_MMU_VA_WIDTH);
@@ -245,28 +255,29 @@ static int v3d_platform_drm_probe(struct platform_device *pdev)
ret = PTR_ERR(v3d->reset);
if (ret == -EPROBE_DEFER)
- return ret;
+ goto clk_disable;
v3d->reset = NULL;
ret = map_regs(v3d, &v3d->bridge_regs, "bridge");
if (ret) {
dev_err(dev,
"Failed to get reset control or bridge regs\n");
- return ret;
+ goto clk_disable;
}
}
if (v3d->ver < 41) {
ret = map_regs(v3d, &v3d->gca_regs, "gca");
if (ret)
- return ret;
+ goto clk_disable;
}
v3d->mmu_scratch = dma_alloc_wc(dev, 4096, &v3d->mmu_scratch_paddr,
GFP_KERNEL | __GFP_NOWARN | __GFP_ZERO);
if (!v3d->mmu_scratch) {
dev_err(dev, "Failed to allocate MMU scratch page\n");
- return -ENOMEM;
+ ret = -ENOMEM;
+ goto clk_disable;
}
ret = v3d_gem_init(drm);
@@ -289,6 +300,8 @@ static int v3d_platform_drm_probe(struct platform_device *pdev)
v3d_gem_destroy(drm);
dma_free:
dma_free_wc(dev, 4096, v3d->mmu_scratch, v3d->mmu_scratch_paddr);
+clk_disable:
+ clk_disable_unprepare(v3d->clk);
return ret;
}
@@ -303,6 +316,8 @@ static void v3d_platform_drm_remove(struct platform_device *pdev)
dma_free_wc(v3d->drm.dev, 4096, v3d->mmu_scratch,
v3d->mmu_scratch_paddr);
+
+ clk_disable_unprepare(v3d->clk);
}
static struct platform_driver v3d_platform_driver = {
diff --git a/drivers/hid/hid-ids.h b/drivers/hid/hid-ids.h
index 8e721ec3faaf..a8665d57094b 100644
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -41,6 +41,10 @@
#define USB_VENDOR_ID_ACTIONSTAR 0x2101
#define USB_DEVICE_ID_ACTIONSTAR_1011 0x1011
+#define USB_VENDOR_ID_ADATA_XPG 0x125f
+#define USB_VENDOR_ID_ADATA_XPG_WL_GAMING_MOUSE 0x7505
+#define USB_VENDOR_ID_ADATA_XPG_WL_GAMING_MOUSE_DONGLE 0x7506
+
#define USB_VENDOR_ID_ADS_TECH 0x06e1
#define USB_DEVICE_ID_ADS_TECH_RADIO_SI470X 0xa155
diff --git a/drivers/hid/hid-quirks.c b/drivers/hid/hid-quirks.c
index 5d7a418ccdbe..73979643315b 100644
--- a/drivers/hid/hid-quirks.c
+++ b/drivers/hid/hid-quirks.c
@@ -27,6 +27,8 @@
static const struct hid_device_id hid_quirks[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_AASHIMA, USB_DEVICE_ID_AASHIMA_GAMEPAD), HID_QUIRK_BADPAD },
{ HID_USB_DEVICE(USB_VENDOR_ID_AASHIMA, USB_DEVICE_ID_AASHIMA_PREDATOR), HID_QUIRK_BADPAD },
+ { HID_USB_DEVICE(USB_VENDOR_ID_ADATA_XPG, USB_VENDOR_ID_ADATA_XPG_WL_GAMING_MOUSE), HID_QUIRK_ALWAYS_POLL },
+ { HID_USB_DEVICE(USB_VENDOR_ID_ADATA_XPG, USB_VENDOR_ID_ADATA_XPG_WL_GAMING_MOUSE_DONGLE), HID_QUIRK_ALWAYS_POLL },
{ HID_USB_DEVICE(USB_VENDOR_ID_AFATECH, USB_DEVICE_ID_AFATECH_AF9016), HID_QUIRK_FULLSPEED_INTERVAL },
{ HID_USB_DEVICE(USB_VENDOR_ID_AIREN, USB_DEVICE_ID_AIREN_SLIMPLUS), HID_QUIRK_NOGET },
{ HID_USB_DEVICE(USB_VENDOR_ID_AKAI_09E8, USB_DEVICE_ID_AKAI_09E8_MIDIMIX), HID_QUIRK_NO_INIT_REPORTS },
diff --git a/drivers/hid/usbhid/usbkbd.c b/drivers/hid/usbhid/usbkbd.c
index c439ed2f16db..af6bc76dbf64 100644
--- a/drivers/hid/usbhid/usbkbd.c
+++ b/drivers/hid/usbhid/usbkbd.c
@@ -160,7 +160,7 @@ static int usb_kbd_event(struct input_dev *dev, unsigned int type,
return -1;
spin_lock_irqsave(&kbd->leds_lock, flags);
- kbd->newleds = (!!test_bit(LED_KANA, dev->led) << 3) | (!!test_bit(LED_COMPOSE, dev->led) << 3) |
+ kbd->newleds = (!!test_bit(LED_KANA, dev->led) << 4) | (!!test_bit(LED_COMPOSE, dev->led) << 3) |
(!!test_bit(LED_SCROLLL, dev->led) << 2) | (!!test_bit(LED_CAPSL, dev->led) << 1) |
(!!test_bit(LED_NUML, dev->led));
diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c
index 44aaf9b9191d..8d94ecc3cc46 100644
--- a/drivers/hwmon/dell-smm-hwmon.c
+++ b/drivers/hwmon/dell-smm-hwmon.c
@@ -67,7 +67,7 @@
#define I8K_POWER_BATTERY 0x01
#define DELL_SMM_NO_TEMP 10
-#define DELL_SMM_NO_FANS 3
+#define DELL_SMM_NO_FANS 4
struct dell_smm_data {
struct mutex i8k_mutex; /* lock for sensors writes */
@@ -940,11 +940,14 @@ static const struct hwmon_channel_info * const dell_smm_info[] = {
HWMON_F_INPUT | HWMON_F_LABEL | HWMON_F_MIN | HWMON_F_MAX |
HWMON_F_TARGET,
HWMON_F_INPUT | HWMON_F_LABEL | HWMON_F_MIN | HWMON_F_MAX |
+ HWMON_F_TARGET,
+ HWMON_F_INPUT | HWMON_F_LABEL | HWMON_F_MIN | HWMON_F_MAX |
HWMON_F_TARGET
),
HWMON_CHANNEL_INFO(pwm,
HWMON_PWM_INPUT | HWMON_PWM_ENABLE,
HWMON_PWM_INPUT,
+ HWMON_PWM_INPUT,
HWMON_PWM_INPUT
),
NULL
diff --git a/drivers/hwmon/gpio-fan.c b/drivers/hwmon/gpio-fan.c
index d92c536be9af..b779240328d5 100644
--- a/drivers/hwmon/gpio-fan.c
+++ b/drivers/hwmon/gpio-fan.c
@@ -393,7 +393,12 @@ static int gpio_fan_set_cur_state(struct thermal_cooling_device *cdev,
if (state >= fan_data->num_speed)
return -EINVAL;
+ mutex_lock(&fan_data->lock);
+
set_fan_speed(fan_data, state);
+
+ mutex_unlock(&fan_data->lock);
+
return 0;
}
@@ -489,7 +494,11 @@ MODULE_DEVICE_TABLE(of, of_gpio_fan_match);
static void gpio_fan_stop(void *data)
{
+ struct gpio_fan_data *fan_data = data;
+
+ mutex_lock(&fan_data->lock);
set_fan_speed(data, 0);
+ mutex_unlock(&fan_data->lock);
}
static int gpio_fan_probe(struct platform_device *pdev)
@@ -562,7 +571,9 @@ static int gpio_fan_suspend(struct device *dev)
if (fan_data->gpios) {
fan_data->resume_speed = fan_data->speed_index;
+ mutex_lock(&fan_data->lock);
set_fan_speed(fan_data, 0);
+ mutex_unlock(&fan_data->lock);
}
return 0;
@@ -572,8 +583,11 @@ static int gpio_fan_resume(struct device *dev)
{
struct gpio_fan_data *fan_data = dev_get_drvdata(dev);
- if (fan_data->gpios)
+ if (fan_data->gpios) {
+ mutex_lock(&fan_data->lock);
set_fan_speed(fan_data, fan_data->resume_speed);
+ mutex_unlock(&fan_data->lock);
+ }
return 0;
}
diff --git a/drivers/hwmon/xgene-hwmon.c b/drivers/hwmon/xgene-hwmon.c
index 207084d55044..6768dbf39039 100644
--- a/drivers/hwmon/xgene-hwmon.c
+++ b/drivers/hwmon/xgene-hwmon.c
@@ -111,7 +111,7 @@ struct xgene_hwmon_dev {
phys_addr_t comm_base_addr;
void *pcc_comm_addr;
- u64 usecs_lat;
+ unsigned int usecs_lat;
};
/*
diff --git a/drivers/hwtracing/intel_th/Kconfig b/drivers/hwtracing/intel_th/Kconfig
index 4b6359326ede..4f7d2b6d79e2 100644
--- a/drivers/hwtracing/intel_th/Kconfig
+++ b/drivers/hwtracing/intel_th/Kconfig
@@ -60,6 +60,7 @@ config INTEL_TH_STH
config INTEL_TH_MSU
tristate "Intel(R) Trace Hub Memory Storage Unit"
+ depends on MMU
help
Memory Storage Unit (MSU) trace output device enables
storing STP traces to system memory. It supports single
diff --git a/drivers/hwtracing/intel_th/msu.c b/drivers/hwtracing/intel_th/msu.c
index 9621efe0e95c..54629458fb71 100644
--- a/drivers/hwtracing/intel_th/msu.c
+++ b/drivers/hwtracing/intel_th/msu.c
@@ -19,6 +19,7 @@
#include <linux/io.h>
#include <linux/workqueue.h>
#include <linux/dma-mapping.h>
+#include <linux/pfn_t.h>
#ifdef CONFIG_X86
#include <asm/set_memory.h>
@@ -965,7 +966,6 @@ static void msc_buffer_contig_free(struct msc *msc)
for (off = 0; off < msc->nr_pages << PAGE_SHIFT; off += PAGE_SIZE) {
struct page *page = virt_to_page(msc->base + off);
- page->mapping = NULL;
__free_page(page);
}
@@ -1147,9 +1147,6 @@ static void __msc_buffer_win_free(struct msc *msc, struct msc_window *win)
int i;
for_each_sg(win->sgt->sgl, sg, win->nr_segs, i) {
- struct page *page = msc_sg_page(sg);
-
- page->mapping = NULL;
dma_free_coherent(msc_dev(win->msc)->parent->parent, PAGE_SIZE,
sg_virt(sg), sg_dma_address(sg));
}
@@ -1584,22 +1581,10 @@ static void msc_mmap_close(struct vm_area_struct *vma)
{
struct msc_iter *iter = vma->vm_file->private_data;
struct msc *msc = iter->msc;
- unsigned long pg;
if (!atomic_dec_and_mutex_lock(&msc->mmap_count, &msc->buf_mutex))
return;
- /* drop page _refcounts */
- for (pg = 0; pg < msc->nr_pages; pg++) {
- struct page *page = msc_buffer_get_page(msc, pg);
-
- if (WARN_ON_ONCE(!page))
- continue;
-
- if (page->mapping)
- page->mapping = NULL;
- }
-
/* last mapping -- drop user_count */
atomic_dec(&msc->user_count);
mutex_unlock(&msc->buf_mutex);
@@ -1609,16 +1594,14 @@ static vm_fault_t msc_mmap_fault(struct vm_fault *vmf)
{
struct msc_iter *iter = vmf->vma->vm_file->private_data;
struct msc *msc = iter->msc;
+ struct page *page;
- vmf->page = msc_buffer_get_page(msc, vmf->pgoff);
- if (!vmf->page)
+ page = msc_buffer_get_page(msc, vmf->pgoff);
+ if (!page)
return VM_FAULT_SIGBUS;
- get_page(vmf->page);
- vmf->page->mapping = vmf->vma->vm_file->f_mapping;
- vmf->page->index = vmf->pgoff;
-
- return 0;
+ get_page(page);
+ return vmf_insert_mixed(vmf->vma, vmf->address, page_to_pfn_t(page));
}
static const struct vm_operations_struct msc_mmap_ops = {
@@ -1659,7 +1642,7 @@ static int intel_th_msc_mmap(struct file *file, struct vm_area_struct *vma)
atomic_dec(&msc->user_count);
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
- vm_flags_set(vma, VM_DONTEXPAND | VM_DONTCOPY);
+ vm_flags_set(vma, VM_DONTEXPAND | VM_DONTCOPY | VM_MIXEDMAP);
vma->vm_ops = &msc_mmap_ops;
return ret;
}
diff --git a/drivers/i2c/busses/i2c-designware-common.c b/drivers/i2c/busses/i2c-designware-common.c
index ced2fb4aeda8..79e083aab08e 100644
--- a/drivers/i2c/busses/i2c-designware-common.c
+++ b/drivers/i2c/busses/i2c-designware-common.c
@@ -669,6 +669,7 @@ void i2c_dw_disable(struct dw_i2c_dev *dev)
i2c_dw_release_lock(dev);
}
+EXPORT_SYMBOL_GPL(i2c_dw_disable);
MODULE_DESCRIPTION("Synopsys DesignWare I2C bus adapter core");
MODULE_LICENSE("GPL");
diff --git a/drivers/i2c/busses/i2c-designware-core.h b/drivers/i2c/busses/i2c-designware-core.h
index 5eb130c1d671..e93870a0f9a4 100644
--- a/drivers/i2c/busses/i2c-designware-core.h
+++ b/drivers/i2c/busses/i2c-designware-core.h
@@ -238,7 +238,6 @@ struct reset_control;
* @semaphore_idx: Index of table with semaphore type attached to the bus. It's
* -1 if there is no semaphore.
* @shared_with_punit: true if this bus is shared with the SoCs PUNIT
- * @disable: function to disable the controller
* @init: function to initialize the I2C hardware
* @set_sda_hold_time: callback to retrieve IP specific SDA hold timing
* @mode: operation mode - DW_IC_MASTER or DW_IC_SLAVE
@@ -295,7 +294,6 @@ struct dw_i2c_dev {
void (*release_lock)(void);
int semaphore_idx;
bool shared_with_punit;
- void (*disable)(struct dw_i2c_dev *dev);
int (*init)(struct dw_i2c_dev *dev);
int (*set_sda_hold_time)(struct dw_i2c_dev *dev);
int mode;
@@ -305,6 +303,7 @@ struct dw_i2c_dev {
#define ACCESS_INTR_MASK BIT(0)
#define ACCESS_NO_IRQ_SUSPEND BIT(1)
#define ARBITRATION_SEMAPHORE BIT(2)
+#define ACCESS_POLLING BIT(3)
#define MODEL_MSCC_OCELOT BIT(8)
#define MODEL_BAIKAL_BT1 BIT(9)
@@ -339,7 +338,6 @@ int i2c_dw_wait_bus_not_busy(struct dw_i2c_dev *dev);
int i2c_dw_handle_tx_abort(struct dw_i2c_dev *dev);
int i2c_dw_set_fifo_size(struct dw_i2c_dev *dev);
u32 i2c_dw_func(struct i2c_adapter *adap);
-void i2c_dw_disable(struct dw_i2c_dev *dev);
static inline void __i2c_dw_enable(struct dw_i2c_dev *dev)
{
@@ -354,6 +352,7 @@ static inline void __i2c_dw_disable_nowait(struct dw_i2c_dev *dev)
}
void __i2c_dw_disable(struct dw_i2c_dev *dev);
+void i2c_dw_disable(struct dw_i2c_dev *dev);
extern void i2c_dw_configure_master(struct dw_i2c_dev *dev);
extern int i2c_dw_probe_master(struct dw_i2c_dev *dev);
diff --git a/drivers/i2c/busses/i2c-designware-master.c b/drivers/i2c/busses/i2c-designware-master.c
index 579c668cb78a..51f5491648c0 100644
--- a/drivers/i2c/busses/i2c-designware-master.c
+++ b/drivers/i2c/busses/i2c-designware-master.c
@@ -991,31 +991,6 @@ static int i2c_dw_init_recovery_info(struct dw_i2c_dev *dev)
return 0;
}
-static int i2c_dw_poll_adap_quirk(struct dw_i2c_dev *dev)
-{
- struct i2c_adapter *adap = &dev->adapter;
- int ret;
-
- pm_runtime_get_noresume(dev->dev);
- ret = i2c_add_numbered_adapter(adap);
- if (ret)
- dev_err(dev->dev, "Failed to add adapter: %d\n", ret);
- pm_runtime_put_noidle(dev->dev);
-
- return ret;
-}
-
-static bool i2c_dw_is_model_poll(struct dw_i2c_dev *dev)
-{
- switch (dev->flags & MODEL_MASK) {
- case MODEL_AMD_NAVI_GPU:
- case MODEL_WANGXUN_SP:
- return true;
- default:
- return false;
- }
-}
-
int i2c_dw_probe_master(struct dw_i2c_dev *dev)
{
struct i2c_adapter *adap = &dev->adapter;
@@ -1026,7 +1001,6 @@ int i2c_dw_probe_master(struct dw_i2c_dev *dev)
init_completion(&dev->cmd_complete);
dev->init = i2c_dw_init_master;
- dev->disable = i2c_dw_disable;
ret = i2c_dw_init_regmap(dev);
if (ret)
@@ -1071,9 +1045,6 @@ int i2c_dw_probe_master(struct dw_i2c_dev *dev)
adap->dev.parent = dev->dev;
i2c_set_adapdata(adap, dev);
- if (i2c_dw_is_model_poll(dev))
- return i2c_dw_poll_adap_quirk(dev);
-
if (dev->flags & ACCESS_NO_IRQ_SUSPEND) {
irq_flags = IRQF_NO_SUSPEND;
} else {
@@ -1087,12 +1058,14 @@ int i2c_dw_probe_master(struct dw_i2c_dev *dev)
regmap_write(dev->map, DW_IC_INTR_MASK, 0);
i2c_dw_release_lock(dev);
- ret = devm_request_irq(dev->dev, dev->irq, i2c_dw_isr, irq_flags,
- dev_name(dev->dev), dev);
- if (ret) {
- dev_err(dev->dev, "failure requesting irq %i: %d\n",
- dev->irq, ret);
- return ret;
+ if (!(dev->flags & ACCESS_POLLING)) {
+ ret = devm_request_irq(dev->dev, dev->irq, i2c_dw_isr,
+ irq_flags, dev_name(dev->dev), dev);
+ if (ret) {
+ dev_err(dev->dev, "failure requesting irq %i: %d\n",
+ dev->irq, ret);
+ return ret;
+ }
}
ret = i2c_dw_init_recovery_info(dev);
diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c
index 61d7a27aa070..b85f1e4ed13b 100644
--- a/drivers/i2c/busses/i2c-designware-pcidrv.c
+++ b/drivers/i2c/busses/i2c-designware-pcidrv.c
@@ -154,7 +154,7 @@ static int navi_amd_setup(struct pci_dev *pdev, struct dw_pci_controller *c)
{
struct dw_i2c_dev *dev = dev_get_drvdata(&pdev->dev);
- dev->flags |= MODEL_AMD_NAVI_GPU;
+ dev->flags |= MODEL_AMD_NAVI_GPU | ACCESS_POLLING;
dev->timings.bus_freq_hz = I2C_MAX_STANDARD_MODE_FREQ;
return 0;
}
@@ -198,7 +198,7 @@ static int __maybe_unused i2c_dw_pci_runtime_suspend(struct device *dev)
{
struct dw_i2c_dev *i_dev = dev_get_drvdata(dev);
- i_dev->disable(i_dev);
+ i2c_dw_disable(i_dev);
return 0;
}
@@ -248,6 +248,7 @@ static const struct software_node dgpu_node = {
static int i2c_dw_pci_probe(struct pci_dev *pdev,
const struct pci_device_id *id)
{
+ struct device *device = &pdev->dev;
struct dw_i2c_dev *dev;
struct i2c_adapter *adap;
int r;
@@ -256,25 +257,22 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev,
struct i2c_timings *t;
if (id->driver_data >= ARRAY_SIZE(dw_pci_controllers))
- return dev_err_probe(&pdev->dev, -EINVAL,
- "Invalid driver data %ld\n",
+ return dev_err_probe(device, -EINVAL, "Invalid driver data %ld\n",
id->driver_data);
controller = &dw_pci_controllers[id->driver_data];
r = pcim_enable_device(pdev);
if (r)
- return dev_err_probe(&pdev->dev, r,
- "Failed to enable I2C PCI device\n");
+ return dev_err_probe(device, r, "Failed to enable I2C PCI device\n");
pci_set_master(pdev);
r = pcim_iomap_regions(pdev, 1 << 0, pci_name(pdev));
if (r)
- return dev_err_probe(&pdev->dev, r,
- "I/O memory remapping failed\n");
+ return dev_err_probe(device, r, "I/O memory remapping failed\n");
- dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL);
+ dev = devm_kzalloc(device, sizeof(*dev), GFP_KERNEL);
if (!dev)
return -ENOMEM;
@@ -284,7 +282,7 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev,
dev->get_clk_rate_khz = controller->get_clk_rate_khz;
dev->base = pcim_iomap_table(pdev)[0];
- dev->dev = &pdev->dev;
+ dev->dev = device;
dev->irq = pci_irq_vector(pdev, 0);
dev->flags |= controller->flags;
@@ -337,15 +335,17 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev,
if ((dev->flags & MODEL_MASK) == MODEL_AMD_NAVI_GPU) {
dev->slave = i2c_new_ccgx_ucsi(&dev->adapter, dev->irq, &dgpu_node);
- if (IS_ERR(dev->slave))
- return dev_err_probe(dev->dev, PTR_ERR(dev->slave),
+ if (IS_ERR(dev->slave)) {
+ i2c_del_adapter(&dev->adapter);
+ return dev_err_probe(device, PTR_ERR(dev->slave),
"register UCSI failed\n");
+ }
}
- pm_runtime_set_autosuspend_delay(&pdev->dev, 1000);
- pm_runtime_use_autosuspend(&pdev->dev);
- pm_runtime_put_autosuspend(&pdev->dev);
- pm_runtime_allow(&pdev->dev);
+ pm_runtime_set_autosuspend_delay(device, 1000);
+ pm_runtime_use_autosuspend(device);
+ pm_runtime_put_autosuspend(device);
+ pm_runtime_allow(device);
return 0;
}
@@ -353,10 +353,12 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev,
static void i2c_dw_pci_remove(struct pci_dev *pdev)
{
struct dw_i2c_dev *dev = pci_get_drvdata(pdev);
+ struct device *device = &pdev->dev;
+
+ i2c_dw_disable(dev);
- dev->disable(dev);
- pm_runtime_forbid(&pdev->dev);
- pm_runtime_get_noresume(&pdev->dev);
+ pm_runtime_forbid(device);
+ pm_runtime_get_noresume(device);
i2c_del_adapter(&dev->adapter);
devm_free_irq(&pdev->dev, dev->irq, dev);
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
index 855b698e99c0..f3245a685630 100644
--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
@@ -275,6 +275,7 @@ static void i2c_dw_remove_lock_support(struct dw_i2c_dev *dev)
static int dw_i2c_plat_probe(struct platform_device *pdev)
{
+ struct device *device = &pdev->dev;
struct i2c_adapter *adap;
struct dw_i2c_dev *dev;
struct i2c_timings *t;
@@ -284,15 +285,15 @@ static int dw_i2c_plat_probe(struct platform_device *pdev)
if (irq < 0)
return irq;
- dev = devm_kzalloc(&pdev->dev, sizeof(struct dw_i2c_dev), GFP_KERNEL);
+ dev = devm_kzalloc(device, sizeof(*dev), GFP_KERNEL);
if (!dev)
return -ENOMEM;
- dev->flags = (uintptr_t)device_get_match_data(&pdev->dev);
- if (device_property_present(&pdev->dev, "wx,i2c-snps-model"))
- dev->flags = MODEL_WANGXUN_SP;
+ dev->flags = (uintptr_t)device_get_match_data(device);
+ if (device_property_present(device, "wx,i2c-snps-model"))
+ dev->flags = MODEL_WANGXUN_SP | ACCESS_POLLING;
- dev->dev = &pdev->dev;
+ dev->dev = device;
dev->irq = irq;
platform_set_drvdata(pdev, dev);
@@ -300,7 +301,7 @@ static int dw_i2c_plat_probe(struct platform_device *pdev)
if (ret)
return ret;
- dev->rst = devm_reset_control_get_optional_exclusive(&pdev->dev, NULL);
+ dev->rst = devm_reset_control_get_optional_exclusive(device, NULL);
if (IS_ERR(dev->rst))
return PTR_ERR(dev->rst);
@@ -328,13 +329,13 @@ static int dw_i2c_plat_probe(struct platform_device *pdev)
i2c_dw_configure(dev);
/* Optional interface clock */
- dev->pclk = devm_clk_get_optional(&pdev->dev, "pclk");
+ dev->pclk = devm_clk_get_optional(device, "pclk");
if (IS_ERR(dev->pclk)) {
ret = PTR_ERR(dev->pclk);
goto exit_reset;
}
- dev->clk = devm_clk_get_optional(&pdev->dev, NULL);
+ dev->clk = devm_clk_get_optional(device, NULL);
if (IS_ERR(dev->clk)) {
ret = PTR_ERR(dev->clk);
goto exit_reset;
@@ -363,28 +364,24 @@ static int dw_i2c_plat_probe(struct platform_device *pdev)
adap->dev.of_node = pdev->dev.of_node;
adap->nr = -1;
- if (dev->flags & ACCESS_NO_IRQ_SUSPEND) {
- dev_pm_set_driver_flags(&pdev->dev,
- DPM_FLAG_SMART_PREPARE);
- } else {
- dev_pm_set_driver_flags(&pdev->dev,
- DPM_FLAG_SMART_PREPARE |
- DPM_FLAG_SMART_SUSPEND);
- }
+ if (dev->flags & ACCESS_NO_IRQ_SUSPEND)
+ dev_pm_set_driver_flags(device, DPM_FLAG_SMART_PREPARE);
+ else
+ dev_pm_set_driver_flags(device, DPM_FLAG_SMART_PREPARE | DPM_FLAG_SMART_SUSPEND);
- device_enable_async_suspend(&pdev->dev);
+ device_enable_async_suspend(device);
/* The code below assumes runtime PM to be disabled. */
- WARN_ON(pm_runtime_enabled(&pdev->dev));
+ WARN_ON(pm_runtime_enabled(device));
- pm_runtime_set_autosuspend_delay(&pdev->dev, 1000);
- pm_runtime_use_autosuspend(&pdev->dev);
- pm_runtime_set_active(&pdev->dev);
+ pm_runtime_set_autosuspend_delay(device, 1000);
+ pm_runtime_use_autosuspend(device);
+ pm_runtime_set_active(device);
if (dev->shared_with_punit)
- pm_runtime_get_noresume(&pdev->dev);
+ pm_runtime_get_noresume(device);
- pm_runtime_enable(&pdev->dev);
+ pm_runtime_enable(device);
ret = i2c_dw_probe(dev);
if (ret)
@@ -402,15 +399,16 @@ static int dw_i2c_plat_probe(struct platform_device *pdev)
static void dw_i2c_plat_remove(struct platform_device *pdev)
{
struct dw_i2c_dev *dev = platform_get_drvdata(pdev);
+ struct device *device = &pdev->dev;
- pm_runtime_get_sync(&pdev->dev);
+ pm_runtime_get_sync(device);
i2c_del_adapter(&dev->adapter);
- dev->disable(dev);
+ i2c_dw_disable(dev);
- pm_runtime_dont_use_autosuspend(&pdev->dev);
- pm_runtime_put_sync(&pdev->dev);
+ pm_runtime_dont_use_autosuspend(device);
+ pm_runtime_put_sync(device);
dw_i2c_plat_pm_cleanup(dev);
i2c_dw_remove_lock_support(dev);
@@ -436,7 +434,7 @@ static int dw_i2c_plat_runtime_suspend(struct device *dev)
if (i_dev->shared_with_punit)
return 0;
- i_dev->disable(i_dev);
+ i2c_dw_disable(i_dev);
i2c_dw_prepare_clk(i_dev, false);
return 0;
diff --git a/drivers/i2c/busses/i2c-designware-slave.c b/drivers/i2c/busses/i2c-designware-slave.c
index 78e2c47e3d7d..345b532a2b45 100644
--- a/drivers/i2c/busses/i2c-designware-slave.c
+++ b/drivers/i2c/busses/i2c-designware-slave.c
@@ -88,7 +88,7 @@ static int i2c_dw_unreg_slave(struct i2c_client *slave)
struct dw_i2c_dev *dev = i2c_get_adapdata(slave->adapter);
regmap_write(dev->map, DW_IC_INTR_MASK, 0);
- dev->disable(dev);
+ i2c_dw_disable(dev);
synchronize_irq(dev->irq);
dev->slave = NULL;
pm_runtime_put(dev->dev);
@@ -235,7 +235,6 @@ int i2c_dw_probe_slave(struct dw_i2c_dev *dev)
int ret;
dev->init = i2c_dw_init_slave;
- dev->disable = i2c_dw_disable;
ret = i2c_dw_init_regmap(dev);
if (ret)
diff --git a/drivers/i2c/busses/i2c-pxa.c b/drivers/i2c/busses/i2c-pxa.c
index 3bd406470940..affdd94f06aa 100644
--- a/drivers/i2c/busses/i2c-pxa.c
+++ b/drivers/i2c/busses/i2c-pxa.c
@@ -1504,7 +1504,10 @@ static int i2c_pxa_probe(struct platform_device *dev)
i2c->adap.name);
}
- clk_prepare_enable(i2c->clk);
+ ret = clk_prepare_enable(i2c->clk);
+ if (ret)
+ return dev_err_probe(&dev->dev, ret,
+ "failed to enable clock\n");
if (i2c->use_pio) {
i2c->adap.algo = &i2c_pxa_pio_algorithm;
diff --git a/drivers/i2c/busses/i2c-qup.c b/drivers/i2c/busses/i2c-qup.c
index 598102d16677..ee92a315f074 100644
--- a/drivers/i2c/busses/i2c-qup.c
+++ b/drivers/i2c/busses/i2c-qup.c
@@ -14,6 +14,7 @@
#include <linux/dma-mapping.h>
#include <linux/err.h>
#include <linux/i2c.h>
+#include <linux/interconnect.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/module.h>
@@ -150,6 +151,8 @@
/* TAG length for DATA READ in RX FIFO */
#define READ_RX_TAGS_LEN 2
+#define QUP_BUS_WIDTH 8
+
static unsigned int scl_freq;
module_param_named(scl_freq, scl_freq, uint, 0444);
MODULE_PARM_DESC(scl_freq, "SCL frequency override");
@@ -227,6 +230,7 @@ struct qup_i2c_dev {
int irq;
struct clk *clk;
struct clk *pclk;
+ struct icc_path *icc_path;
struct i2c_adapter adap;
int clk_ctl;
@@ -255,6 +259,10 @@ struct qup_i2c_dev {
/* To configure when bus is in run state */
u32 config_run;
+ /* bandwidth votes */
+ u32 src_clk_freq;
+ u32 cur_bw_clk_freq;
+
/* dma parameters */
bool is_dma;
/* To check if the current transfer is using DMA */
@@ -453,6 +461,23 @@ static int qup_i2c_bus_active(struct qup_i2c_dev *qup, int len)
return ret;
}
+static int qup_i2c_vote_bw(struct qup_i2c_dev *qup, u32 clk_freq)
+{
+ u32 needed_peak_bw;
+ int ret;
+
+ if (qup->cur_bw_clk_freq == clk_freq)
+ return 0;
+
+ needed_peak_bw = Bps_to_icc(clk_freq * QUP_BUS_WIDTH);
+ ret = icc_set_bw(qup->icc_path, 0, needed_peak_bw);
+ if (ret)
+ return ret;
+
+ qup->cur_bw_clk_freq = clk_freq;
+ return 0;
+}
+
static void qup_i2c_write_tx_fifo_v1(struct qup_i2c_dev *qup)
{
struct qup_i2c_block *blk = &qup->blk;
@@ -840,6 +865,10 @@ static int qup_i2c_bam_xfer(struct i2c_adapter *adap, struct i2c_msg *msg,
int ret = 0;
int idx = 0;
+ ret = qup_i2c_vote_bw(qup, qup->src_clk_freq);
+ if (ret)
+ return ret;
+
enable_irq(qup->irq);
ret = qup_i2c_req_dma(qup);
@@ -1645,6 +1674,7 @@ static void qup_i2c_disable_clocks(struct qup_i2c_dev *qup)
config = readl(qup->base + QUP_CONFIG);
config |= QUP_CLOCK_AUTO_GATE;
writel(config, qup->base + QUP_CONFIG);
+ qup_i2c_vote_bw(qup, 0);
clk_disable_unprepare(qup->pclk);
}
@@ -1745,6 +1775,11 @@ static int qup_i2c_probe(struct platform_device *pdev)
goto fail_dma;
}
qup->is_dma = true;
+
+ qup->icc_path = devm_of_icc_get(&pdev->dev, NULL);
+ if (IS_ERR(qup->icc_path))
+ return dev_err_probe(&pdev->dev, PTR_ERR(qup->icc_path),
+ "failed to get interconnect path\n");
}
nodma:
@@ -1793,6 +1828,7 @@ static int qup_i2c_probe(struct platform_device *pdev)
qup_i2c_enable_clocks(qup);
src_clk_freq = clk_get_rate(qup->clk);
}
+ qup->src_clk_freq = src_clk_freq;
/*
* Bootloaders might leave a pending interrupt on certain QUP's,
diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c
index fa1f12a89158..d1630d47ef6f 100644
--- a/drivers/i3c/master/svc-i3c-master.c
+++ b/drivers/i3c/master/svc-i3c-master.c
@@ -503,6 +503,8 @@ static void svc_i3c_master_ibi_work(struct work_struct *work)
queue_work(master->base.wq, &master->hj_work);
break;
case SVC_I3C_MSTATUS_IBITYPE_MASTER_REQUEST:
+ svc_i3c_master_emit_stop(master);
+ break;
default:
break;
}
@@ -840,6 +842,8 @@ static int svc_i3c_master_do_daa_locked(struct svc_i3c_master *master,
u32 reg;
int ret, i;
+ svc_i3c_master_flush_fifo(master);
+
while (true) {
/* Enter/proceed with DAA */
writel(SVC_I3C_MCTRL_REQUEST_PROC_DAA |
diff --git a/drivers/infiniband/core/umem.c b/drivers/infiniband/core/umem.c
index 07c571c7b699..c5b686394760 100644
--- a/drivers/infiniband/core/umem.c
+++ b/drivers/infiniband/core/umem.c
@@ -80,9 +80,12 @@ unsigned long ib_umem_find_best_pgsz(struct ib_umem *umem,
unsigned long pgsz_bitmap,
unsigned long virt)
{
- struct scatterlist *sg;
+ unsigned long curr_len = 0;
+ dma_addr_t curr_base = ~0;
unsigned long va, pgoff;
+ struct scatterlist *sg;
dma_addr_t mask;
+ dma_addr_t end;
int i;
umem->iova = va = virt;
@@ -107,17 +110,30 @@ unsigned long ib_umem_find_best_pgsz(struct ib_umem *umem,
pgoff = umem->address & ~PAGE_MASK;
for_each_sgtable_dma_sg(&umem->sgt_append.sgt, sg, i) {
- /* Walk SGL and reduce max page size if VA/PA bits differ
- * for any address.
+ /* If the current entry is physically contiguous with the previous
+ * one, no need to take its start addresses into consideration.
*/
- mask |= (sg_dma_address(sg) + pgoff) ^ va;
+ if (check_add_overflow(curr_base, curr_len, &end) ||
+ end != sg_dma_address(sg)) {
+
+ curr_base = sg_dma_address(sg);
+ curr_len = 0;
+
+ /* Reduce max page size if VA/PA bits differ */
+ mask |= (curr_base + pgoff) ^ va;
+
+ /* The alignment of any VA matching a discontinuity point
+ * in the physical memory sets the maximum possible page
+ * size as this must be a starting point of a new page that
+ * needs to be aligned.
+ */
+ if (i != 0)
+ mask |= va;
+ }
+
+ curr_len += sg_dma_len(sg);
va += sg_dma_len(sg) - pgoff;
- /* Except for the last entry, the ending iova alignment sets
- * the maximum possible page size as the low bits of the iova
- * must be zero when starting the next chunk.
- */
- if (i != (umem->sgt_append.sgt.nents - 1))
- mask |= va;
+
pgoff = 0;
}
diff --git a/drivers/infiniband/core/uverbs_cmd.c b/drivers/infiniband/core/uverbs_cmd.c
index c6053e82ecf6..33e2fe0facd5 100644
--- a/drivers/infiniband/core/uverbs_cmd.c
+++ b/drivers/infiniband/core/uverbs_cmd.c
@@ -718,8 +718,8 @@ static int ib_uverbs_reg_mr(struct uverbs_attr_bundle *attrs)
goto err_free;
pd = uobj_get_obj_read(pd, UVERBS_OBJECT_PD, cmd.pd_handle, attrs);
- if (!pd) {
- ret = -EINVAL;
+ if (IS_ERR(pd)) {
+ ret = PTR_ERR(pd);
goto err_free;
}
@@ -809,8 +809,8 @@ static int ib_uverbs_rereg_mr(struct uverbs_attr_bundle *attrs)
if (cmd.flags & IB_MR_REREG_PD) {
new_pd = uobj_get_obj_read(pd, UVERBS_OBJECT_PD, cmd.pd_handle,
attrs);
- if (!new_pd) {
- ret = -EINVAL;
+ if (IS_ERR(new_pd)) {
+ ret = PTR_ERR(new_pd);
goto put_uobjs;
}
} else {
@@ -919,8 +919,8 @@ static int ib_uverbs_alloc_mw(struct uverbs_attr_bundle *attrs)
return PTR_ERR(uobj);
pd = uobj_get_obj_read(pd, UVERBS_OBJECT_PD, cmd.pd_handle, attrs);
- if (!pd) {
- ret = -EINVAL;
+ if (IS_ERR(pd)) {
+ ret = PTR_ERR(pd);
goto err_free;
}
@@ -1127,8 +1127,8 @@ static int ib_uverbs_resize_cq(struct uverbs_attr_bundle *attrs)
return ret;
cq = uobj_get_obj_read(cq, UVERBS_OBJECT_CQ, cmd.cq_handle, attrs);
- if (!cq)
- return -EINVAL;
+ if (IS_ERR(cq))
+ return PTR_ERR(cq);
ret = cq->device->ops.resize_cq(cq, cmd.cqe, &attrs->driver_udata);
if (ret)
@@ -1189,8 +1189,8 @@ static int ib_uverbs_poll_cq(struct uverbs_attr_bundle *attrs)
return ret;
cq = uobj_get_obj_read(cq, UVERBS_OBJECT_CQ, cmd.cq_handle, attrs);
- if (!cq)
- return -EINVAL;
+ if (IS_ERR(cq))
+ return PTR_ERR(cq);
/* we copy a struct ib_uverbs_poll_cq_resp to user space */
header_ptr = attrs->ucore.outbuf;
@@ -1238,8 +1238,8 @@ static int ib_uverbs_req_notify_cq(struct uverbs_attr_bundle *attrs)
return ret;
cq = uobj_get_obj_read(cq, UVERBS_OBJECT_CQ, cmd.cq_handle, attrs);
- if (!cq)
- return -EINVAL;
+ if (IS_ERR(cq))
+ return PTR_ERR(cq);
ib_req_notify_cq(cq, cmd.solicited_only ?
IB_CQ_SOLICITED : IB_CQ_NEXT_COMP);
@@ -1321,8 +1321,8 @@ static int create_qp(struct uverbs_attr_bundle *attrs,
ind_tbl = uobj_get_obj_read(rwq_ind_table,
UVERBS_OBJECT_RWQ_IND_TBL,
cmd->rwq_ind_tbl_handle, attrs);
- if (!ind_tbl) {
- ret = -EINVAL;
+ if (IS_ERR(ind_tbl)) {
+ ret = PTR_ERR(ind_tbl);
goto err_put;
}
@@ -1360,8 +1360,10 @@ static int create_qp(struct uverbs_attr_bundle *attrs,
if (cmd->is_srq) {
srq = uobj_get_obj_read(srq, UVERBS_OBJECT_SRQ,
cmd->srq_handle, attrs);
- if (!srq || srq->srq_type == IB_SRQT_XRC) {
- ret = -EINVAL;
+ if (IS_ERR(srq) ||
+ srq->srq_type == IB_SRQT_XRC) {
+ ret = IS_ERR(srq) ? PTR_ERR(srq) :
+ -EINVAL;
goto err_put;
}
}
@@ -1371,23 +1373,29 @@ static int create_qp(struct uverbs_attr_bundle *attrs,
rcq = uobj_get_obj_read(
cq, UVERBS_OBJECT_CQ,
cmd->recv_cq_handle, attrs);
- if (!rcq) {
- ret = -EINVAL;
+ if (IS_ERR(rcq)) {
+ ret = PTR_ERR(rcq);
goto err_put;
}
}
}
}
- if (has_sq)
+ if (has_sq) {
scq = uobj_get_obj_read(cq, UVERBS_OBJECT_CQ,
cmd->send_cq_handle, attrs);
+ if (IS_ERR(scq)) {
+ ret = PTR_ERR(scq);
+ goto err_put;
+ }
+ }
+
if (!ind_tbl && cmd->qp_type != IB_QPT_XRC_INI)
rcq = rcq ?: scq;
pd = uobj_get_obj_read(pd, UVERBS_OBJECT_PD, cmd->pd_handle,
attrs);
- if (!pd || (!scq && has_sq)) {
- ret = -EINVAL;
+ if (IS_ERR(pd)) {
+ ret = PTR_ERR(pd);
goto err_put;
}
@@ -1482,18 +1490,18 @@ static int create_qp(struct uverbs_attr_bundle *attrs,
err_put:
if (!IS_ERR(xrcd_uobj))
uobj_put_read(xrcd_uobj);
- if (pd)
+ if (!IS_ERR_OR_NULL(pd))
uobj_put_obj_read(pd);
- if (scq)
+ if (!IS_ERR_OR_NULL(scq))
rdma_lookup_put_uobject(&scq->uobject->uevent.uobject,
UVERBS_LOOKUP_READ);
- if (rcq && rcq != scq)
+ if (!IS_ERR_OR_NULL(rcq) && rcq != scq)
rdma_lookup_put_uobject(&rcq->uobject->uevent.uobject,
UVERBS_LOOKUP_READ);
- if (srq)
+ if (!IS_ERR_OR_NULL(srq))
rdma_lookup_put_uobject(&srq->uobject->uevent.uobject,
UVERBS_LOOKUP_READ);
- if (ind_tbl)
+ if (!IS_ERR_OR_NULL(ind_tbl))
uobj_put_obj_read(ind_tbl);
uobj_alloc_abort(&obj->uevent.uobject, attrs);
@@ -1655,8 +1663,8 @@ static int ib_uverbs_query_qp(struct uverbs_attr_bundle *attrs)
}
qp = uobj_get_obj_read(qp, UVERBS_OBJECT_QP, cmd.qp_handle, attrs);
- if (!qp) {
- ret = -EINVAL;
+ if (IS_ERR(qp)) {
+ ret = PTR_ERR(qp);
goto out;
}
@@ -1761,8 +1769,8 @@ static int modify_qp(struct uverbs_attr_bundle *attrs,
qp = uobj_get_obj_read(qp, UVERBS_OBJECT_QP, cmd->base.qp_handle,
attrs);
- if (!qp) {
- ret = -EINVAL;
+ if (IS_ERR(qp)) {
+ ret = PTR_ERR(qp);
goto out;
}
@@ -2027,8 +2035,8 @@ static int ib_uverbs_post_send(struct uverbs_attr_bundle *attrs)
return -ENOMEM;
qp = uobj_get_obj_read(qp, UVERBS_OBJECT_QP, cmd.qp_handle, attrs);
- if (!qp) {
- ret = -EINVAL;
+ if (IS_ERR(qp)) {
+ ret = PTR_ERR(qp);
goto out;
}
@@ -2065,9 +2073,9 @@ static int ib_uverbs_post_send(struct uverbs_attr_bundle *attrs)
ud->ah = uobj_get_obj_read(ah, UVERBS_OBJECT_AH,
user_wr->wr.ud.ah, attrs);
- if (!ud->ah) {
+ if (IS_ERR(ud->ah)) {
+ ret = PTR_ERR(ud->ah);
kfree(ud);
- ret = -EINVAL;
goto out_put;
}
ud->remote_qpn = user_wr->wr.ud.remote_qpn;
@@ -2304,8 +2312,8 @@ static int ib_uverbs_post_recv(struct uverbs_attr_bundle *attrs)
return PTR_ERR(wr);
qp = uobj_get_obj_read(qp, UVERBS_OBJECT_QP, cmd.qp_handle, attrs);
- if (!qp) {
- ret = -EINVAL;
+ if (IS_ERR(qp)) {
+ ret = PTR_ERR(qp);
goto out;
}
@@ -2355,8 +2363,8 @@ static int ib_uverbs_post_srq_recv(struct uverbs_attr_bundle *attrs)
return PTR_ERR(wr);
srq = uobj_get_obj_read(srq, UVERBS_OBJECT_SRQ, cmd.srq_handle, attrs);
- if (!srq) {
- ret = -EINVAL;
+ if (IS_ERR(srq)) {
+ ret = PTR_ERR(srq);
goto out;
}
@@ -2412,8 +2420,8 @@ static int ib_uverbs_create_ah(struct uverbs_attr_bundle *attrs)
}
pd = uobj_get_obj_read(pd, UVERBS_OBJECT_PD, cmd.pd_handle, attrs);
- if (!pd) {
- ret = -EINVAL;
+ if (IS_ERR(pd)) {
+ ret = PTR_ERR(pd);
goto err;
}
@@ -2482,8 +2490,8 @@ static int ib_uverbs_attach_mcast(struct uverbs_attr_bundle *attrs)
return ret;
qp = uobj_get_obj_read(qp, UVERBS_OBJECT_QP, cmd.qp_handle, attrs);
- if (!qp)
- return -EINVAL;
+ if (IS_ERR(qp))
+ return PTR_ERR(qp);
obj = qp->uobject;
@@ -2532,8 +2540,8 @@ static int ib_uverbs_detach_mcast(struct uverbs_attr_bundle *attrs)
return ret;
qp = uobj_get_obj_read(qp, UVERBS_OBJECT_QP, cmd.qp_handle, attrs);
- if (!qp)
- return -EINVAL;
+ if (IS_ERR(qp))
+ return PTR_ERR(qp);
obj = qp->uobject;
mutex_lock(&obj->mcast_lock);
@@ -2667,8 +2675,8 @@ static int kern_spec_to_ib_spec_action(struct uverbs_attr_bundle *attrs,
UVERBS_OBJECT_FLOW_ACTION,
kern_spec->action.handle,
attrs);
- if (!ib_spec->action.act)
- return -EINVAL;
+ if (IS_ERR(ib_spec->action.act))
+ return PTR_ERR(ib_spec->action.act);
ib_spec->action.size =
sizeof(struct ib_flow_spec_action_handle);
flow_resources_add(uflow_res,
@@ -2685,8 +2693,8 @@ static int kern_spec_to_ib_spec_action(struct uverbs_attr_bundle *attrs,
UVERBS_OBJECT_COUNTERS,
kern_spec->flow_count.handle,
attrs);
- if (!ib_spec->flow_count.counters)
- return -EINVAL;
+ if (IS_ERR(ib_spec->flow_count.counters))
+ return PTR_ERR(ib_spec->flow_count.counters);
ib_spec->flow_count.size =
sizeof(struct ib_flow_spec_action_count);
flow_resources_add(uflow_res,
@@ -2904,14 +2912,14 @@ static int ib_uverbs_ex_create_wq(struct uverbs_attr_bundle *attrs)
return PTR_ERR(obj);
pd = uobj_get_obj_read(pd, UVERBS_OBJECT_PD, cmd.pd_handle, attrs);
- if (!pd) {
- err = -EINVAL;
+ if (IS_ERR(pd)) {
+ err = PTR_ERR(pd);
goto err_uobj;
}
cq = uobj_get_obj_read(cq, UVERBS_OBJECT_CQ, cmd.cq_handle, attrs);
- if (!cq) {
- err = -EINVAL;
+ if (IS_ERR(cq)) {
+ err = PTR_ERR(cq);
goto err_put_pd;
}
@@ -3012,8 +3020,8 @@ static int ib_uverbs_ex_modify_wq(struct uverbs_attr_bundle *attrs)
return -EINVAL;
wq = uobj_get_obj_read(wq, UVERBS_OBJECT_WQ, cmd.wq_handle, attrs);
- if (!wq)
- return -EINVAL;
+ if (IS_ERR(wq))
+ return PTR_ERR(wq);
if (cmd.attr_mask & IB_WQ_FLAGS) {
wq_attr.flags = cmd.flags;
@@ -3096,8 +3104,8 @@ static int ib_uverbs_ex_create_rwq_ind_table(struct uverbs_attr_bundle *attrs)
num_read_wqs++) {
wq = uobj_get_obj_read(wq, UVERBS_OBJECT_WQ,
wqs_handles[num_read_wqs], attrs);
- if (!wq) {
- err = -EINVAL;
+ if (IS_ERR(wq)) {
+ err = PTR_ERR(wq);
goto put_wqs;
}
@@ -3252,8 +3260,8 @@ static int ib_uverbs_ex_create_flow(struct uverbs_attr_bundle *attrs)
}
qp = uobj_get_obj_read(qp, UVERBS_OBJECT_QP, cmd.qp_handle, attrs);
- if (!qp) {
- err = -EINVAL;
+ if (IS_ERR(qp)) {
+ err = PTR_ERR(qp);
goto err_uobj;
}
@@ -3399,15 +3407,15 @@ static int __uverbs_create_xsrq(struct uverbs_attr_bundle *attrs,
if (ib_srq_has_cq(cmd->srq_type)) {
attr.ext.cq = uobj_get_obj_read(cq, UVERBS_OBJECT_CQ,
cmd->cq_handle, attrs);
- if (!attr.ext.cq) {
- ret = -EINVAL;
+ if (IS_ERR(attr.ext.cq)) {
+ ret = PTR_ERR(attr.ext.cq);
goto err_put_xrcd;
}
}
pd = uobj_get_obj_read(pd, UVERBS_OBJECT_PD, cmd->pd_handle, attrs);
- if (!pd) {
- ret = -EINVAL;
+ if (IS_ERR(pd)) {
+ ret = PTR_ERR(pd);
goto err_put_cq;
}
@@ -3514,8 +3522,8 @@ static int ib_uverbs_modify_srq(struct uverbs_attr_bundle *attrs)
return ret;
srq = uobj_get_obj_read(srq, UVERBS_OBJECT_SRQ, cmd.srq_handle, attrs);
- if (!srq)
- return -EINVAL;
+ if (IS_ERR(srq))
+ return PTR_ERR(srq);
attr.max_wr = cmd.max_wr;
attr.srq_limit = cmd.srq_limit;
@@ -3542,8 +3550,8 @@ static int ib_uverbs_query_srq(struct uverbs_attr_bundle *attrs)
return ret;
srq = uobj_get_obj_read(srq, UVERBS_OBJECT_SRQ, cmd.srq_handle, attrs);
- if (!srq)
- return -EINVAL;
+ if (IS_ERR(srq))
+ return PTR_ERR(srq);
ret = ib_query_srq(srq, &attr);
@@ -3668,8 +3676,8 @@ static int ib_uverbs_ex_modify_cq(struct uverbs_attr_bundle *attrs)
return -EOPNOTSUPP;
cq = uobj_get_obj_read(cq, UVERBS_OBJECT_CQ, cmd.cq_handle, attrs);
- if (!cq)
- return -EINVAL;
+ if (IS_ERR(cq))
+ return PTR_ERR(cq);
ret = rdma_set_cq_moderation(cq, cmd.attr.cq_count, cmd.attr.cq_period);
diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c
index ba05de0380e9..6567d4375128 100644
--- a/drivers/infiniband/core/verbs.c
+++ b/drivers/infiniband/core/verbs.c
@@ -3029,22 +3029,23 @@ EXPORT_SYMBOL(__rdma_block_iter_start);
bool __rdma_block_iter_next(struct ib_block_iter *biter)
{
unsigned int block_offset;
- unsigned int sg_delta;
+ unsigned int delta;
if (!biter->__sg_nents || !biter->__sg)
return false;
biter->__dma_addr = sg_dma_address(biter->__sg) + biter->__sg_advance;
block_offset = biter->__dma_addr & (BIT_ULL(biter->__pg_bit) - 1);
- sg_delta = BIT_ULL(biter->__pg_bit) - block_offset;
+ delta = BIT_ULL(biter->__pg_bit) - block_offset;
- if (sg_dma_len(biter->__sg) - biter->__sg_advance > sg_delta) {
- biter->__sg_advance += sg_delta;
- } else {
+ while (biter->__sg_nents && biter->__sg &&
+ sg_dma_len(biter->__sg) - biter->__sg_advance <= delta) {
+ delta -= sg_dma_len(biter->__sg) - biter->__sg_advance;
biter->__sg_advance = 0;
biter->__sg = sg_next(biter->__sg);
biter->__sg_nents--;
}
+ biter->__sg_advance += delta;
return true;
}
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c
index c65321964131..e6fed973ea74 100644
--- a/drivers/input/joystick/xpad.c
+++ b/drivers/input/joystick/xpad.c
@@ -289,6 +289,8 @@ static const struct xpad_device {
{ 0x1038, 0x1430, "SteelSeries Stratus Duo", 0, XTYPE_XBOX360 },
{ 0x1038, 0x1431, "SteelSeries Stratus Duo", 0, XTYPE_XBOX360 },
{ 0x10f5, 0x7005, "Turtle Beach Recon Controller", 0, XTYPE_XBOXONE },
+ { 0x10f5, 0x7008, "Turtle Beach Recon Controller", MAP_SHARE_BUTTON, XTYPE_XBOXONE },
+ { 0x10f5, 0x7073, "Turtle Beach Stealth Ultra Controller", MAP_SHARE_BUTTON, XTYPE_XBOXONE },
{ 0x11c9, 0x55f0, "Nacon GC-100XF", 0, XTYPE_XBOX360 },
{ 0x11ff, 0x0511, "PXN V900", 0, XTYPE_XBOX360 },
{ 0x1209, 0x2882, "Ardwiino Controller", 0, XTYPE_XBOX360 },
@@ -353,6 +355,7 @@ static const struct xpad_device {
{ 0x1ee9, 0x1590, "ZOTAC Gaming Zone", 0, XTYPE_XBOX360 },
{ 0x20d6, 0x2001, "BDA Xbox Series X Wired Controller", 0, XTYPE_XBOXONE },
{ 0x20d6, 0x2009, "PowerA Enhanced Wired Controller for Xbox Series X|S", 0, XTYPE_XBOXONE },
+ { 0x20d6, 0x2064, "PowerA Wired Controller for Xbox", MAP_SHARE_BUTTON, XTYPE_XBOXONE },
{ 0x20d6, 0x281f, "PowerA Wired Controller For Xbox 360", 0, XTYPE_XBOX360 },
{ 0x24c6, 0x5000, "Razer Atrox Arcade Stick", MAP_TRIGGERS_TO_BUTTONS, XTYPE_XBOX360 },
{ 0x24c6, 0x5300, "PowerA MINI PROEX Controller", 0, XTYPE_XBOX360 },
diff --git a/drivers/iommu/amd/io_pgtable_v2.c b/drivers/iommu/amd/io_pgtable_v2.c
index cbf0c4601512..6c0777a3c57b 100644
--- a/drivers/iommu/amd/io_pgtable_v2.c
+++ b/drivers/iommu/amd/io_pgtable_v2.c
@@ -259,7 +259,7 @@ static int iommu_v2_map_pages(struct io_pgtable_ops *ops, unsigned long iova,
pte = v2_alloc_pte(pdom->nid, pdom->iop.pgd,
iova, map_size, gfp, &updated);
if (!pte) {
- ret = -EINVAL;
+ ret = -ENOMEM;
goto out;
}
diff --git a/drivers/iommu/dma-iommu.c b/drivers/iommu/dma-iommu.c
index 2da969fc8990..3f7fcf1801a9 100644
--- a/drivers/iommu/dma-iommu.c
+++ b/drivers/iommu/dma-iommu.c
@@ -1716,7 +1716,7 @@ int iommu_dma_prepare_msi(struct msi_desc *desc, phys_addr_t msi_addr)
static DEFINE_MUTEX(msi_prepare_lock); /* see below */
if (!domain || !domain->iova_cookie) {
- desc->iommu_cookie = NULL;
+ msi_desc_set_iommu_msi_iova(desc, 0, 0);
return 0;
}
@@ -1728,11 +1728,12 @@ int iommu_dma_prepare_msi(struct msi_desc *desc, phys_addr_t msi_addr)
mutex_lock(&msi_prepare_lock);
msi_page = iommu_dma_get_msi_page(dev, msi_addr, domain);
mutex_unlock(&msi_prepare_lock);
-
- msi_desc_set_iommu_cookie(desc, msi_page);
-
if (!msi_page)
return -ENOMEM;
+
+ msi_desc_set_iommu_msi_iova(
+ desc, msi_page->iova,
+ ilog2(cookie_msi_granule(domain->iova_cookie)));
return 0;
}
@@ -1743,18 +1744,15 @@ int iommu_dma_prepare_msi(struct msi_desc *desc, phys_addr_t msi_addr)
*/
void iommu_dma_compose_msi_msg(struct msi_desc *desc, struct msi_msg *msg)
{
- struct device *dev = msi_desc_to_dev(desc);
- const struct iommu_domain *domain = iommu_get_domain_for_dev(dev);
- const struct iommu_dma_msi_page *msi_page;
+#ifdef CONFIG_IRQ_MSI_IOMMU
+ if (desc->iommu_msi_shift) {
+ u64 msi_iova = desc->iommu_msi_iova << desc->iommu_msi_shift;
- msi_page = msi_desc_get_iommu_cookie(desc);
-
- if (!domain || !domain->iova_cookie || WARN_ON(!msi_page))
- return;
-
- msg->address_hi = upper_32_bits(msi_page->iova);
- msg->address_lo &= cookie_msi_granule(domain->iova_cookie) - 1;
- msg->address_lo += lower_32_bits(msi_page->iova);
+ msg->address_hi = upper_32_bits(msi_iova);
+ msg->address_lo = lower_32_bits(msi_iova) |
+ (msg->address_lo & ((1 << desc->iommu_msi_shift) - 1));
+ }
+#endif
}
static int iommu_dma_init(void)
diff --git a/drivers/leds/rgb/leds-pwm-multicolor.c b/drivers/leds/rgb/leds-pwm-multicolor.c
index e1a81e0109e8..c0aa34b1d0e2 100644
--- a/drivers/leds/rgb/leds-pwm-multicolor.c
+++ b/drivers/leds/rgb/leds-pwm-multicolor.c
@@ -135,8 +135,11 @@ static int led_pwm_mc_probe(struct platform_device *pdev)
/* init the multicolor's LED class device */
cdev = &priv->mc_cdev.led_cdev;
- fwnode_property_read_u32(mcnode, "max-brightness",
+ ret = fwnode_property_read_u32(mcnode, "max-brightness",
&cdev->max_brightness);
+ if (ret)
+ goto release_mcnode;
+
cdev->flags = LED_CORE_SUSPENDRESUME;
cdev->brightness_set_blocking = led_pwm_mc_set;
diff --git a/drivers/leds/trigger/ledtrig-netdev.c b/drivers/leds/trigger/ledtrig-netdev.c
index 79719fc8a08f..f8912fa60c49 100644
--- a/drivers/leds/trigger/ledtrig-netdev.c
+++ b/drivers/leds/trigger/ledtrig-netdev.c
@@ -54,6 +54,7 @@ struct led_netdev_data {
unsigned int last_activity;
unsigned long mode;
+ unsigned long blink_delay;
int link_speed;
u8 duplex;
@@ -69,6 +70,10 @@ static void set_baseline_state(struct led_netdev_data *trigger_data)
/* Already validated, hw control is possible with the requested mode */
if (trigger_data->hw_control) {
led_cdev->hw_control_set(led_cdev, trigger_data->mode);
+ if (led_cdev->blink_set) {
+ led_cdev->blink_set(led_cdev, &trigger_data->blink_delay,
+ &trigger_data->blink_delay);
+ }
return;
}
@@ -386,10 +391,11 @@ static ssize_t interval_store(struct device *dev,
size_t size)
{
struct led_netdev_data *trigger_data = led_trigger_get_drvdata(dev);
+ struct led_classdev *led_cdev = trigger_data->led_cdev;
unsigned long value;
int ret;
- if (trigger_data->hw_control)
+ if (trigger_data->hw_control && !led_cdev->blink_set)
return -EINVAL;
ret = kstrtoul(buf, 0, &value);
@@ -398,9 +404,13 @@ static ssize_t interval_store(struct device *dev,
/* impose some basic bounds on the timer interval */
if (value >= 5 && value <= 10000) {
- cancel_delayed_work_sync(&trigger_data->work);
+ if (trigger_data->hw_control) {
+ trigger_data->blink_delay = value;
+ } else {
+ cancel_delayed_work_sync(&trigger_data->work);
- atomic_set(&trigger_data->interval, msecs_to_jiffies(value));
+ atomic_set(&trigger_data->interval, msecs_to_jiffies(value));
+ }
set_baseline_state(trigger_data); /* resets timer */
}
diff --git a/drivers/mailbox/mailbox.c b/drivers/mailbox/mailbox.c
index ebff3baf3045..f13d705f7861 100644
--- a/drivers/mailbox/mailbox.c
+++ b/drivers/mailbox/mailbox.c
@@ -415,11 +415,12 @@ struct mbox_chan *mbox_request_channel(struct mbox_client *cl, int index)
mutex_lock(&con_mutex);
- if (of_parse_phandle_with_args(dev->of_node, "mboxes",
- "#mbox-cells", index, &spec)) {
+ ret = of_parse_phandle_with_args(dev->of_node, "mboxes", "#mbox-cells",
+ index, &spec);
+ if (ret) {
dev_dbg(dev, "%s: can't parse \"mboxes\" property\n", __func__);
mutex_unlock(&con_mutex);
- return ERR_PTR(-ENODEV);
+ return ERR_PTR(ret);
}
chan = ERR_PTR(-EPROBE_DEFER);
diff --git a/drivers/mailbox/pcc.c b/drivers/mailbox/pcc.c
index f8215a8f656a..49254d99a8ad 100644
--- a/drivers/mailbox/pcc.c
+++ b/drivers/mailbox/pcc.c
@@ -419,8 +419,12 @@ int pcc_mbox_ioremap(struct mbox_chan *chan)
return -1;
pchan_info = chan->con_priv;
pcc_mbox_chan = &pchan_info->chan;
- pcc_mbox_chan->shmem = ioremap(pcc_mbox_chan->shmem_base_addr,
- pcc_mbox_chan->shmem_size);
+
+ pcc_mbox_chan->shmem = acpi_os_ioremap(pcc_mbox_chan->shmem_base_addr,
+ pcc_mbox_chan->shmem_size);
+ if (!pcc_mbox_chan->shmem)
+ return -ENXIO;
+
return 0;
}
EXPORT_SYMBOL_GPL(pcc_mbox_ioremap);
diff --git a/drivers/md/dm-cache-target.c b/drivers/md/dm-cache-target.c
index c5851c9f7ec0..0d002d50329d 100644
--- a/drivers/md/dm-cache-target.c
+++ b/drivers/md/dm-cache-target.c
@@ -2903,6 +2903,27 @@ static dm_cblock_t get_cache_dev_size(struct cache *cache)
return to_cblock(size);
}
+static bool can_resume(struct cache *cache)
+{
+ /*
+ * Disallow retrying the resume operation for devices that failed the
+ * first resume attempt, as the failure leaves the policy object partially
+ * initialized. Retrying could trigger BUG_ON when loading cache mappings
+ * into the incomplete policy object.
+ */
+ if (cache->sized && !cache->loaded_mappings) {
+ if (get_cache_mode(cache) != CM_WRITE)
+ DMERR("%s: unable to resume a failed-loaded cache, please check metadata.",
+ cache_device_name(cache));
+ else
+ DMERR("%s: unable to resume cache due to missing proper cache table reload",
+ cache_device_name(cache));
+ return false;
+ }
+
+ return true;
+}
+
static bool can_resize(struct cache *cache, dm_cblock_t new_size)
{
if (from_cblock(new_size) > from_cblock(cache->cache_size)) {
@@ -2951,6 +2972,9 @@ static int cache_preresume(struct dm_target *ti)
struct cache *cache = ti->private;
dm_cblock_t csize = get_cache_dev_size(cache);
+ if (!can_resume(cache))
+ return -EINVAL;
+
/*
* Check to see if the cache has resized.
*/
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index 7a33da2dd64b..bf2ade89c8c2 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -669,6 +669,10 @@ int dm_table_add_target(struct dm_table *t, const char *type,
DMERR("%s: zero-length target", dm_device_name(t->md));
return -EINVAL;
}
+ if (start + len < start || start + len > LLONG_MAX >> SECTOR_SHIFT) {
+ DMERR("%s: too large device", dm_device_name(t->md));
+ return -EINVAL;
+ }
ti->type = dm_get_target_type(type);
if (!ti->type) {
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 5dd0a42463a2..9ea868bd0d12 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -1536,14 +1536,18 @@ static void __send_empty_flush(struct clone_info *ci)
{
struct dm_table *t = ci->map;
struct bio flush_bio;
+ blk_opf_t opf = REQ_OP_WRITE | REQ_PREFLUSH | REQ_SYNC;
+
+ if ((ci->io->orig_bio->bi_opf & (REQ_IDLE | REQ_SYNC)) ==
+ (REQ_IDLE | REQ_SYNC))
+ opf |= REQ_IDLE;
/*
* Use an on-stack bio for this, it's safe since we don't
* need to reference it after submit. It's just used as
* the basis for the clone(s).
*/
- bio_init(&flush_bio, ci->io->md->disk->part0, NULL, 0,
- REQ_OP_WRITE | REQ_PREFLUSH | REQ_SYNC);
+ bio_init(&flush_bio, ci->io->md->disk->part0, NULL, 0, opf);
ci->bio = &flush_bio;
ci->sector_count = 0;
diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c
index 99ba925e8ec8..114ac0c263fb 100644
--- a/drivers/media/i2c/adv7180.c
+++ b/drivers/media/i2c/adv7180.c
@@ -194,6 +194,7 @@ struct adv7180_state;
#define ADV7180_FLAG_V2 BIT(1)
#define ADV7180_FLAG_MIPI_CSI2 BIT(2)
#define ADV7180_FLAG_I2P BIT(3)
+#define ADV7180_FLAG_TEST_PATTERN BIT(4)
struct adv7180_chip_info {
unsigned int flags;
@@ -673,11 +674,15 @@ static int adv7180_init_controls(struct adv7180_state *state)
ADV7180_HUE_MAX, 1, ADV7180_HUE_DEF);
v4l2_ctrl_new_custom(&state->ctrl_hdl, &adv7180_ctrl_fast_switch, NULL);
- v4l2_ctrl_new_std_menu_items(&state->ctrl_hdl, &adv7180_ctrl_ops,
- V4L2_CID_TEST_PATTERN,
- ARRAY_SIZE(test_pattern_menu) - 1,
- 0, ARRAY_SIZE(test_pattern_menu) - 1,
- test_pattern_menu);
+ if (state->chip_info->flags & ADV7180_FLAG_TEST_PATTERN) {
+ v4l2_ctrl_new_std_menu_items(&state->ctrl_hdl,
+ &adv7180_ctrl_ops,
+ V4L2_CID_TEST_PATTERN,
+ ARRAY_SIZE(test_pattern_menu) - 1,
+ 0,
+ ARRAY_SIZE(test_pattern_menu) - 1,
+ test_pattern_menu);
+ }
state->sd.ctrl_handler = &state->ctrl_hdl;
if (state->ctrl_hdl.error) {
@@ -1209,7 +1214,7 @@ static const struct adv7180_chip_info adv7182_info = {
};
static const struct adv7180_chip_info adv7280_info = {
- .flags = ADV7180_FLAG_V2 | ADV7180_FLAG_I2P,
+ .flags = ADV7180_FLAG_V2 | ADV7180_FLAG_I2P | ADV7180_FLAG_TEST_PATTERN,
.valid_input_mask = BIT(ADV7182_INPUT_CVBS_AIN1) |
BIT(ADV7182_INPUT_CVBS_AIN2) |
BIT(ADV7182_INPUT_CVBS_AIN3) |
@@ -1223,7 +1228,8 @@ static const struct adv7180_chip_info adv7280_info = {
};
static const struct adv7180_chip_info adv7280_m_info = {
- .flags = ADV7180_FLAG_V2 | ADV7180_FLAG_MIPI_CSI2 | ADV7180_FLAG_I2P,
+ .flags = ADV7180_FLAG_V2 | ADV7180_FLAG_MIPI_CSI2 | ADV7180_FLAG_I2P |
+ ADV7180_FLAG_TEST_PATTERN,
.valid_input_mask = BIT(ADV7182_INPUT_CVBS_AIN1) |
BIT(ADV7182_INPUT_CVBS_AIN2) |
BIT(ADV7182_INPUT_CVBS_AIN3) |
@@ -1244,7 +1250,8 @@ static const struct adv7180_chip_info adv7280_m_info = {
};
static const struct adv7180_chip_info adv7281_info = {
- .flags = ADV7180_FLAG_V2 | ADV7180_FLAG_MIPI_CSI2,
+ .flags = ADV7180_FLAG_V2 | ADV7180_FLAG_MIPI_CSI2 |
+ ADV7180_FLAG_TEST_PATTERN,
.valid_input_mask = BIT(ADV7182_INPUT_CVBS_AIN1) |
BIT(ADV7182_INPUT_CVBS_AIN2) |
BIT(ADV7182_INPUT_CVBS_AIN7) |
@@ -1259,7 +1266,8 @@ static const struct adv7180_chip_info adv7281_info = {
};
static const struct adv7180_chip_info adv7281_m_info = {
- .flags = ADV7180_FLAG_V2 | ADV7180_FLAG_MIPI_CSI2,
+ .flags = ADV7180_FLAG_V2 | ADV7180_FLAG_MIPI_CSI2 |
+ ADV7180_FLAG_TEST_PATTERN,
.valid_input_mask = BIT(ADV7182_INPUT_CVBS_AIN1) |
BIT(ADV7182_INPUT_CVBS_AIN2) |
BIT(ADV7182_INPUT_CVBS_AIN3) |
@@ -1279,7 +1287,8 @@ static const struct adv7180_chip_info adv7281_m_info = {
};
static const struct adv7180_chip_info adv7281_ma_info = {
- .flags = ADV7180_FLAG_V2 | ADV7180_FLAG_MIPI_CSI2,
+ .flags = ADV7180_FLAG_V2 | ADV7180_FLAG_MIPI_CSI2 |
+ ADV7180_FLAG_TEST_PATTERN,
.valid_input_mask = BIT(ADV7182_INPUT_CVBS_AIN1) |
BIT(ADV7182_INPUT_CVBS_AIN2) |
BIT(ADV7182_INPUT_CVBS_AIN3) |
@@ -1304,7 +1313,7 @@ static const struct adv7180_chip_info adv7281_ma_info = {
};
static const struct adv7180_chip_info adv7282_info = {
- .flags = ADV7180_FLAG_V2 | ADV7180_FLAG_I2P,
+ .flags = ADV7180_FLAG_V2 | ADV7180_FLAG_I2P | ADV7180_FLAG_TEST_PATTERN,
.valid_input_mask = BIT(ADV7182_INPUT_CVBS_AIN1) |
BIT(ADV7182_INPUT_CVBS_AIN2) |
BIT(ADV7182_INPUT_CVBS_AIN7) |
@@ -1319,7 +1328,8 @@ static const struct adv7180_chip_info adv7282_info = {
};
static const struct adv7180_chip_info adv7282_m_info = {
- .flags = ADV7180_FLAG_V2 | ADV7180_FLAG_MIPI_CSI2 | ADV7180_FLAG_I2P,
+ .flags = ADV7180_FLAG_V2 | ADV7180_FLAG_MIPI_CSI2 | ADV7180_FLAG_I2P |
+ ADV7180_FLAG_TEST_PATTERN,
.valid_input_mask = BIT(ADV7182_INPUT_CVBS_AIN1) |
BIT(ADV7182_INPUT_CVBS_AIN2) |
BIT(ADV7182_INPUT_CVBS_AIN3) |
diff --git a/drivers/media/i2c/imx219.c b/drivers/media/i2c/imx219.c
index a14e571dc62b..a3d5a8a7c660 100644
--- a/drivers/media/i2c/imx219.c
+++ b/drivers/media/i2c/imx219.c
@@ -77,7 +77,7 @@
#define IMX219_VTS_30FPS_640x480 0x06e3
#define IMX219_VTS_MAX 0xffff
-#define IMX219_VBLANK_MIN 4
+#define IMX219_VBLANK_MIN 32
/*Frame Length Line*/
#define IMX219_FLL_MIN 0x08a6
diff --git a/drivers/media/i2c/tc358746.c b/drivers/media/i2c/tc358746.c
index 566f5eaddd57..b12a6bd42102 100644
--- a/drivers/media/i2c/tc358746.c
+++ b/drivers/media/i2c/tc358746.c
@@ -460,24 +460,20 @@ static int tc358746_apply_misc_config(struct tc358746 *tc358746)
return err;
}
-/* Use MHz as base so the div needs no u64 */
-static u32 tc358746_cfg_to_cnt(unsigned int cfg_val,
- unsigned int clk_mhz,
- unsigned int time_base)
+static u32 tc358746_cfg_to_cnt(unsigned long cfg_val, unsigned long clk_hz,
+ unsigned long long time_base)
{
- return DIV_ROUND_UP(cfg_val * clk_mhz, time_base);
+ return div64_u64((u64)cfg_val * clk_hz + time_base - 1, time_base);
}
-static u32 tc358746_ps_to_cnt(unsigned int cfg_val,
- unsigned int clk_mhz)
+static u32 tc358746_ps_to_cnt(unsigned long cfg_val, unsigned long clk_hz)
{
- return tc358746_cfg_to_cnt(cfg_val, clk_mhz, USEC_PER_SEC);
+ return tc358746_cfg_to_cnt(cfg_val, clk_hz, PSEC_PER_SEC);
}
-static u32 tc358746_us_to_cnt(unsigned int cfg_val,
- unsigned int clk_mhz)
+static u32 tc358746_us_to_cnt(unsigned long cfg_val, unsigned long clk_hz)
{
- return tc358746_cfg_to_cnt(cfg_val, clk_mhz, 1);
+ return tc358746_cfg_to_cnt(cfg_val, clk_hz, USEC_PER_SEC);
}
static int tc358746_apply_dphy_config(struct tc358746 *tc358746)
@@ -492,7 +488,6 @@ static int tc358746_apply_dphy_config(struct tc358746 *tc358746)
/* The hs_byte_clk is also called SYSCLK in the excel sheet */
hs_byte_clk = cfg->hs_clk_rate / 8;
- hs_byte_clk /= HZ_PER_MHZ;
hf_clk = hs_byte_clk / 2;
val = tc358746_us_to_cnt(cfg->init, hf_clk) - 1;
diff --git a/drivers/media/platform/qcom/camss/camss-csid.c b/drivers/media/platform/qcom/camss/camss-csid.c
index 6360314f04a6..b90e2e690f3a 100644
--- a/drivers/media/platform/qcom/camss/camss-csid.c
+++ b/drivers/media/platform/qcom/camss/camss-csid.c
@@ -239,11 +239,13 @@ static int csid_set_stream(struct v4l2_subdev *sd, int enable)
int ret;
if (enable) {
- ret = v4l2_ctrl_handler_setup(&csid->ctrls);
- if (ret < 0) {
- dev_err(csid->camss->dev,
- "could not sync v4l2 controls: %d\n", ret);
- return ret;
+ if (csid->testgen.nmodes != CSID_PAYLOAD_MODE_DISABLED) {
+ ret = v4l2_ctrl_handler_setup(&csid->ctrls);
+ if (ret < 0) {
+ dev_err(csid->camss->dev,
+ "could not sync v4l2 controls: %d\n", ret);
+ return ret;
+ }
}
if (!csid->testgen.enabled &&
@@ -318,7 +320,8 @@ static void csid_try_format(struct csid_device *csid,
break;
case MSM_CSID_PAD_SRC:
- if (csid->testgen_mode->cur.val == 0) {
+ if (csid->testgen.nmodes == CSID_PAYLOAD_MODE_DISABLED ||
+ csid->testgen_mode->cur.val == 0) {
/* Test generator is disabled, */
/* keep pad formats in sync */
u32 code = fmt->code;
@@ -368,7 +371,8 @@ static int csid_enum_mbus_code(struct v4l2_subdev *sd,
code->code = csid->formats[code->index].code;
} else {
- if (csid->testgen_mode->cur.val == 0) {
+ if (csid->testgen.nmodes == CSID_PAYLOAD_MODE_DISABLED ||
+ csid->testgen_mode->cur.val == 0) {
struct v4l2_mbus_framefmt *sink_fmt;
sink_fmt = __csid_get_format(csid, sd_state,
@@ -750,7 +754,8 @@ static int csid_link_setup(struct media_entity *entity,
/* If test generator is enabled */
/* do not allow a link from CSIPHY to CSID */
- if (csid->testgen_mode->cur.val != 0)
+ if (csid->testgen.nmodes != CSID_PAYLOAD_MODE_DISABLED &&
+ csid->testgen_mode->cur.val != 0)
return -EBUSY;
sd = media_entity_to_v4l2_subdev(remote->entity);
@@ -843,24 +848,27 @@ int msm_csid_register_entity(struct csid_device *csid,
MSM_CSID_NAME, csid->id);
v4l2_set_subdevdata(sd, csid);
- ret = v4l2_ctrl_handler_init(&csid->ctrls, 1);
- if (ret < 0) {
- dev_err(dev, "Failed to init ctrl handler: %d\n", ret);
- return ret;
- }
+ if (csid->testgen.nmodes != CSID_PAYLOAD_MODE_DISABLED) {
+ ret = v4l2_ctrl_handler_init(&csid->ctrls, 1);
+ if (ret < 0) {
+ dev_err(dev, "Failed to init ctrl handler: %d\n", ret);
+ return ret;
+ }
- csid->testgen_mode = v4l2_ctrl_new_std_menu_items(&csid->ctrls,
- &csid_ctrl_ops, V4L2_CID_TEST_PATTERN,
- csid->testgen.nmodes, 0, 0,
- csid->testgen.modes);
+ csid->testgen_mode =
+ v4l2_ctrl_new_std_menu_items(&csid->ctrls,
+ &csid_ctrl_ops, V4L2_CID_TEST_PATTERN,
+ csid->testgen.nmodes, 0, 0,
+ csid->testgen.modes);
- if (csid->ctrls.error) {
- dev_err(dev, "Failed to init ctrl: %d\n", csid->ctrls.error);
- ret = csid->ctrls.error;
- goto free_ctrl;
- }
+ if (csid->ctrls.error) {
+ dev_err(dev, "Failed to init ctrl: %d\n", csid->ctrls.error);
+ ret = csid->ctrls.error;
+ goto free_ctrl;
+ }
- csid->subdev.ctrl_handler = &csid->ctrls;
+ csid->subdev.ctrl_handler = &csid->ctrls;
+ }
ret = csid_init_formats(sd, NULL);
if (ret < 0) {
@@ -891,7 +899,8 @@ int msm_csid_register_entity(struct csid_device *csid,
media_cleanup:
media_entity_cleanup(&sd->entity);
free_ctrl:
- v4l2_ctrl_handler_free(&csid->ctrls);
+ if (csid->testgen.nmodes != CSID_PAYLOAD_MODE_DISABLED)
+ v4l2_ctrl_handler_free(&csid->ctrls);
return ret;
}
@@ -904,5 +913,6 @@ void msm_csid_unregister_entity(struct csid_device *csid)
{
v4l2_device_unregister_subdev(&csid->subdev);
media_entity_cleanup(&csid->subdev.entity);
- v4l2_ctrl_handler_free(&csid->ctrls);
+ if (csid->testgen.nmodes != CSID_PAYLOAD_MODE_DISABLED)
+ v4l2_ctrl_handler_free(&csid->ctrls);
}
diff --git a/drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.c b/drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.c
index 5dc1f908b49b..9aa484126a0d 100644
--- a/drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.c
+++ b/drivers/media/platform/st/sti/c8sectpfe/c8sectpfe-core.c
@@ -806,13 +806,12 @@ static int c8sectpfe_probe(struct platform_device *pdev)
}
tsin->i2c_adapter =
of_find_i2c_adapter_by_node(i2c_bus);
+ of_node_put(i2c_bus);
if (!tsin->i2c_adapter) {
dev_err(&pdev->dev, "No i2c adapter found\n");
- of_node_put(i2c_bus);
ret = -ENODEV;
goto err_node_put;
}
- of_node_put(i2c_bus);
/* Acquire reset GPIO and activate it */
tsin->rst_gpio = devm_fwnode_gpiod_get(dev,
diff --git a/drivers/media/test-drivers/vivid/vivid-kthread-cap.c b/drivers/media/test-drivers/vivid/vivid-kthread-cap.c
index 42048727d7ff..b8cdffc9a1e9 100644
--- a/drivers/media/test-drivers/vivid/vivid-kthread-cap.c
+++ b/drivers/media/test-drivers/vivid/vivid-kthread-cap.c
@@ -765,9 +765,14 @@ static int vivid_thread_vid_cap(void *data)
next_jiffies_since_start = jiffies_since_start;
wait_jiffies = next_jiffies_since_start - jiffies_since_start;
- while (time_is_after_jiffies(cur_jiffies + wait_jiffies) &&
- !kthread_should_stop())
- schedule();
+ if (!time_is_after_jiffies(cur_jiffies + wait_jiffies))
+ continue;
+
+ wait_queue_head_t wait;
+
+ init_waitqueue_head(&wait);
+ wait_event_interruptible_timeout(wait, kthread_should_stop(),
+ cur_jiffies + wait_jiffies - jiffies);
}
dprintk(dev, 1, "Video Capture Thread End\n");
return 0;
diff --git a/drivers/media/test-drivers/vivid/vivid-kthread-out.c b/drivers/media/test-drivers/vivid/vivid-kthread-out.c
index fac6208b51da..015a7b166a1e 100644
--- a/drivers/media/test-drivers/vivid/vivid-kthread-out.c
+++ b/drivers/media/test-drivers/vivid/vivid-kthread-out.c
@@ -235,9 +235,14 @@ static int vivid_thread_vid_out(void *data)
next_jiffies_since_start = jiffies_since_start;
wait_jiffies = next_jiffies_since_start - jiffies_since_start;
- while (time_is_after_jiffies(cur_jiffies + wait_jiffies) &&
- !kthread_should_stop())
- schedule();
+ if (!time_is_after_jiffies(cur_jiffies + wait_jiffies))
+ continue;
+
+ wait_queue_head_t wait;
+
+ init_waitqueue_head(&wait);
+ wait_event_interruptible_timeout(wait, kthread_should_stop(),
+ cur_jiffies + wait_jiffies - jiffies);
}
dprintk(dev, 1, "Video Output Thread End\n");
return 0;
diff --git a/drivers/media/test-drivers/vivid/vivid-kthread-touch.c b/drivers/media/test-drivers/vivid/vivid-kthread-touch.c
index fa711ee36a3f..c862689786b6 100644
--- a/drivers/media/test-drivers/vivid/vivid-kthread-touch.c
+++ b/drivers/media/test-drivers/vivid/vivid-kthread-touch.c
@@ -135,9 +135,14 @@ static int vivid_thread_touch_cap(void *data)
next_jiffies_since_start = jiffies_since_start;
wait_jiffies = next_jiffies_since_start - jiffies_since_start;
- while (time_is_after_jiffies(cur_jiffies + wait_jiffies) &&
- !kthread_should_stop())
- schedule();
+ if (!time_is_after_jiffies(cur_jiffies + wait_jiffies))
+ continue;
+
+ wait_queue_head_t wait;
+
+ init_waitqueue_head(&wait);
+ wait_event_interruptible_timeout(wait, kthread_should_stop(),
+ cur_jiffies + wait_jiffies - jiffies);
}
dprintk(dev, 1, "Touch Capture Thread End\n");
return 0;
diff --git a/drivers/media/test-drivers/vivid/vivid-sdr-cap.c b/drivers/media/test-drivers/vivid/vivid-sdr-cap.c
index a81f26b76988..1dd59c710dae 100644
--- a/drivers/media/test-drivers/vivid/vivid-sdr-cap.c
+++ b/drivers/media/test-drivers/vivid/vivid-sdr-cap.c
@@ -206,9 +206,14 @@ static int vivid_thread_sdr_cap(void *data)
next_jiffies_since_start = jiffies_since_start;
wait_jiffies = next_jiffies_since_start - jiffies_since_start;
- while (time_is_after_jiffies(cur_jiffies + wait_jiffies) &&
- !kthread_should_stop())
- schedule();
+ if (!time_is_after_jiffies(cur_jiffies + wait_jiffies))
+ continue;
+
+ wait_queue_head_t wait;
+
+ init_waitqueue_head(&wait);
+ wait_event_interruptible_timeout(wait, kthread_should_stop(),
+ cur_jiffies + wait_jiffies - jiffies);
}
dprintk(dev, 1, "SDR Capture Thread End\n");
return 0;
diff --git a/drivers/media/usb/cx231xx/cx231xx-417.c b/drivers/media/usb/cx231xx/cx231xx-417.c
index c5e21785fafe..02343e88cc61 100644
--- a/drivers/media/usb/cx231xx/cx231xx-417.c
+++ b/drivers/media/usb/cx231xx/cx231xx-417.c
@@ -1722,6 +1722,8 @@ static void cx231xx_video_dev_init(
vfd->lock = &dev->lock;
vfd->release = video_device_release_empty;
vfd->ctrl_handler = &dev->mpeg_ctrl_handler.hdl;
+ vfd->device_caps = V4L2_CAP_READWRITE | V4L2_CAP_STREAMING |
+ V4L2_CAP_VIDEO_CAPTURE;
video_set_drvdata(vfd, dev);
if (dev->tuner_type == TUNER_ABSENT) {
v4l2_disable_ioctl(vfd, VIDIOC_G_FREQUENCY);
diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c
index 028c4a5049af..5926a9dfb0b1 100644
--- a/drivers/media/usb/uvc/uvc_ctrl.c
+++ b/drivers/media/usb/uvc/uvc_ctrl.c
@@ -815,6 +815,25 @@ static inline void uvc_clear_bit(u8 *data, int bit)
data[bit >> 3] &= ~(1 << (bit & 7));
}
+static s32 uvc_menu_to_v4l2_menu(struct uvc_control_mapping *mapping, s32 val)
+{
+ unsigned int i;
+
+ for (i = 0; BIT(i) <= mapping->menu_mask; ++i) {
+ u32 menu_value;
+
+ if (!test_bit(i, &mapping->menu_mask))
+ continue;
+
+ menu_value = uvc_mapping_get_menu_value(mapping, i);
+
+ if (menu_value == val)
+ return i;
+ }
+
+ return val;
+}
+
/*
* Extract the bit string specified by mapping->offset and mapping->size
* from the little-endian data stored at 'data' and return the result as
@@ -849,6 +868,16 @@ static s32 uvc_get_le_value(struct uvc_control_mapping *mapping,
if (mapping->data_type == UVC_CTRL_DATA_TYPE_SIGNED)
value |= -(value & (1 << (mapping->size - 1)));
+ /* If it is a menu, convert from uvc to v4l2. */
+ if (mapping->v4l2_type != V4L2_CTRL_TYPE_MENU)
+ return value;
+
+ switch (query) {
+ case UVC_GET_CUR:
+ case UVC_GET_DEF:
+ return uvc_menu_to_v4l2_menu(mapping, value);
+ }
+
return value;
}
@@ -1013,32 +1042,6 @@ static int uvc_ctrl_populate_cache(struct uvc_video_chain *chain,
return 0;
}
-static s32 __uvc_ctrl_get_value(struct uvc_control_mapping *mapping,
- const u8 *data)
-{
- s32 value = mapping->get(mapping, UVC_GET_CUR, data);
-
- if (mapping->v4l2_type == V4L2_CTRL_TYPE_MENU) {
- unsigned int i;
-
- for (i = 0; BIT(i) <= mapping->menu_mask; ++i) {
- u32 menu_value;
-
- if (!test_bit(i, &mapping->menu_mask))
- continue;
-
- menu_value = uvc_mapping_get_menu_value(mapping, i);
-
- if (menu_value == value) {
- value = i;
- break;
- }
- }
- }
-
- return value;
-}
-
static int __uvc_ctrl_load_cur(struct uvc_video_chain *chain,
struct uvc_control *ctrl)
{
@@ -1089,8 +1092,8 @@ static int __uvc_ctrl_get(struct uvc_video_chain *chain,
if (ret < 0)
return ret;
- *value = __uvc_ctrl_get_value(mapping,
- uvc_ctrl_data(ctrl, UVC_CTRL_DATA_CURRENT));
+ *value = mapping->get(mapping, UVC_GET_CUR,
+ uvc_ctrl_data(ctrl, UVC_CTRL_DATA_CURRENT));
return 0;
}
@@ -1240,7 +1243,6 @@ static int __uvc_query_v4l2_ctrl(struct uvc_video_chain *chain,
{
struct uvc_control_mapping *master_map = NULL;
struct uvc_control *master_ctrl = NULL;
- unsigned int i;
memset(v4l2_ctrl, 0, sizeof(*v4l2_ctrl));
v4l2_ctrl->id = mapping->id;
@@ -1283,21 +1285,6 @@ static int __uvc_query_v4l2_ctrl(struct uvc_video_chain *chain,
v4l2_ctrl->minimum = ffs(mapping->menu_mask) - 1;
v4l2_ctrl->maximum = fls(mapping->menu_mask) - 1;
v4l2_ctrl->step = 1;
-
- for (i = 0; BIT(i) <= mapping->menu_mask; ++i) {
- u32 menu_value;
-
- if (!test_bit(i, &mapping->menu_mask))
- continue;
-
- menu_value = uvc_mapping_get_menu_value(mapping, i);
-
- if (menu_value == v4l2_ctrl->default_value) {
- v4l2_ctrl->default_value = i;
- break;
- }
- }
-
return 0;
case V4L2_CTRL_TYPE_BOOLEAN:
@@ -1580,7 +1567,7 @@ void uvc_ctrl_status_event(struct uvc_video_chain *chain,
uvc_ctrl_set_handle(handle, ctrl, NULL);
list_for_each_entry(mapping, &ctrl->info.mappings, list) {
- s32 value = __uvc_ctrl_get_value(mapping, data);
+ s32 value = mapping->get(mapping, UVC_GET_CUR, data);
/*
* handle may be NULL here if the device sends auto-update
diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c
index 7bcd706281da..cb7d9fb589fc 100644
--- a/drivers/media/usb/uvc/uvc_v4l2.c
+++ b/drivers/media/usb/uvc/uvc_v4l2.c
@@ -106,6 +106,12 @@ static int uvc_ioctl_xu_ctrl_map(struct uvc_video_chain *chain,
struct uvc_control_mapping *map;
int ret;
+ if (xmap->data_type > UVC_CTRL_DATA_TYPE_BITMASK) {
+ uvc_dbg(chain->dev, CONTROL,
+ "Unsupported UVC data type %u\n", xmap->data_type);
+ return -EINVAL;
+ }
+
map = kzalloc(sizeof(*map), GFP_KERNEL);
if (map == NULL)
return -ENOMEM;
diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c
index 5f115438d072..cb3ad72a3e54 100644
--- a/drivers/media/v4l2-core/v4l2-subdev.c
+++ b/drivers/media/v4l2-core/v4l2-subdev.c
@@ -351,6 +351,8 @@ static int call_enum_dv_timings(struct v4l2_subdev *sd,
static int call_get_mbus_config(struct v4l2_subdev *sd, unsigned int pad,
struct v4l2_mbus_config *config)
{
+ memset(config, 0, sizeof(*config));
+
return check_pad(sd, pad) ? :
sd->ops->pad->get_mbus_config(sd, pad, config);
}
diff --git a/drivers/mfd/tps65219.c b/drivers/mfd/tps65219.c
index 0e0c42e4fdfc..72a5f51fe32a 100644
--- a/drivers/mfd/tps65219.c
+++ b/drivers/mfd/tps65219.c
@@ -228,7 +228,6 @@ static struct regmap_irq_chip tps65219_irq_chip = {
static int tps65219_probe(struct i2c_client *client)
{
struct tps65219 *tps;
- unsigned int chipid;
bool pwr_button;
int ret;
@@ -253,12 +252,6 @@ static int tps65219_probe(struct i2c_client *client)
if (ret)
return ret;
- ret = regmap_read(tps->regmap, TPS65219_REG_TI_DEV_ID, &chipid);
- if (ret) {
- dev_err(tps->dev, "Failed to read device ID: %d\n", ret);
- return ret;
- }
-
ret = devm_mfd_add_devices(tps->dev, PLATFORM_DEVID_AUTO,
tps65219_cells, ARRAY_SIZE(tps65219_cells),
NULL, 0, regmap_irq_get_domain(tps->irq_data));
diff --git a/drivers/mmc/host/dw_mmc-exynos.c b/drivers/mmc/host/dw_mmc-exynos.c
index 698408e8bad0..381a61adf06e 100644
--- a/drivers/mmc/host/dw_mmc-exynos.c
+++ b/drivers/mmc/host/dw_mmc-exynos.c
@@ -28,6 +28,8 @@ enum dw_mci_exynos_type {
DW_MCI_TYPE_EXYNOS5420_SMU,
DW_MCI_TYPE_EXYNOS7,
DW_MCI_TYPE_EXYNOS7_SMU,
+ DW_MCI_TYPE_EXYNOS7870,
+ DW_MCI_TYPE_EXYNOS7870_SMU,
DW_MCI_TYPE_ARTPEC8,
};
@@ -70,6 +72,12 @@ static struct dw_mci_exynos_compatible {
}, {
.compatible = "samsung,exynos7-dw-mshc-smu",
.ctrl_type = DW_MCI_TYPE_EXYNOS7_SMU,
+ }, {
+ .compatible = "samsung,exynos7870-dw-mshc",
+ .ctrl_type = DW_MCI_TYPE_EXYNOS7870,
+ }, {
+ .compatible = "samsung,exynos7870-dw-mshc-smu",
+ .ctrl_type = DW_MCI_TYPE_EXYNOS7870_SMU,
}, {
.compatible = "axis,artpec8-dw-mshc",
.ctrl_type = DW_MCI_TYPE_ARTPEC8,
@@ -86,6 +94,8 @@ static inline u8 dw_mci_exynos_get_ciu_div(struct dw_mci *host)
return EXYNOS4210_FIXED_CIU_CLK_DIV;
else if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS7 ||
priv->ctrl_type == DW_MCI_TYPE_EXYNOS7_SMU ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870 ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870_SMU ||
priv->ctrl_type == DW_MCI_TYPE_ARTPEC8)
return SDMMC_CLKSEL_GET_DIV(mci_readl(host, CLKSEL64)) + 1;
else
@@ -101,7 +111,8 @@ static void dw_mci_exynos_config_smu(struct dw_mci *host)
* set for non-ecryption mode at this time.
*/
if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS5420_SMU ||
- priv->ctrl_type == DW_MCI_TYPE_EXYNOS7_SMU) {
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7_SMU ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870_SMU) {
mci_writel(host, MPSBEGIN0, 0);
mci_writel(host, MPSEND0, SDMMC_ENDING_SEC_NR_MAX);
mci_writel(host, MPSCTRL0, SDMMC_MPSCTRL_SECURE_WRITE_BIT |
@@ -127,6 +138,12 @@ static int dw_mci_exynos_priv_init(struct dw_mci *host)
DQS_CTRL_GET_RD_DELAY(priv->saved_strobe_ctrl);
}
+ if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870 ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870_SMU) {
+ /* Quirk needed for certain Exynos SoCs */
+ host->quirks |= DW_MMC_QUIRK_FIFO64_32;
+ }
+
if (priv->ctrl_type == DW_MCI_TYPE_ARTPEC8) {
/* Quirk needed for the ARTPEC-8 SoC */
host->quirks |= DW_MMC_QUIRK_EXTENDED_TMOUT;
@@ -144,6 +161,8 @@ static void dw_mci_exynos_set_clksel_timing(struct dw_mci *host, u32 timing)
if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS7 ||
priv->ctrl_type == DW_MCI_TYPE_EXYNOS7_SMU ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870 ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870_SMU ||
priv->ctrl_type == DW_MCI_TYPE_ARTPEC8)
clksel = mci_readl(host, CLKSEL64);
else
@@ -153,6 +172,8 @@ static void dw_mci_exynos_set_clksel_timing(struct dw_mci *host, u32 timing)
if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS7 ||
priv->ctrl_type == DW_MCI_TYPE_EXYNOS7_SMU ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870 ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870_SMU ||
priv->ctrl_type == DW_MCI_TYPE_ARTPEC8)
mci_writel(host, CLKSEL64, clksel);
else
@@ -223,6 +244,8 @@ static int dw_mci_exynos_resume_noirq(struct device *dev)
if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS7 ||
priv->ctrl_type == DW_MCI_TYPE_EXYNOS7_SMU ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870 ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870_SMU ||
priv->ctrl_type == DW_MCI_TYPE_ARTPEC8)
clksel = mci_readl(host, CLKSEL64);
else
@@ -231,6 +254,8 @@ static int dw_mci_exynos_resume_noirq(struct device *dev)
if (clksel & SDMMC_CLKSEL_WAKEUP_INT) {
if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS7 ||
priv->ctrl_type == DW_MCI_TYPE_EXYNOS7_SMU ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870 ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870_SMU ||
priv->ctrl_type == DW_MCI_TYPE_ARTPEC8)
mci_writel(host, CLKSEL64, clksel);
else
@@ -410,6 +435,8 @@ static inline u8 dw_mci_exynos_get_clksmpl(struct dw_mci *host)
if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS7 ||
priv->ctrl_type == DW_MCI_TYPE_EXYNOS7_SMU ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870 ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870_SMU ||
priv->ctrl_type == DW_MCI_TYPE_ARTPEC8)
return SDMMC_CLKSEL_CCLK_SAMPLE(mci_readl(host, CLKSEL64));
else
@@ -423,6 +450,8 @@ static inline void dw_mci_exynos_set_clksmpl(struct dw_mci *host, u8 sample)
if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS7 ||
priv->ctrl_type == DW_MCI_TYPE_EXYNOS7_SMU ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870 ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870_SMU ||
priv->ctrl_type == DW_MCI_TYPE_ARTPEC8)
clksel = mci_readl(host, CLKSEL64);
else
@@ -430,6 +459,8 @@ static inline void dw_mci_exynos_set_clksmpl(struct dw_mci *host, u8 sample)
clksel = SDMMC_CLKSEL_UP_SAMPLE(clksel, sample);
if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS7 ||
priv->ctrl_type == DW_MCI_TYPE_EXYNOS7_SMU ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870 ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870_SMU ||
priv->ctrl_type == DW_MCI_TYPE_ARTPEC8)
mci_writel(host, CLKSEL64, clksel);
else
@@ -444,6 +475,8 @@ static inline u8 dw_mci_exynos_move_next_clksmpl(struct dw_mci *host)
if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS7 ||
priv->ctrl_type == DW_MCI_TYPE_EXYNOS7_SMU ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870 ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870_SMU ||
priv->ctrl_type == DW_MCI_TYPE_ARTPEC8)
clksel = mci_readl(host, CLKSEL64);
else
@@ -454,6 +487,8 @@ static inline u8 dw_mci_exynos_move_next_clksmpl(struct dw_mci *host)
if (priv->ctrl_type == DW_MCI_TYPE_EXYNOS7 ||
priv->ctrl_type == DW_MCI_TYPE_EXYNOS7_SMU ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870 ||
+ priv->ctrl_type == DW_MCI_TYPE_EXYNOS7870_SMU ||
priv->ctrl_type == DW_MCI_TYPE_ARTPEC8)
mci_writel(host, CLKSEL64, clksel);
else
@@ -633,6 +668,10 @@ static const struct of_device_id dw_mci_exynos_match[] = {
.data = &exynos_drv_data, },
{ .compatible = "samsung,exynos7-dw-mshc-smu",
.data = &exynos_drv_data, },
+ { .compatible = "samsung,exynos7870-dw-mshc",
+ .data = &exynos_drv_data, },
+ { .compatible = "samsung,exynos7870-dw-mshc-smu",
+ .data = &exynos_drv_data, },
{ .compatible = "axis,artpec8-dw-mshc",
.data = &artpec_drv_data, },
{},
diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
index 6b351810a301..dbfe0a5324ea 100644
--- a/drivers/mmc/host/sdhci-pci-core.c
+++ b/drivers/mmc/host/sdhci-pci-core.c
@@ -608,8 +608,12 @@ static void sdhci_intel_set_power(struct sdhci_host *host, unsigned char mode,
sdhci_set_power(host, mode, vdd);
- if (mode == MMC_POWER_OFF)
+ if (mode == MMC_POWER_OFF) {
+ if (slot->chip->pdev->device == PCI_DEVICE_ID_INTEL_APL_SD ||
+ slot->chip->pdev->device == PCI_DEVICE_ID_INTEL_BYT_SD)
+ usleep_range(15000, 17500);
return;
+ }
/*
* Bus power might not enable after D3 -> D0 transition due to the
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 9796a3cb3ca6..f32429ff905f 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2035,10 +2035,15 @@ void sdhci_set_clock(struct sdhci_host *host, unsigned int clock)
host->mmc->actual_clock = 0;
- sdhci_writew(host, 0, SDHCI_CLOCK_CONTROL);
+ clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL);
+ if (clk & SDHCI_CLOCK_CARD_EN)
+ sdhci_writew(host, clk & ~SDHCI_CLOCK_CARD_EN,
+ SDHCI_CLOCK_CONTROL);
- if (clock == 0)
+ if (clock == 0) {
+ sdhci_writew(host, 0, SDHCI_CLOCK_CONTROL);
return;
+ }
clk = sdhci_calc_clk(host, clock, &host->mmc->actual_clock);
sdhci_enable_clk(host, clk);
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 7eb62fe55947..56c241246d1a 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -2469,7 +2469,7 @@ static int __bond_release_one(struct net_device *bond_dev,
RCU_INIT_POINTER(bond->current_arp_slave, NULL);
- if (!all && (!bond->params.fail_over_mac ||
+ if (!all && (bond->params.fail_over_mac != BOND_FOM_ACTIVE ||
BOND_MODE(bond) != BOND_MODE_ACTIVEBACKUP)) {
if (ether_addr_equal_64bits(bond_dev->dev_addr, slave->perm_hwaddr) &&
bond_has_slaves(bond))
diff --git a/drivers/net/can/c_can/c_can_platform.c b/drivers/net/can/c_can/c_can_platform.c
index 7f405bcf11c2..603680792f1f 100644
--- a/drivers/net/can/c_can/c_can_platform.c
+++ b/drivers/net/can/c_can/c_can_platform.c
@@ -333,7 +333,7 @@ static int c_can_plat_probe(struct platform_device *pdev)
/* Check if we need custom RAMINIT via syscon. Mostly for TI
* platforms. Only supported with DT boot.
*/
- if (np && of_property_read_bool(np, "syscon-raminit")) {
+ if (np && of_property_present(np, "syscon-raminit")) {
u32 id;
struct c_can_raminit *raminit = &priv->raminit_sys;
diff --git a/drivers/net/can/kvaser_pciefd.c b/drivers/net/can/kvaser_pciefd.c
index c490b4ba065b..73b448cd00f2 100644
--- a/drivers/net/can/kvaser_pciefd.c
+++ b/drivers/net/can/kvaser_pciefd.c
@@ -1137,7 +1137,7 @@ static int kvaser_pciefd_handle_data_packet(struct kvaser_pciefd *pcie,
skb = alloc_canfd_skb(priv->dev, &cf);
if (!skb) {
priv->dev->stats.rx_dropped++;
- return -ENOMEM;
+ return 0;
}
cf->len = can_fd_dlc2len(dlc);
@@ -1149,7 +1149,7 @@ static int kvaser_pciefd_handle_data_packet(struct kvaser_pciefd *pcie,
skb = alloc_can_skb(priv->dev, (struct can_frame **)&cf);
if (!skb) {
priv->dev->stats.rx_dropped++;
- return -ENOMEM;
+ return 0;
}
can_frame_set_cc_len((struct can_frame *)cf, dlc, priv->ctrlmode);
}
@@ -1167,7 +1167,9 @@ static int kvaser_pciefd_handle_data_packet(struct kvaser_pciefd *pcie,
priv->dev->stats.rx_packets++;
kvaser_pciefd_set_skb_timestamp(pcie, skb, p->timestamp);
- return netif_rx(skb);
+ netif_rx(skb);
+
+ return 0;
}
static void kvaser_pciefd_change_state(struct kvaser_pciefd_can *can,
@@ -1580,24 +1582,28 @@ static int kvaser_pciefd_read_buffer(struct kvaser_pciefd *pcie, int dma_buf)
return res;
}
-static u32 kvaser_pciefd_receive_irq(struct kvaser_pciefd *pcie)
+static void kvaser_pciefd_receive_irq(struct kvaser_pciefd *pcie)
{
+ void __iomem *srb_cmd_reg = KVASER_PCIEFD_SRB_ADDR(pcie) + KVASER_PCIEFD_SRB_CMD_REG;
u32 irq = ioread32(KVASER_PCIEFD_SRB_ADDR(pcie) + KVASER_PCIEFD_SRB_IRQ_REG);
- if (irq & KVASER_PCIEFD_SRB_IRQ_DPD0)
+ iowrite32(irq, KVASER_PCIEFD_SRB_ADDR(pcie) + KVASER_PCIEFD_SRB_IRQ_REG);
+
+ if (irq & KVASER_PCIEFD_SRB_IRQ_DPD0) {
kvaser_pciefd_read_buffer(pcie, 0);
+ iowrite32(KVASER_PCIEFD_SRB_CMD_RDB0, srb_cmd_reg); /* Rearm buffer */
+ }
- if (irq & KVASER_PCIEFD_SRB_IRQ_DPD1)
+ if (irq & KVASER_PCIEFD_SRB_IRQ_DPD1) {
kvaser_pciefd_read_buffer(pcie, 1);
+ iowrite32(KVASER_PCIEFD_SRB_CMD_RDB1, srb_cmd_reg); /* Rearm buffer */
+ }
if (irq & KVASER_PCIEFD_SRB_IRQ_DOF0 ||
irq & KVASER_PCIEFD_SRB_IRQ_DOF1 ||
irq & KVASER_PCIEFD_SRB_IRQ_DUF0 ||
irq & KVASER_PCIEFD_SRB_IRQ_DUF1)
dev_err(&pcie->pci->dev, "DMA IRQ error 0x%08X\n", irq);
-
- iowrite32(irq, KVASER_PCIEFD_SRB_ADDR(pcie) + KVASER_PCIEFD_SRB_IRQ_REG);
- return irq;
}
static void kvaser_pciefd_transmit_irq(struct kvaser_pciefd_can *can)
@@ -1625,29 +1631,22 @@ static irqreturn_t kvaser_pciefd_irq_handler(int irq, void *dev)
struct kvaser_pciefd *pcie = (struct kvaser_pciefd *)dev;
const struct kvaser_pciefd_irq_mask *irq_mask = pcie->driver_data->irq_mask;
u32 pci_irq = ioread32(KVASER_PCIEFD_PCI_IRQ_ADDR(pcie));
- u32 srb_irq = 0;
- u32 srb_release = 0;
int i;
if (!(pci_irq & irq_mask->all))
return IRQ_NONE;
+ iowrite32(0, KVASER_PCIEFD_PCI_IEN_ADDR(pcie));
+
if (pci_irq & irq_mask->kcan_rx0)
- srb_irq = kvaser_pciefd_receive_irq(pcie);
+ kvaser_pciefd_receive_irq(pcie);
for (i = 0; i < pcie->nr_channels; i++) {
if (pci_irq & irq_mask->kcan_tx[i])
kvaser_pciefd_transmit_irq(pcie->can[i]);
}
- if (srb_irq & KVASER_PCIEFD_SRB_IRQ_DPD0)
- srb_release |= KVASER_PCIEFD_SRB_CMD_RDB0;
-
- if (srb_irq & KVASER_PCIEFD_SRB_IRQ_DPD1)
- srb_release |= KVASER_PCIEFD_SRB_CMD_RDB1;
-
- if (srb_release)
- iowrite32(srb_release, KVASER_PCIEFD_SRB_ADDR(pcie) + KVASER_PCIEFD_SRB_CMD_REG);
+ iowrite32(irq_mask->all, KVASER_PCIEFD_PCI_IEN_ADDR(pcie));
return IRQ_HANDLED;
}
@@ -1667,13 +1666,22 @@ static void kvaser_pciefd_teardown_can_ctrls(struct kvaser_pciefd *pcie)
}
}
+static void kvaser_pciefd_disable_irq_srcs(struct kvaser_pciefd *pcie)
+{
+ unsigned int i;
+
+ /* Masking PCI_IRQ is insufficient as running ISR will unmask it */
+ iowrite32(0, KVASER_PCIEFD_SRB_ADDR(pcie) + KVASER_PCIEFD_SRB_IEN_REG);
+ for (i = 0; i < pcie->nr_channels; ++i)
+ iowrite32(0, pcie->can[i]->reg_base + KVASER_PCIEFD_KCAN_IEN_REG);
+}
+
static int kvaser_pciefd_probe(struct pci_dev *pdev,
const struct pci_device_id *id)
{
int err;
struct kvaser_pciefd *pcie;
const struct kvaser_pciefd_irq_mask *irq_mask;
- void __iomem *irq_en_base;
pcie = devm_kzalloc(&pdev->dev, sizeof(*pcie), GFP_KERNEL);
if (!pcie)
@@ -1726,8 +1734,7 @@ static int kvaser_pciefd_probe(struct pci_dev *pdev,
KVASER_PCIEFD_SRB_ADDR(pcie) + KVASER_PCIEFD_SRB_IEN_REG);
/* Enable PCI interrupts */
- irq_en_base = KVASER_PCIEFD_PCI_IEN_ADDR(pcie);
- iowrite32(irq_mask->all, irq_en_base);
+ iowrite32(irq_mask->all, KVASER_PCIEFD_PCI_IEN_ADDR(pcie));
/* Ready the DMA buffers */
iowrite32(KVASER_PCIEFD_SRB_CMD_RDB0,
KVASER_PCIEFD_SRB_ADDR(pcie) + KVASER_PCIEFD_SRB_CMD_REG);
@@ -1741,8 +1748,7 @@ static int kvaser_pciefd_probe(struct pci_dev *pdev,
return 0;
err_free_irq:
- /* Disable PCI interrupts */
- iowrite32(0, irq_en_base);
+ kvaser_pciefd_disable_irq_srcs(pcie);
free_irq(pcie->pci->irq, pcie);
err_teardown_can_ctrls:
@@ -1762,35 +1768,25 @@ static int kvaser_pciefd_probe(struct pci_dev *pdev,
return err;
}
-static void kvaser_pciefd_remove_all_ctrls(struct kvaser_pciefd *pcie)
-{
- int i;
-
- for (i = 0; i < pcie->nr_channels; i++) {
- struct kvaser_pciefd_can *can = pcie->can[i];
-
- if (can) {
- iowrite32(0, can->reg_base + KVASER_PCIEFD_KCAN_IEN_REG);
- unregister_candev(can->can.dev);
- del_timer(&can->bec_poll_timer);
- kvaser_pciefd_pwm_stop(can);
- free_candev(can->can.dev);
- }
- }
-}
-
static void kvaser_pciefd_remove(struct pci_dev *pdev)
{
struct kvaser_pciefd *pcie = pci_get_drvdata(pdev);
+ unsigned int i;
- kvaser_pciefd_remove_all_ctrls(pcie);
+ for (i = 0; i < pcie->nr_channels; ++i) {
+ struct kvaser_pciefd_can *can = pcie->can[i];
- /* Disable interrupts */
- iowrite32(0, KVASER_PCIEFD_SRB_ADDR(pcie) + KVASER_PCIEFD_SRB_CTRL_REG);
- iowrite32(0, KVASER_PCIEFD_PCI_IEN_ADDR(pcie));
+ unregister_candev(can->can.dev);
+ del_timer(&can->bec_poll_timer);
+ kvaser_pciefd_pwm_stop(can);
+ }
+ kvaser_pciefd_disable_irq_srcs(pcie);
free_irq(pcie->pci->irq, pcie);
+ for (i = 0; i < pcie->nr_channels; ++i)
+ free_candev(pcie->can[i]->can.dev);
+
pci_iounmap(pdev, pcie->reg_base);
pci_release_regions(pdev);
pci_disable_device(pdev);
diff --git a/drivers/net/can/slcan/slcan-core.c b/drivers/net/can/slcan/slcan-core.c
index 24c6622d36bd..58ff2ec1d975 100644
--- a/drivers/net/can/slcan/slcan-core.c
+++ b/drivers/net/can/slcan/slcan-core.c
@@ -71,12 +71,21 @@ MODULE_AUTHOR("Dario Binacchi <dario.binacchi@xxxxxxxxxxxxxxxxxxxx>");
#define SLCAN_CMD_LEN 1
#define SLCAN_SFF_ID_LEN 3
#define SLCAN_EFF_ID_LEN 8
+#define SLCAN_DATA_LENGTH_LEN 1
+#define SLCAN_ERROR_LEN 1
#define SLCAN_STATE_LEN 1
#define SLCAN_STATE_BE_RXCNT_LEN 3
#define SLCAN_STATE_BE_TXCNT_LEN 3
-#define SLCAN_STATE_FRAME_LEN (1 + SLCAN_CMD_LEN + \
- SLCAN_STATE_BE_RXCNT_LEN + \
- SLCAN_STATE_BE_TXCNT_LEN)
+#define SLCAN_STATE_MSG_LEN (SLCAN_CMD_LEN + \
+ SLCAN_STATE_LEN + \
+ SLCAN_STATE_BE_RXCNT_LEN + \
+ SLCAN_STATE_BE_TXCNT_LEN)
+#define SLCAN_ERROR_MSG_LEN_MIN (SLCAN_CMD_LEN + \
+ SLCAN_ERROR_LEN + \
+ SLCAN_DATA_LENGTH_LEN)
+#define SLCAN_FRAME_MSG_LEN_MIN (SLCAN_CMD_LEN + \
+ SLCAN_SFF_ID_LEN + \
+ SLCAN_DATA_LENGTH_LEN)
struct slcan {
struct can_priv can;
@@ -176,6 +185,9 @@ static void slcan_bump_frame(struct slcan *sl)
u32 tmpid;
char *cmd = sl->rbuff;
+ if (sl->rcount < SLCAN_FRAME_MSG_LEN_MIN)
+ return;
+
skb = alloc_can_skb(sl->dev, &cf);
if (unlikely(!skb)) {
sl->dev->stats.rx_dropped++;
@@ -281,7 +293,7 @@ static void slcan_bump_state(struct slcan *sl)
return;
}
- if (state == sl->can.state || sl->rcount < SLCAN_STATE_FRAME_LEN)
+ if (state == sl->can.state || sl->rcount != SLCAN_STATE_MSG_LEN)
return;
cmd += SLCAN_STATE_BE_RXCNT_LEN + SLCAN_CMD_LEN + 1;
@@ -328,6 +340,9 @@ static void slcan_bump_err(struct slcan *sl)
bool rx_errors = false, tx_errors = false, rx_over_errors = false;
int i, len;
+ if (sl->rcount < SLCAN_ERROR_MSG_LEN_MIN)
+ return;
+
/* get len from sanitized ASCII value */
len = cmd[1];
if (len >= '0' && len < '9')
@@ -456,8 +471,7 @@ static void slcan_bump(struct slcan *sl)
static void slcan_unesc(struct slcan *sl, unsigned char s)
{
if ((s == '\r') || (s == '\a')) { /* CR or BEL ends the pdu */
- if (!test_and_clear_bit(SLF_ERROR, &sl->flags) &&
- sl->rcount > 4)
+ if (!test_and_clear_bit(SLF_ERROR, &sl->flags))
slcan_bump(sl);
sl->rcount = 0;
diff --git a/drivers/net/ethernet/amd/pds_core/core.c b/drivers/net/ethernet/amd/pds_core/core.c
index b3fa867c8ccd..c2ef55cff6b3 100644
--- a/drivers/net/ethernet/amd/pds_core/core.c
+++ b/drivers/net/ethernet/amd/pds_core/core.c
@@ -413,10 +413,7 @@ int pdsc_setup(struct pdsc *pdsc, bool init)
if (err)
return err;
- /* Scale the descriptor ring length based on number of CPUs and VFs */
- numdescs = max_t(int, PDSC_ADMINQ_MIN_LENGTH, num_online_cpus());
- numdescs += 2 * pci_sriov_get_totalvfs(pdsc->pdev);
- numdescs = roundup_pow_of_two(numdescs);
+ numdescs = PDSC_ADMINQ_MAX_LENGTH;
err = pdsc_qcq_alloc(pdsc, PDS_CORE_QTYPE_ADMINQ, 0, "adminq",
PDS_CORE_QCQ_F_CORE | PDS_CORE_QCQ_F_INTR,
numdescs,
diff --git a/drivers/net/ethernet/amd/pds_core/core.h b/drivers/net/ethernet/amd/pds_core/core.h
index 61ee607ee48a..421371408503 100644
--- a/drivers/net/ethernet/amd/pds_core/core.h
+++ b/drivers/net/ethernet/amd/pds_core/core.h
@@ -16,7 +16,7 @@
#define PDSC_WATCHDOG_SECS 5
#define PDSC_QUEUE_NAME_MAX_SZ 16
-#define PDSC_ADMINQ_MIN_LENGTH 16 /* must be a power of two */
+#define PDSC_ADMINQ_MAX_LENGTH 16 /* must be a power of two */
#define PDSC_NOTIFYQ_LENGTH 64 /* must be a power of two */
#define PDSC_TEARDOWN_RECOVERY false
#define PDSC_TEARDOWN_REMOVING true
diff --git a/drivers/net/ethernet/apm/xgene-v2/main.c b/drivers/net/ethernet/apm/xgene-v2/main.c
index 379d19d18dbe..5808e3c73a8f 100644
--- a/drivers/net/ethernet/apm/xgene-v2/main.c
+++ b/drivers/net/ethernet/apm/xgene-v2/main.c
@@ -9,8 +9,6 @@
#include "main.h"
-static const struct acpi_device_id xge_acpi_match[];
-
static int xge_get_resources(struct xge_pdata *pdata)
{
struct platform_device *pdev;
@@ -733,7 +731,7 @@ MODULE_DEVICE_TABLE(acpi, xge_acpi_match);
static struct platform_driver xge_driver = {
.driver = {
.name = "xgene-enet-v2",
- .acpi_match_table = ACPI_PTR(xge_acpi_match),
+ .acpi_match_table = xge_acpi_match,
},
.probe = xge_probe,
.remove = xge_remove,
diff --git a/drivers/net/ethernet/freescale/enetc/enetc.c b/drivers/net/ethernet/freescale/enetc/enetc.c
index 8feb7d4226bb..0c09d82dbf00 100644
--- a/drivers/net/ethernet/freescale/enetc/enetc.c
+++ b/drivers/net/ethernet/freescale/enetc/enetc.c
@@ -1572,6 +1572,16 @@ static void enetc_xdp_drop(struct enetc_bdr *rx_ring, int rx_ring_first,
}
}
+static void enetc_bulk_flip_buff(struct enetc_bdr *rx_ring, int rx_ring_first,
+ int rx_ring_last)
+{
+ while (rx_ring_first != rx_ring_last) {
+ enetc_flip_rx_buff(rx_ring,
+ &rx_ring->rx_swbd[rx_ring_first]);
+ enetc_bdr_idx_inc(rx_ring, &rx_ring_first);
+ }
+}
+
static int enetc_clean_rx_ring_xdp(struct enetc_bdr *rx_ring,
struct napi_struct *napi, int work_limit,
struct bpf_prog *prog)
@@ -1687,11 +1697,7 @@ static int enetc_clean_rx_ring_xdp(struct enetc_bdr *rx_ring,
enetc_xdp_drop(rx_ring, orig_i, i);
rx_ring->stats.xdp_redirect_failures++;
} else {
- while (orig_i != i) {
- enetc_flip_rx_buff(rx_ring,
- &rx_ring->rx_swbd[orig_i]);
- enetc_bdr_idx_inc(rx_ring, &orig_i);
- }
+ enetc_bulk_flip_buff(rx_ring, orig_i, i);
xdp_redirect_frm_cnt++;
rx_ring->stats.xdp_redirect++;
}
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 7261838a09db..291c88a76a27 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -1079,6 +1079,29 @@ static void fec_enet_enable_ring(struct net_device *ndev)
}
}
+/* Whack a reset. We should wait for this.
+ * For i.MX6SX SOC, enet use AXI bus, we use disable MAC
+ * instead of reset MAC itself.
+ */
+static void fec_ctrl_reset(struct fec_enet_private *fep, bool allow_wol)
+{
+ u32 val;
+
+ if (!allow_wol || !(fep->wol_flag & FEC_WOL_FLAG_SLEEP_ON)) {
+ if (fep->quirks & FEC_QUIRK_HAS_MULTI_QUEUES ||
+ ((fep->quirks & FEC_QUIRK_NO_HARD_RESET) && fep->link)) {
+ writel(0, fep->hwp + FEC_ECNTRL);
+ } else {
+ writel(FEC_ECR_RESET, fep->hwp + FEC_ECNTRL);
+ udelay(10);
+ }
+ } else {
+ val = readl(fep->hwp + FEC_ECNTRL);
+ val |= (FEC_ECR_MAGICEN | FEC_ECR_SLEEP);
+ writel(val, fep->hwp + FEC_ECNTRL);
+ }
+}
+
/*
* This function is called to start or restart the FEC during a link
* change, transmit timeout, or to reconfigure the FEC. The network
@@ -1095,17 +1118,7 @@ fec_restart(struct net_device *ndev)
if (fep->bufdesc_ex)
fec_ptp_save_state(fep);
- /* Whack a reset. We should wait for this.
- * For i.MX6SX SOC, enet use AXI bus, we use disable MAC
- * instead of reset MAC itself.
- */
- if (fep->quirks & FEC_QUIRK_HAS_MULTI_QUEUES ||
- ((fep->quirks & FEC_QUIRK_NO_HARD_RESET) && fep->link)) {
- writel(0, fep->hwp + FEC_ECNTRL);
- } else {
- writel(1, fep->hwp + FEC_ECNTRL);
- udelay(10);
- }
+ fec_ctrl_reset(fep, false);
/*
* enet-mac reset will reset mac address registers too,
@@ -1359,22 +1372,7 @@ fec_stop(struct net_device *ndev)
if (fep->bufdesc_ex)
fec_ptp_save_state(fep);
- /* Whack a reset. We should wait for this.
- * For i.MX6SX SOC, enet use AXI bus, we use disable MAC
- * instead of reset MAC itself.
- */
- if (!(fep->wol_flag & FEC_WOL_FLAG_SLEEP_ON)) {
- if (fep->quirks & FEC_QUIRK_HAS_MULTI_QUEUES) {
- writel(0, fep->hwp + FEC_ECNTRL);
- } else {
- writel(FEC_ECR_RESET, fep->hwp + FEC_ECNTRL);
- udelay(10);
- }
- } else {
- val = readl(fep->hwp + FEC_ECNTRL);
- val |= (FEC_ECR_MAGICEN | FEC_ECR_SLEEP);
- writel(val, fep->hwp + FEC_ECNTRL);
- }
+ fec_ctrl_reset(fep, true);
writel(fep->phy_speed, fep->hwp + FEC_MII_SPEED);
writel(FEC_DEFAULT_IMASK, fep->hwp + FEC_IMASK);
diff --git a/drivers/net/ethernet/intel/ice/ice_ethtool.c b/drivers/net/ethernet/intel/ice/ice_ethtool.c
index 39b5f24be7e4..dd58b2372dc0 100644
--- a/drivers/net/ethernet/intel/ice/ice_ethtool.c
+++ b/drivers/net/ethernet/intel/ice/ice_ethtool.c
@@ -3329,8 +3329,7 @@ static u32 ice_get_combined_cnt(struct ice_vsi *vsi)
ice_for_each_q_vector(vsi, q_idx) {
struct ice_q_vector *q_vector = vsi->q_vectors[q_idx];
- if (q_vector->rx.rx_ring && q_vector->tx.tx_ring)
- combined++;
+ combined += min(q_vector->num_ring_tx, q_vector->num_ring_rx);
}
return combined;
diff --git a/drivers/net/ethernet/intel/ice/ice_irq.c b/drivers/net/ethernet/intel/ice/ice_irq.c
index ad82ff7d1995..09f9c7ba5279 100644
--- a/drivers/net/ethernet/intel/ice/ice_irq.c
+++ b/drivers/net/ethernet/intel/ice/ice_irq.c
@@ -45,7 +45,7 @@ static void ice_free_irq_res(struct ice_pf *pf, u16 index)
/**
* ice_get_irq_res - get an interrupt resource
* @pf: board private structure
- * @dyn_only: force entry to be dynamically allocated
+ * @dyn_allowed: allow entry to be dynamically allocated
*
* Allocate new irq entry in the free slot of the tracker. Since xarray
* is used, always allocate new entry at the lowest possible index. Set
@@ -53,11 +53,12 @@ static void ice_free_irq_res(struct ice_pf *pf, u16 index)
*
* Returns allocated irq entry or NULL on failure.
*/
-static struct ice_irq_entry *ice_get_irq_res(struct ice_pf *pf, bool dyn_only)
+static struct ice_irq_entry *ice_get_irq_res(struct ice_pf *pf,
+ bool dyn_allowed)
{
- struct xa_limit limit = { .max = pf->irq_tracker.num_entries,
+ struct xa_limit limit = { .max = pf->irq_tracker.num_entries - 1,
.min = 0 };
- unsigned int num_static = pf->irq_tracker.num_static;
+ unsigned int num_static = pf->irq_tracker.num_static - 1;
struct ice_irq_entry *entry;
unsigned int index;
int ret;
@@ -66,9 +67,9 @@ static struct ice_irq_entry *ice_get_irq_res(struct ice_pf *pf, bool dyn_only)
if (!entry)
return NULL;
- /* skip preallocated entries if the caller says so */
- if (dyn_only)
- limit.min = num_static;
+ /* only already allocated if the caller says so */
+ if (!dyn_allowed)
+ limit.max = num_static;
ret = xa_alloc(&pf->irq_tracker.entries, &index, entry, limit,
GFP_KERNEL);
@@ -78,7 +79,7 @@ static struct ice_irq_entry *ice_get_irq_res(struct ice_pf *pf, bool dyn_only)
entry = NULL;
} else {
entry->index = index;
- entry->dynamic = index >= num_static;
+ entry->dynamic = index > num_static;
}
return entry;
@@ -272,7 +273,7 @@ int ice_init_interrupt_scheme(struct ice_pf *pf)
/**
* ice_alloc_irq - Allocate new interrupt vector
* @pf: board private structure
- * @dyn_only: force dynamic allocation of the interrupt
+ * @dyn_allowed: allow dynamic allocation of the interrupt
*
* Allocate new interrupt vector for a given owner id.
* return struct msi_map with interrupt details and track
@@ -285,20 +286,20 @@ int ice_init_interrupt_scheme(struct ice_pf *pf)
* interrupt will be allocated with pci_msix_alloc_irq_at.
*
* Some callers may only support dynamically allocated interrupts.
- * This is indicated with dyn_only flag.
+ * This is indicated with dyn_allowed flag.
*
* On failure, return map with negative .index. The caller
* is expected to check returned map index.
*
*/
-struct msi_map ice_alloc_irq(struct ice_pf *pf, bool dyn_only)
+struct msi_map ice_alloc_irq(struct ice_pf *pf, bool dyn_allowed)
{
int sriov_base_vector = pf->sriov_base_vector;
struct msi_map map = { .index = -ENOENT };
struct device *dev = ice_pf_to_dev(pf);
struct ice_irq_entry *entry;
- entry = ice_get_irq_res(pf, dyn_only);
+ entry = ice_get_irq_res(pf, dyn_allowed);
if (!entry)
return map;
diff --git a/drivers/net/ethernet/intel/ice/ice_lag.c b/drivers/net/ethernet/intel/ice/ice_lag.c
index 4e675c7c199f..4db0b770420e 100644
--- a/drivers/net/ethernet/intel/ice/ice_lag.c
+++ b/drivers/net/ethernet/intel/ice/ice_lag.c
@@ -1229,12 +1229,18 @@ static void ice_lag_changeupper_event(struct ice_lag *lag, void *ptr)
*/
if (!primary_lag) {
lag->primary = true;
+ if (!ice_is_switchdev_running(lag->pf))
+ return;
+
/* Configure primary's SWID to be shared */
ice_lag_primary_swid(lag, true);
primary_lag = lag;
} else {
u16 swid;
+ if (!ice_is_switchdev_running(primary_lag->pf))
+ return;
+
swid = primary_lag->pf->hw.port_info->sw_id;
ice_lag_set_swid(swid, lag, true);
ice_lag_add_prune_list(primary_lag, lag->pf);
diff --git a/drivers/net/ethernet/intel/ice/ice_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c
index 1fc4805353eb..a6a290514e54 100644
--- a/drivers/net/ethernet/intel/ice/ice_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_lib.c
@@ -587,6 +587,8 @@ ice_vsi_alloc_def(struct ice_vsi *vsi, struct ice_channel *ch)
return -ENOMEM;
}
+ vsi->irq_dyn_alloc = pci_msix_can_alloc_dyn(vsi->back->pdev);
+
switch (vsi->type) {
case ICE_VSI_SWITCHDEV_CTRL:
/* Setup eswitch MSIX irq handler for VSI */
diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl.c b/drivers/net/ethernet/intel/ice/ice_virtchnl.c
index e709b10a2976..1edcf9303183 100644
--- a/drivers/net/ethernet/intel/ice/ice_virtchnl.c
+++ b/drivers/net/ethernet/intel/ice/ice_virtchnl.c
@@ -3769,7 +3769,6 @@ static int ice_vc_repr_add_mac(struct ice_vf *vf, u8 *msg)
}
ice_vfhw_mac_add(vf, &al->list[i]);
- vf->num_mac++;
break;
}
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
index 339be6950c03..6302990e9a5f 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/cgx.c
@@ -66,8 +66,18 @@ static int cgx_fwi_link_change(struct cgx *cgx, int lmac_id, bool en);
/* Supported devices */
static const struct pci_device_id cgx_id_table[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_CAVIUM, PCI_DEVID_OCTEONTX2_CGX) },
- { PCI_DEVICE(PCI_VENDOR_ID_CAVIUM, PCI_DEVID_CN10K_RPM) },
- { PCI_DEVICE(PCI_VENDOR_ID_CAVIUM, PCI_DEVID_CN10KB_RPM) },
+ { PCI_DEVICE_SUB(PCI_VENDOR_ID_CAVIUM, PCI_DEVID_CN10K_RPM,
+ PCI_ANY_ID, PCI_SUBSYS_DEVID_CN10K_A) },
+ { PCI_DEVICE_SUB(PCI_VENDOR_ID_CAVIUM, PCI_DEVID_CN10K_RPM,
+ PCI_ANY_ID, PCI_SUBSYS_DEVID_CNF10K_A) },
+ { PCI_DEVICE_SUB(PCI_VENDOR_ID_CAVIUM, PCI_DEVID_CN10K_RPM,
+ PCI_ANY_ID, PCI_SUBSYS_DEVID_CNF10K_B) },
+ { PCI_DEVICE_SUB(PCI_VENDOR_ID_CAVIUM, PCI_DEVID_CN10KB_RPM,
+ PCI_ANY_ID, PCI_SUBSYS_DEVID_CN10K_B) },
+ { PCI_DEVICE_SUB(PCI_VENDOR_ID_CAVIUM, PCI_DEVID_CN10KB_RPM,
+ PCI_ANY_ID, PCI_SUBSYS_DEVID_CN20KA) },
+ { PCI_DEVICE_SUB(PCI_VENDOR_ID_CAVIUM, PCI_DEVID_CN10KB_RPM,
+ PCI_ANY_ID, PCI_SUBSYS_DEVID_CNF20KA) },
{ 0, } /* end of table */
};
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu.h b/drivers/net/ethernet/marvell/octeontx2/af/rvu.h
index a607c7294b0c..9fbc071ef29b 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu.h
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu.h
@@ -30,6 +30,8 @@
#define PCI_SUBSYS_DEVID_CNF10K_A 0xBA00
#define PCI_SUBSYS_DEVID_CNF10K_B 0xBC00
#define PCI_SUBSYS_DEVID_CN10K_B 0xBD00
+#define PCI_SUBSYS_DEVID_CN20KA 0xC220
+#define PCI_SUBSYS_DEVID_CNF20KA 0xC320
/* PCI BAR nos */
#define PCI_AF_REG_BAR_NUM 0
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c
index 0e74c5a2231e..1e4cd4f7d0cf 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c
@@ -13,19 +13,26 @@
/* RVU LMTST */
#define LMT_TBL_OP_READ 0
#define LMT_TBL_OP_WRITE 1
-#define LMT_MAP_TABLE_SIZE (128 * 1024)
#define LMT_MAPTBL_ENTRY_SIZE 16
+#define LMT_MAX_VFS 256
+
+#define LMT_MAP_ENTRY_ENA BIT_ULL(20)
+#define LMT_MAP_ENTRY_LINES GENMASK_ULL(18, 16)
/* Function to perform operations (read/write) on lmtst map table */
static int lmtst_map_table_ops(struct rvu *rvu, u32 index, u64 *val,
int lmt_tbl_op)
{
void __iomem *lmt_map_base;
- u64 tbl_base;
+ u64 tbl_base, cfg;
+ int pfs, vfs;
tbl_base = rvu_read64(rvu, BLKADDR_APR, APR_AF_LMT_MAP_BASE);
+ cfg = rvu_read64(rvu, BLKADDR_APR, APR_AF_LMT_CFG);
+ vfs = 1 << (cfg & 0xF);
+ pfs = 1 << ((cfg >> 4) & 0x7);
- lmt_map_base = ioremap_wc(tbl_base, LMT_MAP_TABLE_SIZE);
+ lmt_map_base = ioremap_wc(tbl_base, pfs * vfs * LMT_MAPTBL_ENTRY_SIZE);
if (!lmt_map_base) {
dev_err(rvu->dev, "Failed to setup lmt map table mapping!!\n");
return -ENOMEM;
@@ -35,6 +42,13 @@ static int lmtst_map_table_ops(struct rvu *rvu, u32 index, u64 *val,
*val = readq(lmt_map_base + index);
} else {
writeq((*val), (lmt_map_base + index));
+
+ cfg = FIELD_PREP(LMT_MAP_ENTRY_ENA, 0x1);
+ /* 2048 LMTLINES */
+ cfg |= FIELD_PREP(LMT_MAP_ENTRY_LINES, 0x6);
+
+ writeq(cfg, (lmt_map_base + (index + 8)));
+
/* Flushing the AP interceptor cache to make APR_LMT_MAP_ENTRY_S
* changes effective. Write 1 for flush and read is being used as a
* barrier and sets up a data dependency. Write to 0 after a write
@@ -52,7 +66,7 @@ static int lmtst_map_table_ops(struct rvu *rvu, u32 index, u64 *val,
#define LMT_MAP_TBL_W1_OFF 8
static u32 rvu_get_lmtst_tbl_index(struct rvu *rvu, u16 pcifunc)
{
- return ((rvu_get_pf(pcifunc) * rvu->hw->total_vfs) +
+ return ((rvu_get_pf(pcifunc) * LMT_MAX_VFS) +
(pcifunc & RVU_PFVF_FUNC_MASK)) * LMT_MAPTBL_ENTRY_SIZE;
}
@@ -69,7 +83,7 @@ static int rvu_get_lmtaddr(struct rvu *rvu, u16 pcifunc,
mutex_lock(&rvu->rsrc_lock);
rvu_write64(rvu, BLKADDR_RVUM, RVU_AF_SMMU_ADDR_REQ, iova);
- pf = rvu_get_pf(pcifunc) & 0x1F;
+ pf = rvu_get_pf(pcifunc) & RVU_PFVF_PF_MASK;
val = BIT_ULL(63) | BIT_ULL(14) | BIT_ULL(13) | pf << 8 |
((pcifunc & RVU_PFVF_FUNC_MASK) & 0xFF);
rvu_write64(rvu, BLKADDR_RVUM, RVU_AF_SMMU_TXN_REQ, val);
diff --git a/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c b/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
index feca86e429df..56dab11833b5 100644
--- a/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
+++ b/drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c
@@ -580,6 +580,7 @@ static ssize_t rvu_dbg_lmtst_map_table_display(struct file *filp,
u64 lmt_addr, val, tbl_base;
int pf, vf, num_vfs, hw_vfs;
void __iomem *lmt_map_base;
+ int apr_pfs, apr_vfs;
int buf_size = 10240;
size_t off = 0;
int index = 0;
@@ -595,8 +596,12 @@ static ssize_t rvu_dbg_lmtst_map_table_display(struct file *filp,
return -ENOMEM;
tbl_base = rvu_read64(rvu, BLKADDR_APR, APR_AF_LMT_MAP_BASE);
+ val = rvu_read64(rvu, BLKADDR_APR, APR_AF_LMT_CFG);
+ apr_vfs = 1 << (val & 0xF);
+ apr_pfs = 1 << ((val >> 4) & 0x7);
- lmt_map_base = ioremap_wc(tbl_base, 128 * 1024);
+ lmt_map_base = ioremap_wc(tbl_base, apr_pfs * apr_vfs *
+ LMT_MAPTBL_ENTRY_SIZE);
if (!lmt_map_base) {
dev_err(rvu->dev, "Failed to setup lmt map table mapping!!\n");
kfree(buf);
@@ -618,7 +623,7 @@ static ssize_t rvu_dbg_lmtst_map_table_display(struct file *filp,
off += scnprintf(&buf[off], buf_size - 1 - off, "PF%d \t\t\t",
pf);
- index = pf * rvu->hw->total_vfs * LMT_MAPTBL_ENTRY_SIZE;
+ index = pf * apr_vfs * LMT_MAPTBL_ENTRY_SIZE;
off += scnprintf(&buf[off], buf_size - 1 - off, " 0x%llx\t\t",
(tbl_base + index));
lmt_addr = readq(lmt_map_base + index);
@@ -631,7 +636,7 @@ static ssize_t rvu_dbg_lmtst_map_table_display(struct file *filp,
/* Reading num of VFs per PF */
rvu_get_pf_numvfs(rvu, pf, &num_vfs, &hw_vfs);
for (vf = 0; vf < num_vfs; vf++) {
- index = (pf * rvu->hw->total_vfs * 16) +
+ index = (pf * apr_vfs * LMT_MAPTBL_ENTRY_SIZE) +
((vf + 1) * LMT_MAPTBL_ENTRY_SIZE);
off += scnprintf(&buf[off], buf_size - 1 - off,
"PF%d:VF%d \t\t", pf, vf);
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
index 47adccf7a777..1999918ca500 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
@@ -988,6 +988,7 @@ static int otx2_cq_init(struct otx2_nic *pfvf, u16 qidx)
int err, pool_id, non_xdp_queues;
struct nix_aq_enq_req *aq;
struct otx2_cq_queue *cq;
+ struct otx2_pool *pool;
cq = &qset->cq[qidx];
cq->cq_idx = qidx;
@@ -996,8 +997,13 @@ static int otx2_cq_init(struct otx2_nic *pfvf, u16 qidx)
cq->cq_type = CQ_RX;
cq->cint_idx = qidx;
cq->cqe_cnt = qset->rqe_cnt;
- if (pfvf->xdp_prog)
+ if (pfvf->xdp_prog) {
+ pool = &qset->pool[qidx];
xdp_rxq_info_reg(&cq->xdp_rxq, pfvf->netdev, qidx, 0);
+ xdp_rxq_info_reg_mem_model(&cq->xdp_rxq,
+ MEM_TYPE_PAGE_POOL,
+ pool->page_pool);
+ }
} else if (qidx < non_xdp_queues) {
cq->cq_type = CQ_TX;
cq->cint_idx = qidx - pfvf->hw.rx_queues;
diff --git a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
index a4efbeb16208..889fd26843e6 100644
--- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
+++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
@@ -34,8 +34,10 @@ struct mtk_flow_data {
u16 vlan_in;
struct {
- u16 id;
- __be16 proto;
+ struct {
+ u16 id;
+ __be16 proto;
+ } vlans[2];
u8 num;
} vlan;
struct {
@@ -330,18 +332,19 @@ mtk_flow_offload_replace(struct mtk_eth *eth, struct flow_cls_offload *f,
case FLOW_ACTION_CSUM:
break;
case FLOW_ACTION_VLAN_PUSH:
- if (data.vlan.num == 1 ||
+ if (data.vlan.num + data.pppoe.num == 2 ||
act->vlan.proto != htons(ETH_P_8021Q))
return -EOPNOTSUPP;
- data.vlan.id = act->vlan.vid;
- data.vlan.proto = act->vlan.proto;
+ data.vlan.vlans[data.vlan.num].id = act->vlan.vid;
+ data.vlan.vlans[data.vlan.num].proto = act->vlan.proto;
data.vlan.num++;
break;
case FLOW_ACTION_VLAN_POP:
break;
case FLOW_ACTION_PPPOE_PUSH:
- if (data.pppoe.num == 1)
+ if (data.pppoe.num == 1 ||
+ data.vlan.num == 2)
return -EOPNOTSUPP;
data.pppoe.sid = act->pppoe.sid;
@@ -431,12 +434,9 @@ mtk_flow_offload_replace(struct mtk_eth *eth, struct flow_cls_offload *f,
if (offload_type == MTK_PPE_PKT_TYPE_BRIDGE)
foe.bridge.vlan = data.vlan_in;
- if (data.vlan.num == 1) {
- if (data.vlan.proto != htons(ETH_P_8021Q))
- return -EOPNOTSUPP;
+ for (i = 0; i < data.vlan.num; i++)
+ mtk_foe_entry_set_vlan(eth, &foe, data.vlan.vlans[i].id);
- mtk_foe_entry_set_vlan(eth, &foe, data.vlan.id);
- }
if (data.pppoe.num == 1)
mtk_foe_entry_set_pppoe(eth, &foe, data.pppoe.sid);
diff --git a/drivers/net/ethernet/mellanox/mlx4/alloc.c b/drivers/net/ethernet/mellanox/mlx4/alloc.c
index b330020dc0d6..f2bded847e61 100644
--- a/drivers/net/ethernet/mellanox/mlx4/alloc.c
+++ b/drivers/net/ethernet/mellanox/mlx4/alloc.c
@@ -682,9 +682,9 @@ static struct mlx4_db_pgdir *mlx4_alloc_db_pgdir(struct device *dma_device)
}
static int mlx4_alloc_db_from_pgdir(struct mlx4_db_pgdir *pgdir,
- struct mlx4_db *db, int order)
+ struct mlx4_db *db, unsigned int order)
{
- int o;
+ unsigned int o;
int i;
for (o = order; o <= 1; ++o) {
@@ -712,7 +712,7 @@ static int mlx4_alloc_db_from_pgdir(struct mlx4_db_pgdir *pgdir,
return 0;
}
-int mlx4_db_alloc(struct mlx4_dev *dev, struct mlx4_db *db, int order)
+int mlx4_db_alloc(struct mlx4_dev *dev, struct mlx4_db *db, unsigned int order)
{
struct mlx4_priv *priv = mlx4_priv(dev);
struct mlx4_db_pgdir *pgdir;
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_tx.c b/drivers/net/ethernet/mellanox/mlx4/en_tx.c
index 65cb63f6c465..61a0fd8424a2 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_tx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_tx.c
@@ -450,6 +450,8 @@ int mlx4_en_process_tx_cq(struct net_device *dev,
if (unlikely(!priv->port_up))
return 0;
+ if (unlikely(!napi_budget) && cq->type == TX_XDP)
+ return 0;
netdev_txq_bql_complete_prefetchw(ring->tx_queue);
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en.h b/drivers/net/ethernet/mellanox/mlx5/core/en.h
index 20a6bc1a234f..9cf33ae48c21 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en.h
@@ -93,8 +93,6 @@ struct page_pool;
#define MLX5_MPWRQ_DEF_LOG_STRIDE_SZ(mdev) \
MLX5_MPWRQ_LOG_STRIDE_SZ(mdev, order_base_2(MLX5E_RX_MAX_HEAD))
-#define MLX5_MPWRQ_MAX_LOG_WQE_SZ 18
-
/* Keep in sync with mlx5e_mpwrq_log_wqe_sz.
* These are theoretical maximums, which can be further restricted by
* capabilities. These values are used for static resource allocations and
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/params.c b/drivers/net/ethernet/mellanox/mlx5/core/en/params.c
index 775010e94cb7..dcd5db907f10 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/params.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/params.c
@@ -9,6 +9,9 @@
#include <net/page_pool/types.h>
#include <net/xdp_sock_drv.h>
+#define MLX5_MPWRQ_MAX_LOG_WQE_SZ 18
+#define MLX5_REP_MPWRQ_MAX_LOG_WQE_SZ 17
+
static u8 mlx5e_mpwrq_min_page_shift(struct mlx5_core_dev *mdev)
{
u8 min_page_shift = MLX5_CAP_GEN_2(mdev, log_min_mkey_entity_size);
@@ -102,18 +105,22 @@ u8 mlx5e_mpwrq_log_wqe_sz(struct mlx5_core_dev *mdev, u8 page_shift,
enum mlx5e_mpwrq_umr_mode umr_mode)
{
u8 umr_entry_size = mlx5e_mpwrq_umr_entry_size(umr_mode);
- u8 max_pages_per_wqe, max_log_mpwqe_size;
+ u8 max_pages_per_wqe, max_log_wqe_size_calc;
+ u8 max_log_wqe_size_cap;
u16 max_wqe_size;
/* Keep in sync with MLX5_MPWRQ_MAX_PAGES_PER_WQE. */
max_wqe_size = mlx5e_get_max_sq_aligned_wqebbs(mdev) * MLX5_SEND_WQE_BB;
max_pages_per_wqe = ALIGN_DOWN(max_wqe_size - sizeof(struct mlx5e_umr_wqe),
MLX5_UMR_FLEX_ALIGNMENT) / umr_entry_size;
- max_log_mpwqe_size = ilog2(max_pages_per_wqe) + page_shift;
+ max_log_wqe_size_calc = ilog2(max_pages_per_wqe) + page_shift;
+
+ WARN_ON_ONCE(max_log_wqe_size_calc < MLX5E_ORDER2_MAX_PACKET_MTU);
- WARN_ON_ONCE(max_log_mpwqe_size < MLX5E_ORDER2_MAX_PACKET_MTU);
+ max_log_wqe_size_cap = mlx5_core_is_ecpf(mdev) ?
+ MLX5_REP_MPWRQ_MAX_LOG_WQE_SZ : MLX5_MPWRQ_MAX_LOG_WQE_SZ;
- return min_t(u8, max_log_mpwqe_size, MLX5_MPWRQ_MAX_LOG_WQE_SZ);
+ return min_t(u8, max_log_wqe_size_calc, max_log_wqe_size_cap);
}
u8 mlx5e_mpwrq_pages_per_wqe(struct mlx5_core_dev *mdev, u8 page_shift,
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index d9dc7280302e..5c6f01abdcb9 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -3627,8 +3627,11 @@ static int mlx5e_setup_tc_mqprio(struct mlx5e_priv *priv,
/* MQPRIO is another toplevel qdisc that can't be attached
* simultaneously with the offloaded HTB.
*/
- if (WARN_ON(mlx5e_selq_is_htb_enabled(&priv->selq)))
- return -EINVAL;
+ if (mlx5e_selq_is_htb_enabled(&priv->selq)) {
+ NL_SET_ERR_MSG_MOD(mqprio->extack,
+ "MQPRIO cannot be configured when HTB offload is enabled.");
+ return -EOPNOTSUPP;
+ }
switch (mqprio->mode) {
case TC_MQPRIO_MODE_DCB:
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
index 751d3ffcd2f6..851c499faa79 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
@@ -63,6 +63,7 @@
#define MLX5E_REP_PARAMS_DEF_LOG_SQ_SIZE \
max(0x7, MLX5E_PARAMS_MINIMUM_LOG_SQ_SIZE)
#define MLX5E_REP_PARAMS_DEF_NUM_CHANNELS 1
+#define MLX5E_REP_PARAMS_DEF_LOG_RQ_SIZE 0x8
static const char mlx5e_rep_driver_name[] = "mlx5e_rep";
@@ -798,6 +799,8 @@ static void mlx5e_build_rep_params(struct net_device *netdev)
/* RQ */
mlx5e_build_rq_params(mdev, params);
+ if (!mlx5e_is_uplink_rep(priv) && mlx5_core_is_ecpf(mdev))
+ params->log_rq_mtu_frames = MLX5E_REP_PARAMS_DEF_LOG_RQ_SIZE;
/* If netdev is already registered (e.g. move from nic profile to uplink,
* RTNL lock must be held before triggering netdev notifiers.
@@ -829,6 +832,8 @@ static void mlx5e_build_rep_netdev(struct net_device *netdev,
netdev->ethtool_ops = &mlx5e_rep_ethtool_ops;
netdev->watchdog_timeo = 15 * HZ;
+ if (mlx5_core_is_ecpf(mdev))
+ netdev->tx_queue_len = 1 << MLX5E_REP_PARAMS_DEF_LOG_SQ_SIZE;
#if IS_ENABLED(CONFIG_MLX5_CLS_ACT)
netdev->hw_features |= NETIF_F_HW_TC;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c b/drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c
index 08a75654f5f1..c170503b3aac 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_selftest.c
@@ -165,6 +165,9 @@ mlx5e_test_loopback_validate(struct sk_buff *skb,
struct udphdr *udph;
struct iphdr *iph;
+ if (skb_linearize(skb))
+ goto out;
+
/* We are only going to peek, no need to clone the SKB */
if (MLX5E_TEST_PKT_SIZE - ETH_HLEN > skb_headlen(skb))
goto out;
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/esw/legacy.c b/drivers/net/ethernet/mellanox/mlx5/core/esw/legacy.c
index 8587cd572da5..bdb825aa8726 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/esw/legacy.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/esw/legacy.c
@@ -96,7 +96,7 @@ static int esw_create_legacy_fdb_table(struct mlx5_eswitch *esw)
if (!flow_group_in)
return -ENOMEM;
- ft_attr.max_fte = POOL_NEXT_SIZE;
+ ft_attr.max_fte = MLX5_FS_MAX_POOL_SIZE;
ft_attr.prio = LEGACY_FDB_PRIO;
fdb = mlx5_create_flow_table(root_ns, &ft_attr);
if (IS_ERR(fdb)) {
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/events.c b/drivers/net/ethernet/mellanox/mlx5/core/events.c
index 3ec892d51f57..e7143d32b221 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/events.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/events.c
@@ -163,11 +163,16 @@ static int temp_warn(struct notifier_block *nb, unsigned long type, void *data)
u64 value_msb;
value_lsb = be64_to_cpu(eqe->data.temp_warning.sensor_warning_lsb);
+ /* bit 1-63 are not supported for NICs,
+ * hence read only bit 0 (asic) from lsb.
+ */
+ value_lsb &= 0x1;
value_msb = be64_to_cpu(eqe->data.temp_warning.sensor_warning_msb);
- mlx5_core_warn(events->dev,
- "High temperature on sensors with bit set %llx %llx",
- value_msb, value_lsb);
+ if (net_ratelimit())
+ mlx5_core_warn(events->dev,
+ "High temperature on sensors with bit set %llx %llx",
+ value_msb, value_lsb);
return NOTIFY_OK;
}
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_ft_pool.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_ft_pool.c
index c14590acc772..f6abfd00d7e6 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fs_ft_pool.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_ft_pool.c
@@ -50,10 +50,12 @@ mlx5_ft_pool_get_avail_sz(struct mlx5_core_dev *dev, enum fs_flow_table_type tab
int i, found_i = -1;
for (i = ARRAY_SIZE(FT_POOLS) - 1; i >= 0; i--) {
- if (dev->priv.ft_pool->ft_left[i] && FT_POOLS[i] >= desired_size &&
+ if (dev->priv.ft_pool->ft_left[i] &&
+ (FT_POOLS[i] >= desired_size ||
+ desired_size == MLX5_FS_MAX_POOL_SIZE) &&
FT_POOLS[i] <= max_ft_size) {
found_i = i;
- if (desired_size != POOL_NEXT_SIZE)
+ if (desired_size != MLX5_FS_MAX_POOL_SIZE)
break;
}
}
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_ft_pool.h b/drivers/net/ethernet/mellanox/mlx5/core/fs_ft_pool.h
index 25f4274b372b..173e312db720 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/fs_ft_pool.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_ft_pool.h
@@ -7,8 +7,6 @@
#include <linux/mlx5/driver.h>
#include "fs_core.h"
-#define POOL_NEXT_SIZE 0
-
int mlx5_ft_pool_init(struct mlx5_core_dev *dev);
void mlx5_ft_pool_destroy(struct mlx5_core_dev *dev);
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/health.c b/drivers/net/ethernet/mellanox/mlx5/core/health.c
index d798834c4e75..3ac8043f76da 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/health.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/health.c
@@ -833,6 +833,7 @@ static void poll_health(struct timer_list *t)
health->prev = count;
if (health->miss_counter == MAX_MISSES) {
mlx5_core_err(dev, "device's health compromised - reached miss count\n");
+ health->synd = ioread8(&h->synd);
print_health_info(dev);
queue_work(health->wq, &health->report_work);
}
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/lib/fs_chains.c b/drivers/net/ethernet/mellanox/mlx5/core/lib/fs_chains.c
index 711d14dea248..d313cb7f0ed8 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/lib/fs_chains.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/lib/fs_chains.c
@@ -161,7 +161,8 @@ mlx5_chains_create_table(struct mlx5_fs_chains *chains,
ft_attr.flags |= (MLX5_FLOW_TABLE_TUNNEL_EN_REFORMAT |
MLX5_FLOW_TABLE_TUNNEL_EN_DECAP);
- sz = (chain == mlx5_chains_get_nf_ft_chain(chains)) ? FT_TBL_SZ : POOL_NEXT_SIZE;
+ sz = (chain == mlx5_chains_get_nf_ft_chain(chains)) ?
+ FT_TBL_SZ : MLX5_FS_MAX_POOL_SIZE;
ft_attr.max_fte = sz;
/* We use chains_default_ft(chains) as the table's next_ft till
diff --git a/drivers/net/ethernet/microchip/lan743x_main.c b/drivers/net/ethernet/microchip/lan743x_main.c
index 5d2ceff72784..f971d60484f0 100644
--- a/drivers/net/ethernet/microchip/lan743x_main.c
+++ b/drivers/net/ethernet/microchip/lan743x_main.c
@@ -3259,6 +3259,7 @@ static int lan743x_hardware_init(struct lan743x_adapter *adapter,
struct pci_dev *pdev)
{
struct lan743x_tx *tx;
+ u32 sgmii_ctl;
int index;
int ret;
@@ -3271,6 +3272,15 @@ static int lan743x_hardware_init(struct lan743x_adapter *adapter,
spin_lock_init(&adapter->eth_syslock_spinlock);
mutex_init(&adapter->sgmii_rw_lock);
pci11x1x_set_rfe_rd_fifo_threshold(adapter);
+ sgmii_ctl = lan743x_csr_read(adapter, SGMII_CTL);
+ if (adapter->is_sgmii_en) {
+ sgmii_ctl |= SGMII_CTL_SGMII_ENABLE_;
+ sgmii_ctl &= ~SGMII_CTL_SGMII_POWER_DN_;
+ } else {
+ sgmii_ctl &= ~SGMII_CTL_SGMII_ENABLE_;
+ sgmii_ctl |= SGMII_CTL_SGMII_POWER_DN_;
+ }
+ lan743x_csr_write(adapter, SGMII_CTL, sgmii_ctl);
} else {
adapter->max_tx_channels = LAN743X_MAX_TX_CHANNELS;
adapter->used_tx_channels = LAN743X_USED_TX_CHANNELS;
@@ -3319,7 +3329,6 @@ static int lan743x_hardware_init(struct lan743x_adapter *adapter,
static int lan743x_mdiobus_init(struct lan743x_adapter *adapter)
{
- u32 sgmii_ctl;
int ret;
adapter->mdiobus = devm_mdiobus_alloc(&adapter->pdev->dev);
@@ -3331,10 +3340,6 @@ static int lan743x_mdiobus_init(struct lan743x_adapter *adapter)
adapter->mdiobus->priv = (void *)adapter;
if (adapter->is_pci11x1x) {
if (adapter->is_sgmii_en) {
- sgmii_ctl = lan743x_csr_read(adapter, SGMII_CTL);
- sgmii_ctl |= SGMII_CTL_SGMII_ENABLE_;
- sgmii_ctl &= ~SGMII_CTL_SGMII_POWER_DN_;
- lan743x_csr_write(adapter, SGMII_CTL, sgmii_ctl);
netif_dbg(adapter, drv, adapter->netdev,
"SGMII operation\n");
adapter->mdiobus->read = lan743x_mdiobus_read_c22;
@@ -3345,10 +3350,6 @@ static int lan743x_mdiobus_init(struct lan743x_adapter *adapter)
netif_dbg(adapter, drv, adapter->netdev,
"lan743x-mdiobus-c45\n");
} else {
- sgmii_ctl = lan743x_csr_read(adapter, SGMII_CTL);
- sgmii_ctl &= ~SGMII_CTL_SGMII_ENABLE_;
- sgmii_ctl |= SGMII_CTL_SGMII_POWER_DN_;
- lan743x_csr_write(adapter, SGMII_CTL, sgmii_ctl);
netif_dbg(adapter, drv, adapter->netdev,
"RGMII operation\n");
// Only C22 support when RGMII I/F
diff --git a/drivers/net/ethernet/microsoft/mana/gdma_main.c b/drivers/net/ethernet/microsoft/mana/gdma_main.c
index ae014e21eb60..9ed965d61e35 100644
--- a/drivers/net/ethernet/microsoft/mana/gdma_main.c
+++ b/drivers/net/ethernet/microsoft/mana/gdma_main.c
@@ -1036,7 +1036,7 @@ static u32 mana_gd_write_client_oob(const struct gdma_wqe_request *wqe_req,
header->inline_oob_size_div4 = client_oob_size / sizeof(u32);
if (oob_in_sgl) {
- WARN_ON_ONCE(!pad_data || wqe_req->num_sge < 2);
+ WARN_ON_ONCE(wqe_req->num_sge < 2);
header->client_oob_in_sgl = 1;
diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index 7e5258b2c429..5af932a5e70c 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -5125,6 +5125,7 @@ static int r8169_mdio_register(struct rtl8169_private *tp)
new_bus->priv = tp;
new_bus->parent = &pdev->dev;
new_bus->irq[0] = PHY_MAC_INTERRUPT;
+ new_bus->phy_mask = GENMASK(31, 1);
snprintf(new_bus->id, MII_BUS_ID_SIZE, "r8169-%x-%x",
pci_domain_nr(pdev->bus), pci_dev_id(pdev));
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
index 63998d65fef8..9377b05bfc71 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c
@@ -966,7 +966,7 @@ static int sun8i_dwmac_set_syscon(struct device *dev,
/* of_mdio_parse_addr returns a valid (0 ~ 31) PHY
* address. No need to mask it again.
*/
- reg |= 1 << H3_EPHY_ADDR_SHIFT;
+ reg |= ret << H3_EPHY_ADDR_SHIFT;
} else {
/* For SoCs without internal PHY the PHY selection bit should be
* set to 0 (external PHY).
diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
index 9c8376b27189..c379a958380c 100644
--- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c
+++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
@@ -2095,7 +2095,7 @@ static int am65_cpsw_nuss_init_slave_ports(struct am65_cpsw_common *common)
port->slave.mac_addr);
if (!is_valid_ether_addr(port->slave.mac_addr)) {
eth_random_addr(port->slave.mac_addr);
- dev_err(dev, "Use random MAC address\n");
+ dev_info(dev, "Use random MAC address\n");
}
}
}
diff --git a/drivers/net/ethernet/ti/cpsw_new.c b/drivers/net/ethernet/ti/cpsw_new.c
index 9061dca97fcb..1c1d4806c119 100644
--- a/drivers/net/ethernet/ti/cpsw_new.c
+++ b/drivers/net/ethernet/ti/cpsw_new.c
@@ -1416,6 +1416,7 @@ static int cpsw_create_ports(struct cpsw_common *cpsw)
ndev->netdev_ops = &cpsw_netdev_ops;
ndev->ethtool_ops = &cpsw_ethtool_ops;
SET_NETDEV_DEV(ndev, dev);
+ ndev->dev.of_node = slave_data->slave_node;
if (!napi_ndev) {
/* CPSW Host port CPDMA interface is shared between
diff --git a/drivers/net/ieee802154/ca8210.c b/drivers/net/ieee802154/ca8210.c
index 0a0ad3d77557..587643a371de 100644
--- a/drivers/net/ieee802154/ca8210.c
+++ b/drivers/net/ieee802154/ca8210.c
@@ -1446,8 +1446,7 @@ static u8 mcps_data_request(
command.pdata.data_req.src_addr_mode = src_addr_mode;
command.pdata.data_req.dst.mode = dst_address_mode;
if (dst_address_mode != MAC_MODE_NO_ADDR) {
- command.pdata.data_req.dst.pan_id[0] = LS_BYTE(dst_pan_id);
- command.pdata.data_req.dst.pan_id[1] = MS_BYTE(dst_pan_id);
+ put_unaligned_le16(dst_pan_id, command.pdata.data_req.dst.pan_id);
if (dst_address_mode == MAC_MODE_SHORT_ADDR) {
command.pdata.data_req.dst.address[0] = LS_BYTE(
dst_addr->short_address
@@ -1795,12 +1794,12 @@ static int ca8210_skb_rx(
}
hdr.source.mode = data_ind[0];
dev_dbg(&priv->spi->dev, "srcAddrMode: %#03x\n", hdr.source.mode);
- hdr.source.pan_id = *(u16 *)&data_ind[1];
+ hdr.source.pan_id = cpu_to_le16(get_unaligned_le16(&data_ind[1]));
dev_dbg(&priv->spi->dev, "srcPanId: %#06x\n", hdr.source.pan_id);
memcpy(&hdr.source.extended_addr, &data_ind[3], 8);
hdr.dest.mode = data_ind[11];
dev_dbg(&priv->spi->dev, "dstAddrMode: %#03x\n", hdr.dest.mode);
- hdr.dest.pan_id = *(u16 *)&data_ind[12];
+ hdr.dest.pan_id = cpu_to_le16(get_unaligned_le16(&data_ind[12]));
dev_dbg(&priv->spi->dev, "dstPanId: %#06x\n", hdr.dest.pan_id);
memcpy(&hdr.dest.extended_addr, &data_ind[14], 8);
@@ -1927,7 +1926,7 @@ static int ca8210_skb_tx(
status = mcps_data_request(
header.source.mode,
header.dest.mode,
- header.dest.pan_id,
+ le16_to_cpu(header.dest.pan_id),
(union macaddr *)&header.dest.extended_addr,
skb->len - mac_len,
&skb->data[mac_len],
diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index b5f012619e42..800e8b9eb453 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -1718,7 +1718,7 @@ bool phylink_expects_phy(struct phylink *pl)
{
if (pl->cfg_link_an_mode == MLO_AN_FIXED ||
(pl->cfg_link_an_mode == MLO_AN_INBAND &&
- phy_interface_mode_is_8023z(pl->link_config.interface)))
+ phy_interface_mode_is_8023z(pl->link_interface)))
return false;
return true;
}
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index bbcefcc7ef8f..1e85cfe524e8 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -10032,6 +10032,7 @@ static const struct usb_device_id rtl8152_table[] = {
{ USB_DEVICE(VENDOR_ID_NVIDIA, 0x09ff) },
{ USB_DEVICE(VENDOR_ID_TPLINK, 0x0601) },
{ USB_DEVICE(VENDOR_ID_DLINK, 0xb301) },
+ { USB_DEVICE(VENDOR_ID_DELL, 0xb097) },
{ USB_DEVICE(VENDOR_ID_ASUS, 0x1976) },
{}
};
diff --git a/drivers/net/vxlan/vxlan_core.c b/drivers/net/vxlan/vxlan_core.c
index 64db3e98a1b6..2ed879a0abc6 100644
--- a/drivers/net/vxlan/vxlan_core.c
+++ b/drivers/net/vxlan/vxlan_core.c
@@ -227,9 +227,9 @@ static int vxlan_fdb_info(struct sk_buff *skb, struct vxlan_dev *vxlan,
be32_to_cpu(fdb->vni)))
goto nla_put_failure;
- ci.ndm_used = jiffies_to_clock_t(now - fdb->used);
+ ci.ndm_used = jiffies_to_clock_t(now - READ_ONCE(fdb->used));
ci.ndm_confirmed = 0;
- ci.ndm_updated = jiffies_to_clock_t(now - fdb->updated);
+ ci.ndm_updated = jiffies_to_clock_t(now - READ_ONCE(fdb->updated));
ci.ndm_refcnt = 0;
if (nla_put(skb, NDA_CACHEINFO, sizeof(ci), &ci))
@@ -435,8 +435,8 @@ static struct vxlan_fdb *vxlan_find_mac(struct vxlan_dev *vxlan,
struct vxlan_fdb *f;
f = __vxlan_find_mac(vxlan, mac, vni);
- if (f && f->used != jiffies)
- f->used = jiffies;
+ if (f && READ_ONCE(f->used) != jiffies)
+ WRITE_ONCE(f->used, jiffies);
return f;
}
@@ -1010,12 +1010,12 @@ static int vxlan_fdb_update_existing(struct vxlan_dev *vxlan,
!(f->flags & NTF_VXLAN_ADDED_BY_USER)) {
if (f->state != state) {
f->state = state;
- f->updated = jiffies;
+ WRITE_ONCE(f->updated, jiffies);
notify = 1;
}
if (f->flags != fdb_flags) {
f->flags = fdb_flags;
- f->updated = jiffies;
+ WRITE_ONCE(f->updated, jiffies);
notify = 1;
}
}
@@ -1049,7 +1049,7 @@ static int vxlan_fdb_update_existing(struct vxlan_dev *vxlan,
}
if (ndm_flags & NTF_USE)
- f->used = jiffies;
+ WRITE_ONCE(f->used, jiffies);
if (notify) {
if (rd == NULL)
@@ -1478,7 +1478,7 @@ static bool vxlan_snoop(struct net_device *dev,
src_mac, &rdst->remote_ip.sa, &src_ip->sa);
rdst->remote_ip = *src_ip;
- f->updated = jiffies;
+ WRITE_ONCE(f->updated, jiffies);
vxlan_fdb_notify(vxlan, f, rdst, RTM_NEWNEIGH, true, NULL);
} else {
u32 hash_index = fdb_head_index(vxlan, src_mac, vni);
@@ -2920,7 +2920,7 @@ static void vxlan_cleanup(struct timer_list *t)
if (f->flags & NTF_EXT_LEARNED)
continue;
- timeout = f->used + vxlan->cfg.age_interval * HZ;
+ timeout = READ_ONCE(f->used) + vxlan->cfg.age_interval * HZ;
if (time_before_eq(timeout, jiffies)) {
netdev_dbg(vxlan->dev,
"garbage collect %pM\n",
@@ -4240,6 +4240,7 @@ static int vxlan_changelink(struct net_device *dev, struct nlattr *tb[],
struct netlink_ext_ack *extack)
{
struct vxlan_dev *vxlan = netdev_priv(dev);
+ bool rem_ip_changed, change_igmp;
struct net_device *lowerdev;
struct vxlan_config conf;
struct vxlan_rdst *dst;
@@ -4263,8 +4264,13 @@ static int vxlan_changelink(struct net_device *dev, struct nlattr *tb[],
if (err)
return err;
+ rem_ip_changed = !vxlan_addr_equal(&conf.remote_ip, &dst->remote_ip);
+ change_igmp = vxlan->dev->flags & IFF_UP &&
+ (rem_ip_changed ||
+ dst->remote_ifindex != conf.remote_ifindex);
+
/* handle default dst entry */
- if (!vxlan_addr_equal(&conf.remote_ip, &dst->remote_ip)) {
+ if (rem_ip_changed) {
u32 hash_index = fdb_head_index(vxlan, all_zeros_mac, conf.vni);
spin_lock_bh(&vxlan->hash_lock[hash_index]);
@@ -4308,6 +4314,9 @@ static int vxlan_changelink(struct net_device *dev, struct nlattr *tb[],
}
}
+ if (change_igmp && vxlan_addr_multicast(&dst->remote_ip))
+ err = vxlan_multicast_leave(vxlan);
+
if (conf.age_interval != vxlan->cfg.age_interval)
mod_timer(&vxlan->age_timer, jiffies);
@@ -4315,7 +4324,12 @@ static int vxlan_changelink(struct net_device *dev, struct nlattr *tb[],
if (lowerdev && lowerdev != dst->remote_dev)
dst->remote_dev = lowerdev;
vxlan_config_apply(dev, &conf, lowerdev, vxlan->net, true);
- return 0;
+
+ if (!err && change_igmp &&
+ vxlan_addr_multicast(&dst->remote_ip))
+ err = vxlan_multicast_join(vxlan);
+
+ return err;
}
static void vxlan_dellink(struct net_device *dev, struct list_head *head)
diff --git a/drivers/net/wireless/ath/ath12k/core.h b/drivers/net/wireless/ath/ath12k/core.h
index 33f4706af880..18dfd7aab610 100644
--- a/drivers/net/wireless/ath/ath12k/core.h
+++ b/drivers/net/wireless/ath/ath12k/core.h
@@ -125,6 +125,7 @@ struct ath12k_ext_irq_grp {
u32 num_irq;
u32 grp_id;
u64 timestamp;
+ bool napi_enabled;
struct napi_struct napi;
struct net_device napi_ndev;
};
diff --git a/drivers/net/wireless/ath/ath12k/dp_tx.c b/drivers/net/wireless/ath/ath12k/dp_tx.c
index e025e4d0e767..474e0d4d406e 100644
--- a/drivers/net/wireless/ath/ath12k/dp_tx.c
+++ b/drivers/net/wireless/ath/ath12k/dp_tx.c
@@ -118,7 +118,7 @@ static void ath12k_hal_tx_cmd_ext_desc_setup(struct ath12k_base *ab, void *cmd,
le32_encode_bits(ti->data_len,
HAL_TX_MSDU_EXT_INFO1_BUF_LEN);
- tcl_ext_cmd->info1 = le32_encode_bits(1, HAL_TX_MSDU_EXT_INFO1_EXTN_OVERRIDE) |
+ tcl_ext_cmd->info1 |= le32_encode_bits(1, HAL_TX_MSDU_EXT_INFO1_EXTN_OVERRIDE) |
le32_encode_bits(ti->encap_type,
HAL_TX_MSDU_EXT_INFO1_ENCAP_TYPE) |
le32_encode_bits(ti->encrypt_type,
@@ -422,13 +422,13 @@ ath12k_dp_tx_process_htt_tx_complete(struct ath12k_base *ab,
switch (wbm_status) {
case HAL_WBM_REL_HTT_TX_COMP_STATUS_OK:
- case HAL_WBM_REL_HTT_TX_COMP_STATUS_DROP:
- case HAL_WBM_REL_HTT_TX_COMP_STATUS_TTL:
ts.acked = (wbm_status == HAL_WBM_REL_HTT_TX_COMP_STATUS_OK);
ts.ack_rssi = le32_get_bits(status_desc->info2,
HTT_TX_WBM_COMP_INFO2_ACK_RSSI);
ath12k_dp_tx_htt_tx_complete_buf(ab, msdu, tx_ring, &ts);
break;
+ case HAL_WBM_REL_HTT_TX_COMP_STATUS_DROP:
+ case HAL_WBM_REL_HTT_TX_COMP_STATUS_TTL:
case HAL_WBM_REL_HTT_TX_COMP_STATUS_REINJ:
case HAL_WBM_REL_HTT_TX_COMP_STATUS_INSPECT:
ath12k_dp_tx_free_txbuf(ab, msdu, mac_id, tx_ring);
diff --git a/drivers/net/wireless/ath/ath12k/hal_desc.h b/drivers/net/wireless/ath/ath12k/hal_desc.h
index 6c17adc6d60b..1bb840c2bef5 100644
--- a/drivers/net/wireless/ath/ath12k/hal_desc.h
+++ b/drivers/net/wireless/ath/ath12k/hal_desc.h
@@ -2918,7 +2918,7 @@ struct hal_mon_buf_ring {
#define HAL_MON_DEST_COOKIE_BUF_ID GENMASK(17, 0)
-#define HAL_MON_DEST_INFO0_END_OFFSET GENMASK(15, 0)
+#define HAL_MON_DEST_INFO0_END_OFFSET GENMASK(11, 0)
#define HAL_MON_DEST_INFO0_FLUSH_DETECTED BIT(16)
#define HAL_MON_DEST_INFO0_END_OF_PPDU BIT(17)
#define HAL_MON_DEST_INFO0_INITIATOR BIT(18)
diff --git a/drivers/net/wireless/ath/ath12k/pci.c b/drivers/net/wireless/ath/ath12k/pci.c
index 041a9602f0e1..5fd80f90ecaf 100644
--- a/drivers/net/wireless/ath/ath12k/pci.c
+++ b/drivers/net/wireless/ath/ath12k/pci.c
@@ -442,8 +442,11 @@ static void __ath12k_pci_ext_irq_disable(struct ath12k_base *ab)
ath12k_pci_ext_grp_disable(irq_grp);
- napi_synchronize(&irq_grp->napi);
- napi_disable(&irq_grp->napi);
+ if (irq_grp->napi_enabled) {
+ napi_synchronize(&irq_grp->napi);
+ napi_disable(&irq_grp->napi);
+ irq_grp->napi_enabled = false;
+ }
}
}
@@ -976,7 +979,11 @@ void ath12k_pci_ext_irq_enable(struct ath12k_base *ab)
for (i = 0; i < ATH12K_EXT_IRQ_GRP_NUM_MAX; i++) {
struct ath12k_ext_irq_grp *irq_grp = &ab->ext_irq_grp[i];
- napi_enable(&irq_grp->napi);
+ if (!irq_grp->napi_enabled) {
+ napi_enable(&irq_grp->napi);
+ irq_grp->napi_enabled = true;
+ }
+
ath12k_pci_ext_grp_enable(irq_grp);
}
}
diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/wireless/ath/ath12k/wmi.c
index c977dfbae0a4..d87d5980325e 100644
--- a/drivers/net/wireless/ath/ath12k/wmi.c
+++ b/drivers/net/wireless/ath/ath12k/wmi.c
@@ -2115,8 +2115,8 @@ void ath12k_wmi_start_scan_init(struct ath12k *ar,
arg->dwell_time_active = 50;
arg->dwell_time_active_2g = 0;
arg->dwell_time_passive = 150;
- arg->dwell_time_active_6g = 40;
- arg->dwell_time_passive_6g = 30;
+ arg->dwell_time_active_6g = 70;
+ arg->dwell_time_passive_6g = 70;
arg->min_rest_time = 50;
arg->max_rest_time = 500;
arg->repeat_probe_time = 0;
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index 4f00400c7ffb..58386906598a 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -691,7 +691,9 @@ static int ath9k_of_init(struct ath_softc *sc)
ah->ah_flags |= AH_NO_EEP_SWAP;
}
- of_get_mac_address(np, common->macaddr);
+ ret = of_get_mac_address(np, common->macaddr);
+ if (ret == -EPROBE_DEFER)
+ return ret;
return 0;
}
diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c b/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c
index a97ed7cbe4d1..d588e4cd808d 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-dbg-tlv.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
/*
- * Copyright (C) 2018-2024 Intel Corporation
+ * Copyright (C) 2018-2025 Intel Corporation
*/
#include <linux/firmware.h>
#include "iwl-drv.h"
@@ -1382,15 +1382,15 @@ void _iwl_dbg_tlv_time_point(struct iwl_fw_runtime *fwrt,
switch (tp_id) {
case IWL_FW_INI_TIME_POINT_EARLY:
iwl_dbg_tlv_init_cfg(fwrt);
- iwl_dbg_tlv_apply_config(fwrt, conf_list);
iwl_dbg_tlv_update_drams(fwrt);
iwl_dbg_tlv_tp_trigger(fwrt, sync, trig_list, tp_data, NULL);
+ iwl_dbg_tlv_apply_config(fwrt, conf_list);
break;
case IWL_FW_INI_TIME_POINT_AFTER_ALIVE:
iwl_dbg_tlv_apply_buffers(fwrt);
iwl_dbg_tlv_send_hcmds(fwrt, hcmd_list);
- iwl_dbg_tlv_apply_config(fwrt, conf_list);
iwl_dbg_tlv_tp_trigger(fwrt, sync, trig_list, tp_data, NULL);
+ iwl_dbg_tlv_apply_config(fwrt, conf_list);
break;
case IWL_FW_INI_TIME_POINT_PERIODIC:
iwl_dbg_tlv_set_periodic_trigs(fwrt);
@@ -1400,14 +1400,14 @@ void _iwl_dbg_tlv_time_point(struct iwl_fw_runtime *fwrt,
case IWL_FW_INI_TIME_POINT_MISSED_BEACONS:
case IWL_FW_INI_TIME_POINT_FW_DHC_NOTIFICATION:
iwl_dbg_tlv_send_hcmds(fwrt, hcmd_list);
- iwl_dbg_tlv_apply_config(fwrt, conf_list);
iwl_dbg_tlv_tp_trigger(fwrt, sync, trig_list, tp_data,
iwl_dbg_tlv_check_fw_pkt);
+ iwl_dbg_tlv_apply_config(fwrt, conf_list);
break;
default:
iwl_dbg_tlv_send_hcmds(fwrt, hcmd_list);
- iwl_dbg_tlv_apply_config(fwrt, conf_list);
iwl_dbg_tlv_tp_trigger(fwrt, sync, trig_list, tp_data, NULL);
+ iwl_dbg_tlv_apply_config(fwrt, conf_list);
break;
}
}
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
index 4a2de79f2e86..c01a9a6f06a4 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c
@@ -580,6 +580,8 @@ static const struct iwl_dev_info iwl_dev_info_table[] = {
IWL_DEV_INFO(0x7A70, 0x1692, iwlax411_2ax_cfg_so_gf4_a0, iwl_ax411_killer_1690i_name),
IWL_DEV_INFO(0x7AF0, 0x1691, iwlax411_2ax_cfg_so_gf4_a0, iwl_ax411_killer_1690s_name),
IWL_DEV_INFO(0x7AF0, 0x1692, iwlax411_2ax_cfg_so_gf4_a0, iwl_ax411_killer_1690i_name),
+ IWL_DEV_INFO(0x7F70, 0x1691, iwlax411_2ax_cfg_so_gf4_a0, iwl_ax411_killer_1690s_name),
+ IWL_DEV_INFO(0x7F70, 0x1692, iwlax411_2ax_cfg_so_gf4_a0, iwl_ax411_killer_1690i_name),
IWL_DEV_INFO(0x271C, 0x0214, iwl9260_2ac_cfg, iwl9260_1_name),
IWL_DEV_INFO(0x7E40, 0x1691, iwl_cfg_ma, iwl_ax411_killer_1690s_name),
diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h
index 8b620d4fed43..df0ea638370b 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76.h
@@ -439,6 +439,7 @@ struct mt76_hw_cap {
#define MT_DRV_RX_DMA_HDR BIT(3)
#define MT_DRV_HW_MGMT_TXQ BIT(4)
#define MT_DRV_AMSDU_OFFLOAD BIT(5)
+#define MT_DRV_IGNORE_TXS_FAILED BIT(6)
struct mt76_driver_ops {
u32 drv_flags;
diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac3_mac.h b/drivers/net/wireless/mediatek/mt76/mt76_connac3_mac.h
index 87bfa441a937..4979012d5abf 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76_connac3_mac.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76_connac3_mac.h
@@ -280,6 +280,9 @@ enum tx_mgnt_type {
#define MT_TXFREE_INFO_COUNT GENMASK(27, 24)
#define MT_TXFREE_INFO_STAT GENMASK(29, 28)
+#define MT_TXS_HDR_SIZE 4 /* Unit: DW */
+#define MT_TXS_SIZE 12 /* Unit: DW */
+
#define MT_TXS0_BW GENMASK(31, 29)
#define MT_TXS0_TID GENMASK(28, 26)
#define MT_TXS0_AMPDU BIT(25)
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/pci.c b/drivers/net/wireless/mediatek/mt76/mt76x0/pci.c
index 9277ff38b7a2..57ae362dad50 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x0/pci.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x0/pci.c
@@ -152,7 +152,8 @@ mt76x0e_probe(struct pci_dev *pdev, const struct pci_device_id *id)
static const struct mt76_driver_ops drv_ops = {
.txwi_size = sizeof(struct mt76x02_txwi),
.drv_flags = MT_DRV_TX_ALIGNED4_SKBS |
- MT_DRV_SW_RX_AIRTIME,
+ MT_DRV_SW_RX_AIRTIME |
+ MT_DRV_IGNORE_TXS_FAILED,
.survey_flags = SURVEY_INFO_TIME_TX,
.update_survey = mt76x02_update_channel,
.tx_prepare_skb = mt76x02_tx_prepare_skb,
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c b/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c
index 0422c332354a..520fd46227a7 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x0/usb.c
@@ -210,7 +210,8 @@ static int mt76x0u_probe(struct usb_interface *usb_intf,
const struct usb_device_id *id)
{
static const struct mt76_driver_ops drv_ops = {
- .drv_flags = MT_DRV_SW_RX_AIRTIME,
+ .drv_flags = MT_DRV_SW_RX_AIRTIME |
+ MT_DRV_IGNORE_TXS_FAILED,
.survey_flags = SURVEY_INFO_TIME_TX,
.update_survey = mt76x02_update_channel,
.tx_prepare_skb = mt76x02u_tx_prepare_skb,
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2/pci.c b/drivers/net/wireless/mediatek/mt76/mt76x2/pci.c
index df85ebc6e1df..7e2475b3c278 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x2/pci.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x2/pci.c
@@ -22,7 +22,8 @@ mt76x2e_probe(struct pci_dev *pdev, const struct pci_device_id *id)
static const struct mt76_driver_ops drv_ops = {
.txwi_size = sizeof(struct mt76x02_txwi),
.drv_flags = MT_DRV_TX_ALIGNED4_SKBS |
- MT_DRV_SW_RX_AIRTIME,
+ MT_DRV_SW_RX_AIRTIME |
+ MT_DRV_IGNORE_TXS_FAILED,
.survey_flags = SURVEY_INFO_TIME_TX,
.update_survey = mt76x02_update_channel,
.tx_prepare_skb = mt76x02_tx_prepare_skb,
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2/usb.c b/drivers/net/wireless/mediatek/mt76/mt76x2/usb.c
index d80430999219..70d3895762b4 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x2/usb.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x2/usb.c
@@ -29,7 +29,8 @@ static int mt76x2u_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{
static const struct mt76_driver_ops drv_ops = {
- .drv_flags = MT_DRV_SW_RX_AIRTIME,
+ .drv_flags = MT_DRV_SW_RX_AIRTIME |
+ MT_DRV_IGNORE_TXS_FAILED,
.survey_flags = SURVEY_INFO_TIME_TX,
.update_survey = mt76x02_update_channel,
.tx_prepare_skb = mt76x02u_tx_prepare_skb,
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
index 73d46ec1181a..35d9673ec0d8 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
@@ -1354,7 +1354,7 @@ bool mt7996_rx_check(struct mt76_dev *mdev, void *data, int len)
mt7996_mac_tx_free(dev, data, len);
return false;
case PKT_TYPE_TXS:
- for (rxd += 4; rxd + 8 <= end; rxd += 8)
+ for (rxd += MT_TXS_HDR_SIZE; rxd + MT_TXS_SIZE <= end; rxd += MT_TXS_SIZE)
mt7996_mac_add_txs(dev, rxd);
return false;
case PKT_TYPE_RX_FW_MONITOR:
@@ -1391,7 +1391,7 @@ void mt7996_queue_rx_skb(struct mt76_dev *mdev, enum mt76_rxq_id q,
mt7996_mcu_rx_event(dev, skb);
break;
case PKT_TYPE_TXS:
- for (rxd += 4; rxd + 8 <= end; rxd += 8)
+ for (rxd += MT_TXS_HDR_SIZE; rxd + MT_TXS_SIZE <= end; rxd += MT_TXS_SIZE)
mt7996_mac_add_txs(dev, rxd);
dev_kfree_skb(skb);
break;
diff --git a/drivers/net/wireless/mediatek/mt76/tx.c b/drivers/net/wireless/mediatek/mt76/tx.c
index 1809b03292c3..47cdccdbed6a 100644
--- a/drivers/net/wireless/mediatek/mt76/tx.c
+++ b/drivers/net/wireless/mediatek/mt76/tx.c
@@ -100,7 +100,8 @@ __mt76_tx_status_skb_done(struct mt76_dev *dev, struct sk_buff *skb, u8 flags,
return;
/* Tx status can be unreliable. if it fails, mark the frame as ACKed */
- if (flags & MT_TX_CB_TXS_FAILED) {
+ if (flags & MT_TX_CB_TXS_FAILED &&
+ (dev->drv->drv_flags & MT_DRV_IGNORE_TXS_FAILED)) {
info->status.rates[0].count = 0;
info->status.rates[0].idx = -1;
info->flags |= IEEE80211_TX_STAT_ACK;
diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
index 6e47dde93890..05e77d2bda37 100644
--- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
+++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
@@ -900,9 +900,10 @@ rtl8xxxu_writeN(struct rtl8xxxu_priv *priv, u16 addr, u8 *buf, u16 len)
return len;
write_error:
- dev_info(&udev->dev,
- "%s: Failed to write block at addr: %04x size: %04x\n",
- __func__, addr, blocksize);
+ if (rtl8xxxu_debug & RTL8XXXU_DEBUG_REG_WRITE)
+ dev_info(&udev->dev,
+ "%s: Failed to write block at addr: %04x size: %04x\n",
+ __func__, addr, blocksize);
return -EAGAIN;
}
@@ -4073,8 +4074,14 @@ static int rtl8xxxu_init_device(struct ieee80211_hw *hw)
*/
rtl8xxxu_write16(priv, REG_TRXFF_BNDY + 2, fops->trxff_boundary);
- ret = rtl8xxxu_download_firmware(priv);
- dev_dbg(dev, "%s: download_firmware %i\n", __func__, ret);
+ for (int retry = 5; retry >= 0 ; retry--) {
+ ret = rtl8xxxu_download_firmware(priv);
+ dev_dbg(dev, "%s: download_firmware %i\n", __func__, ret);
+ if (ret != -EAGAIN)
+ break;
+ if (retry)
+ dev_dbg(dev, "%s: retry firmware download\n", __func__);
+ }
if (ret)
goto exit;
ret = rtl8xxxu_start_firmware(priv);
diff --git a/drivers/net/wireless/realtek/rtw88/mac.c b/drivers/net/wireless/realtek/rtw88/mac.c
index 0c1c1ff31085..929182424b8b 100644
--- a/drivers/net/wireless/realtek/rtw88/mac.c
+++ b/drivers/net/wireless/realtek/rtw88/mac.c
@@ -783,7 +783,8 @@ static int __rtw_download_firmware(struct rtw_dev *rtwdev,
if (!check_firmware_size(data, size))
return -EINVAL;
- if (!ltecoex_read_reg(rtwdev, 0x38, <ecoex_bckp))
+ if (rtwdev->chip->ltecoex_addr &&
+ !ltecoex_read_reg(rtwdev, 0x38, <ecoex_bckp))
return -EBUSY;
wlan_cpu_enable(rtwdev, false);
@@ -801,7 +802,8 @@ static int __rtw_download_firmware(struct rtw_dev *rtwdev,
wlan_cpu_enable(rtwdev, true);
- if (!ltecoex_reg_write(rtwdev, 0x38, ltecoex_bckp)) {
+ if (rtwdev->chip->ltecoex_addr &&
+ !ltecoex_reg_write(rtwdev, 0x38, ltecoex_bckp)) {
ret = -EBUSY;
goto dlfw_fail;
}
diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c
index b90ea6c88b15..0d0b5123b5fe 100644
--- a/drivers/net/wireless/realtek/rtw88/main.c
+++ b/drivers/net/wireless/realtek/rtw88/main.c
@@ -1544,6 +1544,7 @@ static void rtw_init_ht_cap(struct rtw_dev *rtwdev,
{
const struct rtw_chip_info *chip = rtwdev->chip;
struct rtw_efuse *efuse = &rtwdev->efuse;
+ int i;
ht_cap->ht_supported = true;
ht_cap->cap = 0;
@@ -1563,25 +1564,20 @@ static void rtw_init_ht_cap(struct rtw_dev *rtwdev,
ht_cap->ampdu_factor = IEEE80211_HT_MAX_AMPDU_64K;
ht_cap->ampdu_density = chip->ampdu_density;
ht_cap->mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED;
- if (efuse->hw_cap.nss > 1) {
- ht_cap->mcs.rx_mask[0] = 0xFF;
- ht_cap->mcs.rx_mask[1] = 0xFF;
- ht_cap->mcs.rx_mask[4] = 0x01;
- ht_cap->mcs.rx_highest = cpu_to_le16(300);
- } else {
- ht_cap->mcs.rx_mask[0] = 0xFF;
- ht_cap->mcs.rx_mask[1] = 0x00;
- ht_cap->mcs.rx_mask[4] = 0x01;
- ht_cap->mcs.rx_highest = cpu_to_le16(150);
- }
+
+ for (i = 0; i < efuse->hw_cap.nss; i++)
+ ht_cap->mcs.rx_mask[i] = 0xFF;
+ ht_cap->mcs.rx_mask[4] = 0x01;
+ ht_cap->mcs.rx_highest = cpu_to_le16(150 * efuse->hw_cap.nss);
}
static void rtw_init_vht_cap(struct rtw_dev *rtwdev,
struct ieee80211_sta_vht_cap *vht_cap)
{
struct rtw_efuse *efuse = &rtwdev->efuse;
- u16 mcs_map;
+ u16 mcs_map = 0;
__le16 highest;
+ int i;
if (efuse->hw_cap.ptcl != EFUSE_HW_CAP_IGNORE &&
efuse->hw_cap.ptcl != EFUSE_HW_CAP_PTCL_VHT)
@@ -1604,21 +1600,15 @@ static void rtw_init_vht_cap(struct rtw_dev *rtwdev,
if (rtw_chip_has_rx_ldpc(rtwdev))
vht_cap->cap |= IEEE80211_VHT_CAP_RXLDPC;
- mcs_map = IEEE80211_VHT_MCS_SUPPORT_0_9 << 0 |
- IEEE80211_VHT_MCS_NOT_SUPPORTED << 4 |
- IEEE80211_VHT_MCS_NOT_SUPPORTED << 6 |
- IEEE80211_VHT_MCS_NOT_SUPPORTED << 8 |
- IEEE80211_VHT_MCS_NOT_SUPPORTED << 10 |
- IEEE80211_VHT_MCS_NOT_SUPPORTED << 12 |
- IEEE80211_VHT_MCS_NOT_SUPPORTED << 14;
- if (efuse->hw_cap.nss > 1) {
- highest = cpu_to_le16(780);
- mcs_map |= IEEE80211_VHT_MCS_SUPPORT_0_9 << 2;
- } else {
- highest = cpu_to_le16(390);
- mcs_map |= IEEE80211_VHT_MCS_NOT_SUPPORTED << 2;
+ for (i = 0; i < 8; i++) {
+ if (i < efuse->hw_cap.nss)
+ mcs_map |= IEEE80211_VHT_MCS_SUPPORT_0_9 << (i * 2);
+ else
+ mcs_map |= IEEE80211_VHT_MCS_NOT_SUPPORTED << (i * 2);
}
+ highest = cpu_to_le16(390 * efuse->hw_cap.nss);
+
vht_cap->vht_mcs.rx_mcs_map = cpu_to_le16(mcs_map);
vht_cap->vht_mcs.tx_mcs_map = cpu_to_le16(mcs_map);
vht_cap->vht_mcs.rx_highest = highest;
diff --git a/drivers/net/wireless/realtek/rtw88/reg.h b/drivers/net/wireless/realtek/rtw88/reg.h
index 7c6c11d50ff3..0e76bc07bdde 100644
--- a/drivers/net/wireless/realtek/rtw88/reg.h
+++ b/drivers/net/wireless/realtek/rtw88/reg.h
@@ -108,6 +108,7 @@
#define BIT_SHIFT_ROM_PGE 16
#define BIT_FW_INIT_RDY BIT(15)
#define BIT_FW_DW_RDY BIT(14)
+#define BIT_CPU_CLK_SEL (BIT(12) | BIT(13))
#define BIT_RPWM_TOGGLE BIT(7)
#define BIT_RAM_DL_SEL BIT(7) /* legacy only */
#define BIT_DMEM_CHKSUM_OK BIT(6)
@@ -125,7 +126,7 @@
BIT_CHECK_SUM_OK)
#define FW_READY_LEGACY (BIT_MCUFWDL_RDY | BIT_FWDL_CHK_RPT | \
BIT_WINTINI_RDY | BIT_RAM_DL_SEL)
-#define FW_READY_MASK 0xffff
+#define FW_READY_MASK (0xffff & ~BIT_CPU_CLK_SEL)
#define REG_MCU_TST_CFG 0x84
#define VAL_FW_TRIGGER 0x1
diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822b.c b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
index 3017a9760da8..99318a82b43f 100644
--- a/drivers/net/wireless/realtek/rtw88/rtw8822b.c
+++ b/drivers/net/wireless/realtek/rtw88/rtw8822b.c
@@ -975,11 +975,11 @@ static void rtw8822b_query_rx_desc(struct rtw_dev *rtwdev, u8 *rx_desc,
}
static void
-rtw8822b_set_tx_power_index_by_rate(struct rtw_dev *rtwdev, u8 path, u8 rs)
+rtw8822b_set_tx_power_index_by_rate(struct rtw_dev *rtwdev, u8 path,
+ u8 rs, u32 *phy_pwr_idx)
{
struct rtw_hal *hal = &rtwdev->hal;
static const u32 offset_txagc[2] = {0x1d00, 0x1d80};
- static u32 phy_pwr_idx;
u8 rate, rate_idx, pwr_index, shift;
int j;
@@ -987,12 +987,12 @@ rtw8822b_set_tx_power_index_by_rate(struct rtw_dev *rtwdev, u8 path, u8 rs)
rate = rtw_rate_section[rs][j];
pwr_index = hal->tx_pwr_tbl[path][rate];
shift = rate & 0x3;
- phy_pwr_idx |= ((u32)pwr_index << (shift * 8));
+ *phy_pwr_idx |= ((u32)pwr_index << (shift * 8));
if (shift == 0x3) {
rate_idx = rate & 0xfc;
rtw_write32(rtwdev, offset_txagc[path] + rate_idx,
- phy_pwr_idx);
- phy_pwr_idx = 0;
+ *phy_pwr_idx);
+ *phy_pwr_idx = 0;
}
}
}
@@ -1000,11 +1000,13 @@ rtw8822b_set_tx_power_index_by_rate(struct rtw_dev *rtwdev, u8 path, u8 rs)
static void rtw8822b_set_tx_power_index(struct rtw_dev *rtwdev)
{
struct rtw_hal *hal = &rtwdev->hal;
+ u32 phy_pwr_idx = 0;
int rs, path;
for (path = 0; path < hal->rf_path_num; path++) {
for (rs = 0; rs < RTW_RATE_SECTION_MAX; rs++)
- rtw8822b_set_tx_power_index_by_rate(rtwdev, path, rs);
+ rtw8822b_set_tx_power_index_by_rate(rtwdev, path, rs,
+ &phy_pwr_idx);
}
}
diff --git a/drivers/net/wireless/realtek/rtw88/util.c b/drivers/net/wireless/realtek/rtw88/util.c
index e222d3c01a77..66819f694405 100644
--- a/drivers/net/wireless/realtek/rtw88/util.c
+++ b/drivers/net/wireless/realtek/rtw88/util.c
@@ -101,7 +101,8 @@ void rtw_desc_to_mcsrate(u16 rate, u8 *mcs, u8 *nss)
*nss = 4;
*mcs = rate - DESC_RATEVHT4SS_MCS0;
} else if (rate >= DESC_RATEMCS0 &&
- rate <= DESC_RATEMCS15) {
+ rate <= DESC_RATEMCS31) {
+ *nss = 0;
*mcs = rate - DESC_RATEMCS0;
}
}
diff --git a/drivers/net/wireless/realtek/rtw89/fw.c b/drivers/net/wireless/realtek/rtw89/fw.c
index a8e2efae6e52..89b0a7970508 100644
--- a/drivers/net/wireless/realtek/rtw89/fw.c
+++ b/drivers/net/wireless/realtek/rtw89/fw.c
@@ -755,7 +755,6 @@ static int __rtw89_fw_download_hdr(struct rtw89_dev *rtwdev, const u8 *fw, u32 l
ret = rtw89_h2c_tx(rtwdev, skb, false);
if (ret) {
rtw89_err(rtwdev, "failed to send h2c\n");
- ret = -1;
goto fail;
}
@@ -816,7 +815,6 @@ static int __rtw89_fw_download_main(struct rtw89_dev *rtwdev,
ret = rtw89_h2c_tx(rtwdev, skb, true);
if (ret) {
rtw89_err(rtwdev, "failed to send h2c\n");
- ret = -1;
goto fail;
}
diff --git a/drivers/net/wireless/realtek/rtw89/regd.c b/drivers/net/wireless/realtek/rtw89/regd.c
index 9e2328db1865..91f0895d9f54 100644
--- a/drivers/net/wireless/realtek/rtw89/regd.c
+++ b/drivers/net/wireless/realtek/rtw89/regd.c
@@ -451,6 +451,7 @@ void rtw89_regd_notifier(struct wiphy *wiphy, struct regulatory_request *request
struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
struct rtw89_dev *rtwdev = hw->priv;
+ wiphy_lock(wiphy);
mutex_lock(&rtwdev->mutex);
rtw89_leave_ps_mode(rtwdev);
@@ -468,6 +469,7 @@ void rtw89_regd_notifier(struct wiphy *wiphy, struct regulatory_request *request
exit:
mutex_unlock(&rtwdev->mutex);
+ wiphy_unlock(wiphy);
}
static void __rtw89_reg_6ghz_power_recalc(struct rtw89_dev *rtwdev)
diff --git a/drivers/net/wireless/realtek/rtw89/ser.c b/drivers/net/wireless/realtek/rtw89/ser.c
index 01b17b8f4ff9..45165cf3e824 100644
--- a/drivers/net/wireless/realtek/rtw89/ser.c
+++ b/drivers/net/wireless/realtek/rtw89/ser.c
@@ -156,9 +156,11 @@ static void ser_state_run(struct rtw89_ser *ser, u8 evt)
rtw89_debug(rtwdev, RTW89_DBG_SER, "ser: %s receive %s\n",
ser_st_name(ser), ser_ev_name(ser, evt));
+ wiphy_lock(rtwdev->hw->wiphy);
mutex_lock(&rtwdev->mutex);
rtw89_leave_lps(rtwdev);
mutex_unlock(&rtwdev->mutex);
+ wiphy_unlock(rtwdev->hw->wiphy);
ser->st_tbl[ser->state].st_func(ser, evt);
}
@@ -676,9 +678,11 @@ static void ser_l2_reset_st_hdl(struct rtw89_ser *ser, u8 evt)
switch (evt) {
case SER_EV_STATE_IN:
+ wiphy_lock(rtwdev->hw->wiphy);
mutex_lock(&rtwdev->mutex);
ser_l2_reset_st_pre_hdl(ser);
mutex_unlock(&rtwdev->mutex);
+ wiphy_unlock(rtwdev->hw->wiphy);
ieee80211_restart_hw(rtwdev->hw);
ser_set_alarm(ser, SER_RECFG_TIMEOUT, SER_EV_L2_RECFG_TIMEOUT);
diff --git a/drivers/nvdimm/label.c b/drivers/nvdimm/label.c
index 082253a3a956..04f4a049599a 100644
--- a/drivers/nvdimm/label.c
+++ b/drivers/nvdimm/label.c
@@ -442,7 +442,8 @@ int nd_label_data_init(struct nvdimm_drvdata *ndd)
if (ndd->data)
return 0;
- if (ndd->nsarea.status || ndd->nsarea.max_xfer == 0) {
+ if (ndd->nsarea.status || ndd->nsarea.max_xfer == 0 ||
+ ndd->nsarea.config_size == 0) {
dev_dbg(ndd->dev, "failed to init config data area: (%u:%u)\n",
ndd->nsarea.max_xfer, ndd->nsarea.config_size);
return -ENXIO;
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 1e5c8220e365..97ab91a479d1 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -3429,6 +3429,9 @@ static const struct pci_device_id nvme_id_table[] = {
.driver_data = NVME_QUIRK_BOGUS_NID, },
{ PCI_DEVICE(0x1217, 0x8760), /* O2 Micro 64GB Steam Deck */
.driver_data = NVME_QUIRK_DMAPOOL_ALIGN_512, },
+ { PCI_DEVICE(0x126f, 0x1001), /* Silicon Motion generic */
+ .driver_data = NVME_QUIRK_NO_DEEPEST_PS |
+ NVME_QUIRK_IGNORE_DEV_SUBNQN, },
{ PCI_DEVICE(0x126f, 0x2262), /* Silicon Motion generic */
.driver_data = NVME_QUIRK_NO_DEEPEST_PS |
NVME_QUIRK_BOGUS_NID, },
@@ -3452,6 +3455,9 @@ static const struct pci_device_id nvme_id_table[] = {
NVME_QUIRK_IGNORE_DEV_SUBNQN, },
{ PCI_DEVICE(0x15b7, 0x5008), /* Sandisk SN530 */
.driver_data = NVME_QUIRK_BROKEN_MSI },
+ { PCI_DEVICE(0x15b7, 0x5009), /* Sandisk SN550 */
+ .driver_data = NVME_QUIRK_BROKEN_MSI |
+ NVME_QUIRK_NO_DEEPEST_PS },
{ PCI_DEVICE(0x1987, 0x5012), /* Phison E12 */
.driver_data = NVME_QUIRK_BOGUS_NID, },
{ PCI_DEVICE(0x1987, 0x5016), /* Phison E16 */
@@ -3535,6 +3541,8 @@ static const struct pci_device_id nvme_id_table[] = {
.driver_data = NVME_QUIRK_NO_DEEPEST_PS, },
{ PCI_DEVICE(0x1e49, 0x0041), /* ZHITAI TiPro7000 NVMe SSD */
.driver_data = NVME_QUIRK_NO_DEEPEST_PS, },
+ { PCI_DEVICE(0x025e, 0xf1ac), /* SOLIDIGM P44 pro SSDPFKKW020X7 */
+ .driver_data = NVME_QUIRK_NO_DEEPEST_PS, },
{ PCI_DEVICE(0xc0a9, 0x540a), /* Crucial P2 */
.driver_data = NVME_QUIRK_BOGUS_NID, },
{ PCI_DEVICE(0x1d97, 0x2263), /* Lexar NM610 */
diff --git a/drivers/nvme/target/tcp.c b/drivers/nvme/target/tcp.c
index a0af659a4c4a..6a539c3b8b53 100644
--- a/drivers/nvme/target/tcp.c
+++ b/drivers/nvme/target/tcp.c
@@ -1456,6 +1456,9 @@ static void nvmet_tcp_restore_socket_callbacks(struct nvmet_tcp_queue *queue)
{
struct socket *sock = queue->sock;
+ if (!queue->state_change)
+ return;
+
write_lock_bh(&sock->sk->sk_callback_lock);
sock->sk->sk_data_ready = queue->data_ready;
sock->sk->sk_state_change = queue->state_change;
diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index 3ea94bc26e80..dd00cc09ae5e 100644
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
@@ -456,9 +456,11 @@ static int nvmem_cell_info_to_nvmem_cell_entry_nodup(struct nvmem_device *nvmem,
cell->nbits = info->nbits;
cell->np = info->np;
- if (cell->nbits)
+ if (cell->nbits) {
cell->bytes = DIV_ROUND_UP(cell->nbits + cell->bit_offset,
BITS_PER_BYTE);
+ cell->raw_len = ALIGN(cell->bytes, nvmem->word_size);
+ }
if (!IS_ALIGNED(cell->offset, nvmem->stride)) {
dev_err(&nvmem->dev,
@@ -467,6 +469,18 @@ static int nvmem_cell_info_to_nvmem_cell_entry_nodup(struct nvmem_device *nvmem,
return -EINVAL;
}
+ if (!IS_ALIGNED(cell->raw_len, nvmem->word_size)) {
+ dev_err(&nvmem->dev,
+ "cell %s raw len %zd unaligned to nvmem word size %d\n",
+ cell->name ?: "<unknown>", cell->raw_len,
+ nvmem->word_size);
+
+ if (info->raw_len)
+ return -EINVAL;
+
+ cell->raw_len = ALIGN(cell->raw_len, nvmem->word_size);
+ }
+
return 0;
}
diff --git a/drivers/nvmem/qfprom.c b/drivers/nvmem/qfprom.c
index 6c554040c6e6..7b0621fdbc82 100644
--- a/drivers/nvmem/qfprom.c
+++ b/drivers/nvmem/qfprom.c
@@ -321,19 +321,32 @@ static int qfprom_reg_read(void *context,
unsigned int reg, void *_val, size_t bytes)
{
struct qfprom_priv *priv = context;
- u8 *val = _val;
- int i = 0, words = bytes;
+ u32 *val = _val;
void __iomem *base = priv->qfpcorrected;
+ int words = DIV_ROUND_UP(bytes, sizeof(u32));
+ int i;
if (read_raw_data && priv->qfpraw)
base = priv->qfpraw;
- while (words--)
- *val++ = readb(base + reg + i++);
+ for (i = 0; i < words; i++)
+ *val++ = readl(base + reg + i * sizeof(u32));
return 0;
}
+/* Align reads to word boundary */
+static void qfprom_fixup_dt_cell_info(struct nvmem_device *nvmem,
+ struct nvmem_cell_info *cell)
+{
+ unsigned int byte_offset = cell->offset % sizeof(u32);
+
+ cell->bit_offset += byte_offset * BITS_PER_BYTE;
+ cell->offset -= byte_offset;
+ if (byte_offset && !cell->nbits)
+ cell->nbits = cell->bytes * BITS_PER_BYTE;
+}
+
static void qfprom_runtime_disable(void *data)
{
pm_runtime_disable(data);
@@ -358,10 +371,11 @@ static int qfprom_probe(struct platform_device *pdev)
struct nvmem_config econfig = {
.name = "qfprom",
.add_legacy_fixed_of_cells = true,
- .stride = 1,
- .word_size = 1,
+ .stride = 4,
+ .word_size = 4,
.id = NVMEM_DEVID_AUTO,
.reg_read = qfprom_reg_read,
+ .fixup_dt_cell_info = qfprom_fixup_dt_cell_info,
};
struct device *dev = &pdev->dev;
struct resource *res;
diff --git a/drivers/nvmem/rockchip-otp.c b/drivers/nvmem/rockchip-otp.c
index 7107d68a2f8c..c6684ab14e74 100644
--- a/drivers/nvmem/rockchip-otp.c
+++ b/drivers/nvmem/rockchip-otp.c
@@ -59,7 +59,6 @@
#define RK3588_OTPC_AUTO_EN 0x08
#define RK3588_OTPC_INT_ST 0x84
#define RK3588_OTPC_DOUT0 0x20
-#define RK3588_NO_SECURE_OFFSET 0x300
#define RK3588_NBYTES 4
#define RK3588_BURST_NUM 1
#define RK3588_BURST_SHIFT 8
@@ -69,6 +68,7 @@
struct rockchip_data {
int size;
+ int read_offset;
const char * const *clks;
int num_clks;
nvmem_reg_read_t reg_read;
@@ -196,7 +196,7 @@ static int rk3588_otp_read(void *context, unsigned int offset,
addr_start = round_down(offset, RK3588_NBYTES) / RK3588_NBYTES;
addr_end = round_up(offset + bytes, RK3588_NBYTES) / RK3588_NBYTES;
addr_len = addr_end - addr_start;
- addr_start += RK3588_NO_SECURE_OFFSET;
+ addr_start += otp->data->read_offset / RK3588_NBYTES;
buf = kzalloc(array_size(addr_len, RK3588_NBYTES), GFP_KERNEL);
if (!buf)
@@ -273,12 +273,21 @@ static const struct rockchip_data px30_data = {
.reg_read = px30_otp_read,
};
+static const struct rockchip_data rk3576_data = {
+ .size = 0x100,
+ .read_offset = 0x700,
+ .clks = px30_otp_clocks,
+ .num_clks = ARRAY_SIZE(px30_otp_clocks),
+ .reg_read = rk3588_otp_read,
+};
+
static const char * const rk3588_otp_clocks[] = {
"otp", "apb_pclk", "phy", "arb",
};
static const struct rockchip_data rk3588_data = {
.size = 0x400,
+ .read_offset = 0xc00,
.clks = rk3588_otp_clocks,
.num_clks = ARRAY_SIZE(rk3588_otp_clocks),
.reg_read = rk3588_otp_read,
@@ -293,6 +302,10 @@ static const struct of_device_id rockchip_otp_match[] = {
.compatible = "rockchip,rk3308-otp",
.data = &px30_data,
},
+ {
+ .compatible = "rockchip,rk3576-otp",
+ .data = &rk3576_data,
+ },
{
.compatible = "rockchip,rk3588-otp",
.data = &rk3588_data,
diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
index e9ae66cc4189..a3927daebeb0 100644
--- a/drivers/pci/Kconfig
+++ b/drivers/pci/Kconfig
@@ -180,6 +180,12 @@ config PCI_P2PDMA
P2P DMA transactions must be between devices behind the same root
port.
+ Enabling this option will reduce the entropy of x86 KASLR memory
+ regions. For example - on a 46 bit system, the entropy goes down
+ from 16 bits to 15 bits. The actual reduction in entropy depends
+ on the physical address bits, on processor features, kernel config
+ (5 level page table) and physical memory present on the system.
+
If unsure, say N.
config PCI_LABEL
diff --git a/drivers/pci/controller/dwc/pcie-designware-ep.c b/drivers/pci/controller/dwc/pcie-designware-ep.c
index f2e5feba5526..26ad643fb424 100644
--- a/drivers/pci/controller/dwc/pcie-designware-ep.c
+++ b/drivers/pci/controller/dwc/pcie-designware-ep.c
@@ -281,7 +281,7 @@ static int dw_pcie_find_index(struct dw_pcie_ep *ep, phys_addr_t addr,
u32 index;
struct dw_pcie *pci = to_dw_pcie_from_ep(ep);
- for (index = 0; index < pci->num_ob_windows; index++) {
+ for_each_set_bit(index, ep->ob_window_map, pci->num_ob_windows) {
if (ep->outbound_addr[index] != addr)
continue;
*atu_index = index;
diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c
index 940af934ce1b..9bcf4c68058e 100644
--- a/drivers/pci/controller/pcie-brcmstb.c
+++ b/drivers/pci/controller/pcie-brcmstb.c
@@ -284,8 +284,8 @@ static int brcm_pcie_encode_ibar_size(u64 size)
if (log2_in >= 12 && log2_in <= 15)
/* Covers 4KB to 32KB (inclusive) */
return (log2_in - 12) + 0x1c;
- else if (log2_in >= 16 && log2_in <= 35)
- /* Covers 64KB to 32GB, (inclusive) */
+ else if (log2_in >= 16 && log2_in <= 36)
+ /* Covers 64KB to 64GB, (inclusive) */
return log2_in - 15;
/* Something is awry so disable */
return 0;
@@ -1632,3 +1632,4 @@ module_platform_driver(brcm_pcie_driver);
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Broadcom STB PCIe RC driver");
MODULE_AUTHOR("Broadcom");
+MODULE_SOFTDEP("pre: irq_bcm2712_mip");
diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c
index dfa222e02c4d..ad82feff0405 100644
--- a/drivers/pci/controller/vmd.c
+++ b/drivers/pci/controller/vmd.c
@@ -17,6 +17,8 @@
#include <linux/rculist.h>
#include <linux/rcupdate.h>
+#include <xen/xen.h>
+
#include <asm/irqdomain.h>
#define VMD_CFGBAR 0
@@ -981,6 +983,24 @@ static int vmd_probe(struct pci_dev *dev, const struct pci_device_id *id)
struct vmd_dev *vmd;
int err;
+ if (xen_domain()) {
+ /*
+ * Xen doesn't have knowledge about devices in the VMD bus
+ * because the config space of devices behind the VMD bridge is
+ * not known to Xen, and hence Xen cannot discover or configure
+ * them in any way.
+ *
+ * Bypass of MSI remapping won't work in that case as direct
+ * write by Linux to the MSI entries won't result in functional
+ * interrupts, as Xen is the entity that manages the host
+ * interrupt controller and must configure interrupts. However
+ * multiplexing of interrupts by the VMD bridge will work under
+ * Xen, so force the usage of that mode which must always be
+ * supported by VMD bridges.
+ */
+ features &= ~VMD_FEAT_CAN_BYPASS_MSI_REMAP;
+ }
+
if (resource_size(&dev->resource[VMD_CFGBAR]) < (1 << 20))
return -ENOMEM;
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index fba402f4f633..3f40be417856 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -802,11 +802,9 @@ static resource_size_t calculate_iosize(resource_size_t size,
size = (size & 0xff) + ((size & ~0xffUL) << 2);
#endif
size = size + size1;
- if (size < old_size)
- size = old_size;
- size = ALIGN(max(size, add_size) + children_add_size, align);
- return size;
+ size = max(size, add_size) + children_add_size;
+ return ALIGN(max(size, old_size), align);
}
static resource_size_t calculate_memsize(resource_size_t size,
diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
index 7bd1733d7977..77aa37de5988 100644
--- a/drivers/perf/arm-cmn.c
+++ b/drivers/perf/arm-cmn.c
@@ -684,8 +684,8 @@ static umode_t arm_cmn_event_attr_is_visible(struct kobject *kobj,
if ((chan == 5 && cmn->rsp_vc_num < 2) ||
(chan == 6 && cmn->dat_vc_num < 2) ||
- (chan == 7 && cmn->snp_vc_num < 2) ||
- (chan == 8 && cmn->req_vc_num < 2))
+ (chan == 7 && cmn->req_vc_num < 2) ||
+ (chan == 8 && cmn->snp_vc_num < 2))
return 0;
}
@@ -841,8 +841,8 @@ static umode_t arm_cmn_event_attr_is_visible(struct kobject *kobj,
_CMN_EVENT_XP(pub_##_name, (_event) | (4 << 5)), \
_CMN_EVENT_XP(rsp2_##_name, (_event) | (5 << 5)), \
_CMN_EVENT_XP(dat2_##_name, (_event) | (6 << 5)), \
- _CMN_EVENT_XP(snp2_##_name, (_event) | (7 << 5)), \
- _CMN_EVENT_XP(req2_##_name, (_event) | (8 << 5))
+ _CMN_EVENT_XP(req2_##_name, (_event) | (7 << 5)), \
+ _CMN_EVENT_XP(snp2_##_name, (_event) | (8 << 5))
#define CMN_EVENT_XP_DAT(_name, _event) \
_CMN_EVENT_XP_PORT(dat_##_name, (_event) | (3 << 5)), \
@@ -2443,6 +2443,7 @@ static int arm_cmn_probe(struct platform_device *pdev)
cmn->dev = &pdev->dev;
cmn->part = (unsigned long)device_get_match_data(cmn->dev);
+ cmn->cpu = cpumask_local_spread(0, dev_to_node(cmn->dev));
platform_set_drvdata(pdev, cmn);
if (cmn->part == PART_CMN600 && has_acpi_companion(cmn->dev)) {
@@ -2470,7 +2471,6 @@ static int arm_cmn_probe(struct platform_device *pdev)
if (err)
return err;
- cmn->cpu = cpumask_local_spread(0, dev_to_node(cmn->dev));
cmn->pmu = (struct pmu) {
.module = THIS_MODULE,
.attr_groups = arm_cmn_attr_groups,
diff --git a/drivers/perf/arm_pmuv3.c b/drivers/perf/arm_pmuv3.c
index 0e8f54168cb6..0858e6096453 100644
--- a/drivers/perf/arm_pmuv3.c
+++ b/drivers/perf/arm_pmuv3.c
@@ -751,10 +751,10 @@ static void armv8pmu_start(struct arm_pmu *cpu_pmu)
else
armv8pmu_disable_user_access();
+ kvm_vcpu_pmu_resync_el0();
+
/* Enable all counters */
armv8pmu_pmcr_write(armv8pmu_pmcr_read() | ARMV8_PMU_PMCR_E);
-
- kvm_vcpu_pmu_resync_el0();
}
static void armv8pmu_stop(struct arm_pmu *cpu_pmu)
diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
index a892e1d7e2d0..9417372a0155 100644
--- a/drivers/phy/phy-core.c
+++ b/drivers/phy/phy-core.c
@@ -400,13 +400,14 @@ EXPORT_SYMBOL_GPL(phy_power_off);
int phy_set_mode_ext(struct phy *phy, enum phy_mode mode, int submode)
{
- int ret;
+ int ret = 0;
- if (!phy || !phy->ops->set_mode)
+ if (!phy)
return 0;
mutex_lock(&phy->mutex);
- ret = phy->ops->set_mode(phy, mode, submode);
+ if (phy->ops->set_mode)
+ ret = phy->ops->set_mode(phy, mode, submode);
if (!ret)
phy->attrs.mode = mode;
mutex_unlock(&phy->mutex);
diff --git a/drivers/phy/renesas/phy-rcar-gen3-usb2.c b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
index aa578be2bcb6..9a6391361a0b 100644
--- a/drivers/phy/renesas/phy-rcar-gen3-usb2.c
+++ b/drivers/phy/renesas/phy-rcar-gen3-usb2.c
@@ -9,6 +9,7 @@
* Copyright (C) 2014 Cogent Embedded, Inc.
*/
+#include <linux/cleanup.h>
#include <linux/extcon-provider.h>
#include <linux/interrupt.h>
#include <linux/io.h>
@@ -19,12 +20,14 @@
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/regulator/consumer.h>
+#include <linux/reset.h>
#include <linux/string.h>
#include <linux/usb/of.h>
#include <linux/workqueue.h>
/******* USB2.0 Host registers (original offset is +0x200) *******/
#define USB2_INT_ENABLE 0x000
+#define USB2_AHB_BUS_CTR 0x008
#define USB2_USBCTR 0x00c
#define USB2_SPD_RSM_TIMSET 0x10c
#define USB2_OC_TIMSET 0x110
@@ -40,6 +43,10 @@
#define USB2_INT_ENABLE_USBH_INTB_EN BIT(2) /* For EHCI */
#define USB2_INT_ENABLE_USBH_INTA_EN BIT(1) /* For OHCI */
+/* AHB_BUS_CTR */
+#define USB2_AHB_BUS_CTR_MBL_MASK GENMASK(1, 0)
+#define USB2_AHB_BUS_CTR_MBL_INCR4 2
+
/* USBCTR */
#define USB2_USBCTR_DIRPD BIT(2)
#define USB2_USBCTR_PLL_RST BIT(1)
@@ -110,10 +117,10 @@ struct rcar_gen3_chan {
struct extcon_dev *extcon;
struct rcar_gen3_phy rphys[NUM_OF_PHYS];
struct regulator *vbus;
+ struct reset_control *rstc;
struct work_struct work;
- struct mutex lock; /* protects rphys[...].powered */
+ spinlock_t lock; /* protects access to hardware and driver data structure. */
enum usb_dr_mode dr_mode;
- int irq;
u32 obint_enable_bits;
bool extcon_host;
bool is_otg_channel;
@@ -124,6 +131,7 @@ struct rcar_gen3_chan {
struct rcar_gen3_phy_drv_data {
const struct phy_ops *phy_usb2_ops;
bool no_adp_ctrl;
+ bool init_bus;
};
/*
@@ -338,6 +346,8 @@ static ssize_t role_store(struct device *dev, struct device_attribute *attr,
bool is_b_device;
enum phy_mode cur_mode, new_mode;
+ guard(spinlock_irqsave)(&ch->lock);
+
if (!ch->is_otg_channel || !rcar_gen3_is_any_otg_rphy_initialized(ch))
return -EIO;
@@ -405,7 +415,7 @@ static void rcar_gen3_init_otg(struct rcar_gen3_chan *ch)
val = readl(usb2_base + USB2_ADPCTRL);
writel(val | USB2_ADPCTRL_IDPULLUP, usb2_base + USB2_ADPCTRL);
}
- msleep(20);
+ mdelay(20);
writel(0xffffffff, usb2_base + USB2_OBINTSTA);
writel(ch->obint_enable_bits, usb2_base + USB2_OBINTEN);
@@ -417,16 +427,27 @@ static irqreturn_t rcar_gen3_phy_usb2_irq(int irq, void *_ch)
{
struct rcar_gen3_chan *ch = _ch;
void __iomem *usb2_base = ch->base;
- u32 status = readl(usb2_base + USB2_OBINTSTA);
+ struct device *dev = ch->dev;
irqreturn_t ret = IRQ_NONE;
+ u32 status;
+
+ pm_runtime_get_noresume(dev);
+
+ if (pm_runtime_suspended(dev))
+ goto rpm_put;
- if (status & ch->obint_enable_bits) {
- dev_vdbg(ch->dev, "%s: %08x\n", __func__, status);
- writel(ch->obint_enable_bits, usb2_base + USB2_OBINTSTA);
- rcar_gen3_device_recognition(ch);
- ret = IRQ_HANDLED;
+ scoped_guard(spinlock, &ch->lock) {
+ status = readl(usb2_base + USB2_OBINTSTA);
+ if (status & ch->obint_enable_bits) {
+ dev_vdbg(dev, "%s: %08x\n", __func__, status);
+ writel(ch->obint_enable_bits, usb2_base + USB2_OBINTSTA);
+ rcar_gen3_device_recognition(ch);
+ ret = IRQ_HANDLED;
+ }
}
+rpm_put:
+ pm_runtime_put_noidle(dev);
return ret;
}
@@ -436,17 +457,8 @@ static int rcar_gen3_phy_usb2_init(struct phy *p)
struct rcar_gen3_chan *channel = rphy->ch;
void __iomem *usb2_base = channel->base;
u32 val;
- int ret;
- if (!rcar_gen3_is_any_rphy_initialized(channel) && channel->irq >= 0) {
- INIT_WORK(&channel->work, rcar_gen3_phy_usb2_work);
- ret = request_irq(channel->irq, rcar_gen3_phy_usb2_irq,
- IRQF_SHARED, dev_name(channel->dev), channel);
- if (ret < 0) {
- dev_err(channel->dev, "No irq handler (%d)\n", channel->irq);
- return ret;
- }
- }
+ guard(spinlock_irqsave)(&channel->lock);
/* Initialize USB2 part */
val = readl(usb2_base + USB2_INT_ENABLE);
@@ -474,6 +486,8 @@ static int rcar_gen3_phy_usb2_exit(struct phy *p)
void __iomem *usb2_base = channel->base;
u32 val;
+ guard(spinlock_irqsave)(&channel->lock);
+
rphy->initialized = false;
val = readl(usb2_base + USB2_INT_ENABLE);
@@ -482,9 +496,6 @@ static int rcar_gen3_phy_usb2_exit(struct phy *p)
val &= ~USB2_INT_ENABLE_UCOM_INTEN;
writel(val, usb2_base + USB2_INT_ENABLE);
- if (channel->irq >= 0 && !rcar_gen3_is_any_rphy_initialized(channel))
- free_irq(channel->irq, channel);
-
return 0;
}
@@ -496,16 +507,17 @@ static int rcar_gen3_phy_usb2_power_on(struct phy *p)
u32 val;
int ret = 0;
- mutex_lock(&channel->lock);
- if (!rcar_gen3_are_all_rphys_power_off(channel))
- goto out;
-
if (channel->vbus) {
ret = regulator_enable(channel->vbus);
if (ret)
- goto out;
+ return ret;
}
+ guard(spinlock_irqsave)(&channel->lock);
+
+ if (!rcar_gen3_are_all_rphys_power_off(channel))
+ goto out;
+
val = readl(usb2_base + USB2_USBCTR);
val |= USB2_USBCTR_PLL_RST;
writel(val, usb2_base + USB2_USBCTR);
@@ -515,7 +527,6 @@ static int rcar_gen3_phy_usb2_power_on(struct phy *p)
out:
/* The powered flag should be set for any other phys anyway */
rphy->powered = true;
- mutex_unlock(&channel->lock);
return 0;
}
@@ -526,18 +537,20 @@ static int rcar_gen3_phy_usb2_power_off(struct phy *p)
struct rcar_gen3_chan *channel = rphy->ch;
int ret = 0;
- mutex_lock(&channel->lock);
- rphy->powered = false;
+ scoped_guard(spinlock_irqsave, &channel->lock) {
+ rphy->powered = false;
- if (!rcar_gen3_are_all_rphys_power_off(channel))
- goto out;
+ if (rcar_gen3_are_all_rphys_power_off(channel)) {
+ u32 val = readl(channel->base + USB2_USBCTR);
+
+ val |= USB2_USBCTR_PLL_RST;
+ writel(val, channel->base + USB2_USBCTR);
+ }
+ }
if (channel->vbus)
ret = regulator_disable(channel->vbus);
-out:
- mutex_unlock(&channel->lock);
-
return ret;
}
@@ -645,13 +658,42 @@ static enum usb_dr_mode rcar_gen3_get_dr_mode(struct device_node *np)
return candidate;
}
+static int rcar_gen3_phy_usb2_init_bus(struct rcar_gen3_chan *channel)
+{
+ struct device *dev = channel->dev;
+ int ret;
+ u32 val;
+
+ channel->rstc = devm_reset_control_array_get_shared(dev);
+ if (IS_ERR(channel->rstc))
+ return PTR_ERR(channel->rstc);
+
+ ret = pm_runtime_resume_and_get(dev);
+ if (ret)
+ return ret;
+
+ ret = reset_control_deassert(channel->rstc);
+ if (ret)
+ goto rpm_put;
+
+ val = readl(channel->base + USB2_AHB_BUS_CTR);
+ val &= ~USB2_AHB_BUS_CTR_MBL_MASK;
+ val |= USB2_AHB_BUS_CTR_MBL_INCR4;
+ writel(val, channel->base + USB2_AHB_BUS_CTR);
+
+rpm_put:
+ pm_runtime_put(dev);
+
+ return ret;
+}
+
static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
{
const struct rcar_gen3_phy_drv_data *phy_data;
struct device *dev = &pdev->dev;
struct rcar_gen3_chan *channel;
struct phy_provider *provider;
- int ret = 0, i;
+ int ret = 0, i, irq;
if (!dev->of_node) {
dev_err(dev, "This driver needs device tree\n");
@@ -667,8 +709,6 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
return PTR_ERR(channel->base);
channel->obint_enable_bits = USB2_OBINT_BITS;
- /* get irq number here and request_irq for OTG in phy_init */
- channel->irq = platform_get_irq_optional(pdev, 0);
channel->dr_mode = rcar_gen3_get_dr_mode(dev->of_node);
if (channel->dr_mode != USB_DR_MODE_UNKNOWN) {
channel->is_otg_channel = true;
@@ -698,11 +738,20 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
goto error;
}
+ platform_set_drvdata(pdev, channel);
+ channel->dev = dev;
+
+ if (phy_data->init_bus) {
+ ret = rcar_gen3_phy_usb2_init_bus(channel);
+ if (ret)
+ goto error;
+ }
+
channel->soc_no_adp_ctrl = phy_data->no_adp_ctrl;
if (phy_data->no_adp_ctrl)
channel->obint_enable_bits = USB2_OBINT_IDCHG_EN;
- mutex_init(&channel->lock);
+ spin_lock_init(&channel->lock);
for (i = 0; i < NUM_OF_PHYS; i++) {
channel->rphys[i].phy = devm_phy_create(dev, NULL,
phy_data->phy_usb2_ops);
@@ -725,8 +774,19 @@ static int rcar_gen3_phy_usb2_probe(struct platform_device *pdev)
channel->vbus = NULL;
}
- platform_set_drvdata(pdev, channel);
- channel->dev = dev;
+ irq = platform_get_irq_optional(pdev, 0);
+ if (irq < 0 && irq != -ENXIO) {
+ ret = irq;
+ goto error;
+ } else if (irq > 0) {
+ INIT_WORK(&channel->work, rcar_gen3_phy_usb2_work);
+ ret = devm_request_irq(dev, irq, rcar_gen3_phy_usb2_irq,
+ IRQF_SHARED, dev_name(dev), channel);
+ if (ret < 0) {
+ dev_err(dev, "Failed to request irq (%d)\n", irq);
+ goto error;
+ }
+ }
provider = devm_of_phy_provider_register(dev, rcar_gen3_phy_usb2_xlate);
if (IS_ERR(provider)) {
@@ -754,6 +814,7 @@ static void rcar_gen3_phy_usb2_remove(struct platform_device *pdev)
if (channel->is_otg_channel)
device_remove_file(&pdev->dev, &dev_attr_role);
+ reset_control_assert(channel->rstc);
pm_runtime_disable(&pdev->dev);
};
diff --git a/drivers/phy/starfive/phy-jh7110-usb.c b/drivers/phy/starfive/phy-jh7110-usb.c
index 633912f8a05d..bf52b41110db 100644
--- a/drivers/phy/starfive/phy-jh7110-usb.c
+++ b/drivers/phy/starfive/phy-jh7110-usb.c
@@ -16,6 +16,8 @@
#include <linux/usb/of.h>
#define USB_125M_CLK_RATE 125000000
+#define USB_CLK_MODE_OFF 0x0
+#define USB_CLK_MODE_RX_NORMAL_PWR BIT(1)
#define USB_LS_KEEPALIVE_OFF 0x4
#define USB_LS_KEEPALIVE_ENABLE BIT(4)
@@ -68,6 +70,7 @@ static int jh7110_usb2_phy_init(struct phy *_phy)
{
struct jh7110_usb2_phy *phy = phy_get_drvdata(_phy);
int ret;
+ unsigned int val;
ret = clk_set_rate(phy->usb_125m_clk, USB_125M_CLK_RATE);
if (ret)
@@ -77,6 +80,10 @@ static int jh7110_usb2_phy_init(struct phy *_phy)
if (ret)
return ret;
+ val = readl(phy->regs + USB_CLK_MODE_OFF);
+ val |= USB_CLK_MODE_RX_NORMAL_PWR;
+ writel(val, phy->regs + USB_CLK_MODE_OFF);
+
return 0;
}
diff --git a/drivers/pinctrl/bcm/pinctrl-bcm281xx.c b/drivers/pinctrl/bcm/pinctrl-bcm281xx.c
index cf6efa9c0364..a039b490cdb8 100644
--- a/drivers/pinctrl/bcm/pinctrl-bcm281xx.c
+++ b/drivers/pinctrl/bcm/pinctrl-bcm281xx.c
@@ -72,7 +72,7 @@ static enum bcm281xx_pin_type hdmi_pin = BCM281XX_PIN_TYPE_HDMI;
struct bcm281xx_pin_function {
const char *name;
const char * const *groups;
- const unsigned ngroups;
+ const unsigned int ngroups;
};
/*
@@ -84,10 +84,10 @@ struct bcm281xx_pinctrl_data {
/* List of all pins */
const struct pinctrl_pin_desc *pins;
- const unsigned npins;
+ const unsigned int npins;
const struct bcm281xx_pin_function *functions;
- const unsigned nfunctions;
+ const unsigned int nfunctions;
struct regmap *regmap;
};
@@ -941,7 +941,7 @@ static struct bcm281xx_pinctrl_data bcm281xx_pinctrl = {
};
static inline enum bcm281xx_pin_type pin_type_get(struct pinctrl_dev *pctldev,
- unsigned pin)
+ unsigned int pin)
{
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
@@ -985,7 +985,7 @@ static int bcm281xx_pinctrl_get_groups_count(struct pinctrl_dev *pctldev)
}
static const char *bcm281xx_pinctrl_get_group_name(struct pinctrl_dev *pctldev,
- unsigned group)
+ unsigned int group)
{
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
@@ -993,9 +993,9 @@ static const char *bcm281xx_pinctrl_get_group_name(struct pinctrl_dev *pctldev,
}
static int bcm281xx_pinctrl_get_group_pins(struct pinctrl_dev *pctldev,
- unsigned group,
+ unsigned int group,
const unsigned **pins,
- unsigned *num_pins)
+ unsigned int *num_pins)
{
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
@@ -1007,7 +1007,7 @@ static int bcm281xx_pinctrl_get_group_pins(struct pinctrl_dev *pctldev,
static void bcm281xx_pinctrl_pin_dbg_show(struct pinctrl_dev *pctldev,
struct seq_file *s,
- unsigned offset)
+ unsigned int offset)
{
seq_printf(s, " %s", dev_name(pctldev->dev));
}
@@ -1029,7 +1029,7 @@ static int bcm281xx_pinctrl_get_fcns_count(struct pinctrl_dev *pctldev)
}
static const char *bcm281xx_pinctrl_get_fcn_name(struct pinctrl_dev *pctldev,
- unsigned function)
+ unsigned int function)
{
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
@@ -1037,9 +1037,9 @@ static const char *bcm281xx_pinctrl_get_fcn_name(struct pinctrl_dev *pctldev,
}
static int bcm281xx_pinctrl_get_fcn_groups(struct pinctrl_dev *pctldev,
- unsigned function,
+ unsigned int function,
const char * const **groups,
- unsigned * const num_groups)
+ unsigned int * const num_groups)
{
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
@@ -1050,8 +1050,8 @@ static int bcm281xx_pinctrl_get_fcn_groups(struct pinctrl_dev *pctldev,
}
static int bcm281xx_pinmux_set(struct pinctrl_dev *pctldev,
- unsigned function,
- unsigned group)
+ unsigned int function,
+ unsigned int group)
{
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
const struct bcm281xx_pin_function *f = &pdata->functions[function];
@@ -1082,7 +1082,7 @@ static const struct pinmux_ops bcm281xx_pinctrl_pinmux_ops = {
};
static int bcm281xx_pinctrl_pin_config_get(struct pinctrl_dev *pctldev,
- unsigned pin,
+ unsigned int pin,
unsigned long *config)
{
return -ENOTSUPP;
@@ -1091,9 +1091,9 @@ static int bcm281xx_pinctrl_pin_config_get(struct pinctrl_dev *pctldev,
/* Goes through the configs and update register val/mask */
static int bcm281xx_std_pin_update(struct pinctrl_dev *pctldev,
- unsigned pin,
+ unsigned int pin,
unsigned long *configs,
- unsigned num_configs,
+ unsigned int num_configs,
u32 *val,
u32 *mask)
{
@@ -1207,9 +1207,9 @@ static const u16 bcm281xx_pullup_map[] = {
/* Goes through the configs and update register val/mask */
static int bcm281xx_i2c_pin_update(struct pinctrl_dev *pctldev,
- unsigned pin,
+ unsigned int pin,
unsigned long *configs,
- unsigned num_configs,
+ unsigned int num_configs,
u32 *val,
u32 *mask)
{
@@ -1277,9 +1277,9 @@ static int bcm281xx_i2c_pin_update(struct pinctrl_dev *pctldev,
/* Goes through the configs and update register val/mask */
static int bcm281xx_hdmi_pin_update(struct pinctrl_dev *pctldev,
- unsigned pin,
+ unsigned int pin,
unsigned long *configs,
- unsigned num_configs,
+ unsigned int num_configs,
u32 *val,
u32 *mask)
{
@@ -1321,9 +1321,9 @@ static int bcm281xx_hdmi_pin_update(struct pinctrl_dev *pctldev,
}
static int bcm281xx_pinctrl_pin_config_set(struct pinctrl_dev *pctldev,
- unsigned pin,
+ unsigned int pin,
unsigned long *configs,
- unsigned num_configs)
+ unsigned int num_configs)
{
struct bcm281xx_pinctrl_data *pdata = pinctrl_dev_get_drvdata(pctldev);
enum bcm281xx_pin_type pin_type;
diff --git a/drivers/pinctrl/devicetree.c b/drivers/pinctrl/devicetree.c
index 5ee746cb81f5..6520b88db110 100644
--- a/drivers/pinctrl/devicetree.c
+++ b/drivers/pinctrl/devicetree.c
@@ -143,10 +143,14 @@ static int dt_to_map_one_config(struct pinctrl *p,
pctldev = get_pinctrl_dev_from_of_node(np_pctldev);
if (pctldev)
break;
- /* Do not defer probing of hogs (circular loop) */
+ /*
+ * Do not defer probing of hogs (circular loop)
+ *
+ * Return 1 to let the caller catch the case.
+ */
if (np_pctldev == p->dev->of_node) {
of_node_put(np_pctldev);
- return -ENODEV;
+ return 1;
}
}
of_node_put(np_pctldev);
@@ -265,6 +269,8 @@ int pinctrl_dt_to_map(struct pinctrl *p, struct pinctrl_dev *pctldev)
ret = dt_to_map_one_config(p, pctldev, statename,
np_config);
of_node_put(np_config);
+ if (ret == 1)
+ continue;
if (ret < 0)
goto err;
}
diff --git a/drivers/pinctrl/meson/pinctrl-meson.c b/drivers/pinctrl/meson/pinctrl-meson.c
index 524424ee6c4e..5cc00fdc48d8 100644
--- a/drivers/pinctrl/meson/pinctrl-meson.c
+++ b/drivers/pinctrl/meson/pinctrl-meson.c
@@ -486,7 +486,7 @@ static int meson_pinconf_get(struct pinctrl_dev *pcdev, unsigned int pin,
case PIN_CONFIG_BIAS_PULL_DOWN:
case PIN_CONFIG_BIAS_PULL_UP:
if (meson_pinconf_get_pull(pc, pin) == param)
- arg = 1;
+ arg = 60000;
else
return -EINVAL;
break;
diff --git a/drivers/pinctrl/qcom/pinctrl-apq8064.c b/drivers/pinctrl/qcom/pinctrl-apq8064.c
index 20c3b9025044..a18df4162299 100644
--- a/drivers/pinctrl/qcom/pinctrl-apq8064.c
+++ b/drivers/pinctrl/qcom/pinctrl-apq8064.c
@@ -629,7 +629,7 @@ static struct platform_driver apq8064_pinctrl_driver = {
.of_match_table = apq8064_pinctrl_of_match,
},
.probe = apq8064_pinctrl_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init apq8064_pinctrl_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-apq8084.c b/drivers/pinctrl/qcom/pinctrl-apq8084.c
index 3fc0a40762b6..afada80e52a2 100644
--- a/drivers/pinctrl/qcom/pinctrl-apq8084.c
+++ b/drivers/pinctrl/qcom/pinctrl-apq8084.c
@@ -1207,7 +1207,7 @@ static struct platform_driver apq8084_pinctrl_driver = {
.of_match_table = apq8084_pinctrl_of_match,
},
.probe = apq8084_pinctrl_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init apq8084_pinctrl_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-ipq4019.c b/drivers/pinctrl/qcom/pinctrl-ipq4019.c
index 1f7944dd829d..cb13576ad6cf 100644
--- a/drivers/pinctrl/qcom/pinctrl-ipq4019.c
+++ b/drivers/pinctrl/qcom/pinctrl-ipq4019.c
@@ -710,7 +710,7 @@ static struct platform_driver ipq4019_pinctrl_driver = {
.of_match_table = ipq4019_pinctrl_of_match,
},
.probe = ipq4019_pinctrl_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init ipq4019_pinctrl_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-ipq5018.c b/drivers/pinctrl/qcom/pinctrl-ipq5018.c
index e2951f81c3ee..68f65b57003e 100644
--- a/drivers/pinctrl/qcom/pinctrl-ipq5018.c
+++ b/drivers/pinctrl/qcom/pinctrl-ipq5018.c
@@ -754,7 +754,7 @@ static struct platform_driver ipq5018_pinctrl_driver = {
.of_match_table = ipq5018_pinctrl_of_match,
},
.probe = ipq5018_pinctrl_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init ipq5018_pinctrl_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-ipq5332.c b/drivers/pinctrl/qcom/pinctrl-ipq5332.c
index 625f8014051f..882175118970 100644
--- a/drivers/pinctrl/qcom/pinctrl-ipq5332.c
+++ b/drivers/pinctrl/qcom/pinctrl-ipq5332.c
@@ -834,7 +834,7 @@ static struct platform_driver ipq5332_pinctrl_driver = {
.of_match_table = ipq5332_pinctrl_of_match,
},
.probe = ipq5332_pinctrl_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init ipq5332_pinctrl_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-ipq6018.c b/drivers/pinctrl/qcom/pinctrl-ipq6018.c
index 0ad08647dbcd..ac330d8712b5 100644
--- a/drivers/pinctrl/qcom/pinctrl-ipq6018.c
+++ b/drivers/pinctrl/qcom/pinctrl-ipq6018.c
@@ -1080,7 +1080,7 @@ static struct platform_driver ipq6018_pinctrl_driver = {
.of_match_table = ipq6018_pinctrl_of_match,
},
.probe = ipq6018_pinctrl_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init ipq6018_pinctrl_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-ipq8064.c b/drivers/pinctrl/qcom/pinctrl-ipq8064.c
index e2bb94e86aef..e10e1bc4c911 100644
--- a/drivers/pinctrl/qcom/pinctrl-ipq8064.c
+++ b/drivers/pinctrl/qcom/pinctrl-ipq8064.c
@@ -631,7 +631,7 @@ static struct platform_driver ipq8064_pinctrl_driver = {
.of_match_table = ipq8064_pinctrl_of_match,
},
.probe = ipq8064_pinctrl_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init ipq8064_pinctrl_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-ipq8074.c b/drivers/pinctrl/qcom/pinctrl-ipq8074.c
index 337f3a1c92c1..fee32c1d1d3e 100644
--- a/drivers/pinctrl/qcom/pinctrl-ipq8074.c
+++ b/drivers/pinctrl/qcom/pinctrl-ipq8074.c
@@ -1041,7 +1041,7 @@ static struct platform_driver ipq8074_pinctrl_driver = {
.of_match_table = ipq8074_pinctrl_of_match,
},
.probe = ipq8074_pinctrl_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init ipq8074_pinctrl_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-ipq9574.c b/drivers/pinctrl/qcom/pinctrl-ipq9574.c
index e2491617b236..20ab59cb621b 100644
--- a/drivers/pinctrl/qcom/pinctrl-ipq9574.c
+++ b/drivers/pinctrl/qcom/pinctrl-ipq9574.c
@@ -799,7 +799,7 @@ static struct platform_driver ipq9574_pinctrl_driver = {
.of_match_table = ipq9574_pinctrl_of_match,
},
.probe = ipq9574_pinctrl_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init ipq9574_pinctrl_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-mdm9607.c b/drivers/pinctrl/qcom/pinctrl-mdm9607.c
index e7cd3ef1cf3e..415d24e16267 100644
--- a/drivers/pinctrl/qcom/pinctrl-mdm9607.c
+++ b/drivers/pinctrl/qcom/pinctrl-mdm9607.c
@@ -1059,7 +1059,7 @@ static struct platform_driver mdm9607_pinctrl_driver = {
.of_match_table = mdm9607_pinctrl_of_match,
},
.probe = mdm9607_pinctrl_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init mdm9607_pinctrl_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-mdm9615.c b/drivers/pinctrl/qcom/pinctrl-mdm9615.c
index 0a2ae383d3d5..3f2eafea0b24 100644
--- a/drivers/pinctrl/qcom/pinctrl-mdm9615.c
+++ b/drivers/pinctrl/qcom/pinctrl-mdm9615.c
@@ -446,7 +446,7 @@ static struct platform_driver mdm9615_pinctrl_driver = {
.of_match_table = mdm9615_pinctrl_of_match,
},
.probe = mdm9615_pinctrl_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init mdm9615_pinctrl_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c
index b252fc22f64e..ed70767ca0f0 100644
--- a/drivers/pinctrl/qcom/pinctrl-msm.c
+++ b/drivers/pinctrl/qcom/pinctrl-msm.c
@@ -43,7 +43,6 @@
* @pctrl: pinctrl handle.
* @chip: gpiochip handle.
* @desc: pin controller descriptor
- * @restart_nb: restart notifier block.
* @irq: parent irq for the TLMM irq_chip.
* @intr_target_use_scm: route irq to application cpu using scm calls
* @lock: Spinlock to protect register resources as well
@@ -63,7 +62,6 @@ struct msm_pinctrl {
struct pinctrl_dev *pctrl;
struct gpio_chip chip;
struct pinctrl_desc desc;
- struct notifier_block restart_nb;
int irq;
@@ -1424,10 +1422,9 @@ static int msm_gpio_init(struct msm_pinctrl *pctrl)
return 0;
}
-static int msm_ps_hold_restart(struct notifier_block *nb, unsigned long action,
- void *data)
+static int msm_ps_hold_restart(struct sys_off_data *data)
{
- struct msm_pinctrl *pctrl = container_of(nb, struct msm_pinctrl, restart_nb);
+ struct msm_pinctrl *pctrl = data->cb_data;
writel(0, pctrl->regs[0] + PS_HOLD_OFFSET);
mdelay(1000);
@@ -1438,7 +1435,11 @@ static struct msm_pinctrl *poweroff_pctrl;
static void msm_ps_hold_poweroff(void)
{
- msm_ps_hold_restart(&poweroff_pctrl->restart_nb, 0, NULL);
+ struct sys_off_data data = {
+ .cb_data = poweroff_pctrl,
+ };
+
+ msm_ps_hold_restart(&data);
}
static void msm_pinctrl_setup_pm_reset(struct msm_pinctrl *pctrl)
@@ -1448,9 +1449,11 @@ static void msm_pinctrl_setup_pm_reset(struct msm_pinctrl *pctrl)
for (i = 0; i < pctrl->soc->nfunctions; i++)
if (!strcmp(func[i].name, "ps_hold")) {
- pctrl->restart_nb.notifier_call = msm_ps_hold_restart;
- pctrl->restart_nb.priority = 128;
- if (register_restart_handler(&pctrl->restart_nb))
+ if (devm_register_sys_off_handler(pctrl->dev,
+ SYS_OFF_MODE_RESTART,
+ 128,
+ msm_ps_hold_restart,
+ pctrl))
dev_err(pctrl->dev,
"failed to setup restart handler.\n");
poweroff_pctrl = pctrl;
@@ -1547,15 +1550,11 @@ int msm_pinctrl_probe(struct platform_device *pdev,
}
EXPORT_SYMBOL(msm_pinctrl_probe);
-int msm_pinctrl_remove(struct platform_device *pdev)
+void msm_pinctrl_remove(struct platform_device *pdev)
{
struct msm_pinctrl *pctrl = platform_get_drvdata(pdev);
gpiochip_remove(&pctrl->chip);
-
- unregister_restart_handler(&pctrl->restart_nb);
-
- return 0;
}
EXPORT_SYMBOL(msm_pinctrl_remove);
diff --git a/drivers/pinctrl/qcom/pinctrl-msm.h b/drivers/pinctrl/qcom/pinctrl-msm.h
index 1d2f2e904da1..4968d08a384d 100644
--- a/drivers/pinctrl/qcom/pinctrl-msm.h
+++ b/drivers/pinctrl/qcom/pinctrl-msm.h
@@ -166,6 +166,6 @@ extern const struct dev_pm_ops msm_pinctrl_dev_pm_ops;
int msm_pinctrl_probe(struct platform_device *pdev,
const struct msm_pinctrl_soc_data *soc_data);
-int msm_pinctrl_remove(struct platform_device *pdev);
+void msm_pinctrl_remove(struct platform_device *pdev);
#endif
diff --git a/drivers/pinctrl/qcom/pinctrl-msm8226.c b/drivers/pinctrl/qcom/pinctrl-msm8226.c
index 994619840a70..90b4004e7faf 100644
--- a/drivers/pinctrl/qcom/pinctrl-msm8226.c
+++ b/drivers/pinctrl/qcom/pinctrl-msm8226.c
@@ -638,7 +638,7 @@ static struct platform_driver msm8226_pinctrl_driver = {
.of_match_table = msm8226_pinctrl_of_match,
},
.probe = msm8226_pinctrl_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init msm8226_pinctrl_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-msm8660.c b/drivers/pinctrl/qcom/pinctrl-msm8660.c
index 999a5f867eb5..dba6d531b4a1 100644
--- a/drivers/pinctrl/qcom/pinctrl-msm8660.c
+++ b/drivers/pinctrl/qcom/pinctrl-msm8660.c
@@ -981,7 +981,7 @@ static struct platform_driver msm8660_pinctrl_driver = {
.of_match_table = msm8660_pinctrl_of_match,
},
.probe = msm8660_pinctrl_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init msm8660_pinctrl_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-msm8909.c b/drivers/pinctrl/qcom/pinctrl-msm8909.c
index 756856d20d6b..14b17ba9f906 100644
--- a/drivers/pinctrl/qcom/pinctrl-msm8909.c
+++ b/drivers/pinctrl/qcom/pinctrl-msm8909.c
@@ -929,7 +929,7 @@ static struct platform_driver msm8909_pinctrl_driver = {
.of_match_table = msm8909_pinctrl_of_match,
},
.probe = msm8909_pinctrl_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init msm8909_pinctrl_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-msm8916.c b/drivers/pinctrl/qcom/pinctrl-msm8916.c
index cea5c54f92fe..184dcf842273 100644
--- a/drivers/pinctrl/qcom/pinctrl-msm8916.c
+++ b/drivers/pinctrl/qcom/pinctrl-msm8916.c
@@ -969,7 +969,7 @@ static struct platform_driver msm8916_pinctrl_driver = {
.of_match_table = msm8916_pinctrl_of_match,
},
.probe = msm8916_pinctrl_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init msm8916_pinctrl_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-msm8953.c b/drivers/pinctrl/qcom/pinctrl-msm8953.c
index 998351bdfee1..c2253821ae8d 100644
--- a/drivers/pinctrl/qcom/pinctrl-msm8953.c
+++ b/drivers/pinctrl/qcom/pinctrl-msm8953.c
@@ -1816,7 +1816,7 @@ static struct platform_driver msm8953_pinctrl_driver = {
.of_match_table = msm8953_pinctrl_of_match,
},
.probe = msm8953_pinctrl_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init msm8953_pinctrl_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-msm8960.c b/drivers/pinctrl/qcom/pinctrl-msm8960.c
index ebe230b3b437..6b9148d226e9 100644
--- a/drivers/pinctrl/qcom/pinctrl-msm8960.c
+++ b/drivers/pinctrl/qcom/pinctrl-msm8960.c
@@ -1246,7 +1246,7 @@ static struct platform_driver msm8960_pinctrl_driver = {
.of_match_table = msm8960_pinctrl_of_match,
},
.probe = msm8960_pinctrl_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init msm8960_pinctrl_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-msm8976.c b/drivers/pinctrl/qcom/pinctrl-msm8976.c
index c30d80e4e98c..9a951888e8a1 100644
--- a/drivers/pinctrl/qcom/pinctrl-msm8976.c
+++ b/drivers/pinctrl/qcom/pinctrl-msm8976.c
@@ -1096,7 +1096,7 @@ static struct platform_driver msm8976_pinctrl_driver = {
.of_match_table = msm8976_pinctrl_of_match,
},
.probe = msm8976_pinctrl_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init msm8976_pinctrl_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-msm8994.c b/drivers/pinctrl/qcom/pinctrl-msm8994.c
index b1a6759ab4a5..1ed1dd32d6c7 100644
--- a/drivers/pinctrl/qcom/pinctrl-msm8994.c
+++ b/drivers/pinctrl/qcom/pinctrl-msm8994.c
@@ -1343,7 +1343,7 @@ static struct platform_driver msm8994_pinctrl_driver = {
.of_match_table = msm8994_pinctrl_of_match,
},
.probe = msm8994_pinctrl_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init msm8994_pinctrl_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-msm8996.c b/drivers/pinctrl/qcom/pinctrl-msm8996.c
index 46cc0b49dbab..5f0e7f78fd51 100644
--- a/drivers/pinctrl/qcom/pinctrl-msm8996.c
+++ b/drivers/pinctrl/qcom/pinctrl-msm8996.c
@@ -1906,7 +1906,7 @@ static struct platform_driver msm8996_pinctrl_driver = {
.of_match_table = msm8996_pinctrl_of_match,
},
.probe = msm8996_pinctrl_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init msm8996_pinctrl_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-msm8998.c b/drivers/pinctrl/qcom/pinctrl-msm8998.c
index b7cbf32b3125..4aaf45e54f3a 100644
--- a/drivers/pinctrl/qcom/pinctrl-msm8998.c
+++ b/drivers/pinctrl/qcom/pinctrl-msm8998.c
@@ -1535,7 +1535,7 @@ static struct platform_driver msm8998_pinctrl_driver = {
.of_match_table = msm8998_pinctrl_of_match,
},
.probe = msm8998_pinctrl_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init msm8998_pinctrl_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-msm8x74.c b/drivers/pinctrl/qcom/pinctrl-msm8x74.c
index d5fe62992849..58b4f6f31ae6 100644
--- a/drivers/pinctrl/qcom/pinctrl-msm8x74.c
+++ b/drivers/pinctrl/qcom/pinctrl-msm8x74.c
@@ -1071,7 +1071,7 @@ static struct platform_driver msm8x74_pinctrl_driver = {
.of_match_table = msm8x74_pinctrl_of_match,
},
.probe = msm8x74_pinctrl_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init msm8x74_pinctrl_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-qcm2290.c b/drivers/pinctrl/qcom/pinctrl-qcm2290.c
index ba699eac9ee8..f5c1c427b44e 100644
--- a/drivers/pinctrl/qcom/pinctrl-qcm2290.c
+++ b/drivers/pinctrl/qcom/pinctrl-qcm2290.c
@@ -1113,7 +1113,7 @@ static struct platform_driver qcm2290_pinctrl_driver = {
.of_match_table = qcm2290_pinctrl_of_match,
},
.probe = qcm2290_pinctrl_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init qcm2290_pinctrl_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-qcs404.c b/drivers/pinctrl/qcom/pinctrl-qcs404.c
index ae7224012f8a..9a875b7dc998 100644
--- a/drivers/pinctrl/qcom/pinctrl-qcs404.c
+++ b/drivers/pinctrl/qcom/pinctrl-qcs404.c
@@ -1644,7 +1644,7 @@ static struct platform_driver qcs404_pinctrl_driver = {
.of_match_table = qcs404_pinctrl_of_match,
},
.probe = qcs404_pinctrl_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init qcs404_pinctrl_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-qdf2xxx.c b/drivers/pinctrl/qcom/pinctrl-qdf2xxx.c
index b5808fcfb13c..4d2f6f495163 100644
--- a/drivers/pinctrl/qcom/pinctrl-qdf2xxx.c
+++ b/drivers/pinctrl/qcom/pinctrl-qdf2xxx.c
@@ -145,7 +145,7 @@ static struct platform_driver qdf2xxx_pinctrl_driver = {
.acpi_match_table = qdf2xxx_acpi_ids,
},
.probe = qdf2xxx_pinctrl_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init qdf2xxx_pinctrl_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-qdu1000.c b/drivers/pinctrl/qcom/pinctrl-qdu1000.c
index 47bc529ef550..da4f940bc8d4 100644
--- a/drivers/pinctrl/qcom/pinctrl-qdu1000.c
+++ b/drivers/pinctrl/qcom/pinctrl-qdu1000.c
@@ -1248,7 +1248,7 @@ static struct platform_driver qdu1000_tlmm_driver = {
.of_match_table = qdu1000_tlmm_of_match,
},
.probe = qdu1000_tlmm_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init qdu1000_tlmm_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-sa8775p.c b/drivers/pinctrl/qcom/pinctrl-sa8775p.c
index 8fdea25d8d67..5459c0c681a2 100644
--- a/drivers/pinctrl/qcom/pinctrl-sa8775p.c
+++ b/drivers/pinctrl/qcom/pinctrl-sa8775p.c
@@ -1530,7 +1530,7 @@ static struct platform_driver sa8775p_pinctrl_driver = {
.of_match_table = sa8775p_pinctrl_of_match,
},
.probe = sa8775p_pinctrl_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init sa8775p_pinctrl_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-sc7180.c b/drivers/pinctrl/qcom/pinctrl-sc7180.c
index 6eb0c73791c0..c27aaa599b91 100644
--- a/drivers/pinctrl/qcom/pinctrl-sc7180.c
+++ b/drivers/pinctrl/qcom/pinctrl-sc7180.c
@@ -1159,7 +1159,7 @@ static struct platform_driver sc7180_pinctrl_driver = {
.of_match_table = sc7180_pinctrl_of_match,
},
.probe = sc7180_pinctrl_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init sc7180_pinctrl_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-sc7280.c b/drivers/pinctrl/qcom/pinctrl-sc7280.c
index 0c10eeb60b55..c2db663e396e 100644
--- a/drivers/pinctrl/qcom/pinctrl-sc7280.c
+++ b/drivers/pinctrl/qcom/pinctrl-sc7280.c
@@ -1505,7 +1505,7 @@ static struct platform_driver sc7280_pinctrl_driver = {
.of_match_table = sc7280_pinctrl_of_match,
},
.probe = sc7280_pinctrl_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init sc7280_pinctrl_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-sc8180x.c b/drivers/pinctrl/qcom/pinctrl-sc8180x.c
index d6a79ad41a40..cfa7c8be9770 100644
--- a/drivers/pinctrl/qcom/pinctrl-sc8180x.c
+++ b/drivers/pinctrl/qcom/pinctrl-sc8180x.c
@@ -1720,7 +1720,7 @@ static struct platform_driver sc8180x_pinctrl_driver = {
.acpi_match_table = sc8180x_pinctrl_acpi_match,
},
.probe = sc8180x_pinctrl_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init sc8180x_pinctrl_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-sc8280xp.c b/drivers/pinctrl/qcom/pinctrl-sc8280xp.c
index 96f4fb5a5d29..4b1c49697698 100644
--- a/drivers/pinctrl/qcom/pinctrl-sc8280xp.c
+++ b/drivers/pinctrl/qcom/pinctrl-sc8280xp.c
@@ -1926,7 +1926,7 @@ static struct platform_driver sc8280xp_pinctrl_driver = {
.of_match_table = sc8280xp_pinctrl_of_match,
},
.probe = sc8280xp_pinctrl_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init sc8280xp_pinctrl_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-sdm660.c b/drivers/pinctrl/qcom/pinctrl-sdm660.c
index c2e0d5c034ac..b0c29a24b09b 100644
--- a/drivers/pinctrl/qcom/pinctrl-sdm660.c
+++ b/drivers/pinctrl/qcom/pinctrl-sdm660.c
@@ -1428,7 +1428,7 @@ static struct platform_driver sdm660_pinctrl_driver = {
.of_match_table = sdm660_pinctrl_of_match,
},
.probe = sdm660_pinctrl_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init sdm660_pinctrl_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-sdm670.c b/drivers/pinctrl/qcom/pinctrl-sdm670.c
index cc3cce077de4..1e694a966953 100644
--- a/drivers/pinctrl/qcom/pinctrl-sdm670.c
+++ b/drivers/pinctrl/qcom/pinctrl-sdm670.c
@@ -1318,7 +1318,7 @@ static struct platform_driver sdm670_pinctrl_driver = {
.of_match_table = sdm670_pinctrl_of_match,
},
.probe = sdm670_pinctrl_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init sdm670_pinctrl_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-sdm845.c b/drivers/pinctrl/qcom/pinctrl-sdm845.c
index cc05c415ed15..3f3265e0018d 100644
--- a/drivers/pinctrl/qcom/pinctrl-sdm845.c
+++ b/drivers/pinctrl/qcom/pinctrl-sdm845.c
@@ -1351,7 +1351,7 @@ static struct platform_driver sdm845_pinctrl_driver = {
.acpi_match_table = ACPI_PTR(sdm845_pinctrl_acpi_match),
},
.probe = sdm845_pinctrl_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init sdm845_pinctrl_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-sdx55.c b/drivers/pinctrl/qcom/pinctrl-sdx55.c
index 8826db9d21d0..c88b8bfcacb6 100644
--- a/drivers/pinctrl/qcom/pinctrl-sdx55.c
+++ b/drivers/pinctrl/qcom/pinctrl-sdx55.c
@@ -990,7 +990,7 @@ static struct platform_driver sdx55_pinctrl_driver = {
.of_match_table = sdx55_pinctrl_of_match,
},
.probe = sdx55_pinctrl_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init sdx55_pinctrl_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-sdx65.c b/drivers/pinctrl/qcom/pinctrl-sdx65.c
index f6f319c997fc..bd44ec0fcab4 100644
--- a/drivers/pinctrl/qcom/pinctrl-sdx65.c
+++ b/drivers/pinctrl/qcom/pinctrl-sdx65.c
@@ -939,7 +939,7 @@ static struct platform_driver sdx65_pinctrl_driver = {
.of_match_table = sdx65_pinctrl_of_match,
},
.probe = sdx65_pinctrl_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init sdx65_pinctrl_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-sdx75.c b/drivers/pinctrl/qcom/pinctrl-sdx75.c
index 3cfe8c7f04df..396f6fc779a2 100644
--- a/drivers/pinctrl/qcom/pinctrl-sdx75.c
+++ b/drivers/pinctrl/qcom/pinctrl-sdx75.c
@@ -1124,7 +1124,7 @@ static struct platform_driver sdx75_pinctrl_driver = {
.of_match_table = sdx75_pinctrl_of_match,
},
.probe = sdx75_pinctrl_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init sdx75_pinctrl_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-sm6115.c b/drivers/pinctrl/qcom/pinctrl-sm6115.c
index 2a06025f4885..87057089b2b6 100644
--- a/drivers/pinctrl/qcom/pinctrl-sm6115.c
+++ b/drivers/pinctrl/qcom/pinctrl-sm6115.c
@@ -895,7 +895,7 @@ static struct platform_driver sm6115_tlmm_driver = {
.of_match_table = sm6115_tlmm_of_match,
},
.probe = sm6115_tlmm_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init sm6115_tlmm_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-sm6125.c b/drivers/pinctrl/qcom/pinctrl-sm6125.c
index d5e2b896954c..e07339ba72bc 100644
--- a/drivers/pinctrl/qcom/pinctrl-sm6125.c
+++ b/drivers/pinctrl/qcom/pinctrl-sm6125.c
@@ -1249,7 +1249,7 @@ static struct platform_driver sm6125_tlmm_driver = {
.of_match_table = sm6125_tlmm_of_match,
},
.probe = sm6125_tlmm_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init sm6125_tlmm_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-sm6350.c b/drivers/pinctrl/qcom/pinctrl-sm6350.c
index f3828c07b134..4aeb1ba43ee3 100644
--- a/drivers/pinctrl/qcom/pinctrl-sm6350.c
+++ b/drivers/pinctrl/qcom/pinctrl-sm6350.c
@@ -1373,7 +1373,7 @@ static struct platform_driver sm6350_tlmm_driver = {
.of_match_table = sm6350_tlmm_of_match,
},
.probe = sm6350_tlmm_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init sm6350_tlmm_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-sm6375.c b/drivers/pinctrl/qcom/pinctrl-sm6375.c
index c82c8516932e..d86630d7125c 100644
--- a/drivers/pinctrl/qcom/pinctrl-sm6375.c
+++ b/drivers/pinctrl/qcom/pinctrl-sm6375.c
@@ -1516,7 +1516,7 @@ static struct platform_driver sm6375_tlmm_driver = {
.of_match_table = sm6375_tlmm_of_match,
},
.probe = sm6375_tlmm_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init sm6375_tlmm_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-sm7150.c b/drivers/pinctrl/qcom/pinctrl-sm7150.c
index edb5984cd351..b9f067de8ef0 100644
--- a/drivers/pinctrl/qcom/pinctrl-sm7150.c
+++ b/drivers/pinctrl/qcom/pinctrl-sm7150.c
@@ -1254,7 +1254,7 @@ static struct platform_driver sm7150_tlmm_driver = {
.of_match_table = sm7150_tlmm_of_match,
},
.probe = sm7150_tlmm_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init sm7150_tlmm_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-sm8150.c b/drivers/pinctrl/qcom/pinctrl-sm8150.c
index 01aea9c70b7a..f8f5bee74f1d 100644
--- a/drivers/pinctrl/qcom/pinctrl-sm8150.c
+++ b/drivers/pinctrl/qcom/pinctrl-sm8150.c
@@ -1542,7 +1542,7 @@ static struct platform_driver sm8150_pinctrl_driver = {
.of_match_table = sm8150_pinctrl_of_match,
},
.probe = sm8150_pinctrl_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init sm8150_pinctrl_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-sm8250.c b/drivers/pinctrl/qcom/pinctrl-sm8250.c
index e9961a49ff98..54fda77bf296 100644
--- a/drivers/pinctrl/qcom/pinctrl-sm8250.c
+++ b/drivers/pinctrl/qcom/pinctrl-sm8250.c
@@ -1351,7 +1351,7 @@ static struct platform_driver sm8250_pinctrl_driver = {
.of_match_table = sm8250_pinctrl_of_match,
},
.probe = sm8250_pinctrl_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init sm8250_pinctrl_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-sm8350.c b/drivers/pinctrl/qcom/pinctrl-sm8350.c
index 9c69458bd910..ac7f2820f2cb 100644
--- a/drivers/pinctrl/qcom/pinctrl-sm8350.c
+++ b/drivers/pinctrl/qcom/pinctrl-sm8350.c
@@ -1642,7 +1642,7 @@ static struct platform_driver sm8350_tlmm_driver = {
.of_match_table = sm8350_tlmm_of_match,
},
.probe = sm8350_tlmm_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init sm8350_tlmm_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-sm8450.c b/drivers/pinctrl/qcom/pinctrl-sm8450.c
index d11bb1ee9e3d..617286711695 100644
--- a/drivers/pinctrl/qcom/pinctrl-sm8450.c
+++ b/drivers/pinctrl/qcom/pinctrl-sm8450.c
@@ -1677,7 +1677,7 @@ static struct platform_driver sm8450_tlmm_driver = {
.of_match_table = sm8450_tlmm_of_match,
},
.probe = sm8450_tlmm_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init sm8450_tlmm_init(void)
diff --git a/drivers/pinctrl/qcom/pinctrl-sm8550.c b/drivers/pinctrl/qcom/pinctrl-sm8550.c
index 3c847d9cb5d9..9184e0183755 100644
--- a/drivers/pinctrl/qcom/pinctrl-sm8550.c
+++ b/drivers/pinctrl/qcom/pinctrl-sm8550.c
@@ -1762,7 +1762,7 @@ static struct platform_driver sm8550_tlmm_driver = {
.of_match_table = sm8550_tlmm_of_match,
},
.probe = sm8550_tlmm_probe,
- .remove = msm_pinctrl_remove,
+ .remove_new = msm_pinctrl_remove,
};
static int __init sm8550_tlmm_init(void)
diff --git a/drivers/pinctrl/tegra/pinctrl-tegra.c b/drivers/pinctrl/tegra/pinctrl-tegra.c
index 7c12a3470642..637b89ebe0e4 100644
--- a/drivers/pinctrl/tegra/pinctrl-tegra.c
+++ b/drivers/pinctrl/tegra/pinctrl-tegra.c
@@ -280,8 +280,8 @@ static int tegra_pinctrl_set_mux(struct pinctrl_dev *pctldev,
return 0;
}
-static const struct tegra_pingroup *tegra_pinctrl_get_group(struct pinctrl_dev *pctldev,
- unsigned int offset)
+static int tegra_pinctrl_get_group_index(struct pinctrl_dev *pctldev,
+ unsigned int offset)
{
struct tegra_pmx *pmx = pinctrl_dev_get_drvdata(pctldev);
unsigned int group, num_pins, j;
@@ -294,12 +294,35 @@ static const struct tegra_pingroup *tegra_pinctrl_get_group(struct pinctrl_dev *
continue;
for (j = 0; j < num_pins; j++) {
if (offset == pins[j])
- return &pmx->soc->groups[group];
+ return group;
}
}
- dev_err(pctldev->dev, "Pingroup not found for pin %u\n", offset);
- return NULL;
+ return -EINVAL;
+}
+
+static const struct tegra_pingroup *tegra_pinctrl_get_group(struct pinctrl_dev *pctldev,
+ unsigned int offset,
+ int group_index)
+{
+ struct tegra_pmx *pmx = pinctrl_dev_get_drvdata(pctldev);
+
+ if (group_index < 0 || group_index >= pmx->soc->ngroups)
+ return NULL;
+
+ return &pmx->soc->groups[group_index];
+}
+
+static struct tegra_pingroup_config *tegra_pinctrl_get_group_config(struct pinctrl_dev *pctldev,
+ unsigned int offset,
+ int group_index)
+{
+ struct tegra_pmx *pmx = pinctrl_dev_get_drvdata(pctldev);
+
+ if (group_index < 0)
+ return NULL;
+
+ return &pmx->pingroup_configs[group_index];
}
static int tegra_pinctrl_gpio_request_enable(struct pinctrl_dev *pctldev,
@@ -308,12 +331,15 @@ static int tegra_pinctrl_gpio_request_enable(struct pinctrl_dev *pctldev,
{
struct tegra_pmx *pmx = pinctrl_dev_get_drvdata(pctldev);
const struct tegra_pingroup *group;
+ struct tegra_pingroup_config *config;
+ int group_index;
u32 value;
if (!pmx->soc->sfsel_in_mux)
return 0;
- group = tegra_pinctrl_get_group(pctldev, offset);
+ group_index = tegra_pinctrl_get_group_index(pctldev, offset);
+ group = tegra_pinctrl_get_group(pctldev, offset, group_index);
if (!group)
return -EINVAL;
@@ -321,7 +347,11 @@ static int tegra_pinctrl_gpio_request_enable(struct pinctrl_dev *pctldev,
if (group->mux_reg < 0 || group->sfsel_bit < 0)
return -EINVAL;
+ config = tegra_pinctrl_get_group_config(pctldev, offset, group_index);
+ if (!config)
+ return -EINVAL;
value = pmx_readl(pmx, group->mux_bank, group->mux_reg);
+ config->is_sfsel = (value & BIT(group->sfsel_bit)) != 0;
value &= ~BIT(group->sfsel_bit);
pmx_writel(pmx, value, group->mux_bank, group->mux_reg);
@@ -334,12 +364,15 @@ static void tegra_pinctrl_gpio_disable_free(struct pinctrl_dev *pctldev,
{
struct tegra_pmx *pmx = pinctrl_dev_get_drvdata(pctldev);
const struct tegra_pingroup *group;
+ struct tegra_pingroup_config *config;
+ int group_index;
u32 value;
if (!pmx->soc->sfsel_in_mux)
return;
- group = tegra_pinctrl_get_group(pctldev, offset);
+ group_index = tegra_pinctrl_get_group_index(pctldev, offset);
+ group = tegra_pinctrl_get_group(pctldev, offset, group_index);
if (!group)
return;
@@ -347,8 +380,12 @@ static void tegra_pinctrl_gpio_disable_free(struct pinctrl_dev *pctldev,
if (group->mux_reg < 0 || group->sfsel_bit < 0)
return;
+ config = tegra_pinctrl_get_group_config(pctldev, offset, group_index);
+ if (!config)
+ return;
value = pmx_readl(pmx, group->mux_bank, group->mux_reg);
- value |= BIT(group->sfsel_bit);
+ if (config->is_sfsel)
+ value |= BIT(group->sfsel_bit);
pmx_writel(pmx, value, group->mux_bank, group->mux_reg);
}
@@ -785,6 +822,12 @@ int tegra_pinctrl_probe(struct platform_device *pdev,
pmx->dev = &pdev->dev;
pmx->soc = soc_data;
+ pmx->pingroup_configs = devm_kcalloc(&pdev->dev,
+ pmx->soc->ngroups, sizeof(*pmx->pingroup_configs),
+ GFP_KERNEL);
+ if (!pmx->pingroup_configs)
+ return -ENOMEM;
+
/*
* Each mux group will appear in 4 functions' list of groups.
* This over-allocates slightly, since not all groups are mux groups.
diff --git a/drivers/pinctrl/tegra/pinctrl-tegra.h b/drivers/pinctrl/tegra/pinctrl-tegra.h
index b3289bdf727d..b97136685f7a 100644
--- a/drivers/pinctrl/tegra/pinctrl-tegra.h
+++ b/drivers/pinctrl/tegra/pinctrl-tegra.h
@@ -8,6 +8,10 @@
#ifndef __PINMUX_TEGRA_H__
#define __PINMUX_TEGRA_H__
+struct tegra_pingroup_config {
+ bool is_sfsel;
+};
+
struct tegra_pmx {
struct device *dev;
struct pinctrl_dev *pctl;
@@ -21,6 +25,8 @@ struct tegra_pmx {
int nbanks;
void __iomem **regs;
u32 *backup_regs;
+ /* Array of size soc->ngroups */
+ struct tegra_pingroup_config *pingroup_configs;
};
enum tegra_pinconf_param {
diff --git a/drivers/platform/x86/dell/dell-wmi-sysman/passobj-attributes.c b/drivers/platform/x86/dell/dell-wmi-sysman/passobj-attributes.c
index 230e6ee96636..d8f1bf5e58a0 100644
--- a/drivers/platform/x86/dell/dell-wmi-sysman/passobj-attributes.c
+++ b/drivers/platform/x86/dell/dell-wmi-sysman/passobj-attributes.c
@@ -45,7 +45,7 @@ static ssize_t current_password_store(struct kobject *kobj,
int length;
length = strlen(buf);
- if (buf[length-1] == '\n')
+ if (length && buf[length - 1] == '\n')
length--;
/* firmware does verifiation of min/max password length,
diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c
index 085e044e888e..d7ef4f046d99 100644
--- a/drivers/platform/x86/fujitsu-laptop.c
+++ b/drivers/platform/x86/fujitsu-laptop.c
@@ -17,13 +17,13 @@
/*
* fujitsu-laptop.c - Fujitsu laptop support, providing access to additional
* features made available on a range of Fujitsu laptops including the
- * P2xxx/P5xxx/S6xxx/S7xxx series.
+ * P2xxx/P5xxx/S2xxx/S6xxx/S7xxx series.
*
* This driver implements a vendor-specific backlight control interface for
* Fujitsu laptops and provides support for hotkeys present on certain Fujitsu
* laptops.
*
- * This driver has been tested on a Fujitsu Lifebook S6410, S7020 and
+ * This driver has been tested on a Fujitsu Lifebook S2110, S6410, S7020 and
* P8010. It should work on most P-series and S-series Lifebooks, but
* YMMV.
*
@@ -102,7 +102,11 @@
#define KEY2_CODE 0x411
#define KEY3_CODE 0x412
#define KEY4_CODE 0x413
-#define KEY5_CODE 0x420
+#define KEY5_CODE 0x414
+#define KEY6_CODE 0x415
+#define KEY7_CODE 0x416
+#define KEY8_CODE 0x417
+#define KEY9_CODE 0x420
/* Hotkey ringbuffer limits */
#define MAX_HOTKEY_RINGBUFFER_SIZE 100
@@ -450,7 +454,7 @@ static const struct key_entry keymap_default[] = {
{ KE_KEY, KEY2_CODE, { KEY_PROG2 } },
{ KE_KEY, KEY3_CODE, { KEY_PROG3 } },
{ KE_KEY, KEY4_CODE, { KEY_PROG4 } },
- { KE_KEY, KEY5_CODE, { KEY_RFKILL } },
+ { KE_KEY, KEY9_CODE, { KEY_RFKILL } },
/* Soft keys read from status flags */
{ KE_KEY, FLAG_RFKILL, { KEY_RFKILL } },
{ KE_KEY, FLAG_TOUCHPAD_TOGGLE, { KEY_TOUCHPAD_TOGGLE } },
@@ -474,6 +478,18 @@ static const struct key_entry keymap_p8010[] = {
{ KE_END, 0 }
};
+static const struct key_entry keymap_s2110[] = {
+ { KE_KEY, KEY1_CODE, { KEY_PROG1 } }, /* "A" */
+ { KE_KEY, KEY2_CODE, { KEY_PROG2 } }, /* "B" */
+ { KE_KEY, KEY3_CODE, { KEY_WWW } }, /* "Internet" */
+ { KE_KEY, KEY4_CODE, { KEY_EMAIL } }, /* "E-mail" */
+ { KE_KEY, KEY5_CODE, { KEY_STOPCD } },
+ { KE_KEY, KEY6_CODE, { KEY_PLAYPAUSE } },
+ { KE_KEY, KEY7_CODE, { KEY_PREVIOUSSONG } },
+ { KE_KEY, KEY8_CODE, { KEY_NEXTSONG } },
+ { KE_END, 0 }
+};
+
static const struct key_entry *keymap = keymap_default;
static int fujitsu_laptop_dmi_keymap_override(const struct dmi_system_id *id)
@@ -511,6 +527,15 @@ static const struct dmi_system_id fujitsu_laptop_dmi_table[] = {
},
.driver_data = (void *)keymap_p8010
},
+ {
+ .callback = fujitsu_laptop_dmi_keymap_override,
+ .ident = "Fujitsu LifeBook S2110",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK S2110"),
+ },
+ .driver_data = (void *)keymap_s2110
+ },
{}
};
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index cde5f845cf25..8de0d3232e48 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -212,6 +212,7 @@ enum tpacpi_hkey_event_t {
/* Thermal events */
TP_HKEY_EV_ALARM_BAT_HOT = 0x6011, /* battery too hot */
TP_HKEY_EV_ALARM_BAT_XHOT = 0x6012, /* battery critically hot */
+ TP_HKEY_EV_ALARM_BAT_LIM_CHANGE = 0x6013, /* battery charge limit changed*/
TP_HKEY_EV_ALARM_SENSOR_HOT = 0x6021, /* sensor too hot */
TP_HKEY_EV_ALARM_SENSOR_XHOT = 0x6022, /* sensor critically hot */
TP_HKEY_EV_THM_TABLE_CHANGED = 0x6030, /* windows; thermal table changed */
@@ -3942,6 +3943,10 @@ static bool hotkey_notify_6xxx(const u32 hkey,
pr_alert("THERMAL EMERGENCY: battery is extremely hot!\n");
/* recommended action: immediate sleep/hibernate */
break;
+ case TP_HKEY_EV_ALARM_BAT_LIM_CHANGE:
+ pr_debug("Battery Info: battery charge threshold changed\n");
+ /* User changed charging threshold. No action needed */
+ return true;
case TP_HKEY_EV_ALARM_SENSOR_HOT:
pr_crit("THERMAL ALARM: a sensor reports something is too hot!\n");
/* recommended action: warn user through gui, that */
@@ -11315,6 +11320,8 @@ static int __must_check __init get_thinkpad_model_data(
tp->vendor = PCI_VENDOR_ID_IBM;
else if (dmi_name_in_vendors("LENOVO"))
tp->vendor = PCI_VENDOR_ID_LENOVO;
+ else if (dmi_name_in_vendors("NEC"))
+ tp->vendor = PCI_VENDOR_ID_LENOVO;
else
return 0;
diff --git a/drivers/pmdomain/imx/gpcv2.c b/drivers/pmdomain/imx/gpcv2.c
index 13fce2b134f6..84d68c805cac 100644
--- a/drivers/pmdomain/imx/gpcv2.c
+++ b/drivers/pmdomain/imx/gpcv2.c
@@ -1350,7 +1350,7 @@ static int imx_pgc_domain_probe(struct platform_device *pdev)
}
if (IS_ENABLED(CONFIG_LOCKDEP) &&
- of_property_read_bool(domain->dev->of_node, "power-domains"))
+ of_property_present(domain->dev->of_node, "power-domains"))
lockdep_set_subclass(&domain->genpd.mlock, 1);
ret = of_genpd_add_provider_simple(domain->dev->of_node,
diff --git a/drivers/regulator/ad5398.c b/drivers/regulator/ad5398.c
index 40f7dba42b5a..404cbe32711e 100644
--- a/drivers/regulator/ad5398.c
+++ b/drivers/regulator/ad5398.c
@@ -14,6 +14,7 @@
#include <linux/platform_device.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>
+#include <linux/regulator/of_regulator.h>
#define AD5398_CURRENT_EN_MASK 0x8000
@@ -221,15 +222,20 @@ static int ad5398_probe(struct i2c_client *client)
const struct ad5398_current_data_format *df =
(struct ad5398_current_data_format *)id->driver_data;
- if (!init_data)
- return -EINVAL;
-
chip = devm_kzalloc(&client->dev, sizeof(*chip), GFP_KERNEL);
if (!chip)
return -ENOMEM;
config.dev = &client->dev;
+ if (client->dev.of_node)
+ init_data = of_get_regulator_init_data(&client->dev,
+ client->dev.of_node,
+ &ad5398_reg);
+ if (!init_data)
+ return -EINVAL;
+
config.init_data = init_data;
+ config.of_node = client->dev.of_node;
config.driver_data = chip;
chip->client = client;
diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c
index 90de22c81da9..37174b544113 100644
--- a/drivers/remoteproc/qcom_wcnss.c
+++ b/drivers/remoteproc/qcom_wcnss.c
@@ -117,10 +117,10 @@ static const struct wcnss_data pronto_v1_data = {
.pmu_offset = 0x1004,
.spare_offset = 0x1088,
- .pd_names = { "mx", "cx" },
+ .pd_names = { "cx", "mx" },
.vregs = (struct wcnss_vreg_info[]) {
- { "vddmx", 950000, 1150000, 0 },
{ "vddcx", .super_turbo = true},
+ { "vddmx", 950000, 1150000, 0 },
{ "vddpx", 1800000, 1800000, 0 },
},
.num_pd_vregs = 2,
@@ -131,10 +131,10 @@ static const struct wcnss_data pronto_v2_data = {
.pmu_offset = 0x1004,
.spare_offset = 0x1088,
- .pd_names = { "mx", "cx" },
+ .pd_names = { "cx", "mx" },
.vregs = (struct wcnss_vreg_info[]) {
- { "vddmx", 1287500, 1287500, 0 },
{ "vddcx", .super_turbo = true },
+ { "vddmx", 1287500, 1287500, 0 },
{ "vddpx", 1800000, 1800000, 0 },
},
.num_pd_vregs = 2,
@@ -397,8 +397,17 @@ static irqreturn_t wcnss_stop_ack_interrupt(int irq, void *dev)
static int wcnss_init_pds(struct qcom_wcnss *wcnss,
const char * const pd_names[WCNSS_MAX_PDS])
{
+ struct device *dev = wcnss->dev;
int i, ret;
+ /* Handle single power domain */
+ if (dev->pm_domain) {
+ wcnss->pds[0] = dev;
+ wcnss->num_pds = 1;
+ pm_runtime_enable(dev);
+ return 0;
+ }
+
for (i = 0; i < WCNSS_MAX_PDS; i++) {
if (!pd_names[i])
break;
@@ -418,8 +427,15 @@ static int wcnss_init_pds(struct qcom_wcnss *wcnss,
static void wcnss_release_pds(struct qcom_wcnss *wcnss)
{
+ struct device *dev = wcnss->dev;
int i;
+ /* Handle single power domain */
+ if (wcnss->num_pds == 1 && dev->pm_domain) {
+ pm_runtime_disable(dev);
+ return;
+ }
+
for (i = 0; i < wcnss->num_pds; i++)
dev_pm_domain_detach(wcnss->pds[i], false);
}
@@ -437,10 +453,14 @@ static int wcnss_init_regulators(struct qcom_wcnss *wcnss,
* the regulators for the power domains. For old device trees we need to
* reserve extra space to manage them through the regulator interface.
*/
- if (wcnss->num_pds)
- info += num_pd_vregs;
- else
+ if (wcnss->num_pds) {
+ info += wcnss->num_pds;
+ /* Handle single power domain case */
+ if (wcnss->num_pds < num_pd_vregs)
+ num_vregs += num_pd_vregs - wcnss->num_pds;
+ } else {
num_vregs += num_pd_vregs;
+ }
bulk = devm_kcalloc(wcnss->dev,
num_vregs, sizeof(struct regulator_bulk_data),
diff --git a/drivers/rtc/rtc-ds1307.c b/drivers/rtc/rtc-ds1307.c
index 506b7d1c2397..0c7845196092 100644
--- a/drivers/rtc/rtc-ds1307.c
+++ b/drivers/rtc/rtc-ds1307.c
@@ -1802,10 +1802,8 @@ static int ds1307_probe(struct i2c_client *client)
* For some variants, be sure alarms can trigger when we're
* running on Vbackup (BBSQI/BBSQW)
*/
- if (want_irq || ds1307_can_wakeup_device) {
+ if (want_irq || ds1307_can_wakeup_device)
regs[0] |= DS1337_BIT_INTCN | chip->bbsqi_bit;
- regs[0] &= ~(DS1337_BIT_A2IE | DS1337_BIT_A1IE);
- }
regmap_write(ds1307->regmap, DS1337_REG_CONTROL,
regs[0]);
diff --git a/drivers/rtc/rtc-rv3032.c b/drivers/rtc/rtc-rv3032.c
index 35b2e36b426a..cb01038a2e27 100644
--- a/drivers/rtc/rtc-rv3032.c
+++ b/drivers/rtc/rtc-rv3032.c
@@ -69,7 +69,7 @@
#define RV3032_CLKOUT2_FD_MSK GENMASK(6, 5)
#define RV3032_CLKOUT2_OS BIT(7)
-#define RV3032_CTRL1_EERD BIT(3)
+#define RV3032_CTRL1_EERD BIT(2)
#define RV3032_CTRL1_WADA BIT(5)
#define RV3032_CTRL2_STOP BIT(0)
diff --git a/drivers/s390/crypto/vfio_ap_ops.c b/drivers/s390/crypto/vfio_ap_ops.c
index d6ea2fd4c2a0..d4151f519e8b 100644
--- a/drivers/s390/crypto/vfio_ap_ops.c
+++ b/drivers/s390/crypto/vfio_ap_ops.c
@@ -834,48 +834,66 @@ static void vfio_ap_mdev_remove(struct mdev_device *mdev)
vfio_put_device(&matrix_mdev->vdev);
}
-#define MDEV_SHARING_ERR "Userspace may not re-assign queue %02lx.%04lx " \
- "already assigned to %s"
+#define MDEV_SHARING_ERR "Userspace may not assign queue %02lx.%04lx to mdev: already assigned to %s"
-static void vfio_ap_mdev_log_sharing_err(struct ap_matrix_mdev *matrix_mdev,
- unsigned long *apm,
- unsigned long *aqm)
+#define MDEV_IN_USE_ERR "Can not reserve queue %02lx.%04lx for host driver: in use by mdev"
+
+static void vfio_ap_mdev_log_sharing_err(struct ap_matrix_mdev *assignee,
+ struct ap_matrix_mdev *assigned_to,
+ unsigned long *apm, unsigned long *aqm)
{
unsigned long apid, apqi;
- const struct device *dev = mdev_dev(matrix_mdev->mdev);
- const char *mdev_name = dev_name(dev);
- for_each_set_bit_inv(apid, apm, AP_DEVICES)
+ for_each_set_bit_inv(apid, apm, AP_DEVICES) {
+ for_each_set_bit_inv(apqi, aqm, AP_DOMAINS) {
+ dev_warn(mdev_dev(assignee->mdev), MDEV_SHARING_ERR,
+ apid, apqi, dev_name(mdev_dev(assigned_to->mdev)));
+ }
+ }
+}
+
+static void vfio_ap_mdev_log_in_use_err(struct ap_matrix_mdev *assignee,
+ unsigned long *apm, unsigned long *aqm)
+{
+ unsigned long apid, apqi;
+
+ for_each_set_bit_inv(apid, apm, AP_DEVICES) {
for_each_set_bit_inv(apqi, aqm, AP_DOMAINS)
- dev_warn(dev, MDEV_SHARING_ERR, apid, apqi, mdev_name);
+ dev_warn(mdev_dev(assignee->mdev), MDEV_IN_USE_ERR, apid, apqi);
+ }
}
/**
* vfio_ap_mdev_verify_no_sharing - verify APQNs are not shared by matrix mdevs
*
+ * @assignee: the matrix mdev to which @mdev_apm and @mdev_aqm are being
+ * assigned; or, NULL if this function was called by the AP bus
+ * driver in_use callback to verify none of the APQNs being reserved
+ * for the host device driver are in use by a vfio_ap mediated device
* @mdev_apm: mask indicating the APIDs of the APQNs to be verified
* @mdev_aqm: mask indicating the APQIs of the APQNs to be verified
*
- * Verifies that each APQN derived from the Cartesian product of a bitmap of
- * AP adapter IDs and AP queue indexes is not configured for any matrix
- * mediated device. AP queue sharing is not allowed.
+ * Verifies that each APQN derived from the Cartesian product of APIDs
+ * represented by the bits set in @mdev_apm and the APQIs of the bits set in
+ * @mdev_aqm is not assigned to a mediated device other than the mdev to which
+ * the APQN is being assigned (@assignee). AP queue sharing is not allowed.
*
* Return: 0 if the APQNs are not shared; otherwise return -EADDRINUSE.
*/
-static int vfio_ap_mdev_verify_no_sharing(unsigned long *mdev_apm,
+static int vfio_ap_mdev_verify_no_sharing(struct ap_matrix_mdev *assignee,
+ unsigned long *mdev_apm,
unsigned long *mdev_aqm)
{
- struct ap_matrix_mdev *matrix_mdev;
+ struct ap_matrix_mdev *assigned_to;
DECLARE_BITMAP(apm, AP_DEVICES);
DECLARE_BITMAP(aqm, AP_DOMAINS);
- list_for_each_entry(matrix_mdev, &matrix_dev->mdev_list, node) {
+ list_for_each_entry(assigned_to, &matrix_dev->mdev_list, node) {
/*
- * If the input apm and aqm are fields of the matrix_mdev
- * object, then move on to the next matrix_mdev.
+ * If the mdev to which the mdev_apm and mdev_aqm is being
+ * assigned is the same as the mdev being verified
*/
- if (mdev_apm == matrix_mdev->matrix.apm &&
- mdev_aqm == matrix_mdev->matrix.aqm)
+ if (assignee == assigned_to)
continue;
memset(apm, 0, sizeof(apm));
@@ -885,15 +903,16 @@ static int vfio_ap_mdev_verify_no_sharing(unsigned long *mdev_apm,
* We work on full longs, as we can only exclude the leftover
* bits in non-inverse order. The leftover is all zeros.
*/
- if (!bitmap_and(apm, mdev_apm, matrix_mdev->matrix.apm,
- AP_DEVICES))
+ if (!bitmap_and(apm, mdev_apm, assigned_to->matrix.apm, AP_DEVICES))
continue;
- if (!bitmap_and(aqm, mdev_aqm, matrix_mdev->matrix.aqm,
- AP_DOMAINS))
+ if (!bitmap_and(aqm, mdev_aqm, assigned_to->matrix.aqm, AP_DOMAINS))
continue;
- vfio_ap_mdev_log_sharing_err(matrix_mdev, apm, aqm);
+ if (assignee)
+ vfio_ap_mdev_log_sharing_err(assignee, assigned_to, apm, aqm);
+ else
+ vfio_ap_mdev_log_in_use_err(assigned_to, apm, aqm);
return -EADDRINUSE;
}
@@ -922,7 +941,8 @@ static int vfio_ap_mdev_validate_masks(struct ap_matrix_mdev *matrix_mdev)
matrix_mdev->matrix.aqm))
return -EADDRNOTAVAIL;
- return vfio_ap_mdev_verify_no_sharing(matrix_mdev->matrix.apm,
+ return vfio_ap_mdev_verify_no_sharing(matrix_mdev,
+ matrix_mdev->matrix.apm,
matrix_mdev->matrix.aqm);
}
@@ -2271,7 +2291,7 @@ int vfio_ap_mdev_resource_in_use(unsigned long *apm, unsigned long *aqm)
mutex_lock(&matrix_dev->guests_lock);
mutex_lock(&matrix_dev->mdevs_lock);
- ret = vfio_ap_mdev_verify_no_sharing(apm, aqm);
+ ret = vfio_ap_mdev_verify_no_sharing(NULL, apm, aqm);
mutex_unlock(&matrix_dev->mdevs_lock);
mutex_unlock(&matrix_dev->guests_lock);
diff --git a/drivers/scsi/lpfc/lpfc_hbadisc.c b/drivers/scsi/lpfc/lpfc_hbadisc.c
index 0ad8a10002ce..5c9bc8af3c2d 100644
--- a/drivers/scsi/lpfc/lpfc_hbadisc.c
+++ b/drivers/scsi/lpfc/lpfc_hbadisc.c
@@ -5646,6 +5646,7 @@ static struct lpfc_nodelist *
__lpfc_findnode_did(struct lpfc_vport *vport, uint32_t did)
{
struct lpfc_nodelist *ndlp;
+ struct lpfc_nodelist *np = NULL;
uint32_t data1;
list_for_each_entry(ndlp, &vport->fc_nodes, nlp_listp) {
@@ -5660,14 +5661,20 @@ __lpfc_findnode_did(struct lpfc_vport *vport, uint32_t did)
ndlp, ndlp->nlp_DID,
ndlp->nlp_flag, data1, ndlp->nlp_rpi,
ndlp->active_rrqs_xri_bitmap);
- return ndlp;
+
+ /* Check for new or potentially stale node */
+ if (ndlp->nlp_state != NLP_STE_UNUSED_NODE)
+ return ndlp;
+ np = ndlp;
}
}
- /* FIND node did <did> NOT FOUND */
- lpfc_printf_vlog(vport, KERN_INFO, LOG_NODE,
- "0932 FIND node did x%x NOT FOUND.\n", did);
- return NULL;
+ if (!np)
+ /* FIND node did <did> NOT FOUND */
+ lpfc_printf_vlog(vport, KERN_INFO, LOG_NODE,
+ "0932 FIND node did x%x NOT FOUND.\n", did);
+
+ return np;
}
struct lpfc_nodelist *
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 424b39a8155c..7c8e0e1d36da 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -13180,6 +13180,7 @@ lpfc_sli4_enable_msi(struct lpfc_hba *phba)
eqhdl = lpfc_get_eq_hdl(0);
rc = pci_irq_vector(phba->pcidev, 0);
if (rc < 0) {
+ free_irq(phba->pcidev->irq, phba);
pci_free_irq_vectors(phba->pcidev);
lpfc_printf_log(phba, KERN_WARNING, LOG_INIT,
"0496 MSI pci_irq_vec failed (%d)\n", rc);
@@ -13260,6 +13261,7 @@ lpfc_sli4_enable_intr(struct lpfc_hba *phba, uint32_t cfg_mode)
eqhdl = lpfc_get_eq_hdl(0);
retval = pci_irq_vector(phba->pcidev, 0);
if (retval < 0) {
+ free_irq(phba->pcidev->irq, phba);
lpfc_printf_log(phba, KERN_WARNING, LOG_INIT,
"0502 INTR pci_irq_vec failed (%d)\n",
retval);
diff --git a/drivers/scsi/mpi3mr/mpi3mr_fw.c b/drivers/scsi/mpi3mr/mpi3mr_fw.c
index 0d148c39ebcc..60714a6c2637 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_fw.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_fw.c
@@ -174,6 +174,9 @@ static void mpi3mr_print_event_data(struct mpi3mr_ioc *mrioc,
char *desc = NULL;
u16 event;
+ if (!(mrioc->logging_level & MPI3_DEBUG_EVENT))
+ return;
+
event = event_reply->event;
switch (event) {
diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
index e289f18fc764..daef90ee431f 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_ctl.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
@@ -679,6 +679,7 @@ _ctl_do_mpt_command(struct MPT3SAS_ADAPTER *ioc, struct mpt3_ioctl_command karg,
size_t data_in_sz = 0;
long ret;
u16 device_handle = MPT3SAS_INVALID_DEVICE_HANDLE;
+ int tm_ret;
issue_reset = 0;
@@ -1120,18 +1121,25 @@ _ctl_do_mpt_command(struct MPT3SAS_ADAPTER *ioc, struct mpt3_ioctl_command karg,
if (pcie_device && (!ioc->tm_custom_handling) &&
(!(mpt3sas_scsih_is_pcie_scsi_device(
pcie_device->device_info))))
- mpt3sas_scsih_issue_locked_tm(ioc,
+ tm_ret = mpt3sas_scsih_issue_locked_tm(ioc,
le16_to_cpu(mpi_request->FunctionDependent1),
0, 0, 0,
MPI2_SCSITASKMGMT_TASKTYPE_TARGET_RESET, 0,
0, pcie_device->reset_timeout,
MPI26_SCSITASKMGMT_MSGFLAGS_PROTOCOL_LVL_RST_PCIE);
else
- mpt3sas_scsih_issue_locked_tm(ioc,
+ tm_ret = mpt3sas_scsih_issue_locked_tm(ioc,
le16_to_cpu(mpi_request->FunctionDependent1),
0, 0, 0,
MPI2_SCSITASKMGMT_TASKTYPE_TARGET_RESET, 0,
0, 30, MPI2_SCSITASKMGMT_MSGFLAGS_LINK_RESET);
+
+ if (tm_ret != SUCCESS) {
+ ioc_info(ioc,
+ "target reset failed, issue hard reset: handle (0x%04x)\n",
+ le16_to_cpu(mpi_request->FunctionDependent1));
+ mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER);
+ }
} else
mpt3sas_base_hard_reset_handler(ioc, FORCE_BIG_HAMMER);
}
diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c
index 900322bad4f3..f9ab45c4bb40 100644
--- a/drivers/scsi/st.c
+++ b/drivers/scsi/st.c
@@ -953,7 +953,6 @@ static void reset_state(struct scsi_tape *STp)
STp->partition = find_partition(STp);
if (STp->partition < 0)
STp->partition = 0;
- STp->new_partition = STp->partition;
}
}
@@ -2895,7 +2894,6 @@ static int st_int_ioctl(struct scsi_tape *STp, unsigned int cmd_in, unsigned lon
timeout = STp->long_timeout * 8;
DEBC_printk(STp, "Erasing tape.\n");
- fileno = blkno = at_sm = 0;
break;
case MTSETBLK: /* Set block length */
case MTSETDENSITY: /* Set tape density */
@@ -2928,14 +2926,17 @@ static int st_int_ioctl(struct scsi_tape *STp, unsigned int cmd_in, unsigned lon
if (cmd_in == MTSETDENSITY) {
(STp->buffer)->b_data[4] = arg;
STp->density_changed = 1; /* At least we tried ;-) */
+ STp->changed_density = arg;
} else if (cmd_in == SET_DENS_AND_BLK)
(STp->buffer)->b_data[4] = arg >> 24;
else
(STp->buffer)->b_data[4] = STp->density;
if (cmd_in == MTSETBLK || cmd_in == SET_DENS_AND_BLK) {
ltmp = arg & MT_ST_BLKSIZE_MASK;
- if (cmd_in == MTSETBLK)
+ if (cmd_in == MTSETBLK) {
STp->blksize_changed = 1; /* At least we tried ;-) */
+ STp->changed_blksize = arg;
+ }
} else
ltmp = STp->block_size;
(STp->buffer)->b_data[9] = (ltmp >> 16);
@@ -3082,7 +3083,9 @@ static int st_int_ioctl(struct scsi_tape *STp, unsigned int cmd_in, unsigned lon
cmd_in == MTSETDRVBUFFER ||
cmd_in == SET_DENS_AND_BLK) {
if (cmdstatp->sense_hdr.sense_key == ILLEGAL_REQUEST &&
- !(STp->use_pf & PF_TESTED)) {
+ cmdstatp->sense_hdr.asc == 0x24 &&
+ (STp->device)->scsi_level <= SCSI_2 &&
+ !(STp->use_pf & PF_TESTED)) {
/* Try the other possible state of Page Format if not
already tried */
STp->use_pf = (STp->use_pf ^ USE_PF) | PF_TESTED;
@@ -3634,9 +3637,25 @@ static long st_ioctl(struct file *file, unsigned int cmd_in, unsigned long arg)
retval = (-EIO);
goto out;
}
- reset_state(STp);
+ reset_state(STp); /* Clears pos_unknown */
/* remove this when the midlevel properly clears was_reset */
STp->device->was_reset = 0;
+
+ /* Fix the device settings after reset, ignore errors */
+ if (mtc.mt_op == MTREW || mtc.mt_op == MTSEEK ||
+ mtc.mt_op == MTEOM) {
+ if (STp->can_partitions) {
+ /* STp->new_partition contains the
+ * latest partition set
+ */
+ STp->partition = 0;
+ switch_partition(STp);
+ }
+ if (STp->density_changed)
+ st_int_ioctl(STp, MTSETDENSITY, STp->changed_density);
+ if (STp->blksize_changed)
+ st_int_ioctl(STp, MTSETBLK, STp->changed_blksize);
+ }
}
if (mtc.mt_op != MTNOP && mtc.mt_op != MTSETBLK &&
diff --git a/drivers/scsi/st.h b/drivers/scsi/st.h
index 1aaaf5369a40..6d31b894ee84 100644
--- a/drivers/scsi/st.h
+++ b/drivers/scsi/st.h
@@ -165,6 +165,7 @@ struct scsi_tape {
unsigned char compression_changed;
unsigned char drv_buffer;
unsigned char density;
+ unsigned char changed_density;
unsigned char door_locked;
unsigned char autorew_dev; /* auto-rewind device */
unsigned char rew_at_close; /* rewind necessary at close */
@@ -172,6 +173,7 @@ struct scsi_tape {
unsigned char cleaning_req; /* cleaning requested? */
unsigned char first_tur; /* first TEST UNIT READY */
int block_size;
+ int changed_blksize;
int min_block;
int max_block;
int recover_count; /* From tape opening */
diff --git a/drivers/soc/apple/rtkit-internal.h b/drivers/soc/apple/rtkit-internal.h
index 24bd619ec5e4..1da1dfd9cb19 100644
--- a/drivers/soc/apple/rtkit-internal.h
+++ b/drivers/soc/apple/rtkit-internal.h
@@ -48,6 +48,7 @@ struct apple_rtkit {
struct apple_rtkit_shmem ioreport_buffer;
struct apple_rtkit_shmem crashlog_buffer;
+ struct apple_rtkit_shmem oslog_buffer;
struct apple_rtkit_shmem syslog_buffer;
char *syslog_msg_buffer;
diff --git a/drivers/soc/apple/rtkit.c b/drivers/soc/apple/rtkit.c
index d9f19dc99da5..2c37216f423d 100644
--- a/drivers/soc/apple/rtkit.c
+++ b/drivers/soc/apple/rtkit.c
@@ -66,8 +66,9 @@ enum {
#define APPLE_RTKIT_SYSLOG_MSG_SIZE GENMASK_ULL(31, 24)
#define APPLE_RTKIT_OSLOG_TYPE GENMASK_ULL(63, 56)
-#define APPLE_RTKIT_OSLOG_INIT 1
-#define APPLE_RTKIT_OSLOG_ACK 3
+#define APPLE_RTKIT_OSLOG_BUFFER_REQUEST 1
+#define APPLE_RTKIT_OSLOG_SIZE GENMASK_ULL(55, 36)
+#define APPLE_RTKIT_OSLOG_IOVA GENMASK_ULL(35, 0)
#define APPLE_RTKIT_MIN_SUPPORTED_VERSION 11
#define APPLE_RTKIT_MAX_SUPPORTED_VERSION 12
@@ -256,15 +257,21 @@ static int apple_rtkit_common_rx_get_buffer(struct apple_rtkit *rtk,
struct apple_rtkit_shmem *buffer,
u8 ep, u64 msg)
{
- size_t n_4kpages = FIELD_GET(APPLE_RTKIT_BUFFER_REQUEST_SIZE, msg);
u64 reply;
int err;
+ /* The different size vs. IOVA shifts look odd but are indeed correct this way */
+ if (ep == APPLE_RTKIT_EP_OSLOG) {
+ buffer->size = FIELD_GET(APPLE_RTKIT_OSLOG_SIZE, msg);
+ buffer->iova = FIELD_GET(APPLE_RTKIT_OSLOG_IOVA, msg) << 12;
+ } else {
+ buffer->size = FIELD_GET(APPLE_RTKIT_BUFFER_REQUEST_SIZE, msg) << 12;
+ buffer->iova = FIELD_GET(APPLE_RTKIT_BUFFER_REQUEST_IOVA, msg);
+ }
+
buffer->buffer = NULL;
buffer->iomem = NULL;
buffer->is_mapped = false;
- buffer->iova = FIELD_GET(APPLE_RTKIT_BUFFER_REQUEST_IOVA, msg);
- buffer->size = n_4kpages << 12;
dev_dbg(rtk->dev, "RTKit: buffer request for 0x%zx bytes at %pad\n",
buffer->size, &buffer->iova);
@@ -289,11 +296,21 @@ static int apple_rtkit_common_rx_get_buffer(struct apple_rtkit *rtk,
}
if (!buffer->is_mapped) {
- reply = FIELD_PREP(APPLE_RTKIT_SYSLOG_TYPE,
- APPLE_RTKIT_BUFFER_REQUEST);
- reply |= FIELD_PREP(APPLE_RTKIT_BUFFER_REQUEST_SIZE, n_4kpages);
- reply |= FIELD_PREP(APPLE_RTKIT_BUFFER_REQUEST_IOVA,
- buffer->iova);
+ /* oslog uses different fields and needs a shifted IOVA instead of size */
+ if (ep == APPLE_RTKIT_EP_OSLOG) {
+ reply = FIELD_PREP(APPLE_RTKIT_OSLOG_TYPE,
+ APPLE_RTKIT_OSLOG_BUFFER_REQUEST);
+ reply |= FIELD_PREP(APPLE_RTKIT_OSLOG_SIZE, buffer->size);
+ reply |= FIELD_PREP(APPLE_RTKIT_OSLOG_IOVA,
+ buffer->iova >> 12);
+ } else {
+ reply = FIELD_PREP(APPLE_RTKIT_SYSLOG_TYPE,
+ APPLE_RTKIT_BUFFER_REQUEST);
+ reply |= FIELD_PREP(APPLE_RTKIT_BUFFER_REQUEST_SIZE,
+ buffer->size >> 12);
+ reply |= FIELD_PREP(APPLE_RTKIT_BUFFER_REQUEST_IOVA,
+ buffer->iova);
+ }
apple_rtkit_send_message(rtk, ep, reply, NULL, false);
}
@@ -487,25 +504,18 @@ static void apple_rtkit_syslog_rx(struct apple_rtkit *rtk, u64 msg)
}
}
-static void apple_rtkit_oslog_rx_init(struct apple_rtkit *rtk, u64 msg)
-{
- u64 ack;
-
- dev_dbg(rtk->dev, "RTKit: oslog init: msg: 0x%llx\n", msg);
- ack = FIELD_PREP(APPLE_RTKIT_OSLOG_TYPE, APPLE_RTKIT_OSLOG_ACK);
- apple_rtkit_send_message(rtk, APPLE_RTKIT_EP_OSLOG, ack, NULL, false);
-}
-
static void apple_rtkit_oslog_rx(struct apple_rtkit *rtk, u64 msg)
{
u8 type = FIELD_GET(APPLE_RTKIT_OSLOG_TYPE, msg);
switch (type) {
- case APPLE_RTKIT_OSLOG_INIT:
- apple_rtkit_oslog_rx_init(rtk, msg);
+ case APPLE_RTKIT_OSLOG_BUFFER_REQUEST:
+ apple_rtkit_common_rx_get_buffer(rtk, &rtk->oslog_buffer,
+ APPLE_RTKIT_EP_OSLOG, msg);
break;
default:
- dev_warn(rtk->dev, "RTKit: Unknown oslog message: %llx\n", msg);
+ dev_warn(rtk->dev, "RTKit: Unknown oslog message: %llx\n",
+ msg);
}
}
@@ -744,7 +754,7 @@ struct apple_rtkit *apple_rtkit_init(struct device *dev, void *cookie,
rtk->mbox_cl.rx_callback = &apple_rtkit_rx;
rtk->mbox_cl.tx_done = &apple_rtkit_tx_done;
- rtk->wq = alloc_ordered_workqueue("rtkit-%s", WQ_MEM_RECLAIM,
+ rtk->wq = alloc_ordered_workqueue("rtkit-%s", WQ_HIGHPRI | WQ_MEM_RECLAIM,
dev_name(rtk->dev));
if (!rtk->wq) {
ret = -ENOMEM;
@@ -787,6 +797,7 @@ int apple_rtkit_reinit(struct apple_rtkit *rtk)
apple_rtkit_free_buffer(rtk, &rtk->ioreport_buffer);
apple_rtkit_free_buffer(rtk, &rtk->crashlog_buffer);
+ apple_rtkit_free_buffer(rtk, &rtk->oslog_buffer);
apple_rtkit_free_buffer(rtk, &rtk->syslog_buffer);
kfree(rtk->syslog_msg_buffer);
@@ -967,6 +978,7 @@ void apple_rtkit_free(struct apple_rtkit *rtk)
apple_rtkit_free_buffer(rtk, &rtk->ioreport_buffer);
apple_rtkit_free_buffer(rtk, &rtk->crashlog_buffer);
+ apple_rtkit_free_buffer(rtk, &rtk->oslog_buffer);
apple_rtkit_free_buffer(rtk, &rtk->syslog_buffer);
kfree(rtk->syslog_msg_buffer);
diff --git a/drivers/soc/ti/k3-socinfo.c b/drivers/soc/ti/k3-socinfo.c
index 6ea9b8c7d335..7a3bdef5a7c0 100644
--- a/drivers/soc/ti/k3-socinfo.c
+++ b/drivers/soc/ti/k3-socinfo.c
@@ -63,6 +63,12 @@ k3_chipinfo_partno_to_names(unsigned int partno,
return -EINVAL;
}
+static const struct regmap_config k3_chipinfo_regmap_cfg = {
+ .reg_bits = 32,
+ .val_bits = 32,
+ .reg_stride = 4,
+};
+
static int k3_chipinfo_probe(struct platform_device *pdev)
{
struct device_node *node = pdev->dev.of_node;
@@ -70,13 +76,18 @@ static int k3_chipinfo_probe(struct platform_device *pdev)
struct device *dev = &pdev->dev;
struct soc_device *soc_dev;
struct regmap *regmap;
+ void __iomem *base;
u32 partno_id;
u32 variant;
u32 jtag_id;
u32 mfg;
int ret;
- regmap = device_node_to_regmap(node);
+ base = devm_platform_ioremap_resource(pdev, 0);
+ if (IS_ERR(base))
+ return PTR_ERR(base);
+
+ regmap = regmap_init_mmio(dev, base, &k3_chipinfo_regmap_cfg);
if (IS_ERR(regmap))
return PTR_ERR(regmap);
diff --git a/drivers/soundwire/amd_manager.c b/drivers/soundwire/amd_manager.c
index 79173ab540a6..31b203ebbae0 100644
--- a/drivers/soundwire/amd_manager.c
+++ b/drivers/soundwire/amd_manager.c
@@ -1138,6 +1138,7 @@ static int __maybe_unused amd_suspend(struct device *dev)
amd_sdw_wake_enable(amd_manager, false);
return amd_sdw_clock_stop(amd_manager);
} else if (amd_manager->power_mode_mask & AMD_SDW_POWER_OFF_MODE) {
+ amd_sdw_wake_enable(amd_manager, false);
/*
* As per hardware programming sequence on AMD platforms,
* clock stop should be invoked first before powering-off
@@ -1165,6 +1166,7 @@ static int __maybe_unused amd_suspend_runtime(struct device *dev)
amd_sdw_wake_enable(amd_manager, true);
return amd_sdw_clock_stop(amd_manager);
} else if (amd_manager->power_mode_mask & AMD_SDW_POWER_OFF_MODE) {
+ amd_sdw_wake_enable(amd_manager, true);
ret = amd_sdw_clock_stop(amd_manager);
if (ret)
return ret;
diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c
index e7553c38be59..767942f19adb 100644
--- a/drivers/soundwire/bus.c
+++ b/drivers/soundwire/bus.c
@@ -121,6 +121,10 @@ int sdw_bus_master_add(struct sdw_bus *bus, struct device *parent,
set_bit(SDW_GROUP13_DEV_NUM, bus->assigned);
set_bit(SDW_MASTER_DEV_NUM, bus->assigned);
+ ret = sdw_irq_create(bus, fwnode);
+ if (ret)
+ return ret;
+
/*
* SDW is an enumerable bus, but devices can be powered off. So,
* they won't be able to report as present.
@@ -137,6 +141,7 @@ int sdw_bus_master_add(struct sdw_bus *bus, struct device *parent,
if (ret < 0) {
dev_err(bus->dev, "Finding slaves failed:%d\n", ret);
+ sdw_irq_delete(bus);
return ret;
}
@@ -155,10 +160,6 @@ int sdw_bus_master_add(struct sdw_bus *bus, struct device *parent,
bus->params.curr_bank = SDW_BANK0;
bus->params.next_bank = SDW_BANK1;
- ret = sdw_irq_create(bus, fwnode);
- if (ret)
- return ret;
-
return 0;
}
EXPORT_SYMBOL(sdw_bus_master_add);
diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c
index bcb0de864d34..7dd94369abb4 100644
--- a/drivers/spi/spi-fsl-dspi.c
+++ b/drivers/spi/spi-fsl-dspi.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0+
//
// Copyright 2013 Freescale Semiconductor, Inc.
-// Copyright 2020 NXP
+// Copyright 2020-2025 NXP
//
// Freescale DSPI driver
// This file contains a driver for the Freescale DSPI
@@ -62,6 +62,7 @@
#define SPI_SR_TFIWF BIT(18)
#define SPI_SR_RFDF BIT(17)
#define SPI_SR_CMDFFF BIT(16)
+#define SPI_SR_TXRXS BIT(30)
#define SPI_SR_CLEAR (SPI_SR_TCFQF | \
SPI_SR_TFUF | SPI_SR_TFFF | \
SPI_SR_CMDTCF | SPI_SR_SPEF | \
@@ -926,9 +927,20 @@ static int dspi_transfer_one_message(struct spi_controller *ctlr,
struct spi_transfer *transfer;
bool cs = false;
int status = 0;
+ u32 val = 0;
+ bool cs_change = false;
message->actual_length = 0;
+ /* Put DSPI in running mode if halted. */
+ regmap_read(dspi->regmap, SPI_MCR, &val);
+ if (val & SPI_MCR_HALT) {
+ regmap_update_bits(dspi->regmap, SPI_MCR, SPI_MCR_HALT, 0);
+ while (regmap_read(dspi->regmap, SPI_SR, &val) >= 0 &&
+ !(val & SPI_SR_TXRXS))
+ ;
+ }
+
list_for_each_entry(transfer, &message->transfers, transfer_list) {
dspi->cur_transfer = transfer;
dspi->cur_msg = message;
@@ -958,6 +970,7 @@ static int dspi_transfer_one_message(struct spi_controller *ctlr,
dspi->tx_cmd |= SPI_PUSHR_CMD_CONT;
}
+ cs_change = transfer->cs_change;
dspi->tx = transfer->tx_buf;
dspi->rx = transfer->rx_buf;
dspi->len = transfer->len;
@@ -967,6 +980,8 @@ static int dspi_transfer_one_message(struct spi_controller *ctlr,
SPI_MCR_CLR_TXF | SPI_MCR_CLR_RXF,
SPI_MCR_CLR_TXF | SPI_MCR_CLR_RXF);
+ regmap_write(dspi->regmap, SPI_SR, SPI_SR_CLEAR);
+
spi_take_timestamp_pre(dspi->ctlr, dspi->cur_transfer,
dspi->progress, !dspi->irq);
@@ -993,6 +1008,15 @@ static int dspi_transfer_one_message(struct spi_controller *ctlr,
dspi_deassert_cs(spi, &cs);
}
+ if (status || !cs_change) {
+ /* Put DSPI in stop mode */
+ regmap_update_bits(dspi->regmap, SPI_MCR,
+ SPI_MCR_HALT, SPI_MCR_HALT);
+ while (regmap_read(dspi->regmap, SPI_SR, &val) >= 0 &&
+ val & SPI_SR_TXRXS)
+ ;
+ }
+
message->status = status;
spi_finalize_current_message(ctlr);
@@ -1163,6 +1187,20 @@ static int dspi_resume(struct device *dev)
static SIMPLE_DEV_PM_OPS(dspi_pm, dspi_suspend, dspi_resume);
+static const struct regmap_range dspi_yes_ranges[] = {
+ regmap_reg_range(SPI_MCR, SPI_MCR),
+ regmap_reg_range(SPI_TCR, SPI_CTAR(3)),
+ regmap_reg_range(SPI_SR, SPI_TXFR3),
+ regmap_reg_range(SPI_RXFR0, SPI_RXFR3),
+ regmap_reg_range(SPI_CTARE(0), SPI_CTARE(3)),
+ regmap_reg_range(SPI_SREX, SPI_SREX),
+};
+
+static const struct regmap_access_table dspi_access_table = {
+ .yes_ranges = dspi_yes_ranges,
+ .n_yes_ranges = ARRAY_SIZE(dspi_yes_ranges),
+};
+
static const struct regmap_range dspi_volatile_ranges[] = {
regmap_reg_range(SPI_MCR, SPI_TCR),
regmap_reg_range(SPI_SR, SPI_SR),
@@ -1180,6 +1218,8 @@ static const struct regmap_config dspi_regmap_config = {
.reg_stride = 4,
.max_register = 0x88,
.volatile_table = &dspi_volatile_table,
+ .rd_table = &dspi_access_table,
+ .wr_table = &dspi_access_table,
};
static const struct regmap_range dspi_xspi_volatile_ranges[] = {
@@ -1201,6 +1241,8 @@ static const struct regmap_config dspi_xspi_regmap_config[] = {
.reg_stride = 4,
.max_register = 0x13c,
.volatile_table = &dspi_xspi_volatile_table,
+ .rd_table = &dspi_access_table,
+ .wr_table = &dspi_access_table,
},
{
.name = "pushr",
@@ -1223,6 +1265,8 @@ static int dspi_init(struct fsl_dspi *dspi)
if (!spi_controller_is_target(dspi->ctlr))
mcr |= SPI_MCR_HOST;
+ mcr |= SPI_MCR_HALT;
+
regmap_write(dspi->regmap, SPI_MCR, mcr);
regmap_write(dspi->regmap, SPI_SR, SPI_SR_CLEAR);
diff --git a/drivers/spi/spi-rockchip.c b/drivers/spi/spi-rockchip.c
index 1f374cf4d6f6..1615f935c8f0 100644
--- a/drivers/spi/spi-rockchip.c
+++ b/drivers/spi/spi-rockchip.c
@@ -542,7 +542,7 @@ static int rockchip_spi_config(struct rockchip_spi *rs,
cr0 |= (spi->mode & 0x3U) << CR0_SCPH_OFFSET;
if (spi->mode & SPI_LSB_FIRST)
cr0 |= CR0_FBM_LSB << CR0_FBM_OFFSET;
- if (spi->mode & SPI_CS_HIGH)
+ if ((spi->mode & SPI_CS_HIGH) && !(spi_get_csgpiod(spi, 0)))
cr0 |= BIT(spi_get_chipselect(spi, 0)) << CR0_SOI_OFFSET;
if (xfer->rx_buf && xfer->tx_buf)
diff --git a/drivers/spi/spi-sun4i.c b/drivers/spi/spi-sun4i.c
index b8947265d329..5b2cb225a419 100644
--- a/drivers/spi/spi-sun4i.c
+++ b/drivers/spi/spi-sun4i.c
@@ -263,6 +263,9 @@ static int sun4i_spi_transfer_one(struct spi_master *master,
else
reg |= SUN4I_CTL_DHB;
+ /* Now that the settings are correct, enable the interface */
+ reg |= SUN4I_CTL_ENABLE;
+
sun4i_spi_write(sspi, SUN4I_CTL_REG, reg);
/* Ensure that we have a parent clock fast enough */
@@ -403,7 +406,7 @@ static int sun4i_spi_runtime_resume(struct device *dev)
}
sun4i_spi_write(sspi, SUN4I_CTL_REG,
- SUN4I_CTL_ENABLE | SUN4I_CTL_MASTER | SUN4I_CTL_TP);
+ SUN4I_CTL_MASTER | SUN4I_CTL_TP);
return 0;
diff --git a/drivers/spi/spi-zynqmp-gqspi.c b/drivers/spi/spi-zynqmp-gqspi.c
index 3503e6c0a5c9..b5deb4fe3b83 100644
--- a/drivers/spi/spi-zynqmp-gqspi.c
+++ b/drivers/spi/spi-zynqmp-gqspi.c
@@ -799,7 +799,6 @@ static void zynqmp_process_dma_irq(struct zynqmp_qspi *xqspi)
static irqreturn_t zynqmp_qspi_irq(int irq, void *dev_id)
{
struct zynqmp_qspi *xqspi = (struct zynqmp_qspi *)dev_id;
- irqreturn_t ret = IRQ_NONE;
u32 status, mask, dma_status = 0;
status = zynqmp_gqspi_read(xqspi, GQSPI_ISR_OFST);
@@ -814,27 +813,24 @@ static irqreturn_t zynqmp_qspi_irq(int irq, void *dev_id)
dma_status);
}
- if (mask & GQSPI_ISR_TXNOT_FULL_MASK) {
+ if (!mask && !dma_status)
+ return IRQ_NONE;
+
+ if (mask & GQSPI_ISR_TXNOT_FULL_MASK)
zynqmp_qspi_filltxfifo(xqspi, GQSPI_TX_FIFO_FILL);
- ret = IRQ_HANDLED;
- }
- if (dma_status & GQSPI_QSPIDMA_DST_I_STS_DONE_MASK) {
+ if (dma_status & GQSPI_QSPIDMA_DST_I_STS_DONE_MASK)
zynqmp_process_dma_irq(xqspi);
- ret = IRQ_HANDLED;
- } else if (!(mask & GQSPI_IER_RXEMPTY_MASK) &&
- (mask & GQSPI_IER_GENFIFOEMPTY_MASK)) {
+ else if (!(mask & GQSPI_IER_RXEMPTY_MASK) &&
+ (mask & GQSPI_IER_GENFIFOEMPTY_MASK))
zynqmp_qspi_readrxfifo(xqspi, GQSPI_RX_FIFO_FILL);
- ret = IRQ_HANDLED;
- }
if (xqspi->bytes_to_receive == 0 && xqspi->bytes_to_transfer == 0 &&
((status & GQSPI_IRQ_MASK) == GQSPI_IRQ_MASK)) {
zynqmp_gqspi_write(xqspi, GQSPI_IDR_OFST, GQSPI_ISR_IDR_MASK);
complete(&xqspi->data_completion);
- ret = IRQ_HANDLED;
}
- return ret;
+ return IRQ_HANDLED;
}
/**
diff --git a/drivers/target/iscsi/iscsi_target.c b/drivers/target/iscsi/iscsi_target.c
index b516c2893420..b756d4cfecfe 100644
--- a/drivers/target/iscsi/iscsi_target.c
+++ b/drivers/target/iscsi/iscsi_target.c
@@ -4323,8 +4323,8 @@ int iscsit_close_connection(
spin_unlock(&iscsit_global->ts_bitmap_lock);
iscsit_stop_timers_for_cmds(conn);
- iscsit_stop_nopin_response_timer(conn);
iscsit_stop_nopin_timer(conn);
+ iscsit_stop_nopin_response_timer(conn);
if (conn->conn_transport->iscsit_wait_conn)
conn->conn_transport->iscsit_wait_conn(conn);
diff --git a/drivers/target/target_core_spc.c b/drivers/target/target_core_spc.c
index f110f932ba05..675f774be1d3 100644
--- a/drivers/target/target_core_spc.c
+++ b/drivers/target/target_core_spc.c
@@ -2151,8 +2151,10 @@ spc_rsoc_get_descr(struct se_cmd *cmd, struct target_opcode_descriptor **opcode)
if (descr->serv_action_valid)
return TCM_INVALID_CDB_FIELD;
- if (!descr->enabled || descr->enabled(descr, cmd))
+ if (!descr->enabled || descr->enabled(descr, cmd)) {
*opcode = descr;
+ return TCM_NO_SENSE;
+ }
break;
case 0x2:
/*
@@ -2166,8 +2168,10 @@ spc_rsoc_get_descr(struct se_cmd *cmd, struct target_opcode_descriptor **opcode)
if (descr->serv_action_valid &&
descr->service_action == requested_sa) {
if (!descr->enabled || descr->enabled(descr,
- cmd))
+ cmd)) {
*opcode = descr;
+ return TCM_NO_SENSE;
+ }
} else if (!descr->serv_action_valid)
return TCM_INVALID_CDB_FIELD;
break;
@@ -2180,13 +2184,15 @@ spc_rsoc_get_descr(struct se_cmd *cmd, struct target_opcode_descriptor **opcode)
*/
if (descr->service_action == requested_sa)
if (!descr->enabled || descr->enabled(descr,
- cmd))
+ cmd)) {
*opcode = descr;
+ return TCM_NO_SENSE;
+ }
break;
}
}
- return 0;
+ return TCM_NO_SENSE;
}
static sense_reason_t
diff --git a/drivers/thermal/intel/x86_pkg_temp_thermal.c b/drivers/thermal/intel/x86_pkg_temp_thermal.c
index 61c3d450ee60..2e06b26be4ef 100644
--- a/drivers/thermal/intel/x86_pkg_temp_thermal.c
+++ b/drivers/thermal/intel/x86_pkg_temp_thermal.c
@@ -331,6 +331,7 @@ static int pkg_temp_thermal_device_add(unsigned int cpu)
tj_max = intel_tcc_get_tjmax(cpu);
if (tj_max < 0)
return tj_max;
+ tj_max *= 1000;
zonedev = kzalloc(sizeof(*zonedev), GFP_KERNEL);
if (!zonedev)
diff --git a/drivers/thermal/qoriq_thermal.c b/drivers/thermal/qoriq_thermal.c
index 404f01cca4da..ff8657afb31d 100644
--- a/drivers/thermal/qoriq_thermal.c
+++ b/drivers/thermal/qoriq_thermal.c
@@ -18,6 +18,7 @@
#define SITES_MAX 16
#define TMR_DISABLE 0x0
#define TMR_ME 0x80000000
+#define TMR_CMD BIT(29)
#define TMR_ALPF 0x0c000000
#define TMR_ALPF_V2 0x03000000
#define TMTMIR_DEFAULT 0x0000000f
@@ -356,6 +357,12 @@ static int __maybe_unused qoriq_tmu_suspend(struct device *dev)
if (ret)
return ret;
+ if (data->ver > TMU_VER1) {
+ ret = regmap_set_bits(data->regmap, REGS_TMR, TMR_CMD);
+ if (ret)
+ return ret;
+ }
+
clk_disable_unprepare(data->clk);
return 0;
@@ -370,6 +377,12 @@ static int __maybe_unused qoriq_tmu_resume(struct device *dev)
if (ret)
return ret;
+ if (data->ver > TMU_VER1) {
+ ret = regmap_clear_bits(data->regmap, REGS_TMR, TMR_CMD);
+ if (ret)
+ return ret;
+ }
+
/* Enable monitoring */
return regmap_update_bits(data->regmap, REGS_TMR, TMR_ME, TMR_ME);
}
diff --git a/drivers/thunderbolt/retimer.c b/drivers/thunderbolt/retimer.c
index 2ee8c5ebca7c..43146c0685df 100644
--- a/drivers/thunderbolt/retimer.c
+++ b/drivers/thunderbolt/retimer.c
@@ -89,9 +89,11 @@ static int tb_retimer_nvm_add(struct tb_retimer *rt)
if (ret)
goto err_nvm;
- ret = tb_nvm_add_non_active(nvm, nvm_write);
- if (ret)
- goto err_nvm;
+ if (!rt->no_nvm_upgrade) {
+ ret = tb_nvm_add_non_active(nvm, nvm_write);
+ if (ret)
+ goto err_nvm;
+ }
rt->nvm = nvm;
return 0;
diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
index c2778300e151..d5ad6cae6b65 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -1676,7 +1676,7 @@ static void serial8250_disable_ms(struct uart_port *port)
if (up->bugs & UART_BUG_NOMSR)
return;
- mctrl_gpio_disable_ms(up->gpios);
+ mctrl_gpio_disable_ms_no_sync(up->gpios);
up->ier &= ~UART_IER_MSI;
serial_port_out(port, UART_IER, up->ier);
diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index bcca5627afac..85559d9b35d8 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -698,7 +698,7 @@ static void atmel_disable_ms(struct uart_port *port)
atmel_port->ms_irq_enabled = false;
- mctrl_gpio_disable_ms(atmel_port->gpios);
+ mctrl_gpio_disable_ms_no_sync(atmel_port->gpios);
if (!mctrl_gpio_to_gpiod(atmel_port->gpios, UART_GPIO_CTS))
idr |= ATMEL_US_CTSIC;
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 349d4849ba5e..04809b781f45 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -1597,7 +1597,7 @@ static void imx_uart_shutdown(struct uart_port *port)
imx_uart_dma_exit(sport);
}
- mctrl_gpio_disable_ms(sport->gpios);
+ mctrl_gpio_disable_ms_sync(sport->gpios);
spin_lock_irqsave(&sport->port.lock, flags);
ucr2 = imx_uart_readl(sport, UCR2);
diff --git a/drivers/tty/serial/serial_mctrl_gpio.c b/drivers/tty/serial/serial_mctrl_gpio.c
index 7d5aaa8d422b..d5fb293dd5a9 100644
--- a/drivers/tty/serial/serial_mctrl_gpio.c
+++ b/drivers/tty/serial/serial_mctrl_gpio.c
@@ -322,11 +322,7 @@ void mctrl_gpio_enable_ms(struct mctrl_gpios *gpios)
}
EXPORT_SYMBOL_GPL(mctrl_gpio_enable_ms);
-/**
- * mctrl_gpio_disable_ms - disable irqs and handling of changes to the ms lines
- * @gpios: gpios to disable
- */
-void mctrl_gpio_disable_ms(struct mctrl_gpios *gpios)
+static void mctrl_gpio_disable_ms(struct mctrl_gpios *gpios, bool sync)
{
enum mctrl_gpio_idx i;
@@ -342,10 +338,34 @@ void mctrl_gpio_disable_ms(struct mctrl_gpios *gpios)
if (!gpios->irq[i])
continue;
- disable_irq(gpios->irq[i]);
+ if (sync)
+ disable_irq(gpios->irq[i]);
+ else
+ disable_irq_nosync(gpios->irq[i]);
}
}
-EXPORT_SYMBOL_GPL(mctrl_gpio_disable_ms);
+
+/**
+ * mctrl_gpio_disable_ms_sync - disable irqs and handling of changes to the ms
+ * lines, and wait for any pending IRQ to be processed
+ * @gpios: gpios to disable
+ */
+void mctrl_gpio_disable_ms_sync(struct mctrl_gpios *gpios)
+{
+ mctrl_gpio_disable_ms(gpios, true);
+}
+EXPORT_SYMBOL_GPL(mctrl_gpio_disable_ms_sync);
+
+/**
+ * mctrl_gpio_disable_ms_no_sync - disable irqs and handling of changes to the
+ * ms lines, and return immediately
+ * @gpios: gpios to disable
+ */
+void mctrl_gpio_disable_ms_no_sync(struct mctrl_gpios *gpios)
+{
+ mctrl_gpio_disable_ms(gpios, false);
+}
+EXPORT_SYMBOL_GPL(mctrl_gpio_disable_ms_no_sync);
void mctrl_gpio_enable_irq_wake(struct mctrl_gpios *gpios)
{
diff --git a/drivers/tty/serial/serial_mctrl_gpio.h b/drivers/tty/serial/serial_mctrl_gpio.h
index fc76910fb105..79e97838ebe5 100644
--- a/drivers/tty/serial/serial_mctrl_gpio.h
+++ b/drivers/tty/serial/serial_mctrl_gpio.h
@@ -87,9 +87,16 @@ void mctrl_gpio_free(struct device *dev, struct mctrl_gpios *gpios);
void mctrl_gpio_enable_ms(struct mctrl_gpios *gpios);
/*
- * Disable gpio interrupts to report status line changes.
+ * Disable gpio interrupts to report status line changes, and block until
+ * any corresponding IRQ is processed
*/
-void mctrl_gpio_disable_ms(struct mctrl_gpios *gpios);
+void mctrl_gpio_disable_ms_sync(struct mctrl_gpios *gpios);
+
+/*
+ * Disable gpio interrupts to report status line changes, and return
+ * immediately
+ */
+void mctrl_gpio_disable_ms_no_sync(struct mctrl_gpios *gpios);
/*
* Enable gpio wakeup interrupts to enable wake up source.
@@ -148,7 +155,11 @@ static inline void mctrl_gpio_enable_ms(struct mctrl_gpios *gpios)
{
}
-static inline void mctrl_gpio_disable_ms(struct mctrl_gpios *gpios)
+static inline void mctrl_gpio_disable_ms_sync(struct mctrl_gpios *gpios)
+{
+}
+
+static inline void mctrl_gpio_disable_ms_no_sync(struct mctrl_gpios *gpios)
{
}
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index 4350a69d97d7..61d8f50676b1 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -104,6 +104,20 @@ struct plat_sci_reg {
u8 offset, size;
};
+struct sci_suspend_regs {
+ u16 scdl;
+ u16 sccks;
+ u16 scsmr;
+ u16 scscr;
+ u16 scfcr;
+ u16 scsptr;
+ u16 hssrr;
+ u16 scpcr;
+ u16 scpdr;
+ u8 scbrr;
+ u8 semr;
+};
+
struct sci_port_params {
const struct plat_sci_reg regs[SCIx_NR_REGS];
unsigned int fifosize;
@@ -134,6 +148,8 @@ struct sci_port {
struct dma_chan *chan_tx;
struct dma_chan *chan_rx;
+ struct reset_control *rstc;
+
#ifdef CONFIG_SERIAL_SH_SCI_DMA
struct dma_chan *chan_tx_saved;
struct dma_chan *chan_rx_saved;
@@ -153,6 +169,7 @@ struct sci_port {
int rx_trigger;
struct timer_list rx_fifo_timer;
int rx_fifo_timeout;
+ struct sci_suspend_regs suspend_regs;
u16 hscif_tot;
bool has_rtscts;
@@ -2237,7 +2254,7 @@ static void sci_shutdown(struct uart_port *port)
dev_dbg(port->dev, "%s(%d)\n", __func__, port->line);
s->autorts = false;
- mctrl_gpio_disable_ms(to_sci_port(port)->gpios);
+ mctrl_gpio_disable_ms_sync(to_sci_port(port)->gpios);
spin_lock_irqsave(&port->lock, flags);
sci_stop_rx(port);
@@ -3325,6 +3342,7 @@ static struct plat_sci_port *sci_parse_dt(struct platform_device *pdev,
}
sp = &sci_ports[id];
+ sp->rstc = rstc;
*dev_id = id;
p->type = SCI_OF_TYPE(data);
@@ -3473,13 +3491,77 @@ static int sci_probe(struct platform_device *dev)
return 0;
}
+static void sci_console_save(struct sci_port *s)
+{
+ struct sci_suspend_regs *regs = &s->suspend_regs;
+ struct uart_port *port = &s->port;
+
+ if (sci_getreg(port, SCDL)->size)
+ regs->scdl = sci_serial_in(port, SCDL);
+ if (sci_getreg(port, SCCKS)->size)
+ regs->sccks = sci_serial_in(port, SCCKS);
+ if (sci_getreg(port, SCSMR)->size)
+ regs->scsmr = sci_serial_in(port, SCSMR);
+ if (sci_getreg(port, SCSCR)->size)
+ regs->scscr = sci_serial_in(port, SCSCR);
+ if (sci_getreg(port, SCFCR)->size)
+ regs->scfcr = sci_serial_in(port, SCFCR);
+ if (sci_getreg(port, SCSPTR)->size)
+ regs->scsptr = sci_serial_in(port, SCSPTR);
+ if (sci_getreg(port, SCBRR)->size)
+ regs->scbrr = sci_serial_in(port, SCBRR);
+ if (sci_getreg(port, HSSRR)->size)
+ regs->hssrr = sci_serial_in(port, HSSRR);
+ if (sci_getreg(port, SCPCR)->size)
+ regs->scpcr = sci_serial_in(port, SCPCR);
+ if (sci_getreg(port, SCPDR)->size)
+ regs->scpdr = sci_serial_in(port, SCPDR);
+ if (sci_getreg(port, SEMR)->size)
+ regs->semr = sci_serial_in(port, SEMR);
+}
+
+static void sci_console_restore(struct sci_port *s)
+{
+ struct sci_suspend_regs *regs = &s->suspend_regs;
+ struct uart_port *port = &s->port;
+
+ if (sci_getreg(port, SCDL)->size)
+ sci_serial_out(port, SCDL, regs->scdl);
+ if (sci_getreg(port, SCCKS)->size)
+ sci_serial_out(port, SCCKS, regs->sccks);
+ if (sci_getreg(port, SCSMR)->size)
+ sci_serial_out(port, SCSMR, regs->scsmr);
+ if (sci_getreg(port, SCSCR)->size)
+ sci_serial_out(port, SCSCR, regs->scscr);
+ if (sci_getreg(port, SCFCR)->size)
+ sci_serial_out(port, SCFCR, regs->scfcr);
+ if (sci_getreg(port, SCSPTR)->size)
+ sci_serial_out(port, SCSPTR, regs->scsptr);
+ if (sci_getreg(port, SCBRR)->size)
+ sci_serial_out(port, SCBRR, regs->scbrr);
+ if (sci_getreg(port, HSSRR)->size)
+ sci_serial_out(port, HSSRR, regs->hssrr);
+ if (sci_getreg(port, SCPCR)->size)
+ sci_serial_out(port, SCPCR, regs->scpcr);
+ if (sci_getreg(port, SCPDR)->size)
+ sci_serial_out(port, SCPDR, regs->scpdr);
+ if (sci_getreg(port, SEMR)->size)
+ sci_serial_out(port, SEMR, regs->semr);
+}
+
static __maybe_unused int sci_suspend(struct device *dev)
{
struct sci_port *sport = dev_get_drvdata(dev);
- if (sport)
+ if (sport) {
uart_suspend_port(&sci_uart_driver, &sport->port);
+ if (!console_suspend_enabled && uart_console(&sport->port))
+ sci_console_save(sport);
+ else
+ return reset_control_assert(sport->rstc);
+ }
+
return 0;
}
@@ -3487,8 +3569,18 @@ static __maybe_unused int sci_resume(struct device *dev)
{
struct sci_port *sport = dev_get_drvdata(dev);
- if (sport)
+ if (sport) {
+ if (!console_suspend_enabled && uart_console(&sport->port)) {
+ sci_console_restore(sport);
+ } else {
+ int ret = reset_control_deassert(sport->rstc);
+
+ if (ret)
+ return ret;
+ }
+
uart_resume_port(&sci_uart_driver, &sport->port);
+ }
return 0;
}
diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c
index 9ef90bb30a47..b58422ae156c 100644
--- a/drivers/tty/serial/stm32-usart.c
+++ b/drivers/tty/serial/stm32-usart.c
@@ -952,7 +952,7 @@ static void stm32_usart_enable_ms(struct uart_port *port)
static void stm32_usart_disable_ms(struct uart_port *port)
{
- mctrl_gpio_disable_ms(to_stm32_port(port)->gpios);
+ mctrl_gpio_disable_ms_sync(to_stm32_port(port)->gpios);
}
/* Transmit stop */
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index cb5611cbf454..2346a1fc72b5 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -257,6 +257,7 @@ static const struct ufs_dev_quirk ufs_fixups[] = {
.model = UFS_ANY_MODEL,
.quirk = UFS_DEVICE_QUIRK_DELAY_BEFORE_LPM |
UFS_DEVICE_QUIRK_HOST_PA_TACTIVATE |
+ UFS_DEVICE_QUIRK_PA_HIBER8TIME |
UFS_DEVICE_QUIRK_RECOVERY_FROM_DL_NAC_ERRORS },
{ .wmanufacturerid = UFS_VENDOR_SKHYNIX,
.model = UFS_ANY_MODEL,
@@ -8459,6 +8460,31 @@ static int ufshcd_quirk_tune_host_pa_tactivate(struct ufs_hba *hba)
return ret;
}
+/**
+ * ufshcd_quirk_override_pa_h8time - Ensures proper adjustment of PA_HIBERN8TIME.
+ * @hba: per-adapter instance
+ *
+ * Some UFS devices require specific adjustments to the PA_HIBERN8TIME parameter
+ * to ensure proper hibernation timing. This function retrieves the current
+ * PA_HIBERN8TIME value and increments it by 100us.
+ */
+static void ufshcd_quirk_override_pa_h8time(struct ufs_hba *hba)
+{
+ u32 pa_h8time;
+ int ret;
+
+ ret = ufshcd_dme_get(hba, UIC_ARG_MIB(PA_HIBERN8TIME), &pa_h8time);
+ if (ret) {
+ dev_err(hba->dev, "Failed to get PA_HIBERN8TIME: %d\n", ret);
+ return;
+ }
+
+ /* Increment by 1 to increase hibernation time by 100 µs */
+ ret = ufshcd_dme_set(hba, UIC_ARG_MIB(PA_HIBERN8TIME), pa_h8time + 1);
+ if (ret)
+ dev_err(hba->dev, "Failed updating PA_HIBERN8TIME: %d\n", ret);
+}
+
static void ufshcd_tune_unipro_params(struct ufs_hba *hba)
{
if (ufshcd_is_unipro_pa_params_tuning_req(hba)) {
@@ -8474,6 +8500,9 @@ static void ufshcd_tune_unipro_params(struct ufs_hba *hba)
if (hba->dev_quirks & UFS_DEVICE_QUIRK_HOST_PA_TACTIVATE)
ufshcd_quirk_tune_host_pa_tactivate(hba);
+
+ if (hba->dev_quirks & UFS_DEVICE_QUIRK_PA_HIBER8TIME)
+ ufshcd_quirk_override_pa_h8time(hba);
}
static void ufshcd_clear_dbg_ufs_stats(struct ufs_hba *hba)
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 5a53280fa2ed..44352df58c9e 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -1180,7 +1180,14 @@ static void xhci_handle_cmd_stop_ep(struct xhci_hcd *xhci, int slot_id,
*/
switch (GET_EP_CTX_STATE(ep_ctx)) {
case EP_STATE_HALTED:
- xhci_dbg(xhci, "Stop ep completion raced with stall, reset ep\n");
+ xhci_dbg(xhci, "Stop ep completion raced with stall\n");
+ /*
+ * If the halt happened before Stop Endpoint failed, its transfer event
+ * should have already been handled and Reset Endpoint should be pending.
+ */
+ if (ep->ep_state & EP_HALTED)
+ goto reset_done;
+
if (ep->ep_state & EP_HAS_STREAMS) {
reset_type = EP_SOFT_RESET;
} else {
@@ -1191,8 +1198,11 @@ static void xhci_handle_cmd_stop_ep(struct xhci_hcd *xhci, int slot_id,
}
/* reset ep, reset handler cleans up cancelled tds */
err = xhci_handle_halted_endpoint(xhci, ep, td, reset_type);
+ xhci_dbg(xhci, "Stop ep completion resetting ep, status %d\n", err);
if (err)
break;
+reset_done:
+ /* Reset EP handler will clean up cancelled TDs */
ep->ep_state &= ~EP_STOP_CMD_PENDING;
return;
case EP_STATE_STOPPED:
diff --git a/drivers/vdpa/mlx5/net/mlx5_vnet.c b/drivers/vdpa/mlx5/net/mlx5_vnet.c
index b56aae3f7be3..9b8b70ffde5a 100644
--- a/drivers/vdpa/mlx5/net/mlx5_vnet.c
+++ b/drivers/vdpa/mlx5/net/mlx5_vnet.c
@@ -3420,6 +3420,9 @@ static int mlx5_vdpa_dev_add(struct vdpa_mgmt_dev *v_mdev, const char *name,
ndev->mvdev.max_vqs = max_vqs;
mvdev = &ndev->mvdev;
mvdev->mdev = mdev;
+ /* cpu_to_mlx5vdpa16() below depends on this flag */
+ mvdev->actual_features =
+ (device_features & BIT_ULL(VIRTIO_F_VERSION_1));
ndev->vqs = kcalloc(max_vqs, sizeof(*ndev->vqs), GFP_KERNEL);
ndev->event_cbs = kcalloc(max_vqs + 1, sizeof(*ndev->event_cbs), GFP_KERNEL);
diff --git a/drivers/vfio/pci/vfio_pci_config.c b/drivers/vfio/pci/vfio_pci_config.c
index a2ad4f7c716b..d9eb8733a324 100644
--- a/drivers/vfio/pci/vfio_pci_config.c
+++ b/drivers/vfio/pci/vfio_pci_config.c
@@ -1813,7 +1813,8 @@ int vfio_config_init(struct vfio_pci_core_device *vdev)
cpu_to_le16(PCI_COMMAND_MEMORY);
}
- if (!IS_ENABLED(CONFIG_VFIO_PCI_INTX) || vdev->nointx)
+ if (!IS_ENABLED(CONFIG_VFIO_PCI_INTX) || vdev->nointx ||
+ vdev->pdev->irq == IRQ_NOTCONNECTED)
vconfig[PCI_INTERRUPT_PIN] = 0;
ret = vfio_cap_init(vdev);
diff --git a/drivers/vfio/pci/vfio_pci_core.c b/drivers/vfio/pci/vfio_pci_core.c
index a8f259bc2f4d..fa168b434239 100644
--- a/drivers/vfio/pci/vfio_pci_core.c
+++ b/drivers/vfio/pci/vfio_pci_core.c
@@ -731,15 +731,7 @@ EXPORT_SYMBOL_GPL(vfio_pci_core_finish_enable);
static int vfio_pci_get_irq_count(struct vfio_pci_core_device *vdev, int irq_type)
{
if (irq_type == VFIO_PCI_INTX_IRQ_INDEX) {
- u8 pin;
-
- if (!IS_ENABLED(CONFIG_VFIO_PCI_INTX) ||
- vdev->nointx || vdev->pdev->is_virtfn)
- return 0;
-
- pci_read_config_byte(vdev->pdev, PCI_INTERRUPT_PIN, &pin);
-
- return pin ? 1 : 0;
+ return vdev->vconfig[PCI_INTERRUPT_PIN] ? 1 : 0;
} else if (irq_type == VFIO_PCI_MSI_IRQ_INDEX) {
u8 pos;
u16 flags;
diff --git a/drivers/vfio/pci/vfio_pci_intrs.c b/drivers/vfio/pci/vfio_pci_intrs.c
index 620134041b48..c4322faca2bd 100644
--- a/drivers/vfio/pci/vfio_pci_intrs.c
+++ b/drivers/vfio/pci/vfio_pci_intrs.c
@@ -269,7 +269,7 @@ static int vfio_intx_enable(struct vfio_pci_core_device *vdev,
if (!is_irq_none(vdev))
return -EINVAL;
- if (!pdev->irq)
+ if (!pdev->irq || pdev->irq == IRQ_NOTCONNECTED)
return -ENODEV;
name = kasprintf(GFP_KERNEL_ACCOUNT, "vfio-intx(%s)", pci_name(pdev));
diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c
index 8d8a22504d71..662351511157 100644
--- a/drivers/vhost/scsi.c
+++ b/drivers/vhost/scsi.c
@@ -560,6 +560,9 @@ static void vhost_scsi_complete_cmd_work(struct vhost_work *work)
int ret;
llnode = llist_del_all(&svq->completion_list);
+
+ mutex_lock(&svq->vq.mutex);
+
llist_for_each_entry_safe(cmd, t, llnode, tvc_completion_list) {
se_cmd = &cmd->tvc_se_cmd;
@@ -593,6 +596,8 @@ static void vhost_scsi_complete_cmd_work(struct vhost_work *work)
vhost_scsi_release_cmd_res(se_cmd);
}
+ mutex_unlock(&svq->vq.mutex);
+
if (signal)
vhost_signal(&svq->vs->dev, &svq->vq);
}
@@ -746,7 +751,7 @@ vhost_scsi_copy_iov_to_sgl(struct vhost_scsi_cmd *cmd, struct iov_iter *iter,
size_t len = iov_iter_count(iter);
unsigned int nbytes = 0;
struct page *page;
- int i;
+ int i, ret;
if (cmd->tvc_data_direction == DMA_FROM_DEVICE) {
cmd->saved_iter_addr = dup_iter(&cmd->saved_iter, iter,
@@ -759,6 +764,7 @@ vhost_scsi_copy_iov_to_sgl(struct vhost_scsi_cmd *cmd, struct iov_iter *iter,
page = alloc_page(GFP_KERNEL);
if (!page) {
i--;
+ ret = -ENOMEM;
goto err;
}
@@ -766,8 +772,10 @@ vhost_scsi_copy_iov_to_sgl(struct vhost_scsi_cmd *cmd, struct iov_iter *iter,
sg_set_page(&sg[i], page, nbytes, 0);
if (cmd->tvc_data_direction == DMA_TO_DEVICE &&
- copy_page_from_iter(page, 0, nbytes, iter) != nbytes)
+ copy_page_from_iter(page, 0, nbytes, iter) != nbytes) {
+ ret = -EFAULT;
goto err;
+ }
len -= nbytes;
}
@@ -782,7 +790,7 @@ vhost_scsi_copy_iov_to_sgl(struct vhost_scsi_cmd *cmd, struct iov_iter *iter,
for (; i >= 0; i--)
__free_page(sg_page(&sg[i]));
kfree(cmd->saved_iter_addr);
- return -ENOMEM;
+ return ret;
}
static int
@@ -1221,9 +1229,9 @@ vhost_scsi_handle_vq(struct vhost_scsi *vs, struct vhost_virtqueue *vq)
" %d\n", cmd, exp_data_len, prot_bytes, data_direction);
if (data_direction != DMA_NONE) {
- if (unlikely(vhost_scsi_mapal(cmd, prot_bytes,
- &prot_iter, exp_data_len,
- &data_iter))) {
+ ret = vhost_scsi_mapal(cmd, prot_bytes, &prot_iter,
+ exp_data_len, &data_iter);
+ if (unlikely(ret)) {
vq_err(vq, "Failed to map iov to sgl\n");
vhost_scsi_release_cmd_res(&cmd->tvc_se_cmd);
goto err;
@@ -1301,8 +1309,11 @@ static void vhost_scsi_tmf_resp_work(struct vhost_work *work)
resp_code = VIRTIO_SCSI_S_FUNCTION_REJECTED;
}
+ mutex_lock(&tmf->svq->vq.mutex);
vhost_scsi_send_tmf_resp(tmf->vhost, &tmf->svq->vq, tmf->in_iovs,
tmf->vq_desc, &tmf->resp_iov, resp_code);
+ mutex_unlock(&tmf->svq->vq.mutex);
+
vhost_scsi_release_tmf_res(tmf);
}
diff --git a/drivers/video/fbdev/core/bitblit.c b/drivers/video/fbdev/core/bitblit.c
index 8587c9da0670..42e681a78136 100644
--- a/drivers/video/fbdev/core/bitblit.c
+++ b/drivers/video/fbdev/core/bitblit.c
@@ -59,12 +59,11 @@ static void bit_bmove(struct vc_data *vc, struct fb_info *info, int sy,
}
static void bit_clear(struct vc_data *vc, struct fb_info *info, int sy,
- int sx, int height, int width)
+ int sx, int height, int width, int fg, int bg)
{
- int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
struct fb_fillrect region;
- region.color = attr_bgcol_ec(bgshift, vc, info);
+ region.color = bg;
region.dx = sx * vc->vc_font.width;
region.dy = sy * vc->vc_font.height;
region.width = width * vc->vc_font.width;
diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
index 405d587450ef..7a6f9a3cb3ba 100644
--- a/drivers/video/fbdev/core/fbcon.c
+++ b/drivers/video/fbdev/core/fbcon.c
@@ -1240,7 +1240,7 @@ static void fbcon_clear(struct vc_data *vc, int sy, int sx, int height,
{
struct fb_info *info = fbcon_info_from_console(vc->vc_num);
struct fbcon_ops *ops = info->fbcon_par;
-
+ int fg, bg;
struct fbcon_display *p = &fb_display[vc->vc_num];
u_int y_break;
@@ -1261,16 +1261,18 @@ static void fbcon_clear(struct vc_data *vc, int sy, int sx, int height,
fbcon_clear_margins(vc, 0);
}
+ fg = get_color(vc, info, vc->vc_video_erase_char, 1);
+ bg = get_color(vc, info, vc->vc_video_erase_char, 0);
/* Split blits that cross physical y_wrap boundary */
y_break = p->vrows - p->yscroll;
if (sy < y_break && sy + height - 1 >= y_break) {
u_int b = y_break - sy;
- ops->clear(vc, info, real_y(p, sy), sx, b, width);
+ ops->clear(vc, info, real_y(p, sy), sx, b, width, fg, bg);
ops->clear(vc, info, real_y(p, sy + b), sx, height - b,
- width);
+ width, fg, bg);
} else
- ops->clear(vc, info, real_y(p, sy), sx, height, width);
+ ops->clear(vc, info, real_y(p, sy), sx, height, width, fg, bg);
}
static void fbcon_putcs(struct vc_data *vc, const unsigned short *s,
diff --git a/drivers/video/fbdev/core/fbcon.h b/drivers/video/fbdev/core/fbcon.h
index 0eaf54a21151..25691d4b027b 100644
--- a/drivers/video/fbdev/core/fbcon.h
+++ b/drivers/video/fbdev/core/fbcon.h
@@ -55,7 +55,7 @@ struct fbcon_ops {
void (*bmove)(struct vc_data *vc, struct fb_info *info, int sy,
int sx, int dy, int dx, int height, int width);
void (*clear)(struct vc_data *vc, struct fb_info *info, int sy,
- int sx, int height, int width);
+ int sx, int height, int width, int fb, int bg);
void (*putcs)(struct vc_data *vc, struct fb_info *info,
const unsigned short *s, int count, int yy, int xx,
int fg, int bg);
@@ -116,42 +116,6 @@ static inline int mono_col(const struct fb_info *info)
return (~(0xfff << max_len)) & 0xff;
}
-static inline int attr_col_ec(int shift, struct vc_data *vc,
- struct fb_info *info, int is_fg)
-{
- int is_mono01;
- int col;
- int fg;
- int bg;
-
- if (!vc)
- return 0;
-
- if (vc->vc_can_do_color)
- return is_fg ? attr_fgcol(shift,vc->vc_video_erase_char)
- : attr_bgcol(shift,vc->vc_video_erase_char);
-
- if (!info)
- return 0;
-
- col = mono_col(info);
- is_mono01 = info->fix.visual == FB_VISUAL_MONO01;
-
- if (attr_reverse(vc->vc_video_erase_char)) {
- fg = is_mono01 ? col : 0;
- bg = is_mono01 ? 0 : col;
- }
- else {
- fg = is_mono01 ? 0 : col;
- bg = is_mono01 ? col : 0;
- }
-
- return is_fg ? fg : bg;
-}
-
-#define attr_bgcol_ec(bgshift, vc, info) attr_col_ec(bgshift, vc, info, 0)
-#define attr_fgcol_ec(fgshift, vc, info) attr_col_ec(fgshift, vc, info, 1)
-
/*
* Scroll Method
*/
diff --git a/drivers/video/fbdev/core/fbcon_ccw.c b/drivers/video/fbdev/core/fbcon_ccw.c
index 2789ace79634..9f4d65478554 100644
--- a/drivers/video/fbdev/core/fbcon_ccw.c
+++ b/drivers/video/fbdev/core/fbcon_ccw.c
@@ -78,14 +78,13 @@ static void ccw_bmove(struct vc_data *vc, struct fb_info *info, int sy,
}
static void ccw_clear(struct vc_data *vc, struct fb_info *info, int sy,
- int sx, int height, int width)
+ int sx, int height, int width, int fg, int bg)
{
struct fbcon_ops *ops = info->fbcon_par;
struct fb_fillrect region;
- int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
u32 vyres = GETVYRES(ops->p, info);
- region.color = attr_bgcol_ec(bgshift,vc,info);
+ region.color = bg;
region.dx = sy * vc->vc_font.height;
region.dy = vyres - ((sx + width) * vc->vc_font.width);
region.height = width * vc->vc_font.width;
diff --git a/drivers/video/fbdev/core/fbcon_cw.c b/drivers/video/fbdev/core/fbcon_cw.c
index 86a254c1b2b7..b18e31886da1 100644
--- a/drivers/video/fbdev/core/fbcon_cw.c
+++ b/drivers/video/fbdev/core/fbcon_cw.c
@@ -63,14 +63,13 @@ static void cw_bmove(struct vc_data *vc, struct fb_info *info, int sy,
}
static void cw_clear(struct vc_data *vc, struct fb_info *info, int sy,
- int sx, int height, int width)
+ int sx, int height, int width, int fg, int bg)
{
struct fbcon_ops *ops = info->fbcon_par;
struct fb_fillrect region;
- int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
u32 vxres = GETVXRES(ops->p, info);
- region.color = attr_bgcol_ec(bgshift,vc,info);
+ region.color = bg;
region.dx = vxres - ((sy + height) * vc->vc_font.height);
region.dy = sx * vc->vc_font.width;
region.height = width * vc->vc_font.width;
diff --git a/drivers/video/fbdev/core/fbcon_ud.c b/drivers/video/fbdev/core/fbcon_ud.c
index 23bc045769d0..b6b074cfd9dc 100644
--- a/drivers/video/fbdev/core/fbcon_ud.c
+++ b/drivers/video/fbdev/core/fbcon_ud.c
@@ -64,15 +64,14 @@ static void ud_bmove(struct vc_data *vc, struct fb_info *info, int sy,
}
static void ud_clear(struct vc_data *vc, struct fb_info *info, int sy,
- int sx, int height, int width)
+ int sx, int height, int width, int fg, int bg)
{
struct fbcon_ops *ops = info->fbcon_par;
struct fb_fillrect region;
- int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
u32 vyres = GETVYRES(ops->p, info);
u32 vxres = GETVXRES(ops->p, info);
- region.color = attr_bgcol_ec(bgshift,vc,info);
+ region.color = bg;
region.dy = vyres - ((sy + height) * vc->vc_font.height);
region.dx = vxres - ((sx + width) * vc->vc_font.width);
region.width = width * vc->vc_font.width;
diff --git a/drivers/video/fbdev/core/tileblit.c b/drivers/video/fbdev/core/tileblit.c
index 2768eff247ba..b3aa0c6620c7 100644
--- a/drivers/video/fbdev/core/tileblit.c
+++ b/drivers/video/fbdev/core/tileblit.c
@@ -32,16 +32,14 @@ static void tile_bmove(struct vc_data *vc, struct fb_info *info, int sy,
}
static void tile_clear(struct vc_data *vc, struct fb_info *info, int sy,
- int sx, int height, int width)
+ int sx, int height, int width, int fg, int bg)
{
struct fb_tilerect rect;
- int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
- int fgshift = (vc->vc_hi_font_mask) ? 9 : 8;
rect.index = vc->vc_video_erase_char &
((vc->vc_hi_font_mask) ? 0x1ff : 0xff);
- rect.fg = attr_fgcol_ec(fgshift, vc, info);
- rect.bg = attr_bgcol_ec(bgshift, vc, info);
+ rect.fg = fg;
+ rect.bg = bg;
rect.sx = sx;
rect.sy = sy;
rect.width = width;
@@ -76,7 +74,42 @@ static void tile_putcs(struct vc_data *vc, struct fb_info *info,
static void tile_clear_margins(struct vc_data *vc, struct fb_info *info,
int color, int bottom_only)
{
- return;
+ unsigned int cw = vc->vc_font.width;
+ unsigned int ch = vc->vc_font.height;
+ unsigned int rw = info->var.xres - (vc->vc_cols*cw);
+ unsigned int bh = info->var.yres - (vc->vc_rows*ch);
+ unsigned int rs = info->var.xres - rw;
+ unsigned int bs = info->var.yres - bh;
+ unsigned int vwt = info->var.xres_virtual / cw;
+ unsigned int vht = info->var.yres_virtual / ch;
+ struct fb_tilerect rect;
+
+ rect.index = vc->vc_video_erase_char &
+ ((vc->vc_hi_font_mask) ? 0x1ff : 0xff);
+ rect.fg = color;
+ rect.bg = color;
+
+ if ((int) rw > 0 && !bottom_only) {
+ rect.sx = (info->var.xoffset + rs + cw - 1) / cw;
+ rect.sy = 0;
+ rect.width = (rw + cw - 1) / cw;
+ rect.height = vht;
+ if (rect.width + rect.sx > vwt)
+ rect.width = vwt - rect.sx;
+ if (rect.sx < vwt)
+ info->tileops->fb_tilefill(info, &rect);
+ }
+
+ if ((int) bh > 0) {
+ rect.sx = info->var.xoffset / cw;
+ rect.sy = (info->var.yoffset + bs) / ch;
+ rect.width = rs / cw;
+ rect.height = (bh + ch - 1) / ch;
+ if (rect.height + rect.sy > vht)
+ rect.height = vht - rect.sy;
+ if (rect.sy < vht)
+ info->tileops->fb_tilefill(info, &rect);
+ }
}
static void tile_cursor(struct vc_data *vc, struct fb_info *info, int mode,
diff --git a/drivers/video/fbdev/fsl-diu-fb.c b/drivers/video/fbdev/fsl-diu-fb.c
index 0bced82fa494..8cf1268a4e55 100644
--- a/drivers/video/fbdev/fsl-diu-fb.c
+++ b/drivers/video/fbdev/fsl-diu-fb.c
@@ -1827,6 +1827,7 @@ static void fsl_diu_remove(struct platform_device *pdev)
int i;
data = dev_get_drvdata(&pdev->dev);
+ device_remove_file(&pdev->dev, &data->dev_attr);
disable_lcdc(&data->fsl_diu_info[0]);
free_irq(data->irq, data->diu_reg);
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index 80669e05bf0e..c5f04234d951 100644
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -2530,7 +2530,7 @@ bool virtqueue_enable_cb_delayed(struct virtqueue *_vq)
struct vring_virtqueue *vq = to_vvq(_vq);
if (vq->event_triggered)
- vq->event_triggered = false;
+ data_race(vq->event_triggered = false);
return vq->packed_ring ? virtqueue_enable_cb_delayed_packed(_vq) :
virtqueue_enable_cb_delayed_split(_vq);
diff --git a/drivers/watchdog/aspeed_wdt.c b/drivers/watchdog/aspeed_wdt.c
index b72a858bbac7..001b2c931125 100644
--- a/drivers/watchdog/aspeed_wdt.c
+++ b/drivers/watchdog/aspeed_wdt.c
@@ -11,21 +11,30 @@
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/kstrtox.h>
+#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_irq.h>
#include <linux/platform_device.h>
+#include <linux/regmap.h>
#include <linux/watchdog.h>
static bool nowayout = WATCHDOG_NOWAYOUT;
module_param(nowayout, bool, 0);
MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default="
__MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
+struct aspeed_wdt_scu {
+ const char *compatible;
+ u32 reset_status_reg;
+ u32 wdt_reset_mask;
+ u32 wdt_reset_mask_shift;
+};
struct aspeed_wdt_config {
u32 ext_pulse_width_mask;
u32 irq_shift;
u32 irq_mask;
+ struct aspeed_wdt_scu scu;
};
struct aspeed_wdt {
@@ -39,18 +48,36 @@ static const struct aspeed_wdt_config ast2400_config = {
.ext_pulse_width_mask = 0xff,
.irq_shift = 0,
.irq_mask = 0,
+ .scu = {
+ .compatible = "aspeed,ast2400-scu",
+ .reset_status_reg = 0x3c,
+ .wdt_reset_mask = 0x1,
+ .wdt_reset_mask_shift = 1,
+ },
};
static const struct aspeed_wdt_config ast2500_config = {
.ext_pulse_width_mask = 0xfffff,
.irq_shift = 12,
.irq_mask = GENMASK(31, 12),
+ .scu = {
+ .compatible = "aspeed,ast2500-scu",
+ .reset_status_reg = 0x3c,
+ .wdt_reset_mask = 0x1,
+ .wdt_reset_mask_shift = 2,
+ },
};
static const struct aspeed_wdt_config ast2600_config = {
.ext_pulse_width_mask = 0xfffff,
.irq_shift = 0,
.irq_mask = GENMASK(31, 10),
+ .scu = {
+ .compatible = "aspeed,ast2600-scu",
+ .reset_status_reg = 0x74,
+ .wdt_reset_mask = 0xf,
+ .wdt_reset_mask_shift = 16,
+ },
};
static const struct of_device_id aspeed_wdt_of_table[] = {
@@ -211,6 +238,56 @@ static int aspeed_wdt_restart(struct watchdog_device *wdd,
return 0;
}
+static void aspeed_wdt_update_bootstatus(struct platform_device *pdev,
+ struct aspeed_wdt *wdt)
+{
+ const struct resource *res;
+ struct aspeed_wdt_scu scu = wdt->cfg->scu;
+ struct regmap *scu_base;
+ u32 reset_mask_width;
+ u32 reset_mask_shift;
+ u32 idx = 0;
+ u32 status;
+ int ret;
+
+ if (!of_device_is_compatible(pdev->dev.of_node, "aspeed,ast2400-wdt")) {
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ idx = ((intptr_t)wdt->base & 0x00000fff) / (uintptr_t)resource_size(res);
+ }
+
+ scu_base = syscon_regmap_lookup_by_compatible(scu.compatible);
+ if (IS_ERR(scu_base)) {
+ wdt->wdd.bootstatus = WDIOS_UNKNOWN;
+ return;
+ }
+
+ ret = regmap_read(scu_base, scu.reset_status_reg, &status);
+ if (ret) {
+ wdt->wdd.bootstatus = WDIOS_UNKNOWN;
+ return;
+ }
+
+ reset_mask_width = hweight32(scu.wdt_reset_mask);
+ reset_mask_shift = scu.wdt_reset_mask_shift +
+ reset_mask_width * idx;
+
+ if (status & (scu.wdt_reset_mask << reset_mask_shift))
+ wdt->wdd.bootstatus = WDIOF_CARDRESET;
+
+ /* clear wdt reset event flag */
+ if (of_device_is_compatible(pdev->dev.of_node, "aspeed,ast2400-wdt") ||
+ of_device_is_compatible(pdev->dev.of_node, "aspeed,ast2500-wdt")) {
+ ret = regmap_read(scu_base, scu.reset_status_reg, &status);
+ if (!ret) {
+ status &= ~(scu.wdt_reset_mask << reset_mask_shift);
+ regmap_write(scu_base, scu.reset_status_reg, status);
+ }
+ } else {
+ regmap_write(scu_base, scu.reset_status_reg,
+ scu.wdt_reset_mask << reset_mask_shift);
+ }
+}
+
/* access_cs0 shows if cs0 is accessible, hence the reverted bit */
static ssize_t access_cs0_show(struct device *dev,
struct device_attribute *attr, char *buf)
@@ -447,10 +524,10 @@ static int aspeed_wdt_probe(struct platform_device *pdev)
writel(duration - 1, wdt->base + WDT_RESET_WIDTH);
}
+ aspeed_wdt_update_bootstatus(pdev, wdt);
+
status = readl(wdt->base + WDT_TIMEOUT_STATUS);
if (status & WDT_TIMEOUT_STATUS_BOOT_SECONDARY) {
- wdt->wdd.bootstatus = WDIOF_CARDRESET;
-
if (of_device_is_compatible(np, "aspeed,ast2400-wdt") ||
of_device_is_compatible(np, "aspeed,ast2500-wdt"))
wdt->wdd.groups = bswitch_groups;
diff --git a/drivers/xen/platform-pci.c b/drivers/xen/platform-pci.c
index 544d3f9010b9..1db82da56db6 100644
--- a/drivers/xen/platform-pci.c
+++ b/drivers/xen/platform-pci.c
@@ -26,6 +26,8 @@
#define DRV_NAME "xen-platform-pci"
+#define PCI_DEVICE_ID_XEN_PLATFORM_XS61 0x0002
+
static unsigned long platform_mmio;
static unsigned long platform_mmio_alloc;
static unsigned long platform_mmiolen;
@@ -174,6 +176,8 @@ static int platform_pci_probe(struct pci_dev *pdev,
static const struct pci_device_id platform_pci_tbl[] = {
{PCI_VENDOR_ID_XEN, PCI_DEVICE_ID_XEN_PLATFORM,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+ {PCI_VENDOR_ID_XEN, PCI_DEVICE_ID_XEN_PLATFORM_XS61,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{0,}
};
diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c
index 25164d56c9d9..d3b6908110c6 100644
--- a/drivers/xen/xenbus/xenbus_probe.c
+++ b/drivers/xen/xenbus/xenbus_probe.c
@@ -966,9 +966,15 @@ static int __init xenbus_init(void)
if (xen_pv_domain())
xen_store_domain_type = XS_PV;
if (xen_hvm_domain())
+ {
xen_store_domain_type = XS_HVM;
- if (xen_hvm_domain() && xen_initial_domain())
- xen_store_domain_type = XS_LOCAL;
+ err = hvm_get_parameter(HVM_PARAM_STORE_EVTCHN, &v);
+ if (err)
+ goto out_error;
+ xen_store_evtchn = (int)v;
+ if (!v && xen_initial_domain())
+ xen_store_domain_type = XS_LOCAL;
+ }
if (xen_pv_domain() && !xen_start_info->store_evtchn)
xen_store_domain_type = XS_LOCAL;
if (xen_pv_domain() && xen_start_info->store_evtchn)
@@ -987,10 +993,6 @@ static int __init xenbus_init(void)
xen_store_interface = gfn_to_virt(xen_store_gfn);
break;
case XS_HVM:
- err = hvm_get_parameter(HVM_PARAM_STORE_EVTCHN, &v);
- if (err)
- goto out_error;
- xen_store_evtchn = (int)v;
err = hvm_get_parameter(HVM_PARAM_STORE_PFN, &v);
if (err)
goto out_error;
diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c
index 434cf3d5f4cf..226e6434a58a 100644
--- a/fs/btrfs/block-group.c
+++ b/fs/btrfs/block-group.c
@@ -1885,6 +1885,17 @@ void btrfs_reclaim_bgs_work(struct work_struct *work)
up_write(&space_info->groups_sem);
goto next;
}
+
+ /*
+ * Cache the zone_unusable value before turning the block group
+ * to read only. As soon as the block group is read only it's
+ * zone_unusable value gets moved to the block group's read-only
+ * bytes and isn't available for calculations anymore. We also
+ * cache it before unlocking the block group, to prevent races
+ * (reports from KCSAN and such tools) with tasks updating it.
+ */
+ zone_unusable = bg->zone_unusable;
+
spin_unlock(&bg->lock);
/*
@@ -1900,13 +1911,6 @@ void btrfs_reclaim_bgs_work(struct work_struct *work)
goto next;
}
- /*
- * Cache the zone_unusable value before turning the block group
- * to read only. As soon as the blog group is read only it's
- * zone_unusable value gets moved to the block group's read-only
- * bytes and isn't available for calculations anymore.
- */
- zone_unusable = bg->zone_unusable;
ret = inc_block_group_ro(bg, 0);
up_write(&space_info->groups_sem);
if (ret < 0)
diff --git a/fs/btrfs/discard.c b/fs/btrfs/discard.c
index 944a7340f6a4..3981c941f5b5 100644
--- a/fs/btrfs/discard.c
+++ b/fs/btrfs/discard.c
@@ -167,13 +167,7 @@ static bool remove_from_discard_list(struct btrfs_discard_ctl *discard_ctl,
block_group->discard_eligible_time = 0;
queued = !list_empty(&block_group->discard_list);
list_del_init(&block_group->discard_list);
- /*
- * If the block group is currently running in the discard workfn, we
- * don't want to deref it, since it's still being used by the workfn.
- * The workfn will notice this case and deref the block group when it is
- * finished.
- */
- if (queued && !running)
+ if (queued)
btrfs_put_block_group(block_group);
spin_unlock(&discard_ctl->lock);
@@ -260,9 +254,10 @@ static struct btrfs_block_group *peek_discard_list(
block_group->discard_cursor = block_group->start;
block_group->discard_state = BTRFS_DISCARD_EXTENTS;
}
- discard_ctl->block_group = block_group;
}
if (block_group) {
+ btrfs_get_block_group(block_group);
+ discard_ctl->block_group = block_group;
*discard_state = block_group->discard_state;
*discard_index = block_group->discard_index;
}
@@ -493,9 +488,20 @@ static void btrfs_discard_workfn(struct work_struct *work)
block_group = peek_discard_list(discard_ctl, &discard_state,
&discard_index, now);
- if (!block_group || !btrfs_run_discard_work(discard_ctl))
+ if (!block_group)
return;
+ if (!btrfs_run_discard_work(discard_ctl)) {
+ spin_lock(&discard_ctl->lock);
+ btrfs_put_block_group(block_group);
+ discard_ctl->block_group = NULL;
+ spin_unlock(&discard_ctl->lock);
+ return;
+ }
if (now < block_group->discard_eligible_time) {
+ spin_lock(&discard_ctl->lock);
+ btrfs_put_block_group(block_group);
+ discard_ctl->block_group = NULL;
+ spin_unlock(&discard_ctl->lock);
btrfs_discard_schedule_work(discard_ctl, false);
return;
}
@@ -547,15 +553,7 @@ static void btrfs_discard_workfn(struct work_struct *work)
spin_lock(&discard_ctl->lock);
discard_ctl->prev_discard = trimmed;
discard_ctl->prev_discard_time = now;
- /*
- * If the block group was removed from the discard list while it was
- * running in this workfn, then we didn't deref it, since this function
- * still owned that reference. But we set the discard_ctl->block_group
- * back to NULL, so we can use that condition to know that now we need
- * to deref the block_group.
- */
- if (discard_ctl->block_group == NULL)
- btrfs_put_block_group(block_group);
+ btrfs_put_block_group(block_group);
discard_ctl->block_group = NULL;
__btrfs_discard_schedule_work(discard_ctl, now, false);
spin_unlock(&discard_ctl->lock);
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 2387210231f2..34a30d61b470 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -4313,6 +4313,14 @@ void __cold close_ctree(struct btrfs_fs_info *fs_info)
/* clear out the rbtree of defraggable inodes */
btrfs_cleanup_defrag_inodes(fs_info);
+ /*
+ * Handle the error fs first, as it will flush and wait for all ordered
+ * extents. This will generate delayed iputs, thus we want to handle
+ * it first.
+ */
+ if (unlikely(BTRFS_FS_ERROR(fs_info)))
+ btrfs_error_commit_super(fs_info);
+
/*
* Wait for any fixup workers to complete.
* If we don't wait for them here and they are still running by the time
@@ -4333,6 +4341,19 @@ void __cold close_ctree(struct btrfs_fs_info *fs_info)
*/
btrfs_flush_workqueue(fs_info->delalloc_workers);
+ /*
+ * We can have ordered extents getting their last reference dropped from
+ * the fs_info->workers queue because for async writes for data bios we
+ * queue a work for that queue, at btrfs_wq_submit_bio(), that runs
+ * run_one_async_done() which calls btrfs_bio_end_io() in case the bio
+ * has an error, and that later function can do the final
+ * btrfs_put_ordered_extent() on the ordered extent attached to the bio,
+ * which adds a delayed iput for the inode. So we must flush the queue
+ * so that we don't have delayed iputs after committing the current
+ * transaction below and stopping the cleaner and transaction kthreads.
+ */
+ btrfs_flush_workqueue(fs_info->workers);
+
/*
* When finishing a compressed write bio we schedule a work queue item
* to finish an ordered extent - btrfs_finish_compressed_write_work()
@@ -4402,9 +4423,6 @@ void __cold close_ctree(struct btrfs_fs_info *fs_info)
btrfs_err(fs_info, "commit super ret %d", ret);
}
- if (BTRFS_FS_ERROR(fs_info))
- btrfs_error_commit_super(fs_info);
-
kthread_stop(fs_info->transaction_kthread);
kthread_stop(fs_info->cleaner_kthread);
@@ -4541,10 +4559,6 @@ static void btrfs_error_commit_super(struct btrfs_fs_info *fs_info)
/* cleanup FS via transaction */
btrfs_cleanup_transaction(fs_info);
- mutex_lock(&fs_info->cleaner_mutex);
- btrfs_run_delayed_iputs(fs_info);
- mutex_unlock(&fs_info->cleaner_mutex);
-
down_write(&fs_info->cleanup_work_sem);
up_write(&fs_info->cleanup_work_sem);
}
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index b2ae50dcca0f..ed08d8e5639f 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -3565,10 +3565,10 @@ struct extent_buffer *find_extent_buffer(struct btrfs_fs_info *fs_info,
return eb;
}
-#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
struct extent_buffer *alloc_test_extent_buffer(struct btrfs_fs_info *fs_info,
u64 start)
{
+#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS
struct extent_buffer *eb, *exists = NULL;
int ret;
@@ -3604,8 +3604,11 @@ struct extent_buffer *alloc_test_extent_buffer(struct btrfs_fs_info *fs_info,
free_eb:
btrfs_release_extent_buffer(eb);
return exists;
-}
+#else
+ /* Stub to avoid linker error when compiled with optimizations turned off. */
+ return NULL;
#endif
+}
static struct extent_buffer *grab_extent_buffer(
struct btrfs_fs_info *fs_info, struct page *page)
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index 537e184b4b1d..474758c878fc 100644
--- a/fs/btrfs/relocation.c
+++ b/fs/btrfs/relocation.c
@@ -2931,6 +2931,7 @@ static int relocate_one_page(struct inode *inode, struct file_ra_state *ra,
int ret;
ASSERT(page_index <= last_index);
+again:
page = find_lock_page(inode->i_mapping, page_index);
if (!page) {
page_cache_sync_readahead(inode->i_mapping, ra, NULL,
@@ -2952,6 +2953,11 @@ static int relocate_one_page(struct inode *inode, struct file_ra_state *ra,
ret = -EIO;
goto release_page;
}
+ if (page->mapping != inode->i_mapping) {
+ unlock_page(page);
+ put_page(page);
+ goto again;
+ }
}
/*
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index 6be092bb814f..da49bdb70375 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -1538,8 +1538,8 @@ static int scrub_find_fill_first_stripe(struct btrfs_block_group *bg,
u64 extent_gen;
int ret;
- if (unlikely(!extent_root)) {
- btrfs_err(fs_info, "no valid extent root for scrub");
+ if (unlikely(!extent_root || !csum_root)) {
+ btrfs_err(fs_info, "no valid extent or csum root for scrub");
return -EUCLEAN;
}
memset(stripe->sectors, 0, sizeof(struct scrub_sector_verification) *
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index aa1e6d88a72c..e2ead36e5be4 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -487,10 +487,8 @@ static int fs_path_ensure_buf(struct fs_path *p, int len)
if (p->buf_len >= len)
return 0;
- if (len > PATH_MAX) {
- WARN_ON(1);
- return -ENOMEM;
- }
+ if (WARN_ON(len > PATH_MAX))
+ return -ENAMETOOLONG;
path_len = p->end - p->start;
old_buf_len = p->buf_len;
diff --git a/fs/coredump.c b/fs/coredump.c
index 9d235fa14ab9..d3a4f5dc2e36 100644
--- a/fs/coredump.c
+++ b/fs/coredump.c
@@ -42,6 +42,7 @@
#include <linux/timekeeping.h>
#include <linux/sysctl.h>
#include <linux/elf.h>
+#include <uapi/linux/pidfd.h>
#include <linux/uaccess.h>
#include <asm/mmu_context.h>
@@ -56,6 +57,13 @@
static bool dump_vma_snapshot(struct coredump_params *cprm);
static void free_vma_snapshot(struct coredump_params *cprm);
+/*
+ * File descriptor number for the pidfd for the thread-group leader of
+ * the coredumping task installed into the usermode helper's file
+ * descriptor table.
+ */
+#define COREDUMP_PIDFD_NUMBER 3
+
static int core_uses_pid;
static unsigned int core_pipe_limit;
static char core_pattern[CORENAME_MAX_SIZE] = "core";
@@ -332,6 +340,27 @@ static int format_corename(struct core_name *cn, struct coredump_params *cprm,
case 'C':
err = cn_printf(cn, "%d", cprm->cpu);
break;
+ /* pidfd number */
+ case 'F': {
+ /*
+ * Installing a pidfd only makes sense if
+ * we actually spawn a usermode helper.
+ */
+ if (!ispipe)
+ break;
+
+ /*
+ * Note that we'll install a pidfd for the
+ * thread-group leader. We know that task
+ * linkage hasn't been removed yet and even if
+ * this @current isn't the actual thread-group
+ * leader we know that the thread-group leader
+ * cannot be reaped until @current has exited.
+ */
+ cprm->pid = task_tgid(current);
+ err = cn_printf(cn, "%d", COREDUMP_PIDFD_NUMBER);
+ break;
+ }
default:
break;
}
@@ -488,7 +517,7 @@ static void wait_for_dump_helpers(struct file *file)
}
/*
- * umh_pipe_setup
+ * umh_coredump_setup
* helper function to customize the process used
* to collect the core in userspace. Specifically
* it sets up a pipe and installs it as fd 0 (stdin)
@@ -498,21 +527,61 @@ static void wait_for_dump_helpers(struct file *file)
* is a special value that we use to trap recursive
* core dumps
*/
-static int umh_pipe_setup(struct subprocess_info *info, struct cred *new)
+static int umh_coredump_setup(struct subprocess_info *info, struct cred *new)
{
struct file *files[2];
+ struct file *pidfs_file = NULL;
struct coredump_params *cp = (struct coredump_params *)info->data;
- int err = create_pipe_files(files, 0);
+ int err;
+
+ if (cp->pid) {
+ int fd;
+
+ fd = pidfd_prepare(cp->pid, 0, &pidfs_file);
+ if (fd < 0)
+ return fd;
+
+ /*
+ * We don't care about the fd. We also cannot simply
+ * replace it below because dup2() will refuse to close
+ * this file descriptor if its in a larval state. So
+ * close it!
+ */
+ put_unused_fd(fd);
+
+ /*
+ * Usermode helpers are childen of either
+ * system_unbound_wq or of kthreadd. So we know that
+ * we're starting off with a clean file descriptor
+ * table. So we should always be able to use
+ * COREDUMP_PIDFD_NUMBER as our file descriptor value.
+ */
+ err = replace_fd(COREDUMP_PIDFD_NUMBER, pidfs_file, 0);
+ if (err < 0)
+ goto out_fail;
+
+ pidfs_file = NULL;
+ }
+
+ err = create_pipe_files(files, 0);
if (err)
- return err;
+ goto out_fail;
cp->file = files[1];
err = replace_fd(0, files[0], 0);
fput(files[0]);
+ if (err < 0)
+ goto out_fail;
+
/* and disallow core files too */
current->signal->rlim[RLIMIT_CORE] = (struct rlimit){1, 1};
+ err = 0;
+
+out_fail:
+ if (pidfs_file)
+ fput(pidfs_file);
return err;
}
@@ -589,7 +658,7 @@ void do_coredump(const kernel_siginfo_t *siginfo)
}
if (cprm.limit == 1) {
- /* See umh_pipe_setup() which sets RLIMIT_CORE = 1.
+ /* See umh_coredump_setup() which sets RLIMIT_CORE = 1.
*
* Normally core limits are irrelevant to pipes, since
* we're not writing to the file system, but we use
@@ -634,7 +703,7 @@ void do_coredump(const kernel_siginfo_t *siginfo)
retval = -ENOMEM;
sub_info = call_usermodehelper_setup(helper_argv[0],
helper_argv, NULL, GFP_KERNEL,
- umh_pipe_setup, NULL, &cprm);
+ umh_coredump_setup, NULL, &cprm);
if (sub_info)
retval = call_usermodehelper_exec(sub_info,
UMH_WAIT_EXEC);
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index 0618af36f550..3c9ab6461579 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -1826,8 +1826,8 @@ static int dlm_tcp_listen_validate(void)
{
/* We don't support multi-homed hosts */
if (dlm_local_count > 1) {
- log_print("TCP protocol can't handle multi-homed hosts, try SCTP");
- return -EINVAL;
+ log_print("Detect multi-homed hosts but use only the first IP address.");
+ log_print("Try SCTP, if you want to enable multi-link.");
}
return 0;
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c
index 396474e9e2bf..3a2dfc59fb40 100644
--- a/fs/ext4/balloc.c
+++ b/fs/ext4/balloc.c
@@ -641,8 +641,8 @@ static int ext4_has_free_clusters(struct ext4_sb_info *sbi,
/* Hm, nope. Are (enough) root reserved clusters available? */
if (uid_eq(sbi->s_resuid, current_fsuid()) ||
(!gid_eq(sbi->s_resgid, GLOBAL_ROOT_GID) && in_group_p(sbi->s_resgid)) ||
- capable(CAP_SYS_RESOURCE) ||
- (flags & EXT4_MB_USE_ROOT_BLOCKS)) {
+ (flags & EXT4_MB_USE_ROOT_BLOCKS) ||
+ capable(CAP_SYS_RESOURCE)) {
if (free_clusters >= (nclusters + dirty_clusters +
resv_clusters))
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 60455c84a937..81fe87fcbfa0 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -273,7 +273,8 @@ struct ext4_system_blocks {
/*
* Flags for ext4_io_end->flags
*/
-#define EXT4_IO_END_UNWRITTEN 0x0001
+#define EXT4_IO_END_UNWRITTEN 0x0001
+#define EXT4_IO_END_FAILED 0x0002
struct ext4_io_end_vec {
struct list_head list; /* list of io_end_vec */
@@ -2994,6 +2995,8 @@ extern int ext4_inode_attach_jinode(struct inode *inode);
extern int ext4_can_truncate(struct inode *inode);
extern int ext4_truncate(struct inode *);
extern int ext4_break_layouts(struct inode *);
+extern int ext4_truncate_page_cache_block_range(struct inode *inode,
+ loff_t start, loff_t end);
extern int ext4_punch_hole(struct file *file, loff_t offset, loff_t length);
extern void ext4_set_inode_flags(struct inode *, bool init);
extern int ext4_alloc_da_blocks(struct inode *inode);
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 32218ac7f50f..39e3661a80c4 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -4660,22 +4660,13 @@ static long ext4_zero_range(struct file *file, loff_t offset,
goto out_mutex;
}
- /*
- * For journalled data we need to write (and checkpoint) pages
- * before discarding page cache to avoid inconsitent data on
- * disk in case of crash before zeroing trans is committed.
- */
- if (ext4_should_journal_data(inode)) {
- ret = filemap_write_and_wait_range(mapping, start,
- end - 1);
- if (ret) {
- filemap_invalidate_unlock(mapping);
- goto out_mutex;
- }
+ /* Now release the pages and zero block aligned part of pages */
+ ret = ext4_truncate_page_cache_block_range(inode, start, end);
+ if (ret) {
+ filemap_invalidate_unlock(mapping);
+ goto out_mutex;
}
- /* Now release the pages and zero block aligned part of pages */
- truncate_pagecache_range(inode, start, end - 1);
inode_set_mtime_to_ts(inode, inode_set_ctime_current(inode));
ret = ext4_alloc_file_blocks(file, lblk, max_blocks, new_size,
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index d3d28e658720..86245e27be18 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -31,6 +31,7 @@
#include <linux/writeback.h>
#include <linux/pagevec.h>
#include <linux/mpage.h>
+#include <linux/rmap.h>
#include <linux/namei.h>
#include <linux/uio.h>
#include <linux/bio.h>
@@ -3892,6 +3893,68 @@ int ext4_update_disksize_before_punch(struct inode *inode, loff_t offset,
return ret;
}
+static inline void ext4_truncate_folio(struct inode *inode,
+ loff_t start, loff_t end)
+{
+ unsigned long blocksize = i_blocksize(inode);
+ struct folio *folio;
+
+ /* Nothing to be done if no complete block needs to be truncated. */
+ if (round_up(start, blocksize) >= round_down(end, blocksize))
+ return;
+
+ folio = filemap_lock_folio(inode->i_mapping, start >> PAGE_SHIFT);
+ if (IS_ERR(folio))
+ return;
+
+ if (folio_mkclean(folio))
+ folio_mark_dirty(folio);
+ folio_unlock(folio);
+ folio_put(folio);
+}
+
+int ext4_truncate_page_cache_block_range(struct inode *inode,
+ loff_t start, loff_t end)
+{
+ unsigned long blocksize = i_blocksize(inode);
+ int ret;
+
+ /*
+ * For journalled data we need to write (and checkpoint) pages
+ * before discarding page cache to avoid inconsitent data on disk
+ * in case of crash before freeing or unwritten converting trans
+ * is committed.
+ */
+ if (ext4_should_journal_data(inode)) {
+ ret = filemap_write_and_wait_range(inode->i_mapping, start,
+ end - 1);
+ if (ret)
+ return ret;
+ goto truncate_pagecache;
+ }
+
+ /*
+ * If the block size is less than the page size, the file's mapped
+ * blocks within one page could be freed or converted to unwritten.
+ * So it's necessary to remove writable userspace mappings, and then
+ * ext4_page_mkwrite() can be called during subsequent write access
+ * to these partial folios.
+ */
+ if (!IS_ALIGNED(start | end, PAGE_SIZE) &&
+ blocksize < PAGE_SIZE && start < inode->i_size) {
+ loff_t page_boundary = round_up(start, PAGE_SIZE);
+
+ ext4_truncate_folio(inode, start, min(page_boundary, end));
+ if (end > page_boundary)
+ ext4_truncate_folio(inode,
+ round_down(end, PAGE_SIZE), end);
+ }
+
+truncate_pagecache:
+ truncate_pagecache_range(inode, start, end - 1);
+ return 0;
+}
+
static void ext4_wait_dax_page(struct inode *inode)
{
filemap_invalidate_unlock(inode->i_mapping);
@@ -3946,17 +4009,6 @@ int ext4_punch_hole(struct file *file, loff_t offset, loff_t length)
trace_ext4_punch_hole(inode, offset, length, 0);
- /*
- * Write out all dirty pages to avoid race conditions
- * Then release them.
- */
- if (mapping_tagged(mapping, PAGECACHE_TAG_DIRTY)) {
- ret = filemap_write_and_wait_range(mapping, offset,
- offset + length - 1);
- if (ret)
- return ret;
- }
-
inode_lock(inode);
/* No need to punch hole beyond i_size */
@@ -4018,8 +4070,11 @@ int ext4_punch_hole(struct file *file, loff_t offset, loff_t length)
ret = ext4_update_disksize_before_punch(inode, offset, length);
if (ret)
goto out_dio;
- truncate_pagecache_range(inode, first_block_offset,
- last_block_offset);
+
+ ret = ext4_truncate_page_cache_block_range(inode,
+ first_block_offset, last_block_offset + 1);
+ if (ret)
+ goto out_dio;
}
if (ext4_test_inode_flag(inode, EXT4_INODE_EXTENTS))
diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c
index 7ab4f5a9bf5b..7287dbfe13f1 100644
--- a/fs/ext4/page-io.c
+++ b/fs/ext4/page-io.c
@@ -181,14 +181,25 @@ static int ext4_end_io_end(ext4_io_end_t *io_end)
"list->prev 0x%p\n",
io_end, inode->i_ino, io_end->list.next, io_end->list.prev);
- io_end->handle = NULL; /* Following call will use up the handle */
- ret = ext4_convert_unwritten_io_end_vec(handle, io_end);
+ /*
+ * Do not convert the unwritten extents if data writeback fails,
+ * or stale data may be exposed.
+ */
+ io_end->handle = NULL; /* Following call will use up the handle */
+ if (unlikely(io_end->flag & EXT4_IO_END_FAILED)) {
+ ret = -EIO;
+ if (handle)
+ jbd2_journal_free_reserved(handle);
+ } else {
+ ret = ext4_convert_unwritten_io_end_vec(handle, io_end);
+ }
if (ret < 0 && !ext4_forced_shutdown(inode->i_sb)) {
ext4_msg(inode->i_sb, KERN_EMERG,
"failed to convert unwritten extents to written "
"extents -- potential data loss! "
"(inode %lu, error %d)", inode->i_ino, ret);
}
+
ext4_clear_io_unwritten_flag(io_end);
ext4_release_io_end(io_end);
return ret;
@@ -344,6 +355,7 @@ static void ext4_end_bio(struct bio *bio)
bio->bi_status, inode->i_ino,
(unsigned long long)
bi_sector >> (inode->i_blkbits - 9));
+ io_end->flag |= EXT4_IO_END_FAILED;
mapping_set_error(inode->i_mapping,
blk_status_to_errno(bio->bi_status));
}
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 751c879271e0..d2b58f940aab 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -2821,6 +2821,13 @@ static int ext4_check_opt_consistency(struct fs_context *fc,
}
if (is_remount) {
+ if (!sbi->s_journal &&
+ ctx_test_mount_opt(ctx, EXT4_MOUNT_DATA_ERR_ABORT)) {
+ ext4_msg(NULL, KERN_WARNING,
+ "Remounting fs w/o journal so ignoring data_err option");
+ ctx_clear_mount_opt(ctx, EXT4_MOUNT_DATA_ERR_ABORT);
+ }
+
if (ctx_test_mount_opt(ctx, EXT4_MOUNT_DAX_ALWAYS) &&
(test_opt(sb, DATA_FLAGS) == EXT4_MOUNT_JOURNAL_DATA)) {
ext4_msg(NULL, KERN_ERR, "can't mount with "
@@ -5421,6 +5428,11 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb)
"data=, fs mounted w/o journal");
goto failed_mount3a;
}
+ if (test_opt(sb, DATA_ERR_ABORT)) {
+ ext4_msg(sb, KERN_ERR,
+ "can't mount with data_err=abort, fs mounted w/o journal");
+ goto failed_mount3a;
+ }
sbi->s_def_mount_opt &= ~EXT4_MOUNT_JOURNAL_CHECKSUM;
clear_opt(sb, JOURNAL_CHECKSUM);
clear_opt(sb, DATA_FLAGS);
@@ -6771,6 +6783,7 @@ static int ext4_reconfigure(struct fs_context *fc)
{
struct super_block *sb = fc->root->d_sb;
int ret;
+ bool old_ro = sb_rdonly(sb);
fc->s_fs_info = EXT4_SB(sb);
@@ -6782,9 +6795,9 @@ static int ext4_reconfigure(struct fs_context *fc)
if (ret < 0)
return ret;
- ext4_msg(sb, KERN_INFO, "re-mounted %pU %s. Quota mode: %s.",
- &sb->s_uuid, sb_rdonly(sb) ? "ro" : "r/w",
- ext4_quota_mode(sb));
+ ext4_msg(sb, KERN_INFO, "re-mounted %pU%s.",
+ &sb->s_uuid,
+ (old_ro != sb_rdonly(sb)) ? (sb_rdonly(sb) ? " ro" : " r/w") : "");
return 0;
}
diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
index 180feefc4a9c..c4b0661888a1 100644
--- a/fs/f2fs/sysfs.c
+++ b/fs/f2fs/sysfs.c
@@ -61,6 +61,12 @@ struct f2fs_attr {
int id;
};
+struct f2fs_base_attr {
+ struct attribute attr;
+ ssize_t (*show)(struct f2fs_base_attr *a, char *buf);
+ ssize_t (*store)(struct f2fs_base_attr *a, const char *buf, size_t len);
+};
+
static ssize_t f2fs_sbi_show(struct f2fs_attr *a,
struct f2fs_sb_info *sbi, char *buf);
@@ -791,6 +797,25 @@ static void f2fs_sb_release(struct kobject *kobj)
complete(&sbi->s_kobj_unregister);
}
+static ssize_t f2fs_base_attr_show(struct kobject *kobj,
+ struct attribute *attr, char *buf)
+{
+ struct f2fs_base_attr *a = container_of(attr,
+ struct f2fs_base_attr, attr);
+
+ return a->show ? a->show(a, buf) : 0;
+}
+
+static ssize_t f2fs_base_attr_store(struct kobject *kobj,
+ struct attribute *attr,
+ const char *buf, size_t len)
+{
+ struct f2fs_base_attr *a = container_of(attr,
+ struct f2fs_base_attr, attr);
+
+ return a->store ? a->store(a, buf, len) : 0;
+}
+
/*
* Note that there are three feature list entries:
* 1) /sys/fs/f2fs/features
@@ -809,14 +834,13 @@ static void f2fs_sb_release(struct kobject *kobj)
* please add new on-disk feature in this list only.
* - ref. F2FS_SB_FEATURE_RO_ATTR()
*/
-static ssize_t f2fs_feature_show(struct f2fs_attr *a,
- struct f2fs_sb_info *sbi, char *buf)
+static ssize_t f2fs_feature_show(struct f2fs_base_attr *a, char *buf)
{
return sysfs_emit(buf, "supported\n");
}
#define F2FS_FEATURE_RO_ATTR(_name) \
-static struct f2fs_attr f2fs_attr_##_name = { \
+static struct f2fs_base_attr f2fs_base_attr_##_name = { \
.attr = {.name = __stringify(_name), .mode = 0444 }, \
.show = f2fs_feature_show, \
}
@@ -1166,37 +1190,38 @@ static struct attribute *f2fs_attrs[] = {
};
ATTRIBUTE_GROUPS(f2fs);
+#define BASE_ATTR_LIST(name) (&f2fs_base_attr_##name.attr)
static struct attribute *f2fs_feat_attrs[] = {
#ifdef CONFIG_FS_ENCRYPTION
- ATTR_LIST(encryption),
- ATTR_LIST(test_dummy_encryption_v2),
+ BASE_ATTR_LIST(encryption),
+ BASE_ATTR_LIST(test_dummy_encryption_v2),
#if IS_ENABLED(CONFIG_UNICODE)
- ATTR_LIST(encrypted_casefold),
+ BASE_ATTR_LIST(encrypted_casefold),
#endif
#endif /* CONFIG_FS_ENCRYPTION */
#ifdef CONFIG_BLK_DEV_ZONED
- ATTR_LIST(block_zoned),
+ BASE_ATTR_LIST(block_zoned),
#endif
- ATTR_LIST(atomic_write),
- ATTR_LIST(extra_attr),
- ATTR_LIST(project_quota),
- ATTR_LIST(inode_checksum),
- ATTR_LIST(flexible_inline_xattr),
- ATTR_LIST(quota_ino),
- ATTR_LIST(inode_crtime),
- ATTR_LIST(lost_found),
+ BASE_ATTR_LIST(atomic_write),
+ BASE_ATTR_LIST(extra_attr),
+ BASE_ATTR_LIST(project_quota),
+ BASE_ATTR_LIST(inode_checksum),
+ BASE_ATTR_LIST(flexible_inline_xattr),
+ BASE_ATTR_LIST(quota_ino),
+ BASE_ATTR_LIST(inode_crtime),
+ BASE_ATTR_LIST(lost_found),
#ifdef CONFIG_FS_VERITY
- ATTR_LIST(verity),
+ BASE_ATTR_LIST(verity),
#endif
- ATTR_LIST(sb_checksum),
+ BASE_ATTR_LIST(sb_checksum),
#if IS_ENABLED(CONFIG_UNICODE)
- ATTR_LIST(casefold),
+ BASE_ATTR_LIST(casefold),
#endif
- ATTR_LIST(readonly),
+ BASE_ATTR_LIST(readonly),
#ifdef CONFIG_F2FS_FS_COMPRESSION
- ATTR_LIST(compression),
+ BASE_ATTR_LIST(compression),
#endif
- ATTR_LIST(pin_file),
+ BASE_ATTR_LIST(pin_file),
NULL,
};
ATTRIBUTE_GROUPS(f2fs_feat);
@@ -1263,9 +1288,14 @@ static struct kset f2fs_kset = {
.kobj = {.ktype = &f2fs_ktype},
};
+static const struct sysfs_ops f2fs_feat_attr_ops = {
+ .show = f2fs_base_attr_show,
+ .store = f2fs_base_attr_store,
+};
+
static const struct kobj_type f2fs_feat_ktype = {
.default_groups = f2fs_feat_groups,
- .sysfs_ops = &f2fs_attr_ops,
+ .sysfs_ops = &f2fs_feat_attr_ops,
};
static struct kobject f2fs_feat = {
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index e4d6cc0d2332..82951a535d2d 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -1121,6 +1121,8 @@ static int fuse_link(struct dentry *entry, struct inode *newdir,
else if (err == -EINTR)
fuse_invalidate_attr(inode);
+ if (err == -ENOSYS)
+ err = -EPERM;
return err;
}
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index 2c0908a30210..687670075d22 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -853,11 +853,12 @@ static void run_queue(struct gfs2_glock *gl, const int nonblock)
__releases(&gl->gl_lockref.lock)
__acquires(&gl->gl_lockref.lock)
{
- struct gfs2_holder *gh = NULL;
+ struct gfs2_holder *gh;
if (test_and_set_bit(GLF_LOCK, &gl->gl_flags))
return;
+ /* While a demote is in progress, the GLF_LOCK flag must be set. */
GLOCK_BUG_ON(gl, test_bit(GLF_DEMOTE_IN_PROGRESS, &gl->gl_flags));
if (test_bit(GLF_DEMOTE, &gl->gl_flags) &&
@@ -869,18 +870,22 @@ __acquires(&gl->gl_lockref.lock)
set_bit(GLF_DEMOTE_IN_PROGRESS, &gl->gl_flags);
GLOCK_BUG_ON(gl, gl->gl_demote_state == LM_ST_EXCLUSIVE);
gl->gl_target = gl->gl_demote_state;
+ do_xmote(gl, NULL, gl->gl_target);
+ return;
} else {
if (test_bit(GLF_DEMOTE, &gl->gl_flags))
gfs2_demote_wake(gl);
if (do_promote(gl))
goto out_unlock;
gh = find_first_waiter(gl);
+ if (!gh)
+ goto out_unlock;
gl->gl_target = gh->gh_state;
if (!(gh->gh_flags & (LM_FLAG_TRY | LM_FLAG_TRY_1CB)))
do_error(gl, 0); /* Fail queued try locks */
+ do_xmote(gl, gh, gl->gl_target);
+ return;
}
- do_xmote(gl, gh, gl->gl_target);
- return;
out_sched:
clear_bit(GLF_LOCK, &gl->gl_flags);
diff --git a/fs/jbd2/recovery.c b/fs/jbd2/recovery.c
index 421c0d360836..19ec32537483 100644
--- a/fs/jbd2/recovery.c
+++ b/fs/jbd2/recovery.c
@@ -286,21 +286,22 @@ static int fc_do_one_pass(journal_t *journal,
int jbd2_journal_recover(journal_t *journal)
{
int err, err2;
- journal_superblock_t * sb;
-
struct recovery_info info;
errseq_t wb_err;
struct address_space *mapping;
memset(&info, 0, sizeof(info));
- sb = journal->j_superblock;
/*
* The journal superblock's s_start field (the current log head)
* is always zero if, and only if, the journal was cleanly
- * unmounted.
+ * unmounted. We use its in-memory version j_tail here because
+ * jbd2_journal_wipe() could have updated it without updating journal
+ * superblock.
*/
- if (!sb->s_start) {
+ if (!journal->j_tail) {
+ journal_superblock_t *sb = journal->j_superblock;
+
jbd2_debug(1, "No recovery required, last transaction %d, head block %u\n",
be32_to_cpu(sb->s_sequence), be32_to_cpu(sb->s_head));
journal->j_transaction_sequence = be32_to_cpu(sb->s_sequence) + 1;
diff --git a/fs/namespace.c b/fs/namespace.c
index 450f4198b8cd..ef3b2ae2957e 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -636,12 +636,8 @@ int __legitimize_mnt(struct vfsmount *bastard, unsigned seq)
smp_mb(); // see mntput_no_expire() and do_umount()
if (likely(!read_seqretry(&mount_lock, seq)))
return 0;
- if (bastard->mnt_flags & MNT_SYNC_UMOUNT) {
- mnt_add_count(mnt, -1);
- return 1;
- }
lock_mount_hash();
- if (unlikely(bastard->mnt_flags & MNT_DOOMED)) {
+ if (unlikely(bastard->mnt_flags & (MNT_SYNC_UMOUNT | MNT_DOOMED))) {
mnt_add_count(mnt, -1);
unlock_mount_hash();
return 1;
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 62607d52bfa5..aa09f930eeaf 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -1080,6 +1080,8 @@ struct nfs_server *nfs_create_server(struct fs_context *fc)
if (server->namelen == 0 || server->namelen > NFS2_MAXNAMLEN)
server->namelen = NFS2_MAXNAMLEN;
}
+ /* Linux 'subtree_check' borkenness mandates this setting */
+ server->fh_expire_type = NFS_FH_VOL_RENAME;
if (!(fattr->valid & NFS_ATTR_FATTR)) {
error = ctx->nfs_mod->rpc_ops->getattr(server, ctx->mntfh,
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c
index 55cfa1c4e0a6..bbd582d8a7dc 100644
--- a/fs/nfs/delegation.c
+++ b/fs/nfs/delegation.c
@@ -297,7 +297,8 @@ nfs_start_delegation_return_locked(struct nfs_inode *nfsi)
if (delegation == NULL)
goto out;
spin_lock(&delegation->lock);
- if (!test_and_set_bit(NFS_DELEGATION_RETURNING, &delegation->flags)) {
+ if (delegation->inode &&
+ !test_and_set_bit(NFS_DELEGATION_RETURNING, &delegation->flags)) {
clear_bit(NFS_DELEGATION_RETURN_DELAYED, &delegation->flags);
/* Refcount matched in nfs_end_delegation_return() */
ret = nfs_get_delegation(delegation);
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 39f7549afcf5..389186384235 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -2642,6 +2642,18 @@ nfs_unblock_rename(struct rpc_task *task, struct nfs_renamedata *data)
unblock_revalidate(new_dentry);
}
+static bool nfs_rename_is_unsafe_cross_dir(struct dentry *old_dentry,
+ struct dentry *new_dentry)
+{
+ struct nfs_server *server = NFS_SB(old_dentry->d_sb);
+
+ if (old_dentry->d_parent != new_dentry->d_parent)
+ return false;
+ if (server->fh_expire_type & NFS_FH_RENAME_UNSAFE)
+ return !(server->fh_expire_type & NFS_FH_NOEXPIRE_WITH_OPEN);
+ return true;
+}
+
/*
* RENAME
* FIXME: Some nfsds, like the Linux user space nfsd, may generate a
@@ -2729,7 +2741,8 @@ int nfs_rename(struct mnt_idmap *idmap, struct inode *old_dir,
}
- if (S_ISREG(old_inode->i_mode))
+ if (S_ISREG(old_inode->i_mode) &&
+ nfs_rename_is_unsafe_cross_dir(old_dentry, new_dentry))
nfs_sync_inode(old_inode);
task = nfs_async_rename(old_dir, new_dir, old_dentry, new_dentry,
must_unblock ? nfs_unblock_rename : NULL);
diff --git a/fs/nfs/filelayout/filelayoutdev.c b/fs/nfs/filelayout/filelayoutdev.c
index acf4b88889dc..d5f1fbfd9a0c 100644
--- a/fs/nfs/filelayout/filelayoutdev.c
+++ b/fs/nfs/filelayout/filelayoutdev.c
@@ -75,6 +75,7 @@ nfs4_fl_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
struct page *scratch;
struct list_head dsaddrs;
struct nfs4_pnfs_ds_addr *da;
+ struct net *net = server->nfs_client->cl_net;
/* set up xdr stream */
scratch = alloc_page(gfp_flags);
@@ -158,8 +159,7 @@ nfs4_fl_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
mp_count = be32_to_cpup(p); /* multipath count */
for (j = 0; j < mp_count; j++) {
- da = nfs4_decode_mp_ds_addr(server->nfs_client->cl_net,
- &stream, gfp_flags);
+ da = nfs4_decode_mp_ds_addr(net, &stream, gfp_flags);
if (da)
list_add_tail(&da->da_node, &dsaddrs);
}
@@ -169,7 +169,7 @@ nfs4_fl_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
goto out_err_free_deviceid;
}
- dsaddr->ds_list[i] = nfs4_pnfs_ds_add(&dsaddrs, gfp_flags);
+ dsaddr->ds_list[i] = nfs4_pnfs_ds_add(net, &dsaddrs, gfp_flags);
if (!dsaddr->ds_list[i])
goto out_err_drain_dsaddrs;
diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c
index 2b3c5eea1f13..0bc537de1b29 100644
--- a/fs/nfs/flexfilelayout/flexfilelayout.c
+++ b/fs/nfs/flexfilelayout/flexfilelayout.c
@@ -1255,6 +1255,7 @@ static void ff_layout_io_track_ds_error(struct pnfs_layout_segment *lseg,
case -ECONNRESET:
case -EHOSTDOWN:
case -EHOSTUNREACH:
+ case -ENETDOWN:
case -ENETUNREACH:
case -EADDRINUSE:
case -ENOBUFS:
diff --git a/fs/nfs/flexfilelayout/flexfilelayoutdev.c b/fs/nfs/flexfilelayout/flexfilelayoutdev.c
index e028f5a0ef5f..d21c5ecfbf1c 100644
--- a/fs/nfs/flexfilelayout/flexfilelayoutdev.c
+++ b/fs/nfs/flexfilelayout/flexfilelayoutdev.c
@@ -49,6 +49,7 @@ nfs4_ff_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
struct nfs4_pnfs_ds_addr *da;
struct nfs4_ff_layout_ds *new_ds = NULL;
struct nfs4_ff_ds_version *ds_versions = NULL;
+ struct net *net = server->nfs_client->cl_net;
u32 mp_count;
u32 version_count;
__be32 *p;
@@ -80,8 +81,7 @@ nfs4_ff_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
for (i = 0; i < mp_count; i++) {
/* multipath ds */
- da = nfs4_decode_mp_ds_addr(server->nfs_client->cl_net,
- &stream, gfp_flags);
+ da = nfs4_decode_mp_ds_addr(net, &stream, gfp_flags);
if (da)
list_add_tail(&da->da_node, &dsaddrs);
}
@@ -149,7 +149,7 @@ nfs4_ff_alloc_deviceid_node(struct nfs_server *server, struct pnfs_device *pdev,
new_ds->ds_versions = ds_versions;
new_ds->ds_versions_cnt = version_count;
- new_ds->ds = nfs4_pnfs_ds_add(&dsaddrs, gfp_flags);
+ new_ds->ds = nfs4_pnfs_ds_add(net, &dsaddrs, gfp_flags);
if (!new_ds->ds)
goto out_err_drain_dsaddrs;
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 56bbf59bda3c..06230baaa554 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -74,6 +74,8 @@ nfs_fattr_to_ino_t(struct nfs_fattr *fattr)
int nfs_wait_bit_killable(struct wait_bit_key *key, int mode)
{
+ if (unlikely(nfs_current_task_exiting()))
+ return -EINTR;
schedule();
if (signal_pending_state(mode, current))
return -ERESTARTSYS;
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
index ca49d999159e..c29ad2e1d416 100644
--- a/fs/nfs/internal.h
+++ b/fs/nfs/internal.h
@@ -865,6 +865,11 @@ static inline u32 nfs_stateid_hash(const nfs4_stateid *stateid)
NFS4_STATEID_OTHER_SIZE);
}
+static inline bool nfs_current_task_exiting(void)
+{
+ return (current->flags & PF_EXITING) != 0;
+}
+
static inline bool nfs_error_is_fatal(int err)
{
switch (err) {
diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c
index 4bf208a0a8e9..715753f41fb0 100644
--- a/fs/nfs/nfs3proc.c
+++ b/fs/nfs/nfs3proc.c
@@ -39,7 +39,7 @@ nfs3_rpc_wrapper(struct rpc_clnt *clnt, struct rpc_message *msg, int flags)
__set_current_state(TASK_KILLABLE|TASK_FREEZABLE_UNSAFE);
schedule_timeout(NFS_JUKEBOX_RETRY_TIME);
res = -ERESTARTSYS;
- } while (!fatal_signal_pending(current));
+ } while (!fatal_signal_pending(current) && !nfs_current_task_exiting());
return res;
}
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index c140427e322c..1b94a55215e7 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -422,6 +422,8 @@ static int nfs4_delay_killable(long *timeout)
{
might_sleep();
+ if (unlikely(nfs_current_task_exiting()))
+ return -EINTR;
__set_current_state(TASK_KILLABLE|TASK_FREEZABLE_UNSAFE);
schedule_timeout(nfs4_update_delay(timeout));
if (!__fatal_signal_pending(current))
@@ -433,6 +435,8 @@ static int nfs4_delay_interruptible(long *timeout)
{
might_sleep();
+ if (unlikely(nfs_current_task_exiting()))
+ return -EINTR;
__set_current_state(TASK_INTERRUPTIBLE|TASK_FREEZABLE_UNSAFE);
schedule_timeout(nfs4_update_delay(timeout));
if (!signal_pending(current))
@@ -1712,7 +1716,8 @@ static void nfs_set_open_stateid_locked(struct nfs4_state *state,
rcu_read_unlock();
trace_nfs4_open_stateid_update_wait(state->inode, stateid, 0);
- if (!fatal_signal_pending(current)) {
+ if (!fatal_signal_pending(current) &&
+ !nfs_current_task_exiting()) {
if (schedule_timeout(5*HZ) == 0)
status = -EAGAIN;
else
@@ -3494,7 +3499,7 @@ static bool nfs4_refresh_open_old_stateid(nfs4_stateid *dst,
write_sequnlock(&state->seqlock);
trace_nfs4_close_stateid_update_wait(state->inode, dst, 0);
- if (fatal_signal_pending(current))
+ if (fatal_signal_pending(current) || nfs_current_task_exiting())
status = -EINTR;
else
if (schedule_timeout(5*HZ) != 0)
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 794bb4aa588d..9fc71dc090c2 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -2741,7 +2741,15 @@ static void nfs4_state_manager(struct nfs_client *clp)
pr_warn_ratelimited("NFS: state manager%s%s failed on NFSv4 server %s"
" with error %d\n", section_sep, section,
clp->cl_hostname, -status);
- ssleep(1);
+ switch (status) {
+ case -ENETDOWN:
+ case -ENETUNREACH:
+ nfs_mark_client_ready(clp, -EIO);
+ break;
+ default:
+ ssleep(1);
+ break;
+ }
out_drain:
memalloc_nofs_restore(memflags);
nfs4_end_drain_session(clp);
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
index d886c8226d8f..79996d7dad0f 100644
--- a/fs/nfs/pnfs.h
+++ b/fs/nfs/pnfs.h
@@ -59,6 +59,7 @@ struct nfs4_pnfs_ds {
struct list_head ds_node; /* nfs4_pnfs_dev_hlist dev_dslist */
char *ds_remotestr; /* comma sep list of addrs */
struct list_head ds_addrs;
+ const struct net *ds_net;
struct nfs_client *ds_clp;
refcount_t ds_count;
unsigned long ds_state;
@@ -405,7 +406,8 @@ int pnfs_generic_commit_pagelist(struct inode *inode,
int pnfs_generic_scan_commit_lists(struct nfs_commit_info *cinfo, int max);
void pnfs_generic_write_commit_done(struct rpc_task *task, void *data);
void nfs4_pnfs_ds_put(struct nfs4_pnfs_ds *ds);
-struct nfs4_pnfs_ds *nfs4_pnfs_ds_add(struct list_head *dsaddrs,
+struct nfs4_pnfs_ds *nfs4_pnfs_ds_add(const struct net *net,
+ struct list_head *dsaddrs,
gfp_t gfp_flags);
void nfs4_pnfs_v3_ds_connect_unload(void);
int nfs4_pnfs_ds_connect(struct nfs_server *mds_srv, struct nfs4_pnfs_ds *ds,
diff --git a/fs/nfs/pnfs_nfs.c b/fs/nfs/pnfs_nfs.c
index 88e061bd711b..1b317c44da12 100644
--- a/fs/nfs/pnfs_nfs.c
+++ b/fs/nfs/pnfs_nfs.c
@@ -651,12 +651,12 @@ _same_data_server_addrs_locked(const struct list_head *dsaddrs1,
* Lookup DS by addresses. nfs4_ds_cache_lock is held
*/
static struct nfs4_pnfs_ds *
-_data_server_lookup_locked(const struct list_head *dsaddrs)
+_data_server_lookup_locked(const struct net *net, const struct list_head *dsaddrs)
{
struct nfs4_pnfs_ds *ds;
list_for_each_entry(ds, &nfs4_data_server_cache, ds_node)
- if (_same_data_server_addrs_locked(&ds->ds_addrs, dsaddrs))
+ if (ds->ds_net == net && _same_data_server_addrs_locked(&ds->ds_addrs, dsaddrs))
return ds;
return NULL;
}
@@ -763,7 +763,7 @@ nfs4_pnfs_remotestr(struct list_head *dsaddrs, gfp_t gfp_flags)
* uncached and return cached struct nfs4_pnfs_ds.
*/
struct nfs4_pnfs_ds *
-nfs4_pnfs_ds_add(struct list_head *dsaddrs, gfp_t gfp_flags)
+nfs4_pnfs_ds_add(const struct net *net, struct list_head *dsaddrs, gfp_t gfp_flags)
{
struct nfs4_pnfs_ds *tmp_ds, *ds = NULL;
char *remotestr;
@@ -781,13 +781,14 @@ nfs4_pnfs_ds_add(struct list_head *dsaddrs, gfp_t gfp_flags)
remotestr = nfs4_pnfs_remotestr(dsaddrs, gfp_flags);
spin_lock(&nfs4_ds_cache_lock);
- tmp_ds = _data_server_lookup_locked(dsaddrs);
+ tmp_ds = _data_server_lookup_locked(net, dsaddrs);
if (tmp_ds == NULL) {
INIT_LIST_HEAD(&ds->ds_addrs);
list_splice_init(dsaddrs, &ds->ds_addrs);
ds->ds_remotestr = remotestr;
refcount_set(&ds->ds_count, 1);
INIT_LIST_HEAD(&ds->ds_node);
+ ds->ds_net = net;
ds->ds_clp = NULL;
list_add(&ds->ds_node, &nfs4_data_server_cache);
dprintk("%s add new data server %s\n", __func__,
diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c
index 085912268442..dd4dc70e4aaa 100644
--- a/fs/orangefs/inode.c
+++ b/fs/orangefs/inode.c
@@ -23,9 +23,9 @@ static int orangefs_writepage_locked(struct page *page,
struct orangefs_write_range *wr = NULL;
struct iov_iter iter;
struct bio_vec bv;
- size_t len, wlen;
+ size_t wlen;
ssize_t ret;
- loff_t off;
+ loff_t len, off;
set_page_writeback(page);
@@ -92,8 +92,7 @@ static int orangefs_writepages_work(struct orangefs_writepages *ow,
struct orangefs_write_range *wrp, wr;
struct iov_iter iter;
ssize_t ret;
- size_t len;
- loff_t off;
+ loff_t len, off;
int i;
len = i_size_read(inode);
diff --git a/fs/pstore/inode.c b/fs/pstore/inode.c
index 7dbbf3b6d98d..a1c97cd2720a 100644
--- a/fs/pstore/inode.c
+++ b/fs/pstore/inode.c
@@ -264,7 +264,7 @@ static void parse_options(char *options)
static int pstore_show_options(struct seq_file *m, struct dentry *root)
{
if (kmsg_bytes != CONFIG_PSTORE_DEFAULT_KMSG_BYTES)
- seq_printf(m, ",kmsg_bytes=%lu", kmsg_bytes);
+ seq_printf(m, ",kmsg_bytes=%u", kmsg_bytes);
return 0;
}
diff --git a/fs/pstore/internal.h b/fs/pstore/internal.h
index 801d6c0b170c..a0fc51196910 100644
--- a/fs/pstore/internal.h
+++ b/fs/pstore/internal.h
@@ -6,7 +6,7 @@
#include <linux/time.h>
#include <linux/pstore.h>
-extern unsigned long kmsg_bytes;
+extern unsigned int kmsg_bytes;
#ifdef CONFIG_PSTORE_FTRACE
extern void pstore_register_ftrace(void);
@@ -35,7 +35,7 @@ static inline void pstore_unregister_pmsg(void) {}
extern struct pstore_info *psinfo;
-extern void pstore_set_kmsg_bytes(int);
+extern void pstore_set_kmsg_bytes(unsigned int bytes);
extern void pstore_get_records(int);
extern void pstore_get_backend_records(struct pstore_info *psi,
struct dentry *root, int quiet);
diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c
index 03425928d2fb..ef62389212b6 100644
--- a/fs/pstore/platform.c
+++ b/fs/pstore/platform.c
@@ -92,8 +92,8 @@ module_param(compress, charp, 0444);
MODULE_PARM_DESC(compress, "compression to use");
/* How much of the kernel log to snapshot */
-unsigned long kmsg_bytes = CONFIG_PSTORE_DEFAULT_KMSG_BYTES;
-module_param(kmsg_bytes, ulong, 0444);
+unsigned int kmsg_bytes = CONFIG_PSTORE_DEFAULT_KMSG_BYTES;
+module_param(kmsg_bytes, uint, 0444);
MODULE_PARM_DESC(kmsg_bytes, "amount of kernel log to snapshot (in bytes)");
static void *compress_workspace;
@@ -107,9 +107,9 @@ static void *compress_workspace;
static char *big_oops_buf;
static size_t max_compressed_size;
-void pstore_set_kmsg_bytes(int bytes)
+void pstore_set_kmsg_bytes(unsigned int bytes)
{
- kmsg_bytes = bytes;
+ WRITE_ONCE(kmsg_bytes, bytes);
}
/* Tag each group of saved records with a sequence number */
@@ -278,6 +278,7 @@ static void pstore_dump(struct kmsg_dumper *dumper,
enum kmsg_dump_reason reason)
{
struct kmsg_dump_iter iter;
+ unsigned int remaining = READ_ONCE(kmsg_bytes);
unsigned long total = 0;
const char *why;
unsigned int part = 1;
@@ -300,7 +301,7 @@ static void pstore_dump(struct kmsg_dumper *dumper,
kmsg_dump_rewind(&iter);
oopscount++;
- while (total < kmsg_bytes) {
+ while (total < remaining) {
char *dst;
size_t dst_size;
int header_size;
diff --git a/fs/smb/client/cifsacl.c b/fs/smb/client/cifsacl.c
index db9076da2182..bf32bc22ebd6 100644
--- a/fs/smb/client/cifsacl.c
+++ b/fs/smb/client/cifsacl.c
@@ -811,7 +811,23 @@ static void parse_dacl(struct smb_acl *pdacl, char *end_of_acl,
return;
for (i = 0; i < num_aces; ++i) {
+ if (end_of_acl - acl_base < acl_size)
+ break;
+
ppace[i] = (struct smb_ace *) (acl_base + acl_size);
+ acl_base = (char *)ppace[i];
+ acl_size = offsetof(struct smb_ace, sid) +
+ offsetof(struct smb_sid, sub_auth);
+
+ if (end_of_acl - acl_base < acl_size ||
+ ppace[i]->sid.num_subauth == 0 ||
+ ppace[i]->sid.num_subauth > SID_MAX_SUB_AUTHORITIES ||
+ (end_of_acl - acl_base <
+ acl_size + sizeof(__le32) * ppace[i]->sid.num_subauth) ||
+ (le16_to_cpu(ppace[i]->size) <
+ acl_size + sizeof(__le32) * ppace[i]->sid.num_subauth))
+ break;
+
#ifdef CONFIG_CIFS_DEBUG2
dump_ace(ppace[i], end_of_acl);
#endif
@@ -855,7 +871,6 @@ static void parse_dacl(struct smb_acl *pdacl, char *end_of_acl,
(void *)ppace[i],
sizeof(struct smb_ace)); */
- acl_base = (char *)ppace[i];
acl_size = le16_to_cpu(ppace[i]->size);
}
diff --git a/fs/smb/client/cifspdu.h b/fs/smb/client/cifspdu.h
index c46d418c1c0c..ca33f6cd6a80 100644
--- a/fs/smb/client/cifspdu.h
+++ b/fs/smb/client/cifspdu.h
@@ -1226,10 +1226,9 @@ typedef struct smb_com_query_information_rsp {
typedef struct smb_com_setattr_req {
struct smb_hdr hdr; /* wct = 8 */
__le16 attr;
- __le16 time_low;
- __le16 time_high;
+ __le32 last_write_time;
__le16 reserved[5]; /* must be zero */
- __u16 ByteCount;
+ __le16 ByteCount;
__u8 BufferFormat; /* 4 = ASCII */
unsigned char fileName[];
} __attribute__((packed)) SETATTR_REQ;
diff --git a/fs/smb/client/cifsproto.h b/fs/smb/client/cifsproto.h
index 7f97e5468652..c6d325666b5c 100644
--- a/fs/smb/client/cifsproto.h
+++ b/fs/smb/client/cifsproto.h
@@ -31,6 +31,9 @@ extern void cifs_small_buf_release(void *);
extern void free_rsp_buf(int, void *);
extern int smb_send(struct TCP_Server_Info *, struct smb_hdr *,
unsigned int /* length */);
+extern int smb_send_kvec(struct TCP_Server_Info *server,
+ struct msghdr *msg,
+ size_t *sent);
extern unsigned int _get_xid(void);
extern void _free_xid(unsigned int);
#define get_xid() \
@@ -395,6 +398,10 @@ extern int CIFSSMBQFSUnixInfo(const unsigned int xid, struct cifs_tcon *tcon);
extern int CIFSSMBQFSPosixInfo(const unsigned int xid, struct cifs_tcon *tcon,
struct kstatfs *FSData);
+extern int SMBSetInformation(const unsigned int xid, struct cifs_tcon *tcon,
+ const char *fileName, __le32 attributes, __le64 write_time,
+ const struct nls_table *nls_codepage,
+ struct cifs_sb_info *cifs_sb);
extern int CIFSSMBSetPathInfo(const unsigned int xid, struct cifs_tcon *tcon,
const char *fileName, const FILE_BASIC_INFO *data,
const struct nls_table *nls_codepage,
diff --git a/fs/smb/client/cifssmb.c b/fs/smb/client/cifssmb.c
index 769950adb776..b91184ebce02 100644
--- a/fs/smb/client/cifssmb.c
+++ b/fs/smb/client/cifssmb.c
@@ -5157,6 +5157,63 @@ CIFSSMBSetFileSize(const unsigned int xid, struct cifs_tcon *tcon,
return rc;
}
+int
+SMBSetInformation(const unsigned int xid, struct cifs_tcon *tcon,
+ const char *fileName, __le32 attributes, __le64 write_time,
+ const struct nls_table *nls_codepage,
+ struct cifs_sb_info *cifs_sb)
+{
+ SETATTR_REQ *pSMB;
+ SETATTR_RSP *pSMBr;
+ struct timespec64 ts;
+ int bytes_returned;
+ int name_len;
+ int rc;
+
+ cifs_dbg(FYI, "In %s path %s\n", __func__, fileName);
+
+retry:
+ rc = smb_init(SMB_COM_SETATTR, 8, tcon, (void **) &pSMB,
+ (void **) &pSMBr);
+ if (rc)
+ return rc;
+
+ if (pSMB->hdr.Flags2 & SMBFLG2_UNICODE) {
+ name_len =
+ cifsConvertToUTF16((__le16 *) pSMB->fileName,
+ fileName, PATH_MAX, nls_codepage,
+ cifs_remap(cifs_sb));
+ name_len++; /* trailing null */
+ name_len *= 2;
+ } else {
+ name_len = copy_path_name(pSMB->fileName, fileName);
+ }
+ /* Only few attributes can be set by this command, others are not accepted by Win9x. */
+ pSMB->attr = cpu_to_le16(le32_to_cpu(attributes) &
+ (ATTR_READONLY | ATTR_HIDDEN | ATTR_SYSTEM | ATTR_ARCHIVE));
+ /* Zero write time value (in both NT and SETATTR formats) means to not change it. */
+ if (le64_to_cpu(write_time) != 0) {
+ ts = cifs_NTtimeToUnix(write_time);
+ pSMB->last_write_time = cpu_to_le32(ts.tv_sec);
+ }
+ pSMB->BufferFormat = 0x04;
+ name_len++; /* account for buffer type byte */
+ inc_rfc1001_len(pSMB, (__u16)name_len);
+ pSMB->ByteCount = cpu_to_le16(name_len);
+
+ rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB,
+ (struct smb_hdr *) pSMBr, &bytes_returned, 0);
+ if (rc)
+ cifs_dbg(FYI, "Send error in %s = %d\n", __func__, rc);
+
+ cifs_buf_release(pSMB);
+
+ if (rc == -EAGAIN)
+ goto retry;
+
+ return rc;
+}
+
/* Some legacy servers such as NT4 require that the file times be set on
an open handle, rather than by pathname - this is awkward due to
potential access conflicts on the open, but it is unavoidable for these
diff --git a/fs/smb/client/connect.c b/fs/smb/client/connect.c
index 54aba8d642ee..3faaee33ad45 100644
--- a/fs/smb/client/connect.c
+++ b/fs/smb/client/connect.c
@@ -3051,8 +3051,10 @@ ip_rfc1001_connect(struct TCP_Server_Info *server)
* sessinit is sent but no second negprot
*/
struct rfc1002_session_packet req = {};
- struct smb_hdr *smb_buf = (struct smb_hdr *)&req;
+ struct msghdr msg = {};
+ struct kvec iov = {};
unsigned int len;
+ size_t sent;
req.trailer.session_req.called_len = sizeof(req.trailer.session_req.called_name);
@@ -3081,10 +3083,18 @@ ip_rfc1001_connect(struct TCP_Server_Info *server)
* As per rfc1002, @len must be the number of bytes that follows the
* length field of a rfc1002 session request payload.
*/
- len = sizeof(req) - offsetof(struct rfc1002_session_packet, trailer.session_req);
+ len = sizeof(req.trailer.session_req);
+ req.type = RFC1002_SESSION_REQUEST;
+ req.flags = 0;
+ req.length = cpu_to_be16(len);
+ len += offsetof(typeof(req), trailer.session_req);
+ iov.iov_base = &req;
+ iov.iov_len = len;
+ iov_iter_kvec(&msg.msg_iter, ITER_SOURCE, &iov, 1, len);
+ rc = smb_send_kvec(server, &msg, &sent);
+ if (rc < 0 || len != sent)
+ return (rc == -EINTR || rc == -EAGAIN) ? rc : -ECONNABORTED;
- smb_buf->smb_buf_length = cpu_to_be32((RFC1002_SESSION_REQUEST << 24) | len);
- rc = smb_send(server, smb_buf, len);
/*
* RFC1001 layer in at least one server requires very short break before
* negprot presumably because not expecting negprot to follow so fast.
@@ -3093,7 +3103,7 @@ ip_rfc1001_connect(struct TCP_Server_Info *server)
*/
usleep_range(1000, 2000);
- return rc;
+ return 0;
}
static int
@@ -3946,11 +3956,13 @@ int
cifs_negotiate_protocol(const unsigned int xid, struct cifs_ses *ses,
struct TCP_Server_Info *server)
{
+ bool in_retry = false;
int rc = 0;
if (!server->ops->need_neg || !server->ops->negotiate)
return -ENOSYS;
+retry:
/* only send once per connect */
spin_lock(&server->srv_lock);
if (server->tcpStatus != CifsGood &&
@@ -3970,6 +3982,14 @@ cifs_negotiate_protocol(const unsigned int xid, struct cifs_ses *ses,
spin_unlock(&server->srv_lock);
rc = server->ops->negotiate(xid, ses, server);
+ if (rc == -EAGAIN) {
+ /* Allow one retry attempt */
+ if (!in_retry) {
+ in_retry = true;
+ goto retry;
+ }
+ rc = -EHOSTDOWN;
+ }
if (rc == 0) {
spin_lock(&server->srv_lock);
if (server->tcpStatus == CifsInNegotiate)
diff --git a/fs/smb/client/fs_context.c b/fs/smb/client/fs_context.c
index d2e291ef104e..137d03781d52 100644
--- a/fs/smb/client/fs_context.c
+++ b/fs/smb/client/fs_context.c
@@ -1249,6 +1249,7 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
case Opt_rsize:
ctx->rsize = result.uint_32;
ctx->got_rsize = true;
+ ctx->vol_rsize = ctx->rsize;
break;
case Opt_wsize:
ctx->wsize = result.uint_32;
@@ -1264,6 +1265,7 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
ctx->wsize, PAGE_SIZE);
}
}
+ ctx->vol_wsize = ctx->wsize;
break;
case Opt_acregmax:
if (result.uint_32 > CIFS_MAX_ACTIMEO / HZ) {
diff --git a/fs/smb/client/fs_context.h b/fs/smb/client/fs_context.h
index bbd2063ab838..d0a2043ea446 100644
--- a/fs/smb/client/fs_context.h
+++ b/fs/smb/client/fs_context.h
@@ -253,6 +253,9 @@ struct smb3_fs_context {
bool use_client_guid:1;
/* reuse existing guid for multichannel */
u8 client_guid[SMB2_CLIENT_GUID_SIZE];
+ /* User-specified original r/wsize value */
+ unsigned int vol_rsize;
+ unsigned int vol_wsize;
unsigned int bsize;
unsigned int rasize;
unsigned int rsize;
diff --git a/fs/smb/client/link.c b/fs/smb/client/link.c
index d86da949a919..007da0a699cb 100644
--- a/fs/smb/client/link.c
+++ b/fs/smb/client/link.c
@@ -257,7 +257,7 @@ cifs_query_mf_symlink(unsigned int xid, struct cifs_tcon *tcon,
struct cifs_open_parms oparms;
struct cifs_io_parms io_parms = {0};
int buf_type = CIFS_NO_BUFFER;
- FILE_ALL_INFO file_info;
+ struct cifs_open_info_data query_data;
oparms = (struct cifs_open_parms) {
.tcon = tcon,
@@ -269,11 +269,11 @@ cifs_query_mf_symlink(unsigned int xid, struct cifs_tcon *tcon,
.fid = &fid,
};
- rc = CIFS_open(xid, &oparms, &oplock, &file_info);
+ rc = tcon->ses->server->ops->open(xid, &oparms, &oplock, &query_data);
if (rc)
return rc;
- if (file_info.EndOfFile != cpu_to_le64(CIFS_MF_SYMLINK_FILE_SIZE)) {
+ if (query_data.fi.EndOfFile != cpu_to_le64(CIFS_MF_SYMLINK_FILE_SIZE)) {
rc = -ENOENT;
/* it's not a symlink */
goto out;
@@ -312,7 +312,7 @@ cifs_create_mf_symlink(unsigned int xid, struct cifs_tcon *tcon,
.fid = &fid,
};
- rc = CIFS_open(xid, &oparms, &oplock, NULL);
+ rc = tcon->ses->server->ops->open(xid, &oparms, &oplock, NULL);
if (rc)
return rc;
diff --git a/fs/smb/client/readdir.c b/fs/smb/client/readdir.c
index 75929a0a56f9..e616be8196de 100644
--- a/fs/smb/client/readdir.c
+++ b/fs/smb/client/readdir.c
@@ -733,7 +733,10 @@ find_cifs_entry(const unsigned int xid, struct cifs_tcon *tcon, loff_t pos,
else
cifs_buf_release(cfile->srch_inf.
ntwrk_buf_start);
+ /* Reset all pointers to the network buffer to prevent stale references */
cfile->srch_inf.ntwrk_buf_start = NULL;
+ cfile->srch_inf.srch_entries_start = NULL;
+ cfile->srch_inf.last_entry = NULL;
}
rc = initiate_cifs_search(xid, file, full_path);
if (rc) {
@@ -756,11 +759,11 @@ find_cifs_entry(const unsigned int xid, struct cifs_tcon *tcon, loff_t pos,
rc = server->ops->query_dir_next(xid, tcon, &cfile->fid,
search_flags,
&cfile->srch_inf);
+ if (rc)
+ return -ENOENT;
/* FindFirst/Next set last_entry to NULL on malformed reply */
if (cfile->srch_inf.last_entry)
cifs_save_resume_key(cfile->srch_inf.last_entry, cfile);
- if (rc)
- return -ENOENT;
}
if (index_to_find < cfile->srch_inf.index_of_last_entry) {
/* we found the buffer that contains the entry */
diff --git a/fs/smb/client/smb1ops.c b/fs/smb/client/smb1ops.c
index caa1d852ece4..e62d9cc592e0 100644
--- a/fs/smb/client/smb1ops.c
+++ b/fs/smb/client/smb1ops.c
@@ -426,13 +426,6 @@ cifs_negotiate(const unsigned int xid,
{
int rc;
rc = CIFSSMBNegotiate(xid, ses, server);
- if (rc == -EAGAIN) {
- /* retry only once on 1st time connection */
- set_credits(server, 1);
- rc = CIFSSMBNegotiate(xid, ses, server);
- if (rc == -EAGAIN)
- rc = -EHOSTDOWN;
- }
return rc;
}
@@ -444,8 +437,8 @@ cifs_negotiate_wsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)
unsigned int wsize;
/* start with specified wsize, or default */
- if (ctx->wsize)
- wsize = ctx->wsize;
+ if (ctx->got_wsize)
+ wsize = ctx->vol_wsize;
else if (tcon->unix_ext && (unix_cap & CIFS_UNIX_LARGE_WRITE_CAP))
wsize = CIFS_DEFAULT_IOSIZE;
else
@@ -497,7 +490,7 @@ cifs_negotiate_rsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)
else
defsize = server->maxBuf - sizeof(READ_RSP);
- rsize = ctx->rsize ? ctx->rsize : defsize;
+ rsize = ctx->got_rsize ? ctx->vol_rsize : defsize;
/*
* no CAP_LARGE_READ_X? Then MS-CIFS states that we must limit this to
@@ -548,24 +541,104 @@ static int cifs_query_path_info(const unsigned int xid,
const char *full_path,
struct cifs_open_info_data *data)
{
- int rc;
+ int rc = -EOPNOTSUPP;
FILE_ALL_INFO fi = {};
+ struct cifs_search_info search_info = {};
+ bool non_unicode_wildcard = false;
data->symlink = false;
data->adjust_tz = false;
- /* could do find first instead but this returns more info */
- rc = CIFSSMBQPathInfo(xid, tcon, full_path, &fi, 0 /* not legacy */, cifs_sb->local_nls,
- cifs_remap(cifs_sb));
/*
- * BB optimize code so we do not make the above call when server claims
- * no NT SMB support and the above call failed at least once - set flag
- * in tcon or mount.
+ * First try CIFSSMBQPathInfo() function which returns more info
+ * (NumberOfLinks) than CIFSFindFirst() fallback function.
+ * Some servers like Win9x do not support SMB_QUERY_FILE_ALL_INFO over
+ * TRANS2_QUERY_PATH_INFORMATION, but supports it with filehandle over
+ * TRANS2_QUERY_FILE_INFORMATION (function CIFSSMBQFileInfo(). But SMB
+ * Open command on non-NT servers works only for files, does not work
+ * for directories. And moreover Win9x SMB server returns bogus data in
+ * SMB_QUERY_FILE_ALL_INFO Attributes field. So for non-NT servers,
+ * do not even use CIFSSMBQPathInfo() or CIFSSMBQFileInfo() function.
+ */
+ if (tcon->ses->capabilities & CAP_NT_SMBS)
+ rc = CIFSSMBQPathInfo(xid, tcon, full_path, &fi, 0 /* not legacy */,
+ cifs_sb->local_nls, cifs_remap(cifs_sb));
+
+ /*
+ * Non-UNICODE variant of fallback functions below expands wildcards,
+ * so they cannot be used for querying paths with wildcard characters.
*/
- if ((rc == -EOPNOTSUPP) || (rc == -EINVAL)) {
+ if (rc && !(tcon->ses->capabilities & CAP_UNICODE) && strpbrk(full_path, "*?\"><"))
+ non_unicode_wildcard = true;
+
+ /*
+ * Then fallback to CIFSFindFirst() which works also with non-NT servers
+ * but does not does not provide NumberOfLinks.
+ */
+ if ((rc == -EOPNOTSUPP || rc == -EINVAL) &&
+ !non_unicode_wildcard) {
+ if (!(tcon->ses->capabilities & tcon->ses->server->vals->cap_nt_find))
+ search_info.info_level = SMB_FIND_FILE_INFO_STANDARD;
+ else
+ search_info.info_level = SMB_FIND_FILE_FULL_DIRECTORY_INFO;
+ rc = CIFSFindFirst(xid, tcon, full_path, cifs_sb, NULL,
+ CIFS_SEARCH_CLOSE_ALWAYS | CIFS_SEARCH_CLOSE_AT_END,
+ &search_info, false);
+ if (rc == 0) {
+ if (!(tcon->ses->capabilities & tcon->ses->server->vals->cap_nt_find)) {
+ FIND_FILE_STANDARD_INFO *di;
+ int offset = tcon->ses->server->timeAdj;
+
+ di = (FIND_FILE_STANDARD_INFO *)search_info.srch_entries_start;
+ fi.CreationTime = cpu_to_le64(cifs_UnixTimeToNT(cnvrtDosUnixTm(
+ di->CreationDate, di->CreationTime, offset)));
+ fi.LastAccessTime = cpu_to_le64(cifs_UnixTimeToNT(cnvrtDosUnixTm(
+ di->LastAccessDate, di->LastAccessTime, offset)));
+ fi.LastWriteTime = cpu_to_le64(cifs_UnixTimeToNT(cnvrtDosUnixTm(
+ di->LastWriteDate, di->LastWriteTime, offset)));
+ fi.ChangeTime = fi.LastWriteTime;
+ fi.Attributes = cpu_to_le32(le16_to_cpu(di->Attributes));
+ fi.AllocationSize = cpu_to_le64(le32_to_cpu(di->AllocationSize));
+ fi.EndOfFile = cpu_to_le64(le32_to_cpu(di->DataSize));
+ } else {
+ FILE_FULL_DIRECTORY_INFO *di;
+
+ di = (FILE_FULL_DIRECTORY_INFO *)search_info.srch_entries_start;
+ fi.CreationTime = di->CreationTime;
+ fi.LastAccessTime = di->LastAccessTime;
+ fi.LastWriteTime = di->LastWriteTime;
+ fi.ChangeTime = di->ChangeTime;
+ fi.Attributes = di->ExtFileAttributes;
+ fi.AllocationSize = di->AllocationSize;
+ fi.EndOfFile = di->EndOfFile;
+ fi.EASize = di->EaSize;
+ }
+ fi.NumberOfLinks = cpu_to_le32(1);
+ fi.DeletePending = 0;
+ fi.Directory = !!(le32_to_cpu(fi.Attributes) & ATTR_DIRECTORY);
+ cifs_buf_release(search_info.ntwrk_buf_start);
+ } else if (!full_path[0]) {
+ /*
+ * CIFSFindFirst() does not work on root path if the
+ * root path was exported on the server from the top
+ * level path (drive letter).
+ */
+ rc = -EOPNOTSUPP;
+ }
+ }
+
+ /*
+ * If everything failed then fallback to the legacy SMB command
+ * SMB_COM_QUERY_INFORMATION which works with all servers, but
+ * provide just few information.
+ */
+ if ((rc == -EOPNOTSUPP || rc == -EINVAL) && !non_unicode_wildcard) {
rc = SMBQueryInformation(xid, tcon, full_path, &fi, cifs_sb->local_nls,
cifs_remap(cifs_sb));
data->adjust_tz = true;
+ } else if ((rc == -EOPNOTSUPP || rc == -EINVAL) && non_unicode_wildcard) {
+ /* Path with non-UNICODE wildcard character cannot exist. */
+ rc = -ENOENT;
}
if (!rc) {
@@ -662,6 +735,13 @@ static int cifs_query_file_info(const unsigned int xid, struct cifs_tcon *tcon,
int rc;
FILE_ALL_INFO fi = {};
+ /*
+ * CIFSSMBQFileInfo() for non-NT servers returns bogus data in
+ * Attributes fields. So do not use this command for non-NT servers.
+ */
+ if (!(tcon->ses->capabilities & CAP_NT_SMBS))
+ return -EOPNOTSUPP;
+
if (cfile->symlink_target) {
data->symlink_target = kstrdup(cfile->symlink_target, GFP_KERNEL);
if (!data->symlink_target)
@@ -832,6 +912,9 @@ smb_set_file_info(struct inode *inode, const char *full_path,
struct cifs_fid fid;
struct cifs_open_parms oparms;
struct cifsFileInfo *open_file;
+ FILE_BASIC_INFO new_buf;
+ struct cifs_open_info_data query_data;
+ __le64 write_time = buf->LastWriteTime;
struct cifsInodeInfo *cinode = CIFS_I(inode);
struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);
struct tcon_link *tlink = NULL;
@@ -839,20 +922,58 @@ smb_set_file_info(struct inode *inode, const char *full_path,
/* if the file is already open for write, just use that fileid */
open_file = find_writable_file(cinode, FIND_WR_FSUID_ONLY);
+
if (open_file) {
fid.netfid = open_file->fid.netfid;
netpid = open_file->pid;
tcon = tlink_tcon(open_file->tlink);
- goto set_via_filehandle;
+ } else {
+ tlink = cifs_sb_tlink(cifs_sb);
+ if (IS_ERR(tlink)) {
+ rc = PTR_ERR(tlink);
+ tlink = NULL;
+ goto out;
+ }
+ tcon = tlink_tcon(tlink);
}
- tlink = cifs_sb_tlink(cifs_sb);
- if (IS_ERR(tlink)) {
- rc = PTR_ERR(tlink);
- tlink = NULL;
- goto out;
+ /*
+ * Non-NT servers interprets zero time value in SMB_SET_FILE_BASIC_INFO
+ * over TRANS2_SET_FILE_INFORMATION as a valid time value. NT servers
+ * interprets zero time value as do not change existing value on server.
+ * API of ->set_file_info() callback expects that zero time value has
+ * the NT meaning - do not change. Therefore if server is non-NT and
+ * some time values in "buf" are zero, then fetch missing time values.
+ */
+ if (!(tcon->ses->capabilities & CAP_NT_SMBS) &&
+ (!buf->CreationTime || !buf->LastAccessTime ||
+ !buf->LastWriteTime || !buf->ChangeTime)) {
+ rc = cifs_query_path_info(xid, tcon, cifs_sb, full_path, &query_data);
+ if (rc) {
+ if (open_file) {
+ cifsFileInfo_put(open_file);
+ open_file = NULL;
+ }
+ goto out;
+ }
+ /*
+ * Original write_time from buf->LastWriteTime is preserved
+ * as SMBSetInformation() interprets zero as do not change.
+ */
+ new_buf = *buf;
+ buf = &new_buf;
+ if (!buf->CreationTime)
+ buf->CreationTime = query_data.fi.CreationTime;
+ if (!buf->LastAccessTime)
+ buf->LastAccessTime = query_data.fi.LastAccessTime;
+ if (!buf->LastWriteTime)
+ buf->LastWriteTime = query_data.fi.LastWriteTime;
+ if (!buf->ChangeTime)
+ buf->ChangeTime = query_data.fi.ChangeTime;
}
- tcon = tlink_tcon(tlink);
+
+ if (open_file)
+ goto set_via_filehandle;
rc = CIFSSMBSetPathInfo(xid, tcon, full_path, buf, cifs_sb->local_nls,
cifs_sb);
@@ -873,8 +994,45 @@ smb_set_file_info(struct inode *inode, const char *full_path,
.fid = &fid,
};
- cifs_dbg(FYI, "calling SetFileInfo since SetPathInfo for times not supported by this server\n");
- rc = CIFS_open(xid, &oparms, &oplock, NULL);
+ if (S_ISDIR(inode->i_mode) && !(tcon->ses->capabilities & CAP_NT_SMBS)) {
+ /* Opening directory path is not possible on non-NT servers. */
+ rc = -EOPNOTSUPP;
+ } else {
+ /*
+ * Use cifs_open_file() instead of CIFS_open() as the
+ * cifs_open_file() selects the correct function which
+ * works also on non-NT servers.
+ */
+ rc = cifs_open_file(xid, &oparms, &oplock, NULL);
+ /*
+ * Opening path for writing on non-NT servers is not
+ * possible when the read-only attribute is already set.
+ * Non-NT server in this case returns -EACCES. For those
+ * servers the only possible way how to clear the read-only
+ * bit is via SMB_COM_SETATTR command.
+ */
+ if (rc == -EACCES &&
+ (cinode->cifsAttrs & ATTR_READONLY) &&
+ le32_to_cpu(buf->Attributes) != 0 && /* 0 = do not change attrs */
+ !(le32_to_cpu(buf->Attributes) & ATTR_READONLY) &&
+ !(tcon->ses->capabilities & CAP_NT_SMBS))
+ rc = -EOPNOTSUPP;
+ }
+
+ /* Fallback to SMB_COM_SETATTR command when absolutelty needed. */
+ if (rc == -EOPNOTSUPP) {
+ cifs_dbg(FYI, "calling SetInformation since SetPathInfo for attrs/times not supported by this server\n");
+ rc = SMBSetInformation(xid, tcon, full_path,
+ buf->Attributes != 0 ? buf->Attributes : cpu_to_le32(cinode->cifsAttrs),
+ write_time,
+ cifs_sb->local_nls, cifs_sb);
+ if (rc == 0)
+ cinode->cifsAttrs = le32_to_cpu(buf->Attributes);
+ else
+ rc = -EACCES;
+ goto out;
+ }
+
if (rc != 0) {
if (rc == -EIO)
rc = -EINVAL;
@@ -882,6 +1040,7 @@ smb_set_file_info(struct inode *inode, const char *full_path,
}
netpid = current->tgid;
+ cifs_dbg(FYI, "calling SetFileInfo since SetPathInfo for attrs/times not supported by this server\n");
set_via_filehandle:
rc = CIFSSMBSetFileInfo(xid, tcon, buf, fid.netfid, netpid);
@@ -892,6 +1051,21 @@ smb_set_file_info(struct inode *inode, const char *full_path,
CIFSSMBClose(xid, tcon, fid.netfid);
else
cifsFileInfo_put(open_file);
+
+ /*
+ * Setting the read-only bit is not honered on non-NT servers when done
+ * via open-semantics. So for setting it, use SMB_COM_SETATTR command.
+ * This command works only after the file is closed, so use it only when
+ * operation was called without the filehandle.
+ */
+ if (open_file == NULL &&
+ !(tcon->ses->capabilities & CAP_NT_SMBS) &&
+ le32_to_cpu(buf->Attributes) & ATTR_READONLY) {
+ SMBSetInformation(xid, tcon, full_path,
+ buf->Attributes,
+ 0 /* do not change write time */,
+ cifs_sb->local_nls, cifs_sb);
+ }
out:
if (tlink != NULL)
cifs_put_tlink(tlink);
diff --git a/fs/smb/client/smb2file.c b/fs/smb/client/smb2file.c
index db9c807115c6..d7f2835e0b1c 100644
--- a/fs/smb/client/smb2file.c
+++ b/fs/smb/client/smb2file.c
@@ -107,16 +107,25 @@ int smb2_open_file(const unsigned int xid, struct cifs_open_parms *oparms, __u32
int err_buftype = CIFS_NO_BUFFER;
struct cifs_fid *fid = oparms->fid;
struct network_resiliency_req nr_ioctl_req;
+ bool retry_without_read_attributes = false;
smb2_path = cifs_convert_path_to_utf16(oparms->path, oparms->cifs_sb);
if (smb2_path == NULL)
return -ENOMEM;
- oparms->desired_access |= FILE_READ_ATTRIBUTES;
+ if (!(oparms->desired_access & FILE_READ_ATTRIBUTES)) {
+ oparms->desired_access |= FILE_READ_ATTRIBUTES;
+ retry_without_read_attributes = true;
+ }
smb2_oplock = SMB2_OPLOCK_LEVEL_BATCH;
rc = SMB2_open(xid, oparms, smb2_path, &smb2_oplock, smb2_data, NULL, &err_iov,
&err_buftype);
+ if (rc == -EACCES && retry_without_read_attributes) {
+ oparms->desired_access &= ~FILE_READ_ATTRIBUTES;
+ rc = SMB2_open(xid, oparms, smb2_path, &smb2_oplock, smb2_data, NULL, &err_iov,
+ &err_buftype);
+ }
if (rc && data) {
struct smb2_hdr *hdr = err_iov.iov_base;
diff --git a/fs/smb/client/smb2ops.c b/fs/smb/client/smb2ops.c
index b809a616728f..4e3eacbec96d 100644
--- a/fs/smb/client/smb2ops.c
+++ b/fs/smb/client/smb2ops.c
@@ -428,12 +428,20 @@ smb2_negotiate(const unsigned int xid,
server->CurrentMid = 0;
spin_unlock(&server->mid_lock);
rc = SMB2_negotiate(xid, ses, server);
- /* BB we probably don't need to retry with modern servers */
- if (rc == -EAGAIN)
- rc = -EHOSTDOWN;
return rc;
}
+static inline unsigned int
+prevent_zero_iosize(unsigned int size, const char *type)
+{
+ if (size == 0) {
+ cifs_dbg(VFS, "SMB: Zero %ssize calculated, using minimum value %u\n",
+ type, CIFS_MIN_DEFAULT_IOSIZE);
+ return CIFS_MIN_DEFAULT_IOSIZE;
+ }
+ return size;
+}
+
static unsigned int
smb2_negotiate_wsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)
{
@@ -441,12 +449,12 @@ smb2_negotiate_wsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)
unsigned int wsize;
/* start with specified wsize, or default */
- wsize = ctx->wsize ? ctx->wsize : CIFS_DEFAULT_IOSIZE;
+ wsize = ctx->got_wsize ? ctx->vol_wsize : CIFS_DEFAULT_IOSIZE;
wsize = min_t(unsigned int, wsize, server->max_write);
if (!(server->capabilities & SMB2_GLOBAL_CAP_LARGE_MTU))
wsize = min_t(unsigned int, wsize, SMB2_MAX_BUFFER_SIZE);
- return wsize;
+ return prevent_zero_iosize(wsize, "w");
}
static unsigned int
@@ -456,7 +464,7 @@ smb3_negotiate_wsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)
unsigned int wsize;
/* start with specified wsize, or default */
- wsize = ctx->wsize ? ctx->wsize : SMB3_DEFAULT_IOSIZE;
+ wsize = ctx->got_wsize ? ctx->vol_wsize : SMB3_DEFAULT_IOSIZE;
wsize = min_t(unsigned int, wsize, server->max_write);
#ifdef CONFIG_CIFS_SMB_DIRECT
if (server->rdma) {
@@ -478,7 +486,7 @@ smb3_negotiate_wsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)
if (!(server->capabilities & SMB2_GLOBAL_CAP_LARGE_MTU))
wsize = min_t(unsigned int, wsize, SMB2_MAX_BUFFER_SIZE);
- return wsize;
+ return prevent_zero_iosize(wsize, "w");
}
static unsigned int
@@ -488,13 +496,13 @@ smb2_negotiate_rsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)
unsigned int rsize;
/* start with specified rsize, or default */
- rsize = ctx->rsize ? ctx->rsize : CIFS_DEFAULT_IOSIZE;
+ rsize = ctx->got_rsize ? ctx->vol_rsize : CIFS_DEFAULT_IOSIZE;
rsize = min_t(unsigned int, rsize, server->max_read);
if (!(server->capabilities & SMB2_GLOBAL_CAP_LARGE_MTU))
rsize = min_t(unsigned int, rsize, SMB2_MAX_BUFFER_SIZE);
- return rsize;
+ return prevent_zero_iosize(rsize, "r");
}
static unsigned int
@@ -504,7 +512,7 @@ smb3_negotiate_rsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)
unsigned int rsize;
/* start with specified rsize, or default */
- rsize = ctx->rsize ? ctx->rsize : SMB3_DEFAULT_IOSIZE;
+ rsize = ctx->got_rsize ? ctx->vol_rsize : SMB3_DEFAULT_IOSIZE;
rsize = min_t(unsigned int, rsize, server->max_read);
#ifdef CONFIG_CIFS_SMB_DIRECT
if (server->rdma) {
@@ -527,7 +535,7 @@ smb3_negotiate_rsize(struct cifs_tcon *tcon, struct smb3_fs_context *ctx)
if (!(server->capabilities & SMB2_GLOBAL_CAP_LARGE_MTU))
rsize = min_t(unsigned int, rsize, SMB2_MAX_BUFFER_SIZE);
- return rsize;
+ return prevent_zero_iosize(rsize, "r");
}
/*
diff --git a/fs/smb/client/transport.c b/fs/smb/client/transport.c
index ddf1a3aafee5..2269963e5008 100644
--- a/fs/smb/client/transport.c
+++ b/fs/smb/client/transport.c
@@ -178,7 +178,7 @@ delete_mid(struct mid_q_entry *mid)
* Our basic "send data to server" function. Should be called with srv_mutex
* held. The caller is responsible for handling the results.
*/
-static int
+int
smb_send_kvec(struct TCP_Server_Info *server, struct msghdr *smb_msg,
size_t *sent)
{
diff --git a/fs/smb/common/smb2pdu.h b/fs/smb/common/smb2pdu.h
index c3ee42188d25..1af827ae757e 100644
--- a/fs/smb/common/smb2pdu.h
+++ b/fs/smb/common/smb2pdu.h
@@ -95,6 +95,9 @@
*/
#define SMB3_DEFAULT_IOSIZE (4 * 1024 * 1024)
+/* According to MS-SMB2 specification The minimum recommended value is 65536.*/
+#define CIFS_MIN_DEFAULT_IOSIZE (65536)
+
/*
* SMB2 Header Definition
*
diff --git a/fs/smb/server/oplock.c b/fs/smb/server/oplock.c
index 72294764d4c2..e564432643ea 100644
--- a/fs/smb/server/oplock.c
+++ b/fs/smb/server/oplock.c
@@ -146,12 +146,9 @@ static struct oplock_info *opinfo_get_list(struct ksmbd_inode *ci)
{
struct oplock_info *opinfo;
- if (list_empty(&ci->m_op_list))
- return NULL;
-
down_read(&ci->m_lock);
- opinfo = list_first_entry(&ci->m_op_list, struct oplock_info,
- op_entry);
+ opinfo = list_first_entry_or_null(&ci->m_op_list, struct oplock_info,
+ op_entry);
if (opinfo) {
if (opinfo->conn == NULL ||
!atomic_inc_not_zero(&opinfo->refcount))
diff --git a/fs/smb/server/vfs.c b/fs/smb/server/vfs.c
index f6616d687365..3bbf23827060 100644
--- a/fs/smb/server/vfs.c
+++ b/fs/smb/server/vfs.c
@@ -426,10 +426,15 @@ static int ksmbd_vfs_stream_write(struct ksmbd_file *fp, char *buf, loff_t *pos,
ksmbd_debug(VFS, "write stream data pos : %llu, count : %zd\n",
*pos, count);
+ if (*pos >= XATTR_SIZE_MAX) {
+ pr_err("stream write position %lld is out of bounds\n", *pos);
+ return -EINVAL;
+ }
+
size = *pos + count;
if (size > XATTR_SIZE_MAX) {
size = XATTR_SIZE_MAX;
- count = (*pos + count) - XATTR_SIZE_MAX;
+ count = XATTR_SIZE_MAX - *pos;
}
v_len = ksmbd_vfs_getcasexattr(idmap,
@@ -443,13 +448,6 @@ static int ksmbd_vfs_stream_write(struct ksmbd_file *fp, char *buf, loff_t *pos,
goto out;
}
- if (v_len <= *pos) {
- pr_err("stream write position %lld is out of bounds (stream length: %zd)\n",
- *pos, v_len);
- err = -EINVAL;
- goto out;
- }
-
if (v_len < size) {
wbuf = kvzalloc(size, GFP_KERNEL);
if (!wbuf) {
diff --git a/include/crypto/hash.h b/include/crypto/hash.h
index f7c2a22cd776..c0d472fdc82e 100644
--- a/include/crypto/hash.h
+++ b/include/crypto/hash.h
@@ -153,6 +153,7 @@ struct ahash_request {
* This is a counterpart to @init_tfm, used to remove
* various changes set in @init_tfm.
* @clone_tfm: Copy transform into new object, may allocate memory.
+ * @reqsize: Size of the request context.
* @halg: see struct hash_alg_common
*/
struct ahash_alg {
@@ -169,6 +170,8 @@ struct ahash_alg {
void (*exit_tfm)(struct crypto_ahash *tfm);
int (*clone_tfm)(struct crypto_ahash *dst, struct crypto_ahash *src);
+ unsigned int reqsize;
+
struct hash_alg_common halg;
};
diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h
index 9a022caacf93..f3e7e3e5078d 100644
--- a/include/drm/drm_atomic.h
+++ b/include/drm/drm_atomic.h
@@ -372,8 +372,27 @@ struct drm_atomic_state {
*
* Allow full modeset. This is used by the ATOMIC IOCTL handler to
* implement the DRM_MODE_ATOMIC_ALLOW_MODESET flag. Drivers should
- * never consult this flag, instead looking at the output of
- * drm_atomic_crtc_needs_modeset().
+ * generally not consult this flag, but instead look at the output of
+ * drm_atomic_crtc_needs_modeset(). The detailed rules are:
+ *
+ * - Drivers must not consult @allow_modeset in the atomic commit path.
+ * Use drm_atomic_crtc_needs_modeset() instead.
+ *
+ * - Drivers must consult @allow_modeset before adding unrelated struct
+ * drm_crtc_state to this commit by calling
+ * drm_atomic_get_crtc_state(). See also the warning in the
+ * documentation for that function.
+ *
+ * - Drivers must never change this flag, it is under the exclusive
+ * control of userspace.
+ *
+ * - Drivers may consult @allow_modeset in the atomic check path, if
+ * they have the choice between an optimal hardware configuration
+ * which requires a modeset, and a less optimal configuration which
+ * can be committed without a modeset. An example would be suboptimal
+ * scanout FIFO allocation resulting in increased idle power
+ * consumption. This allows userspace to avoid flickering and delays
+ * for the normal composition loop at reasonable cost.
*/
bool allow_modeset : 1;
/**
diff --git a/include/drm/drm_gem.h b/include/drm/drm_gem.h
index 7c2ec139c464..a578068169f1 100644
--- a/include/drm/drm_gem.h
+++ b/include/drm/drm_gem.h
@@ -35,6 +35,7 @@
*/
#include <linux/kref.h>
+#include <linux/dma-buf.h>
#include <linux/dma-resv.h>
#include <linux/list.h>
#include <linux/mutex.h>
@@ -557,6 +558,18 @@ static inline bool drm_gem_object_is_shared_for_memory_stats(struct drm_gem_obje
return (obj->handle_count > 1) || obj->dma_buf;
}
+/**
+ * drm_gem_is_imported() - Tests if GEM object's buffer has been imported
+ * @obj: the GEM object
+ *
+ * Returns:
+ * True if the GEM object's buffer has been imported, false otherwise
+ */
+static inline bool drm_gem_is_imported(const struct drm_gem_object *obj)
+{
+ return !!obj->import_attach;
+}
+
#ifdef CONFIG_LOCKDEP
/**
* drm_gem_gpuva_set_lock() - Set the lock protecting accesses to the gpuva list.
diff --git a/include/linux/bpf-cgroup.h b/include/linux/bpf-cgroup.h
index d4f2c8706042..2331cd8174fe 100644
--- a/include/linux/bpf-cgroup.h
+++ b/include/linux/bpf-cgroup.h
@@ -106,6 +106,7 @@ struct bpf_prog_list {
struct bpf_prog *prog;
struct bpf_cgroup_link *link;
struct bpf_cgroup_storage *storage[MAX_BPF_CGROUP_STORAGE_TYPE];
+ u32 flags;
};
int cgroup_bpf_inherit(struct cgroup *cgrp);
diff --git a/include/linux/coredump.h b/include/linux/coredump.h
index d3eba4360150..c1b4c8c70cae 100644
--- a/include/linux/coredump.h
+++ b/include/linux/coredump.h
@@ -28,6 +28,7 @@ struct coredump_params {
int vma_count;
size_t vma_data_size;
struct core_vma_metadata *vma_meta;
+ struct pid *pid;
};
/*
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index f0ccca16a0ac..608e8296ba20 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -600,10 +600,14 @@ static inline int dma_mmap_wc(struct device *dev,
#else
#define DEFINE_DMA_UNMAP_ADDR(ADDR_NAME)
#define DEFINE_DMA_UNMAP_LEN(LEN_NAME)
-#define dma_unmap_addr(PTR, ADDR_NAME) (0)
-#define dma_unmap_addr_set(PTR, ADDR_NAME, VAL) do { } while (0)
-#define dma_unmap_len(PTR, LEN_NAME) (0)
-#define dma_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0)
+#define dma_unmap_addr(PTR, ADDR_NAME) \
+ ({ typeof(PTR) __p __maybe_unused = PTR; 0; })
+#define dma_unmap_addr_set(PTR, ADDR_NAME, VAL) \
+ do { typeof(PTR) __p __maybe_unused = PTR; } while (0)
+#define dma_unmap_len(PTR, LEN_NAME) \
+ ({ typeof(PTR) __p __maybe_unused = PTR; 0; })
+#define dma_unmap_len_set(PTR, LEN_NAME, VAL) \
+ do { typeof(PTR) __p __maybe_unused = PTR; } while (0)
#endif
#endif /* _LINUX_DMA_MAPPING_H */
diff --git a/include/linux/highmem.h b/include/linux/highmem.h
index 75607d4ba26c..714966d5701e 100644
--- a/include/linux/highmem.h
+++ b/include/linux/highmem.h
@@ -448,7 +448,7 @@ static inline void memcpy_from_folio(char *to, struct folio *folio,
const char *from = kmap_local_folio(folio, offset);
size_t chunk = len;
- if (folio_test_highmem(folio) &&
+ if (folio_test_partial_kmap(folio) &&
chunk > PAGE_SIZE - offset_in_page(offset))
chunk = PAGE_SIZE - offset_in_page(offset);
memcpy(to, from, chunk);
@@ -469,7 +469,7 @@ static inline void memcpy_to_folio(struct folio *folio, size_t offset,
char *to = kmap_local_folio(folio, offset);
size_t chunk = len;
- if (folio_test_highmem(folio) &&
+ if (folio_test_partial_kmap(folio) &&
chunk > PAGE_SIZE - offset_in_page(offset))
chunk = PAGE_SIZE - offset_in_page(offset);
memcpy(to, from, chunk);
@@ -501,7 +501,7 @@ static inline size_t memcpy_from_file_folio(char *to, struct folio *folio,
size_t offset = offset_in_folio(folio, pos);
char *from = kmap_local_folio(folio, offset);
- if (folio_test_highmem(folio)) {
+ if (folio_test_partial_kmap(folio)) {
offset = offset_in_page(offset);
len = min_t(size_t, len, PAGE_SIZE - offset);
} else
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 8f77bb0f4ae0..05f8b7d7d1e9 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -237,6 +237,7 @@ struct hrtimer_cpu_base {
ktime_t softirq_expires_next;
struct hrtimer *softirq_next_timer;
struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES];
+ call_single_data_t csd;
} ____cacheline_aligned;
static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time)
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index af8a771a053c..d79851c5fabd 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -199,6 +199,7 @@ struct inet6_cork {
struct ipv6_txoptions *opt;
u8 hop_limit;
u8 tclass;
+ u8 dontfrag:1;
};
/* struct ipv6_pinfo - ipv6 private area */
diff --git a/include/linux/lzo.h b/include/linux/lzo.h
index e95c7d1092b2..4d30e3624acd 100644
--- a/include/linux/lzo.h
+++ b/include/linux/lzo.h
@@ -24,10 +24,18 @@
int lzo1x_1_compress(const unsigned char *src, size_t src_len,
unsigned char *dst, size_t *dst_len, void *wrkmem);
+/* Same as above but does not write more than dst_len to dst. */
+int lzo1x_1_compress_safe(const unsigned char *src, size_t src_len,
+ unsigned char *dst, size_t *dst_len, void *wrkmem);
+
/* This requires 'wrkmem' of size LZO1X_1_MEM_COMPRESS */
int lzorle1x_1_compress(const unsigned char *src, size_t src_len,
unsigned char *dst, size_t *dst_len, void *wrkmem);
+/* Same as above but does not write more than dst_len to dst. */
+int lzorle1x_1_compress_safe(const unsigned char *src, size_t src_len,
+ unsigned char *dst, size_t *dst_len, void *wrkmem);
+
/* safe decompression with overrun testing */
int lzo1x_decompress_safe(const unsigned char *src, size_t src_len,
unsigned char *dst, size_t *dst_len);
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h
index 27f42f713c89..86f0f2a25a3d 100644
--- a/include/linux/mlx4/device.h
+++ b/include/linux/mlx4/device.h
@@ -1135,7 +1135,7 @@ int mlx4_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt,
int mlx4_buf_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt,
struct mlx4_buf *buf);
-int mlx4_db_alloc(struct mlx4_dev *dev, struct mlx4_db *db, int order);
+int mlx4_db_alloc(struct mlx4_dev *dev, struct mlx4_db *db, unsigned int order);
void mlx4_db_free(struct mlx4_dev *dev, struct mlx4_db *db);
int mlx4_alloc_hwq_res(struct mlx4_dev *dev, struct mlx4_hwq_resources *wqres,
diff --git a/include/linux/mlx5/fs.h b/include/linux/mlx5/fs.h
index 3fb428ce7d1c..b6b9a4dfa4fb 100644
--- a/include/linux/mlx5/fs.h
+++ b/include/linux/mlx5/fs.h
@@ -40,6 +40,8 @@
#define MLX5_SET_CFG(p, f, v) MLX5_SET(create_flow_group_in, p, f, v)
+#define MLX5_FS_MAX_POOL_SIZE BIT(30)
+
enum mlx5_flow_destination_type {
MLX5_FLOW_DESTINATION_TYPE_NONE,
MLX5_FLOW_DESTINATION_TYPE_VPORT,
diff --git a/include/linux/msi.h b/include/linux/msi.h
index ddace8c34dcf..2cf15cf5d060 100644
--- a/include/linux/msi.h
+++ b/include/linux/msi.h
@@ -171,6 +171,10 @@ struct msi_desc_data {
* @dev: Pointer to the device which uses this descriptor
* @msg: The last set MSI message cached for reuse
* @affinity: Optional pointer to a cpu affinity mask for this descriptor
+ * @iommu_msi_iova: Optional shifted IOVA from the IOMMU to override the msi_addr.
+ * Only used if iommu_msi_shift != 0
+ * @iommu_msi_shift: Indicates how many bits of the original address should be
+ * preserved when using iommu_msi_iova.
* @sysfs_attr: Pointer to sysfs device attribute
*
* @write_msi_msg: Callback that may be called when the MSI message
@@ -189,7 +193,8 @@ struct msi_desc {
struct msi_msg msg;
struct irq_affinity_desc *affinity;
#ifdef CONFIG_IRQ_MSI_IOMMU
- const void *iommu_cookie;
+ u64 iommu_msi_iova : 58;
+ u64 iommu_msi_shift : 6;
#endif
#ifdef CONFIG_SYSFS
struct device_attribute *sysfs_attrs;
@@ -306,28 +311,14 @@ struct msi_desc *msi_next_desc(struct device *dev, unsigned int domid,
#define msi_desc_to_dev(desc) ((desc)->dev)
-#ifdef CONFIG_IRQ_MSI_IOMMU
-static inline const void *msi_desc_get_iommu_cookie(struct msi_desc *desc)
-{
- return desc->iommu_cookie;
-}
-
-static inline void msi_desc_set_iommu_cookie(struct msi_desc *desc,
- const void *iommu_cookie)
-{
- desc->iommu_cookie = iommu_cookie;
-}
-#else
-static inline const void *msi_desc_get_iommu_cookie(struct msi_desc *desc)
+static inline void msi_desc_set_iommu_msi_iova(struct msi_desc *desc, u64 msi_iova,
+ unsigned int msi_shift)
{
- return NULL;
-}
-
-static inline void msi_desc_set_iommu_cookie(struct msi_desc *desc,
- const void *iommu_cookie)
-{
-}
+#ifdef CONFIG_IRQ_MSI_IOMMU
+ desc->iommu_msi_iova = msi_iova >> msi_shift;
+ desc->iommu_msi_shift = msi_shift;
#endif
+}
int msi_domain_insert_msi_desc(struct device *dev, unsigned int domid,
struct msi_desc *init_desc);
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h
index 86d96e00c2e3..374b1b208bd8 100644
--- a/include/linux/nfs_fs_sb.h
+++ b/include/linux/nfs_fs_sb.h
@@ -199,6 +199,15 @@ struct nfs_server {
char *fscache_uniq; /* Uniquifier (or NULL) */
#endif
+ /* The following #defines numerically match the NFSv4 equivalents */
+#define NFS_FH_NOEXPIRE_WITH_OPEN (0x1)
+#define NFS_FH_VOLATILE_ANY (0x2)
+#define NFS_FH_VOL_MIGRATION (0x4)
+#define NFS_FH_VOL_RENAME (0x8)
+#define NFS_FH_RENAME_UNSAFE (NFS_FH_VOLATILE_ANY | NFS_FH_VOL_RENAME)
+ u32 fh_expire_type; /* V4 bitmask representing file
+ handle volatility type for
+ this filesystem */
u32 pnfs_blksize; /* layout_blksize attr */
#if IS_ENABLED(CONFIG_NFS_V4)
u32 attr_bitmask[3];/* V4 bitmask representing the set
@@ -222,9 +231,6 @@ struct nfs_server {
u32 acl_bitmask; /* V4 bitmask representing the ACEs
that are supported on this
filesystem */
- u32 fh_expire_type; /* V4 bitmask representing file
- handle volatility type for
- this filesystem */
struct pnfs_layoutdriver_type *pnfs_curr_ld; /* Active layout driver */
struct rpc_wait_queue roc_rpcwaitq;
void *pnfs_ld_data; /* per mount point data */
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index a77f3a7d21d1..36d0961f1672 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -551,6 +551,13 @@ PAGEFLAG(Readahead, readahead, PF_NO_COMPOUND)
PAGEFLAG_FALSE(HighMem, highmem)
#endif
+/* Does kmap_local_folio() only allow access to one page of the folio? */
+#ifdef CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP
+#define folio_test_partial_kmap(f) true
+#else
+#define folio_test_partial_kmap(f) folio_test_highmem(f)
+#endif
+
#ifdef CONFIG_SWAP
static __always_inline bool folio_test_swapcache(struct folio *folio)
{
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index fcb834dd75c2..90c782749b05 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -1016,7 +1016,13 @@ struct perf_output_handle {
struct perf_buffer *rb;
unsigned long wakeup;
unsigned long size;
- u64 aux_flags;
+ union {
+ u64 flags; /* perf_output*() */
+ u64 aux_flags; /* perf_aux_output*() */
+ struct {
+ u64 skip_read : 1;
+ };
+ };
union {
void *addr;
unsigned long head;
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index 72da69cc5764..27531a0b3a6e 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -97,9 +97,9 @@ static inline void __rcu_read_lock(void)
static inline void __rcu_read_unlock(void)
{
- preempt_enable();
if (IS_ENABLED(CONFIG_RCU_STRICT_GRACE_PERIOD))
rcu_read_unlock_strict();
+ preempt_enable();
}
static inline int rcu_preempt_depth(void)
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h
index 126f6b418f6a..559f758bf2ea 100644
--- a/include/linux/rcutree.h
+++ b/include/linux/rcutree.h
@@ -104,7 +104,7 @@ extern int rcu_scheduler_active;
void rcu_end_inkernel_boot(void);
bool rcu_inkernel_boot_has_ended(void);
bool rcu_is_watching(void);
-#ifndef CONFIG_PREEMPTION
+#ifndef CONFIG_PREEMPT_RCU
void rcu_all_qs(void);
#endif
diff --git a/include/linux/trace.h b/include/linux/trace.h
index fdcd76b7be83..7eaad857dee0 100644
--- a/include/linux/trace.h
+++ b/include/linux/trace.h
@@ -72,8 +72,8 @@ static inline int unregister_ftrace_export(struct trace_export *export)
static inline void trace_printk_init_buffers(void)
{
}
-static inline int trace_array_printk(struct trace_array *tr, unsigned long ip,
- const char *fmt, ...)
+static inline __printf(3, 4)
+int trace_array_printk(struct trace_array *tr, unsigned long ip, const char *fmt, ...)
{
return 0;
}
diff --git a/include/linux/trace_seq.h b/include/linux/trace_seq.h
index 3691e0e76a1a..62147eecf931 100644
--- a/include/linux/trace_seq.h
+++ b/include/linux/trace_seq.h
@@ -79,8 +79,8 @@ extern __printf(2, 3)
void trace_seq_printf(struct trace_seq *s, const char *fmt, ...);
extern __printf(2, 0)
void trace_seq_vprintf(struct trace_seq *s, const char *fmt, va_list args);
-extern void
-trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary);
+extern __printf(2, 0)
+void trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary);
extern int trace_print_seq(struct seq_file *m, struct trace_seq *s);
extern int trace_seq_to_user(struct trace_seq *s, char __user *ubuf,
int cnt);
@@ -104,8 +104,8 @@ static inline __printf(2, 3)
void trace_seq_printf(struct trace_seq *s, const char *fmt, ...)
{
}
-static inline void
-trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary)
+static inline __printf(2, 0)
+void trace_seq_bprintf(struct trace_seq *s, const char *fmt, const u32 *binary)
{
}
diff --git a/include/linux/usb/r8152.h b/include/linux/usb/r8152.h
index 33a4c146dc19..2ca60828f28b 100644
--- a/include/linux/usb/r8152.h
+++ b/include/linux/usb/r8152.h
@@ -30,6 +30,7 @@
#define VENDOR_ID_NVIDIA 0x0955
#define VENDOR_ID_TPLINK 0x2357
#define VENDOR_ID_DLINK 0x2001
+#define VENDOR_ID_DELL 0x413c
#define VENDOR_ID_ASUS 0x0b05
#if IS_REACHABLE(CONFIG_USB_RTL8152)
diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index b4fcd0164048..0740dfc6c048 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -822,7 +822,9 @@ struct v4l2_subdev_state {
* possible configuration from the remote end, likely calling
* this operation as close as possible to stream on time. The
* operation shall fail if the pad index it has been called on
- * is not valid or in case of unrecoverable failures.
+ * is not valid or in case of unrecoverable failures. The
+ * config argument has been memset to 0 just before calling
+ * the op.
*
* @set_routing: enable or disable data connection routes described in the
* subdevice routing table.
diff --git a/include/net/af_unix.h b/include/net/af_unix.h
index 77bf30203d3c..b6eedf7650da 100644
--- a/include/net/af_unix.h
+++ b/include/net/af_unix.h
@@ -8,21 +8,46 @@
#include <linux/refcount.h>
#include <net/sock.h>
-void unix_inflight(struct user_struct *user, struct file *fp);
-void unix_notinflight(struct user_struct *user, struct file *fp);
-void unix_destruct_scm(struct sk_buff *skb);
-void io_uring_destruct_scm(struct sk_buff *skb);
+#if IS_ENABLED(CONFIG_UNIX)
+struct unix_sock *unix_get_socket(struct file *filp);
+#else
+static inline struct unix_sock *unix_get_socket(struct file *filp)
+{
+ return NULL;
+}
+#endif
+
+extern unsigned int unix_tot_inflight;
+void unix_add_edges(struct scm_fp_list *fpl, struct unix_sock *receiver);
+void unix_del_edges(struct scm_fp_list *fpl);
+void unix_update_edges(struct unix_sock *receiver);
+int unix_prepare_fpl(struct scm_fp_list *fpl);
+void unix_destroy_fpl(struct scm_fp_list *fpl);
void unix_gc(void);
-void wait_for_unix_gc(void);
-struct sock *unix_get_socket(struct file *filp);
+void wait_for_unix_gc(struct scm_fp_list *fpl);
+
+struct unix_vertex {
+ struct list_head edges;
+ struct list_head entry;
+ struct list_head scc_entry;
+ unsigned long out_degree;
+ unsigned long index;
+ unsigned long scc_index;
+};
+
+struct unix_edge {
+ struct unix_sock *predecessor;
+ struct unix_sock *successor;
+ struct list_head vertex_entry;
+ struct list_head stack_entry;
+};
+
struct sock *unix_peer_get(struct sock *sk);
#define UNIX_HASH_MOD (256 - 1)
#define UNIX_HASH_SIZE (256 * 2)
#define UNIX_HASH_BITS 8
-extern unsigned int unix_tot_inflight;
-
struct unix_address {
refcount_t refcnt;
int len;
@@ -42,6 +67,7 @@ struct unix_skb_parms {
struct scm_stat {
atomic_t nr_fds;
+ unsigned long nr_unix_fds;
};
#define UNIXCB(skb) (*(struct unix_skb_parms *)&((skb)->cb))
@@ -54,12 +80,9 @@ struct unix_sock {
struct path path;
struct mutex iolock, bindlock;
struct sock *peer;
- struct list_head link;
- unsigned long inflight;
+ struct sock *listener;
+ struct unix_vertex *vertex;
spinlock_t lock;
- unsigned long gc_flags;
-#define UNIX_GC_CANDIDATE 0
-#define UNIX_GC_MAYBE_CYCLE 1
struct socket_wq peer_wq;
wait_queue_entry_t peer_wake;
struct scm_stat scm_stat;
diff --git a/include/net/scm.h b/include/net/scm.h
index e8c76b4be2fe..059e287745dc 100644
--- a/include/net/scm.h
+++ b/include/net/scm.h
@@ -22,9 +22,20 @@ struct scm_creds {
kgid_t gid;
};
+#ifdef CONFIG_UNIX
+struct unix_edge;
+#endif
+
struct scm_fp_list {
short count;
+ short count_unix;
short max;
+#ifdef CONFIG_UNIX
+ bool inflight;
+ bool dead;
+ struct list_head vertices;
+ struct unix_edge *edges;
+#endif
struct user_struct *user;
struct file *fp[SCM_MAX_FD];
};
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index b33d27e42cff..fd550c0b5634 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -228,7 +228,6 @@ struct xfrm_state {
/* Data for encapsulator */
struct xfrm_encap_tmpl *encap;
- struct sock __rcu *encap_sk;
/* Data for care-of address */
xfrm_address_t *coaddr;
diff --git a/include/rdma/uverbs_std_types.h b/include/rdma/uverbs_std_types.h
index fe0512116958..555ea3d142a4 100644
--- a/include/rdma/uverbs_std_types.h
+++ b/include/rdma/uverbs_std_types.h
@@ -34,7 +34,7 @@
static inline void *_uobj_get_obj_read(struct ib_uobject *uobj)
{
if (IS_ERR(uobj))
- return NULL;
+ return ERR_CAST(uobj);
return uobj->object;
}
#define uobj_get_obj_read(_object, _type, _id, _attrs) \
diff --git a/include/sound/hda_codec.h b/include/sound/hda_codec.h
index 5497dc9c396a..b58dc869cf77 100644
--- a/include/sound/hda_codec.h
+++ b/include/sound/hda_codec.h
@@ -196,6 +196,7 @@ struct hda_codec {
/* beep device */
struct hda_beep *beep;
unsigned int beep_mode;
+ bool beep_just_power_on;
/* widget capabilities cache */
u32 *wcaps;
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index 2a815373dac1..ed4449cbdf80 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -1427,6 +1427,8 @@ int snd_pcm_lib_mmap_iomem(struct snd_pcm_substream *substream, struct vm_area_s
#define snd_pcm_lib_mmap_iomem NULL
#endif
+void snd_pcm_runtime_buffer_set_silence(struct snd_pcm_runtime *runtime);
+
/**
* snd_pcm_limit_isa_dma_size - Get the max size fitting with ISA DMA transfer
* @dma: DMA number
diff --git a/include/trace/events/btrfs.h b/include/trace/events/btrfs.h
index 3c4d5ef6d446..8ea1674069fe 100644
--- a/include/trace/events/btrfs.h
+++ b/include/trace/events/btrfs.h
@@ -1956,7 +1956,7 @@ DECLARE_EVENT_CLASS(btrfs__prelim_ref,
TP_PROTO(const struct btrfs_fs_info *fs_info,
const struct prelim_ref *oldref,
const struct prelim_ref *newref, u64 tree_size),
- TP_ARGS(fs_info, newref, oldref, tree_size),
+ TP_ARGS(fs_info, oldref, newref, tree_size),
TP_STRUCT__entry_btrfs(
__field( u64, root_id )
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index 431bc700bcfb..c7f904a72af2 100644
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@ -1140,6 +1140,7 @@ enum bpf_perf_event_type {
#define BPF_F_BEFORE (1U << 3)
#define BPF_F_AFTER (1U << 4)
#define BPF_F_ID (1U << 5)
+#define BPF_F_PREORDER (1U << 6)
#define BPF_F_LINK BPF_F_LINK /* 1 << 13 */
/* If BPF_F_STRICT_ALIGNMENT is used in BPF_PROG_LOAD command, the
diff --git a/include/uapi/linux/idxd.h b/include/uapi/linux/idxd.h
index 606b52e88ce3..3d1987e1bb2d 100644
--- a/include/uapi/linux/idxd.h
+++ b/include/uapi/linux/idxd.h
@@ -31,6 +31,7 @@ enum idxd_scmd_stat {
IDXD_SCMD_WQ_IRQ_ERR = 0x80100000,
IDXD_SCMD_WQ_USER_NO_IOMMU = 0x80110000,
IDXD_SCMD_DEV_EVL_ERR = 0x80120000,
+ IDXD_SCMD_WQ_NO_DRV_NAME = 0x80200000,
};
#define IDXD_SCMD_SOFTERR_MASK 0x80000000
diff --git a/include/ufs/ufs_quirks.h b/include/ufs/ufs_quirks.h
index 41ff44dfa1db..f52de5ed1b3b 100644
--- a/include/ufs/ufs_quirks.h
+++ b/include/ufs/ufs_quirks.h
@@ -107,4 +107,10 @@ struct ufs_dev_quirk {
*/
#define UFS_DEVICE_QUIRK_DELAY_AFTER_LPM (1 << 11)
+/*
+ * Some ufs devices may need more time to be in hibern8 before exiting.
+ * Enable this quirk to give it an additional 100us.
+ */
+#define UFS_DEVICE_QUIRK_PA_HIBER8TIME (1 << 12)
+
#endif /* UFS_QUIRKS_H_ */
diff --git a/io_uring/fdinfo.c b/io_uring/fdinfo.c
index 976e9500f651..a26cf840e623 100644
--- a/io_uring/fdinfo.c
+++ b/io_uring/fdinfo.c
@@ -81,11 +81,11 @@ __cold void io_uring_show_fdinfo(struct seq_file *m, struct file *f)
seq_printf(m, "SqMask:\t0x%x\n", sq_mask);
seq_printf(m, "SqHead:\t%u\n", sq_head);
seq_printf(m, "SqTail:\t%u\n", sq_tail);
- seq_printf(m, "CachedSqHead:\t%u\n", ctx->cached_sq_head);
+ seq_printf(m, "CachedSqHead:\t%u\n", data_race(ctx->cached_sq_head));
seq_printf(m, "CqMask:\t0x%x\n", cq_mask);
seq_printf(m, "CqHead:\t%u\n", cq_head);
seq_printf(m, "CqTail:\t%u\n", cq_tail);
- seq_printf(m, "CachedCqTail:\t%u\n", ctx->cached_cq_tail);
+ seq_printf(m, "CachedCqTail:\t%u\n", data_race(ctx->cached_cq_tail));
seq_printf(m, "SQEs:\t%u\n", sq_tail - sq_head);
sq_entries = min(sq_tail - sq_head, ctx->sq_entries);
for (i = 0; i < sq_entries; i++) {
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index db592fa549b7..43b46098279a 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -701,6 +701,7 @@ static void __io_cqring_overflow_flush(struct io_ring_ctx *ctx)
* to care for a non-real case.
*/
if (need_resched()) {
+ ctx->cqe_sentinel = ctx->cqe_cached;
io_cq_unlock_post(ctx);
mutex_unlock(&ctx->uring_lock);
cond_resched();
diff --git a/kernel/bpf/cgroup.c b/kernel/bpf/cgroup.c
index cf2eb0895d40..684fb450ad08 100644
--- a/kernel/bpf/cgroup.c
+++ b/kernel/bpf/cgroup.c
@@ -369,7 +369,7 @@ static struct bpf_prog *prog_list_prog(struct bpf_prog_list *pl)
/* count number of elements in the list.
* it's slow but the list cannot be long
*/
-static u32 prog_list_length(struct hlist_head *head)
+static u32 prog_list_length(struct hlist_head *head, int *preorder_cnt)
{
struct bpf_prog_list *pl;
u32 cnt = 0;
@@ -377,6 +377,8 @@ static u32 prog_list_length(struct hlist_head *head)
hlist_for_each_entry(pl, head, node) {
if (!prog_list_prog(pl))
continue;
+ if (preorder_cnt && (pl->flags & BPF_F_PREORDER))
+ (*preorder_cnt)++;
cnt++;
}
return cnt;
@@ -400,7 +402,7 @@ static bool hierarchy_allows_attach(struct cgroup *cgrp,
if (flags & BPF_F_ALLOW_MULTI)
return true;
- cnt = prog_list_length(&p->bpf.progs[atype]);
+ cnt = prog_list_length(&p->bpf.progs[atype], NULL);
WARN_ON_ONCE(cnt > 1);
if (cnt == 1)
return !!(flags & BPF_F_ALLOW_OVERRIDE);
@@ -423,12 +425,12 @@ static int compute_effective_progs(struct cgroup *cgrp,
struct bpf_prog_array *progs;
struct bpf_prog_list *pl;
struct cgroup *p = cgrp;
- int cnt = 0;
+ int i, j, cnt = 0, preorder_cnt = 0, fstart, bstart, init_bstart;
/* count number of effective programs by walking parents */
do {
if (cnt == 0 || (p->bpf.flags[atype] & BPF_F_ALLOW_MULTI))
- cnt += prog_list_length(&p->bpf.progs[atype]);
+ cnt += prog_list_length(&p->bpf.progs[atype], &preorder_cnt);
p = cgroup_parent(p);
} while (p);
@@ -439,20 +441,34 @@ static int compute_effective_progs(struct cgroup *cgrp,
/* populate the array with effective progs */
cnt = 0;
p = cgrp;
+ fstart = preorder_cnt;
+ bstart = preorder_cnt - 1;
do {
if (cnt > 0 && !(p->bpf.flags[atype] & BPF_F_ALLOW_MULTI))
continue;
+ init_bstart = bstart;
hlist_for_each_entry(pl, &p->bpf.progs[atype], node) {
if (!prog_list_prog(pl))
continue;
- item = &progs->items[cnt];
+ if (pl->flags & BPF_F_PREORDER) {
+ item = &progs->items[bstart];
+ bstart--;
+ } else {
+ item = &progs->items[fstart];
+ fstart++;
+ }
item->prog = prog_list_prog(pl);
bpf_cgroup_storages_assign(item->cgroup_storage,
pl->storage);
cnt++;
}
+
+ /* reverse pre-ordering progs at this cgroup level */
+ for (i = bstart + 1, j = init_bstart; i < j; i++, j--)
+ swap(progs->items[i], progs->items[j]);
+
} while ((p = cgroup_parent(p)));
*array = progs;
@@ -663,7 +679,7 @@ static int __cgroup_bpf_attach(struct cgroup *cgrp,
*/
return -EPERM;
- if (prog_list_length(progs) >= BPF_CGROUP_MAX_PROGS)
+ if (prog_list_length(progs, NULL) >= BPF_CGROUP_MAX_PROGS)
return -E2BIG;
pl = find_attach_entry(progs, prog, link, replace_prog,
@@ -698,6 +714,7 @@ static int __cgroup_bpf_attach(struct cgroup *cgrp,
pl->prog = prog;
pl->link = link;
+ pl->flags = flags;
bpf_cgroup_storages_assign(pl->storage, storage);
cgrp->bpf.flags[atype] = saved_flags;
@@ -1073,7 +1090,7 @@ static int __cgroup_bpf_query(struct cgroup *cgrp, const union bpf_attr *attr,
lockdep_is_held(&cgroup_mutex));
total_cnt += bpf_prog_array_length(effective);
} else {
- total_cnt += prog_list_length(&cgrp->bpf.progs[atype]);
+ total_cnt += prog_list_length(&cgrp->bpf.progs[atype], NULL);
}
}
@@ -1105,7 +1122,7 @@ static int __cgroup_bpf_query(struct cgroup *cgrp, const union bpf_attr *attr,
u32 id;
progs = &cgrp->bpf.progs[atype];
- cnt = min_t(int, prog_list_length(progs), total_cnt);
+ cnt = min_t(int, prog_list_length(progs, NULL), total_cnt);
i = 0;
hlist_for_each_entry(pl, progs, node) {
prog = prog_list_prog(pl);
diff --git a/kernel/bpf/hashtab.c b/kernel/bpf/hashtab.c
index fc34f72702cc..8a3eadf17f78 100644
--- a/kernel/bpf/hashtab.c
+++ b/kernel/bpf/hashtab.c
@@ -2212,7 +2212,7 @@ static long bpf_for_each_hash_elem(struct bpf_map *map, bpf_callback_t callback_
b = &htab->buckets[i];
rcu_read_lock();
head = &b->head;
- hlist_nulls_for_each_entry_rcu(elem, n, head, hash_node) {
+ hlist_nulls_for_each_entry_safe(elem, n, head, hash_node) {
key = elem->key;
if (is_percpu) {
/* current cpu value for percpu map */
diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c
index f089a6163011..b66349f892f2 100644
--- a/kernel/bpf/syscall.c
+++ b/kernel/bpf/syscall.c
@@ -3900,7 +3900,8 @@ static int bpf_prog_attach_check_attach_type(const struct bpf_prog *prog,
#define BPF_F_ATTACH_MASK_BASE \
(BPF_F_ALLOW_OVERRIDE | \
BPF_F_ALLOW_MULTI | \
- BPF_F_REPLACE)
+ BPF_F_REPLACE | \
+ BPF_F_PREORDER)
#define BPF_F_ATTACH_MASK_MPROG \
(BPF_F_REPLACE | \
@@ -4442,6 +4443,8 @@ static int bpf_prog_get_info_by_fd(struct file *file,
info.recursion_misses = stats.misses;
info.verified_insns = prog->aux->verified_insns;
+ if (prog->aux->btf)
+ info.btf_id = btf_obj_id(prog->aux->btf);
if (!bpf_capable()) {
info.jited_prog_len = 0;
@@ -4588,8 +4591,6 @@ static int bpf_prog_get_info_by_fd(struct file *file,
}
}
- if (prog->aux->btf)
- info.btf_id = btf_obj_id(prog->aux->btf);
info.attach_btf_id = prog->aux->attach_btf_id;
if (attach_btf)
info.attach_btf_obj_id = btf_obj_id(attach_btf);
diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c
index 756e179a1efe..1f9ae600e445 100644
--- a/kernel/bpf/verifier.c
+++ b/kernel/bpf/verifier.c
@@ -16014,12 +16014,16 @@ static void clean_verifier_state(struct bpf_verifier_env *env,
static void clean_live_states(struct bpf_verifier_env *env, int insn,
struct bpf_verifier_state *cur)
{
+ struct bpf_verifier_state *loop_entry;
struct bpf_verifier_state_list *sl;
sl = *explored_state(env, insn);
while (sl) {
if (sl->state.branches)
goto next;
+ loop_entry = get_loop_entry(&sl->state);
+ if (loop_entry && loop_entry->branches)
+ goto next;
if (sl->state.insn_idx != insn ||
!same_callsites(&sl->state, cur))
goto next;
diff --git a/kernel/cgroup/cgroup.c b/kernel/cgroup/cgroup.c
index 3ccf80dfa587..e8ef062f6ca0 100644
--- a/kernel/cgroup/cgroup.c
+++ b/kernel/cgroup/cgroup.c
@@ -90,7 +90,7 @@
DEFINE_MUTEX(cgroup_mutex);
DEFINE_SPINLOCK(css_set_lock);
-#ifdef CONFIG_PROVE_RCU
+#if (defined CONFIG_PROVE_RCU || defined CONFIG_LOCKDEP)
EXPORT_SYMBOL_GPL(cgroup_mutex);
EXPORT_SYMBOL_GPL(css_set_lock);
#endif
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 987807b1040a..5dd6424e62fa 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -1163,6 +1163,12 @@ static void perf_assert_pmu_disabled(struct pmu *pmu)
WARN_ON_ONCE(*this_cpu_ptr(pmu->pmu_disable_count) == 0);
}
+static inline void perf_pmu_read(struct perf_event *event)
+{
+ if (event->state == PERF_EVENT_STATE_ACTIVE)
+ event->pmu->read(event);
+}
+
static void get_ctx(struct perf_event_context *ctx)
{
refcount_inc(&ctx->refcount);
@@ -3397,8 +3403,7 @@ static void __perf_event_sync_stat(struct perf_event *event,
* we know the event must be on the current CPU, therefore we
* don't need to use it.
*/
- if (event->state == PERF_EVENT_STATE_ACTIVE)
- event->pmu->read(event);
+ perf_pmu_read(event);
perf_event_update_time(event);
@@ -4524,15 +4529,8 @@ static void __perf_event_read(void *info)
pmu->read(event);
- for_each_sibling_event(sub, event) {
- if (sub->state == PERF_EVENT_STATE_ACTIVE) {
- /*
- * Use sibling's PMU rather than @event's since
- * sibling could be on different (eg: software) PMU.
- */
- sub->pmu->read(sub);
- }
- }
+ for_each_sibling_event(sub, event)
+ perf_pmu_read(sub);
data->ret = pmu->commit_txn(pmu);
@@ -7297,9 +7295,8 @@ static void perf_output_read_group(struct perf_output_handle *handle,
if (read_format & PERF_FORMAT_TOTAL_TIME_RUNNING)
values[n++] = running;
- if ((leader != event) &&
- (leader->state == PERF_EVENT_STATE_ACTIVE))
- leader->pmu->read(leader);
+ if ((leader != event) && !handle->skip_read)
+ perf_pmu_read(leader);
values[n++] = perf_event_count(leader);
if (read_format & PERF_FORMAT_ID)
@@ -7312,9 +7309,8 @@ static void perf_output_read_group(struct perf_output_handle *handle,
for_each_sibling_event(sub, leader) {
n = 0;
- if ((sub != event) &&
- (sub->state == PERF_EVENT_STATE_ACTIVE))
- sub->pmu->read(sub);
+ if ((sub != event) && !handle->skip_read)
+ perf_pmu_read(sub);
values[n++] = perf_event_count(sub);
if (read_format & PERF_FORMAT_ID)
@@ -7369,6 +7365,9 @@ void perf_output_sample(struct perf_output_handle *handle,
{
u64 sample_type = data->type;
+ if (data->sample_flags & PERF_SAMPLE_READ)
+ handle->skip_read = 1;
+
perf_output_put(handle, *header);
if (sample_type & PERF_SAMPLE_IDENTIFIER)
diff --git a/kernel/events/hw_breakpoint.c b/kernel/events/hw_breakpoint.c
index 6c2cb4e4f48d..8f3f624419aa 100644
--- a/kernel/events/hw_breakpoint.c
+++ b/kernel/events/hw_breakpoint.c
@@ -950,9 +950,10 @@ static int hw_breakpoint_event_init(struct perf_event *bp)
return -ENOENT;
/*
- * no branch sampling for breakpoint events
+ * Check if breakpoint type is supported before proceeding.
+ * Also, no branch sampling for breakpoint events.
*/
- if (has_branch_stack(bp))
+ if (!hw_breakpoint_slots_cached(find_slot_idx(bp->attr.bp_type)) || has_branch_stack(bp))
return -EOPNOTSUPP;
err = register_perf_hw_breakpoint(bp);
diff --git a/kernel/events/ring_buffer.c b/kernel/events/ring_buffer.c
index 52de76ef8723..dc1193b779c0 100644
--- a/kernel/events/ring_buffer.c
+++ b/kernel/events/ring_buffer.c
@@ -181,6 +181,7 @@ __perf_output_begin(struct perf_output_handle *handle,
handle->rb = rb;
handle->event = event;
+ handle->flags = 0;
have_lost = local_read(&rb->lost);
if (unlikely(have_lost)) {
diff --git a/kernel/fork.c b/kernel/fork.c
index 97f433fb4b5e..7966c9a1c163 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -518,10 +518,6 @@ struct vm_area_struct *vm_area_dup(struct vm_area_struct *orig)
vma_numab_state_init(new);
dup_anon_vma_name(orig, new);
- /* track_pfn_copy() will later take care of copying internal state. */
- if (unlikely(new->vm_flags & VM_PFNMAP))
- untrack_pfn_clear(new);
-
return new;
}
@@ -715,6 +711,11 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm,
tmp = vm_area_dup(mpnt);
if (!tmp)
goto fail_nomem;
+
+ /* track_pfn_copy() will later take care of copying internal state. */
+ if (unlikely(tmp->vm_flags & VM_PFNMAP))
+ untrack_pfn_clear(tmp);
+
retval = vma_dup_policy(mpnt, tmp);
if (retval)
goto fail_nomem_policy;
diff --git a/kernel/padata.c b/kernel/padata.c
index 071d8cad8078..93cd7704ab63 100644
--- a/kernel/padata.c
+++ b/kernel/padata.c
@@ -358,7 +358,8 @@ static void padata_reorder(struct parallel_data *pd)
* To avoid UAF issue, add pd ref here, and put pd ref after reorder_work finish.
*/
padata_get_pd(pd);
- queue_work(pinst->serial_wq, &pd->reorder_work);
+ if (!queue_work(pinst->serial_wq, &pd->reorder_work))
+ padata_put_pd(pd);
}
}
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index dcdf449615bd..51c43e0f9b29 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -3119,7 +3119,12 @@ void console_unblank(void)
*/
cookie = console_srcu_read_lock();
for_each_console_srcu(c) {
- if ((console_srcu_read_flags(c) & CON_ENABLED) && c->unblank) {
+ short flags = console_srcu_read_flags(c);
+
+ if (flags & CON_SUSPENDED)
+ continue;
+
+ if ((flags & CON_ENABLED) && c->unblank) {
found_unblank = true;
break;
}
@@ -3156,7 +3161,12 @@ void console_unblank(void)
cookie = console_srcu_read_lock();
for_each_console_srcu(c) {
- if ((console_srcu_read_flags(c) & CON_ENABLED) && c->unblank)
+ short flags = console_srcu_read_flags(c);
+
+ if (flags & CON_SUSPENDED)
+ continue;
+
+ if ((flags & CON_ENABLED) && c->unblank)
c->unblank();
}
console_srcu_read_unlock(cookie);
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index 41021080ad25..94b715139f52 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -821,8 +821,17 @@ void rcu_read_unlock_strict(void)
{
struct rcu_data *rdp;
- if (irqs_disabled() || preempt_count() || !rcu_state.gp_kthread)
+ if (irqs_disabled() || in_atomic_preempt_off() || !rcu_state.gp_kthread)
return;
+
+ /*
+ * rcu_report_qs_rdp() can only be invoked with a stable rdp and
+ * from the local CPU.
+ *
+ * The in_atomic_preempt_off() check ensures that we come here holding
+ * the last preempt_count (which will get dropped once we return to
+ * __rcu_read_unlock().
+ */
rdp = this_cpu_ptr(&rcu_data);
rdp->cpu_no_qs.b.norm = false;
rcu_report_qs_rdp(rdp);
@@ -963,13 +972,16 @@ static void rcu_preempt_check_blocked_tasks(struct rcu_node *rnp)
*/
static void rcu_flavor_sched_clock_irq(int user)
{
- if (user || rcu_is_cpu_rrupt_from_idle()) {
+ if (user || rcu_is_cpu_rrupt_from_idle() ||
+ (IS_ENABLED(CONFIG_PREEMPT_COUNT) &&
+ (preempt_count() == HARDIRQ_OFFSET))) {
/*
* Get here if this CPU took its interrupt from user
- * mode or from the idle loop, and if this is not a
- * nested interrupt. In this case, the CPU is in
- * a quiescent state, so note it.
+ * mode, from the idle loop without this being a nested
+ * interrupt, or while not holding the task preempt count
+ * (with PREEMPT_COUNT=y). In this case, the CPU is in a
+ * quiescent state, so note it.
*
* No memory barrier is required here because rcu_qs()
* references only CPU-local variables that other CPUs
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 268e2a49b964..6ce3028e6e85 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -73,10 +73,10 @@ unsigned int sysctl_sched_tunable_scaling = SCHED_TUNABLESCALING_LOG;
/*
* Minimal preemption granularity for CPU-bound tasks:
*
- * (default: 0.75 msec * (1 + ilog(ncpus)), units: nanoseconds)
+ * (default: 0.70 msec * (1 + ilog(ncpus)), units: nanoseconds)
*/
-unsigned int sysctl_sched_base_slice = 750000ULL;
-static unsigned int normalized_sysctl_sched_base_slice = 750000ULL;
+unsigned int sysctl_sched_base_slice = 700000ULL;
+static unsigned int normalized_sysctl_sched_base_slice = 700000ULL;
/*
* After fork, child runs first. If set to 0 (default) then
diff --git a/kernel/softirq.c b/kernel/softirq.c
index f24d80cf20bd..d9e37f3fa130 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -125,6 +125,18 @@ static DEFINE_PER_CPU(struct softirq_ctrl, softirq_ctrl) = {
.lock = INIT_LOCAL_LOCK(softirq_ctrl.lock),
};
+#ifdef CONFIG_DEBUG_LOCK_ALLOC
+static struct lock_class_key bh_lock_key;
+struct lockdep_map bh_lock_map = {
+ .name = "local_bh",
+ .key = &bh_lock_key,
+ .wait_type_outer = LD_WAIT_FREE,
+ .wait_type_inner = LD_WAIT_CONFIG, /* PREEMPT_RT makes BH preemptible. */
+ .lock_type = LD_LOCK_PERCPU,
+};
+EXPORT_SYMBOL_GPL(bh_lock_map);
+#endif
+
/**
* local_bh_blocked() - Check for idle whether BH processing is blocked
*
@@ -147,6 +159,8 @@ void __local_bh_disable_ip(unsigned long ip, unsigned int cnt)
WARN_ON_ONCE(in_hardirq());
+ lock_map_acquire_read(&bh_lock_map);
+
/* First entry of a task into a BH disabled section? */
if (!current->softirq_disable_cnt) {
if (preemptible()) {
@@ -210,6 +224,8 @@ void __local_bh_enable_ip(unsigned long ip, unsigned int cnt)
WARN_ON_ONCE(in_hardirq());
lockdep_assert_irqs_enabled();
+ lock_map_release(&bh_lock_map);
+
local_irq_save(flags);
curcnt = __this_cpu_read(softirq_ctrl.cnt);
@@ -260,6 +276,8 @@ static inline void ksoftirqd_run_begin(void)
/* Counterpart to ksoftirqd_run_begin() */
static inline void ksoftirqd_run_end(void)
{
+ /* pairs with the lock_map_acquire_read() in ksoftirqd_run_begin() */
+ lock_map_release(&bh_lock_map);
__local_bh_enable(SOFTIRQ_OFFSET, true);
WARN_ON_ONCE(in_interrupt());
local_irq_enable();
diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c
index 877535b06e73..6d9da768604d 100644
--- a/kernel/time/hrtimer.c
+++ b/kernel/time/hrtimer.c
@@ -58,6 +58,8 @@
#define HRTIMER_ACTIVE_SOFT (HRTIMER_ACTIVE_HARD << MASK_SHIFT)
#define HRTIMER_ACTIVE_ALL (HRTIMER_ACTIVE_SOFT | HRTIMER_ACTIVE_HARD)
+static void retrigger_next_event(void *arg);
+
/*
* The timer bases:
*
@@ -111,7 +113,8 @@ DEFINE_PER_CPU(struct hrtimer_cpu_base, hrtimer_bases) =
.clockid = CLOCK_TAI,
.get_time = &ktime_get_clocktai,
},
- }
+ },
+ .csd = CSD_INIT(retrigger_next_event, NULL)
};
static const int hrtimer_clock_to_base_table[MAX_CLOCKS] = {
@@ -124,6 +127,14 @@ static const int hrtimer_clock_to_base_table[MAX_CLOCKS] = {
[CLOCK_TAI] = HRTIMER_BASE_TAI,
};
+static inline bool hrtimer_base_is_online(struct hrtimer_cpu_base *base)
+{
+ if (!IS_ENABLED(CONFIG_HOTPLUG_CPU))
+ return true;
+ else
+ return likely(base->online);
+}
+
/*
* Functions and macros which are different for UP/SMP systems are kept in a
* single place
@@ -178,27 +189,54 @@ struct hrtimer_clock_base *lock_hrtimer_base(const struct hrtimer *timer,
}
/*
- * We do not migrate the timer when it is expiring before the next
- * event on the target cpu. When high resolution is enabled, we cannot
- * reprogram the target cpu hardware and we would cause it to fire
- * late. To keep it simple, we handle the high resolution enabled and
- * disabled case similar.
+ * Check if the elected target is suitable considering its next
+ * event and the hotplug state of the current CPU.
+ *
+ * If the elected target is remote and its next event is after the timer
+ * to queue, then a remote reprogram is necessary. However there is no
+ * guarantee the IPI handling the operation would arrive in time to meet
+ * the high resolution deadline. In this case the local CPU becomes a
+ * preferred target, unless it is offline.
+ *
+ * High and low resolution modes are handled the same way for simplicity.
*
* Called with cpu_base->lock of target cpu held.
*/
-static int
-hrtimer_check_target(struct hrtimer *timer, struct hrtimer_clock_base *new_base)
+static bool hrtimer_suitable_target(struct hrtimer *timer, struct hrtimer_clock_base *new_base,
+ struct hrtimer_cpu_base *new_cpu_base,
+ struct hrtimer_cpu_base *this_cpu_base)
{
ktime_t expires;
+ /*
+ * The local CPU clockevent can be reprogrammed. Also get_target_base()
+ * guarantees it is online.
+ */
+ if (new_cpu_base == this_cpu_base)
+ return true;
+
+ /*
+ * The offline local CPU can't be the default target if the
+ * next remote target event is after this timer. Keep the
+ * elected new base. An IPI will we issued to reprogram
+ * it as a last resort.
+ */
+ if (!hrtimer_base_is_online(this_cpu_base))
+ return true;
+
expires = ktime_sub(hrtimer_get_expires(timer), new_base->offset);
- return expires < new_base->cpu_base->expires_next;
+
+ return expires >= new_base->cpu_base->expires_next;
}
-static inline
-struct hrtimer_cpu_base *get_target_base(struct hrtimer_cpu_base *base,
- int pinned)
+static inline struct hrtimer_cpu_base *get_target_base(struct hrtimer_cpu_base *base, int pinned)
{
+ if (!hrtimer_base_is_online(base)) {
+ int cpu = cpumask_any_and(cpu_online_mask, housekeeping_cpumask(HK_TYPE_TIMER));
+
+ return &per_cpu(hrtimer_bases, cpu);
+ }
+
#if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ_COMMON)
if (static_branch_likely(&timers_migration_enabled) && !pinned)
return &per_cpu(hrtimer_bases, get_nohz_timer_target());
@@ -249,8 +287,8 @@ switch_hrtimer_base(struct hrtimer *timer, struct hrtimer_clock_base *base,
raw_spin_unlock(&base->cpu_base->lock);
raw_spin_lock(&new_base->cpu_base->lock);
- if (new_cpu_base != this_cpu_base &&
- hrtimer_check_target(timer, new_base)) {
+ if (!hrtimer_suitable_target(timer, new_base, new_cpu_base,
+ this_cpu_base)) {
raw_spin_unlock(&new_base->cpu_base->lock);
raw_spin_lock(&base->cpu_base->lock);
new_cpu_base = this_cpu_base;
@@ -259,8 +297,7 @@ switch_hrtimer_base(struct hrtimer *timer, struct hrtimer_clock_base *base,
}
WRITE_ONCE(timer->base, new_base);
} else {
- if (new_cpu_base != this_cpu_base &&
- hrtimer_check_target(timer, new_base)) {
+ if (!hrtimer_suitable_target(timer, new_base, new_cpu_base, this_cpu_base)) {
new_cpu_base = this_cpu_base;
goto again;
}
@@ -720,8 +757,6 @@ static inline int hrtimer_is_hres_enabled(void)
return hrtimer_hres_enabled;
}
-static void retrigger_next_event(void *arg);
-
/*
* Switch to high resolution mode
*/
@@ -1208,6 +1243,7 @@ static int __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,
u64 delta_ns, const enum hrtimer_mode mode,
struct hrtimer_clock_base *base)
{
+ struct hrtimer_cpu_base *this_cpu_base = this_cpu_ptr(&hrtimer_bases);
struct hrtimer_clock_base *new_base;
bool force_local, first;
@@ -1219,9 +1255,15 @@ static int __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,
* and enforce reprogramming after it is queued no matter whether
* it is the new first expiring timer again or not.
*/
- force_local = base->cpu_base == this_cpu_ptr(&hrtimer_bases);
+ force_local = base->cpu_base == this_cpu_base;
force_local &= base->cpu_base->next_timer == timer;
+ /*
+ * Don't force local queuing if this enqueue happens on a unplugged
+ * CPU after hrtimer_cpu_dying() has been invoked.
+ */
+ force_local &= this_cpu_base->online;
+
/*
* Remove an active timer from the queue. In case it is not queued
* on the current CPU, make sure that remove_hrtimer() updates the
@@ -1251,8 +1293,27 @@ static int __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,
}
first = enqueue_hrtimer(timer, new_base, mode);
- if (!force_local)
- return first;
+ if (!force_local) {
+ /*
+ * If the current CPU base is online, then the timer is
+ * never queued on a remote CPU if it would be the first
+ * expiring timer there.
+ */
+ if (hrtimer_base_is_online(this_cpu_base))
+ return first;
+
+ /*
+ * Timer was enqueued remote because the current base is
+ * already offline. If the timer is the first to expire,
+ * kick the remote CPU to reprogram the clock event.
+ */
+ if (first) {
+ struct hrtimer_cpu_base *new_cpu_base = new_base->cpu_base;
+
+ smp_call_function_single_async(new_cpu_base->cpu, &new_cpu_base->csd);
+ }
+ return 0;
+ }
/*
* Timer was forced to stay on the current CPU to avoid
diff --git a/kernel/time/posix-timers.c b/kernel/time/posix-timers.c
index b924f0f096fa..7534069f6033 100644
--- a/kernel/time/posix-timers.c
+++ b/kernel/time/posix-timers.c
@@ -118,6 +118,7 @@ static int posix_timer_add(struct k_itimer *timer)
return id;
}
spin_unlock(&hash_lock);
+ cond_resched();
}
/* POSIX return code when no timer ID could be allocated */
return -EAGAIN;
diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c
index ed7d6ad694fb..20a5e6962b69 100644
--- a/kernel/time/timer_list.c
+++ b/kernel/time/timer_list.c
@@ -46,7 +46,7 @@ static void
print_timer(struct seq_file *m, struct hrtimer *taddr, struct hrtimer *timer,
int idx, u64 now)
{
- SEQ_printf(m, " #%d: <%pK>, %ps", idx, taddr, timer->function);
+ SEQ_printf(m, " #%d: <%p>, %ps", idx, taddr, timer->function);
SEQ_printf(m, ", S:%02x", timer->state);
SEQ_printf(m, "\n");
SEQ_printf(m, " # expires at %Lu-%Lu nsecs [in %Ld to %Ld nsecs]\n",
@@ -98,7 +98,7 @@ print_active_timers(struct seq_file *m, struct hrtimer_clock_base *base,
static void
print_base(struct seq_file *m, struct hrtimer_clock_base *base, u64 now)
{
- SEQ_printf(m, " .base: %pK\n", base);
+ SEQ_printf(m, " .base: %p\n", base);
SEQ_printf(m, " .index: %d\n", base->index);
SEQ_printf(m, " .resolution: %u nsecs\n", hrtimer_resolution);
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 95868c315730..43d19b69c635 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -3487,10 +3487,9 @@ int trace_vbprintk(unsigned long ip, const char *fmt, va_list args)
}
EXPORT_SYMBOL_GPL(trace_vbprintk);
-__printf(3, 0)
-static int
-__trace_array_vprintk(struct trace_buffer *buffer,
- unsigned long ip, const char *fmt, va_list args)
+static __printf(3, 0)
+int __trace_array_vprintk(struct trace_buffer *buffer,
+ unsigned long ip, const char *fmt, va_list args)
{
struct trace_event_call *call = &event_print;
struct ring_buffer_event *event;
@@ -3543,7 +3542,6 @@ __trace_array_vprintk(struct trace_buffer *buffer,
return len;
}
-__printf(3, 0)
int trace_array_vprintk(struct trace_array *tr,
unsigned long ip, const char *fmt, va_list args)
{
@@ -3573,7 +3571,6 @@ int trace_array_vprintk(struct trace_array *tr,
* Note, trace_array_init_printk() must be called on @tr before this
* can be used.
*/
-__printf(3, 0)
int trace_array_printk(struct trace_array *tr,
unsigned long ip, const char *fmt, ...)
{
@@ -3618,7 +3615,6 @@ int trace_array_init_printk(struct trace_array *tr)
}
EXPORT_SYMBOL_GPL(trace_array_init_printk);
-__printf(3, 4)
int trace_array_printk_buf(struct trace_buffer *buffer,
unsigned long ip, const char *fmt, ...)
{
@@ -3634,7 +3630,6 @@ int trace_array_printk_buf(struct trace_buffer *buffer,
return ret;
}
-__printf(2, 0)
int trace_vprintk(unsigned long ip, const char *fmt, va_list args)
{
return trace_array_vprintk(&global_trace, ip, fmt, args);
diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
index db0d2641125e..faf892aecdf4 100644
--- a/kernel/trace/trace.h
+++ b/kernel/trace/trace.h
@@ -800,13 +800,15 @@ static inline void __init disable_tracing_selftest(const char *reason)
extern void *head_page(struct trace_array_cpu *data);
extern unsigned long long ns2usecs(u64 nsec);
-extern int
-trace_vbprintk(unsigned long ip, const char *fmt, va_list args);
-extern int
-trace_vprintk(unsigned long ip, const char *fmt, va_list args);
-extern int
-trace_array_vprintk(struct trace_array *tr,
- unsigned long ip, const char *fmt, va_list args);
+
+__printf(2, 0)
+int trace_vbprintk(unsigned long ip, const char *fmt, va_list args);
+__printf(2, 0)
+int trace_vprintk(unsigned long ip, const char *fmt, va_list args);
+__printf(3, 0)
+int trace_array_vprintk(struct trace_array *tr,
+ unsigned long ip, const char *fmt, va_list args);
+__printf(3, 4)
int trace_array_printk_buf(struct trace_buffer *buffer,
unsigned long ip, const char *fmt, ...);
void trace_printk_seq(struct trace_seq *s);
diff --git a/lib/dynamic_queue_limits.c b/lib/dynamic_queue_limits.c
index fde0aa244148..a75a9ca46b59 100644
--- a/lib/dynamic_queue_limits.c
+++ b/lib/dynamic_queue_limits.c
@@ -116,7 +116,7 @@ EXPORT_SYMBOL(dql_completed);
void dql_reset(struct dql *dql)
{
/* Reset all dynamic values */
- dql->limit = 0;
+ dql->limit = dql->min_limit;
dql->num_queued = 0;
dql->num_completed = 0;
dql->last_obj_cnt = 0;
diff --git a/lib/lzo/Makefile b/lib/lzo/Makefile
index 2f58fafbbddd..fc7b2b7ef4b2 100644
--- a/lib/lzo/Makefile
+++ b/lib/lzo/Makefile
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-only
-lzo_compress-objs := lzo1x_compress.o
+lzo_compress-objs := lzo1x_compress.o lzo1x_compress_safe.o
lzo_decompress-objs := lzo1x_decompress_safe.o
obj-$(CONFIG_LZO_COMPRESS) += lzo_compress.o
diff --git a/lib/lzo/lzo1x_compress.c b/lib/lzo/lzo1x_compress.c
index 9d31e7126606..f00dff9b9d4e 100644
--- a/lib/lzo/lzo1x_compress.c
+++ b/lib/lzo/lzo1x_compress.c
@@ -18,11 +18,22 @@
#include <linux/lzo.h>
#include "lzodefs.h"
-static noinline size_t
-lzo1x_1_do_compress(const unsigned char *in, size_t in_len,
- unsigned char *out, size_t *out_len,
- size_t ti, void *wrkmem, signed char *state_offset,
- const unsigned char bitstream_version)
+#undef LZO_UNSAFE
+
+#ifndef LZO_SAFE
+#define LZO_UNSAFE 1
+#define LZO_SAFE(name) name
+#define HAVE_OP(x) 1
+#endif
+
+#define NEED_OP(x) if (!HAVE_OP(x)) goto output_overrun
+
+static noinline int
+LZO_SAFE(lzo1x_1_do_compress)(const unsigned char *in, size_t in_len,
+ unsigned char **out, unsigned char *op_end,
+ size_t *tp, void *wrkmem,
+ signed char *state_offset,
+ const unsigned char bitstream_version)
{
const unsigned char *ip;
unsigned char *op;
@@ -30,8 +41,9 @@ lzo1x_1_do_compress(const unsigned char *in, size_t in_len,
const unsigned char * const ip_end = in + in_len - 20;
const unsigned char *ii;
lzo_dict_t * const dict = (lzo_dict_t *) wrkmem;
+ size_t ti = *tp;
- op = out;
+ op = *out;
ip = in;
ii = ip;
ip += ti < 4 ? 4 - ti : 0;
@@ -116,25 +128,32 @@ lzo1x_1_do_compress(const unsigned char *in, size_t in_len,
if (t != 0) {
if (t <= 3) {
op[*state_offset] |= t;
+ NEED_OP(4);
COPY4(op, ii);
op += t;
} else if (t <= 16) {
+ NEED_OP(17);
*op++ = (t - 3);
COPY8(op, ii);
COPY8(op + 8, ii + 8);
op += t;
} else {
if (t <= 18) {
+ NEED_OP(1);
*op++ = (t - 3);
} else {
size_t tt = t - 18;
+ NEED_OP(1);
*op++ = 0;
while (unlikely(tt > 255)) {
tt -= 255;
+ NEED_OP(1);
*op++ = 0;
}
+ NEED_OP(1);
*op++ = tt;
}
+ NEED_OP(t);
do {
COPY8(op, ii);
COPY8(op + 8, ii + 8);
@@ -151,6 +170,7 @@ lzo1x_1_do_compress(const unsigned char *in, size_t in_len,
if (unlikely(run_length)) {
ip += run_length;
run_length -= MIN_ZERO_RUN_LENGTH;
+ NEED_OP(4);
put_unaligned_le32((run_length << 21) | 0xfffc18
| (run_length & 0x7), op);
op += 4;
@@ -243,10 +263,12 @@ lzo1x_1_do_compress(const unsigned char *in, size_t in_len,
ip += m_len;
if (m_len <= M2_MAX_LEN && m_off <= M2_MAX_OFFSET) {
m_off -= 1;
+ NEED_OP(2);
*op++ = (((m_len - 1) << 5) | ((m_off & 7) << 2));
*op++ = (m_off >> 3);
} else if (m_off <= M3_MAX_OFFSET) {
m_off -= 1;
+ NEED_OP(1);
if (m_len <= M3_MAX_LEN)
*op++ = (M3_MARKER | (m_len - 2));
else {
@@ -254,14 +276,18 @@ lzo1x_1_do_compress(const unsigned char *in, size_t in_len,
*op++ = M3_MARKER | 0;
while (unlikely(m_len > 255)) {
m_len -= 255;
+ NEED_OP(1);
*op++ = 0;
}
+ NEED_OP(1);
*op++ = (m_len);
}
+ NEED_OP(2);
*op++ = (m_off << 2);
*op++ = (m_off >> 6);
} else {
m_off -= 0x4000;
+ NEED_OP(1);
if (m_len <= M4_MAX_LEN)
*op++ = (M4_MARKER | ((m_off >> 11) & 8)
| (m_len - 2));
@@ -282,11 +308,14 @@ lzo1x_1_do_compress(const unsigned char *in, size_t in_len,
m_len -= M4_MAX_LEN;
*op++ = (M4_MARKER | ((m_off >> 11) & 8));
while (unlikely(m_len > 255)) {
+ NEED_OP(1);
m_len -= 255;
*op++ = 0;
}
+ NEED_OP(1);
*op++ = (m_len);
}
+ NEED_OP(2);
*op++ = (m_off << 2);
*op++ = (m_off >> 6);
}
@@ -295,14 +324,20 @@ lzo1x_1_do_compress(const unsigned char *in, size_t in_len,
ii = ip;
goto next;
}
- *out_len = op - out;
- return in_end - (ii - ti);
+ *out = op;
+ *tp = in_end - (ii - ti);
+ return LZO_E_OK;
+
+output_overrun:
+ return LZO_E_OUTPUT_OVERRUN;
}
-static int lzogeneric1x_1_compress(const unsigned char *in, size_t in_len,
- unsigned char *out, size_t *out_len,
- void *wrkmem, const unsigned char bitstream_version)
+static int LZO_SAFE(lzogeneric1x_1_compress)(
+ const unsigned char *in, size_t in_len,
+ unsigned char *out, size_t *out_len,
+ void *wrkmem, const unsigned char bitstream_version)
{
+ unsigned char * const op_end = out + *out_len;
const unsigned char *ip = in;
unsigned char *op = out;
unsigned char *data_start;
@@ -326,14 +361,18 @@ static int lzogeneric1x_1_compress(const unsigned char *in, size_t in_len,
while (l > 20) {
size_t ll = min_t(size_t, l, m4_max_offset + 1);
uintptr_t ll_end = (uintptr_t) ip + ll;
+ int err;
+
if ((ll_end + ((t + ll) >> 5)) <= ll_end)
break;
BUILD_BUG_ON(D_SIZE * sizeof(lzo_dict_t) > LZO1X_1_MEM_COMPRESS);
memset(wrkmem, 0, D_SIZE * sizeof(lzo_dict_t));
- t = lzo1x_1_do_compress(ip, ll, op, out_len, t, wrkmem,
- &state_offset, bitstream_version);
+ err = LZO_SAFE(lzo1x_1_do_compress)(
+ ip, ll, &op, op_end, &t, wrkmem,
+ &state_offset, bitstream_version);
+ if (err != LZO_E_OK)
+ return err;
ip += ll;
- op += *out_len;
l -= ll;
}
t += l;
@@ -342,20 +381,26 @@ static int lzogeneric1x_1_compress(const unsigned char *in, size_t in_len,
const unsigned char *ii = in + in_len - t;
if (op == data_start && t <= 238) {
+ NEED_OP(1);
*op++ = (17 + t);
} else if (t <= 3) {
op[state_offset] |= t;
} else if (t <= 18) {
+ NEED_OP(1);
*op++ = (t - 3);
} else {
size_t tt = t - 18;
+ NEED_OP(1);
*op++ = 0;
while (tt > 255) {
tt -= 255;
+ NEED_OP(1);
*op++ = 0;
}
+ NEED_OP(1);
*op++ = tt;
}
+ NEED_OP(t);
if (t >= 16) do {
COPY8(op, ii);
COPY8(op + 8, ii + 8);
@@ -368,31 +413,38 @@ static int lzogeneric1x_1_compress(const unsigned char *in, size_t in_len,
} while (--t > 0);
}
+ NEED_OP(3);
*op++ = M4_MARKER | 1;
*op++ = 0;
*op++ = 0;
*out_len = op - out;
return LZO_E_OK;
+
+output_overrun:
+ return LZO_E_OUTPUT_OVERRUN;
}
-int lzo1x_1_compress(const unsigned char *in, size_t in_len,
- unsigned char *out, size_t *out_len,
- void *wrkmem)
+int LZO_SAFE(lzo1x_1_compress)(const unsigned char *in, size_t in_len,
+ unsigned char *out, size_t *out_len,
+ void *wrkmem)
{
- return lzogeneric1x_1_compress(in, in_len, out, out_len, wrkmem, 0);
+ return LZO_SAFE(lzogeneric1x_1_compress)(
+ in, in_len, out, out_len, wrkmem, 0);
}
-int lzorle1x_1_compress(const unsigned char *in, size_t in_len,
- unsigned char *out, size_t *out_len,
- void *wrkmem)
+int LZO_SAFE(lzorle1x_1_compress)(const unsigned char *in, size_t in_len,
+ unsigned char *out, size_t *out_len,
+ void *wrkmem)
{
- return lzogeneric1x_1_compress(in, in_len, out, out_len,
- wrkmem, LZO_VERSION);
+ return LZO_SAFE(lzogeneric1x_1_compress)(
+ in, in_len, out, out_len, wrkmem, LZO_VERSION);
}
-EXPORT_SYMBOL_GPL(lzo1x_1_compress);
-EXPORT_SYMBOL_GPL(lzorle1x_1_compress);
+EXPORT_SYMBOL_GPL(LZO_SAFE(lzo1x_1_compress));
+EXPORT_SYMBOL_GPL(LZO_SAFE(lzorle1x_1_compress));
+#ifndef LZO_UNSAFE
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("LZO1X-1 Compressor");
+#endif
diff --git a/lib/lzo/lzo1x_compress_safe.c b/lib/lzo/lzo1x_compress_safe.c
new file mode 100644
index 000000000000..371c9f849492
--- /dev/null
+++ b/lib/lzo/lzo1x_compress_safe.c
@@ -0,0 +1,18 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * LZO1X Compressor from LZO
+ *
+ * Copyright (C) 1996-2012 Markus F.X.J. Oberhumer <markus@xxxxxxxxxxxxx>
+ *
+ * The full LZO package can be found at:
+ * http://www.oberhumer.com/opensource/lzo/
+ *
+ * Changed for Linux kernel use by:
+ * Nitin Gupta <nitingupta910@xxxxxxxxx>
+ * Richard Purdie <rpurdie@xxxxxxxxxxxxxx>
+ */
+
+#define LZO_SAFE(name) name##_safe
+#define HAVE_OP(x) ((size_t)(op_end - op) >= (size_t)(x))
+
+#include "lzo1x_compress.c"
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 9bf5a69e20d8..2d2cada8a8a4 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1266,7 +1266,6 @@ void mem_cgroup_scan_tasks(struct mem_cgroup *memcg,
{
struct mem_cgroup *iter;
int ret = 0;
- int i = 0;
BUG_ON(mem_cgroup_is_root(memcg));
@@ -1276,10 +1275,9 @@ void mem_cgroup_scan_tasks(struct mem_cgroup *memcg,
css_task_iter_start(&iter->css, CSS_TASK_ITER_PROCS, &it);
while (!ret && (task = css_task_iter_next(&it))) {
- /* Avoid potential softlockup warning */
- if ((++i & 1023) == 0)
- cond_resched();
ret = fn(task, arg);
+ /* Avoid potential softlockup warning */
+ cond_resched();
}
css_task_iter_end(&it);
if (ret) {
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 74737c35082b..44011ebecddf 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -4038,6 +4038,14 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
}
retry:
+ /*
+ * Deal with possible cpuset update races or zonelist updates to avoid
+ * infinite retries.
+ */
+ if (check_retry_cpuset(cpuset_mems_cookie, ac) ||
+ check_retry_zonelist(zonelist_iter_cookie))
+ goto restart;
+
/* Ensure kswapd doesn't accidentally go to sleep as long as we loop */
if (alloc_flags & ALLOC_KSWAPD)
wake_all_kswapds(order, gfp_mask, ac);
diff --git a/net/Makefile b/net/Makefile
index 4c4dc535453d..45f3fbaae644 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -17,7 +17,7 @@ obj-$(CONFIG_NETFILTER) += netfilter/
obj-$(CONFIG_INET) += ipv4/
obj-$(CONFIG_TLS) += tls/
obj-$(CONFIG_XFRM) += xfrm/
-obj-$(CONFIG_UNIX_SCM) += unix/
+obj-$(CONFIG_UNIX) += unix/
obj-y += ipv6/
obj-$(CONFIG_BPFILTER) += bpfilter/
obj-$(CONFIG_PACKET) += packet/
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 72ee41b894a5..1c54e812ef1f 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -1411,7 +1411,8 @@ static void l2cap_request_info(struct l2cap_conn *conn)
sizeof(req), &req);
}
-static bool l2cap_check_enc_key_size(struct hci_conn *hcon)
+static bool l2cap_check_enc_key_size(struct hci_conn *hcon,
+ struct l2cap_chan *chan)
{
/* The minimum encryption key size needs to be enforced by the
* host stack before establishing any L2CAP connections. The
@@ -1425,7 +1426,7 @@ static bool l2cap_check_enc_key_size(struct hci_conn *hcon)
int min_key_size = hcon->hdev->min_enc_key_size;
/* On FIPS security level, key size must be 16 bytes */
- if (hcon->sec_level == BT_SECURITY_FIPS)
+ if (chan->sec_level == BT_SECURITY_FIPS)
min_key_size = 16;
return (!test_bit(HCI_CONN_ENCRYPT, &hcon->flags) ||
@@ -1453,7 +1454,7 @@ static void l2cap_do_start(struct l2cap_chan *chan)
!__l2cap_no_conn_pending(chan))
return;
- if (l2cap_check_enc_key_size(conn->hcon))
+ if (l2cap_check_enc_key_size(conn->hcon, chan))
l2cap_start_connection(chan);
else
__set_chan_timer(chan, L2CAP_DISC_TIMEOUT);
@@ -1528,7 +1529,7 @@ static void l2cap_conn_start(struct l2cap_conn *conn)
continue;
}
- if (l2cap_check_enc_key_size(conn->hcon))
+ if (l2cap_check_enc_key_size(conn->hcon, chan))
l2cap_start_connection(chan);
else
l2cap_chan_close(chan, ECONNREFUSED);
@@ -3955,7 +3956,7 @@ static void l2cap_connect(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd,
/* Check if the ACL is secure enough (if not SDP) */
if (psm != cpu_to_le16(L2CAP_PSM_SDP) &&
(!hci_conn_check_link_mode(conn->hcon) ||
- !l2cap_check_enc_key_size(conn->hcon))) {
+ !l2cap_check_enc_key_size(conn->hcon, pchan))) {
conn->disc_reason = HCI_ERROR_AUTH_FAILURE;
result = L2CAP_CR_SEC_BLOCK;
goto response;
@@ -7323,7 +7324,7 @@ static void l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt)
}
if (chan->state == BT_CONNECT) {
- if (!status && l2cap_check_enc_key_size(hcon))
+ if (!status && l2cap_check_enc_key_size(hcon, chan))
l2cap_start_connection(chan);
else
__set_chan_timer(chan, L2CAP_DISC_TIMEOUT);
@@ -7333,7 +7334,7 @@ static void l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt)
struct l2cap_conn_rsp rsp;
__u16 res, stat;
- if (!status && l2cap_check_enc_key_size(hcon)) {
+ if (!status && l2cap_check_enc_key_size(hcon, chan)) {
if (test_bit(FLAG_DEFER_SETUP, &chan->flags)) {
res = L2CAP_CR_PEND;
stat = L2CAP_CS_AUTHOR_PEND;
diff --git a/net/bridge/br_mdb.c b/net/bridge/br_mdb.c
index 7305f5f8215c..96bea0c8408f 100644
--- a/net/bridge/br_mdb.c
+++ b/net/bridge/br_mdb.c
@@ -1030,7 +1030,7 @@ static int br_mdb_add_group(const struct br_mdb_config *cfg,
/* host join */
if (!port) {
- if (mp->host_joined) {
+ if (mp->host_joined && !(cfg->nlflags & NLM_F_REPLACE)) {
NL_SET_ERR_MSG_MOD(extack, "Group is already joined by host");
return -EEXIST;
}
diff --git a/net/bridge/br_nf_core.c b/net/bridge/br_nf_core.c
index 98aea5485aae..a8c67035e23c 100644
--- a/net/bridge/br_nf_core.c
+++ b/net/bridge/br_nf_core.c
@@ -65,17 +65,14 @@ static struct dst_ops fake_dst_ops = {
* ipt_REJECT needs it. Future netfilter modules might
* require us to fill additional fields.
*/
-static const u32 br_dst_default_metrics[RTAX_MAX] = {
- [RTAX_MTU - 1] = 1500,
-};
-
void br_netfilter_rtable_init(struct net_bridge *br)
{
struct rtable *rt = &br->fake_rtable;
rcuref_init(&rt->dst.__rcuref, 1);
rt->dst.dev = br->dev;
- dst_init_metrics(&rt->dst, br_dst_default_metrics, true);
+ dst_init_metrics(&rt->dst, br->metrics, false);
+ dst_metric_set(&rt->dst, RTAX_MTU, br->dev->mtu);
rt->dst.flags = DST_NOXFRM | DST_FAKE_RTABLE;
rt->dst.ops = &fake_dst_ops;
}
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
index 72d80fd943a8..9197b511e459 100644
--- a/net/bridge/br_private.h
+++ b/net/bridge/br_private.h
@@ -502,6 +502,7 @@ struct net_bridge {
struct rtable fake_rtable;
struct rt6_info fake_rt6_info;
};
+ u32 metrics[RTAX_MAX];
#endif
u16 group_fwd_mask;
u16 group_fwd_mask_required;
diff --git a/net/can/bcm.c b/net/can/bcm.c
index a1f5db0fd5d4..75653584f31b 100644
--- a/net/can/bcm.c
+++ b/net/can/bcm.c
@@ -58,6 +58,7 @@
#include <linux/can/skb.h>
#include <linux/can/bcm.h>
#include <linux/slab.h>
+#include <linux/spinlock.h>
#include <net/sock.h>
#include <net/net_namespace.h>
@@ -120,6 +121,7 @@ struct bcm_op {
struct canfd_frame last_sframe;
struct sock *sk;
struct net_device *rx_reg_dev;
+ spinlock_t bcm_tx_lock; /* protect currframe/count in runtime updates */
};
struct bcm_sock {
@@ -205,7 +207,9 @@ static int bcm_proc_show(struct seq_file *m, void *v)
seq_printf(m, " / bound %s", bcm_proc_getifname(net, ifname, bo->ifindex));
seq_printf(m, " <<<\n");
- list_for_each_entry(op, &bo->rx_ops, list) {
+ rcu_read_lock();
+
+ list_for_each_entry_rcu(op, &bo->rx_ops, list) {
unsigned long reduction;
@@ -261,6 +265,9 @@ static int bcm_proc_show(struct seq_file *m, void *v)
seq_printf(m, "# sent %ld\n", op->frames_abs);
}
seq_putc(m, '\n');
+
+ rcu_read_unlock();
+
return 0;
}
#endif /* CONFIG_PROC_FS */
@@ -273,13 +280,18 @@ static void bcm_can_tx(struct bcm_op *op)
{
struct sk_buff *skb;
struct net_device *dev;
- struct canfd_frame *cf = op->frames + op->cfsiz * op->currframe;
+ struct canfd_frame *cf;
int err;
/* no target device? => exit */
if (!op->ifindex)
return;
+ /* read currframe under lock protection */
+ spin_lock_bh(&op->bcm_tx_lock);
+ cf = op->frames + op->cfsiz * op->currframe;
+ spin_unlock_bh(&op->bcm_tx_lock);
+
dev = dev_get_by_index(sock_net(op->sk), op->ifindex);
if (!dev) {
/* RFC: should this bcm_op remove itself here? */
@@ -300,6 +312,10 @@ static void bcm_can_tx(struct bcm_op *op)
skb->dev = dev;
can_skb_set_owner(skb, op->sk);
err = can_send(skb, 1);
+
+ /* update currframe and count under lock protection */
+ spin_lock_bh(&op->bcm_tx_lock);
+
if (!err)
op->frames_abs++;
@@ -308,6 +324,11 @@ static void bcm_can_tx(struct bcm_op *op)
/* reached last frame? */
if (op->currframe >= op->nframes)
op->currframe = 0;
+
+ if (op->count > 0)
+ op->count--;
+
+ spin_unlock_bh(&op->bcm_tx_lock);
out:
dev_put(dev);
}
@@ -404,7 +425,7 @@ static enum hrtimer_restart bcm_tx_timeout_handler(struct hrtimer *hrtimer)
struct bcm_msg_head msg_head;
if (op->kt_ival1 && (op->count > 0)) {
- op->count--;
+ bcm_can_tx(op);
if (!op->count && (op->flags & TX_COUNTEVT)) {
/* create notification to user */
@@ -419,7 +440,6 @@ static enum hrtimer_restart bcm_tx_timeout_handler(struct hrtimer *hrtimer)
bcm_send_to_user(op, &msg_head, NULL, 0);
}
- bcm_can_tx(op);
} else if (op->kt_ival2) {
bcm_can_tx(op);
@@ -801,7 +821,7 @@ static int bcm_delete_rx_op(struct list_head *ops, struct bcm_msg_head *mh,
REGMASK(op->can_id),
bcm_rx_handler, op);
- list_del(&op->list);
+ list_del_rcu(&op->list);
bcm_remove_op(op);
return 1; /* done */
}
@@ -821,7 +841,7 @@ static int bcm_delete_tx_op(struct list_head *ops, struct bcm_msg_head *mh,
list_for_each_entry_safe(op, n, ops, list) {
if ((op->can_id == mh->can_id) && (op->ifindex == ifindex) &&
(op->flags & CAN_FD_FRAME) == (mh->flags & CAN_FD_FRAME)) {
- list_del(&op->list);
+ list_del_rcu(&op->list);
bcm_remove_op(op);
return 1; /* done */
}
@@ -914,6 +934,27 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
}
op->flags = msg_head->flags;
+ /* only lock for unlikely count/nframes/currframe changes */
+ if (op->nframes != msg_head->nframes ||
+ op->flags & TX_RESET_MULTI_IDX ||
+ op->flags & SETTIMER) {
+
+ spin_lock_bh(&op->bcm_tx_lock);
+
+ if (op->nframes != msg_head->nframes ||
+ op->flags & TX_RESET_MULTI_IDX) {
+ /* potentially update changed nframes */
+ op->nframes = msg_head->nframes;
+ /* restart multiple frame transmission */
+ op->currframe = 0;
+ }
+
+ if (op->flags & SETTIMER)
+ op->count = msg_head->count;
+
+ spin_unlock_bh(&op->bcm_tx_lock);
+ }
+
} else {
/* insert new BCM operation for the given can_id */
@@ -921,9 +962,14 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
if (!op)
return -ENOMEM;
+ spin_lock_init(&op->bcm_tx_lock);
op->can_id = msg_head->can_id;
op->cfsiz = CFSIZ(msg_head->flags);
op->flags = msg_head->flags;
+ op->nframes = msg_head->nframes;
+
+ if (op->flags & SETTIMER)
+ op->count = msg_head->count;
/* create array for CAN frames and copy the data */
if (msg_head->nframes > 1) {
@@ -982,22 +1028,8 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
} /* if ((op = bcm_find_op(&bo->tx_ops, msg_head->can_id, ifindex))) */
- if (op->nframes != msg_head->nframes) {
- op->nframes = msg_head->nframes;
- /* start multiple frame transmission with index 0 */
- op->currframe = 0;
- }
-
- /* check flags */
-
- if (op->flags & TX_RESET_MULTI_IDX) {
- /* start multiple frame transmission with index 0 */
- op->currframe = 0;
- }
-
if (op->flags & SETTIMER) {
/* set timer values */
- op->count = msg_head->count;
op->ival1 = msg_head->ival1;
op->ival2 = msg_head->ival2;
op->kt_ival1 = bcm_timeval_to_ktime(msg_head->ival1);
@@ -1014,11 +1046,8 @@ static int bcm_tx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
op->flags |= TX_ANNOUNCE;
}
- if (op->flags & TX_ANNOUNCE) {
+ if (op->flags & TX_ANNOUNCE)
bcm_can_tx(op);
- if (op->count)
- op->count--;
- }
if (op->flags & STARTTIMER)
bcm_tx_start_timer(op);
@@ -1234,7 +1263,7 @@ static int bcm_rx_setup(struct bcm_msg_head *msg_head, struct msghdr *msg,
bcm_rx_handler, op, "bcm", sk);
if (err) {
/* this bcm rx op is broken -> remove it */
- list_del(&op->list);
+ list_del_rcu(&op->list);
bcm_remove_op(op);
return err;
}
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 359e24c3f22c..6afea369ca21 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -897,6 +897,10 @@ static ssize_t get_labels(const char __user *buffer, struct pktgen_dev *pkt_dev)
pkt_dev->nr_labels = 0;
do {
__u32 tmp;
+
+ if (n >= MAX_MPLS_LABELS)
+ return -E2BIG;
+
len = hex32_arg(&buffer[i], 8, &tmp);
if (len <= 0)
return len;
@@ -908,8 +912,6 @@ static ssize_t get_labels(const char __user *buffer, struct pktgen_dev *pkt_dev)
return -EFAULT;
i++;
n++;
- if (n >= MAX_MPLS_LABELS)
- return -E2BIG;
} while (c == ',');
pkt_dev->nr_labels = n;
@@ -1875,8 +1877,8 @@ static ssize_t pktgen_thread_write(struct file *file,
i = len;
/* Read variable name */
-
- len = strn_len(&user_buffer[i], sizeof(name) - 1);
+ max = min(sizeof(name) - 1, count - i);
+ len = strn_len(&user_buffer[i], max);
if (len < 0)
return len;
@@ -1906,7 +1908,8 @@ static ssize_t pktgen_thread_write(struct file *file,
if (!strcmp(name, "add_device")) {
char f[32];
memset(f, 0, 32);
- len = strn_len(&user_buffer[i], sizeof(f) - 1);
+ max = min(sizeof(f) - 1, count - i);
+ len = strn_len(&user_buffer[i], max);
if (len < 0) {
ret = len;
goto out;
diff --git a/net/core/scm.c b/net/core/scm.c
index 737917c7ac62..431bfb3ea392 100644
--- a/net/core/scm.c
+++ b/net/core/scm.c
@@ -36,6 +36,7 @@
#include <net/compat.h>
#include <net/scm.h>
#include <net/cls_cgroup.h>
+#include <net/af_unix.h>
/*
@@ -85,8 +86,15 @@ static int scm_fp_copy(struct cmsghdr *cmsg, struct scm_fp_list **fplp)
return -ENOMEM;
*fplp = fpl;
fpl->count = 0;
+ fpl->count_unix = 0;
fpl->max = SCM_MAX_FD;
fpl->user = NULL;
+#if IS_ENABLED(CONFIG_UNIX)
+ fpl->inflight = false;
+ fpl->dead = false;
+ fpl->edges = NULL;
+ INIT_LIST_HEAD(&fpl->vertices);
+#endif
}
fpp = &fpl->fp[fpl->count];
@@ -109,6 +117,9 @@ static int scm_fp_copy(struct cmsghdr *cmsg, struct scm_fp_list **fplp)
fput(file);
return -EINVAL;
}
+ if (unix_get_socket(file))
+ fpl->count_unix++;
+
*fpp++ = file;
fpl->count++;
}
@@ -371,8 +382,14 @@ struct scm_fp_list *scm_fp_dup(struct scm_fp_list *fpl)
if (new_fpl) {
for (i = 0; i < fpl->count; i++)
get_file(fpl->fp[i]);
+
new_fpl->max = new_fpl->count;
new_fpl->user = get_uid(fpl->user);
+#if IS_ENABLED(CONFIG_UNIX)
+ new_fpl->inflight = false;
+ new_fpl->edges = NULL;
+ INIT_LIST_HEAD(&new_fpl->vertices);
+#endif
}
return new_fpl;
}
diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c
index eeace9b509ce..49fd664f50fc 100644
--- a/net/ipv4/esp4.c
+++ b/net/ipv4/esp4.c
@@ -118,47 +118,16 @@ static void esp_ssg_unref(struct xfrm_state *x, void *tmp, struct sk_buff *skb)
}
#ifdef CONFIG_INET_ESPINTCP
-struct esp_tcp_sk {
- struct sock *sk;
- struct rcu_head rcu;
-};
-
-static void esp_free_tcp_sk(struct rcu_head *head)
-{
- struct esp_tcp_sk *esk = container_of(head, struct esp_tcp_sk, rcu);
-
- sock_put(esk->sk);
- kfree(esk);
-}
-
static struct sock *esp_find_tcp_sk(struct xfrm_state *x)
{
struct xfrm_encap_tmpl *encap = x->encap;
struct net *net = xs_net(x);
- struct esp_tcp_sk *esk;
__be16 sport, dport;
- struct sock *nsk;
struct sock *sk;
- sk = rcu_dereference(x->encap_sk);
- if (sk && sk->sk_state == TCP_ESTABLISHED)
- return sk;
-
spin_lock_bh(&x->lock);
sport = encap->encap_sport;
dport = encap->encap_dport;
- nsk = rcu_dereference_protected(x->encap_sk,
- lockdep_is_held(&x->lock));
- if (sk && sk == nsk) {
- esk = kmalloc(sizeof(*esk), GFP_ATOMIC);
- if (!esk) {
- spin_unlock_bh(&x->lock);
- return ERR_PTR(-ENOMEM);
- }
- RCU_INIT_POINTER(x->encap_sk, NULL);
- esk->sk = sk;
- call_rcu(&esk->rcu, esp_free_tcp_sk);
- }
spin_unlock_bh(&x->lock);
sk = inet_lookup_established(net, net->ipv4.tcp_death_row.hashinfo, x->id.daddr.a4,
@@ -171,20 +140,6 @@ static struct sock *esp_find_tcp_sk(struct xfrm_state *x)
return ERR_PTR(-EINVAL);
}
- spin_lock_bh(&x->lock);
- nsk = rcu_dereference_protected(x->encap_sk,
- lockdep_is_held(&x->lock));
- if (encap->encap_sport != sport ||
- encap->encap_dport != dport) {
- sock_put(sk);
- sk = nsk ?: ERR_PTR(-EREMCHG);
- } else if (sk == nsk) {
- sock_put(sk);
- } else {
- rcu_assign_pointer(x->encap_sk, sk);
- }
- spin_unlock_bh(&x->lock);
-
return sk;
}
@@ -207,6 +162,8 @@ static int esp_output_tcp_finish(struct xfrm_state *x, struct sk_buff *skb)
err = espintcp_push_skb(sk, skb);
bh_unlock_sock(sk);
+ sock_put(sk);
+
out:
rcu_read_unlock();
return err;
@@ -391,6 +348,8 @@ static struct ip_esp_hdr *esp_output_tcp_encap(struct xfrm_state *x,
if (IS_ERR(sk))
return ERR_CAST(sk);
+ sock_put(sk);
+
*lenp = htons(len);
esph = (struct ip_esp_hdr *)(lenp + 1);
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
index 90ce87ffed46..7993ff46de23 100644
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -829,19 +829,33 @@ static int rtm_to_fib_config(struct net *net, struct sk_buff *skb,
}
}
+ if (cfg->fc_dst_len > 32) {
+ NL_SET_ERR_MSG(extack, "Invalid prefix length");
+ err = -EINVAL;
+ goto errout;
+ }
+
+ if (cfg->fc_dst_len < 32 && (ntohl(cfg->fc_dst) << cfg->fc_dst_len)) {
+ NL_SET_ERR_MSG(extack, "Invalid prefix for given prefix length");
+ err = -EINVAL;
+ goto errout;
+ }
+
if (cfg->fc_nh_id) {
if (cfg->fc_oif || cfg->fc_gw_family ||
cfg->fc_encap || cfg->fc_mp) {
NL_SET_ERR_MSG(extack,
"Nexthop specification and nexthop id are mutually exclusive");
- return -EINVAL;
+ err = -EINVAL;
+ goto errout;
}
}
if (has_gw && has_via) {
NL_SET_ERR_MSG(extack,
"Nexthop configuration can not contain both GATEWAY and VIA");
- return -EINVAL;
+ err = -EINVAL;
+ goto errout;
}
if (!cfg->fc_table)
diff --git a/net/ipv4/fib_rules.c b/net/ipv4/fib_rules.c
index 513f475c6a53..298a9944a3d1 100644
--- a/net/ipv4/fib_rules.c
+++ b/net/ipv4/fib_rules.c
@@ -222,9 +222,9 @@ static int fib4_rule_configure(struct fib_rule *rule, struct sk_buff *skb,
struct nlattr **tb,
struct netlink_ext_ack *extack)
{
- struct net *net = sock_net(skb->sk);
+ struct fib4_rule *rule4 = (struct fib4_rule *)rule;
+ struct net *net = rule->fr_net;
int err = -EINVAL;
- struct fib4_rule *rule4 = (struct fib4_rule *) rule;
if (!inet_validate_dscp(frh->tos)) {
NL_SET_ERR_MSG(extack,
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
index 77b97c48da5e..fa54b36b241a 100644
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -1192,22 +1192,6 @@ static int fib_insert_alias(struct trie *t, struct key_vector *tp,
return 0;
}
-static bool fib_valid_key_len(u32 key, u8 plen, struct netlink_ext_ack *extack)
-{
- if (plen > KEYLENGTH) {
- NL_SET_ERR_MSG(extack, "Invalid prefix length");
- return false;
- }
-
- if ((plen < KEYLENGTH) && (key << plen)) {
- NL_SET_ERR_MSG(extack,
- "Invalid prefix for given prefix length");
- return false;
- }
-
- return true;
-}
-
static void fib_remove_alias(struct trie *t, struct key_vector *tp,
struct key_vector *l, struct fib_alias *old);
@@ -1228,9 +1212,6 @@ int fib_table_insert(struct net *net, struct fib_table *tb,
key = ntohl(cfg->fc_dst);
- if (!fib_valid_key_len(key, plen, extack))
- return -EINVAL;
-
pr_debug("Insert table=%u %08x/%d\n", tb->tb_id, key, plen);
fi = fib_create_info(cfg, extack);
@@ -1723,9 +1704,6 @@ int fib_table_delete(struct net *net, struct fib_table *tb,
key = ntohl(cfg->fc_dst);
- if (!fib_valid_key_len(key, plen, extack))
- return -EINVAL;
-
l = fib_find_node(t, &tp, key);
if (!l)
return -ESRCH;
diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c
index 7967ff7e02f7..60e81f6b1c6d 100644
--- a/net/ipv4/inet_hashtables.c
+++ b/net/ipv4/inet_hashtables.c
@@ -1231,22 +1231,37 @@ int inet_ehash_locks_alloc(struct inet_hashinfo *hashinfo)
{
unsigned int locksz = sizeof(spinlock_t);
unsigned int i, nblocks = 1;
+ spinlock_t *ptr = NULL;
- if (locksz != 0) {
- /* allocate 2 cache lines or at least one spinlock per cpu */
- nblocks = max(2U * L1_CACHE_BYTES / locksz, 1U);
- nblocks = roundup_pow_of_two(nblocks * num_possible_cpus());
+ if (locksz == 0)
+ goto set_mask;
- /* no more locks than number of hash buckets */
- nblocks = min(nblocks, hashinfo->ehash_mask + 1);
+ /* Allocate 2 cache lines or at least one spinlock per cpu. */
+ nblocks = max(2U * L1_CACHE_BYTES / locksz, 1U) * num_possible_cpus();
- hashinfo->ehash_locks = kvmalloc_array(nblocks, locksz, GFP_KERNEL);
- if (!hashinfo->ehash_locks)
- return -ENOMEM;
+ /* At least one page per NUMA node. */
+ nblocks = max(nblocks, num_online_nodes() * PAGE_SIZE / locksz);
+
+ nblocks = roundup_pow_of_two(nblocks);
+
+ /* No more locks than number of hash buckets. */
+ nblocks = min(nblocks, hashinfo->ehash_mask + 1);
- for (i = 0; i < nblocks; i++)
- spin_lock_init(&hashinfo->ehash_locks[i]);
+ if (num_online_nodes() > 1) {
+ /* Use vmalloc() to allow NUMA policy to spread pages
+ * on all available nodes if desired.
+ */
+ ptr = vmalloc_array(nblocks, locksz);
+ }
+ if (!ptr) {
+ ptr = kvmalloc_array(nblocks, locksz, GFP_KERNEL);
+ if (!ptr)
+ return -ENOMEM;
}
+ for (i = 0; i < nblocks; i++)
+ spin_lock_init(&ptr[i]);
+ hashinfo->ehash_locks = ptr;
+set_mask:
hashinfo->ehash_locks_mask = nblocks - 1;
return 0;
}
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index 890c15510b42..f261e29adc7c 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -140,7 +140,6 @@ static int ipgre_err(struct sk_buff *skb, u32 info,
const struct iphdr *iph;
const int type = icmp_hdr(skb)->type;
const int code = icmp_hdr(skb)->code;
- unsigned int data_len = 0;
struct ip_tunnel *t;
if (tpi->proto == htons(ETH_P_TEB))
@@ -181,7 +180,6 @@ static int ipgre_err(struct sk_buff *skb, u32 info,
case ICMP_TIME_EXCEEDED:
if (code != ICMP_EXC_TTL)
return 0;
- data_len = icmp_hdr(skb)->un.reserved[1] * 4; /* RFC 4884 4.1 */
break;
case ICMP_REDIRECT:
@@ -189,10 +187,16 @@ static int ipgre_err(struct sk_buff *skb, u32 info,
}
#if IS_ENABLED(CONFIG_IPV6)
- if (tpi->proto == htons(ETH_P_IPV6) &&
- !ip6_err_gen_icmpv6_unreach(skb, iph->ihl * 4 + tpi->hdr_len,
- type, data_len))
- return 0;
+ if (tpi->proto == htons(ETH_P_IPV6)) {
+ unsigned int data_len = 0;
+
+ if (type == ICMP_TIME_EXCEEDED)
+ data_len = icmp_hdr(skb)->un.reserved[1] * 4; /* RFC 4884 4.1 */
+
+ if (!ip6_err_gen_icmpv6_unreach(skb, iph->ihl * 4 + tpi->hdr_len,
+ type, data_len))
+ return 0;
+ }
#endif
if (t->parms.iph.daddr == 0 ||
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 10d38ec0ff5a..a172248b6678 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -425,6 +425,20 @@ static bool tcp_ecn_rcv_ecn_echo(const struct tcp_sock *tp, const struct tcphdr
return false;
}
+static void tcp_count_delivered_ce(struct tcp_sock *tp, u32 ecn_count)
+{
+ tp->delivered_ce += ecn_count;
+}
+
+/* Updates the delivered and delivered_ce counts */
+static void tcp_count_delivered(struct tcp_sock *tp, u32 delivered,
+ bool ece_ack)
+{
+ tp->delivered += delivered;
+ if (ece_ack)
+ tcp_count_delivered_ce(tp, delivered);
+}
+
/* Buffer size and advertised window tuning.
*
* 1. Tuning sk->sk_sndbuf, when connection enters established state.
@@ -1137,15 +1151,6 @@ void tcp_mark_skb_lost(struct sock *sk, struct sk_buff *skb)
}
}
-/* Updates the delivered and delivered_ce counts */
-static void tcp_count_delivered(struct tcp_sock *tp, u32 delivered,
- bool ece_ack)
-{
- tp->delivered += delivered;
- if (ece_ack)
- tp->delivered_ce += delivered;
-}
-
/* This procedure tags the retransmission queue when SACKs arrive.
*
* We have three tag bits: SACKED(S), RETRANS(R) and LOST(L).
@@ -3816,12 +3821,23 @@ static void tcp_process_tlp_ack(struct sock *sk, u32 ack, int flag)
}
}
-static inline void tcp_in_ack_event(struct sock *sk, u32 flags)
+static void tcp_in_ack_event(struct sock *sk, int flag)
{
const struct inet_connection_sock *icsk = inet_csk(sk);
- if (icsk->icsk_ca_ops->in_ack_event)
- icsk->icsk_ca_ops->in_ack_event(sk, flags);
+ if (icsk->icsk_ca_ops->in_ack_event) {
+ u32 ack_ev_flags = 0;
+
+ if (flag & FLAG_WIN_UPDATE)
+ ack_ev_flags |= CA_ACK_WIN_UPDATE;
+ if (flag & FLAG_SLOWPATH) {
+ ack_ev_flags |= CA_ACK_SLOWPATH;
+ if (flag & FLAG_ECE)
+ ack_ev_flags |= CA_ACK_ECE;
+ }
+
+ icsk->icsk_ca_ops->in_ack_event(sk, ack_ev_flags);
+ }
}
/* Congestion control has updated the cwnd already. So if we're in
@@ -3938,12 +3954,8 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag)
tcp_snd_una_update(tp, ack);
flag |= FLAG_WIN_UPDATE;
- tcp_in_ack_event(sk, CA_ACK_WIN_UPDATE);
-
NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPHPACKS);
} else {
- u32 ack_ev_flags = CA_ACK_SLOWPATH;
-
if (ack_seq != TCP_SKB_CB(skb)->end_seq)
flag |= FLAG_DATA;
else
@@ -3955,19 +3967,12 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag)
flag |= tcp_sacktag_write_queue(sk, skb, prior_snd_una,
&sack_state);
- if (tcp_ecn_rcv_ecn_echo(tp, tcp_hdr(skb))) {
+ if (tcp_ecn_rcv_ecn_echo(tp, tcp_hdr(skb)))
flag |= FLAG_ECE;
- ack_ev_flags |= CA_ACK_ECE;
- }
if (sack_state.sack_delivered)
tcp_count_delivered(tp, sack_state.sack_delivered,
flag & FLAG_ECE);
-
- if (flag & FLAG_WIN_UPDATE)
- ack_ev_flags |= CA_ACK_WIN_UPDATE;
-
- tcp_in_ack_event(sk, ack_ev_flags);
}
/* This is a deviation from RFC3168 since it states that:
@@ -3994,6 +3999,8 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag)
tcp_rack_update_reo_wnd(sk, &rs);
+ tcp_in_ack_event(sk, flag);
+
if (tp->tlp_high_seq)
tcp_process_tlp_ack(sk, ack, flag);
@@ -4025,6 +4032,7 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag)
return 1;
no_queue:
+ tcp_in_ack_event(sk, flag);
/* If data was DSACKed, see if we can undo a cwnd reduction. */
if (flag & FLAG_DSACKING_ACK) {
tcp_fastretrans_alert(sk, prior_snd_una, num_dupack, &flag,
diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c
index 62bb9651133c..7e4c8628cf98 100644
--- a/net/ipv6/esp6.c
+++ b/net/ipv6/esp6.c
@@ -135,47 +135,16 @@ static void esp_ssg_unref(struct xfrm_state *x, void *tmp, struct sk_buff *skb)
}
#ifdef CONFIG_INET6_ESPINTCP
-struct esp_tcp_sk {
- struct sock *sk;
- struct rcu_head rcu;
-};
-
-static void esp_free_tcp_sk(struct rcu_head *head)
-{
- struct esp_tcp_sk *esk = container_of(head, struct esp_tcp_sk, rcu);
-
- sock_put(esk->sk);
- kfree(esk);
-}
-
static struct sock *esp6_find_tcp_sk(struct xfrm_state *x)
{
struct xfrm_encap_tmpl *encap = x->encap;
struct net *net = xs_net(x);
- struct esp_tcp_sk *esk;
__be16 sport, dport;
- struct sock *nsk;
struct sock *sk;
- sk = rcu_dereference(x->encap_sk);
- if (sk && sk->sk_state == TCP_ESTABLISHED)
- return sk;
-
spin_lock_bh(&x->lock);
sport = encap->encap_sport;
dport = encap->encap_dport;
- nsk = rcu_dereference_protected(x->encap_sk,
- lockdep_is_held(&x->lock));
- if (sk && sk == nsk) {
- esk = kmalloc(sizeof(*esk), GFP_ATOMIC);
- if (!esk) {
- spin_unlock_bh(&x->lock);
- return ERR_PTR(-ENOMEM);
- }
- RCU_INIT_POINTER(x->encap_sk, NULL);
- esk->sk = sk;
- call_rcu(&esk->rcu, esp_free_tcp_sk);
- }
spin_unlock_bh(&x->lock);
sk = __inet6_lookup_established(net, net->ipv4.tcp_death_row.hashinfo, &x->id.daddr.in6,
@@ -188,20 +157,6 @@ static struct sock *esp6_find_tcp_sk(struct xfrm_state *x)
return ERR_PTR(-EINVAL);
}
- spin_lock_bh(&x->lock);
- nsk = rcu_dereference_protected(x->encap_sk,
- lockdep_is_held(&x->lock));
- if (encap->encap_sport != sport ||
- encap->encap_dport != dport) {
- sock_put(sk);
- sk = nsk ?: ERR_PTR(-EREMCHG);
- } else if (sk == nsk) {
- sock_put(sk);
- } else {
- rcu_assign_pointer(x->encap_sk, sk);
- }
- spin_unlock_bh(&x->lock);
-
return sk;
}
@@ -224,6 +179,8 @@ static int esp_output_tcp_finish(struct xfrm_state *x, struct sk_buff *skb)
err = espintcp_push_skb(sk, skb);
bh_unlock_sock(sk);
+ sock_put(sk);
+
out:
rcu_read_unlock();
return err;
@@ -427,6 +384,8 @@ static struct ip_esp_hdr *esp6_output_tcp_encap(struct xfrm_state *x,
if (IS_ERR(sk))
return ERR_CAST(sk);
+ sock_put(sk);
+
*lenp = htons(len);
esph = (struct ip_esp_hdr *)(lenp + 1);
diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c
index 6eeab21512ba..e0f0c5f8cccd 100644
--- a/net/ipv6/fib6_rules.c
+++ b/net/ipv6/fib6_rules.c
@@ -350,9 +350,9 @@ static int fib6_rule_configure(struct fib_rule *rule, struct sk_buff *skb,
struct nlattr **tb,
struct netlink_ext_ack *extack)
{
+ struct fib6_rule *rule6 = (struct fib6_rule *)rule;
+ struct net *net = rule->fr_net;
int err = -EINVAL;
- struct net *net = sock_net(skb->sk);
- struct fib6_rule *rule6 = (struct fib6_rule *) rule;
if (!inet_validate_dscp(frh->tos)) {
NL_SET_ERR_MSG(extack,
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index c86d5dca29df..28777b142240 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -1452,6 +1452,7 @@ static int ip6_setup_cork(struct sock *sk, struct inet_cork_full *cork,
}
v6_cork->hop_limit = ipc6->hlimit;
v6_cork->tclass = ipc6->tclass;
+ v6_cork->dontfrag = ipc6->dontfrag;
if (rt->dst.flags & DST_XFRM_TUNNEL)
mtu = np->pmtudisc >= IPV6_PMTUDISC_PROBE ?
READ_ONCE(rt->dst.dev->mtu) : dst_mtu(&rt->dst);
@@ -1485,7 +1486,7 @@ static int __ip6_append_data(struct sock *sk,
int getfrag(void *from, char *to, int offset,
int len, int odd, struct sk_buff *skb),
void *from, size_t length, int transhdrlen,
- unsigned int flags, struct ipcm6_cookie *ipc6)
+ unsigned int flags)
{
struct sk_buff *skb, *skb_prev = NULL;
struct inet_cork *cork = &cork_full->base;
@@ -1541,7 +1542,7 @@ static int __ip6_append_data(struct sock *sk,
if (headersize + transhdrlen > mtu)
goto emsgsize;
- if (cork->length + length > mtu - headersize && ipc6->dontfrag &&
+ if (cork->length + length > mtu - headersize && v6_cork->dontfrag &&
(sk->sk_protocol == IPPROTO_UDP ||
sk->sk_protocol == IPPROTO_ICMPV6 ||
sk->sk_protocol == IPPROTO_RAW)) {
@@ -1913,7 +1914,7 @@ int ip6_append_data(struct sock *sk,
return __ip6_append_data(sk, &sk->sk_write_queue, &inet->cork,
&np->cork, sk_page_frag(sk), getfrag,
- from, length, transhdrlen, flags, ipc6);
+ from, length, transhdrlen, flags);
}
EXPORT_SYMBOL_GPL(ip6_append_data);
@@ -2118,7 +2119,7 @@ struct sk_buff *ip6_make_skb(struct sock *sk,
err = __ip6_append_data(sk, &queue, cork, &v6_cork,
¤t->task_frag, getfrag, from,
length + exthdrlen, transhdrlen + exthdrlen,
- flags, ipc6);
+ flags);
if (err) {
__ip6_flush_pending_frames(sk, &queue, cork, &v6_cork);
return ERR_PTR(err);
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c
index cc25fec44f85..19f3de3c24ef 100644
--- a/net/llc/af_llc.c
+++ b/net/llc/af_llc.c
@@ -888,15 +888,15 @@ static int llc_ui_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
if (sk->sk_type != SOCK_STREAM)
goto copy_uaddr;
+ /* Partial read */
+ if (used + offset < skb_len)
+ continue;
+
if (!(flags & MSG_PEEK)) {
skb_unlink(skb, &sk->sk_receive_queue);
kfree_skb(skb);
*seq = 0;
}
-
- /* Partial read */
- if (used + offset < skb_len)
- continue;
} while (len > 0);
out:
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 42e2c84ed248..2c7e139efd53 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -2959,7 +2959,8 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
if (tx)
ieee80211_flush_queues(local, sdata, false);
- drv_mgd_complete_tx(sdata->local, sdata, &info);
+ if (tx || frame_buf)
+ drv_mgd_complete_tx(sdata->local, sdata, &info);
/* clear AP addr only after building the needed mgmt frames */
eth_zero_addr(sdata->deflink.u.mgd.bssid);
@@ -7821,7 +7822,6 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
ieee80211_report_disconnect(sdata, frame_buf,
sizeof(frame_buf), true,
req->reason_code, false);
- drv_mgd_complete_tx(sdata->local, sdata, &info);
return 0;
}
diff --git a/net/netfilter/nf_conntrack_standalone.c b/net/netfilter/nf_conntrack_standalone.c
index 559665467b04..1d5de1d9f008 100644
--- a/net/netfilter/nf_conntrack_standalone.c
+++ b/net/netfilter/nf_conntrack_standalone.c
@@ -621,7 +621,9 @@ static struct ctl_table nf_ct_sysctl_table[] = {
.data = &nf_conntrack_max,
.maxlen = sizeof(int),
.mode = 0644,
- .proc_handler = proc_dointvec,
+ .proc_handler = proc_dointvec_minmax,
+ .extra1 = SYSCTL_ZERO,
+ .extra2 = SYSCTL_INT_MAX,
},
[NF_SYSCTL_CT_COUNT] = {
.procname = "nf_conntrack_count",
@@ -657,7 +659,9 @@ static struct ctl_table nf_ct_sysctl_table[] = {
.data = &nf_ct_expect_max,
.maxlen = sizeof(int),
.mode = 0644,
- .proc_handler = proc_dointvec,
+ .proc_handler = proc_dointvec_minmax,
+ .extra1 = SYSCTL_ONE,
+ .extra2 = SYSCTL_INT_MAX,
},
[NF_SYSCTL_CT_ACCT] = {
.procname = "nf_conntrack_acct",
@@ -951,7 +955,9 @@ static struct ctl_table nf_ct_netfilter_table[] = {
.data = &nf_conntrack_max,
.maxlen = sizeof(int),
.mode = 0644,
- .proc_handler = proc_dointvec,
+ .proc_handler = proc_dointvec_minmax,
+ .extra1 = SYSCTL_ZERO,
+ .extra2 = SYSCTL_INT_MAX,
},
{ }
};
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c
index 5d9cccfac4a1..afcb83d469ff 100644
--- a/net/sched/sch_hfsc.c
+++ b/net/sched/sch_hfsc.c
@@ -175,6 +175,11 @@ struct hfsc_sched {
#define HT_INFINITY 0xffffffffffffffffULL /* infinite time value */
+static bool cl_in_el_or_vttree(struct hfsc_class *cl)
+{
+ return ((cl->cl_flags & HFSC_FSC) && cl->cl_nactive) ||
+ ((cl->cl_flags & HFSC_RSC) && !RB_EMPTY_NODE(&cl->el_node));
+}
/*
* eligible tree holds backlogged classes being sorted by their eligible times.
@@ -1040,6 +1045,8 @@ hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid,
if (cl == NULL)
return -ENOBUFS;
+ RB_CLEAR_NODE(&cl->el_node);
+
err = tcf_block_get(&cl->block, &cl->filter_list, sch, extack);
if (err) {
kfree(cl);
@@ -1570,7 +1577,10 @@ hfsc_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free)
return err;
}
- if (first && !cl->cl_nactive) {
+ sch->qstats.backlog += len;
+ sch->q.qlen++;
+
+ if (first && !cl_in_el_or_vttree(cl)) {
if (cl->cl_flags & HFSC_RSC)
init_ed(cl, len);
if (cl->cl_flags & HFSC_FSC)
@@ -1585,9 +1595,6 @@ hfsc_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free)
}
- sch->qstats.backlog += len;
- sch->q.qlen++;
-
return NET_XMIT_SUCCESS;
}
diff --git a/net/smc/smc_pnet.c b/net/smc/smc_pnet.c
index dbcc72b43d0c..d44d7f427fc9 100644
--- a/net/smc/smc_pnet.c
+++ b/net/smc/smc_pnet.c
@@ -1084,14 +1084,16 @@ static void smc_pnet_find_roce_by_pnetid(struct net_device *ndev,
struct smc_init_info *ini)
{
u8 ndev_pnetid[SMC_MAX_PNETID_LEN];
+ struct net_device *base_ndev;
struct net *net;
- ndev = pnet_find_base_ndev(ndev);
+ base_ndev = pnet_find_base_ndev(ndev);
net = dev_net(ndev);
- if (smc_pnetid_by_dev_port(ndev->dev.parent, ndev->dev_port,
+ if (smc_pnetid_by_dev_port(base_ndev->dev.parent, base_ndev->dev_port,
ndev_pnetid) &&
+ smc_pnet_find_ndev_pnetid_by_table(base_ndev, ndev_pnetid) &&
smc_pnet_find_ndev_pnetid_by_table(ndev, ndev_pnetid)) {
- smc_pnet_find_rdma_dev(ndev, ini);
+ smc_pnet_find_rdma_dev(base_ndev, ini);
return; /* pnetid could not be determined */
}
_smc_pnet_find_roce_by_pnetid(ndev_pnetid, ini, NULL, net);
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 142ee6554848..4ffb2bcaf364 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -275,9 +275,6 @@ static struct rpc_xprt *rpc_clnt_set_transport(struct rpc_clnt *clnt,
old = rcu_dereference_protected(clnt->cl_xprt,
lockdep_is_held(&clnt->cl_lock));
- if (!xprt_bound(xprt))
- clnt->cl_autobind = 1;
-
clnt->cl_timeout = timeout;
rcu_assign_pointer(clnt->cl_xprt, xprt);
spin_unlock(&clnt->cl_lock);
diff --git a/net/sunrpc/rpcb_clnt.c b/net/sunrpc/rpcb_clnt.c
index 102c3818bc54..53bcca365fb1 100644
--- a/net/sunrpc/rpcb_clnt.c
+++ b/net/sunrpc/rpcb_clnt.c
@@ -820,9 +820,10 @@ static void rpcb_getport_done(struct rpc_task *child, void *data)
}
trace_rpcb_setport(child, map->r_status, map->r_port);
- xprt->ops->set_port(xprt, map->r_port);
- if (map->r_port)
+ if (map->r_port) {
+ xprt->ops->set_port(xprt, map->r_port);
xprt_set_bound(xprt);
+ }
}
/*
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c
index 9b45fbdc90ca..73bc39281ef5 100644
--- a/net/sunrpc/sched.c
+++ b/net/sunrpc/sched.c
@@ -276,6 +276,8 @@ EXPORT_SYMBOL_GPL(rpc_destroy_wait_queue);
static int rpc_wait_bit_killable(struct wait_bit_key *key, int mode)
{
+ if (unlikely(current->flags & PF_EXITING))
+ return -EINTR;
schedule();
if (signal_pending_state(mode, current))
return -ERESTARTSYS;
diff --git a/net/tipc/crypto.c b/net/tipc/crypto.c
index c524421ec652..8584893b4785 100644
--- a/net/tipc/crypto.c
+++ b/net/tipc/crypto.c
@@ -817,12 +817,16 @@ static int tipc_aead_encrypt(struct tipc_aead *aead, struct sk_buff *skb,
goto exit;
}
+ /* Get net to avoid freed tipc_crypto when delete namespace */
+ get_net(aead->crypto->net);
+
/* Now, do encrypt */
rc = crypto_aead_encrypt(req);
if (rc == -EINPROGRESS || rc == -EBUSY)
return rc;
tipc_bearer_put(b);
+ put_net(aead->crypto->net);
exit:
kfree(ctx);
@@ -860,6 +864,7 @@ static void tipc_aead_encrypt_done(void *data, int err)
kfree(tx_ctx);
tipc_bearer_put(b);
tipc_aead_put(aead);
+ put_net(net);
}
/**
diff --git a/net/unix/Kconfig b/net/unix/Kconfig
index 28b232f281ab..8b5d04210d7c 100644
--- a/net/unix/Kconfig
+++ b/net/unix/Kconfig
@@ -16,11 +16,6 @@ config UNIX
Say Y unless you know what you are doing.
-config UNIX_SCM
- bool
- depends on UNIX
- default y
-
config AF_UNIX_OOB
bool
depends on UNIX
diff --git a/net/unix/Makefile b/net/unix/Makefile
index 20491825b4d0..4ddd125c4642 100644
--- a/net/unix/Makefile
+++ b/net/unix/Makefile
@@ -11,5 +11,3 @@ unix-$(CONFIG_BPF_SYSCALL) += unix_bpf.o
obj-$(CONFIG_UNIX_DIAG) += unix_diag.o
unix_diag-y := diag.o
-
-obj-$(CONFIG_UNIX_SCM) += scm.o
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index ab23c8d72122..236a2cd2bc93 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -117,8 +117,6 @@
#include <linux/file.h>
#include <linux/btf_ids.h>
-#include "scm.h"
-
static atomic_long_t unix_nr_socks;
static struct hlist_head bsd_socket_buckets[UNIX_HASH_SIZE / 2];
static spinlock_t bsd_socket_locks[UNIX_HASH_SIZE / 2];
@@ -980,11 +978,11 @@ static struct sock *unix_create1(struct net *net, struct socket *sock, int kern,
sk->sk_max_ack_backlog = READ_ONCE(net->unx.sysctl_max_dgram_qlen);
sk->sk_destruct = unix_sock_destructor;
u = unix_sk(sk);
- u->inflight = 0;
+ u->listener = NULL;
+ u->vertex = NULL;
u->path.dentry = NULL;
u->path.mnt = NULL;
spin_lock_init(&u->lock);
- INIT_LIST_HEAD(&u->link);
mutex_init(&u->iolock); /* single task reading lock */
mutex_init(&u->bindlock); /* single task binding lock */
init_waitqueue_head(&u->peer_wait);
@@ -1583,6 +1581,7 @@ static int unix_stream_connect(struct socket *sock, struct sockaddr *uaddr,
newsk->sk_type = sk->sk_type;
init_peercred(newsk);
newu = unix_sk(newsk);
+ newu->listener = other;
RCU_INIT_POINTER(newsk->sk_wq, &newu->peer_wq);
otheru = unix_sk(other);
@@ -1678,8 +1677,8 @@ static int unix_accept(struct socket *sock, struct socket *newsock, int flags,
bool kern)
{
struct sock *sk = sock->sk;
- struct sock *tsk;
struct sk_buff *skb;
+ struct sock *tsk;
int err;
err = -EOPNOTSUPP;
@@ -1709,6 +1708,7 @@ static int unix_accept(struct socket *sock, struct socket *newsock, int flags,
/* attach accepted sock to socket */
unix_state_lock(tsk);
+ unix_update_edges(unix_sk(tsk));
newsock->state = SS_CONNECTED;
unix_sock_inherit_flags(sock, newsock);
sock_graft(tsk, newsock);
@@ -1752,51 +1752,65 @@ static int unix_getname(struct socket *sock, struct sockaddr *uaddr, int peer)
return err;
}
+/* The "user->unix_inflight" variable is protected by the garbage
+ * collection lock, and we just read it locklessly here. If you go
+ * over the limit, there might be a tiny race in actually noticing
+ * it across threads. Tough.
+ */
+static inline bool too_many_unix_fds(struct task_struct *p)
+{
+ struct user_struct *user = current_user();
+
+ if (unlikely(READ_ONCE(user->unix_inflight) > task_rlimit(p, RLIMIT_NOFILE)))
+ return !capable(CAP_SYS_RESOURCE) && !capable(CAP_SYS_ADMIN);
+ return false;
+}
+
+static int unix_attach_fds(struct scm_cookie *scm, struct sk_buff *skb)
+{
+ if (too_many_unix_fds(current))
+ return -ETOOMANYREFS;
+
+ /* Need to duplicate file references for the sake of garbage
+ * collection. Otherwise a socket in the fps might become a
+ * candidate for GC while the skb is not yet queued.
+ */
+ UNIXCB(skb).fp = scm_fp_dup(scm->fp);
+ if (!UNIXCB(skb).fp)
+ return -ENOMEM;
+
+ if (unix_prepare_fpl(UNIXCB(skb).fp))
+ return -ENOMEM;
+
+ return 0;
+}
+
+static void unix_detach_fds(struct scm_cookie *scm, struct sk_buff *skb)
+{
+ scm->fp = UNIXCB(skb).fp;
+ UNIXCB(skb).fp = NULL;
+
+ unix_destroy_fpl(scm->fp);
+}
+
static void unix_peek_fds(struct scm_cookie *scm, struct sk_buff *skb)
{
scm->fp = scm_fp_dup(UNIXCB(skb).fp);
+}
- /*
- * Garbage collection of unix sockets starts by selecting a set of
- * candidate sockets which have reference only from being in flight
- * (total_refs == inflight_refs). This condition is checked once during
- * the candidate collection phase, and candidates are marked as such, so
- * that non-candidates can later be ignored. While inflight_refs is
- * protected by unix_gc_lock, total_refs (file count) is not, hence this
- * is an instantaneous decision.
- *
- * Once a candidate, however, the socket must not be reinstalled into a
- * file descriptor while the garbage collection is in progress.
- *
- * If the above conditions are met, then the directed graph of
- * candidates (*) does not change while unix_gc_lock is held.
- *
- * Any operations that changes the file count through file descriptors
- * (dup, close, sendmsg) does not change the graph since candidates are
- * not installed in fds.
- *
- * Dequeing a candidate via recvmsg would install it into an fd, but
- * that takes unix_gc_lock to decrement the inflight count, so it's
- * serialized with garbage collection.
- *
- * MSG_PEEK is special in that it does not change the inflight count,
- * yet does install the socket into an fd. The following lock/unlock
- * pair is to ensure serialization with garbage collection. It must be
- * done between incrementing the file count and installing the file into
- * an fd.
- *
- * If garbage collection starts after the barrier provided by the
- * lock/unlock, then it will see the elevated refcount and not mark this
- * as a candidate. If a garbage collection is already in progress
- * before the file count was incremented, then the lock/unlock pair will
- * ensure that garbage collection is finished before progressing to
- * installing the fd.
- *
- * (*) A -> B where B is on the queue of A or B is on the queue of C
- * which is on the queue of listening socket A.
- */
- spin_lock(&unix_gc_lock);
- spin_unlock(&unix_gc_lock);
+static void unix_destruct_scm(struct sk_buff *skb)
+{
+ struct scm_cookie scm;
+
+ memset(&scm, 0, sizeof(scm));
+ scm.pid = UNIXCB(skb).pid;
+ if (UNIXCB(skb).fp)
+ unix_detach_fds(&scm, skb);
+
+ /* Alas, it calls VFS */
+ /* So fscking what? fput() had been SMP-safe since the last Summer */
+ scm_destroy(&scm);
+ sock_wfree(skb);
}
static int unix_scm_to_skb(struct scm_cookie *scm, struct sk_buff *skb, bool send_fds)
@@ -1855,8 +1869,10 @@ static void scm_stat_add(struct sock *sk, struct sk_buff *skb)
struct scm_fp_list *fp = UNIXCB(skb).fp;
struct unix_sock *u = unix_sk(sk);
- if (unlikely(fp && fp->count))
+ if (unlikely(fp && fp->count)) {
atomic_add(fp->count, &u->scm_stat.nr_fds);
+ unix_add_edges(fp, u);
+ }
}
static void scm_stat_del(struct sock *sk, struct sk_buff *skb)
@@ -1864,8 +1880,10 @@ static void scm_stat_del(struct sock *sk, struct sk_buff *skb)
struct scm_fp_list *fp = UNIXCB(skb).fp;
struct unix_sock *u = unix_sk(sk);
- if (unlikely(fp && fp->count))
+ if (unlikely(fp && fp->count)) {
atomic_sub(fp->count, &u->scm_stat.nr_fds);
+ unix_del_edges(fp);
+ }
}
/*
@@ -1885,11 +1903,12 @@ static int unix_dgram_sendmsg(struct socket *sock, struct msghdr *msg,
long timeo;
int err;
- wait_for_unix_gc();
err = scm_send(sock, msg, &scm, false);
if (err < 0)
return err;
+ wait_for_unix_gc(scm.fp);
+
err = -EOPNOTSUPP;
if (msg->msg_flags&MSG_OOB)
goto out;
@@ -2157,11 +2176,12 @@ static int unix_stream_sendmsg(struct socket *sock, struct msghdr *msg,
bool fds_sent = false;
int data_len;
- wait_for_unix_gc();
err = scm_send(sock, msg, &scm, false);
if (err < 0)
return err;
+ wait_for_unix_gc(scm.fp);
+
err = -EOPNOTSUPP;
if (msg->msg_flags & MSG_OOB) {
#if IS_ENABLED(CONFIG_AF_UNIX_OOB)
diff --git a/net/unix/garbage.c b/net/unix/garbage.c
index 2a758531e102..23efb78fe9ef 100644
--- a/net/unix/garbage.c
+++ b/net/unix/garbage.c
@@ -81,278 +81,551 @@
#include <net/scm.h>
#include <net/tcp_states.h>
-#include "scm.h"
+struct unix_sock *unix_get_socket(struct file *filp)
+{
+ struct inode *inode = file_inode(filp);
+
+ /* Socket ? */
+ if (S_ISSOCK(inode->i_mode) && !(filp->f_mode & FMODE_PATH)) {
+ struct socket *sock = SOCKET_I(inode);
+ const struct proto_ops *ops;
+ struct sock *sk = sock->sk;
-/* Internal data structures and random procedures: */
+ ops = READ_ONCE(sock->ops);
-static LIST_HEAD(gc_candidates);
-static DECLARE_WAIT_QUEUE_HEAD(unix_gc_wait);
+ /* PF_UNIX ? */
+ if (sk && ops && ops->family == PF_UNIX)
+ return unix_sk(sk);
+ }
-static void scan_inflight(struct sock *x, void (*func)(struct unix_sock *),
- struct sk_buff_head *hitlist)
+ return NULL;
+}
+
+static struct unix_vertex *unix_edge_successor(struct unix_edge *edge)
{
- struct sk_buff *skb;
- struct sk_buff *next;
-
- spin_lock(&x->sk_receive_queue.lock);
- skb_queue_walk_safe(&x->sk_receive_queue, skb, next) {
- /* Do we have file descriptors ? */
- if (UNIXCB(skb).fp) {
- bool hit = false;
- /* Process the descriptors of this socket */
- int nfd = UNIXCB(skb).fp->count;
- struct file **fp = UNIXCB(skb).fp->fp;
-
- while (nfd--) {
- /* Get the socket the fd matches if it indeed does so */
- struct sock *sk = unix_get_socket(*fp++);
-
- if (sk) {
- struct unix_sock *u = unix_sk(sk);
-
- /* Ignore non-candidates, they could
- * have been added to the queues after
- * starting the garbage collection
- */
- if (test_bit(UNIX_GC_CANDIDATE, &u->gc_flags)) {
- hit = true;
-
- func(u);
- }
- }
- }
- if (hit && hitlist != NULL) {
- __skb_unlink(skb, &x->sk_receive_queue);
- __skb_queue_tail(hitlist, skb);
- }
- }
+ /* If an embryo socket has a fd,
+ * the listener indirectly holds the fd's refcnt.
+ */
+ if (edge->successor->listener)
+ return unix_sk(edge->successor->listener)->vertex;
+
+ return edge->successor->vertex;
+}
+
+static bool unix_graph_maybe_cyclic;
+static bool unix_graph_grouped;
+
+static void unix_update_graph(struct unix_vertex *vertex)
+{
+ /* If the receiver socket is not inflight, no cyclic
+ * reference could be formed.
+ */
+ if (!vertex)
+ return;
+
+ unix_graph_maybe_cyclic = true;
+ unix_graph_grouped = false;
+}
+
+static LIST_HEAD(unix_unvisited_vertices);
+
+enum unix_vertex_index {
+ UNIX_VERTEX_INDEX_MARK1,
+ UNIX_VERTEX_INDEX_MARK2,
+ UNIX_VERTEX_INDEX_START,
+};
+
+static unsigned long unix_vertex_unvisited_index = UNIX_VERTEX_INDEX_MARK1;
+
+static void unix_add_edge(struct scm_fp_list *fpl, struct unix_edge *edge)
+{
+ struct unix_vertex *vertex = edge->predecessor->vertex;
+
+ if (!vertex) {
+ vertex = list_first_entry(&fpl->vertices, typeof(*vertex), entry);
+ vertex->index = unix_vertex_unvisited_index;
+ vertex->out_degree = 0;
+ INIT_LIST_HEAD(&vertex->edges);
+ INIT_LIST_HEAD(&vertex->scc_entry);
+
+ list_move_tail(&vertex->entry, &unix_unvisited_vertices);
+ edge->predecessor->vertex = vertex;
}
- spin_unlock(&x->sk_receive_queue.lock);
+
+ vertex->out_degree++;
+ list_add_tail(&edge->vertex_entry, &vertex->edges);
+
+ unix_update_graph(unix_edge_successor(edge));
}
-static void scan_children(struct sock *x, void (*func)(struct unix_sock *),
- struct sk_buff_head *hitlist)
+static void unix_del_edge(struct scm_fp_list *fpl, struct unix_edge *edge)
{
- if (x->sk_state != TCP_LISTEN) {
- scan_inflight(x, func, hitlist);
- } else {
- struct sk_buff *skb;
- struct sk_buff *next;
- struct unix_sock *u;
- LIST_HEAD(embryos);
+ struct unix_vertex *vertex = edge->predecessor->vertex;
- /* For a listening socket collect the queued embryos
- * and perform a scan on them as well.
- */
- spin_lock(&x->sk_receive_queue.lock);
- skb_queue_walk_safe(&x->sk_receive_queue, skb, next) {
- u = unix_sk(skb->sk);
+ if (!fpl->dead)
+ unix_update_graph(unix_edge_successor(edge));
- /* An embryo cannot be in-flight, so it's safe
- * to use the list link.
- */
- BUG_ON(!list_empty(&u->link));
- list_add_tail(&u->link, &embryos);
- }
- spin_unlock(&x->sk_receive_queue.lock);
+ list_del(&edge->vertex_entry);
+ vertex->out_degree--;
- while (!list_empty(&embryos)) {
- u = list_entry(embryos.next, struct unix_sock, link);
- scan_inflight(&u->sk, func, hitlist);
- list_del_init(&u->link);
- }
+ if (!vertex->out_degree) {
+ edge->predecessor->vertex = NULL;
+ list_move_tail(&vertex->entry, &fpl->vertices);
}
}
-static void dec_inflight(struct unix_sock *usk)
+static void unix_free_vertices(struct scm_fp_list *fpl)
{
- usk->inflight--;
+ struct unix_vertex *vertex, *next_vertex;
+
+ list_for_each_entry_safe(vertex, next_vertex, &fpl->vertices, entry) {
+ list_del(&vertex->entry);
+ kfree(vertex);
+ }
}
-static void inc_inflight(struct unix_sock *usk)
+static DEFINE_SPINLOCK(unix_gc_lock);
+unsigned int unix_tot_inflight;
+
+void unix_add_edges(struct scm_fp_list *fpl, struct unix_sock *receiver)
{
- usk->inflight++;
+ int i = 0, j = 0;
+
+ spin_lock(&unix_gc_lock);
+
+ if (!fpl->count_unix)
+ goto out;
+
+ do {
+ struct unix_sock *inflight = unix_get_socket(fpl->fp[j++]);
+ struct unix_edge *edge;
+
+ if (!inflight)
+ continue;
+
+ edge = fpl->edges + i++;
+ edge->predecessor = inflight;
+ edge->successor = receiver;
+
+ unix_add_edge(fpl, edge);
+ } while (i < fpl->count_unix);
+
+ receiver->scm_stat.nr_unix_fds += fpl->count_unix;
+ WRITE_ONCE(unix_tot_inflight, unix_tot_inflight + fpl->count_unix);
+out:
+ WRITE_ONCE(fpl->user->unix_inflight, fpl->user->unix_inflight + fpl->count);
+
+ spin_unlock(&unix_gc_lock);
+
+ fpl->inflight = true;
+
+ unix_free_vertices(fpl);
}
-static void inc_inflight_move_tail(struct unix_sock *u)
+void unix_del_edges(struct scm_fp_list *fpl)
{
- u->inflight++;
+ struct unix_sock *receiver;
+ int i = 0;
+
+ spin_lock(&unix_gc_lock);
- /* If this still might be part of a cycle, move it to the end
- * of the list, so that it's checked even if it was already
- * passed over
+ if (!fpl->count_unix)
+ goto out;
+
+ do {
+ struct unix_edge *edge = fpl->edges + i++;
+
+ unix_del_edge(fpl, edge);
+ } while (i < fpl->count_unix);
+
+ if (!fpl->dead) {
+ receiver = fpl->edges[0].successor;
+ receiver->scm_stat.nr_unix_fds -= fpl->count_unix;
+ }
+ WRITE_ONCE(unix_tot_inflight, unix_tot_inflight - fpl->count_unix);
+out:
+ WRITE_ONCE(fpl->user->unix_inflight, fpl->user->unix_inflight - fpl->count);
+
+ spin_unlock(&unix_gc_lock);
+
+ fpl->inflight = false;
+}
+
+void unix_update_edges(struct unix_sock *receiver)
+{
+ /* nr_unix_fds is only updated under unix_state_lock().
+ * If it's 0 here, the embryo socket is not part of the
+ * inflight graph, and GC will not see it, so no lock needed.
*/
- if (test_bit(UNIX_GC_MAYBE_CYCLE, &u->gc_flags))
- list_move_tail(&u->link, &gc_candidates);
+ if (!receiver->scm_stat.nr_unix_fds) {
+ receiver->listener = NULL;
+ } else {
+ spin_lock(&unix_gc_lock);
+ unix_update_graph(unix_sk(receiver->listener)->vertex);
+ receiver->listener = NULL;
+ spin_unlock(&unix_gc_lock);
+ }
}
-static bool gc_in_progress;
-#define UNIX_INFLIGHT_TRIGGER_GC 16000
+int unix_prepare_fpl(struct scm_fp_list *fpl)
+{
+ struct unix_vertex *vertex;
+ int i;
+
+ if (!fpl->count_unix)
+ return 0;
+
+ for (i = 0; i < fpl->count_unix; i++) {
+ vertex = kmalloc(sizeof(*vertex), GFP_KERNEL);
+ if (!vertex)
+ goto err;
+
+ list_add(&vertex->entry, &fpl->vertices);
+ }
+
+ fpl->edges = kvmalloc_array(fpl->count_unix, sizeof(*fpl->edges),
+ GFP_KERNEL_ACCOUNT);
+ if (!fpl->edges)
+ goto err;
+
+ return 0;
-void wait_for_unix_gc(void)
+err:
+ unix_free_vertices(fpl);
+ return -ENOMEM;
+}
+
+void unix_destroy_fpl(struct scm_fp_list *fpl)
{
- /* If number of inflight sockets is insane,
- * force a garbage collect right now.
- * Paired with the WRITE_ONCE() in unix_inflight(),
- * unix_notinflight() and gc_in_progress().
- */
- if (READ_ONCE(unix_tot_inflight) > UNIX_INFLIGHT_TRIGGER_GC &&
- !READ_ONCE(gc_in_progress))
- unix_gc();
- wait_event(unix_gc_wait, !READ_ONCE(gc_in_progress));
+ if (fpl->inflight)
+ unix_del_edges(fpl);
+
+ kvfree(fpl->edges);
+ unix_free_vertices(fpl);
}
-/* The external entry point: unix_gc() */
-void unix_gc(void)
+static bool unix_vertex_dead(struct unix_vertex *vertex)
{
- struct sk_buff *next_skb, *skb;
+ struct unix_edge *edge;
struct unix_sock *u;
- struct unix_sock *next;
- struct sk_buff_head hitlist;
- struct list_head cursor;
- LIST_HEAD(not_cycle_list);
+ long total_ref;
- spin_lock(&unix_gc_lock);
+ list_for_each_entry(edge, &vertex->edges, vertex_entry) {
+ struct unix_vertex *next_vertex = unix_edge_successor(edge);
- /* Avoid a recursive GC. */
- if (gc_in_progress)
- goto out;
+ /* The vertex's fd can be received by a non-inflight socket. */
+ if (!next_vertex)
+ return false;
- /* Paired with READ_ONCE() in wait_for_unix_gc(). */
- WRITE_ONCE(gc_in_progress, true);
+ /* The vertex's fd can be received by an inflight socket in
+ * another SCC.
+ */
+ if (next_vertex->scc_index != vertex->scc_index)
+ return false;
+ }
- /* First, select candidates for garbage collection. Only
- * in-flight sockets are considered, and from those only ones
- * which don't have any external reference.
- *
- * Holding unix_gc_lock will protect these candidates from
- * being detached, and hence from gaining an external
- * reference. Since there are no possible receivers, all
- * buffers currently on the candidates' queues stay there
- * during the garbage collection.
- *
- * We also know that no new candidate can be added onto the
- * receive queues. Other, non candidate sockets _can_ be
- * added to queue, so we must make sure only to touch
- * candidates.
- *
- * Embryos, though never candidates themselves, affect which
- * candidates are reachable by the garbage collector. Before
- * being added to a listener's queue, an embryo may already
- * receive data carrying SCM_RIGHTS, potentially making the
- * passed socket a candidate that is not yet reachable by the
- * collector. It becomes reachable once the embryo is
- * enqueued. Therefore, we must ensure that no SCM-laden
- * embryo appears in a (candidate) listener's queue between
- * consecutive scan_children() calls.
- */
- list_for_each_entry_safe(u, next, &gc_inflight_list, link) {
- struct sock *sk = &u->sk;
- long total_refs;
-
- total_refs = file_count(sk->sk_socket->file);
-
- BUG_ON(!u->inflight);
- BUG_ON(total_refs < u->inflight);
- if (total_refs == u->inflight) {
- list_move_tail(&u->link, &gc_candidates);
- __set_bit(UNIX_GC_CANDIDATE, &u->gc_flags);
- __set_bit(UNIX_GC_MAYBE_CYCLE, &u->gc_flags);
-
- if (sk->sk_state == TCP_LISTEN) {
- unix_state_lock_nested(sk, U_LOCK_GC_LISTENER);
- unix_state_unlock(sk);
+ /* No receiver exists out of the same SCC. */
+
+ edge = list_first_entry(&vertex->edges, typeof(*edge), vertex_entry);
+ u = edge->predecessor;
+ total_ref = file_count(u->sk.sk_socket->file);
+
+ /* If not close()d, total_ref > out_degree. */
+ if (total_ref != vertex->out_degree)
+ return false;
+
+ return true;
+}
+
+enum unix_recv_queue_lock_class {
+ U_RECVQ_LOCK_NORMAL,
+ U_RECVQ_LOCK_EMBRYO,
+};
+
+static void unix_collect_queue(struct unix_sock *u, struct sk_buff_head *hitlist)
+{
+ skb_queue_splice_init(&u->sk.sk_receive_queue, hitlist);
+
+#if IS_ENABLED(CONFIG_AF_UNIX_OOB)
+ if (u->oob_skb) {
+ WARN_ON_ONCE(skb_unref(u->oob_skb));
+ u->oob_skb = NULL;
+ }
+#endif
+}
+
+static void unix_collect_skb(struct list_head *scc, struct sk_buff_head *hitlist)
+{
+ struct unix_vertex *vertex;
+
+ list_for_each_entry_reverse(vertex, scc, scc_entry) {
+ struct sk_buff_head *queue;
+ struct unix_edge *edge;
+ struct unix_sock *u;
+
+ edge = list_first_entry(&vertex->edges, typeof(*edge), vertex_entry);
+ u = edge->predecessor;
+ queue = &u->sk.sk_receive_queue;
+
+ spin_lock(&queue->lock);
+
+ if (u->sk.sk_state == TCP_LISTEN) {
+ struct sk_buff *skb;
+
+ skb_queue_walk(queue, skb) {
+ struct sk_buff_head *embryo_queue = &skb->sk->sk_receive_queue;
+
+ /* listener -> embryo order, the inversion never happens. */
+ spin_lock_nested(&embryo_queue->lock, U_RECVQ_LOCK_EMBRYO);
+ unix_collect_queue(unix_sk(skb->sk), hitlist);
+ spin_unlock(&embryo_queue->lock);
}
+ } else {
+ unix_collect_queue(u, hitlist);
}
+
+ spin_unlock(&queue->lock);
}
+}
- /* Now remove all internal in-flight reference to children of
- * the candidates.
- */
- list_for_each_entry(u, &gc_candidates, link)
- scan_children(&u->sk, dec_inflight, NULL);
+static bool unix_scc_cyclic(struct list_head *scc)
+{
+ struct unix_vertex *vertex;
+ struct unix_edge *edge;
- /* Restore the references for children of all candidates,
- * which have remaining references. Do this recursively, so
- * only those remain, which form cyclic references.
- *
- * Use a "cursor" link, to make the list traversal safe, even
- * though elements might be moved about.
+ /* SCC containing multiple vertices ? */
+ if (!list_is_singular(scc))
+ return true;
+
+ vertex = list_first_entry(scc, typeof(*vertex), scc_entry);
+
+ /* Self-reference or a embryo-listener circle ? */
+ list_for_each_entry(edge, &vertex->edges, vertex_entry) {
+ if (unix_edge_successor(edge) == vertex)
+ return true;
+ }
+
+ return false;
+}
+
+static LIST_HEAD(unix_visited_vertices);
+static unsigned long unix_vertex_grouped_index = UNIX_VERTEX_INDEX_MARK2;
+
+static void __unix_walk_scc(struct unix_vertex *vertex, unsigned long *last_index,
+ struct sk_buff_head *hitlist)
+{
+ LIST_HEAD(vertex_stack);
+ struct unix_edge *edge;
+ LIST_HEAD(edge_stack);
+
+next_vertex:
+ /* Push vertex to vertex_stack and mark it as on-stack
+ * (index >= UNIX_VERTEX_INDEX_START).
+ * The vertex will be popped when finalising SCC later.
*/
- list_add(&cursor, &gc_candidates);
- while (cursor.next != &gc_candidates) {
- u = list_entry(cursor.next, struct unix_sock, link);
+ list_add(&vertex->scc_entry, &vertex_stack);
+
+ vertex->index = *last_index;
+ vertex->scc_index = *last_index;
+ (*last_index)++;
+
+ /* Explore neighbour vertices (receivers of the current vertex's fd). */
+ list_for_each_entry(edge, &vertex->edges, vertex_entry) {
+ struct unix_vertex *next_vertex = unix_edge_successor(edge);
+
+ if (!next_vertex)
+ continue;
+
+ if (next_vertex->index == unix_vertex_unvisited_index) {
+ /* Iterative deepening depth first search
+ *
+ * 1. Push a forward edge to edge_stack and set
+ * the successor to vertex for the next iteration.
+ */
+ list_add(&edge->stack_entry, &edge_stack);
- /* Move cursor to after the current position. */
- list_move(&cursor, &u->link);
+ vertex = next_vertex;
+ goto next_vertex;
- if (u->inflight) {
- list_move_tail(&u->link, ¬_cycle_list);
- __clear_bit(UNIX_GC_MAYBE_CYCLE, &u->gc_flags);
- scan_children(&u->sk, inc_inflight_move_tail, NULL);
+ /* 2. Pop the edge directed to the current vertex
+ * and restore the ancestor for backtracking.
+ */
+prev_vertex:
+ edge = list_first_entry(&edge_stack, typeof(*edge), stack_entry);
+ list_del_init(&edge->stack_entry);
+
+ next_vertex = vertex;
+ vertex = edge->predecessor->vertex;
+
+ /* If the successor has a smaller scc_index, two vertices
+ * are in the same SCC, so propagate the smaller scc_index
+ * to skip SCC finalisation.
+ */
+ vertex->scc_index = min(vertex->scc_index, next_vertex->scc_index);
+ } else if (next_vertex->index != unix_vertex_grouped_index) {
+ /* Loop detected by a back/cross edge.
+ *
+ * The successor is on vertex_stack, so two vertices are in
+ * the same SCC. If the successor has a smaller *scc_index*,
+ * propagate it to skip SCC finalisation.
+ */
+ vertex->scc_index = min(vertex->scc_index, next_vertex->scc_index);
+ } else {
+ /* The successor was already grouped as another SCC */
}
}
- list_del(&cursor);
- /* Now gc_candidates contains only garbage. Restore original
- * inflight counters for these as well, and remove the skbuffs
- * which are creating the cycle(s).
- */
- skb_queue_head_init(&hitlist);
- list_for_each_entry(u, &gc_candidates, link) {
- scan_children(&u->sk, inc_inflight, &hitlist);
+ if (vertex->index == vertex->scc_index) {
+ struct unix_vertex *v;
+ struct list_head scc;
+ bool scc_dead = true;
-#if IS_ENABLED(CONFIG_AF_UNIX_OOB)
- if (u->oob_skb) {
- kfree_skb(u->oob_skb);
- u->oob_skb = NULL;
+ /* SCC finalised.
+ *
+ * If the scc_index was not updated, all the vertices above on
+ * vertex_stack are in the same SCC. Group them using scc_entry.
+ */
+ __list_cut_position(&scc, &vertex_stack, &vertex->scc_entry);
+
+ list_for_each_entry_reverse(v, &scc, scc_entry) {
+ /* Don't restart DFS from this vertex in unix_walk_scc(). */
+ list_move_tail(&v->entry, &unix_visited_vertices);
+
+ /* Mark vertex as off-stack. */
+ v->index = unix_vertex_grouped_index;
+
+ if (scc_dead)
+ scc_dead = unix_vertex_dead(v);
}
-#endif
+
+ if (scc_dead)
+ unix_collect_skb(&scc, hitlist);
+ else if (!unix_graph_maybe_cyclic)
+ unix_graph_maybe_cyclic = unix_scc_cyclic(&scc);
+
+ list_del(&scc);
}
- /* not_cycle_list contains those sockets which do not make up a
- * cycle. Restore these to the inflight list.
+ /* Need backtracking ? */
+ if (!list_empty(&edge_stack))
+ goto prev_vertex;
+}
+
+static void unix_walk_scc(struct sk_buff_head *hitlist)
+{
+ unsigned long last_index = UNIX_VERTEX_INDEX_START;
+
+ unix_graph_maybe_cyclic = false;
+
+ /* Visit every vertex exactly once.
+ * __unix_walk_scc() moves visited vertices to unix_visited_vertices.
*/
- while (!list_empty(¬_cycle_list)) {
- u = list_entry(not_cycle_list.next, struct unix_sock, link);
- __clear_bit(UNIX_GC_CANDIDATE, &u->gc_flags);
- list_move_tail(&u->link, &gc_inflight_list);
+ while (!list_empty(&unix_unvisited_vertices)) {
+ struct unix_vertex *vertex;
+
+ vertex = list_first_entry(&unix_unvisited_vertices, typeof(*vertex), entry);
+ __unix_walk_scc(vertex, &last_index, hitlist);
}
- spin_unlock(&unix_gc_lock);
+ list_replace_init(&unix_visited_vertices, &unix_unvisited_vertices);
+ swap(unix_vertex_unvisited_index, unix_vertex_grouped_index);
- /* We need io_uring to clean its registered files, ignore all io_uring
- * originated skbs. It's fine as io_uring doesn't keep references to
- * other io_uring instances and so killing all other files in the cycle
- * will put all io_uring references forcing it to go through normal
- * release.path eventually putting registered files.
- */
- skb_queue_walk_safe(&hitlist, skb, next_skb) {
- if (skb->destructor == io_uring_destruct_scm) {
- __skb_unlink(skb, &hitlist);
- skb_queue_tail(&skb->sk->sk_receive_queue, skb);
+ unix_graph_grouped = true;
+}
+
+static void unix_walk_scc_fast(struct sk_buff_head *hitlist)
+{
+ unix_graph_maybe_cyclic = false;
+
+ while (!list_empty(&unix_unvisited_vertices)) {
+ struct unix_vertex *vertex;
+ struct list_head scc;
+ bool scc_dead = true;
+
+ vertex = list_first_entry(&unix_unvisited_vertices, typeof(*vertex), entry);
+ list_add(&scc, &vertex->scc_entry);
+
+ list_for_each_entry_reverse(vertex, &scc, scc_entry) {
+ list_move_tail(&vertex->entry, &unix_visited_vertices);
+
+ if (scc_dead)
+ scc_dead = unix_vertex_dead(vertex);
}
+
+ if (scc_dead)
+ unix_collect_skb(&scc, hitlist);
+ else if (!unix_graph_maybe_cyclic)
+ unix_graph_maybe_cyclic = unix_scc_cyclic(&scc);
+
+ list_del(&scc);
}
- /* Here we are. Hitlist is filled. Die. */
- __skb_queue_purge(&hitlist);
+ list_replace_init(&unix_visited_vertices, &unix_unvisited_vertices);
+}
+
+static bool gc_in_progress;
+
+static void __unix_gc(struct work_struct *work)
+{
+ struct sk_buff_head hitlist;
+ struct sk_buff *skb;
spin_lock(&unix_gc_lock);
- /* There could be io_uring registered files, just push them back to
- * the inflight list
- */
- list_for_each_entry_safe(u, next, &gc_candidates, link)
- list_move_tail(&u->link, &gc_inflight_list);
+ if (!unix_graph_maybe_cyclic) {
+ spin_unlock(&unix_gc_lock);
+ goto skip_gc;
+ }
+
+ __skb_queue_head_init(&hitlist);
+
+ if (unix_graph_grouped)
+ unix_walk_scc_fast(&hitlist);
+ else
+ unix_walk_scc(&hitlist);
- /* All candidates should have been detached by now. */
- BUG_ON(!list_empty(&gc_candidates));
+ spin_unlock(&unix_gc_lock);
+
+ skb_queue_walk(&hitlist, skb) {
+ if (UNIXCB(skb).fp)
+ UNIXCB(skb).fp->dead = true;
+ }
- /* Paired with READ_ONCE() in wait_for_unix_gc(). */
+ __skb_queue_purge(&hitlist);
+skip_gc:
WRITE_ONCE(gc_in_progress, false);
+}
- wake_up(&unix_gc_wait);
+static DECLARE_WORK(unix_gc_work, __unix_gc);
- out:
- spin_unlock(&unix_gc_lock);
+void unix_gc(void)
+{
+ WRITE_ONCE(gc_in_progress, true);
+ queue_work(system_unbound_wq, &unix_gc_work);
+}
+
+#define UNIX_INFLIGHT_TRIGGER_GC 16000
+#define UNIX_INFLIGHT_SANE_USER (SCM_MAX_FD * 8)
+
+void wait_for_unix_gc(struct scm_fp_list *fpl)
+{
+ /* If number of inflight sockets is insane,
+ * force a garbage collect right now.
+ *
+ * Paired with the WRITE_ONCE() in unix_inflight(),
+ * unix_notinflight(), and __unix_gc().
+ */
+ if (READ_ONCE(unix_tot_inflight) > UNIX_INFLIGHT_TRIGGER_GC &&
+ !READ_ONCE(gc_in_progress))
+ unix_gc();
+
+ /* Penalise users who want to send AF_UNIX sockets
+ * but whose sockets have not been received yet.
+ */
+ if (!fpl || !fpl->count_unix ||
+ READ_ONCE(fpl->user->unix_inflight) < UNIX_INFLIGHT_SANE_USER)
+ return;
+
+ if (READ_ONCE(gc_in_progress))
+ flush_work(&unix_gc_work);
}
diff --git a/net/unix/scm.c b/net/unix/scm.c
deleted file mode 100644
index e92f2fad6410..000000000000
--- a/net/unix/scm.c
+++ /dev/null
@@ -1,161 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/string.h>
-#include <linux/socket.h>
-#include <linux/net.h>
-#include <linux/fs.h>
-#include <net/af_unix.h>
-#include <net/scm.h>
-#include <linux/init.h>
-#include <linux/io_uring.h>
-
-#include "scm.h"
-
-unsigned int unix_tot_inflight;
-EXPORT_SYMBOL(unix_tot_inflight);
-
-LIST_HEAD(gc_inflight_list);
-EXPORT_SYMBOL(gc_inflight_list);
-
-DEFINE_SPINLOCK(unix_gc_lock);
-EXPORT_SYMBOL(unix_gc_lock);
-
-struct sock *unix_get_socket(struct file *filp)
-{
- struct sock *u_sock = NULL;
- struct inode *inode = file_inode(filp);
-
- /* Socket ? */
- if (S_ISSOCK(inode->i_mode) && !(filp->f_mode & FMODE_PATH)) {
- struct socket *sock = SOCKET_I(inode);
- const struct proto_ops *ops = READ_ONCE(sock->ops);
- struct sock *s = sock->sk;
-
- /* PF_UNIX ? */
- if (s && ops && ops->family == PF_UNIX)
- u_sock = s;
- }
-
- return u_sock;
-}
-EXPORT_SYMBOL(unix_get_socket);
-
-/* Keep the number of times in flight count for the file
- * descriptor if it is for an AF_UNIX socket.
- */
-void unix_inflight(struct user_struct *user, struct file *fp)
-{
- struct sock *s = unix_get_socket(fp);
-
- spin_lock(&unix_gc_lock);
-
- if (s) {
- struct unix_sock *u = unix_sk(s);
-
- if (!u->inflight) {
- BUG_ON(!list_empty(&u->link));
- list_add_tail(&u->link, &gc_inflight_list);
- } else {
- BUG_ON(list_empty(&u->link));
- }
- u->inflight++;
- /* Paired with READ_ONCE() in wait_for_unix_gc() */
- WRITE_ONCE(unix_tot_inflight, unix_tot_inflight + 1);
- }
- WRITE_ONCE(user->unix_inflight, user->unix_inflight + 1);
- spin_unlock(&unix_gc_lock);
-}
-
-void unix_notinflight(struct user_struct *user, struct file *fp)
-{
- struct sock *s = unix_get_socket(fp);
-
- spin_lock(&unix_gc_lock);
-
- if (s) {
- struct unix_sock *u = unix_sk(s);
-
- BUG_ON(!u->inflight);
- BUG_ON(list_empty(&u->link));
-
- u->inflight--;
- if (!u->inflight)
- list_del_init(&u->link);
- /* Paired with READ_ONCE() in wait_for_unix_gc() */
- WRITE_ONCE(unix_tot_inflight, unix_tot_inflight - 1);
- }
- WRITE_ONCE(user->unix_inflight, user->unix_inflight - 1);
- spin_unlock(&unix_gc_lock);
-}
-
-/*
- * The "user->unix_inflight" variable is protected by the garbage
- * collection lock, and we just read it locklessly here. If you go
- * over the limit, there might be a tiny race in actually noticing
- * it across threads. Tough.
- */
-static inline bool too_many_unix_fds(struct task_struct *p)
-{
- struct user_struct *user = current_user();
-
- if (unlikely(READ_ONCE(user->unix_inflight) > task_rlimit(p, RLIMIT_NOFILE)))
- return !capable(CAP_SYS_RESOURCE) && !capable(CAP_SYS_ADMIN);
- return false;
-}
-
-int unix_attach_fds(struct scm_cookie *scm, struct sk_buff *skb)
-{
- int i;
-
- if (too_many_unix_fds(current))
- return -ETOOMANYREFS;
-
- /*
- * Need to duplicate file references for the sake of garbage
- * collection. Otherwise a socket in the fps might become a
- * candidate for GC while the skb is not yet queued.
- */
- UNIXCB(skb).fp = scm_fp_dup(scm->fp);
- if (!UNIXCB(skb).fp)
- return -ENOMEM;
-
- for (i = scm->fp->count - 1; i >= 0; i--)
- unix_inflight(scm->fp->user, scm->fp->fp[i]);
- return 0;
-}
-EXPORT_SYMBOL(unix_attach_fds);
-
-void unix_detach_fds(struct scm_cookie *scm, struct sk_buff *skb)
-{
- int i;
-
- scm->fp = UNIXCB(skb).fp;
- UNIXCB(skb).fp = NULL;
-
- for (i = scm->fp->count-1; i >= 0; i--)
- unix_notinflight(scm->fp->user, scm->fp->fp[i]);
-}
-EXPORT_SYMBOL(unix_detach_fds);
-
-void unix_destruct_scm(struct sk_buff *skb)
-{
- struct scm_cookie scm;
-
- memset(&scm, 0, sizeof(scm));
- scm.pid = UNIXCB(skb).pid;
- if (UNIXCB(skb).fp)
- unix_detach_fds(&scm, skb);
-
- /* Alas, it calls VFS */
- /* So fscking what? fput() had been SMP-safe since the last Summer */
- scm_destroy(&scm);
- sock_wfree(skb);
-}
-EXPORT_SYMBOL(unix_destruct_scm);
-
-void io_uring_destruct_scm(struct sk_buff *skb)
-{
- unix_destruct_scm(skb);
-}
-EXPORT_SYMBOL(io_uring_destruct_scm);
diff --git a/net/unix/scm.h b/net/unix/scm.h
deleted file mode 100644
index 5a255a477f16..000000000000
--- a/net/unix/scm.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef NET_UNIX_SCM_H
-#define NET_UNIX_SCM_H
-
-extern struct list_head gc_inflight_list;
-extern spinlock_t unix_gc_lock;
-
-int unix_attach_fds(struct scm_cookie *scm, struct sk_buff *skb);
-void unix_detach_fds(struct scm_cookie *scm, struct sk_buff *skb);
-
-#endif
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index 68b3f9e7edff..2edb0f868c57 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -1603,6 +1603,9 @@ int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl)
struct xfrm_policy *delpol;
struct hlist_head *chain;
+ /* Sanitize mark before store */
+ policy->mark.v &= policy->mark.m;
+
spin_lock_bh(&net->xfrm.xfrm_policy_lock);
chain = policy_hash_bysel(net, &policy->selector, policy->family, dir);
if (chain)
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index 8a6e8656d014..86029cf5358c 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -754,9 +754,6 @@ int __xfrm_state_delete(struct xfrm_state *x)
net->xfrm.state_num--;
spin_unlock(&net->xfrm.xfrm_state_lock);
- if (x->encap_sk)
- sock_put(rcu_dereference_raw(x->encap_sk));
-
xfrm_dev_state_delete(x);
/* All xfrm_state objects are created by xfrm_state_alloc.
@@ -1478,6 +1475,9 @@ static void __xfrm_state_insert(struct xfrm_state *x)
list_add(&x->km.all, &net->xfrm.state_all);
+ /* Sanitize mark before store */
+ x->mark.v &= x->mark.m;
+
h = xfrm_dst_hash(net, &x->id.daddr, &x->props.saddr,
x->props.reqid, x->props.family);
XFRM_STATE_INSERT(bydst, &x->bydst, net->xfrm.state_bydst + h,
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index 3fa16412db15..927d72659173 100644
--- a/samples/bpf/Makefile
+++ b/samples/bpf/Makefile
@@ -392,7 +392,7 @@ $(obj)/%.o: $(src)/%.c
@echo " CLANG-bpf " $@
$(Q)$(CLANG) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) $(BPF_EXTRA_CFLAGS) \
-I$(obj) -I$(srctree)/tools/testing/selftests/bpf/ \
- -I$(LIBBPF_INCLUDE) \
+ -I$(LIBBPF_INCLUDE) $(CLANG_SYS_INCLUDES) \
-D__KERNEL__ -D__BPF_TRACING__ -Wno-unused-value -Wno-pointer-sign \
-D__TARGET_ARCH_$(SRCARCH) -Wno-compare-distinct-pointer-types \
-Wno-gnu-variable-sized-type-not-at-end \
diff --git a/scripts/config b/scripts/config
index ff88e2faefd3..ea475c07de28 100755
--- a/scripts/config
+++ b/scripts/config
@@ -32,6 +32,7 @@ commands:
Disable option directly after other option
--module-after|-M beforeopt option
Turn option into module directly after other option
+ --refresh Refresh the config using old settings
commands can be repeated multiple times
@@ -124,16 +125,22 @@ undef_var() {
txt_delete "^# $name is not set" "$FN"
}
-if [ "$1" = "--file" ]; then
- FN="$2"
- if [ "$FN" = "" ] ; then
- usage
+FN=.config
+CMDS=()
+while [[ $# -gt 0 ]]; do
+ if [ "$1" = "--file" ]; then
+ if [ "$2" = "" ]; then
+ usage
+ fi
+ FN="$2"
+ shift 2
+ else
+ CMDS+=("$1")
+ shift
fi
- shift 2
-else
- FN=.config
-fi
+done
+set -- "${CMDS[@]}"
if [ "$1" = "" ] ; then
usage
fi
@@ -217,9 +224,8 @@ while [ "$1" != "" ] ; do
set_var "${CONFIG_}$B" "${CONFIG_}$B=m" "${CONFIG_}$A"
;;
- # undocumented because it ignores --file (fixme)
--refresh)
- yes "" | make oldconfig
+ yes "" | make oldconfig KCONFIG_CONFIG=$FN
;;
*)
diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh
index 0b7952471c18..79c09b378be8 100755
--- a/scripts/kconfig/merge_config.sh
+++ b/scripts/kconfig/merge_config.sh
@@ -112,8 +112,8 @@ INITFILE=$1
shift;
if [ ! -r "$INITFILE" ]; then
- echo "The base file '$INITFILE' does not exist. Exit." >&2
- exit 1
+ echo "The base file '$INITFILE' does not exist. Creating one..." >&2
+ touch "$INITFILE"
fi
MERGE_LIST=$*
diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c
index 98308a2bdef6..068edb0d79f7 100644
--- a/security/integrity/ima/ima_main.c
+++ b/security/integrity/ima/ima_main.c
@@ -235,7 +235,9 @@ static int process_measurement(struct file *file, const struct cred *cred,
&allowed_algos);
violation_check = ((func == FILE_CHECK || func == MMAP_CHECK ||
func == MMAP_CHECK_REQPROT) &&
- (ima_policy_flag & IMA_MEASURE));
+ (ima_policy_flag & IMA_MEASURE) &&
+ ((action & IMA_MEASURE) ||
+ (file->f_mode & FMODE_WRITE)));
if (!action && !violation_check)
return 0;
diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c
index 5dd1e164f9b1..1e35c9f807b2 100644
--- a/security/smack/smackfs.c
+++ b/security/smack/smackfs.c
@@ -830,7 +830,7 @@ static int smk_open_cipso(struct inode *inode, struct file *file)
static ssize_t smk_set_cipso(struct file *file, const char __user *buf,
size_t count, loff_t *ppos, int format)
{
- struct netlbl_lsm_catmap *old_cat, *new_cat = NULL;
+ struct netlbl_lsm_catmap *old_cat;
struct smack_known *skp;
struct netlbl_lsm_secattr ncats;
char mapcatset[SMK_CIPSOLEN];
@@ -917,22 +917,15 @@ static ssize_t smk_set_cipso(struct file *file, const char __user *buf,
smack_catset_bit(cat, mapcatset);
}
- ncats.flags = 0;
- if (catlen == 0) {
- ncats.attr.mls.cat = NULL;
- ncats.attr.mls.lvl = maplevel;
- new_cat = netlbl_catmap_alloc(GFP_ATOMIC);
- if (new_cat)
- new_cat->next = ncats.attr.mls.cat;
- ncats.attr.mls.cat = new_cat;
- skp->smk_netlabel.flags &= ~(1U << 3);
- rc = 0;
- } else {
- rc = smk_netlbl_mls(maplevel, mapcatset, &ncats, SMK_CIPSOLEN);
- }
+
+ rc = smk_netlbl_mls(maplevel, mapcatset, &ncats, SMK_CIPSOLEN);
if (rc >= 0) {
old_cat = skp->smk_netlabel.attr.mls.cat;
rcu_assign_pointer(skp->smk_netlabel.attr.mls.cat, ncats.attr.mls.cat);
+ if (ncats.attr.mls.cat)
+ skp->smk_netlabel.flags |= NETLBL_SECATTR_MLS_CAT;
+ else
+ skp->smk_netlabel.flags &= ~(u32)NETLBL_SECATTR_MLS_CAT;
skp->smk_netlabel.attr.mls.lvl = ncats.attr.mls.lvl;
synchronize_rcu();
netlbl_catmap_free(old_cat);
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c
index 728c211142d1..471de2d1b37a 100644
--- a/sound/core/oss/pcm_oss.c
+++ b/sound/core/oss/pcm_oss.c
@@ -1085,8 +1085,7 @@ static int snd_pcm_oss_change_params_locked(struct snd_pcm_substream *substream)
runtime->oss.params = 0;
runtime->oss.prepare = 1;
runtime->oss.buffer_used = 0;
- if (runtime->dma_area)
- snd_pcm_format_set_silence(runtime->format, runtime->dma_area, bytes_to_samples(runtime, runtime->dma_bytes));
+ snd_pcm_runtime_buffer_set_silence(runtime);
runtime->oss.period_frames = snd_pcm_alsa_frames(substream, oss_period_size);
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index e40de64ec85c..31fc20350fd9 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -703,6 +703,17 @@ static void snd_pcm_buffer_access_unlock(struct snd_pcm_runtime *runtime)
atomic_inc(&runtime->buffer_accessing);
}
+/* fill the PCM buffer with the current silence format; called from pcm_oss.c */
+void snd_pcm_runtime_buffer_set_silence(struct snd_pcm_runtime *runtime)
+{
+ snd_pcm_buffer_access_lock(runtime);
+ if (runtime->dma_area)
+ snd_pcm_format_set_silence(runtime->format, runtime->dma_area,
+ bytes_to_samples(runtime, runtime->dma_bytes));
+ snd_pcm_buffer_access_unlock(runtime);
+}
+EXPORT_SYMBOL_GPL(snd_pcm_runtime_buffer_set_silence);
+
#if IS_ENABLED(CONFIG_SND_PCM_OSS)
#define is_oss_stream(substream) ((substream)->oss.oss)
#else
diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c
index 49f6763c3250..31428cdc0f63 100644
--- a/sound/core/seq/seq_clientmgr.c
+++ b/sound/core/seq/seq_clientmgr.c
@@ -1169,8 +1169,7 @@ static __poll_t snd_seq_poll(struct file *file, poll_table * wait)
if (snd_seq_file_flags(file) & SNDRV_SEQ_LFLG_OUTPUT) {
/* check if data is available in the pool */
- if (!snd_seq_write_pool_allocated(client) ||
- snd_seq_pool_poll_wait(client->pool, file, wait))
+ if (snd_seq_pool_poll_wait(client->pool, file, wait))
mask |= EPOLLOUT | EPOLLWRNORM;
}
@@ -2584,8 +2583,6 @@ int snd_seq_kernel_client_write_poll(int clientid, struct file *file, poll_table
if (client == NULL)
return -ENXIO;
- if (! snd_seq_write_pool_allocated(client))
- return 1;
if (snd_seq_pool_poll_wait(client->pool, file, wait))
return 1;
return 0;
diff --git a/sound/core/seq/seq_memory.c b/sound/core/seq/seq_memory.c
index b603bb93f896..692860deec0c 100644
--- a/sound/core/seq/seq_memory.c
+++ b/sound/core/seq/seq_memory.c
@@ -429,6 +429,7 @@ int snd_seq_pool_poll_wait(struct snd_seq_pool *pool, struct file *file,
poll_table *wait)
{
poll_wait(file, &pool->output_sleep, wait);
+ guard(spinlock_irq)(&pool->lock);
return snd_seq_output_ok(pool);
}
diff --git a/sound/pci/hda/hda_beep.c b/sound/pci/hda/hda_beep.c
index e63621bcb214..1a684e47d4d1 100644
--- a/sound/pci/hda/hda_beep.c
+++ b/sound/pci/hda/hda_beep.c
@@ -31,8 +31,9 @@ static void generate_tone(struct hda_beep *beep, int tone)
beep->power_hook(beep, true);
beep->playing = 1;
}
- snd_hda_codec_write(codec, beep->nid, 0,
- AC_VERB_SET_BEEP_CONTROL, tone);
+ if (!codec->beep_just_power_on)
+ snd_hda_codec_write(codec, beep->nid, 0,
+ AC_VERB_SET_BEEP_CONTROL, tone);
if (!tone && beep->playing) {
beep->playing = 0;
if (beep->power_hook)
@@ -212,10 +213,12 @@ int snd_hda_attach_beep_device(struct hda_codec *codec, int nid)
struct hda_beep *beep;
int err;
- if (!snd_hda_get_bool_hint(codec, "beep"))
- return 0; /* disabled explicitly by hints */
- if (codec->beep_mode == HDA_BEEP_MODE_OFF)
- return 0; /* disabled by module option */
+ if (!codec->beep_just_power_on) {
+ if (!snd_hda_get_bool_hint(codec, "beep"))
+ return 0; /* disabled explicitly by hints */
+ if (codec->beep_mode == HDA_BEEP_MODE_OFF)
+ return 0; /* disabled by module option */
+ }
beep = kzalloc(sizeof(*beep), GFP_KERNEL);
if (beep == NULL)
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 2f3f295f2b0c..440b934cdc28 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -24,6 +24,7 @@
#include <sound/hda_codec.h>
#include "hda_local.h"
#include "hda_auto_parser.h"
+#include "hda_beep.h"
#include "hda_jack.h"
#include "hda_generic.h"
#include "hda_component.h"
@@ -6789,6 +6790,41 @@ static void alc285_fixup_hp_spectre_x360_eb1(struct hda_codec *codec,
}
}
+/* GPIO1 = amplifier on/off */
+static void alc285_fixup_hp_spectre_x360_df1(struct hda_codec *codec,
+ const struct hda_fixup *fix,
+ int action)
+{
+ struct alc_spec *spec = codec->spec;
+ static const hda_nid_t conn[] = { 0x02 };
+ static const struct hda_pintbl pincfgs[] = {
+ { 0x14, 0x90170110 }, /* front/high speakers */
+ { 0x17, 0x90170130 }, /* back/bass speakers */
+ { }
+ };
+
+ // enable mute led
+ alc285_fixup_hp_mute_led_coefbit(codec, fix, action);
+
+ switch (action) {
+ case HDA_FIXUP_ACT_PRE_PROBE:
+ /* needed for amp of back speakers */
+ spec->gpio_mask |= 0x01;
+ spec->gpio_dir |= 0x01;
+ snd_hda_apply_pincfgs(codec, pincfgs);
+ /* share DAC to have unified volume control */
+ snd_hda_override_conn_list(codec, 0x14, ARRAY_SIZE(conn), conn);
+ snd_hda_override_conn_list(codec, 0x17, ARRAY_SIZE(conn), conn);
+ break;
+ case HDA_FIXUP_ACT_INIT:
+ /* need to toggle GPIO to enable the amp of back speakers */
+ alc_update_gpio_data(codec, 0x01, true);
+ msleep(100);
+ alc_update_gpio_data(codec, 0x01, false);
+ break;
+ }
+}
+
static void alc285_fixup_hp_spectre_x360(struct hda_codec *codec,
const struct hda_fixup *fix, int action)
{
@@ -6861,6 +6897,30 @@ static void alc285_fixup_hp_envy_x360(struct hda_codec *codec,
}
}
+static void alc285_fixup_hp_beep(struct hda_codec *codec,
+ const struct hda_fixup *fix, int action)
+{
+ if (action == HDA_FIXUP_ACT_PRE_PROBE) {
+ codec->beep_just_power_on = true;
+ } else if (action == HDA_FIXUP_ACT_INIT) {
+#ifdef CONFIG_SND_HDA_INPUT_BEEP
+ /*
+ * Just enable loopback to internal speaker and headphone jack.
+ * Disable amplification to get about the same beep volume as
+ * was on pure BIOS setup before loading the driver.
+ */
+ alc_update_coef_idx(codec, 0x36, 0x7070, BIT(13));
+
+ snd_hda_enable_beep_device(codec, 1);
+
+#if !IS_ENABLED(CONFIG_INPUT_PCSPKR)
+ dev_warn_once(hda_codec_dev(codec),
+ "enable CONFIG_INPUT_PCSPKR to get PC beeps\n");
+#endif
+#endif
+ }
+}
+
/* for hda_fixup_thinkpad_acpi() */
#include "thinkpad_helper.c"
@@ -7376,6 +7436,7 @@ enum {
ALC280_FIXUP_HP_9480M,
ALC245_FIXUP_HP_X360_AMP,
ALC285_FIXUP_HP_SPECTRE_X360_EB1,
+ ALC285_FIXUP_HP_SPECTRE_X360_DF1,
ALC285_FIXUP_HP_ENVY_X360,
ALC288_FIXUP_DELL_HEADSET_MODE,
ALC288_FIXUP_DELL1_MIC_NO_PRESENCE,
@@ -7477,6 +7538,7 @@ enum {
ALC285_FIXUP_HP_GPIO_LED,
ALC285_FIXUP_HP_MUTE_LED,
ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED,
+ ALC285_FIXUP_HP_BEEP_MICMUTE_LED,
ALC236_FIXUP_HP_MUTE_LED_COEFBIT2,
ALC236_FIXUP_HP_GPIO_LED,
ALC236_FIXUP_HP_MUTE_LED,
@@ -9064,6 +9126,12 @@ static const struct hda_fixup alc269_fixups[] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc285_fixup_hp_spectre_x360_mute_led,
},
+ [ALC285_FIXUP_HP_BEEP_MICMUTE_LED] = {
+ .type = HDA_FIXUP_FUNC,
+ .v.func = alc285_fixup_hp_beep,
+ .chained = true,
+ .chain_id = ALC285_FIXUP_HP_MUTE_LED,
+ },
[ALC236_FIXUP_HP_MUTE_LED_COEFBIT2] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc236_fixup_hp_mute_led_coefbit2,
@@ -9407,6 +9475,10 @@ static const struct hda_fixup alc269_fixups[] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc285_fixup_hp_spectre_x360_eb1
},
+ [ALC285_FIXUP_HP_SPECTRE_X360_DF1] = {
+ .type = HDA_FIXUP_FUNC,
+ .v.func = alc285_fixup_hp_spectre_x360_df1
+ },
[ALC285_FIXUP_HP_ENVY_X360] = {
.type = HDA_FIXUP_FUNC,
.v.func = alc285_fixup_hp_envy_x360,
@@ -10006,6 +10078,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x86c1, "HP Laptop 15-da3001TU", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
SND_PCI_QUIRK(0x103c, 0x86c7, "HP Envy AiO 32", ALC274_FIXUP_HP_ENVY_GPIO),
SND_PCI_QUIRK(0x103c, 0x86e7, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
+ SND_PCI_QUIRK(0x103c, 0x863e, "HP Spectre x360 15-df1xxx", ALC285_FIXUP_HP_SPECTRE_X360_DF1),
SND_PCI_QUIRK(0x103c, 0x86e8, "HP Spectre x360 15-eb0xxx", ALC285_FIXUP_HP_SPECTRE_X360_EB1),
SND_PCI_QUIRK(0x103c, 0x86f9, "HP Spectre x360 13-aw0xxx", ALC285_FIXUP_HP_SPECTRE_X360_MUTE_LED),
SND_PCI_QUIRK(0x103c, 0x8716, "HP Elite Dragonfly G2 Notebook PC", ALC285_FIXUP_HP_GPIO_AMP_INIT),
@@ -10016,7 +10089,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x8730, "HP ProBook 445 G7", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
SND_PCI_QUIRK(0x103c, 0x8735, "HP ProBook 435 G7", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF),
SND_PCI_QUIRK(0x103c, 0x8736, "HP", ALC285_FIXUP_HP_GPIO_AMP_INIT),
- SND_PCI_QUIRK(0x103c, 0x8760, "HP", ALC285_FIXUP_HP_MUTE_LED),
+ SND_PCI_QUIRK(0x103c, 0x8760, "HP EliteBook 8{4,5}5 G7", ALC285_FIXUP_HP_BEEP_MICMUTE_LED),
SND_PCI_QUIRK(0x103c, 0x876e, "HP ENVY x360 Convertible 13-ay0xxx", ALC245_FIXUP_HP_X360_MUTE_LEDS),
SND_PCI_QUIRK(0x103c, 0x877a, "HP", ALC285_FIXUP_HP_MUTE_LED),
SND_PCI_QUIRK(0x103c, 0x877d, "HP", ALC236_FIXUP_HP_MUTE_LED),
@@ -10501,6 +10574,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x17aa, 0x38f9, "Thinkbook 16P Gen5", ALC287_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x17aa, 0x38fa, "Thinkbook 16P Gen5", ALC287_FIXUP_CS35L41_I2C_2),
SND_PCI_QUIRK(0x17aa, 0x3902, "Lenovo E50-80", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
+ SND_PCI_QUIRK(0x17aa, 0x390d, "Lenovo Yoga Pro 7 14ASP10", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN),
SND_PCI_QUIRK(0x17aa, 0x3913, "Lenovo 145", ALC236_FIXUP_LENOVO_INV_DMIC),
SND_PCI_QUIRK(0x17aa, 0x3977, "IdeaPad S210", ALC283_FIXUP_INT_MIC),
SND_PCI_QUIRK(0x17aa, 0x3978, "Lenovo B50-70", ALC269_FIXUP_DMIC_THINKPAD_ACPI),
@@ -10754,6 +10828,7 @@ static const struct hda_model_fixup alc269_fixup_models[] = {
{.id = ALC295_FIXUP_HP_OMEN, .name = "alc295-hp-omen"},
{.id = ALC285_FIXUP_HP_SPECTRE_X360, .name = "alc285-hp-spectre-x360"},
{.id = ALC285_FIXUP_HP_SPECTRE_X360_EB1, .name = "alc285-hp-spectre-x360-eb1"},
+ {.id = ALC285_FIXUP_HP_SPECTRE_X360_DF1, .name = "alc285-hp-spectre-x360-df1"},
{.id = ALC285_FIXUP_HP_ENVY_X360, .name = "alc285-hp-envy-x360"},
{.id = ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP, .name = "alc287-ideapad-bass-spk-amp"},
{.id = ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN, .name = "alc287-yoga9-bass-spk-pin"},
diff --git a/sound/soc/codecs/cs42l43-jack.c b/sound/soc/codecs/cs42l43-jack.c
index 0b8e88b19888..6d8455c1bee6 100644
--- a/sound/soc/codecs/cs42l43-jack.c
+++ b/sound/soc/codecs/cs42l43-jack.c
@@ -642,6 +642,10 @@ static int cs42l43_run_type_detect(struct cs42l43_codec *priv)
reinit_completion(&priv->type_detect);
+ regmap_update_bits(cs42l43->regmap, CS42L43_STEREO_MIC_CLAMP_CTRL,
+ CS42L43_SMIC_HPAMP_CLAMP_DIS_FRC_VAL_MASK,
+ CS42L43_SMIC_HPAMP_CLAMP_DIS_FRC_VAL_MASK);
+
cs42l43_start_hs_bias(priv, true);
regmap_update_bits(cs42l43->regmap, CS42L43_HS2,
CS42L43_HSDET_MODE_MASK, 0x3 << CS42L43_HSDET_MODE_SHIFT);
@@ -653,6 +657,9 @@ static int cs42l43_run_type_detect(struct cs42l43_codec *priv)
CS42L43_HSDET_MODE_MASK, 0x2 << CS42L43_HSDET_MODE_SHIFT);
cs42l43_stop_hs_bias(priv);
+ regmap_update_bits(cs42l43->regmap, CS42L43_STEREO_MIC_CLAMP_CTRL,
+ CS42L43_SMIC_HPAMP_CLAMP_DIS_FRC_VAL_MASK, 0);
+
if (!time_left)
return -ETIMEDOUT;
diff --git a/sound/soc/codecs/mt6359-accdet.h b/sound/soc/codecs/mt6359-accdet.h
index c234f2f4276a..78ada3a5bfae 100644
--- a/sound/soc/codecs/mt6359-accdet.h
+++ b/sound/soc/codecs/mt6359-accdet.h
@@ -123,6 +123,15 @@ struct mt6359_accdet {
struct workqueue_struct *jd_workqueue;
};
+#if IS_ENABLED(CONFIG_SND_SOC_MT6359_ACCDET)
int mt6359_accdet_enable_jack_detect(struct snd_soc_component *component,
struct snd_soc_jack *jack);
+#else
+static inline int
+mt6359_accdet_enable_jack_detect(struct snd_soc_component *component,
+ struct snd_soc_jack *jack)
+{
+ return -EOPNOTSUPP;
+}
+#endif
#endif
diff --git a/sound/soc/codecs/pcm3168a.c b/sound/soc/codecs/pcm3168a.c
index 9d6431338fb7..329549936bd5 100644
--- a/sound/soc/codecs/pcm3168a.c
+++ b/sound/soc/codecs/pcm3168a.c
@@ -494,9 +494,9 @@ static int pcm3168a_hw_params(struct snd_pcm_substream *substream,
}
break;
case 24:
- if (provider_mode || (format == SND_SOC_DAIFMT_DSP_A) ||
- (format == SND_SOC_DAIFMT_DSP_B)) {
- dev_err(component->dev, "24-bit slots not supported in provider mode, or consumer mode using DSP\n");
+ if (!provider_mode && ((format == SND_SOC_DAIFMT_DSP_A) ||
+ (format == SND_SOC_DAIFMT_DSP_B))) {
+ dev_err(component->dev, "24-bit slots not supported in consumer mode using DSP\n");
return -EINVAL;
}
break;
diff --git a/sound/soc/codecs/rt722-sdca-sdw.c b/sound/soc/codecs/rt722-sdca-sdw.c
index c382cb6be602..c0bb1b4b2dcb 100644
--- a/sound/soc/codecs/rt722-sdca-sdw.c
+++ b/sound/soc/codecs/rt722-sdca-sdw.c
@@ -28,9 +28,50 @@ static bool rt722_sdca_readable_register(struct device *dev, unsigned int reg)
0):
case SDW_SDCA_CTL(FUNC_NUM_JACK_CODEC, RT722_SDCA_ENT_GE49, RT722_SDCA_CTL_DETECTED_MODE,
0):
- case SDW_SDCA_CTL(FUNC_NUM_HID, RT722_SDCA_ENT_HID01, RT722_SDCA_CTL_HIDTX_CURRENT_OWNER,
- 0) ... SDW_SDCA_CTL(FUNC_NUM_HID, RT722_SDCA_ENT_HID01,
- RT722_SDCA_CTL_HIDTX_MESSAGE_LENGTH, 0):
+ case SDW_SDCA_CTL(FUNC_NUM_JACK_CODEC, RT722_SDCA_ENT_XU03, RT722_SDCA_CTL_SELECTED_MODE,
+ 0):
+ case SDW_SDCA_CTL(FUNC_NUM_JACK_CODEC, RT722_SDCA_ENT_USER_FU05,
+ RT722_SDCA_CTL_FU_MUTE, CH_L) ...
+ SDW_SDCA_CTL(FUNC_NUM_JACK_CODEC, RT722_SDCA_ENT_USER_FU05,
+ RT722_SDCA_CTL_FU_MUTE, CH_R):
+ case SDW_SDCA_CTL(FUNC_NUM_JACK_CODEC, RT722_SDCA_ENT_XU0D,
+ RT722_SDCA_CTL_SELECTED_MODE, 0):
+ case SDW_SDCA_CTL(FUNC_NUM_JACK_CODEC, RT722_SDCA_ENT_USER_FU0F,
+ RT722_SDCA_CTL_FU_MUTE, CH_L) ...
+ SDW_SDCA_CTL(FUNC_NUM_JACK_CODEC, RT722_SDCA_ENT_USER_FU0F,
+ RT722_SDCA_CTL_FU_MUTE, CH_R):
+ case SDW_SDCA_CTL(FUNC_NUM_JACK_CODEC, RT722_SDCA_ENT_PDE40,
+ RT722_SDCA_CTL_REQ_POWER_STATE, 0):
+ case SDW_SDCA_CTL(FUNC_NUM_JACK_CODEC, RT722_SDCA_ENT_PDE12,
+ RT722_SDCA_CTL_REQ_POWER_STATE, 0):
+ case SDW_SDCA_CTL(FUNC_NUM_JACK_CODEC, RT722_SDCA_ENT_CS01,
+ RT722_SDCA_CTL_SAMPLE_FREQ_INDEX, 0):
+ case SDW_SDCA_CTL(FUNC_NUM_JACK_CODEC, RT722_SDCA_ENT_CS11,
+ RT722_SDCA_CTL_SAMPLE_FREQ_INDEX, 0):
+ case SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY, RT722_SDCA_ENT_USER_FU1E,
+ RT722_SDCA_CTL_FU_MUTE, CH_01) ...
+ SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY, RT722_SDCA_ENT_USER_FU1E,
+ RT722_SDCA_CTL_FU_MUTE, CH_04):
+ case SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY, RT722_SDCA_ENT_IT26,
+ RT722_SDCA_CTL_VENDOR_DEF, 0):
+ case SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY, RT722_SDCA_ENT_PDE2A,
+ RT722_SDCA_CTL_REQ_POWER_STATE, 0):
+ case SDW_SDCA_CTL(FUNC_NUM_MIC_ARRAY, RT722_SDCA_ENT_CS1F,
+ RT722_SDCA_CTL_SAMPLE_FREQ_INDEX, 0):
+ case SDW_SDCA_CTL(FUNC_NUM_HID, RT722_SDCA_ENT_HID01,
+ RT722_SDCA_CTL_HIDTX_CURRENT_OWNER, 0) ...
+ SDW_SDCA_CTL(FUNC_NUM_HID, RT722_SDCA_ENT_HID01,
+ RT722_SDCA_CTL_HIDTX_MESSAGE_LENGTH, 0):
+ case SDW_SDCA_CTL(FUNC_NUM_AMP, RT722_SDCA_ENT_USER_FU06,
+ RT722_SDCA_CTL_FU_MUTE, CH_L) ...
+ SDW_SDCA_CTL(FUNC_NUM_AMP, RT722_SDCA_ENT_USER_FU06,
+ RT722_SDCA_CTL_FU_MUTE, CH_R):
+ case SDW_SDCA_CTL(FUNC_NUM_AMP, RT722_SDCA_ENT_OT23,
+ RT722_SDCA_CTL_VENDOR_DEF, CH_08):
+ case SDW_SDCA_CTL(FUNC_NUM_AMP, RT722_SDCA_ENT_PDE23,
+ RT722_SDCA_CTL_REQ_POWER_STATE, 0):
+ case SDW_SDCA_CTL(FUNC_NUM_AMP, RT722_SDCA_ENT_CS31,
+ RT722_SDCA_CTL_SAMPLE_FREQ_INDEX, 0):
case RT722_BUF_ADDR_HID1 ... RT722_BUF_ADDR_HID2:
return true;
default:
@@ -74,6 +115,7 @@ static bool rt722_sdca_mbq_readable_register(struct device *dev, unsigned int re
case 0x5600000 ... 0x5600007:
case 0x5700000 ... 0x5700004:
case 0x5800000 ... 0x5800004:
+ case 0x5810000:
case 0x5b00003:
case 0x5c00011:
case 0x5d00006:
@@ -81,6 +123,7 @@ static bool rt722_sdca_mbq_readable_register(struct device *dev, unsigned int re
case 0x5f00030:
case 0x6100000 ... 0x6100051:
case 0x6100055 ... 0x6100057:
+ case 0x6100060:
case 0x6100062:
case 0x6100064 ... 0x6100065:
case 0x6100067:
diff --git a/sound/soc/codecs/tas2764.c b/sound/soc/codecs/tas2764.c
index e87a07eee973..72d6356b8981 100644
--- a/sound/soc/codecs/tas2764.c
+++ b/sound/soc/codecs/tas2764.c
@@ -182,33 +182,6 @@ static SOC_ENUM_SINGLE_DECL(
static const struct snd_kcontrol_new tas2764_asi1_mux =
SOC_DAPM_ENUM("ASI1 Source", tas2764_ASI1_src_enum);
-static int tas2764_dac_event(struct snd_soc_dapm_widget *w,
- struct snd_kcontrol *kcontrol, int event)
-{
- struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
- struct tas2764_priv *tas2764 = snd_soc_component_get_drvdata(component);
- int ret;
-
- switch (event) {
- case SND_SOC_DAPM_POST_PMU:
- tas2764->dac_powered = true;
- ret = tas2764_update_pwr_ctrl(tas2764);
- break;
- case SND_SOC_DAPM_PRE_PMD:
- tas2764->dac_powered = false;
- ret = tas2764_update_pwr_ctrl(tas2764);
- break;
- default:
- dev_err(tas2764->dev, "Unsupported event\n");
- return -EINVAL;
- }
-
- if (ret < 0)
- return ret;
-
- return 0;
-}
-
static const struct snd_kcontrol_new isense_switch =
SOC_DAPM_SINGLE("Switch", TAS2764_PWR_CTRL, TAS2764_ISENSE_POWER_EN, 1, 1);
static const struct snd_kcontrol_new vsense_switch =
@@ -221,8 +194,7 @@ static const struct snd_soc_dapm_widget tas2764_dapm_widgets[] = {
1, &isense_switch),
SND_SOC_DAPM_SWITCH("VSENSE", TAS2764_PWR_CTRL, TAS2764_VSENSE_POWER_EN,
1, &vsense_switch),
- SND_SOC_DAPM_DAC_E("DAC", NULL, SND_SOC_NOPM, 0, 0, tas2764_dac_event,
- SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD),
+ SND_SOC_DAPM_DAC("DAC", NULL, SND_SOC_NOPM, 0, 0),
SND_SOC_DAPM_OUTPUT("OUT"),
SND_SOC_DAPM_SIGGEN("VMON"),
SND_SOC_DAPM_SIGGEN("IMON")
@@ -243,9 +215,28 @@ static int tas2764_mute(struct snd_soc_dai *dai, int mute, int direction)
{
struct tas2764_priv *tas2764 =
snd_soc_component_get_drvdata(dai->component);
+ int ret;
+
+ if (!mute) {
+ tas2764->dac_powered = true;
+ ret = tas2764_update_pwr_ctrl(tas2764);
+ if (ret)
+ return ret;
+ }
tas2764->unmuted = !mute;
- return tas2764_update_pwr_ctrl(tas2764);
+ ret = tas2764_update_pwr_ctrl(tas2764);
+ if (ret)
+ return ret;
+
+ if (mute) {
+ tas2764->dac_powered = false;
+ ret = tas2764_update_pwr_ctrl(tas2764);
+ if (ret)
+ return ret;
+ }
+
+ return 0;
}
static int tas2764_set_bitwidth(struct tas2764_priv *tas2764, int bitwidth)
@@ -636,6 +627,7 @@ static const struct reg_default tas2764_reg_defaults[] = {
{ TAS2764_TDM_CFG2, 0x0a },
{ TAS2764_TDM_CFG3, 0x10 },
{ TAS2764_TDM_CFG5, 0x42 },
+ { TAS2764_INT_CLK_CFG, 0x19 },
};
static const struct regmap_range_cfg tas2764_regmap_ranges[] = {
@@ -653,6 +645,7 @@ static const struct regmap_range_cfg tas2764_regmap_ranges[] = {
static bool tas2764_volatile_register(struct device *dev, unsigned int reg)
{
switch (reg) {
+ case TAS2764_SW_RST:
case TAS2764_INT_LTCH0 ... TAS2764_INT_LTCH4:
case TAS2764_INT_CLK_CFG:
return true;
diff --git a/sound/soc/fsl/imx-card.c b/sound/soc/fsl/imx-card.c
index 7128bcf3a743..bb304de5cc38 100644
--- a/sound/soc/fsl/imx-card.c
+++ b/sound/soc/fsl/imx-card.c
@@ -517,7 +517,7 @@ static int imx_card_parse_of(struct imx_card_data *data)
if (!card->dai_link)
return -ENOMEM;
- data->link_data = devm_kcalloc(dev, num_links, sizeof(*link), GFP_KERNEL);
+ data->link_data = devm_kcalloc(dev, num_links, sizeof(*link_data), GFP_KERNEL);
if (!data->link_data)
return -ENOMEM;
diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c
index ce80adc30fe9..6a85e8fdcae6 100644
--- a/sound/soc/intel/boards/bytcr_rt5640.c
+++ b/sound/soc/intel/boards/bytcr_rt5640.c
@@ -576,6 +576,19 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = {
BYT_RT5640_SSP0_AIF2 |
BYT_RT5640_MCLK_EN),
},
+ { /* Acer Aspire SW3-013 */
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Aspire SW3-013"),
+ },
+ .driver_data = (void *)(BYT_RT5640_DMIC1_MAP |
+ BYT_RT5640_JD_SRC_JD2_IN4N |
+ BYT_RT5640_OVCD_TH_2000UA |
+ BYT_RT5640_OVCD_SF_0P75 |
+ BYT_RT5640_DIFF_MIC |
+ BYT_RT5640_SSP0_AIF1 |
+ BYT_RT5640_MCLK_EN),
+ },
{
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
diff --git a/sound/soc/mediatek/mt8188/mt8188-afe-clk.c b/sound/soc/mediatek/mt8188/mt8188-afe-clk.c
index e69c1bb2cb23..7f411b857782 100644
--- a/sound/soc/mediatek/mt8188/mt8188-afe-clk.c
+++ b/sound/soc/mediatek/mt8188/mt8188-afe-clk.c
@@ -58,7 +58,15 @@ static const char *aud_clks[MT8188_CLK_NUM] = {
[MT8188_CLK_AUD_ADC] = "aud_adc",
[MT8188_CLK_AUD_DAC_HIRES] = "aud_dac_hires",
[MT8188_CLK_AUD_A1SYS_HP] = "aud_a1sys_hp",
+ [MT8188_CLK_AUD_AFE_DMIC1] = "aud_afe_dmic1",
+ [MT8188_CLK_AUD_AFE_DMIC2] = "aud_afe_dmic2",
+ [MT8188_CLK_AUD_AFE_DMIC3] = "aud_afe_dmic3",
+ [MT8188_CLK_AUD_AFE_DMIC4] = "aud_afe_dmic4",
[MT8188_CLK_AUD_ADC_HIRES] = "aud_adc_hires",
+ [MT8188_CLK_AUD_DMIC_HIRES1] = "aud_dmic_hires1",
+ [MT8188_CLK_AUD_DMIC_HIRES2] = "aud_dmic_hires2",
+ [MT8188_CLK_AUD_DMIC_HIRES3] = "aud_dmic_hires3",
+ [MT8188_CLK_AUD_DMIC_HIRES4] = "aud_dmic_hires4",
[MT8188_CLK_AUD_I2SIN] = "aud_i2sin",
[MT8188_CLK_AUD_TDM_IN] = "aud_tdm_in",
[MT8188_CLK_AUD_I2S_OUT] = "aud_i2s_out",
diff --git a/sound/soc/mediatek/mt8188/mt8188-afe-clk.h b/sound/soc/mediatek/mt8188/mt8188-afe-clk.h
index ec53c171c170..c6c78d684f3e 100644
--- a/sound/soc/mediatek/mt8188/mt8188-afe-clk.h
+++ b/sound/soc/mediatek/mt8188/mt8188-afe-clk.h
@@ -54,7 +54,15 @@ enum {
MT8188_CLK_AUD_ADC,
MT8188_CLK_AUD_DAC_HIRES,
MT8188_CLK_AUD_A1SYS_HP,
+ MT8188_CLK_AUD_AFE_DMIC1,
+ MT8188_CLK_AUD_AFE_DMIC2,
+ MT8188_CLK_AUD_AFE_DMIC3,
+ MT8188_CLK_AUD_AFE_DMIC4,
MT8188_CLK_AUD_ADC_HIRES,
+ MT8188_CLK_AUD_DMIC_HIRES1,
+ MT8188_CLK_AUD_DMIC_HIRES2,
+ MT8188_CLK_AUD_DMIC_HIRES3,
+ MT8188_CLK_AUD_DMIC_HIRES4,
MT8188_CLK_AUD_I2SIN,
MT8188_CLK_AUD_TDM_IN,
MT8188_CLK_AUD_I2S_OUT,
diff --git a/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c b/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c
index 11f30b183520..4a304bffef8b 100644
--- a/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c
+++ b/sound/soc/mediatek/mt8188/mt8188-afe-pcm.c
@@ -2855,10 +2855,6 @@ static bool mt8188_is_volatile_reg(struct device *dev, unsigned int reg)
case AFE_DMIC3_SRC_DEBUG_MON0:
case AFE_DMIC3_UL_SRC_MON0:
case AFE_DMIC3_UL_SRC_MON1:
- case DMIC_GAIN1_CUR:
- case DMIC_GAIN2_CUR:
- case DMIC_GAIN3_CUR:
- case DMIC_GAIN4_CUR:
case ETDM_IN1_MONITOR:
case ETDM_IN2_MONITOR:
case ETDM_OUT1_MONITOR:
diff --git a/sound/soc/qcom/sm8250.c b/sound/soc/qcom/sm8250.c
index 88a7169336d6..580eb20b0771 100644
--- a/sound/soc/qcom/sm8250.c
+++ b/sound/soc/qcom/sm8250.c
@@ -7,6 +7,7 @@
#include <sound/soc.h>
#include <sound/soc-dapm.h>
#include <sound/pcm.h>
+#include <sound/pcm_params.h>
#include <linux/soundwire/sdw.h>
#include <sound/jack.h>
#include <linux/input-event-codes.h>
@@ -39,9 +40,11 @@ static int sm8250_be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd,
SNDRV_PCM_HW_PARAM_RATE);
struct snd_interval *channels = hw_param_interval(params,
SNDRV_PCM_HW_PARAM_CHANNELS);
+ struct snd_mask *fmt = hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT);
rate->min = rate->max = 48000;
channels->min = channels->max = 2;
+ snd_mask_set_format(fmt, SNDRV_PCM_FORMAT_S16_LE);
return 0;
}
diff --git a/sound/soc/soc-dai.c b/sound/soc/soc-dai.c
index 9a828e55c4f9..507743c87e40 100644
--- a/sound/soc/soc-dai.c
+++ b/sound/soc/soc-dai.c
@@ -275,10 +275,11 @@ int snd_soc_dai_set_tdm_slot(struct snd_soc_dai *dai,
if (dai->driver->ops &&
dai->driver->ops->xlate_tdm_slot_mask)
- dai->driver->ops->xlate_tdm_slot_mask(slots,
- &tx_mask, &rx_mask);
+ ret = dai->driver->ops->xlate_tdm_slot_mask(slots, &tx_mask, &rx_mask);
else
- snd_soc_xlate_tdm_slot_mask(slots, &tx_mask, &rx_mask);
+ ret = snd_soc_xlate_tdm_slot_mask(slots, &tx_mask, &rx_mask);
+ if (ret)
+ goto err;
for_each_pcm_streams(stream)
snd_soc_dai_tdm_mask_set(dai, stream, *tdm_mask[stream]);
@@ -287,6 +288,7 @@ int snd_soc_dai_set_tdm_slot(struct snd_soc_dai *dai,
dai->driver->ops->set_tdm_slot)
ret = dai->driver->ops->set_tdm_slot(dai, tx_mask, rx_mask,
slots, slot_width);
+err:
return soc_dai_ret(dai, ret);
}
EXPORT_SYMBOL_GPL(snd_soc_dai_set_tdm_slot);
diff --git a/sound/soc/soc-ops.c b/sound/soc/soc-ops.c
index b4cfc34d00ee..eff1355cc3df 100644
--- a/sound/soc/soc-ops.c
+++ b/sound/soc/soc-ops.c
@@ -638,6 +638,33 @@ int snd_soc_get_volsw_range(struct snd_kcontrol *kcontrol,
}
EXPORT_SYMBOL_GPL(snd_soc_get_volsw_range);
+static int snd_soc_clip_to_platform_max(struct snd_kcontrol *kctl)
+{
+ struct soc_mixer_control *mc = (struct soc_mixer_control *)kctl->private_value;
+ struct snd_ctl_elem_value uctl;
+ int ret;
+
+ if (!mc->platform_max)
+ return 0;
+
+ ret = kctl->get(kctl, &uctl);
+ if (ret < 0)
+ return ret;
+
+ if (uctl.value.integer.value[0] > mc->platform_max)
+ uctl.value.integer.value[0] = mc->platform_max;
+
+ if (snd_soc_volsw_is_stereo(mc) &&
+ uctl.value.integer.value[1] > mc->platform_max)
+ uctl.value.integer.value[1] = mc->platform_max;
+
+ ret = kctl->put(kctl, &uctl);
+ if (ret < 0)
+ return ret;
+
+ return 0;
+}
+
/**
* snd_soc_limit_volume - Set new limit to an existing volume control.
*
@@ -662,7 +689,7 @@ int snd_soc_limit_volume(struct snd_soc_card *card,
struct soc_mixer_control *mc = (struct soc_mixer_control *)kctl->private_value;
if (max <= mc->max - mc->min) {
mc->platform_max = max;
- ret = 0;
+ ret = snd_soc_clip_to_platform_max(kctl);
}
}
return ret;
diff --git a/sound/soc/sof/ipc4-control.c b/sound/soc/sof/ipc4-control.c
index b4cdcec33e12..84145209dec4 100644
--- a/sound/soc/sof/ipc4-control.c
+++ b/sound/soc/sof/ipc4-control.c
@@ -483,6 +483,14 @@ static int sof_ipc4_bytes_ext_put(struct snd_sof_control *scontrol,
return -EINVAL;
}
+ /* Check header id */
+ if (header.numid != SOF_CTRL_CMD_BINARY) {
+ dev_err_ratelimited(scomp->dev,
+ "Incorrect numid for bytes put %d\n",
+ header.numid);
+ return -EINVAL;
+ }
+
/* Verify the ABI header first */
if (copy_from_user(&abi_hdr, tlvd->tlv, sizeof(abi_hdr)))
return -EFAULT;
@@ -565,7 +573,8 @@ static int _sof_ipc4_bytes_ext_get(struct snd_sof_control *scontrol,
if (data_size > size)
return -ENOSPC;
- header.numid = scontrol->comp_id;
+ /* Set header id and length */
+ header.numid = SOF_CTRL_CMD_BINARY;
header.length = data_size;
if (copy_to_user(tlvd, &header, sizeof(struct snd_ctl_tlv)))
diff --git a/sound/soc/sof/ipc4-pcm.c b/sound/soc/sof/ipc4-pcm.c
index e8acf60c27a7..bb5df0d214e3 100644
--- a/sound/soc/sof/ipc4-pcm.c
+++ b/sound/soc/sof/ipc4-pcm.c
@@ -621,7 +621,8 @@ static int sof_ipc4_pcm_setup(struct snd_sof_dev *sdev, struct snd_sof_pcm *spcm
return -ENOMEM;
}
- if (!support_info)
+ /* Delay reporting is only supported on playback */
+ if (!support_info || stream == SNDRV_PCM_STREAM_CAPTURE)
continue;
stream_info = kzalloc(sizeof(*stream_info), GFP_KERNEL);
diff --git a/sound/soc/sof/topology.c b/sound/soc/sof/topology.c
index 7afded323150..c18a1fdd40ee 100644
--- a/sound/soc/sof/topology.c
+++ b/sound/soc/sof/topology.c
@@ -1057,7 +1057,7 @@ static int sof_connect_dai_widget(struct snd_soc_component *scomp,
struct snd_sof_dai *dai)
{
struct snd_soc_card *card = scomp->card;
- struct snd_soc_pcm_runtime *rtd;
+ struct snd_soc_pcm_runtime *rtd, *full, *partial;
struct snd_soc_dai *cpu_dai;
int stream;
int i;
@@ -1074,12 +1074,22 @@ static int sof_connect_dai_widget(struct snd_soc_component *scomp,
else
goto end;
+ full = NULL;
+ partial = NULL;
list_for_each_entry(rtd, &card->rtd_list, list) {
/* does stream match DAI link ? */
- if (!rtd->dai_link->stream_name ||
- !strstr(rtd->dai_link->stream_name, w->sname))
- continue;
+ if (rtd->dai_link->stream_name) {
+ if (!strcmp(rtd->dai_link->stream_name, w->sname)) {
+ full = rtd;
+ break;
+ } else if (strstr(rtd->dai_link->stream_name, w->sname)) {
+ partial = rtd;
+ }
+ }
+ }
+ rtd = full ? full : partial;
+ if (rtd) {
for_each_rtd_cpu_dais(rtd, i, cpu_dai) {
/*
* Please create DAI widget in the right order
diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c
index f0a5fd901101..0d7758cc84c6 100644
--- a/sound/soc/sunxi/sun4i-codec.c
+++ b/sound/soc/sunxi/sun4i-codec.c
@@ -25,6 +25,7 @@
#include <linux/gpio/consumer.h>
#include <sound/core.h>
+#include <sound/jack.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
@@ -239,6 +240,7 @@ struct sun4i_codec {
struct clk *clk_module;
struct reset_control *rst;
struct gpio_desc *gpio_pa;
+ struct gpio_desc *gpio_hp;
/* ADC_FIFOC register is at different offset on different SoCs */
struct regmap_field *reg_adc_fifoc;
@@ -1277,6 +1279,49 @@ static struct snd_soc_dai_driver dummy_cpu_dai = {
.ops = &dummy_dai_ops,
};
+static struct snd_soc_jack sun4i_headphone_jack;
+
+static struct snd_soc_jack_pin sun4i_headphone_jack_pins[] = {
+ { .pin = "Headphone", .mask = SND_JACK_HEADPHONE },
+};
+
+static struct snd_soc_jack_gpio sun4i_headphone_jack_gpio = {
+ .name = "hp-det",
+ .report = SND_JACK_HEADPHONE,
+ .debounce_time = 150,
+};
+
+static int sun4i_codec_machine_init(struct snd_soc_pcm_runtime *rtd)
+{
+ struct snd_soc_card *card = rtd->card;
+ struct sun4i_codec *scodec = snd_soc_card_get_drvdata(card);
+ int ret;
+
+ if (scodec->gpio_hp) {
+ ret = snd_soc_card_jack_new_pins(card, "Headphone Jack",
+ SND_JACK_HEADPHONE,
+ &sun4i_headphone_jack,
+ sun4i_headphone_jack_pins,
+ ARRAY_SIZE(sun4i_headphone_jack_pins));
+ if (ret) {
+ dev_err(rtd->dev,
+ "Headphone jack creation failed: %d\n", ret);
+ return ret;
+ }
+
+ sun4i_headphone_jack_gpio.desc = scodec->gpio_hp;
+ ret = snd_soc_jack_add_gpios(&sun4i_headphone_jack, 1,
+ &sun4i_headphone_jack_gpio);
+
+ if (ret) {
+ dev_err(rtd->dev, "Headphone GPIO not added: %d\n", ret);
+ return ret;
+ }
+ }
+
+ return 0;
+}
+
static struct snd_soc_dai_link *sun4i_codec_create_link(struct device *dev,
int *num_links)
{
@@ -1302,6 +1347,7 @@ static struct snd_soc_dai_link *sun4i_codec_create_link(struct device *dev,
link->codecs->name = dev_name(dev);
link->platforms->name = dev_name(dev);
link->dai_fmt = SND_SOC_DAIFMT_I2S;
+ link->init = sun4i_codec_machine_init;
*num_links = 1;
@@ -1742,6 +1788,13 @@ static int sun4i_codec_probe(struct platform_device *pdev)
return ret;
}
+ scodec->gpio_hp = devm_gpiod_get_optional(&pdev->dev, "hp-det", GPIOD_IN);
+ if (IS_ERR(scodec->gpio_hp)) {
+ ret = PTR_ERR(scodec->gpio_hp);
+ dev_err_probe(&pdev->dev, ret, "Failed to get hp-det gpio\n");
+ return ret;
+ }
+
/* reg_field setup */
scodec->reg_adc_fifoc = devm_regmap_field_alloc(&pdev->dev,
scodec->regmap,
diff --git a/tools/bpf/bpftool/common.c b/tools/bpf/bpftool/common.c
index 9b75639434b8..0a764426d935 100644
--- a/tools/bpf/bpftool/common.c
+++ b/tools/bpf/bpftool/common.c
@@ -461,10 +461,11 @@ int get_fd_type(int fd)
p_err("can't read link type: %s", strerror(errno));
return -1;
}
- if (n == sizeof(path)) {
+ if (n == sizeof(buf)) {
p_err("can't read link type: path too long!");
return -1;
}
+ buf[n] = '\0';
if (strstr(buf, "bpf-map"))
return BPF_OBJ_MAP;
diff --git a/tools/build/Makefile.build b/tools/build/Makefile.build
index fac42486a8cf..27f4ee9cb4db 100644
--- a/tools/build/Makefile.build
+++ b/tools/build/Makefile.build
@@ -141,6 +141,10 @@ objprefix := $(subst ./,,$(OUTPUT)$(dir)/)
obj-y := $(addprefix $(objprefix),$(obj-y))
subdir-obj-y := $(addprefix $(objprefix),$(subdir-obj-y))
+# Separate out test log files from real build objects.
+test-y := $(filter %_log, $(obj-y))
+obj-y := $(filter-out %_log, $(obj-y))
+
# Final '$(obj)-in.o' object
in-target := $(objprefix)$(obj)-in.o
@@ -151,7 +155,7 @@ $(subdir-y):
$(sort $(subdir-obj-y)): $(subdir-y) ;
-$(in-target): $(obj-y) FORCE
+$(in-target): $(obj-y) $(test-y) FORCE
$(call rule_mkdir)
$(call if_changed,$(host)ld_multi)
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index 977ec094bc2a..2a90f04a4160 100644
--- a/tools/include/uapi/linux/bpf.h
+++ b/tools/include/uapi/linux/bpf.h
@@ -1140,6 +1140,7 @@ enum bpf_perf_event_type {
#define BPF_F_BEFORE (1U << 3)
#define BPF_F_AFTER (1U << 4)
#define BPF_F_ID (1U << 5)
+#define BPF_F_PREORDER (1U << 6)
#define BPF_F_LINK BPF_F_LINK /* 1 << 13 */
/* If BPF_F_STRICT_ALIGNMENT is used in BPF_PROG_LOAD command, the
diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
index 2fad178949ef..fa2abe56e845 100644
--- a/tools/lib/bpf/libbpf.c
+++ b/tools/lib/bpf/libbpf.c
@@ -1802,7 +1802,7 @@ static int set_kcfg_value_str(struct extern_desc *ext, char *ext_val,
}
len = strlen(value);
- if (value[len - 1] != '"') {
+ if (len < 2 || value[len - 1] != '"') {
pr_warn("extern (kcfg) '%s': invalid string config '%s'\n",
ext->name, value);
return -EINVAL;
diff --git a/tools/net/ynl/lib/ynl.c b/tools/net/ynl/lib/ynl.c
index ae61ae5b02bf..0871f86c6b66 100644
--- a/tools/net/ynl/lib/ynl.c
+++ b/tools/net/ynl/lib/ynl.c
@@ -368,7 +368,7 @@ int ynl_attr_validate(struct ynl_parse_arg *yarg, const struct nlattr *attr)
"Invalid attribute (binary %s)", policy->name);
return -1;
case YNL_PT_NUL_STR:
- if ((!policy->len || len <= policy->len) && !data[len - 1])
+ if (len && (!policy->len || len <= policy->len) && !data[len - 1])
break;
yerr(yarg->ys, YNL_ERROR_ATTR_INVALID,
"Invalid attribute (string %s)", policy->name);
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index a1b14378bab0..f8e676a6e6f8 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -3287,7 +3287,7 @@ static int handle_insn_ops(struct instruction *insn,
if (update_cfi_state(insn, next_insn, &state->cfi, op))
return 1;
- if (!insn->alt_group)
+ if (!opts.uaccess || !insn->alt_group)
continue;
if (op->dest.type == OP_DEST_PUSHF) {
@@ -3754,6 +3754,9 @@ static int validate_branch(struct objtool_file *file, struct symbol *func,
return 0;
case INSN_STAC:
+ if (!opts.uaccess)
+ break;
+
if (state.uaccess) {
WARN_INSN(insn, "recursive UACCESS enable");
return 1;
@@ -3763,6 +3766,9 @@ static int validate_branch(struct objtool_file *file, struct symbol *func,
break;
case INSN_CLAC:
+ if (!opts.uaccess)
+ break;
+
if (!state.uaccess && func) {
WARN_INSN(insn, "redundant UACCESS disable");
return 1;
@@ -4238,7 +4244,8 @@ static int validate_symbol(struct objtool_file *file, struct section *sec,
if (!insn || insn->ignore || insn->visited)
return 0;
- state->uaccess = sym->uaccess_safe;
+ if (opts.uaccess)
+ state->uaccess = sym->uaccess_safe;
ret = validate_branch(file, insn_func(insn), insn, *state);
if (ret)
@@ -4685,8 +4692,10 @@ int check(struct objtool_file *file)
init_cfi_state(&force_undefined_cfi);
force_undefined_cfi.force_undefined = true;
- if (!cfi_hash_alloc(1UL << (file->elf->symbol_bits - 3)))
+ if (!cfi_hash_alloc(1UL << (file->elf->symbol_bits - 3))) {
+ ret = -1;
goto out;
+ }
cfi_hash_add(&init_cfi);
cfi_hash_add(&func_cfi);
@@ -4703,7 +4712,7 @@ int check(struct objtool_file *file)
if (opts.retpoline) {
ret = validate_retpoline(file);
if (ret < 0)
- return ret;
+ goto out;
warnings += ret;
}
@@ -4739,7 +4748,7 @@ int check(struct objtool_file *file)
*/
ret = validate_unrets(file);
if (ret < 0)
- return ret;
+ goto out;
warnings += ret;
}
@@ -4802,7 +4811,7 @@ int check(struct objtool_file *file)
if (opts.prefix) {
ret = add_prefix_symbols(file);
if (ret < 0)
- return ret;
+ goto out;
warnings += ret;
}
diff --git a/tools/testing/kunit/qemu_configs/x86_64.py b/tools/testing/kunit/qemu_configs/x86_64.py
index dc7949076863..4a6bf4e048f5 100644
--- a/tools/testing/kunit/qemu_configs/x86_64.py
+++ b/tools/testing/kunit/qemu_configs/x86_64.py
@@ -7,4 +7,6 @@ CONFIG_SERIAL_8250_CONSOLE=y''',
qemu_arch='x86_64',
kernel_path='arch/x86/boot/bzImage',
kernel_command_line='console=ttyS0',
- extra_qemu_params=[])
+ # qboot is faster than SeaBIOS and doesn't mess up
+ # the terminal.
+ extra_qemu_params=['-bios', 'qboot.rom'])
diff --git a/tools/testing/selftests/bpf/prog_tests/sockmap_ktls.c b/tools/testing/selftests/bpf/prog_tests/sockmap_ktls.c
index 2d0796314862..0a99fd404f6d 100644
--- a/tools/testing/selftests/bpf/prog_tests/sockmap_ktls.c
+++ b/tools/testing/selftests/bpf/prog_tests/sockmap_ktls.c
@@ -68,7 +68,6 @@ static void test_sockmap_ktls_disconnect_after_delete(int family, int map)
goto close_cli;
err = disconnect(cli);
- ASSERT_OK(err, "disconnect");
close_cli:
close(cli);
diff --git a/tools/testing/selftests/net/forwarding/bridge_mdb.sh b/tools/testing/selftests/net/forwarding/bridge_mdb.sh
index a3678dfe5848..c151374ddf04 100755
--- a/tools/testing/selftests/net/forwarding/bridge_mdb.sh
+++ b/tools/testing/selftests/net/forwarding/bridge_mdb.sh
@@ -149,7 +149,7 @@ cfg_test_host_common()
check_err $? "Failed to add $name host entry"
bridge mdb replace dev br0 port br0 grp $grp $state vid 10 &> /dev/null
- check_fail $? "Managed to replace $name host entry"
+ check_err $? "Failed to replace $name host entry"
bridge mdb del dev br0 port br0 grp $grp $state vid 10
bridge mdb get dev br0 grp $grp vid 10 &> /dev/null
diff --git a/tools/testing/selftests/net/gro.sh b/tools/testing/selftests/net/gro.sh
index 342ad27f631b..e771f5f7faa2 100755
--- a/tools/testing/selftests/net/gro.sh
+++ b/tools/testing/selftests/net/gro.sh
@@ -95,5 +95,6 @@ trap cleanup EXIT
if [[ "${test}" == "all" ]]; then
run_all_tests
else
- run_test "${proto}" "${test}"
+ exit_code=$(run_test "${proto}" "${test}")
+ exit $exit_code
fi;
Return-Path: <linux-kernel+bounces-673247-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id D17C341E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:11:18 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id D67043A68BC
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:10:56 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 82422291158;
Wed, 4 Jun 2025 13:08:26 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="NxlFG66k"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 903E929116F;
Wed, 4 Jun 2025 13:08:22 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749042502; cv=none; b=jimOboCzh88zxx+3jyg5OqiiZBl5pP5refqsvYwH0YsSQTSVzCPL38aB3R/+qcaFXRNVlUbu6f83YMny89r9tWKQlIxLxBgvDvQQJ+CA30EEUAsDBCXz7jwRVzuCGaOTgSaoNIYnuUfrjxFT9tfPFehGanSfeunIdNlUam+qHpU=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749042502; c=relaxed/simple;
bh=xaz7fQOKd8exIJHAXS1mSdF1BueKehmcSUHO8Uq/VuA=;
h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version; b=ivtip0IYiX9kLgEavmM+GoGGtiFqlfr6cNE/D0qp0MR07/MPL1Pv6ySLADpyUOcw0ePNPl8cqrMRecjHzWXh7gj74bhLUZNw8PdZb8kT1qJmMnqyo5b7B0XFJpn2yUVtp6QdSqcljnHqecEToEUyAIxGZdgWtYV1zJSgWewS+K8=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=NxlFG66k; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 492BFC4CEE7;
Wed, 4 Jun 2025 13:08:21 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org;
s=korg; t=1749042502;
bh=xaz7fQOKd8exIJHAXS1mSdF1BueKehmcSUHO8Uq/VuA=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=NxlFG66kjD4/YOtvHt3/2dyog6FaI2Upok0lC4inOOeuQ2z/UqMT1tzDnb+VZkmOM
pAU5o4GBqTkXWR0hAa09Cobw3ZctMegss50zJLHTDHEkpw79z3pP/rWByVMNrZLX2a
GppnvmfcRNWaY8qHV4io0VbliBpekBx6Z27MIqEk=
From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
To: linux-kernel@xxxxxxxxxxxxxxx,
akpm@xxxxxxxxxxxxxxxxxxxx,
torvalds@xxxxxxxxxxxxxxxxxxxx,
stable@xxxxxxxxxxxxxxx
Cc: lwn@xxxxxxx,
jslaby@xxxxxxx,
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Subject: Re: Linux 6.15.1
Date: Wed, 4 Jun 2025 15:08:10 +0200
Message-ID: <2025060455-iron-crinkle-3eb5@gregkh>
X-Mailer: git-send-email 2.49.0
In-Reply-To: <2025060455-steering-surfboard-abe4@gregkh>
References: <2025060455-steering-surfboard-abe4@gregkh>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
diff --git a/Makefile b/Makefile
index c1cd1b5fc269..61d69a3fc827 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 6
PATCHLEVEL = 15
-SUBLEVEL = 0
+SUBLEVEL = 1
EXTRAVERSION =
NAME = Baby Opossum Posse
diff --git a/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi b/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi
index 51c6e19e40b8..7d9394a04302 100644
--- a/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi
+++ b/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi
@@ -222,9 +222,9 @@ i3c1: i3c@10da1000 {
status = "disabled";
};
- gpio0: gpio@ffc03200 {
+ gpio0: gpio@10c03200 {
compatible = "snps,dw-apb-gpio";
- reg = <0xffc03200 0x100>;
+ reg = <0x10c03200 0x100>;
#address-cells = <1>;
#size-cells = <0>;
resets = <&rst GPIO0_RESET>;
diff --git a/arch/arm64/boot/dts/qcom/ipq9574.dtsi b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
index 942290028972..3c02351fbb15 100644
--- a/arch/arm64/boot/dts/qcom/ipq9574.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
@@ -378,6 +378,8 @@ cryptobam: dma-controller@704000 {
interrupts = <GIC_SPI 207 IRQ_TYPE_LEVEL_HIGH>;
#dma-cells = <1>;
qcom,ee = <1>;
+ qcom,num-ees = <4>;
+ num-channels = <16>;
qcom,controlled-remotely;
};
diff --git a/arch/arm64/boot/dts/qcom/sa8775p.dtsi b/arch/arm64/boot/dts/qcom/sa8775p.dtsi
index 3394ae2d1300..2329460b2103 100644
--- a/arch/arm64/boot/dts/qcom/sa8775p.dtsi
+++ b/arch/arm64/boot/dts/qcom/sa8775p.dtsi
@@ -2413,6 +2413,8 @@ cryptobam: dma-controller@1dc4000 {
interrupts = <GIC_SPI 272 IRQ_TYPE_LEVEL_HIGH>;
#dma-cells = <1>;
qcom,ee = <0>;
+ qcom,num-ees = <4>;
+ num-channels = <20>;
qcom,controlled-remotely;
iommus = <&apps_smmu 0x480 0x00>,
<&apps_smmu 0x481 0x00>;
@@ -4903,15 +4905,7 @@ compute-cb@1 {
compatible = "qcom,fastrpc-compute-cb";
reg = <1>;
iommus = <&apps_smmu 0x2141 0x04a0>,
- <&apps_smmu 0x2161 0x04a0>,
- <&apps_smmu 0x2181 0x0400>,
- <&apps_smmu 0x21c1 0x04a0>,
- <&apps_smmu 0x21e1 0x04a0>,
- <&apps_smmu 0x2541 0x04a0>,
- <&apps_smmu 0x2561 0x04a0>,
- <&apps_smmu 0x2581 0x0400>,
- <&apps_smmu 0x25c1 0x04a0>,
- <&apps_smmu 0x25e1 0x04a0>;
+ <&apps_smmu 0x2181 0x0400>;
dma-coherent;
};
@@ -4919,15 +4913,7 @@ compute-cb@2 {
compatible = "qcom,fastrpc-compute-cb";
reg = <2>;
iommus = <&apps_smmu 0x2142 0x04a0>,
- <&apps_smmu 0x2162 0x04a0>,
- <&apps_smmu 0x2182 0x0400>,
- <&apps_smmu 0x21c2 0x04a0>,
- <&apps_smmu 0x21e2 0x04a0>,
- <&apps_smmu 0x2542 0x04a0>,
- <&apps_smmu 0x2562 0x04a0>,
- <&apps_smmu 0x2582 0x0400>,
- <&apps_smmu 0x25c2 0x04a0>,
- <&apps_smmu 0x25e2 0x04a0>;
+ <&apps_smmu 0x2182 0x0400>;
dma-coherent;
};
@@ -4935,15 +4921,7 @@ compute-cb@3 {
compatible = "qcom,fastrpc-compute-cb";
reg = <3>;
iommus = <&apps_smmu 0x2143 0x04a0>,
- <&apps_smmu 0x2163 0x04a0>,
- <&apps_smmu 0x2183 0x0400>,
- <&apps_smmu 0x21c3 0x04a0>,
- <&apps_smmu 0x21e3 0x04a0>,
- <&apps_smmu 0x2543 0x04a0>,
- <&apps_smmu 0x2563 0x04a0>,
- <&apps_smmu 0x2583 0x0400>,
- <&apps_smmu 0x25c3 0x04a0>,
- <&apps_smmu 0x25e3 0x04a0>;
+ <&apps_smmu 0x2183 0x0400>;
dma-coherent;
};
@@ -4951,15 +4929,7 @@ compute-cb@4 {
compatible = "qcom,fastrpc-compute-cb";
reg = <4>;
iommus = <&apps_smmu 0x2144 0x04a0>,
- <&apps_smmu 0x2164 0x04a0>,
- <&apps_smmu 0x2184 0x0400>,
- <&apps_smmu 0x21c4 0x04a0>,
- <&apps_smmu 0x21e4 0x04a0>,
- <&apps_smmu 0x2544 0x04a0>,
- <&apps_smmu 0x2564 0x04a0>,
- <&apps_smmu 0x2584 0x0400>,
- <&apps_smmu 0x25c4 0x04a0>,
- <&apps_smmu 0x25e4 0x04a0>;
+ <&apps_smmu 0x2184 0x0400>;
dma-coherent;
};
@@ -4967,15 +4937,7 @@ compute-cb@5 {
compatible = "qcom,fastrpc-compute-cb";
reg = <5>;
iommus = <&apps_smmu 0x2145 0x04a0>,
- <&apps_smmu 0x2165 0x04a0>,
- <&apps_smmu 0x2185 0x0400>,
- <&apps_smmu 0x21c5 0x04a0>,
- <&apps_smmu 0x21e5 0x04a0>,
- <&apps_smmu 0x2545 0x04a0>,
- <&apps_smmu 0x2565 0x04a0>,
- <&apps_smmu 0x2585 0x0400>,
- <&apps_smmu 0x25c5 0x04a0>,
- <&apps_smmu 0x25e5 0x04a0>;
+ <&apps_smmu 0x2185 0x0400>;
dma-coherent;
};
@@ -4983,15 +4945,7 @@ compute-cb@6 {
compatible = "qcom,fastrpc-compute-cb";
reg = <6>;
iommus = <&apps_smmu 0x2146 0x04a0>,
- <&apps_smmu 0x2166 0x04a0>,
- <&apps_smmu 0x2186 0x0400>,
- <&apps_smmu 0x21c6 0x04a0>,
- <&apps_smmu 0x21e6 0x04a0>,
- <&apps_smmu 0x2546 0x04a0>,
- <&apps_smmu 0x2566 0x04a0>,
- <&apps_smmu 0x2586 0x0400>,
- <&apps_smmu 0x25c6 0x04a0>,
- <&apps_smmu 0x25e6 0x04a0>;
+ <&apps_smmu 0x2186 0x0400>;
dma-coherent;
};
@@ -4999,15 +4953,7 @@ compute-cb@7 {
compatible = "qcom,fastrpc-compute-cb";
reg = <7>;
iommus = <&apps_smmu 0x2147 0x04a0>,
- <&apps_smmu 0x2167 0x04a0>,
- <&apps_smmu 0x2187 0x0400>,
- <&apps_smmu 0x21c7 0x04a0>,
- <&apps_smmu 0x21e7 0x04a0>,
- <&apps_smmu 0x2547 0x04a0>,
- <&apps_smmu 0x2567 0x04a0>,
- <&apps_smmu 0x2587 0x0400>,
- <&apps_smmu 0x25c7 0x04a0>,
- <&apps_smmu 0x25e7 0x04a0>;
+ <&apps_smmu 0x2187 0x0400>;
dma-coherent;
};
@@ -5015,15 +4961,7 @@ compute-cb@8 {
compatible = "qcom,fastrpc-compute-cb";
reg = <8>;
iommus = <&apps_smmu 0x2148 0x04a0>,
- <&apps_smmu 0x2168 0x04a0>,
- <&apps_smmu 0x2188 0x0400>,
- <&apps_smmu 0x21c8 0x04a0>,
- <&apps_smmu 0x21e8 0x04a0>,
- <&apps_smmu 0x2548 0x04a0>,
- <&apps_smmu 0x2568 0x04a0>,
- <&apps_smmu 0x2588 0x0400>,
- <&apps_smmu 0x25c8 0x04a0>,
- <&apps_smmu 0x25e8 0x04a0>;
+ <&apps_smmu 0x2188 0x0400>;
dma-coherent;
};
@@ -5031,31 +4969,7 @@ compute-cb@9 {
compatible = "qcom,fastrpc-compute-cb";
reg = <9>;
iommus = <&apps_smmu 0x2149 0x04a0>,
- <&apps_smmu 0x2169 0x04a0>,
- <&apps_smmu 0x2189 0x0400>,
- <&apps_smmu 0x21c9 0x04a0>,
- <&apps_smmu 0x21e9 0x04a0>,
- <&apps_smmu 0x2549 0x04a0>,
- <&apps_smmu 0x2569 0x04a0>,
- <&apps_smmu 0x2589 0x0400>,
- <&apps_smmu 0x25c9 0x04a0>,
- <&apps_smmu 0x25e9 0x04a0>;
- dma-coherent;
- };
-
- compute-cb@10 {
- compatible = "qcom,fastrpc-compute-cb";
- reg = <10>;
- iommus = <&apps_smmu 0x214a 0x04a0>,
- <&apps_smmu 0x216a 0x04a0>,
- <&apps_smmu 0x218a 0x0400>,
- <&apps_smmu 0x21ca 0x04a0>,
- <&apps_smmu 0x21ea 0x04a0>,
- <&apps_smmu 0x254a 0x04a0>,
- <&apps_smmu 0x256a 0x04a0>,
- <&apps_smmu 0x258a 0x0400>,
- <&apps_smmu 0x25ca 0x04a0>,
- <&apps_smmu 0x25ea 0x04a0>;
+ <&apps_smmu 0x2189 0x0400>;
dma-coherent;
};
@@ -5063,15 +4977,7 @@ compute-cb@11 {
compatible = "qcom,fastrpc-compute-cb";
reg = <11>;
iommus = <&apps_smmu 0x214b 0x04a0>,
- <&apps_smmu 0x216b 0x04a0>,
- <&apps_smmu 0x218b 0x0400>,
- <&apps_smmu 0x21cb 0x04a0>,
- <&apps_smmu 0x21eb 0x04a0>,
- <&apps_smmu 0x254b 0x04a0>,
- <&apps_smmu 0x256b 0x04a0>,
- <&apps_smmu 0x258b 0x0400>,
- <&apps_smmu 0x25cb 0x04a0>,
- <&apps_smmu 0x25eb 0x04a0>;
+ <&apps_smmu 0x218b 0x0400>;
dma-coherent;
};
};
@@ -5131,15 +5037,7 @@ compute-cb@1 {
compatible = "qcom,fastrpc-compute-cb";
reg = <1>;
iommus = <&apps_smmu 0x2941 0x04a0>,
- <&apps_smmu 0x2961 0x04a0>,
- <&apps_smmu 0x2981 0x0400>,
- <&apps_smmu 0x29c1 0x04a0>,
- <&apps_smmu 0x29e1 0x04a0>,
- <&apps_smmu 0x2d41 0x04a0>,
- <&apps_smmu 0x2d61 0x04a0>,
- <&apps_smmu 0x2d81 0x0400>,
- <&apps_smmu 0x2dc1 0x04a0>,
- <&apps_smmu 0x2de1 0x04a0>;
+ <&apps_smmu 0x2981 0x0400>;
dma-coherent;
};
@@ -5147,15 +5045,7 @@ compute-cb@2 {
compatible = "qcom,fastrpc-compute-cb";
reg = <2>;
iommus = <&apps_smmu 0x2942 0x04a0>,
- <&apps_smmu 0x2962 0x04a0>,
- <&apps_smmu 0x2982 0x0400>,
- <&apps_smmu 0x29c2 0x04a0>,
- <&apps_smmu 0x29e2 0x04a0>,
- <&apps_smmu 0x2d42 0x04a0>,
- <&apps_smmu 0x2d62 0x04a0>,
- <&apps_smmu 0x2d82 0x0400>,
- <&apps_smmu 0x2dc2 0x04a0>,
- <&apps_smmu 0x2de2 0x04a0>;
+ <&apps_smmu 0x2982 0x0400>;
dma-coherent;
};
@@ -5163,15 +5053,7 @@ compute-cb@3 {
compatible = "qcom,fastrpc-compute-cb";
reg = <3>;
iommus = <&apps_smmu 0x2943 0x04a0>,
- <&apps_smmu 0x2963 0x04a0>,
- <&apps_smmu 0x2983 0x0400>,
- <&apps_smmu 0x29c3 0x04a0>,
- <&apps_smmu 0x29e3 0x04a0>,
- <&apps_smmu 0x2d43 0x04a0>,
- <&apps_smmu 0x2d63 0x04a0>,
- <&apps_smmu 0x2d83 0x0400>,
- <&apps_smmu 0x2dc3 0x04a0>,
- <&apps_smmu 0x2de3 0x04a0>;
+ <&apps_smmu 0x2983 0x0400>;
dma-coherent;
};
@@ -5179,15 +5061,7 @@ compute-cb@4 {
compatible = "qcom,fastrpc-compute-cb";
reg = <4>;
iommus = <&apps_smmu 0x2944 0x04a0>,
- <&apps_smmu 0x2964 0x04a0>,
- <&apps_smmu 0x2984 0x0400>,
- <&apps_smmu 0x29c4 0x04a0>,
- <&apps_smmu 0x29e4 0x04a0>,
- <&apps_smmu 0x2d44 0x04a0>,
- <&apps_smmu 0x2d64 0x04a0>,
- <&apps_smmu 0x2d84 0x0400>,
- <&apps_smmu 0x2dc4 0x04a0>,
- <&apps_smmu 0x2de4 0x04a0>;
+ <&apps_smmu 0x2984 0x0400>;
dma-coherent;
};
@@ -5195,15 +5069,7 @@ compute-cb@5 {
compatible = "qcom,fastrpc-compute-cb";
reg = <5>;
iommus = <&apps_smmu 0x2945 0x04a0>,
- <&apps_smmu 0x2965 0x04a0>,
- <&apps_smmu 0x2985 0x0400>,
- <&apps_smmu 0x29c5 0x04a0>,
- <&apps_smmu 0x29e5 0x04a0>,
- <&apps_smmu 0x2d45 0x04a0>,
- <&apps_smmu 0x2d65 0x04a0>,
- <&apps_smmu 0x2d85 0x0400>,
- <&apps_smmu 0x2dc5 0x04a0>,
- <&apps_smmu 0x2de5 0x04a0>;
+ <&apps_smmu 0x2985 0x0400>;
dma-coherent;
};
@@ -5211,15 +5077,7 @@ compute-cb@6 {
compatible = "qcom,fastrpc-compute-cb";
reg = <6>;
iommus = <&apps_smmu 0x2946 0x04a0>,
- <&apps_smmu 0x2966 0x04a0>,
- <&apps_smmu 0x2986 0x0400>,
- <&apps_smmu 0x29c6 0x04a0>,
- <&apps_smmu 0x29e6 0x04a0>,
- <&apps_smmu 0x2d46 0x04a0>,
- <&apps_smmu 0x2d66 0x04a0>,
- <&apps_smmu 0x2d86 0x0400>,
- <&apps_smmu 0x2dc6 0x04a0>,
- <&apps_smmu 0x2de6 0x04a0>;
+ <&apps_smmu 0x2986 0x0400>;
dma-coherent;
};
@@ -5227,15 +5085,7 @@ compute-cb@7 {
compatible = "qcom,fastrpc-compute-cb";
reg = <7>;
iommus = <&apps_smmu 0x2947 0x04a0>,
- <&apps_smmu 0x2967 0x04a0>,
- <&apps_smmu 0x2987 0x0400>,
- <&apps_smmu 0x29c7 0x04a0>,
- <&apps_smmu 0x29e7 0x04a0>,
- <&apps_smmu 0x2d47 0x04a0>,
- <&apps_smmu 0x2d67 0x04a0>,
- <&apps_smmu 0x2d87 0x0400>,
- <&apps_smmu 0x2dc7 0x04a0>,
- <&apps_smmu 0x2de7 0x04a0>;
+ <&apps_smmu 0x2987 0x0400>;
dma-coherent;
};
@@ -5243,15 +5093,7 @@ compute-cb@8 {
compatible = "qcom,fastrpc-compute-cb";
reg = <8>;
iommus = <&apps_smmu 0x2948 0x04a0>,
- <&apps_smmu 0x2968 0x04a0>,
- <&apps_smmu 0x2988 0x0400>,
- <&apps_smmu 0x29c8 0x04a0>,
- <&apps_smmu 0x29e8 0x04a0>,
- <&apps_smmu 0x2d48 0x04a0>,
- <&apps_smmu 0x2d68 0x04a0>,
- <&apps_smmu 0x2d88 0x0400>,
- <&apps_smmu 0x2dc8 0x04a0>,
- <&apps_smmu 0x2de8 0x04a0>;
+ <&apps_smmu 0x2988 0x0400>;
dma-coherent;
};
@@ -5259,15 +5101,7 @@ compute-cb@9 {
compatible = "qcom,fastrpc-compute-cb";
reg = <9>;
iommus = <&apps_smmu 0x2949 0x04a0>,
- <&apps_smmu 0x2969 0x04a0>,
- <&apps_smmu 0x2989 0x0400>,
- <&apps_smmu 0x29c9 0x04a0>,
- <&apps_smmu 0x29e9 0x04a0>,
- <&apps_smmu 0x2d49 0x04a0>,
- <&apps_smmu 0x2d69 0x04a0>,
- <&apps_smmu 0x2d89 0x0400>,
- <&apps_smmu 0x2dc9 0x04a0>,
- <&apps_smmu 0x2de9 0x04a0>;
+ <&apps_smmu 0x2989 0x0400>;
dma-coherent;
};
@@ -5275,15 +5109,7 @@ compute-cb@10 {
compatible = "qcom,fastrpc-compute-cb";
reg = <10>;
iommus = <&apps_smmu 0x294a 0x04a0>,
- <&apps_smmu 0x296a 0x04a0>,
- <&apps_smmu 0x298a 0x0400>,
- <&apps_smmu 0x29ca 0x04a0>,
- <&apps_smmu 0x29ea 0x04a0>,
- <&apps_smmu 0x2d4a 0x04a0>,
- <&apps_smmu 0x2d6a 0x04a0>,
- <&apps_smmu 0x2d8a 0x0400>,
- <&apps_smmu 0x2dca 0x04a0>,
- <&apps_smmu 0x2dea 0x04a0>;
+ <&apps_smmu 0x298a 0x0400>;
dma-coherent;
};
@@ -5291,15 +5117,7 @@ compute-cb@11 {
compatible = "qcom,fastrpc-compute-cb";
reg = <11>;
iommus = <&apps_smmu 0x294b 0x04a0>,
- <&apps_smmu 0x296b 0x04a0>,
- <&apps_smmu 0x298b 0x0400>,
- <&apps_smmu 0x29cb 0x04a0>,
- <&apps_smmu 0x29eb 0x04a0>,
- <&apps_smmu 0x2d4b 0x04a0>,
- <&apps_smmu 0x2d6b 0x04a0>,
- <&apps_smmu 0x2d8b 0x0400>,
- <&apps_smmu 0x2dcb 0x04a0>,
- <&apps_smmu 0x2deb 0x04a0>;
+ <&apps_smmu 0x298b 0x0400>;
dma-coherent;
};
@@ -5307,15 +5125,7 @@ compute-cb@12 {
compatible = "qcom,fastrpc-compute-cb";
reg = <12>;
iommus = <&apps_smmu 0x294c 0x04a0>,
- <&apps_smmu 0x296c 0x04a0>,
- <&apps_smmu 0x298c 0x0400>,
- <&apps_smmu 0x29cc 0x04a0>,
- <&apps_smmu 0x29ec 0x04a0>,
- <&apps_smmu 0x2d4c 0x04a0>,
- <&apps_smmu 0x2d6c 0x04a0>,
- <&apps_smmu 0x2d8c 0x0400>,
- <&apps_smmu 0x2dcc 0x04a0>,
- <&apps_smmu 0x2dec 0x04a0>;
+ <&apps_smmu 0x298c 0x0400>;
dma-coherent;
};
@@ -5323,15 +5133,7 @@ compute-cb@13 {
compatible = "qcom,fastrpc-compute-cb";
reg = <13>;
iommus = <&apps_smmu 0x294d 0x04a0>,
- <&apps_smmu 0x296d 0x04a0>,
- <&apps_smmu 0x298d 0x0400>,
- <&apps_smmu 0x29Cd 0x04a0>,
- <&apps_smmu 0x29ed 0x04a0>,
- <&apps_smmu 0x2d4d 0x04a0>,
- <&apps_smmu 0x2d6d 0x04a0>,
- <&apps_smmu 0x2d8d 0x0400>,
- <&apps_smmu 0x2dcd 0x04a0>,
- <&apps_smmu 0x2ded 0x04a0>;
+ <&apps_smmu 0x298d 0x0400>;
dma-coherent;
};
};
diff --git a/arch/arm64/boot/dts/qcom/sm8350.dtsi b/arch/arm64/boot/dts/qcom/sm8350.dtsi
index 69da30f35baa..f055600d6cfe 100644
--- a/arch/arm64/boot/dts/qcom/sm8350.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8350.dtsi
@@ -455,7 +455,7 @@ cdsp_secure_heap: memory@80c00000 {
no-map;
};
- pil_camera_mem: mmeory@85200000 {
+ pil_camera_mem: memory@85200000 {
reg = <0x0 0x85200000 0x0 0x500000>;
no-map;
};
diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi
index 9c809fc5fa45..419df72cd04b 100644
--- a/arch/arm64/boot/dts/qcom/sm8450.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi
@@ -5283,6 +5283,8 @@ cryptobam: dma-controller@1dc4000 {
interrupts = <GIC_SPI 272 IRQ_TYPE_LEVEL_HIGH>;
#dma-cells = <1>;
qcom,ee = <0>;
+ qcom,num-ees = <4>;
+ num-channels = <16>;
qcom,controlled-remotely;
iommus = <&apps_smmu 0x584 0x11>,
<&apps_smmu 0x588 0x0>,
diff --git a/arch/arm64/boot/dts/qcom/sm8550.dtsi b/arch/arm64/boot/dts/qcom/sm8550.dtsi
index eac8de4005d8..ac3e00ad4177 100644
--- a/arch/arm64/boot/dts/qcom/sm8550.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8550.dtsi
@@ -1957,6 +1957,8 @@ cryptobam: dma-controller@1dc4000 {
interrupts = <GIC_SPI 272 IRQ_TYPE_LEVEL_HIGH>;
#dma-cells = <1>;
qcom,ee = <0>;
+ qcom,num-ees = <4>;
+ num-channels = <20>;
qcom,controlled-remotely;
iommus = <&apps_smmu 0x480 0x0>,
<&apps_smmu 0x481 0x0>;
diff --git a/arch/arm64/boot/dts/qcom/sm8650.dtsi b/arch/arm64/boot/dts/qcom/sm8650.dtsi
index 86684cb9a932..c8a2a76a98f0 100644
--- a/arch/arm64/boot/dts/qcom/sm8650.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8650.dtsi
@@ -2533,6 +2533,8 @@ cryptobam: dma-controller@1dc4000 {
<&apps_smmu 0x481 0>;
qcom,ee = <0>;
+ qcom,num-ees = <4>;
+ num-channels = <20>;
qcom,controlled-remotely;
};
diff --git a/arch/arm64/boot/dts/qcom/x1e001de-devkit.dts b/arch/arm64/boot/dts/qcom/x1e001de-devkit.dts
index 5e3970b26e2f..f5063a0df9fb 100644
--- a/arch/arm64/boot/dts/qcom/x1e001de-devkit.dts
+++ b/arch/arm64/boot/dts/qcom/x1e001de-devkit.dts
@@ -507,6 +507,7 @@ vreg_l12b_1p2: ldo12 {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-always-on;
};
vreg_l13b_3p0: ldo13 {
@@ -528,6 +529,7 @@ vreg_l15b_1p8: ldo15 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-always-on;
};
vreg_l16b_2p9: ldo16 {
@@ -745,8 +747,8 @@ vreg_l1j_0p8: ldo1 {
vreg_l2j_1p2: ldo2 {
regulator-name = "vreg_l2j_1p2";
- regulator-min-microvolt = <1200000>;
- regulator-max-microvolt = <1200000>;
+ regulator-min-microvolt = <1256000>;
+ regulator-max-microvolt = <1256000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
diff --git a/arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts b/arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts
index 53781f9b13af..f53067463b76 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts
+++ b/arch/arm64/boot/dts/qcom/x1e80100-asus-vivobook-s15.dts
@@ -330,8 +330,8 @@ vreg_l1j_0p8: ldo1 {
vreg_l2j_1p2: ldo2 {
regulator-name = "vreg_l2j_1p2";
- regulator-min-microvolt = <1200000>;
- regulator-max-microvolt = <1200000>;
+ regulator-min-microvolt = <1256000>;
+ regulator-max-microvolt = <1256000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
diff --git a/arch/arm64/boot/dts/qcom/x1e80100-dell-xps13-9345.dts b/arch/arm64/boot/dts/qcom/x1e80100-dell-xps13-9345.dts
index 86e87f03b0ec..90f588ed7d63 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100-dell-xps13-9345.dts
+++ b/arch/arm64/boot/dts/qcom/x1e80100-dell-xps13-9345.dts
@@ -359,6 +359,7 @@ vreg_l12b_1p2: ldo12 {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-always-on;
};
vreg_l13b_3p0: ldo13 {
@@ -380,6 +381,7 @@ vreg_l15b_1p8: ldo15 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-always-on;
};
vreg_l17b_2p5: ldo17 {
diff --git a/arch/arm64/boot/dts/qcom/x1e80100-hp-omnibook-x14.dts b/arch/arm64/boot/dts/qcom/x1e80100-hp-omnibook-x14.dts
index cd860a246c45..929da9ecddc4 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100-hp-omnibook-x14.dts
+++ b/arch/arm64/boot/dts/qcom/x1e80100-hp-omnibook-x14.dts
@@ -633,6 +633,7 @@ vreg_l12b_1p2: ldo12 {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-always-on;
};
vreg_l13b_3p0: ldo13 {
@@ -654,6 +655,7 @@ vreg_l15b_1p8: ldo15 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-always-on;
};
vreg_l16b_2p9: ldo16 {
@@ -871,8 +873,8 @@ vreg_l1j_0p8: ldo1 {
vreg_l2j_1p2: ldo2 {
regulator-name = "vreg_l2j_1p2";
- regulator-min-microvolt = <1200000>;
- regulator-max-microvolt = <1200000>;
+ regulator-min-microvolt = <1256000>;
+ regulator-max-microvolt = <1256000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
@@ -1352,18 +1354,22 @@ &remoteproc_cdsp {
status = "okay";
};
+&smb2360_0 {
+ status = "okay";
+};
+
&smb2360_0_eusb2_repeater {
vdd18-supply = <&vreg_l3d_1p8>;
vdd3-supply = <&vreg_l2b_3p0>;
+};
+&smb2360_1 {
status = "okay";
};
&smb2360_1_eusb2_repeater {
vdd18-supply = <&vreg_l3d_1p8>;
vdd3-supply = <&vreg_l14b_3p0>;
-
- status = "okay";
};
&swr0 {
diff --git a/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts b/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts
index a3d53f2ba2c3..744a66ae5bdc 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts
+++ b/arch/arm64/boot/dts/qcom/x1e80100-lenovo-yoga-slim7x.dts
@@ -290,6 +290,7 @@ vreg_l12b_1p2: ldo12 {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-always-on;
};
vreg_l14b_3p0: ldo14 {
@@ -304,8 +305,8 @@ vreg_l15b_1p8: ldo15 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-always-on;
};
-
};
regulators-1 {
@@ -508,8 +509,8 @@ vreg_l1j_0p8: ldo1 {
vreg_l2j_1p2: ldo2 {
regulator-name = "vreg_l2j_1p2";
- regulator-min-microvolt = <1200000>;
- regulator-max-microvolt = <1200000>;
+ regulator-min-microvolt = <1256000>;
+ regulator-max-microvolt = <1256000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
diff --git a/arch/arm64/boot/dts/qcom/x1e80100-qcp.dts b/arch/arm64/boot/dts/qcom/x1e80100-qcp.dts
index ec594628304a..f06f45478846 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100-qcp.dts
+++ b/arch/arm64/boot/dts/qcom/x1e80100-qcp.dts
@@ -437,6 +437,7 @@ vreg_l12b_1p2: ldo12 {
regulator-min-microvolt = <1200000>;
regulator-max-microvolt = <1200000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-always-on;
};
vreg_l13b_3p0: ldo13 {
@@ -458,6 +459,7 @@ vreg_l15b_1p8: ldo15 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
+ regulator-always-on;
};
vreg_l16b_2p9: ldo16 {
@@ -675,8 +677,8 @@ vreg_l1j_0p8: ldo1 {
vreg_l2j_1p2: ldo2 {
regulator-name = "vreg_l2j_1p2";
- regulator-min-microvolt = <1200000>;
- regulator-max-microvolt = <1200000>;
+ regulator-min-microvolt = <1256000>;
+ regulator-max-microvolt = <1256000>;
regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>;
};
diff --git a/arch/arm64/boot/dts/qcom/x1e80100.dtsi b/arch/arm64/boot/dts/qcom/x1e80100.dtsi
index 4936fa5b98ff..5aeecf711340 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100.dtsi
+++ b/arch/arm64/boot/dts/qcom/x1e80100.dtsi
@@ -20,6 +20,7 @@
#include <dt-bindings/soc/qcom,gpr.h>
#include <dt-bindings/soc/qcom,rpmh-rsc.h>
#include <dt-bindings/sound/qcom,q6dsp-lpass-ports.h>
+#include <dt-bindings/thermal/thermal.h>
/ {
interrupt-parent = <&intc>;
@@ -3125,7 +3126,7 @@ pcie3: pcie@1bd0000 {
device_type = "pci";
compatible = "qcom,pcie-x1e80100";
reg = <0x0 0x01bd0000 0x0 0x3000>,
- <0x0 0x78000000 0x0 0xf1d>,
+ <0x0 0x78000000 0x0 0xf20>,
<0x0 0x78000f40 0x0 0xa8>,
<0x0 0x78001000 0x0 0x1000>,
<0x0 0x78100000 0x0 0x100000>,
@@ -8457,8 +8458,8 @@ trip-point0 {
};
aoss0-critical {
- temperature = <125000>;
- hysteresis = <0>;
+ temperature = <115000>;
+ hysteresis = <1000>;
type = "critical";
};
};
@@ -8483,7 +8484,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -8509,7 +8510,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -8535,7 +8536,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -8561,7 +8562,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -8587,7 +8588,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -8613,7 +8614,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -8639,7 +8640,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -8665,7 +8666,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -8683,8 +8684,8 @@ trip-point0 {
};
cpuss2-critical {
- temperature = <125000>;
- hysteresis = <0>;
+ temperature = <115000>;
+ hysteresis = <1000>;
type = "critical";
};
};
@@ -8701,8 +8702,8 @@ trip-point0 {
};
cpuss2-critical {
- temperature = <125000>;
- hysteresis = <0>;
+ temperature = <115000>;
+ hysteresis = <1000>;
type = "critical";
};
};
@@ -8719,7 +8720,7 @@ trip-point0 {
};
mem-critical {
- temperature = <125000>;
+ temperature = <115000>;
hysteresis = <0>;
type = "critical";
};
@@ -8727,15 +8728,19 @@ mem-critical {
};
video-thermal {
- polling-delay-passive = <250>;
-
thermal-sensors = <&tsens0 12>;
trips {
trip-point0 {
- temperature = <125000>;
+ temperature = <90000>;
+ hysteresis = <2000>;
+ type = "hot";
+ };
+
+ video-critical {
+ temperature = <115000>;
hysteresis = <1000>;
- type = "passive";
+ type = "critical";
};
};
};
@@ -8751,8 +8756,8 @@ trip-point0 {
};
aoss0-critical {
- temperature = <125000>;
- hysteresis = <0>;
+ temperature = <115000>;
+ hysteresis = <1000>;
type = "critical";
};
};
@@ -8777,7 +8782,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -8803,7 +8808,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -8829,7 +8834,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -8855,7 +8860,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -8881,7 +8886,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -8907,7 +8912,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -8933,7 +8938,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -8959,7 +8964,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -8977,8 +8982,8 @@ trip-point0 {
};
cpuss2-critical {
- temperature = <125000>;
- hysteresis = <0>;
+ temperature = <115000>;
+ hysteresis = <1000>;
type = "critical";
};
};
@@ -8995,8 +9000,8 @@ trip-point0 {
};
cpuss2-critical {
- temperature = <125000>;
- hysteresis = <0>;
+ temperature = <115000>;
+ hysteresis = <1000>;
type = "critical";
};
};
@@ -9013,8 +9018,8 @@ trip-point0 {
};
aoss0-critical {
- temperature = <125000>;
- hysteresis = <0>;
+ temperature = <115000>;
+ hysteresis = <1000>;
type = "critical";
};
};
@@ -9039,7 +9044,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -9065,7 +9070,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -9091,7 +9096,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -9117,7 +9122,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -9143,7 +9148,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -9169,7 +9174,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -9195,7 +9200,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -9221,7 +9226,7 @@ trip-point1 {
};
cpu-critical {
- temperature = <110000>;
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -9239,8 +9244,8 @@ trip-point0 {
};
cpuss2-critical {
- temperature = <125000>;
- hysteresis = <0>;
+ temperature = <115000>;
+ hysteresis = <1000>;
type = "critical";
};
};
@@ -9257,8 +9262,8 @@ trip-point0 {
};
cpuss2-critical {
- temperature = <125000>;
- hysteresis = <0>;
+ temperature = <115000>;
+ hysteresis = <1000>;
type = "critical";
};
};
@@ -9275,8 +9280,8 @@ trip-point0 {
};
aoss0-critical {
- temperature = <125000>;
- hysteresis = <0>;
+ temperature = <115000>;
+ hysteresis = <1000>;
type = "critical";
};
};
@@ -9293,8 +9298,8 @@ trip-point0 {
};
nsp0-critical {
- temperature = <125000>;
- hysteresis = <0>;
+ temperature = <115000>;
+ hysteresis = <1000>;
type = "critical";
};
};
@@ -9311,8 +9316,8 @@ trip-point0 {
};
nsp1-critical {
- temperature = <125000>;
- hysteresis = <0>;
+ temperature = <115000>;
+ hysteresis = <1000>;
type = "critical";
};
};
@@ -9329,8 +9334,8 @@ trip-point0 {
};
nsp2-critical {
- temperature = <125000>;
- hysteresis = <0>;
+ temperature = <115000>;
+ hysteresis = <1000>;
type = "critical";
};
};
@@ -9347,33 +9352,34 @@ trip-point0 {
};
nsp3-critical {
- temperature = <125000>;
- hysteresis = <0>;
+ temperature = <115000>;
+ hysteresis = <1000>;
type = "critical";
};
};
};
gpuss-0-thermal {
- polling-delay-passive = <10>;
+ polling-delay-passive = <200>;
thermal-sensors = <&tsens3 5>;
- trips {
- trip-point0 {
- temperature = <85000>;
- hysteresis = <1000>;
- type = "passive";
+ cooling-maps {
+ map0 {
+ trip = <&gpuss0_alert0>;
+ cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
+ };
- trip-point1 {
- temperature = <90000>;
+ trips {
+ gpuss0_alert0: trip-point0 {
+ temperature = <95000>;
hysteresis = <1000>;
- type = "hot";
+ type = "passive";
};
- trip-point2 {
- temperature = <125000>;
+ gpu-critical {
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -9381,25 +9387,26 @@ trip-point2 {
};
gpuss-1-thermal {
- polling-delay-passive = <10>;
+ polling-delay-passive = <200>;
thermal-sensors = <&tsens3 6>;
- trips {
- trip-point0 {
- temperature = <85000>;
- hysteresis = <1000>;
- type = "passive";
+ cooling-maps {
+ map0 {
+ trip = <&gpuss1_alert0>;
+ cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
+ };
- trip-point1 {
- temperature = <90000>;
+ trips {
+ gpuss1_alert0: trip-point0 {
+ temperature = <95000>;
hysteresis = <1000>;
- type = "hot";
+ type = "passive";
};
- trip-point2 {
- temperature = <125000>;
+ gpu-critical {
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -9407,25 +9414,26 @@ trip-point2 {
};
gpuss-2-thermal {
- polling-delay-passive = <10>;
+ polling-delay-passive = <200>;
thermal-sensors = <&tsens3 7>;
- trips {
- trip-point0 {
- temperature = <85000>;
- hysteresis = <1000>;
- type = "passive";
+ cooling-maps {
+ map0 {
+ trip = <&gpuss2_alert0>;
+ cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
+ };
- trip-point1 {
- temperature = <90000>;
+ trips {
+ gpuss2_alert0: trip-point0 {
+ temperature = <95000>;
hysteresis = <1000>;
- type = "hot";
+ type = "passive";
};
- trip-point2 {
- temperature = <125000>;
+ gpu-critical {
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -9433,25 +9441,26 @@ trip-point2 {
};
gpuss-3-thermal {
- polling-delay-passive = <10>;
+ polling-delay-passive = <200>;
thermal-sensors = <&tsens3 8>;
- trips {
- trip-point0 {
- temperature = <85000>;
- hysteresis = <1000>;
- type = "passive";
+ cooling-maps {
+ map0 {
+ trip = <&gpuss3_alert0>;
+ cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
+ };
- trip-point1 {
- temperature = <90000>;
+ trips {
+ gpuss3_alert0: trip-point0 {
+ temperature = <95000>;
hysteresis = <1000>;
- type = "hot";
+ type = "passive";
};
- trip-point2 {
- temperature = <125000>;
+ gpu-critical {
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -9459,25 +9468,26 @@ trip-point2 {
};
gpuss-4-thermal {
- polling-delay-passive = <10>;
+ polling-delay-passive = <200>;
thermal-sensors = <&tsens3 9>;
- trips {
- trip-point0 {
- temperature = <85000>;
- hysteresis = <1000>;
- type = "passive";
+ cooling-maps {
+ map0 {
+ trip = <&gpuss4_alert0>;
+ cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
+ };
- trip-point1 {
- temperature = <90000>;
+ trips {
+ gpuss4_alert0: trip-point0 {
+ temperature = <95000>;
hysteresis = <1000>;
- type = "hot";
+ type = "passive";
};
- trip-point2 {
- temperature = <125000>;
+ gpu-critical {
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -9485,25 +9495,26 @@ trip-point2 {
};
gpuss-5-thermal {
- polling-delay-passive = <10>;
+ polling-delay-passive = <200>;
thermal-sensors = <&tsens3 10>;
- trips {
- trip-point0 {
- temperature = <85000>;
- hysteresis = <1000>;
- type = "passive";
+ cooling-maps {
+ map0 {
+ trip = <&gpuss5_alert0>;
+ cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
+ };
- trip-point1 {
- temperature = <90000>;
+ trips {
+ gpuss5_alert0: trip-point0 {
+ temperature = <95000>;
hysteresis = <1000>;
- type = "hot";
+ type = "passive";
};
- trip-point2 {
- temperature = <125000>;
+ gpu-critical {
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -9511,25 +9522,26 @@ trip-point2 {
};
gpuss-6-thermal {
- polling-delay-passive = <10>;
+ polling-delay-passive = <200>;
thermal-sensors = <&tsens3 11>;
- trips {
- trip-point0 {
- temperature = <85000>;
- hysteresis = <1000>;
- type = "passive";
+ cooling-maps {
+ map0 {
+ trip = <&gpuss6_alert0>;
+ cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
+ };
- trip-point1 {
- temperature = <90000>;
+ trips {
+ gpuss6_alert0: trip-point0 {
+ temperature = <95000>;
hysteresis = <1000>;
- type = "hot";
+ type = "passive";
};
- trip-point2 {
- temperature = <125000>;
+ gpu-critical {
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -9537,25 +9549,26 @@ trip-point2 {
};
gpuss-7-thermal {
- polling-delay-passive = <10>;
+ polling-delay-passive = <200>;
thermal-sensors = <&tsens3 12>;
- trips {
- trip-point0 {
- temperature = <85000>;
- hysteresis = <1000>;
- type = "passive";
+ cooling-maps {
+ map0 {
+ trip = <&gpuss7_alert0>;
+ cooling-device = <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
+ };
- trip-point1 {
- temperature = <90000>;
+ trips {
+ gpuss7_alert0: trip-point0 {
+ temperature = <95000>;
hysteresis = <1000>;
- type = "hot";
+ type = "passive";
};
- trip-point2 {
- temperature = <125000>;
+ gpu-critical {
+ temperature = <115000>;
hysteresis = <1000>;
type = "critical";
};
@@ -9574,7 +9587,7 @@ trip-point0 {
camera0-critical {
temperature = <115000>;
- hysteresis = <0>;
+ hysteresis = <1000>;
type = "critical";
};
};
@@ -9592,7 +9605,7 @@ trip-point0 {
camera0-critical {
temperature = <115000>;
- hysteresis = <0>;
+ hysteresis = <1000>;
type = "critical";
};
};
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
index e00fbaa8acc1..314d9dfdba57 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
@@ -60,16 +60,6 @@ vcc3v3_sys: regulator-vcc3v3-sys {
vin-supply = <&vcc5v0_sys>;
};
- vcc5v0_host: regulator-vcc5v0-host {
- compatible = "regulator-fixed";
- gpio = <&gpio4 RK_PA3 GPIO_ACTIVE_LOW>;
- pinctrl-names = "default";
- pinctrl-0 = <&vcc5v0_host_en>;
- regulator-name = "vcc5v0_host";
- regulator-always-on;
- vin-supply = <&vcc5v0_sys>;
- };
-
vcc5v0_sys: regulator-vcc5v0-sys {
compatible = "regulator-fixed";
regulator-name = "vcc5v0_sys";
@@ -527,10 +517,10 @@ pmic_int_l: pmic-int-l {
};
};
- usb2 {
- vcc5v0_host_en: vcc5v0-host-en {
+ usb {
+ cy3304_reset: cy3304-reset {
rockchip,pins =
- <4 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
+ <4 RK_PA3 RK_FUNC_GPIO &pcfg_output_high>;
};
};
@@ -597,7 +587,6 @@ u2phy1_otg: otg-port {
};
u2phy1_host: host-port {
- phy-supply = <&vcc5v0_host>;
status = "okay";
};
};
@@ -609,6 +598,29 @@ &usbdrd3_1 {
&usbdrd_dwc3_1 {
status = "okay";
dr_mode = "host";
+ pinctrl-names = "default";
+ pinctrl-0 = <&cy3304_reset>;
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ hub_2_0: hub@1 {
+ compatible = "usb4b4,6502", "usb4b4,6506";
+ reg = <1>;
+ peer-hub = <&hub_3_0>;
+ reset-gpios = <&gpio4 RK_PA3 GPIO_ACTIVE_HIGH>;
+ vdd-supply = <&vcc1v2_phy>;
+ vdd2-supply = <&vcc3v3_sys>;
+
+ };
+
+ hub_3_0: hub@2 {
+ compatible = "usb4b4,6500", "usb4b4,6504";
+ reg = <2>;
+ peer-hub = <&hub_2_0>;
+ reset-gpios = <&gpio4 RK_PA3 GPIO_ACTIVE_HIGH>;
+ vdd-supply = <&vcc1v2_phy>;
+ vdd2-supply = <&vcc3v3_sys>;
+ };
};
&usb_host1_ehci {
diff --git a/arch/arm64/boot/dts/rockchip/rk3576.dtsi b/arch/arm64/boot/dts/rockchip/rk3576.dtsi
index ebb5fc8bb8b1..3824242f8ae8 100644
--- a/arch/arm64/boot/dts/rockchip/rk3576.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3576.dtsi
@@ -1364,6 +1364,7 @@ sfc1: spi@2a300000 {
interrupts = <GIC_SPI 255 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru SCLK_FSPI1_X2>, <&cru HCLK_FSPI1>;
clock-names = "clk_sfc", "hclk_sfc";
+ power-domains = <&power RK3576_PD_SDGMAC>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
@@ -1414,6 +1415,7 @@ sfc0: spi@2a340000 {
interrupts = <GIC_SPI 254 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cru SCLK_FSPI_X2>, <&cru HCLK_FSPI>;
clock-names = "clk_sfc", "hclk_sfc";
+ power-domains = <&power RK3576_PD_NVM>;
#address-cells = <1>;
#size-cells = <0>;
status = "disabled";
diff --git a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
index 7d355aa73ea2..0c286f600296 100644
--- a/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62-main.dtsi
@@ -552,8 +552,6 @@ sdhci0: mmc@fa10000 {
power-domains = <&k3_pds 57 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 57 5>, <&k3_clks 57 6>;
clock-names = "clk_ahb", "clk_xin";
- assigned-clocks = <&k3_clks 57 6>;
- assigned-clock-parents = <&k3_clks 57 8>;
bus-width = <8>;
mmc-ddr-1_8v;
mmc-hs200-1_8v;
diff --git a/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi
index a1daba7b1fad..455ccc770f16 100644
--- a/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi
@@ -575,8 +575,6 @@ sdhci0: mmc@fa10000 {
power-domains = <&k3_pds 57 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 57 5>, <&k3_clks 57 6>;
clock-names = "clk_ahb", "clk_xin";
- assigned-clocks = <&k3_clks 57 6>;
- assigned-clock-parents = <&k3_clks 57 8>;
bus-width = <8>;
mmc-hs200-1_8v;
ti,clkbuf-sel = <0x7>;
diff --git a/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi
index 6e3beb5c2e01..f9b5c97518d6 100644
--- a/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62p-j722s-common-main.dtsi
@@ -564,8 +564,6 @@ sdhci0: mmc@fa10000 {
power-domains = <&k3_pds 57 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 57 1>, <&k3_clks 57 2>;
clock-names = "clk_ahb", "clk_xin";
- assigned-clocks = <&k3_clks 57 2>;
- assigned-clock-parents = <&k3_clks 57 4>;
bus-width = <8>;
mmc-ddr-1_8v;
mmc-hs200-1_8v;
diff --git a/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-imx219.dtso b/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-imx219.dtso
index 76ca02127f95..dd090813a32d 100644
--- a/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-imx219.dtso
+++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-imx219.dtso
@@ -22,7 +22,7 @@ &main_i2c2 {
#size-cells = <0>;
status = "okay";
- i2c-switch@71 {
+ i2c-mux@71 {
compatible = "nxp,pca9543";
#address-cells = <1>;
#size-cells = <0>;
@@ -39,7 +39,6 @@ ov5640: camera@10 {
reg = <0x10>;
clocks = <&clk_imx219_fixed>;
- clock-names = "xclk";
reset-gpios = <&exp1 13 GPIO_ACTIVE_HIGH>;
diff --git a/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-ov5640.dtso b/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-ov5640.dtso
index ccc7f5e43184..7fc7c95f5cd5 100644
--- a/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-ov5640.dtso
+++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-ov5640.dtso
@@ -22,7 +22,7 @@ &main_i2c2 {
#size-cells = <0>;
status = "okay";
- i2c-switch@71 {
+ i2c-mux@71 {
compatible = "nxp,pca9543";
#address-cells = <1>;
#size-cells = <0>;
diff --git a/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-tevi-ov5640.dtso b/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-tevi-ov5640.dtso
index 4eaf9d757dd0..b6bfdfbbdd98 100644
--- a/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-tevi-ov5640.dtso
+++ b/arch/arm64/boot/dts/ti/k3-am62x-sk-csi2-tevi-ov5640.dtso
@@ -22,7 +22,7 @@ &main_i2c2 {
#size-cells = <0>;
status = "okay";
- i2c-switch@71 {
+ i2c-mux@71 {
compatible = "nxp,pca9543";
#address-cells = <1>;
#size-cells = <0>;
diff --git a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
index 94a812a1355b..5ebf7ada6e48 100644
--- a/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am65-main.dtsi
@@ -449,6 +449,8 @@ sdhci0: mmc@4f80000 {
ti,otap-del-sel-mmc-hs = <0x0>;
ti,otap-del-sel-ddr52 = <0x5>;
ti,otap-del-sel-hs200 = <0x5>;
+ ti,itap-del-sel-legacy = <0xa>;
+ ti,itap-del-sel-mmc-hs = <0x1>;
ti,itap-del-sel-ddr52 = <0x0>;
dma-coherent;
status = "disabled";
diff --git a/arch/arm64/boot/dts/ti/k3-am68-sk-base-board.dts b/arch/arm64/boot/dts/ti/k3-am68-sk-base-board.dts
index 11522b36e0ce..5fa70a874d7b 100644
--- a/arch/arm64/boot/dts/ti/k3-am68-sk-base-board.dts
+++ b/arch/arm64/boot/dts/ti/k3-am68-sk-base-board.dts
@@ -44,6 +44,17 @@ vusb_main: regulator-vusb-main5v0 {
regulator-boot-on;
};
+ vsys_5v0: regulator-vsys5v0 {
+ /* Output of LM61460 */
+ compatible = "regulator-fixed";
+ regulator-name = "vsys_5v0";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vusb_main>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
vsys_3v3: regulator-vsys3v3 {
/* Output of LM5141 */
compatible = "regulator-fixed";
@@ -76,7 +87,7 @@ vdd_sd_dv: regulator-tlv71033 {
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
regulator-boot-on;
- vin-supply = <&vsys_3v3>;
+ vin-supply = <&vsys_5v0>;
gpios = <&main_gpio0 49 GPIO_ACTIVE_HIGH>;
states = <1800000 0x0>,
<3300000 0x1>;
diff --git a/arch/arm64/boot/dts/ti/k3-j721e-sk-csi2-dual-imx219.dtso b/arch/arm64/boot/dts/ti/k3-j721e-sk-csi2-dual-imx219.dtso
index 47bb5480b5b0..4eb3cffab032 100644
--- a/arch/arm64/boot/dts/ti/k3-j721e-sk-csi2-dual-imx219.dtso
+++ b/arch/arm64/boot/dts/ti/k3-j721e-sk-csi2-dual-imx219.dtso
@@ -19,6 +19,33 @@ clk_imx219_fixed: imx219-xclk {
#clock-cells = <0>;
clock-frequency = <24000000>;
};
+
+ reg_2p8v: regulator-2p8v {
+ compatible = "regulator-fixed";
+ regulator-name = "2P8V";
+ regulator-min-microvolt = <2800000>;
+ regulator-max-microvolt = <2800000>;
+ vin-supply = <&vdd_sd_dv>;
+ regulator-always-on;
+ };
+
+ reg_1p8v: regulator-1p8v {
+ compatible = "regulator-fixed";
+ regulator-name = "1P8V";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ vin-supply = <&vdd_sd_dv>;
+ regulator-always-on;
+ };
+
+ reg_1p2v: regulator-1p2v {
+ compatible = "regulator-fixed";
+ regulator-name = "1P2V";
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ vin-supply = <&vdd_sd_dv>;
+ regulator-always-on;
+ };
};
&csi_mux {
@@ -34,7 +61,9 @@ imx219_0: imx219-0@10 {
reg = <0x10>;
clocks = <&clk_imx219_fixed>;
- clock-names = "xclk";
+ VANA-supply = <®_2p8v>;
+ VDIG-supply = <®_1p8v>;
+ VDDL-supply = <®_1p2v>;
port {
csi2_cam0: endpoint {
@@ -56,7 +85,9 @@ imx219_1: imx219-1@10 {
reg = <0x10>;
clocks = <&clk_imx219_fixed>;
- clock-names = "xclk";
+ VANA-supply = <®_2p8v>;
+ VDIG-supply = <®_1p8v>;
+ VDDL-supply = <®_1p2v>;
port {
csi2_cam1: endpoint {
diff --git a/arch/arm64/boot/dts/ti/k3-j721e-sk.dts b/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
index 440ef57be294..ffef3d1cfd55 100644
--- a/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
@@ -184,6 +184,17 @@ vsys_3v3: fixedregulator-vsys3v3 {
regulator-boot-on;
};
+ vsys_5v0: fixedregulator-vsys5v0 {
+ /* Output of LM61460 */
+ compatible = "regulator-fixed";
+ regulator-name = "vsys_5v0";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&vusb_main>;
+ regulator-always-on;
+ regulator-boot-on;
+ };
+
vdd_mmc1: fixedregulator-sd {
compatible = "regulator-fixed";
pinctrl-names = "default";
@@ -211,6 +222,20 @@ vdd_sd_dv_alt: gpio-regulator-tps659411 {
<3300000 0x1>;
};
+ vdd_sd_dv: gpio-regulator-TLV71033 {
+ compatible = "regulator-gpio";
+ pinctrl-names = "default";
+ pinctrl-0 = <&vdd_sd_dv_pins_default>;
+ regulator-name = "tlv71033";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-boot-on;
+ vin-supply = <&vsys_5v0>;
+ gpios = <&main_gpio0 118 GPIO_ACTIVE_HIGH>;
+ states = <1800000 0x0>,
+ <3300000 0x1>;
+ };
+
transceiver1: can-phy1 {
compatible = "ti,tcan1042";
#phy-cells = <0>;
@@ -613,6 +638,12 @@ J721E_WKUP_IOPAD(0xd4, PIN_OUTPUT, 7) /* (G26) WKUP_GPIO0_9 */
>;
};
+ vdd_sd_dv_pins_default: vdd-sd-dv-default-pins {
+ pinctrl-single,pins = <
+ J721E_IOPAD(0x1dc, PIN_OUTPUT, 7) /* (Y1) SPI1_CLK.GPIO0_118 */
+ >;
+ };
+
wkup_uart0_pins_default: wkup-uart0-default-pins {
pinctrl-single,pins = <
J721E_WKUP_IOPAD(0xa0, PIN_INPUT, 0) /* (J29) WKUP_UART0_RXD */
diff --git a/arch/arm64/boot/dts/ti/k3-j722s-evm.dts b/arch/arm64/boot/dts/ti/k3-j722s-evm.dts
index 2127316f36a3..0bf2e1821662 100644
--- a/arch/arm64/boot/dts/ti/k3-j722s-evm.dts
+++ b/arch/arm64/boot/dts/ti/k3-j722s-evm.dts
@@ -843,6 +843,10 @@ &serdes_ln_ctrl {
<J722S_SERDES1_LANE0_PCIE0_LANE0>;
};
+&serdes_wiz0 {
+ status = "okay";
+};
+
&serdes0 {
status = "okay";
serdes0_usb_link: phy@0 {
@@ -854,6 +858,10 @@ serdes0_usb_link: phy@0 {
};
};
+&serdes_wiz1 {
+ status = "okay";
+};
+
&serdes1 {
status = "okay";
serdes1_pcie_link: phy@0 {
diff --git a/arch/arm64/boot/dts/ti/k3-j722s-main.dtsi b/arch/arm64/boot/dts/ti/k3-j722s-main.dtsi
index 6850f50530f1..beda9e40e931 100644
--- a/arch/arm64/boot/dts/ti/k3-j722s-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j722s-main.dtsi
@@ -32,6 +32,8 @@ serdes_wiz0: phy@f000000 {
assigned-clocks = <&k3_clks 279 1>;
assigned-clock-parents = <&k3_clks 279 5>;
+ status = "disabled";
+
serdes0: serdes@f000000 {
compatible = "ti,j721e-serdes-10g";
reg = <0x0f000000 0x00010000>;
@@ -70,6 +72,8 @@ serdes_wiz1: phy@f010000 {
assigned-clocks = <&k3_clks 280 1>;
assigned-clock-parents = <&k3_clks 280 5>;
+ status = "disabled";
+
serdes1: serdes@f010000 {
compatible = "ti,j721e-serdes-10g";
reg = <0x0f010000 0x00010000>;
diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-j742s2-main-common.dtsi b/arch/arm64/boot/dts/ti/k3-j784s4-j742s2-main-common.dtsi
index 1944616ab357..1fc0a11c5ab4 100644
--- a/arch/arm64/boot/dts/ti/k3-j784s4-j742s2-main-common.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j784s4-j742s2-main-common.dtsi
@@ -77,7 +77,7 @@ pcie1_ctrl: pcie1-ctrl@4074 {
serdes_ln_ctrl: mux-controller@4080 {
compatible = "reg-mux";
- reg = <0x00004080 0x30>;
+ reg = <0x00004080 0x50>;
#mux-control-cells = <1>;
mux-reg-masks = <0x0 0x3>, <0x4 0x3>, /* SERDES0 lane0/1 select */
<0x8 0x3>, <0xc 0x3>, /* SERDES0 lane2/3 select */
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 9d728800a862..5bc2fc969494 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -277,6 +277,8 @@ int iommu_device_register(struct iommu_device *iommu,
err = bus_iommu_probe(iommu_buses[i]);
if (err)
iommu_device_unregister(iommu);
+ else
+ WRITE_ONCE(iommu->ready, true);
return err;
}
EXPORT_SYMBOL_GPL(iommu_device_register);
@@ -422,13 +424,15 @@ static int iommu_init_device(struct device *dev)
* is buried in the bus dma_configure path. Properly unpicking that is
* still a big job, so for now just invoke the whole thing. The device
* already having a driver bound means dma_configure has already run and
- * either found no IOMMU to wait for, or we're in its replay call right
- * now, so either way there's no point calling it again.
+ * found no IOMMU to wait for, so there's no point calling it again.
*/
- if (!dev->driver && dev->bus->dma_configure) {
+ if (!dev->iommu->fwspec && !dev->driver && dev->bus->dma_configure) {
mutex_unlock(&iommu_probe_device_lock);
dev->bus->dma_configure(dev);
mutex_lock(&iommu_probe_device_lock);
+ /* If another instance finished the job for us, skip it */
+ if (!dev->iommu || dev->iommu_group)
+ return -ENODEV;
}
/*
* At this point, relevant devices either now have a fwspec which will
@@ -2830,31 +2834,39 @@ bool iommu_default_passthrough(void)
}
EXPORT_SYMBOL_GPL(iommu_default_passthrough);
-const struct iommu_ops *iommu_ops_from_fwnode(const struct fwnode_handle *fwnode)
+static const struct iommu_device *iommu_from_fwnode(const struct fwnode_handle *fwnode)
{
- const struct iommu_ops *ops = NULL;
- struct iommu_device *iommu;
+ const struct iommu_device *iommu, *ret = NULL;
spin_lock(&iommu_device_lock);
list_for_each_entry(iommu, &iommu_device_list, list)
if (iommu->fwnode == fwnode) {
- ops = iommu->ops;
+ ret = iommu;
break;
}
spin_unlock(&iommu_device_lock);
- return ops;
+ return ret;
+}
+
+const struct iommu_ops *iommu_ops_from_fwnode(const struct fwnode_handle *fwnode)
+{
+ const struct iommu_device *iommu = iommu_from_fwnode(fwnode);
+
+ return iommu ? iommu->ops : NULL;
}
int iommu_fwspec_init(struct device *dev, struct fwnode_handle *iommu_fwnode)
{
- const struct iommu_ops *ops = iommu_ops_from_fwnode(iommu_fwnode);
+ const struct iommu_device *iommu = iommu_from_fwnode(iommu_fwnode);
struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev);
- if (!ops)
+ if (!iommu)
return driver_deferred_probe_check_state(dev);
+ if (!dev->iommu && !READ_ONCE(iommu->ready))
+ return -EPROBE_DEFER;
if (fwspec)
- return ops == iommu_fwspec_ops(fwspec) ? 0 : -EINVAL;
+ return iommu->ops == iommu_fwspec_ops(fwspec) ? 0 : -EINVAL;
if (!dev_iommu_get(dev))
return -ENOMEM;
diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
index d4fe30ff225b..403850b1040d 100644
--- a/drivers/perf/arm-cmn.c
+++ b/drivers/perf/arm-cmn.c
@@ -727,8 +727,8 @@ static umode_t arm_cmn_event_attr_is_visible(struct kobject *kobj,
if ((chan == 5 && cmn->rsp_vc_num < 2) ||
(chan == 6 && cmn->dat_vc_num < 2) ||
- (chan == 7 && cmn->snp_vc_num < 2) ||
- (chan == 8 && cmn->req_vc_num < 2))
+ (chan == 7 && cmn->req_vc_num < 2) ||
+ (chan == 8 && cmn->snp_vc_num < 2))
return 0;
}
@@ -882,8 +882,8 @@ static umode_t arm_cmn_event_attr_is_visible(struct kobject *kobj,
_CMN_EVENT_XP(pub_##_name, (_event) | (4 << 5)), \
_CMN_EVENT_XP(rsp2_##_name, (_event) | (5 << 5)), \
_CMN_EVENT_XP(dat2_##_name, (_event) | (6 << 5)), \
- _CMN_EVENT_XP(snp2_##_name, (_event) | (7 << 5)), \
- _CMN_EVENT_XP(req2_##_name, (_event) | (8 << 5))
+ _CMN_EVENT_XP(req2_##_name, (_event) | (7 << 5)), \
+ _CMN_EVENT_XP(snp2_##_name, (_event) | (8 << 5))
#define CMN_EVENT_XP_DAT(_name, _event) \
_CMN_EVENT_XP_PORT(dat_##_name, (_event) | (3 << 5)), \
@@ -2558,6 +2558,7 @@ static int arm_cmn_probe(struct platform_device *pdev)
cmn->dev = &pdev->dev;
cmn->part = (unsigned long)device_get_match_data(cmn->dev);
+ cmn->cpu = cpumask_local_spread(0, dev_to_node(cmn->dev));
platform_set_drvdata(pdev, cmn);
if (cmn->part == PART_CMN600 && has_acpi_companion(cmn->dev)) {
@@ -2585,7 +2586,6 @@ static int arm_cmn_probe(struct platform_device *pdev)
if (err)
return err;
- cmn->cpu = cpumask_local_spread(0, dev_to_node(cmn->dev));
cmn->pmu = (struct pmu) {
.module = THIS_MODULE,
.parent = cmn->dev,
@@ -2651,6 +2651,7 @@ static const struct acpi_device_id arm_cmn_acpi_match[] = {
{ "ARMHC600", PART_CMN600 },
{ "ARMHC650" },
{ "ARMHC700" },
+ { "ARMHC003" },
{}
};
MODULE_DEVICE_TABLE(acpi, arm_cmn_acpi_match);
diff --git a/fs/coredump.c b/fs/coredump.c
index c33c177a701b..d740a0411266 100644
--- a/fs/coredump.c
+++ b/fs/coredump.c
@@ -43,6 +43,8 @@
#include <linux/timekeeping.h>
#include <linux/sysctl.h>
#include <linux/elf.h>
+#include <linux/pidfs.h>
+#include <uapi/linux/pidfd.h>
#include <linux/uaccess.h>
#include <asm/mmu_context.h>
@@ -60,6 +62,12 @@ static void free_vma_snapshot(struct coredump_params *cprm);
#define CORE_FILE_NOTE_SIZE_DEFAULT (4*1024*1024)
/* Define a reasonable max cap */
#define CORE_FILE_NOTE_SIZE_MAX (16*1024*1024)
+/*
+ * File descriptor number for the pidfd for the thread-group leader of
+ * the coredumping task installed into the usermode helper's file
+ * descriptor table.
+ */
+#define COREDUMP_PIDFD_NUMBER 3
static int core_uses_pid;
static unsigned int core_pipe_limit;
@@ -339,6 +347,27 @@ static int format_corename(struct core_name *cn, struct coredump_params *cprm,
case 'C':
err = cn_printf(cn, "%d", cprm->cpu);
break;
+ /* pidfd number */
+ case 'F': {
+ /*
+ * Installing a pidfd only makes sense if
+ * we actually spawn a usermode helper.
+ */
+ if (!ispipe)
+ break;
+
+ /*
+ * Note that we'll install a pidfd for the
+ * thread-group leader. We know that task
+ * linkage hasn't been removed yet and even if
+ * this @current isn't the actual thread-group
+ * leader we know that the thread-group leader
+ * cannot be reaped until @current has exited.
+ */
+ cprm->pid = task_tgid(current);
+ err = cn_printf(cn, "%d", COREDUMP_PIDFD_NUMBER);
+ break;
+ }
default:
break;
}
@@ -493,7 +522,7 @@ static void wait_for_dump_helpers(struct file *file)
}
/*
- * umh_pipe_setup
+ * umh_coredump_setup
* helper function to customize the process used
* to collect the core in userspace. Specifically
* it sets up a pipe and installs it as fd 0 (stdin)
@@ -503,11 +532,32 @@ static void wait_for_dump_helpers(struct file *file)
* is a special value that we use to trap recursive
* core dumps
*/
-static int umh_pipe_setup(struct subprocess_info *info, struct cred *new)
+static int umh_coredump_setup(struct subprocess_info *info, struct cred *new)
{
struct file *files[2];
struct coredump_params *cp = (struct coredump_params *)info->data;
- int err = create_pipe_files(files, 0);
+ int err;
+
+ if (cp->pid) {
+ struct file *pidfs_file __free(fput) = NULL;
+
+ pidfs_file = pidfs_alloc_file(cp->pid, 0);
+ if (IS_ERR(pidfs_file))
+ return PTR_ERR(pidfs_file);
+
+ /*
+ * Usermode helpers are childen of either
+ * system_unbound_wq or of kthreadd. So we know that
+ * we're starting off with a clean file descriptor
+ * table. So we should always be able to use
+ * COREDUMP_PIDFD_NUMBER as our file descriptor value.
+ */
+ err = replace_fd(COREDUMP_PIDFD_NUMBER, pidfs_file, 0);
+ if (err < 0)
+ return err;
+ }
+
+ err = create_pipe_files(files, 0);
if (err)
return err;
@@ -515,10 +565,13 @@ static int umh_pipe_setup(struct subprocess_info *info, struct cred *new)
err = replace_fd(0, files[0], 0);
fput(files[0]);
+ if (err < 0)
+ return err;
+
/* and disallow core files too */
current->signal->rlim[RLIMIT_CORE] = (struct rlimit){1, 1};
- return err;
+ return 0;
}
void do_coredump(const kernel_siginfo_t *siginfo)
@@ -593,7 +646,7 @@ void do_coredump(const kernel_siginfo_t *siginfo)
}
if (cprm.limit == 1) {
- /* See umh_pipe_setup() which sets RLIMIT_CORE = 1.
+ /* See umh_coredump_setup() which sets RLIMIT_CORE = 1.
*
* Normally core limits are irrelevant to pipes, since
* we're not writing to the file system, but we use
@@ -632,7 +685,7 @@ void do_coredump(const kernel_siginfo_t *siginfo)
retval = -ENOMEM;
sub_info = call_usermodehelper_setup(helper_argv[0],
helper_argv, NULL, GFP_KERNEL,
- umh_pipe_setup, NULL, &cprm);
+ umh_coredump_setup, NULL, &cprm);
if (sub_info)
retval = call_usermodehelper_exec(sub_info,
UMH_WAIT_EXEC);
diff --git a/fs/pidfs.c b/fs/pidfs.c
index d64a4cbeb0da..50e69a9e104a 100644
--- a/fs/pidfs.c
+++ b/fs/pidfs.c
@@ -888,6 +888,7 @@ struct file *pidfs_alloc_file(struct pid *pid, unsigned int flags)
return ERR_PTR(-ESRCH);
flags &= ~PIDFD_CLONE;
+ flags |= O_RDWR;
pidfd_file = dentry_open(&path, flags, current_cred());
/* Raise PIDFD_THREAD explicitly as do_dentry_open() strips it. */
if (!IS_ERR(pidfd_file))
diff --git a/include/linux/coredump.h b/include/linux/coredump.h
index 77e6e195d1d6..76e41805b92d 100644
--- a/include/linux/coredump.h
+++ b/include/linux/coredump.h
@@ -28,6 +28,7 @@ struct coredump_params {
int vma_count;
size_t vma_data_size;
struct core_vma_metadata *vma_meta;
+ struct pid *pid;
};
extern unsigned int core_file_note_size_limit;
diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index 3a8d35d41fda..4273871845ee 100644
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
@@ -750,6 +750,7 @@ struct iommu_domain_ops {
* @dev: struct device for sysfs handling
* @singleton_group: Used internally for drivers that have only one group
* @max_pasids: number of supported PASIDs
+ * @ready: set once iommu_device_register() has completed successfully
*/
struct iommu_device {
struct list_head list;
@@ -758,6 +759,7 @@ struct iommu_device {
struct device *dev;
struct iommu_group *singleton_group;
u32 max_pasids;
+ bool ready;
};
/**
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c
index 7986145a527c..5a7745170e84 100644
--- a/net/sched/sch_hfsc.c
+++ b/net/sched/sch_hfsc.c
@@ -175,6 +175,11 @@ struct hfsc_sched {
#define HT_INFINITY 0xffffffffffffffffULL /* infinite time value */
+static bool cl_in_el_or_vttree(struct hfsc_class *cl)
+{
+ return ((cl->cl_flags & HFSC_FSC) && cl->cl_nactive) ||
+ ((cl->cl_flags & HFSC_RSC) && !RB_EMPTY_NODE(&cl->el_node));
+}
/*
* eligible tree holds backlogged classes being sorted by their eligible times.
@@ -1040,6 +1045,8 @@ hfsc_change_class(struct Qdisc *sch, u32 classid, u32 parentid,
if (cl == NULL)
return -ENOBUFS;
+ RB_CLEAR_NODE(&cl->el_node);
+
err = tcf_block_get(&cl->block, &cl->filter_list, sch, extack);
if (err) {
kfree(cl);
@@ -1572,7 +1579,7 @@ hfsc_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free)
sch->qstats.backlog += len;
sch->q.qlen++;
- if (first && !cl->cl_nactive) {
+ if (first && !cl_in_el_or_vttree(cl)) {
if (cl->cl_flags & HFSC_RSC)
init_ed(cl, len);
if (cl->cl_flags & HFSC_FSC)
Return-Path: <linux-kernel+bounces-673248-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 5A3A041E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:11:28 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id B258B3A6C2C
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:11:06 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 505E128F937;
Wed, 4 Jun 2025 13:08:30 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HmLm0Bld"
Received: from mail-yb1-f177.google.com (mail-yb1-f177.google.com [209.85.219.177])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id E205829116C;
Wed, 4 Jun 2025 13:08:26 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.177
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749042509; cv=none; b=GwxauFBnYjeHHhLq2W83i5s7sPPbGBoKzdgN+hw8cXlk/2GcCBhN5uSav2Fddi9GqV+5AcxcEODEEbCosTsmlQSy1KFqRStYlhFMao5EYkk5T2wxeYKHTlNKHqRa6XF/s/xP2rdbZmGQWt8EMFkQokTx6Pe/Kw5frc2ArZBSJ98=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749042509; c=relaxed/simple;
bh=IaJDoPzg8QMLk1GnLprh5fIDI9FLXNfYV4TC6NqsKEE=;
h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
To:Cc:Content-Type; b=VRjTbqT1sl/2TO7NxXmWjJt7s6PsoqMevyieOj4NIvZQeJdqU9LaOvrI6x+BB1eAbNAF1hClXj3jjEfE8zGtjVenZnz7fyQ7nItDVp06Of5Mo5szp3yzrzQSAjFs4Q60fo4dqT6D/Ixd2Cd1cvI06wLoxH9kTosdCycrrYV/Iz4=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=HmLm0Bld; arc=none smtp.client-ip=209.85.219.177
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
Received: by mail-yb1-f177.google.com with SMTP id 3f1490d57ef6-e740a09eae0so5999688276.1;
Wed, 04 Jun 2025 06:08:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1749042506; x=1749647306; darn=vger.kernel.org;
h=cc:to:subject:message-id:date:from:in-reply-to:references
:mime-version:from:to:cc:subject:date:message-id:reply-to;
bh=tC9iYEXmlPpatd1qYNBGszNIrKERHR8YSkcQ5CjfbMM=;
b=HmLm0BldqO7Ek7jmM2TV8l+PnxkE8GY6sOAEjtYY2JNREhuH9ByKmot6YaO4qnt+NE
FwMyDdBkij2cKObnWIixaGP7+8PIRxT7aZk6TMwfW9zb1vOgRXlguY0oyotpAUWUaIvZ
NGkq6TNMlEEjDCnUhpGkH+VvLJFcYTnAb9qvKC8HCcnLh1+Wp0XVl2nnPCa2KeeVjEnr
aQR+tQxDlnwwKWi8eCktPm7bIrKOcFTm8Yey8P7n02FBfXdEdWRRUcGVyX7XuTBRGkWw
E8OLdokfJ19yH9gKTzzxEgLoaxRaoCyv7hvveAV8qLEXiI3ssUy0DhAD5lOheTg3+i4f
VRAw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749042506; x=1749647306;
h=cc:to:subject:message-id:date:from:in-reply-to:references
:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=tC9iYEXmlPpatd1qYNBGszNIrKERHR8YSkcQ5CjfbMM=;
b=Mf+YkkI7GahbbKx711DfuGfM5FwX76CLWFl0hqgBJs7ff2IwJsg3r0Jga6m+1F9vnK
8/K0J2zgvVEEbhUfXhhGDzzLjMtplLUnY8jh6rQc9wIliYkDASv4jBlvVtv2opqUE69B
5zUz/uNAx33jGRAGybwS2lx0UCZoZvCYQadJidYkgfzXbPLgp4VdcD0AemGTpjM52eBS
wt64n0noLhyTF0g5XjsSdm0Oj9z9NJ1Q0vZpx/eXtSBG5IXi8YrTrFKZkA9EgA6AMsWN
Bl4ERvJkUfE/GF1HVLha6NPIXs4sQg92J8Cdj4p9c85/cmvwXi3uvAA6KxSpdzo4QpPR
Tx5w==
X-Forwarded-Encrypted: i=1; AJvYcCXhuCSMtK1ThGALKPL7kTWia0dTu//wcXL90Mtn7U53fzzoJcjsqKdFfyQGwg9Z7W0eriE3EtMmTWoFfvs=@vger.kernel.org
X-Gm-Message-State: AOJu0Yxd++VKZPw9JjPyy/Afy1OtlWZV/RIybI6byBRsmmhhKMO+d78b
tNj4EIVj7Q3BDwFxZGNplS56u+W5227JOtvv2icqwwt2vkb/UB+ZcOZJNukYZhN5YWC3r+ByRUt
sV2MtV7HrfQ7J/HLd2MgxzS3cj+zyoqAjA1QrQDw=
X-Gm-Gg: ASbGncthO5G9qK841YYt1XcjFR7pRBEwkcwkFuIauEAdxhQquK+TvbP2BrxoM+pW6ND
1g320izw/HFgjCQqh5S9WPOQ8hbjMW82yLFYJd+mvtvkhi2ULGXnE47cXx279kJKOpqf08F503l
ekla4/okoFWz0rl4G+XSjm1v19+xEM0Yo=
X-Google-Smtp-Source: AGHT+IF7alnMbrbqO9NpYJkpsB5jxOjXxEiktzWLUbq/kLNxP6YnbLIfTtGPBT1xFbh0wT4mofPVUoUINuQKSsuFkGw=
X-Received: by 2002:a05:6902:10c1:b0:e81:7e16:aac1 with SMTP id
3f1490d57ef6-e817e16e42bmr2304215276.35.1749042505640; Wed, 04 Jun 2025
06:08:25 -0700 (PDT)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
References: <20250603221416.74523-1-stefano.radaelli21@xxxxxxxxx>
<54c4a279-a528-4657-8319-c9374add54b7@xxxxxxx> <CAK+owoihxp-2xAvFfVthvNELshti_3V-pFgD7D7jzd1XqiLgGQ@xxxxxxxxxxxxxx>
<d5f891d7-d24a-4f85-b59d-313b925c4495@xxxxxxx>
In-Reply-To: <d5f891d7-d24a-4f85-b59d-313b925c4495@xxxxxxx>
From: Stefano Radaelli <stefano.radaelli21@xxxxxxxxx>
Date: Wed, 4 Jun 2025 15:08:09 +0200
X-Gm-Features: AX0GCFs1swEQiYv2NQSRcTQZ_03Yg7U17iAxPh_wyGwxwshbS1HFhm1xVLPn_sI
Message-ID: <CAK+owog69JktbsBhHZj7ULYXmH_bZ-CO8=QEMqBVc0mjp8jz6g@xxxxxxxxxxxxxx>
Subject: Re: [v1] arm64: dts: freescale: imx93-var-som: update eqos support
for MaxLinear PHY
To: Andrew Lunn <andrew@xxxxxxx>
Cc: devicetree@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
Rob Herring <robh@xxxxxxxxxx>, Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>,
Shawn Guo <shawnguo@xxxxxxxxxx>, Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>,
Pengutronix Kernel Team <kernel@xxxxxxxxxxxxxx>, Fabio Estevam <festevam@xxxxxxxxx>, imx@xxxxxxxxxxxxxxx,
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
Content-Type: text/plain; charset="UTF-8"
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hi Andrew,
To clarify more precisely: hw team told me that the required 2 ns
RGMII delays are
implemented directly in hardware inside the SOM itself, through passive delay
elements (filters) placed on the RX and TX lines. There is no reliance on PHY
strap settings or any kind of delay configuration via registers.
This means:
- The delays are fixed and cannot be changed via software.
- From the point of view of any carrier board, the interface is
already timing-compliant.
Given that, using phy-mode = "rgmii" in the DTS is intentional and
correct, since the
necessary internal delays are already guaranteed by the SOM hardware design.
Let me know if further clarification would be helpful, would it help if I add a
clarification about this in the commit message for v2?
Best regards,
Stefano
Il giorno mer 4 giu 2025 alle ore 14:01 Andrew Lunn <andrew@xxxxxxx> ha scritto:
61;8001;1cOn Wed, Jun 04, 2025 at 09:37:39AM +0200, Stefano Radaelli wrote:
> Hi Andrew,
>
> I double-checked with our hardware team, and it turns out that all required
> RGMII delays are already handled by the hardware on the SOM (trace
> tuning + PHY config).
What do you mean by PHY config?
The four RGMII modes you can use with phy-mode are purely about the
PCB. If you have the PHY strapped to add delays, what does not count
for PCB, and if you are not careful, future software could reconfigure
it.
Andrew
Return-Path: <linux-kernel+bounces-673249-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id D648041E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:12:47 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id A05B23A2B59
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:12:25 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 5740C28F953;
Wed, 4 Jun 2025 13:12:04 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="YJi3nGfx"
Received: from mail-qt1-f182.google.com (mail-qt1-f182.google.com [209.85.160.182])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id BD5E528F921
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:12:00 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.182
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749042723; cv=none; b=Heg6AUWf3Q1N7eqXpq2BMx4lJYjDe4REJfBWELwKTBUX69XlDlyrPqrfdE3HIjsYXWtUC6k25UtLJEvbeCWefiUI9J1U6qjwTZhNty3klxvg59nESrY2XRQ5Hc+s77xbyMnx+NtoIF3w/vbuEj9eQMr7+cyeflHz0QWdoSeU2uA=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749042723; c=relaxed/simple;
bh=rvXbnvojrWj0t5qf0N1l2496RCA+PXVu7TBL/yH4dlc=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=bL1BCDctOEQr6zV7RobKjFK9VwJsUxOBgINx5XaApKl51iIsaSfpFMMd1zA3JRhmbxY4FzqtGq+9qJrN4LYgwTOfnm0leutCnCLDmr3C31kfnxPF8cos3YiI/bN+KDCDtMTL8Qhb95lsPo1Avw38uK+rfFk03f7O6+N7ejP9bMc=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca; spf=pass smtp.mailfrom=ziepe.ca; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b=YJi3nGfx; arc=none smtp.client-ip=209.85.160.182
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ziepe.ca
Received: by mail-qt1-f182.google.com with SMTP id d75a77b69052e-4a58ebece05so34162441cf.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 06:12:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=ziepe.ca; s=google; t=1749042719; x=1749647519; darn=vger.kernel.org;
h=in-reply-to:content-disposition:mime-version:references:message-id
:subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to;
bh=NvumSSr0kAfpiV1yWSR9m8AJwroDgT3eD8bEjr1/pKM=;
b=YJi3nGfxu+FBx6F7BlXqjw9wX1Pyn0Fo9wApE4wKt1CODL6N4+YzMsLaoIZ5hoo3m9
XfyiJpQwf9E9MqNBF+0JA7lXhIP3V3OEKnxrIiRt1MBypqTlHJvtuJ52UBstTb5lBypk
ndw/PWA+jxPR/sxtxUe7O0Krh5bChvObHYUeDMcnVa5IjSA9N2ZESD9QDOlfYAaCTegw
/WTPlXdPaY68+FwfZsNW/FPc1CGC+CNb0w4Kz1GVv3haI7l0aGIZZGx/jYLmFT9ztBTT
E20NyzTtuKyNpyB/ekQ3bAjalqz/rkTEU91TWPfHTgq/yStUGYhsYtB9wJEfs5hOZ/du
7ykA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749042719; x=1749647519;
h=in-reply-to:content-disposition:mime-version:references:message-id
:subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to;
bh=NvumSSr0kAfpiV1yWSR9m8AJwroDgT3eD8bEjr1/pKM=;
b=QSJHC+QsBczwD20xiaZ4CmEBGa+aJEcrp4JzCXlarvPYgCpRgxLRbvAnx9bLOupyae
OWyGGgSA/zb3gOaxiMmz7aSrrkEfTcaODqr5qqmuhM0TBLPwhKlHvAyRjgwEWvKqIAFW
gB4AUDILl4DmrCXAXdIDDtw52fZxlSvJv8Z2ySU8iyOGaf+z1llBEHR7XODPP/9/EZzA
hgxeFsPs8ld1QZs31o/EDIw8lsccZNFlqYfEWaggNZH8QkvyuBSRIoMS+6SbACjjUAxH
/L41JMWNBHKY4XB0pOlnrrGqWDvKmACUnGeMZlVSESBbp6q5TfjXQtx4Aa6YsyrS2jNI
6avg==
X-Forwarded-Encrypted: i=1; AJvYcCUs46+0fJAYNSUco2lCxvWrhEM6vow0HLka+OYGxzY5nXf10taSUeS/UBQ2iD8kOMiwiVaq0w51BHdMYok=@vger.kernel.org
X-Gm-Message-State: AOJu0YzrAWiXthinhhrwhwC4W9q4+nYObPG3pAEJxmdcJJSDaWLKmFaP
sL+T7rSFD5D2xo79eB0S8/AqCfQB1Gj/DCD0zMuew2QgVcNWuUcsYgNRmH8kcE4fs9U=
X-Gm-Gg: ASbGncvc60VCjpp3RhAArx6A3HtXC3AQ1Ga8kKbLoEf+1BFnykUKA94OUzswavH50iD
raboItBdzL6i+vv6imnhwZUS1/ryBwGH2wDjATR/qEW0QYMjekdVFf5OIzZAvQl7D+uSvzMVkhv
gWOTpVs42MLY1CHgk6tt9CKSpBukB4K3OQ2gwqUEBu3UMV2/BjOSwoBk+1tpJsbFRn6mEMMxYgm
Pfqy18ZTz81TAXAjLThN9iBioZXi1akmUHYzE1QSgV3ono25IQrpIZsw8dGphO17hJecbaljels
ypb6nGI4Se5xVAwweSIDOX4WEJtfraM8a7BxaHi5vdw5cOKSmFETX1WF1d3j6mbQQykwGz9XwmA
tkcXy/nhQ0vCxyGR9ATFM4eyGelLK9RBCc9ga7w==
X-Google-Smtp-Source: AGHT+IFViWiK+H2tOO63v35Ja1Wc40+ZaMY6s15ANlIi+DfPgSPAbvG84jmAiZkDwFO1NGkyEYYXbA==
X-Received: by 2002:a05:620a:4001:b0:7c0:b523:e1b6 with SMTP id af79cd13be357-7d219862392mr393114685a.11.1749042719387;
Wed, 04 Jun 2025 06:11:59 -0700 (PDT)
Received: from ziepe.ca (hlfxns017vw-142-167-56-70.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.167.56.70])
by smtp.gmail.com with ESMTPSA id af79cd13be357-7d09a0e2fc3sm1042617785a.19.2025.06.04.06.11.58
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 06:11:58 -0700 (PDT)
Received: from jgg by wakko with local (Exim 4.97)
(envelope-from <jgg@xxxxxxxx>)
id 1uMnuQ-000000004kJ-0VP6;
Wed, 04 Jun 2025 10:11:58 -0300
Date: Wed, 4 Jun 2025 10:11:58 -0300
From: Jason Gunthorpe <jgg@xxxxxxxx>
To: David Hildenbrand <david@xxxxxxxxxx>
Cc: Hyesoo Yu <hyesoo.yu@xxxxxxxxxxx>, janghyuck.kim@xxxxxxxxxxx,
zhaoyang.huang@xxxxxxxxxx, jaewon31.kim@xxxxxxxxx,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
John Hubbard <jhubbard@xxxxxxxxxx>, Peter Xu <peterx@xxxxxxxxxx>,
linux-mm@xxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
Subject: Re: [PATCH] mm: gup: fail migration when no migratable page to
prevent CMA pinning
Message-ID: <20250604131158.GA17991@xxxxxxxx>
References: <CGME20250604095242epcas2p17032a1133b03be2d24c8ebcff94d1d55@xxxxxxxxxxxxxxxxxxxx>
<20250604095049.4052078-1-hyesoo.yu@xxxxxxxxxxx>
<fa9d72ac-1b46-4a09-8f29-af97f2ca6e2e@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <fa9d72ac-1b46-4a09-8f29-af97f2ca6e2e@xxxxxxxxxx>
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 12:07:21PM +0200, David Hildenbrand wrote:
> Instead of retrying, this patch explicitly fails the migration attempt
> (-EBUSY) if no movable pages are found and unpinnable pages remain.
> This avoids infinite loops and gives user a clear signal to retry,
> rather then spinning inside kernel.
Hmmm, that means we will return EBUSY to the caller. Are all users actually
prepared to deal with that?
I don't think anyone is really prepared to deal with GUP temporarily
failing..
Kernel is expected to sort it out. We tolerated the existing temporary
failure due to its rarity and lack of a solution only.
Either it can be gup'd or not. There should be no retry.
Jason
Return-Path: <linux-kernel+bounces-673250-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id E100641E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:12:55 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 050203A6816
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:12:32 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 5EC6F28FA99;
Wed, 4 Jun 2025 13:12:05 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="LY0q+1IQ"
Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id A2F0228F508
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:12:02 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749042724; cv=none; b=t9Juea+sj/ZORVg17ArDjwOiXSH4oo77twyM7atHh7ZotzT4DgJCd62Veg+7C5mCZyOeClZFnW6nTIxe1jujr81pP9icrth6S4+9r7D2QoSVZCVTKD/j0mWzzKr4QfzeYuFqT88yJhw94XAo1rC70tPnL1OTFvZIJ3FonRjJDVo=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749042724; c=relaxed/simple;
bh=8OC04Uig/NIlrSakrm1nnPTay9KqXWpG36eTaAqGLm0=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=fU8ff/lcKoPLwVpUEQfeiFkx2j1jik9t1ElmTR5IBMK3woXax88zgsMdxiAjZ41BopDIak5TZrFIfmBnx2oxIXo8GQjZFE7N3MqUUFRc2Bsz0VncpgoMd22gELjUdSxQnemTGLQSoxlR5jo9abOZDwkbzXSc34Ia2MyrH7lKsIU=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=LY0q+1IQ; arc=none smtp.client-ip=205.220.168.131
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com
Received: from pps.filterd (m0279866.ppops.net [127.0.0.1])
by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5548Eove023754
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:12:01 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h=
cc:content-type:date:from:in-reply-to:message-id:mime-version
:references:subject:to; s=qcppdkim1; bh=XQvsxDPGz+N4nZmV7ksKBXsD
n1FjHMoRZnCtDTtfld8=; b=LY0q+1IQAxk4WK8T0Neho23c3g1xaCJAGYo2Ma0D
ZuBYCbNpeTYdqVof2VF1lmWc+EpctiqGqg2g/J6udDys6cdvvuVXSscc3aM6HOJn
0gwlcwzKjf6dVeDq45YHDv9l8WYWlYc9Mcz8MspkCkDSy7OP6nPSSn+ZM0NZx0DJ
rFgiOteNADm/K6KoQSItmwi0SDrLwPlEMeMQcchC8uknQvUE4bzTx0KmeJfQAfAK
JH09+Hjc+dz+Gq+9HgkEbp04gGFxPtCYjAkOdzzy/ghOz8ctWuZGZvvnxLC25Au7
Zd0kV2tbCEZRCx8dPKR5SCqJNpwlLt/wvj1bbL0h0ojK3g==
Received: from mail-ot1-f69.google.com (mail-ot1-f69.google.com [209.85.210.69])
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 471g8rx5uv-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT)
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 13:12:01 +0000 (GMT)
Received: by mail-ot1-f69.google.com with SMTP id 46e09a7af769-72bc3351885so6382111a34.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 06:12:01 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749042720; x=1749647520;
h=in-reply-to:content-disposition:mime-version:references:message-id
:subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to;
bh=XQvsxDPGz+N4nZmV7ksKBXsDn1FjHMoRZnCtDTtfld8=;
b=bWtvd3p1F0kYSG3ahE1CKJSOUAlcKampUFEqptiAWqvQ/UBBcatUtcOS+YtLj4Sz30
AOvYyOmbRHCb3LoDAIFUsvItXL4sIpCrgKMpofRM1XkPoxal3SKG3GxGPVu4dQuTdBdL
SfhQr+cfFY80exKfUoqmpCw/k21JLvTng5pl50k91GVYY/ftoKlCwpdaN7niVUPUsfJa
tvL2oNFqg6ZaR2ojH5KSf3nbg5AzIFU2MpVlMm+/B62VGpFaU+w2MN1pj3o8SQh91pYk
XxW79YhnWX308kykrrxv5fWVNYn1+5uc9Zakesxl65rmC0uE42J/oxMIBSyRThOtd3Ud
Torw==
X-Forwarded-Encrypted: i=1; AJvYcCWot7EHsdHFXuhrBnqetYriVcSU6Q8lupA2Fa23NSkNsl0uazDKvXVm6PSznqFLob5oblV7r1YaEiqtp6M=@vger.kernel.org
X-Gm-Message-State: AOJu0YxA1dDC0Yc0ODEqqz3d6/lQvWIe6cRLcGfLYRx9I4SodsOnYfOl
ZyiuF1t+vYMx3DgHLFu4RVIct6fs+li1GygjEEP9kSrCQ1jNkrLmr+34bp+OfDcVBl3hen3/S41
Nuks1Q5hf+gFX0ra9eyT/bMwnw8tFoPwA/vDxVN7UHX/yeJ6GBr1XCBwl4E1tIU+UG5a3VGbnVw
/gFw==
X-Gm-Gg: ASbGncu+gCWKKp/DdBNg30HEBaDxEybtOKsiIiuWpIXCC9E8KtzV9kY0xxVfJpmiGNM
E2nZ+SSXzvwfAAVqJTOEJM0aP8o6Xq4IHefyUWRxIiHqLr4wJNgDPQsHv+juN+y8zZvT0coTlwe
1Oq7rolh6O5vnoF2zhv52HF2vvlxzb1vGOON/5/IbYQU9jUn6XXGkwSFQ3ZDON3Wms+hmA4cs14
Ci2adYfjJsnPPkK9xwWNSuPpY5P7CnEiPesMZ2wuIs7aMdLbHW71t3im1kutbsYwQ30BLlmc5/C
7dvBzt6zfzXxepFhOomeZFbEE3X5aP06ZxjY1TNgsHVbpnnlpb2Wo0BMsF2mamwRQURtHMpkZn8
=
X-Received: by 2002:a05:622a:1f9a:b0:476:a03b:96ec with SMTP id d75a77b69052e-4a5a585f492mr49419881cf.32.1749042709710;
Wed, 04 Jun 2025 06:11:49 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IFTQa9wd7fIpEVhtGaVsz15AkiRD0CT3Fr8ffve1pc6iUT2fQdSSm5Tp2fkdgwlgyGIAfpLLw==
X-Received: by 2002:a05:620a:3710:b0:7cd:31ca:d81 with SMTP id af79cd13be357-7d2198e92cdmr491537685a.27.1749042697421;
Wed, 04 Jun 2025 06:11:37 -0700 (PDT)
Received: from eriador.lumag.spb.ru (2001-14ba-a0c3-3a00--7a1.rev.dnainternet.fi. [2001:14ba:a0c3:3a00::7a1])
by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-32a85bd2a5dsm21439851fa.103.2025.06.04.06.11.36
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 06:11:36 -0700 (PDT)
Date: Wed, 4 Jun 2025 16:11:34 +0300
From: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
To: Xilin Wu <sophon@xxxxxxxxx>
Cc: Andrzej Hajda <andrzej.hajda@xxxxxxxxx>,
Neil Armstrong <neil.armstrong@xxxxxxxxxx>,
Robert Foss <rfoss@xxxxxxxxxx>,
Laurent Pinchart <Laurent.pinchart@xxxxxxxxxxxxxxxx>,
Jonas Karlman <jonas@xxxxxxxxx>,
Jernej Skrabec <jernej.skrabec@xxxxxxxxx>,
Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>,
Maxime Ripard <mripard@xxxxxxxxxx>,
Thomas Zimmermann <tzimmermann@xxxxxxx>,
David Airlie <airlied@xxxxxxxxx>, Simona Vetter <simona@xxxxxxxx>,
Rob Clark <robdclark@xxxxxxxxx>,
Abhinav Kumar <quic_abhinavk@xxxxxxxxxxx>, Sean Paul <sean@xxxxxxxxxx>,
Marijn Suijten <marijn.suijten@xxxxxxxxxxxxxx>,
Hermes Wu <Hermes.wu@xxxxxxxxxx>, dri-devel@xxxxxxxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-arm-msm@xxxxxxxxxxxxxxx,
freedreno@xxxxxxxxxxxxxxxxxxxxx
Subject: Re: [PATCH v7] drm/msm/dp: reuse generic HDMI codec implementation
Message-ID: <ifj3ipdlxxv6dnste76q2wwmy4dcvshnfkqekdndg674rgsrdw@vgj2aahqqsdx>
References: <20250423-dp-hdmi-audio-v7-1-8407a23e55b2@xxxxxxxxxxxxxxxx>
<4E62D52FC6135E5B+a6b1634e-5c66-4db5-bb1e-bf64e2e8d8a2@xxxxxxxxx>
<os3cmusf2nrdf3zq45s52a72x4osnd4thlgcgykcalyiuitcha@tnb576gj4m27>
<712A2410D11E9A7E+27a43d64-1116-41ba-addc-83aa5f761a28@xxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <712A2410D11E9A7E+27a43d64-1116-41ba-addc-83aa5f761a28@xxxxxxxxx>
X-Proofpoint-ORIG-GUID: BXEsQVwDXY-7FuA_04jnVjg7dSAqSCeT
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDEwMCBTYWx0ZWRfXzWIRn78SfLde
0qFr9q4qCURULoVKwcsJ7x/Ri645AzGMUG8ZgTU8r/Et4HSjcF/QOp1t1YNXcJahjIp/pm+4ebt
dXRQFTKM4BEPSeN3wKnL/LV2TADw9SK1LK27w4Fza27zSajOu7yWJAHuFKX7Sy54WV+zRUxe31Y
Q1fvEfE/FfoMDryY6UhmWvhoHmp83/34FapRG0POYy9+PhW7o+bDMt4g4qqcZQvZ4Uaon7zZFYj
TJIOCsxMC6tYu6Wnh6aupVD08N4WLkR620FpTAtLVN0XdnJPWZSVijHKCdcUhYqriuTqcFrslFq
B9Jk/UhK/fLLvslmPG9BsAvNMgNBlBPhI3rr45w8l0R25AtwjhZJ1AWWZO6aCxrDBa1jlBNXgvY
rCTRaRVa2wCyDsBMs9m3Yn6SEJPLkFH8bqpI8V5TEDcLw1aOnQjCw8Uy/ZcTC6jwtrMK9OY5
X-Authority-Analysis: v=2.4 cv=RdWQC0tv c=1 sm=1 tr=0 ts=68404621 cx=c_pps
a=z9lCQkyTxNhZyzAvolXo/A==:117 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10
a=6IFa9wvqVegA:10 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=KKAkSRfTAAAA:8
a=COk6AnOGAAAA:8 a=pUtLPF_adMnqGKIR7MYA:9 a=CjuIK1q_8ugA:10
a=EyFUmsFV_t8cxB2kMr4A:22 a=cvBusfyB2V15izCimMoJ:22 a=TjNXssC_j7lpFel5tvFf:22
X-Proofpoint-GUID: BXEsQVwDXY-7FuA_04jnVjg7dSAqSCeT
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
bulkscore=0 adultscore=0 mlxscore=0 priorityscore=1501 phishscore=0
clxscore=1015 lowpriorityscore=0 malwarescore=0 suspectscore=0
impostorscore=0 spamscore=0 mlxlogscore=999 classifier=spam authscore=0
authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1
engine=8.19.0-2505280000 definitions=main-2506040100
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Tue, Jun 03, 2025 at 10:16:14PM +0800, Xilin Wu wrote:
On 2025/6/3 22:06:36, Dmitry Baryshkov wrote:
> On Thu, May 29, 2025 at 10:40:12AM +0800, Xilin Wu wrote:
> > On 2025/4/24 01:52:45, Dmitry Baryshkov wrote:
> > > From: Dmitry Baryshkov <lumag@xxxxxxxxxx>
> > >
> > > The MSM DisplayPort driver implements several HDMI codec functions
> > > in the driver, e.g. it manually manages HDMI codec device registration,
> > > returning ELD and plugged_cb support. In order to reduce code
> > > duplication reuse drm_hdmi_audio_* helpers and drm_bridge_connector
> > > integration.
> > >
> > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx>
> > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
> > > ---
> > > A lot of DisplayPort bridges use HDMI Codec in order to provide audio
> > > support. Present DRM HDMI Audio support has been written with the HDMI
> > > and in particular DRM HDMI Connector framework support, however those
> > > audio helpers can be easily reused for DisplayPort drivers too.
> > >
> > > Patches by Hermes Wu that targeted implementing HDMI Audio support in
> > > the iTE IT6506 driver pointed out the necessity of allowing one to use
> > > generic audio helpers for DisplayPort drivers, as otherwise each driver
> > > has to manually (and correctly) implement the get_eld() and plugged_cb
> > > support.
> > >
> > > Implement necessary integration in drm_bridge_connector and provide an
> > > example implementation in the msm/dp driver.
> > > ---
> > > Changes in v7:
> > > - Dropped applied patches
> > > - Link to v6: https://lore.kernel.org/r/20250314-dp-hdmi-audio-v6-0-dbd228fa73d7@xxxxxxxxxxxxxxxx
> > >
> > > Changes in v6:
> > > - Added DRM_BRIDGE_OP_DP_AUDIO and separate set of DisplayPort audio
> > > callbacks to the drm_bridge interface (Maxime)
> > > - Link to v5: https://lore.kernel.org/r/20250307-dp-hdmi-audio-v5-0-f3be215fdb78@xxxxxxxxxx
> > >
> > > Changes in v5:
> > > - Rebased on top of linux-next, also handling HDMI audio piece of the
> > > MSM HDMI driver.
> > > - Link to v4: https://lore.kernel.org/r/20250301-dp-hdmi-audio-v4-0-82739daf28cc@xxxxxxxxxx
> > >
> > > Changes in v4:
> > > - Rebased on linux-next, adding DRM_BRIDGE_OP_HDMI_AUDIO to Synopsys QP
> > > HDMI driver.
> > > - Drop outdated comment regarding subconnector from the commit message.
> > > - Link to v3: https://lore.kernel.org/r/20250219-dp-hdmi-audio-v3-0-42900f034b40@xxxxxxxxxx
> > >
> > > Changes in v3:
> > > - Dropped DRM_BRIDGE_OP_DisplayPort, added DRM_BRIDGE_OP_HDMI_AUDIO
> > > (Laurent, Maxime)
> > > - Dropped the subconnector patch (again)
> > > - Link to v2: https://lore.kernel.org/r/20250209-dp-hdmi-audio-v2-0-16db6ebf22ff@xxxxxxxxxx
> > >
> > > Changes in v2:
> > > - Added drm_connector_attach_dp_subconnector_property() patches
> > > - Link to v1: https://lore.kernel.org/r/20250206-dp-hdmi-audio-v1-0-8aa14a8c0d4d@xxxxxxxxxx
> > > ---
> > > drivers/gpu/drm/msm/Kconfig | 1 +
> > > drivers/gpu/drm/msm/dp/dp_audio.c | 131 ++++--------------------------------
> > > drivers/gpu/drm/msm/dp/dp_audio.h | 27 ++------
> > > drivers/gpu/drm/msm/dp/dp_display.c | 28 ++------
> > > drivers/gpu/drm/msm/dp/dp_display.h | 6 --
> > > drivers/gpu/drm/msm/dp/dp_drm.c | 8 +++
> > > 6 files changed, 31 insertions(+), 170 deletions(-)
> > >
> >
> > This change breaks DP audio on the qcs6490 platform, tested on kernel
> > next-20250528.
>
> I can not confirm this issue here (though I tested it on a different
> hardware). Do you have any patches on top of linux-next?
>
I have this patch series applied, but I don't think it could be relevant:
[PATCH v4 0/8] Enable audio on qcs6490-RB3Gen2 and qcm6490-idp boards
https://lore.kernel.org/all/20250527111227.2318021-1-quic_pkumpatl@xxxxxxxxxxx/
> >
> > [ 0.368035] [drm:dpu_kms_hw_init:1173] dpu hardware revision:0x70020000
> > [ 0.369359] hdmi-audio-codec hdmi-audio-codec.0.auto: hdmi_codec_probe:
> > dai_count 0
> > [ 0.369362] hdmi-audio-codec hdmi-audio-codec.0.auto: hdmi_codec_probe:
> > Missing hw_params
> > [ 0.369364] hdmi-audio-codec hdmi-audio-codec.0.auto: hdmi_codec_probe:
> > Invalid parameters
> > [ 0.369366] hdmi-audio-codec hdmi-audio-codec.0.auto: probe with driver
> > hdmi-audio-codec failed with error -22
> > [ 0.370536] [drm] Initialized msm 1.12.0 for ae01000.display-controller
> > on minor 0
> >
> > Manually reverting this change solves the problem.
>
> It is suspicious, since dai_count can not be 0. We set
> hdmi_audio_max_i2s_playback_channels to 8, which in turn should set the
> hdmi_codec_pdata.i2s to 1.
>
It suddenly comes to my mind that I'm using a kernel with everything
compiled as builtin. Could that be a possible issue?
What kernel args are you using? Do you have any kernel debug options
enabled in the .config? I've tested the kernel on RB3 Gen2 and I still
can not confirm the issue (I'm also using an all-in kernel)
I've verified that on a running system I'm getting three HDMI audio
codecs (one from LT9611UXC and two from DP controllers). Each of them
binds immediately to the driver with no issues observed.
--
With best wishes
Dmitry
Return-Path: <linux-kernel+bounces-673251-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id CA1DB41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:14:33 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id C441D1679EC
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:14:34 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 3496F28F939;
Wed, 4 Jun 2025 13:14:25 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="eUWb12PZ"
Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.15])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id A502226AC3;
Wed, 4 Jun 2025 13:14:22 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=192.198.163.15
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749042864; cv=fail; b=qqgEf5pw+fE2A+MySoipRbiThvm+hxI6Bnj8j8wN+DTy83Hvw3nag7KcEI49OFzmIxJG7VluRq+wOZPUEYgSl1vTnuAXy16iSdE5xWin9Le2ZVYEnQCxAi8b935t8d1L4uI5XQ4iPbB6F0PUQUVDU47Kn9rVqbY3viCgO9o3a0M=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749042864; c=relaxed/simple;
bh=U8IDfkvAsfYOkp92ekX/WDq4R/gPDldBVeH9Pkw/63Q=;
h=Date:From:To:CC:Subject:Message-ID:References:Content-Type:
Content-Disposition:In-Reply-To:MIME-Version; b=R/IGuLwkRAwlmX6ZsHZeMeIqqgazDXXZACSxC090tc2XOznP8ia9bPs/F1oHXlCEmaKnMwe9oe9Es40peKgV8A0LUvDwL8l8CzJXedVNvtd1zaGdOQR1/sYZzNBrZ2OlhEIFqulqq9YVndgkD+FAfIXrnrZ6YI1AR3N54hE/iLY=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=eUWb12PZ; arc=fail smtp.client-ip=192.198.163.15
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
t=1749042863; x=1780578863;
h=date:from:to:cc:subject:message-id:references:
in-reply-to:mime-version;
bh=U8IDfkvAsfYOkp92ekX/WDq4R/gPDldBVeH9Pkw/63Q=;
b=eUWb12PZDOb/cJFBmfrYUnzcu2qZxvZcE74ASrqKevzFmNEEeXLAUuSW
WFkVmy1iAp7xlG77155KkHqvypqhBVsgJYcuEQpLck7apMHoAlxDgLqlZ
kfd98ZokanMupfRaMPIk/iTU1rmK7zwLQLav4rZUMW61OUUDqDC0FC+z6
V/Fpc4L2Yiq3zXWwA2N+tSBtssddIcA3DCUZGMAiludArmfqPBnfZ7eoU
8YrZW+GTyZ/jfx0yFcfw2ZB/dY1izrqBeIq1+OfctPI5HIVeGx5CzDeog
6SOFIdhFZ0XPsG69/yBr5CD6OeReri7ysOgcTAl1WY/vUm3vygEz9kIIS
A==;
X-CSE-ConnectionGUID: fFU10l4jQtSHHXNUHE/4pQ==
X-CSE-MsgGUID: 0EvYttZkRjeg0jCRTPpYYA==
X-IronPort-AV: E=McAfee;i="6800,10657,11454"; a="51270609"
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="51270609"
Received: from fmviesa007.fm.intel.com ([10.60.135.147])
by fmvoesa109.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 06:14:21 -0700
X-CSE-ConnectionGUID: 7gyd0YZVSxeExWYQS7q9OQ==
X-CSE-MsgGUID: k8gUR2phQ7qRmBL53Qzprg==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="145150195"
Received: from orsmsx903.amr.corp.intel.com ([10.22.229.25])
by fmviesa007.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 06:14:21 -0700
Received: from ORSMSX902.amr.corp.intel.com (10.22.229.24) by
ORSMSX903.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.2.1544.25; Wed, 4 Jun 2025 06:14:20 -0700
Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by
ORSMSX902.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.2.1544.25 via Frontend Transport; Wed, 4 Jun 2025 06:14:20 -0700
Received: from NAM02-SN1-obe.outbound.protection.outlook.com (40.107.96.75) by
edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.1.2507.55; Wed, 4 Jun 2025 06:14:20 -0700
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=fXVn7QKRQ9aZHgXMqAnXhBm0dCq0f90tBNKum6/old+bV7QYaV2d9RjMtBUopug4az5L/j/riQsYO+r1TX3C22VQ25590xZX0TvbREyfT459r6sRAEPM+PDQYVeAQr60SrxmMXouz5pKzJCgjCQpopMDNL20Y96/7mLxFkSWFF2c028QIK6h7hWspLu+fL90lXbl6qDS8KlVGLxAbMQdcqYlfyavJHGWbYMVjwilFxHc7LVh08jaVwvvn4XtzG8+pqnuPDEY2oCFTtkqPF1Z2C3TC8+3EZgO/LL8jg55KHpB1n6xgLaRZtbmRF/juccegV7AEmJ/Z63SKrUdAvO+zA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=3m8xOcDbAVfUw4Loz8D7XkJvp4IyZCvwNQQNBBAHPhs=;
b=GcqARzoabm3/5oXlI1J0sHCsSxkR6sMlEVKIXQxwFR+V3prqBe833MUWaLWNcYzss/maDThyEIlt63phkm1oeRJdLleHNCl8mE2UDjYLi4h37EN4RKnAo5FTTMO28DpFiB1F9b9J4MsgxBTHktFE0gkjr/udw3jIK9S/5H8XiRKk9kKVv918mXLN7ZtJE/ksEUgiCuqnsuzFyor1G43GHO9MtQIcyHHaBiod9E4rjQ4H7k+wp79DoWPtq0GGM/IFKK4nyqiOncuA2190amvHx7P4y3l49mWcfGq3LpH7LTv+c/1zpv/Os52GBQigHHoJceB4jFgeh/IW784Oi5k9Ng==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com;
dkim=pass header.d=intel.com; arc=none
Authentication-Results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=intel.com;
Received: from CH3PR11MB8660.namprd11.prod.outlook.com (2603:10b6:610:1ce::13)
by DM4PR11MB6456.namprd11.prod.outlook.com (2603:10b6:8:bc::18) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8769.37; Wed, 4 Jun
2025 13:14:18 +0000
Received: from CH3PR11MB8660.namprd11.prod.outlook.com
([fe80::cfad:add4:daad:fb9b]) by CH3PR11MB8660.namprd11.prod.outlook.com
([fe80::cfad:add4:daad:fb9b%4]) with mapi id 15.20.8769.031; Wed, 4 Jun 2025
13:14:17 +0000
Date: Wed, 4 Jun 2025 21:14:04 +0800
From: Chao Gao <chao.gao@xxxxxxxxx>
To: "Huang, Kai" <kai.huang@xxxxxxxxx>
CC: "kvm@xxxxxxxxxxxxxxx" <kvm@xxxxxxxxxxxxxxx>, "linux-coco@xxxxxxxxxxxxxxx"
<linux-coco@xxxxxxxxxxxxxxx>, "x86@xxxxxxxxxx" <x86@xxxxxxxxxx>, "Shutemov,
Kirill" <kirill.shutemov@xxxxxxxxx>, "Dong, Eddie" <eddie.dong@xxxxxxxxx>,
"Hansen, Dave" <dave.hansen@xxxxxxxxx>, "dave.hansen@xxxxxxxxxxxxxxx"
<dave.hansen@xxxxxxxxxxxxxxx>, "Reshetova, Elena"
<elena.reshetova@xxxxxxxxx>, "kirill.shutemov@xxxxxxxxxxxxxxx"
<kirill.shutemov@xxxxxxxxxxxxxxx>, "seanjc@xxxxxxxxxx" <seanjc@xxxxxxxxxx>,
"mingo@xxxxxxxxxx" <mingo@xxxxxxxxxx>, "pbonzini@xxxxxxxxxx"
<pbonzini@xxxxxxxxxx>, "tglx@xxxxxxxxxxxxx" <tglx@xxxxxxxxxxxxx>, "Yamahata,
Isaku" <isaku.yamahata@xxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx"
<linux-kernel@xxxxxxxxxxxxxxx>, "hpa@xxxxxxxxx" <hpa@xxxxxxxxx>, "Chen,
Farrah" <farrah.chen@xxxxxxxxx>, "Edgecombe, Rick P"
<rick.p.edgecombe@xxxxxxxxx>, "bp@xxxxxxxxx" <bp@xxxxxxxxx>, "Williams, Dan
J" <dan.j.williams@xxxxxxxxx>
Subject: Re: [RFC PATCH 02/20] x86/virt/tdx: Prepare to support P-SEAMLDR
SEAMCALLs
Message-ID: <aEBGnC6g6D2tmBR5@xxxxxxxxx>
References: <20250523095322.88774-1-chao.gao@xxxxxxxxx>
<20250523095322.88774-3-chao.gao@xxxxxxxxx>
<95c57c6d14b495f92af6bd12651b8b5ae03be80a.camel@xxxxxxxxx>
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <95c57c6d14b495f92af6bd12651b8b5ae03be80a.camel@xxxxxxxxx>
X-ClientProxiedBy: SI2PR02CA0009.apcprd02.prod.outlook.com
(2603:1096:4:194::11) To CH3PR11MB8660.namprd11.prod.outlook.com
(2603:10b6:610:1ce::13)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: CH3PR11MB8660:EE_|DM4PR11MB6456:EE_
X-MS-Office365-Filtering-Correlation-Id: 9283692b-c185-445f-6403-08dda369b5ae
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|7416014|376014;
X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?6gU+pBCknBwMkkKV34ZfFQ1gGtRrpzC06lW8+o2NuRGS32cy+aPeEtwjI8x3?=
=?us-ascii?Q?FU/aaTT4n75rj21zdj2zcpZLLqQHBs+VCMFzI6E/A8BQC+iuHoWyXQZu3tJE?=
=?us-ascii?Q?3uDKcmWaHPaEXyqc0YqBzjZOfj8/HeeFFT1dL3Sd/cpFe8VrIGC+Sq83bpHO?=
=?us-ascii?Q?dI0TPStnscTOh8an/Ms98OuBKVPYravYHVUQy1DnTG1DMYCjP63SNzTpYucn?=
=?us-ascii?Q?1UMABeKGfWPUg6hoDT2ZwKelyxdEmVhUYWqbsd9DyjD50ip4MtV+mn2SFXuw?=
=?us-ascii?Q?/J51VE9nzTJ7sGV6TxMuhJW37wYwRM33lFx0HfomTV2v+JpsevzfmGbffqi1?=
=?us-ascii?Q?1296bHAQrdzfI4H+FgvfWkhQgY3qo/0in6DRiIUvqSTTN5RzTC3dNQ18ZND1?=
=?us-ascii?Q?AXWOhYPsPN3I38LAwEOXNeyoY2JAs+ETY/VBwiuu6xalMQyDHoqFVEFYG301?=
=?us-ascii?Q?DVvnkIWhCUbKzA1eve3fF8gip783JuBuydE9IfEEmhyq2dzzSp/Lec2qqD9u?=
=?us-ascii?Q?HzQwAZiRDHVuvmgo7FMMa8j8nd0zTExWNnUd3FwfdNpte+hwWmcItMNBXZbY?=
=?us-ascii?Q?/BfMJgjX+WUQXcgPw1wiD213hdO+lS8jECW/R1fLA3mFQZNbY9DGSCQggryD?=
=?us-ascii?Q?1V4myCpsKK/lJPb9sdTVXhWglqDRSbHoJV6ALNRFACkYcDTFkaEHynsce/A4?=
=?us-ascii?Q?VQoxn+y22MUcORH5YW4wrNWoaYW/CP97autx1LwWAxfJOux6KkmJ8wCxJ3eZ?=
=?us-ascii?Q?m0Oh+ZZwOjyplOxHlHRNrLmUETdeS+yq1hUFk/9Yb71gfbqb58hHi+EoEV2s?=
=?us-ascii?Q?ERMXmlFlZZN68r/7EkJmk8/+zvyLoe7WM6SkxTUes9CTgBpEqd8BvQGK3GC6?=
=?us-ascii?Q?eDaE3UMhd8kQnihAU4yUYRB0KJJdOZsI5c4O0/hGMW0IpJbT0mVZEn6eout5?=
=?us-ascii?Q?sX/YoXBShQ6+6ls1y8l4uXn9Ml2KCaiJV95kLUdzFHNOc2T4oCOzejFmuqKP?=
=?us-ascii?Q?wqM6ye5kQ1YcUd5JskQdKQgnxpFL2qtpLsQo3AqbC9sTRTydc1XQoxGKtlxb?=
=?us-ascii?Q?RQLrPVBh8DVSAsIj+LZagjq6kl07XAqEleyxK5Ey8gpV94l9MiHJtZ3r14AP?=
=?us-ascii?Q?YW08r8p4lR+1IQPYGBEJS3G9eI32CEipDjaMnkA3m62HwaqGllJUNJ2ia2fs?=
=?us-ascii?Q?cUI8wBSwXTJIYg2T9GGDvjL4Yy2cVAb/aYSVSbTZhpRFoRuIrgBhIIrG1CeX?=
=?us-ascii?Q?L3yLBNwpUAYKrinbz0THWGgwGgdFZMMmzCxnv08oZvLBKjjcp7E2HnOtRiDp?=
=?us-ascii?Q?nKn3HnPkGU+co0uBEO0zjYFwAAWr9fDo1x1bZIF6lJZknyQJmk/A9NczOEMN?=
=?us-ascii?Q?W2CamAgPajvNzJZ2c2yZctYp9TNWsbbEj4INA8N8WhAEJABqGQNOKBGwdi3M?=
=?us-ascii?Q?/EwK8b+UARE=3D?=
X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CH3PR11MB8660.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(7416014)(376014);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?ethzhZcPS0EnO1RNE8QMledyRaocXHL23pQsJ0cEL0gvPAE1T0BnSlCsfI7F?=
=?us-ascii?Q?hf3c2S/08ryK/+h9i2sERkLcF3IVopPEtCc8za/egOcxNecJC8OZIpC+t9Y6?=
=?us-ascii?Q?iW2+ru7cK/rze1GyB3ig2anRxYwVbT/jv582Mm6jx/n2b6wfqAK6ls0dDzQp?=
=?us-ascii?Q?KYwRMI+pet7RoYDfHETVVojaBujLLsXBOoE30cTFnY5CUgQgK9Rqp5MD7a+A?=
=?us-ascii?Q?tfAYTlMbeN4lHJ5nuTqV1SWeJbJM16SSvVHfq+52Og7/eJPTS9S6Of/Q690y?=
=?us-ascii?Q?F5B2kdy3W3Hg+vrdXSPtTmscN1+HhYEaI5h5Q66DtUbjPwWY5XnAeEX73w5C?=
=?us-ascii?Q?EMmxu0f3SR1TyNIF0rUFg/vwoaHneBLZtUhI9g95/XiLy4nkkQ/xwNHHotun?=
=?us-ascii?Q?+W6SMnanFjVgt+8n0yO/f2PtLr3DK5QzWCU3JoBbqqDY8sl9Of6+KmlWGY8Z?=
=?us-ascii?Q?ycaFTvLMJnkDO7VFuYt+6wnqHB42+wDky5CkQ4Cw5N4ngQTnhcxuO53I+qP8?=
=?us-ascii?Q?dXiiiZANBxEU6QwhzeXXIcBix/TmAALy0xuH1YTmx0YRX1lc1TgtUQM+QRzE?=
=?us-ascii?Q?C21yQEdMcKHXboU7uAJGotzmOwoPZeGXadm+M+JtieYpMXC5oDJVj4VChRow?=
=?us-ascii?Q?Lp67Na2APbp19FzVxACGz+lDFoarr/3iQoheUntndGvVnnct8/SycFpsWF3z?=
=?us-ascii?Q?SxN7wjATAPLVXm67Cjj4fn71Sl2ifFfFyy3AP4bnFpmlj9jJFubeS4L3BwQC?=
=?us-ascii?Q?zonlf8K1/YSJofq5lvsIq3sMhLZomjaA2vwz2E5FyP6Ex4PxRJI0FUXoQWxc?=
=?us-ascii?Q?NEOzbOVg85Vnq+rDLXMyGntIo1J8yvJmakjOlOt/C2vZ4Ie9gde2x/OAzm9u?=
=?us-ascii?Q?YYh921Vcq7iVjnyo0DjddIXMWyFvM6XRGRBOwXlStuXbyrO7cFx2uNQEuMbw?=
=?us-ascii?Q?NWJSZpK6cwwgHKqI6E1SWOEc0cixJs9EqkD+HRpSonkoMjj9Saox6NYysq8e?=
=?us-ascii?Q?BI9fwfAs+2s1tH5uXsnmkPsKZzWGja7Ss4E/Ccy7uljxUHhNOOl0B0uXBsS2?=
=?us-ascii?Q?aBy7QmtYCHHkruKuWeeM+lkXCm93/ASm0g3OP+lz6dw9DfPZb2GaHrkNO+za?=
=?us-ascii?Q?GMNJb/bu15PLkqcBQk9yh3gfp7APZOn/qZLWhlUmHDv/Lm7xNaq8vPQkw4jz?=
=?us-ascii?Q?qPyMTkSfY4nMou+P+dQhApxWj0XeSC/nBf8g5ILecUNHVgASiWCnGHYj+9qZ?=
=?us-ascii?Q?rCbmhY5IlM5D2cr0TSyQ+HFWkKP1omFg5N4Lyl5GP9tmxloav4Bu9pBs0W1r?=
=?us-ascii?Q?ztJUqSLz8be8L51ZmG8KjJL+BweYNj+wX/WpT0y01wf0OjHFlFNoWIoFbzKg?=
=?us-ascii?Q?RiqTHFPeOVGi8bl5HXh+JMmDCzzVRMCXIlVe/JMpnXHig8IoGaNYHbf/8pQW?=
=?us-ascii?Q?4nuZ8w8ZdKIQ0Id47ABvjS+Ib0sLH9XT5JbNdvPsJzQ8/qAYUISHCljS+oBL?=
=?us-ascii?Q?pEOi+iZpW6raheo34lQ3QjbtQnWJjAK8Jq0P1TKPc8PsrdoLW4Ehb8/qoS2L?=
=?us-ascii?Q?vSxR9bxVsGwGSAfOhqVPlBTMlj/P6bDf2TP3vB6L?=
X-MS-Exchange-CrossTenant-Network-Message-Id: 9283692b-c185-445f-6403-08dda369b5ae
X-MS-Exchange-CrossTenant-AuthSource: CH3PR11MB8660.namprd11.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 13:14:17.5363
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: PnLzLehbVs13G+iDkjwSmRizUj4K4WjVg7SRKWU65ILM164uxrdO22KUhInWJtHlbx2tM0wqNBySLfqQXFYetA==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB6456
X-OriginatorOrg: intel.com
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Given there will be a dedicated seamldr.c, I don't quite like having
seamldr_prerr() in "tdx.h" and tdx.c.
Now for all SEAMCALLs used by KVM, we have a dedicated wrapper implemented
in tdx.c and exported for KVM to use. I think we can move seamcall*() out
of <asm/tdx.h> to TDX host local since no other kernel code except the TDX
host core is supposed to use seamcall*().
This also cleans up <asm/tdx.h> a little bit, which in general makes code
cleaner IMHO.
E.g., how about we do below patch, and then you can do changes to support
P-SEAMLDR on top of it?
looks good to me. I'd like to incorporate this patch into my series if
Kirill and Dave have no objections to this cleanup. I assume
seamldr_prerr() can be added to the new seamcall.h
Thanks for this suggestion.
diff --git a/arch/x86/virt/vmx/tdx/seamcall.h b/arch/x86/virt/vmx/tdx/seamcall.h
new file mode 100644
index 000000000000..54922f7bda3a
--- /dev/null
+++ b/arch/x86/virt/vmx/tdx/seamcall.h
@@ -0,0 +1,71 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/* Copyright (C) 2025 Intel Corporation */
+#include <asm/tdx.h>
If seamcall.h is intended to provide low-level helpers, including
<asm/tdx.h>, which is meant to offer high-level APIs for other components
such as KVM, seems a bit odd to me. But I suppose we can live with this.
Return-Path: <linux-kernel+bounces-673252-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 1E79141E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:15:32 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 8D56D177686
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:15:24 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 9584828FA88;
Wed, 4 Jun 2025 13:15:11 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=analog.com header.i=@analog.com header.b="p2YsOZn1"
Received: from mx0b-00128a01.pphosted.com (mx0b-00128a01.pphosted.com [148.163.139.77])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id F3DE328F50C;
Wed, 4 Jun 2025 13:15:07 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=148.163.139.77
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749042910; cv=fail; b=qAiNasFIemRJFp28/tmKQQswXlnwgm2AdbZtI6v4CIEJ2u8tSJz51zArofgm53yO2UTvthuwkxKgWjMp4ByOoU3PIIMwvkoms6x/hm6uSssBpTyVdpC3u5NrjGeqRvNSADxlJPpl7iHnHT3189PTHkbE4Ys41te4VAJ/7AWopmg=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749042910; c=relaxed/simple;
bh=RbF1rEaXfl8PLXoL0wJ26jnVVnyN9Dl2odLEQvaix8I=;
h=From:To:Subject:Date:Message-ID:References:In-Reply-To:
Content-Type:MIME-Version; b=llA2e9d1ECD4ZSQGQvjLngJwKQwfdNlUvEE0E+0zeEe5dKOpI8fjb4KoOB9LE9RaZocdHRFD+pwMWXnUE6pT7XyuElew4IIe+NrOe8FFNbwq69x/ASfUdbfeMsSeKfjtY+YHc19t+Xqg4XFrdGXjBAVTlxjKYyAJ15oSCZrudxc=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=analog.com; spf=pass smtp.mailfrom=analog.com; dkim=pass (2048-bit key) header.d=analog.com header.i=@analog.com header.b=p2YsOZn1; arc=fail smtp.client-ip=148.163.139.77
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=analog.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=analog.com
Received: from pps.filterd (m0167090.ppops.net [127.0.0.1])
by mx0b-00128a01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 554B44qv031622;
Wed, 4 Jun 2025 09:05:39 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=analog.com; h=
content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=DKIM; bh=RbF1r
EaXfl8PLXoL0wJ26jnVVnyN9Dl2odLEQvaix8I=; b=p2YsOZn1wKEKI9pqScKtn
Avtwdc5ehQx3/TLURn5K6OWqFXUBOxDxcNeWEGZo25hbV6tE2V6ERyTpJXuFgPgR
bOQyhRSwThWsSdqPN8ZKwSJnunDM01taxINF0uIHYFEW58n5nzHLBnmCLCPCaIXR
Rh6xhptCqiBmDsgbc8FwHij8VZ1ewGFuWTx21fBJTX/U36tW8kcvlA/MeiOzXz3Q
Jthp+3vdGYXbg1CEjZjgzo2xL8voy016c7MAL5zDSArGAqKdx66vxyGC8S2PNJM+
IewYOoa+pinngMkdqI7qpOGtLoUFSJImy8bBQnWURy4shbTGnqxu1bVe8OQ7vyU5
w==
Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11on2084.outbound.protection.outlook.com [40.107.220.84])
by mx0b-00128a01.pphosted.com (PPS) with ESMTPS id 471g9r8uyk-2
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 09:05:38 -0400 (EDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=sMZ4r1P0dWxxbc4BKVkbZ9U33lGGQjb/Hns/SjV6x9gxJkpGhv/xG1xwz+zALLnSQ8vvleNSdshSHUSCxoNbnwKmGp4GGNxQwgXouSU0o39MNyBO/Gkeg6aqUrDq0A926908TMUSOG20vsZ5RSysoeUyQk7F9/WlFPCm87XR4+hZ5UMOiFdlEmx1ALN9/YO7Gvp2uaA82pbeN8+JhZM/+wfmR3LM9m56rnSV2LLT98CBUfO19tNErCPsPUu2QGuCOWHy50gYcW/5sQ9UgU6/0iS/cm2P0dj2LKtXVcATREeeZKHCdmxjon5CstyrRpC28MAVhf2GiSubBl+5cTmdsA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=RbF1rEaXfl8PLXoL0wJ26jnVVnyN9Dl2odLEQvaix8I=;
b=aM62MbCMWX3DBRzuuqUCcJxEdDDGGTYqbRVG2Y3wjxqoVeWscpulNl/KAA5MA9JEwK+NujAgpPED9Z5N6/Z8F6he6DmPHykERbyjaERpawGo2LkUegt9Xl3eLNAowR6YooWos4ns0WLtq2JrpPRn4WZaF6eD9LnVQPPbIq2NG/4cdG5jnryuNYAuwW3p/RU/Pr3Nv2Yu8wxUvcYE0bB3wWetXfUqIuV8Gw3buLHLaGjKsodLErtJU4y1Wrg87sDj9Cw462qriNhA2/lmbj1JMnrudb571BrWXvzTVUr/ryxKoaxD+clzEmnixm9V6nkMeaLFuBGQmXgEXWhXAC125Q==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=analog.com; dmarc=pass action=none header.from=analog.com;
dkim=pass header.d=analog.com; arc=none
Received: from PH0PR03MB6335.namprd03.prod.outlook.com (2603:10b6:510:aa::13)
by BL4PR03MB8074.namprd03.prod.outlook.com (2603:10b6:208:590::7) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.34; Wed, 4 Jun
2025 13:05:33 +0000
Received: from PH0PR03MB6335.namprd03.prod.outlook.com
([fe80::6e6d:c16e:3cc5:93ad]) by PH0PR03MB6335.namprd03.prod.outlook.com
([fe80::6e6d:c16e:3cc5:93ad%4]) with mapi id 15.20.8792.034; Wed, 4 Jun 2025
13:05:32 +0000
From: "Ioan-daniel, Pop" <Pop.Ioan-daniel@xxxxxxxxxx>
To: Krzysztof Kozlowski <krzk@xxxxxxxxxx>,
Lars-Peter Clausen
<lars@xxxxxxxxxx>,
"Hennerich, Michael" <Michael.Hennerich@xxxxxxxxxx>,
Jonathan Cameron <jic23@xxxxxxxxxx>,
David Lechner <dlechner@xxxxxxxxxxxx>, "Sa, Nuno" <Nuno.Sa@xxxxxxxxxx>,
Andy Shevchenko <andy@xxxxxxxxxx>, Rob
Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Conor
Dooley <conor+dt@xxxxxxxxxx>,
"Cuciurean, Sergiu"
<Sergiu.Cuciurean@xxxxxxxxxx>,
"Bogdan, Dragos" <Dragos.Bogdan@xxxxxxxxxx>,
"Miclaus, Antoniu" <Antoniu.Miclaus@xxxxxxxxxx>,
Olivier Moysan
<olivier.moysan@xxxxxxxxxxx>,
Javier Carrasco
<javier.carrasco.cruz@xxxxxxxxx>,
Matti Vaittinen <mazziesaccount@xxxxxxxxx>,
Tobias Sperling <tobias.sperling@xxxxxxxxxxx>,
Alisa-Dariana Roman
<alisadariana@xxxxxxxxx>,
"Schmitt, Marcelo" <Marcelo.Schmitt@xxxxxxxxxx>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx>,
Trevor
Gamblin <tgamblin@xxxxxxxxxxxx>,
"linux-iio@xxxxxxxxxxxxxxx"
<linux-iio@xxxxxxxxxxxxxxx>,
"devicetree@xxxxxxxxxxxxxxx"
<devicetree@xxxxxxxxxxxxxxx>,
"linux-kernel@xxxxxxxxxxxxxxx"
<linux-kernel@xxxxxxxxxxxxxxx>
Subject: RE: [PATCH v5 4/5] dt-bindings: iio: adc: add ad7405
Thread-Topic: [PATCH v5 4/5] dt-bindings: iio: adc: add ad7405
Thread-Index: AQHb08Sa8JGCAWgm+0+1karYLiEOdbPv51wAgAMOrqA=
Date: Wed, 4 Jun 2025 13:05:32 +0000
Message-ID:
<PH0PR03MB6335ECFCD0C0DEF0230E25B6D16CA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20250602134349.1930891-1-pop.ioan-daniel@xxxxxxxxxx>
<20250602134349.1930891-5-pop.ioan-daniel@xxxxxxxxxx>
<c69e4bc3-c665-46ef-8452-b399aa76b815@xxxxxxxxxx>
In-Reply-To: <c69e4bc3-c665-46ef-8452-b399aa76b815@xxxxxxxxxx>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-dg-rorf: true
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: PH0PR03MB6335:EE_|BL4PR03MB8074:EE_
x-ms-office365-filtering-correlation-id: 41128abd-c798-4ff1-68d9-08dda3687cf8
x-ld-processed: eaa689b4-8f87-40e0-9c6f-7228de4d754a,ExtAddr
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam:
BCL:0;ARA:13230040|366016|1800799024|7416014|376014|921020|38070700018;
x-microsoft-antispam-message-info:
=?utf-8?B?OExDdVFUOTlvQndscDBHY2x2OUFWUndrbTJBbXRiYVNxTjUrWURXdGsvQVhq?=
=?utf-8?B?cTFzVitTU0FpdnU4NUsvMjFPMGFFZ1ZyWU9sZ3Q3YW5FenBnYnB4UnI3NXRP?=
=?utf-8?B?OURjWkRDM1VEM1cvTDUrelRGV3BPd3lOWGNqWXVCVFI1M1JoN3JhenBvMG5W?=
=?utf-8?B?ZVRIejNuS0NtN283RjllUVFVdkF3S1ROdHo3dFhhblBFK0MrZGlpT1hSMWRi?=
=?utf-8?B?YlVwTXdEZjFRS0JETm0wQW51RStSTHA2VlVITE16a0pCQkhJZXpjSWZ5UHQy?=
=?utf-8?B?MlV3cXN4WUdqOTdSK3RGazU1ZTB0RHRKZjBZQU9wVVcxZVd1NWsyWVFuR1pD?=
=?utf-8?B?OUhMMXJMVXFQa1R1ZGl1MkVpdmRwZzNJWXRUTzd6OTBoNjFQY3BnWC9aUEJT?=
=?utf-8?B?UE9sMGNTNmVPT2Myd2pIdnB6RGNSZEFkNmlERXEwV2Q1S2tNMnNJTXhuWEJK?=
=?utf-8?B?WGFHenlYQmdhbWRROTlJbjZuZmNpam5hM1h3MENXL0xoL1E3cUlrb2JqSEJU?=
=?utf-8?B?Ni95ZzJLNHpMdHpjNitPU2F0OCtzazA4SlZOcTRWcmdUeDlzR2hRdzJxOVp3?=
=?utf-8?B?UFZZdlNYZGVBQ2QrRDNELzQrdjZyYWZkVnk3RFdqZ0F3QjhNeGR1YVA5NmJV?=
=?utf-8?B?eUtqY0wwOTZKR3VPRUdnK0VoOHBwN0k2UEZsVUZKMFdTQW5JYy9iUU1OdlV6?=
=?utf-8?B?TW9FSWQ1RkNua1dlamV1c2w2Zncwb2t2OW1jUkx0OC9FcHhxMGh6Z2tCbm4r?=
=?utf-8?B?NGkycVdEWitGRE1jSi92UXRkR2FIeHJsTDRrOU16bUp6SEtLcVhLMEhjT2Fq?=
=?utf-8?B?aTZQQW9vMXVBaTd2a3NCOU1GM3V2bGZqZk8zenNOMlc1MFRYNWNKNUNTZUI1?=
=?utf-8?B?WFE3bzI2WFBMUkRORHJScEJMY1k3dmx4UDFyKzRrOUlySjMxbHV2M3Zlc1Vk?=
=?utf-8?B?VTVaTEc2S29Kb2FwUElRL0pzNzFGUTRDMFdrY0dRYlBMYk5iRFlzUytzMHlZ?=
=?utf-8?B?d1RHaGtuYmJDVzdMdE92cllTaFN0azZKVFRFaEorK29Qd1FEMUtxeXRLckJW?=
=?utf-8?B?MmFJdTljMmZEVXBzaGtuWW9ONzQ5NVNva2RnaFBweklxbk9VSkxoTnZCdnhK?=
=?utf-8?B?d2FnL0d6ZWxyU2Jnd1dVdGVxYUd6NHFUd3ZIaUJYOUQrSHF3NGozdmFVejZT?=
=?utf-8?B?QXFEaTd0Qk1JNWw2Zm8wTU1vUlorb21lSGNwWlVNeDl1VjZPWkhLN2ZVZit3?=
=?utf-8?B?TjNEQlhYdTZZa0s2Y3ZFWXZ0alpXYjNPM3BzSjNDWVdpeTUrNjJmYUhPOVpB?=
=?utf-8?B?UDk1cjhvVTVjbW1qUEkzZkVZbmZRZEZCbUwvYjR3Y0lSbUtEUTQ2MDZTT1Jq?=
=?utf-8?B?SHM2d3lWK0N1VDc4OExjQllDaGZFM3VQa05KWlFvekR5Tkxlc1JVajBxbUlR?=
=?utf-8?B?SWloc0J4cFdSa3diQWx6bnhnNFNRSHV4WnZ0MnZWQTcxemV0WmFLcmFRL0o0?=
=?utf-8?B?MUVsZ0dSUjRNN1JTeWRQSmcxZG9HaElqMGFiRXdQeEgxV0NBMzltVTRRL2pp?=
=?utf-8?B?NGQ1a0JKaHJlR1FjdEZmMEt4M3c2MGxDNnZNcFZvRXNnK2JKMDhmcUhrM29r?=
=?utf-8?B?cm15WU00ejFBSUIzUklZelMzcldnQzQvNEVCN2ZHcXRPbHJ2cFlxR3pCbE1X?=
=?utf-8?B?L3gzY3RHemFvdytZNXRTb2lIQmo4Wnk3TlpHTEpRYVord0Y3OTZrZ2lmY1M4?=
=?utf-8?B?ajgwRnNmYSt6SEpsNXBONXZDc2dldUxOWkxPZHpvSXhvZHZOZlVpcXBUZDVq?=
=?utf-8?B?UlBwRHZKbWN1YlpaMjZQSG5SLzhncFhxYUtGcnd6MXE5UlNzL0t5TDY5Wmhh?=
=?utf-8?B?UlFEYU12RnhudEdBOWEyQWF5UDBsZ0dlZFRlSkFKZ0NEaDZNWDNDdjl3KzFi?=
=?utf-8?B?WU56MmhsTWZXWXluSEhIUDBnYUxKMmUxWXpQdzRmVUFzd3NnQUpmRnpZNXJh?=
=?utf-8?Q?+3kvCcWD0rtl611TNqPxTnzbGB4t78=3D?=
x-forefront-antispam-report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR03MB6335.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(7416014)(376014)(921020)(38070700018);DIR:OUT;SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0:
=?utf-8?B?eGVZbTAyRi9iTXlUNGVrNGF3b0NaWU52UFlPYmUzNnAzSndmS0oyeTJYaVhu?=
=?utf-8?B?bnZDM3JwZHdUWDNpYlFvc1I3VzgvRUtXUnYzRyttc0tEUkJHVVZIWjBNenJN?=
=?utf-8?B?ZFJ0TEhQVmk0QTRITnFWWUpkYVB0enNjS21pZkM5Szd3azFTL0pjRmx5RFRM?=
=?utf-8?B?VzlhTHlLcTRXM2Jldm5sQi9HZEZaZHk1MjF5T3FBMzZTTUZtUG1FNmM4Nklj?=
=?utf-8?B?OVc1VWtBdGdRckxjaDlpcjE3WmZuMnF3M1oyWUd4RTRFUVpoVzNWWUZzSzhE?=
=?utf-8?B?TFZjVTluN0FoZ09MdzVXcEhQY1piSGo1S3VmeENGeWI3Z1BadTk2TXFrMGJy?=
=?utf-8?B?c25kWklnTEtSV3pzK3ZMVjZLZUZDRVdRWlNPZ2JKK1FQdUtYWjlMaU85QjdY?=
=?utf-8?B?VnhCRXlwT3RqeFZINkJhYjdkWVBtSlMraUhGNE01ejBjRGVrRUpQUVVSakIr?=
=?utf-8?B?NjBDKzRGS0ZTV3h2WkU0NWMwNVRiYWUrckVyYzg5TWNFMVpPckl1d2NXZnBs?=
=?utf-8?B?aGtpZUJHM2ZNRGM3d2lMRGQvc2xNNTNLcytLdzRKYmtTd2ZQU1BxQnJiOTFx?=
=?utf-8?B?UCtRVzRJeERxNUdwWnRqdUpXMDM3OW04Z0txS0hzcUNPQml6NkZGVFFtR0JJ?=
=?utf-8?B?ckZFTjczU2cxYklha08vM1ZqOXBQbERmY3RqeTFIejM0aWR4eTVKWjBBdDVy?=
=?utf-8?B?V2ZNelFRSlJpSFgwU1k4ditUNDNaUnptZ1VRQ2hsTm5veXQrcStxeTVIL2dj?=
=?utf-8?B?QkV4ZHlxRTZwTGNxaWJYU3ZhZjhzUUM5SGtkK0QxTExQTVoxR3hhR29pS0Qr?=
=?utf-8?B?cmdkU2kyNXlWYzhwcWJxZUhBOWV2Y1R6OGwvVFRCWGYvWHVSMEpVbm8yT0NB?=
=?utf-8?B?ei90YjJtWTlha1ZHejJDVC9DaXFtemtMM0xyRzFiUUcyMTZSQjh1cklvZXB3?=
=?utf-8?B?SDFKVnUvYTNTbHcvUWxWSlNna0JIbjNYVEUzcTNkSHJiQm9kZFJXMzBPckpH?=
=?utf-8?B?MCsvS2h2Z2V1QkFvMHZGYnZ4UE1MNFRDdnhCc280MHd6ZnRCVVdyRldZUzFn?=
=?utf-8?B?SGtMRnlrL1p3SC9uZmhCWE0wQ1BhNllsNXAxQTNZOGwxZ3BJc0l1OGl5Z1NE?=
=?utf-8?B?ZjNPc1ZvNUZkT3NZZjcydThMdEVPM3VWYzJPaHdnNm5VRTVSTUNYZXB5ZUJH?=
=?utf-8?B?dEtBQ21kcDBPUHZsd3hXUi9ZTXJJenBUVS8wWHBqN2ZVRUNGSVF6Y3BabEUx?=
=?utf-8?B?ekRPaWdzUTk0Zm10Smt3L2tXdEF4bElidWZRNmEzd3V3dFFNOHJEYmZ4b3Q4?=
=?utf-8?B?YllORkNmRzJ6c2JWdDRwU1IzZE53TGpIYkFDMnk1RkNNV3hTRTNoZEIwY0d5?=
=?utf-8?B?UWQ2OXRnTHRtUlhDUzJqdWEzV3dxSGl1R2lzaHRDT3RsSnh6U3U3TGtiRG5D?=
=?utf-8?B?aU5pVFEwNXNRdmtiYk9zd2NXZzZMUkc3YmY3SzdsSU1TSlBXS3JudW1tL1Vo?=
=?utf-8?B?OVRMMW1HTGJqUkpMZXNKMG1tWUJGaEcyYXZDMWhpN1dhMlY5QTI1U2NKNHZt?=
=?utf-8?B?WXVDZ1JzWXFpUGN2dndZTHNwaUpiL2hzeFVkMGUwZ1ZlSVFnbm5ZRFhqVnhu?=
=?utf-8?B?T2xqYllZWjhrSi93b0dJTXdERGUyUmV0N0NxYk5nbUR5bE9ORlRFREx4MGhz?=
=?utf-8?B?ZjhJSmxNS3lPZWxyQ3BINGtGRERyby9PeVBnOHo0U0g3ZGtic1BleHNMeklP?=
=?utf-8?B?bEpEaFhSUDczZ05wZi91Z09lSlBTRHJZd1JHQXN3V0NETG5YeGJNdTJ6b1lN?=
=?utf-8?B?dDk5SGpUUUthVG5lUUgrNVRzK0p6bTNYbURHSEF4ZFlmWU83ZFYydEQzRU1t?=
=?utf-8?B?WXBUUTVrbVpMbU03cWdlY1V4R2ZyckcxWFZaVHNTTzEzNTRkT1JFRDdrOHBW?=
=?utf-8?B?bU54NUtqamc2WnNHQ2s2b0J6WjdVeWExN0xPM2J6NWlxS0JSUitxVmMxRlpD?=
=?utf-8?B?UjRpQUVMUVIySWpieWNEZmhsejNyTjNYVnFZQWo4T1hhYmw0c1NSRkcxS2h2?=
=?utf-8?B?ZFFGaE5VdlZOcUE4d1lzWHhYaHNZRXR6QkJ0N2lRUUN3SURoaGxOSlBLeHFu?=
=?utf-8?Q?qIu4AvZJlQbUyjBjiiLFxX0HD?=
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-OriginatorOrg: analog.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: PH0PR03MB6335.namprd03.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 41128abd-c798-4ff1-68d9-08dda3687cf8
X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jun 2025 13:05:32.4651
(UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: eaa689b4-8f87-40e0-9c6f-7228de4d754a
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: UJEUTH8iGnxPIA+dbkCXc4UVHVnLUBBoNzJz0Xu0I230LKEjugxqEGUsMA+2TJKYhox8ZlNvpUj57HseTtiI0bvET0owUdNa8DpcEEgDO+0=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL4PR03MB8074
X-Proofpoint-GUID: 28Ri9USV0_aMwJWj6iKSjuiRNomY7tHz
X-Proofpoint-ORIG-GUID: 28Ri9USV0_aMwJWj6iKSjuiRNomY7tHz
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDA5OSBTYWx0ZWRfX0IMcdqIQpgiM
49iI9zwPmuM7BKTjRgzCHBfcL5/sqa32lCpjMr/Um4Ap7bDQtcCiHQ63mCYCBkAEWkhCWW4Ykap
vHFT70Ix0Q0/F8rODtBeYUgpqqQqEMwRBOCj/9MpYiWbIhwynRDiMkrnd3cATLlSBshN6Hcc9ec
tEYpT4RlUq4RAeAFv++W00k/AaVhi7EbC//ErkNBxbuRnc3ynxL64gBtk+9Bj8j47lyH0psdBnR
j4TeQtmSjvhwm5pZar2x965rXxSCFilZKSQ1X+dO0QEMCi9xSNCYSFN1E+S1PDmo7nm1T5+nP6k
iTZMwU/X+5z0jL8Tl3JYjFvu0DAkzI5QYTK1FIzJiIWycDY0qA3/uYxhdhzVT3Phgz4h8iDRfpi
him6ueC/NKZPe0QzNeFleXHVFC/aulqSCR9N1pGmPRPejC4uChcUM+GFKTeGHSeZrPgqKo1J
X-Authority-Analysis: v=2.4 cv=Qctmvtbv c=1 sm=1 tr=0 ts=684044a2 cx=c_pps
a=kMUYKDuqtyQCWRFVbRQLEg==:117 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19
a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19 a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19
a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10 a=gAnH3GRIAAAA:8
a=jNvmfRW1W1G9Riod54oA:9 a=QEXdDO2ut3YA:10
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
mlxscore=0 mlxlogscore=656 malwarescore=0 impostorscore=0 spamscore=0
suspectscore=0 bulkscore=0 lowpriorityscore=0 priorityscore=1501
clxscore=1011 phishscore=0 adultscore=0 classifier=spam authscore=0
authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1
engine=8.19.0-2505280000 definitions=main-2506040099
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Pg0KPiBPbiAwMi8wNi8yMDI1IDE1OjQzLCBQb3AgSW9hbiBEYW5pZWwgd3JvdGU6DQo+ID4gQWRk
IGRldmljZXRyZWUgYmluZGluZ3MgZm9yIGFkNzQwNS9hZHVtNzcweCBmYW1pbHkuDQo+ID4NCj4g
PiBTaWduZWQtb2ZmLWJ5OiBQb3AgSW9hbiBEYW5pZWwgPHBvcC5pb2FuLWRhbmllbEBhbmFsb2cu
Y29tPg0KPiA+IC0tLQ0KPiA+IGNoYW5nZXMgaW4gdjU6DQo+ID4gIC0gY3JlYXRlIGFuIGV4YW1w
bGUgYmFzZWQgb24gYWRpLGFkNzYyNS55YW1sIHRoYXQgaXMgdmVyeSBzaW1pbGFyIHRvIHRoaXMN
Cj4gcGFydA0KPiA+ICAtIGRvIG5vdCBhZGQgUmV2aWV3ZWQtYnkgdGFnIGR1ZSB0byB0aGUgY2hh
bmdlIHRoYXQgSSd2ZSBtYWRlLg0KPiANCj4gV2hpY2ggY2hhbmdlPyBJIHNlZSBaRVJPIGRpZmZl
cmVuY2VzIGFnYWluc3QgdmVyc2lvbiB3aGljaCB3YXMgcmV2aWV3ZWQuDQoNCkhpISBUaGUgZGlm
ZmVyZW5jZSBpcyBpbiB0aGUgaW8tYmFja2VuZHMgYXNzaWdubWVudDoNCmV4YW1wbGVzOg0KKyAg
LSB8DQorICAgIGFkYyB7DQorICAgICAgICBjb21wYXRpYmxlID0gImFkaSxhZDc0MDUiOw0KKyAg
ICAgICAgY2xvY2tzID0gPCZheGlfY2xrX2dlbiAwPjsNCisgICAgICAgIHZkZDEtc3VwcGx5ID0g
PCZ2ZGQxPjsNCisgICAgICAgIHZkZDItc3VwcGx5ID0gPCZ2ZGQyPjsNCisgICAgICAgIGlvLWJh
Y2tlbmRzID0gPCZheGlfYWRjPjsNCisgICAgfTsNCisuLi4NCg==
Return-Path: <linux-kernel+bounces-673253-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id AAE3841E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:18:57 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id DF3751887D6F
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:19:03 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 6625A28F508;
Wed, 4 Jun 2025 13:18:44 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="IMCSsdQ/"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 179301EF395
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:18:41 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749043123; cv=none; b=A0Yejhp7V09bNohgnNN1dZdn81WmfmJKtQ0ypy+5431lADE5Xs2/rnJ+LCd2K7mdfzS1nc2fiNIuzLdLEwV5+shD9kZ/wkK8c3m8Pf2g0hIp0qw6kHdk/omJzpo8EYUspLH9MdC1skfkHQALq0BBwj0cm/kh2dk1r3kkmNwAUN8=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749043123; c=relaxed/simple;
bh=/3x7uwZdl/fTKAxZ0w677n7UvUl4il0SIM7VH2HgL6w=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=igCHtnLMpEGU84EaEAEQI2wiJUTnu3Sl9UOSMBbONYjAFEQi2Zr4cC/OU+aWuIAZqnfFX3PMTmsWP34oKR8ravBnmlTb66sl8hJrWD9nJqO5HKyyiZyeSXIGiAfn8ThBShZbhTv4n27/4Mo8ICL9sOsVvwWttYumNh4bfKwX+hE=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=IMCSsdQ/; arc=none smtp.client-ip=170.10.133.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749043121;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=SZa9ayxPX+A9sGdRoYwE0fohcr1S4qdvcRO7qpq+ggo=;
b=IMCSsdQ/QH3SCwsnb98gsglhu+p56RaE5X2Kv9SqGjduKWJfQ64irA8xo4W6CW/f5kV6tL
S9E1ANCnI1Nq7l4vvxr491KV5wpDXvGCKKOWsMmv7Bey+dFCXAF8MTZx7wHtnqBuN8dgOt
G7pTrOCm5owIqdl9tCi3UEV3ixxM2II=
Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com
[209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-538-Hawffx8vMamX0aI5RLndig-1; Wed, 04 Jun 2025 09:18:39 -0400
X-MC-Unique: Hawffx8vMamX0aI5RLndig-1
X-Mimecast-MFC-AGG-ID: Hawffx8vMamX0aI5RLndig_1749043119
Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-450d64026baso30204485e9.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 06:18:39 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749043118; x=1749647918;
h=content-transfer-encoding:in-reply-to:organization:autocrypt
:content-language:from:references:cc:to:subject:user-agent
:mime-version:date:message-id:x-gm-message-state:from:to:cc:subject
:date:message-id:reply-to;
bh=SZa9ayxPX+A9sGdRoYwE0fohcr1S4qdvcRO7qpq+ggo=;
b=ptDhXOYSpCIGwtHl1Q2VZj3HhfVXvi8H41Q16a7z7kbsihOXn0zTj9JyR+7VhcE19e
LO5IfDbK254OH+NbteWM0dr5X6noT64ksehIj8Iw3QUL0oGjxdYnNl+VmGK3Rt4mfWQc
fYkB2w0KxNAnwRIOE/fqfeiWcHah4tgPdOnLDFeYY7VrMWqItzVaRLH17LlZ+EUN1Wtp
Bl0c3WWF/UoUWDuqh19i1xSbwgMlKCjafeb2NNIUfIc0GXnTQqsUNmu1+p3TZn/Bp5Eu
eBVlxpbVNRsAva14YAZp/BckjV1a9ZxGKOMVXvHFml80ncFeriWzk1eX0sd1mdZTqRHq
+VPQ==
X-Forwarded-Encrypted: i=1; AJvYcCVSROAjc3Fk3zj022CKSb+vaZx25o+4ze3o8P/a+lJQVnVX6truUiUKL1H2BeD5WhsRRmpHaIJ0qvPRg9E=@vger.kernel.org
X-Gm-Message-State: AOJu0YzJMzCV9OxjrU3XqB4JF2Hcrx5RqLq6tpqx+8OspRBc15fAxa3M
v7HkIlL7vBdQA1bfZIPZZeQbtfKFo3vzQZEZdQeRdG+imKKTGPs8Tud+yiMSBqv/SXGCN036ypr
L2O2SIwQjPMJKSbH/+MQ5T6ddNuME9KoS7lAnjM2GE+UggdOrXLR0yo4SOrvVIvPr1Q==
X-Gm-Gg: ASbGncunhht4uTmJIpKfZ0aSR4Nq9TLbo+hujlKrQP8kJBOKiTy+27gjOm93rFvLTSE
fTqdNasktDd9FznyBJjDUbkjSIbLz/KLpOjryeyL4IBfmbIEyC71T+aUlckSdwjuaZ7DaHhHvkg
KCfqGfrkae+VNIsaC5laIMub9pH6/rOMWiI6t/Tv33FeL+hjuoTsKQ2Nao21N6FXzKElu/dEa4K
NaFpEo/MknT4Dp8X6RcFvJUV/tlB/npGwDYneUrcVO9K09BeYWHWfz8sX1D/EvRmLW9eWG5V9tV
s0TZjmhjMiaZk/i1QE6eEGRY2cQizPWEvdULm0OXS7bDTRzxkGzEAD9FUc/omfbr/yblmhlICZN
MNdFX3NX5lGaKxRcMMjqmMwXZ4bEcuyZMkGxVCbE=
X-Received: by 2002:a05:600c:1e06:b0:442:f956:53f9 with SMTP id 5b1f17b1804b1-451f0b11269mr24201185e9.18.1749043118640;
Wed, 04 Jun 2025 06:18:38 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IEORIs0iZRIpHmf5ltHJn9vctaCccXZH8KNjN4ts0ZEu00VRw+ucT7Sszbs3AFBzCsYhZd15A==
X-Received: by 2002:a05:600c:1e06:b0:442:f956:53f9 with SMTP id 5b1f17b1804b1-451f0b11269mr24200915e9.18.1749043118264;
Wed, 04 Jun 2025 06:18:38 -0700 (PDT)
Received: from ?IPV6:2003:d8:2f1b:b800:6fdb:1af2:4fbd:1fdf? (p200300d82f1bb8006fdb1af24fbd1fdf.dip0.t-ipconnect.de. [2003:d8:2f1b:b800:6fdb:1af2:4fbd:1fdf])
by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a5233b0723sm1074178f8f.86.2025.06.04.06.18.37
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 06:18:37 -0700 (PDT)
Message-ID: <830b10df-f697-409d-9ec4-37bc0196cec7@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 15:18:36 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH] mm: gup: fail migration when no migratable page to
prevent CMA pinning
To: Jason Gunthorpe <jgg@xxxxxxxx>
Cc: Hyesoo Yu <hyesoo.yu@xxxxxxxxxxx>, janghyuck.kim@xxxxxxxxxxx,
zhaoyang.huang@xxxxxxxxxx, jaewon31.kim@xxxxxxxxx,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, John Hubbard
<jhubbard@xxxxxxxxxx>, Peter Xu <peterx@xxxxxxxxxx>, linux-mm@xxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
References: <CGME20250604095242epcas2p17032a1133b03be2d24c8ebcff94d1d55@xxxxxxxxxxxxxxxxxxxx>
<20250604095049.4052078-1-hyesoo.yu@xxxxxxxxxxx>
<fa9d72ac-1b46-4a09-8f29-af97f2ca6e2e@xxxxxxxxxx>
<20250604131158.GA17991@xxxxxxxx>
From: David Hildenbrand <david@xxxxxxxxxx>
Content-Language: en-US
Autocrypt: addr=david@xxxxxxxxxx; keydata=
xsFNBFXLn5EBEAC+zYvAFJxCBY9Tr1xZgcESmxVNI/0ffzE/ZQOiHJl6mGkmA1R7/uUpiCjJ
dBrn+lhhOYjjNefFQou6478faXE6o2AhmebqT4KiQoUQFV4R7y1KMEKoSyy8hQaK1umALTdL
QZLQMzNE74ap+GDK0wnacPQFpcG1AE9RMq3aeErY5tujekBS32jfC/7AnH7I0v1v1TbbK3Gp
XNeiN4QroO+5qaSr0ID2sz5jtBLRb15RMre27E1ImpaIv2Jw8NJgW0k/D1RyKCwaTsgRdwuK
Kx/Y91XuSBdz0uOyU/S8kM1+ag0wvsGlpBVxRR/xw/E8M7TEwuCZQArqqTCmkG6HGcXFT0V9
PXFNNgV5jXMQRwU0O/ztJIQqsE5LsUomE//bLwzj9IVsaQpKDqW6TAPjcdBDPLHvriq7kGjt
WhVhdl0qEYB8lkBEU7V2Yb+SYhmhpDrti9Fq1EsmhiHSkxJcGREoMK/63r9WLZYI3+4W2rAc
UucZa4OT27U5ZISjNg3Ev0rxU5UH2/pT4wJCfxwocmqaRr6UYmrtZmND89X0KigoFD/XSeVv
jwBRNjPAubK9/k5NoRrYqztM9W6sJqrH8+UWZ1Idd/DdmogJh0gNC0+N42Za9yBRURfIdKSb
B3JfpUqcWwE7vUaYrHG1nw54pLUoPG6sAA7Mehl3nd4pZUALHwARAQABzSREYXZpZCBIaWxk
ZW5icmFuZCA8ZGF2aWRAcmVkaGF0LmNvbT7CwZgEEwEIAEICGwMGCwkIBwMCBhUIAgkKCwQW
AgMBAh4BAheAAhkBFiEEG9nKrXNcTDpGDfzKTd4Q9wD/g1oFAl8Ox4kFCRKpKXgACgkQTd4Q
9wD/g1oHcA//a6Tj7SBNjFNM1iNhWUo1lxAja0lpSodSnB2g4FCZ4R61SBR4l/psBL73xktp
rDHrx4aSpwkRP6Epu6mLvhlfjmkRG4OynJ5HG1gfv7RJJfnUdUM1z5kdS8JBrOhMJS2c/gPf
wv1TGRq2XdMPnfY2o0CxRqpcLkx4vBODvJGl2mQyJF/gPepdDfcT8/PY9BJ7FL6Hrq1gnAo4
3Iv9qV0JiT2wmZciNyYQhmA1V6dyTRiQ4YAc31zOo2IM+xisPzeSHgw3ONY/XhYvfZ9r7W1l
pNQdc2G+o4Di9NPFHQQhDw3YTRR1opJaTlRDzxYxzU6ZnUUBghxt9cwUWTpfCktkMZiPSDGd
KgQBjnweV2jw9UOTxjb4LXqDjmSNkjDdQUOU69jGMUXgihvo4zhYcMX8F5gWdRtMR7DzW/YE
BgVcyxNkMIXoY1aYj6npHYiNQesQlqjU6azjbH70/SXKM5tNRplgW8TNprMDuntdvV9wNkFs
9TyM02V5aWxFfI42+aivc4KEw69SE9KXwC7FSf5wXzuTot97N9Phj/Z3+jx443jo2NR34XgF
89cct7wJMjOF7bBefo0fPPZQuIma0Zym71cP61OP/i11ahNye6HGKfxGCOcs5wW9kRQEk8P9
M/k2wt3mt/fCQnuP/mWutNPt95w9wSsUyATLmtNrwccz63XOwU0EVcufkQEQAOfX3n0g0fZz
Bgm/S2zF/kxQKCEKP8ID+Vz8sy2GpDvveBq4H2Y34XWsT1zLJdvqPI4af4ZSMxuerWjXbVWb
T6d4odQIG0fKx4F8NccDqbgHeZRNajXeeJ3R7gAzvWvQNLz4piHrO/B4tf8svmRBL0ZB5P5A
2uhdwLU3NZuK22zpNn4is87BPWF8HhY0L5fafgDMOqnf4guJVJPYNPhUFzXUbPqOKOkL8ojk
CXxkOFHAbjstSK5Ca3fKquY3rdX3DNo+EL7FvAiw1mUtS+5GeYE+RMnDCsVFm/C7kY8c2d0G
NWkB9pJM5+mnIoFNxy7YBcldYATVeOHoY4LyaUWNnAvFYWp08dHWfZo9WCiJMuTfgtH9tc75
7QanMVdPt6fDK8UUXIBLQ2TWr/sQKE9xtFuEmoQGlE1l6bGaDnnMLcYu+Asp3kDT0w4zYGsx
5r6XQVRH4+5N6eHZiaeYtFOujp5n+pjBaQK7wUUjDilPQ5QMzIuCL4YjVoylWiBNknvQWBXS
lQCWmavOT9sttGQXdPCC5ynI+1ymZC1ORZKANLnRAb0NH/UCzcsstw2TAkFnMEbo9Zu9w7Kv
AxBQXWeXhJI9XQssfrf4Gusdqx8nPEpfOqCtbbwJMATbHyqLt7/oz/5deGuwxgb65pWIzufa
N7eop7uh+6bezi+rugUI+w6DABEBAAHCwXwEGAEIACYCGwwWIQQb2cqtc1xMOkYN/MpN3hD3
AP+DWgUCXw7HsgUJEqkpoQAKCRBN3hD3AP+DWrrpD/4qS3dyVRxDcDHIlmguXjC1Q5tZTwNB
boaBTPHSy/Nksu0eY7x6HfQJ3xajVH32Ms6t1trDQmPx2iP5+7iDsb7OKAb5eOS8h+BEBDeq
3ecsQDv0fFJOA9ag5O3LLNk+3x3q7e0uo06XMaY7UHS341ozXUUI7wC7iKfoUTv03iO9El5f
XpNMx/YrIMduZ2+nd9Di7o5+KIwlb2mAB9sTNHdMrXesX8eBL6T9b+MZJk+mZuPxKNVfEQMQ
a5SxUEADIPQTPNvBewdeI80yeOCrN+Zzwy/Mrx9EPeu59Y5vSJOx/z6OUImD/GhX7Xvkt3kq
Er5KTrJz3++B6SH9pum9PuoE/k+nntJkNMmQpR4MCBaV/J9gIOPGodDKnjdng+mXliF3Ptu6
3oxc2RCyGzTlxyMwuc2U5Q7KtUNTdDe8T0uE+9b8BLMVQDDfJjqY0VVqSUwImzTDLX9S4g/8
kC4HRcclk8hpyhY2jKGluZO0awwTIMgVEzmTyBphDg/Gx7dZU1Xf8HFuE+UZ5UDHDTnwgv7E
th6RC9+WrhDNspZ9fJjKWRbveQgUFCpe1sa77LAw+XFrKmBHXp9ZVIe90RMe2tRL06BGiRZr
jPrnvUsUUsjRoRNJjKKA/REq+sAnhkNPPZ/NNMjaZ5b8Tovi8C0tmxiCHaQYqj7G2rgnT0kt
WNyWQQ==
Organization: Red Hat
In-Reply-To: <20250604131158.GA17991@xxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 04.06.25 15:11, Jason Gunthorpe wrote:
On Wed, Jun 04, 2025 at 12:07:21PM +0200, David Hildenbrand wrote:
Instead of retrying, this patch explicitly fails the migration attempt
(-EBUSY) if no movable pages are found and unpinnable pages remain.
This avoids infinite loops and gives user a clear signal to retry,
rather then spinning inside kernel.
Hmmm, that means we will return EBUSY to the caller. Are all users actually
prepared to deal with that?
I don't think anyone is really prepared to deal with GUP temporarily
failing..
Kernel is expected to sort it out. We tolerated the existing temporary
failure due to its rarity and lack of a solution only.
Either it can be gup'd or not. There should be no retry.
Right, so -EAGAIN should be used for now such that GUP itself will retry
and can be canceled on signal if required.
--
Cheers,
David / dhildenb
Return-Path: <linux-kernel+bounces-673254-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 2DE2641E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:19:36 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 56C5B3A6CEA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:19:13 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 8C78828F956;
Wed, 4 Jun 2025 13:19:28 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="hPftu2LN"
Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1BE8928ECFD
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:19:25 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749043167; cv=none; b=ZUbqRcZYhm70Tmkq8ESB3N7f1bHVGqJgoa1LQ+Y0vF9CuFJloI/k71r1aKvcqIHP/ANN1MY1p/5FSesa3NVAS5T3b2R7AIBqGbcG2BwJoXiY7vLuecgWV6+t5QHbhNGzT8KU/MWUfmyS6L1Cv72YV9yRnmkLidi2XGm5Qy/pM6o=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749043167; c=relaxed/simple;
bh=wTGQA2MQdl24nKqbtgv4fmUZIT+gcMlYHT8VuLVGmyk=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=JMeru2pVeNkNFlpKGgPQWdgbOPKYjDHlaCllVRYTOiGW8dysQrYCSehORCgcGpju0U24Uli/bH8jvGdR9KriUs2VN0sCxjbcpJgOGxMEplD/vOVO6CgTr9jCX/TG1jmSFBCyOY9+sEhywRHbG+urjnQ/QpXq5y5L/2bB4AyGW9A=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=hPftu2LN; arc=none smtp.client-ip=205.220.168.131
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com
Received: from pps.filterd (m0279867.ppops.net [127.0.0.1])
by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5548A6rU006553
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:19:25 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h=
cc:content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=qcppdkim1; bh=
AswgeJqCiwnzTJPIuOWk5TVVklGP7eakncy9+WM5WK0=; b=hPftu2LNVjzuOYgD
QJLJSz8nBlytT11l5owXfIWEpJNojejLBK84ukSOs7+9yh9+q39+jmsjdLxKwIBC
Kt0J1UDIZva9G+acYtDQ9+B0hHlop22mmQAI7kmJbYJCsfufLORoce9gNAlR8h8E
6uIxS4p11HlvdiUNplzVqllCuOmlU4SHjWcxM23fxZe9xxvx+IK+QXNL3Lwg1i69
YPTjTai975aW/25RBnkjnpE/CzmEQT3BVC1tRP2q/ea6ex7JsGndZDfXcDeVRkNZ
+woW3yYpJKV9MZqdtNR2BxPpQ+gDCqGu8nfi+K9pmQtTTnn1TI8r+hiXkI+4OEDp
b+u03g==
Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199])
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 471g8sx531-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT)
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 13:19:25 +0000 (GMT)
Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-7d2107d6b30so294825785a.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 06:19:24 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749043164; x=1749647964;
h=in-reply-to:content-transfer-encoding:content-disposition
:mime-version:references:message-id:subject:cc:to:from:date
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=AswgeJqCiwnzTJPIuOWk5TVVklGP7eakncy9+WM5WK0=;
b=TyHrZeVDuaBmCftwtDpjHSMHZQiUMKIQCMP7C7Jg4n26IiJaLmvE5xhR6Ak2by+7p9
QWWrScb/je/n7sg3XQaXwfUeQsHVuSr1OVqmiwbVNpbzaRBcLsicl78v/KOSvj9TS2Ao
ytqALPuZ41js7gdOTB0Kz3jgMIlqEK7GiDZSCb9F+M32aiO/6j6mFDIu7eyALajXal5s
Iqpb+nje611KAGy1jjtLdDm9HgFUVNig0V+MbbEY5Ej1/VO9IeG5F3EyASDSkuv+bSZV
eMvs7L/JV7tmpWrhrCvKZHIFR5sXEtiXe6BTpQCxcn5gJsJx9Ifrd2jXCBhVIUIPaYhc
HHDA==
X-Forwarded-Encrypted: i=1; AJvYcCVY/pTvNOqMOGRs+Y4iwXoLUI+P+4Xvv++sCt+VsJTfqu2Cx+ElZ/PeFNSveoeUKFAuu3MSn9TNP1YIwKg=@vger.kernel.org
X-Gm-Message-State: AOJu0Yx3cPWuA5WR9rQmJy5xht6feDngjnpvYz2tiM/H30RFeZxltN1O
p6jRkfcIMvTTg0sLyQ4FYsMyoeBeHqV3FfPsLVVFeL4Tq+p6VgCatu3u0Ns0vFsZOqO20ZbtzX/
UKRtk/Aql+qg1ukkZ1iBBIrSMLCQGQtVdTZ6NKTpXeU5Z9OAjHmzpB881XzVx55bFHgg=
X-Gm-Gg: ASbGncvdGNa3zlkKMPGbJQPOPVv17raKbo8D5Tg84wve0WHp8BlkkBGWbFFzHHCSVGt
IIXOqMLDk8liTR02Wf611UZ4k7duS5doPa5v8cXFIIiDoCDDffR0SA+xIG0y3kQjGCIrv333H3F
kI4z56n0TtvkzvQDrJ67SUshQyyvg8pExDLY2970CGyferd/pFgO1sIAugATdvecyCVQ1tibW/n
3N8h5b8M2xjR7ASoGd3KXN9Rs9Eloa8yYv7DHaY0M/4CR+Jycu7uPVWQmg4tnf0VCF5FvlITBg4
1jWu7ifMkulj4hsKizT/Jy5XyagTK4bM911WkxQ3xj3sC/g+7ZtNwb4Z+SkXwd1KetIxX4H2h74
=
X-Received: by 2002:a05:620a:17a8:b0:7ce:e010:88bb with SMTP id af79cd13be357-7d21a680f7fmr325496285a.22.1749043163542;
Wed, 04 Jun 2025 06:19:23 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IFxd2DF9ZZitPuPShjI9mgm9ONIB9V2QAlo0khxT5DcL/JlA3x9QRIZjM9V+8DeFW1VeyZ+ng==
X-Received: by 2002:a05:620a:17a8:b0:7ce:e010:88bb with SMTP id af79cd13be357-7d21a680f7fmr325489785a.22.1749043162859;
Wed, 04 Jun 2025 06:19:22 -0700 (PDT)
Received: from eriador.lumag.spb.ru (2001-14ba-a0c3-3a00--7a1.rev.dnainternet.fi. [2001:14ba:a0c3:3a00::7a1])
by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-32a85bd25cbsm23502601fa.89.2025.06.04.06.19.21
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 06:19:21 -0700 (PDT)
Date: Wed, 4 Jun 2025 16:19:20 +0300
From: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
To: Qiang Yu <quic_qianyu@xxxxxxxxxxx>
Cc: Ziyue Zhang <quic_ziyuzhan@xxxxxxxxxxx>, lpieralisi@xxxxxxxxxx,
kwilczynski@xxxxxxxxxx, manivannan.sadhasivam@xxxxxxxxxx,
robh@xxxxxxxxxx, bhelgaas@xxxxxxxxxx, krzk+dt@xxxxxxxxxx,
neil.armstrong@xxxxxxxxxx, abel.vesa@xxxxxxxxxx, kw@xxxxxxxxx,
conor+dt@xxxxxxxxxx, vkoul@xxxxxxxxxx, kishon@xxxxxxxxxx,
andersson@xxxxxxxxxx, konradybcio@xxxxxxxxxx,
linux-arm-msm@xxxxxxxxxxxxxxx, linux-pci@xxxxxxxxxxxxxxx,
linux-phy@xxxxxxxxxxxxxxxxxxx, devicetree@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, quic_krichai@xxxxxxxxxxx,
quic_vbadigan@xxxxxxxxxxx
Subject: Re: [PATCH v1 2/4] dt-bindings: PCI: qcom,pcie-sa8775p: document
link_down reset
Message-ID: <mzubbiwkfshplawugahzbtilibnq3wiy6bqetfarbv4kxw46rs@eranz4lm4bu5>
References: <20250529035416.4159963-1-quic_ziyuzhan@xxxxxxxxxxx>
<20250529035416.4159963-3-quic_ziyuzhan@xxxxxxxxxxx>
<drr7cngryldptgzbmac7l2xpryugbrnydke3alq5da2mfvmgm5@nwjsqkef7ypc>
<e8d1b60c-97fe-4f50-8ead-66711f1aa3a7@xxxxxxxxxxx>
<34dnpaz3gl5jctcohh5kbf4arijotpdlxn2eze3oixrausyev3@4qso3qg5zn4t>
<43a6e141-adab-42e9-9966-ec54cb91a6de@xxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <43a6e141-adab-42e9-9966-ec54cb91a6de@xxxxxxxxxxx>
X-Proofpoint-ORIG-GUID: YLHKuQNDGRKk2Exp8ue8fKK1PDqlM3Sd
X-Authority-Analysis: v=2.4 cv=EPcG00ZC c=1 sm=1 tr=0 ts=684047dd cx=c_pps
a=HLyN3IcIa5EE8TELMZ618Q==:117 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10
a=6IFa9wvqVegA:10 a=JfrnYn6hAAAA:8 a=COk6AnOGAAAA:8 a=b_c0941waCFHaVHBhDUA:9
a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=bTQJ7kPSJx9SKPbeHEYW:22
a=1CNFftbPRP8L7MoqJWF3:22 a=TjNXssC_j7lpFel5tvFf:22
X-Proofpoint-GUID: YLHKuQNDGRKk2Exp8ue8fKK1PDqlM3Sd
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDEwMSBTYWx0ZWRfX5XvuWOysn2Vz
Cw8VuCH+v7MqGWmnT2i4z22bChHvPiz20csW3UoNwtPtHRCh33zks7mL1uv+FaBwuHVJ+5JgD1h
KkAXQBbsvePuHA3pOl225w7J6Buno1MGc/bhvlb4JQkqgF1YBEUleXEVX3ZK2OKu7oZVLEp/NJG
rS3rUw5ACICDvlp5lpyzafjoJJRYk2EBCtRhubWUeaRAPq+hj0L1og+FB2CeFh/0Y2bjq3r1enI
F4XM3xXiVbRomH8JnDmQHZCepqmXIoPJgalfMsfNEJU12UbsItZEQQxZX6nOpoVaKerNgnh1zOy
VbmBoyxW4/xRucgJM2xboxNmxOnJ07sZr668v2TZ2ZELySQPdz3nSZrxDie3K5OrhEwEqwbN4pj
RYplEH2MGPTQFkZjsDk489gM7etqp7xqd/1lPLClf4DsTUEmq4VYa66PiHfcTRjcnumd507x
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
spamscore=0 suspectscore=0 bulkscore=0 priorityscore=1501 phishscore=0
impostorscore=0 lowpriorityscore=0 adultscore=0 malwarescore=0 mlxscore=0
clxscore=1015 mlxlogscore=999 classifier=spam authscore=0 authtc=n/a authcc=
route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000
definitions=main-2506040101
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 06:05:21PM +0800, Qiang Yu wrote:
On 6/4/2025 5:15 PM, Dmitry Baryshkov wrote:
> On Wed, Jun 04, 2025 at 03:58:33PM +0800, Ziyue Zhang wrote:
>> On 6/3/2025 9:11 PM, Dmitry Baryshkov wrote:
>>> On Thu, May 29, 2025 at 11:54:14AM +0800, Ziyue Zhang wrote:
>>>> Each PCIe controller on sa8775p supports 'link_down'reset on hardware,
>>>> document it.
>>> I don't think it's possible to "support" reset in hardware. Either it
>>> exists and is routed, or it is not.
>> Hi Dmitry,
>>
>> I will change the commit msg to
>> 'Each PCIe controller on sa8775p includes 'link_down'reset on hardware,
>> document it.'
>> "Supports" implies that the PCIe controller has an active role in enabling
>> or managing the reset functionality—it suggests that the controller is designed
>> to accommodate or facilitate this feature.
>> "Includes" simply states that the reset functionality is present in the
>> hardware—it exists, whether or not it's actively managed or configurable.
>> So I think change it to includes will be better.
>>
>> BRs
>> Ziyue
>>
>>>> Signed-off-by: Ziyue Zhang <quic_ziyuzhan@xxxxxxxxxxx>
>>>> ---
>>>> .../devicetree/bindings/pci/qcom,pcie-sa8775p.yaml | 13 +++++++++----
>>>> 1 file changed, 9 insertions(+), 4 deletions(-)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-sa8775p.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie-sa8775p.yaml
>>>> index e3fa232da2ca..805258cbcf2f 100644
>>>> --- a/Documentation/devicetree/bindings/pci/qcom,pcie-sa8775p.yaml
>>>> +++ b/Documentation/devicetree/bindings/pci/qcom,pcie-sa8775p.yaml
>>>> @@ -61,11 +61,14 @@ properties:
>>>> - const: global
>>>> resets:
>>>> - maxItems: 1
>>>> + minItems: 1
>>>> + maxItems: 2
>>> Shouldn't we just update this to maxItems:2 / minItems:2 and drop
>>> minItems:1 from the next clause?
>> Hi Dmitry,
>>
>> link_down reset is optional. In many other platforms, like sm8550
>> and x1e80100, link_down reset is documented as a optional reset.
>> PCIe will works fine without link_down reset. So I think setting it
>> as optional is better.
> You are describing a hardware. How can a reset be optional in the
> _hardware_? It's either routed or not.
I feel a bit confused. According to the theory above, everything seems to
be non-optional when describing hardware, such as registers, clocks,
resets, regulators, and interrupts—all of them either exist or do not.
Seems like I misunderstand the concept of 'optional'? Is 'optional' only
used for compatibility across different platforms?
Additionally, we have documented the PCIe global interrupt as optional. I
was taught that, in the PCIe driver, this interrupt is retrieved using the
platform_get_irq_byname_optional API, so it can be documented as optional.
However, this still seems to contradict the theory mentioned earlier.
I'd say, it should not be defined as optional.
>> BRs
>> Ziyue
>>
>>>> reset-names:
>>>> + minItems: 1
>>>> items:
>>>> - - const: pci
>>>> + - const: pci # PCIe core reset
>>>> + - const: link_down # PCIe link down reset
>>>> required:
>>>> - interconnects
>>>> @@ -161,8 +164,10 @@ examples:
>>>> power-domains = <&gcc PCIE_0_GDSC>;
>>>> - resets = <&gcc GCC_PCIE_0_BCR>;
>>>> - reset-names = "pci";
>>>> + resets = <&gcc GCC_PCIE_0_BCR>,
>>>> + <&gcc GCC_PCIE_0_LINK_DOWN_BCR>;
>>>> + reset-names = "pci",
>>>> + "link_down";
>>>> perst-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>;
>>>> wake-gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
>>>> --
>>>> 2.34.1
>>>>
>>>>
>>>> --
>>>> linux-phy mailing list
>>>> linux-phy@xxxxxxxxxxxxxxxxxxx
>>>> https://lists.infradead.org/mailman/listinfo/linux-phy
--
With best wishes
Qiang Yu
--
With best wishes
Dmitry
Return-Path: <linux-kernel+bounces-673255-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id AAC8941E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:19:54 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 904E23A70F5
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:19:28 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 25DBF28FA87;
Wed, 4 Jun 2025 13:19:43 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="KIUbitAA"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id B695128F50C
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:19:40 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749043182; cv=none; b=ll70fjS751YDvymrWxXLVC1qbFFeqknHHaRm1eF3h4sOC0zW6gWZYBKLyWEsTrfjKsI5rXZcFCgYlEv36zsXBT+c+k4FKiltz0oq/iQglY5xuyo0I/XKMJO0iJEUZj1K0RmVWlwMphEzxaxNU0WFrZbNbJN7K+3v4R/ySbiGrzA=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749043182; c=relaxed/simple;
bh=bBv7kKtPz698obUpmM8o/T8D8HSJkDBTP2nZQaX4/qY=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=UgavWwuf64I8E9Ej6abH2Xt/6f2HY+029q530gQfV3+N1SFpOyKbkAOal7I0DFYIT8esTs3w9J+vPAkUG0dfahagAdDQkgMuohE71EaV+BEQDb6GDBpNhSkrQiaA020MwtK2nJQxUzgz1XdbcC/aOMqFIujBk/mq9F+JisBQIbs=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=KIUbitAA; arc=none smtp.client-ip=170.10.133.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749043179;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=Yi685aC5CqrR/61sFlwzZ6HBvbWgdnrQT0rYDI85PAk=;
b=KIUbitAAUEcHCMPRs6fzVaP5C/7NzQbBO6sRNqDCKXsaUxDzlAy9r1OMbOdCsNGlAK7N1F
v285OaPC059U45Zl1H0jgvTQqXyk4Q50GxeUIQ3niZb65JsOa5VJboE7UxlEkbNUlmbkLL
9f0zv74udXBpyKsYX2YyAfEN21r7kbA=
Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com
[209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-574-Ob6d-P8nPmyoh1doq36zLw-1; Wed, 04 Jun 2025 09:19:38 -0400
X-MC-Unique: Ob6d-P8nPmyoh1doq36zLw-1
X-Mimecast-MFC-AGG-ID: Ob6d-P8nPmyoh1doq36zLw_1749043177
Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-4517abcba41so27188985e9.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 06:19:37 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749043177; x=1749647977;
h=content-transfer-encoding:in-reply-to:organization:autocrypt
:content-language:from:references:cc:to:subject:user-agent
:mime-version:date:message-id:x-gm-message-state:from:to:cc:subject
:date:message-id:reply-to;
bh=Yi685aC5CqrR/61sFlwzZ6HBvbWgdnrQT0rYDI85PAk=;
b=r5Gkiqc0QMh79TNPGILMVFlQnuhevf6kLN+9LWcLaWVRogQC3lzXOAK5QhO8+vKetT
z2k8nZ3KG3GTKOCK6TsUe/uxJAb+9V5eq23SQetNQZdVhMzUbvVZC0CDKqz7LuzRL+s/
F7PmhcPdms9TCYpnosDbgB+vpTd54n6iLkq4m6F7KUS+l6Vj90Pi8CWeKYxRp6dwq+kr
Ld/eslNfyM3mw19Ju0qV9SXE7kssHZzypIgtE5ekxpSkY0FVa8bTIT7IyQy6UrktEK6g
YCAQg4Y5pZar6RWOUBuutKYzz628zMfwoUoOYwoPBmdOHzfjsnMVOZVDMlJPPlJxKT/q
X++w==
X-Forwarded-Encrypted: i=1; AJvYcCUulN/TxQESNmADa6tgTSNRT9DbeWI5TFZE5rsrdjW/iL9IxP1Z8piRZcPQA1Pcbv5xeE9vO5QEpM4M+yA=@vger.kernel.org
X-Gm-Message-State: AOJu0YwCDrY66Gt5BY4yMYtQiZTy6Nnp5cClXsCy1kRGSYjgVml859Fv
Mr5yA+CUZcnoiu11mzXHAYWUQgBl/OSvNAD1qmvjUfhTQiYJn+REtSQbnR98glQnaOQOVaULQQM
HqYjWS5C9BIK3YGr9jl1BIzepjVWib74tn5zDp6Iea1/SwAUDgpn+rET86x2sp2MgFw==
X-Gm-Gg: ASbGncu9DConFOw5qf/66CT9cs+FdPxI4lVn1b5kEdEEFpJ0WVPT4tr0veFam/vk//m
RRRtU7jHver+eCUEZ0HePaY48TEmEU/y4TMIGhFWLYdoPb+1K8OX4R+Yu8I0o8vjOtCHTmdWnqR
c2sWFvPHkf330pOz70ojGQRDNDEWQUulFgqlF1yHaoDxM3DSlbMslh7/trYuDIzNUEbGqztwE4i
d9qYeQkFFVWhPdJgbF8euVzdYtUqGJFGvqrByZshjLmlIs8WeyrXVMZz+L/BNUEuG8OS1QT8tj+
3bCvRzvHym7Rbra1HPWh3nUNWc5x1bQsIc0FS2v9TGgkBETRMvwFnWNZCC1KtdqpkFvMKm+IimM
okJpVn57tMw3d5V4ReZSOeeX+LupF26V6xat3prA=
X-Received: by 2002:a05:600c:8289:b0:442:dc6f:2f11 with SMTP id 5b1f17b1804b1-451f0b2e6c3mr21071395e9.25.1749043176810;
Wed, 04 Jun 2025 06:19:36 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IEy7QaodTgFfDdSvAX72kgMU9zSqScxhzC4fy0RcSCtYfpotJJP4oPdfjuXqIvNkRFSL6q9SQ==
X-Received: by 2002:a05:600c:8289:b0:442:dc6f:2f11 with SMTP id 5b1f17b1804b1-451f0b2e6c3mr21071215e9.25.1749043176474;
Wed, 04 Jun 2025 06:19:36 -0700 (PDT)
Received: from ?IPV6:2003:d8:2f1b:b800:6fdb:1af2:4fbd:1fdf? (p200300d82f1bb8006fdb1af24fbd1fdf.dip0.t-ipconnect.de. [2003:d8:2f1b:b800:6fdb:1af2:4fbd:1fdf])
by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-450d7f1afebsm199548075e9.0.2025.06.04.06.19.34
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 06:19:36 -0700 (PDT)
Message-ID: <5de3da6b-7c5f-4d40-b3a7-f6a0f5cbc6da@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 15:19:34 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH 1/3] userfaultfd: correctly prevent registering
VM_DROPPABLE regions
To: Tal Zussman <tz2294@xxxxxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Peter Xu <peterx@xxxxxxxxxx>,
"Jason A. Donenfeld" <Jason@xxxxxxxxx>,
Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>,
Christian Brauner <brauner@xxxxxxxxxx>, Jan Kara <jack@xxxxxxx>,
Pavel Emelyanov <xemul@xxxxxxxxxxxxx>, Andrea Arcangeli <aarcange@xxxxxxxxxx>
Cc: linux-mm@xxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
linux-fsdevel@xxxxxxxxxxxxxxx
References: <20250603-uffd-fixes-v1-0-9c638c73f047@xxxxxxxxxxxx>
<20250603-uffd-fixes-v1-1-9c638c73f047@xxxxxxxxxxxx>
From: David Hildenbrand <david@xxxxxxxxxx>
Content-Language: en-US
Autocrypt: addr=david@xxxxxxxxxx; keydata=
xsFNBFXLn5EBEAC+zYvAFJxCBY9Tr1xZgcESmxVNI/0ffzE/ZQOiHJl6mGkmA1R7/uUpiCjJ
dBrn+lhhOYjjNefFQou6478faXE6o2AhmebqT4KiQoUQFV4R7y1KMEKoSyy8hQaK1umALTdL
QZLQMzNE74ap+GDK0wnacPQFpcG1AE9RMq3aeErY5tujekBS32jfC/7AnH7I0v1v1TbbK3Gp
XNeiN4QroO+5qaSr0ID2sz5jtBLRb15RMre27E1ImpaIv2Jw8NJgW0k/D1RyKCwaTsgRdwuK
Kx/Y91XuSBdz0uOyU/S8kM1+ag0wvsGlpBVxRR/xw/E8M7TEwuCZQArqqTCmkG6HGcXFT0V9
PXFNNgV5jXMQRwU0O/ztJIQqsE5LsUomE//bLwzj9IVsaQpKDqW6TAPjcdBDPLHvriq7kGjt
WhVhdl0qEYB8lkBEU7V2Yb+SYhmhpDrti9Fq1EsmhiHSkxJcGREoMK/63r9WLZYI3+4W2rAc
UucZa4OT27U5ZISjNg3Ev0rxU5UH2/pT4wJCfxwocmqaRr6UYmrtZmND89X0KigoFD/XSeVv
jwBRNjPAubK9/k5NoRrYqztM9W6sJqrH8+UWZ1Idd/DdmogJh0gNC0+N42Za9yBRURfIdKSb
B3JfpUqcWwE7vUaYrHG1nw54pLUoPG6sAA7Mehl3nd4pZUALHwARAQABzSREYXZpZCBIaWxk
ZW5icmFuZCA8ZGF2aWRAcmVkaGF0LmNvbT7CwZgEEwEIAEICGwMGCwkIBwMCBhUIAgkKCwQW
AgMBAh4BAheAAhkBFiEEG9nKrXNcTDpGDfzKTd4Q9wD/g1oFAl8Ox4kFCRKpKXgACgkQTd4Q
9wD/g1oHcA//a6Tj7SBNjFNM1iNhWUo1lxAja0lpSodSnB2g4FCZ4R61SBR4l/psBL73xktp
rDHrx4aSpwkRP6Epu6mLvhlfjmkRG4OynJ5HG1gfv7RJJfnUdUM1z5kdS8JBrOhMJS2c/gPf
wv1TGRq2XdMPnfY2o0CxRqpcLkx4vBODvJGl2mQyJF/gPepdDfcT8/PY9BJ7FL6Hrq1gnAo4
3Iv9qV0JiT2wmZciNyYQhmA1V6dyTRiQ4YAc31zOo2IM+xisPzeSHgw3ONY/XhYvfZ9r7W1l
pNQdc2G+o4Di9NPFHQQhDw3YTRR1opJaTlRDzxYxzU6ZnUUBghxt9cwUWTpfCktkMZiPSDGd
KgQBjnweV2jw9UOTxjb4LXqDjmSNkjDdQUOU69jGMUXgihvo4zhYcMX8F5gWdRtMR7DzW/YE
BgVcyxNkMIXoY1aYj6npHYiNQesQlqjU6azjbH70/SXKM5tNRplgW8TNprMDuntdvV9wNkFs
9TyM02V5aWxFfI42+aivc4KEw69SE9KXwC7FSf5wXzuTot97N9Phj/Z3+jx443jo2NR34XgF
89cct7wJMjOF7bBefo0fPPZQuIma0Zym71cP61OP/i11ahNye6HGKfxGCOcs5wW9kRQEk8P9
M/k2wt3mt/fCQnuP/mWutNPt95w9wSsUyATLmtNrwccz63XOwU0EVcufkQEQAOfX3n0g0fZz
Bgm/S2zF/kxQKCEKP8ID+Vz8sy2GpDvveBq4H2Y34XWsT1zLJdvqPI4af4ZSMxuerWjXbVWb
T6d4odQIG0fKx4F8NccDqbgHeZRNajXeeJ3R7gAzvWvQNLz4piHrO/B4tf8svmRBL0ZB5P5A
2uhdwLU3NZuK22zpNn4is87BPWF8HhY0L5fafgDMOqnf4guJVJPYNPhUFzXUbPqOKOkL8ojk
CXxkOFHAbjstSK5Ca3fKquY3rdX3DNo+EL7FvAiw1mUtS+5GeYE+RMnDCsVFm/C7kY8c2d0G
NWkB9pJM5+mnIoFNxy7YBcldYATVeOHoY4LyaUWNnAvFYWp08dHWfZo9WCiJMuTfgtH9tc75
7QanMVdPt6fDK8UUXIBLQ2TWr/sQKE9xtFuEmoQGlE1l6bGaDnnMLcYu+Asp3kDT0w4zYGsx
5r6XQVRH4+5N6eHZiaeYtFOujp5n+pjBaQK7wUUjDilPQ5QMzIuCL4YjVoylWiBNknvQWBXS
lQCWmavOT9sttGQXdPCC5ynI+1ymZC1ORZKANLnRAb0NH/UCzcsstw2TAkFnMEbo9Zu9w7Kv
AxBQXWeXhJI9XQssfrf4Gusdqx8nPEpfOqCtbbwJMATbHyqLt7/oz/5deGuwxgb65pWIzufa
N7eop7uh+6bezi+rugUI+w6DABEBAAHCwXwEGAEIACYCGwwWIQQb2cqtc1xMOkYN/MpN3hD3
AP+DWgUCXw7HsgUJEqkpoQAKCRBN3hD3AP+DWrrpD/4qS3dyVRxDcDHIlmguXjC1Q5tZTwNB
boaBTPHSy/Nksu0eY7x6HfQJ3xajVH32Ms6t1trDQmPx2iP5+7iDsb7OKAb5eOS8h+BEBDeq
3ecsQDv0fFJOA9ag5O3LLNk+3x3q7e0uo06XMaY7UHS341ozXUUI7wC7iKfoUTv03iO9El5f
XpNMx/YrIMduZ2+nd9Di7o5+KIwlb2mAB9sTNHdMrXesX8eBL6T9b+MZJk+mZuPxKNVfEQMQ
a5SxUEADIPQTPNvBewdeI80yeOCrN+Zzwy/Mrx9EPeu59Y5vSJOx/z6OUImD/GhX7Xvkt3kq
Er5KTrJz3++B6SH9pum9PuoE/k+nntJkNMmQpR4MCBaV/J9gIOPGodDKnjdng+mXliF3Ptu6
3oxc2RCyGzTlxyMwuc2U5Q7KtUNTdDe8T0uE+9b8BLMVQDDfJjqY0VVqSUwImzTDLX9S4g/8
kC4HRcclk8hpyhY2jKGluZO0awwTIMgVEzmTyBphDg/Gx7dZU1Xf8HFuE+UZ5UDHDTnwgv7E
th6RC9+WrhDNspZ9fJjKWRbveQgUFCpe1sa77LAw+XFrKmBHXp9ZVIe90RMe2tRL06BGiRZr
jPrnvUsUUsjRoRNJjKKA/REq+sAnhkNPPZ/NNMjaZ5b8Tovi8C0tmxiCHaQYqj7G2rgnT0kt
WNyWQQ==
Organization: Red Hat
In-Reply-To: <20250603-uffd-fixes-v1-1-9c638c73f047@xxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 04.06.25 00:14, Tal Zussman wrote:
vma_can_userfault() masks off non-userfaultfd VM flags from vm_flags.
The vm_flags & VM_DROPPABLE test will then always be false, incorrectly
allowing VM_DROPPABLE regions to be registered with userfaultfd.
Additionally, vm_flags is not guaranteed to correspond to the actual
VMA's flags. Fix this test by checking the VMA's flags directly.
Link: https://lore.kernel.org/linux-mm/5a875a3a-2243-4eab-856f-bc53ccfec3ea@xxxxxxxxxx/
Fixes: 9651fcedf7b9 ("mm: add MAP_DROPPABLE for designating always lazily freeable mappings")
Signed-off-by: Tal Zussman <tz2294@xxxxxxxxxxxx>
---
include/linux/userfaultfd_k.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/userfaultfd_k.h b/include/linux/userfaultfd_k.h
index 75342022d144..f3b3d2c9dd5e 100644
--- a/include/linux/userfaultfd_k.h
+++ b/include/linux/userfaultfd_k.h
@@ -218,7 +218,7 @@ static inline bool vma_can_userfault(struct vm_area_struct *vma,
{
vm_flags &= __VM_UFFD_FLAGS;
- if (vm_flags & VM_DROPPABLE)
+ if (vma->vm_flags & VM_DROPPABLE)
return false;
if ((vm_flags & VM_UFFD_MINOR) &&
Nice catch!
Acked-by: David Hildenbrand <david@xxxxxxxxxx>
--
Cheers,
David / dhildenb
Return-Path: <linux-kernel+bounces-673256-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 90AA441E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:20:40 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id A33B13A6EC8
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:20:16 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id DE49C28F952;
Wed, 4 Jun 2025 13:20:31 +0000 (UTC)
Received: from mail-il1-f207.google.com (mail-il1-f207.google.com [209.85.166.207])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id D471328ECDE
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:20:29 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.207
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749043231; cv=none; b=fcG86a/myI1kPJ+8hoRKz3r+/FU9B2YIB+N3loIJJpLAUQT8qIgCS9/PTRRa+AGDIwyib3DOdTs33/di7V6spEBs640bmcruQIxEvRBCzZg244XvvB/EmUAhiny6nvOQbSE3KbpKOPpMNSz/kd3LK6b0GekVVRGhAMePpQT5+eE=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749043231; c=relaxed/simple;
bh=GtwuQJuy51N4t1zq/Q9Z6lCX128Pom+l/Co0cYVYgYo=;
h=MIME-Version:Date:Message-ID:Subject:From:To:Content-Type; b=gb3LHz7Gh2sEwYPfaOB+tQZhZAxxJxoqltfnQSUIekxSbrjHwKSdgu3WAot6i6VW8e3Ljo2Nq7npN7bh35J1ZyWoQBDEiuavkZ8XyhGDdQBRv9dhGILNnoANdrIYZptR6UMV0u/ER4gYuZA7vFM06fJKGIEcbyXu4m+GvMR35FU=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.166.207
Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com
Received: by mail-il1-f207.google.com with SMTP id e9e14a558f8ab-3da6fe2a552so126256485ab.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 06:20:29 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749043229; x=1749648029;
h=to:from:subject:message-id:date:mime-version:x-gm-message-state
:from:to:cc:subject:date:message-id:reply-to;
bh=10aIB0t8KM36XkuxFgyqCSaNeuDx3XE/NxbhTOsT0v0=;
b=m0KYROkyQD2Y1LY8gOik0mHnD8DDIlhvgohih9xcFp5Im72xUeDPyEl5m1fb2u64J5
vvGjzSH89Reebe3yyZF3Ytfc8NTyb81CIwDPj21TsenZ1LhCw/4FItRbOWrxx1GHdhWp
1zpdTqMMhcuOmR49hBX3cJDbARnhCpr2Je0FZEQQKSwDhQAiG67F+quLEHl4YGnUwWsc
xcP/EK/PvlxJpMPhzkBnvVHeex5/+ZnnTvOwJNb8hZtTJ/mpZ5t5LthfsoIhQo62t07S
+EYMltQQdJxBRgqHtpgREpD6i6qfHMpmuGTTWQGZ+grXHhXsBKrG7SJwiNQS/0sKwg7r
DoaA==
X-Forwarded-Encrypted: i=1; AJvYcCVy4X+DZ6G9hZtYMUoIBg2/GQy68tKDRcmOO/FVFrq3W3B4DGkV81JeeuoKOTNpDvgc9GnjnRLQE+lamRI=@vger.kernel.org
X-Gm-Message-State: AOJu0YyagvTkIEKvzCzWtbHSz25Qb9C/vZHtZL0PpHpE5qxM8ethAI0X
vNTnsvSMqdJbGjsDRpUywPkfrw2VXcVAD8ItiEAJFDDOBhajP+uTFf3Li236WO5rrhkxpo2LI3/
99R6zQALK8j6V0+xxvnv8qdxOoph+5bIn4EdgHpI+ctg1cWtEl6ko0KCmAUo=
X-Google-Smtp-Source: AGHT+IGwseWAf5OxBFbNEQ2+7rV/HvgblxWQTAb1qtVGBtvaspTA9QK9LkA8yHip5XZ3Qtm+IDi1O0NxObvlABQKQCrI0iybkd/M
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-Received: by 2002:a05:6e02:3b07:b0:3dc:88ca:5ebd with SMTP id
e9e14a558f8ab-3ddbedfca9emr32646245ab.20.1749043228917; Wed, 04 Jun 2025
06:20:28 -0700 (PDT)
Date: Wed, 04 Jun 2025 06:20:28 -0700
X-Google-Appengine-App-Id: s~syzkaller
X-Google-Appengine-App-Id-Alias: syzkaller
Message-ID: <6840481c.a00a0220.d4325.000c.GAE@xxxxxxxxxx>
Subject: [syzbot] [btrfs?] WARNING in btrfs_add_delayed_iput
From: syzbot <syzbot+0ed30ad435bf6f5b7a42@xxxxxxxxxxxxxxxxxxxxxxxxx>
To: clm@xxxxxx, dsterba@xxxxxxxx, josef@xxxxxxxxxxxxxx,
linux-btrfs@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
syzkaller-bugs@xxxxxxxxxxxxxxxx
Content-Type: text/plain; charset="UTF-8"
X-Spam-Status: No, score=-3.0 required=5.0 tests=FROM_LOCAL_HEX,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hello,
syzbot found the following issue on:
HEAD commit: 3a83b350b5be Add linux-next specific files for 20250530
git tree: linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=117a3ed4580000
kernel config: https://syzkaller.appspot.com/x/.config?x=28859360c84ac63d
dashboard link: https://syzkaller.appspot.com/bug?extid=0ed30ad435bf6f5b7a42
compiler: Debian clang version 20.1.6 (++20250514063057+1e4d39e07757-1~exp1~20250514183223.118), Debian LLD 20.1.6
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/e18e458d13c9/disk-3a83b350.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/a1c40854811c/vmlinux-3a83b350.xz
kernel image: https://storage.googleapis.com/syzbot-assets/571f670b130a/bzImage-3a83b350.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+0ed30ad435bf6f5b7a42@xxxxxxxxxxxxxxxxxxxxxxxxx
------------[ cut here ]------------
WARNING: CPU: 0 PID: 65 at fs/btrfs/inode.c:3420 btrfs_add_delayed_iput+0x2f8/0x370 fs/btrfs/inode.c:3420
Modules linked in:
CPU: 0 UID: 0 PID: 65 Comm: kworker/u8:4 Not tainted 6.15.0-next-20250530-syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Workqueue: btrfs-endio-write btrfs_work_helper
RIP: 0010:btrfs_add_delayed_iput+0x2f8/0x370 fs/btrfs/inode.c:3420
Code: 4e ad 5d fe 48 8b 3b 48 83 c4 28 5b 41 5c 41 5d 41 5e 41 5f 5d e9 f8 bc ca fd e8 03 2a fa fd e9 e6 fd ff ff e8 f9 29 fa fd 90 <0f> 0b 90 e9 41 fe ff ff 44 89 f9 80 e1 07 80 c1 03 38 c1 0f 8c 72
RSP: 0018:ffffc9000213f780 EFLAGS: 00010293
RAX: ffffffff83c635b7 RBX: ffff888058920000 RCX: ffff88801c769e00
RDX: 0000000000000000 RSI: 0000000000000100 RDI: 0000000000000000
RBP: 0000000000000001 R08: ffff888058921b67 R09: 1ffff1100b12436c
R10: dffffc0000000000 R11: ffffed100b12436d R12: 0000000000000001
R13: dffffc0000000000 R14: ffff88807d748000 R15: 0000000000000100
FS: 0000000000000000(0000) GS:ffff888125c53000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00002000000bd038 CR3: 000000006a142000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
btrfs_put_ordered_extent+0x19f/0x470 fs/btrfs/ordered-data.c:635
btrfs_finish_one_ordered+0x11d8/0x1b10 fs/btrfs/inode.c:3312
btrfs_work_helper+0x399/0xc20 fs/btrfs/async-thread.c:312
process_one_work kernel/workqueue.c:3238 [inline]
process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3321
worker_thread+0x8a0/0xda0 kernel/workqueue.c:3402
kthread+0x70e/0x8a0 kernel/kthread.c:464
ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
</TASK>
---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@xxxxxxxxxxxxxxxx.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup
Return-Path: <linux-kernel+bounces-673257-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id DFF7341E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:21:38 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 352801899C38
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:21:52 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id B083128FA88;
Wed, 4 Jun 2025 13:21:30 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=cmpxchg-org.20230601.gappssmtp.com header.i=@cmpxchg-org.20230601.gappssmtp.com header.b="gKJV9Nw8"
Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id E155B28EA55
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:21:27 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.53
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749043290; cv=none; b=J1AuhD1qmPOjmx42/I5BzaKfgDoEfq66yr6Lh6Mb6bc386JUYOGG7djFe2ctIqACpr14c1SC80FyJhftm9SwUDaRkkW5Up6S+nAALtJpJ2XvvxtU+DmrD0LNjpspw4defg5i3XK+Euc5aq5QbMCsO8pcxp1DB1ca+KaagjVoKew=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749043290; c=relaxed/simple;
bh=gOlSzSaCZlQLzn4CBTyY41/yRuizYmxBDqri/ySzeDw=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=QKWqmuVj8Fkc/ae3Jv7XhF0Hl0tKYMWpaEhlX+WKACcxK3EV6elbtBeVK89QeFJktquVy5av+pJ8JvhJzCtyOcwwh6U3Urcom/fETCXzEy7tiIt5oORjGJ97f7c6pJPmeucP6dzKGBb0LL3OoHJZn69XWTn/5+h8tqqAFeQFkEo=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmpxchg.org; spf=pass smtp.mailfrom=cmpxchg.org; dkim=pass (2048-bit key) header.d=cmpxchg-org.20230601.gappssmtp.com header.i=@cmpxchg-org.20230601.gappssmtp.com header.b=gKJV9Nw8; arc=none smtp.client-ip=209.85.221.53
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmpxchg.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cmpxchg.org
Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-3a375888297so653733f8f.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 06:21:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=cmpxchg-org.20230601.gappssmtp.com; s=20230601; t=1749043286; x=1749648086; darn=vger.kernel.org;
h=in-reply-to:content-disposition:mime-version:references:message-id
:subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to;
bh=9FoPPyZXh48zUhjz0K7ZmNXk3NCW+1EH6zXuwMWdtUo=;
b=gKJV9Nw8LHWW0YbSHnEIBMwTjMU7U7P8T6IaRaVrtd6TgMQF3wWG1P1lCGa8H7+Sps
adKVGE3NP2pAZ4jPy/m+OlqH0gektmSaa4hZTxJk2b9UcBlTfawyK/xv03Tys+Cu76a/
K9QAiIXty+/Z+Ll2hM2ywB0W0U+3KSmwzTVa/35HNWAHk2732supD+ycFt2csM/G8+kb
c8ZYBF4ueLVtUBGsGBKfto4tPd1p7hemp7rS+l9w0bjGvSjNwmROMmkr9/c2StsgNMBV
bbh2rXCwP2qb2EsCgAjLgEFk5T8Clotq4EaW5rqGKqrbAIwQCcx+Mop7DQtvSw293KhC
BMoQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749043286; x=1749648086;
h=in-reply-to:content-disposition:mime-version:references:message-id
:subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to;
bh=9FoPPyZXh48zUhjz0K7ZmNXk3NCW+1EH6zXuwMWdtUo=;
b=uExMkYM6eQOvJOYHwCCsthFkZsl/Sxzkhe6IbceMjj4fSbRPtGqpDDYEjEsknr+MET
me0Q2Yn6MA/oSMBzmUjn3rwyvChN9Bd6ypLAO364M9mqZjdVXrIGFj06s2J4gJsg56Wl
2wbTxRsQEoGG8AU89DRzEsKvmDNlJUMxValn1VGq6ZIl09kpMElDaajapG3P6v9mXh9d
lzve3IsIwqzNfZdXyZwPdxdLOYOpsKwshI0mrJml0f14pXIfbdbvuUFOWUxiNp8y9EHL
OLR6v4DECsf1p/6OfuCBSIjv1/cH074Bt++34hlEGrxYT8J4c9ZbMurOBcWWCFGvp5Gq
zjOg==
X-Forwarded-Encrypted: i=1; AJvYcCVK0e7skpzin8PeeWs6/Ydf1UAiQCN7Z4MbL8YBcv7pdjN05TSB2RSh1fEVXp0oCNM2XnXccTBcOEDs1bk=@vger.kernel.org
X-Gm-Message-State: AOJu0YwoC1SK9AcgRV51wLiNGe0tMKP2qSBwu5vTRSkrZ41IL0RdeKIZ
0zsbLonJwxtvCQmQ11kPmPXZyaOU4rajrp82rig9B8U9RNmdQQmYDvlE69O97t5Q0qw=
X-Gm-Gg: ASbGncv9Sxg2V86L2eauP1O5vwlzbz6XYoc5EfVXSJ67iMoW+jfKheHbJ2Ug0pGNZCj
lC09veAtEpK/mhFZMhIkFTPJu03rMbZWE0g0tGNKk8lqNPsRcvVSg2ax+stIowVpHzjUs0a9Rnz
hCmOhBNXCknqeezf157x33O+/3qP5Kh1mDpQX6a3OjqcBs1ULc8OKQGnoRwTMkQ9yEvcRFWbNX9
zNib5OWxWIAvWAv3i6V4L57QhDE1y7ECWHtnogSgoAyoJ11xspP6a6TTicWY/2GnMosK3TP1LL7
44AgNtvx6VWouPvuxSBDvwXKEM8JfPAlyE/U8L8aYoKJ77Vo
X-Google-Smtp-Source: AGHT+IGwF9eqMWG6go6awjyG5qynWmhDup7h3GdgJcJVmsx6gfF7MJu3xHvCKuQq4UMz9D9H9ckNww==
X-Received: by 2002:a5d:45cc:0:b0:3a5:24cc:6d5e with SMTP id ffacd0b85a97d-3a524cc711amr548854f8f.3.1749043285998;
Wed, 04 Jun 2025 06:21:25 -0700 (PDT)
Received: from localhost ([2a02:8071:6401:180:da11:6260:39d6:12c])
by smtp.gmail.com with UTF8SMTPSA id ffacd0b85a97d-3a4f00972e8sm22115596f8f.67.2025.06.04.06.21.24
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 06:21:25 -0700 (PDT)
Date: Wed, 4 Jun 2025 09:21:21 -0400
From: Johannes Weiner <hannes@xxxxxxxxxxx>
To: Matthew Wilcox <willy@xxxxxxxxxxxxx>
Cc: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
Shakeel Butt <shakeel.butt@xxxxxxxxx>,
"Liam R . Howlett" <Liam.Howlett@xxxxxxxxxx>,
David Hildenbrand <david@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>, Jann Horn <jannh@xxxxxxxxxx>,
Arnd Bergmann <arnd@xxxxxxxx>,
Christian Brauner <brauner@xxxxxxxxxx>,
SeongJae Park <sj@xxxxxxxxxx>, Usama Arif <usamaarif642@xxxxxxxxx>,
Mike Rapoport <rppt@xxxxxxxxxx>, Barry Song <21cnbao@xxxxxxxxx>,
linux-mm@xxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-api@xxxxxxxxxxxxxxx,
Pedro Falcato <pfalcato@xxxxxxx>
Subject: Re: [DISCUSSION] proposed mctl() API
Message-ID: <20250604132121.GC1431@xxxxxxxxxxx>
References: <85778a76-7dc8-4ea8-8827-acb45f74ee05@lucifer.local>
<aDh9LtSLCiTLjg2X@xxxxxxxxxxxxxxxxxxxx>
<20250529211423.GA1271329@xxxxxxxxxxx>
<aD3nFMS9kWHp7a4F@xxxxxxxxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <aD3nFMS9kWHp7a4F@xxxxxxxxxxxxxxxxxxxx>
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Mon, Jun 02, 2025 at 07:01:56PM +0100, Matthew Wilcox wrote:
On Thu, May 29, 2025 at 05:14:23PM -0400, Johannes Weiner wrote:
> On Thu, May 29, 2025 at 04:28:46PM +0100, Matthew Wilcox wrote:
> > Barry's problem is that we're all nervous about possibly regressing
> > performance on some unknown workloads. Just try Barry's proposal, see
> > if anyone actually compains or if we're just afraid of our own shadows.
>
> I actually explained why I think this is a terrible idea. But okay, I
> tried the patch anyway.
Sorry, I must've missed that one ;-(
Apologies for my tone. The discussion is spread out over too many
threads...
> This is 'git log' on a hot kernel repo after a large IO stream:
>
> VANILLA BARRY
> Real time 49.93 ( +0.00%) 60.36 ( +20.48%)
> User time 32.10 ( +0.00%) 32.09 ( -0.04%)
> System time 14.41 ( +0.00%) 14.64 ( +1.50%)
> pgmajfault 9227.00 ( +0.00%) 18390.00 ( +99.30%)
> workingset_refault_file 184.00 ( +0.00%) 236899.00 (+127954.05%)
>
> Clearly we can't generally ignore page cache hits just because the
> mmaps() are intermittent.
>
> The whole point is to cache across processes and their various
> apertures into a common, long-lived filesystem space.
>
> Barry knows something about the relationship between certain processes
> and certain files that he could exploit with MADV_COLD-on-exit
> semantics. But that's not something the kernel can safely assume. Not
> without defeating the page cache for an entire class of file accesses.
So what about distinguishing between exited-normally processes (ie git
log) vs killed-by-oom processes (ie Barry's usecase)? Update the
referenced bit in the first case and not the second?
In cloud environments, it's common to restart a workload immediately
after an OOM kill.
The hosts tend to handle a fairly dynamic mix of batch jobs and
semi-predictable user request load, all while also trying to target
decent average host utilization. Adapting to external load peaks is
laggy (spawning new workers, rebalancing).
In such setups, OOM conditions are generally assumed to be highly
transient. And quick restarts are important to avoid cascading
failures in the worker pool during load peaks.
So I don't think OOM is a good universal signal that the workload is
gone and the memory is cold.
Return-Path: <linux-kernel+bounces-673258-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 6BE8E41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:21:49 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 9336016827F
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:21:50 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 3C1F228FAB6;
Wed, 4 Jun 2025 13:21:34 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="sU5LoTKE";
dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="G+VFtrHZ"
Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 757CC28FA90;
Wed, 4 Jun 2025 13:21:31 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749043293; cv=fail; b=GfKL20bJ4125XJJV+InPkOJBd+QGDOWbJAbvQAwx9iXGHloXdYT/FrKdS7XT7FXJcm5BzxKQt8+lWrzEH6U+ebQPpa88gYAHdQRAcfQwQIfDuzKnzgyG8DfhrbnhU++5Xabc5uOf1IE82pX1rw37zFiQpLd9d7QAz8jNdOHR4pA=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749043293; c=relaxed/simple;
bh=KkmSFiCTgenWevT8VxkpVlwEtwV3eCQXfFr4f7DM2hU=;
h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To:
Content-Type:MIME-Version; b=oD7lY9f6DkxZMfdzwaJJJQejMrDqgnGXyXtCxuUiWDg1WtCj+PiDznOMHhd7dyfKhRiyE94NSqp+qwN3JGsv3LcrCWgyXA9YBtgghrWgtnVpBWws+QnMkfeqmht99GrvoEczh6Ea8U+h/nopZW+YDufWqXCnGqzdxQ7mVgb/HZw=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=sU5LoTKE; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=G+VFtrHZ; arc=fail smtp.client-ip=205.220.177.32
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com
Received: from pps.filterd (m0333520.ppops.net [127.0.0.1])
by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5549MddY025560;
Wed, 4 Jun 2025 13:21:06 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc
:content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=
corp-2025-04-25; bh=KkmSFiCTgenWevT8VxkpVlwEtwV3eCQXfFr4f7DM2hU=; b=
sU5LoTKEw9PN9UAlfNSQ15AmCpylys3MuCnlJwo6uJ4ML/IHQ0Tnde9R6FCSScjK
NA1syQrE8BR8comFOr4rBJRK1aKG9+WbLx4ps08j3y2QU3ZJRQMA+nJ/AM85h0TJ
HcZ5Adw0UVnKH6zzDhI1Ga2DGg5+qv4m2kilSVKgwWS0tpmv/UFk7ZEzv51y3V3O
yWJXCNrG/+0O3sQRpb+pATzljewBb66+OoG6ZuoHmFbwa5Xpr6qJkbtpA2gViLml
Ggr04xaj2fr1v2sf3gg1fjj2pgYuZHN2qQfsOKJYGV4uHtKgRJpPh3JL6C7nugYm
LZR20rSXqzDL8SG+hkBgZg==
Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20])
by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 471gahc264-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 04 Jun 2025 13:21:06 +0000 (GMT)
Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1])
by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 554Bh7Fi030694;
Wed, 4 Jun 2025 13:21:05 GMT
Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10on2049.outbound.protection.outlook.com [40.107.92.49])
by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 46yr7arhhf-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 04 Jun 2025 13:21:05 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=KW12k67BAgGpAx6BvomfZHIbPfRoBpp3yfXCiBrqFt8o49ZakomgfAfGQjk0lSGgwWwSuHymizZXjB8zfILXCU9fqRhx/nGI2wq6v8TqwImJNyNfCOrON8dD5TOy5lQxtFFc1eopsZAmOAmGbhHE3uY089BFLILMV7pAy9/7/vS280S4+rppd/qhJgE2nrztZs1v2CduHDmIbUMjDjNpfOaCtI1X281qeRG0noJUlb+h9d1vyss7gO2x/g45AR+ZgR1aE5w6csChJLTd6qZD/jkkXDp9OIi3eZu966fater0JIZ2ka0SI6wjix0dad4kTDQZmi9/m9LRBjcs0QVFxA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=KkmSFiCTgenWevT8VxkpVlwEtwV3eCQXfFr4f7DM2hU=;
b=yI0IueQHIrIHFHEpQzV+qkx4UzGVpmVa33l5/5uaqV6ta+23Z8zxEwycJRtbj194BbXJLpLpuLIAwBs2SRu+Uep9qQjaAKjkidNzt0SSVbk9iMTXcoE6as30IbX77v+b9R8rjLX2ySdoMoh29rtr0fEvQXA7lT0L6owwGup5Px5G2OhBFvfA1dT/szoaReXuc2xfTxwzASvIRl6GwqGqBskJXhg69HbwfIzX1l9BB9pAr4wbCazPQYNLmJ0SIkYFEL131s5zTjGNr/fHIM99gD/em7eBKIC283GWwVuu1iOblUn48OHKiR2f1HBpcGjCrP7hVgIew8epsFQztbTCiw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com;
dkim=pass header.d=oracle.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=KkmSFiCTgenWevT8VxkpVlwEtwV3eCQXfFr4f7DM2hU=;
b=G+VFtrHZlhb5c9xJH0rWBY2uZjQQ8TQs8akQl17v1jtfOChb04yvAPgQrjfWkfc2H9GBqI7K7jfPwsXwvOjeCZO7/PWAGDi3ZPcsKL2auwTVUKoHMB4y5mF/xQ9y5wfj7xCc3cix1tz8MjyfSCSZga9TibKjUnbrv74LlSDpt6U=
Received: from DS7PR10MB5328.namprd10.prod.outlook.com (2603:10b6:5:3a6::12)
by PH7PR10MB7012.namprd10.prod.outlook.com (2603:10b6:510:272::16) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8746.40; Wed, 4 Jun
2025 13:21:02 +0000
Received: from DS7PR10MB5328.namprd10.prod.outlook.com
([fe80::ea13:c6c1:9956:b29c]) by DS7PR10MB5328.namprd10.prod.outlook.com
([fe80::ea13:c6c1:9956:b29c%2]) with mapi id 15.20.8792.034; Wed, 4 Jun 2025
13:21:02 +0000
Message-ID: <615e0c5d-b516-49cd-907b-5b14dbeefb1c@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 18:50:50 +0530
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH hyperv-next v3 01/15] Documentation: hyperv: Confidential
VMBus
To: Roman Kisel <romank@xxxxxxxxxxxxxxxxxxx>, arnd@xxxxxxxx, bp@xxxxxxxxx,
corbet@xxxxxxx, dave.hansen@xxxxxxxxxxxxxxx, decui@xxxxxxxxxxxxx,
haiyangz@xxxxxxxxxxxxx, hpa@xxxxxxxxx, kys@xxxxxxxxxxxxx,
mingo@xxxxxxxxxx, mhklinux@xxxxxxxxxxx, tglx@xxxxxxxxxxxxx,
wei.liu@xxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx,
linux-doc@xxxxxxxxxxxxxxx, linux-hyperv@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, x86@xxxxxxxxxx
Cc: apais@xxxxxxxxxxxxx, benhill@xxxxxxxxxxxxx, bperkins@xxxxxxxxxxxxx,
sunilmut@xxxxxxxxxxxxx
References: <20250604004341.7194-1-romank@xxxxxxxxxxxxxxxxxxx>
<20250604004341.7194-2-romank@xxxxxxxxxxxxxxxxxxx>
Content-Language: en-US
From: ALOK TIWARI <alok.a.tiwari@xxxxxxxxxx>
In-Reply-To: <20250604004341.7194-2-romank@xxxxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-ClientProxiedBy: SI2P153CA0008.APCP153.PROD.OUTLOOK.COM
(2603:1096:4:140::19) To DS7PR10MB5328.namprd10.prod.outlook.com
(2603:10b6:5:3a6::12)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: DS7PR10MB5328:EE_|PH7PR10MB7012:EE_
X-MS-Office365-Filtering-Correlation-Id: 5294aee6-cebc-4496-8e37-08dda36aa72a
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam:
BCL:0;ARA:13230040|366016|7416014|376014|1800799024|921020;
X-Microsoft-Antispam-Message-Info:
=?utf-8?B?bGptUTQ4VElCMkZLQlJDWU5wUjJuQkdKbEVOYWZoS0dtSjhoaFZDOW1UeVFP?=
=?utf-8?B?TU9EZ1BsallTcnlTUVAyNW1vWis2Y1hCamwwRS9QYldSTnV4aHBaWDhFYnhE?=
=?utf-8?B?SnBUekdvS0RWKy82aTBzZ0NMVzNuZmRGanA2aEdyUU15YWZVSVVQR0h1S1FH?=
=?utf-8?B?dmlPbFE5S1BOazVURGppWVNuZ0tsUmJXSnRpVlgvYmUxK2NRQTJlOHNzMjlU?=
=?utf-8?B?MUdHakdOMExnRWdtdE1nYm1aVCszOTFobThTeENYcm1lYnVNcXZJTHNITUZz?=
=?utf-8?B?Q1RHazBnNjBTcTRXMVBaQ0pOQ0hReHYwckhjN2gyZ1ZTTFZCb3I3Q1dqNWtX?=
=?utf-8?B?SytwcTlYTWYzVWxRZGl3UFdkV3I5Yi9DNkRvWGRzaUhyTEp2Z01mSmNJUVJG?=
=?utf-8?B?dkZRVHI4b0Vlbzg4RDlLZVJFVUFnL2dFaC8yM2xtN1VUcm9WbWc4WmNidGps?=
=?utf-8?B?WVIrL2J6MThxb1p6Nk1FWUZQRWtEM3F5NTY2Vi8zZ0NZUHh2aUx0UStLS1Z6?=
=?utf-8?B?cE5SS2pLWEp3NlNQQU9KNE02RlJqSXk2ZnNRdWNydDY3WTkweVlDcDBDdWdi?=
=?utf-8?B?RGJ5WDBCNzIwU1pSdXZHeFhSQ282SndienVQaGZ0Z0hYQmV4eUVHVzYwMkVl?=
=?utf-8?B?U3Fod0dmKzJOVFZjYmxKWDEvdEI4bUJEV1VaZEk3WlE4OFBxTVgydnZMT0lK?=
=?utf-8?B?TTZXd1FMZFIzTkdFcnplVGdXc0J2MW03ZG5XUEZ0NE1jNi82Sm9EWnZjWXFP?=
=?utf-8?B?bDRBWGJXbUIxQkgybll3N3B4STNPanJiVENVRUpjNW0yNG1vVktQeHVLc2VP?=
=?utf-8?B?cktSbzVCcC82SVByRGx0T25QNHJnZUh5OXkwdEJHUmVodUpHQXBmeGt3VGpS?=
=?utf-8?B?VktvaThrb3Y0MFdwVXJuTmNBT3dpYmFKZmFyY2Q0N3ZKOXRFcktEYkVWc0g3?=
=?utf-8?B?Sk9tT2ZKaWFhWU5CVVc4VjZZZ2g4YmNNelljMWlqWnFJaklnSWZNTXlXUUFQ?=
=?utf-8?B?cjNHdVl6YzdETlJ4TWRJS0xnN3lNMnl6VnIzbXl6c1BtYWk4Y1YvdERZWFcv?=
=?utf-8?B?OFh0bUpzRHhDOS9IbE9rdE5TdDY4MGpuZ1drak91Q2YzL3RXbkp4a2lyN1Ji?=
=?utf-8?B?c2tUN3A4TG5aTGZ2SytoRlI4Sm1LSEJobFBFSEN4MzB6Rlp0M3lhVzZzQzlH?=
=?utf-8?B?RXdMbHRjNi9UbEhSWGcrQ0NWQUQ0WFFzc1RhRHdReTNvNXVSVXVhNDRLeFhx?=
=?utf-8?B?NmI0YlJyOGJFS3V5b3NrZnJ1ZTJCOVh4VVp0K3F4cURxM056NW9VWkFqc1JS?=
=?utf-8?B?ZFoyYm5EaCtjRGhWbjVyYUVUSG5WMG1KZzZHeThNN1VUOTlTZzFURjZCc2U0?=
=?utf-8?B?aWdNeEo0RUwxbGNJdW1XTFNLeTZCdlhTRjRFYXNVZ2RCcnZkbWVuYnJBQk1B?=
=?utf-8?B?dUZoYS8wdmJBZUVIRkFsWGNUSEp3WC9Qc0lOSFZsYWpaWXc0aHNwTzVjY3My?=
=?utf-8?B?anFRdCtBVnRlRGd4RVhkaTl1M0doZGlVcWtjRDFiZzM2RmpXMHdhbTloSUFS?=
=?utf-8?B?ay9PVjIyUU9Jb2RTTUVoRDcxZUZjeWdCVDhpOGpYRjZKZTFudG5YQmVYSFZm?=
=?utf-8?B?OGVWYVZEOXhUemdSVjk2Y1NsSTZHeEFONnVGbE1NL20yb0Y0VTB0SkNEeEla?=
=?utf-8?B?bnRUS29jZTVQdWx6c0Y5M251RU1mdTZwRG8rWjhLMkpFTGRaK0t5MEFHRDJy?=
=?utf-8?B?OFNWWkh2a24rZGNEdENQR0lxNE5SSlFlS0s4dFZBeEY2RlRNdk12UFh0OTBJ?=
=?utf-8?B?UW5KVGI5U3NpRGpTUjhoV1VwTE56YXJySlJxNVRIRWxUajdrSWJEZHQxMHI3?=
=?utf-8?B?RXg3OGZ3cHhyNFkzeVZpSlJ6MWVZbldUaHA0b003Z3JEZ21IS0NLeUU4MHY2?=
=?utf-8?B?TkswRm9tWGFmTWZSSnNBa0Ztdi9ta3pDVyt6SUF2OGwwb1JPTkx3YTRQdVdL?=
=?utf-8?B?d3FnNVVjOGJnPT0=?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR10MB5328.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(7416014)(376014)(1800799024)(921020);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?utf-8?B?dXFoelF4ZmRYOHNOWmJSek0rRFlTakNFeVNEOWRIT1QvVGN6cE1ZUlE2bFNp?=
=?utf-8?B?cTZoTjhtV0Z5UmZQeGJpNWpuR1BXZ2M0RFVMS3Z6dXJhVlF3WDJqSlE0TTJ5?=
=?utf-8?B?QkdjMkNXU0F1ajR2TXhoWkQxSVJLNEJLcitWWlFkbkZBUHJCM3N6Rnp3cXN6?=
=?utf-8?B?MTdLWVZBaG95eForZmxXYnpWOVNKMko4VkZxK1pFU3d4TnlncWcyQWhRUnRq?=
=?utf-8?B?VnhEdVlRbVROQ3BOdUhqVWs2SFVhYjN1U3RrTjdiblhEOWdKQjVFUmRyTFBT?=
=?utf-8?B?dWhidHIyWkV4WkZqQ0dDbzFHbDhjMDhHOG5aMTIxL250WnZyWWE5eDhiczRG?=
=?utf-8?B?NDliUlVBOVdtV1pxQWloWkhDbUdKZlFDWEhLdENRcWtoL3piUlU1MlNaZk5U?=
=?utf-8?B?WWZVQzlnSXJ3eFNFYXUrKzZpMjBkS2pJeWZNTzZsc2ZmOVJCdlZCVnZ6U1l4?=
=?utf-8?B?MTVyblBRRnM0d1VsS3RWMy9HdFo3TDRtajh5SVVZN0JVOCtKTncyL25mRXd4?=
=?utf-8?B?dHJ5VVlBME9GRGhCRkl0K1Y2NGJEY2hkL3BGOEduVzNUeGdhK2Mwb2VTWTFp?=
=?utf-8?B?eCtjb0V2ZE11UjFsOUlHY3VoZjd3RlNBRU44UW9UN2kwbVNJR0hOVTI0TVgw?=
=?utf-8?B?bmVpSHlNWVBhY0xpbjkySkpKYU1MQUZveWgwS2RJUkJYZUo5dk5VbUtCNndJ?=
=?utf-8?B?eTBLeGRMc1hJaERlbDM1K2J2ZWZ6VmJ4UExFTVNyMlVsNExsSXNXSER5SEtG?=
=?utf-8?B?SHVXNkMzTVRERVZmTGY4eDZkQ05Yc3RBYURZRytvbXRLWndxQ2lJS1d5NWJT?=
=?utf-8?B?YjZqYmJ0N1dXclM3UlN5dnM0eE1mdGw2bGZYdXJpRXZ5RlF6THBzTkUzTk1T?=
=?utf-8?B?eFM4OEFkV2VDa2NyU2dRRGtVbkR0aDFuSEJHL2lZZFNIcVRHMndNL2R0eFMz?=
=?utf-8?B?UVhrWUxOSHh3UHdQcFQ2MGNqaXF5TXA5UWI4M20yMktNM1BldnBwV2tJZi9K?=
=?utf-8?B?a0Z1K0NnNlZBWnNobVJaVSsyL3l0anRpWlVyT0w2SUJuZmFDcFNFSFNQVUJx?=
=?utf-8?B?WElIdnNzVVA4SkN1R2lKb1RwNk5EYm5MZGE4cGJMa3NUd3F5NXpBZWZsUi9m?=
=?utf-8?B?LzBUV0cyMFFLZ0lXYVNlR3YrTmp0V3hodnduUityenVpOS91dWh1MFhIRDFw?=
=?utf-8?B?OXl0ZGdSRG1uZXVpZ2d3c3ZqdktsTEZiaVB0eW9GZkRIMzRydGhmRCtMbEky?=
=?utf-8?B?ckFCSGhwajUwTjZQM3BPUzY4VnlvdXk5NkFITDlBelFnTW1EckRvWnlXSGRR?=
=?utf-8?B?OENHa1NKUWJYS1IzUWw4a0dNN2xxU3hDZUFDU2IzZFdKVTFPY1BLYW5sQldp?=
=?utf-8?B?dGFnUE5CZXlCeVVVSE1jdE9qWnU5SEZJb2pFK3J0R3RaMkhUcUpJUERKQkpq?=
=?utf-8?B?eUcrblFoZnBRZUFhV3dCdmRvdUsxcGVhYWJxcjE1cmFJYS9PUWpGSW1ja1My?=
=?utf-8?B?MlNLYlNXTmk0OEhuQTZmT2lPbjBkbFNMdXdKY21BeXBKYlhPWVdOdjhQR2RY?=
=?utf-8?B?MWQvMWVLdjNJb0VoeFRpQzVIL21YaEY1RkhiTk1nZ0JyUnF5Sjl5RFFHODBw?=
=?utf-8?B?TlNXZWVUZks4eENBaFcvbi9hQ1NVbHpsSUpJZGVRUHlmY0puU0NhY2pIdWpJ?=
=?utf-8?B?Szh6Q09kR1Jhcm1MUlFoS0cvcnNLSVJsS0xTUFdRT0cyTXA1cWVkb1hnVnkr?=
=?utf-8?B?WFo5UFQxMjFwYVZQbVdCY2hPRldHalpFVEtmSjhsSkhXNEF4eVRrQi8zYUVN?=
=?utf-8?B?ODF5U3NOd1JldWpvOW1RSm9BUDNndjROVnhZcE15Mk8zSis1WHBnaVBMcXl0?=
=?utf-8?B?eXo4aWhSQ1d2eDh0WStxaThtbnd2aHVYV2d6UkpzclpJQ2xGRG01bWdlNkFi?=
=?utf-8?B?d2g5OFY3QXBlVHNzRkJzZ09LUW45NGJ2Y2lsNHlOU0VrK3FyaGxWZVZCWlFh?=
=?utf-8?B?TTFnQkVnbndRSmxwL0d2QTJjVE81eVdpZHczbDBFMnY0WVlPYXY2ODlodVdp?=
=?utf-8?B?b21xbkkrUmZqTmRhTzRvRi9xVlZxclpDYjRTZHZldE5SR1RhcUdSZU15RUNY?=
=?utf-8?B?SjBSTUVRRGFyNnR4d3M4TjRSNTR3TXVNdDRGZkJZQ0dHOEl3VFF6aVFVTDBX?=
=?utf-8?B?V2c9PQ==?=
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0:
EGKLkahqzm9saxhDRdPMX9l5AGp/6PL+hti9GcZrEEJ9Vri8px7rU71YfZKOwdtBf7VLQX8KZklVXjHA4TZ76H9EXnfFNV41P3Dcwtb1L7i0TWokVrRhYwRrmRwVmA5pI1mxi2MGJ9knjbJ+ERit5gjNST+To8QrgnhqMyQN1FKYcOW3zhotZCy5/tuyVs1Jjb5vmKt0K5SH6jmBAMayuRft0JuLCGEWrkHDbvPyWFK6aJOksZ9BxrXs2/JYdOff1heeeRnAiRUBvJEwsCd3cKPkn+ojQAQFlzf7p1gJSxkAYtXUNaQ5iqpNtdpkWDMjwhY4JPAa5t3bic2IBDu4iTCoG4BlnwqDzxjf3ab11aZPhl/QrVWrRrFJYZGULqApx1tRC//AnYlkm6nV2te46bcLjva0hJEktRRLhAcHa9R9LXyUsFx1JmTR6MOxPN4E1k712y83+fUsknM7ceF/kYk0wQSLBMmvS62HZKpRJPq1xYeydpb4uVUL5v03lIeN/DMXfbJCqTzm5quJi7vfx11hMzFAEm2R1Eygvu5UD5mGKXKOTI7DgWG7he4kyxjxMcEINVOsQhe/v9QL6jOzi+xaq5vSYo2Vea1p7O2VNuU=
X-OriginatorOrg: oracle.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 5294aee6-cebc-4496-8e37-08dda36aa72a
X-MS-Exchange-CrossTenant-AuthSource: DS7PR10MB5328.namprd10.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 13:21:02.6473
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: oPd47JerjbHRW9HndBfvQKQBsiGc2Hl6AFIv36LxgkDRAYvunddhdaetYzsqhJIThgGHasL7HK9RArDKLW4q6/m5S5o0oY51Fnfy8W31cg4=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB7012
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 malwarescore=0
suspectscore=0 phishscore=0 adultscore=0 spamscore=0 mlxlogscore=999
mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1
engine=8.12.0-2505160000 definitions=main-2506040101
X-Authority-Analysis: v=2.4 cv=aqqyCTZV c=1 sm=1 tr=0 ts=68404842 b=1 cx=c_pps a=e1sVV491RgrpLwSTMOnk8w==:117 a=e1sVV491RgrpLwSTMOnk8w==:17 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19
a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10 a=GoEa3M9JfhUA:10 a=qq2Dt-ZFRj5JlzehINwA:9 a=QEXdDO2ut3YA:10 cc=ntf awl=host:14714
X-Proofpoint-GUID: T0SYQjVTo2m6lTFtEUETnqSQKJj_oOw-
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDEwMSBTYWx0ZWRfX8kUEwu1Dwu3I OMyCOoK6+elXW6p3epPmb8yWF0D1K/IfvqxUdbvzLcIQ7C51wqsyC0kbfZg6NrnykT4PhkD3SBB CRj4pkJcC4oBojK+d/3Y5pPv7+0sx+x+k3nCifsnagBXm7WeIpQThGHYI6EyLjCCP2ZFWRo217C
Jx33zH2PUMd8ylj+sTgH3/ph5VBYOJYBomxF6UeVgzZaKmuMyXC57gNQotaMWiVV4QLLpB3Mk8W TnAiaNIIOifkQFTalt0PxUH859lxUACJ7+YPodIBxqZ7x1YbbSRbTi7Tom06VGJpZ9TSa6K7E08 8wymSBSltXRm2fWbfktm21xHUb1zOM0WSP9hJo9ArfoURHbmjxWZZ/muV07GHRJs14hzblgSZaO
upyFOx9C/F59ayqo3pVwDlGdMNg6z1PrytDVzzPncr40knDpgtDBcWM6JIJbZM6VRzNXduJI
X-Proofpoint-ORIG-GUID: T0SYQjVTo2m6lTFtEUETnqSQKJj_oOw-
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 04-06-2025 06:13, Roman Kisel wrote:
+Confidential VMBus is an extension of Confidential Computing (CoCo) VMs
+(a.k.a. "Isolated" VMs in Hyper-V terminology). Without Confidential VMBus,
+guest VMBus device drivers (the "VSC"s in VMBus terminology) communicate
+with VMBus servers (the VSPs) running on the Hyper-V host. The
+communication must be through memory that has been decrypted so the
+host can access it. With Confidential VMBus, one or more of the VSPs reside
+in the trusted paravisor layer in the guest VM. Since the paravisor layer also
+operates in encrypted memory, the memory used for communication with
+such VSPs does not need to be decrypted and thereby exposed to the
+Hyper-V host. The paravisor is responsible for communicating securely
+with the Hyper-V host as necessary. In some cases (e.g. time synchonization,
Typo synchonization -> synchronization
+key-value pairs exchange) the unencrypted data doesn't need to be communicated
+with the host at all, and a conventional VMBus connection suffices.
Thanks,
Alok
Return-Path: <linux-kernel+bounces-673259-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id D354241E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:22:04 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 5E538189A3EA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:22:16 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 53C5F28FA83;
Wed, 4 Jun 2025 13:21:54 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="SNlwsKKX"
Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id B2C7728F937
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:21:51 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749043313; cv=none; b=IW4is6FGADNxpy4eLiJmduQzEF4LMXJnbyHfJ5G4X+/Ce6W4CJbjkSeBxLpnOcue0p3apiKxbAYoY0kp8FKaeW/OLMG+o9q4HIvrnigdLYpJTXWAZfqvn3vxivRNmBOY30Gm8RUKBnhoPUbUmBoaI4WLwmIhaWEeAAKVRE+X0V0=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749043313; c=relaxed/simple;
bh=Z1tbkPEjU7vxBp838sB95jmERxuwrYr3hyTQmVluvOg=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=trkD+ECgJcHIqZrcvZE3oggBIJ/DEM9itqXNaJ1kXxcJV7WPBPRavXM+KzUYXIVCxQh6rhuzo1v2F5NNa2pT6fOb8H5wlbCANq9bdpvorIxDp/1F8oahCMEI1npeP4IFY259g8xx3IGT70WDwbABItsY7t1Xcb7dFG7wd7PKc+U=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=SNlwsKKX; arc=none smtp.client-ip=205.220.180.131
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com
Received: from pps.filterd (m0279872.ppops.net [127.0.0.1])
by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5547YvLs000679
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:21:50 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h=
cc:content-type:date:from:in-reply-to:message-id:mime-version
:references:subject:to; s=qcppdkim1; bh=XdjpFZHO8pEeHGXIBs/kB9C9
YUntjyLrTqtUkQARpak=; b=SNlwsKKXsjrPqZ658617XENwZYli5fvwViFzCYUr
gM6lv+yzDhkmTAMK+K1BaIdOVBnm6S8zrM33TylwY/u+4G28m6Vlk9jdSPK5oXZ3
UD32EydJ71nEjo8YauNb7Klfmt+x21yFpNrD7ogbkZXquoTsoYxGzy5kVdNFK/PO
xf/7c87qP06DJPbwuku0H5lBzmYC1QMw4Xx/gg99ILmq26uP7t3dxSXNO6QVWvio
B5+41y0Bj1TCIzb2Y+bkSFewQoDotyhvMwo9Xh6Lb5R/vnA2HwwaAvDkWyu055Km
6Hj9gjhnaadhy0sE8bdd9zpaLsY/ZAiPAlJWVfMkMaafqA==
Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197])
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 471g8q6607-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT)
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 13:21:50 +0000 (GMT)
Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-7d2107d6b30so295224385a.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 06:21:50 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749043309; x=1749648109;
h=in-reply-to:content-disposition:mime-version:references:message-id
:subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to;
bh=XdjpFZHO8pEeHGXIBs/kB9C9YUntjyLrTqtUkQARpak=;
b=ZfFjU8TICcLtC1Gn8hY4XZV+yJmZeLkNLTjvjkVsQFgQbmoUuBxMBpUbWGyHd8/XCI
ihhQSlT4+YPktyQ8cR7EFY5X+RWb4CL177NBF1DtrG1RNuXuFvPmrswEcO2ihct6DFXi
ALKUX86bBi3OceRB9AmwwXyX6NHR9qPVemVNVms4F+Rq3hBMGXddim0dUdni1NpvBH+U
iVw0i/K9xQm4QDHD9vODkFo7JViT4ijEZnrqa5apW3EjuTAPs2/u1iYDhPzHe5HZvLrV
2xHF60KBVygyyCWoxIgaUW54eC8kgVoRXUNyYbFWM+NGcQUt+sLrwtchoZSQibsU5gNq
Mk6w==
X-Forwarded-Encrypted: i=1; AJvYcCUkxYcWjSkwnR8QxO++XybMSW8VuIT9npiq7yiMpYvaYtTNoD7kjU3xCb+KXEzmyOfIrwOQRfhMp0YXjTM=@vger.kernel.org
X-Gm-Message-State: AOJu0Yw0xjSd6kXE/XnDS17fzbGdQcx6PFmgLH0Za5hIb6LtJAZugA14
TRABLqk0snp6S55BXKJjCXJkx26VreIKCO/g+Y+uLFtE4DybY2RX3JiSC1+QuE8wzPcKAVcXhTW
VostKwFTatjFMj+Q21pfr33qYvKVY2Tt5vBWvocreHRRNVG1rICbc9FaEBKGBfblo4Kw=
X-Gm-Gg: ASbGnctl7+fUPOGU2dQ/I1JUG53KI4Pret3/rveXNh7FtKsLVuVZ3Hhlyi+G1DFphP4
jo0XCproTikfOWFqUFIzyLhwQHVof2u2+Rw5KlelvhvLXTxW+zQMp79p6tKCVkEkGlXqMMHW96+
nEBfhm1Nm8utV0AfM40mD/kiEJpEdIGsizwCIV5Uv8+UkqOb9R+/mvvv182PodnZOBI/il9r5mV
3gUFswnGJSAipm6jYH3WwLBoeHLKmXyGApf275DnIvijUHWXwt6Vyt/o0bUWzCaBaGWmpT5sQY1
ogXuJIujlpYCU1aV2A0DU5uf8lJbRmMmZF+yKuammfpgTcfZcSQgu3SttHJhjmpic0Tnjyszb3Y
=
X-Received: by 2002:a05:620a:17a6:b0:7cc:7704:bf87 with SMTP id af79cd13be357-7d21a8cc5f5mr330786385a.42.1749043309608;
Wed, 04 Jun 2025 06:21:49 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IEaF4yXH3QHGrC86KV384wdHehXheVmFfGi0pAVLSi1rxL4Rab2eJh8WFfbXpmmmsGjs+MfaQ==
X-Received: by 2002:a05:620a:17a6:b0:7cc:7704:bf87 with SMTP id af79cd13be357-7d21a8cc5f5mr330781385a.42.1749043309032;
Wed, 04 Jun 2025 06:21:49 -0700 (PDT)
Received: from eriador.lumag.spb.ru (2001-14ba-a0c3-3a00--7a1.rev.dnainternet.fi. [2001:14ba:a0c3:3a00::7a1])
by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-32a85b33c09sm21728751fa.27.2025.06.04.06.21.47
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 06:21:48 -0700 (PDT)
Date: Wed, 4 Jun 2025 16:21:46 +0300
From: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
To: Wasim Nazir <quic_wasimn@xxxxxxxxxxx>
Cc: Bjorn Andersson <andersson@xxxxxxxxxx>,
Konrad Dybcio <konradybcio@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>, linux-arm-msm@xxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
kernel@xxxxxxxxxxx, kernel@xxxxxxxxxxxxxxxx,
Pratyush Brahma <quic_pbrahma@xxxxxxxxxxx>,
Prakash Gupta <quic_guptap@xxxxxxxxxxx>
Subject: Re: [PATCH v9 2/4] arm64: dts: qcom: iq9: Introduce new memory map
for qcs9100/qcs9075
Message-ID: <q3hzryk4s7jd4kyavcg7s6d3oyzfpnjy4jhpeluvnikiglbeng@r4ydugwidgv7>
References: <20250530092850.631831-1-quic_wasimn@xxxxxxxxxxx>
<20250530092850.631831-3-quic_wasimn@xxxxxxxxxxx>
<ss3xhat6v3s4ivcypw6fqcmblqait56pqhzwuhzyfhevp4kzlr@5e3f5nwb6lhb>
<aEATe3pi1SsfZVI3@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <aEATe3pi1SsfZVI3@xxxxxxxxxxxxxxxxxxxxxxxxxx>
X-Proofpoint-GUID: j3xjxZtA_0xQc6Y9xCVzkHrKGKmJebMd
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDEwMSBTYWx0ZWRfX+U6uk6tKnnhg
MGZ/9Rj4OP5n1F0ZnuamB8uPbDjdxNfQSwxbYSBuLwLl7VCd0tObGVsEdLzVF011iVTLkuIfU4P
0DQrGw3FYFB5MG93VEq1RVRzcahXLvO8i73WJ6bPgkkPWszmZyP3sBNSO1j5sKKs3oC7vyy1m8X
6he266S+vZpGbUTcKSJ00U9pMzPDKAO+guaABHidL3DSRb/T8ZbIJSqcMFiQ9qsX7rQZ9be8ndz
FCq0p8g2917le7xN/rZ1h63J1iBXsCDKEuXkhDFjibMEfMrqN9zVTVgzUZU/iNw7I7rq6GfC9B8
TpuoNCUtdHgxtDIC8FFXPM3rtPv7jMxj8uk2DeruMJE/riVD3wTvzcmqpaaTaMGAfmAh2F/or/T
oUFnD4dcnENI/28CBWLGF2r6LuHiIdJq8/8csCwGR8l04ot1tZzzh7es+Tuadw+kfZBZFC0o
X-Proofpoint-ORIG-GUID: j3xjxZtA_0xQc6Y9xCVzkHrKGKmJebMd
X-Authority-Analysis: v=2.4 cv=PrmTbxM3 c=1 sm=1 tr=0 ts=6840486e cx=c_pps
a=50t2pK5VMbmlHzFWWp8p/g==:117 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10
a=6IFa9wvqVegA:10 a=COk6AnOGAAAA:8 a=dNdsqrdDsggF3qCCPzEA:9 a=CjuIK1q_8ugA:10
a=IoWCM6iH3mJn3m4BftBB:22 a=TjNXssC_j7lpFel5tvFf:22
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
phishscore=0 priorityscore=1501 mlxlogscore=999 mlxscore=0 lowpriorityscore=0
impostorscore=0 malwarescore=0 spamscore=0 clxscore=1015 adultscore=0
suspectscore=0 bulkscore=0 classifier=spam authscore=0 authtc=n/a authcc=
route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000
definitions=main-2506040101
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 03:05:55PM +0530, Wasim Nazir wrote:
On Mon, Jun 02, 2025 at 10:41:39AM -0500, Bjorn Andersson wrote:
> On Fri, May 30, 2025 at 02:58:45PM +0530, Wasim Nazir wrote:
> > From: Pratyush Brahma <quic_pbrahma@xxxxxxxxxxx>
> >
> > SA8775P has a memory map which caters to the auto specific requirements.
>
> I thought SA8775P was the IoT platform and SA8255P was the automotive
> one. Has this changed?
Both SA8775P & SA8255P is for auto but former one is non-SCMI based while
the later one is SCMI based chip.
Only IQ9 series of chips (QCS9100 & QCS9075) are for IOT.
>
> > QCS9100 & QCS9075 are its IOT variants (with marketing name as IQ9) which
> > inherit the memory map of SA8775P require a slightly different memory
> > map as compared to SA8775P auto parts.
> > This new memory map is applicable for all the IoT boards which inherit
> > the initial SA8775P memory map. This is not applicable for non-IoT
>
> Is there are platform out there that actually uses the "initial SA8775P
> memory map"?
Yes currently sa8775p-ride and sa8775p-ride-r3 are using initial memory
map.
>
> > boards.
> >
> > Some new carveouts (viz. gunyah_md and a few pil dtb carveouts) have been
> > introduced as part of firmware updates for IoT. The size and base address
> > have been updated for video PIL carveout compared to SA8775P since it is
> > being brought up for the first time on IoT boards. The base addresses
> > of the rest of the PIL carveouts have been updated to accommodate the
> > change in size of video since PIL regions are relocatable and their
> > functionality is not impacted due to this change. The size of camera
> > pil has also been increased without breaking any feature.
> >
> > The size of trusted apps carveout has also been reduced since it is
> > sufficient to meet IoT requirements. Also, audio_mdf_mem & tz_ffi_mem
> > carveout and its corresponding scm reference has been removed as these
> > are not required for IoT parts.
> >
> > Incorporate these changes in the updated memory map.
> >
> > Signed-off-by: Pratyush Brahma <quic_pbrahma@xxxxxxxxxxx>
> > Signed-off-by: Prakash Gupta <quic_guptap@xxxxxxxxxxx>
> > Signed-off-by: Wasim Nazir <quic_wasimn@xxxxxxxxxxx>
> > ---
> > .../boot/dts/qcom/iq9-reserved-memory.dtsi | 113 ++++++++++++++++++
> > 1 file changed, 113 insertions(+)
> > create mode 100644 arch/arm64/boot/dts/qcom/iq9-reserved-memory.dtsi
> >
> > diff --git a/arch/arm64/boot/dts/qcom/iq9-reserved-memory.dtsi b/arch/arm64/boot/dts/qcom/iq9-reserved-memory.dtsi
> > new file mode 100644
> > index 000000000000..ff2600eb5e3d
> > --- /dev/null
> > +++ b/arch/arm64/boot/dts/qcom/iq9-reserved-memory.dtsi
>
> The naming convention is <soc>-<something>.dtsi and I don't see any
> other uses of the "iq9" naming.
As this new memory map is common for IQ9 series of SoC (QCS9100 &
QCS9075), so we have used its common name.
IQ9 name is not known or visible outside of this commit.
Once the DT structure for QCS9100 is refactored, we would update this
common file there.
Can you refactor it first?
>
--
With best wishes
Dmitry
Return-Path: <linux-kernel+bounces-673260-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id A1CA441E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:22:48 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 9C7713A73E5
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:21:50 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id DEC2828FAB8;
Wed, 4 Jun 2025 13:21:58 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="1KcnaBqG"
Received: from mail-oa1-f41.google.com (mail-oa1-f41.google.com [209.85.160.41])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3351828FAA1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:21:55 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.41
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749043318; cv=none; b=KdoIAmuy4DaUxauPW1sLIW+Issx3gBzUKB0SSVbnhh4r46aw+lvWR/6kG9tGRvNF/0hoLFLg3OqowWf0ssalasDalZbAczDVmkJ1CXigyl0/Giey+xcu3+p8JGFO1UPg+1ef7jZllJc4PJ/b688AwNpkZRzW9lwG9pra4fQU9Ig=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749043318; c=relaxed/simple;
bh=dbA7qnY0vkNuQHcmJgwJbq1/AuyJ0mzf0CTGLPRhOVg=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=CbHynFKXTumm7ckp5EJ4sv0nqliNvLecQgp+Khfw5n4tNG0tRX+lRkcByAjoVLQ2GUGZPp4SE41nsTYaJxW2Fx4qKzJH5hs/GWobSThXcmWP4XuPdIzrr5enhCKofKkkYidpPuDXNsmoikg4VAp36mz1OdLBwZlQTbKsU0gsXwg=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=1KcnaBqG; arc=none smtp.client-ip=209.85.160.41
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com
Received: by mail-oa1-f41.google.com with SMTP id 586e51a60fabf-2e9192a03d4so3369221fac.3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 06:21:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1749043315; x=1749648115; darn=vger.kernel.org;
h=content-transfer-encoding:in-reply-to:from:content-language
:references:cc:to:subject:user-agent:mime-version:date:message-id
:from:to:cc:subject:date:message-id:reply-to;
bh=42EU1sJyYdG5F1cgKizvK41dUy6Q1Og1sjraWSNVWMs=;
b=1KcnaBqGQcNTorNWLkXd9T95VZ8JkAq0oRO1gVhebAS9n0Q9yAPa7SbZeYaqYP62PP
o1aXsVQaXv4WIZt+CWtm8sR/c/uFLUPhCOySGlaxyFZ0SBjN4jDQOtsNzA2Wy319qUqj
yx6TVh6ugoMnQjekJMeXvHFyZ8gL3PDmOFSxbVBDjCEYLph7JYYXqLMQkUDT8IVT82LN
+lYJetb7Lc/zj4G/H6eMtyNqVxFRcotm/WuAmgg6SA56XgHCyMkwgDTEJ143MT9FV3IG
ss22J07ovcC9w66eTkNv0ne+K3MOgqvY/1asj/4jBkgX5T/UyyYsnGFqP62ctrWZ+p//
kuUg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749043315; x=1749648115;
h=content-transfer-encoding:in-reply-to:from:content-language
:references:cc:to:subject:user-agent:mime-version:date:message-id
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=42EU1sJyYdG5F1cgKizvK41dUy6Q1Og1sjraWSNVWMs=;
b=aL+Vt9TprK0skK0vgKTjYDwFiwzv9BhnaBMCynHhHX9eiSdyakes8ss7RP0bMiTSZE
6K3PnNOoF7VlV0sRdJ8/uOqArrkfE4Q09UXMyz0ukPRll02BN0/+sZe/5zPpqA7r/alh
CwRosYsex/S9HEDXnIEm6apm647fMcAZuHwNgZhYJp95o5oJw3ZY/b0CMVMWI/MFhZY7
pwhi2zxnGLQbgJSK8WxSVE1Gqv5mKQ3Y7mckYaM67RCeaJfQjxlIRoze9B8Rsvl5EGny
Zjlz+Or0XuuXdcC+gTW1kxS3XZgZ8s6y0xNTIUpYdDHhg9JOdILyvcYBhjuokh81KBHx
d5aw==
X-Forwarded-Encrypted: i=1; AJvYcCU1lPJSPuDt7fsO2bqOptXFUPStUcrMoYZZMvzGtDRWER53ONI6ia7iYl9767y/15eXiQvFX/tC/7Rgbjc=@vger.kernel.org
X-Gm-Message-State: AOJu0YwcXMyt6xDmHoxnawRr4rbzXKG0BEiINsxWofqVbLpluJTb9EN3
rGI94dsHsxB48S3tky9j0ZOZJMLBA4yRl2GQIGgIsF3dKXbjMjMutQcdmP9bepZXx28=
X-Gm-Gg: ASbGncsL9r43w2l2DjFYqIQ4JdL2HwmR8dAFyBDhN2T/1qd0EHCD7ebaGgxgWqIEdOF
V8jkh5AwLy78qRWC2CizviWZ+HjCFON2y3v4kBHYIy+d7waukhpkUqnZ9ahfYHFTF8G432FwEuo
JVTwSxZetLQEOxWSlw3CmA0iLpB8bU4kVX/rJ7BsPh1K1yhthxAeI81FcVoEDJbZLDkHVR5gplH
sbxSOd/A5IAS6/5t2sSTU6CG3bEGD1qxb+lRx9XQBBjPKwKAm+L22NbqqErgxvTX37tlOa6UviN
M+xqEqi2VghowjdCJDaGbbpjhtD4Y26Y340tFBr2zfz6tnNBKGFTX8WoCaCjYfZR3b8u8PoPkAC
d6NOgytTC4GX+7Nbw2+rjjbKf6kNqVKXCEwlEh7w=
X-Google-Smtp-Source: AGHT+IEeJlq8acVoI6eGj1GQFdyqUT4Gx77dcBUJqg3CfYkU0wTl237zJBQxk+ufigaGhCyRnVkMlA==
X-Received: by 2002:a05:6871:42c4:b0:2d4:d9d6:c8bf with SMTP id 586e51a60fabf-2e9bfc6c923mr1651646fac.32.1749043315015;
Wed, 04 Jun 2025 06:21:55 -0700 (PDT)
Received: from ?IPV6:2600:8803:e7e4:1d00:56f4:67ce:c6e3:8f76? ([2600:8803:e7e4:1d00:56f4:67ce:c6e3:8f76])
by smtp.gmail.com with ESMTPSA id 586e51a60fabf-2e906816c51sm2622910fac.28.2025.06.04.06.21.52
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 06:21:53 -0700 (PDT)
Message-ID: <3ff77f5c-b13b-49f5-98b0-a799453768d0@xxxxxxxxxxxx>
Date: Wed, 4 Jun 2025 08:21:51 -0500
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH 2/2] counter: microchip-tcb-capture: Add DMA support for
TC_RAB register reads
To: Dharma.B@xxxxxxxxxxxxx, kamel.bouhara@xxxxxxxxxxx, wbg@xxxxxxxxxx,
Nicolas.Ferre@xxxxxxxxxxxxx, alexandre.belloni@xxxxxxxxxxx,
claudiu.beznea@xxxxxxxxx
Cc: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-iio@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
References: <20250528-mchp-tcb-dma-v1-0-083a41fb7b51@xxxxxxxxxxxxx>
<20250528-mchp-tcb-dma-v1-2-083a41fb7b51@xxxxxxxxxxxxx>
<b45ea46b-3e17-4cb9-8e69-9eea0a3f8241@xxxxxxxxxxxx>
<27407669-a580-482c-8c60-226b56562ce6@xxxxxxxxxxxxx>
Content-Language: en-US
From: David Lechner <dlechner@xxxxxxxxxxxx>
In-Reply-To: <27407669-a580-482c-8c60-226b56562ce6@xxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 6/4/25 1:15 AM, Dharma.B@xxxxxxxxxxxxx wrote:
On 29/05/25 9:03 pm, David Lechner wrote:
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
On 5/28/25 1:13 AM, Dharma Balasubiramani wrote:
Add optional DMA-based data transfer support to read the TC_RAB register,
which provides the next unread captured value from either RA or RB. This
improves performance and offloads CPU when mchp,use-dma-cap is enabled in
the device tree.
It looks like this is using DMA to read a single register in the implementation
of a sysfs read. Do you have measurements to show the performance difference?
I find it hard to believe that this would actually make a significant difference
compared to the overhead of the read syscall to read the sysfs attribute.
Hi David,
Thanks for the feedback.
You're right — in our current testing setup, I didn't observe any
significant performance benefit from using DMA to read the TC_RAB
register via sysfs. I benchmarked both DMA-based and direct MMIO
register access using a userspace program generating high-frequency
capture events, and the overhead of the sysfs read path seems to
dominate in both cases.
Our initial motivation for using DMA was that the TCB IP in Microchip
SoCs includes optional DMA support specifically for capture value
transfers. I wanted to evaluate the potential benefit of offloading CPU
load when frequent capture events are occurring. However, in practice,
the complexity added (especially due to blocking behavior in atomic
contexts like watch) does not appear to be justified, at least via sysfs
or simple polling.
I also tried routing the DMA-based read through the
COUNTER_COMPONENT_EXTENSION watch path, but as you may expect, that
ended up hanging due to blocking behavior in non-sleepable contexts. So
that route seems unsuitable without a more complex asynchronous
buffering model.
Would you suggest exploring a different approach or a more appropriate
interface for DMA-based capture (e.g., via a dedicated ioctl or char
device with async support)? I’m happy to rework it if there's a suitable
context where DMA adds measurable value.
Thanks again for your review and time.
Adding a feature just to make use of something a chip can do doesn't
seem like the wisest approach. Without know how people will actually
want to use it, we would only be guessing during the design of the
userspace interface. It would be better to wait until there is an
actual real-world use case and design something around that need.
Return-Path: <linux-kernel+bounces-673261-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 02C1F41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:23:54 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 37CE4172E11
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:23:55 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id BB09F28FA96;
Wed, 4 Jun 2025 13:23:46 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="gHKnclNk"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0960D28F500
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:23:43 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749043425; cv=none; b=G4yQsrSFW+ZIbCZNu01wlniHS4/27Xq39HGPp1PEen22Gv4HgR7FTNtf6aA1SkCywc9TkJNwt1bo99kgPeUJoCYRdi5PzjcTmBO/mqe2J1d+zoX3luXym0R1C9tkK6oFj3jQ4IFGh4E0xqurB/WlgaVHo6FTOc4fMUI9CC4tXtw=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749043425; c=relaxed/simple;
bh=QbkLHxisoYc2AWDpo32sSP+B4kbWnBVqELZ1Z69vVEo=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=Oks6rjFPzXiKNVyyal8C3JsQNcc/Dh5sXMJvY7ZuJvv2r1O9kUjZYXKWkJQIuJt+BKMKP6ITLDYwLtB7B1/8xCqNLBYv6RtfSo7he5Sk/H4GNHVfzLGVZwIkvf73HLIoHPUr/60alVv+U7TknRcCp05xJ6uO4hAlmtwZGan6h5w=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=gHKnclNk; arc=none smtp.client-ip=170.10.129.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749043422;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=3xww6rsG/Rs20JT8s4hDiVuCO7S3KnAU+7K5dPc6U7A=;
b=gHKnclNka8fxpYQnbMGbQQi7Q5miHa8hSt8XK+ERnyeZvMU6ICayOMI+/7tVgZi8zX9wUg
WtZ7zHnMX7K9qz35xwO1nap8QBVWVY9cZ36Tu8hVpdI5YVmS26DmnHr4WxC7eSwcWr1Y8s
zBXGhegxfBqvjBCKWrhXOGjYSfc8XJ0=
Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com
[209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-633-jKtCiRGVOzC6dmqAiT_VPw-1; Wed, 04 Jun 2025 09:23:41 -0400
X-MC-Unique: jKtCiRGVOzC6dmqAiT_VPw-1
X-Mimecast-MFC-AGG-ID: jKtCiRGVOzC6dmqAiT_VPw_1749043421
Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-451d30992bcso31645275e9.2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 06:23:41 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749043420; x=1749648220;
h=content-transfer-encoding:in-reply-to:organization:autocrypt
:content-language:from:references:cc:to:subject:user-agent
:mime-version:date:message-id:x-gm-message-state:from:to:cc:subject
:date:message-id:reply-to;
bh=3xww6rsG/Rs20JT8s4hDiVuCO7S3KnAU+7K5dPc6U7A=;
b=clYalO01bLvAseVy4quhTC7cKFkAqxWh0kW+HOIuJ6/frUl0smi6lzhM3B/DywxCiB
WaqHbENdfS98LOGwZUEfCI60NxYSs8zc5iwVVSu8oS/BhObnxWmIsNP4DU/tPOeapKZt
Mp91fBfAe+dHZkFBVZUiGCcvfzTFVOCFVRWi0ha/TsqiQ0je984SrS+Amtl7sJOtOvmC
AY8A8RnLL9VYEM18BCLUBVHOAYvWMiJN2DlbVIWS/Jmk/u50tDqzcztV1Z3Pu7TLj1eI
ilqVGd7SySZFOBPV7DWoWIyhEdPX+EinDhO2MyvDS2PWj8J7bbTIvm0hnbEPnFJvgUvh
Fa5g==
X-Forwarded-Encrypted: i=1; AJvYcCVa8dBJGtbT+vCvF2kfyBo58vVqTxQQHAIDu0CG5AwBQiBMPMUt4Yzq1+cKgKm9JJ3eDwr9hyzNrGfZDeM=@vger.kernel.org
X-Gm-Message-State: AOJu0Yw+qtFZxlh2PKIqEHXiTbdqDQsglM7uXPlIqsLmmN/Yh1Czd1CO
G7D06FMBX86Y91cdZ9ytbK/Hx1HOUf9N8G7agOaXR4Y90dTWJldqzPobQbQq+O2paG6GmYz6T5G
tIL8k8MWdnfL5XrtbhcOww4QwvBuyelv7HWlnZ5YTKhfloYk8phOrU6NoFqTFSZY31w==
X-Gm-Gg: ASbGncttMRxnFG6aYItLVU8I0Z8FaYwP4gQScXSfY2KNG+2cyklEjHdTdNZP/YspiWG
5YUGC/eDG4LTV9RMx4JYP1bbHz3Y8Hiz+vidmbMgTEbl2W6UN6ySmS2DAywosBJDuyRkIWAVp4y
mc2MpgYK7mPXDBM4nKekI6U45eQXTFLAY8I1Ika+Svcevr0M6T9mHl5g7bghqLqdCVyd6T7nqng
Z4/KhgWzwrCBMkGEqPiXupXTmVagkrtLTHKNDhp3t3nR1aU3iRqUTyFc+tuFpH6K2RM59g3ipdp
14bmXiR6Ap4GNtR+knSC6mu88xUxyZ3mfL/90me1BiQdiIlir1/x7LtbaOgzxj6kblyheOYPAtp
pqbybrZ630a+y3VLzG4rHWEkdJ4zRTwD6vhEEFx0=
X-Received: by 2002:a05:600c:35d4:b0:43c:f44c:72a6 with SMTP id 5b1f17b1804b1-451f0a63602mr24381295e9.2.1749043420608;
Wed, 04 Jun 2025 06:23:40 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IFt1y4qRpeycuYRvcBiJBXWsI8Xumomuv0jyE3q2dCGUmvlFOrwHFLD+Jf3Br7pU3KswUcwzA==
X-Received: by 2002:a05:600c:35d4:b0:43c:f44c:72a6 with SMTP id 5b1f17b1804b1-451f0a63602mr24380875e9.2.1749043420071;
Wed, 04 Jun 2025 06:23:40 -0700 (PDT)
Received: from ?IPV6:2003:d8:2f1b:b800:6fdb:1af2:4fbd:1fdf? (p200300d82f1bb8006fdb1af24fbd1fdf.dip0.t-ipconnect.de. [2003:d8:2f1b:b800:6fdb:1af2:4fbd:1fdf])
by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a4efe5b92bsm21434591f8f.9.2025.06.04.06.23.39
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 06:23:39 -0700 (PDT)
Message-ID: <84cf5418-42e9-4ec5-bd87-17ba91995c47@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 15:23:38 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH 2/3] userfaultfd: prevent unregistering VMAs through a
different userfaultfd
To: Tal Zussman <tz2294@xxxxxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Peter Xu <peterx@xxxxxxxxxx>,
"Jason A. Donenfeld" <Jason@xxxxxxxxx>,
Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>,
Christian Brauner <brauner@xxxxxxxxxx>, Jan Kara <jack@xxxxxxx>,
Pavel Emelyanov <xemul@xxxxxxxxxxxxx>, Andrea Arcangeli <aarcange@xxxxxxxxxx>
Cc: linux-mm@xxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
linux-fsdevel@xxxxxxxxxxxxxxx
References: <20250603-uffd-fixes-v1-0-9c638c73f047@xxxxxxxxxxxx>
<20250603-uffd-fixes-v1-2-9c638c73f047@xxxxxxxxxxxx>
From: David Hildenbrand <david@xxxxxxxxxx>
Content-Language: en-US
Autocrypt: addr=david@xxxxxxxxxx; keydata=
xsFNBFXLn5EBEAC+zYvAFJxCBY9Tr1xZgcESmxVNI/0ffzE/ZQOiHJl6mGkmA1R7/uUpiCjJ
dBrn+lhhOYjjNefFQou6478faXE6o2AhmebqT4KiQoUQFV4R7y1KMEKoSyy8hQaK1umALTdL
QZLQMzNE74ap+GDK0wnacPQFpcG1AE9RMq3aeErY5tujekBS32jfC/7AnH7I0v1v1TbbK3Gp
XNeiN4QroO+5qaSr0ID2sz5jtBLRb15RMre27E1ImpaIv2Jw8NJgW0k/D1RyKCwaTsgRdwuK
Kx/Y91XuSBdz0uOyU/S8kM1+ag0wvsGlpBVxRR/xw/E8M7TEwuCZQArqqTCmkG6HGcXFT0V9
PXFNNgV5jXMQRwU0O/ztJIQqsE5LsUomE//bLwzj9IVsaQpKDqW6TAPjcdBDPLHvriq7kGjt
WhVhdl0qEYB8lkBEU7V2Yb+SYhmhpDrti9Fq1EsmhiHSkxJcGREoMK/63r9WLZYI3+4W2rAc
UucZa4OT27U5ZISjNg3Ev0rxU5UH2/pT4wJCfxwocmqaRr6UYmrtZmND89X0KigoFD/XSeVv
jwBRNjPAubK9/k5NoRrYqztM9W6sJqrH8+UWZ1Idd/DdmogJh0gNC0+N42Za9yBRURfIdKSb
B3JfpUqcWwE7vUaYrHG1nw54pLUoPG6sAA7Mehl3nd4pZUALHwARAQABzSREYXZpZCBIaWxk
ZW5icmFuZCA8ZGF2aWRAcmVkaGF0LmNvbT7CwZgEEwEIAEICGwMGCwkIBwMCBhUIAgkKCwQW
AgMBAh4BAheAAhkBFiEEG9nKrXNcTDpGDfzKTd4Q9wD/g1oFAl8Ox4kFCRKpKXgACgkQTd4Q
9wD/g1oHcA//a6Tj7SBNjFNM1iNhWUo1lxAja0lpSodSnB2g4FCZ4R61SBR4l/psBL73xktp
rDHrx4aSpwkRP6Epu6mLvhlfjmkRG4OynJ5HG1gfv7RJJfnUdUM1z5kdS8JBrOhMJS2c/gPf
wv1TGRq2XdMPnfY2o0CxRqpcLkx4vBODvJGl2mQyJF/gPepdDfcT8/PY9BJ7FL6Hrq1gnAo4
3Iv9qV0JiT2wmZciNyYQhmA1V6dyTRiQ4YAc31zOo2IM+xisPzeSHgw3ONY/XhYvfZ9r7W1l
pNQdc2G+o4Di9NPFHQQhDw3YTRR1opJaTlRDzxYxzU6ZnUUBghxt9cwUWTpfCktkMZiPSDGd
KgQBjnweV2jw9UOTxjb4LXqDjmSNkjDdQUOU69jGMUXgihvo4zhYcMX8F5gWdRtMR7DzW/YE
BgVcyxNkMIXoY1aYj6npHYiNQesQlqjU6azjbH70/SXKM5tNRplgW8TNprMDuntdvV9wNkFs
9TyM02V5aWxFfI42+aivc4KEw69SE9KXwC7FSf5wXzuTot97N9Phj/Z3+jx443jo2NR34XgF
89cct7wJMjOF7bBefo0fPPZQuIma0Zym71cP61OP/i11ahNye6HGKfxGCOcs5wW9kRQEk8P9
M/k2wt3mt/fCQnuP/mWutNPt95w9wSsUyATLmtNrwccz63XOwU0EVcufkQEQAOfX3n0g0fZz
Bgm/S2zF/kxQKCEKP8ID+Vz8sy2GpDvveBq4H2Y34XWsT1zLJdvqPI4af4ZSMxuerWjXbVWb
T6d4odQIG0fKx4F8NccDqbgHeZRNajXeeJ3R7gAzvWvQNLz4piHrO/B4tf8svmRBL0ZB5P5A
2uhdwLU3NZuK22zpNn4is87BPWF8HhY0L5fafgDMOqnf4guJVJPYNPhUFzXUbPqOKOkL8ojk
CXxkOFHAbjstSK5Ca3fKquY3rdX3DNo+EL7FvAiw1mUtS+5GeYE+RMnDCsVFm/C7kY8c2d0G
NWkB9pJM5+mnIoFNxy7YBcldYATVeOHoY4LyaUWNnAvFYWp08dHWfZo9WCiJMuTfgtH9tc75
7QanMVdPt6fDK8UUXIBLQ2TWr/sQKE9xtFuEmoQGlE1l6bGaDnnMLcYu+Asp3kDT0w4zYGsx
5r6XQVRH4+5N6eHZiaeYtFOujp5n+pjBaQK7wUUjDilPQ5QMzIuCL4YjVoylWiBNknvQWBXS
lQCWmavOT9sttGQXdPCC5ynI+1ymZC1ORZKANLnRAb0NH/UCzcsstw2TAkFnMEbo9Zu9w7Kv
AxBQXWeXhJI9XQssfrf4Gusdqx8nPEpfOqCtbbwJMATbHyqLt7/oz/5deGuwxgb65pWIzufa
N7eop7uh+6bezi+rugUI+w6DABEBAAHCwXwEGAEIACYCGwwWIQQb2cqtc1xMOkYN/MpN3hD3
AP+DWgUCXw7HsgUJEqkpoQAKCRBN3hD3AP+DWrrpD/4qS3dyVRxDcDHIlmguXjC1Q5tZTwNB
boaBTPHSy/Nksu0eY7x6HfQJ3xajVH32Ms6t1trDQmPx2iP5+7iDsb7OKAb5eOS8h+BEBDeq
3ecsQDv0fFJOA9ag5O3LLNk+3x3q7e0uo06XMaY7UHS341ozXUUI7wC7iKfoUTv03iO9El5f
XpNMx/YrIMduZ2+nd9Di7o5+KIwlb2mAB9sTNHdMrXesX8eBL6T9b+MZJk+mZuPxKNVfEQMQ
a5SxUEADIPQTPNvBewdeI80yeOCrN+Zzwy/Mrx9EPeu59Y5vSJOx/z6OUImD/GhX7Xvkt3kq
Er5KTrJz3++B6SH9pum9PuoE/k+nntJkNMmQpR4MCBaV/J9gIOPGodDKnjdng+mXliF3Ptu6
3oxc2RCyGzTlxyMwuc2U5Q7KtUNTdDe8T0uE+9b8BLMVQDDfJjqY0VVqSUwImzTDLX9S4g/8
kC4HRcclk8hpyhY2jKGluZO0awwTIMgVEzmTyBphDg/Gx7dZU1Xf8HFuE+UZ5UDHDTnwgv7E
th6RC9+WrhDNspZ9fJjKWRbveQgUFCpe1sa77LAw+XFrKmBHXp9ZVIe90RMe2tRL06BGiRZr
jPrnvUsUUsjRoRNJjKKA/REq+sAnhkNPPZ/NNMjaZ5b8Tovi8C0tmxiCHaQYqj7G2rgnT0kt
WNyWQQ==
Organization: Red Hat
In-Reply-To: <20250603-uffd-fixes-v1-2-9c638c73f047@xxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 04.06.25 00:14, Tal Zussman wrote:
Currently, a VMA registered with a uffd can be unregistered through a
different uffd asssociated with the same mm_struct.
Change this behavior to be stricter by requiring VMAs to be unregistered
through the same uffd they were registered with.
While at it, correct the comment for the no userfaultfd case. This seems
to be a copy-paste artifact from the analagous userfaultfd_register()
check.
I consider it a BUG that should be fixed. Hoping Peter can share his
opinion.
Fixes: 86039bd3b4e6 ("userfaultfd: add new syscall to provide memory externalization")
Signed-off-by: Tal Zussman <tz2294@xxxxxxxxxxxx>
---
fs/userfaultfd.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c
index 22f4bf956ba1..9289e30b24c4 100644
--- a/fs/userfaultfd.c
+++ b/fs/userfaultfd.c
@@ -1477,6 +1477,16 @@ static int userfaultfd_unregister(struct userfaultfd_ctx *ctx,
if (!vma_can_userfault(cur, cur->vm_flags, wp_async))
goto out_unlock;
+ /*
+ * Check that this vma isn't already owned by a different
+ * userfaultfd. This provides for more strict behavior by
+ * preventing a VMA registered with a userfaultfd from being
+ * unregistered through a different userfaultfd.
+ */
+ if (cur->vm_userfaultfd_ctx.ctx &&
+ cur->vm_userfaultfd_ctx.ctx != ctx)
+ goto out_unlock;
So we allow !cur->vm_userfaultfd_ctx.ctx to allow unregistering when
there was nothing registered.
A bit weird to set "found = true" in that case. Maybe it's fine, just
raising it ...
+
found = true;
} for_each_vma_range(vmi, cur, end);
BUG_ON(!found);
@@ -1491,10 +1501,11 @@ static int userfaultfd_unregister(struct userfaultfd_ctx *ctx,
cond_resched();
BUG_ON(!vma_can_userfault(vma, vma->vm_flags, wp_async));
+ BUG_ON(vma->vm_userfaultfd_ctx.ctx &&
+ vma->vm_userfaultfd_ctx.ctx != ctx);
No new BUG_ON please. VM_WARN_ON_ONCE() if we really care. After all, we
checked this above ...
/*
- * Nothing to do: this vma is already registered into this
- * userfaultfd and with the right tracking mode too.
+ * Nothing to do: this vma is not registered with userfaultfd.
*/
if (!vma->vm_userfaultfd_ctx.ctx)
goto skip;
--
Cheers,
David / dhildenb
Return-Path: <linux-kernel+bounces-673262-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id B761641E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:24:54 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 6BD55188A5F7
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:24:36 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 8FCF928F952;
Wed, 4 Jun 2025 13:24:10 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="g3NGz/nt"
Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2041.outbound.protection.outlook.com [40.107.220.41])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id CDE2C1EFF80;
Wed, 4 Jun 2025 13:24:07 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.41
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749043449; cv=fail; b=fg+cAO7t4OJmo3Y6SeXoKbDPd6TO4UKIDCag5uV2a9hSgh6U2qQPULAwUIc+Lfds1pBlROG41m2yyR5lCAzudkm2LQXWqnSOeyCWzNKSVSnro0nNOzRko6ZhyqlXNlcQe/O/S/kNHfzUIgLoe5kBiDRC5x8MeAwz4ajvm98NYME=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749043449; c=relaxed/simple;
bh=y8WKj3IpBnojCehQHuP3pc2hNDiBb+yv+iC18X/XHw0=;
h=Date:From:To:Cc:Subject:Message-ID:References:Content-Type:
Content-Disposition:In-Reply-To:MIME-Version; b=izhGy6n4hGo+Q/WAwcE2cok3Nh8vwx2S4iOiXzwsnzy7DjXlihYwMiiWTc7CALgYb4HWHTFFAUmSkpmhJqwA6giShHL5iJZ/R5huSPdQsTNTtOBiPf6eed5EVwrFtc8CCDMShtUXhQkMggqvLbArDuZLeYrAOlnLihYv5u1Oovc=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=g3NGz/nt; arc=fail smtp.client-ip=40.107.220.41
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com
Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=izIiOYr7t3NfRjVuzsIfnXrvZuJ9DdMA6AdsH/8JnMld4I1yJEQEi55+wY7h/WeEGiGDg8L7DkusLNDqIo8ikTgOLkzLJucw3o0hKHhHlgc6U5Wh0eIh+8YrlPrCbGh6lyGK/+WbYOEMWzAXciNCg1xfyR6MpGzMkQl5qP9HhZKx3zFo/Y24NS4e+F5MkCRQqgY577YuIvfoEH2oAsZPhUAWZ0cUfxg8oYCeIzz3yxy7+0UHXIre/YK3IhGBciMKbbpeVeevJZdT9dqf8dX9VCyKltNWOKGW5+Mt5No57zpvQS/bL+hEQlvI40/GmZ99JgZJ2yzCY/8LOZudJcARgw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=yvG2SHICR17o0VToEjA2yX5XHAAtl0yXYPUVp/pDNdM=;
b=vOu2BHgb8JDLvDiScJ9ErC+/5HuqIL3tE/0Lptpg9cpagZDdFaLw0JslTEDsibE9yZFIxTvGHDRpyloFGuxs/RaeNw5zP8FhFHmgHKSRjtvOQdjC4C58TRcqPbtP80OWYqOGvsQW0jNbsjH5yxngm1R9Hq8huJ2nk36i1xp1wstQyT6Oq/AcFcq4ETbiR0w6w753vK0ZMP8ndV5GuyIyIWS7yGwtnOGudxzegIga6LZ3zgCySujRj7pF5arsff5+5vGSJ13x8ZYdgMJF8Ny2HPxe5b42/D6kbZNCbWXnXJd+yqCV7rdxNIOfKbI25sth7HOBptTtrndLsIzt9Q47ZA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com;
dkim=pass header.d=nvidia.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;
s=selector2;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=yvG2SHICR17o0VToEjA2yX5XHAAtl0yXYPUVp/pDNdM=;
b=g3NGz/ntDDZqB1spH4sstXsU1JGMGQgIW5Bo+OHBEKbwXpq+U9I17Vk+rpqROFPlOdSKdjVBKy1XYMr1QmhE7ZoXFTimezyTEmgRdi+kP9rfgV23wR7uIPiEibNDofUmoSN8s8DZYd82HuG4Pvy8GJZf/ycEum6NxRQiz7oN6k6cHpw26vXuaztZLHm+wIbN7rvKZR+ibDL7ZqanY3ZpJCXz0rRMraY6hMEqx1LcyZwFIUJxPoRiO+VN2C7Dy/gx/2mnHCbPZhhOThYD/YqE0r2QnRkrfpwz4FjQHZkpKKj0dsR2x02zNKbeufx9/aKIkryPe5iZb4iZRabYnPvEiQ==
Authentication-Results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=nvidia.com;
Received: from CH3PR12MB8659.namprd12.prod.outlook.com (2603:10b6:610:17c::13)
by SA1PR12MB7224.namprd12.prod.outlook.com (2603:10b6:806:2bb::20) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8769.31; Wed, 4 Jun
2025 13:24:04 +0000
Received: from CH3PR12MB8659.namprd12.prod.outlook.com
([fe80::6eb6:7d37:7b4b:1732]) by CH3PR12MB8659.namprd12.prod.outlook.com
([fe80::6eb6:7d37:7b4b:1732%6]) with mapi id 15.20.8792.034; Wed, 4 Jun 2025
13:24:04 +0000
Date: Wed, 4 Jun 2025 10:24:03 -0300
From: Jason Gunthorpe <jgg@xxxxxxxxxx>
To: "Aneesh Kumar K.V" <aneesh.kumar@xxxxxxxxxx>
Cc: Xu Yilun <yilun.xu@xxxxxxxxxxxxxxx>, kvm@xxxxxxxxxxxxxxx,
sumit.semwal@xxxxxxxxxx, christian.koenig@xxxxxxx,
pbonzini@xxxxxxxxxx, seanjc@xxxxxxxxxx, alex.williamson@xxxxxxxxxx,
dan.j.williams@xxxxxxxxx, aik@xxxxxxx, linux-coco@xxxxxxxxxxxxxxx,
dri-devel@xxxxxxxxxxxxxxxxxxxxx, linux-media@xxxxxxxxxxxxxxx,
linaro-mm-sig@xxxxxxxxxxxxxxxx, vivek.kasireddy@xxxxxxxxx,
yilun.xu@xxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, lukas@xxxxxxxxx,
yan.y.zhao@xxxxxxxxx, daniel.vetter@xxxxxxxx, leon@xxxxxxxxxx,
baolu.lu@xxxxxxxxxxxxxxx, zhenzhong.duan@xxxxxxxxx,
tao1.su@xxxxxxxxx, linux-pci@xxxxxxxxxxxxxxx, zhiw@xxxxxxxxxx,
simona.vetter@xxxxxxxx, shameerali.kolothum.thodi@xxxxxxxxxx,
iommu@xxxxxxxxxxxxxxx, kevin.tian@xxxxxxxxx
Subject: Re: [RFC PATCH 17/30] iommufd/device: Add TSM Bind/Unbind for TIO
support
Message-ID: <20250604132403.GJ5028@xxxxxxxxxx>
References: <20250529053513.1592088-1-yilun.xu@xxxxxxxxxxxxxxx>
<20250529053513.1592088-18-yilun.xu@xxxxxxxxxxxxxxx>
<yq5awm9ujouz.fsf@xxxxxxxxxx>
<aD6UQy4KwKcdSvVE@yilunxu-OptiPlex-7050>
<20250603122149.GH376789@xxxxxxxxxx>
<yq5aplfj99x0.fsf@xxxxxxxxxx>
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <yq5aplfj99x0.fsf@xxxxxxxxxx>
X-ClientProxiedBy: YT4P288CA0041.CANP288.PROD.OUTLOOK.COM
(2603:10b6:b01:d3::22) To CH3PR12MB8659.namprd12.prod.outlook.com
(2603:10b6:610:17c::13)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: CH3PR12MB8659:EE_|SA1PR12MB7224:EE_
X-MS-Office365-Filtering-Correlation-Id: b6578cce-7cc2-411e-8848-08dda36b13a1
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|7416014|376014|1800799024;
X-Microsoft-Antispam-Message-Info:
=?utf-8?B?NFNUTDJkclZKTXhWNms4a1ZvUmxJRmFvV2hMNWlxZExQbzRSN1czOEEwb3Ni?=
=?utf-8?B?R0NhdHBEVGZnYzNLZVBPeEZ2cWZXeXlMZWFNTzN0anZOcnMzTTRneStDRm9X?=
=?utf-8?B?cDFKamVBQlBMNlhkQVdaOTNxUU85Z1IxeEM0WXVBYkhsSmVzQ2EvMzJ2dzhW?=
=?utf-8?B?WEVhcEtSV3diUlNIS1JMRTcyMGNPZWR3Q0c5dVNoQzNYV3pWbURNN1I1OFFw?=
=?utf-8?B?WjJkK2E0bStxSWU0cTRJRXhsKzFTUmI4VGNTT1hpc3NGaHJjUk1tMnArMEF6?=
=?utf-8?B?UnQ5Uk1OTXhDSkFwcG43dFVNMDJZeEUxU09jRnpLblVNQzl1RjhUbng1MW0z?=
=?utf-8?B?VEZVTjFTbzNCUXo2VFQ3ckc5Q3h1aEpkYXNqS1paN21mdGlEVDdGM3ZiVjBO?=
=?utf-8?B?VXpwYVZCYjRKcnVrQk9xNDVBajhMTE1lT2FnaWxXRjFobncrZHFSK0lNTnU2?=
=?utf-8?B?WWNlYWVtNy82SFI4QnNRM2xkYjU4Y0puN20wZExVckdmMXFIYzJreWFYd2Fr?=
=?utf-8?B?dmUrOEMwdXpwb2xRamI2T0lLOXBRQ1lnWmJ1bE02VERxMmtsSUdsZ09MNkZR?=
=?utf-8?B?SzNrWmJDTFRKNGNZV1BYbEZmR1ZCRnBpajRWWkIwaEpTc1hYcjZSd3hiRlov?=
=?utf-8?B?WVkvSDhjT2Eyb3d6MjhMUlJ1SXNNRmlqdDU2c3owSkNzZ2c3cFhHc0lWOFlB?=
=?utf-8?B?a0l1UHE4RkFHRkJvMWNNQnFka3pzL1pwZGJEdTlDTEN1a2EvUjB0MGRhT0pC?=
=?utf-8?B?T1ROMXpMWEJobThhVWJHUEx1VFlEeGZIU09NTUxKU2c5TDd2eHdnVDA0Mi9U?=
=?utf-8?B?L25NMVM2YkF0N04rdTI3RFNuUG1TQzF1UmtkY2t5YjBjcytRdERINzF2bzlr?=
=?utf-8?B?SGd0c3UzQ0hreW8yTkpEWjc2U0Jsa2plczVmblZzaFhxYTdPOEd1dW16WnhS?=
=?utf-8?B?cnBTRjlJcXZQWXA4MFhuZWZIYnRHNm02cTBDeEtyV2FwMnFoZnMwOTNmSUxn?=
=?utf-8?B?N21kZHF0RlEybktiVkp4N1ZMU29ZQ3ErNkNKYkZiMHJKeWovanQyZTVFTVhk?=
=?utf-8?B?NlpHSUNFZDhFWVd3Z2piTGFybDdXS1hpSUNhazgwSWFzQmhTM2JjdGl2a1Fp?=
=?utf-8?B?L3ZveGpYRDJOUzh6MlBhcEsrN2ZtNjVoN3QwVVRvSkt4MVhKYWlMaGtvQ2hM?=
=?utf-8?B?b0M5S1NWbjhsSWlxbGRCMkl1KzErdmtVL3JlVGJBV3RkMWhDcWQ5d2x5SXlJ?=
=?utf-8?B?YzF1bHhkcWdvR2lKK0xnRi9DN1BCbUcyYTAzSmZLZ0Jma0EvU1htUjU0eW15?=
=?utf-8?B?VDB5VEJHVzc5R2E3eGZmWW9vSkc0clRhVnZCN0txc1F4QmhyN3ZnQUFaZFk5?=
=?utf-8?B?cFlqd0pLQXNiRWJZMWV5eFROUG5iRTh4MzBscTN6TVQ1SDJ1MUlxTG1kV2hU?=
=?utf-8?B?eDdPUjZFVlhReGhEajlEVTZmTm8wOG9Ock5FdWxFVHZQcSt2OXpXcWN2RTZU?=
=?utf-8?B?dHcyM0sxc2ViTTNOWitSUXlzNlRlTjJpS1VtM3VRWVZic0lNNzNKbjBkV0tL?=
=?utf-8?B?Um5DOXpKcFVCck00K3Btdmpac3FmUGY3TnBJL2NmRkVRTXpNOU5nSE1wUndB?=
=?utf-8?B?MVorbWtGbUMxUWtBVkRPZnFyYTFXNzZmejFJVzhIbk9wL2EwZ2Z0cmRTZyts?=
=?utf-8?B?WEhvd2JxWGNZc1RhK1ZON0dVTDZ6T01HOG55UVVlSG1VSGNFRmpYTXp3THZC?=
=?utf-8?B?d3FtdnE2emczMWV5OXhYTkt6MUp2d2xTbzBLalhibGhPajBXMjJlNldXVEdp?=
=?utf-8?B?RmU1WTh1WGE0WHdNRlJ2TWRJdE1JLzU1MTZvZElST0ozbFhRUnA0U0R1bjls?=
=?utf-8?B?dW44YTgzNUtCZVVOc3llTE5qdHZjVE9sM1ZXS1VuSmpTb3c9PQ==?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CH3PR12MB8659.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(7416014)(376014)(1800799024);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?utf-8?B?WTg1RC9mU1RIemMwbzhENlE2RFM5YURwSVNReko0SU80L1BHVjROa1M4VVAw?=
=?utf-8?B?ZjR0U1l6NVdvT3E3UkRWdTVwYmJ1QWNKa2FQMU5tU0lyYWdwVHFFbnFGbVhK?=
=?utf-8?B?cmNnWmJRVWNnc1pLcUFnR3RwbzVUVTdtVEtsb0lWU1I0dUJwRGhkcGY4K0lW?=
=?utf-8?B?VTg4TGVFY2h4anI3ODQ3Umc2RzdLdVN3cXc3RDZNVEpDTWpncTlPWENOall3?=
=?utf-8?B?a25vOXlwOU4wU3hPemNsR0xlOWlYcktzUCs3OU5EYkdWVk9ad2tRSHlaQVU5?=
=?utf-8?B?a0psRkNhZXg0cXhrWFhNcStvWDgvaDFvaHJrdThzUm83K2VOc3ozUTFHYjZm?=
=?utf-8?B?dExMamlFUWNDWEhvTGF3c1h3QVkva1hzVWh4dU5tVFhsalRYaCswUmxIa1ph?=
=?utf-8?B?UlRsM01Ob0VlQi9mM3haSm1ML2ZvTnU3MXdtS0x4aktxMTlDVnlJQXhzbnIx?=
=?utf-8?B?Z3FJUStBd0UzMlhvRVVNTE83b1V6L2VXYmJUbGVmOExrQnlxbDZ2TlNaVktn?=
=?utf-8?B?eFVZdk84SU1JYnJ5NGpPSHJqalluZGdtTG91bE9oQnhZdWdPdVdkb2o4azR6?=
=?utf-8?B?VUYxZ1lpMGJTcW0vaTQ5clZzb0YzeFlEaTFvOXdwRFBtREI3M1FaOWpXM0x6?=
=?utf-8?B?WlIyK0t1dnlSL1hYUkg4eXlNcFk2STVFYTNiQ29EOFF3eGhrZ3NqRW9HMm1O?=
=?utf-8?B?MkxXR240VlE3bnFkNkRySmhDakdIYmh0Y0EyR0xHUndiVHpzdWVYOEJmQnpw?=
=?utf-8?B?Z2d0M1RNTDkySW9EeTdzQlFETTBoaStHaFdwZ1NxeFJoZXFqMXZvcTRpaTlU?=
=?utf-8?B?emh0OW83RGMwbnNyZ01PZHdiYVU2TloxN25tZHpnejR3c2xqcENNR2tXaThq?=
=?utf-8?B?NDFBdk5WK29INFhIaUtvREJRUTQyWk5TazJmT1BNQjN1eHBRbktrUzNIcGRR?=
=?utf-8?B?NGU4am1WSXdIemMrdnlFbzV5Z1Fsc2lOcTlGMzQ3REJCL3dhQVZ1andVMkI1?=
=?utf-8?B?L0dmVkl2ZnczUVhvK1U5bk5VV0dHS2Npbks4TzcxWkxGM3piU2NkZGc2TklX?=
=?utf-8?B?SWF2eGNmWHdTUkg0VWdoR2g3T2xLNUp2U1M2SmhWd214VWhrNkU3WTlFb24w?=
=?utf-8?B?V3lpZGpwdlg4MWZjNUtGL2ZYd0tUTG9mcjFHL1RhTnZFMC96NFpyTXlxQ0VT?=
=?utf-8?B?VDZOdUNnOGNXSnFzak82NTB3WWpoamZSOFVVanBjRHo3K2U2dWtPUitUUXB0?=
=?utf-8?B?WUY3ZHlsaUpMWlpielRncytzWHQwSzdML0Zmb3I5SXgvRER3WUNwSGNseWVC?=
=?utf-8?B?STFJMkx6aW5iVTd3ZVhwRmlhbUtIM1htVVRNeTBnVFNnZmtmNWFHZmk2TW5X?=
=?utf-8?B?M3BSTWlycjQrN01vVndEVWE5aEZJMC9tQzFXelUrVkVjQ0krMHNNQk93RlFQ?=
=?utf-8?B?aE5hbm5xVmpSMEp1MDlFbEtOWERyTWR3VlFKUkRINVRmR2o3MGRhR3A0dGhx?=
=?utf-8?B?cXpjTUdRUWl5eFEyR0QzUGVUbkI5cllVcmUxWTF1NnIyZzBXelJReUJiQkk2?=
=?utf-8?B?djhQeVZJQ1pTRnFkdkNSZlhWc1FEK3JxV05oNytiVnkrd2Rza1Baa1JmdmRt?=
=?utf-8?B?UG5RNDFqRnJKRXFtUXV2cVJVV3RXd0krY1NhL3FCc01IOFlWeWgvUFUwbTR0?=
=?utf-8?B?TWFjcElJdGFXUFcvclI4eVlpZklTdzNOSGRlL0E4SU1sYmtQSFpSeDBxUkNL?=
=?utf-8?B?V29rbkJUR0tUWXlxdDh4Nm9HNEY3WkdPczNaaUErUEZRZTMrT2l6SnNFRVg4?=
=?utf-8?B?L3A4WW16R1BDbHJwY1dlVzgydEF2YWRKU3l3Q0NzaEpQQnFtd0NmN3FuUjlJ?=
=?utf-8?B?ak5aU3Y5QUlzWWpILzk4aHU0T2JwYUFaUVNyQ1Q2NFVSYXZsYjBBYXNGeG9P?=
=?utf-8?B?eWpzR2Y3YzJsR0VjbUwyZ1NqWHpDU2V1OVNYQjRLOEpTV1N0ek1uem1xRmFG?=
=?utf-8?B?WWkwL0pvYjVzalBleVVQRGpXV241SzhEK3VhdUFnblhZcGFXRkw1OEpBN2ZP?=
=?utf-8?B?K1JvSDhWaUYwQ2Y5SlkzVUlHVFU5VStGVGFoajE5eW9JSDJXMEp1b2Rad3Bu?=
=?utf-8?Q?8sHNL6qIM09kc2UDdpkv3NAjG?=
X-OriginatorOrg: Nvidia.com
X-MS-Exchange-CrossTenant-Network-Message-Id: b6578cce-7cc2-411e-8848-08dda36b13a1
X-MS-Exchange-CrossTenant-AuthSource: CH3PR12MB8659.namprd12.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 13:24:04.4543
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: 5Zt/9aOit39cxdMmt8fp1jKMWHLzV/wnIqFOBaf/ROu0QfgxAT6PBJX94SeXjm9o
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB7224
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 02:10:43PM +0530, Aneesh Kumar K.V wrote:
Jason Gunthorpe <jgg@xxxxxxxxxx> writes:
> On Tue, Jun 03, 2025 at 02:20:51PM +0800, Xu Yilun wrote:
>> > Wouldn’t it be simpler to skip the reference count increment altogether
>> > and just call tsm_unbind in the virtual device’s destroy callback?
>> > (iommufd_vdevice_destroy())
>>
>> The vdevice refcount is the main concern, there is also an IOMMU_DESTROY
>> ioctl. User could just free the vdevice instance if no refcount, while VFIO
>> is still in bound state. That seems not the correct free order.
>
> Freeing the vdevice should automatically unbind it..
>
One challenge I ran into during implementation was the dependency of
vfio on iommufd_device. When vfio needs to perform a tsm_unbind,
it only has access to an iommufd_device.
VFIO should never do that except by destroying the idevice..
However, TSM operations like binding and unbinding are handled at the
iommufd_vdevice level. The issue? There’s no direct link from
iommufd_device back to iommufd_vdevice.
Yes.
To address this, I modified the following structures:
modified drivers/iommu/iommufd/iommufd_private.h
@@ -428,6 +428,7 @@ struct iommufd_device {
/* protect iopf_enabled counter */
struct mutex iopf_lock;
unsigned int iopf_enabled;
+ struct iommufd_vdevice *vdev;
};
Locking will be painful:
Updating vdevice->idev requires holding vdev->mutex (vdev_lock).
Updating device->vdev requires idev->igroup->lock (idev_lock).
I wonder if that can work on the destory paths..
You also have to prevent more than one vdevice from being created for
an idevice, I don't think we do that today.
tsm_unbind in vdevice_destroy:
vdevice_destroy() ends up calling tsm_unbind() while holding only the
vdev_lock. At first glance, this seems unsafe. But in practice, it's
fine because the corresponding iommufd_device has already been destroyed
when the VFIO device file descriptor was closed—triggering
vfio_df_iommufd_unbind().
This needs some kind of fixing the idevice should destroy the vdevices
during idevice destruction so we don't get this out of order where the
idevice is destroyed before the vdevice.
This should be a separate patch as it is an immediate bug fix..
Jason
Return-Path: <linux-kernel+bounces-673264-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id EA53741E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:24:57 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 99E23173119
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:24:57 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 4637D28FAB0;
Wed, 4 Jun 2025 13:24:43 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=collabora.com header.i=nicolas.frattaroli@xxxxxxxxxxxxx header.b="UFuUk7U0"
Received: from sender4-pp-f112.zoho.com (sender4-pp-f112.zoho.com [136.143.188.112])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id A10671EFF80;
Wed, 4 Jun 2025 13:24:40 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.188.112
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749043482; cv=pass; b=V/0adaXcslbJLPQ4oFLjlwdi8JjSPOn6LwdEyPRFF4p+I7+pTCY9nugWq/0kUQWL0R6tPYpgkSc6BvVu9Op/4HGIpulpibkoBYAE5bKGCNOxA6qtG4w40cNH6hiMvnVyIbZ+OjwPTiXVY7UFpo1nLP8xlCucnNTAWE7ESbG2GbA=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749043482; c=relaxed/simple;
bh=WwNZ3AI2TacFgCaCJN2Dr0iF8pej/Zyd3d1CffWyS1M=;
h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version:Content-Type; b=JNh/Q2DKYZzSZqSnPaeHpA+w3Aa1BfaWD3uxKDMA80SJKkPGQDjYMq7Atcig1/xU/qHmwnwuMb2PrHhOkNFG+iieWKfxEHOUm2nkd7kcTZfL2N94M71rati8Mx3+B3aF56IENMjgEXBIzj8gYUNErRMqkR8MXYrC5GsueKqH1uo=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (1024-bit key) header.d=collabora.com header.i=nicolas.frattaroli@xxxxxxxxxxxxx header.b=UFuUk7U0; arc=pass smtp.client-ip=136.143.188.112
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com
ARC-Seal: i=1; a=rsa-sha256; t=1749043468; cv=none;
d=zohomail.com; s=zohoarc;
b=kh2iUeK+/ZYvPaLk72mpcP5zsfS7Ua6a0zQkfuPR0A8pLHFxw5SebyZVlhNSojGKB6mARcZGBI4FSAjlXaUquHJtOK4j+mWE0XCvntWTcQZ+9Ou393Zy51U70n4BKZVPRaj7xeUyJlidIhlLYyZeuXIk61Xep5NLtYfJCGQQ+74=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc;
t=1749043468; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To;
bh=wCNTPJfskIhANg0RiKYHsBz7kOPSHztZlUotAgnVEF0=;
b=mNAlllKP7hd6uFXPYjbLfO0KOaSUQoKMkvprCj3dlSDo+EvdRXd7Q4e+n4FxAQWZglZZQgJ9zO2N1prnuR7tnTA9J1YupRZmfVE3AQE9xNrb1F7Gd7fWTm9MFH/ZT/57jN1BJ7/jClg2bZFWjgDPoLeB+Y/At9gCIdGGN4sHO4U=
ARC-Authentication-Results: i=1; mx.zohomail.com;
dkim=pass header.i=collabora.com;
spf=pass smtp.mailfrom=nicolas.frattaroli@xxxxxxxxxxxxx;
dmarc=pass header.from=<nicolas.frattaroli@xxxxxxxxxxxxx>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1749043468;
s=zohomail; d=collabora.com; i=nicolas.frattaroli@xxxxxxxxxxxxx;
h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Content-Type:Message-Id:Reply-To;
bh=wCNTPJfskIhANg0RiKYHsBz7kOPSHztZlUotAgnVEF0=;
b=UFuUk7U0iVkVcYwV/BWOTKu/Mn7HG3BvcbST3LvUU6rPkqSe1mJ96LESVOJ85ore
G69LWWzPm1Ne4TX1P1PQ/qN3qn0y0Sv/VngAVb7tQmkKnn1EES8ldDwEDh9Kbrckav+
O05rTCJcYTQhscMv1DcWSeDHAPfCiwC+WyD9Nhz4=
Received: by mx.zohomail.com with SMTPS id 1749043466448171.76502669274078;
Wed, 4 Jun 2025 06:24:26 -0700 (PDT)
From: Nicolas Frattaroli <nicolas.frattaroli@xxxxxxxxxxxxx>
To: Alexey Charkov <alchark@xxxxxxxxx>
Cc: Rob Herring <robh@xxxxxxxxxx>, Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>, Heiko Stuebner <heiko@xxxxxxxxx>,
linux-rockchip@xxxxxxxxxxxxxxxxxxx, devicetree@xxxxxxxxxxxxxxx,
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
Subject:
Re: [PATCH 2/4] arm64: dts: rockchip: enable USB A ports on ArmSoM Sige5
Date: Wed, 04 Jun 2025 15:24:22 +0200
Message-ID: <4317526.1IzOArtZ34@workhorse>
In-Reply-To:
<CABjd4YwtbMTT1W1rEdZzZ=KC3_EXXYKQBsTMiH5mPXPhgvQ=Lw@xxxxxxxxxxxxxx>
References:
<20250603-sige5-updates-v1-0-717e8ce4ab77@xxxxxxxxx>
<5590100.Sb9uPGUboI@workhorse>
<CABjd4YwtbMTT1W1rEdZzZ=KC3_EXXYKQBsTMiH5mPXPhgvQ=Lw@xxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="utf-8"
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wednesday, 4 June 2025 08:52:51 Central European Summer Time Alexey Char=
kov wrote:
On Tue, Jun 3, 2025 at 9:51=E2=80=AFPM Nicolas Frattaroli
<nicolas.frattaroli@xxxxxxxxxxxxx> wrote:
>
> On Tuesday, 3 June 2025 19:01:14 Central European Summer Time Alexey Ch=
arkov wrote:
> > Enable the two USB type A ports (USB2 and USB3) present on the ArmSoM
> > Sige5 board.
> >
> > Both ports use just one xHCI controller, with the USB 2.0 signals fed
> > off the same USB OTG PHY through an onboard hub. VBUS of both ports is
> > controlled by the same GPIO regulator (VCC_USBHOST in the schematics,
> > toggled by GPIO4 RK_PA6).
> >
> > Signed-off-by: Alexey Charkov <alchark@xxxxxxxxx>
> > ---
> > .../boot/dts/rockchip/rk3576-armsom-sige5.dts | 38 ++++++++++++=
++++++++++
> > 1 file changed, 38 insertions(+)
> >
>
> This is already done here:
>
> https://lore.kernel.org/linux-rockchip/20250507-rk3576-sige5-usb-v3-4-8=
9bf5a614ccf@xxxxxxxxxxxxx/
=20
Oh cool! Sorry I missed that one. Your series is much more
comprehensive, so this patch of mine can be dropped. Thanks for your
work!
=20
Would you mind chiming in on the other patches here, given your
knowledge of the hardware?
I gave the others a brief look yesterday, I'll give a more in-depth look
and test today and send you my Tested-by and Reviewed-by.
=20
By the way, you guys don't seem to carry those patches of yours in the
Collabora tree [1]? Nor the TSADC updates as far as I can tell.
=20
[1] https://gitlab.collabora.com/hardware-enablement/rockchip-3588/linux/=
=2D/blob/rockchip-release/arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5.=
dts?ref_type=3Dheads
=20
Yeah, I just sent them upstream directly, since at this stage it wasn't a
SoC and board in wide enough circulation yet where a ready-to-use public
tree with all the in-flight patches made sense for the added chore of
rebasing things when new version of patch series get submitted imho.
Though since some of them have been languishing with no upstream response
for quite a while (*cough* TSADC *cough*) and some more RK3576 hardware,
notably the RADXA ROCK 4D, released in the meantime, it may make sense to
have them included in either our rockchip-release or rockchip-devel tree.
If you want to keep up to date on what's in flight, our RK3576 mainline
status matrix at https://col.la/rk3576status is usually kept fairly up to
date.
Hopefully once v6.16-rc1 drops, upstream maintainers/reviewers are in a
better position to take a look at some of those patch series again, I'll
resubmit them when the time comes. Nothing lights a fire like a RESEND
prefix in a series.
Best regards,
Alexey
=20
Kind regards,
Nicolas Frattaroli
Return-Path: <linux-kernel+bounces-673263-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id C9D3B41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:25:27 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 40598189AE1C
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:24:57 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 69A8028FAA3;
Wed, 4 Jun 2025 13:24:33 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="E46Kh+a0"
Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id E653828FA91
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:24:30 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749043472; cv=none; b=eybDRY0wyJqRPQCD0Dqws0All9d+B6ZlmQF5piYqv2Q3pWvjGYi8mEWVONuZ2tSEtUrW8Wjt1f2ODU2UxHGkOujIwWPxyn6Fzbie+LmY1GdUrhMHho+tQAtnF6EWm9yWyq8JoLQZAZjPLnA+ywAzD/uOuAdpuOJjFKLW+EPznmI=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749043472; c=relaxed/simple;
bh=iKG8NBG/TNLTXbVo9TYujPcytItCDWMbZmRywdSOHNs=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=fVLY92hUj5c03ucVJapLYQ3y40LvFpQVgKvvoCaycrXP4YEc0wRZc0nNv1lI5y6DHMCzorCAgWPAhVcEAbimL8wD/8Vu4tmT3SGZkY9OWfWLNy1pD46LKOJlAOIcXZ5m42n41bpzMt/gcbu3u7cHXJdj4nnlz4ajPHLHTO7c9TA=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=E46Kh+a0; arc=none smtp.client-ip=205.220.168.131
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com
Received: from pps.filterd (m0279865.ppops.net [127.0.0.1])
by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5548envk007519
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:24:30 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h=
cc:content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=qcppdkim1; bh=
5tDhYT9ynoVsxUKkv2VPgtETqP2fOpfi938Os934qGQ=; b=E46Kh+a0iBI+mq5x
F9GIx+ku+J5hK5LZhXVE/j0vWkDSaFM8G0VUdsbo57L3+o8ZLmWK3mQY71qm3IZM
GjAgC+XizzFsQdqrlCcvvM+VoAlGE3cIPdLk0yi2wlX5mMORGQ9CjOpozZ62LOPU
I6mIRpIemXqyH9JSpYn7xsg6MESeitvAlP5guTwq/NkEYDOnyObT9H0cY7cUX84V
4ko1gkks84Eu+SFnINepU4kEC1pdxzc3VINaXVixIMcE8ZJdPAC6tQmavMy7iG0R
yu0/8Q/95mcoYDMN10GiNmz020Vx5SZeFdH99NhC2M+XFdwNEWfNPVGfAM6A6TUG
vPgc3w==
Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198])
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 471g8sx4jk-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT)
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 13:24:30 +0000 (GMT)
Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-7c76062c513so165491485a.3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 06:24:30 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749043469; x=1749648269;
h=content-transfer-encoding:in-reply-to:from:content-language
:references:cc:to:subject:user-agent:mime-version:date:message-id
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=5tDhYT9ynoVsxUKkv2VPgtETqP2fOpfi938Os934qGQ=;
b=vo8ztrxgsn9zRoINjywK1PGKgvxA/j7EvvlYcVvRF+vQj7VMhN8NTyFRfrkLLEnx5g
enwg/mTe0F3LjI3zTyiwQq1JBP/SiGv9yeJveIv3pukbOrf7mDS8HmO3/rhQLvjVg3e2
x/9RwjPfWhj21ZV6j9M1XKocBxzhTMhBgEDz5VcD1/3xBHj8dWDDVprWUtodix2abM4P
s4/Ck7lS+Evj8rE05mdWzjb5V0vMv7UYBg/aDqJGeHsyjLEL8ngNuQSGxXQ7Hk6GxQqZ
5bpeCc1UZYa0Egs8XxIhtULoJ88V52m7KBDdbZo3PJXEzXq4p3IgSJMZ8ghqFwJabv79
g0lA==
X-Forwarded-Encrypted: i=1; AJvYcCU8+iYcffntU2Zb+sSAAj96Yesi6eN0yXeONI56eMFsVjai8rzzFXMIU9P/QCrjVcgxwDfJSt6S6bO/XxI=@vger.kernel.org
X-Gm-Message-State: AOJu0YwrukwGxXLGJtFwFYKilP1YkoXISOjXcj4QLLln9iPa80zVxhQI
ewqeV5q1pipAxfr+m0bIJpeu7xkwKJaSl8O+JushrBxPgdWcCBP8Mrm0ZM4ikCKMoywFmDLw5PO
eIHzFmKdfibitw+TTGXNVyuJPELmWXvmCxrW13VNnnYDMHaGlqAnaEKQMYEO4GAQ7/LdkB9tOTm
8=
X-Gm-Gg: ASbGncu5qjuS9oACqWmGjXKBp7hsXbiRmZpjDmE4V74TudRAuO/ZmeEfgaDqg5jLEll
TZu1u/6Kzfu22+k2KfqX3K/mFbNHW+zIyQcvurto7ckzjgvshi3TeKAlrob8TwFwPsCZ556F2GH
bgGaGyhGsne2a79zistpW5/vtywCrksqDxwdlWqSft5pyOTqs85uoMOqLrnpB7YxBbF3goPEaHd
FG2b1Hm8UQaANxelN6yUwDUDWvd8EU2XeIx0GxknLnAmWtfRPqZIa/iKBz2C3sOLI+yxpUTUMf7
oMdtUevEAqGQh7Z1I6+/rZyaThA9vSzUqGmf6TWMjxwaQZmnEQiWhol7WFCHZ5UFgw==
X-Received: by 2002:a05:620a:284f:b0:7c0:c024:d5 with SMTP id af79cd13be357-7d2198a4bcamr182103285a.8.1749043468658;
Wed, 04 Jun 2025 06:24:28 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IHp4FAWQb08lT7tzFsZcGvaXN1AR/3mpBEQNehhZ0tFk6Uq8YusaA5kooOfzLi9N2bN1wu3MA==
X-Received: by 2002:a05:620a:284f:b0:7c0:c024:d5 with SMTP id af79cd13be357-7d2198a4bcamr182101485a.8.1749043468299;
Wed, 04 Jun 2025 06:24:28 -0700 (PDT)
Received: from [192.168.65.90] (078088045245.garwolin.vectranet.pl. [78.88.45.245])
by smtp.gmail.com with ESMTPSA id a640c23a62f3a-adb390f09c8sm845637866b.45.2025.06.04.06.24.26
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 06:24:27 -0700 (PDT)
Message-ID: <77ea49c3-f042-4ba9-a0da-1d0e4e4088d3@xxxxxxxxxxxxxxxx>
Date: Wed, 4 Jun 2025 15:24:25 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v7 2/3] arm64: dts: qcom: qcs615: add venus node to
devicetree
To: Renjiang Han <quic_renjiang@xxxxxxxxxxx>,
Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
Cc: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>,
Vikash Garodia <quic_vgarodia@xxxxxxxxxxx>,
Dikshita Agarwal <quic_dikshita@xxxxxxxxxxx>,
Bryan O'Donoghue <bryan.odonoghue@xxxxxxxxxx>,
Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>,
Bjorn Andersson <andersson@xxxxxxxxxx>,
Konrad Dybcio <konradybcio@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Conor Dooley
<conor+dt@xxxxxxxxxx>, linux-media@xxxxxxxxxxxxxxx,
linux-arm-msm@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx
References: <20250527-add-venus-for-qcs615-v7-0-cca26e2768e3@xxxxxxxxxxx>
<20250527-add-venus-for-qcs615-v7-2-cca26e2768e3@xxxxxxxxxxx>
<429b4c99-b312-4015-8678-0371eac86de4@xxxxxxxxxxxxxxxx>
<6a9e7daf-c0df-42db-b02d-96d9893afcde@xxxxxxxxxxx>
<idc4476ibh4geraklzpas5536jnwvbp6xhjjaajcdcwxicorrf@myh7kyz77rxy>
<43e1f8db-5ab1-44ce-97c8-50910704788f@xxxxxxxxxxx>
<d6udpwmocodvlsm5ljqz7zbyonj2yahtlzmm2jjjveqrm2hmkz@andh5j4jgixr>
<9faff664-9717-4259-8b23-bc44e64f6947@xxxxxxxxxxx>
Content-Language: en-US
From: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
In-Reply-To: <9faff664-9717-4259-8b23-bc44e64f6947@xxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Authority-Analysis: v=2.4 cv=RMizH5i+ c=1 sm=1 tr=0 ts=6840490e cx=c_pps
a=qKBjSQ1v91RyAK45QCPf5w==:117 a=FpWmc02/iXfjRdCD7H54yg==:17
a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10 a=COk6AnOGAAAA:8 a=ONiuQb8ssYXyuzXnhScA:9
a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=NFOGd7dJGGMPyQGDc5-O:22
a=TjNXssC_j7lpFel5tvFf:22
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDEwMiBTYWx0ZWRfXxeTAXRY72OrS
QRk5mQ3xiIG58HsNUPYi3Ej7DvQ1/n98yoOcvbQMC2E2B667OT2dLfMM6zYGW/zW+3tyUTJXri5
DaSbij6xWxIiGPI+W9UGZxvW65BPTvt4HC6H5wKpKWHICDEYxzyHHvx7Bm4Wj8MGE4QRYg/xLXr
C9x/+L6iXrSLbezX0ksLaGLTiqyTH5YZlfKWF4W+G4WIGzyPDkp59nVIjBMKPOu1Fbnp2IgjUvt
kNVm9DzEsMg4Ut2MkzfNITOtRYahvpSXb/U2gCUo/Rub9ymxHSaZIzOQ4s4XiYeNP/+unjMORA+
7dGQm5jhNCUuHUwqgJd5aNE9P2lds2h/ANdrs0dS1lIhJEYTRWCh+EdYotQc5Oq6Z85evS0ZKyE
bvJsZVykgjmMVSka+DrdHcw5ZuAjPdEnZ8yYvebotZHgEcS9v5yhGjOM93+kWEN5UGuXFHfN
X-Proofpoint-GUID: x-b_dxFKrYCuDwG9UO1X4YFW035L4GJS
X-Proofpoint-ORIG-GUID: x-b_dxFKrYCuDwG9UO1X4YFW035L4GJS
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
impostorscore=0 phishscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0
bulkscore=0 suspectscore=0 adultscore=0 mlxlogscore=999 mlxscore=0
clxscore=1015 priorityscore=1501 classifier=spam authscore=0 authtc=n/a
authcc= route=outbound adjust=0 reason=mlx scancount=1
engine=8.19.0-2505280000 definitions=main-2506040102
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 6/4/25 2:05 PM, Renjiang Han wrote:
On 6/3/2025 9:21 PM, Dmitry Baryshkov wrote:
On Thu, May 29, 2025 at 10:29:46AM +0800, Renjiang Han wrote:
On 5/28/2025 7:04 PM, Dmitry Baryshkov wrote:
On Wed, May 28, 2025 at 05:13:06PM +0800, Renjiang Han wrote:
On 5/27/2025 9:57 PM, Konrad Dybcio wrote:
On 5/27/25 5:32 AM, Renjiang Han wrote:
Add the venus node to the devicetree for the qcs615 platform to enable
video functionality. The qcs615 platform currently lacks video
functionality due to the absence of the venus node. Fallback to sc7180 due
to the same video core.
Signed-off-by: Renjiang Han <quic_renjiang@xxxxxxxxxxx>
---
[...]
+ interconnect-names = "video-mem",
+ "cpu-cfg";
+
+ iommus = <&apps_smmu 0xe40 0x20>;
fwiw docs mention 0xe60 0x20 (which result in the exact same resulting sid)
OK. Will update it with next version.
How would you update this?
Thanks for your comments. I'll update it like this.
iommus = <&apps_smmu 0xe60 0x20>;
This 0xe40 SID was based on a previous project. However, after rechecking
the documentation yesterday and confirming with colleagues, the correct
SID value should be 0xe60. I’ve also validated it on local device, it
works as expected. The reason 0xe40 seemed to work earlier is due to the
mask value being 0x20, which causes the effective SID derived from 0xe40
to be the same as 0xe60.
Using 0xe60 would be counterintuitive, as we have a non-zero masked bits
in the base value. It should be either <0xe60 0x0> or <0xe40 0x20>.
Hi Dmitry
Thank you for your comment.
I’ve followed up on this sid with a colleague from the kernel team,
and based on our discussion, it seems that the sid in this case should
be the result sid. The actual sid is 0xe60, and with a mask of 0x20,
the resulting sid would be 0xe40. Therefore, it should be <0xe40 0x20>.
@Konrad, I’d appreciate any thoughts or suggestions you might have on it.
What our docs describe as 'result sid' is literally 'base ~& mask', so if
we used that, setting the mask would be useless..
Now, some old NHLOS builds are known to cause issues if the values aren't
exactly what they expect (some whitelisting must be going on there).
I don't think this should be an issue on this platform, but let's just
use 0xe60 0x20 here to reflect the real values
Konrad
Return-Path: <linux-kernel+bounces-673265-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id A1F7F41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:25:45 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id D9C17188BE15
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:25:15 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id AA7DC28FFC8;
Wed, 4 Jun 2025 13:24:43 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="U3xPktd4"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 593CB28FA8A
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:24:41 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749043482; cv=none; b=DWOrR9qiRyg98nO7oEFbWE/xTFeeHgsL6nbmXc+2t7rVegVoejEKIobZv/iwQ48sq+1Rv0ahCYhV4ehf+F1qfcQZaZ0hPWTnFU/lwj4QOq8XgGXJSmzRrCKsRI5i/uu3+bw84Dp0ovAalgLHStbpgGdl54riFXiWjSfFVkkivN8=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749043482; c=relaxed/simple;
bh=v1Ep1ucccoQBByAZCYErl/ukOngwbfZNujIPfr7895U=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=JSh1J4nzh1cNwOmm+HzZu5ibusZX2y9blFNLlM0r5Sc/d7XvE+todkwS6oOHSipaOTfIZ54ROhmuKbkHYNLVeMA45Gxgev1yMMHf/hoOBxsB0XEPZ8yIrd4z2cb3x0mesaQzsj+XlHbzhr/oMT44MKjzZeyTq9euzqS24gr0kYI=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=U3xPktd4; arc=none smtp.client-ip=170.10.129.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749043480;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=l0HqXlhl/L2ezUF6gTT9X156Dq0f+cYoad9TrL2Oo3g=;
b=U3xPktd4mb493NB0I4YVIqwcYG/nW4d9dPEUgfHgJe3BLMwyPYoA64dUjmf/UU+1MxRTRm
n+co8XGM9/j2HO5Kl1oYbs9ArCj2cGQzEAynq/bofrjEV12x3bYlEMdB2uyuSaM6JQcqZy
0odsZUgJg8OXjwIxYnW3OIVuTdukiRA=
Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com
[209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-611-aCHutsQXO_SevYgnpjTIpQ-1; Wed, 04 Jun 2025 09:24:39 -0400
X-MC-Unique: aCHutsQXO_SevYgnpjTIpQ-1
X-Mimecast-MFC-AGG-ID: aCHutsQXO_SevYgnpjTIpQ_1749043478
Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-442dc702850so46632435e9.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 06:24:39 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749043478; x=1749648278;
h=content-transfer-encoding:in-reply-to:organization:autocrypt
:content-language:from:references:cc:to:subject:user-agent
:mime-version:date:message-id:x-gm-message-state:from:to:cc:subject
:date:message-id:reply-to;
bh=l0HqXlhl/L2ezUF6gTT9X156Dq0f+cYoad9TrL2Oo3g=;
b=gZVSJ83PKCkTvzoYM99+WB9z9qeqXYbjd9iVO6MthyZCs0ykLkB1/Jeqs6sdbTvr9g
/S0DJw5aRNIy8sgfxSni9duBkGUjza0gJmI876ecppmJAAj+W5kiRp5d/tcf5Jfji4MS
83Hn4214baTrB09fUj+aNXoJJZOorKlNvrwEiwncRcazSOVt6YA5uJ7nt0mZkpYoIiIM
gRZaeuGqa6kjXNULkvbrlHEUO3jTez6Q2GnjXN/AxvEv0JnDSitNgxWXybjaItUuTYi7
DGmHCBKlA9lkHbZImvyXpGfLrH+0Yqr1/hROnyLPuyok8a6NKVEtk+N9DGIxWefDMzpu
SXyg==
X-Forwarded-Encrypted: i=1; AJvYcCXzSzCQYN9PC9Raf55LNnZQI8n+djHpAEyrsnSt33SQyCxwpZOGv+QjzrYMjjdNRvWokIap7HLSUY9h16A=@vger.kernel.org
X-Gm-Message-State: AOJu0Yw2VIkKZs+9FvGz9vTvwdvO0Vi/WF/aQOncsFZQAZRwLHWEPkCC
NPQvRs6O/TaqEcAK1h8QOg0G+kqlei8iHqgSPiVUU0nc+vqrb1omxIfGNZ25ESQ4XXt1paAvSJ2
Kw7pNjsfx3Men4Wy/fgKHW7EliBH5DcZsCpF9UnuU/iz5xOIT3yIY3HZ/SWmK4+E6JQ==
X-Gm-Gg: ASbGncuNJAVHD1MvW2mmZBamax7uIKfYXmkUvLLGTbLXaVtIu9F6u7iKGd4s26K6PBg
wekAp+5J6gwgggd05x2rdM55vO2VUDo8xfb8pGyJOOpCJWkSNYHdhVP6qUp1ODusJG810MGYgjT
ZpncQvshQ90TYMgl8mvfBb4uj6EEmXFpAFTvK1giPFVfRMccym4LPR6rfdKXM3XWP+c37PCG1iK
jtLHkW2dsQjvllzmhVT9Z7bP+mSMltgskNDSSfkduKniSUk+Pq52LD8NKSV0nuaezcM1Xb9ijGu
pLHzKx/iE2DNaHH8QHETgvGW8sXUlYf02llsljBrX9rct15xOiN47/7tavqMQoSAwfu4Tht0nQd
GIEcOneHkTXIFJPZ8Y2EJ+Zf97CHHNmuF9wEdXpksp1HThU3q1w==
X-Received: by 2002:a05:600c:1c12:b0:450:d01e:78e1 with SMTP id 5b1f17b1804b1-451f0a9e635mr26402435e9.9.1749043478230;
Wed, 04 Jun 2025 06:24:38 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IEd2/tBBQLTI+HBmAaYGGCI82okGi/UzuUQ9dQJX1wQTpqDCUh9d9UOm7Jw+PZsFTgsg4Z6pg==
X-Received: by 2002:a05:600c:1c12:b0:450:d01e:78e1 with SMTP id 5b1f17b1804b1-451f0a9e635mr26402115e9.9.1749043477857;
Wed, 04 Jun 2025 06:24:37 -0700 (PDT)
Received: from ?IPV6:2003:d8:2f1b:b800:6fdb:1af2:4fbd:1fdf? (p200300d82f1bb8006fdb1af24fbd1fdf.dip0.t-ipconnect.de. [2003:d8:2f1b:b800:6fdb:1af2:4fbd:1fdf])
by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-450d8000e3esm198995665e9.22.2025.06.04.06.24.36
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 06:24:37 -0700 (PDT)
Message-ID: <7cea73af-f25d-4787-89e6-cb42f5da169b@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 15:24:36 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH 3/3] userfaultfd: remove UFFD_CLOEXEC, UFFD_NONBLOCK, and
UFFD_FLAGS_SET
To: Tal Zussman <tz2294@xxxxxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Peter Xu <peterx@xxxxxxxxxx>,
"Jason A. Donenfeld" <Jason@xxxxxxxxx>,
Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>,
Christian Brauner <brauner@xxxxxxxxxx>, Jan Kara <jack@xxxxxxx>,
Pavel Emelyanov <xemul@xxxxxxxxxxxxx>, Andrea Arcangeli <aarcange@xxxxxxxxxx>
Cc: linux-mm@xxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
linux-fsdevel@xxxxxxxxxxxxxxx
References: <20250603-uffd-fixes-v1-0-9c638c73f047@xxxxxxxxxxxx>
<20250603-uffd-fixes-v1-3-9c638c73f047@xxxxxxxxxxxx>
From: David Hildenbrand <david@xxxxxxxxxx>
Content-Language: en-US
Autocrypt: addr=david@xxxxxxxxxx; keydata=
xsFNBFXLn5EBEAC+zYvAFJxCBY9Tr1xZgcESmxVNI/0ffzE/ZQOiHJl6mGkmA1R7/uUpiCjJ
dBrn+lhhOYjjNefFQou6478faXE6o2AhmebqT4KiQoUQFV4R7y1KMEKoSyy8hQaK1umALTdL
QZLQMzNE74ap+GDK0wnacPQFpcG1AE9RMq3aeErY5tujekBS32jfC/7AnH7I0v1v1TbbK3Gp
XNeiN4QroO+5qaSr0ID2sz5jtBLRb15RMre27E1ImpaIv2Jw8NJgW0k/D1RyKCwaTsgRdwuK
Kx/Y91XuSBdz0uOyU/S8kM1+ag0wvsGlpBVxRR/xw/E8M7TEwuCZQArqqTCmkG6HGcXFT0V9
PXFNNgV5jXMQRwU0O/ztJIQqsE5LsUomE//bLwzj9IVsaQpKDqW6TAPjcdBDPLHvriq7kGjt
WhVhdl0qEYB8lkBEU7V2Yb+SYhmhpDrti9Fq1EsmhiHSkxJcGREoMK/63r9WLZYI3+4W2rAc
UucZa4OT27U5ZISjNg3Ev0rxU5UH2/pT4wJCfxwocmqaRr6UYmrtZmND89X0KigoFD/XSeVv
jwBRNjPAubK9/k5NoRrYqztM9W6sJqrH8+UWZ1Idd/DdmogJh0gNC0+N42Za9yBRURfIdKSb
B3JfpUqcWwE7vUaYrHG1nw54pLUoPG6sAA7Mehl3nd4pZUALHwARAQABzSREYXZpZCBIaWxk
ZW5icmFuZCA8ZGF2aWRAcmVkaGF0LmNvbT7CwZgEEwEIAEICGwMGCwkIBwMCBhUIAgkKCwQW
AgMBAh4BAheAAhkBFiEEG9nKrXNcTDpGDfzKTd4Q9wD/g1oFAl8Ox4kFCRKpKXgACgkQTd4Q
9wD/g1oHcA//a6Tj7SBNjFNM1iNhWUo1lxAja0lpSodSnB2g4FCZ4R61SBR4l/psBL73xktp
rDHrx4aSpwkRP6Epu6mLvhlfjmkRG4OynJ5HG1gfv7RJJfnUdUM1z5kdS8JBrOhMJS2c/gPf
wv1TGRq2XdMPnfY2o0CxRqpcLkx4vBODvJGl2mQyJF/gPepdDfcT8/PY9BJ7FL6Hrq1gnAo4
3Iv9qV0JiT2wmZciNyYQhmA1V6dyTRiQ4YAc31zOo2IM+xisPzeSHgw3ONY/XhYvfZ9r7W1l
pNQdc2G+o4Di9NPFHQQhDw3YTRR1opJaTlRDzxYxzU6ZnUUBghxt9cwUWTpfCktkMZiPSDGd
KgQBjnweV2jw9UOTxjb4LXqDjmSNkjDdQUOU69jGMUXgihvo4zhYcMX8F5gWdRtMR7DzW/YE
BgVcyxNkMIXoY1aYj6npHYiNQesQlqjU6azjbH70/SXKM5tNRplgW8TNprMDuntdvV9wNkFs
9TyM02V5aWxFfI42+aivc4KEw69SE9KXwC7FSf5wXzuTot97N9Phj/Z3+jx443jo2NR34XgF
89cct7wJMjOF7bBefo0fPPZQuIma0Zym71cP61OP/i11ahNye6HGKfxGCOcs5wW9kRQEk8P9
M/k2wt3mt/fCQnuP/mWutNPt95w9wSsUyATLmtNrwccz63XOwU0EVcufkQEQAOfX3n0g0fZz
Bgm/S2zF/kxQKCEKP8ID+Vz8sy2GpDvveBq4H2Y34XWsT1zLJdvqPI4af4ZSMxuerWjXbVWb
T6d4odQIG0fKx4F8NccDqbgHeZRNajXeeJ3R7gAzvWvQNLz4piHrO/B4tf8svmRBL0ZB5P5A
2uhdwLU3NZuK22zpNn4is87BPWF8HhY0L5fafgDMOqnf4guJVJPYNPhUFzXUbPqOKOkL8ojk
CXxkOFHAbjstSK5Ca3fKquY3rdX3DNo+EL7FvAiw1mUtS+5GeYE+RMnDCsVFm/C7kY8c2d0G
NWkB9pJM5+mnIoFNxy7YBcldYATVeOHoY4LyaUWNnAvFYWp08dHWfZo9WCiJMuTfgtH9tc75
7QanMVdPt6fDK8UUXIBLQ2TWr/sQKE9xtFuEmoQGlE1l6bGaDnnMLcYu+Asp3kDT0w4zYGsx
5r6XQVRH4+5N6eHZiaeYtFOujp5n+pjBaQK7wUUjDilPQ5QMzIuCL4YjVoylWiBNknvQWBXS
lQCWmavOT9sttGQXdPCC5ynI+1ymZC1ORZKANLnRAb0NH/UCzcsstw2TAkFnMEbo9Zu9w7Kv
AxBQXWeXhJI9XQssfrf4Gusdqx8nPEpfOqCtbbwJMATbHyqLt7/oz/5deGuwxgb65pWIzufa
N7eop7uh+6bezi+rugUI+w6DABEBAAHCwXwEGAEIACYCGwwWIQQb2cqtc1xMOkYN/MpN3hD3
AP+DWgUCXw7HsgUJEqkpoQAKCRBN3hD3AP+DWrrpD/4qS3dyVRxDcDHIlmguXjC1Q5tZTwNB
boaBTPHSy/Nksu0eY7x6HfQJ3xajVH32Ms6t1trDQmPx2iP5+7iDsb7OKAb5eOS8h+BEBDeq
3ecsQDv0fFJOA9ag5O3LLNk+3x3q7e0uo06XMaY7UHS341ozXUUI7wC7iKfoUTv03iO9El5f
XpNMx/YrIMduZ2+nd9Di7o5+KIwlb2mAB9sTNHdMrXesX8eBL6T9b+MZJk+mZuPxKNVfEQMQ
a5SxUEADIPQTPNvBewdeI80yeOCrN+Zzwy/Mrx9EPeu59Y5vSJOx/z6OUImD/GhX7Xvkt3kq
Er5KTrJz3++B6SH9pum9PuoE/k+nntJkNMmQpR4MCBaV/J9gIOPGodDKnjdng+mXliF3Ptu6
3oxc2RCyGzTlxyMwuc2U5Q7KtUNTdDe8T0uE+9b8BLMVQDDfJjqY0VVqSUwImzTDLX9S4g/8
kC4HRcclk8hpyhY2jKGluZO0awwTIMgVEzmTyBphDg/Gx7dZU1Xf8HFuE+UZ5UDHDTnwgv7E
th6RC9+WrhDNspZ9fJjKWRbveQgUFCpe1sa77LAw+XFrKmBHXp9ZVIe90RMe2tRL06BGiRZr
jPrnvUsUUsjRoRNJjKKA/REq+sAnhkNPPZ/NNMjaZ5b8Tovi8C0tmxiCHaQYqj7G2rgnT0kt
WNyWQQ==
Organization: Red Hat
In-Reply-To: <20250603-uffd-fixes-v1-3-9c638c73f047@xxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 04.06.25 00:14, Tal Zussman wrote:
UFFD_CLOEXEC, UFFD_NONBLOCK, and UFFD_FLAGS_SET have been unused since they
were added in commit 932b18e0aec6 ("userfaultfd: linux/userfaultfd_k.h").
Remove them and the associated BUILD_BUG_ON() checks.
Signed-off-by: Tal Zussman <tz2294@xxxxxxxxxxxx>
---
Acked-by: David Hildenbrand <david@xxxxxxxxxx>
--
Cheers,
David / dhildenb
Return-Path: <linux-kernel+bounces-673266-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id BBE9941E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:26:41 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id EC1D01731D7
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:26:42 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id A0AE828F958;
Wed, 4 Jun 2025 13:26:36 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="iLg2oHSO"
Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2050.outbound.protection.outlook.com [40.107.220.50])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 046CE1EF395
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:26:32 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.50
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749043595; cv=fail; b=MH1L6ywtgTx47zKn4EgDb7HVD5Ia0IWML02QPvkyvXU7ie4N/Wfz2HswznnsXVioJ6pXqYh5zV1e3THB0kLWRGy5uAkmQuDamvLqcsBEMKjvrufaxh252Rj35zxRxx7YRElh2gUA1CERZ2rI0GojFkcPcJ/VgHrzQ+fKKn+upAU=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749043595; c=relaxed/simple;
bh=Qq/ylQj8aRqCGaRWavUDFqrG4XgP3DinYVvofluMSNs=;
h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
Content-Type:MIME-Version; b=F4OIXcG9AZO8jV8ACF9slVcIWlQBtJ2ZChQElmtkwbMAO7zkouilWRcYVD8Q2lNP0lY7tagjO7v4KHK9dh9/mLTrwBv0+WwFlEBZlfParVhlhVysLIE0Dw30f2qmj/P9oYJtR2YcWfouljbBB8MhpuHjf0pDpnQ9d3kAkmSOAM4=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=iLg2oHSO; arc=fail smtp.client-ip=40.107.220.50
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com
Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=ODBo2Yc4L0n9HtX0rosuo/j2BQ5+dvsmwYmB1HM53XjpqPzVbr7XyG//qh2cf2fkRhpQSUJIYk2x3zM/vfJFMXe406b7712mqNKV7lczlO/oEVkqPlEa+AD6WqigiabNpeSeRG5P5I0HZjlbSp1QFLSY/n+khrtWvLpoiTEzkMxefkQeX/i3u+5wN/rWgxTbv8UPnYI7zF6UXWhN1ZTycgW9arIynDmI1TC0cC10D64UJ418wzGKL+SEGaarLtoItLCuouPekecn4Ia3s3fZMYe8KbQoucxacwwy+1SrGEeMCSsKuCc5IKBi+ljBXOru5KkIK5fgFammEgziQwqctw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=Qq/ylQj8aRqCGaRWavUDFqrG4XgP3DinYVvofluMSNs=;
b=ClYRU+ifHNTyH+qrsorXmsVK4msKu0dsFqtu6nWLp87NP5E50EfK6OQX1NPdduloTUz5iOMo4pJORjDuHEM3rivQXDdiVxrrePNaIv01A30786cnkijaj8v7S80HP1eVKiBvJSdCTP8qP0/do6TIi1rykNaHsNBVc42VZ2tVrXV+V+nRZb87vygHelKQE7JfEYiEevzKsjWV9kPDskueptaxZwAGAhbVhnGwwdULhw4N0FAuFtP30t2mH/LBMiY1QSmwW/LVghvDBMjeTqDPyVklLlP5dsbTrE5vfZNn3jBQFcor62R401DKuudrrlqmeptJN/HUZy+iDUSKYdztDQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com;
dkim=pass header.d=nvidia.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;
s=selector2;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=Qq/ylQj8aRqCGaRWavUDFqrG4XgP3DinYVvofluMSNs=;
b=iLg2oHSOOAP6G6lYt7i1vUw3jj2nGI66PWvUMxTessKI9Mwyyc/2frJQXdWIboTEgbuR3cQZk0fteNPwtL1nJl/bDleZNQ1dn+NtISrzmkexZgFS4DZ1P2InCn29jg0HfDtVUMnUxX9HNz2vSWnq2uEIhgjbm7gDimZgnQSHuiLblBQHK2Rr6vilWqnDowK2OHPdvQXnQKwEFM9mnB1zTz5q2oxRoegTuaZvhGtjL2Z3j7yDTxmoNekE9APGDfF7UvOSPYIfL4sBoPwCk5hVLSsW67D6UbearcYe7Ra/UElTlOvI7Vck7Zkr28JITzTymmSSnuGhLsESbOX90hl6oQ==
Authentication-Results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=nvidia.com;
Received: from DS7PR12MB9473.namprd12.prod.outlook.com (2603:10b6:8:252::5) by
PH8PR12MB7277.namprd12.prod.outlook.com (2603:10b6:510:223::13) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8769.29; Wed, 4 Jun
2025 13:26:29 +0000
Received: from DS7PR12MB9473.namprd12.prod.outlook.com
([fe80::5189:ecec:d84a:133a]) by DS7PR12MB9473.namprd12.prod.outlook.com
([fe80::5189:ecec:d84a:133a%5]) with mapi id 15.20.8792.034; Wed, 4 Jun 2025
13:26:28 +0000
From: Zi Yan <ziy@xxxxxxxxxx>
To: Anshuman Khandual <anshuman.khandual@xxxxxxx>
Cc: david@xxxxxxxxxx, Liam.Howlett@xxxxxxxxxx, akpm@xxxxxxxxxxxxxxxxxxxx,
isaacmanjarres@xxxxxxxxxx, jyescas@xxxxxxxxxx, kaleshsingh@xxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx, lorenzo.stoakes@xxxxxxxxxx,
masahiroy@xxxxxxxxxx, mhocko@xxxxxxxx, minchan@xxxxxxxxxx, rppt@xxxxxxxxxx,
surenb@xxxxxxxxxx, tjmercier@xxxxxxxxxx, vbabka@xxxxxxx
Subject: Re: [PATCH] mm: rename CONFIG_PAGE_BLOCK_ORDER to
CONFIG_PAGE_BLOCK_ORDER_CEIL.
Date: Wed, 04 Jun 2025 09:26:25 -0400
X-Mailer: MailMate (2.0r6257)
Message-ID: <957DB2F9-9C7E-486E-95EA-1E6574F82D4B@xxxxxxxxxx>
In-Reply-To: <d6f18e51-47a4-498c-ad66-60fa2d8efbfc@xxxxxxx>
References: <20250603154843.1565239-1-ziy@xxxxxxxxxx>
<d6f18e51-47a4-498c-ad66-60fa2d8efbfc@xxxxxxx>
Content-Type: text/plain
X-ClientProxiedBy: BL1PR13CA0361.namprd13.prod.outlook.com
(2603:10b6:208:2c0::6) To DS7PR12MB9473.namprd12.prod.outlook.com
(2603:10b6:8:252::5)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: DS7PR12MB9473:EE_|PH8PR12MB7277:EE_
X-MS-Office365-Filtering-Correlation-Id: 8d970d64-c01a-4a08-0fdd-08dda36b69bf
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014|7416014;
X-Microsoft-Antispam-Message-Info:
=?us-ascii?Q?aalxr7N6Tfj8xdjW3xH65B2EH4u1zj/0ctNIRWVzYQ74UUEO9F10N16T1WL6?=
=?us-ascii?Q?ofdZQYKzEzRKf3sTi0VbwUJFuivaAzxZWRsVYZmrDh33ylX3m8G2ZRUjGtXr?=
=?us-ascii?Q?JrSDXFrVETIegQafOOFUozeS6voJYWmCmyIOQ9gvWR6T0/pnl6bCaZAhcj4N?=
=?us-ascii?Q?NaAtSxjSLULDLDOIWT6+Ds0enN7u7EYRMpuUNdjJwleE9LnwC6//9fBiaj1B?=
=?us-ascii?Q?fNDy8bpMQ+y/r5u7vd6pHZUhTS7O08/0oAyds/tWBpDWVp8unyxoFAxbsRGQ?=
=?us-ascii?Q?xdGsBuz34AMz74+bbC4kxbqctILyDKGIFKPvhmBEkk11Wap/3HDzwweB+kjz?=
=?us-ascii?Q?t9L+tq0eyq5M0mjjIVb72IuxKMTtFwjN0p6jWWoaGXhgtT29c0PqjXRktAxU?=
=?us-ascii?Q?FuiYFiVzL/wenORuf6yXpwRRJ3WVrjtH1f6TGG+dVycbyP7JtTf4SI4N46Jg?=
=?us-ascii?Q?QZnQDo8yJ6ibFQjV41EF1nnQRhExsply4s0ptfRxiz8OB2YQA645SJhSTXau?=
=?us-ascii?Q?r3pDjh6I1Zv84L+ugSo19+pNKh/0pCcDySQ9ZoLKBKj0ZjKKQhVbbgHlai8q?=
=?us-ascii?Q?yAMWR3U1OnEPpSYi0Yey+NyKvGGWxqZJb1CXRNuUDKtqBhdC/hfK5QWdOqRt?=
=?us-ascii?Q?wsB8UhiFCobXIaMkHGXXb+xWI1TPbhn1PET7jhzmvLXp+6GuGramRFAavxPT?=
=?us-ascii?Q?wKR0T2nU2coqT3Y5m3PuwH3XxV3RZLr6B0jNCsNMW7HQ3HPfiyOatDlFiQLB?=
=?us-ascii?Q?iaE7365zzre3caq+bOeSinq/w7uGtAG8l2Xo+S4l/Wne5lm4SCFj9aaNFTNb?=
=?us-ascii?Q?TtZrSbExgI5eIBz0MGIPz1A+g6XNvTs1O17OCGvhI4m+xl+GFSeepiVoSwZ0?=
=?us-ascii?Q?z6jsYyUqaruRs5Y94k9TdjyGhv4/MnriU3iuN0xZb0DghtISjsKc/YAwK6PD?=
=?us-ascii?Q?m5QR1OtY1wNACIfUP4oAloHP84BxrOEv82qlrgYGzYX7Svf8WIgORsq3RDHF?=
=?us-ascii?Q?k4fefBjz7AEz/Jaj1sCvjLrQ29FJLDayXmUU0gwDdkMPX4YFr75a4drmfazB?=
=?us-ascii?Q?+3RT8Z9Q/ND9bnyKuPJkbimGruBK23yeC+ZMEi2dV0RKwarQi9aEBEscTt+c?=
=?us-ascii?Q?S7n3YJMk/z2/qKuTt1xnS+3iJ1IeU5N0tCCBwMeRKWe7TARDYG3fVmJnEZ4u?=
=?us-ascii?Q?4AbO1PgXbYWHlnU23eDJ9ZLIbbn3+LAXRHONTaQR0De5GY6Vjh3XPUgzCHkw?=
=?us-ascii?Q?MQI4KUUpb4EPMATNy307Z7P0Xi9ILNcAFNXCiXSXQpvLMR6E4uxcvQSxcg64?=
=?us-ascii?Q?OntI4cwdwPLInGkoBjd21gXz6ZIbWtJRrxkIcf3OyHe52ROMd0Y+A9IC6P1h?=
=?us-ascii?Q?BaMAUbDqSaD3Nso2JfzYBiFds3QpuPO7/iUpen4WRl9Qgidr9mZRwI7N/jGt?=
=?us-ascii?Q?1tWL9so2hMc=3D?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR12MB9473.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014)(7416014);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?us-ascii?Q?yOq8nGm5W7vKQpKHrYcr7/Iq22lUFZp9I8o3s7dWbAMRSx0dpF+XSuvqT9Fz?=
=?us-ascii?Q?s1kHjAQNSo7AKmrZJsW52i7BANiqYUBd6zRCJ60mQIOJjdVU2Tiv5+cSfh2O?=
=?us-ascii?Q?g0SZQCeYl2C0WXjVqUGKk8E5Tm+EL5rET4+WSD853csLG+no5lRiebOSh+Aq?=
=?us-ascii?Q?ZyoyXXRNGRWAHNjBj7OeFPAK8FxWSMbAEpkU0TmC1qD6x9ODimsmKj9aCYag?=
=?us-ascii?Q?ccI54kdJ2s7OLh18BB4IRDaGtjqke7OS8JXPwB2egPWcpx1f3mdkmXnDX+Ll?=
=?us-ascii?Q?OW/lC9k1EyhNT9friY1YzixHureW+BvYQa6HiETmyTB9vsza6ySl4kNBL70f?=
=?us-ascii?Q?WczW1Klh5QCNReg75y8YaMsRoLVG3Vex7X7qRA0sCIjX2sf0x1qpXVKB8Mv3?=
=?us-ascii?Q?MYNFiINgVa1K5pRNJKui48TOo+XjWlLYMfdcu4/J8IYE4VkMfRs7ovtiA9xF?=
=?us-ascii?Q?8r92hXuefCDTx3glrTjsfHIv/4lrxzA3GRMUzXgur8brx38eCtRzC1Urqzbz?=
=?us-ascii?Q?xEVReH44RGAvC8k6FQdONRhdF/Yu13cIfQzXGIKbiB7auATxt8r9HllEP1MV?=
=?us-ascii?Q?Kw18f1HX0VAAu+oVZPz7n27UYSvI/A1LGlemB6DVIoKm9SYmQU2wl1I/3Vkm?=
=?us-ascii?Q?ogYKKX5SHy8Gr0qToYJ4DO6JRV1UmLYx5oDtD8vlfy8ma/l2rfJ0//i+pPcg?=
=?us-ascii?Q?GDRZRe+x/9zAA8q0Cs0kCpnvPJtJzv+SrSr3afTjtx+CYOswU1+Yc5qBlSPZ?=
=?us-ascii?Q?sXoLEzS/pjCLWjWP2Schna6XeS5ktKGTU5p5zLCNfP6c/htEFRvMPne+xaxt?=
=?us-ascii?Q?+kzQ9igKRFrSQ9xokRFq4CxXTPfUgKenI9d5brrV+QKrMDTGV5HpB/N0gSl4?=
=?us-ascii?Q?vZU/mv7vLo96V3sRL3cn59+0NAd3czixe79AMLgUCgMX/hVs5+GSrTfxaF7Z?=
=?us-ascii?Q?rB0/r5tJFXNQuCCcRt2KccKbJdEGyBxUVl+8mnf3ZHYppw4k1xZdO8kJVTZr?=
=?us-ascii?Q?4CeiwRxbkoQ5/IcuA5kAQsxHs5xNz5AKjhJ7QEgQxs6Z8dLuvWuj49qMuj8p?=
=?us-ascii?Q?f+gfg5GFhRwQ75K2CXbPvaCy4z6faFCFXjm+QWs6AfXeCNhHIOs5vUegdJ3w?=
=?us-ascii?Q?6taJvyoFfA2d0unG9pkpn8zOqfTg6XtB8G5ZyUNl/WZfgZH1jS77fbVXRaHO?=
=?us-ascii?Q?5r0M9zgKiVK3/laDdAjiafFSNIS5Wnss+uc+16uFfeix0/NirI8QptykpyPW?=
=?us-ascii?Q?F4heXkBPMgfyTkRPoQTjCrS8cNVarIkq/MRvgwQQho2QA6Tt+o/0qjbQN2WH?=
=?us-ascii?Q?5lllkLujNxWtWChdYCRj05XGa5L/KYrrqM9iiEvm4PMaK8dNAarOoeauuZVz?=
=?us-ascii?Q?TD9OotFxB6A/QHtKjjXx0yexhRe2nzTtZVITnq+96qY3UysvewsD0/rxCP3A?=
=?us-ascii?Q?tEWUnFij+0S1q1QR+NJVKevKH+I4VrlYQzy9poIJwScBXoqCrJZ29KntYGmR?=
=?us-ascii?Q?m6iEBtM/zhkLVDns5dWw2Q6+R9Z1xSqtOnuQT0JdkDgewyKyHa1lN0nJ8kxL?=
=?us-ascii?Q?SZGto+kynXjB1Nn7fYzTcc3OclouwEfL1Wiexjb9?=
X-OriginatorOrg: Nvidia.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 8d970d64-c01a-4a08-0fdd-08dda36b69bf
X-MS-Exchange-CrossTenant-AuthSource: DS7PR12MB9473.namprd12.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 13:26:28.8521
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: jvA+HKWeQs5p7qbHtg913+IIKCAH295DO7W58INQEoDOzC5SHiNbVO9kdBqi2C3i
X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB7277
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 4 Jun 2025, at 0:36, Anshuman Khandual wrote:
On 6/3/25 21:18, Zi Yan wrote:
The config is in fact an additional upper limit of pageblock_order, so
rename it to avoid confusion.
Agreed. This new config has been similar to existing 'pageblock_order'
that might cause confusion. Hence renaming makes sense. But instead of
PAGE_BLOCK_ORDER_CEIL should it be rather PAGE_BLOCK_ORDER_MAX ?
Or PAGE_BLOCK_MAX_ORDER?
Fixes: e13e7922d034 ("mm: add CONFIG_PAGE_BLOCK_ORDER to select page block order")
Does it really need a "Fixes: " tag given there is no problem to fix ?
I have no strong opinion on this one.
If you like a different name, I can send v2 and drop Fixes.
--
Best Regards,
Yan, Zi
Return-Path: <linux-kernel+bounces-673267-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 4B41B41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:27:13 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 0B2B93A2A55
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:26:50 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id D174A28F958;
Wed, 4 Jun 2025 13:27:06 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="XfhdYuC0"
Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 99CE31EF395
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:27:04 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.156.1
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749043626; cv=none; b=kGvryhk+fOT5gvTiFakgBHebM4qboY8H4b44X4qUvqLPz8tPLn/cBTM6ndKK+1sxm9IdOJbhdRYKtvSI7TpIuiZmWNDLW5afgRyKjjcsKjjePEWgeyoGs24zblDT9txH0AmHH3Xq8rauvQPqNSi5bEb2NBEaK2StpUAkAEnEN+Q=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749043626; c=relaxed/simple;
bh=p3orvhpz6yxyXP+AbFDjmTEzhNdHZk8AVOwL5lqrbxY=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=XcOtSVkFQ13CgDK0rodzTF+FIkpSwpt4FZ5k0rMr6JT0pGwMpPhVLD9eUmeBoeAPdIw2k1GOBmntcDgDX3BYe+iWIk1pqaodrSzYvuGiVj/GgGG9z5Mvwzo6S/NOXuO8evxvzK7u7pZnl8jLn3gfFs7Tmj5iiB6H5uJHTa0PB8c=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=XfhdYuC0; arc=none smtp.client-ip=148.163.156.1
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com
Received: from pps.filterd (m0356517.ppops.net [127.0.0.1])
by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 554CwnwK030628;
Wed, 4 Jun 2025 13:25:54 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc
:content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=pp1; bh=JNIQ7s
zjEf71NuUbS9S2gha5+GvA2tSVHUgg7CdOick=; b=XfhdYuC0oPH8zTd7G78gKo
C6P9Xu9xmLBToE+GN6cjawLlP5Hf6deoZhu9midZLuSiCoGQN+6oa76j4G3cnNzs
hRmOJgjWq1Z6YY9bk1EGQ7K0URbwC3ziWgCec8eu4jVNo6mypcFJCB5AHHX0pliO
7+f7zsV72JnSFL+kW6dquzBOGL21J8alJiBMBLuIJnttcI61iuHWG/P9r7k9QSuh
oKRBm477HMXLgGZX4ZxaozoUqgktjCyrRoikZHS2buNDg0dfZ9p4g+kX7FeQL6bg
zuwV371P7Fv6XWeA/+bzqolczNv4u6HNNHC1bxibMuJkYLquYv7ozdYkbO7DvIHQ
==
Received: from pps.reinject (localhost [127.0.0.1])
by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 471geyttxc-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 13:25:53 +0000 (GMT)
Received: from m0356517.ppops.net (m0356517.ppops.net [127.0.0.1])
by pps.reinject (8.18.0.8/8.18.0.8) with ESMTP id 554DPrT5028249;
Wed, 4 Jun 2025 13:25:53 GMT
Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93])
by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 471geyttx4-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 13:25:53 +0000 (GMT)
Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1])
by ppma23.wdc07v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 554Bx58E024776;
Wed, 4 Jun 2025 13:25:51 GMT
Received: from smtprelay03.wdc07v.mail.ibm.com ([172.16.1.70])
by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 470dkmfsve-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 13:25:51 +0000
Received: from smtpav05.dal12v.mail.ibm.com (smtpav05.dal12v.mail.ibm.com [10.241.53.104])
by smtprelay03.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 554DPjto15532692
(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 4 Jun 2025 13:25:46 GMT
Received: from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1])
by IMSVA (Postfix) with ESMTP id E28F158056;
Wed, 4 Jun 2025 13:25:49 +0000 (GMT)
Received: from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1])
by IMSVA (Postfix) with ESMTP id 12B8E58052;
Wed, 4 Jun 2025 13:25:44 +0000 (GMT)
Received: from [9.39.21.166] (unknown [9.39.21.166])
by smtpav05.dal12v.mail.ibm.com (Postfix) with ESMTP;
Wed, 4 Jun 2025 13:25:43 +0000 (GMT)
Message-ID: <badb9a92-3682-4f89-88d2-0651386a31f7@xxxxxxxxxxxxx>
Date: Wed, 4 Jun 2025 18:55:42 +0530
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v7 1/5] drivers/base/node: Optimize memory block
registration to reduce boot time
To: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: David Hildenbrand <david@xxxxxxxxxx>, Mike Rapoport <rppt@xxxxxxxxxx>,
Oscar Salvador <osalvador@xxxxxxx>, Zi Yan <ziy@xxxxxxxxxx>,
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>,
Ritesh Harjani <ritesh.list@xxxxxxxxx>, linux-mm@xxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, "Rafael J . Wysocki" <rafael@xxxxxxxxxx>,
Danilo Krummrich <dakr@xxxxxxxxxx>,
Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>,
Alison Schofield <alison.schofield@xxxxxxxxx>,
Yury Norov <yury.norov@xxxxxxxxx>, Dave Jiang <dave.jiang@xxxxxxxxx>,
Madhavan Srinivasan <maddy@xxxxxxxxxxxxx>,
Nilay Shroff
<nilay@xxxxxxxxxxxxx>, linuxppc-dev@xxxxxxxxxxxxxxxx
References: <2a0a05c2dffc62a742bf1dd030098be4ce99be28.1748452241.git.donettom@xxxxxxxxxxxxx>
<20250603200729.b7581e017e4ca63f502c795e@xxxxxxxxxxxxxxxxxxxx>
Content-Language: en-US
From: Donet Tom <donettom@xxxxxxxxxxxxx>
In-Reply-To: <20250603200729.b7581e017e4ca63f502c795e@xxxxxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-TM-AS-GCONF: 00
X-Proofpoint-ORIG-GUID: EbSF01bE5odkPh65mRkLZGyusm5mOC7m
X-Authority-Analysis: v=2.4 cv=DYMXqutW c=1 sm=1 tr=0 ts=68404961 cx=c_pps a=3Bg1Hr4SwmMryq2xdFQyZA==:117 a=3Bg1Hr4SwmMryq2xdFQyZA==:17 a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10 a=VnNF1IyMAAAA:8 a=w-oE209dy2xqcs4eIbgA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10
X-Proofpoint-GUID: F-1tfnlDZhRpZUcrZROpJTlH7sVUQtpP
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDA5OSBTYWx0ZWRfXwBZBHb+c2Ct+ McEOwK31mxvwYUWFLx3Rt/bOArjqZkBjpHAYHO+84FUTyB4nyppSBCQNVTgQ3lL4NDO2Hv5JAgX WWYHgqRwsvbkHNdwIYmS8Ct3L0LqXxc27ea7x12TK04pRgI3fdcVZW6P9t+FL0YG6Tje8sPQtG1
If05/q7siRtf9WKcTJykTy+T0HH/2vY2QVqYJSG8qfhw3iT3+WeRdBgcdAkFaGMWrWotk5JnoYE XG0K9Es76TQUKULgfNGY5OEtgsCsEZ1eTGfTZVRUIekOuZG1Vd0bcOIMq4DszbrSlTaprZ0A/Vu 3g9z0S9LTu+dm3mytL1Hpmqz2qLlBfEjAtx4bCcREAlEkHRlZwD7riAA2WioXEpvUgVI4fhV7v6
eGVOEnXgki/EZ/jTbToR8DRM7DUkCQX0AipvFjcaSN6MI651asU+Pwtnj7BscCJAj2qb4XjN
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0
lowpriorityscore=0 suspectscore=0 spamscore=0 mlxscore=0
priorityscore=1501 clxscore=1015 phishscore=0 mlxlogscore=993 adultscore=0
malwarescore=0 bulkscore=0 classifier=spam authscore=0 authtc=n/a authcc=
route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000
definitions=main-2506040099
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 6/4/25 8:37 AM, Andrew Morton wrote:
On Wed, 28 May 2025 12:18:00 -0500 Donet Tom <donettom@xxxxxxxxxxxxx> wrote:
During node device initialization, `memory blocks` are registered under
each NUMA node. The `memory blocks` to be registered are identified using
the node’s start and end PFNs, which are obtained from the node's pg_data
It's quite unconventional to omit the [0/N] changelog. This omission
somewhat messed up my processes so I added a one-liner to this.
Sorry, Andrew. I’ll include the cover letter in the next revision and
make sure to follow this for all future patches.
...
Test Results on My system with 32TB RAM
=======================================
1. Boot time with CONFIG_DEFERRED_STRUCT_PAGE_INIT enabled.
Without this patch
------------------
Startup finished in 1min 16.528s (kernel)
With this patch
---------------
Startup finished in 17.236s (kernel) - 78% Improvement
Well someone is in for a nice surprise.
2. Boot time with CONFIG_DEFERRED_STRUCT_PAGE_INIT disabled.
Without this patch
------------------
Startup finished in 28.320s (kernel)
what. CONFIG_DEFERRED_STRUCT_PAGE_INIT is supposed to make bootup
faster.
Return-Path: <linux-kernel+bounces-673268-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id EDB7241E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:27:50 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 5E5E5188BB55
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:28:04 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 36BCA28FA8A;
Wed, 4 Jun 2025 13:27:42 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="lAD/l9AH";
dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="y8F7fONB"
Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 657471EF395;
Wed, 4 Jun 2025 13:27:39 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749043661; cv=fail; b=Olo85WZH5eBwHviGwvL+A3MvbWf31gltXzv1NDlf+7LWO6MeZ4wNuXlTgI2ootS2racKQYGHMN1+O7r0WmQWm7AlXF0x0PIJqsVdYnBIjGqsW2AF/7gxrxgX2DC9feaZzcZA0VttGhMOUlqLNp1lG1Cgc1DWJBTHt1tkZoWMhIY=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749043661; c=relaxed/simple;
bh=MTWzCjeb2EBNsZ7Ge9jNmNrSM2dgfR10T7vo1OUGH8o=;
h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To:
Content-Type:MIME-Version; b=JaTE/LzpGkgs/WfFv9+L/UsSZFsXYyt/u9cj0Acl1MaWFkngeYxytf2FeXocoqBd2F/qLDUbgnrJDERQarXhs7kF78PRTBTxoTkA5j/hoMJJaEgPJLhSaOASQcVMJPxsBZ5AMT/8F09vbeSMs51buc5YUdwVvujB5mzhA30uBxg=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=lAD/l9AH; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=y8F7fONB; arc=fail smtp.client-ip=205.220.177.32
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com
Received: from pps.filterd (m0246631.ppops.net [127.0.0.1])
by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5549Mlkt022279;
Wed, 4 Jun 2025 13:27:17 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc
:content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=
corp-2025-04-25; bh=OTk0DMsBEWC3p/eRAAl0IhIB1PvqTB2ZPNq2xib/y1k=; b=
lAD/l9AHGDW6N4s5ZswETKcH/UFqfybEpgSZKeLypbjA91FLMS6nu7PqY+znPX1w
/mUr5cvW0uclSMz3pGv28h6nOM3aPIxV4ZUGCQofwi0NvHmEMLv7kGzJU/qhTAeT
wk50yCLxh+M411issKeEjrg/nCAWQfr4bP+ousx36EIVTSKPx7rkY9EUquuOF5al
qt1Mheou6BQJx6a6jbH4NC9hE6EL/qwVp8achi4lU1C+hrmM4xYXnTHiZRWFtH7/
pbD5LFLlzyiaQ3hgE/2rTd4qLr+EAkjRi78mx/Zz4oy9lZO7lCA5rjDw2LcN/Bdk
TJdkrVrARfKPEwEhrpPvMQ==
Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20])
by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 471g8dv15d-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 04 Jun 2025 13:27:17 +0000 (GMT)
Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1])
by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 554Bq9EC030680;
Wed, 4 Jun 2025 13:27:16 GMT
Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12on2048.outbound.protection.outlook.com [40.107.244.48])
by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 46yr7arr36-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 04 Jun 2025 13:27:16 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=bo6etuTU0L6I6VTwL82ba/51E+3AgM33fgF0ZTCn97K6JZZ/Cl0rf+6DAsjpsCZ7PUsBDQ0Ds37360iCehMD/lwZHcXx/o0sb0f0E/OaJVtBqkHUPkhhC3XAC8hdqXdqeKZgh15BQKM7zBKru7IPxlCrQNiBYoD6wt8GeipDjcb3MsyPX5kqLreohfjAhypGe22iuCmqZKeaTTX8vYHCCZ27glno8pzl0bMZUo3cQrRHWya/wM6ijrcBnqk8IrG4Xkuib4A+PGe0VdJYR9fSEVoMYlm4eq9cJKfern2UWmtLKNJIDO03tY87zg7Udck54iSpRLzZP9NlgcVPabOZiw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=OTk0DMsBEWC3p/eRAAl0IhIB1PvqTB2ZPNq2xib/y1k=;
b=Ctxnc/xps/PQzCD/HtZkDsN3Krvq5Z0vPW9XMewpxE3BIL8w3Bl3PmX3lbBwUlx2/44jBJGmYA8uh2dsNJC+/ajljKQu4FS1+VvB87T8cVnGN3PsESNRh0HXrcy1I4CXg5LLZ76uVZemtUHmkVp3aIfkifcg5no9L/ZcU6g1csC5+J6aJ0o2mVSmOgYvCtyJveS5A1hH6N3HCoLugcE3226GyRNDp5ucn4zpoio9QNbaKk5HezV77xzF28WDt3sBwalkUyOyk8mWj0HMd0se2axO5+fIBDsXrDybR91bBpv2DD3JGMwYOsLZkfx+iYZrVIYmfvULuBHUXnN45mOH6g==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com;
dkim=pass header.d=oracle.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=OTk0DMsBEWC3p/eRAAl0IhIB1PvqTB2ZPNq2xib/y1k=;
b=y8F7fONB0UNQ22RHF7l6Cd03u8F6yKbZWw1OZG5qW3iyajTILBst/Eg+8HSgGgGCJt+rcbK+T8ED4w4bi2tcrdlCp6TBV56TdhA0+hkZ9oh7gQicKgImBdPGlPq1olRAfXsUuKUxCiU8WsigtJkJn6MzmEWpjgumhzC55SWS6pQ=
Received: from DS7PR10MB5328.namprd10.prod.outlook.com (2603:10b6:5:3a6::12)
by PH0PR10MB4678.namprd10.prod.outlook.com (2603:10b6:510:3b::8) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.34; Wed, 4 Jun
2025 13:27:13 +0000
Received: from DS7PR10MB5328.namprd10.prod.outlook.com
([fe80::ea13:c6c1:9956:b29c]) by DS7PR10MB5328.namprd10.prod.outlook.com
([fe80::ea13:c6c1:9956:b29c%2]) with mapi id 15.20.8792.034; Wed, 4 Jun 2025
13:27:13 +0000
Message-ID: <9c5c6a6b-421b-4f26-b3a2-1e10bc3badd1@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 18:57:01 +0530
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH hyperv-next v3 03/15] arch: hyperv: Get/set SynIC
synth.registers via paravisor
To: Roman Kisel <romank@xxxxxxxxxxxxxxxxxxx>, arnd@xxxxxxxx, bp@xxxxxxxxx,
corbet@xxxxxxx, dave.hansen@xxxxxxxxxxxxxxx, decui@xxxxxxxxxxxxx,
haiyangz@xxxxxxxxxxxxx, hpa@xxxxxxxxx, kys@xxxxxxxxxxxxx,
mingo@xxxxxxxxxx, mhklinux@xxxxxxxxxxx, tglx@xxxxxxxxxxxxx,
wei.liu@xxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx,
linux-doc@xxxxxxxxxxxxxxx, linux-hyperv@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, x86@xxxxxxxxxx
Cc: apais@xxxxxxxxxxxxx, benhill@xxxxxxxxxxxxx, bperkins@xxxxxxxxxxxxx,
sunilmut@xxxxxxxxxxxxx
References: <20250604004341.7194-1-romank@xxxxxxxxxxxxxxxxxxx>
<20250604004341.7194-4-romank@xxxxxxxxxxxxxxxxxxx>
Content-Language: en-US
From: ALOK TIWARI <alok.a.tiwari@xxxxxxxxxx>
In-Reply-To: <20250604004341.7194-4-romank@xxxxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-ClientProxiedBy: SI2P153CA0016.APCP153.PROD.OUTLOOK.COM
(2603:1096:4:140::17) To DS7PR10MB5328.namprd10.prod.outlook.com
(2603:10b6:5:3a6::12)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: DS7PR10MB5328:EE_|PH0PR10MB4678:EE_
X-MS-Office365-Filtering-Correlation-Id: 4f195b7e-a1f9-4735-2a58-08dda36b8455
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam:
BCL:0;ARA:13230040|366016|1800799024|7416014|376014|921020|7053199007;
X-Microsoft-Antispam-Message-Info:
=?utf-8?B?ek5HVzF5cnlIejRFclV5MkZOQndhL0hJdWNmMGVVamZnaFJOYm10VzBXSTgy?=
=?utf-8?B?Z2RRTXYvcHFCVzJic1NtUGFQdWxvdnlEaExxWnN4Sit5SW5KYlBzOEJCYkRy?=
=?utf-8?B?RVhBNTZCT3RFYkk1L1FsMGo1a2pNSUJrU2lPL2E1aVNNcFJxc0hNTVpjdFZp?=
=?utf-8?B?RUcwUmZ5K2pzeE9QdTY2bk1KdVQzN0pkM0RzeGVpVVdVdlRUakYyc3pYRjl6?=
=?utf-8?B?dkFqaFB1elpvNW85ODd0WDJReHpMVmxWTmtFZ1BubG0wR1htSGZUT21kOTM2?=
=?utf-8?B?bnI0K291WXMxZmQ5eGd0SGFHTExBY2NudGxoKzhXNlhuWm9EeUxLbUVUV0gy?=
=?utf-8?B?LzNscElPb1VWblJ5czRzWkk1QUh6NU9iQWlZUEp0eDU2N0ZYVngrdnIvQ3lU?=
=?utf-8?B?a0wzRGNnMFFvdVlRZ3ltYnBPbEh3SEUyc2gyS1d6ZndCRWd1Y2J4UTB0R0tV?=
=?utf-8?B?bHc4V0JGc0hmWDVPVlBTbHdOeDcrMzRPT29XY0wycloweW1qbldTYk15VTZl?=
=?utf-8?B?TjNuMVQ5VWk3bjJGTGVqUktrajgxQXhxUDd3Q0lqRjVHTGhIN3lrOGFGc1hp?=
=?utf-8?B?MGpabmsyZFlTSkhydXdCYmwvODJGZ1NlRHlmVTdsNWlPbzZ3Q2FXUjhFcmxN?=
=?utf-8?B?QUpIdFRQdXh6MTNTbWhWZjJ6MHk3c2VjZ3BWWDVPL1oyRXYxOWxiaGVKbStx?=
=?utf-8?B?OGh6NGVRem5oTjFQUk9wYVR4SndvSHVCMXhCenVNdWFRQXlObGgvZHpkSmJo?=
=?utf-8?B?ZVpFMVRxdEZ4SFVJTjBmT2lZNkJMMlJWVFVhaWRmd0orNVNMWmZFcmRnTHRR?=
=?utf-8?B?c0hqLzNycDNKYnVMUlE4ODlsUXVtOWR1eDVSTCtWQ3BLNndDMzFXLzgrVXlF?=
=?utf-8?B?clNmNzR0V1dJVzFRdnZVVHFLQ2I0QzhXc3VRSElYTnJPM0U3WjM1VjBlQm4w?=
=?utf-8?B?QjdyVnFLaW12a1JxWlVsNlRGWVV2Y0FxdUt4OVlJNVcrd2grNkZlWVQvMFA0?=
=?utf-8?B?c1cvVlpCZ2NRSlVVeHpBMDh5d2ZnNElBNGF5MWIzTnB4Wm1XYlhsekVpVGxw?=
=?utf-8?B?M2EvZHU3VFVLT0lVeXFFMnZNN3JtS2tHcEFpaWRSRW1IcGF5QXVOR3o3S2cw?=
=?utf-8?B?VjArMElUM2FnLzRtQ0Fyajl5MDkzWXlIS2VzTkJJK1JjQUp0cjJQUjJhZDlx?=
=?utf-8?B?Sk5USXJjNlZZV3JtcmJiMXB0Q0hMZ0JnNXR0Z3ZUWHhUUmdkRENwTHZ3aE5v?=
=?utf-8?B?a2lMWHpOMEdzcjlJSlRyaG4zMW1HRlZwQlhqL1g4c1l5NWdnblZteUFvcXdy?=
=?utf-8?B?eFpDaEtOU2FvdU4zZ09SejB6cE5uRzJ5eTgxYittVkhwZWFtQlV0WVBMYkFH?=
=?utf-8?B?Ylp0S3lrbWF1djh6NVBpcmh3L2VnbUtTTHl3Y3NjbTljaVhuSkhWUXQ2cE5l?=
=?utf-8?B?d1hUZlluQVlPRGdRS09HbEJBM3hIWktJS1RsL1FNYytkRFJrTXd0Q0EwTVhC?=
=?utf-8?B?QnBFQjVWRktqMUttR2VlbytTSGxCREU0bC9pc1gwb21saHExdllLTWtTM2l2?=
=?utf-8?B?bDdLT21GbnJpeGVUcmFMWnpObUh2ZGo3azJyRGFkNjhkNEpMeWdiZ2d3VXIy?=
=?utf-8?B?MkloS2szMExjd29JMG1TcEFaYTlHTFY2RG8zVnVBV3FxVWhRQklTanArbWJn?=
=?utf-8?B?RCtrc1FVdmdpeVJ5Rjlpd3NVbUZ6MG9DejRxQ0dBNngzekRlSGpWWHlPZnd6?=
=?utf-8?B?QjhMekhxRHdGd2plL1lTNkpDeG9ibnM3eVZ0aEEvb2h4YTQrQ1BwSUl6YUEx?=
=?utf-8?B?V0JRcWd5dVNzdjI4c1k0V1V4MGdvOENlTjNXVTVmUmZxb0lqSy9GaEpMYzFW?=
=?utf-8?B?cVRjdWsveXFUNWZ2eXpsSU5KZzlodWtNWGRPdHY5NzNkeVRXNVdBRE93WVRj?=
=?utf-8?B?Wmh2Qlk0eFVLN0FiYnJ5a2xrT1h5bGtsK1pjbE5jQ3g4Nkx1TU1HNDkzdE1q?=
=?utf-8?B?a0ExejNtRXJnPT0=?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR10MB5328.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(7416014)(376014)(921020)(7053199007);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?utf-8?B?VnNGK29jREhoZFQ0M1RSWlVjWjFnZHNaQUR5T2hvUkN4TVdEd3lXazlDdE5H?=
=?utf-8?B?TlB6OXZPOFIvS1B3ZGdYVlJwUHFRMi83ci8xMjE0MzhXaVpFNzFOQytvU2Fu?=
=?utf-8?B?MHkvLzU3RUUvSERSU3BkaGFhRUcwWlhDa0hpV1RpL1haWURuM2FheDY2b1Na?=
=?utf-8?B?Wi85VkFGeWFwY2RES3g3QkR6ZXRIMzQ0WFpCZWxLdWFpWExTektndnNjU1dX?=
=?utf-8?B?dUE4RnJXZDZySlBadTJtamZOZUZtaGluandsZC8vMW4wbDNTZlRCd3JlUSts?=
=?utf-8?B?MXA5MTJTbDIvelk4V2NFdXNsa0NvTng1bUxVd09xRTZwMlVwT3FHWVFPUEVI?=
=?utf-8?B?TE4vSmM3bjRBWjk1MGp0NU8vdWZ2NzVwZ1d5alg3ODViM2pPSHYwK25BSEU5?=
=?utf-8?B?V3V4bjRUTTJoVGJHWUZFQ2t4R2dLdDdZQy9kUWN5b1U4Q1NCQUVjQTJWWTZS?=
=?utf-8?B?MkswWG14WGNDTUl2NHV0aUxjYnNtaG4zWUNOb3hxd2psQi9mOFRaQXhnakN2?=
=?utf-8?B?NjhlSzZuL25GQ3ZuTzB1WnR3eDZzbGJKSTNjWTVNRjV0aWFlV1V3OXRTZWtD?=
=?utf-8?B?dkFncnJqK1ROL0gwRC9wQ2Rxb0xaSDVuRU1CSW9xckxDZVFJUnRDbWNUUmVR?=
=?utf-8?B?djNSdTg5Nm9LL0FLa0Nkcm84empUQzVKMmFtelJnaGpXYW1pRjRoUlhlcXJo?=
=?utf-8?B?WWMzbGxHaVhpTFhUNm1QT0gxa0hkanVwWUlrMUorcEdQaFYyMFB2dzExc3pK?=
=?utf-8?B?M21FQjZnU012elRLOFBQREJTaEFHSks2MGhLZk4vMG9vYkVjQURjN1N6eUIr?=
=?utf-8?B?ZGN3bUhNc3RvcVk3aWtSOHJxTVNCZUViSnh3b2ZBWENoakJHSzhxbDVrclhq?=
=?utf-8?B?ZHhzRk5mcnR4a0ZESzJ5YXhBUmlmcGZRbzN4VnNBclY0NmRTbmF3YU4zc2Vh?=
=?utf-8?B?NmZ3TXZxZDZnWXF0K3BUMlk2VzRyS3RmSE00OVV0aEVGcTZsQzVkTlVvQ2Z3?=
=?utf-8?B?bFIrdCtaTzl3TTNTOXgrMmorRG13aG1Wc3VyY2ZJcVRsUG96SURKUWtiZ1lq?=
=?utf-8?B?c0JzeHRyazA0aTVsWGJ3N1hTUlg1KzNGUHNSOXpLOHR3NUVqeEZ2VXZ4bGxy?=
=?utf-8?B?bEE5S3N1VWpZYmlzeTNXRW9hQXZma3RXcGpoc25ZNndCeDRJaEwwdFg4ZWha?=
=?utf-8?B?czdQbWIvT0ZWMS9VMTAyeXpUck9ONkkvWHlIeURNSUZsUnJjV2JUYi9DVG1P?=
=?utf-8?B?UXppN3RhREtkUXQwbzB6SmNjaDAreWFZeHFLdUNYNlYyRktYL0w1Z01vNHg2?=
=?utf-8?B?ZWVmYUt1L2QxVnhFZGhKaEk5RFlYcUdiSHZjU3FhRUNVcUtucUVRU2lIQWFm?=
=?utf-8?B?UVowT0xDNndiMU5aemFHc1dqeUh0eloxci96MWFZbnFwVE15SDZhRndrV3ZL?=
=?utf-8?B?WVJqbXd6TDNGL3NtdjlxRnVYdC9nSkVoeWFZTi8rNlE4Nk5KdTI3Q1ZwTGtj?=
=?utf-8?B?QjF1a0FmZWVGSG92NnMrNjJPY3F4OHhYZEZHbFFXRTNhakxHUEQwMUZ1SDhQ?=
=?utf-8?B?azJvWFJQaGtoTGRRT2MxeWViRm1Edmduc3lQSVgydlZtOUxwa0hrMjNjeXpC?=
=?utf-8?B?V1FkSEtXUWMzNm1RaThLM3hwd0ZlRWdqZlI4ZXY4NWpJUTl4Q3hvSlpLczNP?=
=?utf-8?B?Zk11d3NHdVV0Y1l1ZUlPYWF0dm9ZaTJOcFl4MGp1TW5OQjVXNXdDSWp6djkv?=
=?utf-8?B?OG9zWDBDMWJ3WEtkL0Z5NVFITFdUTloxK0FoRmxPdmZtUzdOV1ZqUmJ2cnRZ?=
=?utf-8?B?MGtjczZzdzdKZndKMmVxTVBhaWtOcHlaVUlqQnFZZ0dVN2Q4Wjd6aHZnSW9K?=
=?utf-8?B?VkxHZVhvTXRlMXVpaUxrbHRrQW9aNllubDVBWDdPZE10WkxEYkxJNHRyQmIr?=
=?utf-8?B?d0s2YVQyYnRGdnA0cXg0WmxiSU9RdlhEMkpDN1ZUdEEvRy9sdEovUHNRdFpI?=
=?utf-8?B?b01ybVpxbVFIYXM3cVh6VHBQQVcwZk8vS1Y5eVhQWU81bisrbkJSbFMweGkx?=
=?utf-8?B?U3dZOWx2eHNaa1dkK2lrYXhRa05mdm1YZS9ja0o0OFBocDBtR01LT1MrQUhk?=
=?utf-8?B?c085SjREdFJoSFlmcXB6WmRzK0gxU2FTVUpTbFVDdUdkcXJocVgxcFlFSEVt?=
=?utf-8?B?eWc9PQ==?=
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0:
ZdWU7UrDuVj0uMB1cJXKj+RcRtskbqWOz2nmVrl1HtrRqLB225FtHBOpRsrWvt8+Av7qYcWVHB4nc+tDLsC5qAAWUmdPCGbi+XaTmhI0WD8iMlVrgYLJekMaz4VZsRuCmxv5b2AoVWFK+Qm33oYZgGaY1d/jHzh4FnCpwH2LwGCsbi0bRkE2dO0gCBsiXs0HNOzZzop3i/C6tDVeGeQV7mqqJ6/c/OC9ED7h9QLdwYEODIAhSIw1IcotIs+pCsuc+yOITlDRE4i+GZVkSqlRvwnIourUGDuovXH0Ev700BsO2cbB0nGbn9h4N9DfGN1or2K4rpOk/nqsCoDfmbs8mx6PfuhMq0TLhGPWADn2fCwfI88V+ZYJbdseen8OsURhqXUcUuSOGvaUxAsjVckni/+wm059tj8W2Ks8R4I93P3Zt3q6DnnuyybXtDP6e4BTj3cb6ROYca1YZFVeERu0228og2g+OXAh5QaCEHZkBr2rHzWufV862fhgsPSvRjWUEn0H1jIgBgryGmVOKWlVyou7Y9MlvfofgdTgJn+YsqZuYUR6niLMdp2ptS+5MZjJ2m7S3jjcm5bFkAxu0AJwgEXXB0745JzJAqaPfJjatO8=
X-OriginatorOrg: oracle.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 4f195b7e-a1f9-4735-2a58-08dda36b8455
X-MS-Exchange-CrossTenant-AuthSource: DS7PR10MB5328.namprd10.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 13:27:13.6519
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: szhh1p28Nq4CLrvzCmzGRLr+NTgjw9ZV+KcS5ad5QzMWy/MkFsD228TslTRSDAkQod8LMldD4W3FWbr9sApnZUFunED8ZLlWaprH2d1oz0Q=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR10MB4678
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 malwarescore=0
suspectscore=0 phishscore=0 adultscore=0 spamscore=0 mlxlogscore=999
mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1
engine=8.12.0-2505160000 definitions=main-2506040102
X-Authority-Analysis: v=2.4 cv=Va/3PEp9 c=1 sm=1 tr=0 ts=684049b5 b=1 cx=c_pps a=e1sVV491RgrpLwSTMOnk8w==:117 a=e1sVV491RgrpLwSTMOnk8w==:17 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19
a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10 a=GoEa3M9JfhUA:10 a=yMhMjlubAAAA:8 a=yPCof4ZbAAAA:8 a=cTZmTnUJb99XY8YRqt0A:9 a=QEXdDO2ut3YA:10 cc=ntf awl=host:14714
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDEwMiBTYWx0ZWRfXzB9TTv92c4ej ZjEC9+MUXDNst+doTgVUAE/1nJbkvyllU+5J415jQ8W/XZ+yUA88hnTbFcZFQxKu1cyFXFHQbSt ydQ6XTetPq+4wq80bTJfVU/VQ3lOCjw+37xPKCPtvWLf52CqqOXRjZsaTwHxGPOIVjKdjVzAIBC
WznuWJZKKV2Fb7S08wAJw1GYPKkQs/MagG1q2nj6w6NmnbqDJ+A8hyAV2KNsHfsV/l2JaaxLops 1wvajS1uD6X7dthnjKzgUejnxuvTDMWM/6UgIcYeVnkHJ3YFuevpvI5eXS+1uh3DhuUVghr2zLI 7l9Q4448bfzTw45UgaxQAVBQhwPA9We/ZPk8aeihA4voysQTTHGVxJ6CCc3L2h0d0QhJU4c8o0W
wnfDOiiMeGYDNuPdwzgUEJKn5y0aRSEjDjCYHOeNWO/YfTn5N8xn1uETq+JiKxQIOXud6sg/
X-Proofpoint-ORIG-GUID: io5Y2l4-ft8-MuTc_Io2M6hRm4qrv8Ky
X-Proofpoint-GUID: io5Y2l4-ft8-MuTc_Io2M6hRm4qrv8Ky
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 04-06-2025 06:13, Roman Kisel wrote:
The confidential VMBus is built on the guest talking to the
paravisor only.
Provide functions that allow manipulating the SynIC registers
via paravisor. No functional changes.
Signed-off-by: Roman Kisel <romank@xxxxxxxxxxxxxxxxxxx>
Reviewed-by: Alok Tiwari <alok.a.tiwari@xxxxxxxxxx>
---
arch/x86/kernel/cpu/mshyperv.c | 44 ++++++++++++++++++++++++++++++++++
drivers/hv/hv_common.c | 13 ++++++++++
include/asm-generic/mshyperv.h | 2 ++
3 files changed, 59 insertions(+)
diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c
index 3e2533954675..83a85d94bcb3 100644
--- a/arch/x86/kernel/cpu/mshyperv.c
+++ b/arch/x86/kernel/cpu/mshyperv.c
@@ -89,6 +89,50 @@ void hv_set_non_nested_msr(unsigned int reg, u64 value)
}
EXPORT_SYMBOL_GPL(hv_set_non_nested_msr);
+/*
+ * Attempt to get the SynIC register value from the paravisor.
+ *
+ * Not all paravisors support reading SynIC registers, so this function
+ * may fail. The register for the SynIC of the running CPU is accessed.
+ *
+ * Writes the SynIC register value into the memory pointed by val,
+ * and ~0ULL is on failure.
+ *
+ * Returns -ENODEV if the MSR is not a SynIC register, or another error
+ * code if getting the MSR fails (meaning the paravisor doesn't support
+ * relaying VMBus comminucations).
comminucations -> communications
+ */
+int hv_para_get_synic_register(unsigned int reg, u64 *val)
+{
+ u64 reg_val = ~0ULL;
+ int err = -ENODEV;
+
+ if (hv_is_synic_msr(reg))
+ reg_val = native_read_msr_safe(reg, &err);
+ *val = reg_val;
+
+ return err;
+}
+
+/*
+ * Attempt to set the SynIC register value with the paravisor.
+ *
+ * Not all paravisors support reading SynIC registers, so this function
+ * may fail. The register for the SynIC of the running CPU is accessed.
you are writing, not reading. ?
-> "Not all paravisors support writing SynIC registers"
+ *
+ * Sets the register to the value supplied.
+ *
+ * Returns: -ENODEV if the MSR is not a SynIC register, or another error
+ * code if writing to the MSR fails (meaning the paravisor doesn't support
+ * relaying VMBus comminucations).
+ */
+int hv_para_set_synic_register(unsigned int reg, u64 val)
+{
+ if (!hv_is_synic_msr(reg))
+ return -ENODEV;
+ return wrmsrl_safe(reg, val);
+}
Thanks,
Alok
Return-Path: <linux-kernel+bounces-673269-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 863B741E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:28:12 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 4810C3A3A45
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:27:50 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 3793A28FA88;
Wed, 4 Jun 2025 13:28:09 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="R0bw2sZX"
Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id A152E22A1FA
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:28:06 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.158.5
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749043688; cv=none; b=MNbISu6FtD+AfdvcTUu1X3CcpiyV5QZQ8AQKIaaimPRgJZcD62uvixJQCJgsw+tIbKcergCfOBgFC+RPXrfG5j6tEyFB8Ny2AtkP/x73jK0TdOJ1zCEZjJxY2jBPLOfeOlIDO70lIIy7RTfJWFbe7dNiwHBvVqwE9Yp8T4tAJG4=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749043688; c=relaxed/simple;
bh=VA7VOLwtuK5bEKGScb94N6sOsfOefVtC5RnXa5yWuQA=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=sXeD5jJMV69XwmBPpVYgCsfystY2WR+AJMsxcNP1036NBArIAcIwFb6IM9p6t8f+69UICh8BQRPCKLcp8WGCqgRpP7FsWJEND16RKDGz8rKKChBFuq/F85q+hwQtJT6tII8AVhG2lSPetzG3+Ck8voCB7QskUchnbMJqjZmScgg=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=R0bw2sZX; arc=none smtp.client-ip=148.163.158.5
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com
Received: from pps.filterd (m0360072.ppops.net [127.0.0.1])
by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5545LKpO017568;
Wed, 4 Jun 2025 13:27:43 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc
:content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=pp1; bh=SvJHtp
wU5FS2FH2sEMqFtRQCjQKN+NWI1URkJw+uf/s=; b=R0bw2sZXalP3XqKFeDpVzu
+TcPYlnNHzVQjJHMjUrxeSElXJ29OS40ej9JPJhXsbFjXiimbOIQfXyB9fvBgpgn
uIwVnezweKWoU+wjzJr4FkxC4NYEgJWMxmYcMSqRxErIlVfC3ha0VTJ5Xt/+E08A
uOZpAeLjSwKlLHVxLvPJ73ztIwzm/z41zAt+fs65EupYx6B6NDxSnBBODp4cXeXC
Fn+38DBD8/utOII8cM4smO+su3D6S50opeNwAldphKH/dEjMqL477ozTLJbxudTO
p77oRyI8gXGGKvjgcAXDm78sNyp70UfMjLTlDaHVtJqCm11UkawcIG6oUxGAR0hQ
==
Received: from pps.reinject (localhost [127.0.0.1])
by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 472fwuj9bs-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 13:27:43 +0000 (GMT)
Received: from m0360072.ppops.net (m0360072.ppops.net [127.0.0.1])
by pps.reinject (8.18.0.8/8.18.0.8) with ESMTP id 554CSsEt002771;
Wed, 4 Jun 2025 13:27:42 GMT
Received: from ppma12.dal12v.mail.ibm.com (dc.9e.1632.ip4.static.sl-reverse.com [50.22.158.220])
by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 472fwuj9bp-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 13:27:42 +0000 (GMT)
Received: from pps.filterd (ppma12.dal12v.mail.ibm.com [127.0.0.1])
by ppma12.dal12v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 554C6lla022517;
Wed, 4 Jun 2025 13:27:41 GMT
Received: from smtprelay03.dal12v.mail.ibm.com ([172.16.1.5])
by ppma12.dal12v.mail.ibm.com (PPS) with ESMTPS id 470c3tg2vu-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 13:27:41 +0000
Received: from smtpav05.dal12v.mail.ibm.com (smtpav05.dal12v.mail.ibm.com [10.241.53.104])
by smtprelay03.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 554DReDo66978170
(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 4 Jun 2025 13:27:40 GMT
Received: from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1])
by IMSVA (Postfix) with ESMTP id BE36A58068;
Wed, 4 Jun 2025 13:27:40 +0000 (GMT)
Received: from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1])
by IMSVA (Postfix) with ESMTP id 22F4558052;
Wed, 4 Jun 2025 13:27:35 +0000 (GMT)
Received: from [9.39.21.166] (unknown [9.39.21.166])
by smtpav05.dal12v.mail.ibm.com (Postfix) with ESMTP;
Wed, 4 Jun 2025 13:27:34 +0000 (GMT)
Message-ID: <de209828-d237-4912-905b-8c7de7e5734d@xxxxxxxxxxxxx>
Date: Wed, 4 Jun 2025 18:57:33 +0530
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v7 1/5] drivers/base/node: Optimize memory block
registration to reduce boot time
To: David Hildenbrand <david@xxxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
Mike Rapoport <rppt@xxxxxxxxxx>, Oscar Salvador <osalvador@xxxxxxx>,
Zi Yan <ziy@xxxxxxxxxx>,
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Cc: Ritesh Harjani <ritesh.list@xxxxxxxxx>, linux-mm@xxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, "Rafael J . Wysocki" <rafael@xxxxxxxxxx>,
Danilo Krummrich <dakr@xxxxxxxxxx>,
Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>,
Alison Schofield <alison.schofield@xxxxxxxxx>,
Yury Norov <yury.norov@xxxxxxxxx>, Dave Jiang <dave.jiang@xxxxxxxxx>,
Madhavan Srinivasan <maddy@xxxxxxxxxxxxx>,
Nilay Shroff
<nilay@xxxxxxxxxxxxx>, linuxppc-dev@xxxxxxxxxxxxxxxx
References: <2a0a05c2dffc62a742bf1dd030098be4ce99be28.1748452241.git.donettom@xxxxxxxxxxxxx>
<96f7d3a2-2d85-442c-a9f7-e558d4a2ba06@xxxxxxxxxx>
Content-Language: en-US
From: Donet Tom <donettom@xxxxxxxxxxxxx>
In-Reply-To: <96f7d3a2-2d85-442c-a9f7-e558d4a2ba06@xxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-TM-AS-GCONF: 00
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDA5OSBTYWx0ZWRfXxiJQTUViqBo6 OtNBqFwnEI9WPhS5L1uY2nsJCC7M8xU0oaFcjoM/T0Nx35L1QAe77bXRfMyP3EcFz8qGEl935Xp T30qAwnCUj/+cWKSapXi644sUy+Ns7rXss6dgmCFQ7kbY4xTakQxBph5taxdEREEd/abcn5FY6Z
2NzHZkF6kgkq1pCiFe/g/a8xjxjtSGzhJ+9nEOiD13z6Dgm9nRGkGQ+fIfgPj/8cxleIzGuLntz ZL0y3XGAPJnQofHSG996UrJW4AbwkiNykVonVOouz6yT3IcI4GsiKn3a2aWlfg6JF+HVp4pqvT/ HAO6s91DERzqTQ/se6qmV+1AbA88qyj/e3/hFMtoJiZMvnzxNBuZzQCjMAmiWOkMJo4y6WF0B6B
WjbCXuHSn/jkOSq4maxnKEhpjmX6ekNYoD0ImSu0g2G17zWhOP2OTHVRkQSLwEds8BRGVcSe
X-Proofpoint-GUID: FBl9wL6YPj3JybCsg8I_1eEkECyG6JgZ
X-Proofpoint-ORIG-GUID: CxxGID8KN88eUD0mhbUT-kQgr7rrf0OX
X-Authority-Analysis: v=2.4 cv=QtVe3Uyd c=1 sm=1 tr=0 ts=684049cf cx=c_pps a=bLidbwmWQ0KltjZqbj+ezA==:117 a=bLidbwmWQ0KltjZqbj+ezA==:17 a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10 a=20KFwNOVAAAA:8 a=VwQbUJbxAAAA:8 a=Ikd4Dj_1AAAA:8 a=VnNF1IyMAAAA:8
a=4TbcEkYQSb79-EmCaOUA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 suspectscore=0
bulkscore=0 adultscore=0 phishscore=0 impostorscore=0 malwarescore=0
priorityscore=1501 mlxlogscore=999 lowpriorityscore=0 spamscore=0
clxscore=1015 classifier=spam authscore=0 authtc=n/a authcc=
route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000
definitions=main-2506040099
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 6/4/25 3:08 PM, David Hildenbrand wrote:
On 28.05.25 19:18, Donet Tom wrote:
During node device initialization, `memory blocks` are registered under
each NUMA node. The `memory blocks` to be registered are identified
using
the node’s start and end PFNs, which are obtained from the node's
pg_data
However, not all PFNs within this range necessarily belong to the same
node—some may belong to other nodes. Additionally, due to the
discontiguous nature of physical memory, certain sections within a
`memory block` may be absent.
As a result, `memory blocks` that fall between a node’s start and end
PFNs may span across multiple nodes, and some sections within those
blocks
may be missing. `Memory blocks` have a fixed size, which is architecture
dependent.
Due to these considerations, the memory block registration is currently
performed as follows:
for_each_online_node(nid):
start_pfn = pgdat->node_start_pfn;
end_pfn = pgdat->node_start_pfn + node_spanned_pages;
for_each_memory_block_between(PFN_PHYS(start_pfn),
PFN_PHYS(end_pfn))
mem_blk = memory_block_id(pfn_to_section_nr(pfn));
pfn_mb_start=section_nr_to_pfn(mem_blk->start_section_nr)
pfn_mb_end = pfn_start + memory_block_pfns - 1
for (pfn = pfn_mb_start; pfn < pfn_mb_end; pfn++):
if (get_nid_for_pfn(pfn) != nid):
continue;
else
do_register_memory_block_under_node(nid, mem_blk,
MEMINIT_EARLY);
Here, we derive the start and end PFNs from the node's pg_data, then
determine the memory blocks that may belong to the node. For each
`memory block` in this range, we inspect all PFNs it contains and check
their associated NUMA node ID. If a PFN within the block matches the
current node, the memory block is registered under that node.
If CONFIG_DEFERRED_STRUCT_PAGE_INIT is enabled, get_nid_for_pfn()
performs
a binary search in the `memblock regions` to determine the NUMA node ID
for a given PFN. If it is not enabled, the node ID is retrieved directly
from the struct page.
On large systems, this process can become time-consuming, especially
since
we iterate over each `memory block` and all PFNs within it until a
match is
found. When CONFIG_DEFERRED_STRUCT_PAGE_INIT is enabled, the additional
overhead of the binary search increases the execution time
significantly,
potentially leading to soft lockups during boot.
In this patch, we iterate over `memblock region` to identify the
`memory blocks` that belong to the current NUMA node. `memblock regions`
are contiguous memory ranges, each associated with a single NUMA
node, and
they do not span across multiple nodes.
for_each_memory_region(r): // r => region
if (!node_online(r->nid)):
continue;
else
for_each_memory_block_between(r->base, r->base + r->size - 1):
do_register_memory_block_under_node(r->nid, mem_blk,
MEMINIT_EARLY);
We iterate over all memblock regions, and if the node associated with
the
region is online, we calculate the start and end memory blocks based
on the
region's start and end PFNs. We then register all the memory blocks
within
that range under the region node.
Test Results on My system with 32TB RAM
=======================================
1. Boot time with CONFIG_DEFERRED_STRUCT_PAGE_INIT enabled.
Without this patch
------------------
Startup finished in 1min 16.528s (kernel)
With this patch
---------------
Startup finished in 17.236s (kernel) - 78% Improvement
2. Boot time with CONFIG_DEFERRED_STRUCT_PAGE_INIT disabled.
Without this patch
------------------
Startup finished in 28.320s (kernel)
With this patch
---------------
Startup finished in 15.621s (kernel) - 46% Improvement
Acked-by: David Hildenbrand <david@xxxxxxxxxx>
Acked-by: Oscar Salvador <osalvador@xxxxxxx>
Acked-by: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>
Acked-by: Zi Yan <ziy@xxxxxxxxxx>
Signed-off-by: Donet Tom <donettom@xxxxxxxxxxxxx>
---
[...]
#ifdef CONFIG_NUMA
void memory_block_add_nid(struct memory_block *mem, int nid,
enum meminit_context context);
@@ -188,5 +206,4 @@ void memory_block_add_nid(struct memory_block
*mem, int nid,
* can sleep.
*/
extern struct mutex text_mutex;
-
^ Nit: unrelated change?
Thank you David
I’ll make the change and send the next revision.
Return-Path: <linux-kernel+bounces-673270-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 642D641E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:30:22 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 206537A63D8
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:29:02 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id B0F3628FFC5;
Wed, 4 Jun 2025 13:30:14 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="P7OjiSZA"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3B66928F921
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:30:11 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749043813; cv=none; b=YiCp2HKT0nClVRP3nWSAZyZo3WJGqLW/567l6TJhk6SovT8Uq9EqHwezDVwOa10MBbzNSGbLiHEEvTuBYjwF0Tz9QdMoVBzTI3MDl1U8zE3S+nLvb7Nu/HJc1rkmg6qJ9KKd5zjtMeBHtLQzm0i6pmn6gednyemMawEuithMeeo=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749043813; c=relaxed/simple;
bh=DJDT9AInBT4ZBXbnpZMDD3OPwVP1JNHKWyTYB41+vgw=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=i1UO+V8miSeFnFCfyl8f42v3uPu6H1MR8EhLnKWlQynHomWu4D+X97ZCZC+hHRBk0u3Qk+on3mN8ZUj78BbKfrK/8NV+JfDYMCsqtq2uN1Z6F/twE2+pIBOhl5WTDcgIoUKOyeK/HBTljzqTzH3JWjRbtifNBVWpA4ArxAmmQUg=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=P7OjiSZA; arc=none smtp.client-ip=170.10.129.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749043811;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=wM730wYdKzGLtqTwQp0WD4PZQ3ILvslvUEZgXXpTyII=;
b=P7OjiSZArcKxSBVMjw0eKvG5inYAcNzvIJQ0Ct+VSHTEud1loUEv3BYwBT+VU/0fpeJxsW
5gN2y/zfh48QVlmKLSyTXPwjZnan4wIBjHquER/BDg3YCq4htYzZDzGpcfNiJX59AWMHBU
Si381pV6UFqGsgbek+hASAhUIiWWfEI=
Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com
[209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-445-WEylEPTzMIyld6opMeS5VQ-1; Wed, 04 Jun 2025 09:30:09 -0400
X-MC-Unique: WEylEPTzMIyld6opMeS5VQ-1
X-Mimecast-MFC-AGG-ID: WEylEPTzMIyld6opMeS5VQ_1749043807
Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-450d57a0641so46685915e9.3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 06:30:08 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749043807; x=1749648607;
h=content-transfer-encoding:in-reply-to:organization:autocrypt
:content-language:from:references:cc:to:subject:user-agent
:mime-version:date:message-id:x-gm-message-state:from:to:cc:subject
:date:message-id:reply-to;
bh=wM730wYdKzGLtqTwQp0WD4PZQ3ILvslvUEZgXXpTyII=;
b=OSmPKytkTkdQapCD4p9g1lQao1alQMqP8i5++f6WwwgKop965tm8BHllgxpjv3Il0E
1GpSCs3xzyajfC1LFwxH9aT8t6ayRKqnSyO4B/ET+dqjsNlyNzjaCDUX4xXFlSTgG0lA
nhYABI5SgM95fPnFz3c52mjgJGCy/HREpZIL6fBSh6Yd1CBT6DzSRd9ZsP3GHl2nNfZh
omBzGTbu4nLNUbYK2E+CKtFmHBLC7rMHvkvaF7yILtk07rcATsaWBCp+LKbJU7goQn69
Rk2w0f27V3wH6W77ziBFUB6N7wKFW4KKZCcezFk7q1vTXPxzOkHeAFFDcjU1cxdCYciY
i2Hg==
X-Forwarded-Encrypted: i=1; AJvYcCVppcWdFULkbion1Xr1TGuXLpra7d4/DSGJWNeLGrDyV9GNPfLXYyg1HLJEYdvNzaa2tShkEX6iBJEO6bw=@vger.kernel.org
X-Gm-Message-State: AOJu0YwGuMTDm+ld4Ln2LT4q/5QbOxTUiOAcC4r7SqCp+rj43MoH3JRt
Edf8UyrCa1GcYaSfbaw4mCf+aQSzWnVyCobzvllQ6pmkImkl+kF4Us4XeG3LzjzaAu0xLPwqtfB
wzcUdLtWN/uUCFTy6VuNeN2+Ufor0dxij/FgiolcHiELDNk4HjVsnfWExSzC8sFVbBMmOJgnsfq
EU
X-Gm-Gg: ASbGncsG6aZUcXZaC5gvPwY2t9UfCwZ/bHveg8UAkt5VUoT8ftup9LxluSdRQ5OM6Hf
1QZq3s90fuMXtL7mreq7Hu9J8alSmFyrofSs/VZEG2GPzVqEZmUavPyWmKOt5byqIVWi9o5sHVQ
NVI4T2eQgbxtzdcFU//MITm3WMFeEG3NErN677w6VFdGkcQMze1CSMEMtRbkd16CnVG4YBoCal8
orXBz+14yljynOnk/j+AKg6hsQjUiwpQLDmA1iTVP5YuBnIQoW6Zd6yxanJ3q9G/xxouO7pKd/f
d8/0Ua4vx60/isPgJxk1Msq0nOOsfcdmOR1NMbixxcLHJDYwXA3P9lEWqb5T7O22YeSwYKRhrCx
cFm92a29Hu8D7H7ld0QzfwGl0qCBYhucgbg35PX0=
X-Received: by 2002:a05:600c:3484:b0:450:c20d:64c3 with SMTP id 5b1f17b1804b1-451f50a2126mr15328895e9.18.1749043807372;
Wed, 04 Jun 2025 06:30:07 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IGpnyxfH8Pv/rAsTwh7fWe/qdlsqtP0waH+CRL3dgCTNExEMwgjRrMrmo08vFsHutGjTeZV9A==
X-Received: by 2002:a05:600c:3484:b0:450:c20d:64c3 with SMTP id 5b1f17b1804b1-451f50a2126mr15328525e9.18.1749043806909;
Wed, 04 Jun 2025 06:30:06 -0700 (PDT)
Received: from ?IPV6:2003:d8:2f1b:b800:6fdb:1af2:4fbd:1fdf? (p200300d82f1bb8006fdb1af24fbd1fdf.dip0.t-ipconnect.de. [2003:d8:2f1b:b800:6fdb:1af2:4fbd:1fdf])
by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-450d7f8eceasm200932785e9.7.2025.06.04.06.30.05
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 06:30:06 -0700 (PDT)
Message-ID: <8abecd5b-2768-49d0-afc3-561b95d77a24@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 15:30:05 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v7 1/5] drivers/base/node: Optimize memory block
registration to reduce boot time
To: Donet Tom <donettom@xxxxxxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Mike Rapoport <rppt@xxxxxxxxxx>, Oscar Salvador <osalvador@xxxxxxx>,
Zi Yan <ziy@xxxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>,
Ritesh Harjani <ritesh.list@xxxxxxxxx>, linux-mm@xxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, "Rafael J . Wysocki" <rafael@xxxxxxxxxx>,
Danilo Krummrich <dakr@xxxxxxxxxx>,
Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>,
Alison Schofield <alison.schofield@xxxxxxxxx>,
Yury Norov <yury.norov@xxxxxxxxx>, Dave Jiang <dave.jiang@xxxxxxxxx>,
Madhavan Srinivasan <maddy@xxxxxxxxxxxxx>, Nilay Shroff
<nilay@xxxxxxxxxxxxx>, linuxppc-dev@xxxxxxxxxxxxxxxx
References: <2a0a05c2dffc62a742bf1dd030098be4ce99be28.1748452241.git.donettom@xxxxxxxxxxxxx>
<20250603200729.b7581e017e4ca63f502c795e@xxxxxxxxxxxxxxxxxxxx>
<b355e72d-0284-4a31-84e3-ae4a79ad922f@xxxxxxxxxx>
<9f7ae0e6-4640-418d-a4db-dba594377ac2@xxxxxxxxxxxxx>
From: David Hildenbrand <david@xxxxxxxxxx>
Content-Language: en-US
Autocrypt: addr=david@xxxxxxxxxx; keydata=
xsFNBFXLn5EBEAC+zYvAFJxCBY9Tr1xZgcESmxVNI/0ffzE/ZQOiHJl6mGkmA1R7/uUpiCjJ
dBrn+lhhOYjjNefFQou6478faXE6o2AhmebqT4KiQoUQFV4R7y1KMEKoSyy8hQaK1umALTdL
QZLQMzNE74ap+GDK0wnacPQFpcG1AE9RMq3aeErY5tujekBS32jfC/7AnH7I0v1v1TbbK3Gp
XNeiN4QroO+5qaSr0ID2sz5jtBLRb15RMre27E1ImpaIv2Jw8NJgW0k/D1RyKCwaTsgRdwuK
Kx/Y91XuSBdz0uOyU/S8kM1+ag0wvsGlpBVxRR/xw/E8M7TEwuCZQArqqTCmkG6HGcXFT0V9
PXFNNgV5jXMQRwU0O/ztJIQqsE5LsUomE//bLwzj9IVsaQpKDqW6TAPjcdBDPLHvriq7kGjt
WhVhdl0qEYB8lkBEU7V2Yb+SYhmhpDrti9Fq1EsmhiHSkxJcGREoMK/63r9WLZYI3+4W2rAc
UucZa4OT27U5ZISjNg3Ev0rxU5UH2/pT4wJCfxwocmqaRr6UYmrtZmND89X0KigoFD/XSeVv
jwBRNjPAubK9/k5NoRrYqztM9W6sJqrH8+UWZ1Idd/DdmogJh0gNC0+N42Za9yBRURfIdKSb
B3JfpUqcWwE7vUaYrHG1nw54pLUoPG6sAA7Mehl3nd4pZUALHwARAQABzSREYXZpZCBIaWxk
ZW5icmFuZCA8ZGF2aWRAcmVkaGF0LmNvbT7CwZgEEwEIAEICGwMGCwkIBwMCBhUIAgkKCwQW
AgMBAh4BAheAAhkBFiEEG9nKrXNcTDpGDfzKTd4Q9wD/g1oFAl8Ox4kFCRKpKXgACgkQTd4Q
9wD/g1oHcA//a6Tj7SBNjFNM1iNhWUo1lxAja0lpSodSnB2g4FCZ4R61SBR4l/psBL73xktp
rDHrx4aSpwkRP6Epu6mLvhlfjmkRG4OynJ5HG1gfv7RJJfnUdUM1z5kdS8JBrOhMJS2c/gPf
wv1TGRq2XdMPnfY2o0CxRqpcLkx4vBODvJGl2mQyJF/gPepdDfcT8/PY9BJ7FL6Hrq1gnAo4
3Iv9qV0JiT2wmZciNyYQhmA1V6dyTRiQ4YAc31zOo2IM+xisPzeSHgw3ONY/XhYvfZ9r7W1l
pNQdc2G+o4Di9NPFHQQhDw3YTRR1opJaTlRDzxYxzU6ZnUUBghxt9cwUWTpfCktkMZiPSDGd
KgQBjnweV2jw9UOTxjb4LXqDjmSNkjDdQUOU69jGMUXgihvo4zhYcMX8F5gWdRtMR7DzW/YE
BgVcyxNkMIXoY1aYj6npHYiNQesQlqjU6azjbH70/SXKM5tNRplgW8TNprMDuntdvV9wNkFs
9TyM02V5aWxFfI42+aivc4KEw69SE9KXwC7FSf5wXzuTot97N9Phj/Z3+jx443jo2NR34XgF
89cct7wJMjOF7bBefo0fPPZQuIma0Zym71cP61OP/i11ahNye6HGKfxGCOcs5wW9kRQEk8P9
M/k2wt3mt/fCQnuP/mWutNPt95w9wSsUyATLmtNrwccz63XOwU0EVcufkQEQAOfX3n0g0fZz
Bgm/S2zF/kxQKCEKP8ID+Vz8sy2GpDvveBq4H2Y34XWsT1zLJdvqPI4af4ZSMxuerWjXbVWb
T6d4odQIG0fKx4F8NccDqbgHeZRNajXeeJ3R7gAzvWvQNLz4piHrO/B4tf8svmRBL0ZB5P5A
2uhdwLU3NZuK22zpNn4is87BPWF8HhY0L5fafgDMOqnf4guJVJPYNPhUFzXUbPqOKOkL8ojk
CXxkOFHAbjstSK5Ca3fKquY3rdX3DNo+EL7FvAiw1mUtS+5GeYE+RMnDCsVFm/C7kY8c2d0G
NWkB9pJM5+mnIoFNxy7YBcldYATVeOHoY4LyaUWNnAvFYWp08dHWfZo9WCiJMuTfgtH9tc75
7QanMVdPt6fDK8UUXIBLQ2TWr/sQKE9xtFuEmoQGlE1l6bGaDnnMLcYu+Asp3kDT0w4zYGsx
5r6XQVRH4+5N6eHZiaeYtFOujp5n+pjBaQK7wUUjDilPQ5QMzIuCL4YjVoylWiBNknvQWBXS
lQCWmavOT9sttGQXdPCC5ynI+1ymZC1ORZKANLnRAb0NH/UCzcsstw2TAkFnMEbo9Zu9w7Kv
AxBQXWeXhJI9XQssfrf4Gusdqx8nPEpfOqCtbbwJMATbHyqLt7/oz/5deGuwxgb65pWIzufa
N7eop7uh+6bezi+rugUI+w6DABEBAAHCwXwEGAEIACYCGwwWIQQb2cqtc1xMOkYN/MpN3hD3
AP+DWgUCXw7HsgUJEqkpoQAKCRBN3hD3AP+DWrrpD/4qS3dyVRxDcDHIlmguXjC1Q5tZTwNB
boaBTPHSy/Nksu0eY7x6HfQJ3xajVH32Ms6t1trDQmPx2iP5+7iDsb7OKAb5eOS8h+BEBDeq
3ecsQDv0fFJOA9ag5O3LLNk+3x3q7e0uo06XMaY7UHS341ozXUUI7wC7iKfoUTv03iO9El5f
XpNMx/YrIMduZ2+nd9Di7o5+KIwlb2mAB9sTNHdMrXesX8eBL6T9b+MZJk+mZuPxKNVfEQMQ
a5SxUEADIPQTPNvBewdeI80yeOCrN+Zzwy/Mrx9EPeu59Y5vSJOx/z6OUImD/GhX7Xvkt3kq
Er5KTrJz3++B6SH9pum9PuoE/k+nntJkNMmQpR4MCBaV/J9gIOPGodDKnjdng+mXliF3Ptu6
3oxc2RCyGzTlxyMwuc2U5Q7KtUNTdDe8T0uE+9b8BLMVQDDfJjqY0VVqSUwImzTDLX9S4g/8
kC4HRcclk8hpyhY2jKGluZO0awwTIMgVEzmTyBphDg/Gx7dZU1Xf8HFuE+UZ5UDHDTnwgv7E
th6RC9+WrhDNspZ9fJjKWRbveQgUFCpe1sa77LAw+XFrKmBHXp9ZVIe90RMe2tRL06BGiRZr
jPrnvUsUUsjRoRNJjKKA/REq+sAnhkNPPZ/NNMjaZ5b8Tovi8C0tmxiCHaQYqj7G2rgnT0kt
WNyWQQ==
Organization: Red Hat
In-Reply-To: <9f7ae0e6-4640-418d-a4db-dba594377ac2@xxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 04.06.25 15:17, Donet Tom wrote:
On 6/4/25 3:15 PM, David Hildenbrand wrote:
On 04.06.25 05:07, Andrew Morton wrote:
On Wed, 28 May 2025 12:18:00 -0500 Donet Tom <donettom@xxxxxxxxxxxxx>
wrote:
During node device initialization, `memory blocks` are registered under
each NUMA node. The `memory blocks` to be registered are identified
using
the node’s start and end PFNs, which are obtained from the node's
pg_data
It's quite unconventional to omit the [0/N] changelog. This omission
somewhat messed up my processes so I added a one-liner to this.
Yeah, I was assuming that I simply did not get cc'ed on the cover
letter, but there is actually none.
Donet please add that in the future. git can do this using
--cover-letter.
Sure,
I will add cover letter in next revision.
...
Test Results on My system with 32TB RAM
=======================================
1. Boot time with CONFIG_DEFERRED_STRUCT_PAGE_INIT enabled.
Without this patch
------------------
Startup finished in 1min 16.528s (kernel)
With this patch
---------------
Startup finished in 17.236s (kernel) - 78% Improvement
Well someone is in for a nice surprise.
2. Boot time with CONFIG_DEFERRED_STRUCT_PAGE_INIT disabled.
Without this patch
------------------
Startup finished in 28.320s (kernel)
what. CONFIG_DEFERRED_STRUCT_PAGE_INIT is supposed to make bootup
faster.
Right, that's weird. Especially that it is still slower after these
changes.
CONFIG_DEFERRED_STRUCT_PAGE_INIT should be initializing in parallel
which ... should be faster.
@Donet, how many CPUs and nodes does your system have? Can you
identify what is taking longer than without
CONFIG_DEFERRED_STRUCT_PAGE_INIT?
My system has,
CPU - 1528
Holy cow.
Pure speculation: are we parallelizing *too much* ? :)
That's ~95 CPUs per node on average.
Staring at deferred_init_memmap(), we do have
max_threads = deferred_page_init_max_threads(cpumask);
And that calls cpumask_weight(), essentially using all CPUs on the node.
... not sure what exactly happens if there are no CPUs for a node.
Node - 16
Are any of these memory-less?
Memory - 31TB
--
Cheers,
David / dhildenb
Return-Path: <linux-kernel+bounces-673271-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 256A841E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:30:44 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 37EB53A5FB0
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:30:21 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id EF0DB28ECE4;
Wed, 4 Jun 2025 13:30:37 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Np+Yj+Cp"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id AA1AE28F537
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:30:35 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749043837; cv=none; b=ZYXzIs1XorINKkAYCY9r6kukLv02ovsO/1mad/zzJ8NdvNxl44nSuJj4qy7D/Exm4kzFGC0dS9ixlM4NQiMs0mh46uZLRyHuQY6aw8r4JH6B3orAm/9z2bZxxtXRPqcWqwrqnflAEZ5CwEIhTN1YgRySnU1rNRGV7jRce/BohEA=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749043837; c=relaxed/simple;
bh=vGc/ya8WD8Arl5kBDqEmegGuYoXLUKGi0BH+cyLb1Ac=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=Yp/cnziJQ6DZrVL0HMYkvB/kdiRUO/LAT7MaipoOVP2WirTLSF5H48Ar4i/4vOmy5PdxNeXueIKbdbDlTRbOi7vtDi5u11Mgx408G1DNfOQ+Y60wKJK7x4JlIAlk1jkkyH0BuscE74H8JlTxcvyNNbl6P/Wy1D6/jIHfNV7cmAo=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Np+Yj+Cp; arc=none smtp.client-ip=170.10.129.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749043834;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=+X4krYrnH5NEJpMGCxhyBmpja6nPciHd8wSnog0o/ME=;
b=Np+Yj+Cpb5eZvlhGMNWyqDTgEiuLlAuo1RgyV18fZDFv2zr9nDzRpi0oXn/SBorIll5TGB
qK94DIzmJSz9nVk6wUUcnIePIrDYaAWqzMO0zWg+IL9GmEicb1RDshV10DLFC5X5T4pw/C
JLza0CseFyRzQP7GzZKHpvD1LnHbCbM=
Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com
[209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-81-uBoKpPGoPs-pAMWI0StnyA-1; Wed, 04 Jun 2025 09:30:32 -0400
X-MC-Unique: uBoKpPGoPs-pAMWI0StnyA-1
X-Mimecast-MFC-AGG-ID: uBoKpPGoPs-pAMWI0StnyA_1749043832
Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-3a4fac7fa27so2305196f8f.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 06:30:32 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749043831; x=1749648631;
h=content-transfer-encoding:in-reply-to:organization:autocrypt
:content-language:from:references:cc:to:subject:user-agent
:mime-version:date:message-id:x-gm-message-state:from:to:cc:subject
:date:message-id:reply-to;
bh=+X4krYrnH5NEJpMGCxhyBmpja6nPciHd8wSnog0o/ME=;
b=m4agw8Fn1TulEMrFIY05HWiKjtBFh7e/iMXK8rK111znMAaZ1uY+mLc7GsJl8SzGk5
0PdWSmkGTWoCucBCjBT/Cn/TQMlQvk+PSURhpIuN3s9plS5QlEdp8PVlBc1JRGsPFGkL
UKKNvjV3QudUQv070QGoyCCcbu1IMDpN9E8emHU5sNvjyp7nbcqsSECf6WFHorIASEmI
/Kw8FNBgcV/iOwEqDOb3kqQYyn7+bpepuumG7PNpAfPDNfZM91zWO5cFgjK/OQoBXSG4
/4LCNBbZde3hKBjyi3Bne/U6D63mNK4X7el41Q/VUwUlEIh6Ai9W5k8OVESpB/vpiNjY
C9LA==
X-Forwarded-Encrypted: i=1; AJvYcCX06Q4lpKl6BG0BKfgY8ObY3WmBrNQlZXOxUFJTug7JtM4CMiLQi/Th7qcpiD5qNjWblxMHnjaNJxFYH2w=@vger.kernel.org
X-Gm-Message-State: AOJu0YxEeOWvBJ3MGngiunfoIhakoTW9LBTaFCmLBcOL68OYVKrdbWpu
n+hO4lD6xAveYvFD+GRSpTzxamk0/AjZDvL4cXMn8H0y6gW/o/mttQscvtZidlsEtE2mUgXdZAk
nzRkpbQupATxz1FD8bRQAc96zGMyflgbfidWKem2PEIsjjf7DqlBvTVEr9MyUQd9Gd+mur20GcA
q1
X-Gm-Gg: ASbGnctc87cgmJkmaUHhH1KJzCnG7IYDtUOAKTiiuFbpszqEzQpHZhqtwl0uqs0m+0n
Krp18wVamfN25BlupmIOqavHqoQ05jxmnR0hRMsRFXZ6g/i/Dbb61yCAtA3dsMSF/lV1+OX8vIW
bOW21uA32sCDEvliH7g4guqPZOCvfBsIoHK9tiTmJWpfqnoeVJ0GfQRgcQ+0KZLzpE4JyQI/p85
68C3rqeBZHSJm6SNVqbqCmCZ1dhUslTpRUBD2jPEoJIrILEY1rf4bNNWaPacXHWW6N8lxRrpi2D
/CeuTziT/fe2thSFBJaI9lh/9wq/2euRJZ7LP3uOz7DFEfnmy856xnS6sc5whFp+k7iJ4TH8DVj
uCuXkhT3toYlrGM4L4hENpfdSKGT1fSN2vV4nNNnk58R7IZFuYw==
X-Received: by 2002:a05:6000:178f:b0:3a2:ffbe:3676 with SMTP id ffacd0b85a97d-3a51d975b8bmr2460452f8f.49.1749043831559;
Wed, 04 Jun 2025 06:30:31 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IEpcxAjAVL4GX5/4qPkj9qmsXJ/nEQtr6a+UPbPxY3tj6mbKjE9dQy9GiHzcIDrG79/3qURZg==
X-Received: by 2002:a05:6000:178f:b0:3a2:ffbe:3676 with SMTP id ffacd0b85a97d-3a51d975b8bmr2460422f8f.49.1749043831138;
Wed, 04 Jun 2025 06:30:31 -0700 (PDT)
Received: from ?IPV6:2003:d8:2f1b:b800:6fdb:1af2:4fbd:1fdf? (p200300d82f1bb8006fdb1af24fbd1fdf.dip0.t-ipconnect.de. [2003:d8:2f1b:b800:6fdb:1af2:4fbd:1fdf])
by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a5253a7aeesm354307f8f.1.2025.06.04.06.30.29
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 06:30:30 -0700 (PDT)
Message-ID: <106e83b1-7738-4c98-9095-84cfc1017b73@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 15:30:29 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v7 1/5] drivers/base/node: Optimize memory block
registration to reduce boot time
To: Donet Tom <donettom@xxxxxxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Mike Rapoport <rppt@xxxxxxxxxx>,
Oscar Salvador <osalvador@xxxxxxx>, Zi Yan <ziy@xxxxxxxxxx>,
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Cc: Ritesh Harjani <ritesh.list@xxxxxxxxx>, linux-mm@xxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, "Rafael J . Wysocki" <rafael@xxxxxxxxxx>,
Danilo Krummrich <dakr@xxxxxxxxxx>,
Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>,
Alison Schofield <alison.schofield@xxxxxxxxx>,
Yury Norov <yury.norov@xxxxxxxxx>, Dave Jiang <dave.jiang@xxxxxxxxx>,
Madhavan Srinivasan <maddy@xxxxxxxxxxxxx>, Nilay Shroff
<nilay@xxxxxxxxxxxxx>, linuxppc-dev@xxxxxxxxxxxxxxxx
References: <2a0a05c2dffc62a742bf1dd030098be4ce99be28.1748452241.git.donettom@xxxxxxxxxxxxx>
<96f7d3a2-2d85-442c-a9f7-e558d4a2ba06@xxxxxxxxxx>
<de209828-d237-4912-905b-8c7de7e5734d@xxxxxxxxxxxxx>
From: David Hildenbrand <david@xxxxxxxxxx>
Content-Language: en-US
Autocrypt: addr=david@xxxxxxxxxx; keydata=
xsFNBFXLn5EBEAC+zYvAFJxCBY9Tr1xZgcESmxVNI/0ffzE/ZQOiHJl6mGkmA1R7/uUpiCjJ
dBrn+lhhOYjjNefFQou6478faXE6o2AhmebqT4KiQoUQFV4R7y1KMEKoSyy8hQaK1umALTdL
QZLQMzNE74ap+GDK0wnacPQFpcG1AE9RMq3aeErY5tujekBS32jfC/7AnH7I0v1v1TbbK3Gp
XNeiN4QroO+5qaSr0ID2sz5jtBLRb15RMre27E1ImpaIv2Jw8NJgW0k/D1RyKCwaTsgRdwuK
Kx/Y91XuSBdz0uOyU/S8kM1+ag0wvsGlpBVxRR/xw/E8M7TEwuCZQArqqTCmkG6HGcXFT0V9
PXFNNgV5jXMQRwU0O/ztJIQqsE5LsUomE//bLwzj9IVsaQpKDqW6TAPjcdBDPLHvriq7kGjt
WhVhdl0qEYB8lkBEU7V2Yb+SYhmhpDrti9Fq1EsmhiHSkxJcGREoMK/63r9WLZYI3+4W2rAc
UucZa4OT27U5ZISjNg3Ev0rxU5UH2/pT4wJCfxwocmqaRr6UYmrtZmND89X0KigoFD/XSeVv
jwBRNjPAubK9/k5NoRrYqztM9W6sJqrH8+UWZ1Idd/DdmogJh0gNC0+N42Za9yBRURfIdKSb
B3JfpUqcWwE7vUaYrHG1nw54pLUoPG6sAA7Mehl3nd4pZUALHwARAQABzSREYXZpZCBIaWxk
ZW5icmFuZCA8ZGF2aWRAcmVkaGF0LmNvbT7CwZgEEwEIAEICGwMGCwkIBwMCBhUIAgkKCwQW
AgMBAh4BAheAAhkBFiEEG9nKrXNcTDpGDfzKTd4Q9wD/g1oFAl8Ox4kFCRKpKXgACgkQTd4Q
9wD/g1oHcA//a6Tj7SBNjFNM1iNhWUo1lxAja0lpSodSnB2g4FCZ4R61SBR4l/psBL73xktp
rDHrx4aSpwkRP6Epu6mLvhlfjmkRG4OynJ5HG1gfv7RJJfnUdUM1z5kdS8JBrOhMJS2c/gPf
wv1TGRq2XdMPnfY2o0CxRqpcLkx4vBODvJGl2mQyJF/gPepdDfcT8/PY9BJ7FL6Hrq1gnAo4
3Iv9qV0JiT2wmZciNyYQhmA1V6dyTRiQ4YAc31zOo2IM+xisPzeSHgw3ONY/XhYvfZ9r7W1l
pNQdc2G+o4Di9NPFHQQhDw3YTRR1opJaTlRDzxYxzU6ZnUUBghxt9cwUWTpfCktkMZiPSDGd
KgQBjnweV2jw9UOTxjb4LXqDjmSNkjDdQUOU69jGMUXgihvo4zhYcMX8F5gWdRtMR7DzW/YE
BgVcyxNkMIXoY1aYj6npHYiNQesQlqjU6azjbH70/SXKM5tNRplgW8TNprMDuntdvV9wNkFs
9TyM02V5aWxFfI42+aivc4KEw69SE9KXwC7FSf5wXzuTot97N9Phj/Z3+jx443jo2NR34XgF
89cct7wJMjOF7bBefo0fPPZQuIma0Zym71cP61OP/i11ahNye6HGKfxGCOcs5wW9kRQEk8P9
M/k2wt3mt/fCQnuP/mWutNPt95w9wSsUyATLmtNrwccz63XOwU0EVcufkQEQAOfX3n0g0fZz
Bgm/S2zF/kxQKCEKP8ID+Vz8sy2GpDvveBq4H2Y34XWsT1zLJdvqPI4af4ZSMxuerWjXbVWb
T6d4odQIG0fKx4F8NccDqbgHeZRNajXeeJ3R7gAzvWvQNLz4piHrO/B4tf8svmRBL0ZB5P5A
2uhdwLU3NZuK22zpNn4is87BPWF8HhY0L5fafgDMOqnf4guJVJPYNPhUFzXUbPqOKOkL8ojk
CXxkOFHAbjstSK5Ca3fKquY3rdX3DNo+EL7FvAiw1mUtS+5GeYE+RMnDCsVFm/C7kY8c2d0G
NWkB9pJM5+mnIoFNxy7YBcldYATVeOHoY4LyaUWNnAvFYWp08dHWfZo9WCiJMuTfgtH9tc75
7QanMVdPt6fDK8UUXIBLQ2TWr/sQKE9xtFuEmoQGlE1l6bGaDnnMLcYu+Asp3kDT0w4zYGsx
5r6XQVRH4+5N6eHZiaeYtFOujp5n+pjBaQK7wUUjDilPQ5QMzIuCL4YjVoylWiBNknvQWBXS
lQCWmavOT9sttGQXdPCC5ynI+1ymZC1ORZKANLnRAb0NH/UCzcsstw2TAkFnMEbo9Zu9w7Kv
AxBQXWeXhJI9XQssfrf4Gusdqx8nPEpfOqCtbbwJMATbHyqLt7/oz/5deGuwxgb65pWIzufa
N7eop7uh+6bezi+rugUI+w6DABEBAAHCwXwEGAEIACYCGwwWIQQb2cqtc1xMOkYN/MpN3hD3
AP+DWgUCXw7HsgUJEqkpoQAKCRBN3hD3AP+DWrrpD/4qS3dyVRxDcDHIlmguXjC1Q5tZTwNB
boaBTPHSy/Nksu0eY7x6HfQJ3xajVH32Ms6t1trDQmPx2iP5+7iDsb7OKAb5eOS8h+BEBDeq
3ecsQDv0fFJOA9ag5O3LLNk+3x3q7e0uo06XMaY7UHS341ozXUUI7wC7iKfoUTv03iO9El5f
XpNMx/YrIMduZ2+nd9Di7o5+KIwlb2mAB9sTNHdMrXesX8eBL6T9b+MZJk+mZuPxKNVfEQMQ
a5SxUEADIPQTPNvBewdeI80yeOCrN+Zzwy/Mrx9EPeu59Y5vSJOx/z6OUImD/GhX7Xvkt3kq
Er5KTrJz3++B6SH9pum9PuoE/k+nntJkNMmQpR4MCBaV/J9gIOPGodDKnjdng+mXliF3Ptu6
3oxc2RCyGzTlxyMwuc2U5Q7KtUNTdDe8T0uE+9b8BLMVQDDfJjqY0VVqSUwImzTDLX9S4g/8
kC4HRcclk8hpyhY2jKGluZO0awwTIMgVEzmTyBphDg/Gx7dZU1Xf8HFuE+UZ5UDHDTnwgv7E
th6RC9+WrhDNspZ9fJjKWRbveQgUFCpe1sa77LAw+XFrKmBHXp9ZVIe90RMe2tRL06BGiRZr
jPrnvUsUUsjRoRNJjKKA/REq+sAnhkNPPZ/NNMjaZ5b8Tovi8C0tmxiCHaQYqj7G2rgnT0kt
WNyWQQ==
Organization: Red Hat
In-Reply-To: <de209828-d237-4912-905b-8c7de7e5734d@xxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Thank you David
I’ll make the change and send the next revision.
Feel free to only send a fixup on top of this patch.
--
Cheers,
David / dhildenb
Return-Path: <linux-kernel+bounces-673272-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 8A6E141E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:31:47 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 83E031896604
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:32:00 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 75F5B28ECF3;
Wed, 4 Jun 2025 13:31:38 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="tCl10R/v"
Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2064.outbound.protection.outlook.com [40.107.237.64])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id DD38E175A5;
Wed, 4 Jun 2025 13:31:35 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.237.64
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749043897; cv=fail; b=BfI4VEPbYXvt/gm6UOX9rUlqaEfAbHXQKHw/U8LZUdBxZTucwtk6zvDMgLqhcrv5Pb2qJ6Uznx049kC/jLy8GlprPP6UQj8gMm4xZX9K4/0s0aCKLrfl1AOQGeL+rLNHxrWg3mFtdRoaYFHqwiXznn/H1u53eRjXcywF2i3xrJ0=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749043897; c=relaxed/simple;
bh=Dh8F9NtE/AxAkLoLxtxoAbp34YKNBTL3wHQIbmWdDL4=;
h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To:
Content-Type:MIME-Version; b=YXXElKMLBiN1bVp46tnHd+m011Wxji942FadPXsOUeJ4JnrOJ/MnNuJibHpN6/hThejCB03xXamzO48ksVKN0PqaRNfbIQ7Ufg2x0TSq3L1zWvdWjmfsWogRUarFSnceEZXBn+NOIVX6hgbVZiDzTrTVxuPWnhCw8gOOycR519o=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=tCl10R/v; arc=fail smtp.client-ip=40.107.237.64
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com
Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=xw7DBvwRv1PCLZHrD/+esQdsrMLHI43F9Ad6KB0ITlyGEaqZ/ZdwAP3hIC26NM1lSUK/gInIDfeJLRHmr3QKBCsnCU9wm+9kDv8Obz1a61C/KJYcEKP+h+i/YzptzrlHGT1NNOs5efYzp+yZ/hooRiqaqacF4Fdwck5kmBlxTuR5K2oxHA0f65wqZtbt++KoXIJsBk+DG8OoAhi5XBLZFyGzNg4N/D/qUv3QXDbnJv/YKEKMPvQvYwUUr1VDg7TNQWqignlRRi5iAdbbGCGbm0C5Cyr+JYX0bdGfaorp04krqFAEalv3QICO+18VYgT1vdtwdzKVvHG63U2WAaqYBA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=Tcl/p1LLKx9KPTyXX5IWb2qyp/e/lHNmEERNzvJWki4=;
b=paIU5Cde8hCJyP84mdpLBpDYFCRsxa7pCBl/hGjWAWhj8eqXAxRxqnXIjiP//fbD16TP3qAPJ5vhZyiJ0WYOPBq4U693DyGusX1BoHfh+Rlecoh0MUgC8j7lj4QJ+T4IKQT5mnB6xgPQi4ZtLkexd0YqlWDNK2tpaqqLgzYGFlVtUfDM0DfBz0hVbna/ka20ufifkg4qLU4Xx2gRCG9EW0OhVrF78Qq0eJ694An2Fizpkr2+XdHa42/raxvzwwa2WT4w0zZYd+m8KT5jALGUYiuPtYq0XNUkBUE6eWksgkNb10dY+FCG/wko602R2HiYhQoC/OEf0jQIGiIHIQGr8g==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass
header.d=amd.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=Tcl/p1LLKx9KPTyXX5IWb2qyp/e/lHNmEERNzvJWki4=;
b=tCl10R/vd1lM36lLb6XWi/TEks0KJpwEyIcxf1Lf5iioHV3J9QuA0AdeMly1peCr44rSxzHrZiXPTSKpyVXgeHCBTah5XtbiKX2MmwnxLdQCjhPhxVByecPrWrE2CMW1qZs3I6hhuLGoYshrsuKjq5dsCzFcnRu3MSwXDsNbsoc=
Received: from IA1PR12MB6044.namprd12.prod.outlook.com (2603:10b6:208:3d4::20)
by MN2PR12MB4439.namprd12.prod.outlook.com (2603:10b6:208:262::17) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.34; Wed, 4 Jun
2025 13:31:33 +0000
Received: from IA1PR12MB6044.namprd12.prod.outlook.com
([fe80::b62f:a186:3978:4a57]) by IA1PR12MB6044.namprd12.prod.outlook.com
([fe80::b62f:a186:3978:4a57%3]) with mapi id 15.20.8769.037; Wed, 4 Jun 2025
13:31:32 +0000
From: "Zhu, Yihan" <Yihan.Zhu@xxxxxxx>
To: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>, Alex Deucher
<alexdeucher@xxxxxxxxx>, "Hung, Alex" <Alex.Hung@xxxxxxx>
CC: "Deucher, Alexander" <Alexander.Deucher@xxxxxxx>, "Lin, Wayne"
<Wayne.Lin@xxxxxxx>, Linux Kernel Mailing List
<linux-kernel@xxxxxxxxxxxxxxx>, Linux Next Mailing List
<linux-next@xxxxxxxxxxxxxxx>
Subject: RE: linux-next: build warning after merge of the amdgpu tree
Thread-Topic: linux-next: build warning after merge of the amdgpu tree
Thread-Index: AQHb1QAQrzLA18ZA9kmk8U1kzhNIFbPy/7Og
Date: Wed, 4 Jun 2025 13:31:32 +0000
Message-ID:
<IA1PR12MB6044D456DA05361DAEFECE4DE36CA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20250604132331.5929895f@xxxxxxxxxxxxxxxx>
In-Reply-To: <20250604132331.5929895f@xxxxxxxxxxxxxxxx>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
msip_labels:
MSIP_Label_dce362fe-1558-4fb5-9f64-8a6240d76441_ActionId=d74cd196-0597-4d3f-baa2-f7dbaa48a868;MSIP_Label_dce362fe-1558-4fb5-9f64-8a6240d76441_ContentBits=0;MSIP_Label_dce362fe-1558-4fb5-9f64-8a6240d76441_Enabled=true;MSIP_Label_dce362fe-1558-4fb5-9f64-8a6240d76441_Method=Standard;MSIP_Label_dce362fe-1558-4fb5-9f64-8a6240d76441_Name=AMD
Internal Distribution
Only;MSIP_Label_dce362fe-1558-4fb5-9f64-8a6240d76441_SetDate=2025-06-04T13:30:34Z;MSIP_Label_dce362fe-1558-4fb5-9f64-8a6240d76441_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d;MSIP_Label_dce362fe-1558-4fb5-9f64-8a6240d76441_Tag=10,
3, 0, 1;
authentication-results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=amd.com;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: IA1PR12MB6044:EE_|MN2PR12MB4439:EE_
x-ms-office365-filtering-correlation-id: 276273ff-e632-4121-7f20-08dda36c1ee6
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;ARA:13230040|1800799024|376014|366016|38070700018;
x-microsoft-antispam-message-info:
=?us-ascii?Q?zHIYQYf3uEksj8E/Pp/HzxbEuiObrCV0LFXyFHcNg76eW/LF9s4jE4DAwZ8P?=
=?us-ascii?Q?NSaTQm+CMY+3Xf0hEReagraRHnGZIWBkuFPC7JxbM7QC9+pMaCYF2Gxev/2m?=
=?us-ascii?Q?ZFJ75QOe484RqOnydstKISOs8RX0/PDf4yweqrN4ZpLOJv+Y6X6j/nz/rXom?=
=?us-ascii?Q?Z41ivD26oKs1CC1pFvcjodojwtJFMwyla0xx0XHYTDtUzCkrXjumXwkHZXa3?=
=?us-ascii?Q?P6YSl7o2Cjf6NnVK1oNrt+WL4T6HpwEEBB6ANPBbXBWrWDwedoAG3L3PdEQJ?=
=?us-ascii?Q?WNljkzAZSnFBfFUk4fmVmMFOek3objClXXkRvskUTNPITksRI/BqlauUwdTY?=
=?us-ascii?Q?tNcHUtdqc706iLrmHEYY8/29bTIgz7FGOJYBAHS5NHtF1sVeL+ykg3+cMqS6?=
=?us-ascii?Q?sjDNrBtYRyC/oYhr4NH0LrIFOCLCt36NQ3QoktpjvnV83k0f5pFCS7y6xl4r?=
=?us-ascii?Q?MyRccifWiewFjxJeCCWqbwmzrQntEAUQaTBIQXbB5pzeBnBl42GG+4cMk7bI?=
=?us-ascii?Q?fWdg2BKhCgK+QR+MIv12BByjj2CUdhDO2xLubWI0MkRFwGGeVgkuLP20vHMX?=
=?us-ascii?Q?s3EH7AGRmZND2xRg7u3f8naYTipoKwPw4bDHfd/1mZKeqiC+wJadT+iGsNxQ?=
=?us-ascii?Q?IgXBI9wmXG+/fRe3Tn8xC7wYd7EFDpVrUVLluJZBpvyFuOjGatbSlAfOmv3O?=
=?us-ascii?Q?T+VBsN9cMGTycgAs9CZOu8CckhbvqQp9+3ibdMqPNMRu3z1Vpvjvtaombgd/?=
=?us-ascii?Q?TUpsFv5boZzwBg+9Q+1a5idOSVJ1U+/sfxpz+ggj9kpGOLbTersSUzW7vHSK?=
=?us-ascii?Q?k6NkZMVbGBCXRwj6AhdLVkMP0qEQOhntRCEu61JPj+bQjM9uDFGENmYyhZd7?=
=?us-ascii?Q?hgZsXW5kCttOV8XOW54cM8yg0ek0QryeNGP2q9dRHkY7lKeGOIIrLwn6f+bI?=
=?us-ascii?Q?JnOlCd/GCYibwOaNmEoKW9l7TGgmNJR66FdQoAV0snkheRxlYjOkZvKA9E2S?=
=?us-ascii?Q?cEjT9f64M3l7AZVqEJmChs/fT+gyS/WxekzCBN9BmRQpzRC7ugNuYHUwKBhZ?=
=?us-ascii?Q?HHB8QQkF7UPvnWiZH5WVFpoIbYzV4L/ez5fU8fUZvguaphpCsHhIN5lV9vWR?=
=?us-ascii?Q?Ti6x+zUE/O3wN+dnATTPBwAnZhiQJzG0KKkOIhZj2iz3PfLAudF7Vd1F7uSa?=
=?us-ascii?Q?RnYNlqzDVAoVS+P9JiKtjRHOF12m9wgyZICXCa3o5FPU2xLeZgIWY39GUh+D?=
=?us-ascii?Q?XbiRR+ioPUD0nkk4TG51qq8gLtUd1z2UcPuwxUCRmRfS3mu+qRb149Huyu2V?=
=?us-ascii?Q?7n29LGisOCSNMtVri7rVajfmiPheX8QSImqvpE5abzc/djjujAd4etrhTZZj?=
=?us-ascii?Q?lr35dlkCZnEhzmXmUr4D+NtRIDEyetUWzhwCxqCViUZVzubmOvhQojQo9jJy?=
=?us-ascii?Q?YfreBALoNmjIn+Hx5AArlMsc3Ajx/luxVX9xFmq7nAq6PstCD0Ks2flF3aNS?=
=?us-ascii?Q?ZJu+AvvK1/kuapY=3D?=
x-forefront-antispam-report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:IA1PR12MB6044.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(376014)(366016)(38070700018);DIR:OUT;SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0:
=?us-ascii?Q?PO/0ABeURue42Ets2KCFUO7KktmfwQrZ6FnBr3W1A+q4h1nt9g8gCfQcZh1q?=
=?us-ascii?Q?y1OwcxyOl7mPIAMmx0Ycl/xVKEHQzEG3W+Z9XGyIEpUQHv/G144Amhc5OxQL?=
=?us-ascii?Q?IaAzhusI23FM0fU+TPMI4BHAoFv4Y/gfOIFbbq+0wq0h5UnCUBZhvUNHlY0D?=
=?us-ascii?Q?M9Xf4R2yyslhtuqOfbXltC59fMdfkPvlGSxxX3GLWgaPoQqovaCr38ycuQrU?=
=?us-ascii?Q?/c4SvNyVZEE6WHBCNv2ir5LCOaxGu+Wj38q4A71Ear0A/yYaCX2tH6nklWlQ?=
=?us-ascii?Q?QiTfPduJdTya7zWATR9Z4zHrsz2JeJHdvdWb+HJg+KESbJDV///D5vBceYhT?=
=?us-ascii?Q?BlteqzJNKKhCPxCnk5dAtORDIygZcEr8kgfFpp9tCHmL+uxY37jFikkNxrVz?=
=?us-ascii?Q?FrDtNK1ZmklM3RsbeKDFv57Fdpe0dZM41LtkOFky1Wgp+nkCSc0LY+08e9W1?=
=?us-ascii?Q?0vpFWvX8sJ5UKHFgS1nqrmn6Dl195sfYVfMQPmZgeJOfo5Vwew9rIkbzcfeb?=
=?us-ascii?Q?kAmzbGT/uztyIaN8WdkJKxFYg0/o3anhNiYrA+wt9ayh38pSrK7UgfSnHpDQ?=
=?us-ascii?Q?an9Rw4PZ8Lq26yECjlLapzoCi82lANpkDahuGeeowDwX6nh2uUtZLcEXEcwJ?=
=?us-ascii?Q?Y59SYlnJrlcxO8fBA3vVqqIIgSGMOkhR/yL9qK6A0jAAXN5Ux0fl6gd50YI+?=
=?us-ascii?Q?AiFMT6AgWkc1aFoRv8EYy+r5n5etx4iO/z36nQhNPIP36mZyI4DrPPfaBlel?=
=?us-ascii?Q?HEuCN/YPFwKMABdul8JdvDfMRqW02RRasHqtTuiXXVc6udDV7jWcSEWhNLy/?=
=?us-ascii?Q?TMSpsKrKgGqlIizwUqApo8yiuttz4Q8gkF7tcDVrpoSPSJFQBZcQ2Z3stdo1?=
=?us-ascii?Q?2BuokgTahvjm18EylMC7IyFOuPUq1gBf9iPiXQlekKv8LbT7wRQr6XkOX3gu?=
=?us-ascii?Q?2MvS6eBvRyFup6YCImx2YgjhJoA6A1WOYL0nHw0ERx3FgHGjiCGQAkFxfpaZ?=
=?us-ascii?Q?JD5l8G14A/mERb/ErHJVfyvKj1kaa0WeKpzStLzzpv2/FlF/DjRtkklJR89R?=
=?us-ascii?Q?THTfDKtTNyMuWYyVRVnq5CxTIKGBCJD3vmEtt2RArM0gLUyUPSZ3Txocqgsq?=
=?us-ascii?Q?7blwBfwLaDIv9Nbh2WfR1wd+EpluPTkvSlLgWMlP6mljjMyKVC3GW7F/RAQi?=
=?us-ascii?Q?N5WyQsEvB/HyFAPGgoBiwGVjQO4BHWNQtgfRbOeZYXvNR2x/qeWa+aviNeCG?=
=?us-ascii?Q?sVG01nj2fZvmYG/OSuMIOxb8fDDsjrAPnrPgy980lEaAoK5XHfRJTkFVXOzt?=
=?us-ascii?Q?u6qU/8xRPEG7rJRquNSjjyC1xYDbnlCRCHmu+Gl556G9+WkKZCKV0JkS4muv?=
=?us-ascii?Q?ByIJXaUxl+J9SzWkraw2j2qmujbUioiIgrSejDNs14u8Uh5/wCCM186N0A4d?=
=?us-ascii?Q?s0QV/oPhJfL6+9xhUfUw2NviZJgHlYSH81uSysgMpukTKKKXG4p0h6IA9Y14?=
=?us-ascii?Q?vJ9eNjnj4Fvc2zMeAng07I8CPslhNyVSUK5O2sBY7mLSr/AfDxyWL/t10A9j?=
=?us-ascii?Q?ddlCPgf2tLqJTVtYwVY=3D?=
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-OriginatorOrg: amd.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: IA1PR12MB6044.namprd12.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 276273ff-e632-4121-7f20-08dda36c1ee6
X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jun 2025 13:31:32.6343
(UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: URynjYb5s0CTzlL8IOWxZXCXQDSiSKgyGhW02/ZOVUFQFCsnIR56cw5J6qYjxxPF49KTQRudQ66YWcZVj4M4HA==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4439
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
[AMD Official Use Only - AMD Internal Distribution Only]
Hi,
+Alex, I sent description to Alex and he is helping me to add it into the u=
pstream.
Regards,
Yihan Z
-----Original Message-----
From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Sent: Tuesday, June 3, 2025 11:24 PM
To: Alex Deucher <alexdeucher@xxxxxxxxx>
Cc: Deucher, Alexander <Alexander.Deucher@xxxxxxx>; Lin, Wayne <Wayne.Lin@a=
md.com>; Zhu, Yihan <Yihan.Zhu@xxxxxxx>; Linux Kernel Mailing List <linux-k=
ernel@xxxxxxxxxxxxxxx>; Linux Next Mailing List <linux-next@xxxxxxxxxxxxxxx=
Subject: linux-next: build warning after merge of the amdgpu tree
Hi all,
After merging the amdgpu tree, today's linux-next build (htmldocs) produced=
this warning:
drivers/gpu/drm/amd/display/dc/dc.h:247: warning: Function parameter or str=
uct member 'mcm_3d_lut_caps' not described in 'mpc_color_caps'
drivers/gpu/drm/amd/display/dc/dc.h:247: warning: Function parameter or str=
uct member 'rmcm_3d_lut_caps' not described in 'mpc_color_caps'
Introduced by commit
71e17aedb465 ("drm/amd/display: move RMCM programming")
--
Cheers,
Stephen Rothwell
Return-Path: <linux-kernel+bounces-673273-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id D59A341E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:32:06 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 6A86B1898B83
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:32:18 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 99AF528ECEB;
Wed, 4 Jun 2025 13:31:59 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="I0ZpeLf+"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5320E28ECE4
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:31:56 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749043918; cv=none; b=Ym1l9IkpRF+sXStwA3cvW/E6/y58VLQ0prKNwTznp+Qf0b/Rkr1NnrpostXTScPbgnpBCKoPgG2RvQn0FFbWk02WzjQZ//1cNhorswI/qIrrKaRk0gd7hWqSWY5PDilFpYKQdm4Y25+8hwQ64acD4Cj6Old9xgWd2kChJ+dH2MA=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749043918; c=relaxed/simple;
bh=O4p6l7rBXQaRRM9UG2LP564Nihs+2sZX1zb0j3V5gys=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=CIjWu/UWyROl+LySr3Pmw1GukbN17m93LO43DLtNBXd7Ai6lD8IblOc6sJwuR8EB6tkjWwg4lmkuFjWeJwai+Msj4xuvv+bvU7FcU0b7RB67PQs8Z3YkhQLyCP6oBx0FvOXw+NsgPDdbBk6gfBL6I9ZRYEKzUosiPTxBiBYU3u4=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=I0ZpeLf+; arc=none smtp.client-ip=170.10.133.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749043914;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=g0ak6P4hoXZV0IlX+BuzhQGv8bbw0xx57RHIQQN6xpI=;
b=I0ZpeLf+qFCmgMGKDEdwNX5X6lRmciek5p7by19eYyUay92z1nqoHSDqhTBcOutSCRUKRQ
+H19pDjB/MZD26e0hwxoZqGOfzfFL65poPuCJa5VPBWRtbqJVcY7SkvAI2im/clPzba3RI
7R+orqwO0tZj41ivfC/7mQeRjoY60GQ=
Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com
[209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-186-xw-ulHPQMiad9kjSaHmElQ-1; Wed, 04 Jun 2025 09:31:52 -0400
X-MC-Unique: xw-ulHPQMiad9kjSaHmElQ-1
X-Mimecast-MFC-AGG-ID: xw-ulHPQMiad9kjSaHmElQ_1749043910
Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-3a50049f8eeso1938224f8f.3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 06:31:52 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749043910; x=1749648710;
h=content-transfer-encoding:in-reply-to:organization:autocrypt
:content-language:from:references:cc:to:subject:user-agent
:mime-version:date:message-id:x-gm-message-state:from:to:cc:subject
:date:message-id:reply-to;
bh=g0ak6P4hoXZV0IlX+BuzhQGv8bbw0xx57RHIQQN6xpI=;
b=Qw/hrTrhS9PEzELhkd8MDyMlHV5uW3mbyT8VEU5njFNl2d2t9hQPVL4lsh6ia5M0NL
LoxBSX61KlejJ3LFTwRGtC0QtFCcNptwQCpyFKPhHYCWhNNub148/RsUpNYAVV0PSNk0
x2pyuOiZETK0/yXsCaDV/W3gJ7qKe+skLHmcPgScHKl1ENMLjOJdP+5y/HQl5oXohUDT
qyZKknO9hqJ1JKxSEFiMNW1qNNdWn/QhFL1vdM0/VTTSjjDSw5mnu+6NWpWi/8Zoye0z
zKNdRAhY7AYlrj/kwPipuUNUclZtL6Cyqg42woj5PkOZVj9+HHGnAMRdI91iUxwt/8E0
+klw==
X-Forwarded-Encrypted: i=1; AJvYcCWH0pV1EIabu0tLB+5xy1AZqMM0TpSL8YD8CZPGNPOdtReX1iz1sKZVk/pKwvpDs4o4+nXU/NgDk81C/Kg=@vger.kernel.org
X-Gm-Message-State: AOJu0Yy2SK9NsOFLPnVvdH7F9MW/FhhQG3Yfby9xSsfoLqB77OvOOtQa
LPs+ikTQ8lmMy3MLbSBe6LMR0aUlpKBE18BGMiQNx/oCDJuslWNO2IE0MYYlZfIREw7uwBIbce6
K/9OVwI1Krc2IhL/USSPtS42nO7S9VimoyUS496feoxSpu0sT2zbvT1RVcx0QoVqjmw==
X-Gm-Gg: ASbGnctFsQTTa8iGvXW2qEaUvPs6t1fCHHjIRRK12vse2Vtwlnz+k1hkA92Pvn0YhFa
QldLQCgGBGNSl0VUKbN7AQ7JbAUHheXSl+i2tGvoYW/iYCtzbwWscHJ17FLEcYKBbPo5a/VOHSW
qxOOv+ZIuQD6whVJa9XG+2Zm+u0Y389TqC9Yj1rZ1rBfuB4+LUkZs+z5CX92wJLecYZD+gD8YWD
17lTmhh1K/tK7UP0j2GSZzXPlDlpa1NrI8H30aa4YqQVXwriDaBhY7lSEMV3753fm8edTRhAjS7
UhP8ymJn2U37WP7/pHWrC+r8p/c77M2qhwATeSLsoMdNSdJju/QJ7XKcBGmTRcx3m8LnoN5A2NE
50rELlegJ53YqBwAQq2mpy0i5YtQ823iFkdhTXBI=
X-Received: by 2002:a05:6000:420f:b0:3a4:c75c:efd5 with SMTP id ffacd0b85a97d-3a51d96e747mr2414349f8f.46.1749043909877;
Wed, 04 Jun 2025 06:31:49 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IGuM2gMUpQSJdpex6F6doEYF6luunnpKyBL6ysGIZNUcXOZj9kxWx4CEbjV1uSXlRCdGrEK/g==
X-Received: by 2002:a05:6000:420f:b0:3a4:c75c:efd5 with SMTP id ffacd0b85a97d-3a51d96e747mr2414289f8f.46.1749043909452;
Wed, 04 Jun 2025 06:31:49 -0700 (PDT)
Received: from ?IPV6:2003:d8:2f1b:b800:6fdb:1af2:4fbd:1fdf? (p200300d82f1bb8006fdb1af24fbd1fdf.dip0.t-ipconnect.de. [2003:d8:2f1b:b800:6fdb:1af2:4fbd:1fdf])
by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a4efe6c91fsm21855003f8f.35.2025.06.04.06.31.48
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 06:31:49 -0700 (PDT)
Message-ID: <b92484b6-c028-4969-8efb-aff747c38f83@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 15:31:47 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH] mm: rename CONFIG_PAGE_BLOCK_ORDER to
CONFIG_PAGE_BLOCK_ORDER_CEIL.
To: Zi Yan <ziy@xxxxxxxxxx>, Anshuman Khandual <anshuman.khandual@xxxxxxx>
Cc: Liam.Howlett@xxxxxxxxxx, akpm@xxxxxxxxxxxxxxxxxxxx,
isaacmanjarres@xxxxxxxxxx, jyescas@xxxxxxxxxx, kaleshsingh@xxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx,
lorenzo.stoakes@xxxxxxxxxx, masahiroy@xxxxxxxxxx, mhocko@xxxxxxxx,
minchan@xxxxxxxxxx, rppt@xxxxxxxxxx, surenb@xxxxxxxxxx,
tjmercier@xxxxxxxxxx, vbabka@xxxxxxx
References: <20250603154843.1565239-1-ziy@xxxxxxxxxx>
<d6f18e51-47a4-498c-ad66-60fa2d8efbfc@xxxxxxx>
<957DB2F9-9C7E-486E-95EA-1E6574F82D4B@xxxxxxxxxx>
From: David Hildenbrand <david@xxxxxxxxxx>
Content-Language: en-US
Autocrypt: addr=david@xxxxxxxxxx; keydata=
xsFNBFXLn5EBEAC+zYvAFJxCBY9Tr1xZgcESmxVNI/0ffzE/ZQOiHJl6mGkmA1R7/uUpiCjJ
dBrn+lhhOYjjNefFQou6478faXE6o2AhmebqT4KiQoUQFV4R7y1KMEKoSyy8hQaK1umALTdL
QZLQMzNE74ap+GDK0wnacPQFpcG1AE9RMq3aeErY5tujekBS32jfC/7AnH7I0v1v1TbbK3Gp
XNeiN4QroO+5qaSr0ID2sz5jtBLRb15RMre27E1ImpaIv2Jw8NJgW0k/D1RyKCwaTsgRdwuK
Kx/Y91XuSBdz0uOyU/S8kM1+ag0wvsGlpBVxRR/xw/E8M7TEwuCZQArqqTCmkG6HGcXFT0V9
PXFNNgV5jXMQRwU0O/ztJIQqsE5LsUomE//bLwzj9IVsaQpKDqW6TAPjcdBDPLHvriq7kGjt
WhVhdl0qEYB8lkBEU7V2Yb+SYhmhpDrti9Fq1EsmhiHSkxJcGREoMK/63r9WLZYI3+4W2rAc
UucZa4OT27U5ZISjNg3Ev0rxU5UH2/pT4wJCfxwocmqaRr6UYmrtZmND89X0KigoFD/XSeVv
jwBRNjPAubK9/k5NoRrYqztM9W6sJqrH8+UWZ1Idd/DdmogJh0gNC0+N42Za9yBRURfIdKSb
B3JfpUqcWwE7vUaYrHG1nw54pLUoPG6sAA7Mehl3nd4pZUALHwARAQABzSREYXZpZCBIaWxk
ZW5icmFuZCA8ZGF2aWRAcmVkaGF0LmNvbT7CwZgEEwEIAEICGwMGCwkIBwMCBhUIAgkKCwQW
AgMBAh4BAheAAhkBFiEEG9nKrXNcTDpGDfzKTd4Q9wD/g1oFAl8Ox4kFCRKpKXgACgkQTd4Q
9wD/g1oHcA//a6Tj7SBNjFNM1iNhWUo1lxAja0lpSodSnB2g4FCZ4R61SBR4l/psBL73xktp
rDHrx4aSpwkRP6Epu6mLvhlfjmkRG4OynJ5HG1gfv7RJJfnUdUM1z5kdS8JBrOhMJS2c/gPf
wv1TGRq2XdMPnfY2o0CxRqpcLkx4vBODvJGl2mQyJF/gPepdDfcT8/PY9BJ7FL6Hrq1gnAo4
3Iv9qV0JiT2wmZciNyYQhmA1V6dyTRiQ4YAc31zOo2IM+xisPzeSHgw3ONY/XhYvfZ9r7W1l
pNQdc2G+o4Di9NPFHQQhDw3YTRR1opJaTlRDzxYxzU6ZnUUBghxt9cwUWTpfCktkMZiPSDGd
KgQBjnweV2jw9UOTxjb4LXqDjmSNkjDdQUOU69jGMUXgihvo4zhYcMX8F5gWdRtMR7DzW/YE
BgVcyxNkMIXoY1aYj6npHYiNQesQlqjU6azjbH70/SXKM5tNRplgW8TNprMDuntdvV9wNkFs
9TyM02V5aWxFfI42+aivc4KEw69SE9KXwC7FSf5wXzuTot97N9Phj/Z3+jx443jo2NR34XgF
89cct7wJMjOF7bBefo0fPPZQuIma0Zym71cP61OP/i11ahNye6HGKfxGCOcs5wW9kRQEk8P9
M/k2wt3mt/fCQnuP/mWutNPt95w9wSsUyATLmtNrwccz63XOwU0EVcufkQEQAOfX3n0g0fZz
Bgm/S2zF/kxQKCEKP8ID+Vz8sy2GpDvveBq4H2Y34XWsT1zLJdvqPI4af4ZSMxuerWjXbVWb
T6d4odQIG0fKx4F8NccDqbgHeZRNajXeeJ3R7gAzvWvQNLz4piHrO/B4tf8svmRBL0ZB5P5A
2uhdwLU3NZuK22zpNn4is87BPWF8HhY0L5fafgDMOqnf4guJVJPYNPhUFzXUbPqOKOkL8ojk
CXxkOFHAbjstSK5Ca3fKquY3rdX3DNo+EL7FvAiw1mUtS+5GeYE+RMnDCsVFm/C7kY8c2d0G
NWkB9pJM5+mnIoFNxy7YBcldYATVeOHoY4LyaUWNnAvFYWp08dHWfZo9WCiJMuTfgtH9tc75
7QanMVdPt6fDK8UUXIBLQ2TWr/sQKE9xtFuEmoQGlE1l6bGaDnnMLcYu+Asp3kDT0w4zYGsx
5r6XQVRH4+5N6eHZiaeYtFOujp5n+pjBaQK7wUUjDilPQ5QMzIuCL4YjVoylWiBNknvQWBXS
lQCWmavOT9sttGQXdPCC5ynI+1ymZC1ORZKANLnRAb0NH/UCzcsstw2TAkFnMEbo9Zu9w7Kv
AxBQXWeXhJI9XQssfrf4Gusdqx8nPEpfOqCtbbwJMATbHyqLt7/oz/5deGuwxgb65pWIzufa
N7eop7uh+6bezi+rugUI+w6DABEBAAHCwXwEGAEIACYCGwwWIQQb2cqtc1xMOkYN/MpN3hD3
AP+DWgUCXw7HsgUJEqkpoQAKCRBN3hD3AP+DWrrpD/4qS3dyVRxDcDHIlmguXjC1Q5tZTwNB
boaBTPHSy/Nksu0eY7x6HfQJ3xajVH32Ms6t1trDQmPx2iP5+7iDsb7OKAb5eOS8h+BEBDeq
3ecsQDv0fFJOA9ag5O3LLNk+3x3q7e0uo06XMaY7UHS341ozXUUI7wC7iKfoUTv03iO9El5f
XpNMx/YrIMduZ2+nd9Di7o5+KIwlb2mAB9sTNHdMrXesX8eBL6T9b+MZJk+mZuPxKNVfEQMQ
a5SxUEADIPQTPNvBewdeI80yeOCrN+Zzwy/Mrx9EPeu59Y5vSJOx/z6OUImD/GhX7Xvkt3kq
Er5KTrJz3++B6SH9pum9PuoE/k+nntJkNMmQpR4MCBaV/J9gIOPGodDKnjdng+mXliF3Ptu6
3oxc2RCyGzTlxyMwuc2U5Q7KtUNTdDe8T0uE+9b8BLMVQDDfJjqY0VVqSUwImzTDLX9S4g/8
kC4HRcclk8hpyhY2jKGluZO0awwTIMgVEzmTyBphDg/Gx7dZU1Xf8HFuE+UZ5UDHDTnwgv7E
th6RC9+WrhDNspZ9fJjKWRbveQgUFCpe1sa77LAw+XFrKmBHXp9ZVIe90RMe2tRL06BGiRZr
jPrnvUsUUsjRoRNJjKKA/REq+sAnhkNPPZ/NNMjaZ5b8Tovi8C0tmxiCHaQYqj7G2rgnT0kt
WNyWQQ==
Organization: Red Hat
In-Reply-To: <957DB2F9-9C7E-486E-95EA-1E6574F82D4B@xxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 04.06.25 15:26, Zi Yan wrote:
On 4 Jun 2025, at 0:36, Anshuman Khandual wrote:
On 6/3/25 21:18, Zi Yan wrote:
The config is in fact an additional upper limit of pageblock_order, so
rename it to avoid confusion.
Agreed. This new config has been similar to existing 'pageblock_order'
that might cause confusion. Hence renaming makes sense. But instead of
PAGE_BLOCK_ORDER_CEIL should it be rather PAGE_BLOCK_ORDER_MAX ?
Or PAGE_BLOCK_MAX_ORDER?
Would also work for me.
Fixes: e13e7922d034 ("mm: add CONFIG_PAGE_BLOCK_ORDER to select page block order")
Does it really need a "Fixes: " tag given there is no problem to fix ?
I have no strong opinion on this one.
Probably we want this to go into this release. No need for a Fixes: I
assume.
--
Cheers,
David / dhildenb
Return-Path: <linux-kernel+bounces-673274-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 2D5AF41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:35:33 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id E97E73A3E92
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:35:10 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 1779E28FFC8;
Wed, 4 Jun 2025 13:35:24 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=hugovil.com header.i=@hugovil.com header.b="eLWlDfJQ"
Received: from mail.hugovil.com (mail.hugovil.com [162.243.120.170])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 57B8428E610;
Wed, 4 Jun 2025 13:35:21 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=162.243.120.170
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749044123; cv=none; b=kEtUzDveVhZ9tEX6iZ/kSqhO/Je2ZgByzUkjAb/85V88infPDwp4qsZX5MjzOWvw2ocWGFRXhli+97QIo02PqIAxWp7/YL2f4+Qi4FZDbVd2xii4OTJyQNgTXJ2cLusovrFoLcs/cP6gdfkF7RaLUe0nELuFU1ievRrc70L/xTw=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749044123; c=relaxed/simple;
bh=lqoqekYqYBMKoaQl1evFyliMjeEghiBKYbyQGT2pnAE=;
h=Date:From:To:Cc:Message-Id:In-Reply-To:References:Mime-Version:
Content-Type:Subject; b=meaLWFVYTpUhK/fW4BxNp6TuohmJ9pJOHodMRC524tBCLCzs4eDLYVjTfiYTuAPqXLQ+NgU9OA6gICrtaoeZuH7LIC3pqVwlTKmuY3lMKrFKiYKeYR7UMsg4FV/PsZuoIWqY8ZVmVLtWDHdiW3whvyqLmz4SiCQH6mYQhhzO2m0=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=hugovil.com; spf=pass smtp.mailfrom=hugovil.com; dkim=pass (1024-bit key) header.d=hugovil.com header.i=@hugovil.com header.b=eLWlDfJQ; arc=none smtp.client-ip=162.243.120.170
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=hugovil.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=hugovil.com
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=hugovil.com
; s=x; h=Subject:Content-Transfer-Encoding:Mime-Version:Message-Id:Cc:To:From
:Date:subject:date:message-id:reply-to;
bh=qUgjIUg3OYNq8RxSCl1UReiFAjKLHwJm1rAUVLNm4B0=; b=eLWlDfJQoiAq47mflWnIDCuL/b
yhAjKaYV774DTZDy2ZsGPVkBnHNCUDiwDIxJco8gZfIVzl+Rc78SnISPl10j/gfuBmGCGyhnjt6SW
t5zm7eCc7BjiC3gh8P+TBZyW25VY8Wc1Kahtvt32pGWQQ90gidVjHQ1SjwyeW3JzPjIM=;
Received: from modemcable061.19-161-184.mc.videotron.ca ([184.161.19.61]:49074 helo=pettiford.lan)
by mail.hugovil.com with esmtpa (Exim 4.92)
(envelope-from <hugo@xxxxxxxxxxx>)
id 1uMoGh-0002Bl-5U; Wed, 04 Jun 2025 09:34:59 -0400
Date: Wed, 4 Jun 2025 09:34:58 -0400
From: Hugo Villeneuve <hugo@xxxxxxxxxxx>
To: Chris Brandt <Chris.Brandt@xxxxxxxxxxx>
Cc: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>,
"maarten.lankhorst@xxxxxxxxxxxxxxx" <maarten.lankhorst@xxxxxxxxxxxxxxx>,
"mripard@xxxxxxxxxx" <mripard@xxxxxxxxxx>, "tzimmermann@xxxxxxx"
<tzimmermann@xxxxxxx>, "airlied@xxxxxxxxx" <airlied@xxxxxxxxx>,
"simona@xxxxxxxx" <simona@xxxxxxxx>, "dri-devel@xxxxxxxxxxxxxxxxxxxxx"
<dri-devel@xxxxxxxxxxxxxxxxxxxxx>, "linux-renesas-soc@xxxxxxxxxxxxxxx"
<linux-renesas-soc@xxxxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx"
<linux-kernel@xxxxxxxxxxxxxxx>, Hugo Villeneuve <hvilleneuve@xxxxxxxxxxxx>
Message-Id: <20250604093458.65c3999662a9fbc4d7cf22e5@xxxxxxxxxxx>
In-Reply-To: <OS3PR01MB831999C4A5A32FE11CC04A078A6CA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20250522143911.138077-1-hugo@xxxxxxxxxxx>
<20250522143911.138077-3-hugo@xxxxxxxxxxx>
<OS3PR01MB831999C4A5A32FE11CC04A078A6CA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-SA-Exim-Connect-IP: 184.161.19.61
X-SA-Exim-Mail-From: hugo@xxxxxxxxxxx
X-Spam-Level:
Subject: Re: [PATCH v3 2/2] drm: renesas: rz-du: Set DCS maximum return
packet size
X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000)
X-SA-Exim-Scanned: Yes (on mail.hugovil.com)
X-Spam-Status: No, score=-6.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
NICE_REPLY_A,RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS,URIBL_CSS
autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, 4 Jun 2025 11:54:28 +0000
Chris Brandt <Chris.Brandt@xxxxxxxxxxx> wrote:
Hi Chris,
Hi Hugo,
I'm fine with the code, but maybe it should go in a different location.
Since it's a register setup, it should probably go in rzg2l_mipi_dsi_startup() with the others.
It makes sense, I will move it there.
Additionally, since it is required to make rzg2l_mipi_dsi_host_transfer() operate properly, my suggestion
is to add this to your previous patch instead of making it separate.
Otherwise, it's like you are submitting one patch with a known bug, then immediately fixing it with a second patch.
I made it a separate patch to clearly show why this is needed,
because it took me a lot of time to figure this out, and I didn't want
that knowledge to be lost :)
Also, by default, most panels are configured to send a maximum of 1
byte, so it is not absolutely required by default and not really a bug.
But sure I can merge it, anyway my comment will clearly indicate why it
is needed.
This also would prevent the merge conflict with my patch that also modifies rzg2l_mipi_dsi_atomic_enable().
Ok.
Hugo.
Chris
-----Original Message-----
From: Hugo Villeneuve <hugo@xxxxxxxxxxx>
Sent: Thursday, May 22, 2025 10:39 AM
To: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>; maarten.lankhorst@xxxxxxxxxxxxxxx; mripard@xxxxxxxxxx; tzimmermann@xxxxxxx; airlied@xxxxxxxxx; simona@xxxxxxxx
Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx; linux-renesas-soc@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; hugo@xxxxxxxxxxx; Hugo Villeneuve <hvilleneuve@xxxxxxxxxxxx>; Chris Brandt <Chris.Brandt@xxxxxxxxxxx>
Subject: [PATCH v3 2/2] drm: renesas: rz-du: Set DCS maximum return packet size
From: Hugo Villeneuve <hvilleneuve@xxxxxxxxxxxx>
The default value of 1 will result in long read commands payload not being saved to memory.
Fix by setting this value to the DMA buffer size.
Cc: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
Cc: Chris Brandt <chris.brandt@xxxxxxxxxxx>
Signed-off-by: Hugo Villeneuve <hvilleneuve@xxxxxxxxxxxx>
---
drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c | 10 ++++++++++
drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi_regs.h | 4 ++++
2 files changed, 14 insertions(+)
diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
index a048d473db00b..745aae63af9d8 100644
--- a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
+++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
@@ -549,6 +549,7 @@ static void rzg2l_mipi_dsi_atomic_enable(struct drm_bridge *bridge,
const struct drm_display_mode *mode;
struct drm_connector *connector;
struct drm_crtc *crtc;
+ u32 value;
int ret;
connector = drm_atomic_get_new_connector_for_encoder(state, bridge->encoder); @@ -561,6 +562,15 @@ static void rzg2l_mipi_dsi_atomic_enable(struct drm_bridge *bridge,
rzg2l_mipi_dsi_set_display_timing(dsi, mode);
+ /*
+ * The default value of 1 will result in long read commands payload
+ * not being saved to memory. Set to the DMA buffer size.
+ */
+ value = rzg2l_mipi_dsi_link_read(dsi, DSISETR);
+ value &= ~DSISETR_MRPSZ;
+ value |= FIELD_PREP(DSISETR_MRPSZ, RZG2L_DCS_BUF_SIZE);
+ rzg2l_mipi_dsi_link_write(dsi, DSISETR, value);
+
ret = rzg2l_mipi_dsi_start_hs_clock(dsi);
if (ret < 0)
goto err_stop;
diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi_regs.h b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi_regs.h
index 0e432b04188d0..26d8a37ee6351 100644
--- a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi_regs.h
+++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi_regs.h
@@ -81,6 +81,10 @@
#define RSTSR_SWRSTLP (1 << 1)
#define RSTSR_SWRSTHS (1 << 0)
+/* DSI Set Register */
+#define DSISETR 0x120
+#define DSISETR_MRPSZ GENMASK(15, 0)
+
/* Rx Result Save Slot 0 Register */
#define RXRSS0R 0x240
#define RXRSS0R_RXPKTDFAIL BIT(28)
--
2.39.5
--
Hugo Villeneuve
Return-Path: <linux-kernel+bounces-673275-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 82DEF41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:35:45 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id D4B143A35D0
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:35:23 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 13AB828FA83;
Wed, 4 Jun 2025 13:35:27 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=analog.com header.i=@analog.com header.b="o6K88jz4"
Received: from mx0b-00128a01.pphosted.com (mx0a-00128a01.pphosted.com [148.163.135.77])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id B477E28FFCF;
Wed, 4 Jun 2025 13:35:24 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.135.77
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749044126; cv=none; b=eozT2KAK3SbZ3B3qQm3ch7N5wg0osErmd+5ENKOEX2GrdO2oBQG+o+8qe5sJ3HKQpFTGPTKU60ko/w2WXOYPZlZUJqUjrx4y6o8bAuOVaZL/oGYm3L/NGodJDdbTPf0TE+mQm4SPVeZnt2R7+aO9aRKiDSB1bGPb9Nd4SzsonI4=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749044126; c=relaxed/simple;
bh=14MHCMGXqZ8hnz03i1k+6ru6zfgFHOhykC24DOBJxe0=;
h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=qUZ1dk1bjaupRsCD3IlBRD9f9StOVAKz4keF0Y7KSSJVg3qAgcsbGVUWPAe43CtpIK8029smjJI/DUQ0ikw0mH0IfOTcC6jTgtXq1C/tefdoMDCbtfs0HX8QXJ9dmvGw4eUHq8uHK0NUkSIIqVfwzYFg4POCO3lCCvbv5caIPCA=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=analog.com; spf=pass smtp.mailfrom=analog.com; dkim=pass (2048-bit key) header.d=analog.com header.i=@analog.com header.b=o6K88jz4; arc=none smtp.client-ip=148.163.135.77
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=analog.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=analog.com
Received: from pps.filterd (m0375855.ppops.net [127.0.0.1])
by mx0b-00128a01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 554CLYGr030463;
Wed, 4 Jun 2025 09:34:55 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=analog.com; h=
content-transfer-encoding:content-type:date:from:message-id
:mime-version:subject:to; s=DKIM; bh=7tdEpcJIeWUDnxggD3CiG4OsmtH
omjx/fKgwxqifSJI=; b=o6K88jz4ki7z5zz3mVT0meBcDi4U31ISVhWfRTPq+Ib
wQ9uDdWD1ALbLKy8+9wxj95EBf4zobn+YELzJTx3Y0zh0C7oZ4jUS3MIsfK4j7of
2qYx21oEzcAzf0wMs/ptdjIkTz6RCqS2M6J5gJ92ssT6buD8Haf5Xp0zzHTX57mX
Efhcb6Sftv3B/1lZKvel/Deo0xHbP/7kqmT3V0AGPqf5qKYouHFaTl7YK67r7PvW
jsneHXkRo2QX6m/cmG54mN6fPz9Bz+yQ+IJ8CKEwHGZyegX7NAeru6D4kQYSiLMf
7QJnIWZQowJbxYZice3PsKKry0gNvPZGHzIG24GgmLw==
Received: from nwd2mta4.analog.com ([137.71.173.58])
by mx0b-00128a01.pphosted.com (PPS) with ESMTPS id 472p2vgche-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 09:34:55 -0400 (EDT)
Received: from ASHBMBX8.ad.analog.com (ASHBMBX8.ad.analog.com [10.64.17.5])
by nwd2mta4.analog.com (8.14.7/8.14.7) with ESMTP id 554DYrkF030245
(version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL);
Wed, 4 Jun 2025 09:34:53 -0400
Received: from ASHBCASHYB5.ad.analog.com (10.64.17.133) by
ASHBMBX8.ad.analog.com (10.64.17.5) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.2.1748.10; Wed, 4 Jun 2025 09:34:53 -0400
Received: from ASHBMBX8.ad.analog.com (10.64.17.5) by
ASHBCASHYB5.ad.analog.com (10.64.17.133) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.2.1748.10; Wed, 4 Jun 2025 09:34:53 -0400
Received: from zeus.spd.analog.com (10.66.68.11) by ashbmbx8.ad.analog.com
(10.64.17.5) with Microsoft SMTP Server id 15.2.1748.10 via Frontend
Transport; Wed, 4 Jun 2025 09:34:53 -0400
Received: from romlx5.adlk.analog.com ([10.48.65.73])
by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 554DYVPW029277;
Wed, 4 Jun 2025 09:34:33 -0400
From: Pop Ioan Daniel <pop.ioan-daniel@xxxxxxxxxx>
To: Lars-Peter Clausen <lars@xxxxxxxxxx>,
Michael Hennerich
<Michael.Hennerich@xxxxxxxxxx>,
Jonathan Cameron <jic23@xxxxxxxxxx>,
"David
Lechner" <dlechner@xxxxxxxxxxxx>,
=?UTF-8?q?Nuno=20S=C3=A1?=
<nuno.sa@xxxxxxxxxx>,
Andy Shevchenko <andy@xxxxxxxxxx>, Rob Herring
<robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Conor Dooley
<conor+dt@xxxxxxxxxx>,
Sergiu Cuciurean <sergiu.cuciurean@xxxxxxxxxx>,
"Dragos Bogdan" <dragos.bogdan@xxxxxxxxxx>,
Antoniu Miclaus
<antoniu.miclaus@xxxxxxxxxx>,
Olivier Moysan <olivier.moysan@xxxxxxxxxxx>,
Javier Carrasco <javier.carrasco.cruz@xxxxxxxxx>,
Matti Vaittinen
<mazziesaccount@xxxxxxxxx>,
Tobias Sperling <tobias.sperling@xxxxxxxxxxx>,
Alisa-Dariana Roman <alisadariana@xxxxxxxxx>,
Marcelo Schmitt
<marcelo.schmitt@xxxxxxxxxx>,
Herve Codina <herve.codina@xxxxxxxxxxx>,
"Ioan
Daniel" <pop.ioan-daniel@xxxxxxxxxx>,
<linux-iio@xxxxxxxxxxxxxxx>, <devicetree@xxxxxxxxxxxxxxx>,
<linux-kernel@xxxxxxxxxxxxxxx>
Subject: [PATCH v6 0/5] Add support for AD7405/ADUM770x
Date: Wed, 4 Jun 2025 16:34:02 +0300
Message-ID: <20250604133413.1528693-1-pop.ioan-daniel@xxxxxxxxxx>
X-Mailer: git-send-email 2.34.1
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
X-ADIRuleOP-NewSCL: Rule Triggered
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDEwMyBTYWx0ZWRfXxUPZCZYYCbU1
Wy4Ok/VTIOTaCvdLp/R1KfkVV3HdbAiv3P91cbSdj20bHr77EYRmLmtjgGlyCm9TQqW+t5eQGOX
wFS1cvTQr1Xdj2bQH9ynee0b/sv1oYQeIBO68VXDgto3wfbjqYdrpzRDn4pMPMbT62qoYyQb2GM
E1MWrcPP7KUdKMs0cYzIBe7i2ckR2lZIgqPb4NSlAmbUCZJb3S7JCnhePBlJf7etRrXrC6F8ufv
kTLhNNPKb94YWCaOWuwd+cPbRQcO2FZ5w3R5gaCza/X0jA2LsZ9jrrxDm2wdRHMf68f16IhcytL
AgCsYqABEijDeCA0ChWDPLIXTt0vm59W/988/ec4RcA76VWs6KswF/wCRuyWGP3u3rbTBE16Id0
0aYsDVKxM140wK6du3sdyapDcZJNazhtrAr0JuDoV7CHNa53QAWSDpDw6yBgegrvVNwKmR5i
X-Proofpoint-GUID: mtYDiuuKQia1eeZWB03BrqHcstCNYyhC
X-Proofpoint-ORIG-GUID: mtYDiuuKQia1eeZWB03BrqHcstCNYyhC
X-Authority-Analysis: v=2.4 cv=CdgI5Krl c=1 sm=1 tr=0 ts=68404b7f cx=c_pps
a=3WNzaoukacrqR9RwcOSAdA==:117 a=3WNzaoukacrqR9RwcOSAdA==:17
a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10 a=gkbNl49xHU_gtnum-JMA:9
a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
priorityscore=1501 bulkscore=0 lowpriorityscore=0 impostorscore=0
clxscore=1015 mlxscore=0 adultscore=0 phishscore=0 mlxlogscore=862
spamscore=0 suspectscore=0 malwarescore=0 classifier=spam authscore=0
authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1
engine=8.19.0-2505280000 definitions=main-2506040103
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
The AD7405 is a high performance, second-order, Σ-Δ modulator
that converts an analog input signal into a high speed, single-bit
LVDS data stream, with on-chip digital isolation based on Analog
Devices, Inc., iCoupler technology. The AD7405 operates from a
4.5 V to 5.5 V (VDD1) power supply and accepts a differential input
signal of ±250 mV (±320 mV full-scale). The differential input is ideally
suited to shunt voltage monitoring in high voltage applications
where galvanic isolation is required.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Pop Ioan Daniel (5):
iio: adc: ad4851: ad4851_set_oversampling_ratio parameters update
iio: backend: update iio_backend_oversampling_ratio_set
iio: adc: adi-axi-adc: add axi_adc_oversampling_ratio_set
dt-bindings: iio: adc: add ad7405
iio: adc: ad7405: add ad7405 driver
.../bindings/iio/adc/adi,ad7405.yaml | 60 ++++
drivers/iio/adc/Kconfig | 10 +
drivers/iio/adc/Makefile | 1 +
drivers/iio/adc/ad4851.c | 6 +-
drivers/iio/adc/ad7405.c | 262 ++++++++++++++++++
drivers/iio/adc/adi-axi-adc.c | 20 +-
drivers/iio/industrialio-backend.c | 3 +-
include/linux/iio/backend.h | 3 +-
8 files changed, 359 insertions(+), 6 deletions(-)
create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad7405.yaml
create mode 100644 drivers/iio/adc/ad7405.c
--
2.34.1
Return-Path: <linux-kernel+bounces-673278-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 5A1D741E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:36:20 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 7A1063A33A0
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:35:58 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 2A23628FFEF;
Wed, 4 Jun 2025 13:36:05 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=analog.com header.i=@analog.com header.b="yIHik8Pg"
Received: from mx0a-00128a01.pphosted.com (mx0a-00128a01.pphosted.com [148.163.135.77])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id CC14B28E610;
Wed, 4 Jun 2025 13:36:02 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.135.77
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749044164; cv=none; b=Ip+hzlqhdnNPfZ04riZFIhHnelAWHial8iOtx8gEq6TJ91s3GMr1qVloNr0Qp+iuJ9zj+k32txXfrJLo5Hxvp6gW2Us5vCF5hbsXhwAsLmtU7yzD95UuHtDFnoYJF8yWYBdKF3EKUmpNb/JQvoRieI6TrOWd59RfepVR2sIwDLA=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749044164; c=relaxed/simple;
bh=qyyWAcb4tyvZwqvXmqUt1NsxFCrKyOmrUp190XU3Fqk=;
h=From:To:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version:Content-Type; b=tATkRaTudpW2OuGivB1mdFrOSQC0b6NIl6bol9Dt1dVaGe4TYGy41OIm4aW2Q8c0pH6Ic93jzrkj/8I2fg5Q19Yfo37608iF5/usvr+pkdUgHjF9clzvXVQ0tqLLK6i+4tzS07FB6w6FP2FfbfUpWzlXHPFGNt+fFU2gaq/u25g=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=analog.com; spf=pass smtp.mailfrom=analog.com; dkim=pass (2048-bit key) header.d=analog.com header.i=@analog.com header.b=yIHik8Pg; arc=none smtp.client-ip=148.163.135.77
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=analog.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=analog.com
Received: from pps.filterd (m0167089.ppops.net [127.0.0.1])
by mx0a-00128a01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 554BhisB028811;
Wed, 4 Jun 2025 09:35:40 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=analog.com; h=
content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=DKIM; bh=6+4OQ
Vr59kJNDqEMSIRD5EZr7b4y3gwa4a34o3K29e0=; b=yIHik8PgIy+YYZ2Se8XtK
gsjadqrMiyKuhgz82Suc6KDcIDWibn5ddsq7w5vjexqLDIex3ol5OfLW2wAnf1Do
kEZE3wUyBauxa8bMIbhIcJzf1m2bhvhwlYFaMcIvwviL9zmN5I2LHFezyx+csyAv
xuQRxFa4p4/Y9mCQI+VB0ngnQkFT7AlslLzffaLo0bn9efMhCOQbImuaYQ5JK5h6
0NovNVcFjt61VgHMisZrR+3GRUiiUTaveYFD/cdEzRjXHmu6ynJw+TcAG7IEeIOk
rFqk8jfGdiQUOAj8emNULns/PdFhDBcTp5NPguW8bW4qXTNZRlo8iIwPufJeGgh4
w==
Received: from nwd2mta3.analog.com ([137.71.173.56])
by mx0a-00128a01.pphosted.com (PPS) with ESMTPS id 471g9j2jjh-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 09:35:39 -0400 (EDT)
Received: from ASHBMBX8.ad.analog.com (ASHBMBX8.ad.analog.com [10.64.17.5])
by nwd2mta3.analog.com (8.14.7/8.14.7) with ESMTP id 554DZO3v007772
(version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL);
Wed, 4 Jun 2025 09:35:24 -0400
Received: from ASHBMBX8.ad.analog.com (10.64.17.5) by ASHBMBX8.ad.analog.com
(10.64.17.5) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.10; Wed, 4 Jun
2025 09:35:24 -0400
Received: from zeus.spd.analog.com (10.66.68.11) by ashbmbx8.ad.analog.com
(10.64.17.5) with Microsoft SMTP Server id 15.2.1748.10 via Frontend
Transport; Wed, 4 Jun 2025 09:35:24 -0400
Received: from romlx5.adlk.analog.com ([10.48.65.73])
by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 554DYVPZ029277;
Wed, 4 Jun 2025 09:35:14 -0400
From: Pop Ioan Daniel <pop.ioan-daniel@xxxxxxxxxx>
To: Lars-Peter Clausen <lars@xxxxxxxxxx>,
Michael Hennerich
<Michael.Hennerich@xxxxxxxxxx>,
Jonathan Cameron <jic23@xxxxxxxxxx>,
David
Lechner <dlechner@xxxxxxxxxxxx>,
=?UTF-8?q?Nuno=20S=C3=A1?=
<nuno.sa@xxxxxxxxxx>,
Andy Shevchenko <andy@xxxxxxxxxx>, Rob Herring
<robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Conor Dooley
<conor+dt@xxxxxxxxxx>,
Sergiu Cuciurean <sergiu.cuciurean@xxxxxxxxxx>,
Dragos
Bogdan <dragos.bogdan@xxxxxxxxxx>,
Antoniu Miclaus
<antoniu.miclaus@xxxxxxxxxx>,
Olivier Moysan <olivier.moysan@xxxxxxxxxxx>,
Javier Carrasco <javier.carrasco.cruz@xxxxxxxxx>,
Matti Vaittinen
<mazziesaccount@xxxxxxxxx>,
Tobias Sperling <tobias.sperling@xxxxxxxxxxx>,
Alisa-Dariana Roman <alisadariana@xxxxxxxxx>,
Marcelo Schmitt
<marcelo.schmitt@xxxxxxxxxx>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@xxxxxxxxxxxxx>,
Ioan Daniel
<pop.ioan-daniel@xxxxxxxxxx>, <linux-iio@xxxxxxxxxxxxxxx>,
<devicetree@xxxxxxxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>
Subject: [PATCH v6 3/5] iio: adc: adi-axi-adc: add axi_adc_oversampling_ratio_set
Date: Wed, 4 Jun 2025 16:34:05 +0300
Message-ID: <20250604133413.1528693-4-pop.ioan-daniel@xxxxxxxxxx>
X-Mailer: git-send-email 2.34.1
In-Reply-To: <20250604133413.1528693-1-pop.ioan-daniel@xxxxxxxxxx>
References: <20250604133413.1528693-1-pop.ioan-daniel@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
X-ADIRuleOP-NewSCL: Rule Triggered
X-Proofpoint-GUID: O5bmGVb8aBf7H_K9Vumlxzj83eh3gDm-
X-Authority-Analysis: v=2.4 cv=DfIXqutW c=1 sm=1 tr=0 ts=68404bac cx=c_pps
a=PpDZqlmH/M8setHirZLBMw==:117 a=PpDZqlmH/M8setHirZLBMw==:17
a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10 a=IpJZQVW2AAAA:8 a=gAnH3GRIAAAA:8
a=hj20C08OGkFrgq5-ZMUA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10
a=IawgGOuG5U0WyFbmm1f5:22
X-Proofpoint-ORIG-GUID: O5bmGVb8aBf7H_K9Vumlxzj83eh3gDm-
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDEwNCBTYWx0ZWRfX2QKkoioE4HMf
86tskbH3Fkry2CQxV2bdsasqOFCtwXvBpXNfmpuXUnS6GcrDz8yInqNSIQ0TRyLevSlCUbgPd51
6fQwot0mSSVqAb+pc/qzdM1Dy2ZP92wd3T/yg/eBpR6N6OgYy/a6ngIJTnhPh11PERmKYygmN2R
1gym7jHAGPp6uiFPkSawxR/u687Aym+xaWqt/Z2sOKJhA1svbFet2liUhyIHsdviNnZyivES70G
2Xsl/cvZRytjnVRevr8ii5bbz/aF5vGX/beAEpLVtbDJWbFVTMciwuuLhOorc2VYX9av8RaLlpm
bEL32+B/ttLarNAwnvrziJDSiihE8IkPyUskIUZ8APJCAHU0vDqPs0smsryLGVhtriuDlKIXg3w
RWcVsLqn4abW6ldLrXGnkFGFaXZCm8YSPn3D2KySoPY+g1dIdRvgckVcI75L7zTXfhBEZ3hP
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
mlxscore=0 malwarescore=0 clxscore=1015 priorityscore=1501 suspectscore=0
adultscore=0 mlxlogscore=999 spamscore=0 impostorscore=0 phishscore=0
lowpriorityscore=0 bulkscore=0 classifier=spam authscore=0 authtc=n/a authcc=
route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000
definitions=main-2506040104
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Add support for setting decimation rate.
Reviewed-by: David Lechner <dlechner@xxxxxxxxxxxx>
Reviewed-by: Nuno Sá <nuno.sa@xxxxxxxxxx>
Signed-off-by: Pop Ioan Daniel <pop.ioan-daniel@xxxxxxxxxx>
---
drivers/iio/adc/adi-axi-adc.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/drivers/iio/adc/adi-axi-adc.c b/drivers/iio/adc/adi-axi-adc.c
index 9e8c30230791..0b8673668745 100644
--- a/drivers/iio/adc/adi-axi-adc.c
+++ b/drivers/iio/adc/adi-axi-adc.c
@@ -80,6 +80,9 @@
#define ADI_AXI_ADC_REG_CHAN_CTRL_3(c) (0x0418 + (c) * 0x40)
#define ADI_AXI_ADC_CHAN_PN_SEL_MASK GENMASK(19, 16)
+#define ADI_AXI_ADC_REG_CHAN_USR_CTRL_2(c) (0x0424 + (c) * 0x40)
+#define ADI_AXI_ADC_CHAN_USR_CTRL_2_DEC_RATE_N_MASK GENMASK(15, 0)
+
/* IO Delays */
#define ADI_AXI_ADC_REG_DELAY(l) (0x0800 + (l) * 0x4)
#define AXI_ADC_DELAY_CTRL_MASK GENMASK(4, 0)
@@ -242,6 +245,19 @@ static int axi_adc_test_pattern_set(struct iio_backend *back,
}
}
+static int axi_adc_oversampling_ratio_set(struct iio_backend *back,
+ unsigned int chan,
+ unsigned int rate)
+{
+ struct adi_axi_adc_state *st = iio_backend_get_priv(back);
+
+ return regmap_update_bits(st->regmap,
+ ADI_AXI_ADC_REG_CHAN_USR_CTRL_2(chan),
+ ADI_AXI_ADC_CHAN_USR_CTRL_2_DEC_RATE_N_MASK,
+ FIELD_PREP(ADI_AXI_ADC_CHAN_USR_CTRL_2_DEC_RATE_N_MASK,
+ rate));
+}
+
static int axi_adc_read_chan_status(struct adi_axi_adc_state *st, unsigned int chan,
unsigned int *status)
{
@@ -550,6 +566,7 @@ static const struct iio_backend_ops adi_axi_adc_ops = {
.test_pattern_set = axi_adc_test_pattern_set,
.chan_status = axi_adc_chan_status,
.interface_type_get = axi_adc_interface_type_get,
+ .oversampling_ratio_set = axi_adc_oversampling_ratio_set,
.debugfs_reg_access = iio_backend_debugfs_ptr(axi_adc_reg_access),
.debugfs_print_chan_status = iio_backend_debugfs_ptr(axi_adc_debugfs_print_chan_status),
};
--
2.34.1
Return-Path: <linux-kernel+bounces-673276-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 677EC41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:36:25 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id E8FB21891373
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:36:13 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id C5D9A28FAB7;
Wed, 4 Jun 2025 13:35:37 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=analog.com header.i=@analog.com header.b="RaVGgLpg"
Received: from mx0a-00128a01.pphosted.com (mx0a-00128a01.pphosted.com [148.163.135.77])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5D33528FAB9;
Wed, 4 Jun 2025 13:35:34 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.135.77
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749044137; cv=none; b=axhNueGROUrXVbq/Z/90lgX4J7r8mtXGwQPi1fM7tCdVwxTA/e7YOgm6SnJ8uH/Kyrt/4D3a4eOhkaCdqJ4wC77ze1avTJAm/sK9Ff3e8NKNyqozOZ9ih6B3Hx4xU8V8K4dJ4dSa2HgtnO9ydjK1/uIePn9IqVp8D6BWV8Syrvc=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749044137; c=relaxed/simple;
bh=wun51i7URakc6i/FGsVgpXrptnLFIPS3LX1tgkKVSak=;
h=From:To:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version:Content-Type; b=IwGefGPmgS0Wwzk1A+2IbMEDjL37Ajy9qrt0GjAmyBcHkxPlAM80oMo1G6EIW5th3kGq6NI+1T+achtgVCixO8kfARjqYAbNybiQTwYUYqIBA6ckSlg2AxtBdGBHNP8RK271Jn7SEoICchvlEmZvFrj1be3AmIGe95VzPxFN204=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=analog.com; spf=pass smtp.mailfrom=analog.com; dkim=pass (2048-bit key) header.d=analog.com header.i=@analog.com header.b=RaVGgLpg; arc=none smtp.client-ip=148.163.135.77
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=analog.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=analog.com
Received: from pps.filterd (m0167089.ppops.net [127.0.0.1])
by mx0a-00128a01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 554Bhis8028811;
Wed, 4 Jun 2025 09:35:14 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=analog.com; h=
content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=DKIM; bh=TJl3c
o7VEXd+IIi0GWLaGm70QpRQustSdK4Y0fQhg7o=; b=RaVGgLpg/EWfKbO5J+c8S
EzOo5HknpAowUEaJy7jbq0ZbQpvarzaUtTToBGGEXhysp7zrcrXsGo6DkSrqcnVx
QPuM3PJUmZC90eC+3sIRyUsZ/TPCPFBzKnOV/COaTUbvFhEgvfuxCGgm8vn+6TTT
d8XUIANwE+ik5jxJW5sExrAKl1Iam0q/isdu7a1ZzcVEWAZcZG0R3PD97iEiW2T6
OdJJGxZT4MIeKELysTXsJRPmx/a+F7FG+pUTCMnV0v4jE+XjLQyNL2LwjRnjHdPk
Odvn3rS24y0iJTuq5JLnTG6sA+qHDgB0S3abxsip6QKjiAi8LrwqAKZ7hH/jeE3f
Q==
Received: from nwd2mta4.analog.com ([137.71.173.58])
by mx0a-00128a01.pphosted.com (PPS) with ESMTPS id 471g9j2jhr-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 09:35:14 -0400 (EDT)
Received: from ASHBMBX8.ad.analog.com (ASHBMBX8.ad.analog.com [10.64.17.5])
by nwd2mta4.analog.com (8.14.7/8.14.7) with ESMTP id 554DZDlC030286
(version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL);
Wed, 4 Jun 2025 09:35:13 -0400
Received: from ASHBCASHYB4.ad.analog.com (10.64.17.132) by
ASHBMBX8.ad.analog.com (10.64.17.5) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.2.1748.10; Wed, 4 Jun 2025 09:35:13 -0400
Received: from ASHBMBX8.ad.analog.com (10.64.17.5) by
ASHBCASHYB4.ad.analog.com (10.64.17.132) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.2.1748.10; Wed, 4 Jun 2025 09:35:12 -0400
Received: from zeus.spd.analog.com (10.66.68.11) by ashbmbx8.ad.analog.com
(10.64.17.5) with Microsoft SMTP Server id 15.2.1748.10 via Frontend
Transport; Wed, 4 Jun 2025 09:35:12 -0400
Received: from romlx5.adlk.analog.com ([10.48.65.73])
by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 554DYVPY029277;
Wed, 4 Jun 2025 09:35:05 -0400
From: Pop Ioan Daniel <pop.ioan-daniel@xxxxxxxxxx>
To: Lars-Peter Clausen <lars@xxxxxxxxxx>,
Michael Hennerich
<Michael.Hennerich@xxxxxxxxxx>,
Jonathan Cameron <jic23@xxxxxxxxxx>,
"David
Lechner" <dlechner@xxxxxxxxxxxx>,
=?UTF-8?q?Nuno=20S=C3=A1?=
<nuno.sa@xxxxxxxxxx>,
Andy Shevchenko <andy@xxxxxxxxxx>, Rob Herring
<robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Conor Dooley
<conor+dt@xxxxxxxxxx>,
Sergiu Cuciurean <sergiu.cuciurean@xxxxxxxxxx>,
"Dragos Bogdan" <dragos.bogdan@xxxxxxxxxx>,
Antoniu Miclaus
<antoniu.miclaus@xxxxxxxxxx>,
Olivier Moysan <olivier.moysan@xxxxxxxxxxx>,
Javier Carrasco <javier.carrasco.cruz@xxxxxxxxx>,
Matti Vaittinen
<mazziesaccount@xxxxxxxxx>,
Tobias Sperling <tobias.sperling@xxxxxxxxxxx>,
Alisa-Dariana Roman <alisadariana@xxxxxxxxx>,
Marcelo Schmitt
<marcelo.schmitt@xxxxxxxxxx>,
Ramona Alexandra Nechita
<ramona.nechita@xxxxxxxxxx>,
Esteban Blanc <eblanc@xxxxxxxxxxxx>,
Ioan Daniel
<pop.ioan-daniel@xxxxxxxxxx>, <linux-iio@xxxxxxxxxxxxxxx>,
<devicetree@xxxxxxxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>
Subject: [PATCH v6 2/5] iio: backend: update iio_backend_oversampling_ratio_set
Date: Wed, 4 Jun 2025 16:34:04 +0300
Message-ID: <20250604133413.1528693-3-pop.ioan-daniel@xxxxxxxxxx>
X-Mailer: git-send-email 2.34.1
In-Reply-To: <20250604133413.1528693-1-pop.ioan-daniel@xxxxxxxxxx>
References: <20250604133413.1528693-1-pop.ioan-daniel@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
X-ADIRuleOP-NewSCL: Rule Triggered
X-Proofpoint-GUID: 7HF6eiNmsz_1hOg5on5x_zHyWonL5tWw
X-Authority-Analysis: v=2.4 cv=DfIXqutW c=1 sm=1 tr=0 ts=68404b92 cx=c_pps
a=3WNzaoukacrqR9RwcOSAdA==:117 a=3WNzaoukacrqR9RwcOSAdA==:17
a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10 a=IpJZQVW2AAAA:8 a=gAnH3GRIAAAA:8
a=ZoRCdJloile0LmdOwKkA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10
a=IawgGOuG5U0WyFbmm1f5:22
X-Proofpoint-ORIG-GUID: 7HF6eiNmsz_1hOg5on5x_zHyWonL5tWw
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDEwMyBTYWx0ZWRfX4C5t5Z9frj6z
jjcsLjPmliMR5Jc/aoNW/t5/Hb0eYJHFXhVLe82+99Z3CABoO0eBCoizHENdZQrg7MxdcyFS8Xe
+qqDU5aZT45lvxaWnkD8k+d5+B/Tc48CP3bElVYgVO0ynOdA2PhpQPSNVi6+RN3R0UerTqVfAgs
wuhXV6Aucih6LOBdbiAyBHi2J6aDU+0RTlFs8CEBbzgW0VKBIETkcIAsy/XWe3slQk6xgwpGpR2
DbcSLc86SWMxBik1fQKRCnxrwpYuvCpzDhXhlvbv8zKX1zOhD5KKkbgGynH3PLqkoxJZigFF3JM
nE8gpJLo+TbnQVCx6DYmk9caeT7Ts9pnkePSUh9EPTPOa8kJ+Ly7eSEiDQx5SdurLHBiLey7eSR
F5apH/eFnFUTnhUssS9I7iWqLyG5vQ9nd8yg+5ksMVjLi8ZGV5Vf6wIhN3V0skk3Nf6oW3VB
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
mlxscore=0 malwarescore=0 clxscore=1015 priorityscore=1501 suspectscore=0
adultscore=0 mlxlogscore=999 spamscore=0 impostorscore=0 phishscore=0
lowpriorityscore=0 bulkscore=0 classifier=spam authscore=0 authtc=n/a authcc=
route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000
definitions=main-2506040103
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Add chan parameter to iio_backend_oversampling_ratio_set() to allow
for contexts where the channel must be specified. Modify all
existing users.
Reviewed-by: David Lechner <dlechner@xxxxxxxxxxxx>
Reviewed-by: Nuno Sá <nuno.sa@xxxxxxxxxx>
Signed-off-by: Pop Ioan Daniel <pop.ioan-daniel@xxxxxxxxxx>
---
changes in v6:
- add blank line
drivers/iio/adc/ad4851.c | 3 ++-
drivers/iio/adc/adi-axi-adc.c | 3 ++-
drivers/iio/industrialio-backend.c | 3 ++-
include/linux/iio/backend.h | 3 ++-
4 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/drivers/iio/adc/ad4851.c b/drivers/iio/adc/ad4851.c
index 12f90aa3a156..f395fa9f654a 100644
--- a/drivers/iio/adc/ad4851.c
+++ b/drivers/iio/adc/ad4851.c
@@ -320,7 +320,8 @@ static int ad4851_set_oversampling_ratio(struct iio_dev *indio_dev,
return ret;
}
- ret = iio_backend_oversampling_ratio_set(st->back, osr);
+ /* Channel is ignored by the backend being used here */
+ ret = iio_backend_oversampling_ratio_set(st->back, 0, osr);
if (ret)
return ret;
diff --git a/drivers/iio/adc/adi-axi-adc.c b/drivers/iio/adc/adi-axi-adc.c
index 4116c44197b8..9e8c30230791 100644
--- a/drivers/iio/adc/adi-axi-adc.c
+++ b/drivers/iio/adc/adi-axi-adc.c
@@ -381,7 +381,8 @@ static int axi_adc_ad485x_data_size_set(struct iio_backend *back,
}
static int axi_adc_ad485x_oversampling_ratio_set(struct iio_backend *back,
- unsigned int ratio)
+ unsigned int chan,
+ unsigned int ratio)
{
struct adi_axi_adc_state *st = iio_backend_get_priv(back);
diff --git a/drivers/iio/industrialio-backend.c b/drivers/iio/industrialio-backend.c
index c1eb9ef9db08..a4e3e54fecb1 100644
--- a/drivers/iio/industrialio-backend.c
+++ b/drivers/iio/industrialio-backend.c
@@ -720,9 +720,10 @@ EXPORT_SYMBOL_NS_GPL(iio_backend_data_size_set, "IIO_BACKEND");
* 0 on success, negative error number on failure.
*/
int iio_backend_oversampling_ratio_set(struct iio_backend *back,
+ unsigned int chan,
unsigned int ratio)
{
- return iio_backend_op_call(back, oversampling_ratio_set, ratio);
+ return iio_backend_op_call(back, oversampling_ratio_set, chan, ratio);
}
EXPORT_SYMBOL_NS_GPL(iio_backend_oversampling_ratio_set, "IIO_BACKEND");
diff --git a/include/linux/iio/backend.h b/include/linux/iio/backend.h
index e59d909cb659..dbf4e4a5f4b1 100644
--- a/include/linux/iio/backend.h
+++ b/include/linux/iio/backend.h
@@ -144,7 +144,7 @@ struct iio_backend_ops {
enum iio_backend_interface_type *type);
int (*data_size_set)(struct iio_backend *back, unsigned int size);
int (*oversampling_ratio_set)(struct iio_backend *back,
- unsigned int ratio);
+ unsigned int chan, unsigned int ratio);
int (*read_raw)(struct iio_backend *back,
struct iio_chan_spec const *chan, int *val, int *val2,
long mask);
@@ -209,6 +209,7 @@ int iio_backend_interface_type_get(struct iio_backend *back,
enum iio_backend_interface_type *type);
int iio_backend_data_size_set(struct iio_backend *back, unsigned int size);
int iio_backend_oversampling_ratio_set(struct iio_backend *back,
+ unsigned int chan,
unsigned int ratio);
int iio_backend_read_raw(struct iio_backend *back,
struct iio_chan_spec const *chan, int *val, int *val2,
--
2.34.1
Return-Path: <linux-kernel+bounces-673279-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 120AF41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:36:41 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 462661737C0
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:36:40 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id E68A82900A3;
Wed, 4 Jun 2025 13:36:07 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=analog.com header.i=@analog.com header.b="ELQv7+BH"
Received: from mx0a-00128a01.pphosted.com (mx0a-00128a01.pphosted.com [148.163.135.77])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id EF3EC28FFEC;
Wed, 4 Jun 2025 13:36:04 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.135.77
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749044166; cv=none; b=tEKC3uLimJwajSPfpLMkPGD9FLBrqkgZb1eSK9Punpq9SUXngOnbO+b4InGHdEsfFr26SqU3zLb5qWHCYSNTXCWKv5wo3MuyaNLl7Dve9911QWA9q9VZ2+YDANKSca7w0LD/DTgs/AGMHMLjhZzNAVLzf1oOdduRqV/5DwqdBac=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749044166; c=relaxed/simple;
bh=OgVkU6sSzNBDk3lwhBeaw+MxPdkdRVM+kQkCfGFbgx0=;
h=From:To:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version:Content-Type; b=VR7r3h8aHaJRSfjAxnzyxRQlunK9uOewOs6hat4VODe2T9FoEf5JylY18ynQNDrgf5H2sfcupq98rTFxM+s/0Fb/+JV/lwQ/Kd2AQ+CJ/A+64T+29PF7FCDujEoPloygSuBnUdn/kvutTt0W+rPIdq3ikb77GBzonV/riMF0PdM=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=analog.com; spf=pass smtp.mailfrom=analog.com; dkim=pass (2048-bit key) header.d=analog.com header.i=@analog.com header.b=ELQv7+BH; arc=none smtp.client-ip=148.163.135.77
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=analog.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=analog.com
Received: from pps.filterd (m0167088.ppops.net [127.0.0.1])
by mx0a-00128a01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 554D8QZn023939;
Wed, 4 Jun 2025 09:35:44 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=analog.com; h=
content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=DKIM; bh=6fTRK
BU2K1aSTaLrzJNCAaNdnsoME8k0fipl79wcyHc=; b=ELQv7+BHbCOM4KQmDL4++
+VP2Oib4m0LmCI86vdloF+TSfHowtpMwlYK6k26XxrRWNKIN7fVYl3xWcq/CivNJ
BgXk9zqnshoqkgUxsLfd594219uwgy1UPxLPEdks+uuT9IgqsZ0W1tUAj+QAzJrh
6D7JJ5QJ42/IhBeq9FGTOSyX80XvzGlPMNFJOQ56RfvmCFFAOJdMzf2aopccAFnV
QpHIX5UNr8erPjR40cYUvTxIH+KYYn+6L1uzTcXZ7734AArTUk4ZJgS7PZ3Y+Aca
ZhnMPSK3jJOgb46iw1FxA27QjjQxFg1xpNOf//eSa6K9aup7gkm/gQJ8wy9fKb+v
g==
Received: from nwd2mta4.analog.com ([137.71.173.58])
by mx0a-00128a01.pphosted.com (PPS) with ESMTPS id 472k2u18tp-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 09:35:43 -0400 (EDT)
Received: from ASHBMBX9.ad.analog.com (ASHBMBX9.ad.analog.com [10.64.17.10])
by nwd2mta4.analog.com (8.14.7/8.14.7) with ESMTP id 554DZg67030319
(version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL);
Wed, 4 Jun 2025 09:35:42 -0400
Received: from ASHBMBX8.ad.analog.com (10.64.17.5) by ASHBMBX9.ad.analog.com
(10.64.17.10) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.10; Wed, 4 Jun
2025 09:35:42 -0400
Received: from zeus.spd.analog.com (10.66.68.11) by ashbmbx8.ad.analog.com
(10.64.17.5) with Microsoft SMTP Server id 15.2.1748.10 via Frontend
Transport; Wed, 4 Jun 2025 09:35:42 -0400
Received: from romlx5.adlk.analog.com ([10.48.65.73])
by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 554DYVPb029277;
Wed, 4 Jun 2025 09:35:35 -0400
From: Pop Ioan Daniel <pop.ioan-daniel@xxxxxxxxxx>
To: Lars-Peter Clausen <lars@xxxxxxxxxx>,
Michael Hennerich
<Michael.Hennerich@xxxxxxxxxx>,
Jonathan Cameron <jic23@xxxxxxxxxx>,
David
Lechner <dlechner@xxxxxxxxxxxx>,
=?UTF-8?q?Nuno=20S=C3=A1?=
<nuno.sa@xxxxxxxxxx>,
Andy Shevchenko <andy@xxxxxxxxxx>, Rob Herring
<robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Conor Dooley
<conor+dt@xxxxxxxxxx>,
Sergiu Cuciurean <sergiu.cuciurean@xxxxxxxxxx>,
Dragos
Bogdan <dragos.bogdan@xxxxxxxxxx>,
Antoniu Miclaus
<antoniu.miclaus@xxxxxxxxxx>,
Olivier Moysan <olivier.moysan@xxxxxxxxxxx>,
Javier Carrasco <javier.carrasco.cruz@xxxxxxxxx>,
Matti Vaittinen
<mazziesaccount@xxxxxxxxx>,
Tobias Sperling <tobias.sperling@xxxxxxxxxxx>,
Alisa-Dariana Roman <alisadariana@xxxxxxxxx>,
Marcelo Schmitt
<marcelo.schmitt@xxxxxxxxxx>,
Esteban Blanc <eblanc@xxxxxxxxxxxx>,
Ioan
Daniel <pop.ioan-daniel@xxxxxxxxxx>, <linux-iio@xxxxxxxxxxxxxxx>,
<devicetree@xxxxxxxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>
Subject: [PATCH v6 5/5] iio: adc: ad7405: add ad7405 driver
Date: Wed, 4 Jun 2025 16:34:07 +0300
Message-ID: <20250604133413.1528693-6-pop.ioan-daniel@xxxxxxxxxx>
X-Mailer: git-send-email 2.34.1
In-Reply-To: <20250604133413.1528693-1-pop.ioan-daniel@xxxxxxxxxx>
References: <20250604133413.1528693-1-pop.ioan-daniel@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
X-ADIRuleOP-NewSCL: Rule Triggered
X-Proofpoint-GUID: CehAjf6nF489xnBLXbgtAaou1CrcQaiQ
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDEwNCBTYWx0ZWRfX1pm+6IhUknZP
YEGPWXt6aeTrhAqN5AgUzKezqzJLExH44Rt9BOuuhOTSotqa6AfluP3++oaJ6Zp2Irq86d4+98T
cV1OnuRHw7XtNrGnmV/pgwm0xsPna7MXe9l+POP+qIYEo7J5Wzl6QzE4BsAaqPEgpKw+2tgMb6P
5GDHEI1D6WEy9Wg4bWNSr3isgnwLtHQydrIxMFn0g/J77VB1z2/9Y55JYo0+FvbI/fKhn1hDqr1
5xg5y9DPfCBumGjbfoVvdNiTJRPaZ0p7HimrVFeNdv/mx+eZY5VAZnIMNz+pHK/YM9dbbGNROxN
XheCehgv2vvXmCi3S6hN99xhLECxJLlY5T4G6OjmLLL0w+jSx6718wSEJrCEEw2tECMWxbo7vOc
0F2PkSflmEgYvuVkJrfh2BXVD4M4Iz7PT8jnPNDKlglVj0ROqEvC7f3Zk/kj/72F47Fb0aqT
X-Proofpoint-ORIG-GUID: CehAjf6nF489xnBLXbgtAaou1CrcQaiQ
X-Authority-Analysis: v=2.4 cv=Fv4F/3rq c=1 sm=1 tr=0 ts=68404baf cx=c_pps
a=3WNzaoukacrqR9RwcOSAdA==:117 a=3WNzaoukacrqR9RwcOSAdA==:17
a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10 a=gAnH3GRIAAAA:8 a=xMrnY01I1BIIJWUPG5oA:9
a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
adultscore=0 impostorscore=0 suspectscore=0 mlxlogscore=999 spamscore=0
malwarescore=0 phishscore=0 clxscore=1015 lowpriorityscore=0
priorityscore=1501 bulkscore=0 mlxscore=0 classifier=spam authscore=0
authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1
engine=8.19.0-2505280000 definitions=main-2506040104
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Add support for the AD7405/ADUM770x, a high performance isolated ADC,
1-channel, 16-bit with a second-order Σ-Δ modulator that converts an
analog input signal into a high speed, single-bit data stream.
Signed-off-by: Pop Ioan Daniel <pop.ioan-daniel@xxxxxxxxxx>
---
changes in v6:
- update list of headers according to IFYU principle.
- rename ad7405_dec_rates in ad7405_dec_rates_range.
- remove struct mutex lock.
- update read_avail function
- add iio_device_claim_direct()
- rename ADI drivers for consistency
- add comment that explain why 256 decimation rate is chosen
drivers/iio/adc/Kconfig | 10 ++
drivers/iio/adc/Makefile | 1 +
drivers/iio/adc/ad7405.c | 262 +++++++++++++++++++++++++++++++++++++++
3 files changed, 273 insertions(+)
create mode 100644 drivers/iio/adc/ad7405.c
diff --git a/drivers/iio/adc/Kconfig b/drivers/iio/adc/Kconfig
index ad06cf556785..43af2070e27f 100644
--- a/drivers/iio/adc/Kconfig
+++ b/drivers/iio/adc/Kconfig
@@ -251,6 +251,16 @@ config AD7380
To compile this driver as a module, choose M here: the module will be
called ad7380.
+config AD7405
+ tristate "Analog Device AD7405 ADC Driver"
+ depends on IIO_BACKEND
+ help
+ Say yes here to build support for Analog Devices AD7405, ADUM7701,
+ ADUM7702, ADUM7703 analog to digital converters (ADC).
+
+ To compile this driver as a module, choose M here: the module will be
+ called ad7405.
+
config AD7476
tristate "Analog Devices AD7476 1-channel ADCs driver and other similar devices from AD and TI"
depends on SPI
diff --git a/drivers/iio/adc/Makefile b/drivers/iio/adc/Makefile
index 07d4b832c42e..8115f30b7862 100644
--- a/drivers/iio/adc/Makefile
+++ b/drivers/iio/adc/Makefile
@@ -26,6 +26,7 @@ obj-$(CONFIG_AD7291) += ad7291.o
obj-$(CONFIG_AD7292) += ad7292.o
obj-$(CONFIG_AD7298) += ad7298.o
obj-$(CONFIG_AD7380) += ad7380.o
+obj-$(CONFIG_AD7405) += ad7405.o
obj-$(CONFIG_AD7476) += ad7476.o
obj-$(CONFIG_AD7606_IFACE_PARALLEL) += ad7606_par.o
obj-$(CONFIG_AD7606_IFACE_SPI) += ad7606_spi.o
diff --git a/drivers/iio/adc/ad7405.c b/drivers/iio/adc/ad7405.c
new file mode 100644
index 000000000000..a5ca61ad5150
--- /dev/null
+++ b/drivers/iio/adc/ad7405.c
@@ -0,0 +1,262 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Analog Devices AD7405 driver
+ *
+ * Copyright 2025 Analog Devices Inc.
+ */
+
+#include <linux/clk.h>
+#include <linux/device.h>
+#include <linux/err.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/mod_devicetable.h>
+#include <linux/platform_device.h>
+#include <linux/property.h>
+#include <linux/regulator/consumer.h>
+#include <linux/util_macros.h>
+
+#include <linux/iio/backend.h>
+#include <linux/iio/iio.h>
+
+static const unsigned int ad7405_dec_rates_range[] = {
+ 32, 1, 4096,
+};
+
+struct ad7405_chip_info {
+ const char *name;
+ struct iio_chan_spec channel;
+ const unsigned int full_scale_mv;
+};
+
+struct ad7405_state {
+ struct iio_backend *back;
+ const struct ad7405_chip_info *info;
+ unsigned int ref_frequency;
+ unsigned int dec_rate;
+};
+
+static int ad7405_set_dec_rate(struct iio_dev *indio_dev,
+ const struct iio_chan_spec *chan,
+ unsigned int dec_rate)
+{
+ struct ad7405_state *st = iio_priv(indio_dev);
+ int ret;
+
+ if (!iio_device_claim_direct(indio_dev))
+ return -EBUSY;
+
+ if (dec_rate > 4096 || dec_rate < 32)
+ return -EINVAL;
+
+ ret = iio_backend_oversampling_ratio_set(st->back, chan->scan_index, dec_rate);
+ if (ret)
+ return ret;
+
+ st->dec_rate = dec_rate;
+
+ iio_device_release_direct(indio_dev);
+
+ if (ret < 0)
+ return ret;
+
+ return 0;
+}
+
+static int ad7405_read_raw(struct iio_dev *indio_dev,
+ const struct iio_chan_spec *chan, int *val,
+ int *val2, long info)
+{
+ struct ad7405_state *st = iio_priv(indio_dev);
+
+ switch (info) {
+ case IIO_CHAN_INFO_SCALE:
+ *val = st->info->full_scale_mv;
+ *val2 = st->info->channel.scan_type.realbits - 1;
+ return IIO_VAL_FRACTIONAL_LOG2;
+ case IIO_CHAN_INFO_OVERSAMPLING_RATIO:
+ *val = st->dec_rate;
+ return IIO_VAL_INT;
+ case IIO_CHAN_INFO_SAMP_FREQ:
+ *val = DIV_ROUND_CLOSEST_ULL(st->ref_frequency, st->dec_rate);
+ return IIO_VAL_INT;
+ case IIO_CHAN_INFO_OFFSET:
+ *val = -(1 << (st->info->channel.scan_type.realbits - 1));
+ return IIO_VAL_INT;
+ default:
+ return -EINVAL;
+ }
+}
+
+static int ad7405_write_raw(struct iio_dev *indio_dev,
+ struct iio_chan_spec const *chan, int val,
+ int val2, long info)
+{
+ switch (info) {
+ case IIO_CHAN_INFO_OVERSAMPLING_RATIO:
+ if (val < 0)
+ return -EINVAL;
+ return ad7405_set_dec_rate(indio_dev, chan, val);
+ default:
+ return -EINVAL;
+ }
+}
+
+static int ad7405_read_avail(struct iio_dev *indio_dev,
+ struct iio_chan_spec const *chan,
+ const int **vals, int *type, int *length,
+ long info)
+{
+ switch (info) {
+ case IIO_CHAN_INFO_OVERSAMPLING_RATIO:
+ *vals = ad7405_dec_rates_range;
+ *type = IIO_VAL_INT;
+ return IIO_AVAIL_RANGE;
+ default:
+ return -EINVAL;
+ }
+}
+
+static const struct iio_info ad7405_iio_info = {
+ .read_raw = &ad7405_read_raw,
+ .write_raw = &ad7405_write_raw,
+ .read_avail = &ad7405_read_avail,
+};
+
+#define AD7405_IIO_CHANNEL { \
+ .type = IIO_VOLTAGE, \
+ .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE) | \
+ BIT(IIO_CHAN_INFO_OFFSET), \
+ .info_mask_shared_by_all = IIO_CHAN_INFO_SAMP_FREQ | \
+ BIT(IIO_CHAN_INFO_OVERSAMPLING_RATIO), \
+ .info_mask_shared_by_all_available = \
+ BIT(IIO_CHAN_INFO_OVERSAMPLING_RATIO), \
+ .indexed = 1, \
+ .channel = 0, \
+ .channel2 = 1, \
+ .differential = 1, \
+ .scan_index = 0, \
+ .scan_type = { \
+ .sign = 'u', \
+ .realbits = 16, \
+ .storagebits = 16, \
+ }, \
+}
+
+static const struct ad7405_chip_info ad7405_chip_info = {
+ .name = "ad7405",
+ .full_scale_mv = 320,
+ .channel = AD7405_IIO_CHANNEL,
+};
+
+static const struct ad7405_chip_info adum7701_chip_info = {
+ .name = "adum7701",
+ .full_scale_mv = 320,
+ .channel = AD7405_IIO_CHANNEL,
+};
+
+static const struct ad7405_chip_info adum7702_chip_info = {
+ .name = "adum7702",
+ .full_scale_mv = 64,
+ .channel = AD7405_IIO_CHANNEL,
+};
+
+static const struct ad7405_chip_info adum7703_chip_info = {
+ .name = "adum7703",
+ .full_scale_mv = 320,
+ .channel = AD7405_IIO_CHANNEL,
+};
+
+static const char * const ad7405_power_supplies[] = {
+ "vdd1", "vdd2",
+};
+
+static int ad7405_probe(struct platform_device *pdev)
+{
+ struct device *dev = &pdev->dev;
+ struct iio_dev *indio_dev;
+ struct ad7405_state *st;
+ struct clk *clk;
+ int ret;
+
+ indio_dev = devm_iio_device_alloc(dev, sizeof(*st));
+ if (!indio_dev)
+ return -ENOMEM;
+
+ st = iio_priv(indio_dev);
+
+ st->info = device_get_match_data(dev);
+ if (!st->info)
+ return dev_err_probe(dev, -EINVAL, "no chip info\n");
+
+ ret = devm_regulator_bulk_get_enable(dev, ARRAY_SIZE(ad7405_power_supplies),
+ ad7405_power_supplies);
+ if (ret)
+ return dev_err_probe(dev, ret, "failed to get and enable supplies");
+
+ clk = devm_clk_get_enabled(dev, NULL);
+ if (IS_ERR(clk))
+ return PTR_ERR(clk);
+
+ st->ref_frequency = clk_get_rate(clk);
+ if (!st->ref_frequency)
+ return -EINVAL;
+
+ indio_dev->name = st->info->name;
+ indio_dev->channels = &st->info->channel;
+ indio_dev->num_channels = 1;
+ indio_dev->info = &ad7405_iio_info;
+
+ st->back = devm_iio_backend_get(dev, NULL);
+ if (IS_ERR(st->back))
+ return dev_err_probe(dev, PTR_ERR(st->back),
+ "failed to get IIO backend");
+
+ ret = iio_backend_chan_enable(st->back, 0);
+ if (ret)
+ return ret;
+
+ ret = devm_iio_backend_request_buffer(dev, st->back, indio_dev);
+ if (ret)
+ return ret;
+
+ ret = devm_iio_backend_enable(dev, st->back);
+ if (ret)
+ return ret;
+
+ /*
+ *Set 256 decimation rate. The default value in the AXI_ADC register
+ *is 0, so we set the register with a decimation rate value that is
+ *functional for all parts.
+ */
+ ret = ad7405_set_dec_rate(indio_dev, &indio_dev->channels[0], 256);
+ if (ret)
+ return ret;
+
+ return devm_iio_device_register(dev, indio_dev);
+}
+
+static const struct of_device_id ad7405_of_match[] = {
+ { .compatible = "adi,ad7405", .data = &ad7405_chip_info, },
+ { .compatible = "adi,adum7701", .data = &adum7701_chip_info, },
+ { .compatible = "adi,adum7702", .data = &adum7702_chip_info, },
+ { .compatible = "adi,adum7703", .data = &adum7703_chip_info, },
+ { }
+};
+MODULE_DEVICE_TABLE(of, ad7405_of_match);
+
+static struct platform_driver ad7405_driver = {
+ .driver = {
+ .name = "ad7405",
+ .owner = THIS_MODULE,
+ .of_match_table = ad7405_of_match,
+ },
+ .probe = ad7405_probe,
+};
+module_platform_driver(ad7405_driver);
+
+MODULE_AUTHOR("Dragos Bogdan <dragos.bogdan@xxxxxxxxxx>");
+MODULE_AUTHOR("Pop Ioan Daniel <pop.ioan-daniel@xxxxxxxxxx>");
+MODULE_DESCRIPTION("Analog Devices AD7405 driver");
+MODULE_LICENSE("GPL");
+MODULE_IMPORT_NS("IIO_BACKEND");
--
2.34.1
Return-Path: <linux-kernel+bounces-673277-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id DAD3341E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:36:45 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 2D317189A6F5
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:36:27 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 173A828FFC9;
Wed, 4 Jun 2025 13:36:04 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=analog.com header.i=@analog.com header.b="uEpNJ34p"
Received: from mx0b-00128a01.pphosted.com (mx0a-00128a01.pphosted.com [148.163.135.77])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8A4B233DF;
Wed, 4 Jun 2025 13:36:01 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.135.77
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749044163; cv=none; b=SDSyTRiy2RSKoqMuWC9D5yU5JAl4ttffKtzXCLMulzo1dwylaqtSV5PpxxVw+KVOPwY4BTd/HzSeJjPXMwelVZSX4QjKOP7qkMIsjH3XjadqjgMDRkqB6jyOkQO/FiS0SdOHImS/JyN0hTW6oTpExNF2ISoRFF5AfINwVUnPHBs=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749044163; c=relaxed/simple;
bh=i4D1V8FFbbAl8HqUbgC5htGfbdURz5fJHtLugYhTQTA=;
h=From:To:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version:Content-Type; b=hpC++QZsA36oBxYFyO924vDpT0Z1N5yqwYczPjHpYyYC4vGNxanL+lx40G/Rlboc2Wnr/9Sg9xvs9czZxTEsIdvRmHUFp7LR7jO7WBqq65F76ma5PxRmpftq+Wr5Bed3jVQs6I+ws2LsZRxXCJ3+4q/5HHH4zxP8Yibkm9aXzeU=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=analog.com; spf=pass smtp.mailfrom=analog.com; dkim=pass (2048-bit key) header.d=analog.com header.i=@analog.com header.b=uEpNJ34p; arc=none smtp.client-ip=148.163.135.77
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=analog.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=analog.com
Received: from pps.filterd (m0375855.ppops.net [127.0.0.1])
by mx0b-00128a01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 554CLenJ030757;
Wed, 4 Jun 2025 09:35:36 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=analog.com; h=
content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=DKIM; bh=TBAnR
hov1+58E85smY4BftHM40ijCitXRyw4O5nRnLQ=; b=uEpNJ34py1yumSeHabVCm
Gxwq7ne+7xc+AnAhV7/hUgzK4AffpOnc/+VrS7lLcgGyI7ysLy3Rj6y8i+kGlQQ4
QW8Czll7lVRC4ssvH+uxGCrIw/vkgSHaNYexfWnr7KQVerFgPLVX95hJxTqeOpm1
GotuAIlMM4F3Vfo8dvH4gU9kvhRGuzb24ouq9dypYZAAadKyrLsvqc2+k6kjwWjf
3RfiGH3P3QWgrwNVfP1KSfjgfHNv+SZiTBPDNTJkQWZJm5oQ65hIAzeGqPDy0tdm
DO+hRP1ZTmc0Vbxe16CrxtIa27efdigfanM/xTU4ffMSsHuyU8fgqNRBTPgokl6R
w==
Received: from nwd2mta4.analog.com ([137.71.173.58])
by mx0b-00128a01.pphosted.com (PPS) with ESMTPS id 472p2vgcmd-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 09:35:36 -0400 (EDT)
Received: from ASHBMBX9.ad.analog.com (ASHBMBX9.ad.analog.com [10.64.17.10])
by nwd2mta4.analog.com (8.14.7/8.14.7) with ESMTP id 554DZZ57030313
(version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL);
Wed, 4 Jun 2025 09:35:35 -0400
Received: from ASHBMBX8.ad.analog.com (10.64.17.5) by ASHBMBX9.ad.analog.com
(10.64.17.10) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.10; Wed, 4 Jun
2025 09:35:35 -0400
Received: from zeus.spd.analog.com (10.66.68.11) by ashbmbx8.ad.analog.com
(10.64.17.5) with Microsoft SMTP Server id 15.2.1748.10 via Frontend
Transport; Wed, 4 Jun 2025 09:35:33 -0400
Received: from romlx5.adlk.analog.com ([10.48.65.73])
by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 554DYVPa029277;
Wed, 4 Jun 2025 09:35:26 -0400
From: Pop Ioan Daniel <pop.ioan-daniel@xxxxxxxxxx>
To: Lars-Peter Clausen <lars@xxxxxxxxxx>,
Michael Hennerich
<Michael.Hennerich@xxxxxxxxxx>,
Jonathan Cameron <jic23@xxxxxxxxxx>,
David
Lechner <dlechner@xxxxxxxxxxxx>,
=?UTF-8?q?Nuno=20S=C3=A1?=
<nuno.sa@xxxxxxxxxx>,
Andy Shevchenko <andy@xxxxxxxxxx>, Rob Herring
<robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Conor Dooley
<conor+dt@xxxxxxxxxx>,
Sergiu Cuciurean <sergiu.cuciurean@xxxxxxxxxx>,
Dragos
Bogdan <dragos.bogdan@xxxxxxxxxx>,
Antoniu Miclaus
<antoniu.miclaus@xxxxxxxxxx>,
Olivier Moysan <olivier.moysan@xxxxxxxxxxx>,
Javier Carrasco <javier.carrasco.cruz@xxxxxxxxx>,
Matti Vaittinen
<mazziesaccount@xxxxxxxxx>,
Tobias Sperling <tobias.sperling@xxxxxxxxxxx>,
Marcelo Schmitt <marcelo.schmitt@xxxxxxxxxx>,
Alisa-Dariana Roman
<alisadariana@xxxxxxxxx>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@xxxxxxxxxxxxx>,
Trevor Gamblin
<tgamblin@xxxxxxxxxxxx>,
Ioan Daniel <pop.ioan-daniel@xxxxxxxxxx>, <linux-iio@xxxxxxxxxxxxxxx>,
<devicetree@xxxxxxxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>
Subject: [PATCH v6 4/5] dt-bindings: iio: adc: add ad7405
Date: Wed, 4 Jun 2025 16:34:06 +0300
Message-ID: <20250604133413.1528693-5-pop.ioan-daniel@xxxxxxxxxx>
X-Mailer: git-send-email 2.34.1
In-Reply-To: <20250604133413.1528693-1-pop.ioan-daniel@xxxxxxxxxx>
References: <20250604133413.1528693-1-pop.ioan-daniel@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 8bit
X-ADIRuleOP-NewSCL: Rule Triggered
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDEwMyBTYWx0ZWRfX4t1NH/6/2/h2
vJuES6ESa3Xmz5BB2TNds48iTQKV14WoE5Mvn/PJzIU+2nBjKe4Kdse7AiBHEU9o7rokJoxB3Q6
G5oWpHZcpQLdx1V8PN1XBdfekLipxxD8Laq32n2hBvTI5KMfDy6mOjYfCzuq7cjbpTmu01pj5Xm
wbacFBuZQHxnNoqAi6IPtVN45leIPBTBEZtgYIIWPD+1s2WhkeP9mKiyR1igDsT+E2CFEWoHgfK
24rSuOwvMkdkjNflJdqi8LzKMKj6Ky9rKpPY08XILVnzodERAyOxT4nZrFUl0wcsUyDBepYAT4V
6dJAE4l6s8E03+HHeRw0+KaglLfuknECzgIBSOhQD95K4jjgLkupVGLZDosjz7Ct7FGOq6OnSe2
Cup3JTRKCHfiB8ipT/tfoaMZiR8swXyg/ejMZ/LVlGnixPvfw8t1HOTGoDG2z8ILmkclwmff
X-Proofpoint-GUID: 1FYdpM9RH1uPaWuBhgh4WWnlD2QIWVlw
X-Proofpoint-ORIG-GUID: 1FYdpM9RH1uPaWuBhgh4WWnlD2QIWVlw
X-Authority-Analysis: v=2.4 cv=CdgI5Krl c=1 sm=1 tr=0 ts=68404ba8 cx=c_pps
a=3WNzaoukacrqR9RwcOSAdA==:117 a=3WNzaoukacrqR9RwcOSAdA==:17
a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10 a=gEfo2CItAAAA:8 a=gAnH3GRIAAAA:8
a=BlUfrHhC_0NcX1HyLxIA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10
a=sptkURWiP4Gy88Gu7hUp:22
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
priorityscore=1501 bulkscore=0 lowpriorityscore=0 impostorscore=0
clxscore=1015 mlxscore=0 adultscore=0 phishscore=0 mlxlogscore=999
spamscore=0 suspectscore=0 malwarescore=0 classifier=spam authscore=0
authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1
engine=8.19.0-2505280000 definitions=main-2506040103
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Add devicetree bindings for ad7405/adum770x family.
Signed-off-by: Pop Ioan Daniel <pop.ioan-daniel@xxxxxxxxxx>
---
no changes in v6.
.../bindings/iio/adc/adi,ad7405.yaml | 60 +++++++++++++++++++
1 file changed, 60 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad7405.yaml
diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7405.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7405.yaml
new file mode 100644
index 000000000000..57f097025705
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7405.yaml
@@ -0,0 +1,60 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright 2025 Analog Devices Inc.
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/adi,ad7405.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices AD7405 family
+
+maintainers:
+ - Dragos Bogdan <dragos.bogdan@xxxxxxxxxx>
+ - Pop Ioan Daniel <pop.ioan-daniel@xxxxxxxxxx>
+
+description: |
+ Analog Devices AD7405 is a high performance isolated ADC, 1-channel,
+ 16-bit with a second-order Σ-Δ modulator that converts an analog input signal
+ into a high speed, single-bit data stream.
+
+ https://www.analog.com/media/en/technical-documentation/data-sheets/ad7405.pdf
+ https://www.analog.com/media/en/technical-documentation/data-sheets/adum7701.pdf
+ https://www.analog.com/media/en/technical-documentation/data-sheets/adum7702.pdf
+ https://www.analog.com/media/en/technical-documentation/data-sheets/ADuM7703.pdf
+
+properties:
+ compatible:
+ enum:
+ - adi,ad7405
+ - adi,adum7701
+ - adi,adum7702
+ - adi,adum7703
+
+ clocks:
+ maxItems: 1
+
+ vdd1-supply: true
+
+ vdd2-supply: true
+
+ io-backends:
+ maxItems: 1
+
+required:
+ - compatible
+ - clocks
+ - vdd1-supply
+ - vdd2-supply
+ - io-backends
+
+additionalProperties: false
+
+examples:
+ - |
+ adc {
+ compatible = "adi,ad7405";
+ clocks = <&axi_clk_gen 0>;
+ vdd1-supply = <&vdd1>;
+ vdd2-supply = <&vdd2>;
+ io-backends = <&axi_adc>;
+ };
+...
--
2.34.1
Return-Path: <linux-kernel+bounces-673280-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 8C65241E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:36:53 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id B13571658AD
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:36:53 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id B542328FFDD;
Wed, 4 Jun 2025 13:36:40 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=analog.com header.i=@analog.com header.b="cuufOvGN"
Received: from mx0b-00128a01.pphosted.com (mx0a-00128a01.pphosted.com [148.163.135.77])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 68CB41E411C;
Wed, 4 Jun 2025 13:36:37 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.135.77
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749044199; cv=none; b=tuEjW1YIsqRjgfnH3JqX1zfbb22Miy3h9M95g4yJ2uI0Mr0ZIFc2NwpI4O0n4as2KVdDqkPRklanXtFL6u3WjriBzjn/mqlejZRGvTVwJ0dbNMtGPWY4oo/VW/7RBWg1lwR8+P2LaZrmfx0n0vh5wVmnWcBGAARnoh3fPzdVuEo=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749044199; c=relaxed/simple;
bh=LjIYXPHD1emI9FEWude80itp7UFfioaOXAfLHYaQFQ8=;
h=From:To:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version:Content-Type; b=Xhnscen0VElx2AquCNWt+Hx5bRBgL8OHTlqp645wRwmdLAhAhvRNb8IBu35uXlRaMmoBsL5mqGBYjFOCWjjubveUUdguYiM5AswR5PP5lsU0Fxm9sQ5U2E+EDUowOayt/HnmT0xPMIgyxmgv8tggwGK3FH+qipyBpjVc4Ms5BpQ=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=analog.com; spf=pass smtp.mailfrom=analog.com; dkim=pass (2048-bit key) header.d=analog.com header.i=@analog.com header.b=cuufOvGN; arc=none smtp.client-ip=148.163.135.77
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=analog.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=analog.com
Received: from pps.filterd (m0375855.ppops.net [127.0.0.1])
by mx0b-00128a01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 554CLYNx030454;
Wed, 4 Jun 2025 09:35:06 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=analog.com; h=
content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=DKIM; bh=tofbD
U0TxVED6wHZNiaQAWcBgw8svPQ+Y8Cusi2jr0A=; b=cuufOvGN+Zrq6D7cia6ZH
OopcUnMzjgX82CDR2lN8WGmmGqMxpE9P4S9M2penvfcUrX3hsSDUjPf+WMdzu/On
Jk8HF7hVxj8ouxZ0qf6uk7NTuyjFm1/eOjdlsW4pmAVZiggCb2pdSqbSddUfGN8Q
ycYuq+CF50bldbKahfIzKQubX9G60epwP9dIZo+UAXrjp3GtdJFFP1PT+8yXrhDN
o5Cuth7VnPwh7P92xXjuND7f+50yCiN5aC2nbSflj4MBFoRtcGLRLKjXymQZfmDn
Xnkb411W/Jp6TH8scsuz6SUT6WnGGwKPC1j8fv6M7bHTKOdH8FzLV7ysaiToMaT/
w==
Received: from nwd2mta4.analog.com ([137.71.173.58])
by mx0b-00128a01.pphosted.com (PPS) with ESMTPS id 472p2vgcj6-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 09:35:06 -0400 (EDT)
Received: from ASHBMBX9.ad.analog.com (ASHBMBX9.ad.analog.com [10.64.17.10])
by nwd2mta4.analog.com (8.14.7/8.14.7) with ESMTP id 554DZ5nW030268
(version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL);
Wed, 4 Jun 2025 09:35:05 -0400
Received: from ASHBCASHYB5.ad.analog.com (10.64.17.133) by
ASHBMBX9.ad.analog.com (10.64.17.10) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.2.1748.10; Wed, 4 Jun 2025 09:35:05 -0400
Received: from ASHBMBX8.ad.analog.com (10.64.17.5) by
ASHBCASHYB5.ad.analog.com (10.64.17.133) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.2.1748.10; Wed, 4 Jun 2025 09:35:05 -0400
Received: from zeus.spd.analog.com (10.66.68.11) by ashbmbx8.ad.analog.com
(10.64.17.5) with Microsoft SMTP Server id 15.2.1748.10 via Frontend
Transport; Wed, 4 Jun 2025 09:35:05 -0400
Received: from romlx5.adlk.analog.com ([10.48.65.73])
by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 554DYVPX029277;
Wed, 4 Jun 2025 09:34:55 -0400
From: Pop Ioan Daniel <pop.ioan-daniel@xxxxxxxxxx>
To: Lars-Peter Clausen <lars@xxxxxxxxxx>,
Michael Hennerich
<Michael.Hennerich@xxxxxxxxxx>,
Jonathan Cameron <jic23@xxxxxxxxxx>,
"David
Lechner" <dlechner@xxxxxxxxxxxx>,
=?UTF-8?q?Nuno=20S=C3=A1?=
<nuno.sa@xxxxxxxxxx>,
Andy Shevchenko <andy@xxxxxxxxxx>, Rob Herring
<robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Conor Dooley
<conor+dt@xxxxxxxxxx>,
Sergiu Cuciurean <sergiu.cuciurean@xxxxxxxxxx>,
"Dragos Bogdan" <dragos.bogdan@xxxxxxxxxx>,
Antoniu Miclaus
<antoniu.miclaus@xxxxxxxxxx>,
Olivier Moysan <olivier.moysan@xxxxxxxxxxx>,
Javier Carrasco <javier.carrasco.cruz@xxxxxxxxx>,
Matti Vaittinen
<mazziesaccount@xxxxxxxxx>,
Tobias Sperling <tobias.sperling@xxxxxxxxxxx>,
Marcelo Schmitt <marcelo.schmitt@xxxxxxxxxx>,
Alisa-Dariana Roman
<alisadariana@xxxxxxxxx>,
Trevor Gamblin <tgamblin@xxxxxxxxxxxx>,
"Ramona
Alexandra Nechita" <ramona.nechita@xxxxxxxxxx>,
Ioan Daniel
<pop.ioan-daniel@xxxxxxxxxx>, <linux-iio@xxxxxxxxxxxxxxx>,
<devicetree@xxxxxxxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>
Subject: [PATCH v6 1/5] iio: adc: ad4851: ad4851_set_oversampling_ratio parameters update
Date: Wed, 4 Jun 2025 16:34:03 +0300
Message-ID: <20250604133413.1528693-2-pop.ioan-daniel@xxxxxxxxxx>
X-Mailer: git-send-email 2.34.1
In-Reply-To: <20250604133413.1528693-1-pop.ioan-daniel@xxxxxxxxxx>
References: <20250604133413.1528693-1-pop.ioan-daniel@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain
X-ADIRuleOP-NewSCL: Rule Triggered
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDEwMyBTYWx0ZWRfXwQlLLF4+veXt
66McX7qK6oVBwGp6SLzMpkksrycE05YmyprTGGOWVunyAqZNaPiWCBUe3/i02Th7NBU3Id872sX
0rzbyL1XKFTO17pfSWmOl/UyEQj4eIwf6UUHM9manCN0PemGYplbmCCDddiejQR3UxxL2O5EpXI
P3LQ5oQisVzQD/nKfZV6tI4vJIr4DUP70K/bM6pjtR8EEzCY0muXWIH0xdXDXNWc9GW8shkGLPq
t5V/Mz+hYR81rq/vVNtHlrsk562fRHCOXcghr965kTx6yDba8bC3ubwTS2Nc4iBOIjTCu5HvA1m
/dKBgE3s7JRljFgFFUQdkqjIANeqSgeBnCncD1zSj5HpD59tTo7nsgdDXc6lMB1YUBgkpEly4/1
5UqDvc9QxWuUOqj4h9i6UlscIREPK2XulJdjP1id8zNNsh7no6UzbEYzlm7nFEnaznYuxeaa
X-Proofpoint-GUID: tFdR-BrqqW3UL6uswQuvSc9fkLHUf3ja
X-Proofpoint-ORIG-GUID: tFdR-BrqqW3UL6uswQuvSc9fkLHUf3ja
X-Authority-Analysis: v=2.4 cv=CdgI5Krl c=1 sm=1 tr=0 ts=68404b8a cx=c_pps
a=3WNzaoukacrqR9RwcOSAdA==:117 a=3WNzaoukacrqR9RwcOSAdA==:17
a=6IFa9wvqVegA:10 a=IpJZQVW2AAAA:8 a=gAnH3GRIAAAA:8 a=r0u9AmH2YJ65VWHPuukA:9
a=IawgGOuG5U0WyFbmm1f5:22
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
priorityscore=1501 bulkscore=0 lowpriorityscore=0 impostorscore=0
clxscore=1015 mlxscore=0 adultscore=0 phishscore=0 mlxlogscore=999
spamscore=0 suspectscore=0 malwarescore=0 classifier=spam authscore=0
authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1
engine=8.19.0-2505280000 definitions=main-2506040103
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Remove chan parameter from ad4851_set_oversampling_ratio parameters
list because the parameter is not used.
Reviewed-by: David Lechner <dlechner@xxxxxxxxxxxx>
Signed-off-by: Pop Ioan Daniel <pop.ioan-daniel@xxxxxxxxxx>
---
no changes in v6.
drivers/iio/adc/ad4851.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/iio/adc/ad4851.c b/drivers/iio/adc/ad4851.c
index 98ebc853db79..12f90aa3a156 100644
--- a/drivers/iio/adc/ad4851.c
+++ b/drivers/iio/adc/ad4851.c
@@ -294,7 +294,6 @@ static int ad4851_scale_fill(struct iio_dev *indio_dev)
}
static int ad4851_set_oversampling_ratio(struct iio_dev *indio_dev,
- const struct iio_chan_spec *chan,
unsigned int osr)
{
struct ad4851_state *st = iio_priv(indio_dev);
@@ -831,7 +830,7 @@ static int ad4851_write_raw(struct iio_dev *indio_dev,
case IIO_CHAN_INFO_CALIBBIAS:
return ad4851_set_calibbias(st, chan->channel, val);
case IIO_CHAN_INFO_OVERSAMPLING_RATIO:
- return ad4851_set_oversampling_ratio(indio_dev, chan, val);
+ return ad4851_set_oversampling_ratio(indio_dev, val);
default:
return -EINVAL;
}
--
2.34.1
Return-Path: <linux-kernel+bounces-673281-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 6CF2241E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:37:34 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 2A93118964BE
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:37:31 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 6A4B928F92B;
Wed, 4 Jun 2025 13:37:10 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="PXyua9Pn"
Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2040.outbound.protection.outlook.com [40.107.237.40])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id EF5C91EFF8E
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:37:07 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.237.40
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749044229; cv=fail; b=tXe7Flb0wey7fzCctv0lXuCVX3Zl5/bhvKXUKeCI99l67s63Nt6xjX9IUzsDsI4Jve7zxN8Kl3DA4Qyg+ilohDlH/qZRuEzjN/xb6139PeZS/vl8nGp0T1Kih96d9yTeZ+v2ifWDABKbb5vxoCPxFZ/iiu5WwPpWP1qXs6dATpc=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749044229; c=relaxed/simple;
bh=3x/2tYGmRM2F1DaGvB7rEHyw4rxwU2Zeh/gLH9ANPNg=;
h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
Content-Type:MIME-Version; b=X6iHkSYw3DckMkcXZZ9epHmDGz7CK+R8i1kwfgOdzglR3/zoX9UQa97gLHSCxzfSbZf65t4V0WSXdraDNRRSbba9LuFx9oJLYpeRPlu24x9HT2JC+dsScdYO4aKbWk1dE4DSiBUY5L22naLjZpzWw/yYbqzsnzNCLQjltkInjhM=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=PXyua9Pn; arc=fail smtp.client-ip=40.107.237.40
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com
Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=STKtxIJFiAoZv3JrMKPSvLI/I1kgXJhw3JD4pQ9DltysDJFDThahkcioFld3rCtQttFjHKuBOgV5GVNhjdTtl54Ps6vdDakvHn5HRLcQnvRs/daUiQ7bZZR6GG5yOIQOqBxhDCCqxPIfbpg1WxTj9x77UDlHf1AOQGDB2ca80LK0ULnYQMPwvvsFZwxEe6sHItAO70BJjoatXb4+w1K+eU+p6JLfzeKsvKpHhYM3LZpLqx6dJquIcx51Mfx2TCIvKoe2kBLqi3w1XjFVlxZzsWD78VVILvKJrtMrieLHhwiLgiApUD6Z7tyuoYZcJZyglKiElzD7QOZd7CYTZ/oZcQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=3x/2tYGmRM2F1DaGvB7rEHyw4rxwU2Zeh/gLH9ANPNg=;
b=qQPULTnrTuqdrzC+cO4zHKdjwEfPb3GXz/LZxJDAx/kRDY3P/jVEtiEMw1bczDrMV8In6Obw4qotWE5t9EavI+wngvbvJxRHRK8l0FMy7ufeYBWyTANYFrIJ0u8D3FHeLW6NBNx7fs8fDN/JSmMwZ0+l63NYEEaRJgWA6R4b9RGzuu/34SanuGvX+XTYyA6xHHlHFOkjHRS3+N4E2CC3AjIkgJVT7iUgiDZHYqU7I9GNendgp45C65wcTxE4xywDe4HqiMPQtFpLZ1i0CLONFa9Muk3FZOqp8opm/9Uqfxeef1F2TNUEpc0SZfa+nWI7BOF5BTYYHnEj4e09ZL45UQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com;
dkim=pass header.d=nvidia.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;
s=selector2;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=3x/2tYGmRM2F1DaGvB7rEHyw4rxwU2Zeh/gLH9ANPNg=;
b=PXyua9PnC++oHF0pop2SWr181GiP5wgHcahsCZ94YBjLqGT0tVilfA1eRSyyNxdHe/rasLV3SZrcJw9RivWrIBCjpTMJlAJSmpmEc9AfYgyKvEsLsspTOp/rSisWJ1HjjJi9U8IxwSf+aTmTJR6HBwSRv0Hws9g1QrPgWfb+MmXqgKB+kguJ1RiqbXAFxjSTvOU/Bzu0gOeb61ouPTisLaOj51yFxi04HPC8yLfsp8Uzpbp+DsPFykrKSYa84Ngu/eg8gXjfT6mWeqMebmS2irdK0Ts/A27S7Bm/WG7EbJC2piFrWTF0GpYDcxC2tROtVORVAKFppIAl5WfFoH+4XQ==
Authentication-Results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=nvidia.com;
Received: from DS7PR12MB9473.namprd12.prod.outlook.com (2603:10b6:8:252::5) by
SJ2PR12MB8941.namprd12.prod.outlook.com (2603:10b6:a03:542::15) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.34; Wed, 4 Jun
2025 13:37:04 +0000
Received: from DS7PR12MB9473.namprd12.prod.outlook.com
([fe80::5189:ecec:d84a:133a]) by DS7PR12MB9473.namprd12.prod.outlook.com
([fe80::5189:ecec:d84a:133a%5]) with mapi id 15.20.8792.034; Wed, 4 Jun 2025
13:37:04 +0000
From: Zi Yan <ziy@xxxxxxxxxx>
To: David Hildenbrand <david@xxxxxxxxxx>
Cc: Anshuman Khandual <anshuman.khandual@xxxxxxx>, Liam.Howlett@xxxxxxxxxx,
akpm@xxxxxxxxxxxxxxxxxxxx, isaacmanjarres@xxxxxxxxxx, jyescas@xxxxxxxxxx,
kaleshsingh@xxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx,
lorenzo.stoakes@xxxxxxxxxx, masahiroy@xxxxxxxxxx, mhocko@xxxxxxxx,
minchan@xxxxxxxxxx, rppt@xxxxxxxxxx, surenb@xxxxxxxxxx, tjmercier@xxxxxxxxxx,
vbabka@xxxxxxx
Subject: Re: [PATCH] mm: rename CONFIG_PAGE_BLOCK_ORDER to
CONFIG_PAGE_BLOCK_ORDER_CEIL.
Date: Wed, 04 Jun 2025 09:36:59 -0400
X-Mailer: MailMate (2.0r6257)
Message-ID: <CF888D46-CEEC-4008-A908-B7529CF237AA@xxxxxxxxxx>
In-Reply-To: <b92484b6-c028-4969-8efb-aff747c38f83@xxxxxxxxxx>
References: <20250603154843.1565239-1-ziy@xxxxxxxxxx>
<d6f18e51-47a4-498c-ad66-60fa2d8efbfc@xxxxxxx>
<957DB2F9-9C7E-486E-95EA-1E6574F82D4B@xxxxxxxxxx>
<b92484b6-c028-4969-8efb-aff747c38f83@xxxxxxxxxx>
Content-Type: text/plain
X-ClientProxiedBy: BL6PEPF00016414.NAMP222.PROD.OUTLOOK.COM
(2603:10b6:22e:400:0:1004:0:c) To DS7PR12MB9473.namprd12.prod.outlook.com
(2603:10b6:8:252::5)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: DS7PR12MB9473:EE_|SJ2PR12MB8941:EE_
X-MS-Office365-Filtering-Correlation-Id: 06861fc3-1357-4aae-e536-08dda36ce467
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|366016|376014|1800799024;
X-Microsoft-Antispam-Message-Info:
=?us-ascii?Q?v2EEaH40idtk4MtNGFVb4ttCKqIEJimWE5sxUf6iagC0Ay3dGq0FqB6veYiH?=
=?us-ascii?Q?v6lifusw1zt5sBLTkzbp9KPeYg3RbOc6MHhpmDsoobG689WJEIvnPmS9PuQF?=
=?us-ascii?Q?dZZvvFZG76AizTH/ld83zHN3AMQxFJ31kKuJYo/0+3YvNgO5hcodyzKq02Ay?=
=?us-ascii?Q?y2Ti2kH4CNoTodBA16UIJdJ0ML691ZMvLk1RER4qqz+5IOoHdPU3bUOU0uqq?=
=?us-ascii?Q?+K4lhTbY5mFZFaRzvSGU/asU8e+d9kEMGcpfDsAkUEBdVLM1amKD7QWXij+z?=
=?us-ascii?Q?KcnKoCjaNjn+G8gucrXwTfsHHiFIHbOLKtSVPmml/pGsct8OglMH8GY7FCVw?=
=?us-ascii?Q?eunYq6vwKRhDX5GfGVjOxKlUplrhpVnJdeemaOVpk+OQKKPjON9wIQXbiky9?=
=?us-ascii?Q?GGF+VHzEvIbsexRwNSaqMQc/yU7BCZez2EiYHzo+BAUwI/ETQr/Bgyo9A2KC?=
=?us-ascii?Q?VvyEpqBLl3mi6OBoFVnW/oKYM+i8Rb9aw07I52Aec/9OD5le+ePyTDc1/oHx?=
=?us-ascii?Q?MrY1t8Xlp8tunjG2xJMZCLYIFX5m6K0Cx43oDIOe/R5QpkqO4mXiammhejhY?=
=?us-ascii?Q?LePd5q/mE17GFDL/8qeiaKI41t1VzWsS39Pg6has5DuB7sKqHNvtw31Tkf4f?=
=?us-ascii?Q?MDjfw0oUYQEiNdDcUdiAKIpvgwIWp4DbIjg+hiwOjj2yaRFcvyhQ/MTqFxcD?=
=?us-ascii?Q?D0zhmFXduyKpHZx7jVv06uy7nDFE6UmrPtwMEInpUqbP42g8tp/v5JtbWUoD?=
=?us-ascii?Q?R9WAsqHh7thkfJST0+sAXTm2ryihvjRqkCnhzBUGj+cEb8nlaU/tVuUuy9QW?=
=?us-ascii?Q?R2miQUkxxDwWbRPomuNmLHLz7pBtR7mENYHsgRp8kCFJRHTIbbe2ssh3BOuJ?=
=?us-ascii?Q?tBvm6Y0Hvq0Ja43bpzfk+e9twHZd8zCsqVvyoyE4fvR/z9qt916uDsZ/BklW?=
=?us-ascii?Q?9+8sXZXCbusXhDukpmtiUUpKINUFOTxXgoFBRzoW4Pox7LDF1OuG9J9Goe+v?=
=?us-ascii?Q?m8oQvpBJfyHyWCifBkEyJTpFmVoQUWc0x0r+LvEN0iScFSaswlyK2fkF5PWr?=
=?us-ascii?Q?fbUddHL1dnLA3Q3Fb76K62z9FmgqIums2LbS9jvOJX8sye7BkP9i1P/wNnuw?=
=?us-ascii?Q?ejY+FHzcbrSRUp4EdFPNv/L0y1tpn3U7mLew7c1LzvD1BahO6gEiIc+RdAsL?=
=?us-ascii?Q?08Hv3SsRvfqXAkSQgT/qXiOUAewZ46gVtxZZtqS2FMxKHIYONAQU4dU7e2Wj?=
=?us-ascii?Q?UorE4qDIdQGjQfw9Gy/dxLRJ3SNZnWw5jJuYbfNvbKQHjO7jM7BtcfXjaROU?=
=?us-ascii?Q?NlC42+GCG2GZnsgRjLoN80fIJXt2eCnkfMYZw9Q63WJuuVyEOFhyTNFZTfDg?=
=?us-ascii?Q?IqZ/NSmaT/tzG67YDv2zRMjRm9BuwKCIqgZiOpTtKDobVIa2Jq5aPihE9nVG?=
=?us-ascii?Q?CyXYvOisD1M=3D?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR12MB9473.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(366016)(376014)(1800799024);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?us-ascii?Q?bJNSJn15hzdHxiT+qWQYMm9owahrODqyzZO3m+iFMkGgkqK/2nUWkdFgP1E1?=
=?us-ascii?Q?iRlQiIj3H2H8mCTN2DAb1ai3YNWMfP3PAYTCAaQ/t8BaHaflgYz2YXF2ghLx?=
=?us-ascii?Q?Gl0rELTJrqLg6oIlHJHlC6eULd75nikAeRKC7/gwZyVjRrhO2jJTPxkvAPIX?=
=?us-ascii?Q?HR9x8gqkmEiUgHKPcRW/Py6Yrz5uD3kg9ridAQU0TXZdj4ZNtt/JXcjBXmbN?=
=?us-ascii?Q?ER9MzBlybtPU6dOi9H+DvAnO8BjNIdoQF9pYWTOhx4dTYfbYBn5vAxJOma/t?=
=?us-ascii?Q?QxLbUEzaH9Z61DNxMzoUYN8FxfnQysCWR6GX+AS9KLG/QoFzYSGVWrnVzlAl?=
=?us-ascii?Q?4rKjGdlPNZmxz62jGvvtiezQCG90t4XfTHLYiHyezyDEs6Do5XePfHGaHZ01?=
=?us-ascii?Q?08GrXATmp2weeb38mT3gbTjjne6icFkCexEwIs6zMOzOU4act/B8TF+HULfX?=
=?us-ascii?Q?4iph8aZHOiTvK3LgT5Udg8Z+ImAYWEJaS5tfOSdQPfj5MK07MJQMphqJXPzK?=
=?us-ascii?Q?cBMYvV4f5c3iuXooQvxytfEVsaez3A0Mry/lY/u6TG9KUQ6hZit8Erm0tLZM?=
=?us-ascii?Q?qDT/HAkTzC3O5ooq2cTYKk6kW7/3G6aLLRzDp5wyb3h5lqWcHbJBBpZ7PLvn?=
=?us-ascii?Q?KDrr1g7wJ35E6/fH+IrK9td/cwhyvQsN1c1ZBnT5RiQ5NaZGCk04w+5Avb6J?=
=?us-ascii?Q?L+WeMZrCCZnHAAXRWW2d2LfNiLd5beg0TpNc4xM937Xc9VBF4s1kVpBw1Hsy?=
=?us-ascii?Q?5FCkDEY2Ogx39pEpGk5de+0ZMMU0DrdEKh+i5nBbpEwZZEGnHso4HxSFeH0r?=
=?us-ascii?Q?G01JSV2u0wxCmAZBTid80GUS4CojHLMSlxPx4dJiAsQVX4PXdZJDTooIqUrj?=
=?us-ascii?Q?wIUY209S9ab0P99CEe7woXLcyfOg5T+TIhz0ZogcEjVOE2KPU8Z3x2jGVHRn?=
=?us-ascii?Q?c5CHHk+zPXeDrqvMRIvSFC6wXiePeX72vLYlKgYSEVV4me6ooqY6KYjdCV3R?=
=?us-ascii?Q?3gJWGmXOQVYouaXtir1wJjrE+7APXjy5Q571eux5suVQgTwBzbE7nnzlODvG?=
=?us-ascii?Q?5flpLgShC5jgjRMsU3sC655nU3+vzybOnFO0QRUAs6WMb1m/eI6xpYRohr4v?=
=?us-ascii?Q?y+PyiamSoYcVkZFBED8qpDxi29s8cyBKSZv2BHQZGnKo7S7vI5dDlt6vIN2b?=
=?us-ascii?Q?XI/OzZvybY+mld4yIRPmfnSsB04jX/fZv/0jgoJmOgQuKxur9tKIl+6mS7sw?=
=?us-ascii?Q?OLOH6WAkRJxihmZ50VQDpyTsXy1OGFI6F2BQoDiWzUpPD7JNyT6IwCPOfzOj?=
=?us-ascii?Q?u/ae0fpbUrgDHx1k2PJ5mRkS+u1i/EaOpY6vMOfGiRc/47ZKsbBOoXpjOugh?=
=?us-ascii?Q?VSu5aPFbm7YqT9Qeouo2qbMceV/bi/Kslgno9FkDHVYLxhLBhBAWshKyETA0?=
=?us-ascii?Q?WfdyBTbbYUsh9sEGbiR9JRoYQNLNZIJhn0sgarRfSJIXGPCngY9IKLSVD5+w?=
=?us-ascii?Q?TJiTjcy0RwWwDQ1OLgPdD/WNC4vjm+d8TTUdOkMsgAihK7yAqijcrlxeVT7m?=
=?us-ascii?Q?TSUBSUXvDvJtRQwsENBUWI3KCqhgpLCR1x5QPXel?=
X-OriginatorOrg: Nvidia.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 06861fc3-1357-4aae-e536-08dda36ce467
X-MS-Exchange-CrossTenant-AuthSource: DS7PR12MB9473.namprd12.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 13:37:04.1294
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: DfLS/dEW0ySIR3XgDpHdJEz6pNJhrEooAmeAmvR1CfgnMR6QJo9OJ2QgeeqgoNOE
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB8941
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 4 Jun 2025, at 9:31, David Hildenbrand wrote:
On 04.06.25 15:26, Zi Yan wrote:
On 4 Jun 2025, at 0:36, Anshuman Khandual wrote:
On 6/3/25 21:18, Zi Yan wrote:
The config is in fact an additional upper limit of pageblock_order, so
rename it to avoid confusion.
Agreed. This new config has been similar to existing 'pageblock_order'
that might cause confusion. Hence renaming makes sense. But instead of
PAGE_BLOCK_ORDER_CEIL should it be rather PAGE_BLOCK_ORDER_MAX ?
Or PAGE_BLOCK_MAX_ORDER?
Would also work for me.
Fixes: e13e7922d034 ("mm: add CONFIG_PAGE_BLOCK_ORDER to select page block order")
Does it really need a "Fixes: " tag given there is no problem to fix ?
I have no strong opinion on this one.
Probably we want this to go into this release. No need for a Fixes: I assume.
OK. I will send v2 later today, so that Anshuman has a chance to reply to my
new name.
V2 will has following changes:
1. the new name: PAGE_BLOCK_MAX_ORDER,
2. add the missing PAGE_BLOCK_ORDER rename in mm/mm_init.c[1]
3. drop the Fixes.
[1] https://lore.kernel.org/linux-mm/202506042058.XgvABCE0-lkp@xxxxxxxxx/
--
Best Regards,
Yan, Zi
Return-Path: <linux-kernel+bounces-673282-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 8D0A941E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:37:53 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 719483A4CFD
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:37:23 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 94E212557C;
Wed, 4 Jun 2025 13:37:32 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mlAlwaCM"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id B66FB33DF;
Wed, 4 Jun 2025 13:37:31 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749044251; cv=none; b=oNTXDvVdU3mrib6CF/WyynhnNc9om2xQvs3+/URPLnTyd22ZC2BIYmRkhcU2oa4MWad0/Tq+aogI/1heOCRfkKjYmbfCZWVXmqzAyU2kXdo6RPwEodvktSPi0lNxOdSwPRsh2k1m3jx8/lI50Uai8bavBKQTJTkB4k3JlBF6pB4=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749044251; c=relaxed/simple;
bh=LjylLgqkF7sXPvwM5QH3T3a2T3r7WcEDyImVKYKRfn0=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID:
MIME-Version:Content-Type; b=D/g6elXLS+XvDg2y4MXowBFBdFdFDIKmePkRi3+RlbMd/kCe51R230Odz8QrGzpPLG4lIlRg+YHRKV6Z7T3tIVKGvJP0o3iCc0Wgtu3RDoPz4jm/zyAk3+36jJBnh8qEa/yG9OOwDAiZUo9h8IwaSrT8L6FIKDde2h6clYUj7j8=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mlAlwaCM; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5D6C5C4CEE7;
Wed, 4 Jun 2025 13:37:23 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749044251;
bh=LjylLgqkF7sXPvwM5QH3T3a2T3r7WcEDyImVKYKRfn0=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
b=mlAlwaCMs9tHjv6nEt7U+Ibg65b3CKJlPhs4lgVIQ1VKcvjCSAYuvfpS6hBIjw3OV
XQ8nvezt/8lN48FPFZnaaeJIhrV3+e2znePItViM9AaToBMfrO64NF1hBlaB1QvO6z
7z7MBsz2PgK1NDMFfsSxgSmZA49I1drxjPSJm2OqbmDUcdp5q8e2z3fTc3QtLqzj60
FMvKPAK09UXyZ9zGUdOOQOWfA/LvFF06aPr//yfBeeocNL+rWHokKBimR3tSr5zb+U
n5Po3J89DI/7AuC4qrESmIyKo8Bw3bZzX2U3Uds/QpUkap7crcVwBjgXNvjtoiQHDZ
UCS7+3qRu7fTw==
X-Mailer: emacs 30.1 (via feedmail 11-beta-1 I)
From: Aneesh Kumar K.V <aneesh.kumar@xxxxxxxxxx>
To: Xu Yilun <yilun.xu@xxxxxxxxxxxxxxx>
Cc: kvm@xxxxxxxxxxxxxxx, sumit.semwal@xxxxxxxxxx, christian.koenig@xxxxxxx,
pbonzini@xxxxxxxxxx, seanjc@xxxxxxxxxx, alex.williamson@xxxxxxxxxx,
jgg@xxxxxxxxxx, dan.j.williams@xxxxxxxxx, aik@xxxxxxx,
linux-coco@xxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx,
linux-media@xxxxxxxxxxxxxxx, linaro-mm-sig@xxxxxxxxxxxxxxxx,
vivek.kasireddy@xxxxxxxxx, yilun.xu@xxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, lukas@xxxxxxxxx, yan.y.zhao@xxxxxxxxx,
daniel.vetter@xxxxxxxx, leon@xxxxxxxxxx, baolu.lu@xxxxxxxxxxxxxxx,
zhenzhong.duan@xxxxxxxxx, tao1.su@xxxxxxxxx,
linux-pci@xxxxxxxxxxxxxxx, zhiw@xxxxxxxxxx, simona.vetter@xxxxxxxx,
shameerali.kolothum.thodi@xxxxxxxxxx, iommu@xxxxxxxxxxxxxxx,
kevin.tian@xxxxxxxxx
Subject: Re: [RFC PATCH 19/30] vfio/pci: Add TSM TDI bind/unbind IOCTLs for
TEE-IO support
In-Reply-To: <aD24r44v0g1NgeZs@yilunxu-OptiPlex-7050>
References: <20250529053513.1592088-1-yilun.xu@xxxxxxxxxxxxxxx>
<20250529053513.1592088-20-yilun.xu@xxxxxxxxxxxxxxx>
<yq5aplfn210z.fsf@xxxxxxxxxx> <aD24r44v0g1NgeZs@yilunxu-OptiPlex-7050>
Date: Wed, 04 Jun 2025 19:07:18 +0530
Message-ID: <yq5ajz5r8w6p.fsf@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Xu Yilun <yilun.xu@xxxxxxxxxxxxxxx> writes:
On Sun, Jun 01, 2025 at 04:15:32PM +0530, Aneesh Kumar K.V wrote:
Xu Yilun <yilun.xu@xxxxxxxxxxxxxxx> writes:
> Add new IOCTLs to do TSM based TDI bind/unbind. These IOCTLs are
> expected to be called by userspace when CoCo VM issues TDI bind/unbind
> command to VMM. Specifically for TDX Connect, these commands are some
> secure Hypervisor call named GHCI (Guest-Hypervisor Communication
> Interface).
>
> The TSM TDI bind/unbind operations are expected to be initiated by a
> running CoCo VM, which already have the legacy assigned device in place.
> The TSM bind operation is to request VMM make all secure configurations
> to support device work as a TDI, and then issue TDISP messages to move
> the TDI to CONFIG_LOCKED or RUN state, waiting for guest's attestation.
>
> Do TSM Unbind before vfio_pci_core_disable(), otherwise will lead
> device to TDISP ERROR state.
>
Any reason these need to be a vfio ioctl instead of iommufd ioctl?
For ex: https://lore.kernel.org/all/20250529133757.462088-3-aneesh.kumar@xxxxxxxxxx/
A general reason is, the device driver - VFIO should be aware of the
bound state, and some operations break the bound state. VFIO should also
know some operations on bound may crash kernel because of platform TSM
firmware's enforcement. E.g. zapping MMIO, because private MMIO mapping
in secure page tables cannot be unmapped before TDI STOP [1].
Specifically, for TDX Connect, the firmware enforces MMIO unmapping in
S-EPT would fail if TDI is bound. For AMD there seems also some
requirement about this but I need Alexey's confirmation.
[1] https://lore.kernel.org/all/aDnXxk46kwrOcl0i@yilunxu-OptiPlex-7050/
According to the TDISP specification (Section 11.2.6), clearing either
the Bus Master Enable (BME) or Memory Space Enable (MSE) bits will cause
the TDI to transition to an error state. To handle this gracefully, it
seems necessary to unbind the TDI before modifying the BME or MSE bits.
If I understand correctly, we also need to unmap the Stage-2 mapping due
to the issue described in commit
abafbc551fddede3e0a08dee1dcde08fc0eb8476. Are there any additional
reasons we would want to unmap the Stage-2 mapping for the BAR (as done
in vfio_pci_zap_and_down_write_memory_lock)?
Additionally, with TDX, it appears that before unmapping the Stage-2
mapping for the BAR, we should first unbind the TDI (ie, move it to the
"unlock" state?) Is this step related Section 11.2.6 of the TDISP spec,
or is it driven by a different requirement?
-aneesh
Return-Path: <linux-kernel+bounces-673283-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 2F4A241E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:38:12 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 884C73A4E88
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:37:36 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 72DD328FAB3;
Wed, 4 Jun 2025 13:37:55 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=hugovil.com header.i=@hugovil.com header.b="OanJit2J"
Received: from mail.hugovil.com (mail.hugovil.com [162.243.120.170])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9B2572557C;
Wed, 4 Jun 2025 13:37:52 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=162.243.120.170
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749044274; cv=none; b=eYW7OTGevP/Zzjif6KCHuc8JRABjpLvPVlna9pR3rmgxzRYDe+xFw8Pesd6+LWgJkppWWUx7C08bZN07jwXAkUuLZznMXtVwVYj0Dzd7cxYzBC5kyYmCEy+Rf7Y1nVtUOkwx+P1L/f8HoCgG0tuul5ipv4RCk7myT6MmIyZtRRI=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749044274; c=relaxed/simple;
bh=rW25kGFKF9OW0rXVmccGSvuXOG6b1nRyoTUDa2HMP1s=;
h=Date:From:To:Cc:Message-Id:In-Reply-To:References:Mime-Version:
Content-Type:Subject; b=JN5oDD36XmzRiP9PDsX4b712C7UUeW/U38Zv22C0tdaOb/iROXKQlN0yz9ebIHLMOtusZM8z9630VmYRBIya9qiLQWGjZGC8HvAcb7M+iDOh8xaPI3UZ1L1yUwmIYezWn//l79Lk5+PwoEhpCi16uPqwP0eriEmDFDGl9Iv4CJA=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=hugovil.com; spf=pass smtp.mailfrom=hugovil.com; dkim=pass (1024-bit key) header.d=hugovil.com header.i=@hugovil.com header.b=OanJit2J; arc=none smtp.client-ip=162.243.120.170
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=hugovil.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=hugovil.com
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=hugovil.com
; s=x; h=Subject:Content-Transfer-Encoding:Mime-Version:Message-Id:Cc:To:From
:Date:subject:date:message-id:reply-to;
bh=wyZv9KmZ8ZdATx+EOquAs3+NIy2myEHEKYHxNZgEXhI=; b=OanJit2JpnZYvfrkIw51bNItJV
7cw8Mb8Z94Qn8g9NtLL0E5nZlu8D9ZxOeDRnyumv+qINF7C/XA0lqjhAxGFgr4dv1elr2agTHGH8y
YJlxCVjW+Nj9VlFy4FUax5Wxkt+P2HK013M04fDSQB6LvJlIy/TgVb11sU0uZwMztGdQ=;
Received: from modemcable061.19-161-184.mc.videotron.ca ([184.161.19.61]:38330 helo=pettiford.lan)
by mail.hugovil.com with esmtpa (Exim 4.92)
(envelope-from <hugo@xxxxxxxxxxx>)
id 1uMoJM-0002D8-4F; Wed, 04 Jun 2025 09:37:44 -0400
Date: Wed, 4 Jun 2025 09:37:43 -0400
From: Hugo Villeneuve <hugo@xxxxxxxxxxx>
To: Chris Brandt <Chris.Brandt@xxxxxxxxxxx>
Cc: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>,
"maarten.lankhorst@xxxxxxxxxxxxxxx" <maarten.lankhorst@xxxxxxxxxxxxxxx>,
"mripard@xxxxxxxxxx" <mripard@xxxxxxxxxx>, "tzimmermann@xxxxxxx"
<tzimmermann@xxxxxxx>, "airlied@xxxxxxxxx" <airlied@xxxxxxxxx>,
"simona@xxxxxxxx" <simona@xxxxxxxx>, "dri-devel@xxxxxxxxxxxxxxxxxxxxx"
<dri-devel@xxxxxxxxxxxxxxxxxxxxx>, "linux-renesas-soc@xxxxxxxxxxxxxxx"
<linux-renesas-soc@xxxxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx"
<linux-kernel@xxxxxxxxxxxxxxx>, Hugo Villeneuve <hvilleneuve@xxxxxxxxxxxx>
Message-Id: <20250604093743.b416894b67fcc49b3c4ef9b3@xxxxxxxxxxx>
In-Reply-To: <OS3PR01MB83195CC101339CA1ECDCD6C78A6CA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20250522143911.138077-1-hugo@xxxxxxxxxxx>
<20250522143911.138077-3-hugo@xxxxxxxxxxx>
<OS3PR01MB831999C4A5A32FE11CC04A078A6CA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
<OS3PR01MB83195CC101339CA1ECDCD6C78A6CA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-SA-Exim-Connect-IP: 184.161.19.61
X-SA-Exim-Mail-From: hugo@xxxxxxxxxxx
X-Spam-Level:
Subject: Re: [PATCH v3 2/2] drm: renesas: rz-du: Set DCS maximum return
packet size
X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000)
X-SA-Exim-Scanned: Yes (on mail.hugovil.com)
X-Spam-Status: No, score=-6.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
NICE_REPLY_A,RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS,URIBL_CSS
autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, 4 Jun 2025 12:08:49 +0000
Chris Brandt <Chris.Brandt@xxxxxxxxxxx> wrote:
Hi Chris,
Hi Hugo,
Sorry, one more thing....
> + /*
> + * The default value of 1 will result in long read commands payload
> + * not being saved to memory. Set to the DMA buffer size.
> + */
The comment is a bit wordy.
You just need to say:
/* Set read buffer size */
Like I said, this is related to something that is not obvious, so that
is why I put a lenghty description.
Or...no comment at all. It's pretty obvious what the code is doing because you are writing
RZG2L_DCS_BUF_SIZE to a register.
Agreed, I will remove the part that says "Set to the DMA buffer size".
Hugo.
-----Original Message-----
From: Chris Brandt
Sent: Wednesday, June 4, 2025 7:54 AM
To: Hugo Villeneuve <hugo@xxxxxxxxxxx>; Biju Das <biju.das.jz@xxxxxxxxxxxxxx>; maarten.lankhorst@xxxxxxxxxxxxxxx; mripard@xxxxxxxxxx; tzimmermann@xxxxxxx; airlied@xxxxxxxxx; simona@xxxxxxxx
Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx; linux-renesas-soc@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Hugo Villeneuve <hvilleneuve@xxxxxxxxxxxx>
Subject: RE: [PATCH v3 2/2] drm: renesas: rz-du: Set DCS maximum return packet size
Hi Hugo,
I'm fine with the code, but maybe it should go in a different location.
Since it's a register setup, it should probably go in rzg2l_mipi_dsi_startup() with the others.
Additionally, since it is required to make rzg2l_mipi_dsi_host_transfer() operate properly, my suggestion is to add this to your previous patch instead of making it separate.
Otherwise, it's like you are submitting one patch with a known bug, then immediately fixing it with a second patch.
This also would prevent the merge conflict with my patch that also modifies rzg2l_mipi_dsi_atomic_enable().
Chris
-----Original Message-----
From: Hugo Villeneuve <hugo@xxxxxxxxxxx>
Sent: Thursday, May 22, 2025 10:39 AM
To: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>; maarten.lankhorst@xxxxxxxxxxxxxxx; mripard@xxxxxxxxxx; tzimmermann@xxxxxxx; airlied@xxxxxxxxx; simona@xxxxxxxx
Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx; linux-renesas-soc@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; hugo@xxxxxxxxxxx; Hugo Villeneuve <hvilleneuve@xxxxxxxxxxxx>; Chris Brandt <Chris.Brandt@xxxxxxxxxxx>
Subject: [PATCH v3 2/2] drm: renesas: rz-du: Set DCS maximum return packet size
From: Hugo Villeneuve <hvilleneuve@xxxxxxxxxxxx>
The default value of 1 will result in long read commands payload not being saved to memory.
Fix by setting this value to the DMA buffer size.
Cc: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
Cc: Chris Brandt <chris.brandt@xxxxxxxxxxx>
Signed-off-by: Hugo Villeneuve <hvilleneuve@xxxxxxxxxxxx>
---
drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c | 10 ++++++++++
drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi_regs.h | 4 ++++
2 files changed, 14 insertions(+)
diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
index a048d473db00b..745aae63af9d8 100644
--- a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
+++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
@@ -549,6 +549,7 @@ static void rzg2l_mipi_dsi_atomic_enable(struct drm_bridge *bridge,
const struct drm_display_mode *mode;
struct drm_connector *connector;
struct drm_crtc *crtc;
+ u32 value;
int ret;
connector = drm_atomic_get_new_connector_for_encoder(state, bridge->encoder); @@ -561,6 +562,15 @@ static void rzg2l_mipi_dsi_atomic_enable(struct drm_bridge *bridge,
rzg2l_mipi_dsi_set_display_timing(dsi, mode);
+ /*
+ * The default value of 1 will result in long read commands payload
+ * not being saved to memory. Set to the DMA buffer size.
+ */
+ value = rzg2l_mipi_dsi_link_read(dsi, DSISETR);
+ value &= ~DSISETR_MRPSZ;
+ value |= FIELD_PREP(DSISETR_MRPSZ, RZG2L_DCS_BUF_SIZE);
+ rzg2l_mipi_dsi_link_write(dsi, DSISETR, value);
+
ret = rzg2l_mipi_dsi_start_hs_clock(dsi);
if (ret < 0)
goto err_stop;
diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi_regs.h b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi_regs.h
index 0e432b04188d0..26d8a37ee6351 100644
--- a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi_regs.h
+++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi_regs.h
@@ -81,6 +81,10 @@
#define RSTSR_SWRSTLP (1 << 1)
#define RSTSR_SWRSTHS (1 << 0)
+/* DSI Set Register */
+#define DSISETR 0x120
+#define DSISETR_MRPSZ GENMASK(15, 0)
+
/* Rx Result Save Slot 0 Register */
#define RXRSS0R 0x240
#define RXRSS0R_RXPKTDFAIL BIT(28)
--
2.39.5
--
Hugo Villeneuve
Return-Path: <linux-kernel+bounces-673284-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 3075D41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:39:40 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id E4FC7165C60
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:39:37 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 30C9C28FFF7;
Wed, 4 Jun 2025 13:39:24 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="Udgc5+v5";
dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="bJ59+Pk3"
Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7D79B28FFC5;
Wed, 4 Jun 2025 13:39:21 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.165.32
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749044363; cv=fail; b=DAHE8cQ7mMSzNvDgUXSgexyyu8TUW8YJ8xKcjP2K7ohdfcE7LJ9j6to6Sz2bFNYiVqW513CmB/AjHpyRnJvG/wObd9uftU0gHreCHvOd9/89WS3UvJHzz3vP5L5Bo3EeWGcF6OmS1K5XOIxeydjXr8WXa4F+eunyIl2EE1MfmbA=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749044363; c=relaxed/simple;
bh=JUBFT2hB+wdbq3m67RusJWJN5y5/bwIx/x1qskpxsWc=;
h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To:
Content-Type:MIME-Version; b=S+LdOxoT8MPu0wrw6yfq7x3i4ks6xu8Pj9gQSIphD5Z5z2XNxuU1OnsqIiyLsRWcSgSZadcGfJJtEqEQUp6yukqnB/GNZWor8joRUT5tm88CMnTYxoZd9jxedoZ/zX3p8/Akrdx7kRJMAqIzqb3eTi5T4pVTlveaL9T1T9C4aCk=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=Udgc5+v5; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=bJ59+Pk3; arc=fail smtp.client-ip=205.220.165.32
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com
Received: from pps.filterd (m0246629.ppops.net [127.0.0.1])
by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5549NdZl018925;
Wed, 4 Jun 2025 13:38:50 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc
:content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=
corp-2025-04-25; bh=OS4nuiov2f1CwFLo2xG5JWFdEyt+CwxzpmSC1P4mv4E=; b=
Udgc5+v5usQus1ow3t6RzBJvNzYMN6hNidANgOwMHfG9AksV2flH+6bylZn//WAC
fLhGvDtEv4yeT+Em0H8VEqfgnaxaUAVqMCQPL+k8Py3DJAslV1KqhDWv+D13SfYh
PRaZSBy971gxYpeNBF3gTag42cHBY/fBQkFvuIEDPkdLXbmIeAuvMMkKdDqw33og
JcGHUeJjLnFzEYoRQnPtR2ra/uqQslZ2V8ZeVS2Y6t7HHfur9kAuVFrTDU4sdRcY
Oif9apvY8vQcNaXDl05V8oyIlsfrl5YD0d29HME4BUQsi0sGe5dh3duwaPm5hMzb
68SiG8tN1fN0CBE9taAxXw==
Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2])
by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 471gwhbuy5-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 04 Jun 2025 13:38:49 +0000 (GMT)
Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1])
by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 554DOecG039244;
Wed, 4 Jun 2025 13:38:49 GMT
Received: from nam12-mw2-obe.outbound.protection.outlook.com (mail-mw2nam12on2069.outbound.protection.outlook.com [40.107.244.69])
by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 46yr7at5e3-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 04 Jun 2025 13:38:49 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=CAaYMD+QxJ3WXIpl4J1AuEZjXQJjHSNhFibpoOa3SAXq6jjEWIQp/iYRtt10yv7K47hp2CWVBnQqPfyhsVVzGhRKSNZTMUrXKMG8tyIMXwFe8aWHBONZthRgDgJT9ilFcS7MFNVlOsNis2iLd+nj/KYAVDYmG3VeSoo8Y2D/xUdSvPSlRw3m3sRznCHkRw89sZKwV5B/NqCPpu8XIMAYpwQdKSVKQtF0GtugVFSTMNwfjgmuCYok78gP2a+PFtBhAkxsN+KIQMwY69Gwk09tTvd7z7jgDggEPowEEhHtY5GDHBUBAmCY+mHQ1UWdVZW2EOQyw2CMIs+6kubmuXrvBQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=OS4nuiov2f1CwFLo2xG5JWFdEyt+CwxzpmSC1P4mv4E=;
b=ZR1+6RnLf9sjtRu5qqh5tcGknSOh6PFfQEVj1yxQVjfsPcQ8qckto55NLLdd0kBikgbfWT/sM7AKh+0+vaX42e4s343KKzJVk/rZcxyleOsDw1lpxO2+HlDBROVXuDtec1eVvAsDR5h6bzp4Z26A214tfbsvAR1pFaR9u3hPssF8+ChELWIkxndDFb+/Z/D0y27UPmyOXLsPadyPMxk2bvQCy30Gd7E1lrCUbxbFS/adLiXl9+wuqZjyF+5wzHL4WfDCENMrGePjTAfp2ovoxZrT+1EVGZYiXX2MDBTpntDbQ1e37o/xfwuPWCbNGuuogcFRon4/zqLvDSwcbaJy2w==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com;
dkim=pass header.d=oracle.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=OS4nuiov2f1CwFLo2xG5JWFdEyt+CwxzpmSC1P4mv4E=;
b=bJ59+Pk3SdY0iMNRl38oo49WA7SzukN5DSroNCngY1oYMF7E/k7aMEtI0K62MXeHdgXQxoLKA80fSAB85Zsuv3ndno/9GW7gccSaseOR9POm7BWiCNUNZH3Kkvz86lHyfT3Gz0MNw+PI9PDwPkfxm+TSfEqEq9/FD7vzwWfHaTg=
Received: from DS7PR10MB5328.namprd10.prod.outlook.com (2603:10b6:5:3a6::12)
by PH7PR10MB6987.namprd10.prod.outlook.com (2603:10b6:510:27b::14) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8746.40; Wed, 4 Jun
2025 13:38:44 +0000
Received: from DS7PR10MB5328.namprd10.prod.outlook.com
([fe80::ea13:c6c1:9956:b29c]) by DS7PR10MB5328.namprd10.prod.outlook.com
([fe80::ea13:c6c1:9956:b29c%2]) with mapi id 15.20.8792.034; Wed, 4 Jun 2025
13:38:44 +0000
Message-ID: <c495172a-e4a6-4098-bedf-ec43bf3ddd6d@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 19:08:33 +0530
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH hyperv-next v3 04/15] arch/x86: mshyperv: Trap on access
for some synthetic MSRs
To: Roman Kisel <romank@xxxxxxxxxxxxxxxxxxx>, arnd@xxxxxxxx, bp@xxxxxxxxx,
corbet@xxxxxxx, dave.hansen@xxxxxxxxxxxxxxx, decui@xxxxxxxxxxxxx,
haiyangz@xxxxxxxxxxxxx, hpa@xxxxxxxxx, kys@xxxxxxxxxxxxx,
mingo@xxxxxxxxxx, mhklinux@xxxxxxxxxxx, tglx@xxxxxxxxxxxxx,
wei.liu@xxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx,
linux-doc@xxxxxxxxxxxxxxx, linux-hyperv@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, x86@xxxxxxxxxx
Cc: apais@xxxxxxxxxxxxx, benhill@xxxxxxxxxxxxx, bperkins@xxxxxxxxxxxxx,
sunilmut@xxxxxxxxxxxxx
References: <20250604004341.7194-1-romank@xxxxxxxxxxxxxxxxxxx>
<20250604004341.7194-5-romank@xxxxxxxxxxxxxxxxxxx>
Content-Language: en-US
From: ALOK TIWARI <alok.a.tiwari@xxxxxxxxxx>
In-Reply-To: <20250604004341.7194-5-romank@xxxxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-ClientProxiedBy: SI2P153CA0006.APCP153.PROD.OUTLOOK.COM
(2603:1096:4:140::22) To DS7PR10MB5328.namprd10.prod.outlook.com
(2603:10b6:5:3a6::12)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: DS7PR10MB5328:EE_|PH7PR10MB6987:EE_
X-MS-Office365-Filtering-Correlation-Id: 87a314be-ba50-4cd5-8f66-08dda36d2019
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam:
BCL:0;ARA:13230040|366016|376014|7416014|1800799024|921020;
X-Microsoft-Antispam-Message-Info:
=?utf-8?B?QllrQ29OdnJZVHArQ2dRT3hwUHhPT1J5SXZIS1FwVzY2V3hLS2FUSVlqU2Rr?=
=?utf-8?B?dng2ZzlGLzIrUVQ4WEVNaDZwK1JObytwR0JiR0pwN1p0K3dwb2tmeSttakVz?=
=?utf-8?B?Vjl0d0NBZkNmaUxvQldBaHlBQlF6Y1RuSkJqU2JxUlk5YmNOTmNNT3FrQXRT?=
=?utf-8?B?ZVFiQ1JQdGZNUlR4OER2OWZ1R25KVmNZMHBlWUFWQjNWQWQ3RWZBSDFITUs2?=
=?utf-8?B?eERsLzhwMDhaY1JmbGYwSWlNU1ZmYnFLcXliQ1pmTTg0UVRPak1tUnAvZWZX?=
=?utf-8?B?Y0xISWtVZnRHY001OXJVaWVxTnE5SGxydGJHNjJQSTd1eVlIaGE5VERua0kv?=
=?utf-8?B?WTBjUmxpTVU4cGxod25mRXFIcDZMbU4wSUxMSGxwcVhoU2tyV0hxRjZyRm5J?=
=?utf-8?B?MmxaZElDbVJ2TFFmUmltbE9IbUNCbHA3SThaaUNYNTNNaUJlTGhsdWhIR1B4?=
=?utf-8?B?NHdTeHdJYWM3MjJsT0drV3ZFMC95LzNibUE4TGFTdHcrbVpWTC9aOVg3OFJY?=
=?utf-8?B?Ly9NL1dUYmFsL1RSMkErdFB4MFgrUHE1Q2RWQ1pBMGRiUDByelZMWC9aWEli?=
=?utf-8?B?K0tneXVpanQrS1FLenhkSUZBRzUrT0dXUitLbzFIZFArZlM5R3dIVXY4UEY3?=
=?utf-8?B?RXB6RnZtMHBwVGZ6L2YrdnhSZ0g3aTlEVkNtRWN5REQxMXZOM2NuSHovdGZt?=
=?utf-8?B?cEwrZElYSlVQaW1KUnRnWVhhVzdONmUycGdleEVNbWJ6M3krRmVTM0NUOFBO?=
=?utf-8?B?cDZOVTdBTWZHOWlFeTFmeFlRd3BsUFlWclJMdHVWUVhrSEZ3SVVPcFFVKzJ3?=
=?utf-8?B?SVMvcElwYVhhWG4xc0RGWExmeWNkNk5zNWJiSTdCV1NYMDVrd090aGxTaVg1?=
=?utf-8?B?STBORkVwUWRidlh0MFhtTm5DUFRTTmlFY3AzNHFmYkRNRVRxVzBhVG1HUmJs?=
=?utf-8?B?WS9RM2JvSTU4R1JHZWgrUCtNb3BRVFRKTDNDRThvZGx2U1J6TEUrVi8zcnNo?=
=?utf-8?B?cW9PMy9SUklCMDdtUVVsWkUzYjJScFZwMGhyektLNENTOG00b3YyQUdTdUtD?=
=?utf-8?B?d1ZucjZybk5aSWpYQ2p0ZlVzK1FlMUpsUW5WczdNdUUzOStFTytmOFVmT2RN?=
=?utf-8?B?UEw4VkRyR3YvZFViMVNMcFo2Y1p0NEdVQkw1VEdKd2kvV28rdWVmUElnbHdL?=
=?utf-8?B?aHZZRzFRWUZpYTgxeDdLL0k0TVJ5Unh1RGVmUHZFRVhHUEthYmpMcTQyN2J4?=
=?utf-8?B?MHdCWHJvT1RyNFZjTTlJSWZGUW92ckhFc2lESW9MWmlUMXZ1ZFgvSVRkMXhS?=
=?utf-8?B?dFpqZnFlNmF5OXhnSXhRdVAzbEE1dlRVZ2t2a2MrTVhmZkhLem14SzlybjNN?=
=?utf-8?B?NVQzTTB2YzlnZ2JBVmJNMkkrS3NXMm5YZGlObThabHRiME9aaGl4Yk5mcUly?=
=?utf-8?B?UlcxNmloRnZVTGZIQlpiZWs4T3k2bDlxRUtnS0hPTnh4VEQxQS9nWWtQeHlk?=
=?utf-8?B?am5jQk5FWHFrSWtYbzExWTdvVGVSRmJzcDFLQkJtcFUrZkE4YmZnQTBrdXZp?=
=?utf-8?B?NElLTlp5MjZPdDRubkFZYzhZMGUxUnVFZ3R5MzFURnVNMDZxdnJpdXd3QmVj?=
=?utf-8?B?UjJXQ1RRYzFKUXRYdEFHREt6ay9ubUdOS3h2aW93Z1hUMGFOWFMzUkdxY0xE?=
=?utf-8?B?dnFJeG8rdXRPVXgrRVRMd3E2dEF2eGgxaEVENUJJclp4dVB0dGNuMmg5Y2lv?=
=?utf-8?B?Uys0SWVqMTRZbTYvV280SWxNdko1eVd3VE5US09WK0FVWkJDMjFzbG8vZXZq?=
=?utf-8?B?ZXBjVWVMZGRXRHVEZ3RkeHU0MU9ZNGhXejZVNW9VcVZKTmdwZTFrMGZEcUg1?=
=?utf-8?B?WTBFWXBYWDhYUm91dXArcjJ1YXpNTk1nRWhMMVhkbG5DcGdLR3lZZVIwK0dE?=
=?utf-8?B?Z0FIc0ttMGFmNDdCUTEyalBUYUlvYzE2a1Y1dUowb21HU2pFdFdFM29LUmYv?=
=?utf-8?B?NlVWcTh4UXhRPT0=?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR10MB5328.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(376014)(7416014)(1800799024)(921020);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?utf-8?B?SVo4WFhmZGhHdEJvWHZZbjA3MDRpOTBvaDgxNlh5UlcxU1VTVTVEenduYVhF?=
=?utf-8?B?ZkFhczB0NlVaWXpoQ2dianMxU1NsOUpFalpMRGZPUlVBYUFsdE5vaW1Bc0VR?=
=?utf-8?B?K3dmR2ZVNG5GNU53bHJXOU5vcmZya1k5ZDMxM2x2Y2orb2Q2WHYyTnJPbXFX?=
=?utf-8?B?N2tVc3U0d0Z6bUdHZDlSZjdNRDhLdkpFRjRYK0JSQm9GQ3JmMFVSZmg2RTBm?=
=?utf-8?B?U01kbk1TWDltK0R2RE5wTG1EWmgvWlpRVi9PYVRqeTFVMnBMa2dVL0FQOFFq?=
=?utf-8?B?MHpEcEZkblhTQnppT1kwNlJpNWVJUTdQc2VlbHJyRWoxUnpnbWpPa1BIRk5i?=
=?utf-8?B?eXlZeHdicUQ4RmIyamRUTVVzSnNRSFYrRmNieW5JVW4xRDNmc2RZYUtydFdK?=
=?utf-8?B?MTZrY1NEZFFIWlU5U25aMW9vcVNPSHFIMzN5SXExcUhVVkhMS1gvTlYvbDVp?=
=?utf-8?B?bkVjWWY4bU5yYVVzdXZZR3dLVmhEOHRZL0dOMXNEMC9DWGFFQjIvMkhvMzhZ?=
=?utf-8?B?c1BWNlp2c0RiOTZ6ZThBTDl3WjhPaEV1NmY5eHN1UFZOcGVZOFdmb01UdUVJ?=
=?utf-8?B?NHdGUTdNVkoyWjVXMEJsWEFzaktmWWx2RWpGMWVMTmVDQnlLUWV6ZEt0ZXE2?=
=?utf-8?B?WlROK0xjOXJtMEFDZVE5L0RWVSsyMmRZcThjNW9IaEdYOTQ0Uy9GcDF4ckF1?=
=?utf-8?B?MUhLYS8ycmF6cE9QRUh1WWhCSEU5QlVETjRjeU1vd0lHb25BREV3bndpZUFv?=
=?utf-8?B?VG1rVEx4TitldUZRQUJnVHhra2I4TjhTOUQ2THFhTUc1TnA3ZXNIQ3RhcFpp?=
=?utf-8?B?ZGJ4RklLVStURDYxVlorZTRIVEhnT2EySG5XRlltMXB6SFllblRvYUlGSlB6?=
=?utf-8?B?NXdpaytWY00yRHdzbS9lSEQwTXZ5M2lBc3NqbXNlZklPYU9nSkxGRmJLMi85?=
=?utf-8?B?Ris1RVVndnR5ei9ML2hHSnMzNitKbWg2akZzMHRDYjVad3RKTVFidEEwUFQ4?=
=?utf-8?B?c0dMTmVlMFBlOGY4T3dVZVNWNElONjc4Tk81WEVYYnUyVzR5L2pKNEd0ejFi?=
=?utf-8?B?eHlXeGtDSGpvc0dLZEtmVk43ZjZBWSsxeVM2Zk41M3BQYzVTSXlPQ1dHalQ5?=
=?utf-8?B?UUJuVHlZejhiSUhJSXh5MEs3Y0pGbStlRjE3bi9CZmdldG40T0NiL2taUVhN?=
=?utf-8?B?UFc3bHU4c2JEc0VZb3NvK1Rya01ncWQ0UVcweGFyZjhsWHdTNG4rYmtadGpG?=
=?utf-8?B?L1p6M0c0eHFiRDNkMFYrYU0yYkVENlBBQm1yWk1jQ1lLVUFZNFRvT2Rnbk1n?=
=?utf-8?B?N1licVVxdTlUaDhHbVozMzhuNHZYOThJeTF4SUlPeHRXVWlMY1RDOUdyTHVx?=
=?utf-8?B?TFFOcElDV0RvU3Nzdnc4NU5NUUc5TVMxWG1uZlA4dVJURm4vSTI5dVdCVFpQ?=
=?utf-8?B?aFA3ZCtIeXl2d1dyK2NpdE9vNHhzZFNabS96QjYyYmRkOTJzVG1kbDlDS2Q4?=
=?utf-8?B?VDZHNGhWVVlGc21OZzFrN2JOM2p0WUovQjdFczFwWmZtWlF4NVFiUitlc0xI?=
=?utf-8?B?M1ZtR2MzRHBVelMreXZRTi9rb0xYcVFiWHRQcjBFT1RhWVdQb0xMMHFTOE91?=
=?utf-8?B?d2VsQSsvdzNRL1FJTG5Tb05PUFpwcFhLeHVuSzU1UXZGMS83dElnbWlYRXhU?=
=?utf-8?B?RmtzcEtCQ3JYSzF2UVFLUlA5Y3dRUUNHWUhodjVVb2JOQVVHb1dhZURtUmVH?=
=?utf-8?B?MFhvNzNyOWhVWDczNU1TYnFYQnd3T0RqbnlGcXBkM1dwSTh0b0NjUVFLYXhk?=
=?utf-8?B?KzlIOThRUlNBZ3QyOGJHbUFpbHhRZHZ6cnRPZDYzWFRNS0FUckppWTc5OVpJ?=
=?utf-8?B?all3bVBsRU52aGt0ZjlyTS9SbFNmeXhUZ1JBQWViMVFINVFqdm9iZys1Vy9Q?=
=?utf-8?B?elpkV002cFFhTFA3MEo5L01zVG5ZVWl5am1NV0Q3by94YUpZc1V6RWF5Y01V?=
=?utf-8?B?MjBGZmFTcEprZFRzK0JZQzFoWFRJamxCbUszYXg0NDhXQXFaS0l4ZFFScWUx?=
=?utf-8?B?VHdUN3pqQnhJQktvTm9OZG5KKzBFUnZtWnRkOW5mWktlSk9SZWN1MlpFNVAw?=
=?utf-8?B?R2pBMGpMWUJSM1RjREVLQzFxWHlBU1duSExTVzFrRVdsWUVybXhJMEtOTitC?=
=?utf-8?B?Smc9PQ==?=
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0:
ktLFO+t4BJ9OWr77l1eETXp6Rw9DUonTPvMMOZl6Mdyz0W9og/X3ZJtdGDmdqJ1GrTpDMKIjHv6sRAommaS+5XYuI5ktGnww2MisFj4l+LKymt3DYQD7P1bUs4Sb6Jx5+kAoUq+daBeYB0UjHL7J+Gef0tvELPA50U46qS4nZO7iviXWS+7WDEwTC2fKEkBswDVfcw/8KQ/TJELdcMx1TqyCXc4glNn++iwDHjKb1oISWp81OZkbDVj+jvdXppbPZUt6afe4cd6Hk8uPrenSKAaEpm0cbd9z7C6s9CxRdzsZR5EQxuUJzcXIZQfSHYuvV64UxcXYB1ZEGrsnHJ/dr+KsjtqXf3P4C1iPaMAva7+mjVjWAzC+kvXjhy+rHOE3tErCpaEBAte7hdHsV0fwYfzrD576nmaNULyM7buRor1WjrdaVx/0o4BrkAYBCDv/KbucDxr0J+esnF+FfO8Jr3LsJKf4h/NCT3hdvE+Z5ToihvFrNBfobFImXLS4V8HCkP1XEYVu1EGxz75V79AlHxLg2b8pWYMBxmKtWI6ZWSN3/m0PGr7cfW17YU8rdrcmdhqppMbUh8xaQiHTlFyt+iiNVy/Azh33j3USZVV9i7E=
X-OriginatorOrg: oracle.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 87a314be-ba50-4cd5-8f66-08dda36d2019
X-MS-Exchange-CrossTenant-AuthSource: DS7PR10MB5328.namprd10.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 13:38:44.5514
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: 3s5sqMFjhbLPmBFmdl//Qu2cqr4TazxZKH8FXafBRZP5QivpLuKqBJhkF02ukzHZ5jP5efjtEDTWT5VUU2M2V5M8wg5JKrHnmmGt/WnJih0=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR10MB6987
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 bulkscore=0 suspectscore=0
phishscore=0 mlxlogscore=999 adultscore=0 malwarescore=0 mlxscore=0
classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2505160000
definitions=main-2506040104
X-Authority-Analysis: v=2.4 cv=Wu0rMcfv c=1 sm=1 tr=0 ts=68404c69 cx=c_pps a=XiAAW1AwiKB2Y8Wsi+sD2Q==:117 a=XiAAW1AwiKB2Y8Wsi+sD2Q==:17 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19
a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10 a=GoEa3M9JfhUA:10 a=Nim5RqO9NaB9tkb52p0A:9 a=QEXdDO2ut3YA:10
X-Proofpoint-GUID: 71OSz3VO4KeedtL3aLasBToZXJ0IvsIe
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDEwNCBTYWx0ZWRfXwKgRSwg7jeBF VvaZQdiQ2soOdudcglpc98vxLUGhFL0gVcebFQTEVw46aCCTiAnoIr+qFeHVkcGUeeJATZUcM1V BT6pFD02wZbXCGht1IhHeqTri7WpRKIV+JK9E0WTL+95mAOb5VBpAdTeQck2+HenPe6fib7SOba
PMh8LF60pHe0ZOlrlcbess7mt+6tL9eIFNZgJ80COUxqpL09xW2KLd/UlbocfS0DXkxQaO0Mnj/ iUeX6eVcRz+Bmc3hLQXLPVE1Jd1VxOC23gthAF+B1Gl3clz2vKClYX4h2gPOEazVCo3qn8YL8SA evrW1fRTZKQF8QTqbwY/dcF8XnXQYsKU7NQEBu+6WB93rqmWPAhwjCNfP8ImmdyBW4RW7U0xUi0
wptnSnaaN7Wf8KSNWaSLLP4VShyYKAk/XkC716x8/Wj6B2+dwPmaPAdUtTsR4NxVwY9cxyHH
X-Proofpoint-ORIG-GUID: 71OSz3VO4KeedtL3aLasBToZXJ0IvsIe
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 04-06-2025 06:13, Roman Kisel wrote:
+ /*
+ * Write proxy bit in the case of non-confidential VMBus.
+ * Using wrmsl instruction so the following goes to the paravisor.
wrmsl -> wrmsrl
+ */
+ u32 proxy = vmbus_is_confidential() ? 0 : 1;
+
+ value |= (proxy << 20);
+ native_wrmsrl(reg, value);
+ }
} else {
Thanks,
Alok
Return-Path: <linux-kernel+bounces-673285-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id EA40D41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:40:41 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id D2D15167333
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:40:42 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 15FA828FFCD;
Wed, 4 Jun 2025 13:40:35 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="MuTOCbF9"
Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id D4DFEB661
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:40:32 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749044434; cv=none; b=BCbxd1sCnG7jqxMjAL80GzW4qHVjeJFqfyRhP8adkofxF1Qkj6gzXanN80xuep3dMfn3y9btRG+UWQqbG1UlGi+Gw1LOWYWgiS9Pg6EqWhS31Y+kQScR2hwsOa8n/lg8k281KqqeUo3BjmlHVr97TxIFaAIJ/qCzv7lLm4d8lDs=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749044434; c=relaxed/simple;
bh=Qjb7+tpwfSVqwbR+01+vMBlCKspqono/piLqhjhXs30=;
h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=P3S3XyVvQE2t+eE9IxIFkwX79IxETJjhWClhuvR/cK7qjs2jgq0WSJk5bwFTtdGu5cCys9BoGo5oBCtGVEcOitRr/BWk8CB62Jfw4QedzVnd2C39GkalW5NZt10e5+H8IlCgQ2DOkUiqx4xXGyvDQVIpb5o4QJE9IQKEe5MBQok=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=MuTOCbF9; arc=none smtp.client-ip=205.220.180.131
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com
Received: from pps.filterd (m0279868.ppops.net [127.0.0.1])
by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 554AhvAN023175
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:40:32 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h=
cc:content-transfer-encoding:content-type:date:from:message-id
:mime-version:subject:to; s=qcppdkim1; bh=YxxLPwj1UiNyXkoEDKvafX
Ll3rBkfGqCX7S59SAmyQQ=; b=MuTOCbF9DUju3iBBezNEdfXWhVDkNyVvjtIIi8
7jYvQNp4W033lsZMdSoTZOR5uw7WwC2BZBaApswYPT8Aik+i6PtDDnMMV+YsVdEa
GJyZs5khuWGu+whU0nMgs3pkmIylQ6o+uBJWBYbDEzB8s1hS1C06P/qa0ugc2/BX
9Vi1O+cP1RBwaqdK8ZWvnB6marBObsK4/JqzylhSDAZQYBxRsvha2gRuKNcfFFM6
4O6ejiTDzR5WDPbpHAdbgioN2pSDEmDTzFiHQ1TT24FL/708K4F+KLsyzzyEsT0W
y0mk+mktIfZx98DWl8/NTBH5eBeiNd5tPhX5zxF/c9cU0ZVw==
Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200])
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 472mn00ehy-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT)
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 13:40:31 +0000 (GMT)
Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-7c5d608e6f5so1742828785a.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 06:40:31 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749044431; x=1749649231;
h=cc:to:content-transfer-encoding:mime-version:message-id:date
:subject:from:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=YxxLPwj1UiNyXkoEDKvafXLl3rBkfGqCX7S59SAmyQQ=;
b=X17SUEKtkHYFDAamX1BWjxT3c0y//QlK9XBRn8McC5ocFSUe+p1Bq41UmvAT2gcB5d
mtII/Ok5Hvb+Yv6HTc19nWGGLOwvGh5C9dUKYmfZJEuGamciVRtvAGH0Qn+51BMInUWK
pyhBxx4iz9Lz2Do3lWhWcSRtgdIDvZcWbdjXlWTz9j0p4ziHiMaaeQQ8kwlaftz4VczS
fT+r1AGyc8WhOrTpCmXp1rBqaO7/+866sNKrEkubWKwsRVv2JcADfPEC/jEsrF/E0GHK
7xFEf/MD1/4NZyBqXNFsz8A6zwrrg+68kKunQNgVqrBN1QjcO5Xj3xAM8UrqkR7MfknV
gxWQ==
X-Forwarded-Encrypted: i=1; AJvYcCWA9//kavZYau2a90QOWWUKRSlbrAaTybLerckm3Tn+WQOp65lafk7N7qzW8RnNe9gZwJviovk0FmgLOiU=@vger.kernel.org
X-Gm-Message-State: AOJu0YzsNb6NOGlK+xcstAO9ScQDzlsjCLC1iZQZteTwuCPXE1aMU8js
Jix3V68DlzBK/8BziNz79IGKOK6+rv6o2fyGzphm2l35V1FIFcdgyjg2u/LblIS7+1MkGwbZYj/
31Z9OcArjvH+nOdco2tbk3IYh7/OqiiXK6mCyLnHtb2K1by09tkiLFO3Kkd95e4sN1u3bWG4Ssx
3rYg==
X-Gm-Gg: ASbGncsh8ns7OmvRaZI+FU8Qm5akTJfRvI4NonkoyP0VgkrDjaqYU3yHwll/3q7/BS4
OD5EbPjtNBX9EE1W03BUXnWOtOQM25O+0spUE2uIeHKs/SdTcQzD/TNwoI5gFDkCNM50AX9IS/i
xhr6XpG4aG84e3i5UZUDnsTDmC7hGb6pV/2lndULwk3Aedj3mupVCttMVxS/fJ5AqlxOnmJNJV7
xEYhIC2BB+znAGYdDZ3LXXn5HIyCzphhU5e7Smp2WoQcfjyrI13BFXzTXr+aa8UfbCK1WEgYNI1
ttyrq8tO9YR9+2DLaURT/GHMUKC5pHo1kNCh3L2AggfvSDcE3mbqbJXUzoIDRbJHWsSQItXBJwA
e6leHjSEjz3hWG9R2jblZELka
X-Received: by 2002:a05:620a:480e:b0:7c7:b5e9:6428 with SMTP id af79cd13be357-7d219892888mr467188085a.22.1749044430661;
Wed, 04 Jun 2025 06:40:30 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IHgJ/37/ZNeU7HPTqk6ukQbtmVMJRA9O3OkbH6dEHt1cdzVkbB5M/nPhHoPPto2ePyW7sAyKA==
X-Received: by 2002:a05:620a:480e:b0:7c7:b5e9:6428 with SMTP id af79cd13be357-7d219892888mr467184685a.22.1749044430334;
Wed, 04 Jun 2025 06:40:30 -0700 (PDT)
Received: from umbar.lan (2001-14ba-a0c3-3a00-264b-feff-fe8b-be8a.rev.dnainternet.fi. [2001:14ba:a0c3:3a00:264b:feff:fe8b:be8a])
by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5533787d376sm2311966e87.28.2025.06.04.06.40.29
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 06:40:29 -0700 (PDT)
From: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
Subject: [PATCH 0/2] dt-bindings: arm: qcom: document relationship between
SM6150 and QCS615
Date: Wed, 04 Jun 2025 16:40:27 +0300
Message-Id: <20250604-qcs615-sm6150-v1-0-2f01fd46c365@xxxxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
X-B4-Tracking: v=1; b=H4sIAMtMQGgC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE
vPSU3UzU4B8JSMDI1MDMwMT3cLkYjNDU93iXCBpoGtpbmhoYmlsbm5inqQE1FNQlJqWWQE2Lzq
2thYAtNmsw18AAAA=
X-Change-ID: 20250604-qcs615-sm6150-97114937747b
To: Bjorn Andersson <andersson@xxxxxxxxxx>,
Konrad Dybcio <konradybcio@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>
Cc: linux-arm-msm@xxxxxxxxxxxxxxx, devicetree@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
X-Mailer: b4 0.14.2
X-Developer-Signature: v=1; a=openpgp-sha256; l=830;
i=dmitry.baryshkov@xxxxxxxxxxxxxxxx; h=from:subject:message-id;
bh=Qjb7+tpwfSVqwbR+01+vMBlCKspqono/piLqhjhXs30=;
b=owGbwMvMwMXYbdNlx6SpcZXxtFoSQ4aDz5lZq3037umzPt7EZeNR3TlRWZz9iHRS18QdXPNOa
4n4K8l1MhqzMDByMciKKbL4FLRMjdmUHPZhx9R6mEGsTCBTGLg4BWAix6w4GPp93krYPSoSvb5s
0i+P6W2dWtffPXFkblbW53JofMnzYV+Gfe9vsQlikSybv3bZb+Jn38zU6dm0Qp5teoMox5QkR5G
zs6VvNc9nS13B4fE/5laX7E2zgqP+chLGsptXJgSffsUgHcuYxNX1PHT5tE+FLMGnK3KiYtO39b
bvYSuyO68RXjRfMLhLhs8iRnfhn1vmtS7dvg9t0nfdeX67yKGE+4Rct9ijLUe/rTrtc1ho14lra
ctu2h9Yvevnirvex2dbGul0NmVemHZlVT/34dUpmtJz/zYyZXq8cFvcyKvrzipSdctmOXPlxE/7
lCf87FVZLcOxb+WM9Ve61tg+XrRX5eHz3sn7q9S0Oe1kAA==
X-Developer-Key: i=dmitry.baryshkov@xxxxxxxxxxxxxxxx; a=openpgp;
fpr=8F88381DD5C873E4AE487DA5199BF1243632046A
X-Proofpoint-ORIG-GUID: Tj6K7FSdqUYrKzdpr4Gl7zKyoh7ynars
X-Proofpoint-GUID: Tj6K7FSdqUYrKzdpr4Gl7zKyoh7ynars
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDEwMyBTYWx0ZWRfX0crG/aHdjs7Y
3K3SvkaUONkr1FoZCAy5H/IGxaEyOYft2fNtcBWfyxCsFdGrcKyY2T7KcecnYVY5J98ehMbe83w
36kaCngzOFJiUjyyEN97WLRxqSuVjV2lfEp+TLS+p8jhatB0g5vscadIEF2FRD25toaXLRnLZZk
RCBQQo2CK0q7RyX4i7uoAmHVEUv1YimfNfPvZvCXjABHQSgrw4l1covFyBp0XBAtMgOGbDi0CIv
oMgVYrgzhg1IM48fSVpSWKNXkbTnLuRhiDC9clBYYzsxSbWO3ElLeCViuMYcD/q5YMP17KKB5Om
qmlpH+cf9EFoKTc673TKEJfqzufh5oyljIHXz3h3tTEXCcsEC1b2CswOCP46MDQJtGCKMVSL4Ke
hEGSGrIHyptwj/Wob4J1HH407doJI1OkcR20YsU36XB+d3g8wpc1xeDiUSanOuDf91ei1vR4
X-Authority-Analysis: v=2.4 cv=Y8/4sgeN c=1 sm=1 tr=0 ts=68404ccf cx=c_pps
a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10
a=6IFa9wvqVegA:10 a=EUspDBNiAAAA:8 a=Kp08XIzUypDThVJKgkcA:9 a=QEXdDO2ut3YA:10
a=PEH46H7Ffwr30OY-TuGO:22
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
mlxscore=0 lowpriorityscore=0 mlxlogscore=711 spamscore=0 phishscore=0
clxscore=1015 impostorscore=0 bulkscore=0 suspectscore=0 priorityscore=1501
malwarescore=0 adultscore=0 classifier=spam authscore=0 authtc=n/a authcc=
route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000
definitions=main-2506040103
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
QCS615 SoC is based on the earlier mobile chip SM6150. Add corresponding
compatible string to follow established practice for IoT chips. Rename
dtsi file accordingly.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
---
Dmitry Baryshkov (2):
dt-bindings: arm: qcom: add qcom,sm6150 fallback compatible to QCS615
arm64: dts: qcom: rename qcs615.dtsi to sm6150.dtsi
Documentation/devicetree/bindings/arm/qcom.yaml | 2 ++
arch/arm64/boot/dts/qcom/qcs615-ride.dts | 4 ++--
arch/arm64/boot/dts/qcom/{qcs615.dtsi => sm6150.dtsi} | 0
3 files changed, 4 insertions(+), 2 deletions(-)
---
base-commit: 460178e842c7a1e48a06df684c66eb5fd630bcf7
change-id: 20250604-qcs615-sm6150-97114937747b
Best regards,
--
Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
Return-Path: <linux-kernel+bounces-673286-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 6B1D441E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:40:56 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 90569164DC6
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:40:57 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 39C1D2900B0;
Wed, 4 Jun 2025 13:40:37 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="SXOvKTaz"
Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id F152428FABE
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:40:34 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749044436; cv=none; b=FNTzH4zKX9bUzXrjdnqCiLBeROOjYxddR3eYqouD+WxLS+n2ry7q9/+P50rteaACKH0sMx+u6Ih2Y2T1Zb8aT1ns12DHdfX+DHp1ZuBGLU0ngbfbF13iaqtR8vrkH3e50yPHdFtQsHvFnbd+gBmKBU9VG+MJ/Q0nyf63FP6YNK8=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749044436; c=relaxed/simple;
bh=QYQoyP/GIqzyc5A2IeL6llc0Sso66L78LWHvbYzZxoI=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=tuhQqdr+axdUutzg7ypUugjofhAqa0bQzG+RJGgEMaYP9a+/nJktnlS9sdz3zaVT6l6PIMD1Ua8AxS2jDVGZNqYyo9hOJNWsgQfQYM1QcX1xnmilltNIXN93D7BM9OkfqkwdP76bYJGQVrHIm6MAs//tBzZsx86iihpBz+ofmDs=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=SXOvKTaz; arc=none smtp.client-ip=205.220.180.131
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com
Received: from pps.filterd (m0279868.ppops.net [127.0.0.1])
by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 554AhdK0022400
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:40:33 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h=
cc:content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=qcppdkim1; bh=
uXmKJiGByL9+ymVDz5ljTwOGyAtWHSmObA8IFGGphwY=; b=SXOvKTaz0v5cjPdQ
LWvUnG6eN3B/1GqCHWln7hDPQz60lZZOtsnmeoYCbeB6xSrzX+JSp2MBOK72Fe+H
NbhuTjO5IFtekMlDG+szCMbq0bDSusA+u3oIZgbFsTKx6Ig1nCEBUHymg4uo+6pe
nOySCKnt30Ioc22FG2w9crXzRFMg+kPVp6K2UwsyXsd6j8+Poyv8gRx8a/kdyrdV
/LtfFuJUOB7dqsjnm7i7GyNvzl8y26JFp1vzWOtjthCWRn6Zcg6Yx/sAwAUcEj9K
4uhq5mtIA34/bNf7wOBBbMeaCM8IYoqk0nhClkXWKF8RZJDHt6gEhfSr1SxXvowM
LAehXA==
Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199])
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 472mn00ej4-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT)
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 13:40:33 +0000 (GMT)
Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-7c5d608e703so1222072985a.3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 06:40:33 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749044432; x=1749649232;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=uXmKJiGByL9+ymVDz5ljTwOGyAtWHSmObA8IFGGphwY=;
b=Zl1fGlssf4Hw57uZuShkkYitB2Zt9P3FuXdcLDIf1s/RaluV6k7KS8J9Uq5tR+cdoG
g1nCi2ktDuR1J6motNZFK8HSOAdzB7/3iAJYZbSPQIaRFAwzm5c9iEuiznVoKLlkKXY8
IBdfA3klf8evgXxMilw/g3nOYcYwdvIFgoU6NVvSjJ2EgOBIrKAGdWfSGz0CNkiVYFdN
Iof0KKKJut038fiXvgmuQC9m2d9uK8nFZotsLyDa7b5KyElQUTpk7NpDgQGKf84WP6oi
Kuf4rWffMBk80RRdTO680M00MNe5pUr5JmsbG9pwp+PGxEYuTvSfMkOik/i2Lsv81UbL
m0XA==
X-Forwarded-Encrypted: i=1; AJvYcCWXh4JfYHdWjBhg22qjjUuA3ioojaazYXy0dRP1eKXZJTxJmNuzWGy/7Sw7erBgkuryR6VvI4yQ9a9gTh4=@vger.kernel.org
X-Gm-Message-State: AOJu0YyotOxjWC57w9oMerC0hN1sUaW+3iyGRFr+VqGkYxjXraygg8E0
c4kWpzMEiHaZhIaxC4SRhL6wigC07Jt/icS03vV7fWvvzM8kfDelbgjpXe5zT+2w7DRC4TnUVrk
HEz2QoAG5G16l8HFOFirbhtdA0XhpIA3pPJVBoVGzRpr0l3A9Gc2CYG5PxctoRHv2YGmHQfbSb4
o7/w==
X-Gm-Gg: ASbGncttQDsJrCI3aNHpMzLVqYXE+lideKsbg1Lx//bNg1eFNbQiAbHeyY+TUbVv1+J
ZtLLnPPq1kv2AAOnuTLp4MDvS0xZfkHW4H6972Go1O2ZZ74RKQ//OZgmhlLiVnh5Fs7jUNUFina
m1BmMHRIw6DVSeK2p/zkzDeLj02o67Vw+UP25ciVwDKm2S5h0ZIN2KMQWtxKJSt91Lc/0g5pQgm
x/6v0VbgleHaodoQvTIb3NBuhO/6TQd9lPV2+R0aNtuFUz8ZsP5Buc5+dy9LkgCI/dzF48kfQQ8
LS08gBsLJ6cUGhc1ejqVTI+OhRujNFj50uMrPoao3BAMzUpYVy9Kn7H3f+qsKmGj2I6tD+sVzkH
AZyvhYkhsOMfjOxoxkH/6ljeq0iAmHm4idQ4=
X-Received: by 2002:a05:620a:2901:b0:7c5:5d83:2ea8 with SMTP id af79cd13be357-7d2198e0590mr457241585a.34.1749044431982;
Wed, 04 Jun 2025 06:40:31 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IGDuyyL4+BjepdFfkjsfwG/61Ndc2lP8nkESP6Honv24RSwh/eI1oIYSxqNNfv+mwA7d58ZCA==
X-Received: by 2002:a05:620a:2901:b0:7c5:5d83:2ea8 with SMTP id af79cd13be357-7d2198e0590mr457238585a.34.1749044431669;
Wed, 04 Jun 2025 06:40:31 -0700 (PDT)
Received: from umbar.lan (2001-14ba-a0c3-3a00-264b-feff-fe8b-be8a.rev.dnainternet.fi. [2001:14ba:a0c3:3a00:264b:feff:fe8b:be8a])
by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5533787d376sm2311966e87.28.2025.06.04.06.40.30
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 06:40:30 -0700 (PDT)
From: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 16:40:28 +0300
Subject: [PATCH 1/2] dt-bindings: arm: qcom: add qcom,sm6150 fallback
compatible to QCS615
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <20250604-qcs615-sm6150-v1-1-2f01fd46c365@xxxxxxxxxxxxxxxx>
References: <20250604-qcs615-sm6150-v1-0-2f01fd46c365@xxxxxxxxxxxxxxxx>
In-Reply-To: <20250604-qcs615-sm6150-v1-0-2f01fd46c365@xxxxxxxxxxxxxxxx>
To: Bjorn Andersson <andersson@xxxxxxxxxx>,
Konrad Dybcio <konradybcio@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>
Cc: linux-arm-msm@xxxxxxxxxxxxxxx, devicetree@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
X-Mailer: b4 0.14.2
X-Developer-Signature: v=1; a=openpgp-sha256; l=990;
i=dmitry.baryshkov@xxxxxxxxxxxxxxxx; h=from:subject:message-id;
bh=QYQoyP/GIqzyc5A2IeL6llc0Sso66L78LWHvbYzZxoI=;
b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBoQEzMFeLTQxhYDg4DSgk92Iv9ppADpsOoZ48fe
U3X9NrCCNCJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCaEBMzAAKCRCLPIo+Aiko
1XYVB/sF/4CuY8yvhkecvGbvfYCcZX81/DpAcY31MeaUso8Ivh4uYY5akj9zHA+IDd3+i8c0vRf
1+57cSCy7TB38GC2dQEiDpeHfctPiRL0mjQyGZkaUBG6kS5owGAfJL8HjVGtUdGNHrz2vDa7mTG
55q5B0S+i86Mb8iop/76Wufh9gQTOP+golhCirSqkejLrnqTtZv8qnSD7V9WSfioXkjaIHKPzUz
Nqye1Qp5+Y73vq7eaBawY9x1YjdNeo1ue9tOn48OJS9VnUc6BmYCOmKMKkvm/ysV7Zxt3fQu08p
oQRCuSl2VeD1FdKVU5lRIypzq2uGUefcJDVrek05cNt69Ueb
X-Developer-Key: i=dmitry.baryshkov@xxxxxxxxxxxxxxxx; a=openpgp;
fpr=8F88381DD5C873E4AE487DA5199BF1243632046A
X-Proofpoint-ORIG-GUID: -5Lc7vMmBwVVdaXC44A_AoGo5KVNxuPW
X-Proofpoint-GUID: -5Lc7vMmBwVVdaXC44A_AoGo5KVNxuPW
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDEwMyBTYWx0ZWRfX+2rxbyS2NhvG
OabHMY51zpGhqNFcRRZXSjDyRHIRETgXdPN+AOX70sn1t6whxzsAbS+1I702n8KqoRbQrEIaF8X
yoUj79NWztO7ds9pZx5xaVwnKqiz5sjl+OVHVa01HIyFGP7W30l/LrxobtJIbAfOW+qmP/hNrS0
jv1mNVmFmUVKFoQRememUv9rHY6T/18F2fySiaCfteCSqjXIolvslSU5rf1lQdCtcdW4V5gxesT
dNaOkx4DPU3HgT+XKD+fKDbktpau+WF97RWMa+olnmVW06w3znt89SFddqdKFcM/8z2/HapFc7g
sUbbkfzcSvSzAuu+bn6K7IXJBhHRCw4+4p+N5eYwrQA91Njsdle1FK+BOtSCGMTlFnIY1b8Wvyt
1x61fzfgpgA8T8swOpWJaQkhJ78qMKQGqtI1C0AGS5mDSNdFrT4k1sMMT1ElBgk/JquJUYd8
X-Authority-Analysis: v=2.4 cv=Y8/4sgeN c=1 sm=1 tr=0 ts=68404cd1 cx=c_pps
a=HLyN3IcIa5EE8TELMZ618Q==:117 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10
a=6IFa9wvqVegA:10 a=EUspDBNiAAAA:8 a=NDTdqBo84DM6fKfIBT0A:9 a=QEXdDO2ut3YA:10
a=bTQJ7kPSJx9SKPbeHEYW:22
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
mlxscore=0 lowpriorityscore=0 mlxlogscore=999 spamscore=0 phishscore=0
clxscore=1015 impostorscore=0 bulkscore=0 suspectscore=0 priorityscore=1501
malwarescore=0 adultscore=0 classifier=spam authscore=0 authtc=n/a authcc=
route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000
definitions=main-2506040103
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
QCS615 SoC is based on the earlier mobile chip SM6150. Add corresponding
compatible string to follow established practice for IoT chips.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
---
Documentation/devicetree/bindings/arm/qcom.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml
index 56f78f0f3803fedcb6422efd6adec3bbc81c2e03..a4725c7d877d8074985e257c5e35869ce610aec9 100644
--- a/Documentation/devicetree/bindings/arm/qcom.yaml
+++ b/Documentation/devicetree/bindings/arm/qcom.yaml
@@ -87,6 +87,7 @@ description: |
sm6115
sm6115p
sm6125
+ sm6150
sm6350
sm6375
sm7125
@@ -943,6 +944,7 @@ properties:
- enum:
- qcom,qcs615-ride
- const: qcom,qcs615
+ - const: qcom,sm6150
- items:
- enum:
--
2.39.5
Return-Path: <linux-kernel+bounces-673287-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 6990341E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:41:09 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 91F09188D676
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:41:16 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id BCA352900B5;
Wed, 4 Jun 2025 13:40:37 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="GQmiL6DG"
Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 595E128FFE6
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:40:35 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749044436; cv=none; b=RRSyUaDpYcjELMCJEc1G6To0gUUPty6uKfxqXnlqtVAQZg0XFDaFaj29fwaBymA67H7EYeHCEs1BrwjFe4w0uWiKfJgEQasgNvKT7BGrBYK95Rq9gan8bPGpeeIDes3CGXINn+1vNKF+USuXAxj5K31Imes4sg6GYTShUEeURBI=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749044436; c=relaxed/simple;
bh=7u/4WQVJV6Q1LUX42Cje1CNsKlezzEWMHTw7z3WPsYU=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=uOYoBS822qKBuryYv2ec1Sqc4Ywp+xRthRKPEtXOVCtjFS0cMwS4EpLVlUoGBy/w99VvHM6P20LCA5OKQ7IEKLp58IsbIM3n7HOjVwH+XWwk7ij0Bj/xANGhRU5ct3nR1iFd+8KeI+uGWovDvaReF8PEn9fyUxRHNS0ZPamGKqk=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=GQmiL6DG; arc=none smtp.client-ip=205.220.180.131
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com
Received: from pps.filterd (m0279868.ppops.net [127.0.0.1])
by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 554AhdK1022400
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:40:34 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h=
cc:content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=qcppdkim1; bh=
YBg9q0cvHs6bBUW3z+GWBUixT2+oyHe0R+AnONY1DwU=; b=GQmiL6DGk/SNrXwo
PRnFeaxnyN9WWKQRFRUlx6Lws8DgRvjN4egTrmsCIjS7TAdKyY6s3sdeFdvsZRul
jszQl9l3SqntxnljW91cMqRkNEtPddtxa9mp5afXqiFbOWNP5XcxtIQzoqfyAKVo
+7I0HDko3m59f+qXUXeWOUboB4QYuwgNIkTwBiCMJFDTPxag3CE3CFZm+SD6oIIc
1eN6zNePR9y8umojS60FGsUa9ypchOKq86lDsvReGXl9fdUOq5l16xsc9UAARtDe
u4+ICVbNut0c76Qj8QeOruIzdQCoN01BZ4yAfQjXkugHweaS5p/ireqLs44K2GWb
TEM3/g==
Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198])
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 472mn00ej6-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT)
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 13:40:34 +0000 (GMT)
Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-7c5e28d0cc0so1051572785a.3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 06:40:34 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749044433; x=1749649233;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=YBg9q0cvHs6bBUW3z+GWBUixT2+oyHe0R+AnONY1DwU=;
b=Lq9r25X+hTUgnMZjbhcFSFTafLRrekRD0i1MloZuB6QqMmWyBlgfNahTSEwdoxEMe8
p6xOlH/nIpN2wDmYILR7A3tq1kieuWYY3a/ZgYFItnvocEDIEKn7fKpVdB8XzLYnFO8w
BS5dh1NN4/ncnS3NKubpIzW6tZW9MshECiFe1QIZg92QFCXSfMnEb1X1I7vr0riEzC0E
pD+jOQ/I9m9XQpLBNtKANKdhO9IzuQJ+kIWHirNhg53E5Q6on1w3ZBH6BkBlcdHlT4LO
bBvcg8FGF05QXTFF+aykySYztGulLqXxSH9dZ8tevIFphnzzNllmszHgypV0HGcNN+E1
JGCw==
X-Forwarded-Encrypted: i=1; AJvYcCUYqhR9b6bsTtjky/6iB8Abfe8HLcuMx4Yhizyb+78qnaPktIl8YpZm3n+suV2Ixi36Tl1uSkS5nkJl7F8=@vger.kernel.org
X-Gm-Message-State: AOJu0YzemtU5M7tRhpbH/k/vgB4IISv71g+7h3hEXHdlQwBvj4/Cel0s
EH+pBUvkWCIP8x/mLuOk75iML7T22MKYbRnQw44uOz9cODwy3d+VUNaMEZAhv39RBbC81iWB1Xl
CE+fAAimTIge/c18mtdRwXGI+PTcMnqwOcIwgX0hS6aPwS+9fxiv7vuodXYcXuTGTMgE4RR1mj8
ItOQ==
X-Gm-Gg: ASbGnctDRyxv2sEP+0saTsMhIAyvNV4KYQSXcRyzxWlaygkiizVB3gKxSRcOfDPHPFV
B6dZ1FlWrTJTU96nSrRFK8fDBpcDqXS+R3SYrq6rmcKoDiFQ3TTuJr3LgC00oOkJaIjWAQoHAX1
QL1PZhaT4ueq0U3WqjLEWjf19UDtp5TwtsmQQUfNjpbev6UuH+wyhdCVGUpxqeuyVY9V7bORdK5
IMTVKBAMlXbclMo7CXaaoR7hdM9qUQw4IseFC23/JsssNypm+cuHbB7Y3hynIq0FGpKMXCCXbWe
7HxpgA/udUaqnil+3iuMoV99HYsHBcBkMHnfU9QeoD40UhSEL8DbC68oAs8AiXThaYFy+08EwXw
Zb6Ck6VkJOkb3kDgIYXxUxmtQ
X-Received: by 2002:a05:620a:4050:b0:7ca:de42:4ae5 with SMTP id af79cd13be357-7d21a8dd0e9mr391901685a.55.1749044433298;
Wed, 04 Jun 2025 06:40:33 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IFgZhKgR7NcsV4gPQC4U7eu5LVKicEIGDkAGddV6FnPtO2Ourto5KqAILlFQpTBuMoKbS0SYA==
X-Received: by 2002:a05:620a:4050:b0:7ca:de42:4ae5 with SMTP id af79cd13be357-7d21a8dd0e9mr391897485a.55.1749044432931;
Wed, 04 Jun 2025 06:40:32 -0700 (PDT)
Received: from umbar.lan (2001-14ba-a0c3-3a00-264b-feff-fe8b-be8a.rev.dnainternet.fi. [2001:14ba:a0c3:3a00:264b:feff:fe8b:be8a])
by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-5533787d376sm2311966e87.28.2025.06.04.06.40.31
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 06:40:32 -0700 (PDT)
From: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 16:40:29 +0300
Subject: [PATCH 2/2] arm64: dts: qcom: rename qcs615.dtsi to sm6150.dtsi
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <20250604-qcs615-sm6150-v1-2-2f01fd46c365@xxxxxxxxxxxxxxxx>
References: <20250604-qcs615-sm6150-v1-0-2f01fd46c365@xxxxxxxxxxxxxxxx>
In-Reply-To: <20250604-qcs615-sm6150-v1-0-2f01fd46c365@xxxxxxxxxxxxxxxx>
To: Bjorn Andersson <andersson@xxxxxxxxxx>,
Konrad Dybcio <konradybcio@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>
Cc: linux-arm-msm@xxxxxxxxxxxxxxx, devicetree@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
X-Mailer: b4 0.14.2
X-Developer-Signature: v=1; a=openpgp-sha256; l=1527;
i=dmitry.baryshkov@xxxxxxxxxxxxxxxx; h=from:subject:message-id;
bh=7u/4WQVJV6Q1LUX42Cje1CNsKlezzEWMHTw7z3WPsYU=;
b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBoQEzNXkMSHwY0jitLtwQ0+uoITJ/85YMiujGcJ
HJDAle6PTyJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCaEBMzQAKCRCLPIo+Aiko
1bXbB/91MD2tZapdUU1GIwKguEd3U6jlN2ZEeEYIK8zwVlML/LAAr+Tem483yqFnkRBx0mExp4O
jX88ZuZI7fNEmyOEMXfWcD3zrKTWhUiW5aRHnEx6nPK6oWjFrDncwFEzkuvYPePKegmDgB1f07i
kY0hwhWp8zLclmzGHiU7e7sHTrnNzOMKp3tDQ4cIIKH2hBK58H2dHkSSZtRnwUbKPl2Vgkwt1LO
ihscXU00+TGkxlQP97IzF7BfnCFYNpIPgKq0/l1+k8/PwJrOoOTeiMXhL2twEjEk8jreboF+hba
ose4Q85w5lgNy21TLblskiO4acH7mW8TxPRz0dmOB8Bq0eiz
X-Developer-Key: i=dmitry.baryshkov@xxxxxxxxxxxxxxxx; a=openpgp;
fpr=8F88381DD5C873E4AE487DA5199BF1243632046A
X-Proofpoint-ORIG-GUID: 8zSey1tkzF17hQGrHhwKrcgrv__UjXxp
X-Proofpoint-GUID: 8zSey1tkzF17hQGrHhwKrcgrv__UjXxp
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDEwMyBTYWx0ZWRfX0krHZ9iQa0EE
8CU6IycVbndTNQSY9mo20110Hi9aan4MifEx71HcH5w5lbWv8eOADu/wJoWUM4B1ftfLz5iI6Bx
Gq1Dx9sWT9Hs4bkmJ31+7c69C/bDQAfTBFvhvUe9/kF8HPa89w0cj5NUWhwwZlLrBpEtNCMxGjg
/ma+JQtRxKv4kLIHCVOMK+1W4OHoGG0o9LCexTHguOkYPyzEczC3X+sWwbAKs5pyzhCcZsTdTIo
U0So+rSJkTUKgVSoWLKdQa65ZWbPlMJ0WXOPl8mDEWd+Fpvc+9DoxIG9KvEqIMr1A2KqeGlcR6l
wC9lhrpTE4aSuCjrACDBGYDAxXVjGGpz1fdI3HQnngjKue3JYwtrGjsks2UeoSybzGaX+pRI+t9
rxJqeH+P2aUcBBlRQvN93rPtWPvMqg1p9dqG/FltDaDXNCr1afavUDMxyQQNen+toB+gU6+C
X-Authority-Analysis: v=2.4 cv=Y8/4sgeN c=1 sm=1 tr=0 ts=68404cd2 cx=c_pps
a=qKBjSQ1v91RyAK45QCPf5w==:117 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10
a=6IFa9wvqVegA:10 a=EUspDBNiAAAA:8 a=F4Sl4XA9YrAWyvOGJFoA:9 a=QEXdDO2ut3YA:10
a=NFOGd7dJGGMPyQGDc5-O:22
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
mlxscore=0 lowpriorityscore=0 mlxlogscore=993 spamscore=0 phishscore=0
clxscore=1015 impostorscore=0 bulkscore=0 suspectscore=0 priorityscore=1501
malwarescore=0 adultscore=0 classifier=spam authscore=0 authtc=n/a authcc=
route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000
definitions=main-2506040103
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
The established practice is to have the base DTSI file named after the
base SoC name (see examples of qrb5165-rb5.dts vs sm8250.dtsi,
qrb2210-rb1.dts vs qcm2290.dtsi, qrb4210-rb2.dts vs sm4250.dtsi vs
sm6115.dtsi). Rename the SoC dtsi file accordingly and add "qcom,sm6150"
as a fallback compat string.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
---
arch/arm64/boot/dts/qcom/qcs615-ride.dts | 4 ++--
arch/arm64/boot/dts/qcom/{qcs615.dtsi => sm6150.dtsi} | 0
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/qcs615-ride.dts b/arch/arm64/boot/dts/qcom/qcs615-ride.dts
index 2b5aa3c66867676bda59ff82b902b6e4974126f8..c8471a2c56c5be0713c1678b2dcc923d69296db1 100644
--- a/arch/arm64/boot/dts/qcom/qcs615-ride.dts
+++ b/arch/arm64/boot/dts/qcom/qcs615-ride.dts
@@ -7,11 +7,11 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/regulator/qcom,rpmh-regulator.h>
#include <dt-bindings/gpio/gpio.h>
-#include "qcs615.dtsi"
+#include "sm6150.dtsi"
#include "pm8150.dtsi"
/ {
model = "Qualcomm Technologies, Inc. QCS615 Ride";
- compatible = "qcom,qcs615-ride", "qcom,qcs615";
+ compatible = "qcom,qcs615-ride", "qcom,qcs615", "qcom,sm6150";
chassis-type = "embedded";
aliases {
diff --git a/arch/arm64/boot/dts/qcom/qcs615.dtsi b/arch/arm64/boot/dts/qcom/sm6150.dtsi
similarity index 100%
rename from arch/arm64/boot/dts/qcom/qcs615.dtsi
rename to arch/arm64/boot/dts/qcom/sm6150.dtsi
--
2.39.5
Return-Path: <linux-kernel+bounces-673288-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id EDA1041E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:41:31 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id B25CC3A73BD
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:41:07 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id E46C4290098;
Wed, 4 Jun 2025 13:40:56 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="aV/l9+4H"
Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2066.outbound.protection.outlook.com [40.107.93.66])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7214B1C5D62;
Wed, 4 Jun 2025 13:40:53 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.93.66
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749044455; cv=fail; b=FMDp2cslCBB3cvmvrKj9kBif2tr3dN4ki1bm5cfjHAvFILvz+CUkhyXVoMh2UhEfB2cQ9JtpFOSdCSAu/oanT3P3eba5LWxyl/zYhE7x5tWHLnHg5YeOgQhvn3l0V1ssHPDfkd8F3YnDt67B+6E8VDYEGo/rSHJAvjB0/5vC5QU=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749044455; c=relaxed/simple;
bh=CSSatPtAUWF6WbFictTr6qNOo39dPwGBoplkztWGRNY=;
h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
Content-Type:MIME-Version; b=PDlQvgTaT6eGGfJUciRImMt2iNSBBOVk/NRD4iVTEZtO2MqDmuaZ0pNwqvZMXmyMG7KH5JsQl7cWOopMj6sEUQSN6e2zQIpkdGWMqHoUdTrrNCKJ1lXvEk590PvH+3C2uO7yC2OXHDZClfFthL6UTVHmbz6NwBa/9BHGp7OLDTU=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=aV/l9+4H; arc=fail smtp.client-ip=40.107.93.66
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com
Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=RcyvLKQ8P6xSf2LKWGqLcuyz/KyhgruZSrffH9kei13MhJuJFrEY9EBSvwmB0iv3VOjLaV1aVu9HaJ7lC3UvK+WDoBx0g7oQdU5bj8tv3Jc/yKPihSXnS8rfpqVWP6tPDAlNF1iRoUTttKkVwRaxNbZmX2AO//tEUMfVOnz3eJE+tdbKJZeG9X4zxda0YI+e9Oggw2g5jAOHUB0qM88B4R1hwoynS5opUDu0DwGfgo5c1QBUJac5sNO+WzwBxxaFwZO+JM09+FBB16Rhg04HRbfMFrNWynA2zOSp8VqsCri4bXCVDKM6FWs4FJQsGSdsA3SrAZpBLWrOJb/GMfCnSg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=cc1HW1jVZKspUuFqIMWi9LdsQ4Boe4Gb9laAUy1wwgo=;
b=LYwSNTwfbCqUtosgZJ5XczPwSRNAU4eDyCbgVPu0UJmyE75W/z0MLlXwcaMEJQFRBl/cq1EP7tLAC9jqwddlv3wzpNdxz9yCkl17kdicQmKfEIMy65ULP94B7xCwVAJpxZOTQ14GXD0tFh1iYWqvdz2JG7LCmGZ+75W4e9V1Yluk5j7+2P1Sg9K6WyxgseFHokUxP6xgyb7iQTVj3apXRGD2VD6s62rv3Yba55flUiqwl00diaovSQSEAkwpsdWUtJjLapAVovY72u9sIvVI6XschBkEbtoyw89xUufV74ho7b77MNynOxgRXlEdCt3+vRZ0BjVh6xxjdfzZbEaL8Q==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com;
dkim=pass header.d=nvidia.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;
s=selector2;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=cc1HW1jVZKspUuFqIMWi9LdsQ4Boe4Gb9laAUy1wwgo=;
b=aV/l9+4HffD2BYrbvTNkuZe1rCx4uCjJHEhJCXFW3rAOLoLK/Z1TfJbWjDZINGjeRbiPmokUk73GTXHrWS6axiVr7/gGwmRgBLxVdljyjiV2FsMOw4rX5+I7sFsYzNJ3AppRDy8wmCFYI7nfmI0Bl6+5ygK72J1D3CssLShfwdgmUXIeBQD2YtMKrZnelEQiyVt9PD+Xuljzn3nGeW87KzVkadVGhQ2E++6YLd2/EIhLjHx4TFn7H7p+9VMP7k8uQx6nvIEfYhtr3T4LUktyBj23zi8qbgnFO9LXE2QMYxGQhQ2wrURLUuVPFeJxBZaE+O9fuxRFAKKSXEjKbhLuYA==
Authentication-Results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=nvidia.com;
Received: from DS7PR12MB9473.namprd12.prod.outlook.com (2603:10b6:8:252::5) by
SJ2PR12MB8941.namprd12.prod.outlook.com (2603:10b6:a03:542::15) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.34; Wed, 4 Jun
2025 13:40:51 +0000
Received: from DS7PR12MB9473.namprd12.prod.outlook.com
([fe80::5189:ecec:d84a:133a]) by DS7PR12MB9473.namprd12.prod.outlook.com
([fe80::5189:ecec:d84a:133a%5]) with mapi id 15.20.8792.034; Wed, 4 Jun 2025
13:40:51 +0000
From: Zi Yan <ziy@xxxxxxxxxx>
To: Dev Jain <dev.jain@xxxxxxx>
Cc: akpm@xxxxxxxxxxxxxxxxxxxx, willy@xxxxxxxxxxxxx,
linux-fsdevel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, david@xxxxxxxxxx, anshuman.khandual@xxxxxxx,
ryan.roberts@xxxxxxx, aneesh.kumar@xxxxxxxxxx
Subject: Re: [PATCH v2] xarray: Add a BUG_ON() to ensure caller is not sibling
Date: Wed, 04 Jun 2025 09:40:49 -0400
X-Mailer: MailMate (2.0r6257)
Message-ID: <3D370CEA-9F26-4E6E-B93E-D26F2A4A222B@xxxxxxxxxx>
In-Reply-To: <20250604041533.91198-1-dev.jain@xxxxxxx>
References: <20250604041533.91198-1-dev.jain@xxxxxxx>
Content-Type: text/plain
X-ClientProxiedBy: BN9PR03CA0498.namprd03.prod.outlook.com
(2603:10b6:408:130::23) To DS7PR12MB9473.namprd12.prod.outlook.com
(2603:10b6:8:252::5)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: DS7PR12MB9473:EE_|SJ2PR12MB8941:EE_
X-MS-Office365-Filtering-Correlation-Id: cb69d350-b85a-4719-a9dd-08dda36d6bc7
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam:
BCL:0;ARA:13230040|7416014|366016|376014|1800799024|7053199007;
X-Microsoft-Antispam-Message-Info:
=?us-ascii?Q?J9/eikDILAFtMoX0He8Ey23AmPe38z80jlY9vR7NxiVkpwLfe+yANaI3HhE0?=
=?us-ascii?Q?pJ8RR6+chfcPA85951YUaofQZGHKmyCe0ZsKccQijECmm7JfXRWIfsHhYgYu?=
=?us-ascii?Q?vRnzdvQg0/y6JigcTFuTfZhn4WtQI8ux2gg8KPhYLPuxu0iKn25sZVfKaZBi?=
=?us-ascii?Q?nNQJaEK4AK/l1beRuDIyApp2IAIJ09hE/wBAfGuE8thGyuUGxZu8w8fZ1mBW?=
=?us-ascii?Q?k4YCfvrBmT3GkoXPC4VCfNyHZTfNsG0Az4sph69lHWeaqU9e9sBPrVwXWQNB?=
=?us-ascii?Q?bWmm5S/JjyQA+s5loVOtggMQwgRBGyfC3/Vj3668DO8U4O3WSji4OCGWlnMn?=
=?us-ascii?Q?qO6eV4/Kz0Z2Sv2EXQTSItMM4JS24Ss/8sZ5q0EO9eM0/DJoimWkjHoPcFK8?=
=?us-ascii?Q?jz6pfwGtvLZ8dS4EAAa/ankJfGiYvHMfzz9KQoELhiBIoPMJugLJYJVWJwmC?=
=?us-ascii?Q?1xfCS/CUeBC+88AMYl9NQei3PjkispgjDIhjlEpFxAHaoqcDCWctNcQNbjyT?=
=?us-ascii?Q?UgN4Vy3P4efCArPTnSO7Tex1oiGgbqoNSTu8TLs4BvwngfeZlzOSwxV99Ukm?=
=?us-ascii?Q?wJkkncRRYn5KGcgvRwCuw+yOPYxc2EaVSnR6C5jP1VtJVLi3u7qGgR4STU8E?=
=?us-ascii?Q?6IITxw7+vyx36va36xZsujDy/bqxSzfOUyVkLF0Km1BvVr2LK4BZqneXn2ag?=
=?us-ascii?Q?r3VBnT4UD0sLZwiORV4bttkgy+rQKFkwWjprsXwAdN02Iaj4maxSK9GtEEeV?=
=?us-ascii?Q?ypMzUG6LKn1RSGMcliljhSVHmASiKO1wJrwy+DXaQYwrUX0hGZo33GmPdGNf?=
=?us-ascii?Q?4T36/wto++DmcFyg6ApHAT3651OzihMFfe/lsgk9XQOzEB+thOshsD4aiIHC?=
=?us-ascii?Q?YKh2kXIHm6C8+O3bfV+tpaXG7p0h/jIwWlfGjHAju4kriRuTRelWG3gi13Fz?=
=?us-ascii?Q?7fChxLsVUAfEn9w/qg+WVMrCsWVHIMTUlEOx4w19KWyD5b3vNfmyYsZ/UB52?=
=?us-ascii?Q?cNrhy7WS+sj72uZ4GyM2wUTPgrSI47civpwhn10/84+iVFK7g4TkPTUFt3wz?=
=?us-ascii?Q?S2iFZe7+UU8ZzjFbFsNoW3H53YgTdvO08AWfptS01WlfD67KxOOJADlyf4hx?=
=?us-ascii?Q?gc7iyz6g+2kuesKS+qXgabXQL+Kn7X9r/cs7EybctR8F/yj8u7zBU4LbkJPc?=
=?us-ascii?Q?DHsjfZy71P5/u1EGEoy3YevKAp1FsmzjUCWLf9QgYoTKTOYFJtvkFzoImJso?=
=?us-ascii?Q?4uzt18z7EzL6YyJT8nL8cqf6AYdc3skoVtM489QcqNoxvMjDS0LSKLIn3nyZ?=
=?us-ascii?Q?TancQxno82eAZWU4ecTBksP3pt7VLy9vIGiK3L2ZroeXfz2MdP7CjWATFdQw?=
=?us-ascii?Q?SuNsNZd2dY0PzLeoUGkJUTRtZQxPMfDMujMpDkWxLzcwcgsIdw=3D=3D?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR12MB9473.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(366016)(376014)(1800799024)(7053199007);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?us-ascii?Q?hDtL+GCa1s/5SyFZb+mMx2QQzXBYJ5YceNI5cOEMwCFdraeUXCVdeE5d60by?=
=?us-ascii?Q?tzbo/TYDYknMmPh78nB2iTtDmznWt5ZwNKV2tujN++Xsvu1XfeJPsP+avByZ?=
=?us-ascii?Q?byyHbFF3G7hY/mYOA2j0d/vWK97GCig+68bMOIaRPDOvH/uaGgLq0L9wOCeU?=
=?us-ascii?Q?pEx8SnmksC61ILc6a9mmIOrA723uyJ9Kq8/CM1k0UIUQ7sBOaqtcrwsfvDjq?=
=?us-ascii?Q?jKQ6Y4yMJqT0lgNHyblXUaz9X2GGurEhRCZ8HeUFzxWtW7frsE4biEgY3qAH?=
=?us-ascii?Q?DfsQ6QmTduh/hqcgCHnvBP5xvrMpylSvm9/UO2pWN6ispAj1BlEuWAJhbPIq?=
=?us-ascii?Q?Im/hhbnyWTLcpZD8L1tHCQWTv8VnyqDuwLH5U740FqrpoyXHSBxLVICFLva7?=
=?us-ascii?Q?tBPNOTnjoXIlz5iQ56kH+gGkjeznK0FKxZVLnur0YUx79AN4dr4VIRAK1KUU?=
=?us-ascii?Q?7wRvSBN618vpRB1fpYCG8oLiTipWmQk9DUHu4hqyja12cS83y5yNrfgmUDxT?=
=?us-ascii?Q?rwnGCeVWPwIELvPWcXRwoUW1+znTYL//SnzUi3nGINfitGzMgaKSq1qlOMBz?=
=?us-ascii?Q?KUTw+pWt99fPUVPlq5vUv3xq6LyKdIiO3d0ZFIYRN7HklG2598UtHFpdL7E+?=
=?us-ascii?Q?scuocTV+14NEuQprLe+B+/61WqI7ztwaz+1pN/HYVAmqj27DpK9711LZyLQG?=
=?us-ascii?Q?tVysVYrJ6Y+rZCxm9p5bw/EnyZ5epF5/KKmTwyeo6JOq6XcTJDOrMQa5Scqw?=
=?us-ascii?Q?3JrekUNIihNxMZa6g8s+yb1MSfOGCXZEGSo6bdH7kTMzzkO4bzJuCt5ieD0/?=
=?us-ascii?Q?Uqm8u6bZzrdPfMmF4n75YC2XqXLZN+LS5mCHYmiHuSsMnfqij2HPnnUVU+r6?=
=?us-ascii?Q?TOYvSA+VVpLocf8mHrPYrf8qkT1KIbZ7VmEQUO1SRMoLK5luqxu07XxbqSux?=
=?us-ascii?Q?eKlt3LbYI7k8Sp0Yd1ORzfxMukgNqQU6wXa/HhyinHlW915grpsk4aDpFfDW?=
=?us-ascii?Q?3PjKN9YzKxL8ugC8oI0dSI/IHtgiKIVQD+0f3Ma6y4KkuYpE1cSzx/Fxs30+?=
=?us-ascii?Q?YGAPpXZdVWmdp4Q1DCdNz/5h18o3d0Q4Pv45UiFqehz2JzYMr4dwoJpurX9F?=
=?us-ascii?Q?XyXplglWgPaMHf2E/csBZ1w7buMGBe+7Om3a+HBUCj9VZsgvXG2JBVTEaJCZ?=
=?us-ascii?Q?T0CPuHHx2PNM+mfXiA/Mvb6oatoA8puy192T3tVxw6bQLTjltrXYDb32KcV6?=
=?us-ascii?Q?bwkBv0MF6uwPEDPtWvbjeI4cQqddzF4FIbbDk2fPEXxBRC7qeRNzv+vZL9ou?=
=?us-ascii?Q?MNELGKZlRSGcfLKIuGlbl9nZ4cC7fNl35QNMca8UtiQwcqMG/eYUhfUzDyVm?=
=?us-ascii?Q?O6tIAi78F4V0E92ohxFAnFzxbicVWDs/t2cLwRJld0mKBqU/h6LB7g+QMTK5?=
=?us-ascii?Q?PxXFF/I9UgjqdduwwpcgCFoKGBMVeX8FBr49iJZkyL+NVwgYSyogA7Af4qPr?=
=?us-ascii?Q?UgpUETbB+bMouA/sVFG7XMD3WlJmIHa5i+9qZIcsT26khzb+Q+QgCAD1wuYs?=
=?us-ascii?Q?PcRk+Fo27fdbYL4zHYFBzMeii03AypB8DlFO2Qtb?=
X-OriginatorOrg: Nvidia.com
X-MS-Exchange-CrossTenant-Network-Message-Id: cb69d350-b85a-4719-a9dd-08dda36d6bc7
X-MS-Exchange-CrossTenant-AuthSource: DS7PR12MB9473.namprd12.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 13:40:51.2551
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: 2yWc7F7fw86EtMZUR/WDCtPubm5P8yxKhyC7Y39wwhW7xE94QMBXqJKC66g7IrjD
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB8941
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 4 Jun 2025, at 0:15, Dev Jain wrote:
Suppose xas is pointing somewhere near the end of the multi-entry batch.
Then it may happen that the computed slot already falls beyond the batch,
thus breaking the loop due to !xa_is_sibling(), and computing the wrong
order. For example, suppose we have a shift-6 node having an order-9
entry => 8 - 1 = 7 siblings, so assume the slots are at offset 0 till 7 in
this node. If xas->xa_offset is 6, then the code will compute order as
1 + xas->xa_node->shift = 7. Therefore, the order computation must start
from the beginning of the multi-slot entries, that is, the non-sibling
entry. Thus ensure that the caller is aware of this by triggering a BUG
when the entry is a sibling entry. Note that this BUG_ON() is only
active while running selftests, so there is no overhead in a running
kernel.
Signed-off-by: Dev Jain <dev.jain@xxxxxxx>
---
v1->v2:
- Expand changelog, add comment
Based on Torvalds' master branch.
lib/xarray.c | 3 +++
1 file changed, 3 insertions(+)
The added comment is also clarifying the function requirement. Thanks.
Acked-by: Zi Yan <ziy@xxxxxxxxxx>
--
Best Regards,
Yan, Zi
Return-Path: <linux-kernel+bounces-673289-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id DA0D741E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:41:56 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 253137A7A7D
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:40:35 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 68EC228CF58;
Wed, 4 Jun 2025 13:41:27 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="K87g+iFJ"
Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id E320728FAB7
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:41:24 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749044486; cv=none; b=dkc0FX3EaOw+OCcuwAVq1sIPcwBmFrBS0VI8bbgoeweaI/k8fmBE25iPtfIuz3ZxkNuQOxt+uwPukD64Q9twJzGkSovm2a50U5vbjnw4rhsqSbr5SS8k5FndJpWeA7niKhq0WGbu8DeaswirivVBRcWgHKjWeSK8wUSmPPk2/eY=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749044486; c=relaxed/simple;
bh=1kU0n2bW3hlLIxRCbwHPbQyi7Fb4CY9XVqE2C/Sy8+8=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=ObWeV35CuwmrLEaHmiVENa6V5TTYxk/e8pOpp6SJjh0WPR7JfXaAI1uhlW4fqYk9op0Wa2Oe569RwcLV9sWiGV+lO510bmPvou7zBeoQXn66K1V7d2QCujlV+1tk9PRoVSDE1aBTUdu3ZgegpiLO+2I+xDwk3LIClbTMkgRNIFw=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=K87g+iFJ; arc=none smtp.client-ip=205.220.180.131
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com
Received: from pps.filterd (m0279873.ppops.net [127.0.0.1])
by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5547YaQg028363
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:41:23 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h=
cc:content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=qcppdkim1; bh=
3/ZLOV/HNol/MkyrbMnKs/oh0VOFuPImZUzRQhw3LY8=; b=K87g+iFJ17Kk+tbC
74pCfHp6SL7Pp2K1xutgdSGMASlUdO+fSbB65gb8DBREgBlvfPZDzfzq2B73uvNs
BCyH2xbXDX2iWh6KZaJONs2C41NWZOkRGlxhqjY8CnjHVCPbx+L3oLUZvQ5+bkZ/
hZIjNCqkoB2CMVFSdmN/Pz+piZ4mARhPrveY7h69ngDohNQpnpbQCSHU0tOCXUwE
F6CxPH5YLX6tH66C8TkbqZ17K8EGg3u3kRqXVGPlK9eEEWDSWb3tNVqgcm/63k/M
tgy8HZrgOLFZ1AtyAdURvuaS/NNLiSJvUWdh39nEpWoKBChGEZD2MYab/GmWYj/R
rBE5og==
Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199])
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 471g8tx89b-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT)
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 13:41:23 +0000 (GMT)
Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-7d09ed509aaso1025214385a.3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 06:41:23 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749044483; x=1749649283;
h=in-reply-to:content-transfer-encoding:content-disposition
:mime-version:references:message-id:subject:cc:to:from:date
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=3/ZLOV/HNol/MkyrbMnKs/oh0VOFuPImZUzRQhw3LY8=;
b=C3X86z+gi44/kbhBzeEYMDRmwLT+T9NVGzEOqCwqN20UnuXwzeDkNL1nRfZnfaTyhk
QsiKOm1KqH2yeICmRUQM5zmSFoc1bYA+o2vowOAcejW4lQEXCb542VpW6Mx9qmLP1FFM
iFEv/1sXEajU8737qptjWfRpfRNAQ5pf5Uwfb++bEPCVOLz15fQJkfi386rh4VlWgnyL
En37gpqV5cuCksTtaCpgmFOdRVIsAnem4gqW/kHqKDn0+K1/sdiS080yYrbAabF/tm4B
x6WGuam+tuynG1ocUXW3UR7dvP7cJ2AivkF04FFTnoD54MZxHQ+KDBNA2xlWJycUumX1
j+vA==
X-Forwarded-Encrypted: i=1; AJvYcCVoKEueD53LPgvG8sxmeTnsDHbtjgxzzje1vL5R0vV3MdvyMrsgxklS6XE4nNdQxINsEmdejkEat+ViIoQ=@vger.kernel.org
X-Gm-Message-State: AOJu0YyIoGxnaztIgU1hV394qQajx23MILk3Ca61RqLN8Iyb4RUiFtX0
/+Q5V22B5SmXcB+KJ637d6w3wuFPv3Y1h2twP59gSFwEZTzyF6Zq+JndRa/ECeUS2wHbuCNBKO1
JXojvGs0Bxylnk5uF7gAsp7YKHSNnuxCtVrMn+GqLIRlkECLSpUkIybpLpEfNYcRz5EI=
X-Gm-Gg: ASbGncs8JdWjYGfPA6AOsnG23Sr8mvXsDtX4dVkFJ8TMF/CwHOPQtZkmbRd6ai2xfpu
RmzXIlDwnXqJ8Z61a5OuhZKNgCI8KvzGCbSOFltNrKROOTlu9ciox8o6S5f3xK1xGG/DJgQn+Y9
WXauZy2vbD3+1dmUfpFKYAsP+sC6dx+5PEZ9IWgep1/N6WkLY4jHw7U7IQ3AQlY6TizDrwjQqut
TBVMxdykZo9ECov5waKeqZo/yimFegLSDBK2lrg286yKpzuXLYjJ+0DjfolNK1u9NQ5H2kFAAVu
lWvQXlkMyaVj5aIk5DItPX19uJS82eKitsNQ7hlSjG1z5/PQw1Irbpi7lqgdK0/5YJc0a2zL6u8
=
X-Received: by 2002:a05:620a:44ca:b0:7d0:9782:9b05 with SMTP id af79cd13be357-7d21997cd79mr512472085a.25.1749044482833;
Wed, 04 Jun 2025 06:41:22 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IG3op8LTfjOLqxZdhVw2i4Biz6kY73hnDxhxU2RIwZnTe0rdyBP1Nv6BjhIaJZeMxqSKmPUpQ==
X-Received: by 2002:a05:620a:44ca:b0:7d0:9782:9b05 with SMTP id af79cd13be357-7d21997cd79mr512464685a.25.1749044482199;
Wed, 04 Jun 2025 06:41:22 -0700 (PDT)
Received: from eriador.lumag.spb.ru (2001-14ba-a0c3-3a00--7a1.rev.dnainternet.fi. [2001:14ba:a0c3:3a00::7a1])
by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-32a85bd2a3asm21611731fa.90.2025.06.04.06.41.20
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 06:41:21 -0700 (PDT)
Date: Wed, 4 Jun 2025 16:41:19 +0300
From: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
To: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
Cc: Renjiang Han <quic_renjiang@xxxxxxxxxxx>,
Vikash Garodia <quic_vgarodia@xxxxxxxxxxx>,
Dikshita Agarwal <quic_dikshita@xxxxxxxxxxx>,
Bryan O'Donoghue <bryan.odonoghue@xxxxxxxxxx>,
Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>,
Bjorn Andersson <andersson@xxxxxxxxxx>,
Konrad Dybcio <konradybcio@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>, linux-media@xxxxxxxxxxxxxxx,
linux-arm-msm@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx
Subject: Re: [PATCH v7 2/3] arm64: dts: qcom: qcs615: add venus node to
devicetree
Message-ID: <wyzyffaksofnubx72dy6uj6wuv5nk3bxii2ncdvb7ga3fegynj@z44aoiu4ywt6>
References: <20250527-add-venus-for-qcs615-v7-0-cca26e2768e3@xxxxxxxxxxx>
<20250527-add-venus-for-qcs615-v7-2-cca26e2768e3@xxxxxxxxxxx>
<429b4c99-b312-4015-8678-0371eac86de4@xxxxxxxxxxxxxxxx>
<6a9e7daf-c0df-42db-b02d-96d9893afcde@xxxxxxxxxxx>
<idc4476ibh4geraklzpas5536jnwvbp6xhjjaajcdcwxicorrf@myh7kyz77rxy>
<43e1f8db-5ab1-44ce-97c8-50910704788f@xxxxxxxxxxx>
<d6udpwmocodvlsm5ljqz7zbyonj2yahtlzmm2jjjveqrm2hmkz@andh5j4jgixr>
<9faff664-9717-4259-8b23-bc44e64f6947@xxxxxxxxxxx>
<77ea49c3-f042-4ba9-a0da-1d0e4e4088d3@xxxxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <77ea49c3-f042-4ba9-a0da-1d0e4e4088d3@xxxxxxxxxxxxxxxx>
X-Proofpoint-GUID: bDKk_XkzXIZQGOI5ximkCsqx8pCTqVuM
X-Authority-Analysis: v=2.4 cv=Qspe3Uyd c=1 sm=1 tr=0 ts=68404d03 cx=c_pps
a=HLyN3IcIa5EE8TELMZ618Q==:117 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10
a=6IFa9wvqVegA:10 a=COk6AnOGAAAA:8 a=i_0oWf60KM-UqR_2WRwA:9 a=3ZKOabzyN94A:10
a=QEXdDO2ut3YA:10 a=bTQJ7kPSJx9SKPbeHEYW:22 a=TjNXssC_j7lpFel5tvFf:22
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDEwNCBTYWx0ZWRfX79FSQCfMJjEe
IU695IXe0TngqHFOa2uePod/vhHm1ofk+DDpVs8EhqgDKeYpDDCwbv7Si7N59bELEtEM2xCPJdB
7jBX1txKuUu13jcri4vYilkdfgKDfyNqn9g6VwEpzDo5KJefA03jenjp5nNZY/afF4B4OuOp9Wv
LrL1Rtlj45U97M+2HAYPTU3n4Ts+1HL0H3bnLosVf5Uftw2cQftSSyGFzoJGErHRthBAsyKs0+9
h/WgVqOgJkUExRQR7tLV6ofGQtH9iBFstnV1m4QAbqCjLVtVRMOPz5Ad/4CZK4xw7ME0zs+cKpq
WidghZKGdnIMHcxEoWaZE+rt6JzWwY2BV07dw2TvUkv6hjU25b7IOISrgUniaKJUf/mNddgk4Mm
Ft4011NVICZbqp42AbQgllhbkA5we8LexBhLQUsI40k19vpvTT69xUesv9huH+QbBXvhVmsW
X-Proofpoint-ORIG-GUID: bDKk_XkzXIZQGOI5ximkCsqx8pCTqVuM
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
bulkscore=0 mlxscore=0 spamscore=0 priorityscore=1501 mlxlogscore=999
lowpriorityscore=0 suspectscore=0 impostorscore=0 malwarescore=0
clxscore=1015 adultscore=0 phishscore=0 classifier=spam authscore=0
authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1
engine=8.19.0-2505280000 definitions=main-2506040104
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 03:24:25PM +0200, Konrad Dybcio wrote:
On 6/4/25 2:05 PM, Renjiang Han wrote:
>
> On 6/3/2025 9:21 PM, Dmitry Baryshkov wrote:
>> On Thu, May 29, 2025 at 10:29:46AM +0800, Renjiang Han wrote:
>>> On 5/28/2025 7:04 PM, Dmitry Baryshkov wrote:
>>>> On Wed, May 28, 2025 at 05:13:06PM +0800, Renjiang Han wrote:
>>>>> On 5/27/2025 9:57 PM, Konrad Dybcio wrote:
>>>>>> On 5/27/25 5:32 AM, Renjiang Han wrote:
>>>>>>> Add the venus node to the devicetree for the qcs615 platform to enable
>>>>>>> video functionality. The qcs615 platform currently lacks video
>>>>>>> functionality due to the absence of the venus node. Fallback to sc7180 due
>>>>>>> to the same video core.
>>>>>>>
>>>>>>> Signed-off-by: Renjiang Han <quic_renjiang@xxxxxxxxxxx>
>>>>>>> ---
>>>>>> [...]
>>>>>>
>>>>>>> + interconnect-names = "video-mem",
>>>>>>> + "cpu-cfg";
>>>>>>> +
>>>>>>> + iommus = <&apps_smmu 0xe40 0x20>;
>>>>>> fwiw docs mention 0xe60 0x20 (which result in the exact same resulting sid)
>>>>> OK. Will update it with next version.
>>>> How would you update this?
>>> Thanks for your comments. I'll update it like this.
>>> iommus = <&apps_smmu 0xe60 0x20>;
>>>
>>> This 0xe40 SID was based on a previous project. However, after rechecking
>>> the documentation yesterday and confirming with colleagues, the correct
>>> SID value should be 0xe60. I’ve also validated it on local device, it
>>> works as expected. The reason 0xe40 seemed to work earlier is due to the
>>> mask value being 0x20, which causes the effective SID derived from 0xe40
>>> to be the same as 0xe60.
>> Using 0xe60 would be counterintuitive, as we have a non-zero masked bits
>> in the base value. It should be either <0xe60 0x0> or <0xe40 0x20>.
>
> Hi Dmitry
>
> Thank you for your comment.
>
> I’ve followed up on this sid with a colleague from the kernel team,
> and based on our discussion, it seems that the sid in this case should
> be the result sid. The actual sid is 0xe60, and with a mask of 0x20,
> the resulting sid would be 0xe40. Therefore, it should be <0xe40 0x20>.
>
> @Konrad, I’d appreciate any thoughts or suggestions you might have on it.
What our docs describe as 'result sid' is literally 'base ~& mask', so if
we used that, setting the mask would be useless..
Now, some old NHLOS builds are known to cause issues if the values aren't
exactly what they expect (some whitelisting must be going on there).
I don't think this should be an issue on this platform, but let's just
use 0xe60 0x20 here to reflect the real values
Isn't 0xe40 also 'real'?
--
With best wishes
Dmitry
Return-Path: <linux-kernel+bounces-673290-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 3403941E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:42:34 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id E5EDA3A2B45
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:42:11 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id A2A0F28FFCF;
Wed, 4 Jun 2025 13:42:27 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="ejPz2crY"
Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id DAB7D33DF
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:42:24 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.48
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749044546; cv=none; b=gwI0qJM6OmBtIIMYIpH182s9qYNFiVrtSCHy1nua3bHhyJ/DMwxBwHXAWuDIYzBOkfx3NHSCuQPIre5SVkxVteUS1szN0U27jVCWDdeFUmTjwZTrUWL9pOsdmal62MzJnwNcPcdga7U3IGBMyNmptyGyVtxNUnA3fUQFFZoV4WE=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749044546; c=relaxed/simple;
bh=dIABzik+Xpu8YPlwTdFf/8MsdySvzM2KB+LBe47QblU=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=F+Msg7F8ScjJEOJBqjwIY7j2z24NCEMgJLqMtv2adXmRidrzUhka0f2m7Yuq1Co95NDW6l4U653RTr+YB3TUtvcdW2t+HnGhCbbyDADKsCPMF9JoNzjG6gbxJTecfNw1UzsHmH4VYSLPOFIjMUm3fHLGJAeS/mdwgunextXEUgs=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=ejPz2crY; arc=none smtp.client-ip=209.85.221.48
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com
Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-3a375e72473so3976627f8f.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 06:42:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=suse.com; s=google; t=1749044543; x=1749649343; darn=vger.kernel.org;
h=in-reply-to:content-disposition:mime-version:references:message-id
:subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to;
bh=4krNLYqTu5PwEOLh0tYgHTp5VBnZZoifiHQYwqKpyGI=;
b=ejPz2crYxqiM5ee2GjwBptlCsRtZLdTE86Ds6mlULeCOLIxRaDeXyuGLCNRk66Ah7b
b2iYquU8MD+v4KJ70vTS7bPPxR5ZHt7TYZu5+yd76gYLmtL7vx68E8MKDXAAf/qSsX4U
xhZX8T05hPnPC9D7zeu5l2maVyqLlUPdVRoAzhFtxBLrq3LxunOFppY0uA2mPWD/ZPDi
Cvu0WPFc0ZQeTsqd/Sb56df7Yx9sxUXbjRzOSCDSAp7PxamDdHZm/xxYbBJTzLHG7NK2
hcpimXO9HvDHNNbr1WBsN6boMYDKYeTidtkRiT5vwwPOHCZp2K93ibobGRztLq24qEb3
ooRw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749044543; x=1749649343;
h=in-reply-to:content-disposition:mime-version:references:message-id
:subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to;
bh=4krNLYqTu5PwEOLh0tYgHTp5VBnZZoifiHQYwqKpyGI=;
b=Gl6Kl7hxJPPJeN6dP5oEfqV1/HkFiWSdl2C/5grayNdlGMHG/dimeeZqETDPdatKwx
Y5gbX06jzU7vd+diXW5cSCMDkMYdNcEIGnurrHjjORjAiN/6TDxvvPEKiPWDBmqd8nxf
MAcQZkpv4WisergFuG33X+f7fbwK719YyEMMKdrK1jQsQsA5YO8/VcIUHDpvHP/1tupo
g13RbcEpf5ATRlPCPjLNYIGD8+5teuGFYM/93XvzVFcr7kSqYBdrpgEGgF4KXYIBDb+t
zEe0r22cZh7RWaR/HmgE/ju3NoE8PyoFx3usKHkiXXm1tSVtQHs9FI5Sl1EyhwVYg0Hg
MVQg==
X-Forwarded-Encrypted: i=1; AJvYcCVolpCH55OH2gEPfU4vy9/jto6aWJ76bClpFD7xVt27vFDSA12b5V1gzQnwynMQ6B2eDQoW7Xrk6jS24EU=@vger.kernel.org
X-Gm-Message-State: AOJu0YzRDJxVR4Vg+3khkB3qwGwuC2UfWyD+T5xQ5RN/wfhtneJ9VLyP
UkJPP0LubX1aSbdKmqa1K9OUOcxqnyypHJ5ZkEy0QBCrg2brL+CgTkGVOvD76aLxG7o=
X-Gm-Gg: ASbGncux048pTuBqRV636gC/MKfDQXzvSTtBC/UTZNi71HWW1/ErMu8S3hiAYTucqjH
hxDLkrhi2WfTAGYkKC13E/OBAvO1Nt219baVZmsE/VhE9of2BFVtTCc2+tySnAutQ13JUXHX7GF
d69EN1cEH2eGZArybqaG3PRc6i5LtBczWEBJ7J9lphzvrhw0j146WZngAYuSa4y3GN5WGSgzDrn
5CN/tGTcBX2/4CtmXGVbLSQqkZbRYmW2wTtuh7PY1SYh1fypcDVXyFX7V5By84ADSw5HkvQMGiR
VQh85eF3ZCINqklwix2JU7bt+Y08oHk/k3jd7+ne7PIMzFawUs4PEA==
X-Google-Smtp-Source: AGHT+IFBf1ks7FvkIM9/KgiSH1Nm0ceyhd9C2E9/xug+Okpyo/jMkoHYpfHI27ynqCD67VSiZ+dtUg==
X-Received: by 2002:a5d:588d:0:b0:3a4:f7dc:8a62 with SMTP id ffacd0b85a97d-3a51db2deedmr2311080f8f.0.1749044543082;
Wed, 04 Jun 2025 06:42:23 -0700 (PDT)
Received: from pathway.suse.cz ([176.114.240.130])
by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3124e32feecsm8910312a91.47.2025.06.04.06.42.12
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 06:42:22 -0700 (PDT)
Date: Wed, 4 Jun 2025 15:42:04 +0200
From: Petr Mladek <pmladek@xxxxxxxx>
To: John Ogness <john.ogness@xxxxxxxxxxxxx>
Cc: "Toshiyuki Sato (Fujitsu)" <fj6611ie@xxxxxxxxxxx>,
'Michael Kelley' <mhklinux@xxxxxxxxxxx>,
'Ryo Takakura' <ryotkkr98@xxxxxxxxx>,
Russell King <linux@xxxxxxxxxxxxxxx>,
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>,
Jiri Slaby <jirislaby@xxxxxxxxxx>,
"linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>,
"linux-serial@xxxxxxxxxxxxxxx" <linux-serial@xxxxxxxxxxxxxxx>,
"linux-arm-kernel@xxxxxxxxxxxxxxxxxxx" <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: Problem with nbcon console and amba-pl011 serial port
Message-ID: <aEBNLMYVUOGzusuR@xxxxxxxxxxxxxxx>
References: <SN6PR02MB4157A4C5E8CB219A75263A17D46DA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
<OS7PR01MB13775FE1A20762D1EA4A38D0ED76DA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
<84y0u95e0j.fsf@xxxxxxxxxxxxxxxxxxxxx>
<84plfl5bf1.fsf@xxxxxxxxxxxxxxxxxxxxx>
<TY4PR01MB13777674C22721FCD8ACF4FCCD76CA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
<aEApOPTqbVOR35F_@xxxxxxxxxxxxxxx>
<84o6v3ohdh.fsf@xxxxxxxxxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <84o6v3ohdh.fsf@xxxxxxxxxxxxxxxxxxxxx>
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed 2025-06-04 13:56:34, John Ogness wrote:
On 2025-06-04, Petr Mladek <pmladek@xxxxxxxx> wrote:
> On Wed 2025-06-04 04:11:10, Toshiyuki Sato (Fujitsu) wrote:
>> > On 2025-06-03, John Ogness <john.ogness@xxxxxxxxxxxxx> wrote:
>> > > On 2025-06-03, "Toshiyuki Sato (Fujitsu)" <fj6611ie@xxxxxxxxxxx> wrote:
>> > >>> 4. pr_emerg() has a high logging level, and it effectively steals the console
>> > >>> from the "pr/ttyAMA0" task, which I believe is intentional in the nbcon
>> > design.
>> > >>> Down in pl011_console_write_thread(), the "pr/ttyAMA0" task is doing
>> > >>> nbcon_enter_unsafe() and nbcon_exit_unsafe() around each character
>> > >>> that it outputs. When pr_emerg() steals the console, nbcon_exit_unsafe()
>> > >>> returns 0, so the "for" loop exits. pl011_console_write_thread() then
>> > >>> enters a busy "while" loop waiting to reclaim the console. It's doing this
>> > >>> busy "while" loop with interrupts disabled, and because of the panic,
>> > >>> it never succeeds.
>
> I am a bit surprised that it never succeeds. The panic CPU takes over
> the ownership but it releases it when the messages are flushed. And
> the original owner should be able to reacquire it in this case.
The problem is that other_cpu_in_panic() will return true forever, which
will cause _all_ acquires to fail forever. Originally we did allow
non-panic to take over again after panic releases ownership. But IIRC we
removed that capability because it allowed us to reduce a lot of
complexity. And now nbcon_waiter_matches() relies on "Lower priorities
are ignored during panic() until reboot."
Great catch! I forgot it. And it explains everything.
It would be nice to mention this in the commit message or
in the comment above nbcon_reacquire_nobuf().
My updated prosal of the comment is:
* Return: True when the context reacquired the owner ship. The caller
* might try entering the unsafe state and restore the original
* console device setting. It must not access the output buffer
* anymore.
*
* False when another CPU is in panic(). nbcon_try_acquire()
* would never succeed and the infinite loop would prevent
* stopping this CPU on architectures without proper NMI.
* The caller should bail out immediately without
* touching the console device or the output buffer.
Best Regards,
Petr
Return-Path: <linux-kernel+bounces-673291-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 607A041E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:44:15 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 9A38D189545A
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:44:18 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id F13DE29008F;
Wed, 4 Jun 2025 13:43:54 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PmUWSekf"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2B67E28FAB3;
Wed, 4 Jun 2025 13:43:53 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749044634; cv=none; b=ZE7R8tn1IW+92S7ees4gq7cbNcAQB8Ib5f137KT9AZsZTkpRAgvy+0LShOHGNF29UhNssjpXCViGnRJL6AvcCiZbbsZaA4/+7dBQNuPZtc0KQ91ySZ0kMgZkv9INGMszi8/cKEQMzC+h+N/fY2bcWy3E9AiIsHXrHvU2SmDAqW8=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749044634; c=relaxed/simple;
bh=P+lH2ko8gaskpFvOoIGVplo2oG0ShWHoC4Hb2rcnhos=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=JU19VlJwP5hA/QuzDpLwzrwrXoEOxGVomWnR1e0wJPwpELT1hHEPHkj1JgN1JezbmUfnHuWwV0YYrWaFpeznlT5QZSwpmpGAU8DyjRljzvmKAJ4VgMa7fV/HwDZ9ag+hDrEogWaAtZucKNPzXyHCzGukBOBP88Nq3/2PeNNssXA=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PmUWSekf; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id B05BBC4CEE7;
Wed, 4 Jun 2025 13:43:50 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749044633;
bh=P+lH2ko8gaskpFvOoIGVplo2oG0ShWHoC4Hb2rcnhos=;
h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
b=PmUWSekfAl95RaHPAiN2mMrc4fFPSm/r50eHrN9KKSjct6LMlgETWQQ4Xng5WYKhc
SNi8UsM7lMYsIT0P54jKvnYrqpZONdQIVZDWU0BUFxMM3m8kOYCnXBGp3feLgvN6Iw
Hyf5cXhv/zkJwnYEvbM3lw9P1ypJ3I87YIQbO3uWtO0may8qkRhzT64E99+dVP9HlP
FkC5IOWh4aw0bST34Pj7EPAQqJTDgiWoG+EmtlKQ0hlWsvKDVRqb74fqBqYjANuxih
B3J/O4gA7S+Grkzwiuu/K05PK+zEwM5DJ9U3VsJvOXvG/PnHwEx4flmSag+3MIAfi0
t72HsDfKiyo7A==
Date: Wed, 4 Jun 2025 14:43:47 +0100
From: Lee Jones <lee@xxxxxxxxxx>
To: David Laight <david.laight.linux@xxxxxxxxx>
Cc: "David S. Miller" <davem@xxxxxxxxxxxxx>,
Eric Dumazet <edumazet@xxxxxxxxxx>,
Jakub Kicinski <kuba@xxxxxxxxxx>, Paolo Abeni <pabeni@xxxxxxxxxx>,
Christian Brauner <brauner@xxxxxxxxxx>,
Kuniyuki Iwashima <kuniyu@xxxxxxxxxx>,
Alexander Mikhalitsyn <aleksandr.mikhalitsyn@xxxxxxxxxxxxx>,
Jens Axboe <axboe@xxxxxxxxx>, Sasha Levin <sashal@xxxxxxxxxx>,
Michal Luczaj <mhal@xxxxxxx>, Rao Shoaib <Rao.Shoaib@xxxxxxxxxx>,
Simon Horman <horms@xxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx,
netdev@xxxxxxxxxxxxxxx, stable@xxxxxxxxxxxxxxx
Subject: Re: [PATCH v6.1 05/27] af_unix: Replace BUG_ON() with WARN_ON_ONCE().
Message-ID: <20250604134347.GH7758@xxxxxxxxxx>
References: <20250521152920.1116756-1-lee@xxxxxxxxxx>
<20250521152920.1116756-6-lee@xxxxxxxxxx>
<20250523221418.6de8c601@pumpkin>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <20250523221418.6de8c601@pumpkin>
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Fri, 23 May 2025, David Laight wrote:
On Wed, 21 May 2025 16:27:04 +0100
Lee Jones <lee@xxxxxxxxxx> wrote:
> From: Kuniyuki Iwashima <kuniyu@xxxxxxxxxx>
>
> [ Upstream commit d0f6dc26346863e1f4a23117f5468614e54df064 ]
>
> This is a prep patch for the last patch in this series so that
> checkpatch will not warn about BUG_ON().
Does any of this actually make any sense?
Either the BUG_ON() should be just deleted because it can't happen
(or doesn't matter) or there should be an error path.
Blindly replacing with WARN_ON_ONCE() can't be right.
The last change (repeated here)
> if (u) {
> - BUG_ON(!u->inflight);
> - BUG_ON(list_empty(&u->link));
> + WARN_ON_ONCE(!u->inflight);
> + WARN_ON_ONCE(list_empty(&u->link));
>
> u->inflight--;
> if (!u->inflight)
is clearly just plain wrong.
If 'inflight' is zero then 'decrementing' it to ~0 is just going
to 'crash and burn' very badly not much later on.
All of this gets removed in patch 20, so I fear the point is moot.
--
Lee Jones [李琼斯]
Return-Path: <linux-kernel+bounces-673292-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 83B6A41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:46:33 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 2AF547A27BA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:45:13 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 39D5228FA87;
Wed, 4 Jun 2025 13:46:21 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="yZGh7dyN";
dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="T99duzdA";
dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="yZGh7dyN";
dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="T99duzdA"
Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 99CDF4C7C
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:46:18 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749044780; cv=none; b=iLfN4zkEAAFwXdT1P48Iy+0qDLO2+wpeCC3MLZnmMjyfyni+bXiAOCTBMXt6pppYsdijtCzxI/bdcZKOQFOY9J6ZxcFwjx8qqmcI+zUEV9EivuByOwzjCw9y7J2NbmJIzDOXSnF+h5LNCGzHM2VGqvxik2Z46IdgQ9B1vbWb3Pg=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749044780; c=relaxed/simple;
bh=YJPOsL22ThpRGTAEU8zCPpChahGMKoCsqZagO3a+IMQ=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=O0eERdxu7/PTehL0B55E+uQWAFH2+jEFTKBwA/Cr6GaUHZVlotd3sfcryrLfYDUI7NPZ/xF8RVTd82Q9OO2Kj3CwSE85cGWr6KKlwDALRk9UbIy3CgO/Mza3ZQoERpVxqYOdx1MOoGVuQfPeszJXQ3e8kesV/th1HitmdAcObc0=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz; spf=pass smtp.mailfrom=suse.cz; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=yZGh7dyN; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=T99duzdA; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=yZGh7dyN; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=T99duzdA; arc=none smtp.client-ip=195.135.223.131
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.cz
Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(No client certificate requested)
by smtp-out2.suse.de (Postfix) with ESMTPS id BA9C51F7E3;
Wed, 4 Jun 2025 13:46:15 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa;
t=1749044775; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=Cs31b9zVXZaeOwnSQ6nLcuIEQJuLmUfOSWuYO7gkuL8=;
b=yZGh7dyNbUA7BrgsEqQbtrnHLDJ3j0WWnUyF/riXUWJZq9tsifTTMHwiCOBsHqsS7RnnS1
vrriw6lscswHAQ5ead4+eSZxJ1MNrmRp4JCiIg7WierHw9ko4tIGwoKT8sP9q13WKyQC3R
v8VYfVElPUrgfQ2RP+tgi3SH7h3O0H4=
DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz;
s=susede2_ed25519; t=1749044775;
h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=Cs31b9zVXZaeOwnSQ6nLcuIEQJuLmUfOSWuYO7gkuL8=;
b=T99duzdAdlq1noE6JJF8h/vDYXrjG/ipbxDbNOTxZ4HYLWHWOfL8VyZo0OAqH8Y8d/AqhR
puyNuH5jhrUpcKCA==
Authentication-Results: smtp-out2.suse.de;
none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa;
t=1749044775; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=Cs31b9zVXZaeOwnSQ6nLcuIEQJuLmUfOSWuYO7gkuL8=;
b=yZGh7dyNbUA7BrgsEqQbtrnHLDJ3j0WWnUyF/riXUWJZq9tsifTTMHwiCOBsHqsS7RnnS1
vrriw6lscswHAQ5ead4+eSZxJ1MNrmRp4JCiIg7WierHw9ko4tIGwoKT8sP9q13WKyQC3R
v8VYfVElPUrgfQ2RP+tgi3SH7h3O0H4=
DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz;
s=susede2_ed25519; t=1749044775;
h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=Cs31b9zVXZaeOwnSQ6nLcuIEQJuLmUfOSWuYO7gkuL8=;
b=T99duzdAdlq1noE6JJF8h/vDYXrjG/ipbxDbNOTxZ4HYLWHWOfL8VyZo0OAqH8Y8d/AqhR
puyNuH5jhrUpcKCA==
Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(No client certificate requested)
by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 98FA213A63;
Wed, 4 Jun 2025 13:46:15 +0000 (UTC)
Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167])
by imap1.dmz-prg2.suse.org with ESMTPSA
id CCSLJCdOQGhzaQAAD6G6ig
(envelope-from <vbabka@xxxxxxx>); Wed, 04 Jun 2025 13:46:15 +0000
Message-ID: <1aa7c368-c37f-4b00-876c-dcf51a523c42@xxxxxxx>
Date: Wed, 4 Jun 2025 15:46:15 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH] mm: fix the inaccurate memory statistics issue for users
Content-Language: en-US
To: Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx>,
Shakeel Butt <shakeel.butt@xxxxxxxxx>, Michal Hocko <mhocko@xxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, david@xxxxxxxxxx,
lorenzo.stoakes@xxxxxxxxxx, Liam.Howlett@xxxxxxxxxx, rppt@xxxxxxxxxx,
surenb@xxxxxxxxxx, donettom@xxxxxxxxxxxxx, aboorvad@xxxxxxxxxxxxx,
sj@xxxxxxxxxx, linux-mm@xxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
References: <4f0fd51eb4f48c1a34226456b7a8b4ebff11bf72.1748051851.git.baolin.wang@xxxxxxxxxxxxxxxxx>
<20250529205313.a1285b431bbec2c54d80266d@xxxxxxxxxxxxxxxxxxxx>
<aDm1GCV8yToFG1cq@tiehlicka>
<72f0dc8c-def3-447c-b54e-c390705f8c26@xxxxxxxxxxxxxxxxx>
<aD6vHzRhwyTxBqcl@tiehlicka>
<ef2c9e13-cb38-4447-b595-f461f3f25432@xxxxxxxxxxxxxxxxx>
<aD7OM5Mrg5jnEnBc@tiehlicka>
<7307bb7a-7c45-43f7-b073-acd9e1389000@xxxxxxxxxxxxxxxxx>
<aD8LKHfCca1wQ5pS@tiehlicka>
<obfnlpvc4tmb6gbd4mw7h7jamp3kouyhnpl4cusetyctswznod@yr6dyrsbay6w>
<250ec733-8b2d-4c56-858c-6aada9544a55@xxxxxxxxxxxxxxxxx>
From: Vlastimil Babka <vbabka@xxxxxxx>
Autocrypt: addr=vbabka@xxxxxxx; keydata=
xsFNBFZdmxYBEADsw/SiUSjB0dM+vSh95UkgcHjzEVBlby/Fg+g42O7LAEkCYXi/vvq31JTB
KxRWDHX0R2tgpFDXHnzZcQywawu8eSq0LxzxFNYMvtB7sV1pxYwej2qx9B75qW2plBs+7+YB
87tMFA+u+L4Z5xAzIimfLD5EKC56kJ1CsXlM8S/LHcmdD9Ctkn3trYDNnat0eoAcfPIP2OZ+
9oe9IF/R28zmh0ifLXyJQQz5ofdj4bPf8ecEW0rhcqHfTD8k4yK0xxt3xW+6Exqp9n9bydiy
tcSAw/TahjW6yrA+6JhSBv1v2tIm+itQc073zjSX8OFL51qQVzRFr7H2UQG33lw2QrvHRXqD
Ot7ViKam7v0Ho9wEWiQOOZlHItOOXFphWb2yq3nzrKe45oWoSgkxKb97MVsQ+q2SYjJRBBH4
8qKhphADYxkIP6yut/eaj9ImvRUZZRi0DTc8xfnvHGTjKbJzC2xpFcY0DQbZzuwsIZ8OPJCc
LM4S7mT25NE5kUTG/TKQCk922vRdGVMoLA7dIQrgXnRXtyT61sg8PG4wcfOnuWf8577aXP1x
6mzw3/jh3F+oSBHb/GcLC7mvWreJifUL2gEdssGfXhGWBo6zLS3qhgtwjay0Jl+kza1lo+Cv
BB2T79D4WGdDuVa4eOrQ02TxqGN7G0Biz5ZLRSFzQSQwLn8fbwARAQABzSBWbGFzdGltaWwg
QmFia2EgPHZiYWJrYUBzdXNlLmN6PsLBlAQTAQoAPgIbAwULCQgHAwUVCgkICwUWAgMBAAIe
AQIXgBYhBKlA1DSZLC6OmRA9UCJPp+fMgqZkBQJnyBr8BQka0IFQAAoJECJPp+fMgqZkqmMQ
AIbGN95ptUMUvo6aAdhxaOCHXp1DfIBuIOK/zpx8ylY4pOwu3GRe4dQ8u4XS9gaZ96Gj4bC+
jwWcSmn+TjtKW3rH1dRKopvC07tSJIGGVyw7ieV/5cbFffA8NL0ILowzVg8w1ipnz1VTkWDr
2zcfslxJsJ6vhXw5/npcY0ldeC1E8f6UUoa4eyoskd70vO0wOAoGd02ZkJoox3F5ODM0kjHu
Y97VLOa3GG66lh+ZEelVZEujHfKceCw9G3PMvEzyLFbXvSOigZQMdKzQ8D/OChwqig8wFBmV
QCPS4yDdmZP3oeDHRjJ9jvMUKoYODiNKsl2F+xXwyRM2qoKRqFlhCn4usVd1+wmv9iLV8nPs
2Db1ZIa49fJet3Sk3PN4bV1rAPuWvtbuTBN39Q/6MgkLTYHb84HyFKw14Rqe5YorrBLbF3rl
M51Dpf6Egu1yTJDHCTEwePWug4XI11FT8lK0LNnHNpbhTCYRjX73iWOnFraJNcURld1jL1nV
r/LRD+/e2gNtSTPK0Qkon6HcOBZnxRoqtazTU6YQRmGlT0v+rukj/cn5sToYibWLn+RoV1CE
Qj6tApOiHBkpEsCzHGu+iDQ1WT0Idtdynst738f/uCeCMkdRu4WMZjteQaqvARFwCy3P/jpK
uvzMtves5HvZw33ZwOtMCgbpce00DaET4y/UzsBNBFsZNTUBCACfQfpSsWJZyi+SHoRdVyX5
J6rI7okc4+b571a7RXD5UhS9dlVRVVAtrU9ANSLqPTQKGVxHrqD39XSw8hxK61pw8p90pg4G
/N3iuWEvyt+t0SxDDkClnGsDyRhlUyEWYFEoBrrCizbmahOUwqkJbNMfzj5Y7n7OIJOxNRkB
IBOjPdF26dMP69BwePQao1M8Acrrex9sAHYjQGyVmReRjVEtv9iG4DoTsnIR3amKVk6si4Ea
X/mrapJqSCcBUVYUFH8M7bsm4CSxier5ofy8jTEa/CfvkqpKThTMCQPNZKY7hke5qEq1CBk2
wxhX48ZrJEFf1v3NuV3OimgsF2odzieNABEBAAHCwXwEGAEKACYCGwwWIQSpQNQ0mSwujpkQ
PVAiT6fnzIKmZAUCZ8gcVAUJFhTonwAKCRAiT6fnzIKmZLY8D/9uo3Ut9yi2YCuASWxr7QQZ
lJCViArjymbxYB5NdOeC50/0gnhK4pgdHlE2MdwF6o34x7TPFGpjNFvycZqccSQPJ/gibwNA
zx3q9vJT4Vw+YbiyS53iSBLXMweeVV1Jd9IjAoL+EqB0cbxoFXvnjkvP1foiiF5r73jCd4PR
rD+GoX5BZ7AZmFYmuJYBm28STM2NA6LhT0X+2su16f/HtummENKcMwom0hNu3MBNPUOrujtW
khQrWcJNAAsy4yMoJ2Lw51T/5X5Hc7jQ9da9fyqu+phqlVtn70qpPvgWy4HRhr25fCAEXZDp
xG4RNmTm+pqorHOqhBkI7wA7P/nyPo7ZEc3L+ZkQ37u0nlOyrjbNUniPGxPxv1imVq8IyycG
AN5FaFxtiELK22gvudghLJaDiRBhn8/AhXc642/Z/yIpizE2xG4KU4AXzb6C+o7LX/WmmsWP
Ly6jamSg6tvrdo4/e87lUedEqCtrp2o1xpn5zongf6cQkaLZKQcBQnPmgHO5OG8+50u88D9I
rywqgzTUhHFKKF6/9L/lYtrNcHU8Z6Y4Ju/MLUiNYkmtrGIMnkjKCiRqlRrZE/v5YFHbayRD
dJKXobXTtCBYpLJM4ZYRpGZXne/FAtWNe4KbNJJqxMvrTOrnIatPj8NhBVI0RSJRsbilh6TE
m6M14QORSWTLRg==
In-Reply-To: <250ec733-8b2d-4c56-858c-6aada9544a55@xxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Score: -4.29
X-Spamd-Result: default: False [-4.29 / 50.00];
BAYES_HAM(-3.00)[99.99%];
NEURAL_HAM_LONG(-1.00)[-1.000];
NEURAL_HAM_SHORT(-0.19)[-0.968];
MIME_GOOD(-0.10)[text/plain];
MID_RHS_MATCH_FROM(0.00)[];
RCVD_VIA_SMTP_AUTH(0.00)[];
MIME_TRACE(0.00)[0:+];
ARC_NA(0.00)[];
RCPT_COUNT_TWELVE(0.00)[15];
RCVD_TLS_ALL(0.00)[];
DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519];
FUZZY_BLOCKED(0.00)[rspamd.com];
FROM_HAS_DN(0.00)[];
TO_DN_SOME(0.00)[];
FROM_EQ_ENVFROM(0.00)[];
TO_MATCH_ENVRCPT_ALL(0.00)[];
RCVD_COUNT_TWO(0.00)[2];
DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo]
X-Spam-Level:
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 6/4/25 14:46, Baolin Wang wrote:
Baolin, please run stress-ng command that stresses minor anon page
faults in multiple threads and then run multiple bash scripts which cat
/proc/pidof(stress-ng)/status. That should be how much the stress-ng
process is impacted by the parallel status readers versus without them.
Sure. Thanks Shakeel. I run the stress-ng with the 'stress-ng --fault 32
--perf -t 1m' command, while simultaneously running the following
scripts to read the /proc/pidof(stress-ng)/status for each thread.
How many of those scripts?
From the following data, I did not observe any obvious impact of this
patch on the stress-ng tests when repeatedly reading the
/proc/pidof(stress-ng)/status.
w/o patch
stress-ng: info: [6891] 3,993,235,331,584 CPU Cycles
59.767 B/sec
stress-ng: info: [6891] 1,472,101,565,760 Instructions
22.033 B/sec (0.369 instr. per cycle)
stress-ng: info: [6891] 36,287,456 Page Faults Total
0.543 M/sec
stress-ng: info: [6891] 36,287,456 Page Faults Minor
0.543 M/sec
w/ patch
stress-ng: info: [6872] 4,018,592,975,968 CPU Cycles
60.177 B/sec
stress-ng: info: [6872] 1,484,856,150,976 Instructions
22.235 B/sec (0.369 instr. per cycle)
stress-ng: info: [6872] 36,547,456 Page Faults Total
0.547 M/sec
stress-ng: info: [6872] 36,547,456 Page Faults Minor
0.547 M/sec
=========================
#!/bin/bash
# Get the PIDs of stress-ng processes
PIDS=$(pgrep stress-ng)
# Loop through each PID and monitor /proc/[pid]/status
for PID in $PIDS; do
while true; do
cat /proc/$PID/status
usleep 100000
Hm but this limits the reading to 10 per second? If we want to simulate an
adversary process, it should be without the sleeps I think?
done &
done
Return-Path: <linux-kernel+bounces-673293-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 555FE41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:47:50 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id E51CF1895048
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:48:03 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id D0C5B28F935;
Wed, 4 Jun 2025 13:47:41 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="iSPx61pu"
Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1F2FE4C7C;
Wed, 4 Jun 2025 13:47:38 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.251.105.195
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749044861; cv=none; b=hA4bOztoyzESmbINId5Xlm8Y0dV/rdR1lp8+Db+LHtPbOtwUFbv/wKcN6ZvE7Yu6y80yLdUCotIfTC41CZW4nWtTZ2pHJiP+9Al6mgWoDDRW568pyCcTTqKC+yQ3eUY1KCD+KEoje4zFlx6XrK//H+1kEM+O1AEXtL+IvCspu88=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749044861; c=relaxed/simple;
bh=qAWE4ZHvfBr8J312bFyemArwB1AHHgZ8BFzkRR7+v30=;
h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References:
Content-Type:MIME-Version; b=n0Mg/0FfX0g3wUVXjVIGdlD8E0WRgy5NM0SJ6r2Vo7u/ETmHPJjH7ynPhMaTAOnxqTTtm7ZoocYnoeYqlJGiHjZ6RfrdIJo2L2a+VXVK/Ea0myjzST5n+9MXbXhd25T14Sbu563I0AQdKMrbpx7Hre4xMADK892qOnLfZXCeGFI=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=iSPx61pu; arc=none smtp.client-ip=148.251.105.195
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=collabora.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com;
s=mail; t=1749044857;
bh=qAWE4ZHvfBr8J312bFyemArwB1AHHgZ8BFzkRR7+v30=;
h=Subject:From:To:Cc:Date:In-Reply-To:References:From;
b=iSPx61pu5tgpGOmLaiVA37WIJDdHSlCglJ/lyW3CP9UNjbR6gLyO6gDnwVBFTg9q0
W8TCw3zcHNG8Zomc6hu3akBb6JEJuQ62UM1nGuhbTDnmoVHxiio1DDHLFlNbC7BwHM
swjYb17yxteN65Hic0TDuduoSxY1F2ICw6wyOMg3oEUIJWkC8LEZfXoVKuAc9PSvaa
zevhXDccaHcaFGkclWjrqjL4R3thck4We+IJGC9QSDl2cYFU+NzYDjTCjl3DFnvd9U
Ren8K2RGYeCnG9Ivp/U1roEPdIgtOkcVAUBGOh1nNHtGpZokgbIQx0Vvakkj1DVIII
GKmzy+OwFR45Q==
Received: from [IPv6:2606:6d00:10:5285::5ac] (unknown [IPv6:2606:6d00:10:5285::5ac])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(No client certificate requested)
(Authenticated sender: nicolas)
by bali.collaboradmins.com (Postfix) with ESMTPSA id 18B2D17E0C87;
Wed, 4 Jun 2025 15:47:35 +0200 (CEST)
Message-ID: <1318bd68f2d60b9d44cb22bd90b92399311f0b00.camel@xxxxxxxxxxxxx>
Subject: Re: [PATCH v2 2/7] media: chips-media: wave5: Improve performance
of decoder
From: Nicolas Dufresne <nicolas.dufresne@xxxxxxxxxxxxx>
To: "jackson.lee" <jackson.lee@xxxxxxxxxxxxxxx>, "mchehab@xxxxxxxxxx"
<mchehab@xxxxxxxxxx>, "hverkuil-cisco@xxxxxxxxx"
<hverkuil-cisco@xxxxxxxxx>, "bob.beckett@xxxxxxxxxxxxx"
<bob.beckett@xxxxxxxxxxxxx>
Cc: "linux-media@xxxxxxxxxxxxxxx" <linux-media@xxxxxxxxxxxxxxx>,
"linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>,
"lafley.kim" <lafley.kim@xxxxxxxxxxxxxxx>, "b-brnich@xxxxxx"
<b-brnich@xxxxxx>, "hverkuil@xxxxxxxxx" <hverkuil@xxxxxxxxx>, Nas Chung
<nas.chung@xxxxxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 09:47:34 -0400
In-Reply-To: <SE1P216MB13033207BDFE2A6BCC48999EED6CA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20250522072606.51-1-jackson.lee@xxxxxxxxxxxxxxx>
<20250522072606.51-3-jackson.lee@xxxxxxxxxxxxxxx>
<3afbd0253fabcf9f8795ab2231107e2e9da012cc.camel@xxxxxxxxxxxxx>
<SE1P216MB1303C1D1C2A9FA165A01B71AED64A@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
<03a87e1c9e8f77887c2457b9c3fcbf0c6a6cf287.camel@xxxxxxxxxxxxx>
<SE1P216MB13033207BDFE2A6BCC48999EED6CA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Organization: Collabora Canada
Content-Type: text/plain; charset="UTF-8"
User-Agent: Evolution 3.56.2 (3.56.2-1.fc42)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Le mercredi 04 juin 2025 à 04:09 +0000, jackson.lee a écrit :
> Running in loop anything is never the right approach. The device_run()
> should be run when a useful event occur and filtered by the job_ready()
> ops. I believe I'm proposing some hint how to solve this design issue. The
> issue is quite clear with the follow up patch trying to reduce the CPU
> usage due to spinning.
Thanks for your feedback.
But there is one thing to say to you.
After receiving EOS from application, we have to periodically run the device_run
to send the DEC_PIC command so that VPU can trigger interrupt until getting all
decoded frames and EOS from Get_Result command.
So even if we sent EOS to VPU once, we should run the device_run function continuously,
the above code was added. If the job_ready returns false to prevent running the
device_run after sending EOS to VPU, then GStreamer pipeline will not be terminated
normally because of not receiving all decoded frames.
This, in my opinion, boils down to a small flaw, either in the firmware or the driver.
This is why there was this code:
-
- /*
- * During a resolution change and while draining, the firmware may flush
- * the reorder queue regardless of having a matching decoding operation
- * pending. Only terminate the job if there are no more IRQ coming.
- */
- wave5_vpu_dec_give_command(inst, DEC_GET_QUEUE_STATUS, &q_status);
- if (q_status.report_queue_count == 0 &&
- (q_status.instance_queue_count == 0 || dec_info.sequence_changed)) {
- dev_dbg(inst->dev->dev, "%s: finishing job.\n", __func__);
- pm_runtime_mark_last_busy(inst->dev->dev);
- pm_runtime_put_autosuspend(inst->dev->dev);
- v4l2_m2m_job_finish(inst->v4l2_m2m_dev, m2m_ctx);
- }
Which you removed in this patch, as it makes it impossible to utilise the HW queues.
In the specific case you described, if my memory is right, the CMD_STOP (EOS in your
terms) comes in race with the queue being consumed, leading to possibly having no
event to figure-out when we are done with that sequenece.
V4L2 M2M is all event based, and v4l2_m2m_job_finish() is one of those. But in the
new implementation, this event no longer correlate with the HW being idle.
This is fine, don't read me wrong. It now matches the driver being ready to try and
queue more work.
So my question is, is there a way to know, at CMD_STOP call, that the HW
has gone idle, and that no more events will allow handling the EOS case?
Nicolas
Return-Path: <linux-kernel+bounces-673294-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 320BB41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:49:13 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 5BBAA3A5C9D
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:48:51 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 283CA28F935;
Wed, 4 Jun 2025 13:49:05 +0000 (UTC)
Received: from mail-il1-f197.google.com (mail-il1-f197.google.com [209.85.166.197])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5487924B26
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:49:03 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.197
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749044944; cv=none; b=minHhaMhAjrPDz61bcQ2+YqpOEPh3Nt2keHpjSR23l2WS04e508zrjtZb08m1AeE+hwgPbrtw2zi8liwrf1MSRT/rXkl1+2A1NTBAqvpmMAGIjkS+yRze5gM0OUyZMlcGGBw15Hl9CqyV2+u+u4twNBASmCTD9z4i/Z+EkL1QYs=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749044944; c=relaxed/simple;
bh=E6AjJsZoQR7ATw1vqbUKxXWRnlc6fN/YqQrTu5Fj2JM=;
h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To:
Content-Type; b=B0y8mhK64KU31cu/31ZqGzvb8U+BSKg77nkqOpJuuoQ7xuyh4WQ9gx4OW1Ba/RXzxp6uX0tYoIZlb+u6ZznRH2B/lSaBWNVE9YkxHJIyFgDgRxDgQ/IWID4+5Q6cvJXljBPjrtd1TJqSBUEm5mw0bMVcRzEeLCtkWVw7oynaAuA=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.166.197
Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com
Received: by mail-il1-f197.google.com with SMTP id e9e14a558f8ab-3ddbfd1662cso5724315ab.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 06:49:03 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749044942; x=1749649742;
h=to:from:subject:message-id:in-reply-to:date:mime-version
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=N11uxGJUKeG559sG4Xn+XEgkd5khL+2AZw1RyfROMGw=;
b=mj6znGQWhc4aT4ywdEHYsPqmpE8WTh5eWq1xdxE7W5SA+dVdxUowaU/jjC7t6fKFYZ
iKet5dx666I3aNrg1L1G4X24xIfnpdElbqxd06l9eC3cK6BcHmgmebr/CoxRxnARljB3
eV9Ir3tPRXjTCyR5f4m+l6Y1dQy/ZgrAxawhJaAxjNJn0DZaHGg6fVw52mPsvZas9AIa
Hdi8XM1N1wAQ4SkcRaFxfUMyTSmUXIYHrcx/rq8PHFqvEi7ujsc4ZLq8RdD3yGxAzz42
z7CnLhTCr1IqJYyIvsH2sNCzRk8iUJsJUGNssa6YzhEJ0xQUPGbDh3r4Ji8lGo4Z/vpM
OgQw==
X-Forwarded-Encrypted: i=1; AJvYcCXRTe/7YYwtOpg/aEhHKDCwQ1v4r0Xnc+ZvzXU8PWkf/GiTqFFcI4e6hPbnCkEqJdQWkfZXe5R08SYah/0=@vger.kernel.org
X-Gm-Message-State: AOJu0Yx/1g8440pcQO6mzBrBPVA+LOC03H2PZyAx/qnHoWfslQp98+5R
aeUqP8kGVeoGbf8ok31xOWoWsygpfYj5fM9KuNCXyX4PAm6b9GJ3Vij9EOG7au3U+UOi5L1ApJJ
C4L8jg0IuNN5TlYbNvTeoj4H2KZs8jpF2YExZycDv3hOW+fNZjl4yj7DqaCY=
X-Google-Smtp-Source: AGHT+IHSSnUkFWqcgI/NtYmboP9G/XGenJErYrL412ddFEKsEXLA6AoH8cnZsc6pVZ4n+njQnEYpd/Nxew4+Rj19uLZbUqzVeV+R
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-Received: by 2002:a05:6e02:12cc:b0:3dd:8663:d19e with SMTP id
e9e14a558f8ab-3ddbee3d578mr27737905ab.10.1749044942381; Wed, 04 Jun 2025
06:49:02 -0700 (PDT)
Date: Wed, 04 Jun 2025 06:49:02 -0700
In-Reply-To: <66f7eee8.050a0220.4a974.0006.GAE@xxxxxxxxxx>
X-Google-Appengine-App-Id: s~syzkaller
X-Google-Appengine-App-Id-Alias: syzkaller
Message-ID: <68404ece.a00a0220.d4325.000d.GAE@xxxxxxxxxx>
Subject: Re: [syzbot] [mm?] INFO: rcu detected stall in vhci_release
From: syzbot <syzbot+46c3d1706c2d2688baba@xxxxxxxxxxxxxxxxxxxxxxxxx>
To: akpm@xxxxxxxxxxxxxxxxxxxx, bigeasy@xxxxxxxxxxxxx, bsegall@xxxxxxxxxx,
dietmar.eggemann@xxxxxxx, edumazet@xxxxxxxxxx, juri.lelli@xxxxxxxxxx,
kerneljasonxing@xxxxxxxxx, kuba@xxxxxxxxxx, linux-bluetooth@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx, luiz.dentz@xxxxxxxxx,
marcel@xxxxxxxxxxxx, mgorman@xxxxxxx, mingo@xxxxxxxxxx, mingo@xxxxxxxxxx,
pabeni@xxxxxxxxxx, peterz@xxxxxxxxxxxxx, rostedt@xxxxxxxxxxx,
syzkaller-bugs@xxxxxxxxxxxxxxxx, tglx@xxxxxxxxxxxxx,
vincent.guittot@xxxxxxxxxx, vschneid@xxxxxxxxxx
Content-Type: text/plain; charset="UTF-8"
X-Spam-Status: No, score=-0.5 required=5.0 tests=FROM_LOCAL_HEX,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SORTED_RECIPS,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no
version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
syzbot suspects this issue was fixed by commit:
commit 6d71a9c6160479899ee744d2c6d6602a191deb1f
Author: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Date: Thu Jan 9 10:59:59 2025 +0000
sched/fair: Fix EEVDF entity placement bug causing scheduling lag
bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=15a9780c580000
start commit: abf2050f51fd Merge tag 'media/v6.12-1' of git://git.kernel..
git tree: upstream
kernel config: https://syzkaller.appspot.com/x/.config?x=2a8c36c5e2b56016
dashboard link: https://syzkaller.appspot.com/bug?extid=46c3d1706c2d2688baba
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10564c80580000
If the result looks correct, please mark the issue as fixed by replying with:
#syz fix: sched/fair: Fix EEVDF entity placement bug causing scheduling lag
For information about bisection process see: https://goo.gl/tpsmEJ#bisection
Return-Path: <linux-kernel+bounces-673295-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 5AF6541E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:49:24 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id B6CB51723D6
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:49:24 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id B0B18290098;
Wed, 4 Jun 2025 13:49:11 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="fvV5xkP7"
Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0F79A290095
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:49:08 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.12
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749044950; cv=none; b=ChCP5s1m1z6hmIKBWA60SU5tqq8x25/NXDgQm2+QILkZNUSn6vzd0XpfnZ3DTkHUqywrzNVm+V0yHTUeVG4Ez9M15OlGlWd9mcFaFTeaczWdPH06Yt6OIXTyPec1r1iX+/J6RhPJ7E9fBVaY097DiRAII42VG9CFntwgwiXLTLM=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749044950; c=relaxed/simple;
bh=UBY8fN/ujpbbYuQ9ly/tFtHZuts70fGbr6bV/xBUPIs=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=drc3jEqr5xX3mYdKm+8BafSe2hM8HkY13IHlyWwT73Ml53a+StLUuh4PzIvQY3htGGd6wSUfwVdu8NkxBN36j8bQLlmFg3fxF1P79nDnRoj5A0Jv9S9WaQV8qmsMqYk2Gy3VasnVDde6Gx8ql5MFyi+P4rRkjq0BdrYMuUSVXTs=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=fvV5xkP7; arc=none smtp.client-ip=198.175.65.12
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
t=1749044949; x=1780580949;
h=date:from:to:cc:subject:message-id:references:
mime-version:in-reply-to;
bh=UBY8fN/ujpbbYuQ9ly/tFtHZuts70fGbr6bV/xBUPIs=;
b=fvV5xkP7rZgY2mSuRF3XoDDUaSnLYEi2RrZ7xnWTsrlTbK/6Qxwm30HK
TOvvVNP/i5eUMZFOUwdr62n3mKyI/he+WepnFTBvDXFS5IKundEH90N+M
FZ9bgLpxuNf692vplEpccqz4WjxerG5kJzP1gx8ezKAZpayhnZjshp+rB
0UR0IRfDZIxjIzEfST7mjOgqmcc+qQq3pdMzeh8n+DENqBczYguW7OgU2
PIMOxNZHAsMpYz34d3bNJX3JrVMthz3bWUAh+9BHVNG+PXuqHrfAuaLkf
cLpVvK92QQ9cUQByR7O/gN4iH41UXGbBpq3CnDpc/LY+J2Kun4nDWotpW
Q==;
X-CSE-ConnectionGUID: Cxg4mB0BQD2yhrBmGVDLvQ==
X-CSE-MsgGUID: U/XlA2y3TzSA8c/1cf6XNg==
X-IronPort-AV: E=McAfee;i="6800,10657,11454"; a="62517821"
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="62517821"
Received: from orviesa008.jf.intel.com ([10.64.159.148])
by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 06:48:56 -0700
X-CSE-ConnectionGUID: rw2xErw1TWSzxUt+ll06Gw==
X-CSE-MsgGUID: UDPRL3/dRVecVJb/bdzEMQ==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="146167544"
Received: from lkp-server01.sh.intel.com (HELO e8142ee1dce2) ([10.239.97.150])
by orviesa008.jf.intel.com with ESMTP; 04 Jun 2025 06:48:54 -0700
Received: from kbuild by e8142ee1dce2 with local (Exim 4.96)
(envelope-from <lkp@xxxxxxxxx>)
id 1uMoU8-0003Aj-0E;
Wed, 04 Jun 2025 13:48:52 +0000
Date: Wed, 4 Jun 2025 21:48:26 +0800
From: kernel test robot <lkp@xxxxxxxxx>
To: Baolin Liu <liubaolin12138@xxxxxxx>, lee@xxxxxxxxxx
Cc: oe-kbuild-all@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
liubaolin12138@xxxxxxx, Baolin Liu <liubaolin@xxxxxxxxxx>
Subject: Re: [PATCH v1] mfd: Remove unused of_node variables
Message-ID: <202506042124.mV2W3XrQ-lkp@xxxxxxxxx>
References: <20250604081043.802659-1-liubaolin12138@xxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20250604081043.802659-1-liubaolin12138@xxxxxxx>
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hi Baolin,
kernel test robot noticed the following build errors:
[auto build test ERROR on lee-mfd/for-mfd-next]
[also build test ERROR on lee-leds/for-leds-next lee-mfd/for-mfd-fixes tmlind-omap/for-next linus/master v6.15 next-20250604]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Baolin-Liu/mfd-Remove-unused-of_node-variables/20250604-161317
base: https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git for-mfd-next
patch link: https://lore.kernel.org/r/20250604081043.802659-1-liubaolin12138%40163.com
patch subject: [PATCH v1] mfd: Remove unused of_node variables
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20250604/202506042124.mV2W3XrQ-lkp@xxxxxxxxx/config)
compiler: alpha-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250604/202506042124.mV2W3XrQ-lkp@xxxxxxxxx/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202506042124.mV2W3XrQ-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
drivers/mfd/88pm860x-core.c: In function 'device_irq_init':
drivers/mfd/88pm860x-core.c:626:31: error: 'node' undeclared (first use in this function)
626 | irq_domain_add_legacy(node, nr_irqs, chip->irq_base, 0,
| ^~~~
drivers/mfd/88pm860x-core.c:626:31: note: each undeclared identifier is reported only once for each function it appears in
--
drivers/mfd/twl4030-irq.c: In function 'twl4030_init_irq':
drivers/mfd/twl4030-irq.c:693:31: error: 'node' undeclared (first use in this function); did you mean 'inode'?
693 | irq_domain_add_legacy(node, nr_irqs, irq_base, 0,
| ^~~~
| inode
drivers/mfd/twl4030-irq.c:693:31: note: each undeclared identifier is reported only once for each function it appears in
--
drivers/mfd/max8925-core.c: In function 'max8925_irq_init':
drivers/mfd/max8925-core.c:684:31: error: 'node' undeclared (first use in this function)
684 | irq_domain_add_legacy(node, MAX8925_NR_IRQS, chip->irq_base, 0,
| ^~~~
drivers/mfd/max8925-core.c:684:31: note: each undeclared identifier is reported only once for each function it appears in
vim +/node +626 drivers/mfd/88pm860x-core.c
837c8293ba24d0 Haojian Zhuang 2012-10-02 566
f791be492f76de Bill Pemberton 2012-11-19 567 static int device_irq_init(struct pm860x_chip *chip,
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 568 struct pm860x_platform_data *pdata)
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 569 {
2e57848fed7435 Lee Jones 2014-05-08 570 struct i2c_client *i2c = (chip->id == CHIP_PM8607) ?
2e57848fed7435 Lee Jones 2014-05-08 571 chip->client : chip->companion;
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 572 unsigned char status_buf[INT_STATUS_NUM];
2afa62ea76027b Haojian Zhuang 2010-02-08 573 unsigned long flags = IRQF_TRIGGER_FALLING | IRQF_ONESHOT;
837c8293ba24d0 Haojian Zhuang 2012-10-02 574 int data, mask, ret = -EINVAL;
837c8293ba24d0 Haojian Zhuang 2012-10-02 575 int nr_irqs, irq_base = -1;
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 576
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 577 mask = PM8607_B0_MISC1_INV_INT | PM8607_B0_MISC1_INT_CLEAR
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 578 | PM8607_B0_MISC1_INT_MASK;
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 579 data = 0;
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 580 chip->irq_mode = 0;
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 581 if (pdata && pdata->irq_mode) {
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 582 /*
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 583 * irq_mode defines the way of clearing interrupt. If it's 1,
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 584 * clear IRQ by write. Otherwise, clear it by read.
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 585 * This control bit is valid from 88PM8607 B0 steping.
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 586 */
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 587 data |= PM8607_B0_MISC1_INT_CLEAR;
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 588 chip->irq_mode = 1;
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 589 }
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 590 ret = pm860x_set_bits(i2c, PM8607_B0_MISC1, mask, data);
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 591 if (ret < 0)
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 592 goto out;
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 593
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 594 /* mask all IRQs */
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 595 memset(status_buf, 0, INT_STATUS_NUM);
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 596 ret = pm860x_bulk_write(i2c, PM8607_INT_MASK_1,
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 597 INT_STATUS_NUM, status_buf);
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 598 if (ret < 0)
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 599 goto out;
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 600
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 601 if (chip->irq_mode) {
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 602 /* clear interrupt status by write */
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 603 memset(status_buf, 0xFF, INT_STATUS_NUM);
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 604 ret = pm860x_bulk_write(i2c, PM8607_INT_STATUS1,
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 605 INT_STATUS_NUM, status_buf);
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 606 } else {
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 607 /* clear interrupt status by read */
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 608 ret = pm860x_bulk_read(i2c, PM8607_INT_STATUS1,
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 609 INT_STATUS_NUM, status_buf);
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 610 }
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 611 if (ret < 0)
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 612 goto out;
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 613
2afa62ea76027b Haojian Zhuang 2010-02-08 614 mutex_init(&chip->irq_lock);
837c8293ba24d0 Haojian Zhuang 2012-10-02 615
837c8293ba24d0 Haojian Zhuang 2012-10-02 616 if (pdata && pdata->irq_base)
837c8293ba24d0 Haojian Zhuang 2012-10-02 617 irq_base = pdata->irq_base;
837c8293ba24d0 Haojian Zhuang 2012-10-02 618 nr_irqs = ARRAY_SIZE(pm860x_irqs);
837c8293ba24d0 Haojian Zhuang 2012-10-02 619 chip->irq_base = irq_alloc_descs(irq_base, 0, nr_irqs, 0);
837c8293ba24d0 Haojian Zhuang 2012-10-02 620 if (chip->irq_base < 0) {
837c8293ba24d0 Haojian Zhuang 2012-10-02 621 dev_err(&i2c->dev, "Failed to allocate interrupts, ret:%d\n",
837c8293ba24d0 Haojian Zhuang 2012-10-02 622 chip->irq_base);
837c8293ba24d0 Haojian Zhuang 2012-10-02 623 ret = -EBUSY;
837c8293ba24d0 Haojian Zhuang 2012-10-02 624 goto out;
837c8293ba24d0 Haojian Zhuang 2012-10-02 625 }
837c8293ba24d0 Haojian Zhuang 2012-10-02 @626 irq_domain_add_legacy(node, nr_irqs, chip->irq_base, 0,
837c8293ba24d0 Haojian Zhuang 2012-10-02 627 &pm860x_irq_domain_ops, chip);
2afa62ea76027b Haojian Zhuang 2010-02-08 628 chip->core_irq = i2c->irq;
2afa62ea76027b Haojian Zhuang 2010-02-08 629 if (!chip->core_irq)
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 630 goto out;
2afa62ea76027b Haojian Zhuang 2010-02-08 631
2e57848fed7435 Lee Jones 2014-05-08 632 ret = request_threaded_irq(chip->core_irq, NULL, pm860x_irq,
2e57848fed7435 Lee Jones 2014-05-08 633 flags | IRQF_ONESHOT, "88pm860x", chip);
2afa62ea76027b Haojian Zhuang 2010-02-08 634 if (ret) {
2afa62ea76027b Haojian Zhuang 2010-02-08 635 dev_err(chip->dev, "Failed to request IRQ: %d\n", ret);
2afa62ea76027b Haojian Zhuang 2010-02-08 636 chip->core_irq = 0;
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 637 }
2afa62ea76027b Haojian Zhuang 2010-02-08 638
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 639 return 0;
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 640 out:
2afa62ea76027b Haojian Zhuang 2010-02-08 641 chip->core_irq = 0;
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 642 return ret;
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 643 }
5c42e8c4a9c86e Haojian Zhuang 2009-12-15 644
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Return-Path: <linux-kernel+bounces-673296-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 5BC7741E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:49:50 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id C51881899594
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:49:51 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 5B359290083;
Wed, 4 Jun 2025 13:49:26 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="atyKTxlk";
dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="OMrVyR+8"
Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7DA1928EA7C;
Wed, 4 Jun 2025 13:49:23 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749044965; cv=fail; b=h1Fjl8POkLcY4Ui++f9Uxygvfc7mPhMeyjFybB0T0sl1wT90EGW0GrskFnoEB4jcBYyezG3muGwRzEArTZrf3ZtcIy1i/Ymfje4K5n+SncP24mKLllSfMCvhGcFWx05jWRI3lup6huROoUYrBLLAKX8mH3CwUpdYux09wgHXcPs=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749044965; c=relaxed/simple;
bh=QeYI8+YqRlGS8F2NytZyNF3SdNbjyc7d746fCWvp/oY=;
h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To:
Content-Type:MIME-Version; b=lX6pJCQw5D8/Vt17w9HteMBsVp2IZ2WTxodUXqqVW7ysyhaqrfDsguYkuuCJWzwZvbSyhjndISyGGDF74ug79m1IzMKJZzVD7CXatXrIpYbhkburCjq3pc7wtXITTzu1qWN7LavfZA8b6CYRh4zS66eTicp1BI0dwi6ncOjqI4k=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=atyKTxlk; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=OMrVyR+8; arc=fail smtp.client-ip=205.220.177.32
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com
Received: from pps.filterd (m0246630.ppops.net [127.0.0.1])
by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5549MfZJ024864;
Wed, 4 Jun 2025 13:48:59 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc
:content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=
corp-2025-04-25; bh=JzLN8ERhIIMUcbmvCmQMGONo2NxbGDNELxkWjZRrBpw=; b=
atyKTxlksTbCBib3jWURiGbOaZ87cCcOG3p/pb7lt60gV2C24qNDD4oE/x7cVlKW
EtqGR8wUpCRe1q9OPBJ0G8K7XdRBFIaDsMmSHszF/M0lQ3/uDWuOFq8hKcZLv3xf
F/06kKcJgtQuiel6MeuqPerhtsgLk4cEsJxVSyAJw5YCnSk+nvX2Z+VBxxkEHlVW
6PSp6hJusTICBwLUZnbtAxLIfTw6Bgxe/gr+c38Z2e7jrPBPGmOVyIbF6bTTeh63
QNqdTxqtt8ou7j2TBWfA066gRmmGnXE4gUHrHfKyocL8VLRSIkljNYqT8ID2Womy
XU809UDxgBmadg5/W3eR9w==
Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223])
by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 471g8gc0s6-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 04 Jun 2025 13:48:58 +0000 (GMT)
Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1])
by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 554DPgsO040853;
Wed, 4 Jun 2025 13:48:58 GMT
Received: from nam02-sn1-obe.outbound.protection.outlook.com (mail-sn1nam02on2071.outbound.protection.outlook.com [40.107.96.71])
by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 46yr7b1ejh-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 04 Jun 2025 13:48:58 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=PfCNEY5P6QQfbScg5IvxfYJorSyYe8f2HtNQ5nzFDXRBU5+IIEeASJeHCR6TA3MlsCLYejOof/tNngLSjFnzH+IjMi3+5RLMpX3n6hfwXLe1yogm600Wp1ezpRrpekvFalBUiblit2Hwc3pKcJKb8xXbrc8UBU/rf9ZQLkaRrcgxar3DeqIGoBGKN4KudGBJ+XurzbVp2aAoFRr+9L948UxURoHe1iyuBiKdaw/Xx+eoiywKwbRQfUT9Ic4XYelanVZjlkBpi3AreMUHQ90mg4OLCFtXL+XETXzgLF2mjPR74sEmpM/wsjdhqjB+DZH4qfhyp41VRfLsUnpVt0G1Kg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=JzLN8ERhIIMUcbmvCmQMGONo2NxbGDNELxkWjZRrBpw=;
b=W1iU5SS/IDmT2Nepm3g3yZLc6z+/6htO9wVknHobIy983IkVs60Rr/vJjOX/ythxmNBiXNYgIk/vgIJWmHK2g6uRfJq9QwLhPzmheOuY1cbYu1Rsv/luGttHr3LDg6oVb4mvyvJJAzbNOC8va3+C0lwkeSelOreyQc0LtgT9wQTNiITBKSE09lcyi+23nxTIgH73olCQ2jUt106VnRjqk9PrrSozz+dqyeS9pgyb3L3XwMkGTDEnBn6z4pZg5ghigTO/EaUNDJLuTr4AzLX8xuRltOfiXp13MjNL5mFuHpt1KKLWb0jsFjl3NIz95l7HKCHp8HxTRYVzWhVjkZs2Aw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com;
dkim=pass header.d=oracle.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=JzLN8ERhIIMUcbmvCmQMGONo2NxbGDNELxkWjZRrBpw=;
b=OMrVyR+8ynhvRRPVVinZnVmnxD9NtQjQKjmJVOIj1FLWii1cm1oEb6MrbzK5eP1eAHu9uBM3y2WtnnfD6UKM/WX/RA5no4+1AYuIeh1z4p+Y6P1ZvJh1GiH6EcVemMDlAYfu3lnZSCCRvEQSPHXLMDgxcY/N3ghFJ+LX2vaUD+o=
Received: from DS7PR10MB5328.namprd10.prod.outlook.com (2603:10b6:5:3a6::12)
by IA3PR10MB7994.namprd10.prod.outlook.com (2603:10b6:208:50b::19) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8746.41; Wed, 4 Jun
2025 13:48:54 +0000
Received: from DS7PR10MB5328.namprd10.prod.outlook.com
([fe80::ea13:c6c1:9956:b29c]) by DS7PR10MB5328.namprd10.prod.outlook.com
([fe80::ea13:c6c1:9956:b29c%2]) with mapi id 15.20.8792.034; Wed, 4 Jun 2025
13:48:54 +0000
Message-ID: <2838094e-815b-4b98-8787-65ab0180acd3@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 19:18:40 +0530
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH hyperv-next v3 07/15] Drivers: hv: Post messages via the
confidential VMBus if available
To: Roman Kisel <romank@xxxxxxxxxxxxxxxxxxx>, arnd@xxxxxxxx, bp@xxxxxxxxx,
corbet@xxxxxxx, dave.hansen@xxxxxxxxxxxxxxx, decui@xxxxxxxxxxxxx,
haiyangz@xxxxxxxxxxxxx, hpa@xxxxxxxxx, kys@xxxxxxxxxxxxx,
mingo@xxxxxxxxxx, mhklinux@xxxxxxxxxxx, tglx@xxxxxxxxxxxxx,
wei.liu@xxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx,
linux-doc@xxxxxxxxxxxxxxx, linux-hyperv@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, x86@xxxxxxxxxx
Cc: apais@xxxxxxxxxxxxx, benhill@xxxxxxxxxxxxx, bperkins@xxxxxxxxxxxxx,
sunilmut@xxxxxxxxxxxxx
References: <20250604004341.7194-1-romank@xxxxxxxxxxxxxxxxxxx>
<20250604004341.7194-8-romank@xxxxxxxxxxxxxxxxxxx>
Content-Language: en-US
From: ALOK TIWARI <alok.a.tiwari@xxxxxxxxxx>
In-Reply-To: <20250604004341.7194-8-romank@xxxxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-ClientProxiedBy: KU0P306CA0040.MYSP306.PROD.OUTLOOK.COM
(2603:1096:d10:29::7) To DS7PR10MB5328.namprd10.prod.outlook.com
(2603:10b6:5:3a6::12)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: DS7PR10MB5328:EE_|IA3PR10MB7994:EE_
X-MS-Office365-Filtering-Correlation-Id: ef42d98d-0655-47c6-3875-08dda36e8b54
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam:
BCL:0;ARA:13230040|7416014|376014|366016|1800799024|921020;
X-Microsoft-Antispam-Message-Info:
=?utf-8?B?RVEyNmliajdjKzNybEZXcFBlcndpU1I1cmtRUnJ2UG83UWgySmdnS1ZNbzE5?=
=?utf-8?B?Q2x3RVN5OERUbmlJWFE1MmlzbW1aemdhYTFseGU5ZjVDemZUbC8zN2Jqc3RG?=
=?utf-8?B?MTJLeDRSTWtTUHl5MlI4RGlPbEtIZUhySUYyZmlMZ2NxKzFPOTBHTHEwRXFK?=
=?utf-8?B?L0dmSlVkN1dJVXBJc255Um5WWEcrM3pzOVNuVUpCZ1BYQzI0OXNLUTAzdHBx?=
=?utf-8?B?NmkvT28vMTI0VDllV2t5ak1tQ3BGK3Yzc2xVQ2tqRVkwVTZFSG1ESmt0S243?=
=?utf-8?B?c2RBbkd2c1NGRXoxWURFTzVFbnFadFFCQk9JWkNCTjgyTjlmSSs1dWo5MXMz?=
=?utf-8?B?Mmd3SXZzQ2JFMG13TmxWMXpMdDNMZ1FLQ0w5eEp3K1JSRjRPSTB4SHJNbnlK?=
=?utf-8?B?MGNjSWFDU2tFbG43UnBCVVMrenh5TEt5WmdwbFk1dVBhemxPSzU4VDBJYmJN?=
=?utf-8?B?aGMzU1dOaXIySE5CWWczQWRLZDlPL3V5V3ZORU5HekppWEpHM01mSHJjMXNr?=
=?utf-8?B?b2tiN2V3K2xTNEJTRUJYNWxwZ3B4ZDJwVlRQQXlHN3RsYTVyd2NXZ3RLOW1o?=
=?utf-8?B?VTFHbm1lUXNUUmhPTElXckFrM0hOZGp4SmFjMi9SZGV2WWlKcWo3S20rNGRN?=
=?utf-8?B?V3pNSEtwV1NNYW45MVZLWkM5aHpYTFUwMmtuRTNFZnNXcFphNzJ6VTJwTmEr?=
=?utf-8?B?MHAwU3NCaXd0S1ZIbzhzVVJDeFJhWFVIY1hTZzVpQzVsMmp0SmRuUFo0Rm1P?=
=?utf-8?B?NFlTSlN6eExTM2Zia0tRNmJLWFhkZHZ1M1Zob2xsY285WGhqWC85NW1oRm9B?=
=?utf-8?B?SWg1dDMyZXBPQ3IraFZKanRTelRSdGtSTVZpTHFCbGxaSFQxY2Q0K3Z4eUxH?=
=?utf-8?B?NU9Gc2dmUHNvSWwwaGlscjNWdGZrOHd2bFBNOWdUVmQ4WlZWSXNqZWFWNjJB?=
=?utf-8?B?Q21zbjlHdHhyZzJkNGZmamY3b1pYbjhPZmRMMTdVRkI2d3J5RUJ0bXJnb2d5?=
=?utf-8?B?NCtBaEl2bGZ0VW5FM0NyMXBBVjcrck1nR0o0RVp5c2ZuVnRCSUlDY0lGVlFk?=
=?utf-8?B?M0luQ2FCeGpwTDVmWmVobVdBL1Z0UEx2d3g2dVBmV0Nkb1ZtUVZtNTRWcXBp?=
=?utf-8?B?enlhUUZwR3NLUHZqYXFkbTRzcHJkU3JwZmRjNXNhL0JnR04xS0RNZnBpT1RH?=
=?utf-8?B?ZEFPM1RFMnlaSC81TEtxZXBMNnRGVnNWYkhYTEY0YTVrVFBsWWxzK01xbXVj?=
=?utf-8?B?Z1hhNHJwQjdFVUdSSGwzK0tKT0llS0dFWXNHWjVOWldqMTNUd3Y1NkFMaWJw?=
=?utf-8?B?dFRwRUtpK3hybHBNSGhoV1I5T05OYVNPd2gvVUJMYWxUTGdiUnNwQWxsak52?=
=?utf-8?B?eTlmYTNobi9GUXNWTWZOVy92OVNkSlNXRkd1RWJ0Tm5SanZGZmZqYUFrUU9T?=
=?utf-8?B?SlErMTRqai9aRFNrWlhDdzNZemNrTC8xWUhCU3JCU3ZuRFJtMFQ4TGE1TFdh?=
=?utf-8?B?Z2VzQ29seEVaUjlyeElMR1hDUHlxd3BnZ1pkMGZwK1drM2JjUnlCenZValll?=
=?utf-8?B?UTBiZjB0b2JqSm9LTDNROEpSZXNCYTh6ZlM1ZXVTWlkyTDhta21sYU1mc29S?=
=?utf-8?B?cGR6aFlyNFVYVjFWd2R5M0hJbnY1K3FZN0I5NlV6bTFRRXdtcm5jS0JwMUtW?=
=?utf-8?B?UjRPaUxJTGZGVlBWbzR3RjdUNG5iODYyd0ZOV2FUek5qTjJBcCt5azYxcW9u?=
=?utf-8?B?NU1LdE5DWmVTdkpvbmZFaXhzZnRtZlRyMzV1Sk5CaGlNQ2FUOUFtWk82T2Qv?=
=?utf-8?B?aTdwUzRuZXJINVRSUE9wZnVXdm93ZGRlMk40Smh1bTBjclYvQ1VmTkQvVE5X?=
=?utf-8?B?S3BmQWQrdU16V1pUWkhZUlFVRy8yQWVvaFBHYmo1U2lRY3hRUVIrL2Rjb2h4?=
=?utf-8?B?dFBBMnk1amU4THNSd2FSbUVMc2V3eDA2VWhxWmhnY2xGRStHU1RFdFRmRU9u?=
=?utf-8?B?UDBiNUJUcmNRPT0=?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR10MB5328.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(376014)(366016)(1800799024)(921020);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?utf-8?B?VGQ2aVVXRUpwemtRbkJFa1N2WjlSWFp4UHpta1NqWEpaM01iaUtMMWJUWXFj?=
=?utf-8?B?UTZ5UHFUYkN0SXYwVTB6SUdwb3Bvak93RkF4dlpkYTNxRGFvQTB0dDFpR2Rk?=
=?utf-8?B?MSsxOHRGL1ZLZnNjcnhWRXFFTFNvLzlxak8vd2paMGxxa2NXM2lneUw2NEhi?=
=?utf-8?B?TjB5RUZDUVRpL3hGTXN0WWNiMVBVNzlGSjNyK2RsK01Ua1dDT2xMbnB0U3o5?=
=?utf-8?B?WHhhNURON1JGRlcxZFRMWStZeTFQVklKdGE0aS9OZDlBYW10WVI4Qk5HWUVO?=
=?utf-8?B?RUg2SlNEaW9wcGNSY1FzcFdYQnRDSzRxMGdaMjg0SE1HcHlMdkVwcmRYMURx?=
=?utf-8?B?Qk5veWluR2I2QlllbVQ2Y1ovQkUySmxBbnVqNERUaWFxTjVrRTJpSmhBdmlT?=
=?utf-8?B?blZ3Q2lWd2Y2TGVVWGxaM2FZRjhGS1JnSGdibjB1QUdiTzdzS05kMExscGRm?=
=?utf-8?B?MEJJQ3VvYTVuU1NsOTlSNVBmZGtGMHBScjVIS3V2RnR5Sk1TNXNZdHNxd0Q0?=
=?utf-8?B?QzVoMmRNNDlMU3AzcXM5cEt6REJDbU5ubG93WEsrUjN3WkNHeWhaYjZCRGVl?=
=?utf-8?B?ZnQ5aW9oK0IreW5mQVFzOUNUU3FDVktjZU45SFc3R0ZWOFVVV2xqVGt4NlFp?=
=?utf-8?B?ZjZ2OXVLbGpJQ2dRZ2VIOU9aakhaNGFzeW9MdHN5UVZGdjhPSEJrR3dLTm1C?=
=?utf-8?B?ZUtPMWtUaUdHMmxYZWdTbkxtL1lmaDlzWXA0eEluNUl0MEpHNE84L3QxUUtu?=
=?utf-8?B?NjFvaStKRlZPM0NMVXhzRUFvMHowdVRqdVJPMEwxVTdVeW1YUml2c21Lc3VE?=
=?utf-8?B?SWdQRmlhUHhhbWxwUlkrNFBqUlBncFBMeHZPZW44UWJUZDd2VkxFLzhiUTNV?=
=?utf-8?B?TG9ucXhyZDI2dDduSXRKUENJemhHSlVIc1UyRnovd2dOMDZ3d1A5eWdOVnRJ?=
=?utf-8?B?T3NUcUY4ckx2WjZZcUg2b3hmR1ZaR3ZTRTFTeW4xSDZhdHZpYW5ITUFOc0tr?=
=?utf-8?B?VEFHbWREdWo5UlpuRXhGUG5OdVZ5VW5wK0lkWkRlMmpCUTZraUI2RVJ6SVBO?=
=?utf-8?B?VkIyYVowVlUwTWpmQVZLUjFLbW9QQndDd2JleGxURjU1YUNNVThDNnF6Ujlz?=
=?utf-8?B?VW5Wa0lLTnByMEJxMFFlcStyc1NkT0EyZ3dpaGlYWGxaL0FNSUdhQ2NWTUI1?=
=?utf-8?B?WEdzY1F3RkdiRy9McXNodVRsRW9CaHRQVDVXcG9nek1obktGakxYM3h3NkxR?=
=?utf-8?B?Z3cweXRMV1BWOGtuVkdvbTZFaUJWMnlUSXhVWXJtcUFoVkt4TmgyUDNVWFMr?=
=?utf-8?B?c3RVNlAzMEtyUEU4ZnhEN1Y0WEc5VW1ZSjY4N1Vwc0NReEYvaUFsYkJwOVNF?=
=?utf-8?B?RmxGNTYxM3N0cnlIaWkrZGdqcTYzOXlBTVhPYU91VUZvMG9RYVNFMXBqa09y?=
=?utf-8?B?VVRYaFc4bVJ2K0JUbzVYckEzcnFHT3hLdFRacHRIendickxCSEpQZE0xT0pm?=
=?utf-8?B?aGpzaUx1V2xmUFdYekpDd0o5cGlMbmpVQnNTWFJYVXVpc1VndWo4dGorQm5C?=
=?utf-8?B?MVdLQ2IvdTNKbmd5RGQwNXoydlNiZEloVDBKcHk2YjVjZmQwTHozUUNYVmxE?=
=?utf-8?B?eE1KcmFCWXZHcHhEazJ5L1pac3lGVEVPd1kyQ3dUMHFiZXBGd1ZBaU9aVGNr?=
=?utf-8?B?YVlzWHFuRWlLaEpTM29ORWNkY2t1OW1VVDhES1dkM2h1Q05OZVllanY5bzNY?=
=?utf-8?B?MkU0ZEJUWXY1OHdTVGlzd0c0QUlrdGJyWDZOM0hvakIzck55YlhvMVVLaU43?=
=?utf-8?B?c3ZHYlBmUEhrQ2RDeXJYZzZONjMvQTBqa2FoaVRjbmdoM05nSDQ3cUFUcUU0?=
=?utf-8?B?TlRGcWNFUnRQL1NjdUFrZm41RVVzREJMbTd0Ry9qZS9HUUc3R0xjbC9vbnUr?=
=?utf-8?B?WmMzZVFNYnNOeXNkWThuS3I3dk5TcFc1QXhyaTNiUG9RTGhPZnpMN0I5T0NP?=
=?utf-8?B?dTNlT1hEQVRja3RsNk1hRTFLZkk3UTFQMTlyQURyQnpseXYvdzIwR25jUldJ?=
=?utf-8?B?RFVzOTltVW4zK3VGNkw3dyt5NVJDOHhsZFdhOXB2eGFaVy9meVU0VERxTVgw?=
=?utf-8?B?L3FqdnhkajRHYkYrZzlxQXk1S2xtQXMxN0VQY3VkN3h4cmRDY2svd1NsM01i?=
=?utf-8?B?blE9PQ==?=
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0:
qOIkvqQpzn6gYIlWIAmiZ6DZTLKoDfzNkWYwQv/aZDNJaiDVsqKbOwT4IIvcGIO21+crQdG6pdYAyrwT6NVx5HM11iCNiJH7BC6rRQnLSPY+iZwjfmx2Gs0LnxzqK1Q237oXrXtwOFTWxDj2+UwYmtvL+gPYtw35eScindaGR9k8vU6+cIjN5aAAV8R8JMIxqbIk+V8zyQOF9wiBE7pTqSfuBDhMX7pFDw8rtRc1lHVUzrNY0YtArEr+OTfbNUeTZBaPdGVkp2bcHz8A00BdKk0vu12zDTHP1r3ZPbQK581GKK7giay3f0Sfeo1L9BbnPbvNVe8QqSJJ5BapQi2+yL8E3Sdf+Flr25P7SgxUOunl2uLO71ipZySZOUkvpWkpaWYnTvZRl9idwCVsfgfvDKG620qLGI/DQ2GQlcX2yBuJGPP58gYsuTcnilmpzVx1qnR0pDHBgnA+yPlkC3bY2F7tY/tj4rUVjrFGYB+jNCYE6Wd9UtWN+gq+tmuZ2n7ksQgxzaM7X4qFGg/9T1UlXHXTHPp6xV/jpEEWktqCI3ChVRYWyUVvHAgfWL/qgHs92FSu6MZ5GN/G8Sx3BwOporkU7G7EuCyRZg2stfdLiqc=
X-OriginatorOrg: oracle.com
X-MS-Exchange-CrossTenant-Network-Message-Id: ef42d98d-0655-47c6-3875-08dda36e8b54
X-MS-Exchange-CrossTenant-AuthSource: DS7PR10MB5328.namprd10.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 13:48:53.9029
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: iwXcDe6Y7CF86ipdKKlq6XIi9qRGOUh+X95kjnXyRH9L+ECZ1ZMAsK6YsOS5+O9p3jpV328shQrxnw9FBccwdNlvnqbiu48eSicdif8EXuc=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA3PR10MB7994
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 adultscore=0 malwarescore=0
phishscore=0 mlxscore=0 mlxlogscore=999 suspectscore=0 bulkscore=0
classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2505160000
definitions=main-2506040105
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDEwNSBTYWx0ZWRfX7YUjWNRPPwr+ p1lLr00eIihaiJkM6RWVu1cx/qbd+Vz1PKzRFjzH5qYyW1Fehhi0N1U7dT1GpGxQzuYdyWxZwtS rd3BYXWCIDz1aS+DuenbDIDqxV1Krf+xaP759lZn/JZuLanI5a7dM4NEVcG02F/fIrdJlp9OmmC
F45OG90bAyeiL8C/NcY3YAtGmZbeEZtzUuS/g2PdxUkHLCD+JYIBNUHYcdvzkHAulePYwQKZLxI 6QNsAuphMKarV1pAoOudMNhMKXxOVcLdRsJkgsTQTW8yGFmInZHH4lL7u5jgu8+8n5WPT/RYB1u 1M2Mtc9Mwcd7mmbWL2zJ05AL8/hhkVyqEkUmkVMZi4X6PAhw2NSfj0HIn1fYHLTctCdCFeVQXMK
yec7WbqHWmgvGs5ISTw6qtMVrUAq4og1rKIBwRHtvBEUdRW447jlyq5NnL4O1ycs/+s15d6T
X-Proofpoint-GUID: ySNdKJNWWRe3jOnNrRvkjG9RNJ5kkPW7
X-Proofpoint-ORIG-GUID: ySNdKJNWWRe3jOnNrRvkjG9RNJ5kkPW7
X-Authority-Analysis: v=2.4 cv=H5Tbw/Yi c=1 sm=1 tr=0 ts=68404eca b=1 cx=c_pps a=zPCbziy225d3KhSqZt3L1A==:117 a=zPCbziy225d3KhSqZt3L1A==:17 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19
a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10 a=GoEa3M9JfhUA:10 a=3NcdCr0Wo7SOhKP_vvEA:9 a=QEXdDO2ut3YA:10 cc=ntf awl=host:13206
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 04-06-2025 06:13, Roman Kisel wrote:
- if (ms_hyperv.paravisor_present) {
+ if (ms_hyperv.paravisor_present && !vmbus_is_confidential()) {
it is, not vmbus_is_confidential() ?
if (hv_isolation_type_tdx())
status = hv_tdx_hypercall(HVCALL_POST_MESSAGE,
virt_to_phys(aligned_msg), 0);
Thanks,
Alok
Return-Path: <linux-kernel+bounces-673297-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id EA68341E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:50:45 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id B07A41728B3
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:50:46 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id D3B3328FABB;
Wed, 4 Jun 2025 13:50:35 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="g2gQ8nri"
Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9F45024B26;
Wed, 4 Jun 2025 13:50:32 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=192.198.163.8
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749045034; cv=fail; b=IBm69PPZvlGaRVfOB681dAoUv8jpW24ZcS/cxu2PS2KMiM+Qa9zN5Y4z2aGY0gAimMQdEIgdb51ZyTCXaJj7LMfG0klh7H853V0SW1+NpjTGkx/buHq7OCyc1UVAuXrgo36wvgxXUEDx0ShbUy6F/WOWk5mrIf04RJVuUnhxcn4=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749045034; c=relaxed/simple;
bh=HlGoa8UiiMMuS4hacK/b1e917LJkP5kv6nZ1F2WQQGo=;
h=Date:From:To:CC:Subject:Message-ID:References:Content-Type:
Content-Disposition:In-Reply-To:MIME-Version; b=t6fumkPs7cLqGLGAWruEMizqonbiWByvdlvTw0vOsKx4vjpzsPExHxp5XJ/thrpjBr9LvPmUY1+kfQkyqwZfS1VDxBOVoV/wZH4Oio5zE35NdfekB2fZog9RjhnzyAae5wH6rZOQ4TddJAGvblQjX977XVvyQPLGCWZxWQMMEPE=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=g2gQ8nri; arc=fail smtp.client-ip=192.198.163.8
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
t=1749045033; x=1780581033;
h=date:from:to:cc:subject:message-id:references:
in-reply-to:mime-version;
bh=HlGoa8UiiMMuS4hacK/b1e917LJkP5kv6nZ1F2WQQGo=;
b=g2gQ8nri5N5yVrrex1c2/Twc+Kte+lGXw2fSvZmfZ6Q5IHetW2xQPHOR
gbSFmG/KK/t0LG/z7jeqiM/dVmKLrlc4P+uZ9Va81pgUQ0z0IDaYYF8Uv
jjP3PLHsqGFbioyQxwC0dzOI8wn1Om5+pmg8lUV3zXAI8UYOZ4QTGlIPi
/U118kEEYqHvmmvnJ3TH8NiQfTfneSKQig8bFrZDVhHAnIUiCohFUDJEP
jCvLrviljtsLfzwDKZNEF3ee9U30vSGfCEEgTJJ9douM2AyeAW4XomItE
QE9TBUPDVwvtMKOj1IWyufxOKls/HQ2T/wboygdfDVwMb94B7gD7GPX1V
w==;
X-CSE-ConnectionGUID: C05J5l7VTfO9e5UJo8+jcA==
X-CSE-MsgGUID: WvTgE89wTNaPTE5YFUtStw==
X-IronPort-AV: E=McAfee;i="6800,10657,11454"; a="68676491"
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="68676491"
Received: from fmviesa009.fm.intel.com ([10.60.135.149])
by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 06:50:31 -0700
X-CSE-ConnectionGUID: upHiWPWNTPSPYOLRPGxMoA==
X-CSE-MsgGUID: dCHObAR3TFm0jE5P8vkjOg==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="146139915"
Received: from orsmsx901.amr.corp.intel.com ([10.22.229.23])
by fmviesa009.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 06:50:29 -0700
Received: from ORSMSX901.amr.corp.intel.com (10.22.229.23) by
ORSMSX901.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.2.1544.25; Wed, 4 Jun 2025 06:50:28 -0700
Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by
ORSMSX901.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.2.1544.25 via Frontend Transport; Wed, 4 Jun 2025 06:50:28 -0700
Received: from NAM11-CO1-obe.outbound.protection.outlook.com (40.107.220.88)
by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.1.2507.55; Wed, 4 Jun 2025 06:50:28 -0700
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=eIUfMd5Vj61WSB0/i0E6fJ7CEVp9xZydZRWZktM5kB6FkFQFQvGExgYSb6SldnrRVdXKOIltz22Hefxa3CfkveLPo2OJiX+cFPI8k/pRCLCM4I5NDAxQ9rNrrMP/nI/CUVmoc7TPZH+eo+wQ9vVmOQcLqUVnJEbEviMEFyE5uV35/3F7KYTGtcj4Q13R/GAE1k/NdMNPeKKAEcxT1pGmIKhto6dJh7866rhTcmFG0uD34UX9VRlIWQVk95/b+mAyJdcRH0MMHsJmKWrHbF67YZrwpY1czbWqlXCqWPSKD55hfKBUMJz8J5XbBFjwYu5nRrviHRSb5y/4sK2Vek/abA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=6l11bKcK07BQX5qd26p3yfcf5fk1ASLgTTjNETnDSK8=;
b=pCTFH016QNiJkUP6PCp0KckO4bn2Lp1/pDG0W7DLdRB2ODkmjghE3rnokwJx0T+Yk+Apz9JQeF8eor2vtmcmwos4UyuOkqav7etECChNoXJAU95R+5z6NT+TO5VCg/J0EIz2XCVwsLEMwoaJiWDCFcKFlsRA4nUCApOKO/cs9OvphHfcbRfC41biBDrnRW5s8Yx2+gHuGLNQjFLqBVXib/IusKARKjheB37411h/yWL0zLTwnPtvdfdAoFO00m/esvg4wJjN1JRY7cqFnMKg4OAy06+GJoFQtsmmgKQ/kMaIzE9wbdpY8h8lBCGbc/7/+AFNEmMrJjHaCALLkSro1A==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com;
dkim=pass header.d=intel.com; arc=none
Authentication-Results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=intel.com;
Received: from DM4PR11MB6117.namprd11.prod.outlook.com (2603:10b6:8:b3::19) by
CY8PR11MB7172.namprd11.prod.outlook.com (2603:10b6:930:93::10) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.8769.29; Wed, 4 Jun 2025 13:50:26 +0000
Received: from DM4PR11MB6117.namprd11.prod.outlook.com
([fe80::d19:56fe:5841:77ca]) by DM4PR11MB6117.namprd11.prod.outlook.com
([fe80::d19:56fe:5841:77ca%4]) with mapi id 15.20.8769.022; Wed, 4 Jun 2025
13:50:26 +0000
Date: Wed, 4 Jun 2025 15:50:15 +0200
From: Maciej Fijalkowski <maciej.fijalkowski@xxxxxxxxx>
To: Eryk Kubanski <e.kubanski@xxxxxxxxxxxxxxxxxxx>
CC: Stanislav Fomichev <stfomichev@xxxxxxxxx>, "netdev@xxxxxxxxxxxxxxx"
<netdev@xxxxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx"
<linux-kernel@xxxxxxxxxxxxxxx>, "bjorn@xxxxxxxxxx" <bjorn@xxxxxxxxxx>,
"magnus.karlsson@xxxxxxxxx" <magnus.karlsson@xxxxxxxxx>,
"jonathan.lemon@xxxxxxxxx" <jonathan.lemon@xxxxxxxxx>
Subject: Re: Re: Re: [PATCH bpf v2] xsk: Fix out of order segment free in
__xsk_generic_xmit()
Message-ID: <aEBPF5wkOqYIUhOl@boxer>
References: <aD3LNcG0qHHwPbiw@boxer>
<aDnX3FVPZ3AIZDGg@mini-arch>
<20250530103456.53564-1-e.kubanski@xxxxxxxxxxxxxxxxxxx>
<20250602092754eucms1p1b99e467d1483531491c5b43b23495e14@eucms1p1>
<aD3DM4elo_Xt82LE@mini-arch>
<CGME20250530103506eucas1p1e4091678f4157b928ddfa6f6534a0009@eucms1p2>
<20250602161857eucms1p2fb159a3058fd7bf2b668282529226830@eucms1p2>
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <20250602161857eucms1p2fb159a3058fd7bf2b668282529226830@eucms1p2>
X-ClientProxiedBy: DUZPR01CA0343.eurprd01.prod.exchangelabs.com
(2603:10a6:10:4b8::23) To DM4PR11MB6117.namprd11.prod.outlook.com
(2603:10b6:8:b3::19)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: DM4PR11MB6117:EE_|CY8PR11MB7172:EE_
X-MS-Office365-Filtering-Correlation-Id: dd927878-b591-4ca5-e116-08dda36ec280
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014;
X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?Il7xdBZly1WjqV4vjeZIsRUSZoVgnOHPrAMUYhK9qH0upHktM3jGN6DSPXYk?=
=?us-ascii?Q?dd0sf/aV0nNb39OTN2/90inDbzAG4F0DarJLJiScP0YY5et1D3k1f7zxwbX0?=
=?us-ascii?Q?wjC1dQNTkUjAbz9es1IB/rBkLyhZDvhxy4GRmLK1da2f3n1LaH1wjoKuP0j1?=
=?us-ascii?Q?hF2ydbE9ZYyARY+6AoaHQoH7AFHxvnbwsD1u1/oa4GyHbgz1qLx/ZytrCR4X?=
=?us-ascii?Q?fZXrBvcK76t21FzYtwypDZUzVd2PNVSxUv3Rm1hwDct6ihvNV1tHnH4PMvsI?=
=?us-ascii?Q?QlBin8Y07IrfDGzqO8/XXzMKTFb+OJoowwqUXJ26OELY8nyzQD6XjlXmTn8+?=
=?us-ascii?Q?cW4DBsLNw/9Fr9iUdKVj8WvdGQ5Zr1A/iV3O0UMXcjsV0w3XCRc58NDF9ha2?=
=?us-ascii?Q?QUK/xS6lprOxwvtK3uxrB5Dr+4A69sI2hz0U8/OjBllhxVIe1sgWl4cvHG3t?=
=?us-ascii?Q?H+L5ePI5L+DggGGrYhGhi5qBtsJHv1DDKAr8k/l1TF+9S6qQxnqXaHnmo5Zs?=
=?us-ascii?Q?9YC2qvaWDkd43Et/DFHqNiTulI75fWV3+nlYIx+lPRvdsr52kj4RLedzL0jo?=
=?us-ascii?Q?SiT8xrqlw/TGHtbqtzDPKWWQgT7bY5q68Ka6kDkAt+xgoUKSXfwpofv0iqZ4?=
=?us-ascii?Q?qZhaJ1SLTh5mlBrg8E/yMIRBF3ri0e7J4S7U6aELm34SqJULX/T63ZwevfH/?=
=?us-ascii?Q?oDrRntgNsrwUR2A3YA9So6+tOxazmVGDvTp5wpEmQKYbnLCS0paTDYjZ3T+e?=
=?us-ascii?Q?FoC83XjjsDRM6QB6b59uwfLvtpe/gpWoPBKmhKNdzn6+AEXIBzLDWR8lL2pG?=
=?us-ascii?Q?H4p+o0RVKCPV6gzyZS/2jusszDXpB4EpbgYVJHUVK2PJy811xK0Izfc+LmQS?=
=?us-ascii?Q?gxx5zrpEaHfIYLuCA9zJf3O10E5/pq7/8pq3XwwqpYtrmjM59zSGUYeOrL6L?=
=?us-ascii?Q?Hq7IoSp2n8Iz681bq1qHkxQPJ4NEJHCXMpn+ozGovdzei5vrPizM7hkCVJP7?=
=?us-ascii?Q?KE0BYlNNgu84n5Al/CzCU7UWVV2k0gD/FWVyQv7TmCgMIV6TCzmKmMaE+rpY?=
=?us-ascii?Q?NjBchU3RvtnMRH6ZKcSIslVK5x09i6HFht482j0d55oVB1N9GSj3Of3sAAs4?=
=?us-ascii?Q?0SDclUdGF7J6et2Mc8IUfhj96sCRMj0KnvZnX8/AF2lIZf++13c/QdlfTn3h?=
=?us-ascii?Q?dXwsz1h15HA+jjJOV0fXsq0pPzJ5v1gjphImgUw2gvUvwY/ZctEZ1EnwMTdZ?=
=?us-ascii?Q?mMTJrPSm4lsRrFZnJB5uvGhkLvxc/OYVZ92nnNRXQj7g1qC5ppPBfrQE8dVV?=
=?us-ascii?Q?/483AdMa/7plQGIMih5mWmuxd2U53Z9N+BF8aC32VCX5islSL9fdf0Q9yGnp?=
=?us-ascii?Q?3eM0psdvaI8M8cRZNCZISWJ0NF90HdwQh9VKL4crpQ+ieFYmhX4Zi3Qx0n48?=
=?us-ascii?Q?VTX2C0iUpJA=3D?=
X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR11MB6117.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?zcSamHsX1AhU+bvdz7iGx00QC0/4rO1Op3jgzDEvRDw1fmM9fW9RnfzxxXlA?=
=?us-ascii?Q?IyWyzq/UyjqgASBr06tkH/Sa8LMsgXpSFdOjIc10DJQ0bfxlmU4BlM5fS0gD?=
=?us-ascii?Q?U99weQrODqI0RAsYh5pkKOIiPOFfQqMW7KGWIgNmhlM5Js1HA3EBAu247F4Z?=
=?us-ascii?Q?dPY2/yNeiD4ut+FwiC+RVkb4Y3IVi7hVKW2EZWcl0ZMEEIP8eEDK8IAPysBT?=
=?us-ascii?Q?vzNk0/vBKBpptuiQ0UmpLe/i4T5fqEgjDFh5ghYxFJ7pnnZm1zZ82Fr78UzQ?=
=?us-ascii?Q?41oE2UNdPFzqvP76MdE43n5uLKEFjdk1qnXqftyNCsFD/wOxOe5yuYmfZ2jS?=
=?us-ascii?Q?vEwr6yIcVj9S77wRGjcBN5ZY3YhAvLwMHRVvOuw3ZWTTcwd9nO809L2xN9X+?=
=?us-ascii?Q?02kT5KCkQGeZvi/EAzFz4IMxQfbrNUDBRdbStgThb+9yOYdCJRlDrVIuiQfV?=
=?us-ascii?Q?jHYcMln/RXUA5l/tZpzjLqq0xD9XAkYaaNgexLa9955gU2PP9ddn02oX4dvS?=
=?us-ascii?Q?QKKy16WXjzErGNV8246jndrbGwgMGJHodxg/+feAw0rvTbhYNKRvRIRQm7Y5?=
=?us-ascii?Q?OJDv3H3EpmjyqHn2/oJPIXdIczX+8FBNDvj7U8XuV5XlKnq6dq17ifwl4rtD?=
=?us-ascii?Q?OO0sg8+ah29ImzGNT/oqOWEBCb1K9fbUPkgV0klVQ3Qool+b95CNB//su4nX?=
=?us-ascii?Q?59jfLA+snvS+hkOszWcADP+iXhOL7Ss2iXaEcmQiAD3y+2ZdhdKTDvXN6kqj?=
=?us-ascii?Q?JuTYDkwO1boeTtAH0nRvWLhwdhyRpfU0nfX6iSg1kNax/irHVTzJI1AhG9xI?=
=?us-ascii?Q?/KvOEjfPNGJhpm5qY+O8On/A7TEFf0txvdhVKZByTWLf9sT7xr09QnjqPO+w?=
=?us-ascii?Q?z76CoOrTCjoDEzA6INkACYmFNhUEXSXM0gqOHHEl/6CrCSM+T6N6im2oBnUs?=
=?us-ascii?Q?DZ6mNYS18Le1UyOtNfVDAp2ZFing12X7H91Cp8mUumIFyGl/BS8bYc72qc5l?=
=?us-ascii?Q?fmmKkBS20WAKaWTitzE5x+Wd3U/nJePXj5oIT0vg2P3+37gcSWXTntroJkUL?=
=?us-ascii?Q?bCjvQ2hjU+hUdZNXOG7wbwDp6rAo35Wzq6goNVE7sIBMgdKAGmeQhv0Rs+ri?=
=?us-ascii?Q?ZcOJqQD8E5OzUjm+gvwixRGh+SIrQ6wztCpzHUGAYQjS4hHWt5SGhdz4KiU1?=
=?us-ascii?Q?H2EMsy37HVvkeqFrCNhJ8n1r8knJxt02Xp9ErT7lPzbvvUeJcx5n1Cp0/g2x?=
=?us-ascii?Q?mJD/FPrVFusepoana0jSVtrGvmZV6ZWcAHQUEgoOn1vwXwpdqvEZzJDkOJ+x?=
=?us-ascii?Q?EGe6Jp2bmcWgmyA4nXjJpCCQHesbaS5oItPqqC+BXUeb3qgeUCFv/L2vcRNa?=
=?us-ascii?Q?Q5lCQ5hGS4TBhJsoB6oTZWCOhXNrcguNhjRDHDOOdge8eJLabdVMQh4WtF2R?=
=?us-ascii?Q?U1kpiAXJ0uFh3jvVMU2n8ROL9TM2BcElOTvbBk0Puqu8yXT/3Ht93F2QJocx?=
=?us-ascii?Q?ia1yanjMTFo3W6adhmNWy4zH2vespA8kUie0ssUk+87J9efxR08IdN/Ezu5T?=
=?us-ascii?Q?3p3hHNLc3vHHDURadVB1mbXlGhycDHDk1TKBYp0JXFQQDVY7oL+2y1/krwH7?=
=?us-ascii?Q?3A=3D=3D?=
X-MS-Exchange-CrossTenant-Network-Message-Id: dd927878-b591-4ca5-e116-08dda36ec280
X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB6117.namprd11.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 13:50:26.3214
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: i/LGz3b3fzMqYSy+AngzZK62Jwk/B4UhoqWCNVM9ySCIehlrjMCKeuKZVmKEuvhrjhm6ydrv6GkhnVPNrEJhutXgDDdf2omLcdVAXGkhBAw=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR11MB7172
X-OriginatorOrg: intel.com
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Mon, Jun 02, 2025 at 06:18:57PM +0200, Eryk Kubanski wrote:
> Eryk, can you tell us a bit more about HW you're using? The problem you
> described simply can not happen for HW with in-order completions. You
> can't complete descriptor from slot 5 without going through completion of
> slot 3. So our assumption is you're using HW with out-of-order
> completions, correct?
Maciej this isn't reproduced on any hardware.
I found this bug while working on generic AF_XDP.
We're using MACVLAN deployment where, two or more
sockets share single MACVLAN device queue.
It doesn't even need to go out of host...
SKB doesn't even need to complete in this case
to observe this bug. It's enough if earlier writer
just fails after descriptor write. This case is
writen in my diagram Notes 5).
Thanks for shedding a bit more light on it. In the future it would be nice
if you would be able to come up with a reproducer of a bug that others
could use on their side. Plus the overview of your deployment from the
beginning would also help with people understanding the issue :)
Are you sure that __dev_direct_xmit will keep
the packets on the same thread? What's about
NAPI, XPS, IRQs, etc?
If sendmsg() is issued by two threads, you don't
know which one will complete faster. You can still
have out-of-order completion in relation to
descrpitor CQ write.
This isn't problem with out-of-order HW completion,
but the problem with out-of-order completion in relation
to sendmsg() call and descriptor write.
But this doesn't even need to be sent, as I
explained above, situation where one of threads
fails is more than enough to catch that bug.
> If that is the case then we have to think about possible solutions which
> probably won't be straight-forward. As Stan said current fix is a no-go.
Okay what is your idea? In my opinion the only
thing I can do is to just push the descriptors
before or after __dev_direct_xmit() and keep
these descriptors in some stack array.
However this won't be compatible with behaviour
of DRV deployed AF_XDP. Descriptors will be returned
right after copy to SKB instead of after SKB is sent.
If this is fine for you, It's fine for me.
Otherwise this need to be tied to SKB lifetime,
but how?
I'm looking into it, bottom line is that we discussed it with Magnus and
agree that issue you're reporting needs to be addressed.
I'll get back to you to discuss potential way of attacking it.
Thanks!
Return-Path: <linux-kernel+bounces-673298-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 3B47641E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:52:40 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 6A04117299C
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:52:41 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 2028528F935;
Wed, 4 Jun 2025 13:52:35 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=mebeim.net header.i=@mebeim.net header.b="gAGNm8sf"
Received: from h8.fbrelay.privateemail.com (h8.fbrelay.privateemail.com [162.0.218.231])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2E62142A87;
Wed, 4 Jun 2025 13:52:31 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=162.0.218.231
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749045154; cv=none; b=hL8AoYrAjHit090uLNIgrvEUGh5NJywLe4BDPK/+WiqsbCEeSC00QiX4X8ZRCRaaBNHZrA6olHl9TKPo+AAv+JWJWzGRO/GldPHWpUbkEbgS54BLKxxu/ko6n/fPp/w15QUqm3cacwb4Fq/pZnBBSdzx1q546fezF7cF8sWc/OA=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749045154; c=relaxed/simple;
bh=J79gwTBZarVe0RuxSdrktqBoJC5jYm4za3pkIZqUA8w=;
h=Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject:
MIME-Version:Content-Type; b=F/OsAOukoiq96E0PMTeRYfJ3yhXIvjKzWixgZQKrZ1vr93KXjeiUvsehHYXXFuC9+L6JBc6MVQYACbP70u6FF+2/QGuy+wjOHKFm6lxXD9MWOsVWhuTx/zgaWZYS8B8TH/bJZEQnA268nY+NO7O4DYM0caLYp5wV5mmNrgMOYIk=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mebeim.net; spf=pass smtp.mailfrom=mebeim.net; dkim=pass (2048-bit key) header.d=mebeim.net header.i=@mebeim.net header.b=gAGNm8sf; arc=none smtp.client-ip=162.0.218.231
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=mebeim.net
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mebeim.net
Received: from MTA-07-3.privateemail.com (mta-07.privateemail.com [198.54.127.57])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits))
(No client certificate requested)
by h7.fbrelay.privateemail.com (Postfix) with ESMTPSA id 4bC8CW49Fzz2xk0;
Wed, 4 Jun 2025 09:52:23 -0400 (EDT)
Received: from mta-07.privateemail.com (localhost [127.0.0.1])
by mta-07.privateemail.com (Postfix) with ESMTP id 4bC8CM4Y08z3hhTq;
Wed, 4 Jun 2025 09:52:15 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mebeim.net; s=default;
t=1749045135; bh=J79gwTBZarVe0RuxSdrktqBoJC5jYm4za3pkIZqUA8w=;
h=Date:From:To:Cc:In-Reply-To:References:Subject:From;
b=gAGNm8sfyCZCVI3cvBf7RX5tqhyDmGogOAEXGIrCUSCP5SgSzND30lWdyj1ucoiAI
VYV8MYuA6qUWmAet9oMgPLc3adBB4iQ6xCjHD8xwHIHK+rqlzlPw9yueg4J3mHB8Ut
BFYyTqhQhJgBLTq72/Z1EP6L2Pqb9mV+fzew4SQAFQMf6B5GqJUKNwE+B2qaHNExFY
vkHdwrdkGJCOLR84zy+RUZOecV89LFRsEgbVgUzuaa8SxuiXo1bfrMSCbPncYpxnMn
xree7zyxKjXjX0jETNiYgnyYrLvv8J8M0fK6O3xvFDT418BkT2DUiKzoxYWrC72haZ
sV8T7x+CG7MIA==
Received: from APP-18 (unknown [10.50.14.242])
by mta-07.privateemail.com (Postfix) with ESMTPA;
Wed, 4 Jun 2025 09:52:05 -0400 (EDT)
Date: Wed, 4 Jun 2025 15:52:05 +0200 (CEST)
From: Marco Bonelli <marco@xxxxxxxxxx>
To: Alexandre Ghiti <alex@xxxxxxxx>,
"linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>
Cc: "terrelln@xxxxxx" <terrelln@xxxxxx>,
"rostedt@xxxxxxxxxxx" <rostedt@xxxxxxxxxxx>,
"mhiramat@xxxxxxxxxx" <mhiramat@xxxxxxxxxx>,
"mark.rutland@xxxxxxx" <mark.rutland@xxxxxxx>,
"linux-trace-kernel@xxxxxxxxxxxxxxx" <linux-trace-kernel@xxxxxxxxxxxxxxx>,
"paul.walmsley@xxxxxxxxxx" <paul.walmsley@xxxxxxxxxx>,
"palmer@xxxxxxxxxxx" <palmer@xxxxxxxxxxx>,
"aou@xxxxxxxxxxxxxxxxx" <aou@xxxxxxxxxxxxxxxxx>,
"linux-riscv@xxxxxxxxxxxxxxxxxxx" <linux-riscv@xxxxxxxxxxxxxxxxxxx>
Message-ID: <1338988468.1011577.1749045125350@xxxxxxxxxxxxxxxx>
In-Reply-To: <c239ee1b-f201-4e7b-80f8-03a7fb02b666@xxxxxxxx>
References: <960240908.630790.1748641210849@xxxxxxxxxxxxxxxx>
<1552795452.650306.1748692371190@xxxxxxxxxxxxxxxx>
<c239ee1b-f201-4e7b-80f8-03a7fb02b666@xxxxxxxx>
Subject: Re: Broken 32-bit riscv debug build with ZSTD and FTRACE
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Priority: 3
Importance: Normal
X-Mailer: Open-Xchange Mailer v7.10.6-Rev75
X-Originating-Client: open-xchange-appsuite
X-Virus-Scanned: ClamAV using ClamSMTP
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Can you attach your full config?
Here it is: https://pastebin.com/raw/wL2Q38g0 - uploaded to pastebin to
avoid clogging everyone's inbox.
I unfortunately cannot reproduce this issue locally, I tried on both
v6.15 and latest linus master, with gcc 13.1.0 and gcc 14.2.0 . I made
sure that I have FTRACE, ZSTD_COMPRESS and DEBUG_INFO enabled.
Are you building on a x86-64 host? Maybe something in my build environment
is relevant (not sure what it could be). I am building on x86-64 Debian 12
with host GCC 12.2.0, target cross GCC 14.2.0 [1].
Here is a minimal Dockerfile that reproduces the issue (docker build should
fail on the last command when it gets to MODPOST vmlinux.symvers):
# docker build --progress=plain .
FROM debian:12
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y \
build-essential git make gcc-12 binutils util-linux bc gawk flex \
bison dwarves tar wget
WORKDIR /work
RUN git clone --depth 1 --single-branch --branch v6.15 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
RUN wget 'https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/14.2.0/x86_64-gcc-14.2.0-nolibc-riscv32-linux.tar.xz'
RUN tar xf x86_64-gcc-14.2.0-nolibc-riscv32-linux.tar.xz
WORKDIR /work/linux
ENV PATH=/work/gcc-14.2.0-nolibc/riscv32-linux/bin:$PATH
ENV CROSS_COMPILE=riscv32-linux-
ENV ARCH=riscv
RUN make distclean && \
make defconfig && \
make 32-bit.config && \
./scripts/config \
-e DEBUG_KERNEL \
-e DEBUG_INFO \
-e DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT \
-d DEBUG_INFO_NONE \
-d DEBUG_INFO_REDUCED \
-e FTRACE && \
make olddefconfig
RUN make -j19 vmlinux
Hope this helps. Let me know if you need any additional info or test.
[1]: https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/14.2.0/x86_64-gcc-14.2.0-nolibc-riscv32-linux.tar.xz
--
Marco Bonelli
Return-Path: <linux-kernel+bounces-673299-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id A56A641E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:56:05 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id C8D51165A91
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:56:06 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id E5E9528FAB9;
Wed, 4 Jun 2025 13:55:59 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="NQFmVrS2"
Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id B88D142A87
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:55:57 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.158.5
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749045359; cv=none; b=PNhi3CvWEPZ6ozJvbo025oi415l9DO63ETXMSESgIfs7n/FzoE+sLplPJ/cXLT8akAXn+E+TaVIBnM+wTgJaEUgHHYzoPvB4XsykCDWx5wJukV4BEU4m2CSqYVo9XwpEkB1Z8EXV7fTrAtPRHRCsXUzNvDblo/WE3Ol9rP6SOtI=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749045359; c=relaxed/simple;
bh=KyiPMuosabdU3oCmvSRf372wEEqxqO3Vn4L93cRFGZ0=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=B6TeMHEPFXUt2s1tsciL/C9aSoTjWlkQHe8W+iPTAoHafZK8jedTbywAtztuf8qqOukyCt6VaXGy6UJ2A3Vw1opduQY074a3XQIUoHSoMk9HNbNf6YV1R3zObUbPsRd03YaV0HGNn1dLYujBT3lYDtHijEozKiUnT0b13zHdL0s=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=NQFmVrS2; arc=none smtp.client-ip=148.163.158.5
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com
Received: from pps.filterd (m0360072.ppops.net [127.0.0.1])
by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5545LKEP017615;
Wed, 4 Jun 2025 13:55:51 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc
:content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=pp1; bh=Sm20ok
PBPxXIFoUn+cXS10G2Ahu6SboCq2VjfA4YNnM=; b=NQFmVrS2UU4Crl0bQXJfAW
KvY2B1ZibXY+4L44r7YTc57lEV5k49xFMTosdvqqk11exVFyA2kKLKr4cXH4cOrh
HWMMkM5V6lzfzeL14ZzUZko64gFWJAzGVtXJ+UZvaxThKyeUtQTmiL6OFx+2d7uJ
mLq2PHAsB6dqdXQRzfNG6xybLMXwedsO8b6ych14aFHI5PRF6eiU3z1b9/P+4+uU
8nXZ04mANvMH7MQ9myhHAMd4u8b4HnmE9M8JSu320pCAJiay+8ybMiEzvMg2oC84
PJ0IMr7cjrb3xZJPaXOMt/WFFHfmJMVeXI/11pAzxroGhvlesAZI5MbDrYesADqQ
==
Received: from ppma13.dal12v.mail.ibm.com (dd.9e.1632.ip4.static.sl-reverse.com [50.22.158.221])
by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 472fwuje0y-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 13:55:50 +0000 (GMT)
Received: from pps.filterd (ppma13.dal12v.mail.ibm.com [127.0.0.1])
by ppma13.dal12v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 554BjlcZ028472;
Wed, 4 Jun 2025 13:55:50 GMT
Received: from smtprelay05.fra02v.mail.ibm.com ([9.218.2.225])
by ppma13.dal12v.mail.ibm.com (PPS) with ESMTPS id 470eakfrg3-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 13:55:49 +0000
Received: from smtpav02.fra02v.mail.ibm.com (smtpav02.fra02v.mail.ibm.com [10.20.54.101])
by smtprelay05.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 554DtmRM37880316
(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 4 Jun 2025 13:55:48 GMT
Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1])
by IMSVA (Postfix) with ESMTP id 5C75F2004E;
Wed, 4 Jun 2025 13:55:48 +0000 (GMT)
Received: from smtpav02.fra02v.mail.ibm.com (unknown [127.0.0.1])
by IMSVA (Postfix) with ESMTP id A319820040;
Wed, 4 Jun 2025 13:55:44 +0000 (GMT)
Received: from [9.43.126.91] (unknown [9.43.126.91])
by smtpav02.fra02v.mail.ibm.com (Postfix) with ESMTP;
Wed, 4 Jun 2025 13:55:44 +0000 (GMT)
Message-ID: <0d3428c2-6a3c-4d71-bc4d-057ba926852b@xxxxxxxxxxxxx>
Date: Wed, 4 Jun 2025 19:25:42 +0530
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v2 2/2] kernel/rcu/tree_stall: add
/sys/kernel/rcu_stall_count
To: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
Max Kellermann <max.kellermann@xxxxxxxxx>
Cc: song@xxxxxxxxxx, joel.granados@xxxxxxxxxx, dianders@xxxxxxxxxxxx,
cminyard@xxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
References: <20250504180831.4190860-1-max.kellermann@xxxxxxxxx>
<20250504180831.4190860-3-max.kellermann@xxxxxxxxx>
<47196e67-6533-4015-95db-63a76c1c0c5c@xxxxxxxxxxxxx>
<20250603171628.695542215c05af8727dc57a0@xxxxxxxxxxxxxxxxxxxx>
Content-Language: en-US
From: Sourabh Jain <sourabhjain@xxxxxxxxxxxxx>
In-Reply-To: <20250603171628.695542215c05af8727dc57a0@xxxxxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-TM-AS-GCONF: 00
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDEwMyBTYWx0ZWRfXwVRY+XMEo8pn upygPg0w9cqeAs4KBXaHEheaFqX0Gjqum2HsscR8le6NaTWYdToKVN3HF7q7l82zFi7GBV+/am/ PuLqy511JPj7fE6VC4ZtMyOGqmsyd0SImklRcPOMAFeW+ikzEgFImBM+0CnInWhf7JF4ZDVCLBq
JlN0vhcMTYt2oPhTOV4Sa0ooKkoW806a6qndZ9nJgprWaa8mPpzO4vcfmu5ES6MsHypla8rtg+c Rc1dRGWY7Y0wwGb/WboiN/sCBiNsGH5lCWN+HYxDq0k19uUo6vhnAc1UJiZMomINSsCQWMsuCti LqLgOcTVSAOH3NETix0uOYuLgQJZ81Mbp0jleIZpEcf0Uviz7jfaymSTNB9qGc0DI4RCNSTK6+4
SQ5htfn1oaaQRrG4ENr9g7ElYxOo4BztB5cheM8pEOfC91B2GpJjqU5TpS/YJsGIYSSDkvRj
X-Proofpoint-GUID: yPZ93pmj0JKHI3hYf75zXuJjL25iIBcu
X-Proofpoint-ORIG-GUID: yPZ93pmj0JKHI3hYf75zXuJjL25iIBcu
X-Authority-Analysis: v=2.4 cv=QtVe3Uyd c=1 sm=1 tr=0 ts=68405066 cx=c_pps a=AfN7/Ok6k8XGzOShvHwTGQ==:117 a=AfN7/Ok6k8XGzOShvHwTGQ==:17 a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10 a=VnNF1IyMAAAA:8 a=UgJECxHJAAAA:8 a=ehPtwOebbPU7iTpy3vsA:9 a=3ZKOabzyN94A:10
a=QEXdDO2ut3YA:10 a=-El7cUbtino8hM1DCn8D:22
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 suspectscore=0
bulkscore=0 adultscore=0 phishscore=0 impostorscore=0 malwarescore=0
priorityscore=1501 mlxlogscore=999 lowpriorityscore=0 spamscore=0
clxscore=1015 classifier=spam authscore=0 authtc=n/a authcc=
route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000
definitions=main-2506040103
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 04/06/25 05:46, Andrew Morton wrote:
On Tue, 3 Jun 2025 22:09:30 +0530 Sourabh Jain <sourabhjain@xxxxxxxxxxxxx> wrote:
Hello Andrew,
+#endif
+
rcu_stall_notifier_call_chain(RCU_STALL_NOTIFY_NORM, (void *)j - gps);
if (READ_ONCE(csd_lock_suppress_rcu_stall) && csd_lock_is_stuck()) {
pr_err("INFO: %s detected stall, but suppressed full report due to a stuck CSD-lock.\n", rcu_state.name);
It seems like this patch was not applied properly to the upstream tree.
Out of the three hunks in this patch, only the first one is applied; the
second
and third hunks are missing.
commit 2536c5c7d6ae5e1d844aa21f28b326b5e7f815ef
Author: Max Kellermann <max.kellermann@xxxxxxxxx>
Date: Sun May 4 20:08:31 2025 +0200
kernel/rcu/tree_stall: add /sys/kernel/rcu_stall_count
Expose a simple counter to userspace for monitoring tools.
OK. iirc there was quite a lot of churn and conflicts here :)
Please send a fixup against latest -linus?
Sure, I will wait for a day or two to see if Max is interested in
sending the fix-up patch. Otherwise, I will send it.
Thanks,
Sourabh Jain
Return-Path: <linux-kernel+bounces-673300-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 3C2AF41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:56:27 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 79B6916FB2A
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:56:28 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 8FE4B290BAD;
Wed, 4 Jun 2025 13:56:08 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="KPd/cZ7n"
Received: from mail-pj1-f73.google.com (mail-pj1-f73.google.com [209.85.216.73])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id D97F128F51C
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:56:04 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.73
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749045367; cv=none; b=DjbB1lWgjHdx8AhHqahYZK2jfp9/WAIJb/NxX6GLYloR7ZfEELsOJGMEqAZ2DANRUMX8qsjOECbchIUlJPEI0WWqATS3gJ0qCcijK4IkhiKTy1/ACYgiTwzU9gTheg7KehddRfnx4JzfS08JfDbifvWmFQ9VenA5Tk+8G2WjFyg=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749045367; c=relaxed/simple;
bh=Jd4bOTdufN+SkQt/Ld5ULZ9ZL5hW/b1y0IEOOcTR0w4=;
h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From:
To:Cc:Content-Type; b=JLnGuFvvyv6rNtppqWsLrMdl9ckMEpbg3Sh+m8mKy97cW1q3jCyYmiiwmRD2oJXaRd4ZpHRKSoGG7fIIfDo3Mv08pEyaHuqomonezg+gAifHmGT3paSo+/g4Y3Ps7jmuWU8w0eb4Zc+NXNLAuDgJbcq9AcGf0wmbS5DNdlSgOzs=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=KPd/cZ7n; arc=none smtp.client-ip=209.85.216.73
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com
Received: by mail-pj1-f73.google.com with SMTP id 98e67ed59e1d1-31218e2d5b0so10505446a91.2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 06:56:04 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=google.com; s=20230601; t=1749045364; x=1749650164; darn=vger.kernel.org;
h=cc:to:from:subject:message-id:references:mime-version:in-reply-to
:date:from:to:cc:subject:date:message-id:reply-to;
bh=9BF4BQWYCffwCvEcJneONMaK8DNln+FUa3w2saRVlU0=;
b=KPd/cZ7nryauGsNL/ig4YIq3aAnStFT+gMXWWmH8GF/RAliGoOHzMd6Jve/8+BDor2
+P3L/1kzMIMvG1XOQKMBcK2WdSPl+op5Osq5ZEaOJ0C3NqzoETvW8qsaoNIdUnY60BLU
tof2I5/iOMc+q0tNVcx6Db9T1PhG6QD+sJT0zNM7bU4jwtsxNraGBD+KxEuwR+AD/LX6
cqz1ZI9Ge242Eu7AJgRJhmGjJ4ft4W9RUzi6SqPIF+AkCJZQUCdF2dONA0HhGOg+2wb7
wSTjMjKw81Jxwz1mBfzjF6qH/+FmTW375DEEAQcK2zfRn6GxUdcznBj7W6KSLqLAAFmq
W3VQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749045364; x=1749650164;
h=cc:to:from:subject:message-id:references:mime-version:in-reply-to
:date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=9BF4BQWYCffwCvEcJneONMaK8DNln+FUa3w2saRVlU0=;
b=ZrqAw8ubK6uohcCa2BMNA0uYSm1m5gB9OrFq0zS1vL8o1jSyvuoMZzuMj9f8VeTOkA
bVE3VsQ7rZYUPX0lUnPGP+qo7FZNoUkYdL/apBqc1R8Z+JyWgV4DwC01RMKaOuiBwJim
R5943PK6rsU8XB7jqsgvlB43KXWOKqV7qS6pQ6B44XhN6jVu0xDRsgNdA2rq9tqp+sD4
ZdFxVELNbJtV3fgTjiozXqnbcO8f629fW+dLI7rv/5AnkfYIlXMNyXIqxlPZauyGgSzj
+qBSsOsTSYTjO4vNu3+LhUYQTkL2ohoi692G8cZPDlD708V4ETN/NNz25cqaMaLnv9HD
5zQw==
X-Forwarded-Encrypted: i=1; AJvYcCUZkwfJSy8Nl6RkJwGU6BCXf6xiJ/ibiH7ZisuxqkA4tCivN615JJ7eJj8zZG0FXUKbUvoTtxUNbkX1ujA=@vger.kernel.org
X-Gm-Message-State: AOJu0YwT4loQoImNYuDhou1nl64hg585qnCHjgb/zu70dnj8Okg4+RR/
odIt9eKGPLE7FL8kV9GKndEq2JPLiXKYcHOR9q1xt1q6djwA4BX1IsDIzrNNl0Nc6JtGABaIqwI
Mw8GW0g==
X-Google-Smtp-Source: AGHT+IHnjDcLBr5/b5vVMhOX9FYYeTjBdgbqUz02Tjf48qTrSCQ4pB6Rh8rX4c6lQeoe9Fsflp0vIM3e6wo=
X-Received: from pjbsb6.prod.google.com ([2002:a17:90b:50c6:b0:312:1dae:6bf0])
(user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:4ace:b0:312:f88d:260b
with SMTP id 98e67ed59e1d1-3130ccd51d5mr4706762a91.14.1749045364124; Wed, 04
Jun 2025 06:56:04 -0700 (PDT)
Date: Wed, 4 Jun 2025 06:56:02 -0700
In-Reply-To: <aD/c6RZvE7a1KSqk@xxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
Mime-Version: 1.0
References: <20250529234013.3826933-1-seanjc@xxxxxxxxxx> <20250529234013.3826933-9-seanjc@xxxxxxxxxx>
<aD/c6RZvE7a1KSqk@xxxxxxxxx>
Message-ID: <aEBQchT0cpCKkmQ6@xxxxxxxxxx>
Subject: Re: [PATCH 08/28] KVM: nSVM: Use dedicated array of MSRPM offsets to
merge L0 and L1 bitmaps
From: Sean Christopherson <seanjc@xxxxxxxxxx>
To: Chao Gao <chao.gao@xxxxxxxxx>
Cc: Paolo Bonzini <pbonzini@xxxxxxxxxx>, kvm@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
Borislav Petkov <bp@xxxxxxxxx>, Xin Li <xin@xxxxxxxxx>, Dapeng Mi <dapeng1.mi@xxxxxxxxxxxxxxx>
Content-Type: text/plain; charset="us-ascii"
X-Spam-Status: No, score=-11.0 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025, Chao Gao wrote:
>diff --git a/arch/x86/kvm/svm/nested.c b/arch/x86/kvm/svm/nested.c
>index 89a77f0f1cc8..e53020939e60 100644
>--- a/arch/x86/kvm/svm/nested.c
>+++ b/arch/x86/kvm/svm/nested.c
>@@ -184,6 +184,64 @@ void recalc_intercepts(struct vcpu_svm *svm)
> }
> }
>
>+static int nested_svm_msrpm_merge_offsets[9] __ro_after_init;
I understand how the array size (i.e., 9) was determined :). But, adding a
comment explaining this would be quite helpful
Yeah, I'll write a comment explaining what all is going on.
>+static int nested_svm_nr_msrpm_merge_offsets __ro_after_init;
>+
>+int __init nested_svm_init_msrpm_merge_offsets(void)
>+{
>+ const u32 merge_msrs[] = {
>+ MSR_STAR,
>+ MSR_IA32_SYSENTER_CS,
>+ MSR_IA32_SYSENTER_EIP,
>+ MSR_IA32_SYSENTER_ESP,
>+ #ifdef CONFIG_X86_64
>+ MSR_GS_BASE,
>+ MSR_FS_BASE,
>+ MSR_KERNEL_GS_BASE,
>+ MSR_LSTAR,
>+ MSR_CSTAR,
>+ MSR_SYSCALL_MASK,
>+ #endif
>+ MSR_IA32_SPEC_CTRL,
>+ MSR_IA32_PRED_CMD,
>+ MSR_IA32_FLUSH_CMD,
MSR_IA32_DEBUGCTLMSR is missing, but it's benign since it shares the same
offset as MSR_IA32_LAST* below.
Gah. Once all is said and done, it's not supposed to be in this list because its
only passed through for SEV-ES guests, but my intent was to keep it in this patch,
and then removeit along with XSS, EFER, PAT, GHCB, and TSC_AUX in the next.
This made me realize that merging in chunks has a novel flaw: if there is an MSR
that KVM *doesn't* want to give L2 access to, then KVM needs to ensure its offset
isn't processed, i.e. that there isn't a "collision" with another MSR. I don't
think it's a major concern, because the x2APIC MSRs are nicely isolated, and off
the top of my head I can't think of any MSRs that fall into that bucket. But it's
something worth calling out in a comment, at least.
I'm a bit concerned that we might overlook adding new MSRs to this array in the
future, which could lead to tricky bugs. But I have no idea how to avoid this.
Me either. One option would be to use wrapper macros for the interception helpers
to fill an array at compile time (similar to how kernel exception fixup works),
but (a) it requires modifications to the linker scripts to generate the arrays,
(b) is quite confusing/complex, and (c) it doesn't actually solve the problem,
it just inverts the problem. Because as above, there are MSRs we *don't* want
to expose to L2, and so we'd need to add yet more code to filter those out.
And the failure mode for the inverted case would be worse, because if we missed
an MSR, KVM would incorrectly give L2 access to an MSR. Whereas with the current
approach, a missed MSR simply means L2 gets a slower path; but functionally, it's
fine (and it has to be fine, because KVM can't force L1 to disable interception).
Removing this array and iterating over direct_access_msrs[] directly is an
option but it contradicts this series as one of its purposes is to remove
direct_access_msrs[].
Using direct_access_msrs[] wouldn't solve the problem either, because nothing
ensures _that_ array is up-to-date either.
The best idea I have is to add a test that verifies the MSRs that are supposed
to be passed through actually are passed through. It's still effectively manual
checking, but it would require us to screw up twice, i.e. forget to update both
the array and the test. The problem is that there's no easy and foolproof way to
verify that an MSR is passed through in a selftest.
E.g. it would be possible to precisely detect L2 => L0 MSR exits via a BPF program,
but incorporating a BPF program into a KVM selftest just to detect exits isn't
something I'm keen on doing (or maintaining).
Using the "exits" stat isn't foolproof due to NMIs (IRQs can be accounted for via
"irq_exits", and to a lesser extent page faults (especially if shadow paging is
in use).
If KVM provided an "msr_exits" stats, it would be trivial to verify interception
via a selftest, but I can't quite convince myself that MSR exits are interesting
enough to warrant their own stat.
>+ MSR_IA32_LASTBRANCHFROMIP,
>+ MSR_IA32_LASTBRANCHTOIP,
>+ MSR_IA32_LASTINTFROMIP,
>+ MSR_IA32_LASTINTTOIP,
>+
>+ MSR_IA32_XSS,
>+ MSR_EFER,
>+ MSR_IA32_CR_PAT,
>+ MSR_AMD64_SEV_ES_GHCB,
>+ MSR_TSC_AUX,
>+ };
>
> if (kvm_vcpu_read_guest(vcpu, offset, &value, 4))
>diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
>index 1c70293400bc..84dd1f220986 100644
>--- a/arch/x86/kvm/svm/svm.c
>+++ b/arch/x86/kvm/svm/svm.c
>@@ -5689,6 +5689,10 @@ static int __init svm_init(void)
> if (!kvm_is_svm_supported())
> return -EOPNOTSUPP;
>
>+ r = nested_svm_init_msrpm_merge_offsets();
>+ if (r)
>+ return r;
>+
If the offset array is used for nested virtualization only, how about guarding
this with nested virtualization? For example, in svm_hardware_setup():
Good idea, I'll do that in the next version.
if (nested) {
r = nested_svm_init_msrpm_merge_offsets();
if (r)
goto err;
pr_info("Nested Virtualization enabled\n");
kvm_enable_efer_bits(EFER_SVME | EFER_LMSLE);
}
> r = kvm_x86_vendor_init(&svm_init_ops);
> if (r)
> return r;
>diff --git a/arch/x86/kvm/svm/svm.h b/arch/x86/kvm/svm/svm.h
>index 909b9af6b3c1..0a8041d70994 100644
>--- a/arch/x86/kvm/svm/svm.h
>+++ b/arch/x86/kvm/svm/svm.h
>@@ -686,6 +686,8 @@ static inline bool nested_exit_on_nmi(struct vcpu_svm *svm)
> return vmcb12_is_intercept(&svm->nested.ctl, INTERCEPT_NMI);
> }
>
>+int __init nested_svm_init_msrpm_merge_offsets(void);
>+
> int enter_svm_guest_mode(struct kvm_vcpu *vcpu,
> u64 vmcb_gpa, struct vmcb *vmcb12, bool from_vmrun);
> void svm_leave_nested(struct kvm_vcpu *vcpu);
>--
>2.49.0.1204.g71687c7c1d-goog
>
Return-Path: <linux-kernel+bounces-673301-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id B4EED41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:56:41 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 2323E18942F7
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:56:55 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 9CED028FFD8;
Wed, 4 Jun 2025 13:56:34 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="tX5i7gfV"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id D1C0A28F51C;
Wed, 4 Jun 2025 13:56:33 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749045393; cv=none; b=PnCREEZBGB/AGsaDf42HMxxrSRcZkHvwd69RSKhEptc0MgBz73GvRvi+NxsoflcFv/07EkRytW2tfgPtRyKn0flZPAPlmDRl43g2UUB+gkWQjo1I6w5EIKWXIb46GagCSl1/B/i7nkrIgYfkisMqI3i+MmrBZYDHAV/GsIfcEhs=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749045393; c=relaxed/simple;
bh=hNaIjnP9UQIXqs9XzN5BySAC1EeT1gYOVTmbEjhso3w=;
h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
To:Cc:Content-Type; b=Fpr7W71uQk4b1q2yYmq6aq0qNjzwpwnobambXLbnpYCHy7rgq2NsVAdds21iMltq4IV3UHHH+lwh1MU11/H7yRw0HDv4Nb0PbEM+v8EaP23O9KP3g2B+ruU3ZCpxP4j3uiYUhdDMCK02MyrHBj2dk9DTLNVxuRmvgSEU0ZEEs+w=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=tX5i7gfV; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5EF15C4CEE7;
Wed, 4 Jun 2025 13:56:33 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749045393;
bh=hNaIjnP9UQIXqs9XzN5BySAC1EeT1gYOVTmbEjhso3w=;
h=References:In-Reply-To:From:Date:Subject:To:Cc:From;
b=tX5i7gfV/An0o+OVPNY+A2Ngdo4eZD2cKGN+XVYmr9KtKpr9kxuomMtKfA5+gFeSG
vygJBmnirp8AaBVUBkv8sNJ4daJQH/AQewxPpMagVRCCZ4YhHozBbU+JFrQsNdC+wz
cYn8FcZt2f3YQuPIpnj4M9q1IOXthHh+6YaKN0A6U2ZtTMlTw6bUmfncjC9TdyIbas
8uziFl4hKDealqfUt2A1E3lpMlCMij9e/QYRBfCFiTy+rTxYzq1v78cdgvFPsZ+71p
O0c1mF/9UsdfBEu0Vk+AWQAgAiAIhw7HBgnhcr5K56huHTHvGaA0JoS1HQz03hvVlq
ViYwVV0wdUHHg==
Received: by mail-ed1-f50.google.com with SMTP id 4fb4d7f45d1cf-60700a745e5so1078173a12.3;
Wed, 04 Jun 2025 06:56:33 -0700 (PDT)
X-Forwarded-Encrypted: i=1; AJvYcCV0TAmQvHclJDNFYcmErt93y0zHKbwQE2lWS2XNA6Kam4hK6umsvMwzuMzj+gy1W0ud+C0jJVX1Q99a1mw=@vger.kernel.org, AJvYcCVJQQvlR8JiVlclaA2SdbNRY6R3slOewrKmWhDsPay5hK+siid+ec58pqOiOudfaWxhVsmvhE3U@xxxxxxxxxxxxxxx
X-Gm-Message-State: AOJu0YwUu2aay2ZLMgqmeeFm8OYwLpp64pPRc0JB7gP8dKFBJOXyYep5
jAs3OwZiAxgRg1IpJYTJwKWLLrxyt4Fd39UCVwlsVrywJn7b6AswAz/wVmaJWlfwCUn9o1oxrby
4vn2Fs5c1TaJzXgmQYfUVViZPGqoMfX0=
X-Google-Smtp-Source: AGHT+IEpDdOfH7JSv9qoSDGd0z3t6ymqMnmQbNlmw+p25nqvJV9s6gLViUbiEfnbyljEN/038PRobbX/6ph/Dv/+ZLM=
X-Received: by 2002:a05:6402:524d:b0:607:1b7a:b989 with SMTP id
4fb4d7f45d1cf-6071b7abda8mr281358a12.12.1749045391972; Wed, 04 Jun 2025
06:56:31 -0700 (PDT)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
References: <20250531113851.21426-1-ziyao@xxxxxxxxxxx> <20250531113851.21426-2-ziyao@xxxxxxxxxxx>
<CAAhV-H7pvaz5N0-EfvhDNHAXJtR13p9Xi5hfgDxOpeXi9zMbTQ@xxxxxxxxxxxxxx> <aD6Zz8L9WJRXvwaW@xxxxxxx>
In-Reply-To: <aD6Zz8L9WJRXvwaW@xxxxxxx>
From: Huacai Chen <chenhuacai@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 21:56:20 +0800
X-Gmail-Original-Message-ID: <CAAhV-H6j1OT9D8ZBtyEP=Mu5+m=t0ebUvuC=gVeNsoPizwK1TQ@xxxxxxxxxxxxxx>
X-Gm-Features: AX0GCFvuz6tVp6jU6zQuxGpjxaWdrfNqx3hl5IIjC66LsSXVYjnimt4J7d3OKdw
Message-ID: <CAAhV-H6j1OT9D8ZBtyEP=Mu5+m=t0ebUvuC=gVeNsoPizwK1TQ@xxxxxxxxxxxxxx>
Subject: Re: [PATCH 1/2] platform/loongarch: laptop: Get brightness setting
from EC on probe
To: Yao Zi <ziyao@xxxxxxxxxxx>
Cc: Jianmin Lv <lvjianmin@xxxxxxxxxxx>, WANG Xuerui <kernel@xxxxxxxxxx>,
linux-kernel@xxxxxxxxxxxxxxx, loongarch@xxxxxxxxxxxxxxx,
Mingcong Bai <jeffbai@xxxxxxx>, Kexy Biscuit <kexybiscuit@xxxxxxx>, stable@xxxxxxxxxxxxxxx
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Tue, Jun 3, 2025 at 2:44=E2=80=AFPM Yao Zi <ziyao@xxxxxxxxxxx> wrote:
On Tue, Jun 03, 2025 at 12:11:48PM +0800, Huacai Chen wrote:
> On Sat, May 31, 2025 at 7:39=E2=80=AFPM Yao Zi <ziyao@xxxxxxxxxxx> wrot=
e:
> >
> > Previously 1 is unconditionally taken as current brightness value. Th=
is
> > causes problems since it's required to restore brightness settings on
> > resumption, and a value that doesn't match EC's state before suspensi=
on
> > will cause surprising changes of screen brightness.
> laptop_backlight_register() isn't called at resuming, so I think your
> problem has nothing to do with suspend (S3).
It does have something to do with it. In loongson_hotkey_resume() which
is called when leaving S3 (suspension), the brightness is restored
according to props.brightness,
bd =3D backlight_device_get_by_type(BACKLIGHT_PLATFORM);
if (bd) {
loongson_laptop_backlight_update(bd) ?
pr_warn("Loongson_backlight: resume brightness failed") :
pr_info("Loongson_backlight: resume brightness %d\n", bd-=
props
.brightness);
}
and without this patch, props.brightness is always set to 1 when the
driver probes, but actually (at least with the firmware on my laptop)
the screen brightness is set to 80 instead of 1 on cold boot, IOW, a
brightness value that doesn't match hardware state is set to
props.brightness.
On resumption, loongson_hotkey_resume() restores the brightness
settings according to props.brightness. But as the value isn't what is
used by hardware before suspension. the screen brightness will look very
different (1 v.s. 80) comparing to the brightness before suspension.
Some dmesg proves this as well, without this patch it says
loongson_laptop: Loongson_backlight: resume brightness 1
but before suspension, reading
/sys/class/backlight/loongson3_laptop/actual_brightness yields 80.
OK, that makes sense. But the commit message can still be improved, at
least replace suspension/resumption with suspend/resume. You can grep
them at Documentation/power.
Huacai
> But there is really a problem about hibernation (S4): the brightness
> is 1 during booting, but when switching to the target kernel, the
> brightness may jump to the old value.
>
> If the above case is what you meet, please update the commit message.
>
> Huacai
Thanks,
Yao Zi
> >
> > Let's get brightness from EC and take it as the current brightness on
> > probe of the laptop driver to avoid the surprising behavior. Tested o=
n
> > TongFang L860-T2 3A5000 laptop.
> >
> > Cc: stable@xxxxxxxxxxxxxxx
> > Fixes: 6246ed09111f ("LoongArch: Add ACPI-based generic laptop driver=
")
> > Signed-off-by: Yao Zi <ziyao@xxxxxxxxxxx>
> > ---
> > drivers/platform/loongarch/loongson-laptop.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/platform/loongarch/loongson-laptop.c b/drivers/p=
latform/loongarch/loongson-laptop.c
> > index 99203584949d..828bd62e3596 100644
> > --- a/drivers/platform/loongarch/loongson-laptop.c
> > +++ b/drivers/platform/loongarch/loongson-laptop.c
> > @@ -392,7 +392,7 @@ static int laptop_backlight_register(void)
> > if (!acpi_evalf(hotkey_handle, &status, "ECLL", "d"))
> > return -EIO;
> >
> > - props.brightness =3D 1;
> > + props.brightness =3D ec_get_brightness();
> > props.max_brightness =3D status;
> > props.type =3D BACKLIGHT_PLATFORM;
> >
> > --
> > 2.49.0
> >
> >
Return-Path: <linux-kernel+bounces-673302-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id E7A6741E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:58:15 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 853F3189450E
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:58:29 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 9F6DE28FFEC;
Wed, 4 Jun 2025 13:58:07 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kSlvmc5U"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id C79E728F935
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:58:06 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749045486; cv=none; b=r8emm4zr1TZrUuGS9zk+PxhXMCweWQUBPXpy9ovP5faamGwd/3i32RbygwfFBg6+ozM9+REVkB1Nx9XJw0ecY0iDmaD/I5uVZxjDd/ciux4HysLaHghle/vRnbYXN8RSCWnpuSVjAauGl7BESYoclrIuHS2H+EwUz0I66l/R5wU=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749045486; c=relaxed/simple;
bh=QRXYHY3k9SKVaoLTElRZshkhV3csk41wh+DXOlD/xiQ=;
h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
To:Cc:Content-Type; b=Cm2z9MqvTYNkJrgq2V7enB4/SUtTFc/Q6V9LPGw+E4mV9dyxGfQj2b+cScf8CIv/6rnhbt2C72dzCZGERrd5fTLSme4x5qw4GnP8nNwTzDg+vLw+N5IT6IKUlPGeNvoQjy1yiygMn3ekKXxFsJSqBSKF2hHA5xqfqx8y6RQ7JIw=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kSlvmc5U; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 48EE4C4CEF2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:58:06 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749045486;
bh=QRXYHY3k9SKVaoLTElRZshkhV3csk41wh+DXOlD/xiQ=;
h=References:In-Reply-To:From:Date:Subject:To:Cc:From;
b=kSlvmc5UV/fAMKvoYTu89L4yT7pJpL6XY+Dtwsck1IoVfEuNBz3kZh79EKzgTZ4Jo
RnKD0pkEFoU+YD9EN1EdByM48mmyfeenyUT8Thq/W1ff2AGFxdOs13IvdtJbcT1OeW
ZM/lg2KQgXN0lHOBkjgYkMVHN6xZ01myRXVqMPzYKrSlSsPnnEsJ1ZmoJ+MD4a8bOk
Ch8EX8PK5RLC56eZpkkX4xu7/wNA7RF2aiysvuv9bN4cEafixJwAqNxNGaOPiUefF4
54XCHaDb5NyQzc7gAJykVoxjKdWHXz1SLbpp0GhSOMU3fFoxGWyn5rt9eAeL+uR6k4
o1N/uValiBfzQ==
Received: by mail-ed1-f52.google.com with SMTP id 4fb4d7f45d1cf-602039559d8so12979714a12.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 06:58:06 -0700 (PDT)
X-Forwarded-Encrypted: i=1; AJvYcCVWMXmBYqhDklmWyp42VaDe4Mz1Obj9f2wiQpFBbNmGo5oW4nI99xL08+DqGJnBrxWfQCSIFTWVS6NdCp0=@vger.kernel.org
X-Gm-Message-State: AOJu0YwlH10y7zcwheF+DlMDcT7jTLafkiOdbmWpvSnPSnamunjVq8Qo
rhLhttrslXWYOYl9uEZoXBhBFpIdkbYLPTLliiieEIobAlZN46Zd6WR0kvDahEBMXloN557+N34
UkvL49o5xiHivZMmKloib+Gqo7YvaAQc=
X-Google-Smtp-Source: AGHT+IEBYJAM+K0rj2+spRhzULHWaeKMSJzGwvvpMAeB0yguZc1nfk4ig2PEKpq0Mb7MT9uKBmXBl3Ukizgy5R+1c3A=
X-Received: by 2002:a05:6402:348e:b0:601:f3f1:f10e with SMTP id
4fb4d7f45d1cf-606e98b0c7fmr3019199a12.5.1749045484519; Wed, 04 Jun 2025
06:58:04 -0700 (PDT)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
References: <20250531113851.21426-1-ziyao@xxxxxxxxxxx> <20250531113851.21426-3-ziyao@xxxxxxxxxxx>
<CAAhV-H7RBcaAP8WjjrX20cvuMixarqyeTLoMPdb8QMztz_648g@xxxxxxxxxxxxxx> <aD6e0JLntUC6BdH7@xxxxxxx>
In-Reply-To: <aD6e0JLntUC6BdH7@xxxxxxx>
From: Huacai Chen <chenhuacai@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 21:57:52 +0800
X-Gmail-Original-Message-ID: <CAAhV-H4yt2Rdu5-8QsDyXpLo5v8jHSDmBB0nBO+4-pKzfbYJHA@xxxxxxxxxxxxxx>
X-Gm-Features: AX0GCFvFtnwLjh5Ih6ITY7Ya5PF5l-bEs8ErSYvVmN0nCXxUeNlxcWJrZ3JdK00
Message-ID: <CAAhV-H4yt2Rdu5-8QsDyXpLo5v8jHSDmBB0nBO+4-pKzfbYJHA@xxxxxxxxxxxxxx>
Subject: Re: [PATCH 2/2] platform/loongarch: laptop: Support backlight power control
To: Yao Zi <ziyao@xxxxxxxxxxx>
Cc: Jianmin Lv <lvjianmin@xxxxxxxxxxx>, WANG Xuerui <kernel@xxxxxxxxxx>,
linux-kernel@xxxxxxxxxxxxxxx, loongarch@xxxxxxxxxxxxxxx,
Mingcong Bai <jeffbai@xxxxxxx>, Kexy Biscuit <kexybiscuit@xxxxxxx>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Tue, Jun 3, 2025 at 3:06=E2=80=AFPM Yao Zi <ziyao@xxxxxxxxxxx> wrote:
On Tue, Jun 03, 2025 at 12:16:57PM +0800, Huacai Chen wrote:
> On Sat, May 31, 2025 at 7:39=E2=80=AFPM Yao Zi <ziyao@xxxxxxxxxxx> wrot=
e:
> >
> > loongson_laptop_turn_{on,off}_backlight() are designed for controllin=
g
> > power of the backlight, but they aren't really used in the driver
> > previously.
> >
> > Unify these two functions since they only differ in arguments passed =
to
> > ACPI method, and wire up loongson_laptop_backlight_update() to update
> > power state of the backlight as well. Tested on TongFang L860-T2 3A50=
00
> > laptop.
> >
> > Signed-off-by: Yao Zi <ziyao@xxxxxxxxxxx>
> > ---
> > drivers/platform/loongarch/loongson-laptop.c | 53 +++++++-----------=
--
> > 1 file changed, 19 insertions(+), 34 deletions(-)
> >
> > diff --git a/drivers/platform/loongarch/loongson-laptop.c b/drivers/p=
latform/loongarch/loongson-laptop.c
> > index 828bd62e3596..f01e53b1c84d 100644
> > --- a/drivers/platform/loongarch/loongson-laptop.c
> > +++ b/drivers/platform/loongarch/loongson-laptop.c
> > @@ -56,8 +56,6 @@ static struct input_dev *generic_inputdev;
> > static acpi_handle hotkey_handle;
> > static struct key_entry hotkey_keycode_map[GENERIC_HOTKEY_MAP_MAX];
> >
> > -int loongson_laptop_turn_on_backlight(void);
> > -int loongson_laptop_turn_off_backlight(void);
> > static int loongson_laptop_backlight_update(struct backlight_device =
*bd);
> >
> > /* 2. ACPI Helpers and device model */
> > @@ -354,6 +352,22 @@ static int ec_backlight_level(u8 level)
> > return level;
> > }
> >
> > +static int ec_backlight_set_power(bool state)
> > +{
> > + int status;
> > + union acpi_object arg0 =3D { ACPI_TYPE_INTEGER };
> > + struct acpi_object_list args =3D { 1, &arg0 };
> > +
> > + arg0.integer.value =3D state;
> > + status =3D acpi_evaluate_object(NULL, "\\BLSW", &args, NULL);
> > + if (ACPI_FAILURE(status)) {
> > + pr_info("Loongson lvds error: 0x%x\n", status);
> > + return -EIO;
> > + }
> > +
> > + return 0;
> > +}
> > +
> > static int loongson_laptop_backlight_update(struct backlight_device =
*bd)
> > {
> > int lvl =3D ec_backlight_level(bd->props.brightness);
> > @@ -363,6 +377,8 @@ static int loongson_laptop_backlight_update(struc=
t backlight_device *bd)
> > if (ec_set_brightness(lvl))
> > return -EIO;
> >
> > + ec_backlight_set_power(bd->props.power =3D=3D BACKLIGHT_POWER=
_ON ? true : false);
> It is better to check the status before setting, because the EC
> firmware may not be as robust as needed, a checking can reduce
> interactions between kernel and EC.
>
> There is an example: dp_aux_backlight_update_status() in
> drivers/gpu/drm/display/drm_dp_helper.c.
It's reasonable and I'll take it.
> > +
> > return 0;
> > }
> >
> > @@ -394,6 +410,7 @@ static int laptop_backlight_register(void)
> >
> > props.brightness =3D ec_get_brightness();
> > props.max_brightness =3D status;
> > + props.power =3D BACKLIGHT_POWER_ON;
> > props.type =3D BACKLIGHT_PLATFORM;
> >
> > backlight_device_register("loongson_laptop",
> > @@ -402,38 +419,6 @@ static int laptop_backlight_register(void)
> > return 0;
> > }
> >
> > -int loongson_laptop_turn_on_backlight(void)
> > -{
> > - int status;
> > - union acpi_object arg0 =3D { ACPI_TYPE_INTEGER };
> > - struct acpi_object_list args =3D { 1, &arg0 };
> > -
> > - arg0.integer.value =3D 1;
> > - status =3D acpi_evaluate_object(NULL, "\\BLSW", &args, NULL);
> > - if (ACPI_FAILURE(status)) {
> > - pr_info("Loongson lvds error: 0x%x\n", status);
> > - return -ENODEV;
> > - }
> > -
> > - return 0;
> > -}
> > -
> > -int loongson_laptop_turn_off_backlight(void)
> > -{
> > - int status;
> > - union acpi_object arg0 =3D { ACPI_TYPE_INTEGER };
> > - struct acpi_object_list args =3D { 1, &arg0 };
> > -
> > - arg0.integer.value =3D 0;
> > - status =3D acpi_evaluate_object(NULL, "\\BLSW", &args, NULL);
> > - if (ACPI_FAILURE(status)) {
> > - pr_info("Loongson lvds error: 0x%x\n", status);
> > - return -ENODEV;
> > - }
> > -
> > - return 0;
> > -}
> I prefer to keep them, in downstream kernels there are users of them,
> I don't want to add them back if one day those users are upstream.
These two functions are mostly identical, and I think unifying them
together should be the right way to go. If this makes sense, users
introduced in the future should also adapt it, instead of keeping
redundant code in the current mainline kernel.
If there're new users of the API out of the loongson3_laptop module in
the future, it's still easy to rename ec_backlight_set_power() and
export it.
For these two points, I disagree on keeping these two symbols.
OK, please add a check before communicating with EC, and then send V2
as soon as possible.
Huacai
> Huacai
Thanks,
Yao Zi
> > -
> > static int __init event_init(struct generic_sub_driver *sub_driver)
> > {
> > int ret;
> > --
> > 2.49.0
> >
> >
>
Return-Path: <linux-kernel+bounces-673303-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id E1F3D41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:58:20 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id B0BCE172DD5
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:58:21 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 5E90A29009B;
Wed, 4 Jun 2025 13:58:08 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="NRoq57/T"
Received: from mail-yb1-f179.google.com (mail-yb1-f179.google.com [209.85.219.179])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA97028F51C
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:58:05 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.179
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749045487; cv=none; b=r9BolriEHl3hgAbNTs8q9AFPecjDJYaGuAyNMI2C3sAyuFK6oLK4vXNJnKbnxFq0wamrESujQV1jNjLCxFthbj7LfeQbzBcXa609rwRJydq+InYZgGY3bk5W6AJACROMFHqbR1A4cJ5SMZKfUL2FijI2JSoTxls2oSOViyuvHMo=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749045487; c=relaxed/simple;
bh=zRFxwlOuzhqwZx7qzxl80h5Bo/0p7oc7WIbfN8Qjlw4=;
h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
To:Cc:Content-Type; b=Q+Q18UYuasyY4bU700hhcNPmKmWdx/H5O1CsxvMsiEIrhbfBs3lKKxELayqflsV8Gc6z+9KGyD7w+f9gAePoCvCzIOxpZ+Fi5nnH8r2EAwl5eXAC8gsWl0LGx2LJVJg+exmb0Hb/oT5KUVei1xhjxvtKq1p+TaOKZGQA6WCjzWM=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=NRoq57/T; arc=none smtp.client-ip=209.85.219.179
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org
Received: by mail-yb1-f179.google.com with SMTP id 3f1490d57ef6-e7dc3df7ac3so6848859276.3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 06:58:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=linaro.org; s=google; t=1749045485; x=1749650285; darn=vger.kernel.org;
h=cc:to:subject:message-id:date:from:in-reply-to:references
:mime-version:from:to:cc:subject:date:message-id:reply-to;
bh=IFWXnsIMSq1bn0DUFYmY7z6V87/rRA1du54TZxFaV2Y=;
b=NRoq57/TUbyB7bb5VxHVyq24yoAGAr1hQ99CQFtbu6trcUZRoVYF23HAk6hj45wG3D
xLe1YFmQwsOHaa9BMDXe14VjCzh96PvvR5MUJNO+l+6aOU9AEcCfRV2eQXWBsinrtB8e
kA7MBL8cGEHkE2KlegjBelu5eMfxydvNaMguOW2laDNBFcNSQkSll6Nkz7IEey4Guwd4
e7qStXO29JO3J6kXMPCMFiM0TYqmMgOpi4u+EEWdWhHwSKZ+J4Mg4WdzGWZyTRTfZQ6f
rs2D2tVO5bqTuHr7m4Q8BaMd++fXkMlFMTwk1Z5gYK51QjoqSP0HG8sQltH7IStlAGTI
g0Sg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749045485; x=1749650285;
h=cc:to:subject:message-id:date:from:in-reply-to:references
:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=IFWXnsIMSq1bn0DUFYmY7z6V87/rRA1du54TZxFaV2Y=;
b=G6v+rgWeeE9Mdz1SK9GTmj1t3XT2HW6nnkPZNvhAYDv5qX0XhPGuPQ26UacYXiT+AJ
+kfMrG4EVoFFnJe7SmZfIOwNX7vkGviJ/2KdD8RmE7II/pfVpeWW6cam2yx4tjfRB/q0
7HP1Fav+hHYSTheN+xCQUMJYpIcpUPysFMT7ISkqB2E/HAZRYMZYp7ktVxRSlxPNAv+8
xDw8kJMgr5One4dL9pJ+IABNQgw8+88rvbdWmqKCgqco4gbpmzY2GEWupO4DdvuzeOEs
UjoxvG9+gy1vYSs9QUMr8mozgkfSeel8Q6ib1yg7mImESPcEKgtfudG0NYhdBt4AFqFW
uqsQ==
X-Forwarded-Encrypted: i=1; AJvYcCWY/HdqQfCWNAA2D6MOABxBFDrBXB/Ij4jAjb20dV/44A/9twscgnyPgFcnn8GR/ijiTwn9tpMDv/ve4F8=@vger.kernel.org
X-Gm-Message-State: AOJu0YysOKHZ7pHxleH5U5JDgWM4xvLOyuOyIWEBwGGi+9rZpMR2kuOZ
pdFjkcQBn6si9/SUqWfPe3LP9UQky2Zo3jBFtxtylGEiV2fFcSiA5aS59fX3KvsVcqG7WFe+bU1
dHqXLrtvu/viFpqE54CuHwCtgOzUuCok5F004DcLsaw==
X-Gm-Gg: ASbGncvqtN95LzqQTV0fCWfsw9fEAmCFgy65ZeKtCVdJBNUS3TmTMtiWWfqTd8HhChP
qfkrlzsVZY6qND71ExPYRUPnU4PHDoBtiZRLz/JrcVp5VvLhdQP3s3BVyhTTTCD8VA8wTsbGoOs
Jx/cnTpHV2wxdM7H+HfmRii3IDC9QyMbcnVQ==
X-Google-Smtp-Source: AGHT+IGXFY8gppNCB1I6k87GeD/bmWPUV8R4mMgK2i7dZCLcfF2RhkUBwoySiJMKIOMWeHJraaSZXAxgR7paTZPeyFU=
X-Received: by 2002:a05:6902:1383:b0:e81:2447:6b74 with SMTP id
3f1490d57ef6-e817a0011f4mr3409868276.43.1749045484537; Wed, 04 Jun 2025
06:58:04 -0700 (PDT)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
References: <CGME20250529222410eucas1p2e1d41a2fc717caef1aed51367a7db944@xxxxxxxxxxxxxxxxxxxx>
<20250530-apr_14_for_sending-v3-0-83d5744d997c@xxxxxxxxxxx>
<20250530-apr_14_for_sending-v3-7-83d5744d997c@xxxxxxxxxxx>
<CAPDyKFpYfZNthdRN=pCv4FEdFCzrKEH4aFBy4ew-xLKtpbJ5Tg@xxxxxxxxxxxxxx> <a68e3bee-f4ad-4d73-a5a8-e39772c41711@xxxxxxxxxxx>
In-Reply-To: <a68e3bee-f4ad-4d73-a5a8-e39772c41711@xxxxxxxxxxx>
From: Ulf Hansson <ulf.hansson@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 15:57:28 +0200
X-Gm-Features: AX0GCFsKqqHfcoyjgQNY4Bx0T-G_vnaUmkhnEv_Xdt_09WriRo8KoB3SpnFxVUU
Message-ID: <CAPDyKFo8scYL59+ELgawop30habZad0Xsd6bKGLXtSF+UNd9Ng@xxxxxxxxxxxxxx>
Subject: Re: [PATCH v3 7/8] riscv: dts: thead: th1520: Add IMG BXM-4-64 GPU node
To: Michal Wilczynski <m.wilczynski@xxxxxxxxxxx>
Cc: Drew Fustini <drew@xxxxxxxx>, Guo Ren <guoren@xxxxxxxxxx>, Fu Wei <wefu@xxxxxxxxxx>,
Rob Herring <robh@xxxxxxxxxx>, Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>,
Bartosz Golaszewski <brgl@xxxxxxxx>, Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>,
Frank Binns <frank.binns@xxxxxxxxxx>, Matt Coster <matt.coster@xxxxxxxxxx>,
Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>, Maxime Ripard <mripard@xxxxxxxxxx>,
Thomas Zimmermann <tzimmermann@xxxxxxx>, David Airlie <airlied@xxxxxxxxx>, Simona Vetter <simona@xxxxxxxx>,
Paul Walmsley <paul.walmsley@xxxxxxxxxx>, Palmer Dabbelt <palmer@xxxxxxxxxxx>,
Albert Ou <aou@xxxxxxxxxxxxxxxxx>, Alexandre Ghiti <alex@xxxxxxxx>,
Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>, linux-riscv@xxxxxxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
linux-pm@xxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx
Content-Type: text/plain; charset="UTF-8"
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, 4 Jun 2025 at 14:40, Michal Wilczynski <m.wilczynski@xxxxxxxxxxx> wrote:
On 6/3/25 14:27, Ulf Hansson wrote:
> On Fri, 30 May 2025 at 00:24, Michal Wilczynski
> <m.wilczynski@xxxxxxxxxxx> wrote:
>>
>> Add a device tree node for the IMG BXM-4-64 GPU present in the T-HEAD
>> TH1520 SoC used by the Lichee Pi 4A board. This node enables support for
>> the GPU using the drm/imagination driver.
>>
>> By adding this node, the kernel can recognize and initialize the GPU,
>> providing graphics acceleration capabilities on the Lichee Pi 4A and
>> other boards based on the TH1520 SoC.
>>
>> Add fixed clock gpu_mem_clk, as the MEM clock on the T-HEAD SoC can't be
>> controlled programatically.
>>
>> Signed-off-by: Michal Wilczynski <m.wilczynski@xxxxxxxxxxx>
>> ---
>> arch/riscv/boot/dts/thead/th1520.dtsi | 22 ++++++++++++++++++++++
>> 1 file changed, 22 insertions(+)
>>
>> diff --git a/arch/riscv/boot/dts/thead/th1520.dtsi b/arch/riscv/boot/dts/thead/th1520.dtsi
>> index 6170eec79e919b606a2046ac8f52db07e47ef441..ee937bbdb7c08439a70306f035b1cc82ddb4bae2 100644
>> --- a/arch/riscv/boot/dts/thead/th1520.dtsi
>> +++ b/arch/riscv/boot/dts/thead/th1520.dtsi
>> @@ -225,6 +225,13 @@ aonsys_clk: clock-73728000 {
>> #clock-cells = <0>;
>> };
>>
>> + gpu_mem_clk: mem-clk {
>> + compatible = "fixed-clock";
>> + clock-frequency = <0>;
>> + clock-output-names = "gpu_mem_clk";
>> + #clock-cells = <0>;
>> + };
>> +
>> stmmac_axi_config: stmmac-axi-config {
>> snps,wr_osr_lmt = <15>;
>> snps,rd_osr_lmt = <15>;
>> @@ -504,6 +511,21 @@ clk: clock-controller@ffef010000 {
>> #clock-cells = <1>;
>> };
>>
>> + gpu: gpu@ffef400000 {
>> + compatible = "thead,th1520-gpu", "img,img-bxm-4-64",
>> + "img,img-rogue";
>> + reg = <0xff 0xef400000 0x0 0x100000>;
>> + interrupt-parent = <&plic>;
>> + interrupts = <102 IRQ_TYPE_LEVEL_HIGH>;
>> + clocks = <&clk_vo CLK_GPU_CORE>,
>> + <&gpu_mem_clk>,
>> + <&clk_vo CLK_GPU_CFG_ACLK>;
>> + clock-names = "core", "mem", "sys";
>> + power-domains = <&aon TH1520_GPU_PD>;
>> + power-domain-names = "a";
>
> If the power-domain-names are really needed, please pick a
> useful/descriptive name.
Yeah they are required. Even though this convention doesn't seem to be
enforced by the dt-binding it seems like it's hard-coded into the driver
330e76d31697 ("drm/imagination: Add power domain control"). So I don't
think I have any choice here.
Well, unless there is a DT doc describing the power-domain-names it's
perfectly fine to change the driver too.
Moreover, it looks like 330e76d31697 is a brand new commit, just in
linux-next, so not even included in a release yet.
Kind regards
Uffe
Return-Path: <linux-kernel+bounces-673304-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 09E3541E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:58:43 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 5FB7F1894AD6
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:58:55 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id ECA9128FABB;
Wed, 4 Jun 2025 13:58:12 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Fb1apBZg"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 26B5228F51C;
Wed, 4 Jun 2025 13:58:12 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749045492; cv=none; b=Rr/+sIC5AKsneErwynahYY0H0MxcFCTbz3XVHTYRFAUwWoZ6OLSdvFufLuCVN2JjFCoID9A51t9mDgBK25HX5dBKiyFxFgdATbLswT/uY7IhfhOFSs89JMohqyAgCeJhvgr3DMFLpwpwqZyrdIzpPzsEITGkIApTlEwiNESPHP0=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749045492; c=relaxed/simple;
bh=DmoZb/9o3rHGp2jGpcgoTHMl8Ju66rgQCq7at8FrRfM=;
h=Date:Content-Type:MIME-Version:From:Cc:To:In-Reply-To:References:
Message-Id:Subject; b=SlSSsdz3C9QdHG90a5OJCoStEE7C4yyd2Zn5oKtw0v3/Pgv1ftRxVl1d1DstUPbGEMWEenFN+LN35/wuxO7XiIQjHLFuZQezmw28O59jlF4DNGqB8l2qSrxVJwvtexY45oZE4dmbJJu1LYMmW1DJ7LJcxKvQHPpOZB1O9LUy00k=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Fb1apBZg; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE84DC4CEE4;
Wed, 4 Jun 2025 13:58:11 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749045492;
bh=DmoZb/9o3rHGp2jGpcgoTHMl8Ju66rgQCq7at8FrRfM=;
h=Date:From:Cc:To:In-Reply-To:References:Subject:From;
b=Fb1apBZg+VOhlfLXG1iDiloTrcIMRFweni9mL+9petMCQ5sqx1/Ay5x4uPlWMHyFA
RPU58NRypx5ukcZPLC40Gxx5v2ti+g2uLIGi2YwAxn/yuXikFUdyfGw332fZ9TpAnY
3fg0DV30D+fSSS9/2as7/N2zy0B96Mbt9pqK1ZNcio0dXO6IbhCCfnI9/0cCHxzWqn
7IHKk1Svq3I+hpK5ouwT71QmpS4xbqTBZFaEhIqjg74QcVUPo44fybVwCV+mYmzGt9
7LxVyNiOKoincQzEV3t9EaykZj8625C4CFBO2SDxztmTIIq3J0+Hj8U6s1dcGrcpg+
xdi4F/0uPUaBg==
Date: Wed, 04 Jun 2025 08:58:09 -0500
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
From: "Rob Herring (Arm)" <robh@xxxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx, Conor Dooley <conor+dt@xxxxxxxxxx>,
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Heiko Stuebner <heiko@xxxxxxxxx>,
linux-rockchip@xxxxxxxxxxxxxxxxxxx, devicetree@xxxxxxxxxxxxxxx
To: Alexey Charkov <alchark@xxxxxxxxx>
In-Reply-To: <20250603-sige5-updates-v1-0-717e8ce4ab77@xxxxxxxxx>
References: <20250603-sige5-updates-v1-0-717e8ce4ab77@xxxxxxxxx>
Message-Id: <174904540020.3869609.29886103068021354.robh@xxxxxxxxxx>
Subject: Re: [PATCH 0/4] arm64: dts: rockchip: enable further peripherals
on ArmSoM Sige5
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Tue, 03 Jun 2025 21:01:12 +0400, Alexey Charkov wrote:
Add support for the two USB type A ports, link up the CPU regulators for
DVFS, enable WiFi and Bluetooth.
The bluetooth part might warrant some discussion and thoughts from the
list, given that it's connected over UART and thus not discoverable. At
the same time, there are two revisions of the board which have different
Bluetooth chips soldered on: Realtek based on v1.1 and Broadcom based on
v1.2. I'm not sure if there is any way to determine board version from
software. Mine is v1.2, so the respective patch deals with the Broadcom
case only, but maybe it's better to move it into a .dtso and thus kick
the can down the road (i.e. make the user deal with board identification
and loading of the right overlay)? Thoughts welcome.
Best regards,
Alexey
Signed-off-by: Alexey Charkov <alchark@xxxxxxxxx>
---
Alexey Charkov (4):
arm64: dts: rockchip: list all CPU supplies on ArmSoM Sige5
arm64: dts: rockchip: enable USB A ports on ArmSoM Sige5
arm64: dts: rockchip: enable wifi on ArmSoM Sige5
arm64: dts: rockchip: enable bluetooth on ArmSoM Sige5
.../boot/dts/rockchip/rk3576-armsom-sige5.dts | 135 +++++++++++++++++++++
arch/arm64/boot/dts/rockchip/rk3576.dtsi | 16 +++
2 files changed, 151 insertions(+)
---
base-commit: 546b1c9e93c2bb8cf5ed24e0be1c86bb089b3253
change-id: 20250602-sige5-updates-a162b501a1b1
Best regards,
--
Alexey Charkov <alchark@xxxxxxxxx>
My bot found new DTB warnings on the .dts files added or changed in this
series.
Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings
are fixed by another series. Ultimately, it is up to the platform
maintainer whether these warnings are acceptable or not. No need to reply
unless the platform maintainer has comments.
If you already ran DT checks and didn't see these error(s), then
make sure dt-schema is up to date:
pip3 install dtschema --upgrade
This patch series was applied (using b4) to base:
Base: using specified base-commit 546b1c9e93c2bb8cf5ed24e0be1c86bb089b3253
If this is not the correct base, please add 'base-commit' tag
(or use b4 which does this automatically)
New warnings running 'make CHECK_DTBS=y for arch/arm64/boot/dts/rockchip/' for 20250603-sige5-updates-v1-0-717e8ce4ab77@xxxxxxxxx:
arch/arm64/boot/dts/rockchip/rk3576-roc-pc.dtb: mmc@2a320000 (rockchip,rk3576-dw-mshc): compatible: 'oneOf' conditional failed, one must be fixed:
['rockchip,rk3576-dw-mshc', 'rockchip,rk3288-dw-mshc'] is too long
'rockchip,rk2928-dw-mshc' was expected
'rockchip,rk3288-dw-mshc' was expected
'rockchip,rk3576-dw-mshc' is not one of ['rockchip,px30-dw-mshc', 'rockchip,rk1808-dw-mshc', 'rockchip,rk3036-dw-mshc', 'rockchip,rk3128-dw-mshc', 'rockchip,rk3228-dw-mshc', 'rockchip,rk3308-dw-mshc', 'rockchip,rk3328-dw-mshc', 'rockchip,rk3368-dw-mshc', 'rockchip,rk3399-dw-mshc', 'rockchip,rk3528-dw-mshc', 'rockchip,rk3562-dw-mshc', 'rockchip,rk3568-dw-mshc', 'rockchip,rk3588-dw-mshc', 'rockchip,rv1108-dw-mshc', 'rockchip,rv1126-dw-mshc']
from schema $id: http://devicetree.org/schemas/mmc/rockchip-dw-mshc.yaml#
arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5.dtb: mmc@2a320000 (rockchip,rk3576-dw-mshc): compatible: 'oneOf' conditional failed, one must be fixed:
['rockchip,rk3576-dw-mshc', 'rockchip,rk3288-dw-mshc'] is too long
'rockchip,rk2928-dw-mshc' was expected
'rockchip,rk3288-dw-mshc' was expected
'rockchip,rk3576-dw-mshc' is not one of ['rockchip,px30-dw-mshc', 'rockchip,rk1808-dw-mshc', 'rockchip,rk3036-dw-mshc', 'rockchip,rk3128-dw-mshc', 'rockchip,rk3228-dw-mshc', 'rockchip,rk3308-dw-mshc', 'rockchip,rk3328-dw-mshc', 'rockchip,rk3368-dw-mshc', 'rockchip,rk3399-dw-mshc', 'rockchip,rk3528-dw-mshc', 'rockchip,rk3562-dw-mshc', 'rockchip,rk3568-dw-mshc', 'rockchip,rk3588-dw-mshc', 'rockchip,rv1108-dw-mshc', 'rockchip,rv1126-dw-mshc']
from schema $id: http://devicetree.org/schemas/mmc/rockchip-dw-mshc.yaml#
arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5.dtb: mmc@2a320000 (rockchip,rk3576-dw-mshc): Unevaluated properties are not allowed ('compatible' was unexpected)
from schema $id: http://devicetree.org/schemas/mmc/rockchip-dw-mshc.yaml#
arch/arm64/boot/dts/rockchip/rk3576-evb1-v10.dtb: mmc@2a320000 (rockchip,rk3576-dw-mshc): compatible: 'oneOf' conditional failed, one must be fixed:
['rockchip,rk3576-dw-mshc', 'rockchip,rk3288-dw-mshc'] is too long
'rockchip,rk2928-dw-mshc' was expected
'rockchip,rk3288-dw-mshc' was expected
'rockchip,rk3576-dw-mshc' is not one of ['rockchip,px30-dw-mshc', 'rockchip,rk1808-dw-mshc', 'rockchip,rk3036-dw-mshc', 'rockchip,rk3128-dw-mshc', 'rockchip,rk3228-dw-mshc', 'rockchip,rk3308-dw-mshc', 'rockchip,rk3328-dw-mshc', 'rockchip,rk3368-dw-mshc', 'rockchip,rk3399-dw-mshc', 'rockchip,rk3528-dw-mshc', 'rockchip,rk3562-dw-mshc', 'rockchip,rk3568-dw-mshc', 'rockchip,rk3588-dw-mshc', 'rockchip,rv1108-dw-mshc', 'rockchip,rv1126-dw-mshc']
from schema $id: http://devicetree.org/schemas/mmc/rockchip-dw-mshc.yaml#
arch/arm64/boot/dts/rockchip/rk3576-rock-4d.dtb: mmc@2a320000 (rockchip,rk3576-dw-mshc): compatible: 'oneOf' conditional failed, one must be fixed:
['rockchip,rk3576-dw-mshc', 'rockchip,rk3288-dw-mshc'] is too long
'rockchip,rk2928-dw-mshc' was expected
'rockchip,rk3288-dw-mshc' was expected
'rockchip,rk3576-dw-mshc' is not one of ['rockchip,px30-dw-mshc', 'rockchip,rk1808-dw-mshc', 'rockchip,rk3036-dw-mshc', 'rockchip,rk3128-dw-mshc', 'rockchip,rk3228-dw-mshc', 'rockchip,rk3308-dw-mshc', 'rockchip,rk3328-dw-mshc', 'rockchip,rk3368-dw-mshc', 'rockchip,rk3399-dw-mshc', 'rockchip,rk3528-dw-mshc', 'rockchip,rk3562-dw-mshc', 'rockchip,rk3568-dw-mshc', 'rockchip,rk3588-dw-mshc', 'rockchip,rv1108-dw-mshc', 'rockchip,rv1126-dw-mshc']
from schema $id: http://devicetree.org/schemas/mmc/rockchip-dw-mshc.yaml#
Return-Path: <linux-kernel+bounces-673305-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 2C3AE41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:59:16 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 36D8218923DE
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:59:06 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id E8469290D98;
Wed, 4 Jun 2025 13:58:14 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LYcbiahQ"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id D6676290D84;
Wed, 4 Jun 2025 13:58:13 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749045493; cv=none; b=MVB+niiQ9ptbersvEQ9qpKdFqhdyIuHAHhBsKPDFw8oohuLRgz+gXqOIsHxVUhavmGyDjFE309xMJRetoOMxDv0IW1EQxoB18eKbonl8Fszrl6ndys8dIPAFXedIyZxnKejNan5j4Vpa93Tr9VTys0VZJKgXW0UTuQ+Ba2DOEaU=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749045493; c=relaxed/simple;
bh=+Zk0xNYskcCR1qYwRSmGjdTDUX7luU28zANHvoQ3zVI=;
h=Date:Content-Type:MIME-Version:From:Cc:To:In-Reply-To:References:
Message-Id:Subject; b=sOH93LRu1qyFGKOUXbOM26+GwRigvmpkov+/cO7Bm+KR3o572W55oM38lKSk8AWqsxmPvyQms/vHrLO283OGEEiEzUUs1uyUSgo2rk5g6rGYfkmzZsgv9JRcrqFRShkQuAXiQfF4WpDL7MnuUKyTMqMpTOQoc1fBv6qXQymv8f8=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LYcbiahQ; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9282EC4CEE4;
Wed, 4 Jun 2025 13:58:13 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749045493;
bh=+Zk0xNYskcCR1qYwRSmGjdTDUX7luU28zANHvoQ3zVI=;
h=Date:From:Cc:To:In-Reply-To:References:Subject:From;
b=LYcbiahQIs1FeCD9VN0h5PbP6sZsBiigR/aMmkahcyhaHbtLxC/mUeNZ7djLmn709
HYDo+6HpNe6lUZug18UDndeylBhdAg2CXOom9Wg+dW59loiW9SAbtcZcoPWM6xVajT
F1pxL8nffMjuUW6KQugYN4abn+/iqgwxkRRB+3zrIrrw2hyppv0CNZHQd2p1GQrdE0
p0n4x4+NsSlKvNtiGsuVA/zRUuwDNq7AzYngQOnpGQ6lcjulxp0RKHgxIFWHRmAUae
2e2UdLbVxHCoKGBkyNKEBP0IrLy35TYFSKpRWyTSd8RPIXhmEpf6ATvFcSu6cL/6kB
cTdXfo9usJzVQ==
Date: Wed, 04 Jun 2025 08:58:12 -0500
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
From: "Rob Herring (Arm)" <robh@xxxxxxxxxx>
Cc: conor+dt@xxxxxxxxxx, linux-aspeed@xxxxxxxxxxxxxxxx,
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, krzk+dt@xxxxxxxxxx,
andrew@xxxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, joel@xxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx
To: Donald Shannon <donalds@xxxxxxxxxx>
In-Reply-To: <20250604025054.981087-2-donalds@xxxxxxxxxx>
References: <20250604025054.981087-2-donalds@xxxxxxxxxx>
Message-Id: <174904540089.3869659.869773222407725254.robh@xxxxxxxxxx>
Subject: Re: [PATCH v2 0/1] ARM: dts: aspeed: Add device tree for Nvidia's
GB200
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Tue, 03 Jun 2025 19:50:54 -0700, Donald Shannon wrote:
Changes in v2:
- Changed phy-mode to rgmii-id based on Andrew Lunn's feedback
- Fixed typo from gb200nvl to gb200 in Makefile
Donald Shannon (1):
ARM: dts: aspeed: Add device tree for Nvidia's GB200 UT3.0b platform
BMC
arch/arm/boot/dts/aspeed/Makefile | 1 +
.../aspeed/aspeed-bmc-nvidia-gb200-ut30b.dts | 1172 +++++++++++++++++
2 files changed, 1173 insertions(+)
create mode 100644 arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dts
--
2.43.0
My bot found new DTB warnings on the .dts files added or changed in this
series.
Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings
are fixed by another series. Ultimately, it is up to the platform
maintainer whether these warnings are acceptable or not. No need to reply
unless the platform maintainer has comments.
If you already ran DT checks and didn't see these error(s), then
make sure dt-schema is up to date:
pip3 install dtschema --upgrade
This patch series was applied (using b4) to base:
Base: attempting to guess base-commit...
Base: failed to guess base
If this is not the correct base, please add 'base-commit' tag
(or use b4 which does this automatically)
New warnings running 'make CHECK_DTBS=y for arch/arm/boot/dts/aspeed/' for 20250604025054.981087-2-donalds@xxxxxxxxxx:
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: timer (arm,armv7-timer): 'clocks' does not match any of the regexes: '^pinctrl-[0-9]+$'
from schema $id: http://devicetree.org/schemas/timer/arm,arch_timer.yaml#
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: /sdram@1e6e0000: failed to match any schema with compatible: ['aspeed,ast2600-sdram-edac', 'syscon']
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: bus@1e600000 (aspeed,ast2600-ahbc): compatible: ['aspeed,ast2600-ahbc', 'syscon'] is too long
from schema $id: http://devicetree.org/schemas/bus/aspeed,ast2600-ahbc.yaml#
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: syscon@1e6e2000 (aspeed,ast2600-scu): 'smp-memram@180' does not match any of the regexes: '^interrupt-controller@[0-9a-f]+$', '^p2a-control@[0-9a-f]+$', '^pinctrl(@[0-9a-f]+)?$', '^pinctrl-[0-9]+$', '^silicon-id@[0-9a-f]+$'
from schema $id: http://devicetree.org/schemas/mfd/aspeed,ast2x00-scu.yaml#
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: /ahb/apb@1e6e0000/syscon@1e6e2000/smp-memram@180: failed to match any schema with compatible: ['aspeed,ast2600-smpmem']
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: /ahb/apb@1e6e0000/display@1e6e6000: failed to match any schema with compatible: ['aspeed,ast2600-gfx', 'syscon']
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: adc@1e6e9000 (aspeed,ast2600-adc0): 'interrupts' does not match any of the regexes: '^pinctrl-[0-9]+$'
from schema $id: http://devicetree.org/schemas/iio/adc/aspeed,ast2600-adc.yaml#
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: adc@1e6e9100 (aspeed,ast2600-adc1): 'interrupts' does not match any of the regexes: '^pinctrl-[0-9]+$'
from schema $id: http://devicetree.org/schemas/iio/adc/aspeed,ast2600-adc.yaml#
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: crypto@1e6fa000 (aspeed,ast2600-acry): 'aspeed,ahbc' does not match any of the regexes: '^pinctrl-[0-9]+$'
from schema $id: http://devicetree.org/schemas/crypto/aspeed,ast2600-acry.yaml#
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: sdc@1e740000 (aspeed,ast2600-sd-controller): sdhci@1e740100:compatible: ['aspeed,ast2600-sdhci', 'sdhci'] is too long
from schema $id: http://devicetree.org/schemas/mmc/aspeed,sdhci.yaml#
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: sdc@1e740000 (aspeed,ast2600-sd-controller): sdhci@1e740200:compatible: ['aspeed,ast2600-sdhci', 'sdhci'] is too long
from schema $id: http://devicetree.org/schemas/mmc/aspeed,sdhci.yaml#
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: /ahb/sdc@1e740000/sdhci@1e740100: failed to match any schema with compatible: ['aspeed,ast2600-sdhci', 'sdhci']
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: /ahb/sdc@1e740000/sdhci@1e740200: failed to match any schema with compatible: ['aspeed,ast2600-sdhci', 'sdhci']
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: /ahb/apb@1e780000/timer@1e782000: failed to match any schema with compatible: ['aspeed,ast2600-timer']
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: lpc@1e789000 (aspeed,ast2600-lpc-v2): reg-io-width: 4 is not of type 'object'
from schema $id: http://devicetree.org/schemas/mfd/aspeed-lpc.yaml#
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: lpc@1e789000 (aspeed,ast2600-lpc-v2): lpc-snoop@80: 'clocks' does not match any of the regexes: '^pinctrl-[0-9]+$'
from schema $id: http://devicetree.org/schemas/mfd/aspeed-lpc.yaml#
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: kcs@24 (aspeed,ast2500-kcs-bmc-v2): 'clocks' does not match any of the regexes: '^pinctrl-[0-9]+$'
from schema $id: http://devicetree.org/schemas/ipmi/aspeed,ast2400-kcs-bmc.yaml#
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: kcs@28 (aspeed,ast2500-kcs-bmc-v2): 'clocks' does not match any of the regexes: '^pinctrl-[0-9]+$'
from schema $id: http://devicetree.org/schemas/ipmi/aspeed,ast2400-kcs-bmc.yaml#
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: kcs@2c (aspeed,ast2500-kcs-bmc-v2): 'clocks' does not match any of the regexes: '^pinctrl-[0-9]+$'
from schema $id: http://devicetree.org/schemas/ipmi/aspeed,ast2400-kcs-bmc.yaml#
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: kcs@114 (aspeed,ast2500-kcs-bmc-v2): 'clocks' does not match any of the regexes: '^pinctrl-[0-9]+$'
from schema $id: http://devicetree.org/schemas/ipmi/aspeed,ast2400-kcs-bmc.yaml#
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: /ahb/apb@1e780000/lpc@1e789000/lhc@a0: failed to match any schema with compatible: ['aspeed,ast2600-lhc']
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: /ahb/apb@1e780000/lpc@1e789000/ibt@140: failed to match any schema with compatible: ['aspeed,ast2600-ibt-bmc']
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: i2c@200 (aspeed,ast2600-i2c-bus): Unevaluated properties are not allowed ('vcc-supply' was unexpected)
from schema $id: http://devicetree.org/schemas/i2c/aspeed,i2c.yaml#
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: i2c@280 (aspeed,ast2600-i2c-bus): Unevaluated properties are not allowed ('vcc-supply' was unexpected)
from schema $id: http://devicetree.org/schemas/i2c/aspeed,i2c.yaml#
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: i2c@300 (aspeed,ast2600-i2c-bus): Unevaluated properties are not allowed ('vcc-supply' was unexpected)
from schema $id: http://devicetree.org/schemas/i2c/aspeed,i2c.yaml#
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: i2c-mux@71 (nxp,pca9546): Unevaluated properties are not allowed ('vcc-supply' was unexpected)
from schema $id: http://devicetree.org/schemas/i2c/i2c-mux-pca954x.yaml#
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: i2c-mux@74 (nxp,pca9546): Unevaluated properties are not allowed ('vcc-supply' was unexpected)
from schema $id: http://devicetree.org/schemas/i2c/i2c-mux-pca954x.yaml#
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: i2c-mux@72 (nxp,pca9546): Unevaluated properties are not allowed ('vcc-supply' was unexpected)
from schema $id: http://devicetree.org/schemas/i2c/i2c-mux-pca954x.yaml#
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: i2c-mux@73 (nxp,pca9546): Unevaluated properties are not allowed ('vcc-supply' was unexpected)
from schema $id: http://devicetree.org/schemas/i2c/i2c-mux-pca954x.yaml#
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: i2c-mux@70 (nxp,pca9546): Unevaluated properties are not allowed ('vcc-supply' was unexpected)
from schema $id: http://devicetree.org/schemas/i2c/i2c-mux-pca954x.yaml#
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: i2c-mux@75 (nxp,pca9546): Unevaluated properties are not allowed ('vcc-supply' was unexpected)
from schema $id: http://devicetree.org/schemas/i2c/i2c-mux-pca954x.yaml#
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: i2c-mux@74 (nxp,pca9546): Unevaluated properties are not allowed ('vcc-supply' was unexpected)
from schema $id: http://devicetree.org/schemas/i2c/i2c-mux-pca954x.yaml#
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: i2c-mux@76 (nxp,pca9546): Unevaluated properties are not allowed ('vcc-supply' was unexpected)
from schema $id: http://devicetree.org/schemas/i2c/i2c-mux-pca954x.yaml#
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: i2c-mux@77 (nxp,pca9546): Unevaluated properties are not allowed ('vcc-supply' was unexpected)
from schema $id: http://devicetree.org/schemas/i2c/i2c-mux-pca954x.yaml#
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: i2c@380 (aspeed,ast2600-i2c-bus): Unevaluated properties are not allowed ('vcc-supply' was unexpected)
from schema $id: http://devicetree.org/schemas/i2c/aspeed,i2c.yaml#
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: i2c@480 (aspeed,ast2600-i2c-bus): Unevaluated properties are not allowed ('vcc-supply' was unexpected)
from schema $id: http://devicetree.org/schemas/i2c/aspeed,i2c.yaml#
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: i2c@500 (aspeed,ast2600-i2c-bus): Unevaluated properties are not allowed ('vcc-supply' was unexpected)
from schema $id: http://devicetree.org/schemas/i2c/aspeed,i2c.yaml#
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: i2c@780 (aspeed,ast2600-i2c-bus): Unevaluated properties are not allowed ('vcc-supply' was unexpected)
from schema $id: http://devicetree.org/schemas/i2c/aspeed,i2c.yaml#
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: i2c-mux@77 (nxp,pca9546): Unevaluated properties are not allowed ('vcc-supply' was unexpected)
from schema $id: http://devicetree.org/schemas/i2c/i2c-mux-pca954x.yaml#
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: i2c@800 (aspeed,ast2600-i2c-bus): Unevaluated properties are not allowed ('vcc-supply' was unexpected)
from schema $id: http://devicetree.org/schemas/i2c/aspeed,i2c.yaml#
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: i2c-mux@77 (nxp,pca9546): Unevaluated properties are not allowed ('vcc-supply' was unexpected)
from schema $id: http://devicetree.org/schemas/i2c/i2c-mux-pca954x.yaml#
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: fsi@1e79b000 (aspeed,ast2600-fsi-master): compatible: ['aspeed,ast2600-fsi-master', 'fsi-master'] is too long
from schema $id: http://devicetree.org/schemas/fsi/aspeed,ast2600-fsi-master.yaml#
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: /ahb/apb@1e790000/fsi@1e79b000: failed to match any schema with compatible: ['aspeed,ast2600-fsi-master', 'fsi-master']
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: fsi@1e79b100 (aspeed,ast2600-fsi-master): compatible: ['aspeed,ast2600-fsi-master', 'fsi-master'] is too long
from schema $id: http://devicetree.org/schemas/fsi/aspeed,ast2600-fsi-master.yaml#
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: /ahb/apb@1e790000/fsi@1e79b100: failed to match any schema with compatible: ['aspeed,ast2600-fsi-master', 'fsi-master']
arch/arm/boot/dts/aspeed/aspeed-bmc-nvidia-gb200-ut30b.dtb: /ahb/apb@1e790000/dma-controller@1e79e000: failed to match any schema with compatible: ['aspeed,ast2600-udma']
Return-Path: <linux-kernel+bounces-673307-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 35B0B41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:59:21 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 83059175A7F
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:59:17 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 7DDFE290DB3;
Wed, 4 Jun 2025 13:58:18 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="T7SXF2UB"
Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id BE6A0290DAC;
Wed, 4 Jun 2025 13:58:15 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.92.199
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749045497; cv=none; b=GWXMjuBwcrXoU4gr/yCvNU9LwegO+zZ1uJovKX4w+mlKM3RmPYmMk+301bq3Hs5j/8V2q216/DqIx7/o1J0q6RoltwGfGb0zPixWth154oO3PQ2sbifngtvf4QvavxCyTT5YMRnVb7XAk3V+BVpH3JAASDVY3Vpj/DqZ5Kxjcq0=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749045497; c=relaxed/simple;
bh=g2WNtm+gErCC9zaaOUPQLB+n6rSn4DJGYIEUDZ2bxLY=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=Kri3oUXZqQgAsrVpCC90keuBGY6wvuAAJMnYr4AGez/wshhSiEV6Xoj/80qN0CnaeEmPfZV71etPeNMscjUr1aZzrxfR19Mpt55+1jZxFS8Op3/qWl9nUC7lfFoiJfEpqUu+GTYWNxyKNI4uGqleF5E8porjr7M43OmXD5fF39s=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=T7SXF2UB; arc=none smtp.client-ip=90.155.92.199
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org
Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version:
References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:
Content-Transfer-Encoding:Content-ID:Content-Description;
bh=MofrKRmOHg0W6dvhylNzDHTjMTJLFlneoIq4UXMJ4/s=; b=T7SXF2UBFHfGJ6v3nIdlJfpgtH
lOyY6rEp7V5XRZk+LxmhCX4zfe6hTFaPZA6OZK9V5heaLcvxDnLkYiwLymVvuaaoEe8zza/fDry3T
xJyUR9Qxa+V8EYVkU9QtK6H5TBq4nprrjM73SfGmEadMrcrRmyugYmxzttDKbkedOkguEvRJy3v4W
kbg+1mT0nzTWEAgbyqjYO4Hokmp1Q1bnAsahXSHUzz3Et7EQe2GTuD6FPYgEP62lwHxqs2Sys20Wd
bVFW7mwLbyb8cARRP65Yg8rAVLJ4ocvZrlGuv1s/OjTY+JWhB1uX7bdX2vZ0blNvfey5Do3U9oAnR
yEHwDwfg==;
Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net)
by desiato.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux))
id 1uMod0-00000000uDF-33ZC;
Wed, 04 Jun 2025 13:58:02 +0000
Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000)
id E0625300787; Wed, 4 Jun 2025 15:58:01 +0200 (CEST)
Date: Wed, 4 Jun 2025 15:58:01 +0200
From: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
To: Leo Yan <leo.yan@xxxxxxx>
Cc: Yeoreum Yun <yeoreum.yun@xxxxxxx>, mingo@xxxxxxxxxx, mingo@xxxxxxxxxx,
acme@xxxxxxxxxx, namhyung@xxxxxxxxxx, mark.rutland@xxxxxxx,
alexander.shishkin@xxxxxxxxxxxxxxx, jolsa@xxxxxxxxxx,
irogers@xxxxxxxxxx, adrian.hunter@xxxxxxxxx,
kan.liang@xxxxxxxxxxxxxxx, linux-perf-users@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, David Wang <00107082@xxxxxxx>
Subject: Re: [PATCH 1/1] perf/core: fix dangling cgroup pointer in cpuctx
Message-ID: <20250604135801.GK38114@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20250602184049.4010919-1-yeoreum.yun@xxxxxxx>
<20250603140040.GB8020@xxxxxxxxxxxxxxx>
<20250603144414.GC38114@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
<20250604080339.GB35970@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
<20250604101821.GC8020@xxxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20250604101821.GC8020@xxxxxxxxxxxxxxx>
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 11:18:21AM +0100, Leo Yan wrote:
Totally agree. The comment would be very useful!
I have the below. Let me go read your email in more than 2 seconds to
see if I should amend things.
I'm not sure doing the INACTIVE->INACTIVE cycle in the ASCII art is
going to make it clearer, might leave that off. But yeah, possible.
---
Subject: perf: Add comment to enum perf_event_state
From: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Date: Wed Jun 4 10:21:38 CEST 2025
Better describe the event states.
Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
---
include/linux/perf_event.h | 42 ++++++++++++++++++++++++++++++++++++++++--
1 file changed, 40 insertions(+), 2 deletions(-)
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -635,8 +635,46 @@ struct perf_addr_filter_range {
unsigned long size;
};
-/**
- * enum perf_event_state - the states of an event:
+/*
+ * The normal states are:
+ *
+ * ACTIVE --.
+ * ^ |
+ * | |
+ * sched_{in,out}() |
+ * | |
+ * v |
+ * ,---> INACTIVE --+ <-.
+ * | | |
+ * | {dis,en}able()
+ * sched_in() | |
+ * | OFF <--' --+
+ * | |
+ * `---> ERROR ------'
+ *
+ * That is:
+ *
+ * sched_in: INACTIVE -> {ACTIVE,ERROR}
+ * sched_out: ACTIVE -> INACTIVE
+ * disable: {ACTIVE,INACTIVE} -> OFF
+ * enable: {OFF,ERROR} -> INACTIVE
+ *
+ * Where {OFF,ERROR} are disabled states.
+ *
+ * Then we have the {EXIT,REVOKED,DEAD} states which are various shades of
+ * defunct events:
+ *
+ * - EXIT means task that the even was assigned to died, but child events
+ * still live, and further children can still be created. But the event
+ * itself will never be active again. It can only transition to
+ * {REVOKED,DEAD};
+ *
+ * - REVOKED means the PMU the event was associated with is gone; all
+ * functionality is stopped but the event is still alive. Can only
+ * transition to DEAD;
+ *
+ * - DEAD event really is DYING tearing down state and freeing bits.
+ *
*/
enum perf_event_state {
PERF_EVENT_STATE_DEAD = -5,
Return-Path: <linux-kernel+bounces-673306-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id C8E7B41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:59:28 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 185571896F8C
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:59:14 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 284ED290DB1;
Wed, 4 Jun 2025 13:58:16 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="tg77kAut"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4AC49290DA0;
Wed, 4 Jun 2025 13:58:15 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749045495; cv=none; b=dPN9WsM/muLCCjdWmELHHmBJsMZN7OQYACmo9BHWBxOGKiod5L6/uIr1EHhJkk1JCFDiR7pkcvehiAp78/VfXJBwxmmPJAFEaSdnwHSu1rMft7kU8f5EwOBXpQ+Vw2w7ssF7Phof0ldviVucBYBN4JVe/T9lSBTxJbSJLZEJLGM=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749045495; c=relaxed/simple;
bh=Bqg4UfN3rwgsslMdb/hy9V7kMIKcpgx0adtAHnyJeUs=;
h=Date:Content-Type:MIME-Version:From:Cc:To:In-Reply-To:References:
Message-Id:Subject; b=cYkFOOmJlh1q2YpDvQDA3i3Y8hdc1jUCD5I4wdoZ/+o8nGkKS0Bfm3zZy0X9GR0nm15dJY20l5FTKnZz7IqkNSwj4ubuV5p7vSqQQVA+0piy9VewXPDdzRumHFVshgacOIRIIQwJxDmdFPWCatJ64s6vFjt+igwB+fJjsUcNe60=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=tg77kAut; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id E53EAC4CEE7;
Wed, 4 Jun 2025 13:58:14 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749045495;
bh=Bqg4UfN3rwgsslMdb/hy9V7kMIKcpgx0adtAHnyJeUs=;
h=Date:From:Cc:To:In-Reply-To:References:Subject:From;
b=tg77kAutQJ/i6IUyrsf2GE8fEIsvU219l2sdKoIoRAC6JETM9rVTYIV68AW2dBrcW
nqnVR35PKl1LR08tz56gg+2vlOb6jQKagLUbN5oSLccDBz3rTM+0xMq0LzCAZ4zdKN
/ntFtovHrpxFd6VhG+x+/cNPsCtvMFhMvx1/lKQBCSZOLBR7xO+z7Jpu6YQLT4ZndJ
baaqSOUPtLwPRjFRf6KRqAYqT9BWWsIS7z/4JowUzsxjc5K9YD0NAO3jRyTSZYxofX
JGh/7z4z/eOyspMzW3sHy5LLClo5pho5ySsFsUaJ6JtJEDBIcFyV/HwLX5tu+Z9fnC
cs78vQ2MfZicg==
Date: Wed, 04 Jun 2025 08:58:13 -0500
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
From: "Rob Herring (Arm)" <robh@xxxxxxxxxx>
Cc: conor+dt@xxxxxxxxxx, kristo@xxxxxxxxxx,
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, krzk+dt@xxxxxxxxxx, r-donadkar@xxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, vigneshr@xxxxxx, nm@xxxxxx,
devicetree@xxxxxxxxxxxxxxx
To: Jayesh Choudhary <j-choudhary@xxxxxx>
In-Reply-To: <20250604104656.38752-1-j-choudhary@xxxxxx>
References: <20250604104656.38752-1-j-choudhary@xxxxxx>
Message-Id: <174904540135.3869675.422953390616565367.robh@xxxxxxxxxx>
Subject: Re: [PATCH 0/3] Enable audio support for J721S2-EVM
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, 04 Jun 2025 16:16:53 +0530, Jayesh Choudhary wrote:
These 3 patches add the support to enable audio on J721S2-EVM.
This required the i2c-mux support[0] which is now in linux tree.
Now, this series ***depends upon only one dts change[1]*** to ensure there
are no dtbs_check warnings (no functional issues):
"ti,j721e-system-controller.yaml" refers to "ti,am654-ehrpwm-tbclk.yaml"
for clock-controller nodes, but for audio we need "ti,am62-audio-refclk".
When scm_conf is "simple-bus", there are no such warnings.
Test log: https://gist.github.com/Jayesh2000/840c19ef8f9b7f0f75dedd015ccbf98a
[0]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=0fc829dbde9bf1f349631c677a85e08782037ecf
[1]: https://lore.kernel.org/all/20250603095609.33569-4-j-choudhary@xxxxxx/
Jayesh Choudhary (3):
arm64: dts: ti: k3-j721s2-main: Add McASP nodes
arm64: dts: ti: k3-j721s2-main: Add audio_refclk node
arm64: dts: ti: k3-j721s2-common-proc-board: Enable analog audio
support
.../dts/ti/k3-j721s2-common-proc-board.dts | 131 ++++++++++++++++++
arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi | 99 +++++++++++++
2 files changed, 230 insertions(+)
--
2.34.1
My bot found new DTB warnings on the .dts files added or changed in this
series.
Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings
are fixed by another series. Ultimately, it is up to the platform
maintainer whether these warnings are acceptable or not. No need to reply
unless the platform maintainer has comments.
If you already ran DT checks and didn't see these error(s), then
make sure dt-schema is up to date:
pip3 install dtschema --upgrade
This patch series was applied (using b4) to base:
Base: attempting to guess base-commit...
Base: tags/next-20250604 (best guess, 1/2 blobs matched)
If this is not the correct base, please add 'base-commit' tag
(or use b4 which does this automatically)
New warnings running 'make CHECK_DTBS=y for arch/arm64/boot/dts/ti/' for 20250604104656.38752-1-j-choudhary@xxxxxx:
arch/arm64/boot/dts/ti/k3-am68-phyboard-izar.dtb: syscon@104000 (ti,j721e-system-controller): clock-controller@42e4: 'assigned-clock-parents', 'assigned-clocks', 'clocks' do not match any of the regexes: '^pinctrl-[0-9]+$'
from schema $id: http://devicetree.org/schemas/soc/ti/ti,j721e-system-controller.yaml#
arch/arm64/boot/dts/ti/k3-am68-phyboard-izar.dtb: syscon@104000 (ti,j721e-system-controller): clock-controller@42e4:#clock-cells: 1 was expected
from schema $id: http://devicetree.org/schemas/soc/ti/ti,j721e-system-controller.yaml#
arch/arm64/boot/dts/ti/k3-am68-phyboard-izar.dtb: syscon@104000 (ti,j721e-system-controller): clock-controller@42e4:compatible:0: 'ti,am62-audio-refclk' is not one of ['ti,am654-ehrpwm-tbclk', 'ti,am64-epwm-tbclk', 'ti,am62-epwm-tbclk']
from schema $id: http://devicetree.org/schemas/soc/ti/ti,j721e-system-controller.yaml#
arch/arm64/boot/dts/ti/k3-am68-sk-base-board.dtb: syscon@104000 (ti,j721e-system-controller): clock-controller@42e4: 'assigned-clock-parents', 'assigned-clocks', 'clocks' do not match any of the regexes: '^pinctrl-[0-9]+$'
from schema $id: http://devicetree.org/schemas/soc/ti/ti,j721e-system-controller.yaml#
arch/arm64/boot/dts/ti/k3-am68-sk-base-board.dtb: syscon@104000 (ti,j721e-system-controller): clock-controller@42e4:#clock-cells: 1 was expected
from schema $id: http://devicetree.org/schemas/soc/ti/ti,j721e-system-controller.yaml#
arch/arm64/boot/dts/ti/k3-am68-sk-base-board.dtb: syscon@104000 (ti,j721e-system-controller): clock-controller@42e4:compatible:0: 'ti,am62-audio-refclk' is not one of ['ti,am654-ehrpwm-tbclk', 'ti,am64-epwm-tbclk', 'ti,am62-epwm-tbclk']
from schema $id: http://devicetree.org/schemas/soc/ti/ti,j721e-system-controller.yaml#
arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dtb: syscon@104000 (ti,j721e-system-controller): clock-controller@42e4: 'assigned-clock-parents', 'assigned-clocks', 'clocks' do not match any of the regexes: '^pinctrl-[0-9]+$'
from schema $id: http://devicetree.org/schemas/soc/ti/ti,j721e-system-controller.yaml#
arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dtb: syscon@104000 (ti,j721e-system-controller): clock-controller@42e4:#clock-cells: 1 was expected
from schema $id: http://devicetree.org/schemas/soc/ti/ti,j721e-system-controller.yaml#
arch/arm64/boot/dts/ti/k3-j721s2-common-proc-board.dtb: syscon@104000 (ti,j721e-system-controller): clock-controller@42e4:compatible:0: 'ti,am62-audio-refclk' is not one of ['ti,am654-ehrpwm-tbclk', 'ti,am64-epwm-tbclk', 'ti,am62-epwm-tbclk']
from schema $id: http://devicetree.org/schemas/soc/ti/ti,j721e-system-controller.yaml#
Return-Path: <linux-kernel+bounces-673308-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 8351641E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 09:59:33 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 0A62117333A
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:59:28 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id C8FFD29009A;
Wed, 4 Jun 2025 13:59:00 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="nrkI/N5l"
Received: from mail-pl1-f170.google.com (mail-pl1-f170.google.com [209.85.214.170])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 794CC28F51C
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:58:58 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.170
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749045539; cv=none; b=HU8NMvp+WRTN4WzEK5nFh0voUMRfoRl1moK2SSzhmYW7uo/VsWIPSAs2rWtpklVWH6/Ad80GMdSLiac8pUgcGeARYgnlZ5a+q6euUS7uq1Du95EnBq0LxVZ+okPsYY6kV8r9HYoWEgTfB043tQC9RBKKXHyEuWcszjriDQAJa30=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749045539; c=relaxed/simple;
bh=zk1n73mzXW2cVf92+qDik1vWwaIq1RTipTgZMB8Ps6A=;
h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=WpOVTf4us5pvflz+AQAJqfvib0XVGKBtWUVM8NjUm8dd0qhUWUZDDCLfYAl/d9hX2LYwlCJS4iw85i8RaHxK1DV+Y2MbxLBMKhSYX5tjPejCL5tvXA6z06UygEYmbbwWR7hiCl+wlMe+hrmtrXkazllQuY0oC99sYKa0lAD/Tf4=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=nrkI/N5l; arc=none smtp.client-ip=209.85.214.170
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
Received: by mail-pl1-f170.google.com with SMTP id d9443c01a7336-2347012f81fso84295725ad.2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 06:58:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1749045538; x=1749650338; darn=vger.kernel.org;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:from:to:cc:subject:date:message-id:reply-to;
bh=TezHNz2odnPb4Tc8G+1GEc+yw5qGixOkkXSyDu8G92s=;
b=nrkI/N5lABIPkGecuUilqjl3jXj2kNRQmMOy8L6F8+f+dzK6xDsxNXtK4FfWmaZ7Pu
nk1IKHKaFmoQXpe6Y3Jspq9fnA+T4LIM7nT6TGoogBsWHsjaDJcz0FcphBV8FPLRpJKX
W8EWqTO700OBoA33lEZugsxTuJHEcZEdsGcK4fw3nM2wW/steheL24iGZpdAm21gyWOU
4GQSonWqlaPMcwhTZjGmGdCdQXlk6TgYsLOe2BSFF4vViRkpr/2jgrCwHWGjHvHrDfp9
kDtoJqZQr6PA6Y9bqbXBsbuQFpU7D0hpoukx/f/fzAlk5o7k8zMiOkZ94xph1eLCWEl+
muQw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749045538; x=1749650338;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=TezHNz2odnPb4Tc8G+1GEc+yw5qGixOkkXSyDu8G92s=;
b=AddW32Bu58Dp968n4aJykiAFiraOFRmT3RxZ0GQYYa6UhBTPYYvZ92PCmDw7Bxkb9P
BcffjeV7BL9HP1dje0MdD7AwWnoOpzE+TGlf57keCrPdpkJksmYTMyAJzq2X1XCCI8FD
/vbp99viwnC0MFurvlr+kMAF86DoyqmOHwnCSLuntVi0NsW9fk/KDlSpYfalSwhjO44V
1MU+/d12DZkVxgWzDn64oumri4QHKdbjWiD84zM065ltVueNL+3kitv2JFQsIdWjuTdf
DL0jRE1uVsrWdjT8fMVmR+ndAAEEiVSjYlPX/asL0g5BgQ/Ul7CeozY07JtAyMx4gxj3
ccyg==
X-Forwarded-Encrypted: i=1; AJvYcCUY0wnQZD95mVTemVUEnPUunLDmnW1+3+2aS0dApD55dXLy9imD+VOc2oTlxsFEpnbKCKxYfzhGaww+DwM=@vger.kernel.org
X-Gm-Message-State: AOJu0YwxrVyslXLlGdC14NExDIjDAtORLoFn8Bu7pLDar1fsGJC7B7mc
1qE5i67sO+I/oqGWwTxsBwqjS+XM/bjzk3UHzbfb/apd41OQw4sI3KhW
X-Gm-Gg: ASbGncsIvenUFmMIpnFSWoEygV7uDb8cA28o+paKEmT/z+nYodIUcSdbDDc3AWg1nkS
kaxKcAd+ef4bCtcAiJqLMVSul+nx5FnRBhN+MeY2pi3dBn5drU+jIy6e3TaA1MGwWiIIk2oioO3
6g7CHuSzIBr2FzmewY7ja3oJVP1/24d3xaJP/W2x58rC0uACV7OSuCUlUn7ite3QgK4jgBfZ0k1
MU/7BsokH3ccyFnYfmOPIgRhrSTEmCGjRc4fNSACVPDMachfkw0h3KJgLiXWM6pDVOAfV4PWm/3
wkuBtKbFh6QHrCOD9CltyEGdM3vYa4zAdnrymKu3Q0zzYbrvvDC5+nHoBSCNCg0/vV/L
X-Google-Smtp-Source: AGHT+IHmbkpEZcrl1kkqJkoknQgXjKEbbbKpB/jzhsDiUnyUK+LB63k5/qKBP6dihtZ3xkB0st7gVQ==
X-Received: by 2002:a17:903:181:b0:234:f580:9ed with SMTP id d9443c01a7336-235e116bddbmr41463585ad.21.1749045537523;
Wed, 04 Jun 2025 06:58:57 -0700 (PDT)
Received: from ubuntu.. ([103.149.59.114])
by smtp.gmail.com with ESMTPSA id d9443c01a7336-23506cf5110sm104251755ad.177.2025.06.04.06.58.54
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 06:58:57 -0700 (PDT)
From: Jagadeesh Yalapalli <jagadeesharm14@xxxxxxxxx>
To: William Hubbs <w.d.hubbs@xxxxxxxxx>
Cc: Chris Brannon <chris@xxxxxxxxxxxxxxxx>,
Kirk Reiser <kirk@xxxxxxxxxx>,
Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>,
Thomas Gleixner <tglx@xxxxxxxxxxxxx>,
Ingo Molnar <mingo@xxxxxxxxxx>,
speakup@xxxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx,
Jagadeesh Yalapalli <jagadeesh.yalapalli@xxxxxxxxxxxxxx>
Subject: [PATCH v1] speakup: Replace u_short with u16 for spk_chartab
Date: Wed, 4 Jun 2025 13:58:36 +0000
Message-ID: <20250604135846.46184-1-jagadeesharm14@xxxxxxxxx>
X-Mailer: git-send-email 2.43.0
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
From: Jagadeesh Yalapalli <jagadeesh.yalapalli@xxxxxxxxxxxxxx>
The spk_chartab array was previously declared as `u_short`,
which is a non-standard type and may vary in size across platforms.
Replace it with `u16` to ensure consistent 16-bit width and improve
code portability and readability.
Signed-off-by: Jagadeesh Yalapalli <jagadeesh.yalapalli@xxxxxxxxxxxxxx>
---
drivers/accessibility/speakup/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/accessibility/speakup/main.c b/drivers/accessibility/speakup/main.c
index e68cf1d83787..34c7cb6a9b43 100644
--- a/drivers/accessibility/speakup/main.c
+++ b/drivers/accessibility/speakup/main.c
@@ -187,7 +187,7 @@ char *spk_default_chars[256] = {
* initialized to default_chartab and user selectable via
* /sys/module/speakup/parameters/chartab
*/
-u_short spk_chartab[256];
+u16 spk_chartab[256];
static u_short default_chartab[256] = {
B_CTL, B_CTL, B_CTL, B_CTL, B_CTL, B_CTL, B_CTL, B_CTL, /* 0-7 */
--
2.43.0
Return-Path: <linux-kernel+bounces-673309-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 9ED0141E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:01:10 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 4040F1897C6B
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:01:24 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id CAC5328F518;
Wed, 4 Jun 2025 14:01:03 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="HbT2t6t1"
Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 505A429008E
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:01:01 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.16
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749045663; cv=none; b=ijLAwQNX2M79mfW2PASkxQAAlUgu7tReuxlfASuVK5EdUBOJr5a7/jowdc4ClxQCYmxRhkav3LMBIfJvs/gsYwV7cQcu89i9PaLhhxUMFMFroHAruXfn5UjV+4zBvnSEUIrcQJM0AgQgZ6DiuKWB6ddcTkeaX6/uoBQ/uSGh/hk=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749045663; c=relaxed/simple;
bh=/jraNwTtJpORq8daMzld6WHV7HfbUMS87ukomyrIkKE=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=sDsz76PK1tEVIVh3vYh4jheyRI0bAb8mLaKJ/qFhw4rEFpG+8DdbtSozfuYQmB6YT9tT1bFzSCqc1umt2SYex6VOajLYHJlqImTNk0suQqYPMOIGgO3E6/B5Y+PRbZQ/ODeGZPSsI6w6EAbn6jxbS2qVaPhgwOMq094AqnuSX2c=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=HbT2t6t1; arc=none smtp.client-ip=198.175.65.16
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
t=1749045662; x=1780581662;
h=message-id:date:mime-version:subject:to:cc:references:
from:in-reply-to:content-transfer-encoding;
bh=/jraNwTtJpORq8daMzld6WHV7HfbUMS87ukomyrIkKE=;
b=HbT2t6t1onwTWlFZtUXmNSpM5S2F1f+S97RHSZkpBXpAqbgFXSzRAkDL
z6SHDg0CeAyWQWHkvdh5qr0IA/iKMs+1AAPWo+xfNgw9ioNN0FW+wg9/t
9xHQPJIyj7GPJDU00an6B6c9E6L/MKAGvlWPlomAD/a9PpxPDkLXai0op
LuW6R7acXIGMOXKqbX6ianN8gjWzF9OVPDXBhTqqfvmqkrEh+8rJflUZK
qOXDIKiBHGJ/0Y8taWT9UuyNbXhqZF8uli+whlOmfPCCgyufIXH6VETwL
NVBHysRUS+T+nV4786cDjBw+CM+KXsAmjtVGXM9QJbIv91mG/7DmMFKrF
A==;
X-CSE-ConnectionGUID: 8ycatYYqSmeWaJ1hG5+zGg==
X-CSE-MsgGUID: wkMV42eZSUy3D25XTvzCKA==
X-IronPort-AV: E=McAfee;i="6800,10657,11454"; a="51200159"
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="51200159"
Received: from orviesa005.jf.intel.com ([10.64.159.145])
by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 07:01:00 -0700
X-CSE-ConnectionGUID: 5AKLfDWHRziP8K35hrKIlw==
X-CSE-MsgGUID: fDq3JjtQSySbezOjr88hzQ==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="150475265"
Received: from puneetse-mobl.amr.corp.intel.com (HELO [10.125.110.229]) ([10.125.110.229])
by orviesa005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 07:01:00 -0700
Message-ID: <c6c2ef2e-7372-4ce4-9ac6-6a2a60f18093@xxxxxxxxx>
Date: Wed, 4 Jun 2025 07:00:59 -0700
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v1] x86: Change maintainers list for the Intel TXT project
group
To: "Camacho Romero, Michal" <michal.camacho.romero@xxxxxxxxx>,
"tglx@xxxxxxxxxxxxx" <tglx@xxxxxxxxxxxxx>,
"mingo@xxxxxxxxxx" <mingo@xxxxxxxxxx>, "bp@xxxxxxxxx" <bp@xxxxxxxxx>,
"dave.hansen@xxxxxxxxxxxxxxx" <dave.hansen@xxxxxxxxxxxxxxx>,
"Mowka, Mateusz" <mateusz.mowka@xxxxxxxxx>,
"Pawlicki, AdamX" <adamx.pawlicki@xxxxxxxxx>
Cc: "Michalak, BartlomiejX" <bartlomiejx.michalak@xxxxxxxxx>,
"Fedko, Artem" <artem.fedko@xxxxxxxxx>,
"Zielinski, Marcel" <marcel.zielinski@xxxxxxxxx>,
"linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>,
Ning Sun <ning.sun@xxxxxxxxx>
References: <IA1PR11MB7755413461E0F4403A702E3AAF6CA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
From: Dave Hansen <dave.hansen@xxxxxxxxx>
Content-Language: en-US
Autocrypt: addr=dave.hansen@xxxxxxxxx; keydata=
xsFNBE6HMP0BEADIMA3XYkQfF3dwHlj58Yjsc4E5y5G67cfbt8dvaUq2fx1lR0K9h1bOI6fC
oAiUXvGAOxPDsB/P6UEOISPpLl5IuYsSwAeZGkdQ5g6m1xq7AlDJQZddhr/1DC/nMVa/2BoY
2UnKuZuSBu7lgOE193+7Uks3416N2hTkyKUSNkduyoZ9F5twiBhxPJwPtn/wnch6n5RsoXsb
ygOEDxLEsSk/7eyFycjE+btUtAWZtx+HseyaGfqkZK0Z9bT1lsaHecmB203xShwCPT49Blxz
VOab8668QpaEOdLGhtvrVYVK7x4skyT3nGWcgDCl5/Vp3TWA4K+IofwvXzX2ON/Mj7aQwf5W
iC+3nWC7q0uxKwwsddJ0Nu+dpA/UORQWa1NiAftEoSpk5+nUUi0WE+5DRm0H+TXKBWMGNCFn
c6+EKg5zQaa8KqymHcOrSXNPmzJuXvDQ8uj2J8XuzCZfK4uy1+YdIr0yyEMI7mdh4KX50LO1
pmowEqDh7dLShTOif/7UtQYrzYq9cPnjU2ZW4qd5Qz2joSGTG9eCXLz5PRe5SqHxv6ljk8mb
ApNuY7bOXO/A7T2j5RwXIlcmssqIjBcxsRRoIbpCwWWGjkYjzYCjgsNFL6rt4OL11OUF37wL
QcTl7fbCGv53KfKPdYD5hcbguLKi/aCccJK18ZwNjFhqr4MliQARAQABzUVEYXZpZCBDaHJp
c3RvcGhlciBIYW5zZW4gKEludGVsIFdvcmsgQWRkcmVzcykgPGRhdmUuaGFuc2VuQGludGVs
LmNvbT7CwXgEEwECACIFAlQ+9J0CGwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEGg1
lTBwyZKwLZUP/0dnbhDc229u2u6WtK1s1cSd9WsflGXGagkR6liJ4um3XCfYWDHvIdkHYC1t
MNcVHFBwmQkawxsYvgO8kXT3SaFZe4ISfB4K4CL2qp4JO+nJdlFUbZI7cz/Td9z8nHjMcWYF
IQuTsWOLs/LBMTs+ANumibtw6UkiGVD3dfHJAOPNApjVr+M0P/lVmTeP8w0uVcd2syiaU5jB
aht9CYATn+ytFGWZnBEEQFnqcibIaOrmoBLu2b3fKJEd8Jp7NHDSIdrvrMjYynmc6sZKUqH2
I1qOevaa8jUg7wlLJAWGfIqnu85kkqrVOkbNbk4TPub7VOqA6qG5GCNEIv6ZY7HLYd/vAkVY
E8Plzq/NwLAuOWxvGrOl7OPuwVeR4hBDfcrNb990MFPpjGgACzAZyjdmYoMu8j3/MAEW4P0z
F5+EYJAOZ+z212y1pchNNauehORXgjrNKsZwxwKpPY9qb84E3O9KYpwfATsqOoQ6tTgr+1BR
CCwP712H+E9U5HJ0iibN/CDZFVPL1bRerHziuwuQuvE0qWg0+0SChFe9oq0KAwEkVs6ZDMB2
P16MieEEQ6StQRlvy2YBv80L1TMl3T90Bo1UUn6ARXEpcbFE0/aORH/jEXcRteb+vuik5UGY
5TsyLYdPur3TXm7XDBdmmyQVJjnJKYK9AQxj95KlXLVO38lczsFNBFRjzmoBEACyAxbvUEhd
GDGNg0JhDdezyTdN8C9BFsdxyTLnSH31NRiyp1QtuxvcqGZjb2trDVuCbIzRrgMZLVgo3upr
MIOx1CXEgmn23Zhh0EpdVHM8IKx9Z7V0r+rrpRWFE8/wQZngKYVi49PGoZj50ZEifEJ5qn/H
Nsp2+Y+bTUjDdgWMATg9DiFMyv8fvoqgNsNyrrZTnSgoLzdxr89FGHZCoSoAK8gfgFHuO54B
lI8QOfPDG9WDPJ66HCodjTlBEr/Cwq6GruxS5i2Y33YVqxvFvDa1tUtl+iJ2SWKS9kCai2DR
3BwVONJEYSDQaven/EHMlY1q8Vln3lGPsS11vSUK3QcNJjmrgYxH5KsVsf6PNRj9mp8Z1kIG
qjRx08+nnyStWC0gZH6NrYyS9rpqH3j+hA2WcI7De51L4Rv9pFwzp161mvtc6eC/GxaiUGuH
BNAVP0PY0fqvIC68p3rLIAW3f97uv4ce2RSQ7LbsPsimOeCo/5vgS6YQsj83E+AipPr09Caj
0hloj+hFoqiticNpmsxdWKoOsV0PftcQvBCCYuhKbZV9s5hjt9qn8CE86A5g5KqDf83Fxqm/
vXKgHNFHE5zgXGZnrmaf6resQzbvJHO0Fb0CcIohzrpPaL3YepcLDoCCgElGMGQjdCcSQ+Ci
FCRl0Bvyj1YZUql+ZkptgGjikQARAQABwsFfBBgBAgAJBQJUY85qAhsMAAoJEGg1lTBwyZKw
l4IQAIKHs/9po4spZDFyfDjunimEhVHqlUt7ggR1Hsl/tkvTSze8pI1P6dGp2XW6AnH1iayn
yRcoyT0ZJ+Zmm4xAH1zqKjWplzqdb/dO28qk0bPso8+1oPO8oDhLm1+tY+cOvufXkBTm+whm
+AyNTjaCRt6aSMnA/QHVGSJ8grrTJCoACVNhnXg/R0g90g8iV8Q+IBZyDkG0tBThaDdw1B2l
asInUTeb9EiVfL/Zjdg5VWiF9LL7iS+9hTeVdR09vThQ/DhVbCNxVk+DtyBHsjOKifrVsYep
WpRGBIAu3bK8eXtyvrw1igWTNs2wazJ71+0z2jMzbclKAyRHKU9JdN6Hkkgr2nPb561yjcB8
sIq1pFXKyO+nKy6SZYxOvHxCcjk2fkw6UmPU6/j/nQlj2lfOAgNVKuDLothIxzi8pndB8Jju
KktE5HJqUUMXePkAYIxEQ0mMc8Po7tuXdejgPMwgP7x65xtfEqI0RuzbUioFltsp1jUaRwQZ
MTsCeQDdjpgHsj+P2ZDeEKCbma4m6Ez/YWs4+zDm1X8uZDkZcfQlD9NldbKDJEXLIjYWo1PH
hYepSffIWPyvBMBTW2W5FRjJ4vLRrJSUoEfJuPQ3vW9Y73foyo/qFoURHO48AinGPZ7PC7TF
vUaNOTjKedrqHkaOcqB185ahG2had0xnFsDPlx5y
In-Reply-To: <IA1PR11MB7755413461E0F4403A702E3AAF6CA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 6/4/25 00:51, Camacho Romero, Michal wrote:
I’m BIOS Engineer from the Intel Corp, working on the BIOS security
modules development, including TBOOT MLE project: As the present
INTEL(R) TRUSTED EXECUTION TECHNOLOGY (TXT) group's maintainer (Ning
Sun) doesn't work currently on the TBOOT project's development, he
was replaced by the active TBOOT MLE project's developers, who will
maintain Intel TXT project group and are currently maintaining the
TBOOT MLE project: http://tboot.sourceforge.net <http://
tboot.sourceforge.net>
Hi Michal,
For folks to function as effective maintainers, they need to be able to
review and submit patches. This patch wasn't submitted following our
normal processes:
https://www.kernel.org/doc/Documentation/process/submitting-patches.rst
It came to me quite mangled, and was likely dropped from the mailing
lists because of the HTML.
The easiest way to do it these days is probably to just use
git-send-email. But if you're going to be an effective maintainer,
you'll need to get your email setup sorted sooner or later. That means
no Outlook.
It's also normal to cc the person who is being replaced, or even after
they've moved on to other jobs.
Since there are three of you, could you please go take a look at this
"trenchboot" stuff? Their aim seems to be to duplicate some of what
tboot can be used for, and they expect to leverage TXT itself:
https://lore.kernel.org/all/18F9BD47-282D-4225-AB6B-FDA4AD52D7AE@xxxxxxxxx/
If nothing else, it would be great to know if you folks think trenchboot
is the way forward and what the future of the tboot code in the kernel
is if trenchboot is also there.
Oh, and again since there are three of you... first link in:
Documentation/arch/x86/intel_txt.rst
gets a 404. That would be a nice thing to fix up first, I think. Maybe
you can send a fix for that along with the fixed MAINTAINERS update.
Return-Path: <linux-kernel+bounces-673310-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 9D87A41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:02:37 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 3D196189775D
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:02:51 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 281E72900A4;
Wed, 4 Jun 2025 14:02:27 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="cE35S6Gl"
Received: from mail-pj1-f73.google.com (mail-pj1-f73.google.com [209.85.216.73])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id CD47938384
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:02:24 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.73
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749045746; cv=none; b=D/PGUll7T0dklWBPJogP6LL3T4M17pedAQ2YfqotdT/IsTTsseLOx9tbLHEJJUzh05x5iRZMrTM0hdWn+mffnYNMNjSreE5Ic1PbvLA9wwsYFXxhle1tJl40Vxx5/vG75ounL4g243WZmvgsyw540K20mNq1M8T7hG0Iv+XAKJI=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749045746; c=relaxed/simple;
bh=SF2TUI7mUMzc/jSBFlCExxvSiZraFWQni6zRHWJeB4A=;
h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From:
To:Cc:Content-Type; b=O2OdaqmPFAyWC8pKW4uL/Vf/PiiFjr7TkBAmNkz47UOm2qQLYRMcAXB0/zF5Ed7Wyco9rH4a4bdBKF+ppckD8f9qIxQszdfMnFdyYjOu12O05OxkCV0R0aXZHethl7KV7QaFUkpMZty3MccVit5FRK821kcu2uAF+ktJTAdKTOY=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=cE35S6Gl; arc=none smtp.client-ip=209.85.216.73
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com
Received: by mail-pj1-f73.google.com with SMTP id 98e67ed59e1d1-30ea0e890ccso6660221a91.2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 07:02:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=google.com; s=20230601; t=1749045744; x=1749650544; darn=vger.kernel.org;
h=cc:to:from:subject:message-id:references:mime-version:in-reply-to
:date:from:to:cc:subject:date:message-id:reply-to;
bh=4H4b6gj2RPA1NSrnkWfDydCjI09ZASRQKphvEZK2b8s=;
b=cE35S6GlhsRDrfcQ4WEL/rCkHwGVKBsIoIaWsj4cFbPq+IozhwD5kY+6X2L+AR8x8w
InGzc1vW/cJWKxHrahvIQnghy8uki7b6+RESwHb7olNIzlKsLtELGhuKPygNomX9KhPy
GQEBmZYCaa38LlbsG36e/iLJQKuQ2cQ80TNPdPt4lIWfG7EPcH5nE/B8NaeCqtBcuhb4
T4UWqwGlhYxMZS97dhtbTwHOfdoEuZDOC6roBfgEzmjUSt7UksSiSZ4W2/I/sSfcfHFl
9aiH512lsLaHVmq6cWVDBW1PyCWG3/F/EB8VPmkfLvdA/3X96Udd4kDlfFkM5X7yNxwk
ruWQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749045744; x=1749650544;
h=cc:to:from:subject:message-id:references:mime-version:in-reply-to
:date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=4H4b6gj2RPA1NSrnkWfDydCjI09ZASRQKphvEZK2b8s=;
b=hwt1MrxfkYklHc9wJYl/y8Lf9XcEad/UGZfto8ZCD9Nsuf1BnNzI3HWZdL5x9rxkl9
fUwbDIA+6uuJ+yK1rspvY44blomcZlVeKwIq5sJNMhI/ORJDoUnBwQU3nnGIiStHQEcw
NVEGl/htLY9de6k40/S+AMrmb6A/HGxA1xOS68Mgol4SktduAJRTrmbRhB6aq5R9W/ih
9fgEPyk91uXkXbuTVlVvAt6BKw7371h1P5Dv9almYrzZRbg3i+tENl+NVM8/BvM7fuf9
c7m/r7aW9byWau60fGThpaE3h52JfQp4JcOXXhHOpHIsmDeuZJtzwO8CeiwxgtHxHntB
1gKw==
X-Forwarded-Encrypted: i=1; AJvYcCUIUAXNZHcPYj/owNGG7Tu9qdHw0lG5SRyUVuvrLYcGWqaVM6rtf5acR5i4TOHeT8j35X56CvwnhAb1+yw=@vger.kernel.org
X-Gm-Message-State: AOJu0Yx3BAMDLy40cHfk6QJ3QkK0H0eNd457L/BHE+scH2JjL1kCSvYE
SKb58qmPrGbje2JzSD63PiU40s34WHrcbuTgHmcgXV5BkZMvyv4du6BVqqgiKXSuYmRTfp+c7J9
Z3y865g==
X-Google-Smtp-Source: AGHT+IHaoqvtVI0Yz46iIwHy/iA5qtPYPdu+XqdbPfhM44STMOd9JolDoyV7EuaxX4Sn5kzKGTMBLEw92Is=
X-Received: from pjbrj10.prod.google.com ([2002:a17:90b:3e8a:b0:313:221f:6571])
(user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:5587:b0:311:d05c:936
with SMTP id 98e67ed59e1d1-3130cd31f24mr5027744a91.17.1749045744042; Wed, 04
Jun 2025 07:02:24 -0700 (PDT)
Date: Wed, 4 Jun 2025 07:02:22 -0700
In-Reply-To: <aC-otXnBwHsdZ7B4@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
Mime-Version: 1.0
References: <20250522005555.55705-1-mlevitsk@xxxxxxxxxx> <20250522005555.55705-4-mlevitsk@xxxxxxxxxx>
<aC-XmCl9SVX39Hgl@xxxxxxxxxx> <aC-otXnBwHsdZ7B4@xxxxxxxxxx>
Message-ID: <aEBR7mbg-iTYdCtJ@xxxxxxxxxx>
Subject: Re: [PATCH v5 3/5] KVM: nVMX: check vmcs12->guest_ia32_debugctl value
given by L2
From: Sean Christopherson <seanjc@xxxxxxxxxx>
To: Maxim Levitsky <mlevitsk@xxxxxxxxxx>
Cc: kvm@xxxxxxxxxxxxxxx, "H. Peter Anvin" <hpa@xxxxxxxxx>,
Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>,
Borislav Petkov <bp@xxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx,
x86@xxxxxxxxxx, Paolo Bonzini <pbonzini@xxxxxxxxxx>, Chao Gao <chao.gao@xxxxxxxxx>,
Jim Mattson <jmattson@xxxxxxxxxx>
Content-Type: text/plain; charset="us-ascii"
X-Spam-Status: No, score=-11.0 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Thu, May 22, 2025, Sean Christopherson wrote:
+Jim
On Thu, May 22, 2025, Sean Christopherson wrote:
> On Wed, May 21, 2025, Maxim Levitsky wrote:
> > Check the vmcs12 guest_ia32_debugctl value before loading it, to avoid L2
> > being able to load arbitrary values to hardware IA32_DEBUGCTL.
> >
> > Reviewed-by: Chao Gao <chao.gao@xxxxxxxxx>
> > Signed-off-by: Maxim Levitsky <mlevitsk@xxxxxxxxxx>
> > ---
> > arch/x86/kvm/vmx/nested.c | 3 ++-
> > arch/x86/kvm/vmx/vmx.c | 2 +-
> > arch/x86/kvm/vmx/vmx.h | 1 +
> > 3 files changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c
> > index e073e3008b16..00f2b762710c 100644
> > --- a/arch/x86/kvm/vmx/nested.c
> > +++ b/arch/x86/kvm/vmx/nested.c
> > @@ -3146,7 +3146,8 @@ static int nested_vmx_check_guest_state(struct kvm_vcpu *vcpu,
> > return -EINVAL;
> >
> > if ((vmcs12->vm_entry_controls & VM_ENTRY_LOAD_DEBUG_CONTROLS) &&
> > - CC(!kvm_dr7_valid(vmcs12->guest_dr7)))
> > + (CC(!kvm_dr7_valid(vmcs12->guest_dr7)) ||
> > + CC(vmcs12->guest_ia32_debugctl & ~vmx_get_supported_debugctl(vcpu, false))))
>
> This is a breaking change. For better or worse (read: worse), KVM's ABI is to
> drop BTF and LBR if they're unsupported (the former is always unsupported).
> Failure to honor that ABI means L1 can't excplitly load what it think is its
> current value into L2.
>
> I'll slot in a path to provide another helper for checking the validity of
> DEBUGCTL. I think I've managed to cobble together something that isn't too
> horrific (options are a bit limited due to the existing ugliness).
And then Jim ruined my day. :-)
As evidenced by this hilarious KUT testcase, it's entirely possible there are
existing KVM guests that are utilizing/abusing DEBUGCTL features.
/*
* Optional RTM test for hardware that supports RTM, to
* demonstrate that the current volume 3 of the SDM
* (325384-067US), table 27-1 is incorrect. Bit 16 of the exit
* qualification for debug exceptions is not reserved. It is
* set to 1 if a debug exception (#DB) or a breakpoint
* exception (#BP) occurs inside an RTM region while advanced
* debugging of RTM transactional regions is enabled.
*/
if (this_cpu_has(X86_FEATURE_RTM)) {
vmcs_write(ENT_CONTROLS,
vmcs_read(ENT_CONTROLS) | ENT_LOAD_DBGCTLS);
/*
* Set DR7.RTM[bit 11] and IA32_DEBUGCTL.RTM[bit 15]
* in the guest to enable advanced debugging of RTM
* transactional regions.
*/
vmcs_write(GUEST_DR7, BIT(11));
vmcs_write(GUEST_DEBUGCTL, BIT(15));
single_step_guest("Hardware delivered single-step in "
"transactional region", starting_dr6, 0);
check_db_exit(false, false, false, &xbegin, BIT(16),
starting_dr6);
} else {
vmcs_write(GUEST_RIP, (u64)&skip_rtm);
enter_guest();
}
For RTM specifically, disallowing DEBUGCTL.RTM but allowing DR7.RTM seems a bit
silly. Unless there's a security concern, that can probably be fixed by adding
support for RTM. Note, there's also a virtualization hole here, as KVM doesn't
vet DR7 beyond checking that bits 63:32 are zero, i.e. a guest could set DR7.RTM
even if KVM doesn't advertise support. Of course, closing that hole would require
completely dropping support for disabling DR interception, since VMX doesn't
give per-DR controls.
For the other bits, I don't see a good solution. The only viable options I see
are to silently drop all unsupported bits (maybe with a quirk?), or enforce all
bits and cross our fingers that no L1 VMM is running guests with those bits set
in GUEST_DEBUGCTL.
Paolo and I discussed this in PUCK this morning.
We agree trying to close the DR7 virtualization hole would be futile, and that we
should add support for DEBUGCTL.RTM to avoid breaking use of that specific bit.
For the other DEBUGCTL bits, none of them actually work (although, somewhat
amusingly, FREEZE_WHILE_SMM would "work" for real SMIs, which aren't visible to
L1), so we're going to roll the dice, cross our fingers that no existing workload
is setting those bits only in vmcs12.GUEST_DEBUGCTL, and enforce
vmx_get_supported_debugctl() at VM-Enter without any quirk.
6 TR: Setting this bit to 1 enables branch trace messages to be sent.
7 BTS: Setting this bit enables branch trace messages (BTMs) to be logged in a BTS buffer.
8 BTINT: When clear, BTMs are logged in a BTS buffer in circular fashion.
9 BTS_OFF_OS: When set, BTS or BTM is skipped if CPL = 0.
10 BTS_OFF_USR: When set, BTS or BTM is skipped if CPL > 0.
11 FREEZE_LBRS_ON_PMI: When set, the LBR stack is frozen on a PMI request.
12 FREEZE_PERFMON_ON_PMI: When set, each ENABLE bit of the global counter control MSR are frozen on a PMI request.
13 ENABLE_UNCORE_PMI: When set, enables the logical processor to receive and generate PMI on behalf of the uncore.
14 FREEZE_WHILE_SMM: When set, freezes perfmon and trace messages while in SMM.
Return-Path: <linux-kernel+bounces-673311-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id DB7CC41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:03:21 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id BACEC16BD1A
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:03:22 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 5055E2900A4;
Wed, 4 Jun 2025 14:03:13 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lMpQ2oB8"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7EC6B217F3D;
Wed, 4 Jun 2025 14:03:11 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749045792; cv=none; b=LEST9FOPO+hx42UVlHpa5CSsIm30kIGDL7iZCMQGF4mUzGoxsYK9SzGLZfWOvLek/fJpoSeaNx4on44qdpeii/uy82eaorVHlCSCruSfDXU2F0/JL8ETX8wOmmwmgVahFzhEF+xSqKsOxZIo1nRxCO6/e4bisu9BKdPK03taOeY=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749045792; c=relaxed/simple;
bh=jOX0OWkMHthLxZlqAHJmk7epo+raL1mcgxAKeKQDmJE=;
h=Message-ID:Date:MIME-Version:Subject:To:References:From:
In-Reply-To:Content-Type; b=i4WwVlSsnLqKtOiuM6Nag1ii/7X0WoI5W9TdZGcYiHWgy7yh7BEnTmEiMDu/QqIFoilLOR3EuIhhysyvCbUNsbzR/MGM1hEuzjkfLREbFsU/5rbzJ2Ydc76TCTCDRWDeOABg/2XBQFnUfmv2yf20MaZS0yGvbUU4CtTP4hputbk=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lMpQ2oB8; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 23BCCC4CEE4;
Wed, 4 Jun 2025 14:03:04 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749045791;
bh=jOX0OWkMHthLxZlqAHJmk7epo+raL1mcgxAKeKQDmJE=;
h=Date:Subject:To:References:From:In-Reply-To:From;
b=lMpQ2oB8JJwDA44NsSUC2mXhaRvVTGDAzPpvPYQ9gh9wTzDypJL9GP8ph9GgVEE7k
YGkZDtwjWg8xAzJ1t49FxyMkEAJK604mQ3i4iHlxNYP+lfVzOgsA22/Y6gVN1dyPFf
/mIlaw/wgqZaoqCx32WdRk48Bd2a/Lo1NAptc1rmyzO8wHADrkQdUKXrZu6uGBJq+Q
aSn4aWRGrx0BuhpRrZ2X3RY47pp1+tDt7GgSUcFs5PutSNlMDZpChNc4oSsGj5buie
b4OYxa5rH++46A1JlUYv9M1xHVXb0pKWA5A5y5Or6E8xR7pdBICjNL0D4P9riEPLSF
n7L1R0URIJt7Q==
Message-ID: <dcaea307-bbd8-4b6a-ad6c-04f6a2d8e473@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 16:03:02 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v5 4/5] dt-bindings: iio: adc: add ad7405
To: "Ioan-daniel, Pop" <Pop.Ioan-daniel@xxxxxxxxxx>,
Lars-Peter Clausen <lars@xxxxxxxxxx>,
"Hennerich, Michael" <Michael.Hennerich@xxxxxxxxxx>,
Jonathan Cameron <jic23@xxxxxxxxxx>, David Lechner <dlechner@xxxxxxxxxxxx>,
"Sa, Nuno" <Nuno.Sa@xxxxxxxxxx>, Andy Shevchenko <andy@xxxxxxxxxx>,
Rob Herring <robh@xxxxxxxxxx>, Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>,
"Cuciurean, Sergiu" <Sergiu.Cuciurean@xxxxxxxxxx>,
"Bogdan, Dragos" <Dragos.Bogdan@xxxxxxxxxx>,
"Miclaus, Antoniu" <Antoniu.Miclaus@xxxxxxxxxx>,
Olivier Moysan <olivier.moysan@xxxxxxxxxxx>,
Javier Carrasco <javier.carrasco.cruz@xxxxxxxxx>,
Matti Vaittinen <mazziesaccount@xxxxxxxxx>,
Tobias Sperling <tobias.sperling@xxxxxxxxxxx>,
Alisa-Dariana Roman <alisadariana@xxxxxxxxx>,
"Schmitt, Marcelo" <Marcelo.Schmitt@xxxxxxxxxx>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx>,
Trevor Gamblin <tgamblin@xxxxxxxxxxxx>,
"linux-iio@xxxxxxxxxxxxxxx" <linux-iio@xxxxxxxxxxxxxxx>,
"devicetree@xxxxxxxxxxxxxxx" <devicetree@xxxxxxxxxxxxxxx>,
"linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>
References: <20250602134349.1930891-1-pop.ioan-daniel@xxxxxxxxxx>
<20250602134349.1930891-5-pop.ioan-daniel@xxxxxxxxxx>
<c69e4bc3-c665-46ef-8452-b399aa76b815@xxxxxxxxxx>
<PH0PR03MB6335ECFCD0C0DEF0230E25B6D16CA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
From: Krzysztof Kozlowski <krzk@xxxxxxxxxx>
Content-Language: en-US
Autocrypt: addr=krzk@xxxxxxxxxx; keydata=
xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79
cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu
JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH
gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE
J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj
NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS
BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU
vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM
Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD
TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzSVLcnp5c3p0b2Yg
S296bG93c2tpIDxrcnprQGtlcm5lbC5vcmc+wsGVBBMBCgA/AhsDBgsJCAcDAgYVCAIJCgsE
FgIDAQIeAQIXgBYhBJvQfg4MUfjVlne3VBuTQ307QWKbBQJoF1BKBQkWlnSaAAoJEBuTQ307
QWKbHukP/3t4tRp/bvDnxJfmNdNVn0gv9ep3L39IntPalBFwRKytqeQkzAju0whYWg+R/rwp
+r2I1Fzwt7+PTjsnMFlh1AZxGDmP5MFkzVsMnfX1lGiXhYSOMP97XL6R1QSXxaWOpGNCDaUl
ajorB0lJDcC0q3xAdwzRConxYVhlgmTrRiD8oLlSCD5baEAt5Zw17UTNDnDGmZQKR0fqLpWy
786Lm5OScb7DjEgcA2PRm17st4UQ1kF0rQHokVaotxRM74PPDB8bCsunlghJl1DRK9s1aSuN
hL1Pv9VD8b4dFNvCo7b4hfAANPU67W40AaaGZ3UAfmw+1MYyo4QuAZGKzaP2ukbdCD/DYnqi
tJy88XqWtyb4UQWKNoQqGKzlYXdKsldYqrLHGoMvj1UN9XcRtXHST/IaLn72o7j7/h/Ac5EL
8lSUVIG4TYn59NyxxAXa07Wi6zjVL1U11fTnFmE29ALYQEXKBI3KUO1A3p4sQWzU7uRmbuxn
naUmm8RbpMcOfa9JjlXCLmQ5IP7Rr5tYZUCkZz08LIfF8UMXwH7OOEX87Y++EkAB+pzKZNNd
hwoXulTAgjSy+OiaLtuCys9VdXLZ3Zy314azaCU3BoWgaMV0eAW/+gprWMXQM1lrlzvwlD/k
whyy9wGf0AEPpLssLVt9VVxNjo6BIkt6d1pMg6mHsUEVzsFNBFVDXDQBEADNkrQYSREUL4D3
Gws46JEoZ9HEQOKtkrwjrzlw/tCmqVzERRPvz2Xg8n7+HRCrgqnodIYoUh5WsU84N03KlLue
MNsWLJBvBaubYN4JuJIdRr4dS4oyF1/fQAQPHh8Thpiz0SAZFx6iWKB7Qrz3OrGCjTPcW6ei
OMheesVS5hxietSmlin+SilmIAPZHx7n242u6kdHOh+/SyLImKn/dh9RzatVpUKbv34eP1wA
GldWsRxbf3WP9pFNObSzI/Bo3kA89Xx2rO2roC+Gq4LeHvo7ptzcLcrqaHUAcZ3CgFG88CnA
6z6lBZn0WyewEcPOPdcUB2Q7D/NiUY+HDiV99rAYPJztjeTrBSTnHeSBPb+qn5ZZGQwIdUW9
YegxWKvXXHTwB5eMzo/RB6vffwqcnHDoe0q7VgzRRZJwpi6aMIXLfeWZ5Wrwaw2zldFuO4Dt
91pFzBSOIpeMtfgb/Pfe/a1WJ/GgaIRIBE+NUqckM+3zJHGmVPqJP/h2Iwv6nw8U+7Yyl6gU
BLHFTg2hYnLFJI4Xjg+AX1hHFVKmvl3VBHIsBv0oDcsQWXqY+NaFahT0lRPjYtrTa1v3tem/
JoFzZ4B0p27K+qQCF2R96hVvuEyjzBmdq2esyE6zIqftdo4MOJho8uctOiWbwNNq2U9pPWmu
4vXVFBYIGmpyNPYzRm0QPwARAQABwsF8BBgBCgAmAhsMFiEEm9B+DgxR+NWWd7dUG5NDfTtB
YpsFAmgXUF8FCRaWWyoACgkQG5NDfTtBYptO0w//dlXJs5/42hAXKsk+PDg3wyEFb4NpyA1v
qmx7SfAzk9Hf6lWwU1O6AbqNMbh6PjEwadKUk1m04S7EjdQLsj/MBSgoQtCT3MDmWUUtHZd5
RYIPnPq3WVB47GtuO6/u375tsxhtf7vt95QSYJwCB+ZUgo4T+FV4hquZ4AsRkbgavtIzQisg
Dgv76tnEv3YHV8Jn9mi/Bu0FURF+5kpdMfgo1sq6RXNQ//TVf8yFgRtTUdXxW/qHjlYURrm2
H4kutobVEIxiyu6m05q3e9eZB/TaMMNVORx+1kM3j7f0rwtEYUFzY1ygQfpcMDPl7pRYoJjB
dSsm0ZuzDaCwaxg2t8hqQJBzJCezTOIkjHUsWAK+tEbU4Z4SnNpCyM3fBqsgYdJxjyC/tWVT
AQ18NRLtPw7tK1rdcwCl0GFQHwSwk5pDpz1NH40e6lU+NcXSeiqkDDRkHlftKPV/dV+lQXiu
jWt87ecuHlpL3uuQ0ZZNWqHgZoQLXoqC2ZV5KrtKWb/jyiFX/sxSrodALf0zf+tfHv0FZWT2
zHjUqd0t4njD/UOsuIMOQn4Ig0SdivYPfZukb5cdasKJukG1NOpbW7yRNivaCnfZz6dTawXw
XRIV/KDsHQiyVxKvN73bThKhONkcX2LWuD928tAR6XMM2G5ovxLe09vuOzzfTWQDsm++9UKF a/A=
In-Reply-To: <PH0PR03MB6335ECFCD0C0DEF0230E25B6D16CA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 04/06/2025 15:05, Ioan-daniel, Pop wrote:
On 02/06/2025 15:43, Pop Ioan Daniel wrote:
Add devicetree bindings for ad7405/adum770x family.
Signed-off-by: Pop Ioan Daniel <pop.ioan-daniel@xxxxxxxxxx>
---
changes in v5:
- create an example based on adi,ad7625.yaml that is very similar to this
part
- do not add Reviewed-by tag due to the change that I've made.
Which change? I see ZERO differences against version which was reviewed.
Hi! The difference is in the io-backends assignment:
Change in the binding. You just pasted example. What change did you make
to invalidate review?
examples:
+ - |
+ adc {
+ compatible = "adi,ad7405";
+ clocks = <&axi_clk_gen 0>;
+ vdd1-supply = <&vdd1>;
+ vdd2-supply = <&vdd2>;
+ io-backends = <&axi_adc>;
+ };
+...
Best regards,
Krzysztof
Return-Path: <linux-kernel+bounces-673312-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id C498D41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:03:55 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id CEA047A21B7
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:02:34 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 0D8982900BA;
Wed, 4 Jun 2025 14:03:45 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="QDXGiYGR"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 40F13217F3D;
Wed, 4 Jun 2025 14:03:44 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749045824; cv=none; b=uqgCoOU0LqtfS1RC9LzRfAcm7/LOCWHz0+XRqy61QSDYK1moWKqVmEqG6wSBmmQDpXG0UcKZiEjaQqqwnw47y8dSUzQdb16euUYan1gzb1xAVEdss1nOvRYYBAjuQFpwpGIGTvZd5N8aHxS8tddZLmqLcTht3ktwS8WvoE2V2R0=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749045824; c=relaxed/simple;
bh=ncioZK0PMhQfysG5PiTjNQ/f3TZHdofSIg4uV3f9yNo=;
h=Message-ID:Date:MIME-Version:Subject:To:References:From:
In-Reply-To:Content-Type; b=cMwa2hLRQKdUMk++G7dabCT1XDOwIPCBCef9ujwg7jPuDPIXpCDr+NnuDJ1MwU8Pe5EFr0XjBGzrycs4Yxdv3Bmlws79F8ohryIXMP8FQNhx/d9rpgELL/wZ1p1AoBs2Dda0wSlllIpWJeqOwnJKpPb3Gi//sFebgeLRwIkKmRE=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QDXGiYGR; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id B74FDC4CEF1;
Wed, 4 Jun 2025 14:03:37 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749045824;
bh=ncioZK0PMhQfysG5PiTjNQ/f3TZHdofSIg4uV3f9yNo=;
h=Date:Subject:To:References:From:In-Reply-To:From;
b=QDXGiYGRbFJygIBXqOcram+oTkxNvxzosxkqHlS3w0p9DqlnDwRATpb8CcChn74wz
qutme+ZnggxgMpotaUAUNX3LmCfcYF9mzq6X72o01aiaZcuzmnXV+sHAVZ1bT57wlH
tkngdi241D+aca2kSjS0RKcSsNW0tOGBpVUS7tQYiUmd8v/MAl/WIWRy1ZMDpE6A1e
EX8lzIZjG4TveZd6e4VHptXeH+0IHDKIa2ZBCHF1mJWAf3HLlaJZwEVWCwt79AuZGa
zy0Zzvi53eijloenfh+fjofzg1HHvXzOZNmi9J8twKgVSb993Gao/azouZ9rr6zNXU
jlT43PZxlo+Tw==
Message-ID: <06f0ffbf-ddff-4038-8b0a-1c67fdf9ec65@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 16:03:35 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v6 4/5] dt-bindings: iio: adc: add ad7405
To: Pop Ioan Daniel <pop.ioan-daniel@xxxxxxxxxx>,
Lars-Peter Clausen <lars@xxxxxxxxxx>,
Michael Hennerich <Michael.Hennerich@xxxxxxxxxx>,
Jonathan Cameron <jic23@xxxxxxxxxx>, David Lechner <dlechner@xxxxxxxxxxxx>,
=?UTF-8?Q?Nuno_S=C3=A1?= <nuno.sa@xxxxxxxxxx>,
Andy Shevchenko <andy@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Conor Dooley
<conor+dt@xxxxxxxxxx>, Sergiu Cuciurean <sergiu.cuciurean@xxxxxxxxxx>,
Dragos Bogdan <dragos.bogdan@xxxxxxxxxx>,
Antoniu Miclaus <antoniu.miclaus@xxxxxxxxxx>,
Olivier Moysan <olivier.moysan@xxxxxxxxxxx>,
Javier Carrasco <javier.carrasco.cruz@xxxxxxxxx>,
Matti Vaittinen <mazziesaccount@xxxxxxxxx>,
Tobias Sperling <tobias.sperling@xxxxxxxxxxx>,
Marcelo Schmitt <marcelo.schmitt@xxxxxxxxxx>,
Alisa-Dariana Roman <alisadariana@xxxxxxxxx>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx>,
Trevor Gamblin <tgamblin@xxxxxxxxxxxx>, linux-iio@xxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
References: <20250604133413.1528693-1-pop.ioan-daniel@xxxxxxxxxx>
<20250604133413.1528693-5-pop.ioan-daniel@xxxxxxxxxx>
From: Krzysztof Kozlowski <krzk@xxxxxxxxxx>
Content-Language: en-US
Autocrypt: addr=krzk@xxxxxxxxxx; keydata=
xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79
cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu
JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH
gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE
J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj
NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS
BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU
vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM
Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD
TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzSVLcnp5c3p0b2Yg
S296bG93c2tpIDxrcnprQGtlcm5lbC5vcmc+wsGVBBMBCgA/AhsDBgsJCAcDAgYVCAIJCgsE
FgIDAQIeAQIXgBYhBJvQfg4MUfjVlne3VBuTQ307QWKbBQJoF1BKBQkWlnSaAAoJEBuTQ307
QWKbHukP/3t4tRp/bvDnxJfmNdNVn0gv9ep3L39IntPalBFwRKytqeQkzAju0whYWg+R/rwp
+r2I1Fzwt7+PTjsnMFlh1AZxGDmP5MFkzVsMnfX1lGiXhYSOMP97XL6R1QSXxaWOpGNCDaUl
ajorB0lJDcC0q3xAdwzRConxYVhlgmTrRiD8oLlSCD5baEAt5Zw17UTNDnDGmZQKR0fqLpWy
786Lm5OScb7DjEgcA2PRm17st4UQ1kF0rQHokVaotxRM74PPDB8bCsunlghJl1DRK9s1aSuN
hL1Pv9VD8b4dFNvCo7b4hfAANPU67W40AaaGZ3UAfmw+1MYyo4QuAZGKzaP2ukbdCD/DYnqi
tJy88XqWtyb4UQWKNoQqGKzlYXdKsldYqrLHGoMvj1UN9XcRtXHST/IaLn72o7j7/h/Ac5EL
8lSUVIG4TYn59NyxxAXa07Wi6zjVL1U11fTnFmE29ALYQEXKBI3KUO1A3p4sQWzU7uRmbuxn
naUmm8RbpMcOfa9JjlXCLmQ5IP7Rr5tYZUCkZz08LIfF8UMXwH7OOEX87Y++EkAB+pzKZNNd
hwoXulTAgjSy+OiaLtuCys9VdXLZ3Zy314azaCU3BoWgaMV0eAW/+gprWMXQM1lrlzvwlD/k
whyy9wGf0AEPpLssLVt9VVxNjo6BIkt6d1pMg6mHsUEVzsFNBFVDXDQBEADNkrQYSREUL4D3
Gws46JEoZ9HEQOKtkrwjrzlw/tCmqVzERRPvz2Xg8n7+HRCrgqnodIYoUh5WsU84N03KlLue
MNsWLJBvBaubYN4JuJIdRr4dS4oyF1/fQAQPHh8Thpiz0SAZFx6iWKB7Qrz3OrGCjTPcW6ei
OMheesVS5hxietSmlin+SilmIAPZHx7n242u6kdHOh+/SyLImKn/dh9RzatVpUKbv34eP1wA
GldWsRxbf3WP9pFNObSzI/Bo3kA89Xx2rO2roC+Gq4LeHvo7ptzcLcrqaHUAcZ3CgFG88CnA
6z6lBZn0WyewEcPOPdcUB2Q7D/NiUY+HDiV99rAYPJztjeTrBSTnHeSBPb+qn5ZZGQwIdUW9
YegxWKvXXHTwB5eMzo/RB6vffwqcnHDoe0q7VgzRRZJwpi6aMIXLfeWZ5Wrwaw2zldFuO4Dt
91pFzBSOIpeMtfgb/Pfe/a1WJ/GgaIRIBE+NUqckM+3zJHGmVPqJP/h2Iwv6nw8U+7Yyl6gU
BLHFTg2hYnLFJI4Xjg+AX1hHFVKmvl3VBHIsBv0oDcsQWXqY+NaFahT0lRPjYtrTa1v3tem/
JoFzZ4B0p27K+qQCF2R96hVvuEyjzBmdq2esyE6zIqftdo4MOJho8uctOiWbwNNq2U9pPWmu
4vXVFBYIGmpyNPYzRm0QPwARAQABwsF8BBgBCgAmAhsMFiEEm9B+DgxR+NWWd7dUG5NDfTtB
YpsFAmgXUF8FCRaWWyoACgkQG5NDfTtBYptO0w//dlXJs5/42hAXKsk+PDg3wyEFb4NpyA1v
qmx7SfAzk9Hf6lWwU1O6AbqNMbh6PjEwadKUk1m04S7EjdQLsj/MBSgoQtCT3MDmWUUtHZd5
RYIPnPq3WVB47GtuO6/u375tsxhtf7vt95QSYJwCB+ZUgo4T+FV4hquZ4AsRkbgavtIzQisg
Dgv76tnEv3YHV8Jn9mi/Bu0FURF+5kpdMfgo1sq6RXNQ//TVf8yFgRtTUdXxW/qHjlYURrm2
H4kutobVEIxiyu6m05q3e9eZB/TaMMNVORx+1kM3j7f0rwtEYUFzY1ygQfpcMDPl7pRYoJjB
dSsm0ZuzDaCwaxg2t8hqQJBzJCezTOIkjHUsWAK+tEbU4Z4SnNpCyM3fBqsgYdJxjyC/tWVT
AQ18NRLtPw7tK1rdcwCl0GFQHwSwk5pDpz1NH40e6lU+NcXSeiqkDDRkHlftKPV/dV+lQXiu
jWt87ecuHlpL3uuQ0ZZNWqHgZoQLXoqC2ZV5KrtKWb/jyiFX/sxSrodALf0zf+tfHv0FZWT2
zHjUqd0t4njD/UOsuIMOQn4Ig0SdivYPfZukb5cdasKJukG1NOpbW7yRNivaCnfZz6dTawXw
XRIV/KDsHQiyVxKvN73bThKhONkcX2LWuD928tAR6XMM2G5ovxLe09vuOzzfTWQDsm++9UKF a/A=
In-Reply-To: <20250604133413.1528693-5-pop.ioan-daniel@xxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 04/06/2025 15:34, Pop Ioan Daniel wrote:
Add devicetree bindings for ad7405/adum770x family.
Signed-off-by: Pop Ioan Daniel <pop.ioan-daniel@xxxxxxxxxx>
---
no changes in v6.
So no changes but also no previous tags?
Best regards,
Krzysztof
Return-Path: <linux-kernel+bounces-673313-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id BAC8B41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:04:18 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 0FE1F7A58AE
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:02:57 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 4F73A290BAD;
Wed, 4 Jun 2025 14:04:05 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=savoirfairelinux.com header.i=@savoirfairelinux.com header.b="jrVdRHgc"
Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 43CE728F53F;
Wed, 4 Jun 2025 14:04:00 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=208.88.110.44
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749045844; cv=none; b=mzSAKPYDAt4XZQXv5CnR7O0rdzilZDCB82X6ZKxiz5b2jN2rqVAbM2DQp42LWIbUXbHmu0xUoNtz36ZleMejzejmup2g+n57kKEB3GzGQSa9+vIz140Eup+ooBh/6y7Oovo0AQRqOGdMhiaJV4Ox4qklQ9fsI9JtehvB4st93ls=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749045844; c=relaxed/simple;
bh=/vwiZTWzmPgsj0KUENqU6UhJJnC2/Rz+pMduVn1+OWM=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=By6iZe7GSowrlYjM8cgruLo9hg2qMcvtUq9b755e/2YqYVi02/l977A6Qm1LoU7Iu+4qR7txWmXdbdABHXdmxv2I6QNBDx/ADYvTlxTMr2ech4PhXQ1M5+g3N5sN4PD7jSSo5kcGnrZ7Wys4l9oOGJH2wv0oCu/cbUGy1zPWU1c=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=savoirfairelinux.com; spf=pass smtp.mailfrom=savoirfairelinux.com; dkim=pass (2048-bit key) header.d=savoirfairelinux.com header.i=@savoirfairelinux.com header.b=jrVdRHgc; arc=none smtp.client-ip=208.88.110.44
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=savoirfairelinux.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=savoirfairelinux.com
Received: from localhost (localhost [127.0.0.1])
by mail.savoirfairelinux.com (Postfix) with ESMTP id 8127D3D85613;
Wed, 4 Jun 2025 10:03:54 -0400 (EDT)
Received: from mail.savoirfairelinux.com ([127.0.0.1])
by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10032)
with ESMTP id PCGfP4LjU-ST; Wed, 4 Jun 2025 10:03:54 -0400 (EDT)
Received: from localhost (localhost [127.0.0.1])
by mail.savoirfairelinux.com (Postfix) with ESMTP id F2EEA3D88020;
Wed, 4 Jun 2025 10:03:53 -0400 (EDT)
DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com F2EEA3D88020
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2;
t=1749045834; bh=kkcJ9urY/imVZiy9fJFRtQMpM50BrSYPIVeR4sQD1Hw=;
h=Date:From:To:Message-ID:MIME-Version;
b=jrVdRHgcehZn4jD9LQREdvY2QkR2bdcP5AxpqN/c/xDLQ67GvSyoGJBnMEn87WYAh
6Kv/xomV1Sc2vQp3WHGPkFMs7S97ehE+XhNEG06x6NVoM5v/fdomWUOlyVPLkjHaeQ
giyyieJvU4bQuvgS8ZFgcAVhc6nLp3LDRBBX4ioNhFvV8EpgS3AdRBCDy178FDKowf
r4xCy6i6JBDJf3wxi97P/ptbK6+pbSPBK4O+WDuBimC5URjJdiy9qJnTSVrwU/qeaT
R+plU7E/MazZBGksAJgdKCDlUtqNVHE49Z5A3mI95nYHnIBxwzq4RjWvvOhX/Dd/kI
xfHXe859l7t9g==
X-Virus-Scanned: amavis at mail.savoirfairelinux.com
Received: from mail.savoirfairelinux.com ([127.0.0.1])
by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10026)
with ESMTP id vay_oKC6Iaut; Wed, 4 Jun 2025 10:03:53 -0400 (EDT)
Received: from fedora (unknown [192.168.51.254])
by mail.savoirfairelinux.com (Postfix) with ESMTPSA id AAD153D85613;
Wed, 4 Jun 2025 10:03:53 -0400 (EDT)
Date: Wed, 4 Jun 2025 10:03:52 -0400
From: Samuel Kayode <samuel.kayode@xxxxxxxxxxxxxxxxxxxx>
To: Mark Brown <broonie@xxxxxxxxxx>
Cc: Lee Jones <lee@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>,
Liam Girdwood <lgirdwood@xxxxxxxxx>,
Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>,
Sebastian Reichel <sre@xxxxxxxxxx>, devicetree@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-input@xxxxxxxxxxxxxxx,
linux-pm@xxxxxxxxxxxxxxx, Abel Vesa <abelvesa@xxxxxxxxxx>,
Abel Vesa <abelvesa@xxxxxxxxx>, Robin Gong <b38343@xxxxxxxxxxxxx>,
Enric Balletbo i Serra <eballetbo@xxxxxxxxx>
Subject: Re: [PATCH v4 3/6] regulator: pf1550: add support for regulator
Message-ID: <aEBSSHA8bxw2igAW@fedora>
References: <20250603-pf1550-v4-0-bfdf51ee59cc@xxxxxxxxxxxxxxxxxxxx>
<20250603-pf1550-v4-3-bfdf51ee59cc@xxxxxxxxxxxxxxxxxxxx>
<eb1fb4e2-42aa-4795-bc6c-dbcf1fa04f11@xxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <eb1fb4e2-42aa-4795-bc6c-dbcf1fa04f11@xxxxxxxxxxxxx>
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 12:35:21PM +0100, Mark Brown wrote:
On Tue, Jun 03, 2025 at 02:27:47PM -0400, Samuel Kayode via B4 Relay wrote:
> +static int pf1550_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay)
> +{
> + int id = rdev_get_id(rdev);
> + unsigned int ramp_bits = 0;
> + int ret;
> +
> + if (id > PF1550_VREFDDR)
> + return -EACCES;
> +
> + if (ramp_delay > 0) {
> + ramp_delay = 6250 / ramp_delay;
> + ramp_bits = ramp_delay >> 1;
> + }
I'm not seeing validation of the maximum ramp_delay value here?
Thanks, that would be addressed in the next version.
> + switch (irq_type) {
> + case PF1550_PMIC_IRQ_SW1_LS:
> + event = REGULATOR_EVENT_OVER_CURRENT;
> + case PF1550_PMIC_IRQ_SW1_HS:
> + event = REGULATOR_EVENT_OVER_CURRENT;
> + case PF1550_PMIC_IRQ_LDO1_FAULT:
> + event = REGULATOR_EVENT_OVER_CURRENT;
You appear to be flagging all these events as over current events which
doesn't seem entirely plausible.
It does seem like it but the manual describes these interrupts as "current limit
interrupt". The interrupts ending in _LS are "low-side current limit interrupt",
_HS are "high-side current limit interrupt" and _FAULT are "current limit fault
interrupt".
Thanks,
Sam
Return-Path: <linux-kernel+bounces-673314-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 2016B41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:04:41 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id D8C3C1899703
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:04:39 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 3F1DD290BDD;
Wed, 4 Jun 2025 14:04:09 +0000 (UTC)
Received: from mail-il1-f197.google.com (mail-il1-f197.google.com [209.85.166.197])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4DB53290BDA
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:04:06 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.197
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749045848; cv=none; b=JBI9phirrJTHgR5tnZrWJB+vBykronMjaUn5e7peCBKYtAqyGxma54TpC6UZpHuQgQ3Mm1vIrYZ4pE4sfkmh7NX09Ei8eyD9ZhBNsVkNgt1Qx64jJK4rJsWUK8Jnx8DRddToVRj1bNZ54NqUifMRA+Pa1wTzYEYAduqe7M3R+ZI=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749045848; c=relaxed/simple;
bh=nzgbldK+LmxvjUeVLvaDW0e8O8bz+ASstGXZPtdI26I=;
h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To:
Content-Type; b=jh4K0EvdPZM0FhsRgV6Prg/+vbyu8iKWz1mE7kfZk7qb5HgyTZYPQ7cXyaRPiBoFg6Vi6+qzEaywoxCmtOXVqrwUmnJVzryTpzERaUTUtENvnD7HfGJZYT+aUE3IHpgpUao9KYtKrPp93IwuiNT4PiFDCPPvjC/j2nFoHy6T/5M=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.166.197
Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com
Received: by mail-il1-f197.google.com with SMTP id e9e14a558f8ab-3ddc2752859so2839545ab.3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 07:04:06 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749045846; x=1749650646;
h=to:from:subject:message-id:in-reply-to:date:mime-version
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=0o845Z4tiKBe/x4yb7kJ9IJMxcXX3Frj5AVPiha4+cU=;
b=krWNiAMzcnTN0Gaxe64ob657QQmoxkUDAcJhZk6dXWofhuWKF96qnbdevO5YKzZLuJ
jL7esVGLa7ASBB5CK3iNPOTHD34ksZlW/3T9GnKycKC1LWgYvkQIXjbubZGZ4nqhYLAz
oqrKHpJUJ+Aau6TBWpGOA4BC8kIe1gO5fg0cTJt+OsEF8Vwig/Fz472PBaQWBgRvkyhR
G965paQdLHMUNH83QIgLYi89+J32LSpqFmEd5VZhjTOMXEZzwtEOJPT9gMPt+uA1Ln+F
hYHO8kB4lK1uGlr16kkbbkocrhP3u8H2c7N2ILaQclgfnj1N6b08UeksJTCtW2DEknCz
wPew==
X-Forwarded-Encrypted: i=1; AJvYcCWFJ/6aKBf4KY+KWqgWjfighJPLIBd+ApO2ywD89bv+Qyq255yTgwK9jAqXKKq/pqyBcChg0rolIKBY6Fw=@vger.kernel.org
X-Gm-Message-State: AOJu0YxVX6ZMoKpeyygrTb4v7HHbS4deo3PAHdpI6Gh90vkrJ9ONSJQW
qXXcZbTAVwRdRK2876nH+P8HbsYeL8uc5+Wq5+UiMqxJsaXiDOKEG+RJOLqNmoP599afcDlBwp1
+9BWxK8gwJVDmW9QM4FixOeNghV7SjnET7Va8R/S53SM2D2apaQ4dbiD0WhQ=
X-Google-Smtp-Source: AGHT+IFxKwBcWsEivYBDYj/AVNiSpkOyEV8LXmdDUfMx3DUplBU+OBSyFW8NznBpKZ5T7Bd0AiS+8ve3dK2TX0v3oTpjDEFlFgZ+
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-Received: by 2002:a05:6e02:174d:b0:3dc:7660:9efe with SMTP id
e9e14a558f8ab-3ddbed0d6fdmr38320925ab.9.1749045846140; Wed, 04 Jun 2025
07:04:06 -0700 (PDT)
Date: Wed, 04 Jun 2025 07:04:06 -0700
In-Reply-To: <CAGR7w82+NvTjNtc-Bvf0A02BFqZPPrXTr3e9iqaBTLoLyRwF6g@xxxxxxxxxxxxxx>
X-Google-Appengine-App-Id: s~syzkaller
X-Google-Appengine-App-Id-Alias: syzkaller
Message-ID: <68405256.a00a0220.d8eae.008a.GAE@xxxxxxxxxx>
Subject: Re: [syzbot] [bcachefs?] KASAN: slab-out-of-bounds Read in bch2_sb_members_v2_to_text
From: syzbot <syzbot+5138f00559ffb3cb3610@xxxxxxxxxxxxxxxxxxxxxxxxx>
To: abhinav.ogl@xxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
syzkaller-bugs@xxxxxxxxxxxxxxxx
Content-Type: text/plain; charset="UTF-8"
X-Spam-Status: No, score=-3.0 required=5.0 tests=FROM_LOCAL_HEX,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hello,
syzbot tried to test the proposed patch but the build/boot failed:
fs/bcachefs/sb-members.c:68:44: error: no member named 'size' in 'struct bch_sb_field'
Tested on:
commit: 911483b2 Add linux-next specific files for 20250604
git tree: linux-next
kernel config: https://syzkaller.appspot.com/x/.config?x=e7902c752bef748
dashboard link: https://syzkaller.appspot.com/bug?extid=5138f00559ffb3cb3610
compiler: Debian clang version 20.1.6 (++20250514063057+1e4d39e07757-1~exp1~20250514183223.118), Debian LLD 20.1.6
patch: https://syzkaller.appspot.com/x/patch.diff?x=17ac940c580000
Return-Path: <linux-kernel+bounces-673315-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 284BD41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:05:28 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 51AEA3A6C99
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:05:06 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 0CF302900A0;
Wed, 4 Jun 2025 14:05:22 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RgdB7Q9a"
Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id ED876217F3D
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:05:18 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.180
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749045921; cv=none; b=rLSDtzhVyqOogu+2d0hFydupCgVf+gC8M9lrEbg6Xt+89K7OToaio3uzGiypZ0D0eEIGVTxVk8CryRaIJSTwep9EkvupCw7pXjjMQdEl5nDus9VqrePhqCNY5/SlHKt5kOtis/I5bpsFgCLdg3rCXa447wd2f0TeNrA51Xt5x0U=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749045921; c=relaxed/simple;
bh=mEwl9cjLTVI7sQBAMbLWgpBd5baQ5Bc1TVQKwpPImzo=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=pQfXJXLx9aU6HpQ9m1uqJjcwZTncx8eHhgA0xYDl0+iYgkNc3zgV+RkbrhrG2kSZXsvZub6L6vJEkXraW7Vk3go9q7mUcPDwyMFlSxOqtqdzu25/7E7SOupAJC1L9Zrrmmf2qq8NRdxG8qnyIC70HxcHZ3wfWLk1bGQ4EU3vwjQ=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=RgdB7Q9a; arc=none smtp.client-ip=209.85.215.180
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
Received: by mail-pg1-f180.google.com with SMTP id 41be03b00d2f7-b2c4476d381so953098a12.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 07:05:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1749045918; x=1749650718; darn=vger.kernel.org;
h=in-reply-to:content-disposition:mime-version:references:message-id
:subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to;
bh=v6Jziq1CHUFj2h2WHZH1SsgeKe9ouBnoMuGPhTV1Jhc=;
b=RgdB7Q9aBvBDEQc0Js6RMYRtRabxKA/gjMISdZ2UigIbaZvBNA+KjTnDXOSUwaeO+o
AxnkR5Oa4UgIvmknZ0gO+BETpLlv+fRiiKbw4HuQXZJiinY/0vUCslfptaQfzVDpzo1T
XWy9PTCrVSrYS5lIPgZwM73xGTcUp84RyL6jC5h8AVnJIIVZo/DE/KG82iLzhXlbld55
idrYWPvRLWTfgTYtvr1/WNmCYO+gThLIJ85Cn9S8RPppepAV0iHI7SGjrfZ3cas14zUy
A5xH1x7+KfLjEpa+FODwKE2bJ7dpA9UqskWD2aavIflCyEfDCkQkIxE9WPcJNCldrxtN
SnGA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749045918; x=1749650718;
h=in-reply-to:content-disposition:mime-version:references:message-id
:subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to;
bh=v6Jziq1CHUFj2h2WHZH1SsgeKe9ouBnoMuGPhTV1Jhc=;
b=nTBWI1upgUs5es4b5NUFr0UvoiWhaohkZ5pVfldt3/AbiglN6r5k4T/MoAyNcSNVLF
E2lNu93GrilatQXPDfwotSFsVxOZTTjZvVbg4TwBzIETnqOCms95s6ubZ8M6OCO0s9Ty
vz9Xk1KPOerHmHLHB92vaSiiadXtxuyyVYDTVwOUSDnEm0eOeluFZaligEEXrs5zgOWf
txw4fKvvTtPMkon+1IKQ6mwknnVIuYcFCK2Pctp9r0wH92xrEsUUir8ALU6NHR1js3Q9
1BrbjxHuP3Zy49EUpbOI9n0HyeFhFnpBfl1s3uFQfyzm3eyYTzfZkY+hsKdeHwvqE9GB
eXCg==
X-Forwarded-Encrypted: i=1; AJvYcCXERQ6Q7c9gJ2kwBfpFj+vCByey9SFBF/Eqyc4pXbHDkYzdW1YSmiB8YCP7X8DzUF8/w0hgfafbQi6UKOU=@vger.kernel.org
X-Gm-Message-State: AOJu0YzDV9rhn/aljLkqmMQ2Hhd+126Nb3EHr8Fp5H25mL63feRcvO0W
hDwkE22hSE1AiAVYKafnAmtAqqgu+BKnQwT4rL2OcKlSFMoGJtkmGc20
X-Gm-Gg: ASbGnct7ZiaPsarYC0/CJtuo6bx9Yg3qy0d9+gmaLbCxAbOElPvlIhh1G4Iw7Vr2bAC
9OPO26uUtMe3AbkhLnZNuz437WpvTPPcYl/vmdiXhdon9jakqeDaIExV5kkaZaOGlBPB4Zjv7Ca
/OSnM95OkvwxeFEzYZ+owvMzFGoqXwkDIUP3P9B6M9qU6ewOzDo+adPrBdiktzHr+mJt64SqQEF
k/4md0a3sDkdVx/DzmKNADX+pz6J39w1fStQ3PWepioQh3106f4HKT2drRVduO8cYQXrDQAvzNf
SgyVxJA66ywubOZl2mRFsMKMZC3H9UqG6IscWNJca98hLaVCYKY5Y87xMZ1Nq6QRLqYYLXOT
X-Google-Smtp-Source: AGHT+IGia8s6X3GZlBFPLsgqEqQgiGPPVpTkPceVeeAMoSe4mGLufOBweHuJTtcLa/zr9tCg2atx1g==
X-Received: by 2002:a05:6a21:a8e:b0:218:2ee9:2c67 with SMTP id adf61e73a8af0-21d0cad48cdmr10623686637.9.1749045917873;
Wed, 04 Jun 2025 07:05:17 -0700 (PDT)
Received: from localhost ([216.228.127.128])
by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b2eceb36961sm8754616a12.43.2025.06.04.07.05.16
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 07:05:17 -0700 (PDT)
Date: Wed, 4 Jun 2025 10:05:15 -0400
From: Yury Norov <yury.norov@xxxxxxxxx>
To: Andrea Righi <arighi@xxxxxxxxxx>
Cc: Tejun Heo <tj@xxxxxxxxxx>, David Vernet <void@xxxxxxxxxxxxx>,
Changwoo Min <changwoo@xxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx
Subject: Re: [PATCH] sched_ext: idle: Skip cross-node search with !CONFIG_NUMA
Message-ID: <aEBSm7Lm9Gx_anMo@yury>
References: <20250603082201.173642-1-arighi@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20250603082201.173642-1-arighi@xxxxxxxxxx>
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hi Andrea!
On Tue, Jun 03, 2025 at 10:22:01AM +0200, Andrea Righi wrote:
In the idle CPU selection logic, attempting cross-node searches adds
unnecessary complexity when CONFIG_NUMA is disabled.
Since there's no meaningful concept of nodes in this case, simplify the
logic by restricting the idle CPU search to the current node only.
Fixes: 48849271e6611 ("sched_ext: idle: Per-node idle cpumasks")
Signed-off-by: Andrea Righi <arighi@xxxxxxxxxx>
---
kernel/sched/ext_idle.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/kernel/sched/ext_idle.c b/kernel/sched/ext_idle.c
index 66da03cc0b338..8660d9ae40169 100644
--- a/kernel/sched/ext_idle.c
+++ b/kernel/sched/ext_idle.c
@@ -138,6 +138,7 @@ static s32 pick_idle_cpu_in_node(const struct cpumask *cpus_allowed, int node, u
goto retry;
}
+#ifdef CONFIG_NUMA
It would be more natural if you move this inside the function body,
and not duplicate the function declaration.
/*
* Tracks nodes that have not yet been visited when searching for an idle
* CPU across all available nodes.
@@ -186,6 +187,13 @@ static s32 pick_idle_cpu_from_online_nodes(const struct cpumask *cpus_allowed, i
return cpu;
}
+#else
+static inline s32
+pick_idle_cpu_from_online_nodes(const struct cpumask *cpus_allowed, int node, u64 flags)
+{
+ return -EBUSY;
+}
This is misleading errno. The system is nut busy, it is disabled. If
it was a syscall, I would say you should return ENOSYS. ENODATA is
another candidate. Or you have a special policy for the subsystem/
The above pick_idle_cpu_in_node() doesn't have CONFIG_NUMA protection
as well. Is it safe against CONFIG_NUMA?
+#endif
/*
* Find an idle CPU in the system, starting from @node.
--
2.49.0
Return-Path: <linux-kernel+bounces-673316-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 4EB4F41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:06:03 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 0EBA57AA4AC
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:04:43 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 1CAC528FFD8;
Wed, 4 Jun 2025 14:05:53 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YXv44fZ0"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4E6F029009A;
Wed, 4 Jun 2025 14:05:51 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749045952; cv=none; b=t50tOZu0ftmpvjlU5xIcBOwBYWktx9axzSXQ+f8DdEC6vSpdm38M0wOxsMjLVGyaAlPU1tvoecxORffrbVbqBMHzo9x37AZsZu4F17z6oY/2ET+/FLTD0uGL9+aT3iG9gzQ3SXzxZ+e3ONJVemcRYP8x4uQ6NvwZaypDPXr2SJA=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749045952; c=relaxed/simple;
bh=IIEwGMNU/iJrUu7/3CwdVOUWTk7lAwMeHyQc/py9Ccg=;
h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
To:Cc:Content-Type; b=UPkMg4FOtMNv0UrQPYHkfA5YROY5kzo8s5otfIOLlnwdT/Pxd6+chJSrrKCihokwCorBZrGOZRHUY7f6iy6OVKEK4BUDIjdeTe/0/92hwGTzDBgsNBW578e3Ax0rCS9RBLx9+qR2o6CpFueZU1RabN2HiZKk95aG2WT2P1479D4=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YXv44fZ0; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id CBFF0C4AF0B;
Wed, 4 Jun 2025 14:05:51 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749045951;
bh=IIEwGMNU/iJrUu7/3CwdVOUWTk7lAwMeHyQc/py9Ccg=;
h=References:In-Reply-To:From:Date:Subject:To:Cc:From;
b=YXv44fZ0Sr4s/P77xwDWM3bl+et2NQKht5j2jXoEX7yG3Eb/UtkVmKaiHHWaUB9v8
pJXXUkBke75VXdJPUmIfxipVu2+83CiMConF36hFMxRKyHRv0QCZA+JIwmG3dQRuVA
8kZdxz6G/aiqVvfTX1Aq0GmkXa7fPXDY6Qt39+1VB7XnuKf6KyD28IGbCpp50cL2XD
lsqvyCGCnbs5z+dx7GYJ6ZxRvM4Y+jmot4hjUu7Y2/vdmkEBUq/PdCfg8GdtunYAd2
+WCBSbOFnVHpLgVnXQByT23u1jd31PlAqg5NZbDroRwqAgNwoduwYrZong1X+jdoQx
PnsL1rGIH027A==
Received: by mail-ed1-f44.google.com with SMTP id 4fb4d7f45d1cf-605b9488c28so7993658a12.2;
Wed, 04 Jun 2025 07:05:51 -0700 (PDT)
X-Forwarded-Encrypted: i=1; AJvYcCXAWuVDXx3s83CKNpi5fz2Km7U+kcX94RBZ69rE0AFlM4Hkz+yV7QBBFJl9t7nakkSp0VPA4cDG@xxxxxxxxxxxxxxx, AJvYcCXCa7IhxRjpJRYPnf3k3Au1eeVP8o5ix9TF1qDmTIBUY4ijepj71UZ4ubjovAYY7nT1GjuDvGVgrkdd5pQ=@vger.kernel.org
X-Gm-Message-State: AOJu0YxteLgmecjqUXL9rpUnUDHUqZyYYde5iSJId3SxMqmCrDnyGrAs
X9oHpVfp9dzwq8gN8KMz/sAaMFTXtauWqunvwfaXofD4t26C0l8GLNY6Tn6pZsQCH8DMtnRrjW+
72p2Xd7lh2Y7nVFGuko4pdOiRbqaYxKE=
X-Google-Smtp-Source: AGHT+IHzLrFJ0tDCiOZ2aUxsctyLKXzDo7JOd/wEZA10wfKlrAyYi5vIntUo8b7ssgCiiur5CYeoKuJbXK6hT8b9IDw=
X-Received: by 2002:a05:6402:2351:b0:607:1973:2082 with SMTP id
4fb4d7f45d1cf-6071973209cmr498604a12.11.1749045950321; Wed, 04 Jun 2025
07:05:50 -0700 (PDT)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
References: <20250603-loongarch-vdso-syscall-v1-1-6d12d6dfbdd0@xxxxxxxxxxxxx>
In-Reply-To: <20250603-loongarch-vdso-syscall-v1-1-6d12d6dfbdd0@xxxxxxxxxxxxx>
From: Huacai Chen <chenhuacai@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 22:05:37 +0800
X-Gmail-Original-Message-ID: <CAAhV-H4Ba7DMV6AvGnvNBJ8FL_YcHjeeHYZWw2NG6JHL=X4PkQ@xxxxxxxxxxxxxx>
X-Gm-Features: AX0GCFvKA_KKer2m4iG2-t1TsphfY807WvqIwtlUIzYSRATglAOWgOM5PL3hSDQ
Message-ID: <CAAhV-H4Ba7DMV6AvGnvNBJ8FL_YcHjeeHYZWw2NG6JHL=X4PkQ@xxxxxxxxxxxxxx>
Subject: Re: [PATCH] LoongArch: vDSO: correctly use asm parameters in syscall wrappers
To: =?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= <thomas.weissschuh@xxxxxxxxxxxxx>
Cc: WANG Xuerui <kernel@xxxxxxxxxx>, "Theodore Ts'o" <tytso@xxxxxxx>,
"Jason A. Donenfeld" <Jason@xxxxxxxxx>, Nathan Chancellor <nathan@xxxxxxxxxx>,
Nick Desaulniers <nick.desaulniers+lkml@xxxxxxxxx>, Bill Wendling <morbo@xxxxxxxxxx>,
Justin Stitt <justinstitt@xxxxxxxxxx>, Jiaxun Yang <jiaxun.yang@xxxxxxxxxxx>,
Xi Ruoyao <xry111@xxxxxxxxxxx>, loongarch@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, llvm@xxxxxxxxxxxxxxx, stable@xxxxxxxxxxxxxxx
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Tue, Jun 3, 2025 at 7:49=E2=80=AFPM Thomas Wei=C3=9Fschuh
<thomas.weissschuh@xxxxxxxxxxxxx> wrote:
The syscall wrappers use the "a0" register for two different register
variables, both the first argument and the return value. The "ret"
variable is used as both input and output while the argument register is
only used as input. Clang treats the conflicting input parameters as
undefined behaviour and optimizes away the argument assignment.
The code seems to work by chance for the most part today but that may
change in the future. Specifically clock_gettime_fallback() fails with
clockids from 16 to 23, as implemented by the upcoming auxiliary clocks.
Switch the "ret" register variable to a pure output, similar to the other
architectures' vDSO code. This works in both clang and GCC.
Hmmm, at first the constraint is "=3Dr", during the progress of
upstream, Xuerui suggested me to use "+r" instead [1].
[1] https://lore.kernel.org/linux-arch/5b14144a-9725-41db-7179-c059c41814c=
f@xxxxxxxxxx/
Huacai
Link: https://lore.kernel.org/lkml/20250602102825-42aa84f0-23f1-4d10-89fc=
-e8bbaffd291a@xxxxxxxxxxxxx/
Link: https://lore.kernel.org/lkml/20250519082042.742926976@xxxxxxxxxxxxx=
/
Fixes: c6b99bed6b8f ("LoongArch: Add VDSO and VSYSCALL support")
Fixes: 18efd0b10e0f ("LoongArch: vDSO: Wire up getrandom() vDSO implement=
ation")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Thomas Wei=C3=9Fschuh <thomas.weissschuh@xxxxxxxxxxxxx>
---
arch/loongarch/include/asm/vdso/getrandom.h | 2 +-
arch/loongarch/include/asm/vdso/gettimeofday.h | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/loongarch/include/asm/vdso/getrandom.h b/arch/loongarch=
/include/asm/vdso/getrandom.h
index 48c43f55b039b42168698614d0479b7a872d20f3..a81724b69f291ee49dd1f46b1=
2d6893fc18442b8 100644
--- a/arch/loongarch/include/asm/vdso/getrandom.h
+++ b/arch/loongarch/include/asm/vdso/getrandom.h
@@ -20,7 +20,7 @@ static __always_inline ssize_t getrandom_syscall(void *=
_buffer, size_t _len, uns
asm volatile(
" syscall 0\n"
- : "+r" (ret)
+ : "=3Dr" (ret)
: "r" (nr), "r" (buffer), "r" (len), "r" (flags)
: "$t0", "$t1", "$t2", "$t3", "$t4", "$t5", "$t6", "$t7", "$t8",
"memory");
diff --git a/arch/loongarch/include/asm/vdso/gettimeofday.h b/arch/loonga=
rch/include/asm/vdso/gettimeofday.h
index 88cfcf13311630ed5f1a734d23a2bc3f65d79a88..f15503e3336ca1bdc9675ec6e=
17bbb77abc35ef4 100644
--- a/arch/loongarch/include/asm/vdso/gettimeofday.h
+++ b/arch/loongarch/include/asm/vdso/gettimeofday.h
@@ -25,7 +25,7 @@ static __always_inline long gettimeofday_fallback(
asm volatile(
" syscall 0\n"
- : "+r" (ret)
+ : "=3Dr" (ret)
: "r" (nr), "r" (tv), "r" (tz)
: "$t0", "$t1", "$t2", "$t3", "$t4", "$t5", "$t6", "$t7",
"$t8", "memory");
@@ -44,7 +44,7 @@ static __always_inline long clock_gettime_fallback(
asm volatile(
" syscall 0\n"
- : "+r" (ret)
+ : "=3Dr" (ret)
: "r" (nr), "r" (clkid), "r" (ts)
: "$t0", "$t1", "$t2", "$t3", "$t4", "$t5", "$t6", "$t7",
"$t8", "memory");
@@ -63,7 +63,7 @@ static __always_inline int clock_getres_fallback(
asm volatile(
" syscall 0\n"
- : "+r" (ret)
+ : "=3Dr" (ret)
: "r" (nr), "r" (clkid), "r" (ts)
: "$t0", "$t1", "$t2", "$t3", "$t4", "$t5", "$t6", "$t7",
"$t8", "memory");
---
base-commit: 546b1c9e93c2bb8cf5ed24e0be1c86bb089b3253
change-id: 20250603-loongarch-vdso-syscall-f585a99bea03
Best regards,
--
Thomas Wei=C3=9Fschuh <thomas.weissschuh@xxxxxxxxxxxxx>
Return-Path: <linux-kernel+bounces-673317-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 1DB5941E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:06:13 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 29D413A7582
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:05:51 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 6E27F290D86;
Wed, 4 Jun 2025 14:05:56 +0000 (UTC)
Received: from foss.arm.com (foss.arm.com [217.140.110.172])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 3DB76290BB0;
Wed, 4 Jun 2025 14:05:52 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749045955; cv=none; b=SM+lBIIPvuLMTvFZ/kwxeIfJI2Zn1HWJ+lbUi2EL8I7mcJbGnrEX5zdCfevYVbhpnsad6Y/l+8aImx2Vio+m7RBwYHATSWy/GtYZcPTA4+PEr3wrIQZmvmuLM3OPUcdFdhCJlOBRdBi75J0TM7t7vq/BfPRlIx4FLObpZV3MtgQ=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749045955; c=relaxed/simple;
bh=Ak2W+o8IxIKSA2WZaZODaZ0/CBGDnqt8Ha3K2Qh6peE=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=B6yTRjsuYSPtdNZ048f8gzE+yHoIplqUN86WdXHVZ4JPk5+/wUX9cX8YR2k3UsXQ4aIAdbIOogzG1Wu1zLMnl39BoVeVpVnCeJ/t/z3XqGQj0Aelih74RRMBrwJXLbVBHUzdcaR5nlBpxckWWFweZXxRX8r1z5toKnhud6ykyRY=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com
Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14])
by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E7F781758;
Wed, 4 Jun 2025 07:05:34 -0700 (PDT)
Received: from J2N7QTR9R3 (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14])
by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 562883F5A1;
Wed, 4 Jun 2025 07:05:49 -0700 (PDT)
Date: Wed, 4 Jun 2025 15:05:43 +0100
From: Mark Rutland <mark.rutland@xxxxxxx>
To: Baisheng Gao <baisheng.gao@xxxxxxxxxx>,
Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>,
Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>,
Namhyung Kim <namhyung@xxxxxxxxxx>,
Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>,
Jiri Olsa <jolsa@xxxxxxxxxx>, Ian Rogers <irogers@xxxxxxxxxx>,
Adrian Hunter <adrian.hunter@xxxxxxxxx>,
"reviewer:PERFORMANCE EVENTS SUBSYSTEM" <kan.liang@xxxxxxxxxxxxxxx>,
"open list:PERFORMANCE EVENTS SUBSYSTEM" <linux-perf-users@xxxxxxxxxxxxxxx>,
"open list:PERFORMANCE EVENTS SUBSYSTEM" <linux-kernel@xxxxxxxxxxxxxxx>,
cixi.geng@xxxxxxxxx, hao_hao.wang@xxxxxxxxxx
Subject: Re: [PATCH] perf/core: Handling the race between exit_mmap and perf
sample
Message-ID: <aEBSt2LN7YhxYX7N@J2N7QTR9R3>
References: <20250424025429.10942-1-baisheng.gao@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <20250424025429.10942-1-baisheng.gao@xxxxxxxxxx>
X-Spam-Status: No, score=-3.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Thu, Apr 24, 2025 at 10:54:29AM +0800, Baisheng Gao wrote:
In order to fix the race condition between exit_mmap and
perf_output_sample below, forbidding to copy the user stack
of an exiting process.
Internal error: synchronous external abort: ffffffff96000010 [#1]
PREEMPT SMP
That ESR value (0x96000010, which got sign-extended somewhere), is a
synchronous external abort, not on translation table walk.
That means that some memory access was translated to some PA where the
endpoint responded with an error (and it strongly implies you're poking
MMIO or a PA terminated early by the interconnect).
CPU: 3 PID: 2651 Comm: binder:2649_1 Tainted: G W OE
5.15.149-android13-8-00008-gbe074b05e5af-ab12096863 #1
Hardware name: Spreadtrum UMS9230 1H10 SoC (DT)
pstate: 204000c5 (nzCv daIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : __arch_copy_from_user+0x180/0x218
lr : arch_perf_out_copy_user+0xb0/0x17c
sp : ffffffc00801baf0
x29: ffffffc00801baf0 x28: ffffffc00801bbf8 x27: ffffffc00801bbe8
x26: 0000000000000000 x25: 0000000000001000 x24: 000000000000feb8
x23: 00000000000005f0 x22: ffffff80613c8000 x21: ffffff8143102a10
x20: 0000007c239643c0 x19: 00000000000005f0 x18: ffffffc00801d058
x17: ffffffc16e677000 x16: ffffffc008018000 x15: 0000007c239643c0
x14: 0000000000000002 x13: 0000000000000003 x12: ffffffc008000000
x11: ffffff8000090000 x10: ffffffc008090000 x9 : 0000007fffffffff
x8 : 0000007c239643c0 x7 : 000000000000feb8 x6 : ffffff8143102a10
x5 : ffffff8143103000 x4 : 0000000000000000 x3 : ffffff8093cad140
x2 : 0000000000000570 x1 : 0000007c239643c0 x0 : ffffff8143102a10
Call trace:
__arch_copy_from_user+0x180/0x218
perf_output_sample+0x14e4/0x1904
perf_event_output_forward+0x90/0x130
__perf_event_overflow+0xc8/0x17c
perf_swevent_hrtimer+0x124/0x290
__run_hrtimer+0x134/0x4a0
hrtimer_interrupt+0x2e4/0x560
arch_timer_handler_phys+0x5c/0xa0
handle_percpu_devid_irq+0xc0/0x374
handle_domain_irq+0xd8/0x160
gic_handle_irq.34215+0x58/0x26c
call_on_irq_stack+0x3c/0x70
do_interrupt_handler+0x44/0xa0
el1_interrupt+0x34/0x64
el1h_64_irq_handler+0x1c/0x2c
el1h_64_irq+0x7c/0x80
release_pages+0xac/0x9b4
tlb_finish_mmu+0xb0/0x238
exit_mmap+0x1b8/0x538
__mmput+0x40/0x274
mmput+0x40/0x134
exit_mm+0x3bc/0x72c
The mmput() here happens after current->mm was set to NULL and the task
entered lazy TLB mode.
AFAICT, either:
* Something has gone wrong such that the CPU is still using the
translation tables of the exiting task, and those are in some
inconsistent state.
* Due to lazymm, the active_mm belongs to some other tas, and perf is
sampling from that other task's VA space (which does not correlate at
all with the pt_regs). That other task happens to have some MMIO
mapped.
... either of which is a pretty horrid bug.
Loooking at 5.15.149 and current HEAD (5abc7438f1e9), do_exit() calls
exit_mm() before perf_event_exit_task(), so it looks
like perf could sample from another task's mm.
Yuck.
Peter, does the above sound plausible to you?
Mark.
do_exit+0x294/0x1160
do_group_exit+0xc8/0x174
get_signal+0x830/0x95c
do_signal+0x9c/0x2a8
do_notify_resume+0x98/0x1ac
el0_svc+0x5c/0x84
el0t_64_sync_handler+0x88/0xec
el0t_64_sync+0x1b8/0x1bc
Signed-off-by: Baisheng Gao <baisheng.gao@xxxxxxxxxx>
---
kernel/events/core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index e93c19565914..9c9b571b812d 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -7867,7 +7867,8 @@ void perf_output_sample(struct perf_output_handle *handle,
}
}
- if (sample_type & PERF_SAMPLE_STACK_USER) {
+ if (sample_type & PERF_SAMPLE_STACK_USER &&
+ !(current->flags & PF_EXITING)) {
perf_output_sample_ustack(handle,
data->stack_user_size,
data->regs_user.regs);
--
2.34.1
________________________________
This email (including its attachments) is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. Unauthorized use, dissemination, distribution or copying of this email or the information herein or taking any action in reliance on the contents of this email or the information herein, by anyone other than the intended recipient, or an employee or agent responsible for delivering the message to the intended recipient, is strictly prohibited. If you are not the intended recipient, please do not read, copy, use or disclose any part of this e-mail to others. Please notify the sender immediately and permanently delete this e-mail and any attachments if you received it in error. Internet communications cannot be guaranteed to be timely, secure, error-free or virus-free. The sender does not accept liability for any errors or omissions.
本邮件及其附件具有保密性质,受法律保护不得泄露,仅发送给本邮件所指特定收件人。严禁非经授权使用、宣传、发布或复制本邮件或其内容。若非该特定收件人,请勿阅读、复制、 使用或披露本邮件的任何内容。若误收本邮件,请从系统中永久性删除本邮件及所有附件,并以回复邮件的方式即刻告知发件人。无法保证互联网通信及时、安全、无误或防毒。发件人对任何错漏均不承担责任。
Return-Path: <linux-kernel+bounces-673318-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id AFF1A41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:06:22 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id C9CA63A76E3
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:06:00 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 987572900B0;
Wed, 4 Jun 2025 14:05:57 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="dTqimwbu"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id EA3C7290098
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:05:51 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749045956; cv=none; b=LEGHw30XUxVftp2hmR+ULDsINlYVZh1mCPc29MWW00v3HCsN1RMuWxh/vHh7+fFgWCr+S4uKrW6/6D8fVMFohTM9P+ekASboWo2o3zUWec0VbBFILU+gjcA0ilzGSsA3KH9sEYN6ugE800meZ4DLGZn/19D8LFhrvWTApYmgPXw=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749045956; c=relaxed/simple;
bh=gVK2x7ewP/8uQNxMtsG5EaKhriyU7xBAW3layZKbYN0=;
h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=OC1ecYkxERgHLIpijry4GGDLg8HYlATxIM7bhgr3f6DK5tZmfI5ThvxDl+immVcway97aHmd3Z2bAuim2h83WeFXQqoOqLcL6HRL8ksU9acSCxWUvdRn1Uls1f7IBJrzsBR/rDD3xq0tEL3b+k1WvHjT31xAuYiDu1WjQWQYGT4=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=dTqimwbu; arc=none smtp.client-ip=170.10.129.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749045950;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:
content-transfer-encoding:content-transfer-encoding;
bh=ceQ8MrBEyOYSLsVlLloLQm5cGgLaPimBF5PhfObg4oc=;
b=dTqimwbuJRJzSctTKOxTGmPqh8h/fp3TfK9niShpcZ/AzxOhCHjq2AeaQNhmLDj0swFICc
zu+GsDNyFo3QpRIVKMRUV8DMy5Rs/uei1asBZ4iTdQ4KzMK+OXJxK9NreAC3mI/bx7bV0Y
Z/RltqlFRVfTRHmxSHLMP3ovv1zMErI=
Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com
[209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-519-UGTFNHICOcSxrTo_1N6BJQ-1; Wed, 04 Jun 2025 10:05:47 -0400
X-MC-Unique: UGTFNHICOcSxrTo_1N6BJQ-1
X-Mimecast-MFC-AGG-ID: UGTFNHICOcSxrTo_1N6BJQ_1749045947
Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-450d50eacafso37990645e9.3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 07:05:47 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749045947; x=1749650747;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=ceQ8MrBEyOYSLsVlLloLQm5cGgLaPimBF5PhfObg4oc=;
b=LB5Rv7PrPO8M3MYg8Pa0nWJkjlxYFWn+3ExzAZMAjiu2FL7lXWcEhX6moFLYGxlkvc
lI5HPVDfo/LtS25V2I7FJaGAv6lAfQfs28MBc4kyp2/K+VUl6UW1cqB84xNvwQiTsIPk
teXl8sNPaXt1PSD+J8kKX6aynvhcTtcgLw1vtjshax9Frk+kU0kgahx7OiIqSSku4nRq
/clMb9sSe5c1yG4h4rPF94qahWiehefJrAlP3NykNvTnEvVDfJtok3Bpa6baIFkem+YH
SzxJkXxm07Xu9TNMfzURFTDFAItIcWaNX/hXs3oojc2jlD33WrzTsx5B2zw/CixxDcuu
YV1g==
X-Gm-Message-State: AOJu0YyPyShrUYxAd6Ufj75yFwD+Wt5st9b3iLe57Fnr0KSJD/fYtmcj
nHeew3ELgIUL0ny4iIKYOsaOoChvScSOG1/lbenJP0Ik4jGP/3kaP0Di4bffmDAj3TinW8kgaQm
SseWNDW6XDZAkAiYpG0I3+jzFD+qz0Inm2godgkZpFpT/28ZL/R7fdD4Q6QTleTpi4D+7Oa4fkV
60YSjoTBCX3QV9CgX1Lk/JshT6Zahl6iUbkzYXKLTHmX0AkhJ/
X-Gm-Gg: ASbGncvl4uDe5vfWrl+MI2hSkSTrypSREFNnZzHYISgMW+XwgFXBUOkvg6wCzyEjIp0
8XkpAWauxi1ESkq9f4DYFUcYtvHXQVlCRtAgCREo/QiCEKN9oAb441qpKjp8gnrfIK98V7eBfdZ
+kYDPbzT/atIj5NE9plNifrbhbQt1KY1/nU56tIK9WCDtIf79yjFoUX4mUFfhgr3NO/m2/w5zAr
jRaQuPcKLeG1IeetYjrc2ZSJsIZNW7AnxmNb7M/87tQkIk1p4C5Y2R2Qd72xx7GmbQRo/a8/l6n
LNRSkr92Q0z+jNmmTZ6AeCTBUBOB55sA9QjoxWRjsgUb6cmSQ/iGEch65D+01kdUpn5RhXRm
X-Received: by 2002:a05:600c:4a27:b0:450:d614:cb with SMTP id 5b1f17b1804b1-451f0e547a4mr16907085e9.33.1749045946528;
Wed, 04 Jun 2025 07:05:46 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IHYe6tbzgwHaqVnJry21P3Q8c38NZTtjrZN6NtysuRTvfJy+CJBRQzZRfgenFSVCPefI/EKxA==
X-Received: by 2002:a05:600c:4a27:b0:450:d614:cb with SMTP id 5b1f17b1804b1-451f0e547a4mr16906525e9.33.1749045945863;
Wed, 04 Jun 2025 07:05:45 -0700 (PDT)
Received: from localhost (p200300d82f1bb8006fdb1af24fbd1fdf.dip0.t-ipconnect.de. [2003:d8:2f1b:b800:6fdb:1af2:4fbd:1fdf])
by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-450d7fc2725sm201643215e9.37.2025.06.04.07.05.44
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 07:05:45 -0700 (PDT)
From: David Hildenbrand <david@xxxxxxxxxx>
To: linux-kernel@xxxxxxxxxxxxxxx
Cc: linux-mm@xxxxxxxxx,
David Hildenbrand <david@xxxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>,
Mike Rapoport <rppt@xxxxxxxxxx>,
Suren Baghdasaryan <surenb@xxxxxxxxxx>,
Michal Hocko <mhocko@xxxxxxxx>,
Jason Gunthorpe <jgg@xxxxxxxx>,
John Hubbard <jhubbard@xxxxxxxxxx>,
Peter Xu <peterx@xxxxxxxxxx>
Subject: [PATCH v1] mm/gup: remove (VM_)BUG_ONs
Date: Wed, 4 Jun 2025 16:05:44 +0200
Message-ID: <20250604140544.688711-1-david@xxxxxxxxxx>
X-Mailer: git-send-email 2.49.0
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Especially once we hit one of the assertions in
sanity_check_pinned_pages(), observing follow-up assertions failing
in other code can give good clues about what went wrong, so use
VM_WARN_ON_ONCE instead.
While at it, let's just convert all VM_BUG_ON to VM_WARN_ON_ONCE as
well. Add one comment for the pfn_valid() check.
We have to introduce VM_WARN_ON_ONCE_VMA() to make that fly.
Drop the BUG_ON after mmap_read_lock_killable(), if that ever returns
something > 0 we're in bigger trouble. Convert the other BUG_ON's into
VM_WARN_ON_ONCE as well, they are in a similar domain "should never
happen", but more reasonable to check for during early testing.
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>
Cc: "Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>
Cc: Vlastimil Babka <vbabka@xxxxxxx>
Cc: Mike Rapoport <rppt@xxxxxxxxxx>
Cc: Suren Baghdasaryan <surenb@xxxxxxxxxx>
Cc: Michal Hocko <mhocko@xxxxxxxx>
Cc: Jason Gunthorpe <jgg@xxxxxxxx>
Cc: John Hubbard <jhubbard@xxxxxxxxxx>
Cc: Peter Xu <peterx@xxxxxxxxxx>
Signed-off-by: David Hildenbrand <david@xxxxxxxxxx>
---
Wanted to do this for a long time, but my todo list keeps growing ...
Based on mm/mm-unstable
---
include/linux/mmdebug.h | 12 ++++++++++++
mm/gup.c | 41 +++++++++++++++++++----------------------
2 files changed, 31 insertions(+), 22 deletions(-)
diff --git a/include/linux/mmdebug.h b/include/linux/mmdebug.h
index a0a3894900ed4..14a45979cccc9 100644
--- a/include/linux/mmdebug.h
+++ b/include/linux/mmdebug.h
@@ -89,6 +89,17 @@ void vma_iter_dump_tree(const struct vma_iterator *vmi);
} \
unlikely(__ret_warn_once); \
})
+#define VM_WARN_ON_ONCE_VMA(cond, vma) ({ \
+ static bool __section(".data..once") __warned; \
+ int __ret_warn_once = !!(cond); \
+ \
+ if (unlikely(__ret_warn_once && !__warned)) { \
+ dump_vma(vma); \
+ __warned = true; \
+ WARN_ON(1); \
+ } \
+ unlikely(__ret_warn_once); \
+})
#define VM_WARN_ON_VMG(cond, vmg) ({ \
int __ret_warn = !!(cond); \
\
@@ -115,6 +126,7 @@ void vma_iter_dump_tree(const struct vma_iterator *vmi);
#define VM_WARN_ON_FOLIO(cond, folio) BUILD_BUG_ON_INVALID(cond)
#define VM_WARN_ON_ONCE_FOLIO(cond, folio) BUILD_BUG_ON_INVALID(cond)
#define VM_WARN_ON_ONCE_MM(cond, mm) BUILD_BUG_ON_INVALID(cond)
+#define VM_WARN_ON_ONCE_VMA(cond, vma) BUILD_BUG_ON_INVALID(cond)
#define VM_WARN_ON_VMG(cond, vmg) BUILD_BUG_ON_INVALID(cond)
#define VM_WARN_ONCE(cond, format...) BUILD_BUG_ON_INVALID(cond)
#define VM_WARN(cond, format...) BUILD_BUG_ON_INVALID(cond)
diff --git a/mm/gup.c b/mm/gup.c
index e065a49842a87..3c3931fcdd820 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -64,11 +64,11 @@ static inline void sanity_check_pinned_pages(struct page **pages,
!folio_test_anon(folio))
continue;
if (!folio_test_large(folio) || folio_test_hugetlb(folio))
- VM_BUG_ON_PAGE(!PageAnonExclusive(&folio->page), page);
+ VM_WARN_ON_ONCE_PAGE(!PageAnonExclusive(&folio->page), page);
else
/* Either a PTE-mapped or a PMD-mapped THP. */
- VM_BUG_ON_PAGE(!PageAnonExclusive(&folio->page) &&
- !PageAnonExclusive(page), page);
+ VM_WARN_ON_ONCE_PAGE(!PageAnonExclusive(&folio->page) &&
+ !PageAnonExclusive(page), page);
}
}
@@ -760,8 +760,8 @@ static struct page *follow_huge_pmd(struct vm_area_struct *vma,
if (!pmd_write(pmdval) && gup_must_unshare(vma, flags, page))
return ERR_PTR(-EMLINK);
- VM_BUG_ON_PAGE((flags & FOLL_PIN) && PageAnon(page) &&
- !PageAnonExclusive(page), page);
+ VM_WARN_ON_ONCE_PAGE((flags & FOLL_PIN) && PageAnon(page) &&
+ !PageAnonExclusive(page), page);
ret = try_grab_folio(page_folio(page), 1, flags);
if (ret)
@@ -899,8 +899,8 @@ static struct page *follow_page_pte(struct vm_area_struct *vma,
goto out;
}
- VM_BUG_ON_PAGE((flags & FOLL_PIN) && PageAnon(page) &&
- !PageAnonExclusive(page), page);
+ VM_WARN_ON_ONCE_PAGE((flags & FOLL_PIN) && PageAnon(page) &&
+ !PageAnonExclusive(page), page);
/* try_grab_folio() does nothing unless FOLL_GET or FOLL_PIN is set. */
ret = try_grab_folio(folio, 1, flags);
@@ -1180,7 +1180,7 @@ static int faultin_page(struct vm_area_struct *vma,
if (unshare) {
fault_flags |= FAULT_FLAG_UNSHARE;
/* FAULT_FLAG_WRITE and FAULT_FLAG_UNSHARE are incompatible */
- VM_BUG_ON(fault_flags & FAULT_FLAG_WRITE);
+ VM_WARN_ON_ONCE(fault_flags & FAULT_FLAG_WRITE);
}
ret = handle_mm_fault(vma, address, fault_flags, NULL);
@@ -1760,10 +1760,7 @@ static __always_inline long __get_user_pages_locked(struct mm_struct *mm,
}
/* VM_FAULT_RETRY or VM_FAULT_COMPLETED cannot return errors */
- if (!*locked) {
- BUG_ON(ret < 0);
- BUG_ON(ret >= nr_pages);
- }
+ VM_WARN_ON_ONCE(!*locked && (ret < 0 || ret >= nr_pages));
if (ret > 0) {
nr_pages -= ret;
@@ -1808,7 +1805,6 @@ static __always_inline long __get_user_pages_locked(struct mm_struct *mm,
ret = mmap_read_lock_killable(mm);
if (ret) {
- BUG_ON(ret > 0);
if (!pages_done)
pages_done = ret;
break;
@@ -1819,11 +1815,11 @@ static __always_inline long __get_user_pages_locked(struct mm_struct *mm,
pages, locked);
if (!*locked) {
/* Continue to retry until we succeeded */
- BUG_ON(ret != 0);
+ VM_WARN_ON_ONCE(ret != 0);
goto retry;
}
if (ret != 1) {
- BUG_ON(ret > 1);
+ VM_WARN_ON_ONCE(ret > 1);
if (!pages_done)
pages_done = ret;
break;
@@ -1885,10 +1881,10 @@ long populate_vma_page_range(struct vm_area_struct *vma,
int gup_flags;
long ret;
- VM_BUG_ON(!PAGE_ALIGNED(start));
- VM_BUG_ON(!PAGE_ALIGNED(end));
- VM_BUG_ON_VMA(start < vma->vm_start, vma);
- VM_BUG_ON_VMA(end > vma->vm_end, vma);
+ VM_WARN_ON_ONCE(!PAGE_ALIGNED(start));
+ VM_WARN_ON_ONCE(!PAGE_ALIGNED(end));
+ VM_WARN_ON_ONCE_VMA(start < vma->vm_start, vma);
+ VM_WARN_ON_ONCE_VMA(end > vma->vm_end, vma);
mmap_assert_locked(mm);
/*
@@ -1957,8 +1953,8 @@ long faultin_page_range(struct mm_struct *mm, unsigned long start,
int gup_flags;
long ret;
- VM_BUG_ON(!PAGE_ALIGNED(start));
- VM_BUG_ON(!PAGE_ALIGNED(end));
+ VM_WARN_ON_ONCE(!PAGE_ALIGNED(start));
+ VM_WARN_ON_ONCE(!PAGE_ALIGNED(end));
mmap_assert_locked(mm);
/*
@@ -2908,7 +2904,8 @@ static int gup_fast_pte_range(pmd_t pmd, pmd_t *pmdp, unsigned long addr,
} else if (pte_special(pte))
goto pte_unmap;
- VM_BUG_ON(!pfn_valid(pte_pfn(pte)));
+ /* If it's not marked as special it must have a valid memmap. */
+ VM_WARN_ON_ONCE(!pfn_valid(pte_pfn(pte)));
page = pte_page(pte);
folio = try_grab_folio_fast(page, 1, flags);
base-commit: 2d0c297637e7d59771c1533847c666cdddc19884
--
2.49.0
Return-Path: <linux-kernel+bounces-673319-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 1640041E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:07:59 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 3B2EC3A7203
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:07:37 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id B1901290BAB;
Wed, 4 Jun 2025 14:07:50 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qGsYUtSw"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id E1B141E52D;
Wed, 4 Jun 2025 14:07:49 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749046070; cv=none; b=t/PXdFiKjgPTYZb4pu1q/E3h1WD20gUcnWp5f9+L1VlFJxl1J4g+QKqOWM+NzoSHiURQ7jLRbBkLNlFrxyoscONmXHSkkrNSUNl+OGl+UahNqI5EpU/98kkB+W9nNMNsp04z57XxJrMje416KqhGEMK89JtZUTLER8n1ANBhmTk=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749046070; c=relaxed/simple;
bh=b6xnqzpYhDmE6s6nfOyKsqfw46QpWokc7n3shvEH8eE=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=ONctVcK4F09+C5pAQXRJWQh99QiDcQLMBURSVjtefptBk9tNK00ekPJ+/piEpvKnY5duXR7N/CdjWEPTKiLxOgoOYNRhhv1v5DM4ns+/AKBm9mLhkjSPkz1KLkW/39sanWH5FcXZmjJz+GYgkt2Mu2740KjbD0RNJqa78oflVtc=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qGsYUtSw; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 08C44C4CEE4;
Wed, 4 Jun 2025 14:07:45 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749046069;
bh=b6xnqzpYhDmE6s6nfOyKsqfw46QpWokc7n3shvEH8eE=;
h=Date:Subject:To:Cc:References:From:In-Reply-To:From;
b=qGsYUtSwf16XeOcAzxtoTu8ey1M0HmLlDL0wk9MemHSHWIUKgo5LwAsy1akEtLCye
wXbnF66y821mK49ulzh0fkdNghwDJOM+nqmLYrjnMpoux6dnhZENm1loJAXawIVGVj
fZkFUrPM14uKPZrNRuuMKKlPeDcufHlgqumWvocceKk81jp5xk3qc77RqZ51SCp2Gf
NWe+FEhQMeI+bjQazBCjHMD7RBbt9+Q0lg2dYZRTSJObz4BNwbw2YEpW2tf43V6tlp
ZKIrnlrXon8J4EggkkhyJPS5Bh2R3ng6Dr8tvC90v39TohVNqZpXnMPWhAg1b0092S
+NcN4Fn/mP6jQ==
Message-ID: <cd6e92af-1304-4078-9ed7-de1cb53c66da@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 16:07:43 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v3 1/6] dt-bindings: crypto: Document support for SPAcc
To: Pavitrakumar Managutte <pavitrakumarm@xxxxxxxxxxxxxxx>
Cc: linux-crypto@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, herbert@xxxxxxxxxxxxxxxxxxx, robh@xxxxxxxxxx,
krzk+dt@xxxxxxxxxx, conor+dt@xxxxxxxxxx, Ruud.Derwig@xxxxxxxxxxxx,
manjunath.hadli@xxxxxxxxxxxxxxx, adityak@xxxxxxxxxxxxxxx,
Bhoomika Kadabi <bhoomikak@xxxxxxxxxxxxxxx>
References: <20250602053231.403143-1-pavitrakumarm@xxxxxxxxxxxxxxx>
<20250602053231.403143-2-pavitrakumarm@xxxxxxxxxxxxxxx>
<fae97f84-bdb9-42de-b292-92d2b262f16a@xxxxxxxxxx>
<CALxtO0mpQtqPB0h_Wff2dLGo=Mxk02JJQkK4rn+=TuScNdSfxQ@xxxxxxxxxxxxxx>
<3570be5b-cb20-4259-9a9b-959098b902d0@xxxxxxxxxx>
<CALxtO0mH=GwhQxQBsmMQYd+qgAue9WxXN1XWo9BncVJvJk6d8A@xxxxxxxxxxxxxx>
From: Krzysztof Kozlowski <krzk@xxxxxxxxxx>
Content-Language: en-US
Autocrypt: addr=krzk@xxxxxxxxxx; keydata=
xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79
cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu
JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH
gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE
J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj
NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS
BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU
vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM
Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD
TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzSVLcnp5c3p0b2Yg
S296bG93c2tpIDxrcnprQGtlcm5lbC5vcmc+wsGVBBMBCgA/AhsDBgsJCAcDAgYVCAIJCgsE
FgIDAQIeAQIXgBYhBJvQfg4MUfjVlne3VBuTQ307QWKbBQJoF1BKBQkWlnSaAAoJEBuTQ307
QWKbHukP/3t4tRp/bvDnxJfmNdNVn0gv9ep3L39IntPalBFwRKytqeQkzAju0whYWg+R/rwp
+r2I1Fzwt7+PTjsnMFlh1AZxGDmP5MFkzVsMnfX1lGiXhYSOMP97XL6R1QSXxaWOpGNCDaUl
ajorB0lJDcC0q3xAdwzRConxYVhlgmTrRiD8oLlSCD5baEAt5Zw17UTNDnDGmZQKR0fqLpWy
786Lm5OScb7DjEgcA2PRm17st4UQ1kF0rQHokVaotxRM74PPDB8bCsunlghJl1DRK9s1aSuN
hL1Pv9VD8b4dFNvCo7b4hfAANPU67W40AaaGZ3UAfmw+1MYyo4QuAZGKzaP2ukbdCD/DYnqi
tJy88XqWtyb4UQWKNoQqGKzlYXdKsldYqrLHGoMvj1UN9XcRtXHST/IaLn72o7j7/h/Ac5EL
8lSUVIG4TYn59NyxxAXa07Wi6zjVL1U11fTnFmE29ALYQEXKBI3KUO1A3p4sQWzU7uRmbuxn
naUmm8RbpMcOfa9JjlXCLmQ5IP7Rr5tYZUCkZz08LIfF8UMXwH7OOEX87Y++EkAB+pzKZNNd
hwoXulTAgjSy+OiaLtuCys9VdXLZ3Zy314azaCU3BoWgaMV0eAW/+gprWMXQM1lrlzvwlD/k
whyy9wGf0AEPpLssLVt9VVxNjo6BIkt6d1pMg6mHsUEVzsFNBFVDXDQBEADNkrQYSREUL4D3
Gws46JEoZ9HEQOKtkrwjrzlw/tCmqVzERRPvz2Xg8n7+HRCrgqnodIYoUh5WsU84N03KlLue
MNsWLJBvBaubYN4JuJIdRr4dS4oyF1/fQAQPHh8Thpiz0SAZFx6iWKB7Qrz3OrGCjTPcW6ei
OMheesVS5hxietSmlin+SilmIAPZHx7n242u6kdHOh+/SyLImKn/dh9RzatVpUKbv34eP1wA
GldWsRxbf3WP9pFNObSzI/Bo3kA89Xx2rO2roC+Gq4LeHvo7ptzcLcrqaHUAcZ3CgFG88CnA
6z6lBZn0WyewEcPOPdcUB2Q7D/NiUY+HDiV99rAYPJztjeTrBSTnHeSBPb+qn5ZZGQwIdUW9
YegxWKvXXHTwB5eMzo/RB6vffwqcnHDoe0q7VgzRRZJwpi6aMIXLfeWZ5Wrwaw2zldFuO4Dt
91pFzBSOIpeMtfgb/Pfe/a1WJ/GgaIRIBE+NUqckM+3zJHGmVPqJP/h2Iwv6nw8U+7Yyl6gU
BLHFTg2hYnLFJI4Xjg+AX1hHFVKmvl3VBHIsBv0oDcsQWXqY+NaFahT0lRPjYtrTa1v3tem/
JoFzZ4B0p27K+qQCF2R96hVvuEyjzBmdq2esyE6zIqftdo4MOJho8uctOiWbwNNq2U9pPWmu
4vXVFBYIGmpyNPYzRm0QPwARAQABwsF8BBgBCgAmAhsMFiEEm9B+DgxR+NWWd7dUG5NDfTtB
YpsFAmgXUF8FCRaWWyoACgkQG5NDfTtBYptO0w//dlXJs5/42hAXKsk+PDg3wyEFb4NpyA1v
qmx7SfAzk9Hf6lWwU1O6AbqNMbh6PjEwadKUk1m04S7EjdQLsj/MBSgoQtCT3MDmWUUtHZd5
RYIPnPq3WVB47GtuO6/u375tsxhtf7vt95QSYJwCB+ZUgo4T+FV4hquZ4AsRkbgavtIzQisg
Dgv76tnEv3YHV8Jn9mi/Bu0FURF+5kpdMfgo1sq6RXNQ//TVf8yFgRtTUdXxW/qHjlYURrm2
H4kutobVEIxiyu6m05q3e9eZB/TaMMNVORx+1kM3j7f0rwtEYUFzY1ygQfpcMDPl7pRYoJjB
dSsm0ZuzDaCwaxg2t8hqQJBzJCezTOIkjHUsWAK+tEbU4Z4SnNpCyM3fBqsgYdJxjyC/tWVT
AQ18NRLtPw7tK1rdcwCl0GFQHwSwk5pDpz1NH40e6lU+NcXSeiqkDDRkHlftKPV/dV+lQXiu
jWt87ecuHlpL3uuQ0ZZNWqHgZoQLXoqC2ZV5KrtKWb/jyiFX/sxSrodALf0zf+tfHv0FZWT2
zHjUqd0t4njD/UOsuIMOQn4Ig0SdivYPfZukb5cdasKJukG1NOpbW7yRNivaCnfZz6dTawXw
XRIV/KDsHQiyVxKvN73bThKhONkcX2LWuD928tAR6XMM2G5ovxLe09vuOzzfTWQDsm++9UKF a/A=
In-Reply-To: <CALxtO0mH=GwhQxQBsmMQYd+qgAue9WxXN1XWo9BncVJvJk6d8A@xxxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 04/06/2025 14:20, Pavitrakumar Managutte wrote:
+
+ snps,vspacc-id:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: |
+ Virtual SPAcc instance identifier.
+ The SPAcc hardware supports multiple virtual instances (determined by
+ ELP_SPACC_CONFIG_VSPACC_CNT parameter), and this ID is used to identify
+ which virtual instance this node represents.
No, IDs are not accepted.
PK: This represents the specific virtual SPAcc that is being used in
the current configuration. It is used to index into the register banks
and the context memories of the virtual SPAcc that is being used. The
SPAcc IP can be configured as dedicated virtual SPAccs in
heterogeneous environments.
OK. Why registers are not narrowed to only this instance? It feels like
you provide here full register space for multiple devices and then
select the bank with above ID.
PK: No, we cant narrow the registers to only this instance since its
is just a single SPAcc with multiple virtual SPAcc instances. The same
set of registers(aka register banks) and context memories are
repeated, but sit at different offset addresses (i*4000 +
register-offsets). The crypto hardware engine inside is shared by all
the virtual SPAccs. This is very much for a heterogeneous computing
scenario.
Then maybe you have one crypto engine? You ask us to guess all of this,
also because you do not upstream the DTS for real product. Any
mentioning of "virtual" already raises concerns...
Best regards,
Krzysztof
Return-Path: <linux-kernel+bounces-673320-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id ACDC241E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:08:49 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 104F33A7243
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:08:28 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 71AD1290BC3;
Wed, 4 Jun 2025 14:08:41 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=savoirfairelinux.com header.i=@savoirfairelinux.com header.b="wqKmuQgJ"
Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 33E1F290098;
Wed, 4 Jun 2025 14:08:38 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=208.88.110.44
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749046120; cv=none; b=LXLlCt2UWCCfj/qQEUG0VpTH9QKXAO6aO/hIUlAY0qANIZPoH7kE4y6dZmXGter68scmseDdvpayTWnL4tUrb3C9ERBCAZQugXAqiOdn5M9IP8XIqSL52azKV5+/v1GdTSlZhSe4WGb+HDp5VdXyDe/+FyKOk+IThgdtPUwIFKM=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749046120; c=relaxed/simple;
bh=qygzon9ZGomXvOHxs2jcZe0II7jq7w4SYlKKQPP37i4=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=WL7ulKBGewQDT/xb6zIev5s+2sfxaNfqELCezR2dR46GJbFx62QHNsg6O3V3bJZvlPDUDQaXDJQBPcAkaRwHnNSS384jhKyAAbVig5xM0flmZevgEqJD1cV/56Xo3m1EwuclunxYEKNi7+w2MGEwy9Ba2OEPDii51dqB5f+JL0A=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=savoirfairelinux.com; spf=pass smtp.mailfrom=savoirfairelinux.com; dkim=pass (2048-bit key) header.d=savoirfairelinux.com header.i=@savoirfairelinux.com header.b=wqKmuQgJ; arc=none smtp.client-ip=208.88.110.44
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=savoirfairelinux.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=savoirfairelinux.com
Received: from localhost (localhost [127.0.0.1])
by mail.savoirfairelinux.com (Postfix) with ESMTP id 2BA983D8579B;
Wed, 4 Jun 2025 10:08:38 -0400 (EDT)
Received: from mail.savoirfairelinux.com ([127.0.0.1])
by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10032)
with ESMTP id AShOL6JctYpF; Wed, 4 Jun 2025 10:08:37 -0400 (EDT)
Received: from localhost (localhost [127.0.0.1])
by mail.savoirfairelinux.com (Postfix) with ESMTP id 989CC3D85879;
Wed, 4 Jun 2025 10:08:37 -0400 (EDT)
DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com 989CC3D85879
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2;
t=1749046117; bh=Pz5WKHMCeRqhtLXzRHEnNCYyKPN9r9VGYTPK+PEEo5E=;
h=Date:From:To:Message-ID:MIME-Version;
b=wqKmuQgJtqMpRVLk0y+HRjAInmpa1C6fUgTK7DBGROL1WhiM6zfTqo86wrT9vAcBi
zSu00H04YFM3E8x40iuLR6KhYZsC7ggS5WbgUt9lyw3cCkA3reCs7vVbd+SQrQMxCn
oZ1zAOhdP1jEHzt05ov1O/HcAyxRGdy/e3ASKGrumKFgJVg7yLpC1DCig6VK0T27rX
VwSbVNc9io+F0Xts6K3N6IaV86zo6t3YJumigmcYY1wT6xUKJ6gn7Q9G0U/IaQN5xq
oCUW3Gny3duN42F19tr9mUILfbZnIc6Vk5lyNiTzVP6R4OjDC/pzHq6bbRaCTSt64O
QCk562L05HIkw==
X-Virus-Scanned: amavis at mail.savoirfairelinux.com
Received: from mail.savoirfairelinux.com ([127.0.0.1])
by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10026)
with ESMTP id kOFfdEsvz-Sa; Wed, 4 Jun 2025 10:08:37 -0400 (EDT)
Received: from fedora (unknown [192.168.51.254])
by mail.savoirfairelinux.com (Postfix) with ESMTPSA id 3FF763D8579B;
Wed, 4 Jun 2025 10:08:37 -0400 (EDT)
Date: Wed, 4 Jun 2025 10:08:36 -0400
From: Samuel Kayode <samuel.kayode@xxxxxxxxxxxxxxxxxxxx>
To: Markus Elfring <Markus.Elfring@xxxxxx>
Cc: linux-pm@xxxxxxxxxxxxxxx, devicetree@xxxxxxxxxxxxxxx,
linux-input@xxxxxxxxxxxxxxx, Mark Brown <broonie@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>,
Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Lee Jones <lee@xxxxxxxxxx>, Liam Girdwood <lgirdwood@xxxxxxxxx>,
Rob Herring <robh@xxxxxxxxxx>, Sebastian Reichel <sre@xxxxxxxxxx>,
LKML <linux-kernel@xxxxxxxxxxxxxxx>,
Abel Vesa <abelvesa@xxxxxxxxxx>, Abel Vesa <abelvesa@xxxxxxxxx>,
Enric Balletbo i Serra <eballetbo@xxxxxxxxx>,
Robin Gong <b38343@xxxxxxxxxxxxx>, Robin Gong <yibin.gong@xxxxxxx>
Subject: Re: [PATCH v3 5/6] power: supply: pf1550: add battery charger support
Message-ID: <aEBTZD1WmS14qoNc@fedora>
References: <20250527-pf1550-v3-5-45f69453cd51@xxxxxxxxxxxxxxxxxxxx>
<f5942d82-a7ce-46e1-ba13-ec2beef3403f@xxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <f5942d82-a7ce-46e1-ba13-ec2beef3403f@xxxxxx>
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Mon, Jun 02, 2025 at 08:44:04PM +0200, Markus Elfring wrote:
=E2=80=A6
> +++ b/drivers/power/supply/pf1550-charger.c
> @@ -0,0 +1,639 @@
=E2=80=A6
> +static void pf1550_charger_irq_work(struct work_struct *work)
> +{
=E2=80=A6
> + mutex_lock(&chg->mutex);
> +
> + for (i =3D 0; i < PF1550_CHARGER_IRQ_NR; i++) {
=E2=80=A6
> + mutex_unlock(&chg->mutex);
> +}
=E2=80=A6
=20
Under which circumstances would you become interested to apply a statem=
ent
like =E2=80=9Cguard(mutex)(&chg->mutex);=E2=80=9D?
https://elixir.bootlin.com/linux/v6.15/source/include/linux/mutex.h#L20=
1
I think it can be applied to v4 of this patch. I'll try it out and tag yo=
u on
the next version.
Thanks,
Sam
Return-Path: <linux-kernel+bounces-673321-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 247D541E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:09:18 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 231561890038
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:09:23 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id E7113290BAD;
Wed, 4 Jun 2025 14:09:00 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="gERBw3I/"
Received: from mail-yb1-f181.google.com (mail-yb1-f181.google.com [209.85.219.181])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 707DB1E52D
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:08:58 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.181
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749046140; cv=none; b=ka9+iLeEj+32cS6+NiMr8bdtUotxlrgPxRY8tdvJsx2IoF6MGm3Dx97m3R6k9/aKOqMOJJh2RPX4nO+uNSdjONSQ4rTAeYzc26GnXEChhu33OSDhBnObPdue+rFSD2g72aVZ5iAaQfJ76lLgq+vGKu4ATM9v2gg+fc97IlG3Dcc=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749046140; c=relaxed/simple;
bh=gOOWlCX1FpgYOZem8m3o9sFlBzYMOYduHrSfBZ/m3k0=;
h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
To:Cc:Content-Type; b=h9dJqY+NRx+6I6fIDqUXuEkCX6OahoMJ5k3xshGIHpn6E+JZrdD6o/RRm1X4Kdr6Doux9Xecit/kGCn+th0u8Ziobrx1Ojy1lplhSBRbQwcc4ixqIP5kmfKsdzk455fA6MiJ3ySS3k6578212QTV1km+GLCK6kmMtWMk/H+ig18=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=gERBw3I/; arc=none smtp.client-ip=209.85.219.181
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org
Received: by mail-yb1-f181.google.com with SMTP id 3f1490d57ef6-e817ac96e87so711779276.3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 07:08:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=linaro.org; s=google; t=1749046137; x=1749650937; darn=vger.kernel.org;
h=cc:to:subject:message-id:date:from:in-reply-to:references
:mime-version:from:to:cc:subject:date:message-id:reply-to;
bh=bCKMLvfrG58EXYW/q3xMdTa1ro6Bjgf7O9LMZV8k7Fg=;
b=gERBw3I/uRvzah26Ks6yrsFmAGUwdgbR/vhjn3pYabYRtf7KNBuZvRCzPbDOn80R52
6YykBUvUXRZ4K3w7h3bdcumHrrpXhzL43TB29ppeD5dJkyu1EoQrpztuA4JhEI+5E/Es
cmlWOqTEY0YZcq9Nuw39yFADRNNXjBgnqZTM0TSE0Flj80SnPHqdgFP+++Jsp/M8IVTa
2MFO1CtradtwwzcYYpRGNTi5aASzT5f+xdLsEyG8XUHhW9nLqxESSVNoVVNhGfpvJnoD
VuvfwbJQr2QO6crf2T+SSYc+7GpNbNiRfOBiCowswfTPLimDv8/EIcCKMZlDmeuI+Rq4
d8rQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749046137; x=1749650937;
h=cc:to:subject:message-id:date:from:in-reply-to:references
:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=bCKMLvfrG58EXYW/q3xMdTa1ro6Bjgf7O9LMZV8k7Fg=;
b=LJJ/fE5lpq62Fy+z4F/se6ptR9e8uUOaivkQEGEVOJQ60OGBKGPqhaDC69AgE/3BIo
Lred9awW6HH3J+fOx8909oJ+sWb5dHTyByGcHwTpYlMm3jx5WhGP1lxQ0Fnb0tq/CTP6
4UtoVp0NG1hSBEmCuuWGzL34AKKRDo33U4OGt0m997w/Ib6YJBDF5Rgiht8YZCYP7sG4
4Dy2m1Pe9q9RZTdX1XKRQ76jFyx9R6Xi14irelykMadJYt0bL3HaM6Gn+PrSNi5co9Fn
SYNSD8kpu8TncgP98EulKY0a5CJ+MwqL/pBQMqKIla6m4bpP2c13/q8Lu3hnsNeBTUrC
HdXg==
X-Forwarded-Encrypted: i=1; AJvYcCXPRS+afg6l+zCVTdBHc48IuMnnOKWVTtTIPgiYu7ZtO1p/RiJtwa7w6KEBvB6eJvlJXV3UvtvTvV0ImpE=@vger.kernel.org
X-Gm-Message-State: AOJu0YyBU2XbIHfu753AugFHNgOiI210mzopA0Uaxu61y3dAVzj2z6qq
VO171EaqESulP3gMGqT8Ntu3wD9dxQjwAIKKeVcWED++GR19OkkGtw8JY2OZ0AL0pI2AuiKTber
HoVpIHmYBgILVxVAHQCIyjSrjsV5EhFfuerdpK/N07w==
X-Gm-Gg: ASbGncuZyXlkJywEbGAlJbufFbFETtCtu7TU3EwKwtIYmcRX77o26vC3B+NrkXffCGC
EgU0T+THqXBdQNSez9D5cFpiZdwOvvN/Ir70soUyT0dwl1m2/5CK6oZPqFcFI22/CubLNbus4Jf
cNplmjfg7wy8kzyu0Pln/NZ7yWy7KHxDwJNw==
X-Google-Smtp-Source: AGHT+IH1uN9PQBI4TxvQgOMEHLZAQqYAI1FFT1QA2Z54eVoaJJVTZCIulnmyyn43PiYP3CgChRHTn+sbXKdyr+ZK87c=
X-Received: by 2002:a05:6902:2291:b0:e81:8639:c5aa with SMTP id
3f1490d57ef6-e818639ce67mr1014126276.32.1749046137370; Wed, 04 Jun 2025
07:08:57 -0700 (PDT)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
References: <20250410-sets-bxs-4-64-patch-v1-v6-0-eda620c5865f@xxxxxxxxxx> <20250410-sets-bxs-4-64-patch-v1-v6-5-eda620c5865f@xxxxxxxxxx>
In-Reply-To: <20250410-sets-bxs-4-64-patch-v1-v6-5-eda620c5865f@xxxxxxxxxx>
From: Ulf Hansson <ulf.hansson@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 16:08:21 +0200
X-Gm-Features: AX0GCFvzY5vbkEIzVaD80QV5URTGeK5dhN_mN9Qk3_Vhcas3hbWoHL7IT58BST4
Message-ID: <CAPDyKFpKkSb=kGn4y18uFy9uhxFkjt7Gi2bUAzzqGnyUtTAoMg@xxxxxxxxxxxxxx>
Subject: Re: [PATCH v6 05/18] drm/imagination: Add power domain control
To: Matt Coster <matt.coster@xxxxxxxxxx>
Cc: Frank Binns <frank.binns@xxxxxxxxxx>, David Airlie <airlied@xxxxxxxxx>,
Simona Vetter <simona@xxxxxxxx>, Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>,
Maxime Ripard <mripard@xxxxxxxxxx>, Thomas Zimmermann <tzimmermann@xxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>, Nishanth Menon <nm@xxxxxx>,
Vignesh Raghavendra <vigneshr@xxxxxx>, Tero Kristo <kristo@xxxxxxxxxx>, dri-devel@xxxxxxxxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, Randolph Sapp <rs@xxxxxx>,
Darren Etheridge <detheridge@xxxxxx>, Michal Wilczynski <m.wilczynski@xxxxxxxxxxx>,
Alessio Belle <alessio.belle@xxxxxxxxxx>, Alexandru Dadu <alexandru.dadu@xxxxxxxxxx>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Thu, 10 Apr 2025 at 12:12, Matt Coster <matt.coster@xxxxxxxxxx> wrote:
The first supported GPU only used a single power domain so this was
automatically handled by the device runtime.
In order to support multiple power domains, they must be enumerated from
devicetree and linked to both the GPU device and each other to ensure
correct power sequencing at start time.
For all Imagination Rogue GPUs, power domains are named "a", "b", etc. and
the sequence A->B->... is always valid for startup with the reverse true
for shutdown. Note this is not always the *only* valid sequence, but it's
simple and does not require special-casing for different GPU power
topologies.
Signed-off-by: Matt Coster <matt.coster@xxxxxxxxxx>
Reviewed-by: Frank Binns <frank.binns@xxxxxxxxxx>
Realize that I am a bit late to this, but I was recently pointed to
this commit [1] by Michal.
[...]
+
+int pvr_power_domains_init(struct pvr_device *pvr_dev)
+{
+ struct device *dev = from_pvr_device(pvr_dev)->dev;
+
+ struct device_link **domain_links __free(kfree) = NULL;
+ struct device **domain_devs __free(kfree) = NULL;
+ int domain_count;
+ int link_count;
+
+ char dev_name[2] = "a";
It's certainly good to use a name to be future proof, but we should at
least try to pick a somewhat descriptive name for what this PM domain
is used for.
Moreover, this requires a corresponding update to the DT docs.
+ int err;
+ int i;
+
+ domain_count = of_count_phandle_with_args(dev->of_node, "power-domains",
+ "#power-domain-cells");
+ if (domain_count < 0)
+ return domain_count;
+
+ if (domain_count <= 1)
+ return 0;
+
+ link_count = domain_count + (domain_count - 1);
+
+ domain_devs = kcalloc(domain_count, sizeof(*domain_devs), GFP_KERNEL);
+ if (!domain_devs)
+ return -ENOMEM;
+
+ domain_links = kcalloc(link_count, sizeof(*domain_links), GFP_KERNEL);
+ if (!domain_links)
+ return -ENOMEM;
+
+ for (i = 0; i < domain_count; i++) {
+ struct device *domain_dev;
+
+ dev_name[0] = 'a' + i;
+ domain_dev = dev_pm_domain_attach_by_name(dev, dev_name);
+ if (IS_ERR_OR_NULL(domain_dev)) {
+ err = domain_dev ? PTR_ERR(domain_dev) : -ENODEV;
+ goto err_detach;
+ }
+
+ domain_devs[i] = domain_dev;
+ }
+
+ for (i = 0; i < domain_count; i++) {
+ struct device_link *link;
+
+ link = device_link_add(dev, domain_devs[i], DL_FLAG_STATELESS | DL_FLAG_PM_RUNTIME);
+ if (!link) {
+ err = -ENODEV;
+ goto err_unlink;
+ }
+
+ domain_links[i] = link;
+ }
+
+ for (i = domain_count; i < link_count; i++) {
+ struct device_link *link;
+
+ link = device_link_add(domain_devs[i - domain_count + 1],
+ domain_devs[i - domain_count],
+ DL_FLAG_STATELESS | DL_FLAG_PM_RUNTIME);
+ if (!link) {
+ err = -ENODEV;
+ goto err_unlink;
+ }
+
+ domain_links[i] = link;
+ }
Most of the code above (and the error/remove-path) can be considered
as boiler-plate code and can be replaced by using
devm_pm_domain_attach_list() instead.
[...]
Kind regards
Uffe
[1]
https://lore.kernel.org/all/a68e3bee-f4ad-4d73-a5a8-e39772c41711@xxxxxxxxxxx/
Return-Path: <linux-kernel+bounces-673322-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id AE05C41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:10:21 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 8BB331897FAC
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:10:30 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id AB8A5290BB0;
Wed, 4 Jun 2025 14:10:04 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="CT2N6f/E"
Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 291F02900B0;
Wed, 4 Jun 2025 14:10:00 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749046203; cv=none; b=unDzUR9Buu4Vnc+XwfXBroHeMhdPVWZRB6OFjeXrzX2SgObt20oPnqM5YAwfa6715Mj8e5/ADuNeVZPe5UOYMGLZ+HxZUjhw80MUIk97SrqHhLf2zhMne1wZcs6Gm6ylCbKvBWySUZlrnx8QDlkoEI8msozCZLWTaIUFtnisHvY=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749046203; c=relaxed/simple;
bh=B2ABg1wz3GCV/5nlluOeLv+jcW/anS6JFpPQBFpgC+Y=;
h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From:
In-Reply-To:Content-Type; b=AWF1gIs4Pm5x9fXBA/imRQcuOKN2KLxxNLQpyruw9/39yaKV+/vF3y5hu6PtO0fN88c5fcWwLfcRNVs1kmHfwBS08ivAjrYNpR/MwLwh2S8aLraghTlVk2RIGQtrfAFLLgcxFyit+6VbVZOaxPIcgGNjjar7Z5rcenwVoINwwsM=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=CT2N6f/E; arc=none smtp.client-ip=205.220.168.131
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com
Received: from pps.filterd (m0279864.ppops.net [127.0.0.1])
by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5548ObLq013606;
Wed, 4 Jun 2025 14:09:56 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=
cc:content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=qcppdkim1; bh=
7Lm/hVQBqxHZuoTLZRaf4HoCuxZUf0ilzEKB6T/CUQc=; b=CT2N6f/E18W/8Xnm
qdlOmx8mcFFma8nJKf16rTU4cuP0arw+4BxBvjUSTnvRZmLkaBkxVEPvjHm2tMpx
NGYVd7Q8x3Oxs54720vx+nSOhZBrOw6pAmyU4HXXWb+WwsxOfteFWllGjRmKMGH7
N14XRoQpubN5xntluyAgm6gQsC+oCED6xMbUtjB3mZvUFtD41efqbozMmO/yGJtS
M5s2FEtNVgeyPEzQ4TeYHyOPKyxViE96+4vdBNvqdiycGka48ly8zDebJaNCd4QE
XSCJkmQKHW/O8w9sUudZ+teggUWJL3u7Cbmrru7JHYvA/5QZ/XfkwhwNvXn7s8fN
sxLzsQ==
Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254])
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 471g8np8vq-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 14:09:55 +0000 (GMT)
Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139])
by NASANPPMTA04.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 554E9tZl018095
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 4 Jun 2025 14:09:55 GMT
Received: from [10.216.5.91] (10.80.80.8) by nasanex01c.na.qualcomm.com
(10.45.79.139) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Wed, 4 Jun 2025
07:09:49 -0700
Message-ID: <0daf396a-29af-458b-a7ba-3b711b22cde9@xxxxxxxxxxx>
Date: Wed, 4 Jun 2025 19:39:45 +0530
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v5 5/8] serial: qcom-geni: move resource control logic to
separate functions
To: Bryan O'Donoghue <bryan.odonoghue@xxxxxxxxxx>,
Greg Kroah-Hartman
<gregkh@xxxxxxxxxxxxxxxxxxx>,
Jiri Slaby <jirislaby@xxxxxxxxxx>, Rob Herring
<robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Conor Dooley
<conor+dt@xxxxxxxxxx>,
Bjorn Andersson <andersson@xxxxxxxxxx>,
Konrad Dybcio
<konradybcio@xxxxxxxxxx>,
<linux-arm-msm@xxxxxxxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>,
<linux-serial@xxxxxxxxxxxxxxx>, <devicetree@xxxxxxxxxxxxxxx>
CC: <psodagud@xxxxxxxxxxx>, <djaggi@xxxxxxxxxxx>, <quic_msavaliy@xxxxxxxxxxx>,
<quic_vtanuku@xxxxxxxxxxx>, <quic_arandive@xxxxxxxxxxx>,
<quic_mnaresh@xxxxxxxxxxx>, <quic_shazhuss@xxxxxxxxxxx>
References: <20250506180232.1299-1-quic_ptalari@xxxxxxxxxxx>
<vTOsjvsB7oSpu2Oe8i1ufoz5C2Hy3EtfDnfBsLag2p-s63J0BLdqbLn44Hds17WR12JGfo7sd52k7uHaXlTTeQ==@protonmail.internalid>
<20250506180232.1299-6-quic_ptalari@xxxxxxxxxxx>
<f912588b-fb54-4257-a4d8-db58e93b8378@xxxxxxxxxx>
<y41ikVJ5uSSaGZHmqsvTm9akz3EUUT7X6dTPrfSuIYqGmMdlEfPRWqPA630jmsEzwC-6JSgYRPobg4e933PgxA==@protonmail.internalid>
<afe41159-00e4-45d1-857f-0a68f6fc6c8e@xxxxxxxxxx>
<6b7ca51a-241a-49fc-8aac-da5af96b5e10@xxxxxxxxxx>
Content-Language: en-US
From: Praveen Talari <quic_ptalari@xxxxxxxxxxx>
In-Reply-To: <6b7ca51a-241a-49fc-8aac-da5af96b5e10@xxxxxxxxxx>
Content-Type: text/plain; charset="UTF-8"; format=flowed
Content-Transfer-Encoding: 8bit
X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To
nasanex01c.na.qualcomm.com (10.45.79.139)
X-QCInternal: smtphost
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085
X-Proofpoint-GUID: z6yQMhYhryW_9wQWU3XXftpSRpkf-1-M
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDEwOCBTYWx0ZWRfX5rwUcoh+0KBv
iU3XtrSQV03RVhFbdGSS06rO+6Yl5KW4J5JEcYJ4EgmWoigHVuRRgIOYSydQOVsbWGn8N62ubUx
ubZ31D9nDwTftLiemlHqNzxfnLOmssps7IIar7MOiBEDlljfGDVQHkDEjNXYceH30tKyLZYIQrA
Di4btjY9ZWWMbbu5N8TrpJKT3ZeAYHV9ghXKBBKf4eY88EcEwN4Y9XuRiPjKNRl35NF+aVqPzcO
DLr8ioW3tUePu2xXuNcy+yqYZcGZwaYEQmzc88sHTC0Q7yy5oXrHkecPX2/j3TTkiCt1EE8zKsR
5ILjQqrrgFFvIjIszrMJPZNPtEJDPmbmtKZw4zZLiwvxdsF/Yt466uVDnmI0drn7o/JisI7RuRt
kOdF3zta9ky+mvmax9SbQ0pBtevYmThJb0TmQUJpMbQonwvwE6a2MmvLPgL7fufKyu1S8exy
X-Proofpoint-ORIG-GUID: z6yQMhYhryW_9wQWU3XXftpSRpkf-1-M
X-Authority-Analysis: v=2.4 cv=UphjN/wB c=1 sm=1 tr=0 ts=684053b3 cx=c_pps
a=JYp8KDb2vCoCEuGobkYCKw==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17
a=GEpy-HfZoHoA:10 a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10 a=KKAkSRfTAAAA:8
a=s5ISWN8GRDGLSXsRgHIA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10
a=cvBusfyB2V15izCimMoJ:22
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
priorityscore=1501 spamscore=0 impostorscore=0 lowpriorityscore=0
phishscore=0 mlxlogscore=999 clxscore=1015 malwarescore=0 adultscore=0
bulkscore=0 mlxscore=0 suspectscore=0 classifier=spam authscore=0 authtc=n/a
authcc= route=outbound adjust=0 reason=mlx scancount=1
engine=8.19.0-2505280000 definitions=main-2506040108
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hi Bryan
On 6/3/2025 8:16 PM, Bryan O'Donoghue wrote:
On 03/06/2025 15:29, Bryan O'Donoghue wrote:
On 03/06/2025 15:28, Bryan O'Donoghue wrote:
2.17.1
Assuming you address my points.
[sic]
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@xxxxxxxxxx>
Oh please fix this in the next version
can i fix this in separate patch since i haven't touch these two lines
or
fix within same patch?
Thanks,
Praveen Talari
checkpatch.pl --strict mypatch.patch
CHECK: Alignment should match open parenthesis
#92: FILE: drivers/tty/serial/qcom_geni_serial.c:1675:
+ else if (new_state == UART_PM_STATE_OFF &&
+ old_state == UART_PM_STATE_ON)
total: 0 errors, 0 warnings, 1 checks, 71 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or
--fix-inplace.
0005-serial-qcom-geni-move-resource-control-logic-to-sepa.patch has
style problems, please review.
---
bod
Return-Path: <linux-kernel+bounces-673323-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id C8EEA41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:10:38 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 8E6F71888745
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:10:52 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id E7733290BBA;
Wed, 4 Jun 2025 14:10:30 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dlvsPzPX"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2CE452397B0;
Wed, 4 Jun 2025 14:10:29 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749046230; cv=none; b=rMnIQczEPewX6crrIdg72O5eVeqGzpe8ZdpQUM9wgLe9QjAoMVBgW7hjJRAzVSMV4wZhP0/7fBvjhfY+i+P7QmIRy4LbreFyC7r6kn66jTIrTnsXX1IEYi4rX5CPiC6EZC6gsvxNCpFptA98qqYKRHVzSM9Q/JJZq4j8Hlzhu8Q=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749046230; c=relaxed/simple;
bh=HqA+R87orsdoOs/Jn/ihLSl7JTKNEUTdR/FSCbhLcWI=;
h=Message-ID:Date:MIME-Version:Subject:To:References:From:
In-Reply-To:Content-Type; b=bbCP3U8v7JOfA+EgFXUee2jsYUKCa9wYuE9/BmUbnZmbvhZ37PpiHVsXsfmcMgQrOn9cTX5lBJ+1wf7fSnzMVe8RfGO4w5jt8aivTHHVOJWDxjX8MP2WuyMpfRFG3i8E/aJYEuiId0P+9Pv7kTrvlApQjhG7LtSXqXx4tLXDwHI=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dlvsPzPX; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95DEAC4CEE4;
Wed, 4 Jun 2025 14:10:26 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749046229;
bh=HqA+R87orsdoOs/Jn/ihLSl7JTKNEUTdR/FSCbhLcWI=;
h=Date:Subject:To:References:From:In-Reply-To:From;
b=dlvsPzPXxvOn01+Cp2ZTrilk+OhUKFB01Gf4MRV73nMpG42WChW4A8lycFTpHSzBo
0eyEdxSXRSL+MAkK5DkeMTLq2WezLO5p+UwNEOefFbRNaUr5NsuAHUeBWfnjVacKtD
2kPLQqkuVPLvMHr9pllpwL7wzemK+C/sDkX7qh2pBGSwDTgI3dSZxCja+d80m4ZXqW
qBPxkdIkOAUkgzylc/AW1H38qRjCL5Gu4v8vPoT/kuozlGEHegUpvgMUSYA65oOEY2
XdyvS6VeFNY9x7UnDFRKVkADLtpli/B47K6U7dLi6FBA8LsF92UcLMBIli9n7HFd/5
y6WMqZz2b87gQ==
Message-ID: <9bf60780-30fa-4ac1-88cf-8964f1ade593@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 16:10:24 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v2 0/2] ASPEED: Add mailbox driver for AST2700 series
To: Jammy Huang <jammy_huang@xxxxxxxxxxxxxx>,
"jassisinghbrar@xxxxxxxxx" <jassisinghbrar@xxxxxxxxx>,
"robh@xxxxxxxxxx" <robh@xxxxxxxxxx>, "krzk+dt@xxxxxxxxxx"
<krzk+dt@xxxxxxxxxx>, "conor+dt@xxxxxxxxxx" <conor+dt@xxxxxxxxxx>,
"joel@xxxxxxxxx" <joel@xxxxxxxxx>,
"andrew@xxxxxxxxxxxxxxxxxxxx" <andrew@xxxxxxxxxxxxxxxxxxxx>,
"devicetree@xxxxxxxxxxxxxxx" <devicetree@xxxxxxxxxxxxxxx>,
"linux-arm-kernel@xxxxxxxxxxxxxxxxxxx"
<linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>,
"linux-aspeed@xxxxxxxxxxxxxxxx" <linux-aspeed@xxxxxxxxxxxxxxxx>,
"linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>
References: <20250604125558.1614523-1-jammy_huang@xxxxxxxxxxxxxx>
<e967473f-f1cc-42d8-9786-437f52db4162@xxxxxxxxxx>
<SEZPR06MB65691F4A1A28AC189D38A55EF16CA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
From: Krzysztof Kozlowski <krzk@xxxxxxxxxx>
Content-Language: en-US
Autocrypt: addr=krzk@xxxxxxxxxx; keydata=
xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79
cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu
JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH
gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE
J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj
NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS
BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU
vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM
Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD
TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzSVLcnp5c3p0b2Yg
S296bG93c2tpIDxrcnprQGtlcm5lbC5vcmc+wsGVBBMBCgA/AhsDBgsJCAcDAgYVCAIJCgsE
FgIDAQIeAQIXgBYhBJvQfg4MUfjVlne3VBuTQ307QWKbBQJoF1BKBQkWlnSaAAoJEBuTQ307
QWKbHukP/3t4tRp/bvDnxJfmNdNVn0gv9ep3L39IntPalBFwRKytqeQkzAju0whYWg+R/rwp
+r2I1Fzwt7+PTjsnMFlh1AZxGDmP5MFkzVsMnfX1lGiXhYSOMP97XL6R1QSXxaWOpGNCDaUl
ajorB0lJDcC0q3xAdwzRConxYVhlgmTrRiD8oLlSCD5baEAt5Zw17UTNDnDGmZQKR0fqLpWy
786Lm5OScb7DjEgcA2PRm17st4UQ1kF0rQHokVaotxRM74PPDB8bCsunlghJl1DRK9s1aSuN
hL1Pv9VD8b4dFNvCo7b4hfAANPU67W40AaaGZ3UAfmw+1MYyo4QuAZGKzaP2ukbdCD/DYnqi
tJy88XqWtyb4UQWKNoQqGKzlYXdKsldYqrLHGoMvj1UN9XcRtXHST/IaLn72o7j7/h/Ac5EL
8lSUVIG4TYn59NyxxAXa07Wi6zjVL1U11fTnFmE29ALYQEXKBI3KUO1A3p4sQWzU7uRmbuxn
naUmm8RbpMcOfa9JjlXCLmQ5IP7Rr5tYZUCkZz08LIfF8UMXwH7OOEX87Y++EkAB+pzKZNNd
hwoXulTAgjSy+OiaLtuCys9VdXLZ3Zy314azaCU3BoWgaMV0eAW/+gprWMXQM1lrlzvwlD/k
whyy9wGf0AEPpLssLVt9VVxNjo6BIkt6d1pMg6mHsUEVzsFNBFVDXDQBEADNkrQYSREUL4D3
Gws46JEoZ9HEQOKtkrwjrzlw/tCmqVzERRPvz2Xg8n7+HRCrgqnodIYoUh5WsU84N03KlLue
MNsWLJBvBaubYN4JuJIdRr4dS4oyF1/fQAQPHh8Thpiz0SAZFx6iWKB7Qrz3OrGCjTPcW6ei
OMheesVS5hxietSmlin+SilmIAPZHx7n242u6kdHOh+/SyLImKn/dh9RzatVpUKbv34eP1wA
GldWsRxbf3WP9pFNObSzI/Bo3kA89Xx2rO2roC+Gq4LeHvo7ptzcLcrqaHUAcZ3CgFG88CnA
6z6lBZn0WyewEcPOPdcUB2Q7D/NiUY+HDiV99rAYPJztjeTrBSTnHeSBPb+qn5ZZGQwIdUW9
YegxWKvXXHTwB5eMzo/RB6vffwqcnHDoe0q7VgzRRZJwpi6aMIXLfeWZ5Wrwaw2zldFuO4Dt
91pFzBSOIpeMtfgb/Pfe/a1WJ/GgaIRIBE+NUqckM+3zJHGmVPqJP/h2Iwv6nw8U+7Yyl6gU
BLHFTg2hYnLFJI4Xjg+AX1hHFVKmvl3VBHIsBv0oDcsQWXqY+NaFahT0lRPjYtrTa1v3tem/
JoFzZ4B0p27K+qQCF2R96hVvuEyjzBmdq2esyE6zIqftdo4MOJho8uctOiWbwNNq2U9pPWmu
4vXVFBYIGmpyNPYzRm0QPwARAQABwsF8BBgBCgAmAhsMFiEEm9B+DgxR+NWWd7dUG5NDfTtB
YpsFAmgXUF8FCRaWWyoACgkQG5NDfTtBYptO0w//dlXJs5/42hAXKsk+PDg3wyEFb4NpyA1v
qmx7SfAzk9Hf6lWwU1O6AbqNMbh6PjEwadKUk1m04S7EjdQLsj/MBSgoQtCT3MDmWUUtHZd5
RYIPnPq3WVB47GtuO6/u375tsxhtf7vt95QSYJwCB+ZUgo4T+FV4hquZ4AsRkbgavtIzQisg
Dgv76tnEv3YHV8Jn9mi/Bu0FURF+5kpdMfgo1sq6RXNQ//TVf8yFgRtTUdXxW/qHjlYURrm2
H4kutobVEIxiyu6m05q3e9eZB/TaMMNVORx+1kM3j7f0rwtEYUFzY1ygQfpcMDPl7pRYoJjB
dSsm0ZuzDaCwaxg2t8hqQJBzJCezTOIkjHUsWAK+tEbU4Z4SnNpCyM3fBqsgYdJxjyC/tWVT
AQ18NRLtPw7tK1rdcwCl0GFQHwSwk5pDpz1NH40e6lU+NcXSeiqkDDRkHlftKPV/dV+lQXiu
jWt87ecuHlpL3uuQ0ZZNWqHgZoQLXoqC2ZV5KrtKWb/jyiFX/sxSrodALf0zf+tfHv0FZWT2
zHjUqd0t4njD/UOsuIMOQn4Ig0SdivYPfZukb5cdasKJukG1NOpbW7yRNivaCnfZz6dTawXw
XRIV/KDsHQiyVxKvN73bThKhONkcX2LWuD928tAR6XMM2G5ovxLe09vuOzzfTWQDsm++9UKF a/A=
In-Reply-To: <SEZPR06MB65691F4A1A28AC189D38A55EF16CA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 04/06/2025 15:07, Jammy Huang wrote:
On 04/06/2025 14:55, Jammy Huang wrote:
Add mailbox controller driver for AST27XX SoCs, which provides
independent tx/rx mailbox between different processors. There are 4
channels for each tx/rx mailbox and each channel has an 32-byte FIFO.
v2 changes:
- Update document
This is vague. What did you update there?
Sorry, let me supply some information as below.
1. Correct error in dts example.
2. Drop description for mbox-cell as you suggested previously.
Then please write proper, descriptive changelogs. I am sure U asked
Aspeed that already.
Best regards,
Krzysztof
Return-Path: <linux-kernel+bounces-673324-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 4A3FC41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:11:09 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 0E2DE1887D36
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:11:22 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 4D67A290BC4;
Wed, 4 Jun 2025 14:10:59 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MIj7V4Ul"
Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 391852900B7;
Wed, 4 Jun 2025 14:10:56 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.48
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749046258; cv=none; b=ohsEZu9JkreNeQnRm+ocTKeowX+q6zUYbNqc5JsHQtT8n0Iy5mc1YU8L1/gJ2wPKxzFIG+NE5pwFJQ1LaoQwD+KZvb0Gd9E+xIbEZGsWdzaQz3S7JGFY3sDl+1y3CpBb6Hifo8Fo2cIaQdWSNPtuF3tm3PE3+SNjC6OvH66+His=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749046258; c=relaxed/simple;
bh=gb6i8ixhdEJTCsrYUor/DxYu+KnWObvlCHIlRhFnFY8=;
h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
To:Cc:Content-Type; b=TOkHLa5YSyEcxI9KRmAqsJVA6FdtFx3QsiwsBFQ2E/hg0G2ryaVZddEPVBt0Pb9YtVXjd40C5q5XlsowqmkkUO7RqwKTsqydEt1vILqig4nhn/Ykec8jfAJ6NPEE/grhDUKQ7paASY6ex7BaSV9pQB644ZCMPFEMS3njGVixrtY=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=MIj7V4Ul; arc=none smtp.client-ip=209.85.216.48
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
Received: by mail-pj1-f48.google.com with SMTP id 98e67ed59e1d1-309fac646adso975937a91.1;
Wed, 04 Jun 2025 07:10:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1749046256; x=1749651056; darn=vger.kernel.org;
h=cc:to:subject:message-id:date:from:in-reply-to:references
:mime-version:from:to:cc:subject:date:message-id:reply-to;
bh=gb6i8ixhdEJTCsrYUor/DxYu+KnWObvlCHIlRhFnFY8=;
b=MIj7V4UlvgzIklIYTK7TvnQ5OkhxBjzOMoVmZDGHboTlqLlhXVnwsW+sYRs98yX07D
1sceRB5S9FAMLj7KigRfc4Z8nfsAWJKFEKD8a8QOg54LUpspahRhj6BXS/iJW8+C6Ju+
4m6lWw1Af0bsgGrGkDkWeMRW4ik/pJz9PU4eIPqVaOTJ9rMwdzFkcS1pf2MqVWVnaCn8
hmCzOi6E4znpxV0dsfGh7yVzjQG39kgYbhx1icjOWD3fwsMcyDJKY6ixM9En3cTZZWZE
A5T8YBJQ/+6+98tPWDfjoxGLuLDfekjL0nYzg0OnsnOIBb++C7lxSj2l6PPITAgL+rvA
aOtg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749046256; x=1749651056;
h=cc:to:subject:message-id:date:from:in-reply-to:references
:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=gb6i8ixhdEJTCsrYUor/DxYu+KnWObvlCHIlRhFnFY8=;
b=cW2AOry4ywiPfkdnHEt18VGQQLAMM7vFh3pQQGEJwLhwKi0O5D2EgROqjkNt846+pz
F2LHH01B8ZpVZsFXryQXUWzkjx9hTTVIcedGWnF+F6F8BHsC3vYmGAFhjZ3BHSdE0RhC
9p3DG27+5e0N/LOiIkXeph1yrD9onNcZtQzsesPXLDUjqeFey4WhIYJKEzZz2J5S9A2F
PhJVsttbFgp7Z6OSNlsSM9AF6jAI5VFGzYs0K31IXCJ/wxR+HqH+9s99R3TDq0EPEfEp
9s9hT0wkSbq5fC392yRXryZLPeT5eJgaCe3G5j9otI9KaD3RFV6hNK082CjOvwtZ0ZLV
X6ug==
X-Forwarded-Encrypted: i=1; AJvYcCV+fvq7BBoBVXNwEP6qtS8GwMirpd4IXu4eWKF+MPstK1TAXuYlB7qbU1qSe1MRMVqWAAr/OLch@xxxxxxxxxxxxxxx, AJvYcCXnrP27Uvx5e8qblMcHVBbC5GvAY9cUIXF+LOeJpHK6O3IUMbsuL/IEWl7pqpG93waBI7sNJ6rCdz4YPtU=@vger.kernel.org
X-Gm-Message-State: AOJu0Yy45yDVS1G5nSVgyucVgzdbubGr10D+QY7MhwGXyfALFJtlk8ac
46f0kvdxMSLHUyPKwN8MPm8YdK3c/+3+SHDsCAYiAWzbNB5vWBpvYEVqEnu2kmc0W06nRh72z99
wjuIOQ4NPUnHHhkoGtZFW57Y2QQ594Zs=
X-Gm-Gg: ASbGncupw03WzI7CdpENmpvmk1IHkRvAk1RuoZ48YmxCoq7NpFKpxyRq7XMdwMBXsLd
05vfVPLKvEmMaqzBYnfWKra7hSL+UF7/AnzVJ0I7luyWPkrJ8sWnKVuTxH/8VbkWEZYNt3eb1tE
YfNLUp9jmHP1ny0GFfMhKgscVLRMwvisXXlio=
X-Google-Smtp-Source: AGHT+IEGbimpeZ4Qs+yGgWh6cNi2oO72hjcngLwtcweFhvIvhJH7pUzxZ0sWe052vRx5DrKFRVhqTJGUJMiwZNAU7KE=
X-Received: by 2002:a17:90b:51c3:b0:2ff:556f:bf9 with SMTP id
98e67ed59e1d1-3130da33e3bmr4158050a91.4.1749046256255; Wed, 04 Jun 2025
07:10:56 -0700 (PDT)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
References: <20250520160717.7350-1-aha310510@xxxxxxxxx> <20250522145037.4715a643@xxxxxxxxxx>
<CAO9qdTHuDb9Uqu3zqjnV6PdX9ExWv24Q9_JfQ8FbKigipDrN+Q@xxxxxxxxxxxxxx> <20250527104202.7fbb916c@xxxxxxxxxx>
In-Reply-To: <20250527104202.7fbb916c@xxxxxxxxxx>
From: Jeongjun Park <aha310510@xxxxxxxxx>
Date: Wed, 4 Jun 2025 23:10:59 +0900
X-Gm-Features: AX0GCFuxsnioAEkavhQj-4D8j5tuc9AFppLgy6Him-R1TfbjP66-gtiNDfEjve4
Message-ID: <CAO9qdTEjQ5414un7Yw604paECF=6etVKSDSnYmZzZ6Pg3LurXw@xxxxxxxxxxxxxx>
Subject: Re: [PATCH v2] ptp: remove ptp->n_vclocks check logic in ptp_vclock_in_use()
To: Jakub Kicinski <kuba@xxxxxxxxxx>
Cc: richardcochran@xxxxxxxxx, andrew+netdev@xxxxxxx, davem@xxxxxxxxxxxxx,
edumazet@xxxxxxxxxx, pabeni@xxxxxxxxxx, yangbo.lu@xxxxxxx,
netdev@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
Content-Type: text/plain; charset="UTF-8"
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Jakub Kicinski <kuba@xxxxxxxxxx> wrote:
On Mon, 26 May 2025 20:00:53 +0900 Jeongjun Park wrote:
> If you need to check n_vclocks when checking
> whether ptp virtual clock is in use, it means that caller function has
> already performed work related to n_vclocks, and in this case, it is
> appropriate to perform n_vclocks check and n_vclocks_mux lock in caller
> function.
Can you be a little less abstract in this explanation, given that
ptp_vclock_in_use() only has a handful of callers?
For ptp_clock_freerun() do you mean the ->has_cycles check?
There are two main cases where we need to check if ptp vclock is in use:
1. Check if ptp clock shall be free running (ptp_clock_freerun)
2. Check if ptp clock can be unregistered (ptp_clock_unregister)
In the first case, If I'm not misreading the code, ptp_clock_freerun()
determines whether it can run based on the result of ptp_vclock_in_use()
if ptp->has_cycles is false.
However, ptp_clock_{set,adj}time() , which calls ptp_clock_freerun(),
does not use n_vclocks . Therefore, it would be more appropriate to
remove unnecessary lock and n_vclocks checks when calling these
functions, both to prevent false positives in lockdep and to reduce
performance overhead.
And in the second case as well, there is no need to check n_vclocks in
every caller function. Because n_vclocks itself is a concept added for
physical/virtual clocks conversion in ptp physical clock sysfs, functions
other than sysfs actually do not need to check n_vclocks. Moreover,
since ptp_clock_unregister() is called by many functions, locking
n_vclocks_mux and checking n_vclocks when called by a function that
does not use n_vclocks causes performance overhead.
Therefore, after reviewing from various aspects, I think that the
unnecessary n_vclocks check and n_vclocks_mux lock in ptp_vclock_in_use()
should be removed to prevent false lockdep detection and performance
overhead, and it is more appropriate to change the n_vclocks check to be
performed first in the function that actually uses n_vclocks.
Return-Path: <linux-kernel+bounces-673325-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id E10D041E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:11:23 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id C94F63A7855
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:10:59 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 0D793290D94;
Wed, 4 Jun 2025 14:11:06 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ho+WukD5"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 498E32900B7;
Wed, 4 Jun 2025 14:11:04 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749046265; cv=none; b=gjJUZzfLdGbSj+QdQ0VbsmsUpk0BeQiq6n2kR8AwGLdvBs1vegEZLJsIb5V8RrfqspnVABe205kfrwctx8PbeNo59r4OzNYk6hX+JlPnz2Rq1jRjghBlLVYTvqfCx40Sj+T7Q2Fyor7LhGyhdCGY9o8J66TatGM9A5kkx641z+M=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749046265; c=relaxed/simple;
bh=QHd963OG136C8dBtaEAon6yYYj9jJAr3IfwDyW0E51I=;
h=Message-ID:Date:MIME-Version:Subject:To:References:From:
In-Reply-To:Content-Type; b=jNkCOi/0linb0weI1s4mO/SQa/QdVQ9gFWjmg6E6+HoUk1C5oNXtmQ65DeztQz/iFbvhQ3mBA/fiKT6aoJ/zcQetdk8aWl7CkON6SV66HLtdz2gqaruMpdrepgfOyBZwIZsCuxArksu3QdY7Fvz7zYKZCOMdMQ3XC9MBxMb72kE=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ho+WukD5; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7574BC4CEE4;
Wed, 4 Jun 2025 14:11:00 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749046264;
bh=QHd963OG136C8dBtaEAon6yYYj9jJAr3IfwDyW0E51I=;
h=Date:Subject:To:References:From:In-Reply-To:From;
b=ho+WukD5xc0a1WdsrxBBknOO9JpQgmQF8l05lLIp3lJo9O3XiTaMGV4+DduWyvb+H
5S8DoTr1Bufu3UJ8DvY+kd/9IdmfMeS3hYtslLukYxcCAIaKDZvavA4YEOEYTV+gt5
pW8nGI/Uu1wXh6GedEOJPaWVePZxg/BqM9Phu41gay1+zCmyHhtCajrf0rUUTtdd9o
L5gKB8y8jTIgiQ0yqx2bK/U9FzYqgNzgWgLugNtZZIRfaVnCImvgKqPJ9fB4IzP5ug
7a30ux4acE0KaiDiQAiJ8mTkTDQktUIspnqZ/XOngL9r2v4bJDFx3siK3f489XRVyt
u7avk61cI+KsQ==
Message-ID: <56e8101a-76f3-4a27-9826-fcb97320a9c5@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 16:10:57 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v2 1/2] dt-bindings: mailbox: Add ASPEED AST2700 series
SoC
To: Jammy Huang <jammy_huang@xxxxxxxxxxxxxx>, jassisinghbrar@xxxxxxxxx,
robh@xxxxxxxxxx, krzk+dt@xxxxxxxxxx, conor+dt@xxxxxxxxxx, joel@xxxxxxxxx,
andrew@xxxxxxxxxxxxxxxxxxxx, devicetree@xxxxxxxxxxxxxxx,
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-aspeed@xxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
References: <20250604125558.1614523-1-jammy_huang@xxxxxxxxxxxxxx>
<20250604125558.1614523-2-jammy_huang@xxxxxxxxxxxxxx>
From: Krzysztof Kozlowski <krzk@xxxxxxxxxx>
Content-Language: en-US
Autocrypt: addr=krzk@xxxxxxxxxx; keydata=
xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79
cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu
JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH
gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE
J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj
NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS
BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU
vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM
Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD
TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzSVLcnp5c3p0b2Yg
S296bG93c2tpIDxrcnprQGtlcm5lbC5vcmc+wsGVBBMBCgA/AhsDBgsJCAcDAgYVCAIJCgsE
FgIDAQIeAQIXgBYhBJvQfg4MUfjVlne3VBuTQ307QWKbBQJoF1BKBQkWlnSaAAoJEBuTQ307
QWKbHukP/3t4tRp/bvDnxJfmNdNVn0gv9ep3L39IntPalBFwRKytqeQkzAju0whYWg+R/rwp
+r2I1Fzwt7+PTjsnMFlh1AZxGDmP5MFkzVsMnfX1lGiXhYSOMP97XL6R1QSXxaWOpGNCDaUl
ajorB0lJDcC0q3xAdwzRConxYVhlgmTrRiD8oLlSCD5baEAt5Zw17UTNDnDGmZQKR0fqLpWy
786Lm5OScb7DjEgcA2PRm17st4UQ1kF0rQHokVaotxRM74PPDB8bCsunlghJl1DRK9s1aSuN
hL1Pv9VD8b4dFNvCo7b4hfAANPU67W40AaaGZ3UAfmw+1MYyo4QuAZGKzaP2ukbdCD/DYnqi
tJy88XqWtyb4UQWKNoQqGKzlYXdKsldYqrLHGoMvj1UN9XcRtXHST/IaLn72o7j7/h/Ac5EL
8lSUVIG4TYn59NyxxAXa07Wi6zjVL1U11fTnFmE29ALYQEXKBI3KUO1A3p4sQWzU7uRmbuxn
naUmm8RbpMcOfa9JjlXCLmQ5IP7Rr5tYZUCkZz08LIfF8UMXwH7OOEX87Y++EkAB+pzKZNNd
hwoXulTAgjSy+OiaLtuCys9VdXLZ3Zy314azaCU3BoWgaMV0eAW/+gprWMXQM1lrlzvwlD/k
whyy9wGf0AEPpLssLVt9VVxNjo6BIkt6d1pMg6mHsUEVzsFNBFVDXDQBEADNkrQYSREUL4D3
Gws46JEoZ9HEQOKtkrwjrzlw/tCmqVzERRPvz2Xg8n7+HRCrgqnodIYoUh5WsU84N03KlLue
MNsWLJBvBaubYN4JuJIdRr4dS4oyF1/fQAQPHh8Thpiz0SAZFx6iWKB7Qrz3OrGCjTPcW6ei
OMheesVS5hxietSmlin+SilmIAPZHx7n242u6kdHOh+/SyLImKn/dh9RzatVpUKbv34eP1wA
GldWsRxbf3WP9pFNObSzI/Bo3kA89Xx2rO2roC+Gq4LeHvo7ptzcLcrqaHUAcZ3CgFG88CnA
6z6lBZn0WyewEcPOPdcUB2Q7D/NiUY+HDiV99rAYPJztjeTrBSTnHeSBPb+qn5ZZGQwIdUW9
YegxWKvXXHTwB5eMzo/RB6vffwqcnHDoe0q7VgzRRZJwpi6aMIXLfeWZ5Wrwaw2zldFuO4Dt
91pFzBSOIpeMtfgb/Pfe/a1WJ/GgaIRIBE+NUqckM+3zJHGmVPqJP/h2Iwv6nw8U+7Yyl6gU
BLHFTg2hYnLFJI4Xjg+AX1hHFVKmvl3VBHIsBv0oDcsQWXqY+NaFahT0lRPjYtrTa1v3tem/
JoFzZ4B0p27K+qQCF2R96hVvuEyjzBmdq2esyE6zIqftdo4MOJho8uctOiWbwNNq2U9pPWmu
4vXVFBYIGmpyNPYzRm0QPwARAQABwsF8BBgBCgAmAhsMFiEEm9B+DgxR+NWWd7dUG5NDfTtB
YpsFAmgXUF8FCRaWWyoACgkQG5NDfTtBYptO0w//dlXJs5/42hAXKsk+PDg3wyEFb4NpyA1v
qmx7SfAzk9Hf6lWwU1O6AbqNMbh6PjEwadKUk1m04S7EjdQLsj/MBSgoQtCT3MDmWUUtHZd5
RYIPnPq3WVB47GtuO6/u375tsxhtf7vt95QSYJwCB+ZUgo4T+FV4hquZ4AsRkbgavtIzQisg
Dgv76tnEv3YHV8Jn9mi/Bu0FURF+5kpdMfgo1sq6RXNQ//TVf8yFgRtTUdXxW/qHjlYURrm2
H4kutobVEIxiyu6m05q3e9eZB/TaMMNVORx+1kM3j7f0rwtEYUFzY1ygQfpcMDPl7pRYoJjB
dSsm0ZuzDaCwaxg2t8hqQJBzJCezTOIkjHUsWAK+tEbU4Z4SnNpCyM3fBqsgYdJxjyC/tWVT
AQ18NRLtPw7tK1rdcwCl0GFQHwSwk5pDpz1NH40e6lU+NcXSeiqkDDRkHlftKPV/dV+lQXiu
jWt87ecuHlpL3uuQ0ZZNWqHgZoQLXoqC2ZV5KrtKWb/jyiFX/sxSrodALf0zf+tfHv0FZWT2
zHjUqd0t4njD/UOsuIMOQn4Ig0SdivYPfZukb5cdasKJukG1NOpbW7yRNivaCnfZz6dTawXw
XRIV/KDsHQiyVxKvN73bThKhONkcX2LWuD928tAR6XMM2G5ovxLe09vuOzzfTWQDsm++9UKF a/A=
In-Reply-To: <20250604125558.1614523-2-jammy_huang@xxxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 04/06/2025 14:55, Jammy Huang wrote:
Introduce the mailbox module for AST27XX series SoC, which is responsible
for interchanging messages between asymmetric processors.
Signed-off-by: Jammy Huang <jammy_huang@xxxxxxxxxxxxxx>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>
Best regards,
Krzysztof
Return-Path: <linux-kernel+bounces-673326-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id C505441E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:11:49 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id EBDA2188B59F
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:12:01 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 01D92290BAD;
Wed, 4 Jun 2025 14:11:40 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="Dgg3Zi7i"
Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2088.outbound.protection.outlook.com [40.107.249.88])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0CB043595A;
Wed, 4 Jun 2025 14:11:35 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.249.88
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749046298; cv=fail; b=L55vYd9zetaoW+b2mBCuJ6jOrwne9WqUpRll+YLKTvuvjo57oXCls51CCX3cyGgQegXONhO50m3v7cfx5touyNb/tEJip2SAGhGQl2f0skgs3BEGnLY1EcpYgWwoY4ck0UQp0rLJMzj9ncBprYWh5Udv/PoHmvhla6wEdlQ+zpY=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749046298; c=relaxed/simple;
bh=dlALrJNLWGAMbBQgxHcgO1AwLePH1KTcsYJFkl08xwg=;
h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To:
Content-Type:MIME-Version; b=bedPjxLOLrD9zsMn35nNJ2UTb6M/Nvwd0/v+eCa1pGjURy8xpn7lCpj2okgZ+NY5DYfxy5dYGusL8aHy8EXoU2rN5PU9N3IMWt5zV2I/zc+mO8/asn+znkDik2N4TDY0z5wE0r0cpYlfURd+EMz7bgEaZ/Ad8hZC3/vV7GWGMSs=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=Dgg3Zi7i; arc=fail smtp.client-ip=40.107.249.88
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=Li4CI7Fo2pkts8/LRM9r2BtkhVR9IxsuwPplsVYfwRwKynDysO/FCqXvTtimVRxbW51tDLBJkGrhWXhVb1IuZOhbhApsa9PO/ouxW0D9fRAobSMoF90X6OPwXs/yBJL78tnrY+S3Qq7a4RkwIrQw3XwABfslqJkp191inhEH+ds9xm+3umMB12hP/7c/WGqRxXS4d7yCe1q95Ssa7gep1B6kqTMebvViK66AdY2xtjngndGb30skz2ijybwNtFemnLJ9U99/+hMw4F3ciWJqVIE1CNIxO76y7PuYr8eVGlm2R8meeyJPt+eIrCyUj+R7SQMj4B7iCsCqwvf+1KxZHQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=dlALrJNLWGAMbBQgxHcgO1AwLePH1KTcsYJFkl08xwg=;
b=LvJtt3WbRS/sqBaRCvH5h64G6L0ic06GJtphrGcBmNgiRkfzmO3Sy7LIQes39KMXA1MfDXWDFntf+5JKEmUVOaFq2VWgvBBVNGsO2Nit1HcshXQmiFUXaRqVFjxfEJi3HZGAtxvdMgtiNGviVxPSVpzQ730Z5woG4qFDsI0B8cux1qpsaVewOTeHv3WCdNl8WRMlvQLOcvHVVts2tIWSBUXAZVuyW3Qjmho19m88zn5J3ZdRBjZjT1b6QJzQze5DGUIa0Jq3R5OecgpEmO4LQEba6tAaaaWIxuMdUhZDNQz1aXGqUQVqKmga/yYXfUjAda0gjKM2h1G7rh7w17W3Fg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass
header.d=nxp.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=dlALrJNLWGAMbBQgxHcgO1AwLePH1KTcsYJFkl08xwg=;
b=Dgg3Zi7ioGLvv7Wg/xE/lbTq0ASIv9MsDJyMWsLlZnHzHNKLoklPXb9Q0dSBucl52nwmOvRljCssd8LOwaKxB4NJUNCTzAMqQbwzZOLmGHH1KWQrF/Cc/4i5t+EO4THAJ0yh053OeI1do2sAJq2wk9/OCZVg6kPphFYuqlJI524zPqFe3tQpyUijH7svZ6JBhPp3CjOJz5KFQDAF85ERx3ycFjr2ce7q1agOe7RotHm8T1aTgG8huUGisUHIv+eApxRc9UC/dVW0TNbsTQqgOm6fXoSAtpOGAubf2dfX74oljCKPdr59bDN9pHF3DUJD3MsCTfiOwDxpV44oFM2/5A==
Received: from PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15)
by VI2PR04MB10619.eurprd04.prod.outlook.com (2603:10a6:800:26d::6) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8813.20; Wed, 4 Jun
2025 14:11:32 +0000
Received: from PAXPR04MB8459.eurprd04.prod.outlook.com
([fe80::165a:30a2:5835:9630]) by PAXPR04MB8459.eurprd04.prod.outlook.com
([fe80::165a:30a2:5835:9630%3]) with mapi id 15.20.8813.018; Wed, 4 Jun 2025
14:11:32 +0000
From: Peng Fan <peng.fan@xxxxxxx>
To: Daniel Baluta <daniel.baluta@xxxxxxxxx>, "Peng Fan (OSS)"
<peng.fan@xxxxxxxxxxx>
CC: Bjorn Andersson <andersson@xxxxxxxxxx>, Mathieu Poirier
<mathieu.poirier@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>, Krzysztof
Kozlowski <krzk+dt@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>, Shawn Guo
<shawnguo@xxxxxxxxxx>, Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>, Pengutronix
Kernel Team <kernel@xxxxxxxxxxxxxx>, Fabio Estevam <festevam@xxxxxxxxx>,
Iuliana Prodan <iuliana.prodan@xxxxxxx>, Daniel Baluta
<daniel.baluta@xxxxxxx>, "linux-remoteproc@xxxxxxxxxxxxxxx"
<linux-remoteproc@xxxxxxxxxxxxxxx>, "devicetree@xxxxxxxxxxxxxxx"
<devicetree@xxxxxxxxxxxxxxx>, "imx@xxxxxxxxxxxxxxx" <imx@xxxxxxxxxxxxxxx>,
"linux-arm-kernel@xxxxxxxxxxxxxxxxxxx"
<linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx"
<linux-kernel@xxxxxxxxxxxxxxx>
Subject: RE: [PATCH 2/3] remoteproc: imx_rproc: Add support for System Manager
API
Thread-Topic: [PATCH 2/3] remoteproc: imx_rproc: Add support for System
Manager API
Thread-Index: AQHb1PlrWBV202+31USYgPd+94a3V7Py9hGAgAAUglA=
Date: Wed, 4 Jun 2025 14:11:32 +0000
Message-ID:
<PAXPR04MB8459A7D00D6D7223E088EE49886CA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20250604-imx95-rproc-1-v1-0-a6e5f512731c@xxxxxxx>
<20250604-imx95-rproc-1-v1-2-a6e5f512731c@xxxxxxx>
<CAEnQRZByPkxojykJ3w-Mxko08Nc5txsOCL4vy+P76HuTy3YTaA@xxxxxxxxxxxxxx>
In-Reply-To:
<CAEnQRZByPkxojykJ3w-Mxko08Nc5txsOCL4vy+P76HuTy3YTaA@xxxxxxxxxxxxxx>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=nxp.com;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: PAXPR04MB8459:EE_|VI2PR04MB10619:EE_
x-ms-office365-filtering-correlation-id: 7a5ce8d5-d654-4b0d-b14c-08dda371b541
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam:
BCL:0;ARA:13230040|366016|1800799024|376014|7416014|38070700018;
x-microsoft-antispam-message-info:
=?utf-8?B?T1F5cU5xZHR0eVc0L2lHMHh2ZXUreTBwSXQwYmxPNzcyN2NDaEphcFRERzdU?=
=?utf-8?B?alB2SS9neUlITUpYOE1ISld3dGlCSXE4TFNFQnFTQit4K3N5L1N1dXA5MHVS?=
=?utf-8?B?TFhMaEFTNGhpcHVFYWZWQlV0dWc3ZWhyOGZPdmZLVHd2ZE5JQXp5OHBHbmUw?=
=?utf-8?B?cHdQR0RHTG4va0k2a2JFcGRIcS9FSDdtWEhFMm1LL1lTS291Y1NZZmQ1eFNS?=
=?utf-8?B?VkpzWHFObmlkSjI4dXpPc3hQTHpCSVE4MmlMbk4xbVV1WjFuQTJtSStMSnc2?=
=?utf-8?B?cmJxSm8rZDJrTHA0Ym1KN2ZiVXczVHhNWVBGZnJuTWtIdnpocERuUVZUeXJG?=
=?utf-8?B?c2l5N2FLc3VmNDFmU2NERGxSdXFPY284ZXZ4c3ZHMEk3NnZiWklwSkY2cnB2?=
=?utf-8?B?WGdTV2swVzhJeVIzS3ViTHFnblZydW5kbXNTUHlpY0xsSHVzT09EckpRUHVs?=
=?utf-8?B?NTZEMkVLckZvcVVsMGc4c3ZTQWxaSXpNd3pFdDllY2o3TU5hazJYcmgyNWh5?=
=?utf-8?B?ekRLOXFuQzNPVkJmZ0UzNUZtRkJLU2MydnhoMC9KWU9LN2oxVXprL0JydG5Z?=
=?utf-8?B?QUVtMlF0Qm5MOWNhWFo5azRpVTkxVER6ZHQ3a3pyNEViaWswMHBrV2hRM2hs?=
=?utf-8?B?cS9kN0RldDJLZmw3MldWK3hDb1oyYVoyNEFxVEo0Y0N4bDJ0T3JhNmJaVy80?=
=?utf-8?B?c0l6QTVhY08ra3E4YS9hN3ByS1hVNkFkNUxUWGVWWWZMdUVXR0xvMUtOVHQ2?=
=?utf-8?B?eWVHdkEvNkZnUnhrZXF5TS9hZFR1RnZ0MVZCTXRmYTA1M1p0NjBmWldORUpW?=
=?utf-8?B?ZGlFMGI0WE0yT3hIQU9EZzFKZStadzBCZHlCTldTT0Z3NXp5bHR4VkFLdzJC?=
=?utf-8?B?QXA3azVjSWdvdCttb0swTlBUOUdUSUNRT0Z1dkI5a2I0TTgyMytZcEFiKzFz?=
=?utf-8?B?dFpRZkdFRHpuUzZzMGZVSk5qNFM2dExiRDlidjZNRnlFOFJONWJOZEgvQ2ZI?=
=?utf-8?B?ay9XcHNMSXRaWVJWUDV1U3VuY0tBS2lyS0oyb3pFOTEzVjk2SWR3WCtBbFg3?=
=?utf-8?B?UjNWNGozbk1BUTk3UnZXa1JwaWw5L3hoazFDRDBoZmdiNlhQYTFhRU5SM0pF?=
=?utf-8?B?MXJJR2lrakVvaWlHRUhhOGwvR1E5cWdSM09GOFNaZVUvek9TSEcwbG15RVgz?=
=?utf-8?B?dytLWDJCTkNwUkswSTNWbUxhdGRQRnFxanpxbWtPd01YaDVNcTdtTGcyRVli?=
=?utf-8?B?Z1lTVXR1SThJbFJaTFkzSkpNRTdzZ2F2YldIaGdOOHNRZTZkOWM4VFVxREtW?=
=?utf-8?B?c3p6cmFaWm1BY3NBbHVVMTR1QXp2SWxaUWZmditWSzlXRjUybE4zb2RtK3BN?=
=?utf-8?B?N1hqR1c1QjN4aURaZ3o1Nzl6Q1dhT2JCWFpxTDhCbGsvQkFCaFFNbTRld1Bk?=
=?utf-8?B?TmkrNG9hWDhXMkFzMDJXN3VzU3RPZTRlei8wT1cxd1hTMUdJRHBVb1pxUHZH?=
=?utf-8?B?OWN2ajBFQnByN3pIK0lDc1Y3dU1iTndlQis4Ymp3WGZFalFINXZQVnVMK2Nn?=
=?utf-8?B?UC9XTjZVVmpMMkowOEQ3d2p4SFNpM05kZnJSenNNSnBWOXIvQklTQ1ZBOEQ4?=
=?utf-8?B?cnJYeWswUHIxb1FwVTBTa3dPR1JrZ1dmMjYvTy9XT0N1UEJtdGh1Nm1QNlgw?=
=?utf-8?B?KzdGMWZWb0tZMW5EUVM1aVdBMEdpWVpRY28wTTA0M212cWFGTm1mbGQ4QnM1?=
=?utf-8?B?ZFh5dlNUamVZanVDVG5LVFNza0JBQ1JmRDQxOHhMSWs0NXFzaTNCUXk4cGVk?=
=?utf-8?B?bFFqRWRLOEQ5YzRGQXRlSk5qMjM1bC9ZQWd0Rjl6ZHAzclNabXNvc2R0b25R?=
=?utf-8?B?NnhnTVBlWGpRK1JoeWpxOVQxSlJtbGd5OEs1VFc0anZzeExRTTdRRCtIVWR0?=
=?utf-8?B?V09MOVhBa20zSXVzWlhPV2Z3N2M2ckp5cGpCYkxuL1VESHBrRzROWHRYUXpU?=
=?utf-8?Q?SwWaI6PTvSZBjM7WJSNsICVLgbY8CY=3D?=
x-forefront-antispam-report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB8459.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014)(7416014)(38070700018);DIR:OUT;SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0:
=?utf-8?B?cmJDQUh5VEJkTVdtajNZWk9OVC9FaXRjZ3FxUmVEUWgvYlhIWUQvd0h2Nmxt?=
=?utf-8?B?bjM0RUFYK1dDYVl1ZG4xUkFKakVlQTNRd24yVHpWbjhiMTFGb3FUaUgxUWE5?=
=?utf-8?B?dFBoejUyN0Z3dTU1WGtyMmhsT3lzMU9QNllPVTd6WEJuUEE5OHI3S01YRzhy?=
=?utf-8?B?WVBQcTA5K0hnc1hFMStZV3RmT2dpY2ZkQ0tpZngyNmJOSmdqSjhFSkU4Zk1D?=
=?utf-8?B?cEhvQXlyVW5jNm9nSVBnMDlkdC9ENXROZmdFcFIzcFhYT2owR21mTnVoUXFS?=
=?utf-8?B?Nk83S2VaaVYzSTJKRHNZWTBxajA4TXFwZksvamxWZUhsYjFWelZxZXFjZmUx?=
=?utf-8?B?cUp0RlRlVWlVeEJnUGtaQVp3cnY2UEMxRTJKNHBnbHI2eUpEZ2gzMitKdzBT?=
=?utf-8?B?VjhUU0pkbWl3SFpCb3Z1SVhGNkVGVHhOUDVmcklZdFdETmtpejg3cGMxSmFa?=
=?utf-8?B?ejhYYkNybUVXemxEZE11ZExtRDRoT3dKUXZ2REp5V1VqUFFSNmVCK2hRd3lk?=
=?utf-8?B?Q3FqOG80cFdpRStSODllRWs5NGYyb0xnL05OS0xCbDVQK3k2dW0yYXpRaGht?=
=?utf-8?B?bHh4Z1FCVjVKckhaZkRWRE5kbXc3bGtkb05ZUHpIeUlhY2tsb2xrTUZramp5?=
=?utf-8?B?K0lvK0JoK3lJZ0xMNzFnV1U5TmpvQkY2Skd6RjBRaUVpOHRNU1huanFYYXZz?=
=?utf-8?B?ZnF4d0J4a3EyelFhSjhZVzcyMnp0dUw2L1VUME1heSt2RGI2R0FpZlhWOU43?=
=?utf-8?B?T2NUY2tFYVcrdVQ0dnlpVFRYWW9MSmJqbEJPMWZLK2pZSjVGL05UL0NGaUd3?=
=?utf-8?B?NFdUQzdHeTdhR0VVYjNZY0Y3NXFpbkpuT0tkWmNWL0xJR3dycXJXWnVWVG5X?=
=?utf-8?B?blpGakZQeFl5UDVtNVZHQnZ2K09lZFVNVUVPdHdrNEpsOWJzWUpwemg2YnRr?=
=?utf-8?B?bDB2R2NiYi9GRlY2bU12bERxcXpGbytFUFBnWUxQeHg1NGM1NW04Y1Z2VTdh?=
=?utf-8?B?WkRKZTd3R1VYTGlrTTdiWFUwem53d2FNL3BZYkFZNjJTY2xOY1JsMzAwRDhS?=
=?utf-8?B?YUNnQXNOdWJQMVJKZnN2emNZenBqRVM4V2diMUZIY1BMYmJ1ZXplbHpFNExo?=
=?utf-8?B?VWJLL1FhZUNtOE1hUVdSam80SXFaOExiS25VT2UrZGtEaUVCQlhXN0prUllx?=
=?utf-8?B?blNkaXVMM0wzRUhqUUFqWUI1UUtGQlptM25uZE1TUHI0T1cyc0RjRUR0TGow?=
=?utf-8?B?VUdWWDNDVnppcE5jdkpMbis0aW9NeGpuOFlyVjVpcUYzLzYwYWtLOW11b1gx?=
=?utf-8?B?YTl3QVduRWM0bVZMbE5mK0xrTU9HQlU2ODM1a3pBejN5RFR2SkNBdUpybVBz?=
=?utf-8?B?SUs1bDBWQnorOG0rMlFwWkthUEJDQzBoUnlvbWc4MzNsdHAvWExRM2tscXc0?=
=?utf-8?B?dU9McVhMaHBxVkhRYXJPQlc4eUN3RDJ6OUo4MUU4bkoxck04RldKNmtPYmNo?=
=?utf-8?B?bG9Ob1g4OTcrVWFoYktndGNJMS9pQjNkanVpRWhBa0xxbmdoaUJMSzRKeVpF?=
=?utf-8?B?Tm9DeGJpM2dqTjYxc29MaG5VM3NWMWRUdStVUFVyd0JNaGFnQ3I0bFBUL0lI?=
=?utf-8?B?Wnk3MG9vRFRXZGo2dFdra25hdWc4R25aSVg1djhZTE0xN0F0dlVHa2lJV0VT?=
=?utf-8?B?Vzdsc0IySXYrUHB5NURRZ0dWejhxTm00bjFUYTUvQW51N1NJODJ6cldOanlF?=
=?utf-8?B?MUIrb3k0QWprdm9sdHgvb0F6eWRHOUs0dFZuMlRxVjZpdDRBVEFMemorTG1r?=
=?utf-8?B?STBYdHcvWEwrdjFaRkh2MUtzZENCQ2tSOWpOVS9xWlljTTJWM2pwa21oWmR0?=
=?utf-8?B?VGJOaFdwSTVvZzZxY1pyWkNUUnBoU1FlTjF3dUVjVzFsSkZPZzUwYVlneUpx?=
=?utf-8?B?c2hlWno3dUZKZmdrQ0Q1MURTTU9OM0pnaGNwYWZNVTk5aFdwbFE5RTJnSE9R?=
=?utf-8?B?ZURQRHowTktnOEtSZ1UwcmhydGlkSGFrTE1UbmRZZ1czN1A1WVV1MVZEU3Er?=
=?utf-8?B?a2RJOERqR3cwS1NwZDNGVWRuYWVNMGJHNWkwSXhndDg5c0NHcWx5SVFuY21m?=
=?utf-8?Q?52i8=3D?=
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-OriginatorOrg: nxp.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8459.eurprd04.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 7a5ce8d5-d654-4b0d-b14c-08dda371b541
X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jun 2025 14:11:32.4066
(UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: iayTo5uvL+fHIveISzaC1BGVru5Mdqrv2ZR3ibLV2wGSOuv9iYEAB+sUnVK31/yP5WTv0S7MQEMDqRKidn6aAQ==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI2PR04MB10619
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
PiBTdWJqZWN0OiBSZTogW1BBVENIIDIvM10gcmVtb3RlcHJvYzogaW14X3Jwcm9jOiBBZGQgc3Vw
cG9ydCBmb3INCj4gU3lzdGVtIE1hbmFnZXIgQVBJDQo+IA0KPiBIaSBQZW5nLA0KPiANCj4gVGhh
bmtzIGEgbG90IGZvciB0aGUgcGF0Y2hlcy4gQ29tbWVudHMgaW5saW5lOg0KPiANCj4gT24gV2Vk
LCBKdW4gNCwgMjAyNSBhdCA1OjM24oCvQU0gUGVuZyBGYW4gKE9TUykNCj4gPHBlbmcuZmFuQG9z
cy5ueHAuY29tPiB3cm90ZToNCj4gPg0KPiA+IEZyb206IFBlbmcgRmFuIDxwZW5nLmZhbkBueHAu
Y29tPg0KPiA+DQo+ID4gaS5NWDk1IGZlYXR1cmVzIGEgQ29ydGV4LU0zMyBjb3JlLCBzaXggQ29y
dGV4LUE1NSBjb3JlcywgYW5kIG9uZQ0KPiA+IENvcnRleC1NNyBjb3JlLiBUaGUgU3lzdGVtIENv
bnRyb2wgTWFuYWdlbWVudCBJbnRlcmZhY2UoU0NNSSkNCj4gZmlybXdhcmUNCj4gPiBydW5zIG9u
IHRoZSBNMzMgY29yZS4gVGhlIGkuTVg5NSBTQ01JIGZpcm13YXJlIG5hbWVkIFN5c3RlbQ0KPiA+
IE1hbmFnZXIoU00pIGluY2x1ZGVzIHZlbmRvciBleHRlbnNpb24gcHJvdG9jb2xzLCBMb2dpY2Fs
IE1hY2hpbmUNCj4gPiBNYW5hZ2VtZW50KExNTSkgcHJvdG9jb2wgYW5kIENQVSBwcm90b2NvbCBh
bmQgZXRjLg0KPiA+DQo+ID4gVGhlcmUgYXJlIHRocmVlIGNhc2VzIGZvciBNNzoNCj4gPiAgKDEp
IE03IGluIGEgc2VwYXJhdGUgTG9naWNhbCBNYWNoaW5lKExNKSB0aGF0IExpbnV4IGNvdWxkbid0
IGNvbnRyb2wNCj4gaXQuDQo+IGNvdWxkbid0IC0+IGNhbid0DQo+IA0KPiA+ICAoMikgTTcgaW4g
YSBzZXBhcmF0ZSBMb2dpY2FsIE1hY2hpbmUgdGhhdCBMaW51eCBjb3VsZCBjb250cm9sIGl0IHVz
aW5nDQo+ID4gICAgICBMTU0gcHJvdG9jb2wNCj4gY291bGQgLT4gY2FuDQo+IA0KPiA+ICAoMykg
TTcgcnVucyBpbiBzYW1lIExvZ2ljYWwgTWFjaGluZSBhcyBBNTUsIHNvIExpbnV4IGNvdWxkIGNv
bnRyb2wgaXQNCj4gPiAgICAgIHVzaW5nIENQVSBwcm90b2NvbA0KPiBjb3VsZCAtPiBjYW4NCj4g
DQoNCg0KDQo+ID4NCj4gPiBTbyBleHRlbmQgdGhlIGRyaXZlciB0byB1c2luZyBMTU0gYW5kIENQ
VSBwcm90b2NvbCB0byBtYW5hZ2UgdGhlDQo+IE03IGNvcmUuDQo+ID4gIC0gQWRkIElNWF9SUFJP
Q19TTSB0byBpbmRpY2F0ZSB0aGUgcmVtb3RlY29yZXMgcnVucyBvbiBhIFNvQw0KPiB0aGF0DQo+
ID4gICAgaGFzIFN5c3RlbSBNYW5hZ2VyLg0KPiANCj4gcmVtb3RlY29yZXMgLT4gcmVtb3RlIGNv
cmUNCj4gDQo+ID4gIC0gQ29tcGFyZSBsaW51eCBMTSBJRChnb3QgdXNpbmcgc2NtaV9pbXhfbG1t
X2luZm8pIGFuZCBNNyBMTQ0KPiBJRChnb3QNCj4gPiAgICBmcm9tIERUQiksIGlmIHNhbWUsIHVz
ZSBDUFUgcHJvdG9jb2wgdG8gc3RhcnQvc3RvcC4gT3RoZXJ3aXNlLCB1c2UNCj4gPiAgICBMTU0g
cHJvdG9jb2wgdG8gc3RhcnQvc3RvcC4NCj4gPiAgICBXaGV0aGVyIHVzaW5nIENQVSBvciBMTU0g
cHJvdG9jb2wgdG8gc3RhcnQvc3RvcCwgdGhlIE03IHN0YXR1cw0KPiA+ICAgIGRldGVjdGlvbiBj
b3VsZCB1c2UgQ1BVIHByb3RvY29sIHRvIGRldGVjdCBzdGFydGVkIG9yIG5vdC4gU28NCj4gPiAg
ICBpbiBpbXhfcnByb2NfZGV0ZWN0X21vZGUsIHVzZSBzY21pX2lteF9jcHVfc3RhcnRlZCB0byBj
aGVjayB0aGUNCj4gPiAgICBzdGF0dXMgb2YgTTcuDQo+ID4gIC0gRm9yIGFib3ZlIGNhc2UgMSBh
bmQgMiwgVXNlIFNDTUlfSU1YX0xNTV9QT1dFUl9PTiB0bw0KPiBkZXRlY3Qgd2hldGhlcg0KPiA+
ICAgIHRoZSBNNyBMTSBpcyB1bmRlciBjb250cm9sIG9mIEE1NSBMTS4NCj4gPg0KPiA+IEN1cnJl
bnQgc2V0dXAgcmVsaWVzIG9uIHByZS1MaW51eCBzb2Z0d2FyZShVLUJvb3QpIHRvIGRvDQo+ID4g
TTcgVENNIEVDQyBpbml0aWFsaXphdGlvbi4gSW4gZnV0dXJlLCB3ZSBjb3VsZCBhZGQgdGhlIHN1
cHBvcnQgaW4NCj4gPiBMaW51eCB0byBkZWNvdXBsZSBVLUJvb3QgYW5kIExpbnV4Lg0KPiA+DQo+
ID4gU2lnbmVkLW9mZi1ieTogUGVuZyBGYW4gPHBlbmcuZmFuQG54cC5jb20+DQo+ID4gLS0tDQo+
ID4gIGRyaXZlcnMvcmVtb3RlcHJvYy9pbXhfcnByb2MuYyB8IDEzOQ0KPiArKysrKysrKysrKysr
KysrKysrKysrKysrKysrKysrKysrKysrKysrLQ0KPiA+ICBkcml2ZXJzL3JlbW90ZXByb2MvaW14
X3Jwcm9jLmggfCAgIDIgKw0KPiA+ICAyIGZpbGVzIGNoYW5nZWQsIDEzOSBpbnNlcnRpb25zKCsp
LCAyIGRlbGV0aW9ucygtKQ0KPiA+DQo+ID4gZGlmZiAtLWdpdCBhL2RyaXZlcnMvcmVtb3RlcHJv
Yy9pbXhfcnByb2MuYw0KPiA+IGIvZHJpdmVycy9yZW1vdGVwcm9jL2lteF9ycHJvYy5jIGluZGV4
DQo+ID4NCj4gNzQyOTlhZjFkN2YxMGEwZGI3OTRkZTQ5NGM1MjMwNGIyMzIzYjg5Zi4uMDY0OWZh
YTk4NzI1ZGI5OQ0KPiAzNjY5NDZjNjVlZGYNCj4gPiA1YjdkYWZmNzgzMTYgMTAwNjQ0DQo+ID4g
LS0tIGEvZHJpdmVycy9yZW1vdGVwcm9jL2lteF9ycHJvYy5jDQo+ID4gKysrIGIvZHJpdmVycy9y
ZW1vdGVwcm9jL2lteF9ycHJvYy5jDQo+ID4gQEAgLTgsNiArOCw3IEBADQo+ID4gICNpbmNsdWRl
IDxsaW51eC9jbGsuaD4NCj4gPiAgI2luY2x1ZGUgPGxpbnV4L2Vyci5oPg0KPiA+ICAjaW5jbHVk
ZSA8bGludXgvZmlybXdhcmUvaW14L3NjaS5oPg0KPiA+ICsjaW5jbHVkZSA8bGludXgvZmlybXdh
cmUvaW14L3NtLmg+DQo+ID4gICNpbmNsdWRlIDxsaW51eC9pbnRlcnJ1cHQuaD4NCj4gPiAgI2lu
Y2x1ZGUgPGxpbnV4L2tlcm5lbC5oPg0KPiA+ICAjaW5jbHVkZSA8bGludXgvbWFpbGJveF9jbGll
bnQuaD4NCj4gPiBAQCAtMjEsNiArMjIsNyBAQA0KPiA+ICAjaW5jbHVkZSA8bGludXgvcmVib290
Lmg+DQo+ID4gICNpbmNsdWRlIDxsaW51eC9yZWdtYXAuaD4NCj4gPiAgI2luY2x1ZGUgPGxpbnV4
L3JlbW90ZXByb2MuaD4NCj4gPiArI2luY2x1ZGUgPGxpbnV4L3NjbWlfaW14X3Byb3RvY29sLmg+
DQo+ID4gICNpbmNsdWRlIDxsaW51eC93b3JrcXVldWUuaD4NCj4gPg0KPiA+ICAjaW5jbHVkZSAi
aW14X3Jwcm9jLmgiDQo+ID4gQEAgLTkxLDYgKzkzLDExIEBAIHN0cnVjdCBpbXhfcnByb2NfbWVt
IHsNCj4gPiAgI2RlZmluZSBBVFRfQ09SRV9NQVNLICAgMHhmZmZmDQo+ID4gICNkZWZpbmUgQVRU
X0NPUkUoSSkgICAgIEJJVCgoSSkpDQo+ID4NCj4gPiArLyogTG9naWNhbCBNYWNoaW5lIE9wZXJh
dGlvbiAqLw0KPiA+ICsjZGVmaW5lIElNWF9SUFJPQ19GTEFHU19TTV9MTU1fT1AgICAgICBCSVQo
MCkNCj4gPiArLyogTGludXggaGFzIHBlcm1pc3Npb24gdG8gaGFuZGxlIHRoZSBMb2dpY2FsIE1h
Y2hpbmUgb2YgcmVtb3RlDQo+IGNvcmVzICovDQo+ID4gKyNkZWZpbmUgSU1YX1JQUk9DX0ZMQUdT
X1NNX0xNTV9BVkFJTCAgIEJJVCgxKQ0KPiA+ICsNCj4gPiAgc3RhdGljIGludCBpbXhfcnByb2Nf
eHRyX21ib3hfaW5pdChzdHJ1Y3QgcnByb2MgKnJwcm9jLCBib29sDQo+ID4gdHhfYmxvY2spOyAg
c3RhdGljIHZvaWQgaW14X3Jwcm9jX2ZyZWVfbWJveChzdHJ1Y3QgcnByb2MgKnJwcm9jKTsNCj4g
Pg0KPiA+IEBAIC0xMTUsNiArMTIyLDIyIEBAIHN0cnVjdCBpbXhfcnByb2Mgew0KPiA+ICAgICAg
ICAgdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbnRyeTsgICAgICAgICAgLyogY3B1
IHN0YXJ0IGFkZHJlc3MgKi8NCj4gPiAgICAgICAgIHUzMiAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgY29yZV9pbmRleDsNCj4gPiAgICAgICAgIHN0cnVjdCBkZXZfcG1fZG9tYWluX2xpc3Qg
ICAgICAgKnBkX2xpc3Q7DQo+ID4gKyAgICAgICAvKiBGb3IgaS5NWCBTeXN0ZW0gTWFuYWdlciBi
YXNlZCBzeXN0ZW1zICovDQo+ID4gKyAgICAgICB1MzIgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgIGNwdWlkOw0KPiA+ICsgICAgICAgdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBs
bWlkOw0KPiA+ICsgICAgICAgdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmbGFnczsN
Cj4gPiArfTsNCj4gPiArDQo+ID4gK3N0YXRpYyBjb25zdCBzdHJ1Y3QgaW14X3Jwcm9jX2F0dCBp
bXhfcnByb2NfYXR0X2lteDk1X203W10gPSB7DQo+ID4gKyAgICAgICAvKiBkZXYgYWRkciAsIHN5
cyBhZGRyICAsIHNpemUgICAgICAsIGZsYWdzICovDQo+ID4gKyAgICAgICAvKiBUQ00gQ09ERSBO
T04tU0VDVVJFICovDQo+ID4gKyAgICAgICB7IDB4MDAwMDAwMDAsIDB4MjAzQzAwMDAsIDB4MDAw
NDAwMDAsIEFUVF9PV04gfA0KPiBBVFRfSU9NRU0gfSwNCj4gPiArDQo+ID4gKyAgICAgICAvKiBU
Q00gU1lTIE5PTi1TRUNVUkUqLw0KPiA+ICsgICAgICAgeyAweDIwMDAwMDAwLCAweDIwNDAwMDAw
LCAweDAwMDQwMDAwLCBBVFRfT1dOIHwNCj4gQVRUX0lPTUVNIH0sDQo+ID4gKw0KPiA+ICsgICAg
ICAgLyogRERSICovDQo+ID4gKyAgICAgICB7IDB4ODAwMDAwMDAsIDB4ODAwMDAwMDAsIDB4NTAw
MDAwMDAsIDAgfSwNCj4gPiAgfTsNCj4gDQo+IF4gdGhpcyBiZWxvbmdzIHRvIHBhdGNoIDMvMw0K
PiANCj4gT3RoZXJ3aXNlLCBwYXRjaCBsb29rcyBnb29kIHRvIG1lLg0KDQpvb3BzLiBJIG1pc3Nl
ZCB0byBtb3ZlIHRoaXMgdG8gcGF0Y2ggMyB3aGVuIGFkZHJlc3NpbmcNCnlvdXIgaW50ZXJuYWwg
cmV2aWV3aW5nIGNvbW1lbnRzLg0KDQpGaXggaW4gVjIgdG9nZXRoZXIgd2l0aCB0aGUgdHlwbyB0
aGF0IHlvdSBtZW50aW9uDQphYm92ZS4NCg0KVGhhbmtzLA0KUGVuZy4gDQo=
Return-Path: <linux-kernel+bounces-673327-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id BE5A841E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:13:11 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 168F31713CF
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:13:12 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 5A0AD290BB1;
Wed, 4 Jun 2025 14:13:05 +0000 (UTC)
Received: from mail-il1-f199.google.com (mail-il1-f199.google.com [209.85.166.199])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 85CFC3595A
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:13:03 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.199
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749046384; cv=none; b=Vl3L2KFFfs6GUS1Vs3xD5cZj0qhgXm880gPhdLVeSsxGY3KDtq6WHGeB+nukrPBcrta7EdwPKwUcLueDm+PnQY9JLgnzA9BqXRtl8K0frW2avRUiqUcoH/qr+Sp8xQQPm1lrsF4NgJ/1UPzOGU+EQIzneG+cHpRLUMvgBc4iK3o=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749046384; c=relaxed/simple;
bh=pETMmbNihg40xDEoVuVBBtU7KMobSfcxA2ZRhDoB1yk=;
h=MIME-Version:Date:In-Reply-To:Message-ID:Subject:From:To:
Content-Type; b=Vtmb1dIVlxDvAu107XzwkTlAM+y3+O1BYgfELxoYWsep8l76jU7afaNEEXVKHCOV3mdSmv/LKqLxspsy2wuusYsvXaIjj0YtVc5yxt3BJKJeDA3sUn+8yYAqyAFbijZfLrWhuRoiVKAiH3fcsbyFO1EbNVerDfWa2Faq0kmQxnU=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.166.199
Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com
Received: by mail-il1-f199.google.com with SMTP id e9e14a558f8ab-3ddc3e2c428so3063935ab.2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 07:13:03 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749046382; x=1749651182;
h=to:from:subject:message-id:in-reply-to:date:mime-version
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=phBjk/n9AOpiQJJb7voLYEGxDD9SpB+1TRkS+vnt9mg=;
b=GnTwlM7RkvYsmCN49AQZauDi9jCB+TmAZxfk+fwABZuDomAIrEf9h6u6ImbCjTG9dA
FuifLAtf0pnsalaiwkBIwFrnOUuf+slUKAp+OSsqQ27MZwlpYmcGM65uRNow94V4W5Qd
yqgSCgDLvnuBUEv13G+aUZzAClMMX8uZadkYaDM/5828J9wdvW/8f06JoC1lqrdYatt3
PQX0W+vTyMUafYV/dwT2J5P4fNinx5oI/10NWJtAKXH7Mq5a0nuzrPN8GRIxIbR46eqE
6Z/MNRqZ2gV5U8x3nZw258DDxfJDFZi2mp9Kvgce4W74J4Xqs6/D2RePnzZ//JJeQHNk
wEcQ==
X-Forwarded-Encrypted: i=1; AJvYcCV2jyuKlAm9caNKv8fZixV/KJx+tgJQIvbue5J3Av4ZQvf3QT+JGTPgzFHcj7ychKh3e5cAJ0NnLIqcDa4=@vger.kernel.org
X-Gm-Message-State: AOJu0YwQUgmWwmZ9nCnyzAUyGpeIXy+SAJqsgBdf5Ls2Xb1eHNcoeNOp
7tDyhAEEdKFIgA868rdNAC2DvvVYl7SWblaEaxdxmCEpChTU/TRMalPDbQCbPCzC2DdKhFWxnnm
bYkJ+rUIpq7tgm8u+jukWshWrHetTUfG2jewKKhAFVA6QqGGxQdRsX1MfzgU=
X-Google-Smtp-Source: AGHT+IH0H2h1Se/g/w8d2RcA094nAxjmvFtBQSlAfUSPtKtBqZQWfVQ8kTcEaiP9OMrYq5krd8lKt8eFthFiqpH0thIvJp2CvvLy
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-Received: by 2002:a05:6e02:216a:b0:3dc:8b29:3092 with SMTP id
e9e14a558f8ab-3ddbed2be17mr35277295ab.5.1749046382538; Wed, 04 Jun 2025
07:13:02 -0700 (PDT)
Date: Wed, 04 Jun 2025 07:13:02 -0700
In-Reply-To: <CAGR7w82vvJPoF4ptK5PvVCDSmK_PJ44DJyDBq0=q3_w-nKFc1A@xxxxxxxxxxxxxx>
X-Google-Appengine-App-Id: s~syzkaller
X-Google-Appengine-App-Id-Alias: syzkaller
Message-ID: <6840546e.a00a0220.d4325.000e.GAE@xxxxxxxxxx>
Subject: Re: [syzbot] [i2c?] KMSAN: uninit-value in __i2c_smbus_xfer
From: syzbot <syzbot+0a36c1fec090c67a9885@xxxxxxxxxxxxxxxxxxxxxxxxx>
To: abhinav.ogl@xxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
syzkaller-bugs@xxxxxxxxxxxxxxxx
Content-Type: text/plain; charset="UTF-8"
X-Spam-Status: No, score=-3.0 required=5.0 tests=FROM_LOCAL_HEX,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hello,
syzbot tried to test the proposed patch but the build/boot failed:
fs/bcachefs/sb-members.c:68:44: error: no member named 'size' in 'struct bch_sb_field'
Tested on:
commit: 5abc7438 Merge tag 'nfs-for-6.16-1' of git://git.linux..
git tree: upstream
kernel config: https://syzkaller.appspot.com/x/.config?x=9dc42c34a3f5c357
dashboard link: https://syzkaller.appspot.com/bug?extid=0a36c1fec090c67a9885
compiler: Debian clang version 20.1.6 (++20250514063057+1e4d39e07757-1~exp1~20250514183223.118), Debian LLD 20.1.6
patch: https://syzkaller.appspot.com/x/patch.diff?x=11f5c570580000
Return-Path: <linux-kernel+bounces-673328-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 449D741E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:13:32 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id C61013A60A7
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:13:09 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 9A57D290BC6;
Wed, 4 Jun 2025 14:13:26 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Us9N8jsw"
Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7D5F61CAA7D
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:13:24 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.179
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749046405; cv=none; b=egSCP+0ZNnro4yShv+jT0h3FZOYkbIee8+LRDd4SHcv4eaRh5TOkGRyfzD14XWzKYJ7X//bXB8TZY0Zj775UMYBbCbYW18nnuZpm+pbOSEjwX87XEiBYXMG/MexGmZZA4mRAmX/LEIQ8UPvH//ZJ6L/cCjHpSgzR62Ahmkrt3Yc=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749046405; c=relaxed/simple;
bh=kUD9RaSK90fDmAELeDmPzDaHHzVoXZ5jPa7OuIhm9FI=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=qcRNbq3UTIYKFsJI0opmYDSqmeJA0Z1EqlFFpIwbzvT2/9Fdu58qjqqVXxWk9slHnJ2YkRD7r/AOO5g3NIiUiUMVcjlm5i9+O/S+I5EbVpN3R4JxJUDMZ0H6drFkcnZxfUmx0GEZ5Cwka66xWsNxcd0jc6PsOY/WI2Brkebh/yA=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Us9N8jsw; arc=none smtp.client-ip=209.85.215.179
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
Received: by mail-pg1-f179.google.com with SMTP id 41be03b00d2f7-b26d7ddbfd7so7054369a12.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 07:13:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1749046404; x=1749651204; darn=vger.kernel.org;
h=in-reply-to:content-disposition:mime-version:references:message-id
:subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to;
bh=FOubuOKJ0nVRR07NcifP3O4w+OBYodv4aN3itoFdfs4=;
b=Us9N8jswt7LjC2tSBXmkJ3ZvaPcgk0kiQaeEjnNPa8i/6mmp9CMJJbtsu584PeefJr
jIua6tgOMxor6jt6IR+oU/f2JNkpjuUHPvoYlUoqR7g3r+Piwvz5koOFTwHKpQHSHo7U
/1v13wjcKgFB8fsYPDqHbWt7/wRubhPX5HruRkJjpqsRsHm2OAnfvxQiUmLwJyp1rR75
PIg30LBZ6N7MMratGp6m53ynGQDNHeqhyIJLp+3N2RzJcXENz9Ptl3zZzAH12fRQhTIR
+m+34eTO+Vz04WV7XKg/I361suAJZj8G9cr5YaFMCtGc/Hjw+48ymefeVsTi3UU9Et8J
C1FA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749046404; x=1749651204;
h=in-reply-to:content-disposition:mime-version:references:message-id
:subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to;
bh=FOubuOKJ0nVRR07NcifP3O4w+OBYodv4aN3itoFdfs4=;
b=qBFY3HEzpK/ExQp7s7rbxMLyc7EwjcScf+Ww6R0HdwV3HBlJcYMG5oTWNvtTknDvEd
srECGfUrlyq3GQW6hJHpZT4INKzn6aDgLlQkXCI8G70LQu2OQ+Bd2lNoEvBXD/3d6dJm
TdPNL+xaTFtYIxmoZ+YYfWh853rwC5QW6cocjSRSfw4TEw5ZDNpDVz8AbNDfEwywN9lW
Un+7ooYbOI91Iuws/41xSYfUuWvlS+dH8Ewue2Kok+CaIpfK57D0uvDYbW3LZE7DB26I
DHdgmKoXhnDsQkMu5TkDPd53Ma6uqjjh7V0Gpng811LcjMtDWkMLt5/FetbnQsmQJoxK
8HIg==
X-Forwarded-Encrypted: i=1; AJvYcCWWzM5bS/chQ4FcSdQzk9FSCQ/PGRY6sS7aC6mAahvQZoVWwhCGpL6q6LSX8vlR87nbP315/kVi1z/5l78=@vger.kernel.org
X-Gm-Message-State: AOJu0YxKAOmjWApMcFoEptgFOMN9KR3058e9lISzKNUswkpKG9UG5rOR
edxB0RRAfD8bMVDH0Gq6jYkXlwYz5k/S/iA8DNvGJbRyWvduoR5SxT50tvE88g==
X-Gm-Gg: ASbGncsBQeGQnam8Bbn4I5Z4oxOM5HoLI4aw9aAR+R4+L3wgXPVmiKd+gWKN6oFJ2oi
ucmNTGKlwKqlDZ+qMBsTxNJeVeTV8dcTigJDfM3tjK79nlK12Q37Epb2rcXOJmKIf7FWNsWzB0e
iOh3m2V4BdpMhW7YoiTXfBYJD2sIo1q4PP98RPPSNqjQGH/jCRk2WrIYJfMoCtsJIWNoyGGEncM
t17xeaD6B2enDFnzt0ryzzumhG3KrG5KzbzpqKKrClxYpi+ix8TZMfI6pxW+vi0oniJvOXdNgAT
OMj1zBqcuNWoZZ6q4TarOPpd2AJrNCoJMO4oeq5V1WmzpXxMKck=
X-Google-Smtp-Source: AGHT+IE8ilsTXYJqkqZP8w9qY7x7MzrwQvVHFPgwyHwV5u7WDN7K048ANhZ75TY38hB338uiQTD+sA==
X-Received: by 2002:a17:90b:3ec7:b0:311:9c9a:58da with SMTP id 98e67ed59e1d1-3130cd12ba3mr4615834a91.8.1749046403609;
Wed, 04 Jun 2025 07:13:23 -0700 (PDT)
Received: from localhost ([216.228.127.128])
by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-312e7931d29sm2968092a91.26.2025.06.04.07.13.22
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 07:13:23 -0700 (PDT)
Date: Wed, 4 Jun 2025 10:13:21 -0400
From: Yury Norov <yury.norov@xxxxxxxxx>
To: Andrea Righi <arighi@xxxxxxxxxx>
Cc: Tejun Heo <tj@xxxxxxxxxx>, David Vernet <void@xxxxxxxxxxxxx>,
Changwoo Min <changwoo@xxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx
Subject: Re: [PATCH] sched/topology: Fix for_each_node_numadist() lockup with
!CONFIG_NUMA
Message-ID: <aEBUgWdZtz8E_2d9@yury>
References: <20250603080402.170601-1-arighi@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20250603080402.170601-1-arighi@xxxxxxxxxx>
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Tue, Jun 03, 2025 at 10:04:02AM +0200, Andrea Righi wrote:
for_each_node_numadist() can lead to hard lockups on kernels built
without CONFIG_NUMA. For instance, the following was triggered by
sched_ext:
watchdog: CPU5: Watchdog detected hard LOCKUP on cpu 5
...
RIP: 0010:_find_first_and_bit+0x8/0x60
...
Call Trace:
<TASK>
cpumask_any_and_distribute+0x49/0x80
pick_idle_cpu_in_node+0xcf/0x140
scx_bpf_pick_idle_cpu_node+0xaa/0x110
bpf_prog_16ee5b1f077af006_pick_idle_cpu+0x57f/0x5de
bpf_prog_df2ce5cfac58ce09_bpfland_select_cpu+0x37/0xf4
bpf__sched_ext_ops_select_cpu+0x4b/0xb3
This happens because nearest_node_nodemask() always returns NUMA_NO_NODE
(-1) when CONFIG_NUMA is disabled, causing the loop to never terminate,
as the condition node >= MAX_NUMNODES is never satisfied.
Prevent this by handling NUMA_NO_NODE explicitly in the exit condition.
Fixes: f09177ca5f242 ("sched/topology: Introduce for_each_node_numadist() iterator")
Signed-off-by: Andrea Righi <arighi@xxxxxxxxxx>
---
include/linux/topology.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/topology.h b/include/linux/topology.h
index cd6b4bdc9cfd3..095cda6dbf041 100644
--- a/include/linux/topology.h
+++ b/include/linux/topology.h
@@ -310,7 +310,7 @@ sched_numa_hop_mask(unsigned int node, unsigned int hops)
#define for_each_node_numadist(node, unvisited) \
for (int __start = (node), \
(node) = nearest_node_nodemask((__start), &(unvisited)); \
- (node) < MAX_NUMNODES; \
+ (node) < MAX_NUMNODES && (node) != NUMA_NO_NODE; \
node_clear((node), (unvisited)), \
(node) = nearest_node_nodemask((__start), &(unvisited)))
When NUMA is enabled, you add an extra conditional which is never the
true.
When disabled, I think this macro should not be available, or more
likely have a stub implementation, similar to for_each_node_mask()
Thanks,
Yury
Return-Path: <linux-kernel+bounces-673329-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 44B7F41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:15:07 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 270161898123
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:15:17 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 2A927290BAD;
Wed, 4 Jun 2025 14:14:58 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="D0A+vQ7x"
Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0D5A71E52D;
Wed, 4 Jun 2025 14:14:29 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=198.175.65.17
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749046482; cv=fail; b=mf4Ljafckm+ILNqdeYmV/fIjaAMloLwzzNtCsd+BGrrC2Mjrva4fPFAhQSltMlCILPwWijOxd6fvZSZr5jm6DaLnWJ1C55vn/YAqxrT4kp0xp7ZvlbYpGtH/5R2oond778B44YdyZ5ETwQnhD+1HYsse7Wrinn3mng+05h9hhBQ=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749046482; c=relaxed/simple;
bh=ZqhRBcsjjJ3+DAVwWCLmlQ0w2XHjBrRMqiyS2WEWVyY=;
h=Date:From:To:CC:Subject:Message-ID:Content-Type:
Content-Disposition:MIME-Version; b=ctbjQcxVQYNPxjY8XDFZxVbrsSfi6elVJLT6mA3TNT0aMSZOo33/5gNb4LWWkVaPRqgRqF3aUTFAFDPRu8XOUuc6nV3JSww8m++rIsh0uSvgCpJIOKHz+vmantWQQHWR2gbC08/BhuUbx5wEWXM56VxTZNUO8u7B78pRCNFidec=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=D0A+vQ7x; arc=fail smtp.client-ip=198.175.65.17
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
t=1749046470; x=1780582470;
h=date:from:to:cc:subject:message-id:
content-transfer-encoding:mime-version;
bh=ZqhRBcsjjJ3+DAVwWCLmlQ0w2XHjBrRMqiyS2WEWVyY=;
b=D0A+vQ7xM11+fcH7mDpuMKpLwuSsDzv6R3UD26gE/gnYsUvVfiU+TxOD
6DdlLdSe9LxTlHvsE+E8sNknw7+Neg8KKI2GgT+hVyH6+NiRE/GRj1zVX
N605kvmSFWjdE8Jp6hoSSl//Bj7s1Znkl1XRxhHplc+YmUCU3lPsS3N6v
pQkRsSqSGNfgeHBVBoi7tiBE60GhrA+hjR0fwN5FDFWF4lABBsWG3ZwP0
DtxN7xdKuWeNIOk46umuVf6iRAdLvT4JIcK5O7eBu1vkEuAFeXYWUNv97
gQCHIDi4LGGbCTvotiiRRR9UrL7vN+/wJGFrtBMRj9I50VMJBMJZzY9Hx
g==;
X-CSE-ConnectionGUID: PHzfKm8mSoiUzuFiqKQADA==
X-CSE-MsgGUID: qOKj6UXdSb+QuLuUL0jSlQ==
X-IronPort-AV: E=McAfee;i="6800,10657,11454"; a="51133959"
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="51133959"
Received: from fmviesa003.fm.intel.com ([10.60.135.143])
by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 07:14:26 -0700
X-CSE-ConnectionGUID: Z6vHcuHGTWyLfJi3yDJd3A==
X-CSE-MsgGUID: jOc0U8zUSzCXlnSGFbLO3g==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="149037109"
Received: from orsmsx903.amr.corp.intel.com ([10.22.229.25])
by fmviesa003.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 07:14:22 -0700
Received: from ORSMSX901.amr.corp.intel.com (10.22.229.23) by
ORSMSX903.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.2.1544.25; Wed, 4 Jun 2025 07:14:18 -0700
Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by
ORSMSX901.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.2.1544.25 via Frontend Transport; Wed, 4 Jun 2025 07:14:18 -0700
Received: from NAM10-DM6-obe.outbound.protection.outlook.com (40.107.93.53) by
edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.1.2507.55; Wed, 4 Jun 2025 07:14:17 -0700
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=KskBi1gF0Y4OSkvDImTLxxZfdFbxi9JBTbVBWxMaDvwb0X0izhhbrT6YbKXYw+wvV6gFxqR5f/YZrn7r0Az/348uKIi+uAbl8QrtrvujhA1EI4GjxXKMpKEuytwb1MvFNlBCd0Ys1Z04AXRjrvzWy3khSXSh3IwYrUpbUUwhcE0hfuDJO7pOKeMJd49spPC2iabeCGwM4oD2sWgnzFs/Fcs7kRqGUz6nLsw6QWRLpCTP/IWpIM7rd/5vaB0LC0rbBBfsTV40HeNtb32O/3FK118sovZo8D9px1A5LMWQSrfj8/sZgBukt8mkLyST0TzWWBXjd3+I92SFEA/pDBZQtg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=X4YwRNEcBqgb7A2sHMOCpFMorehUF/INfUNq1C8X3+U=;
b=CyhtOQk34vStndvOAje+RhAo2vRUuXYh+HCHQcTH3RPVFaHc9AR1IfF7MqaOUXTtiwoqBeStFFR6ZcD5vUAK5R1Y0iJXc1gRv91TLmn3CcnEGjdj3et4nAuv14rTDRL78+nSMF28M4TGtKYc3D+IRPZGxNzdDUbpdAzi1fIueJSi0/Qw+8UCWxJZbXRnBUU22JYMzyFnqG/vBzOZPSiEi994WW+3BppupPuUWtAFA+xbeXFqnP3Ywy1HAJxW+Jt8tromJvYGFUkxHd1zCSmRjyDpF2td+GnbZobQ3ToRnrHKf0qMgAfQdIllzB5D+sG2L9te8WCw7+MYowjgO5Mw7Q==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com;
dkim=pass header.d=intel.com; arc=none
Authentication-Results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=intel.com;
Received: from LV3PR11MB8603.namprd11.prod.outlook.com (2603:10b6:408:1b6::9)
by PH0PR11MB7657.namprd11.prod.outlook.com (2603:10b6:510:26c::21) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8769.34; Wed, 4 Jun
2025 14:14:10 +0000
Received: from LV3PR11MB8603.namprd11.prod.outlook.com
([fe80::4622:29cf:32b:7e5c]) by LV3PR11MB8603.namprd11.prod.outlook.com
([fe80::4622:29cf:32b:7e5c%3]) with mapi id 15.20.8792.034; Wed, 4 Jun 2025
14:14:10 +0000
Date: Wed, 4 Jun 2025 22:13:58 +0800
From: kernel test robot <oliver.sang@xxxxxxxxx>
To: "Rafael J. Wysocki" <rafael.j.wysocki@xxxxxxxxx>
CC: <oe-lkp@xxxxxxxxxxxxxxx>, <lkp@xxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>,
Artem Bityutskiy <artem.bityutskiy@xxxxxxxxxxxxxxx>, Christian Loehle
<christian.loehle@xxxxxxx>, Aboorva Devarajan <aboorvad@xxxxxxxxxxxxx>,
<linux-pm@xxxxxxxxxxxxxxx>, <oliver.sang@xxxxxxxxx>
Subject: [linus:master] [cpuidle] 85975daeaa: stress-ng.sem-sysv.ops_per_sec
15.2% regression
Message-ID: <202506042113.498dd81a-lkp@xxxxxxxxx>
Content-Type: text/plain; charset="iso-8859-1"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
X-ClientProxiedBy: KL1PR01CA0100.apcprd01.prod.exchangelabs.com
(2603:1096:820:3::16) To LV3PR11MB8603.namprd11.prod.outlook.com
(2603:10b6:408:1b6::9)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: LV3PR11MB8603:EE_|PH0PR11MB7657:EE_
X-MS-Office365-Filtering-Correlation-Id: a7de8d7a-dee9-4a4b-d27f-08dda372127d
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|376014|13003099007;
X-Microsoft-Antispam-Message-Info: =?iso-8859-1?Q?w5KhsTSrF5Nzt0SiTRLlct1NoeOxlhnABtJlVuPpL9pyNVZMizQ3tScRf8?=
=?iso-8859-1?Q?oxVTCOHhocOC3+VqW/gIuuShW3hOLs6FpNi6wKISSd7wdzyh20U9AytRuJ?=
=?iso-8859-1?Q?T7DP6GuaYwdf+Mj08e+ooMhbbSSRT1Pr6RWJaq6YAbLHt0kkvSJD1z7si7?=
=?iso-8859-1?Q?toA95hYTsJH4bOSzk5V0atQMvc9un2EgfvGnR+FSAR3iSGezOUJTczOqmo?=
=?iso-8859-1?Q?Llnx5VG6GH7oO6kayul0WcRMzAecZDksIjWFUqkKnf92CvXqL3oaMbERbi?=
=?iso-8859-1?Q?R/2LzBNpd+5rcSFUu3+3wr2zm+lG/fZWsUdwm+zInnhoaBTnZowTfSE4wE?=
=?iso-8859-1?Q?lQI0EyTCWaRwW6UsnJJr4FS3lbbeFu3JarQWDd3gsexxXEuTaWxE9cR9SF?=
=?iso-8859-1?Q?P2YJwH8/mQGt8dwrpJIqzXBh9RCO43WXQIwrUE0b5HsClzMiT6Ql2BXfkD?=
=?iso-8859-1?Q?F8IrjpmyR+Z4fSeksCZzqavlZK/ggVmhjyCe9XZZNf3iY8wZjeacRUxfcv?=
=?iso-8859-1?Q?mPEMyr34PWOsXQvs6X6OeowPO9S6sNSFvAwzz+ddJVOCkE+NS1Cp9u+z2R?=
=?iso-8859-1?Q?BiMczmDoqIoOAzyZh/1M+PisixfsUdujAyxUh0AGzk14+tNcue7dwXYk4+?=
=?iso-8859-1?Q?niJe6NWZkBghQUF6QjVNRj8iHB/sUyDzxHCg97Kq0kOZ+zKrIa+il61oF0?=
=?iso-8859-1?Q?DNIHIJoGB4YomR4u5QDTmAUCKO48oyNR0hKCJaP/lSiv28zgnPFTWE39Nv?=
=?iso-8859-1?Q?RJinLiIwU1leWGF343ufmRF4jc5sElFoBOaahJCq+tDYhA060lKUBLpVRQ?=
=?iso-8859-1?Q?K62AiX1bP0fWbAQqTZsS/GOdEYg884Mw1Qu40w1XZZ+FiXFJzl5jVYtmrd?=
=?iso-8859-1?Q?Lx40YlbCz8rfvfKXO1+o3FN6rYbZG3L6cDR9IG6m6mf+NNVb4DmqBlKVsT?=
=?iso-8859-1?Q?JKSU8dbkAQKZ9GdfSzuMMlXrIiiFZCBB+aoCQbXUNYu7UNrT+7gx9i9Jl2?=
=?iso-8859-1?Q?8GhqobYK7wS084nC/pJ8bNqVRKFK48pW74sZYXN/MCVBNxghLqebbir/eB?=
=?iso-8859-1?Q?KLqrjoSf5QCss53ah54CLNN9BlYMQY51JrAo/eNo/DeQjs9/NP9TklJfwH?=
=?iso-8859-1?Q?srHCl1HAlb6515i42bSn8U5rFg1ly9qDfdJYOKZphdsCX61wkhLUR7XgaH?=
=?iso-8859-1?Q?0VDG8QhxZ4Z1OMGTDhEdumXROj3/tJQ3iX5GRTOnq5aOee4FFvpOH5iPmr?=
=?iso-8859-1?Q?TiwooIL8m9BMwzuSOEWAQjt7RhwgQMDu/nWOd7sbrGaniXjLT4z4I7I9pu?=
=?iso-8859-1?Q?U3c9bbC4UlJGZ4aq0q0K4XBE9hDlqcxnYRsXnn2fvi9ZqxrLdI0X9X6YBx?=
=?iso-8859-1?Q?oB7rKgCvGDXLDKoZ7asN8VF1UYjJCXdczC1CWn7bPuqT8Vu8w6AhbqWZtL?=
=?iso-8859-1?Q?q4CTi/fDYSLtYkLu?=
X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:LV3PR11MB8603.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(13003099007);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-1?Q?99oicJdH7zzxL0P4lD7vGvddp1n8hA1qHihQALP/9mCu6c6ikuW32hZDdX?=
=?iso-8859-1?Q?MWCCbRZ9E62W2pOumlgrUFYCEOR+uAJmSrxAbG/YgGgJBcVF+x5bz0V+OI?=
=?iso-8859-1?Q?0kSFU6avTHAd7bw47qYnjo2rw1plNKUTkoZGgU5QFcLg/i+OiryS+D5jY1?=
=?iso-8859-1?Q?Z9Jy82llDTTLpeXLR3hhH+dUMEwq8nRAhhhvJBTy6sgdKZWMfBeCXpckbn?=
=?iso-8859-1?Q?HPw4l8dac7R098TdloMYS+lmOpQzp2fgMVya/axmxCTp5b9MGgkV/5GZbK?=
=?iso-8859-1?Q?LdcIDvOhWe+hxYoFIKt07vn7Z+j8ekniehyoetaobBBFuy0y1lgYryVjw4?=
=?iso-8859-1?Q?ANZnMQjM0ADuksfV649ONCvH0/xRtNOg5RZ/1TgHA4jSW3/boIJxwyPzuO?=
=?iso-8859-1?Q?RbVb7IgRCVGB4O/keSMD3yBM/xrDeGXkAciFmhhW/xt/j8egI+J1IJHBke?=
=?iso-8859-1?Q?kFDMNbf34RKWlKAK2HFkcyR+zj4t74BE2NxfBuqF+zK+SnIEv3b5BeSGmv?=
=?iso-8859-1?Q?mayHHXrHeNiXBD1PAlYJVvfJe3kt12/uUgNmcRP1tLh6kLgTtnB/sEX87E?=
=?iso-8859-1?Q?yGptGR6BRw3xqpmQtVA8WdH1hiOYxIZGES5ZmZaXbWGpvBqd5oegVm32rB?=
=?iso-8859-1?Q?c/aYNSMgiXCmnwEVVpVN+GJXP3Yc4FKhWY0lbdSHTWpdj4CDmOwy/qr3Hl?=
=?iso-8859-1?Q?l+DplXb5TBXsrFhSNY0Uqb2c4u22hue1gu8QXc365c1whRydfLgelu2hbM?=
=?iso-8859-1?Q?mmaDtPzyjTf3zruj+PvghcDtRWHrRa2HitzKo6tdHjEURldQJCpRJA3hky?=
=?iso-8859-1?Q?at9FctFUPtUZH4XD1sHzqa/ogWI2lpclRAUcUMzi2uRae6MBAMnkmXiSkH?=
=?iso-8859-1?Q?mwQucthR5Sn0e3324ru2cLHk4CyUmX9B2Dp/RJpEQqYAqgZBaeY3W0yo8l?=
=?iso-8859-1?Q?VvrOLVunvA/cJbZDvss9LxqEN2yTR+o43l8NNOjjxEhnUGJsjXerlYEbv2?=
=?iso-8859-1?Q?58Obx7QwRmIZJD7fI7vmwvyybNDEXbG8iz6AuXbz3a9IfJlb+8Zm9gXn6v?=
=?iso-8859-1?Q?7c+r7TteITe/gnDhNW4wZatatn6vsHTgi3CQORgPFoTIMp6XR4AYsg5Aj1?=
=?iso-8859-1?Q?nnOSvbriqt9uaf3VPF45ki/8TU4qduCTIiyQ0aQepVm8vuhxA6BXbsdkja?=
=?iso-8859-1?Q?alDPcFZ/QnOixLf5FX7+ZppKcYyNi10khFkMAuDvP9pBMSyPvKIa9gAuc7?=
=?iso-8859-1?Q?xSPkh+atasTjKYN/mOOPc6hc/Ws+Q06T5DrKs+Be4NTXS1zeucNGcKBO5/?=
=?iso-8859-1?Q?U/5vuDXi/kiwb3YeDu57hTFnISGp3GOnKqSEWmaBdUD2HJ4XThR87pfzmm?=
=?iso-8859-1?Q?9c4ArNHnh3zUM5Rb6WREFY5byk+Fs/SuJ9cKOhjrsL6ldZr1xhk0/eLdu8?=
=?iso-8859-1?Q?CVqjZ4sfV+ZH97gRkgZ7KePLJX5QebZ/TKJDxinAN4HnOdVfGZinZ9THfY?=
=?iso-8859-1?Q?kEqesqMiFSUNMVfWQ5RijPIWaTdEFHLpVN3vEXrmpiOv7kaMh/8PpvBhxo?=
=?iso-8859-1?Q?csniT5D8Z/6A5JZQ/7fW3vSbgpBxqZeD06KCmObREZM7kyOpKrlidvvTqs?=
=?iso-8859-1?Q?mBAhYnPdW+7rYZrMQ8opGf9nenf5jB1pte?=
X-MS-Exchange-CrossTenant-Network-Message-Id: a7de8d7a-dee9-4a4b-d27f-08dda372127d
X-MS-Exchange-CrossTenant-AuthSource: LV3PR11MB8603.namprd11.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 14:14:09.9539
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: Ks7DioHV/1Ie081CT3ks2noaFN897aVdw5JIEe6JxrN3sjHvynd32YXnOy/rhWr1V2SKKIt88ot2piMNmqF84A==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB7657
X-OriginatorOrg: intel.com
X-Spam-Status: No, score=-2.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_BL_SPAMCOP_NET,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hello,
we reported
"[linux-next:master] [cpuidle] 85975daeaa: filebench.sum_operations/s 67.2% improvement"
in
https://lore.kernel.org/all/202503102146.28d80a16-lkp@xxxxxxxxx/
now we got more bisect results for this commit. FYI.
kernel test robot noticed a 15.2% regression of stress-ng.sem-sysv.ops_per_sec on:
commit: 85975daeaa4d6ec560bfcd354fc9c08ad7f38888 ("cpuidle: menu: Avoid discarding useful information")
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master
[still regression on linus/masteri f66bc387efbee59978e076ce9bf123ac353b389c]
[still regression on linux-next/master 3a83b350b5be4b4f6bd895eecf9a92080200ee5d]
testcase: stress-ng
config: x86_64-rhel-9.4
compiler: gcc-12
test machine: 224 threads 2 sockets Intel(R) Xeon(R) Platinum 8480CTDX (Sapphire Rapids) with 256G memory
parameters:
nr_threads: 100%
testtime: 60s
test: sem-sysv
cpufreq_governor: performance
In addition to that, the commit also has significant impact on the following tests:
+------------------+------------------------------------------------------------------------------------------------+
| testcase: change | stress-ng: stress-ng.fcntl.ops_per_sec 28.8% improvement |
| test machine | 128 threads 2 sockets Intel(R) Xeon(R) Platinum 8358 CPU @ 2.60GHz (Ice Lake) with 128G memory |
| test parameters | cpufreq_governor=performance |
| | disk=1HDD |
| | fs=btrfs |
| | nr_threads=100% |
| | test=fcntl |
| | testtime=60s |
+------------------+------------------------------------------------------------------------------------------------+
| testcase: change | stress-ng: stress-ng.dirdeep.ops_per_sec 13.2% improvement |
| test machine | 128 threads 2 sockets Intel(R) Xeon(R) Platinum 8358 CPU @ 2.60GHz (Ice Lake) with 128G memory |
| test parameters | cpufreq_governor=performance |
| | disk=1HDD |
| | fs=btrfs |
| | nr_threads=100% |
| | test=dirdeep |
| | testtime=60s |
+------------------+------------------------------------------------------------------------------------------------+
| testcase: change | lmbench3: lmbench3.TCP.socket.bandwidth.10MB.MB/sec 7.3% regression |
| test machine | 224 threads 2 sockets Intel(R) Xeon(R) Platinum 8480CTDX (Sapphire Rapids) with 512G memory |
| test parameters | cpufreq_governor=performance |
| | mode=development |
| | nr_threads=50% |
| | test=TCP |
| | test_memory_size=50% |
+------------------+------------------------------------------------------------------------------------------------+
| testcase: change | stress-ng: stress-ng.symlink.ops_per_sec 6.5% regression |
| test machine | 128 threads 2 sockets Intel(R) Xeon(R) Platinum 8358 CPU @ 2.60GHz (Ice Lake) with 128G memory |
| test parameters | cpufreq_governor=performance |
| | disk=1HDD |
| | fs=btrfs |
| | nr_threads=100% |
| | test=symlink |
| | testtime=60s |
+------------------+------------------------------------------------------------------------------------------------+
| testcase: change | stress-ng: stress-ng.file-ioctl.ops_per_sec 81.0% improvement |
| test machine | 128 threads 2 sockets Intel(R) Xeon(R) Platinum 8358 CPU @ 2.60GHz (Ice Lake) with 128G memory |
| test parameters | cpufreq_governor=performance |
| | disk=1HDD |
| | fs=ext4 |
| | nr_threads=100% |
| | test=file-ioctl |
| | testtime=60s |
+------------------+------------------------------------------------------------------------------------------------+
| testcase: change | filebench: filebench.sum_operations/s 63.2% improvement |
| test machine | 128 threads 2 sockets Intel(R) Xeon(R) Platinum 8358 CPU @ 2.60GHz (Ice Lake) with 128G memory |
| test parameters | cpufreq_governor=performance |
| | disk=1HDD |
| | fs2=cifs |
| | fs=ext4 |
| | test=makedirs.f |
+------------------+------------------------------------------------------------------------------------------------+
| testcase: change | filebench: filebench.sum_operations/s 1.1% improvement |
| test machine | 128 threads 2 sockets Intel(R) Xeon(R) Platinum 8358 CPU @ 2.60GHz (Ice Lake) with 128G memory |
| test parameters | cpufreq_governor=performance |
| | disk=1HDD |
| | fs2=cifs |
| | fs=xfs |
| | test=singlestreamwritedirect.f |
+------------------+------------------------------------------------------------------------------------------------+
| testcase: change | filebench: filebench.sum_operations/s 67.2% improvement |
| test machine | 128 threads 2 sockets Intel(R) Xeon(R) Platinum 8358 CPU @ 2.60GHz (Ice Lake) with 128G memory |
| test parameters | cpufreq_governor=performance |
| | disk=1HDD |
| | fs2=cifs |
| | fs=btrfs |
| | test=makedirs.f |
+------------------+------------------------------------------------------------------------------------------------+
| testcase: change | fxmark: fxmark.ssd_xfs_DWSL_4_directio.works/sec 23.1% improvement |
| test machine | 128 threads 2 sockets Intel(R) Xeon(R) Platinum 8358 CPU @ 2.60GHz (Ice Lake) with 128G memory |
| test parameters | cpufreq_governor=performance |
| | directio=directio |
| | disk=1SSD |
| | fstype=xfs |
| | media=ssd |
| | test=DWSL |
| | thread_nr=4 |
+------------------+------------------------------------------------------------------------------------------------+
| testcase: change | fxmark: fxmark.ssd_ext4_DRBM_4_directio.works/sec 23.0% improvement |
| test machine | 128 threads 2 sockets Intel(R) Xeon(R) Platinum 8358 CPU @ 2.60GHz (Ice Lake) with 128G memory |
| test parameters | cpufreq_governor=performance |
| | directio=directio |
| | disk=1SSD |
| | fstype=ext4 |
| | media=ssd |
| | test=DRBM |
| | thread_nr=4 |
+------------------+------------------------------------------------------------------------------------------------+
| testcase: change | fxmark: fxmark.ssd_ext4_DWSL_4_directio.works/sec 113.8% improvement |
| test machine | 128 threads 2 sockets Intel(R) Xeon(R) Platinum 8358 CPU @ 2.60GHz (Ice Lake) with 128G memory |
| test parameters | cpufreq_governor=performance |
| | directio=directio |
| | disk=1SSD |
| | fstype=ext4 |
| | media=ssd |
| | test=DWSL |
| | thread_nr=4 |
+------------------+------------------------------------------------------------------------------------------------+
| testcase: change | fxmark: fxmark.ssd_ext4_no_jnl_DRBM_4_directio.works/sec 21.9% improvement |
| test machine | 128 threads 2 sockets Intel(R) Xeon(R) Platinum 8358 CPU @ 2.60GHz (Ice Lake) with 128G memory |
| test parameters | cpufreq_governor=performance |
| | directio=directio |
| | disk=1SSD |
| | fstype=ext4_no_jnl |
| | media=ssd |
| | test=DRBM |
| | thread_nr=4 |
+------------------+------------------------------------------------------------------------------------------------+
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <oliver.sang@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-lkp/202506042113.498dd81a-lkp@xxxxxxxxx
Details are as below:
-------------------------------------------------------------------------------------------------->
The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20250604/202506042113.498dd81a-lkp@xxxxxxxxx
=========================================================================================
compiler/cpufreq_governor/kconfig/nr_threads/rootfs/tbox_group/test/testcase/testtime:
gcc-12/performance/x86_64-rhel-9.4/100%/debian-12-x86_64-20240206.cgz/lkp-spr-r02/sem-sysv/stress-ng/60s
commit:
8de7606f0f ("cpuidle: menu: Eliminate outliers on both ends of the sample set")
85975daeaa ("cpuidle: menu: Avoid discarding useful information")
8de7606f0fe2bf5a 85975daeaa4d6ec560bfcd354fc
---------------- ---------------------------
%stddev %change %stddev
\ | \
1061229 -1.0% 1051114 proc-vmstat.nr_file_pages
179386 -5.6% 169271 proc-vmstat.nr_shmem
380916 -15.1% 323277 vmstat.system.cs
46994 � 2% +81.9% 85490 vmstat.system.in
0.05 � 4% +0.0 0.08 � 2% mpstat.cpu.all.irq%
0.04 � 4% +0.0 0.06 � 4% mpstat.cpu.all.soft%
0.38 -0.1 0.32 mpstat.cpu.all.sys%
5.34 +10.2% 5.88 perf-sched.total_wait_and_delay.average.ms
5.34 +10.2% 5.88 perf-sched.total_wait_time.average.ms
3.06 +9.6% 3.35 perf-sched.wait_and_delay.avg.ms.schedule_hrtimeout_range.__do_semtimedop.do_semtimedop.__x64_sys_semtimedop
3.05 +9.6% 3.34 perf-sched.wait_time.avg.ms.schedule_hrtimeout_range.__do_semtimedop.do_semtimedop.__x64_sys_semtimedop
11910911 -15.2% 10095779 stress-ng.sem-sysv.ops
198513 -15.2% 168261 stress-ng.sem-sysv.ops_per_sec
86.60 -7.7% 79.90 stress-ng.time.percent_of_cpu_this_job_got
11913083 -15.2% 10097903 stress-ng.time.voluntary_context_switches
1.67 � 4% +10.1% 1.84 � 4% perf-stat.i.MPKI
1.86 � 4% +0.1 1.98 perf-stat.i.branch-miss-rate%
393241 -15.1% 333696 perf-stat.i.context-switches
1.41 +8.2% 1.52 perf-stat.i.cpi
0.78 -5.7% 0.74 perf-stat.i.ipc
1.79 -14.9% 1.52 perf-stat.i.metric.K/sec
2.45 � 5% +0.2 2.66 perf-stat.overall.branch-miss-rate%
386812 -15.1% 328226 perf-stat.ps.context-switches
16.22 -7.7 8.56 � 5% perf-profile.calltrace.cycles-pp.intel_idle_xstate.cpuidle_enter_state.cpuidle_enter.cpuidle_idle_call.do_idle
34.64 -3.4 31.20 perf-profile.calltrace.cycles-pp.stress_sem_sysv
31.37 -3.2 28.18 perf-profile.calltrace.cycles-pp.semtimedop.stress_sem_sysv
29.16 -2.8 26.32 perf-profile.calltrace.cycles-pp.entry_SYSCALL_64_after_hwframe.semtimedop.stress_sem_sysv
29.07 -2.8 26.24 perf-profile.calltrace.cycles-pp.do_syscall_64.entry_SYSCALL_64_after_hwframe.semtimedop.stress_sem_sysv
4.77 -2.3 2.44 � 5% perf-profile.calltrace.cycles-pp.tick_nohz_idle_exit.do_idle.cpu_startup_entry.start_secondary.common_startup_64
2.90 � 2% -1.5 1.37 � 7% perf-profile.calltrace.cycles-pp.tick_nohz_idle_stop_tick.cpuidle_idle_call.do_idle.cpu_startup_entry.start_secondary
2.86 � 2% -1.5 1.35 � 7% perf-profile.calltrace.cycles-pp.tick_nohz_stop_tick.tick_nohz_idle_stop_tick.cpuidle_idle_call.do_idle.cpu_startup_entry
12.16 -1.5 10.69 perf-profile.calltrace.cycles-pp.__x64_sys_semtimedop.do_syscall_64.entry_SYSCALL_64_after_hwframe.semtimedop.stress_sem_sysv
10.18 � 2% -1.5 8.72 � 2% perf-profile.calltrace.cycles-pp.flush_smp_call_function_queue.do_idle.cpu_startup_entry.start_secondary.common_startup_64
2.53 � 2% -1.4 1.13 � 7% perf-profile.calltrace.cycles-pp.tick_nohz_restart_sched_tick.tick_nohz_idle_exit.do_idle.cpu_startup_entry.start_secondary
11.60 -1.4 10.24 perf-profile.calltrace.cycles-pp.do_semtimedop.__x64_sys_semtimedop.do_syscall_64.entry_SYSCALL_64_after_hwframe.semtimedop
11.07 -1.3 9.80 perf-profile.calltrace.cycles-pp.__do_semtimedop.do_semtimedop.__x64_sys_semtimedop.do_syscall_64.entry_SYSCALL_64_after_hwframe
9.44 � 2% -1.1 8.37 perf-profile.calltrace.cycles-pp.__flush_smp_call_function_queue.flush_smp_call_function_queue.do_idle.cpu_startup_entry.start_secondary
14.14 -1.1 13.08 perf-profile.calltrace.cycles-pp.do_semtimedop.do_syscall_64.entry_SYSCALL_64_after_hwframe.semtimedop.stress_sem_sysv
13.68 -1.0 12.69 perf-profile.calltrace.cycles-pp.__do_semtimedop.do_semtimedop.do_syscall_64.entry_SYSCALL_64_after_hwframe.semtimedop
7.32 -0.7 6.57 � 2% perf-profile.calltrace.cycles-pp.schedule_hrtimeout_range.__do_semtimedop.do_semtimedop.__x64_sys_semtimedop.do_syscall_64
0.92 � 30% -0.6 0.28 �100% perf-profile.calltrace.cycles-pp.entry_SYSCALL_64.semtimedop.stress_sem_sysv
1.18 � 4% -0.6 0.54 � 33% perf-profile.calltrace.cycles-pp.hrtimer_start_range_ns.tick_nohz_restart_sched_tick.tick_nohz_idle_exit.do_idle.cpu_startup_entry
1.40 � 3% -0.6 0.76 � 7% perf-profile.calltrace.cycles-pp.hrtimer_start_range_ns.tick_nohz_stop_tick.tick_nohz_idle_stop_tick.cpuidle_idle_call.do_idle
1.23 � 4% -0.5 0.69 � 7% perf-profile.calltrace.cycles-pp.__hrtimer_start_range_ns.hrtimer_start_range_ns.tick_nohz_stop_tick.tick_nohz_idle_stop_tick.cpuidle_idle_call
1.15 � 5% -0.5 0.62 � 6% perf-profile.calltrace.cycles-pp.tick_nohz_stop_idle.tick_nohz_idle_exit.do_idle.cpu_startup_entry.start_secondary
1.13 � 6% -0.5 0.61 � 6% perf-profile.calltrace.cycles-pp.nr_iowait_cpu.tick_nohz_stop_idle.tick_nohz_idle_exit.do_idle.cpu_startup_entry
6.13 -0.5 5.61 � 2% perf-profile.calltrace.cycles-pp.schedule.schedule_hrtimeout_range.__do_semtimedop.do_semtimedop.__x64_sys_semtimedop
5.95 -0.5 5.45 � 2% perf-profile.calltrace.cycles-pp.__schedule.schedule.schedule_hrtimeout_range.__do_semtimedop.do_semtimedop
5.20 � 2% -0.5 4.70 � 2% perf-profile.calltrace.cycles-pp.schedule_idle.do_idle.cpu_startup_entry.start_secondary.common_startup_64
1.24 � 4% -0.5 0.75 � 6% perf-profile.calltrace.cycles-pp.llist_reverse_order.__flush_smp_call_function_queue.flush_smp_call_function_queue.do_idle.cpu_startup_entry
5.01 � 2% -0.5 4.54 � 2% perf-profile.calltrace.cycles-pp.__schedule.schedule_idle.do_idle.cpu_startup_entry.start_secondary
7.84 -0.4 7.40 � 2% perf-profile.calltrace.cycles-pp.sched_ttwu_pending.__flush_smp_call_function_queue.flush_smp_call_function_queue.do_idle.cpu_startup_entry
1.53 � 3% -0.4 1.13 � 3% perf-profile.calltrace.cycles-pp.start_dl_timer.enqueue_dl_entity.dl_server_start.enqueue_task_fair.enqueue_task
0.88 � 3% -0.4 0.49 � 34% perf-profile.calltrace.cycles-pp.clockevents_program_event.__hrtimer_start_range_ns.hrtimer_start_range_ns.tick_nohz_stop_tick.tick_nohz_idle_stop_tick
2.21 � 5% -0.4 1.82 � 3% perf-profile.calltrace.cycles-pp.__smp_call_single_queue.ttwu_queue_wakelist.try_to_wake_up.wake_up_q.__do_semtimedop
1.33 � 4% -0.4 0.96 � 3% perf-profile.calltrace.cycles-pp.hrtimer_start_range_ns.start_dl_timer.enqueue_dl_entity.dl_server_start.enqueue_task_fair
1.88 � 3% -0.4 1.51 � 3% perf-profile.calltrace.cycles-pp.enqueue_dl_entity.dl_server_start.enqueue_task_fair.enqueue_task.ttwu_do_activate
1.91 � 3% -0.4 1.55 � 3% perf-profile.calltrace.cycles-pp.dl_server_start.enqueue_task_fair.enqueue_task.ttwu_do_activate.sched_ttwu_pending
1.21 � 3% -0.4 0.86 � 3% perf-profile.calltrace.cycles-pp.__hrtimer_start_range_ns.hrtimer_start_range_ns.start_dl_timer.enqueue_dl_entity.dl_server_start
4.31 � 2% -0.3 3.96 � 2% perf-profile.calltrace.cycles-pp.do_smart_update.__do_semtimedop.do_semtimedop.do_syscall_64.entry_SYSCALL_64_after_hwframe
1.08 � 3% -0.3 0.74 � 4% perf-profile.calltrace.cycles-pp.get_nohz_timer_target.__hrtimer_start_range_ns.hrtimer_start_range_ns.start_dl_timer.enqueue_dl_entity
1.06 � 3% -0.3 0.72 � 5% perf-profile.calltrace.cycles-pp.idle_cpu.get_nohz_timer_target.__hrtimer_start_range_ns.hrtimer_start_range_ns.start_dl_timer
4.22 � 2% -0.3 3.89 � 2% perf-profile.calltrace.cycles-pp.update_queue.do_smart_update.__do_semtimedop.do_semtimedop.do_syscall_64
1.50 � 3% -0.3 1.20 � 2% perf-profile.calltrace.cycles-pp.call_function_single_prep_ipi.__smp_call_single_queue.ttwu_queue_wakelist.try_to_wake_up.wake_up_q
0.55 � 5% -0.3 0.26 �100% perf-profile.calltrace.cycles-pp.__enqueue_entity.enqueue_entity.enqueue_task_fair.enqueue_task.ttwu_do_activate
2.66 � 4% -0.3 2.38 � 2% perf-profile.calltrace.cycles-pp.ttwu_queue_wakelist.try_to_wake_up.wake_up_q.__do_semtimedop.do_semtimedop
1.18 � 3% -0.3 0.91 � 5% perf-profile.calltrace.cycles-pp.pick_next_task_fair.__pick_next_task.__schedule.schedule_idle.do_idle
1.22 � 3% -0.3 0.95 � 5% perf-profile.calltrace.cycles-pp.__pick_next_task.__schedule.schedule_idle.do_idle.cpu_startup_entry
2.07 � 3% -0.3 1.82 � 2% perf-profile.calltrace.cycles-pp.dequeue_entity.dequeue_entities.dequeue_task_fair.try_to_block_task.__schedule
2.40 � 2% -0.2 2.16 � 3% perf-profile.calltrace.cycles-pp.syscall_exit_to_user_mode.do_syscall_64.entry_SYSCALL_64_after_hwframe.semtimedop.stress_sem_sysv
3.29 � 2% -0.2 3.05 perf-profile.calltrace.cycles-pp.try_to_block_task.__schedule.schedule.schedule_hrtimeout_range.__do_semtimedop
3.23 � 2% -0.2 3.00 perf-profile.calltrace.cycles-pp.dequeue_task_fair.try_to_block_task.__schedule.schedule.schedule_hrtimeout_range
3.18 � 2% -0.2 2.96 perf-profile.calltrace.cycles-pp.dequeue_entities.dequeue_task_fair.try_to_block_task.__schedule.schedule
1.25 � 4% -0.2 1.07 � 5% perf-profile.calltrace.cycles-pp.find_alloc_undo.__do_semtimedop.do_semtimedop.do_syscall_64.entry_SYSCALL_64_after_hwframe
0.84 � 4% -0.2 0.68 � 4% perf-profile.calltrace.cycles-pp.__rseq_handle_notify_resume.syscall_exit_to_user_mode.do_syscall_64.entry_SYSCALL_64_after_hwframe.semtimedop
2.14 � 3% -0.2 1.99 � 4% perf-profile.calltrace.cycles-pp.stress_semaphore_sysv_thrash.stress_sem_sysv
1.04 � 2% -0.1 0.90 � 5% perf-profile.calltrace.cycles-pp.__get_next_timer_interrupt.tick_nohz_next_event.tick_nohz_get_sleep_length.menu_select.cpuidle_idle_call
0.85 � 4% -0.1 0.73 � 3% perf-profile.calltrace.cycles-pp.dl_server_stop.dequeue_entities.dequeue_task_fair.try_to_block_task.__schedule
0.68 � 2% -0.1 0.58 � 5% perf-profile.calltrace.cycles-pp.lookup_undo.find_alloc_undo.__do_semtimedop.do_semtimedop.do_syscall_64
0.63 � 4% +0.1 0.70 � 4% perf-profile.calltrace.cycles-pp.switch_fpu_return.syscall_exit_to_user_mode.do_syscall_64.entry_SYSCALL_64_after_hwframe.semtimedop
1.15 � 6% +0.1 1.30 � 4% perf-profile.calltrace.cycles-pp.wake_affine.select_task_rq_fair.select_task_rq.try_to_wake_up.wake_up_q
1.11 � 6% +0.2 1.26 � 4% perf-profile.calltrace.cycles-pp.available_idle_cpu.wake_affine.select_task_rq_fair.select_task_rq.try_to_wake_up
1.35 � 2% +0.5 1.83 � 3% perf-profile.calltrace.cycles-pp.tick_nohz_next_event.tick_nohz_get_sleep_length.menu_select.cpuidle_idle_call.do_idle
1.69 +0.5 2.17 � 2% perf-profile.calltrace.cycles-pp.tick_nohz_get_sleep_length.menu_select.cpuidle_idle_call.do_idle.cpu_startup_entry
2.73 � 2% +0.5 3.22 � 2% perf-profile.calltrace.cycles-pp.menu_select.cpuidle_idle_call.do_idle.cpu_startup_entry.start_secondary
0.00 +0.5 0.54 � 4% perf-profile.calltrace.cycles-pp.sched_balance_rq.sched_balance_domains._nohz_idle_balance.handle_softirqs.do_softirq
0.93 � 12% +0.6 1.49 � 8% perf-profile.calltrace.cycles-pp.cpuidle_enter.cpuidle_idle_call.do_idle.cpu_startup_entry.rest_init
0.98 � 10% +0.6 1.55 � 7% perf-profile.calltrace.cycles-pp.cpuidle_idle_call.do_idle.cpu_startup_entry.rest_init.start_kernel
0.00 +0.6 0.57 � 11% perf-profile.calltrace.cycles-pp.tick_nohz_irq_exit.sysvec_apic_timer_interrupt.asm_sysvec_apic_timer_interrupt.cpuidle_enter_state.cpuidle_enter
0.00 +0.6 0.58 � 5% perf-profile.calltrace.cycles-pp.sched_balance_domains.handle_softirqs.__irq_exit_rcu.sysvec_apic_timer_interrupt.asm_sysvec_apic_timer_interrupt
0.00 +0.6 0.59 � 5% perf-profile.calltrace.cycles-pp.sched_tick.update_process_times.tick_nohz_handler.__hrtimer_run_queues.hrtimer_interrupt
0.00 +0.6 0.63 � 6% perf-profile.calltrace.cycles-pp.ktime_get_update_offsets_now.hrtimer_interrupt.__sysvec_apic_timer_interrupt.sysvec_apic_timer_interrupt.asm_sysvec_apic_timer_interrupt
0.00 +0.7 0.74 � 14% perf-profile.calltrace.cycles-pp.tmigr_requires_handle_remote.update_process_times.tick_nohz_handler.__hrtimer_run_queues.hrtimer_interrupt
0.00 +0.7 0.74 � 15% perf-profile.calltrace.cycles-pp.ktime_get.tick_irq_enter.irq_enter_rcu.sysvec_apic_timer_interrupt.asm_sysvec_apic_timer_interrupt
0.00 +0.7 0.75 � 2% perf-profile.calltrace.cycles-pp.sched_balance_domains._nohz_idle_balance.handle_softirqs.do_softirq.flush_smp_call_function_queue
0.00 +0.8 0.80 � 14% perf-profile.calltrace.cycles-pp.tick_irq_enter.irq_enter_rcu.sysvec_apic_timer_interrupt.asm_sysvec_apic_timer_interrupt.cpuidle_enter_state
0.00 +0.8 0.82 � 13% perf-profile.calltrace.cycles-pp.irq_enter_rcu.sysvec_apic_timer_interrupt.asm_sysvec_apic_timer_interrupt.cpuidle_enter_state.cpuidle_enter
0.05 �299% +0.8 0.87 � 7% perf-profile.calltrace.cycles-pp._nohz_idle_balance.handle_softirqs.__irq_exit_rcu.sysvec_call_function_single.asm_sysvec_call_function_single
0.05 �299% +0.8 0.88 � 7% perf-profile.calltrace.cycles-pp.__irq_exit_rcu.sysvec_call_function_single.asm_sysvec_call_function_single.cpuidle_enter_state.cpuidle_enter
0.05 �299% +0.8 0.88 � 7% perf-profile.calltrace.cycles-pp.handle_softirqs.__irq_exit_rcu.sysvec_call_function_single.asm_sysvec_call_function_single.cpuidle_enter_state
0.00 +1.0 0.97 � 10% perf-profile.calltrace.cycles-pp.ktime_get.clockevents_program_event.hrtimer_interrupt.__sysvec_apic_timer_interrupt.sysvec_apic_timer_interrupt
59.91 +1.1 61.00 perf-profile.calltrace.cycles-pp.start_secondary.common_startup_64
59.88 +1.1 60.97 perf-profile.calltrace.cycles-pp.cpu_startup_entry.start_secondary.common_startup_64
59.78 +1.1 60.89 perf-profile.calltrace.cycles-pp.do_idle.cpu_startup_entry.start_secondary.common_startup_64
0.00 +1.2 1.19 � 9% perf-profile.calltrace.cycles-pp.clockevents_program_event.hrtimer_interrupt.__sysvec_apic_timer_interrupt.sysvec_apic_timer_interrupt.asm_sysvec_apic_timer_interrupt
0.00 +1.2 1.22 � 7% perf-profile.calltrace.cycles-pp.__update_blocked_fair.sched_balance_update_blocked_averages._nohz_idle_balance.handle_softirqs.do_softirq
0.00 +1.6 1.60 � 8% perf-profile.calltrace.cycles-pp.update_process_times.tick_nohz_handler.__hrtimer_run_queues.hrtimer_interrupt.__sysvec_apic_timer_interrupt
2.28 � 3% +1.7 3.94 � 5% perf-profile.calltrace.cycles-pp._nohz_idle_balance.handle_softirqs.do_softirq.flush_smp_call_function_queue.do_idle
2.29 � 3% +1.7 3.96 � 5% perf-profile.calltrace.cycles-pp.do_softirq.flush_smp_call_function_queue.do_idle.cpu_startup_entry.rest_init
2.29 � 3% +1.7 3.96 � 5% perf-profile.calltrace.cycles-pp.handle_softirqs.do_softirq.flush_smp_call_function_queue.do_idle.cpu_startup_entry
2.30 � 3% +1.7 3.97 � 5% perf-profile.calltrace.cycles-pp.flush_smp_call_function_queue.do_idle.cpu_startup_entry.rest_init.start_kernel
0.54 � 34% +1.9 2.44 � 7% perf-profile.calltrace.cycles-pp.sched_balance_update_blocked_averages._nohz_idle_balance.handle_softirqs.do_softirq.flush_smp_call_function_queue
0.32 � 81% +2.1 2.38 � 6% perf-profile.calltrace.cycles-pp.__hrtimer_run_queues.hrtimer_interrupt.__sysvec_apic_timer_interrupt.sysvec_apic_timer_interrupt.asm_sysvec_apic_timer_interrupt
0.05 �300% +2.1 2.16 � 7% perf-profile.calltrace.cycles-pp.tick_nohz_handler.__hrtimer_run_queues.hrtimer_interrupt.__sysvec_apic_timer_interrupt.sysvec_apic_timer_interrupt
3.33 � 2% +2.3 5.61 � 4% perf-profile.calltrace.cycles-pp.cpu_startup_entry.rest_init.start_kernel.x86_64_start_reservations.x86_64_start_kernel
3.33 � 2% +2.3 5.61 � 4% perf-profile.calltrace.cycles-pp.do_idle.cpu_startup_entry.rest_init.start_kernel.x86_64_start_reservations
3.33 � 2% +2.3 5.61 � 4% perf-profile.calltrace.cycles-pp.rest_init.start_kernel.x86_64_start_reservations.x86_64_start_kernel.common_startup_64
3.33 � 2% +2.3 5.61 � 4% perf-profile.calltrace.cycles-pp.start_kernel.x86_64_start_reservations.x86_64_start_kernel.common_startup_64
3.33 � 2% +2.3 5.61 � 4% perf-profile.calltrace.cycles-pp.x86_64_start_kernel.common_startup_64
3.33 � 2% +2.3 5.61 � 4% perf-profile.calltrace.cycles-pp.x86_64_start_reservations.x86_64_start_kernel.common_startup_64
63.25 +3.4 66.61 perf-profile.calltrace.cycles-pp.common_startup_64
0.80 � 6% +3.6 4.40 � 6% perf-profile.calltrace.cycles-pp.hrtimer_interrupt.__sysvec_apic_timer_interrupt.sysvec_apic_timer_interrupt.asm_sysvec_apic_timer_interrupt.cpuidle_enter_state
0.85 � 6% +3.7 4.56 � 6% perf-profile.calltrace.cycles-pp.__sysvec_apic_timer_interrupt.sysvec_apic_timer_interrupt.asm_sysvec_apic_timer_interrupt.cpuidle_enter_state.cpuidle_enter
1.81 � 11% +5.6 7.38 � 5% perf-profile.calltrace.cycles-pp.sysvec_apic_timer_interrupt.asm_sysvec_apic_timer_interrupt.cpuidle_enter_state.cpuidle_enter.cpuidle_idle_call
38.11 +5.7 43.79 perf-profile.calltrace.cycles-pp.cpuidle_idle_call.do_idle.cpu_startup_entry.start_secondary.common_startup_64
1.95 � 11% +6.6 8.50 � 6% perf-profile.calltrace.cycles-pp.asm_sysvec_apic_timer_interrupt.cpuidle_enter_state.cpuidle_enter.cpuidle_idle_call.do_idle
31.10 +6.8 37.86 perf-profile.calltrace.cycles-pp.cpuidle_enter.cpuidle_idle_call.do_idle.cpu_startup_entry.start_secondary
31.80 +6.9 38.69 perf-profile.calltrace.cycles-pp.cpuidle_enter_state.cpuidle_enter.cpuidle_idle_call.do_idle.cpu_startup_entry
1.76 � 5% +8.4 10.16 � 5% perf-profile.calltrace.cycles-pp.intel_idle.cpuidle_enter_state.cpuidle_enter.cpuidle_idle_call.do_idle
16.28 -7.7 8.62 � 5% perf-profile.children.cycles-pp.intel_idle_xstate
34.64 -3.4 31.20 perf-profile.children.cycles-pp.stress_sem_sysv
32.10 -3.3 28.78 perf-profile.children.cycles-pp.semtimedop
30.56 -2.8 27.74 perf-profile.children.cycles-pp.entry_SYSCALL_64_after_hwframe
30.24 -2.8 27.48 perf-profile.children.cycles-pp.do_syscall_64
25.78 -2.4 23.36 perf-profile.children.cycles-pp.do_semtimedop
4.82 -2.3 2.53 � 4% perf-profile.children.cycles-pp.tick_nohz_idle_exit
24.85 -2.3 22.57 perf-profile.children.cycles-pp.__do_semtimedop
5.01 -1.8 3.22 � 3% perf-profile.children.cycles-pp.hrtimer_start_range_ns
2.92 � 2% -1.5 1.39 � 7% perf-profile.children.cycles-pp.tick_nohz_idle_stop_tick
2.90 � 2% -1.5 1.37 � 7% perf-profile.children.cycles-pp.tick_nohz_stop_tick
12.19 -1.5 10.72 perf-profile.children.cycles-pp.__x64_sys_semtimedop
2.59 � 2% -1.4 1.20 � 7% perf-profile.children.cycles-pp.tick_nohz_restart_sched_tick
9.82 -1.2 8.63 perf-profile.children.cycles-pp.__flush_smp_call_function_queue
3.25 -1.1 2.14 � 3% perf-profile.children.cycles-pp.__hrtimer_start_range_ns
11.25 -1.0 10.28 perf-profile.children.cycles-pp.__schedule
2.30 -0.9 1.38 � 4% perf-profile.children.cycles-pp.__get_next_timer_interrupt
4.28 � 3% -0.9 3.40 � 3% perf-profile.children.cycles-pp._raw_spin_lock
7.38 -0.8 6.62 � 2% perf-profile.children.cycles-pp.schedule_hrtimeout_range
0.96 � 6% -0.6 0.34 � 8% perf-profile.children.cycles-pp.tmigr_cpu_activate
0.84 � 4% -0.6 0.27 � 10% perf-profile.children.cycles-pp.tmigr_cpu_deactivate
1.46 � 3% -0.6 0.90 � 5% perf-profile.children.cycles-pp.lapic_next_deadline
0.83 � 6% -0.6 0.28 � 9% perf-profile.children.cycles-pp.__tmigr_cpu_activate
8.15 -0.5 7.62 � 2% perf-profile.children.cycles-pp.sched_ttwu_pending
2.64 � 3% -0.5 2.11 � 3% perf-profile.children.cycles-pp.switch_mm_irqs_off
6.27 -0.5 5.76 � 2% perf-profile.children.cycles-pp.schedule
5.24 � 2% -0.5 4.73 � 2% perf-profile.children.cycles-pp.schedule_idle
1.16 � 5% -0.5 0.65 � 6% perf-profile.children.cycles-pp.nr_iowait_cpu
1.19 � 5% -0.5 0.68 � 6% perf-profile.children.cycles-pp.tick_nohz_stop_idle
1.28 � 3% -0.5 0.78 � 6% perf-profile.children.cycles-pp.llist_reverse_order
0.70 � 5% -0.5 0.21 � 11% perf-profile.children.cycles-pp.tmigr_inactive_up
0.94 � 3% -0.4 0.49 � 6% perf-profile.children.cycles-pp.leave_mm
1.63 � 3% -0.4 1.20 � 2% perf-profile.children.cycles-pp.start_dl_timer
2.00 � 3% -0.4 1.59 � 3% perf-profile.children.cycles-pp.enqueue_dl_entity
2.04 � 3% -0.4 1.64 � 3% perf-profile.children.cycles-pp.dl_server_start
2.23 � 5% -0.4 1.84 � 3% perf-profile.children.cycles-pp.__smp_call_single_queue
0.46 � 5% -0.4 0.08 � 11% perf-profile.children.cycles-pp.tmigr_update_events
1.20 � 3% -0.4 0.84 � 4% perf-profile.children.cycles-pp.get_nohz_timer_target
4.32 � 2% -0.3 3.98 � 2% perf-profile.children.cycles-pp.do_smart_update
2.86 � 3% -0.3 2.52 � 3% perf-profile.children.cycles-pp.__pick_next_task
4.23 � 2% -0.3 3.90 � 2% perf-profile.children.cycles-pp.update_queue
2.56 � 3% -0.3 2.24 � 3% perf-profile.children.cycles-pp.pick_next_task_fair
1.52 � 3% -0.3 1.22 � 2% perf-profile.children.cycles-pp.call_function_single_prep_ipi
2.68 � 4% -0.3 2.40 � 2% perf-profile.children.cycles-pp.ttwu_queue_wakelist
2.14 � 3% -0.3 1.88 � 2% perf-profile.children.cycles-pp.dequeue_entity
1.12 � 5% -0.3 0.86 � 3% perf-profile.children.cycles-pp.update_rq_clock
1.57 � 3% -0.2 1.33 � 5% perf-profile.children.cycles-pp.find_alloc_undo
2.45 � 2% -0.2 2.22 � 2% perf-profile.children.cycles-pp.syscall_exit_to_user_mode
3.30 � 2% -0.2 3.07 perf-profile.children.cycles-pp.try_to_block_task
3.27 � 2% -0.2 3.04 perf-profile.children.cycles-pp.dequeue_task_fair
1.14 � 2% -0.2 0.92 � 4% perf-profile.children.cycles-pp.hrtimer_try_to_cancel
1.56 � 2% -0.2 1.35 � 2% perf-profile.children.cycles-pp.idle_cpu
3.22 � 2% -0.2 3.01 perf-profile.children.cycles-pp.dequeue_entities
0.72 � 4% -0.2 0.51 � 4% perf-profile.children.cycles-pp.hrtimer_cancel
0.59 � 5% -0.2 0.38 � 5% perf-profile.children.cycles-pp.irqtime_account_process_tick
1.20 � 3% -0.2 1.02 � 5% perf-profile.children.cycles-pp.raw_spin_rq_lock_nested
0.86 � 3% -0.2 0.70 � 4% perf-profile.children.cycles-pp.__rseq_handle_notify_resume
2.16 � 3% -0.2 2.00 � 4% perf-profile.children.cycles-pp.stress_semaphore_sysv_thrash
0.55 � 4% -0.1 0.40 � 8% perf-profile.children.cycles-pp.tmigr_quick_check
0.49 � 5% -0.1 0.34 � 7% perf-profile.children.cycles-pp.__remove_hrtimer
0.31 � 7% -0.1 0.16 � 7% perf-profile.children.cycles-pp.tmigr_active_up
0.47 � 4% -0.1 0.33 � 7% perf-profile.children.cycles-pp.enqueue_hrtimer
0.37 � 24% -0.1 0.24 � 10% perf-profile.children.cycles-pp.__sysvec_call_function_single
0.88 � 4% -0.1 0.76 � 3% perf-profile.children.cycles-pp.dl_server_stop
0.62 � 5% -0.1 0.50 � 7% perf-profile.children.cycles-pp.rseq_ip_fixup
0.77 � 2% -0.1 0.65 � 5% perf-profile.children.cycles-pp.lookup_undo
0.36 � 8% -0.1 0.25 � 9% perf-profile.children.cycles-pp.timerqueue_add
1.49 � 3% -0.1 1.38 � 3% perf-profile.children.cycles-pp._raw_spin_lock_irqsave
0.78 � 4% -0.1 0.69 � 5% perf-profile.children.cycles-pp.__switch_to
0.62 � 5% -0.1 0.53 � 8% perf-profile.children.cycles-pp.entry_SYSCALL_64
0.43 � 6% -0.1 0.35 � 7% perf-profile.children.cycles-pp.finish_task_switch
0.32 � 7% -0.1 0.23 � 11% perf-profile.children.cycles-pp.put_pid
0.48 � 3% -0.1 0.39 � 6% perf-profile.children.cycles-pp.syscall_return_via_sysret
0.46 � 3% -0.1 0.38 � 6% perf-profile.children.cycles-pp.set_next_task_fair
0.34 � 8% -0.1 0.27 � 8% perf-profile.children.cycles-pp.timerqueue_del
0.40 � 7% -0.1 0.32 � 8% perf-profile.children.cycles-pp.rseq_get_rseq_cs
0.54 � 5% -0.1 0.47 � 5% perf-profile.children.cycles-pp.__switch_to_asm
0.37 � 8% -0.1 0.30 � 9% perf-profile.children.cycles-pp.__get_user_8
0.43 � 5% -0.1 0.36 � 6% perf-profile.children.cycles-pp.set_next_entity
0.32 � 6% -0.1 0.26 � 5% perf-profile.children.cycles-pp.get_timespec64
0.15 � 18% -0.1 0.09 � 17% perf-profile.children.cycles-pp.quiet_vmstat
0.35 � 6% -0.1 0.29 � 8% perf-profile.children.cycles-pp.os_xsave
0.26 � 7% -0.1 0.20 � 6% perf-profile.children.cycles-pp.hrtimer_get_next_event
0.44 � 4% -0.1 0.38 � 7% perf-profile.children.cycles-pp.restore_fpregs_from_fpstate
0.57 � 6% -0.1 0.51 � 3% perf-profile.children.cycles-pp.__enqueue_entity
0.32 � 7% -0.1 0.26 � 3% perf-profile.children.cycles-pp.tick_nohz_idle_enter
0.14 � 18% -0.1 0.08 � 18% perf-profile.children.cycles-pp.need_update
0.24 � 9% -0.0 0.19 � 10% perf-profile.children.cycles-pp.rb_erase
0.33 � 4% -0.0 0.28 � 7% perf-profile.children.cycles-pp.task_mm_cid_work
0.34 � 5% -0.0 0.29 � 6% perf-profile.children.cycles-pp.task_work_run
0.21 � 16% -0.0 0.16 � 12% perf-profile.children.cycles-pp.semop
0.24 � 10% -0.0 0.19 � 11% perf-profile.children.cycles-pp._raw_spin_unlock_irqrestore
0.11 � 9% -0.0 0.07 � 20% perf-profile.children.cycles-pp.hrtimer_update_next_event
0.13 � 12% -0.0 0.09 � 15% perf-profile.children.cycles-pp.rb_insert_color
0.16 � 8% -0.0 0.12 � 8% perf-profile.children.cycles-pp.do_smart_wakeup_zero
0.08 � 11% -0.0 0.05 � 34% perf-profile.children.cycles-pp.fpu_idle_fpregs
0.12 � 9% -0.0 0.09 � 11% perf-profile.children.cycles-pp.hrtimer_active
0.10 � 20% +0.0 0.14 � 11% perf-profile.children.cycles-pp._find_next_and_bit
0.18 � 8% +0.0 0.22 � 8% perf-profile.children.cycles-pp.avg_vruntime
0.03 �100% +0.0 0.08 � 12% perf-profile.children.cycles-pp.rcu_core
0.00 +0.1 0.05 � 9% perf-profile.children.cycles-pp.write
0.26 � 6% +0.1 0.32 � 5% perf-profile.children.cycles-pp.place_entity
0.10 � 14% +0.1 0.16 � 11% perf-profile.children.cycles-pp.sched_balance_softirq
0.00 +0.1 0.06 � 19% perf-profile.children.cycles-pp.rcu_pending
0.65 � 4% +0.1 0.72 � 4% perf-profile.children.cycles-pp.switch_fpu_return
0.06 � 38% +0.1 0.13 � 7% perf-profile.children.cycles-pp.__memcpy
0.00 +0.1 0.08 � 16% perf-profile.children.cycles-pp.calc_global_load_tick
0.00 +0.1 0.08 � 14% perf-profile.children.cycles-pp.rcu_sched_clock_irq
0.00 +0.1 0.09 � 11% perf-profile.children.cycles-pp.update_dl_rq_load_avg
0.06 � 9% +0.1 0.15 � 18% perf-profile.children.cycles-pp._raw_spin_lock_irq
0.66 � 3% +0.1 0.76 � 3% perf-profile.children.cycles-pp.native_sched_clock
0.06 � 35% +0.1 0.15 � 11% perf-profile.children.cycles-pp.native_apic_msr_eoi
0.50 � 4% +0.1 0.60 � 5% perf-profile.children.cycles-pp.sched_clock
0.58 � 4% +0.1 0.68 � 5% perf-profile.children.cycles-pp.sched_clock_cpu
0.10 � 13% +0.1 0.20 � 5% perf-profile.children.cycles-pp.should_we_balance
0.01 �299% +0.1 0.11 � 18% perf-profile.children.cycles-pp.update_rt_rq_load_avg
0.10 � 16% +0.1 0.20 � 17% perf-profile.children.cycles-pp.wakeup_preempt
0.06 � 11% +0.1 0.17 � 12% perf-profile.children.cycles-pp.arch_cpu_idle_enter
0.08 � 16% +0.1 0.20 � 13% perf-profile.children.cycles-pp.run_ksoftirqd
0.04 � 50% +0.1 0.16 � 13% perf-profile.children.cycles-pp.tsc_verify_tsc_adjust
0.33 � 4% +0.1 0.45 � 7% perf-profile.children.cycles-pp.kthread
0.34 � 4% +0.1 0.46 � 7% perf-profile.children.cycles-pp.ret_from_fork
0.34 � 5% +0.1 0.46 � 7% perf-profile.children.cycles-pp.ret_from_fork_asm
1.15 � 4% +0.1 1.28 � 2% perf-profile.children.cycles-pp.update_rq_clock_task
0.21 � 5% +0.1 0.34 � 9% perf-profile.children.cycles-pp.smpboot_thread_fn
0.09 � 16% +0.1 0.22 � 7% perf-profile.children.cycles-pp.irqtime_account_irq
1.16 � 6% +0.1 1.31 � 4% perf-profile.children.cycles-pp.wake_affine
1.14 � 6% +0.2 1.29 � 4% perf-profile.children.cycles-pp.available_idle_cpu
1.21 � 3% +0.2 1.38 � 3% perf-profile.children.cycles-pp.__update_load_avg_se
0.45 � 7% +0.2 0.63 � 6% perf-profile.children.cycles-pp.__update_load_avg_cfs_rq
0.14 � 13% +0.2 0.35 � 3% perf-profile.children.cycles-pp.native_irq_return_iret
0.01 �300% +0.2 0.22 � 8% perf-profile.children.cycles-pp.arch_scale_freq_tick
0.16 � 10% +0.3 0.42 � 7% perf-profile.children.cycles-pp.update_other_load_avgs
1.95 � 3% +0.3 2.23 � 4% perf-profile.children.cycles-pp.clockevents_program_event
0.16 � 11% +0.3 0.44 � 7% perf-profile.children.cycles-pp.update_irq_load_avg
2.78 � 3% +0.3 3.09 � 2% perf-profile.children.cycles-pp.update_load_avg
0.77 � 3% +0.3 1.11 � 4% perf-profile.children.cycles-pp.update_sg_lb_stats
0.83 � 18% +0.4 1.20 � 6% perf-profile.children.cycles-pp.sysvec_call_function_single
0.85 � 3% +0.4 1.23 � 4% perf-profile.children.cycles-pp.update_sd_lb_stats
0.86 � 3% +0.4 1.25 � 4% perf-profile.children.cycles-pp.sched_balance_find_src_group
1.73 +0.5 2.21 � 2% perf-profile.children.cycles-pp.tick_nohz_get_sleep_length
1.38 � 2% +0.5 1.86 � 3% perf-profile.children.cycles-pp.tick_nohz_next_event
2.76 � 2% +0.5 3.25 � 2% perf-profile.children.cycles-pp.menu_select
0.14 � 14% +0.5 0.65 � 6% perf-profile.children.cycles-pp.ktime_get_update_offsets_now
0.00 +0.5 0.50 � 11% perf-profile.children.cycles-pp.timekeeping_max_deferment
0.13 � 17% +0.5 0.64 � 5% perf-profile.children.cycles-pp.sched_tick
0.06 � 36% +0.5 0.58 � 11% perf-profile.children.cycles-pp.tick_nohz_irq_exit
1.03 � 4% +0.5 1.56 � 2% perf-profile.children.cycles-pp.sched_balance_rq
0.02 �124% +0.6 0.62 � 18% perf-profile.children.cycles-pp.get_jiffies_update
0.22 � 7% +0.6 0.83 � 13% perf-profile.children.cycles-pp.tick_irq_enter
0.13 � 12% +0.6 0.75 � 14% perf-profile.children.cycles-pp.tmigr_requires_handle_remote
0.22 � 6% +0.6 0.84 � 13% perf-profile.children.cycles-pp.irq_enter_rcu
0.84 � 5% +0.8 1.64 � 2% perf-profile.children.cycles-pp.sched_balance_domains
1.39 � 8% +1.0 2.39 � 6% perf-profile.children.cycles-pp.__irq_exit_rcu
59.91 +1.1 61.00 perf-profile.children.cycles-pp.start_secondary
0.47 � 6% +1.3 1.78 � 6% perf-profile.children.cycles-pp.__update_blocked_fair
0.35 � 8% +1.3 1.70 � 7% perf-profile.children.cycles-pp.update_process_times
2.33 � 2% +1.6 3.97 � 5% perf-profile.children.cycles-pp.do_softirq
0.60 � 6% +1.7 2.26 � 7% perf-profile.children.cycles-pp.tick_nohz_handler
0.69 � 4% +1.8 2.50 � 6% perf-profile.children.cycles-pp.__hrtimer_run_queues
1.68 � 3% +1.8 3.50 � 4% perf-profile.children.cycles-pp.ktime_get
3.34 � 2% +2.2 5.52 � 4% perf-profile.children.cycles-pp._nohz_idle_balance
3.33 � 2% +2.3 5.61 � 4% perf-profile.children.cycles-pp.rest_init
3.33 � 2% +2.3 5.61 � 4% perf-profile.children.cycles-pp.start_kernel
3.33 � 2% +2.3 5.61 � 4% perf-profile.children.cycles-pp.x86_64_start_kernel
3.33 � 2% +2.3 5.61 � 4% perf-profile.children.cycles-pp.x86_64_start_reservations
1.00 � 5% +2.6 3.58 � 6% perf-profile.children.cycles-pp.sched_balance_update_blocked_averages
3.76 � 2% +2.7 6.46 � 3% perf-profile.children.cycles-pp.handle_softirqs
63.25 +3.4 66.61 perf-profile.children.cycles-pp.common_startup_64
63.25 +3.4 66.61 perf-profile.children.cycles-pp.cpu_startup_entry
63.15 +3.4 66.53 perf-profile.children.cycles-pp.do_idle
1.03 � 4% +3.6 4.59 � 5% perf-profile.children.cycles-pp.hrtimer_interrupt
1.08 � 4% +3.7 4.75 � 5% perf-profile.children.cycles-pp.__sysvec_apic_timer_interrupt
2.36 � 4% +5.4 7.80 � 4% perf-profile.children.cycles-pp.sysvec_apic_timer_interrupt
2.60 � 4% +5.9 8.50 � 4% perf-profile.children.cycles-pp.asm_sysvec_apic_timer_interrupt
39.14 +6.3 45.39 perf-profile.children.cycles-pp.cpuidle_idle_call
32.01 +7.3 39.32 perf-profile.children.cycles-pp.cpuidle_enter_state
32.05 +7.3 39.36 perf-profile.children.cycles-pp.cpuidle_enter
1.78 � 5% +8.4 10.20 � 5% perf-profile.children.cycles-pp.intel_idle
16.20 -7.6 8.57 � 5% perf-profile.self.cycles-pp.intel_idle_xstate
3.66 � 2% -0.8 2.89 � 3% perf-profile.self.cycles-pp._raw_spin_lock
1.46 � 4% -0.6 0.89 � 5% perf-profile.self.cycles-pp.lapic_next_deadline
2.61 � 3% -0.5 2.09 � 3% perf-profile.self.cycles-pp.switch_mm_irqs_off
1.16 � 5% -0.5 0.65 � 6% perf-profile.self.cycles-pp.nr_iowait_cpu
1.28 � 3% -0.5 0.77 � 6% perf-profile.self.cycles-pp.llist_reverse_order
3.67 -0.5 3.18 � 2% perf-profile.self.cycles-pp.__do_semtimedop
0.52 � 7% -0.4 0.11 � 14% perf-profile.self.cycles-pp.__tmigr_cpu_activate
0.68 � 7% -0.4 0.31 � 11% perf-profile.self.cycles-pp.flush_smp_call_function_queue
1.51 � 4% -0.3 1.21 � 2% perf-profile.self.cycles-pp.call_function_single_prep_ipi
0.80 � 7% -0.3 0.52 � 3% perf-profile.self.cycles-pp.update_rq_clock
0.62 � 7% -0.2 0.40 � 5% perf-profile.self.cycles-pp.sched_ttwu_pending
1.33 � 3% -0.2 1.11 � 4% perf-profile.self.cycles-pp.update_queue
1.54 � 2% -0.2 1.33 � 2% perf-profile.self.cycles-pp.idle_cpu
0.58 � 5% -0.2 0.38 � 5% perf-profile.self.cycles-pp.irqtime_account_process_tick
0.52 � 4% -0.2 0.33 � 5% perf-profile.self.cycles-pp._nohz_idle_balance
0.73 � 7% -0.2 0.57 � 9% perf-profile.self.cycles-pp.do_idle
0.91 � 5% -0.2 0.76 � 5% perf-profile.self.cycles-pp.semtimedop
0.39 � 6% -0.2 0.24 � 7% perf-profile.self.cycles-pp.__flush_smp_call_function_queue
0.65 � 6% -0.2 0.50 � 7% perf-profile.self.cycles-pp.pick_next_task_fair
0.55 � 4% -0.1 0.40 � 8% perf-profile.self.cycles-pp.tmigr_quick_check
0.30 � 6% -0.1 0.16 � 7% perf-profile.self.cycles-pp.tmigr_active_up
0.87 � 5% -0.1 0.75 � 5% perf-profile.self.cycles-pp.enqueue_entity
0.24 � 10% -0.1 0.13 � 15% perf-profile.self.cycles-pp.tmigr_inactive_up
0.76 � 2% -0.1 0.65 � 5% perf-profile.self.cycles-pp.lookup_undo
1.44 � 3% -0.1 1.33 � 4% perf-profile.self.cycles-pp._raw_spin_lock_irqsave
0.34 � 6% -0.1 0.25 � 6% perf-profile.self.cycles-pp.__hrtimer_start_range_ns
0.75 � 4% -0.1 0.66 � 6% perf-profile.self.cycles-pp.__switch_to
0.28 � 9% -0.1 0.19 � 4% perf-profile.self.cycles-pp.hrtimer_start_range_ns
0.55 � 2% -0.1 0.46 � 4% perf-profile.self.cycles-pp.syscall_exit_to_user_mode
0.60 � 5% -0.1 0.51 � 5% perf-profile.self.cycles-pp._copy_from_user
0.24 � 6% -0.1 0.16 � 9% perf-profile.self.cycles-pp.timerqueue_add
0.44 � 3% -0.1 0.36 � 6% perf-profile.self.cycles-pp.do_semtimedop
0.53 � 5% -0.1 0.46 � 5% perf-profile.self.cycles-pp.__switch_to_asm
0.26 � 9% -0.1 0.18 � 8% perf-profile.self.cycles-pp.__get_next_timer_interrupt
0.36 � 8% -0.1 0.30 � 9% perf-profile.self.cycles-pp.__get_user_8
0.35 � 6% -0.1 0.29 � 7% perf-profile.self.cycles-pp.os_xsave
0.44 � 4% -0.1 0.38 � 7% perf-profile.self.cycles-pp.restore_fpregs_from_fpstate
0.32 � 6% -0.1 0.26 � 6% perf-profile.self.cycles-pp.entry_SYSCALL_64_after_hwframe
0.15 � 5% -0.1 0.10 � 6% perf-profile.self.cycles-pp.__remove_hrtimer
0.27 � 6% -0.0 0.22 � 10% perf-profile.self.cycles-pp.select_task_rq_fair
0.29 � 5% -0.0 0.25 � 7% perf-profile.self.cycles-pp.do_syscall_64
0.19 � 9% -0.0 0.15 � 9% perf-profile.self.cycles-pp.hrtimer_try_to_cancel
0.24 � 8% -0.0 0.20 � 9% perf-profile.self.cycles-pp.__x64_sys_semtimedop
0.30 � 5% -0.0 0.25 � 6% perf-profile.self.cycles-pp.task_mm_cid_work
0.11 � 10% -0.0 0.07 � 39% perf-profile.self.cycles-pp.clockevents_program_event
0.26 � 5% -0.0 0.22 � 7% perf-profile.self.cycles-pp.finish_task_switch
0.08 � 13% -0.0 0.04 � 50% perf-profile.self.cycles-pp.fpu_idle_fpregs
0.24 � 4% -0.0 0.20 � 8% perf-profile.self.cycles-pp.dequeue_entity
0.15 � 7% -0.0 0.12 � 10% perf-profile.self.cycles-pp.schedule_idle
0.14 � 7% -0.0 0.12 � 8% perf-profile.self.cycles-pp.__hrtimer_next_event_base
0.07 � 14% +0.0 0.10 � 15% perf-profile.self.cycles-pp.list_add_leaf_cfs_rq
0.17 � 8% +0.0 0.21 � 8% perf-profile.self.cycles-pp.avg_vruntime
0.05 � 52% +0.0 0.09 � 11% perf-profile.self.cycles-pp.sched_balance_rq
0.09 � 15% +0.0 0.14 � 16% perf-profile.self.cycles-pp.tmigr_requires_handle_remote
0.00 +0.1 0.06 � 14% perf-profile.self.cycles-pp.sched_tick
0.05 � 39% +0.1 0.12 � 8% perf-profile.self.cycles-pp.__memcpy
0.00 +0.1 0.08 � 19% perf-profile.self.cycles-pp.calc_global_load_tick
0.00 +0.1 0.08 � 13% perf-profile.self.cycles-pp.update_dl_rq_load_avg
0.05 � 36% +0.1 0.15 � 12% perf-profile.self.cycles-pp.native_apic_msr_eoi
0.63 � 3% +0.1 0.73 � 4% perf-profile.self.cycles-pp.native_sched_clock
0.05 � 34% +0.1 0.15 � 18% perf-profile.self.cycles-pp._raw_spin_lock_irq
0.02 �153% +0.1 0.12 � 13% perf-profile.self.cycles-pp.irqtime_account_irq
0.01 �299% +0.1 0.11 � 18% perf-profile.self.cycles-pp.update_rt_rq_load_avg
0.08 � 20% +0.1 0.20 � 16% perf-profile.self.cycles-pp.wakeup_preempt
0.36 � 8% +0.1 0.49 � 9% perf-profile.self.cycles-pp.ttwu_queue_wakelist
0.21 � 9% +0.1 0.34 � 9% perf-profile.self.cycles-pp.switch_fpu_return
0.01 �300% +0.1 0.14 � 15% perf-profile.self.cycles-pp.tsc_verify_tsc_adjust
1.13 � 6% +0.2 1.28 � 4% perf-profile.self.cycles-pp.available_idle_cpu
0.24 � 9% +0.2 0.39 � 8% perf-profile.self.cycles-pp.tick_nohz_next_event
0.21 � 10% +0.2 0.37 � 7% perf-profile.self.cycles-pp.dequeue_entities
1.17 � 4% +0.2 1.34 � 3% perf-profile.self.cycles-pp.__update_load_avg_se
0.42 � 8% +0.2 0.60 � 6% perf-profile.self.cycles-pp.__update_load_avg_cfs_rq
0.31 � 6% +0.2 0.51 � 6% perf-profile.self.cycles-pp.enqueue_task_fair
0.14 � 13% +0.2 0.35 � 3% perf-profile.self.cycles-pp.native_irq_return_iret
0.01 �300% +0.2 0.22 � 8% perf-profile.self.cycles-pp.arch_scale_freq_tick
0.22 � 9% +0.2 0.46 � 6% perf-profile.self.cycles-pp.sched_balance_domains
0.15 � 9% +0.3 0.43 � 7% perf-profile.self.cycles-pp.update_irq_load_avg
0.03 � 82% +0.3 0.34 � 13% perf-profile.self.cycles-pp.tick_nohz_handler
0.57 � 3% +0.3 0.88 � 6% perf-profile.self.cycles-pp.update_sg_lb_stats
0.14 � 9% +0.4 0.56 � 11% perf-profile.self.cycles-pp.sched_balance_update_blocked_averages
0.13 � 13% +0.5 0.60 � 6% perf-profile.self.cycles-pp.ktime_get_update_offsets_now
0.00 +0.5 0.50 � 11% perf-profile.self.cycles-pp.timekeeping_max_deferment
0.51 � 6% +0.5 1.04 � 5% perf-profile.self.cycles-pp.cpuidle_enter_state
0.02 �124% +0.6 0.62 � 18% perf-profile.self.cycles-pp.get_jiffies_update
0.24 � 9% +0.7 0.91 � 7% perf-profile.self.cycles-pp.__update_blocked_fair
0.78 � 5% +1.9 2.67 � 5% perf-profile.self.cycles-pp.ktime_get
1.78 � 5% +8.4 10.20 � 5% perf-profile.self.cycles-pp.intel_idle
***************************************************************************************************
lkp-icl-2sp4: 128 threads 2 sockets Intel(R) Xeon(R) Platinum 8358 CPU @ 2.60GHz (Ice Lake) with 128G memory
=========================================================================================
compiler/cpufreq_governor/disk/fs/kconfig/nr_threads/rootfs/tbox_group/test/testcase/testtime:
gcc-12/performance/1HDD/btrfs/x86_64-rhel-9.4/100%/debian-12-x86_64-20240206.cgz/lkp-icl-2sp4/fcntl/stress-ng/60s
commit:
8de7606f0f ("cpuidle: menu: Eliminate outliers on both ends of the sample set")
85975daeaa ("cpuidle: menu: Avoid discarding useful information")
8de7606f0fe2bf5a 85975daeaa4d6ec560bfcd354fc
---------------- ---------------------------
%stddev %change %stddev
\ | \
543988 � 20% +54.1% 838269 � 13% numa-meminfo.node1.Shmem
12730 � 29% -31.9% 8669 � 8% uptime.idle
6.73e+09 � 14% -41.1% 3.964e+09 � 18% cpuidle..time
13333824 +61.2% 21490444 � 18% cpuidle..usage
81.34 � 2% -37.5% 50.80 � 16% iostat.cpu.idle
17.99 � 9% +168.9% 48.38 � 17% iostat.cpu.system
454164 � 20% +31.2% 596074 � 10% numa-numastat.node1.local_node
507986 � 13% +30.4% 662329 � 8% numa-numastat.node1.numa_hit
135917 � 20% +54.3% 209698 � 13% numa-vmstat.node1.nr_shmem
506585 � 13% +30.7% 662186 � 8% numa-vmstat.node1.numa_hit
452763 � 20% +31.6% 595931 � 10% numa-vmstat.node1.numa_local
1634214 +22.1% 1995390 � 2% meminfo.Active
1634214 +22.1% 1995390 � 2% meminfo.Active(anon)
2524592 � 3% +15.6% 2917394 meminfo.Committed_AS
352408 � 8% +34.6% 474413 � 6% meminfo.Mapped
714515 � 4% +48.5% 1061286 � 4% meminfo.Shmem
80.86 � 2% -31.6 49.26 � 18% mpstat.cpu.all.idle%
0.16 � 9% +0.1 0.26 � 6% mpstat.cpu.all.irq%
0.08 � 8% -0.0 0.04 � 10% mpstat.cpu.all.soft%
18.23 � 9% +31.4 49.61 � 17% mpstat.cpu.all.sys%
0.68 � 20% +0.2 0.83 � 4% mpstat.cpu.all.usr%
81.36 � 2% -37.5% 50.82 � 16% vmstat.cpu.id
17.98 � 9% +169.1% 48.38 � 17% vmstat.cpu.sy
23.31 � 10% +171.3% 63.25 � 17% vmstat.procs.r
397622 � 10% +42.3% 565625 � 17% vmstat.system.cs
93674 � 9% +140.8% 225582 � 11% vmstat.system.in
4877304 +28.8% 6283702 � 2% stress-ng.fcntl.ops
81287 +28.8% 104727 � 2% stress-ng.fcntl.ops_per_sec
5942 � 4% +46.2% 8688 � 19% stress-ng.time.involuntary_context_switches
2498 � 6% +162.5% 6558 � 17% stress-ng.time.percent_of_cpu_this_job_got
1484 � 7% +164.3% 3924 � 17% stress-ng.time.system_time
13148151 +37.6% 18086055 � 17% stress-ng.time.voluntary_context_switches
408609 +22.1% 498989 � 2% proc-vmstat.nr_active_anon
1079717 +8.0% 1166491 proc-vmstat.nr_file_pages
88454 � 8% +34.6% 119063 � 6% proc-vmstat.nr_mapped
4314 � 7% +7.2% 4624 � 2% proc-vmstat.nr_page_table_pages
178676 � 4% +48.6% 265451 � 4% proc-vmstat.nr_shmem
408609 +22.1% 498989 � 2% proc-vmstat.nr_zone_active_anon
22708 � 23% +329.9% 97622 � 20% proc-vmstat.numa_hint_faults
10392 � 45% +366.1% 48435 � 24% proc-vmstat.numa_hint_faults_local
864151 +18.6% 1025244 � 3% proc-vmstat.numa_hit
731734 � 2% +21.6% 889707 � 3% proc-vmstat.numa_local
107144 � 9% +24.0% 132852 � 5% proc-vmstat.numa_pages_migrated
489942 � 5% +36.9% 670847 � 5% proc-vmstat.numa_pte_updates
1075821 +16.2% 1250280 � 2% proc-vmstat.pgalloc_normal
640754 � 4% +13.3% 725943 � 2% proc-vmstat.pgfault
107144 � 9% +24.0% 132852 � 5% proc-vmstat.pgmigrate_success
184706 � 31% +477.1% 1065853 � 37% sched_debug.cfs_rq:/.avg_vruntime.min
0.16 � 10% +163.6% 0.41 � 34% sched_debug.cfs_rq:/.h_nr_running.avg
184706 � 31% +477.1% 1065853 � 37% sched_debug.cfs_rq:/.min_vruntime.min
0.16 � 11% +160.8% 0.41 � 33% sched_debug.cfs_rq:/.nr_running.avg
1.02e+08 � 79% -83.5% 16827421 �223% sched_debug.cfs_rq:/.runnable_avg.max
9759128 � 82% -78.9% 2057502 �223% sched_debug.cfs_rq:/.runnable_avg.stddev
195.69 � 3% +146.1% 481.50 � 30% sched_debug.cfs_rq:/.util_avg.avg
908.42 � 10% +32.4% 1202 � 16% sched_debug.cfs_rq:/.util_avg.max
26.45 � 11% +1051.2% 304.45 � 67% sched_debug.cfs_rq:/.util_est.avg
448.08 � 16% +90.4% 853.25 � 36% sched_debug.cfs_rq:/.util_est.max
655077 -24.8% 492469 � 10% sched_debug.cpu.avg_idle.avg
39564 � 41% -62.6% 14795 � 94% sched_debug.cpu.avg_idle.min
863.02 -16.1% 723.82 sched_debug.cpu.clock_task.stddev
646.44 � 12% +180.3% 1812 � 37% sched_debug.cpu.curr->pid.avg
0.00 � 17% +76.2% 0.00 � 43% sched_debug.cpu.next_balance.stddev
0.15 � 11% +163.3% 0.41 � 35% sched_debug.cpu.nr_running.avg
102225 +37.3% 140355 � 16% sched_debug.cpu.nr_switches.avg
112896 +42.0% 160335 � 10% sched_debug.cpu.nr_switches.max
3807 � 8% +77.5% 6759 � 16% sched_debug.cpu.nr_switches.stddev
2.08 -42.2% 1.20 � 16% perf-stat.i.MPKI
3.949e+09 � 11% +140.8% 9.51e+09 � 24% perf-stat.i.branch-instructions
2.99 � 2% -2.3 0.69 � 8% perf-stat.i.branch-miss-rate%
1.087e+08 � 15% -54.7% 49234912 � 3% perf-stat.i.branch-misses
7.00 � 5% +22.5 29.55 � 2% perf-stat.i.cache-miss-rate%
32652924 � 10% +18.9% 38827999 � 5% perf-stat.i.cache-misses
4.773e+08 � 10% -71.3% 1.37e+08 � 5% perf-stat.i.cache-references
416502 � 10% +42.5% 593579 � 17% perf-stat.i.context-switches
4.47 � 4% +27.8% 5.71 � 7% perf-stat.i.cpi
7.788e+10 � 9% +186.9% 2.235e+11 � 16% perf-stat.i.cpu-cycles
2398 � 7% +164.0% 6331 � 26% perf-stat.i.cycles-between-cache-misses
1.747e+10 � 11% +148.7% 4.344e+10 � 27% perf-stat.i.instructions
0.25 � 15% -25.0% 0.18 � 8% perf-stat.i.ipc
7461 � 7% +24.7% 9305 � 3% perf-stat.i.minor-faults
7461 � 7% +24.7% 9305 � 3% perf-stat.i.page-faults
1.88 � 6% -56.6% 0.82 � 56% perf-stat.overall.MPKI
2.74 � 10% -2.3 0.46 � 54% perf-stat.overall.branch-miss-rate%
0.22 � 2% -28.9% 0.16 � 46% perf-stat.overall.ipc
1.067e+08 � 15% -62.4% 40070510 � 44% perf-stat.ps.branch-misses
4.693e+08 � 10% -76.1% 1.12e+08 � 45% perf-stat.ps.cache-references
0.11 � 5% -91.7% 0.01 � 41% perf-sched.sch_delay.avg.ms.__cond_resched.fcntl_setlk.do_fcntl.__x64_sys_fcntl.do_syscall_64
0.18 � 26% -99.1% 0.00 �141% perf-sched.sch_delay.avg.ms.__cond_resched.kmem_cache_alloc_noprof.posix_lock_inode.fcntl_setlk.do_fcntl
0.11 � 14% -89.1% 0.01 � 78% perf-sched.sch_delay.avg.ms.__cond_resched.stop_one_cpu.migrate_task_to.task_numa_migrate.isra
0.11 � 24% -83.9% 0.02 � 43% perf-sched.sch_delay.avg.ms.__cond_resched.stop_one_cpu.sched_exec.bprm_execve.part
0.06 � 36% -86.8% 0.01 � 61% perf-sched.sch_delay.avg.ms.__x64_sys_pause.do_syscall_64.entry_SYSCALL_64_after_hwframe.[unknown]
0.17 � 15% -83.2% 0.03 � 82% perf-sched.sch_delay.avg.ms.devkmsg_read.vfs_read.ksys_read.do_syscall_64
0.04 � 23% -81.5% 0.01 � 14% perf-sched.sch_delay.avg.ms.do_wait.kernel_wait4.do_syscall_64.entry_SYSCALL_64_after_hwframe
0.13 -89.1% 0.01 � 6% perf-sched.sch_delay.avg.ms.fcntl_setlk.do_fcntl.__x64_sys_fcntl.do_syscall_64
0.09 � 19% -89.6% 0.01 � 26% perf-sched.sch_delay.avg.ms.pipe_read.vfs_read.ksys_read.do_syscall_64
0.06 � 35% -85.0% 0.01 � 58% perf-sched.sch_delay.avg.ms.rcu_gp_kthread.kthread.ret_from_fork.ret_from_fork_asm
0.07 � 39% -80.1% 0.01 � 82% perf-sched.sch_delay.avg.ms.schedule_hrtimeout_range.ep_poll.do_epoll_wait.__x64_sys_epoll_wait
0.07 � 23% -90.8% 0.01 � 38% perf-sched.sch_delay.avg.ms.schedule_preempt_disabled.rwsem_down_write_slowpath.down_write.do_truncate
0.08 � 16% -89.8% 0.01 � 44% perf-sched.sch_delay.avg.ms.schedule_timeout.__wait_for_common.wait_for_completion_state.kernel_clone
0.04 � 31% -81.4% 0.01 � 62% perf-sched.sch_delay.avg.ms.schedule_timeout.kcompactd.kthread.ret_from_fork
0.06 � 16% -87.6% 0.01 � 21% perf-sched.sch_delay.avg.ms.schedule_timeout.rcu_gp_fqs_loop.rcu_gp_kthread.kthread
0.09 � 2% -87.4% 0.01 � 42% perf-sched.sch_delay.avg.ms.syscall_exit_to_user_mode.do_syscall_64.entry_SYSCALL_64_after_hwframe.[unknown]
0.06 � 36% -85.3% 0.01 � 78% perf-sched.sch_delay.avg.ms.wait_for_partner.fifo_open.do_dentry_open.vfs_open
0.05 � 7% -35.1% 0.03 � 18% perf-sched.sch_delay.avg.ms.worker_thread.kthread.ret_from_fork.ret_from_fork_asm
0.28 � 19% -99.3% 0.00 �142% perf-sched.sch_delay.max.ms.__cond_resched.kmem_cache_alloc_noprof.posix_lock_inode.fcntl_setlk.do_fcntl
0.35 � 17% -66.2% 0.12 � 94% perf-sched.sch_delay.max.ms.__cond_resched.stop_one_cpu.migrate_task_to.task_numa_migrate.isra
0.44 � 12% -44.0% 0.25 � 31% perf-sched.sch_delay.max.ms.__cond_resched.stop_one_cpu.sched_exec.bprm_execve.part
0.25 � 25% -88.0% 0.03 �154% perf-sched.sch_delay.max.ms.__x64_sys_pause.do_syscall_64.entry_SYSCALL_64_after_hwframe.[unknown]
0.24 � 29% -72.6% 0.07 � 98% perf-sched.sch_delay.max.ms.devkmsg_read.vfs_read.ksys_read.do_syscall_64
0.43 � 12% -66.4% 0.14 � 84% perf-sched.sch_delay.max.ms.do_wait.kernel_wait4.do_syscall_64.entry_SYSCALL_64_after_hwframe
0.27 � 20% -73.7% 0.07 �129% perf-sched.sch_delay.max.ms.rcu_gp_kthread.kthread.ret_from_fork.ret_from_fork_asm
0.38 � 15% -49.4% 0.19 � 65% perf-sched.sch_delay.max.ms.schedule_preempt_disabled.rwsem_down_write_slowpath.down_write.do_truncate
0.44 � 10% -63.0% 0.16 � 67% perf-sched.sch_delay.max.ms.schedule_timeout.__wait_for_common.wait_for_completion_state.kernel_clone
0.39 � 5% -50.9% 0.19 � 65% perf-sched.sch_delay.max.ms.schedule_timeout.rcu_gp_fqs_loop.rcu_gp_kthread.kthread
0.39 � 13% -74.6% 0.10 �102% perf-sched.sch_delay.max.ms.wait_for_partner.fifo_open.do_dentry_open.vfs_open
0.13 -88.7% 0.01 � 6% perf-sched.total_sch_delay.average.ms
2.41 -33.5% 1.61 � 2% perf-sched.total_wait_and_delay.average.ms
754294 +45.1% 1094575 perf-sched.total_wait_and_delay.count.ms
2.29 -30.5% 1.59 � 2% perf-sched.total_wait_time.average.ms
0.79 -52.6% 0.37 perf-sched.wait_and_delay.avg.ms.fcntl_setlk.do_fcntl.__x64_sys_fcntl.do_syscall_64
4.23 � 3% -31.1% 2.91 � 6% perf-sched.wait_and_delay.avg.ms.rcu_gp_kthread.kthread.ret_from_fork.ret_from_fork_asm
748247 +45.5% 1088339 perf-sched.wait_and_delay.count.fcntl_setlk.do_fcntl.__x64_sys_fcntl.do_syscall_64
0.66 � 4% -43.2% 0.38 � 7% perf-sched.wait_time.avg.ms.__cond_resched.fcntl_setlk.do_fcntl.__x64_sys_fcntl.do_syscall_64
0.83 � 36% -95.7% 0.04 �187% perf-sched.wait_time.avg.ms.__cond_resched.kmem_cache_alloc_noprof.posix_lock_inode.fcntl_setlk.do_fcntl
0.35 � 8% -22.9% 0.27 � 3% perf-sched.wait_time.avg.ms.do_wait.kernel_wait4.do_syscall_64.entry_SYSCALL_64_after_hwframe
0.66 -45.7% 0.36 perf-sched.wait_time.avg.ms.fcntl_setlk.do_fcntl.__x64_sys_fcntl.do_syscall_64
4.17 � 2% -30.3% 2.90 � 6% perf-sched.wait_time.avg.ms.rcu_gp_kthread.kthread.ret_from_fork.ret_from_fork_asm
0.42 � 34% -62.8% 0.16 � 24% perf-sched.wait_time.avg.ms.schedule_preempt_disabled.rwsem_down_write_slowpath.down_write.do_truncate
0.75 � 7% -26.7% 0.55 perf-sched.wait_time.avg.ms.schedule_timeout.__wait_for_common.wait_for_completion_state.kernel_clone
0.53 � 4% -46.2% 0.28 � 5% perf-sched.wait_time.avg.ms.syscall_exit_to_user_mode.do_syscall_64.entry_SYSCALL_64_after_hwframe.[unknown]
0.02 � 87% -81.0% 0.00 � 56% perf-sched.wait_time.avg.ms.wait_for_partner.fifo_open.do_dentry_open.vfs_open
1.42 � 41% -96.6% 0.05 �196% perf-sched.wait_time.max.ms.__cond_resched.kmem_cache_alloc_noprof.posix_lock_inode.fcntl_setlk.do_fcntl
0.29 � 38% -79.8% 0.06 �133% perf-sched.wait_time.max.ms.wait_for_partner.fifo_open.do_dentry_open.vfs_open
11.37 -8.4 3.01 � 55% perf-profile.calltrace.cycles-pp.common_startup_64
11.05 -8.1 2.98 � 55% perf-profile.calltrace.cycles-pp.start_secondary.common_startup_64
11.04 -8.1 2.98 � 55% perf-profile.calltrace.cycles-pp.cpu_startup_entry.start_secondary.common_startup_64
11.03 -8.0 2.98 � 55% perf-profile.calltrace.cycles-pp.do_idle.cpu_startup_entry.start_secondary.common_startup_64
7.37 -5.3 2.11 � 63% perf-profile.calltrace.cycles-pp.cpuidle_idle_call.do_idle.cpu_startup_entry.start_secondary.common_startup_64
5.53 -3.6 1.93 � 63% perf-profile.calltrace.cycles-pp.cpuidle_enter.cpuidle_idle_call.do_idle.cpu_startup_entry.start_secondary
5.47 -3.6 1.90 � 63% perf-profile.calltrace.cycles-pp.cpuidle_enter_state.cpuidle_enter.cpuidle_idle_call.do_idle.cpu_startup_entry
4.62 -3.3 1.36 � 74% perf-profile.calltrace.cycles-pp.intel_idle.cpuidle_enter_state.cpuidle_enter.cpuidle_idle_call.do_idle
2.54 -1.4 1.10 � 19% perf-profile.calltrace.cycles-pp.notify_change.do_truncate.do_ftruncate.do_sys_ftruncate.do_syscall_64
1.91 -1.4 0.48 � 73% perf-profile.calltrace.cycles-pp.schedule.fcntl_setlk.do_fcntl.__x64_sys_fcntl.do_syscall_64
1.84 -1.4 0.46 � 73% perf-profile.calltrace.cycles-pp.__schedule.schedule.fcntl_setlk.do_fcntl.__x64_sys_fcntl
1.68 -1.4 0.33 �100% perf-profile.calltrace.cycles-pp.flush_smp_call_function_queue.do_idle.cpu_startup_entry.start_secondary.common_startup_64
2.35 -1.3 1.02 � 19% perf-profile.calltrace.cycles-pp.btrfs_setattr.notify_change.do_truncate.do_ftruncate.do_sys_ftruncate
1.54 -1.2 0.32 �100% perf-profile.calltrace.cycles-pp.__flush_smp_call_function_queue.flush_smp_call_function_queue.do_idle.cpu_startup_entry.start_secondary
2.00 -1.2 0.80 � 22% perf-profile.calltrace.cycles-pp.btrfs_setsize.btrfs_setattr.notify_change.do_truncate.do_ftruncate
1.40 -1.1 0.27 �100% perf-profile.calltrace.cycles-pp.sched_ttwu_pending.__flush_smp_call_function_queue.flush_smp_call_function_queue.do_idle.cpu_startup_entry
1.82 -1.1 0.74 � 22% perf-profile.calltrace.cycles-pp.btrfs_truncate.btrfs_setsize.btrfs_setattr.notify_change.do_truncate
1.72 � 2% -0.9 0.86 � 10% perf-profile.calltrace.cycles-pp.rwsem_spin_on_owner.rwsem_optimistic_spin.rwsem_down_write_slowpath.down_write.do_truncate
11.37 -8.4 3.01 � 55% perf-profile.children.cycles-pp.common_startup_64
11.37 -8.4 3.01 � 55% perf-profile.children.cycles-pp.cpu_startup_entry
11.36 -8.4 3.00 � 55% perf-profile.children.cycles-pp.do_idle
11.05 -8.1 2.98 � 55% perf-profile.children.cycles-pp.start_secondary
7.49 -5.3 2.21 � 56% perf-profile.children.cycles-pp.cpuidle_idle_call
5.63 -3.6 2.01 � 56% perf-profile.children.cycles-pp.cpuidle_enter
5.60 -3.6 2.00 � 56% perf-profile.children.cycles-pp.cpuidle_enter_state
4.67 -3.2 1.48 � 59% perf-profile.children.cycles-pp.intel_idle
2.88 -2.1 0.78 � 48% perf-profile.children.cycles-pp.__schedule
2.55 -1.4 1.11 � 19% perf-profile.children.cycles-pp.notify_change
1.88 -1.4 0.44 � 54% perf-profile.children.cycles-pp.flush_smp_call_function_queue
1.92 -1.4 0.55 � 48% perf-profile.children.cycles-pp.schedule
2.35 -1.3 1.02 � 19% perf-profile.children.cycles-pp.btrfs_setattr
2.00 -1.2 0.80 � 22% perf-profile.children.cycles-pp.btrfs_setsize
1.58 -1.1 0.44 � 53% perf-profile.children.cycles-pp.__flush_smp_call_function_queue
1.82 -1.1 0.74 � 22% perf-profile.children.cycles-pp.btrfs_truncate
1.44 -1.1 0.37 � 53% perf-profile.children.cycles-pp.sched_ttwu_pending
1.24 -1.0 0.28 � 53% perf-profile.children.cycles-pp.ttwu_do_activate
1.19 -0.9 0.27 � 53% perf-profile.children.cycles-pp.enqueue_task
1.14 -0.9 0.27 � 53% perf-profile.children.cycles-pp.enqueue_task_fair
1.72 � 2% -0.9 0.86 � 10% perf-profile.children.cycles-pp.rwsem_spin_on_owner
1.04 -0.8 0.22 � 51% perf-profile.children.cycles-pp.try_to_block_task
1.00 -0.8 0.22 � 51% perf-profile.children.cycles-pp.dequeue_task_fair
1.02 -0.8 0.26 � 50% perf-profile.children.cycles-pp.schedule_idle
0.96 -0.8 0.21 � 50% perf-profile.children.cycles-pp.dequeue_entities
0.76 -0.7 0.06 � 73% perf-profile.children.cycles-pp.hrtimer_start_range_ns
0.72 � 2% -0.7 0.05 � 74% perf-profile.children.cycles-pp.tick_nohz_idle_exit
0.99 -0.6 0.36 � 54% perf-profile.children.cycles-pp.__locks_wake_up_blocks
0.95 -0.6 0.34 � 53% perf-profile.children.cycles-pp.__wake_up
0.73 -0.6 0.14 � 74% perf-profile.children.cycles-pp.menu_select
0.88 -0.6 0.30 � 46% perf-profile.children.cycles-pp.__pick_next_task
0.87 -0.6 0.29 � 53% perf-profile.children.cycles-pp.__wake_up_common
0.79 -0.5 0.26 � 52% perf-profile.children.cycles-pp.autoremove_wake_function
0.78 -0.5 0.27 � 45% perf-profile.children.cycles-pp.try_to_wake_up
0.64 -0.5 0.15 � 60% perf-profile.children.cycles-pp.dequeue_entity
0.54 -0.5 0.05 � 75% perf-profile.children.cycles-pp.__hrtimer_start_range_ns
0.61 -0.5 0.14 � 43% perf-profile.children.cycles-pp.locks_delete_lock_ctx
0.60 � 2% -0.5 0.14 � 43% perf-profile.children.cycles-pp.locks_unlink_lock_ctx
0.74 � 2% -0.4 0.29 � 45% perf-profile.children.cycles-pp.pick_next_task_fair
0.56 � 2% -0.4 0.11 � 73% perf-profile.children.cycles-pp.enqueue_entity
0.78 -0.4 0.34 � 18% perf-profile.children.cycles-pp.clear_bhb_loop
0.52 -0.4 0.15 � 43% perf-profile.children.cycles-pp.update_load_avg
0.42 � 3% -0.4 0.07 � 72% perf-profile.children.cycles-pp.handle_softirqs
0.52 -0.3 0.19 � 24% perf-profile.children.cycles-pp.syscall_exit_to_user_mode
0.37 -0.3 0.07 � 73% perf-profile.children.cycles-pp.tick_nohz_get_sleep_length
0.37 -0.3 0.09 � 74% perf-profile.children.cycles-pp.dl_server_start
0.44 � 3% -0.3 0.16 � 27% perf-profile.children.cycles-pp.start_transaction
0.36 � 2% -0.3 0.08 � 74% perf-profile.children.cycles-pp.enqueue_dl_entity
0.30 � 2% -0.3 0.03 �100% perf-profile.children.cycles-pp.switch_mm_irqs_off
0.40 � 2% -0.3 0.14 � 8% perf-profile.children.cycles-pp.kmem_cache_alloc_noprof
0.28 � 2% -0.2 0.05 � 72% perf-profile.children.cycles-pp.update_curr
0.88 -0.2 0.65 � 22% perf-profile.children.cycles-pp.asm_sysvec_apic_timer_interrupt
0.27 -0.2 0.05 � 74% perf-profile.children.cycles-pp.tick_nohz_next_event
0.83 -0.2 0.61 � 21% perf-profile.children.cycles-pp.sysvec_apic_timer_interrupt
0.47 -0.2 0.25 � 52% perf-profile.children.cycles-pp._raw_spin_lock_irqsave
0.49 � 2% -0.2 0.28 � 18% perf-profile.children.cycles-pp.btrfs_update_inode
0.24 -0.2 0.04 �100% perf-profile.children.cycles-pp.dl_server_stop
0.32 � 2% -0.2 0.12 � 23% perf-profile.children.cycles-pp.btrfs_truncate_inode_items
0.30 � 3% -0.2 0.09 � 11% perf-profile.children.cycles-pp.kmem_cache_free
0.31 -0.2 0.11 � 73% perf-profile.children.cycles-pp.ttwu_queue_wakelist
0.53 -0.2 0.33 � 4% perf-profile.children.cycles-pp.__hrtimer_run_queues
0.23 � 2% -0.2 0.04 �100% perf-profile.children.cycles-pp.hrtimer_try_to_cancel
0.25 � 3% -0.2 0.06 � 73% perf-profile.children.cycles-pp.select_task_rq
0.50 -0.2 0.32 � 4% perf-profile.children.cycles-pp.tick_nohz_handler
0.32 � 2% -0.2 0.15 � 21% perf-profile.children.cycles-pp.entry_SYSRETQ_unsafe_stack
0.22 � 3% -0.2 0.05 � 74% perf-profile.children.cycles-pp.select_task_rq_fair
0.22 � 3% -0.2 0.06 � 73% perf-profile.children.cycles-pp.set_next_task_fair
0.45 -0.2 0.29 � 2% perf-profile.children.cycles-pp.update_process_times
0.36 � 3% -0.2 0.19 � 43% perf-profile.children.cycles-pp.sched_balance_newidle
0.63 -0.2 0.47 � 12% perf-profile.children.cycles-pp.__sysvec_apic_timer_interrupt
0.62 -0.2 0.46 � 12% perf-profile.children.cycles-pp.hrtimer_interrupt
0.24 -0.1 0.09 � 74% perf-profile.children.cycles-pp.__smp_call_single_queue
0.36 � 3% -0.1 0.22 � 19% perf-profile.children.cycles-pp.btrfs_delayed_update_inode
0.18 � 2% -0.1 0.03 �100% perf-profile.children.cycles-pp.__update_load_avg_se
0.20 � 2% -0.1 0.05 � 74% perf-profile.children.cycles-pp.start_dl_timer
0.23 � 2% -0.1 0.09 � 23% perf-profile.children.cycles-pp.btrfs_search_slot
0.18 � 2% -0.1 0.04 � 72% perf-profile.children.cycles-pp.prepare_task_switch
0.18 � 5% -0.1 0.05 � 75% perf-profile.children.cycles-pp.set_next_entity
0.24 -0.1 0.11 � 31% perf-profile.children.cycles-pp.clockevents_program_event
0.32 � 3% -0.1 0.20 � 44% perf-profile.children.cycles-pp.sched_balance_rq
0.20 � 2% -0.1 0.08 � 53% perf-profile.children.cycles-pp.raw_spin_rq_lock_nested
0.23 � 2% -0.1 0.11 � 74% perf-profile.children.cycles-pp.prepare_to_wait_event
0.16 � 2% -0.1 0.04 � 71% perf-profile.children.cycles-pp.kill
0.16 � 3% -0.1 0.04 � 71% perf-profile.children.cycles-pp.getpgrp
0.22 � 2% -0.1 0.11 � 74% perf-profile.children.cycles-pp.__locks_insert_block
0.14 � 2% -0.1 0.04 � 71% perf-profile.children.cycles-pp.f_setown
0.28 � 2% -0.1 0.17 � 45% perf-profile.children.cycles-pp.sched_balance_find_src_group
0.27 � 3% -0.1 0.17 � 45% perf-profile.children.cycles-pp.update_sd_lb_stats
0.14 � 3% -0.1 0.04 � 71% perf-profile.children.cycles-pp.x64_sys_call
0.18 � 2% -0.1 0.08 � 22% perf-profile.children.cycles-pp.entry_SYSCALL_64
0.14 � 6% -0.1 0.04 � 71% perf-profile.children.cycles-pp.__clear_extent_bit
0.12 � 12% -0.1 0.03 �100% perf-profile.children.cycles-pp.unmap_mapping_range
0.17 � 4% -0.1 0.08 � 72% perf-profile.children.cycles-pp.__irq_exit_rcu
0.12 � 4% -0.1 0.03 �100% perf-profile.children.cycles-pp.btrfs_reserve_metadata_bytes
0.12 � 14% -0.1 0.02 � 99% perf-profile.children.cycles-pp.truncate_pagecache
0.14 � 3% -0.1 0.04 � 72% perf-profile.children.cycles-pp.sched_balance_domains
0.12 � 5% -0.1 0.03 �100% perf-profile.children.cycles-pp.__reserve_bytes
0.15 � 4% -0.1 0.06 � 74% perf-profile.children.cycles-pp.call_function_single_prep_ipi
0.14 � 3% -0.1 0.06 � 47% perf-profile.children.cycles-pp.fdget_raw
0.12 � 3% -0.1 0.03 �100% perf-profile.children.cycles-pp.read_tsc
0.11 -0.1 0.02 � 99% perf-profile.children.cycles-pp.__f_setown
0.12 � 4% -0.1 0.03 �100% perf-profile.children.cycles-pp.native_sched_clock
0.14 � 3% -0.1 0.05 � 46% perf-profile.children.cycles-pp.__cond_resched
0.22 � 2% -0.1 0.13 � 17% perf-profile.children.cycles-pp.btrfs_dirty_inode
0.11 � 14% -0.1 0.03 �101% perf-profile.children.cycles-pp.__btrfs_release_delayed_node
0.14 � 2% -0.1 0.06 � 14% perf-profile.children.cycles-pp._copy_from_user
0.15 � 4% -0.1 0.07 � 19% perf-profile.children.cycles-pp.__btrfs_end_transaction
0.11 -0.1 0.03 �100% perf-profile.children.cycles-pp.btrfs_read_lock_root_node
0.11 � 6% -0.1 0.03 �100% perf-profile.children.cycles-pp.wake_affine
0.10 � 4% -0.1 0.03 �100% perf-profile.children.cycles-pp.btrfs_get_or_create_delayed_node
0.13 -0.1 0.05 � 73% perf-profile.children.cycles-pp.idle_cpu
0.10 � 3% -0.1 0.02 � 99% perf-profile.children.cycles-pp.syscall_return_via_sysret
0.10 -0.1 0.02 � 99% perf-profile.children.cycles-pp.__switch_to
0.10 � 3% -0.1 0.03 �100% perf-profile.children.cycles-pp.btrfs_root_node
0.10 � 3% -0.1 0.02 � 99% perf-profile.children.cycles-pp.sched_clock_cpu
0.10 � 6% -0.1 0.02 � 99% perf-profile.children.cycles-pp.btrfs_update_root_times
0.14 � 3% -0.1 0.07 � 75% perf-profile.children.cycles-pp.posix_locks_conflict
0.10 � 5% -0.1 0.02 � 99% perf-profile.children.cycles-pp.btrfs_get_delayed_node
0.11 � 10% -0.1 0.04 � 71% perf-profile.children.cycles-pp.dentry_needs_remove_privs
0.10 � 4% -0.1 0.03 �100% perf-profile.children.cycles-pp.available_idle_cpu
0.12 � 5% -0.1 0.05 � 75% perf-profile.children.cycles-pp.update_rq_clock
0.10 � 14% -0.1 0.04 � 71% perf-profile.children.cycles-pp.security_inode_need_killpriv
0.10 � 11% -0.1 0.04 � 71% perf-profile.children.cycles-pp.cap_inode_need_killpriv
0.10 � 11% -0.1 0.04 � 71% perf-profile.children.cycles-pp.__vfs_getxattr
0.08 -0.1 0.02 � 99% perf-profile.children.cycles-pp.get_nohz_timer_target
0.07 � 6% -0.0 0.03 �100% perf-profile.children.cycles-pp.tick_nohz_stop_idle
0.09 � 4% -0.0 0.05 � 74% perf-profile.children.cycles-pp.llist_reverse_order
86.48 +9.7 96.17 perf-profile.children.cycles-pp.entry_SYSCALL_64_after_hwframe
86.34 +9.7 96.08 perf-profile.children.cycles-pp.do_syscall_64
4.67 -3.2 1.48 � 59% perf-profile.self.cycles-pp.intel_idle
1.69 -1.0 0.68 � 36% perf-profile.self.cycles-pp._raw_spin_lock
1.71 � 2% -0.9 0.86 � 11% perf-profile.self.cycles-pp.rwsem_spin_on_owner
0.67 � 3% -0.4 0.24 � 46% perf-profile.self.cycles-pp.posix_lock_inode
0.77 -0.4 0.34 � 18% perf-profile.self.cycles-pp.clear_bhb_loop
0.29 � 2% -0.3 0.03 �100% perf-profile.self.cycles-pp.switch_mm_irqs_off
0.46 -0.2 0.25 � 51% perf-profile.self.cycles-pp._raw_spin_lock_irqsave
0.29 � 4% -0.2 0.09 � 12% perf-profile.self.cycles-pp.kmem_cache_free
0.24 � 2% -0.2 0.05 � 74% perf-profile.self.cycles-pp.menu_select
0.33 -0.2 0.14 � 23% perf-profile.self.cycles-pp.syscall_exit_to_user_mode
0.23 � 3% -0.2 0.05 � 74% perf-profile.self.cycles-pp.__schedule
0.25 � 3% -0.2 0.08 � 4% perf-profile.self.cycles-pp.kmem_cache_alloc_noprof
0.31 -0.2 0.14 � 19% perf-profile.self.cycles-pp.entry_SYSRETQ_unsafe_stack
0.21 � 2% -0.1 0.07 � 74% perf-profile.self.cycles-pp.update_load_avg
0.16 � 3% -0.1 0.03 �100% perf-profile.self.cycles-pp.__update_load_avg_se
0.22 � 4% -0.1 0.09 � 23% perf-profile.self.cycles-pp.do_fcntl
0.16 � 4% -0.1 0.03 � 70% perf-profile.self.cycles-pp.__libc_fcntl64
0.19 � 6% -0.1 0.07 � 72% perf-profile.self.cycles-pp.posix_test_lock
0.21 � 2% -0.1 0.09 � 24% perf-profile.self.cycles-pp.do_syscall_64
0.19 � 4% -0.1 0.08 � 22% perf-profile.self.cycles-pp.__x64_sys_fcntl
0.13 � 3% -0.1 0.03 �100% perf-profile.self.cycles-pp.enqueue_task_fair
0.12 � 3% -0.1 0.02 � 99% perf-profile.self.cycles-pp.cpuidle_enter_state
0.15 � 5% -0.1 0.06 � 74% perf-profile.self.cycles-pp.call_function_single_prep_ipi
0.12 � 4% -0.1 0.04 � 72% perf-profile.self.cycles-pp.fdget_raw
0.11 -0.1 0.03 �100% perf-profile.self.cycles-pp.read_tsc
0.11 � 5% -0.1 0.03 �100% perf-profile.self.cycles-pp.native_sched_clock
0.14 � 3% -0.1 0.06 � 11% perf-profile.self.cycles-pp._copy_from_user
0.12 � 4% -0.1 0.04 � 71% perf-profile.self.cycles-pp.entry_SYSCALL_64
0.14 � 3% -0.1 0.07 � 74% perf-profile.self.cycles-pp.posix_locks_conflict
0.10 -0.1 0.03 �100% perf-profile.self.cycles-pp.btrfs_root_node
0.12 � 4% -0.1 0.05 � 72% perf-profile.self.cycles-pp.idle_cpu
0.09 � 5% -0.1 0.02 � 99% perf-profile.self.cycles-pp.__switch_to
0.09 � 5% -0.1 0.02 � 99% perf-profile.self.cycles-pp.btrfs_get_delayed_node
0.12 � 9% -0.1 0.05 � 48% perf-profile.self.cycles-pp.notify_change
0.10 � 4% -0.1 0.03 �100% perf-profile.self.cycles-pp.available_idle_cpu
0.13 � 3% -0.1 0.07 � 73% perf-profile.self.cycles-pp.update_cfs_group
0.08 -0.1 0.02 � 99% perf-profile.self.cycles-pp.prepare_task_switch
0.14 � 4% -0.1 0.09 � 7% perf-profile.self.cycles-pp.entry_SYSCALL_64_after_hwframe
0.08 � 6% -0.0 0.03 �100% perf-profile.self.cycles-pp.__wake_up_common
0.09 � 4% -0.0 0.05 � 74% perf-profile.self.cycles-pp.llist_reverse_order
***************************************************************************************************
lkp-icl-2sp4: 128 threads 2 sockets Intel(R) Xeon(R) Platinum 8358 CPU @ 2.60GHz (Ice Lake) with 128G memory
=========================================================================================
compiler/cpufreq_governor/disk/fs/kconfig/nr_threads/rootfs/tbox_group/test/testcase/testtime:
gcc-12/performance/1HDD/btrfs/x86_64-rhel-9.4/100%/debian-12-x86_64-20240206.cgz/lkp-icl-2sp4/dirdeep/stress-ng/60s
commit:
8de7606f0f ("cpuidle: menu: Eliminate outliers on both ends of the sample set")
85975daeaa ("cpuidle: menu: Avoid discarding useful information")
8de7606f0fe2bf5a 85975daeaa4d6ec560bfcd354fc
---------------- ---------------------------
%stddev %change %stddev
\ | \
7906549 +34.6% 10644730 � 2% cpuidle..usage
509060 � 9% +18.6% 603694 � 6% numa-numastat.node1.numa_hit
95.48 -1.3% 94.23 iostat.cpu.idle
4.21 +26.3% 5.31 � 3% iostat.cpu.system
355.17 � 9% +808.7% 3227 � 68% perf-c2c.HITM.local
660.50 � 6% +695.1% 5251 � 67% perf-c2c.HITM.total
273597 +73.5% 474695 � 13% meminfo.Inactive
273597 +73.5% 474695 � 13% meminfo.Inactive(file)
504006 +13.9% 574080 meminfo.KReclaimable
504006 +13.9% 574080 meminfo.SReclaimable
0.06 � 2% +0.1 0.17 � 19% mpstat.cpu.all.iowait%
3.93 +1.1 5.05 � 4% mpstat.cpu.all.sys%
83.00 � 11% -45.0% 45.67 � 5% mpstat.max_utilization.seconds
7.35 +547.8% 47.62 � 2% mpstat.max_utilization_pct
148020 +71.0% 253060 � 13% numa-meminfo.node0.Inactive
148020 +71.0% 253060 � 13% numa-meminfo.node0.Inactive(file)
126007 � 3% +75.7% 221417 � 12% numa-meminfo.node1.Inactive
126007 � 3% +75.7% 221417 � 12% numa-meminfo.node1.Inactive(file)
7388 � 2% +91.7% 14163 � 13% vmstat.io.bo
0.08 � 14% +217.0% 0.25 � 14% vmstat.procs.b
86443 +45.9% 126086 � 11% vmstat.system.cs
49974 +24.5% 62229 � 3% vmstat.system.in
0.09 � 5% -20.3% 0.07 � 7% perf-sched.sch_delay.avg.ms.schedule_timeout.__wait_for_common.wait_for_completion_state.kernel_clone
0.18 � 24% -23.4% 0.14 � 10% perf-sched.sch_delay.max.ms.__cond_resched.down_read.btrfs_tree_read_lock_nested.btrfs_search_slot.btrfs_lookup_dir_item
0.16 �108% +168.7% 0.42 � 56% perf-sched.sch_delay.max.ms.irqentry_exit_to_user_mode.asm_sysvec_apic_timer_interrupt.[unknown]
0.20 � 6% +21.1% 0.24 � 9% perf-sched.sch_delay.max.ms.rcu_gp_kthread.kthread.ret_from_fork.ret_from_fork_asm
1283 � 5% +11.3% 1428 perf-sched.wait_and_delay.count.smpboot_thread_fn.kthread.ret_from_fork.ret_from_fork_asm
226206 +15.0% 260196 stress-ng.dirdeep.ops
2335 +13.2% 2644 � 3% stress-ng.dirdeep.ops_per_sec
1077669 +84.8% 1991136 � 13% stress-ng.time.file_system_outputs
3759 � 3% +21.4% 4565 � 5% stress-ng.time.involuntary_context_switches
76585 +9.0% 83503 stress-ng.time.minor_page_faults
486.33 +27.8% 621.67 � 4% stress-ng.time.percent_of_cpu_this_job_got
471.02 � 2% +29.8% 611.18 � 2% stress-ng.time.system_time
3830062 +48.7% 5696511 � 9% stress-ng.time.voluntary_context_switches
85006 � 2% +75.5% 149204 � 13% numa-vmstat.node0.nr_dirtied
37132 +70.8% 63435 � 13% numa-vmstat.node0.nr_inactive_file
48596 � 2% +99.9% 97153 � 15% numa-vmstat.node0.nr_written
37132 +70.8% 63435 � 13% numa-vmstat.node0.nr_zone_inactive_file
68117 � 3% +88.7% 128512 � 13% numa-vmstat.node1.nr_dirtied
31608 � 3% +75.6% 55507 � 12% numa-vmstat.node1.nr_inactive_file
44504 � 4% +89.4% 84281 � 13% numa-vmstat.node1.nr_written
31608 � 3% +75.6% 55507 � 12% numa-vmstat.node1.nr_zone_inactive_file
508970 � 9% +18.5% 603164 � 6% numa-vmstat.node1.numa_hit
6200 � 4% +672.4% 47890 � 9% sched_debug.cfs_rq:/.avg_vruntime.min
0.29 � 9% -25.8% 0.22 � 9% sched_debug.cfs_rq:/.h_nr_running.stddev
6200 � 4% +672.4% 47890 � 9% sched_debug.cfs_rq:/.min_vruntime.min
0.29 � 9% -24.8% 0.22 � 9% sched_debug.cfs_rq:/.nr_running.stddev
3.12 � 7% +17.3% 3.66 � 4% sched_debug.cpu.clock.stddev
336.45 � 19% -48.6% 172.93 � 15% sched_debug.cpu.curr->pid.avg
1079 � 9% -31.9% 735.25 � 5% sched_debug.cpu.curr->pid.stddev
0.29 � 9% -23.9% 0.22 � 9% sched_debug.cpu.nr_running.stddev
25418 +36.5% 34702 sched_debug.cpu.nr_switches.avg
34673 � 5% +25.4% 43473 � 2% sched_debug.cpu.nr_switches.max
22430 � 2% +29.4% 29030 � 7% sched_debug.cpu.nr_switches.min
1913 � 5% +24.7% 2387 � 3% sched_debug.cpu.nr_switches.stddev
4.67 -12.9% 4.07 � 4% perf-stat.i.MPKI
1.721e+09 � 3% +27.9% 2.202e+09 � 3% perf-stat.i.branch-instructions
2.98 -0.3 2.65 perf-stat.i.branch-miss-rate%
13.07 +2.1 15.17 � 4% perf-stat.i.cache-miss-rate%
43228613 � 3% +33.1% 57529406 � 3% perf-stat.i.cache-misses
88448 +45.7% 128869 � 11% perf-stat.i.context-switches
1.641e+10 � 2% +36.2% 2.235e+10 � 4% perf-stat.i.cpu-cycles
2656 � 2% +57.6% 4187 � 10% perf-stat.i.cpu-migrations
537.42 +6.4% 571.82 perf-stat.i.cycles-between-cache-misses
9.735e+09 � 2% +28.3% 1.249e+10 � 3% perf-stat.i.instructions
0.08 � 54% +127.5% 0.19 � 8% perf-stat.i.major-faults
0.07 � 49% +691.9% 0.56 � 22% perf-stat.i.metric.K/sec
4854 +4.7% 5081 perf-stat.i.minor-faults
4854 +4.7% 5081 perf-stat.i.page-faults
2.91 � 2% -1.1 1.81 � 45% perf-stat.overall.branch-miss-rate%
0.59 -21.4% 0.47 � 44% perf-stat.overall.ipc
272306 +3.7% 282361 proc-vmstat.nr_active_anon
153118 +81.4% 277717 � 13% proc-vmstat.nr_dirtied
1066133 +5.5% 1124738 proc-vmstat.nr_file_pages
68543 +73.2% 118688 � 12% proc-vmstat.nr_inactive_file
95917 � 2% +8.8% 104331 � 3% proc-vmstat.nr_shmem
125885 +14.0% 143516 proc-vmstat.nr_slab_reclaimable
96269 +3.9% 99983 proc-vmstat.nr_slab_unreclaimable
93100 +94.9% 181434 � 14% proc-vmstat.nr_written
272306 +3.7% 282361 proc-vmstat.nr_zone_active_anon
68543 +73.2% 118688 � 12% proc-vmstat.nr_zone_inactive_file
12058 � 11% +27.6% 15381 � 12% proc-vmstat.numa_hint_faults_local
982272 +16.8% 1147454 � 3% proc-vmstat.numa_hit
849846 +19.4% 1015038 � 3% proc-vmstat.numa_local
1184753 +16.4% 1379598 � 3% proc-vmstat.pgalloc_normal
647539 +3.4% 669676 proc-vmstat.pgfault
896017 � 2% +9.4% 980665 � 3% proc-vmstat.pgfree
744836 +94.9% 1451948 � 14% proc-vmstat.pgpgout
17.05 -2.1 14.96 � 17% perf-profile.calltrace.cycles-pp.common_startup_64
1.02 � 2% -0.6 0.44 � 70% perf-profile.calltrace.cycles-pp.flush_smp_call_function_queue.do_idle.cpu_startup_entry.rest_init.start_kernel
0.99 � 2% -0.6 0.43 � 70% perf-profile.calltrace.cycles-pp.do_softirq.flush_smp_call_function_queue.do_idle.cpu_startup_entry.rest_init
0.98 -0.6 0.43 � 70% perf-profile.calltrace.cycles-pp.handle_softirqs.do_softirq.flush_smp_call_function_queue.do_idle.cpu_startup_entry
0.98 � 2% -0.6 0.42 � 70% perf-profile.calltrace.cycles-pp._nohz_idle_balance.handle_softirqs.do_softirq.flush_smp_call_function_queue.do_idle
1.46 -0.4 1.08 � 46% perf-profile.calltrace.cycles-pp.cpu_startup_entry.rest_init.start_kernel.x86_64_start_reservations.x86_64_start_kernel
1.46 -0.4 1.08 � 46% perf-profile.calltrace.cycles-pp.rest_init.start_kernel.x86_64_start_reservations.x86_64_start_kernel.common_startup_64
1.46 -0.4 1.08 � 46% perf-profile.calltrace.cycles-pp.start_kernel.x86_64_start_reservations.x86_64_start_kernel.common_startup_64
1.46 -0.4 1.08 � 46% perf-profile.calltrace.cycles-pp.x86_64_start_kernel.common_startup_64
1.46 -0.4 1.08 � 46% perf-profile.calltrace.cycles-pp.x86_64_start_reservations.x86_64_start_kernel.common_startup_64
1.46 -0.4 1.08 � 46% perf-profile.calltrace.cycles-pp.do_idle.cpu_startup_entry.rest_init.start_kernel.x86_64_start_reservations
17.29 +0.7 18.01 � 3% perf-profile.calltrace.cycles-pp.__filename_parentat.filename_create.do_linkat.__x64_sys_link.do_syscall_64
16.93 +0.8 17.69 � 4% perf-profile.calltrace.cycles-pp.__filename_parentat.filename_create.do_mkdirat.__x64_sys_mkdir.do_syscall_64
16.92 +0.8 17.69 � 4% perf-profile.calltrace.cycles-pp.path_parentat.__filename_parentat.filename_create.do_mkdirat.__x64_sys_mkdir
16.81 +0.8 17.58 � 4% perf-profile.calltrace.cycles-pp.link_path_walk.path_parentat.__filename_parentat.filename_create.do_mkdirat
23.62 +0.8 24.42 � 3% perf-profile.calltrace.cycles-pp.do_linkat.__x64_sys_link.do_syscall_64.entry_SYSCALL_64_after_hwframe.link
26.38 +1.7 28.07 � 6% perf-profile.calltrace.cycles-pp.inode_permission.link_path_walk.path_parentat.__filename_parentat.filename_create
17.05 -2.1 14.96 � 17% perf-profile.children.cycles-pp.common_startup_64
17.05 -2.1 14.96 � 17% perf-profile.children.cycles-pp.cpu_startup_entry
17.03 -2.1 14.95 � 17% perf-profile.children.cycles-pp.do_idle
3.29 -0.7 2.61 � 19% perf-profile.children.cycles-pp.flush_smp_call_function_queue
4.69 -0.6 4.13 � 16% perf-profile.children.cycles-pp.__schedule
1.10 � 2% -0.4 0.68 � 31% perf-profile.children.cycles-pp.do_softirq
1.46 -0.3 1.16 � 30% perf-profile.children.cycles-pp.rest_init
1.46 -0.3 1.16 � 30% perf-profile.children.cycles-pp.start_kernel
1.46 -0.3 1.16 � 30% perf-profile.children.cycles-pp.x86_64_start_kernel
1.46 -0.3 1.16 � 30% perf-profile.children.cycles-pp.x86_64_start_reservations
1.35 � 3% -0.3 1.08 � 30% perf-profile.children.cycles-pp.tick_nohz_stop_tick
2.11 � 6% -0.2 1.88 � 11% perf-profile.children.cycles-pp.read_block_for_search
1.34 � 9% -0.2 1.11 � 12% perf-profile.children.cycles-pp.find_extent_buffer
0.88 � 8% -0.2 0.70 � 13% perf-profile.children.cycles-pp.find_extent_buffer_nolock
0.32 � 3% -0.1 0.27 � 21% perf-profile.children.cycles-pp.hrtimer_try_to_cancel
0.42 � 3% -0.0 0.38 � 7% perf-profile.children.cycles-pp.poll_idle
0.15 � 5% -0.0 0.11 � 14% perf-profile.children.cycles-pp.task_contending
0.08 � 11% -0.0 0.05 � 46% perf-profile.children.cycles-pp.folio_mark_accessed
0.10 � 4% -0.0 0.08 � 45% perf-profile.children.cycles-pp.io_serial_in
0.07 � 11% -0.0 0.04 � 45% perf-profile.children.cycles-pp.__xa_store
0.06 � 6% -0.0 0.04 � 44% perf-profile.children.cycles-pp.hrtimer_active
0.07 � 9% +0.1 0.20 � 29% perf-profile.children.cycles-pp.asm_sysvec_call_function_single
0.06 � 11% +0.1 0.20 � 30% perf-profile.children.cycles-pp.sysvec_call_function_single
0.27 � 7% +0.2 0.48 � 20% perf-profile.children.cycles-pp.__irq_exit_rcu
23.62 +0.8 24.42 � 3% perf-profile.children.cycles-pp.do_linkat
26.67 +1.7 28.36 � 6% perf-profile.children.cycles-pp.inode_permission
81.04 +2.1 83.15 � 3% perf-profile.children.cycles-pp.do_syscall_64
81.05 +2.1 83.16 � 3% perf-profile.children.cycles-pp.entry_SYSCALL_64_after_hwframe
50.62 +2.2 52.78 � 3% perf-profile.children.cycles-pp.link_path_walk
50.57 +2.2 52.75 � 3% perf-profile.children.cycles-pp.__filename_parentat
50.56 +2.2 52.74 � 3% perf-profile.children.cycles-pp.path_parentat
0.70 � 10% -0.2 0.55 � 13% perf-profile.self.cycles-pp.find_extent_buffer_nolock
0.39 � 2% -0.1 0.33 � 19% perf-profile.self.cycles-pp.update_load_avg
0.35 � 3% -0.1 0.29 � 22% perf-profile.self.cycles-pp.switch_mm_irqs_off
0.40 � 3% -0.0 0.36 � 6% perf-profile.self.cycles-pp.poll_idle
0.08 � 9% -0.0 0.05 � 46% perf-profile.self.cycles-pp.folio_mark_accessed
0.10 � 4% -0.0 0.08 � 45% perf-profile.self.cycles-pp.io_serial_in
22.79 +1.5 24.25 � 5% perf-profile.self.cycles-pp.inode_permission
***************************************************************************************************
lkp-spr-2sp4: 224 threads 2 sockets Intel(R) Xeon(R) Platinum 8480CTDX (Sapphire Rapids) with 512G memory
=========================================================================================
compiler/cpufreq_governor/kconfig/mode/nr_threads/rootfs/tbox_group/test/test_memory_size/testcase:
gcc-12/performance/x86_64-rhel-9.4/development/50%/debian-12-x86_64-20240206.cgz/lkp-spr-2sp4/TCP/50%/lmbench3
commit:
8de7606f0f ("cpuidle: menu: Eliminate outliers on both ends of the sample set")
85975daeaa ("cpuidle: menu: Avoid discarding useful information")
8de7606f0fe2bf5a 85975daeaa4d6ec560bfcd354fc
---------------- ---------------------------
%stddev %change %stddev
\ | \
174085 -7.3% 161319 lmbench3.TCP.socket.bandwidth.10MB.MB/sec
0.58 � 7% -0.2 0.40 � 6% mpstat.cpu.all.irq%
6.417e+08 -5.0% 6.096e+08 � 2% proc-vmstat.numa_hit
6.413e+08 -5.0% 6.091e+08 � 2% proc-vmstat.numa_local
5.116e+09 -5.0% 4.858e+09 � 2% proc-vmstat.pgalloc_normal
5.115e+09 -5.0% 4.858e+09 � 2% proc-vmstat.pgfree
1.87 -0.0 1.84 perf-profile.calltrace.cycles-pp.syscall_exit_to_user_mode.do_syscall_64.entry_SYSCALL_64_after_hwframe.read
48.46 +0.2 48.62 perf-profile.calltrace.cycles-pp.write
43.82 +0.2 44.02 perf-profile.calltrace.cycles-pp.entry_SYSCALL_64_after_hwframe.write
43.18 +0.2 43.38 perf-profile.calltrace.cycles-pp.do_syscall_64.entry_SYSCALL_64_after_hwframe.write
38.09 +0.2 38.29 perf-profile.calltrace.cycles-pp.vfs_write.ksys_write.do_syscall_64.entry_SYSCALL_64_after_hwframe.write
39.70 +0.2 39.92 perf-profile.calltrace.cycles-pp.ksys_write.do_syscall_64.entry_SYSCALL_64_after_hwframe.write
32.76 +0.2 32.99 perf-profile.calltrace.cycles-pp.sock_read_iter.vfs_read.ksys_read.do_syscall_64.entry_SYSCALL_64_after_hwframe
30.85 +0.2 31.10 perf-profile.calltrace.cycles-pp.sock_recvmsg.sock_read_iter.vfs_read.ksys_read.do_syscall_64
30.08 +0.3 30.33 perf-profile.calltrace.cycles-pp.inet_recvmsg.sock_recvmsg.sock_read_iter.vfs_read.ksys_read
29.68 +0.3 29.94 perf-profile.calltrace.cycles-pp.tcp_recvmsg.inet_recvmsg.sock_recvmsg.sock_read_iter.vfs_read
24.83 +0.3 25.10 perf-profile.calltrace.cycles-pp.tcp_recvmsg_locked.tcp_recvmsg.inet_recvmsg.sock_recvmsg.sock_read_iter
6.10 � 2% +0.3 6.37 perf-profile.calltrace.cycles-pp._raw_spin_lock_bh.release_sock.tcp_sendmsg.sock_write_iter.vfs_write
0.33 � 2% -0.0 0.29 � 6% perf-profile.children.cycles-pp.write@plt
0.55 -0.0 0.53 perf-profile.children.cycles-pp.syscall_exit_to_user_mode_prepare
50.22 +0.2 50.39 perf-profile.children.cycles-pp.write
38.48 +0.2 38.69 perf-profile.children.cycles-pp.vfs_write
83.94 +0.2 84.16 perf-profile.children.cycles-pp.do_syscall_64
32.85 +0.2 33.08 perf-profile.children.cycles-pp.sock_read_iter
40.11 +0.2 40.34 perf-profile.children.cycles-pp.ksys_write
31.05 +0.2 31.30 perf-profile.children.cycles-pp.sock_recvmsg
30.17 +0.3 30.43 perf-profile.children.cycles-pp.inet_recvmsg
29.86 +0.3 30.12 perf-profile.children.cycles-pp.tcp_recvmsg
25.09 +0.3 25.36 perf-profile.children.cycles-pp.tcp_recvmsg_locked
0.45 � 2% -0.1 0.31 � 9% perf-profile.self.cycles-pp.source
1.73 -0.1 1.64 perf-profile.self.cycles-pp.vfs_read
3.76 -0.0 3.72 perf-profile.self.cycles-pp.tcp_sendmsg_locked
0.73 -0.0 0.71 perf-profile.self.cycles-pp.ksys_read
0.35 +0.0 0.37 perf-profile.self.cycles-pp.tcp_release_cb
2.08 +0.0 2.12 perf-profile.self.cycles-pp.tcp_write_xmit
1.68 +0.0 1.73 perf-profile.self.cycles-pp.check_heap_object
1.52 +0.2 1.71 perf-profile.self.cycles-pp.release_sock
***************************************************************************************************
lkp-icl-2sp4: 128 threads 2 sockets Intel(R) Xeon(R) Platinum 8358 CPU @ 2.60GHz (Ice Lake) with 128G memory
=========================================================================================
compiler/cpufreq_governor/disk/fs/kconfig/nr_threads/rootfs/tbox_group/test/testcase/testtime:
gcc-12/performance/1HDD/btrfs/x86_64-rhel-9.4/100%/debian-12-x86_64-20240206.cgz/lkp-icl-2sp4/symlink/stress-ng/60s
commit:
8de7606f0f ("cpuidle: menu: Eliminate outliers on both ends of the sample set")
85975daeaa ("cpuidle: menu: Avoid discarding useful information")
8de7606f0fe2bf5a 85975daeaa4d6ec560bfcd354fc
---------------- ---------------------------
%stddev %change %stddev
\ | \
6273266 +43.9% 9026187 � 9% cpuidle..usage
3.06 +17.2% 3.59 � 5% iostat.cpu.system
1616 � 6% +10.0% 1778 � 5% perf-c2c.DRAM.remote
760173 � 5% +21.8% 925781 � 6% numa-numastat.node0.local_node
805692 � 7% +21.9% 982292 � 7% numa-numastat.node0.numa_hit
736314 � 5% +24.7% 918074 � 12% numa-numastat.node1.local_node
823222 � 6% +20.7% 993970 � 7% numa-numastat.node1.numa_hit
3751 � 13% +275.6% 14089 � 22% sched_debug.cfs_rq:/.avg_vruntime.min
3751 � 13% +275.6% 14089 � 22% sched_debug.cfs_rq:/.min_vruntime.min
26533 +37.6% 36513 � 6% sched_debug.cpu.nr_switches.avg
38279 � 7% +21.0% 46312 � 3% sched_debug.cpu.nr_switches.max
12527 � 2% +25.7% 15743 � 4% vmstat.io.bo
0.12 � 11% +23.0% 0.15 � 9% vmstat.procs.b
4.45 � 17% +30.0% 5.79 � 18% vmstat.procs.r
97945 +32.3% 129587 � 9% vmstat.system.cs
39102 +28.8% 50359 � 4% vmstat.system.in
0.08 � 3% +0.0 0.11 � 6% mpstat.cpu.all.iowait%
0.19 +0.0 0.22 � 3% mpstat.cpu.all.irq%
0.10 +0.0 0.12 mpstat.cpu.all.soft%
2.82 +0.5 3.30 � 5% mpstat.cpu.all.sys%
82.17 -70.4% 24.33 � 3% mpstat.max_utilization.seconds
13.41 � 12% +75.2% 23.50 � 5% mpstat.max_utilization_pct
0.10 � 4% -23.5% 0.08 � 4% perf-sched.sch_delay.avg.ms.schedule_timeout.__wait_for_common.wait_for_completion_state.kernel_clone
0.15 � 23% +74.7% 0.26 � 33% perf-sched.sch_delay.max.ms.__cond_resched.kmem_cache_alloc_noprof.alloc_extent_state.__clear_extent_bit.btrfs_do_readpage
9.42 �115% +171.7% 25.59 � 33% perf-sched.wait_and_delay.avg.ms.do_task_dead.do_exit.do_group_exit.__x64_sys_exit_group.x64_sys_call
9.42 �115% +171.7% 25.59 � 33% perf-sched.wait_time.avg.ms.do_task_dead.do_exit.do_group_exit.__x64_sys_exit_group.x64_sys_call
0.01 �114% +404.8% 0.07 � 38% perf-sched.wait_time.avg.ms.schedule_timeout.__wait_for_common.__flush_work.__lru_add_drain_all
0.03 �120% +567.5% 0.18 � 46% perf-sched.wait_time.max.ms.schedule_timeout.__wait_for_common.__flush_work.__lru_add_drain_all
56.36 +30.8% 73.69 � 6% stress-ng.symlink.links_created/removed_per_sec
1.58 -6.5% 1.47 � 2% stress-ng.symlink.ops_per_sec
81.54 +7.0% 87.22 � 2% stress-ng.time.elapsed_time
81.54 +7.0% 87.22 � 2% stress-ng.time.elapsed_time.max
1567765 � 2% +37.0% 2148245 � 6% stress-ng.time.file_system_outputs
368.33 +15.6% 425.67 � 5% stress-ng.time.percent_of_cpu_this_job_got
289.05 +25.2% 361.82 � 7% stress-ng.time.system_time
3905397 +41.0% 5506886 � 10% stress-ng.time.voluntary_context_switches
5566508 +11.8% 6224902 � 2% meminfo.Cached
109602 +34.3% 147151 � 8% meminfo.Dirty
1591188 +40.7% 2239517 � 7% meminfo.Inactive
1591188 +40.7% 2239517 � 7% meminfo.Inactive(file)
517939 +32.9% 688283 � 6% meminfo.KReclaimable
8342781 +10.9% 9253649 � 2% meminfo.Memused
517939 +32.9% 688283 � 6% meminfo.SReclaimable
448532 +13.1% 507124 � 2% meminfo.SUnreclaim
966472 +23.7% 1195407 � 4% meminfo.Slab
8798596 +12.7% 9912816 � 3% meminfo.max_used_kB
57293 � 3% +31.7% 75459 � 10% numa-meminfo.node0.Dirty
814916 � 3% +38.6% 1129473 � 8% numa-meminfo.node0.Inactive
814916 � 3% +38.6% 1129473 � 8% numa-meminfo.node0.Inactive(file)
267531 � 7% +29.3% 345920 � 10% numa-meminfo.node0.KReclaimable
267531 � 7% +29.3% 345920 � 10% numa-meminfo.node0.SReclaimable
224939 � 6% +19.2% 268144 � 6% numa-meminfo.node0.SUnreclaim
492471 � 5% +24.7% 614065 � 7% numa-meminfo.node0.Slab
52444 +36.9% 71791 � 6% numa-meminfo.node1.Dirty
777401 � 2% +43.0% 1111573 � 6% numa-meminfo.node1.Inactive
777401 � 2% +43.0% 1111573 � 6% numa-meminfo.node1.Inactive(file)
250935 � 9% +36.7% 342984 � 12% numa-meminfo.node1.KReclaimable
250935 � 9% +36.7% 342984 � 12% numa-meminfo.node1.SReclaimable
230941 +36.0% 314114 � 6% proc-vmstat.nr_dirtied
27428 +34.2% 36797 � 8% proc-vmstat.nr_dirty
1392074 +11.8% 1556694 � 2% proc-vmstat.nr_file_pages
398037 +40.7% 560166 � 7% proc-vmstat.nr_inactive_file
129600 +32.9% 172185 � 6% proc-vmstat.nr_slab_reclaimable
112157 +13.1% 126820 � 2% proc-vmstat.nr_slab_unreclaimable
133362 � 2% +33.9% 178517 � 5% proc-vmstat.nr_written
398037 +40.7% 560166 � 7% proc-vmstat.nr_zone_inactive_file
27444 +34.2% 36817 � 8% proc-vmstat.nr_zone_write_pending
1630857 +21.3% 1978219 � 5% proc-vmstat.numa_hit
1498429 +23.2% 1845812 � 5% proc-vmstat.numa_local
1884709 +21.6% 2292684 � 5% proc-vmstat.pgalloc_normal
574061 +3.1% 591751 proc-vmstat.pgfault
1519376 � 2% +24.5% 1891950 � 7% proc-vmstat.pgfree
1066920 � 2% +33.9% 1428162 � 5% proc-vmstat.pgpgout
128839 � 3% +28.5% 165576 � 5% numa-vmstat.node0.nr_dirtied
14308 � 3% +31.9% 18868 � 10% numa-vmstat.node0.nr_dirty
203609 � 3% +38.7% 282438 � 8% numa-vmstat.node0.nr_inactive_file
66797 � 7% +29.5% 86526 � 10% numa-vmstat.node0.nr_slab_reclaimable
56203 � 6% +19.3% 67037 � 6% numa-vmstat.node0.nr_slab_unreclaimable
69192 � 3% +33.0% 92052 � 7% numa-vmstat.node0.nr_written
203609 � 3% +38.7% 282438 � 8% numa-vmstat.node0.nr_zone_inactive_file
14316 � 3% +31.9% 18878 � 10% numa-vmstat.node0.nr_zone_write_pending
805650 � 7% +21.9% 982004 � 7% numa-vmstat.node0.numa_hit
760131 � 5% +21.8% 925493 � 6% numa-vmstat.node0.numa_local
102102 � 7% +45.5% 148528 � 9% numa-vmstat.node1.nr_dirtied
13101 +37.0% 17949 � 6% numa-vmstat.node1.nr_dirty
194200 � 2% +43.1% 277926 � 6% numa-vmstat.node1.nr_inactive_file
62656 � 9% +36.9% 85789 � 12% numa-vmstat.node1.nr_slab_reclaimable
64170 � 6% +34.7% 86464 � 6% numa-vmstat.node1.nr_written
194200 � 2% +43.1% 277926 � 6% numa-vmstat.node1.nr_zone_inactive_file
13109 +37.0% 17957 � 6% numa-vmstat.node1.nr_zone_write_pending
822261 � 6% +20.8% 993335 � 7% numa-vmstat.node1.numa_hit
735353 � 5% +24.8% 917439 � 12% numa-vmstat.node1.numa_local
1.097e+09 +14.8% 1.259e+09 � 4% perf-stat.i.branch-instructions
5.84 -0.6 5.28 � 3% perf-stat.i.branch-miss-rate%
62635000 -6.5% 58560106 perf-stat.i.branch-misses
4.40 +1.2 5.61 � 10% perf-stat.i.cache-miss-rate%
11138634 +25.9% 14026416 � 7% perf-stat.i.cache-misses
2.555e+08 -3.9% 2.456e+08 perf-stat.i.cache-references
100951 +31.1% 132340 � 10% perf-stat.i.context-switches
2.18 +1.6% 2.22 perf-stat.i.cpi
1.062e+10 +31.5% 1.396e+10 � 7% perf-stat.i.cpu-cycles
5285 +21.7% 6433 � 4% perf-stat.i.cpu-migrations
5.643e+09 +15.3% 6.506e+09 � 4% perf-stat.i.instructions
0.52 -1.5% 0.51 perf-stat.i.ipc
0.17 � 6% +153.4% 0.42 � 28% perf-stat.i.metric.K/sec
1.65 � 44% +30.7% 2.15 � 2% perf-stat.overall.MPKI
3.64 � 44% +2.1 5.70 � 8% perf-stat.overall.cache-miss-rate%
1.57 � 44% +36.4% 2.14 � 3% perf-stat.overall.cpi
794.30 � 44% +25.2% 994.13 perf-stat.overall.cycles-between-cache-misses
9.028e+08 � 44% +37.6% 1.242e+09 � 4% perf-stat.ps.branch-instructions
9176993 � 44% +50.8% 13838332 � 6% perf-stat.ps.cache-misses
83186 � 44% +56.8% 130453 � 10% perf-stat.ps.context-switches
8.747e+09 � 44% +57.4% 1.376e+10 � 7% perf-stat.ps.cpu-cycles
4366 � 44% +45.3% 6342 � 4% perf-stat.ps.cpu-migrations
4.645e+09 � 44% +38.3% 6.423e+09 � 4% perf-stat.ps.instructions
3.843e+11 � 44% +48.1% 5.69e+11 � 6% perf-stat.total.instructions
8.97 � 3% -1.3 7.67 � 11% perf-profile.calltrace.cycles-pp.schedule.schedule_preempt_disabled.rwsem_down_read_slowpath.down_read.btrfs_tree_read_lock_nested
7.54 � 4% -1.3 6.24 � 14% perf-profile.calltrace.cycles-pp.schedule_preempt_disabled.rwsem_down_read_slowpath.down_read.btrfs_tree_read_lock_nested.btrfs_read_lock_root_node
8.90 � 4% -1.3 7.61 � 11% perf-profile.calltrace.cycles-pp.__schedule.schedule.schedule_preempt_disabled.rwsem_down_read_slowpath.down_read
4.26 � 4% -0.5 3.73 � 7% perf-profile.calltrace.cycles-pp.flush_smp_call_function_queue.do_idle.cpu_startup_entry.start_secondary.common_startup_64
3.94 � 4% -0.5 3.45 � 7% perf-profile.calltrace.cycles-pp.__flush_smp_call_function_queue.flush_smp_call_function_queue.do_idle.cpu_startup_entry.start_secondary
3.70 � 4% -0.5 3.24 � 7% perf-profile.calltrace.cycles-pp.sched_ttwu_pending.__flush_smp_call_function_queue.flush_smp_call_function_queue.do_idle.cpu_startup_entry
4.02 � 6% -0.4 3.60 � 8% perf-profile.calltrace.cycles-pp.btrfs_search_slot.btrfs_insert_empty_items.insert_with_overflow.btrfs_insert_dir_item.btrfs_add_link
3.28 � 4% -0.4 2.86 � 7% perf-profile.calltrace.cycles-pp.ttwu_do_activate.sched_ttwu_pending.__flush_smp_call_function_queue.flush_smp_call_function_queue.do_idle
3.09 � 4% -0.4 2.70 � 7% perf-profile.calltrace.cycles-pp.enqueue_task.ttwu_do_activate.sched_ttwu_pending.__flush_smp_call_function_queue.flush_smp_call_function_queue
2.20 � 5% -0.4 1.84 � 10% perf-profile.calltrace.cycles-pp.tick_nohz_idle_exit.do_idle.cpu_startup_entry.start_secondary.common_startup_64
2.93 � 4% -0.4 2.57 � 7% perf-profile.calltrace.cycles-pp.enqueue_task_fair.enqueue_task.ttwu_do_activate.sched_ttwu_pending.__flush_smp_call_function_queue
1.64 � 5% -0.3 1.37 � 11% perf-profile.calltrace.cycles-pp.tick_nohz_restart_sched_tick.tick_nohz_idle_exit.do_idle.cpu_startup_entry.start_secondary
1.52 � 4% -0.2 1.30 � 7% perf-profile.calltrace.cycles-pp.enqueue_entity.enqueue_task_fair.enqueue_task.ttwu_do_activate.sched_ttwu_pending
0.64 � 6% -0.2 0.47 � 45% perf-profile.calltrace.cycles-pp.hrtimer_start_range_ns.tick_nohz_restart_sched_tick.tick_nohz_idle_exit.do_idle.cpu_startup_entry
1.05 � 4% -0.1 0.94 � 9% perf-profile.calltrace.cycles-pp.need_update.quiet_vmstat.tick_nohz_stop_tick.tick_nohz_idle_stop_tick.cpuidle_idle_call
0.89 � 2% -0.1 0.79 � 9% perf-profile.calltrace.cycles-pp.tick_nohz_get_sleep_length.menu_select.cpuidle_idle_call.do_idle.cpu_startup_entry
0.73 � 4% -0.1 0.64 � 9% perf-profile.calltrace.cycles-pp.update_load_avg.enqueue_entity.enqueue_task_fair.enqueue_task.ttwu_do_activate
1.41 � 9% +0.3 1.73 � 10% perf-profile.calltrace.cycles-pp.btrfs_lookup_inode.__btrfs_update_delayed_inode.btrfs_async_run_delayed_root.btrfs_work_helper.process_one_work
1.40 � 9% +0.3 1.72 � 10% perf-profile.calltrace.cycles-pp.btrfs_search_slot.btrfs_lookup_inode.__btrfs_update_delayed_inode.btrfs_async_run_delayed_root.btrfs_work_helper
2.42 � 17% +0.8 3.22 � 11% perf-profile.calltrace.cycles-pp.process_one_work.worker_thread.kthread.ret_from_fork.ret_from_fork_asm
2.46 � 17% +0.8 3.26 � 11% perf-profile.calltrace.cycles-pp.worker_thread.kthread.ret_from_fork.ret_from_fork_asm
2.06 � 22% +0.8 2.90 � 14% perf-profile.calltrace.cycles-pp.btrfs_async_run_delayed_root.btrfs_work_helper.process_one_work.worker_thread.kthread
19.41 � 2% +0.9 20.29 � 2% perf-profile.calltrace.cycles-pp.btrfs_insert_empty_items.btrfs_create_new_inode.btrfs_symlink.vfs_symlink.do_symlinkat
19.10 � 2% +0.9 19.99 � 2% perf-profile.calltrace.cycles-pp.btrfs_search_slot.btrfs_insert_empty_items.btrfs_create_new_inode.btrfs_symlink.vfs_symlink
2.97 � 14% +1.1 4.08 � 8% perf-profile.calltrace.cycles-pp.kthread.ret_from_fork.ret_from_fork_asm
2.97 � 14% +1.1 4.08 � 8% perf-profile.calltrace.cycles-pp.ret_from_fork.ret_from_fork_asm
2.97 � 14% +1.1 4.08 � 8% perf-profile.calltrace.cycles-pp.ret_from_fork_asm
4.96 � 4% -0.6 4.35 � 7% perf-profile.children.cycles-pp.flush_smp_call_function_queue
4.04 � 4% -0.5 3.53 � 7% perf-profile.children.cycles-pp.__flush_smp_call_function_queue
3.79 � 4% -0.5 3.31 � 7% perf-profile.children.cycles-pp.sched_ttwu_pending
3.38 � 4% -0.4 2.94 � 7% perf-profile.children.cycles-pp.ttwu_do_activate
3.23 � 4% -0.4 2.84 � 7% perf-profile.children.cycles-pp.enqueue_task
0.51 �103% -0.4 0.12 � 10% perf-profile.children.cycles-pp.btrfs_add_inode_to_root
3.08 � 4% -0.4 2.70 � 7% perf-profile.children.cycles-pp.enqueue_task_fair
2.26 � 5% -0.4 1.89 � 10% perf-profile.children.cycles-pp.tick_nohz_idle_exit
2.60 � 6% -0.3 2.28 � 9% perf-profile.children.cycles-pp.try_to_block_task
2.57 � 5% -0.3 2.24 � 9% perf-profile.children.cycles-pp.dequeue_task_fair
2.49 � 5% -0.3 2.18 � 9% perf-profile.children.cycles-pp.dequeue_entities
1.68 � 5% -0.3 1.41 � 11% perf-profile.children.cycles-pp.tick_nohz_restart_sched_tick
1.95 � 5% -0.3 1.68 � 10% perf-profile.children.cycles-pp.hrtimer_start_range_ns
1.62 � 4% -0.2 1.40 � 7% perf-profile.children.cycles-pp.enqueue_entity
1.38 � 4% -0.2 1.19 � 10% perf-profile.children.cycles-pp.__hrtimer_start_range_ns
1.39 � 3% -0.1 1.25 � 6% perf-profile.children.cycles-pp.rwsem_spin_on_owner
1.11 � 4% -0.1 0.99 � 9% perf-profile.children.cycles-pp.need_update
0.86 � 5% -0.1 0.75 � 8% perf-profile.children.cycles-pp.__get_next_timer_interrupt
0.62 � 8% -0.1 0.53 � 6% perf-profile.children.cycles-pp.hrtimer_try_to_cancel
0.46 � 6% -0.1 0.38 � 9% perf-profile.children.cycles-pp.__update_load_avg_se
0.50 � 6% -0.1 0.42 � 9% perf-profile.children.cycles-pp.clockevents_program_event
0.52 � 5% -0.1 0.46 � 11% perf-profile.children.cycles-pp.enqueue_hrtimer
0.48 � 6% -0.1 0.42 � 11% perf-profile.children.cycles-pp.timerqueue_add
0.23 � 10% -0.1 0.17 � 12% perf-profile.children.cycles-pp.__write_extent_buffer
0.46 � 4% -0.1 0.41 � 11% perf-profile.children.cycles-pp.memchr_inv
0.35 � 5% -0.1 0.30 � 9% perf-profile.children.cycles-pp.hrtimer_cancel
0.32 � 5% -0.0 0.27 � 6% perf-profile.children.cycles-pp.update_rq_clock
0.57 -0.0 0.53 � 7% perf-profile.children.cycles-pp.cpu_util
0.17 � 10% -0.0 0.12 � 15% perf-profile.children.cycles-pp.memcpy_extent_buffer
0.31 � 6% -0.0 0.27 � 5% perf-profile.children.cycles-pp.nohz_balancer_kick
0.23 � 12% -0.0 0.19 � 11% perf-profile.children.cycles-pp.tmigr_inactive_up
0.16 � 7% -0.0 0.13 � 15% perf-profile.children.cycles-pp.place_entity
0.25 � 3% -0.0 0.22 � 10% perf-profile.children.cycles-pp.sched_clock
0.06 � 7% -0.0 0.03 � 70% perf-profile.children.cycles-pp.__sysvec_call_function_single
0.15 � 4% -0.0 0.12 � 12% perf-profile.children.cycles-pp.set_next_task_idle
0.18 � 5% -0.0 0.15 � 7% perf-profile.children.cycles-pp.task_work_run
0.11 � 12% -0.0 0.08 � 13% perf-profile.children.cycles-pp.irqtime_account_process_tick
0.11 � 6% -0.0 0.09 � 12% perf-profile.children.cycles-pp.exc_page_fault
0.11 � 8% -0.0 0.09 � 12% perf-profile.children.cycles-pp.do_user_addr_fault
0.16 � 3% -0.0 0.14 � 6% perf-profile.children.cycles-pp.tmigr_quick_check
0.13 � 8% -0.0 0.11 � 6% perf-profile.children.cycles-pp.security_inode_init_security
0.04 � 45% +0.1 0.10 � 20% perf-profile.children.cycles-pp.crc_pcl
0.04 � 45% +0.1 0.10 � 20% perf-profile.children.cycles-pp.csum_tree_block
0.06 � 6% +0.1 0.14 � 25% perf-profile.children.cycles-pp.check_dir_item
0.03 �143% +0.1 0.10 � 32% perf-profile.children.cycles-pp.asm_common_interrupt
0.03 �143% +0.1 0.10 � 32% perf-profile.children.cycles-pp.common_interrupt
0.32 � 9% +0.1 0.40 � 15% perf-profile.children.cycles-pp.btrfs_get_32
0.12 � 7% +0.1 0.26 � 21% perf-profile.children.cycles-pp.check_leaf_item
0.24 � 6% +0.2 0.44 � 21% perf-profile.children.cycles-pp.__btrfs_check_leaf
0.24 � 6% +0.2 0.44 � 21% perf-profile.children.cycles-pp.btrfs_check_leaf
1.02 � 4% +0.2 1.25 � 15% perf-profile.children.cycles-pp.btrfs_delayed_update_inode
0.29 � 5% +0.2 0.54 � 21% perf-profile.children.cycles-pp.btree_csum_one_bio
0.32 � 2% +0.3 0.60 � 21% perf-profile.children.cycles-pp.btrfs_submit_bbio
0.32 � 2% +0.3 0.60 � 21% perf-profile.children.cycles-pp.btrfs_submit_chunk
1.41 � 9% +0.3 1.73 � 10% perf-profile.children.cycles-pp.btrfs_lookup_inode
0.37 � 3% +0.3 0.69 � 20% perf-profile.children.cycles-pp.submit_eb_page
0.38 � 3% +0.3 0.72 � 21% perf-profile.children.cycles-pp.btrfs_commit_transaction
0.38 � 3% +0.3 0.72 � 21% perf-profile.children.cycles-pp.transaction_kthread
0.38 � 2% +0.3 0.71 � 21% perf-profile.children.cycles-pp.__filemap_fdatawrite_range
0.38 � 2% +0.3 0.71 � 21% perf-profile.children.cycles-pp.btree_write_cache_pages
0.38 � 2% +0.3 0.71 � 21% perf-profile.children.cycles-pp.btrfs_write_and_wait_transaction
0.38 � 2% +0.3 0.71 � 21% perf-profile.children.cycles-pp.btrfs_write_marked_extents
0.38 � 2% +0.3 0.71 � 21% perf-profile.children.cycles-pp.do_writepages
0.38 � 2% +0.3 0.71 � 21% perf-profile.children.cycles-pp.filemap_fdatawrite_wbc
0.50 � 32% +0.5 0.98 � 29% perf-profile.children.cycles-pp.__btrfs_release_delayed_node
2.42 � 17% +0.8 3.22 � 11% perf-profile.children.cycles-pp.process_one_work
2.46 � 17% +0.8 3.26 � 11% perf-profile.children.cycles-pp.worker_thread
2.97 � 14% +1.1 4.08 � 8% perf-profile.children.cycles-pp.kthread
2.97 � 14% +1.1 4.08 � 8% perf-profile.children.cycles-pp.ret_from_fork_asm
2.97 � 14% +1.1 4.08 � 8% perf-profile.children.cycles-pp.ret_from_fork
1.35 � 3% -0.1 1.21 � 6% perf-profile.self.cycles-pp.rwsem_spin_on_owner
0.44 � 6% -0.1 0.37 � 9% perf-profile.self.cycles-pp.__update_load_avg_se
0.32 � 6% -0.1 0.26 � 4% perf-profile.self.cycles-pp.enqueue_entity
0.18 � 5% -0.0 0.15 � 11% perf-profile.self.cycles-pp.__hrtimer_next_event_base
0.19 � 6% -0.0 0.16 � 7% perf-profile.self.cycles-pp.update_rq_clock
0.19 � 7% -0.0 0.16 � 9% perf-profile.self.cycles-pp.finish_task_switch
0.11 � 12% -0.0 0.08 � 13% perf-profile.self.cycles-pp.irqtime_account_process_tick
0.10 � 5% -0.0 0.07 � 16% perf-profile.self.cycles-pp.start_dl_timer
0.10 � 8% -0.0 0.08 � 6% perf-profile.self.cycles-pp.nohz_balancer_kick
0.10 � 4% -0.0 0.08 � 10% perf-profile.self.cycles-pp.tick_nohz_idle_got_tick
0.04 � 45% +0.1 0.10 � 20% perf-profile.self.cycles-pp.crc_pcl
0.30 � 9% +0.1 0.37 � 12% perf-profile.self.cycles-pp.btrfs_get_32
***************************************************************************************************
lkp-icl-2sp4: 128 threads 2 sockets Intel(R) Xeon(R) Platinum 8358 CPU @ 2.60GHz (Ice Lake) with 128G memory
=========================================================================================
compiler/cpufreq_governor/disk/fs/kconfig/nr_threads/rootfs/tbox_group/test/testcase/testtime:
gcc-12/performance/1HDD/ext4/x86_64-rhel-9.4/100%/debian-12-x86_64-20240206.cgz/lkp-icl-2sp4/file-ioctl/stress-ng/60s
commit:
8de7606f0f ("cpuidle: menu: Eliminate outliers on both ends of the sample set")
85975daeaa ("cpuidle: menu: Avoid discarding useful information")
8de7606f0fe2bf5a 85975daeaa4d6ec560bfcd354fc
---------------- ---------------------------
%stddev %change %stddev
\ | \
546948 +15.9% 633790 meminfo.Shmem
7.157e+09 -11.9% 6.305e+09 � 2% cpuidle..time
9799994 � 2% +78.9% 17529038 � 2% cpuidle..usage
81.02 -12.4% 70.99 � 3% iostat.cpu.iowait
7.42 � 5% +148.4% 18.44 � 8% iostat.cpu.system
83.54 -10.4 73.18 � 3% mpstat.cpu.all.iowait%
0.16 +0.0 0.21 � 5% mpstat.cpu.all.irq%
0.10 -0.0 0.06 � 7% mpstat.cpu.all.soft%
7.37 � 5% +11.3 18.72 � 8% mpstat.cpu.all.sys%
0.60 +0.2 0.76 � 2% mpstat.cpu.all.usr%
309.50 � 9% +160.7% 806.83 � 5% perf-c2c.DRAM.local
7890 +98.8% 15684 � 4% perf-c2c.DRAM.remote
7304 � 2% +144.9% 17884 � 5% perf-c2c.HITM.local
5429 � 3% +101.7% 10951 � 2% perf-c2c.HITM.remote
12733 +126.5% 28836 � 3% perf-c2c.HITM.total
81.01 -12.4% 70.99 � 3% vmstat.cpu.wa
109.93 -13.7% 94.84 � 2% vmstat.procs.b
10.89 � 4% +139.9% 26.11 � 4% vmstat.procs.r
249709 +47.8% 369109 � 2% vmstat.system.cs
70448 +144.1% 171942 � 3% vmstat.system.in
11641204 +81.0% 21073025 � 3% stress-ng.file-ioctl.ops
194005 +81.0% 351204 � 3% stress-ng.file-ioctl.ops_per_sec
1716 � 8% +91.7% 3290 � 10% stress-ng.time.involuntary_context_switches
1035 � 4% +153.3% 2622 � 9% stress-ng.time.percent_of_cpu_this_job_got
591.44 � 4% +159.6% 1535 � 9% stress-ng.time.system_time
31.70 +35.4% 42.92 � 2% stress-ng.time.user_time
7851784 � 2% +48.6% 11667499 � 2% stress-ng.time.voluntary_context_switches
306427 +7.2% 328428 proc-vmstat.nr_active_anon
1045114 +2.1% 1066901 proc-vmstat.nr_file_pages
136748 +16.0% 158569 proc-vmstat.nr_shmem
306427 +7.2% 328428 proc-vmstat.nr_zone_active_anon
782797 +7.8% 843745 proc-vmstat.numa_hit
650421 +9.4% 711339 proc-vmstat.numa_local
830601 +7.3% 891473 proc-vmstat.pgalloc_normal
588428 +5.5% 620722 proc-vmstat.pgfault
4.007e+09 +70.6% 6.837e+09 � 3% perf-stat.i.branch-instructions
2.76 -2.1 0.67 � 13% perf-stat.i.branch-miss-rate%
1.106e+08 -62.3% 41669178 � 10% perf-stat.i.branch-misses
4.93 � 10% +16.2 21.15 � 9% perf-stat.i.cache-miss-rate%
25959042 � 8% +70.2% 44185905 � 25% perf-stat.i.cache-misses
5.417e+08 -56.6% 2.349e+08 � 15% perf-stat.i.cache-references
260344 � 2% +48.2% 385789 � 2% perf-stat.i.context-switches
1.86 � 2% +57.2% 2.93 � 6% perf-stat.i.cpi
3.413e+10 � 4% +170.3% 9.227e+10 � 8% perf-stat.i.cpu-cycles
1972 � 3% +58.1% 3117 � 5% perf-stat.i.cpu-migrations
1310 � 5% +68.7% 2210 � 22% perf-stat.i.cycles-between-cache-misses
1.823e+10 +69.9% 3.098e+10 � 3% perf-stat.i.instructions
0.55 -33.4% 0.36 � 4% perf-stat.i.ipc
2.03 � 2% +48.5% 3.01 � 2% perf-stat.i.metric.K/sec
6902 +7.0% 7386 � 2% perf-stat.i.minor-faults
6902 +7.0% 7386 � 2% perf-stat.i.page-faults
18871 � 3% +788.1% 167609 � 17% sched_debug.cfs_rq:/.avg_vruntime.min
0.11 � 13% +57.9% 0.18 � 6% sched_debug.cfs_rq:/.h_nr_running.avg
0.32 � 6% +18.1% 0.37 � 2% sched_debug.cfs_rq:/.h_nr_running.stddev
18871 � 3% +788.1% 167609 � 17% sched_debug.cfs_rq:/.min_vruntime.min
0.11 � 12% +56.8% 0.18 � 5% sched_debug.cfs_rq:/.nr_running.avg
0.33 � 4% +18.1% 0.39 sched_debug.cfs_rq:/.nr_running.stddev
154.91 � 4% +52.1% 235.54 � 5% sched_debug.cfs_rq:/.util_avg.avg
173.49 � 3% +10.6% 191.88 � 4% sched_debug.cfs_rq:/.util_avg.stddev
17.14 � 17% +125.0% 38.57 � 10% sched_debug.cfs_rq:/.util_est.avg
76.00 � 14% +40.9% 107.08 � 5% sched_debug.cfs_rq:/.util_est.stddev
847909 -21.3% 667195 � 2% sched_debug.cpu.avg_idle.avg
924.19 � 2% -17.7% 760.86 sched_debug.cpu.clock_task.stddev
369.30 � 14% +83.5% 677.51 � 8% sched_debug.cpu.curr->pid.avg
1124 � 6% +26.7% 1425 � 2% sched_debug.cpu.curr->pid.stddev
0.11 � 18% +58.3% 0.17 � 7% sched_debug.cpu.nr_running.avg
61881 +47.1% 90998 � 2% sched_debug.cpu.nr_switches.avg
75109 � 9% +35.0% 101362 � 3% sched_debug.cpu.nr_switches.max
55681 � 3% +45.9% 81250 � 2% sched_debug.cpu.nr_switches.min
0.46 � 2% -13.9% 0.40 � 3% sched_debug.cpu.nr_uninterruptible.avg
0.13 � 2% -26.8% 0.09 � 3% perf-sched.sch_delay.avg.ms.__cond_resched.__wait_for_common.affine_move_task.__set_cpus_allowed_ptr.__sched_setaffinity
0.10 � 9% -37.4% 0.06 � 20% perf-sched.sch_delay.avg.ms.__cond_resched.down_write.ext4_map_blocks.ext4_alloc_file_blocks.isra
0.06 � 26% -50.2% 0.03 � 27% perf-sched.sch_delay.avg.ms.do_wait.kernel_wait4.do_syscall_64.entry_SYSCALL_64_after_hwframe
0.13 � 2% -15.0% 0.11 � 10% perf-sched.sch_delay.avg.ms.io_schedule.bit_wait_io.__wait_on_bit.out_of_line_wait_on_bit
0.13 -20.1% 0.10 perf-sched.sch_delay.avg.ms.io_schedule.bit_wait_io.__wait_on_bit_lock.out_of_line_wait_on_bit_lock
0.13 � 7% -57.8% 0.06 � 13% perf-sched.sch_delay.avg.ms.pipe_read.vfs_read.ksys_read.do_syscall_64
0.12 � 5% -49.1% 0.06 � 26% perf-sched.sch_delay.avg.ms.schedule_timeout.__wait_for_common.wait_for_completion_state.kernel_clone
0.08 � 16% -41.5% 0.05 � 28% perf-sched.sch_delay.avg.ms.schedule_timeout.rcu_gp_fqs_loop.rcu_gp_kthread.kthread
0.01 -33.3% 0.00 perf-sched.sch_delay.avg.ms.smpboot_thread_fn.kthread.ret_from_fork.ret_from_fork_asm
0.12 � 19% -37.8% 0.08 � 10% perf-sched.sch_delay.avg.ms.syscall_exit_to_user_mode.do_syscall_64.entry_SYSCALL_64_after_hwframe.[unknown]
0.08 � 21% -32.4% 0.05 � 17% perf-sched.sch_delay.avg.ms.wait_for_partner.fifo_open.do_dentry_open.vfs_open
0.22 � 15% -44.7% 0.12 � 64% perf-sched.sch_delay.max.ms.__cond_resched.__ext4_handle_dirty_metadata.ext4_do_update_inode.isra.0
0.25 � 24% -21.9% 0.19 � 13% perf-sched.sch_delay.max.ms.__cond_resched.down_write.ext4_map_blocks.ext4_alloc_file_blocks.isra
0.06 �142% +1147.4% 0.69 �138% perf-sched.sch_delay.max.ms.__cond_resched.stop_one_cpu.migrate_task_to.task_numa_migrate.isra
18.58 � 8% -47.7% 9.72 � 7% perf-sched.sch_delay.max.ms.io_schedule.bit_wait_io.__wait_on_bit_lock.out_of_line_wait_on_bit_lock
0.13 � 2% -21.4% 0.10 perf-sched.total_sch_delay.average.ms
293.05 �209% -96.7% 9.72 � 7% perf-sched.total_sch_delay.max.ms
1.10 -10.1% 0.99 perf-sched.wait_and_delay.avg.ms.io_schedule.bit_wait_io.__wait_on_bit_lock.out_of_line_wait_on_bit_lock
384.95 � 4% -27.9% 277.39 � 9% perf-sched.wait_and_delay.avg.ms.pipe_read.vfs_read.ksys_read.do_syscall_64
4.03 � 4% -73.8% 1.05 �142% perf-sched.wait_and_delay.avg.ms.rcu_gp_kthread.kthread.ret_from_fork.ret_from_fork_asm
204.76 -28.7% 145.90 � 3% perf-sched.wait_and_delay.avg.ms.smpboot_thread_fn.kthread.ret_from_fork.ret_from_fork_asm
188.00 � 4% +38.4% 260.17 � 8% perf-sched.wait_and_delay.count.pipe_read.vfs_read.ksys_read.do_syscall_64
2949 +51.9% 4478 � 2% perf-sched.wait_and_delay.count.smpboot_thread_fn.kthread.ret_from_fork.ret_from_fork_asm
19.20 � 9% -34.7% 12.54 � 26% perf-sched.wait_and_delay.max.ms.io_schedule.bit_wait_io.__wait_on_bit_lock.out_of_line_wait_on_bit_lock
0.95 � 2% -11.1% 0.84 � 3% perf-sched.wait_time.avg.ms.__cond_resched.__ext4_handle_dirty_metadata.ext4_do_update_inode.isra.0
0.92 � 5% -10.2% 0.83 � 5% perf-sched.wait_time.avg.ms.__cond_resched.__ext4_mark_inode_dirty.ext4_alloc_file_blocks.isra.0
0.94 � 2% -12.4% 0.82 � 3% perf-sched.wait_time.avg.ms.__cond_resched.down_write.ext4_map_blocks.ext4_alloc_file_blocks.isra
384.82 � 4% -27.9% 277.33 � 9% perf-sched.wait_time.avg.ms.pipe_read.vfs_read.ksys_read.do_syscall_64
3.96 � 4% -32.0% 2.70 � 13% perf-sched.wait_time.avg.ms.rcu_gp_kthread.kthread.ret_from_fork.ret_from_fork_asm
0.83 � 2% -16.7% 0.69 � 7% perf-sched.wait_time.avg.ms.schedule_timeout.__wait_for_common.wait_for_completion_state.kernel_clone
204.75 -28.7% 145.90 � 3% perf-sched.wait_time.avg.ms.smpboot_thread_fn.kthread.ret_from_fork.ret_from_fork_asm
0.03 � 48% -68.5% 0.01 � 68% perf-sched.wait_time.avg.ms.wait_for_partner.fifo_open.do_dentry_open.vfs_open
1.12 � 3% -13.8% 0.96 � 10% perf-sched.wait_time.max.ms.__cond_resched.__ext4_handle_dirty_metadata.ext4_do_update_inode.isra.0
1.10 � 5% -10.9% 0.98 � 2% perf-sched.wait_time.max.ms.__cond_resched.bdev_getblk.__ext4_get_inode_loc.ext4_get_inode_loc.ext4_reserve_inode_write
1.03 � 5% -18.0% 0.85 � 15% perf-sched.wait_time.max.ms.__cond_resched.vfs_fallocate.ioctl_preallocate.__x64_sys_ioctl.do_syscall_64
21.22 -12.7 8.54 � 21% perf-profile.calltrace.cycles-pp.common_startup_64
28.62 -12.3 16.30 � 13% perf-profile.calltrace.cycles-pp.__ext4_ioctl.__x64_sys_ioctl.do_syscall_64.entry_SYSCALL_64_after_hwframe.ioctl
28.43 -12.2 16.20 � 13% perf-profile.calltrace.cycles-pp.ext4_ioctl_getlabel.__ext4_ioctl.__x64_sys_ioctl.do_syscall_64.entry_SYSCALL_64_after_hwframe
20.34 -11.9 8.43 � 21% perf-profile.calltrace.cycles-pp.start_secondary.common_startup_64
20.33 -11.9 8.42 � 21% perf-profile.calltrace.cycles-pp.cpu_startup_entry.start_secondary.common_startup_64
20.30 -11.9 8.42 � 21% perf-profile.calltrace.cycles-pp.do_idle.cpu_startup_entry.start_secondary.common_startup_64
20.12 -10.0 10.12 � 17% perf-profile.calltrace.cycles-pp.out_of_line_wait_on_bit_lock.ext4_ioctl_getlabel.__ext4_ioctl.__x64_sys_ioctl.do_syscall_64
20.10 -10.0 10.12 � 17% perf-profile.calltrace.cycles-pp.__wait_on_bit_lock.out_of_line_wait_on_bit_lock.ext4_ioctl_getlabel.__ext4_ioctl.__x64_sys_ioctl
13.93 -7.4 6.57 � 20% perf-profile.calltrace.cycles-pp.cpuidle_idle_call.do_idle.cpu_startup_entry.start_secondary.common_startup_64
13.10 -6.3 6.83 � 18% perf-profile.calltrace.cycles-pp.prepare_to_wait_exclusive.__wait_on_bit_lock.out_of_line_wait_on_bit_lock.ext4_ioctl_getlabel.__ext4_ioctl
12.60 -6.1 6.49 � 19% perf-profile.calltrace.cycles-pp._raw_spin_lock_irqsave.prepare_to_wait_exclusive.__wait_on_bit_lock.out_of_line_wait_on_bit_lock.ext4_ioctl_getlabel
12.34 -6.1 6.28 � 19% perf-profile.calltrace.cycles-pp.native_queued_spin_lock_slowpath._raw_spin_lock_irqsave.prepare_to_wait_exclusive.__wait_on_bit_lock.out_of_line_wait_on_bit_lock
10.62 -4.9 5.75 � 18% perf-profile.calltrace.cycles-pp.cpuidle_enter.cpuidle_idle_call.do_idle.cpu_startup_entry.start_secondary
10.46 -4.8 5.66 � 18% perf-profile.calltrace.cycles-pp.cpuidle_enter_state.cpuidle_enter.cpuidle_idle_call.do_idle.cpu_startup_entry
8.08 -4.3 3.80 � 17% perf-profile.calltrace.cycles-pp.intel_idle.cpuidle_enter_state.cpuidle_enter.cpuidle_idle_call.do_idle
3.36 -2.4 0.92 � 26% perf-profile.calltrace.cycles-pp.bit_wait_io.__wait_on_bit_lock.out_of_line_wait_on_bit_lock.ext4_ioctl_getlabel.__ext4_ioctl
3.34 -2.4 0.91 � 26% perf-profile.calltrace.cycles-pp.io_schedule.bit_wait_io.__wait_on_bit_lock.out_of_line_wait_on_bit_lock.ext4_ioctl_getlabel
3.29 -2.4 0.89 � 26% perf-profile.calltrace.cycles-pp.schedule.io_schedule.bit_wait_io.__wait_on_bit_lock.out_of_line_wait_on_bit_lock
3.24 -2.4 0.87 � 26% perf-profile.calltrace.cycles-pp.__schedule.schedule.io_schedule.bit_wait_io.__wait_on_bit_lock
7.55 -2.0 5.52 � 7% perf-profile.calltrace.cycles-pp.wake_up_bit.ext4_ioctl_getlabel.__ext4_ioctl.__x64_sys_ioctl.do_syscall_64
5.29 -1.9 3.36 � 5% perf-profile.calltrace.cycles-pp.ext4_map_blocks.ext4_alloc_file_blocks.ext4_fallocate.vfs_fallocate.ioctl_preallocate
2.88 -1.9 0.99 � 21% perf-profile.calltrace.cycles-pp.flush_smp_call_function_queue.do_idle.cpu_startup_entry.start_secondary.common_startup_64
3.74 -1.8 1.96 � 14% perf-profile.calltrace.cycles-pp.ext4_map_create_blocks.ext4_map_blocks.ext4_alloc_file_blocks.ext4_fallocate.vfs_fallocate
2.68 -1.8 0.92 � 21% perf-profile.calltrace.cycles-pp.__flush_smp_call_function_queue.flush_smp_call_function_queue.do_idle.cpu_startup_entry.start_secondary
2.09 -1.7 0.36 �105% perf-profile.calltrace.cycles-pp.enqueue_task.ttwu_do_activate.sched_ttwu_pending.__flush_smp_call_function_queue.flush_smp_call_function_queue
2.51 -1.7 0.80 � 24% perf-profile.calltrace.cycles-pp.sched_ttwu_pending.__flush_smp_call_function_queue.flush_smp_call_function_queue.do_idle.cpu_startup_entry
2.22 -1.7 0.55 � 53% perf-profile.calltrace.cycles-pp.ttwu_do_activate.sched_ttwu_pending.__flush_smp_call_function_queue.flush_smp_call_function_queue.do_idle
1.98 -1.6 0.34 �104% perf-profile.calltrace.cycles-pp.enqueue_task_fair.enqueue_task.ttwu_do_activate.sched_ttwu_pending.__flush_smp_call_function_queue
1.74 -1.4 0.32 �103% perf-profile.calltrace.cycles-pp.schedule_idle.do_idle.cpu_startup_entry.start_secondary.common_startup_64
1.68 -1.4 0.32 �103% perf-profile.calltrace.cycles-pp.__schedule.schedule_idle.do_idle.cpu_startup_entry.start_secondary
3.49 -1.4 2.13 � 8% perf-profile.calltrace.cycles-pp.__wake_up_common.wake_up_bit.ext4_ioctl_getlabel.__ext4_ioctl.__x64_sys_ioctl
3.35 -1.2 2.16 � 9% perf-profile.calltrace.cycles-pp.finish_wait.__wait_on_bit_lock.out_of_line_wait_on_bit_lock.ext4_ioctl_getlabel.__ext4_ioctl
3.26 -1.2 2.09 � 9% perf-profile.calltrace.cycles-pp._raw_spin_lock_irqsave.finish_wait.__wait_on_bit_lock.out_of_line_wait_on_bit_lock.ext4_ioctl_getlabel
3.22 -1.2 2.06 � 9% perf-profile.calltrace.cycles-pp.native_queued_spin_lock_slowpath._raw_spin_lock_irqsave.finish_wait.__wait_on_bit_lock.out_of_line_wait_on_bit_lock
4.11 � 3% -1.1 2.97 � 6% perf-profile.calltrace.cycles-pp.__ext4_mark_inode_dirty.ext4_alloc_file_blocks.ext4_fallocate.vfs_fallocate.ioctl_preallocate
1.42 -1.1 0.31 �102% perf-profile.calltrace.cycles-pp.menu_select.cpuidle_idle_call.do_idle.cpu_startup_entry.start_secondary
2.69 � 2% -1.0 1.71 � 17% perf-profile.calltrace.cycles-pp.ext4_mark_iloc_dirty.__ext4_mark_inode_dirty.ext4_alloc_file_blocks.ext4_fallocate.vfs_fallocate
1.54 � 4% -0.9 0.60 � 12% perf-profile.calltrace.cycles-pp.entry_SYSCALL_64.ioctl
1.70 � 15% -0.9 0.78 � 13% perf-profile.calltrace.cycles-pp.ext4_es_insert_extent.ext4_map_create_blocks.ext4_map_blocks.ext4_alloc_file_blocks.ext4_fallocate
2.43 � 2% -0.9 1.53 � 17% perf-profile.calltrace.cycles-pp.ext4_do_update_inode.ext4_mark_iloc_dirty.__ext4_mark_inode_dirty.ext4_alloc_file_blocks.ext4_fallocate
1.84 � 4% -0.8 1.03 � 13% perf-profile.calltrace.cycles-pp.clear_bhb_loop.ioctl
1.33 � 11% -0.6 0.70 � 12% perf-profile.calltrace.cycles-pp.ext4_ext_map_blocks.ext4_map_create_blocks.ext4_map_blocks.ext4_alloc_file_blocks.ext4_fallocate
3.73 -0.6 3.12 � 6% perf-profile.calltrace.cycles-pp.native_queued_spin_lock_slowpath._raw_spin_lock_irqsave.wake_up_bit.ext4_ioctl_getlabel.__ext4_ioctl
3.83 -0.6 3.24 � 6% perf-profile.calltrace.cycles-pp._raw_spin_lock_irqsave.wake_up_bit.ext4_ioctl_getlabel.__ext4_ioctl.__x64_sys_ioctl
1.40 -0.6 0.82 � 9% perf-profile.calltrace.cycles-pp.wake_bit_function.__wake_up_common.wake_up_bit.ext4_ioctl_getlabel.__ext4_ioctl
1.40 � 14% -0.5 0.91 � 9% perf-profile.calltrace.cycles-pp.ext4_fill_raw_inode.ext4_do_update_inode.ext4_mark_iloc_dirty.__ext4_mark_inode_dirty.ext4_alloc_file_blocks
0.83 � 4% -0.5 0.36 � 71% perf-profile.calltrace.cycles-pp.ext4_find_extent.ext4_ext_map_blocks.ext4_map_create_blocks.ext4_map_blocks.ext4_alloc_file_blocks
0.72 � 3% -0.5 0.26 �100% perf-profile.calltrace.cycles-pp.ext4_inode_csum.ext4_inode_csum_set.ext4_fill_raw_inode.ext4_do_update_inode.ext4_mark_iloc_dirty
0.82 � 3% -0.4 0.39 � 70% perf-profile.calltrace.cycles-pp.ext4_inode_csum_set.ext4_fill_raw_inode.ext4_do_update_inode.ext4_mark_iloc_dirty.__ext4_mark_inode_dirty
1.10 � 2% -0.4 0.72 � 11% perf-profile.calltrace.cycles-pp.syscall_exit_to_user_mode.do_syscall_64.entry_SYSCALL_64_after_hwframe.ioctl
0.93 � 4% -0.2 0.71 � 7% perf-profile.calltrace.cycles-pp.ext4_reserve_inode_write.__ext4_mark_inode_dirty.ext4_alloc_file_blocks.ext4_fallocate.vfs_fallocate
7.23 +0.5 7.72 � 3% perf-profile.calltrace.cycles-pp.do_vfs_ioctl.__x64_sys_ioctl.do_syscall_64.entry_SYSCALL_64_after_hwframe.ioctl
0.62 � 3% +1.3 1.90 � 19% perf-profile.calltrace.cycles-pp.generic_update_time.file_modified.ext4_fallocate.vfs_fallocate.ioctl_preallocate
0.58 � 4% +1.3 1.88 � 19% perf-profile.calltrace.cycles-pp.__mark_inode_dirty.generic_update_time.file_modified.ext4_fallocate.vfs_fallocate
0.86 � 3% +1.3 2.19 � 15% perf-profile.calltrace.cycles-pp.file_modified.ext4_fallocate.vfs_fallocate.ioctl_preallocate.__x64_sys_ioctl
0.00 +1.5 1.53 � 18% perf-profile.calltrace.cycles-pp.ext4_dirty_inode.__mark_inode_dirty.generic_update_time.file_modified.ext4_fallocate
3.91 +2.4 6.27 � 7% perf-profile.calltrace.cycles-pp.vfs_fileattr_set.do_vfs_ioctl.__x64_sys_ioctl.do_syscall_64.entry_SYSCALL_64_after_hwframe
3.68 +2.5 6.14 � 7% perf-profile.calltrace.cycles-pp.ext4_fileattr_set.vfs_fileattr_set.do_vfs_ioctl.__x64_sys_ioctl.do_syscall_64
3.65 +2.5 6.13 � 7% perf-profile.calltrace.cycles-pp.ext4_ioctl_setflags.ext4_fileattr_set.vfs_fileattr_set.do_vfs_ioctl.__x64_sys_ioctl
3.26 +3.1 6.41 � 7% perf-profile.calltrace.cycles-pp.ext4_zero_range.ext4_fallocate.vfs_fallocate.ioctl_preallocate.__x64_sys_ioctl
2.78 +3.4 6.13 � 7% perf-profile.calltrace.cycles-pp.ext4_alloc_file_blocks.ext4_zero_range.ext4_fallocate.vfs_fallocate.ioctl_preallocate
2.62 +3.5 6.16 � 14% perf-profile.calltrace.cycles-pp.jbd2_journal_stop.__ext4_journal_stop.ext4_alloc_file_blocks.ext4_fallocate.vfs_fallocate
2.78 +3.6 6.35 � 14% perf-profile.calltrace.cycles-pp.__ext4_journal_stop.ext4_alloc_file_blocks.ext4_fallocate.vfs_fallocate.ioctl_preallocate
4.63 � 70% +3.8 8.41 �141% perf-profile.calltrace.cycles-pp.cleanup_module.cleanup_module.ext4_alloc_file_blocks.ext4_fallocate.vfs_fallocate
63.44 � 2% +6.3 69.74 � 6% perf-profile.calltrace.cycles-pp.ioctl
12.89 � 11% +7.3 20.14 � 24% perf-profile.calltrace.cycles-pp.stress_run
12.09 � 11% +7.6 19.72 � 25% perf-profile.calltrace.cycles-pp.ioctl.stress_run
10.90 � 11% +8.1 19.03 � 25% perf-profile.calltrace.cycles-pp.entry_SYSCALL_64_after_hwframe.ioctl.stress_run
10.82 � 11% +8.2 18.98 � 25% perf-profile.calltrace.cycles-pp.do_syscall_64.entry_SYSCALL_64_after_hwframe.ioctl.stress_run
10.33 � 11% +8.3 18.66 � 25% perf-profile.calltrace.cycles-pp.__x64_sys_ioctl.do_syscall_64.entry_SYSCALL_64_after_hwframe.ioctl.stress_run
58.86 +8.7 67.52 � 6% perf-profile.calltrace.cycles-pp.entry_SYSCALL_64_after_hwframe.ioctl
58.61 +8.8 67.36 � 6% perf-profile.calltrace.cycles-pp.do_syscall_64.entry_SYSCALL_64_after_hwframe.ioctl
56.77 +9.4 66.18 � 6% perf-profile.calltrace.cycles-pp.__x64_sys_ioctl.do_syscall_64.entry_SYSCALL_64_after_hwframe.ioctl
23.48 +26.4 49.90 � 7% perf-profile.calltrace.cycles-pp.ext4_alloc_file_blocks.ext4_fallocate.vfs_fallocate.ioctl_preallocate.__x64_sys_ioctl
30.04 +30.1 60.18 � 7% perf-profile.calltrace.cycles-pp.ioctl_preallocate.__x64_sys_ioctl.do_syscall_64.entry_SYSCALL_64_after_hwframe.ioctl
29.54 +30.4 59.89 � 7% perf-profile.calltrace.cycles-pp.vfs_fallocate.ioctl_preallocate.__x64_sys_ioctl.do_syscall_64.entry_SYSCALL_64_after_hwframe
29.04 +30.6 59.60 � 7% perf-profile.calltrace.cycles-pp.ext4_fallocate.vfs_fallocate.ioctl_preallocate.__x64_sys_ioctl.do_syscall_64
21.22 -12.7 8.54 � 21% perf-profile.children.cycles-pp.common_startup_64
21.22 -12.7 8.54 � 21% perf-profile.children.cycles-pp.cpu_startup_entry
21.19 -12.7 8.54 � 21% perf-profile.children.cycles-pp.do_idle
28.66 -12.3 16.31 � 13% perf-profile.children.cycles-pp.__ext4_ioctl
28.44 -12.2 16.21 � 13% perf-profile.children.cycles-pp.ext4_ioctl_getlabel
20.34 -11.9 8.43 � 21% perf-profile.children.cycles-pp.start_secondary
20.12 -10.0 10.12 � 17% perf-profile.children.cycles-pp.out_of_line_wait_on_bit_lock
20.10 -10.0 10.12 � 17% perf-profile.children.cycles-pp.__wait_on_bit_lock
20.29 -8.2 12.11 � 13% perf-profile.children.cycles-pp._raw_spin_lock_irqsave
14.20 -7.6 6.65 � 20% perf-profile.children.cycles-pp.cpuidle_idle_call
19.33 -7.5 11.79 � 13% perf-profile.children.cycles-pp.native_queued_spin_lock_slowpath
13.11 -6.3 6.84 � 18% perf-profile.children.cycles-pp.prepare_to_wait_exclusive
10.84 -5.0 5.81 � 18% perf-profile.children.cycles-pp.cpuidle_enter
10.78 -5.0 5.79 � 18% perf-profile.children.cycles-pp.cpuidle_enter_state
8.21 -4.4 3.83 � 17% perf-profile.children.cycles-pp.intel_idle
5.00 -3.6 1.44 � 25% perf-profile.children.cycles-pp.__schedule
3.48 -2.5 1.03 � 23% perf-profile.children.cycles-pp.flush_smp_call_function_queue
3.37 -2.5 0.92 � 26% perf-profile.children.cycles-pp.bit_wait_io
3.34 -2.4 0.91 � 26% perf-profile.children.cycles-pp.io_schedule
3.33 -2.4 0.90 � 26% perf-profile.children.cycles-pp.schedule
5.95 -2.2 3.79 � 5% perf-profile.children.cycles-pp.ext4_map_blocks
7.56 -2.0 5.52 � 7% perf-profile.children.cycles-pp.wake_up_bit
4.10 -1.8 2.30 � 8% perf-profile.children.cycles-pp.ext4_map_create_blocks
2.71 -1.8 0.93 � 21% perf-profile.children.cycles-pp.__flush_smp_call_function_queue
2.54 -1.7 0.81 � 23% perf-profile.children.cycles-pp.sched_ttwu_pending
2.25 -1.6 0.64 � 28% perf-profile.children.cycles-pp.ttwu_do_activate
2.01 -1.5 0.49 � 28% perf-profile.children.cycles-pp.try_to_block_task
2.12 -1.5 0.60 � 27% perf-profile.children.cycles-pp.enqueue_task
1.90 -1.4 0.46 � 29% perf-profile.children.cycles-pp.dequeue_task_fair
2.02 -1.4 0.59 � 27% perf-profile.children.cycles-pp.enqueue_task_fair
1.84 -1.4 0.45 � 28% perf-profile.children.cycles-pp.dequeue_entities
3.54 -1.4 2.16 � 8% perf-profile.children.cycles-pp.__wake_up_common
3.91 � 2% -1.4 2.54 � 8% perf-profile.children.cycles-pp.ext4_mark_iloc_dirty
4.85 � 2% -1.3 3.50 � 6% perf-profile.children.cycles-pp.__ext4_mark_inode_dirty
3.56 � 2% -1.3 2.30 � 8% perf-profile.children.cycles-pp.ext4_do_update_inode
2.82 -1.2 1.59 � 9% perf-profile.children.cycles-pp.clear_bhb_loop
1.76 -1.2 0.56 � 23% perf-profile.children.cycles-pp.schedule_idle
3.35 -1.2 2.16 � 9% perf-profile.children.cycles-pp.finish_wait
1.29 � 2% -1.2 0.10 � 93% perf-profile.children.cycles-pp.tick_nohz_idle_stop_tick
1.28 � 2% -1.2 0.10 � 92% perf-profile.children.cycles-pp.tick_nohz_stop_tick
1.28 -1.1 0.16 � 51% perf-profile.children.cycles-pp.tick_nohz_idle_exit
1.43 -1.1 0.35 � 30% perf-profile.children.cycles-pp.__pick_next_task
1.28 -1.0 0.23 � 38% perf-profile.children.cycles-pp.hrtimer_start_range_ns
2.12 -1.0 1.16 � 8% perf-profile.children.cycles-pp.ext4_es_insert_extent
2.64 � 2% -1.0 1.68 � 8% perf-profile.children.cycles-pp.ext4_fill_raw_inode
1.44 -0.9 0.53 � 23% perf-profile.children.cycles-pp.menu_select
1.20 -0.9 0.30 � 31% perf-profile.children.cycles-pp.dequeue_entity
1.16 -0.9 0.30 � 28% perf-profile.children.cycles-pp.pick_next_task_fair
1.89 -0.8 1.09 � 8% perf-profile.children.cycles-pp.ext4_ext_map_blocks
0.88 -0.8 0.12 � 53% perf-profile.children.cycles-pp.rest_init
0.88 -0.8 0.12 � 53% perf-profile.children.cycles-pp.start_kernel
0.88 -0.8 0.12 � 53% perf-profile.children.cycles-pp.x86_64_start_kernel
0.88 -0.8 0.12 � 53% perf-profile.children.cycles-pp.x86_64_start_reservations
0.92 -0.8 0.16 � 40% perf-profile.children.cycles-pp.__hrtimer_start_range_ns
1.06 � 2% -0.7 0.32 � 33% perf-profile.children.cycles-pp.handle_softirqs
1.68 -0.7 1.00 � 8% perf-profile.children.cycles-pp.ext4_inode_csum_set
0.95 -0.7 0.28 � 26% perf-profile.children.cycles-pp.enqueue_entity
0.91 � 2% -0.7 0.24 � 29% perf-profile.children.cycles-pp.update_load_avg
0.78 -0.7 0.12 � 53% perf-profile.children.cycles-pp._nohz_idle_balance
0.70 � 2% -0.6 0.08 � 46% perf-profile.children.cycles-pp.do_softirq
1.53 -0.6 0.91 � 8% perf-profile.children.cycles-pp.ext4_inode_csum
1.42 -0.6 0.84 � 8% perf-profile.children.cycles-pp.wake_bit_function
1.91 � 4% -0.6 1.34 � 6% perf-profile.children.cycles-pp.ext4_reserve_inode_write
1.56 -0.5 1.02 � 8% perf-profile.children.cycles-pp.syscall_exit_to_user_mode
0.96 -0.5 0.45 � 13% perf-profile.children.cycles-pp.try_to_wake_up
1.27 -0.5 0.78 � 7% perf-profile.children.cycles-pp.ext4_find_extent
0.69 -0.5 0.22 � 24% perf-profile.children.cycles-pp.dl_server_start
1.39 -0.5 0.92 � 7% perf-profile.children.cycles-pp.entry_SYSCALL_64
0.60 -0.5 0.13 � 31% perf-profile.children.cycles-pp.__get_next_timer_interrupt
0.58 � 3% -0.5 0.13 � 43% perf-profile.children.cycles-pp.sched_balance_update_blocked_averages
0.66 -0.4 0.21 � 26% perf-profile.children.cycles-pp.enqueue_dl_entity
0.97 � 3% -0.4 0.53 � 9% perf-profile.children.cycles-pp.__es_remove_extent
0.54 -0.4 0.11 � 34% perf-profile.children.cycles-pp.update_curr
0.75 � 2% -0.4 0.33 � 20% perf-profile.children.cycles-pp.tick_nohz_get_sleep_length
0.52 � 2% -0.4 0.12 � 30% perf-profile.children.cycles-pp.memdup_user
1.25 � 5% -0.4 0.86 � 8% perf-profile.children.cycles-pp.ext4_get_inode_loc
1.20 � 5% -0.4 0.82 � 8% perf-profile.children.cycles-pp.__ext4_get_inode_loc
1.05 -0.4 0.68 � 8% perf-profile.children.cycles-pp.entry_SYSRETQ_unsafe_stack
0.50 -0.4 0.12 � 36% perf-profile.children.cycles-pp.switch_mm_irqs_off
0.76 � 2% -0.4 0.40 � 10% perf-profile.children.cycles-pp.llseek
0.74 -0.4 0.39 � 8% perf-profile.children.cycles-pp.__es_insert_extent
0.83 � 2% -0.3 0.48 � 9% perf-profile.children.cycles-pp.fdget
0.60 � 3% -0.3 0.26 � 13% perf-profile.children.cycles-pp.bmap
0.48 � 2% -0.3 0.13 � 23% perf-profile.children.cycles-pp.dl_server_stop
0.46 -0.3 0.12 � 27% perf-profile.children.cycles-pp.sched_balance_newidle
0.57 � 3% -0.3 0.24 � 12% perf-profile.children.cycles-pp.ext4_bmap
0.85 -0.3 0.55 � 26% perf-profile.children.cycles-pp.__hrtimer_run_queues
0.80 � 2% -0.3 0.50 � 7% perf-profile.children.cycles-pp.__cond_resched
0.42 � 3% -0.3 0.13 � 23% perf-profile.children.cycles-pp.hrtimer_try_to_cancel
0.41 � 3% -0.3 0.12 � 20% perf-profile.children.cycles-pp.set_next_task_fair
0.66 � 2% -0.3 0.36 � 8% perf-profile.children.cycles-pp.kmem_cache_alloc_noprof
0.50 � 3% -0.3 0.21 � 14% perf-profile.children.cycles-pp.iomap_bmap
0.54 � 3% -0.3 0.25 � 16% perf-profile.children.cycles-pp.__check_block_validity
0.55 � 2% -0.3 0.27 � 19% perf-profile.children.cycles-pp.tick_nohz_next_event
0.77 -0.3 0.51 � 26% perf-profile.children.cycles-pp.tick_nohz_handler
0.29 � 4% -0.2 0.04 �110% perf-profile.children.cycles-pp.__update_blocked_fair
0.30 � 4% -0.2 0.06 � 59% perf-profile.children.cycles-pp.rb_erase
0.65 � 3% -0.2 0.41 � 8% perf-profile.children.cycles-pp._copy_from_user
0.32 � 3% -0.2 0.08 � 34% perf-profile.children.cycles-pp.__update_load_avg_se
0.34 � 3% -0.2 0.10 � 18% perf-profile.children.cycles-pp.set_next_entity
0.42 � 4% -0.2 0.18 � 11% perf-profile.children.cycles-pp.iomap_iter
0.43 � 3% -0.2 0.20 � 17% perf-profile.children.cycles-pp.ext4_sb_block_valid
0.46 � 2% -0.2 0.23 � 13% perf-profile.children.cycles-pp.ttwu_queue_wakelist
0.66 -0.2 0.43 � 26% perf-profile.children.cycles-pp.update_process_times
0.39 � 2% -0.2 0.16 � 21% perf-profile.children.cycles-pp.sched_balance_rq
0.34 � 2% -0.2 0.12 � 24% perf-profile.children.cycles-pp.start_dl_timer
0.32 -0.2 0.11 � 19% perf-profile.children.cycles-pp.select_task_rq
0.43 -0.2 0.22 � 11% perf-profile.children.cycles-pp.x64_sys_call
0.49 -0.2 0.28 � 9% perf-profile.children.cycles-pp.__kmalloc_noprof
0.64 -0.2 0.44 � 7% perf-profile.children.cycles-pp.bdev_getblk
0.60 � 2% -0.2 0.40 � 5% perf-profile.children.cycles-pp.ext4_cache_extents
0.36 � 3% -0.2 0.17 � 13% perf-profile.children.cycles-pp.stress_file_ioctl
0.22 � 7% -0.2 0.03 �108% perf-profile.children.cycles-pp.cpuidle_governor_latency_req
0.29 � 2% -0.2 0.10 � 19% perf-profile.children.cycles-pp.select_task_rq_fair
0.46 � 3% -0.2 0.27 � 7% perf-profile.children.cycles-pp.kmem_cache_free
0.30 � 3% -0.2 0.12 � 18% perf-profile.children.cycles-pp.prepare_task_switch
0.37 � 2% -0.2 0.19 � 14% perf-profile.children.cycles-pp.__smp_call_single_queue
0.22 � 4% -0.2 0.04 � 77% perf-profile.children.cycles-pp.lapic_next_deadline
0.31 � 3% -0.2 0.13 � 19% perf-profile.children.cycles-pp.sched_balance_find_src_group
0.32 � 4% -0.2 0.14 � 10% perf-profile.children.cycles-pp.stress_file_ioctl_ext
0.30 � 4% -0.2 0.12 � 22% perf-profile.children.cycles-pp.update_sd_lb_stats
0.24 � 4% -0.2 0.07 � 27% perf-profile.children.cycles-pp.__update_load_avg_cfs_rq
0.48 -0.2 0.31 � 6% perf-profile.children.cycles-pp.percpu_counter_add_batch
0.49 � 2% -0.2 0.33 � 4% perf-profile.children.cycles-pp.ext4_es_cache_extent
0.54 � 2% -0.2 0.37 � 7% perf-profile.children.cycles-pp.__find_get_block
0.40 � 3% -0.2 0.23 � 10% perf-profile.children.cycles-pp.syscall_return_via_sysret
0.32 � 3% -0.2 0.16 � 9% perf-profile.children.cycles-pp.kfree
0.29 � 4% -0.2 0.14 � 23% perf-profile.children.cycles-pp.sched_balance_domains
0.26 � 4% -0.2 0.11 � 20% perf-profile.children.cycles-pp.update_sg_lb_stats
0.58 � 5% -0.2 0.43 � 7% perf-profile.children.cycles-pp.__ext4_journal_get_write_access
0.31 � 2% -0.2 0.16 � 9% perf-profile.children.cycles-pp.ioctl_file_clone
0.21 -0.1 0.06 � 30% perf-profile.children.cycles-pp.__switch_to_asm
0.23 � 3% -0.1 0.08 � 23% perf-profile.children.cycles-pp.update_rq_clock_task
0.21 -0.1 0.08 � 23% perf-profile.children.cycles-pp.task_contending
0.23 � 4% -0.1 0.10 � 15% perf-profile.children.cycles-pp.ext4_iomap_begin
0.16 � 5% -0.1 0.03 �103% perf-profile.children.cycles-pp.__rseq_handle_notify_resume
0.41 � 2% -0.1 0.29 � 19% perf-profile.children.cycles-pp.clockevents_program_event
0.27 � 11% -0.1 0.15 � 25% perf-profile.children.cycles-pp.__ext4_journal_start_sb
0.24 � 2% -0.1 0.12 � 13% perf-profile.children.cycles-pp.call_function_single_prep_ipi
0.63 � 2% -0.1 0.51 � 4% perf-profile.children.cycles-pp.down_write
0.20 � 3% -0.1 0.08 � 17% perf-profile.children.cycles-pp.__x64_sys_fcntl
0.20 � 2% -0.1 0.08 � 16% perf-profile.children.cycles-pp.ksys_lseek
0.34 � 3% -0.1 0.22 � 7% perf-profile.children.cycles-pp.rcu_all_qs
0.55 � 2% -0.1 0.44 � 7% perf-profile.children.cycles-pp._raw_spin_lock
0.14 � 3% -0.1 0.03 �101% perf-profile.children.cycles-pp.kthread
0.14 � 3% -0.1 0.03 �101% perf-profile.children.cycles-pp.ret_from_fork
0.14 � 3% -0.1 0.03 �101% perf-profile.children.cycles-pp.ret_from_fork_asm
0.21 � 3% -0.1 0.10 � 19% perf-profile.children.cycles-pp.native_sched_clock
0.19 � 3% -0.1 0.08 � 18% perf-profile.children.cycles-pp.update_cfs_group
0.26 � 3% -0.1 0.16 � 28% perf-profile.children.cycles-pp.sched_tick
0.28 � 4% -0.1 0.18 � 8% perf-profile.children.cycles-pp.__ext4_handle_dirty_metadata
0.45 � 7% -0.1 0.35 � 9% perf-profile.children.cycles-pp.jbd2_journal_get_write_access
0.21 � 3% -0.1 0.11 � 11% perf-profile.children.cycles-pp._copy_to_user
0.22 � 6% -0.1 0.12 � 12% perf-profile.children.cycles-pp.crypto_shash_update
0.23 � 2% -0.1 0.13 � 10% perf-profile.children.cycles-pp.map_id_up
0.16 � 2% -0.1 0.07 � 14% perf-profile.children.cycles-pp.wake_affine
0.21 � 2% -0.1 0.12 � 10% perf-profile.children.cycles-pp.ext4_es_free_extent
0.13 � 5% -0.1 0.04 � 72% perf-profile.children.cycles-pp.vfs_clone_file_range
0.17 � 4% -0.1 0.08 � 21% perf-profile.children.cycles-pp.sched_clock_cpu
0.35 � 4% -0.1 0.27 � 4% perf-profile.children.cycles-pp._raw_write_lock
0.17 � 6% -0.1 0.09 � 15% perf-profile.children.cycles-pp.idle_cpu
0.16 � 4% -0.1 0.08 � 18% perf-profile.children.cycles-pp.read_tsc
0.14 � 3% -0.1 0.06 � 14% perf-profile.children.cycles-pp.available_idle_cpu
0.14 � 5% -0.1 0.06 � 19% perf-profile.children.cycles-pp.sched_clock
0.14 � 7% -0.1 0.06 � 14% perf-profile.children.cycles-pp.ioctl@plt
0.13 � 3% -0.1 0.06 � 14% perf-profile.children.cycles-pp.__dequeue_entity
0.16 � 3% -0.1 0.08 � 8% perf-profile.children.cycles-pp.__switch_to
0.20 � 2% -0.1 0.13 � 3% perf-profile.children.cycles-pp.memset_orig
0.16 � 3% -0.1 0.10 � 11% perf-profile.children.cycles-pp.syscall_exit_to_user_mode_prepare
0.12 � 5% -0.1 0.06 � 11% perf-profile.children.cycles-pp.ext4_es_can_be_merged
0.13 � 4% -0.1 0.07 � 8% perf-profile.children.cycles-pp.__es_tree_search
0.17 � 4% -0.1 0.11 � 11% perf-profile.children.cycles-pp.__get_user_4
0.09 � 4% -0.1 0.03 �102% perf-profile.children.cycles-pp.nohz_balancer_kick
0.17 � 4% -0.1 0.11 � 8% perf-profile.children.cycles-pp.security_file_ioctl
0.12 � 4% -0.1 0.06 � 13% perf-profile.children.cycles-pp.truncate_pagecache_range
0.14 � 5% -0.1 0.08 � 11% perf-profile.children.cycles-pp.__put_user_4
0.12 � 6% -0.1 0.06 � 14% perf-profile.children.cycles-pp.cpuset_cpu_is_isolated
0.18 � 3% -0.1 0.13 � 9% perf-profile.children.cycles-pp.entry_SYSCALL_64_safe_stack
0.11 � 6% -0.1 0.06 � 11% perf-profile.children.cycles-pp.ext4_meta_trans_blocks
0.15 � 4% -0.1 0.10 � 10% perf-profile.children.cycles-pp.update_rq_clock
0.11 -0.1 0.06 � 13% perf-profile.children.cycles-pp.get_nohz_timer_target
0.11 -0.1 0.06 � 9% perf-profile.children.cycles-pp.iomap_iter_advance
0.12 -0.1 0.07 � 16% perf-profile.children.cycles-pp.tick_nohz_stop_idle
0.12 � 4% -0.0 0.07 � 11% perf-profile.children.cycles-pp.llist_add_batch
0.08 � 4% -0.0 0.03 � 70% perf-profile.children.cycles-pp.unmap_mapping_range
0.20 -0.0 0.15 � 6% perf-profile.children.cycles-pp.ext4_convert_inline_data
0.11 � 6% -0.0 0.06 � 7% perf-profile.children.cycles-pp.jbd2_journal_dirty_metadata
0.11 � 5% -0.0 0.07 � 11% perf-profile.children.cycles-pp.ext4_punch_hole
0.14 � 3% -0.0 0.11 � 6% perf-profile.children.cycles-pp.__brelse
0.09 -0.0 0.06 � 14% perf-profile.children.cycles-pp.nr_iowait_cpu
0.10 � 3% -0.0 0.08 � 8% perf-profile.children.cycles-pp.llist_reverse_order
0.15 � 5% +0.1 0.20 � 5% perf-profile.children.cycles-pp.unlock_buffer
0.70 +0.1 0.76 � 3% perf-profile.children.cycles-pp.ext4_es_lookup_extent
0.06 � 9% +0.1 0.12 � 40% perf-profile.children.cycles-pp.get_jiffies_update
0.00 +0.1 0.07 � 17% perf-profile.children.cycles-pp.timekeeping_max_deferment
0.51 +0.1 0.59 � 7% perf-profile.children.cycles-pp.up_write
0.00 +0.1 0.08 � 8% perf-profile.children.cycles-pp.tick_nohz_irq_exit
0.29 � 2% +0.2 0.51 � 6% perf-profile.children.cycles-pp.poll_idle
0.00 +0.3 0.32 � 33% perf-profile.children.cycles-pp.queued_read_lock_slowpath
1.24 � 5% +1.2 2.43 � 10% perf-profile.children.cycles-pp.file_modified
0.64 +1.2 1.84 � 7% perf-profile.children.cycles-pp.ext4_dirty_inode
0.86 +1.3 2.16 � 8% perf-profile.children.cycles-pp.generic_update_time
0.80 +1.4 2.15 � 8% perf-profile.children.cycles-pp.__mark_inode_dirty
3.92 +2.4 6.27 � 7% perf-profile.children.cycles-pp.vfs_fileattr_set
3.68 +2.5 6.14 � 7% perf-profile.children.cycles-pp.ext4_fileattr_set
3.66 +2.5 6.13 � 7% perf-profile.children.cycles-pp.ext4_ioctl_setflags
3.28 +3.1 6.42 � 7% perf-profile.children.cycles-pp.ext4_zero_range
1.58 � 4% +3.2 4.81 � 7% perf-profile.children.cycles-pp._raw_read_lock
3.46 +4.5 7.96 � 14% perf-profile.children.cycles-pp.jbd2_journal_stop
3.70 +4.5 8.21 � 14% perf-profile.children.cycles-pp.__ext4_journal_stop
10.37 � 70% +6.6 16.92 �141% perf-profile.children.cycles-pp.cleanup_module
12.89 � 11% +7.3 20.14 � 24% perf-profile.children.cycles-pp.stress_run
75.89 +14.2 90.11 � 2% perf-profile.children.cycles-pp.ioctl
70.83 +16.3 87.09 � 2% perf-profile.children.cycles-pp.entry_SYSCALL_64_after_hwframe
70.41 +16.4 86.81 � 2% perf-profile.children.cycles-pp.do_syscall_64
67.24 +17.7 84.94 � 2% perf-profile.children.cycles-pp.__x64_sys_ioctl
26.30 +29.8 56.06 � 7% perf-profile.children.cycles-pp.ext4_alloc_file_blocks
30.06 +30.1 60.19 � 7% perf-profile.children.cycles-pp.ioctl_preallocate
29.56 +30.3 59.91 � 7% perf-profile.children.cycles-pp.vfs_fallocate
29.09 +30.5 59.63 � 7% perf-profile.children.cycles-pp.ext4_fallocate
19.33 -7.5 11.79 � 13% perf-profile.self.cycles-pp.native_queued_spin_lock_slowpath
8.21 -4.4 3.83 � 17% perf-profile.self.cycles-pp.intel_idle
2.79 -1.2 1.57 � 9% perf-profile.self.cycles-pp.clear_bhb_loop
2.14 -0.8 1.34 � 8% perf-profile.self.cycles-pp.__wake_up_common
1.61 -0.7 0.93 � 9% perf-profile.self.cycles-pp.ioctl
0.83 -0.5 0.29 � 16% perf-profile.self.cycles-pp.do_vfs_ioctl
0.49 -0.4 0.12 � 34% perf-profile.self.cycles-pp.switch_mm_irqs_off
1.01 -0.4 0.65 � 8% perf-profile.self.cycles-pp.entry_SYSRETQ_unsafe_stack
0.98 -0.3 0.64 � 6% perf-profile.self.cycles-pp._raw_spin_lock_irqsave
0.77 � 2% -0.3 0.44 � 9% perf-profile.self.cycles-pp.fdget
0.45 � 3% -0.3 0.15 � 30% perf-profile.self.cycles-pp.menu_select
1.10 -0.3 0.80 � 7% perf-profile.self.cycles-pp.syscall_exit_to_user_mode
0.37 � 2% -0.3 0.10 � 24% perf-profile.self.cycles-pp.update_load_avg
0.38 -0.2 0.13 � 20% perf-profile.self.cycles-pp.__schedule
0.28 � 3% -0.2 0.04 �109% perf-profile.self.cycles-pp.rb_erase
0.30 � 2% -0.2 0.07 � 36% perf-profile.self.cycles-pp.__update_load_avg_se
0.63 � 3% -0.2 0.40 � 8% perf-profile.self.cycles-pp._copy_from_user
0.64 -0.2 0.42 � 9% perf-profile.self.cycles-pp.do_syscall_64
0.42 � 4% -0.2 0.20 � 17% perf-profile.self.cycles-pp.ext4_sb_block_valid
0.48 -0.2 0.26 � 10% perf-profile.self.cycles-pp.kmem_cache_alloc_noprof
0.39 -0.2 0.20 � 11% perf-profile.self.cycles-pp.x64_sys_call
0.33 � 3% -0.2 0.15 � 13% perf-profile.self.cycles-pp.stress_file_ioctl
0.41 -0.2 0.23 � 10% perf-profile.self.cycles-pp.__x64_sys_ioctl
0.22 � 4% -0.2 0.04 � 77% perf-profile.self.cycles-pp.lapic_next_deadline
0.24 � 5% -0.2 0.06 � 54% perf-profile.self.cycles-pp.__update_load_avg_cfs_rq
0.25 � 3% -0.2 0.07 � 33% perf-profile.self.cycles-pp.enqueue_task_fair
0.23 � 3% -0.2 0.05 � 51% perf-profile.self.cycles-pp.dequeue_entity
0.44 � 3% -0.2 0.26 � 8% perf-profile.self.cycles-pp.kmem_cache_free
0.32 � 4% -0.2 0.14 � 11% perf-profile.self.cycles-pp.stress_file_ioctl_ext
0.36 � 2% -0.2 0.20 � 8% perf-profile.self.cycles-pp.ext4_ioctl_setflags
0.44 � 2% -0.2 0.27 � 8% perf-profile.self.cycles-pp.__cond_resched
0.34 -0.2 0.18 � 13% perf-profile.self.cycles-pp.__kmalloc_noprof
0.29 -0.2 0.13 � 32% perf-profile.self.cycles-pp.cpuidle_enter_state
0.22 � 3% -0.2 0.06 � 30% perf-profile.self.cycles-pp.enqueue_entity
0.30 � 3% -0.2 0.15 � 9% perf-profile.self.cycles-pp.kfree
0.43 � 2% -0.2 0.28 � 6% perf-profile.self.cycles-pp.percpu_counter_add_batch
0.20 � 3% -0.1 0.06 � 25% perf-profile.self.cycles-pp.__switch_to_asm
0.42 � 3% -0.1 0.28 � 9% perf-profile.self.cycles-pp.entry_SYSCALL_64_after_hwframe
0.32 � 3% -0.1 0.18 � 8% perf-profile.self.cycles-pp.ext4_inode_csum
0.38 � 3% -0.1 0.24 � 8% perf-profile.self.cycles-pp.entry_SYSCALL_64
0.32 � 2% -0.1 0.18 � 10% perf-profile.self.cycles-pp.syscall_return_via_sysret
0.36 � 5% -0.1 0.22 � 8% perf-profile.self.cycles-pp.ext4_ioctl_getlabel
0.29 � 4% -0.1 0.15 � 8% perf-profile.self.cycles-pp.__es_remove_extent
0.30 -0.1 0.16 � 8% perf-profile.self.cycles-pp.ext4_es_insert_extent
0.24 � 2% -0.1 0.12 � 13% perf-profile.self.cycles-pp.call_function_single_prep_ipi
0.16 � 4% -0.1 0.05 � 49% perf-profile.self.cycles-pp.update_rq_clock_task
0.24 � 5% -0.1 0.13 � 8% perf-profile.self.cycles-pp.__es_insert_extent
0.20 � 2% -0.1 0.09 � 20% perf-profile.self.cycles-pp.native_sched_clock
0.18 � 3% -0.1 0.07 � 18% perf-profile.self.cycles-pp.update_cfs_group
0.17 � 6% -0.1 0.06 � 17% perf-profile.self.cycles-pp.ioctl_preallocate
0.18 � 3% -0.1 0.08 � 14% perf-profile.self.cycles-pp.update_sg_lb_stats
0.27 � 2% -0.1 0.17 � 9% perf-profile.self.cycles-pp.rcu_all_qs
0.41 � 2% -0.1 0.32 � 11% perf-profile.self.cycles-pp.prepare_to_wait_exclusive
0.20 � 3% -0.1 0.10 � 9% perf-profile.self.cycles-pp._copy_to_user
0.52 � 3% -0.1 0.42 � 7% perf-profile.self.cycles-pp._raw_spin_lock
0.20 � 5% -0.1 0.10 � 11% perf-profile.self.cycles-pp.ext4_ext_map_blocks
0.16 � 4% -0.1 0.07 � 15% perf-profile.self.cycles-pp.__ext4_ioctl
0.19 � 5% -0.1 0.10 � 11% perf-profile.self.cycles-pp.ext4_find_extent
0.24 � 3% -0.1 0.16 � 6% perf-profile.self.cycles-pp.ext4_alloc_file_blocks
0.17 � 5% -0.1 0.08 � 16% perf-profile.self.cycles-pp.idle_cpu
0.20 � 2% -0.1 0.12 � 11% perf-profile.self.cycles-pp.map_id_up
0.15 � 4% -0.1 0.07 � 21% perf-profile.self.cycles-pp.read_tsc
0.20 � 4% -0.1 0.11 � 11% perf-profile.self.cycles-pp.ext4_es_cache_extent
0.34 � 4% -0.1 0.26 � 4% perf-profile.self.cycles-pp._raw_write_lock
0.14 � 2% -0.1 0.06 � 14% perf-profile.self.cycles-pp.available_idle_cpu
0.18 � 2% -0.1 0.10 � 10% perf-profile.self.cycles-pp.ext4_fallocate
0.30 � 4% -0.1 0.22 � 7% perf-profile.self.cycles-pp.ext4_mark_iloc_dirty
0.16 � 6% -0.1 0.09 � 13% perf-profile.self.cycles-pp.crypto_shash_update
0.15 � 3% -0.1 0.08 � 11% perf-profile.self.cycles-pp.__switch_to
0.11 � 6% -0.1 0.04 � 45% perf-profile.self.cycles-pp.ext4_es_can_be_merged
0.26 -0.1 0.20 � 10% perf-profile.self.cycles-pp.__wait_on_bit_lock
0.44 � 4% -0.1 0.37 � 5% perf-profile.self.cycles-pp.wake_bit_function
0.18 � 2% -0.1 0.12 � 5% perf-profile.self.cycles-pp.memset_orig
0.15 � 6% -0.1 0.09 � 14% perf-profile.self.cycles-pp.inode_set_ctime_current
0.31 � 3% -0.1 0.25 � 6% perf-profile.self.cycles-pp.__find_get_block
0.16 � 4% -0.1 0.10 � 10% perf-profile.self.cycles-pp.ext4_inode_csum_set
0.11 � 6% -0.1 0.06 � 18% perf-profile.self.cycles-pp.cpuset_cpu_is_isolated
0.12 � 4% -0.1 0.06 � 9% perf-profile.self.cycles-pp.__es_tree_search
0.14 � 3% -0.1 0.08 � 11% perf-profile.self.cycles-pp.syscall_exit_to_user_mode_prepare
0.18 � 3% -0.1 0.12 � 7% perf-profile.self.cycles-pp.entry_SYSCALL_64_safe_stack
0.16 � 3% -0.1 0.10 � 10% perf-profile.self.cycles-pp.__get_user_4
0.14 � 2% -0.1 0.08 � 11% perf-profile.self.cycles-pp.__put_user_4
0.11 � 3% -0.1 0.06 � 13% perf-profile.self.cycles-pp.iomap_iter_advance
0.08 � 6% -0.1 0.02 � 99% perf-profile.self.cycles-pp.__ext4_journal_get_write_access
0.44 � 2% -0.1 0.39 � 3% perf-profile.self.cycles-pp.down_write
0.16 � 8% -0.1 0.11 � 6% perf-profile.self.cycles-pp.wake_up_bit
0.10 � 9% -0.0 0.06 � 9% perf-profile.self.cycles-pp.__ext4_journal_start_sb
0.12 � 4% -0.0 0.07 � 11% perf-profile.self.cycles-pp.llist_add_batch
0.20 � 2% -0.0 0.15 � 4% perf-profile.self.cycles-pp.ext4_convert_inline_data
0.12 � 6% -0.0 0.08 � 10% perf-profile.self.cycles-pp.__ext4_handle_dirty_metadata
0.10 � 6% -0.0 0.06 � 11% perf-profile.self.cycles-pp.__dequeue_entity
0.12 � 7% -0.0 0.08 � 7% perf-profile.self.cycles-pp.security_file_ioctl
0.09 � 9% -0.0 0.06 � 9% perf-profile.self.cycles-pp.jbd2_journal_dirty_metadata
0.11 � 6% -0.0 0.08 � 9% perf-profile.self.cycles-pp.ext4_cache_extents
0.11 � 3% -0.0 0.08 � 9% perf-profile.self.cycles-pp.prepare_task_switch
0.10 � 5% -0.0 0.06 � 6% perf-profile.self.cycles-pp.__ext4_mark_inode_dirty
0.10 � 3% -0.0 0.06 � 7% perf-profile.self.cycles-pp.ext4_map_create_blocks
0.09 -0.0 0.06 � 11% perf-profile.self.cycles-pp.nr_iowait_cpu
0.14 � 3% -0.0 0.11 � 4% perf-profile.self.cycles-pp.__brelse
0.09 � 4% -0.0 0.06 � 7% perf-profile.self.cycles-pp.ext4_reserve_inode_write
0.08 � 6% -0.0 0.06 � 13% perf-profile.self.cycles-pp.sched_balance_domains
0.10 � 3% -0.0 0.08 � 8% perf-profile.self.cycles-pp.llist_reverse_order
0.08 -0.0 0.06 � 7% perf-profile.self.cycles-pp.finish_wait
0.31 � 3% +0.1 0.37 � 5% perf-profile.self.cycles-pp.ext4_es_lookup_extent
0.14 � 3% +0.1 0.20 � 5% perf-profile.self.cycles-pp.unlock_buffer
0.06 � 9% +0.1 0.12 � 40% perf-profile.self.cycles-pp.get_jiffies_update
0.00 +0.1 0.07 � 16% perf-profile.self.cycles-pp.timekeeping_max_deferment
0.32 � 3% +0.1 0.39 � 13% perf-profile.self.cycles-pp.ktime_get
0.49 +0.1 0.57 � 8% perf-profile.self.cycles-pp.up_write
0.28 � 2% +0.2 0.50 � 6% perf-profile.self.cycles-pp.poll_idle
1.56 � 4% +3.2 4.79 � 7% perf-profile.self.cycles-pp._raw_read_lock
2.01 � 2% +4.2 6.24 � 14% perf-profile.self.cycles-pp.jbd2_journal_stop
8.84 � 70% +6.3 15.12 �141% perf-profile.self.cycles-pp.cleanup_module
***************************************************************************************************
lkp-icl-2sp6: 128 threads 2 sockets Intel(R) Xeon(R) Platinum 8358 CPU @ 2.60GHz (Ice Lake) with 128G memory
=========================================================================================
compiler/cpufreq_governor/disk/fs2/fs/kconfig/rootfs/tbox_group/test/testcase:
gcc-12/performance/1HDD/cifs/ext4/x86_64-rhel-9.4/debian-12-x86_64-20240206.cgz/lkp-icl-2sp6/makedirs.f/filebench
commit:
8de7606f0f ("cpuidle: menu: Eliminate outliers on both ends of the sample set")
85975daeaa ("cpuidle: menu: Avoid discarding useful information")
8de7606f0fe2bf5a 85975daeaa4d6ec560bfcd354fc
---------------- ---------------------------
%stddev %change %stddev
\ | \
0.09 -0.0 0.08 mpstat.cpu.all.sys%
41.00 � 21% +40.2% 57.50 � 7% perf-c2c.DRAM.remote
5536 +7.2% 5936 vmstat.system.cs
723.38 � 2% +63.2% 1180 � 5% filebench.sum_operations/s
21.42 -39.7% 12.93 � 6% filebench.sum_time_ms/op
120.80 -6.1% 113.46 filebench.time.elapsed_time
120.80 -6.1% 113.46 filebench.time.elapsed_time.max
0.08 � 6% -18.5% 0.06 � 7% perf-sched.sch_delay.avg.ms.schedule_timeout.__wait_for_common.wait_for_completion_state.kernel_clone
1.09 � 6% -13.2% 0.94 � 5% perf-sched.wait_and_delay.avg.ms.schedule_timeout.__wait_for_common.wait_for_completion_state.kernel_clone
26.20 � 4% -6.8% 24.42 � 3% perf-sched.wait_and_delay.avg.ms.schedule_timeout.rcu_gp_fqs_loop.rcu_gp_kthread.kthread
1.01 � 6% -12.8% 0.88 � 5% perf-sched.wait_time.avg.ms.schedule_timeout.__wait_for_common.wait_for_completion_state.kernel_clone
26.09 � 4% -6.8% 24.31 � 3% perf-sched.wait_time.avg.ms.schedule_timeout.rcu_gp_fqs_loop.rcu_gp_kthread.kthread
7640 -6.6% 7132 proc-vmstat.nr_shmem
664721 -2.0% 651271 proc-vmstat.numa_hit
532296 -2.5% 518841 proc-vmstat.numa_local
527838 -3.4% 509776 proc-vmstat.pgfault
24899 -3.2% 24114 proc-vmstat.pgreuse
1.608e+08 +3.6% 1.667e+08 � 2% perf-stat.i.branch-instructions
4.11 -0.2 3.89 perf-stat.i.branch-miss-rate%
7661023 -7.1% 7118866 perf-stat.i.branch-misses
20082582 -25.3% 15011250 � 3% perf-stat.i.cache-references
8.286e+08 -4.7% 7.895e+08 � 2% perf-stat.i.cpu-cycles
7.796e+08 +3.7% 8.081e+08 � 2% perf-stat.i.instructions
0.64 +1.7% 0.65 perf-stat.i.ipc
3007 � 5% +5.0% 3157 perf-stat.i.minor-faults
3007 � 5% +5.0% 3157 perf-stat.i.page-faults
4.77 -0.5 4.27 � 2% perf-stat.overall.branch-miss-rate%
2.70 � 3% +0.9 3.59 perf-stat.overall.cache-miss-rate%
1.06 -8.1% 0.98 perf-stat.overall.cpi
0.94 +8.8% 1.02 perf-stat.overall.ipc
1.59e+08 +3.6% 1.647e+08 � 2% perf-stat.ps.branch-instructions
7578333 -7.2% 7035164 perf-stat.ps.branch-misses
19890915 -25.3% 14857571 � 3% perf-stat.ps.cache-references
8.198e+08 -4.8% 7.806e+08 � 2% perf-stat.ps.cpu-cycles
7.708e+08 +3.6% 7.985e+08 � 2% perf-stat.ps.instructions
2973 � 5% +4.9% 3117 perf-stat.ps.minor-faults
2973 � 5% +4.9% 3117 perf-stat.ps.page-faults
2.82 � 12% -1.0 1.84 � 46% perf-profile.calltrace.cycles-pp.x64_sys_call.do_syscall_64.entry_SYSCALL_64_after_hwframe
1.49 � 28% -0.9 0.60 �110% perf-profile.calltrace.cycles-pp.ksys_read.do_syscall_64.entry_SYSCALL_64_after_hwframe.read.readn
2.04 � 17% -0.8 1.23 � 49% perf-profile.calltrace.cycles-pp.exit_mm.do_exit.do_group_exit.__x64_sys_exit_group.x64_sys_call
1.98 � 17% -0.8 1.17 � 47% perf-profile.calltrace.cycles-pp.exit_mmap.__mmput.exit_mm.do_exit.do_group_exit
0.98 � 12% -0.6 0.38 �102% perf-profile.calltrace.cycles-pp._nohz_idle_balance.do_idle.cpu_startup_entry.start_secondary.common_startup_64
0.77 � 15% -0.5 0.29 �101% perf-profile.calltrace.cycles-pp.proc_reg_read_iter.vfs_read.ksys_read.do_syscall_64.entry_SYSCALL_64_after_hwframe
0.77 � 15% -0.5 0.29 �101% perf-profile.calltrace.cycles-pp.seq_read_iter.proc_reg_read_iter.vfs_read.ksys_read.do_syscall_64
10.68 � 13% -1.6 9.12 � 8% perf-profile.children.cycles-pp.ret_from_fork_asm
10.56 � 13% -1.5 9.10 � 8% perf-profile.children.cycles-pp.ret_from_fork
2.88 � 13% -1.1 1.82 � 45% perf-profile.children.cycles-pp.__x64_sys_exit_group
2.87 � 14% -1.0 1.82 � 45% perf-profile.children.cycles-pp.do_group_exit
2.86 � 14% -1.0 1.81 � 46% perf-profile.children.cycles-pp.do_exit
2.94 � 11% -1.0 1.92 � 44% perf-profile.children.cycles-pp.__x64_sys_sched_setaffinity
2.58 � 15% -1.0 1.58 � 45% perf-profile.children.cycles-pp.exit_mmap
2.63 � 15% -1.0 1.65 � 46% perf-profile.children.cycles-pp.__mmput
3.04 � 12% -1.0 2.07 � 38% perf-profile.children.cycles-pp.x64_sys_call
2.04 � 17% -0.8 1.23 � 49% perf-profile.children.cycles-pp.exit_mm
0.95 � 20% -0.5 0.40 � 25% perf-profile.children.cycles-pp.tick_nohz_idle_stop_tick
0.95 � 20% -0.5 0.40 � 25% perf-profile.children.cycles-pp.tick_nohz_stop_tick
1.00 � 31% -0.5 0.50 � 44% perf-profile.children.cycles-pp.do_anonymous_page
0.78 � 25% -0.4 0.42 � 49% perf-profile.children.cycles-pp.__wait_for_common
0.77 � 15% -0.3 0.44 � 32% perf-profile.children.cycles-pp.proc_reg_read_iter
0.79 � 13% -0.3 0.46 � 48% perf-profile.children.cycles-pp.tlb_finish_mmu
0.70 � 23% -0.3 0.39 � 59% perf-profile.children.cycles-pp.wp_page_copy
0.60 � 38% -0.3 0.32 � 38% perf-profile.children.cycles-pp.get_arg_page
0.52 � 17% -0.2 0.28 � 33% perf-profile.children.cycles-pp.__x64_sys_mprotect
0.52 � 17% -0.2 0.28 � 33% perf-profile.children.cycles-pp.do_mprotect_pkey
0.46 � 24% -0.2 0.24 � 46% perf-profile.children.cycles-pp.__vmalloc_node_range_noprof
0.44 � 24% -0.2 0.22 � 65% perf-profile.children.cycles-pp.vma_alloc_folio_noprof
0.54 � 14% -0.2 0.34 � 30% perf-profile.children.cycles-pp.mprotect_fixup
0.60 � 20% -0.2 0.40 � 16% perf-profile.children.cycles-pp.update_curr
0.26 � 33% -0.2 0.06 �109% perf-profile.children.cycles-pp.flush_tlb_mm_range
0.40 � 32% -0.2 0.20 � 63% perf-profile.children.cycles-pp.folio_alloc_mpol_noprof
0.26 � 40% -0.2 0.07 �111% perf-profile.children.cycles-pp.need_update
0.27 � 34% -0.1 0.12 � 68% perf-profile.children.cycles-pp.arch_get_unmapped_area_topdown
0.18 � 42% -0.1 0.03 �100% perf-profile.children.cycles-pp.strnlen
0.18 � 32% -0.1 0.05 � 79% perf-profile.children.cycles-pp.expand_downwards
0.21 � 21% -0.1 0.11 � 39% perf-profile.children.cycles-pp.__vmalloc_area_node
0.23 � 20% -0.1 0.15 � 32% perf-profile.children.cycles-pp.__mod_memcg_lruvec_state
0.09 � 88% +0.2 0.34 � 22% perf-profile.children.cycles-pp.inode_permission
0.22 � 54% +0.3 0.50 � 31% perf-profile.children.cycles-pp.strncpy_from_user
1.84 � 8% +0.4 2.20 � 9% perf-profile.children.cycles-pp.link_path_walk
0.29 � 41% +0.4 0.71 � 28% perf-profile.children.cycles-pp.getname_flags
0.04 � 83% +0.6 0.61 � 93% perf-profile.children.cycles-pp.schedule_hrtimeout_range
0.50 � 21% +0.7 1.16 � 51% perf-profile.children.cycles-pp.vfs_fstatat
0.33 � 43% +0.8 1.13 � 68% perf-profile.children.cycles-pp.__dentry_kill
0.35 � 31% -0.2 0.18 � 45% perf-profile.self.cycles-pp.__update_blocked_fair
0.06 �113% +0.1 0.21 � 44% perf-profile.self.cycles-pp.inode_permission
0.18 � 34% +0.2 0.39 � 23% perf-profile.self.cycles-pp.syscall_exit_to_user_mode
224.52 � 51% -61.6% 86.28 � 44% sched_debug.cfs_rq:/.avg_vruntime.min
0.00 � 31% +157.1% 0.01 sched_debug.cfs_rq:/.h_nr_delayed.avg
0.33 +200.0% 1.00 sched_debug.cfs_rq:/.h_nr_delayed.max
0.03 � 14% +180.9% 0.09 sched_debug.cfs_rq:/.h_nr_delayed.stddev
0.05 � 8% +159.6% 0.13 � 6% sched_debug.cfs_rq:/.h_nr_running.avg
0.19 � 7% +71.8% 0.33 � 2% sched_debug.cfs_rq:/.h_nr_running.stddev
12629 � 87% +548.3% 81880 � 59% sched_debug.cfs_rq:/.left_deadline.avg
1615955 � 88% +515.1% 9940089 � 65% sched_debug.cfs_rq:/.left_deadline.max
142272 � 88% +523.0% 886388 � 63% sched_debug.cfs_rq:/.left_deadline.stddev
10346 � 94% +577.5% 70100 � 70% sched_debug.cfs_rq:/.left_vruntime.avg
1323699 � 94% +537.0% 8432336 � 77% sched_debug.cfs_rq:/.left_vruntime.max
116541 � 94% +549.5% 756961 � 75% sched_debug.cfs_rq:/.left_vruntime.stddev
692200 � 16% +51.5% 1048578 sched_debug.cfs_rq:/.load.max
29.92 � 17% +158.2% 77.24 � 28% sched_debug.cfs_rq:/.load_avg.avg
697.94 � 12% +49.4% 1043 sched_debug.cfs_rq:/.load_avg.max
114.41 � 10% +102.3% 231.47 � 17% sched_debug.cfs_rq:/.load_avg.stddev
224.52 � 51% -61.6% 86.28 � 44% sched_debug.cfs_rq:/.min_vruntime.min
0.05 � 7% +161.7% 0.13 � 6% sched_debug.cfs_rq:/.nr_running.avg
1.33 +50.0% 2.00 sched_debug.cfs_rq:/.nr_running.max
0.20 � 6% +77.6% 0.36 � 2% sched_debug.cfs_rq:/.nr_running.stddev
13.10 � 41% +257.0% 46.77 � 45% sched_debug.cfs_rq:/.removed.load_avg.avg
341.33 +200.0% 1024 sched_debug.cfs_rq:/.removed.load_avg.max
63.33 � 21% +221.9% 203.83 � 24% sched_debug.cfs_rq:/.removed.load_avg.stddev
166.72 � 14% +199.4% 499.17 � 12% sched_debug.cfs_rq:/.removed.runnable_avg.max
25.94 � 23% +210.5% 80.54 � 33% sched_debug.cfs_rq:/.removed.runnable_avg.stddev
166.72 � 14% +199.4% 499.17 � 12% sched_debug.cfs_rq:/.removed.util_avg.max
25.92 � 23% +210.6% 80.48 � 33% sched_debug.cfs_rq:/.removed.util_avg.stddev
10346 � 94% +577.5% 70100 � 70% sched_debug.cfs_rq:/.right_vruntime.avg
1323699 � 94% +537.0% 8432336 � 77% sched_debug.cfs_rq:/.right_vruntime.max
116541 � 94% +549.5% 756961 � 75% sched_debug.cfs_rq:/.right_vruntime.stddev
89.70 � 3% +176.8% 248.29 � 8% sched_debug.cfs_rq:/.util_avg.avg
876.11 � 9% +46.6% 1284 � 17% sched_debug.cfs_rq:/.util_avg.max
156.84 � 3% +88.4% 295.48 � 4% sched_debug.cfs_rq:/.util_avg.stddev
9.55 � 13% +178.8% 26.61 � 12% sched_debug.cfs_rq:/.util_est.avg
380.22 � 23% +124.1% 852.17 � 6% sched_debug.cfs_rq:/.util_est.max
47.95 � 15% +146.3% 118.10 � 6% sched_debug.cfs_rq:/.util_est.stddev
77528 � 30% -96.2% 2958 � 41% sched_debug.cpu.avg_idle.min
152303 � 6% +38.7% 211277 � 12% sched_debug.cpu.avg_idle.stddev
138928 � 2% -45.0% 76372 sched_debug.cpu.clock.avg
138935 � 2% -45.0% 76378 sched_debug.cpu.clock.max
138909 � 2% -45.0% 76365 sched_debug.cpu.clock.min
4.81 � 16% -33.4% 3.21 � 13% sched_debug.cpu.clock.stddev
138765 � 2% -45.1% 76228 sched_debug.cpu.clock_task.avg
138907 � 2% -45.0% 76359 sched_debug.cpu.clock_task.max
130200 � 2% -47.7% 68081 sched_debug.cpu.clock_task.min
139.96 � 11% +132.9% 325.93 � 11% sched_debug.cpu.curr->pid.avg
5667 -45.0% 3119 sched_debug.cpu.curr->pid.max
710.86 � 3% +29.0% 917.35 � 5% sched_debug.cpu.curr->pid.stddev
0.04 � 9% +170.6% 0.12 � 12% sched_debug.cpu.nr_running.avg
0.18 � 6% +82.5% 0.32 � 5% sched_debug.cpu.nr_running.stddev
3846 -59.8% 1546 � 3% sched_debug.cpu.nr_switches.avg
29779 � 9% -48.6% 15318 � 9% sched_debug.cpu.nr_switches.max
451.56 � 3% -56.7% 195.67 � 8% sched_debug.cpu.nr_switches.min
4789 � 7% -53.9% 2207 � 10% sched_debug.cpu.nr_switches.stddev
0.01 +75.0% 0.01 � 31% sched_debug.cpu.nr_uninterruptible.avg
138923 � 2% -45.0% 76368 sched_debug.cpu_clk
138213 � 2% -45.3% 75657 sched_debug.ktime
139722 � 2% -44.8% 77162 sched_debug.sched_clk
***************************************************************************************************
lkp-icl-2sp6: 128 threads 2 sockets Intel(R) Xeon(R) Platinum 8358 CPU @ 2.60GHz (Ice Lake) with 128G memory
=========================================================================================
compiler/cpufreq_governor/disk/fs2/fs/kconfig/rootfs/tbox_group/test/testcase:
gcc-12/performance/1HDD/cifs/xfs/x86_64-rhel-9.4/debian-12-x86_64-20240206.cgz/lkp-icl-2sp6/singlestreamwritedirect.f/filebench
commit:
8de7606f0f ("cpuidle: menu: Eliminate outliers on both ends of the sample set")
85975daeaa ("cpuidle: menu: Avoid discarding useful information")
8de7606f0fe2bf5a 85975daeaa4d6ec560bfcd354fc
---------------- ---------------------------
%stddev %change %stddev
\ | \
33.75 -1.7% 33.18 boot-time.boot
119687 � 9% -8.3% 109763 � 5% sched_debug.cpu.avg_idle.stddev
105051 +1.8% 106938 vmstat.io.bo
823752 � 46% -54.1% 377859 � 45% numa-numastat.node1.local_node
878984 � 41% -47.2% 463834 � 40% numa-numastat.node1.numa_hit
2.63 �209% -94.9% 0.13 � 7% perf-sched.sch_delay.max.ms.bit_wait.__wait_on_bit.out_of_line_wait_on_bit.netfs_unbuffered_write_iter_locked
1.32 �197% -91.1% 0.12 � 4% perf-sched.sch_delay.max.ms.syscall_exit_to_user_mode.do_syscall_64.entry_SYSCALL_64_after_hwframe.[unknown]
732.99 � 10% -15.5% 619.68 � 12% perf-sched.wait_and_delay.avg.ms.__x64_sys_pause.do_syscall_64.entry_SYSCALL_64_after_hwframe.[unknown]
732.96 � 10% -15.5% 619.64 � 12% perf-sched.wait_time.avg.ms.__x64_sys_pause.do_syscall_64.entry_SYSCALL_64_after_hwframe.[unknown]
456.12 +1.1% 461.26 filebench.sum_bytes_mb/s
27370 +1.1% 27678 filebench.sum_operations
456.13 +1.1% 461.27 filebench.sum_operations/s
2.19 -1.1% 2.17 filebench.sum_time_ms/op
456.00 +1.1% 461.20 filebench.sum_writes/s
14427847 � 26% +33.4% 19245919 � 6% numa-meminfo.node0.FilePages
11464303 � 32% +43.0% 16389081 � 6% numa-meminfo.node0.Inactive
11464303 � 32% +43.0% 16389081 � 6% numa-meminfo.node0.Inactive(file)
50157370 � 7% -9.4% 45419877 � 2% numa-meminfo.node0.MemFree
15498401 � 24% +30.6% 20235895 � 6% numa-meminfo.node0.MemUsed
7006849 +1.1% 7085773 proc-vmstat.nr_dirtied
4204805 +2.3% 4302911 proc-vmstat.nr_dirty
7214537 +2.4% 7386476 proc-vmstat.nr_file_pages
6371446 +2.7% 6544461 proc-vmstat.nr_foll_pin_acquired
6371330 +2.7% 6544348 proc-vmstat.nr_foll_pin_released
6306394 +2.7% 6478320 proc-vmstat.nr_inactive_file
4350806 +1.6% 4421837 proc-vmstat.nr_written
6306394 +2.7% 6478320 proc-vmstat.nr_zone_inactive_file
4220646 +2.3% 4319236 proc-vmstat.nr_zone_write_pending
17403444 +1.6% 17687571 proc-vmstat.pgpgout
3174870 � 32% +42.3% 4518963 � 7% numa-vmstat.node0.nr_dirtied
3604142 � 26% +33.5% 4811989 � 6% numa-vmstat.node0.nr_file_pages
2124183 �141% +208.1% 6545089 numa-vmstat.node0.nr_foll_pin_acquired
2124146 �141% +208.1% 6544976 numa-vmstat.node0.nr_foll_pin_released
12542179 � 7% -9.5% 11354469 � 2% numa-vmstat.node0.nr_free_pages
2863250 � 32% +43.1% 4097775 � 6% numa-vmstat.node0.nr_inactive_file
2863250 � 32% +43.1% 4097774 � 6% numa-vmstat.node0.nr_zone_inactive_file
4248173 � 70% -100.0% 91.00 �122% numa-vmstat.node1.nr_foll_pin_acquired
4248097 � 70% -100.0% 91.00 �122% numa-vmstat.node1.nr_foll_pin_released
878743 � 41% -47.2% 463596 � 40% numa-vmstat.node1.numa_hit
823511 � 46% -54.1% 377621 � 45% numa-vmstat.node1.numa_local
12119619 -1.9% 11893902 perf-stat.i.branch-misses
35828930 -6.7% 33423670 perf-stat.i.cache-references
1.84 -2.4% 1.79 perf-stat.i.cpi
0.61 +3.6% 0.63 perf-stat.i.ipc
5.34 -0.2 5.17 perf-stat.overall.branch-miss-rate%
9.87 +0.9 10.74 � 6% perf-stat.overall.cache-miss-rate%
1.17 -2.6% 1.13 perf-stat.overall.cpi
0.86 +2.7% 0.88 perf-stat.overall.ipc
12058384 -1.5% 11877207 perf-stat.ps.branch-misses
36139557 -6.1% 33925047 perf-stat.ps.cache-references
3730 +1.3% 3779 perf-stat.ps.context-switches
1.11 � 13% -0.3 0.81 � 18% perf-profile.calltrace.cycles-pp.tick_nohz_idle_stop_tick.cpuidle_idle_call.do_idle.cpu_startup_entry.start_secondary
1.07 � 12% -0.3 0.79 � 19% perf-profile.calltrace.cycles-pp.tick_nohz_stop_tick.tick_nohz_idle_stop_tick.cpuidle_idle_call.do_idle.cpu_startup_entry
0.55 � 46% +0.3 0.87 � 16% perf-profile.calltrace.cycles-pp.__x64_sys_openat.do_syscall_64.entry_SYSCALL_64_after_hwframe.__open64_nocancel.setlocale
0.55 � 46% +0.3 0.87 � 16% perf-profile.calltrace.cycles-pp.do_sys_openat2.__x64_sys_openat.do_syscall_64.entry_SYSCALL_64_after_hwframe.__open64_nocancel
1.20 � 13% -0.4 0.85 � 15% perf-profile.children.cycles-pp.tick_nohz_idle_stop_tick
1.15 � 12% -0.3 0.82 � 15% perf-profile.children.cycles-pp.tick_nohz_stop_tick
1.43 � 10% -0.3 1.12 � 9% perf-profile.children.cycles-pp.update_rq_clock_task
0.30 � 26% -0.1 0.17 � 21% perf-profile.children.cycles-pp.__get_unmapped_area
0.38 � 14% -0.1 0.26 � 40% perf-profile.children.cycles-pp.nr_iowait_cpu
0.46 � 18% -0.1 0.36 � 15% perf-profile.children.cycles-pp.show_stat
0.14 � 29% -0.1 0.05 � 64% perf-profile.children.cycles-pp.list_add_leaf_cfs_rq
0.04 � 86% +0.1 0.15 � 30% perf-profile.children.cycles-pp._exit
0.03 �108% +0.1 0.14 � 30% perf-profile.children.cycles-pp.filemap_get_pages
0.03 �108% +0.1 0.14 � 30% perf-profile.children.cycles-pp.filemap_get_read_batch
0.02 �223% +0.1 0.14 � 39% perf-profile.children.cycles-pp.__ata_qc_complete
0.10 � 26% +0.2 0.26 � 8% perf-profile.children.cycles-pp.filemap_read
0.37 � 35% +0.2 0.53 � 10% perf-profile.children.cycles-pp.__run_timers
0.66 � 12% +0.2 0.83 � 9% perf-profile.children.cycles-pp.finish_task_switch
0.04 � 71% +0.2 0.29 �142% perf-profile.children.cycles-pp.__folio_end_writeback
0.04 � 71% +0.2 0.29 �142% perf-profile.children.cycles-pp.folio_end_writeback
1.23 � 17% +0.3 1.58 � 8% perf-profile.children.cycles-pp.try_to_wake_up
2.62 � 12% +0.4 3.05 � 5% perf-profile.children.cycles-pp.x64_sys_call
2.68 � 6% +0.5 3.15 � 12% perf-profile.children.cycles-pp.sched_balance_newidle
0.38 � 14% -0.1 0.26 � 40% perf-profile.self.cycles-pp.nr_iowait_cpu
0.14 � 29% -0.1 0.05 � 64% perf-profile.self.cycles-pp.list_add_leaf_cfs_rq
0.05 � 80% +0.1 0.15 � 27% perf-profile.self.cycles-pp.alloc_vmap_area
0.26 � 22% +0.2 0.44 � 20% perf-profile.self.cycles-pp.kmem_cache_alloc_noprof
***************************************************************************************************
lkp-icl-2sp6: 128 threads 2 sockets Intel(R) Xeon(R) Platinum 8358 CPU @ 2.60GHz (Ice Lake) with 128G memory
=========================================================================================
compiler/cpufreq_governor/disk/fs2/fs/kconfig/rootfs/tbox_group/test/testcase:
gcc-12/performance/1HDD/cifs/btrfs/x86_64-rhel-9.4/debian-12-x86_64-20240206.cgz/lkp-icl-2sp6/makedirs.f/filebench
commit:
8de7606f0f ("cpuidle: menu: Eliminate outliers on both ends of the sample set")
85975daeaa ("cpuidle: menu: Avoid discarding useful information")
8de7606f0fe2bf5a 85975daeaa4d6ec560bfcd354fc
---------------- ---------------------------
%stddev %change %stddev
\ | \
19.50 � 6% +36.8% 26.67 � 18% perf-c2c.HITM.remote
33.03 +2.6% 33.88 � 2% boot-time.boot
3722 +2.5% 3814 � 2% boot-time.idle
8340 -6.0% 7838 proc-vmstat.nr_shmem
531751 � 2% -3.1% 515338 proc-vmstat.pgfault
5650 +7.2% 6057 vmstat.system.cs
4031 � 3% +11.4% 4489 � 5% vmstat.system.in
883.77 � 4% +67.2% 1478 � 9% filebench.sum_operations/s
17.30 � 3% -41.7% 10.08 � 8% filebench.sum_time_ms/op
118.36 -5.5% 111.90 filebench.time.elapsed_time
118.36 -5.5% 111.90 filebench.time.elapsed_time.max
0.08 � 3% -18.6% 0.06 � 11% perf-sched.sch_delay.avg.ms.schedule_timeout.__wait_for_common.wait_for_completion_state.kernel_clone
0.10 � 27% -92.7% 0.01 �223% perf-sched.sch_delay.avg.ms.usleep_range_state.cifs_readv_from_socket.cifs_read_from_socket.cifs_demultiplex_thread
0.10 � 27% -92.7% 0.01 �223% perf-sched.sch_delay.max.ms.usleep_range_state.cifs_readv_from_socket.cifs_read_from_socket.cifs_demultiplex_thread
994.71 � 82% +104.7% 2035 � 27% perf-sched.wait_and_delay.max.ms.do_task_dead.do_exit.do_group_exit.__x64_sys_exit_group.x64_sys_call
2.03 -83.4% 0.34 �223% perf-sched.wait_time.avg.ms.schedule_timeout.wait_woken.sk_wait_data.tcp_recvmsg_locked
994.71 � 82% +104.7% 2035 � 27% perf-sched.wait_time.max.ms.do_task_dead.do_exit.do_group_exit.__x64_sys_exit_group.x64_sys_call
2.03 -83.4% 0.34 �223% perf-sched.wait_time.max.ms.schedule_timeout.wait_woken.sk_wait_data.tcp_recvmsg_locked
6521081 � 36% -42.7% 3735458 � 26% sched_debug.cfs_rq:/.avg_vruntime.max
6521081 � 36% -42.7% 3735458 � 26% sched_debug.cfs_rq:/.min_vruntime.max
1086103 �110% -100.0% 250.38 � 4% sched_debug.cfs_rq:/.runnable_avg.avg
96446011 � 85% -100.0% 1277 � 17% sched_debug.cfs_rq:/.runnable_avg.max
9551724 � 90% -100.0% 309.57 � 5% sched_debug.cfs_rq:/.runnable_avg.stddev
942.00 � 14% +35.7% 1278 � 17% sched_debug.cfs_rq:/.util_avg.max
228.25 � 30% +35.5% 309.24 � 5% sched_debug.cfs_rq:/.util_avg.stddev
3.378e+08 +4.8% 3.539e+08 perf-stat.i.branch-instructions
3.50 � 3% +0.2 3.74 � 2% perf-stat.i.cache-miss-rate%
22983457 � 2% -21.0% 18161711 perf-stat.i.cache-references
266.65 � 2% -3.9% 256.36 � 3% perf-stat.i.cpu-migrations
1.684e+09 +4.4% 1.758e+09 perf-stat.i.instructions
5.14 -0.2 4.95 perf-stat.overall.branch-miss-rate%
4.21 � 5% +1.2 5.37 � 5% perf-stat.overall.cache-miss-rate%
1.04 -4.8% 0.99 � 2% perf-stat.overall.cpi
0.96 +5.1% 1.01 � 2% perf-stat.overall.ipc
3.356e+08 +4.4% 3.505e+08 perf-stat.ps.branch-instructions
23142109 � 2% -22.3% 17992823 perf-stat.ps.cache-references
268.25 -5.6% 253.17 � 3% perf-stat.ps.cpu-migrations
1.673e+09 � 2% +4.1% 1.742e+09 perf-stat.ps.instructions
47.47 -20.7 26.76 � 8% perf-profile.calltrace.cycles-pp.common_startup_64
42.13 � 3% -18.5 23.67 � 8% perf-profile.calltrace.cycles-pp.cpu_startup_entry.start_secondary.common_startup_64
42.13 � 3% -18.4 23.69 � 8% perf-profile.calltrace.cycles-pp.start_secondary.common_startup_64
42.06 � 3% -18.4 23.65 � 8% perf-profile.calltrace.cycles-pp.do_idle.cpu_startup_entry.start_secondary.common_startup_64
36.65 � 4% -17.6 19.00 � 9% perf-profile.calltrace.cycles-pp.cpuidle_idle_call.do_idle.cpu_startup_entry.start_secondary.common_startup_64
32.40 � 3% -15.2 17.17 � 10% perf-profile.calltrace.cycles-pp.cpuidle_enter.cpuidle_idle_call.do_idle.cpu_startup_entry.start_secondary
32.43 � 4% -14.5 17.94 � 10% perf-profile.calltrace.cycles-pp.cpuidle_enter_state.cpuidle_enter.cpuidle_idle_call.do_idle.cpu_startup_entry
14.06 � 5% -10.6 3.45 � 36% perf-profile.calltrace.cycles-pp.asm_sysvec_apic_timer_interrupt.cpuidle_enter_state.cpuidle_enter.cpuidle_idle_call.do_idle
12.38 � 5% -9.2 3.22 � 38% perf-profile.calltrace.cycles-pp.sysvec_apic_timer_interrupt.asm_sysvec_apic_timer_interrupt.cpuidle_enter_state.cpuidle_enter.cpuidle_idle_call
8.31 � 6% -5.8 2.55 � 34% perf-profile.calltrace.cycles-pp.entry_SYSCALL_64_after_hwframe
8.26 � 6% -5.7 2.54 � 35% perf-profile.calltrace.cycles-pp.do_syscall_64.entry_SYSCALL_64_after_hwframe
6.18 � 10% -4.8 1.41 � 47% perf-profile.calltrace.cycles-pp.__x64_sys_execve.do_syscall_64.entry_SYSCALL_64_after_hwframe.execve
6.18 � 10% -4.8 1.41 � 47% perf-profile.calltrace.cycles-pp.do_syscall_64.entry_SYSCALL_64_after_hwframe.execve
6.18 � 10% -4.8 1.41 � 47% perf-profile.calltrace.cycles-pp.entry_SYSCALL_64_after_hwframe.execve
6.18 � 10% -4.8 1.41 � 47% perf-profile.calltrace.cycles-pp.execve
6.13 � 9% -4.7 1.38 � 46% perf-profile.calltrace.cycles-pp.do_execveat_common.__x64_sys_execve.do_syscall_64.entry_SYSCALL_64_after_hwframe.execve
5.18 � 7% -4.3 0.88 � 37% perf-profile.calltrace.cycles-pp.vfs_read.ksys_read.do_syscall_64.entry_SYSCALL_64_after_hwframe.read
5.77 � 9% -4.3 1.50 � 42% perf-profile.calltrace.cycles-pp.__sysvec_apic_timer_interrupt.sysvec_apic_timer_interrupt.asm_sysvec_apic_timer_interrupt.cpuidle_enter_state.cpuidle_enter
5.67 � 9% -4.2 1.48 � 42% perf-profile.calltrace.cycles-pp.hrtimer_interrupt.__sysvec_apic_timer_interrupt.sysvec_apic_timer_interrupt.asm_sysvec_apic_timer_interrupt.cpuidle_enter_state
10.06 � 12% -4.1 5.91 � 11% perf-profile.calltrace.cycles-pp.kthread.ret_from_fork.ret_from_fork_asm
10.06 � 12% -4.1 5.91 � 11% perf-profile.calltrace.cycles-pp.ret_from_fork.ret_from_fork_asm
10.06 � 12% -4.1 5.91 � 11% perf-profile.calltrace.cycles-pp.ret_from_fork_asm
15.90 � 8% -3.7 12.18 � 4% perf-profile.calltrace.cycles-pp.intel_idle.cpuidle_enter_state.cpuidle_enter.cpuidle_idle_call.do_idle
4.58 � 11% -3.5 1.03 � 39% perf-profile.calltrace.cycles-pp.smpboot_thread_fn.kthread.ret_from_fork.ret_from_fork_asm
4.66 � 11% -3.5 1.18 � 44% perf-profile.calltrace.cycles-pp.__hrtimer_run_queues.hrtimer_interrupt.__sysvec_apic_timer_interrupt.sysvec_apic_timer_interrupt.asm_sysvec_apic_timer_interrupt
4.23 � 8% -3.2 0.98 � 37% perf-profile.calltrace.cycles-pp.read
4.08 � 11% -3.2 0.90 � 42% perf-profile.calltrace.cycles-pp.bprm_execve.do_execveat_common.__x64_sys_execve.do_syscall_64.entry_SYSCALL_64_after_hwframe
4.26 � 14% -3.1 1.12 � 32% perf-profile.calltrace.cycles-pp.__irq_exit_rcu.sysvec_apic_timer_interrupt.asm_sysvec_apic_timer_interrupt.cpuidle_enter_state.cpuidle_enter
4.02 � 7% -3.1 0.93 � 35% perf-profile.calltrace.cycles-pp.entry_SYSCALL_64_after_hwframe.read
4.00 � 7% -3.1 0.93 � 35% perf-profile.calltrace.cycles-pp.do_syscall_64.entry_SYSCALL_64_after_hwframe.read
4.05 � 15% -3.0 1.07 � 32% perf-profile.calltrace.cycles-pp.handle_softirqs.__irq_exit_rcu.sysvec_apic_timer_interrupt.asm_sysvec_apic_timer_interrupt.cpuidle_enter_state
3.97 � 11% -3.0 1.02 � 33% perf-profile.calltrace.cycles-pp.asm_exc_page_fault
3.44 � 14% -2.9 0.56 � 80% perf-profile.calltrace.cycles-pp.__schedule.schedule.smpboot_thread_fn.kthread.ret_from_fork
3.44 � 14% -2.9 0.57 � 80% perf-profile.calltrace.cycles-pp.schedule.smpboot_thread_fn.kthread.ret_from_fork.ret_from_fork_asm
3.72 � 9% -2.8 0.90 � 37% perf-profile.calltrace.cycles-pp.ksys_read.do_syscall_64.entry_SYSCALL_64_after_hwframe.read
3.63 � 15% -2.8 0.81 � 46% perf-profile.calltrace.cycles-pp.exec_binprm.bprm_execve.do_execveat_common.__x64_sys_execve.do_syscall_64
3.61 � 16% -2.8 0.80 � 46% perf-profile.calltrace.cycles-pp.search_binary_handler.exec_binprm.bprm_execve.do_execveat_common.__x64_sys_execve
3.52 � 7% -2.8 0.74 � 68% perf-profile.calltrace.cycles-pp.evlist_cpu_iterator__next.read_counters.process_interval.dispatch_events.cmd_stat
3.71 � 15% -2.8 0.94 � 41% perf-profile.calltrace.cycles-pp.tick_nohz_handler.__hrtimer_run_queues.hrtimer_interrupt.__sysvec_apic_timer_interrupt.sysvec_apic_timer_interrupt
3.31 � 14% -2.8 0.54 � 81% perf-profile.calltrace.cycles-pp.__pick_next_task.__schedule.schedule.smpboot_thread_fn.kthread
3.50 � 15% -2.7 0.79 � 47% perf-profile.calltrace.cycles-pp.load_elf_binary.search_binary_handler.exec_binprm.bprm_execve.do_execveat_common
3.50 � 11% -2.7 0.81 � 54% perf-profile.calltrace.cycles-pp.exc_page_fault.asm_exc_page_fault
3.48 � 11% -2.7 0.80 � 54% perf-profile.calltrace.cycles-pp.do_user_addr_fault.exc_page_fault.asm_exc_page_fault
3.24 � 13% -2.5 0.73 � 55% perf-profile.calltrace.cycles-pp.handle_mm_fault.do_user_addr_fault.exc_page_fault.asm_exc_page_fault
3.03 � 7% -2.5 0.53 � 87% perf-profile.calltrace.cycles-pp.sched_setaffinity.evlist_cpu_iterator__next.read_counters.process_interval.dispatch_events
2.93 � 14% -2.4 0.48 � 80% perf-profile.calltrace.cycles-pp.balance_fair.__pick_next_task.__schedule.schedule.smpboot_thread_fn
2.92 � 14% -2.4 0.48 � 80% perf-profile.calltrace.cycles-pp.sched_balance_newidle.balance_fair.__pick_next_task.__schedule.schedule
2.93 � 6% -2.4 0.51 � 86% perf-profile.calltrace.cycles-pp.do_syscall_64.entry_SYSCALL_64_after_hwframe.sched_setaffinity.evlist_cpu_iterator__next.read_counters
2.93 � 6% -2.4 0.51 � 86% perf-profile.calltrace.cycles-pp.entry_SYSCALL_64_after_hwframe.sched_setaffinity.evlist_cpu_iterator__next.read_counters.process_interval
4.12 � 16% -2.4 1.76 � 30% perf-profile.calltrace.cycles-pp.worker_thread.kthread.ret_from_fork.ret_from_fork_asm
3.01 � 13% -2.3 0.69 � 56% perf-profile.calltrace.cycles-pp.__handle_mm_fault.handle_mm_fault.do_user_addr_fault.exc_page_fault.asm_exc_page_fault
5.34 � 23% -2.3 3.07 � 24% perf-profile.calltrace.cycles-pp.cpu_startup_entry.rest_init.start_kernel.x86_64_start_reservations.x86_64_start_kernel
5.34 � 23% -2.3 3.07 � 24% perf-profile.calltrace.cycles-pp.rest_init.start_kernel.x86_64_start_reservations.x86_64_start_kernel.common_startup_64
5.34 � 23% -2.3 3.07 � 24% perf-profile.calltrace.cycles-pp.start_kernel.x86_64_start_reservations.x86_64_start_kernel.common_startup_64
5.34 � 23% -2.3 3.07 � 24% perf-profile.calltrace.cycles-pp.x86_64_start_kernel.common_startup_64
5.34 � 23% -2.3 3.07 � 24% perf-profile.calltrace.cycles-pp.x86_64_start_reservations.x86_64_start_kernel.common_startup_64
5.33 � 23% -2.3 3.07 � 24% perf-profile.calltrace.cycles-pp.do_idle.cpu_startup_entry.rest_init.start_kernel.x86_64_start_reservations
2.60 � 5% -2.2 0.37 �108% perf-profile.calltrace.cycles-pp.__x64_sys_sched_setaffinity.do_syscall_64.entry_SYSCALL_64_after_hwframe.sched_setaffinity.evlist_cpu_iterator__next
3.62 � 29% -2.2 1.46 � 8% perf-profile.calltrace.cycles-pp.do_softirq.flush_smp_call_function_queue.do_idle.cpu_startup_entry.rest_init
3.68 � 28% -2.1 1.59 � 7% perf-profile.calltrace.cycles-pp.flush_smp_call_function_queue.do_idle.cpu_startup_entry.rest_init.start_kernel
2.43 � 5% -2.1 0.35 �110% perf-profile.calltrace.cycles-pp.sched_setaffinity.__x64_sys_sched_setaffinity.do_syscall_64.entry_SYSCALL_64_after_hwframe.sched_setaffinity
2.74 � 11% -2.1 0.67 � 62% perf-profile.calltrace.cycles-pp.x64_sys_call.do_syscall_64.entry_SYSCALL_64_after_hwframe
2.58 � 13% -2.0 0.56 � 83% perf-profile.calltrace.cycles-pp.update_process_times.tick_nohz_handler.__hrtimer_run_queues.hrtimer_interrupt.__sysvec_apic_timer_interrupt
2.65 � 13% -2.0 0.65 � 62% perf-profile.calltrace.cycles-pp.do_exit.do_group_exit.__x64_sys_exit_group.x64_sys_call.do_syscall_64
2.65 � 13% -2.0 0.65 � 62% perf-profile.calltrace.cycles-pp.do_group_exit.__x64_sys_exit_group.x64_sys_call.do_syscall_64.entry_SYSCALL_64_after_hwframe
2.65 � 13% -2.0 0.65 � 61% perf-profile.calltrace.cycles-pp.__x64_sys_exit_group.x64_sys_call.do_syscall_64.entry_SYSCALL_64_after_hwframe
3.61 � 21% -2.0 1.64 � 31% perf-profile.calltrace.cycles-pp.process_one_work.worker_thread.kthread.ret_from_fork.ret_from_fork_asm
3.61 � 29% -2.0 1.65 � 12% perf-profile.calltrace.cycles-pp.handle_softirqs.do_softirq.flush_smp_call_function_queue.do_idle.cpu_startup_entry
3.59 � 29% -2.0 1.64 � 11% perf-profile.calltrace.cycles-pp._nohz_idle_balance.handle_softirqs.do_softirq.flush_smp_call_function_queue.do_idle
2.50 � 17% -1.3 1.16 � 8% perf-profile.calltrace.cycles-pp.menu_select.cpuidle_idle_call.do_idle.cpu_startup_entry.start_secondary
2.44 � 19% -1.2 1.20 � 23% perf-profile.calltrace.cycles-pp.path_openat.do_filp_open.do_sys_openat2.__x64_sys_openat.do_syscall_64
2.45 � 19% -1.2 1.23 � 25% perf-profile.calltrace.cycles-pp.do_filp_open.do_sys_openat2.__x64_sys_openat.do_syscall_64.entry_SYSCALL_64_after_hwframe
1.58 � 23% -0.8 0.78 � 17% perf-profile.calltrace.cycles-pp.sched_balance_domains._nohz_idle_balance.handle_softirqs.do_softirq.flush_smp_call_function_queue
1.47 � 26% -0.8 0.71 � 20% perf-profile.calltrace.cycles-pp.sched_balance_rq.sched_balance_domains._nohz_idle_balance.handle_softirqs.do_softirq
0.63 � 49% +0.6 1.18 � 13% perf-profile.calltrace.cycles-pp.enqueue_task.ttwu_do_activate.sched_ttwu_pending.__flush_smp_call_function_queue.flush_smp_call_function_queue
0.00 +0.6 0.57 � 6% perf-profile.calltrace.cycles-pp.tcp_sock_set_cork.__smb_send_rqst.smb_send_rqst.compound_send_recv.smb2_query_dir_first
0.65 � 48% +0.6 1.24 � 13% perf-profile.calltrace.cycles-pp.ttwu_do_activate.sched_ttwu_pending.__flush_smp_call_function_queue.flush_smp_call_function_queue.do_idle
0.49 � 71% +0.6 1.08 � 13% perf-profile.calltrace.cycles-pp.enqueue_task_fair.enqueue_task.ttwu_do_activate.sched_ttwu_pending.__flush_smp_call_function_queue
0.00 +0.6 0.63 � 10% perf-profile.calltrace.cycles-pp.malloc
0.00 +0.6 0.65 � 12% perf-profile.calltrace.cycles-pp.__btrfs_update_delayed_inode.btrfs_commit_inode_delayed_inode.btrfs_evict_inode.evict.__dentry_kill
0.00 +0.8 0.75 � 12% perf-profile.calltrace.cycles-pp.btrfs_commit_inode_delayed_inode.btrfs_evict_inode.evict.__dentry_kill.dput
0.00 +0.8 0.79 � 17% perf-profile.calltrace.cycles-pp.__smb_send_rqst.smb_send_rqst.compound_send_recv.cifs_send_recv.SMB2_query_directory
0.00 +0.8 0.79 � 17% perf-profile.calltrace.cycles-pp.smb_send_rqst.compound_send_recv.cifs_send_recv.SMB2_query_directory.find_cifs_entry
0.73 � 49% +0.8 1.54 � 13% perf-profile.calltrace.cycles-pp.sched_ttwu_pending.__flush_smp_call_function_queue.flush_smp_call_function_queue.do_idle.cpu_startup_entry
0.00 +0.8 0.81 � 5% perf-profile.calltrace.cycles-pp.__smb_send_rqst.smb_send_rqst.compound_send_recv.smb2_query_dir_first._initiate_cifs_search
0.00 +0.8 0.82 � 5% perf-profile.calltrace.cycles-pp.smb_send_rqst.compound_send_recv.smb2_query_dir_first._initiate_cifs_search.cifs_readdir
0.00 +0.8 0.84 � 10% perf-profile.calltrace.cycles-pp.tcp_recvmsg_locked.tcp_recvmsg.inet6_recvmsg.sock_recvmsg.____sys_recvmsg
0.00 +0.9 0.87 � 17% perf-profile.calltrace.cycles-pp.link_path_walk.path_lookupat.filename_lookup.filename_getxattr.path_getxattrat
0.00 +0.9 0.91 � 10% perf-profile.calltrace.cycles-pp.tcp_recvmsg.inet6_recvmsg.sock_recvmsg.____sys_recvmsg.___sys_recvmsg
0.09 �223% +0.9 1.00 � 9% perf-profile.calltrace.cycles-pp.path_lookupat.filename_lookup.vfs_statx.vfs_fstatat.__do_sys_newfstatat
0.00 +0.9 0.91 � 10% perf-profile.calltrace.cycles-pp.__smb_send_rqst.smb_send_rqst.compound_send_recv.smb2_compound_op.smb2_rmdir
0.00 +0.9 0.92 � 10% perf-profile.calltrace.cycles-pp.inet6_recvmsg.sock_recvmsg.____sys_recvmsg.___sys_recvmsg.__sys_recvmsg
0.00 +0.9 0.92 � 9% perf-profile.calltrace.cycles-pp.smb_send_rqst.compound_send_recv.smb2_compound_op.smb2_rmdir.cifs_rmdir
0.00 +0.9 0.94 � 8% perf-profile.calltrace.cycles-pp.sock_recvmsg.____sys_recvmsg.___sys_recvmsg.__sys_recvmsg.do_syscall_64
0.10 �223% +1.0 1.05 � 8% perf-profile.calltrace.cycles-pp.filename_lookup.vfs_statx.vfs_fstatat.__do_sys_newfstatat.do_syscall_64
0.88 � 18% +1.0 1.84 � 15% perf-profile.calltrace.cycles-pp.__flush_smp_call_function_queue.flush_smp_call_function_queue.do_idle.cpu_startup_entry.start_secondary
0.00 +1.0 0.97 � 23% perf-profile.calltrace.cycles-pp.btrfs_getxattr.__vfs_getxattr.do_getxattr.filename_getxattr.path_getxattrat
0.00 +1.0 0.98 � 21% perf-profile.calltrace.cycles-pp.do_syscall_64.entry_SYSCALL_64_after_hwframe.syscall
0.00 +1.0 0.99 � 20% perf-profile.calltrace.cycles-pp.entry_SYSCALL_64_after_hwframe.syscall
0.00 +1.0 1.00 � 9% perf-profile.calltrace.cycles-pp.____sys_recvmsg.___sys_recvmsg.__sys_recvmsg.do_syscall_64.entry_SYSCALL_64_after_hwframe
0.00 +1.0 1.00 � 14% perf-profile.calltrace.cycles-pp.compound_send_recv.cifs_send_recv.__SMB2_close.cifs_closedir.__fput
0.00 +1.0 1.00 � 14% perf-profile.calltrace.cycles-pp.cifs_send_recv.__SMB2_close.cifs_closedir.__fput.__x64_sys_close
0.00 +1.0 1.00 � 28% perf-profile.calltrace.cycles-pp.tcp_sock_set_cork.__smb_send_rqst.smb_send_rqst.compound_send_recv.cifs_send_recv
0.00 +1.0 1.03 � 12% perf-profile.calltrace.cycles-pp.__btrfs_unlink_inode.btrfs_rmdir.vfs_rmdir.do_rmdir.__x64_sys_unlinkat
0.00 +1.0 1.05 � 20% perf-profile.calltrace.cycles-pp.__vfs_getxattr.do_getxattr.filename_getxattr.path_getxattrat.do_syscall_64
0.00 +1.0 1.05 � 15% perf-profile.calltrace.cycles-pp.cifs_send_recv.SMB2_query_directory.find_cifs_entry.cifs_readdir.iterate_dir
0.00 +1.0 1.05 � 15% perf-profile.calltrace.cycles-pp.compound_send_recv.cifs_send_recv.SMB2_query_directory.find_cifs_entry.cifs_readdir
1.10 � 18% +1.0 2.15 � 5% perf-profile.calltrace.cycles-pp.flush_smp_call_function_queue.do_idle.cpu_startup_entry.start_secondary.common_startup_64
0.00 +1.1 1.08 � 13% perf-profile.calltrace.cycles-pp.__SMB2_close.cifs_closedir.__fput.__x64_sys_close.do_syscall_64
0.00 +1.1 1.12 � 14% perf-profile.calltrace.cycles-pp.cifs_closedir.__fput.__x64_sys_close.do_syscall_64.entry_SYSCALL_64_after_hwframe
0.00 +1.1 1.12 � 17% perf-profile.calltrace.cycles-pp.tcp_rcv_established.tcp_v6_do_rcv.tcp_v6_rcv.ip6_protocol_deliver_rcu.ip6_input_finish
0.00 +1.1 1.13 � 26% perf-profile.calltrace.cycles-pp.__schedule.schedule.schedule_hrtimeout_range.ep_poll.do_epoll_wait
0.00 +1.1 1.13 � 17% perf-profile.calltrace.cycles-pp.tcp_v6_do_rcv.tcp_v6_rcv.ip6_protocol_deliver_rcu.ip6_input_finish.__netif_receive_skb_one_core
0.00 +1.1 1.14 � 10% perf-profile.calltrace.cycles-pp.___sys_recvmsg.__sys_recvmsg.do_syscall_64.entry_SYSCALL_64_after_hwframe.recvmsg
0.00 +1.1 1.15 � 13% perf-profile.calltrace.cycles-pp.SMB2_query_directory.find_cifs_entry.cifs_readdir.iterate_dir.__x64_sys_getdents64
0.00 +1.2 1.15 � 16% perf-profile.calltrace.cycles-pp.syscall
0.00 +1.2 1.15 � 16% perf-profile.calltrace.cycles-pp.tcp_recvmsg_locked.tcp_recvmsg.inet6_recvmsg.sock_recvmsg.cifs_readv_from_socket
0.00 +1.2 1.17 � 13% perf-profile.calltrace.cycles-pp.find_cifs_entry.cifs_readdir.iterate_dir.__x64_sys_getdents64.do_syscall_64
0.00 +1.2 1.17 � 27% perf-profile.calltrace.cycles-pp.schedule.schedule_hrtimeout_range.ep_poll.do_epoll_wait.__x64_sys_epoll_wait
0.00 +1.2 1.17 � 11% perf-profile.calltrace.cycles-pp.compound_send_recv.smb2_query_dir_first._initiate_cifs_search.cifs_readdir.iterate_dir
0.00 +1.2 1.18 � 8% perf-profile.calltrace.cycles-pp.__sys_recvmsg.do_syscall_64.entry_SYSCALL_64_after_hwframe.recvmsg
0.00 +1.2 1.24 � 8% perf-profile.calltrace.cycles-pp.do_syscall_64.entry_SYSCALL_64_after_hwframe.recvmsg
0.00 +1.2 1.25 � 8% perf-profile.calltrace.cycles-pp.entry_SYSCALL_64_after_hwframe.recvmsg
0.00 +1.3 1.25 � 14% perf-profile.calltrace.cycles-pp.inet6_recvmsg.sock_recvmsg.cifs_readv_from_socket.cifs_read_from_socket.cifs_demultiplex_thread
0.00 +1.3 1.26 � 14% perf-profile.calltrace.cycles-pp.sock_recvmsg.cifs_readv_from_socket.cifs_read_from_socket.cifs_demultiplex_thread.kthread
0.00 +1.3 1.26 � 9% perf-profile.calltrace.cycles-pp.__fput.__x64_sys_close.do_syscall_64.entry_SYSCALL_64_after_hwframe.__close_nocancel
0.00 +1.3 1.28 � 10% perf-profile.calltrace.cycles-pp.path_listxattrat.do_syscall_64.entry_SYSCALL_64_after_hwframe.listxattr
0.00 +1.3 1.29 � 7% perf-profile.calltrace.cycles-pp.compound_send_recv.smb2_compound_op.smb2_rmdir.cifs_rmdir.vfs_rmdir
0.00 +1.3 1.31 � 10% perf-profile.calltrace.cycles-pp.do_syscall_64.entry_SYSCALL_64_after_hwframe.listxattr
0.00 +1.3 1.31 � 10% perf-profile.calltrace.cycles-pp.entry_SYSCALL_64_after_hwframe.listxattr
0.00 +1.3 1.33 � 19% perf-profile.calltrace.cycles-pp.tcp_recvmsg.inet6_recvmsg.sock_recvmsg.cifs_readv_from_socket.cifs_read_from_socket
0.00 +1.4 1.37 � 20% perf-profile.calltrace.cycles-pp.do_getxattr.filename_getxattr.path_getxattrat.do_syscall_64.entry_SYSCALL_64_after_hwframe
0.00 +1.4 1.37 � 10% perf-profile.calltrace.cycles-pp.recvmsg
0.00 +1.4 1.39 � 11% perf-profile.calltrace.cycles-pp.listxattr
0.00 +1.4 1.41 � 18% perf-profile.calltrace.cycles-pp.tcp_v6_rcv.ip6_protocol_deliver_rcu.ip6_input_finish.__netif_receive_skb_one_core.process_backlog
0.10 �223% +1.4 1.52 � 8% perf-profile.calltrace.cycles-pp.vfs_statx.vfs_fstatat.__do_sys_newfstatat.do_syscall_64.entry_SYSCALL_64_after_hwframe
0.00 +1.4 1.42 � 26% perf-profile.calltrace.cycles-pp.schedule_hrtimeout_range.ep_poll.do_epoll_wait.__x64_sys_epoll_wait.do_syscall_64
0.00 +1.4 1.44 � 15% perf-profile.calltrace.cycles-pp.cifs_readv_from_socket.cifs_read_from_socket.cifs_demultiplex_thread.kthread.ret_from_fork
0.00 +1.4 1.44 � 12% perf-profile.calltrace.cycles-pp.__x64_sys_close.do_syscall_64.entry_SYSCALL_64_after_hwframe.__close_nocancel
0.00 +1.4 1.45 � 18% perf-profile.calltrace.cycles-pp.ip6_protocol_deliver_rcu.ip6_input_finish.__netif_receive_skb_one_core.process_backlog.__napi_poll
0.00 +1.5 1.46 � 16% perf-profile.calltrace.cycles-pp.do_sys_openat2.__x64_sys_openat.do_syscall_64.entry_SYSCALL_64_after_hwframe.openat64
0.00 +1.5 1.46 � 18% perf-profile.calltrace.cycles-pp.ip6_input_finish.__netif_receive_skb_one_core.process_backlog.__napi_poll.net_rx_action
0.00 +1.5 1.46 � 16% perf-profile.calltrace.cycles-pp.cifs_read_from_socket.cifs_demultiplex_thread.kthread.ret_from_fork.ret_from_fork_asm
0.00 +1.5 1.50 � 15% perf-profile.calltrace.cycles-pp.__x64_sys_openat.do_syscall_64.entry_SYSCALL_64_after_hwframe.openat64
0.00 +1.5 1.50 � 13% perf-profile.calltrace.cycles-pp.do_syscall_64.entry_SYSCALL_64_after_hwframe.__close_nocancel
0.00 +1.5 1.52 � 12% perf-profile.calltrace.cycles-pp.entry_SYSCALL_64_after_hwframe.__close_nocancel
0.00 +1.5 1.53 � 14% perf-profile.calltrace.cycles-pp.path_lookupat.filename_lookup.filename_getxattr.path_getxattrat.do_syscall_64
0.00 +1.5 1.53 � 18% perf-profile.calltrace.cycles-pp.__netif_receive_skb_one_core.process_backlog.__napi_poll.net_rx_action.handle_softirqs
0.00 +1.5 1.54 � 14% perf-profile.calltrace.cycles-pp.filename_lookup.filename_getxattr.path_getxattrat.do_syscall_64.entry_SYSCALL_64_after_hwframe
0.00 +1.6 1.56 � 15% perf-profile.calltrace.cycles-pp.do_syscall_64.entry_SYSCALL_64_after_hwframe.openat64
0.00 +1.6 1.56 � 10% perf-profile.calltrace.cycles-pp.smb2_query_dir_first._initiate_cifs_search.cifs_readdir.iterate_dir.__x64_sys_getdents64
0.00 +1.6 1.57 � 17% perf-profile.calltrace.cycles-pp.process_backlog.__napi_poll.net_rx_action.handle_softirqs.do_softirq
0.00 +1.6 1.57 � 17% perf-profile.calltrace.cycles-pp.__napi_poll.net_rx_action.handle_softirqs.do_softirq.__local_bh_enable_ip
0.00 +1.6 1.58 � 15% perf-profile.calltrace.cycles-pp.entry_SYSCALL_64_after_hwframe.openat64
0.00 +1.6 1.58 � 12% perf-profile.calltrace.cycles-pp.__close_nocancel
0.00 +1.6 1.59 � 10% perf-profile.calltrace.cycles-pp._initiate_cifs_search.cifs_readdir.iterate_dir.__x64_sys_getdents64.do_syscall_64
0.00 +1.7 1.66 � 13% perf-profile.calltrace.cycles-pp.btrfs_rmdir.vfs_rmdir.do_rmdir.__x64_sys_unlinkat.do_syscall_64
0.00 +1.7 1.73 � 29% perf-profile.calltrace.cycles-pp.tcp_write_xmit.__tcp_push_pending_frames.tcp_sock_set_cork.__smb_send_rqst.smb_send_rqst
0.00 +1.7 1.73 � 9% perf-profile.calltrace.cycles-pp.smb2_compound_op.smb2_rmdir.cifs_rmdir.vfs_rmdir.do_rmdir
0.00 +1.7 1.73 � 8% perf-profile.calltrace.cycles-pp.btrfs_evict_inode.evict.__dentry_kill.dput.__fput
0.00 +1.7 1.74 � 28% perf-profile.calltrace.cycles-pp.__tcp_push_pending_frames.tcp_sock_set_cork.__smb_send_rqst.smb_send_rqst.compound_send_recv
0.00 +1.7 1.74 � 9% perf-profile.calltrace.cycles-pp.smb2_rmdir.cifs_rmdir.vfs_rmdir.do_rmdir.__x64_sys_unlinkat
0.00 +1.8 1.79 � 14% perf-profile.calltrace.cycles-pp.openat64
0.00 +1.8 1.80 � 10% perf-profile.calltrace.cycles-pp.cifs_rmdir.vfs_rmdir.do_rmdir.__x64_sys_unlinkat.do_syscall_64
0.00 +1.8 1.81 � 8% perf-profile.calltrace.cycles-pp.evict.__dentry_kill.dput.__fput.__x64_sys_close
0.00 +1.8 1.85 � 19% perf-profile.calltrace.cycles-pp.net_rx_action.handle_softirqs.do_softirq.__local_bh_enable_ip.__dev_queue_xmit
0.00 +2.1 2.11 � 7% perf-profile.calltrace.cycles-pp.vfs_fstatat.__do_sys_newfstatat.do_syscall_64.entry_SYSCALL_64_after_hwframe.fstatat64
0.00 +2.1 2.11 � 8% perf-profile.calltrace.cycles-pp.__dentry_kill.dput.__fput.__x64_sys_close.do_syscall_64
0.00 +2.1 2.12 � 23% perf-profile.calltrace.cycles-pp.handle_softirqs.do_softirq.__local_bh_enable_ip.__dev_queue_xmit.ip6_finish_output2
0.00 +2.1 2.13 � 23% perf-profile.calltrace.cycles-pp.do_softirq.__local_bh_enable_ip.__dev_queue_xmit.ip6_finish_output2.ip6_finish_output
0.00 +2.2 2.16 � 7% perf-profile.calltrace.cycles-pp.dput.__fput.__x64_sys_close.do_syscall_64.entry_SYSCALL_64_after_hwframe
0.00 +2.2 2.16 � 22% perf-profile.calltrace.cycles-pp.__local_bh_enable_ip.__dev_queue_xmit.ip6_finish_output2.ip6_finish_output.ip6_xmit
0.00 +2.2 2.19 � 25% perf-profile.calltrace.cycles-pp.ep_poll.do_epoll_wait.__x64_sys_epoll_wait.do_syscall_64.entry_SYSCALL_64_after_hwframe
0.00 +2.3 2.25 � 25% perf-profile.calltrace.cycles-pp.do_epoll_wait.__x64_sys_epoll_wait.do_syscall_64.entry_SYSCALL_64_after_hwframe.epoll_wait
0.00 +2.3 2.32 � 9% perf-profile.calltrace.cycles-pp.__fput.__x64_sys_close.do_syscall_64.entry_SYSCALL_64_after_hwframe.__close
0.00 +2.3 2.33 � 25% perf-profile.calltrace.cycles-pp.__x64_sys_epoll_wait.do_syscall_64.entry_SYSCALL_64_after_hwframe.epoll_wait
0.00 +2.5 2.54 � 18% perf-profile.calltrace.cycles-pp.inet6_csk_xmit.__tcp_transmit_skb.tcp_write_xmit.__tcp_push_pending_frames.tcp_sendmsg_locked
0.00 +2.6 2.59 � 25% perf-profile.calltrace.cycles-pp.__dev_queue_xmit.ip6_finish_output2.ip6_finish_output.ip6_xmit.inet6_csk_xmit
0.00 +2.6 2.59 � 24% perf-profile.calltrace.cycles-pp.do_syscall_64.entry_SYSCALL_64_after_hwframe.epoll_wait
0.00 +2.6 2.59 � 24% perf-profile.calltrace.cycles-pp.entry_SYSCALL_64_after_hwframe.epoll_wait
0.00 +2.6 2.60 � 7% perf-profile.calltrace.cycles-pp.__x64_sys_close.do_syscall_64.entry_SYSCALL_64_after_hwframe.__close
0.00 +2.6 2.65 � 8% perf-profile.calltrace.cycles-pp.do_syscall_64.entry_SYSCALL_64_after_hwframe.__close
0.00 +2.7 2.66 � 8% perf-profile.calltrace.cycles-pp.entry_SYSCALL_64_after_hwframe.__close
0.00 +2.7 2.66 � 26% perf-profile.calltrace.cycles-pp.ip6_finish_output2.ip6_finish_output.ip6_xmit.inet6_csk_xmit.__tcp_transmit_skb
0.00 +2.7 2.72 � 14% perf-profile.calltrace.cycles-pp.cifs_demultiplex_thread.kthread.ret_from_fork.ret_from_fork_asm
0.00 +2.7 2.72 � 25% perf-profile.calltrace.cycles-pp.ip6_finish_output.ip6_xmit.inet6_csk_xmit.__tcp_transmit_skb.tcp_write_xmit
0.00 +2.8 2.79 � 17% perf-profile.calltrace.cycles-pp.__tcp_transmit_skb.tcp_write_xmit.__tcp_push_pending_frames.tcp_sendmsg_locked.tcp_sendmsg
0.00 +2.8 2.80 � 8% perf-profile.calltrace.cycles-pp.__do_sys_newfstatat.do_syscall_64.entry_SYSCALL_64_after_hwframe.fstatat64
0.00 +2.8 2.85 � 8% perf-profile.calltrace.cycles-pp.__close
0.00 +2.9 2.85 � 22% perf-profile.calltrace.cycles-pp.epoll_wait
0.00 +3.0 2.99 � 13% perf-profile.calltrace.cycles-pp.filename_getxattr.path_getxattrat.do_syscall_64.entry_SYSCALL_64_after_hwframe.getxattr
0.00 +3.0 3.00 � 28% perf-profile.calltrace.cycles-pp.ip6_xmit.inet6_csk_xmit.__tcp_transmit_skb.tcp_write_xmit.__tcp_push_pending_frames
0.00 +3.1 3.06 � 9% perf-profile.calltrace.cycles-pp.do_syscall_64.entry_SYSCALL_64_after_hwframe.fstatat64
0.00 +3.1 3.08 � 16% perf-profile.calltrace.cycles-pp.tcp_write_xmit.__tcp_push_pending_frames.tcp_sendmsg_locked.tcp_sendmsg.____sys_sendmsg
0.00 +3.1 3.10 � 16% perf-profile.calltrace.cycles-pp.__tcp_push_pending_frames.tcp_sendmsg_locked.tcp_sendmsg.____sys_sendmsg.___sys_sendmsg
0.00 +3.1 3.10 � 9% perf-profile.calltrace.cycles-pp.entry_SYSCALL_64_after_hwframe.fstatat64
0.00 +3.1 3.14 � 10% perf-profile.calltrace.cycles-pp.cifs_readdir.iterate_dir.__x64_sys_getdents64.do_syscall_64.entry_SYSCALL_64_after_hwframe
0.00 +3.2 3.19 � 13% perf-profile.calltrace.cycles-pp.path_getxattrat.do_syscall_64.entry_SYSCALL_64_after_hwframe.getxattr
0.00 +3.3 3.25 � 13% perf-profile.calltrace.cycles-pp.do_syscall_64.entry_SYSCALL_64_after_hwframe.getxattr
0.00 +3.3 3.26 � 13% perf-profile.calltrace.cycles-pp.entry_SYSCALL_64_after_hwframe.getxattr
0.00 +3.4 3.39 � 13% perf-profile.calltrace.cycles-pp.getxattr
0.00 +3.6 3.65 � 11% perf-profile.calltrace.cycles-pp.fstatat64
0.00 +3.8 3.79 � 16% perf-profile.calltrace.cycles-pp.tcp_sendmsg_locked.tcp_sendmsg.____sys_sendmsg.___sys_sendmsg.__sys_sendmsg
0.00 +3.8 3.80 � 10% perf-profile.calltrace.cycles-pp.vfs_rmdir.do_rmdir.__x64_sys_unlinkat.do_syscall_64.entry_SYSCALL_64_after_hwframe
0.00 +3.9 3.89 � 16% perf-profile.calltrace.cycles-pp.tcp_sendmsg.____sys_sendmsg.___sys_sendmsg.__sys_sendmsg.do_syscall_64
0.00 +4.0 4.01 � 11% perf-profile.calltrace.cycles-pp.do_rmdir.__x64_sys_unlinkat.do_syscall_64.entry_SYSCALL_64_after_hwframe.unlinkat
0.00 +4.1 4.06 � 11% perf-profile.calltrace.cycles-pp.__x64_sys_unlinkat.do_syscall_64.entry_SYSCALL_64_after_hwframe.unlinkat
0.00 +4.1 4.09 � 11% perf-profile.calltrace.cycles-pp.iterate_dir.__x64_sys_getdents64.do_syscall_64.entry_SYSCALL_64_after_hwframe.getdents64
0.00 +4.1 4.10 � 11% perf-profile.calltrace.cycles-pp.do_syscall_64.entry_SYSCALL_64_after_hwframe.unlinkat
0.00 +4.1 4.10 � 11% perf-profile.calltrace.cycles-pp.entry_SYSCALL_64_after_hwframe.unlinkat
0.00 +4.2 4.18 � 11% perf-profile.calltrace.cycles-pp.__x64_sys_getdents64.do_syscall_64.entry_SYSCALL_64_after_hwframe.getdents64
0.00 +4.2 4.19 � 11% perf-profile.calltrace.cycles-pp.unlinkat
0.00 +4.3 4.28 � 11% perf-profile.calltrace.cycles-pp.do_syscall_64.entry_SYSCALL_64_after_hwframe.getdents64
0.00 +4.3 4.29 � 11% perf-profile.calltrace.cycles-pp.entry_SYSCALL_64_after_hwframe.getdents64
0.00 +4.4 4.44 � 12% perf-profile.calltrace.cycles-pp.getdents64
0.00 +4.5 4.46 � 16% perf-profile.calltrace.cycles-pp.____sys_sendmsg.___sys_sendmsg.__sys_sendmsg.do_syscall_64.entry_SYSCALL_64_after_hwframe
0.00 +4.7 4.65 � 16% perf-profile.calltrace.cycles-pp.___sys_sendmsg.__sys_sendmsg.do_syscall_64.entry_SYSCALL_64_after_hwframe.sendmsg
0.00 +4.7 4.70 � 17% perf-profile.calltrace.cycles-pp.__sys_sendmsg.do_syscall_64.entry_SYSCALL_64_after_hwframe.sendmsg
0.00 +4.8 4.77 � 16% perf-profile.calltrace.cycles-pp.do_syscall_64.entry_SYSCALL_64_after_hwframe.sendmsg
0.00 +4.8 4.77 � 16% perf-profile.calltrace.cycles-pp.entry_SYSCALL_64_after_hwframe.sendmsg
0.00 +4.9 4.92 � 16% perf-profile.calltrace.cycles-pp.sendmsg
47.47 -20.7 26.76 � 8% perf-profile.children.cycles-pp.common_startup_64
47.47 -20.7 26.76 � 8% perf-profile.children.cycles-pp.cpu_startup_entry
47.42 -20.7 26.74 � 8% perf-profile.children.cycles-pp.do_idle
42.13 � 3% -18.4 23.69 � 8% perf-profile.children.cycles-pp.start_secondary
38.10 � 4% -17.8 20.30 � 9% perf-profile.children.cycles-pp.cpuidle_idle_call
33.63 � 3% -15.4 18.24 � 10% perf-profile.children.cycles-pp.cpuidle_enter
33.49 � 3% -15.3 18.15 � 10% perf-profile.children.cycles-pp.cpuidle_enter_state
14.26 � 4% -10.1 4.15 � 29% perf-profile.children.cycles-pp.asm_sysvec_apic_timer_interrupt
13.24 � 5% -9.4 3.84 � 30% perf-profile.children.cycles-pp.sysvec_apic_timer_interrupt
7.10 � 3% -5.6 1.53 � 44% perf-profile.children.cycles-pp.dispatch_events
7.10 � 3% -5.6 1.53 � 44% perf-profile.children.cycles-pp.cmd_stat
7.08 � 3% -5.6 1.53 � 44% perf-profile.children.cycles-pp.process_interval
6.96 � 4% -5.5 1.48 � 44% perf-profile.children.cycles-pp.read_counters
6.44 � 6% -5.0 1.42 � 35% perf-profile.children.cycles-pp.read
6.25 � 9% -4.8 1.42 � 47% perf-profile.children.cycles-pp.__x64_sys_execve
6.20 � 8% -4.8 1.40 � 46% perf-profile.children.cycles-pp.do_execveat_common
6.18 � 10% -4.8 1.41 � 47% perf-profile.children.cycles-pp.execve
6.36 � 6% -4.6 1.81 � 33% perf-profile.children.cycles-pp.__sysvec_apic_timer_interrupt
10.50 � 11% -4.5 6.01 � 11% perf-profile.children.cycles-pp.ret_from_fork_asm
5.70 � 5% -4.4 1.25 � 42% perf-profile.children.cycles-pp.sched_setaffinity
10.45 � 11% -4.4 6.00 � 11% perf-profile.children.cycles-pp.ret_from_fork
5.95 � 11% -4.4 1.52 � 36% perf-profile.children.cycles-pp.asm_exc_page_fault
6.20 � 6% -4.4 1.78 � 33% perf-profile.children.cycles-pp.hrtimer_interrupt
5.59 � 5% -4.3 1.28 � 36% perf-profile.children.cycles-pp.ksys_read
10.06 � 12% -4.1 5.91 � 11% perf-profile.children.cycles-pp.kthread
5.30 � 6% -4.1 1.24 � 37% perf-profile.children.cycles-pp.vfs_read
5.15 � 12% -3.9 1.29 � 34% perf-profile.children.cycles-pp.do_user_addr_fault
5.16 � 12% -3.9 1.30 � 34% perf-profile.children.cycles-pp.exc_page_fault
16.15 � 8% -3.7 12.41 � 4% perf-profile.children.cycles-pp.intel_idle
5.11 � 9% -3.7 1.44 � 34% perf-profile.children.cycles-pp.__hrtimer_run_queues
4.86 � 13% -3.6 1.24 � 37% perf-profile.children.cycles-pp.handle_mm_fault
4.58 � 11% -3.5 1.03 � 39% perf-profile.children.cycles-pp.smpboot_thread_fn
4.55 � 13% -3.4 1.16 � 37% perf-profile.children.cycles-pp.__handle_mm_fault
5.26 � 13% -3.3 1.94 � 22% perf-profile.children.cycles-pp.sched_balance_rq
4.18 � 11% -3.3 0.92 � 41% perf-profile.children.cycles-pp.bprm_execve
4.56 � 15% -3.1 1.48 � 24% perf-profile.children.cycles-pp.__irq_exit_rcu
4.54 � 14% -3.0 1.56 � 25% perf-profile.children.cycles-pp.sched_balance_find_src_group
4.14 � 13% -3.0 1.18 � 29% perf-profile.children.cycles-pp.tick_nohz_handler
4.46 � 14% -2.9 1.52 � 26% perf-profile.children.cycles-pp.update_sd_lb_stats
3.65 � 15% -2.8 0.81 � 46% perf-profile.children.cycles-pp.exec_binprm
3.62 � 15% -2.8 0.80 � 46% perf-profile.children.cycles-pp.search_binary_handler
3.64 � 6% -2.8 0.82 � 48% perf-profile.children.cycles-pp.evlist_cpu_iterator__next
4.61 � 9% -2.8 1.80 � 15% perf-profile.children.cycles-pp.__pick_next_task
4.73 � 23% -2.8 1.96 � 13% perf-profile.children.cycles-pp._nohz_idle_balance
4.03 � 16% -2.7 1.30 � 28% perf-profile.children.cycles-pp.update_sg_lb_stats
3.50 � 15% -2.7 0.79 � 47% perf-profile.children.cycles-pp.load_elf_binary
4.12 � 16% -2.4 1.76 � 30% perf-profile.children.cycles-pp.worker_thread
6.97 � 8% -2.4 4.62 perf-profile.children.cycles-pp.__schedule
3.34 � 11% -2.3 1.00 � 24% perf-profile.children.cycles-pp.sched_balance_newidle
2.93 � 14% -2.3 0.60 � 42% perf-profile.children.cycles-pp.balance_fair
3.04 � 12% -2.3 0.74 � 49% perf-profile.children.cycles-pp.vm_mmap_pgoff
3.00 � 12% -2.3 0.73 � 50% perf-profile.children.cycles-pp.do_mmap
5.34 � 23% -2.3 3.07 � 24% perf-profile.children.cycles-pp.rest_init
5.34 � 23% -2.3 3.07 � 24% perf-profile.children.cycles-pp.start_kernel
5.34 � 23% -2.3 3.07 � 24% perf-profile.children.cycles-pp.x86_64_start_kernel
5.34 � 23% -2.3 3.07 � 24% perf-profile.children.cycles-pp.x86_64_start_reservations
3.10 � 10% -2.1 0.96 � 36% perf-profile.children.cycles-pp.x64_sys_call
2.67 � 5% -2.1 0.58 � 39% perf-profile.children.cycles-pp.__x64_sys_sched_setaffinity
2.74 � 9% -2.1 0.67 � 50% perf-profile.children.cycles-pp.__mmap_region
2.78 � 12% -2.0 0.73 � 45% perf-profile.children.cycles-pp.__x64_sys_exit_group
2.78 � 12% -2.0 0.73 � 45% perf-profile.children.cycles-pp.do_group_exit
2.95 � 11% -2.0 0.90 � 30% perf-profile.children.cycles-pp.update_process_times
2.77 � 12% -2.0 0.73 � 45% perf-profile.children.cycles-pp.do_exit
3.61 � 21% -2.0 1.64 � 31% perf-profile.children.cycles-pp.process_one_work
2.54 � 11% -1.9 0.62 � 39% perf-profile.children.cycles-pp.do_pte_missing
2.36 � 8% -1.8 0.52 � 41% perf-profile.children.cycles-pp.__sched_setaffinity
2.38 � 11% -1.8 0.56 � 35% perf-profile.children.cycles-pp.seq_read_iter
2.23 � 11% -1.8 0.43 � 37% perf-profile.children.cycles-pp.readn
2.45 � 14% -1.8 0.66 � 42% perf-profile.children.cycles-pp.__mmput
2.27 � 11% -1.8 0.49 � 42% perf-profile.children.cycles-pp.setlocale
2.42 � 14% -1.8 0.64 � 43% perf-profile.children.cycles-pp.exit_mmap
2.19 � 14% -1.7 0.50 � 40% perf-profile.children.cycles-pp.ksys_mmap_pgoff
2.12 � 17% -1.6 0.47 � 39% perf-profile.children.cycles-pp.kernel_clone
4.89 � 12% -1.6 3.28 � 2% perf-profile.children.cycles-pp.schedule
2.04 � 9% -1.6 0.45 � 43% perf-profile.children.cycles-pp.__set_cpus_allowed_ptr
2.06 � 15% -1.6 0.50 � 38% perf-profile.children.cycles-pp.do_read_fault
1.89 � 18% -1.5 0.37 � 47% perf-profile.children.cycles-pp.evsel__read_counter
2.69 � 17% -1.4 1.27 � 17% perf-profile.children.cycles-pp.sched_balance_domains
1.84 � 16% -1.4 0.46 � 38% perf-profile.children.cycles-pp.filemap_map_pages
1.91 � 17% -1.4 0.54 � 48% perf-profile.children.cycles-pp.exit_mm
1.73 � 23% -1.3 0.42 � 38% perf-profile.children.cycles-pp.irq_enter_rcu
2.58 � 17% -1.3 1.27 � 6% perf-profile.children.cycles-pp.menu_select
1.66 � 24% -1.3 0.41 � 38% perf-profile.children.cycles-pp.tick_irq_enter
1.58 � 8% -1.2 0.35 � 37% perf-profile.children.cycles-pp.__vfork
1.51 � 19% -1.2 0.30 � 45% perf-profile.children.cycles-pp.copy_process
1.50 � 24% -1.2 0.31 � 73% perf-profile.children.cycles-pp.irq_work_run_list
1.49 � 23% -1.2 0.30 � 73% perf-profile.children.cycles-pp.__sysvec_irq_work
1.49 � 23% -1.2 0.30 � 73% perf-profile.children.cycles-pp._printk
1.49 � 23% -1.2 0.30 � 73% perf-profile.children.cycles-pp.asm_sysvec_irq_work
1.49 � 23% -1.2 0.30 � 73% perf-profile.children.cycles-pp.irq_work_run
1.49 � 23% -1.2 0.30 � 73% perf-profile.children.cycles-pp.irq_work_single
1.49 � 23% -1.2 0.30 � 73% perf-profile.children.cycles-pp.sysvec_irq_work
1.30 � 25% -1.1 0.20 � 78% perf-profile.children.cycles-pp.native_queued_spin_lock_slowpath
3.35 � 13% -1.1 2.26 � 14% perf-profile.children.cycles-pp.__x64_sys_openat
3.27 � 11% -1.1 2.19 � 10% perf-profile.children.cycles-pp.path_openat
3.29 � 11% -1.1 2.22 � 10% perf-profile.children.cycles-pp.do_filp_open
1.51 � 22% -1.1 0.45 � 32% perf-profile.children.cycles-pp.sched_tick
1.31 � 33% -1.1 0.25 � 39% perf-profile.children.cycles-pp.tmigr_handle_remote
1.39 � 11% -1.1 0.34 � 49% perf-profile.children.cycles-pp.__mmap_new_vma
1.33 � 21% -1.0 0.30 � 47% perf-profile.children.cycles-pp.__open64_nocancel
1.29 � 13% -1.0 0.29 � 35% perf-profile.children.cycles-pp.perf_read
1.26 � 18% -1.0 0.27 � 35% perf-profile.children.cycles-pp.__x64_sys_vfork
1.22 � 34% -1.0 0.24 � 41% perf-profile.children.cycles-pp.tmigr_handle_remote_up
1.13 � 8% -0.9 0.22 � 35% perf-profile.children.cycles-pp.perf_evsel__read
1.15 � 23% -0.9 0.24 � 42% perf-profile.children.cycles-pp.__set_cpus_allowed_ptr_locked
1.17 � 13% -0.9 0.30 � 54% perf-profile.children.cycles-pp.elf_load
1.12 � 14% -0.9 0.27 � 56% perf-profile.children.cycles-pp._Fork
1.39 � 34% -0.8 0.56 � 22% perf-profile.children.cycles-pp.raw_spin_rq_lock_nested
1.05 � 22% -0.8 0.22 � 39% perf-profile.children.cycles-pp.__do_set_cpus_allowed
1.06 � 16% -0.8 0.25 � 61% perf-profile.children.cycles-pp.pipe_read
1.03 � 33% -0.8 0.22 � 37% perf-profile.children.cycles-pp._raw_spin_lock_irq
0.97 � 17% -0.8 0.20 � 47% perf-profile.children.cycles-pp.__lookup_slow
1.03 � 20% -0.8 0.27 � 50% perf-profile.children.cycles-pp.unmap_vmas
1.19 � 15% -0.8 0.44 � 17% perf-profile.children.cycles-pp.idle_cpu
0.95 � 18% -0.8 0.20 � 48% perf-profile.children.cycles-pp.__mmap
0.93 � 14% -0.7 0.19 � 38% perf-profile.children.cycles-pp.migration_cpu_stop
0.94 � 15% -0.7 0.20 � 40% perf-profile.children.cycles-pp.cpu_stopper_thread
0.93 � 14% -0.7 0.20 � 59% perf-profile.children.cycles-pp.alloc_bprm
0.92 � 27% -0.7 0.18 � 37% perf-profile.children.cycles-pp.proc_reg_read_iter
0.89 � 12% -0.7 0.17 � 36% perf-profile.children.cycles-pp.move_queued_task
0.95 � 14% -0.7 0.24 � 27% perf-profile.children.cycles-pp.tick_nohz_stop_tick
0.95 � 14% -0.7 0.25 � 27% perf-profile.children.cycles-pp.tick_nohz_idle_stop_tick
0.92 � 21% -0.7 0.23 � 28% perf-profile.children.cycles-pp.begin_new_exec
0.86 � 18% -0.7 0.20 � 49% perf-profile.children.cycles-pp.__do_sys_clone
0.88 � 37% -0.7 0.22 � 30% perf-profile.children.cycles-pp.do_anonymous_page
0.85 � 13% -0.6 0.20 � 44% perf-profile.children.cycles-pp.affine_move_task
0.92 � 24% -0.6 0.29 � 44% perf-profile.children.cycles-pp.delay_tsc
0.82 � 18% -0.6 0.19 � 34% perf-profile.children.cycles-pp.tlb_finish_mmu
0.80 � 42% -0.6 0.17 � 30% perf-profile.children.cycles-pp.update_sg_wakeup_stats
0.81 � 43% -0.6 0.18 � 25% perf-profile.children.cycles-pp.sched_balance_find_dst_group
0.79 � 25% -0.6 0.16 � 50% perf-profile.children.cycles-pp.alloc_pages_mpol_noprof
2.19 � 9% -0.6 1.57 � 8% perf-profile.children.cycles-pp.enqueue_task
0.90 � 22% -0.6 0.28 � 42% perf-profile.children.cycles-pp.next_uptodate_folio
1.21 � 22% -0.6 0.59 � 32% perf-profile.children.cycles-pp.rcu_core
1.17 � 12% -0.6 0.56 � 20% perf-profile.children.cycles-pp.tick_nohz_idle_exit
1.04 � 23% -0.6 0.43 � 15% perf-profile.children.cycles-pp.update_rq_clock_task
0.81 � 15% -0.6 0.20 � 22% perf-profile.children.cycles-pp.tick_nohz_restart_sched_tick
0.78 � 15% -0.6 0.17 � 86% perf-profile.children.cycles-pp.mas_store_prealloc
1.07 � 24% -0.6 0.47 � 20% perf-profile.children.cycles-pp.tick_nohz_get_sleep_length
0.86 � 24% -0.6 0.26 � 54% perf-profile.children.cycles-pp.unmap_page_range
0.74 � 28% -0.6 0.15 � 51% perf-profile.children.cycles-pp.__alloc_pages_noprof
0.82 � 24% -0.6 0.24 � 48% perf-profile.children.cycles-pp.zap_pmd_range
3.34 � 13% -0.6 2.76 � 9% perf-profile.children.cycles-pp.do_sys_openat2
0.80 � 22% -0.6 0.24 � 45% perf-profile.children.cycles-pp.zap_pte_range
0.74 � 15% -0.6 0.18 � 23% perf-profile.children.cycles-pp.exec_mmap
0.69 � 23% -0.6 0.12 � 34% perf-profile.children.cycles-pp.wp_page_copy
0.71 � 15% -0.6 0.15 � 64% perf-profile.children.cycles-pp.d_alloc_parallel
0.81 � 23% -0.6 0.26 � 45% perf-profile.children.cycles-pp.__split_vma
1.47 � 21% -0.6 0.92 � 28% perf-profile.children.cycles-pp.wait_for_lsr
0.68 � 30% -0.5 0.13 � 36% perf-profile.children.cycles-pp.seq_read
0.67 � 22% -0.5 0.12 � 81% perf-profile.children.cycles-pp.mm_init
0.77 � 25% -0.5 0.24 � 56% perf-profile.children.cycles-pp.__mmap_prepare
0.64 � 23% -0.5 0.11 � 40% perf-profile.children.cycles-pp.vmstat_start
0.69 � 19% -0.5 0.17 � 21% perf-profile.children.cycles-pp.clockevents_program_event
1.49 � 23% -0.5 0.97 � 28% perf-profile.children.cycles-pp.serial8250_console_write
0.64 � 18% -0.5 0.14 � 32% perf-profile.children.cycles-pp.free_pages_and_swap_cache
0.64 � 18% -0.5 0.14 � 32% perf-profile.children.cycles-pp.__tlb_batch_free_encoded_pages
0.70 � 27% -0.5 0.19 � 39% perf-profile.children.cycles-pp.vms_gather_munmap_vmas
0.60 � 34% -0.5 0.09 � 72% perf-profile.children.cycles-pp.tick_do_update_jiffies64
0.62 � 11% -0.5 0.12 � 36% perf-profile.children.cycles-pp.__pte_offset_map_lock
1.93 � 11% -0.5 1.44 � 10% perf-profile.children.cycles-pp.enqueue_task_fair
0.54 �109% -0.5 0.05 �103% perf-profile.children.cycles-pp.need_update
0.88 � 26% -0.5 0.40 � 15% perf-profile.children.cycles-pp.sched_balance_update_blocked_averages
0.56 � 25% -0.5 0.11 � 53% perf-profile.children.cycles-pp.setup_arg_pages
0.66 � 22% -0.5 0.20 � 40% perf-profile.children.cycles-pp.zap_present_ptes
0.81 � 19% -0.4 0.36 � 20% perf-profile.children.cycles-pp.tick_nohz_next_event
0.56 � 14% -0.4 0.12 � 20% perf-profile.children.cycles-pp.__cmd_record
0.56 � 14% -0.4 0.12 � 20% perf-profile.children.cycles-pp.cmd_record
0.54 � 16% -0.4 0.10 � 48% perf-profile.children.cycles-pp.folios_put_refs
0.74 � 12% -0.4 0.30 � 16% perf-profile.children.cycles-pp.finish_task_switch
1.11 � 19% -0.4 0.67 � 11% perf-profile.children.cycles-pp.hrtimer_start_range_ns
0.59 � 17% -0.4 0.16 � 33% perf-profile.children.cycles-pp.vma_interval_tree_insert
0.48 �117% -0.4 0.06 � 98% perf-profile.children.cycles-pp.acpi_os_execute_deferred
0.62 � 32% -0.4 0.20 � 51% perf-profile.children.cycles-pp.native_irq_return_iret
0.54 � 19% -0.4 0.12 � 63% perf-profile.children.cycles-pp.dup_mm
0.92 � 29% -0.4 0.50 � 31% perf-profile.children.cycles-pp.rcu_do_batch
0.48 �120% -0.4 0.06 � 98% perf-profile.children.cycles-pp.acpi_ev_asynch_execute_gpe_method
0.54 � 16% -0.4 0.13 � 60% perf-profile.children.cycles-pp.d_alloc
0.76 � 27% -0.4 0.35 � 17% perf-profile.children.cycles-pp.__memcg_slab_post_alloc_hook
0.54 � 33% -0.4 0.14 � 26% perf-profile.children.cycles-pp.wait4
0.57 � 24% -0.4 0.16 � 74% perf-profile.children.cycles-pp.copy_strings
0.52 � 34% -0.4 0.12 � 47% perf-profile.children.cycles-pp.wake_up_new_task
0.52 � 14% -0.4 0.12 � 34% perf-profile.children.cycles-pp.fold_vm_zone_numa_events
0.49 � 42% -0.4 0.08 � 64% perf-profile.children.cycles-pp.get_page_from_freelist
0.54 � 14% -0.4 0.13 � 52% perf-profile.children.cycles-pp.perf_event_read
0.60 � 21% -0.4 0.20 � 9% perf-profile.children.cycles-pp.timerqueue_del
0.46 �121% -0.4 0.06 � 98% perf-profile.children.cycles-pp.acpi_ns_evaluate
0.50 � 33% -0.4 0.11 � 46% perf-profile.children.cycles-pp.dup_task_struct
0.44 �125% -0.4 0.06 �100% perf-profile.children.cycles-pp.acpi_ps_execute_method
0.52 � 11% -0.4 0.13 � 52% perf-profile.children.cycles-pp.generic_exec_single
0.47 � 17% -0.4 0.08 � 30% perf-profile.children.cycles-pp.slab_show
0.49 � 10% -0.4 0.10 � 54% perf-profile.children.cycles-pp.__perf_event_read
0.45 � 32% -0.4 0.07 �118% perf-profile.children.cycles-pp.pcpu_alloc_noprof
0.51 � 12% -0.4 0.12 � 50% perf-profile.children.cycles-pp.smp_call_function_single
0.54 � 28% -0.4 0.16 � 51% perf-profile.children.cycles-pp.free_pgtables
0.50 � 11% -0.4 0.12 � 44% perf-profile.children.cycles-pp.get_arg_page
0.43 �132% -0.4 0.06 �100% perf-profile.children.cycles-pp.acpi_ps_parse_aml
0.48 � 9% -0.4 0.11 � 37% perf-profile.children.cycles-pp.try_address
0.54 � 17% -0.4 0.17 � 49% perf-profile.children.cycles-pp.pipe_write
0.48 � 9% -0.4 0.12 � 44% perf-profile.children.cycles-pp.__i2c_transfer
0.48 � 9% -0.4 0.12 � 44% perf-profile.children.cycles-pp.ast_vga_connector_helper_detect_ctx
0.48 � 9% -0.4 0.12 � 44% perf-profile.children.cycles-pp.bit_xfer
0.48 � 9% -0.4 0.12 � 44% perf-profile.children.cycles-pp.drm_connector_helper_detect_from_ddc
0.48 � 9% -0.4 0.12 � 44% perf-profile.children.cycles-pp.drm_do_probe_ddc_edid
0.48 � 9% -0.4 0.12 � 44% perf-profile.children.cycles-pp.drm_helper_probe_detect_ctx
0.48 � 9% -0.4 0.12 � 44% perf-profile.children.cycles-pp.drm_probe_ddc
0.48 � 9% -0.4 0.12 � 44% perf-profile.children.cycles-pp.i2c_transfer
0.48 � 9% -0.4 0.12 � 44% perf-profile.children.cycles-pp.output_poll_execute
0.52 � 27% -0.4 0.16 � 38% perf-profile.children.cycles-pp.do_vmi_munmap
0.48 � 27% -0.4 0.12 � 53% perf-profile.children.cycles-pp.mprotect_fixup
0.46 � 24% -0.4 0.11 � 29% perf-profile.children.cycles-pp.vma_link_file
0.41 � 27% -0.4 0.05 � 76% perf-profile.children.cycles-pp.run_posix_cpu_timers
0.51 � 30% -0.4 0.16 � 38% perf-profile.children.cycles-pp.__vm_munmap
0.51 � 30% -0.4 0.16 � 38% perf-profile.children.cycles-pp.do_vmi_align_munmap
0.42 � 33% -0.4 0.08 � 56% perf-profile.children.cycles-pp.relocate_vma_down
0.46 � 45% -0.3 0.11 � 40% perf-profile.children.cycles-pp.rcu_sched_clock_irq
0.56 � 11% -0.3 0.22 � 51% perf-profile.children.cycles-pp.mod_objcg_state
0.40 � 19% -0.3 0.06 � 52% perf-profile.children.cycles-pp.set_pte_range
0.40 � 42% -0.3 0.06 � 17% perf-profile.children.cycles-pp.__run_timers
0.46 � 15% -0.3 0.12 � 33% perf-profile.children.cycles-pp.__x64_sys_mprotect
0.44 � 46% -0.3 0.10 � 74% perf-profile.children.cycles-pp.perf_event_mmap
0.43 � 36% -0.3 0.09 � 22% perf-profile.children.cycles-pp.do_wait
0.43 � 36% -0.3 0.09 � 22% perf-profile.children.cycles-pp.kernel_wait4
0.45 � 14% -0.3 0.12 � 35% perf-profile.children.cycles-pp.do_mprotect_pkey
0.38 � 43% -0.3 0.05 � 75% perf-profile.children.cycles-pp.strnlen_user
0.78 � 19% -0.3 0.45 � 13% perf-profile.children.cycles-pp.update_rq_clock
0.42 � 29% -0.3 0.09 � 72% perf-profile.children.cycles-pp.do_open_execat
0.38 � 20% -0.3 0.06 � 73% perf-profile.children.cycles-pp._IO_fwrite
0.38 �149% -0.3 0.05 � 91% perf-profile.children.cycles-pp.acpi_ps_parse_loop
0.42 � 54% -0.3 0.09 � 80% perf-profile.children.cycles-pp.perf_event_mmap_event
0.41 � 39% -0.3 0.09 � 47% perf-profile.children.cycles-pp.rcu_pending
0.54 � 24% -0.3 0.22 � 40% perf-profile.children.cycles-pp.cpuidle_governor_latency_req
0.45 � 32% -0.3 0.14 � 25% perf-profile.children.cycles-pp.sched_balance_softirq
0.34 � 42% -0.3 0.03 �102% perf-profile.children.cycles-pp.create_elf_tables
0.45 � 26% -0.3 0.14 � 63% perf-profile.children.cycles-pp.__wait_for_common
0.40 � 31% -0.3 0.09 � 31% perf-profile.children.cycles-pp.lapic_next_deadline
0.38 � 25% -0.3 0.07 � 53% perf-profile.children.cycles-pp.__queue_work
0.36 � 38% -0.3 0.06 � 13% perf-profile.children.cycles-pp.call_timer_fn
0.38 � 21% -0.3 0.08 � 28% perf-profile.children.cycles-pp.copy_string_kernel
0.39 � 27% -0.3 0.09 � 58% perf-profile.children.cycles-pp.schedule_tail
0.38 � 28% -0.3 0.09 � 73% perf-profile.children.cycles-pp.__perf_read_group_add
0.38 � 8% -0.3 0.09 � 42% perf-profile.children.cycles-pp.i2c_outb
0.42 � 24% -0.3 0.13 � 48% perf-profile.children.cycles-pp.__mmdrop
0.39 � 29% -0.3 0.10 � 55% perf-profile.children.cycles-pp.dup_mmap
0.36 � 35% -0.3 0.07 � 63% perf-profile.children.cycles-pp.vma_alloc_folio_noprof
0.48 � 23% -0.3 0.20 � 27% perf-profile.children.cycles-pp.local_clock_noinstr
0.36 � 34% -0.3 0.07 � 92% perf-profile.children.cycles-pp.__d_alloc
0.38 � 34% -0.3 0.09 � 49% perf-profile.children.cycles-pp.alloc_thread_stack_node
0.37 � 21% -0.3 0.09 � 34% perf-profile.children.cycles-pp.get_user_pages_remote
0.36 � 32% -0.3 0.08 � 59% perf-profile.children.cycles-pp.cpu_stop_queue_work
0.40 � 22% -0.3 0.12 � 46% perf-profile.children.cycles-pp.cpu_util
0.35 � 35% -0.3 0.07 � 88% perf-profile.children.cycles-pp.folio_alloc_mpol_noprof
0.33 � 39% -0.3 0.04 �110% perf-profile.children.cycles-pp.rmqueue
0.36 � 36% -0.3 0.08 � 65% perf-profile.children.cycles-pp.__vmalloc_node_range_noprof
0.34 � 28% -0.3 0.06 � 68% perf-profile.children.cycles-pp.mas_wr_node_store
0.34 � 23% -0.3 0.06 � 79% perf-profile.children.cycles-pp.seq_printf
0.36 � 26% -0.3 0.09 � 34% perf-profile.children.cycles-pp.__get_user_pages
0.75 � 22% -0.3 0.47 � 14% perf-profile.children.cycles-pp.update_load_avg
0.31 � 35% -0.3 0.04 �107% perf-profile.children.cycles-pp.kick_pool
0.36 � 53% -0.3 0.08 � 32% perf-profile.children.cycles-pp.__mod_memcg_lruvec_state
0.39 � 29% -0.3 0.12 � 41% perf-profile.children.cycles-pp.sync_regs
0.38 � 34% -0.3 0.11 � 60% perf-profile.children.cycles-pp.vms_clear_ptes
0.30 � 32% -0.3 0.03 �111% perf-profile.children.cycles-pp.mas_preallocate
0.31 � 46% -0.3 0.05 � 79% perf-profile.children.cycles-pp.evlist__id2sid
0.38 � 40% -0.3 0.12 � 55% perf-profile.children.cycles-pp.tmigr_requires_handle_remote
0.66 � 14% -0.3 0.40 � 24% perf-profile.children.cycles-pp.__memcg_slab_free_hook
0.39 � 20% -0.3 0.14 � 37% perf-profile.children.cycles-pp._find_next_and_bit
0.30 � 48% -0.3 0.05 � 85% perf-profile.children.cycles-pp.evlist__id2evsel
0.34 � 44% -0.3 0.08 � 68% perf-profile.children.cycles-pp.vma_prepare
0.33 � 42% -0.2 0.08 � 42% perf-profile.children.cycles-pp.hrtimer_update_next_event
0.34 � 6% -0.2 0.09 � 26% perf-profile.children.cycles-pp.perf_mmap__push
0.38 � 32% -0.2 0.13 � 48% perf-profile.children.cycles-pp.show_stat
0.31 � 28% -0.2 0.06 � 64% perf-profile.children.cycles-pp.rep_stos_alternative
0.31 � 42% -0.2 0.06 � 88% perf-profile.children.cycles-pp.quiet_vmstat
0.34 � 6% -0.2 0.10 � 22% perf-profile.children.cycles-pp.record__mmap_read_evlist
0.31 � 44% -0.2 0.07 � 98% perf-profile.children.cycles-pp.mas_wr_bnode
0.30 � 48% -0.2 0.06 � 90% perf-profile.children.cycles-pp.mas_split
0.28 � 40% -0.2 0.04 � 73% perf-profile.children.cycles-pp.folio_add_file_rmap_ptes
0.32 � 22% -0.2 0.08 � 41% perf-profile.children.cycles-pp.shmem_file_write_iter
0.40 � 28% -0.2 0.16 � 27% perf-profile.children.cycles-pp.ct_idle_exit
0.45 � 30% -0.2 0.21 � 13% perf-profile.children.cycles-pp.open_last_lookups
0.34 � 24% -0.2 0.11 � 55% perf-profile.children.cycles-pp.__x64_sys_munmap
0.30 � 34% -0.2 0.07 � 64% perf-profile.children.cycles-pp.vms_complete_munmap_vmas
0.31 � 34% -0.2 0.08 � 20% perf-profile.children.cycles-pp.__do_wait
0.28 � 32% -0.2 0.06 � 76% perf-profile.children.cycles-pp.wake_up_q
0.31 � 22% -0.2 0.08 � 41% perf-profile.children.cycles-pp.generic_perform_write
0.30 � 33% -0.2 0.08 � 18% perf-profile.children.cycles-pp.rb_next
0.36 � 33% -0.2 0.14 � 29% perf-profile.children.cycles-pp.tsc_verify_tsc_adjust
0.28 � 19% -0.2 0.06 � 55% perf-profile.children.cycles-pp.__perf_event_read_value
0.30 � 31% -0.2 0.08 � 51% perf-profile.children.cycles-pp.fdget_pos
0.36 � 30% -0.2 0.13 � 8% perf-profile.children.cycles-pp.update_irq_load_avg
0.28 � 35% -0.2 0.06 �134% perf-profile.children.cycles-pp.kmem_cache_alloc_lru_noprof
0.37 � 35% -0.2 0.15 � 27% perf-profile.children.cycles-pp.arch_cpu_idle_enter
0.28 � 28% -0.2 0.07 � 77% perf-profile.children.cycles-pp.vma_modify
0.28 � 28% -0.2 0.07 � 77% perf-profile.children.cycles-pp.vma_modify_flags
0.28 � 38% -0.2 0.07 � 50% perf-profile.children.cycles-pp.__hrtimer_next_event_base
0.27 � 39% -0.2 0.06 � 51% perf-profile.children.cycles-pp.wait_task_zombie
0.28 � 43% -0.2 0.07 � 77% perf-profile.children.cycles-pp.dev_attr_show
0.28 � 43% -0.2 0.07 � 77% perf-profile.children.cycles-pp.sysfs_kf_seq_show
0.29 � 44% -0.2 0.08 � 30% perf-profile.children.cycles-pp.alloc_anon_folio
0.27 � 14% -0.2 0.06 � 76% perf-profile.children.cycles-pp.writen
0.71 � 16% -0.2 0.50 � 13% perf-profile.children.cycles-pp.enqueue_entity
0.26 � 56% -0.2 0.06 � 14% perf-profile.children.cycles-pp.tick_check_oneshot_broadcast_this_cpu
0.32 � 41% -0.2 0.12 � 44% perf-profile.children.cycles-pp.load_elf_interp
0.26 � 15% -0.2 0.06 � 78% perf-profile.children.cycles-pp.record__pushfn
0.23 � 36% -0.2 0.03 �111% perf-profile.children.cycles-pp.error_entry
0.34 � 24% -0.2 0.14 � 27% perf-profile.children.cycles-pp.ct_kernel_enter
0.25 � 31% -0.2 0.05 � 76% perf-profile.children.cycles-pp.lock_vma_under_rcu
0.38 � 30% -0.2 0.18 � 32% perf-profile.children.cycles-pp.rcu_gp_fqs_loop
0.27 � 37% -0.2 0.07 � 27% perf-profile.children.cycles-pp.update_other_load_avgs
0.25 � 25% -0.2 0.06 � 51% perf-profile.children.cycles-pp.mas_find
0.25 � 34% -0.2 0.06 � 97% perf-profile.children.cycles-pp.perf_event_task_tick
0.28 � 31% -0.2 0.10 � 62% perf-profile.children.cycles-pp.switch_mm_irqs_off
0.32 � 29% -0.2 0.14 � 28% perf-profile.children.cycles-pp.should_we_balance
0.23 � 41% -0.2 0.05 �113% perf-profile.children.cycles-pp.folio_batch_move_lru
0.21 � 22% -0.2 0.03 �111% perf-profile.children.cycles-pp.tmigr_cpu_activate
0.26 � 41% -0.2 0.08 �100% perf-profile.children.cycles-pp.get_jiffies_update
0.21 � 50% -0.2 0.03 �103% perf-profile.children.cycles-pp.lru_add_drain
0.26 � 23% -0.2 0.09 � 24% perf-profile.children.cycles-pp.get_cpu_device
0.22 � 43% -0.2 0.04 � 73% perf-profile.children.cycles-pp.unlink_anon_vmas
0.21 � 20% -0.2 0.04 �111% perf-profile.children.cycles-pp.sclhi
0.21 � 48% -0.2 0.04 �118% perf-profile.children.cycles-pp.check_cpu_stall
0.20 � 25% -0.2 0.03 �101% perf-profile.children.cycles-pp.irqtime_account_process_tick
0.26 � 31% -0.2 0.09 � 43% perf-profile.children.cycles-pp.__percpu_counter_sum
0.20 � 37% -0.2 0.04 �118% perf-profile.children.cycles-pp.perf_iterate_sb
0.21 � 60% -0.2 0.05 �114% perf-profile.children.cycles-pp.__get_unmapped_area
0.55 � 17% -0.2 0.38 � 10% perf-profile.children.cycles-pp.sched_clock_cpu
0.22 � 31% -0.2 0.06 � 68% perf-profile.children.cycles-pp.__do_fault
0.22 � 37% -0.2 0.07 � 94% perf-profile.children.cycles-pp.irqentry_enter
0.20 � 63% -0.2 0.05 �114% perf-profile.children.cycles-pp.arch_get_unmapped_area_topdown
0.22 � 44% -0.2 0.06 � 49% perf-profile.children.cycles-pp.obj_cgroup_charge
0.21 � 35% -0.2 0.06 �125% perf-profile.children.cycles-pp.force_qs_rnp
0.33 � 16% -0.1 0.18 � 19% perf-profile.children.cycles-pp.__remove_hrtimer
0.19 � 37% -0.1 0.04 �116% perf-profile.children.cycles-pp.flush_tlb_mm_range
0.18 � 64% -0.1 0.03 �103% perf-profile.children.cycles-pp.__anon_vma_prepare
0.20 � 37% -0.1 0.06 � 76% perf-profile.children.cycles-pp.mas_walk
0.19 � 49% -0.1 0.05 � 51% perf-profile.children.cycles-pp.release_task
0.18 � 27% -0.1 0.05 � 80% perf-profile.children.cycles-pp.arch_scale_cpu_capacity
0.22 � 30% -0.1 0.09 � 48% perf-profile.children.cycles-pp.arch_scale_freq_tick
0.25 � 33% -0.1 0.12 � 17% perf-profile.children.cycles-pp.mutex_unlock
0.16 � 38% -0.1 0.03 �103% perf-profile.children.cycles-pp.vm_area_dup
0.22 � 27% -0.1 0.10 � 31% perf-profile.children.cycles-pp.__get_user_8
0.23 � 21% -0.1 0.11 � 12% perf-profile.children.cycles-pp.up_write
0.16 � 24% -0.1 0.06 � 48% perf-profile.children.cycles-pp.cpuidle_not_available
0.14 � 19% -0.1 0.05 � 76% perf-profile.children.cycles-pp.percpu_counter_add_batch
0.12 � 51% -0.1 0.03 �100% perf-profile.children.cycles-pp.shmem_get_folio_gfp
0.12 � 48% -0.1 0.04 � 75% perf-profile.children.cycles-pp.rcu_nocb_flush_deferred_wakeup
0.10 � 45% -0.1 0.04 �106% perf-profile.children.cycles-pp.free_unref_page
0.04 � 70% +0.0 0.08 � 20% perf-profile.children.cycles-pp.fdget
0.02 �142% +0.1 0.07 � 24% perf-profile.children.cycles-pp.security_inode_getattr
0.02 �141% +0.1 0.08 � 14% perf-profile.children.cycles-pp.mntput_no_expire
0.01 �223% +0.1 0.06 � 24% perf-profile.children.cycles-pp.path_parentat
0.00 +0.1 0.06 � 15% perf-profile.children.cycles-pp.fsp_get_pathref_fd
0.02 �141% +0.1 0.08 � 27% perf-profile.children.cycles-pp.check_stack_object
0.01 �223% +0.1 0.07 � 23% perf-profile.children.cycles-pp.__filename_parentat
0.00 +0.1 0.07 � 22% perf-profile.children.cycles-pp.openat_pathref_dirfsp_nosymlink
0.00 +0.1 0.07 � 28% perf-profile.children.cycles-pp.rep_memset_s
0.00 +0.1 0.07 � 28% perf-profile.children.cycles-pp.allocate_buffers
0.00 +0.1 0.07 � 28% perf-profile.children.cycles-pp.d_hash_and_lookup
0.00 +0.1 0.07 � 28% perf-profile.children.cycles-pp.dequeue_mid
0.00 +0.1 0.07 � 21% perf-profile.children.cycles-pp.iov_buf
0.00 +0.1 0.07 � 24% perf-profile.children.cycles-pp.ndr_pull_xattr_DosInfo
0.00 +0.1 0.07 � 20% perf-profile.children.cycles-pp.cifs_d_revalidate
0.07 � 61% +0.1 0.14 � 32% perf-profile.children.cycles-pp.filp_flush
0.00 +0.1 0.07 � 23% perf-profile.children.cycles-pp.next_codepoint
0.00 +0.1 0.07 � 23% perf-profile.children.cycles-pp.talloc_strdup
0.00 +0.1 0.08 � 25% perf-profile.children.cycles-pp._tevent_loop_once
0.01 �223% +0.1 0.08 � 14% perf-profile.children.cycles-pp.security_inode_permission
0.00 +0.1 0.08 � 24% perf-profile.children.cycles-pp.__tls_get_addr
0.03 �150% +0.1 0.10 � 29% perf-profile.children.cycles-pp.entry_SYSCALL_64_safe_stack
0.00 +0.1 0.08 � 35% perf-profile.children.cycles-pp._talloc_set_destructor@plt
0.00 +0.1 0.08 � 20% perf-profile.children.cycles-pp.btrfs_cow_block
0.00 +0.1 0.08 � 20% perf-profile.children.cycles-pp.btrfs_force_cow_block
0.00 +0.1 0.08 � 31% perf-profile.children.cycles-pp.filename_convert_dirfsp
0.00 +0.1 0.08 � 27% perf-profile.children.cycles-pp._talloc_steal_loc
0.00 +0.1 0.08 � 25% perf-profile.children.cycles-pp.remove_smb2_chained_fsp
0.00 +0.1 0.08 � 34% perf-profile.children.cycles-pp.ndr_push_uint16
0.00 +0.1 0.08 � 32% perf-profile.children.cycles-pp.messaging_server_id
0.02 �141% +0.1 0.10 � 25% perf-profile.children.cycles-pp.__errno_location
0.00 +0.1 0.08 � 37% perf-profile.children.cycles-pp.talloc_named_const
0.00 +0.1 0.09 � 18% perf-profile.children.cycles-pp._raw_read_lock_irqsave
0.02 �142% +0.1 0.11 � 22% perf-profile.children.cycles-pp.cpus_share_cache
0.01 �223% +0.1 0.10 � 20% perf-profile.children.cycles-pp.list_lru_del_obj
0.00 +0.1 0.09 � 33% perf-profile.children.cycles-pp.cifs_handle_standard
0.00 +0.1 0.09 � 24% perf-profile.children.cycles-pp.evict_refill_and_join
0.00 +0.1 0.09 � 25% perf-profile.children.cycles-pp.readdir64
0.00 +0.1 0.09 � 34% perf-profile.children.cycles-pp.cifs_compound_callback
0.00 +0.1 0.09 � 28% perf-profile.children.cycles-pp.task_dump_owner
0.00 +0.1 0.10 � 24% perf-profile.children.cycles-pp.getgroups
0.00 +0.1 0.10 � 23% perf-profile.children.cycles-pp.inode_get_bytes
0.00 +0.1 0.10 � 27% perf-profile.children.cycles-pp.cifs_small_buf_get
0.00 +0.1 0.10 � 34% perf-profile.children.cycles-pp.tcp_current_mss
0.04 � 71% +0.1 0.14 � 27% perf-profile.children.cycles-pp.tick_nohz_idle_enter
0.00 +0.1 0.10 � 47% perf-profile.children.cycles-pp.unlock_up
0.01 �223% +0.1 0.11 � 13% perf-profile.children.cycles-pp.d_lru_del
0.00 +0.1 0.10 � 19% perf-profile.children.cycles-pp.btrfs_tree_read_lock_nested
0.00 +0.1 0.10 � 21% perf-profile.children.cycles-pp.mem_cgroup_uncharge_skmem
0.03 �152% +0.1 0.13 � 32% perf-profile.children.cycles-pp.__mod_timer
0.02 �142% +0.1 0.12 � 48% perf-profile.children.cycles-pp.putname
0.00 +0.1 0.10 � 27% perf-profile.children.cycles-pp._talloc_get_type_abort@plt
0.01 �223% +0.1 0.11 � 31% perf-profile.children.cycles-pp.generic_fillattr
0.00 +0.1 0.10 � 34% perf-profile.children.cycles-pp.smbd_smb2_request_process_query_directory
0.00 +0.1 0.10 � 35% perf-profile.children.cycles-pp.__skb_clone
0.00 +0.1 0.10 � 50% perf-profile.children.cycles-pp.btrfs_destroy_inode
0.00 +0.1 0.11 � 20% perf-profile.children.cycles-pp.ndr_pull_align
0.00 +0.1 0.11 � 23% perf-profile.children.cycles-pp.release_extent_buffer
0.00 +0.1 0.11 � 20% perf-profile.children.cycles-pp.tcp_schedule_loss_probe
0.00 +0.1 0.11 � 13% perf-profile.children.cycles-pp.vfs_stat_fsp
0.00 +0.1 0.11 � 26% perf-profile.children.cycles-pp.__sk_mem_reduce_allocated
0.00 +0.1 0.11 � 47% perf-profile.children.cycles-pp.btrfs_delete_delayed_dir_index
0.00 +0.1 0.11 � 35% perf-profile.children.cycles-pp.inet6_csk_route_socket
0.00 +0.1 0.11 � 32% perf-profile.children.cycles-pp.alloc_skb_with_frags
0.00 +0.1 0.11 � 34% perf-profile.children.cycles-pp.ndr_pull_uint32
0.00 +0.1 0.11 � 25% perf-profile.children.cycles-pp.wake_affine
0.00 +0.1 0.11 � 21% perf-profile.children.cycles-pp.memset@plt
0.00 +0.1 0.11 � 32% perf-profile.children.cycles-pp.tid_fd_revalidate
0.09 � 76% +0.1 0.20 � 15% perf-profile.children.cycles-pp.__legitimize_mnt
0.00 +0.1 0.11 � 22% perf-profile.children.cycles-pp.btrfs_opendir
0.00 +0.1 0.12 � 33% perf-profile.children.cycles-pp.next_codepoint_handle_ext
0.05 � 84% +0.1 0.16 � 33% perf-profile.children.cycles-pp.vfs_getattr_nosec
0.00 +0.1 0.12 � 29% perf-profile.children.cycles-pp.synthetic_smb_fname
0.00 +0.1 0.12 � 37% perf-profile.children.cycles-pp.tcp_check_space
0.00 +0.1 0.12 � 29% perf-profile.children.cycles-pp.convert_string_error_handle
0.00 +0.1 0.12 � 23% perf-profile.children.cycles-pp.free_extent_buffer
0.00 +0.1 0.12 � 15% perf-profile.children.cycles-pp.__kfree_skb
0.00 +0.1 0.12 � 34% perf-profile.children.cycles-pp.tcp_send_mss
0.00 +0.1 0.12 � 38% perf-profile.children.cycles-pp.pid_revalidate
0.06 � 81% +0.1 0.18 � 31% perf-profile.children.cycles-pp.generic_permission
0.00 +0.1 0.12 � 54% perf-profile.children.cycles-pp.vfs_getxattr
0.07 � 57% +0.1 0.19 � 29% perf-profile.children.cycles-pp.__kmalloc_cache_noprof
0.00 +0.1 0.12 � 43% perf-profile.children.cycles-pp.__build_path_from_dentry_optional_prefix
0.00 +0.1 0.12 � 17% perf-profile.children.cycles-pp.btrfs_read_lock_root_node
0.01 �223% +0.1 0.13 � 37% perf-profile.children.cycles-pp.fdget_raw
0.00 +0.1 0.12 � 27% perf-profile.children.cycles-pp.messaging_send_iov_from
0.00 +0.1 0.12 � 40% perf-profile.children.cycles-pp.next_codepoint_handle
0.00 +0.1 0.12 � 25% perf-profile.children.cycles-pp.smbd_dirptr_get_entry
0.00 +0.1 0.13 � 51% perf-profile.children.cycles-pp.init_stat_ex_from_stat
0.00 +0.1 0.13 � 33% perf-profile.children.cycles-pp.SMB2_open_init
0.00 +0.1 0.13 � 24% perf-profile.children.cycles-pp.btrfs_get_16
0.00 +0.1 0.13 � 27% perf-profile.children.cycles-pp.utf8_to_utf32
0.00 +0.1 0.13 � 24% perf-profile.children.cycles-pp.__btrfs_release_delayed_node
0.00 +0.1 0.13 � 17% perf-profile.children.cycles-pp.btrfs_get_32
0.00 +0.1 0.13 � 29% perf-profile.children.cycles-pp.smb2_setup_request
0.00 +0.1 0.13 � 36% perf-profile.children.cycles-pp.sock_alloc_send_pskb
0.00 +0.1 0.13 � 26% perf-profile.children.cycles-pp.__btrfs_end_transaction
0.00 +0.1 0.13 � 38% perf-profile.children.cycles-pp.sk_reset_timer
0.00 +0.1 0.13 � 25% perf-profile.children.cycles-pp.skb_page_frag_refill
0.00 +0.1 0.14 � 45% perf-profile.children.cycles-pp.btrfs_del_orphan_item
0.00 +0.1 0.14 � 26% perf-profile.children.cycles-pp.getegid
0.00 +0.1 0.14 � 35% perf-profile.children.cycles-pp.path_put
0.00 +0.1 0.14 � 23% perf-profile.children.cycles-pp.proc_fd_link
0.00 +0.1 0.14 � 23% perf-profile.children.cycles-pp.__smb2_plain_req_init
0.00 +0.1 0.14 � 15% perf-profile.children.cycles-pp._talloc_array
0.00 +0.1 0.14 � 35% perf-profile.children.cycles-pp.smb2_reconnect
0.00 +0.1 0.14 � 27% perf-profile.children.cycles-pp.mem_cgroup_charge_skmem
0.00 +0.1 0.14 � 23% perf-profile.children.cycles-pp.sk_page_frag_refill
0.00 +0.1 0.14 � 25% perf-profile.children.cycles-pp._talloc_memdup
0.00 +0.1 0.14 � 19% perf-profile.children.cycles-pp.btrfs_lookup_inode
0.00 +0.1 0.14 � 7% perf-profile.children.cycles-pp.file_free
0.00 +0.1 0.15 � 19% perf-profile.children.cycles-pp.__smb2_find_mid
0.00 +0.1 0.15 � 25% perf-profile.children.cycles-pp.ndr_pull_udlong
0.00 +0.1 0.15 � 37% perf-profile.children.cycles-pp.ndr_push_udlong
0.00 +0.1 0.15 � 26% perf-profile.children.cycles-pp.smbd_smb2_request_done_ex
0.00 +0.1 0.15 � 23% perf-profile.children.cycles-pp.close_file_smb
0.00 +0.2 0.15 � 32% perf-profile.children.cycles-pp.__do_sys_getcwd
0.00 +0.2 0.15 � 23% perf-profile.children.cycles-pp._nettle_chacha_core
0.00 +0.2 0.15 � 31% perf-profile.children.cycles-pp.ndr_push_uint8
0.10 � 69% +0.2 0.25 � 28% perf-profile.children.cycles-pp.cfree
0.00 +0.2 0.16 � 20% perf-profile.children.cycles-pp.cifs_prime_dcache
0.00 +0.2 0.16 � 24% perf-profile.children.cycles-pp.smbd_smb2_request_process_create
0.07 � 55% +0.2 0.22 � 38% perf-profile.children.cycles-pp.call_function_single_prep_ipi
0.00 +0.2 0.16 � 17% perf-profile.children.cycles-pp.tcp_event_new_data_sent
0.00 +0.2 0.16 � 13% perf-profile.children.cycles-pp.tdb_parse_record
0.14 � 47% +0.2 0.30 � 31% perf-profile.children.cycles-pp.__smp_call_single_queue
0.02 �141% +0.2 0.18 � 28% perf-profile.children.cycles-pp.destroy_inode
0.00 +0.2 0.16 � 20% perf-profile.children.cycles-pp._talloc_set_destructor
0.00 +0.2 0.16 � 14% perf-profile.children.cycles-pp.try_to_unlazy_next
0.00 +0.2 0.16 � 33% perf-profile.children.cycles-pp.ndr_push_expand
0.00 +0.2 0.17 � 35% perf-profile.children.cycles-pp.__import_iovec
0.00 +0.2 0.17 � 28% perf-profile.children.cycles-pp._talloc_pooled_object
0.00 +0.2 0.17 � 28% perf-profile.children.cycles-pp.btrfs_delayed_update_inode
0.04 �115% +0.2 0.20 � 14% perf-profile.children.cycles-pp.select_idle_sibling
0.11 � 56% +0.2 0.27 � 20% perf-profile.children.cycles-pp.llist_reverse_order
0.00 +0.2 0.17 � 30% perf-profile.children.cycles-pp._talloc_tos
0.00 +0.2 0.17 � 19% perf-profile.children.cycles-pp.btrfs_lookup_dir_item
0.12 � 70% +0.2 0.29 � 16% perf-profile.children.cycles-pp.path_init
0.03 �150% +0.2 0.20 � 17% perf-profile.children.cycles-pp.__radix_tree_lookup
0.00 +0.2 0.17 � 18% perf-profile.children.cycles-pp.__unix_dgram_recvmsg
0.00 +0.2 0.17 � 17% perf-profile.children.cycles-pp.available_idle_cpu
0.00 +0.2 0.17 � 44% perf-profile.children.cycles-pp.smbd_dirptr_lanman2_entry
0.00 +0.2 0.17 � 29% perf-profile.children.cycles-pp.btrfs_match_dir_item_name
0.01 �223% +0.2 0.18 � 34% perf-profile.children.cycles-pp.memcpy@plt
0.00 +0.2 0.18 � 25% perf-profile.children.cycles-pp.geteuid
0.00 +0.2 0.18 � 36% perf-profile.children.cycles-pp.import_iovec
0.00 +0.2 0.18 � 18% perf-profile.children.cycles-pp._talloc_zero
0.00 +0.2 0.18 � 22% perf-profile.children.cycles-pp.cp_smb_filename
0.00 +0.2 0.18 � 55% perf-profile.children.cycles-pp.napi_consume_skb
0.00 +0.2 0.18 � 41% perf-profile.children.cycles-pp.wait_for_xmitr
0.00 +0.2 0.18 � 31% perf-profile.children.cycles-pp.loopback_xmit
0.00 +0.2 0.19 � 19% perf-profile.children.cycles-pp.skb_attempt_defer_free
0.00 +0.2 0.19 � 34% perf-profile.children.cycles-pp.dev_hard_start_xmit
0.00 +0.2 0.19 � 41% perf-profile.children.cycles-pp.tcp_rcv_space_adjust
0.15 � 18% +0.2 0.35 � 20% perf-profile.children.cycles-pp.user_path_at
0.08 �104% +0.2 0.27 � 16% perf-profile.children.cycles-pp.rcu_all_qs
0.00 +0.2 0.20 � 33% perf-profile.children.cycles-pp.ndr_push_uint32
0.02 �142% +0.2 0.22 � 26% perf-profile.children.cycles-pp.sprintf
0.00 +0.2 0.20 � 21% perf-profile.children.cycles-pp.read_extent_buffer
0.00 +0.2 0.20 � 47% perf-profile.children.cycles-pp.memmove_extent_buffer
0.27 � 42% +0.2 0.48 � 13% perf-profile.children.cycles-pp.select_task_rq
0.00 +0.2 0.20 � 21% perf-profile.children.cycles-pp.btrfs_free_path
0.00 +0.2 0.20 � 7% perf-profile.children.cycles-pp.btrfs_dirty_inode
0.16 � 23% +0.2 0.38 � 31% perf-profile.children.cycles-pp.ttwu_queue_wakelist
0.00 +0.2 0.22 � 18% perf-profile.children.cycles-pp.cifs_filldir
0.00 +0.2 0.22 � 28% perf-profile.children.cycles-pp.lock_sock_nested
0.00 +0.2 0.22 � 23% perf-profile.children.cycles-pp.btrfs_update_inode
0.00 +0.2 0.22 � 25% perf-profile.children.cycles-pp.debuglevel_get_class@plt
0.00 +0.2 0.23 � 27% perf-profile.children.cycles-pp.btrfs_insert_empty_items
0.00 +0.2 0.23 � 19% perf-profile.children.cycles-pp.btrfs_set_token_32
0.00 +0.2 0.23 � 32% perf-profile.children.cycles-pp.fgetxattr
0.00 +0.2 0.24 � 14% perf-profile.children.cycles-pp.find_extent_buffer_nolock
0.00 +0.2 0.24 � 24% perf-profile.children.cycles-pp.__alloc_skb
0.00 +0.2 0.24 � 24% perf-profile.children.cycles-pp.tevent_common_invoke_fd_handler
0.08 � 57% +0.2 0.32 � 20% perf-profile.children.cycles-pp._copy_to_user
0.00 +0.2 0.24 � 23% perf-profile.children.cycles-pp.btrfs_get_token_32
0.00 +0.2 0.24 � 32% perf-profile.children.cycles-pp.sock_poll
0.00 +0.2 0.24 � 29% perf-profile.children.cycles-pp.getcwd
0.00 +0.3 0.25 � 13% perf-profile.children.cycles-pp.__libc_fcntl64
0.06 �115% +0.3 0.31 � 16% perf-profile.children.cycles-pp.complete_walk
0.07 �108% +0.3 0.32 � 14% perf-profile.children.cycles-pp.vfs_fstat
0.00 +0.3 0.26 � 11% perf-profile.children.cycles-pp.cifsConvertToUTF16
0.00 +0.3 0.26 � 17% perf-profile.children.cycles-pp.start_transaction
0.00 +0.3 0.26 � 14% perf-profile.children.cycles-pp.__inet6_lookup_established
0.04 �165% +0.3 0.30 � 11% perf-profile.children.cycles-pp._copy_from_iter
0.00 +0.3 0.26 � 24% perf-profile.children.cycles-pp.messaging_send_iov
0.04 �115% +0.3 0.30 � 21% perf-profile.children.cycles-pp.proc_self_get_link
0.00 +0.3 0.26 � 19% perf-profile.children.cycles-pp.release_sock
0.00 +0.3 0.26 � 22% perf-profile.children.cycles-pp.proc_pid_get_link
0.00 +0.3 0.27 � 29% perf-profile.children.cycles-pp.btrfs_insert_orphan_item
0.00 +0.3 0.27 � 18% perf-profile.children.cycles-pp.simple_copy_to_iter
0.00 +0.3 0.28 � 33% perf-profile.children.cycles-pp.skb_release_data
0.00 +0.3 0.28 � 16% perf-profile.children.cycles-pp.__inet6_lookup_skb
0.00 +0.3 0.28 � 29% perf-profile.children.cycles-pp.btrfs_orphan_add
0.00 +0.3 0.28 � 24% perf-profile.children.cycles-pp._talloc_get_type_abort
0.00 +0.3 0.28 � 20% perf-profile.children.cycles-pp.btrfs_release_path
0.29 � 29% +0.3 0.57 � 17% perf-profile.children.cycles-pp.check_heap_object
0.00 +0.3 0.30 � 31% perf-profile.children.cycles-pp.copy_msghdr_from_user
0.00 +0.3 0.30 � 16% perf-profile.children.cycles-pp.smbd_smb2_request_dispatch
0.00 +0.3 0.30 � 12% perf-profile.children.cycles-pp.skb_do_copy_data_nocache
0.00 +0.3 0.31 � 17% perf-profile.children.cycles-pp.posix_lock_inode
0.00 +0.3 0.31 � 29% perf-profile.children.cycles-pp.tcp_stream_alloc_skb
0.00 +0.3 0.31 � 29% perf-profile.children.cycles-pp.__do_sys_setgroups
0.00 +0.3 0.32 � 26% perf-profile.children.cycles-pp._talloc_free
0.00 +0.3 0.32 � 14% perf-profile.children.cycles-pp.btrfs_getattr
0.40 � 41% +0.3 0.73 � 9% perf-profile.children.cycles-pp.__d_lookup_rcu
0.25 � 51% +0.3 0.58 � 13% perf-profile.children.cycles-pp.schedule_timeout
0.04 �109% +0.3 0.37 � 26% perf-profile.children.cycles-pp.__x64_sys_chdir
0.00 +0.3 0.34 � 16% perf-profile.children.cycles-pp.find_extent_buffer
0.08 � 66% +0.3 0.43 � 34% perf-profile.children.cycles-pp.poll_idle
0.17 � 45% +0.3 0.52 � 9% perf-profile.children.cycles-pp.inode_permission
0.00 +0.3 0.35 � 30% perf-profile.children.cycles-pp.ep_item_poll
0.02 �142% +0.3 0.37 � 24% perf-profile.children.cycles-pp.cp_new_stat
0.01 �223% +0.4 0.36 � 12% perf-profile.children.cycles-pp.vfs_statx_path
0.10 � 93% +0.4 0.45 � 21% perf-profile.children.cycles-pp.entry_SYSRETQ_unsafe_stack
0.00 +0.4 0.37 � 24% perf-profile.children.cycles-pp.tdb_jenkins_hash
0.28 � 34% +0.4 0.66 � 9% perf-profile.children.cycles-pp.malloc
0.00 +0.4 0.40 � 31% perf-profile.children.cycles-pp.btrfs_bin_search
0.00 +0.4 0.42 � 29% perf-profile.children.cycles-pp.memcpy_extent_buffer
0.00 +0.4 0.43 � 17% perf-profile.children.cycles-pp._raw_spin_lock_bh
0.00 +0.4 0.44 � 14% perf-profile.children.cycles-pp.fcntl_setlk
0.01 �223% +0.4 0.45 � 17% perf-profile.children.cycles-pp.ep_autoremove_wake_function
0.00 +0.4 0.45 � 16% perf-profile.children.cycles-pp.debuglevel_get_class
0.44 � 27% +0.5 0.90 � 10% perf-profile.children.cycles-pp.__check_object_size
0.00 +0.5 0.46 � 22% perf-profile.children.cycles-pp.tcp_clean_rtx_queue
0.00 +0.5 0.47 � 16% perf-profile.children.cycles-pp.cifs_strndup_to_utf16
0.00 +0.5 0.48 � 16% perf-profile.children.cycles-pp.cifs_convert_path_to_utf16
0.00 +0.5 0.48 � 24% perf-profile.children.cycles-pp.unix_dgram_sendmsg
0.29 � 42% +0.5 0.77 � 11% perf-profile.children.cycles-pp.strncpy_from_user
0.00 +0.5 0.49 � 21% perf-profile.children.cycles-pp.btrfs_truncate_inode_items
0.00 +0.5 0.50 � 12% perf-profile.children.cycles-pp.do_fcntl
0.00 +0.5 0.50 � 17% perf-profile.children.cycles-pp.wait_woken
0.00 +0.5 0.50 � 15% perf-profile.children.cycles-pp.btrfs_listxattr
0.00 +0.5 0.51 � 21% perf-profile.children.cycles-pp.standard_receive3
0.00 +0.5 0.52 � 22% perf-profile.children.cycles-pp.chdir
0.19 � 26% +0.5 0.71 � 15% perf-profile.children.cycles-pp.entry_SYSCALL_64
0.82 � 29% +0.5 1.35 � 12% perf-profile.children.cycles-pp.try_to_block_task
0.00 +0.5 0.54 � 14% perf-profile.children.cycles-pp.__wake_up_sync
0.00 +0.5 0.54 � 21% perf-profile.children.cycles-pp.__do_sys_openat2
0.02 �223% +0.6 0.57 � 14% perf-profile.children.cycles-pp.__x64_sys_fcntl
0.00 +0.6 0.58 � 25% perf-profile.children.cycles-pp.read_block_for_search
0.00 +0.6 0.60 � 13% perf-profile.children.cycles-pp.__memmove
0.00 +0.6 0.60 � 26% perf-profile.children.cycles-pp.ep_send_events
0.00 +0.6 0.61 � 20% perf-profile.children.cycles-pp.btrfs_real_readdir
0.35 � 31% +0.6 0.98 � 16% perf-profile.children.cycles-pp.clear_bhb_loop
0.00 +0.6 0.64 � 26% perf-profile.children.cycles-pp.__write_extent_buffer
0.70 � 26% +0.6 1.34 � 5% perf-profile.children.cycles-pp.lookup_fast
0.00 +0.6 0.65 � 12% perf-profile.children.cycles-pp.__btrfs_update_delayed_inode
0.40 � 34% +0.7 1.05 � 9% perf-profile.children.cycles-pp.getname_flags
0.56 � 34% +0.7 1.23 � 5% perf-profile.children.cycles-pp.step_into
0.00 +0.7 0.67 � 16% perf-profile.children.cycles-pp.sk_wait_data
0.01 �223% +0.7 0.68 � 10% perf-profile.children.cycles-pp.ep_poll_callback
0.00 +0.7 0.70 � 21% perf-profile.children.cycles-pp.tcp_ack
0.00 +0.7 0.72 � 20% perf-profile.children.cycles-pp.wait_for_response
0.00 +0.7 0.72 � 37% perf-profile.children.cycles-pp.devkmsg_emit
0.00 +0.7 0.72 � 37% perf-profile.children.cycles-pp.devkmsg_write
0.18 � 50% +0.7 0.92 � 10% perf-profile.children.cycles-pp.pick_link
0.00 +0.7 0.74 � 13% perf-profile.children.cycles-pp.sock_sendmsg
0.00 +0.8 0.75 � 12% perf-profile.children.cycles-pp.btrfs_commit_inode_delayed_inode
0.00 +0.8 0.75 � 13% perf-profile.children.cycles-pp.smb_send_kvec
0.00 +0.8 0.78 � 13% perf-profile.children.cycles-pp.__skb_datagram_iter
0.87 � 23% +0.8 1.65 � 7% perf-profile.children.cycles-pp.sched_ttwu_pending
0.00 +0.8 0.80 � 13% perf-profile.children.cycles-pp.skb_copy_datagram_iter
0.00 +0.8 0.81 � 27% perf-profile.children.cycles-pp.btrfs_lookup_xattr
0.24 � 45% +0.9 1.16 � 5% perf-profile.children.cycles-pp.__wake_up_common
1.06 � 12% +0.9 1.99 � 7% perf-profile.children.cycles-pp.__flush_smp_call_function_queue
0.25 � 31% +1.0 1.22 � 8% perf-profile.children.cycles-pp.__wake_up_sync_key
0.00 +1.0 1.03 � 12% perf-profile.children.cycles-pp.__btrfs_unlink_inode
0.54 � 35% +1.1 1.62 � 6% perf-profile.children.cycles-pp.vfs_statx
0.00 +1.1 1.08 � 25% perf-profile.children.cycles-pp.btrfs_getxattr
0.00 +1.1 1.09 � 13% perf-profile.children.cycles-pp.__SMB2_close
0.00 +1.1 1.12 � 14% perf-profile.children.cycles-pp.cifs_closedir
0.00 +1.1 1.15 � 13% perf-profile.children.cycles-pp.SMB2_query_directory
0.00 +1.2 1.16 � 23% perf-profile.children.cycles-pp.__vfs_getxattr
0.00 +1.2 1.17 � 13% perf-profile.children.cycles-pp.find_cifs_entry
0.00 +1.2 1.18 � 9% perf-profile.children.cycles-pp.____sys_recvmsg
0.00 +1.2 1.18 � 16% perf-profile.children.cycles-pp.syscall
0.00 +1.2 1.18 � 9% perf-profile.children.cycles-pp.sock_def_readable
0.00 +1.3 1.28 � 10% perf-profile.children.cycles-pp.path_listxattrat
0.00 +1.3 1.35 � 9% perf-profile.children.cycles-pp.___sys_recvmsg
0.00 +1.4 1.38 � 8% perf-profile.children.cycles-pp.btrfs_del_items
0.00 +1.4 1.39 � 8% perf-profile.children.cycles-pp.__sys_recvmsg
0.02 �141% +1.4 1.43 � 26% perf-profile.children.cycles-pp.schedule_hrtimeout_range
0.12 � 63% +1.5 1.63 � 10% perf-profile.children.cycles-pp.__close_nocancel
0.00 +1.5 1.53 � 21% perf-profile.children.cycles-pp.do_getxattr
0.67 � 34% +1.6 2.22 � 5% perf-profile.children.cycles-pp.vfs_fstatat
0.00 +1.6 1.57 � 10% perf-profile.children.cycles-pp.smb2_query_dir_first
0.00 +1.6 1.59 � 10% perf-profile.children.cycles-pp._initiate_cifs_search
0.00 +1.6 1.61 � 10% perf-profile.children.cycles-pp.recvmsg
0.00 +1.6 1.63 � 18% perf-profile.children.cycles-pp.btrfs_search_slot
0.00 +1.7 1.66 � 13% perf-profile.children.cycles-pp.btrfs_rmdir
0.00 +1.7 1.73 � 8% perf-profile.children.cycles-pp.btrfs_evict_inode
0.00 +1.7 1.74 � 9% perf-profile.children.cycles-pp.smb2_rmdir
0.00 +1.8 1.76 � 10% perf-profile.children.cycles-pp.smb2_compound_op
0.00 +1.8 1.80 � 10% perf-profile.children.cycles-pp.cifs_rmdir
0.00 +1.8 1.82 � 13% perf-profile.children.cycles-pp.openat64
0.02 �223% +1.9 1.89 � 8% perf-profile.children.cycles-pp.evict
0.00 +1.9 1.91 � 14% perf-profile.children.cycles-pp.cifs_readv_from_socket
0.26 � 73% +1.9 2.18 � 7% perf-profile.children.cycles-pp.__dentry_kill
0.00 +2.0 1.95 � 14% perf-profile.children.cycles-pp.cifs_read_from_socket
0.00 +2.0 1.99 � 11% perf-profile.children.cycles-pp.listxattr
0.00 +2.1 2.06 � 12% perf-profile.children.cycles-pp.cifs_send_recv
0.00 +2.1 2.14 � 12% perf-profile.children.cycles-pp.tcp_rcv_established
0.00 +2.2 2.15 � 12% perf-profile.children.cycles-pp.tcp_v6_do_rcv
0.76 � 30% +2.2 2.93 � 7% perf-profile.children.cycles-pp.__do_sys_newfstatat
0.01 �223% +2.2 2.19 � 25% perf-profile.children.cycles-pp.ep_poll
0.46 � 32% +2.2 2.65 � 6% perf-profile.children.cycles-pp.dput
0.01 �223% +2.2 2.26 � 25% perf-profile.children.cycles-pp.do_epoll_wait
0.00 +2.3 2.31 � 10% perf-profile.children.cycles-pp.tcp_sock_set_cork
0.01 �223% +2.3 2.34 � 25% perf-profile.children.cycles-pp.__x64_sys_epoll_wait
0.00 +2.4 2.36 � 13% perf-profile.children.cycles-pp.tcp_recvmsg_locked
0.00 +2.6 2.56 � 11% perf-profile.children.cycles-pp.tcp_recvmsg
0.00 +2.6 2.58 � 11% perf-profile.children.cycles-pp.inet6_recvmsg
0.00 +2.6 2.62 � 11% perf-profile.children.cycles-pp.tcp_v6_rcv
0.21 � 29% +2.7 2.89 � 8% perf-profile.children.cycles-pp.__close
0.00 +2.7 2.68 � 12% perf-profile.children.cycles-pp.ip6_protocol_deliver_rcu
0.00 +2.7 2.69 � 12% perf-profile.children.cycles-pp.ip6_input_finish
0.00 +2.7 2.72 � 14% perf-profile.children.cycles-pp.cifs_demultiplex_thread
0.74 � 34% +2.8 3.53 � 6% perf-profile.children.cycles-pp.filename_lookup
0.00 +2.8 2.79 � 10% perf-profile.children.cycles-pp.sock_recvmsg
0.00 +2.8 2.80 � 12% perf-profile.children.cycles-pp.__netif_receive_skb_one_core
0.02 �141% +2.8 2.84 � 12% perf-profile.children.cycles-pp.__napi_poll
0.00 +2.8 2.84 � 12% perf-profile.children.cycles-pp.process_backlog
0.03 �150% +2.8 2.86 � 22% perf-profile.children.cycles-pp.epoll_wait
0.00 +3.0 2.99 � 13% perf-profile.children.cycles-pp.filename_getxattr
0.00 +3.1 3.14 � 10% perf-profile.children.cycles-pp.cifs_readdir
0.74 � 33% +3.2 3.96 � 6% perf-profile.children.cycles-pp.path_lookupat
0.00 +3.3 3.26 � 10% perf-profile.children.cycles-pp.__smb_send_rqst
0.00 +3.3 3.28 � 10% perf-profile.children.cycles-pp.smb_send_rqst
0.02 �141% +3.3 3.34 � 14% perf-profile.children.cycles-pp.net_rx_action
0.00 +3.4 3.36 � 13% perf-profile.children.cycles-pp.path_getxattrat
0.27 � 29% +3.4 3.64 � 8% perf-profile.children.cycles-pp.__fput
0.00 +3.4 3.40 � 13% perf-profile.children.cycles-pp.getxattr
0.39 � 31% +3.4 3.84 � 10% perf-profile.children.cycles-pp.fstatat64
0.00 +3.6 3.61 � 14% perf-profile.children.cycles-pp.__local_bh_enable_ip
0.00 +3.8 3.80 � 10% perf-profile.children.cycles-pp.vfs_rmdir
0.26 � 29% +3.8 4.08 � 8% perf-profile.children.cycles-pp.__x64_sys_close
0.00 +3.9 3.92 � 15% perf-profile.children.cycles-pp.__dev_queue_xmit
0.00 +4.0 4.01 � 11% perf-profile.children.cycles-pp.do_rmdir
0.00 +4.0 4.02 � 16% perf-profile.children.cycles-pp.ip6_finish_output2
0.00 +4.1 4.06 � 11% perf-profile.children.cycles-pp.__x64_sys_unlinkat
0.00 +4.1 4.10 � 12% perf-profile.children.cycles-pp.iterate_dir
0.00 +4.1 4.11 � 16% perf-profile.children.cycles-pp.ip6_finish_output
0.00 +4.2 4.18 � 11% perf-profile.children.cycles-pp.__x64_sys_getdents64
0.00 +4.2 4.20 � 11% perf-profile.children.cycles-pp.unlinkat
0.00 +4.2 4.24 � 15% perf-profile.children.cycles-pp.ip6_xmit
0.00 +4.4 4.40 � 15% perf-profile.children.cycles-pp.inet6_csk_xmit
0.00 +4.4 4.42 � 15% perf-profile.children.cycles-pp.tcp_sendmsg_locked
0.00 +4.5 4.46 � 15% perf-profile.children.cycles-pp.____sys_sendmsg
0.00 +4.5 4.47 � 12% perf-profile.children.cycles-pp.getdents64
0.00 +4.5 4.54 � 10% perf-profile.children.cycles-pp.compound_send_recv
0.00 +4.6 4.62 � 15% perf-profile.children.cycles-pp.tcp_sendmsg
0.00 +4.7 4.66 � 16% perf-profile.children.cycles-pp.___sys_sendmsg
0.00 +4.7 4.70 � 17% perf-profile.children.cycles-pp.__sys_sendmsg
0.00 +4.8 4.82 � 14% perf-profile.children.cycles-pp.__tcp_transmit_skb
0.00 +4.9 4.94 � 16% perf-profile.children.cycles-pp.sendmsg
0.00 +5.4 5.36 � 13% perf-profile.children.cycles-pp.tcp_write_xmit
0.00 +5.4 5.38 � 13% perf-profile.children.cycles-pp.__tcp_push_pending_frames
30.83 � 3% +10.0 40.86 � 2% perf-profile.children.cycles-pp.do_syscall_64
30.92 � 3% +10.2 41.08 � 2% perf-profile.children.cycles-pp.entry_SYSCALL_64_after_hwframe
16.14 � 8% -3.7 12.40 � 4% perf-profile.self.cycles-pp.intel_idle
2.82 � 22% -2.0 0.86 � 30% perf-profile.self.cycles-pp.update_sg_lb_stats
1.57 � 18% -1.1 0.44 � 30% perf-profile.self.cycles-pp.cpuidle_enter_state
1.30 � 25% -1.1 0.20 � 78% perf-profile.self.cycles-pp.native_queued_spin_lock_slowpath
1.11 � 12% -0.7 0.42 � 15% perf-profile.self.cycles-pp.idle_cpu
0.92 � 24% -0.6 0.29 � 44% perf-profile.self.cycles-pp.delay_tsc
0.77 � 22% -0.5 0.24 � 50% perf-profile.self.cycles-pp.next_uptodate_folio
0.66 � 55% -0.5 0.16 � 34% perf-profile.self.cycles-pp.update_sg_wakeup_stats
0.62 � 32% -0.4 0.20 � 51% perf-profile.self.cycles-pp.native_irq_return_iret
0.52 � 17% -0.4 0.11 � 34% perf-profile.self.cycles-pp.fold_vm_zone_numa_events
0.56 � 20% -0.4 0.16 � 34% perf-profile.self.cycles-pp.vma_interval_tree_insert
0.50 � 16% -0.4 0.10 � 59% perf-profile.self.cycles-pp.filemap_map_pages
0.94 � 31% -0.4 0.58 � 9% perf-profile.self.cycles-pp.menu_select
0.41 � 27% -0.4 0.04 �100% perf-profile.self.cycles-pp.run_posix_cpu_timers
0.38 � 32% -0.3 0.04 �101% perf-profile.self.cycles-pp.read_counters
0.38 � 43% -0.3 0.05 � 75% perf-profile.self.cycles-pp.strnlen_user
0.61 � 29% -0.3 0.28 � 11% perf-profile.self.cycles-pp.update_rq_clock
0.40 � 31% -0.3 0.09 � 31% perf-profile.self.cycles-pp.lapic_next_deadline
0.36 � 17% -0.3 0.06 � 73% perf-profile.self.cycles-pp._IO_fwrite
0.39 � 29% -0.3 0.12 � 41% perf-profile.self.cycles-pp.sync_regs
0.30 � 51% -0.3 0.05 � 79% perf-profile.self.cycles-pp.evlist__id2sid
0.33 � 24% -0.2 0.09 � 35% perf-profile.self.cycles-pp.zap_present_ptes
0.30 � 33% -0.2 0.07 � 22% perf-profile.self.cycles-pp.rb_next
0.30 � 31% -0.2 0.07 � 56% perf-profile.self.cycles-pp.fdget_pos
0.38 � 30% -0.2 0.17 � 40% perf-profile.self.cycles-pp.update_load_avg
0.34 � 26% -0.2 0.13 � 44% perf-profile.self.cycles-pp._find_next_and_bit
0.29 � 23% -0.2 0.09 � 52% perf-profile.self.cycles-pp.cpu_util
0.27 � 37% -0.2 0.06 � 76% perf-profile.self.cycles-pp.tsc_verify_tsc_adjust
0.26 � 31% -0.2 0.05 � 76% perf-profile.self.cycles-pp.__hrtimer_next_event_base
0.26 � 56% -0.2 0.06 � 14% perf-profile.self.cycles-pp.tick_check_oneshot_broadcast_this_cpu
0.29 � 21% -0.2 0.10 � 20% perf-profile.self.cycles-pp.sched_balance_newidle
0.26 � 41% -0.2 0.08 �103% perf-profile.self.cycles-pp.get_jiffies_update
0.21 � 41% -0.2 0.03 �111% perf-profile.self.cycles-pp.error_entry
0.29 � 35% -0.2 0.11 � 19% perf-profile.self.cycles-pp.update_irq_load_avg
0.23 � 26% -0.2 0.06 � 87% perf-profile.self.cycles-pp.__percpu_counter_sum
0.26 � 23% -0.2 0.09 � 22% perf-profile.self.cycles-pp.get_cpu_device
0.21 � 48% -0.2 0.04 �118% perf-profile.self.cycles-pp.check_cpu_stall
0.20 � 25% -0.2 0.03 �101% perf-profile.self.cycles-pp.irqtime_account_process_tick
0.23 � 29% -0.2 0.08 � 49% perf-profile.self.cycles-pp.ct_kernel_enter
0.24 � 31% -0.2 0.09 � 50% perf-profile.self.cycles-pp.down_write
0.21 � 35% -0.1 0.06 � 81% perf-profile.self.cycles-pp.sysvec_apic_timer_interrupt
0.20 � 37% -0.1 0.06 � 74% perf-profile.self.cycles-pp.mas_walk
0.17 � 26% -0.1 0.03 �102% perf-profile.self.cycles-pp.menu_reflect
0.22 � 56% -0.1 0.08 � 33% perf-profile.self.cycles-pp._raw_spin_lock_irq
0.25 � 33% -0.1 0.12 � 16% perf-profile.self.cycles-pp.mutex_unlock
0.22 � 30% -0.1 0.09 � 48% perf-profile.self.cycles-pp.arch_scale_freq_tick
0.17 � 55% -0.1 0.05 � 79% perf-profile.self.cycles-pp.obj_cgroup_charge
0.16 � 31% -0.1 0.04 �106% perf-profile.self.cycles-pp.pick_task_fair
0.20 � 27% -0.1 0.09 � 26% perf-profile.self.cycles-pp.__get_user_8
0.15 � 32% -0.1 0.04 � 80% perf-profile.self.cycles-pp.folios_put_refs
0.16 � 24% -0.1 0.06 � 51% perf-profile.self.cycles-pp.cpuidle_not_available
0.21 � 31% -0.1 0.10 � 13% perf-profile.self.cycles-pp.up_write
0.19 � 39% -0.1 0.08 � 55% perf-profile.self.cycles-pp._nohz_idle_balance
0.12 � 48% -0.1 0.04 � 72% perf-profile.self.cycles-pp.rcu_nocb_flush_deferred_wakeup
0.12 � 20% -0.1 0.07 � 71% perf-profile.self.cycles-pp.ct_kernel_exit_state
0.04 � 70% +0.0 0.08 � 16% perf-profile.self.cycles-pp.fdget
0.02 �141% +0.1 0.07 � 26% perf-profile.self.cycles-pp.check_stack_object
0.02 �141% +0.1 0.08 � 17% perf-profile.self.cycles-pp.pick_link
0.02 �141% +0.1 0.08 � 29% perf-profile.self.cycles-pp.__errno_location
0.01 �223% +0.1 0.07 � 16% perf-profile.self.cycles-pp.mntput_no_expire
0.01 �223% +0.1 0.07 � 32% perf-profile.self.cycles-pp.schedule_idle
0.00 +0.1 0.06 � 23% perf-profile.self.cycles-pp.ndr_pull_xattr_DosInfo
0.00 +0.1 0.06 � 27% perf-profile.self.cycles-pp._tevent_loop_once
0.00 +0.1 0.07 � 30% perf-profile.self.cycles-pp.sock_poll
0.00 +0.1 0.07 � 14% perf-profile.self.cycles-pp.vfs_stat_fsp
0.01 �223% +0.1 0.08 � 33% perf-profile.self.cycles-pp.__mod_timer
0.00 +0.1 0.07 � 37% perf-profile.self.cycles-pp.tcp_schedule_loss_probe
0.00 +0.1 0.08 � 35% perf-profile.self.cycles-pp.__local_bh_enable_ip
0.00 +0.1 0.08 � 34% perf-profile.self.cycles-pp.memset@plt
0.07 � 27% +0.1 0.15 � 26% perf-profile.self.cycles-pp.__check_object_size
0.00 +0.1 0.08 � 38% perf-profile.self.cycles-pp.btrfs_del_items
0.00 +0.1 0.09 � 18% perf-profile.self.cycles-pp._raw_read_lock_irqsave
0.00 +0.1 0.09 � 24% perf-profile.self.cycles-pp.ip6_finish_output
0.00 +0.1 0.09 � 53% perf-profile.self.cycles-pp.ip6_finish_output2
0.00 +0.1 0.09 � 41% perf-profile.self.cycles-pp.ndr_pull_uint32
0.02 �142% +0.1 0.11 � 22% perf-profile.self.cycles-pp.cpus_share_cache
0.00 +0.1 0.09 � 27% perf-profile.self.cycles-pp.smbd_smb2_request_process_query_directory
0.00 +0.1 0.09 � 30% perf-profile.self.cycles-pp.__smb2_find_mid
0.00 +0.1 0.09 � 28% perf-profile.self.cycles-pp.read_extent_buffer
0.00 +0.1 0.09 � 15% perf-profile.self.cycles-pp.release_extent_buffer
0.00 +0.1 0.09 � 30% perf-profile.self.cycles-pp.synthetic_smb_fname
0.00 +0.1 0.09 � 42% perf-profile.self.cycles-pp.unlock_up
0.02 �142% +0.1 0.11 � 26% perf-profile.self.cycles-pp.lookup_fast
0.00 +0.1 0.10 � 18% perf-profile.self.cycles-pp.close_file_smb
0.02 �142% +0.1 0.11 � 45% perf-profile.self.cycles-pp.putname
0.09 � 76% +0.1 0.18 � 16% perf-profile.self.cycles-pp.__legitimize_mnt
0.00 +0.1 0.10 � 19% perf-profile.self.cycles-pp.start_transaction
0.00 +0.1 0.10 � 24% perf-profile.self.cycles-pp._talloc_get_type_abort@plt
0.00 +0.1 0.10 � 39% perf-profile.self.cycles-pp.next_codepoint_handle_ext
0.04 � 71% +0.1 0.14 � 32% perf-profile.self.cycles-pp.vfs_getattr_nosec
0.00 +0.1 0.10 � 25% perf-profile.self.cycles-pp._talloc_set_destructor
0.00 +0.1 0.10 � 40% perf-profile.self.cycles-pp.next_codepoint_handle
0.00 +0.1 0.10 � 26% perf-profile.self.cycles-pp._talloc_array
0.00 +0.1 0.11 � 32% perf-profile.self.cycles-pp._talloc_memdup
0.00 +0.1 0.11 � 27% perf-profile.self.cycles-pp.convert_string_error_handle
0.00 +0.1 0.11 � 22% perf-profile.self.cycles-pp.ip6_xmit
0.00 +0.1 0.11 � 33% perf-profile.self.cycles-pp.smbd_dirptr_get_entry
0.05 � 82% +0.1 0.16 � 31% perf-profile.self.cycles-pp.generic_permission
0.00 +0.1 0.11 � 34% perf-profile.self.cycles-pp.ndr_push_uint8
0.01 �223% +0.1 0.12 � 34% perf-profile.self.cycles-pp.fdget_raw
0.00 +0.1 0.11 � 37% perf-profile.self.cycles-pp.tcp_check_space
0.11 � 40% +0.1 0.22 � 25% perf-profile.self.cycles-pp.inode_permission
0.06 � 80% +0.1 0.17 � 43% perf-profile.self.cycles-pp.step_into
0.00 +0.1 0.12 � 33% perf-profile.self.cycles-pp.utf8_to_utf32
0.00 +0.1 0.12 � 21% perf-profile.self.cycles-pp.__smb_send_rqst
0.00 +0.1 0.12 � 30% perf-profile.self.cycles-pp.btrfs_get_16
0.00 +0.1 0.12 � 13% perf-profile.self.cycles-pp.btrfs_get_32
0.00 +0.1 0.12 � 40% perf-profile.self.cycles-pp.tcp_write_xmit
0.00 +0.1 0.12 � 30% perf-profile.self.cycles-pp._talloc_pooled_object
0.00 +0.1 0.12 � 22% perf-profile.self.cycles-pp.ndr_pull_udlong
0.00 +0.1 0.12 � 23% perf-profile.self.cycles-pp.cifsConvertToUTF16
0.01 �223% +0.1 0.14 � 34% perf-profile.self.cycles-pp.memcpy@plt
0.00 +0.1 0.13 � 22% perf-profile.self.cycles-pp.skb_page_frag_refill
0.00 +0.1 0.13 � 19% perf-profile.self.cycles-pp.btrfs_getattr
0.00 +0.1 0.13 � 39% perf-profile.self.cycles-pp.smbd_smb2_request_process_create
0.00 +0.1 0.13 � 44% perf-profile.self.cycles-pp.tcp_ack
0.00 +0.1 0.14 � 34% perf-profile.self.cycles-pp.ndr_push_expand
0.00 +0.1 0.14 � 21% perf-profile.self.cycles-pp.tdb_parse_record
0.08 � 91% +0.1 0.21 � 20% perf-profile.self.cycles-pp.try_to_wake_up
0.00 +0.1 0.14 � 16% perf-profile.self.cycles-pp._talloc_zero
0.00 +0.1 0.14 � 25% perf-profile.self.cycles-pp.smbd_smb2_request_done_ex
0.00 +0.1 0.14 � 26% perf-profile.self.cycles-pp._nettle_chacha_core
0.26 � 27% +0.1 0.40 � 8% perf-profile.self.cycles-pp.__schedule
0.00 +0.2 0.15 � 24% perf-profile.self.cycles-pp.cp_smb_filename
0.00 +0.2 0.15 � 41% perf-profile.self.cycles-pp.smbd_dirptr_lanman2_entry
0.00 +0.2 0.15 � 25% perf-profile.self.cycles-pp.tcp_clean_rtx_queue
0.00 +0.2 0.16 � 33% perf-profile.self.cycles-pp.ndr_push_uint32
0.05 � 84% +0.2 0.20 � 11% perf-profile.self.cycles-pp.rcu_all_qs
0.00 +0.2 0.16 � 21% perf-profile.self.cycles-pp.skb_attempt_defer_free
0.07 � 55% +0.2 0.22 � 39% perf-profile.self.cycles-pp.call_function_single_prep_ipi
0.00 +0.2 0.16 � 24% perf-profile.self.cycles-pp.tcp_rcv_established
0.11 � 56% +0.2 0.27 � 21% perf-profile.self.cycles-pp.llist_reverse_order
0.00 +0.2 0.16 � 17% perf-profile.self.cycles-pp.available_idle_cpu
0.03 �150% +0.2 0.20 � 21% perf-profile.self.cycles-pp.__radix_tree_lookup
0.00 +0.2 0.17 � 25% perf-profile.self.cycles-pp.fstatat64
0.00 +0.2 0.17 � 22% perf-profile.self.cycles-pp.debuglevel_get_class@plt
0.06 � 81% +0.2 0.24 � 33% perf-profile.self.cycles-pp.link_path_walk
0.00 +0.2 0.18 � 26% perf-profile.self.cycles-pp.__tcp_transmit_skb
0.12 � 62% +0.2 0.31 � 19% perf-profile.self.cycles-pp.__cond_resched
0.00 +0.2 0.19 � 39% perf-profile.self.cycles-pp._talloc_get_type_abort
0.00 +0.2 0.19 � 26% perf-profile.self.cycles-pp.__skb_datagram_iter
0.00 +0.2 0.20 � 23% perf-profile.self.cycles-pp.btrfs_search_slot
0.06 � 56% +0.2 0.25 � 30% perf-profile.self.cycles-pp.entry_SYSCALL_64
0.00 +0.2 0.20 � 29% perf-profile.self.cycles-pp.tcp_sendmsg_locked
0.00 +0.2 0.21 � 16% perf-profile.self.cycles-pp.__inet6_lookup_established
0.00 +0.2 0.22 � 20% perf-profile.self.cycles-pp.btrfs_get_token_32
0.00 +0.2 0.22 � 20% perf-profile.self.cycles-pp.btrfs_set_token_32
0.04 �165% +0.2 0.27 � 17% perf-profile.self.cycles-pp._copy_from_iter
0.00 +0.2 0.23 � 22% perf-profile.self.cycles-pp._talloc_free
0.00 +0.2 0.24 � 30% perf-profile.self.cycles-pp.skb_release_data
0.07 � 59% +0.2 0.30 � 19% perf-profile.self.cycles-pp._copy_to_user
0.00 +0.2 0.24 � 27% perf-profile.self.cycles-pp.net_rx_action
0.12 � 38% +0.3 0.37 � 20% perf-profile.self.cycles-pp.check_heap_object
0.00 +0.3 0.27 � 14% perf-profile.self.cycles-pp.smbd_smb2_request_dispatch
0.00 +0.3 0.28 � 20% perf-profile.self.cycles-pp.debuglevel_get_class
0.25 � 56% +0.3 0.56 � 17% perf-profile.self.cycles-pp.syscall_exit_to_user_mode
0.39 � 40% +0.3 0.71 � 10% perf-profile.self.cycles-pp.__d_lookup_rcu
0.00 +0.3 0.34 � 23% perf-profile.self.cycles-pp.tdb_jenkins_hash
0.00 +0.3 0.34 � 22% perf-profile.self.cycles-pp.tcp_recvmsg_locked
0.10 � 93% +0.3 0.44 � 24% perf-profile.self.cycles-pp.entry_SYSRETQ_unsafe_stack
0.06 � 83% +0.4 0.42 � 33% perf-profile.self.cycles-pp.poll_idle
0.00 +0.4 0.39 � 30% perf-profile.self.cycles-pp.btrfs_bin_search
0.21 � 48% +0.4 0.61 � 10% perf-profile.self.cycles-pp.malloc
0.00 +0.4 0.42 � 17% perf-profile.self.cycles-pp._raw_spin_lock_bh
0.00 +0.6 0.60 � 13% perf-profile.self.cycles-pp.__memmove
0.35 � 31% +0.6 0.98 � 15% perf-profile.self.cycles-pp.clear_bhb_loop
***************************************************************************************************
lkp-icl-2sp4: 128 threads 2 sockets Intel(R) Xeon(R) Platinum 8358 CPU @ 2.60GHz (Ice Lake) with 128G memory
=========================================================================================
compiler/cpufreq_governor/directio/disk/fstype/kconfig/media/rootfs/tbox_group/test/testcase/thread_nr:
gcc-12/performance/directio/1SSD/xfs/x86_64-rhel-9.4/ssd/debian-11.1-x86_64-20220510.cgz/lkp-icl-2sp4/DWSL/fxmark/4
commit:
8de7606f0f ("cpuidle: menu: Eliminate outliers on both ends of the sample set")
85975daeaa ("cpuidle: menu: Avoid discarding useful information")
8de7606f0fe2bf5a 85975daeaa4d6ec560bfcd354fc
---------------- ---------------------------
%stddev %change %stddev
\ | \
767501 +21.2% 930491 � 2% cpuidle..usage
51785 +11.6% 57786 meminfo.Shmem
49987 +10.8% 55404 numa-meminfo.node0.Shmem
12495 +11.0% 13874 numa-vmstat.node0.nr_shmem
449.33 � 6% +130.0% 1033 � 5% perf-c2c.HITM.local
0.57 -0.2 0.40 mpstat.cpu.all.soft%
3.26 -0.4 2.85 mpstat.cpu.all.sys%
6286 +18.1% 7425 � 3% vmstat.io.bo
15336 +14.5% 17562 � 2% vmstat.system.cs
6804 � 3% +20.6% 8205 � 3% vmstat.system.in
0.37 � 18% +0.1 0.48 � 14% perf-stat.i.cache-miss-rate%
15347 +14.8% 17615 � 2% perf-stat.i.context-switches
3.88 +15.0% 4.46 � 2% perf-stat.i.metric.K/sec
15128 +14.8% 17363 � 2% perf-stat.ps.context-switches
73693 +2.0% 75170 proc-vmstat.nr_active_anon
12926 +12.1% 14484 proc-vmstat.nr_shmem
73693 +2.0% 75170 proc-vmstat.nr_zone_active_anon
561543 +16.6% 654601 � 3% proc-vmstat.pgpgout
294088 +118.0% 641007 turbostat.C1E
0.42 +0.6 1.01 turbostat.C1E%
447386 -41.1% 263643 turbostat.C6
1.53 +72.5% 2.64 turbostat.CPU%c1
559637 +23.7% 692294 turbostat.IRQ
36.56 +4.3% 38.12 turbostat.Pkg%pc2
27.16 -18.6% 22.09 � 6% turbostat.Pkg%pc6
152.65 +4.1% 158.93 turbostat.PkgWatt
55.08 +10.8% 61.06 � 2% fxmark.ssd_xfs_DWSL_4_directio.iowait_sec
28.21 +10.3% 31.12 � 2% fxmark.ssd_xfs_DWSL_4_directio.iowait_util
1.82 -31.7% 1.24 fxmark.ssd_xfs_DWSL_4_directio.softirq_sec
0.93 -32.1% 0.63 fxmark.ssd_xfs_DWSL_4_directio.softirq_util
8.32 -17.3% 6.88 fxmark.ssd_xfs_DWSL_4_directio.sys_sec
4.26 -17.7% 3.51 fxmark.ssd_xfs_DWSL_4_directio.sys_util
97771 +23.1% 120378 � 4% fxmark.ssd_xfs_DWSL_4_directio.works
1955 +23.1% 2407 � 4% fxmark.ssd_xfs_DWSL_4_directio.works/sec
233665 � 10% +20.5% 281465 � 4% fxmark.time.file_system_outputs
6765 � 29% +49.9% 10143 � 4% fxmark.time.involuntary_context_switches
3.00 -33.3% 2.00 fxmark.time.percent_of_cpu_this_job_got
105628 � 8% +12.0% 118251 � 2% fxmark.time.voluntary_context_switches
0.03 � 2% -49.0% 0.02 � 6% perf-sched.sch_delay.avg.ms.__cond_resched.__wait_for_common.submit_bio_wait.blkdev_issue_flush.xfs_file_fsync
0.02 � 28% -48.3% 0.01 � 38% perf-sched.sch_delay.avg.ms.__cond_resched.process_one_work.worker_thread.kthread.ret_from_fork
0.01 � 14% +35.9% 0.01 � 7% perf-sched.sch_delay.avg.ms.__cond_resched.smpboot_thread_fn.kthread.ret_from_fork.ret_from_fork_asm
0.02 � 32% -48.9% 0.01 � 17% perf-sched.sch_delay.avg.ms.rcu_gp_kthread.kthread.ret_from_fork.ret_from_fork_asm
0.12 � 36% -75.4% 0.03 � 23% perf-sched.sch_delay.avg.ms.schedule_hrtimeout_range.do_select.core_sys_select.kern_select
0.05 -48.7% 0.03 � 4% perf-sched.sch_delay.avg.ms.schedule_timeout.__wait_for_common.__flush_workqueue.xlog_cil_push_now.isra
0.06 -46.9% 0.03 � 3% perf-sched.sch_delay.avg.ms.schedule_timeout.io_schedule_timeout.__iomap_dio_rw.iomap_dio_rw
0.06 -52.5% 0.03 � 5% perf-sched.sch_delay.avg.ms.schedule_timeout.io_schedule_timeout.__wait_for_common.submit_bio_wait
0.02 � 13% -39.5% 0.01 � 15% perf-sched.sch_delay.avg.ms.schedule_timeout.rcu_gp_fqs_loop.rcu_gp_kthread.kthread
0.02 -43.2% 0.01 � 3% perf-sched.sch_delay.avg.ms.worker_thread.kthread.ret_from_fork.ret_from_fork_asm
0.03 � 28% -48.0% 0.01 � 19% perf-sched.sch_delay.avg.ms.xlog_cil_force_seq.xfs_log_force_seq.xfs_file_fsync.do_fsync
0.04 � 3% -65.7% 0.02 � 3% perf-sched.sch_delay.avg.ms.xlog_force_lsn.xfs_log_force_seq.xfs_file_fsync.do_fsync
0.06 -47.3% 0.03 � 3% perf-sched.sch_delay.avg.ms.xlog_wait_on_iclog.xfs_file_fsync.do_fsync.__x64_sys_fsync
0.07 � 4% -56.0% 0.03 � 5% perf-sched.sch_delay.avg.ms.xlog_wait_on_iclog.xfs_log_force_seq.xfs_file_fsync.do_fsync
0.06 � 19% -28.5% 0.04 � 14% perf-sched.sch_delay.max.ms.__cond_resched.smpboot_thread_fn.kthread.ret_from_fork.ret_from_fork_asm
0.13 � 26% -46.8% 0.07 � 62% perf-sched.sch_delay.max.ms.__cond_resched.stop_one_cpu.sched_exec.bprm_execve.part
0.05 � 52% -63.1% 0.02 � 73% perf-sched.sch_delay.max.ms.irqentry_exit_to_user_mode.asm_common_interrupt.[unknown].[unknown]
0.42 � 40% +106.5% 0.86 � 35% perf-sched.sch_delay.max.ms.pipe_read.vfs_read.ksys_read.do_syscall_64
0.15 � 29% -70.1% 0.04 � 10% perf-sched.sch_delay.max.ms.schedule_hrtimeout_range.do_select.core_sys_select.kern_select
0.09 � 14% +160.8% 0.23 �117% perf-sched.sch_delay.max.ms.schedule_preempt_disabled.rwsem_down_read_slowpath.down_read.xlog_cil_commit
0.13 � 18% -57.1% 0.06 � 71% perf-sched.sch_delay.max.ms.schedule_timeout.kcompactd.kthread.ret_from_fork
0.04 -48.5% 0.02 perf-sched.total_sch_delay.average.ms
13.74 � 9% -35.7% 8.83 � 10% perf-sched.total_sch_delay.max.ms
3.35 -13.7% 2.89 perf-sched.total_wait_and_delay.average.ms
70116 +15.2% 80797 perf-sched.total_wait_and_delay.count.ms
3.31 -13.3% 2.87 perf-sched.total_wait_time.average.ms
0.28 � 2% -27.1% 0.20 � 3% perf-sched.wait_and_delay.avg.ms.schedule_timeout.__wait_for_common.__flush_workqueue.xlog_cil_push_now.isra
0.85 -15.6% 0.72 � 4% perf-sched.wait_and_delay.avg.ms.schedule_timeout.io_schedule_timeout.__iomap_dio_rw.iomap_dio_rw
0.76 � 3% -28.4% 0.54 � 6% perf-sched.wait_and_delay.avg.ms.schedule_timeout.io_schedule_timeout.__wait_for_common.submit_bio_wait
50.02 � 5% -41.9% 29.04 � 7% perf-sched.wait_and_delay.avg.ms.smpboot_thread_fn.kthread.ret_from_fork.ret_from_fork_asm
1.60 � 3% -12.1% 1.41 � 2% perf-sched.wait_and_delay.avg.ms.worker_thread.kthread.ret_from_fork.ret_from_fork_asm
0.28 � 3% -51.8% 0.13 � 2% perf-sched.wait_and_delay.avg.ms.xlog_force_lsn.xfs_log_force_seq.xfs_file_fsync.do_fsync
0.25 � 4% -32.3% 0.17 � 3% perf-sched.wait_and_delay.avg.ms.xlog_wait_on_iclog.xfs_log_force_seq.xfs_file_fsync.do_fsync
1112 � 3% +42.6% 1587 � 8% perf-sched.wait_and_delay.count.__cond_resched.__wait_for_common.submit_bio_wait.blkdev_issue_flush.xfs_file_fsync
49.33 +9.5% 54.00 � 2% perf-sched.wait_and_delay.count.schedule_hrtimeout_range.do_poll.constprop.0.do_sys_poll
9399 � 2% +20.5% 11328 � 4% perf-sched.wait_and_delay.count.schedule_timeout.io_schedule_timeout.__iomap_dio_rw.iomap_dio_rw
4552 � 3% +38.7% 6314 � 8% perf-sched.wait_and_delay.count.schedule_timeout.io_schedule_timeout.__wait_for_common.submit_bio_wait
693.83 � 5% +69.3% 1174 � 4% perf-sched.wait_and_delay.count.smpboot_thread_fn.kthread.ret_from_fork.ret_from_fork_asm
29488 +14.8% 33857 perf-sched.wait_and_delay.count.worker_thread.kthread.ret_from_fork.ret_from_fork_asm
5728 � 2% +12.9% 6465 � 6% perf-sched.wait_and_delay.count.xlog_force_lsn.xfs_log_force_seq.xfs_file_fsync.do_fsync
5722 � 2% +12.9% 6460 � 6% perf-sched.wait_and_delay.count.xlog_wait_on_iclog.xfs_file_fsync.do_fsync.__x64_sys_fsync
0.10 �115% +401.0% 0.52 � 71% perf-sched.wait_time.avg.ms.__cond_resched.submit_bio_noacct.iomap_dio_bio_iter.__iomap_dio_rw.iomap_dio_rw
10.51 �221% -99.7% 0.03 � 98% perf-sched.wait_time.avg.ms.irqentry_exit_to_user_mode.asm_common_interrupt.[unknown]
0.23 � 2% -22.1% 0.18 � 3% perf-sched.wait_time.avg.ms.schedule_timeout.__wait_for_common.__flush_workqueue.xlog_cil_push_now.isra
0.79 � 2% -13.2% 0.69 � 4% perf-sched.wait_time.avg.ms.schedule_timeout.io_schedule_timeout.__iomap_dio_rw.iomap_dio_rw
0.69 � 3% -26.2% 0.51 � 6% perf-sched.wait_time.avg.ms.schedule_timeout.io_schedule_timeout.__wait_for_common.submit_bio_wait
50.00 � 5% -42.0% 29.03 � 7% perf-sched.wait_time.avg.ms.smpboot_thread_fn.kthread.ret_from_fork.ret_from_fork_asm
1.58 � 3% -11.7% 1.40 � 2% perf-sched.wait_time.avg.ms.worker_thread.kthread.ret_from_fork.ret_from_fork_asm
0.23 � 3% -49.0% 0.12 � 3% perf-sched.wait_time.avg.ms.xlog_force_lsn.xfs_log_force_seq.xfs_file_fsync.do_fsync
0.18 � 4% -23.4% 0.14 � 3% perf-sched.wait_time.avg.ms.xlog_wait_on_iclog.xfs_log_force_seq.xfs_file_fsync.do_fsync
0.11 �115% +1161.2% 1.35 � 82% perf-sched.wait_time.max.ms.__cond_resched.submit_bio_noacct.iomap_dio_bio_iter.__iomap_dio_rw.iomap_dio_rw
167.40 �222% -99.9% 0.23 �134% perf-sched.wait_time.max.ms.irqentry_exit_to_user_mode.asm_common_interrupt.[unknown]
***************************************************************************************************
lkp-icl-2sp4: 128 threads 2 sockets Intel(R) Xeon(R) Platinum 8358 CPU @ 2.60GHz (Ice Lake) with 128G memory
=========================================================================================
compiler/cpufreq_governor/directio/disk/fstype/kconfig/media/rootfs/tbox_group/test/testcase/thread_nr:
gcc-12/performance/directio/1SSD/ext4/x86_64-rhel-9.4/ssd/debian-11.1-x86_64-20220510.cgz/lkp-icl-2sp4/DRBM/fxmark/4
commit:
8de7606f0f ("cpuidle: menu: Eliminate outliers on both ends of the sample set")
85975daeaa ("cpuidle: menu: Avoid discarding useful information")
8de7606f0fe2bf5a 85975daeaa4d6ec560bfcd354fc
---------------- ---------------------------
%stddev %change %stddev
\ | \
1645631 +39.1% 2288608 cpuidle..usage
746.00 � 4% +177.8% 2072 � 3% perf-c2c.HITM.local
3390 � 8% -21.4% 2664 � 10% numa-meminfo.node0.PageTables
2292 � 12% +33.0% 3048 � 9% numa-meminfo.node1.PageTables
25341 � 75% +310.1% 103929 � 32% numa-numastat.node0.other_node
107927 � 17% -72.8% 29364 �114% numa-numastat.node1.other_node
1.10 +0.2 1.30 mpstat.cpu.all.irq%
0.57 -0.2 0.37 � 3% mpstat.cpu.all.soft%
3.03 -1.0 2.05 mpstat.cpu.all.sys%
22711 � 2% +20.2% 27295 perf-stat.i.context-switches
5.75 � 2% +20.1% 6.91 perf-stat.i.metric.K/sec
22376 � 2% +20.2% 26902 perf-stat.ps.context-switches
344417 � 3% +22.5% 421964 proc-vmstat.nr_foll_pin_acquired
344434 � 3% +22.5% 422008 proc-vmstat.nr_foll_pin_released
3643790 +23.0% 4481621 proc-vmstat.pgpgin
40418 � 2% +22.3% 49439 vmstat.io.bi
22494 � 2% +19.5% 26873 vmstat.system.cs
13143 � 3% +38.1% 18152 vmstat.system.in
344767 � 3% +22.5% 422329 numa-vmstat.node0.nr_foll_pin_acquired
344791 � 3% +22.5% 422374 numa-vmstat.node0.nr_foll_pin_released
848.11 � 8% -21.5% 666.16 � 10% numa-vmstat.node0.nr_page_table_pages
25341 � 75% +310.1% 103929 � 32% numa-vmstat.node0.numa_other
573.19 � 12% +32.9% 761.68 � 9% numa-vmstat.node1.nr_page_table_pages
107927 � 17% -72.8% 29364 �114% numa-vmstat.node1.numa_other
17230 � 13% +72.3% 29682 � 21% turbostat.C1
1087599 � 2% +90.4% 2070580 turbostat.C1E
0.81 � 2% +0.8 1.57 turbostat.C1E%
532700 -67.1% 175060 turbostat.C6
2.30 +59.9% 3.68 turbostat.CPU%c1
1160083 +38.7% 1608509 turbostat.IRQ
0.18 � 2% -47.3% 0.10 � 4% fxmark.ssd_ext4_DRBM_4_directio.idle_sec
0.09 � 2% -48.0% 0.05 � 4% fxmark.ssd_ext4_DRBM_4_directio.idle_util
3.27 +24.2% 4.06 fxmark.ssd_ext4_DRBM_4_directio.irq_sec
1.68 +22.5% 2.06 fxmark.ssd_ext4_DRBM_4_directio.irq_util
1.82 -35.6% 1.17 � 2% fxmark.ssd_ext4_DRBM_4_directio.softirq_sec
0.93 -36.5% 0.59 � 2% fxmark.ssd_ext4_DRBM_4_directio.softirq_util
7.88 -42.4% 4.54 fxmark.ssd_ext4_DRBM_4_directio.sys_sec
4.05 -43.2% 2.30 fxmark.ssd_ext4_DRBM_4_directio.sys_util
0.85 � 2% -18.4% 0.70 � 2% fxmark.ssd_ext4_DRBM_4_directio.user_sec
0.44 � 2% -19.5% 0.35 � 2% fxmark.ssd_ext4_DRBM_4_directio.user_util
910527 +23.0% 1119985 fxmark.ssd_ext4_DRBM_4_directio.works
18210 +23.0% 22399 fxmark.ssd_ext4_DRBM_4_directio.works/sec
1971356 � 5% +14.8% 2262447 fxmark.time.file_system_inputs
256187 � 5% +14.2% 292580 fxmark.time.voluntary_context_switches
0.01 � 26% -59.2% 0.00 � 47% perf-sched.sch_delay.avg.ms.__cond_resched.__alloc_pages_noprof.alloc_pages_mpol_noprof.folio_alloc_noprof.__filemap_get_folio
0.01 � 41% -69.7% 0.00 � 61% perf-sched.sch_delay.avg.ms.__cond_resched.bdev_getblk.ext4_read_block_bitmap_nowait.ext4_mb_init_cache.ext4_mb_init_group
0.03 �114% -87.9% 0.00 � 46% perf-sched.sch_delay.avg.ms.__cond_resched.ext4_mb_init_group.ext4_mb_prefetch_fini.ext4_run_li_request.ext4_lazyinit_thread
0.01 � 26% -54.5% 0.01 � 28% perf-sched.sch_delay.avg.ms.irq_thread.kthread.ret_from_fork.ret_from_fork_asm
0.03 � 5% -80.2% 0.01 � 6% perf-sched.sch_delay.avg.ms.schedule_timeout.io_schedule_timeout.__iomap_dio_rw.iomap_dio_rw
0.01 � 43% +293.3% 0.03 � 28% perf-sched.sch_delay.avg.ms.smpboot_thread_fn.kthread.ret_from_fork.ret_from_fork_asm
0.01 � 40% -61.5% 0.00 � 50% perf-sched.sch_delay.max.ms.__cond_resched.__alloc_pages_noprof.alloc_pages_mpol_noprof.folio_alloc_noprof.__filemap_get_folio
0.06 � 60% -88.2% 0.01 � 68% perf-sched.sch_delay.max.ms.__cond_resched.bdev_getblk.ext4_read_block_bitmap_nowait.ext4_mb_init_cache.ext4_mb_init_group
0.04 �103% -87.5% 0.01 � 47% perf-sched.sch_delay.max.ms.__cond_resched.ext4_mb_init_group.ext4_mb_prefetch_fini.ext4_run_li_request.ext4_lazyinit_thread
0.05 � 69% -69.8% 0.02 �131% perf-sched.sch_delay.max.ms.io_schedule.bit_wait_io.__wait_on_bit_lock.out_of_line_wait_on_bit_lock
0.08 � 60% -67.5% 0.03 �116% perf-sched.sch_delay.max.ms.schedule_timeout.kcompactd.kthread.ret_from_fork
0.03 � 5% -79.4% 0.01 � 6% perf-sched.total_sch_delay.average.ms
0.22 � 3% -23.0% 0.17 � 3% perf-sched.wait_and_delay.avg.ms.schedule_timeout.io_schedule_timeout.__iomap_dio_rw.iomap_dio_rw
16.55 � 13% +667.8% 127.07 � 19% perf-sched.wait_and_delay.avg.ms.smpboot_thread_fn.kthread.ret_from_fork.ret_from_fork_asm
85.84 � 13% +60.1% 137.43 � 14% perf-sched.wait_and_delay.avg.ms.worker_thread.kthread.ret_from_fork.ret_from_fork_asm
2169 � 12% -86.9% 285.00 � 17% perf-sched.wait_and_delay.count.smpboot_thread_fn.kthread.ret_from_fork.ret_from_fork_asm
532.50 � 13% -40.1% 319.00 � 12% perf-sched.wait_and_delay.count.worker_thread.kthread.ret_from_fork.ret_from_fork_asm
0.09 � 13% -53.7% 0.04 � 50% perf-sched.wait_time.avg.ms.__cond_resched.bdev_getblk.ext4_read_block_bitmap_nowait.ext4_mb_init_cache.ext4_mb_init_group
0.20 � 3% -14.4% 0.17 � 3% perf-sched.wait_time.avg.ms.schedule_timeout.io_schedule_timeout.__iomap_dio_rw.iomap_dio_rw
16.54 � 13% +667.9% 127.04 � 19% perf-sched.wait_time.avg.ms.smpboot_thread_fn.kthread.ret_from_fork.ret_from_fork_asm
85.83 � 13% +60.1% 137.42 � 14% perf-sched.wait_time.avg.ms.worker_thread.kthread.ret_from_fork.ret_from_fork_asm
0.20 � 22% -48.0% 0.10 � 45% perf-sched.wait_time.max.ms.__cond_resched.bdev_getblk.ext4_read_block_bitmap_nowait.ext4_mb_init_cache.ext4_mb_init_group
***************************************************************************************************
lkp-icl-2sp4: 128 threads 2 sockets Intel(R) Xeon(R) Platinum 8358 CPU @ 2.60GHz (Ice Lake) with 128G memory
=========================================================================================
compiler/cpufreq_governor/directio/disk/fstype/kconfig/media/rootfs/tbox_group/test/testcase/thread_nr:
gcc-12/performance/directio/1SSD/ext4/x86_64-rhel-9.4/ssd/debian-11.1-x86_64-20220510.cgz/lkp-icl-2sp4/DWSL/fxmark/4
commit:
8de7606f0f ("cpuidle: menu: Eliminate outliers on both ends of the sample set")
85975daeaa ("cpuidle: menu: Avoid discarding useful information")
8de7606f0fe2bf5a 85975daeaa4d6ec560bfcd354fc
---------------- ---------------------------
%stddev %change %stddev
\ | \
1253687 +72.1% 2157829 � 3% cpuidle..usage
497.67 � 4% +307.0% 2025 � 4% perf-c2c.HITM.local
188698 -14.4% 161540 � 6% numa-meminfo.node0.Inactive
188698 -14.4% 161540 � 6% numa-meminfo.node0.Inactive(file)
73110 � 2% +58.0% 115519 � 10% numa-meminfo.node0.Shmem
47227 -13.9% 40681 � 6% numa-vmstat.node0.nr_inactive_file
18280 � 2% +57.7% 28834 � 10% numa-vmstat.node0.nr_shmem
47227 -13.9% 40681 � 6% numa-vmstat.node0.nr_zone_inactive_file
25572 � 2% +68.5% 43080 � 5% perf-stat.i.context-switches
0.08 � 13% -14.5% 0.07 � 8% perf-stat.i.cpi
6.47 � 2% +67.8% 10.86 � 5% perf-stat.i.metric.K/sec
25199 � 2% +68.5% 42465 � 5% perf-stat.ps.context-switches
64.80 -12.3 52.49 mpstat.cpu.all.idle%
30.27 +13.4 43.62 mpstat.cpu.all.iowait%
0.79 +0.2 1.03 � 3% mpstat.cpu.all.irq%
0.58 -0.1 0.48 � 5% mpstat.cpu.all.soft%
3.18 -1.2 2.01 � 8% mpstat.cpu.all.sys%
319108 +13.1% 360809 � 3% meminfo.Active
319108 +13.1% 360809 � 3% meminfo.Active(anon)
181492 -14.8% 154658 � 6% meminfo.Buffers
444212 +9.8% 487716 � 2% meminfo.Committed_AS
188565 -14.4% 161494 � 6% meminfo.Inactive
188565 -14.4% 161494 � 6% meminfo.Inactive(file)
75877 � 3% +55.3% 117868 � 10% meminfo.Shmem
65.45 -18.2% 53.53 vmstat.cpu.id
29.75 +43.6% 42.71 vmstat.cpu.wa
57984 � 3% +18.3% 68617 vmstat.io.bo
178617 -14.5% 152783 � 6% vmstat.memory.buff
1.30 � 5% +21.4% 1.58 � 4% vmstat.procs.b
25191 � 2% +67.2% 42116 � 5% vmstat.system.cs
10243 +55.2% 15896 � 4% vmstat.system.in
79847 +13.0% 90257 � 3% proc-vmstat.nr_active_anon
47397 -14.4% 40590 � 6% proc-vmstat.nr_inactive_file
9351 +2.4% 9574 proc-vmstat.nr_mapped
18988 � 3% +55.2% 29473 � 10% proc-vmstat.nr_shmem
79847 +13.0% 90257 � 3% proc-vmstat.nr_zone_active_anon
47397 -14.4% 40590 � 6% proc-vmstat.nr_zone_inactive_file
731810 -2.2% 715490 proc-vmstat.pgfree
5180038 � 3% +19.4% 6186546 proc-vmstat.pgpgout
2945 +3.8% 3058 turbostat.Bzy_MHz
9125 � 9% +31.4% 11990 � 6% turbostat.C1
629812 � 3% +215.2% 1984933 � 4% turbostat.C1E
0.51 +1.1 1.61 turbostat.C1E%
602851 -75.0% 150770 � 2% turbostat.C6
1.72 +119.5% 3.78 turbostat.CPU%c1
0.41 � 2% +17.0% 0.48 � 2% turbostat.IPC
877949 +59.7% 1402362 � 3% turbostat.IRQ
8644 � 6% +26.3% 10913 � 6% turbostat.POLL
95.63 -43.9% 53.65 fxmark.ssd_ext4_DWSL_4_directio.idle_sec
49.31 -44.3% 27.46 fxmark.ssd_ext4_DWSL_4_directio.idle_util
85.02 +55.1% 131.89 fxmark.ssd_ext4_DWSL_4_directio.iowait_sec
43.83 +54.0% 67.51 fxmark.ssd_ext4_DWSL_4_directio.iowait_util
2.24 +38.2% 3.09 � 3% fxmark.ssd_ext4_DWSL_4_directio.irq_sec
1.15 +37.2% 1.58 � 3% fxmark.ssd_ext4_DWSL_4_directio.irq_util
1.82 -17.2% 1.51 � 4% fxmark.ssd_ext4_DWSL_4_directio.softirq_sec
0.94 -17.7% 0.77 � 5% fxmark.ssd_ext4_DWSL_4_directio.softirq_util
8.43 -47.0% 4.46 � 11% fxmark.ssd_ext4_DWSL_4_directio.sys_sec
4.34 -47.4% 2.28 � 11% fxmark.ssd_ext4_DWSL_4_directio.sys_util
233119 � 3% +113.8% 498432 � 3% fxmark.ssd_ext4_DWSL_4_directio.works
4662 � 3% +113.8% 9968 � 3% fxmark.ssd_ext4_DWSL_4_directio.works/sec
538786 � 8% +88.5% 1015570 � 3% fxmark.time.file_system_outputs
163522 � 6% +59.4% 260664 � 3% fxmark.time.voluntary_context_switches
36.06 � 9% -11.4 24.64 � 46% perf-profile.calltrace.cycles-pp.smp_call_function_many_cond.on_each_cpu_cond_mask.text_poke_bp_batch.text_poke_finish.arch_jump_label_transform_apply
35.74 � 10% -11.1 24.64 � 46% perf-profile.calltrace.cycles-pp.__static_key_slow_dec_cpuslocked.static_key_slow_dec.sw_perf_event_destroy._free_event.perf_event_release_kernel
35.74 � 10% -11.1 24.64 � 46% perf-profile.calltrace.cycles-pp.arch_jump_label_transform_apply.__static_key_slow_dec_cpuslocked.static_key_slow_dec.sw_perf_event_destroy._free_event
35.74 � 10% -11.1 24.64 � 46% perf-profile.calltrace.cycles-pp.on_each_cpu_cond_mask.text_poke_bp_batch.text_poke_finish.arch_jump_label_transform_apply.__static_key_slow_dec_cpuslocked
35.74 � 10% -11.1 24.64 � 46% perf-profile.calltrace.cycles-pp.text_poke_bp_batch.text_poke_finish.arch_jump_label_transform_apply.__static_key_slow_dec_cpuslocked.static_key_slow_dec
35.74 � 10% -11.1 24.64 � 46% perf-profile.calltrace.cycles-pp.text_poke_finish.arch_jump_label_transform_apply.__static_key_slow_dec_cpuslocked.static_key_slow_dec.sw_perf_event_destroy
35.74 � 10% -10.7 25.02 � 46% perf-profile.calltrace.cycles-pp.static_key_slow_dec.sw_perf_event_destroy._free_event.perf_event_release_kernel.perf_release
35.74 � 10% -11.1 24.64 � 46% perf-profile.children.cycles-pp.__static_key_slow_dec_cpuslocked
35.74 � 10% -11.1 24.64 � 46% perf-profile.children.cycles-pp.arch_jump_label_transform_apply
35.74 � 10% -11.1 24.64 � 46% perf-profile.children.cycles-pp.on_each_cpu_cond_mask
35.74 � 10% -11.1 24.64 � 46% perf-profile.children.cycles-pp.smp_call_function_many_cond
35.74 � 10% -11.1 24.64 � 46% perf-profile.children.cycles-pp.text_poke_bp_batch
35.74 � 10% -11.1 24.64 � 46% perf-profile.children.cycles-pp.text_poke_finish
35.74 � 10% -10.7 25.02 � 46% perf-profile.children.cycles-pp.static_key_slow_dec
0.12 �136% -88.4% 0.01 � 50% perf-sched.sch_delay.avg.ms.__cond_resched.__wait_for_common.affine_move_task.__set_cpus_allowed_ptr.__sched_setaffinity
0.04 � 7% -87.9% 0.01 � 16% perf-sched.sch_delay.avg.ms.__cond_resched.__wait_for_common.submit_bio_wait.blkdev_issue_flush.ext4_sync_file
0.04 � 13% -84.6% 0.01 � 13% perf-sched.sch_delay.avg.ms.__cond_resched.bdev_getblk.jbd2_journal_get_descriptor_buffer.jbd2_journal_commit_transaction.kjournald2
0.08 � 4% -93.7% 0.00 � 14% perf-sched.sch_delay.avg.ms.__cond_resched.jbd2_journal_commit_transaction.kjournald2.kthread.ret_from_fork
0.01 � 26% -72.7% 0.00 � 19% perf-sched.sch_delay.avg.ms.__cond_resched.stop_one_cpu.sched_exec.bprm_execve.part
0.02 � 8% -79.3% 0.00 � 8% perf-sched.sch_delay.avg.ms.io_schedule.bit_wait_io.__wait_on_bit.out_of_line_wait_on_bit
0.06 -89.9% 0.01 � 11% perf-sched.sch_delay.avg.ms.jbd2_log_wait_commit.ext4_sync_file.do_fsync.__x64_sys_fsync
0.04 � 3% -90.3% 0.00 � 9% perf-sched.sch_delay.avg.ms.kjournald2.kthread.ret_from_fork.ret_from_fork_asm
0.00 � 11% -36.8% 0.00 perf-sched.sch_delay.avg.ms.pipe_read.vfs_read.ksys_read.do_syscall_64
0.02 � 20% -63.7% 0.01 � 40% perf-sched.sch_delay.avg.ms.rcu_gp_kthread.kthread.ret_from_fork.ret_from_fork_asm
0.05 � 2% -90.1% 0.01 � 8% perf-sched.sch_delay.avg.ms.schedule_timeout.io_schedule_timeout.__iomap_dio_rw.iomap_dio_rw
0.03 -87.5% 0.00 perf-sched.sch_delay.avg.ms.schedule_timeout.io_schedule_timeout.__wait_for_common.submit_bio_wait
0.01 � 7% -41.9% 0.00 perf-sched.sch_delay.avg.ms.worker_thread.kthread.ret_from_fork.ret_from_fork_asm
1.84 �202% -95.2% 0.09 � 55% perf-sched.sch_delay.max.ms.__cond_resched.__wait_for_common.affine_move_task.__set_cpus_allowed_ptr.__sched_setaffinity
0.22 � 3% -14.5% 0.19 � 7% perf-sched.sch_delay.max.ms.__cond_resched.jbd2_journal_commit_transaction.kjournald2.kthread.ret_from_fork
0.11 � 22% -86.2% 0.01 � 23% perf-sched.sch_delay.max.ms.__cond_resched.stop_one_cpu.sched_exec.bprm_execve.part
0.05 � 91% -55.3% 0.02 � 39% perf-sched.sch_delay.max.ms.irqentry_exit_to_user_mode.asm_common_interrupt.[unknown]
0.12 � 18% -61.2% 0.05 � 88% perf-sched.sch_delay.max.ms.rcu_gp_kthread.kthread.ret_from_fork.ret_from_fork_asm
0.41 � 67% -73.9% 0.11 � 28% perf-sched.sch_delay.max.ms.wait_transaction_locked.add_transaction_credits.start_this_handle.jbd2__journal_start
0.04 -87.1% 0.00 � 11% perf-sched.total_sch_delay.average.ms
2.06 � 4% -39.1% 1.26 � 13% perf-sched.total_wait_and_delay.average.ms
115501 � 3% +64.2% 189619 � 12% perf-sched.total_wait_and_delay.count.ms
2.02 � 4% -38.2% 1.25 � 13% perf-sched.total_wait_time.average.ms
0.42 � 3% -87.4% 0.05 �223% perf-sched.wait_and_delay.avg.ms.__cond_resched.bdev_getblk.jbd2_journal_get_descriptor_buffer.jbd2_journal_commit_transaction.kjournald2
0.25 -46.1% 0.13 � 7% perf-sched.wait_and_delay.avg.ms.__cond_resched.jbd2_journal_commit_transaction.kjournald2.kthread.ret_from_fork
0.18 � 2% +17.6% 0.21 � 8% perf-sched.wait_and_delay.avg.ms.io_schedule.bit_wait_io.__wait_on_bit.out_of_line_wait_on_bit
0.31 � 3% -52.7% 0.15 � 10% perf-sched.wait_and_delay.avg.ms.jbd2_log_wait_commit.ext4_sync_file.do_fsync.__x64_sys_fsync
0.43 � 6% -31.7% 0.30 perf-sched.wait_and_delay.avg.ms.kjournald2.kthread.ret_from_fork.ret_from_fork_asm
3.34 � 4% -18.0% 2.74 � 5% perf-sched.wait_and_delay.avg.ms.rcu_gp_kthread.kthread.ret_from_fork.ret_from_fork_asm
207.33 � 13% -31.0% 143.00 � 4% perf-sched.wait_and_delay.avg.ms.schedule_hrtimeout_range.do_poll.constprop.0.do_sys_poll
0.58 � 4% -53.6% 0.27 � 6% perf-sched.wait_and_delay.avg.ms.schedule_timeout.io_schedule_timeout.__iomap_dio_rw.iomap_dio_rw
0.96 � 33% -82.6% 0.17 � 28% perf-sched.wait_and_delay.avg.ms.schedule_timeout.io_schedule_timeout.__wait_for_common.submit_bio_wait
49.87 � 7% +61.8% 80.70 � 10% perf-sched.wait_and_delay.avg.ms.smpboot_thread_fn.kthread.ret_from_fork.ret_from_fork_asm
1.43 � 7% -51.0% 0.70 � 13% perf-sched.wait_and_delay.avg.ms.worker_thread.kthread.ret_from_fork.ret_from_fork_asm
473.00 � 71% +822.0% 4361 � 16% perf-sched.wait_and_delay.count.__cond_resched.__wait_for_common.submit_bio_wait.blkdev_issue_flush.ext4_sync_file
2731 -94.4% 152.50 �223% perf-sched.wait_and_delay.count.__cond_resched.bdev_getblk.jbd2_journal_get_descriptor_buffer.jbd2_journal_commit_transaction.kjournald2
15741 � 2% -17.5% 12984 � 10% perf-sched.wait_and_delay.count.io_schedule.bit_wait_io.__wait_on_bit.out_of_line_wait_on_bit
29502 � 2% -28.6% 21071 � 8% perf-sched.wait_and_delay.count.jbd2_log_wait_commit.ext4_sync_file.do_fsync.__x64_sys_fsync
1212 � 11% +234.6% 4056 � 13% perf-sched.wait_and_delay.count.kjournald2.kthread.ret_from_fork.ret_from_fork_asm
67.33 � 3% +59.4% 107.33 � 2% perf-sched.wait_and_delay.count.schedule_hrtimeout_range.do_poll.constprop.0.do_sys_poll
21133 � 5% +121.0% 46712 � 12% perf-sched.wait_and_delay.count.schedule_timeout.io_schedule_timeout.__iomap_dio_rw.iomap_dio_rw
4559 � 14% +545.3% 29419 � 15% perf-sched.wait_and_delay.count.schedule_timeout.io_schedule_timeout.__wait_for_common.submit_bio_wait
700.00 � 7% -39.8% 421.17 � 6% perf-sched.wait_and_delay.count.smpboot_thread_fn.kthread.ret_from_fork.ret_from_fork_asm
81.67 � 24% -42.7% 46.83 � 46% perf-sched.wait_and_delay.count.syscall_exit_to_user_mode.do_syscall_64.entry_SYSCALL_64_after_hwframe.[unknown]
32393 � 4% +94.4% 62968 � 13% perf-sched.wait_and_delay.count.worker_thread.kthread.ret_from_fork.ret_from_fork_asm
6.31 � 42% -86.4% 0.86 �223% perf-sched.wait_and_delay.max.ms.__cond_resched.bdev_getblk.jbd2_journal_get_descriptor_buffer.jbd2_journal_commit_transaction.kjournald2
0.18 � 9% -40.7% 0.10 � 6% perf-sched.wait_time.avg.ms.__cond_resched.__wait_for_common.submit_bio_wait.blkdev_issue_flush.ext4_sync_file
0.39 � 3% -23.2% 0.30 � 5% perf-sched.wait_time.avg.ms.__cond_resched.bdev_getblk.jbd2_journal_get_descriptor_buffer.jbd2_journal_commit_transaction.kjournald2
0.17 -24.8% 0.13 � 7% perf-sched.wait_time.avg.ms.__cond_resched.jbd2_journal_commit_transaction.kjournald2.kthread.ret_from_fork
0.05 �201% +632.4% 0.39 � 31% perf-sched.wait_time.avg.ms.__cond_resched.kmem_cache_alloc_noprof.alloc_buffer_head.jbd2_journal_write_metadata_buffer.jbd2_journal_commit_transaction
0.16 � 3% +30.0% 0.20 � 8% perf-sched.wait_time.avg.ms.io_schedule.bit_wait_io.__wait_on_bit.out_of_line_wait_on_bit
0.64 � 33% +282.5% 2.44 � 17% perf-sched.wait_time.avg.ms.jbd2_journal_wait_updates.jbd2_journal_commit_transaction.kjournald2.kthread
0.25 � 3% -43.4% 0.14 � 9% perf-sched.wait_time.avg.ms.jbd2_log_wait_commit.ext4_sync_file.do_fsync.__x64_sys_fsync
0.39 � 6% -25.8% 0.29 perf-sched.wait_time.avg.ms.kjournald2.kthread.ret_from_fork.ret_from_fork_asm
3.32 � 4% -17.8% 2.73 � 5% perf-sched.wait_time.avg.ms.rcu_gp_kthread.kthread.ret_from_fork.ret_from_fork_asm
207.32 � 13% -31.0% 142.99 � 4% perf-sched.wait_time.avg.ms.schedule_hrtimeout_range.do_poll.constprop.0.do_sys_poll
0.52 � 4% -49.9% 0.26 � 6% perf-sched.wait_time.avg.ms.schedule_timeout.io_schedule_timeout.__iomap_dio_rw.iomap_dio_rw
0.93 � 34% -82.4% 0.16 � 28% perf-sched.wait_time.avg.ms.schedule_timeout.io_schedule_timeout.__wait_for_common.submit_bio_wait
49.86 � 7% +61.8% 80.67 � 10% perf-sched.wait_time.avg.ms.smpboot_thread_fn.kthread.ret_from_fork.ret_from_fork_asm
1.43 � 7% -51.0% 0.70 � 13% perf-sched.wait_time.avg.ms.worker_thread.kthread.ret_from_fork.ret_from_fork_asm
0.54 � 14% -66.6% 0.18 �104% perf-sched.wait_time.max.ms.__cond_resched.__ext4_mark_inode_dirty.ext4_dirty_inode.__mark_inode_dirty.generic_update_time
0.05 �201% +1052.2% 0.61 � 30% perf-sched.wait_time.max.ms.__cond_resched.kmem_cache_alloc_noprof.alloc_buffer_head.jbd2_journal_write_metadata_buffer.jbd2_journal_commit_transaction
***************************************************************************************************
lkp-icl-2sp5: 128 threads 2 sockets Intel(R) Xeon(R) Platinum 8358 CPU @ 2.60GHz (Ice Lake) with 128G memory
=========================================================================================
compiler/cpufreq_governor/directio/disk/fstype/kconfig/media/rootfs/tbox_group/test/testcase/thread_nr:
gcc-12/performance/directio/1SSD/ext4_no_jnl/x86_64-rhel-9.4/ssd/debian-11.1-x86_64-20220510.cgz/lkp-icl-2sp5/DRBM/fxmark/4
commit:
8de7606f0f ("cpuidle: menu: Eliminate outliers on both ends of the sample set")
85975daeaa ("cpuidle: menu: Avoid discarding useful information")
8de7606f0fe2bf5a 85975daeaa4d6ec560bfcd354fc
---------------- ---------------------------
%stddev %change %stddev
\ | \
1131064 +41.5% 1600002 cpuidle..usage
486.00 � 5% +201.5% 1465 � 6% perf-c2c.HITM.local
0.03 � 20% -50.3% 0.01 � 36% perf-sched.total_sch_delay.average.ms
14347312 � 38% -49.3% 7267323 � 72% sched_debug.cfs_rq:/.avg_vruntime.max
14347312 � 38% -49.3% 7267323 � 72% sched_debug.cfs_rq:/.min_vruntime.max
0.81 +0.1 0.92 � 2% mpstat.cpu.all.irq%
0.48 � 2% -0.2 0.26 � 3% mpstat.cpu.all.soft%
2.57 -0.8 1.75 � 3% mpstat.cpu.all.sys%
14804 � 2% +19.9% 17749 � 2% perf-stat.i.context-switches
3.73 � 2% +19.7% 4.47 � 3% perf-stat.i.metric.K/sec
14608 � 2% +19.9% 17512 � 2% perf-stat.ps.context-switches
209850 � 3% +20.6% 253026 � 3% proc-vmstat.nr_foll_pin_acquired
209859 � 3% +20.6% 253060 � 3% proc-vmstat.nr_foll_pin_released
2377832 +21.9% 2898307 proc-vmstat.pgpgin
25347 � 2% +22.8% 31128 � 2% vmstat.io.bi
14877 � 2% +18.9% 17694 � 2% vmstat.system.cs
9122 � 3% +41.6% 12915 � 3% vmstat.system.in
24960 � 36% +73.1% 43214 � 19% numa-vmstat.node0.nr_active_anon
18828 � 41% +85.6% 34938 � 26% numa-vmstat.node0.nr_anon_pages
210207 � 3% +20.4% 253189 � 3% numa-vmstat.node0.nr_foll_pin_acquired
210215 � 3% +20.5% 253223 � 3% numa-vmstat.node0.nr_foll_pin_released
24960 � 36% +73.1% 43214 � 19% numa-vmstat.node0.nr_zone_active_anon
44782 � 17% -36.4% 28468 � 32% numa-vmstat.node1.nr_active_anon
44121 � 17% -36.8% 27905 � 32% numa-vmstat.node1.nr_anon_pages
44782 � 17% -36.4% 28468 � 32% numa-vmstat.node1.nr_zone_active_anon
2910 +3.9% 3025 turbostat.Bzy_MHz
10130 � 3% +49.9% 15185 � 3% turbostat.C1
569864 � 2% +140.2% 1368997 turbostat.C1E
0.56 � 2% +0.8 1.37 � 2% turbostat.C1E%
537096 -61.9% 204460 turbostat.C6
1.74 +86.0% 3.24 � 2% turbostat.CPU%c1
820197 +42.1% 1165477 turbostat.IRQ
8915 � 8% +19.4% 10645 � 4% turbostat.POLL
99588 � 36% +73.4% 172697 � 19% numa-meminfo.node0.Active
99588 � 36% +73.4% 172697 � 19% numa-meminfo.node0.Active(anon)
37742 � 73% +139.5% 90377 � 39% numa-meminfo.node0.AnonHugePages
75122 � 41% +85.7% 139500 � 26% numa-meminfo.node0.AnonPages
84070 � 39% +88.5% 158506 � 25% numa-meminfo.node0.AnonPages.max
179088 � 17% -36.4% 113845 � 32% numa-meminfo.node1.Active
179088 � 17% -36.4% 113845 � 32% numa-meminfo.node1.Active(anon)
137933 � 23% -43.0% 78637 � 43% numa-meminfo.node1.AnonHugePages
176447 � 17% -36.8% 111602 � 32% numa-meminfo.node1.AnonPages
205517 � 6% -37.1% 129348 � 32% numa-meminfo.node1.AnonPages.max
13.36 � 84% -8.4 4.94 � 51% perf-profile.calltrace.cycles-pp.cpu_startup_entry.start_secondary.common_startup_64
13.36 � 84% -8.4 4.94 � 51% perf-profile.calltrace.cycles-pp.do_idle.cpu_startup_entry.start_secondary.common_startup_64
13.36 � 84% -8.4 4.94 � 51% perf-profile.calltrace.cycles-pp.start_secondary.common_startup_64
0.79 �141% +2.0 2.81 � 31% perf-profile.calltrace.cycles-pp.do_filp_open.do_sys_openat2.__x64_sys_openat.do_syscall_64.entry_SYSCALL_64_after_hwframe
0.79 �141% +2.0 2.81 � 31% perf-profile.calltrace.cycles-pp.path_openat.do_filp_open.do_sys_openat2.__x64_sys_openat.do_syscall_64
13.36 � 84% -8.4 4.94 � 51% perf-profile.children.cycles-pp.start_secondary
12.54 � 67% -6.8 5.71 � 35% perf-profile.children.cycles-pp.cpuidle_idle_call
0.79 �141% +2.0 2.81 � 31% perf-profile.children.cycles-pp.do_filp_open
0.79 �141% +2.0 2.81 � 31% perf-profile.children.cycles-pp.path_openat
0.79 �141% +2.8 3.58 � 49% perf-profile.children.cycles-pp.__x64_sys_openat
0.79 �141% +2.8 3.58 � 49% perf-profile.children.cycles-pp.do_sys_openat2
0.18 � 5% -44.9% 0.10 � 3% fxmark.ssd_ext4_no_jnl_DRBM_4_directio.idle_sec
0.09 � 5% -45.5% 0.05 � 3% fxmark.ssd_ext4_no_jnl_DRBM_4_directio.idle_util
2.36 +17.8% 2.78 fxmark.ssd_ext4_no_jnl_DRBM_4_directio.irq_sec
1.21 +16.4% 1.41 fxmark.ssd_ext4_no_jnl_DRBM_4_directio.irq_util
1.50 � 2% -50.4% 0.75 � 3% fxmark.ssd_ext4_no_jnl_DRBM_4_directio.softirq_sec
0.77 � 2% -51.0% 0.38 � 4% fxmark.ssd_ext4_no_jnl_DRBM_4_directio.softirq_util
6.48 -45.6% 3.53 fxmark.ssd_ext4_no_jnl_DRBM_4_directio.sys_sec
3.31 -46.2% 1.78 fxmark.ssd_ext4_no_jnl_DRBM_4_directio.sys_util
0.69 � 4% -23.1% 0.53 � 9% fxmark.ssd_ext4_no_jnl_DRBM_4_directio.user_sec
0.35 � 4% -24.0% 0.27 � 9% fxmark.ssd_ext4_no_jnl_DRBM_4_directio.user_util
593614 +21.9% 723733 fxmark.ssd_ext4_no_jnl_DRBM_4_directio.works
11872 +21.9% 14474 fxmark.ssd_ext4_no_jnl_DRBM_4_directio.works/sec
1203810 � 7% +19.3% 1436084 fxmark.time.file_system_inputs
160248 � 7% +18.1% 189302 fxmark.time.voluntary_context_switches
Disclaimer:
Results have been estimated based on internal Intel analysis and are provided
for informational purposes only. Any difference in system hardware or software
design or configuration may affect actual performance.
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Return-Path: <linux-kernel+bounces-673330-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 91FDF41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:15:36 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 25B9A3A7229
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:15:12 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id B54E0290094;
Wed, 4 Jun 2025 14:15:27 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b="NCG+qbWG"
Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com [210.118.77.12])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 417B91DF73D
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:15:23 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.118.77.12
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749046527; cv=none; b=qjlYQe/945TovsqaFM9a1J56MRJ3oKkBT1V3V0JOY7Tmmd2DwYMaELCWrC0O0MaLXiRnu0ofExr0iM9ctLFagW0MUKCGmtlNhm0t8jWviNfnzn0bR1AcOTfBuohePwreJlaulZP91ycKo/YNbyZl2O3V4ThpEymODEzlYsSbUyw=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749046527; c=relaxed/simple;
bh=aq9zI0qJSBFJwGii0gj0hrTLS1pDyymUIUuvv+Bpi3o=;
h=Mime-Version:Subject:From:To:CC:In-Reply-To:Message-ID:Date:
Content-Type:References; b=JqbXIh9KDZ5bDEPMk1Z37WW5907KJT14Gn+Dpf3Nlj7/ycJVvHDF8wcAQeiMypLkh9M3Xw6IG6oPJ53BwkDMSEvxJq0pk4t3up1Hq/T7ese4Xf5VDM5FsrZMcYLYVnuQmJxzX6MVvzjGDBdOIS3Aq+db5es9UOweZ9s3a7oyDOk=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=partner.samsung.com; spf=pass smtp.mailfrom=partner.samsung.com; dkim=pass (1024-bit key) header.d=samsung.com header.i=@samsung.com header.b=NCG+qbWG; arc=none smtp.client-ip=210.118.77.12
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=partner.samsung.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=partner.samsung.com
Received: from eucas1p1.samsung.com (unknown [182.198.249.206])
by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20250604141522euoutp026583f0c88018bff534c85cd8a32b7011~F3IuN583J3266632666euoutp02q
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:15:22 +0000 (GMT)
DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20250604141522euoutp026583f0c88018bff534c85cd8a32b7011~F3IuN583J3266632666euoutp02q
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com;
s=mail20170921; t=1749046522;
bh=aq9zI0qJSBFJwGii0gj0hrTLS1pDyymUIUuvv+Bpi3o=;
h=Subject:Reply-To:From:To:CC:In-Reply-To:Date:References:From;
b=NCG+qbWGKcv1JlZxQTrrwDS0yn0GgDxt+hWOoRX2Z4Pktw6TgNZBJ3audyaJNnDGI
ZIaYUDxdTj/wZdcAYSqo5Rv8ahql6hyMnSziwTloh49iG9V84eoGgCfMfYadGZEXf3
NfemDcl6ZN3Lce7UdYC8HH2xmIn4CjpkZW3KmPyc=
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
Mime-Version: 1.0
Subject: RE: Re: Re: Re: [PATCH bpf v2] xsk: Fix out of order segment free
in __xsk_generic_xmit()
Reply-To: e.kubanski@xxxxxxxxxxxxxxxxxxx
Sender: Eryk Kubanski <e.kubanski@xxxxxxxxxxxxxxxxxxx>
From: Eryk Kubanski <e.kubanski@xxxxxxxxxxxxxxxxxxx>
To: Maciej Fijalkowski <maciej.fijalkowski@xxxxxxxxx>
CC: Stanislav Fomichev <stfomichev@xxxxxxxxx>, "netdev@xxxxxxxxxxxxxxx"
<netdev@xxxxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx"
<linux-kernel@xxxxxxxxxxxxxxx>, "bjorn@xxxxxxxxxx" <bjorn@xxxxxxxxxx>,
"magnus.karlsson@xxxxxxxxx" <magnus.karlsson@xxxxxxxxx>,
"jonathan.lemon@xxxxxxxxx" <jonathan.lemon@xxxxxxxxx>
X-Priority: 3
X-Content-Kind-Code: NORMAL
In-Reply-To: <aEBPF5wkOqYIUhOl@boxer>
X-Drm-Type: N,general
X-Msg-Generator: Mail
X-Msg-Type: PERSONAL
X-Reply-Demand: N
Message-ID: <20250604141521eucms1p26b794744fb73f84f223927c36ade7239@eucms1p2>
Date: Wed, 04 Jun 2025 16:15:21 +0200
X-CMS-MailID: 20250604141521eucms1p26b794744fb73f84f223927c36ade7239
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="utf-8"
X-RootMTR: 20250530103506eucas1p1e4091678f4157b928ddfa6f6534a0009
X-EPHeader: Mail
X-ConfirmMail: N,general
X-CMS-RootMailID: 20250530103506eucas1p1e4091678f4157b928ddfa6f6534a0009
References: <aEBPF5wkOqYIUhOl@boxer> <aD3LNcG0qHHwPbiw@boxer>
<aDnX3FVPZ3AIZDGg@mini-arch>
<20250530103456.53564-1-e.kubanski@xxxxxxxxxxxxxxxxxxx>
<20250602092754eucms1p1b99e467d1483531491c5b43b23495e14@eucms1p1>
<aD3DM4elo_Xt82LE@mini-arch>
<20250602161857eucms1p2fb159a3058fd7bf2b668282529226830@eucms1p2>
<CGME20250530103506eucas1p1e4091678f4157b928ddfa6f6534a0009@eucms1p2>
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
=C2=A0Thanks=20for=20shedding=20a=20bit=20more=20light=20on=20it.=20In=20t=
he=20future=20it=20would=20be=20nice=0D=0A>=20if=20you=20would=20be=20able=
=20to=20come=20up=20with=20a=20reproducer=20of=20a=20bug=20that=20others=0D=
=0A>=20could=20use=20on=20their=20side.=20Plus=20the=20overview=20of=20your=
=20deployment=20from=20the=0D=0A>=20beginning=20would=20also=20help=20with=
=20people=20understanding=20the=20issue=20:)=0D=0A=0D=0ASure,=20sorry=20for=
=20not=20giving=20that=20in=20advance,=20I=20found=20this=20issue=0D=0Aduri=
ng=20code=20analysis,=20not=20during=20deployment.=0D=0AIt's=20not=20that=
=20simple=20to=20catch.=0D=0AI=20thought=20that=20in=20finite=20time=20we=
=20will=20agree=20:D.=0D=0ANext=20patchsets=20from=20me=20will=20have=20mor=
e=20information=20up-front.=0D=0A=0D=0A>=20I'm=20looking=20into=20it,=20bot=
tom=20line=20is=20that=20we=20discussed=20it=20with=20Magnus=20and=0D=0A>=
=20agree=20that=20issue=20you're=20reporting=20needs=20to=20be=20addressed.=
=0D=0A>=20I'll=20get=20back=20to=20you=20to=20discuss=20potential=20way=20o=
f=20attacking=20it.=0D=0A>=20Thanks=21=0D=0A=0D=0AThank=20you.=0D=0AWill=20=
this=20be=20discussed=20in=20the=20same=20mailing=20chain?=0D=0A=0D=0ATechn=
ically=20we=20need=20to=20tie=20descriptor=20write-back=0D=0Awith=20skb=20l=
ifetime.=0D=0Axsk_build_skb()=20function=20builds=20skb=20for=20TX,=0D=0Aif=
=20i=20understand=20correctly=20this=20can=20work=20both=20ways=0D=0Aeither=
=20we=20perform=20zero-copy,=20so=20specific=20buffer=0D=0Apage=20is=20atta=
ched=20to=20skb=20with=20given=20offset=20and=20size.=0D=0AOR=20perform=20t=
he=20copy.=0D=0A=0D=0AIf=20there=20was=20no=20zerocopy=20case,=20we=20could=
=20store=20it=0D=0Aon=20stack=20array=20and=20simply=20recycle=20descriptor=
=20back=0D=0Aright=20away=20without=20waiting=20for=20SKB=20completion.=0D=
=0A=0D=0AThis=20zero-copy=20case=20makes=20it=20impossible=20right?=0D=0AWe=
=20need=20to=20store=20these=20descriptors=20somewhere=20else=0D=0Aand=20ti=
e=20it=20to=20SKB=20destruction=20:(.
Return-Path: <linux-kernel+bounces-673331-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 7FF1C41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:15:58 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 4D4CD176BFE
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:15:57 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 9688128E5F4;
Wed, 4 Jun 2025 14:15:50 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="nDYUP2JD"
Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.170])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2150828C5DA;
Wed, 4 Jun 2025 14:15:47 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.170
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749046549; cv=none; b=dVib3jwNCDZSZhBwtca3AJh8fAlc3V/SGK1KjXcJVxPlmJ5/ofs071y3mn8zBt+FWEEb3H699Zs+dCgnQhfMjDgFS44H2cXLYDK56NehYcLPDGPUisuOhT9nbIULTIpCFw7lKMglhgdqZq6tueEHwCKQF8C7CDVSukyLVIVaSj8=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749046549; c=relaxed/simple;
bh=gBw2sPZbSZ94Xl91tVnXofKOr8d/lM01jlW3dxpKauE=;
h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
To:Cc:Content-Type; b=ip2u/qKM89fubEGL7PWd4mW2CAhLIrgPgwNzEspsXqvfGeL0gypRMzgTt0EMt5s0/tx8mtR9uWyCmK6J/cqAEs5/EBUCGUiW0Lsa5fN516csb768g2TJY4fwxYJ8+8ctKvclbRWNZDhM4kn0mLHFKSJdhycA+ZjQkFRUSmBuDoI=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=nDYUP2JD; arc=none smtp.client-ip=209.85.160.170
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
Received: by mail-qt1-f170.google.com with SMTP id d75a77b69052e-4772f48f516so10402191cf.1;
Wed, 04 Jun 2025 07:15:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1749046547; x=1749651347; darn=vger.kernel.org;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:from:to:cc:subject:date
:message-id:reply-to;
bh=1Jg5NzVH9x0e/UrqCaECe5kEEmmSbvsrq491+SQEdD8=;
b=nDYUP2JDDxQLWEhjxNC0UtB2OBeqZQLOhOOnqzZ1ryXgRyGQKKHOczV8HiXpadtvff
jSmDjLQU1J91aslZB7dWFM4ng1vjmpUQo5Oitgiya4PJpkrJDwyFeb1uizJW4oAdP5dh
4p3LXe7gsx6gs0Owm8+8YVvALUQeKQhabDQ/A/w9AD7dSd2I9KUXuJ2QMjreJ5PZaCT/
SlqRVcDT4brhJOmD/AS9D7IOzkydE8QoVO/kXdZFYxgs/vVvjDND47ftZhN4TAwKXHtY
ldrn1VWCa1ZlrgxYMr/A14QW1q3Sr/jC8JkF94dvlQ5pXfCDM+ATb0nH1kcJ49St8nM9
vwMg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749046547; x=1749651347;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=1Jg5NzVH9x0e/UrqCaECe5kEEmmSbvsrq491+SQEdD8=;
b=rBea2wuJs5DktykSTHoC4yiujXMGOBpRK62M7srlZdbWL6cMV1qI3KPQfEK5IR761Y
86URWrlOGdn9oLKMxN3GInPJLUKiC4mGqJ0VKiQpjKzGiClyIMZU2ugL5VjvZCJk4rFc
Lzup3vzxrl+sWP/NmcUCCJDkAC7zUsQu9hT31oX98MZGoJ075+tsSqfcB5K8+0ZTyQxa
IcdGGB0izLxvfYGTzoVJDoWQh0ys6Fo+GubAC3ElrXoUKPRmTvp97FFUccAs8iB9u74D
ysLh4b31zCDXhA2NKHRwSJ4Z66PzInclqqoxcUZeRvVijcHVrqFzlCN75UOLo8brDHPG
panQ==
X-Forwarded-Encrypted: i=1; AJvYcCWOQwrND8mOoufOrpW0hOnlyOAffovfOKYWCP8Hf2se/oENpAojSaAGSBliBEulMageKDdq4zwA+loT@xxxxxxxxxxxxxxx
X-Gm-Message-State: AOJu0YxgmydVH18++KPNHbkXLI0Ixr/PHY01BIKEwh3oVCFV75kYBVL5
9E2ugZY5a3HRjh8IN2om67BQMTrh9Eh7LRO7wa/sQZb6R7/l94E1Q2Rr/bQIVMdC6u8eMreU4S7
dtp/J1HNVLqOxTgNEaR5XIGD7i/FVFkQ=
X-Gm-Gg: ASbGncvR5CCZqpgyerQ23o+J/x8aJvI0hoKH5SopI9qzf06SvXCw5PDgfrzoVg4ZSeo
4MdWjMLqjmyxIjcHFabtn6Rq0NknzjRd9cPy2VPN5y/ynCFFZT4nWJUEclpJI3JHMzJzQ6ZgTTy
zg8E6MH5AA9EvYkI60YhdCpCxD8kVjCso=
X-Google-Smtp-Source: AGHT+IFyPdm7h42GRcVyPmAA4X8jANkDh7Synd5egnSqzeiSSM5/zmGzBDUZs3mzMIf1pwlRH506uMCvsx+yJMdRwm0=
X-Received: by 2002:a05:622a:4d0a:b0:494:7191:9f80 with SMTP id
d75a77b69052e-4a5a56f2403mr53082581cf.16.1749046546628; Wed, 04 Jun 2025
07:15:46 -0700 (PDT)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
References: <20250603-sige5-updates-v1-0-717e8ce4ab77@xxxxxxxxx> <174904540020.3869609.29886103068021354.robh@xxxxxxxxxx>
In-Reply-To: <174904540020.3869609.29886103068021354.robh@xxxxxxxxxx>
From: Alexey Charkov <alchark@xxxxxxxxx>
Date: Wed, 4 Jun 2025 18:15:35 +0400
X-Gm-Features: AX0GCFuFHM52cAYw2Dx-JD6z3McuUg4g7ERZuiqkBqoiRvc1ZSxeJSlSnxPNrig
Message-ID: <CABjd4Yzfy3A95EVXGh6espREMTpUOD=GoR3orxScmWJW85R3dg@xxxxxxxxxxxxxx>
Subject: Re: [PATCH 0/4] arm64: dts: rockchip: enable further peripherals on
ArmSoM Sige5
To: "Rob Herring (Arm)" <robh@xxxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx, Conor Dooley <conor+dt@xxxxxxxxxx>,
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Heiko Stuebner <heiko@xxxxxxxxx>, linux-rockchip@xxxxxxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 4, 2025 at 5:58=E2=80=AFPM Rob Herring (Arm) <robh@xxxxxxxxxx> =
wrote:
On Tue, 03 Jun 2025 21:01:12 +0400, Alexey Charkov wrote:
> Add support for the two USB type A ports, link up the CPU regulators fo=
r
> DVFS, enable WiFi and Bluetooth.
>
> The bluetooth part might warrant some discussion and thoughts from the
> list, given that it's connected over UART and thus not discoverable. At
> the same time, there are two revisions of the board which have differen=
t
> Bluetooth chips soldered on: Realtek based on v1.1 and Broadcom based o=
n
> v1.2. I'm not sure if there is any way to determine board version from
> software. Mine is v1.2, so the respective patch deals with the Broadcom
> case only, but maybe it's better to move it into a .dtso and thus kick
> the can down the road (i.e. make the user deal with board identificatio=
n
> and loading of the right overlay)? Thoughts welcome.
>
> Best regards,
> Alexey
>
> Signed-off-by: Alexey Charkov <alchark@xxxxxxxxx>
> ---
> Alexey Charkov (4):
> arm64: dts: rockchip: list all CPU supplies on ArmSoM Sige5
> arm64: dts: rockchip: enable USB A ports on ArmSoM Sige5
> arm64: dts: rockchip: enable wifi on ArmSoM Sige5
> arm64: dts: rockchip: enable bluetooth on ArmSoM Sige5
>
> .../boot/dts/rockchip/rk3576-armsom-sige5.dts | 135 +++++++++++++=
++++++++
> arch/arm64/boot/dts/rockchip/rk3576.dtsi | 16 +++
> 2 files changed, 151 insertions(+)
> ---
> base-commit: 546b1c9e93c2bb8cf5ed24e0be1c86bb089b3253
> change-id: 20250602-sige5-updates-a162b501a1b1
>
> Best regards,
> --
> Alexey Charkov <alchark@xxxxxxxxx>
>
>
>
My bot found new DTB warnings on the .dts files added or changed in this
series.
Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings
are fixed by another series. Ultimately, it is up to the platform
maintainer whether these warnings are acceptable or not. No need to reply
unless the platform maintainer has comments.
If you already ran DT checks and didn't see these error(s), then
make sure dt-schema is up to date:
pip3 install dtschema --upgrade
This patch series was applied (using b4) to base:
Base: using specified base-commit 546b1c9e93c2bb8cf5ed24e0be1c86bb089b32=
53
If this is not the correct base, please add 'base-commit' tag
(or use b4 which does this automatically)
New warnings running 'make CHECK_DTBS=3Dy for arch/arm64/boot/dts/rockchi=
p/' for 20250603-sige5-updates-v1-0-717e8ce4ab77@xxxxxxxxx:
arch/arm64/boot/dts/rockchip/rk3576-roc-pc.dtb: mmc@2a320000 (rockchip,rk=
3576-dw-mshc): compatible: 'oneOf' conditional failed, one must be fixed:
['rockchip,rk3576-dw-mshc', 'rockchip,rk3288-dw-mshc'] is too lon=
g
'rockchip,rk2928-dw-mshc' was expected
'rockchip,rk3288-dw-mshc' was expected
'rockchip,rk3576-dw-mshc' is not one of ['rockchip,px30-dw-mshc',=
'rockchip,rk1808-dw-mshc', 'rockchip,rk3036-dw-mshc', 'rockchip,rk3128-dw-=
mshc', 'rockchip,rk3228-dw-mshc', 'rockchip,rk3308-dw-mshc', 'rockchip,rk33=
28-dw-mshc', 'rockchip,rk3368-dw-mshc', 'rockchip,rk3399-dw-mshc', 'rockchi=
p,rk3528-dw-mshc', 'rockchip,rk3562-dw-mshc', 'rockchip,rk3568-dw-mshc', 'r=
ockchip,rk3588-dw-mshc', 'rockchip,rv1108-dw-mshc', 'rockchip,rv1126-dw-msh=
c']
from schema $id: http://devicetree.org/schemas/mmc/rockchip-dw-ms=
hc.yaml#
arch/arm64/boot/dts/rockchip/rk3576-armsom-sige5.dtb: mmc@2a320000 (rockc=
hip,rk3576-dw-mshc): compatible: 'oneOf' conditional failed, one must be fi=
xed:
['rockchip,rk3576-dw-mshc', 'rockchip,rk3288-dw-mshc'] is too lon=
g
Should be just rockchip,rk3576-dw-mshc.
Thanks bot, and sorry for the noise - missed this one.
Best regards,
Alexey
Return-Path: <linux-kernel+bounces-673332-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 4655E41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:16:40 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 281D01898234
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:16:53 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 9090628F935;
Wed, 4 Jun 2025 14:16:29 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="EuN2df/J";
dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="0ESDxtGu"
Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id A3539DF42;
Wed, 4 Jun 2025 14:16:26 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749046588; cv=fail; b=TYnd9PEVvWIHHVsIbnik9Py1bbc4pDB4ONzUXnDAHh0cZfNreEm/dJitZsL/ntiqMimcSo3UST7ADD4jYJdr9nbt/cPwFBLZSUcaAdefuKghAnmpP5Ao32kdtDx1Wi9HTCIYxQf9VISJdil7dZ3TdQpOGQNMUQpVFfuGFPyJKWs=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749046588; c=relaxed/simple;
bh=s45Nk6fjf9VHPcdoRYtBMFtTbnwbLNfN+RMfRRKnrvA=;
h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To:
Content-Type:MIME-Version; b=E6WIMNWM/Azsh+nzCAACQC8HFgJcxIZor9xhdIt4fBa6es1Vh9giwUcxlvcM4IZHk5cPGNPdn8slrK+QKFP2l5dYcrOtFDMraOmUFVHHcKil4EjUg5zMUjQ21z9UFz3SqPwbYoXwPd0uT3rKv/ISRsL86S0wHUhQV2YQtT5NVOc=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=EuN2df/J; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=0ESDxtGu; arc=fail smtp.client-ip=205.220.177.32
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com
Received: from pps.filterd (m0333520.ppops.net [127.0.0.1])
by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5549MbFg025539;
Wed, 4 Jun 2025 14:16:03 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc
:content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=
corp-2025-04-25; bh=pi/mGD9wAfAZchswPQb0TlQL8X+j7qQ9xQMosY9hd90=; b=
EuN2df/JH4f6m+y9PzfGjcWTXYFI+ovfWNpXCStavnYI4HRGhHugwmPWzH7WnMgv
/VqyxAWajDSeF3q3GCy3uslJDRj4c0MCU47Nve5M5OzCHFimjgoUuMKW7DU7Kz1O
MdpxtosbJ540+dIhShgKe0lkFCLqXnnbziogqYxsFTBoEC15ks4tXDC6Hi4rXMbN
xVbLsAJ9mR83hz05DTxnB2KOegH0MUnav2ZHzgOOOOdIeW5ywQXEyY750sMgQGAa
h2461iuWNx1ScwemexawG+K3tYFjwF4ukhsm0kB5tDoVEAJoR+0aZezf3hsc8oaR
78MILM5t3bnCMtRxkkCwoQ==
Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223])
by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 471gahc62g-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 04 Jun 2025 14:16:02 +0000 (GMT)
Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1])
by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 554D9kUN040698;
Wed, 4 Jun 2025 14:16:02 GMT
Received: from sa9pr02cu001.outbound.protection.outlook.com (mail-southcentralusazon11011049.outbound.protection.outlook.com [40.93.194.49])
by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 46yr7b2gsu-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 04 Jun 2025 14:16:01 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=VVHoj+s5Ko5vtLulQ1SD2044+5Elkwxql/G22OxHdjqX/v5nXKL/qLyTegUDB9iNBwaAYtDOaWRlUBGtOrO8qAaiGEWJOmvWgy9T737Cz2EIOv95+lyfjzTNcACplVShgHb2Ygaf1FOrQj+lQj08LtNg1WUNqWWtlLgIzV1kSgrOZ8/bg2o8ERMTP8xpoJXKWXyiBdgZKh8WwpPQ4FX9Iv2x4kAgcVFjpoQl8RDPcTu+EhVN/OddgwmL0ijOrIThzlsAgUILGHFxNgU6SYU/b0qDZMOy3jykoyJ4BtDSde5d/W5wgBAYrg7YTuE9TtIiTesf8ybqMXGxvPCg8/HH9A==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=pi/mGD9wAfAZchswPQb0TlQL8X+j7qQ9xQMosY9hd90=;
b=PSqx6EF/BMRSpm40lC1cp2h9ya6zkE0y5kYmgR/l2MFXdQnJF8gdp6QUBEMo/V4bQLyeoWRPjQA0VWrbmQ/b+SnZAJwKY0jYOJHSaVu6CtvISnzeC2AuVxGWHBrH0NRXUq+P02vIbhenNaLuN0xqkgjx7/JDLheK9Dg3ojVHq3Oi5/GVxkws43axM2Tnza3WlPtA45k7XfFdqsYOZ8P/64wZRDmoE0T6hPQxWMH5LsRFwzMaRVZnroTG4jW2y9gyiZcguY0NtVLqm8rA3dfrN7s4g1w9EoXeuz2BDCVnVOf+skIqcRFIKTz7VQ4H4oaDeqSnjih5GfQx6Lj65mXmeQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com;
dkim=pass header.d=oracle.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=pi/mGD9wAfAZchswPQb0TlQL8X+j7qQ9xQMosY9hd90=;
b=0ESDxtGu57UQYHYExxkmTNwIpvEkl04V8rV/31aHCqd99SkB8Hk9o0swNm9KIc8M+kgaFS5eBGRH/4vmOcoCcbhqV7ZbfvfD13C/LHSFu+UD+KgVk+jNAOdxxqUgutnBXK6tWQktpJowbP195z4onR/Lz51bePIJDpuwONBvuIE=
Received: from DS7PR10MB5328.namprd10.prod.outlook.com (2603:10b6:5:3a6::12)
by DS0PR10MB8175.namprd10.prod.outlook.com (2603:10b6:8:1f7::10) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.34; Wed, 4 Jun
2025 14:15:57 +0000
Received: from DS7PR10MB5328.namprd10.prod.outlook.com
([fe80::ea13:c6c1:9956:b29c]) by DS7PR10MB5328.namprd10.prod.outlook.com
([fe80::ea13:c6c1:9956:b29c%2]) with mapi id 15.20.8792.034; Wed, 4 Jun 2025
14:15:57 +0000
Message-ID: <eaf2687e-6054-4c54-9206-9dfdad56c3e9@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 19:45:43 +0530
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH hyperv-next v3 13/15] Drivers: hv: Support confidential
VMBus channels
To: Roman Kisel <romank@xxxxxxxxxxxxxxxxxxx>, arnd@xxxxxxxx, bp@xxxxxxxxx,
corbet@xxxxxxx, dave.hansen@xxxxxxxxxxxxxxx, decui@xxxxxxxxxxxxx,
haiyangz@xxxxxxxxxxxxx, hpa@xxxxxxxxx, kys@xxxxxxxxxxxxx,
mingo@xxxxxxxxxx, mhklinux@xxxxxxxxxxx, tglx@xxxxxxxxxxxxx,
wei.liu@xxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx,
linux-doc@xxxxxxxxxxxxxxx, linux-hyperv@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, x86@xxxxxxxxxx
Cc: apais@xxxxxxxxxxxxx, benhill@xxxxxxxxxxxxx, bperkins@xxxxxxxxxxxxx,
sunilmut@xxxxxxxxxxxxx
References: <20250604004341.7194-1-romank@xxxxxxxxxxxxxxxxxxx>
<20250604004341.7194-14-romank@xxxxxxxxxxxxxxxxxxx>
Content-Language: en-US
From: ALOK TIWARI <alok.a.tiwari@xxxxxxxxxx>
In-Reply-To: <20250604004341.7194-14-romank@xxxxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-ClientProxiedBy: KU0P306CA0028.MYSP306.PROD.OUTLOOK.COM
(2603:1096:d10:16::10) To DS7PR10MB5328.namprd10.prod.outlook.com
(2603:10b6:5:3a6::12)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: DS7PR10MB5328:EE_|DS0PR10MB8175:EE_
X-MS-Office365-Filtering-Correlation-Id: 213041e7-8b5c-471b-5ff6-08dda37252bd
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam:
BCL:0;ARA:13230040|1800799024|376014|7416014|366016|7053199007|921020;
X-Microsoft-Antispam-Message-Info:
=?utf-8?B?QnFaUFBZOWxFclN1K0NlREphaGV0d3o5ZDhIY2x1VnNjeWNTbVM4bG9ialI5?=
=?utf-8?B?WXB1UFc4Y2JpaExNa0huT2paUEJZeXVjOFl5cWFNMzFzbXBKdEpzc1F2OEk0?=
=?utf-8?B?elB6V1ZBMGhzQ2diREpveE5vT2lYd3Z4WXFneHo5WFFnVkJ1Y2EvdDVIeWRj?=
=?utf-8?B?dW5YdS9sazlKUER4QTBROWpyZU4veXhYM0tHaitQNnpYbkd0Y2dveHRLaElT?=
=?utf-8?B?Z3VxcTZ4akVHc0hpL1gzU3l5cEtYbGhNMmJXM3R5Q3o5d0xEMlBuZTV2ZXRK?=
=?utf-8?B?cUk5aEVrTzMrRS9uekVmb1lFM1JqMlA3L05kdUNxOG13ZFc2Q285Nklxd3FL?=
=?utf-8?B?QmtTWWZPK3NmN1Ivc2FsSzI4bys2TS9Mek1HdXY3RnZ5WS8zV1R0dUxGMUxy?=
=?utf-8?B?L0JKenI4aDEwWjdZUWdLblVPTUZhd2RIdUJYQ0RzQnNaK2RUUDd4c0UxMGh1?=
=?utf-8?B?cGhzeG5QVW96dDZVQUZISnlpbGd6Y1BMc3NjVU01WndxcXlpUldpNHNkdWZF?=
=?utf-8?B?N0lVNUtXSTZkRUNnUnYvNkFYOGlsM1lRRnJWMHd2M0FRVmx0NVk4cjNOZzRj?=
=?utf-8?B?VnNLYmZEY3JOOFRUK2ZlS1Y5WW02MmlUUnRtVUh2T3ZwU3NhV1M3b3MyRHg0?=
=?utf-8?B?aW9FZG0vV3JsekdEZ0tZcXY3anFrcjVtT3NRdEZoOXdheVBOY1RvdjI2TWtR?=
=?utf-8?B?blVkbDgyS2prOFVpTTRROSs3S1FJYjJmL0pJL0lKMEt3bVk1UUNaNmd4emNs?=
=?utf-8?B?N1FSU0kwK2Z1ZVp1N25kM1ZFTjBUNXFGTHZGMTNGb2p1UStPSTZNMWJ4SEJN?=
=?utf-8?B?dGptT3U1NndzTjBSM1NVWFd0QmFwZUNkWkdTbko2MWE3enZ1Uy9xM2tQWU55?=
=?utf-8?B?RmhFWmJaUEdPWVNLcnNJTjBZV0l0ejc5cGh1M1NIVCtwWHFtY1NEcEVIZjV4?=
=?utf-8?B?RjUxajlMbjZkRkp0UnBUcGxYNWdRUGZZODM1RFZRTm9aSUZsbTRHRVVTbTBE?=
=?utf-8?B?TjVLOUdmcmVGb0JCdHcxYXBjM0hhekoxcGNUMFFxTWlDODhUR1RIbld2UktI?=
=?utf-8?B?OFRUcmcwWWQzZmFvVW5pTW5ObEZpcEdWYTRUcm4vaVh6Z01qTFpiNTQ2NFJV?=
=?utf-8?B?QWpmY0VROEp5eUNhRmdKVkpSWWNmWjNLREZ1MVRhVCtkVlFEM093R3JlQjNj?=
=?utf-8?B?bVNKQkV3SzVHU1B2bVJMRjJQTXpJa04wdmd6ZGJTcnU3Yk5naTV4SjVqMS9H?=
=?utf-8?B?SXlDcHpVL3pzWVZZR2FNYXRFWWRlR00rNFA0eDYreGZTRlhRTGhnZWVIb1Zs?=
=?utf-8?B?NWw3MU5Ld3BMSDFTblI3SlFrSFRTWk8rd2JkdTd1emZkMUlRR2pKL3Z1Z0xY?=
=?utf-8?B?eUtHQkZucE0rVlI2VUVDYnR3VzBtTmZOTTVQVzE1eFJrYVpSeXlJWENTRTJY?=
=?utf-8?B?ZXpwNFRkOHVYTWt4RFgyK2JDcS9zdURmcHVsMEZmK2FncjNlTUhWY2ROL3Ra?=
=?utf-8?B?ZEVwYzBFUFFZZmg1bXRUVG9DelRkT2hNVkllUkRTcGhiY1RZN0Q3TUR3UVVn?=
=?utf-8?B?UVNLUHM3dXNQSE9HaTlFRTc4enNZUnJKQUVGdnlZUzU3N1dmU01xWGEzMjRy?=
=?utf-8?B?cURmZlJSVWpLZHZyM1JibXptTCtKZlZmTHFTVXhsbUxUaEZyajZRZHVBeTJH?=
=?utf-8?B?VU9MeWwxOEFiZTFyQk9ON0dMaDhsNHhkOVI1bm9GZE5RZGxGb0p2R1RZeitP?=
=?utf-8?B?T09IQXk1RFlwOU9RWTNyU3dRSmNMWm03UWVhTjJHWDZpNUJQQVEvTk1jMnc3?=
=?utf-8?B?ZzVoYWVYSFNYNjNjZWdIOWdUaElGQ2c4N2VBakNpQm5KVDB4bFQyNDdQTkJO?=
=?utf-8?B?WVlwblVCSUNzU2U0dU1oUFAxQnFVR25iRmNqMFplR0xFU1d1T0lxMDIzUFd5?=
=?utf-8?B?aXM3WVl5THEzakF6RkV1SUZWSjBqWlArQ1ZqZEwwMzhxOFp6QUpTMFROYTJ1?=
=?utf-8?B?NENHeWM1MCtnPT0=?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR10MB5328.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(376014)(7416014)(366016)(7053199007)(921020);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?utf-8?B?MUxrcGl4OGlBblhDcVJUblc4TFpuMVVkL0lnZXJQeTY4RkVlVXRFd0MvUzVa?=
=?utf-8?B?QndNRW9STkVpQU1jUHkySFFZQTI5d1JRbFNpMjRQK0N5UndjaFdzaEh3cndy?=
=?utf-8?B?azZEejMwWjVlMVNyankvVWczakw5V1FST0FMMFM1Z0JJNnhKVWVaa3Jyemdy?=
=?utf-8?B?T3pTOEs2QTdtY1owUjdsdG9ldk5vSzVwcU95ZHhFK0xFaFZ0V2dlNWgxQS9J?=
=?utf-8?B?dWhXYVFteWpoMzh6TjF0ZExVcE5VdmtORlVHODRuQ3pwbzY5N3FYZXBEODZh?=
=?utf-8?B?RkhnMkZmRjU2Q1N2cWdQMnRVMEVRYlprYXBaZlRlNlVsZFpUTWxQR1dkWXM1?=
=?utf-8?B?enhzZnMzMWxlUUZrYWxWSWRLbkdLbUkwUW91bDMvWjlNYkJTdFJ4djc0OUFt?=
=?utf-8?B?dDBHY3lsRExpbk5DdzQvRjFHUEx1bCtCS0hFRHFkYWlnb2k4bmlNZ3U5THQz?=
=?utf-8?B?SEZPTHduMjR5K1FhSjMwWjF6WmM2ckFXUmFFbVplYXBOY1BtZGpwV1JhZGZp?=
=?utf-8?B?UGdselNYQ1pabHU4SDBDVWdhQlVNU3RJMk1KT3ZLdHdFbHM0MUNLSjE3bnlI?=
=?utf-8?B?L2NyNi9LallKRTlNRXlHSFduVjltcFJoOTNPQWV5OFEySlNjR0NNT2FQYjUw?=
=?utf-8?B?LzQrVGU5WlBVdzlLSnZjYlh6eEtJa3U1TElZbWIybjl5cXdZaXEwbmJ6cE4w?=
=?utf-8?B?TCtEclR0WGVCRDBXWWR1RUN3RTY2bGd5UWplTnMwUytIYWdZY0NPSS9Lbnpr?=
=?utf-8?B?OUkwbVMrZ0NJa3FncnFVY0ZzNWM1TXQ2VFR1U2hoMzdDQmV0ckxFUnpZQWEy?=
=?utf-8?B?ZFNMWTQ0cENTUVJsRnh1ejJQaWhVSHhqVlNyalZiZmQrM2IzUmpkOFZJaW5N?=
=?utf-8?B?aVIvSi9GWUQrdERiUldiZXZjTWtjL1hrc2lzakNqMDJhcU9HODhCSWFFSVRu?=
=?utf-8?B?Unh5bzdnZTF6UUhlSEJuK3FqVFpkUDlKR3lYZHExVW5mSHhmdERtMjBJZXMy?=
=?utf-8?B?S3pVaEtUWXFXNzlzcy9Oa1hnRGZHNndtcEZhNFJsVFBpcU5nWHhhcG5BYTlv?=
=?utf-8?B?MjZzVFg4aitTZUl5MTN4WEJYSG9TQVZNM0RtSmQ3NzJ5QjFLSWVLMlJ2NXdW?=
=?utf-8?B?NW0vR3BGcWwvdFdEZHZPdmEvdXhlUVVVaE1tQVh0SnpLNnVFdkNlMXhWbWNW?=
=?utf-8?B?aTZwaGFVbXJOYmZMeklBc0ZnYkpmdVdhUnI3cC9MOTNDcUdCcHl6SWZQN0d4?=
=?utf-8?B?RXVnMlhGN01PWUROYVpzQ3oxZHNwY2NjeCtjNVo5d3dRQmtwRlZ0RHE0dE5I?=
=?utf-8?B?V2pJcGdnUUQ2UE5xdjVoYnlocXJsVUxEUjR6K2hqVFNxN053OGE4ZWtYVElk?=
=?utf-8?B?TXdRT3dGaGxiMDVMdFRqanpLV3BYUDVISmNNeUx3WjloY0RCWGhqajlPV1BT?=
=?utf-8?B?RHRtSmt5MjQ0WkZ2T2NMYmR0Z1NORUZxNWZ4STBjbHN0eWVKR2VxVDV5dzNT?=
=?utf-8?B?SFk2MTZycFFCcGNWMXMwbTQvL3VkUHR4L0o5cStHVWhjOE1kSC96eUROeHhE?=
=?utf-8?B?Wit2RTJ2aHpiS25GY2luNXhXZUZsaFNHUUJUY2xkb3VFVllya2FWSFdIeTJm?=
=?utf-8?B?VnBjMmI4Q2dEcERCdllFa0xBK1M4aFcxdER2eWgvajNYM2hNTU5OY1ljS1pz?=
=?utf-8?B?RWRXUUhXU0UxNEY0OVUySHV3NEE4dGNGeU1MS3Q5QlRCWTh3Q0daamIxajg1?=
=?utf-8?B?ckJ0U3h4ejJ3ZzVGc0xyaGlOZDhFVDRvQTRrUmJCZmNBYWNOajdwNTU4VkVp?=
=?utf-8?B?UG1GYUNLRFVYS0dzYjJDNjlRajJwK25QNmxUSTMwRVE2cWl4WWJoandLeDla?=
=?utf-8?B?UzU2OEgzYlBVN0RnSVhTN21zelVHUGo2SExvSklWMEhtMFRBL0llMzloOG1a?=
=?utf-8?B?QjNKeUg1OTNzOTJUbSt2T1hpQnFCeE5GUDJVTHdUNDNOc3A3TitjMmZ2SnI5?=
=?utf-8?B?Mk5CMk9KcHUvZGpLQUhYNVhNaHFoSkZzUHBKcmdNQUNsZHdsdUVabjVPQ1du?=
=?utf-8?B?QzFURDRkbUFPbGwrWk1XVHI4cUIycGs2cUpTSUlsL1lVYlgvVFV3SzArSnE0?=
=?utf-8?B?OFduclRtT3BMdFJWdnV0bktlQ3BpNkpnY0RHRkdGeHU4TUgwRlZ6RWg5Mldz?=
=?utf-8?B?a3c9PQ==?=
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0:
cPkYAsvwgccyr4vHqVJ3D/TP4CwVtsgpzVSLP81GDqFn74ol0qVZLJJMX8+bJjwDrScLOXEpNeOqYUnBg8QNLgoFRIx5sCTGYyCEXDvr2gBBDc17/8PgW2603v7e4C7tkhUQT7CcZgciga8ZgbTuAVuIOe183WktH5++Psz86/Zp943V+n/KSRrPxAVnP/igGFoG4aJg0fz2B7x6pKTCeHRLGo8bgQcRKJJEK4cO/i6lvh1hPFS+N16wki5Li0RlJBUq2rVilpYf7jR6IoWBiPAd0UwYDi/DOuiinK9WR6TedB0Ju/XILYWEuhQlgUC4xKEkSRt4HE5jWKwPA90EfkTywz9lfLciY2wvpmKhI0nqqnfuyldbLge1VxZu1vCLAgIiRg45olgznmcnxu8AwNgkYTJ0Mes/8ZUPlFWggRY6uWauIW6TwmdKMkFusICHur+dBIr2YQZF9lZtpvCjaKcjig1ZPnjvRjYeyFFpn4Uz4VN+yldo4jl3a762XGUMT6Os0+nTtSqQ+4as+LG/T5aS1NHAy2o8goxfF8CWca8lGrxw4AUiZdxXZEq9KZ9uPhWUi26wbRtS/KASdnFV7Rk0ohGO8fbnkS/fXuAi8mE=
X-OriginatorOrg: oracle.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 213041e7-8b5c-471b-5ff6-08dda37252bd
X-MS-Exchange-CrossTenant-AuthSource: DS7PR10MB5328.namprd10.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 14:15:56.9570
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: mlS9L+yOiMqIXoHS4VhSxDtLw3AGvXUdsxKObyol7oEcA02WOQ0Vt9GUQ1amTcLuV+FAy2beJ5+s3Okl+pnjkX1u+yjTZXwXVullj00VD1A=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR10MB8175
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 adultscore=0 malwarescore=0
phishscore=0 mlxscore=0 mlxlogscore=999 suspectscore=0 bulkscore=0
classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2505160000
definitions=main-2506040109
X-Authority-Analysis: v=2.4 cv=aqqyCTZV c=1 sm=1 tr=0 ts=68405522 b=1 cx=c_pps a=zPCbziy225d3KhSqZt3L1A==:117 a=zPCbziy225d3KhSqZt3L1A==:17 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19
a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10 a=GoEa3M9JfhUA:10 a=yMhMjlubAAAA:8 a=B_lyg1YCA3zTvVKZH2oA:9 a=QEXdDO2ut3YA:10 cc=ntf awl=host:13206
X-Proofpoint-GUID: KpShytlLp-cSGLmsVGsnvPftgMkpsrz1
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDEwOSBTYWx0ZWRfX51hypwbPCxD7 5jrk9Jfe97KZBnGUh6mo0jSP8RIVA3PrO08enuy0BZDXqvp8MnDA1IgbYA/I2Itffq+yvMIrQGq tDmcXjW2uyUjIcne0Sp+y2h8bOBhsGSQYu9H1WhdowXs8gP8RNnsuN+hSQrkHmu2rr2KCWDYpyj
vn+m8DEkX+MWRHp05GXYOJZPnYnIqbi6vkjJ6Xfl0HP71aZ1XuBTJK7YuWVV8z1zndavEPiDW5i bRireissLP/H4W2NTm6pcDsmMUMU9f6lTFR8loO6zNn39wRAGagNZHQvNJNEYPK/lqv6uyVcNRS W7EEIWlyK4bxBrEr9iC662Ni1TPLYFq2HdsfACWht+nyLHCShbZzjX96bBvAaXyOW8OpS5cvvnD
jOmD6Ra9eH2+6r5/02fUC1zolTN4E1iTGLIcLPVeBWECqv4DSsepAsDCEdLH4ua08/VelKJP
X-Proofpoint-ORIG-GUID: KpShytlLp-cSGLmsVGsnvPftgMkpsrz1
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 04-06-2025 06:13, Roman Kisel wrote:
To run a confidential VMBus channels, one has to initialize the
co_ring_buffers and co_external_memory fields of the channel
structure.
Advertise support upon negoatiating the version and compute
values for those fields and initialize them.
Signed-off-by: Roman Kisel <romank@xxxxxxxxxxxxxxxxxxx>
---
drivers/hv/channel_mgmt.c | 19 +++++++++++++++++++
drivers/hv/connection.c | 3 +++
2 files changed, 22 insertions(+)
diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
index ca2fe10c110a..33bc29e826bd 100644
--- a/drivers/hv/channel_mgmt.c
+++ b/drivers/hv/channel_mgmt.c
@@ -1021,6 +1021,7 @@ static void vmbus_onoffer(struct vmbus_channel_message_header *hdr)
struct vmbus_channel_offer_channel *offer;
struct vmbus_channel *oldchannel, *newchannel;
size_t offer_sz;
+ bool co_ring_buffer, co_external_memory;
offer = (struct vmbus_channel_offer_channel *)hdr;
@@ -1033,6 +1034,22 @@ static void vmbus_onoffer(struct vmbus_channel_message_header *hdr)
return;
}
+ co_ring_buffer = is_co_ring_buffer(offer);
+ if (co_ring_buffer) {
+ if (vmbus_proto_version < VERSION_WIN10_V6_0 || !vmbus_is_confidential()) {
+ atomic_dec(&vmbus_connection.offer_in_progress);
+ return;
+ }
+ }
+
+ co_external_memory = is_co_external_memory(offer);
+ if (is_co_external_memory(offer)) {
Redundant call for is_co_external_memory()
if(co_external_memory)
+ if (vmbus_proto_version < VERSION_WIN10_V6_0 || !vmbus_is_confidential()) {
+ atomic_dec(&vmbus_connection.offer_in_progress);
+ return;
+ }
+ }
+
oldchannel = find_primary_channel_by_offer(offer);
if (oldchannel != NULL) {
@@ -1111,6 +1128,8 @@ static void vmbus_onoffer(struct vmbus_channel_message_header *hdr)
pr_err("Unable to allocate channel object\n");
return;
}
+ newchannel->co_ring_buffer = co_ring_buffer;
+ newchannel->co_external_memory = co_external_memory;
vmbus_setup_channel_state(newchannel, offer);
diff --git a/drivers/hv/connection.c b/drivers/hv/connection.c
index be490c598785..eeb472019d69 100644
--- a/drivers/hv/connection.c
+++ b/drivers/hv/connection.c
@@ -105,6 +105,9 @@ int vmbus_negotiate_version(struct vmbus_channel_msginfo *msginfo, u32 version)
vmbus_connection.msg_conn_id = VMBUS_MESSAGE_CONNECTION_ID;
}
+ if (vmbus_is_confidential() && version >= VERSION_WIN10_V6_0)
+ msg->feature_flags = VMBUS_FEATURE_FLAG_CONFIDENTIAL_CHANNELS;
+
/*
* shared_gpa_boundary is zero in non-SNP VMs, so it's safe to always
* bitwise OR it
Thanks,
Alok
Return-Path: <linux-kernel+bounces-673333-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id A012B41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:16:57 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 5D95B3A797D
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:16:31 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 1A27B290D81;
Wed, 4 Jun 2025 14:16:35 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="vutKBtro"
Received: from out30-97.freemail.mail.aliyun.com (out30-97.freemail.mail.aliyun.com [115.124.30.97])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id D0D50290094;
Wed, 4 Jun 2025 14:16:30 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.97
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749046594; cv=none; b=tIyRQ17sYXjnxUIUwXOgf3DxUgDyMeYVS5ufK8QQcv5U/EETHPajz2BQzqi9cx5Tp2KjzgZWewUEiAgaR3c6EcUQFze2zcSJvrhCmnHFkTv0iGlP57PaYF54tocaQFILt2ULpAyw+ucz9gs3ch0pvG3lulu6l9xeLPLe3bXOrb0=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749046594; c=relaxed/simple;
bh=QVGHxv5yv8Xa1quyiBjHI4r3pwDZnDe3cLJmy+ls+ds=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=u6ObLGg7MSWI3IjU/9cS02uShrrLxRf9jd1oDg8TDNiaYddZdrjOYgEO3bPZF4Plgu+SQxu5AP64p4Zz11TnFdpjsOjO02xbbNrevDni4u+tUkFMJfJSVO3jtYqwNjoAl+cHs7AWId2NjEjd2I76sVrSziIzIuVXcuA8WlcNDpM=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=vutKBtro; arc=none smtp.client-ip=115.124.30.97
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com
DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed;
d=linux.alibaba.com; s=default;
t=1749046581; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type;
bh=sl7zkIjY2EtL4gQUaLHHsUyVaTgNOPl8UyCODnHq/ts=;
b=vutKBtro0b0lToHaUdzBqdVefNiQji7KMrNS9jtAh+jwlWKeLW29Qn6jN/MjBTugufHK9B8zbWdYn9oUCTBfW/HKgHXtHQnmUdVyn3GIeVBofNtof2xUOGoXq9SKMvH5ehLH9sbFvBblAxpnpoYgAQWTrU934YePJa7oF6j5v6I=
Received: from 192.168.0.105(mailfrom:baolin.wang@xxxxxxxxxxxxxxxxx fp:SMTPD_---0Wd4ZSft_1749046579 cluster:ay36)
by smtp.aliyun-inc.com;
Wed, 04 Jun 2025 22:16:19 +0800
Message-ID: <d2b76402-7e1a-4b2d-892a-2e8ffe1a37a9@xxxxxxxxxxxxxxxxx>
Date: Wed, 4 Jun 2025 22:16:18 +0800
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH] mm: fix the inaccurate memory statistics issue for users
To: Vlastimil Babka <vbabka@xxxxxxx>, Shakeel Butt <shakeel.butt@xxxxxxxxx>,
Michal Hocko <mhocko@xxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, david@xxxxxxxxxx,
lorenzo.stoakes@xxxxxxxxxx, Liam.Howlett@xxxxxxxxxx, rppt@xxxxxxxxxx,
surenb@xxxxxxxxxx, donettom@xxxxxxxxxxxxx, aboorvad@xxxxxxxxxxxxx,
sj@xxxxxxxxxx, linux-mm@xxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
References: <4f0fd51eb4f48c1a34226456b7a8b4ebff11bf72.1748051851.git.baolin.wang@xxxxxxxxxxxxxxxxx>
<20250529205313.a1285b431bbec2c54d80266d@xxxxxxxxxxxxxxxxxxxx>
<aDm1GCV8yToFG1cq@tiehlicka>
<72f0dc8c-def3-447c-b54e-c390705f8c26@xxxxxxxxxxxxxxxxx>
<aD6vHzRhwyTxBqcl@tiehlicka>
<ef2c9e13-cb38-4447-b595-f461f3f25432@xxxxxxxxxxxxxxxxx>
<aD7OM5Mrg5jnEnBc@tiehlicka>
<7307bb7a-7c45-43f7-b073-acd9e1389000@xxxxxxxxxxxxxxxxx>
<aD8LKHfCca1wQ5pS@tiehlicka>
<obfnlpvc4tmb6gbd4mw7h7jamp3kouyhnpl4cusetyctswznod@yr6dyrsbay6w>
<250ec733-8b2d-4c56-858c-6aada9544a55@xxxxxxxxxxxxxxxxx>
<1aa7c368-c37f-4b00-876c-dcf51a523c42@xxxxxxx>
From: Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx>
In-Reply-To: <1aa7c368-c37f-4b00-876c-dcf51a523c42@xxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-10.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,
USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 2025/6/4 21:46, Vlastimil Babka wrote:
On 6/4/25 14:46, Baolin Wang wrote:
Baolin, please run stress-ng command that stresses minor anon page
faults in multiple threads and then run multiple bash scripts which cat
/proc/pidof(stress-ng)/status. That should be how much the stress-ng
process is impacted by the parallel status readers versus without them.
Sure. Thanks Shakeel. I run the stress-ng with the 'stress-ng --fault 32
--perf -t 1m' command, while simultaneously running the following
scripts to read the /proc/pidof(stress-ng)/status for each thread.
How many of those scripts?
1 script, but will start 32 threads to read each stress-ng thread's
status interface.
From the following data, I did not observe any obvious impact of this
patch on the stress-ng tests when repeatedly reading the
/proc/pidof(stress-ng)/status.
w/o patch
stress-ng: info: [6891] 3,993,235,331,584 CPU Cycles
59.767 B/sec
stress-ng: info: [6891] 1,472,101,565,760 Instructions
22.033 B/sec (0.369 instr. per cycle)
stress-ng: info: [6891] 36,287,456 Page Faults Total
0.543 M/sec
stress-ng: info: [6891] 36,287,456 Page Faults Minor
0.543 M/sec
w/ patch
stress-ng: info: [6872] 4,018,592,975,968 CPU Cycles
60.177 B/sec
stress-ng: info: [6872] 1,484,856,150,976 Instructions
22.235 B/sec (0.369 instr. per cycle)
stress-ng: info: [6872] 36,547,456 Page Faults Total
0.547 M/sec
stress-ng: info: [6872] 36,547,456 Page Faults Minor
0.547 M/sec
=========================
#!/bin/bash
# Get the PIDs of stress-ng processes
PIDS=$(pgrep stress-ng)
# Loop through each PID and monitor /proc/[pid]/status
for PID in $PIDS; do
while true; do
cat /proc/$PID/status
usleep 100000
Hm but this limits the reading to 10 per second? If we want to simulate an
adversary process, it should be without the sleeps I think?
OK. I drop the usleep, and I still can not see obvious impact.
w/o patch:
stress-ng: info: [6848] 4,399,219,085,152 CPU Cycles
67.327 B/sec
stress-ng: info: [6848] 1,616,524,844,832 Instructions
24.740 B/sec (0.367 instr. per cycle)
stress-ng: info: [6848] 39,529,792 Page Faults Total
0.605 M/sec
stress-ng: info: [6848] 39,529,792 Page Faults Minor
0.605 M/sec
w/patch:
stress-ng: info: [2485] 4,462,440,381,856 CPU Cycles
68.382 B/sec
stress-ng: info: [2485] 1,615,101,503,296 Instructions
24.750 B/sec (0.362 instr. per cycle)
stress-ng: info: [2485] 39,439,232 Page Faults Total
0.604 M/sec
stress-ng: info: [2485] 39,439,232 Page Faults Minor
0.604 M/sec
Return-Path: <linux-kernel+bounces-673334-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 86AA541E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:17:28 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 5AC8B189A63E
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:17:38 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 67061290BDA;
Wed, 4 Jun 2025 14:16:54 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="YiqDS7o5"
Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0332D70810;
Wed, 4 Jun 2025 14:16:51 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.92.199
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749046613; cv=none; b=mcs3vFSqanAxXuQt0CI8POG0agfhg9txlU2I/OZnsBM3va14Jh44w+TVaxfPNOvILEaegC1RLBtdvpTntq1O6652U7SdK5ceMbfv2A5fOgSrHOIHMDb+mV1sJXMuL+wsrchPXI6t8PlxSOrtc5aY1UzX1PDke+ZKwU6F2XHgaIE=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749046613; c=relaxed/simple;
bh=/YWykEisRQ2WmTIDjG72mSa5eF+TJ63K3gwljHiPuBE=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=Bf73hQtT+BCvcwky9gYL1w+Msnc/ELY/CWLYm/dBVbWu5idwEl3gWKRxNRkjYZh/6vDMit7w1SpNqnuOkiPPlZCHCB7EG5DtWW7rSz0mxGCZt12h654rYlobJ4cnr27fNT5EuqO6gM/boWYD/LNwVjGmfd96/ZmEY4KxD4bZYnM=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=YiqDS7o5; arc=none smtp.client-ip=90.155.92.199
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org
Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version:
References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:
Content-Transfer-Encoding:Content-ID:Content-Description;
bh=QNl5vGajRvJwYB9vPMZwKE2YZ8Aq0k/Jqe04/75BEQQ=; b=YiqDS7o5oRM1rJDLzzov6oLFeh
XiW5LbKWoWlihyb1MEdtj2n6iZyd9dkUbopJnh0GUbx3Y5AMT57huRJctGlaf5KA7Xt+7tgLposOn
UsXCRNTbhgHXiRBJabcBVBDzSvvqbcSHV6HGQSTw1sLnl/kshU+h5mhvket7tvG02PQllQXvLFR59
QiKC7oYTu0t9ynzaCLDn2ZGBIfEDUZ7Vj2ZtyeARJQADCMR6DagT9CjkTzI3bwmDlsUGyZXL/C3M5
KWqD5mMBlTe4qJWkc+KIt1yJ/8ck2zVYh5ZsyTONE4Zj+VveA8+EHGGkIlNMWPJOLZvXLQr8Cvsb1
AtZ7SQcA==;
Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net)
by desiato.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux))
id 1uMov3-00000000uH8-2nkQ;
Wed, 04 Jun 2025 14:16:42 +0000
Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000)
id 8337F300787; Wed, 4 Jun 2025 16:16:40 +0200 (CEST)
Date: Wed, 4 Jun 2025 16:16:40 +0200
From: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
To: Leo Yan <leo.yan@xxxxxxx>
Cc: Yeoreum Yun <yeoreum.yun@xxxxxxx>, mingo@xxxxxxxxxx, mingo@xxxxxxxxxx,
acme@xxxxxxxxxx, namhyung@xxxxxxxxxx, mark.rutland@xxxxxxx,
alexander.shishkin@xxxxxxxxxxxxxxx, jolsa@xxxxxxxxxx,
irogers@xxxxxxxxxx, adrian.hunter@xxxxxxxxx,
kan.liang@xxxxxxxxxxxxxxx, linux-perf-users@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, David Wang <00107082@xxxxxxx>
Subject: Re: [PATCH 1/1] perf/core: fix dangling cgroup pointer in cpuctx
Message-ID: <20250604141640.GL38114@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20250602184049.4010919-1-yeoreum.yun@xxxxxxx>
<20250603140040.GB8020@xxxxxxxxxxxxxxx>
<20250603144414.GC38114@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
<20250604080339.GB35970@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
<20250604101821.GC8020@xxxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20250604101821.GC8020@xxxxxxxxxxxxxxx>
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 11:18:21AM +0100, Leo Yan wrote:
On Wed, Jun 04, 2025 at 10:03:39AM +0200, Peter Zijlstra wrote:
> And now we have the sitation that __perf_remove_from_context() can do:
>
> {ACTIVE,INACTIVE,OFF,ERROR} -> {OFF,EXIT,REVOKED,DEAD}
A detailed transition is:
Case 1: {ACTIVE} -> {INACTIVE} -> {OFF,EXIT,REVOKED,DEAD}
It can also start with INACTIVE, but yeah..
Case 2: {ERROR} -> {ERROR,EXIT,REVOKED,DEAD}
Case 3: {OFF} -> {OFF,EXIT,REVOKED,DEAD}
> Where the {OFF,ERROR} -> * transition already have
> perf_cgroup_event_disable(), but the {ACTIVE,INACTIVE} -> * part has
> not.
Just a minor concern.
I noticed perf_put_aux_event() sets the ERROR state for sibling events
of an AUX event.
There is also perf_remove_sibling_event(), which can cause ERROR.
IIUC, the AUX event is the group leader, so we only
need to clean up the cgroup pointer for the AUX event, and simply set
the ERROR state for its sibling events, correct?
Not sure; I forever forget how the AUX events are supposed to work :-/
It might be prudent to do something like so:
diff --git a/kernel/events/core.c b/kernel/events/core.c
index f34c99f8ce8f..e6583747838a 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -2149,8 +2149,9 @@ perf_aux_output_match(struct perf_event *event, struct perf_event *aux_event)
}
static void put_event(struct perf_event *event);
-static void event_sched_out(struct perf_event *event,
- struct perf_event_context *ctx);
+static void __event_disable(struct perf_event *event,
+ struct perf_event_context *ctx,
+ enum perf_event_state state);
static void perf_put_aux_event(struct perf_event *event)
{
@@ -2183,8 +2184,7 @@ static void perf_put_aux_event(struct perf_event *event)
* state so that we don't try to schedule it again. Note
* that perf_event_enable() will clear the ERROR status.
*/
- event_sched_out(iter, ctx);
- perf_event_set_state(event, PERF_EVENT_STATE_ERROR);
+ __event_disable(event, ctx, PERF_EVENT_STATE_ERROR);
}
}
@@ -2242,18 +2242,6 @@ static inline struct list_head *get_event_list(struct perf_event *event)
&event->pmu_ctx->flexible_active;
}
-/*
- * Events that have PERF_EV_CAP_SIBLING require being part of a group and
- * cannot exist on their own, schedule them out and move them into the ERROR
- * state. Also see _perf_event_enable(), it will not be able to recover
- * this ERROR state.
- */
-static inline void perf_remove_sibling_event(struct perf_event *event)
-{
- event_sched_out(event, event->ctx);
- perf_event_set_state(event, PERF_EVENT_STATE_ERROR);
-}
-
static void perf_group_detach(struct perf_event *event)
{
struct perf_event *leader = event->group_leader;
@@ -2289,8 +2277,15 @@ static void perf_group_detach(struct perf_event *event)
*/
list_for_each_entry_safe(sibling, tmp, &event->sibling_list, sibling_list) {
+ /*
+ * Events that have PERF_EV_CAP_SIBLING require being part of
+ * a group and cannot exist on their own, schedule them out
+ * and move them into the ERROR state. Also see
+ * _perf_event_enable(), it will not be able to recover this
+ * ERROR state.
+ */
if (sibling->event_caps & PERF_EV_CAP_SIBLING)
- perf_remove_sibling_event(sibling);
+ __event_disable(sibling, ctx, PERF_EVENT_STATE_ERROR);
sibling->group_leader = sibling;
list_del_init(&sibling->sibling_list);
@@ -2562,6 +2557,19 @@ static void perf_remove_from_context(struct perf_event *event, unsigned long fla
event_function_call(event, __perf_remove_from_context, (void *)flags);
}
+static void __event_disable(struct perf_event *event,
+ struct perf_event_context *ctx,
+ enum perf_event_state state)
+{
+ if (event == event->group_leader)
+ group_sched_out(event, ctx);
+ else
+ event_sched_out(event, ctx);
+
+ perf_event_set_state(event, state);
+ perf_cgroup_event_disable(event, ctx);
+}
+
/*
* Cross CPU call to disable a performance event
*/
@@ -2575,15 +2583,7 @@ static void __perf_event_disable(struct perf_event *event,
perf_pmu_disable(event->pmu_ctx->pmu);
ctx_time_update_event(ctx, event);
-
- if (event == event->group_leader)
- group_sched_out(event, ctx);
- else
- event_sched_out(event, ctx);
-
- perf_event_set_state(event, PERF_EVENT_STATE_OFF);
- perf_cgroup_event_disable(event, ctx);
-
+ __event_disable(event, ctx, PERF_EVENT_STATE_OFF);
perf_pmu_enable(event->pmu_ctx->pmu);
}
Return-Path: <linux-kernel+bounces-673335-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id C742741E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:17:49 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 759FA189AC1F
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:17:55 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 13E502900B7;
Wed, 4 Jun 2025 14:17:21 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="DO5iJMat"
Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7DD3870810;
Wed, 4 Jun 2025 14:17:18 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.10
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749046640; cv=none; b=GhecgNakvgXcuAwiWLWbo+Qw0Blp3VtayZyrPO+x5Xor09f48AM26KKeBnYge3U5pysk7P7IeiWzQKhvFsfSFzA0PaZdrwxOMt/MPQ0XYquGufAgm8uCSJ1G8lM1Hm5mYI9duqkqkSOxFVLMcQTZ06qGWjk/2dRI5cGA278lG1Q=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749046640; c=relaxed/simple;
bh=N3zAS7KbRmxSSWpgx3DYsurs4M4ohLgCBpXoeWFUkw0=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=udv7KiIuiohS5PjCDNv39iJGo4T+rSmXHlVwoIqDLMDwVjXVTe2aErOZx9DbjIN4lKFARHQSLpfYzWViV1Iu+cFJlqD8Jj33HcLXNHRnGrRggF1Jbtc3/Hubtr/pOOr3ps6Ud8pfLNl9IcMduc7NKTTE/EJ27N36iu2jdkBhdIU=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=DO5iJMat; arc=none smtp.client-ip=192.198.163.10
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com
Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
t=1749046638; x=1780582638;
h=message-id:date:mime-version:subject:to:cc:references:
from:in-reply-to:content-transfer-encoding;
bh=N3zAS7KbRmxSSWpgx3DYsurs4M4ohLgCBpXoeWFUkw0=;
b=DO5iJMatiaPgo0B+pKqysW/ezQSUbW/50nyWb6orpugLeqrvpCWYO348
EoXB5f2eqKw6WVfn+bHtqSi659XwvBHhVASD/TCxOEiXjrXPedgCJRkyd
M7seKPOm7rEk8nz6pGTocx6o7uGZyWUYdxcLEHbqFWaYSvixk8qGPBfTz
3fgI9vMnGN0aDt/53lYNrHDSboLw1xCV7bKYzmCBG6R1hXFbkJbLHlvq/
bEBzqRT4sK25M04lJkQYlKcxm3NVUbfkg7TYMOJCPXR/MWjf57rFAgLTl
1QO/FYXQdw7ePbSCzwpMUUWJ8ruaulP8Bj89fKkxK4MIbZ6iXK1y91MBc
Q==;
X-CSE-ConnectionGUID: rWzHQ6hdT+uRNpUeFdz49g==
X-CSE-MsgGUID: fqTOauj6QgOI6NVqdudaeg==
X-IronPort-AV: E=McAfee;i="6800,10657,11454"; a="62489080"
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="62489080"
Received: from fmviesa007.fm.intel.com ([10.60.135.147])
by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 07:17:17 -0700
X-CSE-ConnectionGUID: zm8arlrJTxmzd+YMP9V39w==
X-CSE-MsgGUID: 231SeiXeTnuDl2uDP9aoOg==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="145169480"
Received: from unknown (HELO [10.237.72.199]) ([10.237.72.199])
by fmviesa007.fm.intel.com with ESMTP; 04 Jun 2025 07:17:15 -0700
Message-ID: <459184db-6fc6-453b-933d-299f827bdc55@xxxxxxxxxxxxxxx>
Date: Wed, 4 Jun 2025 17:17:14 +0300
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v1 1/2] usb: xhci: Skip xhci_reset in xhci_resume if xhci
is being removed
To: Thinh Nguyen <Thinh.Nguyen@xxxxxxxxxxxx>
Cc: "mathias.nyman@xxxxxxxxx" <mathias.nyman@xxxxxxxxx>,
Roy Luo <royluo@xxxxxxxxxx>,
"quic_ugoswami@xxxxxxxxxxx" <quic_ugoswami@xxxxxxxxxxx>,
"gregkh@xxxxxxxxxxxxxxxxxxx" <gregkh@xxxxxxxxxxxxxxxxxxx>,
"michal.pecio@xxxxxxxxx" <michal.pecio@xxxxxxxxx>,
"linux-usb@xxxxxxxxxxxxxxx" <linux-usb@xxxxxxxxxxxxxxx>,
"linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>,
"stable@xxxxxxxxxxxxxxx" <stable@xxxxxxxxxxxxxxx>
References: <20250522190912.457583-1-royluo@xxxxxxxxxx>
<20250522190912.457583-2-royluo@xxxxxxxxxx>
<20250523230633.u46zpptaoob5jcdk@xxxxxxxxxxxx>
<b982ff0e-1ae8-429d-aa11-c3e81a9c14e5@xxxxxxxxxxxxxxx>
<20250529011745.xkssevnj2u44dxqm@xxxxxxxxxxxx>
Content-Language: en-US
From: Mathias Nyman <mathias.nyman@xxxxxxxxxxxxxxx>
In-Reply-To: <20250529011745.xkssevnj2u44dxqm@xxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 29.5.2025 4.17, Thinh Nguyen wrote:
On Mon, May 26, 2025, Mathias Nyman wrote:
On 24.5.2025 2.06, Thinh Nguyen wrote:
Hi Mathias, Roy,
On Thu, May 22, 2025, Roy Luo wrote:
xhci_reset() currently returns -ENODEV if XHCI_STATE_REMOVING is
set, without completing the xhci handshake, unless the reset completes
exceptionally quickly. This behavior causes a regression on Synopsys
DWC3 USB controllers with dual-role capabilities.
Specifically, when a DWC3 controller exits host mode and removes xhci
while a reset is still in progress, and then attempts to configure its
hardware for device mode, the ongoing, incomplete reset leads to
critical register access issues. All register reads return zero, not
just within the xHCI register space (which might be expected during a
reset), but across the entire DWC3 IP block.
This patch addresses the issue by preventing xhci_reset() from being
called in xhci_resume() and bailing out early in the reinit flow when
XHCI_STATE_REMOVING is set.
Cc: stable@xxxxxxxxxxxxxxx
Fixes: 6ccb83d6c497 ("usb: xhci: Implement xhci_handshake_check_state() helper")
Suggested-by: Mathias Nyman <mathias.nyman@xxxxxxxxx>
Signed-off-by: Roy Luo <royluo@xxxxxxxxxx>
---
drivers/usb/host/xhci.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 90eb491267b5..244b12eafd95 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -1084,7 +1084,10 @@ int xhci_resume(struct xhci_hcd *xhci, bool power_lost, bool is_auto_resume)
xhci_dbg(xhci, "Stop HCD\n");
xhci_halt(xhci);
xhci_zero_64b_regs(xhci);
- retval = xhci_reset(xhci, XHCI_RESET_LONG_USEC);
+ if (xhci->xhc_state & XHCI_STATE_REMOVING)
+ retval = -ENODEV;
+ else
+ retval = xhci_reset(xhci, XHCI_RESET_LONG_USEC);
How can this prevent the xhc_state from changing while in reset? There's
no locking in xhci-plat.
Patch 2/2, which is the revert of 6ccb83d6c497 prevents xhci_reset() from
aborting due to xhc_state flags change.
This patch makes sure xHC is not reset twice if xhci is resuming due to
remove being called. (XHCI_STATE_REMOVING is set).
Wouldn't it still be possible for xhci to be removed in the middle of
reset on resume? The watchdog may still timeout afterward if there's an
issue with reset right?
Probably yes, but that problem is the same if we only revert 6ccb83d6c497.
Why intentionally bring back the Qcom watchdog issue by only reverting
6ccb83d6c497 ?. Can't we solve both in one go?
I feel that the fix is doesn't cover all the scenarios, that's why I
suggest the revert for now and wait until the fix is properly tested
before applying it to stable?
Ok, we have different views on this.
I think we should avoid causing as much known regression as possible even
if the patch might not cover all scenarios.
By reverting 6ccb83d6c497 we fix a SNPS DWC3 regression, but at the same
time bring back the Qcom issue, so cause another regression.
We can avoid the main part or the Qcom regression by adding this patch as
issue is with (long) xhci reset during resume if xhci is being removed, and
driver always resumes xhci during ->remove callback.
If we discover the patch is not perfect then we fix it
Thanks
Mathias
Return-Path: <linux-kernel+bounces-673336-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id DBD9C41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:18:05 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 8FCBE7AA69A
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:16:44 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id ACE4E290DB0;
Wed, 4 Jun 2025 14:17:24 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DQ6cHHDv"
Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7E4BE290D8B;
Wed, 4 Jun 2025 14:17:22 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.171
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749046643; cv=none; b=QzUdKQrSoVt4kyq/pYHGdqp9IrCOW0DEb1Vml8z/SqsSE+JSk58/EJn9cv/GpSWt07fsD9tYb5ZBdxMhzsYkh2+1rmSRjnmB5Anb4Km5lW/TiUn3wtGO/DO4659al2WdLm7kYqok2uhj8cOhP57Bo4zjaEAnRvNLqQXTkbcGJnk=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749046643; c=relaxed/simple;
bh=Nnuyl9wD25Z9WoJOMjCag6e7edZarcfbMnxn+kgonFI=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=qE5L/4RGsSdfrZ9OXHdJ6ARln2k76NiIjAKN5lAM3lolt5v2Cykt9iti2QDJWeXrocYxhsXHAY87HX5Uv/xejLCDtc2qs0zMcBZ3DVVBpnsDbS6aRr+lsL2CDM65eKXoZgMTNsxqlayJVnaLDP4N9tEzwixaCABIH4GrypY3QXg=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=DQ6cHHDv; arc=none smtp.client-ip=209.85.214.171
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-234b9dfb842so65165595ad.1;
Wed, 04 Jun 2025 07:17:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1749046642; x=1749651442; darn=vger.kernel.org;
h=content-transfer-encoding:in-reply-to:from:content-language
:references:cc:to:subject:user-agent:mime-version:date:message-id
:from:to:cc:subject:date:message-id:reply-to;
bh=cbNMtoTuh7H5yqZEP3R1sHyOOtxrJsRVIWBb21IBiJI=;
b=DQ6cHHDvTraqcsf/V6XzWpJh0wRCZ6GNIGeAJlTc6gB8vmEs+9HrytmMwZ6d6MPoNz
6nx4pq17I4nvMDF4VT03hfRi0coR4lDO74O7kNOvkAHszEZ/PjS6DGAvUXXlksNj6Y4k
uPRaKp3c40nc9Vzs03noNcHewp1YYYU/N4xSQswOfh+ppeevaVrrlSGePBHCzvqh/s80
RvWPdoarWGGlAI2pxELJGa6CqUGP+ON+BPGQZ57XTo9TJkytNif0aiKxkucpnRIMmQOE
6dlASWoZN22/7EZlk5qt8NEq+a/pf269bI9MdgUpr9qzxYancwjNH6ZOcvkX31HjqlIU
MitA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749046642; x=1749651442;
h=content-transfer-encoding:in-reply-to:from:content-language
:references:cc:to:subject:user-agent:mime-version:date:message-id
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=cbNMtoTuh7H5yqZEP3R1sHyOOtxrJsRVIWBb21IBiJI=;
b=kIWwDmzCJJi83MHjz9rwsfYHdOuZNFVZ0Y4qYGUKhsIsDxl9LZpLsXaJzDOZX0Hedn
qlbTqHif3FV7JDAy424q8ZAKa69u3iFxHL3svAOAAW2w73dm8I8Hz8fMtmPTWrVlmXWS
DPIecgnDvCE3n2QnZQqqdZQg5TBhMsJl2dtShQRN7L+sQGAV9wVJwM5aSoQCubjvqqxW
M5Qfu/JFZ2EIh+oMui3cQ1LeW18m6h8MudLH4GMUj/zceqe636QxAMBUoNyre5K2+PQA
inY8QkxVLivViTmUA8b4OQpcLUg65l9DdxKAPKXbcsCxGTa25sJsODBIwFW6FO+Wy4BR
9Zkg==
X-Forwarded-Encrypted: i=1; AJvYcCUgRXznLIKqF+5EqTW72JdD9xksl0ueeCZBv+P33pRlk/cAka4/0CMXh+IZUPwDOMVRI7U=@vger.kernel.org, AJvYcCVCcvT5xW+9quX2/ZAklhtt6Yegn4KB2uD7sprd5GFHutR+hXX6FNLE2KRXd1fvJJn+ZZnw7gbV@xxxxxxxxxxxxxxx, AJvYcCXpQO0Yf0k85sqPoUMq/+3Iwy+ZOibUP3s55M6c2rL/GRM4nOHraJMcaVqU9YX3KF7Emc4mQ9YZxDxVzNJq@xxxxxxxxxxxxxxx
X-Gm-Message-State: AOJu0YxDVJqeHqbG6AdDrfZf2Sxwk3Lt5f1NTqdzujYLIUvAnG1BQoNU
VgFWhe6mBSe5Wpo2txBoOaArEhIaR2lMzD+bAoSGSwigRskHRM2o3LIP
X-Gm-Gg: ASbGncuyMJncbv2+MqxPv4tW0yo0qbAe4Cy1rNuuCud+9BNWYjwFxjzmCsD2Au0oZ8X
WGz+KQ9hMAIntKiB+Duv290NDAfNzXe6kmWBOV+bT41WSuK3cftQmYg+LT39CzQm5iTqvu8CpzE
mVZaN+Fsu5jwiQzs+S8t8lXrgDD8sM+JdBZuqXLO+UIS9eGEf9mZ2kpbb57LiCUgo28ok7iE5jR
g4ukmov13oPXHzHD6b0SeSR4a3me3MIdz6pNXYW5H25dk778RUYHth/zHomw6V5rtB3WFhWhu4V
yVaJVJqG1F/uJ1l9LBtBhzVM+LbHzAQmvsDGrh8QRMZqjE/THthfkdf4AtZqK9lCDlZBAkw4ib9
wJ5feSnlnjKa38ypp/b+HZuvT1y5HGw==
X-Google-Smtp-Source: AGHT+IE828D8E7wNAmkp2vuWIY7rdgflYp7evYs/pZp1n9PqsG0ZfmxYtWnexCMgGjwdtHSFbk9D6Q==
X-Received: by 2002:a17:902:c94d:b0:234:bca7:2920 with SMTP id d9443c01a7336-235e11c91abmr48459595ad.24.1749046641673;
Wed, 04 Jun 2025 07:17:21 -0700 (PDT)
Received: from ?IPV6:2001:ee0:4f0e:fb30:8915:1d85:9b14:f198? ([2001:ee0:4f0e:fb30:8915:1d85:9b14:f198])
by smtp.gmail.com with ESMTPSA id d9443c01a7336-23506bd93f7sm103883575ad.95.2025.06.04.07.17.16
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 07:17:21 -0700 (PDT)
Message-ID: <0bc8547d-aa8f-4d96-9191-fd52d1bec74e@xxxxxxxxx>
Date: Wed, 4 Jun 2025 21:17:09 +0700
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH net] virtio-net: drop the multi-buffer XDP packet in
zerocopy
To: Jason Wang <jasowang@xxxxxxxxxx>
Cc: netdev@xxxxxxxxxxxxxxx, "Michael S. Tsirkin" <mst@xxxxxxxxxx>,
Xuan Zhuo <xuanzhuo@xxxxxxxxxxxxxxxxx>, =?UTF-8?Q?Eugenio_P=C3=A9rez?=
<eperezma@xxxxxxxxxx>, Andrew Lunn <andrew+netdev@xxxxxxx>,
"David S. Miller" <davem@xxxxxxxxxxxxx>, Eric Dumazet <edumazet@xxxxxxxxxx>,
Jakub Kicinski <kuba@xxxxxxxxxx>, Paolo Abeni <pabeni@xxxxxxxxxx>,
Alexei Starovoitov <ast@xxxxxxxxxx>, Daniel Borkmann <daniel@xxxxxxxxxxxxx>,
Jesper Dangaard Brouer <hawk@xxxxxxxxxx>,
John Fastabend <john.fastabend@xxxxxxxxx>, virtualization@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, bpf@xxxxxxxxxxxxxxx, stable@xxxxxxxxxxxxxxx
References: <20250603150613.83802-1-minhquangbui99@xxxxxxxxx>
<CACGkMEuHDLJiw=VdX38xqkaS-FJPTAU6+XUNwfGkNZGfp+6tKg@xxxxxxxxxxxxxx>
Content-Language: en-US
From: Bui Quang Minh <minhquangbui99@xxxxxxxxx>
In-Reply-To: <CACGkMEuHDLJiw=VdX38xqkaS-FJPTAU6+XUNwfGkNZGfp+6tKg@xxxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 6/4/25 07:37, Jason Wang wrote:
On Tue, Jun 3, 2025 at 11:07 PM Bui Quang Minh <minhquangbui99@xxxxxxxxx> wrote:
In virtio-net, we have not yet supported multi-buffer XDP packet in
zerocopy mode when there is a binding XDP program. However, in that
case, when receiving multi-buffer XDP packet, we skip the XDP program
and return XDP_PASS. As a result, the packet is passed to normal network
stack which is an incorrect behavior. This commit instead returns
XDP_DROP in that case.
Fixes: 99c861b44eb1 ("virtio_net: xsk: rx: support recv merge mode")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Bui Quang Minh <minhquangbui99@xxxxxxxxx>
---
drivers/net/virtio_net.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index e53ba600605a..4c35324d6e5b 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -1309,9 +1309,14 @@ static struct sk_buff *virtnet_receive_xsk_merge(struct net_device *dev, struct
ret = XDP_PASS;
It would be simpler to just assign XDP_DROP here?
Or if you wish to stick to the way, we can simply remove this assignment.
This XDP_PASS is returned for the case when there is no XDP program
binding (!prog).
rcu_read_lock();
prog = rcu_dereference(rq->xdp_prog);
- /* TODO: support multi buffer. */
- if (prog && num_buf == 1)
- ret = virtnet_xdp_handler(prog, xdp, dev, xdp_xmit, stats);
+ if (prog) {
+ /* TODO: support multi buffer. */
+ if (num_buf == 1)
+ ret = virtnet_xdp_handler(prog, xdp, dev, xdp_xmit,
+ stats);
+ else
+ ret = XDP_DROP;
+ }
rcu_read_unlock();
switch (ret) {
--
2.43.0
Thanks
Thanks,
Quang Minh.
Return-Path: <linux-kernel+bounces-673337-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 162CE41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:19:41 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 375107A6158
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:18:21 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id C76B3290BA5;
Wed, 4 Jun 2025 14:19:26 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="RN4lMjof"
Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6719D26ACC
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:19:24 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749046766; cv=none; b=LsAZ6szgfevzWeK8KCXh9gSRz9T/Z3IzHfYVtrf1EvFTVwl8ZxI55S9esww/PDIp2EQdXlxRxwZJ2XJtjqI7g1UlfVuOjsbqStrUSMK6dBVJjU4GgjZvAJ+6RvQonFrJk+JPO+LOiy+CzJhDeSmfZIoNjbaCMUTNtQ+VmXmOQKE=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749046766; c=relaxed/simple;
bh=251WaT+JMDeyl8gX0jmb2fEMK7HNiXSHDKHWNo2ZsgA=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=OgFokzf80yajPECR9HFJdLjwuyk7SVOtzSAzjpWdcYFUOYvdyAjxInmoCeG2Rjmd3hL/ig122cigkL03ZAZutQkjWpVFLzWU7lIoZsSHokBdots1CFtblz56bA80Oaoewa3KvEqvy11UkI9XYFpSV23QeumcviwE9jrq3bymm/c=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=RN4lMjof; arc=none smtp.client-ip=205.220.180.131
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com
Received: from pps.filterd (m0279871.ppops.net [127.0.0.1])
by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5547linj010763
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:19:23 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h=
cc:content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=qcppdkim1; bh=
68QutcxCYHS15NpUFLvGoYlDPJbMclT9Ep0Qrq9GkMQ=; b=RN4lMjofG/LdXVbT
RKNs+BWuyv0r2q/Rjd5Vycklz8k9guLF+eYxJ5MIUbApT5HbK8qrHjOeAQMqaO9h
C/7xyaGU0eqEzb3ANecUw8pjj/hbDKJWXMtUnndh73nrjz2MKQHQoc46zd5ipUyN
NMKIzEWgtglnQo+/WH/LWXIYVoSBJ0WFxnA7gPhOfG87PLce0ui6/k5I7P2WI96K
pceAo8DM80nPq0JAwODUqY9+9pesLQHpWLhKIpjR7m8eQqeY+OcbMM+26uttKPwB
yuq0iHGkbFP8U1BjqkwyioWzbt6tCfG+331056+uz0iB1LohGqlWbOnnpHAKPVPb
W1yyJA==
Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199])
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 471g8ypa28-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT)
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 14:19:23 +0000 (GMT)
Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-7d09a3b806aso144524485a.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 07:19:23 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749046762; x=1749651562;
h=content-transfer-encoding:in-reply-to:from:content-language
:references:cc:to:subject:user-agent:mime-version:date:message-id
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=68QutcxCYHS15NpUFLvGoYlDPJbMclT9Ep0Qrq9GkMQ=;
b=a0fKpM1i4ibcXAiDCaD1rE4HSSdTFXijsW3GfDB6rob2vyFnXsKzTzdvc2QaUVQsDB
efju7hXM/wAeCsYDlTqKyPdt6wJsJUDWNPyQWJeF4d4m/ai1ejG7pB0gdoqxjzyrmjjj
+pGQzFhcCe4nVMSDdaMaqFfwuAjGfYsD+uIsZfkK8lxCgCaN7gwh/U+eTAUNMb5uqRrt
gbZ7L94BiMutaEapxgQtMy0gW3eBSKdbEJz2RlzxjH/CdYxQvwEPgKfHgLI6NxcWhObE
fD/wx/Xfwkoikx7BL0NMjLaGwGi8dONw1L6v+sbFuUqErRDAKCubK07Umd4+dLAe8i1u
6/iw==
X-Forwarded-Encrypted: i=1; AJvYcCV9DDmGkyJe+hn5E5F3rzJy4ydehZr7WFLsQA4WFQAe4Th1+rm3f/oaWMT2zXn/vl2BIj60Yy7vb3YhSiQ=@vger.kernel.org
X-Gm-Message-State: AOJu0YwjhCeJhKtaahXJSsmSxFfSNp5waDlMNWVsr/aAZInXIsacDfz9
5yxVZFvBdw+Hvu6TdOBggWsH2ZHNJj3ve5AEtQw0GTWFT2NGT6XLaq5zH8PLqjJU+mtdFEro3Bv
GBxuNhrxYqt5s9EPq+FhH8VH+W6rAsXhhDPX296NUeCBOnXKwfrLw5Y+ud3p4mljF9/Y=
X-Gm-Gg: ASbGncumPrFgEErINCaBk+dlaeEo0DQrQa+g8KOeWrsus95OMuxpk7bgNNo8Y1QZxLZ
Iw6/+kI7n2fZ/7JBiADgWxpye9vHQoR4+slzaFVVSbr+fpHJHsRnh12AQb1WlJi4gh36wWXcyXf
f8C6lLs60VWC6j3h3Y6AVZYeR4EQKk2l/1sSXUXfgmJlqxlWJtsicqi+7hsUHUfcquZvzDHd3ZL
6E7Xzg073d8R5o0KgiLmAOrDIeQhC1Ja8sAHNtpenIG4/zEaAAjq0HAhZq5MxsIEPdZ00yiL1ZL
FLkpfglwsSStkf1pK3yDgudw9P+BbR1mK/KUijV+sMCwXYEWM8IQK33VBn4w6mVvpA==
X-Received: by 2002:a05:620a:24d3:b0:7c7:a574:c6d2 with SMTP id af79cd13be357-7d2198eee0cmr172821085a.9.1749046762026;
Wed, 04 Jun 2025 07:19:22 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IEhu5IVwhXMCxfnNg+GTBKDVnu8vAYsZyd0PXpSc6Ek1K+ankBBiRwyZhFW7ELTLDR8pmTeZA==
X-Received: by 2002:a05:620a:24d3:b0:7c7:a574:c6d2 with SMTP id af79cd13be357-7d2198eee0cmr172818785a.9.1749046761567;
Wed, 04 Jun 2025 07:19:21 -0700 (PDT)
Received: from [192.168.65.90] (078088045245.garwolin.vectranet.pl. [78.88.45.245])
by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-606a0ec0430sm2846895a12.80.2025.06.04.07.19.19
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 07:19:21 -0700 (PDT)
Message-ID: <b9752b9f-54d8-4ae0-916a-76149abcce69@xxxxxxxxxxxxxxxx>
Date: Wed, 4 Jun 2025 16:19:18 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v7 2/3] arm64: dts: qcom: qcs615: add venus node to
devicetree
To: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
Cc: Renjiang Han <quic_renjiang@xxxxxxxxxxx>,
Vikash Garodia <quic_vgarodia@xxxxxxxxxxx>,
Dikshita Agarwal <quic_dikshita@xxxxxxxxxxx>,
Bryan O'Donoghue <bryan.odonoghue@xxxxxxxxxx>,
Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>,
Bjorn Andersson <andersson@xxxxxxxxxx>,
Konrad Dybcio <konradybcio@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Conor Dooley
<conor+dt@xxxxxxxxxx>, linux-media@xxxxxxxxxxxxxxx,
linux-arm-msm@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx
References: <20250527-add-venus-for-qcs615-v7-0-cca26e2768e3@xxxxxxxxxxx>
<20250527-add-venus-for-qcs615-v7-2-cca26e2768e3@xxxxxxxxxxx>
<429b4c99-b312-4015-8678-0371eac86de4@xxxxxxxxxxxxxxxx>
<6a9e7daf-c0df-42db-b02d-96d9893afcde@xxxxxxxxxxx>
<idc4476ibh4geraklzpas5536jnwvbp6xhjjaajcdcwxicorrf@myh7kyz77rxy>
<43e1f8db-5ab1-44ce-97c8-50910704788f@xxxxxxxxxxx>
<d6udpwmocodvlsm5ljqz7zbyonj2yahtlzmm2jjjveqrm2hmkz@andh5j4jgixr>
<9faff664-9717-4259-8b23-bc44e64f6947@xxxxxxxxxxx>
<77ea49c3-f042-4ba9-a0da-1d0e4e4088d3@xxxxxxxxxxxxxxxx>
<wyzyffaksofnubx72dy6uj6wuv5nk3bxii2ncdvb7ga3fegynj@z44aoiu4ywt6>
Content-Language: en-US
From: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
In-Reply-To: <wyzyffaksofnubx72dy6uj6wuv5nk3bxii2ncdvb7ga3fegynj@z44aoiu4ywt6>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDExMCBTYWx0ZWRfX0cXVEU5hkM27
hk6CT1sbm+mCAojED5YO5e1CHscCCxorogEUkY8vYm8RnkD7FmGLSvYNxppsBNy+Xy8PgAZVQqD
ecPyWyyeZfAD9ngR0NJW8Y8cHcQahhsGmW6dx6AQEki6kLehMYWyS2Xtkx1nDvLG+SMoKz6I+x9
cY2DTX9a6E0fA89WQnOZsMICfCCiciy+kvjOIxCQUnGTT9iWXTaC4ZfleeHXufgSqFr8chfOR4X
CncLqwHxcr/hjS1gXv9ubgTIffGLraYoBRM7O3AilorU0CD/SuGHf8cBfb1OIUBUOumgsO6wDBS
JdTAxnQn7hbOqwW/cxDRGL0NjPxQe/SpG9TBox0vpmU8LAJGN5s7y78FNtpUXizNjdaJSbM5i4n
t+zpHovYryiHLqNhJ6LmLV60Qv23qp9B3JrsiBhXpO9e2jUhvH2Xo/EhqH/QX0SnMZzmqdIb
X-Proofpoint-ORIG-GUID: h1qhjRb2dxQnhgAb6I0PAn-CJO1YDo-F
X-Proofpoint-GUID: h1qhjRb2dxQnhgAb6I0PAn-CJO1YDo-F
X-Authority-Analysis: v=2.4 cv=T/uMT+KQ c=1 sm=1 tr=0 ts=684055eb cx=c_pps
a=HLyN3IcIa5EE8TELMZ618Q==:117 a=FpWmc02/iXfjRdCD7H54yg==:17
a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10 a=COk6AnOGAAAA:8 a=CsjPDDX-YaRk47nNTkkA:9
a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=bTQJ7kPSJx9SKPbeHEYW:22
a=TjNXssC_j7lpFel5tvFf:22
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
mlxlogscore=999 suspectscore=0 impostorscore=0 mlxscore=0 bulkscore=0
lowpriorityscore=0 clxscore=1015 spamscore=0 malwarescore=0 phishscore=0
adultscore=0 priorityscore=1501 classifier=spam authscore=0 authtc=n/a
authcc= route=outbound adjust=0 reason=mlx scancount=1
engine=8.19.0-2505280000 definitions=main-2506040110
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 6/4/25 3:41 PM, Dmitry Baryshkov wrote:
On Wed, Jun 04, 2025 at 03:24:25PM +0200, Konrad Dybcio wrote:
On 6/4/25 2:05 PM, Renjiang Han wrote:
On 6/3/2025 9:21 PM, Dmitry Baryshkov wrote:
On Thu, May 29, 2025 at 10:29:46AM +0800, Renjiang Han wrote:
On 5/28/2025 7:04 PM, Dmitry Baryshkov wrote:
On Wed, May 28, 2025 at 05:13:06PM +0800, Renjiang Han wrote:
On 5/27/2025 9:57 PM, Konrad Dybcio wrote:
On 5/27/25 5:32 AM, Renjiang Han wrote:
Add the venus node to the devicetree for the qcs615 platform to enable
video functionality. The qcs615 platform currently lacks video
functionality due to the absence of the venus node. Fallback to sc7180 due
to the same video core.
Signed-off-by: Renjiang Han <quic_renjiang@xxxxxxxxxxx>
---
[...]
+ interconnect-names = "video-mem",
+ "cpu-cfg";
+
+ iommus = <&apps_smmu 0xe40 0x20>;
fwiw docs mention 0xe60 0x20 (which result in the exact same resulting sid)
OK. Will update it with next version.
How would you update this?
Thanks for your comments. I'll update it like this.
iommus = <&apps_smmu 0xe60 0x20>;
This 0xe40 SID was based on a previous project. However, after rechecking
the documentation yesterday and confirming with colleagues, the correct
SID value should be 0xe60. I’ve also validated it on local device, it
works as expected. The reason 0xe40 seemed to work earlier is due to the
mask value being 0x20, which causes the effective SID derived from 0xe40
to be the same as 0xe60.
Using 0xe60 would be counterintuitive, as we have a non-zero masked bits
in the base value. It should be either <0xe60 0x0> or <0xe40 0x20>.
Hi Dmitry
Thank you for your comment.
I’ve followed up on this sid with a colleague from the kernel team,
and based on our discussion, it seems that the sid in this case should
be the result sid. The actual sid is 0xe60, and with a mask of 0x20,
the resulting sid would be 0xe40. Therefore, it should be <0xe40 0x20>.
@Konrad, I’d appreciate any thoughts or suggestions you might have on it.
What our docs describe as 'result sid' is literally 'base ~& mask', so if
we used that, setting the mask would be useless..
Now, some old NHLOS builds are known to cause issues if the values aren't
exactly what they expect (some whitelisting must be going on there).
I don't think this should be an issue on this platform, but let's just
use 0xe60 0x20 here to reflect the real values
Isn't 0xe40 also 'real'?
0xe60 and 0xe40 (unmasked) are two separate streams
Konrad>
Return-Path: <linux-kernel+bounces-673338-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 3EE0641E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:19:58 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 4AA5316F1A8
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:19:59 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id C65D1290DAD;
Wed, 4 Jun 2025 14:19:30 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Smnr6tvu"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 020C026ACC;
Wed, 4 Jun 2025 14:19:29 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749046770; cv=none; b=L922Z7VHm74FdalNXwPcBRxfSKMArA/hhPvxqd1MzCtMLXJciRIrYu78WTVlRX2KB3jL6mqoFLpSVGigvlYvlbhTfuaLtoVohFRJl/qUIXwGh7n56CQw1yxkfMFBouR5+EztqJZ8k/4QsjdorDisbQf0QqIH8qPI7+dIiyqavxw=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749046770; c=relaxed/simple;
bh=7YsuzD8Qz+jO4WRfB8ZOVNTmXy1/NRoTyJpWk3RBQmc=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=ubDiPJW06rqE/0DDkf8fXhnFsgfLUv4/6mSGi22DHcYeFIwWZ7zqrQ+5DQmZeb24NwLohOHj+LWjugTfU0BUr7mVNcZsSUMUWAAqGrC694Qv5o1TzJsIzvE1H153O+8iPnGFgtJ0VskMMocr9n7VngAeRG2GJdVCjqKTwUQBZDY=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Smnr6tvu; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7D66AC4CEFA;
Wed, 4 Jun 2025 14:19:26 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749046769;
bh=7YsuzD8Qz+jO4WRfB8ZOVNTmXy1/NRoTyJpWk3RBQmc=;
h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
b=Smnr6tvuIR7JjHfl4D2OAQvC5kT4zIzGU/qYIFKRuAifKlCT4Mj6OXpeS2Io/LxPk
1mVQv5OQptPXFFwq0lWlGwt9pUFlQDl7zngPKEDEotpc4QhG5ZoOpsAaArcBRgmhVL
pw2If8cYdH8ayppEgVq3MwnxRwIJExiuyD3QHBcamiglank6OHxFFTL3MqTiGdpaPf
zn95oZcu3uRaCMq2Qi9X47SOwj6G9CQ44ydpPXcfXaw5d6kuDIsO3oU+wfc2nRoN+j
14/s8cqnsXwHcrobT7y9WHQ0SYUOq3Na27tGjxIfoyuAY0innSXNQyC0XNfa6TYRDg
zvkIGY3nh+MZA==
Date: Wed, 4 Jun 2025 15:19:23 +0100
From: Mark Brown <broonie@xxxxxxxxxx>
To: samuel.kayode@xxxxxxxxxxxxxxxxxxxx
Cc: Lee Jones <lee@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>,
Liam Girdwood <lgirdwood@xxxxxxxxx>,
Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>,
Sebastian Reichel <sre@xxxxxxxxxx>, devicetree@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-input@xxxxxxxxxxxxxxx,
linux-pm@xxxxxxxxxxxxxxx, Abel Vesa <abelvesa@xxxxxxxxxx>,
Abel Vesa <abelvesa@xxxxxxxxx>, Robin Gong <b38343@xxxxxxxxxxxxx>,
Enric Balletbo i Serra <eballetbo@xxxxxxxxx>
Subject: Re: [PATCH v4 2/6] mfd: pf1550: add core mfd driver
Message-ID: <41f40dfc-a71e-46d9-bd06-807a8d9c5748@xxxxxxxxxxxxx>
References: <20250603-pf1550-v4-0-bfdf51ee59cc@xxxxxxxxxxxxxxxxxxxx>
<20250603-pf1550-v4-2-bfdf51ee59cc@xxxxxxxxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512;
protocol="application/pgp-signature"; boundary="CxhOUmXXhXq/QXX/"
Content-Disposition: inline
In-Reply-To: <20250603-pf1550-v4-2-bfdf51ee59cc@xxxxxxxxxxxxxxxxxxxx>
X-Cookie: I'm definitely not in Omaha!
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
--CxhOUmXXhXq/QXX/
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Tue, Jun 03, 2025 at 02:27:46PM -0400, Samuel Kayode via B4 Relay wrote:
+enum pf1550_pmic_reg {
+ /* PMIC regulator part */
+ PF1550_PMIC_REG_DEVICE_ID = 0x00,
+ PF1550_PMIC_REG_OTP_FLAVOR = 0x01,
+ PF1550_PMIC_REG_SILICON_REV = 0x02,
+
+ PF1550_PMIC_REG_INT_CATEGORY = 0x06,
I notice that you don't seem to be using the top level interrupt here,
that's going to add overhead since you need to check more registers on
each interrupt. Look at the sub irq stuff for some generic handling for
that.
--CxhOUmXXhXq/QXX/
Content-Type: application/pgp-signature; name="signature.asc"
-----BEGIN PGP SIGNATURE-----
iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmhAVeoACgkQJNaLcl1U
h9BcZAf/bAoZC9oVRKkCQ7a6xVE/Snfm0QLW9yVBOGPr/nmKmruf5JM8TICwAO8c
BkL4IPkPOI/ydRth25EvtqGczAXgZLU2UC4cupTLNofUqb11NarGxhmd2kI5QUP3
RmyPWVpGpglxl275sJ/zro3f4u5erLXFcrcbTov1HOvcfIGotPmZhXtE7Pccm0+N
+cECCVbEzSIdZaFDw0DyZ34VYrBaQIFbOmBDi1tlkcO2xgEPkIDsRt0rsG+M/iIY
u8WRbMFOpSl7VVIgDhJCbmX9hNrRes/qLTqFUHhvyz0FwqX0fRMK93zQas3AgupX
Ndt5Zdid0LqkRokAr919rQf2ZxvL2A==
=kr6O
-----END PGP SIGNATURE-----
--CxhOUmXXhXq/QXX/--
Return-Path: <linux-kernel+bounces-673339-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id AD61441E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:20:10 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id A14FF18998D5
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:20:18 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 3E461290DBD;
Wed, 4 Jun 2025 14:19:31 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="MaDhrEXP"
Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 73567290BDA;
Wed, 4 Jun 2025 14:19:28 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.10
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749046770; cv=none; b=XevIiDokJXoLxtHc8TkVAUOdzId03ubrW+/fBRPpyF2kC+zDaR/dFhqzUNhtHimMsK1NpUrBPFqZyiGY2nSeUjer1RibM4gQ79R6ot0zBhh5y8KWr7/nuVMOWs3VFR2UGIcFFIR2J4jP/z0Th3T2tnBu69xp3O65dIZTbb0K6tw=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749046770; c=relaxed/simple;
bh=nvCdP0Vwqyv1w/nWeuE741pzwxdxLERa4Y/vBATrZhI=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=R9phpO1SpFhGATgoeaQH7VyumznrkgpuFv0u3ZEPdapL6jTQc+YO3BseZFXkBF4a/zk9sHkHDoIgLl8e4J8eXixkdOZKg1nNozsMgf9H3aOQC/k3nLTyBPGT0FShhG1qFItE7hYD8pZI19LP3znpiFq7xeOTakZT9TvNFF0BOqI=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=MaDhrEXP; arc=none smtp.client-ip=192.198.163.10
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
t=1749046768; x=1780582768;
h=message-id:date:mime-version:subject:to:cc:references:
from:in-reply-to:content-transfer-encoding;
bh=nvCdP0Vwqyv1w/nWeuE741pzwxdxLERa4Y/vBATrZhI=;
b=MaDhrEXPpCq2+0VtQ52F34rES13HIvrNq8abAj0kytD0TkmozLNl7kIJ
w7eHYDucxLb6eq4g3JMZmzfQEdvqauJsCn69ukGZAbeOO2RvrSLo2ZiJv
KRkJ4Lq8uvJ0IrcL1J7Bq/bziLaPcP/wrtMLJQfqDWw7WjdM4iayLesK4
ZMIE35nl4t84pvzAlUiXSRDhfhF8fOrznA6FrJoqv6gwJQ27cBZZi7CvJ
oM9y205tnaItKgm5WUP5FIeoHVWG8hCkjNY4sv1qOiBawzUwJt6VdSyRl
IuCc7Phy1dA/gaLG03B6BZ8Eb2kYKpz2YeT5TkBCtKKzZHbbPgP5jspQT
Q==;
X-CSE-ConnectionGUID: u8wYudwCTuyByGe1L7imHQ==
X-CSE-MsgGUID: krjGmWmxQfSMpP41mxlQBg==
X-IronPort-AV: E=McAfee;i="6800,10657,11454"; a="62489553"
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="62489553"
Received: from fmviesa004.fm.intel.com ([10.60.135.144])
by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 07:19:27 -0700
X-CSE-ConnectionGUID: gpf1jbhDR02P7Vc1SsI37g==
X-CSE-MsgGUID: HaGLvCGpTPyRlTH47RR87Q==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="150363145"
Received: from lstrano-mobl6.amr.corp.intel.com (HELO [10.125.110.233]) ([10.125.110.233])
by fmviesa004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 07:19:25 -0700
Message-ID: <343f6719-598a-453b-9903-21632bc6b623@xxxxxxxxx>
Date: Wed, 4 Jun 2025 07:19:26 -0700
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v1 1/2] dmaengine: idxd: Fix race condition between WQ
enable and reset paths
To: Shuai Xue <xueshuai@xxxxxxxxxxxxxxxxx>,
Vinicius Costa Gomes <vinicius.gomes@xxxxxxxxx>, fenghuay@xxxxxxxxxx,
vkoul@xxxxxxxxxx
Cc: dmaengine@xxxxxxxxxxxxxxx, colin.i.king@xxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
References: <20250522063329.51156-1-xueshuai@xxxxxxxxxxxxxxxxx>
<20250522063329.51156-2-xueshuai@xxxxxxxxxxxxxxxxx>
<a03e4f97-2289-4af7-8bfc-ad2d38ec8677@xxxxxxxxx>
<b2153756-a57e-4054-bde2-deb8865c9e59@xxxxxxxxxxxxxxxxx>
<4cd53b91-bd20-46a1-854c-9bf0950ea496@xxxxxxxxx>
<87234fab-081e-4e2e-9ef1-0414b23601ce@xxxxxxxxxxxxxxxxx>
<874ix5bhkz.fsf@xxxxxxxxx> <226ecbd8-af44-49e8-9d4c-1f2294832897@xxxxxxxxx>
<22b3a299-b148-46ec-804e-2f6cbb3d5de1@xxxxxxxxxxxxxxxxx>
Content-Language: en-US
From: Dave Jiang <dave.jiang@xxxxxxxxx>
In-Reply-To: <22b3a299-b148-46ec-804e-2f6cbb3d5de1@xxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 6/4/25 1:55 AM, Shuai Xue wrote:
在 2025/6/3 22:32, Dave Jiang 写道:
On 5/27/25 7:21 PM, Vinicius Costa Gomes wrote:
Shuai Xue <xueshuai@xxxxxxxxxxxxxxxxx> writes:
在 2025/5/23 22:54, Dave Jiang 写道:
On 5/22/25 10:20 PM, Shuai Xue wrote:
在 2025/5/22 22:55, Dave Jiang 写道:
On 5/21/25 11:33 PM, Shuai Xue wrote:
A device reset command disables all WQs in hardware. If issued while a WQ
is being enabled, it can cause a mismatch between the software and hardware
states.
When a hardware error occurs, the IDXD driver calls idxd_device_reset() to
send a reset command and clear the state (wq->state) of all WQs. It then
uses wq_enable_map (a bitmask tracking enabled WQs) to re-enable them and
ensure consistency between the software and hardware states.
However, a race condition exists between the WQ enable path and the
reset/recovery path. For example:
A: WQ enable path B: Reset and recovery path
------------------ ------------------------
a1. issue IDXD_CMD_ENABLE_WQ
b1. issue IDXD_CMD_RESET_DEVICE
b2. clear wq->state
b3. check wq_enable_map bit, not set
a2. set wq->state = IDXD_WQ_ENABLED
a3. set wq_enable_map
In this case, b1 issues a reset command that disables all WQs in hardware.
Since b3 checks wq_enable_map before a2, it doesn't re-enable the WQ,
leading to an inconsistency between wq->state (software) and the actual
hardware state (IDXD_WQ_DISABLED).
Would it lessen the complication to just have wq enable path grab the device lock before proceeding?
DJ
Yep, how about add a spin lock to enable wq and reset device path.
diff --git a/drivers/dma/idxd/device.c b/drivers/dma/idxd/device.c
index 38633ec5b60e..c0dc904b2a94 100644
--- a/drivers/dma/idxd/device.c
+++ b/drivers/dma/idxd/device.c
@@ -203,6 +203,29 @@ int idxd_wq_enable(struct idxd_wq *wq)
}
EXPORT_SYMBOL_GPL(idxd_wq_enable);
+/*
+ * This function enables a WQ in hareware and updates the driver maintained
+ * wq->state to IDXD_WQ_ENABLED. It should be called with the dev_lock held
+ * to prevent race conditions with IDXD_CMD_RESET_DEVICE, which could
+ * otherwise disable the WQ without the driver's state being properly
+ * updated.
+ *
+ * For IDXD_CMD_DISABLE_DEVICE, this function is safe because it is only
+ * called after the WQ has been explicitly disabled, so no concurrency
+ * issues arise.
+ */
+int idxd_wq_enable_locked(struct idxd_wq *wq)
+{
+ struct idxd_device *idxd = wq->idxd;
+ int ret;
+
+ spin_lock(&idxd->dev_lock);
Let's start using the new cleanup macro going forward:
guard(spinlock)(&idxd->dev_lock);
On a side note, there's been a cleanup on my mind WRT this driver's locking. I think we can replace idxd->dev_lock with idxd_confdev(idxd) device lock. You can end up just do:
guard(device)(idxd_confdev(idxd));
Then we need to replace the lock from spinlock to mutex lock?
We still need a (spin) lock that we could hold in interrupt contexts.
And also drop the wq->wq_lock and replace with wq_confdev(wq) device lock:
guard(device)(wq_confdev(wq));
If you are up for it that is.
We creates a hierarchy: pdev -> idxd device -> wq device.
idxd_confdev(idxd) is the parent of wq_confdev(wq) because:
(wq_confdev(wq))->parent = idxd_confdev(idxd);
Is it safe to grap lock of idxd_confdev(idxd) under hold
lock of wq_confdev(wq)?
We have mounts of code use spinlock of idxd->dev_lock under
hold of wq->wq_lock.
I agree with Dave that the locking could be simplified, but I don't
think that we should hold this series because of that. That
simplification can be done later.
I agree. Just passing musing on the current code.
Got it, do I need to send a separate patch for Patch 2?
Not sure what you mean. Do you mean if you need to send patch 2 again?
Thanks.
Shuai
Return-Path: <linux-kernel+bounces-673340-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 5C0D641E003FB
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:20:11 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 942C6189A489
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:20:19 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 5F8D3290DBF;
Wed, 4 Jun 2025 14:19:31 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="W/TiDbDv"
Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2056.outbound.protection.outlook.com [40.107.20.56])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6FFCE290BD2;
Wed, 4 Jun 2025 14:19:28 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.56
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749046770; cv=fail; b=l3dlu52RVSc6rOZjr8BMTH1t7MlyQZkCTrudjyJLahDlRhEmByla73Qv4IdjHwvczPox7q4sMJj/a8QecT4NPvY0SliEbTtu3+icmiefYSKC0Eial3CpVmGTk5bO/tu+8uh77sOcU9aCxvR3aQgLNWymge9FsQQgTH/1OWpSCho=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749046770; c=relaxed/simple;
bh=7fK4BsaEXqhZFIdUEG1yNjhgJw+n9MfelF0N/QYZJZo=;
h=Date:From:To:Cc:Subject:Message-ID:References:Content-Type:
Content-Disposition:In-Reply-To:MIME-Version; b=tmHeG4y4XtX/1+LSUX84ewAzF5x2ibDPZNp5F5E2YXlHqOszP0l+igAjDorGinoP9U6zfUeExzXR3u98R5hcwKNIVCPoe3js6mLsF00BTQTD0Fri1TeC8bolHKnZvGMkv43jY6/EKybjGV7j6mx+sSc8RfQrVpz7CiMxYcJUb/o=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com; spf=pass smtp.mailfrom=oss.nxp.com; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b=W/TiDbDv; arc=fail smtp.client-ip=40.107.20.56
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.nxp.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=Z5SdONDAlGOqV5FCykblbUkVVs1EqaXrAGgSZKhRU1V2jGiyQTbodyXYBPYheWmdWVIBKYODn//kKgJW/MhHGMKyO8MG5fv8NH4+HYYltDvl6VXlLB+15bzo4m66VctmM1Y+aHTxZHAkGLUuo5E1qmQGDG84m3+UxQqcxSX5t0RzZHwWJkFOSzp+4RvujZY9rAqQuRHTv2q+j81CB5tFlvG1cG52oAfVjI5fU1Y8kvDLVjVCx+ZaPXkeuiBqzzOP07g6pUcRdoJxIIi4y9JLx5mxMgcdAH0NyhDazLSnwyaGOrEEFuMw2h8AVsouHIo1zn0YumVld9t9JLrvq8UoQA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=7fK4BsaEXqhZFIdUEG1yNjhgJw+n9MfelF0N/QYZJZo=;
b=BD6iCTQF3hrrX1GyriRzK1gTnB94ByCkPQB/MFgNTQjQZCsPLs7cA/DezfB4xNiEAbrtVjLSzJq5Og/WdiflFPNDY7i0hAweMZk0nSPy80vkVjh4Prxw8gW/qnl/Aeo6M/CWsB0o2kext5dtKB4yNH9hFsVQf9h+rMUyS8IcWZywPu/MU2syrukBjLyXDYn+yql5kU3iqLJP7gT4Hbgk/dM5dnujEfQrkLev0wdWLqHJ4m/yMie+s4v971tptf2eKJPqjq0SRJHliVMVIgdY80iCOWAHcDF0kCvUiRpVfVT24jwMd6Zb3teiTMxw/mJceChp8H4M9IuBg2zBQcpRrQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com;
dkim=pass header.d=oss.nxp.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com;
s=selector1-NXP1-onmicrosoft-com;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=7fK4BsaEXqhZFIdUEG1yNjhgJw+n9MfelF0N/QYZJZo=;
b=W/TiDbDvQvJ4yYm+mLXoklUwbtQwZ2SxeTGU+M36RWa6wndlbMhto0wGdmj8X6lWxRHRSsE1Aq2YfuGlacm7TV0DInq1o/Jb4KlyFOWLYSSPJHogb7czkK8bjKZDiEv/isfnwd5RZv5DvwlVRePWui/5d1VPeDTjTWzPEEnBW5k7IKkCzabV7jjOZxunZAHb26fNBlcvfYSr6ChrW/etYKgBCnFhGA/FBNo2OF4DCwHDoBv8HEB2ZY1POn0SNVxExde/AxGTzCVEjx07sUmh/Q1cmJnNS060llNY/3Utxp/1xtuttGJhTTOIdNNZWyi5Owb4Xaou6m7LAYBLLwB89w==
Authentication-Results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=oss.nxp.com;
Received: from PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15)
by VI2PR04MB10619.eurprd04.prod.outlook.com (2603:10a6:800:26d::6) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8813.20; Wed, 4 Jun
2025 14:19:25 +0000
Received: from PAXPR04MB8459.eurprd04.prod.outlook.com
([fe80::165a:30a2:5835:9630]) by PAXPR04MB8459.eurprd04.prod.outlook.com
([fe80::165a:30a2:5835:9630%3]) with mapi id 15.20.8813.018; Wed, 4 Jun 2025
14:19:25 +0000
Date: Wed, 4 Jun 2025 23:29:19 +0800
From: Peng Fan <peng.fan@xxxxxxxxxxx>
To: Stefano Radaelli <stefano.radaelli21@xxxxxxxxx>,
Mathieu Othacehe <othacehe@xxxxxxx>
Cc: devicetree@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>, Shawn Guo <shawnguo@xxxxxxxxxx>,
Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>,
Pengutronix Kernel Team <kernel@xxxxxxxxxxxxxx>,
Fabio Estevam <festevam@xxxxxxxxx>, imx@xxxxxxxxxxxxxxx,
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [v1] arm64: dts: freescale: imx93-var-som: update eqos support
for MaxLinear PHY
Message-ID: <20250604152919.GA29462@nxa18884-linux>
References: <20250603221416.74523-1-stefano.radaelli21@xxxxxxxxx>
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20250603221416.74523-1-stefano.radaelli21@xxxxxxxxx>
User-Agent: Mutt/1.10.1 (2018-07-13)
X-ClientProxiedBy: SI2PR01CA0024.apcprd01.prod.exchangelabs.com
(2603:1096:4:192::20) To PAXPR04MB8459.eurprd04.prod.outlook.com
(2603:10a6:102:1da::15)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-Exchange-MessageSentRepresentingType: 1
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: PAXPR04MB8459:EE_|VI2PR04MB10619:EE_
X-MS-Office365-Filtering-Correlation-Id: 7e990749-dff3-4656-6bc8-08dda372cefd
X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam:
BCL:0;ARA:13230040|52116014|366016|1800799024|376014|7416014|38350700014;
X-Microsoft-Antispam-Message-Info:
=?us-ascii?Q?SsppRPXvuY9+gXWURC3BJU7v9arWiEgP1fOZBkN7AGY04lWXQmifQCzM3DTb?=
=?us-ascii?Q?al9wVcYQ9szLcKwOMJmck5RHhS2bv4eyLR7q+mpY3aGHeMmcUfbFhOl8OEs9?=
=?us-ascii?Q?x5saItB3FviUs10DAnfPM8HOvxWnVH2BsTXj4+6CX51xtpc0GLIGow+XV4+F?=
=?us-ascii?Q?zhIbeLs0Onv8RhyywRcm3AAubnCaTObBYBW4/RDva4YA159Mj0zFfqDeqg1G?=
=?us-ascii?Q?55KAgbeTlgzyKiYe/x9m9F1GsDj0Y0HrO8Mei5G9P4Bd8UIEuZsIIkCB8Ysc?=
=?us-ascii?Q?vONhjfoLnAJouuw4wOahvzcmI+ndsiNNDiJw90FPEQAYihKocYFFHsGS8T8Y?=
=?us-ascii?Q?tyqEPPQFcC5N/J4onsvv6Rks2hYoLdKUIDNmVbwbhzxhMiSuUezOpIZoJZjG?=
=?us-ascii?Q?HaCMa/PNKD1fAlxYgzCMOMSbDR9PjeF1EbwpaM85HZpH5DYVL9hMf8p4dkDD?=
=?us-ascii?Q?JoWMaKBuW5quz8EbccS0BAHq7cYdsas52tqrLk/CLux+YhZdVSItmyFsvant?=
=?us-ascii?Q?uT3evp6pjWcSF6KiL7s7EzoddNHxqa8CUFtSLf1WnJtMv8miSL2flwKIipD9?=
=?us-ascii?Q?UtkS/X+kSyGY4uolszVEzmAMrO/ulIVuqI33kWpU+QmIOlyAIrOwrPHpgX/g?=
=?us-ascii?Q?6C6ecEE1mesTeWSjiM3UI7o2Kk85rev+7qRPrk5R+zV56aUtajKt99NMB5Rt?=
=?us-ascii?Q?cazplpCfcasJ34kEltpNKAFNMlQHRkZ5IXSMWtOVzAoGqYg837kfPHKiT8xw?=
=?us-ascii?Q?1dOX+1W/mO1YWJkb08Xk7lB149wEM6WhyzG6H/bl+jNzAWQbJliPDLQrNnpE?=
=?us-ascii?Q?kRrcB5mLAzSQto/p8iksgl77oVXxdGCizm7hFdhVSKr/GIAabWsmX5APK6qK?=
=?us-ascii?Q?zdlbemlhs6pN1HVogOI/ZN9KEmNxg2vhhsv7uDmzCN40tLacFukmrR40upPJ?=
=?us-ascii?Q?bNtchS9dCmcPtli5mQDO9jz4qRu4yiVls5lvvzrsKjslugH2r86kcdjpZzUX?=
=?us-ascii?Q?D27XngYq3UR77pxw1m+ty1CMjzR50UG+9lUytw391RM/Q5rEyBl9G/Vwtrui?=
=?us-ascii?Q?xmMDcAt5HeZbCdU4Dpppt52oJkhxpjBlDztrR5yHgn4tbzmIXGVpCwyMFdVX?=
=?us-ascii?Q?CAK6s9XcxpH78xktX9UpOquXzdoRJYJiZ+hw11eFrkltkSZ8zw40oQ5RQcQc?=
=?us-ascii?Q?76UefMYOyvFF/dJTOFFCvoz+jhN9LMlo/CBrmoCD0RYP3EGSLGol8dhyVXqX?=
=?us-ascii?Q?YZkfJvVXclRFLuLooFkYpYMTdF/zZtWSTpH4l637DmlbD97TUhFTc065lJMK?=
=?us-ascii?Q?yhbJCaSfc1Mcwrm9k4XWCNpKYbr6hAeK8VgwbhnElr8EGUiT5b7b1JkgDa/L?=
=?us-ascii?Q?kEn/KPPr3I1b5qcH4F1VE7ZjxcjISEk7kTuvzGUHT5GT+bDLgjdDMG2uNPnW?=
=?us-ascii?Q?cdyBOMcq5tvjcj9Shylp2pIiGgVINjuh23h7wuzlPJVraR6kGnNECQ=3D=3D?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB8459.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(52116014)(366016)(1800799024)(376014)(7416014)(38350700014);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?us-ascii?Q?Sg2tNXRviGrTpQN4NoTsmNGEQS8Mf4hDX14BOXD+D1H9Tw4eUdLTGswmCzvC?=
=?us-ascii?Q?zsNpVJ27knDvTRygfbLkYaECm2xNgHl/PGWOT9yUbVycN0GefAS/XPPefkKV?=
=?us-ascii?Q?cMpr6cSw2iryLV0VGoNRJ7FY0abQvxvXLjK+F9+luKNCnFxXtcP9nasMvkrM?=
=?us-ascii?Q?Tg6tZbeFofP6tk+/v2tj4YbY5ie+jC1LHLepnG1a0AHh3Hv/lcBsGiKJwPkr?=
=?us-ascii?Q?uozzX38XcB4FmNWDdcUW8CdjB6GEKXlOk06VV+1o148s7cUZgfzCaswRlXRb?=
=?us-ascii?Q?TQh5xUdZOqJh6qDOkgqkajxUoxFHyB3HiLgXWlMUuokw9PmaPH2lr5B9BRiQ?=
=?us-ascii?Q?N0AuZ8q4hcGVzZYhk/hOZ9BSJ7Ujwy0B7FFUERsY1ThMVK8kpkokDKjKJeSX?=
=?us-ascii?Q?MW/+VvgnYbvcW3A9DQ9cb6N5ASH9TBFDnWZkKmZXqzYXUb/m6lkykXoxE1df?=
=?us-ascii?Q?P0fdelLlwg9IINKPgCC9CIE4AZb6PV6D6qaLuTe0FKgdce9uj1rpkIGPSsY+?=
=?us-ascii?Q?wwHB6BsA6zXtsjndeLPJCKF+6EyZ282SaH7v0F9lVVmPu/zwwA+VN0I0oVYv?=
=?us-ascii?Q?ubVMsfOW64FnERTse6bsaxcjV7Ipy2nlYLghzVtBGxAxF0kh3ga/715D7HyG?=
=?us-ascii?Q?50OvOWmVq2uVQp9yEnOLLRmI9H83UGctqbnUS62IneOukQNJNnZhZ4tp2ltq?=
=?us-ascii?Q?0tso79S2LXq4XECrkYIJQD3E6NAjEi7H0OtnicU78TSO0CG9uxt9gRGvw7mf?=
=?us-ascii?Q?lUTWrqnm6L3/ShWMfqEZmrtA+lBQ42dzem/P1UuIUCx2M3sZUHjr/xN+cOBS?=
=?us-ascii?Q?3YFRTzZG1jd4t5qp5cb4/Cub54wzXrvF8t2xp84YHo5C83Mx9vljisKA5Q8r?=
=?us-ascii?Q?f5R8q9NidfCMXa2ZigdQCZQsw+A7Roey2bTGeqJXJG01KfrAAT0F4M01LzHX?=
=?us-ascii?Q?eZeVgDayPWPxBqT18Y/sy+8IAMQTrAt417YuPpUWGdV4vg3uoAk1xeivwOj4?=
=?us-ascii?Q?1+Yq7Fole31vBOrxu5e0Og8TGaWuNxBCQQVYDj2vz1kCi91GEgmy0KjR8bDX?=
=?us-ascii?Q?FkYwsSdtEWax8u+t64E+bdYA2gYuORwSHOu0SUBEHfEeUKblBMa5SCLpltY/?=
=?us-ascii?Q?JsR63JWiL8qWwzFA03I+lLpxIBsLFhUN4AppwKf6J7/8d2oX89gWKLVYSsPh?=
=?us-ascii?Q?nifrSlIqEy3NVwulEhXKx5PvBP/OYtaL483xVcCud3AAZRre4fExfSGquO0z?=
=?us-ascii?Q?O1ZPsYIQpHQYlplcU8RhxvvOG6bsW3DRKN6VvEVap8LfFQXMJnMVSGtxw3Zt?=
=?us-ascii?Q?PG7uAzi5inzVGVx8RG7tlDkz9nAANH1IyQt2bT+hHGt5sXh6ONQBl+I8zm8c?=
=?us-ascii?Q?m8gRYqxdM2ftqVHaUEPvVJ17fdieyDfL9H7WhlB559Zhe7BeVtpCaU/FfNLn?=
=?us-ascii?Q?qwxsX/t5sJ+KiekmleoCOBdGgYMs8TnL1Boia9lOzkHCJ9rKW+yE3EbWMlzr?=
=?us-ascii?Q?mVIuW9G4K/FpoGxZWUJvWl8qd2fLMYW4fBbgVoX0RlMNPv9f24sFdLROceG4?=
=?us-ascii?Q?c4eCAOehCVY1iYb1Z6k3RZiDcvwAW2f4zN/bmXNW?=
X-OriginatorOrg: oss.nxp.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 7e990749-dff3-4656-6bc8-08dda372cefd
X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8459.eurprd04.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 14:19:25.3591
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: Z1wroKivVKOs7vMQmxlLeLrveBvok6GBKMBynflzPhLrGwvK5yATzf2f+DguWluIhzLm2NM70fkFnFOpbbMhMA==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI2PR04MB10619
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
+Mathieu who upstreamed the initial support for this board.
Regards,
Peng
Return-Path: <linux-kernel+bounces-673341-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 6A6C141E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:21:14 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 0D61916DD77
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:21:15 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id C413928F935;
Wed, 4 Jun 2025 14:21:07 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="jImr0aJ5";
dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="jImr0aJ5"
Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 689953595A
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:21:02 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749046866; cv=none; b=ehaSqA3uk25+0dGXapmOaMVAGHvL6KVhLoHoiuXdgM353M+9l+El3pZTloiASqbIc7Zn+0+C9QOHcOoDPiewLc9lFmevZQ5iK9zvcaP1IIqWMlZVrURFjd9hJRGHtbv+ax2BtU6VT/115XmnzrMYSbJ+SIalUNF6mcUOlfkb87w=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749046866; c=relaxed/simple;
bh=T4x64PN7OhuJ+VVZnlwfgOCHUQ1ENCLEJmnYuXzxbNc=;
h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=iGt5FLg/YpCkknuabgQBxKzWNkNV/VrUpmnt1FMYwRdZDCrGbmpZQ4dMophhmxjymO5uW4K2KDMiViqfGst5UqoF8O5BPPRnd+lGEt8IK1BZVadzJ+TQb18vTLklk4M7v7+Gy/Q4Buj9GjtxIcIzLO+p8BZ39d3j79xfHtU5RMI=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=jImr0aJ5; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=jImr0aJ5; arc=none smtp.client-ip=195.135.223.131
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com
Received: from pathway.suse.cz (unknown [10.100.208.146])
by smtp-out2.suse.de (Postfix) with ESMTP id 6B3431FE0F;
Wed, 4 Jun 2025 14:21:00 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1;
t=1749046860; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version: content-transfer-encoding:content-transfer-encoding;
bh=dn8ycOFPKuW7F8mba8U0a3Fdcnope2szBHssTbLgnV8=;
b=jImr0aJ5eqn77qP29wl1Ni+2dWAxxG+rQggMFERr0vX7DuAjc1rKsu2fZ2sZBia5IC7PCW
bYkjnovyeGvPwKslyUPX0aFIOdh+ErExW4vl7beHZH++n08/nC6wc3fbfutF3fW29LJ7/1
CeqXaOXGMcD31fR3l+hvAEEIRzJRT9E=
Authentication-Results: smtp-out2.suse.de;
none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1;
t=1749046860; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version: content-transfer-encoding:content-transfer-encoding;
bh=dn8ycOFPKuW7F8mba8U0a3Fdcnope2szBHssTbLgnV8=;
b=jImr0aJ5eqn77qP29wl1Ni+2dWAxxG+rQggMFERr0vX7DuAjc1rKsu2fZ2sZBia5IC7PCW
bYkjnovyeGvPwKslyUPX0aFIOdh+ErExW4vl7beHZH++n08/nC6wc3fbfutF3fW29LJ7/1
CeqXaOXGMcD31fR3l+hvAEEIRzJRT9E=
From: Petr Mladek <pmladek@xxxxxxxx>
To: John Ogness <john.ogness@xxxxxxxxxxxxx>
Cc: Petr Mladek <pmladek@xxxxxxxx>,
Michael Cobb <mcobb@xxxxxxxxxxxxxxxxxxxx>,
rostedt@xxxxxxxxxxx,
senozhatsky@xxxxxxxxxxxx,
linux-serial@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
Subject: [PATCH] printk: Allow to use the printk kthread immediately even for 1st nbcon
Date: Wed, 4 Jun 2025 16:20:45 +0200
Message-ID: <20250604142045.253301-1-pmladek@xxxxxxxx>
X-Mailer: git-send-email 2.49.0
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spamd-Result: default: False [-2.80 / 50.00];
BAYES_HAM(-3.00)[100.00%];
MID_CONTAINS_FROM(1.00)[];
NEURAL_HAM_LONG(-1.00)[-1.000];
R_MISSING_CHARSET(0.50)[];
NEURAL_HAM_SHORT(-0.20)[-1.000];
MIME_GOOD(-0.10)[text/plain];
RCVD_COUNT_ZERO(0.00)[0];
ARC_NA(0.00)[];
MIME_TRACE(0.00)[0:+];
RCPT_COUNT_SEVEN(0.00)[7];
DKIM_SIGNED(0.00)[suse.com:s=susede1];
FUZZY_BLOCKED(0.00)[rspamd.com];
FROM_HAS_DN(0.00)[];
TO_DN_SOME(0.00)[];
FROM_EQ_ENVFROM(0.00)[];
TO_MATCH_ENVRCPT_ALL(0.00)[];
DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:email,suse.com:mid]
X-Spam-Level:
X-Spam-Score: -2.80
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
The kthreads for nbcon consoles are created by nbcon_alloc() at
the beginning of the console registration. But it currently works
only for the 2nd or later nbcon console because the code checks
@printk_kthreads_running.
The kthread for the 1st registered nbcon console is created at the very
end of register_console() by printk_kthreads_check_locked(). As a result,
the entire log is replayed synchronously when the "enabled" message
gets printed. It might block the boot for a long time with a slow serial
console.
Prevent the synchronous flush by creating the kthread even for the 1st
nbcon console when it is safe (kthreads ready and no boot consoles).
Also inform printk() to use the kthread by setting
@printk_kthreads_running. Note that the kthreads already must be
running when it is safe and this is not the 1st nbcon console.
Symmetrically, clear @printk_kthreads_running when the last nbcon
console was unregistered by nbcon_free(). This requires updating
@have_nbcon_console before nbcon_free() gets called.
Note that there is _no_ problem when the 1st nbcon console replaces boot
consoles. In this case, the kthread will be started at the end
of registration after the boot consoles are removed. But the console
does not reply the entire log buffer in this case. Note that
the flag CON_PRINTBUFFER is always cleared when the boot consoles are
removed and vice versa.
Closes: https://lore.kernel.org/r/20250514173514.2117832-1-mcobb@xxxxxxxxxxxxxxxxxxxx
Signed-off-by: Petr Mladek <pmladek@xxxxxxxx>
---
Hi,
I am sending this patch for a proper review.
I have just updated comments according to the review. Otherwise,
there is no function change against the already tested patch,
see https://lore.kernel.org/all/aD8JOlDVP4ufgv44@xxxxxxxxxxxxxxx/
Best Regards,
Petr
kernel/printk/internal.h | 2 ++
kernel/printk/nbcon.c | 26 ++++++++++++++++++++++++--
kernel/printk/printk.c | 20 +++++++++++---------
3 files changed, 37 insertions(+), 11 deletions(-)
diff --git a/kernel/printk/internal.h b/kernel/printk/internal.h
index 48a24e7b309d..567c9e100d47 100644
--- a/kernel/printk/internal.h
+++ b/kernel/printk/internal.h
@@ -64,6 +64,7 @@ struct dev_printk_info;
extern struct printk_ringbuffer *prb;
extern bool printk_kthreads_running;
+extern bool printk_kthreads_ready;
extern bool debug_non_panic_cpus;
__printf(4, 0)
@@ -180,6 +181,7 @@ static inline void nbcon_kthread_wake(struct console *con)
#define PRINTKRB_RECORD_MAX 0
#define printk_kthreads_running (false)
+#define printk_kthreads_ready (false)
/*
* In !PRINTK builds we still export console_sem
diff --git a/kernel/printk/nbcon.c b/kernel/printk/nbcon.c
index fd12efcc4aed..d60596777d27 100644
--- a/kernel/printk/nbcon.c
+++ b/kernel/printk/nbcon.c
@@ -1671,6 +1671,9 @@ bool nbcon_alloc(struct console *con)
{
struct nbcon_state state = { };
+ /* Synchronize the kthread start. */
+ lockdep_assert_console_list_lock_held();
+
/* The write_thread() callback is mandatory. */
if (WARN_ON(!con->write_thread))
return false;
@@ -1701,12 +1704,15 @@ bool nbcon_alloc(struct console *con)
return false;
}
- if (printk_kthreads_running) {
+ if (printk_kthreads_ready && !have_boot_console) {
if (!nbcon_kthread_create(con)) {
kfree(con->pbufs);
con->pbufs = NULL;
return false;
}
+
+ /* Might be the first kthread. */
+ printk_kthreads_running = true;
}
}
@@ -1716,14 +1722,30 @@ bool nbcon_alloc(struct console *con)
/**
* nbcon_free - Free and cleanup the nbcon console specific data
* @con: Console to free/cleanup nbcon data
+ *
+ * Important: @have_nbcon_console must be updated before calling
+ * this function. In particular, it can be set only when there
+ * is still another nbcon console registered.
*/
void nbcon_free(struct console *con)
{
struct nbcon_state state = { };
- if (printk_kthreads_running)
+ /* Synchronize the kthread stop. */
+ lockdep_assert_console_list_lock_held();
+
+ if (printk_kthreads_running) {
nbcon_kthread_stop(con);
+ /* Might be the last nbcon console.
+ *
+ * Do not rely on printk_kthreads_check_locked(). It is not
+ * called in some code paths, see nbcon_free() callers.
+ */
+ if (!have_nbcon_console)
+ printk_kthreads_running = false;
+ }
+
nbcon_state_set(con, &state);
/* Boot consoles share global printk buffers. */
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index 1eea80d0648e..0efbcdda9aab 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -3574,7 +3574,7 @@ EXPORT_SYMBOL(console_resume);
static int unregister_console_locked(struct console *console);
/* True when system boot is far enough to create printer threads. */
-static bool printk_kthreads_ready __ro_after_init;
+bool printk_kthreads_ready __ro_after_init;
static struct task_struct *printk_legacy_kthread;
@@ -3713,6 +3713,7 @@ static void printk_kthreads_check_locked(void)
if (!printk_kthreads_ready)
return;
+ /* Start or stop the legacy kthread when needed. */
if (have_legacy_console || have_boot_console) {
if (!printk_legacy_kthread &&
force_legacy_kthread() &&
@@ -4204,14 +4205,6 @@ static int unregister_console_locked(struct console *console)
*/
synchronize_srcu(&console_srcu);
- if (console->flags & CON_NBCON)
- nbcon_free(console);
-
- console_sysfs_notify();
-
- if (console->exit)
- res = console->exit(console);
-
/*
* With this console gone, the global flags tracking registered
* console types may have changed. Update them.
@@ -4232,6 +4225,15 @@ static int unregister_console_locked(struct console *console)
if (!found_nbcon_con)
have_nbcon_console = found_nbcon_con;
+ /* @have_nbcon_console must be updated before calling nbcon_free(). */
+ if (console->flags & CON_NBCON)
+ nbcon_free(console);
+
+ console_sysfs_notify();
+
+ if (console->exit)
+ res = console->exit(console);
+
/* Changed console list, may require printer threads to start/stop. */
printk_kthreads_check_locked();
--
2.49.0
Return-Path: <linux-kernel+bounces-673342-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id ED2B841E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:22:20 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id D76D91738AA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:22:21 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 502CF28F935;
Wed, 4 Jun 2025 14:22:14 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="XhzGaf79";
dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="Mhb1KCg+"
Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id D6B5226ACC;
Wed, 4 Jun 2025 14:22:10 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749046932; cv=fail; b=EHe5XE0CR3+oj/Zt/5HAY4cu1hMM2EJ8NepsWfC6mN317ED1fGXNDflAzxHjv4kMFFVRFIhWFJskztr+q+VEOP4INrh1/CRhl+kFLDCG/rZHayBBykH9AtVWI1r0EfYkeFT+eFQ+wrvBYwow/Jelw/e4DT4xOhJSKtONfkztmPw=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749046932; c=relaxed/simple;
bh=MzCm50KLVuiV+3Enk3CBzrmbprVZ4/iPg8FnFg1pJsY=;
h=From:To:Cc:Subject:Date:Message-ID:Content-Type:MIME-Version; b=W5e6G1AdWfxa/ch2ywGV6ytgUIpg7dRmaYeESNyRB8SkkaHEElaivJO83NUsSORu3n5RJplaqRVsLDBKS59O9Vh3D8K213JMFKeeU+qxiNivyySquFYX2oFccIPJ9CfwkQhJHJwr7B/5+G19EACdZeCG+S5+Iblw4Rwv9p9nA+I=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=XhzGaf79; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=Mhb1KCg+; arc=fail smtp.client-ip=205.220.177.32
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com
Received: from pps.filterd (m0246630.ppops.net [127.0.0.1])
by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5549Mep9024844;
Wed, 4 Jun 2025 14:21:06 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc
:content-transfer-encoding:content-type:date:from:message-id
:mime-version:subject:to; s=corp-2025-04-25; bh=aU83xWJIERr3iW43
f+ewF5qwbyBrubl5/Z9nmt9Fk+M=; b=XhzGaf79vFp0vJaniS4RVxqKfcoeTh3u
43jXvg7+mK8fqBJwXn2rZDWWGBE18YY21wImnk7a8JYKFzAEbPunQ0Q3DUf3yzOb
T6Z7blY1SyHVsChnQ4leQlDEYFH/TCXavVKV/GG2Hsse2741k8tsD/mN5rrcq2nm
zgGQa+9jvM2QhRZY8Q0qgdnzkZ8FzFg/Pee8oFxHKYkhwiEV/gDOwTtmlBEYOX8J
NK8Z+kaAO8d7khvMdtSo0lUgAcsJ3BqIbDph5xo5yc/JMjwUG9/4qNd1qlCIuJEF
4yk+rzBy14cs/DoDEA6JkWrAgO0aaJr5cEdZCDClyuFcpClvdyafIg==
Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20])
by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 471g8gc3eq-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 04 Jun 2025 14:21:06 +0000 (GMT)
Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1])
by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 554DsM7D030726;
Wed, 4 Jun 2025 14:21:05 GMT
Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12on2076.outbound.protection.outlook.com [40.107.243.76])
by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 46yr7atu6t-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 04 Jun 2025 14:21:05 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=TSlZUq1o57OJrcnXzGIY65wIeF/+LcnvAos1iYOfKkHwgu+FN4ekOljuJbi3TZwvyXG/bvLoT9frchQJyBWWGo3/XYoSCn24RMXj8xzR1Phl+SdgF+PInHsVd6JcsdoxSi5Up5ts4MC1K7aJ8/Evf3bgvPaFLnEBn139RRt9Sm8Iq/AXR/dURrKhjxbYl4hXdu1HQZ5rbBXN5xWC/4hcvTT2Mtks4qRo05MNdPTfPH2Dnbss/MxBKJyyNj9SAygiqVgJBdEuUfcIJu1yUSgpkBkrxkrbsEjAxzz/pLmlThgbTT35u1mBXbNAij7gkyh93lv1O2+cRvScTSiC4SN46Q==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=aU83xWJIERr3iW43f+ewF5qwbyBrubl5/Z9nmt9Fk+M=;
b=kcUrAWOm7TAovt+AbCSurJW2ze0PUf9RubLGu7lVYHI+iLqNAs03pXCBPokUpxe3yWVY68v2ZAEoYTlOu6GD7ZyriXgvtir2+06ju8CkaTU1bEuPq6C6pex69LgLTT+GwGnaeF1dVmu4IGAiS6Se3I99OZkjYnJmG8ddnchZ7wlaCAdMmAgpeYDQgdDyria43C8keahqGl8vR6YRI+LA086r4wnlLYnmzV6ff/HuN7VXfJAwukS6k361q/reOywbJzxqVXuP5Lt8Yzadi1OdOfvGcLXhJHw1VozT6r6hSHRfy5qzPASLGo7LofXy2SeYhp0X0ssWC0mDprgK9kO84g==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com;
dkim=pass header.d=oracle.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=aU83xWJIERr3iW43f+ewF5qwbyBrubl5/Z9nmt9Fk+M=;
b=Mhb1KCg+Wqk5akFsl6ZybSbyjWj2w4/z0mrBDbP+TDWL9mixWh+6IqrGpvVsMhgtrQhBzs462ETlD9T4/t+BGIvn/AQUFkA7jmZ2sBL6ebP9YWktg6q1pGbPqqKLcU29TUWn0eHSPZ7mv/iqFoJgkr/9wjxNKLQ5hTPmtKWRlnM=
Received: from DM4PR10MB8218.namprd10.prod.outlook.com (2603:10b6:8:1cc::16)
by IA3PR10MB8616.namprd10.prod.outlook.com (2603:10b6:208:57d::11) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8746.30; Wed, 4 Jun
2025 14:21:02 +0000
Received: from DM4PR10MB8218.namprd10.prod.outlook.com
([fe80::2650:55cf:2816:5f2]) by DM4PR10MB8218.namprd10.prod.outlook.com
([fe80::2650:55cf:2816:5f2%6]) with mapi id 15.20.8746.041; Wed, 4 Jun 2025
14:21:02 +0000
From: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>
To: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Barry Song <baohua@xxxxxxxxxx>, David Hildenbrand <david@xxxxxxxxxx>,
"Liam R . Howlett" <Liam.Howlett@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>, Mike Rapoport <rppt@xxxxxxxxxx>,
Suren Baghdasaryan <surenb@xxxxxxxxxx>, Michal Hocko <mhocko@xxxxxxxx>,
Muchun Song <muchun.song@xxxxxxxxx>,
Oscar Salvador <osalvador@xxxxxxx>,
Huacai Chen <chenhuacai@xxxxxxxxxx>, WANG Xuerui <kernel@xxxxxxxxxx>,
Jonas Bonn <jonas@xxxxxxxxxxxx>,
Stefan Kristiansson <stefan.kristiansson@xxxxxxxxxxxxx>,
Stafford Horne <shorne@xxxxxxxxx>,
Paul Walmsley <paul.walmsley@xxxxxxxxxx>,
Palmer Dabbelt <palmer@xxxxxxxxxxx>, Albert Ou <aou@xxxxxxxxxxxxxxxxx>,
Alexandre Ghiti <alex@xxxxxxxx>, Jann Horn <jannh@xxxxxxxxxx>,
loongarch@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
linux-openrisc@xxxxxxxxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx,
linux-mm@xxxxxxxxx
Subject: [PATCH v2] mm/pagewalk: split walk_page_range_novma() into kernel/user parts
Date: Wed, 4 Jun 2025 15:19:58 +0100
Message-ID: <20250604141958.111300-1-lorenzo.stoakes@xxxxxxxxxx>
X-Mailer: git-send-email 2.49.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain
X-ClientProxiedBy: LO4P123CA0490.GBRP123.PROD.OUTLOOK.COM
(2603:10a6:600:1ab::9) To DM4PR10MB8218.namprd10.prod.outlook.com
(2603:10b6:8:1cc::16)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: DM4PR10MB8218:EE_|IA3PR10MB8616:EE_
X-MS-Office365-Filtering-Correlation-Id: 2c7cfe31-e1c9-4707-ad3d-08dda37308e7
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|7416014|376014;
X-Microsoft-Antispam-Message-Info:
=?us-ascii?Q?tatZpPIztYNvaBCaxqerTDcY9lsefx73fc4WidCP3u7nGOGbwKVGZbfxBZ4l?=
=?us-ascii?Q?UVWDvZ3NhsTP1Rwn+Yo1rvAQQhmhfYFO435pHTrdRCCT7kFGJEG2vhkrGVSw?=
=?us-ascii?Q?bMX7NXB9A7nqI2tnSPCa5p2BtQncZY7MNOufSUO7CueZGAagAbhhvnS/Uhe2?=
=?us-ascii?Q?BHvqjIKR3FppHb1tfZPKexE6SRs3xTf2e5XDlnbNBgSgSFe5bex+nuB7S6Ey?=
=?us-ascii?Q?6nN4Di2+e/t2T0M7WBNjWzZ0BON5B8rXz4KeaS8LwTnkawPm0JY4iVSkxkRs?=
=?us-ascii?Q?aQvsefhF4bBNIS53xAJYLFCEBXSgeacyOTPL1VmNFUSOR0SohVsfXOV9Bfqw?=
=?us-ascii?Q?LzSqtXvfNFvHFqjRaNw1xfwvAjqdqrWcVrmhZHG5nIIVrk9EdsJWpFk2DTK8?=
=?us-ascii?Q?V82C16yY9WLBd8P0xsJxc1Z5/CQiSjCw03tvb67XY1+xQSiMSrux5mtJrg3M?=
=?us-ascii?Q?5DXqbojgceZ7KNnHm6iJoUsL9NGC4Y9jq+P7o8IDw7t2yqihOn+kOfUEQEbV?=
=?us-ascii?Q?nhGvi8kU5EctOPlMK1XxnOA1ToV9T5lgitzLXa2W3lL9QDSKvmwX7iVTwCNN?=
=?us-ascii?Q?ln357EOnqDYJIOSUJaiqiH+zJYt6PNxjIEEPlpMk1941w+AjDJXsrZFicM0e?=
=?us-ascii?Q?RD4L7Ivm8L7EFYtg7Z9yLjTucLjigzIrNV39qdrJZOB2F+kiPF+mldYlSYO6?=
=?us-ascii?Q?h664dz3yFyg+yjEzYtaC0P+xrbsx4qaTK5yy/+AImtTzeEcBwEWwRzJcNlhP?=
=?us-ascii?Q?tkbCadcAYajICHPEbzCI1lsrtjZA8Gd8ZJwAmd+7wVqa0l2HYZdljqcr2QRq?=
=?us-ascii?Q?ArjoOm7uiqDMqnYGvk6nE/uOeFzLp9l26mec5R63AjaezznCoL6qS597Fcv9?=
=?us-ascii?Q?1B4mgvClimDHhbPrI3Svl8sBEyWrA1jUxHyBXlsMewcJYm2IzKhg1YqOSZ32?=
=?us-ascii?Q?t3t9pI0qOvwtv/+GVCAT5Xy8TU+l/aFcbHFAe9oB3tm1XgIvaOR5NNe5OpdI?=
=?us-ascii?Q?OcocMkbD86l4mntmsK2KR099+FCYcT5H+2PJAwupYcZouvW2kAV7QkbI/y7I?=
=?us-ascii?Q?1+3RzvdMtnk2IsyhsP/kZeLt5zgF56zlBfifJZiJGH18Q9L6HlFeo9kxU88+?=
=?us-ascii?Q?qB7Kjy85TrqIFxDkSnk6Fv289HI5tdZ3erXDFK0xuDAfzU30qWlBFFNynrC7?=
=?us-ascii?Q?LnXfqAq19SYEQAygs3MfKxl1raCzg5LSWGZ4q/Byrg2/evABS7VVvqhAinbl?=
=?us-ascii?Q?HfBbses74ILyOutdeocLRypU7GWljV0/a79Zi81QY8Fd7o0lyynle3O/M/8C?=
=?us-ascii?Q?gQA2i/HQ7ZlvdSztgieN8eNkMwSAcodq+hh47jdAFxgxzZ02PUkaoFwMWtBr?=
=?us-ascii?Q?IRF99tsetwkpJrO8SFCcGiGtd77KGxIyYWsY9ouXDrCSTVrb4yVtEXqizpJ3?=
=?us-ascii?Q?osFxkVYuVaw=3D?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR10MB8218.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(7416014)(376014);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?us-ascii?Q?2iobeLQvGlYR2C030S0vs98XdJFWry+Qdr62dFA0OXuGg5L8hDpbfY6v/06I?=
=?us-ascii?Q?v8f1YfiviXO6iE2rHe4eZc01FFPGCZuR2J1QxE3l8sRV2mPvL73OS5Q5C1v5?=
=?us-ascii?Q?aMMJNzoEWM5yNLHiPSy1XKT+xO1kNdODNDuoK9F/rfqH98RVto0NwO5S69Kj?=
=?us-ascii?Q?v00lQ6K2/wlfgtmZVa73iDH/tb9oLI1pPOUHZbvVfKaGHYGdw9BhP2shhxe8?=
=?us-ascii?Q?Z33pY4nNcSnFeUcGIT1+LL+LwivzAGCWspRft3eIuwyJlFvburyvI8Gwtl7d?=
=?us-ascii?Q?RKNEAZI+LntzAO9PNq9ZQvI64E+0+/fVvNq7GnVFP0+ZlS1JsdmDiBbnRPfe?=
=?us-ascii?Q?FutSAiv5Syt8DQu3kabxF4bwX32/WbGv1KVG8D7/FILV0TasZz2hXRO9qxMo?=
=?us-ascii?Q?OQcKxhDhtoxLNUVzQrGO+22ZpWs2BJjtW8apPH4vApL8ZD7satnjKPWP7kcI?=
=?us-ascii?Q?G4ztWYYKODkWwd2lZWCOXNIMVS/ytIo4R1EB7+VPQiGKUR23hHW/ARjDrFmo?=
=?us-ascii?Q?5+JRbE+ygJ1AJvjqHLwxGCXJqSSARIEs1J5d44u4qNPd+U25QVGFA10j7p86?=
=?us-ascii?Q?WkLox1DIm2rjh24i5QvISduZcWSIpcd0lZOptYqnGQ5EQ61+kObhEjbPgmvl?=
=?us-ascii?Q?CZxeOydXDXfIComgiYexdWOLqXSlr0Fsx2fh3yRXsOGoyXOXPADjjjSDdj12?=
=?us-ascii?Q?7a3iwTOtzmyFqNAXKVjchx1R5ryADFpwfQp77NpyXKc9fJ/5ChBmdRLixK1r?=
=?us-ascii?Q?cS6w5/ERhvUv6CEoNvnC9VgQMoZhgG0SIu7bBn5jHfHKbdi/wu+rYWsQ8Uw6?=
=?us-ascii?Q?nYoZ7RluR13WsZprw3hbKDGD1//JOPKFowgWgOsuoj3hhf68tpZqrk6pjx1h?=
=?us-ascii?Q?WWyrS77pdprUpDqIn1lzM1GOH0Eht1An1ZgNlaHLy+I5tNH/4DimAU+xjoxT?=
=?us-ascii?Q?3ptJs+HlUu6L78V+RqalMRa0rnA7laGr3AMZQxRd0JBDe/SGqksnTzgeEapN?=
=?us-ascii?Q?n7c+PfPHdQ5iL6RAVJcHmfRL0HutRrCE8tv3DgcAjwg64FceYd4pIZVurZNq?=
=?us-ascii?Q?Ew574hSaUU5LUNKkuS/0xwTPhUP/B5l/OZGtbcG94xhREqUa0E0pFLv0EJ6/?=
=?us-ascii?Q?3aqXAEkqlToS6pfq3whulnALlf4EjcTp3dHKB+asfaUZH14cXumbNKkfoQB+?=
=?us-ascii?Q?8S6pUwGkM8pcpruoEfOIqskvIFIBB8S92lZ/Hvufw65I50mRUY9ShJPHoRo9?=
=?us-ascii?Q?rOCRmvmHgLg8HR9rrReRrAaPuNFzxHSMsRHyKGBSb0tpLXvSFcfhbefxCKr4?=
=?us-ascii?Q?PB+AntFz+8su+MKyVLlrQ4Lg9xaLyCs7MZXpg4R5oRa1/yFaKy3X+zW8uREu?=
=?us-ascii?Q?bIDSQFqnLDnfAux38QwgQgEiO4ccYj4e+B9p3FbLg5YOBMmaTndLEJeAQp/a?=
=?us-ascii?Q?yhTeJdpZ/+c7HhFeyTsiKKeew1+WdiO08AxLqmPsinFivUM9tlQpCxcgEHUt?=
=?us-ascii?Q?NjTXQEEUqrMqybuqYko/68C8Ek70iEWxZsx2/dh/bsWt3Bw/6/1NP/L8fOK8?=
=?us-ascii?Q?/StzCw8nSY6/nx8gkVfZcEFq4c6EfXSA3fgoAXjy7Gj+/IGVhco25LfTYa7c?=
=?us-ascii?Q?lw=3D=3D?=
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0:
IgofUlTqL5lv6f/nWdOayrLQ2z2T8ZYjnI7WofAne5JXhpR59R9RQAyvys6CPuc/C2yEnMaQHobq6xz3txgAWDl/DxfU6Bqxpa2zwxvpLnvryziFdnoqcVeOKJ4t5uJHGAQU/Ghh3l4jNH5VTN6sh/MoWX3UHAfSd0MYvKO79b+jm6yZgbXzPqeH1xnT0gGYXzoY/GlRZjTEeGxzEmV5cRSEg5YgaBrkpi0YLaBwhESuFRsUFrEG/Vxu8W6BK8YYq3Ok33sidKbNXA4TbbWJAbRCqif6JJTnbf4uo9GDtUWNvN12XcsGWjHPEF59SmR9zoPYJnelC2cSmVd2TAGMLAz9qR0wVcF0WULWsFm4ajIe+cXhVxD/FRp63CuNpst29vJDR343OLlcASLuQeeIr7QJ3thfOxWKykHEtTBER4ai0ghjhyCggmKWmfZyE3QS8aCXCNhpPPq3wSkCELH/J9DwWsvguCygMfyhgHcYx0GHEsMiUMY15xSJADsTP/dx5lPwHwGcGTk0qV0NFPY+10O9fC2v1lqVhM3ugaEQWRbqBKiQXJvslH2fhT3zymEIkq1KreigPZ9A4XTGpRPgZkldTADeAKJwtYlion0T/Vs=
X-OriginatorOrg: oracle.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 2c7cfe31-e1c9-4707-ad3d-08dda37308e7
X-MS-Exchange-CrossTenant-AuthSource: DM4PR10MB8218.namprd10.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 14:21:02.4622
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: jRgqBLeBd2joOa/bihfrko8uwviDtxvG0baahDA6pHG3AX+MC26MjShoLVzrRR9yet2Vz9V4vkz7vFwuNNfoV+rQfc3z8GJsCapaiOh3jsg=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA3PR10MB8616
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 malwarescore=0
suspectscore=0 phishscore=0 adultscore=0 spamscore=0 mlxlogscore=999
mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1
engine=8.12.0-2505160000 definitions=main-2506040109
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDEwOSBTYWx0ZWRfX1amfuMoqRMN+ LEzfFrBZoFuhYmCaaDSCzKKNsmPb+/EFokNb4J6lLxb5gsDf5vR6z3NI30EOaDQBlA7tIN7ElxC jRPzI9tQKBsmP2eFuUNmE2qIXbyyKODSWLSjtOdc7jX8QgXYd7FB+WHG4GBK1B+7s6vt5cj0Z+e
do9zkr6iOcZUF3BwY3SvOjxwKokZ1Uozw43cl0joPi3KkmUSEr8tKS9NdJAsBknpAwSDXsB1RJv kY1GeLLi5kE7ni4u+D/VfUm3Rk9ieq7Ec43+Mca0ALcvDcMkWRNAx5LO2bCkD0Ziwnc2LSpgA7Z ofc2HVBXd6f+mWIbImhhh+1gmh9IoSpUXaU8sf/b2fUEpObfM56OHLM7RTN+e3YocgPPIrR6CrA
1KwVfS93/6iJ5nF7g8OZ2ROd5yihwrgF2Aw+BQTbVzaWRr8bJvdK3p9kidHUYtQsbWgrLJmf
X-Proofpoint-GUID: 0Du9SEdNWXh8UFAPZDwQIQYvNouWW4up
X-Proofpoint-ORIG-GUID: 0Du9SEdNWXh8UFAPZDwQIQYvNouWW4up
X-Authority-Analysis: v=2.4 cv=H5Tbw/Yi c=1 sm=1 tr=0 ts=68405652 b=1 cx=c_pps a=e1sVV491RgrpLwSTMOnk8w==:117 a=e1sVV491RgrpLwSTMOnk8w==:17 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19
a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19 a=xqWC_Br6kY4A:10 a=6IFa9wvqVegA:10 a=GoEa3M9JfhUA:10 a=VwQbUJbxAAAA:8 a=yPCof4ZbAAAA:8 a=OuE4BUwA5CVBbw1S2bEA:9 cc=ntf awl=host:14714
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
The walk_page_range_novma() function is rather confusing - it supports two
modes, one used often, the other used only for debugging.
The first mode is the common case of traversal of kernel page tables, which
is what nearly all callers use this for.
Secondly it provides an unusual debugging interface that allows for the
traversal of page tables in a userland range of memory even for that memory
which is not described by a VMA.
It is far from certain that such page tables should even exist, but perhaps
this is precisely why it is useful as a debugging mechanism.
As a result, this is utilised by ptdump only. Historically, things were
reversed - ptdump was the only user, and other parts of the kernel evolved
to use the kernel page table walking here.
Since we have some complicated and confusing locking rules for the novma
case, it makes sense to separate the two usages into their own functions.
Doing this also provide self-documentation as to the intent of the caller -
are they doing something rather unusual or are they simply doing a standard
kernel page table walk?
We therefore establish two separate functions - walk_page_range_debug() for
this single usage, and walk_kernel_page_table_range() for general kernel
page table walking.
We additionally make walk_page_range_debug() internal to mm.
Note that ptdump uses the precise same function for kernel walking as a
convenience, so we permit this but make it very explicit by having
walk_page_range_novma() invoke walk_kernel_page_table_range() in this case.
Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>
Acked-by: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>
---
v2:
* Renamed walk_page_range_novma() to walk_page_range_debug() as per David.
* Moved walk_page_range_debug() definition to mm/internal.h as per Mike.
* Renamed walk_page_range_kernel() to walk_kernel_page_table_range() as
per David.
v1 resend:
* Actually cc'd lists...
* Fixed mistake in walk_page_range_novma() not handling kernel mappings and
update commit message to referene.
* Added Mike's off-list Acked-by.
* Fixed up comments as per Mike.
* Add some historic flavour to the commit message as per Mike.
https://lore.kernel.org/all/20250603192213.182931-1-lorenzo.stoakes@xxxxxxxxxx/
v1:
(accidentally sent off-list due to error in scripting)
arch/loongarch/mm/pageattr.c | 2 +-
arch/openrisc/kernel/dma.c | 4 +-
arch/riscv/mm/pageattr.c | 8 +--
include/linux/pagewalk.h | 7 ++-
mm/hugetlb_vmemmap.c | 2 +-
mm/internal.h | 4 ++
mm/pagewalk.c | 98 ++++++++++++++++++++++++------------
mm/ptdump.c | 3 +-
8 files changed, 82 insertions(+), 46 deletions(-)
diff --git a/arch/loongarch/mm/pageattr.c b/arch/loongarch/mm/pageattr.c
index 99165903908a..f5e910b68229 100644
--- a/arch/loongarch/mm/pageattr.c
+++ b/arch/loongarch/mm/pageattr.c
@@ -118,7 +118,7 @@ static int __set_memory(unsigned long addr, int numpages, pgprot_t set_mask, pgp
return 0;
mmap_write_lock(&init_mm);
- ret = walk_page_range_novma(&init_mm, start, end, &pageattr_ops, NULL, &masks);
+ ret = walk_kernel_page_table_range(start, end, &pageattr_ops, NULL, &masks);
mmap_write_unlock(&init_mm);
flush_tlb_kernel_range(start, end);
diff --git a/arch/openrisc/kernel/dma.c b/arch/openrisc/kernel/dma.c
index 3a7b5baaa450..af932a4ad306 100644
--- a/arch/openrisc/kernel/dma.c
+++ b/arch/openrisc/kernel/dma.c
@@ -72,7 +72,7 @@ void *arch_dma_set_uncached(void *cpu_addr, size_t size)
* them and setting the cache-inhibit bit.
*/
mmap_write_lock(&init_mm);
- error = walk_page_range_novma(&init_mm, va, va + size,
+ error = walk_kernel_page_table_range(va, va + size,
&set_nocache_walk_ops, NULL, NULL);
mmap_write_unlock(&init_mm);
@@ -87,7 +87,7 @@ void arch_dma_clear_uncached(void *cpu_addr, size_t size)
mmap_write_lock(&init_mm);
/* walk_page_range shouldn't be able to fail here */
- WARN_ON(walk_page_range_novma(&init_mm, va, va + size,
+ WARN_ON(walk_kernel_page_table_range(va, va + size,
&clear_nocache_walk_ops, NULL, NULL));
mmap_write_unlock(&init_mm);
}
diff --git a/arch/riscv/mm/pageattr.c b/arch/riscv/mm/pageattr.c
index d815448758a1..3f76db3d2769 100644
--- a/arch/riscv/mm/pageattr.c
+++ b/arch/riscv/mm/pageattr.c
@@ -299,7 +299,7 @@ static int __set_memory(unsigned long addr, int numpages, pgprot_t set_mask,
if (ret)
goto unlock;
- ret = walk_page_range_novma(&init_mm, lm_start, lm_end,
+ ret = walk_kernel_page_table_range(lm_start, lm_end,
&pageattr_ops, NULL, &masks);
if (ret)
goto unlock;
@@ -317,13 +317,13 @@ static int __set_memory(unsigned long addr, int numpages, pgprot_t set_mask,
if (ret)
goto unlock;
- ret = walk_page_range_novma(&init_mm, lm_start, lm_end,
+ ret = walk_kernel_page_table_range(lm_start, lm_end,
&pageattr_ops, NULL, &masks);
if (ret)
goto unlock;
}
- ret = walk_page_range_novma(&init_mm, start, end, &pageattr_ops, NULL,
+ ret = walk_kernel_page_table_range(start, end, &pageattr_ops, NULL,
&masks);
unlock:
@@ -335,7 +335,7 @@ static int __set_memory(unsigned long addr, int numpages, pgprot_t set_mask,
*/
flush_tlb_all();
#else
- ret = walk_page_range_novma(&init_mm, start, end, &pageattr_ops, NULL,
+ ret = walk_kernel_page_table_range(start, end, &pageattr_ops, NULL,
&masks);
mmap_write_unlock(&init_mm);
diff --git a/include/linux/pagewalk.h b/include/linux/pagewalk.h
index 9700a29f8afb..8ac2f6d6d2a3 100644
--- a/include/linux/pagewalk.h
+++ b/include/linux/pagewalk.h
@@ -129,10 +129,9 @@ struct mm_walk {
int walk_page_range(struct mm_struct *mm, unsigned long start,
unsigned long end, const struct mm_walk_ops *ops,
void *private);
-int walk_page_range_novma(struct mm_struct *mm, unsigned long start,
- unsigned long end, const struct mm_walk_ops *ops,
- pgd_t *pgd,
- void *private);
+int walk_kernel_page_table_range(unsigned long start,
+ unsigned long end, const struct mm_walk_ops *ops,
+ pgd_t *pgd, void *private);
int walk_page_range_vma(struct vm_area_struct *vma, unsigned long start,
unsigned long end, const struct mm_walk_ops *ops,
void *private);
diff --git a/mm/hugetlb_vmemmap.c b/mm/hugetlb_vmemmap.c
index 27245e86df25..ba0fb1b6a5a8 100644
--- a/mm/hugetlb_vmemmap.c
+++ b/mm/hugetlb_vmemmap.c
@@ -166,7 +166,7 @@ static int vmemmap_remap_range(unsigned long start, unsigned long end,
VM_BUG_ON(!PAGE_ALIGNED(start | end));
mmap_read_lock(&init_mm);
- ret = walk_page_range_novma(&init_mm, start, end, &vmemmap_remap_ops,
+ ret = walk_kernel_page_table_range(start, end, &vmemmap_remap_ops,
NULL, walk);
mmap_read_unlock(&init_mm);
if (ret)
diff --git a/mm/internal.h b/mm/internal.h
index 6b8ed2017743..43788d0de6e3 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -1605,6 +1605,10 @@ static inline void accept_page(struct page *page)
int walk_page_range_mm(struct mm_struct *mm, unsigned long start,
unsigned long end, const struct mm_walk_ops *ops,
void *private);
+int walk_page_range_debug(struct mm_struct *mm, unsigned long start,
+ unsigned long end, const struct mm_walk_ops *ops,
+ pgd_t *pgd,
+ void *private);
/* pt_reclaim.c */
bool try_get_and_clear_pmd(struct mm_struct *mm, pmd_t *pmd, pmd_t *pmdval);
diff --git a/mm/pagewalk.c b/mm/pagewalk.c
index e478777c86e1..057a125c3bc0 100644
--- a/mm/pagewalk.c
+++ b/mm/pagewalk.c
@@ -584,9 +584,28 @@ int walk_page_range(struct mm_struct *mm, unsigned long start,
return walk_page_range_mm(mm, start, end, ops, private);
}
+static int __walk_page_range_novma(struct mm_struct *mm, unsigned long start,
+ unsigned long end, const struct mm_walk_ops *ops,
+ pgd_t *pgd, void *private)
+{
+ struct mm_walk walk = {
+ .ops = ops,
+ .mm = mm,
+ .pgd = pgd,
+ .private = private,
+ .no_vma = true
+ };
+
+ if (start >= end || !walk.mm)
+ return -EINVAL;
+ if (!check_ops_valid(ops))
+ return -EINVAL;
+
+ return walk_pgd_range(start, end, &walk);
+}
+
/**
- * walk_page_range_novma - walk a range of pagetables not backed by a vma
- * @mm: mm_struct representing the target process of page table walk
+ * walk_kernel_page_table_range - walk a range of kernel pagetables.
* @start: start address of the virtual address range
* @end: end address of the virtual address range
* @ops: operation to call during the walk
@@ -596,56 +615,69 @@ int walk_page_range(struct mm_struct *mm, unsigned long start,
* Similar to walk_page_range() but can walk any page tables even if they are
* not backed by VMAs. Because 'unusual' entries may be walked this function
* will also not lock the PTEs for the pte_entry() callback. This is useful for
- * walking the kernel pages tables or page tables for firmware.
+ * walking kernel pages tables or page tables for firmware.
*
* Note: Be careful to walk the kernel pages tables, the caller may be need to
* take other effective approaches (mmap lock may be insufficient) to prevent
* the intermediate kernel page tables belonging to the specified address range
* from being freed (e.g. memory hot-remove).
*/
-int walk_page_range_novma(struct mm_struct *mm, unsigned long start,
+int walk_kernel_page_table_range(unsigned long start, unsigned long end,
+ const struct mm_walk_ops *ops, pgd_t *pgd, void *private)
+{
+ struct mm_struct *mm = &init_mm;
+
+ /*
+ * Kernel intermediate page tables are usually not freed, so the mmap
+ * read lock is sufficient. But there are some exceptions.
+ * E.g. memory hot-remove. In which case, the mmap lock is insufficient
+ * to prevent the intermediate kernel pages tables belonging to the
+ * specified address range from being freed. The caller should take
+ * other actions to prevent this race.
+ */
+ mmap_assert_locked(mm);
+
+ return __walk_page_range_novma(mm, start, end, ops, pgd, private);
+}
+
+/**
+ * walk_page_range_debug - walk a range of pagetables not backed by a vma
+ * @mm: mm_struct representing the target process of page table walk
+ * @start: start address of the virtual address range
+ * @end: end address of the virtual address range
+ * @ops: operation to call during the walk
+ * @pgd: pgd to walk if different from mm->pgd
+ * @private: private data for callbacks' usage
+ *
+ * Similar to walk_page_range() but can walk any page tables even if they are
+ * not backed by VMAs. Because 'unusual' entries may be walked this function
+ * will also not lock the PTEs for the pte_entry() callback.
+ *
+ * This is for debugging purposes ONLY.
+ */
+int walk_page_range_debug(struct mm_struct *mm, unsigned long start,
unsigned long end, const struct mm_walk_ops *ops,
pgd_t *pgd,
void *private)
{
- struct mm_walk walk = {
- .ops = ops,
- .mm = mm,
- .pgd = pgd,
- .private = private,
- .no_vma = true
- };
-
- if (start >= end || !walk.mm)
- return -EINVAL;
- if (!check_ops_valid(ops))
- return -EINVAL;
+ /*
+ * For convenience, we allow this function to also traverse kernel
+ * mappings.
+ */
+ if (mm == &init_mm)
+ return walk_kernel_page_table_range(start, end, ops, pgd, private);
/*
- * 1) For walking the user virtual address space:
- *
* The mmap lock protects the page walker from changes to the page
* tables during the walk. However a read lock is insufficient to
* protect those areas which don't have a VMA as munmap() detaches
* the VMAs before downgrading to a read lock and actually tearing
* down PTEs/page tables. In which case, the mmap write lock should
- * be hold.
- *
- * 2) For walking the kernel virtual address space:
- *
- * The kernel intermediate page tables usually do not be freed, so
- * the mmap map read lock is sufficient. But there are some exceptions.
- * E.g. memory hot-remove. In which case, the mmap lock is insufficient
- * to prevent the intermediate kernel pages tables belonging to the
- * specified address range from being freed. The caller should take
- * other actions to prevent this race.
+ * be held.
*/
- if (mm == &init_mm)
- mmap_assert_locked(walk.mm);
- else
- mmap_assert_write_locked(walk.mm);
+ mmap_assert_write_locked(mm);
- return walk_pgd_range(start, end, &walk);
+ return __walk_page_range_novma(mm, start, end, ops, pgd, private);
}
int walk_page_range_vma(struct vm_area_struct *vma, unsigned long start,
diff --git a/mm/ptdump.c b/mm/ptdump.c
index 9374f29cdc6f..61a352aa12ed 100644
--- a/mm/ptdump.c
+++ b/mm/ptdump.c
@@ -4,6 +4,7 @@
#include <linux/debugfs.h>
#include <linux/ptdump.h>
#include <linux/kasan.h>
+#include "internal.h"
#if defined(CONFIG_KASAN_GENERIC) || defined(CONFIG_KASAN_SW_TAGS)
/*
@@ -177,7 +178,7 @@ void ptdump_walk_pgd(struct ptdump_state *st, struct mm_struct *mm, pgd_t *pgd)
mmap_write_lock(mm);
while (range->start != range->end) {
- walk_page_range_novma(mm, range->start, range->end,
+ walk_page_range_debug(mm, range->start, range->end,
&ptdump_ops, pgd, st);
range++;
}
--
2.49.0
Return-Path: <linux-kernel+bounces-673343-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id BC41D41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:22:37 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 040D3189A721
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:22:50 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 60A59290BCD;
Wed, 4 Jun 2025 14:22:24 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=invisiblethingslab.com header.i=@invisiblethingslab.com header.b="Q4ErSjeW";
dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="D0j+LQ7c"
Received: from fhigh-a7-smtp.messagingengine.com (fhigh-a7-smtp.messagingengine.com [103.168.172.158])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3C42426ACC;
Wed, 4 Jun 2025 14:22:20 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.158
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749046943; cv=none; b=FB23tD793sTAGpyDAFhZY1bc+XVQlba5hBdbv8LA5LiLjFOXmMyk3wOWaf9Nu6iVUIxNTUpPZq03ANtuLhPsY5/0faidPS1oUyZ9d+FgZnKSKwXOb//bii4DuyDbHe7IJpRXJRYc9GC+Ga/YundbxMjmTd2L9vJK2uXdlJV7fhQ=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749046943; c=relaxed/simple;
bh=21q2Hgnh+ETCIq892NOXpcaeeVs0BPFo0vdeaSX1P5o=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=OejlejE0E1el9O0MmAo2lihyxB1ImO/I6+ZUgFdSalsUDG1/6Tu8xFo9EweDbSk8eMNNoabmhKqeh8sf4zGtt9kmQfebkGbJ7OiDHCZAmsBWO+6OpedxxLsLllFTgCUnyNSzSJbCYsAe67EVmyT250AZDBOGbFkyTQfRKYOClKg=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=invisiblethingslab.com; spf=pass smtp.mailfrom=invisiblethingslab.com; dkim=pass (2048-bit key) header.d=invisiblethingslab.com header.i=@invisiblethingslab.com header.b=Q4ErSjeW; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=D0j+LQ7c; arc=none smtp.client-ip=103.168.172.158
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=invisiblethingslab.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=invisiblethingslab.com
Received: from phl-compute-06.internal (phl-compute-06.phl.internal [10.202.2.46])
by mailfhigh.phl.internal (Postfix) with ESMTP id 417A21140237;
Wed, 4 Jun 2025 10:22:20 -0400 (EDT)
Received: from phl-mailfrontend-01 ([10.202.2.162])
by phl-compute-06.internal (MEProxy); Wed, 04 Jun 2025 10:22:20 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
invisiblethingslab.com; h=cc:cc:content-type:content-type:date
:date:from:from:in-reply-to:in-reply-to:message-id:mime-version
:references:reply-to:subject:subject:to:to; s=fm1; t=1749046940;
x=1749133340; bh=l9qTL6VyDfkoyc94nfz6CdcDFNs7QiHmBUzDCEMHvgE=; b=
Q4ErSjeW4VOznKj0N+l3iczNlcBj+NXKv2ttSNWavCZIq8sDZ9aSXq6qnKzCuMsG
K5In3r//KTUnq7X3M4aNES5WcC+p1RdR16RNz8VHhbvFYGcxnnODJGsc6p/D7OCs
cky8j3l8OKDIkYrT4eiKkaYXYRWgm5/wOCGEYGA93nmrED45BFUKl+TeZIvmUHDx
4r22XvBct4APiCGsoXjbFtSN+xZfCOz5tnKcN0m6gR1NvPlilC1MqyXdYE9Uqp+4
ZfWkw0JiMdovs2aE4Mn3pQ3xKcQR8J63AhorWedPjEsZ/ZnX9qQMCOemxn1VyoUZ
UrOQ9TirfiFKwq0Z/x/elg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
messagingengine.com; h=cc:cc:content-type:content-type:date:date
:feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
:message-id:mime-version:references:reply-to:subject:subject:to
:to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=
1749046940; x=1749133340; bh=l9qTL6VyDfkoyc94nfz6CdcDFNs7QiHmBUz
DCEMHvgE=; b=D0j+LQ7cOJA1nQG4pbbCqsU+8T60bcyhWBSItXL5xkQ2AScoRup
D6g4gDmau1B431JqpfNxV3xt57U4JDhFpjfZ+nhowCNxV4g4f/rJ+htSU9nXGg3o
74J+lhyCe1zhavHk5HjkbV2NtYsXrLddg1LY6oYfM0d5FzrpEgbNxLawWBpNF7B9
J2asq5O3u4rMDl4ayVWbUvR1Or1mSbYOuDfy403SsoLyDEwcaPtx3oUM/bWPZdeF
u+Glkou7WcVwQHq6SKjdRXVkE7ZXYEkq8mBzvqvbs6VEMAd94p393OhV+ckBkhne
fVinQQncbTo5iuwokYLteKc5APqImwNbZzg==
X-ME-Sender: <xms:m1ZAaPw6UWuK9hpeyxebyC6A52423UjSdibmiQKlGTFVdUVfMejm0w>
<xme:m1ZAaHSh2tywL0-gFkcmuHcEBkbc70T-H7K4mJybqLp1XTy1rjeOh1Nve0O9AN7YL
u8P6zxXU0V6XA>
X-ME-Received: <xmr:m1ZAaJVOddxB3gO064bczIBpuj1OQ_vGKB4MPRikzRCKr0eQhzkg0jpWVpOm4iHKKpNjmQ1bfcgDd0QY8H3VcaLdHBTph-YOq6k>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddugddvvdeiucetufdoteggodetrfdotf
fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu
rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh
htshculddquddttddmnecujfgurhepfffhvfevuffkfhggtggujgesghdtroertddtjeen
ucfhrhhomhepofgrrhgvkhcuofgrrhgtiiihkhhofihskhhiqdfikphrvggtkhhiuceomh
grrhhmrghrvghksehinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomheqnecuggft
rfgrthhtvghrnheptdetvdfhkedutedvleffgeeutdektefhtefhfffhfeetgefhieegle
dvtddtkedtnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhho
mhepmhgrrhhmrghrvghksehinhhvihhsihgslhgvthhhihhnghhslhgrsgdrtghomhdpnh
gspghrtghpthhtohepledpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheprhhoghgv
rhdrphgruhestghithhrihigrdgtohhmpdhrtghpthhtohepjhhgrhhoshhssehsuhhsvg
drtghomhdprhgtphhtthhopeigvghnqdguvghvvghlsehlihhsthhsrdigvghnphhrohhj
vggtthdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvg
hrnhgvlhdrohhrghdprhgtphhtthhopehjrghsohhnrdgrnhgurhihuhhksegrmhgurdgt
ohhmpdhrtghpthhtohepjhifsehnuhgtlhgvrghrfhgrlhhlohhuthdrnhgvthdprhgtph
htthhopehsshhtrggsvghllhhinhhisehkvghrnhgvlhdrohhrghdprhgtphhtthhopeho
lhgvkhhsrghnughrpghthihshhgthhgvnhhkohesvghprghmrdgtohhmpdhrtghpthhtoh
epshhtrggslhgvsehvghgvrhdrkhgvrhhnvghlrdhorhhg
X-ME-Proxy: <xmx:m1ZAaJi_yy7OaaEYivfAL-FTDb0mEe_8_itFv7hYF8TfdadF9Da2xQ>
<xmx:m1ZAaBDoRqc-amRoTlDHMh_luKJYVdJJq8m2ZY10fIqFT5830IZaLQ>
<xmx:m1ZAaCLLVT38noOg_E7NdYhKtNB50na0NfVage2tJKiaOL-_4fAA7Q>
<xmx:m1ZAaACb_WNon-eBBvWPrABlBSzf3x4PwdbrF_dWVL47s0fa_Ugsug>
<xmx:nFZAaP2ldpj4cJl3_ertUruqbAmMgG4SV2TvOG0W_agpxzhVp9iSGrxX>
Feedback-ID: i1568416f:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
4 Jun 2025 10:22:18 -0400 (EDT)
Date: Wed, 4 Jun 2025 16:22:16 +0200
From: Marek =?utf-8?Q?Marczykowski-G=C3=B3recki?= <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
To: Roger Pau Monne <roger.pau@xxxxxxxxxx>
Cc: Juergen Gross <jgross@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, jason.andryuk@xxxxxxx,
John <jw@xxxxxxxxxxxxxxxxxx>,
Stefano Stabellini <sstabellini@xxxxxxxxxx>,
Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>,
stable@xxxxxxxxxxxxxxx
Subject: Re: [PATCH] xen/x86: fix initial memory balloon target
Message-ID: <aEBWmAoDSaNpsrvQ@mail-itl>
References: <20250514080427.28129-1-roger.pau@xxxxxxxxxx>
<aCWtZNxfhazmmj_S@mail-itl>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;
protocol="application/pgp-signature"; boundary="rjdcZPeLS3c+Qw6Y"
Content-Disposition: inline
In-Reply-To: <aCWtZNxfhazmmj_S@mail-itl>
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
--rjdcZPeLS3c+Qw6Y
Content-Type: text/plain; protected-headers=v1; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Date: Wed, 4 Jun 2025 16:22:16 +0200
From: Marek =?utf-8?Q?Marczykowski-G=C3=B3recki?= <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
To: Roger Pau Monne <roger.pau@xxxxxxxxxx>
Cc: Juergen Gross <jgross@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, jason.andryuk@xxxxxxx,
John <jw@xxxxxxxxxxxxxxxxxx>,
Stefano Stabellini <sstabellini@xxxxxxxxxx>,
Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>,
stable@xxxxxxxxxxxxxxx
Subject: Re: [PATCH] xen/x86: fix initial memory balloon target
On Thu, May 15, 2025 at 11:01:24AM +0200, Marek Marczykowski-G=C3=B3recki w=
rote:
On Wed, May 14, 2025 at 10:04:26AM +0200, Roger Pau Monne wrote:
> When adding extra memory regions as ballooned pages also adjust the bal=
loon
> target, otherwise when the balloon driver is started it will populate
> memory to match the target value and consume all the extra memory regio=
ns
> added.
>=20
> This made the usage of the Xen `dom0_mem=3D,max:` command line paramete=
r for
> dom0 not work as expected, as the target won't be adjusted and when the
> balloon is started it will populate memory straight to the 'max:' value.
> It would equally affect domUs that have memory !=3D maxmem.
>=20
> Kernels built with CONFIG_XEN_UNPOPULATED_ALLOC are not affected, becau=
se
> the extra memory regions are consumed by the unpopulated allocation dri=
ver,
> and then balloon_add_regions() becomes a no-op.
>=20
> Reported-by: John <jw@xxxxxxxxxxxxxxxxxx>
> Fixes: 87af633689ce ('x86/xen: fix balloon target initialization for PV=
H dom0')
> Signed-off-by: Roger Pau Monn=C3=A9 <roger.pau@xxxxxxxxxx>
=20
Tested-by: Marek Marczykowski-G=C3=B3recki <marmarek@invisiblethingslab.c=
om>
I think this wants Cc: stable, since the commit named in Fixes: got
backported too. Or is the Fixes tag enough?
--=20
Best Regards,
Marek Marczykowski-G=C3=B3recki
Invisible Things Lab
--rjdcZPeLS3c+Qw6Y
Content-Type: application/pgp-signature; name=signature.asc
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCAAdFiEEhrpukzGPukRmQqkK24/THMrX1ywFAmhAVpgACgkQ24/THMrX
1yxTXAf/f2m+HJfB41dbfKE54f3JNUqW0V87ci8kZTbhmd1/JxZFU+o1phpKn9Dd
PW4Dd2qzBqcu7h+rlG6C3q9Y6ugtR17qU3eTWA3OCNmBgwK34ga3oJ6bJ5Fbvkyv
//B71ZXIXTv3KxjQgRUH6v3n1WNNqLjkFQBtHqjlC/1K8NCierXgiQK25ysueo/K
yybT8woevQgoZm1E6VINtDYo6c8sbtGE+RorVX8Q4DeSn3AutWRG/AFL/yw1RF7U
QAgZq297ZSLAyHFVtNiGoWY5zELHTVb9EW/ajvPE0jPnuOjEgGw+Mwg2SnAmHejb
rgokQ7UTD84BW7b58MHEMK0W190lRA==
=Birs
-----END PGP SIGNATURE-----
--rjdcZPeLS3c+Qw6Y--
Return-Path: <linux-kernel+bounces-673344-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 67DC441E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:22:47 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 171793A7A5D
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:22:25 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 57C31290BBD;
Wed, 4 Jun 2025 14:22:33 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="jAaLnk0g";
dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="iuIWBj9v";
dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="rx9XVbmg";
dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="zDWkXL1q"
Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1F78D28E5F4
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:22:29 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749046952; cv=none; b=An2FSuhChq9FZEz3uoh/HFVijQIE4fA2THuBUe1czYrI9AeyqgRxqeG/3fSLE+gE0JMduyWCDpGMjQkPOlb1klkxszMDgYPJfC2K1OFsMB6mEBJml5/Fe/Otx1cAo4tdCNNoprHDn4p14GXY6IYaQdKs5E7RZRtAcSC9TkLuQqY=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749046952; c=relaxed/simple;
bh=20qLp5eFVCc9S0TuosG0Blvo8ope/dtZh9+5znMNB4k=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=u4Wz796VZPeoqfKyJLZrVutlYEJmx9y+WfA/tYjYjHj3SFU2CT2HwM5m5xIwcJ2Mcgbh7+62J0YE5OWnJ8jfVUWCIfBU2lHWUhhl+UOEQqSIRpOUUvvQmCZbYleRGF4D5qyGzTyqYf/cUN19juCkfnFLj8d6kFfqSicFd9KiUOg=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz; spf=pass smtp.mailfrom=suse.cz; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=jAaLnk0g; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=iuIWBj9v; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=rx9XVbmg; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=zDWkXL1q; arc=none smtp.client-ip=195.135.223.130
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.cz
Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(No client certificate requested)
by smtp-out1.suse.de (Postfix) with ESMTPS id CFF4C223DE;
Wed, 4 Jun 2025 14:22:26 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa;
t=1749046948; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=ALVStNkShmrg++8Piu6YCjCiJOgAVP64VNCUFeKklYc=;
b=jAaLnk0g7osHbUyBgGlgJi9xTP3doUgFUz3sLTa8ufjQbNyxh/UpFGkTmKlZVf/Dd7uFSk
xNnX0fA2J757LL4jacFgwaeNA1uHtG7LmAKrBDyqo8vtcAY3TMjy/S3PM1XfyCuXNkv8VH
inggGl25JHmWREjYohRGsF/11OzqkUA=
DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz;
s=susede2_ed25519; t=1749046948;
h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=ALVStNkShmrg++8Piu6YCjCiJOgAVP64VNCUFeKklYc=;
b=iuIWBj9vJjb7Csl2KVYkicOjNBa70IDwxY4CE1UfPCiknHUQtUHJ/ItpYhnzce+cHCdF/u
5R1vqUiULM0EaJDg==
Authentication-Results: smtp-out1.suse.de;
none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa;
t=1749046946; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=ALVStNkShmrg++8Piu6YCjCiJOgAVP64VNCUFeKklYc=;
b=rx9XVbmgRPZZklkTg5L1vK7AURT+LDMngy/YGbd6sp/sBpQVa9pQ/mtaI7xQgLFWDrxvya
ay5t339fPWAueFSFs00R6u+4DkTuNWwkyBh7eQL0D5rJHT5AUAr7tFB1iuGEZ250BTPrFZ
l4SmMiWlUK1dSAi6oFoKHj5Dv5bgy2U=
DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz;
s=susede2_ed25519; t=1749046946;
h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=ALVStNkShmrg++8Piu6YCjCiJOgAVP64VNCUFeKklYc=;
b=zDWkXL1qvwkgb4KZ5stTnLFFuEoxyxFb7ExNOGhhsS/Ff4gnUi+1ql2JVCRfHyknkyhesg
NMF0c3+pF9HEEUCA==
Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(No client certificate requested)
by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id B40D613A63;
Wed, 4 Jun 2025 14:22:26 +0000 (UTC)
Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167])
by imap1.dmz-prg2.suse.org with ESMTPSA
id R4ugK6JWQGjfdQAAD6G6ig
(envelope-from <vbabka@xxxxxxx>); Wed, 04 Jun 2025 14:22:26 +0000
Message-ID: <202d338d-30f6-4f3b-bddc-b0818a940732@xxxxxxx>
Date: Wed, 4 Jun 2025 16:22:26 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v1] mm/gup: remove (VM_)BUG_ONs
Content-Language: en-US
To: David Hildenbrand <david@xxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx
Cc: linux-mm@xxxxxxxxx, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>, Mike Rapoport
<rppt@xxxxxxxxxx>, Suren Baghdasaryan <surenb@xxxxxxxxxx>,
Michal Hocko <mhocko@xxxxxxxx>, Jason Gunthorpe <jgg@xxxxxxxx>,
John Hubbard <jhubbard@xxxxxxxxxx>, Peter Xu <peterx@xxxxxxxxxx>
References: <20250604140544.688711-1-david@xxxxxxxxxx>
From: Vlastimil Babka <vbabka@xxxxxxx>
Autocrypt: addr=vbabka@xxxxxxx; keydata=
xsFNBFZdmxYBEADsw/SiUSjB0dM+vSh95UkgcHjzEVBlby/Fg+g42O7LAEkCYXi/vvq31JTB
KxRWDHX0R2tgpFDXHnzZcQywawu8eSq0LxzxFNYMvtB7sV1pxYwej2qx9B75qW2plBs+7+YB
87tMFA+u+L4Z5xAzIimfLD5EKC56kJ1CsXlM8S/LHcmdD9Ctkn3trYDNnat0eoAcfPIP2OZ+
9oe9IF/R28zmh0ifLXyJQQz5ofdj4bPf8ecEW0rhcqHfTD8k4yK0xxt3xW+6Exqp9n9bydiy
tcSAw/TahjW6yrA+6JhSBv1v2tIm+itQc073zjSX8OFL51qQVzRFr7H2UQG33lw2QrvHRXqD
Ot7ViKam7v0Ho9wEWiQOOZlHItOOXFphWb2yq3nzrKe45oWoSgkxKb97MVsQ+q2SYjJRBBH4
8qKhphADYxkIP6yut/eaj9ImvRUZZRi0DTc8xfnvHGTjKbJzC2xpFcY0DQbZzuwsIZ8OPJCc
LM4S7mT25NE5kUTG/TKQCk922vRdGVMoLA7dIQrgXnRXtyT61sg8PG4wcfOnuWf8577aXP1x
6mzw3/jh3F+oSBHb/GcLC7mvWreJifUL2gEdssGfXhGWBo6zLS3qhgtwjay0Jl+kza1lo+Cv
BB2T79D4WGdDuVa4eOrQ02TxqGN7G0Biz5ZLRSFzQSQwLn8fbwARAQABzSBWbGFzdGltaWwg
QmFia2EgPHZiYWJrYUBzdXNlLmN6PsLBlAQTAQoAPgIbAwULCQgHAwUVCgkICwUWAgMBAAIe
AQIXgBYhBKlA1DSZLC6OmRA9UCJPp+fMgqZkBQJnyBr8BQka0IFQAAoJECJPp+fMgqZkqmMQ
AIbGN95ptUMUvo6aAdhxaOCHXp1DfIBuIOK/zpx8ylY4pOwu3GRe4dQ8u4XS9gaZ96Gj4bC+
jwWcSmn+TjtKW3rH1dRKopvC07tSJIGGVyw7ieV/5cbFffA8NL0ILowzVg8w1ipnz1VTkWDr
2zcfslxJsJ6vhXw5/npcY0ldeC1E8f6UUoa4eyoskd70vO0wOAoGd02ZkJoox3F5ODM0kjHu
Y97VLOa3GG66lh+ZEelVZEujHfKceCw9G3PMvEzyLFbXvSOigZQMdKzQ8D/OChwqig8wFBmV
QCPS4yDdmZP3oeDHRjJ9jvMUKoYODiNKsl2F+xXwyRM2qoKRqFlhCn4usVd1+wmv9iLV8nPs
2Db1ZIa49fJet3Sk3PN4bV1rAPuWvtbuTBN39Q/6MgkLTYHb84HyFKw14Rqe5YorrBLbF3rl
M51Dpf6Egu1yTJDHCTEwePWug4XI11FT8lK0LNnHNpbhTCYRjX73iWOnFraJNcURld1jL1nV
r/LRD+/e2gNtSTPK0Qkon6HcOBZnxRoqtazTU6YQRmGlT0v+rukj/cn5sToYibWLn+RoV1CE
Qj6tApOiHBkpEsCzHGu+iDQ1WT0Idtdynst738f/uCeCMkdRu4WMZjteQaqvARFwCy3P/jpK
uvzMtves5HvZw33ZwOtMCgbpce00DaET4y/UzsBNBFsZNTUBCACfQfpSsWJZyi+SHoRdVyX5
J6rI7okc4+b571a7RXD5UhS9dlVRVVAtrU9ANSLqPTQKGVxHrqD39XSw8hxK61pw8p90pg4G
/N3iuWEvyt+t0SxDDkClnGsDyRhlUyEWYFEoBrrCizbmahOUwqkJbNMfzj5Y7n7OIJOxNRkB
IBOjPdF26dMP69BwePQao1M8Acrrex9sAHYjQGyVmReRjVEtv9iG4DoTsnIR3amKVk6si4Ea
X/mrapJqSCcBUVYUFH8M7bsm4CSxier5ofy8jTEa/CfvkqpKThTMCQPNZKY7hke5qEq1CBk2
wxhX48ZrJEFf1v3NuV3OimgsF2odzieNABEBAAHCwXwEGAEKACYCGwwWIQSpQNQ0mSwujpkQ
PVAiT6fnzIKmZAUCZ8gcVAUJFhTonwAKCRAiT6fnzIKmZLY8D/9uo3Ut9yi2YCuASWxr7QQZ
lJCViArjymbxYB5NdOeC50/0gnhK4pgdHlE2MdwF6o34x7TPFGpjNFvycZqccSQPJ/gibwNA
zx3q9vJT4Vw+YbiyS53iSBLXMweeVV1Jd9IjAoL+EqB0cbxoFXvnjkvP1foiiF5r73jCd4PR
rD+GoX5BZ7AZmFYmuJYBm28STM2NA6LhT0X+2su16f/HtummENKcMwom0hNu3MBNPUOrujtW
khQrWcJNAAsy4yMoJ2Lw51T/5X5Hc7jQ9da9fyqu+phqlVtn70qpPvgWy4HRhr25fCAEXZDp
xG4RNmTm+pqorHOqhBkI7wA7P/nyPo7ZEc3L+ZkQ37u0nlOyrjbNUniPGxPxv1imVq8IyycG
AN5FaFxtiELK22gvudghLJaDiRBhn8/AhXc642/Z/yIpizE2xG4KU4AXzb6C+o7LX/WmmsWP
Ly6jamSg6tvrdo4/e87lUedEqCtrp2o1xpn5zongf6cQkaLZKQcBQnPmgHO5OG8+50u88D9I
rywqgzTUhHFKKF6/9L/lYtrNcHU8Z6Y4Ju/MLUiNYkmtrGIMnkjKCiRqlRrZE/v5YFHbayRD
dJKXobXTtCBYpLJM4ZYRpGZXne/FAtWNe4KbNJJqxMvrTOrnIatPj8NhBVI0RSJRsbilh6TE
m6M14QORSWTLRg==
In-Reply-To: <20250604140544.688711-1-david@xxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Score: -4.30
X-Spamd-Result: default: False [-4.30 / 50.00];
BAYES_HAM(-3.00)[100.00%];
NEURAL_HAM_LONG(-1.00)[-1.000];
NEURAL_HAM_SHORT(-0.20)[-1.000];
MIME_GOOD(-0.10)[text/plain];
MID_RHS_MATCH_FROM(0.00)[];
RCVD_VIA_SMTP_AUTH(0.00)[];
MIME_TRACE(0.00)[0:+];
ARC_NA(0.00)[];
RCPT_COUNT_TWELVE(0.00)[12];
RCVD_TLS_ALL(0.00)[];
DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519];
FUZZY_BLOCKED(0.00)[rspamd.com];
FROM_HAS_DN(0.00)[];
TO_DN_SOME(0.00)[];
FROM_EQ_ENVFROM(0.00)[];
TO_MATCH_ENVRCPT_ALL(0.00)[];
RCVD_COUNT_TWO(0.00)[2];
DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:email,nvidia.com:email,suse.cz:mid,suse.cz:email,linux-foundation.org:email,imap1.dmz-prg2.suse.org:helo,oracle.com:email]
X-Spam-Level:
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 6/4/25 16:05, David Hildenbrand wrote:
Especially once we hit one of the assertions in
sanity_check_pinned_pages(), observing follow-up assertions failing
in other code can give good clues about what went wrong, so use
VM_WARN_ON_ONCE instead.
While at it, let's just convert all VM_BUG_ON to VM_WARN_ON_ONCE as
well. Add one comment for the pfn_valid() check.
We have to introduce VM_WARN_ON_ONCE_VMA() to make that fly.
Drop the BUG_ON after mmap_read_lock_killable(), if that ever returns
something > 0 we're in bigger trouble. Convert the other BUG_ON's into
VM_WARN_ON_ONCE as well, they are in a similar domain "should never
happen", but more reasonable to check for during early testing.
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>
Cc: "Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>
Cc: Vlastimil Babka <vbabka@xxxxxxx>
Cc: Mike Rapoport <rppt@xxxxxxxxxx>
Cc: Suren Baghdasaryan <surenb@xxxxxxxxxx>
Cc: Michal Hocko <mhocko@xxxxxxxx>
Cc: Jason Gunthorpe <jgg@xxxxxxxx>
Cc: John Hubbard <jhubbard@xxxxxxxxxx>
Cc: Peter Xu <peterx@xxxxxxxxxx>
Signed-off-by: David Hildenbrand <david@xxxxxxxxxx>
Makes sense, BUG_ONs bad.
Acked-by: Vlastimil Babka <vbabka@xxxxxxx>
---
Wanted to do this for a long time, but my todo list keeps growing ...
Based on mm/mm-unstable
---
include/linux/mmdebug.h | 12 ++++++++++++
mm/gup.c | 41 +++++++++++++++++++----------------------
2 files changed, 31 insertions(+), 22 deletions(-)
diff --git a/include/linux/mmdebug.h b/include/linux/mmdebug.h
index a0a3894900ed4..14a45979cccc9 100644
--- a/include/linux/mmdebug.h
+++ b/include/linux/mmdebug.h
@@ -89,6 +89,17 @@ void vma_iter_dump_tree(const struct vma_iterator *vmi);
} \
unlikely(__ret_warn_once); \
})
+#define VM_WARN_ON_ONCE_VMA(cond, vma) ({ \
+ static bool __section(".data..once") __warned; \
+ int __ret_warn_once = !!(cond); \
+ \
+ if (unlikely(__ret_warn_once && !__warned)) { \
+ dump_vma(vma); \
+ __warned = true; \
+ WARN_ON(1); \
+ } \
+ unlikely(__ret_warn_once); \
+})
#define VM_WARN_ON_VMG(cond, vmg) ({ \
int __ret_warn = !!(cond); \
\
@@ -115,6 +126,7 @@ void vma_iter_dump_tree(const struct vma_iterator *vmi);
#define VM_WARN_ON_FOLIO(cond, folio) BUILD_BUG_ON_INVALID(cond)
#define VM_WARN_ON_ONCE_FOLIO(cond, folio) BUILD_BUG_ON_INVALID(cond)
#define VM_WARN_ON_ONCE_MM(cond, mm) BUILD_BUG_ON_INVALID(cond)
+#define VM_WARN_ON_ONCE_VMA(cond, vma) BUILD_BUG_ON_INVALID(cond)
#define VM_WARN_ON_VMG(cond, vmg) BUILD_BUG_ON_INVALID(cond)
#define VM_WARN_ONCE(cond, format...) BUILD_BUG_ON_INVALID(cond)
#define VM_WARN(cond, format...) BUILD_BUG_ON_INVALID(cond)
diff --git a/mm/gup.c b/mm/gup.c
index e065a49842a87..3c3931fcdd820 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -64,11 +64,11 @@ static inline void sanity_check_pinned_pages(struct page **pages,
!folio_test_anon(folio))
continue;
if (!folio_test_large(folio) || folio_test_hugetlb(folio))
- VM_BUG_ON_PAGE(!PageAnonExclusive(&folio->page), page);
+ VM_WARN_ON_ONCE_PAGE(!PageAnonExclusive(&folio->page), page);
else
/* Either a PTE-mapped or a PMD-mapped THP. */
- VM_BUG_ON_PAGE(!PageAnonExclusive(&folio->page) &&
- !PageAnonExclusive(page), page);
+ VM_WARN_ON_ONCE_PAGE(!PageAnonExclusive(&folio->page) &&
+ !PageAnonExclusive(page), page);
}
}
@@ -760,8 +760,8 @@ static struct page *follow_huge_pmd(struct vm_area_struct *vma,
if (!pmd_write(pmdval) && gup_must_unshare(vma, flags, page))
return ERR_PTR(-EMLINK);
- VM_BUG_ON_PAGE((flags & FOLL_PIN) && PageAnon(page) &&
- !PageAnonExclusive(page), page);
+ VM_WARN_ON_ONCE_PAGE((flags & FOLL_PIN) && PageAnon(page) &&
+ !PageAnonExclusive(page), page);
ret = try_grab_folio(page_folio(page), 1, flags);
if (ret)
@@ -899,8 +899,8 @@ static struct page *follow_page_pte(struct vm_area_struct *vma,
goto out;
}
- VM_BUG_ON_PAGE((flags & FOLL_PIN) && PageAnon(page) &&
- !PageAnonExclusive(page), page);
+ VM_WARN_ON_ONCE_PAGE((flags & FOLL_PIN) && PageAnon(page) &&
+ !PageAnonExclusive(page), page);
/* try_grab_folio() does nothing unless FOLL_GET or FOLL_PIN is set. */
ret = try_grab_folio(folio, 1, flags);
@@ -1180,7 +1180,7 @@ static int faultin_page(struct vm_area_struct *vma,
if (unshare) {
fault_flags |= FAULT_FLAG_UNSHARE;
/* FAULT_FLAG_WRITE and FAULT_FLAG_UNSHARE are incompatible */
- VM_BUG_ON(fault_flags & FAULT_FLAG_WRITE);
+ VM_WARN_ON_ONCE(fault_flags & FAULT_FLAG_WRITE);
}
ret = handle_mm_fault(vma, address, fault_flags, NULL);
@@ -1760,10 +1760,7 @@ static __always_inline long __get_user_pages_locked(struct mm_struct *mm,
}
/* VM_FAULT_RETRY or VM_FAULT_COMPLETED cannot return errors */
- if (!*locked) {
- BUG_ON(ret < 0);
- BUG_ON(ret >= nr_pages);
- }
+ VM_WARN_ON_ONCE(!*locked && (ret < 0 || ret >= nr_pages));
if (ret > 0) {
nr_pages -= ret;
@@ -1808,7 +1805,6 @@ static __always_inline long __get_user_pages_locked(struct mm_struct *mm,
ret = mmap_read_lock_killable(mm);
if (ret) {
- BUG_ON(ret > 0);
if (!pages_done)
pages_done = ret;
break;
@@ -1819,11 +1815,11 @@ static __always_inline long __get_user_pages_locked(struct mm_struct *mm,
pages, locked);
if (!*locked) {
/* Continue to retry until we succeeded */
- BUG_ON(ret != 0);
+ VM_WARN_ON_ONCE(ret != 0);
goto retry;
}
if (ret != 1) {
- BUG_ON(ret > 1);
+ VM_WARN_ON_ONCE(ret > 1);
if (!pages_done)
pages_done = ret;
break;
@@ -1885,10 +1881,10 @@ long populate_vma_page_range(struct vm_area_struct *vma,
int gup_flags;
long ret;
- VM_BUG_ON(!PAGE_ALIGNED(start));
- VM_BUG_ON(!PAGE_ALIGNED(end));
- VM_BUG_ON_VMA(start < vma->vm_start, vma);
- VM_BUG_ON_VMA(end > vma->vm_end, vma);
+ VM_WARN_ON_ONCE(!PAGE_ALIGNED(start));
+ VM_WARN_ON_ONCE(!PAGE_ALIGNED(end));
+ VM_WARN_ON_ONCE_VMA(start < vma->vm_start, vma);
+ VM_WARN_ON_ONCE_VMA(end > vma->vm_end, vma);
mmap_assert_locked(mm);
/*
@@ -1957,8 +1953,8 @@ long faultin_page_range(struct mm_struct *mm, unsigned long start,
int gup_flags;
long ret;
- VM_BUG_ON(!PAGE_ALIGNED(start));
- VM_BUG_ON(!PAGE_ALIGNED(end));
+ VM_WARN_ON_ONCE(!PAGE_ALIGNED(start));
+ VM_WARN_ON_ONCE(!PAGE_ALIGNED(end));
mmap_assert_locked(mm);
/*
@@ -2908,7 +2904,8 @@ static int gup_fast_pte_range(pmd_t pmd, pmd_t *pmdp, unsigned long addr,
} else if (pte_special(pte))
goto pte_unmap;
- VM_BUG_ON(!pfn_valid(pte_pfn(pte)));
+ /* If it's not marked as special it must have a valid memmap. */
+ VM_WARN_ON_ONCE(!pfn_valid(pte_pfn(pte)));
page = pte_page(pte);
folio = try_grab_folio_fast(page, 1, flags);
base-commit: 2d0c297637e7d59771c1533847c666cdddc19884
Return-Path: <linux-kernel+bounces-673345-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 5C1AF41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:23:34 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id CCDA61899FDD
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:23:47 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id C803628FFDF;
Wed, 4 Jun 2025 14:23:23 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b="QnuKjDkE"
Received: from m16.mail.163.com (m16.mail.163.com [117.135.210.4])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 4A36824B26;
Wed, 4 Jun 2025 14:23:17 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=117.135.210.4
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749047003; cv=none; b=IAsHGuoCck/VhtuKZXFePJhtozNFSukrEI0Z+T00QOvYhriR7S61t66wlQu4+CQ9opp7nVTrL8E9kKMz0wSDR7jN6VE211GXzAEb0zWpVhpjZgCC1+fQE4ZaqBsoBEzbplU3MCTCrunr0fVjq542H2XCS23jzn6+NJNI0ljiKuI=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749047003; c=relaxed/simple;
bh=MDkX1Sqi5J1QcmBOq4GZ0qQaDD6qOGoaWcifw/EI+Do=;
h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ZJmeA0o/9LnGBFdPIS7vBY3LBucx+VuImJHdxsAjFMcXrcZdpS5WTV9wXzZ8lhCWYLGb+gk6xLaB2UD+nLgfQRx0OMz/QGQcRz45JmlvCOqt2rqcM5IBT1nOXOqrz/cjrv318jgbkTP2MtA0CmnBuneLrOc7K5XOtTJ0SFASMWM=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com; spf=pass smtp.mailfrom=163.com; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b=QnuKjDkE; arc=none smtp.client-ip=117.135.210.4
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=163.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com;
s=s110527; h=From:To:Subject:Date:Message-ID:MIME-Version; bh=dN
Z/a8tbXf4DBa1ZYWDgiUOhFwpf+JyNU7c9G/Mo10U=; b=QnuKjDkEIAI9WulC16
RPqeobB14LDoN7AVJ6hNGc1E864d4MZ/IRmILSPd+s9g6GcPK0jMoCMJtQrmbOkc
YSMJJwJdqA5pWQzV7/bfpxxGOaZclNKuBqHIubBNZ46CQIjHHesD/xDOjfmZiqXX
jHKRtMJMFrVGdWIRgNXD6NckA=
Received: from ThinkBook-14.localdomain (unknown [])
by gzga-smtp-mtada-g1-2 (Coremail) with SMTP id _____wAXO93FVkBoxFzOFw--.7244S2;
Wed, 04 Jun 2025 22:23:03 +0800 (CST)
From: Haiyue Wang <haiyuewa@xxxxxxx>
To: linux-fsdevel@xxxxxxxxxxxxxxx
Cc: apopple@xxxxxxxxxx,
Haiyue Wang <haiyuewa@xxxxxxx>,
Miklos Szeredi <miklos@xxxxxxxxxx>,
linux-kernel@xxxxxxxxxxxxxxx (open list)
Subject: [PATCH v1] fuse: ensure all DAX pages are idle prior to filesystem unmount
Date: Wed, 4 Jun 2025 22:22:37 +0800
Message-ID: <20250604142251.2426-1-haiyuewa@xxxxxxx>
X-Mailer: git-send-email 2.49.0
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-CM-TRANSID:_____wAXO93FVkBoxFzOFw--.7244S2
X-Coremail-Antispam: 1Uf129KBjvJXoWxZF43JFy8tF1DuFy7JF1fWFg_yoWrtF15pF
y5tw1UCF48JrWUGay0yF1jvr1Ut3ZrAF48Xr1Iyr1xXF1UZw1UJr1kAr1UGF1DJrWUZr9x
tF4DG3WSqw18WaUanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2
9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0zE9mROUUUUU=
X-CM-SenderInfo: 5kdl53xhzdqiywtou0bp/1tbiSgRia2hAVQQxkAAAsf
X-Spam-Status: No, score=-2.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,
HEADER_FROM_DIFFERENT_DOMAINS,HK_RANDOM_FROM,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY
autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
The commit 0e2f80afcfa6 ("fs/dax: ensure all pages are idle prior to filesystem unmount")
can fix the below warnning:
[ 4.149368] ------------[ cut here ]------------
[ 4.150031] WARNING: CPU: 3 PID: 138 at mm/truncate.c:89 truncate_folio_batch_exceptionals+0x26d/0x2a0
[ 4.151602] Modules linked in:
[ 4.152388] CPU: 3 UID: 1000 PID: 138 Comm: weston Not tainted 6.15.0-WSL2-STABLE #1 PREEMPT(undef)
[ 4.153230] RIP: 0010:truncate_folio_batch_exceptionals+0x26d/0x2a0
[ 4.153839] Code: 48 63 d0 41 29 c5 48 8d 1c d5 00 00 00 00 4e 8d 6c 2a 01 49 c1 e5 03 eb 09 48 83 c3 08 49 39 dd 74 84 41 f6 44 1c 08 01 74 ef <0f> 0b 49 8b 34 1e 48 89 ef e8 c5 b5 17 00 eb df 48 8b 7d 00 e8 8a
[ 4.155347] RSP: 0018:ffffaf6083383760 EFLAGS: 00010202
[ 4.155872] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[ 4.156620] RDX: 0000000000000000 RSI: ffffaf60833838f0 RDI: ffff98dc20debb80
[ 4.157426] RBP: ffff98dc20debcf0 R08: ffffaf60833837f8 R09: 00000000f751f000
[ 4.158278] R10: 0000000000000001 R11: 0000000000000001 R12: ffffaf60833838f0
[ 4.159257] R13: 0000000000000008 R14: ffffaf60833837f8 R15: 0000000000000000
[ 4.163733] FS: 00007b3d87bc2a40(0000) GS:ffff98dc9dd67000(0000) knlGS:0000000000000000
[ 4.165457] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 4.166366] CR2: 00007b3d876b0080 CR3: 0000000102bdc002 CR4: 0000000000372eb0
[ 4.167295] Call Trace:
[ 4.169320] <TASK>
[ 4.169787] truncate_inode_pages_range+0xd8/0x410
[ 4.170417] ? virtqueue_add_sgs+0x5f7/0x6c0
[ 4.171077] ? get_nohz_timer_target+0x2a/0x140
[ 4.172338] ? timerqueue_add+0x66/0xb0
[ 4.172805] ? timerqueue_del+0x2e/0x50
[ 4.173300] ? __remove_hrtimer+0x39/0x90
[ 4.173707] ? sched_clock+0x10/0x30
[ 4.174456] ? srso_alias_untrain_ret+0x1/0x10
[ 4.175266] ? psi_group_change+0x137/0x330
[ 4.176163] ? _raw_spin_unlock+0xe/0x30
[ 4.176983] ? finish_task_switch.isra.0+0x8d/0x280
[ 4.179818] ? __schedule+0x523/0xbc0
[ 4.180785] fuse_evict_inode+0x29/0x190
[ 4.181252] evict+0x103/0x270
[ 4.181631] ? _atomic_dec_and_lock+0x39/0x50
[ 4.182069] ? __pfx_generic_delete_inode+0x10/0x10
[ 4.182483] __dentry_kill+0x71/0x180
[ 4.182845] dput+0xeb/0x1b0
[ 4.183154] __fput+0x136/0x2a0
[ 4.183507] __x64_sys_close+0x3d/0x80
[ 4.183841] do_syscall_64+0x6d/0x1b0
[ 4.184162] ? vms_clear_ptes.part.0+0x10d/0x140
[ 4.184628] ? vms_complete_munmap_vmas+0x152/0x1c0
[ 4.185072] ? do_vmi_align_munmap+0x1da/0x200
[ 4.185485] ? do_vmi_munmap+0xd1/0x160
[ 4.186011] ? __vm_munmap+0xf2/0x180
[ 4.186436] ? __x64_sys_munmap+0x1b/0x30
[ 4.187217] ? do_syscall_64+0x6d/0x1b0
[ 4.189313] ? count_memcg_events+0x143/0x180
[ 4.190122] ? handle_mm_fault+0xb6/0x2f0
[ 4.190861] ? do_user_addr_fault+0x173/0x680
[ 4.191621] ? clear_bhb_loop+0x30/0x80
[ 4.192182] ? clear_bhb_loop+0x30/0x80
[ 4.192907] ? clear_bhb_loop+0x30/0x80
[ 4.193430] entry_SYSCALL_64_after_hwframe+0x76/0x7e
[ 4.195789] RIP: 0033:0x7b3d8b220067
[ 4.197509] Code: b8 ff ff ff ff e9 3e ff ff ff 66 0f 1f 84 00 00 00 00 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 41 c3 48 83 ec 18 89 7c 24 0c e8 c3 a7 f8 ff
[ 4.199585] RSP: 002b:00007ffd1e3bc3b8 EFLAGS: 00000246 ORIG_RAX: 0000000000000003
[ 4.200346] RAX: ffffffffffffffda RBX: 00007ffd1e3bc3d0 RCX: 00007b3d8b220067
[ 4.201071] RDX: 0000000000000003 RSI: 0000000000001000 RDI: 000000000000000d
[ 4.201822] RBP: 00007ffd1e3bc4a0 R08: 000000000000000d R09: 0000000000000000
[ 4.202465] R10: 00007ffd1e3bc3e8 R11: 0000000000000246 R12: 0000000000000001
[ 4.203224] R13: 00007ffd1e3bc3d0 R14: 00007b3d8b31cce0 R15: 0000000000000003
[ 4.204100] </TASK>
[ 4.204414] ---[ end trace 0000000000000000 ]---
Signed-off-by: Haiyue Wang <haiyuewa@xxxxxxx>
---
fs/fuse/inode.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index bfe8d8af46f3..5561fcddc84f 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -9,6 +9,7 @@
#include "fuse_i.h"
#include "dev_uring_i.h"
+#include <linux/dax.h>
#include <linux/pagemap.h>
#include <linux/slab.h>
#include <linux/file.h>
@@ -162,6 +163,9 @@ static void fuse_evict_inode(struct inode *inode)
/* Will write inode on close/munmap and in all other dirtiers */
WARN_ON(inode->i_state & I_DIRTY_INODE);
+ if (IS_DAX(inode))
+ dax_break_layout_final(inode);
+
truncate_inode_pages_final(&inode->i_data);
clear_inode(inode);
if (inode->i_sb->s_flags & SB_ACTIVE) {
--
2.49.0
Return-Path: <linux-kernel+bounces-673346-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 6EE6541E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:24:59 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id B310B189AB7B
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:25:12 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id C97BB28FFCF;
Wed, 4 Jun 2025 14:24:53 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="SATPIaNP"
Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id AAE2724B26;
Wed, 4 Jun 2025 14:24:51 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.92.199
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749047093; cv=none; b=SZ4SwDTup2+SxRZJAiWs16G0mZGk928JZVY/Zev7oQYJtjc+6Vc3XbGeej/X7HUg7LFyysCA4WVvcad6TdJDDvaPLVKxRXM8X7MR1MAuoVgst5+Vj5zNDxo82/PnZf3PlLMuZQUx0oT3sLx+Utf2ABUFLGKfdP0PZlOw86/DAXY=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749047093; c=relaxed/simple;
bh=aBj67WqnNRdJAwIA2FVK7ZrPey12dn3fCDbsu6xdMlo=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=pOXhfh5G73dnzK6hTy0VkwZmiODNrN2MwphDTQJcZm0qcJ12VqoEWFw40/O4xfLNvgK0K1TtfiJUGwokX+xYyfhaAI1Q8gmU2GZYoaLNZ08LQqo3j1o27NcSWGaNxAqKrNj+XFiIYhJxEqWlV02yiL98FSQfzmrtwZ+K1qugX0c=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=SATPIaNP; arc=none smtp.client-ip=90.155.92.199
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org
Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version:
References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:
Content-Transfer-Encoding:Content-ID:Content-Description;
bh=7p5VmWb2SIAcmGijn39glw69okIY8rokGtORJAyMkNA=; b=SATPIaNPngxKZMjgYZLRyy6+zp
jynnjRFkJtsaLQlCmttogi7m8o9WhTL+bk8Qj2Zi4oMewjUf6xLuF78m/lPNvMfBRQcIE5pXi7dyo
mg8bHpIGkBEcAjRcHDZAv++lIUeW9dWs7C6F5q0zUdE1TitXmXguxbAxGttvdntpwXSGS6eRYG2Rl
SOeowo/kx0Q/1FoAYXe8x4vjDm4GNhgCaZl81lloPwJSttyUhLY1fNzqiI5x4Sq/nsS36iMCl2MmR
98IRMJM/E6Qs1z21+K7XpJ3fBeihXr7HYX5uJtp+fxgAo3lq6pPIcTwGmgOc4BRl88oUC9wjr79Aa
/2W2bMQQ==;
Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net)
by desiato.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux))
id 1uMp2k-00000000uJJ-2Kam;
Wed, 04 Jun 2025 14:24:38 +0000
Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000)
id E2EE7300787; Wed, 4 Jun 2025 16:24:37 +0200 (CEST)
Date: Wed, 4 Jun 2025 16:24:37 +0200
From: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
To: Mark Rutland <mark.rutland@xxxxxxx>
Cc: Baisheng Gao <baisheng.gao@xxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>,
Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>,
Namhyung Kim <namhyung@xxxxxxxxxx>,
Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>,
Jiri Olsa <jolsa@xxxxxxxxxx>, Ian Rogers <irogers@xxxxxxxxxx>,
Adrian Hunter <adrian.hunter@xxxxxxxxx>,
"reviewer:PERFORMANCE EVENTS SUBSYSTEM" <kan.liang@xxxxxxxxxxxxxxx>,
"open list:PERFORMANCE EVENTS SUBSYSTEM" <linux-perf-users@xxxxxxxxxxxxxxx>,
"open list:PERFORMANCE EVENTS SUBSYSTEM" <linux-kernel@xxxxxxxxxxxxxxx>,
cixi.geng@xxxxxxxxx, hao_hao.wang@xxxxxxxxxx
Subject: Re: [PATCH] perf/core: Handling the race between exit_mmap and perf
sample
Message-ID: <20250604142437.GM38114@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20250424025429.10942-1-baisheng.gao@xxxxxxxxxx>
<aEBSt2LN7YhxYX7N@J2N7QTR9R3>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <aEBSt2LN7YhxYX7N@J2N7QTR9R3>
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 03:05:43PM +0100, Mark Rutland wrote:
Loooking at 5.15.149 and current HEAD (5abc7438f1e9), do_exit() calls
exit_mm() before perf_event_exit_task(), so it looks
like perf could sample from another task's mm.
Yuck.
Peter, does the above sound plausible to you?
Yuck indeed. And yeah, we should probably re-arrange things there.
Something like so?
---
diff --git a/kernel/exit.c b/kernel/exit.c
index 38645039dd8f..3407c16fc5a3 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -944,6 +944,15 @@ void __noreturn do_exit(long code)
taskstats_exit(tsk, group_dead);
trace_sched_process_exit(tsk, group_dead);
+ /*
+ * Since samping can touch ->mm, make sure to stop everything before we
+ * tear it down.
+ *
+ * Also flushes inherited counters to the parent - before the parent
+ * gets woken up by child-exit notifications.
+ */
+ perf_event_exit_task(tsk);
+
exit_mm();
if (group_dead)
@@ -959,14 +968,6 @@ void __noreturn do_exit(long code)
exit_task_work(tsk);
exit_thread(tsk);
- /*
- * Flush inherited counters to the parent - before the parent
- * gets woken up by child-exit notifications.
- *
- * because of cgroup mode, must be called before cgroup_exit()
- */
- perf_event_exit_task(tsk);
-
sched_autogroup_exit_task(tsk);
cgroup_exit(tsk);
Return-Path: <linux-kernel+bounces-673347-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 5A95B41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:25:46 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 2DDB63A7D11
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:25:24 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 3B922290BC3;
Wed, 4 Jun 2025 14:25:36 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qsCT1YoN"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6E22624B26;
Wed, 4 Jun 2025 14:25:35 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749047135; cv=none; b=OoQUcbU52cYAwNNew4qTu1PD+PxbgjnHkmatCwTK3+XV3mTEKIOtzlcWzmQQlS5q3UUATjNrS+aABQG7JrEI9NhRJk9AVgfILDCgKss7m8bp0D6NasOzVgCjwIO0vkvwzfHeleOCzsMFdS//jLIRWCbdC8Xje2CwYlpYaAa4FaI=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749047135; c=relaxed/simple;
bh=Rj2/ruFOKQorwxIO/Q4QbkwEcBo2WBVADSmD3EOg3d4=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=oehjLihJlauYejIIXht7Nto3MQ5EsYKXdQOCeFtWbne7Yng/MkNzDMs1vOgzwSnVb7ksnNx+GBASLAu0Qx7rvc+7npw7s8tv+lgfRxlfI4BWhWrCCDutMONhUQnwspvy8mpAhawimYxHxBAqkpIq8CffuGSYbaVcXWRMsaOEiBw=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qsCT1YoN; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0504DC4CEE4;
Wed, 4 Jun 2025 14:25:31 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749047134;
bh=Rj2/ruFOKQorwxIO/Q4QbkwEcBo2WBVADSmD3EOg3d4=;
h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
b=qsCT1YoNWD4jDyioy4d+KlZSuwv6QyqIGjfol19SEqUFMOc/WMrtrDcNyYGmH+WnC
NQIfTVvdoW3bCbmNA0ASXSWxERQ7thaSULcS/HXGydrF8yNQ+kaJnj+bbGy2Cv6u0n
n0N3mqNyHPKbmizKmLsRS+yhSZJJXZJ/5sGlsMeL2UutS16XbkWBdgVvHJi5xEvyZg
f+XD2b72d8ZEMP91QTev/FLJXTM4vWThZYeT3Jx84QGnBb5MIPd5Zkx9dUbl1Laon7
yB1G76YbCChFaowiaAC7FpmXzzPwuyFONjIqW6925Q7Kwp2OsWXklX9l7DOmDTqPFg
g+WEIyYLvPhDg==
Date: Wed, 4 Jun 2025 15:25:29 +0100
From: Mark Brown <broonie@xxxxxxxxxx>
To: Samuel Kayode <samuel.kayode@xxxxxxxxxxxxxxxxxxxx>
Cc: Lee Jones <lee@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>,
Liam Girdwood <lgirdwood@xxxxxxxxx>,
Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>,
Sebastian Reichel <sre@xxxxxxxxxx>, devicetree@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-input@xxxxxxxxxxxxxxx,
linux-pm@xxxxxxxxxxxxxxx, Abel Vesa <abelvesa@xxxxxxxxxx>,
Abel Vesa <abelvesa@xxxxxxxxx>, Robin Gong <b38343@xxxxxxxxxxxxx>,
Enric Balletbo i Serra <eballetbo@xxxxxxxxx>
Subject: Re: [PATCH v4 3/6] regulator: pf1550: add support for regulator
Message-ID: <f2064326-e696-48cc-8f0e-5e51c95548b5@xxxxxxxxxxxxx>
References: <20250603-pf1550-v4-0-bfdf51ee59cc@xxxxxxxxxxxxxxxxxxxx>
<20250603-pf1550-v4-3-bfdf51ee59cc@xxxxxxxxxxxxxxxxxxxx>
<eb1fb4e2-42aa-4795-bc6c-dbcf1fa04f11@xxxxxxxxxxxxx>
<aEBSSHA8bxw2igAW@fedora>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512;
protocol="application/pgp-signature"; boundary="LeZqoxaN4Nid9bpS"
Content-Disposition: inline
In-Reply-To: <aEBSSHA8bxw2igAW@fedora>
X-Cookie: Non-sequiturs make me eat lampshades.
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
--LeZqoxaN4Nid9bpS
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Wed, Jun 04, 2025 at 10:03:52AM -0400, Samuel Kayode wrote:
On Wed, Jun 04, 2025 at 12:35:21PM +0100, Mark Brown wrote:
> > + switch (irq_type) {
> > + case PF1550_PMIC_IRQ_SW1_LS:
> > + event = REGULATOR_EVENT_OVER_CURRENT;
> > + case PF1550_PMIC_IRQ_SW1_HS:
> > + event = REGULATOR_EVENT_OVER_CURRENT;
> > + case PF1550_PMIC_IRQ_LDO1_FAULT:
> > + event = REGULATOR_EVENT_OVER_CURRENT;
> You appear to be flagging all these events as over current events which
> doesn't seem entirely plausible.
It does seem like it but the manual describes these interrupts as "current limit
interrupt". The interrupts ending in _LS are "low-side current limit interrupt",
_HS are "high-side current limit interrupt" and _FAULT are "current limit fault
interrupt".
That at least needs some comments I think, and for the _LS while it's
hard to parse what "low side" means my guess would be that it's a
warning to match the other interrupt being the actual error.
--LeZqoxaN4Nid9bpS
Content-Type: application/pgp-signature; name="signature.asc"
-----BEGIN PGP SIGNATURE-----
iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmhAV1gACgkQJNaLcl1U
h9A44Af/aPWc+RQEJQ4xYMYmCbH4Fi/ZIzfT1qLksu73+7JtX4xSsy1ow2vtuYTV
Dtkvg9UYeNJ0aJlcHzwqI/fxC68jgwqgZBYMCYuUqEDdNUqq/Be9nCf0tonft6kI
JkjPKy4Cc4P9Gt2SYovWRGn6qLW7MME8mSsBTh4XLDY7BQZCfKwel0n7bylt6QEy
OO0PU1QgzRlLk/s66ysVGDPkeVV4jKV9YpejzCV4WQ83yRWY45kHXEPvUtF9NzfI
tTX34J49/IpmN37m5zT/znhyNgMjJvjqfzxXK4COp40DelsYxaWeU42A+LDI9x+X
futIraVxzEJC8amaHr0fhdXW5dJDoQ==
=Lh6W
-----END PGP SIGNATURE-----
--LeZqoxaN4Nid9bpS--
Return-Path: <linux-kernel+bounces-673348-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id EDD2241E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:26:14 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 0E8FF176568
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:26:16 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id A4104290BCE;
Wed, 4 Jun 2025 14:26:04 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="jpwBbNM8"
Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id AED5528F935;
Wed, 4 Jun 2025 14:25:58 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=192.198.163.18
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749047163; cv=fail; b=TD/JsURSrm/wHtGcTu5WrpqIFG5We20zky6iiXYJi2acZCUjAIm2Ale162RgetSEkCepoW2ytInrD//i81jfRDmOBOwI4LdwGz4tSYpNKxjkw1sxLWQkdJyjlCRrwjSEHHuCf+FKNcMX33ClLSneHdaq7oA5bIkvwIGAUU5YONQ=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749047163; c=relaxed/simple;
bh=CMdACvG14OV6mcJPjJQhnozDlfdk/thvlJavRPEDgCs=;
h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To:
Content-Type:MIME-Version; b=RgXOPkUJed+vJKjHptq9GRONCL1EEMoBvl0kZ8w1JrDv/7jmjCHx3YNqm+Jovo94fZpMLOMHwlWmYwC3UOuJudD9Uz1G1Uj02I5voxeR9auvRphvOAnFUNpQXn4fFG5Mpeh3NXPD7LVWKhcHnOGpRTPD4rFxcDOPNc2ZTMCJs1I=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=jpwBbNM8; arc=fail smtp.client-ip=192.198.163.18
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
t=1749047162; x=1780583162;
h=from:to:cc:subject:date:message-id:references:
in-reply-to:content-transfer-encoding:mime-version;
bh=CMdACvG14OV6mcJPjJQhnozDlfdk/thvlJavRPEDgCs=;
b=jpwBbNM8WjHROoETXWgpcFi8Qp0wCFM0OBYv2zfqSqAwYpWAZDpTde7A
VHFb6CUuNlrQflUqPSdhqY0zgfIZzSXo7fqGwbbnNcPG5K5Mw6rznwJzy
+/gmgS241lgZd76Tp/U6ySzkOmG5TBQrdLru/GBw2SDgO012T+NFtEBmh
5Acn6cZ+MCSDBJK2q0HejUOcoKqTZUlFHxsaZ+dvjxIRlZgrORoNTHjzI
UMP65brhT++Ci5W75ToaQkbqJOqzrZmqTwRpv+h5VoXyQSqN5nocfMkQI
jVKQ8fs0a675Q+douQvkmNfXmoUfypzqCgSP2QBVBzLgADQrzcK726Due
Q==;
X-CSE-ConnectionGUID: fUxxKkBWQg2rtQS/ZJ8gjQ==
X-CSE-MsgGUID: z2Cq2upIQeeAKhvsNo4BZg==
X-IronPort-AV: E=McAfee;i="6800,10657,11454"; a="50373316"
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="50373316"
Received: from orviesa002.jf.intel.com ([10.64.159.142])
by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 07:25:57 -0700
X-CSE-ConnectionGUID: PJVRKgL5R46JJSnWhLBJ2g==
X-CSE-MsgGUID: 6d+5LLYCRqmxytflJ0isGQ==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="176168244"
Received: from orsmsx902.amr.corp.intel.com ([10.22.229.24])
by orviesa002.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 07:25:54 -0700
Received: from ORSMSX901.amr.corp.intel.com (10.22.229.23) by
ORSMSX902.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.2.1544.25; Wed, 4 Jun 2025 07:25:53 -0700
Received: from ORSEDG901.ED.cps.intel.com (10.7.248.11) by
ORSMSX901.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.2.1544.25 via Frontend Transport; Wed, 4 Jun 2025 07:25:53 -0700
Received: from NAM11-BN8-obe.outbound.protection.outlook.com (40.107.236.77)
by edgegateway.intel.com (134.134.137.111) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.2.1544.25; Wed, 4 Jun 2025 07:25:53 -0700
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=YKWBIdCczEM74vLO7Vwao2qC0ETiY5AfGfQV6oFtM6KcseAX+5sQli+xBHdATs0hNogOIrNKBXb2WuOHn0C1dAIZOslt82cO3J6iImegp7xt9/8P6uZDOchxjuURI2Wg+GmHSNZRgEaOLmk6Ua0YLabNdON1jup7USPmlAUfMCNtfkie1+QvU2l4s/FvrKuHE3lbBZUuO4gjnMr0qFQf8hjTodg7PZdCST00KFGIBo3/CIqgZNJIvDG0qqsdz0Mi5zbOUCxShxvPxDdaVcVl+52m92Hr/LzHROFtse/7MRDpHh5PBXe7VdvsXSi7uJwYvdKe/tn0r3dfiiOK5BLuxw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=ZbDm3LdtVZ7EFAQhYZmIdDn+nok4DMn7Qkv0Q7y5ukc=;
b=VkZJGVNLob3W2GCIU0wgTkeXIwsHI2oVfVu1zZi/Nxr8j9aU5vnHATzDLTrPEyrReN966vGYKkk/MvF4wPPj4VxzpXYuAOYmnGntlYIFvxE9riI4S1uEBfA9bzh/u8l7iw3bi5fLaoU5jr4qKqh2w1JBkq/GOxU8cvAUxc4Z3EwBu5X7HbYxR1L4S8FBniFI2KY52uylzqaJx+hVcGmcbjiNLvN0luso/60thA5clh1oCwMxIIUYR9EBAgBQpFVxPfXQrFLib4eU28FPP23M433OUmPumqSj6X9B/s0OkrKhYGJM7g6O5/J9m8AFlJLU/zXQVyKIfyy7N9zUKkF+Qw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com;
dkim=pass header.d=intel.com; arc=none
Received: from CY8PR11MB7134.namprd11.prod.outlook.com (2603:10b6:930:62::17)
by LV8PR11MB8607.namprd11.prod.outlook.com (2603:10b6:408:1ec::18) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8769.31; Wed, 4 Jun
2025 14:25:50 +0000
Received: from CY8PR11MB7134.namprd11.prod.outlook.com
([fe80::cd87:9086:122c:be3d]) by CY8PR11MB7134.namprd11.prod.outlook.com
([fe80::cd87:9086:122c:be3d%5]) with mapi id 15.20.8769.025; Wed, 4 Jun 2025
14:25:50 +0000
From: "Zhuo, Qiuxu" <qiuxu.zhuo@xxxxxxxxx>
To: "Fabio M. De Francesco" <fabio.m.de.francesco@xxxxxxxxxxxxxxx>, "Rafael J
. Wysocki" <rafael@xxxxxxxxxx>, Len Brown <lenb@xxxxxxxxxx>, Davidlohr Bueso
<dave@xxxxxxxxxxxx>, Jonathan Cameron <jonathan.cameron@xxxxxxxxxx>, "Jiang,
Dave" <dave.jiang@xxxxxxxxx>, "Schofield, Alison"
<alison.schofield@xxxxxxxxx>, "Verma, Vishal L" <vishal.l.verma@xxxxxxxxx>,
"Weiny, Ira" <ira.weiny@xxxxxxxxx>, "Williams, Dan J"
<dan.j.williams@xxxxxxxxx>, Mahesh J Salgaonkar <mahesh@xxxxxxxxxxxxx>,
Oliver O'Halloran <oohall@xxxxxxxxx>, Bjorn Helgaas <bhelgaas@xxxxxxxxxx>,
"Luck, Tony" <tony.luck@xxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>,
"linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>,
"linux-acpi@xxxxxxxxxxxxxxx" <linux-acpi@xxxxxxxxxxxxxxx>,
"linux-cxl@xxxxxxxxxxxxxxx" <linux-cxl@xxxxxxxxxxxxxxx>,
"linuxppc-dev@xxxxxxxxxxxxxxxx" <linuxppc-dev@xxxxxxxxxxxxxxxx>,
"linux-pci@xxxxxxxxxxxxxxx" <linux-pci@xxxxxxxxxxxxxxx>,
"linux-edac@xxxxxxxxxxxxxxx" <linux-edac@xxxxxxxxxxxxxxx>
CC: Yazen Ghannam <yazen.ghannam@xxxxxxx>
Subject: RE: [PATCH 3/4 v3] ACPI: extlog: Trace CPER PCI Express Error Section
Thread-Topic: [PATCH 3/4 v3] ACPI: extlog: Trace CPER PCI Express Error
Section
Thread-Index: AQHb1KAatJFCpAJRJUKKaiGMRfbdfrPzC7VA
Date: Wed, 4 Jun 2025 14:25:50 +0000
Message-ID: <CY8PR11MB7134BFAE1A4E54EE0C539CCA896CA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20250603155536.577493-1-fabio.m.de.francesco@xxxxxxxxxxxxxxx>
<20250603155536.577493-4-fabio.m.de.francesco@xxxxxxxxxxxxxxx>
In-Reply-To: <20250603155536.577493-4-fabio.m.de.francesco@xxxxxxxxxxxxxxx>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=intel.com;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: CY8PR11MB7134:EE_|LV8PR11MB8607:EE_
x-ms-office365-filtering-correlation-id: e7fc1c6e-d7d1-46f8-cddc-08dda373b4b5
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;ARA:13230040|366016|1800799024|7416014|376014|38070700018|921020;
x-microsoft-antispam-message-info: =?us-ascii?Q?B/FOpAYLHPDHXhbIAHoA8XtFgHPvFttRl+K8La/tHc19MybpoyybbXSoUXiU?=
=?us-ascii?Q?Zrg0emXqqIYUsdxzUfvE1rZ+p6q4Adi8tQxG2zxfs4CLmjdtEg5jnm5nLT7r?=
=?us-ascii?Q?k+wGDeYhpmauWdUq543T4wfTuQITKSO7AtJxs8IG4nqCsa0JleXhFbytTr8a?=
=?us-ascii?Q?jwegybLu5zgGplE5te/St4xaMY8y1iGP1IGnMao+XCbw9JSQE7y5HETYB12Z?=
=?us-ascii?Q?XZZdvHTd3dKJiG/Z6VvW1x/EI3jbclodZENbun4qmwVgTa0DkBO6WNe3XumB?=
=?us-ascii?Q?CEcic4Lh008MEP1J/mDdCawwA1UVHNgeUnHcKLz59UGuhtYr53VyvGlWDQCl?=
=?us-ascii?Q?zdX383UYXTeggkFbZXnPgPH7UlnW2hd5NbQpogo1+rR81igEPrfEBF2ykL4l?=
=?us-ascii?Q?KPbnIBqzN3zsLMKAyFGdtCBoZ1HzFc0vrExSS+OeNGVDK8jgJno82TJ9bZHM?=
=?us-ascii?Q?W1sAIk/ZnZcByGXXD1zPZJmWu2mdOFdb+2iNyDAQUbfXhI1rx+gzwUZ3wqWR?=
=?us-ascii?Q?TDgEgVLlRWWxdKS3R/glCy4upMhS/jHIDNhoSNWBZZwmlnJRuroko0XN5SaA?=
=?us-ascii?Q?wxUBZPU5alX5K3QsCyHLhYA09QTADXUl0o+eIjEe6mJYDMbJj9o80GXf8MrP?=
=?us-ascii?Q?opb+ixaJTE/q7w3Z5NV39Vzw6BaaFeeuUuGKAxWq78toDXTHx10BfaWPBd3f?=
=?us-ascii?Q?821KHZHu86mH1JGtEAnvo9hZoyO4tOTyd0ceKo/ZzHQwuuUtenOBtLhR+eAr?=
=?us-ascii?Q?QqAmIi47wrIA4WLsOxBEhXtSl2UfHC7TARaH9xx/xcs7bHGUPHgrgc/8ISWu?=
=?us-ascii?Q?iVvnOTzfkz4etYYNqc4eIkY731Kz0Nz7gwqylGO8hjNx9Qa3bPZUXHxPA+yg?=
=?us-ascii?Q?KfPfRCsEDsA1ULmuXBKuXdqfUiA9l7VikEogmUQFEzzdIc6EOcjm44tOJNu9?=
=?us-ascii?Q?DBjA2E/uNsX21XiSAqsNTjHB3n4dLP0eSbIGPMHOZeBoc3uNVIgJbxm4N4Nm?=
=?us-ascii?Q?2O2hC1eElDSgHcggDmqxrmGYjSSdqagR0TmgQlW4F5iQJknJiGzna/nP6GAQ?=
=?us-ascii?Q?ys3tTfY9ieE8EGI1l7CrMzFjwsiLaMs5ggvUuF1+Ae7IZtDTVa66IeIqVFgg?=
=?us-ascii?Q?gxV6NFvdwP8O7vGBKYy7CW2WVtdrHGxyTmVnvaM62n/NMMlzBgwrg1XUwP5d?=
=?us-ascii?Q?VMUTlLvJdVetuRU+StKMpgGLjdWBICWQWEKnaihIOXs4Tj+XQoaVUHzj+Cac?=
=?us-ascii?Q?F2m92LXHUZT6KD7wTcGS3/vwBb5KQRvLex1S4L4/AHPQPCuKXYQB0/ktDviJ?=
=?us-ascii?Q?JuhHq5F7mxsOrLx2snVD0H41+LC48Lv5+pegEimlY3RV1wvzSB+0t+y4t1fd?=
=?us-ascii?Q?VYeRB5WJgrmjZb7Tr3DkPiHeV3Um+wPJhigpgpxzqy+6MOhFb3zcQQrVZ7y0?=
=?us-ascii?Q?/3KKGUxG7dr4JEpO2ly3Ho+NRq7pq+JYnqaA7eAS2hiULXVtdrPamOef1D7H?=
=?us-ascii?Q?5jn9JJBV6EFTIek=3D?=
x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CY8PR11MB7134.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(7416014)(376014)(38070700018)(921020);DIR:OUT;SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?81UKyJNVJpAH7aFVyERzUjEQh2/N+lZGi2yDhgtKPtqwIHrrGwSnfPFRRg8X?=
=?us-ascii?Q?9yV9VLE7j8UpVKNLThLogddj9mhQjB+bFHtkGTJJz/WBfnx/X4W2pmqPXyPO?=
=?us-ascii?Q?cqArxH0hHSUbft8nRM/veadslNKpJMBk2zWMJPqn57T8W7A9CPOY9r6k+SLP?=
=?us-ascii?Q?R11mLZ6sdlWt7iOKBV2jLoJdPXK1Sjhcvaj4me+JaaG7LXgnhBWh21ikEisJ?=
=?us-ascii?Q?jojBgIpAq+AZR1SEEcCEyzKPMgNzyXNIwQJWYd35Q8GhNotI2XZQtxrt4Zol?=
=?us-ascii?Q?UGYEs3LoMisQZu/RhVsaaB9lwPwyQGIVyVJDzmABWOvyunsttYFBnO9D8HXZ?=
=?us-ascii?Q?3svpeVqSAI/Xs3PDYnUejZHz7k+O2RShiStr6YZyNvg3jM+mYNOvYB+aDSWi?=
=?us-ascii?Q?2hFFWjNjRkmnfTn7tKyvB5KOeB1+lBguyBvYUO7wla4FOnjwCysbO6hQy7y2?=
=?us-ascii?Q?iALNxTh9fL8E3SkhS1C09rA5hB/Mx8g+Aep2olpYtzT/A+qUv6NS8f/cEzdi?=
=?us-ascii?Q?OodsLfikXe/c8AXZXPqtO/5wxDzRhO/yUfQeHIVYgwDOAHHFbC7es3gbDtCA?=
=?us-ascii?Q?YVx9WnFXKvCvN8hWo+4wMBWdh6euWcKXp8ZEE9EjmC/xVoLWHs4rLDPenC/k?=
=?us-ascii?Q?472qEFnRPHZ70ZQrC1yzQpWD591bLty6WYgmm++r++M6qg/iUsOtrUJfjxdV?=
=?us-ascii?Q?zs+cYa2/877/mty9qK9jW24kSMP2Obh++6Fkf8FVwJ6a0s6z6Kf5J4eid0xn?=
=?us-ascii?Q?Ca+3/mNTVyA6cyFK8URrh5OJAN770rUJbDZYAyK8vCnsje47d6ZRlDJuYEK8?=
=?us-ascii?Q?tpaV49VrailYeQv8gOc2ERU8vzbbVN/iwmkL8FZunui/2XSd+dORcho2kXb6?=
=?us-ascii?Q?LJSF9jfojOr8XiuLxAJ+kuD+PYHUOd0ObO4r3aeN+tCHwoWR6CNE2kpxP4pY?=
=?us-ascii?Q?d/xpoQ6Vd91y3jMnfezDBaBlBRE/IEYEOSV86U6uHZXSv9q7r+vJ7OS8Yoc4?=
=?us-ascii?Q?ZpOpsR+bHVpeK4g1jylMO7f3esYMFY21NJjw7EZ/Cik1UFQPsOcBAhCR6K3x?=
=?us-ascii?Q?cc0qACwYsQgXHM7InAr6suEORWjbmIgvURDJIpC6MZRdn8ZQxhTDHnatyDz5?=
=?us-ascii?Q?6GFnQCqY2ITrtdiFGMQ2syXUx0mIeEZFAckWKkleQ8U5FXskssi5zStOjsZU?=
=?us-ascii?Q?qxrFUddAjI4nd76oiVqnGb7ZZeZYYcVXqOWi0Btkd5OoUhgshhjr94Hcx+Kt?=
=?us-ascii?Q?u3td//NSqiJsIhYEMsj61ghl19irwMeAgoN/c7K9fOlv0m59c2EqPaz/l26v?=
=?us-ascii?Q?Uamy8gclGlhwq8HR5JAT5htTP6HnmVP0oXlUAhnxIaRubfqnnAb83z8k0fgA?=
=?us-ascii?Q?ouvb2NCcQXxkrwpdx0F05TuPESLaXHoCe4MXHkUM5MAFaxYroTap1Swsj2il?=
=?us-ascii?Q?k3FQziPmYYFcQ/fA67szPz9mU72BjuNPH8BeR8j6iK0BGZpV4OTFRecFU1lz?=
=?us-ascii?Q?zI48PelZPHw3gIfdWIN5VqaGd5qKtzUrELr2VRGzsn4WEL5KP7BiqdFKzaNb?=
=?us-ascii?Q?t+7y9/P+Q8uFzJAlzsYsQh0r3TT+kTThfTamJYCw?=
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: CY8PR11MB7134.namprd11.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: e7fc1c6e-d7d1-46f8-cddc-08dda373b4b5
X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jun 2025 14:25:50.4831
(UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: 6DhFLHu8TQKS2tEKy8UKwF3YmNnlaIgCwnBSrdcElwQPEqkQHobu1CEoXCH/v65ezTkD7MNjI2XANaTdbJGq4g==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV8PR11MB8607
X-OriginatorOrg: intel.com
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
From: Fabio M. De Francesco <fabio.m.de.francesco@xxxxxxxxxxxxxxx>
[...]
Subject: [PATCH 3/4 v3] ACPI: extlog: Trace CPER PCI Express Error Sectio=
n
=20
I/O Machine Check Architecture events may signal failing PCIe components =
or
links. The AER event contains details on what was happening on the wire
when the error was signaled.
=20
Trace the CPER PCIe Error section (UEFI v2.10, Appendix N.2.7) reported b=
y
the I/O MCA.
=20
Cc: Dan Williams <dan.j.williams@xxxxxxxxx>
Signed-off-by: Fabio M. De Francesco
<fabio.m.de.francesco@xxxxxxxxxxxxxxx>
[...]
--- a/drivers/acpi/acpi_extlog.c
+++ b/drivers/acpi/acpi_extlog.c
@@ -132,6 +132,34 @@ static int print_extlog_rcd(const char *pfx,
return 1;
}
=20
+static void extlog_print_pcie(struct cper_sec_pcie *pcie_err,
+ int severity)
+{
+ struct aer_capability_regs *aer;
+ struct pci_dev *pdev;
+ unsigned int devfn;
+ unsigned int bus;
+ int aer_severity;
+ int domain;
+
+ if (!(pcie_err->validation_bits & CPER_PCIE_VALID_DEVICE_ID ||
+ pcie_err->validation_bits & CPER_PCIE_VALID_AER_INFO))
+ return;
+
+ aer_severity =3D cper_severity_to_aer(severity);
+ aer =3D (struct aer_capability_regs *)pcie_err->aer_info;
+ domain =3D pcie_err->device_id.segment;
+ bus =3D pcie_err->device_id.bus;
+ devfn =3D PCI_DEVFN(pcie_err->device_id.device,
+ pcie_err->device_id.function);
+ pdev =3D pci_get_domain_bus_and_slot(domain, bus, devfn);
+ if (!pdev)
+ return;
+
+ pci_print_aer(KERN_DEBUG, pdev, aer_severity, aer);
Is there any reason not to use "KERN_ERR" log level?
+ pci_dev_put(pdev);
+}
+=20
Return-Path: <linux-kernel+bounces-673349-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id E79ED41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:27:04 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 1F40C1767AE
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:27:06 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id E2FE6290083;
Wed, 4 Jun 2025 14:26:57 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="IQUFsPCz"
Received: from mail-qt1-f172.google.com (mail-qt1-f172.google.com [209.85.160.172])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 26F414C7C
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:26:53 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.172
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749047216; cv=none; b=MFmcuBS/RQj0nYpx5M8hT8SgTdQdPhk9HTK6en+XlXuyOrSSxEZI3OeLXYwvRgWwGIDc4VSsS/+lqDZ4Gq6v5j45vyTX/OIA92wvv4W4kQurr3uJmXQMXeokZy+bdsh2htTnwnXXk6S0UYvr3/pQX72+KywsODjxbZK83EhO0FQ=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749047216; c=relaxed/simple;
bh=NM0DCuaQUITzAzptwZ0C59YK5/JvpXmYWeeJVeRCoso=;
h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
To:Cc:Content-Type; b=KTyccWOxdAyYrzSHzC2KLG2gOH8dKzpYSSMPwhA460I7WAaao6LEY4CA67AadP9+cIyGKEeyesSio0fAvBWz1HAdKrIxEYzA9q0oEqH0/HzNQgCf195v1eKESb1OHt/pEORe3yXqLCURrhzkKuUJcV3psTAZlONK8rjjD8n/gRA=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=IQUFsPCz; arc=none smtp.client-ip=209.85.160.172
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com
Received: by mail-qt1-f172.google.com with SMTP id d75a77b69052e-47e9fea29easo449911cf.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 07:26:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=google.com; s=20230601; t=1749047213; x=1749652013; darn=vger.kernel.org;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:from:to:cc:subject:date
:message-id:reply-to;
bh=IAp/1HGbBLv6qtx/n8Ypumuz56YxupYXz6XcmTVLY0A=;
b=IQUFsPCzTrTdqTmcXCpnzd4Kdq789uDcB4lXavBsqjXve+k6fsNMrUX5Jihlg4dxFC
g+Reut3rJvfQSA0P0lBtXKAmpOr1VFjspgdmZTyOh76pgS3Ng9QSLXq71gSbjp1uA0jB
z/PXk/oSsD1B2OarPXQsH9KPpxV61io/Re0B4oFB7vp0WoEP+OpU0AjUAyKe0KXa7Tzc
pH2EVriBhIaQ4A5kakATq2BnlJvCIYdfxw+NJUhbqyV6kCQxRd9xyAj6/hDL4ei9pCd2
ovM0ULAEXUyDGqI9l2M+nXH01WF04iFmYhi7WD6JLFj1ucKejD/81QurLAbeQd2jfihH
XvYA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749047213; x=1749652013;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=IAp/1HGbBLv6qtx/n8Ypumuz56YxupYXz6XcmTVLY0A=;
b=BEqg5e0tJXDpZ/wcvZMEHaNoul9Lsl4fbt52RPBzDOZFCtfJqPz2VDlx8eEqVVt/Uw
hXaJpeuZwNiiXJJFTfmFv172+da0/apBoYqWb+CnEDuaXD22VmNWQmzJzptSD0xoZhFt
BDGU2e9pIU2pCladpGHeVZ/k47K4Sg5Xtdp4pqrusk2HcU08FDHrZcYht6p4QzyNMN7H
ANBi0pL2K7ROXRww7azts8KWwdcFYnTnOIS8K7VH2vz6srfxaZjyOVZ1lVtCdeVP3XAn
Q1u8NOogfmm4kmil3cijQEjo0hU4Wq9r53fiUUM3tEA84Nd3Bl0KSR6n37lplcic+WDX
wnsg==
X-Forwarded-Encrypted: i=1; AJvYcCXWX2gR1q23Lt/2+r13ZpyU+sXQqTFjnqLYhPlJvie6rZf8It8Jiz/hQ/zoNdoIaftb3aNDnmPjdQBjjlU=@vger.kernel.org
X-Gm-Message-State: AOJu0YxA5V2od3eCDIxa777a5S8kIu/7v18RgqCutfQRiagZJHBtDREX
FprVHilN3iUOxLMvZuaiT9MbKOKVx3iCW2uFyAUBFVDuBFJhUM/FwLeoouFGeREyGGDo0WeKmIG
Z+3eE8Fv/2ZO2tv3q7E2DBYS1Gp9HsYNk/QQA06V5
X-Gm-Gg: ASbGncs37RSUVkf4qxXTkw+nyRhp3yCK4BaqB1+1Qv4tSmPKgMD87sT/C4lO1PNFgQr
zOSg+JfoaPlDP4SYNoSvLCKpoAukGTfsBe+ytwCWIhRJIi4VARMJS9AH2XvMzic2+1Xre5AvfHC
fUhohe9cu4gAd14+pNhEG0fpNBA7/ym0ABvL8pRZ1djwfh4Jktjby87vmvq19ZwLHwR/x15QoU
X-Google-Smtp-Source: AGHT+IFzdOA+3P2PyHFB0pEDLQ0XnMtUkTcxsnX3H6Bkc6gXrGQls44k6HcVZWeCRhjdatLqR5+P87mlE7vGBQH6TYo=
X-Received: by 2002:ac8:650e:0:b0:4a5:a8b7:6c12 with SMTP id
d75a77b69052e-4a5a8b770d4mr1977241cf.26.1749047212170; Wed, 04 Jun 2025
07:26:52 -0700 (PDT)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
References: <20250604140544.688711-1-david@xxxxxxxxxx> <202d338d-30f6-4f3b-bddc-b0818a940732@xxxxxxx>
In-Reply-To: <202d338d-30f6-4f3b-bddc-b0818a940732@xxxxxxx>
From: Suren Baghdasaryan <surenb@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 07:26:40 -0700
X-Gm-Features: AX0GCFvHLF0qLYBnBbkp2Yp92Lpgzy-k84kOFcNhayBjADpHAViy2MHD967dpb8
Message-ID: <CAJuCfpHyj+9dSfiqRg6dSUZax3wk3kqK1iR+kMT+sac4n4qBtQ@xxxxxxxxxxxxxx>
Subject: Re: [PATCH v1] mm/gup: remove (VM_)BUG_ONs
To: Vlastimil Babka <vbabka@xxxxxxx>
Cc: David Hildenbrand <david@xxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>, Mike Rapoport <rppt@xxxxxxxxxx>,
Michal Hocko <mhocko@xxxxxxxx>, Jason Gunthorpe <jgg@xxxxxxxx>, John Hubbard <jhubbard@xxxxxxxxxx>,
Peter Xu <peterx@xxxxxxxxxx>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-11.0 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 4, 2025 at 7:22=E2=80=AFAM Vlastimil Babka <vbabka@xxxxxxx> wro=
te:
On 6/4/25 16:05, David Hildenbrand wrote:
> Especially once we hit one of the assertions in
> sanity_check_pinned_pages(), observing follow-up assertions failing
> in other code can give good clues about what went wrong, so use
> VM_WARN_ON_ONCE instead.
>
> While at it, let's just convert all VM_BUG_ON to VM_WARN_ON_ONCE as
> well. Add one comment for the pfn_valid() check.
>
> We have to introduce VM_WARN_ON_ONCE_VMA() to make that fly.
>
> Drop the BUG_ON after mmap_read_lock_killable(), if that ever returns
> something > 0 we're in bigger trouble. Convert the other BUG_ON's into
> VM_WARN_ON_ONCE as well, they are in a similar domain "should never
> happen", but more reasonable to check for during early testing.
>
> Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> Cc: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>
> Cc: "Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>
> Cc: Vlastimil Babka <vbabka@xxxxxxx>
> Cc: Mike Rapoport <rppt@xxxxxxxxxx>
> Cc: Suren Baghdasaryan <surenb@xxxxxxxxxx>
> Cc: Michal Hocko <mhocko@xxxxxxxx>
> Cc: Jason Gunthorpe <jgg@xxxxxxxx>
> Cc: John Hubbard <jhubbard@xxxxxxxxxx>
> Cc: Peter Xu <peterx@xxxxxxxxxx>
> Signed-off-by: David Hildenbrand <david@xxxxxxxxxx>
Makes sense, BUG_ONs bad.
Acked-by: Vlastimil Babka <vbabka@xxxxxxx>
Reviewed-by: Suren Baghdasaryan <surenb@xxxxxxxxxx>
> ---
>
> Wanted to do this for a long time, but my todo list keeps growing ...
>
> Based on mm/mm-unstable
>
> ---
> include/linux/mmdebug.h | 12 ++++++++++++
> mm/gup.c | 41 +++++++++++++++++++----------------------
> 2 files changed, 31 insertions(+), 22 deletions(-)
>
> diff --git a/include/linux/mmdebug.h b/include/linux/mmdebug.h
> index a0a3894900ed4..14a45979cccc9 100644
> --- a/include/linux/mmdebug.h
> +++ b/include/linux/mmdebug.h
> @@ -89,6 +89,17 @@ void vma_iter_dump_tree(const struct vma_iterator *v=
mi);
> } \
> unlikely(__ret_warn_once); \
> })
> +#define VM_WARN_ON_ONCE_VMA(cond, vma) ({ =
\
> + static bool __section(".data..once") __warned; \
> + int __ret_warn_once =3D !!(cond); =
\
> + \
> + if (unlikely(__ret_warn_once && !__warned)) { \
> + dump_vma(vma); \
> + __warned =3D true; =
\
> + WARN_ON(1); \
> + } \
> + unlikely(__ret_warn_once); \
> +})
> #define VM_WARN_ON_VMG(cond, vmg) ({ \
> int __ret_warn =3D !!(cond); =
\
> \
> @@ -115,6 +126,7 @@ void vma_iter_dump_tree(const struct vma_iterator *=
vmi);
> #define VM_WARN_ON_FOLIO(cond, folio) BUILD_BUG_ON_INVALID(cond)
> #define VM_WARN_ON_ONCE_FOLIO(cond, folio) BUILD_BUG_ON_INVALID(cond)
> #define VM_WARN_ON_ONCE_MM(cond, mm) BUILD_BUG_ON_INVALID(cond)
> +#define VM_WARN_ON_ONCE_VMA(cond, vma) BUILD_BUG_ON_INVALID(cond)
> #define VM_WARN_ON_VMG(cond, vmg) BUILD_BUG_ON_INVALID(cond)
> #define VM_WARN_ONCE(cond, format...) BUILD_BUG_ON_INVALID(cond)
> #define VM_WARN(cond, format...) BUILD_BUG_ON_INVALID(cond)
> diff --git a/mm/gup.c b/mm/gup.c
> index e065a49842a87..3c3931fcdd820 100644
> --- a/mm/gup.c
> +++ b/mm/gup.c
> @@ -64,11 +64,11 @@ static inline void sanity_check_pinned_pages(struct=
page **pages,
> !folio_test_anon(folio))
> continue;
> if (!folio_test_large(folio) || folio_test_hugetlb(folio)=
)
> - VM_BUG_ON_PAGE(!PageAnonExclusive(&folio->page), =
page);
> + VM_WARN_ON_ONCE_PAGE(!PageAnonExclusive(&folio->p=
age), page);
> else
> /* Either a PTE-mapped or a PMD-mapped THP. */
> - VM_BUG_ON_PAGE(!PageAnonExclusive(&folio->page) &=
&
> - !PageAnonExclusive(page), page);
> + VM_WARN_ON_ONCE_PAGE(!PageAnonExclusive(&folio->p=
age) &&
> + !PageAnonExclusive(page), pa=
ge);
> }
> }
>
> @@ -760,8 +760,8 @@ static struct page *follow_huge_pmd(struct vm_area_=
struct *vma,
> if (!pmd_write(pmdval) && gup_must_unshare(vma, flags, page))
> return ERR_PTR(-EMLINK);
>
> - VM_BUG_ON_PAGE((flags & FOLL_PIN) && PageAnon(page) &&
> - !PageAnonExclusive(page), page);
> + VM_WARN_ON_ONCE_PAGE((flags & FOLL_PIN) && PageAnon(page) &&
> + !PageAnonExclusive(page), page);
>
> ret =3D try_grab_folio(page_folio(page), 1, flags);
> if (ret)
> @@ -899,8 +899,8 @@ static struct page *follow_page_pte(struct vm_area_=
struct *vma,
> goto out;
> }
>
> - VM_BUG_ON_PAGE((flags & FOLL_PIN) && PageAnon(page) &&
> - !PageAnonExclusive(page), page);
> + VM_WARN_ON_ONCE_PAGE((flags & FOLL_PIN) && PageAnon(page) &&
> + !PageAnonExclusive(page), page);
>
> /* try_grab_folio() does nothing unless FOLL_GET or FOLL_PIN is s=
et. */
> ret =3D try_grab_folio(folio, 1, flags);
> @@ -1180,7 +1180,7 @@ static int faultin_page(struct vm_area_struct *vm=
a,
> if (unshare) {
> fault_flags |=3D FAULT_FLAG_UNSHARE;
> /* FAULT_FLAG_WRITE and FAULT_FLAG_UNSHARE are incompatib=
le */
> - VM_BUG_ON(fault_flags & FAULT_FLAG_WRITE);
> + VM_WARN_ON_ONCE(fault_flags & FAULT_FLAG_WRITE);
> }
>
> ret =3D handle_mm_fault(vma, address, fault_flags, NULL);
> @@ -1760,10 +1760,7 @@ static __always_inline long __get_user_pages_loc=
ked(struct mm_struct *mm,
> }
>
> /* VM_FAULT_RETRY or VM_FAULT_COMPLETED cannot return err=
ors */
> - if (!*locked) {
> - BUG_ON(ret < 0);
> - BUG_ON(ret >=3D nr_pages);
> - }
> + VM_WARN_ON_ONCE(!*locked && (ret < 0 || ret >=3D nr_pages=
));
>
> if (ret > 0) {
> nr_pages -=3D ret;
> @@ -1808,7 +1805,6 @@ static __always_inline long __get_user_pages_lock=
ed(struct mm_struct *mm,
>
> ret =3D mmap_read_lock_killable(mm);
> if (ret) {
> - BUG_ON(ret > 0);
> if (!pages_done)
> pages_done =3D ret;
> break;
> @@ -1819,11 +1815,11 @@ static __always_inline long __get_user_pages_lo=
cked(struct mm_struct *mm,
> pages, locked);
> if (!*locked) {
> /* Continue to retry until we succeeded */
> - BUG_ON(ret !=3D 0);
> + VM_WARN_ON_ONCE(ret !=3D 0);
> goto retry;
> }
> if (ret !=3D 1) {
> - BUG_ON(ret > 1);
> + VM_WARN_ON_ONCE(ret > 1);
> if (!pages_done)
> pages_done =3D ret;
> break;
> @@ -1885,10 +1881,10 @@ long populate_vma_page_range(struct vm_area_str=
uct *vma,
> int gup_flags;
> long ret;
>
> - VM_BUG_ON(!PAGE_ALIGNED(start));
> - VM_BUG_ON(!PAGE_ALIGNED(end));
> - VM_BUG_ON_VMA(start < vma->vm_start, vma);
> - VM_BUG_ON_VMA(end > vma->vm_end, vma);
> + VM_WARN_ON_ONCE(!PAGE_ALIGNED(start));
> + VM_WARN_ON_ONCE(!PAGE_ALIGNED(end));
> + VM_WARN_ON_ONCE_VMA(start < vma->vm_start, vma);
> + VM_WARN_ON_ONCE_VMA(end > vma->vm_end, vma);
> mmap_assert_locked(mm);
>
> /*
> @@ -1957,8 +1953,8 @@ long faultin_page_range(struct mm_struct *mm, uns=
igned long start,
> int gup_flags;
> long ret;
>
> - VM_BUG_ON(!PAGE_ALIGNED(start));
> - VM_BUG_ON(!PAGE_ALIGNED(end));
> + VM_WARN_ON_ONCE(!PAGE_ALIGNED(start));
> + VM_WARN_ON_ONCE(!PAGE_ALIGNED(end));
> mmap_assert_locked(mm);
>
> /*
> @@ -2908,7 +2904,8 @@ static int gup_fast_pte_range(pmd_t pmd, pmd_t *p=
mdp, unsigned long addr,
> } else if (pte_special(pte))
> goto pte_unmap;
>
> - VM_BUG_ON(!pfn_valid(pte_pfn(pte)));
> + /* If it's not marked as special it must have a valid mem=
map. */
> + VM_WARN_ON_ONCE(!pfn_valid(pte_pfn(pte)));
> page =3D pte_page(pte);
>
> folio =3D try_grab_folio_fast(page, 1, flags);
>
> base-commit: 2d0c297637e7d59771c1533847c666cdddc19884
Return-Path: <linux-kernel+bounces-673350-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 372E641E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:27:35 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 582FC17941E
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:27:36 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id C5DA9290BCE;
Wed, 4 Jun 2025 14:27:24 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="jDBARidu";
dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="5Fai4zf1";
dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="uDlhWiDH";
dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="SU1jb+Wa"
Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 35D6128FFF7
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:27:21 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749047243; cv=none; b=WZalbVnCZHlOdFsP9qHj6o95ZjFEucwxffQvnf6YmqQJNuTNBrVzxhgbSWI9Bv1A0W7RMEfsYZop6kAvgTAJJOstYlXLUtkBWe8n3IjTLrnlXLNpNUZuNn8BMEBN9tHG+2zlBeveTAViC1Mb3nCRp0ZnbBZYDYR9UlvKAE/VZVk=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749047243; c=relaxed/simple;
bh=crfGotMOeFabhGGa373/ZOYwQMqUlJ3giwh95Cp+Aqw=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=CPElLFrlY2KtARJdHcRv0EMGqJaFvFYEgJNOcVgT426B/y1sWdQZsviR5vkG7IaDFy+jQKMSpGCpMaG/KOJ/FRkjamIoPfe3nWLq85QaVe3BESG3i+ij3v+p/HaH+vecB50XNrBkvuHIwTZ1W5TYBOUvBo6rwzBqE4Y1KLhAwwY=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz; spf=pass smtp.mailfrom=suse.cz; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=jDBARidu; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=5Fai4zf1; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=uDlhWiDH; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=SU1jb+Wa; arc=none smtp.client-ip=195.135.223.131
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.cz
Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(No client certificate requested)
by smtp-out2.suse.de (Postfix) with ESMTPS id 114A21FF11;
Wed, 4 Jun 2025 14:27:19 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa;
t=1749047240; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=BQrpsvaXV6ZPq62t2PJsuMtlrmV31qEz+8MHBADCl8s=;
b=jDBARidueX4ktUkfaVeBff1pxZa0kSSTd2qCXFgDKDXA5ZTF13WcMvshatjaojIw1Ak5oB
Sa2BQjkaGJHZAWp7MaW65RtSuKtwwpXf7O68RQ04PgIO50M+jayOgNvwUZaYkH/JCcK0Y2
7QHC5vGE13tPCmBsTg95xDDbYUPfXJU=
DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz;
s=susede2_ed25519; t=1749047240;
h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=BQrpsvaXV6ZPq62t2PJsuMtlrmV31qEz+8MHBADCl8s=;
b=5Fai4zf1Lv4UjTlHyl8SfdhCWi+zBItkO3LgrW/qWxFZI+hDb8B1NOFWCqucW0KzMM7GSj
2OqZ4GFycqP11WDQ==
Authentication-Results: smtp-out2.suse.de;
dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=uDlhWiDH;
dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=SU1jb+Wa
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa;
t=1749047239; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=BQrpsvaXV6ZPq62t2PJsuMtlrmV31qEz+8MHBADCl8s=;
b=uDlhWiDHzJMp1AIvJ36B2UZISuL0r1NDK59Ry7VnOBrf1uCfSXdXk8xev3CZIknrxjD2Kv
TmSL7jGOZvjZaC7iKsZvFfku1uztxVy94lVjsnUM6A4bo+NpAZHvtcg+/3R0nTZQ1Vwazh
wd49dZP+qvK0D0wqMUCDAFy33o4ETq4=
DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz;
s=susede2_ed25519; t=1749047239;
h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=BQrpsvaXV6ZPq62t2PJsuMtlrmV31qEz+8MHBADCl8s=;
b=SU1jb+WabCODPXMr5rbOSSwVHvcdMfO6KxDbe0X3u+xXMFEXIbtf7V2nhv2xpeqVVJNvsE
km25iBShfr6D+sDg==
Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(No client certificate requested)
by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id EA03D13A63;
Wed, 4 Jun 2025 14:27:18 +0000 (UTC)
Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167])
by imap1.dmz-prg2.suse.org with ESMTPSA
id NpjJOMZXQGh0dwAAD6G6ig
(envelope-from <vbabka@xxxxxxx>); Wed, 04 Jun 2025 14:27:18 +0000
Message-ID: <a5319627-c32e-46de-8616-39fbbd2d369e@xxxxxxx>
Date: Wed, 4 Jun 2025 16:27:18 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH] mm: fix the inaccurate memory statistics issue for users
Content-Language: en-US
To: Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx>,
Shakeel Butt <shakeel.butt@xxxxxxxxx>, Michal Hocko <mhocko@xxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, david@xxxxxxxxxx,
lorenzo.stoakes@xxxxxxxxxx, Liam.Howlett@xxxxxxxxxx, rppt@xxxxxxxxxx,
surenb@xxxxxxxxxx, donettom@xxxxxxxxxxxxx, aboorvad@xxxxxxxxxxxxx,
sj@xxxxxxxxxx, linux-mm@xxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
References: <4f0fd51eb4f48c1a34226456b7a8b4ebff11bf72.1748051851.git.baolin.wang@xxxxxxxxxxxxxxxxx>
<20250529205313.a1285b431bbec2c54d80266d@xxxxxxxxxxxxxxxxxxxx>
<aDm1GCV8yToFG1cq@tiehlicka>
<72f0dc8c-def3-447c-b54e-c390705f8c26@xxxxxxxxxxxxxxxxx>
<aD6vHzRhwyTxBqcl@tiehlicka>
<ef2c9e13-cb38-4447-b595-f461f3f25432@xxxxxxxxxxxxxxxxx>
<aD7OM5Mrg5jnEnBc@tiehlicka>
<7307bb7a-7c45-43f7-b073-acd9e1389000@xxxxxxxxxxxxxxxxx>
<aD8LKHfCca1wQ5pS@tiehlicka>
<obfnlpvc4tmb6gbd4mw7h7jamp3kouyhnpl4cusetyctswznod@yr6dyrsbay6w>
<250ec733-8b2d-4c56-858c-6aada9544a55@xxxxxxxxxxxxxxxxx>
<1aa7c368-c37f-4b00-876c-dcf51a523c42@xxxxxxx>
<d2b76402-7e1a-4b2d-892a-2e8ffe1a37a9@xxxxxxxxxxxxxxxxx>
From: Vlastimil Babka <vbabka@xxxxxxx>
Autocrypt: addr=vbabka@xxxxxxx; keydata=
xsFNBFZdmxYBEADsw/SiUSjB0dM+vSh95UkgcHjzEVBlby/Fg+g42O7LAEkCYXi/vvq31JTB
KxRWDHX0R2tgpFDXHnzZcQywawu8eSq0LxzxFNYMvtB7sV1pxYwej2qx9B75qW2plBs+7+YB
87tMFA+u+L4Z5xAzIimfLD5EKC56kJ1CsXlM8S/LHcmdD9Ctkn3trYDNnat0eoAcfPIP2OZ+
9oe9IF/R28zmh0ifLXyJQQz5ofdj4bPf8ecEW0rhcqHfTD8k4yK0xxt3xW+6Exqp9n9bydiy
tcSAw/TahjW6yrA+6JhSBv1v2tIm+itQc073zjSX8OFL51qQVzRFr7H2UQG33lw2QrvHRXqD
Ot7ViKam7v0Ho9wEWiQOOZlHItOOXFphWb2yq3nzrKe45oWoSgkxKb97MVsQ+q2SYjJRBBH4
8qKhphADYxkIP6yut/eaj9ImvRUZZRi0DTc8xfnvHGTjKbJzC2xpFcY0DQbZzuwsIZ8OPJCc
LM4S7mT25NE5kUTG/TKQCk922vRdGVMoLA7dIQrgXnRXtyT61sg8PG4wcfOnuWf8577aXP1x
6mzw3/jh3F+oSBHb/GcLC7mvWreJifUL2gEdssGfXhGWBo6zLS3qhgtwjay0Jl+kza1lo+Cv
BB2T79D4WGdDuVa4eOrQ02TxqGN7G0Biz5ZLRSFzQSQwLn8fbwARAQABzSBWbGFzdGltaWwg
QmFia2EgPHZiYWJrYUBzdXNlLmN6PsLBlAQTAQoAPgIbAwULCQgHAwUVCgkICwUWAgMBAAIe
AQIXgBYhBKlA1DSZLC6OmRA9UCJPp+fMgqZkBQJnyBr8BQka0IFQAAoJECJPp+fMgqZkqmMQ
AIbGN95ptUMUvo6aAdhxaOCHXp1DfIBuIOK/zpx8ylY4pOwu3GRe4dQ8u4XS9gaZ96Gj4bC+
jwWcSmn+TjtKW3rH1dRKopvC07tSJIGGVyw7ieV/5cbFffA8NL0ILowzVg8w1ipnz1VTkWDr
2zcfslxJsJ6vhXw5/npcY0ldeC1E8f6UUoa4eyoskd70vO0wOAoGd02ZkJoox3F5ODM0kjHu
Y97VLOa3GG66lh+ZEelVZEujHfKceCw9G3PMvEzyLFbXvSOigZQMdKzQ8D/OChwqig8wFBmV
QCPS4yDdmZP3oeDHRjJ9jvMUKoYODiNKsl2F+xXwyRM2qoKRqFlhCn4usVd1+wmv9iLV8nPs
2Db1ZIa49fJet3Sk3PN4bV1rAPuWvtbuTBN39Q/6MgkLTYHb84HyFKw14Rqe5YorrBLbF3rl
M51Dpf6Egu1yTJDHCTEwePWug4XI11FT8lK0LNnHNpbhTCYRjX73iWOnFraJNcURld1jL1nV
r/LRD+/e2gNtSTPK0Qkon6HcOBZnxRoqtazTU6YQRmGlT0v+rukj/cn5sToYibWLn+RoV1CE
Qj6tApOiHBkpEsCzHGu+iDQ1WT0Idtdynst738f/uCeCMkdRu4WMZjteQaqvARFwCy3P/jpK
uvzMtves5HvZw33ZwOtMCgbpce00DaET4y/UzsBNBFsZNTUBCACfQfpSsWJZyi+SHoRdVyX5
J6rI7okc4+b571a7RXD5UhS9dlVRVVAtrU9ANSLqPTQKGVxHrqD39XSw8hxK61pw8p90pg4G
/N3iuWEvyt+t0SxDDkClnGsDyRhlUyEWYFEoBrrCizbmahOUwqkJbNMfzj5Y7n7OIJOxNRkB
IBOjPdF26dMP69BwePQao1M8Acrrex9sAHYjQGyVmReRjVEtv9iG4DoTsnIR3amKVk6si4Ea
X/mrapJqSCcBUVYUFH8M7bsm4CSxier5ofy8jTEa/CfvkqpKThTMCQPNZKY7hke5qEq1CBk2
wxhX48ZrJEFf1v3NuV3OimgsF2odzieNABEBAAHCwXwEGAEKACYCGwwWIQSpQNQ0mSwujpkQ
PVAiT6fnzIKmZAUCZ8gcVAUJFhTonwAKCRAiT6fnzIKmZLY8D/9uo3Ut9yi2YCuASWxr7QQZ
lJCViArjymbxYB5NdOeC50/0gnhK4pgdHlE2MdwF6o34x7TPFGpjNFvycZqccSQPJ/gibwNA
zx3q9vJT4Vw+YbiyS53iSBLXMweeVV1Jd9IjAoL+EqB0cbxoFXvnjkvP1foiiF5r73jCd4PR
rD+GoX5BZ7AZmFYmuJYBm28STM2NA6LhT0X+2su16f/HtummENKcMwom0hNu3MBNPUOrujtW
khQrWcJNAAsy4yMoJ2Lw51T/5X5Hc7jQ9da9fyqu+phqlVtn70qpPvgWy4HRhr25fCAEXZDp
xG4RNmTm+pqorHOqhBkI7wA7P/nyPo7ZEc3L+ZkQ37u0nlOyrjbNUniPGxPxv1imVq8IyycG
AN5FaFxtiELK22gvudghLJaDiRBhn8/AhXc642/Z/yIpizE2xG4KU4AXzb6C+o7LX/WmmsWP
Ly6jamSg6tvrdo4/e87lUedEqCtrp2o1xpn5zongf6cQkaLZKQcBQnPmgHO5OG8+50u88D9I
rywqgzTUhHFKKF6/9L/lYtrNcHU8Z6Y4Ju/MLUiNYkmtrGIMnkjKCiRqlRrZE/v5YFHbayRD
dJKXobXTtCBYpLJM4ZYRpGZXne/FAtWNe4KbNJJqxMvrTOrnIatPj8NhBVI0RSJRsbilh6TE
m6M14QORSWTLRg==
In-Reply-To: <d2b76402-7e1a-4b2d-892a-2e8ffe1a37a9@xxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Rspamd-Server: rspamd2.dmz-prg2.suse.org
X-Rspamd-Queue-Id: 114A21FF11
X-Rspamd-Action: no action
X-Spamd-Result: default: False [-4.51 / 50.00];
BAYES_HAM(-3.00)[100.00%];
NEURAL_HAM_LONG(-1.00)[-1.000];
R_DKIM_ALLOW(-0.20)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519];
NEURAL_HAM_SHORT(-0.20)[-1.000];
MIME_GOOD(-0.10)[text/plain];
MX_GOOD(-0.01)[];
RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received];
RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from];
ARC_NA(0.00)[];
RCVD_VIA_SMTP_AUTH(0.00)[];
RCPT_COUNT_TWELVE(0.00)[15];
MIME_TRACE(0.00)[0:+];
RCVD_TLS_ALL(0.00)[];
FUZZY_BLOCKED(0.00)[rspamd.com];
TO_DN_SOME(0.00)[];
SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from];
FROM_EQ_ENVFROM(0.00)[];
FROM_HAS_DN(0.00)[];
MID_RHS_MATCH_FROM(0.00)[];
RCVD_COUNT_TWO(0.00)[2];
TO_MATCH_ENVRCPT_ALL(0.00)[];
DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo,suse.cz:dkim,suse.cz:mid];
DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519];
DKIM_TRACE(0.00)[suse.cz:+]
X-Spam-Score: -4.51
X-Spam-Level:
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 6/4/25 16:16, Baolin Wang wrote:
# Get the PIDs of stress-ng processes
PIDS=$(pgrep stress-ng)
# Loop through each PID and monitor /proc/[pid]/status
for PID in $PIDS; do
while true; do
cat /proc/$PID/status
usleep 100000
Hm but this limits the reading to 10 per second? If we want to simulate an
adversary process, it should be without the sleeps I think?
OK. I drop the usleep, and I still can not see obvious impact.
Thanks, that's reassuring.
w/o patch:
stress-ng: info: [6848] 4,399,219,085,152 CPU Cycles
67.327 B/sec
stress-ng: info: [6848] 1,616,524,844,832 Instructions
24.740 B/sec (0.367 instr. per cycle)
stress-ng: info: [6848] 39,529,792 Page Faults Total
0.605 M/sec
stress-ng: info: [6848] 39,529,792 Page Faults Minor
0.605 M/sec
w/patch:
stress-ng: info: [2485] 4,462,440,381,856 CPU Cycles
68.382 B/sec
stress-ng: info: [2485] 1,615,101,503,296 Instructions
24.750 B/sec (0.362 instr. per cycle)
stress-ng: info: [2485] 39,439,232 Page Faults Total
0.604 M/sec
stress-ng: info: [2485] 39,439,232 Page Faults Minor
0.604 M/sec
Return-Path: <linux-kernel+bounces-673351-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id AF4DB41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:29:59 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 90A77189A0D6
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:30:12 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 9E23128FFF7;
Wed, 4 Jun 2025 14:29:51 +0000 (UTC)
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3979438384
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:29:50 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749047391; cv=none; b=CWzyy5A/yfXrFsbNmHr4qa8+NwRs6K0GWw2TMtIj1cVQ2yVBnNWFDP6J1/oL2rWQ0bFz3FxB5qyafc4jQj5KUXxkYtfxL4CK6Hq/WttedcQteY3BopZ9Czf3ujKHO92972muLVgns3yBUGg7spNjyyLLJuPqZDwdcmzPn2D/XAg=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749047391; c=relaxed/simple;
bh=B6OpX1d9C5FQH9QBXEjnvZ/p0W1fYsSZa9lHLO12kKU=;
h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References:
MIME-Version:Content-Type; b=At2isJLUHuJ5lnEXk1zUoxMrOtsLJcVN7EjnP0kZemZ7CxF3kz9xabpdfu/Lr3i6KEAIYYyboW/xyTQTpqQR4eQNGDmTPKZ8+GV5ZEfSiBXU7ZvT2Cv19UxfEFofx5y5dOi7Zy9x9ckEE1XpexMZrkdwhb8UfWSiMg13LPh+5f8=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id C7E42C4CEE4;
Wed, 4 Jun 2025 14:29:49 +0000 (UTC)
Date: Wed, 4 Jun 2025 10:31:06 -0400
From: Steven Rostedt <rostedt@xxxxxxxxxxx>
To: Prakash Sangappa <prakash.sangappa@xxxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx, peterz@xxxxxxxxxxxxx,
mathieu.desnoyers@xxxxxxxxxxxx, tglx@xxxxxxxxxxxxx, bigeasy@xxxxxxxxxxxxx,
kprateek.nayak@xxxxxxx, vineethr@xxxxxxxxxxxxx
Subject: Re: [PATCH V5 1/6] Sched: Scheduler time slice extension
Message-ID: <20250604103106.1465f847@xxxxxxxxxxxxxxxxxx>
In-Reply-To: <20250603233654.1838967-2-prakash.sangappa@xxxxxxxxxx>
References: <20250603233654.1838967-1-prakash.sangappa@xxxxxxxxxx>
<20250603233654.1838967-2-prakash.sangappa@xxxxxxxxxx>
X-Mailer: Claws Mail 3.20.0git84 (GTK+ 2.24.33; x86_64-pc-linux-gnu)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Tue, 3 Jun 2025 23:36:49 +0000
Prakash Sangappa <prakash.sangappa@xxxxxxxxxx> wrote:
@@ -2249,6 +2251,20 @@ static inline bool owner_on_cpu(struct task_struct *owner)
unsigned long sched_cpu_util(int cpu);
#endif /* CONFIG_SMP */
+#ifdef CONFIG_RSEQ
+
+extern bool rseq_delay_resched(void);
+extern void rseq_delay_resched_fini(void);
+extern void rseq_delay_resched_tick(void);
+
+#else
+
+static inline bool rseq_delay_resched(void) { return false; }
+static inline void rseq_delay_resched_fini(void) { }
+static inline void rseq_delay_resched_tick(void) { }
+
+#endif
+
Can we add a config to make this optional. I don't want to allow any task
to have an extended timeslice over RT tasks regardless of how small the
delay is.
-- Steve
Return-Path: <linux-kernel+bounces-673352-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 7610041E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:30:09 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id C6AD93A7C2B
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:29:46 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 53571290095;
Wed, 4 Jun 2025 14:29:59 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="3b036G6K"
Received: from mail-qt1-f181.google.com (mail-qt1-f181.google.com [209.85.160.181])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1ED0D38384
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:29:56 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.181
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749047398; cv=none; b=c5yVn6iF4dihFCfsj5UYQMgxhIVP42C16qjGjn8KqP82fImfbifiW93okusfHSbq7y/D4fMReZltEGkzmSTAXSoWvJLq1CiqqfPdgN2dNHifwcVgW4MedqIrBy12hccqaNomY+qwPTIlVoh+KCH9VSLBJ9UvwdalBVLtlFDkyhQ=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749047398; c=relaxed/simple;
bh=qp7aYlF0MV91SCClGl2CM8m+7fsdEEm/fOdBZkN/thg=;
h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
To:Cc:Content-Type; b=bZe0IfyZIn7Vh1k9Ty6VNXVVsntRZyAxSxd63CEp4YpAfCDLRfIDVVt+wxWAd+qveko31RwC0SrHFxL9xDg5dQFHeRZPNfCwP88BkcvxAZwLCo5wivwAv2ZATiAAFrgu1ZiD8kt//ceIVQNLO+Be1SOeyd32RNSWRjESSeGtaX4=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=3b036G6K; arc=none smtp.client-ip=209.85.160.181
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com
Received: by mail-qt1-f181.google.com with SMTP id d75a77b69052e-4a5ac8fae12so107461cf.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 07:29:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=google.com; s=20230601; t=1749047396; x=1749652196; darn=vger.kernel.org;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:from:to:cc:subject:date
:message-id:reply-to;
bh=qp7aYlF0MV91SCClGl2CM8m+7fsdEEm/fOdBZkN/thg=;
b=3b036G6KI9RO/p5MsY2yBKie3mkLkjXiqHE0YX+g9Ve8W2y7YF89qLAY271uyEbh7j
RnCuzTDEa1tIzXwRShETK25wHASDFcm687JIkcqPi4+KH/8Viynty/lxwd47mTagfU9E
xnSonEayAg4bmoAxqjLzw8PZEwdRymlNFBEcykDOS/MK9OmTEb1U6eJ6TeiW/fS5db+i
YfeGRJPlDS5AS9Q1LhzvB1LHz/VJOPQXmHtiGy5FQgXE8+LKa8LdbT8hUQ8+I9Z84sIg
+exsQtHI68vhatesoa2s7h5P4Gg1hk1lasX9B5aoWvYlC9kncs03EYm46FCxfwPvanv/
beQA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749047396; x=1749652196;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=qp7aYlF0MV91SCClGl2CM8m+7fsdEEm/fOdBZkN/thg=;
b=cx4biVszAJ4Ub2WqUWdUYqfTGb2Ma7Jgup+uoW12hB8x0Ml1B838nhXlL4cS3cW4Zt
HNI0G84P2IKfVzVnRiJQONmJH194lIkPDrIQab6oxj0Ce9YPZDTHrWsx2REIbnzKlKxJ
chPlUo7okX+SFJYvD4uM9QALnFfIDje/tZkA+Fsw09sjoHP7Thola0JylrnvznOr+egM
/KFmWrakl5bG5Ev7bVl04Z3YLt53qtkVFlZvbJiR7ilNsYLzjfKlXBf4MD1SP2hDxelr
yivKwm8BBqljP41FtokOsVBl+nAuz8jwWT3Vgipjt1BVUxWaCk9ys0pZfP4QAqPukUaR
485g==
X-Forwarded-Encrypted: i=1; AJvYcCV+/4+KWsuue7FJu/z/8Md2DLYZZo5zg8U/aPKo3L6GIBIKn+w4kVV//xer1Wg7aojYwr1b1xMykevObtc=@vger.kernel.org
X-Gm-Message-State: AOJu0YxSo9P6s6GzPQpvVCtX4vpMS29v5eusDnqq5cmXOIX0zkgXoSxH
rDybk1um7T7Akor4QYINolzwJJyqcxtBsXAHD7xccC7YX2SdU7wEGqUbGTOb5OIJVMP//r6n3r/
GsTyDlouchdqV8pZ+ZX0t+y2rlk2oE2Itwnmut1vM
X-Gm-Gg: ASbGncsiJ7zgRZUpVzMhN/Vhpq2qU9PLpkrIZ+3I/+X13D4f0qLcRzwO7vbBpdLHxCY
7rl0Dzy0sYUUgdnxorb1pafy1E3dZ8tDlRNITiRFmOwC3aAiw+GBz0fwxhXvW/nBDa3cH3kv75h
/xsWoiroah0GYeZxE1UTYKh3kF2Fdo48td5/bWAeVUh3vh39p/dQo2R++94G+omLInN48OzUIR
X-Google-Smtp-Source: AGHT+IH7QU9THUOIJXkcFhhyY5pE8ZZNfgzXLg84Ex5Q6A11Vwd6k1wi1S4TyvhsAwEvthJSpcOZcMrWncOSW4BQnNI=
X-Received: by 2002:a05:622a:2284:b0:4a5:9b0f:9a54 with SMTP id
d75a77b69052e-4a5a52d361amr4019381cf.18.1749047395522; Wed, 04 Jun 2025
07:29:55 -0700 (PDT)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
References: <68387feb.a70a0220.29d4a0.0830.GAE@xxxxxxxxxx> <f03916ab-19fc-4832-b564-58d3c885011d@xxxxxxx>
<84qzzzoqkw.fsf@xxxxxxxxxxxxxxxxxxxxx>
In-Reply-To: <84qzzzoqkw.fsf@xxxxxxxxxxxxxxxxxxxxx>
From: Suren Baghdasaryan <surenb@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 07:29:44 -0700
X-Gm-Features: AX0GCFsIVzK9pgbt2dn3Cpgu7lCKSaLlimWGtVShPPXekcZUBUaMMXaeZ1lEQN8
Message-ID: <CAJuCfpEbRJ7vrptiC_NxSO_4U=mShZoiN+LdX8j5=rPux4cgdQ@xxxxxxxxxxxxxx>
Subject: Re: [syzbot] [mm?] possible deadlock in __vma_start_write
To: John Ogness <john.ogness@xxxxxxxxxxxxx>
Cc: Vlastimil Babka <vbabka@xxxxxxx>,
syzbot <syzbot+23de6daeb71241d36a18@xxxxxxxxxxxxxxxxxxxxxxxxx>,
Liam.Howlett@xxxxxxxxxx, akpm@xxxxxxxxxxxxxxxxxxxx, jannh@xxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx, lorenzo.stoakes@xxxxxxxxxx,
pfalcato@xxxxxxx, syzkaller-bugs@xxxxxxxxxxxxxxxx,
Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Petr Mladek <pmladek@xxxxxxxx>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-11.0 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 4, 2025 at 1:31=E2=80=AFAM John Ogness <john.ogness@linutronix.=
de> wrote:
On 2025-06-04, Vlastimil Babka <vbabka@xxxxxxx> wrote:
> After consulting PeterZ on IRC, he said:
>
>> so the thing complains about: vmlock <- mapping.invalidate_lock <- bca=
chefs_btree <- console_lock <- &helper->lock <- dev->mode_config.idr_mutex =
<- mm->mmap_lock <- vmlock
>
> so bcachefs is doing printk which wants console_lock, and in
> drm console a possible lock chain exists that can lead to mmap lock
>
> To me it seems all rather theoretical, but not sure where and how we co=
uld safely
> break this chain.
> Hopefully one day console_lock goes away? :)
It is a known problem that any caller holding a lock used by a
registered legacy console will result in printk() deadlocking. This is
particularly a problem with the port->lock and power management.
One workaround is to enable CONFIG_PREEMPT_RT. ;-)
A year ago (exactly) there was patch [0] providing a "threadprintk" boot
argument that would also work around this problem.
However, the only real solution is to convert the legacy consoles to
nbcon. This is work in progress.
Thanks for additional info, folks! I'll look into it some more to see
if the chain can be broken somehow but most likely will have to live
with it for now.
Cheers,
Suren.
John
[0] https://lore.kernel.org/lkml/20240603232453.33992-17-john.ogness@linu=
tronix.de
Return-Path: <linux-kernel+bounces-673353-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 2B07C41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:31:03 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id C72CA175D11
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:31:03 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 4859928F505;
Wed, 4 Jun 2025 14:30:56 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="Wd+QjN0T"
Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id C7464BE67
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:30:53 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.158.5
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749047455; cv=none; b=kMzmaJLZlhYUISFRd3fS+wQ/dF67QAyP11wzsMPng9xABQKxhQpWAJJ/HCz7mqEPPQ8GNfOi4kmo1GfNah3CJw9BR77aS+D7dja/Qkjf1m9R811yuEH7EJfat0gZ/BN+tJBofbvYgSEoH5D444gVPuZF4S09nBL8HRyxQqoMnCc=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749047455; c=relaxed/simple;
bh=5JB+GYJIDPXn9o6tcyZZmI0bJQETRfFPrn1mq4SbOr4=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=gZnmWLJEDLybI2NjiF3wif8A7oJ/IQpMcy1l4ulj9AodGrXwPzlRmGUg7V1S8gi5gQRT3ibJdwaEEgIMIW3MErIR4jHSA2I8LkXP/k1LRZQNkC0sI208gZAEZ+D3rKqyOWXty4wjPxOvlDI1ki7OKlCGynlzcsWVie5TW+DSVJc=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=Wd+QjN0T; arc=none smtp.client-ip=148.163.158.5
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com
Received: from pps.filterd (m0356516.ppops.net [127.0.0.1])
by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 554DCawf032172;
Wed, 4 Jun 2025 13:17:12 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc
:content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=pp1; bh=AyofCP
+ZN+6ircaf7mXhdeuKJnDTj+s9f0clMqZxlXs=; b=Wd+QjN0T53cJ5UBS0BP1xh
UoNltEcgex7nx4RL2dI/9ob1j+9I0sh8lGb06Z8yDECNrMDf1LZWEPMwMv6I8s5j
IcNdrV/mfCpCobGpLaKXpuAyhzs3gga7PjSFbyY7C+OBpr6RSVsBGJ6PegI0tRjD
lm0JhgdAQFrFiZhLqssqlyD53tZa1D9qQZBVRqkatFL6+hiF0T8PwA4u+tx31VC1
buUgd7LyC28IYlSDhDoqBHJvUXnJf8cHwtRBUch7NcdoZ0YMNu+awjzOxrfpk6nm
WvELcIcPxBe6adYvR3VwJBbi5Lppb+StgHvIFoYyGY3X0WVB02NDLSrsBnl9r75A
==
Received: from pps.reinject (localhost [127.0.0.1])
by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 471geytmnc-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 13:17:11 +0000 (GMT)
Received: from m0356516.ppops.net (m0356516.ppops.net [127.0.0.1])
by pps.reinject (8.18.0.8/8.18.0.8) with ESMTP id 554CxI1B029221;
Wed, 4 Jun 2025 13:17:11 GMT
Received: from ppma22.wdc07v.mail.ibm.com (5c.69.3da9.ip4.static.sl-reverse.com [169.61.105.92])
by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 471geytmna-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 13:17:11 +0000 (GMT)
Received: from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1])
by ppma22.wdc07v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 554BoRl0031650;
Wed, 4 Jun 2025 13:17:10 GMT
Received: from smtprelay02.wdc07v.mail.ibm.com ([172.16.1.69])
by ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 470cfyyymw-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 13:17:10 +0000
Received: from smtpav05.dal12v.mail.ibm.com (smtpav05.dal12v.mail.ibm.com [10.241.53.104])
by smtprelay02.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 554DH8MM25297572
(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 4 Jun 2025 13:17:09 GMT
Received: from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1])
by IMSVA (Postfix) with ESMTP id AD4BB58067;
Wed, 4 Jun 2025 13:17:08 +0000 (GMT)
Received: from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1])
by IMSVA (Postfix) with ESMTP id EF0ED5805D;
Wed, 4 Jun 2025 13:17:02 +0000 (GMT)
Received: from [9.39.21.166] (unknown [9.39.21.166])
by smtpav05.dal12v.mail.ibm.com (Postfix) with ESMTP;
Wed, 4 Jun 2025 13:17:02 +0000 (GMT)
Message-ID: <9f7ae0e6-4640-418d-a4db-dba594377ac2@xxxxxxxxxxxxx>
Date: Wed, 4 Jun 2025 18:47:01 +0530
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v7 1/5] drivers/base/node: Optimize memory block
registration to reduce boot time
To: David Hildenbrand <david@xxxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Mike Rapoport <rppt@xxxxxxxxxx>, Oscar Salvador <osalvador@xxxxxxx>,
Zi Yan <ziy@xxxxxxxxxx>,
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>,
Ritesh Harjani <ritesh.list@xxxxxxxxx>, linux-mm@xxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, "Rafael J . Wysocki" <rafael@xxxxxxxxxx>,
Danilo Krummrich <dakr@xxxxxxxxxx>,
Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>,
Alison Schofield <alison.schofield@xxxxxxxxx>,
Yury Norov <yury.norov@xxxxxxxxx>, Dave Jiang <dave.jiang@xxxxxxxxx>,
Madhavan Srinivasan <maddy@xxxxxxxxxxxxx>,
Nilay Shroff
<nilay@xxxxxxxxxxxxx>, linuxppc-dev@xxxxxxxxxxxxxxxx
References: <2a0a05c2dffc62a742bf1dd030098be4ce99be28.1748452241.git.donettom@xxxxxxxxxxxxx>
<20250603200729.b7581e017e4ca63f502c795e@xxxxxxxxxxxxxxxxxxxx>
<b355e72d-0284-4a31-84e3-ae4a79ad922f@xxxxxxxxxx>
Content-Language: en-US
From: Donet Tom <donettom@xxxxxxxxxxxxx>
In-Reply-To: <b355e72d-0284-4a31-84e3-ae4a79ad922f@xxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-TM-AS-GCONF: 00
X-Proofpoint-GUID: 4FsplurUS7c-nNdN0AmIoqUxedlpBq1v
X-Proofpoint-ORIG-GUID: cm-Oc-tEKoBA3qeJIzbOxbnJXz9fYfvv
X-Authority-Analysis: v=2.4 cv=X4dSKHTe c=1 sm=1 tr=0 ts=68404757 cx=c_pps a=5BHTudwdYE3Te8bg5FgnPg==:117 a=5BHTudwdYE3Te8bg5FgnPg==:17 a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10 a=VnNF1IyMAAAA:8 a=k8bw5oIpvhWMPjh-KD8A:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDA5OSBTYWx0ZWRfXwW6CTbwXdFug zCXnZycTe/FqRgU6/7hAGmicwbUedmIIArWprAYdtHHYFavfFa4G+KxKc+VYO1pl6alcHRcrnEf xtqqWsw7o4wouJXJZzoiVu80TLtzFLtJwUNLpc6hsMSpgi2KAPuhJs5p3mGD9U84OeoklTUc5sn
PO0Oz36/aec/Qkgp/dwSynzy9BzkcF+qgNlnrvE9Xo4/YUm9T/pCxhQS/mkX2twpZ2oBIWO+y4E fLsZmb8Hm2OFz2Owb8eVOZs0ET6iz52pippiIXA9bORtj7zfZU5Vif2yLNxoL/mevj+FhZvouV4 jeOJ8otynWo0iTOxhMKjLDCuX5C0uN78khP7zH28mqiv/t1+dsNkBy3020SYjol1DSCiNLzXe9j
DxyfRX481RrnuSrz9kupxaY++cA4LzgAC6gDwjUeAhnBviMJhEI4V4hGPkwPy4jkwFCF2rTS
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0
priorityscore=1501 lowpriorityscore=0 mlxscore=0 impostorscore=0
mlxlogscore=999 adultscore=0 clxscore=1015 phishscore=0 bulkscore=0
malwarescore=0 spamscore=0 classifier=spam authscore=0 authtc=n/a authcc=
route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000
definitions=main-2506040099
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 6/4/25 3:15 PM, David Hildenbrand wrote:
On 04.06.25 05:07, Andrew Morton wrote:
On Wed, 28 May 2025 12:18:00 -0500 Donet Tom <donettom@xxxxxxxxxxxxx>
wrote:
During node device initialization, `memory blocks` are registered under
each NUMA node. The `memory blocks` to be registered are identified
using
the node’s start and end PFNs, which are obtained from the node's
pg_data
It's quite unconventional to omit the [0/N] changelog. This omission
somewhat messed up my processes so I added a one-liner to this.
Yeah, I was assuming that I simply did not get cc'ed on the cover
letter, but there is actually none.
Donet please add that in the future. git can do this using
--cover-letter.
Sure,
I will add cover letter in next revision.
...
Test Results on My system with 32TB RAM
=======================================
1. Boot time with CONFIG_DEFERRED_STRUCT_PAGE_INIT enabled.
Without this patch
------------------
Startup finished in 1min 16.528s (kernel)
With this patch
---------------
Startup finished in 17.236s (kernel) - 78% Improvement
Well someone is in for a nice surprise.
2. Boot time with CONFIG_DEFERRED_STRUCT_PAGE_INIT disabled.
Without this patch
------------------
Startup finished in 28.320s (kernel)
what. CONFIG_DEFERRED_STRUCT_PAGE_INIT is supposed to make bootup
faster.
Right, that's weird. Especially that it is still slower after these
changes.
CONFIG_DEFERRED_STRUCT_PAGE_INIT should be initializing in parallel
which ... should be faster.
@Donet, how many CPUs and nodes does your system have? Can you
identify what is taking longer than without
CONFIG_DEFERRED_STRUCT_PAGE_INIT?
My system has,
CPU - 1528
Node - 16
Memory - 31TB
I ran the same test with and without CONFIG_DEFERRED_STRUCT_PAGE_INIT,
and the boot time was consistently higher with
CONFIG_DEFERRED_STRUCT_PAGE_INIT enabled.
I'm still investigating this. I'll check further and get back to you.
CONFIG_DEFERRED_STRUCT_PAGE_INIT enabled
----------------------------------------------------------------------
1. Startup finished in 12.959s (kernel)
2. Startup finished in 13.036s (kernel)
3. Startup finished in 12.944s (kernel)
CONFIG_DEFERRED_STRUCT_PAGE_INIT disabled
-----------------------------------------------------------------------
1. Startup finished in 12.234s (kernel)
2. Startup finished in 12.287s (kernel)
3. Startup finished in 12.230s (kernel)
Thanks
Donet
Return-Path: <linux-kernel+bounces-673354-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id AB02641E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:31:18 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 42E5D189A109
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:31:31 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id AFEA0BE67;
Wed, 4 Jun 2025 14:31:09 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=xry111.site header.i=@xry111.site header.b="R+xeHyZt"
Received: from xry111.site (xry111.site [89.208.246.23])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 862A2226863;
Wed, 4 Jun 2025 14:31:07 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=89.208.246.23
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749047469; cv=none; b=V267i9as7ub9LUQaUoLx9qh/CYqIm6dvkjjpg4S5HNiTdl0yN3+aqi434kEbmaTT5Gmjn0JFqrLL0RkZ50lDKe+KXo5MQcqGUsbs9BT5rRwHD7+dKOUrsKGW4SA3Z6BfUtYpztnsZpiv/GcU4VDHREgeyAlTPnK8H4YZiEWfY8M=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749047469; c=relaxed/simple;
bh=szGzg1VWdLNaQhzap8mRj1Cx9myok4IZd5/gZyF9eLY=;
h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References:
Content-Type:MIME-Version; b=czIUJzm5oBDF39E5vHrxhknAN0lbGz8cnTS/Y6OMvyJkZ/Xtg4xPDUtDrDmF/5p2qQzGZjDko9988tobkeEp8KdxNQnROozl+uQFt/BJIC+HDDPNJMWxpne+KyD1M5J1f3dNWdx1aQCLQlefcP+oPiU+uXGj9cbhM5bLQ0NSpqY=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=xry111.site; spf=pass smtp.mailfrom=xry111.site; dkim=pass (1024-bit key) header.d=xry111.site header.i=@xry111.site header.b=R+xeHyZt; arc=none smtp.client-ip=89.208.246.23
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=xry111.site
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=xry111.site
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xry111.site;
s=default; t=1749047460;
bh=BN1yZiR+/rn2XlLp429yT8gjgjOJLYeI4IJXSvPwvg0=;
h=Subject:From:To:Cc:Date:In-Reply-To:References:From;
b=R+xeHyZtmJ35nzniBZYxy1o5fen5ftCDTSL9p2CTl2fdc3BAmsCAoF+KqluKg1g0g
8mqtABzO3jFZwy1KO7ys+jf8BWDX2uYWUYsv6VuITEtHUm/mznuL383T01T2e44pHY
SJLxYop6m+LUrn4tGhxE/B1o9x68EgAPA/GHWxJg=
Received: from [127.0.0.1] (unknown [IPv6:2001:470:683e::1])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange ECDHE (prime256v1) server-signature ECDSA (secp384r1) server-digest SHA384)
(Client did not present a certificate)
(Authenticated sender: xry111@xxxxxxxxxxx)
by xry111.site (Postfix) with ESMTPSA id AA7A865F62;
Wed, 4 Jun 2025 10:30:57 -0400 (EDT)
Message-ID: <5a5329feaab84acb91bbb4f48ea548b3fb4eab0f.camel@xxxxxxxxxxx>
Subject: Re: [PATCH] LoongArch: vDSO: correctly use asm parameters in
syscall wrappers
From: Xi Ruoyao <xry111@xxxxxxxxxxx>
To: Huacai Chen <chenhuacai@xxxxxxxxxx>, Thomas =?ISO-8859-1?Q?Wei=DFschuh?=
<thomas.weissschuh@xxxxxxxxxxxxx>
Cc: WANG Xuerui <kernel@xxxxxxxxxx>, Theodore Ts'o <tytso@xxxxxxx>, "Jason
A. Donenfeld" <Jason@xxxxxxxxx>, Nathan Chancellor <nathan@xxxxxxxxxx>,
Nick Desaulniers <nick.desaulniers+lkml@xxxxxxxxx>, Bill Wendling
<morbo@xxxxxxxxxx>, Justin Stitt <justinstitt@xxxxxxxxxx>, Jiaxun Yang
<jiaxun.yang@xxxxxxxxxxx>, loongarch@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, llvm@xxxxxxxxxxxxxxx, stable@xxxxxxxxxxxxxxx
Date: Wed, 04 Jun 2025 22:30:55 +0800
In-Reply-To: <CAAhV-H4Ba7DMV6AvGnvNBJ8FL_YcHjeeHYZWw2NG6JHL=X4PkQ@xxxxxxxxxxxxxx>
References:
<20250603-loongarch-vdso-syscall-v1-1-6d12d6dfbdd0@xxxxxxxxxxxxx>
<CAAhV-H4Ba7DMV6AvGnvNBJ8FL_YcHjeeHYZWw2NG6JHL=X4PkQ@xxxxxxxxxxxxxx>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
User-Agent: Evolution 3.56.2
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, 2025-06-04 at 22:05 +0800, Huacai Chen wrote:
On Tue, Jun 3, 2025 at 7:49=E2=80=AFPM Thomas Wei=C3=9Fschuh
<thomas.weissschuh@xxxxxxxxxxxxx> wrote:
>=20
> The syscall wrappers use the "a0" register for two different register
> variables, both the first argument and the return value. The "ret"
> variable is used as both input and output while the argument register i=
s
> only used as input. Clang treats the conflicting input parameters as
> undefined behaviour and optimizes away the argument assignment.
>=20
> The code seems to work by chance for the most part today but that may
> change in the future. Specifically clock_gettime_fallback() fails with
> clockids from 16 to 23, as implemented by the upcoming auxiliary clocks=
.
>=20
> Switch the "ret" register variable to a pure output, similar to the oth=
er
> architectures' vDSO code. This works in both clang and GCC.
Hmmm, at first the constraint is "=3Dr", during the progress of
upstream, Xuerui suggested me to use "+r" instead [1].
[1]=C2=A0 https://lore.kernel.org/linux-arch/5b14144a-9725-41db-7179-c059=
c41814cf@xxxxxxxxxx/
Based on the example at
https://gcc.gnu.org/onlinedocs/gcc/Local-Register-Variables.html:
To force an operand into a register, create a local variable and specify
the register name after the variable=E2=80=99s declaration. Then use the=
local
variable for the asm operand and specify any constraint letter that
matches the register:
=20
register int *p1 asm ("r0") =3D =E2=80=A6;
register int *p2 asm ("r1") =3D =E2=80=A6;
register int *result asm ("r0");
asm ("sysint" : "=3Dr" (result) : "0" (p1), "r" (p2));
=20
I think this should actually be written
asm volatile(
" syscall 0\n"
: "=3Dr" (ret)
: "r" (nr), "0" (buffer), "r" (len), "r" (flags)
: "$t0", "$t1", "$t2", "$t3", "$t4", "$t5", "$t6", "$t7",
"$t8",
"memory");
i.e. "=3D" should be used for the output operand 0, and "0" should be used
for the input operand 2 (buffer) to emphasis the same register as
operand 0 is used.
--=20
Xi Ruoyao <xry111@xxxxxxxxxxx>
School of Aerospace Science and Technology, Xidian University
Return-Path: <linux-kernel+bounces-673355-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id DE0B441E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:32:26 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 88B7C189A8FB
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:32:39 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id A3300290D92;
Wed, 4 Jun 2025 14:32:10 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="o3VoA2AT"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id DC58528ECED;
Wed, 4 Jun 2025 14:32:09 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749047530; cv=none; b=CXACZVTAW3DnK9a4YY0TFOCaaPG58C2QfZnC0aoW2mxtZNMDYjsCPmESL4xDtdo9DgaaS4eRUBhTxj4dFmQzjwTFtqI+iutStBX+BBXhY0uo7McMOlHEBu1n+VE0dLbAUyKWTJEIic77xYP2cKP0DAxv/LOQ+J0GPejlvgzBJrs=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749047530; c=relaxed/simple;
bh=PNnRD6gL8fWk7hdZqeCrnED11vXVXXttbbydPicR/PM=;
h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type:
Content-Disposition:In-Reply-To; b=lZfXEThTx93Rm5hpkE1tLgH+0F/I/ghVziaQYFVWYa3GfWFpz9Gc4eA6CNFIOs/RrJZvm4/EyjZ5zWn5CU5iE46PNOs/W9y5nZGctY/YGBmZN9JTMH1QNa32rfpVB1AY3Tulgh8ixRyCMXdGyxjFgKvWRvvXh6KMzJdWeP4NZSY=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=o3VoA2AT; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3395CC4CEE4;
Wed, 4 Jun 2025 14:32:09 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749047529;
bh=PNnRD6gL8fWk7hdZqeCrnED11vXVXXttbbydPicR/PM=;
h=Date:From:To:Cc:Subject:In-Reply-To:From;
b=o3VoA2ATNbG2J0YJpoV5J5NM4BpCueexbKJIWoR8KiEJM7aVioU3wmaXYivuILtR4
dgEE+EKTwE6RMCP5EDTOQM7Q4qy+i/p2C7NYhwfhPm3JaCnGxjQIWefxrApJb/OT5Z
jdx9pbtbzUPObeHTQbu9QJwDwQb9bo1w1zokVw1kik00JWwi34Uhc7Qy59QNfCCURf
WPRsPKMoPvVrbW7lXn6WJ0lZrd3e9yvuNRBDxPRCs2oLwTf/UolMEzpsepEQ2Ou4Le
Cgd7G2y0J9SH09R/85YQ+FHlKFpEmMfm7bw4q3ije6KETz5jirXZDT6TrmLtdU3s+O
6MmHKHS51+/rQ==
Date: Wed, 4 Jun 2025 09:32:07 -0500
From: Bjorn Helgaas <helgaas@xxxxxxxxxx>
To: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
Cc: bhelgaas@xxxxxxxxxx, linux-pci@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-arm-msm@xxxxxxxxxxxxxxx
Subject: Re: [PATCH 0/2] Update my e-mail address
Message-ID: <20250604143207.GA516466@bhelgaas>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20250604120833.32791-1-manivannan.sadhasivam@xxxxxxxxxx>
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 05:38:29PM +0530, Manivannan Sadhasivam wrote:
Hi,
My Linaro e-mail is going to bounce soon. So update the MAINTAINERS file to use
my kernel.org alias and also add a mailmap entry to map the Linaro email to the
same.
@Bjorn H: Could you please merge this series via PCI tree?
- Mani
Manivannan Sadhasivam (2):
MAINTAINERS: Update the e-mail address of Manivannan Sadhasivam
mailmap: Add a new entry for Manivannan Sadhasivam
.mailmap | 1 +
MAINTAINERS | 38 +++++++++++++++++++-------------------
2 files changed, 20 insertions(+), 19 deletions(-)
Squashed these together and applied to pci/misc for v6.16, thanks!
Return-Path: <linux-kernel+bounces-673356-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 1A67641E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:32:37 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 478FD1769B4
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:32:38 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 6FAC128FFEF;
Wed, 4 Jun 2025 14:32:29 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="3K3twk9h"
Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2045.outbound.protection.outlook.com [40.107.93.45])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 04F55230981
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:32:26 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.93.45
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749047548; cv=fail; b=qOU/Fkztamk35zA2bBovp6ybLonWv7VU9U5vJ1EYHNXqdP0umu7Vp1BP8cus9VvYk+K/tKgb+N3w9Om7wmv4fT3PPOUQtEKiJr9KmeAQ1CTX2GkUUSBlDf1Ox66hVi5r+QJc1UDFdyw0xe8IXjA8+XYoswiFQUAOgHvP4D2tzGE=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749047548; c=relaxed/simple;
bh=JV2feDKWJ4Hwsa7xrjrVWKWulAycXdXaQWBu/NofZ1k=;
h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=axcJMAXGdSxVklvnbFzrE7/fGZDNc6X7fo1R14QEHgmo6l8bfeQrLsUv1LAYajhxvQWewZrLrCnFJIr65+/3/vUHUT4cnN+mErgnIyoWz/iKkNhxeHjnFn4CkaWkVbL8zNMGPlN3PGatPsu0h06pmQ0v66KHfH29LyjbJ5IAoy4=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=3K3twk9h; arc=fail smtp.client-ip=40.107.93.45
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com
Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=FEs/VBJWjjq85BoQQKmdLVfm3ep7wwHf6gn4xv8rkSByA6VO1W4QISiDzWnmZlvz+DoKmWG25NE8VyDo0RavKSLXzPmx0ac2kGtXWrgGLvkAZOMDlOwLYPl7Bu16tO2K3z/4cyWCsO5etKl+xOFbxT3fdL60DtzocAvoCdYt7XghXXwC7x1jyRI7GfyQg9Yu2nehcKT45Y7BzPuzhFnB8tGRbSJSWQa2xX6m85x2auJ+kRyQ3tO3CoSsk6wio5M2S4uL77pLYkqJlO2q83Tf7vcGoYySt81lBZxyT54V4JOlDtlgtwuhEmnngvXCewT0rVrIiE+g0bOFbUiIZLjYTA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=XwTv8N82AvUkSYX0xV9XRe9T4d+L881V6ENelqHUczk=;
b=KwqJDjWbdw78LvYd7xnMX7Wn2lN1noa/brAtIwvfynLgypzAijrgVkIBcWvjG0HDgSxyWfOMi4jW8BbL1a4sPRPjiOS9DhgKf1is78DHB37MVkHlxBpX1J3YKKWhMnSGQurk/gYb/dHRTvsYvfCWSdEO9mAMffrCF2qXqSB8AD24bv/f93ok37t4PKoNQa/zya6fgT/aI0YTch7y5Oyqqbem8InQ5lMmWbX4FMhGH8d6DIOPvFQzG68j2ZsjYfJKkWtS8c2xnvMrHTqvou7tU+P7T+LTT2AmgIMT8xYopNTSbm1BU7RrZfhemvXPgAAgbpNSd8GeFjmPgteDfA6oTQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is
165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass
(p=quarantine sp=quarantine pct=100) action=none header.from=amd.com;
dkim=none (message not signed); arc=none (0)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=XwTv8N82AvUkSYX0xV9XRe9T4d+L881V6ENelqHUczk=;
b=3K3twk9hrG02ebJr5qHLuV/k+wz7NWsbEWdF+sZqUmqW75xx3pTHvl4gP0KRE0wBwWQ8UF0Cf67+95GGKuVrRcUwt10bXmRmD65HJHR6yIw/JzU0Q0wf/m+4eJeQ44raaaDILsvk1Xy31boXPrtSqv4P1OfdTFYR4Py8++qmc1I=
Received: from CH0PR04CA0010.namprd04.prod.outlook.com (2603:10b6:610:76::15)
by DS7PR12MB8201.namprd12.prod.outlook.com (2603:10b6:8:ef::13) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8769.37; Wed, 4 Jun
2025 14:32:22 +0000
Received: from DS3PEPF0000C37E.namprd04.prod.outlook.com
(2603:10b6:610:76:cafe::cd) by CH0PR04CA0010.outlook.office365.com
(2603:10b6:610:76::15) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8746.31 via Frontend Transport; Wed,
4 Jun 2025 14:32:22 +0000
X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17)
smtp.mailfrom=amd.com; dkim=none (message not signed)
header.d=none;dmarc=pass action=none header.from=amd.com;
Received-SPF: Pass (protection.outlook.com: domain of amd.com designates
165.204.84.17 as permitted sender) receiver=protection.outlook.com;
client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C
Received: from SATLEXMB04.amd.com (165.204.84.17) by
DS3PEPF0000C37E.mail.protection.outlook.com (10.167.23.8) with Microsoft SMTP
Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
15.20.8792.29 via Frontend Transport; Wed, 4 Jun 2025 14:32:22 +0000
Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB04.amd.com
(10.181.40.145) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 4 Jun
2025 09:32:21 -0500
Received: from xsjlizhih51.xilinx.com (10.180.168.240) by SATLEXMB03.amd.com
(10.181.40.144) with Microsoft SMTP Server id 15.1.2507.39 via Frontend
Transport; Wed, 4 Jun 2025 09:32:20 -0500
From: Lizhi Hou <lizhi.hou@xxxxxxx>
To: <ogabbay@xxxxxxxxxx>, <quic_jhugo@xxxxxxxxxxx>,
<jacek.lawrynowicz@xxxxxxxxxxxxxxx>, <dri-devel@xxxxxxxxxxxxxxxxxxxxx>
CC: Lizhi Hou <lizhi.hou@xxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>,
<max.zhen@xxxxxxx>, <min.ma@xxxxxxx>, <sonal.santan@xxxxxxx>,
<mario.limonciello@xxxxxxx>
Subject: [PATCH V1] accel/amdxdna: Fix incorrect PSP firmware size
Date: Wed, 4 Jun 2025 07:32:17 -0700
Message-ID: <20250604143217.1386272-1-lizhi.hou@xxxxxxx>
X-Mailer: git-send-email 2.34.1
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain
Received-SPF: None (SATLEXMB04.amd.com: lizhi.hou@xxxxxxx does not designate
permitted sender hosts)
X-EOPAttributedMessage: 0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: DS3PEPF0000C37E:EE_|DS7PR12MB8201:EE_
X-MS-Office365-Filtering-Correlation-Id: e7ef541c-afaf-45ed-fd0b-08dda3749e63
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam:
BCL:0;ARA:13230040|82310400026|376014|1800799024|36860700013;
X-Microsoft-Antispam-Message-Info:
=?us-ascii?Q?rcPlUvdhRBsLbavW+YKp4A58YtNPCiY5yMmvIuEdNMRMyvLK60Vi9whquxI6?=
=?us-ascii?Q?flwkLZFRF1TiPigvJpkj0EdFsfX7JDbnCRzeiN4YkxME5X5tUxpYYw48I53Z?=
=?us-ascii?Q?BIb2yJqn+6Z2IsRI1Jfd/EieeMDWGoySxRFcAyxKvEQ6iZIEHomhgHVXiQpN?=
=?us-ascii?Q?mVZ9bVAXyCUeWdDjJvORFpKpmoz1UaaaXGSdlVNzzPs2gvC+7oOsk7fOYIzE?=
=?us-ascii?Q?VjkVaiKwPF+wb9+CrkYtfYEoEcalAX63qnOQeaSwaR+XnUe1EHcAbQsHNwG2?=
=?us-ascii?Q?CnDipjSZFqwNAJpk9XPah/jzmeCgbTEH8+MdeWj3MSPDaqKqXqAzZi7BJukS?=
=?us-ascii?Q?HvZMqMleTTF+h5o6SVnZjGpL2USAb/78h+RopQVeEVeRYxb9fA5HTzgbmhHw?=
=?us-ascii?Q?F9GjptA4HLBvQwgOvvYlaXxTzRL63xoNlHaZ0vzpW2stYH8yU+ANz6Ykvv62?=
=?us-ascii?Q?CeMYwuH1/tUytHWedxamV411BF6+2cs3DFQpxxJYZeAr3Z8hQxKXXivf846j?=
=?us-ascii?Q?TZC9udl222pRMYY0F/rBSYmzjUxSM+w2R3M69aWYWqbPFfS3mBUOH6Uyg+0I?=
=?us-ascii?Q?6kXCz+knDANGwWQnV/TBHbpzO/oA2z2TxEU97ICNw0BdFgCyWWRDA4LVYbge?=
=?us-ascii?Q?76SRYsagFgyRTgDuKSo64hBwpzDt7ZZ+LP0b4tshZb2ABkkqwywBhS3hsrN2?=
=?us-ascii?Q?wt2U24LCCnVPHz9hqmG61XlW26zFrl6AO99B9R52GmSdKJ45kUO2oCR8vw2T?=
=?us-ascii?Q?UEFozGEa7gWHoir6DCD0qPAE5GSVOf3HK8K1YB85QKMH8NQbEVGJTOdEHODC?=
=?us-ascii?Q?CU84MS/UN07NZs/GL9D5JDWy8O0xr1hz/Fh2HfB6wpynNLTlwU2HRR/YoA9R?=
=?us-ascii?Q?ha8Ly7U0ILOx7IPI0acEOlr0+LsOl+5b4VGs7UPiSQZZ0P+j+6JMCzD/2MUT?=
=?us-ascii?Q?pkOu1AwF76vjRNBenm6VhI+WpYICccZsb281bkIavQnf5+YO6v4U/4LulFa3?=
=?us-ascii?Q?Cf/PWt3nuVhEohcSud3dfKCyQeZNFlB+I5sinEsGcKhBVSNviGJApBmqMxVI?=
=?us-ascii?Q?dwgc123KnpgSaYD82PcKK9kPyBr3DiQW4Ee/hz4AOTNlwmUsm9VguHNe9Qau?=
=?us-ascii?Q?2ZLODrZQT4r96NNPh9cbxRYBVVeVaWNalpf/mchzBknPs9FZ5ugMndYJlFCQ?=
=?us-ascii?Q?vuJQT6RKgv8mnFXIJYf8hQ0F9U1RHRM6v2LafZLaXoyjSqU+OOGOgENuOYTN?=
=?us-ascii?Q?Oo4p1s6YdwuEkt0NBtJ5YOkddBbWuNQ/qYloHiB3fO76Y+Tq+/3cnqElbagB?=
=?us-ascii?Q?nQJ9TF402gALqJgHvvcQVEeG8gOFHlrVuMHotmigYDhbSUgBBuQuQ2jqEAud?=
=?us-ascii?Q?fyK9fPT3IZda18aayP0kN2wkVQRWvjC3mbM3n/Fdvd6D44clKTRjTzf2EPhf?=
=?us-ascii?Q?qup5aEZ/71DoUp34MiQYIZUDbFv0YFdL6xP/r2gZAZCkcFBpP+PNiEcjUM+y?=
=?us-ascii?Q?P5Cd6r5Xu2JQ1NgD6Y7Y0b71gSqhs1b8NqLw?=
X-Forefront-Antispam-Report:
CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(82310400026)(376014)(1800799024)(36860700013);DIR:OUT;SFP:1101;
X-OriginatorOrg: amd.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 14:32:22.4552
(UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: e7ef541c-afaf-45ed-fd0b-08dda3749e63
X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com]
X-MS-Exchange-CrossTenant-AuthSource:
DS3PEPF0000C37E.namprd04.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB8201
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
The incorrect PSP firmware size is used for initializing. It may
cause error for newer version firmware.
Fixes: 8c9ff1b181ba ("accel/amdxdna: Add a new driver for AMD AI Engine")
Signed-off-by: Lizhi Hou <lizhi.hou@xxxxxxx>
---
drivers/accel/amdxdna/aie2_psp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/accel/amdxdna/aie2_psp.c b/drivers/accel/amdxdna/aie2_psp.c
index dc3a072ce3b6..f28a060a8810 100644
--- a/drivers/accel/amdxdna/aie2_psp.c
+++ b/drivers/accel/amdxdna/aie2_psp.c
@@ -126,8 +126,8 @@ struct psp_device *aie2m_psp_create(struct drm_device *ddev, struct psp_config *
psp->ddev = ddev;
memcpy(psp->psp_regs, conf->psp_regs, sizeof(psp->psp_regs));
- psp->fw_buf_sz = ALIGN(conf->fw_size, PSP_FW_ALIGN) + PSP_FW_ALIGN;
- psp->fw_buffer = drmm_kmalloc(ddev, psp->fw_buf_sz, GFP_KERNEL);
+ psp->fw_buf_sz = ALIGN(conf->fw_size, PSP_FW_ALIGN);
+ psp->fw_buffer = drmm_kmalloc(ddev, psp->fw_buf_sz + PSP_FW_ALIGN, GFP_KERNEL);
if (!psp->fw_buffer) {
drm_err(ddev, "no memory for fw buffer");
return NULL;
--
2.34.1
Return-Path: <linux-kernel+bounces-673357-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 5F53041E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:32:52 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id CED4D7A757E
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:31:31 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id D5E6E290D9C;
Wed, 4 Jun 2025 14:32:34 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JWT3MXzV"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 26088230981
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:32:33 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749047554; cv=none; b=eo9ja6epAXxBBbKPVMIVAGa7tvaB/D5AlTSdAZ17MOW02NXzr+MgGGd9BCJ9hDruqLrVmCU2ISpuZ+P35jv4aCaLEhxz/eWemBZlb8LFfxC1TaIVn0MDf9xeFIFyoiQlcDaMmPP9LIj8Jf/0WYpB1DsiUlqXQtwW457ja4wlFuM=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749047554; c=relaxed/simple;
bh=+BmWJhOFbq1yXe1Nt/YU+m0g8RpyqPG0fIDFEzDZhBg=;
h=Content-Type:MIME-Version:Subject:From:Message-Id:Date:References:
In-Reply-To:To:Cc; b=eKp8g8Fx4ornVFPiSYacI1m/3bQz9QeD7wBkHvk/zb4srm8jZ5Zkun35bSGgOQQAByiN57sJGmPcsu3EsU9ToTRufFpwvuwOAMBd8H6xt9Q9m/E3w6vW7diMBtHsx7XP284/NGAz8HZOw6GhUUyZqnUalUGjWQxBEzwUnYdDAyw=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JWT3MXzV; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 879DFC4CEE4;
Wed, 4 Jun 2025 14:32:33 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749047553;
bh=+BmWJhOFbq1yXe1Nt/YU+m0g8RpyqPG0fIDFEzDZhBg=;
h=Subject:From:Date:References:In-Reply-To:To:Cc:From;
b=JWT3MXzVFlIS3uSrmzj5udbBT2PzmFj3TIl28DjMtnGbDMcJ9F8/0wNQWTJGjaB4U
ZShUOG7n8i8l/dlz8G2r500/IgDmpQ2KVCRV59rDXWECayp1drz0BYrCaHRZb8RCe1
Wo2bkeu5/9QQEEw/yNTIcrhVA69Yq+upeGRAjLBwUh1O+RWiHd1sAoyjGsr+pbKJlM
5qy27JTzXh31dtrjVbiNYs0f6U5w2hdeYedufW8rnut88Vf2TsRTy7Z8bdXjj1g5ab
CPiP9FJ8cCERBVQOq2MenLUtD1u0ZbDhIVXqnQcCUBDkucuQVFbM4y9gzbWTLmemWb
NTrIanRPH7Fhw==
Received: from [10.30.226.235] (localhost [IPv6:::1])
by aws-us-west-2-korg-oddjob-rhel9-1.codeaurora.org (Postfix) with ESMTP id EAD6838111E5;
Wed, 4 Jun 2025 14:33:06 +0000 (UTC)
Content-Type: text/plain; charset="utf-8"
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: Re: [PATCH] riscv: enable mseal sysmap for RV64
From: patchwork-bot+linux-riscv@xxxxxxxxxx
Message-Id:
<174904758575.2309006.1787281436678591425.git-patchwork-notify@xxxxxxxxxx>
Date: Wed, 04 Jun 2025 14:33:05 +0000
References: <20250426135954.5614-1-jszhang@xxxxxxxxxx>
In-Reply-To: <20250426135954.5614-1-jszhang@xxxxxxxxxx>
To: Jisheng Zhang <jszhang@xxxxxxxxxx>
Cc: linux-riscv@xxxxxxxxxxxxxxxxxxx, paul.walmsley@xxxxxxxxxx,
palmer@xxxxxxxxxxx, aou@xxxxxxxxxxxxxxxxx, alex@xxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, jeffxu@xxxxxxxxxxxx
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hello:
This patch was applied to riscv/linux.git (for-next)
by Alexandre Ghiti <alexghiti@xxxxxxxxxxxx>:
On Sat, 26 Apr 2025 21:59:54 +0800 you wrote:
Provide support for CONFIG_MSEAL_SYSTEM_MAPPINGS for RV64, covering the
vdso, vvar.
Passed sysmap_is_sealed and mseal_test self tests.
Passed booting a buildroot rootfs image and a cli debian rootfs image.
Signed-off-by: Jisheng Zhang <jszhang@xxxxxxxxxx>
Cc: Jeff Xu <jeffxu@xxxxxxxxxxxx>
[...]
Here is the summary with links:
- riscv: enable mseal sysmap for RV64
https://git.kernel.org/riscv/c/053ea0a6a070
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Return-Path: <linux-kernel+bounces-673358-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 52BEB41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:32:58 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id C9E3D189B2C9
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:33:11 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 4592F290DBE;
Wed, 4 Jun 2025 14:32:36 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FcU55DcL"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 822D4290DB0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:32:35 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749047555; cv=none; b=QDh5XUByaEbo7h/L/EQ4yREveELi89w6IPo6zRSbHaQ7ppLDjVaQA3qB327y+XkYykr+7lkKw0Zzg7aTa4xIIHYyYMeW95Z1oAGxY6SqA6LcyvPM7qSgdMvCJva3neDSpnGlwJLskchKuhGMgHTRcKszKucCt5AE0+wLcFQWv7k=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749047555; c=relaxed/simple;
bh=0cex6vSsXIzLr3HCp6pdJwaZEIj6tYWrRSJ+A1mcFLI=;
h=Content-Type:MIME-Version:Subject:From:Message-Id:Date:References:
In-Reply-To:To:Cc; b=NGpyCWH/jpWjDn0+UAkR2nGG/141FZYh6Fimd0hqbvX6dprYhs/tlylEWd5kgKFr+m8/gS5PCMGjj5zRcnYLmC/2CIT7LFiB5LAZimdDN4WAsemzcgjS4BY976mdVmemKn95ayuix8MWPQDzJ/lboAJeSKMVbAKUC9Xe2bmfMy0=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FcU55DcL; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 065C9C4CEE7;
Wed, 4 Jun 2025 14:32:35 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749047555;
bh=0cex6vSsXIzLr3HCp6pdJwaZEIj6tYWrRSJ+A1mcFLI=;
h=Subject:From:Date:References:In-Reply-To:To:Cc:From;
b=FcU55DcLd27Gzr3kTtCD7R0h8Y+7t99/1qb67kVtT7VJmq2VsTlx8WVfgKCaUzAY7
s6639hu3xKMWeHBGHX4FqKRT2crjgv9FG1p/XNFds2H6apBCBqPplBZCsv06+GEZER
QOu2AjNw+jItngyM8zBYXR9vuNIZfz7PAPUTWhfXir7EvPccAuOC9oCO2JmcwJN9/F
Cbqho20ofD7DtdUsKULcNQKAVgMG4MlA+Q3V4G2OJbIvTK8Hg67MzZofyiZaL8+isR
pX6eB+05poNoSy4eiUs7UZ08J5KgQ3fzkccK6+t5/DcZCAETw8VNQXQxL7fUK6xO2F
HvqIc64Kpmt8g==
Received: from [10.30.226.235] (localhost [IPv6:::1])
by aws-us-west-2-korg-oddjob-rhel9-1.codeaurora.org (Postfix) with ESMTP id 70BC438111E5;
Wed, 4 Jun 2025 14:33:08 +0000 (UTC)
Content-Type: text/plain; charset="utf-8"
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: Re: [PATCH v2 00/11] riscv: kprobes: Clean up instruction simulation
From: patchwork-bot+linux-riscv@xxxxxxxxxx
Message-Id:
<174904758698.2309006.9940004806769596353.git-patchwork-notify@xxxxxxxxxx>
Date: Wed, 04 Jun 2025 14:33:06 +0000
References: <cover.1747215274.git.namcao@xxxxxxxxxxxxx>
In-Reply-To: <cover.1747215274.git.namcao@xxxxxxxxxxxxx>
To: Nam Cao <namcao@xxxxxxxxxxxxx>
Cc: linux-riscv@xxxxxxxxxxxxxxxxxxx, paul.walmsley@xxxxxxxxxx,
palmer@xxxxxxxxxxx, aou@xxxxxxxxxxxxxxxxx, alex@xxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hello:
This series was applied to riscv/linux.git (for-next)
by Alexandre Ghiti <alexghiti@xxxxxxxxxxxx>:
On Wed, 14 May 2025 11:38:39 +0200 you wrote:
Hi,
There is some instruction-processing code in kprobes simulate code. These
code should be insn.h. In fact, most of them is duplicating insn.h.
This series remove the duplicated bits and make use of macros already
defined in insn.h. The non-duplicated bits are moved into insn.h.
[...]
Here is the summary with links:
- [v2,01/11] riscv: kprobes: Move branch_rs2_idx to insn.h
https://git.kernel.org/riscv/c/d29656bab74c
- [v2,02/11] riscv: kprobes: Move branch_funct3 to insn.h
https://git.kernel.org/riscv/c/da6de46c2eed
- [v2,03/11] riscv: kprobes: Remove duplication of RV_EXTRACT_JTYPE_IMM
https://git.kernel.org/riscv/c/6d47d903b18f
- [v2,04/11] riscv: kprobes: Remove duplication of RV_EXTRACT_RS1_REG
https://git.kernel.org/riscv/c/5cefc323f32a
- [v2,05/11] riscv: kprobes: Remove duplication of RV_EXTRACT_BTYPE_IMM
https://git.kernel.org/riscv/c/a285674909ae
- [v2,06/11] riscv: kproves: Remove duplication of RVC_EXTRACT_JTYPE_IMM
https://git.kernel.org/riscv/c/c7196c136e29
- [v2,07/11] riscv: kprobes: Remove duplication of RVC_EXTRACT_C2_RS1_REG
https://git.kernel.org/riscv/c/768007ca3fe8
- [v2,08/11] riscv: kprobes: Remove duplication of RVC_EXTRACT_BTYPE_IMM
https://git.kernel.org/riscv/c/f2c715fff676
- [v2,09/11] riscv: kprobes: Remove duplication of RV_EXTRACT_RD_REG
https://git.kernel.org/riscv/c/284ca2a100de
- [v2,10/11] riscv: kprobes: Remove duplication of RV_EXTRACT_UTYPE_IMM
https://git.kernel.org/riscv/c/a60c2933ec74
- [v2,11/11] riscv: kprobes: Remove duplication of RV_EXTRACT_ITYPE_IMM
https://git.kernel.org/riscv/c/ee4c45f5cbeb
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Return-Path: <linux-kernel+bounces-673359-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 35F4A41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:33:12 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id A6B9A189A235
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:33:25 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 9137E29116A;
Wed, 4 Jun 2025 14:32:37 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="IHnAE5oA"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id BD99E291147;
Wed, 4 Jun 2025 14:32:36 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749047556; cv=none; b=AD8V6UCOEC+UOzKkT0Cwz5QW+a8kcKw6HMqda39JClPOv8oPCzsWRqSdNUbbJ/KK85b4G6O+FQnDoKbJQj7FPDLhFVhT9RWKtnORDkdYvO+4AgCdOeXwwKsnwQtFDPPxP4cL3hW12vU27Wru65j4yNYD+CcFBFuUrA7J7tr2AxY=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749047556; c=relaxed/simple;
bh=IpQmYI+LTEk5yMKcHxOS33hPu3ZQ3xuwoEnpYV5S2GQ=;
h=Content-Type:MIME-Version:Subject:From:Message-Id:Date:References:
In-Reply-To:To:Cc; b=mNHMEOmxsVtva3E+xNVn0Pvd7S2T5XKCvydgS3MXsPce8u1atARncww+2xAHzuhHZ75rWLptc41Fr7HoNkRwn9GrYrGr/pgBkBNGUaHJd0/RWYCTDj/8f1Ca2poOZNO/Z2xV2cTdmfSWqeBRROVeEdek9tABo3l3MHdqxQWvMBg=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=IHnAE5oA; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3BEC8C4CEE4;
Wed, 4 Jun 2025 14:32:36 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749047556;
bh=IpQmYI+LTEk5yMKcHxOS33hPu3ZQ3xuwoEnpYV5S2GQ=;
h=Subject:From:Date:References:In-Reply-To:To:Cc:From;
b=IHnAE5oAkhaMg8Xz2BVRmid2SlXHCYmWFOTvl2MkkUd2zSFmGViznKr4cBAUM9XY6
v2PalVivCpTgoVuTnskBKwAMAk0oJAdtROJl9v9FY8cjvLqtqc7Ssb731gr14aJQKZ
XfZ8tw2HriFIoH2TmNjeAL7Ap0xPNGCLIVV5ga8agxLQCYY3JhkYF27JRo0SO7WjS3
F311JuD5dJQ4NgOFXAQ/2OWpJqlmWj91Nt6xpDGzkmqtCgEYfwPeyQzePQd9P7hxgN
GrgVJ7t8A4VOnukMwl1RBD/k4PSWjjWqSxXug9ECLcwlHwflZ7TtZ1it8d91D8ovc+
18rye+BqC1QMg==
Received: from [10.30.226.235] (localhost [IPv6:::1])
by aws-us-west-2-korg-oddjob-rhel9-1.codeaurora.org (Postfix) with ESMTP id ADCC738111E5;
Wed, 4 Jun 2025 14:33:09 +0000 (UTC)
Content-Type: text/plain; charset="utf-8"
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: Re: [PATCH v4 0/3] Move duplicated instructions macros into
asm/insn.h
From: patchwork-bot+linux-riscv@xxxxxxxxxx
Message-Id:
<174904758848.2309006.5543819811010216908.git-patchwork-notify@xxxxxxxxxx>
Date: Wed, 04 Jun 2025 14:33:08 +0000
References: <20250516140805.282770-1-alexghiti@xxxxxxxxxxxx>
In-Reply-To: <20250516140805.282770-1-alexghiti@xxxxxxxxxxxx>
To: Alexandre Ghiti <alexghiti@xxxxxxxxxxxx>
Cc: linux-riscv@xxxxxxxxxxxxxxxxxxx, paul.walmsley@xxxxxxxxxx,
palmer@xxxxxxxxxxx, alex@xxxxxxxx, anup@xxxxxxxxxxxxxx,
atishp@xxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, kvm@xxxxxxxxxxxxxxx,
kvm-riscv@xxxxxxxxxxxxxxxxxxx
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hello:
This series was applied to riscv/linux.git (for-next)
by Alexandre Ghiti <alexghiti@xxxxxxxxxxxx>:
On Fri, 16 May 2025 16:08:02 +0200 you wrote:
The instructions parsing macros were duplicated and one of them had different
implementations, which is error prone.
So let's consolidate those macros in asm/insn.h.
v1: https://lore.kernel.org/linux-riscv/20250422082545.450453-1-alexghiti@xxxxxxxxxxxx/
v2: https://lore.kernel.org/linux-riscv/20250508082215.88658-1-alexghiti@xxxxxxxxxxxx/
v3: https://lore.kernel.org/linux-riscv/20250508125202.108613-1-alexghiti@xxxxxxxxxxxx/
[...]
Here is the summary with links:
- [v4,1/3] riscv: Fix typo EXRACT -> EXTRACT
https://git.kernel.org/riscv/c/00542578d2fd
- [v4,2/3] riscv: Strengthen duplicate and inconsistent definition of RV_X()
https://git.kernel.org/riscv/c/9908f88a651e
- [v4,3/3] riscv: Move all duplicate insn parsing macros into asm/insn.h
https://git.kernel.org/riscv/c/4f8d6dc47e46
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Return-Path: <linux-kernel+bounces-673360-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 867AB41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:33:26 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 491FA7A7CC4
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:32:07 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id CDE6B29186C;
Wed, 4 Jun 2025 14:32:38 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jEgMPt0B"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1CA6D28FFEF
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:32:37 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749047558; cv=none; b=FgggoJrDFfVYX3qGEhdgFTDHAQZHYrqu6pkMESvG7CZ4KWn16z/Hh4YgtO0F1pqWOVeCraWVoB2OVdrVJ1yTGCbYw9MeHrf5XOjaUmYeqlRb1FTEfH18nZFRMsP9TFtHjuW4MRyUeD3GlPMNsO/yVqRuSkIVQrvvfWDY4KD/d+Q=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749047558; c=relaxed/simple;
bh=O87SbhJu8MiAOI5eh0Puuguvo3LgbY3USgQjEazZQpo=;
h=Content-Type:MIME-Version:Subject:From:Message-Id:Date:References:
In-Reply-To:To:Cc; b=LzL6g8lO8NjFmX9zTGQmFUZIfBtHEVx1Aikm6yqFhDEwneaQ8OAAYGwmHFtA3TjAnSMPM6u4GXLDJ9OKVSh6R4IF3V7v+8uW23H+N8K/69q6AKAcQAP/IRYi+N221V78FvgsxLdPYjQw82qdgBiZaX4BJeYn41Tso5BgkY9tpNM=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jEgMPt0B; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 84FBFC4CEE7;
Wed, 4 Jun 2025 14:32:37 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749047557;
bh=O87SbhJu8MiAOI5eh0Puuguvo3LgbY3USgQjEazZQpo=;
h=Subject:From:Date:References:In-Reply-To:To:Cc:From;
b=jEgMPt0Bgzg6ctCIJSWZMCZxt/hbyRD4wWVB6bkpUzlBPFnGniMjAvRLrjTtcgso5
M82G3WqjhsGU5gRwiW5dGGwMelMyEKKYQSNfgB9uWO0WzdokraZrqLRYG3y1q6DHfm
H1BFiE138JGS4ur6BRfCrSw5eU7fTHniz6A35Waf7gIKDOHMh3K6w6y+fCe1Tml9zx
ewnP5ePr652n+i6PhJ+wl/ra3pMLXtrzkOBLpdb4FQeI+OfHcVbtU+keVtm70lq5dy
nApBuyYdbsUm61Wqg1hO/XIuv/z1+G3yLwTeqrdeVzt2rXca3xP83euqZOygiXT9ff
6nPtW7/GM1w2g==
Received: from [10.30.226.235] (localhost [IPv6:::1])
by aws-us-west-2-korg-oddjob-rhel9-1.codeaurora.org (Postfix) with ESMTP id EAC1E38111E5;
Wed, 4 Jun 2025 14:33:10 +0000 (UTC)
Content-Type: text/plain; charset="utf-8"
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: Re: [PATCH v2] riscv: Add kprobes KUnit test
From: patchwork-bot+linux-riscv@xxxxxxxxxx
Message-Id:
<174904758974.2309006.8809303189389627595.git-patchwork-notify@xxxxxxxxxx>
Date: Wed, 04 Jun 2025 14:33:09 +0000
References: <20250513151631.3520793-1-namcao@xxxxxxxxxxxxx>
In-Reply-To: <20250513151631.3520793-1-namcao@xxxxxxxxxxxxx>
To: Nam Cao <namcao@xxxxxxxxxxxxx>
Cc: linux-riscv@xxxxxxxxxxxxxxxxxxx, paul.walmsley@xxxxxxxxxx,
palmer@xxxxxxxxxxx, aou@xxxxxxxxxxxxxxxxx, alex@xxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hello:
This patch was applied to riscv/linux.git (for-next)
by Alexandre Ghiti <alexghiti@xxxxxxxxxxxx>:
On Tue, 13 May 2025 17:16:31 +0200 you wrote:
Add KUnit test for riscv kprobes, mostly for simulated instructions. The
test install kprobes into multiple sample functions, and check that these
functions still return the expected magic value.
This test can detect some kprobe bugs reported in the past (in Link:).
Link: https://lore.kernel.org/linux-riscv/20241119111056.2554419-1-namcao@xxxxxxxxxxxxx/
Link: https://lore.kernel.org/stable/c7e463c0-8cad-4f4e-addd-195c06b7b6de@xxxxxxxxxxx/
Link: https://lore.kernel.org/linux-riscv/20230829182500.61875-1-namcaov@xxxxxxxxx/
Signed-off-by: Nam Cao <namcao@xxxxxxxxxxxxx>
[...]
Here is the summary with links:
- [v2] riscv: Add kprobes KUnit test
https://git.kernel.org/riscv/c/91d95bd795b9
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Return-Path: <linux-kernel+bounces-673361-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id BA3C641E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:33:55 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 705527A0655
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:32:32 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 517C3290D96;
Wed, 4 Jun 2025 14:32:58 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="vMmmm8Wc"
Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2076.outbound.protection.outlook.com [40.107.236.76])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2479C28ECC6;
Wed, 4 Jun 2025 14:32:54 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.236.76
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749047577; cv=fail; b=WJoX1fBS0gnlfh981L+w1RGflHsl2rcQk1gGWN+e5Ipx0kELQIadZvogATrIFIuH3c20E7FxUwWks1nuDSTWTx0uvOvPLv33tfIGWVXcOgxAPtKnSW1upx6mXh9qVhwLLlqJP4Vzhi4x2mT2rnK2awEnj01JsC20yil6VxLtZpo=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749047577; c=relaxed/simple;
bh=6Y4zNSxPCAIweP174OU7Q2KMfMV54hKzX+Nkc9ryvjI=;
h=Message-ID:Date:Subject:To:References:From:In-Reply-To:
Content-Type:MIME-Version; b=ag/W1QQPXbwEFJZI5sSk5ILEEBV+a3TDmIoaBf9nmcmBvgvO7WNkfAqvuqJWEREvFWt854ZQi5DKFKdNpn1VFrrwwtt/9dpEWiGAFM41O4Y/Vdeef8op7HCztcxXa7Gun9I9jrVtW1sbwJ0RG7le4V5BpU8ZifyHmXfIYFzcHqE=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=vMmmm8Wc; arc=fail smtp.client-ip=40.107.236.76
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com
Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=qjbq9/Wa09XmigcyI0Qb953Wmqd3ia/HUZVZhCZlBRxoy3IzS5j3qNXJyMNnOiVx7Cd2+ly6svmUbNSZEXm7QxfvThimlmyNFlilcJ1sUrGPmJPaCoEdya96IdPCU/ZyiBWdxghbcELewhyY0lsdB7u96ylixI3xkhkGll68QlHsQ8G8FkwkhHPEVO/SydE8hBT3XS9N3ix2ZhMJcZ0cen5ljPw2+j9HLXAB2cOTBhlq93Zh97qX7PXOMp/4b30HY/tEA2t+tfkG1ZLCaM2S5Kj1+/LU7OHcJVV/djr1gxeFKuuhH61wOiKC+1zU4wecoeQucxrpYMDivxV49vPP9g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=h9BQ0l1phOzMBniDql2JX7FFy+Ahp0lK/FFbSYEUpGg=;
b=PwXnPQNKZD4Rt0W8/bP0vtsw+nSlwaZd72cgP8+BVfHEOvQzKP3S/ecOVeVKpFqNrSzai6J2XbypCMe8BKh8qmZJC4llCZ5djduLLorK+ljZmPEpryaT4TX14QIQ2kAULs628N3G2rntb9p8nZvTppHIWuYSsJQTrh/LBJY/n/k61tV0JATnL8dkiun/9nyR4KMLs5EVgqpC0xp1VpPtkuN4myCLsVFLQ5f5q4ds6CgLkNjZvEGOHDSouTXtEcVw12Js/trSviPh1YBewd3Z6JbuwWPQcTAoJRTonVZloWDJ3l2B2LIDmh6Q7+tEI1l1z9S3w6uPqDEe+yfXtHpRJw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass
header.d=amd.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=h9BQ0l1phOzMBniDql2JX7FFy+Ahp0lK/FFbSYEUpGg=;
b=vMmmm8WcUQGBMUuc2hDUqHV4JBXtGNLeEroC9sco8c/wxT1ZQv/D0rB9YO/jHCKWKqgtvdHIEXZnpNjepBGrUPtBFqYRkAXPAR3DUP5mGr2iZnJ/vj87z8GiO675dvU2vNQg7VZj82Ca3xNjNYdf0RWAKd85okBGJDRBZ7X2SK0=
Authentication-Results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=amd.com;
Received: from DS0PR12MB6390.namprd12.prod.outlook.com (2603:10b6:8:ce::7) by
DS0PR12MB9348.namprd12.prod.outlook.com (2603:10b6:8:1a0::18) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.8769.37; Wed, 4 Jun 2025 14:32:52 +0000
Received: from DS0PR12MB6390.namprd12.prod.outlook.com
([fe80::38ec:7496:1a35:599f]) by DS0PR12MB6390.namprd12.prod.outlook.com
([fe80::38ec:7496:1a35:599f%5]) with mapi id 15.20.8792.034; Wed, 4 Jun 2025
14:32:52 +0000
Message-ID: <7d9030bf-8d27-4c9e-b995-89ce1a63dd6c@xxxxxxx>
Date: Wed, 4 Jun 2025 09:32:46 -0500
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v9 02/16] PCI/AER: Report CXL or PCIe bus error type in
trace logging
To: Sathyanarayanan Kuppuswamy <sathyanarayanan.kuppuswamy@xxxxxxxxxxxxxxx>,
PradeepVineshReddy.Kodamati@xxxxxxx, dave@xxxxxxxxxxxx,
jonathan.cameron@xxxxxxxxxx, dave.jiang@xxxxxxxxx,
alison.schofield@xxxxxxxxx, vishal.l.verma@xxxxxxxxx, ira.weiny@xxxxxxxxx,
dan.j.williams@xxxxxxxxx, bhelgaas@xxxxxxxxxx, bp@xxxxxxxxx,
ming.li@xxxxxxxxxxxx, shiju.jose@xxxxxxxxxx, dan.carpenter@xxxxxxxxxx,
Smita.KoralahalliChannabasappa@xxxxxxx, kobayashi.da-06@xxxxxxxxxxx,
yanfei.xu@xxxxxxxxx, rrichter@xxxxxxx, peterz@xxxxxxxxxxxxx, colyli@xxxxxxx,
uaisheng.ye@xxxxxxxxx, fabio.m.de.francesco@xxxxxxxxxxxxxxx,
ilpo.jarvinen@xxxxxxxxxxxxxxx, yazen.ghannam@xxxxxxx,
linux-cxl@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
linux-pci@xxxxxxxxxxxxxxx
References: <20250603172239.159260-1-terry.bowman@xxxxxxx>
<20250603172239.159260-3-terry.bowman@xxxxxxx>
<0619c83f-84d9-4dcd-866d-d6df1da4d1c9@xxxxxxxxxxxxxxx>
Content-Language: en-US
From: "Bowman, Terry" <terry.bowman@xxxxxxx>
In-Reply-To: <0619c83f-84d9-4dcd-866d-d6df1da4d1c9@xxxxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-ClientProxiedBy: YT4PR01CA0439.CANPRD01.PROD.OUTLOOK.COM
(2603:10b6:b01:10d::12) To DS0PR12MB6390.namprd12.prod.outlook.com
(2603:10b6:8:ce::7)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: DS0PR12MB6390:EE_|DS0PR12MB9348:EE_
X-MS-Office365-Filtering-Correlation-Id: 363e552e-f4af-439f-cae7-08dda374afb9
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam:
BCL:0;ARA:13230040|366016|7416014|376014|1800799024|921020;
X-Microsoft-Antispam-Message-Info:
=?utf-8?B?YXJHNmVadTQ3WURmME1hWXpJbDRYdU9CbEZEVWdaQWErMm5iQXRjMGYvSkxN?=
=?utf-8?B?TUZGM0Q5ck1UcDgwdllRR1hHVVZXQVVHWkpkdmVqZEhYZUd2ekJqR3Yra0lZ?=
=?utf-8?B?cDE1QWtOcG1kQUpmcStmUDR6NGw5Vk41QkpvR3ZzdXEwdXAxR1R1Y0VnZVQw?=
=?utf-8?B?WktyWDdGQnpDY2V1bUtUaUxjRjBQbE9BdG80MTEvRVVKSEQ4RTdNWTJvaDNG?=
=?utf-8?B?NVJja2dET2JZV2dNWTEreklKQmY3RzlITmF3a2FzcXRBZ0IvOGJIeHNyVkRV?=
=?utf-8?B?VDZWd2RjQXFSNUpObTUxU3p1UDN0QmxsVXhYZE5oV1dpREk2MXRUTWNWcWZC?=
=?utf-8?B?UUZ2TjZKQXNMdnBMN252RHp0SHdPWGQ2aEpGQWRpRHJTVDJSd3VtVGhZQzU4?=
=?utf-8?B?M0dLK3ZhNHdONkZDQnZzWVNHQmh4QkllNEpLZm5seHRNdjJJaG8vd2tyL0s1?=
=?utf-8?B?WElvSXQzRTJ2NTdTbGt5TWVFOTVGYmhDdFBnalpHNnlUcklBZUU3aXZWUy83?=
=?utf-8?B?d1JLdjZ6YytlaktrOVRJcFpSRUZuY0xPTDloWlVPU1hJdm0zV1c1a3ZTL0c5?=
=?utf-8?B?cXMzZHlqbDRWWXJEbDZzYm5GSUxWaWVDRWxzUllVa3RYV2ZNNEJPK1VQWjdI?=
=?utf-8?B?MjJ2RVRhZHRmSDU0bkExanNTUUU0Ym9Fd2RoMWs3VzRIek5WdnB3WGFCdnA4?=
=?utf-8?B?WTNETmNhbWRnYzRUcFRkSUlyTzR6UDlmN1VveElsQzdXVnNJR3JHdHdXcmZF?=
=?utf-8?B?c0g0alAxaE0xVzNyQ3VFV2ZDM2FNM2lhUysxM3hGRmJZaGRLdmdBZXpMYW1D?=
=?utf-8?B?M0huOFlIWGxKRTVrWXlMK1RuU1M2YXdMcUg1ZDFVSEhFQXRSYXZYTzg5bUVL?=
=?utf-8?B?YlZpT05Pdko0SlNRUDRyWWZnbllWODVXeTdabEhENU9EcnBhcmxwZ05oS29a?=
=?utf-8?B?TVRmc3lFTlNDMVJkbXVGR2tkLzFLWEZWTWtBUjVLSmVkdC9ZR0R3cnNFd3VT?=
=?utf-8?B?ajJKWlRkZ3Nxc05SdVdobC9LOFoyY2NGKzZ4UFEvVGJrQmhveHVoNVRCQk9r?=
=?utf-8?B?dEY0SE9NT3pqazlXeFhaUEFTak4ycEJNT0hVMVBRa2p3U2dIcGFDOERWM285?=
=?utf-8?B?QkE5OTZRNC9iUVlDTVhnRFFKeFUvemxYQkZ0MkxqVVArUTM4NEloVGp2Yyth?=
=?utf-8?B?UnoyTVpxdk1CUnJTSnFoSWVwaEZvWHArejQ2UUhLak5Ma1M0REZYamlDcnEw?=
=?utf-8?B?S1RNSE1UVGVuc0M1c0poNU95Q3hjdExxMkc2bVRlREV1K0RVdkVuWXV3enMy?=
=?utf-8?B?N1RPMjIwTjdzOEhyaGc0OEdNYTZlbnJwTkxaUWVnLzJ0T1I2b1M3QTdET0Mx?=
=?utf-8?B?UzBiYm5WNzE1TGNxVXRSVTRxdDFUODVPMmlycTV2d3NsdC85VEtvcnozQ2NJ?=
=?utf-8?B?Q2o1eWFZck4yNlJZZnpzb3piaUFxdkpjQW5aS0ZYRkFQYjZXdnRZczJmYytv?=
=?utf-8?B?cVRmMEtGUzVaYTQ0cU9YWWRDZm9MMlg5enFxYlhOV3ZHZkNQZG5SMHdWL1k0?=
=?utf-8?B?bXo2akRkcUtlc3pxNm5jMC95YktnbmRSZjFNVHRZdzBCYWwyV0FEcWFtL1Rt?=
=?utf-8?B?YXg3SDF2UkkwVVM0Q3VybEdsM0tUdG5adVlFdFJYbFQxOUZSeWxrSVlpK2Jn?=
=?utf-8?B?NStjS3BCTEoyMmxTdy9rQU1jWmZ1V3ppY2U0Sk1JdkFXT1VRSEpRdmlDU2d6?=
=?utf-8?B?ajhFY2xmclp5QXhUQ04xYlk5bjNHZ3Fya1VGOHZDM1lFSnFVM3JiRUZuL05j?=
=?utf-8?B?akIvY3FMR2ZaOXBjRU4zcVppNS9Sb002dTQyUFlkTFpKU1Nad2RHdWM1Mm04?=
=?utf-8?B?ZGVySW8yNWJ3Rk5uOTFIQm1zWDNsNi9EMkxjMmtTdmVZMnFvUTJISUJOeGdp?=
=?utf-8?B?aVhOQXZoLzY1Q0JLWGx6Vlh4R3h2NXdxckthVjRJUzQramhrbzZLeWx4Z3Vl?=
=?utf-8?B?UHpXQ1RHZkFRPT0=?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS0PR12MB6390.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(7416014)(376014)(1800799024)(921020);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?utf-8?B?RWJ1aHorUC9ybDMvTVVaTElCbEVQaEVXQ1BmR0FTUzUxekZyNE95dUEycW81?=
=?utf-8?B?WG82MkFsOE8rcGhIRWlwdkhoelowalZpb3hCMkVDMnlFQW9nUmxSbGVLN1RL?=
=?utf-8?B?Ujk5T2dqQVZhN2syR1hxUEhEbFZ3VU1RMEZoaFRGV2N0MUZ5dVQxcWpxc29K?=
=?utf-8?B?WXl0TTJWMTJqWWZLc1hXNC9DTGVpOUs4c1BKZnIyNEhjMEcrNzAwSktNYkxT?=
=?utf-8?B?NmM5dzJZdCtleldqcTFlZlFTcEo1S1FDb21aQUd1a2t3TUgzUmRTa0xJTVJJ?=
=?utf-8?B?eUVVbi9qT1pPKytpTEd3UTB6bVY0Uml0b0pWQmhROStwMzdaTDdVRDMwVFYw?=
=?utf-8?B?aTZaVldMcnVQcDl2SVVDWnJiaGowa0QwTWIvdUo3NmRFNE5DZldpQUNBSDJU?=
=?utf-8?B?VnY3R0RZd1NxWHhkMnJEWFpLajBPVlZoSGFTK1pnd0dCSytER3pkU2NQODdU?=
=?utf-8?B?MkFmbGlrQWs2QTVtWUxZUklFWk1vTDhqZFhOdnNtRzZrYlFLZGJHR0Y5SVp5?=
=?utf-8?B?dXBobHhlZ0xYR0ZOTFg4WGsvSnRhRG05NWlQcE5jVnNlRVRrWmxIRERnVVVw?=
=?utf-8?B?VmhNcFloeFFqM2hSdzJ1enFBYmVRL1Q4NlE1K2RvNUdYdVNmUTdtSDJaWFA1?=
=?utf-8?B?dkZLRVVCMkROcVZzQ1lIUm5zbjhKVnpZLzN0cktZUHBpbGRNRlpIS0Zwcmoy?=
=?utf-8?B?ekNLV3JJZXp0bTBqeGcyRlBoU21ybHZVbGRDL1U3OUo2emhYaGlFc3RkMlRs?=
=?utf-8?B?UmlTdGJldUd3L2ZTTlhZbFNSbTlwK29rRWpHbHJHWGI4cTh2eGdXREZzcUxV?=
=?utf-8?B?bmxSaHlZbVpLRzZaWDduYWtWdEJ1emhoNVVNYkhTRDZiTVM2YWFLVXJHTEJY?=
=?utf-8?B?dzRwa1BPOStlZ3VBdzJpdFhuanhqK0J1UXd2UXZlUzVNYTVsQzJSQnRLdC8z?=
=?utf-8?B?RDhnQmxaUHE5MlQvZ1VpVmVjbnFrdlNEWmpuUmZ6OXF6U2xxS3hFdGh0cjlz?=
=?utf-8?B?SVQycjhMY0dBclo1K3hhOGNaKzBnMVdpbFF1NmtJK0hyS0ZIS0VrYmJCYlZv?=
=?utf-8?B?Q2hmRENSTFJKdkhhdTY3djY1ZC9XSGpLUEx2bldOdFZ4VVBFLy80R1hCY2R2?=
=?utf-8?B?dk5JYm5tT0JvSHhraldPa3hiaTc2c2Y0MTg1MUZNMnE3aUZDTVNEL1lQRjRu?=
=?utf-8?B?OUw2Um1oTHd1L1JVcUEyUUJrSjNWcVExUTBTUHJ4dFArcThtNnI3NXd4Wlcw?=
=?utf-8?B?NTlnNGNhRjdhcDZxWHBGY01iQ2VxZ1lZQVNjdm1UNzFsN044MVdDdHhldjFZ?=
=?utf-8?B?L29FdXVKNGl6ckx1K0JYRFNNY1V6bzRwSEZkdjE0T0MvcHVHczlKTmZKMDRZ?=
=?utf-8?B?THZ5Z3lQUm9HVGZydnk5NXVXdGtGZVdlYTI3d1M0ZE00a2RNczBBQ0pKeXky?=
=?utf-8?B?dStsSy9xV2ZTdVhDNXl6YlhBbjlZVFBnSlYxYmNQamh4blZpSWo0YTBWejhs?=
=?utf-8?B?dXB5Ui9MRGQ0dGROem1rdlJXTEd4a3E1dm1QejU4cG5UVkdxNUZwVXRhc25G?=
=?utf-8?B?Q1dqQXJ3Y0ZacGFkNm9aRjVNUEFiZVIrd1FmdGZTSWVlODRCNU9wRzI3aHJ0?=
=?utf-8?B?a0dSZEZBWkRqL3U0S1h4bUlnVWtaMVk4UUdpU2RETjFITytiMVpodXg2b1hI?=
=?utf-8?B?WHdaN216Ny9pclNQcWhyallmWENRL1VqclhRQ09aUVNsMUpUUTM2YkVCYVVu?=
=?utf-8?B?QUw2Zk1MaDcvc0dBY3A1c0VhN09MUWZWS1JpUk1hWWcxL3piRXpMSlNkTStB?=
=?utf-8?B?dG0yd091bFRIMXJWcEw3R1BycXlTQ0VmcWZRM0xEbTdBSE4wYWhhNVFUNUwx?=
=?utf-8?B?S0ZObjRjU295aXpKNGIvMGNLZXlYSjVsYUo0ZEJXaHNoa3hKZXBOYUF6b21y?=
=?utf-8?B?WDlYb2hkZllSVkZMc2xEN0NXb1VORERmMUswTERicThmc25CSHRPUjExMm1r?=
=?utf-8?B?SnJ3R0NKUCt5bnpESC9QK0lZR0xqdWtpcHNFTlR0ckV0dFdPQldYbUdrQjN5?=
=?utf-8?B?b004K1JuaUZxMDhydFY2ZUc3bmxkMTQ0MTZTR2MxRzdYZlFTM24rRFVRN3VO?=
=?utf-8?Q?OerIg8EogfU8QMkhcps5Qym67?=
X-OriginatorOrg: amd.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 363e552e-f4af-439f-cae7-08dda374afb9
X-MS-Exchange-CrossTenant-AuthSource: DS0PR12MB6390.namprd12.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 14:32:51.8901
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: q+y88s84Qd3RBooE/Twolr8DWXy/ovnt0MqhRWuECLACFUV/RF23obg/E0Mu9WN0mZlNYEIeIMnJxv0aPP/Cgg==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB9348
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 6/3/2025 5:02 PM, Sathyanarayanan Kuppuswamy wrote:
On 6/3/25 10:22 AM, Terry Bowman wrote:
The AER service driver and aer_event tracing currently log 'PCIe Bus Type'
for all errors. Update the driver and aer_event tracing to log 'CXL Bus
Type' for CXL device errors.
This requires the AER can identify and distinguish between PCIe errors and
CXL errors.
Introduce boolean 'is_cxl' to 'struct aer_err_info'. Add assignment in
aer_get_device_error_info() and pci_print_aer().
Update the aer_event trace routine to accept a bus type string parameter.
Signed-off-by: Terry Bowman <terry.bowman@xxxxxxx>
Reviewed-by: Ira Weiny <ira.weiny@xxxxxxxxx>
---
drivers/pci/pci.h | 6 ++++++
drivers/pci/pcie/aer.c | 18 ++++++++++++------
include/ras/ras_event.h | 9 ++++++---
3 files changed, 24 insertions(+), 9 deletions(-)
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index b81e99cd4b62..d6296500b004 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -588,6 +588,7 @@ static inline bool pci_dev_test_and_set_removed(struct pci_dev *dev)
struct aer_err_info {
struct pci_dev *dev[AER_MAX_MULTI_ERR_DEVICES];
int error_dev_num;
+ bool is_cxl;
Do you really need this member ? Why not just use pcie_is_cxl() in aer_err_bus()?
This was added per Dan's request instead of using pcie_is_cxl().[1]
[1] https://lore.kernel.org/linux-cxl/67abe1903a8ed_2d1e2942f@xxxxxxxxxxxxxxxxxxxxxxxxx.notmuch/
-Terry
unsigned int id:16;
@@ -604,6 +605,11 @@ struct aer_err_info {
struct pcie_tlp_log tlp; /* TLP Header */
};
+static inline const char *aer_err_bus(struct aer_err_info *info)
+{
+ return info->is_cxl ? "CXL" : "PCIe";
+}
+
int aer_get_device_error_info(struct pci_dev *dev, struct aer_err_info *info);
void aer_print_error(struct pci_dev *dev, struct aer_err_info *info);
diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c
index a1cf8c7ef628..adb4b1123b9b 100644
--- a/drivers/pci/pcie/aer.c
+++ b/drivers/pci/pcie/aer.c
@@ -698,13 +698,14 @@ static void __aer_print_error(struct pci_dev *dev,
void aer_print_error(struct pci_dev *dev, struct aer_err_info *info)
{
+ const char *bus_type = aer_err_bus(info);
int layer, agent;
int id = pci_dev_id(dev);
const char *level;
if (!info->status) {
- pci_err(dev, "PCIe Bus Error: severity=%s, type=Inaccessible, (Unregistered Agent ID)\n",
- aer_error_severity_string[info->severity]);
+ pci_err(dev, "%s Bus Error: severity=%s, type=Inaccessible, (Unregistered Agent ID)\n",
+ bus_type, aer_error_severity_string[info->severity]);
goto out;
}
@@ -713,8 +714,8 @@ void aer_print_error(struct pci_dev *dev, struct aer_err_info *info)
level = (info->severity == AER_CORRECTABLE) ? KERN_WARNING : KERN_ERR;
- aer_printk(level, dev, "PCIe Bus Error: severity=%s, type=%s, (%s)\n",
- aer_error_severity_string[info->severity],
+ aer_printk(level, dev, "%s Bus Error: severity=%s, type=%s, (%s)\n",
+ bus_type, aer_error_severity_string[info->severity],
aer_error_layer[layer], aer_agent_string[agent]);
aer_printk(level, dev, " device [%04x:%04x] error status/mask=%08x/%08x\n",
@@ -729,7 +730,7 @@ void aer_print_error(struct pci_dev *dev, struct aer_err_info *info)
if (info->id && info->error_dev_num > 1 && info->id == id)
pci_err(dev, " Error of this Agent is reported first\n");
- trace_aer_event(dev_name(&dev->dev), (info->status & ~info->mask),
+ trace_aer_event(dev_name(&dev->dev), bus_type, (info->status & ~info->mask),
info->severity, info->tlp_header_valid, &info->tlp);
}
@@ -763,6 +764,7 @@ EXPORT_SYMBOL_GPL(cper_severity_to_aer);
void pci_print_aer(struct pci_dev *dev, int aer_severity,
struct aer_capability_regs *aer)
{
+ const char *bus_type;
int layer, agent, tlp_header_valid = 0;
u32 status, mask;
struct aer_err_info info;
@@ -784,6 +786,9 @@ void pci_print_aer(struct pci_dev *dev, int aer_severity,
info.status = status;
info.mask = mask;
info.first_error = PCI_ERR_CAP_FEP(aer->cap_control);
+ info.is_cxl = pcie_is_cxl(dev);
+
+ bus_type = aer_err_bus(&info);
pci_err(dev, "aer_status: 0x%08x, aer_mask: 0x%08x\n", status, mask);
__aer_print_error(dev, &info);
@@ -797,7 +802,7 @@ void pci_print_aer(struct pci_dev *dev, int aer_severity,
if (tlp_header_valid)
pcie_print_tlp_log(dev, &aer->header_log, dev_fmt(" "));
- trace_aer_event(dev_name(&dev->dev), (status & ~mask),
+ trace_aer_event(dev_name(&dev->dev), bus_type, (status & ~mask),
aer_severity, tlp_header_valid, &aer->header_log);
}
EXPORT_SYMBOL_NS_GPL(pci_print_aer, "CXL");
@@ -1215,6 +1220,7 @@ int aer_get_device_error_info(struct pci_dev *dev, struct aer_err_info *info)
/* Must reset in this function */
info->status = 0;
info->tlp_header_valid = 0;
+ info->is_cxl = pcie_is_cxl(dev);
/* The device might not support AER */
if (!aer)
diff --git a/include/ras/ras_event.h b/include/ras/ras_event.h
index 14c9f943d53f..080829d59c36 100644
--- a/include/ras/ras_event.h
+++ b/include/ras/ras_event.h
@@ -297,15 +297,17 @@ TRACE_EVENT(non_standard_event,
TRACE_EVENT(aer_event,
TP_PROTO(const char *dev_name,
+ const char *bus_type,
const u32 status,
const u8 severity,
const u8 tlp_header_valid,
struct pcie_tlp_log *tlp),
- TP_ARGS(dev_name, status, severity, tlp_header_valid, tlp),
+ TP_ARGS(dev_name, bus_type, status, severity, tlp_header_valid, tlp),
TP_STRUCT__entry(
__string( dev_name, dev_name )
+ __string( bus_type, bus_type )
__field( u32, status )
__field( u8, severity )
__field( u8, tlp_header_valid)
@@ -314,6 +316,7 @@ TRACE_EVENT(aer_event,
TP_fast_assign(
__assign_str(dev_name);
+ __assign_str(bus_type);
__entry->status = status;
__entry->severity = severity;
__entry->tlp_header_valid = tlp_header_valid;
@@ -325,8 +328,8 @@ TRACE_EVENT(aer_event,
}
),
- TP_printk("%s PCIe Bus Error: severity=%s, %s, TLP Header=%s\n",
- __get_str(dev_name),
+ TP_printk("%s %s Bus Error: severity=%s, %s, TLP Header=%s\n",
+ __get_str(dev_name), __get_str(bus_type),
__entry->severity == AER_CORRECTABLE ? "Corrected" :
__entry->severity == AER_FATAL ?
"Fatal" : "Uncorrected, non-fatal",
Return-Path: <linux-kernel+bounces-673362-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 1A7B141E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:35:41 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 1612D163728
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:35:40 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 7457C290D95;
Wed, 4 Jun 2025 14:35:29 +0000 (UTC)
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0EFB528E609
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:35:29 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749047729; cv=none; b=VUKD/8hpzaFO7fnfrQYPb/Cdq1pwc/DnbTOUpdFkHTw7w8Fj/asm1LZakFo2PZG9/4QpH7DvL+bCmnpm871Waa/JMDtQuRA1Y9sLxuHBNnidaRc4bD93iv+ihZpNPg4R31p1jBwNBs4olftWpono0M9DUeQjVRViK9Ei9ogvjx4=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749047729; c=relaxed/simple;
bh=9VdxedsOYm0r0hMXgOM1bra4XGrjU1bsrGDncgfayZU=;
h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References:
MIME-Version:Content-Type; b=rGrW25d5Fl3wPPSImOSc0/bGVL2cScP1xjZy9iL7F2X9/6+9xnr57vtbmpJDxTNoRqQa18js7f/WJ6PdhS6I0qIWVJv799+bNatyNMGE7Qt4EqJxT1L1gsWgApDQRdYS8DnHp3sphYux5M+0/N0YGicdW2Zcbo10if4tpSpnnQ0=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0A43DC4CEE4;
Wed, 4 Jun 2025 14:35:27 +0000 (UTC)
Date: Wed, 4 Jun 2025 10:36:44 -0400
From: Steven Rostedt <rostedt@xxxxxxxxxxx>
To: Prakash Sangappa <prakash.sangappa@xxxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx, peterz@xxxxxxxxxxxxx,
mathieu.desnoyers@xxxxxxxxxxxx, tglx@xxxxxxxxxxxxx, bigeasy@xxxxxxxxxxxxx,
kprateek.nayak@xxxxxxx, vineethr@xxxxxxxxxxxxx
Subject: Re: [PATCH V5 5/6] Sched: Add tracepoint for sched time slice
extension
Message-ID: <20250604103644.4b41b9a3@xxxxxxxxxxxxxxxxxx>
In-Reply-To: <20250603233654.1838967-6-prakash.sangappa@xxxxxxxxxx>
References: <20250603233654.1838967-1-prakash.sangappa@xxxxxxxxxx>
<20250603233654.1838967-6-prakash.sangappa@xxxxxxxxxx>
X-Mailer: Claws Mail 3.20.0git84 (GTK+ 2.24.33; x86_64-pc-linux-gnu)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Tue, 3 Jun 2025 23:36:53 +0000
Prakash Sangappa <prakash.sangappa@xxxxxxxxxx> wrote:
@@ -134,6 +138,10 @@ __always_inline unsigned long exit_to_user_mode_loop(struct pt_regs *regs,
ti_work = read_thread_flags();
}
+ if (ti_work_cleared)
+ trace_sched_delay_resched(current, ti_work_cleared &
+ (_TIF_NEED_RESCHED | _TIF_NEED_RESCHED_LAZY));
+
Please make the above into a conditional tracepoint and you can also just
pass in ti_work_cleared. No reason to do that outside the tracepoint. As
the above is always checked regardless if tracing is enabled or not.
TRACE_EVENT_CONDITION(sched_delay_resched,
TP_PROTO(struct task_struct *p, unsigned int ti_work_cleared),
TP_ARGS(p, ti_work_cleared),
TP_CONDITION(ti_work_cleared),
TP_STRUCT__entry(
__array( char, comm, TASK_COMM_LEN )
__field( pid_t, pid )
__field( int, cpu )
__field( int, flg )
),
TP_fast_assign(
memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
__entry->pid = p->pid;
__entry->cpu = task_cpu(p);
__entry->flg = ti_work_cleared & (_TIF_NEED_RESCHED | _TIF_NEED_RESCHED_LAZY);
),
-- Steve
Return-Path: <linux-kernel+bounces-673363-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id A711441E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:35:58 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id D9CFE16334E
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:35:57 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id EFA42290D92;
Wed, 4 Jun 2025 14:35:38 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="SrAO6fDh"
Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8090928F950;
Wed, 4 Jun 2025 14:35:36 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.12
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749047738; cv=none; b=FvRvU+YxR1OXskNbHqf+w5QP3LDBN2TXp9DmWbcHGMZuDUUFceQP9QTby1RYW3HteUNvlizbsTXn4A4Xdkg0lzf3S5dbDb9wJoTeYP9C6IZTp0nRQ3467FOe2TrFvNj00G1Jz+ht25yrkb6CrGW8rY8sz88ty8z6GkYRQFFaV9M=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749047738; c=relaxed/simple;
bh=x/HDN8ZE77fRy93+e9zpmrKLhx3xowe0WlDM+Fs+tB8=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=Y/XBE+EOqNhHF1ezhuKwOt4dn7n4MxH+xM0/tw4mjeMSR3ZWzdRTczbGiTDjPVDF7YCHOdbp24bMFKyRW7bfbCGNuUCM7BGwBloitHT1JGVn0AhezzLeuFVZ7M2s3h8/SOeVP7n1wkjbzhnAAr3mZSWBATQWNaenswGfoNr4aVQ=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=SrAO6fDh; arc=none smtp.client-ip=192.198.163.12
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
t=1749047736; x=1780583736;
h=message-id:date:mime-version:subject:to:cc:references:
from:in-reply-to:content-transfer-encoding;
bh=x/HDN8ZE77fRy93+e9zpmrKLhx3xowe0WlDM+Fs+tB8=;
b=SrAO6fDhDfNVbmjW5MH9sy28n05d3PgxBYTN1LOJItDJDFyBsNy+JNsD
aRSn0zkxc+CLv0zLGm5d33jcHw1cwEpiDzCcd2gPH6OL70ISH/p7e8IZ1
pnOYeaj79J2OCWPNZ3FJ4XpnW1dDJZUmJaJX5XD/2uA6RHkkVoANghjrZ
t6k4tQG19J4wydVYmfKzP2dm4RrRm3YPPbuQCNaIAOZGa4yHUDt0LvqV0
DZ4osbASI2lcLgJiTIC3ketnbzssEr2xxb7fR5GTlmu2gf9sNY7pwW5GJ
3cg1uh4nzLwl/E1hmyE5+og7INDWhD8OOYZlXViKg7VHGz1KON97nuBV6
g==;
X-CSE-ConnectionGUID: 86NMfliHT5mMZMY04cO9tg==
X-CSE-MsgGUID: O/gp1rXESiOu9NhHKoc2/g==
X-IronPort-AV: E=McAfee;i="6800,10657,11454"; a="54924141"
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="54924141"
Received: from orviesa006.jf.intel.com ([10.64.159.146])
by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 07:35:35 -0700
X-CSE-ConnectionGUID: m/5wgwI3TjG4pYN4XeiUAQ==
X-CSE-MsgGUID: BnW7+6TUSMOdwad30rho3g==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="145104296"
Received: from lstrano-mobl6.amr.corp.intel.com (HELO [10.125.110.233]) ([10.125.110.233])
by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 07:35:34 -0700
Message-ID: <acb0f359-cd4a-4221-a7ba-9c473ad7ecd2@xxxxxxxxx>
Date: Wed, 4 Jun 2025 07:35:33 -0700
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v4 4/7] cxl/acpi: Add background worker to wait for
cxl_pci and cxl_mem probe
To: "Zhijian Li (Fujitsu)" <lizhijian@xxxxxxxxxxx>,
Smita Koralahalli <Smita.KoralahalliChannabasappa@xxxxxxx>,
"linux-cxl@xxxxxxxxxxxxxxx" <linux-cxl@xxxxxxxxxxxxxxx>,
"linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>,
"nvdimm@xxxxxxxxxxxxxxx" <nvdimm@xxxxxxxxxxxxxxx>,
"linux-fsdevel@xxxxxxxxxxxxxxx" <linux-fsdevel@xxxxxxxxxxxxxxx>,
"linux-pm@xxxxxxxxxxxxxxx" <linux-pm@xxxxxxxxxxxxxxx>
Cc: Davidlohr Bueso <dave@xxxxxxxxxxxx>,
Jonathan Cameron <jonathan.cameron@xxxxxxxxxx>,
Alison Schofield <alison.schofield@xxxxxxxxx>,
Vishal Verma <vishal.l.verma@xxxxxxxxx>, Ira Weiny <ira.weiny@xxxxxxxxx>,
Dan Williams <dan.j.williams@xxxxxxxxx>, Matthew Wilcox
<willy@xxxxxxxxxxxxx>, Jan Kara <jack@xxxxxxx>,
"Rafael J . Wysocki" <rafael@xxxxxxxxxx>, Len Brown <len.brown@xxxxxxxxx>,
Pavel Machek <pavel@xxxxxxxxxx>, Li Ming <ming.li@xxxxxxxxxxxx>,
Jeff Johnson <jeff.johnson@xxxxxxxxxxxxxxxx>,
Ying Huang <huang.ying.caritas@xxxxxxxxx>,
"Xingtao Yao (Fujitsu)" <yaoxt.fnst@xxxxxxxxxxx>,
Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx>,
Nathan Fontenot <nathan.fontenot@xxxxxxx>,
Terry Bowman <terry.bowman@xxxxxxx>, Robert Richter <rrichter@xxxxxxx>,
Benjamin Cheatham <benjamin.cheatham@xxxxxxx>,
PradeepVineshReddy Kodamati <PradeepVineshReddy.Kodamati@xxxxxxx>
References: <20250603221949.53272-1-Smita.KoralahalliChannabasappa@xxxxxxx>
<20250603221949.53272-5-Smita.KoralahalliChannabasappa@xxxxxxx>
<860121d7-4f40-4da5-b49a-cfeea5bc14c5@xxxxxxxxxxx>
Content-Language: en-US
From: Dave Jiang <dave.jiang@xxxxxxxxx>
In-Reply-To: <860121d7-4f40-4da5-b49a-cfeea5bc14c5@xxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 6/4/25 2:40 AM, Zhijian Li (Fujitsu) wrote:
On 04/06/2025 06:19, Smita Koralahalli wrote:
drivers/cxl/acpi.c | 23 +++++++++++++++++++++++
drivers/cxl/core/suspend.c | 21 +++++++++++++++++++++
drivers/cxl/cxl.h | 2 ++
3 files changed, 46 insertions(+)
diff --git a/drivers/cxl/acpi.c b/drivers/cxl/acpi.c
index cb14829bb9be..978f63b32b41 100644
--- a/drivers/cxl/acpi.c
+++ b/drivers/cxl/acpi.c
@@ -813,6 +813,24 @@ static int pair_cxl_resource(struct device *dev, void *data)
return 0;
}
+static void cxl_softreserv_mem_work_fn(struct work_struct *work)
+{
+ /* Wait for cxl_pci and cxl_mem drivers to load */
+ cxl_wait_for_pci_mem();
+
+ /*
+ * Wait for the driver probe routines to complete after cxl_pci
+ * and cxl_mem drivers are loaded.
+ */
+ wait_for_device_probe();
+}
+static DECLARE_WORK(cxl_sr_work, cxl_softreserv_mem_work_fn);
+
+static void cxl_softreserv_mem_update(void)
+{
+ schedule_work(&cxl_sr_work);
+}
+
static int cxl_acpi_probe(struct platform_device *pdev)
{
int rc;
@@ -887,6 +905,10 @@ static int cxl_acpi_probe(struct platform_device *pdev)
/* In case PCI is scanned before ACPI re-trigger memdev attach */
cxl_bus_rescan();
+
+ /* Update SOFT RESERVE resources that intersect with CXL regions */
+ cxl_softreserv_mem_update();
+
return 0;
}
@@ -918,6 +940,7 @@ static int __init cxl_acpi_init(void)
static void __exit cxl_acpi_exit(void)
{
+ cancel_work_sync(&cxl_sr_work);
platform_driver_unregister(&cxl_acpi_driver);
cxl_bus_drain();
}
diff --git a/drivers/cxl/core/suspend.c b/drivers/cxl/core/suspend.c
index 72818a2c8ec8..c0d8f70aed56 100644
--- a/drivers/cxl/core/suspend.c
+++ b/drivers/cxl/core/suspend.c
@@ -2,12 +2,15 @@
/* Copyright(c) 2022 Intel Corporation. All rights reserved. */
#include <linux/atomic.h>
#include <linux/export.h>
+#include <linux/wait.h>
#include "cxlmem.h"
#include "cxlpci.h"
static atomic_t mem_active;
static atomic_t pci_loaded;
+static DECLARE_WAIT_QUEUE_HEAD(cxl_wait_queue);
Given that this file (suspend.c) focuses on power management functions,
it might be more appropriate to move the wait queue declaration and its
related changes to acpi.c in where the its caller is.
You mean drivers/cxl/acpi.c and not drivers/cxl/core/acpi.c right? The core one is my mistake and I'm going to create a patch to remove that.
DJ
Thanks
Zhijian
+
bool cxl_mem_active(void)
{
if (IS_ENABLED(CONFIG_CXL_MEM))
@@ -19,6 +22,7 @@ bool cxl_mem_active(void)
void cxl_mem_active_inc(void)
{
atomic_inc(&mem_active);
+ wake_up(&cxl_wait_queue);
}
EXPORT_SYMBOL_NS_GPL(cxl_mem_active_inc, "CXL");
@@ -28,8 +32,25 @@ void cxl_mem_active_dec(void)
}
EXPORT_SYMBOL_NS_GPL(cxl_mem_active_dec, "CXL");
+static bool cxl_pci_loaded(void)
+{
+ if (IS_ENABLED(CONFIG_CXL_PCI))
+ return atomic_read(&pci_loaded) != 0;
+
+ return false;
+}
+
void mark_cxl_pci_loaded(void)
{
atomic_inc(&pci_loaded);
+ wake_up(&cxl_wait_queue);
}
EXPORT_SYMBOL_NS_GPL(mark_cxl_pci_loaded, "CXL");
+
+void cxl_wait_for_pci_mem(void)
+{
+ if (!wait_event_timeout(cxl_wait_queue, cxl_pci_loaded() &&
+ cxl_mem_active(), 30 * HZ))
+ pr_debug("Timeout waiting for cxl_pci or cxl_mem probing\n");
+}
Return-Path: <linux-kernel+bounces-673364-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id A553341E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:36:15 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 7434A1887500
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:36:24 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 628DD290DA9;
Wed, 4 Jun 2025 14:35:53 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="H23h20oS"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9805A2900B7;
Wed, 4 Jun 2025 14:35:52 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749047752; cv=none; b=DK1UZ/VyTALGS248AqqqL1JRrQOPm/dR8A0Xyw4jHSRnFmrnpjxX0mFlSeYXEgPNZRZac4REuGMk6/bugzJ1sURaDeNezdCtbmVqTbGb1CuNodvA213CecDsmts716CdtnPheS7AUETrimi9vtpBEWRfFRNIr2XkXXin+UP73PQ=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749047752; c=relaxed/simple;
bh=5t5I2NI/JMw2bEnJTqzhPKY9bh0Wo+3tCVbzxMva+CQ=;
h=Date:Content-Type:MIME-Version:From:Cc:To:In-Reply-To:References:
Message-Id:Subject; b=aTq61p5kqUYb5+DS65EdAT0MQ9ytztl3IDZ/TVUwaFp8KCNoKudI4EnbO0bMmGU3oQDxgxSiZD6Js9fZZIcI9SiFjUnPhDbNUHVpBf3QDV6Ec/UDdk7AWgCC14Rockaux1Mu7/hvXGIxQAAPEd1Q+d6XlKMKI9c2Q2hcJ4e43Fw=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=H23h20oS; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id CBA53C4CEE4;
Wed, 4 Jun 2025 14:35:51 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749047752;
bh=5t5I2NI/JMw2bEnJTqzhPKY9bh0Wo+3tCVbzxMva+CQ=;
h=Date:From:Cc:To:In-Reply-To:References:Subject:From;
b=H23h20oSkr5wnFXM8TFWBPGBAlo37cL9WeSh/3XpfRiqO85sbEluXHlyKDm6X+t4c
QxYRJ3LVtLul3FRNiRQzBU33RJVk/E2DSICZKHACGdrVOiF0pwy7YNX/utROFlN0xO
hkh/cOB0+K4gsRhr9bQV1KcPc3R+vMucXPoCviDd9Rz11hGxrmIj3xgQMPN3Gq0XXD
ydSmYx9TTcSovNlXaONNOmh7clCqKil33EG5EoalAZWs4zpkpwGdPjU8Em9EZe46Nn
ywAnKMrukcXgt2qVw3z+13ID6t4yYshD2Wy7cImNWDX/CVuTRNOUQPq88FigswQ5op
ybAzCNkTM9Ehg==
Date: Wed, 04 Jun 2025 09:35:49 -0500
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
From: "Rob Herring (Arm)" <robh@xxxxxxxxxx>
Cc: devicetree@xxxxxxxxxxxxxxx, conor+dt@xxxxxxxxxx, krzk+dt@xxxxxxxxxx,
jassisinghbrar@xxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx,
linux-aspeed@xxxxxxxxxxxxxxxx, joel@xxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
andrew@xxxxxxxxxxxxxxxxxxxx
To: Jammy Huang <jammy_huang@xxxxxxxxxxxxxx>
In-Reply-To: <20250604125558.1614523-2-jammy_huang@xxxxxxxxxxxxxx>
References: <20250604125558.1614523-1-jammy_huang@xxxxxxxxxxxxxx>
<20250604125558.1614523-2-jammy_huang@xxxxxxxxxxxxxx>
Message-Id: <174904774987.4021667.10220150728052993146.robh@xxxxxxxxxx>
Subject: Re: [PATCH v2 1/2] dt-bindings: mailbox: Add ASPEED AST2700 series
SoC
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, 04 Jun 2025 20:55:57 +0800, Jammy Huang wrote:
Introduce the mailbox module for AST27XX series SoC, which is responsible
for interchanging messages between asymmetric processors.
Signed-off-by: Jammy Huang <jammy_huang@xxxxxxxxxxxxxx>
---
.../mailbox/aspeed,ast2700-mailbox.yaml | 57 +++++++++++++++++++
1 file changed, 57 insertions(+)
create mode 100644 Documentation/devicetree/bindings/mailbox/aspeed,ast2700-mailbox.yaml
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mailbox/aspeed,ast2700-mailbox.example.dtb: mailbox@12c1c200 (aspeed,ast2700-mailbox): reg: [[0, 314688000], [0, 512]] is too long
from schema $id: http://devicetree.org/schemas/mailbox/aspeed,ast2700-mailbox.yaml#
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20250604125558.1614523-2-jammy_huang@xxxxxxxxxxxxxx
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
Return-Path: <linux-kernel+bounces-673365-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 4783F41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:36:44 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id BF91216F81C
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:36:35 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id CD16E291179;
Wed, 4 Jun 2025 14:36:12 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="b7BBpsxB"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id DBBFF28FABD;
Wed, 4 Jun 2025 14:36:11 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749047772; cv=none; b=d2mdjn8RvPv42LheeaLHFrzTK3wylrtRH6VZhIHZM8z6tOnAARGmugxEk1NnHG87RMUvWAgklu1HJARztN9MfK8qvHYWsaYx+on5inFZb4vNMUBubbIoyyClP2b8i0e0YPJQe9QPMNnd5Vm0AueymdSty86Qao4zDOirrCldDzs=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749047772; c=relaxed/simple;
bh=iInHrdEOEAauKbKtOoFyyL5VvQglkhpPuAxPB+SSYRM=;
h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version; b=B/i+mLv6f242f4gT3dgYLpUK3Yi6lQTX7hJ/IHsVCBMzsWxL9CrE6otidtUM/Zdq7BJnfyu5rpJ5xIg9nq+2hB6jQtFhEIiqxUYC84PRyJVL/bbxsscLBc/mTU7Unbev/w1pzHjPPBKdynLREkqC69v0s5k++86QNUn8uDgSnuc=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=b7BBpsxB; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id B6A39C4CEF0;
Wed, 4 Jun 2025 14:36:11 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749047771;
bh=iInHrdEOEAauKbKtOoFyyL5VvQglkhpPuAxPB+SSYRM=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=b7BBpsxBFbfZopvrATcBzQ6LEpTB3Ytqoa4O7+fND8JRpXi75bW/rkuia0QVNfYYT
COPnyyO7obEnPzcFZ8VAfRx313MarloovuChc5bgnXwNchWxDYVB/bLeDZn6iVegYK
LoCAwP6TYLcogkHvJgC/TU2kfoqyPAmTfC4CljmK/scFgNeJ/WwPyIxkdpkt0xePKU
OcrDFEBBJLWPxWOn2rDyqy31kMcSi6Wt9FlS+CXnd+QhWfsurl9RbPLcjsQRJB8/6U
wGw71xQ+TMRGSGq4hReLvRiTFUeJCebkBktCI5TB0RUkbRBV4J+4zrgbhn3zYoBG+x
XtcxxJ3lMXkmg==
Received: from johan by xi.lan with local (Exim 4.97.1)
(envelope-from <johan+linaro@xxxxxxxxxx>)
id 1uMpDt-000000006nO-3W0M;
Wed, 04 Jun 2025 16:36:09 +0200
From: Johan Hovold <johan+linaro@xxxxxxxxxx>
To: Jeff Johnson <jjohnson@xxxxxxxxxx>
Cc: Miaoqing Pan <quic_miaoqing@xxxxxxxxxxx>,
Baochen Qiang <quic_bqiang@xxxxxxxxxxx>,
linux-wireless@xxxxxxxxxxxxxxx,
ath11k@xxxxxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx,
Johan Hovold <johan+linaro@xxxxxxxxxx>,
stable@xxxxxxxxxxxxxxx
Subject: [PATCH v2 4/5] wifi: ath11k: fix source ring-buffer corruption
Date: Wed, 4 Jun 2025 16:34:56 +0200
Message-ID: <20250604143457.26032-5-johan+linaro@xxxxxxxxxx>
X-Mailer: git-send-email 2.49.0
In-Reply-To: <20250604143457.26032-1-johan+linaro@xxxxxxxxxx>
References: <20250604143457.26032-1-johan+linaro@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Add the missing memory barrier to make sure that LMAC source ring
descriptors are written before updating the head pointer to avoid
passing stale data to the firmware on weakly ordered architectures like
aarch64.
Note that non-LMAC rings use MMIO write accessors which have the
required write memory barrier.
Tested-on: WCN6855 hw2.1 WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.41
Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
Cc: stable@xxxxxxxxxxxxxxx # 5.6
Signed-off-by: Johan Hovold <johan+linaro@xxxxxxxxxx>
---
drivers/net/wireless/ath/ath11k/hal.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath11k/hal.c b/drivers/net/wireless/ath/ath11k/hal.c
index b1f5a927dddd..927ed2bc3fbf 100644
--- a/drivers/net/wireless/ath/ath11k/hal.c
+++ b/drivers/net/wireless/ath/ath11k/hal.c
@@ -862,7 +862,11 @@ void ath11k_hal_srng_access_end(struct ath11k_base *ab, struct hal_srng *srng)
if (srng->ring_dir == HAL_SRNG_DIR_SRC) {
srng->u.src_ring.last_tp =
*(volatile u32 *)srng->u.src_ring.tp_addr;
- *srng->u.src_ring.hp_addr = srng->u.src_ring.hp;
+ /* Make sure descriptor is written before updating the
+ * head pointer.
+ */
+ dma_wmb();
+ WRITE_ONCE(*srng->u.src_ring.hp_addr, srng->u.src_ring.hp);
} else {
srng->u.dst_ring.last_hp = *srng->u.dst_ring.hp_addr;
*srng->u.dst_ring.tp_addr = srng->u.dst_ring.tp;
@@ -871,6 +875,10 @@ void ath11k_hal_srng_access_end(struct ath11k_base *ab, struct hal_srng *srng)
if (srng->ring_dir == HAL_SRNG_DIR_SRC) {
srng->u.src_ring.last_tp =
*(volatile u32 *)srng->u.src_ring.tp_addr;
+ /* Assume implementation use an MMIO write accessor
+ * which has the required wmb() so that the descriptor
+ * is written before the updating the head pointer.
+ */
ath11k_hif_write32(ab,
(unsigned long)srng->u.src_ring.hp_addr -
(unsigned long)ab->mem,
--
2.49.0
Return-Path: <linux-kernel+bounces-673367-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 12FB841E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:36:55 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 2B6F5171427
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:36:44 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 152C129186F;
Wed, 4 Jun 2025 14:36:13 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Lysf+n/a"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3367B290D92;
Wed, 4 Jun 2025 14:36:11 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749047772; cv=none; b=Zw4Nma7bEJct46p38RK0mxBSIZx2LYSVESnmBJtBmM+HlI3ZfvPVB0xF8GRevYTAHU6OqXbj4WTwMAsScK2ZDGdZqs7mDodfne+QA5bfHjdQVBOT/mUGoqNRlc2FhL2okakYrMAYX0OkrGECW502lGjkYWIGZFnEQDDbjcQn9SQ=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749047772; c=relaxed/simple;
bh=DW6mEbuQyQES+wh95ZJKakXUt1S6KLMtCRzsr6ZDdtA=;
h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version; b=KhPkdiUQOAaDhjM4uZwt9pV6Q06swj15WFNGTGQCCSsTqbcE/ojczcWQClGsqLVuymJ6xP3j0bqppitKyGwS4sBKv0PXRcp/sjDueYTFHLBXsPJZ49QQODKwu4b+zki1l1hGee2Rk6FhrHFcJOn7oOOpCpUntvzmkk1fzNymi5w=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Lysf+n/a; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id AEDFBC4CEEF;
Wed, 4 Jun 2025 14:36:11 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749047771;
bh=DW6mEbuQyQES+wh95ZJKakXUt1S6KLMtCRzsr6ZDdtA=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=Lysf+n/azHWgbuQ9uSkAK1Ifb5SCGPn0sQRiTUEsGntJDK+/eR/FK+4ryOoOv8nF5
W2LwOSRVIVOTcBh15tVq9WbKcZpPs5T52PzF2jURQEa7BQv3qtrSO6bjtmahKRKKxT
HW/ZIejZ5o3qUM6q/W4gokOA+fZ/+7fqqhpKT+iBFIrOYJKmCngyiQOc0fuB0g8Nug
OXZ/WlBw9KUMdM5d1Sb0AHa7U8QWbOeoifl1K1qohgJhb5vrvYwAOaF1Y63tC2RXg5
bkk30pDpznPgDj9O2xbskVOoicVLeT9akWs7Vl2BMamTTZyp6i1u3YjY+tNQSWCCym
UEb76AQbavP4w==
Received: from johan by xi.lan with local (Exim 4.97.1)
(envelope-from <johan+linaro@xxxxxxxxxx>)
id 1uMpDt-000000006nM-38jX;
Wed, 04 Jun 2025 16:36:09 +0200
From: Johan Hovold <johan+linaro@xxxxxxxxxx>
To: Jeff Johnson <jjohnson@xxxxxxxxxx>
Cc: Miaoqing Pan <quic_miaoqing@xxxxxxxxxxx>,
Baochen Qiang <quic_bqiang@xxxxxxxxxxx>,
linux-wireless@xxxxxxxxxxxxxxx,
ath11k@xxxxxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx,
Johan Hovold <johan+linaro@xxxxxxxxxx>
Subject: [PATCH v2 3/5] wifi: ath11k: use plain accesses for monitor descriptor
Date: Wed, 4 Jun 2025 16:34:55 +0200
Message-ID: <20250604143457.26032-4-johan+linaro@xxxxxxxxxx>
X-Mailer: git-send-email 2.49.0
In-Reply-To: <20250604143457.26032-1-johan+linaro@xxxxxxxxxx>
References: <20250604143457.26032-1-johan+linaro@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
The read memory barrier added by commit ab52e3e44fe9 ("wifi: ath11k: fix
rx completion meta data corruption") is enough to guarantee ordering
also for plain descriptor accesses so drop the unnecessary READ_ONCE().
Tested-on: WCN6855 hw2.1 WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.41
Signed-off-by: Johan Hovold <johan+linaro@xxxxxxxxxx>
---
drivers/net/wireless/ath/ath11k/dp_rx.c | 22 +++++++++-------------
1 file changed, 9 insertions(+), 13 deletions(-)
diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c
index d8dab182a9af..218ab41c0f3c 100644
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
@@ -2637,7 +2637,7 @@ int ath11k_dp_process_rx(struct ath11k_base *ab, int ring_id,
struct ath11k *ar;
struct hal_reo_dest_ring *desc;
enum hal_reo_dest_ring_push_reason push_reason;
- u32 cookie, info0, rx_msdu_info0, rx_mpdu_info0;
+ u32 cookie;
int i;
for (i = 0; i < MAX_RADIOS; i++)
@@ -2654,7 +2654,7 @@ int ath11k_dp_process_rx(struct ath11k_base *ab, int ring_id,
(struct hal_reo_dest_ring *)ath11k_hal_srng_dst_get_next_entry(ab,
srng))) {
cookie = FIELD_GET(BUFFER_ADDR_INFO1_SW_COOKIE,
- READ_ONCE(desc->buf_addr_info.info1));
+ desc->buf_addr_info.info1);
buf_id = FIELD_GET(DP_RXDMA_BUF_COOKIE_BUF_ID,
cookie);
mac_id = FIELD_GET(DP_RXDMA_BUF_COOKIE_PDEV_ID, cookie);
@@ -2683,9 +2683,8 @@ int ath11k_dp_process_rx(struct ath11k_base *ab, int ring_id,
num_buffs_reaped[mac_id]++;
- info0 = READ_ONCE(desc->info0);
push_reason = FIELD_GET(HAL_REO_DEST_RING_INFO0_PUSH_REASON,
- info0);
+ desc->info0);
if (unlikely(push_reason !=
HAL_REO_DEST_RING_PUSH_REASON_ROUTING_INSTRUCTION)) {
dev_kfree_skb_any(msdu);
@@ -2693,21 +2692,18 @@ int ath11k_dp_process_rx(struct ath11k_base *ab, int ring_id,
continue;
}
- rx_msdu_info0 = READ_ONCE(desc->rx_msdu_info.info0);
- rx_mpdu_info0 = READ_ONCE(desc->rx_mpdu_info.info0);
-
- rxcb->is_first_msdu = !!(rx_msdu_info0 &
+ rxcb->is_first_msdu = !!(desc->rx_msdu_info.info0 &
RX_MSDU_DESC_INFO0_FIRST_MSDU_IN_MPDU);
- rxcb->is_last_msdu = !!(rx_msdu_info0 &
+ rxcb->is_last_msdu = !!(desc->rx_msdu_info.info0 &
RX_MSDU_DESC_INFO0_LAST_MSDU_IN_MPDU);
- rxcb->is_continuation = !!(rx_msdu_info0 &
+ rxcb->is_continuation = !!(desc->rx_msdu_info.info0 &
RX_MSDU_DESC_INFO0_MSDU_CONTINUATION);
rxcb->peer_id = FIELD_GET(RX_MPDU_DESC_META_DATA_PEER_ID,
- READ_ONCE(desc->rx_mpdu_info.meta_data));
+ desc->rx_mpdu_info.meta_data);
rxcb->seq_no = FIELD_GET(RX_MPDU_DESC_INFO0_SEQ_NUM,
- rx_mpdu_info0);
+ desc->rx_mpdu_info.info0);
rxcb->tid = FIELD_GET(HAL_REO_DEST_RING_INFO0_RX_QUEUE_NUM,
- info0);
+ desc->info0);
rxcb->mac_id = mac_id;
__skb_queue_tail(&msdu_list[mac_id], msdu);
--
2.49.0
Return-Path: <linux-kernel+bounces-673369-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 98ACC41E003FB
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:36:55 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 8BF49188C0E9
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:36:59 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 21B23291867;
Wed, 4 Jun 2025 14:36:13 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="dUkq26Bs"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 33830290D98;
Wed, 4 Jun 2025 14:36:11 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749047772; cv=none; b=tooKKPTcVoS8TEtEl7oE9cHzblmTBfNogECe3JRCoogPH74UMc+GDx7ypwn+OzWFo/qIT6DMwjRBQHrsOBlpiHT/fxW/N9hZNxazlXad4wSlmICKUDVoFA83aa6TU+UOJxPTounNldrZG+Fh+3tEf4jj4Y9vGo2P2StSc37tdeE=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749047772; c=relaxed/simple;
bh=bBea28t9w+SP1kNsex5/pyeXu82UeQzcQARI9RSlSM4=;
h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Etra8fjndHO7si73KZmiW/Pli3SqjdqGH0NZ7QDDmPtkuoGYpDHnXGWZWjVti0VHyyw0CmU2izMUUVm9yGCDc/jWbmZNAFDHLok1zFJbR4+narHskcgVpnUEQGfIt7clCYE3ktk/zfga/EDfsvkSfGu0WuyCptsli5OE5MWVPno=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=dUkq26Bs; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id B409FC4CEF2;
Wed, 4 Jun 2025 14:36:11 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749047771;
bh=bBea28t9w+SP1kNsex5/pyeXu82UeQzcQARI9RSlSM4=;
h=From:To:Cc:Subject:Date:From;
b=dUkq26BsEXCfX18Btfq6dPJlC2IbQpDL6jXDEumT+Gx5glJFMW4x2LqrNW14t+eHT
tV4OvgxC83dt1vyxXUPBVby5KIq/++XnNQkef+xl2b2D7OpbGzVLV5QCINhYHW+ABI
maXCX+aRn0SMC4+g+zLGOS/1k9mAKHooFCMI+dnCrjWhEkOS0NCbMZzaeFzHkOvVgc
gQjgUy1R8GxDImMQHcjYwetRb2r1a7h9ELMZqeSH3itKuoMekmfxI9GenySvWtNRwg
HptPzz/9psi13fW39DOc7rqArk5EtJajnjIKbYPG8O0c8a9a+U/T4j5LpqRo17X5Bc
i9aRyVIgSesPg==
Received: from johan by xi.lan with local (Exim 4.97.1)
(envelope-from <johan+linaro@xxxxxxxxxx>)
id 1uMpDs-000000006nG-3IZb;
Wed, 04 Jun 2025 16:36:09 +0200
From: Johan Hovold <johan+linaro@xxxxxxxxxx>
To: Jeff Johnson <jjohnson@xxxxxxxxxx>
Cc: Miaoqing Pan <quic_miaoqing@xxxxxxxxxxx>,
Baochen Qiang <quic_bqiang@xxxxxxxxxxx>,
linux-wireless@xxxxxxxxxxxxxxx,
ath11k@xxxxxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx,
Johan Hovold <johan+linaro@xxxxxxxxxx>
Subject: [PATCH v2 0/5] wifi: ath11k: fix dest ring-buffer corruption
Date: Wed, 4 Jun 2025 16:34:52 +0200
Message-ID: <20250604143457.26032-1-johan+linaro@xxxxxxxxxx>
X-Mailer: git-send-email 2.49.0
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
As a follow up to commits:
6d037a372f81 ("wifi: ath11k: fix ring-buffer corruption")
ab52e3e44fe9 ("wifi: ath11k: fix rx completion meta data corruption")
add the remaining missing memory barriers to make sure that destination
ring descriptors are read after the head pointers to avoid using stale
data on weakly ordered architectures like aarch64.
Also switch back to plain accesses for the descriptor fields which is
sufficient after the memory barrier.
New in v2 are two patches that adds the missing barriers also for source
rings and when updating the tail pointer for destination rings.
To avoid leaking ring details from the "hal" (lmac or non-lmac), the
barriers are added to the ath11k_hal_srng_access_end() helper. For
symmetry I therefore moved also the dest ring barriers into
ath11k_hal_srng_access_begin() and made the barrier conditional.
[ Due to this change I did not add Miaoqing's reviewed-by tag. ]
Johan
Changes in v2:
- add tested-on tags to plain access patches
- move destination barriers into begin helper
- fix source ring corruption (new patch)
- fix dest ring corruption when ring is full (new patch)
Johan Hovold (5):
wifi: ath11k: fix dest ring-buffer corruption
wifi: ath11k: use plain access for descriptor length
wifi: ath11k: use plain accesses for monitor descriptor
wifi: ath11k: fix source ring-buffer corruption
wifi: ath11k: fix dest ring-buffer corruption when ring is full
drivers/net/wireless/ath/ath11k/ce.c | 3 ---
drivers/net/wireless/ath/ath11k/dp_rx.c | 25 +++++++-----------
drivers/net/wireless/ath/ath11k/hal.c | 35 +++++++++++++++++++++----
3 files changed, 39 insertions(+), 24 deletions(-)
--
2.49.0
Return-Path: <linux-kernel+bounces-673368-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 8297B41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:36:58 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 513F9189B689
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:37:02 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 39BC229187C;
Wed, 4 Jun 2025 14:36:13 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qdBENElc"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 33722290D96;
Wed, 4 Jun 2025 14:36:11 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749047772; cv=none; b=Nvm423kg31OEuUTbGtIsiXkdT9A6fiu4JGXjrMtWVKvIEHdOjzidf8XZclcjyrEiweMJDoO+O+OxyunSpxNMRDsCwArMOMsJdwAJe+aoSCpOg/6ha9JiyBEo6DuIor6k5BtwLoGBUB+nSztcr6hRec/8NsUYXMYTjbu3a1f2ODo=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749047772; c=relaxed/simple;
bh=/zzi6edlAiK18uDL8yHhaQ7i1Hb+UhqE68J4prJl4Hw=;
h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version; b=IsZ0wyneg4u5eHudkH/y2fNMdJgYyb1zF6hUi3EDqj46iUiFuiDHXgv5caZ71UmNd7D4MBH5ejTm9g/NmAzGe0dAyeBDAUsjas2dd24yy35WnfTh/Qmpy89Ezz9Tws4BSpKgOtgucBISDjtztgwPdUTkSbFERM3JAwNGQ4y9peQ=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qdBENElc; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id AB22BC4CEE7;
Wed, 4 Jun 2025 14:36:11 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749047771;
bh=/zzi6edlAiK18uDL8yHhaQ7i1Hb+UhqE68J4prJl4Hw=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=qdBENElcS8mRW39RzMtwzygdmcDwxPfh6UUJ7n5r6Dteh2mdRalIvLpn1XjoGw0yx
MP4KwJ+tcd/6z1Kk64pnImRMJ5dqyo0NR9u2CrmFRx3gq4h37QPShCsc6eH2DVrqD5
U3JfpI6e4cs7Lw76MRQZLSGd1+BDVrZfDuOVBpt653pN3nNIpoZXSPKjl2+MkXTnsw
/ZfoTSqzxs9ffrX722j0GIrjUwr6tpMMhSjbuVPLIW+WJEyCfAHiQRKyC/cla/5HYh
AiAoR1v3vXNz+6IwNdyAfOPbBqE+DA/30TVG4ML8ToqgSUXLKp4/lXMIaWf6+B+Uak
SQ+Tq3wvzXbQA==
Received: from johan by xi.lan with local (Exim 4.97.1)
(envelope-from <johan+linaro@xxxxxxxxxx>)
id 1uMpDt-000000006nK-2oE5;
Wed, 04 Jun 2025 16:36:09 +0200
From: Johan Hovold <johan+linaro@xxxxxxxxxx>
To: Jeff Johnson <jjohnson@xxxxxxxxxx>
Cc: Miaoqing Pan <quic_miaoqing@xxxxxxxxxxx>,
Baochen Qiang <quic_bqiang@xxxxxxxxxxx>,
linux-wireless@xxxxxxxxxxxxxxx,
ath11k@xxxxxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx,
Johan Hovold <johan+linaro@xxxxxxxxxx>
Subject: [PATCH v2 2/5] wifi: ath11k: use plain access for descriptor length
Date: Wed, 4 Jun 2025 16:34:54 +0200
Message-ID: <20250604143457.26032-3-johan+linaro@xxxxxxxxxx>
X-Mailer: git-send-email 2.49.0
In-Reply-To: <20250604143457.26032-1-johan+linaro@xxxxxxxxxx>
References: <20250604143457.26032-1-johan+linaro@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
The read memory barrier added by commit 6d037a372f81 ("wifi: ath11k: fix
ring-buffer corruption") is enough to guarantee ordering also for plain
descriptor accesses if the length helper is ever inlined so drop the
unnecessary READ_ONCE().
Tested-on: WCN6855 hw2.1 WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.41
Signed-off-by: Johan Hovold <johan+linaro@xxxxxxxxxx>
---
drivers/net/wireless/ath/ath11k/hal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath11k/hal.c b/drivers/net/wireless/ath/ath11k/hal.c
index 921114686ba3..b1f5a927dddd 100644
--- a/drivers/net/wireless/ath/ath11k/hal.c
+++ b/drivers/net/wireless/ath/ath11k/hal.c
@@ -599,7 +599,7 @@ u32 ath11k_hal_ce_dst_status_get_length(void *buf)
struct hal_ce_srng_dst_status_desc *desc = buf;
u32 len;
- len = FIELD_GET(HAL_CE_DST_STATUS_DESC_FLAGS_LEN, READ_ONCE(desc->flags));
+ len = FIELD_GET(HAL_CE_DST_STATUS_DESC_FLAGS_LEN, desc->flags);
desc->flags &= ~HAL_CE_DST_STATUS_DESC_FLAGS_LEN;
return len;
--
2.49.0
Return-Path: <linux-kernel+bounces-673366-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 372AC41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:37:08 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 8C74A188C533
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:37:10 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 7A7C8291888;
Wed, 4 Jun 2025 14:36:13 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="uUc7QGkL"
Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2074.outbound.protection.outlook.com [40.107.93.74])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id C3F1D28FFEF
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:36:10 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.93.74
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749047772; cv=fail; b=RP6pIgp7H7mCtFNBoBil50z9r+pDOYfMORrM+D8pOGLRfsjxf8ZmVVUjXiKRCSIzS/x6s9GqOWiOayY7yDX2Rsg36HtGCsOEpOCIgeeVmBZ1KGNrbMNKxI6d/abQ8HZdAXEi8/YY0xAIr/qHrfnGMDGd4rFFmz+X52TbFlxRFKo=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749047772; c=relaxed/simple;
bh=m6ESjw2pLIjvKhkS5VpsOJhSDscWa1TKgG+lm+fZL3c=;
h=From:To:Cc:Subject:Date:Message-ID:Content-Type:MIME-Version; b=YuFc15Dqh6RuSOhSsXxEKgJ3hBInlyFEQ/HCun6wkPOphw4j/xvPzz9jsEFtSNNn0lb2hm71Vv8R2hferVYnB0NUy2AJftJE2BKr5/BIq90XJvdjP525wzkUfGelftDMdE2+L1rgznjVkWc8W2QCqtt1RPE5MUvN+DJR6CKdR64=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=uUc7QGkL; arc=fail smtp.client-ip=40.107.93.74
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com
Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=yViOWNolCP3iEgoPO+gcqwTOkfF94hmF1G2c9AJJrGbauLHSXY9UpJedp2QcKaPt3OGLHKBZlRtoQkCSMPeisXzmcD1ynXwycSFQB4vJ15PdOZLo0aKJZq0VaqFGjcbNAdzpEWumarh5w3vU4/V6BZW5mdDGYsPrytcFF99lN8+mVQphinnvU/o6ZfJKHwwqWINGE/B5HvsiAHLqGPCyJ+qIUuBimTP8Pfpw8DJQBBFvfjkXSQuHbVJCnlq8MEgLI1jPVTIu/oyK/oGD5x+xMsrkLcdLymYJw8Ufb+cU52VqxlOf9T9sS2H0euGkol+jFCbd4sjBAJuKzPxXORlehg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=9s/yTnKDzuWbMIfg88a4Zlq4bAAm0ikOQlU+8uKRMrs=;
b=i94jKQT+s8dbfWB1rRFuF+kAaSpR1iZ8FIgKR1Xl7avcco8EX65vqFGRHabYyrLXmhmofqd+B1T/Gur3q4AjgqKG71bSJVL9hjTwybEu0xVzNMAa/C5Gsez3TiCscQbzjL4GYUY2wnkXbxXkoV4Od82mZpJzjRul8jToZDPlbsFULOJRNgmtpgiWcl9xc5ID+gg/mQ0EQEh9yGJWRnPATr0yv+iJLTntTRhR53xRs2UAo/QNa5PGCJUptwjfu4P1fEmrPWVJsaCRu28thnhCmIy6WS9Uin1/ZOkSPUc4oCXAcUt6wHU28LkpZhwu4MVXgb/9PoBAHK0UhMozCNhiGQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com;
dkim=pass header.d=nvidia.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;
s=selector2;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=9s/yTnKDzuWbMIfg88a4Zlq4bAAm0ikOQlU+8uKRMrs=;
b=uUc7QGkLHjYRlK3qpYhFYiL6O+M2x540qz8K4j/rUH9vsIMvVCcsjSEY/8EimQW7Leu9tYX1Ui7QbYIMatYzkUCfX2vpuWSGQnNFECqg5b8Dt4X65xkXrxOylqP5PZ5PDCUfUE/5UvDMIirxO1ULUJsMxISUE1bFYipYFptooWHBXu9LjQ4uOeIZKbrGzgZ3t3FTkG4cIqj8vvnhogth+rd5NWANkv6BkIe5xkg/4uorLsdbM+dOCl79usDddLy9qd7ds+X4tBo7hdmAfhdSzkTI4Cq03M9PVw0rSBInFAOqkJMMs63gHP+atQ1zklm8c8Htk4WIxdMwqFW1yQ/Rfw==
Authentication-Results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=nvidia.com;
Received: from LV8PR12MB9620.namprd12.prod.outlook.com (2603:10b6:408:2a1::19)
by LV8PR12MB9270.namprd12.prod.outlook.com (2603:10b6:408:205::11) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.34; Wed, 4 Jun
2025 14:36:07 +0000
Received: from LV8PR12MB9620.namprd12.prod.outlook.com
([fe80::1b59:c8a2:4c00:8a2c]) by LV8PR12MB9620.namprd12.prod.outlook.com
([fe80::1b59:c8a2:4c00:8a2c%5]) with mapi id 15.20.8792.034; Wed, 4 Jun 2025
14:36:07 +0000
From: Andrea Righi <arighi@xxxxxxxxxx>
To: Tejun Heo <tj@xxxxxxxxxx>,
David Vernet <void@xxxxxxxxxxxxx>,
Changwoo Min <changwoo@xxxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx
Subject: [PATCH 0/4] sched_ext: Improve code modularization
Date: Wed, 4 Jun 2025 16:33:10 +0200
Message-ID: <20250604143547.708202-1-arighi@xxxxxxxxxx>
X-Mailer: git-send-email 2.49.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain
X-ClientProxiedBy: ZR0P278CA0084.CHEP278.PROD.OUTLOOK.COM
(2603:10a6:910:22::17) To LV8PR12MB9620.namprd12.prod.outlook.com
(2603:10b6:408:2a1::19)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: LV8PR12MB9620:EE_|LV8PR12MB9270:EE_
X-MS-Office365-Filtering-Correlation-Id: 476ef614-f648-4c55-7884-08dda3752441
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014;
X-Microsoft-Antispam-Message-Info:
=?us-ascii?Q?0Nz1IhO04XbC5Iv3cDgiukbyM5eXQPXoPyEV4vbzTowMRSbPWTT257YIRQIQ?=
=?us-ascii?Q?AVw4rrdFePBcLALCw5ek7QIv/9OxPKehw9uJ0k4ND4nsjrzNIVncYOO/1HlE?=
=?us-ascii?Q?QFw/Fm8qQn1kirJ2nDVr4obzDo4QaD4VtLqAd6snVfwCxCImrscjPxgyNeS4?=
=?us-ascii?Q?q/b0afgk59CD5HwGYUQMdodXWk9zzoQAUGeMG/vh2F/S/CH6n+AWzk4+BzJ/?=
=?us-ascii?Q?u5KGxvdh4LZGYH9TXc0QNtkr8BQ/bzyMSvvO+79kpMje0Cj7YjJ0tyvkkVtP?=
=?us-ascii?Q?+ca+g4K7u5KDQFrylj8Ml0/SznZp3Ie4EPgF4rqy8I3yGxn1+ouWKi6tGrr7?=
=?us-ascii?Q?h8U+3pfbwvKTa7z7D4aGUoPrKpVi4qCABtyFbks0XJWk3ii5BnG2Y+vsz0dD?=
=?us-ascii?Q?FEaO55Qgk+4OSF6ACESZbDyP2X7KvpEFan/JXOSFiO+VqWYbzzi0HTQpIw49?=
=?us-ascii?Q?bmLw64/Arfp2Xw7u+0K5V+Vw2P4yWL2L5vIAdqw+54auO3u+9qwYGCTkku4z?=
=?us-ascii?Q?kG106u6S0RFmbSmkEJtomWcFxRxGEA8O60xByudMz2lzflkEERtP+gdQo10F?=
=?us-ascii?Q?WF0B/hlmbwtLc2sFN7WxkkGlt8EwsR6EqAQnb+lgcv1Y3UZj7vC8oCkjaC6S?=
=?us-ascii?Q?YTBvRQYJ9TX/i4XlzpTzTz7LOKA5CyCOzYNJ5Of6DbAtWJ8n62fo0ISCoc5u?=
=?us-ascii?Q?eN7n4ASBYIjIy86VYI709ExsubGn6z1egrbHFANEB7Fe1WQf4VMVRSTqNydO?=
=?us-ascii?Q?XfOE9LXg2YL9oqtkKNoJg5/RLMvzM0mr3QPJLWeWbU8axBUQsJbrb1+5qg8+?=
=?us-ascii?Q?eojNh2EweR8ASby02ZClQ7mMKcPPI5RpcqvhOlPcnqsb0UxRgSDwglh0DMmM?=
=?us-ascii?Q?5drpYYZccM+j/7Iv4FZfkcpZNuxFCsj8IcqI00CCEW6Dcv1kAwqZJmRidgPV?=
=?us-ascii?Q?YsGLCmrKwDUnA6UE0l1hq3LoILRyb9upc7asHV/MwEax5HfZm5IgAn54Hejb?=
=?us-ascii?Q?smFEuoorkC28Uyjejt4s5WHoHoxZYh6U49taNQxD3OFw97KHDkC45058+nuK?=
=?us-ascii?Q?I+XvhnLgEytmOTtXUdvBBFVfoFf3kea5GDGDs+hyvksoFgYSIzD5TZoDXdDQ?=
=?us-ascii?Q?vf+QaLbrO/r7Iqj4enjiYYVv3atAt33cgK7n6YHkm1KxiJkKhQs/W0OxdSUH?=
=?us-ascii?Q?7KG334YvD1A62bkNMF+pjoCey/9cukxzEy9JMTZv9qrm7oaNzn6mC9/qYr1I?=
=?us-ascii?Q?d/Rb5MQT11eh0jMD8PCm87l3wepJwe95B49s2xEKZ9HFt84JvIokX/W3dZWJ?=
=?us-ascii?Q?yFVGuKAq5u0ZVsYE1Ek/JQTtWML0uS8mI+gi/c9X7b4X9enUDNE0LcxMrlZ7?=
=?us-ascii?Q?ej1WNxl2Xa/uaehSIzxgeloCPD5JQw9Q/7uF3d48IuelY5qfG0Tm9Jwx1a/7?=
=?us-ascii?Q?AFkIti2CAAk=3D?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:LV8PR12MB9620.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?us-ascii?Q?dgLMVMYhAM2908K+140/LCy+/8eErW3TLKJyvvO16eX+YnLYL9+9rFprdlrF?=
=?us-ascii?Q?MtS/AWGHcxpFPaW358B+XSbtjoK2YBcv+NGCzveugLwQl+3cF6X4GbniUUMz?=
=?us-ascii?Q?NesAQxxeVs3YJgBGwzgSjdk0Y+SciAMGRz1tJYSeO70lZXWqGtuKmthFQsX+?=
=?us-ascii?Q?DDDctYqI4gdb1Hy9yOFbzB6e8IKTsv+76SP8azO8Bu7GvjQoYi2wVnURqxxB?=
=?us-ascii?Q?/mpICH4Zn+cZ3grN77IUroBnQva9X2x/oaVsBJNBaHXWPykGCaZUTDIwB18L?=
=?us-ascii?Q?PGR2IEnqy98lFdAP4i6J+DeAKm0dFVcugI/vxgaExE+jNeEkZbeVM9WLB58N?=
=?us-ascii?Q?x7Kpm6IhFiquhKliYRmr3Tox/rIXZC4y2d9LsgSjknmphcXK+zi55QvBoBBw?=
=?us-ascii?Q?OVE6FPvCKNIVaw22cdaOKqoYQxVPRXsaVs0v47T+Qydhqvf12oleqT2feeKf?=
=?us-ascii?Q?O+x+L8pt2wSZR06tXKBca8odNgmMD7wswEsaSVxHCdEF7Me81cT/yY0b5PzQ?=
=?us-ascii?Q?d9E6Pbb+u1lzGmD6WUQ4rFt6ldy/lZYpVFU595CQvinZOiLTnH5FHll7Is6p?=
=?us-ascii?Q?0eEj/cGzwJUvTgaEV9GUSGANTnyCIRk3j4ts17BPHl0HC6M5YUo9y72uk1T3?=
=?us-ascii?Q?C9R1yW3OrXL+GELZvNUjsyPUTTAZZs5ACtlMv4/HhBHoOeZ26Bvk40YVBpnq?=
=?us-ascii?Q?mtsnYWNtUSyuD/Zhhr8qqYq4evOrHOd3UK+NiQcbrtw4rUDoxUzKINdx3fri?=
=?us-ascii?Q?gfikUHOOPLzmQq3bVAF/2m/jIoNuWf16CuaO9VGyOT01b02WCNZd7uGuylh8?=
=?us-ascii?Q?K+x6NTacM8slCEnkvk+z1kJ6xD3Ir7ucPA1ib6Cp9CnqozvSXmbYl30ykbCm?=
=?us-ascii?Q?k2HHvJZUlZqIQ0NTCcptT6z7CMEn2b3AhbVtUseTguSPODRA2z+mfBIaDYEn?=
=?us-ascii?Q?SQPnzNtnTJJhqbovT3kIb7WbmJtiypKte1uYScLSD8WmJunIyOUT7IptxlVS?=
=?us-ascii?Q?RYc/5leS4B4MLI0qBya+xRQY9qb0kDzNQAdzMvr4MJ+79fBJriQAovYWyNgf?=
=?us-ascii?Q?rcOv3qMyJs1shn4cUrBXBhA9O8PxFz2IsyKfDFQhpU9LKB4mXUsS+IVDVrwu?=
=?us-ascii?Q?88emY5isydcs3kSzxqaCFqGFUAdFaGR30ryw7J5lCJR8RhpJCdnGHC3B3U3M?=
=?us-ascii?Q?Gm9fNzulYy/Lb6Qsa0uhv7RV7hRfeqBk/5srzuB+TSlhBH0bJblZ7zkoiGlb?=
=?us-ascii?Q?MfMpRBl4kP7MBIGT4ZoEX6bQ2lOUq6ieUsYCgihSFBTow2dPNl38lMhve9aC?=
=?us-ascii?Q?DYJTR0APJ9TWPPgPFlZpk3dsq019EJExWwSC226PBOqkZ2iMQdLJr6b4kNhg?=
=?us-ascii?Q?ZPtROV7i004JRYhJvoIGQue7QlMgYVy1mS2KbwuN33mNBh2GSpZLqGfIlRS9?=
=?us-ascii?Q?YG4e5CFOJTM8QBtPnmZyCdW8elWUNnwnAyFrxyR29blcsP9AWGjOmaWjgkZk?=
=?us-ascii?Q?L6YL3K99ciQH1NbwWd5FIbiaTFozioDW3okxPxf6SmY4KSC29VMiX2eeJoBu?=
=?us-ascii?Q?4I2CixK5Holyjw5fw3BjCt58EWigQDOg1ZpKsoGt?=
X-OriginatorOrg: Nvidia.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 476ef614-f648-4c55-7884-08dda3752441
X-MS-Exchange-CrossTenant-AuthSource: LV8PR12MB9620.namprd12.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 14:36:07.3279
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: RgzGgC7NGsmJxHPU3iXJ4/tWUh4VAujUAi85YiizlDOX1zbj6OCSzJsjRSQ7VvxJcFQBungOuIvRE5p+WnRBxg==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV8PR12MB9270
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Despite the unusual structure of the scheduler code, where the source code
of all scheduler classes is included in a single .c file, we should still
structure the code as if each .c file were a standalone build unit. This
means marking internal functions as static, declaring shared symbols via
proper function prototypes in a header file, etc.
This patch series is a first step toward such cleanup for the sched_ext
code. There is more work to do, but these changes are intentionally small
to minimize potential disruption to the ongoing development, laying some
groundwork for a cleaner and more maintainable code.
Andrea Righi (4):
sched_ext: idle: Remove unnecessary ifdef in scx_bpf_cpu_node()
sched_ext: idle: Make local functions static in ext_idle.c
sched_ext: Make scx_rq_bypassing() inline
sched_ext: Make scx_locked_rq() shared
kernel/sched/ext.c | 7 +------
kernel/sched/ext.h | 7 +++++++
kernel/sched/ext_idle.c | 28 +++++++++++++++++-----------
kernel/sched/ext_idle.h | 7 -------
4 files changed, 25 insertions(+), 24 deletions(-)
Return-Path: <linux-kernel+bounces-673370-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 62CD341E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:37:51 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 141EC189B7D7
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:37:51 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 2E19F29208F;
Wed, 4 Jun 2025 14:36:16 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="j00OG5J5"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 33794290D97;
Wed, 4 Jun 2025 14:36:11 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749047772; cv=none; b=HVkBAoti+kR/WxIRO+fggV/BJETn07QdoGanFYAmZDIkKa8Nk2wRCjYrLCVT3QCIjrIYNo7VxJMZwaOQ4XAlOXBBPXT/tisxU42Fk3VsHBTbZSdAppwxSwi2FWPPM+0ZVqd4Z/sIoFfOwF/ozq75rVCID+EA7eH/btGRWD+UsFQ=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749047772; c=relaxed/simple;
bh=Gd8bNH4eeleNqcHxXwFWJ/GaXC03Dj2GFIogXH8ZkaU=;
h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version; b=VqPDqzntr6f/Pd1Y6xv0M2v0gvHMfoaaS3u4RaYEYCOhIuqfge6SVdjZr5GY9MGjSiid+Piidei1SM9BksoRrz1gL5KL9jXj1qQPjWHFvRjDwYVeAysIe79anyJp7SMAujZqBGNhNukicW2/GOAV3TksNqDZ/6jdGN+diiDpsYM=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=j00OG5J5; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id B1301C4CEF1;
Wed, 4 Jun 2025 14:36:11 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749047771;
bh=Gd8bNH4eeleNqcHxXwFWJ/GaXC03Dj2GFIogXH8ZkaU=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=j00OG5J5HF4kj/561Bz1sf5az8cyRrRHdNZ43EQB0S/0LcALd9ZRMd0C/yt1skJVm
yuuX7WEfkV65KZ+RRzSy0PTG7S4hLHxbOsLhctKlqa18SADU1yfr0CF0aSICdYMsvP
rMVKTufQESH3r5OmHxq6ee1MY/3dIxUTpJB7MKZMJz2vlXAVuXNW6hfcnIQapyT9x8
GzoJs1v/B0UztuE+cNRpDISfg3lawMCIrIUrXrBNJgfJFL22df03IXij4qMk9H7s4k
x08mWS4hoE0mDCc6oMRqYvUDjVCRq9TI1Q4MvBcNLyAH9eH5rwOHy5mqLqLZHpr0ym
2hwiWSPeS4pkw==
Received: from johan by xi.lan with local (Exim 4.97.1)
(envelope-from <johan+linaro@xxxxxxxxxx>)
id 1uMpDt-000000006nI-2OJP;
Wed, 04 Jun 2025 16:36:09 +0200
From: Johan Hovold <johan+linaro@xxxxxxxxxx>
To: Jeff Johnson <jjohnson@xxxxxxxxxx>
Cc: Miaoqing Pan <quic_miaoqing@xxxxxxxxxxx>,
Baochen Qiang <quic_bqiang@xxxxxxxxxxx>,
linux-wireless@xxxxxxxxxxxxxxx,
ath11k@xxxxxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx,
Johan Hovold <johan+linaro@xxxxxxxxxx>,
stable@xxxxxxxxxxxxxxx
Subject: [PATCH v2 1/5] wifi: ath11k: fix dest ring-buffer corruption
Date: Wed, 4 Jun 2025 16:34:53 +0200
Message-ID: <20250604143457.26032-2-johan+linaro@xxxxxxxxxx>
X-Mailer: git-send-email 2.49.0
In-Reply-To: <20250604143457.26032-1-johan+linaro@xxxxxxxxxx>
References: <20250604143457.26032-1-johan+linaro@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Add the missing memory barrier to make sure that destination ring
descriptors are read after the head pointers to avoid using stale data
on weakly ordered architectures like aarch64.
The barrier is added to the ath11k_hal_srng_access_begin() helper for
symmetry with follow-on fixes for source ring buffer corruption which
will add barriers to ath11k_hal_srng_access_end().
Tested-on: WCN6855 hw2.1 WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.41
Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
Cc: stable@xxxxxxxxxxxxxxx # 5.6
Signed-off-by: Johan Hovold <johan+linaro@xxxxxxxxxx>
---
drivers/net/wireless/ath/ath11k/ce.c | 3 ---
drivers/net/wireless/ath/ath11k/dp_rx.c | 3 ---
drivers/net/wireless/ath/ath11k/hal.c | 12 +++++++++++-
3 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/drivers/net/wireless/ath/ath11k/ce.c b/drivers/net/wireless/ath/ath11k/ce.c
index 9d8efec46508..39d9aad33bc6 100644
--- a/drivers/net/wireless/ath/ath11k/ce.c
+++ b/drivers/net/wireless/ath/ath11k/ce.c
@@ -393,9 +393,6 @@ static int ath11k_ce_completed_recv_next(struct ath11k_ce_pipe *pipe,
goto err;
}
- /* Make sure descriptor is read after the head pointer. */
- dma_rmb();
-
*nbytes = ath11k_hal_ce_dst_status_get_length(desc);
*skb = pipe->dest_ring->skb[sw_index];
diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c
index ea2959305dec..d8dab182a9af 100644
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
@@ -2650,9 +2650,6 @@ int ath11k_dp_process_rx(struct ath11k_base *ab, int ring_id,
try_again:
ath11k_hal_srng_access_begin(ab, srng);
- /* Make sure descriptor is read after the head pointer. */
- dma_rmb();
-
while (likely(desc =
(struct hal_reo_dest_ring *)ath11k_hal_srng_dst_get_next_entry(ab,
srng))) {
diff --git a/drivers/net/wireless/ath/ath11k/hal.c b/drivers/net/wireless/ath/ath11k/hal.c
index 8cb1505a5a0c..921114686ba3 100644
--- a/drivers/net/wireless/ath/ath11k/hal.c
+++ b/drivers/net/wireless/ath/ath11k/hal.c
@@ -823,13 +823,23 @@ u32 *ath11k_hal_srng_src_peek(struct ath11k_base *ab, struct hal_srng *srng)
void ath11k_hal_srng_access_begin(struct ath11k_base *ab, struct hal_srng *srng)
{
+ u32 hp;
+
lockdep_assert_held(&srng->lock);
if (srng->ring_dir == HAL_SRNG_DIR_SRC) {
srng->u.src_ring.cached_tp =
*(volatile u32 *)srng->u.src_ring.tp_addr;
} else {
- srng->u.dst_ring.cached_hp = READ_ONCE(*srng->u.dst_ring.hp_addr);
+ hp = READ_ONCE(*srng->u.dst_ring.hp_addr);
+
+ if (hp != srng->u.dst_ring.cached_hp) {
+ srng->u.dst_ring.cached_hp = hp;
+ /* Make sure descriptor is read after the head
+ * pointer.
+ */
+ dma_rmb();
+ }
/* Try to prefetch the next descriptor in the ring */
if (srng->flags & HAL_SRNG_FLAGS_CACHED)
--
2.49.0
Return-Path: <linux-kernel+bounces-673371-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id BA89A41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:38:11 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 8E9933A817D
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:37:14 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 3361D290D9D;
Wed, 4 Jun 2025 14:36:16 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="EWPkp9GI"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id A3C62291162;
Wed, 4 Jun 2025 14:36:12 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749047772; cv=none; b=tJSdz9oHogR9VHJVMyc86VO8zwvZgLA0oV/wsr3hspNApM6bU/xjAenhmb58mC0hLOt0NNnQSuDwd5azC2HLODL3hFHAk/ydz5Tldtcw1p5LL0fFrS/gkQnmO8cfdrfF3q/iUOflBJqnq0m+g5Pu3EngG9f+5Yyyzo9CE1XrmVw=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749047772; c=relaxed/simple;
bh=57PGqZIr4MccX98/Q9s3avEIt4j4j+e1Z330hecZA8c=;
h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version; b=QgUNcHN8pd4GI2Lmxf9XVWMY8oBFq96AT0m1yaGf7TeWMVwEM/xDkE4KgEL9I25z4v94AcXHQRs0rfsiwNvloCPGpM314iHEPLkQXg00bVpZc2pQZWhs7pw2qA8P9miQ8E7BO93wCsIKKH7nhV3fyOlpBUDQ+k7uJspO6YAvcvc=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=EWPkp9GI; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1EA9AC4CEE4;
Wed, 4 Jun 2025 14:36:12 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749047772;
bh=57PGqZIr4MccX98/Q9s3avEIt4j4j+e1Z330hecZA8c=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=EWPkp9GIk6Tclt42p7KK/Qk0o++CraPChb3Lhx0BjWRxcV9ea3KG8TYrsT5s9wUmO
yYGkzR/9gDPYZaIRx9cYxGlGBSS5feyKj08Flsx6haFbRnZ7wPrn585ftDZkNVuN/X
nFtI3N512CiJURPD7pdOODbFzWESo99WEKK/DN4xr8wOXc+uGc3NEGcQvlukjK81Ji
wQuDutr3o7GoTvwHNwhyYux63/UNasbADPm9ZgJPMASFv54qZ+4ZuX0VdEibef1wT2
yT7/aX5SVWq3RlDNa7mrosS5ftbmrf2WIu4n4hOd01CfMZXsRb+01NapgT8vEWqGsf
RdEDX8/GdM/Yg==
Received: from johan by xi.lan with local (Exim 4.97.1)
(envelope-from <johan+linaro@xxxxxxxxxx>)
id 1uMpDt-000000006nT-3w5U;
Wed, 04 Jun 2025 16:36:09 +0200
From: Johan Hovold <johan+linaro@xxxxxxxxxx>
To: Jeff Johnson <jjohnson@xxxxxxxxxx>
Cc: Miaoqing Pan <quic_miaoqing@xxxxxxxxxxx>,
Baochen Qiang <quic_bqiang@xxxxxxxxxxx>,
linux-wireless@xxxxxxxxxxxxxxx,
ath11k@xxxxxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx,
Johan Hovold <johan+linaro@xxxxxxxxxx>,
stable@xxxxxxxxxxxxxxx
Subject: [PATCH v2 5/5] wifi: ath11k: fix dest ring-buffer corruption when ring is full
Date: Wed, 4 Jun 2025 16:34:57 +0200
Message-ID: <20250604143457.26032-6-johan+linaro@xxxxxxxxxx>
X-Mailer: git-send-email 2.49.0
In-Reply-To: <20250604143457.26032-1-johan+linaro@xxxxxxxxxx>
References: <20250604143457.26032-1-johan+linaro@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Add the missing memory barriers to make sure that destination ring
descriptors are read before updating the tail pointer (and passing
ownership to the device) to avoid memory corruption on weakly ordered
architectures like aarch64 when the ring is full.
Tested-on: WCN6855 hw2.1 WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.41
Fixes: d5c65159f289 ("ath11k: driver for Qualcomm IEEE 802.11ax devices")
Cc: stable@xxxxxxxxxxxxxxx # 5.6
Signed-off-by: Johan Hovold <johan+linaro@xxxxxxxxxx>
---
drivers/net/wireless/ath/ath11k/hal.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath11k/hal.c b/drivers/net/wireless/ath/ath11k/hal.c
index 927ed2bc3fbf..7eeffb36899e 100644
--- a/drivers/net/wireless/ath/ath11k/hal.c
+++ b/drivers/net/wireless/ath/ath11k/hal.c
@@ -854,7 +854,6 @@ void ath11k_hal_srng_access_end(struct ath11k_base *ab, struct hal_srng *srng)
{
lockdep_assert_held(&srng->lock);
- /* TODO: See if we need a write memory barrier here */
if (srng->flags & HAL_SRNG_FLAGS_LMAC_RING) {
/* For LMAC rings, ring pointer updates are done through FW and
* hence written to a shared memory location that is read by FW
@@ -869,7 +868,11 @@ void ath11k_hal_srng_access_end(struct ath11k_base *ab, struct hal_srng *srng)
WRITE_ONCE(*srng->u.src_ring.hp_addr, srng->u.src_ring.hp);
} else {
srng->u.dst_ring.last_hp = *srng->u.dst_ring.hp_addr;
- *srng->u.dst_ring.tp_addr = srng->u.dst_ring.tp;
+ /* Make sure descriptor is read before updating the
+ * tail pointer.
+ */
+ dma_mb();
+ WRITE_ONCE(*srng->u.dst_ring.tp_addr, srng->u.dst_ring.tp);
}
} else {
if (srng->ring_dir == HAL_SRNG_DIR_SRC) {
@@ -885,6 +888,10 @@ void ath11k_hal_srng_access_end(struct ath11k_base *ab, struct hal_srng *srng)
srng->u.src_ring.hp);
} else {
srng->u.dst_ring.last_hp = *srng->u.dst_ring.hp_addr;
+ /* Make sure descriptor is read before updating the
+ * tail pointer.
+ */
+ mb();
ath11k_hif_write32(ab,
(unsigned long)srng->u.dst_ring.tp_addr -
(unsigned long)ab->mem,
--
2.49.0
Return-Path: <linux-kernel+bounces-673372-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 9A5CC41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:38:34 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 08A2D3A864F
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:37:35 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id CCFF5290DAC;
Wed, 4 Jun 2025 14:36:20 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="EKkmRZBj"
Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2062.outbound.protection.outlook.com [40.107.96.62])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 70278292096
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:36:18 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.96.62
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749047779; cv=fail; b=nVuUiJPkqX1f6KbpjSGyI9r5/ZdkgUtOt8bTHZtgEMcsiVcHeMXvn6PYiY/0NAC4KKeDk7oS0MEmAtcR+EeLvoC7KVqUYzA8cpifGaMdpM/Ovfr8JQTB74CKuhBLMXzGjqKVKdmcztAY3eGte1FUlWrJrVphliM4wm5RIYw5c5s=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749047779; c=relaxed/simple;
bh=SJ+J9fWrrUhY0OA+TLkB+MGCVw2DF37/6kljT6710h8=;
h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
Content-Type:MIME-Version; b=r7KqUe7OxSVnBk8MY5/vCZM4BrfpK3EUW8fsC0pp6inq6d5avO0bOlytaHHcZKKO6l8zCueBemnHcCzrA+ii10VOSWut5vHF6EIImIkckTRL3PztTjHK9IgQ+Hh//aZptki5nJ+6uTcLjT1Py3YJpTjWXMrzrXMj19AFTA+LrHg=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=EKkmRZBj; arc=fail smtp.client-ip=40.107.96.62
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com
Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=aX44ohmEnv97mNDbrTndQI1Eqk6iUTAC88r1i3oHn6r62zZJtbUD0VJD4iZyIShe31CxTpDbQn6T5Em4iGMDJWQ2DX3AczFfEWdVzNCB/k2yBSl4WeCt/q8MalfyENS3NUYX6KgsrJmm9PaZgEN8BnR37ovigJzlRz9iBXCiVfTKuLLnwJHpztOL9lJy/JSAz4QMBNV/Cv5AQ+jTFI44qCwLx0XpwIBuuv0/BhGcvJ8PnlxMDHXwaapMm4N5VuSZF8Hb/ze0ZcQbReG/qp183pi3UMwSg5r5Ns6rgQtv82cAjqitBqpm3J5NJju0QPKMm4Kr5/sGC53H4JUyFIQDtw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=crzL18A/NKnDwPKQ5CwVYhV8XAia61ZUqlNuNiggeOY=;
b=Q5CZ4+CpsN/jt69hQcQL94EwPF8ZJyEEed2m3HA5uJ7pMelv+f0+ATBLOvWkzzp5nDfheRVFkPCNZl852PpT3Wmo3x9744nbNW2ftGL94/PhH0mypNX/MCU44XYkC8xV+qQMv/h6XIghetaAOWIcCgbe77Ixpe7BDi69MhfppWVYOWdkVdUMQYsWt1YECt/lTk5zBiRrcc8tG2E84PcoNauORyAiYHTtZl93McdUC+CzWRSUrIrJu1h6gjlmc/YlQmrQK7XE9l2FQpKlOIyFnwcju/163v7MVQd59221fW8VneT+kFu06sIhYNSJjHAszI9MvTRM/eyzpjDDBvd2tA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com;
dkim=pass header.d=nvidia.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;
s=selector2;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=crzL18A/NKnDwPKQ5CwVYhV8XAia61ZUqlNuNiggeOY=;
b=EKkmRZBjUDN84gTTawgfQ+C3hVOvAGBJO9ZTjmw4FFApGtb4kod5B+e16/bMdLToGHp8e/4V3fwg+mEjJV6ZyD4VpPzIlkG9+1RMKToWjuldS7d3+kaxQpAIYUuFL1fagz9SdyFfTzlMqLbcWt2EU3RZa4V41ErncfKF/CiWW+DZiHecqURLXplkZXde+wVkjRski1e3sDuoO71pB+Ohv4nBdNVREWJfk1i2egEaWRLVEYIps43A/bHCWUHEWVMntEMOB3d326Y8VjZAndDmnUQVnn8+nfl8C53m5cMGg+CAvioYvmNFjg5J0Xb00a4FQshIOStKp/S+PFdaDaIqog==
Authentication-Results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=nvidia.com;
Received: from LV8PR12MB9620.namprd12.prod.outlook.com (2603:10b6:408:2a1::19)
by LV8PR12MB9270.namprd12.prod.outlook.com (2603:10b6:408:205::11) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.34; Wed, 4 Jun
2025 14:36:15 +0000
Received: from LV8PR12MB9620.namprd12.prod.outlook.com
([fe80::1b59:c8a2:4c00:8a2c]) by LV8PR12MB9620.namprd12.prod.outlook.com
([fe80::1b59:c8a2:4c00:8a2c%5]) with mapi id 15.20.8792.034; Wed, 4 Jun 2025
14:36:15 +0000
From: Andrea Righi <arighi@xxxxxxxxxx>
To: Tejun Heo <tj@xxxxxxxxxx>,
David Vernet <void@xxxxxxxxxxxxx>,
Changwoo Min <changwoo@xxxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx
Subject: [PATCH 1/4] sched_ext: idle: Remove unnecessary ifdef in scx_bpf_cpu_node()
Date: Wed, 4 Jun 2025 16:33:11 +0200
Message-ID: <20250604143547.708202-2-arighi@xxxxxxxxxx>
X-Mailer: git-send-email 2.49.0
In-Reply-To: <20250604143547.708202-1-arighi@xxxxxxxxxx>
References: <20250604143547.708202-1-arighi@xxxxxxxxxx>
Content-Transfer-Encoding: 8bit
Content-Type: text/plain
X-ClientProxiedBy: ZR2P278CA0034.CHEP278.PROD.OUTLOOK.COM
(2603:10a6:910:47::15) To LV8PR12MB9620.namprd12.prod.outlook.com
(2603:10b6:408:2a1::19)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: LV8PR12MB9620:EE_|LV8PR12MB9270:EE_
X-MS-Office365-Filtering-Correlation-Id: db21fd96-ddee-41cf-56c4-08dda3752942
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014;
X-Microsoft-Antispam-Message-Info:
=?us-ascii?Q?2Y56EYI13OlnDOCO2ISWZiuBgh417W5R6juZJBqdFTzPHG6717bjoVad7q2B?=
=?us-ascii?Q?d9h1Zrvxq9t11kxrQockuercFlTdUQqq9415JtajQyo7/WVD73r5aa6XODWF?=
=?us-ascii?Q?cE4a89gMKDG5GE0R4eJHNXNAm+0K7lpLpuvtrDFeSXfYMyiZkewM3cVaLw03?=
=?us-ascii?Q?xoEOnsNwxylF3tAUGfA+yuwzoe7IsDQB8wJFON83/JW9qYyuIllphXEFevfR?=
=?us-ascii?Q?/giHGQhGeQrnYbRqXhYkGKaoDQBi6cusCkGOuEHlUiiwXbMIShCiiR/WCb2X?=
=?us-ascii?Q?j0pM8695AXNycekuTayB2/if0cmPe+T+3i6XwrKVVFqjTRbPFcnG3jzWZ7aH?=
=?us-ascii?Q?8zK0fpI8qb+sXCjb4VouipzvqQvtQuRJ4wTu93aORaleMdPsJYf14qxe24/0?=
=?us-ascii?Q?KkL3Uwoo/9vxeIvq9Yqahsch//k29SnIJUm1e/TJHCYeTyVBI0vxaXe0/7xQ?=
=?us-ascii?Q?iYpSaPyo4zZPLDsJrhwVYbAg4NhOOD3tjhMXREMbUmZy4Wh+u5OCHajOzL3J?=
=?us-ascii?Q?KwospRxvQ6jGoVpzFZBGNTam+pY7XXzFPvmW6rjxRlQoPZK2lZUW2J9OX6bq?=
=?us-ascii?Q?d20MBRWflNFLNV6K8DldFfv09TCfHikyAlSMaUYy4HMgONNEucHzdHq+B530?=
=?us-ascii?Q?xGDdZyslGOsZqSiAJjuXJZbFdL5FKa9wWdfXA4yVDu4ib7wHah8wLr7bn7rO?=
=?us-ascii?Q?jUmzA2UcDQJLjgpAyMMoRmqnqye+U87+DZe+Qg/cRPxr/9Jtdb7bR4uT3SY3?=
=?us-ascii?Q?Eicp4+t6nqoMtT+1YHOtGapq3Jk2CPm5oEcTmgXEHndojUbzKAvPT/1jdEp6?=
=?us-ascii?Q?pCtMjBFDZ/NX9ue6uYpIfrqQ0Y39fjL8RKujyAZqHjqxHvYfB8WVaR7dIwV+?=
=?us-ascii?Q?6V27EnLKkhC5B7gASPOwzrTjt78vRKpe0nUfsBRdnPNsQD0zDvauAL1r9hv3?=
=?us-ascii?Q?/U+JosbaAG2+gnRi66+Sxsjk0ikDvxhKJ7RoSAPX3k5CPfIr1jQZvutV1Ihs?=
=?us-ascii?Q?v587vzZn+O8gcmQyzDVuEYOXNzAJz0aItol/30hCvNE0A0WbFClW7gqRu0qC?=
=?us-ascii?Q?i987hCOe77IaDmlkBF/9xW7vL5ZFaKDj7AJevB5oCeOo58WzyL38oUiGopnI?=
=?us-ascii?Q?SGHggwVzjXeoIqtIdrcoUVi2TJlW14uwIPoZYQn/ZCUyyVmb7s+Zr0qpY2yN?=
=?us-ascii?Q?irZq3nEUkDZH04v/gRKXtfYR6EG1xxiMGbrCcJRx5piXCDgQJX8pS2fZd4oq?=
=?us-ascii?Q?MTzrtINwJvfOYpZOynrrbRnS4/NjkBCZy1k3Um0K18vRWPsvsx+0q9TsHclV?=
=?us-ascii?Q?F+V/jYLa6F7i6xDhctGJiecfurjHs/WLwyFvW5yOjapa6tkErDUD1sR3zf3z?=
=?us-ascii?Q?QW2wtsPqD/ENIPY1rYkS3/YVtx5pCaY98RKpXeP9l9/y6UukFQ=3D=3D?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:LV8PR12MB9620.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?us-ascii?Q?eeSoy/rMBxQ936074w4Mq/uGsebx/HvEiPGzkjXKGlwHNtJD1ryHW52Cc6wH?=
=?us-ascii?Q?J8BQ1LQE96Dmv+Z+pjAUEcl3I5boEk5INyrmZf7MolI3u9vx6Kr3ZJuDQM4a?=
=?us-ascii?Q?5OHbu2dktJtItzZW4end9nCqKRQ1JsJf7xlK9XkJhuyRGcMZ6Eq8F00/NHdH?=
=?us-ascii?Q?Mj5YZq3wMaSCGjv57g+51JwOK0QK42zZYQRo/KSAonWDPNEHa5ZniSDjuSnq?=
=?us-ascii?Q?hZn1SV6MwFwTmNKoTD778DmaXHAxSycdBIkX1YBMRIJ6kY2SfMnroga0VdVO?=
=?us-ascii?Q?1l2FwnhVa4QMaS70+oPkWrsWdKl6IGrgvv1nGAknFzjKnn/qmNbyfpv0z2VM?=
=?us-ascii?Q?F/F6jcTBxHlJd9j2aJ3jCLmqXfe07KIIgN3aZQkWF7NrQ0XaTMRG/iUz2k2e?=
=?us-ascii?Q?mlvcfHB7X/dqRlVDN6FSWjEkfa4Nf4YiqUDoMElfFOBVl+BfYaDfRhATqEOa?=
=?us-ascii?Q?eLCs87QOMOYgjZ17S695vo0MnE3IHFhiu/H6NAnIYRjMHAqjbisUQgi4ss4k?=
=?us-ascii?Q?WVU7S8ksl8TOPhDANNcdGL1qWgJCsR3tskWTDao4MzYae0iJAQ1o4dVx5130?=
=?us-ascii?Q?3c1LcjBhIe+uPT2VWL7WVGGoeyubGZabNvp8kIx8PKLpRY77fL1cmhGqZvW8?=
=?us-ascii?Q?RkqRf5uZH20IOg9q8TgZLo6GKr8jDUoz/2FPhkLiWzivakGbdZUXbu93IoVW?=
=?us-ascii?Q?ZJr63WIvBqe69EVdj58n8M5sZ3+s1IDLXW9ptLV16CdpClrZXrXe2yU6ZdVm?=
=?us-ascii?Q?q9AC5ySDcH7c7Mfif1/qwVPssYzpKliv7oTEvZmCssl2A/CH/vBfIlFUbjWc?=
=?us-ascii?Q?yCUATnVN9LToo4t4UOK2ISh2UYR6NfvyCd7zTYt9xuoA4E35yP8+qjA34FtI?=
=?us-ascii?Q?O/tDofcUO90BzkEunNTMUsexVFHxDcxSCfwnVDC7u52ffZNg34diJ/jjpaos?=
=?us-ascii?Q?t0X2b3m9WP0ivCl1WMP3MiZV0E44ELL6k/HcNaJYF3eOon4eQ/BtHg2P+JFC?=
=?us-ascii?Q?HknUirE9b0IoiB5vckivuswK3+D7B58cG4TngJF5T+2mT0cHCvJ1Fj1BMNZm?=
=?us-ascii?Q?Ip/Q11X/m4FaNRmLsNQ/bo2j4TYFjZzK8yNcFaYSZkLr4pYKbaAO89ujj0jn?=
=?us-ascii?Q?dPDWOHe3/pmxWNARASvpt89mWn67sd9IDOuv8Z4jMqncKU0p2/FuRgTepw6V?=
=?us-ascii?Q?PxSvd7e9kyYAtBhs50TAuZB/B9zzsj8noPafpMjbr6tOIwTWPNDQf0K6dA7q?=
=?us-ascii?Q?we6lbtJ1bc16IqwO14iFTfD/Qu9GsFRXtscosFylayrMuFbb3OkrhNTD3CZ1?=
=?us-ascii?Q?AaBwko5vASAxelKpbgNfDu0/nuXVQnm9kbAESW/646mZeBTiOaNd5qSbVKd7?=
=?us-ascii?Q?J3Q9vCO7liH5PSxBsD+MH9/NzqLTbSjKdtNG5vxLUv/OQ0wPdwv4SEO1v7TI?=
=?us-ascii?Q?UoQkrOJb1lx0dAj2JLf8QRksCCJH7D4uZDggJQWGdhaiYkN/4Q/tZeRr1GwE?=
=?us-ascii?Q?kbSYzlSgPQZ7xsqAUBswmM/fFroaxV0UYk/S/y30S1y94Mb9kAQ+qXUcOlsw?=
=?us-ascii?Q?PyWgkXU4MuLin3EkKEu+SGUeiJmkBMK2YhdVK3sW?=
X-OriginatorOrg: Nvidia.com
X-MS-Exchange-CrossTenant-Network-Message-Id: db21fd96-ddee-41cf-56c4-08dda3752942
X-MS-Exchange-CrossTenant-AuthSource: LV8PR12MB9620.namprd12.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 14:36:15.6447
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: wdmsGUFpb0HyUr3Jlvq8j+kbiPSop8J9KNzDgXI/cqVmUFBpMuCbcnRp3ZABpTL2ukAul1oXgYHHGKaeywysdA==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV8PR12MB9270
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
There's no need to make scx_bpf_cpu_node() dependent on CONFIG_NUMA,
since cpu_to_node() can be used also in systems with CONFIG_NUMA
disabled.
This also allows to always validate the @cpu argument regardless of the
CONFIG_NUMA settings.
Fixes: 01059219b0cfd ("sched_ext: idle: Introduce node-aware idle cpu kfunc helpers")
Signed-off-by: Andrea Righi <arighi@xxxxxxxxxx>
---
kernel/sched/ext_idle.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/kernel/sched/ext_idle.c b/kernel/sched/ext_idle.c
index 6d29d3cbc6707..1598681b681e7 100644
--- a/kernel/sched/ext_idle.c
+++ b/kernel/sched/ext_idle.c
@@ -929,14 +929,10 @@ s32 select_cpu_from_kfunc(struct task_struct *p, s32 prev_cpu, u64 wake_flags,
*/
__bpf_kfunc int scx_bpf_cpu_node(s32 cpu)
{
-#ifdef CONFIG_NUMA
if (!kf_cpu_valid(cpu, NULL))
return NUMA_NO_NODE;
return cpu_to_node(cpu);
-#else
- return 0;
-#endif
}
/**
--
2.49.0
Return-Path: <linux-kernel+bounces-673374-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id AB3EB41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:38:56 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 6C86A3A8940
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:37:56 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 9F92E291178;
Wed, 4 Jun 2025 14:36:38 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="ferO+Drl"
Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2052.outbound.protection.outlook.com [40.107.93.52])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 38F34291177
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:36:35 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.93.52
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749047797; cv=fail; b=nexkgEzCr/l6+ocsLbyLfS7e1+fFXvoJofLvXpkD5WAhjYU7P06OaiC4Bwo6rIpRrviizSIHQVeKnPUgrV0dMA69oWMCTgHLqGLmg0j1pTPTFMngaXEenqVorU3WS0Z4D4ILeHol3iuWZyaNE65nEShclPWtpesiYnYbo+4HWwE=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749047797; c=relaxed/simple;
bh=D0p6dCQ42HaoN9nRHKKv7Utx1zeErDfG1O8RKeb0FF0=;
h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
Content-Type:MIME-Version; b=HvgTF40G5CrCxFndWkoyWsZv9tdg5xJcrUD2T+qak2Y4Bw1SnwTkav/13UHSemEYz03oIzfB8lo03i73k4E4RvkxPeSJOQPl3rd3WP3MT5YKEqbIvEJZECnEgQ/KNuiEtvUTZNMK4K+0CBy+yZJPCyKWVG9VA6m0i5Bc5veH/Nc=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=ferO+Drl; arc=fail smtp.client-ip=40.107.93.52
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com
Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=TnzbV8cI9LpgBK+UtQY/qxL4R0P1+pbQaAd55swlcG+SyrD9fMhD2qdLgHlliLQeRjBt+cir4VXiM64jQFjvFjA/cipcYhEKNeZpnYz0Ycuf2bIw/FjqBRTXPzvBPHqf9O0CeqAwgXh4RMiO1x6sydTcroLQUA4i50CcvNjLf8bH1JoXKf5ZY5mS2HkSD7sV0CdKiL30bORLIArRH40+XCFKkDfSNVtT+LjTxZ2NPgoW0Zr16BfbqhGqIAAN0IGVJN3Gt2cJWcIpNlSxjf0clHIcmRreRNyGzuGuf4fMb/R+pRatNK/LyVlxV+3hkgrE87/emBFTUzerAdqnnRDgRw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=c/BVl2Dnm3KNJS0XaYfJeboM0+w9wUcov/Cww2p+26E=;
b=Ehsm2aFjXXKpsQiZfu3VwfdWvn8drw4fA+PxH/SBnmPJX9hFVFMSkjgWfvkNDhy+GeF5sDkhE6qyGVzRXNwp+lIGdf6/EQBG0GfSJcbObu9Ayfr+zF6d/267X34TxssXAlE8CHiTIyqfg+x6o9tM8PtBmyw7FMOqr7NM80/J1nS2CuKHNDwPt0WvuWmLGNZQVmRYNV1l2cTQlze2N8FM1HmioaK2MR1REV/vuSkB/iJXW7HzGcOsKYdlTaqT1nCaxb2aZSAg1vL1N8P6cBv6gFQShGgVDcNgPjUqems1tcRsmx5M+CasJLTC0wBIejmiLyifpmq0QF5Xe0PaDm5zPA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com;
dkim=pass header.d=nvidia.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;
s=selector2;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=c/BVl2Dnm3KNJS0XaYfJeboM0+w9wUcov/Cww2p+26E=;
b=ferO+DrlBeYTMFK1W9QEv7je8K43jsp6xAKkjlOyVeLvQ9CX2XMwHnNI2lCm44iM1DJ7WPPk4npiPLEmbtVUTs5DXD1K/bWLnYM681Svqg9i5t2b30G3ZTG9cZRsdXPNVFZO7ONEtQXjVEaKDjwB8BhqvGpIHuQrihgR4D7/HcqtzJ8HcWROkpJNKGiJYS+wiHR8ol+yAoQYBKptqrwRfgsBhhimKFP2d/r055Kfo/ajL8/vdMLm5YeDIjhNNwHY/G87JSVcjBNZbF3y0XKmBE3ogtlnNaT5EZ9X4Sdloo9V1gXmF1OaxZwlxTYqRRaq33POfk4xJrTmbmfknxEelA==
Authentication-Results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=nvidia.com;
Received: from LV8PR12MB9620.namprd12.prod.outlook.com (2603:10b6:408:2a1::19)
by LV8PR12MB9270.namprd12.prod.outlook.com (2603:10b6:408:205::11) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.34; Wed, 4 Jun
2025 14:36:32 +0000
Received: from LV8PR12MB9620.namprd12.prod.outlook.com
([fe80::1b59:c8a2:4c00:8a2c]) by LV8PR12MB9620.namprd12.prod.outlook.com
([fe80::1b59:c8a2:4c00:8a2c%5]) with mapi id 15.20.8792.034; Wed, 4 Jun 2025
14:36:32 +0000
From: Andrea Righi <arighi@xxxxxxxxxx>
To: Tejun Heo <tj@xxxxxxxxxx>,
David Vernet <void@xxxxxxxxxxxxx>,
Changwoo Min <changwoo@xxxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx
Subject: [PATCH 3/4] sched_ext: Make scx_rq_bypassing() inline
Date: Wed, 4 Jun 2025 16:33:13 +0200
Message-ID: <20250604143547.708202-4-arighi@xxxxxxxxxx>
X-Mailer: git-send-email 2.49.0
In-Reply-To: <20250604143547.708202-1-arighi@xxxxxxxxxx>
References: <20250604143547.708202-1-arighi@xxxxxxxxxx>
Content-Transfer-Encoding: 8bit
Content-Type: text/plain
X-ClientProxiedBy: ZR0P278CA0216.CHEP278.PROD.OUTLOOK.COM
(2603:10a6:910:6a::7) To LV8PR12MB9620.namprd12.prod.outlook.com
(2603:10b6:408:2a1::19)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: LV8PR12MB9620:EE_|LV8PR12MB9270:EE_
X-MS-Office365-Filtering-Correlation-Id: 192dc0df-c81b-4ef3-1295-08dda3753364
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014;
X-Microsoft-Antispam-Message-Info:
=?us-ascii?Q?F5dT70fNOetRtTXe0wOhkg8ph9TT6hZCSZoFQntYz6DVDvp985vpYfwgv0IJ?=
=?us-ascii?Q?T6LrW9Pd+M2bvf2K4MA/N8JlE02yX8sp6PdoZ+727sxEBl6SuJ0fa34UNjrE?=
=?us-ascii?Q?c0SOawlDL9YNPNiSvZ+CuoqPSh1uTGI3g6BT8P8TmX5iWM6hi7fi03BNIwME?=
=?us-ascii?Q?CIufOcDt8FzHqRIAl+ETLwHL2kZa/UD270yGyj+7Zue2vuFrLmI6WQ4SHIV+?=
=?us-ascii?Q?ykgQHnjIjzsWB5gWrUXaAmGj2QDMdaYaVhRV3BmIi5rn5SnkzOTmBPiR0TCl?=
=?us-ascii?Q?lBUmlthkqjv23zHEM706HvgJEx+7L7pzTcKt1WL7kDIo7d6nnXqpqp0gmMJf?=
=?us-ascii?Q?Nu2QKx5jIeohtcdSSjEOEdR+S7WbqMw2i5f4IZgyG4KbIznOh8sIeNR6gXFQ?=
=?us-ascii?Q?9uCBJl0U7KWtKl+sLdJ4iqYv3cIlItjvHrjGR9bHpo/J2fROQG5NVuOde5xV?=
=?us-ascii?Q?C75XgAir9u5DEQq6+7+o/KJ+WLp/fq+bM45TbKSK2N2r3CSUiWh1JmZYvMIX?=
=?us-ascii?Q?LKQSSKsulBaqD4m2FcFMFNrdOdhmF23M/o7TWiQOCTsrHvh5BVzNnvgQjkuk?=
=?us-ascii?Q?wmOdoF6SkO3eRlvgWb/XJxTs+zN9AVw6JXwhlAIQLEuJS4Gjp8f3ich7JrJi?=
=?us-ascii?Q?ggyxrSCV5gmI9fHASSngBwT/GZQjaP714+dRZ3AW21IdxFzannmm+dJ0YyqX?=
=?us-ascii?Q?wmD/YDScUmLAIK98rjxDKUMg21qPMEDs0rADOCok4INJgYNSNvfoNMpwwW66?=
=?us-ascii?Q?xj7TwhF5/uparuKJxENRGjsaK8j4+MU73kTfmpZQCO2709OmTTqU5wyymbAN?=
=?us-ascii?Q?2sqPQtnOl0NvCc01ow6RbR4qz5AL1Rc64Y0LIRpDgF5DCSCW/n291Lv1h7V7?=
=?us-ascii?Q?5axgqJcxqsnF42IFCseDJlNaG29EEe6drhHDFvbUd7dC9r0WjN3+InOLYUo2?=
=?us-ascii?Q?CCW01Ix264Z0nJfUPLvRpIeKJH3mjEEJxYzZZ0Vcqf/7mIXKZf3+L4z+Txtz?=
=?us-ascii?Q?2s66H7mmrkAP68xnjOrrkWm6ERHjuyI2Lekk/IRUtq72yokrQbritp6KSTlY?=
=?us-ascii?Q?ApjJin1yXIB1tE5Se8FooytO/ksWNgSkrSlMfYevxlWdbjPk/5WNwfkLMIk1?=
=?us-ascii?Q?mnyecmUAxm1fymBlnUwlEQFY5DiocykcCV6m3Rd78NbJdfbSNHMcZCyVLOpA?=
=?us-ascii?Q?ymC51XC2PTYxZtZVmAe1Q7WDg+WY4ZtCKURCRpNvm32KDZ2zFnj7kp0QIkgV?=
=?us-ascii?Q?nJ/avtCX2xaAnKJORzhHoNGoYaqQNMVeWznAr+mH/yvjJ9ckwtroAxYjE/aS?=
=?us-ascii?Q?/V0QX+VPgYVwc0MYiPkAvqRFmT871EDrOKnqpAmbvxU4V1xO0ETiWPt16Hti?=
=?us-ascii?Q?gaugEilzbiBaXLLCU12xZqctzYCtGtJUGR9LbudKU5sJSlHB9w=3D=3D?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:LV8PR12MB9620.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?us-ascii?Q?8myrZtMzDTDThob9KJXqbzRbB9TeGPtuAnlPWb5KCjFcde3Zyi4DUQmqwJV9?=
=?us-ascii?Q?R7mD0CuReMb4+FQ5Am8iTfFYj8ELbEohVO1Owaj/HozjV0CebTs3qbejB3VG?=
=?us-ascii?Q?PDCHVa8FH8AvS55lbi5H9C40Bf9paUmbrLL5RqJM6CGZbVWwy7cd0BLSmv1F?=
=?us-ascii?Q?1G34IMoG/mfuPWOCtwH3SA5WTlBFzwgUzFc7i+Xeab2r8jiwOhRJdn1nvAym?=
=?us-ascii?Q?a7cpZl8ZSMVUfoCG5xAbWVm0rWJRoAY9TzUZwbIBrDNBbkRatWLQhVLsj+2H?=
=?us-ascii?Q?hTYOZqVNSI1Oa+3Rn4IJibts1TbbU8sdtyGwps1X00DRAG/NSQbhFa9at305?=
=?us-ascii?Q?vrV+bmY3hhayh5JojvIsWDqZHsApypKLUZbvlhMy4iOdWpLFh6/w1DqOUX9p?=
=?us-ascii?Q?DjoFD8o53NG6wKXWq2IEB6QiCUngs5zmXSRpSUNkMAHY7FPdLVedyApI0/y1?=
=?us-ascii?Q?uNdUkiIJh6/iWpwx3LPUBzOAqlG/nRvNs2nId5PNWo0ScKW1EuNmKA4ootPf?=
=?us-ascii?Q?QLmwGdoGJadp68FRNfJKEYqIWFh7h9lCo8+ip9EL3GWiX5sCstR/UBX6DtPT?=
=?us-ascii?Q?LbAZfT64S1dCeAKuua30apm0y7/mxV9eaIPbxh3uJk3GAtAZ2zY/KzC3NjH6?=
=?us-ascii?Q?qBPP5uSd5WHrneVmhGtCBvfBDYiDHQ8oAKRV+GlTlLqFE/yttKIc8ft+1ale?=
=?us-ascii?Q?0/CSbAVA37oQMMHRqq1ED3S3hjgw4o1u4uPc2e2b1MThS3SCB0qofjQ0KeLe?=
=?us-ascii?Q?Wh5VAXHikR6Pi+cnFUuEIdI/nbh2rWsf36hoeZGRin62UHnAB9kD9YydGDgL?=
=?us-ascii?Q?cZNob+5doiaIJK7H1cYQ30fumGvxohmbNn5FQfBzgvbtkqu/OzeEPpC1WWNq?=
=?us-ascii?Q?QM23fMemyDGIXiwDnEKYh9IXdPQ9XmL3BW4pNBLV2NEpm0y/NqjGeJqPjOuZ?=
=?us-ascii?Q?+gqtNhWyxoGKy91bR8HI4nguF7wU5TttgMaPddqA7sA9mfJ+BspJRnPNPcbm?=
=?us-ascii?Q?8mWrqDT8ywP4PfYmTAugmKEI58yHJGaPZ9fC5HCRHDfPGa9wRPvYlxmDncM2?=
=?us-ascii?Q?+683xq5zPS6VziRsNNP+ZbHKzoJ1rWWx0q6IVjRD+5a3wLYutD9iq4GIPt/j?=
=?us-ascii?Q?wyRJgHmtDp2xORKQlyFa52k2enzeTR33sObUjYh1h3FOH+L1qPfG+ko0y0Fh?=
=?us-ascii?Q?2GIS+Ml+fwOWR7Qc3LGtK5qBf3GrerQgrJ1LrMfrpUybaxn+LJEy0wR3WV1Q?=
=?us-ascii?Q?LLmgJ+r/m/yI0yHEvbsPy0wh2YtRrbDYrA8ONjE3Vb+iHLIGnK1+pNtJ8JPp?=
=?us-ascii?Q?obR1MpyBCQ7uOacodqeD/+2Drg3dlm2EMx637Lb2uD6wTldDdBUzqtt+Jo4P?=
=?us-ascii?Q?tuEJAbNr29tVgLD8yeI9IlI9xk/Kmm8h6FAGdCwuYHesznzYxGiC/nUTshPx?=
=?us-ascii?Q?dJSwCnaKRmHYPcTBLW9FfWDdlt8r7WqST3r9qIbqbTEbLbSPO0+BhYlPI3i8?=
=?us-ascii?Q?ZLy/KZf8ZhLNm3VoDdx6VDRFdsshj8xZ9k2zymOHS/api+NDPcNFP7NeG79T?=
=?us-ascii?Q?xXgNv+Voj+jgv/Os9+q5TqQf540UcLhcUXAakwP9?=
X-OriginatorOrg: Nvidia.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 192dc0df-c81b-4ef3-1295-08dda3753364
X-MS-Exchange-CrossTenant-AuthSource: LV8PR12MB9620.namprd12.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 14:36:32.6282
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: iI0t8ifT02FQdxXQ2jyE7myICyzS9eU/mjLbtFWLbgSCo5HK6zVPfAUvBwwU9DUBQzlvgbo3CnxG7ytRMmdgLw==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV8PR12MB9270
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
scx_rq_bypassing() is used both from ext.c and ext_idle.c, move it to
ext.h as a static inline function.
No functional changes.
Signed-off-by: Andrea Righi <arighi@xxxxxxxxxx>
---
kernel/sched/ext.c | 5 -----
kernel/sched/ext.h | 5 +++++
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
index 2c41c78be61eb..3e483138dff60 100644
--- a/kernel/sched/ext.c
+++ b/kernel/sched/ext.c
@@ -1701,11 +1701,6 @@ static bool scx_tryset_enable_state(enum scx_enable_state to,
return atomic_try_cmpxchg(&scx_enable_state_var, &from_v, to);
}
-static bool scx_rq_bypassing(struct rq *rq)
-{
- return unlikely(rq->scx.flags & SCX_RQ_BYPASSING);
-}
-
/**
* wait_ops_state - Busy-wait the specified ops state to end
* @p: target task
diff --git a/kernel/sched/ext.h b/kernel/sched/ext.h
index 6e5072f577718..d30f2d1bc00d5 100644
--- a/kernel/sched/ext.h
+++ b/kernel/sched/ext.h
@@ -13,6 +13,11 @@ static inline bool scx_kf_allowed_if_unlocked(void)
return !current->scx.kf_mask;
}
+static inline bool scx_rq_bypassing(struct rq *rq)
+{
+ return unlikely(rq->scx.flags & SCX_RQ_BYPASSING);
+}
+
DECLARE_STATIC_KEY_FALSE(scx_ops_allow_queued_wakeup);
void scx_tick(struct rq *rq);
--
2.49.0
Return-Path: <linux-kernel+bounces-673377-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 6C02A41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:39:00 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 39BCD7A23B6
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:37:40 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id ED6192918C7;
Wed, 4 Jun 2025 14:37:13 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="DMZBH/W6"
Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2055.outbound.protection.outlook.com [40.107.223.55])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 978A6290BD2;
Wed, 4 Jun 2025 14:37:11 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.223.55
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749047833; cv=fail; b=bZ4EtG44LhEi/Vv3hse4p4Qh3pyCzMWtFW8bivsOyLu+0f6n3MyuWcfQ3MqioqF92aJqBIGvp9BeoKU3uHi5qw2gQ+2oGj0VkQC64HTX0CLL/zGqOFTeDx1vwVRocfC660T6D6HSNSAXnicD5X/eOMAuJAFvQ2CYQWBonlFCfes=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749047833; c=relaxed/simple;
bh=lvuaOO+iZH6WOvQiP1yG4LCKLhiuRbEh/clo+PYTBB8=;
h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To:
Content-Type:MIME-Version; b=LcbR0doDiQiYmWZBjd/qOCJGWAE6AlF+5Hmo7n0u7H3VNKtxxBkNTRk0/KoKlZbUguINv/JmVkVAsrjvApKNk78HQsZak+RWScPhqAbC8P9I6VZT53IJO4Sc3ltC0FyRo8trIUuxpmuYDVS+U3V+N1hs6nFP+BX+/aq+a2TwECw=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=DMZBH/W6; arc=fail smtp.client-ip=40.107.223.55
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com
Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=ZKMcuEZoATaYd+RgPLkeN03N4QgVOZHtFixGKwBNG2sr7rKwn+TjwYDwFJvVbEDU9CDVlsVUJfaukpeOB3hY0Yvy9kTyHQ4BUlRLflKGUFfnqHpf5uNOKk//7iGoKCfG+qXymPOQKFR9UAdFwG54AAOuKVq3c/2kDORH4YA00ObWHQL/k3z7MMnpXP+WeoGxSLQxlq1GBtM9Imi6NhcJlDH5TFva4ovWe1Xj+LjiRiVeD7dY7k7n6lbNiYa393y5BNL0mK5op21ofR5M44mE+SkG1Q6j2SI/RDWI1L20wQOs1LI8vpm7PqQ6WQjDRA8rMN4Jwbhq1Q8mCenjJCvUoQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=wvQGJvvrAPvz5NfioA5Y3YU5JcnB1ZdRKXBAW5zqQKQ=;
b=fCfCJo22mmb34AXw8NldjqliCNrJu+RkJ8dKZXXzPSdltUBpTuDYAwJDVeP3tM+MWb9gG9hxbLnyqhDtxVCyZ31XFpl7s2WSFrYec57Nsb3AuyS+GQZ7Rw1wSOVL0A6smuLg+s8s9SFN3PKG68iac1HXGSv1Kb73xfJR8uMGxBhJVX6db5amfGxBHNdjw5+2VFYvDGS9CNwA/GahzXWWbVubJ0xNJxdjSATVFebFqf14BKTLatPd/5V8J4tGnH6M3bN/Z4cRXpk+QqaDAIOY8qSrWZPLETXdeGPRadHNVbQubr2t7wW47iYKwMiTHYGBusd7HdasVGy7kMswxVTdOA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass
header.d=amd.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=wvQGJvvrAPvz5NfioA5Y3YU5JcnB1ZdRKXBAW5zqQKQ=;
b=DMZBH/W6rpxVn1OjhKfAj+0YoaKrlgKmu51vRLyJEkUOFpXXGZQqEUnbjm6w+VAKohaQzAfzuShEMaIxiJCXvuNgsL2qGXl5PO6jgTKycp4H8Ri9f15ceRzP6PfXLJfnBkvyfqRKbl8+L5yu1xVi7ikXimEacMC0JHpsq7Q2iU4=
Authentication-Results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=amd.com;
Received: from DS0PR12MB6390.namprd12.prod.outlook.com (2603:10b6:8:ce::7) by
IA0PR12MB8695.namprd12.prod.outlook.com (2603:10b6:208:485::8) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.8769.37; Wed, 4 Jun 2025 14:37:09 +0000
Received: from DS0PR12MB6390.namprd12.prod.outlook.com
([fe80::38ec:7496:1a35:599f]) by DS0PR12MB6390.namprd12.prod.outlook.com
([fe80::38ec:7496:1a35:599f%5]) with mapi id 15.20.8792.034; Wed, 4 Jun 2025
14:37:09 +0000
Message-ID: <1f719cfd-2c2b-4431-a370-290a865b0bf2@xxxxxxx>
Date: Wed, 4 Jun 2025 09:37:02 -0500
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v9 03/16] CXL/AER: Introduce kfifo for forwarding CXL
errors
To: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Cc: PradeepVineshReddy.Kodamati@xxxxxxx, dave@xxxxxxxxxxxx,
jonathan.cameron@xxxxxxxxxx, dave.jiang@xxxxxxxxx,
alison.schofield@xxxxxxxxx, vishal.l.verma@xxxxxxxxx, ira.weiny@xxxxxxxxx,
dan.j.williams@xxxxxxxxx, bhelgaas@xxxxxxxxxx, bp@xxxxxxxxx,
ming.li@xxxxxxxxxxxx, shiju.jose@xxxxxxxxxx,
Smita.KoralahalliChannabasappa@xxxxxxx, kobayashi.da-06@xxxxxxxxxxx,
yanfei.xu@xxxxxxxxx, rrichter@xxxxxxx, peterz@xxxxxxxxxxxxx, colyli@xxxxxxx,
uaisheng.ye@xxxxxxxxx, fabio.m.de.francesco@xxxxxxxxxxxxxxx,
ilpo.jarvinen@xxxxxxxxxxxxxxx, yazen.ghannam@xxxxxxx,
linux-cxl@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
linux-pci@xxxxxxxxxxxxxxx
References: <20250603172239.159260-1-terry.bowman@xxxxxxx>
<20250603172239.159260-4-terry.bowman@xxxxxxx>
<aD_hQ7sKu-s7Yxiq@stanley.mountain>
Content-Language: en-US
From: "Bowman, Terry" <terry.bowman@xxxxxxx>
In-Reply-To: <aD_hQ7sKu-s7Yxiq@stanley.mountain>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-ClientProxiedBy: YT1P288CA0016.CANP288.PROD.OUTLOOK.COM (2603:10b6:b01::29)
To DS0PR12MB6390.namprd12.prod.outlook.com (2603:10b6:8:ce::7)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: DS0PR12MB6390:EE_|IA0PR12MB8695:EE_
X-MS-Office365-Filtering-Correlation-Id: ff06af53-350b-410b-76eb-08dda3754907
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014|7416014;
X-Microsoft-Antispam-Message-Info:
=?utf-8?B?eEtwWFRrdFllTGp0TFFydnEvYmhrRWtZeE44eDhwQzUwK3BKSFc1VHgwdWY0?=
=?utf-8?B?U2NzWE1mL1ZHZXJzVGFGNmcvVFJaSVlnMHVJWk5LYVBwbEIrblZ0OFdwRHZi?=
=?utf-8?B?NGRvVEhkMVA3TFVPQ2l0TW5sdUo1MUZHTHhUOWVtNUZtUzUzSWdYS0JuSnBw?=
=?utf-8?B?cUZqUmFSYm01cXJsM0JxRGFjRmtjcWdSenc4WHpzdld2Z2x1RGNjdytrd2N3?=
=?utf-8?B?Y1Z4NDhDNld6NkovV0VDbVBIUlAyd2dOZEFUSnlJMHNIZW5mUWpoVjFqeW1K?=
=?utf-8?B?YjNvaTBOclg1TnVjTzUzTkovNTBkWGtVUnVDbDcvOHlnSzJpM1N0WWY3QWMy?=
=?utf-8?B?YitSR2prZU9DeVpyMndvb2EzTjl0RUt6cUc5dktOY011N2ZrcW40c3JrKzQ3?=
=?utf-8?B?T0hrYm10SG9wa21haUJyaDBRZm90ZktMTDcrOVkrNHVIL3ozWEEzeW1yNGRz?=
=?utf-8?B?bFlZbXFZMGlLM0Jhc1pGekxoYXhzSkZvWFpjVXdCYjdIdmhubjlJSTkxTnRs?=
=?utf-8?B?YXNKMGgxVGlNelRuYmhIVWdHRWhSNGF5TDc5QkRWKzR6dEJRT0dWRXRKRmR6?=
=?utf-8?B?b1JWSTVnZ1ZOZjhkTDhLbFZNRE1vZWQvUndFZTI5RDFhMXQxZk1BejVMUGFw?=
=?utf-8?B?RE9WbktrSEdmVUx2VlFPS0locTkwbXY1MUQzQ1kwRFRrRUpVb0QrWGw3VWZE?=
=?utf-8?B?SFJWOXB1Ungya0V1NUJoZ0xpTzhlZ3dwdEltTGNEaTNhS2FIaE1SVDdxYmlL?=
=?utf-8?B?WU9HOTFXT1g5Sm8xK3ByYVBIUzFuMjA2WEY1bEs2d0lvV0E5bHUzMXVwUFBH?=
=?utf-8?B?by9oMHhIN05IZlFxTnF3YkJuYmszOElQVHVSbjdPeGxxVUE4WnUwU3dEbEJL?=
=?utf-8?B?NmdHQ0o0Y3FrNnlrZCswRlUzdS9LY0s3c01NSks5a2RUemdmbTFJVlJ1NnRx?=
=?utf-8?B?eTVQTVlCOXhlRWlCTSt2NXlJRmxCZDc0UGYzdC9xaWF2SzVrOW1aK3JvNHMy?=
=?utf-8?B?d2tscFlsVy9BUEZIUmYwT1RPdG05Z1lZb2YyR0RibEpReFluTGIxSEhwTXpE?=
=?utf-8?B?YlRpZnlQOERsNTd2Qy9YVGtjdXpNRVRhWDUrbFc4MDVQZGd1SWJ5MTZEOFMy?=
=?utf-8?B?ODZKT2wrYklyZWwvT3FzYmU1V0NaVjFXZUtNL3AwWmtWZHJyUS9LNjg4K0Fr?=
=?utf-8?B?ZlEyM0VSbWRoVlpzcTJBZTU4S1JlY0tISjBXc0hkZDBTQlZFV1AzWEgwaGZ1?=
=?utf-8?B?aVFXaHkzYTFzZU1pSHR4ZDBUNU44eFYzYUN4QlR2MU9wNjhkbG9VbVBSY1dL?=
=?utf-8?B?aEdMVkpLdWRZeWw2K1QzUVE0Q1dBKzVXb2k5MTVXYitZaXk4KzNVUFVja2ww?=
=?utf-8?B?MFdFcm8vcGlDUDllUk10YjVRaE15azNjNDJkbjBpeUlRbm9JWW5relcwSlk3?=
=?utf-8?B?L0hpeW9kK3Q2RytQU0U2blQ0YzhuUnAvcmdEanRTVHdUUHhCMlFPZW8ycDIw?=
=?utf-8?B?cEN6MmhBaG9UUWczd3YwL3Z0cTdZRzhnWGVMR0ROcGNReW5QQ2RsakVuZTRh?=
=?utf-8?B?YlFLZGtRVGNYOVNBNEl4VmxCYi9RUVkrbEpsRFQ1RnhndkdQTzRBa1lQL1Nr?=
=?utf-8?B?WVAyRFgyVCtsYUsrVk1Wb1NoN2REWkQxdnI0YU9SbnlqdzhlVWFxTTBBdmx1?=
=?utf-8?B?dEM2QWJjeG1nR1pBTTB4OXpNZHJ2WHY3OUxORk12ZUg0SXBoclQ0TElpQTly?=
=?utf-8?B?RHluREVTTE5Qak5OSURLMTNsaUZFZEJzZUFrQUF2N0wvWXpoZC9SZm1Ja3V6?=
=?utf-8?B?eWZsYmdKakg4aUpqei9RckdyeFB0NUdCVWRFSng3TlQwS0phM2ZzMFhNMkNL?=
=?utf-8?B?cXNPaGRTektEcHByR1U2UGVaNTFkdHdSWHZvdm9maEdzSHc9PQ==?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS0PR12MB6390.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014)(7416014);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?utf-8?B?djRWQWtqdkZ1a1lnZlh6Zk41ZGNvQjloR1FOeGZ6VDRQTGg3QWlGMytRVmhm?=
=?utf-8?B?UkxrRlR4cTc4OFR3WlZWcXAvakVoUWpFaFNwZFJ4TTk5c1puMWxiRzlqeEJx?=
=?utf-8?B?MklIVjBGL1p2cFMvQnNTbmFCK1RrcEVleDlBVmJsaFE2MWcvcWdRMDAyc1FC?=
=?utf-8?B?L0FGVWVLQ1ZLR2NyUmhoSmxRRXkzbXdpOGFFRVUvYldWQ0RnbXBFK3JsaFp1?=
=?utf-8?B?ZngrTjg2dnVENTR2ampoOWwxb1VBdHhwQzkraURBTksreEd0elFjTDJReFhj?=
=?utf-8?B?bFlodXF0U040TVNFblliaFBoU0QzbnRHakFnb3hSSnRMcGxNenlBcTd2MlFn?=
=?utf-8?B?UDVJZ3czY1pCQ1E5VitpZFhFcFFOTElIUHNGUms4N3haRmovMEFLV0lRZEgy?=
=?utf-8?B?clpyQ2ZwWk0wTmNGeThqd2V0aWcvUTM5N2JtaGFpK1B2YmNrcnQ5cTNIL29E?=
=?utf-8?B?U25aV3Y3WmlsSlZSUi9QWmJVMzJGSkRPT3RjT1VDN0lhZTNpTlV2enk2U0k2?=
=?utf-8?B?SHBJMHZZTFAzZVpHSHZKQXlJM2R2T0ZBRE8wSGJPSzlBVlZMQnZWYXhSSUk0?=
=?utf-8?B?ejdQNDZIY0V1OXJ0SW5qYkFBcEdEQjRITC83Mk5BVDVHamJSQXlKUUxUSWMx?=
=?utf-8?B?ejIvMC9YUjNkZUVsckppQjJodHJmMUNqdVhEOW80MmlKMnUwY2gvdGtnUElq?=
=?utf-8?B?UTJLclZ1K242SWN4T3UybU5tNVJKZU9OWXpvL3M2a0NrY0o4Y3ZwcFZnZFNw?=
=?utf-8?B?U0lsWFVXMjJPdHJDZE9aeDZ2eFRxd3FaWU1lTGpnRmlFUFdCc2xHUVBRUDR2?=
=?utf-8?B?cHNKZlR4cFVRYWhpdlRiaHdmVXBTUTlmTkFhdHpVTzdIdnlBTkZ0bEQ4dGpz?=
=?utf-8?B?MFkzU0UzUXU5Nlc5ZXh3K2R2NE1Ubjl1amlkNHIvcVFTOTFjS0xVd3F2QVlG?=
=?utf-8?B?WmdkTk9QdG9icERZUFF6WjZnVVFGUFhYQVQ3bHBwT2V0dWd2eGowYzFxMStL?=
=?utf-8?B?OGg5aHBIRzZwOVY2SG04QXB6NUgrYzV3WDh3Ky9TRlVlV25zS08vSkc2Mm5P?=
=?utf-8?B?QTliMHRPblFjSDJhU3lkbmg1NWhnc3lVOHhYMDBEUUE1RDdUTEtMdHlxZ1E5?=
=?utf-8?B?WjRMbGROZXdGclJZOVBqdnAxWWU5c2szNTM1T0lYL1lXUGt2d3hNb2FyTDdB?=
=?utf-8?B?K0Y4NlZLTjAzZzR2b0xScWI0VW0zSS9PaGpnUVlZUjlWK21LeTBkQ1VhK05M?=
=?utf-8?B?Ui9TRjFMM285Tko3YzFnZC9XdGlaTXpDK2xUaVFWSVFGWmFBN0VCMzJwUmNP?=
=?utf-8?B?TG55aHM5QUdHemFHUjBacmZQYi9FRXB6ZkE2NnRGNEZLRHp2d1FwQkNPdVJN?=
=?utf-8?B?QkJJS1J2TkpoM3JORUJhTURLS3k4cmY3VVdUMXBGWkpPdmZOY2E5SVI4dFhV?=
=?utf-8?B?bHRvMG92NkJOODlvK2J1cTJpUDBNVUluNGxQd2FzUGJvdW5ZOFU0VkMwZjVS?=
=?utf-8?B?S3lvZG5SM2ZoeitSaXJNdFNDWEVSWnlyNnlvUUQrbDFJdThQdnAvTkgwakRk?=
=?utf-8?B?QXRTTk5ySm5uVGNIVzlaZVdyOStYRldsdGJLTmsxaXppN0RoYy9EY1RzSkh5?=
=?utf-8?B?WFJjdVFVMU42VHY3WnN6Z01TTW5UdWg0bE9RbkpncW42enRnTzY2UUdRdG9X?=
=?utf-8?B?djNZSlVqL000RzB1M2FnZTJCcExMS3VtZDN5eVRFd085TnYxWU5DcG8wci8w?=
=?utf-8?B?OTFlVGk5ZnVtWXZaYzZiVTdYWlFMc2ptSUNTMVNrbGRFQUJPOVFMWGRvMlBK?=
=?utf-8?B?aVBteTViNDhWRlJ3RXRmdGtmVDZlR3JPZUpQcE1mejg4UFJTL1VGaVhYWkNS?=
=?utf-8?B?Z0FnYms0b3c5UnRjNTdLY0srT2Zqek9DR3VOK3pBUDhQWWdpVTBJQ2phM1Aw?=
=?utf-8?B?YlpCM04wbVFyS0JuMEhQblJaOVlwcUlKL1M4ZUlqZ3U5R2RKQmpTNFFteEJa?=
=?utf-8?B?SlVyOWppdEdlNHBZbk5Ga2lFTFVMNEhqRkpwSGpCTUgrSzBJYkxQazNsMThS?=
=?utf-8?B?aGVEa1FINzVjQ3piYmtwQXZXa29sSGhnTXJVZDRRdGlHQXJOVjdpRmVyaUdj?=
=?utf-8?Q?w2t7i7PeWU9J6ikypotaZZLTW?=
X-OriginatorOrg: amd.com
X-MS-Exchange-CrossTenant-Network-Message-Id: ff06af53-350b-410b-76eb-08dda3754907
X-MS-Exchange-CrossTenant-AuthSource: DS0PR12MB6390.namprd12.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 14:37:09.0031
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: ebe9EQW4QqqbI9t1tjBOYIH817O1N3VzSI2SfsM288RR0McIzTzevnOB1gCzZnVd3nyrCELdA59EYMDV/Bt1IQ==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR12MB8695
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 6/4/2025 1:01 AM, Dan Carpenter wrote:
On Tue, Jun 03, 2025 at 12:22:26PM -0500, Terry Bowman wrote:
+static struct work_struct cxl_prot_err_work;
+static DECLARE_WORK(cxl_prot_err_work, cxl_prot_err_work_fn);
+
int cxl_ras_init(void)
{
- return cxl_cper_register_prot_err_work(&cxl_cper_prot_err_work);
+ int rc;
+
+ rc = cxl_cper_register_prot_err_work(&cxl_cper_prot_err_work);
+ if (rc)
+ pr_err("Failed to register CPER AER kfifo (%x)", rc);
This shouldn't return rc;?
This was implemented to allow for native CXL handling initialization even if
FW-first (CPER) initialization fails. This can be changed to return rc.
Thanks for reviewing dan Carpenter.
-Terry
+
+ rc = cxl_register_prot_err_work(&cxl_prot_err_work);
+ if (rc) {
+ pr_err("Failed to register native AER kfifo (%x)", rc);
+ return rc;
+ }
+
+ return 0;
}
regards,
dan carpenter
Return-Path: <linux-kernel+bounces-673375-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id F3DEF41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:39:07 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 055D13A834E
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:38:07 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id CC40E29186F;
Wed, 4 Jun 2025 14:36:45 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="NcrLOKyl"
Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2083.outbound.protection.outlook.com [40.107.102.83])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6B60829186C
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:36:43 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.102.83
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749047804; cv=fail; b=ogJXjVY7zz5nwl/npMyN0/TEdO3U0BiOWZCkm+vLaa1ooO0bP0SbFW9TLMDNsP8/hCTm5K6zRu1PjYuLx47UrN+4yQ6qaNmhVDgPkftgZUiihpd9yJ5RbsGFzBMH0BMrdrOFtn2CvyawdZ0WP8BURsx9dAKiuNrVz31x9U+g1oQ=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749047804; c=relaxed/simple;
bh=G8zNB8O1+kYAvu2z3FbSFqYqbFcWb+L6HvcWZpI2wFA=;
h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
Content-Type:MIME-Version; b=qAS93/nEgxH0nNyCtopGpE8eSrhvNe0J27I/XRkUwqj0stpcQsKCAmel5sxAfizTOy2D4FWcFlV3eIIfZIspasBfYl29JNKky2zCDiWebpJDmSwCpd6OrA12JiYXx3E25G6mb120AFmJcQGBcYFsml6gmqBCbdjh/h77U2BpUXw=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=NcrLOKyl; arc=fail smtp.client-ip=40.107.102.83
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com
Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=lxIb2GOZxYO11pjKlOKiJJk0lv00yAd/seNrY9vDuQF+yWNhQyH93V3kwVp1tx6m42ye5v8CL0PbSwMbpw5z0jcD/eio28XtDyau7B43vUROxdLp0ZNpaJEqVDuOTBxIR6kxdkcmS4NvBwHLLljuwtXmrQe1THpvdVQJL9mMBhjda10WjGhnFv5o20rUZFzsN+FELgiG0x/s1F/rXQoKKvyeCVjKPH9mSf62KQnHsAsyrEj5AHZDYDwGRlO2SXJ1B0K4IQyu3halRdkApLYUwWkPLH0ZAjpKDzX3Fvj29hsDxsydAQELn4WGFDlreXG/Ik/MlQLCAd8ADzLVCqWQpQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=mXDuV1StvkJPLlEurMdWF1Zi96aeqtjpbwlAPy7wywU=;
b=CaqauXlwrnkKTOA9NQHIJnZ/+n4KGuaSKUHvlC17oPrjjOBWWkBE+zgwqkqYel68cvWvQDQlHvQwlti8FaZEnrOr3e74a0OK4ySTYsEBqSdTuhywikGNc6miKHh23/bYPeQeBWmPNu51LArCiPnO3aGCW3mkPvluzSnPgwslRHrUb9VEM7Nx8RIeMOcAx0CM0H3RHkvbkiZvmKFBadcCpuVwzZ9rgEWaxX/ZKSzUidaPuMNvt68i/kkaGpMPZqg2OWsPPLDBK7YjzvrhbSBPDe9tX9PPPPeuKV6IFA9u1a/Dfcf6MMPye7mEyHqoDkqhCefZbcM0rA2jnoLE8lDqYw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com;
dkim=pass header.d=nvidia.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;
s=selector2;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=mXDuV1StvkJPLlEurMdWF1Zi96aeqtjpbwlAPy7wywU=;
b=NcrLOKyl98CoczzopN6D6unGrHY+5HGjvbzMz+r1ksQuzP6+LnEi/+zyYavCP81beYqLilmVIEK3iPju9tISV7sA0NgAj3VYHRXyQ8POSVpnGWTnUf9Tngy+BcIJwXWre64kuQvHque8uJxqhLmWbigHYihVz12wiRMs6su50M90JpwwktZpT9ruiu7GXJT+DmCg2F9U4FvSLtvcBoSV1pgtfu8xEODUqUbBVonAvueDETIRzeRNJ8XUVZKVjtiBezvCXjRF7DPygcd5D8TWb0lwfMzYRHz59p0IGS7aJaYkQWt5Xjyx1nDDAJTW0L8kuPZp+EjOHpLBfSfAbaFZ8Q==
Authentication-Results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=nvidia.com;
Received: from LV8PR12MB9620.namprd12.prod.outlook.com (2603:10b6:408:2a1::19)
by LV8PR12MB9270.namprd12.prod.outlook.com (2603:10b6:408:205::11) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.34; Wed, 4 Jun
2025 14:36:41 +0000
Received: from LV8PR12MB9620.namprd12.prod.outlook.com
([fe80::1b59:c8a2:4c00:8a2c]) by LV8PR12MB9620.namprd12.prod.outlook.com
([fe80::1b59:c8a2:4c00:8a2c%5]) with mapi id 15.20.8792.034; Wed, 4 Jun 2025
14:36:41 +0000
From: Andrea Righi <arighi@xxxxxxxxxx>
To: Tejun Heo <tj@xxxxxxxxxx>,
David Vernet <void@xxxxxxxxxxxxx>,
Changwoo Min <changwoo@xxxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx
Subject: [PATCH 4/4] sched_ext: Make scx_locked_rq() shared
Date: Wed, 4 Jun 2025 16:33:14 +0200
Message-ID: <20250604143547.708202-5-arighi@xxxxxxxxxx>
X-Mailer: git-send-email 2.49.0
In-Reply-To: <20250604143547.708202-1-arighi@xxxxxxxxxx>
References: <20250604143547.708202-1-arighi@xxxxxxxxxx>
Content-Transfer-Encoding: 8bit
Content-Type: text/plain
X-ClientProxiedBy: MI2P293CA0003.ITAP293.PROD.OUTLOOK.COM
(2603:10a6:290:45::16) To LV8PR12MB9620.namprd12.prod.outlook.com
(2603:10b6:408:2a1::19)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: LV8PR12MB9620:EE_|LV8PR12MB9270:EE_
X-MS-Office365-Filtering-Correlation-Id: 9bc32ace-3a3c-40a5-c2fa-08dda3753864
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014;
X-Microsoft-Antispam-Message-Info:
=?us-ascii?Q?2GhQyfFRq9k1gdDtSbywwQvDMEXe+zP2zkL+4ShpS8p9zax485JzqBcy1qme?=
=?us-ascii?Q?2swtBMoDT1y27vnMlb/BiGP61MnXXL2+YpmGWeQ8PnL8VAPe5hzVxBuMnIV7?=
=?us-ascii?Q?UjVxF5Tho4wl+wWNq5xk6LgX2kYEjm4VcSqVcxEymS5tJLHQHC4zb1TvyICC?=
=?us-ascii?Q?gl68tuKw5P7Q2saU/gGfe8bTE09YPjVIMGuGZvBXK4YjS9Xpq2VulaRgwaqE?=
=?us-ascii?Q?9jpPA3vkh/JeU3+ls0g1o/renpnyEuoTHHcjOzdzpW5eo6GFsOxUrvV46OjZ?=
=?us-ascii?Q?EvEtxLiZwHrAK/n5GmXU54yNSnpMXX1s/YwwrPFEUD6qB6YqlOgly38bJHpK?=
=?us-ascii?Q?sv2vVMB34EpmU+tSQ+7ZlBdvWEpUnZSzstPkre1PzTSBL0VTVCHgde6i+nRY?=
=?us-ascii?Q?oLxRjZmgEunoO5YF9xdrcJZkdAswRbF/sMakm95mwRriUJjejx0Ni/UaZwAF?=
=?us-ascii?Q?GkXm8Y9zPT5f+iLdwCDO8ZEuFe4lJG4y2VGOZvYnnLzP6/6PEt7ZJdowrvBK?=
=?us-ascii?Q?FKkHbleCZliTkSKkuZ+9eAb0ClhJw0BRoY59DnJuyvQnwg2BxSxzUiX3UnCW?=
=?us-ascii?Q?tzqMfirfCfqQB3sJ9jI35+5LNcMBP0O1pYelQwzQE0pDL6qkoETGVdQ2VgrD?=
=?us-ascii?Q?3ul1NMpBqxFazox+8eEyJlha5P1NaBxamvyoIqb3/u8B4gXyubWiX7FFOHhG?=
=?us-ascii?Q?jgwNVRv7pKue47Kwwlx0Pl7JAIljflpiP1dnKL2T37IKijxkwtFTJPxKySIC?=
=?us-ascii?Q?HNT3Z3fKmrOQll86Hx8J/TaxdBqOlMkqwaQOUmasm663aYZH68U629QN8Qek?=
=?us-ascii?Q?cu19NhGWqerctHc/5WJgg8c3z4Dxi28AW+lzGXL5CjjwKkVFnI2zvFYOZ08w?=
=?us-ascii?Q?vIXaVldf/4FtKRKaFvwOYcH3qd1cQIJqEbqP6AUVatT95vgix2SKsWhsW76m?=
=?us-ascii?Q?3UKJFa9pUPzZQPlfsg6VvOyjYoEJ1RJwJDNa8YnsEQMiSL0HJRhtGzwu98SR?=
=?us-ascii?Q?IS8h6zr/I0AeuUpx2gIda93qKIcX7TQ5a6uym34Q1YboRcWr0R7wLzwOluER?=
=?us-ascii?Q?thq8ErAj3suL7dZWTxfOeI+ulKtsUCVrlYv4xn5hzPkeXYoxg4fiHVsknwck?=
=?us-ascii?Q?/kp00wvfeFTDQ4h6W3Lu9gOuenVXiaV+z1a3da7hpouXIZYqmX/GOAEk0pRz?=
=?us-ascii?Q?SF1Zw6SOeaC1WcAWTxK3nMfURwAanGMQ8wxSJGOfIBIB7UNAVtiODlViiX6B?=
=?us-ascii?Q?w3yWIgCqju4HJx2wsJlyMsoTq7V9Jy54SQEzJErdMkwkKTqbgzfSd8cExltO?=
=?us-ascii?Q?xxyASPp0o3t96+l95+Q4uSLrDWazuwAOGBD4W9gfeZI5uo8nl39VFw+KdL8t?=
=?us-ascii?Q?J1f7GQ6nTZsNtd/D6qGB8Pqfvoy7Q6gZ4qHu3nUFyLhiNBv8og=3D=3D?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:LV8PR12MB9620.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?us-ascii?Q?wG3PTHcUQvzc7pvLBpr41Hd+IKizvfbMnGqUQ+N3MVEzuvqNXUCdcbL3mxul?=
=?us-ascii?Q?x0fdG6psVQ4WBvO1/PJWDrV6VK/R1laiLmdrJnHhWqkCvu7ubmi205mKx1hr?=
=?us-ascii?Q?bXCk8mDz/k8dMNNu1xOER/ki5YBOBhY8uV5boI64T9NDoC03tivcrwXTgEFU?=
=?us-ascii?Q?AT/jEBzO166+SXdiIIGHSJH4OxyfsEBszenyE2XbgrPaWxhiyLIFeaatJoPU?=
=?us-ascii?Q?0BLjmMRmqwt98ZQ1cCxQQTkHwtr5scFIA+RrdKKPncdWRCQ/JEhquDX4vb6Z?=
=?us-ascii?Q?DICG2Fsh2ikFwI7vR78H9gcVDqtzLxjgAhmfQX7ebWKFr+x9WQKML5VISglF?=
=?us-ascii?Q?kJkuwQuOvdLxElW7t3VaV1ZLv+sfKwYqWg2Qr2Kkfg8J1MHhzdkvk/dH5rHR?=
=?us-ascii?Q?zfnU5rSSeTGP3MVRjitFGrrbgA3zuj88gi4p5KBYaMOBqIZ5XBlJnP0G0i+U?=
=?us-ascii?Q?tIz4LuftPm40SYdrGHYHWHTSrGwYa1h/V990W8irq6izmMs6IW2fhzZwNhQc?=
=?us-ascii?Q?WCF8zwExVzS7QValLw+NFZyZ2s6SnirCm/fsildY18BPsgmMwdUEqFsJHzu+?=
=?us-ascii?Q?8EvLczgVkI1wJr5Ujn7tj9sfeRKqO07gxcjHAjA2CQWJOnh942H4kqQw5I4O?=
=?us-ascii?Q?4VdZTvnDhX5BWNq1RJ6fVCiFZLQIFtOTsa4lmH1EdOcuoXQTHzPlcauCZYha?=
=?us-ascii?Q?NaKyHIK1RGokp83WrnTS69AcgtNe7mzwktZsGrs8bQM5OgVxy+TVEP9Wz9cr?=
=?us-ascii?Q?WBIMY0ZUUvK4ZYw+eWisICCUMyXyV5zHjJUL8nPYYhVDRwgrNL6QqkdZlA5t?=
=?us-ascii?Q?Z2FYt02dCcJbNs3YrjWEnagQysTJN6aRY1o9TFxbhUCHhLb77X6uWO1tZVsQ?=
=?us-ascii?Q?b0+J7KVQKHXyDPws5/81HOCQ5lX0+aiurn0q24UdlGsqNXlnZeJGoDaUgBrg?=
=?us-ascii?Q?4nlW0KljSvcVOhREE2QSoNL0pnFbi0XRJGD2qC5uEjWE9HYTRERK9NlCa7Fm?=
=?us-ascii?Q?2ssTUwHFW/CItGrIdNTz5ZAUf/w97bDwcYJpKEkmzgDlDjyw0/y2Tl1jT/tf?=
=?us-ascii?Q?5/iD1f52FZoCklRsBgJwpiWD1G+IXshVs6mnbofpjGuA2wMcfH9wlTGG0sIt?=
=?us-ascii?Q?6CkLM7WhyPM6ICVyuTN9f1FbCNtrGfmcw+/rwAwN3tzLbEFBp1ROJV7q3cyW?=
=?us-ascii?Q?HOYfcpcET0wq8ZApo+N4ufV5BlUdICgUeWiOnPFBRvSB3X/SA+WMifbuSntC?=
=?us-ascii?Q?wGGgFz94BzB2h+PXy1eXwM3nLLNntFejgsOYWpakhRj3O8bMixLzPjQKCA1K?=
=?us-ascii?Q?wZz77svovg8Wjr4L8YdzZDpMjcGFbL29w47rkCEe/YVdA0tB4bj1AodyWz4k?=
=?us-ascii?Q?oCqKWag4Aw4P5dWRu+It9e4UFYAyX1jK5tCBjJk9hwRyORu1Z9ZxAEvlekAH?=
=?us-ascii?Q?xIj4nw26o6mt5LgDvUCpMfLGDe9lxpnexJeaNs1wDkm8bWdBTCMlyd9k49l8?=
=?us-ascii?Q?kUQSvkT6kKSCyH2LBKboo70vfwfI9LjuANI2EJmtPS7UghtvDDyw9Ddh99a+?=
=?us-ascii?Q?MMPH4nwAMprwvmnPQ7g5DCndlnugThKWkTaEH6Ov?=
X-OriginatorOrg: Nvidia.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 9bc32ace-3a3c-40a5-c2fa-08dda3753864
X-MS-Exchange-CrossTenant-AuthSource: LV8PR12MB9620.namprd12.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 14:36:41.0132
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: qtTfIq+zFSHzKfFNFVjyM7RDl6ziNcUiP8XdwcUidzGsCiys1v7ruenySDcv7r7G48otjrevXR4q38FMOU+FLw==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV8PR12MB9270
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
scx_locked_rq() is used both from ext.c and ext_idle.c, so make it
public and declare its prototype in ext.h.
No functional changes.
Signed-off-by: Andrea Righi <arighi@xxxxxxxxxx>
---
kernel/sched/ext.c | 2 +-
kernel/sched/ext.h | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
index 3e483138dff60..941603ec67e27 100644
--- a/kernel/sched/ext.c
+++ b/kernel/sched/ext.c
@@ -1265,7 +1265,7 @@ static inline void update_locked_rq(struct rq *rq)
* Return the rq currently locked from an scx callback, or NULL if no rq is
* locked.
*/
-static inline struct rq *scx_locked_rq(void)
+struct rq *scx_locked_rq(void)
{
return __this_cpu_read(locked_rq);
}
diff --git a/kernel/sched/ext.h b/kernel/sched/ext.h
index d30f2d1bc00d5..cda5dfa4dad09 100644
--- a/kernel/sched/ext.h
+++ b/kernel/sched/ext.h
@@ -18,6 +18,8 @@ static inline bool scx_rq_bypassing(struct rq *rq)
return unlikely(rq->scx.flags & SCX_RQ_BYPASSING);
}
+struct rq *scx_locked_rq(void);
+
DECLARE_STATIC_KEY_FALSE(scx_ops_allow_queued_wakeup);
void scx_tick(struct rq *rq);
--
2.49.0
Return-Path: <linux-kernel+bounces-673373-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 6376141E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:39:11 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id DC2AF160C79
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:38:08 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 52E27291157;
Wed, 4 Jun 2025 14:36:29 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="adgbl0TS"
Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2088.outbound.protection.outlook.com [40.107.101.88])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id BC33C291146
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:36:26 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.101.88
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749047788; cv=fail; b=mqUlOqCcketPWKObSVbYt72YmuG3gjCDs368tQcOomxxvOUJZmJUfjUePCNBk2mI6hWE41fWNA8fs3qvjv+pZvGyEKYhaT/Omb2cRFBBYG+H7SMPFUDN1ifSaEalaASk894tr5EofXij2LcD+MSP8PFCIXvNHfQYl8WrkRkDIyg=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749047788; c=relaxed/simple;
bh=uDbEJx4bS4pBgnZPf219yUlqfTkciUnSR8c5FHaqUDE=;
h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
Content-Type:MIME-Version; b=Mo4PfY5MxEi38Ua/kvx3+xOQqY8BXrqrSEZPfKeEVPv4A+FM5jIUTuBdSuy6qrbh+FONr81kqigvi7i2LDfbI6YPpHAyjPJZJx9aOTtGzm6QzOKVBvnM+p0X3cRR0nkmC9VPLTuxpKFBsqf2DlNGverbYbkPRUdXdmspnZ4LBys=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=adgbl0TS; arc=fail smtp.client-ip=40.107.101.88
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com
Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=QFYKhsyuSKx/mGJ/g+c4TcaJ9zUyicYeyE9+jZUOeBiNVxI+GMtEEmaivvGvQm/qvDyNZpTcaTh+e+LpYLUkmugg5XJ8kX7Uj3u4dcOTg/SmMUGN6V9+CNB8K/MPijrjjOl7qfC7rVZCdVapqGi1BDLzrZOTmpA9E74hpXuA3/1f1Rwo/MP3jRBv9lMESvrGtGRUs1fbgKKL37KLJs2a20iJbWeS+JEhSJeO9cts++zUa/QtzZqPGN/vTnjc7WiK9OhfJlCKfOS07xkfAmNdEOjsGUaYvP7Uf8iRQMPk4pG9n2yKRTrPQKB49SSaBvEYQMq/QMKWoJJPWiASqasYWg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=9ImMMQBNllFvU3tucg98Gq4hxvL9BQR0wWCrWaLJd/Y=;
b=MKwe/yTVXjb3r6SBuYFwMqGnRkV1lvlzcQp8Ad/xX+6sufdxxSdrv8PyOg+fuQxPy4Fs+5ixFdcaBWn5yTIhv121MBKOgmQQakQ0a+k1ZrG8TIIW471KnnlDrOzOSymWZ8waJUx/E4Vdk/S0rYSknQ7825NwnrceGFX+Ah2bj8TcX4aGTgxdb/ZHQwonQh+eT2NO4ynBHOa9DMBnJ/1BwSWS0QDfFIdk5dmGNUCoM6fgvbz0s/POwcZ5YJjP0NuD6Du0COPDWexZ1+5DXbnApLo6Cai375Qblfd/NdGZ4V+29GZWssuhSrwx2V+BtLqN7qe2j4fUEdxxboiqF1ut5A==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com;
dkim=pass header.d=nvidia.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;
s=selector2;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=9ImMMQBNllFvU3tucg98Gq4hxvL9BQR0wWCrWaLJd/Y=;
b=adgbl0TSg4Emhl5bN260pL3gdBEge2ownJwm2bX5z+gPKj1jqw3EcZnRFglnk4wl7Kr2BuqVCOhkcSj0+jClf4xuzb/Xqaj1PvOqVAKJaAuvn06HTKg5pikey6SPq0eQkQql7HbxnlGnV6xOUN9PiTUruT9hxLlf7MjUIPmGWhlUhl5Lm9WCDCnE4t6u8K6OB482ttHMTfm+GyjGQCSAvogtIH6JE62ykNBzJma8D2gG51XluTuKbtB43geWB7zZBI+nHSd3TzEWp4+pT9BkXRIs6Toq/jXmmN4zSJK245rcB9LFSmRUnav7tKyIbvAPf/6riinMx1BjV3ptgzc2Mg==
Authentication-Results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=nvidia.com;
Received: from LV8PR12MB9620.namprd12.prod.outlook.com (2603:10b6:408:2a1::19)
by LV8PR12MB9270.namprd12.prod.outlook.com (2603:10b6:408:205::11) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.34; Wed, 4 Jun
2025 14:36:24 +0000
Received: from LV8PR12MB9620.namprd12.prod.outlook.com
([fe80::1b59:c8a2:4c00:8a2c]) by LV8PR12MB9620.namprd12.prod.outlook.com
([fe80::1b59:c8a2:4c00:8a2c%5]) with mapi id 15.20.8792.034; Wed, 4 Jun 2025
14:36:24 +0000
From: Andrea Righi <arighi@xxxxxxxxxx>
To: Tejun Heo <tj@xxxxxxxxxx>,
David Vernet <void@xxxxxxxxxxxxx>,
Changwoo Min <changwoo@xxxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx
Subject: [PATCH 2/4] sched_ext: idle: Make local functions static in ext_idle.c
Date: Wed, 4 Jun 2025 16:33:12 +0200
Message-ID: <20250604143547.708202-3-arighi@xxxxxxxxxx>
X-Mailer: git-send-email 2.49.0
In-Reply-To: <20250604143547.708202-1-arighi@xxxxxxxxxx>
References: <20250604143547.708202-1-arighi@xxxxxxxxxx>
Content-Transfer-Encoding: 8bit
Content-Type: text/plain
X-ClientProxiedBy: ZR0P278CA0112.CHEP278.PROD.OUTLOOK.COM
(2603:10a6:910:20::9) To LV8PR12MB9620.namprd12.prod.outlook.com
(2603:10b6:408:2a1::19)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: LV8PR12MB9620:EE_|LV8PR12MB9270:EE_
X-MS-Office365-Filtering-Correlation-Id: f87db35e-8dbd-45e8-dba1-08dda3752e4b
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014;
X-Microsoft-Antispam-Message-Info:
=?us-ascii?Q?/lpUUbPms4Ucqaj5PKm7bGzuQlOeR69vosY6N7s4WmR5cA+nmx2Pvbb3zvyE?=
=?us-ascii?Q?/frOQSMN3Hz5yqvh8QbQGSlm8Hq5kTdn0pQtUAPDF2Lsqb8OjiGvD0z0p2+p?=
=?us-ascii?Q?wmzUZDwxNFRlVtm8vXzNZ+FNN2tdc2yimmCiTde9+cVgpsM3+u4XvHZqKKkD?=
=?us-ascii?Q?gri/7s8pHlIUGOxXOmDLKxMDDt2w/d18t35SQmwb7eytzHV9iB6Gan5j37y1?=
=?us-ascii?Q?IBRGfDrCXIEME042dgRmYJOBE6PtI5QBp8LARVjE1flZ6fmFYte6gPcDX1XO?=
=?us-ascii?Q?5TMXStjORjAPQ/V1Bvtmnnw/FkDXYVr/Vav7NyUVXZ1AKs+dVRZKjJ1rr3AN?=
=?us-ascii?Q?3/dvIeHh+jdRgdveMugDuUqDQyDAgZqzJzyrgUbPtZI/ci58YbNe/lnMO3v5?=
=?us-ascii?Q?1qqZoPiP1pb7bWcQxMhcHN7gRbU48NG54XRXC1aflsVmYsfzGG3SJv5XCRze?=
=?us-ascii?Q?XhfVIemVG6HtaCKf7ywri/hBCXEr9PIAWQaGtx5xRKxvkXm1BT0RpkBSqMYu?=
=?us-ascii?Q?bJYktjTttgYgdRTCN1oHLAwd5LPtMgt+TvjbHpq84KL4Dn/Mt2/LX74+ANwf?=
=?us-ascii?Q?gLU0o1EehoWzE1UCy0BVu5VhdvQgjuKUijfXwmlZ1zDa19IhfBfdsZA64ybU?=
=?us-ascii?Q?EGNAIo9utN4xxIj2slLuFF/9soNHcJBflYinUbyddFdZU8RTj+iLnjcqp2/w?=
=?us-ascii?Q?k2FRAvS2++IXMjM7UGmxOXy5R1mHPaVSNnV3I1eU4ir4GPl9WC3332tw3X3I?=
=?us-ascii?Q?p7ddR3UjAFTM4el8O/KiU4FbeKGITI3w8f2WFPx1spcKQwji+I2cEoIwF/Gy?=
=?us-ascii?Q?5xqeq3nvz76TMTG/xU3PDT6+7xyo1Wv/mQ/uMJM524uD++2gZC24S1XU2nVS?=
=?us-ascii?Q?fdLr9RLGoUeheESMg6XO+HUI0xDpUKiXNopaZvOAQzSfstASo1+PwH6BFOPG?=
=?us-ascii?Q?7GvIDukJaltutYgFNVr2xgPhnj9/JShZni7Oa3wNDi6oKTCeYUQ/UB61S6Im?=
=?us-ascii?Q?gs/o/sYUou838lZK2S7T7fxnIa+aa7+JP7Vzetc6o6i78tnaCz+Hac+J7Tx7?=
=?us-ascii?Q?GT7J6Ip/ahRklf9g1sxwaQ/5cmdz6exNfo/HI2VO1qv1l4aoKpE5nacvBpmo?=
=?us-ascii?Q?7hXN4ZGym4WJfpP1+EO3cyQCfzLNkou+k5EXixDMI5z+DGoUHfTajFuSJB7b?=
=?us-ascii?Q?2hrn1JioEDVU0lFYG6L7bzTjgbRVCrQKgv2oJvqfmcjtj7t57lRzTIYQbD1t?=
=?us-ascii?Q?BJJCSVm4job9ufWITvIDecEU0Y0lqmDqOrIguXSGGLfT5kA4t1byd9UpMNbQ?=
=?us-ascii?Q?Hx9hWuVtEWGXBum+kPw4HOBcbVN/K0d6PwvcgoaF20c/yuxHhz31RKGAFiMO?=
=?us-ascii?Q?hNCEf86dldIC8M/2IoPEONEbrpeCEkaYxfdx4YtVlLNTI+pR7IDKEy3oAOjM?=
=?us-ascii?Q?nqOJDBue+2w=3D?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:LV8PR12MB9620.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?us-ascii?Q?MMtMN8vQn60asnohRcnu3k9T0wkqFljjlX8Ngk65Qu9NTPrXRS8W44Sj6oyL?=
=?us-ascii?Q?kHfFIfY/aaChjSOnB1UhUCEYvLpZ/P7xJgIKbPpLEASml9fNV6Sc901ttOsh?=
=?us-ascii?Q?5EQHBimPhso8PUnAKrray6MVOzzDP+IQPKUkPaI0h/c2ivqEEnVYN2VIFaCc?=
=?us-ascii?Q?5aT6KVoeAQhlTAJRmlusrHKgLfP20Hvh0syYZrTPKebCUO9aHBave53agW+y?=
=?us-ascii?Q?Y6xxhjOubBEXjqbmQq60GIoJMGqkTHB4X/o+Gmc04gkOrYJqGftqclXBKq3V?=
=?us-ascii?Q?JiXcdC96Xvn/o/V3voIK1hglYgs5imaP7Lfi8VaOwOmkIQj8yVavtav4xa4P?=
=?us-ascii?Q?p6f9Z3WrCz04MIFK2n/mUB4DfxvxaGhSUo6w48Crw0LX6tdCvTtg+lDHPS5G?=
=?us-ascii?Q?LJYeW8uhMK2mabci4wzoZ5EAiTlkbIDyqjpzLGRtQoRcZ0wTsnXP5s2R3SlR?=
=?us-ascii?Q?6OyIo7QjX4orQd43nhz0LMUMchVuLQ3eVfsebfB08ZeWB3kj9wlZyXQjWxQv?=
=?us-ascii?Q?RM9GL/5jjd5nlfCW8MUf9sjNUkf0jpGjSWZsETX6e18E1ISEqyAxAiQsK3lf?=
=?us-ascii?Q?cLCXnklMTP0R18WgbBBczMASJJm6tCAhYgKhVAez78gf3HqE+PTfvOJuGCYQ?=
=?us-ascii?Q?dgKg9+NYSPKLogjXvWIPG1biyOVHqBRquuuJ5r/huL+Yo4WunfipfN8aSvXv?=
=?us-ascii?Q?S0Z1P8PGQli+Wi8bWil+M9HVYHZ6vpNFHXkC51k7+xBc9+jJ7FyiaQMeOxNu?=
=?us-ascii?Q?9zEuKFwCdfT8u4d+roiKLyUM5fQL/YQIN2EyxWvwt2idjUkJeduKPjkIq6Ko?=
=?us-ascii?Q?JAeEeIEI699TRijKRqQeRvWPK5Xs9GVLLrZmkAxepwbgR3aSj/Vq0FDmjJBn?=
=?us-ascii?Q?8zno0R7ZMG1d+AITcw9uZC9WTGo3Z52SVoZOcki1mXaAhGOphF9BZP1TtrRC?=
=?us-ascii?Q?ccmNffQpfqCp3Sel0dvplcQOnhQhtut8jWgUpvPDvWwiUisSv1HXZgk2OjJH?=
=?us-ascii?Q?8XGx/J2wYVhT0pXrcvMDrh6STcGf5AD6COuSCWs78k4TGtW0xS4hw1yo47IL?=
=?us-ascii?Q?f6ZxtO7rbYpRwxbZqTF8qh/Dgma/jMSTRjzsyYx5jaDeVNF8TgClVwWaSJg6?=
=?us-ascii?Q?NWrpHwX3MC3vbcvA5+fMjDzn5q5aKg0QVOryCroSsGTEdVu0LN1qcOJzq4G5?=
=?us-ascii?Q?C1WG1h5mVB/+CzcCatCDei+ZWLLbWZsksRtotx0ytHZUszQ6cIH1zS3OZmd8?=
=?us-ascii?Q?LWQgFPkiComCfbKuRgZuh9sJwSEUL1vBcWbCAIrcISGN5kuNLwpOv+ViRrzC?=
=?us-ascii?Q?9CztJXW+c+JUdBOrpy8DptEo9UhkGQ/oknd+NTn3AyrfJiOmZNqlSOL4vzAy?=
=?us-ascii?Q?fm15Tvszu1utFVwf9UNPTPmVlcxDWmp+C+KTO1f0R+xWuTf4JQXRCJC7es+O?=
=?us-ascii?Q?01+7I7ocKlciD99I4QgjHhGiCMWfZWjXtWT6NL6Q+74OlqKeyJ92t+7Q3jqK?=
=?us-ascii?Q?e9bTXfEruevFS3JWScJneZNd3V8hj1LTQztkTVyAzy/RRIQIo/6+nD416E45?=
=?us-ascii?Q?/OOf+4MhrI8MWJ/exBnqr4t9FepyqhU1gTO0hWnt?=
X-OriginatorOrg: Nvidia.com
X-MS-Exchange-CrossTenant-Network-Message-Id: f87db35e-8dbd-45e8-dba1-08dda3752e4b
X-MS-Exchange-CrossTenant-AuthSource: LV8PR12MB9620.namprd12.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 14:36:24.1524
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: YtBpIa7dOMwPTY2VzWCIdByEz/zuPhIqWIp+XWZ7Clz+sn0r6s1FdC/3+dlYe2HUUoTCnBOh0tPqcSlxEdsyTA==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV8PR12MB9270
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Functions that are only used within ext_idle.c can be marked as static
to limit their scope.
No functional changes.
Signed-off-by: Andrea Righi <arighi@xxxxxxxxxx>
---
kernel/sched/ext_idle.c | 24 +++++++++++++++++-------
kernel/sched/ext_idle.h | 7 -------
2 files changed, 17 insertions(+), 14 deletions(-)
diff --git a/kernel/sched/ext_idle.c b/kernel/sched/ext_idle.c
index 1598681b681e7..17802693e3043 100644
--- a/kernel/sched/ext_idle.c
+++ b/kernel/sched/ext_idle.c
@@ -75,7 +75,7 @@ static int scx_cpu_node_if_enabled(int cpu)
return cpu_to_node(cpu);
}
-bool scx_idle_test_and_clear_cpu(int cpu)
+static bool scx_idle_test_and_clear_cpu(int cpu)
{
int node = scx_cpu_node_if_enabled(cpu);
struct cpumask *idle_cpus = idle_cpumask(node)->cpu;
@@ -198,7 +198,7 @@ pick_idle_cpu_from_online_nodes(const struct cpumask *cpus_allowed, int node, u6
/*
* Find an idle CPU in the system, starting from @node.
*/
-s32 scx_pick_idle_cpu(const struct cpumask *cpus_allowed, int node, u64 flags)
+static s32 scx_pick_idle_cpu(const struct cpumask *cpus_allowed, int node, u64 flags)
{
s32 cpu;
@@ -794,6 +794,16 @@ static void reset_idle_masks(struct sched_ext_ops *ops)
cpumask_and(idle_cpumask(node)->smt, cpu_online_mask, node_mask);
}
}
+#else /* !CONFIG_SMP */
+static bool scx_idle_test_and_clear_cpu(int cpu)
+{
+ return -EBUSY;
+}
+
+static s32 scx_pick_idle_cpu(const struct cpumask *cpus_allowed, int node, u64 flags)
+{
+ return -EBUSY;
+}
#endif /* CONFIG_SMP */
void scx_idle_enable(struct sched_ext_ops *ops)
@@ -860,8 +870,8 @@ static bool check_builtin_idle_enabled(void)
return false;
}
-s32 select_cpu_from_kfunc(struct task_struct *p, s32 prev_cpu, u64 wake_flags,
- const struct cpumask *allowed, u64 flags)
+static s32 select_cpu_from_kfunc(struct task_struct *p, s32 prev_cpu, u64 wake_flags,
+ const struct cpumask *allowed, u64 flags)
{
struct rq *rq;
struct rq_flags rf;
@@ -1121,10 +1131,10 @@ __bpf_kfunc bool scx_bpf_test_and_clear_cpu_idle(s32 cpu)
if (!check_builtin_idle_enabled())
return false;
- if (kf_cpu_valid(cpu, NULL))
- return scx_idle_test_and_clear_cpu(cpu);
- else
+ if (!kf_cpu_valid(cpu, NULL))
return false;
+
+ return scx_idle_test_and_clear_cpu(cpu);
}
/**
diff --git a/kernel/sched/ext_idle.h b/kernel/sched/ext_idle.h
index 37be78a7502b3..05e389ed72e4c 100644
--- a/kernel/sched/ext_idle.h
+++ b/kernel/sched/ext_idle.h
@@ -15,16 +15,9 @@ struct sched_ext_ops;
#ifdef CONFIG_SMP
void scx_idle_update_selcpu_topology(struct sched_ext_ops *ops);
void scx_idle_init_masks(void);
-bool scx_idle_test_and_clear_cpu(int cpu);
-s32 scx_pick_idle_cpu(const struct cpumask *cpus_allowed, int node, u64 flags);
#else /* !CONFIG_SMP */
static inline void scx_idle_update_selcpu_topology(struct sched_ext_ops *ops) {}
static inline void scx_idle_init_masks(void) {}
-static inline bool scx_idle_test_and_clear_cpu(int cpu) { return false; }
-static inline s32 scx_pick_idle_cpu(const struct cpumask *cpus_allowed, int node, u64 flags)
-{
- return -EBUSY;
-}
#endif /* CONFIG_SMP */
s32 scx_select_cpu_dfl(struct task_struct *p, s32 prev_cpu, u64 wake_flags,
--
2.49.0
Return-Path: <linux-kernel+bounces-673378-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id A43DE41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:39:48 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id BC45D1891278
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:39:23 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id DD0F32918F4;
Wed, 4 Jun 2025 14:37:20 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=lwn.net header.i=@lwn.net header.b="tLXp9jny"
Received: from ms.lwn.net (ms.lwn.net [45.79.88.28])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id C4C76291158;
Wed, 4 Jun 2025 14:37:18 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.79.88.28
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749047840; cv=none; b=BmbhIWZbR0yrK20ilyqLnit1LHM2t+/yRWKqSo8xIxLhurODveAzd70aVbmBPIkES0mkYs5PwU55AKlnp08apWTra/k7TZb+/4zOJDGzxlX5dv9BkWKX1dWeikeI/nRorli0bCyPPqJUYZ/HtxHklyuEDbYFrre9epbaI1oOgKM=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749047840; c=relaxed/simple;
bh=U9UcFZGo4t5LQCr1cPoXo1VfTqtAYWounRfmjXPN8nQ=;
h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=I+XGxqBUB5whYQERf3zCOiqadB+o6DIKYoUtqbTxwVtVxXYYRDLW3mEK8o6dUBqKL/zJvdp6gkkyHCKjR0uYS6e5DiepHuVFca/XwlbDJpjxyQ/OijmZ2RCX47aNgiX0fjc/PLYj6TiIb9sCSPuaQFmjsNBG+Ydjl2dXVugMp40=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lwn.net; spf=pass smtp.mailfrom=lwn.net; dkim=pass (2048-bit key) header.d=lwn.net header.i=@lwn.net header.b=tLXp9jny; arc=none smtp.client-ip=45.79.88.28
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lwn.net
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lwn.net
DKIM-Filter: OpenDKIM Filter v2.11.0 ms.lwn.net 8D4BC41AA1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lwn.net; s=20201203;
t=1749047837; bh=SukbAVqJ7Y6ZCjVklDhnIprrOusgKb3L2fIJadSLOfc=;
h=From:To:Cc:Subject:Date:From;
b=tLXp9jnyeGKNf9MtT9XG0Y5DuI98qyvtHP9J6J5Z5OWK/nCNg4HoURBjx4ADB9gx8
ktsY9JUzRzB1qSKLbS2Cb6ONv4MFteHikBYGS7AFp947O1nc8VcJ+OXpujoPfTB3UZ
YI1RINsjIyazvOQYapExokKJDo8lSzWQOthmFgMIb6jD2mUD0603cu9olcPFCxs1Nw
K7Yh3LnxMyxRTgVLTKe80aPrssjKESLKHsDMkPrmq8+74VCcY09VtaLRJ7pqDNdJEb
i7uYvAgZNa0MJGr6jK0HfxJqzVB1dcy4MtiT+bCLkN1e8l8shLrigpLDyeWYFrcjVV
3WZr2lPE40DaQ==
Received: from trenco.lwn.net (unknown [IPv6:2601:280:4600:2da9::1fe])
by ms.lwn.net (Postfix) with ESMTPA id 8D4BC41AA1;
Wed, 4 Jun 2025 14:37:17 +0000 (UTC)
From: Jonathan Corbet <corbet@xxxxxxx>
To: linux-doc@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx,
Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx>,
=?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= <nfraprado@xxxxxxxxxxxxx>,
Jonathan Corbet <corbet@xxxxxxx>
Subject: [PATCH v2 0/3] docs: some automarkup improvements
Date: Wed, 4 Jun 2025 08:36:42 -0600
Message-ID: <20250604143645.78367-1-corbet@xxxxxxx>
X-Mailer: git-send-email 2.49.0
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
A small set of automarkup changes to improve the visual consistency
of the rendered HTML documents.
Jonathan Corbet (3):
docs: automarkup: Remove some Sphinx 2 holdovers
docs: automarkup: Mark up undocumented entities too
docs: CSS: make cross-reference links more evident
Documentation/sphinx-static/custom.css | 7 +++++++
Documentation/sphinx/automarkup.py | 27 +++++++++-----------------
2 files changed, 16 insertions(+), 18 deletions(-)
--
2.49.0
Return-Path: <linux-kernel+bounces-673376-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id C230C41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:39:55 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 31DCA17A390
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:38:41 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 39E6F2900B7;
Wed, 4 Jun 2025 14:36:50 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="FM8qdlbB"
Received: from OS0P286CU010.outbound.protection.outlook.com (mail-japanwestazon11011042.outbound.protection.outlook.com [40.107.74.42])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 35C0E2920BF;
Wed, 4 Jun 2025 14:36:45 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.74.42
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749047809; cv=fail; b=EOaFCCSnmVfvMF7p4bca7PsKvRKl6n+StEaBisVHrU9560LEh9lOZyYKK92UJshbBIew0uA2fMg6MTucYxnKQsT9vv/LS+ykS9Mcdv2bBeW4pmELO41I9LyE5zhItHBzX3wtVsvHnpb8EDRvtvsW4Xh7mLKqESXBnMi2MV1/5Go=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749047809; c=relaxed/simple;
bh=mWYV9U0Pk/U9bRuKcpEGAzVpR6Sq/bu5NsAKyrhxRp8=;
h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To:
Content-Type:MIME-Version; b=HhVuYiiAjSJVMwrKzlOgGmPki85VrJUYBYsrtm8LQo27ISTPzJxI6XMrwJSqweoZ3R0XEhuBYU/RsZbAVeMhB3KcchdHa1sYh75rEb6CrtKqG21FhvYwcz4ScExsP6VlkFSDBcvJqbKPPNkKK+qnXDLTAiHBUi3wzXm61i4ustw=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com; spf=pass smtp.mailfrom=renesas.com; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b=FM8qdlbB; arc=fail smtp.client-ip=40.107.74.42
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=LBLf6sh+4Hmcst7OD8+QQoueAjdl0znvbbI/BCfXoJqTntGUqNV8Sw5eL5DEJQa4Vcsz1jZ7Wv2xgsoawc1EGqPD30bqMaZJDeU7hAAidxZ6wa4icbeOn353P+G1Cn51QbcReE+4Hu6ysGC43CmiSCixaUHar4Q9VkJoDodLo8xI6sLqGqXLDx7m6eVxiKoJv2ae2VBsRE37DhhKAAc+RQ77kPDn1roVluBJb24pNKfbLYTTF7CNy7A4zfUNKF3tg7sP9L7c+3Q3tBH5skOlYIc/ozzsVDAernflCyPFCxfdGNUkmVV4ig2w+2eBHb/KuHUUpRpdjZ/qV8cpNN03uw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=+sfkCnhbjGmwxXyn9HpbA28AotFhvso36mNNQMQ+AY4=;
b=PPIAXbwCAwfifnpgWqgAyJN1yzn10YkhbE5uTQ65lCliR74AmqMt17yaNM9VELUDNX6CkWwDswP6PKZ+wsh70k8BQxEeyErSohGGLsyS5ylg6lAP2IWUkBStEI9hV25jXkoW6dAZ9b794NsQ2JBTwHFkbTIYs1/M/7573M1fEgqWhq/lG5+Ixo80brW2/XzitlgqHqLk8DGuV7tGF6da2ccr8DtlNEKL2qX++EeOCm7nfVdvZORlxGRU+NFp5pPu34JZ1IVDwsmgyiiKDfKzQSEj8YPSrjtkoeI0fUn6+f63a5kL6pkjglSbBZ9hvaf9UaxZkfkBBUyQmGC3qIz8QA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com;
dkim=pass header.d=renesas.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=+sfkCnhbjGmwxXyn9HpbA28AotFhvso36mNNQMQ+AY4=;
b=FM8qdlbBYNHeZ/kTbEbaRbdkTA7kWH8qkXHRQ1/I7gkkxAdaeaxxKmCMyE2XTT+rUoyF7NFMqhYbK7Lu5cUZt5m+9GEYuGY5b3Tklnac1NlBMQpOqkUMPFTwzm+Z0Vvv/Qh0abm6pNwkk0AskIJMuiC1CW0pQ4/pjNomoFUl078=
Received: from OS3PR01MB8319.jpnprd01.prod.outlook.com (2603:1096:604:1a2::11)
by TYAPR01MB6041.jpnprd01.prod.outlook.com (2603:1096:402:31::8) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8813.20; Wed, 4 Jun
2025 14:36:43 +0000
Received: from OS3PR01MB8319.jpnprd01.prod.outlook.com
([fe80::3bc8:765f:f19e:16d5]) by OS3PR01MB8319.jpnprd01.prod.outlook.com
([fe80::3bc8:765f:f19e:16d5%5]) with mapi id 15.20.8813.020; Wed, 4 Jun 2025
14:36:43 +0000
From: Chris Brandt <Chris.Brandt@xxxxxxxxxxx>
To: Hugo Villeneuve <hugo@xxxxxxxxxxx>
CC: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>, "maarten.lankhorst@xxxxxxxxxxxxxxx"
<maarten.lankhorst@xxxxxxxxxxxxxxx>, "mripard@xxxxxxxxxx"
<mripard@xxxxxxxxxx>, "tzimmermann@xxxxxxx" <tzimmermann@xxxxxxx>,
"airlied@xxxxxxxxx" <airlied@xxxxxxxxx>, "simona@xxxxxxxx" <simona@xxxxxxxx>,
"dri-devel@xxxxxxxxxxxxxxxxxxxxx" <dri-devel@xxxxxxxxxxxxxxxxxxxxx>,
"linux-renesas-soc@xxxxxxxxxxxxxxx" <linux-renesas-soc@xxxxxxxxxxxxxxx>,
"linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, Hugo
Villeneuve <hvilleneuve@xxxxxxxxxxxx>
Subject: RE: [PATCH v3 2/2] drm: renesas: rz-du: Set DCS maximum return packet
size
Thread-Topic: [PATCH v3 2/2] drm: renesas: rz-du: Set DCS maximum return
packet size
Thread-Index: AQHbyydYZROipDs4Mk6V13hnElvTOLPy9BEwgAAgjQCAAA9nYA==
Date: Wed, 4 Jun 2025 14:36:43 +0000
Message-ID:
<OS3PR01MB8319CB77A70EE45E7C5E17B48A6CA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20250522143911.138077-1-hugo@xxxxxxxxxxx>
<20250522143911.138077-3-hugo@xxxxxxxxxxx>
<OS3PR01MB831999C4A5A32FE11CC04A078A6CA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
<20250604093458.65c3999662a9fbc4d7cf22e5@xxxxxxxxxxx>
In-Reply-To: <20250604093458.65c3999662a9fbc4d7cf22e5@xxxxxxxxxxx>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=renesas.com;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: OS3PR01MB8319:EE_|TYAPR01MB6041:EE_
x-ms-office365-filtering-correlation-id: 57b9320f-5d25-4b81-05f8-08dda37539e5
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam:
BCL:0;ARA:13230040|1800799024|376014|7416014|366016|38070700018;
x-microsoft-antispam-message-info:
=?us-ascii?Q?X/e4CKFo6hcf6Hb43TQq9y9ttb2FNWXFZaMNPG4JsCyofCWRh/rsEp/k5+/9?=
=?us-ascii?Q?QJvRHr5v59En+uuARZeddCB+ImnFqgGXBq+kvS9TcqVJwmAFxmIbdk1p2uOW?=
=?us-ascii?Q?4upGQEMBvaKh9howZr1DwMs1O2Y4XkeH+bjmNcdhnpC7LlvOCrSSjmQjT51X?=
=?us-ascii?Q?S3tQo92NMvezUY2ZDMcq3U4U/cjFxzxk8cD8UlQ4ySqqeJyxlSfy2gDVLkEa?=
=?us-ascii?Q?6ocQArCmTSfExRTE9nV9NEBguV3EpUojGQxIOc23moqvqXlODWZZCJpdwx2h?=
=?us-ascii?Q?VduAOwKrMH8z46Dxhx6m03U3a4+8ilGTkmaL1aj5bcQsDskswSfUtYSFSfhu?=
=?us-ascii?Q?QzDOM5PrYwCM/elcGvnbWy4khgh2R9Ak/3FHojMxH8oa0J5BBbtPXgTDFYUm?=
=?us-ascii?Q?GDmllqIMhXYRYisGTp1D+fNq8dbLutQI/GAubvAMcvOE9Ak2dCvdKmCgD0Rc?=
=?us-ascii?Q?NKj5OH4R43/ysSigk9QfcjEaKI/R1f+dOJM3oKOAKBu7g6LHqZqGdcGSTc1H?=
=?us-ascii?Q?dud8P0V2h6s/vU+d9fpEq+gUXLR8fvwJWoIUOTYXLTRltpnSaHMSvWDlz8ug?=
=?us-ascii?Q?QoxFbAxPq6SJw8I/NB1SCbWH0cKkNMG2PdpJAobMIVwHd44gyp0UbsAiasIo?=
=?us-ascii?Q?3jF3hVM+jFYobB/vtIL/HNxjZDTJQa8HbtFXnuoAqugtLVQsuHwbf+i7qQhq?=
=?us-ascii?Q?KVQcZr35jyDUNho8Kz3+SToOLNlS0/VJLEmakvZLsigWaptY0P4pgeheG6UT?=
=?us-ascii?Q?1WU2A7DNgUp8q28XtESFCDT6gyJWdKfkDKSOsMu4vO4e0tKv77ywGd+WpqEc?=
=?us-ascii?Q?2FK5/0m8MNGxnYHhKLKe2hg0SrnGNE28h23MYtB79ZdrPM//PTW+sMK5KWtF?=
=?us-ascii?Q?4g7pp26yjhsoK2jQRoPQdcg7J+un0silJ0wnGtv0iu6v/nwS0USAay+XStL3?=
=?us-ascii?Q?XRKYbKkWb26j1CUuqDpl5a6A/DnWraL7B2qTlkUk29GOOjliYnAnm9x0N3dr?=
=?us-ascii?Q?q3ATAtM0Hi3N2up0TXOJo+OPmfN5T1dfmPDJJyAL9fqwpcMC7XzJzzJMoW9D?=
=?us-ascii?Q?WnwUkXPZ4+R49fKamPR7nLw3hrBmr5UEWIxa+AYVpA5MwJoLvR0SKoHW1Qc9?=
=?us-ascii?Q?hMV81wIJxMyYCn582t3M6200m67dxQieUOSKIvwnOEKTNHljCJR63Hk4nYEc?=
=?us-ascii?Q?QoynYVHIORrcvkbLZAImZD9oLBO0m2r4unuHYWkr74CDFSw+H71aHf6pRZ/8?=
=?us-ascii?Q?fUbasSxAYTFGnF5PXukMGopjRnId2EYJojb34cuRahYw1PBqdhdc3NoiGjoA?=
=?us-ascii?Q?Rb87VZcHwXlvE/9Q7XBXT6JWlvkG7uLVfnKJ3SmpF6Z9wGhCLcbNhe9tks2M?=
=?us-ascii?Q?P3u1CqSCDj+DxkdBW6tyqAatvtOwdH0j+TbkPQmmlDXF9b1gZiY4lZ0lZjBF?=
=?us-ascii?Q?K1QI3Y8SS+IUvFcVAlpI0Waf7ybRZqNESpDHjZjsQDqmnM/Ac3uuDA=3D=3D?=
x-forefront-antispam-report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS3PR01MB8319.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(376014)(7416014)(366016)(38070700018);DIR:OUT;SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0:
=?us-ascii?Q?Dwx6B4JfxWeL2w2Q/bEgmCZTfkuqbrsXmPF7Y+jqGIWnrqwChwNbV7wiFv8/?=
=?us-ascii?Q?6PNDpgWhS8NYhkmPiIeUVH8xMigBpcA2QGN18D2z379r7aOsg3U4R0ESoPFX?=
=?us-ascii?Q?vxQIU3YUmhBeHGu0Qfyox/bX8qWBCGjPp2rTg8fq+RqN8B3TLurDMyk3jdWi?=
=?us-ascii?Q?Q74VXRmFpSpZe0CYaLfToZMl+It5gVX0Us/CsNASrb32m3HvYKwMkxfwi4gE?=
=?us-ascii?Q?l79qEGe0zp0rMNdOq3qT5sz6J/RnQAUFeS2OS8BvMLxsXOttGG0q7rTmRPDq?=
=?us-ascii?Q?Y+PGBmpnm/iOcy6aAPRLUDr9c4s1EhkXylpNKLXV+g2FKHs5Qu7Ugo6HA6KU?=
=?us-ascii?Q?4MVBoP+tzHpHQ476LHAuN6ykBZB9+JyGvuv5PPFUH/puKM6Gzmqt3BsQcv+S?=
=?us-ascii?Q?rGl28Fwl0Up7Hkq4cB3CCo4WBTX9iFdy7WUbvruXoOf8233g/6AM+17Gxk6h?=
=?us-ascii?Q?Yj22dj9QmDVbNGnIU5jmTDCDXK0q9EAaxQeV/buzErcpk5U266YwriIM/uPn?=
=?us-ascii?Q?BTv4K571wQKCO0PjHuFXfocdsydidVTnsdgDuA1TLXwc5lUigEqBEtbr6XAE?=
=?us-ascii?Q?xaOci3ePGGfzrOf24y+qKJBiKyENIOjsXaYVyRUyA8Da3fc7m6Silw93VEfB?=
=?us-ascii?Q?N7g14jnHmjWa6UM1Dv5JphKuUBfEoqYiQWr+SXP7aL0O/Is+7eaSEcDvbOFo?=
=?us-ascii?Q?9n4dbVx3ky0R/A1ZQ2glKumfjh/uuyBYubAjc532PzU9iixaKZIBColLo3zx?=
=?us-ascii?Q?45VN3AncWOKfoKrv4qMszKYCvhQSzEC7Sm9aaAIdfDZmwOMnViK1aGCzYFEG?=
=?us-ascii?Q?1/WA+GCG9qCVenPR64Vi8wjJYsmjqiscFLi7MlAKniWGZnS4Kw5KEV/piGwU?=
=?us-ascii?Q?1r5sdeLoNDKwBTi86bMvBrKOhewOA8S5+9JcsiZt+HSRTPfn6TR4OyQ6FSV5?=
=?us-ascii?Q?U5tYzP8bHvZE+YwBlBe7Aua7NEXAd3Mn5RNpNME8Vh4pKqEsfCWOufEE9JOK?=
=?us-ascii?Q?mGiEt1GP9AFS5ztrCx9yCacMZ/9xoTH5YzD3ayrxD4b4CICKvQR07xpul4Jr?=
=?us-ascii?Q?JViZB8Uc0B1vJM0Iqn4Cq6WOYufHLyaQpgp0OIL4y4gTEhoYfZl07M7Px15C?=
=?us-ascii?Q?uY9QkScDVBVDnYOwAncJmXiSkY3/ONF3zPCa4wJox+4zrzVap977kW5h4jVs?=
=?us-ascii?Q?P74ZkUO0Dsq8hNhVe5fgqt16JNq1h09CrsaLyPxY1jdXY2toocgCIZLQSSp4?=
=?us-ascii?Q?Obgw3sCgCCYNgWNEnJ89bJxzipLJs9XmyjyX8eYPIe5jHMIrnnU9k7NAAIO6?=
=?us-ascii?Q?oae+5mlPC+v3GEIWdPw5uO8AOIvE0HOJuTIpHHgl5mvfi8NMKWpW46UGuHNW?=
=?us-ascii?Q?pOCSRawTVdgT2Zedl6MmEcLRRsmsnC1aTRnYP8S7o2p6I7SuTGTZjt8/Mdp2?=
=?us-ascii?Q?AWKfPtxt288a0JN0M7Sw0/FpuDYh3yF1wOFX9O1o8+VxGfZfeczsVxYJHib4?=
=?us-ascii?Q?eXKXBhARcuEX+OBOqYpZ8D1STaP3QWyU9j84GOoQV5jbop1MLW9iRI73D0uX?=
=?us-ascii?Q?/32kXbbN5Tk0YSIhgdx/OGzvB2rkNtNHMx2L+T0b?=
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-OriginatorOrg: renesas.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8319.jpnprd01.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 57b9320f-5d25-4b81-05f8-08dda37539e5
X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jun 2025 14:36:43.3603
(UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 53d82571-da19-47e4-9cb4-625a166a4a2a
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: jcZ7lhXaZrTbyUBhNO6OaumWS2BK0HW4xumSN11swZuo/wt2o56i+75ST40Ua9BILHyaSJ0Xn+W59Px4a+26wPQCjYb8CG2L51Yqj4hJm+g=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYAPR01MB6041
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hi Hugo,
Also, by default, most panels are configured to send a maximum of 1 byte,=
so it is not absolutely required by default and not really a bug.
Thanks. I found that I needed to call mipi_dsi_set_maximum_return_packet_si=
ze() first in my panel driver, then I could receive multiple bytes.
Chris
-----Original Message-----
From: Hugo Villeneuve <hugo@xxxxxxxxxxx>=20
Sent: Wednesday, June 4, 2025 9:35 AM
To: Chris Brandt <Chris.Brandt@xxxxxxxxxxx>
Cc: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>; maarten.lankhorst@xxxxxxxxxxxxxx=
m; mripard@xxxxxxxxxx; tzimmermann@xxxxxxx; airlied@xxxxxxxxx; simona@ffwll=
.ch; dri-devel@xxxxxxxxxxxxxxxxxxxxx; linux-renesas-soc@xxxxxxxxxxxxxxx; li=
nux-kernel@xxxxxxxxxxxxxxx; Hugo Villeneuve <hvilleneuve@xxxxxxxxxxxx>
Subject: Re: [PATCH v3 2/2] drm: renesas: rz-du: Set DCS maximum return pac=
ket size
On Wed, 4 Jun 2025 11:54:28 +0000
Chris Brandt <Chris.Brandt@xxxxxxxxxxx> wrote:
Hi Chris,
Hi Hugo,
=20
I'm fine with the code, but maybe it should go in a different location.
=20
Since it's a register setup, it should probably go in rzg2l_mipi_dsi_star=
tup() with the others.
It makes sense, I will move it there.
=20
Additionally, since it is required to make=20
rzg2l_mipi_dsi_host_transfer() operate properly, my suggestion is to add =
this to your previous patch instead of making it separate.
Otherwise, it's like you are submitting one patch with a known bug, then =
immediately fixing it with a second patch.
I made it a separate patch to clearly show why this is needed, because it t=
ook me a lot of time to figure this out, and I didn't want that knowledge t=
o be lost :)
Also, by default, most panels are configured to send a maximum of 1 byte, s=
o it is not absolutely required by default and not really a bug.
But sure I can merge it, anyway my comment will clearly indicate why it is =
needed.
This also would prevent the merge conflict with my patch that also modifi=
es rzg2l_mipi_dsi_atomic_enable().
Ok.
Hugo.
Chris
=20
=20
-----Original Message-----
From: Hugo Villeneuve <hugo@xxxxxxxxxxx>
Sent: Thursday, May 22, 2025 10:39 AM
To: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>;=20
maarten.lankhorst@xxxxxxxxxxxxxxx; mripard@xxxxxxxxxx;=20
tzimmermann@xxxxxxx; airlied@xxxxxxxxx; simona@xxxxxxxx
Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx;=20
linux-renesas-soc@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx;=20
hugo@xxxxxxxxxxx; Hugo Villeneuve <hvilleneuve@xxxxxxxxxxxx>; Chris=20
Brandt <Chris.Brandt@xxxxxxxxxxx>
Subject: [PATCH v3 2/2] drm: renesas: rz-du: Set DCS maximum return=20
packet size
=20
From: Hugo Villeneuve <hvilleneuve@xxxxxxxxxxxx>
=20
The default value of 1 will result in long read commands payload not bein=
g saved to memory.
=20
Fix by setting this value to the DMA buffer size.
=20
Cc: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
Cc: Chris Brandt <chris.brandt@xxxxxxxxxxx>
Signed-off-by: Hugo Villeneuve <hvilleneuve@xxxxxxxxxxxx>
---
drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c | 10 ++++++++++
drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi_regs.h | 4 ++++
2 files changed, 14 insertions(+)
=20
diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c=20
b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
index a048d473db00b..745aae63af9d8 100644
--- a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
+++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
@@ -549,6 +549,7 @@ static void rzg2l_mipi_dsi_atomic_enable(struct drm_b=
ridge *bridge,
const struct drm_display_mode *mode;
struct drm_connector *connector;
struct drm_crtc *crtc;
+ u32 value;
int ret;
=20
connector =3D drm_atomic_get_new_connector_for_encoder(state,=20
bridge->encoder); @@ -561,6 +562,15 @@ static void=20
rzg2l_mipi_dsi_atomic_enable(struct drm_bridge *bridge,
=20
rzg2l_mipi_dsi_set_display_timing(dsi, mode);
=20
+ /*
+ * The default value of 1 will result in long read commands payload
+ * not being saved to memory. Set to the DMA buffer size.
+ */
+ value =3D rzg2l_mipi_dsi_link_read(dsi, DSISETR);
+ value &=3D ~DSISETR_MRPSZ;
+ value |=3D FIELD_PREP(DSISETR_MRPSZ, RZG2L_DCS_BUF_SIZE);
+ rzg2l_mipi_dsi_link_write(dsi, DSISETR, value);
+
ret =3D rzg2l_mipi_dsi_start_hs_clock(dsi);
if (ret < 0)
goto err_stop;
diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi_regs.h=20
b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi_regs.h
index 0e432b04188d0..26d8a37ee6351 100644
--- a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi_regs.h
+++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi_regs.h
@@ -81,6 +81,10 @@
#define RSTSR_SWRSTLP (1 << 1)
#define RSTSR_SWRSTHS (1 << 0)
=20
+/* DSI Set Register */
+#define DSISETR 0x120
+#define DSISETR_MRPSZ GENMASK(15, 0)
+
/* Rx Result Save Slot 0 Register */
#define RXRSS0R 0x240
#define RXRSS0R_RXPKTDFAIL BIT(28)
--
2.39.5
=20
=20
--
Hugo Villeneuve
Return-Path: <linux-kernel+bounces-673379-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 4457341E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:40:04 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 20B221883339
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:39:37 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 3B1A1293444;
Wed, 4 Jun 2025 14:37:22 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=lwn.net header.i=@lwn.net header.b="VWhgABLz"
Received: from ms.lwn.net (ms.lwn.net [45.79.88.28])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1A9AC28ECE9;
Wed, 4 Jun 2025 14:37:18 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.79.88.28
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749047841; cv=none; b=e/i84inXcW9E/wdRpw9LuIhG89wIfhS+0T9CW2QU9YzBy0Dwiz9OjJEXkyI9r/zlaH3jumYXOxTpEeejQJ56hquASOGnm89UWOP7uuoMuxf0gBHvcCXn8ElLoUiMmen+0GO0MywupcrDvWuEe3tn0ADNF9dI4YPwaLQrXeEz3ec=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749047841; c=relaxed/simple;
bh=o/eS0IF6n81//MErCyau1coRDfnLuZuoMMa9zXVwLg0=;
h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version; b=koPhM67n+Msp1sIrbF68JqaCviKDzq+IGN2YTBWH2R0QmTKSFhelBrb334h3seMqJM6XsRADhCxH2OwL6pCSRM9/3eFMerGcNP2PwtTidM/rG5mMbr+n0IoV9tW3PuSVczRabtHsrSY/gBrWcRfoxnWza8Qt6d7ji5jdXTSs864=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lwn.net; spf=pass smtp.mailfrom=lwn.net; dkim=pass (2048-bit key) header.d=lwn.net header.i=@lwn.net header.b=VWhgABLz; arc=none smtp.client-ip=45.79.88.28
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lwn.net
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lwn.net
DKIM-Filter: OpenDKIM Filter v2.11.0 ms.lwn.net 2485541F28
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lwn.net; s=20201203;
t=1749047838; bh=wNJhZW6ihKPzqnGzsjX01EfMfrNUVHiRICJcUri79Tc=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=VWhgABLzPv5K191kbMmASTQ4FJhxOc93Wb0ofcM+VzBxGSI9IhJWJgus1vlJbgO3f
+ezPU8nDNiyyEfi0FoBpaI+3MMb9ctJOVqkwwG+OnmwWVw+A/BGZFb/cQYN6FaghaS
Au58jdselallcC7zVGKNunPxXJAfAxqKPEHfBW2PvkIaqIRJnTJEgItLEajxloRttt
AHpCUl5tAYm9ZtGcdoKGIkBEe5DRnjFHZ3dP7BpbIU1WQZ+1WgP6bHbgzYHab/mwa5
vL/b7osrDH7R7u9UExP6iFPPk2W/hWot5cXrjzM1Nt+L3Npnq4INA0zjUexrQyO/yE
AdEvE+3cnd9Ww==
Received: from trenco.lwn.net (unknown [IPv6:2601:280:4600:2da9::1fe])
by ms.lwn.net (Postfix) with ESMTPA id 2485541F28;
Wed, 4 Jun 2025 14:37:18 +0000 (UTC)
From: Jonathan Corbet <corbet@xxxxxxx>
To: linux-doc@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx,
Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx>,
=?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= <nfraprado@xxxxxxxxxxxxx>,
Jonathan Corbet <corbet@xxxxxxx>
Subject: [PATCH v2 1/3] docs: automarkup: Remove some Sphinx 2 holdovers
Date: Wed, 4 Jun 2025 08:36:43 -0600
Message-ID: <20250604143645.78367-2-corbet@xxxxxxx>
X-Mailer: git-send-email 2.49.0
In-Reply-To: <20250604143645.78367-1-corbet@xxxxxxx>
References: <20250604143645.78367-1-corbet@xxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Remove a few declarations that are no longer doing anything now that we
have left Sphinx 2 behind.
Signed-off-by: Jonathan Corbet <corbet@xxxxxxx>
---
v2: Remove RE_generic_type as suggested by Mauro
Documentation/sphinx/automarkup.py | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
diff --git a/Documentation/sphinx/automarkup.py b/Documentation/sphinx/automarkup.py
index fd633f7a0bc3..7828aeac92e7 100644
--- a/Documentation/sphinx/automarkup.py
+++ b/Documentation/sphinx/automarkup.py
@@ -22,12 +22,6 @@ from kernel_abi import get_kernel_abi
#
RE_function = re.compile(r'\b(([a-zA-Z_]\w+)\(\))', flags=re.ASCII)
-#
-# Sphinx 2 uses the same :c:type role for struct, union, enum and typedef
-#
-RE_generic_type = re.compile(r'\b(struct|union|enum|typedef)\s+([a-zA-Z_]\w+)',
- flags=re.ASCII)
-
#
# Sphinx 3 uses a different C role for each one of struct, union, enum and
# typedef
@@ -150,20 +144,12 @@ def markup_func_ref_sphinx3(docname, app, match):
return target_text
def markup_c_ref(docname, app, match):
- class_str = {# Sphinx 2 only
- RE_function: 'c-func',
- RE_generic_type: 'c-type',
- # Sphinx 3+ only
- RE_struct: 'c-struct',
+ class_str = {RE_struct: 'c-struct',
RE_union: 'c-union',
RE_enum: 'c-enum',
RE_typedef: 'c-type',
}
- reftype_str = {# Sphinx 2 only
- RE_function: 'function',
- RE_generic_type: 'type',
- # Sphinx 3+ only
- RE_struct: 'struct',
+ reftype_str = {RE_struct: 'struct',
RE_union: 'union',
RE_enum: 'enum',
RE_typedef: 'type',
--
2.49.0
Return-Path: <linux-kernel+bounces-673381-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 4B32741E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:40:06 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id E9C17189C11B
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:39:37 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 5664129344A;
Wed, 4 Jun 2025 14:37:22 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=lwn.net header.i=@lwn.net header.b="IoSaMw3J"
Received: from ms.lwn.net (ms.lwn.net [45.79.88.28])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 404B02918EA;
Wed, 4 Jun 2025 14:37:20 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.79.88.28
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749047841; cv=none; b=cYI7yhERDGgua829TcvkY6BFHYlS0FeaeaqYf+udXP98JsxPJEzrQbmf/wQluUleASnjmjJX/FVDRnYTO7SPwtXq4QtHMSw8Kczefncp+zNhUL4gey6wThFil2vGiN1PXrxDgkw0sL6NnSDNQObWn/2r7Eljqkes5SQWHdzXnps=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749047841; c=relaxed/simple;
bh=n3BGNRF566cDDtcBKyLEimgg5xUVaSyHoq2hq+IcLis=;
h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version:Content-Type; b=gw34rn+rvcz6xvHzTzm0MPBDBlXtToLrWek+CUqnjFwG18phsRJGP6GhwvXjNK6KCG3cvyMvQfxQ+jec2ETf2tmiXwhCP/iBptU8yGda0D2PaMZXaASP/zEkKYCL9oIr10UwZmD+7y0Ejm3B4zDdgqPqK3ToNELDD3+LZ9SVJB4=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lwn.net; spf=pass smtp.mailfrom=lwn.net; dkim=pass (2048-bit key) header.d=lwn.net header.i=@lwn.net header.b=IoSaMw3J; arc=none smtp.client-ip=45.79.88.28
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lwn.net
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lwn.net
DKIM-Filter: OpenDKIM Filter v2.11.0 ms.lwn.net 3CD6F41F2B
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lwn.net; s=20201203;
t=1749047839; bh=tvFya/pb+S/tzuJ3dPBYB53ab6U3mH5GgVpq+XIb2Xk=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=IoSaMw3J6td/EUscFMxtpKj5c4L75mCm4yXHrPDIapZbjHa78djnFsPezt1Wkowa1
6VyBX8st74kWI0au9OaGmZ7Cffd9ke4fqcXYe/gIvPndy/HXECmXwAvidrokXvYqU3
7o1803cKHsTaBc7Fb1gdDQ5tkDKZgKwim5A/lllO1Tr6feil1MLBaJjPS4rA8CI8Wp
xO0XQc4SFmFcqqNANhUkoy8FnnMMezrv9XSDeJ9AZx0wpWrt4KMDckBd92TCoEs8tj
zlSCdPCFwGTbnKkhrIqy0/KaCnG11T8CPYnMixrkjZ8HVO0MbBImLrM5tqRyinFvU+
8XWkzsusX2r6w==
Received: from trenco.lwn.net (unknown [IPv6:2601:280:4600:2da9::1fe])
by ms.lwn.net (Postfix) with ESMTPA id 3CD6F41F2B;
Wed, 4 Jun 2025 14:37:19 +0000 (UTC)
From: Jonathan Corbet <corbet@xxxxxxx>
To: linux-doc@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx,
Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx>,
=?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= <nfraprado@xxxxxxxxxxxxx>,
Jonathan Corbet <corbet@xxxxxxx>
Subject: [PATCH v2 3/3] docs: CSS: make cross-reference links more evident
Date: Wed, 4 Jun 2025 08:36:45 -0600
Message-ID: <20250604143645.78367-4-corbet@xxxxxxx>
X-Mailer: git-send-email 2.49.0
In-Reply-To: <20250604143645.78367-1-corbet@xxxxxxx>
References: <20250604143645.78367-1-corbet@xxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
The Sphinx Alabaster theme uses border-bottom to mark reference links; the
result does not render correctly (the underline is missing) in some browser
configurations. Switch to using the standard text-underline property, and
use text-underline-offset to place that underline below any underscores in
the underlined text.
Suggested-by: Nícolas F. R. A. Prado <nfraprado@xxxxxxxxxxxxx>
Signed-off-by: Jonathan Corbet <corbet@xxxxxxx>
---
Documentation/sphinx-static/custom.css | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Documentation/sphinx-static/custom.css b/Documentation/sphinx-static/custom.css
index f4285417c71a..c9991566f914 100644
--- a/Documentation/sphinx-static/custom.css
+++ b/Documentation/sphinx-static/custom.css
@@ -136,3 +136,10 @@ div.language-selection:hover ul {
div.language-selection ul li:hover {
background: #dddddd;
}
+
+/* Make xrefs more universally visible */
+a.reference, a.reference:hover {
+ border-bottom: none;
+ text-decoration: underline;
+ text-underline-offset: 0.3em;
+}
--
2.49.0
Return-Path: <linux-kernel+bounces-673380-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 0AF4C41E003FB
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:40:07 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 971573A87F8
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:39:00 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 48C0E293449;
Wed, 4 Jun 2025 14:37:22 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=lwn.net header.i=@lwn.net header.b="iTEIGDQ8"
Received: from ms.lwn.net (ms.lwn.net [45.79.88.28])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 404412918E6;
Wed, 4 Jun 2025 14:37:19 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.79.88.28
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749047841; cv=none; b=eo93+rwIUMF6OvpNr+HqspbXeHI47O6e8YeBuZwCjAQN1zCE00fZcJhzUHBDCWTjfb/ffZZICjE+y4wVKXyz9aTrSmwWYnNnUlN7Z1xIsyL5BpoV9F5tGR9m1EbTZoKMxsX3+p735kvyRczKJ4qcbiw8p1zZ+rYRV9LeSQMq000=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749047841; c=relaxed/simple;
bh=xr4uTdRiZCNdMn3W5qWwwPpYDscXYuir3me+H8XQdC8=;
h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version; b=I3eyZ7wLPywXcmZHrxGGhXXpFPPcK5f1jqClPAYefV3KqMdcssP3NmgMdd5Vgrbhusf9DLfLz3v7ZHLfereU1aX3abQUlXk4KN8yB438FgNGnHfT40heQT/75fOfu/v6eUFni+XLVrgAn/Cd5PBCoE+5nyFxMw6Mc1pcTPPlSBg=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lwn.net; spf=pass smtp.mailfrom=lwn.net; dkim=pass (2048-bit key) header.d=lwn.net header.i=@lwn.net header.b=iTEIGDQ8; arc=none smtp.client-ip=45.79.88.28
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lwn.net
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lwn.net
DKIM-Filter: OpenDKIM Filter v2.11.0 ms.lwn.net A54A441F2A
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lwn.net; s=20201203;
t=1749047839; bh=lQCobccnQ6ihUHwgNMz6oxJnLailFhApTPbx4Ru7zAA=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=iTEIGDQ8EuL9sG1212muriZArVDE7cLPYUI4khVzmAqhIQiD6wxTsm7BavqVwXaS1
WIJ0chjYgqQjFbQUeB7ZSp35XJ6epRGR2Q9i/Js3XpETm+KPlRFoDxJ6VdPKj0seHV
rHGZN1ct9xEHIF6gIymoGKSUqFoPVO+UTM7/D0kKBtPzy05NWfoSU6ObH19GSEkoKm
fZoCKMOJ12FgoUTom5CsMw0+lffXEZEWY7Y0Q94RJnspP3X7ezLHGLfAY92EOy9Ixw
fSgQz8ZDC7lBznw7IulEMlfcszDHiExmuW/h5vYWNNKto0tlO1gqGmxD/RMnqA2vXS
9IBf2WRFNhYgw==
Received: from trenco.lwn.net (unknown [IPv6:2601:280:4600:2da9::1fe])
by ms.lwn.net (Postfix) with ESMTPA id A54A441F2A;
Wed, 4 Jun 2025 14:37:18 +0000 (UTC)
From: Jonathan Corbet <corbet@xxxxxxx>
To: linux-doc@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx,
Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx>,
=?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= <nfraprado@xxxxxxxxxxxxx>,
Jonathan Corbet <corbet@xxxxxxx>
Subject: [PATCH v2 2/3] docs: automarkup: Mark up undocumented entities too
Date: Wed, 4 Jun 2025 08:36:44 -0600
Message-ID: <20250604143645.78367-3-corbet@xxxxxxx>
X-Mailer: git-send-email 2.49.0
In-Reply-To: <20250604143645.78367-1-corbet@xxxxxxx>
References: <20250604143645.78367-1-corbet@xxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
The automarkup code generates markup and a cross-reference link for
functions, structs, etc. for which it finds kerneldoc documentation.
Undocumented entities are left untouched; that creates an inconsistent
reading experience and has caused some writers to go to extra measures to
cause the markup to happen.
Mark up detected C entities regardless of whether they are documented.
Signed-off-by: Jonathan Corbet <corbet@xxxxxxx>
---
v2: Split out the CSS changes into a separate patch
Documentation/sphinx/automarkup.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/Documentation/sphinx/automarkup.py b/Documentation/sphinx/automarkup.py
index 7828aeac92e7..e67eb8e19c22 100644
--- a/Documentation/sphinx/automarkup.py
+++ b/Documentation/sphinx/automarkup.py
@@ -235,8 +235,13 @@ def add_and_resolve_xref(app, docname, domain, reftype, target, contnode=None):
if xref:
return xref
-
- return None
+ #
+ # We didn't find the xref; if a container node was supplied,
+ # mark it as a broken xref
+ #
+ if contnode:
+ contnode.set_class("broken_xref")
+ return contnode
#
# Variant of markup_abi_ref() that warns whan a reference is not found
--
2.49.0
Return-Path: <linux-kernel+bounces-673382-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 99CDA41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:40:48 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 34D623A84D1
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:39:35 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 89318292083;
Wed, 4 Jun 2025 14:37:34 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="LO1AeMzu"
Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id DF8F9292086
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:37:31 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749047853; cv=none; b=I+pzBoK0KZBp+keABku136bnetdq7kmaySTg4JmQ/4Sg0JvGVvqxExHc/En3AeJPpLVdKG1wwn1E9Yh2QqGWHjZic9s753gCClZakVt8slQbG1Avynpw5jP5R0eUwK3xEXw9TSqH9Fa3U53tbGwxQlWYekTGfKsW2X4DanbmiF4=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749047853; c=relaxed/simple;
bh=U5I5Ahe6JecLKWF9dMl/WGN9UgS8Owuf/L8FewTRsgU=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=VEHXr4zYojKv0md1NGa1jRSHi0RNcBorrXs+GCZRz0GdbzwrmwwaEei4S7miyE/nPmUWTATsSfTn7b/qasZSaoGZCqy4589eXzx47drd2LcoruWlyj97JoTYMXxs+oEoxTMtSWVosIBgGVNfU1kLnrZoE362uAIwEtDAMBOp10I=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch; spf=none smtp.mailfrom=ffwll.ch; dkim=pass (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b=LO1AeMzu; arc=none smtp.client-ip=209.85.128.49
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch
Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=ffwll.ch
Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-442f9043f56so42800785e9.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 07:37:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=ffwll.ch; s=google; t=1749047850; x=1749652650; darn=vger.kernel.org;
h=in-reply-to:content-disposition:mime-version:references
:mail-followup-to:message-id:subject:cc:to:from:date:from:to:cc
:subject:date:message-id:reply-to;
bh=tZUBKc30vw5SwfnkHXPZNMm/Ylyi+Jo+Sq09IMYtHNI=;
b=LO1AeMzuOypb4avrziNOuqWjBGHZdnTOUfLUdLhBbH+YZDmXNqRqPJswTxup/T8ZE1
+oPMwKvvXQ0fKiwJ7dnZlhQEWSFn0U66WBDGAmMFE5+aAK94OzjMqXzKel2xVti9RF7L
YJf2IHtGfA59rJTn9oP7P6ESh3fCXerm8d8LI=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749047850; x=1749652650;
h=in-reply-to:content-disposition:mime-version:references
:mail-followup-to:message-id:subject:cc:to:from:date
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=tZUBKc30vw5SwfnkHXPZNMm/Ylyi+Jo+Sq09IMYtHNI=;
b=XcJ+fAP47QHCNIHYtM/llfxob1XrqOJ5IjBY/J89dUj3eleC/sJTBcUjCitBALCtyc
3YZRCpzroFhVdhWdwbUFDXiQkpG7x3zAW2YpSIHj2mUzDlYAKYIEzmuASeBAhamPOqrc
fraK9Mv0QKPcFNcu3Rl+PpVVqa03dsnaD1OByu/rVxwexFZ4fwOtuyD8u6KYQ18Z+bqF
17mIhcCpu/XxaiYvLZ4XGqL2C4g1aD5pUTGs5EDTt+DnkxIL+5fuhpuq8ThjwSCgy3na
a4z/CNy1eFtnwDL7R4o7Cuqld2Z1iPY/F6/ZHiD0+XCHlsLPzgUr1dRPwGT2NIpBTQWn
2xNg==
X-Forwarded-Encrypted: i=1; AJvYcCUGeuht9dFWQEuKZJTzIJUo5Xx39zqLY9n7Iis0qBI8oaSdGq0wYPEvqHOqmgvqYx2vemaht5AzrJbyKDs=@vger.kernel.org
X-Gm-Message-State: AOJu0YzschiKZ8M/zWR5MrtvF/ywuIhXyUUnJgFL5QbJ9B4sgZU8SBrQ
AzHuZ+nZJSW5zeRztiiMcP4U7qYao3YQiPoDroeHGAJ6+jDyeVbh3YGk5BfcJt0V9Tw=
X-Gm-Gg: ASbGncs2OnoVcxBys55vCAxXq+X8qE/pDeV6fmIXIJlkdbFCLKjhi0gWdMxvmg74SXo
sXz+EDYWXxPGFof2E1Uq3ImaEp1/8aaTblrntSlYU6FTlTrXE8BLvaqAwswqoRUsWTPWK+2gcJL
pn0yHu5b/pnzfFkcN6kJF8mFz7UsqgRuvOF23N17FDDCH6OZEQ9AymG+4syI9LC3+sSM/m8Zv+S
EX46+K+duJtyueN0QyncLs83codC1dvgxYFywbjm5G5LquZ5ionjiBTVz2qqwNo9/fTsalEGAyO
H8g4ZpSKGJOtjIDFnhAXCrxghwH3XWiZ1P1VEeF8W1YslmPVQZvaaLo0/+ubQbRNRBn84CHv2re
qoSIyoHi0
X-Google-Smtp-Source: AGHT+IF77XDVBkS67KTLmSK0T5wkUceKrc8aauvlRs0sDvEgKEf7a7UPbdimhlaAcpzc3R8z8tPcyQ==
X-Received: by 2002:a05:600c:1548:b0:43c:f8fc:f697 with SMTP id 5b1f17b1804b1-451f0a72bf1mr31835005e9.9.1749047849792;
Wed, 04 Jun 2025 07:37:29 -0700 (PDT)
Received: from phenom.ffwll.local ([2a02:168:57f4:0:5485:d4b2:c087:b497])
by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-450d7f90c40sm204287965e9.2.2025.06.04.07.37.28
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 07:37:29 -0700 (PDT)
Date: Wed, 4 Jun 2025 16:37:27 +0200
From: Simona Vetter <simona.vetter@xxxxxxxx>
To: Bagas Sanjaya <bagasdotme@xxxxxxxxx>
Cc: Abdulrasaq Lawani <abdulrasaqolawani@xxxxxxxxx>,
Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>,
Maxime Ripard <mripard@xxxxxxxxxx>,
Thomas Zimmermann <tzimmermann@xxxxxxx>,
David Airlie <airlied@xxxxxxxxx>, Simona Vetter <simona@xxxxxxxx>,
Jonathan Corbet <corbet@xxxxxxx>, dri-devel@xxxxxxxxxxxxxxxxxxxxx,
linux-doc@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
Subject: Re: [PATCH v4] drm: add overview diagram for drm stack
Message-ID: <aEBaJ5zMHfzhpdlz@phenom.ffwll.local>
Mail-Followup-To: Bagas Sanjaya <bagasdotme@xxxxxxxxx>,
Abdulrasaq Lawani <abdulrasaqolawani@xxxxxxxxx>,
Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>,
Maxime Ripard <mripard@xxxxxxxxxx>,
Thomas Zimmermann <tzimmermann@xxxxxxx>,
David Airlie <airlied@xxxxxxxxx>, Simona Vetter <simona@xxxxxxxx>,
Jonathan Corbet <corbet@xxxxxxx>, dri-devel@xxxxxxxxxxxxxxxxxxxxx,
linux-doc@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
References: <20250601-drm-doc-updates-v4-1-e7c46821e009@xxxxxxxxx>
<aDz-Pq4eMAYmzqsJ@xxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <aDz-Pq4eMAYmzqsJ@xxxxxxxxx>
X-Operating-System: Linux phenom 6.12.25-amd64
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Mon, Jun 02, 2025 at 08:28:30AM +0700, Bagas Sanjaya wrote:
On Sun, Jun 01, 2025 at 06:18:47PM -0400, Abdulrasaq Lawani wrote:
> Add an overview diagram of Linux DRM architecture for
> graphics and compute to introduction.rst
>
> Signed-off-by: Abdulrasaq Lawani <abdulrasaqolawani@xxxxxxxxx>
> ---
> <snipped>...
> diff --git a/Documentation/gpu/introduction.rst b/Documentation/gpu/introduction.rst
> index 3cd0c8860b949408ed570d3f9384edd5f03df002..a8d3f953a470180b395ec52a45d0f3f4561424e0 100644
> --- a/Documentation/gpu/introduction.rst
> +++ b/Documentation/gpu/introduction.rst
> @@ -14,7 +14,45 @@ including the TTM memory manager, output configuration and mode setting,
> and the new vblank internals, in addition to all the regular features
> found in current kernels.
>
> -[Insert diagram of typical DRM stack here]
> +Overview of the Linux DRM Architecture
> +--------------------------------------
> +::
> +
> + +-----------------------------+
> + | User-space Apps |
> + | (Games, Browsers, ML, etc.) |
> + +-----------------------------+
> + |
> + v
> + +---------------------------------------+
> + | Graphics APIs | Compute APIs |
> + | (OpenGL, Vulkan) | (OpenCL, CUDA) |
> + +---------------------------------------+
> + | |
> + v v
> + +---------------------+ +-----------------------+
> + | User-space Driver | | Compute Runtime |
> + | (Mesa, AMD/NVIDIA) | | (OpenCL, CUDA, ROCm) |
> + +---------------------+ +-----------------------+
> + | |
> + +--------+----------+
> + |
> + v
> + +-----------------------+
> + | libdrm (DRM API) |
> + +-----------------------+
> + |
> + v
> + +-------------------------------------------+
> + | Kernel DRM/KMS Driver (i915, amdgpu, |
> + | nouveau, etc.) |
> + +-------------------------------------------+
> + | |
> + v v
> + +----------------+ +-------------------+
> + | GPU Display HW | | GPU Compute Units |
> + +----------------+ +-------------------+
> +
I'm a bit late to the party, apologies. I'm not sure how much use there is
in an extremely simplified diagram like this, least because it's really
incomplete and leaves out the entire display and compositor side.
My idea was that we'd instead link to the large pile of introductory and
overview talks further down in this file, if people want to get an
overview over what drm does.
If you want I guess you could add some links to the relevant wikipedia
pages, I think they also do a fairly decent job of explaining the big
picture.
Thanks, Sima
>
> Style Guidelines
> ================
>
The patch LGTM, thanks!
Reviewed-by: Bagas Sanjaya <bagasdotme@xxxxxxxxx>
--
An old man doll... just what I always wanted! - Clara
--
Simona Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
Return-Path: <linux-kernel+bounces-673383-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 0AAE241E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:41:03 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 619BE3A8B28
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:39:49 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 2C57E290D9A;
Wed, 4 Jun 2025 14:39:07 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="uq2SkXib"
Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2075.outbound.protection.outlook.com [40.107.92.75])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id B1E0E28C5C0;
Wed, 4 Jun 2025 14:39:04 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.92.75
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749047946; cv=fail; b=GurZqGhmKbZIpHZTFIwQdULr7VmykYpccgTletIPsaHHJO/wvHWkm5gD7JztFuV/nWa/hrK2b2A9gBnNJKwnpT/6tq2+LBfEt3TQwVG5mxb7qK/o+uxeGY7Z2iRIE73Wa3JYBW81lhGmxYZLHQTYL1RYRIDDnHRBFR67p77Hu8k=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749047946; c=relaxed/simple;
bh=klbSJM8z35hpC/Lsh+Q+P/6dMHizviScinqVVqXMwag=;
h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To:
Content-Type:MIME-Version; b=dKc7zYisgIplkIr7ltxjH+cWRIvNAOnhR+m3psO9YUsO/6ZzgAATe1MJriPgATZw0fTxgVMqNTcoUAtDBi1+53yG0YaUFXeX+kEiRNiDzCGi3S1yfJWI9rTIuAU6wH2Werq8rZWfw/QbdXumlpp/MvsQZuUmWj0wUQVzde/MRPo=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=uq2SkXib; arc=fail smtp.client-ip=40.107.92.75
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com
Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=TKW67vmfH9c4IO0Hi78HCbpELftXZ67LNKuURJiphy/kaYDLcB7kNab2oX/NsPqWQrktGwb+oZ0DHhpvfQdIWeOpGB8typp9q+Nopl0/WXJw7x8POQw4RQiX4FHkve0s5fX5e+t/14zeeDd3RoFBl/DD7dc+37KLFqOzk7uj9HVdLZUMO11N9xPrrVhfgpptWxr2WOAMsH+l1MlmXzoDkOa2rhRjMsHSW6ZZXzvOLWNa/7SS1JxyBriWrhaeZ1WeRWhXTGRQnJaJQ0HkvwdE4eG8LGlQVGKCN/zXPifJsn7Avw/FcFQjbIhyQEi0PU+SY9IH5TFnCtSkX4XKEDD0og==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=/HDmS4V8n4x9ZyZwWw7aQvtEwXvnwukwMymDgwFPExQ=;
b=gMHhNVX6eAmaf8Hlof1XinS5rgXV6/wU1ZkmafAWyui/ZqyUNvvEGsnmLoyxH2X6WbwX69fF+dfNG79rWYsFpu8lioLKptavyuwfKi31dvyU9jEs+5/tA/SsG98n7VPEDL3XL92Swx66hweJLlheOrOKlQsMrJXKx6FlEXqPF4cPhE3zglrov29rPygxBrbZHLF2v0ThAwM85apL9yQgmUj8AD30Q7WdAVS1JbMIomD+l18fAeMRxcuaV3KBspHuBq+sWyOQ7ZrQhR/59+9rhnCBHiht5WPqv/NCsuagGsWT9eL40EjrA6FM1rRk/7YA72asyIXtWYP6Xu0HLUQP0Q==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass
header.d=amd.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=/HDmS4V8n4x9ZyZwWw7aQvtEwXvnwukwMymDgwFPExQ=;
b=uq2SkXibDaBZKFAKpijfGywIYJhyAseEbq6KJSlgXawdxQmGQa3Plia9PmULTYpcWIBBNd8tuOGbnzNfV+MFYDgY/m4NydpvjhsjEspqyNPHw88w9u4zU1pkKlWP6YOvcuuL9MhzHlJBzSAN+eACUg3V43aVylKlcQZMhaaum3A=
Authentication-Results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=amd.com;
Received: from DS0PR12MB6390.namprd12.prod.outlook.com (2603:10b6:8:ce::7) by
MN2PR12MB4301.namprd12.prod.outlook.com (2603:10b6:208:1d4::22) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.36; Wed, 4 Jun
2025 14:39:02 +0000
Received: from DS0PR12MB6390.namprd12.prod.outlook.com
([fe80::38ec:7496:1a35:599f]) by DS0PR12MB6390.namprd12.prod.outlook.com
([fe80::38ec:7496:1a35:599f%5]) with mapi id 15.20.8792.034; Wed, 4 Jun 2025
14:39:02 +0000
Message-ID: <c11c30ae-85d5-4f00-a243-a3b7710b913e@xxxxxxx>
Date: Wed, 4 Jun 2025 09:38:58 -0500
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v9 04/16] PCI/AER: Dequeue forwarded CXL error
To: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
Cc: PradeepVineshReddy.Kodamati@xxxxxxx, dave@xxxxxxxxxxxx,
jonathan.cameron@xxxxxxxxxx, dave.jiang@xxxxxxxxx,
alison.schofield@xxxxxxxxx, vishal.l.verma@xxxxxxxxx, ira.weiny@xxxxxxxxx,
dan.j.williams@xxxxxxxxx, bhelgaas@xxxxxxxxxx, bp@xxxxxxxxx,
ming.li@xxxxxxxxxxxx, shiju.jose@xxxxxxxxxx,
Smita.KoralahalliChannabasappa@xxxxxxx, kobayashi.da-06@xxxxxxxxxxx,
yanfei.xu@xxxxxxxxx, rrichter@xxxxxxx, peterz@xxxxxxxxxxxxx, colyli@xxxxxxx,
uaisheng.ye@xxxxxxxxx, fabio.m.de.francesco@xxxxxxxxxxxxxxx,
ilpo.jarvinen@xxxxxxxxxxxxxxx, yazen.ghannam@xxxxxxx,
linux-cxl@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
linux-pci@xxxxxxxxxxxxxxx
References: <20250603172239.159260-1-terry.bowman@xxxxxxx>
<20250603172239.159260-5-terry.bowman@xxxxxxx>
<aD_iOk0vxDp88z8U@stanley.mountain>
Content-Language: en-US
From: "Bowman, Terry" <terry.bowman@xxxxxxx>
In-Reply-To: <aD_iOk0vxDp88z8U@stanley.mountain>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-ClientProxiedBy: DM6PR21CA0028.namprd21.prod.outlook.com
(2603:10b6:5:174::38) To DS0PR12MB6390.namprd12.prod.outlook.com
(2603:10b6:8:ce::7)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: DS0PR12MB6390:EE_|MN2PR12MB4301:EE_
X-MS-Office365-Filtering-Correlation-Id: 0d53a050-d4a6-4a01-8686-08dda3758c78
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|7416014|1800799024|366016;
X-Microsoft-Antispam-Message-Info:
=?utf-8?B?UEhaUFhPSjYvZ1VnRFJzaDFOQVRJd1ZSM1ZYUkUyUzFZbnBVd1d5YjdOaDBt?=
=?utf-8?B?L3RhVnM5TFVON3ZvYyt4MGoyOTN6SVMvRUFEaTdYMXhTTWJXdjR0dzM4WW9J?=
=?utf-8?B?TWdDeDlWZTJjOHBxcnRhZFBkWUJMTTJoUklXTE4wVmxZMmxnN3hFZTVuckpK?=
=?utf-8?B?OThBVGlTR0pYNGdVaWszbjAvQ0NsbGhxbnI0dksraml0OUFzamltV3lLR2lP?=
=?utf-8?B?RkxabHd4OWZYVHJseUEvYmxHK0w4bHNZaTVhTEtib0RncGZRNWk1L2d6Q2Ns?=
=?utf-8?B?aFcvQ3RoeUVISmlJRnpRTXZtVHp1dmtPRnpwckxsNEs2OXp5Rk1tRHhTOVZF?=
=?utf-8?B?R1AxekpURzRESk1lNVB3TUE0WUN4OWdhQ043dUZ6SHBXUzRSZ2pDTG5jRVRI?=
=?utf-8?B?dnZrdjZFUmRndjhEcWFSeWRDVGR2S3JxYTE1eklOaEk0OTd1NEFqQVhzZnJJ?=
=?utf-8?B?YUQ3Q2pFelczUGlvaEpvZ3FLM1kvc3NvSktBMWVVYjZsNkJqWG52NHlOdTJ0?=
=?utf-8?B?SXVaSHViSGdVbWJ0K1U1dGZpNUQ0Z2pnSTczVTAxeEN1V25EQkpKY0V1elRD?=
=?utf-8?B?U0ZRQzFZbU5ZMldOZXdxaDZJS2RLZmFsTWVZTy9zeThncW1mN2Jqb1J4U1Jy?=
=?utf-8?B?bG5tbXNmS0NnYTdFeVlsa3dKY015dGp6dDU2Q2JZZTJSTXE4QmwyeHR2Qi9w?=
=?utf-8?B?bnlzT2ZtTU8yb1FjSU1qU21yTG1yTlBKem1ickl1Mld3Tkt2Y1IvNHBzMHd3?=
=?utf-8?B?dlMzTmttNGtmS1dKZ2ZrZVczVnVrL0I3UVdsaUtJSmswQWU3cUU4bnBDeHZU?=
=?utf-8?B?R3lacnVmcWxlTmUyc2pBa3gvOStHeEo2bjlMcmFNUXY1Tm8yMjYwUThSNTNs?=
=?utf-8?B?eHN4V2NkcDdqRGY0OHhHZjF1ZVQ5bko1bkc5bUhaSzZCdnNSbng4TEJYRkZI?=
=?utf-8?B?Wk42NUN4M1ZhVlN5SkczYURIOTVXVGlwVTdBbzVIa004cXdRU2ErMVFYL0Vv?=
=?utf-8?B?V3Nqa0hxRGl4b254UEIvVUY5MDFLMnNyVXU4d2hLSmJlTHhWQnkvWTJTTnVX?=
=?utf-8?B?TGF1dHRiOTArWGo1bjBoOGsxQ2FyT0E3ZG1wS2tpRjc2V0FHVVZwYlM4VjNi?=
=?utf-8?B?bmZ3U09WKytSV2tMNHpONytrMElWTDJRYkN1M3lST2swNGlMb01wbVBEbjJK?=
=?utf-8?B?N3RRd3VyNmRPTjY3QWkxVXNNYnY2TEJOWnpURHJnRGVtUFRGL0JCTUhJKytW?=
=?utf-8?B?Q0dVQ05hU2NzM1N6SGJCV3JpZmJmQ2R2emVxRjhhemVtSTN3eEgxbE1TQWw4?=
=?utf-8?B?dXVXRjlUWmRuM1ZNOFRXL0pEajNtYk54ZzFWaU1IUnVJWDFQNEJ5amJDVHZU?=
=?utf-8?B?aTZmS3F5TEp3SzhQeEFwRGlmc2RiVmNLcExPUFczUHphc1k4bHFwYkJMUXB5?=
=?utf-8?B?VW5UZVhXRmNBcTExWldiWkxJc1AxZS9qeEpNYWtRSGVDNEZGaCtwcmZsSUg4?=
=?utf-8?B?UjVqcFF6czV1dVJ1YWNnejRMUUY3ZGNES0hDSndWRC82NFprZFFHRnF3NzBT?=
=?utf-8?B?YjFqS3QwdU5EUWFEb095RXJkU21hb3g0WWwzVjhpUmRlbjRwUENueVp3T08w?=
=?utf-8?B?cVBGRFdqYiszZ0luRysyZ1NBZjBJeVFDT0FqaFIzaTh2UGU1ZGdUN1YxZmEv?=
=?utf-8?B?cjFCSDhydjZaUG1JdHgwNWtZRkpMRnRJc21oanluUU9jbEZVc1BBL05iSFFN?=
=?utf-8?B?NHhvczZKV2srZ21aRkI2NFRKdDJLNUZQUERJTDVBMjk4dUYveDZNdjRqSkJ2?=
=?utf-8?B?MFdueFZwak04UnVyTEpEREJjclpqL2R2NHhUQ0RCOGlUclcyc1pIa2N0eDZ2?=
=?utf-8?B?TnI0NjZ1dXVTTG1QTU0vQ0JrUTFxV0F6V2FHWWFCd2x3UnhKV2d6M2JDOHB2?=
=?utf-8?Q?ALjsEsTHeMA=3D?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS0PR12MB6390.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(7416014)(1800799024)(366016);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?utf-8?B?QjEwcFdHejA4Y2tWK2c0Q2pGZ09VVWM4b0xjZDdMb2p6WExPZnJKR1Zob25D?=
=?utf-8?B?YjVIc1NKYU9qbnhLWkN5ZDlTNHIrRmFvdlV5ZFR3cFVpb2R0VFlTRGsxUFl2?=
=?utf-8?B?MGVRS2ZxMVF3SW9NYkxGT29ic3FMamlUQnpwWVgvNURSZFpjRk9MNTE4NHBE?=
=?utf-8?B?UmtGWTV3OW5od3c3WTJHbC9lVm9uRDQwbHBwdVhzSFhiWjVVcUlWTlp5RG9m?=
=?utf-8?B?THBMRVl0TVJNUk9jb0lCZjhHcUVFaVAzWEVoUnd3UHh4NzdHMFhzN2lRRENW?=
=?utf-8?B?Qyt3dTY3UVhIRWFBWVlUSm5PZGQwUDQxMGh4YkUvMWV5clhGTVZyUFZucWxE?=
=?utf-8?B?bDhyMmxNS3pOMW1xMk1OS3BuWHFIVk9tVTNaQWVsdFByUzNsS3AxWGd4V2pz?=
=?utf-8?B?eS94M0V4OWVONWs3aXhuLzBHdXFINjZiNU1KeDN0dXd5UWhrakQreHdscEJs?=
=?utf-8?B?clN2VE9MYU5kQndHR241MlJ4bDJkaUtDcG9uR0dna3MxaXVYR1BPb281RmZa?=
=?utf-8?B?SHlwVVlGOE5FMk1Na3JPbFZxc3NIR3puRjBtcU5ZWVlBUExEOUhJSG5HL2I4?=
=?utf-8?B?YXpvRjFvdFZ6T1llV1ZvUEk0QUE5N0xDUnIrTVI1elE1N3ErZi9hV0FxWWpP?=
=?utf-8?B?aHFSRlFuNW10RUJxNzBjYVBMbkUyaFRabFBIMlEwQkEyYnUwdGtDbmkrZ2o5?=
=?utf-8?B?TzJTcVkwRkVQOFdVcDRuR3pic2VnMUx2RlBvaUkwa2gyU2pLQjg5a0lmcTBi?=
=?utf-8?B?Yzk0MVJPdmxpQmdkc2NYU2t1dzgzZDJLbmx1cEE4OEdQeWhlaVR1ejRGL3Ez?=
=?utf-8?B?bDRkSUFmZVFDV1BlaUJhMG54WWV2V0pkdkZocWpwRGZ0K3VnYlZuNVJzcHFC?=
=?utf-8?B?OThhbDQ2RFUrNFdXRzJuVGNqQzZzQTVHNlU5SjJZbzVHb1U1aHlpQmlmZjhE?=
=?utf-8?B?NnN4Ym5NaHpqQVVuZHpRUHZTSEg1dHpWY2Q1cEY0Zm44Q1oybVJkSC83cW5W?=
=?utf-8?B?UkVNMG9CeEdvckowcFB3Q3loTDRtNXFVMlZjVEV2Rk5pLzdpdGNoQ0hrK0ZS?=
=?utf-8?B?VmcrQVA2TjJ0bjUwSnB6eW9hWi9WejE4QU5uUXdNMm9Cb1o3WDVoTSs2VEFi?=
=?utf-8?B?UGk0a1NaQnB4R1cra3kveVlNRnZUTThBNnZTTXEzSzkySGVrN0VDajRXSHNW?=
=?utf-8?B?VkFmcTRnbVpBVlRZN1JlQVhEbjI3aXgxaFNEUG1vWUJXUmY0WFhHdDVrcFNQ?=
=?utf-8?B?ZVJlclFqTzkvS3owVDFBdENiYktsSXdCSjFVMGpGakViaERNaUVCNGVzUHNZ?=
=?utf-8?B?RTJvMzJKNEFBT3RVNldhckg3d0FXSVZXc0xlTDJqYllacjA5TXdFNDZrMlNy?=
=?utf-8?B?M3k3VFFMcmpqS3ZNTHdLTFA1Y0twNmtRakRMSlZTUWYwMDZEbVNaeEhlRzhJ?=
=?utf-8?B?cFdGc1ovNUZJRGlldDZKRytRVmw0bEx3NURock81LzNpTDR6SmNsa253cGRm?=
=?utf-8?B?TjJVNFM4Y1JjdGg1RjVscU9iNmkyN3pIbFRWc1RvSUNzaDFsQVk0MjMvYlBW?=
=?utf-8?B?YXJQaXFaeVRFY0Rqc2hURDRyQXU4VXBUeVUzTUUxWlpmV1hPbmdCcWdMN2t0?=
=?utf-8?B?bmdjN0dNNUlUa3VIYkJ0VFEzM3V1alFaSjhVTjFsOEQxUlhKdHFxZlZSQ2Ro?=
=?utf-8?B?UWJuak5DbG1Qd0ZnSklROXlQOUhoMW1jNnBGWjN4R2I4bXVseEFzekljZEs3?=
=?utf-8?B?ZXhGOGxESFBrZmRnZVQ3QzBRUmZRdy95dVdnR1EwRitRUFZuQVI5dmpVVTRP?=
=?utf-8?B?akJpakt5a1RjeUdGek5qRjJ1Z25SMXhzY09pU0hVTFJoL3FJbkxOalZTN2xO?=
=?utf-8?B?Qm83THRkSmtaRmhIMjByWU90MnFoUlFOZDd6N2VZQndYRkoydSs0cEEzRHkr?=
=?utf-8?B?d04vVkpYdXJ0ekhuRGNCM0xQZTFJbEJ2ajJMMDloMS9xeGhuTEFqRVN3UDZB?=
=?utf-8?B?Sk56Z01veXNRK01FV25GdnBSdWRYUFBZK3ZjZyttRER1QmMvb01aNXdwY2Rs?=
=?utf-8?B?eG51RUFGWU94TmwrbjRDT2N6RWhGNkxJdGpqNXp1Q1Q5eS9HSXZwVTNwK0k3?=
=?utf-8?Q?+IkzVPSIhLkcR7BJU0hFfcXSz?=
X-OriginatorOrg: amd.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 0d53a050-d4a6-4a01-8686-08dda3758c78
X-MS-Exchange-CrossTenant-AuthSource: DS0PR12MB6390.namprd12.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 14:39:02.1244
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: L7XnDfNL6Rm02btOF6gcTDoqDWeH6mvCOIiebD8QD8x6rXQ6XUbBKcrTAp0NP/5wRMVBNmWKPb5DxdrUwsMThQ==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4301
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 6/4/2025 1:05 AM, Dan Carpenter wrote:
On Tue, Jun 03, 2025 at 12:22:27PM -0500, Terry Bowman wrote:
+static struct pci_dev *sbdf_to_pci(struct cxl_prot_error_info *err_info)
+{
+ unsigned int devfn = PCI_DEVFN(err_info->device,
+ err_info->function);
+ struct pci_dev *pdev __free(pci_dev_put) =
What? Why is it freeing the returned pointer? That should happen in
the caller, surely?
+ pci_get_domain_bus_and_slot(err_info->segment,
+ err_info->bus,
+ devfn);
+ return pdev;
+}
+
+static void cxl_handle_prot_error(struct cxl_prot_error_info *err_info)
+{
+ struct pci_dev *pdev __free(pci_dev_put) = pci_dev_get(sbdf_to_pci(err_info));
Ok, it does happen in the caller, but dropping and then incrementing
the reference count like this is racy.
regards,
dan carpenter
Thanks dan. This was an oversight on my part. I'll change.
-Terry
+
+ if (!pdev) {
+ pr_err("Failed to find the CXL device\n");
+ return;
+ }
+
+ /*
+ * Internal errors of an RCEC indicate an AER error in an
+ * RCH's downstream port. Check and handle them in the CXL.mem
+ * device driver.
+ */
+ if (pci_pcie_type(pdev) == PCI_EXP_TYPE_RC_EC)
+ return pcie_walk_rcec(pdev, cxl_rch_handle_error_iter, err_info);
+
+ if (err_info->severity == AER_CORRECTABLE) {
+ int aer = pdev->aer_cap;
+ struct cxl_dev_state *cxlds = pci_get_drvdata(pdev);
+ struct device *dev __free(put_device) = get_device(&cxlds->cxlmd->dev);
+
+ if (aer)
+ pci_clear_and_set_config_dword(pdev,
+ aer + PCI_ERR_COR_STATUS,
+ 0, PCI_ERR_COR_INTERNAL);
+
+ cxl_cor_error_detected(pdev);
+
+ pcie_clear_device_status(pdev);
+ } else {
+ cxl_do_recovery(pdev);
+ }
+}
+
Return-Path: <linux-kernel+bounces-673384-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id DBCA541E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:41:13 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 381D43A7BD6
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:40:00 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 84A0A291145;
Wed, 4 Jun 2025 14:39:23 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="VwYTQlqJ"
Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2053.outbound.protection.outlook.com [40.107.92.53])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id ED3C5290DBC
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:39:20 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.92.53
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749047962; cv=fail; b=C2mvazsHd5+8tn5X3hH5dDyMa5EjSYVv838DR+EPLrW+7uMrunqTzr3upyR8YQTMEvw013iXzaP7JnA+YHnGHDhdnMnnC3enhll26afuxmlL1/yCYVVMb+CDAp/HWgrR2WSf2PIKNP1ncBIzrJK9+bB3cmxMtiYMenfIF/6hr2g=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749047962; c=relaxed/simple;
bh=E45XpgtRGUuY4NdO+aCTx8rw+4uCdSLwJNF6exGwVF4=;
h=Date:From:To:Cc:Subject:Message-ID:References:Content-Type:
Content-Disposition:In-Reply-To:MIME-Version; b=LplevSGlnBUUY0EGMBoW8x2nHOLony5dEGdN7/o0rbQpUnXlknMhjDig+IzeY3P921ibRMfP8AAC8srCXejuIhzPzZ/ZVZfLEv55OEyxonNF7rx5kA6sVj8PVIUBwNkVhdT3UR/jDnd/+bNVqDSCu8t7V++fDctQBa3PF6tAAWI=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=VwYTQlqJ; arc=fail smtp.client-ip=40.107.92.53
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com
Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=tuiAn0K5TegELqCLc2fhwdHeKhrJmMz1eN/fkzPzlrzlmvJ9cT56/cGtwOz2LzEnuIyZa+Wo4LnZmEhQQC/yaLrUWdd2CAn+Vn8NBan5s+k4oP+axLV8lpnIvlT+mRab6h9UeANukUGXy1iPtRi814C3iGd4PLvQ0UafwV7ZUlJqqY24qUzIyq4HT27Qhw6zOFCxNP/kuideNBZJhcfgi15SH9qwMmRfWtKsFu7HwNBVlgydVXeP7jiZy9vWLbY4xrjizPlqw+dISJgKO2SwkQOGlpTzfD/TjYp/vc9jWKwSJRccU+NOjktS/TOxDKnUIu9ZNe0Kx5htIf+qoOAZ9w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=OhuTVeKtbtuHe8p/Sa8KgcbrDzupJGqWHCFTD4sH1sk=;
b=DSn22uLWWHM24XnJhyCkQt4fkUYv5u+T1G5lFvxUQ4HGLq56PkSO0Cc6s+nMehT6UyGVZiIwgFZBdrO+JmdO5DlWP35lEbBQRTjgpEjf4+cLRfr41GP4iORduWaIXL4duR6Y0M9vPOuZN4rw/01GoLPYSl84eWY7NHugVgs02E2IZxTZGcko8iLEvbMj3dYPO+DNcrpJDfFd7l+nrmpgLY8eEXP8qgARyLRMF8y1sk+3PXSUdpLHQZERAfMTQXOzXYU8DjYbAGZHkra2AtaoDluq5YIubojsox90UsMdod7qI6+8/u/vjTijQlsVvfZc/dz5CaHES0wSWoFsZcfT8g==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com;
dkim=pass header.d=nvidia.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;
s=selector2;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=OhuTVeKtbtuHe8p/Sa8KgcbrDzupJGqWHCFTD4sH1sk=;
b=VwYTQlqJYl65QUDeFXZAeAOnXdKcmfQlwMvAAW4RS5qlLzq6fpTHIzELOXC3+7eCc8OyRlBTDncxh1AJDwepdCVdTrYTCuuWETE2XcLz2j1VVzAHVl0n8zrf2AozKTWpuxmd46kHyJtGjdOSQ0mDI5eH22Wn6PuQRiu/3l0UCCVzXU8ZMhVz3Nhgcm4FGY/ba/wKnwVDz/VArFdIX86ml/eFVFQOYDHh6O4MHs+1nWkwZ7Vf5j0Z2lx41KO28T6Qb+W3KN2G+8VM0x1XevYlH8jelr9sVdPbqEFlzdrZIkVWvawsjsdhOFG5APm5nMEQMOaAYqx8A5xqsmRtIqDJaA==
Authentication-Results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=nvidia.com;
Received: from LV8PR12MB9620.namprd12.prod.outlook.com (2603:10b6:408:2a1::19)
by SA1PR12MB6894.namprd12.prod.outlook.com (2603:10b6:806:24d::13) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8769.34; Wed, 4 Jun
2025 14:39:17 +0000
Received: from LV8PR12MB9620.namprd12.prod.outlook.com
([fe80::1b59:c8a2:4c00:8a2c]) by LV8PR12MB9620.namprd12.prod.outlook.com
([fe80::1b59:c8a2:4c00:8a2c%5]) with mapi id 15.20.8792.034; Wed, 4 Jun 2025
14:39:16 +0000
Date: Wed, 4 Jun 2025 16:39:08 +0200
From: Andrea Righi <arighi@xxxxxxxxxx>
To: Yury Norov <yury.norov@xxxxxxxxx>
Cc: Tejun Heo <tj@xxxxxxxxxx>, David Vernet <void@xxxxxxxxxxxxx>,
Changwoo Min <changwoo@xxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx
Subject: Re: [PATCH] sched/topology: Fix for_each_node_numadist() lockup with
!CONFIG_NUMA
Message-ID: <aEBajJN-kvO7-pcS@gpd4>
References: <20250603080402.170601-1-arighi@xxxxxxxxxx>
<aEBUgWdZtz8E_2d9@yury>
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <aEBUgWdZtz8E_2d9@yury>
X-ClientProxiedBy: MI2P293CA0013.ITAP293.PROD.OUTLOOK.COM
(2603:10a6:290:45::8) To LV8PR12MB9620.namprd12.prod.outlook.com
(2603:10b6:408:2a1::19)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: LV8PR12MB9620:EE_|SA1PR12MB6894:EE_
X-MS-Office365-Filtering-Correlation-Id: 7a2cab96-807f-4343-833f-08dda375953a
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016;
X-Microsoft-Antispam-Message-Info:
=?us-ascii?Q?3pCntnUZA/1LUKh01ag9Pt6ohuMalBzARoYVwQQLh6YsY3aYcMN+Xyn4JwDn?=
=?us-ascii?Q?bZrVY0i88E3L7miSUb6L7yxxPKnX5Ns8p+ayixghRxIxUS4sQ66+dsm2j1ui?=
=?us-ascii?Q?5wiyqc6cd0DPoGdwRctiiwG8Wc1GdnWTcSXW9U+phkN8j1TZjaKDbSy6+0o9?=
=?us-ascii?Q?Wtml/r3ZdpTXvJTJETHHo8Su0R8Mq5Mg7+ccwFuVeYCoTYbvxe2oQPancCGb?=
=?us-ascii?Q?DTj/9sO4okw6MKIhtQw02nMSDwb18Ekp/O4+2rH0hn9oeOs6L1ccITkrLHQb?=
=?us-ascii?Q?qHGooASVq6k1V8eHls8flR3B7X9/hGASmX+7OvR5ox2u+fwDQLtCQUoUbc7i?=
=?us-ascii?Q?Vs9LJ7yrmZFI/6PwT0uxwh/n8LUuzpk9p1KDlefP62VGSEIllKWjsi84SS6H?=
=?us-ascii?Q?CMCPhroozv076DOlXFZL1zVlfPqmLWsu6bak7OfgC5LCdq6kdZCjy22P1XR4?=
=?us-ascii?Q?hAZXXRjwH2JsNEU5Vg+HUPCmG1Puo6S5/IpJE3b2f6hEXq9tbirfvlKbfMWO?=
=?us-ascii?Q?HPb4hbqaqNqz6z0TxBhEubU7ADa0uACfoaHPayVgDLSNnYjQ+f9OyGKU2nWG?=
=?us-ascii?Q?3XBva9BEr6nzlP1DpVjfsY4GgUFxxf/SVgLYyVw4SE4bR5R8Waiy/Jp1jayt?=
=?us-ascii?Q?nTVP48yElBqMkmuUW+LpJRMtjcIk8Fsvid6iJSBHdigTowJMZTqJ63zK3TSV?=
=?us-ascii?Q?8+nTJeZ1IBtbMfhPtQ6eXzJLWVvGNk1xG20hhIepdHyoHvLW/ITWwezOITKS?=
=?us-ascii?Q?RcOct2u8MxCkVLqOhpHLxniz/57z1J4vUahsAhrrBqwfoR7mtaTh/E7Vbfto?=
=?us-ascii?Q?y62Uy3VA5Epor702RM6dlvVpnPTGAPPiRJq1NlixN5J2NABaCF6VbmPk4gCk?=
=?us-ascii?Q?viRW2PCq7Asp9uEPtDDoo2HkayD4Z1j/PR2ylt/SCEmFboDlbj6mG6Ezn+aQ?=
=?us-ascii?Q?DHo+stxXnpL95aelz0BRPDAiYQVAcvGtbO68QG58PqNTq3j6LOaaF5/gZrIQ?=
=?us-ascii?Q?4cJVo5Hozapzw1iNEGaZwR3feYMeSIdvhCISIZ/cWdjF+vUz4kdfRe8mtcdV?=
=?us-ascii?Q?BcQf2+dSrgDR00f2sqgbvIOCWvX6LXa9OuplR6Jf7mPrcSvJ11ckgCEuUi5X?=
=?us-ascii?Q?i8wjPPNWmHiBzlxAUfhpCd6Az95XT2BT1Mr/CG0S8WQ8779+qxnsS0P0v9qL?=
=?us-ascii?Q?IXKLU3I6AVcuSDVqht61oWduEoYEr+ufz2aTslNSplz8A9KGseX95X3NwL18?=
=?us-ascii?Q?n/mPSzgY/Vv2OVnH7wOoFNRXXDGCXGB3yv4IRvvgkwWzqh4xAGi2wSSCJqdK?=
=?us-ascii?Q?t3CZFNVWjuHJyDgNq9c7BN+QVnCeKw3XhMvafOM86S3kIV2wOvV1U6d8asPG?=
=?us-ascii?Q?cYDOhJs/89oy+l77wTJH8rDiyMpKwin0eycBIdwGdPjFp8j9S1nStFczVET2?=
=?us-ascii?Q?8jbr23t5rgk=3D?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:LV8PR12MB9620.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(1800799024)(366016);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?us-ascii?Q?CFWMWXa95+Ty9L7qo8L+LSnV5AnemsbRcLaxVHsf5OEjk7Rui2JWy8LHt/x6?=
=?us-ascii?Q?J4Nc2A/v/xSw3ECM7wDDStIUJr8aUtg0aQGNssDO/sP4FFePqpST+/bWjbzk?=
=?us-ascii?Q?Uvo7KevvqeRCsQu5HY5F+KNkNe+uchidubslToGNEkR//F9a0sv+nyT6cmVH?=
=?us-ascii?Q?Y9V+KSpvJY1+vmSALC65bzbUAYO4uFql3SH6+SBxfZ2s4LL4LlWWa31cd44T?=
=?us-ascii?Q?qp5uiX9WHHwWgTTbdqFGBBPuqpKcduzCQYubO0sJKptSr7jOqJO1I4tzKTcq?=
=?us-ascii?Q?z6hsKfVXvV1v7HlX8iGkO9Z+hf9cl35jUUymC6W6bocVPIoHgGPWgqxgJOsR?=
=?us-ascii?Q?xjCsJDEr8jt1dtfGLh/mrFZJ3m1kCXi0aWnhfMDIcBBpKTfaDrRNLT69ha7r?=
=?us-ascii?Q?l62EF9iqBnItVeomEakzNr/h+92xgC7sID8LcHPkqtwO3GtM3i5iwLYxEhtw?=
=?us-ascii?Q?dcOBnanmIYSi7WXfvNY8R0A/hWand+Shd2ZzoE+JoGe80d+QtcBneZQEwTuO?=
=?us-ascii?Q?ot5/Kvu93M891pkrYyBxibkf1B+GCfIU4ICLzlW+xQ9nYDMnsJs1kg3nXw4s?=
=?us-ascii?Q?zOMxCfUcsfy6oBKoQv0i5x6C2ixYPvmbO1ObRK/8nh6GntegC/5ngQnKAkIE?=
=?us-ascii?Q?lSo9nHTM3FC/esEXnUJ2HH71C8tHedOf7HHXi0yfnWfBVweuFAdXHOHYGwp/?=
=?us-ascii?Q?hkCkOnZ6uy6QI4F58HlUVE/bHFYn2bt/OMVxuquobCN/aY8RAwgFdypxniQn?=
=?us-ascii?Q?q/RKPxJa6/rbx7HnWesv/jJzYOoTbMYQkhtbiiDZU5hrg0SQBhaFDFsC3GkE?=
=?us-ascii?Q?C9E8FojD4pjaUd4quZfQ1PTjCjU6zcE+oK8s7Xv0bMvd02lX1hav2ah2NpAR?=
=?us-ascii?Q?9/uv3WJZHcdF4vzRw22M+/AYBI7J3qO9qVm5DFp90g8NcRioM64S6w5oaIk9?=
=?us-ascii?Q?JdiqT10kxOg1pbevajIfWUVPhQz66uHitqXPTFW2BzfRVtN6LdKj8zpzHxiO?=
=?us-ascii?Q?TaLBG3pDtpTi4fIBnII3vR/8lTxPt1JlJWvPB11uIQI5WRH2Agy/7seO2qPO?=
=?us-ascii?Q?RR+5nJlNnkv8a3ApELG5Bd6DJYFsV07mU3w7ZTMC7/dbSG8l/+PszsPGU8VR?=
=?us-ascii?Q?F0fFgt02wt2CHEojvf+iMjjoOufswDcgO/40kl7i9nMd4UJYWAKjIl821iXj?=
=?us-ascii?Q?ZlvTa2j/4hDSxyHMXXffxLG+Q1X/DHbHL/5Qg0K+eU/cCLyjkIF5rlV6V4MY?=
=?us-ascii?Q?Y/F6GT++pEaUxUsj7XZRu0sEh9KrPq20QmMHCsIJTFs3WZO9890cS7oSeAFK?=
=?us-ascii?Q?Kiu8HxnIVZo12/7+4W/tDu+NBz9wOx62kOzb3Crcp5k4E+Fh8TCk2cMgr4mh?=
=?us-ascii?Q?cra5YqAvom6HAbyTkhIGZiH9SYJmFNbcDHhWDiD5sAQOqiSeax47JaGmaFO/?=
=?us-ascii?Q?rciq8BnwCOqMIR4CRXoTSHtIMUHye4uojmrfWJFUD14HnlFzP9Dr2bSpB/3+?=
=?us-ascii?Q?JDHDx9TTEpCPOvOrlC9lZjU7u1ctOj1n1wnxpymETNeVdWZNkA83fWInqqXg?=
=?us-ascii?Q?bvHGwAxlycQ+6OR2augBQ5nElru5VYcOWkJO4J3E?=
X-OriginatorOrg: Nvidia.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 7a2cab96-807f-4343-833f-08dda375953a
X-MS-Exchange-CrossTenant-AuthSource: LV8PR12MB9620.namprd12.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 14:39:16.7805
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: kJVAV7Orl3pyVkX2BxryyCuKijB/t0DJn8HrspfrDMO69l0Urwmx9PUjel38mQAVnq3pQ5cAgsr8DZ+J9N4ePg==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB6894
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hi Yuri,
On Wed, Jun 04, 2025 at 10:13:21AM -0400, Yury Norov wrote:
On Tue, Jun 03, 2025 at 10:04:02AM +0200, Andrea Righi wrote:
> for_each_node_numadist() can lead to hard lockups on kernels built
> without CONFIG_NUMA. For instance, the following was triggered by
> sched_ext:
>
> watchdog: CPU5: Watchdog detected hard LOCKUP on cpu 5
> ...
> RIP: 0010:_find_first_and_bit+0x8/0x60
> ...
> Call Trace:
> <TASK>
> cpumask_any_and_distribute+0x49/0x80
> pick_idle_cpu_in_node+0xcf/0x140
> scx_bpf_pick_idle_cpu_node+0xaa/0x110
> bpf_prog_16ee5b1f077af006_pick_idle_cpu+0x57f/0x5de
> bpf_prog_df2ce5cfac58ce09_bpfland_select_cpu+0x37/0xf4
> bpf__sched_ext_ops_select_cpu+0x4b/0xb3
>
> This happens because nearest_node_nodemask() always returns NUMA_NO_NODE
> (-1) when CONFIG_NUMA is disabled, causing the loop to never terminate,
> as the condition node >= MAX_NUMNODES is never satisfied.
>
> Prevent this by handling NUMA_NO_NODE explicitly in the exit condition.
>
> Fixes: f09177ca5f242 ("sched/topology: Introduce for_each_node_numadist() iterator")
> Signed-off-by: Andrea Righi <arighi@xxxxxxxxxx>
> ---
> include/linux/topology.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/topology.h b/include/linux/topology.h
> index cd6b4bdc9cfd3..095cda6dbf041 100644
> --- a/include/linux/topology.h
> +++ b/include/linux/topology.h
> @@ -310,7 +310,7 @@ sched_numa_hop_mask(unsigned int node, unsigned int hops)
> #define for_each_node_numadist(node, unvisited) \
> for (int __start = (node), \
> (node) = nearest_node_nodemask((__start), &(unvisited)); \
> - (node) < MAX_NUMNODES; \
> + (node) < MAX_NUMNODES && (node) != NUMA_NO_NODE; \
> node_clear((node), (unvisited)), \
> (node) = nearest_node_nodemask((__start), &(unvisited)))
When NUMA is enabled, you add an extra conditional which is never the
true.
When disabled, I think this macro should not be available, or more
likely have a stub implementation, similar to for_each_node_mask()
Makes sense, I like the idea of having a stub implementation, I'll send a
v2 with that.
Thanks!
-Andrea
Return-Path: <linux-kernel+bounces-673385-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id CE26341E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:42:05 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 7354816A86A
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:40:34 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 4EA8528FABD;
Wed, 4 Jun 2025 14:40:02 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="zTp8iLqG"
Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id A1392290BC3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:39:58 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.46
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749048000; cv=none; b=CfDlgjC8TdN0FEsoiqPbBHLhb1qkY9QoA9VUAwAXJ5Q5pMCY0RgMGgI4RRXY32KgB27rYCYuaiUz3Vnzp+5mAO19pauT5ncGKwJ2sCeDkISsE6brMO0rNtpGcZcWhfJFB+IOR71oBFAjGajvsbXXiKlRgt1eQE8xlJrfUImYvuI=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749048000; c=relaxed/simple;
bh=/xowjaYSwrcNAVTz/1+MHUlbdruelf01vjOxRPujSrw=;
h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
To:Cc:Content-Type; b=qVqwrAVH/hGAcc9D2qXAV4c/HK1Zz7ADm6vAAh4P3zEpTmRTSjeXAsg5RtV4/gPcW4R4pyXDyMLHguXL0lwYZaqkWhQMV6LQWbKwBZwHuaksUq84+5PtPwJavOggwypRtVBvfUQwCmzYeP1HN2bumhS5gaVtkTNdutIkVISiPK0=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=zTp8iLqG; arc=none smtp.client-ip=209.85.208.46
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com
Received: by mail-ed1-f46.google.com with SMTP id 4fb4d7f45d1cf-6000791e832so9920a12.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 07:39:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=google.com; s=20230601; t=1749047997; x=1749652797; darn=vger.kernel.org;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:from:to:cc:subject:date
:message-id:reply-to;
bh=aFSaiArb5JlS4rKdNQDLgny0OyxB393pGHWtf5taMQ4=;
b=zTp8iLqGIBNLgGU256hNV8UPvy/c+qKMY3d8dDPzLOTU1gi3oySDgqpJDeKt0KMWYQ
HkcZE+JLVVudh6gMObDMfymoJaMUzuKv7pyk4wKeeTI38LI/JqXomGZpNbxLBYjy4LCM
aX9h3nzy93rQPPC2pyrVF+ybUi/ZmsTga4D7Fe8OE0E/lOwy/2LIVpRIq1pLRjKV9A3S
KMTjKS0q4kuel6FVJRDwoS1Yr3BkWrUxeYreE1i6PtfF5b01HaPIQQI/RbxECmnZhu1S
Adlce6NCG6SM1raT+Kn98MNLKbzvLFCpGlcAr+nJa4P3Mo6UTqZcbpjLtMv+NScn2YE3
nGWQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749047997; x=1749652797;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=aFSaiArb5JlS4rKdNQDLgny0OyxB393pGHWtf5taMQ4=;
b=YmkfL1zPMiqbPvVGVJzArINaPcgM0X1YBlB8bwGeeUmIRX/gClmRfCIF+mAHwf51nm
a1soyrWziaYUtAQPRkeTmtcFFyx6v5PSeIQvXm+z/HCFeEKE8HzfGZijFrPoxOVajbfE
naNA5ceIgurVr5KclBDE+rtdClXqsPeCSK/59dQTgMDZe8ofpxTQsaXjF3883ebxOJWA
KgfM13ur8T/ERfWGULwqOoQT8sXfcMlZEOdq9iNIEH7jwmsZhP64eBtYTSwSNgdbSa1g
DSuxnoQzEpBlSSoMXEktNZckUqR5N6Dg8JqpuiEPBx6kGgMyOlQ0hXAI+coOB8XVT+Dc
+lfg==
X-Forwarded-Encrypted: i=1; AJvYcCUuRfraCokxbEAImSn3b8z9nbqiVDFV7nrzlXLyff7CXCzNWwxNt+36C0Mwz14L4ePF87S6tyskWs68M+I=@vger.kernel.org
X-Gm-Message-State: AOJu0Yyfnyp03zXzI1VQCkF4gpKbI7iiRDqE8EeMbjyCEHqaZL6CvcPn
P3a7S0ALrXgBfOvrxHua87yFp0E4rnXFCL3dj1Rcp7eQSoz9u+NUo21VEtJmGuNSwDLPT9bWpAq
ss5CD2+iJw6k6wVf0dbe9ybwI6MH8yxZ7v29SvWs7
X-Gm-Gg: ASbGncs9zc17cMthhjy8wlddbBqxnGdR5c4Wwh+yV/wohx5SofHM7jwz95lSrU2jBrk
Wd5YpoqjStcmqUv7lPcVfxVlmSbrS2ZxwXItPDstaN95vG7XnNyqGNymz9SNbvQ7U0/maxh9YfX
Yk87dcMSSOvVCKRJy9RM7m/jBA2VNqtABDE/RG9iZ3l2tAK+ejbQ/cjzQeYXWQaN1ZuIRueXMT
X-Google-Smtp-Source: AGHT+IFe67h9c8KQL1yClqkdMmIaa6YJ4wH8M7vVp7rH287AK15LYvq5zc0Wx87dYgNK+3JMBzj2Ni08hl8HmHGq0vk=
X-Received: by 2002:aa7:d6cd:0:b0:602:3bf:ce73 with SMTP id
4fb4d7f45d1cf-606ee31b340mr85155a12.1.1749047995780; Wed, 04 Jun 2025
07:39:55 -0700 (PDT)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
References: <20250604141958.111300-1-lorenzo.stoakes@xxxxxxxxxx>
In-Reply-To: <20250604141958.111300-1-lorenzo.stoakes@xxxxxxxxxx>
From: Suren Baghdasaryan <surenb@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 07:39:41 -0700
X-Gm-Features: AX0GCFvLFvrZnFxiBvsumrroa9R0gCS-F75JDJtm-veAoC59HniL7QD93_4kkCc
Message-ID: <CAJuCfpH-KmYX57WEj+OTVGQKaY4GXvktZAc9Q9MnZmtgQ8tdKQ@xxxxxxxxxxxxxx>
Subject: Re: [PATCH v2] mm/pagewalk: split walk_page_range_novma() into
kernel/user parts
To: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Barry Song <baohua@xxxxxxxxxx>,
David Hildenbrand <david@xxxxxxxxxx>, "Liam R . Howlett" <Liam.Howlett@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>, Mike Rapoport <rppt@xxxxxxxxxx>, Michal Hocko <mhocko@xxxxxxxx>,
Muchun Song <muchun.song@xxxxxxxxx>, Oscar Salvador <osalvador@xxxxxxx>,
Huacai Chen <chenhuacai@xxxxxxxxxx>, WANG Xuerui <kernel@xxxxxxxxxx>,
Jonas Bonn <jonas@xxxxxxxxxxxx>,
Stefan Kristiansson <stefan.kristiansson@xxxxxxxxxxxxx>, Stafford Horne <shorne@xxxxxxxxx>,
Paul Walmsley <paul.walmsley@xxxxxxxxxx>, Palmer Dabbelt <palmer@xxxxxxxxxxx>,
Albert Ou <aou@xxxxxxxxxxxxxxxxx>, Alexandre Ghiti <alex@xxxxxxxx>, Jann Horn <jannh@xxxxxxxxxx>,
loongarch@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
linux-openrisc@xxxxxxxxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx,
linux-mm@xxxxxxxxx
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-11.0 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 4, 2025 at 7:21=E2=80=AFAM Lorenzo Stoakes
<lorenzo.stoakes@xxxxxxxxxx> wrote:
The walk_page_range_novma() function is rather confusing - it supports tw=
o
modes, one used often, the other used only for debugging.
The first mode is the common case of traversal of kernel page tables, whi=
ch
is what nearly all callers use this for.
Secondly it provides an unusual debugging interface that allows for the
traversal of page tables in a userland range of memory even for that memo=
ry
which is not described by a VMA.
It is far from certain that such page tables should even exist, but perha=
ps
this is precisely why it is useful as a debugging mechanism.
As a result, this is utilised by ptdump only. Historically, things were
reversed - ptdump was the only user, and other parts of the kernel evolve=
d
to use the kernel page table walking here.
Since we have some complicated and confusing locking rules for the novma
case, it makes sense to separate the two usages into their own functions.
Doing this also provide self-documentation as to the intent of the caller=
-
are they doing something rather unusual or are they simply doing a standa=
rd
kernel page table walk?
We therefore establish two separate functions - walk_page_range_debug() f=
or
this single usage, and walk_kernel_page_table_range() for general kernel
page table walking.
We additionally make walk_page_range_debug() internal to mm.
Note that ptdump uses the precise same function for kernel walking as a
convenience, so we permit this but make it very explicit by having
walk_page_range_novma() invoke walk_kernel_page_table_range() in this cas=
e.
Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>
Acked-by: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>
Reviewed-by: Suren Baghdasaryan <surenb@xxxxxxxxxx>
---
v2:
* Renamed walk_page_range_novma() to walk_page_range_debug() as per David=
.
* Moved walk_page_range_debug() definition to mm/internal.h as per Mike.
* Renamed walk_page_range_kernel() to walk_kernel_page_table_range() as
per David.
v1 resend:
* Actually cc'd lists...
* Fixed mistake in walk_page_range_novma() not handling kernel mappings a=
nd
update commit message to referene.
* Added Mike's off-list Acked-by.
* Fixed up comments as per Mike.
* Add some historic flavour to the commit message as per Mike.
https://lore.kernel.org/all/20250603192213.182931-1-lorenzo.stoakes@oracl=
e.com/
v1:
(accidentally sent off-list due to error in scripting)
arch/loongarch/mm/pageattr.c | 2 +-
arch/openrisc/kernel/dma.c | 4 +-
arch/riscv/mm/pageattr.c | 8 +--
include/linux/pagewalk.h | 7 ++-
mm/hugetlb_vmemmap.c | 2 +-
mm/internal.h | 4 ++
mm/pagewalk.c | 98 ++++++++++++++++++++++++------------
mm/ptdump.c | 3 +-
8 files changed, 82 insertions(+), 46 deletions(-)
diff --git a/arch/loongarch/mm/pageattr.c b/arch/loongarch/mm/pageattr.c
index 99165903908a..f5e910b68229 100644
--- a/arch/loongarch/mm/pageattr.c
+++ b/arch/loongarch/mm/pageattr.c
@@ -118,7 +118,7 @@ static int __set_memory(unsigned long addr, int numpa=
ges, pgprot_t set_mask, pgp
return 0;
mmap_write_lock(&init_mm);
- ret =3D walk_page_range_novma(&init_mm, start, end, &pageattr_ops=
, NULL, &masks);
+ ret =3D walk_kernel_page_table_range(start, end, &pageattr_ops, N=
ULL, &masks);
mmap_write_unlock(&init_mm);
flush_tlb_kernel_range(start, end);
diff --git a/arch/openrisc/kernel/dma.c b/arch/openrisc/kernel/dma.c
index 3a7b5baaa450..af932a4ad306 100644
--- a/arch/openrisc/kernel/dma.c
+++ b/arch/openrisc/kernel/dma.c
@@ -72,7 +72,7 @@ void *arch_dma_set_uncached(void *cpu_addr, size_t size=
)
* them and setting the cache-inhibit bit.
*/
mmap_write_lock(&init_mm);
- error =3D walk_page_range_novma(&init_mm, va, va + size,
+ error =3D walk_kernel_page_table_range(va, va + size,
&set_nocache_walk_ops, NULL, NULL);
mmap_write_unlock(&init_mm);
@@ -87,7 +87,7 @@ void arch_dma_clear_uncached(void *cpu_addr, size_t siz=
e)
mmap_write_lock(&init_mm);
/* walk_page_range shouldn't be able to fail here */
- WARN_ON(walk_page_range_novma(&init_mm, va, va + size,
+ WARN_ON(walk_kernel_page_table_range(va, va + size,
&clear_nocache_walk_ops, NULL, NULL));
mmap_write_unlock(&init_mm);
}
diff --git a/arch/riscv/mm/pageattr.c b/arch/riscv/mm/pageattr.c
index d815448758a1..3f76db3d2769 100644
--- a/arch/riscv/mm/pageattr.c
+++ b/arch/riscv/mm/pageattr.c
@@ -299,7 +299,7 @@ static int __set_memory(unsigned long addr, int numpa=
ges, pgprot_t set_mask,
if (ret)
goto unlock;
- ret =3D walk_page_range_novma(&init_mm, lm_start,=
lm_end,
+ ret =3D walk_kernel_page_table_range(lm_start, lm=
_end,
&pageattr_ops, NULL, =
&masks);
if (ret)
goto unlock;
@@ -317,13 +317,13 @@ static int __set_memory(unsigned long addr, int num=
pages, pgprot_t set_mask,
if (ret)
goto unlock;
- ret =3D walk_page_range_novma(&init_mm, lm_start, lm_end,
+ ret =3D walk_kernel_page_table_range(lm_start, lm_end,
&pageattr_ops, NULL, &masks);
if (ret)
goto unlock;
}
- ret =3D walk_page_range_novma(&init_mm, start, end, &pageattr_op=
s, NULL,
+ ret =3D walk_kernel_page_table_range(start, end, &pageattr_ops, =
NULL,
&masks);
unlock:
@@ -335,7 +335,7 @@ static int __set_memory(unsigned long addr, int numpa=
ges, pgprot_t set_mask,
*/
flush_tlb_all();
#else
- ret =3D walk_page_range_novma(&init_mm, start, end, &pageattr_op=
s, NULL,
+ ret =3D walk_kernel_page_table_range(start, end, &pageattr_ops, =
NULL,
&masks);
mmap_write_unlock(&init_mm);
diff --git a/include/linux/pagewalk.h b/include/linux/pagewalk.h
index 9700a29f8afb..8ac2f6d6d2a3 100644
--- a/include/linux/pagewalk.h
+++ b/include/linux/pagewalk.h
@@ -129,10 +129,9 @@ struct mm_walk {
int walk_page_range(struct mm_struct *mm, unsigned long start,
unsigned long end, const struct mm_walk_ops *ops,
void *private);
-int walk_page_range_novma(struct mm_struct *mm, unsigned long start,
- unsigned long end, const struct mm_walk_ops *op=
s,
- pgd_t *pgd,
- void *private);
+int walk_kernel_page_table_range(unsigned long start,
+ unsigned long end, const struct mm_walk_ops *ops,
+ pgd_t *pgd, void *private);
int walk_page_range_vma(struct vm_area_struct *vma, unsigned long start,
unsigned long end, const struct mm_walk_ops *ops,
void *private);
diff --git a/mm/hugetlb_vmemmap.c b/mm/hugetlb_vmemmap.c
index 27245e86df25..ba0fb1b6a5a8 100644
--- a/mm/hugetlb_vmemmap.c
+++ b/mm/hugetlb_vmemmap.c
@@ -166,7 +166,7 @@ static int vmemmap_remap_range(unsigned long start, u=
nsigned long end,
VM_BUG_ON(!PAGE_ALIGNED(start | end));
mmap_read_lock(&init_mm);
- ret =3D walk_page_range_novma(&init_mm, start, end, &vmemmap_rema=
p_ops,
+ ret =3D walk_kernel_page_table_range(start, end, &vmemmap_remap_o=
ps,
NULL, walk);
mmap_read_unlock(&init_mm);
if (ret)
diff --git a/mm/internal.h b/mm/internal.h
index 6b8ed2017743..43788d0de6e3 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -1605,6 +1605,10 @@ static inline void accept_page(struct page *page)
int walk_page_range_mm(struct mm_struct *mm, unsigned long start,
unsigned long end, const struct mm_walk_ops *ops,
void *private);
+int walk_page_range_debug(struct mm_struct *mm, unsigned long start,
+ unsigned long end, const struct mm_walk_ops *op=
s,
+ pgd_t *pgd,
+ void *private);
/* pt_reclaim.c */
bool try_get_and_clear_pmd(struct mm_struct *mm, pmd_t *pmd, pmd_t *pmdv=
al);
diff --git a/mm/pagewalk.c b/mm/pagewalk.c
index e478777c86e1..057a125c3bc0 100644
--- a/mm/pagewalk.c
+++ b/mm/pagewalk.c
@@ -584,9 +584,28 @@ int walk_page_range(struct mm_struct *mm, unsigned l=
ong start,
return walk_page_range_mm(mm, start, end, ops, private);
}
+static int __walk_page_range_novma(struct mm_struct *mm, unsigned long s=
tart,
+ unsigned long end, const struct mm_walk_ops *ops,
+ pgd_t *pgd, void *private)
+{
+ struct mm_walk walk =3D {
+ .ops =3D ops,
+ .mm =3D mm,
+ .pgd =3D pgd,
+ .private =3D private,
+ .no_vma =3D true
+ };
+
+ if (start >=3D end || !walk.mm)
+ return -EINVAL;
+ if (!check_ops_valid(ops))
+ return -EINVAL;
+
+ return walk_pgd_range(start, end, &walk);
+}
+
/**
- * walk_page_range_novma - walk a range of pagetables not backed by a vm=
a
- * @mm: mm_struct representing the target process of page=
table walk
+ * walk_kernel_page_table_range - walk a range of kernel pagetables.
* @start: start address of the virtual address range
* @end: end address of the virtual address range
* @ops: operation to call during the walk
@@ -596,56 +615,69 @@ int walk_page_range(struct mm_struct *mm, unsigned =
long start,
* Similar to walk_page_range() but can walk any page tables even if the=
y are
* not backed by VMAs. Because 'unusual' entries may be walked this func=
tion
* will also not lock the PTEs for the pte_entry() callback. This is use=
ful for
- * walking the kernel pages tables or page tables for firmware.
+ * walking kernel pages tables or page tables for firmware.
*
* Note: Be careful to walk the kernel pages tables, the caller may be n=
eed to
* take other effective approaches (mmap lock may be insufficient) to pr=
event
* the intermediate kernel page tables belonging to the specified addres=
s range
* from being freed (e.g. memory hot-remove).
*/
-int walk_page_range_novma(struct mm_struct *mm, unsigned long start,
+int walk_kernel_page_table_range(unsigned long start, unsigned long end,
+ const struct mm_walk_ops *ops, pgd_t *pgd, void *private)
+{
+ struct mm_struct *mm =3D &init_mm;
+
+ /*
+ * Kernel intermediate page tables are usually not freed, so the =
mmap
+ * read lock is sufficient. But there are some exceptions.
+ * E.g. memory hot-remove. In which case, the mmap lock is insuff=
icient
+ * to prevent the intermediate kernel pages tables belonging to t=
he
+ * specified address range from being freed. The caller should ta=
ke
+ * other actions to prevent this race.
+ */
+ mmap_assert_locked(mm);
+
+ return __walk_page_range_novma(mm, start, end, ops, pgd, private)=
;
+}
+
+/**
+ * walk_page_range_debug - walk a range of pagetables not backed by a vm=
a
+ * @mm: mm_struct representing the target process of page=
table walk
+ * @start: start address of the virtual address range
+ * @end: end address of the virtual address range
+ * @ops: operation to call during the walk
+ * @pgd: pgd to walk if different from mm->pgd
+ * @private: private data for callbacks' usage
+ *
+ * Similar to walk_page_range() but can walk any page tables even if the=
y are
+ * not backed by VMAs. Because 'unusual' entries may be walked this func=
tion
+ * will also not lock the PTEs for the pte_entry() callback.
+ *
+ * This is for debugging purposes ONLY.
+ */
+int walk_page_range_debug(struct mm_struct *mm, unsigned long start,
unsigned long end, const struct mm_walk_ops *op=
s,
pgd_t *pgd,
void *private)
{
- struct mm_walk walk =3D {
- .ops =3D ops,
- .mm =3D mm,
- .pgd =3D pgd,
- .private =3D private,
- .no_vma =3D true
- };
-
- if (start >=3D end || !walk.mm)
- return -EINVAL;
- if (!check_ops_valid(ops))
- return -EINVAL;
+ /*
+ * For convenience, we allow this function to also traverse kerne=
l
+ * mappings.
+ */
+ if (mm =3D=3D &init_mm)
+ return walk_kernel_page_table_range(start, end, ops, pgd,=
private);
/*
- * 1) For walking the user virtual address space:
- *
* The mmap lock protects the page walker from changes to the pag=
e
* tables during the walk. However a read lock is insufficient t=
o
* protect those areas which don't have a VMA as munmap() detache=
s
* the VMAs before downgrading to a read lock and actually tearin=
g
* down PTEs/page tables. In which case, the mmap write lock shou=
ld
- * be hold.
- *
- * 2) For walking the kernel virtual address space:
- *
- * The kernel intermediate page tables usually do not be freed, s=
o
- * the mmap map read lock is sufficient. But there are some excep=
tions.
- * E.g. memory hot-remove. In which case, the mmap lock is insuff=
icient
- * to prevent the intermediate kernel pages tables belonging to t=
he
- * specified address range from being freed. The caller should ta=
ke
- * other actions to prevent this race.
+ * be held.
*/
- if (mm =3D=3D &init_mm)
- mmap_assert_locked(walk.mm);
- else
- mmap_assert_write_locked(walk.mm);
+ mmap_assert_write_locked(mm);
- return walk_pgd_range(start, end, &walk);
+ return __walk_page_range_novma(mm, start, end, ops, pgd, private)=
;
}
int walk_page_range_vma(struct vm_area_struct *vma, unsigned long start,
diff --git a/mm/ptdump.c b/mm/ptdump.c
index 9374f29cdc6f..61a352aa12ed 100644
--- a/mm/ptdump.c
+++ b/mm/ptdump.c
@@ -4,6 +4,7 @@
#include <linux/debugfs.h>
#include <linux/ptdump.h>
#include <linux/kasan.h>
+#include "internal.h"
#if defined(CONFIG_KASAN_GENERIC) || defined(CONFIG_KASAN_SW_TAGS)
/*
@@ -177,7 +178,7 @@ void ptdump_walk_pgd(struct ptdump_state *st, struct =
mm_struct *mm, pgd_t *pgd)
mmap_write_lock(mm);
while (range->start !=3D range->end) {
- walk_page_range_novma(mm, range->start, range->end,
+ walk_page_range_debug(mm, range->start, range->end,
&ptdump_ops, pgd, st);
range++;
}
--
2.49.0
Return-Path: <linux-kernel+bounces-673386-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 722CE41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:43:00 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 66BEE3A70CF
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:42:35 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 4A746291158;
Wed, 4 Jun 2025 14:42:43 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="mSMVQqAA"
Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 82691290BCD;
Wed, 4 Jun 2025 14:42:35 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=192.198.163.13
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749048159; cv=fail; b=Hxbmxa5P9zq0YuJGlxeSIK7o4m4WplEbmmXrMoJZWsf3Ig2oBB7wK3sIFYhauSWAe/tO1VklA/YknrdhFy0557Q9mBfkBnoj9f5KSvAPy1UM7ArK+Xg/sHVg+aqEz+fiNJRzCrjJuHzsAfFnWBAnQs8yubiyeC4Ot/a/5A7ASrc=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749048159; c=relaxed/simple;
bh=DVd4OliV8Icjn2vBLj7yX0y6fixsduWRVBJo3msmIHc=;
h=Date:From:To:CC:Subject:Message-ID:Content-Type:
Content-Disposition:In-Reply-To:MIME-Version; b=mSh0kTVCK6l3BWD9JYqXEpmgsd5fZ415G0sXD4EvRhvc6Oxj7iyTk1HEpx1NLOPh4buvE3+OUipdWirIuLnnf/Vmv88mmccZ1cKN9WBZsYwswvBzw8EREXSojO5bZuHVNw0CfPGguzhcOMrevg5M+uzLC7zq+59ews7FjZYnS2E=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=mSMVQqAA; arc=fail smtp.client-ip=192.198.163.13
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
t=1749048155; x=1780584155;
h=date:from:to:cc:subject:message-id:
content-transfer-encoding:in-reply-to:mime-version;
bh=DVd4OliV8Icjn2vBLj7yX0y6fixsduWRVBJo3msmIHc=;
b=mSMVQqAAerZUQoCMraPShtAbiuFALZnB4sYnKkbyFUxTF3Vo2b+csbNT
r/BjyxXIYSxS+W4bY3kH4xkk/05/7l/VBD6NtCGEK2byDkaF9oFeDFaXY
FfN+VkHYf9ToxwIa+7/eAvV1ngcgzcPAsv7TVd7TpF3orzRlsVsxYXvYV
tSDKVX75PhtgnqmLCD+Ss2yXGZDU4xMirbdumHflLUKg7xyIpwka67Yhs
MZxy3/QRFRVhCAcvnBIGzss+yj+z0NCwYd5g6g8E3aODeJfqC3mBi69ET
U0SsgATeAGAo4RSkZHElCbHPGy53CWpnbA2idVJ5vLN45rELS604BVdkI
g==;
X-CSE-ConnectionGUID: EE2fbTa5TR21YM5CgMzdGg==
X-CSE-MsgGUID: bouT34rWQZWCSHqQMvbfHg==
X-IronPort-AV: E=McAfee;i="6800,10657,11454"; a="53762242"
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="53762242"
Received: from orviesa008.jf.intel.com ([10.64.159.148])
by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 07:42:23 -0700
X-CSE-ConnectionGUID: 1l6bGdi6SySVyKd1Kbo19A==
X-CSE-MsgGUID: hABtaQhjS+CdFlFoCfIjpw==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="146183602"
Received: from orsmsx901.amr.corp.intel.com ([10.22.229.23])
by orviesa008.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 07:42:23 -0700
Received: from ORSMSX901.amr.corp.intel.com (10.22.229.23) by
ORSMSX901.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.2.1544.25; Wed, 4 Jun 2025 07:42:22 -0700
Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by
ORSMSX901.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.2.1544.25 via Frontend Transport; Wed, 4 Jun 2025 07:42:22 -0700
Received: from NAM11-BN8-obe.outbound.protection.outlook.com (40.107.236.58)
by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.1.2507.55; Wed, 4 Jun 2025 07:42:20 -0700
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=GEgScpYgdfdw/oj6v5zFHS3nohkRR03l1OE//4Y5D+fI8EKwi8Y7wp5vRStr6A2MPo6VcyYnQJEY3vcfEGdRKB738MpotnOlFnYCx8lmwNNJWlDXOskij8dDs2SRYcWqh7GhBmmbhAp9imV98YjmyAgPvLaMfURrUCysF+g8tY/69Kqf+/U6kCpjFkHUFXQSMeEhWH0YkRxp8Ulplmcnwq3gZZnrAyjbDeKFBHFfk1iwoRFHEQKMuG5I1HhdlIEh8b03sZ4CSXkNLk3AB8H2mEm1QQiG9Y7rSAp8AeGwzKenNXxyiytqkJ0qMo/hwtEmupFCthRKujkA36uXHqgWpw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=e0SbjCu+4uuzawsrwss/eJ+ZGvrtiNmuPzx7r8CO62U=;
b=nFDx8xmllOQzJkcZXOk1kSKt4V5j/EogbDUtlNc9HI9MSE5/9ZaCOB3VhcDskrMdrO/fS1zfqrUv+zXpupj+hASADTNAqHkatRaQpiqkKasL3dli5YNEeeVteZVd9IQihO/nCZQpd+MJQUp2meWEV+khHRd0bLI8kJ5yGV8FK7kui93a4HfBhi3ULC3y45Xa3XPSapnUvOJVmzHlb/mTtMqFaEIYP5ZxE2E43Ne3JcKCEzpJJKn7ELdq8X9K7cUeP5N1agM22FT/Oj6Ruh6SgN1eKpme62HvzP9iejLzqo/XKgYkUSI0IapkmVnwb/eg8W3JSsyIudg3G/4HKy0WmQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com;
dkim=pass header.d=intel.com; arc=none
Authentication-Results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=intel.com;
Received: from LV3PR11MB8603.namprd11.prod.outlook.com (2603:10b6:408:1b6::9)
by DS0PR11MB7681.namprd11.prod.outlook.com (2603:10b6:8:f0::11) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8769.37; Wed, 4 Jun
2025 14:42:02 +0000
Received: from LV3PR11MB8603.namprd11.prod.outlook.com
([fe80::4622:29cf:32b:7e5c]) by LV3PR11MB8603.namprd11.prod.outlook.com
([fe80::4622:29cf:32b:7e5c%3]) with mapi id 15.20.8792.034; Wed, 4 Jun 2025
14:42:02 +0000
Date: Wed, 4 Jun 2025 22:41:48 +0800
From: kernel test robot <oliver.sang@xxxxxxxxx>
To: e.kubanski <e.kubanski@xxxxxxxxxxxxxxxxxxx>
CC: <oe-lkp@xxxxxxxxxxxxxxx>, <lkp@xxxxxxxxx>, <netdev@xxxxxxxxxxxxxxx>,
<bpf@xxxxxxxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>, <bjorn@xxxxxxxxxx>,
<magnus.karlsson@xxxxxxxxx>, <maciej.fijalkowski@xxxxxxxxx>,
<jonathan.lemon@xxxxxxxxx>, e.kubanski <e.kubanski@xxxxxxxxxxxxxxxxxxx>,
<oliver.sang@xxxxxxxxx>
Subject: Re: [PATCH bpf v2] xsk: Fix out of order segment free in
__xsk_generic_xmit()
Message-ID: <202506042255.a3161554-lkp@xxxxxxxxx>
Content-Type: text/plain; charset="iso-8859-1"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <20250530103456.53564-1-e.kubanski@xxxxxxxxxxxxxxxxxxx>
X-ClientProxiedBy: KU2P306CA0040.MYSP306.PROD.OUTLOOK.COM
(2603:1096:d10:3c::9) To LV3PR11MB8603.namprd11.prod.outlook.com
(2603:10b6:408:1b6::9)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: LV3PR11MB8603:EE_|DS0PR11MB7681:EE_
X-MS-Office365-Filtering-Correlation-Id: 6a7f14a9-8a73-4bd6-2c2f-08dda375f7da
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014|7053199007;
X-Microsoft-Antispam-Message-Info: =?iso-8859-1?Q?/fE7gPQQ7r6937aI32ekv/NFOs4qFbFBQ5CJ1iZkGQQgySWfKZw5FEm7mQ?=
=?iso-8859-1?Q?s/bhZiQurx+5+gLAQoJgNrE0vo8UQtyFb9PTlOpcYlMudNGmnu/ynqYHBV?=
=?iso-8859-1?Q?GmhU5NBly2EJy88ccYHsGHZcengguVDeDn8icnYZZQHuIMAKDr5HfhTty9?=
=?iso-8859-1?Q?m60zVH8On1G52MP6nK7JekRsHAtVjAghjlj5E4hJLY3cUTB6F5xhzu1yJ0?=
=?iso-8859-1?Q?TE+lCsXT8sGyk32xFVIJX3rxjF0b+uZV++hFml+111EqaV4Q7U3/KnWQtu?=
=?iso-8859-1?Q?JwTmS4ilMDRIdVi9F33aAij7691oP+ndorzERyEgdm4vvpLx1PS3cToxcw?=
=?iso-8859-1?Q?cVMbPoAjavIeudZcbvbv/sutmzFKAGPfIxrk56xXjD4zAmtmGIjBCxo50P?=
=?iso-8859-1?Q?pM2dtwUKkJ/qiU8lZYg5XOORfPLF77hp9FfNJfZfZE6b8aakqDb/eVUSDZ?=
=?iso-8859-1?Q?R91YbNGKErR4hlINkEWkVoke7QDxtk4OgDs59kpoIBcAKmRLwMX8LBh1G0?=
=?iso-8859-1?Q?ljOTJedn+2VARow7uWUUtZ+wsm9n1REv/Q5ZsmyMU9rcrFiqYVcNBExaUx?=
=?iso-8859-1?Q?uJ5aSegQGn05GR8ZOuh4t2iX9iKtjGEykjaDM+KAXVC2w6CGl4qoAMsBSc?=
=?iso-8859-1?Q?+QqhAY/fXrfb4MKQIvqbBizZpSRLXLCTXYgX36KD/2WyK91WEUuBiQSK2O?=
=?iso-8859-1?Q?MvXTqqvxrDOGna/2J5y/BqYWkKsv4+ssXZU35L7LtIub6mgXVxQhWZpKP6?=
=?iso-8859-1?Q?WC7eKstXlXRU3rxaq2EOnphJcGRjQDFolYSI13U8CJQSrNkLrNq6YbhjFm?=
=?iso-8859-1?Q?gNMJFH6TqOGm3dzAib0yX8tzI9fEJia5CQDltzSVs3Uahw5fc+DmlEkY0I?=
=?iso-8859-1?Q?z7mpnv+ziZAjNyDN+qX92dVgdF5sGoVXn2/KA8TR7pdjO4bFSbyoejoGtz?=
=?iso-8859-1?Q?1caYRnWKvsIQx5FciMMJWwW+2Ixx8sOALZ8G9J/z2FZ9Kiup2vntACeKhn?=
=?iso-8859-1?Q?r1dNmpfPcj5QjvLoifxVbUfV7FEaYSMzB4U2+wdtIoQFcfeYMYFMgKz18a?=
=?iso-8859-1?Q?nF5PRdFUu7soezpSxbVVLZeK9YezCpf4HcVs+4yjATTjhGSundCc1lI18m?=
=?iso-8859-1?Q?x8qLgLFNcmm49k8cbOMgYS6XxX5Q6gxLnjMtf+nJtvEPPAv7FNT+XJxQ2c?=
=?iso-8859-1?Q?LfsMndpl2L1SyERMD6tQCKsMviIZqfptQC2cjD/2GEeY+Vcyy0fDsC0kDc?=
=?iso-8859-1?Q?pezcuSErJAw6OfsELwhsx/g00NaSzedqUK+JdxAW0PxA0NDHMTaPcotp1y?=
=?iso-8859-1?Q?zXiSBSm3aRrPEzLnva6f2t4LtDizTwpolgZqrsINjQQbTcGd+PpYvk/iU+?=
=?iso-8859-1?Q?K1mM9DPj9mr651MTXqbE/8eFMJi8y03u9rTuESfZiM9U2fGIG0fJmADILS?=
=?iso-8859-1?Q?2pKRGubBDWYsvm2j?=
X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:LV3PR11MB8603.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014)(7053199007);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-1?Q?O2cHOXugRbW9lLYVvQfsfIzQu27nD7sOOSAOM5MKf2GQb+tHiPW7IumP3P?=
=?iso-8859-1?Q?j6xhbjwrK+W19PE5OBKS7bS85ehP+b5URkc0kmCCjn0WtS/F+W7xZomcSM?=
=?iso-8859-1?Q?4NqGRRnyehB8xgDzLQ8r2sb5qHpF+xBQeiFNSaBm2Ve1kAnSUTp44yWU1W?=
=?iso-8859-1?Q?80H2R5gLE6cPT0Fuh6FBJUs9sv3iShBeVHO+/0dVzylull7G9d0pWZ90jr?=
=?iso-8859-1?Q?FgvuJqoo86zepeEs75YnJO+K/WA2BqwYG+rjTHcb2ykZJU2Z+yw/y4QiGK?=
=?iso-8859-1?Q?0iXXPFGwWjQ4gpe3spJOI552ASjD11p5UiToao1CONtflFCZjpb/DBHflf?=
=?iso-8859-1?Q?NCqjhqu8xtIIkj7oZ1rBzxfOWyBWYxCwfB/jykjTkRk9VjB6oEiX03I6qp?=
=?iso-8859-1?Q?iwsxqeZ4wyBi2RLk3wx4D7Vv8B4XUeYDboSd07TKyLjLppdCh0ksbj0hnz?=
=?iso-8859-1?Q?wDtN4FNRV8kM62iHUkrE95wxrsJj3xznElKukjxLyl5BRjc1nfu2EUXUvU?=
=?iso-8859-1?Q?Zm9MFjaZKQ8+JpgAvwaz9D+9Zgy/DI8dPbIG7sIyi5ap+WlbXgDtvvkbuK?=
=?iso-8859-1?Q?ATdr6MNQgsDYAX4M3Z7zVR5UEixiTJq23J417vU6ku6HFKM1IE4IBMgL+V?=
=?iso-8859-1?Q?aGkEjvWodOTNz970qy4X6556dMVzT2EA8P9Q6sWUQN+mwW8G2afgNDd0eI?=
=?iso-8859-1?Q?xKX43XSzruUDsiBd6eBMse0NrIFrIjVSSHrMrTsyxnpBaC/1xkQJn1J9Aw?=
=?iso-8859-1?Q?UuI+z+EceNNzO030c4elw7TvIH5FVgFdjtVoeF63DYHOUkmCGVVeGmlRgo?=
=?iso-8859-1?Q?4OkeW9c0nrtlMzWYAGMt8EJWt456/mtjJ124BVPAi9J3b/8y/dyflNO2tm?=
=?iso-8859-1?Q?Ra/C1oMP1qy4sJhEfwzMTA7g6xF8cE8xZtbvMTbqXVWWKbfSnD61O/mQJ5?=
=?iso-8859-1?Q?T+2yFF8XGy1Ui8jZlE70oz1LHajI2CX0kayz0m/QyJ8h9w4vq/2gGUmfj5?=
=?iso-8859-1?Q?jKA9ex/ZjttDPAXw/GVirVN48xSdlgcI9j8DQFafQOH0qDN0n620VKXtLk?=
=?iso-8859-1?Q?iXgx1Z/oc3Q3VSHmVFBAo/BIUox/IEIwoF7KISmpx2yUPLCmroFFvTOztd?=
=?iso-8859-1?Q?fyDdQwCOHmp6Lcte0MmE3A536T5XZStrcvSDQ/jGL7jQVQiqajxMpQP4mo?=
=?iso-8859-1?Q?u7vILr+pfGCqTXK3wzyMLCP7XZ19Sq/zhia45ZUSJPn1A8kY5Th743jytO?=
=?iso-8859-1?Q?A94XfAYy5R5AFv1QtOzgvCGrn45SJqzc4oqXnUUfKyB9GFzK+Fywbh6uhJ?=
=?iso-8859-1?Q?FpFFyasomJZndAyLc1T76ZNFLIYXwwmFsIyLt4/4Pm5EmGxAG0F7+vsoQ3?=
=?iso-8859-1?Q?6UHAQYtTMHLbFN0elfCDjQvBCNbZO+9TcExbUVPcVbAVlXNGiG3XTGBztT?=
=?iso-8859-1?Q?4Id2b8Q/Flyd3yR3S0yA/0z1Q/ge1sBU/dyXvJ0pnX+qpfQJ7Rr43DKpOs?=
=?iso-8859-1?Q?U+T1nZ0dTzZciAP52r74bOr+/8j99HaKe4nu90dbnNe3Kzs70FVFed5YiM?=
=?iso-8859-1?Q?jKf0G547+T2p7sD1Up3hF1mJEv3JC94x08KaaLZ9woU74y3p7GTxZGOmqx?=
=?iso-8859-1?Q?JNyK4+txxzCsBIItVdv6xN3zWLez4mddD1xdBAgBfzziVOF4mteUfOjw?=
=?iso-8859-1?Q?=3D=3D?=
X-MS-Exchange-CrossTenant-Network-Message-Id: 6a7f14a9-8a73-4bd6-2c2f-08dda375f7da
X-MS-Exchange-CrossTenant-AuthSource: LV3PR11MB8603.namprd11.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 14:42:02.7815
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: wCt2Rh1nEx3RABOku75kSLdihoKSWgO7+z9Z2emh8bf7jggLAgV5D+H5mgzVa3AftpzgfhILkTMApCnjeInD3w==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR11MB7681
X-OriginatorOrg: intel.com
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hello,
kernel test robot noticed a 16.6% regression of hackbench.throughput on:
commit: 2adc2445a5ae93efed1e2e6646a37a3afff8c0e9 ("[PATCH bpf v2] xsk: Fix out of order segment free in __xsk_generic_xmit()")
url: https://github.com/intel-lab-lkp/linux/commits/e-kubanski/xsk-Fix-out-of-order-segment-free-in-__xsk_generic_xmit/20250530-183723
base: https://git.kernel.org/cgit/linux/kernel/git/bpf/bpf.git master
patch link: https://lore.kernel.org/all/20250530103456.53564-1-e.kubanski@xxxxxxxxxxxxxxxxxxx/
patch subject: [PATCH bpf v2] xsk: Fix out of order segment free in __xsk_generic_xmit()
testcase: hackbench
config: x86_64-rhel-9.4
compiler: gcc-12
test machine: 128 threads 2 sockets Intel(R) Xeon(R) Gold 6338 CPU @ 2.00GHz (Ice Lake) with 256G memory
parameters:
nr_threads: 50%
iterations: 4
mode: threads
ipc: socket
cpufreq_governor: performance
In addition to that, the commit also has significant impact on the following tests:
+------------------+---------------------------------------------------------------------------------------------+
| testcase: change | netperf: netperf.Throughput_Mbps 93440.1% improvement |
| test machine | 192 threads 2 sockets Intel(R) Xeon(R) 6740E CPU @ 2.4GHz (Sierra Forest) with 256G memory |
| test parameters | cluster=cs-localhost |
| | cpufreq_governor=performance |
| | ip=ipv4 |
| | nr_threads=50% |
| | runtime=300s |
| | test=SCTP_STREAM |
+------------------+---------------------------------------------------------------------------------------------+
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <oliver.sang@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-lkp/202506042255.a3161554-lkp@xxxxxxxxx
Details are as below:
-------------------------------------------------------------------------------------------------->
The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20250604/202506042255.a3161554-lkp@xxxxxxxxx
=========================================================================================
compiler/cpufreq_governor/ipc/iterations/kconfig/mode/nr_threads/rootfs/tbox_group/testcase:
gcc-12/performance/socket/4/x86_64-rhel-9.4/threads/50%/debian-12-x86_64-20240206.cgz/lkp-icl-2sp2/hackbench
commit:
90b83efa67 ("Merge tag 'bpf-next-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next")
2adc2445a5 ("xsk: Fix out of order segment free in __xsk_generic_xmit()")
90b83efa6701656e 2adc2445a5ae93efed1e2e6646a
---------------- ---------------------------
%stddev %change %stddev
\ | \
8018 -11.4% 7101 sched_debug.cpu.curr->pid.avg
195.95 +14.6% 224.54 uptime.boot
0.01 -16.8% 0.01 vmstat.swap.so
764179 � 3% -8.2% 701708 vmstat.system.in
2.13 � 13% -0.5 1.63 � 2% mpstat.cpu.all.idle%
0.53 -0.1 0.44 mpstat.cpu.all.irq%
7.09 -1.1 5.95 mpstat.cpu.all.usr%
558.00 � 9% +31.5% 733.67 � 26% perf-c2c.DRAM.local
23177 � 6% +17.3% 27181 � 6% perf-c2c.DRAM.remote
161171 +3.4% 166696 perf-c2c.HITM.total
92761 +4.0% 96435 proc-vmstat.nr_slab_reclaimable
3143593 � 4% +9.5% 3442455 � 6% proc-vmstat.nr_unaccepted
2154280 � 8% +19.0% 2563937 � 11% proc-vmstat.numa_interleave
3260150 � 6% +63.8% 5339352 � 6% proc-vmstat.pgalloc_dma32
34526 � 3% +30.6% 45105 � 18% proc-vmstat.pgrefill
1700255 +119.7% 3735986 � 2% proc-vmstat.pgskip_device
423595 -16.6% 353120 hackbench.throughput
418312 -17.0% 347114 hackbench.throughput_avg
423595 -16.6% 353120 hackbench.throughput_best
408057 -17.1% 338325 hackbench.throughput_worst
144.25 +20.3% 173.60 hackbench.time.elapsed_time
144.25 +20.3% 173.60 hackbench.time.elapsed_time.max
1.098e+08 � 2% +17.6% 1.291e+08 hackbench.time.involuntary_context_switches
81915 +1.7% 83317 hackbench.time.minor_page_faults
16768 +22.4% 20519 hackbench.time.system_time
4.043e+08 � 4% +24.1% 5.016e+08 hackbench.time.voluntary_context_switches
4.874e+10 -11.8% 4.301e+10 perf-stat.i.branch-instructions
0.45 +0.1 0.54 perf-stat.i.branch-miss-rate%
2.13e+08 +5.9% 2.255e+08 perf-stat.i.branch-misses
7.45 � 2% +0.2 7.69 perf-stat.i.cache-miss-rate%
1.501e+08 � 4% -16.6% 1.253e+08 perf-stat.i.cache-misses
2.054e+09 -19.6% 1.652e+09 perf-stat.i.cache-references
1.38 +14.9% 1.59 perf-stat.i.cpi
3.224e+11 +1.3% 3.265e+11 perf-stat.i.cpu-cycles
404652 � 3% +12.2% 454021 perf-stat.i.cpu-migrations
2182 � 4% +20.8% 2635 perf-stat.i.cycles-between-cache-misses
2.333e+11 -11.9% 2.054e+11 perf-stat.i.instructions
0.73 -12.8% 0.63 perf-stat.i.ipc
0.44 +0.1 0.52 perf-stat.overall.branch-miss-rate%
7.31 � 2% +0.3 7.58 perf-stat.overall.cache-miss-rate%
1.38 +15.0% 1.59 perf-stat.overall.cpi
2151 � 4% +21.2% 2607 perf-stat.overall.cycles-between-cache-misses
0.72 -13.0% 0.63 perf-stat.overall.ipc
4.841e+10 -11.7% 4.277e+10 perf-stat.ps.branch-instructions
2.114e+08 +6.0% 2.241e+08 perf-stat.ps.branch-misses
1.491e+08 � 4% -16.5% 1.245e+08 perf-stat.ps.cache-misses
2.039e+09 -19.5% 1.642e+09 perf-stat.ps.cache-references
3.201e+11 +1.4% 3.246e+11 perf-stat.ps.cpu-cycles
401515 � 3% +12.3% 450975 perf-stat.ps.cpu-migrations
2.317e+11 -11.8% 2.042e+11 perf-stat.ps.instructions
3.368e+13 +6.0% 3.569e+13 perf-stat.total.instructions
1.64 �205% -98.2% 0.03 �183% perf-sched.sch_delay.avg.ms.__cond_resched.exit_mmap.__mmput.exit_mm.do_exit
65.76 � 92% -73.9% 17.16 � 93% perf-sched.sch_delay.avg.ms.do_wait.kernel_wait4.do_syscall_64.entry_SYSCALL_64_after_hwframe
5.76 � 75% -73.3% 1.54 � 42% perf-sched.sch_delay.avg.ms.irqentry_exit_to_user_mode.asm_sysvec_reschedule_ipi.[unknown].[unknown]
100.68 �112% +329.5% 432.45 � 77% perf-sched.sch_delay.max.ms.__cond_resched.__alloc_frozen_pages_noprof.alloc_pages_mpol.folio_alloc_mpol_noprof.shmem_alloc_folio
3.19 �212% -99.0% 0.03 �183% perf-sched.sch_delay.max.ms.__cond_resched.exit_mmap.__mmput.exit_mm.do_exit
1402 � 35% -62.6% 524.30 � 93% perf-sched.sch_delay.max.ms.do_wait.kernel_wait4.do_syscall_64.entry_SYSCALL_64_after_hwframe
5.57 � 14% -88.9% 0.62 �223% perf-sched.wait_and_delay.avg.ms.__cond_resched.__kmalloc_node_track_caller_noprof.kmalloc_reserve.__alloc_skb.alloc_skb_with_frags
4.98 � 12% -100.0% 0.00 perf-sched.wait_and_delay.avg.ms.__cond_resched.kmem_cache_alloc_node_noprof.__alloc_skb.alloc_skb_with_frags.sock_alloc_send_pskb
224.22 � 65% -100.0% 0.00 perf-sched.wait_and_delay.avg.ms.do_task_dead.do_exit.__x64_sys_exit.x64_sys_call.do_syscall_64
475.81 � 41% -89.0% 52.54 � 81% perf-sched.wait_and_delay.avg.ms.schedule_hrtimeout_range_clock.ep_poll.do_epoll_wait.__x64_sys_epoll_wait
5.33 �124% +628.1% 38.83 � 41% perf-sched.wait_and_delay.count.__cond_resched.__kmalloc_node_noprof.alloc_slab_obj_exts.allocate_slab.___slab_alloc
12463 � 15% -84.9% 1881 �223% perf-sched.wait_and_delay.count.__cond_resched.__kmalloc_node_track_caller_noprof.kmalloc_reserve.__alloc_skb.alloc_skb_with_frags
23237 � 16% -100.0% 0.00 perf-sched.wait_and_delay.count.__cond_resched.kmem_cache_alloc_node_noprof.__alloc_skb.alloc_skb_with_frags.sock_alloc_send_pskb
13.33 �216% +1085.0% 158.00 � 54% perf-sched.wait_and_delay.count.devkmsg_read.vfs_read.ksys_read.do_syscall_64
14.17 � 61% -100.0% 0.00 perf-sched.wait_and_delay.count.do_task_dead.do_exit.__x64_sys_exit.x64_sys_call.do_syscall_64
610.67 � 21% -25.9% 452.67 � 27% perf-sched.wait_and_delay.count.irqentry_exit_to_user_mode.asm_sysvec_apic_timer_interrupt.[unknown].[unknown]
24.50 �157% +597.3% 170.83 � 37% perf-sched.wait_and_delay.count.schedule_hrtimeout_range_clock.ep_poll.do_epoll_wait.__x64_sys_epoll_wait
1018 � 33% -88.8% 113.91 �223% perf-sched.wait_and_delay.max.ms.__cond_resched.__kmalloc_node_track_caller_noprof.kmalloc_reserve.__alloc_skb.alloc_skb_with_frags
1165 � 29% -100.0% 0.00 perf-sched.wait_and_delay.max.ms.__cond_resched.kmem_cache_alloc_node_noprof.__alloc_skb.alloc_skb_with_frags.sock_alloc_send_pskb
1285 � 70% -100.0% 0.00 perf-sched.wait_and_delay.max.ms.do_task_dead.do_exit.__x64_sys_exit.x64_sys_call.do_syscall_64
1.64 �205% -98.2% 0.03 �183% perf-sched.wait_time.avg.ms.__cond_resched.exit_mmap.__mmput.exit_mm.do_exit
7.82 �216% -99.1% 0.07 � 70% perf-sched.wait_time.avg.ms.__cond_resched.zap_pte_range.zap_pmd_range.isra.0
224.22 � 65% -100.0% 0.00 perf-sched.wait_time.avg.ms.do_task_dead.do_exit.__x64_sys_exit.x64_sys_call.do_syscall_64
473.32 � 42% -90.2% 46.32 � 78% perf-sched.wait_time.avg.ms.schedule_hrtimeout_range_clock.ep_poll.do_epoll_wait.__x64_sys_epoll_wait
100.68 �112% +329.5% 432.45 � 77% perf-sched.wait_time.max.ms.__cond_resched.__alloc_frozen_pages_noprof.alloc_pages_mpol.folio_alloc_mpol_noprof.shmem_alloc_folio
3.19 �212% -99.0% 0.03 �183% perf-sched.wait_time.max.ms.__cond_resched.exit_mmap.__mmput.exit_mm.do_exit
169.23 �219% -99.9% 0.24 � 65% perf-sched.wait_time.max.ms.__cond_resched.zap_pte_range.zap_pmd_range.isra.0
1285 � 70% -100.0% 0.00 perf-sched.wait_time.max.ms.do_task_dead.do_exit.__x64_sys_exit.x64_sys_call.do_syscall_64
9.37 � 2% -3.6 5.80 perf-profile.calltrace.cycles-pp.kmem_cache_free.unix_stream_read_generic.unix_stream_recvmsg.sock_recvmsg.sock_read_iter
5.90 � 4% -2.2 3.66 perf-profile.calltrace.cycles-pp.kmem_cache_alloc_node_noprof.__alloc_skb.alloc_skb_with_frags.sock_alloc_send_pskb.unix_stream_sendmsg
2.45 � 10% -1.7 0.76 perf-profile.calltrace.cycles-pp.___slab_alloc.kmem_cache_alloc_node_noprof.__alloc_skb.alloc_skb_with_frags.sock_alloc_send_pskb
47.96 -1.3 46.61 perf-profile.calltrace.cycles-pp.write
6.20 -1.2 4.99 perf-profile.calltrace.cycles-pp.sock_def_readable.unix_stream_sendmsg.sock_write_iter.vfs_write.ksys_write
4.58 � 2% -0.9 3.71 perf-profile.calltrace.cycles-pp.__wake_up_sync_key.sock_def_readable.unix_stream_sendmsg.sock_write_iter.vfs_write
6.97 -0.8 6.13 perf-profile.calltrace.cycles-pp.unix_stream_read_actor.unix_stream_read_generic.unix_stream_recvmsg.sock_recvmsg.sock_read_iter
6.88 -0.8 6.04 perf-profile.calltrace.cycles-pp.skb_copy_datagram_iter.unix_stream_read_actor.unix_stream_read_generic.unix_stream_recvmsg.sock_recvmsg
6.70 � 2% -0.8 5.90 perf-profile.calltrace.cycles-pp.__skb_datagram_iter.skb_copy_datagram_iter.unix_stream_read_actor.unix_stream_read_generic.unix_stream_recvmsg
3.73 � 4% -0.7 3.04 perf-profile.calltrace.cycles-pp.__wake_up_common.__wake_up_sync_key.sock_def_readable.unix_stream_sendmsg.sock_write_iter
3.60 � 4% -0.7 2.93 perf-profile.calltrace.cycles-pp.autoremove_wake_function.__wake_up_common.__wake_up_sync_key.sock_def_readable.unix_stream_sendmsg
3.54 � 4% -0.7 2.89 perf-profile.calltrace.cycles-pp.try_to_wake_up.autoremove_wake_function.__wake_up_common.__wake_up_sync_key.sock_def_readable
2.89 � 5% -0.6 2.25 perf-profile.calltrace.cycles-pp._raw_spin_lock.unix_stream_sendmsg.sock_write_iter.vfs_write.ksys_write
3.40 � 2% -0.6 2.80 perf-profile.calltrace.cycles-pp.__memcg_slab_free_hook.kmem_cache_free.unix_stream_read_generic.unix_stream_recvmsg.sock_recvmsg
2.62 � 7% -0.6 2.06 � 4% perf-profile.calltrace.cycles-pp.fdget_pos.ksys_write.do_syscall_64.entry_SYSCALL_64_after_hwframe.write
2.94 -0.5 2.42 perf-profile.calltrace.cycles-pp.skb_copy_datagram_from_iter.unix_stream_sendmsg.sock_write_iter.vfs_write.ksys_write
3.15 � 4% -0.5 2.67 perf-profile.calltrace.cycles-pp.schedule_timeout.unix_stream_read_generic.unix_stream_recvmsg.sock_recvmsg.sock_read_iter
3.20 � 2% -0.5 2.72 perf-profile.calltrace.cycles-pp.skb_release_head_state.consume_skb.unix_stream_read_generic.unix_stream_recvmsg.sock_recvmsg
3.12 � 5% -0.5 2.65 perf-profile.calltrace.cycles-pp.schedule.schedule_timeout.unix_stream_read_generic.unix_stream_recvmsg.sock_recvmsg
3.09 � 4% -0.5 2.62 perf-profile.calltrace.cycles-pp.__schedule.schedule.schedule_timeout.unix_stream_read_generic.unix_stream_recvmsg
3.05 � 2% -0.4 2.60 perf-profile.calltrace.cycles-pp.unix_destruct_scm.skb_release_head_state.consume_skb.unix_stream_read_generic.unix_stream_recvmsg
2.97 � 2% -0.4 2.54 perf-profile.calltrace.cycles-pp._copy_to_iter.__skb_datagram_iter.skb_copy_datagram_iter.unix_stream_read_actor.unix_stream_read_generic
2.46 -0.4 2.03 perf-profile.calltrace.cycles-pp.entry_SYSCALL_64.write
2.44 -0.4 2.02 perf-profile.calltrace.cycles-pp.entry_SYSCALL_64.read
2.84 � 2% -0.4 2.42 perf-profile.calltrace.cycles-pp.sock_wfree.unix_destruct_scm.skb_release_head_state.consume_skb.unix_stream_read_generic
1.72 � 3% -0.4 1.32 perf-profile.calltrace.cycles-pp.skb_set_owner_w.sock_alloc_send_pskb.unix_stream_sendmsg.sock_write_iter.vfs_write
1.90 -0.4 1.51 perf-profile.calltrace.cycles-pp.clear_bhb_loop.write
1.30 -0.4 0.91 perf-profile.calltrace.cycles-pp.__slab_free.kfree.skb_release_data.consume_skb.unix_stream_read_generic
2.28 � 2% -0.3 1.94 perf-profile.calltrace.cycles-pp.__memcg_slab_post_alloc_hook.kmem_cache_alloc_node_noprof.__alloc_skb.alloc_skb_with_frags.sock_alloc_send_pskb
1.86 -0.3 1.52 perf-profile.calltrace.cycles-pp.clear_bhb_loop.read
3.08 -0.3 2.78 perf-profile.calltrace.cycles-pp.__memcg_slab_free_hook.kfree.skb_release_data.consume_skb.unix_stream_read_generic
0.61 � 6% -0.3 0.33 � 70% perf-profile.calltrace.cycles-pp.dequeue_entity.dequeue_entities.dequeue_task_fair.try_to_block_task.__schedule
3.12 -0.3 2.86 perf-profile.calltrace.cycles-pp.simple_copy_to_iter.__skb_datagram_iter.skb_copy_datagram_iter.unix_stream_read_actor.unix_stream_read_generic
1.62 � 6% -0.3 1.36 � 2% perf-profile.calltrace.cycles-pp.skb_queue_tail.unix_stream_sendmsg.sock_write_iter.vfs_write.ksys_write
1.28 -0.2 1.05 perf-profile.calltrace.cycles-pp.__check_object_size.skb_copy_datagram_from_iter.unix_stream_sendmsg.sock_write_iter.vfs_write
2.91 � 2% -0.2 2.68 perf-profile.calltrace.cycles-pp.__check_object_size.simple_copy_to_iter.__skb_datagram_iter.skb_copy_datagram_iter.unix_stream_read_actor
1.70 � 4% -0.2 1.47 perf-profile.calltrace.cycles-pp.ttwu_do_activate.try_to_wake_up.autoremove_wake_function.__wake_up_common.__wake_up_sync_key
1.13 -0.2 0.92 perf-profile.calltrace.cycles-pp.__slab_free.kmem_cache_free.unix_stream_read_generic.unix_stream_recvmsg.sock_recvmsg
1.24 -0.2 1.04 perf-profile.calltrace.cycles-pp._copy_from_iter.skb_copy_datagram_from_iter.unix_stream_sendmsg.sock_write_iter.vfs_write
0.98 � 6% -0.2 0.78 � 8% perf-profile.calltrace.cycles-pp.fdget_pos.ksys_read.do_syscall_64.entry_SYSCALL_64_after_hwframe.read
1.20 � 6% -0.2 1.00 perf-profile.calltrace.cycles-pp.try_to_block_task.__schedule.schedule.schedule_timeout.unix_stream_read_generic
1.12 � 6% -0.2 0.93 perf-profile.calltrace.cycles-pp.dequeue_entities.dequeue_task_fair.try_to_block_task.__schedule.schedule
1.16 � 5% -0.2 0.97 perf-profile.calltrace.cycles-pp.dequeue_task_fair.try_to_block_task.__schedule.schedule.schedule_timeout
0.84 � 5% -0.2 0.66 perf-profile.calltrace.cycles-pp._raw_spin_lock_irqsave.__wake_up_sync_key.sock_def_readable.unix_stream_sendmsg.sock_write_iter
1.42 � 4% -0.2 1.24 perf-profile.calltrace.cycles-pp.enqueue_task.ttwu_do_activate.try_to_wake_up.autoremove_wake_function.__wake_up_common
1.35 � 4% -0.2 1.18 perf-profile.calltrace.cycles-pp.enqueue_task_fair.enqueue_task.ttwu_do_activate.try_to_wake_up.autoremove_wake_function
0.78 � 6% -0.2 0.61 perf-profile.calltrace.cycles-pp.native_queued_spin_lock_slowpath._raw_spin_lock_irqsave.__wake_up_sync_key.sock_def_readable.unix_stream_sendmsg
0.71 -0.1 0.59 perf-profile.calltrace.cycles-pp.mutex_lock.unix_stream_read_generic.unix_stream_recvmsg.sock_recvmsg.sock_read_iter
0.66 � 2% -0.1 0.54 perf-profile.calltrace.cycles-pp.check_heap_object.__check_object_size.skb_copy_datagram_from_iter.unix_stream_sendmsg.sock_write_iter
2.15 � 2% -0.1 2.04 perf-profile.calltrace.cycles-pp.check_heap_object.__check_object_size.simple_copy_to_iter.__skb_datagram_iter.skb_copy_datagram_iter
0.81 � 4% -0.1 0.71 perf-profile.calltrace.cycles-pp.enqueue_entity.enqueue_task_fair.enqueue_task.ttwu_do_activate.try_to_wake_up
0.93 � 3% -0.1 0.83 perf-profile.calltrace.cycles-pp.__pick_next_task.__schedule.schedule.schedule_timeout.unix_stream_read_generic
0.60 � 6% -0.1 0.51 perf-profile.calltrace.cycles-pp.exit_to_user_mode_loop.do_syscall_64.entry_SYSCALL_64_after_hwframe.read
0.90 � 3% -0.1 0.81 perf-profile.calltrace.cycles-pp.pick_next_task_fair.__pick_next_task.__schedule.schedule.schedule_timeout
2.57 -0.1 2.48 perf-profile.calltrace.cycles-pp.__memcg_slab_post_alloc_hook.__kmalloc_node_track_caller_noprof.kmalloc_reserve.__alloc_skb.alloc_skb_with_frags
0.70 -0.1 0.64 perf-profile.calltrace.cycles-pp.mod_objcg_state.__memcg_slab_free_hook.kmem_cache_free.unix_stream_read_generic.unix_stream_recvmsg
0.75 -0.1 0.69 perf-profile.calltrace.cycles-pp.mod_objcg_state.__memcg_slab_free_hook.kfree.skb_release_data.consume_skb
0.58 -0.0 0.54 perf-profile.calltrace.cycles-pp.mod_objcg_state.__memcg_slab_post_alloc_hook.kmem_cache_alloc_node_noprof.__alloc_skb.alloc_skb_with_frags
0.73 -0.0 0.69 perf-profile.calltrace.cycles-pp.unix_write_space.sock_wfree.unix_destruct_scm.skb_release_head_state.consume_skb
0.78 +0.2 0.93 perf-profile.calltrace.cycles-pp.obj_cgroup_charge.__memcg_slab_post_alloc_hook.__kmalloc_node_track_caller_noprof.kmalloc_reserve.__alloc_skb
37.84 +0.6 38.45 perf-profile.calltrace.cycles-pp.vfs_write.ksys_write.do_syscall_64.entry_SYSCALL_64_after_hwframe.write
36.76 +0.8 37.56 perf-profile.calltrace.cycles-pp.sock_write_iter.vfs_write.ksys_write.do_syscall_64.entry_SYSCALL_64_after_hwframe
35.40 +1.1 36.46 perf-profile.calltrace.cycles-pp.unix_stream_sendmsg.sock_write_iter.vfs_write.ksys_write.do_syscall_64
49.97 +2.0 52.00 perf-profile.calltrace.cycles-pp.read
44.96 +2.9 47.89 perf-profile.calltrace.cycles-pp.entry_SYSCALL_64_after_hwframe.read
44.66 +3.0 47.64 perf-profile.calltrace.cycles-pp.do_syscall_64.entry_SYSCALL_64_after_hwframe.read
42.34 +3.4 45.72 perf-profile.calltrace.cycles-pp.ksys_read.do_syscall_64.entry_SYSCALL_64_after_hwframe.read
40.65 +3.7 44.36 perf-profile.calltrace.cycles-pp.vfs_read.ksys_read.do_syscall_64.entry_SYSCALL_64_after_hwframe.read
39.50 +3.9 43.41 perf-profile.calltrace.cycles-pp.sock_read_iter.vfs_read.ksys_read.do_syscall_64.entry_SYSCALL_64_after_hwframe
38.66 +4.1 42.71 perf-profile.calltrace.cycles-pp.sock_recvmsg.sock_read_iter.vfs_read.ksys_read.do_syscall_64
38.11 +4.1 42.26 perf-profile.calltrace.cycles-pp.unix_stream_recvmsg.sock_recvmsg.sock_read_iter.vfs_read.ksys_read
37.67 +4.2 41.89 perf-profile.calltrace.cycles-pp.unix_stream_read_generic.unix_stream_recvmsg.sock_recvmsg.sock_read_iter.vfs_read
18.28 +4.4 22.69 perf-profile.calltrace.cycles-pp.sock_alloc_send_pskb.unix_stream_sendmsg.sock_write_iter.vfs_write.ksys_write
15.55 � 2% +4.9 20.48 perf-profile.calltrace.cycles-pp.alloc_skb_with_frags.sock_alloc_send_pskb.unix_stream_sendmsg.sock_write_iter.vfs_write
15.24 � 2% +5.0 20.23 perf-profile.calltrace.cycles-pp.__alloc_skb.alloc_skb_with_frags.sock_alloc_send_pskb.unix_stream_sendmsg.sock_write_iter
2.08 � 10% +7.3 9.40 � 2% perf-profile.calltrace.cycles-pp.native_queued_spin_lock_slowpath._raw_spin_lock_irqsave.get_partial_node.___slab_alloc.__kmalloc_node_track_caller_noprof
2.10 � 10% +7.3 9.44 � 2% perf-profile.calltrace.cycles-pp._raw_spin_lock_irqsave.get_partial_node.___slab_alloc.__kmalloc_node_track_caller_noprof.kmalloc_reserve
2.36 � 9% +7.6 9.93 � 2% perf-profile.calltrace.cycles-pp.get_partial_node.___slab_alloc.__kmalloc_node_track_caller_noprof.kmalloc_reserve.__alloc_skb
7.51 � 2% +7.6 15.09 perf-profile.calltrace.cycles-pp.kmalloc_reserve.__alloc_skb.alloc_skb_with_frags.sock_alloc_send_pskb.unix_stream_sendmsg
6.99 � 2% +7.7 14.64 perf-profile.calltrace.cycles-pp.__kmalloc_node_track_caller_noprof.kmalloc_reserve.__alloc_skb.alloc_skb_with_frags.sock_alloc_send_pskb
2.89 � 8% +8.0 10.89 � 2% perf-profile.calltrace.cycles-pp.___slab_alloc.__kmalloc_node_track_caller_noprof.kmalloc_reserve.__alloc_skb.alloc_skb_with_frags
12.34 +10.2 22.53 perf-profile.calltrace.cycles-pp.consume_skb.unix_stream_read_generic.unix_stream_recvmsg.sock_recvmsg.sock_read_iter
9.02 � 3% +10.7 19.71 perf-profile.calltrace.cycles-pp.skb_release_data.consume_skb.unix_stream_read_generic.unix_stream_recvmsg.sock_recvmsg
8.36 � 3% +10.7 19.08 perf-profile.calltrace.cycles-pp.kfree.skb_release_data.consume_skb.unix_stream_read_generic.unix_stream_recvmsg
3.21 � 10% +11.2 14.44 � 2% perf-profile.calltrace.cycles-pp.native_queued_spin_lock_slowpath._raw_spin_lock_irqsave.__put_partials.kfree.skb_release_data
3.30 � 10% +11.3 14.61 � 2% perf-profile.calltrace.cycles-pp._raw_spin_lock_irqsave.__put_partials.kfree.skb_release_data.consume_skb
3.44 � 10% +11.5 14.89 � 2% perf-profile.calltrace.cycles-pp.__put_partials.kfree.skb_release_data.consume_skb.unix_stream_read_generic
9.43 � 2% -3.6 5.84 perf-profile.children.cycles-pp.kmem_cache_free
5.98 � 3% -2.3 3.72 perf-profile.children.cycles-pp.kmem_cache_alloc_node_noprof
48.56 -1.5 47.11 perf-profile.children.cycles-pp.write
6.23 -1.2 5.02 perf-profile.children.cycles-pp.sock_def_readable
6.60 -0.9 5.68 perf-profile.children.cycles-pp.__memcg_slab_free_hook
4.32 � 2% -0.9 3.40 perf-profile.children.cycles-pp._raw_spin_lock
7.01 -0.8 6.16 perf-profile.children.cycles-pp.unix_stream_read_actor
4.86 � 2% -0.8 4.02 perf-profile.children.cycles-pp.__wake_up_sync_key
6.91 -0.8 6.08 perf-profile.children.cycles-pp.skb_copy_datagram_iter
6.76 -0.8 5.95 perf-profile.children.cycles-pp.__skb_datagram_iter
3.64 � 6% -0.8 2.87 � 5% perf-profile.children.cycles-pp.fdget_pos
3.80 -0.7 3.06 perf-profile.children.cycles-pp.clear_bhb_loop
4.00 � 3% -0.7 3.35 perf-profile.children.cycles-pp.__wake_up_common
3.87 � 4% -0.6 3.24 perf-profile.children.cycles-pp.autoremove_wake_function
3.83 � 4% -0.6 3.20 perf-profile.children.cycles-pp.try_to_wake_up
4.15 � 3% -0.6 3.53 perf-profile.children.cycles-pp.__schedule
2.47 -0.6 1.86 perf-profile.children.cycles-pp.__slab_free
4.04 � 3% -0.6 3.49 perf-profile.children.cycles-pp.schedule
3.05 -0.5 2.52 perf-profile.children.cycles-pp.entry_SYSCALL_64
3.00 -0.5 2.49 perf-profile.children.cycles-pp.skb_copy_datagram_from_iter
4.49 -0.5 3.99 perf-profile.children.cycles-pp.__check_object_size
3.24 � 2% -0.5 2.76 perf-profile.children.cycles-pp.skb_release_head_state
3.11 � 2% -0.5 2.65 perf-profile.children.cycles-pp.unix_destruct_scm
4.98 -0.4 4.53 perf-profile.children.cycles-pp.__memcg_slab_post_alloc_hook
3.00 � 2% -0.4 2.56 perf-profile.children.cycles-pp._copy_to_iter
3.51 � 4% -0.4 3.08 perf-profile.children.cycles-pp.schedule_timeout
2.88 � 2% -0.4 2.46 perf-profile.children.cycles-pp.sock_wfree
1.74 � 3% -0.4 1.33 perf-profile.children.cycles-pp.skb_set_owner_w
0.45 � 26% -0.4 0.07 � 10% perf-profile.children.cycles-pp.common_startup_64
0.45 � 26% -0.4 0.07 � 10% perf-profile.children.cycles-pp.cpu_startup_entry
0.44 � 26% -0.4 0.07 � 10% perf-profile.children.cycles-pp.do_idle
0.44 � 26% -0.4 0.07 � 11% perf-profile.children.cycles-pp.start_secondary
1.82 � 2% -0.3 1.51 perf-profile.children.cycles-pp.its_return_thunk
0.36 � 28% -0.3 0.06 � 8% perf-profile.children.cycles-pp.cpuidle_idle_call
0.34 � 27% -0.3 0.04 � 45% perf-profile.children.cycles-pp.cpuidle_enter
0.33 � 27% -0.3 0.04 � 71% perf-profile.children.cycles-pp.acpi_idle_do_entry
0.33 � 27% -0.3 0.04 � 71% perf-profile.children.cycles-pp.acpi_idle_enter
0.34 � 27% -0.3 0.04 � 45% perf-profile.children.cycles-pp.cpuidle_enter_state
0.33 � 28% -0.3 0.04 � 71% perf-profile.children.cycles-pp.acpi_safe_halt
0.33 � 28% -0.3 0.04 � 71% perf-profile.children.cycles-pp.pv_native_safe_halt
3.18 -0.3 2.90 perf-profile.children.cycles-pp.simple_copy_to_iter
1.94 � 3% -0.3 1.67 perf-profile.children.cycles-pp.ttwu_do_activate
0.35 � 16% -0.3 0.08 � 5% perf-profile.children.cycles-pp.asm_sysvec_call_function_single
1.65 � 6% -0.3 1.39 � 2% perf-profile.children.cycles-pp.skb_queue_tail
2.93 -0.2 2.69 perf-profile.children.cycles-pp.check_heap_object
1.38 -0.2 1.14 perf-profile.children.cycles-pp.entry_SYSRETQ_unsafe_stack
2.66 -0.2 2.43 perf-profile.children.cycles-pp.mod_objcg_state
1.72 � 3% -0.2 1.50 perf-profile.children.cycles-pp.enqueue_task
1.27 -0.2 1.06 perf-profile.children.cycles-pp._copy_from_iter
1.63 � 3% -0.2 1.42 perf-profile.children.cycles-pp.enqueue_task_fair
1.30 � 5% -0.2 1.11 perf-profile.children.cycles-pp.try_to_block_task
1.32 � 5% -0.2 1.14 perf-profile.children.cycles-pp.dequeue_entities
0.64 � 12% -0.2 0.46 � 3% perf-profile.children.cycles-pp.__switch_to
1.05 � 3% -0.2 0.87 perf-profile.children.cycles-pp.exit_to_user_mode_loop
0.90 -0.2 0.73 perf-profile.children.cycles-pp.fput
1.50 � 2% -0.2 1.32 perf-profile.children.cycles-pp.__pick_next_task
0.79 � 7% -0.2 0.62 perf-profile.children.cycles-pp.raw_spin_rq_lock_nested
1.33 � 4% -0.2 1.16 perf-profile.children.cycles-pp.dequeue_task_fair
0.61 � 4% -0.2 0.45 perf-profile.children.cycles-pp.select_task_rq
1.46 � 2% -0.2 1.30 perf-profile.children.cycles-pp.pick_next_task_fair
1.00 � 3% -0.1 0.86 perf-profile.children.cycles-pp.update_load_avg
0.77 -0.1 0.63 perf-profile.children.cycles-pp.__cond_resched
0.51 � 3% -0.1 0.37 perf-profile.children.cycles-pp.select_task_rq_fair
0.76 -0.1 0.62 perf-profile.children.cycles-pp.mutex_lock
0.85 � 4% -0.1 0.72 perf-profile.children.cycles-pp.update_curr
0.65 -0.1 0.52 perf-profile.children.cycles-pp.skb_unlink
0.77 -0.1 0.65 � 2% perf-profile.children.cycles-pp.__check_heap_object
0.61 -0.1 0.49 perf-profile.children.cycles-pp.__build_skb_around
0.18 � 7% -0.1 0.06 � 9% perf-profile.children.cycles-pp.sysvec_call_function_single
0.97 � 3% -0.1 0.85 perf-profile.children.cycles-pp.enqueue_entity
0.74 � 4% -0.1 0.63 perf-profile.children.cycles-pp.dequeue_entity
0.46 � 3% -0.1 0.34 perf-profile.children.cycles-pp.prepare_to_wait
0.61 -0.1 0.50 perf-profile.children.cycles-pp.rw_verify_area
0.62 -0.1 0.51 perf-profile.children.cycles-pp.entry_SYSCALL_64_safe_stack
0.88 -0.1 0.78 perf-profile.children.cycles-pp.refill_obj_stock
0.15 � 6% -0.1 0.05 perf-profile.children.cycles-pp.__sysvec_call_function_single
0.59 � 3% -0.1 0.49 � 2% perf-profile.children.cycles-pp.__virt_addr_valid
0.62 � 3% -0.1 0.51 perf-profile.children.cycles-pp.syscall_return_via_sysret
0.21 � 8% -0.1 0.11 � 3% perf-profile.children.cycles-pp.select_idle_sibling
0.46 -0.1 0.37 perf-profile.children.cycles-pp.mutex_unlock
0.55 -0.1 0.46 � 2% perf-profile.children.cycles-pp.asm_sysvec_apic_timer_interrupt
0.50 � 2% -0.1 0.41 perf-profile.children.cycles-pp.scm_recv_unix
0.51 � 2% -0.1 0.42 � 2% perf-profile.children.cycles-pp.sysvec_apic_timer_interrupt
0.46 � 3% -0.1 0.38 perf-profile.children.cycles-pp.pick_task_fair
0.44 -0.1 0.36 perf-profile.children.cycles-pp.x64_sys_call
0.45 � 2% -0.1 0.37 � 3% perf-profile.children.cycles-pp.__sysvec_apic_timer_interrupt
0.44 � 2% -0.1 0.36 � 3% perf-profile.children.cycles-pp.hrtimer_interrupt
0.45 � 2% -0.1 0.38 perf-profile.children.cycles-pp.switch_fpu_return
0.37 � 2% -0.1 0.30 � 3% perf-profile.children.cycles-pp.__hrtimer_run_queues
0.36 � 3% -0.1 0.29 � 2% perf-profile.children.cycles-pp.tick_nohz_handler
0.33 � 3% -0.1 0.27 � 2% perf-profile.children.cycles-pp.update_process_times
0.12 � 5% -0.1 0.06 perf-profile.children.cycles-pp.available_idle_cpu
0.14 � 6% -0.1 0.09 � 4% perf-profile.children.cycles-pp.__flush_smp_call_function_queue
0.30 � 2% -0.1 0.24 � 2% perf-profile.children.cycles-pp.__scm_recv_common
0.46 � 7% -0.1 0.41 perf-profile.children.cycles-pp.set_next_entity
0.32 � 3% -0.0 0.27 � 2% perf-profile.children.cycles-pp._raw_spin_unlock_irqrestore
0.29 � 5% -0.0 0.24 perf-profile.children.cycles-pp.wakeup_preempt
0.25 -0.0 0.20 perf-profile.children.cycles-pp.kmalloc_size_roundup
0.26 � 3% -0.0 0.22 perf-profile.children.cycles-pp.prepare_task_switch
0.29 � 3% -0.0 0.24 � 3% perf-profile.children.cycles-pp.update_cfs_group
0.26 � 3% -0.0 0.22 perf-profile.children.cycles-pp.rcu_all_qs
0.32 � 6% -0.0 0.28 perf-profile.children.cycles-pp.__rseq_handle_notify_resume
0.75 -0.0 0.71 perf-profile.children.cycles-pp.unix_write_space
0.19 � 4% -0.0 0.15 � 2% perf-profile.children.cycles-pp.finish_task_switch
0.22 � 6% -0.0 0.18 � 2% perf-profile.children.cycles-pp.sched_tick
0.31 � 4% -0.0 0.26 perf-profile.children.cycles-pp.restore_fpregs_from_fpstate
0.24 -0.0 0.20 perf-profile.children.cycles-pp.security_file_permission
0.16 � 4% -0.0 0.12 � 3% perf-profile.children.cycles-pp.unix_maybe_add_creds
0.30 � 4% -0.0 0.26 perf-profile.children.cycles-pp.__update_load_avg_se
0.18 � 7% -0.0 0.14 � 4% perf-profile.children.cycles-pp.task_tick_fair
0.25 � 5% -0.0 0.21 � 2% perf-profile.children.cycles-pp.pick_eevdf
0.16 � 6% -0.0 0.13 perf-profile.children.cycles-pp.asm_sysvec_reschedule_ipi
0.21 � 3% -0.0 0.17 � 2% perf-profile.children.cycles-pp.check_stack_object
0.21 � 2% -0.0 0.18 � 2% perf-profile.children.cycles-pp.update_rq_clock_task
0.18 � 3% -0.0 0.15 � 3% perf-profile.children.cycles-pp.unix_scm_to_skb
0.23 � 7% -0.0 0.19 � 2% perf-profile.children.cycles-pp.__update_load_avg_cfs_rq
0.19 � 6% -0.0 0.16 � 2% perf-profile.children.cycles-pp.do_perf_trace_sched_wakeup_template
0.16 � 3% -0.0 0.13 � 3% perf-profile.children.cycles-pp.is_vmalloc_addr
0.14 � 3% -0.0 0.11 � 4% perf-profile.children.cycles-pp.security_socket_sendmsg
0.18 � 2% -0.0 0.15 perf-profile.children.cycles-pp.put_pid
0.16 � 3% -0.0 0.13 perf-profile.children.cycles-pp.put_prev_entity
0.24 � 2% -0.0 0.20 � 2% perf-profile.children.cycles-pp.wake_affine
0.15 � 2% -0.0 0.12 perf-profile.children.cycles-pp.manage_oob
0.22 � 5% -0.0 0.19 � 2% perf-profile.children.cycles-pp.rseq_ip_fixup
0.32 � 2% -0.0 0.30 perf-profile.children.cycles-pp.reweight_entity
0.16 � 2% -0.0 0.13 � 5% perf-profile.children.cycles-pp.security_socket_recvmsg
0.13 � 2% -0.0 0.11 � 3% perf-profile.children.cycles-pp.security_socket_getpeersec_dgram
0.09 � 7% -0.0 0.06 � 7% perf-profile.children.cycles-pp.cpuacct_charge
0.30 � 4% -0.0 0.28 perf-profile.children.cycles-pp.__enqueue_entity
0.16 � 3% -0.0 0.13 � 2% perf-profile.children.cycles-pp.update_curr_se
0.11 � 3% -0.0 0.09 perf-profile.children.cycles-pp.wait_for_unix_gc
0.10 -0.0 0.08 perf-profile.children.cycles-pp.skb_put
0.12 � 7% -0.0 0.10 � 3% perf-profile.children.cycles-pp.os_xsave
0.10 � 3% -0.0 0.08 perf-profile.children.cycles-pp.skb_free_head
0.13 � 5% -0.0 0.12 � 4% perf-profile.children.cycles-pp.update_entity_lag
0.15 � 7% -0.0 0.13 � 3% perf-profile.children.cycles-pp.update_rq_clock
0.10 � 8% -0.0 0.08 perf-profile.children.cycles-pp.___perf_sw_event
0.12 � 6% -0.0 0.10 perf-profile.children.cycles-pp.perf_tp_event
0.09 -0.0 0.08 � 6% perf-profile.children.cycles-pp.__switch_to_asm
0.08 � 6% -0.0 0.06 � 7% perf-profile.children.cycles-pp.kfree_skbmem
0.09 � 7% -0.0 0.08 perf-profile.children.cycles-pp.rseq_update_cpu_node_id
0.07 � 5% -0.0 0.06 perf-profile.children.cycles-pp.__x64_sys_write
0.06 � 6% -0.0 0.05 perf-profile.children.cycles-pp.finish_wait
0.07 -0.0 0.06 perf-profile.children.cycles-pp.__x64_sys_read
0.06 -0.0 0.05 perf-profile.children.cycles-pp.__irq_exit_rcu
0.10 � 10% +0.0 0.12 � 3% perf-profile.children.cycles-pp.detach_tasks
0.24 � 10% +0.0 0.27 � 2% perf-profile.children.cycles-pp.sched_balance_newidle
0.24 � 9% +0.0 0.27 � 2% perf-profile.children.cycles-pp.sched_balance_rq
0.16 � 3% +0.0 0.19 perf-profile.children.cycles-pp.put_cpu_partial
0.19 +0.0 0.24 � 2% perf-profile.children.cycles-pp.css_rstat_updated
0.00 +0.1 0.05 perf-profile.children.cycles-pp.__refill_stock
0.00 +0.1 0.05 perf-profile.children.cycles-pp.sysvec_call_function
0.16 � 2% +0.1 0.21 � 2% perf-profile.children.cycles-pp.refill_stock
0.14 � 2% +0.1 0.19 � 3% perf-profile.children.cycles-pp.try_charge_memcg
0.34 � 3% +0.1 0.40 � 4% perf-profile.children.cycles-pp.__mod_memcg_lruvec_state
0.00 +0.1 0.07 � 5% perf-profile.children.cycles-pp.asm_sysvec_call_function
0.32 � 5% +0.1 0.40 � 5% perf-profile.children.cycles-pp.__mod_memcg_state
0.42 � 2% +0.1 0.56 perf-profile.children.cycles-pp.obj_cgroup_uncharge_pages
0.12 � 11% +0.1 0.26 � 4% perf-profile.children.cycles-pp.get_any_partial
37.92 +0.6 38.52 perf-profile.children.cycles-pp.vfs_write
36.83 +0.8 37.63 perf-profile.children.cycles-pp.sock_write_iter
35.67 +1.0 36.68 perf-profile.children.cycles-pp.unix_stream_sendmsg
50.55 +1.9 52.47 perf-profile.children.cycles-pp.read
88.56 +2.4 90.94 perf-profile.children.cycles-pp.entry_SYSCALL_64_after_hwframe
87.95 +2.5 90.43 perf-profile.children.cycles-pp.do_syscall_64
42.42 +3.4 45.79 perf-profile.children.cycles-pp.ksys_read
40.72 +3.7 44.41 perf-profile.children.cycles-pp.vfs_read
39.55 +3.9 43.45 perf-profile.children.cycles-pp.sock_read_iter
38.72 +4.0 42.77 perf-profile.children.cycles-pp.sock_recvmsg
38.16 +4.1 42.29 perf-profile.children.cycles-pp.unix_stream_recvmsg
37.91 +4.2 42.09 perf-profile.children.cycles-pp.unix_stream_read_generic
18.34 +4.4 22.74 perf-profile.children.cycles-pp.sock_alloc_send_pskb
15.61 � 2% +4.9 20.54 perf-profile.children.cycles-pp.alloc_skb_with_frags
15.35 � 2% +5.0 20.32 perf-profile.children.cycles-pp.__alloc_skb
4.43 � 11% +6.1 10.58 � 2% perf-profile.children.cycles-pp.get_partial_node
5.34 � 9% +6.3 11.65 � 2% perf-profile.children.cycles-pp.___slab_alloc
7.59 � 2% +7.6 15.16 perf-profile.children.cycles-pp.kmalloc_reserve
7.08 � 2% +7.7 14.73 perf-profile.children.cycles-pp.__kmalloc_node_track_caller_noprof
6.27 � 11% +9.1 15.34 � 2% perf-profile.children.cycles-pp.__put_partials
12.41 +10.2 22.59 perf-profile.children.cycles-pp.consume_skb
9.06 � 3% +10.7 19.74 perf-profile.children.cycles-pp.skb_release_data
8.42 � 3% +10.7 19.13 perf-profile.children.cycles-pp.kfree
13.33 � 8% +14.3 27.59 � 2% perf-profile.children.cycles-pp._raw_spin_lock_irqsave
11.76 � 9% +14.3 26.04 � 2% perf-profile.children.cycles-pp.native_queued_spin_lock_slowpath
3.88 � 2% -0.8 3.08 perf-profile.self.cycles-pp.__memcg_slab_free_hook
3.58 � 6% -0.8 2.82 � 5% perf-profile.self.cycles-pp.fdget_pos
3.76 -0.7 3.03 perf-profile.self.cycles-pp.clear_bhb_loop
3.19 � 3% -0.6 2.57 perf-profile.self.cycles-pp._raw_spin_lock
2.41 -0.6 1.82 perf-profile.self.cycles-pp.__slab_free
2.71 � 4% -0.6 2.12 perf-profile.self.cycles-pp.unix_stream_sendmsg
2.39 � 2% -0.4 1.95 perf-profile.self.cycles-pp.unix_stream_read_generic
2.96 � 2% -0.4 2.53 perf-profile.self.cycles-pp._copy_to_iter
1.71 � 3% -0.4 1.30 perf-profile.self.cycles-pp.skb_set_owner_w
2.40 -0.4 2.02 perf-profile.self.cycles-pp.__memcg_slab_post_alloc_hook
2.10 � 3% -0.4 1.73 perf-profile.self.cycles-pp.sock_wfree
2.08 -0.4 1.71 perf-profile.self.cycles-pp.do_syscall_64
1.92 -0.3 1.58 perf-profile.self.cycles-pp.kmem_cache_free
1.58 � 8% -0.3 1.26 perf-profile.self.cycles-pp.sock_def_readable
2.60 � 4% -0.3 2.28 perf-profile.self.cycles-pp._raw_spin_lock_irqsave
2.22 -0.3 1.95 perf-profile.self.cycles-pp.mod_objcg_state
1.43 � 4% -0.2 1.19 � 3% perf-profile.self.cycles-pp.read
1.41 -0.2 1.18 perf-profile.self.cycles-pp.write
1.34 -0.2 1.10 perf-profile.self.cycles-pp.entry_SYSRETQ_unsafe_stack
1.16 -0.2 0.95 perf-profile.self.cycles-pp.__alloc_skb
1.24 -0.2 1.03 perf-profile.self.cycles-pp._copy_from_iter
1.34 -0.2 1.14 perf-profile.self.cycles-pp.__kmalloc_node_track_caller_noprof
1.07 � 2% -0.2 0.88 perf-profile.self.cycles-pp.sock_write_iter
0.63 � 12% -0.2 0.46 � 3% perf-profile.self.cycles-pp.__switch_to
0.94 � 2% -0.2 0.78 perf-profile.self.cycles-pp.its_return_thunk
0.94 � 2% -0.2 0.77 perf-profile.self.cycles-pp.kmem_cache_alloc_node_noprof
0.85 -0.2 0.69 perf-profile.self.cycles-pp.fput
0.84 -0.2 0.69 perf-profile.self.cycles-pp.sock_read_iter
0.87 � 2% -0.1 0.72 � 3% perf-profile.self.cycles-pp.vfs_read
0.83 -0.1 0.70 perf-profile.self.cycles-pp.entry_SYSCALL_64
0.75 � 3% -0.1 0.61 perf-profile.self.cycles-pp.vfs_write
0.72 � 2% -0.1 0.61 � 2% perf-profile.self.cycles-pp.__check_heap_object
0.57 � 2% -0.1 0.47 perf-profile.self.cycles-pp.entry_SYSCALL_64_after_hwframe
0.59 -0.1 0.49 perf-profile.self.cycles-pp.__check_object_size
0.56 -0.1 0.46 perf-profile.self.cycles-pp.__build_skb_around
0.61 � 2% -0.1 0.50 perf-profile.self.cycles-pp.__skb_datagram_iter
2.12 � 2% -0.1 2.02 perf-profile.self.cycles-pp.check_heap_object
0.84 -0.1 0.74 perf-profile.self.cycles-pp.refill_obj_stock
0.54 � 3% -0.1 0.45 � 2% perf-profile.self.cycles-pp.__virt_addr_valid
0.42 -0.1 0.34 perf-profile.self.cycles-pp.mutex_unlock
0.55 � 3% -0.1 0.46 perf-profile.self.cycles-pp.syscall_return_via_sysret
0.45 -0.1 0.37 perf-profile.self.cycles-pp.mutex_lock
0.47 -0.1 0.38 perf-profile.self.cycles-pp.kfree
0.40 � 3% -0.1 0.32 perf-profile.self.cycles-pp.__schedule
0.46 -0.1 0.38 perf-profile.self.cycles-pp.unix_write_space
0.96 -0.1 0.89 perf-profile.self.cycles-pp.obj_cgroup_charge
0.41 -0.1 0.34 � 2% perf-profile.self.cycles-pp.sock_alloc_send_pskb
0.36 � 2% -0.1 0.30 perf-profile.self.cycles-pp.rw_verify_area
0.38 -0.1 0.32 perf-profile.self.cycles-pp.x64_sys_call
0.36 � 2% -0.1 0.30 perf-profile.self.cycles-pp.__cond_resched
0.33 � 2% -0.1 0.27 perf-profile.self.cycles-pp.ksys_read
0.33 -0.1 0.27 perf-profile.self.cycles-pp.ksys_write
0.37 � 2% -0.1 0.31 perf-profile.self.cycles-pp.sock_recvmsg
0.36 � 2% -0.1 0.31 perf-profile.self.cycles-pp.update_load_avg
0.33 � 2% -0.1 0.27 perf-profile.self.cycles-pp.skb_copy_datagram_from_iter
0.28 � 2% -0.1 0.23 perf-profile.self.cycles-pp.alloc_skb_with_frags
0.11 � 7% -0.1 0.06 perf-profile.self.cycles-pp.available_idle_cpu
0.26 -0.0 0.21 perf-profile.self.cycles-pp.entry_SYSCALL_64_safe_stack
0.27 -0.0 0.22 � 3% perf-profile.self.cycles-pp.unix_stream_recvmsg
0.28 � 3% -0.0 0.24 perf-profile.self.cycles-pp.update_cfs_group
0.28 � 2% -0.0 0.24 � 2% perf-profile.self.cycles-pp.kmalloc_reserve
0.30 � 4% -0.0 0.26 perf-profile.self.cycles-pp.restore_fpregs_from_fpstate
0.27 � 3% -0.0 0.23 perf-profile.self.cycles-pp._raw_spin_unlock_irqrestore
0.28 � 6% -0.0 0.24 perf-profile.self.cycles-pp.update_curr
0.24 -0.0 0.20 � 2% perf-profile.self.cycles-pp.__scm_recv_common
0.20 � 2% -0.0 0.16 � 3% perf-profile.self.cycles-pp.kmalloc_size_roundup
0.20 -0.0 0.16 � 3% perf-profile.self.cycles-pp.security_file_permission
0.28 � 5% -0.0 0.24 � 2% perf-profile.self.cycles-pp.__update_load_avg_se
0.19 � 2% -0.0 0.16 � 2% perf-profile.self.cycles-pp.unix_destruct_scm
0.12 � 4% -0.0 0.09 perf-profile.self.cycles-pp.unix_maybe_add_creds
0.22 � 7% -0.0 0.18 perf-profile.self.cycles-pp.__update_load_avg_cfs_rq
0.19 � 2% -0.0 0.16 perf-profile.self.cycles-pp.update_rq_clock_task
0.18 � 2% -0.0 0.14 � 3% perf-profile.self.cycles-pp.prepare_task_switch
0.20 � 2% -0.0 0.16 � 3% perf-profile.self.cycles-pp.rcu_all_qs
0.14 � 4% -0.0 0.11 perf-profile.self.cycles-pp.skb_queue_tail
0.17 � 2% -0.0 0.14 � 3% perf-profile.self.cycles-pp.enqueue_task_fair
0.17 � 3% -0.0 0.14 perf-profile.self.cycles-pp.scm_recv_unix
0.16 � 3% -0.0 0.13 perf-profile.self.cycles-pp.unix_scm_to_skb
0.20 � 2% -0.0 0.17 perf-profile.self.cycles-pp.pick_eevdf
0.13 � 2% -0.0 0.10 � 3% perf-profile.self.cycles-pp.manage_oob
0.12 � 3% -0.0 0.09 � 4% perf-profile.self.cycles-pp.simple_copy_to_iter
0.14 � 2% -0.0 0.11 � 3% perf-profile.self.cycles-pp.switch_fpu_return
0.17 � 2% -0.0 0.14 perf-profile.self.cycles-pp.try_to_wake_up
0.16 � 2% -0.0 0.14 � 2% perf-profile.self.cycles-pp.check_stack_object
0.15 -0.0 0.12 � 4% perf-profile.self.cycles-pp.skb_unlink
0.13 � 2% -0.0 0.10 � 4% perf-profile.self.cycles-pp.__wake_up_common
0.11 � 4% -0.0 0.09 perf-profile.self.cycles-pp.finish_task_switch
0.12 � 3% -0.0 0.10 perf-profile.self.cycles-pp.put_pid
0.13 � 2% -0.0 0.11 perf-profile.self.cycles-pp.consume_skb
0.13 � 2% -0.0 0.11 perf-profile.self.cycles-pp.pick_next_task_fair
0.14 � 2% -0.0 0.12 � 4% perf-profile.self.cycles-pp.skb_copy_datagram_iter
0.30 � 2% -0.0 0.28 perf-profile.self.cycles-pp.__enqueue_entity
0.12 � 3% -0.0 0.10 � 3% perf-profile.self.cycles-pp.is_vmalloc_addr
0.11 � 3% -0.0 0.09 perf-profile.self.cycles-pp.security_socket_getpeersec_dgram
0.12 � 3% -0.0 0.10 perf-profile.self.cycles-pp.pick_task_fair
0.10 -0.0 0.08 perf-profile.self.cycles-pp.security_socket_sendmsg
0.10 -0.0 0.08 perf-profile.self.cycles-pp.select_task_rq
0.08 � 5% -0.0 0.06 � 7% perf-profile.self.cycles-pp.cpuacct_charge
0.13 � 4% -0.0 0.11 perf-profile.self.cycles-pp.dequeue_entity
0.13 -0.0 0.11 � 5% perf-profile.self.cycles-pp.security_socket_recvmsg
0.11 -0.0 0.09 perf-profile.self.cycles-pp.skb_release_head_state
0.11 -0.0 0.09 � 4% perf-profile.self.cycles-pp.enqueue_entity
0.12 � 5% -0.0 0.10 perf-profile.self.cycles-pp.os_xsave
0.14 � 3% -0.0 0.12 perf-profile.self.cycles-pp.update_curr_se
0.13 � 5% -0.0 0.11 perf-profile.self.cycles-pp.exit_to_user_mode_loop
0.14 � 4% -0.0 0.12 � 3% perf-profile.self.cycles-pp.task_h_load
0.12 � 6% -0.0 0.11 � 3% perf-profile.self.cycles-pp.dequeue_entities
0.09 -0.0 0.07 � 6% perf-profile.self.cycles-pp.wait_for_unix_gc
0.21 � 6% -0.0 0.19 � 2% perf-profile.self.cycles-pp.__dequeue_entity
0.10 � 5% -0.0 0.08 perf-profile.self.cycles-pp.__get_user_8
0.11 � 6% -0.0 0.09 � 5% perf-profile.self.cycles-pp.prepare_to_wait
0.08 -0.0 0.06 � 7% perf-profile.self.cycles-pp.skb_free_head
0.08 -0.0 0.06 � 7% perf-profile.self.cycles-pp.unix_stream_read_actor
0.09 � 4% -0.0 0.07 � 6% perf-profile.self.cycles-pp.__switch_to_asm
0.12 � 6% -0.0 0.11 perf-profile.self.cycles-pp.avg_vruntime
0.09 � 4% -0.0 0.08 perf-profile.self.cycles-pp.place_entity
0.07 � 5% -0.0 0.06 perf-profile.self.cycles-pp.select_task_rq_fair
0.06 � 6% -0.0 0.05 perf-profile.self.cycles-pp.___perf_sw_event
0.08 -0.0 0.07 � 5% perf-profile.self.cycles-pp.skb_put
0.07 -0.0 0.06 perf-profile.self.cycles-pp.propagate_entity_load_avg
0.07 -0.0 0.06 perf-profile.self.cycles-pp.wakeup_preempt
0.06 -0.0 0.05 perf-profile.self.cycles-pp.kfree_skbmem
0.06 -0.0 0.05 perf-profile.self.cycles-pp.select_idle_sibling
0.12 � 3% +0.0 0.16 � 4% perf-profile.self.cycles-pp.obj_cgroup_uncharge_pages
0.15 � 3% +0.0 0.19 perf-profile.self.cycles-pp.put_cpu_partial
0.10 � 3% +0.0 0.14 � 2% perf-profile.self.cycles-pp.refill_stock
0.17 +0.0 0.21 perf-profile.self.cycles-pp.css_rstat_updated
0.10 � 4% +0.0 0.15 � 3% perf-profile.self.cycles-pp.try_charge_memcg
0.27 � 4% +0.0 0.31 � 5% perf-profile.self.cycles-pp.__mod_memcg_lruvec_state
0.25 � 3% +0.1 0.32 perf-profile.self.cycles-pp.__put_partials
0.46 � 3% +0.1 0.60 perf-profile.self.cycles-pp.get_partial_node
0.88 +0.2 1.03 perf-profile.self.cycles-pp.___slab_alloc
11.74 � 9% +14.3 26.02 � 2% perf-profile.self.cycles-pp.native_queued_spin_lock_slowpath
***************************************************************************************************
lkp-srf-2sp3: 192 threads 2 sockets Intel(R) Xeon(R) 6740E CPU @ 2.4GHz (Sierra Forest) with 256G memory
=========================================================================================
cluster/compiler/cpufreq_governor/ip/kconfig/nr_threads/rootfs/runtime/tbox_group/test/testcase:
cs-localhost/gcc-12/performance/ipv4/x86_64-rhel-9.4/50%/debian-12-x86_64-20240206.cgz/300s/lkp-srf-2sp3/SCTP_STREAM/netperf
commit:
90b83efa67 ("Merge tag 'bpf-next-6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next")
2adc2445a5 ("xsk: Fix out of order segment free in __xsk_generic_xmit()")
90b83efa6701656e 2adc2445a5ae93efed1e2e6646a
---------------- ---------------------------
%stddev %change %stddev
\ | \
97891 -14.8% 83440 uptime.idle
5.813e+10 -24.7% 4.376e+10 cpuidle..time
1432696 +8071.0% 1.171e+08 cpuidle..usage
2.67 �129% +13268.8% 356.50 �106% perf-c2c.DRAM.local
36.50 � 97% +1.7e+05% 62210 �106% perf-c2c.HITM.local
57.83 � 96% +1.1e+05% 62785 �106% perf-c2c.HITM.total
7646 � 24% +3575.6% 281040 �196% numa-meminfo.node0.Shmem
352954 � 57% +397.3% 1755395 � 35% numa-meminfo.node1.Active
352954 � 57% +397.3% 1755395 � 35% numa-meminfo.node1.Active(anon)
24856 � 7% +5388.7% 1364277 � 33% numa-meminfo.node1.Shmem
900437 � 18% +33130.0% 2.992e+08 numa-numastat.node0.local_node
980894 � 15% +30412.3% 2.993e+08 numa-numastat.node0.numa_hit
843029 � 20% +33579.9% 2.839e+08 numa-numastat.node1.local_node
960593 � 15% +29466.0% 2.84e+08 numa-numastat.node1.numa_hit
99.95 -26.6% 73.35 vmstat.cpu.id
1.43 � 4% +3253.2% 47.88 � 2% vmstat.procs.r
3269 +21229.7% 697353 vmstat.system.cs
5726 � 2% +7837.1% 454486 vmstat.system.in
99.91 -26.7 73.24 mpstat.cpu.all.idle%
0.01 � 2% +0.3 0.29 mpstat.cpu.all.irq%
0.03 +6.7 6.71 mpstat.cpu.all.soft%
0.03 � 2% +19.7 19.68 mpstat.cpu.all.sys%
0.03 +0.1 0.08 � 3% mpstat.cpu.all.usr%
1.00 +15883.3% 159.83 � 57% mpstat.max_utilization.seconds
2.31 � 3% +1565.7% 38.48 � 7% mpstat.max_utilization_pct
827685 +197.1% 2459378 � 3% meminfo.Active
827685 +197.1% 2459378 � 3% meminfo.Active(anon)
3564506 +45.3% 5177743 meminfo.Cached
1002604 +162.8% 2634788 � 3% meminfo.Committed_AS
73396 +27.4% 93496 � 3% meminfo.Mapped
6584486 +30.6% 8597070 meminfo.Memused
32406 +4978.1% 1645637 � 5% meminfo.Shmem
7674969 +22.1% 9367878 meminfo.max_used_kB
1475286 � 37% +10036.1% 1.495e+08 numa-vmstat.node0.nr_unaccepted
1910 � 24% +3574.4% 70214 �196% numa-vmstat.node0.nr_writeback_temp
901028 � 18% +33108.2% 2.992e+08 numa-vmstat.node0.numa_interleave
88219 � 57% +397.4% 438783 � 35% numa-vmstat.node1.nr_inactive_anon
1466007 � 37% +9598.9% 1.422e+08 numa-vmstat.node1.nr_unaccepted
6201 � 7% +5398.9% 341002 � 33% numa-vmstat.node1.nr_writeback_temp
88219 � 57% +397.4% 438783 � 35% numa-vmstat.node1.nr_zone_active_anon
843731 � 20% +33552.0% 2.839e+08 numa-vmstat.node1.numa_interleave
4.10 +93440.1% 3835 netperf.ThroughputBoth_Mbps
393.60 +93440.1% 368173 netperf.ThroughputBoth_total_Mbps
4.10 +93440.1% 3835 netperf.Throughput_Mbps
393.60 +93440.1% 368173 netperf.Throughput_total_Mbps
48.00 � 9% +1.5e+05% 71216 netperf.time.involuntary_context_switches
36976 +109.6% 77489 netperf.time.minor_page_faults
2.00 +89408.3% 1790 netperf.time.percent_of_cpu_this_job_got
2.65 � 5% +2e+05% 5407 netperf.time.system_time
70144 +75110.0% 52755811 netperf.time.voluntary_context_switches
69331 +76173.9% 52881525 netperf.workload
18597 +20.9% 22487 proc-vmstat.nr_anon_pages
206982 +196.9% 614442 � 3% proc-vmstat.nr_inactive_anon
891142 +45.2% 1294018 proc-vmstat.nr_mapped
130794 +2.6% 134152 proc-vmstat.nr_slab_reclaimable
2940843 +9808.2% 2.914e+08 proc-vmstat.nr_unaccepted
36043 +2.6% 36994 proc-vmstat.nr_unevictable
8116 +4963.7% 410990 � 5% proc-vmstat.nr_writeback_temp
206982 +196.9% 614442 � 3% proc-vmstat.nr_zone_active_anon
2758 � 12% +466.4% 15626 � 11% proc-vmstat.numa_hint_faults
3103 �183% +1123.1% 37957 � 15% proc-vmstat.numa_hint_faults_local
5180 � 88% +991.6% 56556 � 10% proc-vmstat.numa_huge_pte_updates
1746716 +33285.4% 5.831e+08 proc-vmstat.numa_interleave
3103 �183% +1123.1% 37957 � 15% proc-vmstat.numa_pages_migrated
22862693 +81149.0% 1.858e+10 proc-vmstat.pgalloc_dma32
962895 +11.6% 1074237 proc-vmstat.pglazyfree
42493 +28.3% 54507 proc-vmstat.pgrefill
22791848 +81398.7% 1.858e+10 proc-vmstat.pgskip_device
199829 +2.3% 204523 proc-vmstat.workingset_nodereclaim
8.77 � 2% -96.3% 0.32 perf-stat.i.MPKI
77235971 +7812.2% 6.111e+09 perf-stat.i.branch-instructions
1.93 -1.4 0.55 perf-stat.i.branch-miss-rate%
3411141 +880.6% 33448138 perf-stat.i.branch-misses
22.30 � 2% -21.6 0.71 perf-stat.i.cache-miss-rate%
1665598 � 2% +511.2% 10179755 perf-stat.i.cache-misses
7250815 +31692.2% 2.305e+09 perf-stat.i.cache-references
3208 +21832.1% 703722 perf-stat.i.context-switches
3.61 +37.5% 4.96 perf-stat.i.cpi
7.967e+08 +19662.7% 1.574e+11 perf-stat.i.cpu-cycles
268.09 +1572.7% 4484 perf-stat.i.cpu-migrations
470.08 +3392.1% 16415 perf-stat.i.cycles-between-cache-misses
3.771e+08 +8315.9% 3.173e+10 perf-stat.i.instructions
0.31 -33.5% 0.21 perf-stat.i.ipc
2789 +12.7% 3145 perf-stat.i.minor-faults
2789 +12.7% 3145 perf-stat.i.page-faults
4.42 � 2% -92.7% 0.32 perf-stat.overall.MPKI
4.42 -3.9 0.55 perf-stat.overall.branch-miss-rate%
22.97 � 2% -22.5 0.44 perf-stat.overall.cache-miss-rate%
2.11 +134.8% 4.96 perf-stat.overall.cpi
478.64 � 2% +3130.5% 15462 perf-stat.overall.cycles-between-cache-misses
0.47 -57.4% 0.20 perf-stat.overall.ipc
1638835 -88.9% 181352 perf-stat.overall.path-length
76999412 +7810.5% 6.091e+09 perf-stat.ps.branch-instructions
3401355 +880.2% 33339495 perf-stat.ps.branch-misses
1659790 � 2% +511.5% 10149201 perf-stat.ps.cache-misses
7226565 +31693.0% 2.298e+09 perf-stat.ps.cache-references
3197 +21832.0% 701377 perf-stat.ps.context-switches
7.941e+08 +19659.7% 1.569e+11 perf-stat.ps.cpu-cycles
267.21 +1572.9% 4470 perf-stat.ps.cpu-migrations
3.759e+08 +8313.8% 3.163e+10 perf-stat.ps.instructions
2780 +12.7% 3133 perf-stat.ps.minor-faults
2780 +12.7% 3133 perf-stat.ps.page-faults
1.136e+11 +8340.5% 9.59e+12 perf-stat.total.instructions
3740 � 12% +29693.1% 1114329 � 10% sched_debug.cfs_rq:/.avg_vruntime.avg
56542 � 15% +2339.5% 1379378 � 8% sched_debug.cfs_rq:/.avg_vruntime.max
369.53 � 16% +1.6e+05% 579756 � 20% sched_debug.cfs_rq:/.avg_vruntime.min
6898 � 20% +1820.7% 132511 � 26% sched_debug.cfs_rq:/.avg_vruntime.stddev
0.02 � 12% +1118.1% 0.22 � 6% sched_debug.cfs_rq:/.h_nr_queued.avg
0.13 � 6% +212.0% 0.40 sched_debug.cfs_rq:/.h_nr_queued.stddev
0.02 � 12% +1116.5% 0.22 � 5% sched_debug.cfs_rq:/.h_nr_runnable.avg
0.13 � 6% +211.4% 0.40 sched_debug.cfs_rq:/.h_nr_runnable.stddev
14.16 �132% +48472.6% 6875 � 21% sched_debug.cfs_rq:/.left_deadline.avg
2717 �132% +27785.8% 757891 � 19% sched_debug.cfs_rq:/.left_deadline.max
195.63 �132% +35354.2% 69359 � 15% sched_debug.cfs_rq:/.left_deadline.stddev
14.11 �133% +48627.1% 6874 � 21% sched_debug.cfs_rq:/.left_vruntime.avg
2708 �133% +27874.6% 757818 � 19% sched_debug.cfs_rq:/.left_vruntime.max
194.99 �133% +35466.9% 69352 � 15% sched_debug.cfs_rq:/.left_vruntime.stddev
618037 � 36% -66.7% 205834 � 48% sched_debug.cfs_rq:/.load.max
51379 � 30% -57.6% 21767 � 30% sched_debug.cfs_rq:/.load.stddev
687.50 � 9% -64.9% 241.44 � 24% sched_debug.cfs_rq:/.load_avg.max
83.99 � 6% -49.9% 42.10 � 29% sched_debug.cfs_rq:/.load_avg.stddev
3740 � 12% +29693.1% 1114329 � 10% sched_debug.cfs_rq:/.min_vruntime.avg
56542 � 15% +2339.5% 1379378 � 8% sched_debug.cfs_rq:/.min_vruntime.max
369.53 � 16% +1.6e+05% 579756 � 20% sched_debug.cfs_rq:/.min_vruntime.min
6899 � 20% +1820.7% 132511 � 26% sched_debug.cfs_rq:/.min_vruntime.stddev
0.02 � 13% +1109.9% 0.22 � 5% sched_debug.cfs_rq:/.nr_queued.avg
0.13 � 7% +210.9% 0.40 � 2% sched_debug.cfs_rq:/.nr_queued.stddev
14.12 �133% +48603.5% 6874 � 21% sched_debug.cfs_rq:/.right_vruntime.avg
2710 �133% +27861.0% 757818 � 19% sched_debug.cfs_rq:/.right_vruntime.max
195.09 �133% +35449.7% 69352 � 15% sched_debug.cfs_rq:/.right_vruntime.stddev
35.41 � 6% +493.0% 209.98 � 5% sched_debug.cfs_rq:/.runnable_avg.avg
685.83 � 4% +35.7% 930.48 � 5% sched_debug.cfs_rq:/.runnable_avg.max
83.58 � 4% +188.8% 241.42 � 2% sched_debug.cfs_rq:/.runnable_avg.stddev
35.30 � 6% +494.6% 209.91 � 5% sched_debug.cfs_rq:/.util_avg.avg
680.17 � 5% +36.8% 930.40 � 5% sched_debug.cfs_rq:/.util_avg.max
83.16 � 4% +190.3% 241.37 � 2% sched_debug.cfs_rq:/.util_avg.stddev
3.01 � 38% +3061.8% 95.09 � 7% sched_debug.cfs_rq:/.util_est.avg
249.27 � 31% +131.8% 577.82 � 2% sched_debug.cfs_rq:/.util_est.max
23.40 � 29% +671.1% 180.43 � 2% sched_debug.cfs_rq:/.util_est.stddev
968260 -56.6% 420088 � 9% sched_debug.cpu.avg_idle.avg
134682 � 51% -64.3% 48084 � 4% sched_debug.cpu.avg_idle.min
94988 � 6% +233.8% 317085 � 8% sched_debug.cpu.avg_idle.stddev
10.48 � 2% +16.1% 12.18 � 2% sched_debug.cpu.clock.stddev
526.86 +230.8% 1742 � 13% sched_debug.cpu.clock_task.stddev
67.14 � 12% +1549.7% 1107 � 5% sched_debug.cpu.curr->pid.avg
652.41 � 3% +205.6% 1993 sched_debug.cpu.curr->pid.stddev
0.00 � 4% +15.1% 0.00 � 5% sched_debug.cpu.next_balance.stddev
0.01 � 20% +1565.3% 0.22 � 5% sched_debug.cpu.nr_running.avg
0.10 � 9% +286.8% 0.40 sched_debug.cpu.nr_running.stddev
3400 � 5% +15458.0% 529068 � 8% sched_debug.cpu.nr_switches.avg
54421 � 22% +1031.5% 615757 � 7% sched_debug.cpu.nr_switches.max
1015 � 7% +26519.5% 270329 � 12% sched_debug.cpu.nr_switches.min
5199 � 22% +721.5% 42712 � 6% sched_debug.cpu.nr_switches.stddev
0.01 � 17% +60.3% 0.02 � 5% perf-sched.sch_delay.avg.ms.__cond_resched.__wait_for_common.affine_move_task.__set_cpus_allowed_ptr.__sched_setaffinity
0.02 � 17% -39.1% 0.01 � 17% perf-sched.sch_delay.avg.ms.__x64_sys_pause.do_syscall_64.entry_SYSCALL_64_after_hwframe.[unknown]
0.01 � 5% +31.4% 0.01 � 6% perf-sched.sch_delay.avg.ms.anon_pipe_read.fifo_pipe_read.vfs_read.ksys_read
0.04 � 75% -66.8% 0.01 � 13% perf-sched.sch_delay.avg.ms.do_nanosleep.hrtimer_nanosleep.common_nsleep.__x64_sys_clock_nanosleep
0.01 � 4% +30.9% 0.01 � 4% perf-sched.sch_delay.avg.ms.do_wait.kernel_wait4.do_syscall_64.entry_SYSCALL_64_after_hwframe
0.01 � 88% +375.6% 0.03 � 54% perf-sched.sch_delay.avg.ms.irqentry_exit_to_user_mode.asm_sysvec_apic_timer_interrupt.[unknown].[unknown]
0.02 � 13% -47.0% 0.01 � 20% perf-sched.sch_delay.avg.ms.schedule_hrtimeout_range_clock.ep_poll.do_epoll_wait.__x64_sys_epoll_wait
0.01 � 7% +38.7% 0.01 � 9% perf-sched.sch_delay.avg.ms.schedule_timeout.__wait_for_common.wait_for_completion_state.kernel_clone
0.02 � 4% -28.6% 0.01 � 6% perf-sched.sch_delay.avg.ms.schedule_timeout.kcompactd.kthread.ret_from_fork
0.21 � 62% -96.6% 0.01 � 5% perf-sched.sch_delay.avg.ms.schedule_timeout.sctp_skb_recv_datagram.sctp_recvmsg.inet_recvmsg
0.32 �138% -97.7% 0.01 � 10% perf-sched.sch_delay.avg.ms.schedule_timeout.sctp_wait_for_sndbuf.sctp_sendmsg_to_asoc.sctp_sendmsg
0.01 � 26% +334.9% 0.03 � 11% perf-sched.sch_delay.avg.ms.smpboot_thread_fn.kthread.ret_from_fork.ret_from_fork_asm
1.05 �217% -98.1% 0.02 � 6% perf-sched.sch_delay.avg.ms.worker_thread.kthread.ret_from_fork.ret_from_fork_asm
0.03 � 20% -54.7% 0.01 � 17% perf-sched.sch_delay.max.ms.__x64_sys_pause.do_syscall_64.entry_SYSCALL_64_after_hwframe.[unknown]
0.12 �147% -85.3% 0.02 � 11% perf-sched.sch_delay.max.ms.do_nanosleep.hrtimer_nanosleep.common_nsleep.__x64_sys_clock_nanosleep
0.02 � 9% +235.9% 0.07 �112% perf-sched.sch_delay.max.ms.do_wait.kernel_wait4.do_syscall_64.entry_SYSCALL_64_after_hwframe
0.03 � 41% +2.7e+05% 68.69 �222% perf-sched.sch_delay.max.ms.exit_to_user_mode_loop.do_syscall_64.entry_SYSCALL_64_after_hwframe.[unknown]
0.01 � 86% +1267.4% 0.10 � 65% perf-sched.sch_delay.max.ms.irqentry_exit_to_user_mode.asm_sysvec_apic_timer_interrupt.[unknown].[unknown]
0.04 � 6% -50.8% 0.02 � 22% perf-sched.sch_delay.max.ms.schedule_hrtimeout_range_clock.ep_poll.do_epoll_wait.__x64_sys_epoll_wait
0.01 � 10% +139.2% 0.03 � 61% perf-sched.sch_delay.max.ms.schedule_timeout.__wait_for_common.wait_for_completion_state.kernel_clone
0.03 � 22% -48.7% 0.02 � 3% perf-sched.sch_delay.max.ms.schedule_timeout.kcompactd.kthread.ret_from_fork
207.81 +150.3% 520.18 � 46% perf-sched.sch_delay.max.ms.schedule_timeout.sctp_skb_recv_datagram.sctp_recvmsg.inet_recvmsg
1.79 �118% +1020.4% 20.01 � 62% perf-sched.sch_delay.max.ms.smpboot_thread_fn.kthread.ret_from_fork.ret_from_fork_asm
0.16 �103% -95.3% 0.01 � 6% perf-sched.total_sch_delay.average.ms
252.56 -99.4% 1.56 � 2% perf-sched.total_wait_and_delay.average.ms
10166 +15987.4% 1635446 perf-sched.total_wait_and_delay.count.ms
4984 -15.6% 4204 � 7% perf-sched.total_wait_and_delay.max.ms
252.40 -99.4% 1.55 � 2% perf-sched.total_wait_time.average.ms
4984 -15.6% 4204 � 7% perf-sched.total_wait_time.max.ms
7.83 -55.1% 3.52 perf-sched.wait_and_delay.avg.ms.__cond_resched.__wait_for_common.affine_move_task.__set_cpus_allowed_ptr.__sched_setaffinity
184.60 � 4% +14.9% 212.10 perf-sched.wait_and_delay.avg.ms.anon_pipe_read.fifo_pipe_read.vfs_read.ksys_read
0.47 -100.0% 0.00 perf-sched.wait_and_delay.avg.ms.do_wait.kernel_wait4.do_syscall_64.entry_SYSCALL_64_after_hwframe
0.60 � 4% -100.0% 0.00 perf-sched.wait_and_delay.avg.ms.schedule_timeout.__wait_for_common.wait_for_completion_state.kernel_clone
199.50 -99.8% 0.43 � 3% perf-sched.wait_and_delay.avg.ms.schedule_timeout.sctp_skb_recv_datagram.sctp_recvmsg.inet_recvmsg
381.71 -99.9% 0.43 � 3% perf-sched.wait_and_delay.avg.ms.schedule_timeout.sctp_wait_for_sndbuf.sctp_sendmsg_to_asoc.sctp_sendmsg
604.00 -77.6% 135.41 � 4% perf-sched.wait_and_delay.avg.ms.smpboot_thread_fn.kthread.ret_from_fork.ret_from_fork_asm
797.02 � 3% -18.0% 653.44 perf-sched.wait_and_delay.avg.ms.worker_thread.kthread.ret_from_fork.ret_from_fork_asm
217.83 � 4% -13.4% 188.67 perf-sched.wait_and_delay.count.anon_pipe_read.fifo_pipe_read.vfs_read.ksys_read
126.33 -100.0% 0.00 perf-sched.wait_and_delay.count.do_wait.kernel_wait4.do_syscall_64.entry_SYSCALL_64_after_hwframe
88.17 -100.0% 0.00 perf-sched.wait_and_delay.count.schedule_timeout.__wait_for_common.wait_for_completion_state.kernel_clone
2310 +34913.6% 808931 perf-sched.wait_and_delay.count.schedule_timeout.sctp_skb_recv_datagram.sctp_recvmsg.inet_recvmsg
1157 +69710.6% 807941 perf-sched.wait_and_delay.count.schedule_timeout.sctp_wait_for_sndbuf.sctp_sendmsg_to_asoc.sctp_sendmsg
1600 +346.1% 7140 � 5% perf-sched.wait_and_delay.count.smpboot_thread_fn.kthread.ret_from_fork.ret_from_fork_asm
723.83 � 2% +60.2% 1159 perf-sched.wait_and_delay.count.worker_thread.kthread.ret_from_fork.ret_from_fork_asm
4984 -79.9% 1000 perf-sched.wait_and_delay.max.ms.__cond_resched.__wait_for_common.affine_move_task.__set_cpus_allowed_ptr.__sched_setaffinity
16.98 � 2% -100.0% 0.00 perf-sched.wait_and_delay.max.ms.do_wait.kernel_wait4.do_syscall_64.entry_SYSCALL_64_after_hwframe
2.23 � 6% -100.0% 0.00 perf-sched.wait_and_delay.max.ms.schedule_timeout.__wait_for_common.wait_for_completion_state.kernel_clone
209.37 +491.8% 1239 � 31% perf-sched.wait_and_delay.max.ms.schedule_timeout.sctp_skb_recv_datagram.sctp_recvmsg.inet_recvmsg
417.22 +155.0% 1063 perf-sched.wait_and_delay.max.ms.schedule_timeout.sctp_wait_for_sndbuf.sctp_sendmsg_to_asoc.sctp_sendmsg
4122 � 10% -35.0% 2679 � 17% perf-sched.wait_and_delay.max.ms.worker_thread.kthread.ret_from_fork.ret_from_fork_asm
7.81 -55.3% 3.49 perf-sched.wait_time.avg.ms.__cond_resched.__wait_for_common.affine_move_task.__set_cpus_allowed_ptr.__sched_setaffinity
184.59 � 4% +14.9% 212.09 perf-sched.wait_time.avg.ms.anon_pipe_read.fifo_pipe_read.vfs_read.ksys_read
0.46 +9.9% 0.51 perf-sched.wait_time.avg.ms.do_wait.kernel_wait4.do_syscall_64.entry_SYSCALL_64_after_hwframe
375.09 � 24% -99.7% 1.19 � 48% perf-sched.wait_time.avg.ms.exit_to_user_mode_loop.do_syscall_64.entry_SYSCALL_64_after_hwframe.[unknown]
4.04 +10.5% 4.47 � 3% perf-sched.wait_time.avg.ms.rcu_gp_kthread.kthread.ret_from_fork.ret_from_fork_asm
0.60 � 4% +11.2% 0.66 � 3% perf-sched.wait_time.avg.ms.schedule_timeout.__wait_for_common.wait_for_completion_state.kernel_clone
199.29 -99.8% 0.43 � 3% perf-sched.wait_time.avg.ms.schedule_timeout.sctp_skb_recv_datagram.sctp_recvmsg.inet_recvmsg
381.39 -99.9% 0.42 � 3% perf-sched.wait_time.avg.ms.schedule_timeout.sctp_wait_for_sndbuf.sctp_sendmsg_to_asoc.sctp_sendmsg
604.00 -77.6% 135.38 � 4% perf-sched.wait_time.avg.ms.smpboot_thread_fn.kthread.ret_from_fork.ret_from_fork_asm
795.97 � 3% -17.9% 653.42 perf-sched.wait_time.avg.ms.worker_thread.kthread.ret_from_fork.ret_from_fork_asm
4984 -79.9% 1000 perf-sched.wait_time.max.ms.__cond_resched.__wait_for_common.affine_move_task.__set_cpus_allowed_ptr.__sched_setaffinity
2.23 � 6% +21.9% 2.71 � 6% perf-sched.wait_time.max.ms.schedule_timeout.__wait_for_common.wait_for_completion_state.kernel_clone
209.31 +408.2% 1063 perf-sched.wait_time.max.ms.schedule_timeout.sctp_skb_recv_datagram.sctp_recvmsg.inet_recvmsg
417.20 +155.0% 1063 perf-sched.wait_time.max.ms.schedule_timeout.sctp_wait_for_sndbuf.sctp_sendmsg_to_asoc.sctp_sendmsg
4122 � 10% -35.0% 2679 � 17% perf-sched.wait_time.max.ms.worker_thread.kthread.ret_from_fork.ret_from_fork_asm
Disclaimer:
Results have been estimated based on internal Intel analysis and are provided
for informational purposes only. Any difference in system hardware or software
design or configuration may affect actual performance.
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Return-Path: <linux-kernel+bounces-673387-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 62C7641E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:45:45 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 6C6B1166C29
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:45:46 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id EA63029114B;
Wed, 4 Jun 2025 14:45:37 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="UEPhZLlt"
Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 69A2A32C85
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:45:35 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.42
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749048337; cv=none; b=GbUZtRhZg0rQQEn7TytHclKnUehSdwtofg9oyHTX0Uvp6z+Ext3vwYoYlFuQqwvviKXpOfF+vy0yuCtmmkGgrzNyr/iyuGPtvWKTTzB5w+AyNJ9mY195PQ20QpzySCH5XKGjmIPBdFUcHKZCN3UI5dhX48AXVD9rQnRw9m7JAUM=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749048337; c=relaxed/simple;
bh=hdC0g7jwLGrJCvbTClMyyCacsiNb5NFuarRxRMK7sn0=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=h9ajjdgBCj1lua56luFEaRhikTPAA4j28JaxKFvjf5TwXeBVmxwcqBN4PaFeOf9Pa4N+tjirmrmnsYEeVkPEusfz+9qoFNbXS+mL5dg06YB++NYg9lCVs54u9ROQl9jkrTAMkqeV3rH6jGFK5OUCOBoQKvGoCRulioNE5xDdJdo=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch; spf=none smtp.mailfrom=ffwll.ch; dkim=pass (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b=UEPhZLlt; arc=none smtp.client-ip=209.85.221.42
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch
Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=ffwll.ch
Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-3a36e090102so4036910f8f.2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 07:45:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=ffwll.ch; s=google; t=1749048334; x=1749653134; darn=vger.kernel.org;
h=in-reply-to:content-disposition:mime-version:references
:mail-followup-to:message-id:subject:cc:to:from:date:from:to:cc
:subject:date:message-id:reply-to;
bh=YVZ9LYN/PFsvpkJ55gMLUB/cURcAGit5abXdVlxI7co=;
b=UEPhZLlt/oKFBEqC5kWNwomUkx9CaGxcu08heeA2nMwnRbNDuyMB82zU9INp8XT/k6
AoxyUbYCd7cK95KOiEOqFXCPE4kqc8pNdnISk3wQMpjQhdJpg0UMO21qDKgyT5dwtAHZ
yB2btRx1Yl3anr80wIjng+ZmSHH1trBALrebw=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749048334; x=1749653134;
h=in-reply-to:content-disposition:mime-version:references
:mail-followup-to:message-id:subject:cc:to:from:date
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=YVZ9LYN/PFsvpkJ55gMLUB/cURcAGit5abXdVlxI7co=;
b=gdW3uWt1PtYcilXAlDPkCggrMpTJ/L5b0qmgACfqcHuOwcjzIyzlJKMXC7sbNoK8Aj
Zmu1aaEnpSbpXorYlGTa6mK6q6vowwYk/brL+UR0pfA8/hW251gwcEyiEOad5dk0BI7y
MiXPLomGlebGpJi+pathQatvrtJmfzvrgoaT0FHPW9DnJ0ZVfAOz0bgnmSrXLhgiwJWF
ESycK1/GrAhhTXtjQQIUij21QlgraKdytA+/9kxbjQbnxrQglxw218F655gWd66+JCB0
0jlt393fHQsLdKo3XwSTf0aISj7KSIdz18RF2+5p9IDv8yQGMUUsf++J293PPSp+tnHC
rz0g==
X-Forwarded-Encrypted: i=1; AJvYcCX2lESoEE15fCssrMyAAO5sy8a8B6kiT2GgiLChcv35fFUCKtCqR3A7yZN+nOrBwLw78MyC2YurqK62BuQ=@vger.kernel.org
X-Gm-Message-State: AOJu0Yz8Q7p7PIFgT6gxM92yKDq7EL9kt2vaaxKOZ9XPM0nffcJajpmx
si6zFqYcz5WZmgF9IVyWG/RBoNqTVqyB8j16ns6AOni8NVQl9435V7ClOtrYSng6k04=
X-Gm-Gg: ASbGnctQRWsH0fefuq8D+6dkGlsdxVzjM8d3qPgxlr0r35Sa7hZLlo5p0nnjL2p8iGh
UhBQBwcMewQ+waegzl9uT589Vy5gLEfo4OJLQ5Rg6jHL+wtnoR5aAWzha3ydwzEzg6YI2b1swQ4
vaeRczNh4sFENp8QysfU4UlCDpYQ7JHeDuOgUelHBbOtK2XioNNLJWgrPrl7br1hsB0GCWFm07i
jgHWe87cvpDb3eo7nuBg5GFFFkzhJ7qFLug9naXwp9BxY7Qrg9wdmP7LR1gCQSbO7i8sZucmVVS
2V26mPFWsFITFfSXdKSMTBdtaoXCmgk2iN/PIeLcAa4GzfMZYguI2oq0EjtiK7Q=
X-Google-Smtp-Source: AGHT+IGOzvFV9hOfQGxbhHGh03HLKuvLfdHp1XBpuXusZFIdQzjfviSfpxeGOApY5FswyTJYuDkYTg==
X-Received: by 2002:a05:6000:230c:b0:3a4:dcb0:a5f with SMTP id ffacd0b85a97d-3a51dbcd8fdmr2376750f8f.16.1749048333468;
Wed, 04 Jun 2025 07:45:33 -0700 (PDT)
Received: from phenom.ffwll.local ([2a02:168:57f4:0:5485:d4b2:c087:b497])
by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a4efe758besm22135589f8f.51.2025.06.04.07.45.32
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 07:45:32 -0700 (PDT)
Date: Wed, 4 Jun 2025 16:45:30 +0200
From: Simona Vetter <simona.vetter@xxxxxxxx>
To: Thomas Zimmermann <tzimmermann@xxxxxxx>
Cc: Michael Kelley <mhklinux@xxxxxxxxxxx>,
David Hildenbrand <david@xxxxxxxxxx>,
"simona@xxxxxxxx" <simona@xxxxxxxx>,
"deller@xxxxxx" <deller@xxxxxx>,
"haiyangz@xxxxxxxxxxxxx" <haiyangz@xxxxxxxxxxxxx>,
"kys@xxxxxxxxxxxxx" <kys@xxxxxxxxxxxxx>,
"wei.liu@xxxxxxxxxx" <wei.liu@xxxxxxxxxx>,
"decui@xxxxxxxxxxxxx" <decui@xxxxxxxxxxxxx>,
"akpm@xxxxxxxxxxxxxxxxxxxx" <akpm@xxxxxxxxxxxxxxxxxxxx>,
"weh@xxxxxxxxxxxxx" <weh@xxxxxxxxxxxxx>, "hch@xxxxxx" <hch@xxxxxx>,
"dri-devel@xxxxxxxxxxxxxxxxxxxxx" <dri-devel@xxxxxxxxxxxxxxxxxxxxx>,
"linux-fbdev@xxxxxxxxxxxxxxx" <linux-fbdev@xxxxxxxxxxxxxxx>,
"linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>,
"linux-hyperv@xxxxxxxxxxxxxxx" <linux-hyperv@xxxxxxxxxxxxxxx>,
"linux-mm@xxxxxxxxx" <linux-mm@xxxxxxxxx>
Subject: Re: [PATCH v3 3/4] fbdev/deferred-io: Support contiguous kernel
memory framebuffers
Message-ID: <aEBcCjMWZJgbsRas@phenom.ffwll.local>
Mail-Followup-To: Thomas Zimmermann <tzimmermann@xxxxxxx>,
Michael Kelley <mhklinux@xxxxxxxxxxx>,
David Hildenbrand <david@xxxxxxxxxx>,
"simona@xxxxxxxx" <simona@xxxxxxxx>,
"deller@xxxxxx" <deller@xxxxxx>,
"haiyangz@xxxxxxxxxxxxx" <haiyangz@xxxxxxxxxxxxx>,
"kys@xxxxxxxxxxxxx" <kys@xxxxxxxxxxxxx>,
"wei.liu@xxxxxxxxxx" <wei.liu@xxxxxxxxxx>,
"decui@xxxxxxxxxxxxx" <decui@xxxxxxxxxxxxx>,
"akpm@xxxxxxxxxxxxxxxxxxxx" <akpm@xxxxxxxxxxxxxxxxxxxx>,
"weh@xxxxxxxxxxxxx" <weh@xxxxxxxxxxxxx>, "hch@xxxxxx" <hch@xxxxxx>,
"dri-devel@xxxxxxxxxxxxxxxxxxxxx" <dri-devel@xxxxxxxxxxxxxxxxxxxxx>,
"linux-fbdev@xxxxxxxxxxxxxxx" <linux-fbdev@xxxxxxxxxxxxxxx>,
"linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>,
"linux-hyperv@xxxxxxxxxxxxxxx" <linux-hyperv@xxxxxxxxxxxxxxx>,
"linux-mm@xxxxxxxxx" <linux-mm@xxxxxxxxx>
References: <20250523161522.409504-1-mhklinux@xxxxxxxxxxx>
<20250523161522.409504-4-mhklinux@xxxxxxxxxxx>
<de0f2cb8-aed6-436f-b55e-d3f7b3fe6d81@xxxxxxxxxx>
<SN6PR02MB41573C075152ECD8428CAF5ED46DA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
<c0b91a50-d3e7-44f9-b9c5-9c3b29639428@xxxxxxx>
<SN6PR02MB4157871127ED95AD24EDF96DD46DA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
<9a93813c-4d7c-45ef-b5a2-0ad37e7a078a@xxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <9a93813c-4d7c-45ef-b5a2-0ad37e7a078a@xxxxxxx>
X-Operating-System: Linux phenom 6.12.25-amd64
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 10:12:45AM +0200, Thomas Zimmermann wrote:
Hi
Am 03.06.25 um 19:50 schrieb Michael Kelley:
> From: Thomas Zimmermann <tzimmermann@xxxxxxx> Sent: Monday, June 2, 2025 11:25 PM
> > Hi
> >
> > Am 03.06.25 um 03:49 schrieb Michael Kelley:
> > [...]
> > > > Will the VMA have VM_PFNMAP or VM_MIXEDMAP set? PFN_SPECIAL is a
> > > > horrible hack.
> > > >
> > > > In another thread, you mention that you use PFN_SPECIAL to bypass the
> > > > check in vm_mixed_ok(), so VM_MIXEDMAP is likely not set?
> > > The VMA has VM_PFNMAP set, not VM_MIXEDMAP. It seemed like
> > > VM_MIXEDMAP is somewhat of a superset of VM_PFNMAP, but maybe that's
> > > a wrong impression. vm_mixed_ok() does a thorough job of validating the
> > > use of __vm_insert_mixed(), and since what I did was allowed, I thought
> > > perhaps it was OK. Your feedback has set me straight, and that's what I
> > > needed. :-)
> > >
> > > But the whole approach is moot with Alistair Popple's patch set that
> > > eliminates pfn_t. Is there an existing mm API that will do mkwrite on a
> > > special PTE in a VM_PFNMAP VMA? I didn't see one, but maybe I missed
> > > it. If there's not one, I'll take a crack at adding it in the next version of my
> > > patch set.
> > What is the motivation behind this work? The driver or fbdev as a whole
> > does not have much of a future anyway.
> >
> > I'd like to suggest removing hyperv_fb entirely in favor of hypervdrm?
> >
> Yes, I think that's the longer term direction. A couple months ago I had an
> email conversation with Saurabh Sengar from the Microsoft Linux team where
> he raised this idea. I think the Microsoft folks will need to drive the deprecation
> process, as they need to coordinate with the distro vendors who publish
> images for running on local Hyper-V and in the Azure cloud. And my
> understanding is that the Linux kernel process would want the driver to
> be available but marked "deprecated" for a year or so before it actually
> goes away.
We (DRM upstream) recently considered moving some fbdev drivers to
drivers/staging or marking them with !DRM if a DRM driver is available.
Hyverv_fb would be a candidate.
At least at SUSE, we ship hypervdrm instead of hyperv_fb. This works well on
the various generations of the hyperv system. Much of our userspace would
not be able to use hyperv_fb anyway.
Yeah investing into fbdev drivers, especially when some mm surgery seems
needed, does not sound like a good idea to me overall.
> I do have some concerns about the maturity of the hyperv_drm driver
> "around the edges". For example, somebody just recently submitted a
> patch to flush output on panic. I have less familiarity hyperv_drm vs.
> hyperv_fb, so some of my concern is probably due to that. We might
> need to do review of hyperv_drm and see if there's anything else to
> deal with before hyperv_fb goes away.
The panic output is a feature that we recently added to the kernel. It
allows a DRM driver to display a final error message in the case of a kernel
panic (think of blue screens on Windows). Drivers require a minimum of
support to make it work. That's what the hypervdrm patches were about.
I'm also happy to help with any other issues and shortfalls of drm vs
fbdev. There are some, but I thought it was mostly around some of the low
bit color formats that really old devices want, and not anything that
hyperv would need.
Cheers, Sima
Best regards
Thomas
>
> This all got started when I was looking at a problem with hyperv_fb,
> and I found several other related problems, some of which also existed
> in hyperv_drm. You've seen several small'ish fixes from me and Saurabh
> as a result, and this issue with mmap()'ing /dev/fb0 is the last one of that
> set. This fix is definitely a bit bigger, but it's the right fix. On the flip side,
> if we really get on a path to deprecate hyperv_fb, there are hack fixes for
> the mmap problem that are smaller and contained to hyperv_fb. I would
> be OK with a hack fix in that case.
>
> Michael
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
--
Simona Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
Return-Path: <linux-kernel+bounces-673389-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id A1B5441E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:46:18 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id BDAAB3A7E7B
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:45:56 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 3F8CE29189F;
Wed, 4 Jun 2025 14:45:50 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ilomGt0v"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7752F28ECF0;
Wed, 4 Jun 2025 14:45:49 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749048349; cv=none; b=Gy25B95cz44VH/YZOPS0iL6e5S0dlJuuAYm6Gs1noT2dFkcq8hWQh0h2Xo7RHvxBBfDe6cWYTyqk5ad5ZyY1BiVtHbMrI1FLXqXFT1SdLwZRgbRVnNHaL2L7M4vYgQzs2w+GRjbu0Z9KBmp1gp1PI7WPCCb0ZBdMWoqOZw7jNW8=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749048349; c=relaxed/simple;
bh=BgxRJHC6oF+kTQhHO5k63lZHrNXK0+LyXcoaTmPrZAw=;
h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version; b=DClt9UkFyOfdhwZvsWTHua1P+MmFlFXo+SPaitcQxfm3ym7d3aUtJ6pk3W5Fe8bMEXnRbZlxHFjwg+iaknrK7zRNnyWOP4rf190XB0cpNdXcH79e1XoOICaXd6IN3sXNErhB2M46/L9VlkyRhztZo+WFtMqv4gob0iLLcAHy4aU=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ilomGt0v; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 36462C4AF0B;
Wed, 4 Jun 2025 14:45:49 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749048349;
bh=BgxRJHC6oF+kTQhHO5k63lZHrNXK0+LyXcoaTmPrZAw=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=ilomGt0vO7G0ZKfNt9shwPqg1z2eu3gj4KxKipyJrApnoMZAXv8SbnhdgQisKqfDV
4eI2vhV8dwVK8/7vx5GcikdI4DFHVV9wHsca+7pypVYjXQ7jqXVDLHjK0mRJ6noK+B
p8Mg5/eT4uc3Xvxeq24S8rvwdBgn1OGRUzi2ldq4ILg+ZztsvrIvz42FQCDQM+mHG7
QQUSixi7xWA8KfhS0c/lP6vjmaJOyApxOtZFGkO7lQAWN9hIEP7lJzagKMopW/wYjQ
ripE/n4T/QHD2yFpDvkBN4fjedDsilTX6dOpRy/wqmJBzqjl4EzsEFfqFmMt89pPvw
EnmGNbvtXumNw==
Received: from johan by xi.lan with local (Exim 4.97.1)
(envelope-from <johan+linaro@xxxxxxxxxx>)
id 1uMpND-000000007Od-1Vqg;
Wed, 04 Jun 2025 16:45:47 +0200
From: Johan Hovold <johan+linaro@xxxxxxxxxx>
To: Jeff Johnson <jjohnson@xxxxxxxxxx>
Cc: Miaoqing Pan <quic_miaoqing@xxxxxxxxxxx>,
Remi Pommarel <repk@xxxxxxxxxxxx>,
Baochen Qiang <quic_bqiang@xxxxxxxxxxx>,
linux-wireless@xxxxxxxxxxxxxxx,
ath12k@xxxxxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx,
Johan Hovold <johan+linaro@xxxxxxxxxx>,
stable@xxxxxxxxxxxxxxx
Subject: [PATCH v2 3/4] wifi: ath12k: fix source ring-buffer corruption
Date: Wed, 4 Jun 2025 16:45:08 +0200
Message-ID: <20250604144509.28374-4-johan+linaro@xxxxxxxxxx>
X-Mailer: git-send-email 2.49.0
In-Reply-To: <20250604144509.28374-1-johan+linaro@xxxxxxxxxx>
References: <20250604144509.28374-1-johan+linaro@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Add the missing memory barrier to make sure that LMAC source ring
descriptors are written before updating the head pointer to avoid
passing stale data to the firmware on weakly ordered architectures like
aarch64.
Note that non-LMAC rings use MMIO write accessors which have the
required write memory barrier.
Tested-on: WCN7850 hw2.0 WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices")
Cc: stable@xxxxxxxxxxxxxxx # 6.3
Signed-off-by: Johan Hovold <johan+linaro@xxxxxxxxxx>
---
drivers/net/wireless/ath/ath12k/hal.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath12k/hal.c b/drivers/net/wireless/ath/ath12k/hal.c
index 8615578bb802..1e2d13cc2d19 100644
--- a/drivers/net/wireless/ath/ath12k/hal.c
+++ b/drivers/net/wireless/ath/ath12k/hal.c
@@ -2161,7 +2161,11 @@ void ath12k_hal_srng_access_end(struct ath12k_base *ab, struct hal_srng *srng)
if (srng->ring_dir == HAL_SRNG_DIR_SRC) {
srng->u.src_ring.last_tp =
*(volatile u32 *)srng->u.src_ring.tp_addr;
- *srng->u.src_ring.hp_addr = srng->u.src_ring.hp;
+ /* Make sure descriptor is written before updating the
+ * head pointer.
+ */
+ dma_wmb();
+ WRITE_ONCE(*srng->u.src_ring.hp_addr, srng->u.src_ring.hp);
} else {
srng->u.dst_ring.last_hp = *srng->u.dst_ring.hp_addr;
*srng->u.dst_ring.tp_addr = srng->u.dst_ring.tp;
@@ -2170,6 +2174,10 @@ void ath12k_hal_srng_access_end(struct ath12k_base *ab, struct hal_srng *srng)
if (srng->ring_dir == HAL_SRNG_DIR_SRC) {
srng->u.src_ring.last_tp =
*(volatile u32 *)srng->u.src_ring.tp_addr;
+ /* Assume implementation use an MMIO write accessor
+ * which has the required wmb() so that the descriptor
+ * is written before the updating the head pointer.
+ */
ath12k_hif_write32(ab,
(unsigned long)srng->u.src_ring.hp_addr -
(unsigned long)ab->mem,
--
2.49.0
Return-Path: <linux-kernel+bounces-673388-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 5433641E003FB
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:46:19 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 59888188BD2E
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:46:30 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 332BB291898;
Wed, 4 Jun 2025 14:45:50 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bHv8Tzxa"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5DFDF32C85;
Wed, 4 Jun 2025 14:45:49 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749048349; cv=none; b=T03IIDVE1Pd1yhydhlCSWGJI9J5mnl5UcQe/YhAqcAYFnV7DnjtOEaG3Yz0Dh9iS6nmYePx5AJ15X/VVNQPtvqKI3yjCvpK0r5J1/M8Y+gBGNBt4f9QVXw8q4AyX3dR4wHKQtOKPfsQutHrC45zZoWZlQki7i/CSeJUXLMnMfNk=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749048349; c=relaxed/simple;
bh=AahTbiL0j1lHqgp6tMq8JeHQ5K8h8e6zfnJJYbWsUc0=;
h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version; b=fcEMHvQ5TgjxBkZhS/41HSjePhOpBYtZ66UgPhso+GvDvmcVl7YaEIW1GBetKLXz9Wn9PdQsnuf4kaID6vOzW2b2rUwcvoUBBE4L89+7v1vwJWM0XcWuxNwZNlfQpvXbRXrG35D69oYa93HXFVG8uQaj7dGtivTMm2+fpKQrzc8=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bHv8Tzxa; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1E2ABC4CEF1;
Wed, 4 Jun 2025 14:45:49 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749048349;
bh=AahTbiL0j1lHqgp6tMq8JeHQ5K8h8e6zfnJJYbWsUc0=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=bHv8TzxaZHukiEWdht1QcuRlHO9xmK/M+5GLLPyEstC2Ehyn++Usz8tx2FV+mpjG2
pXjvObsHHKorU8W6CbN1kGvZUi1Z+7Ca+bqSJQBBF+ZuvwwgexQhA9wi/zoSn1Fq8l
Nw12m1EGo6aFwPdBtLI7LaAiPafjAgw6ihZo38dYkyH4aI3JjO2cseTSyDE3vujzBY
nK+s0LzaLKlEmdqBPKpsGp+8sgySANx3/FEhDOmslVL6MLYTR78ymUNI6IA57rTDXs
0sGtzvH5Ih1CroG5x+HEZUu5peIjVsE7P/i0C8XXeREs/rGW5etxoFbTHOdXkwNyWy
VRqWXddF2Qbbg==
Received: from johan by xi.lan with local (Exim 4.97.1)
(envelope-from <johan+linaro@xxxxxxxxxx>)
id 1uMpND-000000007OY-0oJh;
Wed, 04 Jun 2025 16:45:47 +0200
From: Johan Hovold <johan+linaro@xxxxxxxxxx>
To: Jeff Johnson <jjohnson@xxxxxxxxxx>
Cc: Miaoqing Pan <quic_miaoqing@xxxxxxxxxxx>,
Remi Pommarel <repk@xxxxxxxxxxxx>,
Baochen Qiang <quic_bqiang@xxxxxxxxxxx>,
linux-wireless@xxxxxxxxxxxxxxx,
ath12k@xxxxxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx,
Johan Hovold <johan+linaro@xxxxxxxxxx>,
stable@xxxxxxxxxxxxxxx
Subject: [PATCH v2 1/4] wifi: ath12k: fix dest ring-buffer corruption
Date: Wed, 4 Jun 2025 16:45:06 +0200
Message-ID: <20250604144509.28374-2-johan+linaro@xxxxxxxxxx>
X-Mailer: git-send-email 2.49.0
In-Reply-To: <20250604144509.28374-1-johan+linaro@xxxxxxxxxx>
References: <20250604144509.28374-1-johan+linaro@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Add the missing memory barrier to make sure that destination ring
descriptors are read after the head pointers to avoid using stale data
on weakly ordered architectures like aarch64.
The barrier is added to the ath12k_hal_srng_access_begin() helper for
symmetry with follow-on fixes for source ring buffer corruption which
will add barriers to ath12k_hal_srng_access_end().
Note that this may fix the empty descriptor issue recently worked around
by commit 51ad34a47e9f ("wifi: ath12k: Add drop descriptor handling for
monitor ring").
Tested-on: WCN7850 hw2.0 WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices")
Cc: stable@xxxxxxxxxxxxxxx # 6.3
Signed-off-by: Johan Hovold <johan+linaro@xxxxxxxxxx>
---
drivers/net/wireless/ath/ath12k/ce.c | 3 ---
drivers/net/wireless/ath/ath12k/hal.c | 17 ++++++++++++++---
2 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/ce.c b/drivers/net/wireless/ath/ath12k/ce.c
index 740586fe49d1..b66d23d6b2bd 100644
--- a/drivers/net/wireless/ath/ath12k/ce.c
+++ b/drivers/net/wireless/ath/ath12k/ce.c
@@ -343,9 +343,6 @@ static int ath12k_ce_completed_recv_next(struct ath12k_ce_pipe *pipe,
goto err;
}
- /* Make sure descriptor is read after the head pointer. */
- dma_rmb();
-
*nbytes = ath12k_hal_ce_dst_status_get_length(desc);
*skb = pipe->dest_ring->skb[sw_index];
diff --git a/drivers/net/wireless/ath/ath12k/hal.c b/drivers/net/wireless/ath/ath12k/hal.c
index 91d5126ca149..9eea13ed5565 100644
--- a/drivers/net/wireless/ath/ath12k/hal.c
+++ b/drivers/net/wireless/ath/ath12k/hal.c
@@ -2126,13 +2126,24 @@ void *ath12k_hal_srng_src_get_next_reaped(struct ath12k_base *ab,
void ath12k_hal_srng_access_begin(struct ath12k_base *ab, struct hal_srng *srng)
{
+ u32 hp;
+
lockdep_assert_held(&srng->lock);
- if (srng->ring_dir == HAL_SRNG_DIR_SRC)
+ if (srng->ring_dir == HAL_SRNG_DIR_SRC) {
srng->u.src_ring.cached_tp =
*(volatile u32 *)srng->u.src_ring.tp_addr;
- else
- srng->u.dst_ring.cached_hp = READ_ONCE(*srng->u.dst_ring.hp_addr);
+ } else {
+ hp = READ_ONCE(*srng->u.dst_ring.hp_addr);
+
+ if (hp != srng->u.dst_ring.cached_hp) {
+ srng->u.dst_ring.cached_hp = hp;
+ /* Make sure descriptor is read after the head
+ * pointer.
+ */
+ dma_rmb();
+ }
+ }
}
/* Update cached ring head/tail pointers to HW. ath12k_hal_srng_access_begin()
--
2.49.0
Return-Path: <linux-kernel+bounces-673390-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 6293A41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:46:21 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 9DA1B16AAC5
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:46:20 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 49AB52918C3;
Wed, 4 Jun 2025 14:45:50 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lPpZExvU"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8177228F51B;
Wed, 4 Jun 2025 14:45:49 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749048349; cv=none; b=jnNlG+dgR80RHmJHASYyLaN78M+f0EKDXRWdHuZ1+n4ivseVqLBgws+sduaCfX2sa+wZOPRCu0pJaI6Bd7XZYtLfuTdQNOsrUELiQhZwFPutpuqizNoRXU9RXO8wf6DUPHOYgzfbV7s8joSKYAvixGQCDHbUWcej+dP9s4TThGY=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749048349; c=relaxed/simple;
bh=y9HygGfhYvQ4+bq3qESNXQX/H9b1zgxy9prCNKq4TX4=;
h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version; b=IpNYrHnbp2VTl/EH4vWaFWosPm76l9b75Z4wiKsoYh70D1TH2witewKTx9xLRMePcqAVzW+F5QIeO14b2y+itQ20X33xj61CtWzDmR2ZxKYTm/MxjcalydzTJYztx1zL7xUl09eI7GzCcgFlNRwZxU6LOPBJ/4ibuBNNwRJ7Xy0=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lPpZExvU; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1CC2FC4AF09;
Wed, 4 Jun 2025 14:45:49 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749048349;
bh=y9HygGfhYvQ4+bq3qESNXQX/H9b1zgxy9prCNKq4TX4=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=lPpZExvUaF9XWORXR5+H4kYbKMlp+Y50XA50lzLec3PlOtXC82GB9RDeYBgpvzW95
djGdlXdHZNz1qHAkRPmLpKSjbfegSpqZUdzytcZFQBiFERWt/rl+N7D8ziivuqpuZm
mWigyDPy7k1Kt5eIdvobRbb0o8V9wBeI/JFGgYQjfkUekVtGJS2pMMtMz/FGdG+f/j
qidmwuHJXXXQe5sRXyXQ/FX0u/3dCgUva2EIliy3FdYgaR7xMBR42BMlfi4fFXsjC5
W95dApUrxlqtIWHi6h3oJo1qVYs9nibizMWPjH2z1SWxBgchzNunZs6/kdMeSRL3qC
8EPZUv1AK1itA==
Received: from johan by xi.lan with local (Exim 4.97.1)
(envelope-from <johan+linaro@xxxxxxxxxx>)
id 1uMpND-000000007Oa-1Apm;
Wed, 04 Jun 2025 16:45:47 +0200
From: Johan Hovold <johan+linaro@xxxxxxxxxx>
To: Jeff Johnson <jjohnson@xxxxxxxxxx>
Cc: Miaoqing Pan <quic_miaoqing@xxxxxxxxxxx>,
Remi Pommarel <repk@xxxxxxxxxxxx>,
Baochen Qiang <quic_bqiang@xxxxxxxxxxx>,
linux-wireless@xxxxxxxxxxxxxxx,
ath12k@xxxxxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx,
Johan Hovold <johan+linaro@xxxxxxxxxx>
Subject: [PATCH v2 2/4] wifi: ath12k: use plain access for descriptor length
Date: Wed, 4 Jun 2025 16:45:07 +0200
Message-ID: <20250604144509.28374-3-johan+linaro@xxxxxxxxxx>
X-Mailer: git-send-email 2.49.0
In-Reply-To: <20250604144509.28374-1-johan+linaro@xxxxxxxxxx>
References: <20250604144509.28374-1-johan+linaro@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
The read memory barrier added by commit 6b67d2cf14ea ("wifi: ath12k: fix
ring-buffer corruption") is enough to guarantee ordering also for plain
descriptor accesses if the length helper is ever inlined so drop the
unnecessary READ_ONCE().
Tested-on: WCN7850 hw2.0 WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
Signed-off-by: Johan Hovold <johan+linaro@xxxxxxxxxx>
---
drivers/net/wireless/ath/ath12k/hal.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath12k/hal.c b/drivers/net/wireless/ath/ath12k/hal.c
index 9eea13ed5565..8615578bb802 100644
--- a/drivers/net/wireless/ath/ath12k/hal.c
+++ b/drivers/net/wireless/ath/ath12k/hal.c
@@ -1962,7 +1962,7 @@ u32 ath12k_hal_ce_dst_status_get_length(struct hal_ce_srng_dst_status_desc *desc
{
u32 len;
- len = le32_get_bits(READ_ONCE(desc->flags), HAL_CE_DST_STATUS_DESC_FLAGS_LEN);
+ len = le32_get_bits(desc->flags, HAL_CE_DST_STATUS_DESC_FLAGS_LEN);
desc->flags &= ~cpu_to_le32(HAL_CE_DST_STATUS_DESC_FLAGS_LEN);
return len;
--
2.49.0
Return-Path: <linux-kernel+bounces-673391-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 972E841E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:46:24 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 1ED2B7AA003
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:45:04 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 53FF72918C7;
Wed, 4 Jun 2025 14:45:50 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ME07JsVZ"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 83CDD28FFF6;
Wed, 4 Jun 2025 14:45:49 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749048349; cv=none; b=KDDPxHQIQtspMYdmFepb3uNbpXGWt1BWu8W+qdm8x0Is+mTAhkJKmgZ6ZSSDiEggp2HkpCRxMJtHYF5qAhi6zxj58ch25t1f+Nm0oR7e5jC65YZxNPh6bJhxkkuU6rjEzaqYEPqpU8jBkI1X7gHCEYDcun9RPPscs5Arv3w4SEE=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749048349; c=relaxed/simple;
bh=jCU35/+TKbgORi0NUC6EDs8hyiwRSH9wrJqZBXO2lXQ=;
h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=DoputN3cuMYQsL5TtLE7LckgkANTjut1hutQFPQVXrePM1ZIwzw9aTC6+9489c5B15RFJYJCrPyMf45in9gxlN+G0z6Igx06juA+VqiG/14KGFPa5vJp015j73bbjlIF1SilvKbLSLm6ZUoxKa6W3WNK1oIaiz+FUOE6tVli5Ic=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ME07JsVZ; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id F2613C4CEE4;
Wed, 4 Jun 2025 14:45:48 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749048349;
bh=jCU35/+TKbgORi0NUC6EDs8hyiwRSH9wrJqZBXO2lXQ=;
h=From:To:Cc:Subject:Date:From;
b=ME07JsVZauyPsfZRf0dc2C5+jipj5QEb0AEbo4ebssUeyozBPuIZ26dsuDXfrpSbv
upkSTYbg/vZgtCNKKIaD/LXk2uavHjrlr1I71jtS25PqwwLFl+UQCbmdD0WTz0xaRf
kpcL+LjZ/3gviyZlZ+ObZCzuw8dyf93j0MAoQBC2OmcxPb+ggO5ZIEybIsjW0icQLJ
0qLexdjRIQtMctYefE3eg9HPQQnm0S5Eglo9pTWGXGcnkP0l2j/TytMjoEqh5cAyTC
6sxxoVf7owE6AP5ZUTciG6QnopTooUIK54ElNbwsP8kcmqTqOCK9u9ZJz+jDhIr5HE
szAhc+7ff5OGw==
Received: from johan by xi.lan with local (Exim 4.97.1)
(envelope-from <johan+linaro@xxxxxxxxxx>)
id 1uMpNC-000000007OW-1iOK;
Wed, 04 Jun 2025 16:45:47 +0200
From: Johan Hovold <johan+linaro@xxxxxxxxxx>
To: Jeff Johnson <jjohnson@xxxxxxxxxx>
Cc: Miaoqing Pan <quic_miaoqing@xxxxxxxxxxx>,
Remi Pommarel <repk@xxxxxxxxxxxx>,
Baochen Qiang <quic_bqiang@xxxxxxxxxxx>,
linux-wireless@xxxxxxxxxxxxxxx,
ath12k@xxxxxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx,
Johan Hovold <johan+linaro@xxxxxxxxxx>
Subject: [PATCH v2 0/4] wifi: ath12k: fix dest ring-buffer corruption
Date: Wed, 4 Jun 2025 16:45:05 +0200
Message-ID: <20250604144509.28374-1-johan+linaro@xxxxxxxxxx>
X-Mailer: git-send-email 2.49.0
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
As a follow up to commit:
b67d2cf14ea ("wifi: ath12k: fix ring-buffer corruption")
add the remaining missing memory barriers to make sure that destination
ring descriptors are read after the head pointers to avoid using stale
data on weakly ordered architectures like aarch64.
Also switch back to plain accesses for the descriptor fields which is
sufficient after the memory barrier.
New in v2 are two patches that add the missing barriers also for source
rings and when updating the tail pointer for destination rings.
To avoid leaking ring details from the "hal" (lmac or non-lmac), the
barriers are added to the ath12k_hal_srng_access_end() helper. For
symmetry I therefore moved also the dest ring barriers into
ath12k_hal_srng_access_begin() and made the barrier conditional.
[ Due to this change I did not add Miaoqing's reviewed-by tag. ]
Johan
Changes in v2:
- add tested-on tags to plain access patch
- move destination barriers into begin helper
- fix source ring corruption (new patch)
- fix dest ring corruption when ring is full (new patch)
Johan Hovold (4):
wifi: ath12k: fix dest ring-buffer corruption
wifi: ath12k: use plain access for descriptor length
wifi: ath12k: fix source ring-buffer corruption
wifi: ath12k: fix dest ring-buffer corruption when ring is full
drivers/net/wireless/ath/ath12k/ce.c | 3 --
drivers/net/wireless/ath/ath12k/hal.c | 40 ++++++++++++++++++++++-----
2 files changed, 33 insertions(+), 10 deletions(-)
--
2.49.0
Return-Path: <linux-kernel+bounces-673392-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 2E69F41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:46:33 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 1275E16A55A
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:46:33 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 9D2222918EA;
Wed, 4 Jun 2025 14:45:50 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="IkrLm8Ky"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id C1FD529186E;
Wed, 4 Jun 2025 14:45:49 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749048349; cv=none; b=VSCdfsVtOgtcWJfpwedXX1mkRFf6/D8PUaV++nCva93RmLW91MgFFFz4ByopT1TnW7nB0Z6McJr/EhqEwrv3DO8S0G7/LAM/oGFSDfdWZBY421UmMBxdlqehyxOQFehsYTaPJ4KSgxD03+nZGRU2MfWB7uNko8EmpQbHaTPfUvk=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749048349; c=relaxed/simple;
bh=w++DUul6WcS0rSeeNY1gMqZO7ksu6qS8oACYN9qdE9g=;
h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version; b=JwiYjGMqfFCHi9ypkQnQEcpaLO4yXnA5RhPRpwLlHzwHY7erut5oVt8hG+HF6WQbeKXpbv0JNgGbpgpvQq8UwqF/7kXxPMrDA3WDsmpjDXgxX2zSqF/PQNow2ltBGqqh7xzAKWqAAgFfj+Tz5C/MQtQmjlaaG/xlmnQLJwY7yrg=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=IkrLm8Ky; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5051CC4CEF2;
Wed, 4 Jun 2025 14:45:49 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749048349;
bh=w++DUul6WcS0rSeeNY1gMqZO7ksu6qS8oACYN9qdE9g=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=IkrLm8KyEgBIdcnPkUh6cZBTFEjtbBHQX++sOEqB/pzXthf3AHJqb/zAXTT8E/Lgd
pI8TfaFYm3T8ElVMgZ+DWjX87LuF0790VA9kIVn3+e8RtTP4zIl0jtjkd03W5jWIEB
ikt5zblFvelL8rd8/sBkuOitWX/M4BN5nLHA5Z8y3ep1RKTiG3GihM54cF/6FSdpRG
ugPZbiMhztgLJJnqY6WlD2rimfEAQqGwDOpQk3ucXncIcrtprdkqFaeLQwi9a4Z0Q5
zBiyfpShGcoreRT+lkGwjIkn6gGTZ2Ila/eL8apzfzrsZWmsO7AojJMPd0KTyUf6l9
6071CGX5zPpLw==
Received: from johan by xi.lan with local (Exim 4.97.1)
(envelope-from <johan+linaro@xxxxxxxxxx>)
id 1uMpND-000000007Of-1tJZ;
Wed, 04 Jun 2025 16:45:47 +0200
From: Johan Hovold <johan+linaro@xxxxxxxxxx>
To: Jeff Johnson <jjohnson@xxxxxxxxxx>
Cc: Miaoqing Pan <quic_miaoqing@xxxxxxxxxxx>,
Remi Pommarel <repk@xxxxxxxxxxxx>,
Baochen Qiang <quic_bqiang@xxxxxxxxxxx>,
linux-wireless@xxxxxxxxxxxxxxx,
ath12k@xxxxxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx,
Johan Hovold <johan+linaro@xxxxxxxxxx>,
stable@xxxxxxxxxxxxxxx
Subject: [PATCH v2 4/4] wifi: ath12k: fix dest ring-buffer corruption when ring is full
Date: Wed, 4 Jun 2025 16:45:09 +0200
Message-ID: <20250604144509.28374-5-johan+linaro@xxxxxxxxxx>
X-Mailer: git-send-email 2.49.0
In-Reply-To: <20250604144509.28374-1-johan+linaro@xxxxxxxxxx>
References: <20250604144509.28374-1-johan+linaro@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Add the missing memory barriers to make sure that destination ring
descriptors are read before updating the tail pointer (and passing
ownership to the device) to avoid memory corruption on weakly ordered
architectures like aarch64 when the ring is full.
Tested-on: WCN7850 hw2.0 WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3
Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices")
Cc: stable@xxxxxxxxxxxxxxx # 6.3
Signed-off-by: Johan Hovold <johan+linaro@xxxxxxxxxx>
---
drivers/net/wireless/ath/ath12k/hal.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath12k/hal.c b/drivers/net/wireless/ath/ath12k/hal.c
index 1e2d13cc2d19..4da354e86a75 100644
--- a/drivers/net/wireless/ath/ath12k/hal.c
+++ b/drivers/net/wireless/ath/ath12k/hal.c
@@ -2153,7 +2153,6 @@ void ath12k_hal_srng_access_end(struct ath12k_base *ab, struct hal_srng *srng)
{
lockdep_assert_held(&srng->lock);
- /* TODO: See if we need a write memory barrier here */
if (srng->flags & HAL_SRNG_FLAGS_LMAC_RING) {
/* For LMAC rings, ring pointer updates are done through FW and
* hence written to a shared memory location that is read by FW
@@ -2168,7 +2167,11 @@ void ath12k_hal_srng_access_end(struct ath12k_base *ab, struct hal_srng *srng)
WRITE_ONCE(*srng->u.src_ring.hp_addr, srng->u.src_ring.hp);
} else {
srng->u.dst_ring.last_hp = *srng->u.dst_ring.hp_addr;
- *srng->u.dst_ring.tp_addr = srng->u.dst_ring.tp;
+ /* Make sure descriptor is read before updating the
+ * tail pointer.
+ */
+ dma_mb();
+ WRITE_ONCE(*srng->u.dst_ring.tp_addr, srng->u.dst_ring.tp);
}
} else {
if (srng->ring_dir == HAL_SRNG_DIR_SRC) {
@@ -2184,6 +2187,10 @@ void ath12k_hal_srng_access_end(struct ath12k_base *ab, struct hal_srng *srng)
srng->u.src_ring.hp);
} else {
srng->u.dst_ring.last_hp = *srng->u.dst_ring.hp_addr;
+ /* Make sure descriptor is read before updating the
+ * tail pointer.
+ */
+ mb();
ath12k_hif_write32(ab,
(unsigned long)srng->u.dst_ring.tp_addr -
(unsigned long)ab->mem,
--
2.49.0
Return-Path: <linux-kernel+bounces-673393-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 9FAF441E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:47:17 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id AD1C016CA49
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:47:17 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id BB2DD292912;
Wed, 4 Jun 2025 14:45:55 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="QeE5WgSv"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 056AA291861;
Wed, 4 Jun 2025 14:45:54 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749048355; cv=none; b=t4ixFh0WGyyuR5/tZ/023rL3GOD36kyf+rG9bM02MdGDT2m3LwdXqS07m9Qb1BD9qmwUTaYD2HLefx1XmXfAPkTycGra+K85JzAKuSn0sQufaulodygrqw4upqwnqwINfaDV7sGNHdgcGmhzMtExZQ8HhM0nbajXo6jPNVDQ5ag=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749048355; c=relaxed/simple;
bh=5wKoX9vgVar/8xSs4aFnYVGmM1We5/c0MjsDQr+v6jM=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=DcdBCjWTW6pZoKFOmrw6JPJ3wSgVFzcKQp8q2Fw5UryybOyR3yqWmHlKeu2AV/HHyi+L6/m7QgXgUZD9/OnRS4CF1xw3oVO8B6MP36XmmNtT7pVeUDCWDDZ0ryO1fu66Gtz4sVvL9Smzica92/8Y619L1Uo7Us/uGQb43XkZrfQ=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=QeE5WgSv; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5F0CDC4CEE4;
Wed, 4 Jun 2025 14:45:54 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org;
s=korg; t=1749048354;
bh=5wKoX9vgVar/8xSs4aFnYVGmM1We5/c0MjsDQr+v6jM=;
h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
b=QeE5WgSvoMpNlWTtYYYaDvRGXIOzYJl+s2xM5m8O3Q2Rr5A+8vgpmsXf9fc0crfFM
lfR5vBf/v9uQfWEVsjGfDNXmu3VzujYfIiSR/gLX4ivQYUKTS9bIxJj9mXhcuUkYfw
Yd0kesqK7XCojupWvSC8OOoR2/wjpctvHC0fvBb0=
Date: Wed, 4 Jun 2025 10:45:49 -0400
From: Konstantin Ryabitsev <konstantin@xxxxxxxxxxxxxxxxxxx>
To: Christian Brauner <brauner@xxxxxxxxxx>
Cc: Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>, Jan Kara <jack@xxxxxxx>,
linux-fsdevel@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, Luka <luka.2016.cs@xxxxxxxxx>
Subject: Re: [Bug] possible deadlock in vfs_rmdir in Linux kernel v6.12
Message-ID: <20250604-alluring-resourceful-salamander-6561ff@lemur>
References: <CALm_T+2FtCDm4R5y-7mGyrY71Ex9G_9guaHCkELyggVfUbs1=w@xxxxxxxxxxxxxx>
<CALm_T+0j2FUr-tY5nvBqB6nvt=Dc8GBVfwzwchtrqOCoKw3rkQ@xxxxxxxxxxxxxx>
<CALm_T+3H5axrkgFdpAt23mkUyEbOaPyehAbdXbhgwutpyfMB7w@xxxxxxxxxxxxxx>
<20250604-quark-gastprofessor-9ac119a48aa1@brauner>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <20250604-quark-gastprofessor-9ac119a48aa1@brauner>
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 09:45:23AM +0200, Christian Brauner wrote:
Konstantin, this looks actively malicious.
Can we do something about this list-wise?
Malicious in what sense? Is it just junk, or is it attempting to have
maintainers perform some potentially dangerous operation?
-K
Return-Path: <linux-kernel+bounces-673394-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id CCD8141E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:47:33 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 2743E188C835
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:47:47 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id AA53E28C5C0;
Wed, 4 Jun 2025 14:46:53 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="l4Ucq/49"
Received: from PA4PR04CU001.outbound.protection.outlook.com (mail-francecentralazon11013019.outbound.protection.outlook.com [40.107.162.19])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3C47A4C97;
Wed, 4 Jun 2025 14:46:49 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.162.19
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749048412; cv=fail; b=V/Z/adObIo64BOsaHDRaG7lBhaGOCV8ZhQbuNxKjsLf5KTiPxHd/2Fs5wPB4f8zU8LUNEFgWdGXKysSABgpGa8FGiD4kGLrOcb/GEvO6XdfZd5xR32U2tz1NUIbGOdCrQyGXZ07Yu+NvDHm1ApECbv1c5QY9HfwxMZPQGqJE9Qs=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749048412; c=relaxed/simple;
bh=M6jDCqInL78JzxGkU8M8UFpgcgZd1X6U6Hi1FC2idko=;
h=From:To:Cc:Subject:Date:Message-Id:Content-Type:MIME-Version; b=QNjw5hu8WM1XjyNRfAP32z7EinGingDMCm/S1+wfjSzRP5zQjnZdQiYrp1b9znOtivpMgfwXFGvWP0+2mWe/JpLbIt+T4aG4l8/fDCDQGoE8+v5x3fQ2ulOC9XYwIXbOT0Fdj1YjjhkI2tMTsjTMAHu5+k7VSBSpwJn9RQOiOA8=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=l4Ucq/49; arc=fail smtp.client-ip=40.107.162.19
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=jmuN20T8lKq5wvmvbBYrbaeyrPgMZNj+kfKGef8Yq0IGzOvq2NTbLYTTom9VPhEASlQ7UfXznGeYP8rlGCpVzPrM2GQ9MgnqeWbdUbhi3PYQuhNFfFjUlv4IoIzJ88rw0lb9rGjppfBqGzzmWU9nLbdvAF1JZRrpoNVBodwlfOeZBNCc4dI8IpTSburYulr+bXdsujKpUIVlDBLheSIp7v8mkTnx9UoPApNKSvOMT4f/Xl678MEN4zNtaaIuypzxDcvbnew8/xEJfRI2+dh4E7Lgqsfv4rSd7lY8of3MaY9qv7eZaIEOCKEBzPOwGK6RbADDeyk/xX6d8lQBDhaXmg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=aOaO1NLX4p7IBd/tPilSfu6EonttEk/jSUrKuqI7dtg=;
b=pJchaLWsuKU/0GKruOsECVsj+AljXAkXDGhebF7O3vKF03o0kLQl9dw35LuX9dvoUHc0LiXtigWtoqFtPIi8Sg8MJVlMmjYmRZs/65ExYUKwOcXPAKKsT0DNiCEnlmvVVY9XKbJOr9nRu4XqXeAZq/c24gfvP8+BTC+2wK24uRDN6TCRjThO5F/wHprCNexoGF48p9Rz83v7QIc1I4IplqXhVibvx369BewX+nQa8MNJin3ZvBggel/E1TzLI4A6vFjeRd4ZdM4+L5FralDuoXJhsA0nlQrsd/BWv8dy4wiP+TkagrhJM0KYcdV1KptwNbwfmk0hiztSzAoXj5G1AQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass
header.d=nxp.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=aOaO1NLX4p7IBd/tPilSfu6EonttEk/jSUrKuqI7dtg=;
b=l4Ucq/4993fr64YhlOmEf4jUn4vo+gt2k60swYEs4Me4PsNEQuXWDh6Qne0jRoxFK8E3CoUnpOamdsKq2JkCjm2A8k/GHxy/Eq6dcvvvbqKwOhCrARJx8Rs6SMzu13FyNsR+785gRE9NAuRmMoyEzmF+2ClZyMjwM2k1GV1WYWLv03vzElwLPwj2XE5QpkMWKzPnTvLMEitW19/pM6NIsQRwng9sf7KmI8twyiZzx4IDoRAfq1u/5LS8ocLoFDpkWm82t+xjw0dEwN0qj4AEGbS0bMbXZVrmnvJunZltY80POVrOXW9TrRdVC6PCamjJEAm1NSgcBcs99eHZNcEyiA==
Authentication-Results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=nxp.com;
Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14)
by VI2PR04MB10667.eurprd04.prod.outlook.com (2603:10a6:800:278::9) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.33; Wed, 4 Jun
2025 14:46:47 +0000
Received: from PAXPR04MB9642.eurprd04.prod.outlook.com
([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com
([fe80::9126:a61e:341d:4b06%6]) with mapi id 15.20.8769.025; Wed, 4 Jun 2025
14:46:47 +0000
From: Frank Li <Frank.Li@xxxxxxx>
To: Linus Walleij <linus.walleij@xxxxxxxxxx>,
Bartosz Golaszewski <brgl@xxxxxxxx>,
Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>,
linux-gpio@xxxxxxxxxxxxxxx (open list:GPIO SUBSYSTEM),
devicetree@xxxxxxxxxxxxxxx (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS),
linux-kernel@xxxxxxxxxxxxxxx (open list)
Cc: imx@xxxxxxxxxxxxxxx
Subject: [PATCH v3 1/1] dt-bindings: gpio: convert gpio-74xx-mmio.txt to yaml format
Date: Wed, 4 Jun 2025 10:46:30 -0400
Message-Id: <20250604144631.1141430-1-Frank.Li@xxxxxxx>
X-Mailer: git-send-email 2.34.1
Content-Transfer-Encoding: 8bit
Content-Type: text/plain
X-ClientProxiedBy: PH7P220CA0130.NAMP220.PROD.OUTLOOK.COM
(2603:10b6:510:327::14) To PAXPR04MB9642.eurprd04.prod.outlook.com
(2603:10a6:102:240::14)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|VI2PR04MB10667:EE_
X-MS-Office365-Filtering-Correlation-Id: 2380c9bf-b775-4c65-4c62-08dda376a191
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam:
BCL:0;ARA:13230040|366016|1800799024|52116014|376014|38350700014;
X-Microsoft-Antispam-Message-Info:
=?us-ascii?Q?zLVGz4kv9n5uW4bavBKSYtX/7UfoRImasRdHAjtASfsNDFG57/Y7d+jVPsN9?=
=?us-ascii?Q?lNCZWy9AOCVdoLZ5/hpT41uJxg+6HRoO0mGiqJykrk8RksaJxWuHMEvfA/ef?=
=?us-ascii?Q?j6zELE+yDkUTO7TvloEKwV6d6/AK8LMTKpau2GbAFiICYGhNvvrlIQBGRVT7?=
=?us-ascii?Q?b4JFlsnSHu1V9UoYo7UgbG0UMSqXjUZ5/TlvCcEoNOmxlbGZDV+VP0NGluzb?=
=?us-ascii?Q?uMwJG6bsaNYqQqFquGPl5DsR+Nf6/J2tTr3PEcYhZe4fdyQXPXn+qSIeGsp1?=
=?us-ascii?Q?GAsW7SgvzaEFjOD4VG60RzV14CXW8ZpUyrXDe/dSb1aDs10XB0yBfSAkfAc/?=
=?us-ascii?Q?6B+1B3T28FsRXgzunruV6J4GpfbuTDlA+kSxn925LzldSPEVnE8kPTTn8OWI?=
=?us-ascii?Q?xqzC4RQmQEvKOQRpc9IOJh/SsdbLnXDN9JOH4kJDM9SlN7MxNrMyN0vnw/Yl?=
=?us-ascii?Q?AFZSAR1beTil73rLaKOjgTVQgERll4q2JHgJmF8v3n9C3ZkA1QdBRRNNruVp?=
=?us-ascii?Q?iQldnoPQAtIrlPDsZyL9I9Yx4nLcPjPFChyVxXv+RJz8gx7/tDS6Maa4sHyN?=
=?us-ascii?Q?fxZHGfCgAxPQbSwPL72EqwiBQQQIYWzUFVaohcKJh+RUrIOCM7qsJOO7dfqS?=
=?us-ascii?Q?MgQ7hlOgi8i9v3NcV6Kdri8nRixjKUNVuG0Aly2nCnyYwy4gnbBd/mJct6Oz?=
=?us-ascii?Q?FpSBaD3A/our3WBia5nVCB5ifuDW55lmhvgJo54d5O0NjEmhtaoHohkuSWmf?=
=?us-ascii?Q?ah/ZQR0P1ZyzneM/3a8LA5CVZTzwtSphaudgcs8741gVp0mhgDoT+kWcf1HG?=
=?us-ascii?Q?3BUCFpPN+kYjzsWAeF/Dy2YTYV1ueOS9h7aQ8T+PigNiEUk6DDtUdGW0PpLS?=
=?us-ascii?Q?6b53cDmBDW1sneqqU++HDBfOBdI8H9ebknyD+dnKefXNtBhCCTvda+uT+Nx9?=
=?us-ascii?Q?m4UUMiygmmahGbD/8DY2SfT1N/XYDotPiGnllUZXzifCuXV+E+YN9Y/mHEWj?=
=?us-ascii?Q?XQO2X7amSOdYYfrrDvBaMZ0KWZBYlom+dYuhuZyvFrYeKKhVVdRLUAHCb5BC?=
=?us-ascii?Q?d3cgUKLIpqL17nQEF8ETq0QnIqgh9HzcXr26bcJP/5fSv8gBe6uIWQH7OB0o?=
=?us-ascii?Q?LnTdn4/C9h5TBsj6+TPY6t+y3+UIq2VzXt7U5bJLAKge2A8vsp/fR6AFCuSu?=
=?us-ascii?Q?+dSEJBKXGvd1SaCZA9uDcVgf8lbFGN2qIF9fUG9mfigzQP1CFT0Q9SzhmAVl?=
=?us-ascii?Q?jTAhBVnCSw5K8XDYl0bS1aPqEEYF4Ks42CF1/r8O2w93qF/nZQf16exbhcWi?=
=?us-ascii?Q?lAAjF9xwOLaIcfAJL0gIP6KCIKlogvv8bsJoJKlxS0LWfoJ5aP7uPkUAAnFU?=
=?us-ascii?Q?ZSkg4L+3a6RvwIikzwuGvxYuxE6Od01eirAEvbg49IALT2i83TwT0Uh7L5Vp?=
=?us-ascii?Q?SuTH9kDv3qdD74t5aABe97NOfX7T66lA?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(52116014)(376014)(38350700014);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?us-ascii?Q?SSioaExSNpVzpAPIOyMHuckutrLQx0qom81mw0sSd8eMUwZPZkKuElrT17ib?=
=?us-ascii?Q?dj2DNw8VyGtxyc9c6i+loclInbLw5qi4Ssmtur2KVf0ZqAOhNsNW7RumGK1S?=
=?us-ascii?Q?Fa+1dCdjAz1YD9ZDim86qwP3nOvpSxxNZunwmmZMt2VB1wV1AbDKthCHVpAw?=
=?us-ascii?Q?Y6ljhokiC7PDq7OjjX+U4zb2pwHnZMv0W0gPoTYvVyd/qsGdof9wdppfT3ZU?=
=?us-ascii?Q?meUWFpx7aPGOESlaedk/N8+4uTo7FYGHJX0koTbpxSQqUCbbwKUpNXS6HxhK?=
=?us-ascii?Q?BbWPj7fdlyIVtXC41/RsvgcDBKbVKYsxE0HZmkSDT2PmRnYhybVyyO1Hq16h?=
=?us-ascii?Q?2NoWHwsZ5K+u0e42NBqTzCJLHZmG8ogc0vzWcMwUE0J1d8eLEVcdGCz/z7hq?=
=?us-ascii?Q?RJlLvJqhFkHqC9SKd9bilnFr4q6/HdUiBA6O/SPLODJXWcFf27HVHe5MBoml?=
=?us-ascii?Q?J/vpYxodl2QG5NNjnYyhRZrcWX5Ko7vPIxCoXKN1LF2ngoFvSMWBZAXtybYW?=
=?us-ascii?Q?10L4aSjz0dtS7Py4E7Wg4ErUIWn99GGbrYxIGp2Ex/Gnz8Xq+1xVJv1vbpNM?=
=?us-ascii?Q?2NjuiWr7tudBtiiml6Jk8P850febF1h8E4pazdIkzd3Ku7xCg2PqldXwyHcs?=
=?us-ascii?Q?FpToewxjiRULbTlq+vGdCvJhHV6VTKccKK48D5mosgUXeqiSa/hHnBir23JW?=
=?us-ascii?Q?uMNfziVffJHkKvWucoOMy6bSEuuZYqcl+EhhQy2TDWsDjXLDgXEnWihLKk9A?=
=?us-ascii?Q?Nj5UnfUi3jS5yJdtpc4VwxQq6fW0VtlpX/dxQWCP28YJjrB1QPB9H8hvNha8?=
=?us-ascii?Q?HPpYavRm73wXMrNJniAUR3+pZuYT4MegFkvHbBK6g3H/BMDb1WuRASKaVFUm?=
=?us-ascii?Q?rPebJeX+2Nv8CEmmwZpskxU361JcWfozM5WPuDncj2XoGHYfDjfQr+XezTgt?=
=?us-ascii?Q?rqUgruxmUOJ4Sy0NsM/w6wt3kAn09Ra/TaujbqjGDHgEejsuPi5rk+we7oCv?=
=?us-ascii?Q?fXheSJ+sjq4KhzWo/o7lXkMoYgnMxMkF3GsFANNZfFA2imcCnpmB/POIdY/a?=
=?us-ascii?Q?tXhj29eHpjEwg463vzWtuT7VHpkQdsXaMS8M2LPWUWvy52ZQgzJVovQZXoO1?=
=?us-ascii?Q?WvQrr9+lDnT4uw3b2TWiLWsWXIGErlwCBlhyGKgt0qhPWihVQVZNqTEitkfG?=
=?us-ascii?Q?9jdppx/E9S9cogr3BKAFydiuT09MTTnjeUtwuaO3v3izupSeIkOIg9vAmEI7?=
=?us-ascii?Q?gvZJ/YOULGucOpM3P4P+fEMelJncwIvS5PGy+ujEihm6YyTmwyWMKeX5DlC+?=
=?us-ascii?Q?QYjyaemI49uJlkSGWGGD6DLNWjB7oJTu68YjkWyqVbnzQVWjlbiya915ZnZD?=
=?us-ascii?Q?GyCSpapPHBazrjWFXpzhvtlyAtWBGAHanuqilDiV7gQl6EQxwmQx4n1WZgjB?=
=?us-ascii?Q?Mi0T+eBwVpiPoxnqvoSySbrOoLKArWOmCtcw3ZH6ky2/A8fU7bDztLrbZw+7?=
=?us-ascii?Q?pqcXbdcGT5qetcssESWp1R15Yt/e+iE1ZshFsyE552s7weIS8HO5R9wfmlD3?=
=?us-ascii?Q?MpMa2XYnCua8agGG4H1LG3J2qoNVa3Jn/EFmj0Gk?=
X-OriginatorOrg: nxp.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 2380c9bf-b775-4c65-4c62-08dda376a191
X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 14:46:47.0845
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: XwGnekNIvtVnNrCI8vWRHsJ4y+Mt1NoX2Wphav/odqbTrgp2Y5cBxpBP/e5WJuTmMFTQPzvJxcapBiWDoOMxTg==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI2PR04MB10667
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Convert gpio-74xx-mmio.txt to yaml format.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>
Signed-off-by: Frank Li <Frank.Li@xxxxxxx>
---
change in v3
- add Krzysztof Kozlowski's review tag
- remove "driver" in title
change in v2
- remove trivial changes in commit message
- add TI in title
- fix additionalProperties
---
.../bindings/gpio/gpio-74xx-mmio.txt | 30 ----------
.../devicetree/bindings/gpio/ti,7416374.yaml | 56 +++++++++++++++++++
2 files changed, 56 insertions(+), 30 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/gpio/gpio-74xx-mmio.txt
create mode 100644 Documentation/devicetree/bindings/gpio/ti,7416374.yaml
diff --git a/Documentation/devicetree/bindings/gpio/gpio-74xx-mmio.txt b/Documentation/devicetree/bindings/gpio/gpio-74xx-mmio.txt
deleted file mode 100644
index 7bb1a9d601331..0000000000000
--- a/Documentation/devicetree/bindings/gpio/gpio-74xx-mmio.txt
+++ /dev/null
@@ -1,30 +0,0 @@
-* 74XX MMIO GPIO driver
-
-Required properties:
-- compatible: Should contain one of the following:
- "ti,741g125": for 741G125 (1-bit Input),
- "ti,741g174": for 741G74 (1-bit Output),
- "ti,742g125": for 742G125 (2-bit Input),
- "ti,7474" : for 7474 (2-bit Output),
- "ti,74125" : for 74125 (4-bit Input),
- "ti,74175" : for 74175 (4-bit Output),
- "ti,74365" : for 74365 (6-bit Input),
- "ti,74174" : for 74174 (6-bit Output),
- "ti,74244" : for 74244 (8-bit Input),
- "ti,74273" : for 74273 (8-bit Output),
- "ti,741624" : for 741624 (16-bit Input),
- "ti,7416374": for 7416374 (16-bit Output).
-- reg: Physical base address and length where IC resides.
-- gpio-controller: Marks the device node as a gpio controller.
-- #gpio-cells: Should be two. The first cell is the pin number and
- the second cell is used to specify the GPIO polarity:
- 0 = Active High,
- 1 = Active Low.
-
-Example:
- ctrl: gpio@30008004 {
- compatible = "ti,74174";
- reg = <0x30008004 0x1>;
- gpio-controller;
- #gpio-cells = <2>;
- };
diff --git a/Documentation/devicetree/bindings/gpio/ti,7416374.yaml b/Documentation/devicetree/bindings/gpio/ti,7416374.yaml
new file mode 100644
index 0000000000000..33472f0911011
--- /dev/null
+++ b/Documentation/devicetree/bindings/gpio/ti,7416374.yaml
@@ -0,0 +1,56 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/gpio/ti,7416374.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: TI 74XX MMIO GPIO
+
+maintainers:
+ - Frank Li <Frank.Li@xxxxxxx>
+
+properties:
+ compatible:
+ enum:
+ - ti,741g125 # for 741G125 (1-bit Input),
+ - ti,741g174 # for 741G74 (1-bit Output),
+ - ti,742g125 # for 742G125 (2-bit Input),
+ - ti,7474 # for 7474 (2-bit Output),
+ - ti,74125 # for 74125 (4-bit Input),
+ - ti,74175 # for 74175 (4-bit Output),
+ - ti,74365 # for 74365 (6-bit Input),
+ - ti,74174 # for 74174 (6-bit Output),
+ - ti,74244 # for 74244 (8-bit Input),
+ - ti,74273 # for 74273 (8-bit Output),
+ - ti,741624 # for 741624 (16-bit Input),
+ - ti,7416374 # for 7416374 (16-bit Output).
+
+ reg:
+ maxItems: 1
+
+ gpio-controller: true
+
+ '#gpio-cells':
+ const: 2
+ description: |
+ The first cell is the pin number and
+ the second cell is used to specify the GPIO polarity:
+ 0 = Active High,
+ 1 = Active Low.
+
+required:
+ - compatible
+ - reg
+ - gpio-controller
+ - '#gpio-cells'
+
+additionalProperties: false
+
+examples:
+ - |
+ gpio@30008004 {
+ compatible = "ti,74174";
+ reg = <0x30008004 0x1>;
+ gpio-controller;
+ #gpio-cells = <2>;
+ };
--
2.34.1
Return-Path: <linux-kernel+bounces-673395-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 13BFC41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:47:54 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id CCAFF1632B9
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:47:46 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 26F65290083;
Wed, 4 Jun 2025 14:47:33 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=disroot.org header.i=@disroot.org header.b="T307lBYR"
Received: from layka.disroot.org (layka.disroot.org [178.21.23.139])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 592FA32C85;
Wed, 4 Jun 2025 14:47:29 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.21.23.139
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749048452; cv=none; b=lWdO25OoMaT0SYOBk334IST7FocdeUTFIgI1SYDsRy4hqIvR12olWjMEucfTGDgVMpbxQWc4VGvgdiJVtuZwMSR3Vn5C8v+ZzEGh8TrmPezJb71phfkF/lRjwtNhNss9K3hF8AjEv2YtSwBn9hXLDu4CWhP6ZrpCv9mzNs4Z/bg=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749048452; c=relaxed/simple;
bh=s794wOPYqmOh7ctoNUyErF6+1Cjz5YD1viu4ZG67VJA=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=n2vPbDu5lr2BXzIYv/aoMSBNPfpZxOKzmgVsKImAutUt6gN3byonfFlArVxbYLsR7PKtt65WVcA3AA9CucNvQJ9VeMWWb3iznntvVN6IGWxXlclPQGyFTnmjR/EB2ohyQbHuFw0Ht0RSKEW792vqZJoFakmee6wryGBRNSrE6Bk=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=disroot.org; spf=pass smtp.mailfrom=disroot.org; dkim=pass (2048-bit key) header.d=disroot.org header.i=@disroot.org header.b=T307lBYR; arc=none smtp.client-ip=178.21.23.139
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=disroot.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=disroot.org
Received: from mail01.disroot.lan (localhost [127.0.0.1])
by disroot.org (Postfix) with ESMTP id 7B67E25B4D;
Wed, 4 Jun 2025 16:47:22 +0200 (CEST)
X-Virus-Scanned: SPAM Filter at disroot.org
Received: from layka.disroot.org ([127.0.0.1])
by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP
id RreaCiUezlfL; Wed, 4 Jun 2025 16:47:21 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail;
t=1749048441; bh=s794wOPYqmOh7ctoNUyErF6+1Cjz5YD1viu4ZG67VJA=;
h=Date:From:To:Cc:Subject:References:In-Reply-To;
b=T307lBYRQTcYkHnp2ZEUgWq5m45CBUmBiHKIlJr6GlPmZhzr9eXYbYqSgI9qcpR02
K/Zk4jx4VhlVeQ3bmSICTsxUkv1rSLLccFFKWnGTSGoBijsz0itN98J7Pf0rZqumPZ
goDh9JE1DdcTK8/gfqhNUr2boSpAqjIk6gVqxVrnXLLobKH4QWBVa2XTQ2LRsGdC0c
+a1IiNexXnEbBg89XR7hWb3bMY0v81Srw+/MHlWNmBdlVoftd6Tro+KU4AiZlDxLT4
2qfCjJ4ij0RRO7kJ4y1ML2c2BjZNfUeAOHymok4j3Z//n10b3FSMAFSZPZ3Glib5IC
0rS/TToWSo/eQ==
Date: Wed, 4 Jun 2025 14:47:04 +0000
From: Yao Zi <ziyao@xxxxxxxxxxx>
To: Huacai Chen <chenhuacai@xxxxxxxxxx>
Cc: Jianmin Lv <lvjianmin@xxxxxxxxxxx>, WANG Xuerui <kernel@xxxxxxxxxx>,
linux-kernel@xxxxxxxxxxxxxxx, loongarch@xxxxxxxxxxxxxxx,
Mingcong Bai <jeffbai@xxxxxxx>, Kexy Biscuit <kexybiscuit@xxxxxxx>,
stable@xxxxxxxxxxxxxxx
Subject: Re: [PATCH 1/2] platform/loongarch: laptop: Get brightness setting
from EC on probe
Message-ID: <aEBcaDvEKZVO77FY@xxxxxxx>
References: <20250531113851.21426-1-ziyao@xxxxxxxxxxx>
<20250531113851.21426-2-ziyao@xxxxxxxxxxx>
<CAAhV-H7pvaz5N0-EfvhDNHAXJtR13p9Xi5hfgDxOpeXi9zMbTQ@xxxxxxxxxxxxxx>
<aD6Zz8L9WJRXvwaW@xxxxxxx>
<CAAhV-H6j1OT9D8ZBtyEP=Mu5+m=t0ebUvuC=gVeNsoPizwK1TQ@xxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <CAAhV-H6j1OT9D8ZBtyEP=Mu5+m=t0ebUvuC=gVeNsoPizwK1TQ@xxxxxxxxxxxxxx>
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 09:56:20PM +0800, Huacai Chen wrote:
On Tue, Jun 3, 2025 at 2:44 PM Yao Zi <ziyao@xxxxxxxxxxx> wrote:
>
> On Tue, Jun 03, 2025 at 12:11:48PM +0800, Huacai Chen wrote:
> > On Sat, May 31, 2025 at 7:39 PM Yao Zi <ziyao@xxxxxxxxxxx> wrote:
> > >
> > > Previously 1 is unconditionally taken as current brightness value. This
> > > causes problems since it's required to restore brightness settings on
> > > resumption, and a value that doesn't match EC's state before suspension
> > > will cause surprising changes of screen brightness.
> > laptop_backlight_register() isn't called at resuming, so I think your
> > problem has nothing to do with suspend (S3).
>
> It does have something to do with it. In loongson_hotkey_resume() which
> is called when leaving S3 (suspension), the brightness is restored
> according to props.brightness,
>
> bd = backlight_device_get_by_type(BACKLIGHT_PLATFORM);
> if (bd) {
> loongson_laptop_backlight_update(bd) ?
> pr_warn("Loongson_backlight: resume brightness failed") :
> pr_info("Loongson_backlight: resume brightness %d\n", bd->props
> .brightness);
> }
>
> and without this patch, props.brightness is always set to 1 when the
> driver probes, but actually (at least with the firmware on my laptop)
> the screen brightness is set to 80 instead of 1 on cold boot, IOW, a
> brightness value that doesn't match hardware state is set to
> props.brightness.
>
> On resumption, loongson_hotkey_resume() restores the brightness
> settings according to props.brightness. But as the value isn't what is
> used by hardware before suspension. the screen brightness will look very
> different (1 v.s. 80) comparing to the brightness before suspension.
>
> Some dmesg proves this as well, without this patch it says
>
> loongson_laptop: Loongson_backlight: resume brightness 1
>
> but before suspension, reading
> /sys/class/backlight/loongson3_laptop/actual_brightness yields 80.
OK, that makes sense. But the commit message can still be improved, at
least replace suspension/resumption with suspend/resume. You can grep
them at Documentation/power.
Oops, thanks for the hint. Seems suspend/resume are wider used, and I
will reword the commit message in v2 :)
Huacai
Regards,
Yao Zi
>
> > But there is really a problem about hibernation (S4): the brightness
> > is 1 during booting, but when switching to the target kernel, the
> > brightness may jump to the old value.
> >
> > If the above case is what you meet, please update the commit message.
> >
> > Huacai
>
> Thanks,
> Yao Zi
>
> > >
> > > Let's get brightness from EC and take it as the current brightness on
> > > probe of the laptop driver to avoid the surprising behavior. Tested on
> > > TongFang L860-T2 3A5000 laptop.
> > >
> > > Cc: stable@xxxxxxxxxxxxxxx
> > > Fixes: 6246ed09111f ("LoongArch: Add ACPI-based generic laptop driver")
> > > Signed-off-by: Yao Zi <ziyao@xxxxxxxxxxx>
> > > ---
> > > drivers/platform/loongarch/loongson-laptop.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/platform/loongarch/loongson-laptop.c b/drivers/platform/loongarch/loongson-laptop.c
> > > index 99203584949d..828bd62e3596 100644
> > > --- a/drivers/platform/loongarch/loongson-laptop.c
> > > +++ b/drivers/platform/loongarch/loongson-laptop.c
> > > @@ -392,7 +392,7 @@ static int laptop_backlight_register(void)
> > > if (!acpi_evalf(hotkey_handle, &status, "ECLL", "d"))
> > > return -EIO;
> > >
> > > - props.brightness = 1;
> > > + props.brightness = ec_get_brightness();
> > > props.max_brightness = status;
> > > props.type = BACKLIGHT_PLATFORM;
> > >
> > > --
> > > 2.49.0
> > >
> > >
Return-Path: <linux-kernel+bounces-673396-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 6A2CF41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:48:27 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 846DB17180F
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:48:05 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id C3769291173;
Wed, 4 Jun 2025 14:47:57 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="UdGlhCZ2"
Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 00A2C244676;
Wed, 4 Jun 2025 14:47:54 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=192.198.163.19
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749048476; cv=fail; b=IXmAsuPL3gy1XWCr4iAktbexVrW8vDzODPmrlkwwUAbdQiInaNElqeeefWy7fMpG2ue/iYUYgIQNRVegEDJevzFqFITWk1o/03TdrKXOI5WchuNEGreTkvrAYik0WJ0Tvyh9ojFEh7Ii/7IRVQXH1FGQL3k1eqqSJMzfX15UUEQ=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749048476; c=relaxed/simple;
bh=xJtRDhwmiGLFt67gHtY0dSS2UAHKuUHsOeR3JOuQso8=;
h=Date:From:To:CC:Subject:Message-ID:Content-Type:
Content-Disposition:MIME-Version; b=e/+Ipndt6o4oDUlbWNd9HoW+QJ0xn68iVkVBH04LA3Pd5pS0TByNU02OtYROIPnj3IfsUJDQR+4y0APYATnSZL8WaSIu2K8GfDwnLGk/grzSZVP5ggpcOhOzn02t2hNczRttQaz1DtDodnbEsxImCiqYZhZQS18cyOkOCmzGrNQ=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=UdGlhCZ2; arc=fail smtp.client-ip=192.198.163.19
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
t=1749048475; x=1780584475;
h=date:from:to:cc:subject:message-id:
content-transfer-encoding:mime-version;
bh=xJtRDhwmiGLFt67gHtY0dSS2UAHKuUHsOeR3JOuQso8=;
b=UdGlhCZ2I608zzWU0Sf0NRlgW8cPo9M8TgfeLDPih25X5HQB78mC6Fjq
EYRkoiHxEizdVrsZzc7adwnkG3dv31Vv/Pg8XwbT6DwO0JOath0zn5+f7
/SD1bvygDSd71aD93zac9LVSn6rPerPXpUnBH6dKulHWMn5L7mLwbnrES
D5Q2da/OawXzC3JO6ceJoX4izTR1sVnW9RlpGiLRHBOt1jmp9mAnOe8JF
NCNRXxAw9Rwe1mL0ZRB/VVLsznMsmLTBmkMuIPFAYp2oMxDA5UZpeYavW
tU2/EExZ7oo2f9FR3lv+vvMZFEgFiPgeShvJlIsQShxanoygHxgcTL3Z/
w==;
X-CSE-ConnectionGUID: Ual60CrOT56sEimbDUDVDA==
X-CSE-MsgGUID: N10TNNcVS2ueu90uc6XwMA==
X-IronPort-AV: E=McAfee;i="6800,10657,11454"; a="50250575"
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="50250575"
Received: from fmviesa001.fm.intel.com ([10.60.135.141])
by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 07:47:54 -0700
X-CSE-ConnectionGUID: 5nrctUJfT8CKW6A52LUCXQ==
X-CSE-MsgGUID: XQn5rQTaSRucAXlWhP1sZQ==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="176093765"
Received: from orsmsx902.amr.corp.intel.com ([10.22.229.24])
by fmviesa001.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 07:47:54 -0700
Received: from ORSMSX901.amr.corp.intel.com (10.22.229.23) by
ORSMSX902.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.2.1544.25; Wed, 4 Jun 2025 07:47:53 -0700
Received: from ORSEDG901.ED.cps.intel.com (10.7.248.11) by
ORSMSX901.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.2.1544.25 via Frontend Transport; Wed, 4 Jun 2025 07:47:53 -0700
Received: from NAM12-MW2-obe.outbound.protection.outlook.com (40.107.244.46)
by edgegateway.intel.com (134.134.137.111) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.2.1544.25; Wed, 4 Jun 2025 07:47:52 -0700
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=po0rB37TCwgWBlveLhOxBrcFqts700xXFWmxoFXny/IAF7cvJgbf3n1yGbBdXDn9Cvxy9useCuWr1KDuKl/a2Zv4TOa3CX3X7nKTMu0DvO2bUeWbBu0F3iE5DT4vT/RUGC4LurirnN4sP6MGh67rSMwyaFOBUjtp/onCWdIQir1amz7jRj/zk6JvScbb3pEnOf11TK3vu4KpMsj29ulhiMLh7XCLE4ahhtcyw+P5mPS1jyBLbhFGwwHFbjW55L/CVqb/tqWCfmDaeBMb66d6D+8zJsxONIw3OA+9Q1n53Q8UJRMyprlE5z+V5MqYzURxpaDpFIEaF1jIIcbm1ehXYA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=+qPWP4+M7pziXlqKmEY7zQrgMd7zAW4liAvjipUIOxA=;
b=qA0l2r7lKRPyfku6gBnHiS6skiz2o1sthz25oPgnOmfhiHtkG5dqSXSqjw9iAHaJ1sKXjIoM4KnwYLqvt1v0dXpLMwSJ2OtQvA+nYRCWg9E8A94v+7yDZvioX4dbZkYPPam/bDSrOwcaA0mVqZGiU2oYT4JgNmJlrWAn9NU4wZp6lx8OiFk+NmR+bYgtgdH//b7BPh+/7Mh5kfMQMMTkeiwXzJ30W1LwxiKRZxsi3/jA/04UP3rMkroZK4D4Udv0k1CpmFIxdkNjhFxYO8sk9PuChUxOzUMmVEOtV28j2hbU6A6bsFX5V6kjP4dKsSx+xIej2WkzrXYuHgXa3OYqBA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com;
dkim=pass header.d=intel.com; arc=none
Authentication-Results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=intel.com;
Received: from LV3PR11MB8603.namprd11.prod.outlook.com (2603:10b6:408:1b6::9)
by CH2PR11MB8865.namprd11.prod.outlook.com (2603:10b6:610:282::12) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8769.29; Wed, 4 Jun
2025 14:47:48 +0000
Received: from LV3PR11MB8603.namprd11.prod.outlook.com
([fe80::4622:29cf:32b:7e5c]) by LV3PR11MB8603.namprd11.prod.outlook.com
([fe80::4622:29cf:32b:7e5c%3]) with mapi id 15.20.8792.034; Wed, 4 Jun 2025
14:47:48 +0000
Date: Wed, 4 Jun 2025 22:47:38 +0800
From: kernel test robot <oliver.sang@xxxxxxxxx>
To: Oleg Nesterov <oleg@xxxxxxxxxx>
CC: <oe-lkp@xxxxxxxxxxxxxxx>, <lkp@xxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>,
Christian Brauner <brauner@xxxxxxxxxx>, K Prateek Nayak
<kprateek.nayak@xxxxxxx>, <linux-fsdevel@xxxxxxxxxxxxxxx>,
<oliver.sang@xxxxxxxxx>
Subject: [linus:master] [pipe] ee5eda8ea5: stress-ng.pipeherd.ops_per_sec
26.0% improvement
Message-ID: <202506042255.d1d90443-lkp@xxxxxxxxx>
Content-Type: text/plain; charset="iso-8859-1"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
X-ClientProxiedBy: SI2PR02CA0014.apcprd02.prod.outlook.com
(2603:1096:4:194::19) To LV3PR11MB8603.namprd11.prod.outlook.com
(2603:10b6:408:1b6::9)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: LV3PR11MB8603:EE_|CH2PR11MB8865:EE_
X-MS-Office365-Filtering-Correlation-Id: 2e42a4c6-db9b-470b-e38f-08dda376c5db
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|366016;
X-Microsoft-Antispam-Message-Info: =?iso-8859-1?Q?/TiLjvYnTqe14oV3/wPUlHS6EeyyUfVyVDfjWVBMuuOct5/IjAamwdJtSe?=
=?iso-8859-1?Q?zhAdEEhW15IU7FB5ZBBxoAYE7FPg41V0eEd713MKQTIFpRqpc68Qe/4rlR?=
=?iso-8859-1?Q?130+fnDXOIRs67dpOcLKyQaOIlbNfZyLer4ABlGWPuiu12WD8itBWZ8A92?=
=?iso-8859-1?Q?zoF1O+btFCC4f9oUECcZ2MdmivYQyW7UYhcLNLmtifmwufQJ2fdNrQwFzn?=
=?iso-8859-1?Q?AIXuFmjteJvPs1lOfzN5Xlwg2tZldsJJrgnYwIKuwdKALccGkxscYCyB7P?=
=?iso-8859-1?Q?gsPNRV7KTlpqmakfl5ICLe5Ubwn5LBcmBh0sYQ0bnsPinZbsRF9ZKINGRv?=
=?iso-8859-1?Q?Gw/vfS2pol0KcDbx2x/6RJqstVzPEuZF6goiEGwOtDfoI4bFsSzz9Roqtg?=
=?iso-8859-1?Q?J3c5sLkcBTJJXbR+SGOo8grVxqhEG/EUovtvT3KFZkZUK2IdLAjA2F0SwF?=
=?iso-8859-1?Q?WFaHg8HiWg22s+mYDNCvXsLYS+UxYQD2sUiBMgIWOJvSiMciPmKpfvlw27?=
=?iso-8859-1?Q?48zb41lLvXsGnLBJkoJ64d51ZAQ+XZs2XTA5HnXRAmLyMB0al27u3X+Vlm?=
=?iso-8859-1?Q?6nnJp+zpvZMtE4/2yyccJoQhoCljRxLkpPbVex+0d1b18HRTZaeIKiBMCk?=
=?iso-8859-1?Q?j3dD+QiqRgEvs7E2Zpb2U3htQD9Ea+OWdJPk6KeJPj4VTVXbE8zoSTi4bW?=
=?iso-8859-1?Q?HwXQlgZoyVjXYTnJTLQCumcoGW2OpQm7+ucM5hcyi7QEWwHpyUbjbrYlPM?=
=?iso-8859-1?Q?QKGz3jnBNxX55hFI1faee1PbB/d/akE0aXDjjy3Z7zOIm6PtZEUMupNUUl?=
=?iso-8859-1?Q?7dlEI4yDmw9dXAdEQyAhgbDoQGZvs8naa1S+ruK6ejA4WkFaZg1Fpeq0B0?=
=?iso-8859-1?Q?gIUMpQbLMpiqYy/K4MkP48RYx4EPhv42oxksYopNafM5RJpffe5O5iCzfC?=
=?iso-8859-1?Q?nMh8QLh3ivFSReZurNdJbOSFpVM6mGzT+giGLQIMozs0jFTKyPTlRxu+mI?=
=?iso-8859-1?Q?2LGkn66FBQZqPVks5rCKoVO75BRSEKTFLh1fFwigd+VR0XDyVPU3pCXtn6?=
=?iso-8859-1?Q?qZdcq5ufT8X8XmyePPYGWWVFePnwxvr8DLcSBa8NWYNsf+Uo+rJ/QbziWv?=
=?iso-8859-1?Q?pB60HkuBPn3vmNg/Z5SKUu+3pR5rESd7pBcjCAcAjixms2FNr29C/9mGt+?=
=?iso-8859-1?Q?kbQpiFfGnBdVCVOLGatvgpXYgJXveAyLtstpyrd4kxX2kPNnW+szUGprpc?=
=?iso-8859-1?Q?KYjqdDodb3BxGG6AxmXoDenTb7U2VT4mF2CvxPJBScbFiz7s6VPYjlbDwS?=
=?iso-8859-1?Q?jaICPs6F8gtmkFTIHFIKxKQ4jje0BJHeZX9oyo3u0uAk6UpZsqs4k7kYRF?=
=?iso-8859-1?Q?BbiAsEK+A4W0FeRsAUCSp6N2hF5YOYcdHl9njQj82KhPiKOwK7jW/M3S63?=
=?iso-8859-1?Q?YKi4hk8UnWr1qtC1?=
X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:LV3PR11MB8603.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(376014)(366016);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-1?Q?TaDpEQBpI0z/EF56A8uMyHk/GrT2tJt5LkUuefFFoEonyuXhq4BmFuTLxN?=
=?iso-8859-1?Q?Hr2rCowOvD5Q/9ilfSW4LPAcyYO5rylMInbaxLeYPUuFEMvVdMziQ+tds9?=
=?iso-8859-1?Q?hAVxD8ptcqZXC/a7Ll3MGDhL5GDxw7SDOaTGEVAChX+h0VorOlUSql9GBW?=
=?iso-8859-1?Q?o6ztAq9rSTqhDp8PQkP85irxSIPPch/DJVEbRTof8AJ7hgD9yufeliID2+?=
=?iso-8859-1?Q?3z/BZdc+bpLLOLth8vSvf3QWqDA6ACBwb0rQRj1yl4U2t3GtMJvRe1KKm5?=
=?iso-8859-1?Q?uHpEyAZ1NFPXYiliaC21D0BckPeCOgxobvnaDKZqOVUsbEiOFlzdQYaWqT?=
=?iso-8859-1?Q?U2fyYotNhDrEndn1QR6WDJ/8d5Xc/mhNFFgKq0EwiEu0+leyr26Kqd/HMx?=
=?iso-8859-1?Q?yLB8SnS0a8x/lHVVDN4YUZ+0meLKqCZc9iOpG+J1Slwcd863s+MiIOddDJ?=
=?iso-8859-1?Q?XJXW5EZQ9lBhrOXB6IDgjBI3Aie7aPLnAKlD42azsTxgl5/xmb0jo7uG+G?=
=?iso-8859-1?Q?vfTMuOuR040s6RMkp1idnniYAqDgxjZZ5AMbMZVUxbGRcn5cu9itk2F6PQ?=
=?iso-8859-1?Q?+yzMlMbSdpGhmMp1sC81MZpjKtJ8lNsK1ce5On3/x4SeoPvEXZLZbtlvVo?=
=?iso-8859-1?Q?hL2sYKsvaPDPDmwbLY4DkzzOU5Ap7ygBUxEZQ5tGBiJ/rdDwpHAzyQ7HKt?=
=?iso-8859-1?Q?zGgHSDk24TMkV0cexfzI54FIXOJF/e56+fJ7CJDivG/WKtTIV7dfyvFGKl?=
=?iso-8859-1?Q?IhQ2T+FTnTjM4qAYyErYSDveQLqQBoAgZHpRIgXi6BvtUd1FKXNnOGIe+g?=
=?iso-8859-1?Q?jGGrbMUvew2zmGGUwadvTm2/9Jym5pdKn6LfzmOVRTvAcapcrvc6bfVmnE?=
=?iso-8859-1?Q?mdKT+taxAxfUCLXaK4DuzXAhMGZB14uTT9/yqVXWqJuNt40+aefWxXvNnw?=
=?iso-8859-1?Q?NVDNyRixF6ELptJJGY+gI6yaxYbXzy0QgMe9zP2MtKt0wiH9uSitGNUuQ2?=
=?iso-8859-1?Q?vQbA7ppTL4rvq+s4sxW/IygfXeOZICy4In52AEhlXZjHZNJ/MS/N463cpT?=
=?iso-8859-1?Q?ABWJzbRmYT0ckTU30MdUAfrYjstU/fbN1Yp7UBMkGtJX61JgUkCtrH5QHI?=
=?iso-8859-1?Q?heslsxTyOF1tq7SqaW3LIhH5OzeTRbAYKrORUhhXAdMkKLmp0Y3ZrlYOXS?=
=?iso-8859-1?Q?9tw0p3d5eFtNULpQXXZqUgdPEyqPR3+j0ASZ0LV/zdQteRT8R04V04g3yd?=
=?iso-8859-1?Q?7INNm968JkTI7vpZ6go3OtuYjuxjuppoVRI8Y9DY3GSKfos3DpHm1LPJeO?=
=?iso-8859-1?Q?Q5s7XPuJadMzj1ti263lbVp4k/hbRdBrdmGRrw0KS6pWhR6l68b1hZSVCm?=
=?iso-8859-1?Q?aU13bmlD8hdSX3UgE5lTq5XQbsDpM2mueSy5COBLcPTO50TekA2ATNHZrf?=
=?iso-8859-1?Q?bPp4bM0sUkH6V89Bebynpb5eQ5+nwS0Y8TNM7tDFVwleHdGhx5tjRIbw6c?=
=?iso-8859-1?Q?i/5Ul9vmGWzg6D1w2ncJrmGMyTxJWuyHBEhAg+yJ+DT8ZmmqF9brdMlrnn?=
=?iso-8859-1?Q?/wELOPP7+d98c3ynE+kktXahGv7lcQgFoo3sUV0r8LVSrkOwdzMCOClmXU?=
=?iso-8859-1?Q?O1TF8PWAgLTiLGBQdb2sW4UNBkn85hY3tv3Ql4CHFb3vaZBY2l2YIOWQ?=
=?iso-8859-1?Q?=3D=3D?=
X-MS-Exchange-CrossTenant-Network-Message-Id: 2e42a4c6-db9b-470b-e38f-08dda376c5db
X-MS-Exchange-CrossTenant-AuthSource: LV3PR11MB8603.namprd11.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 14:47:48.1628
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: n+NiMRFZ5yZt+RreCisRXOVjuRoQUdnwp90nIaTH2VtUpA+XLIVfGGW5bf/4TmqeKe3YnGxJKkIHBKyBHDuPYQ==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR11MB8865
X-OriginatorOrg: intel.com
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hello,
kernel test robot noticed a 26.0% improvement of stress-ng.pipeherd.ops_per_sec on:
commit: ee5eda8ea59546af2e8f192c060fbf29862d7cbd ("pipe: change pipe_write() to never add a zero-sized buffer")
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master
testcase: stress-ng
config: x86_64-rhel-9.4
compiler: gcc-12
test machine: 64 threads 2 sockets Intel(R) Xeon(R) Gold 6346 CPU @ 3.10GHz (Ice Lake) with 256G memory
parameters:
nr_threads: 100%
testtime: 60s
test: pipeherd
cpufreq_governor: performance
Details are as below:
-------------------------------------------------------------------------------------------------->
The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20250604/202506042255.d1d90443-lkp@xxxxxxxxx
=========================================================================================
compiler/cpufreq_governor/kconfig/nr_threads/rootfs/tbox_group/test/testcase/testtime:
gcc-12/performance/x86_64-rhel-9.4/100%/debian-12-x86_64-20240206.cgz/lkp-icl-2sp7/pipeherd/stress-ng/60s
commit:
f2ffc48de2 ("Merge patch series "pipe: don't update {a,c,m}time for anonymous pipes"")
ee5eda8ea5 ("pipe: change pipe_write() to never add a zero-sized buffer")
f2ffc48de2017c69 ee5eda8ea59546af2e8f192c060
---------------- ---------------------------
%stddev %change %stddev
\ | \
138055 � 18% +33.4% 184128 � 14% cpuidle..usage
0.19 �160% +61380.1% 115.68 �185% perf-sched.wait_time.avg.ms.__cond_resched.__mutex_lock.constprop.0.anon_pipe_read
0.20 �153% +2.1e+05% 418.07 �203% perf-sched.wait_time.max.ms.__cond_resched.__mutex_lock.constprop.0.anon_pipe_read
3930 +7.8% 4235 � 3% vmstat.procs.r
7317310 � 4% -14.5% 6253797 � 10% vmstat.system.cs
1025 � 38% +135.0% 2409 � 19% sched_debug.cfs_rq:/.util_est.avg
3586492 � 4% -15.2% 3040317 � 10% sched_debug.cpu.nr_switches.avg
474729 � 17% +49.6% 710035 � 22% sched_debug.cpu.nr_switches.stddev
3.32 � 46% +1.5 4.82 � 13% perf-profile.calltrace.cycles-pp.perf_mmap__push.record__mmap_read_evlist.__cmd_record.cmd_record.run_builtin
3.32 � 46% +1.5 4.82 � 13% perf-profile.calltrace.cycles-pp.record__mmap_read_evlist.__cmd_record.cmd_record.run_builtin.handle_internal_command
3.32 � 46% +1.5 4.82 � 13% perf-profile.children.cycles-pp.perf_mmap__push
3.32 � 46% +1.5 4.82 � 13% perf-profile.children.cycles-pp.record__mmap_read_evlist
0.18 � 12% -41.7% 0.10 � 31% stress-ng.pipeherd.context_switches_per_bogo_op
107177 � 9% -28.5% 76592 � 21% stress-ng.pipeherd.context_switches_per_sec
2.331e+09 � 3% +26.0% 2.937e+09 � 10% stress-ng.pipeherd.ops
38728105 � 3% +26.0% 48797851 � 10% stress-ng.pipeherd.ops_per_sec
4.578e+08 � 4% -15.2% 3.882e+08 � 10% stress-ng.time.voluntary_context_switches
3.182e+10 +8.2% 3.443e+10 � 2% perf-stat.i.branch-instructions
0.54 � 3% -0.1 0.41 � 12% perf-stat.i.branch-miss-rate%
1.723e+08 � 3% -18.5% 1.404e+08 � 10% perf-stat.i.branch-misses
4.74 � 10% +0.6 5.31 � 4% perf-stat.i.cache-miss-rate%
2.402e+08 -22.2% 1.869e+08 � 4% perf-stat.i.cache-references
7536250 � 4% -15.0% 6402680 � 10% perf-stat.i.context-switches
1.39 -5.3% 1.31 � 2% perf-stat.i.cpi
3691320 � 6% -26.5% 2711535 � 17% perf-stat.i.cpu-migrations
1.427e+11 +6.2% 1.515e+11 � 2% perf-stat.i.instructions
0.73 +5.9% 0.77 � 2% perf-stat.i.ipc
175.44 � 5% -18.8% 142.50 � 12% perf-stat.i.metric.K/sec
0.54 � 4% -0.1 0.41 � 13% perf-stat.overall.branch-miss-rate%
4.43 � 11% +0.7 5.18 � 3% perf-stat.overall.cache-miss-rate%
1.37 -5.7% 1.29 � 2% perf-stat.overall.cpi
0.73 +6.1% 0.78 � 2% perf-stat.overall.ipc
3.128e+10 +8.3% 3.386e+10 � 2% perf-stat.ps.branch-instructions
1.692e+08 � 3% -18.5% 1.379e+08 � 10% perf-stat.ps.branch-misses
2.362e+08 -22.2% 1.839e+08 � 4% perf-stat.ps.cache-references
7395716 � 4% -15.0% 6283076 � 10% perf-stat.ps.context-switches
3621055 � 6% -26.5% 2660111 � 17% perf-stat.ps.cpu-migrations
1.403e+11 +6.3% 1.49e+11 � 2% perf-stat.ps.instructions
8.691e+12 +5.3% 9.152e+12 � 2% perf-stat.total.instructions
Disclaimer:
Results have been estimated based on internal Intel analysis and are provided
for informational purposes only. Any difference in system hardware or software
design or configuration may affect actual performance.
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Return-Path: <linux-kernel+bounces-673397-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id C12D241E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:48:56 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 1A6E5164110
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:48:57 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id AE5DC291176;
Wed, 4 Jun 2025 14:48:46 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=savoirfairelinux.com header.i=@savoirfairelinux.com header.b="JeQB3GwK"
Received: from mail.savoirfairelinux.com (mail.savoirfairelinux.com [208.88.110.44])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0CE9925C801;
Wed, 4 Jun 2025 14:48:42 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=208.88.110.44
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749048526; cv=none; b=ruqpWd97hdWdES2W4b5eNVOuXFx+MUQ3GwawaQsDQFj+eJUJ+gfTzYSuVVBd5+GqruFIFwhb0dklH+M6n2/GeZn2crBTZPRP5JMRt9juUfjoNpsKJQkczz+DG12YcJDKCWcMUNKDIIuhHNPG7VEwSMx39nj8sM52QTo/FN+Aajw=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749048526; c=relaxed/simple;
bh=iAh3S8VOuuZTZ4HbWC4OQklPUScRAN7wXnHJJOh3i9U=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=eRPpC342ppILaBacHOSrzx6e84ERmkP5UdKXry6hBSqkQI+ykZ5droC5UPSuO9JlQe8sNC4gOyNAbgqtwwhx7twDxsMr6xt6wg9/yGpoVw5GZqDa8/hYaIy4103ejiVYPoskzojJ7YlDOUYuYvzzHxP9Dkx1QubZ5RPhK1kgasM=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=savoirfairelinux.com; spf=pass smtp.mailfrom=savoirfairelinux.com; dkim=pass (2048-bit key) header.d=savoirfairelinux.com header.i=@savoirfairelinux.com header.b=JeQB3GwK; arc=none smtp.client-ip=208.88.110.44
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=savoirfairelinux.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=savoirfairelinux.com
Received: from localhost (localhost [127.0.0.1])
by mail.savoirfairelinux.com (Postfix) with ESMTP id 7C8123D852DB;
Wed, 4 Jun 2025 10:48:41 -0400 (EDT)
Received: from mail.savoirfairelinux.com ([127.0.0.1])
by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10032)
with ESMTP id VQ7zUzPCdv6W; Wed, 4 Jun 2025 10:48:41 -0400 (EDT)
Received: from localhost (localhost [127.0.0.1])
by mail.savoirfairelinux.com (Postfix) with ESMTP id E55A73D856F5;
Wed, 4 Jun 2025 10:48:40 -0400 (EDT)
DKIM-Filter: OpenDKIM Filter v2.10.3 mail.savoirfairelinux.com E55A73D856F5
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=savoirfairelinux.com; s=DFC430D2-D198-11EC-948E-34200CB392D2;
t=1749048521; bh=YT5CSr2behDQmvPervqqlHa1+NLbBpJUObmWSJIQq/Y=;
h=Date:From:To:Message-ID:MIME-Version;
b=JeQB3GwK3wTiyXogTAfOrYwGcRm8xVrhtaSj171R6hqkME5SkY4/ym+sMcOH++T3y
tmk3ZzALIR/ozEhe9tTMRPfLBi8YFnD+khmcifiZmLuUAkV+EiQjInaZdXTMt/N6zz
e24EQgG+kxWDvS3C4vDNq1wUhi2BNII8C6PwUcIYmSCR0unF21ochP0uJTed8MYpez
ZP+Kw8Nv2OAoMEbhnLtko7wJEGOXzCbyhUjUm/pFkaaMAQOw8eps4YH84qIpRbXtyE
I9zakO/U6PGJsyikSZzdq/D3EmDxYNxgHvCc00WIsQFluPLzqkVqKP2QiuBdX+4x3Y
XKfc3i0yYY8Lw==
X-Virus-Scanned: amavis at mail.savoirfairelinux.com
Received: from mail.savoirfairelinux.com ([127.0.0.1])
by localhost (mail.savoirfairelinux.com [127.0.0.1]) (amavis, port 10026)
with ESMTP id N-LkPakHOke5; Wed, 4 Jun 2025 10:48:40 -0400 (EDT)
Received: from fedora (unknown [192.168.51.254])
by mail.savoirfairelinux.com (Postfix) with ESMTPSA id 9437B3D852DB;
Wed, 4 Jun 2025 10:48:40 -0400 (EDT)
Date: Wed, 4 Jun 2025 10:48:39 -0400
From: Samuel Kayode <samuel.kayode@xxxxxxxxxxxxxxxxxxxx>
To: Mark Brown <broonie@xxxxxxxxxx>
Cc: Lee Jones <lee@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>,
Liam Girdwood <lgirdwood@xxxxxxxxx>,
Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>,
Sebastian Reichel <sre@xxxxxxxxxx>, devicetree@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-input@xxxxxxxxxxxxxxx,
linux-pm@xxxxxxxxxxxxxxx, Abel Vesa <abelvesa@xxxxxxxxxx>,
Abel Vesa <abelvesa@xxxxxxxxx>, Robin Gong <b38343@xxxxxxxxxxxxx>,
Enric Balletbo i Serra <eballetbo@xxxxxxxxx>
Subject: Re: [PATCH v4 3/6] regulator: pf1550: add support for regulator
Message-ID: <aEBcx0ySywwa4BaZ@fedora>
References: <20250603-pf1550-v4-0-bfdf51ee59cc@xxxxxxxxxxxxxxxxxxxx>
<20250603-pf1550-v4-3-bfdf51ee59cc@xxxxxxxxxxxxxxxxxxxx>
<eb1fb4e2-42aa-4795-bc6c-dbcf1fa04f11@xxxxxxxxxxxxx>
<aEBSSHA8bxw2igAW@fedora>
<f2064326-e696-48cc-8f0e-5e51c95548b5@xxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <f2064326-e696-48cc-8f0e-5e51c95548b5@xxxxxxxxxxxxx>
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 03:25:29PM +0100, Mark Brown wrote:
On Wed, Jun 04, 2025 at 10:03:52AM -0400, Samuel Kayode wrote:
> On Wed, Jun 04, 2025 at 12:35:21PM +0100, Mark Brown wrote:
> > > + switch (irq_type) {
> > > + case PF1550_PMIC_IRQ_SW1_LS:
> > > + event = REGULATOR_EVENT_OVER_CURRENT;
> > > + case PF1550_PMIC_IRQ_SW1_HS:
> > > + event = REGULATOR_EVENT_OVER_CURRENT;
> > > + case PF1550_PMIC_IRQ_LDO1_FAULT:
> > > + event = REGULATOR_EVENT_OVER_CURRENT;
> > You appear to be flagging all these events as over current events which
> > doesn't seem entirely plausible.
> It does seem like it but the manual describes these interrupts as "current limit
> interrupt". The interrupts ending in _LS are "low-side current limit interrupt",
> _HS are "high-side current limit interrupt" and _FAULT are "current limit fault
> interrupt".
That at least needs some comments I think, and for the _LS while it's
hard to parse what "low side" means my guess would be that it's a
warning to match the other interrupt being the actual error.
Yes, It certainly does need comments. The high-side sensing is more accurate
and can detect load shorts, so a warning for low side would be more appropriate.
Thanks,
Sam
Return-Path: <linux-kernel+bounces-673398-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 7784941E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:49:30 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 7A266163BD7
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:49:31 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id C2DBB290D8F;
Wed, 4 Jun 2025 14:49:24 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="V/8x8IC5";
dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="Soh7rbed"
Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7D72428DF1B
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:49:21 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749048563; cv=fail; b=SW72HtXb6kMcZQ8kvKos/V+TWkLGNEt5SFOaRbQcNDhbT+Ja7HxFCmLQ77RNBicdMjy+8DbjPV2WCKyaASkciRTo/0vIf1DgRk/SjtjUl2FrgAU2pcrZJbNk7+C5lrT0f9tN5RhpmRps3SwGBLgGtWmU2LkzWpPeXPfU1os9Nzs=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749048563; c=relaxed/simple;
bh=BlwTlCc+JO8MUQpQ0hB3wf3WsTPYDUSxyVU6V9Rt7Ps=;
h=Date:From:To:Cc:Subject:Message-ID:References:Content-Type:
Content-Disposition:In-Reply-To:MIME-Version; b=hgOmGWbdS3M+vhs6X6Uk4f8x3gEvbpa5+6v7ULTWRk0OhUktzaLXPhdaRuQuAXpe51s3A/N0Lop2Hqysu3qbDTh7799NgklbPIrz/nVHabyhzqRz+VlKMAnqJK5kw9stPAqpNPg9LdyjH0rKcLAVdslXsOcExFhrIyXa+dZwmuY=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=V/8x8IC5; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=Soh7rbed; arc=fail smtp.client-ip=205.220.177.32
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com
Received: from pps.filterd (m0333520.ppops.net [127.0.0.1])
by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 554EfvLm014542;
Wed, 4 Jun 2025 14:49:06 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc
:content-type:date:from:in-reply-to:message-id:mime-version
:references:subject:to; s=corp-2025-04-25; bh=xE/S+3fGUBD3YAM8Bj
JZGAcYlGviEX9tMWljwHQ8lGM=; b=V/8x8IC5XCZTYfq0JTt/ZAqGb1ia2emm/T
RZsOFK1XmndbKxCYmyjLzNHHA/nSg7P/UeB0nb3Bkr0aTZT6CSqyUKeZbtc5ro4t
U0IGlo+fIZc8Ki++t+HK4TCPEKopCoRsgkDvVTFulVTMvOKMmZHCnle1raRmsC3I
tMiEUbhuAj59NKVJ3oNg+jIAaICcbDA0aP1lhc/zJMyMuZdRAfirVtZO8nw0xnTO
eysX2gIA4gejjQuCR9YTL0QfwHfjsrRMRkjaV/xS4dPMHALICMva2IJ2WnPBYwSL
rKotYHGVk7Dh3aYgwqsxb3A5h8HCxMUD4plhlxN+A2KrlNiBXFew==
Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129])
by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 471gahc8q8-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 04 Jun 2025 14:49:05 +0000 (GMT)
Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1])
by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 554DXflA035106;
Wed, 4 Jun 2025 14:49:05 GMT
Received: from nam12-bn8-obe.outbound.protection.outlook.com (mail-bn8nam12on2088.outbound.protection.outlook.com [40.107.237.88])
by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 46yr7b3s2j-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 04 Jun 2025 14:49:04 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=av7JXKMiXN+R0mCB1re2zxPZMsgVYFY3PpledJvKpl4BM+s56qyHFd3JVqKo03EcwhuKhGggIHsJTLK2rZRG/lYlh3CNODOvmq1H0I1NXLqLM2kHf72N/iWX1zSY5w/0sD4MCro+8lHsYwAALn4orjo2DKAD483bwRy9nHbdQwJhEsZGrD6b2QyeB3qjO3azQOYVKKpTFyy+cCGSxfJZs6rersEyO8PMgAQKleEoGDpP3+MnUYDYaYnvuMb+3VyJ5ibEssFVjWF+K3aGOaFVjlPt7Sy5Hg13NvVcS+TqIjamMf5zYbhom1RgRWLP4kPi9ZaWsnRnkWNb8ZWqeSRzQw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=xE/S+3fGUBD3YAM8BjJZGAcYlGviEX9tMWljwHQ8lGM=;
b=mg5u1mec+kHMYdRBcZqqz3dICo7MOXAU43dSisZjz1sVbM6zPVXTddiAJNcprvPhm+czrmlL+MTQvCHa3K8i6wayIojt0GVSeRseTi11mM+JYRlxmoouh0L+Mj12QuAtOsKPuIYhivjtrInJ9LF5EKds/8KsZm8vfTJpjK64hvx+52Dfl4uXD5CN4bVx1xoGIU06aRf83acuNKO8gm3phh3bpPG3Fah7pWwFzxQweC7f7Y0NabBoobQ+mevfiMOSlWkdJ+G+CufB0MHfBDQzO6DVVebeGxNt55hWPWoiuWS9lzb/ANhLGCgPnwdMeDycsyjuEItJADbYjFTBNFEqGA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com;
dkim=pass header.d=oracle.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=xE/S+3fGUBD3YAM8BjJZGAcYlGviEX9tMWljwHQ8lGM=;
b=Soh7rbedpsQQmOqu2lsF4ugwtNFlw7aLw2yF2/WFxv+sXPd/K67VeTTNA2AxB8bG1EfcdzYtJih3jnBuh8MAK23gc/ea7BRAquNqZTxKCSIT8QncMzu/Y5SXgatpAvxZLSg+Iqr8l+svb6i3DqvFORCOII4heG3wzKKqnYaGjyw=
Received: from DM4PR10MB8218.namprd10.prod.outlook.com (2603:10b6:8:1cc::16)
by PH8PR10MB6291.namprd10.prod.outlook.com (2603:10b6:510:1c2::10) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8746.40; Wed, 4 Jun
2025 14:49:00 +0000
Received: from DM4PR10MB8218.namprd10.prod.outlook.com
([fe80::2650:55cf:2816:5f2]) by DM4PR10MB8218.namprd10.prod.outlook.com
([fe80::2650:55cf:2816:5f2%6]) with mapi id 15.20.8746.041; Wed, 4 Jun 2025
14:49:00 +0000
Date: Wed, 4 Jun 2025 15:48:58 +0100
From: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>
To: David Hildenbrand <david@xxxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>, Mike Rapoport <rppt@xxxxxxxxxx>,
Suren Baghdasaryan <surenb@xxxxxxxxxx>, Michal Hocko <mhocko@xxxxxxxx>,
Jason Gunthorpe <jgg@xxxxxxxx>, John Hubbard <jhubbard@xxxxxxxxxx>,
Peter Xu <peterx@xxxxxxxxxx>,
Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Subject: Re: [PATCH v1] mm/gup: remove (VM_)BUG_ONs
Message-ID: <fb548cd0-4a6a-4e90-92b8-24c7b35df416@lucifer.local>
References: <20250604140544.688711-1-david@xxxxxxxxxx>
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20250604140544.688711-1-david@xxxxxxxxxx>
X-ClientProxiedBy: LO2P265CA0159.GBRP265.PROD.OUTLOOK.COM
(2603:10a6:600:9::27) To DM4PR10MB8218.namprd10.prod.outlook.com
(2603:10b6:8:1cc::16)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: DM4PR10MB8218:EE_|PH8PR10MB6291:EE_
X-MS-Office365-Filtering-Correlation-Id: bb5830b6-6bb0-4e7f-4a5a-08dda376f15c
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam:
BCL:0;ARA:13230040|366016|7416014|376014|1800799024|7053199007;
X-Microsoft-Antispam-Message-Info:
=?us-ascii?Q?MnaOFYw39BB/xJMKxpb7uU1yWyJG1gMQ/nTZa+E2bHAyS2RtzI1zJ15ItSP0?=
=?us-ascii?Q?01FCM5RWTTohP460i5FIMLc0kqBGhm3o7QBoELdF57fw6LFOjDi1bAAvqR2D?=
=?us-ascii?Q?/OUJXijsDY41pDFTtwOW7oBi9Kztmn4UQZBpgxnNQQ/5CT72jHPbhwqYmTGh?=
=?us-ascii?Q?OHwMSi8zlALpbRl4K1CfztGm0mxk7bUrFu587IDHapwTRb5zqDI+enNyVKdu?=
=?us-ascii?Q?we0QJiVeDGuVVfPtmNXLGMzUhrrG3GWlTCPVEIW+YIOXhFNMgeTIo+ebFSq0?=
=?us-ascii?Q?i32th/ZzEYtXNY5mLxfJjNXMb5WMvJ20vSmQeAfa9NlubttRiYsfgIrIt8Z4?=
=?us-ascii?Q?aXIKfwcBh7jzIwkwmNwMokbOvD5Eyc4cUJIfkRrkGyLsxMz6DL5nxW8QMt1m?=
=?us-ascii?Q?VLPGoEOeOEgPplhHpIRPAdZfKpxlzuFCrsOTq/0FfMqK+06Vh4TCMzbe40fU?=
=?us-ascii?Q?FjqJqFajn15b7R1xia3o/+dweasoWFyc/PXo+3c+1QPqLcTUO/GYyJOBxIRZ?=
=?us-ascii?Q?0FY11gQrKTYvcAgT7A4WZ4L/0cb5n8Y0XTv1OAkYJC+brxBgEblJHgCElspx?=
=?us-ascii?Q?cDo0ABC+pe5kBeupakLnEekRAVSlbsj0rSVAFquVzuQv4l3hzuXWN2+sPztK?=
=?us-ascii?Q?hJRnezVi4SRaDb07d7CKwNSFxw24dlJbfxtSnQXRwHXDBANEt75DZp10QNUx?=
=?us-ascii?Q?iWUJupbRE3nW6ODyOd1gREBtZWNdcZ/NjfWykE/BSE6jzZfSTBvjKzoxbI5k?=
=?us-ascii?Q?MjQE2NBOsYpNLNu8nGaY7++ND6l/+5O/wDrNUWGiWfLhdIaj76/3Ztcfz7VQ?=
=?us-ascii?Q?Zoevzdb7yCwB3RNsu+oIasV7b9kN+/RKNKQZXkxyss0+vi2XNpxpnFfWyR02?=
=?us-ascii?Q?hMGcCoNmJmG1yMjh1ff8RS6AsUxZZYOnDy1ZfkfGnS3uwNz7BdQme53oZDmw?=
=?us-ascii?Q?8leU7m5ZoHL4YtH4jrgudZhwj7/SmU+XgwvEUCvdc8b3wKqUT7ihylGUPGS0?=
=?us-ascii?Q?4mdWk8O7s7w4iaoVpxbs+ZWAk1J8hxHZkDa5l4+fvDbd1fZ58ewb9sMLzV/F?=
=?us-ascii?Q?OvA28BifS4o71yqFzsfVXv/sOe6GLDhlVF7H9lY0xcD63xWMyBA9ZLgdJRIi?=
=?us-ascii?Q?I6AALbmOxe2DchxWStP9pVNgzRVzFcZZgQCv91RWZ31BqxQ5v8/AhL8PiIi8?=
=?us-ascii?Q?7alIyqCBvIBK7PswFrRQSrmBf0UM2rM+/hrLmJjT0d3Zlt5Jyp5o4qRZgHj1?=
=?us-ascii?Q?vy8Z1DJFRCv4OS0VCOj0ErleqBPF/qiAwUk4eaiy9KbQevifPsf0dKtV/PG5?=
=?us-ascii?Q?hWpnbkXppMGPOdIwcZpvZNLzRiPBGHvXr9s1SJ/HWITF1dUxKbhAEIwx7Hez?=
=?us-ascii?Q?UH0neJ4yG96hUBpaUn9nDK+KE9MUjkq+inT5SErKR7aza0q2AZ7twchET/0f?=
=?us-ascii?Q?J1jRZvibcnU=3D?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR10MB8218.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(7416014)(376014)(1800799024)(7053199007);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?us-ascii?Q?mKKxwUqmkBm16vbq9NwBkLB55cLP9/jnUo3wTqbALFM8nPHGIdx3aFsZXaql?=
=?us-ascii?Q?DcfInjLPvzP7ozuvzLTVQ4nKKIDH05W1uelNtskey9ZGA0S9kxQ3zCP2CqeT?=
=?us-ascii?Q?YYSa3rPYkQFd/jxzzGYR1OlwHHWmqlrfvaHxbLAC/GH2ZqVAYW+nhwikwqEs?=
=?us-ascii?Q?eroLBEk5dX6/nGyj0LC7NgkQZqyh0AILsxCK2YGStG6AT1DXMJGM7XWlwtFF?=
=?us-ascii?Q?utmfw2K+nYuRpjczIkHjcU22W1yNZWtKqxmbQeC5tJono/5QrVDet5q6M4Fb?=
=?us-ascii?Q?26XWAlrdkiYykPw9d4uTZhomoyPpxjnVy4P/jvC5umK3M0s49/+na4ar59j1?=
=?us-ascii?Q?xgNh3jPK59qoFPg1Jj0JRQ67avtRzLfqxRu3+eOB3Ax+bE+qIQ9ZcgvCxW5P?=
=?us-ascii?Q?T6J899pVRXBfNbm9OUf0RLX42t3/2hqkYuLt7p4Taq6wOFScxgzEoH6j16gw?=
=?us-ascii?Q?C9cN0Hzs3N9dzR3hNTG+b0keo1JPmsG+uh4ThXs02ArYWsYhlJwSWDqUuliT?=
=?us-ascii?Q?NbPutALS1Etzznb2aRy+Fu//SokTxoBR8Mf1UylyZdCuCB0JV6ToFC/G1ubZ?=
=?us-ascii?Q?barFChR6dpvy511+LSI//UKRkkzz/MPzskSvWE7WTdqP/fr+MdLmdSgKrvhN?=
=?us-ascii?Q?CI2mkycf6pe570uh5IC/3z8Mzn+T6P26aYBojQZRCvOrN652Ms80XenSR2sw?=
=?us-ascii?Q?0iiLYUQwjMRzvE4Pfz4rRE/saI7W7sfqzJLRGMe0THECkAhUxirkkL5hS/uL?=
=?us-ascii?Q?zskz9lBV7fEFbvekbWExc4+ZGBb7dGw59jZVhde7+qWo3tSDr20zNXDzGWiW?=
=?us-ascii?Q?py6oGBIaGfaM8UfExLGt/6oqaogF66L3UXPVhUlrsVWF0jOWqITjVODc2+/p?=
=?us-ascii?Q?I0tjaPBi6lk55Ip8YGhn0f1fTMxpc4HnGBJAg5KZGcChSw8cOxFh2mGFK1pl?=
=?us-ascii?Q?F7OEllOwjdsV+gp1Q4Hkb4clHLz3u4p5LpNRExplQYSNNXZiLnHmvzs/rWf0?=
=?us-ascii?Q?kSMraFfMawC0hVR8I9hhmYyedsVV1IYsJH7qBlAECAxGDvovcQBn3aXQGgMN?=
=?us-ascii?Q?ArAJnO9qpYE1RNmIXf81wG6sxNZE0nVuFf6IfXtKMQ3qSj2Q5mFvrn2//JO3?=
=?us-ascii?Q?wQou9vWiDuSRaAztHllLnY1GffDyB/Gyha2WU9Z8B+khYVCgzGUcFerWweoZ?=
=?us-ascii?Q?9BGRzKBDyCbL7m0Zcd0kUAt3vYUR4rWAdnVKXKVUmqXFy1tPQrxbYec+tOly?=
=?us-ascii?Q?U1AR+TfB2JRYMOBZqW5aO/p1MFXJJ7rDXNpQ3qYFKU7laUOjh4WgivglvbA2?=
=?us-ascii?Q?h9Kp6dhdNNrHgn9aYJX8c07svqvJSsKAAfL+NrI8x3KdB6QInYNK7rXvneoh?=
=?us-ascii?Q?seD7PnAb0t/CK+7AgitQGBmfxqOyRpzbiDpoELAlJQOAykgLlS+jcJCrrT+Y?=
=?us-ascii?Q?YgLfiDxrBhvpt0JUXS6f7IGpyGgxvfacTfri1/iGZh89e/UpekdsBlO1GJxS?=
=?us-ascii?Q?faBXM/7xCt/b0Ok3Tb08Uy5sSLCqZvX3WJaC0iMRgNzfbrRTXNVe5ShVQ8KD?=
=?us-ascii?Q?bST+uHs3orIRxkpPGXDBeLsMDWp2Chg8LK8QdBf8o63yXDcrufvj6t79+pFM?=
=?us-ascii?Q?vg=3D=3D?=
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0:
5v3wfkRMqo88gUNT1etYWymBjeWqfuKi3yAbqnd7BSgAbgfx2DuoV0oy9sPODjQLpcS05aztemCzx+ZUjSl766jCpfPMSXO5EbhlZGjBMcDA8Lu/otiXZwsu6ilV4b2+6Ku6LeSjSOwO5h3+kiWyID33piPb0lbUxN1EFx/H6w3xvTPRlmnVFXF2NpMYHetMBHHweHujnVWFO0F5o2pbKkDVuxnRHHS4limDqvdnUOYb0Lg1ZU1dWqrkGnsdTxp3+09yasK7UZrxoTVLEZTrVWpSycSB6tytGAbjxzobwN2xLUSUFwqd9r73XbmPgQblQ9ZYxBe1l3m4XpC3jLwNG/nh44kvBVQOHvCdzPwkCg8BPLC80Va0hIn5Wyu9rvH57IyMxZ9OeN1MxjjoMc19V2YtWbmShYNHBohYSG+SIUKjMta8EA8zQkfX8rFdXW0YxZZJDQxFIqhruyM3bh7PLDmJ+/a++s/HGK1QcxK6q3NbB19rfoV+ZmQ68jilNGE/SWtIe3a72WWMRZ/LTTR43u35LMmGuCpSn0qzGubow6AVv7iBYL896KF7o5eZ1P4dRK+0QmhQSC8/LFDePu7SdDglLhGdzu95ni0ugVtA1wA=
X-OriginatorOrg: oracle.com
X-MS-Exchange-CrossTenant-Network-Message-Id: bb5830b6-6bb0-4e7f-4a5a-08dda376f15c
X-MS-Exchange-CrossTenant-AuthSource: DM4PR10MB8218.namprd10.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 14:49:00.8221
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: 9IRpKu7cbs4VSjnaE8bWu39zvJWSzmyo7AztmmeyVWJ3qBiEsdAFfJ0wgog74wY+YA2Inb7IqEXLhjWlZMNVkMLD0n9A4r2DFRNa/dHoKfE=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR10MB6291
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 mlxlogscore=999
bulkscore=0 spamscore=0 suspectscore=0 malwarescore=0 mlxscore=0
adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1
engine=8.12.0-2505160000 definitions=main-2506040110
X-Authority-Analysis: v=2.4 cv=aqqyCTZV c=1 sm=1 tr=0 ts=68405ce2 b=1 cx=c_pps a=WeWmnZmh0fydH62SvGsd2A==:117 a=WeWmnZmh0fydH62SvGsd2A==:17 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19
a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=6IFa9wvqVegA:10 a=GoEa3M9JfhUA:10 a=Z4Rwk6OoAAAA:8 a=yPCof4ZbAAAA:8 a=VwQbUJbxAAAA:8 a=1XWaLZrsAAAA:8 a=iox4zFpeAAAA:8 a=9jRdOu3wAAAA:8 a=Ikd4Dj_1AAAA:8 a=20KFwNOVAAAA:8
a=mahIxz4hQRZhQ-iHszkA:9 a=CjuIK1q_8ugA:10 a=HkZW87K1Qel5hWWM3VKY:22 a=WzC6qhA0u3u7Ye7llzcV:22 a=ZE6KLimJVUuLrTuGpvhn:22
X-Proofpoint-GUID: -6ok24GlNzEFfV5hN5U46qAppwQY-dl3
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDExMSBTYWx0ZWRfX+VQrN8fpZO1y 4Gw88BnbMDDlT+2X7esXTFPC5jnCwB3zu+nfrbqn1Yt2/4qnvp5I3VMM+dIXNYPqC8fRKxtNtMF hte80dJC7G6jyUxSqaA6sDwgsyC/1iMkhCWwhw7LhChpiMY+PD+XLet7dhnVe/pjWyRT1RKFMvc
0DCoUChnYgK+8RRbl3WU/jn1AcEc5PTfIqlKTCXlpS+G3FCj3+NsgcgPMT2GCn1S5S+4hpuJlJm 3yPTgjgE8vqU1Gh21RPfyvKJRmkvu4UFq4zFmTFENwqqCOzdYlAlDkYkntoz7bkKm1Y2D0Fy9j9 E9jvBeHk+i2/4hHzT/QkoNl35BF92jblMQnVtAw02IycU+Dt6+TbYq8EPiDVXgBUKrJE6IxHiY8
Xcp8IYqL7Ct0aaYGKVfEN4UVVMJalTDswnW61hqpiZNmpWzAfko5pEYDUePxddwJDX+/o/RN
X-Proofpoint-ORIG-GUID: -6ok24GlNzEFfV5hN5U46qAppwQY-dl3
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
+Linus in case he has an opinion about BUG_ON() in general...
On Wed, Jun 04, 2025 at 04:05:44PM +0200, David Hildenbrand wrote:
Especially once we hit one of the assertions in
sanity_check_pinned_pages(), observing follow-up assertions failing
in other code can give good clues about what went wrong, so use
VM_WARN_ON_ONCE instead.
I guess the situation where you'd actually want a BUG_ON() is one where
carrying on might cause further corruption so you just want things to stop.
But usually we're already pretty screwed if the thing happened right? So
it's rare if ever that this would be legit?
Linus's point of view is that we shouldn't use them _at all_ right? So
maybe even this situation isn't one where we'd want to use one?
While at it, let's just convert all VM_BUG_ON to VM_WARN_ON_ONCE as
well. Add one comment for the pfn_valid() check.
Yeah VM_BUG_ON() is just _weird_. Maybe we should get rid of all of them
full stop?
We have to introduce VM_WARN_ON_ONCE_VMA() to make that fly.
I checked the implementation vs. the other VM_WARN_ON_ONCE_*()'s and it
looks good.
I wonder if we can find a way to not duplicate this code... but one for a
follow up I think :>)
Drop the BUG_ON after mmap_read_lock_killable(), if that ever returns
something > 0 we're in bigger trouble. Convert the other BUG_ON's into
VM_WARN_ON_ONCE as well, they are in a similar domain "should never
happen", but more reasonable to check for during early testing.
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>
Cc: "Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>
Cc: Vlastimil Babka <vbabka@xxxxxxx>
Cc: Mike Rapoport <rppt@xxxxxxxxxx>
Cc: Suren Baghdasaryan <surenb@xxxxxxxxxx>
Cc: Michal Hocko <mhocko@xxxxxxxx>
Cc: Jason Gunthorpe <jgg@xxxxxxxx>
Cc: John Hubbard <jhubbard@xxxxxxxxxx>
Cc: Peter Xu <peterx@xxxxxxxxxx>
Signed-off-by: David Hildenbrand <david@xxxxxxxxxx>
LGTM so,
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>
One nit below.
---
Wanted to do this for a long time, but my todo list keeps growing ...
Sounds familiar :) Merge window a chance to do some of these things...
Based on mm/mm-unstable
---
include/linux/mmdebug.h | 12 ++++++++++++
mm/gup.c | 41 +++++++++++++++++++----------------------
2 files changed, 31 insertions(+), 22 deletions(-)
diff --git a/include/linux/mmdebug.h b/include/linux/mmdebug.h
index a0a3894900ed4..14a45979cccc9 100644
--- a/include/linux/mmdebug.h
+++ b/include/linux/mmdebug.h
@@ -89,6 +89,17 @@ void vma_iter_dump_tree(const struct vma_iterator *vmi);
} \
unlikely(__ret_warn_once); \
})
+#define VM_WARN_ON_ONCE_VMA(cond, vma) ({ \
+ static bool __section(".data..once") __warned; \
+ int __ret_warn_once = !!(cond); \
+ \
+ if (unlikely(__ret_warn_once && !__warned)) { \
+ dump_vma(vma); \
+ __warned = true; \
+ WARN_ON(1); \
+ } \
+ unlikely(__ret_warn_once); \
+})
An aside, I wonder if we could somehow make this generic for various
WARN_ON_ONCE()'s?
#define VM_WARN_ON_VMG(cond, vmg) ({ \
int __ret_warn = !!(cond); \
\
@@ -115,6 +126,7 @@ void vma_iter_dump_tree(const struct vma_iterator *vmi);
#define VM_WARN_ON_FOLIO(cond, folio) BUILD_BUG_ON_INVALID(cond)
#define VM_WARN_ON_ONCE_FOLIO(cond, folio) BUILD_BUG_ON_INVALID(cond)
#define VM_WARN_ON_ONCE_MM(cond, mm) BUILD_BUG_ON_INVALID(cond)
+#define VM_WARN_ON_ONCE_VMA(cond, vma) BUILD_BUG_ON_INVALID(cond)
#define VM_WARN_ON_VMG(cond, vmg) BUILD_BUG_ON_INVALID(cond)
#define VM_WARN_ONCE(cond, format...) BUILD_BUG_ON_INVALID(cond)
#define VM_WARN(cond, format...) BUILD_BUG_ON_INVALID(cond)
diff --git a/mm/gup.c b/mm/gup.c
index e065a49842a87..3c3931fcdd820 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -64,11 +64,11 @@ static inline void sanity_check_pinned_pages(struct page **pages,
!folio_test_anon(folio))
continue;
if (!folio_test_large(folio) || folio_test_hugetlb(folio))
- VM_BUG_ON_PAGE(!PageAnonExclusive(&folio->page), page);
+ VM_WARN_ON_ONCE_PAGE(!PageAnonExclusive(&folio->page), page);
else
/* Either a PTE-mapped or a PMD-mapped THP. */
- VM_BUG_ON_PAGE(!PageAnonExclusive(&folio->page) &&
- !PageAnonExclusive(page), page);
+ VM_WARN_ON_ONCE_PAGE(!PageAnonExclusive(&folio->page) &&
+ !PageAnonExclusive(page), page);
Nit but wouldn't VM_WARN_ON_ONCE_FOLIO() work better here?
}
}
@@ -760,8 +760,8 @@ static struct page *follow_huge_pmd(struct vm_area_struct *vma,
if (!pmd_write(pmdval) && gup_must_unshare(vma, flags, page))
return ERR_PTR(-EMLINK);
- VM_BUG_ON_PAGE((flags & FOLL_PIN) && PageAnon(page) &&
- !PageAnonExclusive(page), page);
+ VM_WARN_ON_ONCE_PAGE((flags & FOLL_PIN) && PageAnon(page) &&
+ !PageAnonExclusive(page), page);
ret = try_grab_folio(page_folio(page), 1, flags);
if (ret)
@@ -899,8 +899,8 @@ static struct page *follow_page_pte(struct vm_area_struct *vma,
goto out;
}
- VM_BUG_ON_PAGE((flags & FOLL_PIN) && PageAnon(page) &&
- !PageAnonExclusive(page), page);
+ VM_WARN_ON_ONCE_PAGE((flags & FOLL_PIN) && PageAnon(page) &&
+ !PageAnonExclusive(page), page);
/* try_grab_folio() does nothing unless FOLL_GET or FOLL_PIN is set. */
ret = try_grab_folio(folio, 1, flags);
@@ -1180,7 +1180,7 @@ static int faultin_page(struct vm_area_struct *vma,
if (unshare) {
fault_flags |= FAULT_FLAG_UNSHARE;
/* FAULT_FLAG_WRITE and FAULT_FLAG_UNSHARE are incompatible */
- VM_BUG_ON(fault_flags & FAULT_FLAG_WRITE);
+ VM_WARN_ON_ONCE(fault_flags & FAULT_FLAG_WRITE);
}
ret = handle_mm_fault(vma, address, fault_flags, NULL);
@@ -1760,10 +1760,7 @@ static __always_inline long __get_user_pages_locked(struct mm_struct *mm,
}
/* VM_FAULT_RETRY or VM_FAULT_COMPLETED cannot return errors */
- if (!*locked) {
- BUG_ON(ret < 0);
- BUG_ON(ret >= nr_pages);
- }
+ VM_WARN_ON_ONCE(!*locked && (ret < 0 || ret >= nr_pages));
Yeah this is neater too :)
if (ret > 0) {
nr_pages -= ret;
@@ -1808,7 +1805,6 @@ static __always_inline long __get_user_pages_locked(struct mm_struct *mm,
ret = mmap_read_lock_killable(mm);
if (ret) {
- BUG_ON(ret > 0);
This is a really weird one... not sure why this was ever there...
if (!pages_done)
pages_done = ret;
break;
@@ -1819,11 +1815,11 @@ static __always_inline long __get_user_pages_locked(struct mm_struct *mm,
pages, locked);
if (!*locked) {
/* Continue to retry until we succeeded */
- BUG_ON(ret != 0);
+ VM_WARN_ON_ONCE(ret != 0);
goto retry;
}
if (ret != 1) {
- BUG_ON(ret > 1);
+ VM_WARN_ON_ONCE(ret > 1);
if (!pages_done)
pages_done = ret;
break;
@@ -1885,10 +1881,10 @@ long populate_vma_page_range(struct vm_area_struct *vma,
int gup_flags;
long ret;
- VM_BUG_ON(!PAGE_ALIGNED(start));
- VM_BUG_ON(!PAGE_ALIGNED(end));
- VM_BUG_ON_VMA(start < vma->vm_start, vma);
- VM_BUG_ON_VMA(end > vma->vm_end, vma);
+ VM_WARN_ON_ONCE(!PAGE_ALIGNED(start));
+ VM_WARN_ON_ONCE(!PAGE_ALIGNED(end));
+ VM_WARN_ON_ONCE_VMA(start < vma->vm_start, vma);
+ VM_WARN_ON_ONCE_VMA(end > vma->vm_end, vma);
mmap_assert_locked(mm);
/*
@@ -1957,8 +1953,8 @@ long faultin_page_range(struct mm_struct *mm, unsigned long start,
int gup_flags;
long ret;
- VM_BUG_ON(!PAGE_ALIGNED(start));
- VM_BUG_ON(!PAGE_ALIGNED(end));
+ VM_WARN_ON_ONCE(!PAGE_ALIGNED(start));
+ VM_WARN_ON_ONCE(!PAGE_ALIGNED(end));
mmap_assert_locked(mm);
/*
@@ -2908,7 +2904,8 @@ static int gup_fast_pte_range(pmd_t pmd, pmd_t *pmdp, unsigned long addr,
} else if (pte_special(pte))
goto pte_unmap;
- VM_BUG_ON(!pfn_valid(pte_pfn(pte)));
+ /* If it's not marked as special it must have a valid memmap. */
Nice to add a bit of documentation here too!
+ VM_WARN_ON_ONCE(!pfn_valid(pte_pfn(pte)));
page = pte_page(pte);
folio = try_grab_folio_fast(page, 1, flags);
base-commit: 2d0c297637e7d59771c1533847c666cdddc19884
--
2.49.0
Return-Path: <linux-kernel+bounces-673399-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id D903341E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:50:38 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 94B5D16223F
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:50:39 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 31D2229114B;
Wed, 4 Jun 2025 14:50:30 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="atKDwHQV"
Received: from mail-ua1-f48.google.com (mail-ua1-f48.google.com [209.85.222.48])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 07D8A286D4E;
Wed, 4 Jun 2025 14:50:27 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.48
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749048629; cv=none; b=gmJ7ttQ/CEt6vlECfQltMpkeXIotoBwoxWjjPWn443pjyssuzKo2/1t+zsDApXYlrzftUJa/W1ful2MfymgAHrk3FAZyy353XIpZYt7V1182zqA7sjBrxVoxirOGPH9qBHMfcbIchY+lB1bS1zAXv30Go62iuOT8AnQ4kKJLMX4=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749048629; c=relaxed/simple;
bh=lN0q7V8NXkjGQu029desiefHUwy+WczFqbl+rAq+1OU=;
h=MIME-Version:From:Date:Message-ID:Subject:To:Cc:Content-Type; b=sb1bG/ooGVa5oMBqE8KfplOFuzvRWwLdxZBWY2497ko4+rX6c4XdUF2yzNgy3t8EpJmseL3qCjCJcPsFbGNmrHJPAqdqf3eFQRYRCXh9WqVm9QURJ7LQoc1wUqGyjwoqQE29QXL1JpPuW5ZjOuPFzquG5X0LiDI4m7mL1cS3zDo=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=atKDwHQV; arc=none smtp.client-ip=209.85.222.48
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
Received: by mail-ua1-f48.google.com with SMTP id a1e0cc1a2514c-86dc3482b3dso788994241.0;
Wed, 04 Jun 2025 07:50:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1749048626; x=1749653426; darn=vger.kernel.org;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:mime-version:from:to:cc:subject:date:message-id:reply-to;
bh=lN0q7V8NXkjGQu029desiefHUwy+WczFqbl+rAq+1OU=;
b=atKDwHQV1atHKhhP0ix70naPI2R8q3AymGMpt5JTEUlzuxQTYIIbFupZQJ9P6Xucd8
BTOwBSxu6dWT0G7RaHEyfEsyNPxNIOd4i++ObjL+BGPGlYActiQFAk2sIFoqycDabxU6
MPKw2e0jv0ldYnG+p+1dLwro9oPsNyCc4dYweljqyntOSQgvFeFxhtXoo5pAc1qLVN9M
wdl2N2+WCgs38YYXjqaJfhzffuptAuAVpWj0pOVRQRcGN5va7Bhq9HoYfYDHWHdyalU1
Xqw/AGBGc3cfhpZF2UXR6F7XoIrjqMlcuO+4bHmPKfwIRpAFb13D22RkmTaO5PuDOX8k
CvLw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749048626; x=1749653426;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=lN0q7V8NXkjGQu029desiefHUwy+WczFqbl+rAq+1OU=;
b=BqJ0IruPVKcTddNpGgPLbsE8zkQSH/cAFlqt9W/b49y2h0R5+g4lV7uBAY34VU/IpJ
9177jzV62oYoDA0gHDMYLBQNfM6NC//ZHlhGNP72z25hqrqN0Sm1XThXd0xLKH/jciQ4
ZlKGQD+IGIOPHPduPVBUixgMSJ8nvRBqwuxuTqp9BKOZ/qXW4yrwM9b7BbJcFFAqPCx5
1WzSKCDALG8yDJRLNGN5wDnq+jdMxEnSbgE056NrraJB+Ws1EGFolLQa92BYxyU3bNmm
HVo0UX0JRV/HohyzvMngVtXFvSfI3t3q3+9UnHeoM+zpaHNw+AWxXhKtDIfFdjfiY8uU
xPTA==
X-Forwarded-Encrypted: i=1; AJvYcCXihZ6h5ZnNQPj67FssbQqOj3p21Zc3dywZTk0NQ10asSJJA5F7m4XR373LiSpfyCACnWQ=@vger.kernel.org
X-Gm-Message-State: AOJu0Yz0pdnNTBi1zy1occuG0w+6BTLdA5gz5Lpa3hxp8Aen/eYP3ioD
RXvPJHdDs5CfPpsmTn5OnEc0vvGEn4SiF229lK7qxKMGj6HIUAXkhz6vHz/K9PGHoWEiEI/X/jF
DumN/AuV3WReDKVQIG5GoKHwnUxiuxYUKzHwm6VE=
X-Gm-Gg: ASbGncs4XJJC6r45CbObWK3fP9zNcXfGLu6kDslcey5dSRqYe9/3w+jTXzWLKt1OfTa
Cf3r+1LwZllTeR6ecnYLfZCiC0ZGfQ2Irf/9wpb7tXwnBmT9PQOAe2cFPByT+g1RBzKQSGhvT2u
cUQPXBMKDHw8t5wDqevur14bPfzQra7Tf/
X-Google-Smtp-Source: AGHT+IHPzqTpkVNsJ+Kupb5X/KoVrEn8d0VHcraqMYvZx6zcN9aKiCfoMbzh+hlnCxEhsuXYB6Uef+rbAH0LhMsgiyQ=
X-Received: by 2002:a05:6102:5790:b0:4e2:86e8:3188 with SMTP id
ada2fe7eead31-4e74500629cmr2660283137.0.1749048626551; Wed, 04 Jun 2025
07:50:26 -0700 (PDT)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
From: Alban Crequy <alban.crequy@xxxxxxxxx>
Date: Wed, 4 Jun 2025 16:50:15 +0200
X-Gm-Features: AX0GCFt4Yh0CeLSmxc-39z7ZDpauiYM_8Y_xzo0tlTy6imi9ZMRYgfTryeGV5zQ
Message-ID: <CAMXgnP4nfgJ+gEvXLummspjRegsZsQ=e5Q8GFAONb2yCxVZLnA@xxxxxxxxxxxxxx>
Subject: Loading custom BPF programs at early boot (initrd)
To: linux-kernel@xxxxxxxxxxxxxxx, bpf@xxxxxxxxxxxxxxx
Cc: Yucong Sun <fallentree@xxxxxx>, mauriciovasquezbernal@xxxxxxxxx,
albancrequy@xxxxxxxxxxxxx
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hello,
I=E2=80=99m looking to load and attach a BPF program at early boot, that is
before the rootfs is mounted in read-write mode. This is for tracing
I/O operations on disk.
Without BPF, this can be done with a kernel module and then use Dracut
+ dkms to update the initrd. But I am looking to avoid custom kernel
modules and I would like to have a solution with BPF working on most
Linux distros without too much maintenance work for each distro.
I=E2=80=99ve noticed the bpf_preload module, but from the discussion below,=
I
gather that it does not allow to load custom bpf modules:
https://github.com/torvalds/linux/tree/master/kernel/bpf/preload
https://lwn.net/Articles/889466/
Do you know of prior-art or recommendation how to do this correctly,
and hopefully without a custom kernel module?
Best regards,
Alban
Return-Path: <linux-kernel+bounces-673400-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id F1CD841E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:51:55 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id B8FF43A4074
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:51:25 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 9E02B29116A;
Wed, 4 Jun 2025 14:51:38 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Zut3M4Lp"
Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id CFA97156C6F;
Wed, 4 Jun 2025 14:51:35 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=192.198.163.7
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749048697; cv=fail; b=ft86VzVafQFClZ3x0s0yM5rzkbF/lioA4NHuj+k6H9BQ4GdxYWTcz0TV4vRnBAtI9ePqq4zqBGsts0uZfXlWv6u4O8RO4xAglqVJ2/lmHYyfr5fZvDWFw9k+0/e7wvo7obQQ+Y8lMdeeKeRp2ZNp5ewAoJCHavFxr8Ku48VAVKo=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749048697; c=relaxed/simple;
bh=5YfZu3Ew+agyJq2mndQcSLbEP6pB40h3savqzq0P7x0=;
h=Date:From:To:CC:Subject:Message-ID:Content-Type:
Content-Disposition:MIME-Version; b=Siqv44xlgjZXefe60wYyEO4mbFvKWKhZSdO7yptcDt7wDsU17FWhjZudfb03AWht62ppBDsmm24ycp2jKOlNJT46yadxlE+7j3KZnHTfknK2/IClgfaDj3FVCQoQbX2Loxuqg7B5sPCHc1qgMIFdbqFqczYoLSHgZKZvtO9zrPk=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Zut3M4Lp; arc=fail smtp.client-ip=192.198.163.7
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
t=1749048696; x=1780584696;
h=date:from:to:cc:subject:message-id:mime-version;
bh=5YfZu3Ew+agyJq2mndQcSLbEP6pB40h3savqzq0P7x0=;
b=Zut3M4LpAwQcR9tGHhjaA6dLvkPU9N2E6204GB632wAA64fbM5ekDnfp
O3dNZ+9yTq/rDvuySVuzwdY2l4MSYNUbJQ7qKJJnF352MmXw+aoe1qkRP
cK0ouIAMF7jx5A0idQ3WRsOpSoQunKului4bvnVUHmp1+OD92Ku29/HYh
xTDr7B91UuazYSMiTlyRvgKQXinldNV36qS7BUlF765R/0XqZpty0TDsQ
EUwBHjBShy9uyQoJQ4sppEsHgYxB3CXw8Q1T3iy64FNQON/Y65FS/0br6
HGxfPY+h+RKH1CebcR5DArTyit3c82tleiYEEiAhgQOa88kcvI9Lnc1J+
w==;
X-CSE-ConnectionGUID: ixhFlyGiQhOQwtx0UB62ow==
X-CSE-MsgGUID: 5flFqYY/SESbb5WX+wbcCA==
X-IronPort-AV: E=McAfee;i="6800,10657,11454"; a="76530327"
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="76530327"
Received: from orviesa001.jf.intel.com ([10.64.159.141])
by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 07:51:35 -0700
X-CSE-ConnectionGUID: wh7uoRL3TqORDKEReIeo/g==
X-CSE-MsgGUID: uzxxF9FXTqes0VKOABl0zw==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="182388144"
Received: from orsmsx903.amr.corp.intel.com ([10.22.229.25])
by orviesa001.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 07:51:30 -0700
Received: from ORSMSX902.amr.corp.intel.com (10.22.229.24) by
ORSMSX903.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.2.1544.25; Wed, 4 Jun 2025 07:51:30 -0700
Received: from ORSEDG901.ED.cps.intel.com (10.7.248.11) by
ORSMSX902.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.2.1544.25 via Frontend Transport; Wed, 4 Jun 2025 07:51:30 -0700
Received: from NAM11-BN8-obe.outbound.protection.outlook.com (40.107.236.56)
by edgegateway.intel.com (134.134.137.111) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.2.1544.25; Wed, 4 Jun 2025 07:51:29 -0700
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=RSDJ63Usv5FTlB589qEG9TZF9aJmEPuS9GKZOvOVkiMtW/jQLpZcVSmspOL9zfw9AFbsXWVWmCmQ0Cqrgjykt5tS6xgp+1Yqc+HJQKaW3brCwDWTSLPGzJoslgV37Bu73SSHvLgdU/1YdNgyvgyFPayfMY34TpQ9KJXeW3XmaHRP0ut17Ef/B1Jb76Q+sCxFgnac3dsJp6KfbIwu5jdPE49R/8YRlrUtbCSvtOpZ5LuyCTVYVqf+Zi1zngMmhNUbXNER/lMO/6a55FwNwqHZxEnuKjMNKIzXtKx1VX4Tar3E5A/0bjdse96ygci5EFPKhwr5hoWYig0yutZ8inr9Vw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=N1iHVBBnMHqV0fsQblfDyl4YR3VGaoylB+hENkSqPDc=;
b=dznZuzDP9oXZUYgUUCq+LG4Cby8Ibb6C40vly5anwQLyXKqdLwqPHtg03rKKYiQJrO6uSDi32rTPA0PRIX/yy+g7q5AWMorzjJhIyPTSqpIZe9U6rR5c3MGT3xFC/p/1YvcV9uW4SGQ99dN87orP4Yo75iSVrSmEHMipQmdGqJdxjQQaL5s3ZH4SItt/6bT0vFK+6Blj+eYbNTP0gzggWEt1Vz2BRrBOd3N4YngMqecVzaEqg+Tn8O+ua+Q9UwN2Ol9DO/Kpv8qVI5seWNrkM3QvlFgOoVHuy6P9N0iVY/ToimK9Ph6hEH4flQMW0VA4EtFxxCyqdofURP3CZqmV0w==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com;
dkim=pass header.d=intel.com; arc=none
Authentication-Results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=intel.com;
Received: from LV3PR11MB8603.namprd11.prod.outlook.com (2603:10b6:408:1b6::9)
by CH2PR11MB8865.namprd11.prod.outlook.com (2603:10b6:610:282::12) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8769.29; Wed, 4 Jun
2025 14:51:26 +0000
Received: from LV3PR11MB8603.namprd11.prod.outlook.com
([fe80::4622:29cf:32b:7e5c]) by LV3PR11MB8603.namprd11.prod.outlook.com
([fe80::4622:29cf:32b:7e5c%3]) with mapi id 15.20.8792.034; Wed, 4 Jun 2025
14:51:26 +0000
Date: Wed, 4 Jun 2025 22:51:17 +0800
From: kernel test robot <oliver.sang@xxxxxxxxx>
To: Qu Wenruo <wqu@xxxxxxxx>
CC: <oe-lkp@xxxxxxxxxxxxxxx>, <lkp@xxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>,
David Sterba <dsterba@xxxxxxxx>, <linux-btrfs@xxxxxxxxxxxxxxx>,
<oliver.sang@xxxxxxxxx>
Subject: [linus:master] [btrfs] 8af94e772e: xfstests.btrfs.220.fail
Message-ID: <202506042235.7e3a37da-lkp@xxxxxxxxx>
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
X-ClientProxiedBy: SI1PR02CA0051.apcprd02.prod.outlook.com
(2603:1096:4:1f5::6) To LV3PR11MB8603.namprd11.prod.outlook.com
(2603:10b6:408:1b6::9)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: LV3PR11MB8603:EE_|CH2PR11MB8865:EE_
X-MS-Office365-Filtering-Correlation-Id: 7a8cdd6b-a3a1-4b14-aa40-08dda377483e
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|366016;
X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?5EkUt5DZdZJXYHe6nmiQCLTop4C+P0OjvOeJLhiqoAzJMh4CUL9K1nnETNnn?=
=?us-ascii?Q?PGGgstZazlIS7POPJk2960IRxXsQ4WV783Xnvp3DIIqQAtTjfBTHuLptRCpG?=
=?us-ascii?Q?DTqQfKiTxsFvG6K5yYWCfZyOtr0GbQFw3GGaQHuuQNG7fzohV38PVM5GUEjc?=
=?us-ascii?Q?znr9rtyRYM/vUtME11JmyGinrmkuXkMCi0OK1qTyxWdx7CIwziH71i8X55JX?=
=?us-ascii?Q?CFtgk7U3HrRjWVQMWaWkuguaWHt0g/O9aSpfHa1qa+z4Y41RIKo151007lfz?=
=?us-ascii?Q?l5Iw8D7z0ubQ7OZqQCWv8Gr45/dx97OMN7N814FKaTYYYmbLR/VQIwR2BH5i?=
=?us-ascii?Q?EwdXsiUGsEhrgfkbIQ3ujrzDA1JXljroLVyMV/LrYfXjrSkWhgDZzU/hRKdv?=
=?us-ascii?Q?mdw6uEPtFLSBFyUosi99hUXl48ne6GjdC3wNSzByer2Dkvc4VxVhqlJUd4Xb?=
=?us-ascii?Q?SustZm/t5GRMX3oS8WowxbKEXdoYnVJga27HcA4yKkkwmMy+Wvrhe4GcRJfF?=
=?us-ascii?Q?7iidLS4Gn0zT/VLSE4EgfzldWbRxM+pXLhCqRlczJ6Vi54U09BAJJr/vmt7L?=
=?us-ascii?Q?v7JEJzjxrY3XD9pKA1NGtUeZwTBR1gTOCIT01Wi+71Ykd5UC44uqKul0vZNN?=
=?us-ascii?Q?DAvMSmrUyk23DFf0/Kp8p364OD8tZIyEY1iyQB3wKmYY1Pjve01BCeTU/HW5?=
=?us-ascii?Q?U2wvAJdM8hserUttT/+KC94SEJ2t7eyXoOV6SqFyGl81FMJ+HSIkrN9NC7+5?=
=?us-ascii?Q?iKAoSqp5fJyoei1LrgJQf9ZwhSbKxU0nROBzIFga6mOWxGf52IfuIIbrSo+2?=
=?us-ascii?Q?gz5ltFHc5qkgHkGRiQOYWxZzSXXF5jBIs4B0YrLpNUPb9/CA2OVu5Ya1suYC?=
=?us-ascii?Q?/y5f2jnPn8DKM2ByJfaQnFvhQCKEOjhtu6EEVuB4VfWSWKjM2ZiZI7bFuUoI?=
=?us-ascii?Q?+mwMBq49KqcCqSviAYEubfonQkAWCTihSgKNI86Ih7KS2Oc36rFqqLSx2hSh?=
=?us-ascii?Q?RS8SVql78ZqQL4yUqB62t+tOBfa3uitSstZD+K7eeOwYx47QBApfrE6vLgWW?=
=?us-ascii?Q?xHHQP9m8R8wF/1TgGiVju/mepwJOU1QAVNgyX3lVgjvpkPXpGUPebBV0ClR+?=
=?us-ascii?Q?rnMU324F5+8azsMxtKI2zkN3vzwxfRa8ZaccESMM85415TIAJg4+do/3kYvf?=
=?us-ascii?Q?U4tSvZHHOK77Mc/JPaDR0oV9LnufdlTyihSeBBIVHzbmRZ4yNFq3oxBbNjzG?=
=?us-ascii?Q?GK7dqfEOPMZ6bPkkTAyb0RDo4p2+pen9aFjRqI0IXFaDMPzvPSjV07J2gLx/?=
=?us-ascii?Q?589ow8lI5XsvrcHwYE7QKgRt7jeg/Qs04T2YTNi3Y7A92021GJ9WopKtzkUp?=
=?us-ascii?Q?oR3HzlJ9yIvbj8RTh+9vV5jvHuBY?=
X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:LV3PR11MB8603.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(376014)(366016);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?m3MeYPCAcNDwTEE/idWrZ9T5obke3Deu6eHcNu7e09j05gasc87lOmzRN2Su?=
=?us-ascii?Q?Yc1IM3/V3/GXgdZZPBrmUcIgrN+3KyFWNl0D5WZaQP4VHaUFpiSe7VkluxNY?=
=?us-ascii?Q?qiky6ADLDizXvE7YdfAu2OFrvmzXZm96R3MVMmCaTn7g6RM4zamYDhaevXNs?=
=?us-ascii?Q?bzu9CrVwFGsM7QRJu97l5g+dJQos/HsJ4uK59vTlmG7y+lei0v1JlJdAGjnV?=
=?us-ascii?Q?mtcBnXKX9P1oXybG2G4f8ctlMuFOCg/18oVpRsEvyz70wuPlh2+k47HaYc4M?=
=?us-ascii?Q?U9bUhGHi9LbEN+W+T+t6yqq2LMV5i9cocoHkfMlRLUsZBJZLfS6nQLw/lxs8?=
=?us-ascii?Q?tk9TyCi70iRJ4h7rvYq0TG86Rn2DhPshjIhgqznO+S5FDFRK4E90dOym9iT8?=
=?us-ascii?Q?6D6yYCproIO6lOyXkGcEs4qIE4mWztuzs7GcFJVhuP05cFbdA6WCfVLpfyM4?=
=?us-ascii?Q?e2F/xxvULW2IMQhK29OeCjqm0P3665sPQr68xhcBk9qrc/+QCUdUQ2s7TeZW?=
=?us-ascii?Q?2z/ZXckfCATul0KxKRQCoQPGjD4a/KnkWEoGJtNrbIOJBeO8kgJww5qLPAlG?=
=?us-ascii?Q?yiSjYNb5Qhic/3qiIKVjw2vk6Z0tAszvtSSm3gvDHR0faoy+7XNib2XyF+tZ?=
=?us-ascii?Q?vkVII1iYWgWK5U27w6doV5kp6AUf0ZXFuSYOVlKbCdhO/tE9EUXdayoDDWWw?=
=?us-ascii?Q?Chv2uSGITuQLLRltqrwziz9VKgpq/58UTb8gLptM7bY1/EgtHOiq3lec8WM5?=
=?us-ascii?Q?1DaAqOj1gGp3qaJAhbtr3HQ8zpfbBKFtRJPapXGaUP9dIf7wNJmofJsH5mcK?=
=?us-ascii?Q?yHQQLYwLwDOYdAhVNn3+sFxSO5/RbwWhvGquqofR8rH14/yIBTEcwmciJy4o?=
=?us-ascii?Q?xSdNU7dNUiAs2nmAo1OSTBHqvfil5NvQzjmYaXsQRfW0iLT7DC17zFMr0qMU?=
=?us-ascii?Q?OAceq2txD5J/sxSfqtuyGH8lz2kfwG4ZsOX8W1EvCB0FrSSbYtmbbpvBOmed?=
=?us-ascii?Q?8HRlQvEwRzsFzpcFIim5KMWp+rNRwFh3C5RobVdeJaHLItzmULTZWtMxlU6F?=
=?us-ascii?Q?ZfYJegAm84xRNLh63C7fE0dhEIGIXHI015qDBOK84HVd4Cy1jgGCdKkw9tLK?=
=?us-ascii?Q?g8ylYTA/oXhFHqwUQNLI0Lo8PInRLWG90xnUbqiyn7peQ7GpT1kYkThnZdA5?=
=?us-ascii?Q?kCAcUekRNH+hAzu/E/3Il6vJZ21GvBdi1LqTQQOCbdhqK7pHrDy4r/2imShC?=
=?us-ascii?Q?XuIhIs0lkEiFUXWOdn1oFawQOo/e5uRlen08LEwFNQHmWVpHy4PFNTWSmx6n?=
=?us-ascii?Q?3WjhTPgN/+wm0SWW5Hs+M8ScbXAwX7P4VXRoJvjnZr1dv5ks2UX3fD8rnjmq?=
=?us-ascii?Q?a8CF0b9YlhAzY+tFSmwYkJZ35Jg8ctOryLjkd2rHXT8IdTY3DUuyeOuhuga/?=
=?us-ascii?Q?uJRyOJvVN2B4YHRZcv85ctNe7gGgufzTI/z+5kAjHkty89QQUUz+yEP0NIvI?=
=?us-ascii?Q?rvPnBN5JTWPPBCm7mAWH5tiolEYjJBl8z9ilO8WfW7sRC/za/yDnM2ldYxLg?=
=?us-ascii?Q?FfpZJY7pPceLnlBplNUqXngJNMewcHmjSILf3MNeROWQ7S5WzR/dOyAEB6+B?=
=?us-ascii?Q?cQ=3D=3D?=
X-MS-Exchange-CrossTenant-Network-Message-Id: 7a8cdd6b-a3a1-4b14-aa40-08dda377483e
X-MS-Exchange-CrossTenant-AuthSource: LV3PR11MB8603.namprd11.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 14:51:26.7370
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: 28Axv1Ut44FUz+Gka31oMKuCMv53+Qw2ePMVRjLSfHv/W7mE26k84xdP4H4N3Ki2kiv4nwsp6cdI2NIHvInQ5w==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR11MB8865
X-OriginatorOrg: intel.com
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hello,
kernel test robot noticed "xfstests.btrfs.220.fail" on:
commit: 8af94e772ef7bede90895318a3fda6c68a652774 ("btrfs: remove standalone "nologreplay" mount option")
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master
[test failed on linus/master 7d4e49a77d9930c69751b9192448fda6ff9100f1]
[test failed on linux-next/master 3a83b350b5be4b4f6bd895eecf9a92080200ee5d]
in testcase: xfstests
version: xfstests-x86_64-e161fc34-1_20250526
with following parameters:
disk: 6HDD
fs: btrfs
test: btrfs-220
config: x86_64-rhel-9.4-func
compiler: gcc-12
test machine: 8 threads 1 sockets Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz (Haswell) with 8G memory
(please refer to attached dmesg/kmsg for entire log/backtrace)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <oliver.sang@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-lkp/202506042235.7e3a37da-lkp@xxxxxxxxx
2025-06-01 10:11:00 export TEST_DIR=/fs/sdb1
2025-06-01 10:11:00 export TEST_DEV=/dev/sdb1
2025-06-01 10:11:00 export FSTYP=btrfs
2025-06-01 10:11:00 export SCRATCH_MNT=/fs/scratch
2025-06-01 10:11:00 mkdir /fs/scratch -p
2025-06-01 10:11:00 export SCRATCH_DEV_POOL="/dev/sdb2 /dev/sdb3 /dev/sdb4 /dev/sdb5 /dev/sdb6"
2025-06-01 10:11:01 echo btrfs/220
2025-06-01 10:11:01 ./check btrfs/220
FSTYP -- btrfs
PLATFORM -- Linux/x86_64 lkp-hsw-d01 6.15.0-rc6-00302-g8af94e772ef7 #1 SMP PREEMPT_DYNAMIC Sun May 18 15:54:12 CST 2025
MKFS_OPTIONS -- /dev/sdb2
MOUNT_OPTIONS -- /dev/sdb2 /fs/scratch
btrfs/220 [failed, exit status 1]- output mismatch (see /lkp/benchmarks/xfstests/results//btrfs/220.out.bad)
--- tests/btrfs/220.out 2025-05-26 16:25:04.000000000 +0000
+++ /lkp/benchmarks/xfstests/results//btrfs/220.out.bad 2025-06-01 10:11:04.131877139 +0000
@@ -1,2 +1,5 @@
QA output created by 220
-Silence is golden
+mount: /fs/scratch: wrong fs type, bad option, bad superblock on /dev/sdb2, missing codepage or helper program, or other error.
+ dmesg(1) may have more information after failed mount system call.
+mount -o nologreplay,ro /dev/sdb2 /fs/scratch failed
+(see /lkp/benchmarks/xfstests/results//btrfs/220.full for details)
...
(Run 'diff -u /lkp/benchmarks/xfstests/tests/btrfs/220.out /lkp/benchmarks/xfstests/results//btrfs/220.out.bad' to see the entire diff)
Ran: btrfs/220
Failures: btrfs/220
Failed 1 of 1 tests
The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20250604/202506042235.7e3a37da-lkp@xxxxxxxxx
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Return-Path: <linux-kernel+bounces-673401-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 036A941E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:52:00 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 2B5E2167CA2
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:52:00 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 16631290DB1;
Wed, 4 Jun 2025 14:51:48 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Zhr0gPrR"
Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0442728E5F9
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:51:45 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.43
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749048707; cv=none; b=QaNK7sMNDomLFwe2vfspyaD2Lf84a+Gzj04O6xG2txwlKal2JYGxg/Zf2kUt3jqUFgyP8f28s8A+Ila9D+YXxgNdTlIVuvyUS0YSkTix3FY4xBWov/3gABlL8d+96T2dG3f2ty4n3RfznH94oiC5JsneGUtZPyL2DL6E1yhUJeI=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749048707; c=relaxed/simple;
bh=veZA9K4vWZMYgmiPCVxICQpb/n5o5wxx2w15FU1JhmY=;
h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
To:Cc:Content-Type; b=A/BgvX42jjHfNWY6MS7CEU+RRUQmp2D02f6uYGiXzrJipDo1QsRfcvTKVn5Ic4oxrE38lHA6oDsMd4pq+cpjSTGlwCPzI6qlzbK3pUVV2TiB9L5rM2GyfFF3+3vfotJk7a9/vILQI8xdQU+LemSAoicchfk1xJ2c/zbEdsRlgbg=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Zhr0gPrR; arc=none smtp.client-ip=209.85.216.43
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
Received: by mail-pj1-f43.google.com with SMTP id 98e67ed59e1d1-312a806f002so500722a91.3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 07:51:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1749048705; x=1749653505; darn=vger.kernel.org;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:from:to:cc:subject:date
:message-id:reply-to;
bh=AVa8Qq+qX2ca3yq1SCHBs+6bwMYdjHXn9QCvwLrSQxQ=;
b=Zhr0gPrRHlCSHleRAz1HiDb2aWbw2wGD+UZxejXRd40XiAUurE/YaK+2/niib2MeKf
7SMiiuywAV8t9MeVCoDw5zu+atn9bwfvC1Wy33SgDnbEuVR8oSzxfwPvdNOIEKzgEJ2i
68Mu9eoQxNgNf4jH6nktmkAmeLJof10jK6lHloZLpmRVqmQQhmAJPnW8Xj4edSzEgplm
XW6kC0HoVLkoq+Khuda9+ct5ZRA2PCLBH91aiyXIAaRFaq+rXXsL8c4mrzqcR8iFLN1Q
Yk8O4oNRVmOFRhbmCXmVEAYGfWyg62y5Tr2aqvYozsYVx3VqaYtlX3a17NNTkkGkVakY
QyXg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749048705; x=1749653505;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=AVa8Qq+qX2ca3yq1SCHBs+6bwMYdjHXn9QCvwLrSQxQ=;
b=hCUwgEFjlVVfMUj5MqDVYWdGHA42vKa5bGxRRLje4KCIRo+U9L9WmoE2FRlBo18JlW
XQy6gfLRyoRQj6zCvUfNw879WgFj16DKJ3AQWoTlwDIplWfqfJ153j0Txp3MwctI/cKB
VXs4Mx+BUnxk6tS2++PG2ZsjWf9dPLQdvo1wlX/9wdejH9R9plxNo6HYRiwvs13hxHXT
UgyRqlbH2QIP2ENBlC+STyoMtQ5TLWnxsbBzMjgcvIbLX4G1245vDN2jvKihjxf+O0z3
Qxgp0adXAdEjezeqTPofM+SCsSoYCHgbxVWiXwBmlkp4eiE4iKAhcNguvQOqX8Y7j1xN
Bqng==
X-Forwarded-Encrypted: i=1; AJvYcCUe5UBQ3+FiLGrnWDLDowWcNzjWVgvTB8WvON+tvnBtnehxX0A7ck7K55joil7QNA+FYtZUdTSBsuoS8nM=@vger.kernel.org
X-Gm-Message-State: AOJu0Yy2vgimVg7mzwoJZ53mCVhTIeZDerzR8yF7ndOxPv9aiKgWlpl1
3sJ3eaEJop4CeNQ50aCB8n7GwPD301QWbJDAf9u6Zt+34FP0ckcz21hbCKhVc0G3mdTHILfqS8q
p22tMjYp7ng1dFg8vI3ts24tVX++sQRUT6w8a
X-Gm-Gg: ASbGncuBNX8AbxC3OPNG/cUzKqlFsskbOrHvOD6tq/fWLoAS5siiNEVTBLOjL1T2xxE
ZGZrrkTSj2p2TIcjEy9i1PGufN1JHsYYeAa4bVDpMz2FjiDoGFajqHIbnhE+39sOAwSWwTMnKiK
JsKqkRM58O0mYu1YLhzfENUc7Spr0+T9r/4Q==
X-Google-Smtp-Source: AGHT+IEXhbBU5Ad6IMEuXf05cu8wNhInf6Dr5JPGtJC47oiJd4VMATt6Jx4PUI5odSmqlnX6gbZ4IHvUxsdlUZ55jno=
X-Received: by 2002:a17:90b:180c:b0:311:c939:c842 with SMTP id
98e67ed59e1d1-3130cd7eab2mr1699539a91.7.1749048705130; Wed, 04 Jun 2025
07:51:45 -0700 (PDT)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
References: <20250604143217.1386272-1-lizhi.hou@xxxxxxx>
In-Reply-To: <20250604143217.1386272-1-lizhi.hou@xxxxxxx>
From: Alex Deucher <alexdeucher@xxxxxxxxx>
Date: Wed, 4 Jun 2025 10:51:33 -0400
X-Gm-Features: AX0GCFuFLQhl24WQZAscJZ2gULKE1SWhCQ5ymXTk-y5XTHc0fhk0LJCRP8nA58U
Message-ID: <CADnq5_NMamTAd0whqwr+xcokFThCNX7T7qFBfX+u3vnS6oc=tA@xxxxxxxxxxxxxx>
Subject: Re: [PATCH V1] accel/amdxdna: Fix incorrect PSP firmware size
To: Lizhi Hou <lizhi.hou@xxxxxxx>
Cc: ogabbay@xxxxxxxxxx, quic_jhugo@xxxxxxxxxxx,
jacek.lawrynowicz@xxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, max.zhen@xxxxxxx, min.ma@xxxxxxx,
sonal.santan@xxxxxxx, mario.limonciello@xxxxxxx
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 4, 2025 at 10:42=E2=80=AFAM Lizhi Hou <lizhi.hou@xxxxxxx> wrote=
:
The incorrect PSP firmware size is used for initializing. It may
cause error for newer version firmware.
Fixes: 8c9ff1b181ba ("accel/amdxdna: Add a new driver for AMD AI Engine")
Signed-off-by: Lizhi Hou <lizhi.hou@xxxxxxx>
---
drivers/accel/amdxdna/aie2_psp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/accel/amdxdna/aie2_psp.c b/drivers/accel/amdxdna/aie=
2_psp.c
index dc3a072ce3b6..f28a060a8810 100644
--- a/drivers/accel/amdxdna/aie2_psp.c
+++ b/drivers/accel/amdxdna/aie2_psp.c
@@ -126,8 +126,8 @@ struct psp_device *aie2m_psp_create(struct drm_device=
*ddev, struct psp_config *
psp->ddev =3D ddev;
memcpy(psp->psp_regs, conf->psp_regs, sizeof(psp->psp_regs));
- psp->fw_buf_sz =3D ALIGN(conf->fw_size, PSP_FW_ALIGN) + PSP_FW_AL=
IGN;
- psp->fw_buffer =3D drmm_kmalloc(ddev, psp->fw_buf_sz, GFP_KERNEL)=
;
+ psp->fw_buf_sz =3D ALIGN(conf->fw_size, PSP_FW_ALIGN);
+ psp->fw_buffer =3D drmm_kmalloc(ddev, psp->fw_buf_sz + PSP_FW_ALI=
GN, GFP_KERNEL);
Why do you need the extra PSP_FW_ALIGN in the allocation?
Alex
if (!psp->fw_buffer) {
drm_err(ddev, "no memory for fw buffer");
return NULL;
--
2.34.1
Return-Path: <linux-kernel+bounces-673402-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id B10DB41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:54:42 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id E93353A41D1
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:54:20 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 665CD28FFCB;
Wed, 4 Jun 2025 14:54:40 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="dcqkK06A";
dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="VJ7OWk5m"
Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 97FE7244676
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:54:37 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749048879; cv=none; b=c52MpRlVwqMr8eueiqkvChUFfbLsnOlAu1WVa/FZnreqTgXEHkE20L5B8Mkb6vBUMx+cwdSt0hHVgUnXA977roAvmQmxsUk/tctCqGH6706pFrYY19k6GTzHH3jYKqqlrVRb6ICtMd/kTlbr7HP/0hkwgGLojxpFPLpqoZSBocw=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749048879; c=relaxed/simple;
bh=sgeP8nwiGIpuBx+dgMdGkb+1cKr9369mNa9Bxpd/9KA=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=ntDji7G6aehHydNeGNd24oG4s7MEZDK9gM5wO9oZb9PjLyVfEsV2qfxENOD0gUSY0nCGbx4RmDkV1ABYDDMOskNEGAIb4kL4ZaWWWJZADYzAenUhTbaHZOsKRH5BLYV5pS1tEieMi8S9w8+kmcTDsz91xXCGaQNKD814svIWqxo=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=dcqkK06A; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=VJ7OWk5m; arc=none smtp.client-ip=193.142.43.55
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de
Date: Wed, 4 Jun 2025 16:54:33 +0200
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de;
s=2020; t=1749048875;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references;
bh=t+GklqgiXpfWwoTgD2+sv9pbUA69eJpokVhh8L8oICU=;
b=dcqkK06A1rVjMD0wieSFSbduiVIO9omZirRP8PECZc4XneznS/0oswirwDRKoe+Q7LIt5A
3b3j07U5MQaTKEZGgAkFLLtzDvD2239q3Y6l+LpTajAurIO7+hQGpSVdbg11g+iHA5h85Y
I8iq+44oPnYmThtBERVjNnDvtF+Q9MSFKJBzWEtjg7spOEdMezTdZQnz0ylhRmP6wWvUxJ
k/SvAdBRFA/u0x5VRfUeIDT60RMEh8Iq3yBTRvCoEuUNXzpMfHr4cs07bjyJOSez5yMG0b
SfGTQncXCdT4uNyINoxhPFMLS7kpbiGHC6Q/OQraf5sVLlhLNhEo4M63QGmFdw==
DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de;
s=2020e; t=1749048875;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references;
bh=t+GklqgiXpfWwoTgD2+sv9pbUA69eJpokVhh8L8oICU=;
b=VJ7OWk5mBO5UiReza7CCbxlgGl1bLsJc7SEzhFIPete8XM3hEYkHvH9cMlNQZaLgn25F8F
OfMMiFJmdC+SR8Cg==
From: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
To: Steven Rostedt <rostedt@xxxxxxxxxxx>
Cc: Prakash Sangappa <prakash.sangappa@xxxxxxxxxx>,
linux-kernel@xxxxxxxxxxxxxxx, peterz@xxxxxxxxxxxxx,
mathieu.desnoyers@xxxxxxxxxxxx, tglx@xxxxxxxxxxxxx,
kprateek.nayak@xxxxxxx, vineethr@xxxxxxxxxxxxx
Subject: Re: [PATCH V5 1/6] Sched: Scheduler time slice extension
Message-ID: <20250604145433.KCPMF8zm@xxxxxxxxxxxxx>
References: <20250603233654.1838967-1-prakash.sangappa@xxxxxxxxxx>
<20250603233654.1838967-2-prakash.sangappa@xxxxxxxxxx>
<20250604103106.1465f847@xxxxxxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
In-Reply-To: <20250604103106.1465f847@xxxxxxxxxxxxxxxxxx>
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 2025-06-04 10:31:06 [-0400], Steven Rostedt wrote:
On Tue, 3 Jun 2025 23:36:49 +0000
Prakash Sangappa <prakash.sangappa@xxxxxxxxxx> wrote:
=20
> @@ -2249,6 +2251,20 @@ static inline bool owner_on_cpu(struct task_stru=
ct *owner)
> unsigned long sched_cpu_util(int cpu);
> #endif /* CONFIG_SMP */
> =20
> +#ifdef CONFIG_RSEQ
> +
> +extern bool rseq_delay_resched(void);
> +extern void rseq_delay_resched_fini(void);
> +extern void rseq_delay_resched_tick(void);
> +
> +#else
> +
> +static inline bool rseq_delay_resched(void) { return false; }
> +static inline void rseq_delay_resched_fini(void) { }
> +static inline void rseq_delay_resched_tick(void) { }
> +
> +#endif
> +
=20
Can we add a config to make this optional. I don't want to allow any task
to have an extended timeslice over RT tasks regardless of how small the
delay is.
I asked to get RT tasks excluded from this extensions and it is ignored.
Maybe they were benefits mentioned somewhere=E2=80=A6
-- Steve
Sebastian
Return-Path: <linux-kernel+bounces-673403-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 7084041E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:55:17 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id C18DF3A415B
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:54:55 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 417B229114B;
Wed, 4 Jun 2025 14:55:10 +0000 (UTC)
Received: from foss.arm.com (foss.arm.com [217.140.110.172])
by smtp.subspace.kernel.org (Postfix) with ESMTP id B38F528FFCB;
Wed, 4 Jun 2025 14:55:07 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749048909; cv=none; b=ICwpzzsJldL5Ya37/JhvZT4V5TM2NMNzu5iBo85Yqr8oGbAPzf/wd544c98hIlO8R3n6iPFQNkqR3TucLgc4wb18y9DI8R89Q5rr74xvnY0Z6uhYP5NG6t3inQgzr5Q3dHLHGiFlthRatEjbx2TbCqnhxMdAy8sEppHIcQWTDpk=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749048909; c=relaxed/simple;
bh=HOlvILzQbzz5g/GGLiJxW+I2MtTR7FvGq/Gxnu+WYDU=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=LAEETUyZg56riBWVkFKPxKgf6xDk7jCwt7KXvHe3mlxquc+k+gN54diZ33GmX1pzgCGdJMoVnAkjpd7P/ZhwV8koctUyAWNmKi/D9u8EJZReYvZoXGP+ApjJHxuzhK4d0g80jN6F4P29KSlXbRrPHZjGh9iRneaIfr2GHIkjflQ=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com
Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14])
by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C6D3D1758;
Wed, 4 Jun 2025 07:54:49 -0700 (PDT)
Received: from J2N7QTR9R3 (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14])
by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 38F4D3F59E;
Wed, 4 Jun 2025 07:55:04 -0700 (PDT)
Date: Wed, 4 Jun 2025 15:55:01 +0100
From: Mark Rutland <mark.rutland@xxxxxxx>
To: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Baisheng Gao <baisheng.gao@xxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>,
Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>,
Namhyung Kim <namhyung@xxxxxxxxxx>,
Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>,
Jiri Olsa <jolsa@xxxxxxxxxx>, Ian Rogers <irogers@xxxxxxxxxx>,
Adrian Hunter <adrian.hunter@xxxxxxxxx>,
"reviewer:PERFORMANCE EVENTS SUBSYSTEM" <kan.liang@xxxxxxxxxxxxxxx>,
"open list:PERFORMANCE EVENTS SUBSYSTEM" <linux-perf-users@xxxxxxxxxxxxxxx>,
"open list:PERFORMANCE EVENTS SUBSYSTEM" <linux-kernel@xxxxxxxxxxxxxxx>,
cixi.geng@xxxxxxxxx, hao_hao.wang@xxxxxxxxxx
Subject: Re: [PATCH] perf/core: Handling the race between exit_mmap and perf
sample
Message-ID: <aEBeRfScZKD-7h5u@J2N7QTR9R3>
References: <20250424025429.10942-1-baisheng.gao@xxxxxxxxxx>
<aEBSt2LN7YhxYX7N@J2N7QTR9R3>
<20250604142437.GM38114@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20250604142437.GM38114@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
X-Spam-Status: No, score=-3.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 04:24:37PM +0200, Peter Zijlstra wrote:
On Wed, Jun 04, 2025 at 03:05:43PM +0100, Mark Rutland wrote:
> Loooking at 5.15.149 and current HEAD (5abc7438f1e9), do_exit() calls
> exit_mm() before perf_event_exit_task(), so it looks
> like perf could sample from another task's mm.
>
> Yuck.
>
> Peter, does the above sound plausible to you?
Yuck indeed. And yeah, we should probably re-arrange things there.
Something like so?
That should plumb the hole for task-bound events, yep.
I think we might need something in the perf core for cpu-bound events, assuming
those can also potentially make samples.
From a quick scan of perf_event_sample_format:
PERF_SAMPLE_IP // safe
PERF_SAMPLE_TID // safe
PERF_SAMPLE_TIME // safe
PERF_SAMPLE_ADDR // ???
PERF_SAMPLE_READ // ???
PERF_SAMPLE_CALLCHAIN // may access mm
PERF_SAMPLE_ID // safe
PERF_SAMPLE_CPU // safe
PERF_SAMPLE_PERIOD // safe
PERF_SAMPLE_STREAM_ID // ???
PERF_SAMPLE_RAW // ???
PERF_SAMPLE_BRANCH_STACK // safe
PERF_SAMPLE_REGS_USER // safe
PERF_SAMPLE_STACK_USER // may access mm
PERF_SAMPLE_WEIGHT // ???
PERF_SAMPLE_DATA_SRC // ???
PERF_SAMPLE_IDENTIFIER // safe
PERF_SAMPLE_TRANSACTION // ???
PERF_SAMPLE_REGS_INTR // safe
PERF_SAMPLE_PHYS_ADDR // safe; handles mm==NULL && addr < TASK_SIZE
PERF_SAMPLE_AUX // ???
PERF_SAMPLE_CGROUP // safe
PERF_SAMPLE_DATA_PAGE_SIZE // partial; doesn't check addr < TASK_SIZE
PERF_SAMPLE_CODE_PAGE_SIZE // partial; doesn't check addr < TASK_SIZE
PERF_SAMPLE_WEIGHT_STRUCT // ???
... I think all the dodgy cases use mm somehow, so maybe the perf core
should check for current->mm?
---
diff --git a/kernel/exit.c b/kernel/exit.c
index 38645039dd8f..3407c16fc5a3 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -944,6 +944,15 @@ void __noreturn do_exit(long code)
taskstats_exit(tsk, group_dead);
trace_sched_process_exit(tsk, group_dead);
+ /*
+ * Since samping can touch ->mm, make sure to stop everything before we
Typo: s/samping/sampling/
+ * tear it down.
+ *
+ * Also flushes inherited counters to the parent - before the parent
+ * gets woken up by child-exit notifications.
+ */
+ perf_event_exit_task(tsk);
+
exit_mm();
if (group_dead)
@@ -959,14 +968,6 @@ void __noreturn do_exit(long code)
exit_task_work(tsk);
exit_thread(tsk);
- /*
- * Flush inherited counters to the parent - before the parent
- * gets woken up by child-exit notifications.
- *
- * because of cgroup mode, must be called before cgroup_exit()
- */
- perf_event_exit_task(tsk);
-
sched_autogroup_exit_task(tsk);
cgroup_exit(tsk);
Otherwise, that looks good to me!
Mark.
Return-Path: <linux-kernel+bounces-673404-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 2B02C41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:55:30 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 770FD3A3F40
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:55:08 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 02FE929116A;
Wed, 4 Jun 2025 14:55:20 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=hugovil.com header.i=@hugovil.com header.b="pwmdBUqr"
Received: from mail.hugovil.com (mail.hugovil.com [162.243.120.170])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9125628FFCB;
Wed, 4 Jun 2025 14:55:17 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=162.243.120.170
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749048919; cv=none; b=hOd3TfyLWip36pgCPFZgATP+K00lqaMRebJ2h+wVy8EsZT6aSbv6ikJ4uIh7EnZJLp88W8zoq3AaUmLOmvSimFe4aVtThx3MHxwS3I8w62MB5wg8HvXCTo9VjEc6Zj+Mzdp5pTcipk/dB2x8UjQHIu28jhTY4aT5Bpk0xco617w=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749048919; c=relaxed/simple;
bh=U1XJE14dmK7zk8SqMJr1ydY/J2fqolOgpBQJC2LkLhs=;
h=From:To:Cc:Date:Message-Id:MIME-Version:Subject; b=bDJGxgO+UW1kNt9TzAd8uTGITikylYYFwzjMPtITpb5uXnqvVs61qWiDEjqwd6dp+HgZAQyGHE+qRMvsoTemfdS4YOfHkbQ9Wl0t/ksv89ycj4kL9vkqpJOnCOAZBi/CthWoUA4Td1ZKEe/cFt4Nh3FuLljpjPk6hyD+ox4Gzys=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=hugovil.com; spf=pass smtp.mailfrom=hugovil.com; dkim=pass (1024-bit key) header.d=hugovil.com header.i=@hugovil.com header.b=pwmdBUqr; arc=none smtp.client-ip=162.243.120.170
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=hugovil.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=hugovil.com
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=hugovil.com
; s=x; h=Subject:Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Cc:To
:From:subject:date:message-id:reply-to;
bh=L5Uci1aNRqDvpavMZwVGQCSAcmTvjFdTlpswIPgwNFM=; b=pwmdBUqrSi/2JKlNzyeLA+or1f
d5iYtvyEaGKbHR4oF9weAoUlLJTFx0XX023Gns/VQdo0aSAZ6SdmfDB6K+rWh7WX1Lx3+w4cTsvm5
yShd1SYN2tGTlMBpt0FsldkDMFFAJhs8B6AtPhzOzKDQk/Pwbl22Oq2awsfI8/I2kk7g=;
Received: from modemcable061.19-161-184.mc.videotron.ca ([184.161.19.61]:60436 helo=pettiford.lan)
by mail.hugovil.com with esmtpa (Exim 4.92)
(envelope-from <hugo@xxxxxxxxxxx>)
id 1uMpWG-0000LY-Ud; Wed, 04 Jun 2025 10:55:09 -0400
From: Hugo Villeneuve <hugo@xxxxxxxxxxx>
To: biju.das.jz@xxxxxxxxxxxxxx,
maarten.lankhorst@xxxxxxxxxxxxxxx,
mripard@xxxxxxxxxx,
tzimmermann@xxxxxxx,
airlied@xxxxxxxxx,
simona@xxxxxxxx
Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx,
linux-renesas-soc@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx,
hugo@xxxxxxxxxxx,
chris.brandt@xxxxxxxxxxx,
Hugo Villeneuve <hvilleneuve@xxxxxxxxxxxx>
Date: Wed, 4 Jun 2025 10:53:05 -0400
Message-Id: <20250604145306.1170676-1-hugo@xxxxxxxxxxx>
X-Mailer: git-send-email 2.39.5
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-SA-Exim-Connect-IP: 184.161.19.61
X-SA-Exim-Mail-From: hugo@xxxxxxxxxxx
X-Spam-Level:
Subject: [PATCH v4 0/1] drm: rcar-du: rzg2l_mipi_dsi: add MIPI DSI command support
X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000)
X-SA-Exim-Scanned: Yes (on mail.hugovil.com)
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS,URIBL_CSS
autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
From: Hugo Villeneuve <hvilleneuve@xxxxxxxxxxxx>
Hello,
this patch series add support for sending MIPI DSI command packets to the
Renesas RZ/G2L MIPI DSI driver.
Tested on a custom board with a SolidRun RZ/G2L SOM, with two different LCD
panels using the jd9365da and st7703 drivers.
Tested short and long writes.
Tested read of 1 byte, 2 bytes and long reads. Note that to test long reads,
most LCD panels need to be sent a DCS configuration command to increase the
maximum packet size, which is set to 1 byte by default (at least on the two
panels that I tested).
Thank you.
Link: [v1] https://lore.kernel.org/all/20250520164034.3453315-1-hugo@xxxxxxxxxxx
Link: [v3] https://lore.kernel.org/all/20250522143911.138077-1-hugo@xxxxxxxxxxx
Link: [dep1] https://lore.kernel.org/all/20250521210335.3149065-1-chris.brandt@xxxxxxxxxxx/raw
Changes for V4:
- Rebased on drm-misc-next, since this series depends on [dep1]
- Move init of DCS maximum return packet size to rzg2l_mipi_dsi_startup()
- Reworded comment for DCS maximum return packet size
- Merged patches 1 and 2
Changes for V3:
- No code change, resending after fixing mail server config resulting in
only cover letter being sent
Changes for V2:
- Change commit message prefix to "drm: renesas: rz-du: "
- Reorder variables in rzg2l_mipi_dsi_read_response()
- Remove unused macros
- Add missing bitfield include (kernel test robot)
Hugo Villeneuve (1):
drm: renesas: rz-du: Implement MIPI DSI host transfers
.../gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c | 186 ++++++++++++++++++
.../drm/renesas/rz-du/rzg2l_mipi_dsi_regs.h | 54 +++++
2 files changed, 240 insertions(+)
base-commit: 685c407f168cb49a12cc703230d1e2d62767bfd2
--
2.39.5
Return-Path: <linux-kernel+bounces-673405-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 44D4841E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:55:50 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 5BA5E189580B
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:55:49 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 9C5AA29187A;
Wed, 4 Jun 2025 14:55:20 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=hugovil.com header.i=@hugovil.com header.b="rUpDn5NZ"
Received: from mail.hugovil.com (mail.hugovil.com [162.243.120.170])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id A37CB290D97;
Wed, 4 Jun 2025 14:55:17 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=162.243.120.170
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749048919; cv=none; b=tXkUyd0QU05k6X+UuZ2YUkT9Qr46nUeYEqIf1jtjgktgsWCgjODCmJ2/R+ZB5BiRduWJwVUWHC06trRub4gayoIlR6PkDP/Rggw36RWxMZJcAqHBBS9tqBcdmjhNLPK1+iZoB7Dav3eBkIKMqBBo7iaXDp1ZB38QIXj1od72Q1U=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749048919; c=relaxed/simple;
bh=NhGFUDv6D87MHMLVuL4MRgRlix6SihdCA88jAG2FKa0=;
h=From:To:Cc:Date:Message-Id:In-Reply-To:References:MIME-Version:
Subject; b=dZ+tG9VmDac7+yjKhCua6dstBsQeGWF1stOR1de6D9YPiCUQ8oAfssf3r1AmyyD4JEc1xpA5wO96u4zMp9K9cZ1DgNYQdPG25q5DHQMGSpcehPhXon1jpN95g4rEPnsNBMrDrW7vSnP5S5RIdh07TKNYAFOPB9cbXIzuMrq5eGk=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=hugovil.com; spf=pass smtp.mailfrom=hugovil.com; dkim=pass (1024-bit key) header.d=hugovil.com header.i=@hugovil.com header.b=rUpDn5NZ; arc=none smtp.client-ip=162.243.120.170
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=hugovil.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=hugovil.com
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=hugovil.com
; s=x; h=Subject:Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Cc:To
:From:subject:date:message-id:reply-to;
bh=T1qxi96MR9mLatKjXCyyUyshX+pISOQXncDo6ySYJrc=; b=rUpDn5NZbJE+n9wg0QXC9OOhp+
EWPIqGVaI32sunQMr/bI83/oPiYffbIL+63l1ejCPkEFj92hkMeg0zAe05Vsd0coSP3fXB/HWne4m
Gv6bE55dqoOZZB10qyDC7fEokpQZI+gfF7VNgXblM99VSAdy1y6tLvabN47K8u8yE5sw=;
Received: from modemcable061.19-161-184.mc.videotron.ca ([184.161.19.61]:60436 helo=pettiford.lan)
by mail.hugovil.com with esmtpa (Exim 4.92)
(envelope-from <hugo@xxxxxxxxxxx>)
id 1uMpWI-0000LY-Iv; Wed, 04 Jun 2025 10:55:11 -0400
From: Hugo Villeneuve <hugo@xxxxxxxxxxx>
To: biju.das.jz@xxxxxxxxxxxxxx,
maarten.lankhorst@xxxxxxxxxxxxxxx,
mripard@xxxxxxxxxx,
tzimmermann@xxxxxxx,
airlied@xxxxxxxxx,
simona@xxxxxxxx
Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx,
linux-renesas-soc@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx,
hugo@xxxxxxxxxxx,
chris.brandt@xxxxxxxxxxx,
Hugo Villeneuve <hvilleneuve@xxxxxxxxxxxx>
Date: Wed, 4 Jun 2025 10:53:06 -0400
Message-Id: <20250604145306.1170676-2-hugo@xxxxxxxxxxx>
X-Mailer: git-send-email 2.39.5
In-Reply-To: <20250604145306.1170676-1-hugo@xxxxxxxxxxx>
References: <20250604145306.1170676-1-hugo@xxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-SA-Exim-Connect-IP: 184.161.19.61
X-SA-Exim-Mail-From: hugo@xxxxxxxxxxx
X-Spam-Level:
Subject: [PATCH v4 1/1] drm: renesas: rz-du: Implement MIPI DSI host transfers
X-SA-Exim-Version: 4.2.1 (built Wed, 08 May 2019 21:11:16 +0000)
X-SA-Exim-Scanned: Yes (on mail.hugovil.com)
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS,URIBL_CSS
autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
From: Hugo Villeneuve <hvilleneuve@xxxxxxxxxxxx>
Add support for sending MIPI DSI command packets from the host to a
peripheral. This is required for panels that need configuration before
they accept video data.
Also for long reads to work properly, set DCS maximum return packet size
to the value of the DMA buffer size.
Based on Renesas Linux kernel v5.10 repos [1].
Link: https://github.com/renesas-rz/rz_linux-cip.git
Cc: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
Signed-off-by: Hugo Villeneuve <hvilleneuve@xxxxxxxxxxxx>
---
.../gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c | 186 ++++++++++++++++++
.../drm/renesas/rz-du/rzg2l_mipi_dsi_regs.h | 54 +++++
2 files changed, 240 insertions(+)
diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
index 91e1a9adad7d6..50ec109aa6ed3 100644
--- a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
+++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
@@ -4,8 +4,11 @@
*
* Copyright (C) 2022 Renesas Electronics Corporation
*/
+
+#include <linux/bitfield.h>
#include <linux/clk.h>
#include <linux/delay.h>
+#include <linux/dma-mapping.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/module.h>
@@ -23,9 +26,12 @@
#include <drm/drm_of.h>
#include <drm/drm_panel.h>
#include <drm/drm_probe_helper.h>
+#include <video/mipi_display.h>
#include "rzg2l_mipi_dsi_regs.h"
+#define RZG2L_DCS_BUF_SIZE 128 /* Maximum DCS buffer size in external memory. */
+
struct rzg2l_mipi_dsi {
struct device *dev;
void __iomem *mmio;
@@ -44,6 +50,10 @@ struct rzg2l_mipi_dsi {
unsigned int num_data_lanes;
unsigned int lanes;
unsigned long mode_flags;
+
+ /* DCS buffer pointers when using external memory. */
+ dma_addr_t dcs_buf_phys;
+ u8 *dcs_buf_virt;
};
static inline struct rzg2l_mipi_dsi *
@@ -267,6 +277,7 @@ static int rzg2l_mipi_dsi_startup(struct rzg2l_mipi_dsi *dsi,
u32 clkbfht;
u32 clkstpt;
u32 golpbkt;
+ u32 dsisetr;
int ret;
/*
@@ -328,6 +339,15 @@ static int rzg2l_mipi_dsi_startup(struct rzg2l_mipi_dsi *dsi,
lptrnstsetr = LPTRNSTSETR_GOLPBKT(golpbkt);
rzg2l_mipi_dsi_link_write(dsi, LPTRNSTSETR, lptrnstsetr);
+ /*
+ * Increase MRPSZ as the default value of 1 will result in long read
+ * commands payload not being saved to memory.
+ */
+ dsisetr = rzg2l_mipi_dsi_link_read(dsi, DSISETR);
+ dsisetr &= ~DSISETR_MRPSZ;
+ dsisetr |= FIELD_PREP(DSISETR_MRPSZ, RZG2L_DCS_BUF_SIZE);
+ rzg2l_mipi_dsi_link_write(dsi, DSISETR, dsisetr);
+
return 0;
err_phy:
@@ -659,9 +679,168 @@ static int rzg2l_mipi_dsi_host_detach(struct mipi_dsi_host *host,
return 0;
}
+static ssize_t rzg2l_mipi_dsi_read_response(struct rzg2l_mipi_dsi *dsi,
+ const struct mipi_dsi_msg *msg)
+{
+ u8 *msg_rx = msg->rx_buf;
+ u8 datatype;
+ u32 result;
+ u16 size;
+
+ result = rzg2l_mipi_dsi_link_read(dsi, RXRSS0R);
+ if (result & RXRSS0R_RXPKTDFAIL) {
+ dev_err(dsi->dev, "packet rx data did not save correctly\n");
+ return -EPROTO;
+ }
+
+ if (result & RXRSS0R_RXFAIL) {
+ dev_err(dsi->dev, "packet rx failure\n");
+ return -EPROTO;
+ }
+
+ if (!(result & RXRSS0R_RXSUC))
+ return -EPROTO;
+
+ datatype = FIELD_GET(RXRSS0R_DT, result);
+
+ switch (datatype) {
+ case 0:
+ dev_dbg(dsi->dev, "ACK\n");
+ return 0;
+ case MIPI_DSI_RX_END_OF_TRANSMISSION:
+ dev_dbg(dsi->dev, "EoTp\n");
+ return 0;
+ case MIPI_DSI_RX_ACKNOWLEDGE_AND_ERROR_REPORT:
+ dev_dbg(dsi->dev, "Acknowledge and error report: $%02x%02x\n",
+ (u8)FIELD_GET(RXRSS0R_DATA1, result),
+ (u8)FIELD_GET(RXRSS0R_DATA0, result));
+ return 0;
+ case MIPI_DSI_RX_DCS_SHORT_READ_RESPONSE_1BYTE:
+ case MIPI_DSI_RX_GENERIC_SHORT_READ_RESPONSE_1BYTE:
+ msg_rx[0] = FIELD_GET(RXRSS0R_DATA0, result);
+ return 1;
+ case MIPI_DSI_RX_DCS_SHORT_READ_RESPONSE_2BYTE:
+ case MIPI_DSI_RX_GENERIC_SHORT_READ_RESPONSE_2BYTE:
+ msg_rx[0] = FIELD_GET(RXRSS0R_DATA0, result);
+ msg_rx[1] = FIELD_GET(RXRSS0R_DATA1, result);
+ return 2;
+ case MIPI_DSI_RX_GENERIC_LONG_READ_RESPONSE:
+ case MIPI_DSI_RX_DCS_LONG_READ_RESPONSE:
+ size = FIELD_GET(RXRSS0R_WC, result);
+
+ if (size > msg->rx_len) {
+ dev_err(dsi->dev, "rx buffer too small");
+ return -ENOSPC;
+ }
+
+ memcpy(msg_rx, dsi->dcs_buf_virt, size);
+ return size;
+ default:
+ dev_err(dsi->dev, "unhandled response type: %02x\n", datatype);
+ return -EPROTO;
+ }
+}
+
+static ssize_t rzg2l_mipi_dsi_host_transfer(struct mipi_dsi_host *host,
+ const struct mipi_dsi_msg *msg)
+{
+ struct rzg2l_mipi_dsi *dsi = host_to_rzg2l_mipi_dsi(host);
+ struct mipi_dsi_packet packet;
+ bool need_bta;
+ u32 value;
+ int ret;
+
+ ret = mipi_dsi_create_packet(&packet, msg);
+ if (ret < 0)
+ return ret;
+
+ /* Terminate operation after this descriptor is finished */
+ value = SQCH0DSC0AR_NXACT_TERM;
+
+ if (msg->flags & MIPI_DSI_MSG_REQ_ACK) {
+ need_bta = true; /* Message with explicitly requested ACK */
+ value |= FIELD_PREP(SQCH0DSC0AR_BTA, SQCH0DSC0AR_BTA_NON_READ);
+ } else if (msg->rx_buf && msg->rx_len > 0) {
+ need_bta = true; /* Read request */
+ value |= FIELD_PREP(SQCH0DSC0AR_BTA, SQCH0DSC0AR_BTA_READ);
+ } else {
+ need_bta = false;
+ value |= FIELD_PREP(SQCH0DSC0AR_BTA, SQCH0DSC0AR_BTA_NONE);
+ }
+
+ /* Set transmission speed */
+ if (msg->flags & MIPI_DSI_MSG_USE_LPM)
+ value |= SQCH0DSC0AR_SPD_LOW;
+ else
+ value |= SQCH0DSC0AR_SPD_HIGH;
+
+ /* Write TX packet header */
+ value |= FIELD_PREP(SQCH0DSC0AR_DT, packet.header[0]) |
+ FIELD_PREP(SQCH0DSC0AR_DATA0, packet.header[1]) |
+ FIELD_PREP(SQCH0DSC0AR_DATA1, packet.header[2]);
+
+ if (mipi_dsi_packet_format_is_long(msg->type)) {
+ value |= SQCH0DSC0AR_FMT_LONG;
+
+ if (packet.payload_length > RZG2L_DCS_BUF_SIZE) {
+ dev_err(dsi->dev, "Packet Tx payload size (%d) too large",
+ (unsigned int)packet.payload_length);
+ return -ENOSPC;
+ }
+
+ /* Copy TX packet payload data to memory space */
+ memcpy(dsi->dcs_buf_virt, packet.payload, packet.payload_length);
+ } else {
+ value |= SQCH0DSC0AR_FMT_SHORT;
+ }
+
+ rzg2l_mipi_dsi_link_write(dsi, SQCH0DSC0AR, value);
+
+ /*
+ * Write: specify payload data source location, only used for
+ * long packet.
+ * Read: specify payload data storage location of response
+ * packet. Note: a read packet is always a short packet.
+ * If the response packet is a short packet or a long packet
+ * with WC = 0 (no payload), DTSEL is meaningless.
+ */
+ rzg2l_mipi_dsi_link_write(dsi, SQCH0DSC0BR, SQCH0DSC0BR_DTSEL_MEM_SPACE);
+
+ /*
+ * Set SQCHxSR.AACTFIN bit when descriptor actions are finished.
+ * Read: set Rx result save slot number to 0 (ACTCODE).
+ */
+ rzg2l_mipi_dsi_link_write(dsi, SQCH0DSC0CR, SQCH0DSC0CR_FINACT);
+
+ /* Set rx/tx payload data address, only relevant for long packet. */
+ rzg2l_mipi_dsi_link_write(dsi, SQCH0DSC0DR, (u32)dsi->dcs_buf_phys);
+
+ /* Start sequence 0 operation */
+ value = rzg2l_mipi_dsi_link_read(dsi, SQCH0SET0R);
+ value |= SQCH0SET0R_START;
+ rzg2l_mipi_dsi_link_write(dsi, SQCH0SET0R, value);
+
+ /* Wait for operation to finish */
+ ret = read_poll_timeout(rzg2l_mipi_dsi_link_read,
+ value, value & SQCH0SR_ADESFIN,
+ 2000, 20000, false, dsi, SQCH0SR);
+ if (ret == 0) {
+ /* Success: clear status bit */
+ rzg2l_mipi_dsi_link_write(dsi, SQCH0SCR, SQCH0SCR_ADESFIN);
+
+ if (need_bta)
+ ret = rzg2l_mipi_dsi_read_response(dsi, msg);
+ else
+ ret = packet.payload_length;
+ }
+
+ return ret;
+}
+
static const struct mipi_dsi_host_ops rzg2l_mipi_dsi_host_ops = {
.attach = rzg2l_mipi_dsi_host_attach,
.detach = rzg2l_mipi_dsi_host_detach,
+ .transfer = rzg2l_mipi_dsi_host_transfer,
};
/* -----------------------------------------------------------------------------
@@ -779,6 +958,11 @@ static int rzg2l_mipi_dsi_probe(struct platform_device *pdev)
if (ret < 0)
goto err_pm_disable;
+ dsi->dcs_buf_virt = dma_alloc_coherent(dsi->host.dev, RZG2L_DCS_BUF_SIZE,
+ &dsi->dcs_buf_phys, GFP_KERNEL);
+ if (!dsi->dcs_buf_virt)
+ return -ENOMEM;
+
return 0;
err_phy:
@@ -793,6 +977,8 @@ static void rzg2l_mipi_dsi_remove(struct platform_device *pdev)
{
struct rzg2l_mipi_dsi *dsi = platform_get_drvdata(pdev);
+ dma_free_coherent(dsi->host.dev, RZG2L_DCS_BUF_SIZE, dsi->dcs_buf_virt,
+ dsi->dcs_buf_phys);
mipi_dsi_host_unregister(&dsi->host);
pm_runtime_disable(&pdev->dev);
}
diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi_regs.h b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi_regs.h
index 1dbc16ec64a4b..26d8a37ee6351 100644
--- a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi_regs.h
+++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi_regs.h
@@ -81,6 +81,20 @@
#define RSTSR_SWRSTLP (1 << 1)
#define RSTSR_SWRSTHS (1 << 0)
+/* DSI Set Register */
+#define DSISETR 0x120
+#define DSISETR_MRPSZ GENMASK(15, 0)
+
+/* Rx Result Save Slot 0 Register */
+#define RXRSS0R 0x240
+#define RXRSS0R_RXPKTDFAIL BIT(28)
+#define RXRSS0R_RXFAIL BIT(27)
+#define RXRSS0R_RXSUC BIT(25)
+#define RXRSS0R_DT GENMASK(21, 16)
+#define RXRSS0R_DATA1 GENMASK(15, 8)
+#define RXRSS0R_DATA0 GENMASK(7, 0)
+#define RXRSS0R_WC GENMASK(15, 0) /* Word count for long packet. */
+
/* Clock Lane Stop Time Set Register */
#define CLSTPTSETR 0x314
#define CLSTPTSETR_CLKKPT(x) ((x) << 24)
@@ -148,4 +162,44 @@
#define VICH1HPSETR_HFP(x) (((x) & 0x1fff) << 16)
#define VICH1HPSETR_HBP(x) (((x) & 0x1fff) << 0)
+/* Sequence Channel 0 Set 0 Register */
+#define SQCH0SET0R 0x5c0
+#define SQCH0SET0R_START BIT(0)
+
+/* Sequence Channel 0 Status Register */
+#define SQCH0SR 0x5d0
+#define SQCH0SR_ADESFIN BIT(8)
+
+/* Sequence Channel 0 Status Clear Register */
+#define SQCH0SCR 0x5d4
+#define SQCH0SCR_ADESFIN BIT(8)
+
+/* Sequence Channel 0 Descriptor 0-A Register */
+#define SQCH0DSC0AR 0x780
+#define SQCH0DSC0AR_NXACT_TERM 0 /* Bit 28 */
+#define SQCH0DSC0AR_BTA GENMASK(27, 26)
+#define SQCH0DSC0AR_BTA_NONE 0
+#define SQCH0DSC0AR_BTA_NON_READ 1
+#define SQCH0DSC0AR_BTA_READ 2
+#define SQCH0DSC0AR_BTA_ONLY 3
+#define SQCH0DSC0AR_SPD_HIGH 0
+#define SQCH0DSC0AR_SPD_LOW BIT(25)
+#define SQCH0DSC0AR_FMT_SHORT 0
+#define SQCH0DSC0AR_FMT_LONG BIT(24)
+#define SQCH0DSC0AR_DT GENMASK(21, 16)
+#define SQCH0DSC0AR_DATA1 GENMASK(15, 8)
+#define SQCH0DSC0AR_DATA0 GENMASK(7, 0)
+
+/* Sequence Channel 0 Descriptor 0-B Register */
+#define SQCH0DSC0BR 0x784
+#define SQCH0DSC0BR_DTSEL_MEM_SPACE BIT(24) /* Use external memory */
+
+/* Sequence Channel 0 Descriptor 0-C Register */
+#define SQCH0DSC0CR 0x788
+#define SQCH0DSC0CR_FINACT BIT(0)
+#define SQCH0DSC0CR_AUXOP BIT(22)
+
+/* Sequence Channel 0 Descriptor 0-D Register */
+#define SQCH0DSC0DR 0x78c
+
#endif /* __RZG2L_MIPI_DSI_REGS_H__ */
--
2.39.5
Return-Path: <linux-kernel+bounces-673406-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 0262341E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:56:28 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id E45B87A8C5E
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:55:07 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 9B27D291173;
Wed, 4 Jun 2025 14:56:17 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="JQj00Jkn"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3602818E1F
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:56:14 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749048976; cv=none; b=dpEyhffypelYu+rD4R0/raermIq5Egh+PYyyCeAVNy5yWrFPnW2a/i4X4wR/UbJ1tyd8DNSoF8O3HdRhjkIlU6VAqYaQbxsBMHB0TYZ295NKu/cTaKM+74BklTm0f9HO0ufVghQfOb3HFdG+ujl+NjBDoZslUg2pm6Q0c7bPT5o=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749048976; c=relaxed/simple;
bh=7QokJdcqmNVhOdBHvR2ZqEXOlnZq2JyXuqgX7+oE/ZY=;
h=From:In-Reply-To:References:To:Cc:Subject:MIME-Version:
Content-Type:Date:Message-ID; b=hxnG1K9aiI5AHgEXWswsjNGmyYq3dIbq7/BR1ua2+72CyqrrICtCua0SC5bINydoY4guIZdJyX+Ywi9ldlDSUARObZMuhiPTq75S/wbmj+EwEgRfb9vA4F4DilpV7UstW5kaISSViI9SIa64f9XwcbeqswOCIaEIl8KLNQzENcQ=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=JQj00Jkn; arc=none smtp.client-ip=170.10.129.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749048974;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
in-reply-to:in-reply-to:references:references;
bh=Z2h/EO0JQWU8btMtwutjXCkhqTordcpnOBoYcUhw0Ow=;
b=JQj00JknTHh2UtFxTIWQ2Xsq3V8VGNbfyAZ+6tzWL9T11SKmHsocn81jGt7uuTs+oDud3X
cwxacpWRfutF32QHQnfbJ+fXfRGjEjrKsxYfOPqFmMtpZRNd5A6WzNHrXBoMm8sQiDZAFE
/mDUcaqjyv/lSzLUo9wj0npH+hd9/xI=
Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com
(ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by
relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,
cipher=TLS_AES_256_GCM_SHA384) id us-mta-381-KRYDtLh5ML2VEw7kggBwTQ-1; Wed,
04 Jun 2025 10:56:09 -0400
X-MC-Unique: KRYDtLh5ML2VEw7kggBwTQ-1
X-Mimecast-MFC-AGG-ID: KRYDtLh5ML2VEw7kggBwTQ_1749048968
Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
(No client certificate requested)
by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 09F181801BE9;
Wed, 4 Jun 2025 14:56:08 +0000 (UTC)
Received: from warthog.procyon.org.uk (unknown [10.42.28.2])
by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D591E180045C;
Wed, 4 Jun 2025 14:56:03 +0000 (UTC)
Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley
Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United
Kingdom.
Registered in England and Wales under Company Registration No. 3798903
From: David Howells <dhowells@xxxxxxxxxx>
In-Reply-To: <aDnTsvbyKCTkZbOR@mini-arch>
References: <aDnTsvbyKCTkZbOR@mini-arch> <770012.1748618092@xxxxxxxxxxxxxxxxxxxxxx>
To: Stanislav Fomichev <stfomichev@xxxxxxxxx>
Cc: dhowells@xxxxxxxxxx, Mina Almasry <almasrymina@xxxxxxxxxx>,
willy@xxxxxxxxxxxxx, hch@xxxxxxxxxxxxx,
Jakub Kicinski <kuba@xxxxxxxxxx>, Eric Dumazet <edumazet@xxxxxxxxxx>,
netdev@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
Subject: Re: Device mem changes vs pinning/zerocopy changes
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-ID: <1097884.1749048961.1@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 15:56:01 +0100
Message-ID: <1097885.1749048961@xxxxxxxxxxxxxxxxxxxxxx>
X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Stanislav Fomichev <stfomichev@xxxxxxxxx> wrote:
> (1) Separate fragment lifetime management from sk_buff. No more wangling
> of refcounts in the skbuff code. If you clone an skb, you stick an
> extra ref on the lifetime management struct, not the page.
For device memory TCP we already have this: net_devmem_dmabuf_binding
is the owner of the frags. And when we reference skb frag we reference
only this owner, not individual chunks: __skb_frag_ref -> get_netmem ->
net_devmem_get_net_iov (ref on the binding).
Will it be possible to generalize this to cover MSG_ZEROCOPY and splice
cases? From what I can tell, this is somewhat equivalent of your net_txbuf.
Yes and no. The net_devmem stuff that's now upstream still manages refs on a
per-skb-frag basis. What I'm looking to do is to move it out of the skb and
into a separate struct so that the ref on a chunk of memory can be shared
between several skb-frags, quite possibly spread between several skbs.
This is especially important for various types of zerocopy memory where we
won't actually be allowed to take refs.
David
Return-Path: <linux-kernel+bounces-673407-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 0525941E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:57:04 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 6BF607A0585
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:55:44 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 925FD290DB9;
Wed, 4 Jun 2025 14:56:55 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="SpdMCkGw"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id D35BD18E1F;
Wed, 4 Jun 2025 14:56:54 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749049014; cv=none; b=eNK2V2ZFkpFK5DIw6eCbAH7Xg75PRNx/1jOSqeqxCYlPU59WtxwoNrEfssm2IBdQFjftq8IC39p4+M2h4+hcz0ufvgiCuLojiV2wKgzEo64OpYAlEzS/Jw3PMI7yiuIGN5PA1OMLZfkQ9+193L0td4+0y4qFVIwst7k6qU0lIRw=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749049014; c=relaxed/simple;
bh=wddeUE2/c/FxnoHyLrTHZUffTHhKBZE1KhO8uBpo/Ac=;
h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References:
MIME-Version:Content-Type; b=FGu9GcKoXNPofnayYWbfiAw+NLH61QXnxKB4ikD9i5fHYclRjGUf/sjMR+NJ3A5n6Ljp6Z761VL8b9bqFsOSvTNF0t9yC4wi3AnN3qFd7M1CncaZsseGjYjm9whW/O9cDMNnkE7NY1RiGnJc/2ClqBu4yHiBHD72YmG91WpCzyE=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=SpdMCkGw; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 24C50C4CEE4;
Wed, 4 Jun 2025 14:56:52 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749049014;
bh=wddeUE2/c/FxnoHyLrTHZUffTHhKBZE1KhO8uBpo/Ac=;
h=Date:From:To:Cc:Subject:In-Reply-To:References:From;
b=SpdMCkGw7xuSOebdrjOZyyo1Isa+ob+WBpHXijcGf3x3ke2GkkcbuuCweEI2ZejKV
a94JUxvoGoGmhXMI2wcUVX38q3WXHUD5nTsc41naDYFiIbSybcrmP02WDX+MFzqN3+
dtlV0VJcdwIlCbuTR7lUPKf9ZJ05X8NdQzbuCvox9VfL4gKPeM6lYT1VtF/oOpC6a4
2qSC9Q9OKf1wgJZorBfSrFEJsdQ+VQMGGdQA2OhJKG5vtw7mexp3gr0NRncO21aX8/
UNn9syZJHFy6uOE70qD65ekNk9iW5OzSSvYrfeBpq5aNoCP7zwMZKWLaOm8g7B3PPZ
zfvNbT7p2xQXw==
Date: Wed, 4 Jun 2025 16:56:49 +0200
From: Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx>
To: Jonathan Corbet <corbet@xxxxxxx>
Cc: linux-doc@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, "
=?UTF-8?B?TsOtY29sYXM=?= F. R. A. Prado" <nfraprado@xxxxxxxxxxxxx>
Subject: Re: [PATCH v2 1/3] docs: automarkup: Remove some Sphinx 2 holdovers
Message-ID: <20250604165649.5a66cb6b@xxxxxxx>
In-Reply-To: <20250604143645.78367-2-corbet@xxxxxxx>
References: <20250604143645.78367-1-corbet@xxxxxxx>
<20250604143645.78367-2-corbet@xxxxxxx>
X-Mailer: Claws Mail 4.3.1 (GTK 3.24.43; x86_64-redhat-linux-gnu)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Em Wed, 4 Jun 2025 08:36:43 -0600
Jonathan Corbet <corbet@xxxxxxx> escreveu:
Remove a few declarations that are no longer doing anything now that we
have left Sphinx 2 behind.
Signed-off-by: Jonathan Corbet <corbet@xxxxxxx>
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx>
---
v2: Remove RE_generic_type as suggested by Mauro
Documentation/sphinx/automarkup.py | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
diff --git a/Documentation/sphinx/automarkup.py b/Documentation/sphinx/automarkup.py
index fd633f7a0bc3..7828aeac92e7 100644
--- a/Documentation/sphinx/automarkup.py
+++ b/Documentation/sphinx/automarkup.py
@@ -22,12 +22,6 @@ from kernel_abi import get_kernel_abi
#
RE_function = re.compile(r'\b(([a-zA-Z_]\w+)\(\))', flags=re.ASCII)
-#
-# Sphinx 2 uses the same :c:type role for struct, union, enum and typedef
-#
-RE_generic_type = re.compile(r'\b(struct|union|enum|typedef)\s+([a-zA-Z_]\w+)',
- flags=re.ASCII)
-
#
# Sphinx 3 uses a different C role for each one of struct, union, enum and
# typedef
@@ -150,20 +144,12 @@ def markup_func_ref_sphinx3(docname, app, match):
return target_text
def markup_c_ref(docname, app, match):
- class_str = {# Sphinx 2 only
- RE_function: 'c-func',
- RE_generic_type: 'c-type',
- # Sphinx 3+ only
- RE_struct: 'c-struct',
+ class_str = {RE_struct: 'c-struct',
RE_union: 'c-union',
RE_enum: 'c-enum',
RE_typedef: 'c-type',
}
- reftype_str = {# Sphinx 2 only
- RE_function: 'function',
- RE_generic_type: 'type',
- # Sphinx 3+ only
- RE_struct: 'struct',
+ reftype_str = {RE_struct: 'struct',
RE_union: 'union',
RE_enum: 'enum',
RE_typedef: 'type',
Return-Path: <linux-kernel+bounces-673408-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 18EFC41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:57:57 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id CEBE93A6884
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:57:34 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 7159F291142;
Wed, 4 Jun 2025 14:57:50 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Zy/8A0UY"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id B4B7B18E1F;
Wed, 4 Jun 2025 14:57:49 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749049069; cv=none; b=kQ5PxhzU9G9b42o/tYMdsWk/BCv2HeSzAn+HPFcSCvTYzDTiR1rB3LVacME+R3y63YYo0b+F4nzVs9Azt2UID3OZ8FSoUmLf1i5BYMRZwKmO7jVw84UML+XlAgtNE1O3DH7DXVjNqRJuQ8SmbVQUTbO2Wcw2rsHXeWZ5ngzr/VE=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749049069; c=relaxed/simple;
bh=mQMGrZaQWboBnhe7ng9WBOI3t0w8RIrA3712YW+wFOc=;
h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References:
MIME-Version:Content-Type; b=SusGeUge9eG2QEGu7FD5p2UgszNDNOb3OD1/0k+cBPU0E98EOb6aDGQq471vTGrtu+h/n79Kz9gon0JpzXLf7tFlf/0FPrS4LGdrVBGS60E9Jla/Wudk/seLAlwa/qFaMvX7oIjuxN7wyDF9Goh2ajGoIZBY7JWiopeNoGDvVIU=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Zy/8A0UY; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 094A6C4CEE4;
Wed, 4 Jun 2025 14:57:47 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749049069;
bh=mQMGrZaQWboBnhe7ng9WBOI3t0w8RIrA3712YW+wFOc=;
h=Date:From:To:Cc:Subject:In-Reply-To:References:From;
b=Zy/8A0UYa69f6nsxUJzS2JnymS1QStujgeASAek+SnS5M0rda8HS5Da24HbUtGS12
TDD3l+DNmID6C3FAtnbNfl4J1fcfewP0QuQb5ybwDtDTn3PYqiWlemSLtVX9YMhTm1
f74NVhjgqJMHf5RwP9TMECmum0dEri0n3QIcM79XpHgU5aX5ctPdZm+qnIMAihW9A5
T3MBcML1rAcrGh2Eql6ysKqKYfl93fUNmVCfB7tivsl0kp7MNsS783UKMERdkGXnKZ
TBUB9O/1u6wJ0j41/WKVxAlBd1t2Sj3gWzNO6HOVA5yiodZmI6OAphnTEXxGjEX/Cq
IkCIJNMNnyU0Q==
Date: Wed, 4 Jun 2025 16:57:44 +0200
From: Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx>
To: Jonathan Corbet <corbet@xxxxxxx>
Cc: linux-doc@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, "
=?UTF-8?B?TsOtY29sYXM=?= F. R. A. Prado" <nfraprado@xxxxxxxxxxxxx>
Subject: Re: [PATCH v2 2/3] docs: automarkup: Mark up undocumented entities
too
Message-ID: <20250604165744.68d98975@xxxxxxx>
In-Reply-To: <20250604143645.78367-3-corbet@xxxxxxx>
References: <20250604143645.78367-1-corbet@xxxxxxx>
<20250604143645.78367-3-corbet@xxxxxxx>
X-Mailer: Claws Mail 4.3.1 (GTK 3.24.43; x86_64-redhat-linux-gnu)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Em Wed, 4 Jun 2025 08:36:44 -0600
Jonathan Corbet <corbet@xxxxxxx> escreveu:
The automarkup code generates markup and a cross-reference link for
functions, structs, etc. for which it finds kerneldoc documentation.
Undocumented entities are left untouched; that creates an inconsistent
reading experience and has caused some writers to go to extra measures to
cause the markup to happen.
Mark up detected C entities regardless of whether they are documented.
Signed-off-by: Jonathan Corbet <corbet@xxxxxxx>
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx>
---
v2: Split out the CSS changes into a separate patch
Documentation/sphinx/automarkup.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/Documentation/sphinx/automarkup.py b/Documentation/sphinx/automarkup.py
index 7828aeac92e7..e67eb8e19c22 100644
--- a/Documentation/sphinx/automarkup.py
+++ b/Documentation/sphinx/automarkup.py
@@ -235,8 +235,13 @@ def add_and_resolve_xref(app, docname, domain, reftype, target, contnode=None):
if xref:
return xref
-
- return None
+ #
+ # We didn't find the xref; if a container node was supplied,
+ # mark it as a broken xref
+ #
+ if contnode:
+ contnode.set_class("broken_xref")
+ return contnode
#
# Variant of markup_abi_ref() that warns whan a reference is not found
Return-Path: <linux-kernel+bounces-673409-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 213D141E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:58:40 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 1C1BD3A688F
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:58:18 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id A10BA29115A;
Wed, 4 Jun 2025 14:58:34 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="HHTh7vF0"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id DFA1B290098
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:58:31 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749049113; cv=none; b=dMGksAhLoltCRaIzr6YLB6bAyIPqlMbLZUVXCqhJG05o0nL0LA06CWhb8Q2RdG/rMHvQ2nYnj3A1wtdzBS/evPFLJg+7UktOcmsJ+hSh+BEOwjVa7j67zqY22wK+ExhXwIoigFQTv2dXH5+OQtWkWYr0qRWbocmJL0S6S2Ze20k=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749049113; c=relaxed/simple;
bh=3cZtHDT182hjcG4xgz8CRAEfFwHp4dh4d3OG9V6YGZY=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=OUJ/2vS72PknWxEt7whVDAxvPQ5jCKJNKWqSlSHiBRjaefjHZeSSp/5XWNb/+WSDEY7XLgA9eRJEw1rrYB/osADtKqSOfrXEsdQfrgBFG4hNex+0hg9nqXAyygngxi92Gh2egN5+qYA94EgQwTTYEga0+ONYwivtql2XTd0kmrY=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=HHTh7vF0; arc=none smtp.client-ip=170.10.129.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749049110;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=3qjG397uxmb1tWEqI007xcyMmGE3Kzd3iABso6Fhu8E=;
b=HHTh7vF0D7gCv2iEyvkqq9XGZwEVPpfv9J+DRRCQAVONdG1eBdHwSPzsTHNIuTulRTyeu8
op/7kH1l5nbWIDFw2GFkyAHJ/gtb622sX9m0pZRCouHoNm4qUKo6K3JS5YSuxiH1UTFanm
XHtcxSBCcaFu5Wh3hU2MCg44fbrXwHw=
Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com
[209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-591-JKnuMwo0OMqFWcviKqIK_g-1; Wed, 04 Jun 2025 10:58:29 -0400
X-MC-Unique: JKnuMwo0OMqFWcviKqIK_g-1
X-Mimecast-MFC-AGG-ID: JKnuMwo0OMqFWcviKqIK_g_1749049108
Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-450dada0f83so41363325e9.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 07:58:29 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749049108; x=1749653908;
h=content-transfer-encoding:in-reply-to:organization:autocrypt
:content-language:from:references:cc:to:subject:user-agent
:mime-version:date:message-id:x-gm-message-state:from:to:cc:subject
:date:message-id:reply-to;
bh=3qjG397uxmb1tWEqI007xcyMmGE3Kzd3iABso6Fhu8E=;
b=sIcipwf8HFnclUUm0JvduS+wkJxa0a15N25ta1QZ4VaGkb+TABcXRmVAmWfFTlqFDB
oOnquRKlFN18Db/iv5kIja2roA43e1X6w1N7NUvf1yln/SA27AngKlFQ2Qefq7OqXCIG
E7UcWkXDR1AwOu/K7vXY16/1r4FnYqmOZulUAdSlVN6ufh8ZYtirPYxjZScjY5+dWkqh
gJSiquzf040HBcPUu0YdK+FWNoMW9DbPSiEvZz62axgFZUn/jdNRHQxPbxUL3HV7FCCu
0QfZ+/bN3aWPMlCmZh6IGKRFpD+YI1+/nZovwALgoZnd+xnj8BwxgLT4spF28de/6y0G
PX4w==
X-Gm-Message-State: AOJu0YyPvL/ooJXx5Vx69uqD73sdr8liLpJA0wX3yD2AwGzmPZMkb0zt
Vs6U4IbpJ9QfkgcG89rSf6wzCPliWoHqNt4EfYvM1+aui0hsxXZK++y632IrooJbFuduQAuv9KZ
2KP/WuMvsAHxx7i0R5BGua+aNAToPcGijc9mC3Us4LOJaqCgbamroi6yWcoyTQIsMbA==
X-Gm-Gg: ASbGncsOJHVKftJKAmGZ8xicfHczuHWh6K8lqgO0YvpTTn8bmKhkQ2fvJCaFRBGRz+n
avB03SPiDUMr1cfOmxZw12hZdSQVk7hK3nIl3nyvoK/eWBlVrLoWVdQKtE6YbqacZ40pkxQ/aqa
U/5HBYKiHgSGvO2g7OBBlO2gTuXnmEWPj1xwwAK7y+DCJla7Vy0yBgps5oDLIdTy19Pl5iBtsDv
4lIjTrrdJE7mU1sEK97nLD4QqKDf8WNv6c7+I1sLpgRREkv3awM/CtrplhR3kTgu+dCy2W1kCxz
mO1GI9Dr557HkKQv16g+vLQVq0i/RgX5T//QgoZ7KSrEs1pRdlWlRDPsSPNmWV4Ktecer4ONkCh
8j688rNHgC2Ysevrfk1giZWCHdug0hL1sKajp0EE=
X-Received: by 2002:a05:600c:4f50:b0:43d:fa59:a685 with SMTP id 5b1f17b1804b1-451f0b3d1fcmr27348335e9.33.1749049108381;
Wed, 04 Jun 2025 07:58:28 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IGSCKuzq3sABDrmK6xE5KM5W8GUG4ustymmrLD1aZ7lqTnj4irkZMhM/KfbK8Iu1R75qfGXAw==
X-Received: by 2002:a05:600c:4f50:b0:43d:fa59:a685 with SMTP id 5b1f17b1804b1-451f0b3d1fcmr27348145e9.33.1749049107938;
Wed, 04 Jun 2025 07:58:27 -0700 (PDT)
Received: from ?IPV6:2003:d8:2f1b:b800:6fdb:1af2:4fbd:1fdf? (p200300d82f1bb8006fdb1af24fbd1fdf.dip0.t-ipconnect.de. [2003:d8:2f1b:b800:6fdb:1af2:4fbd:1fdf])
by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-450d8006ff8sm200519545e9.34.2025.06.04.07.58.26
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 07:58:27 -0700 (PDT)
Message-ID: <5575b0cf-de59-4b4e-b339-c310f079bda7@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 16:58:25 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v1] mm/gup: remove (VM_)BUG_ONs
To: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>, Vlastimil Babka
<vbabka@xxxxxxx>, Mike Rapoport <rppt@xxxxxxxxxx>,
Suren Baghdasaryan <surenb@xxxxxxxxxx>, Michal Hocko <mhocko@xxxxxxxx>,
Jason Gunthorpe <jgg@xxxxxxxx>, John Hubbard <jhubbard@xxxxxxxxxx>,
Peter Xu <peterx@xxxxxxxxxx>, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
References: <20250604140544.688711-1-david@xxxxxxxxxx>
<fb548cd0-4a6a-4e90-92b8-24c7b35df416@lucifer.local>
From: David Hildenbrand <david@xxxxxxxxxx>
Content-Language: en-US
Autocrypt: addr=david@xxxxxxxxxx; keydata=
xsFNBFXLn5EBEAC+zYvAFJxCBY9Tr1xZgcESmxVNI/0ffzE/ZQOiHJl6mGkmA1R7/uUpiCjJ
dBrn+lhhOYjjNefFQou6478faXE6o2AhmebqT4KiQoUQFV4R7y1KMEKoSyy8hQaK1umALTdL
QZLQMzNE74ap+GDK0wnacPQFpcG1AE9RMq3aeErY5tujekBS32jfC/7AnH7I0v1v1TbbK3Gp
XNeiN4QroO+5qaSr0ID2sz5jtBLRb15RMre27E1ImpaIv2Jw8NJgW0k/D1RyKCwaTsgRdwuK
Kx/Y91XuSBdz0uOyU/S8kM1+ag0wvsGlpBVxRR/xw/E8M7TEwuCZQArqqTCmkG6HGcXFT0V9
PXFNNgV5jXMQRwU0O/ztJIQqsE5LsUomE//bLwzj9IVsaQpKDqW6TAPjcdBDPLHvriq7kGjt
WhVhdl0qEYB8lkBEU7V2Yb+SYhmhpDrti9Fq1EsmhiHSkxJcGREoMK/63r9WLZYI3+4W2rAc
UucZa4OT27U5ZISjNg3Ev0rxU5UH2/pT4wJCfxwocmqaRr6UYmrtZmND89X0KigoFD/XSeVv
jwBRNjPAubK9/k5NoRrYqztM9W6sJqrH8+UWZ1Idd/DdmogJh0gNC0+N42Za9yBRURfIdKSb
B3JfpUqcWwE7vUaYrHG1nw54pLUoPG6sAA7Mehl3nd4pZUALHwARAQABzSREYXZpZCBIaWxk
ZW5icmFuZCA8ZGF2aWRAcmVkaGF0LmNvbT7CwZgEEwEIAEICGwMGCwkIBwMCBhUIAgkKCwQW
AgMBAh4BAheAAhkBFiEEG9nKrXNcTDpGDfzKTd4Q9wD/g1oFAl8Ox4kFCRKpKXgACgkQTd4Q
9wD/g1oHcA//a6Tj7SBNjFNM1iNhWUo1lxAja0lpSodSnB2g4FCZ4R61SBR4l/psBL73xktp
rDHrx4aSpwkRP6Epu6mLvhlfjmkRG4OynJ5HG1gfv7RJJfnUdUM1z5kdS8JBrOhMJS2c/gPf
wv1TGRq2XdMPnfY2o0CxRqpcLkx4vBODvJGl2mQyJF/gPepdDfcT8/PY9BJ7FL6Hrq1gnAo4
3Iv9qV0JiT2wmZciNyYQhmA1V6dyTRiQ4YAc31zOo2IM+xisPzeSHgw3ONY/XhYvfZ9r7W1l
pNQdc2G+o4Di9NPFHQQhDw3YTRR1opJaTlRDzxYxzU6ZnUUBghxt9cwUWTpfCktkMZiPSDGd
KgQBjnweV2jw9UOTxjb4LXqDjmSNkjDdQUOU69jGMUXgihvo4zhYcMX8F5gWdRtMR7DzW/YE
BgVcyxNkMIXoY1aYj6npHYiNQesQlqjU6azjbH70/SXKM5tNRplgW8TNprMDuntdvV9wNkFs
9TyM02V5aWxFfI42+aivc4KEw69SE9KXwC7FSf5wXzuTot97N9Phj/Z3+jx443jo2NR34XgF
89cct7wJMjOF7bBefo0fPPZQuIma0Zym71cP61OP/i11ahNye6HGKfxGCOcs5wW9kRQEk8P9
M/k2wt3mt/fCQnuP/mWutNPt95w9wSsUyATLmtNrwccz63XOwU0EVcufkQEQAOfX3n0g0fZz
Bgm/S2zF/kxQKCEKP8ID+Vz8sy2GpDvveBq4H2Y34XWsT1zLJdvqPI4af4ZSMxuerWjXbVWb
T6d4odQIG0fKx4F8NccDqbgHeZRNajXeeJ3R7gAzvWvQNLz4piHrO/B4tf8svmRBL0ZB5P5A
2uhdwLU3NZuK22zpNn4is87BPWF8HhY0L5fafgDMOqnf4guJVJPYNPhUFzXUbPqOKOkL8ojk
CXxkOFHAbjstSK5Ca3fKquY3rdX3DNo+EL7FvAiw1mUtS+5GeYE+RMnDCsVFm/C7kY8c2d0G
NWkB9pJM5+mnIoFNxy7YBcldYATVeOHoY4LyaUWNnAvFYWp08dHWfZo9WCiJMuTfgtH9tc75
7QanMVdPt6fDK8UUXIBLQ2TWr/sQKE9xtFuEmoQGlE1l6bGaDnnMLcYu+Asp3kDT0w4zYGsx
5r6XQVRH4+5N6eHZiaeYtFOujp5n+pjBaQK7wUUjDilPQ5QMzIuCL4YjVoylWiBNknvQWBXS
lQCWmavOT9sttGQXdPCC5ynI+1ymZC1ORZKANLnRAb0NH/UCzcsstw2TAkFnMEbo9Zu9w7Kv
AxBQXWeXhJI9XQssfrf4Gusdqx8nPEpfOqCtbbwJMATbHyqLt7/oz/5deGuwxgb65pWIzufa
N7eop7uh+6bezi+rugUI+w6DABEBAAHCwXwEGAEIACYCGwwWIQQb2cqtc1xMOkYN/MpN3hD3
AP+DWgUCXw7HsgUJEqkpoQAKCRBN3hD3AP+DWrrpD/4qS3dyVRxDcDHIlmguXjC1Q5tZTwNB
boaBTPHSy/Nksu0eY7x6HfQJ3xajVH32Ms6t1trDQmPx2iP5+7iDsb7OKAb5eOS8h+BEBDeq
3ecsQDv0fFJOA9ag5O3LLNk+3x3q7e0uo06XMaY7UHS341ozXUUI7wC7iKfoUTv03iO9El5f
XpNMx/YrIMduZ2+nd9Di7o5+KIwlb2mAB9sTNHdMrXesX8eBL6T9b+MZJk+mZuPxKNVfEQMQ
a5SxUEADIPQTPNvBewdeI80yeOCrN+Zzwy/Mrx9EPeu59Y5vSJOx/z6OUImD/GhX7Xvkt3kq
Er5KTrJz3++B6SH9pum9PuoE/k+nntJkNMmQpR4MCBaV/J9gIOPGodDKnjdng+mXliF3Ptu6
3oxc2RCyGzTlxyMwuc2U5Q7KtUNTdDe8T0uE+9b8BLMVQDDfJjqY0VVqSUwImzTDLX9S4g/8
kC4HRcclk8hpyhY2jKGluZO0awwTIMgVEzmTyBphDg/Gx7dZU1Xf8HFuE+UZ5UDHDTnwgv7E
th6RC9+WrhDNspZ9fJjKWRbveQgUFCpe1sa77LAw+XFrKmBHXp9ZVIe90RMe2tRL06BGiRZr
jPrnvUsUUsjRoRNJjKKA/REq+sAnhkNPPZ/NNMjaZ5b8Tovi8C0tmxiCHaQYqj7G2rgnT0kt
WNyWQQ==
Organization: Red Hat
In-Reply-To: <fb548cd0-4a6a-4e90-92b8-24c7b35df416@lucifer.local>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 04.06.25 16:48, Lorenzo Stoakes wrote:
+Linus in case he has an opinion about BUG_ON() in general...
On Wed, Jun 04, 2025 at 04:05:44PM +0200, David Hildenbrand wrote:
Especially once we hit one of the assertions in
sanity_check_pinned_pages(), observing follow-up assertions failing
in other code can give good clues about what went wrong, so use
VM_WARN_ON_ONCE instead.
I guess the situation where you'd actually want a BUG_ON() is one where
carrying on might cause further corruption so you just want things to stop.
Yes. Like, serious data corruption would be avoidable.
But usually we're already pretty screwed if the thing happened right? So
it's rare if ever that this would be legit?
Linus's point of view is that we shouldn't use them _at all_ right? So
maybe even this situation isn't one where we'd want to use one?
I think the grey zone is actual data corruption. But one has to have a
pretty good reason to use a BUG_ON and not a WARN_ON_ONCE() + recovery.
While at it, let's just convert all VM_BUG_ON to VM_WARN_ON_ONCE as
well. Add one comment for the pfn_valid() check.
Yeah VM_BUG_ON() is just _weird_. Maybe we should get rid of all of them
full stop?
That's my thinking a well.
We have to introduce VM_WARN_ON_ONCE_VMA() to make that fly.
I checked the implementation vs. the other VM_WARN_ON_ONCE_*()'s and it
looks good.
I wonder if we can find a way to not duplicate this code... but one for a
follow up I think :>)
Drop the BUG_ON after mmap_read_lock_killable(), if that ever returns
something > 0 we're in bigger trouble. Convert the other BUG_ON's into
VM_WARN_ON_ONCE as well, they are in a similar domain "should never
happen", but more reasonable to check for during early testing.
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>
Cc: "Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>
Cc: Vlastimil Babka <vbabka@xxxxxxx>
Cc: Mike Rapoport <rppt@xxxxxxxxxx>
Cc: Suren Baghdasaryan <surenb@xxxxxxxxxx>
Cc: Michal Hocko <mhocko@xxxxxxxx>
Cc: Jason Gunthorpe <jgg@xxxxxxxx>
Cc: John Hubbard <jhubbard@xxxxxxxxxx>
Cc: Peter Xu <peterx@xxxxxxxxxx>
Signed-off-by: David Hildenbrand <david@xxxxxxxxxx>
LGTM so,
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>
Thanks!
One nit below.
---
Wanted to do this for a long time, but my todo list keeps growing ...
Sounds familiar :) Merge window a chance to do some of these things...
Based on mm/mm-unstable
---
include/linux/mmdebug.h | 12 ++++++++++++
mm/gup.c | 41 +++++++++++++++++++----------------------
2 files changed, 31 insertions(+), 22 deletions(-)
diff --git a/include/linux/mmdebug.h b/include/linux/mmdebug.h
index a0a3894900ed4..14a45979cccc9 100644
--- a/include/linux/mmdebug.h
+++ b/include/linux/mmdebug.h
@@ -89,6 +89,17 @@ void vma_iter_dump_tree(const struct vma_iterator *vmi);
} \
unlikely(__ret_warn_once); \
})
+#define VM_WARN_ON_ONCE_VMA(cond, vma) ({ \
+ static bool __section(".data..once") __warned; \
+ int __ret_warn_once = !!(cond); \
+ \
+ if (unlikely(__ret_warn_once && !__warned)) { \
+ dump_vma(vma); \
+ __warned = true; \
+ WARN_ON(1); \
+ } \
+ unlikely(__ret_warn_once); \
+})
An aside, I wonder if we could somehow make this generic for various
WARN_ON_ONCE()'s?
Yeah, probably. Maybe it will get .... ugly :)
#define VM_WARN_ON_VMG(cond, vmg) ({ \
int __ret_warn = !!(cond); \
\
@@ -115,6 +126,7 @@ void vma_iter_dump_tree(const struct vma_iterator *vmi);
#define VM_WARN_ON_FOLIO(cond, folio) BUILD_BUG_ON_INVALID(cond)
#define VM_WARN_ON_ONCE_FOLIO(cond, folio) BUILD_BUG_ON_INVALID(cond)
#define VM_WARN_ON_ONCE_MM(cond, mm) BUILD_BUG_ON_INVALID(cond)
+#define VM_WARN_ON_ONCE_VMA(cond, vma) BUILD_BUG_ON_INVALID(cond)
#define VM_WARN_ON_VMG(cond, vmg) BUILD_BUG_ON_INVALID(cond)
#define VM_WARN_ONCE(cond, format...) BUILD_BUG_ON_INVALID(cond)
#define VM_WARN(cond, format...) BUILD_BUG_ON_INVALID(cond)
diff --git a/mm/gup.c b/mm/gup.c
index e065a49842a87..3c3931fcdd820 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -64,11 +64,11 @@ static inline void sanity_check_pinned_pages(struct page **pages,
!folio_test_anon(folio))
continue;
if (!folio_test_large(folio) || folio_test_hugetlb(folio))
- VM_BUG_ON_PAGE(!PageAnonExclusive(&folio->page), page);
+ VM_WARN_ON_ONCE_PAGE(!PageAnonExclusive(&folio->page), page);
else
/* Either a PTE-mapped or a PMD-mapped THP. */
- VM_BUG_ON_PAGE(!PageAnonExclusive(&folio->page) &&
- !PageAnonExclusive(page), page);
+ VM_WARN_ON_ONCE_PAGE(!PageAnonExclusive(&folio->page) &&
+ !PageAnonExclusive(page), page);
Nit but wouldn't VM_WARN_ON_ONCE_FOLIO() work better here?
No, we want the actual problematic page here, as that can give us clues
what is going wrong.
For the small-folio case above we could use it, though.
--
Cheers,
David / dhildenb
Return-Path: <linux-kernel+bounces-673410-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id E46AC41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:59:14 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 7753316EBFC
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:59:15 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 2C11329114B;
Wed, 4 Jun 2025 14:59:08 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gQnN6HOb"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 60D0418E1F;
Wed, 4 Jun 2025 14:59:07 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749049147; cv=none; b=GUzlIIrc/wWrtlYeThLx0jYouPcFhCtjFiDTfhQ5wA6NKcBZe/S3RMWcVdzoGDhq4BsTQ15JTR9lNFe+YjUJHCQZvtGnxmqzYY2bxV01xXmlbNBDOZ8AmoBunuD6rgDXGEBUx63mSaPh2/a3rZzp+97LD0BUsW/b6E6UC2eQTxw=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749049147; c=relaxed/simple;
bh=dPl10L8kn0KdFlwUWNR6maayAHjXxs+RSkZaDg75lMU=;
h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References:
MIME-Version:Content-Type; b=CopuRCrV7AXJdhpY2bSOwOdoltyjYHWFFwF5wq3VGhp4gXQh/cIShBh234Zfc3z+JZ+cbFMKgiXUOMFmIGNBwqgMUlspPsci7fzJHhJS8Mwv+iolbClGjZwcl3livCMZTP21BazQ/uCIWek1uxnU//yylasf2Lxu7IwwitUKPKM=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gQnN6HOb; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id CEA8EC4CEED;
Wed, 4 Jun 2025 14:59:05 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749049147;
bh=dPl10L8kn0KdFlwUWNR6maayAHjXxs+RSkZaDg75lMU=;
h=Date:From:To:Cc:Subject:In-Reply-To:References:From;
b=gQnN6HOblS//78nNeQQBP3lFI6vXMvrS4+pE5WczwofY6UFZe39yIvsspdCza/7cN
IW9kDcryp4wZjGrUxPyxAF8hdeqRAL9P+z9KIZSAMs908UurrI/zKIfKFqqwsK+lLt
/Fz6IYDRLEgNbYMT9go+vyghqFvkfIUSGerD9Uz7q+pCeouq68GD5J2BiptqSOGzI1
zjWeuoaKGGcEbmsT/Q7WxQOpheEsAVTmQinpGfjFnUHN4Pd0XHas3fDDFNMhSmxI33
FUaqcPjdzW8acuhjCsOzQxUwys1hRvlxiG+SJFGXI/2IVzmsBIYs38RDqHtTh7ljK7
ZA0OLYs79s2Ew==
Date: Wed, 4 Jun 2025 16:59:02 +0200
From: Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx>
To: Jonathan Corbet <corbet@xxxxxxx>
Cc: linux-doc@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, "
=?UTF-8?B?TsOtY29sYXM=?= F. R. A. Prado" <nfraprado@xxxxxxxxxxxxx>
Subject: Re: [PATCH v2 3/3] docs: CSS: make cross-reference links more
evident
Message-ID: <20250604165902.08265fe7@xxxxxxx>
In-Reply-To: <20250604143645.78367-4-corbet@xxxxxxx>
References: <20250604143645.78367-1-corbet@xxxxxxx>
<20250604143645.78367-4-corbet@xxxxxxx>
X-Mailer: Claws Mail 4.3.1 (GTK 3.24.43; x86_64-redhat-linux-gnu)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Em Wed, 4 Jun 2025 08:36:45 -0600
Jonathan Corbet <corbet@xxxxxxx> escreveu:
The Sphinx Alabaster theme uses border-bottom to mark reference links; the
result does not render correctly (the underline is missing) in some brows=
er
configurations. Switch to using the standard text-underline property, and
use text-underline-offset to place that underline below any underscores in
the underlined text.
=20
Suggested-by: N=C3=ADcolas F. R. A. Prado <nfraprado@xxxxxxxxxxxxx>
Signed-off-by: Jonathan Corbet <corbet@xxxxxxx>
While I didn't test, it looks good enough for me.
Reviewed-by: Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx>
---
Documentation/sphinx-static/custom.css | 7 +++++++
1 file changed, 7 insertions(+)
=20
diff --git a/Documentation/sphinx-static/custom.css b/Documentation/sphin=
x-static/custom.css
index f4285417c71a..c9991566f914 100644
--- a/Documentation/sphinx-static/custom.css
+++ b/Documentation/sphinx-static/custom.css
@@ -136,3 +136,10 @@ div.language-selection:hover ul {
div.language-selection ul li:hover {
background: #dddddd;
}
+
+/* Make xrefs more universally visible */
+a.reference, a.reference:hover {
+ border-bottom: none;
+ text-decoration: underline;
+ text-underline-offset: 0.3em;
+}
Return-Path: <linux-kernel+bounces-673411-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 865AD41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 10:59:50 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 174A57A7F6E
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 14:58:31 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 4FF83291176;
Wed, 4 Jun 2025 14:59:39 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZvhgSFbo"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 88DBD28FFF6;
Wed, 4 Jun 2025 14:59:38 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749049178; cv=none; b=BE7Kki/V2AQYjlTBhLPHga45sTgpVuNxRkDnLlidcEOTwN767rDEGzRO0uBxzHW27y/kKKJqc4uhW0rnbHJIVbaMoxBue1G7maTRqwEB6O9/5HqI1mk2fvs0W+tBNI9XDGVBvFOk76Ha2lnjl+7dXFWx4sopemRT8gggDnYRfAA=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749049178; c=relaxed/simple;
bh=wJsLEtGGSfzQUfeRpedxvZPZVDcyW+G0Ky8PAJCKb/w=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=qEZkUhNy12C/p9AtvFLvFDZ1F82RWAqfQ4jJ4T9dU03p/OIKrzNQqNy5EytY9OYCg0ULOIulkFKm8ZAQ1HAqt2GmIVIJtqNTmG85kNSRZMZLoqtZC0A0agwin4VJMfX4IEt8aaEYvagDTzqgy+PMvscRA4AyqRdOYj5w4uvktbM=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZvhgSFbo; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 575E7C4CEEF;
Wed, 4 Jun 2025 14:59:38 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749049178;
bh=wJsLEtGGSfzQUfeRpedxvZPZVDcyW+G0Ky8PAJCKb/w=;
h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
b=ZvhgSFbo5OA0fTglMBFbVarnMtKITK18FMO5UmtdmrI906yOD+zuwukrmEwfWushX
wvbzdnTfVYCy2MVV7s6QmlMYgMgPjdyGnETxZKnyPa61eN73UfverYxcNRxKIXzRVK
lndH4lqa5cwiIP1X2z8n2Aawj+zqA5xuKLqjAvuwH3VqCgm+2xKbxUHwJSgBc/hBUa
ToAL+ElA6Okw7UJbnMS3RTHC9UAc3rT+6klp9LUn0Uc24L7ikdhcWzrkYyFoVwuW5V
xAaahjWLOwgQt33Ea3Lt0IB8K8wVTcLrgDri490DmJV5LmwWQPPHRDr6rZRG7XiUTl
OH8ez2iGYuV/A==
Received: from johan by xi.lan with local (Exim 4.97.1)
(envelope-from <johan@xxxxxxxxxx>)
id 1uMpaZ-000000007f1-1W6J;
Wed, 04 Jun 2025 16:59:36 +0200
Date: Wed, 4 Jun 2025 16:59:35 +0200
From: Johan Hovold <johan@xxxxxxxxxx>
To: Konrad Dybcio <konrad.dybcio@xxxxxxxxxxxxxxxx>
Cc: Qiang Yu <quic_qianyu@xxxxxxxxxxx>,
Wenbin Yao <quic_wenbyao@xxxxxxxxxxx>, catalin.marinas@xxxxxxx,
will@xxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx,
andersson@xxxxxxxxxx, konradybcio@xxxxxxxxxx, robh@xxxxxxxxxx,
krzk+dt@xxxxxxxxxx, conor+dt@xxxxxxxxxx,
linux-arm-msm@xxxxxxxxxxxxxxx, devicetree@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, vkoul@xxxxxxxxxx, kishon@xxxxxxxxxx,
sfr@xxxxxxxxxxxxxxxx, linux-phy@xxxxxxxxxxxxxxxxxxx,
krishna.chundru@xxxxxxxxxxxxxxxx, quic_vbadigan@xxxxxxxxxxx,
quic_mrana@xxxxxxxxxxx, quic_cang@xxxxxxxxxxx,
Johan Hovold <johan+linaro@xxxxxxxxxx>,
Abel Vesa <abel.vesa@xxxxxxxxxx>
Subject: Re: [PATCH v3 5/5] phy: qcom: qmp-pcie: add x1e80100 qref supplies
Message-ID: <aEBfV2M-ZqDF7aRz@xxxxxxxxxxxxxxxxxxxx>
References: <20250508081514.3227956-1-quic_wenbyao@xxxxxxxxxxx>
<20250508081514.3227956-6-quic_wenbyao@xxxxxxxxxxx>
<aBxpMuFGKgWrw1TV@xxxxxxxxxxxxxxxxxxxx>
<5fd4abe7-3621-4119-9482-de823b247b0d@xxxxxxxxxxx>
<aBx9LB_qQIvA0bj8@xxxxxxxxxxxxxxxxxxxx>
<55a85622-fe33-4b5f-81b2-4a4270fab680@xxxxxxxxxxxxxxxx>
<aDRw2rJ39t9W10YG@xxxxxxxxxxxxxxxxxxxx>
<7f525932-570e-4c81-a3f2-6d2e26b02233@xxxxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <7f525932-570e-4c81-a3f2-6d2e26b02233@xxxxxxxxxxxxxxxx>
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Tue, May 27, 2025 at 12:50:21PM +0200, Konrad Dybcio wrote:
On 5/26/25 3:47 PM, Johan Hovold wrote:
> On Thu, May 22, 2025 at 10:03:18PM +0200, Konrad Dybcio wrote:
>> On 5/8/25 11:45 AM, Johan Hovold wrote:
>>> On Thu, May 08, 2025 at 04:50:30PM +0800, Qiang Yu wrote:
>>>> On 5/8/2025 4:20 PM, Johan Hovold wrote:
>
>>>>> This still looks wrong and you never replied to why these supplies
>>>>> shouldn't be handled by the tcsr clock driver that supplies these
>>>>> clocks:
>>>>>
>>>>> https://lore.kernel.org/lkml/aBHUmXx6N72_sCH9@xxxxxxxxxxxxxxxxxxxx/
>>>
>>>> Sorry, I thought Konrad had convinced you.
>>>
>>> IIRC, he just said you guys were told to add the QREF supply to the PHY.
>>> That's not an argument.
>>>
>>>> If the TCSR driver manages these supplies, would it be possible for tscr
>>>> driver to recognize when it needs to turn vdda-qref on or off for a
>>>> specific PCIe port?
>>>
>>> Sure, just add a lookup table to the driver and enable the required
>>> supplies when a ref clock is enabled.
>>>
>>> As I mentioned in the other thread, the T14s has the following QREF
>>> supplies:
>>>
>>>
>>> VDD_A_QREFS_1P2_A
>>> VDD_A_QREFS_1P2_B
>>>
>>> VDD_A_QREFS_0P875_A
>>> VDD_A_QREFS_0P875_B
>>> VDD_A_QREFS_0P875_0
>>> VDD_A_QREFS_0P875_2
>>> VDD_A_QREFS_0P875_3
>>>
>>> and it's not clear how these maps to the various consumer ref clocks,
>>> including the PCIe ones:
>>>
>>> #define TCSR_PCIE_2L_4_CLKREF_EN
>>> #define TCSR_PCIE_2L_5_CLKREF_EN
>>> #define TCSR_PCIE_8L_CLKREF_EN
>>> #define TCSR_PCIE_4L_CLKREF_EN
>>>
>>> That mapping can be done by the TCSR clock driver (which would also take
>>> care of the 1.2 V supplies).
>>
>> So we had an internal discussion about this and while it may work, it
>> would only do so for some SoCs, and maybe only on the surface, as the
>> wiring behind it is rather peculiar..
>
> Care to expand on why it cannot be made to work generally?
"-ENODATA".. many connections are difficult to unambiguously decipher
>
> Also, what would the mapping of the above QREF supplies to PCIe PHYs
> even look like?
I'm not sure I have a clear answer..
How would anyone know how to use a binding like this if you guys with
access to internal docs can't even answer how the QREF supplies maps to
the PHYs for a given SoC?
>> Plus, not all QREF consumers have a clock expressed in TCSR as of
>> right now.
>
> Is that because there is no corresponding bit in the TCSR or simply
> because it has not been described yet?
Unfortunately, the former.. Some IPs have a non-TCSR ref clock and
some are presumably implicitly fed by BI_TCXO
I think you need to provide a lot more detail here so we can determine
how best best to proceed. We shouldn't accept made up PHY supplies
without a proper motivation just because that's how it's done
downstream.
Johan
Return-Path: <linux-kernel+bounces-673412-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 8C23E41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:00:40 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 27C0E16D7E4
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:00:41 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id A41CA28ECF8;
Wed, 4 Jun 2025 15:00:32 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="SBlukFFj"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id CE3681DFF8;
Wed, 4 Jun 2025 15:00:31 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749049231; cv=none; b=qdrjw6o0dQe7DUfa2utQcPuk87XV3fWcrfrEcTnhp43NO94IoUJKYjY+NXwkRaPfGSYYswoVqBBMzVIS+bxESfhvbgVkqzrJPdyCFkAxeYjCOe675wD6KGsr0EhxnCubM/P0NM2RFVWlel5s/pEJ+16KlU9lUq7VGg9TenUZbkg=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749049231; c=relaxed/simple;
bh=tFfAHcuK1W9KZi2uebnSCQzC+lwDGxGFdWFkTKf2Z6I=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID:
MIME-Version:Content-Type; b=hL0bLMMnQmtONhOdr7FIiR3+b8m4k6KIcFm6ONNQfJgBbGlWi0hIJmwRwNoB5SrVXj5sj7PhKI9HEkFUxD/nKLfGGBJynyHQcWwDGC41EpUBH/GtSoCrV7hLaMw64Vr++npoEcX3l4w0qGm7N1GiO+ZG7yvqXUhAOlRQH1rmkGM=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=SBlukFFj; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id B9152C4CEE4;
Wed, 4 Jun 2025 15:00:23 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749049231;
bh=tFfAHcuK1W9KZi2uebnSCQzC+lwDGxGFdWFkTKf2Z6I=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
b=SBlukFFjpJ1mIv0NLRqQpI74YVsrOObNpomOPkCc7NlBRH9jGWvdX3wC8Nt1z6JtB
gJ0+N1rihS2+NMjjNr6bNhfxulu4wiJIKPMzh6MVjsPPECsidDpjepDyLS1X8Qleys
9iQHhQuYQ4odYKySw2Bkt+ywB5ctGUYHtedjp/LOpmmUsUS8RyjSmNIO5Jou+Itspd
aGNeZbJ+8bIAhIB8bySQlr8eZYenT3OvlZllsBm9bI3D53D/NnaVNbnjOqMciBQ5Z0
B/UewvPiREBuKskP2z5+L++/1X++z4Nowo0ZKRpIabW0pxcBum+1PqpqOcr2yh1j4q
UrqicyP2DUbeQ==
From: Pratyush Yadav <pratyush@xxxxxxxxxx>
To: Pasha Tatashin <pasha.tatashin@xxxxxxxxxx>
Cc: pratyush@xxxxxxxxxx, jasonmiu@xxxxxxxxxx, graf@xxxxxxxxxx,
changyuanl@xxxxxxxxxx, rppt@xxxxxxxxxx, dmatlack@xxxxxxxxxx,
rientjes@xxxxxxxxxx, corbet@xxxxxxx, rdunlap@xxxxxxxxxxxxx,
ilpo.jarvinen@xxxxxxxxxxxxxxx, kanie@xxxxxxxxxxxxxxxxx,
ojeda@xxxxxxxxxx, aliceryhl@xxxxxxxxxx, masahiroy@xxxxxxxxxx,
akpm@xxxxxxxxxxxxxxxxxxxx, tj@xxxxxxxxxx, yoann.congal@xxxxxxxx,
mmaurer@xxxxxxxxxx, roman.gushchin@xxxxxxxxx, chenridong@xxxxxxxxxx,
axboe@xxxxxxxxx, mark.rutland@xxxxxxx, jannh@xxxxxxxxxx,
vincent.guittot@xxxxxxxxxx, hannes@xxxxxxxxxxx,
dan.j.williams@xxxxxxxxx, david@xxxxxxxxxx, joel.granados@xxxxxxxxxx,
rostedt@xxxxxxxxxxx, anna.schumaker@xxxxxxxxxx, song@xxxxxxxxxx,
zhangguopeng@xxxxxxxxxx, linux@xxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-doc@xxxxxxxxxxxxxxx,
linux-mm@xxxxxxxxx, gregkh@xxxxxxxxxxxxxxxxxxx, tglx@xxxxxxxxxxxxx,
mingo@xxxxxxxxxx, bp@xxxxxxxxx, dave.hansen@xxxxxxxxxxxxxxx,
x86@xxxxxxxxxx, hpa@xxxxxxxxx, rafael@xxxxxxxxxx, dakr@xxxxxxxxxx,
bartosz.golaszewski@xxxxxxxxxx, cw00.choi@xxxxxxxxxxx,
myungjoo.ham@xxxxxxxxxxx, yesanishhere@xxxxxxxxx,
Jonathan.Cameron@xxxxxxxxxx, quic_zijuhu@xxxxxxxxxxx,
aleksander.lobakin@xxxxxxxxx, ira.weiny@xxxxxxxxx,
andriy.shevchenko@xxxxxxxxxxxxxxx, leon@xxxxxxxxxx, lukas@xxxxxxxxx,
bhelgaas@xxxxxxxxxx, wagi@xxxxxxxxxx, djeffery@xxxxxxxxxx,
stuart.w.hayes@xxxxxxxxx
Subject: Re: [RFC v2 03/16] kho: add kho_unpreserve_folio/phys
In-Reply-To: <20250515182322.117840-4-pasha.tatashin@xxxxxxxxxx>
References: <20250515182322.117840-1-pasha.tatashin@xxxxxxxxxx>
<20250515182322.117840-4-pasha.tatashin@xxxxxxxxxx>
Date: Wed, 04 Jun 2025 17:00:22 +0200
Message-ID: <mafs05xhbv9fd.fsf@xxxxxxxxxx>
User-Agent: Gnus/5.13 (Gnus v5.13)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Thu, May 15 2025, Pasha Tatashin wrote:
From: Changyuan Lyu <changyuanl@xxxxxxxxxx>
Allow users of KHO to cancel the previous preservation by adding the
necessary interfaces to unpreserve folio.
Signed-off-by: Changyuan Lyu <changyuanl@xxxxxxxxxx>
Co-developed-by: Pasha Tatashin <pasha.tatashin@xxxxxxxxxx>
Signed-off-by: Pasha Tatashin <pasha.tatashin@xxxxxxxxxx>
---
include/linux/kexec_handover.h | 12 +++++
kernel/kexec_handover.c | 84 ++++++++++++++++++++++++++++------
2 files changed, 83 insertions(+), 13 deletions(-)
[...]
diff --git a/kernel/kexec_handover.c b/kernel/kexec_handover.c
index 8ff561e36a87..eb305e7e6129 100644
--- a/kernel/kexec_handover.c
+++ b/kernel/kexec_handover.c
@@ -101,26 +101,33 @@ static void *xa_load_or_alloc(struct xarray *xa, unsigned long index, size_t sz)
return elm;
}
-static void __kho_unpreserve(struct kho_mem_track *track, unsigned long pfn,
- unsigned long end_pfn)
+static void __kho_unpreserve_order(struct kho_mem_track *track, unsigned long pfn,
+ unsigned int order)
{
struct kho_mem_phys_bits *bits;
struct kho_mem_phys *physxa;
+ const unsigned long pfn_high = pfn >> order;
- while (pfn < end_pfn) {
- const unsigned int order =
- min(count_trailing_zeros(pfn), ilog2(end_pfn - pfn));
- const unsigned long pfn_high = pfn >> order;
+ physxa = xa_load(&track->orders, order);
+ if (!physxa)
+ return;
- physxa = xa_load(&track->orders, order);
- if (!physxa)
- continue;
+ bits = xa_load(&physxa->phys_bits, pfn_high / PRESERVE_BITS);
+ if (!bits)
+ return;
- bits = xa_load(&physxa->phys_bits, pfn_high / PRESERVE_BITS);
- if (!bits)
- continue;
+ clear_bit(pfn_high % PRESERVE_BITS, bits->preserve);
+}
- clear_bit(pfn_high % PRESERVE_BITS, bits->preserve);
+static void __kho_unpreserve(struct kho_mem_track *track, unsigned long pfn,
+ unsigned long end_pfn)
+{
+ unsigned int order;
+
+ while (pfn < end_pfn) {
+ order = min(count_trailing_zeros(pfn), ilog2(end_pfn - pfn));
This is fragile. If the preserve call spans say 4 PFNs, then it gets
preserved as a order 2 allocation, but if the PFNs are unpreserved
one-by-one, __kho_unpreserve_order() will unpreserve from the order 0
xarray, which will end up doing nothing, leaking those pages.
It should either look through all orders to find the PFN, or at least
have a requirement in the API that the same phys and size combination as
the preserve call must be given to unpreserve.
+
+ __kho_unpreserve_order(track, pfn, order);
pfn += 1 << order;
}
@@ -607,6 +614,29 @@ int kho_preserve_folio(struct folio *folio)
}
EXPORT_SYMBOL_GPL(kho_preserve_folio);
+/**
+ * kho_unpreserve_folio - unpreserve a folio.
+ * @folio: folio to unpreserve.
+ *
+ * Instructs KHO to unpreserve a folio that was preserved by
+ * kho_preserve_folio() before.
+ *
+ * Return: 0 on success, error code on failure
+ */
+int kho_unpreserve_folio(struct folio *folio)
+{
+ const unsigned long pfn = folio_pfn(folio);
+ const unsigned int order = folio_order(folio);
+ struct kho_mem_track *track = &kho_out.ser.track;
+
+ if (kho_out.finalized)
+ return -EBUSY;
+
+ __kho_unpreserve_order(track, pfn, order);
+ return 0;
+}
+EXPORT_SYMBOL_GPL(kho_unpreserve_folio);
+
/**
* kho_preserve_phys - preserve a physically contiguous range across kexec.
* @phys: physical address of the range.
@@ -652,6 +682,34 @@ int kho_preserve_phys(phys_addr_t phys, size_t size)
}
EXPORT_SYMBOL_GPL(kho_preserve_phys);
+/**
+ * kho_unpreserve_phys - unpreserve a physically contiguous range across kexec.
+ * @phys: physical address of the range.
+ * @size: size of the range.
+ *
+ * Instructs KHO to unpreserve the memory range from @phys to @phys + @size
+ * across kexec.
+ *
+ * Return: 0 on success, error code on failure
+ */
+int kho_unpreserve_phys(phys_addr_t phys, size_t size)
+{
+ struct kho_mem_track *track = &kho_out.ser.track;
+ unsigned long pfn = PHYS_PFN(phys);
+ unsigned long end_pfn = PHYS_PFN(phys + size);
+
+ if (kho_out.finalized)
+ return -EBUSY;
+
+ if (!PAGE_ALIGNED(phys) || !PAGE_ALIGNED(size))
+ return -EINVAL;
+
+ __kho_unpreserve(track, pfn, end_pfn);
+
+ return 0;
+}
+EXPORT_SYMBOL_GPL(kho_unpreserve_phys);
+
int __kho_abort(void)
{
int err;
--
Regards,
Pratyush Yadav
Return-Path: <linux-kernel+bounces-673413-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id A8F9241E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:01:36 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 932C6188D3C7
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:01:47 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 24B6C291161;
Wed, 4 Jun 2025 15:01:26 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Br4rIxIb"
Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1E9371C9DC6;
Wed, 4 Jun 2025 15:01:20 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=192.198.163.12
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749049284; cv=fail; b=DDmB5RsKTKoWnGx8jmxZPMy662mIfG8rDVA2Hls0SwKPnsaDov80whhC7/6+dSL9ETthI8b/jpTFgj9aGoQ3MkDiZ3H5hbkR4E99QUON8mIb0eCJHS1lOPfn2FLIeQS+krYuw69NbvTkt5tNvJINrv2KfNhzCJWTgRUGX2IslmI=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749049284; c=relaxed/simple;
bh=BnGM7O2mDgZe7eibWw6+ib/LLVaAaG9KjpwjMxYmxfQ=;
h=Date:From:To:CC:Subject:Message-ID:Content-Type:
Content-Disposition:MIME-Version; b=J8/9bo5ZI/ohGyoaa+PpJDXI3jTQBcEXUgOEu4YF9G5NpY/WZQYKOr9W4QAmnlra6/PHHbA3jmuoqWm+yro820Cy0akM92UJ4xbJQmd8uLzRj4yPsbuIsCL/svjoc/73VMdKnPOIl90idYaeXvZHClolbsl6efIprDSL2aVUbak=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Br4rIxIb; arc=fail smtp.client-ip=192.198.163.12
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
t=1749049282; x=1780585282;
h=date:from:to:cc:subject:message-id:
content-transfer-encoding:mime-version;
bh=BnGM7O2mDgZe7eibWw6+ib/LLVaAaG9KjpwjMxYmxfQ=;
b=Br4rIxIbq8kmO1kMAUfnc16RBGfRu9lj+Y8hPNhboSBQtGdQn4zQn7IJ
ePoCsaj1AfcUSJy0r4Ux0YalDqU3cLLCokU3WRWjvTHabF6LdM3tNdX+h
MW0M8BqYDB0uo5d4KGFCGWrpkC2Bv0BVg78elSJoTrTCSYFlOU7Y85/5K
Wp2ZilbDZW3yK0WpnrGwbhyfrwBt4DO2f27gFCrsEHwSHY3Fdk6muExuY
F0OEz+cEPTyedTt//iFmxAbcwCtmJhqwTp8TZpcJZW8TFXiz/En+mhQxd
EUjc+2gBkDRJz3vv2huvtXXbfXGM6OfZNBww0wrBbDZC2gvwC7rhhJCDY
A==;
X-CSE-ConnectionGUID: /kgbz7+vQ6yLoBrEKszbUg==
X-CSE-MsgGUID: 6pyGPN4RRVu3B3rM0qm2Dg==
X-IronPort-AV: E=McAfee;i="6800,10657,11454"; a="54926644"
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="54926644"
Received: from orviesa005.jf.intel.com ([10.64.159.145])
by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 08:01:20 -0700
X-CSE-ConnectionGUID: YuWcqe9nQYSvLVUZl/J4wA==
X-CSE-MsgGUID: EunLOQjMTHmYAsJ/xXjRzA==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="150494670"
Received: from orsmsx903.amr.corp.intel.com ([10.22.229.25])
by orviesa005.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 08:01:20 -0700
Received: from ORSMSX901.amr.corp.intel.com (10.22.229.23) by
ORSMSX903.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.2.1544.25; Wed, 4 Jun 2025 08:01:18 -0700
Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by
ORSMSX901.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.2.1544.25 via Frontend Transport; Wed, 4 Jun 2025 08:01:18 -0700
Received: from NAM10-MW2-obe.outbound.protection.outlook.com (40.107.94.84) by
edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.1.2507.55; Wed, 4 Jun 2025 08:01:17 -0700
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=Y6MA7yN3PIil+MAKr6Cud3xhiRtBQU+W9GN0NdpDqJb8xmOK7AKdtozhmewlqN5pBTN3FDZEiWyQAo7/4d1auIxOoQOzDVIfl+NEz/ZPjikvExtC0YXiT3wCmxF+DYfbt0dTz27oZiHsEUayJ/lTNWmVOslTijB8dwIo8IUoKDdn9fRr1BGmQqW0+vFiSKAklNcndhc7CUA2epTOy8JtTgmnRlV2qP1+s5qck0M3G9UYaphooCUq1YqbRH7TIQHrBHAWUIyYjol36ioV79lpctCh7XloF/xJbX/2xSrb1UT4Gmusk89rUzhR6CjT7Uu6PvYgfqQCZRrfxeBhz2oTaQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=tUG1SHW0sDWSBFevBiiAxwIRZuevkjC7carZR3WYg0o=;
b=UY6DcrybKs2+vrZlCpfsNPLjerow3YEsEP8zVHhPsrK73AEsiT7mlW7vpF9d+AO3DOfb+ocL9362ZYIAPwgpdaIe12VBVTsC3s30RH6P36pGzLBUjt0TB9jtSZrHorYp4gWyDwZRMvdqz/xGMnhofP6BKBeyrwr1KsEXAaRfK1NYUb8apX2wcEl88Vo3y85wfzIyGc49wGYxPBCsYl9GxecCWnlCVKRoWpVzN1Fz9We5cmKLaBBR8pgvkt5Ba1rp4FJ4AYDBcqS7xBvobZA660+SHVIFEaJFcZHZg9mlyWGCeinYf/bNiCq+K/pTJ0jwUuJ67Bz0yLUGJqmNYcUjMg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com;
dkim=pass header.d=intel.com; arc=none
Authentication-Results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=intel.com;
Received: from LV3PR11MB8603.namprd11.prod.outlook.com (2603:10b6:408:1b6::9)
by MW4PR11MB5892.namprd11.prod.outlook.com (2603:10b6:303:16a::16) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8813.21; Wed, 4 Jun
2025 15:01:10 +0000
Received: from LV3PR11MB8603.namprd11.prod.outlook.com
([fe80::4622:29cf:32b:7e5c]) by LV3PR11MB8603.namprd11.prod.outlook.com
([fe80::4622:29cf:32b:7e5c%3]) with mapi id 15.20.8792.034; Wed, 4 Jun 2025
15:01:09 +0000
Date: Wed, 4 Jun 2025 23:01:00 +0800
From: kernel test robot <oliver.sang@xxxxxxxxx>
To: Thomas =?iso-8859-1?Q?Wei=DFschuh?= <thomas.weissschuh@xxxxxxxxxxxxx>
CC: <oe-lkp@xxxxxxxxxxxxxxx>, <lkp@xxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>,
Jens Axboe <axboe@xxxxxxxxx>, <linux-block@xxxxxxxxxxxxxxx>,
<oliver.sang@xxxxxxxxx>
Subject: [linus:master] [loop] e7bc0010ce: stress-ng.loop.ops_per_sec 5.3%
improvement
Message-ID: <202506042201.1d6ccec5-lkp@xxxxxxxxx>
Content-Type: text/plain; charset="iso-8859-1"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
X-ClientProxiedBy: SGXP274CA0002.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::14)
To LV3PR11MB8603.namprd11.prod.outlook.com (2603:10b6:408:1b6::9)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: LV3PR11MB8603:EE_|MW4PR11MB5892:EE_
X-MS-Office365-Filtering-Correlation-Id: fce7f94c-2152-4c00-d9c8-08dda378a3a9
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016;
X-Microsoft-Antispam-Message-Info: =?iso-8859-1?Q?2aCYdj+Kz8UAECoUusycoxoVGmByhy0EgXRlqjCaHCu1JzLlftbQEHvWsG?=
=?iso-8859-1?Q?Oma8mXz1kKjOCIOUhguz0o63jL2Re0s9x6RLXHBQW8ubjwBc06e3+yZVsQ?=
=?iso-8859-1?Q?MN0slDPI0bPHzHH7JEuIbTMaWk/4og585CHM7hUJ1vCgtzn9PHnoMq4aoI?=
=?iso-8859-1?Q?G5GQtqCtFga9naNcXZDYhKCD/xvhF4JqCDPy+CwwIrPufNpQM9Tc8qMqE2?=
=?iso-8859-1?Q?v4AVJoBqhc1IRox7hi7HwNQRwj0i6hEa0ls/gqlECOJeO6k+wCiBEM4/hk?=
=?iso-8859-1?Q?3al/tEAmhkFt8gZtQKu9TvrZ3bpuWzLyQnN8TnbaDAuuEFvLVBujWzdpUA?=
=?iso-8859-1?Q?aUrvID73/zE3WV4kM7i6vS5i2bDYKakOuUtIJaUkuSitd+qrE7xuy19OeG?=
=?iso-8859-1?Q?Mtfp2kuOpYCVcL+K5dK54aV4dm01zvJquEYlh8DjDw4A7xgaUE6rAKKFjT?=
=?iso-8859-1?Q?wyPk5C6xtVB+UA2vq71HfmVXUNZMQCPISINHIqRRFZZ5Lh5mbnp5zm+LDE?=
=?iso-8859-1?Q?2EoGBZcUgrrwnTDS6H8qndwIjuPi2xopU5Zcvj9NkXM90w1E28fjUqPVUJ?=
=?iso-8859-1?Q?NWMefi+GNr/1HDD/nGdFsm6lpcNe1RuqbR3EQ+IuOgGLjiFVy56++fSiYh?=
=?iso-8859-1?Q?Cl0N607U3e3Xuzr0IBesffCehQc3xr9+q0pHc8MdK0LIrKV1+o7XEdHrWD?=
=?iso-8859-1?Q?PuicTvCtxzbXNppkEOepBFEsMVleubHJ4ZwHfizDCGCVarLGpPHCC0K/DP?=
=?iso-8859-1?Q?MN4tcPNGEo/R5ImOP1AMV2hsZIZ1Vo8jD0Nvab+jVxfHJo+41rVcVs6HDI?=
=?iso-8859-1?Q?NGMTKxZiDjEZ0SoIDhdITI90al3LD8AYyxuePOl+KYIPxl0bODUvf6CkHi?=
=?iso-8859-1?Q?kHKOOlpCSFNa9Z5HHiWg/LWFutIjHiPKQ7DvgIhceAWDtZlQJOLqbnvvO1?=
=?iso-8859-1?Q?jcWjJF9rtvu+NSVLFl4UiDeMd5ZbTEnpFTQkQQOGR+ZqlrhqlgGfmIIMPb?=
=?iso-8859-1?Q?vmsGBmzOLkCF8UmY+oug+IT0+W8zdV8hWrSIwZpG8gYQQreu8OOX2FXan0?=
=?iso-8859-1?Q?bJy2B03br5BHdToWk6bY7ick0b6I/0Sx4nMu26W8mdS5PZTffCwscToYxu?=
=?iso-8859-1?Q?DrS2IpeOCTa5KD60E9ifFGpxePbTj3ahBfgZ6Q4OOej8a6lFot9ZRxanuE?=
=?iso-8859-1?Q?WTnMCgTtYJrVX5x1hFhf3DmwdtKYJKPkJw+0hA+aads/LAn5pYFXw0zUky?=
=?iso-8859-1?Q?gkhPqstsF58wV94kuhPPKbQxxskzivBrRleSS7+1hhh502wYpK1ycYFaHZ?=
=?iso-8859-1?Q?79ZZYRlCdUj4+7taJQbSNddDhu0tokiIGYaaNfaKXNdPAWSkiyKli+mSVl?=
=?iso-8859-1?Q?VLI6A1+CsUB+xuk0Hk8bxyQ40e8T75dVFpQAAoDK7oyYrWBEbEyxjywtTn?=
=?iso-8859-1?Q?siCemCqdpuWRWwKe?=
X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:LV3PR11MB8603.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(1800799024)(366016);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-1?Q?VjgBdTkkHsZoEByLufqVtzkS32pMUWhipHOaP5OgzLg4m21MXKJ+3mrK83?=
=?iso-8859-1?Q?DYJnae4ENcLX1IjGTW6GXFCPjUAuqAApj7n0rci5jJTvmnk5KJmjukhwnN?=
=?iso-8859-1?Q?N8eCq0LdfiSCdp2skZ6IISwR1DI7tAfHjiFEDO56mxXaS0dVgyX/MJFUNd?=
=?iso-8859-1?Q?RUHhXkdQQwxy0rfQUFDgtdguWp0JH0NpHf9kzK+BX8M6B6muBQkr6xO3rk?=
=?iso-8859-1?Q?L0+X0Whgjux3nbGC4D8wg3qqs66BLcS1c0Zz+s3p14SiLxWA+rnIx8fLyJ?=
=?iso-8859-1?Q?nDimPE5MHsvvEpphZSQIrKanhceQaAKH9CHp/lz28Vj6ixWnMDQJpHXJhU?=
=?iso-8859-1?Q?hRAFSTJ9wGV6tt4+A0L4lw9TgOJwDZTkio9+8h/B70aQiqsNTJUaFkfQVt?=
=?iso-8859-1?Q?UEfb1Wzf3kEHDXeamQiyMMT4bWqiNxKhdV9S2gqlQdnCijW4Zedbyd5XG/?=
=?iso-8859-1?Q?Ed9omNpAAofTfuOHWR3BZwNXWn2pBIu1N3wNDT4aQhv+UrTbY+4g3VVxGj?=
=?iso-8859-1?Q?73nrDFSIy5Fu/cQXNmr6Ra7bKZW6rhWAUAandPdohkFETscnJJmNvTjhGA?=
=?iso-8859-1?Q?323HXufRNCcn9vVipAnUQho4kVJ0C++gB0xn5tW4xvZ7RkTehYubccVqos?=
=?iso-8859-1?Q?ViP8w1Q1NDp/c/x8y/+e0K6B1GfkDMEDp0xHsfVFrq2fgX0I5L7ACasiF5?=
=?iso-8859-1?Q?sv/KRhu5i28p5jLdn8sQFmJzIMqWdrIqGm5XEC/M70Drd80sx/b5wrtxur?=
=?iso-8859-1?Q?sQTslBBgISDtNY2aRacRaOKOBySumJwZ66/fTHe88rLEIzWWU01XsMSUiW?=
=?iso-8859-1?Q?n9Yv8tFGQop4APXy9d4PON8FMdJ+Hz4Thk5l/UmVUcoQIzP8tT4X65+JnU?=
=?iso-8859-1?Q?5iqmOtenRoW+5aizZiz+Zs+nSRYAYQwlN5shZ5Mwmc45GHBYnd4NyYoX7V?=
=?iso-8859-1?Q?KAMDEz4C6X1AruAup27JUv9kUi1JDt1Vq3EISYzwBfivWw/8nN4fpBcsTB?=
=?iso-8859-1?Q?HU7lUJTTCcrD/k0LdvrPa4M6FrnSioJynz2z0KMLPhTd+oFEndHXqQzgr2?=
=?iso-8859-1?Q?ii7gQlQ5ZYCjsKj0+L8IMz06i60gCu6d75zKEgJp7Pmy/67lNGGQVm6w7n?=
=?iso-8859-1?Q?BvbHv4r+e93SyHE76hoMmYc/5rczSL8WRZNe0rbHl7ITKxi0oqTy+OakTu?=
=?iso-8859-1?Q?sAuEeHm8tlUaQ1JHEFg5YhWF2DGC3stJC4hJ6dAc9Z3uxWrwqTo2mr/LbC?=
=?iso-8859-1?Q?Jsl+/2wTux4JYIYCDM77uNCYSHU1OhXShwVJp4/QoFwjPrh8yC4rHh6yRE?=
=?iso-8859-1?Q?yjOhtWlAiTRskz3KpWTeqcu0g9Gi4SjsmSKY87tJDATIaIfB1WyQs1F/EK?=
=?iso-8859-1?Q?bdIzRUQrBMkcboe2SQcaaLnlKU1//yVa+ExJBBaEygZVHiYlCYUc5VGo1y?=
=?iso-8859-1?Q?baRLdLyncA+cMF6E4SJX7Owgae9vhwx5rWsA8I6mj6PDRa8B8NOUZbnenA?=
=?iso-8859-1?Q?fuFAA7lm7hMDCh+D9qxEJi4BBGw5b6Qe94zOMricJ2DLiuisvU5GH7In7/?=
=?iso-8859-1?Q?lQNUSKOfhpVaxx2UM02TvwR1Sj49Erkles9hc/pPv5G+6M/3ZfwqK4IKVG?=
=?iso-8859-1?Q?Sf8SSLW4zjmARj4Ypmt8S0PVJsL5MIAVDPwmC59XFTh05sAoqs40ub4Q?=
=?iso-8859-1?Q?=3D=3D?=
X-MS-Exchange-CrossTenant-Network-Message-Id: fce7f94c-2152-4c00-d9c8-08dda378a3a9
X-MS-Exchange-CrossTenant-AuthSource: LV3PR11MB8603.namprd11.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 15:01:09.5871
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: mDK223SI50UKQSnsDs/eMt+PNjrRoB7bPhnCuOkCTxisPy9lIJXah1jFADGRx9kTzZ/9J9B2Tpgb1Cl6Gf9JZw==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR11MB5892
X-OriginatorOrg: intel.com
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hello,
kernel test robot noticed a 5.3% improvement of stress-ng.loop.ops_per_sec on:
commit: e7bc0010ceb403d025100698586c8e760921d471 ("loop: properly send KOBJ_CHANGED uevent for disk device")
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master
testcase: stress-ng
config: x86_64-rhel-9.4
compiler: gcc-12
test machine: 64 threads 2 sockets Intel(R) Xeon(R) Gold 6346 CPU @ 3.10GHz (Ice Lake) with 256G memory
parameters:
nr_threads: 100%
testtime: 60s
test: loop
cpufreq_governor: performance
Details are as below:
-------------------------------------------------------------------------------------------------->
The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20250604/202506042201.1d6ccec5-lkp@xxxxxxxxx
=========================================================================================
compiler/cpufreq_governor/kconfig/nr_threads/rootfs/tbox_group/test/testcase/testtime:
gcc-12/performance/x86_64-rhel-9.4/100%/debian-12-x86_64-20240206.cgz/lkp-icl-2sp7/loop/stress-ng/60s
commit:
1fdb8188c3 ("loop: aio inherit the ioprio of original request")
e7bc0010ce ("loop: properly send KOBJ_CHANGED uevent for disk device")
1fdb8188c3d50545 e7bc0010ceb403d025100698586
---------------- ---------------------------
%stddev %change %stddev
\ | \
0.13 � 6% +0.1 0.19 � 4% mpstat.cpu.all.iowait%
2.94 � 2% +0.8 3.69 � 3% mpstat.cpu.all.sys%
32546 +30.4% 42443 vmstat.system.cs
74083 +4.6% 77510 vmstat.system.in
7889 �118% +373.6% 37367 � 45% numa-meminfo.node0.AnonHugePages
21065 �128% +220.9% 67589 � 32% numa-meminfo.node0.Shmem
11373 � 3% +21.7% 13841 � 3% numa-meminfo.node1.Active(file)
22923 � 5% +16.8% 26769 � 4% meminfo.Active(file)
448.71 � 8% +106.3% 925.77 � 9% meminfo.Inactive
448.71 � 8% +106.3% 925.77 � 9% meminfo.Inactive(file)
165282 � 5% +23.3% 203822 � 2% meminfo.Shmem
549441 � 5% +18.0% 648129 numa-numastat.node0.local_node
591390 � 2% +16.7% 690232 � 2% numa-numastat.node0.numa_hit
614834 � 5% +14.1% 701232 � 2% numa-numastat.node1.local_node
642698 � 3% +13.4% 729095 � 2% numa-numastat.node1.numa_hit
6173 � 64% +72.8% 10667 � 8% sched_debug.cfs_rq:/.avg_vruntime.min
6173 � 64% +72.8% 10667 � 8% sched_debug.cfs_rq:/.min_vruntime.min
12139 � 61% +83.0% 22217 sched_debug.cpu.nr_switches.avg
22304 � 45% +55.3% 34647 � 6% sched_debug.cpu.nr_switches.max
7497 � 68% +100.9% 15063 � 9% sched_debug.cpu.nr_switches.min
-77.83 +69.3% -131.75 sched_debug.cpu.nr_uninterruptible.min
15.60 � 44% +58.1% 24.65 � 7% sched_debug.cpu.nr_uninterruptible.stddev
5562 +4.7% 5825 stress-ng.loop.ops
91.71 +5.3% 96.60 stress-ng.loop.ops_per_sec
6139 � 2% +8.7% 6671 � 2% stress-ng.time.involuntary_context_switches
210787 +2.4% 215791 stress-ng.time.minor_page_faults
167.83 � 2% +20.1% 201.50 � 4% stress-ng.time.percent_of_cpu_this_job_got
102.43 � 2% +19.1% 122.04 � 4% stress-ng.time.system_time
349026 � 2% +50.0% 523587 stress-ng.time.voluntary_context_switches
2815 � 6% +20.4% 3390 � 7% numa-vmstat.node0.nr_active_file
5302 �129% +219.5% 16943 � 32% numa-vmstat.node0.nr_shmem
2814 � 6% +20.5% 3391 � 7% numa-vmstat.node0.nr_zone_active_file
591173 � 2% +16.7% 689866 � 2% numa-vmstat.node0.numa_hit
549224 � 5% +17.9% 647763 numa-vmstat.node0.numa_local
2816 � 2% +26.8% 3569 � 4% numa-vmstat.node1.nr_active_file
38.54 � 63% +213.0% 120.63 � 23% numa-vmstat.node1.nr_inactive_file
2815 � 2% +26.9% 3571 � 4% numa-vmstat.node1.nr_zone_active_file
38.54 � 63% +213.1% 120.67 � 23% numa-vmstat.node1.nr_zone_inactive_file
641841 � 3% +13.6% 729026 � 2% numa-vmstat.node1.numa_hit
613978 � 5% +14.2% 701163 � 2% numa-vmstat.node1.numa_local
222483 � 2% +3.8% 230998 proc-vmstat.nr_active_anon
5703 � 4% +22.3% 6976 � 6% proc-vmstat.nr_active_file
966262 +1.1% 976967 proc-vmstat.nr_file_pages
110.67 � 6% +105.8% 227.81 � 9% proc-vmstat.nr_inactive_file
41661 +2.2% 42580 proc-vmstat.nr_mapped
41337 � 5% +23.4% 50991 � 2% proc-vmstat.nr_shmem
30961 +2.2% 31647 proc-vmstat.nr_slab_reclaimable
46186 +2.4% 47285 proc-vmstat.nr_slab_unreclaimable
222483 � 2% +3.8% 230998 proc-vmstat.nr_zone_active_anon
5703 � 4% +22.3% 6976 � 6% proc-vmstat.nr_zone_active_file
110.67 � 6% +105.8% 227.81 � 9% proc-vmstat.nr_zone_inactive_file
1234795 +15.0% 1420254 proc-vmstat.numa_hit
1164983 +15.9% 1350288 proc-vmstat.numa_local
3262158 +4.5% 3407812 proc-vmstat.pgalloc_normal
3097627 +3.9% 3219201 proc-vmstat.pgfree
3787 +8.7% 4118 proc-vmstat.pgmajfault
75121 +17.7% 88386 proc-vmstat.unevictable_pgs_culled
2.333e+09 � 2% +8.1% 2.522e+09 perf-stat.i.branch-instructions
1.88 � 2% -0.1 1.76 perf-stat.i.branch-miss-rate%
47022551 +6.9% 50273881 perf-stat.i.cache-references
35100 +29.6% 45490 perf-stat.i.context-switches
1.63 +2.6% 1.67 perf-stat.i.cpi
1.764e+10 � 2% +10.2% 1.944e+10 perf-stat.i.cpu-cycles
1372 � 2% +22.2% 1676 � 2% perf-stat.i.cpu-migrations
1.093e+10 � 2% +7.1% 1.171e+10 perf-stat.i.instructions
0.01 �142% +888.9% 0.08 � 33% perf-stat.i.metric.K/sec
1.94 � 2% -0.1 1.81 perf-stat.overall.branch-miss-rate%
1.62 +2.7% 1.66 perf-stat.overall.cpi
2.186e+09 +9.8% 2.401e+09 perf-stat.ps.branch-instructions
43719263 +8.4% 47392135 perf-stat.ps.cache-references
33090 +30.8% 43266 perf-stat.ps.context-switches
1.651e+10 +11.8% 1.846e+10 perf-stat.ps.cpu-cycles
1292 � 2% +23.7% 1598 � 3% perf-stat.ps.cpu-migrations
1.022e+10 +8.9% 1.113e+10 perf-stat.ps.instructions
6.273e+11 +8.8% 6.824e+11 perf-stat.total.instructions
5.40 � 28% -48.0% 2.81 � 31% perf-sched.sch_delay.avg.ms.__cond_resched.__wait_for_common.affine_move_task.__set_cpus_allowed_ptr.__sched_setaffinity
0.01 � 11% +37.9% 0.02 � 10% perf-sched.sch_delay.avg.ms.__cond_resched.mutex_lock.blk_mq_unfreeze_queue_nomemrestore.loop_set_block_size.lo_simple_ioctl
0.09 � 48% -73.0% 0.02 � 69% perf-sched.sch_delay.avg.ms.schedule_hrtimeout_range_clock.poll_schedule_timeout.constprop.0.do_poll
0.49 � 12% -25.7% 0.37 � 9% perf-sched.sch_delay.avg.ms.smpboot_thread_fn.kthread.ret_from_fork.ret_from_fork_asm
0.05 � 42% +1.2e+05% 60.77 �207% perf-sched.sch_delay.max.ms.__cond_resched.__wait_for_common.__synchronize_srcu.part.0
998.14 � 47% -54.0% 458.71 � 44% perf-sched.sch_delay.max.ms.__cond_resched.__wait_for_common.affine_move_task.__set_cpus_allowed_ptr.__sched_setaffinity
0.04 � 71% +1978.2% 0.84 �179% perf-sched.sch_delay.max.ms.__cond_resched.dput.simple_recursive_removal.debugfs_remove.blk_unregister_queue
0.02 � 69% +138.1% 0.04 � 44% perf-sched.sch_delay.max.ms.__cond_resched.mutex_lock.sync_bdevs.ksys_sync.__x64_sys_sync
0.05 � 27% +72.4% 0.09 � 49% perf-sched.sch_delay.max.ms.blk_mq_freeze_queue_wait.loop_set_status.lo_ioctl.blkdev_ioctl
0.00 �107% +2770.0% 0.10 �148% perf-sched.sch_delay.max.ms.schedule_preempt_disabled.rwsem_down_write_slowpath.down_write.open_last_lookups
18.75 � 12% -29.8% 13.16 � 3% perf-sched.total_wait_and_delay.average.ms
95102 � 15% +53.4% 145892 � 4% perf-sched.total_wait_and_delay.count.ms
18.59 � 12% -29.8% 13.06 � 3% perf-sched.total_wait_time.average.ms
9.20 � 11% -100.0% 0.00 perf-sched.wait_and_delay.avg.ms.devtmpfs_work_loop.devtmpfsd.kthread.ret_from_fork
3.44 � 20% -60.5% 1.36 � 23% perf-sched.wait_and_delay.avg.ms.do_nanosleep.hrtimer_nanosleep.common_nsleep.__x64_sys_clock_nanosleep
18.29 � 85% +145.1% 44.83 � 40% perf-sched.wait_and_delay.avg.ms.exp_funnel_lock.synchronize_rcu_expedited.bdi_unregister.del_gendisk
1.83 � 30% +62.1% 2.97 � 19% perf-sched.wait_and_delay.avg.ms.io_schedule.folio_wait_bit_common.filemap_update_page.filemap_get_pages
8.92 � 21% -42.3% 5.15 � 5% perf-sched.wait_and_delay.avg.ms.schedule_hrtimeout_range_clock.ep_poll.do_epoll_wait.__x64_sys_epoll_wait
467.37 � 24% -41.3% 274.21 � 14% perf-sched.wait_and_delay.avg.ms.schedule_hrtimeout_range_clock.poll_schedule_timeout.constprop.0.do_poll
97.15 � 37% -66.7% 32.36 � 23% perf-sched.wait_and_delay.avg.ms.schedule_preempt_disabled.__mutex_lock.constprop.0.__lru_add_drain_all
2.79 � 17% +92.6% 5.37 � 23% perf-sched.wait_and_delay.avg.ms.schedule_preempt_disabled.rwsem_down_read_slowpath.down_read.kernfs_find_and_get_ns
60.00 � 10% -46.0% 32.38 � 28% perf-sched.wait_and_delay.avg.ms.schedule_timeout.__wait_for_common.__flush_work.__lru_add_drain_all
54.09 � 11% -20.3% 43.09 � 2% perf-sched.wait_and_delay.avg.ms.smpboot_thread_fn.kthread.ret_from_fork.ret_from_fork_asm
6658 � 12% +25.6% 8362 � 4% perf-sched.wait_and_delay.count.__cond_resched.loop_process_work.process_one_work.worker_thread.kthread
539.83 � 13% -100.0% 0.00 perf-sched.wait_and_delay.count.devtmpfs_work_loop.devtmpfsd.kthread.ret_from_fork
15267 � 29% +141.0% 36792 � 18% perf-sched.wait_and_delay.count.do_nanosleep.hrtimer_nanosleep.common_nsleep.__x64_sys_clock_nanosleep
4141 � 12% +67.7% 6944 � 5% perf-sched.wait_and_delay.count.io_schedule.folio_wait_bit_common.filemap_update_page.filemap_get_pages
10673 � 14% +70.0% 18140 � 3% perf-sched.wait_and_delay.count.schedule_hrtimeout_range_clock.ep_poll.do_epoll_wait.__x64_sys_epoll_wait
29.17 � 17% +88.6% 55.00 � 9% perf-sched.wait_and_delay.count.schedule_hrtimeout_range_clock.poll_schedule_timeout.constprop.0.do_poll
104.50 � 16% +119.0% 228.83 � 12% perf-sched.wait_and_delay.count.schedule_preempt_disabled.__mutex_lock.constprop.0.__lru_add_drain_all
29.33 � 18% -73.3% 7.83 � 34% perf-sched.wait_and_delay.count.schedule_preempt_disabled.__mutex_lock.constprop.0.bdev_release
607.50 � 48% +49.9% 910.67 � 5% perf-sched.wait_and_delay.count.schedule_preempt_disabled.__mutex_lock.constprop.0.lo_open
125.33 � 42% +373.4% 593.33 � 17% perf-sched.wait_and_delay.count.schedule_preempt_disabled.__mutex_lock.constprop.0.sync_bdevs
7635 � 14% +68.4% 12861 � 12% perf-sched.wait_and_delay.count.schedule_preempt_disabled.rwsem_down_read_slowpath.down_read.kernfs_dop_revalidate
775.50 � 19% +40.1% 1086 � 8% perf-sched.wait_and_delay.count.schedule_preempt_disabled.rwsem_down_read_slowpath.down_read.kernfs_find_and_get_ns
866.50 � 15% +48.2% 1284 � 12% perf-sched.wait_and_delay.count.schedule_preempt_disabled.rwsem_down_read_slowpath.down_read.kernfs_iop_lookup
1961 � 17% +29.7% 2544 � 6% perf-sched.wait_and_delay.count.schedule_preempt_disabled.rwsem_down_write_slowpath.down_write.kernfs_remove
2905 � 22% +52.3% 4425 � 6% perf-sched.wait_and_delay.count.schedule_preempt_disabled.rwsem_down_write_slowpath.down_write.kernfs_remove_by_name_ns
229.00 � 11% -43.4% 129.50 � 19% perf-sched.wait_and_delay.count.schedule_timeout.__wait_for_common.__flush_work.__lru_add_drain_all
877.50 � 14% +24.1% 1089 � 4% perf-sched.wait_and_delay.count.schedule_timeout.__wait_for_common.__synchronize_srcu.part.0
10423 � 13% +29.2% 13464 � 4% perf-sched.wait_and_delay.count.smpboot_thread_fn.kthread.ret_from_fork.ret_from_fork_asm
10975 � 12% +20.2% 13195 � 4% perf-sched.wait_and_delay.count.worker_thread.kthread.ret_from_fork.ret_from_fork_asm
1238 � 24% -29.2% 876.43 � 13% perf-sched.wait_and_delay.max.ms.__cond_resched.smpboot_thread_fn.kthread.ret_from_fork.ret_from_fork_asm
1350 � 30% -39.9% 811.58 � 18% perf-sched.wait_and_delay.max.ms.blk_mq_freeze_queue_wait.loop_set_status.loop_set_status_old.blkdev_ioctl
1281 � 34% -100.0% 0.00 perf-sched.wait_and_delay.max.ms.devtmpfs_work_loop.devtmpfsd.kthread.ret_from_fork
1349 � 30% -40.6% 801.82 � 20% perf-sched.wait_and_delay.max.ms.io_schedule.folio_wait_bit_common.filemap_fault.__do_fault
896.11 � 53% -61.3% 347.06 � 43% perf-sched.wait_and_delay.max.ms.schedule_preempt_disabled.__mutex_lock.constprop.0.__lru_add_drain_all
1324 � 31% -60.0% 529.55 � 32% perf-sched.wait_and_delay.max.ms.schedule_timeout.__wait_for_common.__flush_work.__lru_add_drain_all
1345 � 30% -42.5% 773.93 � 23% perf-sched.wait_and_delay.max.ms.schedule_timeout.__wait_for_common.devtmpfs_submit_req.devtmpfs_create_node
1329 � 31% -52.1% 637.20 � 29% perf-sched.wait_and_delay.max.ms.schedule_timeout.__wait_for_common.wait_for_completion_state.__wait_rcu_gp
0.00 �147% +4468.8% 0.12 �130% perf-sched.wait_time.avg.ms.__cond_resched.__kmalloc_node_track_caller_noprof.kvasprintf.kobject_set_name_vargs.kobject_add
0.07 � 2% -33.3% 0.05 � 21% perf-sched.wait_time.avg.ms.__cond_resched.__wait_for_common.submit_bio_wait.blkdev_issue_flush.blkdev_fsync
0.05 �101% +78602.4% 37.91 �184% perf-sched.wait_time.avg.ms.__cond_resched.kmem_cache_alloc_noprof.__kernfs_new_node.kernfs_new_node.__kernfs_create_file
11.08 �102% -99.7% 0.03 �108% perf-sched.wait_time.avg.ms.__cond_resched.lo_read_simple.loop_process_work.process_one_work.worker_thread
0.02 � 33% -73.9% 0.01 �142% perf-sched.wait_time.avg.ms.__cond_resched.mutex_lock.bd_abort_claiming.loop_configure.lo_ioctl
3.41 � 21% -60.4% 1.35 � 23% perf-sched.wait_time.avg.ms.do_nanosleep.hrtimer_nanosleep.common_nsleep.__x64_sys_clock_nanosleep
1.83 � 30% +61.4% 2.95 � 20% perf-sched.wait_time.avg.ms.io_schedule.folio_wait_bit_common.filemap_update_page.filemap_get_pages
8.86 � 21% -42.3% 5.12 � 5% perf-sched.wait_time.avg.ms.schedule_hrtimeout_range_clock.ep_poll.do_epoll_wait.__x64_sys_epoll_wait
467.29 � 24% -41.3% 274.19 � 14% perf-sched.wait_time.avg.ms.schedule_hrtimeout_range_clock.poll_schedule_timeout.constprop.0.do_poll
96.08 � 38% -66.6% 32.11 � 24% perf-sched.wait_time.avg.ms.schedule_preempt_disabled.__mutex_lock.constprop.0.__lru_add_drain_all
0.07 � 42% +494.5% 0.41 �104% perf-sched.wait_time.avg.ms.schedule_preempt_disabled.__mutex_lock.constprop.0.dev_pm_qos_constraints_destroy
2.38 �103% +1749.5% 44.04 � 42% perf-sched.wait_time.avg.ms.schedule_preempt_disabled.__mutex_lock.constprop.0.lo_simple_ioctl
2.73 � 16% +96.2% 5.36 � 23% perf-sched.wait_time.avg.ms.schedule_preempt_disabled.rwsem_down_read_slowpath.down_read.kernfs_find_and_get_ns
3.18 � 75% +171.8% 8.65 � 24% perf-sched.wait_time.avg.ms.schedule_preempt_disabled.rwsem_down_read_slowpath.down_read.kernfs_iop_permission
59.89 � 10% -46.1% 32.26 � 29% perf-sched.wait_time.avg.ms.schedule_timeout.__wait_for_common.__flush_work.__lru_add_drain_all
0.04 � 25% +72.9% 0.07 � 27% perf-sched.wait_time.avg.ms.schedule_timeout.__wait_for_common.devtmpfs_submit_req.devtmpfs_delete_node
3.13 � 22% +116.4% 6.77 � 59% perf-sched.wait_time.avg.ms.schedule_timeout.synchronize_rcu_expedited_wait_once.synchronize_rcu_expedited_wait.rcu_exp_wait_wake
53.60 � 11% -20.3% 42.72 � 2% perf-sched.wait_time.avg.ms.smpboot_thread_fn.kthread.ret_from_fork.ret_from_fork_asm
0.00 �150% +7429.4% 0.21 �109% perf-sched.wait_time.max.ms.__cond_resched.__kmalloc_node_track_caller_noprof.kvasprintf.kobject_set_name_vargs.kobject_add
236.96 �105% -99.7% 0.59 �182% perf-sched.wait_time.max.ms.__cond_resched.lo_read_simple.loop_process_work.process_one_work.worker_thread
0.16 � 71% -96.4% 0.01 �142% perf-sched.wait_time.max.ms.__cond_resched.mutex_lock.bd_abort_claiming.loop_configure.lo_ioctl
1238 � 24% -29.2% 876.42 � 13% perf-sched.wait_time.max.ms.__cond_resched.smpboot_thread_fn.kthread.ret_from_fork.ret_from_fork_asm
1350 � 30% -39.9% 811.55 � 18% perf-sched.wait_time.max.ms.blk_mq_freeze_queue_wait.loop_set_status.loop_set_status_old.blkdev_ioctl
872.85 � 8% -26.5% 641.54 � 20% perf-sched.wait_time.max.ms.do_task_dead.do_exit.do_group_exit.__x64_sys_exit_group.x64_sys_call
1349 � 30% -40.6% 801.76 � 20% perf-sched.wait_time.max.ms.io_schedule.folio_wait_bit_common.filemap_fault.__do_fault
894.57 � 53% -61.2% 347.04 � 43% perf-sched.wait_time.max.ms.schedule_preempt_disabled.__mutex_lock.constprop.0.__lru_add_drain_all
4.21 �101% +1975.4% 87.43 �134% perf-sched.wait_time.max.ms.schedule_preempt_disabled.__mutex_lock.constprop.0.dev_pm_qos_constraints_destroy
7.31 �114% +7928.3% 586.82 � 40% perf-sched.wait_time.max.ms.schedule_preempt_disabled.__mutex_lock.constprop.0.lo_simple_ioctl
1324 � 31% -60.0% 529.52 � 32% perf-sched.wait_time.max.ms.schedule_timeout.__wait_for_common.__flush_work.__lru_add_drain_all
1345 � 30% -42.5% 773.91 � 23% perf-sched.wait_time.max.ms.schedule_timeout.__wait_for_common.devtmpfs_submit_req.devtmpfs_create_node
1329 � 31% -52.5% 630.99 � 28% perf-sched.wait_time.max.ms.schedule_timeout.__wait_for_common.wait_for_completion_state.__wait_rcu_gp
Disclaimer:
Results have been estimated based on internal Intel analysis and are provided
for informational purposes only. Any difference in system hardware or software
design or configuration may affect actual performance.
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Return-Path: <linux-kernel+bounces-673414-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id B011841E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:03:40 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 76962173CFA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:03:40 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id C94A9291861;
Wed, 4 Jun 2025 15:03:30 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="WtLmQ0ld"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7615328F950
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:03:28 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749049410; cv=none; b=BKuhkiXg5PqvTKzKqjeHrV+wC6Mv45r2/0tr5/tAlfuDyeBoJIxpXxs1+3D9UsidvlxYdSnvrlYtpiuWgMtVQLD8e1QbQnrDVvvFC13LWHn7oT/fzzfNlZ/4LG4N2bWNpqX37yk99a96hMY4bMNjCoaNYsufceAg4jQffuTXlNM=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749049410; c=relaxed/simple;
bh=yZamUpIFal5nw66NRf7rgkuy6A1R9zrovwo6WC6VP8c=;
h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version; b=msEMmM6Bf1ILiPLFKGCDMTZdg1xz4vULpDXRmGnnjOEjbx88HwQQo3Ke7lEmIsTeLAn83qQGZ78l76oB/rEzyT2J2ziL5ZCUhWwihs3HRG21JZED9nY76BTJE5uMDR+s89vucr75dPVoMUuA41/DzE29GSbK4OCRbaKpngAcifQ=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=WtLmQ0ld; arc=none smtp.client-ip=170.10.129.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749049407;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references;
bh=gawt0Z5YbMu+KACcLKD/dbA+4ZYdaJgyH6JYKKp/+E0=;
b=WtLmQ0ldvzIDb8fpycqtGYSMxzlV50HxUUP5mqEr0dBu7vZRR8BKfCNBIm56QF4oifKI45
uq0GguGRHEV+xLz67TFax35k6N5XJoxZnP8FKz9eEIoBlJt9i/irWHv9tuTyNrfhKtQiv4
x0w7JcBGMu4bXw7MnZkxbMDAy9uDrbM=
Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com
(ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by
relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,
cipher=TLS_AES_256_GCM_SHA384) id us-mta-655-kSGeFmi3OQmUCPyMpc-ttA-1; Wed,
04 Jun 2025 11:03:23 -0400
X-MC-Unique: kSGeFmi3OQmUCPyMpc-ttA-1
X-Mimecast-MFC-AGG-ID: kSGeFmi3OQmUCPyMpc-ttA_1749049402
Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
(No client certificate requested)
by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3C885180047F;
Wed, 4 Jun 2025 15:03:22 +0000 (UTC)
Received: from virtlab1023.lab.eng.rdu2.redhat.com (virtlab1023.lab.eng.rdu2.redhat.com [10.8.1.187])
by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1BCB11955D82;
Wed, 4 Jun 2025 15:03:20 +0000 (UTC)
From: Paolo Bonzini <pbonzini@xxxxxxxxxx>
To: Sean Christopherson <seanjc@xxxxxxxxxx>
Cc: kvm@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx,
Alexander Potapenko <glider@xxxxxxxxxx>,
James Houghton <jthoughton@xxxxxxxxxx>,
Peter Gonda <pgonda@xxxxxxxxxx>,
Tom Lendacky <thomas.lendacky@xxxxxxx>
Subject: Re: [PATCH 0/2] KVM: SVM: Fix a NULL VMSA deref with MOVE_ENC_CONTEXT
Date: Wed, 4 Jun 2025 11:02:43 -0400
Message-ID: <20250604150242.137563-2-pbonzini@xxxxxxxxxx>
In-Reply-To: <20250602224459.41505-1-seanjc@xxxxxxxxxx>
References:
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Fix a NULL VMSA deref bug (which is probably the tip of the iceberg with
respect to what all can go wrong) due to a race between KVM_CREATE_VCPU and
KVM_CAP_VM_MOVE_ENC_CONTEXT_FROM, where a non-SEV-ES vCPU can be created in
an SEV-ES VM.
Found by running syzkaller on a bare metal SEV-ES host. C repro below.
Queued, thanks (with EBUSY instead of EINVAL).
Paolo
Return-Path: <linux-kernel+bounces-673415-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 72CE841E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:04:22 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id EDDD6188D158
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:04:25 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 3A13C291865;
Wed, 4 Jun 2025 15:04:01 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=fail reason="signature verification failed" (2048-bit key) header.d=yhndnzj.com header.i=@yhndnzj.com header.b="SpA45vI3"
Received: from mail-4317.protonmail.ch (mail-4317.protonmail.ch [185.70.43.17])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4F9FF28FFE9
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:03:57 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.70.43.17
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749049440; cv=none; b=Cfpqhik5eWxamO6eE+qU6aCqkFljSV1sunyrnR5m90ZSndhXOip3K7QY0rpEIeIzWs6cmmzM+EEuVqSDeBqR/wa1QrE+3E0zXNx35MoHteeqoW/aATmruRyWHwdqxM9vDlAN8ns/M0y1qYk/YXBlHJCW/0mmPaEmUbg5JIbbqX4=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749049440; c=relaxed/simple;
bh=CIpzUojtQhvIyp+XnuiKf+nHjc5Qg2ySGvwqy1jh3ks=;
h=Date:To:From:Cc:Subject:Message-ID:MIME-Version:Content-Type; b=P3mqM1uGj4Y/7tLHdI79YjPYv86dPRpaHfr357GPLhKwL/DMAhtficzloyQNWX3kpxJw+FpPPeGPGWfhE56yfIPpvCVvvEIH7nE86mMI8Zxi7F6GjEI8kaELEekfKL5KOBAknqLS+96msR6cvwh2YnZr5g0iUZhSBpdI6K375F0=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=yhndnzj.com; spf=pass smtp.mailfrom=yhndnzj.com; dkim=pass (2048-bit key) header.d=yhndnzj.com header.i=@yhndnzj.com header.b=SpA45vI3; arc=none smtp.client-ip=185.70.43.17
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=yhndnzj.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=yhndnzj.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yhndnzj.com;
s=protonmail3; t=1749049429; x=1749308629;
bh=CIpzUojtQhvIyp+XnuiKf+nHjc5Qg2ySGvwqy1jh3ks=;
h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date:
Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector:
List-Unsubscribe:List-Unsubscribe-Post;
b=SpA45vI3ZnwLHT6abyQyNe5BGCt6rrUEnuwKqwWLQ3f9/72JVwREmRdA5Wks2jbYe
9JNCAT1x14UJPgXDuR4pnG30BCxIi/S3qVJltcoRiFcfhzGwOWZEvRZlSGae7hQF/g
UnRrMFKnGnQT0AXnJc4RyzAkF0/TuC9LsmwZTJzLAqZqUbqRnvLw3Q9EZqrXrs3MgF
kdOqf3DQ4wKygvHQIBpzmlP7JZlBxWKgmaRFXijAlBSrS3tyv/kCcjIPYapNfjRlng
n5DcQQyj9oZDVxf/ySjAf8GPn3O+UJUnERbBmbEYEDhoiJ2AAhJ7xLAtpk0jvOsx9z
m64DzRFU6lRLg==
Date: Wed, 04 Jun 2025 15:03:42 +0000
To: linux-fsdevel@xxxxxxxxxxxxxxx
From: Mike Yuan <me@xxxxxxxxxxx>
Cc: Mike Yuan <me@xxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, Christian Brauner <brauner@xxxxxxxxxx>, Luca Boccassi <luca.boccassi@xxxxxxxxx>, stable@xxxxxxxxxxxxxxx
Subject: [PATCH] pidfs: never refuse ppid == 0 in PIDFD_GET_INFO
Message-ID: <20250604150238.42664-1-me@xxxxxxxxxxx>
Feedback-ID: 102487535:user:proton
X-Pm-Message-ID: dcdfa44f123118e899d72f662f3bee462608b543
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
In systemd we spotted an issue after switching to ioctl(PIDFD_GET_INFO)
for obtaining pid number the pidfd refers to, that for processes
with a parent from outer pidns PIDFD_GET_INFO unexpectedly yields
-ESRCH [1]. It turned out that there's an arbitrary check blocking
this, which is not really sensible given getppid() happily returns
0 for such processes. Just drop the spurious check and userspace
ought to handle ppid =3D=3D 0 properly everywhere.
[1] https://github.com/systemd/systemd/issues/37715
Fixes: cdda1f26e74b ("pidfd: add ioctl to retrieve pid info")
Signed-off-by: Mike Yuan <me@xxxxxxxxxxx>
Cc: Christian Brauner <brauner@xxxxxxxxxx>
Cc: Luca Boccassi <luca.boccassi@xxxxxxxxx>
Cc: <stable@xxxxxxxxxxxxxxx>
---
fs/pidfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/pidfs.c b/fs/pidfs.c
index c1f0a067be40..69919be1c9d8 100644
--- a/fs/pidfs.c
+++ b/fs/pidfs.c
@@ -366,7 +366,7 @@ static long pidfd_info(struct file *file, unsigned int =
cmd, unsigned long arg)
=09kinfo.pid =3D task_pid_vnr(task);
=09kinfo.mask |=3D PIDFD_INFO_PID;
=20
-=09if (kinfo.pid =3D=3D 0 || kinfo.tgid =3D=3D 0 || (kinfo.ppid =3D=3D 0 &=
& kinfo.pid !=3D 1))
+=09if (kinfo.pid =3D=3D 0 || kinfo.tgid =3D=3D 0)
=09=09return -ESRCH;
=20
copy_out:
base-commit: 5abc7438f1e9d62e91ad775cc83c9594c48d2282
--=20
2.49.0
Return-Path: <linux-kernel+bounces-673416-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id AE30241E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:07:02 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 675E43A7628
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:06:40 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id D6A3A290DB9;
Wed, 4 Jun 2025 15:06:55 +0000 (UTC)
Received: from sonata.ens-lyon.org (sonata.ens-lyon.org [140.77.166.138])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id BC7734AEE0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:06:53 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=140.77.166.138
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749049615; cv=none; b=YiqAAxyS++HChVKAra5IezrQLqVL0qh5IsPW05CkC7RT+hXTv98UXDVootBAkdJz/FcfMy/qTWLUXI7vUEfdk0l/u3GIhSzfS0tyQSL8e/IxRTUc/GOuNWbTyjAVYpgNy/7Tw19pwO/XYyV9/VTsvvWSlM6TaI/JeJVu4P/iPvc=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749049615; c=relaxed/simple;
bh=bNcCPvV34cKVyTSPI57sGlqSvF8/jG8Uxv8bCwnhi0Y=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=JwDjuPOw3G81CShBiIt3r6Db5tYEUMfGruURFHuMOtS6ZC9H9XUUsSMWiCIcs1PwBM45nmEYhj/u63SBxS6lF+sGRobZFKsrqsvyIgZBjTXwidkQxFSur5c/P71WtHny/Av/5c9vi+tXWh+YNwV6cjJO/biDn7ky6oXh9YTksAg=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org; arc=none smtp.client-ip=140.77.166.138
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bounce.ens-lyon.org
Received: from localhost (localhost [127.0.0.1])
by sonata.ens-lyon.org (Postfix) with ESMTP id 7A9C4A5E1A;
Wed, 4 Jun 2025 16:58:08 +0200 (CEST)
Received: from sonata.ens-lyon.org ([127.0.0.1])
by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id vTXMXiec2PkD; Wed, 4 Jun 2025 16:58:08 +0200 (CEST)
Received: from begin (nat-inria-interne-52-gw-01-bso.bordeaux.inria.fr [194.199.1.52])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256)
(No client certificate requested)
by sonata.ens-lyon.org (Postfix) with ESMTPSA id B481CA5DE2;
Wed, 4 Jun 2025 16:58:07 +0200 (CEST)
Received: from samy by begin with local (Exim 4.98.2)
(envelope-from <samuel.thibault@xxxxxxxxxxxx>)
id 1uMpZ9-000000065Wf-16Fm;
Wed, 04 Jun 2025 16:58:07 +0200
Date: Wed, 4 Jun 2025 16:58:07 +0200
From: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
To: Jagadeesh Yalapalli <jagadeesharm14@xxxxxxxxx>
Cc: William Hubbs <w.d.hubbs@xxxxxxxxx>,
Chris Brannon <chris@xxxxxxxxxxxxxxxx>,
Kirk Reiser <kirk@xxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>,
Ingo Molnar <mingo@xxxxxxxxxx>, speakup@xxxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx,
Jagadeesh Yalapalli <jagadeesh.yalapalli@xxxxxxxxxxxxxx>
Subject: Re: [PATCH v1] speakup: Replace u_short with u16 for spk_chartab
Message-ID: <aEBe_wji03rJPBwj@begin>
Mail-Followup-To: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>,
Jagadeesh Yalapalli <jagadeesharm14@xxxxxxxxx>,
William Hubbs <w.d.hubbs@xxxxxxxxx>,
Chris Brannon <chris@xxxxxxxxxxxxxxxx>,
Kirk Reiser <kirk@xxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>,
Ingo Molnar <mingo@xxxxxxxxxx>, speakup@xxxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx,
Jagadeesh Yalapalli <jagadeesh.yalapalli@xxxxxxxxxxxxxx>
References: <20250604135846.46184-1-jagadeesharm14@xxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20250604135846.46184-1-jagadeesharm14@xxxxxxxxx>
Organization: I am not organized
X-Spam-Status: No, score=-3.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hello,
Jagadeesh Yalapalli, le mer. 04 juin 2025 13:58:36 +0000, a ecrit:
From: Jagadeesh Yalapalli <jagadeesh.yalapalli@xxxxxxxxxxxxxx>
The spk_chartab array was previously declared as `u_short`,
which is a non-standard type and may vary in size across platforms.
Replace it with `u16` to ensure consistent 16-bit width and improve
code portability and readability.
There is much more to it than just this line: there is also the
declaration in speakup.h, and the comment above, and all related
variables such as default_chartab, the variables in functions such as
charclass, mask, char_type, ch_type, ...
Samuel
Signed-off-by: Jagadeesh Yalapalli <jagadeesh.yalapalli@xxxxxxxxxxxxxx>
---
drivers/accessibility/speakup/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/accessibility/speakup/main.c b/drivers/accessibility/speakup/main.c
index e68cf1d83787..34c7cb6a9b43 100644
--- a/drivers/accessibility/speakup/main.c
+++ b/drivers/accessibility/speakup/main.c
@@ -187,7 +187,7 @@ char *spk_default_chars[256] = {
* initialized to default_chartab and user selectable via
* /sys/module/speakup/parameters/chartab
*/
-u_short spk_chartab[256];
+u16 spk_chartab[256];
static u_short default_chartab[256] = {
B_CTL, B_CTL, B_CTL, B_CTL, B_CTL, B_CTL, B_CTL, B_CTL, /* 0-7 */
--
2.43.0
Return-Path: <linux-kernel+bounces-673417-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 426E941E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:07:30 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id DF1213A77EB
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:07:07 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id B3854291158;
Wed, 4 Jun 2025 15:07:24 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="R6lVVQyQ"
Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2E9C018E377
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:07:21 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.46
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749049643; cv=none; b=jJXZQW4eewios4SBh4JRtZfDErJc5pMlmh3KhT/rB5wpxN1OFIXPRiPBOxVhQ2r7biirgy7yr+I4PHYk4zLcEiYRkiGf6CYRb0y+uSGGHSPW/xdm02Xq2RmpJDRCXmRMiWiyjgOfL7krDbdFOm4ohtKH59EaSTskYd4sHMutWZo=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749049643; c=relaxed/simple;
bh=Czk9G49KWxRR1XfjZA7YVh4uTuH4n6Lg2WnKlui0GsE=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=h8baNfpjY0pH6DYnP9MlNgzp1Bdj51kb7GQTybrtssd2F7RjLLwjFr0yY2dQE/dyJUimYIPgA3the4rcBg2fP7oApXZC6CI7Dw18UJBaX97mJqH8wLV6oUYdGCt8EBGpEcb6F74Ly4Vg8d9Q1Ks9yyvWTb85LekqR3NrrRwN4+8=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch; spf=none smtp.mailfrom=ffwll.ch; dkim=pass (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b=R6lVVQyQ; arc=none smtp.client-ip=209.85.221.46
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch
Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=ffwll.ch
Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-3a35c894313so6201613f8f.2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 08:07:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=ffwll.ch; s=google; t=1749049640; x=1749654440; darn=vger.kernel.org;
h=in-reply-to:content-transfer-encoding:content-disposition
:mime-version:references:mail-followup-to:message-id:subject:cc:to
:from:date:from:to:cc:subject:date:message-id:reply-to;
bh=nLNe9PZGn0K8HUE/OJhh4z5UPfVBQh5eKwFNHa6KR70=;
b=R6lVVQyQA/Gb2pf0YJGssVv+MYMF6DUQXtq3dJ38kX1ZwhJMXx57YtmYcwED9qO/Od
mCzQWTo5j8GcR8ARYYztbuIEdL+yQFnhzWXWEPjiZWlKQKdg46/geJis+Jy77jDJZG1i
lMGVvn7/NRByCz2UGrCxeJtea+Tgzr8z6szTE=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749049640; x=1749654440;
h=in-reply-to:content-transfer-encoding:content-disposition
:mime-version:references:mail-followup-to:message-id:subject:cc:to
:from:date:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=nLNe9PZGn0K8HUE/OJhh4z5UPfVBQh5eKwFNHa6KR70=;
b=Qnp4orDJI9VmoKj5bHIFk+eKQwXgm4qqcVO25m8qcTAdSxaZjeAM6vAy+f6aixJkZ2
IRsMVOFRqsd7++DqtUjH/+34pHvRiyju21OrWEUQqvcilekh+5SUujqOVTlpmH3to7Ca
+QFWWs1TGAEEqg3JcakkuY796+uumZerx1oTX6zbORsPB8JnFS70ZdZSbm+y3kIjYNmn
8D8ZsMUpwGSxneOBJdBanDw7Vee685fnZJklSi1xvxEuhJfWXsUeqiqlMtoEZDROJ+yY
lnjVjLH5tAHPy9neUGdo1sMjXgXulMsfsaWSfsxuRBfup+2E+kdUzR41z/M3DvESLuCM
5Qpw==
X-Forwarded-Encrypted: i=1; AJvYcCVbT9+yVSheeBDDHW5GXwfKO/tQo8UAc/cToqTP7TpqWpbnSnVkji0J1AaqQ6FG4c6tbUnS8nXjf+RCp8o=@vger.kernel.org
X-Gm-Message-State: AOJu0YxMUgf04gVmcEM1N6kWxmUeiVSPnpk0p22W6kygxho4F4rTOGf0
ojW4JANmJlN0HQDkO/cl4ETtJPpGfe4LWK5002aKQQGlWacGsbzs0+pA6U2h7pwcdUc=
X-Gm-Gg: ASbGncssSQK5UMuFc8vRsRbcTnPDmH+TZ/KtyuQAhXqJE8UscfUKQ+6h5I8AXkV0L6R
3K1d5n5eqJ5ddXP337YPIuNL6K6pweMhrCcBZapQ65tSqnaMAM6VHC4u0zaaDkFMw2E2RhU9682
oeq4xyQFykbEigKZWADax0RkkBAsdJgqpjs46miAnh0Q37AR9KR4X3+tottNr1nZ3oACYiBFTFj
A1EhvhasEsyBWfEUxBEOsqcmZK40wnzMU4MWsyLn9JPcZk4v/4ljuOWz7zDTkRiaI+nqi+vuTyr
KGKmtNlMdB2udYKUxD76MW5xResNpmwqLF46Rtomcy4OemDOoZPix31SU8eYgKQ=
X-Google-Smtp-Source: AGHT+IH2Zjdx0sOvzJfPV5Mri2bdBbG1xpMSCNMUBcoLGEUL4Yhh8rTWxisXo6OxmWgNv3hsjQLN2w==
X-Received: by 2002:a05:6000:420f:b0:3a4:db49:94aa with SMTP id ffacd0b85a97d-3a51d904540mr2742307f8f.21.1749049639709;
Wed, 04 Jun 2025 08:07:19 -0700 (PDT)
Received: from phenom.ffwll.local ([2a02:168:57f4:0:5485:d4b2:c087:b497])
by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-450d8006952sm198017885e9.32.2025.06.04.08.07.17
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 08:07:18 -0700 (PDT)
Date: Wed, 4 Jun 2025 17:07:15 +0200
From: Simona Vetter <simona.vetter@xxxxxxxx>
To: Christian =?iso-8859-1?Q?K=F6nig?= <christian.koenig@xxxxxxx>
Cc: Philipp Stanner <phasta@xxxxxxxxxx>,
Matthew Brost <matthew.brost@xxxxxxxxx>,
Danilo Krummrich <dakr@xxxxxxxxxx>,
David Airlie <airlied@xxxxxxxxx>, Simona Vetter <simona@xxxxxxxx>,
dri-devel@xxxxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
Subject: Re: [PATCH] drm/sched: Discourage usage of separate workqueues
Message-ID: <aEBhIzccXBPyt_58@phenom.ffwll.local>
Mail-Followup-To: Christian =?iso-8859-1?Q?K=F6nig?= <christian.koenig@xxxxxxx>,
Philipp Stanner <phasta@xxxxxxxxxx>,
Matthew Brost <matthew.brost@xxxxxxxxx>,
Danilo Krummrich <dakr@xxxxxxxxxx>,
David Airlie <airlied@xxxxxxxxx>, Simona Vetter <simona@xxxxxxxx>,
dri-devel@xxxxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
References: <20250604081657.124453-2-phasta@xxxxxxxxxx>
<7a09c357-2d28-4dd6-b637-4387cc430938@xxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <7a09c357-2d28-4dd6-b637-4387cc430938@xxxxxxx>
X-Operating-System: Linux phenom 6.12.25-amd64
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 11:41:25AM +0200, Christian K� wrote:
On 6/4/25 10:16, Philipp Stanner wrote:
> struct drm_sched_init_args provides the possibility of letting the
> scheduler use user-controlled workqueues, instead of the scheduler
> creating its own workqueues. It's currently not documented who would
> want to use that.
>
> Not sharing the submit_wq between driver and scheduler has the advantage
> of no negative intereference between them being able to occur (e.g.,
> MMU notifier callbacks waiting for fences to get signaled). A separate
> timeout_wq should rarely be necessary, since using the system_wq could,
> in the worst case, delay a timeout.
>
> Discourage the usage of own workqueues in the documentation.
>
> Suggested-by: Danilo Krummrich <dakr@xxxxxxxxxx>
> Signed-off-by: Philipp Stanner <phasta@xxxxxxxxxx>
> ---
> include/drm/gpu_scheduler.h | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/include/drm/gpu_scheduler.h b/include/drm/gpu_scheduler.h
> index 81dcbfc8c223..11740d745223 100644
> --- a/include/drm/gpu_scheduler.h
> +++ b/include/drm/gpu_scheduler.h
> @@ -590,14 +590,17 @@ struct drm_gpu_scheduler {
> *
> * @ops: backend operations provided by the driver
> * @submit_wq: workqueue to use for submission. If NULL, an ordered wq is
> - * allocated and used.
> + * allocated and used. It is recommended to pass NULL unless there
> + * is a good reason not to.
Yeah, that's probably a good idea. I'm not sure why xe and nouveau actually wanted that.
The idea of this trick is that you have a fw scheduler which only has one
queue, and a bunch of other things in your driver that also need to be
stuffed into this fw queue (or handled by talking with the fw through
these ringbuffers).
If you use one single-threaded wq for everything then you don't need
additional locking anymore, and a lot of things become easier.
We should definitely document this trick better though, I didn't find any
place where that was documented.
Maybe a new overview section about "how to concurrency with drm/sched"?
That's also a good place to better highlight the existing documentation
for the 2nd part here.
> * @num_rqs: Number of run-queues. This may be at most DRM_SCHED_PRIORITY_COUNT,
> * as there's usually one run-queue per priority, but may be less.
> * @credit_limit: the number of credits this scheduler can hold from all jobs
> * @hang_limit: number of times to allow a job to hang before dropping it.
> * This mechanism is DEPRECATED. Set it to 0.
> * @timeout: timeout value in jiffies for submitted jobs.
> - * @timeout_wq: workqueue to use for timeout work. If NULL, the system_wq is used.
> + * @timeout_wq: workqueue to use for timeout work. If NULL, the system_wq is
> + * used. It is recommended to pass NULL unless there is a good
> + * reason not to.
Well, that's a rather bad idea.
Using a the same single threaded work queue for the timeout of multiple
schedulers instances has the major advantage of being able to handle
their occurrence sequentially.
In other words multiple schedulers post their timeout work items on the
same queue, the first one to run resets the specific HW block in
question and cancels all timeouts and work items from other schedulers
which use the same HW block.
It was Sima, I and a few other people who came up with this approach
because both amdgpu and IIRC panthor implemented that in their own
specific way, and as usual got it wrong.
If I'm not completely mistaken this approach is now used by amdgpu,
panthor, xe and imagination and has proven to be rather flexible and
reliable. It just looks like we never documented that you should do it
this way.
It is documented, just not here. See the note in
drm_sched_backend_ops.timedout_job at the very bottom.
We should definitely have a lot more cross-links between the various
pieces of this puzzle though, that's for sure :-)
Cheers, Sima
Regards,
Christian.
> * @score: score atomic shared with other schedulers. May be NULL.
> * @name: name (typically the driver's name). Used for debugging
> * @dev: associated device. Used for debugging
--
Simona Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
Return-Path: <linux-kernel+bounces-673418-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 7B7EB41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:08:14 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id A42CE1725A2
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:08:15 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 5CBAB290DB9;
Wed, 4 Jun 2025 15:08:09 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="X/1H4QUD"
Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2081.outbound.protection.outlook.com [40.107.94.81])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id C500E4AEE0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:08:06 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.94.81
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749049688; cv=fail; b=g+BXw88tt57qk2oBHPuYKJa2gpbAx3sYke1uki3ebEC8SsaB0ktG8DWW72qYzoVG59LNAVHHwpOgToGHDkb3HaUZ8zdMtRLjKW2O2+JIoPa6DUQaeSWFab4vpHGZ3bA4UMKO2Bewv3WrQDXPpJJIy53zFrjCdDSLmgS/zheC42c=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749049688; c=relaxed/simple;
bh=s7q+TmotzTaeb5NWDpmcYd6Bgj1D76boXAFc9O3SsWU=;
h=Date:From:To:Cc:Subject:Message-ID:References:Content-Type:
Content-Disposition:In-Reply-To:MIME-Version; b=EnfWtqRgApxIYojm6NeaamZaImpAw8VpqFWhO0O9EzyDnaKkpcjbEk9jwndJApUMqbLZV4Tp1y7XrPpAcmq59TFMxmGpmmeTrGHJstRdsPxqL3MOeXbWBV/ZJPwrS9u/y1no7mtKpZyfY60wiqAVdnUYq4OYFB1weqpPZv8e6cc=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=X/1H4QUD; arc=fail smtp.client-ip=40.107.94.81
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com
Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=IYg1A8xcQRzeKVtI1i7afrI3Gg/PWfTm9FHbNzwCVVT5l/RvOoaV1WcnTV6CvS8Sperwqq20qU3sq1Fxx5Zx55t4C3U9NqWkEoyD67Xl4To3mgrYBeOWYCTnmFhfwWYPRWeh0m/Up8nGWpq6sESJjf6xnLWnc0EPTFSLKRqZAqgjOcoWGcQDgc75y4uwZZ/ULkr/aMnjMl0oLSqIIC1okUE371i8jL5yvXkV1jNBhdfKqIAa7MyOHPjExAVXGLRmx69SI9Y55Fsgmt4weh2fI/dp5pkAtaJkzcDIsj7CQlWLOCZo3YWFfVwLAQgX7HKBaEyKvHa6Zbi7WAWIhSd6rg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=9wsNbqHzaOXBdFXbWEhXRUqIT104FYBvJscGGkBpn2o=;
b=Oh05FmdehJJHfH+XPxzh5qVidXFI+TOANeDUBvteHAfAfQHNucTiQUZ1V18U1GCv58nx5Yc99k5fgewfeV3EwWzFQW8Klc9ii30oME7d19TjyI53Z+LM5ttvazXt9fIQdqZF3R4FtJQI1KkHDpkvMDnQ9+U7uTtajS+ekKdK2Ivp/Ihw656IhFWdtPmFckr0nw9At1gaaOaOBqqqXPBRJ2yv83NAz/8XOdQBIqKkZlQ5ixlzWg6SeEZe3IUAZWzkMMfdZU3XtthQbqzysz4Xs47+BmBPe3L/lAt5eL4slKmG7d2sXMnzoREKLRckQcYW+fSBB/PXcyVeIVIYpBgslg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com;
dkim=pass header.d=nvidia.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;
s=selector2;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=9wsNbqHzaOXBdFXbWEhXRUqIT104FYBvJscGGkBpn2o=;
b=X/1H4QUDIkHn0dFsDg6amxI6Buc8uF2FhoIr8EC//mgdIIHbWmpeGByqQV3Twg8PGcYJl7/6Mk2UVlmEaB8LKYqo1keqPLwgKphYFj6Hf34pthCdz8/SPawoDl6vPwSs5ordqenNzVSBRPi6Bt2dTwiVHsKWAVRPw/ejdEq3U9c7X6IsS3m9fYu5GNK6wW/g/56Vh2nq5tO/uPHdPbW3W0Xwk60KHnKOgSNy6SN7f9OFgQsvOpo5YCjrRx6JGhqZDlTLRBkxxGWyu4TbVGgx1j8jTqhuD+nQ3SjfmWRE2n0Sbh+Do7zBCGVP7Z1pxiO1laXPBvAjXytSg1ycYgIHpQ==
Authentication-Results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=nvidia.com;
Received: from LV8PR12MB9620.namprd12.prod.outlook.com (2603:10b6:408:2a1::19)
by SA1PR12MB8118.namprd12.prod.outlook.com (2603:10b6:806:333::9) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8769.36; Wed, 4 Jun
2025 15:08:03 +0000
Received: from LV8PR12MB9620.namprd12.prod.outlook.com
([fe80::1b59:c8a2:4c00:8a2c]) by LV8PR12MB9620.namprd12.prod.outlook.com
([fe80::1b59:c8a2:4c00:8a2c%5]) with mapi id 15.20.8792.034; Wed, 4 Jun 2025
15:08:03 +0000
Date: Wed, 4 Jun 2025 17:07:55 +0200
From: Andrea Righi <arighi@xxxxxxxxxx>
To: Yury Norov <yury.norov@xxxxxxxxx>
Cc: Tejun Heo <tj@xxxxxxxxxx>, David Vernet <void@xxxxxxxxxxxxx>,
Changwoo Min <changwoo@xxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx
Subject: Re: [PATCH] sched_ext: idle: Skip cross-node search with !CONFIG_NUMA
Message-ID: <aEBhS-WDH_kaXmVd@gpd4>
References: <20250603082201.173642-1-arighi@xxxxxxxxxx>
<aEBSm7Lm9Gx_anMo@yury>
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <aEBSm7Lm9Gx_anMo@yury>
X-ClientProxiedBy: MI1P293CA0010.ITAP293.PROD.OUTLOOK.COM (2603:10a6:290:2::7)
To LV8PR12MB9620.namprd12.prod.outlook.com (2603:10b6:408:2a1::19)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: LV8PR12MB9620:EE_|SA1PR12MB8118:EE_
X-MS-Office365-Filtering-Correlation-Id: 40acbcdb-8d9d-4313-fb9c-08dda3799a4d
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|1800799024;
X-Microsoft-Antispam-Message-Info:
=?us-ascii?Q?bQlEGJeoBFDPEA9vzb7920LjN9KJV4l8frf9B2Bm7vD4Hg0YNDEHZFf5CSU9?=
=?us-ascii?Q?n81pk9Ng4di+SXz3khnfwjhkOKfPDo+A78VDVvP7ZdgW5JnDec+XkG4pfnth?=
=?us-ascii?Q?JmH7LlEY+PLX0ue1kHXNeWzoB6AM/YMPGZPMmDozYUw5Tn5Br1RiKe40cFWO?=
=?us-ascii?Q?vzBuIvqFJt/Xcx6K7WcjpdhmD1b5Pux19zkOfibDaNpW4qqn7Ax7H/rncaf5?=
=?us-ascii?Q?1QqPVQLsddYUyce7QprJ0xIqmHXWCbXvOZpyHzjxPucMwzOdxDtvHPJgs8C6?=
=?us-ascii?Q?oKOYYUo6Bq8sIctzFz3oFYD3SYFSrZeKUrm4vw2ZLt6ccGiS3fPlTudRpfsX?=
=?us-ascii?Q?F1D0LDVtAD1RDceIBwB/cJsGDFmTnBIjyr9W6FQ7qvapXQYnmVB7F251hQqB?=
=?us-ascii?Q?keeBomqZhbQUgL1Yjw1qrHknaponJ73AUmvqXegWIIMlBH7i/4Wit523TOdV?=
=?us-ascii?Q?mvpxOaFj/QyaOmzKYqyxet72LYCF3Pubr52foeBby5ZpKPl1FB/NpuVRitTE?=
=?us-ascii?Q?xsVAnnRQ8l5HLlg4frb5MrXCWrswmQEiI3N/fFRC+58gacrujl+q2w5LkDSn?=
=?us-ascii?Q?8vbUsRRVWn/sPsc479rPK60lTCAdljUrrlDWEoC282+2HyF1ZXScbWm21u9N?=
=?us-ascii?Q?c7I/tG3/EqK3BnFoj6k8rGUMuMyWf73AnlXyQO6lwMYI8aE5JvbiiLSNJoTc?=
=?us-ascii?Q?cUUlRYPFt1aNKyhTZTHPQE38QxTU3YIAwZ+XrJW+1U15YUngTBbsvy3WSmKf?=
=?us-ascii?Q?4us+yJE1W+yeQKo5Bpi6mrDITNuSogFx0vplqOHXwzVy6JCvjpv5/EnFTq83?=
=?us-ascii?Q?N2QLjmQFNP2wjtaGr2mlu/du6/XlF/W9wN+YGuCW7Ih16j/FPbE5TKZqDu+D?=
=?us-ascii?Q?RhCNS6oa0hxJouy8C9aOVwztmGes2XXPjJKCZ5NxkqFf+7Z4vPMyY+KHrVfz?=
=?us-ascii?Q?WDuDQDdqEQEt6d/zWe0/WL8IJWOFOmauJzpjqZXHM1fxEowlAAtaBiXQKu5O?=
=?us-ascii?Q?FDTWlBQrSNANOSwL4GxpbTxAumP+5pGuYT2Za8TQ24fB9DBbrsbqLOVt6qgg?=
=?us-ascii?Q?njGy/3FgYA9Zhbl0yW5fEiRPeudDJ6jsg2qAgn3duX0UHkIPN8EDB72wHhu1?=
=?us-ascii?Q?wmBQqRI7qOjGPCic73q3t12J9vtAHnOIatSBWZigb0SQ6Nyr227ZwJse9oAV?=
=?us-ascii?Q?Ujx04H9GVEn83YGf9h0x9LzlIanCOt2phaPFaXI4EwFCRUGOEVMPewMzNbc2?=
=?us-ascii?Q?2aFNZK1719cZqKF99plt3k7bmlmpZl4pT6kj8Ku3D7C+QStQtDUOjNo1EHSx?=
=?us-ascii?Q?b1X8a8LWa2nVCW2lK6psjvk0YdbPUfTk4FMTayehxDXja1kbqPVmkGrkWdft?=
=?us-ascii?Q?y8mAakR2+SAWqXkOstgoxphTYJ9NglS2NStu4RxPPTWYUBm+UVzd2VXbzFID?=
=?us-ascii?Q?c8uPsJ7dxS0=3D?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:LV8PR12MB9620.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(376014)(1800799024);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?us-ascii?Q?p0dpcLFy7VOjsFev422shqnbOO3rqywXwA0cjvrAps74GVLFxBCAOZ3GlfNF?=
=?us-ascii?Q?tF1qbbCgWvz3ElXvVoRmV3RPMA14SDLoj0pAP6UiMfRpYvVitZdHH9BPUM8G?=
=?us-ascii?Q?plcyLhDoR6/3rti9EQH6X5JjcEm6T/YKAu0BgzqbZoEVss7Y6+GQ+d6VXId/?=
=?us-ascii?Q?0e4PnW0SEIBxCadICQwL/nWfkEb1wuitiPFcdmcRZAfc0DN74ihkPPqXnAnb?=
=?us-ascii?Q?S27IwAw6GPUVBMP+Y7RMr656dUluQ1GHSXt6PnaS6xFu4if3g4wkbf3x4Pha?=
=?us-ascii?Q?5MUQJraIhsFz2KpZZNd+dV6TVnhXe1dmigwLUHGlvedTWEwGNM84oHPnSPA6?=
=?us-ascii?Q?qdtx0a7h5YjEa/q8KgVNuHVsJap+Li289wU7UcOSxg+dhoalU3Rz6rAjpzS6?=
=?us-ascii?Q?x/iku4M9p1PNSbUHlEondCSYULh1NXOhvGY87GPb2Zovztt8FCsIFNF7MtCm?=
=?us-ascii?Q?NxiP4CVfmiWm1gzknQW/aSkvdPAEqxVg7Hp/cLqG0ACJp+BwBW0Va2Xf+4P3?=
=?us-ascii?Q?12zC4C4dNJgHgD+Mc5IGQuQDAuNK3Bf5qsfe2hY8/FZT1b1K106vUlZylC5Y?=
=?us-ascii?Q?vh0OcmqIGC0mmR7KDlxdDNMz+ZRJ8mDbgbYmJHYvsxphpRhTnuTRH0l6GIw4?=
=?us-ascii?Q?2QuqafIYq6POX0AxwdR+1XHJabZsNweivQtJjdr5MssvCa3zG2Rqb+NVimDq?=
=?us-ascii?Q?AUGPgKOc7pGzqvwi4kY2in2JWmEgtfXHvTgtFI66B2Le3EPEL2t90qnNTCQh?=
=?us-ascii?Q?3qZ8o+VIV7M74tBZ+JN7uvOPD4JtInT6yt6g8sgOWYBHAyw9bBuyJguJJtES?=
=?us-ascii?Q?vFXSqqyheriNFjQ9ad7qah1LUt5ycvFZzvq93KJ16uwP+rzzVwhHoqeXqYkF?=
=?us-ascii?Q?qXKII3ER6RvmOMrvoX1T143Jn7zXYBbe47BmfGwKbhN6zPDZQXV5bOq/SmqA?=
=?us-ascii?Q?UQz4C/sCY7tXMoXe+ofFG4nCnGCqXumXoP7bADUAwUmoNcvaidbhPuXLTode?=
=?us-ascii?Q?jCKpDIyUTIrn6jkuPwywzTPzN2I8cX9k0D9oPDjn2p7frQ6/s7JQJoFE9r61?=
=?us-ascii?Q?xeAchB5cEOUiJYWuS6oyFgNs303LC4GExQbpNROJgGGpcjS1a55nUhnOUHPj?=
=?us-ascii?Q?YoVZiZxxidKRWWdVS7ul/qlSWv7EtZY4jmXZIHMF8z8YjFN1EmZEeGE33iB7?=
=?us-ascii?Q?ijX6AXnmew+HnYYkUZLDwX8s8edzpgdloyvD6Tz4eCmm3UjP6/gpU34JgU4Z?=
=?us-ascii?Q?OV04ojG20nL6WBSuQ8hzNR8gqgUOgFIgxvdlD+gjh+Qg01GNBuEB1a6sDS00?=
=?us-ascii?Q?KxCRVXmYbWDykzn4oubfp9PA16Mk0fjZocxf5o4+VVK0Que6jY3LuE4YO+lN?=
=?us-ascii?Q?rWBy7KaQa5HJwudrFIV4u3jPKvMRbBX24X7BzpxXDhgkfdXGWUIaMI+6zZB3?=
=?us-ascii?Q?nEty243MvUo4bIcbNFlWrJmEuhGQPHF6hAZbSLmYLHjaOfw3NP4mJsUzIfMT?=
=?us-ascii?Q?rsNwNb5v+l8nAqCjSqNKbUVj4r93ZPVkehSz765nsn2zppz+lw2CoPBcdBbY?=
=?us-ascii?Q?d86pI01+1xJV1q5rh9JWeBjNNOMf06SxL5zQENVC?=
X-OriginatorOrg: Nvidia.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 40acbcdb-8d9d-4313-fb9c-08dda3799a4d
X-MS-Exchange-CrossTenant-AuthSource: LV8PR12MB9620.namprd12.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 15:08:03.3041
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: +V1dt3ojgc71j1s5gae1Ii2/pdvZOlHVIhTWkhR/hVXbbuHvPEn51abn9nzWZSbz24m+EgSQ9v/HheNtNEuu1A==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB8118
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hi Yuri,
On Wed, Jun 04, 2025 at 10:05:15AM -0400, Yury Norov wrote:
Hi Andrea!
On Tue, Jun 03, 2025 at 10:22:01AM +0200, Andrea Righi wrote:
> In the idle CPU selection logic, attempting cross-node searches adds
> unnecessary complexity when CONFIG_NUMA is disabled.
>
> Since there's no meaningful concept of nodes in this case, simplify the
> logic by restricting the idle CPU search to the current node only.
>
> Fixes: 48849271e6611 ("sched_ext: idle: Per-node idle cpumasks")
> Signed-off-by: Andrea Righi <arighi@xxxxxxxxxx>
> ---
> kernel/sched/ext_idle.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/kernel/sched/ext_idle.c b/kernel/sched/ext_idle.c
> index 66da03cc0b338..8660d9ae40169 100644
> --- a/kernel/sched/ext_idle.c
> +++ b/kernel/sched/ext_idle.c
> @@ -138,6 +138,7 @@ static s32 pick_idle_cpu_in_node(const struct cpumask *cpus_allowed, int node, u
> goto retry;
> }
>
> +#ifdef CONFIG_NUMA
It would be more natural if you move this inside the function body,
and not duplicate the function declaration.
I was trying to catch both the function and the per_cpu_unvisited with a
single #ifdef, but I can definitely split that and add another #ifdef
inside the function body.
> /*
> * Tracks nodes that have not yet been visited when searching for an idle
> * CPU across all available nodes.
> @@ -186,6 +187,13 @@ static s32 pick_idle_cpu_from_online_nodes(const struct cpumask *cpus_allowed, i
>
> return cpu;
> }
> +#else
> +static inline s32
> +pick_idle_cpu_from_online_nodes(const struct cpumask *cpus_allowed, int node, u64 flags)
> +{
> + return -EBUSY;
> +}
This is misleading errno. The system is nut busy, it is disabled. If
it was a syscall, I would say you should return ENOSYS. ENODATA is
another candidate. Or you have a special policy for the subsystem/
So, this function is called only from scx_pick_idle_cpu(), that can still
call pick_idle_cpu_from_online_nodes() even on kernels with !CONFIG_NUMA,
if the BPF scheduler enables the per-node idle cpumask (setting the flag
SCX_OPS_BUILTIN_IDLE_PER_NODE).
We can return -ENOSYS, but then we still need to return -EBUSY from
scx_pick_idle_cpu(), since its logic is host-wide, so the choice of -EBUSY
was to be consistent with that.
However, I don't have a strong opinion, if you think it's clearer to return
-ENOSYS/ENODATA from pick_idle_cpu_from_online_nodes() I can change that,
but I'd still return -EBUSY from scx_pick_idle_cpu().
The above pick_idle_cpu_in_node() doesn't have CONFIG_NUMA protection
as well. Is it safe against CONFIG_NUMA?
pick_idle_cpu_in_node() is always called with a validated node (when passed
from BPF) or a node from the kernel and idle_cpumask() is handling the
NUMA_NO_NODE case, so that should be fine in theory.
Thanks,
-Andrea
PS Tejun already applied this patch to his tree, so I'll send all the
changes as a followup patch, at least the original bug is fixed. :)
Return-Path: <linux-kernel+bounces-673419-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 656F541E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:08:59 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id B6E241896199
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:09:11 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id BF7E429186A;
Wed, 4 Jun 2025 15:08:48 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=BLAIZE.COM header.i=@BLAIZE.COM header.b="HAAxldwK"
Received: from mx07-0063e101.pphosted.com (mx07-0063e101.pphosted.com [205.220.184.123])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id A839D4AEE0;
Wed, 4 Jun 2025 15:08:45 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.184.123
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749049727; cv=fail; b=Ny363emvTcARYJXIbbyunhhn0semNMJMYwHf0IgMyW4VfwFTcM1y6f/boyYUQul+n5Ii55Po3McmwxCC81yFb5tqjpOYmK/4dwkiOWTct3S3tQS6i5SEnK/ndUfrcbbVzCsRoPuSL6f3VQh3kmkgY3Zni2XRE64tufq2hYw5Tbg=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749049727; c=relaxed/simple;
bh=wDmS8zCfczDwnjERiicp4h0gICrljGBeMBR7kToAxA4=;
h=From:To:CC:Subject:Date:Message-ID:Content-Type:MIME-Version; b=Mb5lTwgYKZy/bQId2Rsf0OSWrLqmGGqaLQpP6HVBCAnQoT05LR9rMZgXVhwcI7TKInKFU3jUGbYapkyXnLJ22sh8VOjNAWUHJC15LKyYr6vGUUgI+wbYODfa7CQ31oOUREhsFDQU8zlxut2q0BLLrjiCIGFtvzp1ueBxGpNU13U=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=blaize.com; spf=pass smtp.mailfrom=blaize.com; dkim=pass (1024-bit key) header.d=BLAIZE.COM header.i=@BLAIZE.COM header.b=HAAxldwK; arc=fail smtp.client-ip=205.220.184.123
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=blaize.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=blaize.com
Received: from pps.filterd (m0247495.ppops.net [127.0.0.1])
by mx08-0063e101.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 554EZ1hM000874;
Wed, 4 Jun 2025 15:38:54 +0100
Received: from ma0pr01cu009.outbound.protection.outlook.com (mail-southindiaazon11020077.outbound.protection.outlook.com [52.101.227.77])
by mx08-0063e101.pphosted.com (PPS) with ESMTPS id 471g84ryrk-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 15:38:53 +0100 (BST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=VqMFXqXHHI4WhBlCjKD3NSc1RneZLAcFqLCw6HLEESz4rjz+EdEyxY5lV5+Am/S+TZFjypU2syzF00ZSELixa+/3V994hDb0TBPKzKoMQnK3tcWgHcma0MuIiyfB43r127fguBiGqIIHbdUX1R8dsVmG9JDOZAo3oGvRz/xGvUziFjoY2XOekiEvXUOSZgmk/oXQMDLRftChuMN9NSKXZ69uMdwgiWEHKfsdspoiVImEdbLJAdpEXMY+OtSN07i1kN+PQEccPM+w39UZ4yRIhSJdfv1YWfpv+89Tibe5jObwYu70Gha/nCtQVazOyk8s0dJlU3ms1jv+y0+xtexF6g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=moilq9Y05sizS9NAZ0VRHG1o7AM1VJ3f8pur4CW3ZMQ=;
b=upQNWMyJt8ku+BAkGdCXISS1lgvHUMGvFrnXaG/YLCt6W9thgbw1REIW5Prc0oFlfbJvSgFMZ5+qIc9ASBCkOTjFs85wIG2uH0TN31Sl+opt5lQEVxJmiqgJ28EMp9MvnMLRbSNT2/HAHzg/1tzxODM4IMvETsfj0e19EK96n1K0pGehZ62UoxOn36fpWCmnJwBIda6J40pBeY93EWt1xqv8TkgeaCyvW0ywJvvwtVmBUW41lbt8+4WhGkDAhhYnhunx/Abl7mig08b4au5ZaPwXRU845hTt46oY3NRowbiRHMnGNCubXuMwcraf3Hz0gugT8RLBgt42H1J7g5B4iA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=blaize.com; dmarc=pass action=none header.from=blaize.com;
dkim=pass header.d=blaize.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=BLAIZE.COM;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=moilq9Y05sizS9NAZ0VRHG1o7AM1VJ3f8pur4CW3ZMQ=;
b=HAAxldwKntnDgZKa1TeMjCT4ofrG31NLfwXM2Os/Vz0xhP35XKIsJ3UvU/2T18tFphF9oEFPM02DuiFZj4NmNupOcrIKwh8kemb17HtnQOokEk1HVXgH8ceRyjxK7B92QTAhWsOGo8yPX19wqtD7LtMRVlr2IozxdYVBSIXuznc=
Received: from PN2PPF1CBE88495.INDPRD01.PROD.OUTLOOK.COM
(2603:1096:c04:1::18c) by PN3PR01MB6854.INDPRD01.PROD.OUTLOOK.COM
(2603:1096:c01:94::11) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8813.20; Wed, 4 Jun
2025 14:38:48 +0000
Received: from PN2PPF1CBE88495.INDPRD01.PROD.OUTLOOK.COM
([fe80::9f58:e643:db9:bf05]) by PN2PPF1CBE88495.INDPRD01.PROD.OUTLOOK.COM
([fe80::9f58:e643:db9:bf05%5]) with mapi id 15.20.8813.018; Wed, 4 Jun 2025
14:38:48 +0000
From: James Cowgill <james.cowgill@xxxxxxxxxx>
To: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>,
Hans Verkuil
<hverkuil@xxxxxxxxx>,
Ezequiel Garcia <ezequiel@xxxxxxxxxxxxxxxxxxxx>
CC: James Cowgill <james.cowgill@xxxxxxxxxx>,
"linux-media@xxxxxxxxxxxxxxx"
<linux-media@xxxxxxxxxxxxxxx>,
"linux-kernel@xxxxxxxxxxxxxxx"
<linux-kernel@xxxxxxxxxxxxxxx>
Subject: [PATCH] media: v4l2-ctrls: Fix H264 SEPARATE_COLOUR_PLANE check
Thread-Topic: [PATCH] media: v4l2-ctrls: Fix H264 SEPARATE_COLOUR_PLANE check
Thread-Index: AQHb1V5icDj128sCiU+oNBnI7Of2nw==
Date: Wed, 4 Jun 2025 14:38:48 +0000
Message-ID: <20250604143552.2955475-1-james.cowgill@xxxxxxxxxx>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: PN2PPF1CBE88495:EE_|PN3PR01MB6854:EE_
x-ms-office365-filtering-correlation-id: 8690903a-489f-47e2-377f-08dda3758485
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;ARA:13230040|1800799024|366016|376014|38070700018;
x-microsoft-antispam-message-info:
=?iso-8859-1?Q?6N7kdNp3G6pC0v74qpexGAgnIQBfBputHkvuYRcd+VCm8aK12v4XfSSu4e?=
=?iso-8859-1?Q?z5AG0TNYNpL5K54GvCT4ggBj8Hn2rkozcqyEqWPyG4ERQhqpg8jNEdpOUA?=
=?iso-8859-1?Q?JtQoF1Dtco8ektwXuzG0vLSO38zzrLtraHQmSAi8xrILnFx4hxXQd9hXTn?=
=?iso-8859-1?Q?PA2hPRkVoqAXqTEK3yPa7e9ehpa1PCchZFIDTsGPYOgDFaalfUcG/Wboqo?=
=?iso-8859-1?Q?hekOuzY9dcJQsFdlqeinYHiSXY6G46qZ7wuDU5+LK5scKhkKJDFKmv+ZQp?=
=?iso-8859-1?Q?cMqCr5UG0uwbSgYIdcARbwn+Mtr+/KsPupdxy8EZklr3ivaB/S79G+zhEt?=
=?iso-8859-1?Q?2QCA8jAN8gZ1VuS13LcLkoysm0WyhbZ6t9+pZODCzVW0q4PE13F3NxGcPi?=
=?iso-8859-1?Q?kn2dfQI0Zk76sX4XvSXPLajZh6oG6PoXLv2xipFxExxTA0nEOhbkdRdRJO?=
=?iso-8859-1?Q?awYx6I9rf/StTYxrWUTG6RohHJPkH6tg9EhMAiT0uWhoFbsGpQvlFwTRmS?=
=?iso-8859-1?Q?HJM5UFvjNrS89nsDx+K8V5mG3ThBdZeA8Oj6MmbumwUW+X6lffbF+832TS?=
=?iso-8859-1?Q?qgRqMN0WZRa2LxHN3vxwJu+zgTFmjs7Cpe1zKSpWD7hqOvcGp5GwQeVbWD?=
=?iso-8859-1?Q?IDIx0Bn99PkgcFK8FzMC9nZBFsPwAQuOIyJNDycnmZ53WigMpYTDAzTLd8?=
=?iso-8859-1?Q?mthlpODK08Qkn9YdoG2KcTHhLrHmIXqKa8PTA3QLc4fIfCZmideEIhZ2IY?=
=?iso-8859-1?Q?9IfOsLbnRmRqVQ3A/xKXAqEsn81BfTVAasxwQdtuMnsvRVdQ9DWJ97zhuS?=
=?iso-8859-1?Q?B+y7XEecujBPukhAiXK3IRn/whC16Sw7oLnfTRkgrbH0M79T0GrlA68Vys?=
=?iso-8859-1?Q?KNypBm0ESAWtd6BpKsGijPwU1ALUqb7BrWT6tryqfADvTH0wfBp3fl9NyQ?=
=?iso-8859-1?Q?fY/fhjnVRKB+FGW5b/xsUWKJKtHCNc3vpZtXgCL+WSC1eiKFmm/Nx8mizh?=
=?iso-8859-1?Q?nmP21CNjqAsDtoRkUyLFePoFKVxTmSMAHzqhflkaVWbl1L8Vi+dzp4ukt4?=
=?iso-8859-1?Q?m2ODwsMqv2zXNtA4kV7aUKk0HdaXiGUWgr+aeyw6Ed2xek82tB6uYKb80f?=
=?iso-8859-1?Q?L4JMGW+gOn2cwElMEepUZ7XO+Qg1VbmMQo+fILysFanA9agLBUf/+fvdkI?=
=?iso-8859-1?Q?dU8Xl3bkdKfyR1Ny1RvYLjqwIg2rP63C1LkHSPYszxx48XVLhJpRzbAjIw?=
=?iso-8859-1?Q?hIrKyT+GOGFTI3zIiremNiM+TyoS538P9RzLMG/gghxH37JC8QufkNZZh/?=
=?iso-8859-1?Q?QJjYTDDIfLCukVSk3L+a1IvWnKL4c4wmYwb+Jv7PxcymqUm5qpHwnGPzti?=
=?iso-8859-1?Q?7JprCoEqOFrR2D2cw1ydL8m+rCmN18LUe1C6r96H/3aL9spts1P30FgT32?=
=?iso-8859-1?Q?WIDYrpumcgEAdprtGbAl+/M1tjbAcRL5xwJLRRcvBw8PK77+SaPMHEeWUD?=
=?iso-8859-1?Q?Wn+e+lpRrgQoaJPXv3d22ypMnRD8yzBw0i3/iQ87Ib07w4s8Potjl0Zraz?=
=?iso-8859-1?Q?qFPfWpk=3D?=
x-forefront-antispam-report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PN2PPF1CBE88495.INDPRD01.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(38070700018);DIR:OUT;SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0:
=?iso-8859-1?Q?Od5D8okchfUl3yGSiOn0A6RXNtUyheFE7Ts/4fYC1TMhwtMNz/BeHtgHJq?=
=?iso-8859-1?Q?AUo/XV9TIKj2ryl/72CaqohoLujGonVIx3N7nRu9Li3uJm0mnQKv+Qn8Jo?=
=?iso-8859-1?Q?n2YhhfdiiwncD05NJM9+rcQ/ev0MMqXP2eQyfq3p/vcnH/bf6U+2G89QLE?=
=?iso-8859-1?Q?NoKpBoCPClrckoWwdLWIAtW2SEx0SPH09TZSBRunV1Dgh9ltFuImAgdZZf?=
=?iso-8859-1?Q?1tqLLl7SSxjdDdrjS+x/Iu7/4Rmth7bSE2GIK9xLtF4WYHrtt+lG8WfL/R?=
=?iso-8859-1?Q?JO1GHqRscIuSME7cDdtHEf4QIa4OJdY/vPSNcXHwoJfEtUzBHZMzMIS2MS?=
=?iso-8859-1?Q?ILqW4fAYWk0hIk0p1xGJzPzhwvgg5sTz+ZJ+Cj6RcoII5AIVWADBpuEb7U?=
=?iso-8859-1?Q?ZSafYtHuqPb5gwHarYEyFjeAR51GCYz1eqezCA22YNTADifPy2rNvcyyKZ?=
=?iso-8859-1?Q?ZfqrfJ93Jc1s4BX5A/cYsq4GeB2Y71sp6fz3s20gjbX4KEYhWqxYuI++jv?=
=?iso-8859-1?Q?FK3sVUR0q0Ye++YNb6sRL1jXGHpqWzi0pX4SuXrxZy0KQpVDlp9qO++fRN?=
=?iso-8859-1?Q?LnO8Q7ohXwiWslsZo5KJBzqDXNkjrwYaRUkqaXvhnq3aNSz1EgO3MvSiAq?=
=?iso-8859-1?Q?pGu63WJv+8NkApOJTt6EIbTwzS1yqOTvO3mSo7CMzOI3ACMNeS6N4Bnoob?=
=?iso-8859-1?Q?JaKlNkgPmu6OzJkHzDlzMA0hUFJTmGdeZWtqvaBUlzK2lJXF1DoM895w3v?=
=?iso-8859-1?Q?RFJtQoQPo+74oKHLbEV1yRiDJHwEoJTWOlcB11OG8UmWPCU8EbytdF9vGD?=
=?iso-8859-1?Q?qb3YiQISJJ1nNz4VTL6phnVtT+W3AVsj5ie9DkgzeRjTIcA9rHe5BvuKms?=
=?iso-8859-1?Q?wVpTQ97fjpF5K2ccY6yOht6D+M9qsUoqEf31zoFn6IiLE0BBNRoxnSB+SG?=
=?iso-8859-1?Q?U5gKdmznXLxrt6+A8wIs5G1lRfwazdrzz28FMmw6IZmurUt72kIy6VsD2F?=
=?iso-8859-1?Q?E+GVjB+dJI2BPL20hYxn+H/YVEz95h5YZcr7L1NpEaLrY0RrCUrSgWihf6?=
=?iso-8859-1?Q?bHzF65/6sfi4KsVInwKpVQkfvvGZBNV9x7Zd+GdXEOZ8a6Xge/w3eNXJN8?=
=?iso-8859-1?Q?ax7Me4GSiGnRZXKmxPsoJPLKat/zdYs4fuAT4lZTLmU3+G8SboQexm226T?=
=?iso-8859-1?Q?yIbfEUi6zQV5lWiTJxwXK5JOmT0ys0Jwy8ZAG1dB9l2A8JPXATduR2pWEn?=
=?iso-8859-1?Q?mJw4yWFEtaFB4jujydIGRCr7B4mRBqYGHEBsFFevm5zOFs80XI/oKnyPcD?=
=?iso-8859-1?Q?hF3frmmQvciDlTLziBT13aVy2Ey3SdXO+bQFOF6DGaF2R6Rdg1Bc2CY74n?=
=?iso-8859-1?Q?XDRyMhIQhTmnTfzWqPwGbweNhJYo1wJH0z0tMq5N05mZEoy2wgh1xkde2d?=
=?iso-8859-1?Q?BuO9ZWrzjA/wkc5gMlDy8u9rBSDs6XAc/neJCQQ4dL4uF4mkp/1uwvbeNz?=
=?iso-8859-1?Q?jtXWIhi4WPKp6SWf+/UgaRP78PccHB8Cmny1sNvt5S5m9E9MafzfpG4x9i?=
=?iso-8859-1?Q?Bs01o9OUDad4LlDvXLpA3vOxG9+nVp9jNy+scPa/j04xUjFqhETGHTmTta?=
=?iso-8859-1?Q?Ke7FDX7UuSxjbEM7WL4PYLE0H4fbukXfbC?=
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-OriginatorOrg: blaize.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: PN2PPF1CBE88495.INDPRD01.PROD.OUTLOOK.COM
X-MS-Exchange-CrossTenant-Network-Message-Id: 8690903a-489f-47e2-377f-08dda3758485
X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jun 2025 14:38:48.6042
(UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 9d1c3c89-8615-4064-88a7-bb1a8537c779
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: ScVeOGTTFaLXoUp3T6vJkw2/CUFILyl1ukuyyotrnvW/fgS671a7yXBB/dzJJ85ZjufrrLJEsCjNzI/9tku5i8ehj69jsKi4xVPtpafOo0A=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: PN3PR01MB6854
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDExMCBTYWx0ZWRfXwY8AW8jtrXRU Us82S773SHKnLgvOU6Kgmv6g4Q6CfvgGOIxXWmmks5KEXEwGRX6fj+znvl5m0NPQy/fxuq+oubh QpDtgqMI484/Q1YGXuUthOAfu+SH8Qfst0rBwvvKideYHTpGcaJuPhQQoZeFC+UkAsodGC8fsUo
jNr8fz8S5AWlCih5lPlDHxitNOlBDowIbJhX0tPkRLvYXcPhAB5VrWnEpdvSRopxrpBzrrWFRKo WqGq13dkKDzpbuBRcx4DfmxLSWpLJ4v3eA5pdGKQP7zpawXwwn0AIfkXCp4iL48Z1TDfa+tNOv5 6Uvaj1eD1buyX+e56xPqGapQiSRnz01GMEKfImgqupw97GBypUU4+5YCvrpyirih3ooNRP6A7ru
ByJ8YDGo5dJD4KVXwmRH9MTvK9wqQjHl6tY0WmBgnwquaKCuk3NEVE34tEJCbBpipeX3sdtz
X-Proofpoint-ORIG-GUID: LtaVn95dK6J7lhP2pHtiZYah8D-qRHmC
X-Proofpoint-GUID: LtaVn95dK6J7lhP2pHtiZYah8D-qRHmC
X-Authority-Analysis: v=2.4 cv=F8dXdrhN c=1 sm=1 tr=0 ts=68405a7e cx=c_pps a=wumSa4maZRB894EJd4BJhA==:117 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19 a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19 a=xqWC_Br6kY4A:10 a=8nJEP1OIZ-IA:10
a=6IFa9wvqVegA:10 a=-5LYVjoNHPMA:10 a=SrsycIMJAAAA:8 a=cq-ErjrRQvP8vrIkj8YA:9 a=wPNLvfGTeEIA:10 a=zapPnUM7SFj2ezx6rUw-:22
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Reason: orgsafe
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
The `separate_colour_plane_flag` element is only present in the SPS if
`chroma_format_idc =3D=3D 3`, so the corresponding flag should be disabled
whenever that is not the case and not just on profiles where
`chroma_format_idc` is not present.
Fixes: b32e48503df0 ("media: controls: Validate H264 stateless controls")
Signed-off-by: James Cowgill <james.cowgill@xxxxxxxxxx>
---
drivers/media/v4l2-core/v4l2-ctrls-core.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/media/v4l2-core/v4l2-ctrls-core.c b/drivers/media/v4l2=
-core/v4l2-ctrls-core.c
index 90d25329661e..b45809a82f9a 100644
--- a/drivers/media/v4l2-core/v4l2-ctrls-core.c
+++ b/drivers/media/v4l2-core/v4l2-ctrls-core.c
@@ -968,12 +968,12 @@ static int std_validate_compound(const struct v4l2_ct=
rl *ctrl, u32 idx,
=20
p_h264_sps->flags &=3D
~V4L2_H264_SPS_FLAG_QPPRIME_Y_ZERO_TRANSFORM_BYPASS;
-
- if (p_h264_sps->chroma_format_idc < 3)
- p_h264_sps->flags &=3D
- ~V4L2_H264_SPS_FLAG_SEPARATE_COLOUR_PLANE;
}
=20
+ if (p_h264_sps->chroma_format_idc < 3)
+ p_h264_sps->flags &=3D
+ ~V4L2_H264_SPS_FLAG_SEPARATE_COLOUR_PLANE;
+
if (p_h264_sps->flags & V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY)
p_h264_sps->flags &=3D
~V4L2_H264_SPS_FLAG_MB_ADAPTIVE_FRAME_FIELD;
--=20
2.49.0
Return-Path: <linux-kernel+bounces-673420-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 577D941E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:09:54 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id DEECB7A7830
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:08:33 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id F243429117B;
Wed, 4 Jun 2025 15:09:43 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="hzOQ2KLr"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9140928F51B
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:09:41 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749049783; cv=none; b=Pw9xDA8aDTT81x8xSpOX8Z08zJyocmjNC3tXdtxWOD8Uxj68r7GdEB+Q24E5zZZl3QT8PPjkyAB5YOuYteh6tizIXsrGxePPlOGvJ4Bl6AWwF5BBclQ4izxjoxjhxXs01hxOKTJpN63t3KjBBSeXJBdPMRxnNl/o4T4/pU6qMjo=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749049783; c=relaxed/simple;
bh=MStiwnmTKTIxDYoiFZ0DxSnXZqv5tV3Q2Nw8sIyap1A=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=j7zB33/ng0KNBNx0LXxhKH8ubz8D2JQD3j+dEfE/6BwNvT3vZYzJb0fLh4CiL4Xh0OUYNZk6D4Imi6AJKqOL+g9GG9rrEp4r5YcZnMkqcLglXgcB6dRuGSrFT0BklDVT9YVPUdVdW/UrkNl6HrScT/kLn16SxOif2DAC2Rb19c0=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=hzOQ2KLr; arc=none smtp.client-ip=170.10.129.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749049780;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references;
bh=K0Z14f5Dv0sEBCQzCT+N5xWNS5ySL+Tzir6TJSSZ+3Q=;
b=hzOQ2KLrlpDOZ1hXZQf0AD6fcXY3j7jIkzh6D9aEwmPbinWIRAkGLLplLKt0cxN8JJZj55
4WYEblgqbglTSB2vqRLK8L9Ka9i91M7XbGtpBQ/Pw+34gXtFPowQS5m2VZPjrJMBz3AIqN
NLVwH/G271VLnexk2Q/d0x8PBLfh6TY=
Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com
[209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-631-RISzvFFuOyKZxk0zCkyARQ-1; Wed, 04 Jun 2025 11:09:37 -0400
X-MC-Unique: RISzvFFuOyKZxk0zCkyARQ-1
X-Mimecast-MFC-AGG-ID: RISzvFFuOyKZxk0zCkyARQ_1749049777
Received: by mail-qv1-f71.google.com with SMTP id 6a1803df08f44-6facf4cf5e1so84465946d6.2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 08:09:37 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749049777; x=1749654577;
h=in-reply-to:content-transfer-encoding:content-disposition
:mime-version:references:message-id:subject:cc:to:from:date
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=K0Z14f5Dv0sEBCQzCT+N5xWNS5ySL+Tzir6TJSSZ+3Q=;
b=rAWOo47gL1k6z8dVxuwuffEH7LpIfHWSvkvAYyZgo0/5PHfb6WhYGQHkYlHD0UO6f1
sdLBpXzjEgfsVtXSWXB31db5e7vhn0eo67aIsUxUR7AduEKLRew8sRAoTZQdUxtuDt4L
k+qnwmBQI3gd9203IGXPPoxhvX+V3wTVAZT7ge2LixKpcHS9kVMN11qdcgDOPLKxSd1C
3S1BrrYBmaXMA/jR0w1zeUCHMGKF+R/vVeLOntkHJukg5DgbP2c/YV6fKoirQ7ia+BAZ
mSXGHRje2YwBzIPPdbTqeO77u1WQUmJ1iuucDQfIaRLyezBvdDX3NhmgxaCcEiPVKbKE
Ioag==
X-Forwarded-Encrypted: i=1; AJvYcCXIS31mnKcwVAQch5Ok7PWRF50MgUUdoo7+qubxfjH1HLyUBHSRUyy7a9xocVeXViRfvcDP0V+FAsD+LGg=@vger.kernel.org
X-Gm-Message-State: AOJu0Yz6oz7zqPiWmSd9VOYJZqFhrf5g3IVQfEzkozZitmu6SAWWE93O
m7YSMf1zF2XNJxWOLh6bPCHC76k+L6BgM0doFuiriUyPSA3ZJ/HomMYf4yI5a5ia0t3bmlYHQj+
8DnX/lA3RDaBgdDA4M6qh9uINgo1TV2D4d0+NDiKbO2uyiPi+mgnjeqLoPjMgZ8+0lw==
X-Gm-Gg: ASbGncuP7+3oiugPTWGKorOfSgAB916S5UoxiEqGLzFiRh/H2WSx3dENRUDvvMOmCNo
1gBNWdnKAoJA3q5gLQafFkEw+g8KJblaGj0/jHC1tCHH6Ac5PbXRa0K76ziQF5MIbxbKPr4CPeY
OIrc5D5l/U/WkJH+opMXDEmGdcL/9Co+PZOsvXPHdqKp5PpEYq4axCfNhxPDNTiP4wKKLjXyq/R
FAjOvGc7uzWAIZzpGw1KArMTp0L41zTNF42wc6uYxq0Siuu/2jG/Rw7B1rVML/w5kuZMaB7yAiF
XJk=
X-Received: by 2002:a05:6214:5086:b0:6fa:ce1e:3a4a with SMTP id 6a1803df08f44-6faf6f9312emr40237106d6.6.1749049776243;
Wed, 04 Jun 2025 08:09:36 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IFSDUs50177E/rrZpx+xC+0iIv+BIQc1aieeX4oFfx7XS0nPA0qJB8ecAAJUv8L53J89ePgrw==
X-Received: by 2002:a05:6214:5086:b0:6fa:ce1e:3a4a with SMTP id 6a1803df08f44-6faf6f9312emr40235876d6.6.1749049774940;
Wed, 04 Jun 2025 08:09:34 -0700 (PDT)
Received: from x1.local ([85.131.185.92])
by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6fac6e00d42sm99700586d6.85.2025.06.04.08.09.33
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 08:09:34 -0700 (PDT)
Date: Wed, 4 Jun 2025 11:09:31 -0400
From: Peter Xu <peterx@xxxxxxxxxx>
To: David Hildenbrand <david@xxxxxxxxxx>
Cc: Tal Zussman <tz2294@xxxxxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
"Jason A. Donenfeld" <Jason@xxxxxxxxx>,
Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>,
Christian Brauner <brauner@xxxxxxxxxx>, Jan Kara <jack@xxxxxxx>,
Pavel Emelyanov <xemul@xxxxxxxxxxxxx>,
Andrea Arcangeli <aarcange@xxxxxxxxxx>, linux-mm@xxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx
Subject: Re: [PATCH 2/3] userfaultfd: prevent unregistering VMAs through a
different userfaultfd
Message-ID: <aEBhqz1UgpP8d9hG@x1.local>
References: <20250603-uffd-fixes-v1-0-9c638c73f047@xxxxxxxxxxxx>
<20250603-uffd-fixes-v1-2-9c638c73f047@xxxxxxxxxxxx>
<84cf5418-42e9-4ec5-bd87-17ba91995c47@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <84cf5418-42e9-4ec5-bd87-17ba91995c47@xxxxxxxxxx>
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 03:23:38PM +0200, David Hildenbrand wrote:
On 04.06.25 00:14, Tal Zussman wrote:
> Currently, a VMA registered with a uffd can be unregistered through a
> different uffd asssociated with the same mm_struct.
>
> Change this behavior to be stricter by requiring VMAs to be unregistered
> through the same uffd they were registered with.
>
> While at it, correct the comment for the no userfaultfd case. This seems
> to be a copy-paste artifact from the analagous userfaultfd_register()
> check.
I consider it a BUG that should be fixed. Hoping Peter can share his
opinion.
Agree it smells like unintentional, it's just that the man page indeed
didn't mention what would happen if the userfaultfd isn't the one got
registered but only requesting them to be "compatible".
DESCRIPTION
Unregister a memory address range from userfaultfd. The pages in
the range must be “compatible” (see UFFDIO_REGISTER(2const)).
So it sounds still possible if we have existing userapp creating multiple
userfaultfds (for example, for scalability reasons on using multiple
queues) to manage its own mm address space, one uffd in charge of a portion
of VMAs, then it can randomly take one userfaultfd to do unregistrations.
Such might break.
>
> Fixes: 86039bd3b4e6 ("userfaultfd: add new syscall to provide memory externalization")
> Signed-off-by: Tal Zussman <tz2294@xxxxxxxxxxxx>
> ---
> fs/userfaultfd.c | 15 +++++++++++++--
> 1 file changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/fs/userfaultfd.c b/fs/userfaultfd.c
> index 22f4bf956ba1..9289e30b24c4 100644
> --- a/fs/userfaultfd.c
> +++ b/fs/userfaultfd.c
> @@ -1477,6 +1477,16 @@ static int userfaultfd_unregister(struct userfaultfd_ctx *ctx,
> if (!vma_can_userfault(cur, cur->vm_flags, wp_async))
> goto out_unlock;
> + /*
> + * Check that this vma isn't already owned by a different
> + * userfaultfd. This provides for more strict behavior by
> + * preventing a VMA registered with a userfaultfd from being
> + * unregistered through a different userfaultfd.
> + */
> + if (cur->vm_userfaultfd_ctx.ctx &&
> + cur->vm_userfaultfd_ctx.ctx != ctx)
> + goto out_unlock;
So we allow !cur->vm_userfaultfd_ctx.ctx to allow unregistering when there
was nothing registered.
A bit weird to set "found = true" in that case. Maybe it's fine, just
raising it ...
This part should be ok, as found is defined as:
/*
* Search for not compatible vmas.
*/
found = false;
So it's still compatible VMA even if not registered.
It's just that I'm not yet sure how this change benefits the kernel
(besides the API can look slightly cleaner). There seems to still have a
low risk of breaking userapps. It could be a matter of whether there can
be any real security concerns.
If not, maybe we don't need to risk such a change for almost nothing (I
almost never think "API cleaness" a goal when it's put together with
compatilibities).
Thanks,
--
Peter Xu
Return-Path: <linux-kernel+bounces-673421-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id D790641E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:10:03 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 5BA3418963E4
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:10:17 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id D9E2E29114B;
Wed, 4 Jun 2025 15:09:59 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=xry111.site header.i=@xry111.site header.b="KifjrDEx"
Received: from xry111.site (xry111.site [89.208.246.23])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 987541C9DC6
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:09:57 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=89.208.246.23
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749049799; cv=none; b=KcFWgltWXU7l4AKl1RZKxE0LSLVgs9epC+yhx2xrPgQ2DNHaeI795gUFflNsmBzu51sf6/deAbRJ/CUhzicwgQHQ377IbVqno9nlGMlz1qhO4pJSWrNB2Obu43v2SZZ9LXGqFK7x+h2iDJy5x01brUJvCAXZybNTUT2TxxcSgBs=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749049799; c=relaxed/simple;
bh=zdu+2ETAGAUTf6aB9sj7/U9Uy8zeZ3qBo7VIpRAhIaE=;
h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References:
Content-Type:MIME-Version; b=Ykj5n+nw+1SdHb3DmFNrAG5EwbW8LVN9pw9o2GCdQHt0ZB+QjBdIvqpV2XSox614uhEvE2cGaHTZM9zb35e+yW7ZgT/Ri82BRWcClPFdS7GhbLBSO1Aq3QDifk2WeO6ce8nawUAaae0KDOkOkMi42remtLtX9mmDyYKNGssmTsU=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=xry111.site; spf=pass smtp.mailfrom=xry111.site; dkim=pass (1024-bit key) header.d=xry111.site header.i=@xry111.site header.b=KifjrDEx; arc=none smtp.client-ip=89.208.246.23
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=xry111.site
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=xry111.site
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xry111.site;
s=default; t=1749049795;
bh=q8h9kR1SVvQAsWuLnRY9YRkZHJsMjxdtRkk78Wgjdw4=;
h=Subject:From:To:Cc:Date:In-Reply-To:References:From;
b=KifjrDExQCQTOpSkL0e//z15yMT5tQHomdzwY0IsE/kFg+gnlj8Sh7M/magBS4m3B
kO71Sukk0TpN+u0jKY1BRwYlsZp5UU7Yvq/WQ39ZSLDlKOnFkh+0Df0iTRovWI5DEs
XRtr7n5YcP+oQ8J3OLqCdkH7wf51FrunXFWVNRy0=
Received: from [127.0.0.1] (unknown [IPv6:2001:470:683e::1])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange ECDHE (prime256v1) server-signature ECDSA (secp384r1) server-digest SHA384)
(Client did not present a certificate)
(Authenticated sender: xry111@xxxxxxxxxxx)
by xry111.site (Postfix) with ESMTPSA id 80F9465F62;
Wed, 4 Jun 2025 11:09:53 -0400 (EDT)
Message-ID: <5065dcf8fe1995859874196aa9ea5c0bff056ae3.camel@xxxxxxxxxxx>
Subject: [PATCH] RISC-V: vDSO: Correct inline assembly constraints in the
getrandom syscall wrapper
From: Xi Ruoyao <xry111@xxxxxxxxxxx>
To: Alexandre Ghiti <alex@xxxxxxxx>, Thomas =?ISO-8859-1?Q?Wei=DFschuh?=
<thomas.weissschuh@xxxxxxxxxxxxx>, Nathan Chancellor <nathan@xxxxxxxxxx>
Cc: "Jason A. Donenfeld" <Jason@xxxxxxxxx>, Paul Walmsley
<paul.walmsley@xxxxxxxxxx>, Palmer Dabbelt <palmer@xxxxxxxxxxx>, Guo Ren
<guoren@xxxxxxxxxx>, linux-riscv@xxxxxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
Date: Wed, 04 Jun 2025 23:09:52 +0800
In-Reply-To: <57a1ced6-406b-4197-96ca-6b83d99ca1a0@xxxxxxxx>
References: <20250411024600.16045-1-xry111@xxxxxxxxxxx>
<20250411095103-2aad099a-e4a1-4efb-8374-dd27bf05b668@xxxxxxxxxxxxx>
<a2477829-f3a5-4763-89f3-8c2c1f4716b8@xxxxxxxx>
<7f840a23ab8865d7f205caec56817c660e237d64.camel@xxxxxxxxxxx>
<71f093d5-4823-4bc6-b9ee-23433bd8c60c@xxxxxxxx>
<0f0eb024d7ed062141a8aa048017e6f7ef7c1fd4.camel@xxxxxxxxxxx>
<57a1ced6-406b-4197-96ca-6b83d99ca1a0@xxxxxxxx>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
User-Agent: Evolution 3.56.2
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
As recently pointed out by Thomas, if a register is forced for two
different register variables, among them one is used as "+" (both input
and output) and another is only used as input, Clang would treat the
conflicting input parameters as undefined behaviour and optimize away
the argument assignment.
Per an example in the GCC documentation, for this purpose we can use "=3D"
(only output) for the output, and "0" for the input for that we must
reuse the same register as the output. I'm not sure if using a simple
"r" for the input is safe or not here, so just follow the documentation.
Link: https://lore.kernel.org/all/20250603-loongarch-vdso-syscall-v1-1-6d12=
d6dfbdd0@xxxxxxxxxxxxx/
Link: https://gcc.gnu.org/onlinedocs/gcc-15.1.0/gcc/Local-Register-Variable=
s.html
Cc: Thomas Wei=C3=9Fschuh <thomas.weissschuh@xxxxxxxxxxxxx>
Cc: Nathan Chancellor <nathan@xxxxxxxxxx>
Signed-off-by: Xi Ruoyao <xry111@xxxxxxxxxxx>
---
arch/riscv/include/asm/vdso/getrandom.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/riscv/include/asm/vdso/getrandom.h b/arch/riscv/include/a=
sm/vdso/getrandom.h
index 8dc92441702a..0d84a38e79da 100644
--- a/arch/riscv/include/asm/vdso/getrandom.h
+++ b/arch/riscv/include/asm/vdso/getrandom.h
@@ -18,8 +18,8 @@ static __always_inline ssize_t getrandom_syscall(void *_b=
uffer, size_t _len, uns
register unsigned int flags asm("a2") =3D _flags;
=20
asm volatile ("ecall\n"
- : "+r" (ret)
- : "r" (nr), "r" (buffer), "r" (len), "r" (flags)
+ : "=3Dr" (ret)
+ : "r" (nr), "0" (buffer), "r" (len), "r" (flags)
: "memory");
=20
return ret;
base-commit: dc5240f09bca7b5fc72ad8894d6b9321bce51139
--=20
2.49.0
Return-Path: <linux-kernel+bounces-673422-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id F31FE41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:10:31 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 65D47189650D
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:10:45 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 5C7A1291867;
Wed, 4 Jun 2025 15:10:23 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="sgtefAda"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 898ED4AEE0;
Wed, 4 Jun 2025 15:10:22 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749049822; cv=none; b=NytpN7q1OmaTX81H3UBb5wf6guTE17CLswY00mkeL/sheyL7DI4c6ITrb7RZOpQ9XNR5rEZ6O+7HK4HuZDSMjMAQHI3US2Uqf4sqbhMFzAmOfzNdSDuWuesOvVzT2K9TyAm3+iQ8sUY/j6/vvco2FC2k/5ul/DyUwXMItdb8MjE=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749049822; c=relaxed/simple;
bh=79Ct6+QrZ9TbmPLlyPDYC3WA1Nr8Z20nWCGL8X8r8l0=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=d0+DvDKwP2ro/s/yV87Fzt8KAfnGbA3pKiPDKbvUwN1eRWJ8EX2eDBU143ORYb+G8njO6s2yK/es3QTlIcteZnoRc1CYE0yt4VYLaP2XpLA18LlqUDwJ+IP7QgZZPA15UqGca2QNqYrA77doCYfvR6hHBNVdPggzr/nO1mAk4OM=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=sgtefAda; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id DFDD2C4CEE4;
Wed, 4 Jun 2025 15:10:21 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749049822;
bh=79Ct6+QrZ9TbmPLlyPDYC3WA1Nr8Z20nWCGL8X8r8l0=;
h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
b=sgtefAdaS0h1SgoV/xMChN6Cv2eI2z94uV7biOA8pJWGRN+9BfeYWWAkvZ8fYRPa8
t1ZwxRubQUaRrbTOGL0cGe9CdB8VDkkXC8URwevp8wADnWBbzD6MXmXcDlXHp9YaDT
aTUBsR48g3DkU6+qDXRVGEyRsHBvHOcdopaewZr3NjAlfh968fAxmtmfrzKNaH3u3G
oI4wKqSobA0teOoRuzeNz+RD+2YzpsRZd1h9LeQwJ1VMf+RgKr05prJduO+1QkCgl7
KDDCrs0uXS2DuMhZ5N5Yx2pwbplUeN9+z6sUxahrxzkc1b2NhObTijya/AAC1dlfi7
JkZGpzhVRqe8A==
Received: from johan by xi.lan with local (Exim 4.97.1)
(envelope-from <johan@xxxxxxxxxx>)
id 1uMpkx-000000007qM-2gvq;
Wed, 04 Jun 2025 17:10:19 +0200
Date: Wed, 4 Jun 2025 17:10:19 +0200
From: Johan Hovold <johan@xxxxxxxxxx>
To: Wenbin Yao <quic_wenbyao@xxxxxxxxxxx>
Cc: catalin.marinas@xxxxxxx, will@xxxxxxxxxx,
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, andersson@xxxxxxxxxx,
konradybcio@xxxxxxxxxx, robh@xxxxxxxxxx, krzk+dt@xxxxxxxxxx,
conor+dt@xxxxxxxxxx, linux-arm-msm@xxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
vkoul@xxxxxxxxxx, kishon@xxxxxxxxxx, sfr@xxxxxxxxxxxxxxxx,
linux-phy@xxxxxxxxxxxxxxxxxxx, krishna.chundru@xxxxxxxxxxxxxxxx,
quic_vbadigan@xxxxxxxxxxx, quic_mrana@xxxxxxxxxxx,
quic_cang@xxxxxxxxxxx, qiang.yu@xxxxxxxxxxxxxxxx,
Johan Hovold <johan+linaro@xxxxxxxxxx>,
Abel Vesa <abel.vesa@xxxxxxxxxx>
Subject: Re: [PATCH v4 5/5] phy: qcom: qmp-pcie: add x1e80100 qref supplies
Message-ID: <aEBh2xHu3QDtUrxe@xxxxxxxxxxxxxxxxxxxx>
References: <20250604080237.494014-1-quic_wenbyao@xxxxxxxxxxx>
<20250604080237.494014-6-quic_wenbyao@xxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20250604080237.494014-6-quic_wenbyao@xxxxxxxxxxx>
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 04:02:37PM +0800, Wenbin Yao wrote:
From: Qiang Yu <qiang.yu@xxxxxxxxxxxxxxxx>
All PCIe PHYs on the X1E80100 SOC require the vdda-qref, which feeds QREF
clocks provided by the TCSR device.
As I just mentioned in the thread where this is still being discussed:
https://lore.kernel.org/all/aEBfV2M-ZqDF7aRz@xxxxxxxxxxxxxxxxxxxx
you need to provide a lot more detail on why you think modelling these
supplies as PHY supplies (which they are not) is the right thing to do.
Also please answer the question I've asked three times now on how the
QREF supplies map to PHY supplies on X1E as no one will be able to use
this binding unless this is documented somewhere (and similar for other
SoCs).
The fact that you so far have not been able to provide an answer
seems to suggest that these supplies need to be managed by the TCSR
clock driver which can handle the mapping.
Hence, restore the vdda-qref request for the 6th and the 3th PCIe instance
by reverting commit 031b46b4729b ("phy: qcom: qmp-pcie: drop bogus x1e80100
qref supplies") and commit eb7a22f830f6("phy: qcom: qmp-pcie: drop bogus
x1e80100 qref supply"). For the 4th PCIe instance (Gen3 x2), add a new
driver data entry, namely x1e80100_qmp_gen3x2_pciephy_cfg, which is a copy
of sm8550_qmp_gen3x2_pciephy_cfg but uses sm8550_qmp_phy_vreg_l instead.
Fixes: eb7a22f830f6 ("phy: qcom: qmp-pcie: drop bogus x1e80100 qref supplies")
Fixes: 031b46b4729b ("phy: qcom: qmp-pcie: drop bogus x1e80100 qref supplies")
Fixes: 606060ce8fd0 ("phy: qcom-qmp-pcie: Add support for X1E80100 g3x2 and g4x2 PCIE")
Cc: Johan Hovold <johan+linaro@xxxxxxxxxx>
Cc: Abel Vesa <abel.vesa@xxxxxxxxxx>
Signed-off-by: Qiang Yu <qiang.yu@xxxxxxxxxxxxxxxx>
Signed-off-by: Wenbin Yao <quic_wenbyao@xxxxxxxxxxx>
NAK, for now, and please don't post any new revisions of this patch
until this has been resolved.
Johan
Return-Path: <linux-kernel+bounces-673423-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 369D041E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:10:58 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 0E70A3A8041
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:10:36 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 20E2A291865;
Wed, 4 Jun 2025 15:10:51 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jt4GwMlw"
Received: from mail-qv1-f53.google.com (mail-qv1-f53.google.com [209.85.219.53])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 50BDD4AEE0;
Wed, 4 Jun 2025 15:10:48 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.53
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749049850; cv=none; b=Connj/k1iUQQ+h7MQyeY9O5wnGhnYtnQ/CRNESLMfAMTfAJIWaI95Z2RU/LKAL97wqym/iVmtCsifRfePydwR1oR1rauoXPFGf5eemHed3ImbV1kJgyts0JMTIrjEU7I+AdetE9XJMspzRAd3CIqAMb8epnBVa1i6ZvqqQP0bTg=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749049850; c=relaxed/simple;
bh=jj9p7Yfm1JiWH4mQLsD9XGLeEa/UqFTAkDlwPHBvhEg=;
h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=gGFo0StZSl8lig6ANTFp2aBCHZqQ8OtKNZwkRj8I6dK7kj2+g+PaexMC5fThk+7y9bUUvj/IH3HqYAadn5Dj5naMKDMa58QmrAZ1OaGeSdA7U3ePF0rwCe7vhs3iFrMq/Sgb/gISvlFtmUd/NdY3xEVWyzfcBTUiw2af0gcp6P0=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=jt4GwMlw; arc=none smtp.client-ip=209.85.219.53
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
Received: by mail-qv1-f53.google.com with SMTP id 6a1803df08f44-6f8aa9e6ffdso62688536d6.3;
Wed, 04 Jun 2025 08:10:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1749049847; x=1749654647; darn=vger.kernel.org;
h=content-transfer-encoding:mime-version:reply-to:message-id:date
:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to;
bh=zlNmd2XKllw/97ryueauENrkZuEH44uo2nMCnWBruCU=;
b=jt4GwMlw3ssXeqc3x3DzDmyzSrByGDVFTifKDJ6NqOJ4+APx0Jo5YbWdqhqilD+1z8
WXSfRJ8emqWBZ30qJVX6Y6NNWC96djsRYulrILM2SE8Do/VgzzE2gldOn533NDmlEZnD
edeiWqwsGix+z2a0zDAAH2yh5T9vn7FWyxzQVXAVljIVNRxFcKhgor33/lV3gZ4qbATb
uj/Vy1fIv3J4XXzLLP9U3AiHTsXgzF9MZq4XpNBUjX0IQOXOeay6xqGu46ivvNQdoEUi
rmP4I70dgilyXg0kLRwc6sQL+mnpwPDCb/L8TVBfA51MCuaOdoieBePaJlCC79z4ED2E
v4Bw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749049847; x=1749654647;
h=content-transfer-encoding:mime-version:reply-to:message-id:date
:subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to;
bh=zlNmd2XKllw/97ryueauENrkZuEH44uo2nMCnWBruCU=;
b=PCNq/4YkNmSHZ6oUTUvyZFca/UEDRD6REG+pBnuncPHBkY5YlSP++f/Gp4Q/BIhsYn
J1Gm8mPIFqZ4t0AOWOR74XOoTHAMgsOMlaq2GMwVIIqkRjuKTp+ky2KsVLYChqkuU6Vq
hKcGWkb8JQf/h1afIB37JxyLMglWsmbZZERRs63dhbpGacQRP+gobQjCEzmS+9xIOtqW
Sn9qOjX8786auFP3DMQuQgm2SBr8sKV83vh1w0/xLZmURW6hpx9w4pdoiV2+l9Pkb0GU
gEGAmYqQIrAM03iShycXeuEw6R4oD+l9l0Sesr8iy6Qq9NYKCYEqwF7GBHrPAxtgFih5
9DKA==
X-Forwarded-Encrypted: i=1; AJvYcCXK5OKf7Z7RWFI8VZbPo7wuC0Y6RAysI3TmkzKeHKeecnLkMOlSEMV5OiwvnLKZCUVFYm/njlip@xxxxxxxxxxxxxxx, AJvYcCXqObhc5rkI53hw/ymHAOTaKWt0whbfvR3u7OHcb7YJXe0Ww/dra9xbHq6MWaq5JfDVTZLFA/8jCI1vidE=@vger.kernel.org
X-Gm-Message-State: AOJu0YwZkiQRibwiJVdBLkpN4sQc4teY6+p30Dr1qXK01s+gUPVbPBGR
jWrYSnGWNaOqKNTEZr3MZ+pekr41rWQQLHJ3fY04nGdnIS1UK6IcL7QP
X-Gm-Gg: ASbGncv2xh2HIUrpVq9p6bpv1jRmpmV+raEV9e5SX7yA+pCzCJDv6x1fKnHZzNTFcFM
BoBCNQUuS5DLOMRwdkyO5r6rNQMpMpaynWYcDktXVspRp13dlrUT1OEvgm0Fms5krPldOU0uGtE
nLPeXR7IRghaX6jXtcHVXgKRKaj005eFJ0KAQkKpyLxb5M5I9tuqCat4XPZ0dtVfvT41m3EHhhl
SARDXtSW8cja9JuURL1pnV03Smg96CE2R7iylot+SsFuQkFym79zMdNGNMj8yhabOFNk7s/+IEb
NjRQcjySIoWBp0K/wxDIvl+GuiBMYMpzLZsFlrEtRrSaPT0xZ5omo2PKZL5i0ZFa5AMlIPD9
X-Google-Smtp-Source: AGHT+IEZ5Uf1bsWKgXtxFZVbT2QGv/K3mgX1pC8TlTojXb3txD4/AOyO0HFiYgMl9AXKL85bpH4v1w==
X-Received: by 2002:a05:6214:2a4e:b0:6e8:f166:b19c with SMTP id 6a1803df08f44-6faf7a6d772mr42701686d6.41.1749049846868;
Wed, 04 Jun 2025 08:10:46 -0700 (PDT)
Received: from KASONG-MC4.tencent.com ([101.32.222.185])
by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6facab00339sm97468236d6.125.2025.06.04.08.10.42
(version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);
Wed, 04 Jun 2025 08:10:46 -0700 (PDT)
From: Kairui Song <ryncsn@xxxxxxxxx>
To: linux-mm@xxxxxxxxx
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
Barry Song <21cnbao@xxxxxxxxx>,
Peter Xu <peterx@xxxxxxxxxx>,
Suren Baghdasaryan <surenb@xxxxxxxxxx>,
Andrea Arcangeli <aarcange@xxxxxxxxxx>,
David Hildenbrand <david@xxxxxxxxxx>,
Lokesh Gidra <lokeshgidra@xxxxxxxxxx>,
stable@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx,
Kairui Song <kasong@xxxxxxxxxxx>
Subject: [PATCH v4] mm: userfaultfd: fix race of userfaultfd_move and swap cache
Date: Wed, 4 Jun 2025 23:10:38 +0800
Message-ID: <20250604151038.21968-1-ryncsn@xxxxxxxxx>
X-Mailer: git-send-email 2.49.0
Reply-To: Kairui Song <kasong@xxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
From: Kairui Song <kasong@xxxxxxxxxxx>
On seeing a swap entry PTE, userfaultfd_move does a lockless swap
cache lookup, and tries to move the found folio to the faulting vma.
Currently, it relies on checking the PTE value to ensure that the moved
folio still belongs to the src swap entry and that no new folio has
been added to the swap cache, which turns out to be unreliable.
While working and reviewing the swap table series with Barry, following
existing races are observed and reproduced [1]:
In the example below, move_pages_pte is moving src_pte to dst_pte,
where src_pte is a swap entry PTE holding swap entry S1, and S1
is not in the swap cache:
CPU1 CPU2
userfaultfd_move
move_pages_pte()
entry = pte_to_swp_entry(orig_src_pte);
// Here it got entry = S1
... < interrupted> ...
<swapin src_pte, alloc and use folio A>
// folio A is a new allocated folio
// and get installed into src_pte
<frees swap entry S1>
// src_pte now points to folio A, S1
// has swap count == 0, it can be freed
// by folio_swap_swap or swap
// allocator's reclaim.
<try to swap out another folio B>
// folio B is a folio in another VMA.
<put folio B to swap cache using S1 >
// S1 is freed, folio B can use it
// for swap out with no problem.
...
folio = filemap_get_folio(S1)
// Got folio B here !!!
... < interrupted again> ...
<swapin folio B and free S1>
// Now S1 is free to be used again.
<swapout src_pte & folio A using S1>
// Now src_pte is a swap entry PTE
// holding S1 again.
folio_trylock(folio)
move_swap_pte
double_pt_lock
is_pte_pages_stable
// Check passed because src_pte == S1
folio_move_anon_rmap(...)
// Moved invalid folio B here !!!
The race window is very short and requires multiple collisions of
multiple rare events, so it's very unlikely to happen, but with a
deliberately constructed reproducer and increased time window, it
can be reproduced easily.
This can be fixed by checking if the folio returned by filemap is the
valid swap cache folio after acquiring the folio lock.
Another similar race is possible: filemap_get_folio may return NULL, but
folio (A) could be swapped in and then swapped out again using the same
swap entry after the lookup. In such a case, folio (A) may remain in the
swap cache, so it must be moved too:
CPU1 CPU2
userfaultfd_move
move_pages_pte()
entry = pte_to_swp_entry(orig_src_pte);
// Here it got entry = S1, and S1 is not in swap cache
folio = filemap_get_folio(S1)
// Got NULL
... < interrupted again> ...
<swapin folio A and free S1>
<swapout folio A re-using S1>
move_swap_pte
double_pt_lock
is_pte_pages_stable
// Check passed because src_pte == S1
folio_move_anon_rmap(...)
// folio A is ignored !!!
Fix this by checking the swap cache again after acquiring the src_pte
lock. And to avoid the filemap overhead, we check swap_map directly [2].
The SWP_SYNCHRONOUS_IO path does make the problem more complex, but so
far we don't need to worry about that, since folios can only be exposed
to the swap cache in the swap out path, and this is covered in this
patch by checking the swap cache again after acquiring the src_pte lock.
Testing with a simple C program that allocates and moves several GB of
memory did not show any observable performance change.
Cc: <stable@xxxxxxxxxxxxxxx>
Fixes: adef440691ba ("userfaultfd: UFFDIO_MOVE uABI")
Closes: https://lore.kernel.org/linux-mm/CAMgjq7B1K=6OOrK2OUZ0-tqCzi+EJt+2_K97TPGoSt=9+JwP7Q@xxxxxxxxxxxxxx/ [1]
Link: https://lore.kernel.org/all/CAGsJ_4yJhJBo16XhiC-nUzSheyX-V3-nFE+tAi=8Y560K8eT=A@xxxxxxxxxxxxxx/ [2]
Signed-off-by: Kairui Song <kasong@xxxxxxxxxxx>
Reviewed-by: Lokesh Gidra <lokeshgidra@xxxxxxxxxx>
---
V1: https://lore.kernel.org/linux-mm/20250530201710.81365-1-ryncsn@xxxxxxxxx/
Changes:
- Check swap_map instead of doing a filemap lookup after acquiring the
PTE lock to minimize critical section overhead [ Barry Song, Lokesh Gidra ]
V2: https://lore.kernel.org/linux-mm/20250601200108.23186-1-ryncsn@xxxxxxxxx/
Changes:
- Move the folio and swap check inside move_swap_pte to avoid skipping
the check and potential overhead [ Lokesh Gidra ]
- Add a READ_ONCE for the swap_map read to ensure it reads a up to dated
value.
V3: https://lore.kernel.org/all/20250602181419.20478-1-ryncsn@xxxxxxxxx/
Changes:
- Add more comments and more context in commit message.
mm/userfaultfd.c | 33 +++++++++++++++++++++++++++++++--
1 file changed, 31 insertions(+), 2 deletions(-)
diff --git a/mm/userfaultfd.c b/mm/userfaultfd.c
index bc473ad21202..8253978ee0fb 100644
--- a/mm/userfaultfd.c
+++ b/mm/userfaultfd.c
@@ -1084,8 +1084,18 @@ static int move_swap_pte(struct mm_struct *mm, struct vm_area_struct *dst_vma,
pte_t orig_dst_pte, pte_t orig_src_pte,
pmd_t *dst_pmd, pmd_t dst_pmdval,
spinlock_t *dst_ptl, spinlock_t *src_ptl,
- struct folio *src_folio)
+ struct folio *src_folio,
+ struct swap_info_struct *si, swp_entry_t entry)
{
+ /*
+ * Check if the folio still belongs to the target swap entry after
+ * acquiring the lock. Folio can be freed in the swap cache while
+ * not locked.
+ */
+ if (src_folio && unlikely(!folio_test_swapcache(src_folio) ||
+ entry.val != src_folio->swap.val))
+ return -EAGAIN;
+
double_pt_lock(dst_ptl, src_ptl);
if (!is_pte_pages_stable(dst_pte, src_pte, orig_dst_pte, orig_src_pte,
@@ -1102,6 +1112,25 @@ static int move_swap_pte(struct mm_struct *mm, struct vm_area_struct *dst_vma,
if (src_folio) {
folio_move_anon_rmap(src_folio, dst_vma);
src_folio->index = linear_page_index(dst_vma, dst_addr);
+ } else {
+ /*
+ * Check if the swap entry is cached after acquiring the src_pte
+ * lock. Otherwise, we might miss a newly loaded swap cache folio.
+ *
+ * Check swap_map directly to minimize overhead, READ_ONCE is sufficient.
+ * We are trying to catch newly added swap cache, the only possible case is
+ * when a folio is swapped in and out again staying in swap cache, using the
+ * same entry before the PTE check above. The PTL is acquired and released
+ * twice, each time after updating the swap_map's flag. So holding
+ * the PTL here ensures we see the updated value. False positive is possible,
+ * e.g. SWP_SYNCHRONOUS_IO swapin may set the flag without touching the
+ * cache, or during the tiny synchronization window between swap cache and
+ * swap_map, but it will be gone very quickly, worst result is retry jitters.
+ */
+ if (READ_ONCE(si->swap_map[swp_offset(entry)]) & SWAP_HAS_CACHE) {
+ double_pt_unlock(dst_ptl, src_ptl);
+ return -EAGAIN;
+ }
}
orig_src_pte = ptep_get_and_clear(mm, src_addr, src_pte);
@@ -1412,7 +1441,7 @@ static int move_pages_pte(struct mm_struct *mm, pmd_t *dst_pmd, pmd_t *src_pmd,
}
err = move_swap_pte(mm, dst_vma, dst_addr, src_addr, dst_pte, src_pte,
orig_dst_pte, orig_src_pte, dst_pmd, dst_pmdval,
- dst_ptl, src_ptl, src_folio);
+ dst_ptl, src_ptl, src_folio, si, entry);
}
out:
--
2.49.0
Return-Path: <linux-kernel+bounces-673424-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id EB7E241E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:12:25 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 5355F3A769F
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:12:02 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 9281F291867;
Wed, 4 Jun 2025 15:12:16 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="OfCl6ftF"
Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id CA9734AEE0;
Wed, 4 Jun 2025 15:12:13 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.9
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749049935; cv=none; b=CxFy6jiHk5gtECKqAc1+HUo6lmxzYfdKabaq88O4xRYENZMGhhIbp2WF4g2qdSUJskY9ehRdlQFeF5Q71+Pd8sfoScAHWN6TPKHsrLDVu/I3wUqaQX9fcXX39keATDRXlLTFtvJ/OFW9sfdaP2j1I7yoca/dwqVcrkfn1eYuOXc=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749049935; c=relaxed/simple;
bh=kq+m0QIAuhIHtYetcNnPRrO7LimxMJSYLr9rALJScj4=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=CHbdQKkuAx9rxe+vhJ9clJvubUGIpTs3XjmIEm9QhLdM2DbRFvfuQXzC+8UpjSummpFKG57UXpLnV3jDyMr/sWDCvQL4T5FcZeqwiQMd5hrKWg0UaOzTgV4bwsMgBHm8FvSk8BwpUikHY9HYJ3bFzVIy2nzt14DkFwP8CLnXwYU=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=OfCl6ftF; arc=none smtp.client-ip=192.198.163.9
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com
Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
t=1749049934; x=1780585934;
h=date:from:to:cc:subject:message-id:references:
mime-version:in-reply-to;
bh=kq+m0QIAuhIHtYetcNnPRrO7LimxMJSYLr9rALJScj4=;
b=OfCl6ftFd+Cp/dI08G0qG8txLoZl9dLE9Ob6HeuwHvG0FvZpa1y1p8AD
qbBrgQylWSZXN83/RNqbi/XcdQhDzhRjuqeE87WkgEO7i20VmCceu4PMT
dff6d99vTmoRBQJdEJ6rkRBm4auyyVGEga62ZnJLShaEZgoohk3mKXlyE
p49+SUqo7a2RKPRPmlRJ3RXSffMsxnsgTonQgOplKoB0tEWxnKXNUNWeC
xZ9/rIm2ijPYfZbKJbROFkfI3PFpmo1E2FsK96r5fylopXrWNA2wvb8uS
KgNczbPnh1NvZU3oEws5x1M5KpdGfYpUm7wL9n9UGt+tPUPR8x+Mznw2h
Q==;
X-CSE-ConnectionGUID: 3z+f9kVoRN2NQLtcvbiy3w==
X-CSE-MsgGUID: R18cy9dWSHWtl4R3z8UwMg==
X-IronPort-AV: E=McAfee;i="6800,10657,11454"; a="61801497"
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="61801497"
Received: from fmviesa007.fm.intel.com ([10.60.135.147])
by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 08:12:13 -0700
X-CSE-ConnectionGUID: CcnZPyNVRBCEQq/AqSlGAQ==
X-CSE-MsgGUID: lW6TtIWQSMmXLN2UgyyDFw==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="145179148"
Received: from ranerica-svr.sc.intel.com ([172.25.110.23])
by fmviesa007.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 08:12:14 -0700
Date: Wed, 4 Jun 2025 08:17:20 -0700
From: Ricardo Neri <ricardo.neri-calderon@xxxxxxxxxxxxxxx>
To: "Rob Herring (Arm)" <robh@xxxxxxxxxx>
Cc: Michael Kelley <mhklinux@xxxxxxxxxxx>, linux-acpi@xxxxxxxxxxxxxxx,
Wei Liu <wei.liu@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>,
Yunhong Jiang <yunhong.jiang@xxxxxxxxxxxxxxx>,
"K. Y. Srinivasan" <kys@xxxxxxxxxxxxx>,
Chris Oo <cho@xxxxxxxxxxxxx>, Ricardo Neri <ricardo.neri@xxxxxxxxx>,
linux-hyperv@xxxxxxxxxxxxxxx,
Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
linux-kernel@xxxxxxxxxxxxxxx,
"Ravi V. Shankar" <ravi.v.shankar@xxxxxxxxx>,
"Rafael J. Wysocki" <rafael@xxxxxxxxxx>,
"Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx>,
x86@xxxxxxxxxx, Saurabh Sengar <ssengar@xxxxxxxxxxxxxxxxxxx>,
Dexuan Cui <decui@xxxxxxxxxxxxx>, devicetree@xxxxxxxxxxxxxxx
Subject: Re: [PATCH v4 03/10] dt-bindings: reserved-memory: Wakeup Mailbox
for Intel processors
Message-ID: <20250604151720.GC29325@xxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20250603-rneri-wakeup-mailbox-v4-0-d533272b7232@xxxxxxxxxxxxxxx>
<20250603-rneri-wakeup-mailbox-v4-3-d533272b7232@xxxxxxxxxxxxxxx>
<174900070284.2624702.4580450009482590306.robh@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <174900070284.2624702.4580450009482590306.robh@xxxxxxxxxx>
User-Agent: Mutt/1.9.4 (2018-02-28)
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Tue, Jun 03, 2025 at 08:31:42PM -0500, Rob Herring (Arm) wrote:
On Tue, 03 Jun 2025 17:15:15 -0700, Ricardo Neri wrote:
> Add DeviceTree bindings to enumerate the wakeup mailbox used in platform
> firmware for Intel processors.
>
> x86 platforms commonly boot secondary CPUs using an INIT assert, de-assert
> followed by Start-Up IPI messages. The wakeup mailbox can be used when this
> mechanism is unavailable.
>
> The wakeup mailbox offers more control to the operating system to boot
> secondary CPUs than a spin-table. It allows the reuse of same wakeup vector
> for all CPUs while maintaining control over which CPUs to boot and when.
> While it is possible to achieve the same level of control using a spin-
> table, it would require to specify a separate `cpu-release-addr` for each
> secondary CPU.
>
> The operation and structure of the mailbox is described in the
> Multiprocessor Wakeup Structure defined in the ACPI specification. Note
> that this structure does not specify how to publish the mailbox to the
> operating system (ACPI-based platform firmware uses a separate table). No
> ACPI table is needed in DeviceTree-based firmware to enumerate the mailbox.
>
> Add a `compatible` property that the operating system can use to discover
> the mailbox. Nodes wanting to refer to the reserved memory usually define a
> `memory-region` property. /cpus/cpu* nodes would want to refer to the
> mailbox, but they do not have such property defined in the DeviceTree
> specification. Moreover, it would imply that there is a memory region per
> CPU.
>
> Co-developed-by: Yunhong Jiang <yunhong.jiang@xxxxxxxxxxxxxxx>
> Signed-off-by: Yunhong Jiang <yunhong.jiang@xxxxxxxxxxxxxxx>
> Signed-off-by: Ricardo Neri <ricardo.neri-calderon@xxxxxxxxxxxxxxx>
> ---
> Changes since v3:
> - Removed redefinitions of the mailbox and instead referred to ACPI
> specification as per discussion on LKML.
> - Clarified that DeviceTree-based firmware do not require the use of
> ACPI tables to enumerate the mailbox. (Rob)
> - Described the need of using a `compatible` property.
> - Dropped the `alignment` property. (Krzysztof, Rafael)
> - Used a real address for the mailbox node. (Krzysztof)
>
> Changes since v2:
> - Implemented the mailbox as a reserved-memory node. Add to it a
> `compatible` property. (Krzysztof)
> - Explained the relationship between the mailbox and the `enable-mehod`
> property of the CPU nodes.
> - Expanded the documentation of the binding.
>
> Changes since v1:
> - Added more details to the description of the binding.
> - Added requirement a new requirement for cpu@N nodes to add an
> `enable-method`.
> ---
> .../reserved-memory/intel,wakeup-mailbox.yaml | 48 ++++++++++++++++++++++
> 1 file changed, 48 insertions(+)
>
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
./Documentation/devicetree/bindings/reserved-memory/intel,wakeup-mailbox.yaml:20:111: [warning] line too long (113 > 110 characters) (line-length)
I did see this warning. I also see that none of the existing schema with
links break them into multiple lines.
Now I see that the yamllint configuration has allow-non-breakable-words: true
I will put the link in separate line.
Return-Path: <linux-kernel+bounces-673425-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 4B46941E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:13:56 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 16CA23A866B
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:13:33 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 417D8291867;
Wed, 4 Jun 2025 15:13:49 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="m38/as1G"
Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id B31964AEE0;
Wed, 4 Jun 2025 15:13:46 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749050028; cv=none; b=hSHmEopB1tiMCrcFnX0n/qOqD6pva4eQoi9nf8/DtdIuoVw+AgqHgVDrLrX9GS+rrsjKo3F9wbJ9u1V4IUF3vO1MvL1XLpfs72v7HFb05Uk/WbARoHUnf0XJlOzqsvsjHB+bQD2E5AINn9wJR3lOl8dYjOqlr9pL1Bxs7SlOWd4=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749050028; c=relaxed/simple;
bh=8dAZHusb5t2w59SgkutsFjrgtEw1nAA1a6Jg2vrQV5Q=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=F3ZBPqRAUOEHLLLhWX1TNY9IE29KLagfdoY1aGxhyNGDx2W2emvYdviCeNKwHmSpEmi4IXq2LK4S2kwOm6qC1a3p+MljCBLilQZsv6mItQxsukriw1/Chw2p39J20erHvfBjkYtULkfrIgsb6Pjx3r/3E4kU6/NrRoS8yrCtCiA=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=m38/as1G; arc=none smtp.client-ip=156.67.10.101
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch;
s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version:
References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject:
Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:
Content-ID:Content-Description:Content-Disposition:In-Reply-To:References;
bh=q6OKa9Bkbeq4QpUjqQVjbZ+Iqs4t8ntQfpdJAOPX7Vc=; b=m38/as1GRwuEE/yLC+KrimAYLN
p5Up5uPCb0ci1r27PA7kzZouknOp+tn2vZc+nNydEmWtumnypEZYwYvZ8Hhl/Ii4/+/m08Jx5yO8c
q/uzfxVyk1WbcynBj15QrlowY7Ez2XH//58JJL9eZHAw+FxgORYT/5ir59n/UledaC6Y=;
Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2)
(envelope-from <andrew@xxxxxxx>)
id 1uMpoF-00Egtl-Pm; Wed, 04 Jun 2025 17:13:43 +0200
Date: Wed, 4 Jun 2025 17:13:43 +0200
From: Andrew Lunn <andrew@xxxxxxx>
To: Stefano Radaelli <stefano.radaelli21@xxxxxxxxx>
Cc: devicetree@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>, Shawn Guo <shawnguo@xxxxxxxxxx>,
Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>,
Pengutronix Kernel Team <kernel@xxxxxxxxxxxxxx>,
Fabio Estevam <festevam@xxxxxxxxx>, imx@xxxxxxxxxxxxxxx,
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [v1] arm64: dts: freescale: imx93-var-som: update eqos support
for MaxLinear PHY
Message-ID: <1d755cbf-4dee-4784-98b7-e72061219e3f@xxxxxxx>
References: <20250603221416.74523-1-stefano.radaelli21@xxxxxxxxx>
<54c4a279-a528-4657-8319-c9374add54b7@xxxxxxx>
<CAK+owoihxp-2xAvFfVthvNELshti_3V-pFgD7D7jzd1XqiLgGQ@xxxxxxxxxxxxxx>
<d5f891d7-d24a-4f85-b59d-313b925c4495@xxxxxxx>
<CAK+owog69JktbsBhHZj7ULYXmH_bZ-CO8=QEMqBVc0mjp8jz6g@xxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <CAK+owog69JktbsBhHZj7ULYXmH_bZ-CO8=QEMqBVc0mjp8jz6g@xxxxxxxxxxxxxx>
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 03:08:09PM +0200, Stefano Radaelli wrote:
Hi Andrew,
To clarify more precisely: hw team told me that the required 2 ns
RGMII delays are
implemented directly in hardware inside the SOM itself, through passive delay
elements (filters) placed on the RX and TX lines. There is no reliance on PHY
strap settings or any kind of delay configuration via registers.
This means:
- The delays are fixed and cannot be changed via software.
- From the point of view of any carrier board, the interface is
already timing-compliant.
Great. Please add a comment in the DT explaining this. 99% of the time
'rgmii' is wrong, but this is the 1%. We should make it clear this is
not just another cut/paste error, but very intentional and correct
because of the PCB design.
There is a patch to checkpatch.pl i want to introduce in the next
development cycle which will look for 'rgmii', and if found, look on
the line before for a comment including the word 'PCB'. If it finds
'rgmii' without such a comment it will issue a warning. So it would be
nice to avoid that in your correct case.
Andrew
Return-Path: <linux-kernel+bounces-673426-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 7820B41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:14:07 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id B1178174C39
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:14:07 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id EB8C7291892;
Wed, 4 Jun 2025 15:13:50 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=syntacore.com header.i=@syntacore.com header.b="qFFBj5JE"
Received: from m.syntacore.com (m.syntacore.com [178.249.69.228])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 89A6E290D80;
Wed, 4 Jun 2025 15:13:48 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.249.69.228
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749050030; cv=none; b=poy5lmqdvwJyCEqpwYP8L3wkm3pUyzleWmNqJohrmY+H3+M/RUVINIliBVLEpboyQ5G81H9aggfRjtYCASmyjQXC92WaLbVNiMC3e5IclB1pxcn79IS61ruTgOY+N5jHt2rl4FAE56l1TLu4G4eHw4szUXRwybMmBVK1elUgjlc=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749050030; c=relaxed/simple;
bh=Bz52cWmM5E063diqhU/tvNAwMpsAg2SFm+DiQ9Dj94Y=;
h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=PCnX9oz5riIH1R9aeAsmkbYoCehd7Uh2Ih/ECs19I68IeS42h/H30wy/MD7z0zDR7tZ5KkiRYUF1pGsGw9jTdKvTOpV5n6ugReWebZXjXb18pNKfWh6uAVb6GmS5wmhQCTtsJppppBySPnuDkAveswjQLM0CTK9A/5VH8bFrGP4=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=syntacore.com; spf=pass smtp.mailfrom=syntacore.com; dkim=pass (2048-bit key) header.d=syntacore.com header.i=@syntacore.com header.b=qFFBj5JE; arc=none smtp.client-ip=178.249.69.228
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=syntacore.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=syntacore.com
Received: from MRN-SC-KSMG-01.corp.syntacore.com (localhost [127.0.0.1])
by m.syntacore.com (Postfix) with ESMTP id 386171A0004;
Wed, 4 Jun 2025 15:07:43 +0000 (UTC)
DKIM-Filter: OpenDKIM Filter v2.11.0 m.syntacore.com 386171A0004
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=syntacore.com; s=m;
t=1749049663; bh=cFvYaW2WkbtOra3S0g7FSljIzV4LxrpuqkAbvhUZRVI=;
h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:From;
b=qFFBj5JEyV6NX3EeyzhabNsOKCgp9jJ9AFkzUYTr7lX9o+e4rwwXk5S81XGzUfEi1
LNQDEBsNDZs6a6o1xuli/VYrLGk4xDpdU11Z8sRU9LiqoRrk/sjtVcJDUm3rMlPP6F
6xFw521QT9wRVQVhk1boOFiMCUOHRs1gXCSxK+bMJyLcQ7sGz9hkWl42jKqdkBrIAv
IVZpAhBMUcCFAVLRde+a/IgzLNAKMTuWC3JYRG9wJ9wDKHrROMXu95QlNFG6ZyDZ7l
GpqCr/eSzO4xhWXg3rxXh6nlXf8urJZZKLfcFQceCqN1gNzeTvzzfyjeLHaKHVYOU5
gAdYVUb0Ohnmg==
Received: from S-SC-EXCH-01.corp.syntacore.com (exchange.syntacore.com [10.76.202.20])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by m.syntacore.com (Postfix) with ESMTPS;
Wed, 4 Jun 2025 15:07:41 +0000 (UTC)
Received: from localhost (10.199.25.251) by S-SC-EXCH-01.corp.syntacore.com
(10.76.202.20) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Wed, 4 Jun
2025 18:06:55 +0300
From: Svetlana Parfenova <svetlana.parfenova@xxxxxxxxxxxxx>
To: Kees Cook <kees@xxxxxxxxxx>, <linux-mm@xxxxxxxxx>
CC: Svetlana Parfenova <svetlana.parfenova@xxxxxxxxxxxxx>, Alexander Viro
<viro@xxxxxxxxxxxxxxxxxx>, Christian Brauner <brauner@xxxxxxxxxx>, Jan Kara
<jack@xxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
<linux-fsdevel@xxxxxxxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>
Subject: [RFC] binfmt_elf: preserve original ELF e_flags in core dumps
Date: Wed, 4 Jun 2025 22:05:02 +0700
Message-ID: <20250604150502.622178-1-svetlana.parfenova@xxxxxxxxxxxxx>
X-Mailer: git-send-email 2.39.5
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain
X-ClientProxiedBy: S-SC-EXCH-01.corp.syntacore.com (10.76.202.20) To
S-SC-EXCH-01.corp.syntacore.com (10.76.202.20)
X-KSMG-AntiPhishing: not scanned, disabled by settings
X-KSMG-AntiSpam-Interceptor-Info: not scanned
X-KSMG-AntiSpam-Status: not scanned, disabled by settings
X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.1.1.8310, bases: 2025/06/04 12:53:00 #27536686
X-KSMG-AntiVirus-Status: NotDetected, skipped
X-KSMG-LinksScanning: NotDetected
X-KSMG-Message-Action: skipped
X-KSMG-Rule-ID: 5
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Preserve the original ELF e_flags from the executable in the core dump
header instead of relying on compile-time defaults (ELF_CORE_EFLAGS or
value from the regset view). This ensures that ABI-specific flags in
the dump file match the actual binary being executed.
Save the e_flags field during ELF binary loading (in load_elf_binary())
into the mm_struct, and later retrieve it during core dump generation
(in fill_note_info()). Use this saved value to populate the e_flags in
the core dump ELF header.
Add a new Kconfig option, CONFIG_CORE_DUMP_USE_PROCESS_EFLAGS, to guard
this behavior. Although motivated by a RISC-V use case, the mechanism is
generic and can be applied to all architectures.
This change is needed to resolve a debugging issue encountered when
analyzing core dumps with GDB for RISC-V systems. GDB inspects the
e_flags field to determine whether optional register sets such as the
floating-point unit are supported. Without correct flags, GDB may warn
and ignore valid register data:
warning: Unexpected size of section '.reg2/213' in core file.
As a result, floating-point registers are not accessible in the debugger,
even though they were dumped. Preserving the original e_flags enables
GDB and other tools to properly interpret the dump contents.
Signed-off-by: Svetlana Parfenova <svetlana.parfenova@xxxxxxxxxxxxx>
---
fs/Kconfig.binfmt | 9 +++++++++
fs/binfmt_elf.c | 26 ++++++++++++++++++++------
include/linux/mm_types.h | 5 +++++
3 files changed, 34 insertions(+), 6 deletions(-)
diff --git a/fs/Kconfig.binfmt b/fs/Kconfig.binfmt
index bd2f530e5740..45bed2041542 100644
--- a/fs/Kconfig.binfmt
+++ b/fs/Kconfig.binfmt
@@ -184,4 +184,13 @@ config EXEC_KUNIT_TEST
This builds the exec KUnit tests, which tests boundary conditions
of various aspects of the exec internals.
+config CORE_DUMP_USE_PROCESS_EFLAGS
+ bool "Preserve ELF e_flags from executable in core dumps"
+ depends on BINFMT_ELF && ELF_CORE && RISCV
+ default n
+ help
+ Save the ELF e_flags from the process executable at load time
+ and use it in the core dump header. This ensures the dump reflects
+ the original binary ABI.
+
endmenu
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index 4c1ea6b52a53..baf749e431a1 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -1297,6 +1297,11 @@ static int load_elf_binary(struct linux_binprm *bprm)
mm->end_data = end_data;
mm->start_stack = bprm->p;
+#ifdef CONFIG_CORE_DUMP_USE_PROCESS_EFLAGS
+ /* stash e_flags for use in core dumps */
+ mm->saved_e_flags = elf_ex->e_flags;
+#endif
+
/**
* DOC: "brk" handling
*
@@ -1870,6 +1875,8 @@ static int fill_note_info(struct elfhdr *elf, int phdrs,
struct elf_thread_core_info *t;
struct elf_prpsinfo *psinfo;
struct core_thread *ct;
+ u16 machine;
+ u32 flags;
psinfo = kmalloc(sizeof(*psinfo), GFP_KERNEL);
if (!psinfo)
@@ -1897,17 +1904,24 @@ static int fill_note_info(struct elfhdr *elf, int phdrs,
return 0;
}
- /*
- * Initialize the ELF file header.
- */
- fill_elf_header(elf, phdrs,
- view->e_machine, view->e_flags);
+ machine = view->e_machine;
+ flags = view->e_flags;
#else
view = NULL;
info->thread_notes = 2;
- fill_elf_header(elf, phdrs, ELF_ARCH, ELF_CORE_EFLAGS);
+ machine = ELF_ARCH;
+ flags = ELF_CORE_EFLAGS;
#endif
+#ifdef CONFIG_CORE_DUMP_USE_PROCESS_EFLAGS
+ flags = dump_task->mm->saved_e_flags;
+#endif
+
+ /*
+ * Initialize the ELF file header.
+ */
+ fill_elf_header(elf, phdrs, machine, flags);
+
/*
* Allocate a structure for each thread.
*/
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 56d07edd01f9..5487d6ba6fcb 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -1059,6 +1059,11 @@ struct mm_struct {
unsigned long saved_auxv[AT_VECTOR_SIZE]; /* for /proc/PID/auxv */
+#ifdef CONFIG_CORE_DUMP_USE_PROCESS_EFLAGS
+ /* the ABI-related flags from the ELF header. Used for core dump */
+ unsigned long saved_e_flags;
+#endif
+
struct percpu_counter rss_stat[NR_MM_COUNTERS];
struct linux_binfmt *binfmt;
--
2.39.5
Return-Path: <linux-kernel+bounces-673427-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 5820A41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:14:40 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 0EE80174ECE
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:14:41 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 454A5290D80;
Wed, 4 Jun 2025 15:14:33 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="lYzCSoQM"
Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.170])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 03BD2291158
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:14:30 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.170
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749050072; cv=none; b=m6TAxgoZqPPaLSqmM+/vq0gq7RIt+tWVyC5hOeOm6T6ZYqIPPsJWhgq5DT5Yo+IC+FUmnOdsAAOCOjeuC3cZ6eOhfhE5biSKdtBub+0zj9MyRk2PgbAjRa/zhM+QYUWgRvoVS/WNshcm5vRI9gNItFHunzORWBDGdkxJXf+O+ew=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749050072; c=relaxed/simple;
bh=Vz9j+gRU9u8lCxApmtclw2M381IMN+MeB6Q2Te9JwCs=;
h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
To:Cc:Content-Type; b=uG7Shx/0YRIP2OLRqj0wY4wZVc3ZlNzPEdZXlki/+xtqmWqIJxuJ9AlXJpUL8ntagwsMLXRQqhgwHgU4dhlV/pNFVXQ9Fjm4mIvXzjVqhM1ktOoYUpCFpYyhOulvPkoSSjH4Pwh10qPdwwcXcDzgUDcDASUX1SKqwerVd/5lts0=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=lYzCSoQM; arc=none smtp.client-ip=209.85.160.170
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com
Received: by mail-qt1-f170.google.com with SMTP id d75a77b69052e-47e9fea29easo482111cf.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 08:14:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=google.com; s=20230601; t=1749050070; x=1749654870; darn=vger.kernel.org;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:from:to:cc:subject:date
:message-id:reply-to;
bh=utxbGnGIbzF8mH+ke5le74ATfkvfWNo9bI2IYs+ukk0=;
b=lYzCSoQMcqvJ6myfaxuhILu7NMmHb563kKHRdGsqsWaVwIJpGGPnR+17TNIBmWM5N0
2ZEy0+oyZYlYzi0S4KCF2BKnluIzUL/uYRhSIY+7Jw94zYiMWfKMcWDHNV/ili9VO+aT
cGS+AV9wPGW8Zylfh/Cl3ByB7fJr2DBWXF6Nk4qE9Fz2Cek56xA1boOXHlbAnpb3F0xH
Gbiy8nCQmuKSPv4bBc49fycOSeVQeuV6/YHdMkk6zEEPtztWBvtLocl0S0OmAGEgFGc/
JZUKFLQ4x+nWXe8OWYSsBorRgtn5MPl9jGTYeqTG0KkbRa3ZOiwQD3aJj48K8frzCmG3
UAMQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749050070; x=1749654870;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=utxbGnGIbzF8mH+ke5le74ATfkvfWNo9bI2IYs+ukk0=;
b=BwV51mmlhDBUWUI+EMzgEAjfRmivx033eUxnJLq8pjKGe9vSxo6jYFkBW1ZwE24fzU
H2IY86Z2Eabfy5oG2KfwppziLHtICDAtxtAOhennogEHPeM25OMwwYA/ktabhznLcDRZ
4rfyLDYqEuBQTSNWWDBZCF2TGEQb1Cm2mu0N9rjw/f425+pCwcaur4oCEkbaRC+brR0b
ir53cYf2v8+PAXcSyWgi0g/6Xsnx1DtsxMHa8cHIcA1qjd+fI1h1aMgpvVWfSwVXDV89
Jdnv6j/KyEKksbHgjy/Yn4rdO64hue6++YCNsmQjM31sgNsEPbhuQp60+8qGkRbtLIQm
8QLQ==
X-Forwarded-Encrypted: i=1; AJvYcCVt+cN6oO3wulYBpCRX2tV+0qAYLXvLvFIcsmJUdcxchCXb63LkijzOED5l5630G7O16pkDM2O1srlfOjc=@vger.kernel.org
X-Gm-Message-State: AOJu0YzH+HnLXXp8lW7+zIHc1x+5+UUtSBgmJ6JGsdLMlbMTLQrOdLAj
f/aguE25h0SpWUjJnuBndLAKNhKRseJAAHtVjcjo5Ztv2PJXURF8Wr2PO1s6IOAUD7M/eXUvzLR
X2Mb0ySmWDJzTKR1HIFYe9zmeTm49rWFKC6k8zZha
X-Gm-Gg: ASbGncs5pIocNv3BtsSvI8zP/Qf2gyXa+mmEjzM/uu0O4yhe4t5JOKsQg7CY0+ymDdI
P+C9Sjpxy98DnjpKySPPNF2vRtyigyDegI2RHz3lVzHmdBZNgLx6tqVwdaHHbQpzJJa5VCKH54I
w1tn6I4343Ygd2NiMl9KL0JOc1MhfL/4CO35okG4GfCB9IwBAd5OsjuTg2R8OZuUxID8CYr8sO
X-Google-Smtp-Source: AGHT+IG7WUENSnzjQt1432tk0/IC2xUBgjIJ6p1wfQtTmthhSrBkIabqQdFzCkGqvNujLDVYjt6N/VZKebcP/XvFGPs=
X-Received: by 2002:a05:622a:5513:b0:477:9a4:d7ea with SMTP id
d75a77b69052e-4a5a60d620fmr3781231cf.13.1749050069321; Wed, 04 Jun 2025
08:14:29 -0700 (PDT)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
References: <20250604025246.61616-1-byungchul@xxxxxx> <20250604025246.61616-3-byungchul@xxxxxx>
In-Reply-To: <20250604025246.61616-3-byungchul@xxxxxx>
From: Suren Baghdasaryan <surenb@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 08:14:18 -0700
X-Gm-Features: AX0GCFvbLYsMxCrveTLh5QRMe579FQstUyFi0HWrz3vr2pOTHdyUzOaCmMQ3Mp4
Message-ID: <CAJuCfpFCtGFRip72x8HadTfuv_2d+e19qZ2xJowaLa6V9JOGHA@xxxxxxxxxxxxxx>
Subject: Re: [RFC v4 02/18] netmem: introduce netmem alloc APIs to wrap page
alloc APIs
To: Byungchul Park <byungchul@xxxxxx>
Cc: willy@xxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
linux-mm@xxxxxxxxx, kernel_team@xxxxxxxxxxx, kuba@xxxxxxxxxx,
almasrymina@xxxxxxxxxx, ilias.apalodimas@xxxxxxxxxx, harry.yoo@xxxxxxxxxx,
hawk@xxxxxxxxxx, akpm@xxxxxxxxxxxxxxxxxxxx, davem@xxxxxxxxxxxxx,
john.fastabend@xxxxxxxxx, andrew+netdev@xxxxxxx, asml.silence@xxxxxxxxx,
toke@xxxxxxxxxx, tariqt@xxxxxxxxxx, edumazet@xxxxxxxxxx, pabeni@xxxxxxxxxx,
saeedm@xxxxxxxxxx, leon@xxxxxxxxxx, ast@xxxxxxxxxx, daniel@xxxxxxxxxxxxx,
david@xxxxxxxxxx, lorenzo.stoakes@xxxxxxxxxx, Liam.Howlett@xxxxxxxxxx,
vbabka@xxxxxxx, rppt@xxxxxxxxxx, mhocko@xxxxxxxx, horms@xxxxxxxxxx,
linux-rdma@xxxxxxxxxxxxxxx, bpf@xxxxxxxxxxxxxxx, vishal.moola@xxxxxxxxx
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-11.0 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Tue, Jun 3, 2025 at 7:53=E2=80=AFPM Byungchul Park <byungchul@xxxxxx> wr=
ote:
To eliminate the use of struct page in page pool, the page pool code
should use netmem descriptor and APIs instead.
As part of the work, introduce netmem alloc APIs allowing the code to
use them rather than the existing APIs for struct page.
Signed-off-by: Byungchul Park <byungchul@xxxxxx>
---
net/core/netmem_priv.h | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/net/core/netmem_priv.h b/net/core/netmem_priv.h
index cd95394399b4..32e390908bb2 100644
--- a/net/core/netmem_priv.h
+++ b/net/core/netmem_priv.h
@@ -59,4 +59,18 @@ static inline void netmem_set_dma_index(netmem_ref net=
mem,
magic =3D netmem_get_pp_magic(netmem) | (id << PP_DMA_INDEX_SHIFT=
);
__netmem_clear_lsb(netmem)->pp_magic =3D magic;
}
+
+static inline netmem_ref alloc_netmems_node(int nid, gfp_t gfp_mask,
+ unsigned int order)
+{
+ return page_to_netmem(alloc_pages_node(nid, gfp_mask, order));
+}
+
+static inline unsigned long alloc_netmems_bulk_node(gfp_t gfp, int nid,
+ unsigned long nr_netm=
ems,
+ netmem_ref *netmem_ar=
ray)
+{
+ return alloc_pages_bulk_node(gfp, nid, nr_netmems,
+ (struct page **)netmem_array);
+}
Note: if you want these allocations to be reported in a separate line
inside /proc/allocinfo you need to use alloc_hooks() like this:
static inline unsigned long alloc_netmems_bulk_node_noprof(gfp_t gfp, int n=
id,
unsigned long nr_netmems=
,
netmem_ref *netmem_array=
)
{
return alloc_pages_bulk_node_noprof((gfp, nid, nr_netmems,
(struct page **)netmem_array);
}
#define alloc_netmems_bulk_node(...) \
alloc_hooks(alloc_netmems_bulk_node_noprof(__VA_ARGS__))
#endif
--
2.17.1
Return-Path: <linux-kernel+bounces-673428-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 87E6B41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:15:04 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 41AE47A8CE0
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:13:41 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 646A929188E;
Wed, 4 Jun 2025 15:14:38 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="JJb/RYIj"
Received: from mail-qk1-f173.google.com (mail-qk1-f173.google.com [209.85.222.173])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id D60432918C3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:14:35 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.173
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749050077; cv=none; b=ZdSmJzaX0XgrUKLvUtMefprb+TQpVIY/yE3RZA3nGd0m0MA1MOBt9o+L9NV9CcKus/92ByG+kIPy+mEZsk+q0VT/CNyBXWyGqjwzgTlsth+kvwQfNmvTTb+GWM4P61cXlDyiePbkD+7xiPWCSuG4OB8+SG5xm6nLH+KABfwDKRQ=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749050077; c=relaxed/simple;
bh=F2GqFl1/84xaPmgtYnDWNTe/z9DJYn/8q7MoudAJxFo=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=t3nzPxWzM6NWjDFidyaFuaKZxZwnZaIJaqtjo8Dl8a8ab3Y40JyrQYMJn4qHOyOQ95aNnjGoZneNn+vltAMBtz76hVzmL+z/vbQ3pbndqESM5yepELcEZJ8YjbN9T1ESLXTV3uVLiovOPqTJpni6xfClUXVocMOyu526xe0jIPo=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca; spf=pass smtp.mailfrom=ziepe.ca; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b=JJb/RYIj; arc=none smtp.client-ip=209.85.222.173
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ziepe.ca
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ziepe.ca
Received: by mail-qk1-f173.google.com with SMTP id af79cd13be357-7d094d1fd7cso899339585a.3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 08:14:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=ziepe.ca; s=google; t=1749050074; x=1749654874; darn=vger.kernel.org;
h=in-reply-to:content-disposition:mime-version:references:message-id
:subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to;
bh=bh4DIjoGJL2jTXtilitDzlRuYxQwvWY0DhKHuyFdzoI=;
b=JJb/RYIjzyHJGMDDEipA2alK0PHLDagNwnaeqCQx2Z3rcmTuSTK2hLdEJTRsluHa5a
0j5f9x/GrtVIGxmkZSIUG7LYdRoRHMMzxPeywGHl3mBZshmjEXRGsqUDgthuYR+k3Z05
5rmw6SHG8CRnyhcL2BufNG7JK5AAUGfUKOXpa8SAKRL8uXG/PRS/2qRjgHaDx89P2XV/
itPTzo6KT4oDugn18v3to1favAJwip+rFyhjruU/zR8oIie19m9u3d6PvUBpidAzpOe/
OwgxTd4aXqVQWKTdZNittxjqGiQ75zFweT677KcEatdxxpex2AfjPu/Idmu6wLFJdxwT
ZUNw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749050074; x=1749654874;
h=in-reply-to:content-disposition:mime-version:references:message-id
:subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to;
bh=bh4DIjoGJL2jTXtilitDzlRuYxQwvWY0DhKHuyFdzoI=;
b=fGYH2kOiyRIb45FJZIKZPGTsP74Vfy3LuBOEfz1UdSXUCEAU0Uq/L76iiyIs5THx85
T66+xI9dmZglI6bJjfAg6a0Lx4Uc/ic+1xndQDin7WiEZtCFy2UyD0LEOpKQ9WRazR1S
XzV6WPXEzkcej18pRFVg2hF0GSc0YgUAv9irJI8CM5ZKVPcmHR8sDBvodkjty5AsKjbr
sTASI9rh45zc/ftFvIjFbAB+Lg+B0itthMTrPdmPa+4I2jPGxMWZxyba6uJIDLei0O7S
uA6E9fOuJ+NxkmXDjxV3znOr18acHZfwy3I8mx+0Xgo2Or2SqYA4X95NsQPHZhDm3ilD
7AXw==
X-Gm-Message-State: AOJu0YxLRepfDFd7yzm9pdNNoFpfFNWnA6+ij63S4/bUTMy+iuPWWEi+
Fz9MTg/ULr1kDCpKyj+tZTz3e/P6e+nKYAevFd9hkXcS7Z9S1x9KNZjnXQZWgkITqZ0=
X-Gm-Gg: ASbGncvRKG19Pip7dJZbBnsGlQskier2SN+aZzCSFyqwaimwYhhG8SI2HxuBlGRXDjZ
7c+DoGyHBN/ABG8nS3AsFHNsoEUbVCeX1FElEf9uBMsGOWnXQgYfW+BsqvhLypJ4RltWYBFlM2z
rkkUWBkc2lMg0pToiZd9xBuJymLzvAIPxbbIxxZ0Bv7HLCRKqLRHmWE93ZF99Gw1R9EJ7BISXUz
R7FrSNdajHSJYoVB8KJBZKu/QcCl5R3FxzuWrvVvBR3vIsroWHWYWu20OV9Npa6dXhrw68O+Hru
5qwpQl0Fnd76Kzh5M5ooP8xX2I8jIzF4kI6eMR0NcMYnVcUeiMshDShEu957tjK2ssJSA2vqZ9k
P8rF9pLvV3YDKD9sIeDjWwNZa/HydF1Z3Q2qaWQ==
X-Google-Smtp-Source: AGHT+IE+Te51cMRDI3dfmEXr1sQ2+XeBtu6PbGzpC9Kk6kqn7Cuvcw9/An7M1R0Kf+rYU1wsfAaNRA==
X-Received: by 2002:a05:620a:44c9:b0:7d0:a10c:95b4 with SMTP id af79cd13be357-7d21987126amr525244985a.1.1749050073979;
Wed, 04 Jun 2025 08:14:33 -0700 (PDT)
Received: from ziepe.ca (hlfxns017vw-142-167-56-70.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.167.56.70])
by smtp.gmail.com with ESMTPSA id af79cd13be357-7d09a195d7dsm1046378985a.78.2025.06.04.08.14.33
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 08:14:33 -0700 (PDT)
Received: from jgg by wakko with local (Exim 4.97)
(envelope-from <jgg@xxxxxxxx>)
id 1uMpp2-000000006MV-3s6s;
Wed, 04 Jun 2025 12:14:32 -0300
Date: Wed, 4 Jun 2025 12:14:32 -0300
From: Jason Gunthorpe <jgg@xxxxxxxx>
To: David Hildenbrand <david@xxxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>, Mike Rapoport <rppt@xxxxxxxxxx>,
Suren Baghdasaryan <surenb@xxxxxxxxxx>,
Michal Hocko <mhocko@xxxxxxxx>, John Hubbard <jhubbard@xxxxxxxxxx>,
Peter Xu <peterx@xxxxxxxxxx>
Subject: Re: [PATCH v1] mm/gup: remove (VM_)BUG_ONs
Message-ID: <20250604151432.GC17991@xxxxxxxx>
References: <20250604140544.688711-1-david@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20250604140544.688711-1-david@xxxxxxxxxx>
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 04:05:44PM +0200, David Hildenbrand wrote:
Especially once we hit one of the assertions in
sanity_check_pinned_pages(), observing follow-up assertions failing
in other code can give good clues about what went wrong, so use
VM_WARN_ON_ONCE instead.
While at it, let's just convert all VM_BUG_ON to VM_WARN_ON_ONCE as
well. Add one comment for the pfn_valid() check.
We have to introduce VM_WARN_ON_ONCE_VMA() to make that fly.
I'm fine with this, but IMHO, using ON_ONCE is wasteful here.
They have been BUG_ONs for ages, they really do never happen. If there
was ever a case to justify not using ON_ONCE this is it..
Jason
Return-Path: <linux-kernel+bounces-673429-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id C9ABC41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:17:23 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id D45903A859D
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:17:00 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 2F3A4158DA3;
Wed, 4 Jun 2025 15:17:15 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="F8PQgbg0"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id E87C82F56
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:17:12 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749050234; cv=none; b=NeVuqmJ64mk1HavIi5CygyHSkQBR2M70kwpopcA75IQ0V1vRJ0O1HiMvdNl5wWoo0HpE6Z2N+snsv3qSn9jdRC1Jeq9lcyZlbc4uTlCLltGDCjuZASrblRXMZuXzP1bWdXdwJ5wbmGNYa7f8XiCCFPGzbuP+Z6E9btqroW7tGRc=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749050234; c=relaxed/simple;
bh=tXH56JHUlfyoRgZiUau7pzUNxZ5GWldWwVrR7Gic760=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=cyKrwabdAQP1m3uyLlZYJr0k1vuleuqkiiviteJM2wpSqDbf11PVsVFZwziQWHnzxkHwe4/kIKCUr/jVPENCc5wVYYwWebKbyh9Bme4CdaKD8HifkZ9VLeR9/UBEK/qeWIPV7an702cI6VdyrHfv5gAyX0pN58pxuuJP39+PX9A=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=F8PQgbg0; arc=none smtp.client-ip=170.10.133.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749050231;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
in-reply-to:in-reply-to:references:references;
bh=kAdOdBBJjoeMC7x6P8PsA8kBAyLqFtv7E13NLSQh4UI=;
b=F8PQgbg028cWnr3lXSoOlg+mctu/kuCshbhznluesfnElZnmzyPpUaRFRxbzlJBaFHdQaS
ZUrbTUu4FY24Jzgn6btPdG/5JYCDqkZWoXAjygi+wPiLWaHwC2rgD5CVy5Xhu1zUljApel
Qmkghb43WqMd/3zAtnfYnQYTQwN9wFs=
Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com
[209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-112-tUukNZ0MNiChSz3109eMDg-1; Wed, 04 Jun 2025 11:17:10 -0400
X-MC-Unique: tUukNZ0MNiChSz3109eMDg-1
X-Mimecast-MFC-AGG-ID: tUukNZ0MNiChSz3109eMDg_1749050230
Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-7d0aa9cdecdso416821585a.3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 08:17:10 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749050230; x=1749655030;
h=in-reply-to:content-disposition:mime-version:references:message-id
:subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to;
bh=kAdOdBBJjoeMC7x6P8PsA8kBAyLqFtv7E13NLSQh4UI=;
b=cdw4+SrLAr1FLN5VK/ip8mdtWjIuiJKJCAQ0y6mMIbtG9xHHZv7WinjoDKLRXUr38o
iR6kduwXWkJ8DVzaP/x3ygOiwCRYoPDjK7RcRzZ7rkzNNjb2kleGTqm7v4sb2JOOwEq4
4HSU+qmt+6qg5t+5oYd5WzDdgN/Jg3ADzlXk93DbZmMPLhmkifgn/dychNGxl62MOZQi
0hTgq+xmq4A6qSjvYb2fiziTbOQcISne9cidluiB1cTLPpcxJmxNWX/OlVYT9Ub1xLC8
KYFoCkKA4n8G4Bo7LMGQIx9lWnfzzjpO9RI9QhHO7BEf0PmUYCgf0KVwsU1C7Wanzehp
K3pA==
X-Forwarded-Encrypted: i=1; AJvYcCWU6Grg1ibvoJ5A6tfd3WN/esxIsEKo8u+N6ZVyvtJ0uPClykkfj5cAQZU/9aX8IRNM9gwUQJZFnfA4Tus=@vger.kernel.org
X-Gm-Message-State: AOJu0Yw3lptq7VnJSqdbVCxEMcZpJUTRqezqy7KkCnuC50wz1fXNZtiv
wmN2vkuWAiUV0GG4AyI+touq6KA73xmNb1O+DFRS4MMsZQUmc6jp+4zr8QEV+zA4lFhjPPA9UFQ
wbYTnYIlxi4Z8GiPlQps/H4/UDtZVCqXt4pSIoxwRFf5V9J5pKL1TrO3te2CNj89MIw==
X-Gm-Gg: ASbGncu28bVTTtMLQqUxBxjnsIt6yKokt13IXtojsDLQjezYQcQ4lrNZWeBgj1Cd6c+
OWphHgOiUpF4yCgumq69zhphD2NGo19u3leln3oai10ZMUkgcKJVmZtzl18u81kIQodJQOWETvn
JLAOSTNoGyl8hF/Kcap7VZ5WQm4RW1Co3lDwlyHAnKb2Dn6Sg6fO7ykKA5vHUz7VoSMuzJX0wuf
rHFbbUolEzF1v4msQjZHYfrv383ksxKcjGzkuCPWFzh66JBMZWOKHVw7o1GgcSaEo2pUWFq8zZ0
qc0=
X-Received: by 2002:a05:6214:20c2:b0:6ed:1651:e8c1 with SMTP id 6a1803df08f44-6faf6e6c1dcmr48552136d6.13.1749050229896;
Wed, 04 Jun 2025 08:17:09 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IF2Juz+/OHdwV5pYpuhISYl5xStTVIxTd7k3oUhwd8cUIXT1FVDQ61Tf1SCXJtXAFKxhE9W9Q==
X-Received: by 2002:a05:6214:20c2:b0:6ed:1651:e8c1 with SMTP id 6a1803df08f44-6faf6e6c1dcmr48551666d6.13.1749050229490;
Wed, 04 Jun 2025 08:17:09 -0700 (PDT)
Received: from x1.local ([85.131.185.92])
by smtp.gmail.com with ESMTPSA id af79cd13be357-7d09a1a7579sm1042399285a.106.2025.06.04.08.17.08
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 08:17:09 -0700 (PDT)
Date: Wed, 4 Jun 2025 11:17:06 -0400
From: Peter Xu <peterx@xxxxxxxxxx>
To: Tal Zussman <tz2294@xxxxxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
"Jason A. Donenfeld" <Jason@xxxxxxxxx>,
David Hildenbrand <david@xxxxxxxxxx>,
Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>,
Christian Brauner <brauner@xxxxxxxxxx>, Jan Kara <jack@xxxxxxx>,
Pavel Emelyanov <xemul@xxxxxxxxxxxxx>,
Andrea Arcangeli <aarcange@xxxxxxxxxx>, linux-mm@xxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx
Subject: Re: [PATCH 1/3] userfaultfd: correctly prevent registering
VM_DROPPABLE regions
Message-ID: <aEBjct3IJiDX-w3P@x1.local>
References: <20250603-uffd-fixes-v1-0-9c638c73f047@xxxxxxxxxxxx>
<20250603-uffd-fixes-v1-1-9c638c73f047@xxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <20250603-uffd-fixes-v1-1-9c638c73f047@xxxxxxxxxxxx>
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Tue, Jun 03, 2025 at 06:14:20PM -0400, Tal Zussman wrote:
vma_can_userfault() masks off non-userfaultfd VM flags from vm_flags.
The vm_flags & VM_DROPPABLE test will then always be false, incorrectly
allowing VM_DROPPABLE regions to be registered with userfaultfd.
Additionally, vm_flags is not guaranteed to correspond to the actual
VMA's flags. Fix this test by checking the VMA's flags directly.
Link: https://lore.kernel.org/linux-mm/5a875a3a-2243-4eab-856f-bc53ccfec3ea@xxxxxxxxxx/
Fixes: 9651fcedf7b9 ("mm: add MAP_DROPPABLE for designating always lazily freeable mappings")
Signed-off-by: Tal Zussman <tz2294@xxxxxxxxxxxx>
Acked-by: Peter Xu <peterx@xxxxxxxxxx>
--
Peter Xu
Return-Path: <linux-kernel+bounces-673430-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 5875A41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:17:55 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 7BA041896E44
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:18:08 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 4723017A316;
Wed, 4 Jun 2025 15:17:46 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="EXeSszf/"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 10A8BDDC1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:17:43 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749050265; cv=none; b=Gn/icW88fFJA5sGhSwCoBfO+w4lftyy42qzYVF3Yf7NWWqoXCFuFxUwKp6r2ZPK0q7MJLn5yIpmM+HCv98SEnyXYtFQ9urU+wwLUg5t2u9J+5YQkLYDvG6+YYlU2cN/mQjH9RbgSu+5e5Efvye1NnoiPb9OCk9qGiKf3Dwsd5Rw=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749050265; c=relaxed/simple;
bh=8Gq3Y/uvohcsvzwLNdUtL26ruFEWnJr+Etw5fxSYLMU=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=p1Cc2n083d6/kvOLI4KOuXCUh/yuSV52TUtIcbr2QI3FfHd8D/ADh3z1H4gWLKib2tYkmbaWq+Z8QghKTTNJrTTrADRVHNsLCBiIDqB5/h4LDAeQCJizNrTV3bQkkz3igsGZGAqhi0XkeChcNB9CSFolsy8cphTCJprIhcTvOw8=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=EXeSszf/; arc=none smtp.client-ip=170.10.129.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749050263;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
in-reply-to:in-reply-to:references:references;
bh=17ROtvgVsdbIKrmBl8d/GBNPYAsLTBphWL9RC8WVDIU=;
b=EXeSszf/Gsq3Cd6VqK943NILhWZPzNWtl2Xgj4zL/Dgf9qWHxtS3iiZ/DH3pRK0khR/mlb
D5lSsWM5qMejO0QFVWcY4l8bTub+j7qc0IrQLB2bDvwmnYlzglO/vnve1XNgppqoIaqcCT
y7QQ6HWIZOYSiIcUT7H0D2S9pjMyAhs=
Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com
[209.85.219.70]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-159-Ksx956KVPSC0xyGSboyT2A-1; Wed, 04 Jun 2025 11:17:42 -0400
X-MC-Unique: Ksx956KVPSC0xyGSboyT2A-1
X-Mimecast-MFC-AGG-ID: Ksx956KVPSC0xyGSboyT2A_1749050261
Received: by mail-qv1-f70.google.com with SMTP id 6a1803df08f44-6facd1cc1f8so15329086d6.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 08:17:42 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749050261; x=1749655061;
h=in-reply-to:content-disposition:mime-version:references:message-id
:subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to;
bh=17ROtvgVsdbIKrmBl8d/GBNPYAsLTBphWL9RC8WVDIU=;
b=J2QVdWLc/8FjKQJaTmrpmfgQ68HmsORiP6qpp4i2vMiS/UaYdKOYtn1AF2Qlp2Tsid
i79sV+5c+4vV3xl0TMOXXpM0x5QtyGBoe1OinIFNaGlOZON6UwvRR9T3r1BO581GgAEJ
E/YF1f96mM1EvOlkTSTZX87DQ5jKjJJsyt2ZqhcKFwNTg9arqTprVu8bzuimOj3JAxmb
hwQacIe1kmaidW0oNECfvmqQkDT0CQ8va3/C0FIFJGI05GfpvGrCONA9UgJBXCIhMGAd
sFXT3pNvMQQuQIRpny15ET6BAHIGidYLUbKo+aHufeRbr54laSZCYlFddiwUz1kYwsTl
wInw==
X-Forwarded-Encrypted: i=1; AJvYcCU9WLLzMb03tDJtCICYFTyyIIL31v0obTj9PxOteBfCXyTCUyyW2ueHqTg5rG6ayJcvFW6lkROKp8zIwZo=@vger.kernel.org
X-Gm-Message-State: AOJu0YwKBni198tEaU+lYWFr6b4AVykksQRVm89jY8fGa0Ek7MogV/rJ
qEO5PGSUh5M5BMWehi+o1/JQXMmIz6fcjwP8czqLMMOO0Dg4obsRS+zx0YGcyerP96tBsgiY5Jo
po3cLbNraS6YndXNW16ugtuqkjgVT3bpjQDm7eHQ6mA4YIU2rqRrOTpvAjQZ16Dh/FKxUJUCmUw
==
X-Gm-Gg: ASbGnctmhqlYHOU2EyF+g8kLPCqGVQgnJXOys9njFzaagG0SRyjZPB/Fc1CrojerQiS
Wb+2DR5/n9g/VQHb1soB+rafGRMZMcFD9f10j+of8l1VgoXBAZVjbb7hAviHG7VsZSVaURgP3Dn
iddAetF11EmccX9xjZH/X8Eq2IDEphgpvHW4A9Db6Xk9SnRWOoFRHr3nY18rR7p92VMGN8D2j6/
uu1asqndyCznAX0+Ykt/e4UsQ3B6fVeviTazMRW5KE+YsUci3Dh6U7kEW3nQmPPB3plfbamWzd8
NFE=
X-Received: by 2002:a0c:e947:0:b0:6fa:fdb3:5879 with SMTP id 6a1803df08f44-6fafdb35bf9mr15208836d6.1.1749050251191;
Wed, 04 Jun 2025 08:17:31 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IFXQGonqucBZYf2UC6ALyavoKYFeNdR0ADIrtP4iOYjEGlMnFQRQchn5m5Iki7I1+wf+k+Rzg==
X-Received: by 2002:a05:622a:5c8d:b0:4a4:310b:7f0a with SMTP id d75a77b69052e-4a5a56833aemr52154661cf.10.1749050240172;
Wed, 04 Jun 2025 08:17:20 -0700 (PDT)
Received: from x1.local ([85.131.185.92])
by smtp.gmail.com with ESMTPSA id d75a77b69052e-4a4358b6017sm91032051cf.33.2025.06.04.08.17.19
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 08:17:19 -0700 (PDT)
Date: Wed, 4 Jun 2025 11:17:17 -0400
From: Peter Xu <peterx@xxxxxxxxxx>
To: Tal Zussman <tz2294@xxxxxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
"Jason A. Donenfeld" <Jason@xxxxxxxxx>,
David Hildenbrand <david@xxxxxxxxxx>,
Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>,
Christian Brauner <brauner@xxxxxxxxxx>, Jan Kara <jack@xxxxxxx>,
Pavel Emelyanov <xemul@xxxxxxxxxxxxx>,
Andrea Arcangeli <aarcange@xxxxxxxxxx>, linux-mm@xxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx
Subject: Re: [PATCH 3/3] userfaultfd: remove UFFD_CLOEXEC, UFFD_NONBLOCK, and
UFFD_FLAGS_SET
Message-ID: <aEBjfQfD4rujNlaf@x1.local>
References: <20250603-uffd-fixes-v1-0-9c638c73f047@xxxxxxxxxxxx>
<20250603-uffd-fixes-v1-3-9c638c73f047@xxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <20250603-uffd-fixes-v1-3-9c638c73f047@xxxxxxxxxxxx>
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Tue, Jun 03, 2025 at 06:14:22PM -0400, Tal Zussman wrote:
UFFD_CLOEXEC, UFFD_NONBLOCK, and UFFD_FLAGS_SET have been unused since they
were added in commit 932b18e0aec6 ("userfaultfd: linux/userfaultfd_k.h").
Remove them and the associated BUILD_BUG_ON() checks.
Signed-off-by: Tal Zussman <tz2294@xxxxxxxxxxxx>
Acked-by: Peter Xu <peterx@xxxxxxxxxx>
--
Peter Xu
Return-Path: <linux-kernel+bounces-673431-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id A347441E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:18:10 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 747331896E68
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:18:21 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id CF68714EC62;
Wed, 4 Jun 2025 15:18:00 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="cifnpytl"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 195001F94A;
Wed, 4 Jun 2025 15:17:59 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749050280; cv=none; b=T/iEsI/ddt5znXUbHbyc5SMh2ObXWd0T6W9SYJKFJzAlf3d5iDYlJnz0ejOgZb1+WQ33xFwpQQAhNTZ4B6AN1rRt2d/Q9zKsS2luWaaKJ3qu98HI/WVwZtMvvkFhuw9AjvTmXkT0kSveylVhrQFZsVn92onl8ftCudVUNRsc3W8=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749050280; c=relaxed/simple;
bh=EjP0tX3z/aTAdpLBP8CzAHIQr7J/MGL6tjjJP89Xo24=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID:
MIME-Version:Content-Type; b=a1McS5mywiHYBQ09ueltECj4hqp+U2BvIe6AS1bK9c8jkEgZfGdwN47HdonsJBmK4fLErwahX6j0sF4tSSb5UB3FSXE09l0+HcKj2bO8lpQ385mJOR+B2adLou85pr7ZVVPDImqlx2HoDLHoA4kMiBUaYBQujvcsXyfEOf+HV5s=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=cifnpytl; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id E704BC4CEE4;
Wed, 4 Jun 2025 15:17:51 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749050279;
bh=EjP0tX3z/aTAdpLBP8CzAHIQr7J/MGL6tjjJP89Xo24=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
b=cifnpytlG90RGruI6sDOS7EhPallxy0BNw64RpE0xSzYWipShW0QF1ZHjyBscGuLh
k7eDwaFPh+XMIXF/iuKyEQxOH7ySWyZvdVMi+u7kNfwqdl6ObTUX4Gts59QmX3wcRh
Nncq6rP6+SIT9KRtdrDP1wIrfXFxTfXogFevDZkA1P3Hn8f18LdD+Cyb0wc1D8Tx1M
/ngsQ1Ldztt2JiQynqjsrzohetey34v53vyDSo2Eyk0rDrgydfhBNIO/+xH9EgHkaC
IwEY/TvqZ6RWa3x/ah4pnO52kMq3sYmNyRmNcS5YV9JKqnQ8kkTcMR//9MxvtKwCR6
O5z+/9CQvTBwQ==
From: Pratyush Yadav <pratyush@xxxxxxxxxx>
To: Pasha Tatashin <pasha.tatashin@xxxxxxxxxx>
Cc: pratyush@xxxxxxxxxx, jasonmiu@xxxxxxxxxx, graf@xxxxxxxxxx,
changyuanl@xxxxxxxxxx, rppt@xxxxxxxxxx, dmatlack@xxxxxxxxxx,
rientjes@xxxxxxxxxx, corbet@xxxxxxx, rdunlap@xxxxxxxxxxxxx,
ilpo.jarvinen@xxxxxxxxxxxxxxx, kanie@xxxxxxxxxxxxxxxxx,
ojeda@xxxxxxxxxx, aliceryhl@xxxxxxxxxx, masahiroy@xxxxxxxxxx,
akpm@xxxxxxxxxxxxxxxxxxxx, tj@xxxxxxxxxx, yoann.congal@xxxxxxxx,
mmaurer@xxxxxxxxxx, roman.gushchin@xxxxxxxxx, chenridong@xxxxxxxxxx,
axboe@xxxxxxxxx, mark.rutland@xxxxxxx, jannh@xxxxxxxxxx,
vincent.guittot@xxxxxxxxxx, hannes@xxxxxxxxxxx,
dan.j.williams@xxxxxxxxx, david@xxxxxxxxxx, joel.granados@xxxxxxxxxx,
rostedt@xxxxxxxxxxx, anna.schumaker@xxxxxxxxxx, song@xxxxxxxxxx,
zhangguopeng@xxxxxxxxxx, linux@xxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-doc@xxxxxxxxxxxxxxx,
linux-mm@xxxxxxxxx, gregkh@xxxxxxxxxxxxxxxxxxx, tglx@xxxxxxxxxxxxx,
mingo@xxxxxxxxxx, bp@xxxxxxxxx, dave.hansen@xxxxxxxxxxxxxxx,
x86@xxxxxxxxxx, hpa@xxxxxxxxx, rafael@xxxxxxxxxx, dakr@xxxxxxxxxx,
bartosz.golaszewski@xxxxxxxxxx, cw00.choi@xxxxxxxxxxx,
myungjoo.ham@xxxxxxxxxxx, yesanishhere@xxxxxxxxx,
Jonathan.Cameron@xxxxxxxxxx, quic_zijuhu@xxxxxxxxxxx,
aleksander.lobakin@xxxxxxxxx, ira.weiny@xxxxxxxxx,
andriy.shevchenko@xxxxxxxxxxxxxxx, leon@xxxxxxxxxx, lukas@xxxxxxxxx,
bhelgaas@xxxxxxxxxx, wagi@xxxxxxxxxx, djeffery@xxxxxxxxxx,
stuart.w.hayes@xxxxxxxxx
Subject: Re: [RFC v2 04/16] luo: luo_core: Live Update Orchestrator
In-Reply-To: <20250515182322.117840-5-pasha.tatashin@xxxxxxxxxx>
References: <20250515182322.117840-1-pasha.tatashin@xxxxxxxxxx>
<20250515182322.117840-5-pasha.tatashin@xxxxxxxxxx>
Date: Wed, 04 Jun 2025 17:17:50 +0200
Message-ID: <mafs01przv8m9.fsf@xxxxxxxxxx>
User-Agent: Gnus/5.13 (Gnus v5.13)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Thu, May 15 2025, Pasha Tatashin wrote:
Introduce LUO, a mechanism intended to facilitate kernel updates while
keeping designated devices operational across the transition (e.g., via
kexec). The primary use case is updating hypervisors with minimal
disruption to running virtual machines. For userspace side of hypervisor
update we have copyless migration. LUO is for updating the kernel.
This initial patch lays the groundwork for the LUO subsystem.
Further functionality, including the implementation of state transition
logic, integration with KHO, and hooks for subsystems and file
descriptors, will be added in subsequent patches.
Signed-off-by: Pasha Tatashin <pasha.tatashin@xxxxxxxxxx>
---
[...]
+/**
+ * luo_freeze() - Initiate the final freeze notification phase for live update.
+ *
+ * Attempts to transition the live update orchestrator state from
+ * %LIVEUPDATE_STATE_PREPARED to %LIVEUPDATE_STATE_FROZEN. This function is
+ * typically called just before the actual reboot system call (e.g., kexec)
+ * is invoked, either directly by the orchestration tool or potentially from
+ * within the reboot syscall path itself.
+ *
+ * Based on the outcome of the notification process:
+ * - If luo_do_freeze_calls() returns 0 (all callbacks succeeded), the state
+ * is set to %LIVEUPDATE_STATE_FROZEN using luo_set_state(), indicating
+ * readiness for the imminent kexec.
+ * - If luo_do_freeze_calls() returns a negative error code (a callback
+ * failed), the state is reverted to %LIVEUPDATE_STATE_NORMAL using
+ * luo_set_state() to cancel the live update attempt.
Would we end up with a more robust serialization in subsystems or
filesystems if we do not allow freeze to fail? Then they would be forced
to ensure they have everything in order by the time the system goes into
prepared state, and only need to make small adjustments in the freeze
callback.
+ *
+ * @return 0: Success. Negative error otherwise. State is reverted to
+ * %LIVEUPDATE_STATE_NORMAL in case of an error during callbacks.
+ */
+int luo_freeze(void)
+{
+ int ret;
+
+ if (down_write_killable(&luo_state_rwsem)) {
+ pr_warn("[freeze] event canceled by user\n");
+ return -EAGAIN;
+ }
+
+ if (!is_current_luo_state(LIVEUPDATE_STATE_PREPARED)) {
+ pr_warn("Can't switch to [%s] from [%s] state\n",
+ luo_state_str[LIVEUPDATE_STATE_FROZEN],
+ LUO_STATE_STR);
+ up_write(&luo_state_rwsem);
+
+ return -EINVAL;
+ }
+
+ ret = luo_do_freeze_calls();
+ if (!ret)
+ luo_set_state(LIVEUPDATE_STATE_FROZEN);
+ else
+ luo_set_state(LIVEUPDATE_STATE_NORMAL);
+
+ up_write(&luo_state_rwsem);
+
+ return ret;
+}
[...]
--
Regards,
Pratyush Yadav
Return-Path: <linux-kernel+bounces-673432-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id A3F1241E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:18:20 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id A86DB16F6DC
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:18:21 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 8DB27197A6C;
Wed, 4 Jun 2025 15:18:04 +0000 (UTC)
Received: from foss.arm.com (foss.arm.com [217.140.110.172])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 44D911917F1;
Wed, 4 Jun 2025 15:18:01 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749050284; cv=none; b=NYB6FLCzBhJ9lJKYBXd4NX02x8gCuXMfAAMJJ9gl9UUusHvasZ/RHJmSUjmGitBMd5d0/7cF2c96wAx8kwzLOTkF89m3Nl/x0JNlDzpUrhm+F9bdHjW2Xi4+pF+Si+qqYPR5SMB+vAZCMQS6HBMZy+4n3VmY32qFr+Mq+ETGltQ=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749050284; c=relaxed/simple;
bh=s5zmxv3LU0w+4sopd0Re0HC/bbjNa73HY3q0HOETc+s=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=qscfGIBr5oIVE0VSwq1OGnGPFJ7IBGYMAF4zP0/DCLgd0BIargl4QVn+Kf9pD2QQPdc3ZB+Djyb0h3vcyWXCF7TWCX15POY90TROWzRTeAUmFB9ceKf3oS5aQbnuSo1e1FaJixQqsT0gaH+U68Dm2k+c2ANZeYl5Rmedy4UHyxY=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com
Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14])
by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3D9601758;
Wed, 4 Jun 2025 08:17:44 -0700 (PDT)
Received: from localhost (e132581.arm.com [10.1.196.87])
by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id EAB493F59E;
Wed, 4 Jun 2025 08:18:00 -0700 (PDT)
Date: Wed, 4 Jun 2025 16:17:56 +0100
From: Leo Yan <leo.yan@xxxxxxx>
To: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Yeoreum Yun <yeoreum.yun@xxxxxxx>, mingo@xxxxxxxxxx, mingo@xxxxxxxxxx,
acme@xxxxxxxxxx, namhyung@xxxxxxxxxx, mark.rutland@xxxxxxx,
alexander.shishkin@xxxxxxxxxxxxxxx, jolsa@xxxxxxxxxx,
irogers@xxxxxxxxxx, adrian.hunter@xxxxxxxxx,
kan.liang@xxxxxxxxxxxxxxx, linux-perf-users@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, David Wang <00107082@xxxxxxx>
Subject: Re: [PATCH 1/1] perf/core: fix dangling cgroup pointer in cpuctx
Message-ID: <20250604151756.GD8020@xxxxxxxxxxxxxxx>
References: <20250602184049.4010919-1-yeoreum.yun@xxxxxxx>
<20250603140040.GB8020@xxxxxxxxxxxxxxx>
<20250603144414.GC38114@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
<20250604080339.GB35970@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
<20250604101821.GC8020@xxxxxxxxxxxxxxx>
<20250604135801.GK38114@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20250604135801.GK38114@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
X-Spam-Status: No, score=-3.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 03:58:01PM +0200, Peter Zijlstra wrote:
On Wed, Jun 04, 2025 at 11:18:21AM +0100, Leo Yan wrote:
> Totally agree. The comment would be very useful!
I have the below. Let me go read your email in more than 2 seconds to
see if I should amend things.
I'm not sure doing the INACTIVE->INACTIVE cycle in the ASCII art is
going to make it clearer, might leave that off. But yeah, possible.
---
Subject: perf: Add comment to enum perf_event_state
From: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Date: Wed Jun 4 10:21:38 CEST 2025
Better describe the event states.
Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
---
include/linux/perf_event.h | 42 ++++++++++++++++++++++++++++++++++++++++--
1 file changed, 40 insertions(+), 2 deletions(-)
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -635,8 +635,46 @@ struct perf_addr_filter_range {
unsigned long size;
};
-/**
- * enum perf_event_state - the states of an event:
+/*
+ * The normal states are:
+ *
+ * ACTIVE --.
+ * ^ |
+ * | |
+ * sched_{in,out}() |
+ * | |
+ * v |
+ * ,---> INACTIVE --+ <-.
+ * | | |
+ * | {dis,en}able()
+ * sched_in() | |
+ * | OFF <--' --+
+ * | |
+ * `---> ERROR ------'
+ *
+ * That is:
+ *
+ * sched_in: INACTIVE -> {ACTIVE,ERROR}
+ * sched_out: ACTIVE -> INACTIVE
+ * disable: {ACTIVE,INACTIVE} -> OFF
+ * enable: {OFF,ERROR} -> INACTIVE
+ *
+ * Where {OFF,ERROR} are disabled states.
+ *
+ * Then we have the {EXIT,REVOKED,DEAD} states which are various shades of
+ * defunct events:
+ *
+ * - EXIT means task that the even was assigned to died, but child events
+ * still live, and further children can still be created. But the event
+ * itself will never be active again. It can only transition to
+ * {REVOKED,DEAD};
+ *
+ * - REVOKED means the PMU the event was associated with is gone; all
+ * functionality is stopped but the event is still alive. Can only
+ * transition to DEAD;
+ *
+ * - DEAD event really is DYING tearing down state and freeing bits.
+ *
LGTM:
Reviewed-by: Leo Yan <leo.yan@xxxxxxx>
*/
enum perf_event_state {
PERF_EVENT_STATE_DEAD = -5,
Return-Path: <linux-kernel+bounces-673433-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 9991141E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:19:30 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 951191897567
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:19:42 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 87842158DA3;
Wed, 4 Jun 2025 15:19:20 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="R57Y0X2g"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id CA4C42F56;
Wed, 4 Jun 2025 15:19:19 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749050359; cv=none; b=fmcnJU0rUG5wAiaAIpBdGHpfx60dSoSKUs2JoXNRRyEOwyD5xyhkO9tFaQaEOlBfepg4i+rj2wucbdf0wa7nABUcU9lEnTAlogu59497a6B3rs3GodIm0mm9L1QjYp3f65iaaOD1i67NQB+L/EB+rTMfI/Vxb/drjnQdJv704Us=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749050359; c=relaxed/simple;
bh=F5H+kEb4qmnHuAE7ZDH5mZyO1eDuOcngv0I1ktHsl7k=;
h=Message-ID:Date:MIME-Version:Subject:To:References:From:
In-Reply-To:Content-Type; b=OtlAbbc220TxnwbcwIK9kU/tNZitk9LyhznNjvTRUHOJZoDYlLDGBPUXDVHlX/f5OwvLJJPO8GZgEp7NTIYD3zlHW3JFDUw24ikcw9a7P4DfiRX4gHPcQc5RFBZZtxKh84NX2VN/c1RrPbkzw5TIW3WRdELYPhZVYujsePIBOhA=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=R57Y0X2g; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id B084DC4CEE4;
Wed, 4 Jun 2025 15:19:16 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749050359;
bh=F5H+kEb4qmnHuAE7ZDH5mZyO1eDuOcngv0I1ktHsl7k=;
h=Date:Subject:To:References:From:In-Reply-To:From;
b=R57Y0X2g/XsqFKtG2NT6XPCygBiTqilUdCdksF08H0AZ3SyVxDMJLj1XON+7Yz0oE
FSCfAfQrYazhHLWDKq/YqtZ7uRzjqt+ArBQadROON8lHHiBGoKGL9OaeE5TH/8Py//
JGCZCKcb+l0cz35o8LV9Wur0xgqggn53+Shw5qQA9WKO+OjYFzsjSwx5tbGkhtceyj
I9FcdsQ8NdWe9Ayc1HZUSQnbmzNrClSqLgkFOV8N7ZKpWUaQRgT/kdUTwYL5tg7T8l
UetSlbtE06pUYM++2hcammzC5lxjP7g9kusnaywf85OGz/3wmvri/lzh8L0ROga0SR
SRtOQbJl7ThZA==
Message-ID: <e27f3ea6-943d-4d78-b4d6-85d0dd521fe7@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 17:19:14 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v2 1/2] dt-bindings: mailbox: Add ASPEED AST2700 series
SoC
To: Jammy Huang <jammy_huang@xxxxxxxxxxxxxx>, jassisinghbrar@xxxxxxxxx,
robh@xxxxxxxxxx, krzk+dt@xxxxxxxxxx, conor+dt@xxxxxxxxxx, joel@xxxxxxxxx,
andrew@xxxxxxxxxxxxxxxxxxxx, devicetree@xxxxxxxxxxxxxxx,
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-aspeed@xxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
References: <20250604125558.1614523-1-jammy_huang@xxxxxxxxxxxxxx>
<20250604125558.1614523-2-jammy_huang@xxxxxxxxxxxxxx>
From: Krzysztof Kozlowski <krzk@xxxxxxxxxx>
Content-Language: en-US
Autocrypt: addr=krzk@xxxxxxxxxx; keydata=
xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79
cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu
JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH
gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE
J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj
NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS
BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU
vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM
Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BIfXXfC68nMp9BZoy3So4ZsbOlBmtAPvMYX6U8VwD
TNeBxJu5Ex0Izf1NV9CzC3nNaFUYOY8KfN01X5SExAoVTr09ewARAQABzSVLcnp5c3p0b2Yg
S296bG93c2tpIDxrcnprQGtlcm5lbC5vcmc+wsGVBBMBCgA/AhsDBgsJCAcDAgYVCAIJCgsE
FgIDAQIeAQIXgBYhBJvQfg4MUfjVlne3VBuTQ307QWKbBQJoF1BKBQkWlnSaAAoJEBuTQ307
QWKbHukP/3t4tRp/bvDnxJfmNdNVn0gv9ep3L39IntPalBFwRKytqeQkzAju0whYWg+R/rwp
+r2I1Fzwt7+PTjsnMFlh1AZxGDmP5MFkzVsMnfX1lGiXhYSOMP97XL6R1QSXxaWOpGNCDaUl
ajorB0lJDcC0q3xAdwzRConxYVhlgmTrRiD8oLlSCD5baEAt5Zw17UTNDnDGmZQKR0fqLpWy
786Lm5OScb7DjEgcA2PRm17st4UQ1kF0rQHokVaotxRM74PPDB8bCsunlghJl1DRK9s1aSuN
hL1Pv9VD8b4dFNvCo7b4hfAANPU67W40AaaGZ3UAfmw+1MYyo4QuAZGKzaP2ukbdCD/DYnqi
tJy88XqWtyb4UQWKNoQqGKzlYXdKsldYqrLHGoMvj1UN9XcRtXHST/IaLn72o7j7/h/Ac5EL
8lSUVIG4TYn59NyxxAXa07Wi6zjVL1U11fTnFmE29ALYQEXKBI3KUO1A3p4sQWzU7uRmbuxn
naUmm8RbpMcOfa9JjlXCLmQ5IP7Rr5tYZUCkZz08LIfF8UMXwH7OOEX87Y++EkAB+pzKZNNd
hwoXulTAgjSy+OiaLtuCys9VdXLZ3Zy314azaCU3BoWgaMV0eAW/+gprWMXQM1lrlzvwlD/k
whyy9wGf0AEPpLssLVt9VVxNjo6BIkt6d1pMg6mHsUEVzsFNBFVDXDQBEADNkrQYSREUL4D3
Gws46JEoZ9HEQOKtkrwjrzlw/tCmqVzERRPvz2Xg8n7+HRCrgqnodIYoUh5WsU84N03KlLue
MNsWLJBvBaubYN4JuJIdRr4dS4oyF1/fQAQPHh8Thpiz0SAZFx6iWKB7Qrz3OrGCjTPcW6ei
OMheesVS5hxietSmlin+SilmIAPZHx7n242u6kdHOh+/SyLImKn/dh9RzatVpUKbv34eP1wA
GldWsRxbf3WP9pFNObSzI/Bo3kA89Xx2rO2roC+Gq4LeHvo7ptzcLcrqaHUAcZ3CgFG88CnA
6z6lBZn0WyewEcPOPdcUB2Q7D/NiUY+HDiV99rAYPJztjeTrBSTnHeSBPb+qn5ZZGQwIdUW9
YegxWKvXXHTwB5eMzo/RB6vffwqcnHDoe0q7VgzRRZJwpi6aMIXLfeWZ5Wrwaw2zldFuO4Dt
91pFzBSOIpeMtfgb/Pfe/a1WJ/GgaIRIBE+NUqckM+3zJHGmVPqJP/h2Iwv6nw8U+7Yyl6gU
BLHFTg2hYnLFJI4Xjg+AX1hHFVKmvl3VBHIsBv0oDcsQWXqY+NaFahT0lRPjYtrTa1v3tem/
JoFzZ4B0p27K+qQCF2R96hVvuEyjzBmdq2esyE6zIqftdo4MOJho8uctOiWbwNNq2U9pPWmu
4vXVFBYIGmpyNPYzRm0QPwARAQABwsF8BBgBCgAmAhsMFiEEm9B+DgxR+NWWd7dUG5NDfTtB
YpsFAmgXUF8FCRaWWyoACgkQG5NDfTtBYptO0w//dlXJs5/42hAXKsk+PDg3wyEFb4NpyA1v
qmx7SfAzk9Hf6lWwU1O6AbqNMbh6PjEwadKUk1m04S7EjdQLsj/MBSgoQtCT3MDmWUUtHZd5
RYIPnPq3WVB47GtuO6/u375tsxhtf7vt95QSYJwCB+ZUgo4T+FV4hquZ4AsRkbgavtIzQisg
Dgv76tnEv3YHV8Jn9mi/Bu0FURF+5kpdMfgo1sq6RXNQ//TVf8yFgRtTUdXxW/qHjlYURrm2
H4kutobVEIxiyu6m05q3e9eZB/TaMMNVORx+1kM3j7f0rwtEYUFzY1ygQfpcMDPl7pRYoJjB
dSsm0ZuzDaCwaxg2t8hqQJBzJCezTOIkjHUsWAK+tEbU4Z4SnNpCyM3fBqsgYdJxjyC/tWVT
AQ18NRLtPw7tK1rdcwCl0GFQHwSwk5pDpz1NH40e6lU+NcXSeiqkDDRkHlftKPV/dV+lQXiu
jWt87ecuHlpL3uuQ0ZZNWqHgZoQLXoqC2ZV5KrtKWb/jyiFX/sxSrodALf0zf+tfHv0FZWT2
zHjUqd0t4njD/UOsuIMOQn4Ig0SdivYPfZukb5cdasKJukG1NOpbW7yRNivaCnfZz6dTawXw
XRIV/KDsHQiyVxKvN73bThKhONkcX2LWuD928tAR6XMM2G5ovxLe09vuOzzfTWQDsm++9UKF a/A=
In-Reply-To: <20250604125558.1614523-2-jammy_huang@xxxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 04/06/2025 14:55, Jammy Huang wrote:
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+ mailbox@12c1c200 {
+ compatible = "aspeed,ast2700-mailbox";
+ reg = <0x0 0x12c1c200 0x0 0x200>;
Last time I asked to test, you responded you will test. What happened?
You did not test. This is just disappointing.
Best regards,
Krzysztof
Return-Path: <linux-kernel+bounces-673434-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 641AA41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:21:27 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id A9E017A74DF
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:20:05 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 972F8187554;
Wed, 4 Jun 2025 15:21:15 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="drLspXgF"
Received: from mail-yb1-f169.google.com (mail-yb1-f169.google.com [209.85.219.169])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5F795143748;
Wed, 4 Jun 2025 15:21:13 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.169
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749050474; cv=none; b=c9CIeTWMWWHgags5OlereXzWr/job+CFHy7rGpIl32A9/pfRCefQSVOTQTl7sghrcNT56N6D8Og66zUeumgc4+ukwCJ1P/DnCFPoo94A18l81Vux0dzN9vo9xWST8SMYKUZB9FwzbIRSLrOIurpzhMHEc2HR9Fj6yCb3tHGSR0w=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749050474; c=relaxed/simple;
bh=owjnO9VvFJBs4z0MLcAItFN+hb71KXnPMbLj2c7IwHQ=;
h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
To:Cc:Content-Type; b=K9gDpiYAHnTa2IduRWgTbVfRvZ3QLirl5F6fg7v9KmV8zNaN1NtkooyB1ehddGDwcWH6zyKKPtDpIWRd7v729SthEESo/LefR6p4NGvLpOUK0QURmfZ0yDWuS5b6hSHN4Yh9ULvKERjMwDv/vbijQ61hC3FxSF3ViEJVg3CWTPg=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=drLspXgF; arc=none smtp.client-ip=209.85.219.169
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
Received: by mail-yb1-f169.google.com with SMTP id 3f1490d57ef6-e8175f45e26so1492066276.1;
Wed, 04 Jun 2025 08:21:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1749050472; x=1749655272; darn=vger.kernel.org;
h=cc:to:subject:message-id:date:from:in-reply-to:references
:mime-version:from:to:cc:subject:date:message-id:reply-to;
bh=wC7mKSrr4kiaf3UIcJvhXmaBddWPavsd+lLtVOh+oBA=;
b=drLspXgFdBpM2cbRuMGBPGKelh4KKepWJKqGw/HZDIqGhYx/miz5qXQI6hPaP1WcLs
GvDuGO677YmbZ0a8LfvmVNjjyvR76C0KcCSIwpJFum/47f+nen8XVUbB6eHIqyYyQIxm
hqbhHbvySQpC3YgkVMAHmQr3XgQvSRWuFhK4kHmeJ0EhHM5VyGZp7Dp0lS0mwWZ07+2y
Q9UzWYYdTR1r8Joxulym5teTmFcyZOhNEHR74dkhKp0zMfzjHS6ZItaM7tKRJhgBelF4
SWShyBbVbY+CCnuNYiuQbOurYk7EL9PFLQQfnRH/4LyFYXs6tdUt7IuJSGMGVwx7D1pv
oFxg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749050472; x=1749655272;
h=cc:to:subject:message-id:date:from:in-reply-to:references
:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=wC7mKSrr4kiaf3UIcJvhXmaBddWPavsd+lLtVOh+oBA=;
b=kp2BtT1PWSwivtMRitdxN7Cq2GP67/bDf4MAs4LocHHs0/pr43bjwLE1sQ+q5qbOPW
Rtut+vl8IibGTKYjogY6auFyONScLCsIDueylDWr0P6vndVzVljL6YUNLt7LqHk/3CTR
MwM2rPGEkDwFZGJnW/BIOFcQBDq66i6reZdIVnfwSFk6tGKuOUdQkLvd+UcINCNdpBN3
4s6xc0OjHYgpcG2ssysUHbxPF3p4xQCNtDJbBnChtqsHNsMRBZHC/mk8XIQ+mGaINBzx
IluDGBCZGJrtzZtMNK3TahukDfTuo9qc9efXHqLC7KlXNaZBg8LvhojLiTJpnlWbUf0A
xucA==
X-Forwarded-Encrypted: i=1; AJvYcCUMBscKlhwnaQCMwR6QtICRtXwEXL5xqbLarhgtrMj5pGLrLxkHrOzAc+nVQ9QBP/7Etdyhkk4PDGoph3U=@vger.kernel.org
X-Gm-Message-State: AOJu0Yx1E+xVHN+fAE/MZ//teKPRhq2lUaMYSvSwdmV9zwPyB6IlM6Uf
X5faKxfIV8m5OFQvU6alGDSqMbTPPwqSGn7Teg73UltSmcoFYr8o0EXov3HD1TcEgoqlwESM9GY
TFkbOWrrV2hqbnQNMZswzFfZPfpueD/y0vytSvB4=
X-Gm-Gg: ASbGncvazsVKFh6jWHytG/iMsKrG92bK70M5vJAbftgaY1qLOeg7Shci4yVOjU9wQo2
FB2WT1INUhpsTM0jhOfwx4IsDHGSuq0k53GuPbzN2jSnS4nZ8AM6YTGqaN/1vJVn1tF+hRsd2Tb
0LdY2mwWb2D0dmRD7X6yEfTmRiciz6Kgw=
X-Google-Smtp-Source: AGHT+IGREyE12fbHjJBCwDCkpDdLrlnY34Qx31wboQATvSL9xppWlFT+MzuRD7abZcfpqgHcsVZXAPbDl5OG9kjk1cs=
X-Received: by 2002:a05:6902:2102:b0:e7d:6d7c:c33e with SMTP id
3f1490d57ef6-e8179da11c7mr3933634276.44.1749050472139; Wed, 04 Jun 2025
08:21:12 -0700 (PDT)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
References: <20250603221416.74523-1-stefano.radaelli21@xxxxxxxxx>
<54c4a279-a528-4657-8319-c9374add54b7@xxxxxxx> <CAK+owoihxp-2xAvFfVthvNELshti_3V-pFgD7D7jzd1XqiLgGQ@xxxxxxxxxxxxxx>
<d5f891d7-d24a-4f85-b59d-313b925c4495@xxxxxxx> <CAK+owog69JktbsBhHZj7ULYXmH_bZ-CO8=QEMqBVc0mjp8jz6g@xxxxxxxxxxxxxx>
<1d755cbf-4dee-4784-98b7-e72061219e3f@xxxxxxx>
In-Reply-To: <1d755cbf-4dee-4784-98b7-e72061219e3f@xxxxxxx>
From: Stefano Radaelli <stefano.radaelli21@xxxxxxxxx>
Date: Wed, 4 Jun 2025 17:20:56 +0200
X-Gm-Features: AX0GCFssVbXWXo-ClT4FiYIScIddnBW-kBko0Lugw34l6NVIDWlAS9mHkPVmzfg
Message-ID: <CAK+owog-Mipq2Oc0=gd8+LziHmVUrC5R7HidYYZWu9_AWu02TA@xxxxxxxxxxxxxx>
Subject: Re: [v1] arm64: dts: freescale: imx93-var-som: update eqos support
for MaxLinear PHY
To: Andrew Lunn <andrew@xxxxxxx>
Cc: devicetree@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
Rob Herring <robh@xxxxxxxxxx>, Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>,
Shawn Guo <shawnguo@xxxxxxxxxx>, Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>,
Pengutronix Kernel Team <kernel@xxxxxxxxxxxxxx>, Fabio Estevam <festevam@xxxxxxxxx>, imx@xxxxxxxxxxxxxxx,
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
Content-Type: text/plain; charset="UTF-8"
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hi Andrew,
Absolutely, thanks again for pointing this out! I'm actually glad you asked,
because it pushed me to double-check internally with our hardware team
and confirm the exact implementation details.
I'll make sure to include a proper comment in the device tree right above the
'phy-mode = "rgmii";' line in v2, clearly stating that the RGMII delays are
handled via fixed passive components on the SOM's PCB itself, with no
software or strap-based configuration involved.
Thanks again,
Stefano
Il giorno mer 4 giu 2025 alle ore 17:13 Andrew Lunn <andrew@xxxxxxx> ha scritto:
On Wed, Jun 04, 2025 at 03:08:09PM +0200, Stefano Radaelli wrote:
> Hi Andrew,
>
> To clarify more precisely: hw team told me that the required 2 ns
> RGMII delays are
> implemented directly in hardware inside the SOM itself, through passive delay
> elements (filters) placed on the RX and TX lines. There is no reliance on PHY
> strap settings or any kind of delay configuration via registers.
>
> This means:
> - The delays are fixed and cannot be changed via software.
> - From the point of view of any carrier board, the interface is
> already timing-compliant.
Great. Please add a comment in the DT explaining this. 99% of the time
'rgmii' is wrong, but this is the 1%. We should make it clear this is
not just another cut/paste error, but very intentional and correct
because of the PCB design.
There is a patch to checkpatch.pl i want to introduce in the next
development cycle which will look for 'rgmii', and if found, look on
the line before for a comment including the word 'PCB'. If it finds
'rgmii' without such a comment it will issue a warning. So it would be
nice to avoid that in your correct case.
Andrew
Return-Path: <linux-kernel+bounces-673435-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 2F25A41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:23:35 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 0F3CD7A227E
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:22:13 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 93B7B19309C;
Wed, 4 Jun 2025 15:23:17 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b="FrpnwNfA"
Received: from mail.zytor.com (terminus.zytor.com [198.137.202.136])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id BFDE32F56;
Wed, 4 Jun 2025 15:23:14 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.136
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749050596; cv=none; b=m3xUZzLG/KKbuUk0A3a4NIIiQFEDDd4KKB4PXMd19xKb3s8V0rIIGy+ESEfU+PiIReSfrgGdZ6Su5rkC5gogY5Ou+UnE8NvWbJzMRl3guy49AAzZU6ccIXa+grsO8Qtq/1DKwbtIQFlAbUO4oNYnb2UQsCTH+eiDrHGsMJNaC8E=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749050596; c=relaxed/simple;
bh=+lJcxQsjxseXi30qNXRxLB/y4R9OszpeMs9veRimWYg=;
h=Date:From:To:CC:Subject:In-Reply-To:References:Message-ID:
MIME-Version:Content-Type; b=S3EuJH0cFS3iFjGR8OuOEgU1Yva3OFQxtqD1qtiKSdwnDPWYCXuFKJ6JXuZKy82LRxvaAlYI6YckCIkndnOBRobAvYtkJgO1OpttS6MIjKD9yVFc3rQZ8RB6MsazK5GeWr4ie2kTklh1NV3HgHFNM7ikjax95iCc+lxWw51VPWY=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com; spf=pass smtp.mailfrom=zytor.com; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b=FrpnwNfA; arc=none smtp.client-ip=198.137.202.136
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zytor.com
Received: from [127.0.0.1] (c-76-133-66-138.hsd1.ca.comcast.net [76.133.66.138])
(authenticated bits=0)
by mail.zytor.com (8.18.1/8.17.1) with ESMTPSA id 554FMJIY076049
(version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO);
Wed, 4 Jun 2025 08:22:20 -0700
DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 554FMJIY076049
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com;
s=2025052101; t=1749050541;
bh=NH2ltXtujZBqPJip4ancgNjYxroWFHWZyGX2p6NKPXc=;
h=Date:From:To:CC:Subject:In-Reply-To:References:From;
b=FrpnwNfA/rikkJwUqKavu+F3qP9DFDYIsBfs2A92z5aoMEvnWjkzfYojMhs98JXRn
coeiXRhu75/wIJvdUSGvYY6BwK9I1KouJwNAN9odFoW5uUFHS1MptMWQREGT0rX2f8
f6g6Q+cKIDEwQr8ORjzbF/t8oAIDaV9I+VMh75ax64t/EXUvl1y9/YnGNaWTT3lOUj
2eXE0GUVgUxeIwkM/KBWkZkei92+bxbvFBLoD15xH8xydiCwjaggxg4UL8HaEoDOUz
9ubB5Ku2C0uIWI1JSB4rzj+lfkQJeNqgS7twCkpv4PK+6euX/WeKwfNCvb4OXiSErp
ZqMFdhLraiD6A==
Date: Wed, 04 Jun 2025 08:22:19 -0700
From: "H. Peter Anvin" <hpa@xxxxxxxxx>
To: Dave Hansen <dave.hansen@xxxxxxxxx>, Sohil Mehta <sohil.mehta@xxxxxxxxx>,
x86@xxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
CC: Xin Li <xin@xxxxxxxxx>, Andy Lutomirski <luto@xxxxxxxxxx>,
Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>,
Borislav Petkov <bp@xxxxxxxxx>,
Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>,
Peter Zijlstra <peterz@xxxxxxxxxxxxx>,
Sean Christopherson <seanjc@xxxxxxxxxx>,
Adrian Hunter <adrian.hunter@xxxxxxxxx>,
Kan Liang <kan.liang@xxxxxxxxxxxxxxx>, Tony Luck <tony.luck@xxxxxxxxx>,
Zhang Rui <rui.zhang@xxxxxxxxx>, Steven Rostedt <rostedt@xxxxxxxxxxx>,
Andrew Cooper <andrew.cooper3@xxxxxxxxxx>,
"Kirill A . Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx>,
Jacob Pan <jacob.pan@xxxxxxxxxxxxxxxxxxx>,
Andi Kleen <ak@xxxxxxxxxxxxxxx>, Kai Huang <kai.huang@xxxxxxxxx>,
Sandipan Das <sandipan.das@xxxxxxx>, linux-perf-users@xxxxxxxxxxxxxxx,
linux-edac@xxxxxxxxxxxxxxx, kvm@xxxxxxxxxxxxxxx,
linux-pm@xxxxxxxxxxxxxxx, linux-trace-kernel@xxxxxxxxxxxxxxx
Subject: Re: [PATCH v6 4/9] x86/nmi: Assign and register NMI-source vectors
User-Agent: K-9 Mail for Android
In-Reply-To: <e978e1fb-d88e-4789-bd33-367281dfa0ad@xxxxxxxxx>
References: <20250513203803.2636561-1-sohil.mehta@xxxxxxxxx> <20250513203803.2636561-5-sohil.mehta@xxxxxxxxx> <e978e1fb-d88e-4789-bd33-367281dfa0ad@xxxxxxxxx>
Message-ID: <31DB6043-44B2-43C1-B312-9B0DEC23C500@xxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain;
charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On June 3, 2025 10:23:42 AM PDT, Dave Hansen <dave=2Ehansen@intel=2Ecom> wr=
ote:
On 5/13/25 13:37, Sohil Mehta wrote:
=2E=2E=2E
+ * Vector 2 is reserved for external NMIs related to the Local APIC -
+ * LINT1=2E Some third-party chipsets may send NMI messages with a
+ * hardcoded vector of 2, which would result in bit 2 being set in the
+ * NMI-source bitmap=2E
This doesn't actually say what problem this causes=2E Is this better?
Third-party chipsets send NMI messages with a fixed vector of 2=2E
Using vector 2 for some other purpose would cause confusion
between those Local APIC messages and the other purpose=2E Avoid
using it=2E
+ * The vectors are in no particular priority order=2E Add new vector
+ * assignments sequentially in the list below=2E
+ */
+#define NMIS_VECTOR_NONE 0 /* Reserved - Set for all unidentified sour=
ces */
+#define NMIS_VECTOR_TEST 1 /* NMI selftest */
+#define NMIS_VECTOR_EXTERNAL 2 /* Reserved - Match External NMI vector=
2 */
+#define NMIS_VECTOR_SMP_STOP 3 /* Panic stop CPU */
+#define NMIS_VECTOR_BT 4 /* CPU backtrace */
+#define NMIS_VECTOR_KGDB 5 /* Kernel debugger */
+#define NMIS_VECTOR_MCE 6 /* MCE injection */
+#define NMIS_VECTOR_PMI 7 /* PerfMon counters */
+
+#define NMIS_VECTORS_MAX 16 /* Maximum number of NMI-source vectors */
Would an enum fit here?
You could also add a:
NMIS_VECTOR_COUNT
as the last entry and then just:
BUILD_BUG_ON(NMIS_VECTOR_COUNT >=3D 16);
somewhere=2E
I guess it's a little annoying that you need NMIS_VECTOR_EXTERNAL to
have a fixed value of 2, but I do like way the enum makes the type explic=
it=2E
static int __init register_nmi_cpu_backtrace_handler(void)
{
- register_nmi_handler(NMI_LOCAL, nmi_cpu_backtrace_handler, 0, "arch_b=
t", 0);
+ register_nmi_handler(NMI_LOCAL, nmi_cpu_backtrace_handler, 0, "arch_b=
t", NMIS_VECTOR_BT);
return 0;
}
=2E=2E=2E Oh you replaced _most_ of the random 0's in this patch=2E That =
helps
for sure=2E
The "may" here is important=2E *Most* sources are expected to send these a=
s either a programmable MSI or as LINT1, which is programmable in the APIC,=
but since the vector hasn't mattered, we can't rule out that some hardware=
might have been built to send an MSI with a hard-coded vector, in which ca=
se it is most likely they send either 0, 2 or 255=2E 0 and 255 will set the=
unknown source bit (0), but 2 is a legitimate source so it is defensive pr=
ogramming to leave it fallow=2E
Note also that although the current implementation is limited to 15 source=
s (+ the unknown/lost source bit), the architecture allows for up to 63=2E
Return-Path: <linux-kernel+bounces-673436-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id BB10141E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:26:01 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id B31A93A87B6
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:25:39 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 1F1B418DF8D;
Wed, 4 Jun 2025 15:25:49 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="XVbZLGlz"
Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1940A187554
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:25:45 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.45
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749050748; cv=none; b=QJjoo4Qjz0PHTtQCfmNMpZer+joRIT9yxsLfvVNC8/JK+kD45QXhREnX7ZlgkNQmHwc9Kvzbn5/1cdK0hzKCymtcwnWgaBmW71g7fOtSNHHXxMtSBZCigf8Q9iY6pITvCYeFenaJgnRmJjydJkMY/tz3Ufcg/9rpnNxKc362PUk=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749050748; c=relaxed/simple;
bh=isbY6m5bcY7s9P8U97tjZbqw2x3Sh9LSh6vgbTeTAd4=;
h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=Y2NHKeJ3W94/LoKrGdaYxl3gXEDd92A3WVGsRvjywUAIwCuzMBCkkNfaLqVfGdZVesvbSQ2Neepy4zfeEG1tqu/90v4y7DfXr8dGxq5HXAgoK+JR+MenkRIdynEQj+vNVK9iqFB6BlTypTG4mbpQFPlZ7B20+fAMldwMn/btweM=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=XVbZLGlz; arc=none smtp.client-ip=209.85.208.45
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org
Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-6020ff8d54bso12822691a12.2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 08:25:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=linaro.org; s=google; t=1749050744; x=1749655544; darn=vger.kernel.org;
h=cc:to:content-transfer-encoding:mime-version:message-id:date
:subject:from:from:to:cc:subject:date:message-id:reply-to;
bh=+Mjo0DOx9z6CkyXriQUpR9DCtiHO7VQ4yQ7cb2Q1zps=;
b=XVbZLGlzRXRSfsnJMhZMh8/2nCcbPsq7nXU3E3x1R0OsodCLV0uCNaGw65o9Dywc6h
3TFfECaNambjRaD3DB+XlmEZGgbmugpV/SZEBRL6GVso4QoXcYwhUnlmJTGjIrzi3bcR
jngPlvdL+2dpt3Gb96E7ZP+iXaLyp+uG5ZUs8l/WhMH8Bm9d3UDSL3RttaXC3wq1bGuD
S/5dTn6iXCld9OFfj+Qr8CGuE1I8RgMJ6mzHdhF82wLaA8oNJAVBkrsDZZVlNALajcnG
dsnHR6Ql/h5QLT3lJamlIgLMiLwY+AaK3rWENfXTjpve0WRzD1dyq1nXa5SwccW6kvLc
uVYA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749050744; x=1749655544;
h=cc:to:content-transfer-encoding:mime-version:message-id:date
:subject:from:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=+Mjo0DOx9z6CkyXriQUpR9DCtiHO7VQ4yQ7cb2Q1zps=;
b=evmVKq2TRPvjM5HUd+1EsqCPwtiyEzCrpK/ChfbxdNLVbmU2VVkHNVqQ6Ab5ZOKjuP
SjKcV/RgKg29FwvzXyb/Q2Tb5GtbEU5OLyMY46LZghelAU67/D/ACpYOrsxHQzPWSNE9
zk7XGQyFCHLMD+fStl5rOxLHFS9u+dIOws4pGN4uA/HJCU6T6AUea0onAyR+WUG23Pzn
VF/CqDsnUjRCqO/1q9Xn0LTdqTTFBDM7CzCf6F+mgfSpNHNFpLvR6m58ocUXShvSTK9J
ziECBDK+cHJbnQUg4W7FM+JCSMeWOFtBLVWt0BbfYcighLjd9MX/Px6lKYcSJ96JsGh8
T1qA==
X-Forwarded-Encrypted: i=1; AJvYcCU+ov4LvVDDMrVYpzuaoihLfVfcIU9GjXzFqlnjQhcnmiYuq6636DyZl5L1Vd3K2FoEw2h3YVS0/Ad9tQg=@vger.kernel.org
X-Gm-Message-State: AOJu0YyNAzQOvRM7Jh2ymRa+YdFlH1EpWMcTZOBZmrC/wHmD5wDNc5xK
B/iC/IJsxguWEpEN8y+l6ptOR6wPvYcc86fU/EZiCKUIkvykjhriH/KJb+4E/FnbIpQ=
X-Gm-Gg: ASbGncuJIGvNX9/bOLQkto3qQBYFs8fCFM0l+3INl/CQT29xBKv5YLH9CyQhUSo4PvS
vMBTz9VhpIjH8Fa9GYjm3/8Eb7ME0/oPlUNlL74vSYr1Hl2UJTyQyOZufzLAsfvndgiOdXcuLwJ
eWHlk6ZrKI34nQrrC0u3XjJRFM2lrnNcFeNGjAycbcilLBER/nlilJBjAh+f8rsVtWSfDTjPrfc
aefa4JxfI9KPkQ5jOpOtSa9IbIsYw9EfWAJPf/B6wew1TJiAOVAZ/BX+5kPGweeaiLMARZcCGnc
YBv8N+orJjURmvN/0aIzq9uU+yO7bxrpxvOCxfYlRIYwstzBUMd8anAUBumid3YEjCPKHq2vgtF
2mS5zz9ulgpvgQB2aEUtoiZ+4eFG8IGJvz7M=
X-Google-Smtp-Source: AGHT+IEsfd6MId7vxmTr6lUOonqiY+rpdnb7nQfDQA/Fz1+gfc7G0MeiG2xYshTRerLuSnxWlq43jg==
X-Received: by 2002:a05:6402:35d0:b0:601:fcc7:4520 with SMTP id 4fb4d7f45d1cf-606e944f274mr3150956a12.4.1749050744290;
Wed, 04 Jun 2025 08:25:44 -0700 (PDT)
Received: from puffmais.c.googlers.com (140.20.91.34.bc.googleusercontent.com. [34.91.20.140])
by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-606ed984f63sm1051640a12.58.2025.06.04.08.25.43
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 08:25:43 -0700 (PDT)
From: =?utf-8?q?Andr=C3=A9_Draszik?= <andre.draszik@xxxxxxxxxx>
Subject: [PATCH 00/17] Samsung S2MPG10 regulator and S2MPG11 PMIC drivers
Date: Wed, 04 Jun 2025 16:25:39 +0100
Message-Id: <20250604-s2mpg1x-regulators-v1-0-6038740f49ae@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
X-B4-Tracking: v=1; b=H4sIAHNlQGgC/x3MSQqAMAxA0atI1hbaOnsVcVE11oATiYog3t3i8
i3+f0CQCQXq6AHGi4S2NcDEEfSTWz0qGoLBapvpXCdK7LJ7cytGf87u2FhU4VLTl0lVuW6EEO6
MI93/tGnf9wMRl45WZAAAAA==
X-Change-ID: 20250603-s2mpg1x-regulators-7a41c8399abf
To: Tudor Ambarus <tudor.ambarus@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>, Krzysztof Kozlowski <krzk@xxxxxxxxxx>,
Liam Girdwood <lgirdwood@xxxxxxxxx>, Mark Brown <broonie@xxxxxxxxxx>,
Lee Jones <lee@xxxxxxxxxx>, Linus Walleij <linus.walleij@xxxxxxxxxx>,
Bartosz Golaszewski <brgl@xxxxxxxx>
Cc: Peter Griffin <peter.griffin@xxxxxxxxxx>,
Will McVicker <willmcvicker@xxxxxxxxxx>, kernel-team@xxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-samsung-soc@xxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-gpio@xxxxxxxxxxxxxxx,
=?utf-8?q?Andr=C3=A9_Draszik?= <andre.draszik@xxxxxxxxxx>
X-Mailer: b4 0.14.2
X-Spam-Status: No, score=-2.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,LOTS_OF_MONEY,
MAILING_LIST_MULTI,MONEY_NOHTML,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
This series extends the existing S2MPG10 PMIC driver to add support for
the regulators, and adds new S2MPG11 core and regulator drivers.
This series must be applied in-order, due to the regulator drivers
depending on headers & definitions added by the bindings and core
drivers. I would expect them all to go via the MFD tree.
The patches are kept together in one series, due to S2MPG11 and its
regulators being very similar to S2MPG10.
The Samsung S2MPG11 PMIC is a Power Management IC for mobile
applications with buck converters, various LDOs, and power meters. It
typically complements an S2MPG10 PMIC in a main/sub configuration as
the sub-PMIC and both are used on the Google Pixel 6 and 6 Pro
(oriole / raven).
A DT update for Oriole / Raven to enable these is required which I will
send out separately once bindings have been OK'd.
Cheers,
Andre'
Signed-off-by: André Draszik <andre.draszik@xxxxxxxxxx>
---
André Draszik (17):
dt-bindings: firmware: google,gs101-acpm-ipc: convert regulators to lowercase
regulator: dt-bindings: add s2mpg10-pmic regulators
regulator: dt-bindings: add s2mpg11-pmic regulators
dt-bindings: mfd: samsung,s2mps11: add s2mpg10-pmic regulators
dt-bindings: mfd: samsung,s2mps11: add s2mpg11-pmic
dt-bindings: firmware: google,gs101-acpm-ipc: update PMIC examples
mfd: sec-common: Instantiate s2mpg10 bucks and ldos separately
mfd: sec: Add support for S2MPG11 PMIC via ACPM
regulator: s2mps11: drop two needless variable initialisations
regulator: s2mps11: use dev_err_probe() where appropriate
regulator: s2mps11: update node parsing (allow -supply properties)
regulator: s2mps11: refactor handling of external rail control
regulator: s2mps11: add S2MPG10 regulator
regulator: s2mps11: refactor S2MPG10 ::set_voltage_time() for S2MPG11 reuse
regulator: s2mps11: refactor S2MPG10 regulator macros for S2MPG11 reuse
regulator: s2mps11: add S2MPG11 regulator
regulator: s2mps11: more descriptive gpio consumer name
.../bindings/firmware/google,gs101-acpm-ipc.yaml | 44 +-
.../devicetree/bindings/mfd/samsung,s2mps11.yaml | 87 +-
.../regulator/samsung,s2mpg10-regulator.yaml | 147 +++
.../regulator/samsung,s2mpg11-regulator.yaml | 150 +++
MAINTAINERS | 1 +
drivers/mfd/sec-acpm.c | 213 +++-
drivers/mfd/sec-common.c | 22 +-
drivers/mfd/sec-irq.c | 67 +-
drivers/regulator/s2mps11.c | 1144 ++++++++++++++++++--
.../regulator/samsung,s2mpg10-regulator.h | 66 ++
include/linux/mfd/samsung/core.h | 1 +
include/linux/mfd/samsung/irq.h | 99 ++
include/linux/mfd/samsung/s2mpg10.h | 8 +
include/linux/mfd/samsung/s2mpg11.h | 420 +++++++
14 files changed, 2339 insertions(+), 130 deletions(-)
---
base-commit: a0bea9e39035edc56a994630e6048c8a191a99d8
change-id: 20250603-s2mpg1x-regulators-7a41c8399abf
Best regards,
--
André Draszik <andre.draszik@xxxxxxxxxx>
Return-Path: <linux-kernel+bounces-673437-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 7308341E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:26:04 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id A23851733D5
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:26:05 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 7525519CC0A;
Wed, 4 Jun 2025 15:25:49 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="qI8omZnY"
Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id CC87218B47E
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:25:46 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.41
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749050748; cv=none; b=hpqLJSzpn2UTNTFY+5bZnVoW7IdzhjxWdXPlcCB1zD03dp2CRE+5rEPk5aS/iGujTgl9swCPXUhpGmgp5b3GtOlyE3r1lY5dp8o8AzOaPN1euWVvsRqmEnQ918iA81uCwD/XXEn5qFEU/gCScfM5Jr99Ee1MIfu4/C5LpJtg9PY=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749050748; c=relaxed/simple;
bh=/zu0WY1mTLJkmQKe0QzKVdlleBAaRvg5u4/DVEDJoYs=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=qri1V1PaNRJeHSmjs+a4X4gyMDZ8KNcIS0fBXJ/Kt+7O4yucm/ftNMEOCg+KVFOPtMDC9A2tiuw2RHCTtKymUy8v321ebatDWabw9CCo8KQCdC5iqOt9NU4vW0cnK2xKenvrfzCXSPku3GEV9HfbLL7oqlRYICgqSLkyRREioeY=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=qI8omZnY; arc=none smtp.client-ip=209.85.208.41
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org
Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-5efe8d9ebdfso13503486a12.3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 08:25:46 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=linaro.org; s=google; t=1749050745; x=1749655545; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=Tj36HcfLXbrHMi0m60w9d5+4mHUGkz0YH63xXCl7mlk=;
b=qI8omZnYK63Gb3gfqVrMQYrcAeOkEb7jdjavka/WAWHIxL/QL5ypm1bm5xzQsrx2DV
ljun/e+RnC0KerzAN1vGJ07NRXgwlz+wbzV+WsH3g8pzg3UrZfamdIySsqhV9aWnzXrB
V3vbLMhg9JfSP/rSmTuu6iYGxwXw6KW5pT9DaJ1TBTqs583OYDJ+blmh80W9BZvWb6dE
mEDCsvZuY0zj7+rwBxMs05Le9ZmeX9pY4At4EzMURjgqoo18iXr7m5Ztkgd5WE1pV9W6
mR0QY7S4KwByWpvk92AiVpT4jS9MUKHA/2jHtwD1S4UTYUagd/Txp563a9yt3lzQDSGf
5VoA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749050745; x=1749655545;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=Tj36HcfLXbrHMi0m60w9d5+4mHUGkz0YH63xXCl7mlk=;
b=Voo73aya+hD+ERUnML0ytvvGLU8fYAJMFfM2lXCDBH1M/c4i/o36I8zCKzJ7PhtIEB
g/DRNKnxNOA6HfVSdH7BSmW2k8lNFlpkNefb9+NZNpm0sVZHHbeNnrxD36fqV+A/c/ZW
xNEHpor6PTOab4E4yJ9vwgN/8h7J3PnJzrqlVmLpbL/HfKw2Q+SyOSGFSQLczZkq1C37
T235m2twE+yNDRUlFxC3vfWJDSlb7I3K/edPgpL0TXJld+BNDRTNpgXQaCED13gY5/ok
hqN1kaaDaXwjbutA2pyHGyn//bQJalILD1nRktZnc17pgkbH790uU1jRR2mJKCFmxz3l
CNfw==
X-Forwarded-Encrypted: i=1; AJvYcCUZDygcKxuI0mMkA1pq9+9wF//iAr4I6XpVLT4g3LbCm71qnhXsl2jKM5HuEmmQEVoQWGXXKFEqFoweNZI=@vger.kernel.org
X-Gm-Message-State: AOJu0YzC4Pf4ltCy3dACzTNwlmyOrpBXMcHaI4RNToiKhpI9OscmOiyS
RA75aEsG1Blf2bgeB839EIRP3A8Br6tLffVCop3mtH7RGl7yt/Qm5UitZ+8xFCnIkxQ=
X-Gm-Gg: ASbGncsBP63J994HSRGx1JGKNLSaV1+TYOD0JDnkM/SNlQV8bI3n81M6Iqs8dgU22d+
0CRyHMUDQ3nEJ2Wr/seskwQVonPgXRbGBVA4qbo0A3gG4/zHjGQh+YPePt51o2aoToh4sHQzft7
QFzXClMumATSgsiu3EvlSQ0irxKGGhiygnzfjUcoAZ4zOWGKcN6c6Uu0WwYCaqyb8F5G/GRwdNy
9/fGPQlIOm26Lh/j4YingYzp/D7qLJzAD7EcCakPxLXBYlnOz+6J3VgEK765cRG37wz5sLCnF1C
lBxeIRd6Ko23PJEJdN+uQcnuiqNKD5F7G1t2EXrNf5nu1rUJzsQeXwGsdGZbVrfy2ejS8+3XVjg
2WCntLZt/fF5bFqwvTsqgrxB3qtAoR8w7YYdxbkifwy+tRw==
X-Google-Smtp-Source: AGHT+IHDbl+PPXNilHwRHoApPiua2emH1u8FPEEM6gtKEx+PJ/5CtghVWo7/Vf4dwmLj4wdHx4mOIQ==
X-Received: by 2002:a05:6402:510a:b0:602:120c:f8d8 with SMTP id 4fb4d7f45d1cf-606ea179fb9mr3445618a12.18.1749050744799;
Wed, 04 Jun 2025 08:25:44 -0700 (PDT)
Received: from puffmais.c.googlers.com (140.20.91.34.bc.googleusercontent.com. [34.91.20.140])
by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-606ed984f63sm1051640a12.58.2025.06.04.08.25.44
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 08:25:44 -0700 (PDT)
From: =?utf-8?q?Andr=C3=A9_Draszik?= <andre.draszik@xxxxxxxxxx>
Date: Wed, 04 Jun 2025 16:25:40 +0100
Subject: [PATCH 01/17] dt-bindings: firmware: google,gs101-acpm-ipc:
convert regulators to lowercase
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Message-Id: <20250604-s2mpg1x-regulators-v1-1-6038740f49ae@xxxxxxxxxx>
References: <20250604-s2mpg1x-regulators-v1-0-6038740f49ae@xxxxxxxxxx>
In-Reply-To: <20250604-s2mpg1x-regulators-v1-0-6038740f49ae@xxxxxxxxxx>
To: Tudor Ambarus <tudor.ambarus@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>, Krzysztof Kozlowski <krzk@xxxxxxxxxx>,
Liam Girdwood <lgirdwood@xxxxxxxxx>, Mark Brown <broonie@xxxxxxxxxx>,
Lee Jones <lee@xxxxxxxxxx>, Linus Walleij <linus.walleij@xxxxxxxxxx>,
Bartosz Golaszewski <brgl@xxxxxxxx>
Cc: Peter Griffin <peter.griffin@xxxxxxxxxx>,
Will McVicker <willmcvicker@xxxxxxxxxx>, kernel-team@xxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-samsung-soc@xxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-gpio@xxxxxxxxxxxxxxx,
=?utf-8?q?Andr=C3=A9_Draszik?= <andre.draszik@xxxxxxxxxx>
X-Mailer: b4 0.14.2
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Using lowercase for the buck and ldo nodenames is preferred, as
evidenced e.g. in [1].
Convert the example here to lowercase before we add any bindings
describing the s2mpg1x regulators that will enforce the spelling.
Link: https://lore.kernel.org/all/20250223-mysterious-infrared-civet-e5bcbf@krzk-bin/ [1]
Signed-off-by: André Draszik <andre.draszik@xxxxxxxxxx>
---
Documentation/devicetree/bindings/firmware/google,gs101-acpm-ipc.yaml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/firmware/google,gs101-acpm-ipc.yaml b/Documentation/devicetree/bindings/firmware/google,gs101-acpm-ipc.yaml
index 9785aac3b5f34955bbfe2718eec48581d050954f..62a3a7dac5bd250a7f216c72f3315cd9632d93e1 100644
--- a/Documentation/devicetree/bindings/firmware/google,gs101-acpm-ipc.yaml
+++ b/Documentation/devicetree/bindings/firmware/google,gs101-acpm-ipc.yaml
@@ -64,7 +64,7 @@ examples:
interrupts-extended = <&gpa0 6 IRQ_TYPE_LEVEL_LOW>;
regulators {
- LDO1 {
+ ldo1m {
regulator-name = "vdd_ldo1";
regulator-min-microvolt = <700000>;
regulator-max-microvolt = <1300000>;
@@ -73,7 +73,7 @@ examples:
// ...
- BUCK1 {
+ buck8m {
regulator-name = "vdd_mif";
regulator-min-microvolt = <450000>;
regulator-max-microvolt = <1300000>;
--
2.49.0.1204.g71687c7c1d-goog
Return-Path: <linux-kernel+bounces-673438-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 0693441E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:26:39 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id DEF2C7A64CE
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:25:10 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id A3F721A840A;
Wed, 4 Jun 2025 15:25:51 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="KbyHrIEY"
Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id EFB4C192D83
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:25:47 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.45
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749050750; cv=none; b=OgDEO3Pq1kPPOG6BmqT++XtO5F2nWI4oioTZbZRIr2KmLh8UYBJY9cXoqwSklFOQlLWrT5clfWcAvTlNibX2lry/xhLiw6idBfeq4KJ6lP0ljVi5gQsMRq7m1k6hcsbA1qsKKE1ZlxFRrMk1FeMbKNe9cte9XRO6SOKrdbRv98s=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749050750; c=relaxed/simple;
bh=i7LYP+2b/HhCF2Z1/IxiMY41qTXY9usnHls789FLRiY=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=JG1Bu9CMMbTb9sYNYQLgOTiGvipxYDiBBFLTfKa5OGoSbsMeBCUg/uM8Uhy/dOAEyMeKPC8YCRF7c+bADlbrBjhqfl/6GhJ5XohjnwCIS5hvaBBjsdAF2AUe3zIS2oHRb4a1+SwG03JSP9xGeUzqXen25e34vzJ0RW5nQzSCBbU=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=KbyHrIEY; arc=none smtp.client-ip=209.85.208.45
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org
Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-606bbe60c01so3622730a12.2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 08:25:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=linaro.org; s=google; t=1749050746; x=1749655546; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=y/Nuhjkvj2i8BYs2yY8o0DBKFzqmFzKeDEHJy4UYUW4=;
b=KbyHrIEYUN26mnkqWSrWSJd5KNb4MpWT217AzQ8UD1twgK0n2hXlsZ1n1uH9x/12zp
EuNyRt2g08UFW6eZoOVMJrlKBTlx90fjwksopv0KI6IdpqQJFiAr8AMQyw5HUvh9NzJA
G4H+vg++OFqqWp/U6f1oZeqVhsMKFa5VzRr1ZYrIlLBs2ADdp1LIvHYtrdGi7EW0ASoZ
1u+lkngxb81NswwMp6pEf/TPoiBxsXpKXAoEykVMKWtIbWjvqOoETdzQUs2UwAl+JdAN
acTKLIubHDJs+aRKYCf4lk31T+t7Rx8B3Mbw7sryu5v8Cnf9WibdLAScD8A175rUTQ3l
djSw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749050746; x=1749655546;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=y/Nuhjkvj2i8BYs2yY8o0DBKFzqmFzKeDEHJy4UYUW4=;
b=GdbjkkUqVNe70E2eNxKw8K2MJbelhuo7IpVtCfBjUj/BeuRLQsNPsgyc8PENT2AQYo
ouh9H7yPMRdBK/sZUXpPiFkgTd6syVBHo6N0ClvKJ7sf3Sk1yqFkfcUncIQIOT4oeNKg
eNBFC97v/036iMSLn3mEz4pAr+rlHqIVswZjkDxv3hq6yS0co1Xy5HZ+IFt24ltjt2Lg
CSznsVYgejfz+JWFeTIekUsJJl+hZaidpGIGVzH6uXaBusnPYqGSzL6c87L9nFUbUDsO
rSQOB5LkusaMVxIR8MKpUD9frXLvTgpAPSTwm3h1ZQttduYf1uM/oXjMXu0YHW/wOF2e
p6PA==
X-Forwarded-Encrypted: i=1; AJvYcCU7JBjaDV0bRuqQHptu1tCKQUPWI7xfuULTZDZ6ebVhaA2re0wQrzQu+BbOletPCmy2iCG9JUmxiqrx1Sc=@vger.kernel.org
X-Gm-Message-State: AOJu0YyuMOy+HT43QfeWkSfjm8dJHGafIPew57rs9OI1o+o11IrOKPrH
JMpNAWrqvvY2/IE8DJ/AJxnF9eY6Jp3R5Y1kSCG3acNO1FBf13Yqjs0qYIfC1sXry6w=
X-Gm-Gg: ASbGncvqaClieg6mTO3WRgmW/9fRicg3KLUHZBAHz7Q4m52eE+zjAN68JwkVt2KEMkJ
1Dlt1mw1nQu9MlmgsKe6EOhwQH47rVVrOsyl9k9to9CP1T31pGxuQYYszC9XHQUPJnc0/uLZJfu
0KmQ2QRO8w5oNdXRRYIhcMhJKK6iwSZWymlivkW7BFWdOxJHv89GEpg8NkatJcHihZkBAB28P31
mn8jULhKmWDQRtnBTWQE1HNWfWR4dyqgCesufNjGjJvlCBh8HSAm89jxawTEhNMUscvHhCajcj7
/3ZmCYUQf3jcCfFSkKJzJL3KcOJi7jNB3TQ4ylJ8/0dChd7bF7kT5hPYaPReNTXLCv8Wt+UfsT2
8oglSE838nqvWhdxwyZau0nNNKS2SZx5hAVg=
X-Google-Smtp-Source: AGHT+IGNeOInImc3IiLEgN6dgTSjuYlEJ0cGTX8zNFDeGDe2e91LE/P2zcqlG80knQ7jcN+ctu99FA==
X-Received: by 2002:a05:6402:50c9:b0:601:a681:4d5c with SMTP id 4fb4d7f45d1cf-606ea15f66fmr3407522a12.32.1749050746101;
Wed, 04 Jun 2025 08:25:46 -0700 (PDT)
Received: from puffmais.c.googlers.com (140.20.91.34.bc.googleusercontent.com. [34.91.20.140])
by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-606ed984f63sm1051640a12.58.2025.06.04.08.25.45
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 08:25:45 -0700 (PDT)
From: =?utf-8?q?Andr=C3=A9_Draszik?= <andre.draszik@xxxxxxxxxx>
Date: Wed, 04 Jun 2025 16:25:42 +0100
Subject: [PATCH 03/17] regulator: dt-bindings: add s2mpg11-pmic regulators
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Message-Id: <20250604-s2mpg1x-regulators-v1-3-6038740f49ae@xxxxxxxxxx>
References: <20250604-s2mpg1x-regulators-v1-0-6038740f49ae@xxxxxxxxxx>
In-Reply-To: <20250604-s2mpg1x-regulators-v1-0-6038740f49ae@xxxxxxxxxx>
To: Tudor Ambarus <tudor.ambarus@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>, Krzysztof Kozlowski <krzk@xxxxxxxxxx>,
Liam Girdwood <lgirdwood@xxxxxxxxx>, Mark Brown <broonie@xxxxxxxxxx>,
Lee Jones <lee@xxxxxxxxxx>, Linus Walleij <linus.walleij@xxxxxxxxxx>,
Bartosz Golaszewski <brgl@xxxxxxxx>
Cc: Peter Griffin <peter.griffin@xxxxxxxxxx>,
Will McVicker <willmcvicker@xxxxxxxxxx>, kernel-team@xxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-samsung-soc@xxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-gpio@xxxxxxxxxxxxxxx,
=?utf-8?q?Andr=C3=A9_Draszik?= <andre.draszik@xxxxxxxxxx>
X-Mailer: b4 0.14.2
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
The S2MPG11 PMIC is a Power Management IC for mobile applications with
buck converters, various LDOs, and power meters. It typically
complements an S2MPG10 PMIC in a main/sub configuration as the
sub-PMIC.
S2MPG11 has 12 buck, 1 buck-boost, and 15 LDO rails. Several of these
can either be controlled via software or via external signals, e.g.
input pins connected to a main processor's GPIO pins.
Add documentation related to the regulator (buck & ldo) parts like
devicetree definitions, regulator naming patterns, and additional
properties.
Since S2MPG11 is typically used as the sub-PMIC together with an S2MP10
as the main-PMIC, the datasheet and the binding both suffix the rails
with an 's'.
Signed-off-by: André Draszik <andre.draszik@xxxxxxxxxx>
---
Note: checkpatch suggests to update MAINTAINERS, but the new file is
covered already due to using a wildcard.
---
.../regulator/samsung,s2mpg11-regulator.yaml | 150 +++++++++++++++++++++
.../regulator/samsung,s2mpg10-regulator.h | 18 +++
2 files changed, 168 insertions(+)
diff --git a/Documentation/devicetree/bindings/regulator/samsung,s2mpg11-regulator.yaml b/Documentation/devicetree/bindings/regulator/samsung,s2mpg11-regulator.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..f2d596642501c197e2911ee3b9caac189cf541a4
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/samsung,s2mpg11-regulator.yaml
@@ -0,0 +1,150 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/samsung,s2mpg11-regulator.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Samsung S2MPG11 Power Management IC regulators
+
+maintainers:
+ - André Draszik <andre.draszik@xxxxxxxxxx>
+
+description: |
+ This is part of the device tree bindings for the S2MG11 Power Management IC
+ (PMIC).
+
+ The S2MPG11 PMIC provides 12 buck, 1 buck-boost, and 15 LDO regulators.
+
+ See also Documentation/devicetree/bindings/mfd/samsung,s2mps11.yaml for
+ additional information and example.
+
+definitions:
+ s2mpg11-ext-control:
+ properties:
+ samsung,ext-control:
+ description: |
+ These rails can be controlled via one of several possible external
+ (hardware) signals. If so, this property configures the signal the PMIC
+ should monitor. The following values generally corresponding to the
+ respective on-chip pin are valid:
+ - 0 # S2MPG11_PCTRLSEL_ON - always on
+ - 1 # S2MPG11_PCTRLSEL_PWREN - PWREN pin
+ - 2 # S2MPG11_PCTRLSEL_PWREN_TRG - PWREN_TRG bit in MIMICKING_CTRL
+ - 3 # S2MPG11_PCTRLSEL_PWREN_MIF - PWREN_MIF pin
+ - 4 # S2MPG11_PCTRLSEL_PWREN_MIF_TRG - PWREN_MIF_TRG bit in MIMICKING_CTRL
+ - 5 # S2MPG11_PCTRLSEL_AP_ACTIVE_N - ~AP_ACTIVE_N pin
+ - 6 # S2MPG11_PCTRLSEL_AP_ACTIVE_N_TRG - ~AP_ACTIVE_N_TRG bit in MIMICKING_CTRL
+ - 7 # S2MPG11_PCTRLSEL_G3D_EN - G3D_EN pin
+ - 8 # S2MPG11_PCTRLSEL_G3D_EN2 - G3D_EN & ~AP_ACTIVE_N pins
+ - 9 # S2MPG11_PCTRLSEL_AOC_VDD - AOC_VDD pin
+ - 10 # S2MPG11_PCTRLSEL_AOC_RET - AOC_RET pin
+ - 11 # S2MPG11_PCTRLSEL_UFS_EN - UFS_EN pin
+ - 12 # S2MPG11_PCTRLSEL_LDO13S_EN - VLDO13S_EN pin
+
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 12
+
+ samsung,ext-control-gpios:
+ description: |
+ For rails where external control is done via a GPIO, this optional
+ property describes the GPIO line used.
+
+ maxItems: 1
+
+ dependentRequired:
+ samsung,ext-control-gpios: [ "samsung,ext-control" ]
+
+properties:
+ buckboost:
+ type: object
+ $ref: regulator.yaml#
+ unevaluatedProperties: false
+ description:
+ Properties for the buck-boost regulator.
+
+ properties:
+ regulator-ramp-delay: false
+
+patternProperties:
+ # 12 bucks
+ "^buck(([1-9]|10)s|[ad])$":
+ type: object
+ $ref: regulator.yaml#
+ unevaluatedProperties: false
+ description:
+ Properties for a single buck regulator.
+
+ properties:
+ regulator-ramp-delay:
+ enum: [6250, 12500, 25000]
+ default: 6250
+
+ allOf:
+ - $ref: "#/definitions/s2mpg11-ext-control"
+
+ # 11 standard LDOs
+ "^ldo([3-79]|1[01245])s$":
+ type: object
+ $ref: regulator.yaml#
+ unevaluatedProperties: false
+ description:
+ Properties for a single LDO regulator.
+
+ properties:
+ regulator-ramp-delay: false
+
+ # 2 LDOs with possible external control
+ "^ldo(8|13)s$":
+ type: object
+ $ref: regulator.yaml#
+ unevaluatedProperties: false
+ description:
+ Properties for single LDO regulator.
+
+ properties:
+ regulator-ramp-delay: false
+
+ allOf:
+ - $ref: "#/definitions/s2mpg11-ext-control"
+
+ # 2 LDOs with ramp support and possible external control
+ "^ldo[12]s$":
+ type: object
+ $ref: regulator.yaml#
+ unevaluatedProperties: false
+ description:
+ Properties for a single LDO regulator.
+
+ properties:
+ regulator-ramp-delay:
+ enum: [6250, 12500]
+ default: 6250
+
+ allOf:
+ - $ref: "#/definitions/s2mpg11-ext-control"
+
+additionalProperties: false
+
+allOf:
+ - if:
+ anyOf:
+ - required: [buck4s]
+ - required: [buck6s]
+ - required: [buck7s]
+ - required: [buck10s]
+ - required: [buckboost]
+ then:
+ patternProperties:
+ "^buck([467]|10|boost)s$":
+ properties:
+ samsung,ext-control: false
+
+ - if:
+ required:
+ - buckboost
+ then:
+ properties:
+ buckboost:
+ properties:
+ regulator-ramp-delay: false
diff --git a/include/dt-bindings/regulator/samsung,s2mpg10-regulator.h b/include/dt-bindings/regulator/samsung,s2mpg10-regulator.h
index 1d4e34a756efa46afeb9f018c3e8644ebc373b07..0203946b7215eca615c27482be906c3100b899ee 100644
--- a/include/dt-bindings/regulator/samsung,s2mpg10-regulator.h
+++ b/include/dt-bindings/regulator/samsung,s2mpg10-regulator.h
@@ -22,6 +22,10 @@
*
* ldo20m supports external control, but using a different set of control
* signals.
+ *
+ * S2MPG11 regulators supporting these are:
+ * - buck1s .. buck3s buck5s buck8s buck9s bucka buckd
+ * - ldo1s ldo2s ldo8s ldo13s
*/
#define S2MPG10_PCTRLSEL_ON 0x0 /* always on */
#define S2MPG10_PCTRLSEL_PWREN 0x1 /* PWREN pin */
@@ -45,4 +49,18 @@
#define S2MPG10_PCTRLSEL_LDO20M_SFR 0x3 /* LDO20M_SFR bit in LDO_CTRL1 register */
#define S2MPG10_PCTRLSEL_LDO20M_OFF 0x4 /* disable */
+#define S2MPG11_PCTRLSEL_ON 0x0 /* always on */
+#define S2MPG11_PCTRLSEL_PWREN 0x1 /* PWREN pin */
+#define S2MPG11_PCTRLSEL_PWREN_TRG 0x2 /* PWREN_TRG bit in MIMICKING_CTRL */
+#define S2MPG11_PCTRLSEL_PWREN_MIF 0x3 /* PWREN_MIF pin */
+#define S2MPG11_PCTRLSEL_PWREN_MIF_TRG 0x4 /* PWREN_MIF_TRG bit in MIMICKING_CTRL */
+#define S2MPG11_PCTRLSEL_AP_ACTIVE_N 0x5 /* ~AP_ACTIVE_N pin */
+#define S2MPG11_PCTRLSEL_AP_ACTIVE_N_TRG 0x6 /* ~AP_ACTIVE_N_TRG bit in MIMICKING_CTRL */
+#define S2MPG11_PCTRLSEL_G3D_EN 0x7 /* G3D_EN pin */
+#define S2MPG11_PCTRLSEL_G3D_EN2 0x8 /* G3D_EN & ~AP_ACTIVE_N pins */
+#define S2MPG11_PCTRLSEL_AOC_VDD 0x9 /* AOC_VDD pin */
+#define S2MPG11_PCTRLSEL_AOC_RET 0xa /* AOC_RET pin */
+#define S2MPG11_PCTRLSEL_UFS_EN 0xb /* UFS_EN pin */
+#define S2MPG11_PCTRLSEL_LDO13S_EN 0xc /* VLDO13S_EN pin */
+
#endif /* _DT_BINDINGS_REGULATOR_SAMSUNG_S2MPG10_H */
--
2.49.0.1204.g71687c7c1d-goog
Return-Path: <linux-kernel+bounces-673440-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id A6D3941E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:26:48 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id EA28F3A6B1D
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:26:22 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id E293D187554;
Wed, 4 Jun 2025 15:25:52 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="oY+sXTUS"
Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9341B19D08F
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:25:49 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.45
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749050751; cv=none; b=jZXAv2qxmL2y6zjjauFL3BvTUEPp3l4WfErgkwu10wEw4ejdJgdmlBYhWkVyoeMpEH4T6hRz31xHPR67kGxE/tDvLMu+umw8Qdg7NySYcKYwI1Sx6opkk4UKiB0vfRV31E1mfX7E6JYgCLKx/fKY7uOstwMc1rbw+Vp1dnYIAfg=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749050751; c=relaxed/simple;
bh=AJLbutT5f80u713gohP/P4oFnY0KLyNPkjsRDaAt050=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=o3OMfeJV7qQbimwSSmGPfrLitGnCpn0/IaRWG/GcQFhK5gAAPWC2q2vrdj1xprBtiMpyEh5pOxUpZdwAhn8sE8EYh7eZhxsPNAbZkAtMV5s9BRBNUSgpw8588pviH4z/rbeBjDnI+EDt6+S3mSNPEamEelD4v/Z2FXNMUVq0Dnc=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=oY+sXTUS; arc=none smtp.client-ip=209.85.208.45
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org
Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-606741e8e7cso5908244a12.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 08:25:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=linaro.org; s=google; t=1749050748; x=1749655548; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=KXs2zA73ZRuBPLzY+I20lVoCbiqQa8Pw8YT+g/k8k0Q=;
b=oY+sXTUSMmseGBluOqETW0Zj8coxx/IaSM0V/MNyb7xbL4qEi3Xj27Ej05lAZQzA+w
IAC2+kGnZ5OeinpsrAIviaAVcVlH4zZN2LtmxHGkGKh7CiuhFShA4Gu57EVkXxSv5vIy
FtYmafPI60dYcaQPaloxTEKx1/tmbR22+GyjAA1SotuxSFIrC1EoO6lJF5/wtdoIB/VZ
+fpKuBXTUViaYzxBrEAVfVsk4CjIcrdBD3Y4ymmVFB3cpRPTBpwezrKv7P0o6tT+7809
G5u7SWkwsUhekFTz6sGDzNQ52gSoNy+SjW+xvuS0rhIQJ3w+2IYU1a7pmX5QXbOWVvv+
e3gg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749050748; x=1749655548;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=KXs2zA73ZRuBPLzY+I20lVoCbiqQa8Pw8YT+g/k8k0Q=;
b=Qv+sNo/EpcU1bnGm5KCQuCSsvRhBUCid+51mS0gW7HKNY96lHkXKBFTyKalTcl5aWt
Awle43V0ttY2kx3bz5POAGIqZfSB/zSuDjLF02ZuSZnKAwyO2DyZyfiKzrtRBaucT7Gh
YqfhKXEzcVC+SeJvV6Av8g2Do5IxOIvTccLReYO1IKaGu09ranhyUkzgl4L4yJNS7VaO
qRqaWrv9Wc+TfV7KCq/MOPlwcz4kcD+Fxvl6R1giWMqFZUGj0mGdhypA9jUV11RsPd2N
i7Y14gWwTw77uMAJCPl06xRKXXnsRBHeD1C+VZU+6Pu7KQd1/jkTwHaPkplYAQ0oMU8w
A7tA==
X-Forwarded-Encrypted: i=1; AJvYcCWT1M/hr5zU2q2U+uO8NxYz9AV0Dw1xaCJQYolj0UMN64jcMytjoVaZrtNHMtpTngGIslQAgj5+ppKvhGA=@vger.kernel.org
X-Gm-Message-State: AOJu0YyKv3xwutr/gW1tdgRRfDP8sK6ysQGoNKD2Tcup9DrL0g/7meFJ
c6ipf1JUqqHi0N2xXTrzz2cxBnqyR9htHFHC5zSxFEziGfzgVUVyweYV/oBqEFPxJkw=
X-Gm-Gg: ASbGncsr3ymhoZTY6UCwbqKsfUlFPkRfrATSH6vVpv20wp9+INvU/MvumnVjLabnLfJ
qB0vQBWj5STD2353TW6IzG248RM5GIqbv54pv2Vo/zA+hRl1Ir7XuEhXXjDpdZ6YqNDfNtbGlOg
Bsc66qKYAVE4G8ZjNmauRTUXTrO7qTCOWY/+PXgLW4DbMFVMZgDWN785MzhCB/1sVhv+5n5mwUU
CXZ8IrxyuRfO1elHdObSHH28DCKB5m87yki7jum1kfXU0abx+yaj+IBKMIPHSpxR/rRzFsPdBJ9
UpvlcJSdUwY4hDXDDeBwPogr+TbDY9GwpVNY+B7kdrE0S4m0lYXvJr92mjbPBLLSMCzg03j/zfy
lalKHC860jm5af8tRx0wDbV6O+f+gyHcTOsk=
X-Google-Smtp-Source: AGHT+IEpnyZ5RcSizQ8OwBQIqB98hY8tFDyFT8RcDjsboJfv/HhXCPW14p5ZpmW4M5LV1bKLv8xaOw==
X-Received: by 2002:a05:6402:84d:b0:604:e99e:b78f with SMTP id 4fb4d7f45d1cf-606ea3b00f1mr3402513a12.16.1749050747900;
Wed, 04 Jun 2025 08:25:47 -0700 (PDT)
Received: from puffmais.c.googlers.com (140.20.91.34.bc.googleusercontent.com. [34.91.20.140])
by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-606ed984f63sm1051640a12.58.2025.06.04.08.25.47
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 08:25:47 -0700 (PDT)
From: =?utf-8?q?Andr=C3=A9_Draszik?= <andre.draszik@xxxxxxxxxx>
Date: Wed, 04 Jun 2025 16:25:44 +0100
Subject: [PATCH 05/17] dt-bindings: mfd: samsung,s2mps11: add s2mpg11-pmic
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Message-Id: <20250604-s2mpg1x-regulators-v1-5-6038740f49ae@xxxxxxxxxx>
References: <20250604-s2mpg1x-regulators-v1-0-6038740f49ae@xxxxxxxxxx>
In-Reply-To: <20250604-s2mpg1x-regulators-v1-0-6038740f49ae@xxxxxxxxxx>
To: Tudor Ambarus <tudor.ambarus@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>, Krzysztof Kozlowski <krzk@xxxxxxxxxx>,
Liam Girdwood <lgirdwood@xxxxxxxxx>, Mark Brown <broonie@xxxxxxxxxx>,
Lee Jones <lee@xxxxxxxxxx>, Linus Walleij <linus.walleij@xxxxxxxxxx>,
Bartosz Golaszewski <brgl@xxxxxxxx>
Cc: Peter Griffin <peter.griffin@xxxxxxxxxx>,
Will McVicker <willmcvicker@xxxxxxxxxx>, kernel-team@xxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-samsung-soc@xxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-gpio@xxxxxxxxxxxxxxx,
=?utf-8?q?Andr=C3=A9_Draszik?= <andre.draszik@xxxxxxxxxx>
X-Mailer: b4 0.14.2
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
The Samsung S2MPG11 PMIC is similar to the existing S2MPG10 PMIC
supported by this binding.
It is a Power Management IC for mobile applications with buck
converters, various LDOs, and power meters and typically complements an
S2MPG10 PMIC in a main/sub configuration as the sub-PMIC.
Like S2MPG10, communication is not via I2C, but via the Samsung ACPM
firmware, it therefore doesn't need a 'reg' property but needs to be a
child of the ACPM firmware node instead.
Add the PMIC, the regulators node, and the supply inputs of the
regulator rails, with the supply names matching the datasheet.
Note: S2MPG11 is typically used as the sub-PMIC together with an
S2MPG10 PMIC in a main/sub configuration, hence the datasheet and the
binding both suffix the supplies with an 's'.
Signed-off-by: André Draszik <andre.draszik@xxxxxxxxxx>
---
.../devicetree/bindings/mfd/samsung,s2mps11.yaml | 70 ++++++++++++++++++----
1 file changed, 58 insertions(+), 12 deletions(-)
diff --git a/Documentation/devicetree/bindings/mfd/samsung,s2mps11.yaml b/Documentation/devicetree/bindings/mfd/samsung,s2mps11.yaml
index 0b834a02368f7867a2d093cbb3a9f374bb2acf41..f859a7e4a962a6013712ac6c62dd04eeadc5e0f4 100644
--- a/Documentation/devicetree/bindings/mfd/samsung,s2mps11.yaml
+++ b/Documentation/devicetree/bindings/mfd/samsung,s2mps11.yaml
@@ -21,6 +21,7 @@ properties:
compatible:
enum:
- samsung,s2mpg10-pmic
+ - samsung,s2mpg11-pmic
- samsung,s2mps11-pmic
- samsung,s2mps13-pmic
- samsung,s2mps14-pmic
@@ -70,21 +71,46 @@ required:
unevaluatedProperties: false
allOf:
+ - if:
+ not:
+ properties:
+ compatible:
+ const: samsung,s2mpg10-pmic
+ then:
+ properties:
+ system-power-controller: false
+
- if:
properties:
compatible:
contains:
- const: samsung,s2mpg10-pmic
+ enum:
+ - samsung,s2mpg10-pmic
+ - samsung,s2mpg11-pmic
then:
properties:
reg: false
+ samsung,s2mps11-acokb-ground: false
+ samsung,s2mps11-wrstbi-ground: false
+
+ oneOf:
+ - required: [interrupts]
+ - required: [interrupts-extended]
+
+ else:
+ required:
+ - reg
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: samsung,s2mpg10-pmic
+ then:
+ properties:
regulators:
$ref: /schemas/regulator/samsung,s2mpg10-regulator.yaml
- samsung,s2mps11-acokb-ground: false
- samsung,s2mps11-wrstbi-ground: false
-
patternProperties:
"^vinb([1-9]|10)m-supply$":
description:
@@ -112,16 +138,36 @@ allOf:
vinl14m - ldo21m
vinl15m - ldo10m, ldo22m, ldo26m, ldo27m
- oneOf:
- - required: [interrupts]
- - required: [interrupts-extended]
-
- else:
+ - if:
properties:
- system-power-controller: false
+ compatible:
+ contains:
+ const: samsung,s2mpg11-pmic
+ then:
+ properties:
+ regulators:
+ $ref: /schemas/regulator/samsung,s2mpg11-regulator.yaml
- required:
- - reg
+ patternProperties:
+ "^vinb(([1-9]|10)s|[abd])-supply$":
+ description:
+ Phandle to the power supply for each buck rail of this PMIC. There
+ is a 1:1 mapping of numbered supply to rail, e.g. vinb1s-supply
+ supplies buck1s. The remaining mapping is as follows
+ vinba - bucka
+ vinbb - buck boost
+ vinbd - buckd
+
+ "^vinl[1-6]s-supply$":
+ description: |
+ Phandle to the power supply for one or multiple LDO rails of this
+ PMIC. The mapping of supply to rail(s) is as follows
+ vinl1s - ldo1s, ldo2s
+ vinl2s - ldo8s, ldo9s
+ vinl3s - ldo3s, ldo5s, ldo7s, ldo15s
+ vinl4s - ldo10s, ldo11s, ldo12s, ldo14s
+ vinl5s - ldo4s, ldo6s
+ vinl6s - ldo13s
- if:
properties:
--
2.49.0.1204.g71687c7c1d-goog
Return-Path: <linux-kernel+bounces-673439-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 2DB8341E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:26:50 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 9CED43A75DA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:26:24 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id D71AC1C5489;
Wed, 4 Jun 2025 15:25:52 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="PqG/MkE5"
Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D3111917D6
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:25:47 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.49
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749050751; cv=none; b=Dhhe8faSOR2SHQL257NI2uMQurpANLWnxabK6d+ZInbiZCq1/I+dJpPpqhk4Pu3T2kTFa6Hs/dUzgr9clZsApt304eri9MBojpOY/kICXfbEJsuzOsfAjjKUosMwswlrJHGwC8FMnKw3hE7sQq+mtSlxpMQ5NvZh85UGPfBWmaw=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749050751; c=relaxed/simple;
bh=tb3rroKay4WoCawP75y+rMOWHLoXWxx0UmTY54Zml58=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=bwAZ1B+rJVSTgXtGQBnWg9diILzlDAgvjbLwE5NOnOboHNyrBNXXgB2jQZYXUV9h+Vwd2uYfbJ0qGqTut/oDAPRo3t6YsTfKGCpjk0l5H/VPLLcSH4Qa0fLYj91430yGFxW4AUk8FKF3YWAcmP86m0XSe/RDAyGQ1w1TE+7plsA=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=PqG/MkE5; arc=none smtp.client-ip=209.85.208.49
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org
Received: by mail-ed1-f49.google.com with SMTP id 4fb4d7f45d1cf-606fdbd20afso1477123a12.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 08:25:46 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=linaro.org; s=google; t=1749050745; x=1749655545; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=LsPj87HjS8BwizaOPE7vMLxiKmx0PFqGIoSdAB4ijFI=;
b=PqG/MkE5kdiVigWqtpZcE6LV/rgfEIDBVSlfzQjrrL3Jd3ovZft4bkHT2Sk4U4mTJd
/Q0dfEwn93l8bXNckfpMTJjTwrVSenDvT3Chm7jMhNYc2ElfS2SCZgt+XhFpxyDRBqJs
7L+QV27Ux5RflCDu1/agh9cyvKXGjdbJwIZzYlUfFVt7rRppXTjstuzNphxFE4i4idlL
6VZBjxRv3+KBJyA7r95j84zkZu2UAseGEOtBXexauCdkWGI866/QGxsE4SWyx8wjkFen
cFzXSIgXgFq2LUg0j02br5VJNA8g80YPKxIXc6pcyHW+spKHlHUCAtW7RcLDQGii83lr
0eIQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749050745; x=1749655545;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=LsPj87HjS8BwizaOPE7vMLxiKmx0PFqGIoSdAB4ijFI=;
b=TVmjbHBHaB8b9ARUS33hAgJ4L0TKkW7/PWfTFA01MyokpuLTJLOpKsASmDVZVJa1wm
GS+m/z3qv224q3dTGxq80QhSIq0dFhCzXcaJNNTyrhD+tYfUmGo/5jspnob+kr1u6XP/
c5uDsRdn/JGE7U9ehHrrhVE03LtVwwR8DYBWKV5fiq8SAIW87XeLUbW6GF+SjkY7mJbJ
av7KAkQB02QEbTDFgLb0rTz5zghxjd9f/H1QtXBsxadiyGMwG8z5qQqBYWPzTbT+sQUd
MYaCdT1gnrD93f0JpOGxaVW9guH2kuonNtSNyXHPQNFmmRmv/Cgb3hr176+QhwmF1qdn
FSBw==
X-Forwarded-Encrypted: i=1; AJvYcCUH3rd78uYigZBOmIOR6Sxgqba8R6fQbUEiqdj24KjLCh9bXYnPIc+NIc/8AjoMH8LsmxYOs9W91D1VII4=@vger.kernel.org
X-Gm-Message-State: AOJu0YyxIVUnaDN+GQbOxMFDBs050JXEIlRDrzZYke2HGxYeqMDJZM77
uYgMYpyo+ZkgMIXJC/PSZpWzTmULFudHSWYmTpjrrwsDPubcxRd7NKPn3jnQzPNHXFI=
X-Gm-Gg: ASbGncsX+u4Ld0y+hfXFaEShEyBG01pn0tbxD8JPQmwbPOVJQ8soBlOUJkGrl3kz/Y5
CP+Pw/V4Z50ooGTSjqyeOsLaVaaik6r6jKNfWXHigCtx1E+psnmKSiR7FRCo1IdVUrGtn1WPSVa
3WgVugwq8gc0Wjb0V1QzEYgnLqw+zfrAwT5vBW7/e48CctuYgYTRBcfLeo7XIIF5NQAXXBgb5pX
NpeOZ2ENDRDX38bJjsG8xDue4xkGWj4Fc0ps2fMCv5n/jOJUR5hP/6AN6cqagTIhsuQvA9rwmt7
kuwJLmCIR0Uk72Fd4g52phFKuYA3gwoYDGMZPzKgrWwNu4ClSRsmUIujJWp7nxnq5P3gfQWG12K
Q+G46Yj2TZ8auzMRMzUzLL4RuBvSPtDlRZK3PQ9TlZ9TLdQ==
X-Google-Smtp-Source: AGHT+IGhug7cxl/cassO/IyqM1BYqI+HrlsCLUeenObP/OwkoMoie1gUxelDQw1up4SjYw8ESiGKSQ==
X-Received: by 2002:a05:6402:26d0:b0:604:5cae:4031 with SMTP id 4fb4d7f45d1cf-606ea191815mr3688677a12.28.1749050745442;
Wed, 04 Jun 2025 08:25:45 -0700 (PDT)
Received: from puffmais.c.googlers.com (140.20.91.34.bc.googleusercontent.com. [34.91.20.140])
by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-606ed984f63sm1051640a12.58.2025.06.04.08.25.45
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 08:25:45 -0700 (PDT)
From: =?utf-8?q?Andr=C3=A9_Draszik?= <andre.draszik@xxxxxxxxxx>
Date: Wed, 04 Jun 2025 16:25:41 +0100
Subject: [PATCH 02/17] regulator: dt-bindings: add s2mpg10-pmic regulators
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Message-Id: <20250604-s2mpg1x-regulators-v1-2-6038740f49ae@xxxxxxxxxx>
References: <20250604-s2mpg1x-regulators-v1-0-6038740f49ae@xxxxxxxxxx>
In-Reply-To: <20250604-s2mpg1x-regulators-v1-0-6038740f49ae@xxxxxxxxxx>
To: Tudor Ambarus <tudor.ambarus@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>, Krzysztof Kozlowski <krzk@xxxxxxxxxx>,
Liam Girdwood <lgirdwood@xxxxxxxxx>, Mark Brown <broonie@xxxxxxxxxx>,
Lee Jones <lee@xxxxxxxxxx>, Linus Walleij <linus.walleij@xxxxxxxxxx>,
Bartosz Golaszewski <brgl@xxxxxxxx>
Cc: Peter Griffin <peter.griffin@xxxxxxxxxx>,
Will McVicker <willmcvicker@xxxxxxxxxx>, kernel-team@xxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-samsung-soc@xxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-gpio@xxxxxxxxxxxxxxx,
=?utf-8?q?Andr=C3=A9_Draszik?= <andre.draszik@xxxxxxxxxx>
X-Mailer: b4 0.14.2
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
The S2MPG10 PMIC is a Power Management IC for mobile applications with
buck converters, various LDOs, power meters, RTC, clock outputs, and
additional GPIOs interfaces.
It has 10 buck and 31 LDO rails. Several of these can either be
controlled via software or via external signals, e.g. input pins
connected to a main processor's GPIO pins.
Add documentation related to the regulator (buck & ldo) parts like
devicetree definitions, regulator naming patterns, and additional
properties.
S2MPG10 is typically used as the main-PMIC together with an S2MPG11
PMIC in a main/sub configuration, hence the datasheet and the binding
both suffix the rails with an 'm'.
Signed-off-by: André Draszik <andre.draszik@xxxxxxxxxx>
---
.../regulator/samsung,s2mpg10-regulator.yaml | 147 +++++++++++++++++++++
MAINTAINERS | 1 +
.../regulator/samsung,s2mpg10-regulator.h | 48 +++++++
3 files changed, 196 insertions(+)
diff --git a/Documentation/devicetree/bindings/regulator/samsung,s2mpg10-regulator.yaml b/Documentation/devicetree/bindings/regulator/samsung,s2mpg10-regulator.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..42dadf8a2ef606d85d66dca2470d44871f2d8d4b
--- /dev/null
+++ b/Documentation/devicetree/bindings/regulator/samsung,s2mpg10-regulator.yaml
@@ -0,0 +1,147 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/samsung,s2mpg10-regulator.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Samsung S2MPG10 Power Management IC regulators
+
+maintainers:
+ - André Draszik <andre.draszik@xxxxxxxxxx>
+
+description: |
+ This is part of the device tree bindings for the S2MG10 Power Management IC
+ (PMIC).
+
+ The S2MPG10 PMIC provides 10 buck and 31 LDO regulators.
+
+ See also Documentation/devicetree/bindings/mfd/samsung,s2mps11.yaml for
+ additional information and example.
+
+definitions:
+ s2mpg10-ext-control:
+ properties:
+ samsung,ext-control:
+ description: |
+ These rails can be controlled via one of several possible external
+ (hardware) signals. If so, this property configures the signal the PMIC
+ should monitor. For S2MPG10 rails where external control is possible other
+ than ldo20m, the following values generally corresponding to the
+ respective on-chip pin are valid:
+ - 0 # S2MPG10_PCTRLSEL_ON - always on
+ - 1 # S2MPG10_PCTRLSEL_PWREN - PWREN pin
+ - 2 # S2MPG10_PCTRLSEL_PWREN_TRG - PWREN_TRG bit in MIMICKING_CTRL
+ - 3 # S2MPG10_PCTRLSEL_PWREN_MIF - PWREN_MIF pin
+ - 4 # S2MPG10_PCTRLSEL_PWREN_MIF_TRG - PWREN_MIF_TRG bit in MIMICKING_CTRL
+ - 5 # S2MPG10_PCTRLSEL_AP_ACTIVE_N - ~AP_ACTIVE_N pin
+ - 6 # S2MPG10_PCTRLSEL_AP_ACTIVE_N_TRG - ~AP_ACTIVE_N_TRG bit in MIMICKING_CTRL
+ - 7 # S2MPG10_PCTRLSEL_CPUCL1_EN - CPUCL1_EN pin
+ - 8 # S2MPG10_PCTRLSEL_CPUCL1_EN2 - CPUCL1_EN & PWREN pins
+ - 9 # S2MPG10_PCTRLSEL_CPUCL2_EN - CPUCL2_EN pin
+ - 10 # S2MPG10_PCTRLSEL_CPUCL2_EN2 - CPUCL2_E2 & PWREN pins
+ - 11 # S2MPG10_PCTRLSEL_TPU_EN - TPU_EN pin
+ - 12 # S2MPG10_PCTRLSEL_TPU_EN2 - TPU_EN & ~AP_ACTIVE_N pins
+ - 13 # S2MPG10_PCTRLSEL_TCXO_ON - TCXO_ON pin
+ - 14 # S2MPG10_PCTRLSEL_TCXO_ON2 - TCXO_ON & ~AP_ACTIVE_N pins
+
+ For S2MPG10 ldo20m, the following values are valid
+ - 0 # S2MPG10_PCTRLSEL_LDO20M_ON - always on
+ - 1 # S2MPG10_PCTRLSEL_LDO20M_EN_SFR - VLDO20M_EN & LDO20M_SFR
+ - 2 # S2MPG10_PCTRLSEL_LDO20M_EN - VLDO20M_EN pin
+ - 3 # S2MPG10_PCTRLSEL_LDO20M_SFR - LDO20M_SFR in LDO_CTRL1 register
+ - 4 # S2MPG10_PCTRLSEL_LDO20M_OFF - disable
+
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 0
+ maximum: 14
+
+ samsung,ext-control-gpios:
+ description: |
+ For rails where external control is done via a GPIO, this optional
+ property describes the GPIO line used.
+
+ maxItems: 1
+
+ dependentRequired:
+ samsung,ext-control-gpios: [ "samsung,ext-control" ]
+
+patternProperties:
+ # 10 bucks
+ "^buck([1-9]|10)m$":
+ type: object
+ $ref: regulator.yaml#
+ unevaluatedProperties: false
+ description:
+ Properties for a single buck regulator.
+
+ properties:
+ regulator-ramp-delay:
+ enum: [6250, 12500, 25000]
+ default: 6250
+
+ allOf:
+ - $ref: "#/definitions/s2mpg10-ext-control"
+
+ # 13 standard LDOs
+ "^ldo([12]|2[1-9]|3[0-1])m$":
+ type: object
+ $ref: regulator.yaml#
+ unevaluatedProperties: false
+ description:
+ Properties for single LDO regulator.
+
+ properties:
+ regulator-ramp-delay: false
+
+ # 14 LDOs with possible external control
+ "^ldo([3-9]|1[046-9]|20)m$":
+ type: object
+ $ref: regulator.yaml#
+ unevaluatedProperties: false
+ description:
+ Properties for a single LDO regulator.
+
+ properties:
+ regulator-ramp-delay: false
+
+ allOf:
+ - $ref: "#/definitions/s2mpg10-ext-control"
+
+ # 4 LDOs with ramp support and possible external control
+ "^ldo1[1235]m$":
+ type: object
+ $ref: regulator.yaml#
+ unevaluatedProperties: false
+ description:
+ Properties for a single LDO regulator.
+
+ properties:
+ regulator-ramp-delay:
+ enum: [6250, 12500]
+ default: 6250
+
+ allOf:
+ - $ref: "#/definitions/s2mpg10-ext-control"
+
+additionalProperties: false
+
+allOf:
+ - if:
+ anyOf:
+ - required: [buck8m]
+ - required: [buck9m]
+ then:
+ patternProperties:
+ "^buck[8-9]m$":
+ properties:
+ samsung,ext-control: false
+
+ - if:
+ required:
+ - ldo20m
+ then:
+ properties:
+ ldo20m:
+ properties:
+ samsung,ext-control:
+ maximum: 4
diff --git a/MAINTAINERS b/MAINTAINERS
index 1615a93528bdfffa421eb8cad259fecd1488fc51..3fc6bd0dd15a504c498e56d425731b5234dce63a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -22006,6 +22006,7 @@ F: drivers/mfd/sec*.[ch]
F: drivers/regulator/s2m*.c
F: drivers/regulator/s5m*.c
F: drivers/rtc/rtc-s5m.c
+F: include/dt-bindings/regulator/samsung,s2m*.h
F: include/linux/mfd/samsung/
SAMSUNG S3C24XX/S3C64XX SOC SERIES CAMIF DRIVER
diff --git a/include/dt-bindings/regulator/samsung,s2mpg10-regulator.h b/include/dt-bindings/regulator/samsung,s2mpg10-regulator.h
new file mode 100644
index 0000000000000000000000000000000000000000..1d4e34a756efa46afeb9f018c3e8644ebc373b07
--- /dev/null
+++ b/include/dt-bindings/regulator/samsung,s2mpg10-regulator.h
@@ -0,0 +1,48 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright 2021 Google LLC
+ * Copyright 2025 Linaro Ltd.
+ *
+ * Device Tree binding constants for the Samsung S2MPG1x PMIC regulators
+ */
+
+#ifndef _DT_BINDINGS_REGULATOR_SAMSUNG_S2MPG10_H
+#define _DT_BINDINGS_REGULATOR_SAMSUNG_S2MPG10_H
+
+/*
+ * Several regulators may be controlled via external signals instead of via
+ * software. These constants describe the possible signals for such regulators
+ * and generally correspond to the respecitve on-chip pins. The constants
+ * suffixed with _TRG enable control using the respective bits in the
+ * MIMICKING_CTRL register instead.
+ *
+ * S2MPG10 regulators supporting these are:
+ * - buck1m .. buck7m buck10m
+ * - ldo3m .. ldo19m
+ *
+ * ldo20m supports external control, but using a different set of control
+ * signals.
+ */
+#define S2MPG10_PCTRLSEL_ON 0x0 /* always on */
+#define S2MPG10_PCTRLSEL_PWREN 0x1 /* PWREN pin */
+#define S2MPG10_PCTRLSEL_PWREN_TRG 0x2 /* PWREN_TRG bit in MIMICKING_CTRL */
+#define S2MPG10_PCTRLSEL_PWREN_MIF 0x3 /* PWREN_MIF pin */
+#define S2MPG10_PCTRLSEL_PWREN_MIF_TRG 0x4 /* PWREN_MIF_TRG bit in MIMICKING_CTRL */
+#define S2MPG10_PCTRLSEL_AP_ACTIVE_N 0x5 /* ~AP_ACTIVE_N pin */
+#define S2MPG10_PCTRLSEL_AP_ACTIVE_N_TRG 0x6 /* ~AP_ACTIVE_N_TRG bit in MIMICKING_CTRL */
+#define S2MPG10_PCTRLSEL_CPUCL1_EN 0x7 /* CPUCL1_EN pin */
+#define S2MPG10_PCTRLSEL_CPUCL1_EN2 0x8 /* CPUCL1_EN & PWREN pins */
+#define S2MPG10_PCTRLSEL_CPUCL2_EN 0x9 /* CPUCL2_EN pin */
+#define S2MPG10_PCTRLSEL_CPUCL2_EN2 0xa /* CPUCL2_E2 & PWREN pins */
+#define S2MPG10_PCTRLSEL_TPU_EN 0xb /* TPU_EN pin */
+#define S2MPG10_PCTRLSEL_TPU_EN2 0xc /* TPU_EN & ~AP_ACTIVE_N pins */
+#define S2MPG10_PCTRLSEL_TCXO_ON 0xd /* TCXO_ON pin */
+#define S2MPG10_PCTRLSEL_TCXO_ON2 0xe /* TCXO_ON & ~AP_ACTIVE_N pins */
+
+#define S2MPG10_PCTRLSEL_LDO20M_ON 0x0 /* always on */
+#define S2MPG10_PCTRLSEL_LDO20M_EN_SFR 0x1 /* LDO20M_EN & LDO20M_SFR */
+#define S2MPG10_PCTRLSEL_LDO20M_EN 0x2 /* VLDO20M_EN pin */
+#define S2MPG10_PCTRLSEL_LDO20M_SFR 0x3 /* LDO20M_SFR bit in LDO_CTRL1 register */
+#define S2MPG10_PCTRLSEL_LDO20M_OFF 0x4 /* disable */
+
+#endif /* _DT_BINDINGS_REGULATOR_SAMSUNG_S2MPG10_H */
--
2.49.0.1204.g71687c7c1d-goog
Return-Path: <linux-kernel+bounces-673441-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 922D341E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:27:06 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id D555F173E57
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:27:07 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 25E031D5ABF;
Wed, 4 Jun 2025 15:25:55 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Rs12x5s5"
Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 70D1F1A2C25
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:25:50 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.43
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749050752; cv=none; b=cwCWcOo4tGItkiv75ThCoRJ3bdppm/iNRNEbdUAw1QITfYfgACKHjrpmL++YvV5NCP8FlXLHkOLrvJX13pBx3dsK+gdrntN5U9XImU9RXmwFlb6voR9hd+q6TcMwJzUJPhvs7+UKcK45e4GJC0idGN1O+XiIzg/PewcXioLxTHw=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749050752; c=relaxed/simple;
bh=Gj+OkGgY96XAKccd1qEAmfoB1fWuf6GgMzaQtMdSNXA=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=oP6IjAbHL+5b951Ai5hnIS18PBlLeQQld5GvZo2zHju2BxwKnjz5CclSqgybi058S2I3XdisQby/kMoqP36rJpUpa3V1cfxq+6tFJv9JwVTL68O8aiZ4LE5dbcE0I4etm1FMJSnILubBeN4O8Kw5P7FKuKmFMMRhwOc+jroDO+k=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=Rs12x5s5; arc=none smtp.client-ip=209.85.208.43
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org
Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-60462000956so12098264a12.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 08:25:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=linaro.org; s=google; t=1749050749; x=1749655549; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=GivaCqfw+oHHkwskzA0HrsGk/OrrGEk7Uk/oqYQ1tlk=;
b=Rs12x5s5l6bap5cohSEG0hwzOkM2u4ZFJIn1/fqrDhrh2yJhCN78E9YRt9Gqhyjfup
WaijkXC040eioUZrbQigqq6c03xz0vtgISmGXcmiS65ZVIxjnny3HN45CE3049u9tOJC
p3A60+hCOVoV7SUOnhJwsyYdYaIGco5oHqs3tqtJ563s5h0o+I5kAboV9Yz3okA9q1MB
fx9i3T0SQqd33L8P1qcWcxmqOvg4xV5R5v4o6fYRBE/WItVrIy0DX945bHlP3Gab0JhP
qobqEY3e5ND2S4wTUtJ8E0FFZVKnNpcepTbGcDkgIz1qcsRQKT+oINW6GlDhHOrdIZhT
jnjg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749050749; x=1749655549;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=GivaCqfw+oHHkwskzA0HrsGk/OrrGEk7Uk/oqYQ1tlk=;
b=wLUM5uJaThkcQJsKkIVpIx00Yh2iMeBZTgaq8eerUBUJQQIGVUR99sYFMxCaa7uBel
GtkRxYgsXAOjVvlDOHfVSGngxxRJZfwSxc3B6KH/nWD3QseAU9PRJrV0WLZYBtoNs3wM
0YSOu+A06C02q1rrI/gFYPGJG+b1gkkI8nMxObmlRwlF0xal0dYV4sBX2jJ942tNMiyM
rQfNGgFeFBASIayk9fvW92fBd67/q0ICesVtBsTftwz0Ij5x/6MtKtH2s2snry1Ho/Oz
H9r0eCpumjQkOihhSmX6dLxvvGjgEB7enWqoOSlVtKhtvavxoCBz9CeFdzt7uqzTcfPQ
YmgQ==
X-Forwarded-Encrypted: i=1; AJvYcCUz/V9ntTWFZGb8TRBldVXuXFo21qzqz8vMhO8hp15d8G8UjSeP2eIndXhTUpZnyDiJvrP4FyS1JARr930=@vger.kernel.org
X-Gm-Message-State: AOJu0YzSwuA9adsebJeDuiRSxZLKCIYwZTbMi37yadyiLHeBhynSrUTl
CRPXQ5AcfdUXNss0jBKMU+WyMbKB5KoYk5bKncalMZR0OxA3Z/ErLZmGosu+PZ7TOaE=
X-Gm-Gg: ASbGncuMLre97qELgUGy5dwRoz2odgQUO8c2BWgmLVuhly4g45NiEUzLvNqH4okS3/o
WU0kHnJ+G6fBAPUzVg5uUifG3Kq1g4FDInumeFqyBu0rUViKCD9XbOGOw6ws7ddJt3VYRkYgKsC
hd3PnS6swbib6BxjgIPWjZbbyKmX3PYRm3n5P7TeyrKwPo9uqt2HgSkXbOkL7hdMuGTGVKM6c9a
v1WJ9dozaAbe2to4lb+vGq+VRE/6QvEJGi2fEJDHdrFVDOOVAMTpP4EhsQ7x+Ytk7WXrfLGVTCM
Q6/iYzenT5hPfsmDrI4HkA0edt/MdyG/dCfEG1LY2O/+mKnwjPB8E3ugEQ+G6QPSZganKaCjwHo
0RKlwfY9IwR9zfTsI3UIFc3lIxSNhKzxFhD0=
X-Google-Smtp-Source: AGHT+IGV8hMofF63zCcJFZH5e/p1yvyUoeRTRE3SZ/3LkqyGQ9VGgvqlN/UR+F68PovdxN0Atb8y8w==
X-Received: by 2002:a05:6402:1ecf:b0:606:4d43:e647 with SMTP id 4fb4d7f45d1cf-606ea16e715mr3425583a12.24.1749050748992;
Wed, 04 Jun 2025 08:25:48 -0700 (PDT)
Received: from puffmais.c.googlers.com (140.20.91.34.bc.googleusercontent.com. [34.91.20.140])
by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-606ed984f63sm1051640a12.58.2025.06.04.08.25.48
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 08:25:48 -0700 (PDT)
From: =?utf-8?q?Andr=C3=A9_Draszik?= <andre.draszik@xxxxxxxxxx>
Date: Wed, 04 Jun 2025 16:25:46 +0100
Subject: [PATCH 07/17] mfd: sec-common: Instantiate s2mpg10 bucks and ldos
separately
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Message-Id: <20250604-s2mpg1x-regulators-v1-7-6038740f49ae@xxxxxxxxxx>
References: <20250604-s2mpg1x-regulators-v1-0-6038740f49ae@xxxxxxxxxx>
In-Reply-To: <20250604-s2mpg1x-regulators-v1-0-6038740f49ae@xxxxxxxxxx>
To: Tudor Ambarus <tudor.ambarus@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>, Krzysztof Kozlowski <krzk@xxxxxxxxxx>,
Liam Girdwood <lgirdwood@xxxxxxxxx>, Mark Brown <broonie@xxxxxxxxxx>,
Lee Jones <lee@xxxxxxxxxx>, Linus Walleij <linus.walleij@xxxxxxxxxx>,
Bartosz Golaszewski <brgl@xxxxxxxx>
Cc: Peter Griffin <peter.griffin@xxxxxxxxxx>,
Will McVicker <willmcvicker@xxxxxxxxxx>, kernel-team@xxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-samsung-soc@xxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-gpio@xxxxxxxxxxxxxxx,
=?utf-8?q?Andr=C3=A9_Draszik?= <andre.draszik@xxxxxxxxxx>
X-Mailer: b4 0.14.2
X-Spam-Status: No, score=-2.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,LOTS_OF_MONEY,
MAILING_LIST_MULTI,MONEY_NOHTML,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Bucks can conceivably be used as supplies for LDOs, which means we need
to instantiate them separately from each other so that the supply-
consumer links can be resolved successfully at probe time.
By doing so, the kernel will defer and retry instantiating the LDOs
once BUCKs have been created while without this change, it can be
impossible to mark BUCKs as LDO supplies. This becomes particularly
an issue with the upcoming support for the S2MPG11 PMIC, where
typically certain S2MP10/11 buck rails supply certain S2MP11/10 LDO
rails.
The platform_device's ::id field is used to inform the regulator driver
which type of regulators (buck or ldo) to instantiate.
Signed-off-by: André Draszik <andre.draszik@xxxxxxxxxx>
---
drivers/mfd/sec-common.c | 4 +++-
include/linux/mfd/samsung/s2mpg10.h | 5 +++++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/mfd/sec-common.c b/drivers/mfd/sec-common.c
index 42d55e70e34c8d7cd68cddaecc88017e259365b4..8a1694c6ed8708397a51ebd4a49c22387d7e3495 100644
--- a/drivers/mfd/sec-common.c
+++ b/drivers/mfd/sec-common.c
@@ -14,6 +14,7 @@
#include <linux/mfd/core.h>
#include <linux/mfd/samsung/core.h>
#include <linux/mfd/samsung/irq.h>
+#include <linux/mfd/samsung/s2mpg10.h>
#include <linux/mfd/samsung/s2mps11.h>
#include <linux/mfd/samsung/s2mps13.h>
#include <linux/module.h>
@@ -35,7 +36,8 @@ static const struct mfd_cell s2dos05_devs[] = {
static const struct mfd_cell s2mpg10_devs[] = {
MFD_CELL_NAME("s2mpg10-meter"),
- MFD_CELL_NAME("s2mpg10-regulator"),
+ MFD_CELL_BASIC("s2mpg10-regulator", NULL, NULL, 0, S2MPG10_REGULATOR_CELL_ID_BUCKS),
+ MFD_CELL_BASIC("s2mpg10-regulator", NULL, NULL, 0, S2MPG10_REGULATOR_CELL_ID_LDOS),
MFD_CELL_NAME("s2mpg10-rtc"),
MFD_CELL_OF("s2mpg10-clk", NULL, NULL, 0, 0, "samsung,s2mpg10-clk"),
MFD_CELL_OF("s2mpg10-gpio", NULL, NULL, 0, 0, "samsung,s2mpg10-gpio"),
diff --git a/include/linux/mfd/samsung/s2mpg10.h b/include/linux/mfd/samsung/s2mpg10.h
index 9f5919b89a3c286bf1cd6b3ef0e74bc993bff01a..3e8bc65078472518c5e77f8bd199ee403eda18ea 100644
--- a/include/linux/mfd/samsung/s2mpg10.h
+++ b/include/linux/mfd/samsung/s2mpg10.h
@@ -8,6 +8,11 @@
#ifndef __LINUX_MFD_S2MPG10_H
#define __LINUX_MFD_S2MPG10_H
+enum s2mpg10_regulator_mfd_cell_id {
+ S2MPG10_REGULATOR_CELL_ID_BUCKS = 1,
+ S2MPG10_REGULATOR_CELL_ID_LDOS = 2,
+};
+
/* Common registers (type 0x000) */
enum s2mpg10_common_reg {
S2MPG10_COMMON_CHIPID,
--
2.49.0.1204.g71687c7c1d-goog
Return-Path: <linux-kernel+bounces-673442-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 66D1941E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:27:35 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 4883C7AB70D
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:25:51 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 704761D63E6;
Wed, 4 Jun 2025 15:25:55 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="TOxSmiuu"
Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 42AA91A0711
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:25:50 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.53
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749050753; cv=none; b=JBJZnhXUX/7gm/WoxgteBJ2wLWel4DV2EBkGdurcjU2+CJgnnqBNIJEKbmJxHInehs/EsqUPgNO0dIr6KsTLlz75XadNew38k1PqfVHoGrDcJlg/S5x9ZqJ0unebTs1CLeGOVRC67d7jXGV0C9OWitIEAIWitr7worrtUTwJ4nc=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749050753; c=relaxed/simple;
bh=j0GuHj7/ZWHalZNJJKYALf4n+0SGhUawk93aep6mVzU=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=XXH4N/IfSaChsgQxrI2ZNFNdLNfNpB0hWd5FT1M4TPFVTfYL96iRq1aXo5t63Esnh2zagiwNfCbuxPocsoHlmEimU/IrqQ9X8RDp3VrUJ5fTqAe+zO129F1czAvztlTeXnLHU48WKfKg4GT7mSy+jUUZ5I9k2uFM/vsbNd/jTG0=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=TOxSmiuu; arc=none smtp.client-ip=209.85.208.53
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org
Received: by mail-ed1-f53.google.com with SMTP id 4fb4d7f45d1cf-60461fc88d7so14038256a12.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 08:25:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=linaro.org; s=google; t=1749050748; x=1749655548; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=0u44+fUCPUbXjNG3Yeye3uYWIaUqk694d8ypWgEWxmc=;
b=TOxSmiuuOIVEo/F08dulkHvZzIp0ij1IJ0DnYwF7gj1HIoaTBeVKZ/FnmNKC7HDoTs
OB1QQTuA8lHSpE+ARFwqX/mGp7NeoRjpzM+96CY+n5CSZsRdTHGihy6XxLWrRaCCfz1e
TsbVg9iDGHvfn8NhfyfxYNG/RH4oQa0vneZEqhP2EMRoAxBVIi/+uecvq951VvbUM6iL
fpNC7D/d+RfghTH9MJ9ZmEywlS9YNDJsPgzkE6/u2HJLOUEuWA41t2hRrBamcTO7kCeH
mhSxTsmKnchlDVD0eE9H2RWyeXR7bv0et5X7QvNwP0Q8IkzlCk8ymanrSGUw/p/gwr1M
ZxoA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749050748; x=1749655548;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=0u44+fUCPUbXjNG3Yeye3uYWIaUqk694d8ypWgEWxmc=;
b=cJTHsoegDM5gJi4SLqXlkJmqoktbPeOeeTYXEVoq598rI2cqBZpXg/aKr8lANvwPwb
vpmCU/mb8fdkCAnk/nhXd7Xy8G3fcdb2pWz1exHDVVePyq2WC1gh/uHtp7S21hV7XEYP
c5QLueNgfayDhRzlPMCWaKlIpmx0gs/UpT12kaKZ4rri8JyJDmSweeSK3fC/crBY0AXC
YelMeldR2n4dwC5ifH8BoDcKuIV8Jv/mvn+Jdu2e+p05/HJcar3a7D6VS2Bmq+U/NOdP
xS8i7bZjH/izGvrwr677vTKXZmErifzh3KtcZvhZBzcRNABjNh4H6J1FSByMegUwJlLz
Gnpg==
X-Forwarded-Encrypted: i=1; AJvYcCU4n+0+AQZKMmI7VgNRAJUJe78IOFm5mNxDM7GeQyLsbgSWZDYNwGoIFynlsyaE8UsoF9wWl2jHC5hV0OM=@vger.kernel.org
X-Gm-Message-State: AOJu0YwnFI6VIYU3j9p8mJEaWAD6YuvpfP4BSbrFgLk7jIkFV1fs4ukQ
1A/bCDrSsA22xNg27zR+/VUqJqCaigC3B50hXA4hz6pKlm2IzfXBmFauzTXi9sSiW0M=
X-Gm-Gg: ASbGncuPOMA+FxtXZBU/6P2sCoDVdAuXL8aIu2Ksh9DwRZskFlDzIZWZKS69uaTLLxx
/txcl3BkUsBVyX16VJcJqJh/G473aiwSorwuPhY5uMJiBermrS3NbVtdh2PaamYNfO3bIMufNgF
zlozuVuCIr1YNAtXFDteItoqW9K+KyalE7+JJOlGrAaNsFUydmLveLrf0VYMKk+pw/bOqy4mi/Z
mxVm8yodgh2/O9TJezE6Of4b0+qLeloZVkns3VYnLNum9MFWnPquEjdjdQ7dgipAhkBcqF4ZNlC
ucRTrqJdviOwUAMweGBRCyLz6Ew4Kwc1l/ihodbqb6KrMViJFxm1blDPAa4dIW+4RZcQS95y3y2
oCPPE6LB9uZq4xa9Iu07Lsj82c2Pi4pVfM5Y=
X-Google-Smtp-Source: AGHT+IHNAC7ImHn1/O1ztYLzbmZYe73jvmUwIhXjFO7kKauTSDKLz6MSUnHCtZ7LDe45RKA4CdqcaA==
X-Received: by 2002:a05:6402:26cd:b0:606:b6ba:3595 with SMTP id 4fb4d7f45d1cf-606f0fd23d5mr2931176a12.32.1749050748489;
Wed, 04 Jun 2025 08:25:48 -0700 (PDT)
Received: from puffmais.c.googlers.com (140.20.91.34.bc.googleusercontent.com. [34.91.20.140])
by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-606ed984f63sm1051640a12.58.2025.06.04.08.25.48
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 08:25:48 -0700 (PDT)
From: =?utf-8?q?Andr=C3=A9_Draszik?= <andre.draszik@xxxxxxxxxx>
Date: Wed, 04 Jun 2025 16:25:45 +0100
Subject: [PATCH 06/17] dt-bindings: firmware: google,gs101-acpm-ipc: update
PMIC examples
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Message-Id: <20250604-s2mpg1x-regulators-v1-6-6038740f49ae@xxxxxxxxxx>
References: <20250604-s2mpg1x-regulators-v1-0-6038740f49ae@xxxxxxxxxx>
In-Reply-To: <20250604-s2mpg1x-regulators-v1-0-6038740f49ae@xxxxxxxxxx>
To: Tudor Ambarus <tudor.ambarus@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>, Krzysztof Kozlowski <krzk@xxxxxxxxxx>,
Liam Girdwood <lgirdwood@xxxxxxxxx>, Mark Brown <broonie@xxxxxxxxxx>,
Lee Jones <lee@xxxxxxxxxx>, Linus Walleij <linus.walleij@xxxxxxxxxx>,
Bartosz Golaszewski <brgl@xxxxxxxx>
Cc: Peter Griffin <peter.griffin@xxxxxxxxxx>,
Will McVicker <willmcvicker@xxxxxxxxxx>, kernel-team@xxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-samsung-soc@xxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-gpio@xxxxxxxxxxxxxxx,
=?utf-8?q?Andr=C3=A9_Draszik?= <andre.draszik@xxxxxxxxxx>
X-Mailer: b4 0.14.2
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
In a typical system using the Samsung S2MPG10 PMIC, an S2MPG11 is used
as a sub-PMIC.
The interface for both is the ACPM firmware protocol, so update the
example here to describe the connection for both.
Signed-off-by: André Draszik <andre.draszik@xxxxxxxxxx>
---
.../bindings/firmware/google,gs101-acpm-ipc.yaml | 40 ++++++++++++++++++++--
1 file changed, 37 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/firmware/google,gs101-acpm-ipc.yaml b/Documentation/devicetree/bindings/firmware/google,gs101-acpm-ipc.yaml
index 62a3a7dac5bd250a7f216c72f3315cd9632d93e1..408cf84e426b80b6c06e69fda87d0f8bfc61498d 100644
--- a/Documentation/devicetree/bindings/firmware/google,gs101-acpm-ipc.yaml
+++ b/Documentation/devicetree/bindings/firmware/google,gs101-acpm-ipc.yaml
@@ -36,6 +36,15 @@ properties:
compatible:
const: samsung,s2mpg10-pmic
+ pmic2:
+ description: Child node describing the sub PMIC.
+ type: object
+ additionalProperties: true
+
+ properties:
+ compatible:
+ const: samsung,s2mpg11-pmic
+
shmem:
description:
List of phandle pointing to the shared memory (SHM) area. The memory
@@ -52,7 +61,9 @@ additionalProperties: false
examples:
- |
+ #include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/irq.h>
+ #include <dt-bindings/regulator/samsung,s2mpg10-regulator.h>
power-management {
compatible = "google,gs101-acpm-ipc";
@@ -63,12 +74,20 @@ examples:
compatible = "samsung,s2mpg10-pmic";
interrupts-extended = <&gpa0 6 IRQ_TYPE_LEVEL_LOW>;
+ vinl3m-supply = <&buck8m>;
+
regulators {
ldo1m {
regulator-name = "vdd_ldo1";
regulator-min-microvolt = <700000>;
regulator-max-microvolt = <1300000>;
- regulator-always-on;
+ };
+
+ ldo20m {
+ regulator-name = "vdd_ldo1";
+ regulator-min-microvolt = <700000>;
+ regulator-max-microvolt = <1300000>;
+ samsung,ext-control = <S2MPG10_PCTRLSEL_LDO20M_EN>;
};
// ...
@@ -77,8 +96,23 @@ examples:
regulator-name = "vdd_mif";
regulator-min-microvolt = <450000>;
regulator-max-microvolt = <1300000>;
- regulator-always-on;
- regulator-boot-on;
+ regulator-ramp-delay = <6250>;
+ };
+ };
+ };
+
+ pmic2 {
+ compatible = "samsung,s2mpg11-pmic";
+ interrupts-extended = <&gpa0 7 IRQ_TYPE_LEVEL_LOW>;
+
+ vinl1s-supply = <&buck8m>;
+ vinl2s-supply = <&buck6s>;
+
+ regulators {
+ buckd {
+ regulator-ramp-delay = <6250>;
+ samsung,ext-control = <S2MPG11_PCTRLSEL_UFS_EN>;
+ samsung,ext-control-gpios = <&gpp0 1 GPIO_ACTIVE_HIGH>;
};
};
};
--
2.49.0.1204.g71687c7c1d-goog
Return-Path: <linux-kernel+bounces-673444-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id E1A7A41E003FB
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:28:06 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id CD3973A8BBB
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:27:26 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 6820919D07E;
Wed, 4 Jun 2025 15:26:00 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="RCTdkX5y"
Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id B47E11C1AB4
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:25:52 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.49
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749050756; cv=none; b=OvpmCakFaSOmMhX7eXpFw6lN0e3LiT28xPQwKKtfAhOYcBUVEe50WJ5udv/UqXCrb2ttuFtUsTFpXfjaU+4OoaFEfdfAh2HfEmw9qIDWL+0KMs5yrTILsnCrfmliDh0fH7E+lIxcN/fEA5nBWiGHu4KzBPvXAXY/Q/0JgU6ga9M=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749050756; c=relaxed/simple;
bh=c2aRLM4UNSTnoEX6tceyJE+UXM8XBojhYH6J3V4X4cc=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=SN+CjlMEGmEyfUnkaHF5G0bf/vfHasoHAF1W5YJUwWXn+pjxCjg4aYIXpGyH4zeaLlUISLskDPnPydezLWzxtpDLrDW9lT50cPIG6/RiFVRvBTjKvz/Unyt+OrXaakDZQ+pQLm415GsgVHw/VDvFW0sv1EX2U2W1/pbqkDYaCgI=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=RCTdkX5y; arc=none smtp.client-ip=209.85.208.49
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org
Received: by mail-ed1-f49.google.com with SMTP id 4fb4d7f45d1cf-60702d77c60so1282740a12.3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 08:25:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=linaro.org; s=google; t=1749050751; x=1749655551; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=Nr/ud4zCPtVSNmlxUwtSLJlr6giftd88C51EN2S0gME=;
b=RCTdkX5y6y61cZ1/PjbmEFR4csWju1gNFmE54iz2BB5eDX4D1FXMr/SI6PQCIdqxJT
SF412z/fJheyqeizghdYJMKsUFjck4D4FnZcP3RsxgMBhqj6Xv3+B3YsZqY4Z5f7VCvt
dCaOUZ1RHULFMxVzzZdGyVZpeBDyS/8WKsyCbSvn3I+BcnuhTL4ZOyuI6bcUc9tisMr3
GN/zEaRCE95NokJO0KeXqcha40ceRDbwyZZ96PlgXAVNIJqvKuoF9U/2KhmFQ/8MPj4w
Cfp7bHxSJjsjDpX9RZE4sYF5lP3NcxrXZGnlfTubwqgchwTOWE/fheqU3wasEaCzZBCq
AZjQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749050751; x=1749655551;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=Nr/ud4zCPtVSNmlxUwtSLJlr6giftd88C51EN2S0gME=;
b=Epxr7wiIw9KVP6IUUh1zYciMTF4IAGrXruyq9lB75RWh1f3bdHQlAYPMIeRCYu9ST1
NaBW0ZzmgpMGhX1KTglPDF+BAhCfFeUYx76v7bZduW5Dy8LpuayJglFEgKYkpyIIppe+
DXBNbdhaTmiUMnzE+eN4uUu25H0jieNLsIjEKwoXyOWO/qciOBcZ4eFiE+cZt0MDFQZG
U5gZd4vvQ0PUZ/WHH4gyuKgO4MAG7bUvAqbMFdIg09KSFGWhT4aVifBn2o4FDnKjZaz3
GFlSClroQpuonjz0oWGtFNlGHvEWGk5HGX7dkiSs29HVGg6zHAB2X7G9FLi6LwFTQETE
z3DQ==
X-Forwarded-Encrypted: i=1; AJvYcCU5mK3Q78nEAdjJ8pwZVgyJN7mS5BkOwx2+PMns0QsKI1UyWT+OPx7Hvlx37RgaFeLX42cqywGU6UNwlN0=@vger.kernel.org
X-Gm-Message-State: AOJu0YyLkljSHwLC6OEc+rB8P/OOjvMerSauA76UXUFIXWbkxDJqVQCu
nFakyDu+E9QaGHSbZF9NU1+yaCh+6cGh5j51/kmtycM6jWdiJk285fvhuoH0MTtZRLw=
X-Gm-Gg: ASbGncvknL15Ytp7qjTOzjWIiSA1V4XQWyQUO+xK0S3BDA2t3LEBkersYB46BVz78Mu
9NuAFopeglsZ/sFoqjkxROLNNjMKq2j90Y1zaTxaw8UttMrg+8qbiBkae2ry/GdJf2EkLIIHCcV
jdNSoSPdFXDt/AuvWg1cO2OtGcoBK0KUduH0fetn1G8Ebym5Z7i4gPg01qneZYbDEmcA/zPSFr9
yQNeKbI/euzgErEA1lct3Lw0EcFN0iHPbTBGa/mLLDPf87wLRf8l/ONAlW4AHfHp1WxfNVtD0WG
W7dJfuiFeYpKgilTGJ0SaM1i01mjf4ZJvx4AEHV2MBJ91/GUNWhhFFST1PD98+Ae4Dbr3HFs+ua
HTDRO/k870RG/dwbZtSyn0I8zB/B7pgxqyIs=
X-Google-Smtp-Source: AGHT+IFqvldrqbeuGwwG4MXV9h4Mso8s2QOVanNgW1TR6F0t21NbLRfi956cnkhEqPoH4VqrXxVIDA==
X-Received: by 2002:a05:6402:40ca:b0:601:89d4:968e with SMTP id 4fb4d7f45d1cf-606f0ed4379mr2974440a12.27.1749050750975;
Wed, 04 Jun 2025 08:25:50 -0700 (PDT)
Received: from puffmais.c.googlers.com (140.20.91.34.bc.googleusercontent.com. [34.91.20.140])
by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-606ed984f63sm1051640a12.58.2025.06.04.08.25.50
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 08:25:50 -0700 (PDT)
From: =?utf-8?q?Andr=C3=A9_Draszik?= <andre.draszik@xxxxxxxxxx>
Date: Wed, 04 Jun 2025 16:25:49 +0100
Subject: [PATCH 10/17] regulator: s2mps11: use dev_err_probe() where
appropriate
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Message-Id: <20250604-s2mpg1x-regulators-v1-10-6038740f49ae@xxxxxxxxxx>
References: <20250604-s2mpg1x-regulators-v1-0-6038740f49ae@xxxxxxxxxx>
In-Reply-To: <20250604-s2mpg1x-regulators-v1-0-6038740f49ae@xxxxxxxxxx>
To: Tudor Ambarus <tudor.ambarus@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>, Krzysztof Kozlowski <krzk@xxxxxxxxxx>,
Liam Girdwood <lgirdwood@xxxxxxxxx>, Mark Brown <broonie@xxxxxxxxxx>,
Lee Jones <lee@xxxxxxxxxx>, Linus Walleij <linus.walleij@xxxxxxxxxx>,
Bartosz Golaszewski <brgl@xxxxxxxx>
Cc: Peter Griffin <peter.griffin@xxxxxxxxxx>,
Will McVicker <willmcvicker@xxxxxxxxxx>, kernel-team@xxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-samsung-soc@xxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-gpio@xxxxxxxxxxxxxxx,
=?utf-8?q?Andr=C3=A9_Draszik?= <andre.draszik@xxxxxxxxxx>
X-Mailer: b4 0.14.2
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
dev_err_probe() exists to simplify code and harmonise error messages,
there's no reason not to use it here.
While at it, harmonise some error messages to add regulator name and ID
like in other messages in this driver, and update messages to be more
similar to other child-drivers of this PMIC (e.g. RTC).
Signed-off-by: André Draszik <andre.draszik@xxxxxxxxxx>
---
drivers/regulator/s2mps11.c | 29 ++++++++++++++---------------
1 file changed, 14 insertions(+), 15 deletions(-)
diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
index 1f51fbc6c7b6e158f9707c04d9f030b9eee5e842..30586e9884bfb998ff07e3148813344b307506c0 100644
--- a/drivers/regulator/s2mps11.c
+++ b/drivers/regulator/s2mps11.c
@@ -1249,9 +1249,9 @@ static int s2mps11_pmic_probe(struct platform_device *pdev)
BUILD_BUG_ON(S2MPS_REGULATOR_MAX < ARRAY_SIZE(s2mpu05_regulators));
break;
default:
- dev_err(&pdev->dev, "Invalid device type: %u\n",
- s2mps11->dev_type);
- return -EINVAL;
+ return dev_err_probe(&pdev->dev, -ENODEV,
+ "Unsupported device type %d\n",
+ s2mps11->dev_type);
}
s2mps11->ext_control_gpiod = devm_kcalloc(&pdev->dev, rdev_num,
@@ -1290,21 +1290,20 @@ static int s2mps11_pmic_probe(struct platform_device *pdev)
devm_gpiod_unhinge(&pdev->dev, config.ena_gpiod);
regulator = devm_regulator_register(&pdev->dev,
®ulators[i], &config);
- if (IS_ERR(regulator)) {
- dev_err(&pdev->dev, "regulator init failed for %d\n",
- i);
- return PTR_ERR(regulator);
- }
+ if (IS_ERR(regulator))
+ return dev_err_probe(&pdev->dev, PTR_ERR(regulator),
+ "regulator init failed for %d/%s\n",
+ regulators[i].id,
+ regulators[i].name);
if (config.ena_gpiod) {
ret = s2mps14_pmic_enable_ext_control(s2mps11,
- regulator);
- if (ret < 0) {
- dev_err(&pdev->dev,
- "failed to enable GPIO control over %s: %d\n",
- regulator->desc->name, ret);
- return ret;
- }
+ regulator);
+ if (ret < 0)
+ return dev_err_probe(&pdev->dev, ret,
+ "failed to enable GPIO control over %d/%s\n",
+ regulator->desc->id,
+ regulator->desc->name);
}
}
--
2.49.0.1204.g71687c7c1d-goog
Return-Path: <linux-kernel+bounces-673443-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id D1EA741E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:28:06 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id BB0397AB635
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:26:08 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 066301991D2;
Wed, 4 Jun 2025 15:25:59 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="cEEDtvhr"
Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id EA0C81AF0B4
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:25:51 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.54
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749050753; cv=none; b=k4q2mLKSDDMgXZQbyODPgx9RljiSRVnjU+WXnewfMfSANU8FfXg8a7sgemZUV/6qtyVWfF4As9Nrxyxy9GhbLNz++wUT/TfFjX677uy5UCKBuYJ6xvErxTeH1B2d0jc4q9mmqJR/4OxWPunO99pCcAuJIu0fPHN6QU7sLRQQRxo=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749050753; c=relaxed/simple;
bh=ZloWrNFeMmVe3/HDuD1aXKWP+8PNEOlvbHUi95SknjM=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=bTCRqNB1r9seJjNBRo2DD+oVkih1/uaFvFqvWMcPQNQ4VHCxquCBsWqpov9MdNrRhsliXXCbfZINCTd48PQC6BIlmh+QcKrzqeGMOGsyFu+kjj8sXl810EXAH6CdtQAdAf++RkSpK7H5s32RNoCoeGibIpqUwOexaH7BgAtkuQ4=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=cEEDtvhr; arc=none smtp.client-ip=209.85.208.54
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org
Received: by mail-ed1-f54.google.com with SMTP id 4fb4d7f45d1cf-601dfef6a8dso11559567a12.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 08:25:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=linaro.org; s=google; t=1749050750; x=1749655550; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=RK6fDlVurrAhSO63sHrDo/ZYoV5lV5EQ9BPN02YtAuw=;
b=cEEDtvhr+N7PEGXPEhrUeFyCa2qMbNtm/P0Ohq03cvSAEPWkKTQWaWgvMzPAwZ3viP
zRE3yGsRYKJMYizY12jupVh2sj3akcOfCWdc/140wTbE2OBIDZWodN3ul+idJosE70Wl
BY/6GrHREpcUeewuFqLXsOvtYOV1JaskxSaHVUbsJyyOHlWHBLbNi0mNS/pfnmupNFSA
tXt9l0KeJhXI7DAkb0Zl2aQOo6P5IA35b9XKeGqJJURCP+AVdn4so4fa8Ezk3m3TXbqv
4dhlX32QPgpnBAjxfTJCg3PHnfEAX3Ig3NsyaNCKZKqNb2OwczUasGSt2lB0HXxTLiRm
QM1Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749050750; x=1749655550;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=RK6fDlVurrAhSO63sHrDo/ZYoV5lV5EQ9BPN02YtAuw=;
b=k9gxveYlgfSoX0x44IduClkhDBY+nx6Dn4D0BYrN/ND89gQMKDhF9VWXRA0r50fsC3
PHqL9YcnHIuqBzdN6Lp/1ir8HHABV/Pi6FDchEISsQie+tSBs9LmmcG9dw+3NxNyjVf5
sfxLyY3/16Y7mzRUR9uNZ2OcEmdN0PZG5Xvxf/tsuKnyr2lq3SUdTH4u8CAPOYk1UlVi
lFMBC6zkMdgytqfAMQ0ltbCOYruZh43jlkCay4d7iYohiD9w4Sm4WTb0eiBtzq70zQmd
nO3IhhMDtp9ZOLoN+RAS0qEweicwfMip7jNEU2fHW7wqkoh9ECvbNyULr67U44PMlq4Y
OqIg==
X-Forwarded-Encrypted: i=1; AJvYcCX6f8uc4d1XZRu9X01vaKaqt8aSGFx8K1YX7/a+MBXsLzJADqJBxEqWtR47dcEpXhgf65Bmn4lGDnxGWgQ=@vger.kernel.org
X-Gm-Message-State: AOJu0YxbwUa01VhUsatyqwIEShnPB/XbFuxr8ml+8yowYKrZv7ZMxqTU
8gTuZl3orC7G0worfTmJLzZVJN4bxz7w5YhA9vCkffa/3qOddOafQCDDJuXAGJXH/Is=
X-Gm-Gg: ASbGncthwN44XXe6Gar5fvXdbuFBFiZA7i4tdx03F/bJm7dOsZZuhzFVotj8etMlWwV
6iEcex1fHa+lkMArUFxI5IzHtiBYZ35Mree52JkKm5Gbqz4Sr3kERAJTutcyGZD49vHioPkJ2qW
mBhmo+SNU/1KR0Q+9eXGBCwZHe9nOCfzFQmmKrtzClpaaKTsIp3wYsys6UFCh3SrRDa9giRrHIp
aFcQmKNczIhPfduKlLbsw3CHWaGLMGkUIKv70vhC57H8OB7/zgqXf3fNWfZv4sFpz/C7G4JniMh
GQIffZMWXvxBkHq4zuXYYHAVnWKYiCG27lIkmCJYyzvlyjF6IeuZKKwB5G3s7DdJ6SOyYoxhTRa
osAw0RIxwqpwJx3YyfnW1DjcNqH9EpI/sDO3/c7ID07aPSw==
X-Google-Smtp-Source: AGHT+IGie5OT/C4dKIZS01jGdu9pcMB4S96GfIIlXrVLkYBNWiD38sd2vviPzRoeqlZOJ6SG51yRIg==
X-Received: by 2002:a05:6402:1d49:b0:601:31e6:698d with SMTP id 4fb4d7f45d1cf-606ea190c59mr3038407a12.23.1749050750307;
Wed, 04 Jun 2025 08:25:50 -0700 (PDT)
Received: from puffmais.c.googlers.com (140.20.91.34.bc.googleusercontent.com. [34.91.20.140])
by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-606ed984f63sm1051640a12.58.2025.06.04.08.25.49
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 08:25:49 -0700 (PDT)
From: =?utf-8?q?Andr=C3=A9_Draszik?= <andre.draszik@xxxxxxxxxx>
Date: Wed, 04 Jun 2025 16:25:48 +0100
Subject: [PATCH 09/17] regulator: s2mps11: drop two needless variable
initialisations
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Message-Id: <20250604-s2mpg1x-regulators-v1-9-6038740f49ae@xxxxxxxxxx>
References: <20250604-s2mpg1x-regulators-v1-0-6038740f49ae@xxxxxxxxxx>
In-Reply-To: <20250604-s2mpg1x-regulators-v1-0-6038740f49ae@xxxxxxxxxx>
To: Tudor Ambarus <tudor.ambarus@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>, Krzysztof Kozlowski <krzk@xxxxxxxxxx>,
Liam Girdwood <lgirdwood@xxxxxxxxx>, Mark Brown <broonie@xxxxxxxxxx>,
Lee Jones <lee@xxxxxxxxxx>, Linus Walleij <linus.walleij@xxxxxxxxxx>,
Bartosz Golaszewski <brgl@xxxxxxxx>
Cc: Peter Griffin <peter.griffin@xxxxxxxxxx>,
Will McVicker <willmcvicker@xxxxxxxxxx>, kernel-team@xxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-samsung-soc@xxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-gpio@xxxxxxxxxxxxxxx,
=?utf-8?q?Andr=C3=A9_Draszik?= <andre.draszik@xxxxxxxxxx>
X-Mailer: b4 0.14.2
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
The initialisations being removed are needless, as both variables are
being assigned values unconditionally further down. Additionally, doing
this eager init here might lead to preventing the compiler from issuing
a warning if a future code change actually forgets to assign a useful
value in some code path.
Signed-off-by: André Draszik <andre.draszik@xxxxxxxxxx>
---
drivers/regulator/s2mps11.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
index 04ae9c6150bd5ae9dba47b9b3cfcfb62e4698b6d..1f51fbc6c7b6e158f9707c04d9f030b9eee5e842 100644
--- a/drivers/regulator/s2mps11.c
+++ b/drivers/regulator/s2mps11.c
@@ -1207,8 +1207,8 @@ static int s2mps11_pmic_probe(struct platform_device *pdev)
struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent);
struct regulator_config config = { };
struct s2mps11_info *s2mps11;
- unsigned int rdev_num = 0;
- int i, ret = 0;
+ unsigned int rdev_num;
+ int i, ret;
const struct regulator_desc *regulators;
s2mps11 = devm_kzalloc(&pdev->dev, sizeof(struct s2mps11_info),
--
2.49.0.1204.g71687c7c1d-goog
Return-Path: <linux-kernel+bounces-673446-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 2B3F241E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:28:35 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id A65EE3A68DE
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:27:48 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 8A9031EF391;
Wed, 4 Jun 2025 15:26:01 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="DGFX2T4L"
Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id B322C19CC11
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:25:53 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.54
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749050757; cv=none; b=XQk+EWOhcxzbbe1zvZtV8JsSQ0NAJkUr0i5BNZD7JgKkWC5ARQUbeAnnbfW3RY/wkfRn+72lE7S0S5Fbwyb4EFoC5p2hYu1OyPGjMQzn2wq42j9un/2ndAIK/MMx2GzoRiWdjGhCnplYaT2a6qbC0+EdV05kpsGzaAsAm2iuxZU=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749050757; c=relaxed/simple;
bh=bSQGBA37BpSgsJdlJNGFk9NhBYGGguunmVcoDXGfnjE=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=Ft7z1at9u3t4Ip8HKCMWkWHdnNUweHa7t0Ck0QZe0agbPXYmgMnIs6arDMN70WLd7jMJq3ks9Bbb8qcv3C9tlrJp35iWJtD8XOxkgbHyQB4g6C5/vu3I/gfToXxiWRwHOsq+rJpw+Z+URylkKztii/Amn0umSOnDoqJAbnH57Bc=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=DGFX2T4L; arc=none smtp.client-ip=209.85.208.54
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org
Received: by mail-ed1-f54.google.com with SMTP id 4fb4d7f45d1cf-6049431b0e9so11192113a12.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 08:25:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=linaro.org; s=google; t=1749050752; x=1749655552; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=OVsIds4atv9b1Ndpam+Ic3xTK6Dfgv1Ul4T9xSV77wk=;
b=DGFX2T4L2ZSmj6paX1JwvA40YP3nsWpLH0f5OAvJkqhTD7f3GyzGcU7z7Hh6IseysM
VXt/UXiZl19ISEP9RJ0IYYzoKAlvf4uU+oERlo7JFVfTe+Vph9NfZDfO+CaNvDlKS5wX
PwhmPgbVHnwPjufawdDCHegbm4pkB1HVzwMHG6kHwRKIEOgz+Pr1vZyiP9GpjnPdB4MY
QeoidF9MLpVKIfs8xrN0kKLs9IDTisc1LUtVJTX/AG+xflu3AXPsu7+nt4A3flDtaYzI
msmOm2gBJ6USXX5BK49hNtNaz3chcW0KDck5j5lPP/7121j349A1xOAECFgyg6046f1g
FLPQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749050752; x=1749655552;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=OVsIds4atv9b1Ndpam+Ic3xTK6Dfgv1Ul4T9xSV77wk=;
b=AgD4bBHUL5szGozgYyTMJJaahz3jNcvY8/ZcgiAcUMU2DMESHdOXCwQtohFCrx+v72
9K5oCrS8ZS0lyBqPGlG1j0HPjJKo778QQplczmjjRLI8mUZc+XmZk+Io/svb34un57J+
S+5alt6ggAGiyAIRDgH3Sv3evNrco29OmfJT/SpgvNI9ztIgpxDXTBzKn5cfk2BMzdy0
UYVXtGPIIhuxJ5SJHJ6ImHF6KEyuene4Eq7NQcqy3y+YPuh8yryHcCeR46K28E061TcE
dIeqQGCj6Rc/EigTUPEZaprgC5ZfxFSWDHAKd7J6RFq8ilEEde5vYUbTlCDHOjRm+ZSk
SXMQ==
X-Forwarded-Encrypted: i=1; AJvYcCU6rIEchv3dHtyTliwvhNXDVrOYgcyxrNvsD5NMVCEDFM6EFZ26J1JT39v9ne4P3k5WsWNWli79NADijos=@vger.kernel.org
X-Gm-Message-State: AOJu0YwUvgIUi8HqmRyVQvyWlLCYEEW45ZWNrdnrwYhhxYIONpz2+0dX
K+Ly4p6BMXrUq7P8jDPUMTZKnLxfI5CTkYRtCvztUwfkyk/NQoONTk6emEGMzrigOig=
X-Gm-Gg: ASbGncsq5gWNYqVgKjLUDXTmkCJAm/Ar/ikJq1jX41Ao1Y5NusMih9qY8LzQHH4STdz
CLiD6tVUnfPWlFFBpBHtro9cDHzh7K5oL0x5V7uZTnnmNWuLT7ZieIgq9RD5FjPdd855wFUa66O
evQfuU8Y5z9fTMFr9CgTytXJ68PQ+rYr6RPygeiqo5myr8OuGpxaiAkI1YMQ5omDOoEDEboOgJc
Bl3S5oO89gQtq3DsaiosdZIs/9OMtdRyU3SX5pefMMeFuN1tAqkYrlyr2uxOO1XBXJPbbqQ0L1E
tv7JRIf+YbVxtyRCKMPvGyYdIRPbK3qjF3jUxqy1n8fIaB0ZT2e8hgUt9RUp9c5MTdw0E2SEqCo
m5uftJNzPJeP/fWxyMAVnQplwRRAnqokjYZU=
X-Google-Smtp-Source: AGHT+IGmpFLzdEaYYr7iQUhbbgsCIhZWT7QbCctj4zySD94PvS5LvY7Sr6dL7NlPVuoHoEkdg0F3SA==
X-Received: by 2002:a05:6402:34cb:b0:606:a26c:6f50 with SMTP id 4fb4d7f45d1cf-606e944ea6bmr3149657a12.5.1749050746634;
Wed, 04 Jun 2025 08:25:46 -0700 (PDT)
Received: from puffmais.c.googlers.com (140.20.91.34.bc.googleusercontent.com. [34.91.20.140])
by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-606ed984f63sm1051640a12.58.2025.06.04.08.25.46
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 08:25:46 -0700 (PDT)
From: =?utf-8?q?Andr=C3=A9_Draszik?= <andre.draszik@xxxxxxxxxx>
Date: Wed, 04 Jun 2025 16:25:43 +0100
Subject: [PATCH 04/17] dt-bindings: mfd: samsung,s2mps11: add s2mpg10-pmic
regulators
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Message-Id: <20250604-s2mpg1x-regulators-v1-4-6038740f49ae@xxxxxxxxxx>
References: <20250604-s2mpg1x-regulators-v1-0-6038740f49ae@xxxxxxxxxx>
In-Reply-To: <20250604-s2mpg1x-regulators-v1-0-6038740f49ae@xxxxxxxxxx>
To: Tudor Ambarus <tudor.ambarus@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>, Krzysztof Kozlowski <krzk@xxxxxxxxxx>,
Liam Girdwood <lgirdwood@xxxxxxxxx>, Mark Brown <broonie@xxxxxxxxxx>,
Lee Jones <lee@xxxxxxxxxx>, Linus Walleij <linus.walleij@xxxxxxxxxx>,
Bartosz Golaszewski <brgl@xxxxxxxx>
Cc: Peter Griffin <peter.griffin@xxxxxxxxxx>,
Will McVicker <willmcvicker@xxxxxxxxxx>, kernel-team@xxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-samsung-soc@xxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-gpio@xxxxxxxxxxxxxxx,
=?utf-8?q?Andr=C3=A9_Draszik?= <andre.draszik@xxxxxxxxxx>
X-Mailer: b4 0.14.2
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Add a regulators node to the s2mpg10-pmic to describe the regulators
available on this PMIC.
Additionally, describe the supply inputs of the regulator rails, with
the supply names matching the datasheet.
Note 1: S2MPG10 is typically used as the main-PMIC together with an
S2MPG11 PMIC in a main/sub configuration, hence the datasheet and the
binding both suffix the supplies with an 'm'.
Note 2: The binding needs to switch from 'additionalProperties' to
'unevaluatedProperties', to allow adding the specific -supply
properties for S2MPG10 only, as otherwise we'd have to resort to a
global wildcard with negating inside each of the compatible matches.
Signed-off-by: André Draszik <andre.draszik@xxxxxxxxxx>
---
.../devicetree/bindings/mfd/samsung,s2mps11.yaml | 33 +++++++++++++++++++++-
1 file changed, 32 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/mfd/samsung,s2mps11.yaml b/Documentation/devicetree/bindings/mfd/samsung,s2mps11.yaml
index d6b9e29147965b6d8eef786b0fb5b5f198ab69ab..0b834a02368f7867a2d093cbb3a9f374bb2acf41 100644
--- a/Documentation/devicetree/bindings/mfd/samsung,s2mps11.yaml
+++ b/Documentation/devicetree/bindings/mfd/samsung,s2mps11.yaml
@@ -67,7 +67,7 @@ required:
- compatible
- regulators
-additionalProperties: false
+unevaluatedProperties: false
allOf:
- if:
@@ -78,9 +78,40 @@ allOf:
then:
properties:
reg: false
+
+ regulators:
+ $ref: /schemas/regulator/samsung,s2mpg10-regulator.yaml
+
samsung,s2mps11-acokb-ground: false
samsung,s2mps11-wrstbi-ground: false
+ patternProperties:
+ "^vinb([1-9]|10)m-supply$":
+ description:
+ Phandle to the power supply for each buck rail of this PMIC. There
+ is a 1:1 mapping of supply to rail, e.g. vinb1m-supply supplies
+ buck1m.
+
+ "^vinl([1-9]|1[0-5])m-supply$":
+ description: |
+ Phandle to the power supply for one or multiple LDO rails of this
+ PMIC. The mapping of supply to rail(s) is as follows
+ vinl1m - ldo13m
+ vinl2m - ldo15m
+ vinl3m - ldo1m, ldo5m, ldo7m
+ vinl4m - ldo3m, ldo8m
+ vinl5m - ldo16m
+ vinl6m - ldo17m
+ vinl7m - ldo6m, ldo11m, ldo24m, ldo28m
+ vinl8m - ldo12m
+ vinl9m - ldo2m, ldo4m
+ vinl10m - ldo9m, ldo14m, ldo18m, 19m, ldo20m, ldo25m
+ vinl11m - ldo23m, ldo31m
+ vinl12m - ldo29m
+ vinl13m - ldo30m
+ vinl14m - ldo21m
+ vinl15m - ldo10m, ldo22m, ldo26m, ldo27m
+
oneOf:
- required: [interrupts]
- required: [interrupts-extended]
--
2.49.0.1204.g71687c7c1d-goog
Return-Path: <linux-kernel+bounces-673449-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id AD76341E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:28:40 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 01F9B18977E1
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:28:54 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 95A0018DF8D;
Wed, 4 Jun 2025 15:26:02 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="JWyNo4QV"
Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 042F51CB518
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:25:53 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.54
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749050759; cv=none; b=ROXc0YQRpLAPbqp5VaJzYb88UOg5blsZNTZ7jFt+6TUfanerx5Y1IuY8tgg6zSkCOqH6fGhydydPb63LO+zyM9WUfrQK7Sux0X1SzA6+aHpuby+z7GbOmIIulKiMONTgWzIfHLfd5uvp4y/MPbRI7rfuctMTYoDfTUFL39MMpA0=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749050759; c=relaxed/simple;
bh=gpRe8Mt5ndzq0RKdCAcP7CMV+rBpHJ84dXjPHbGOCWM=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=KouNmJZ6dtbCv1xtV1WA2clWSNtgheqDI0q+g88yIfr0CKAokPR/0bRoZodUI3Mms401AgMNAXBclLJHEjCVtLwtLjn+0jzoqgbD/fffTRDW1kzxgJ/ooqFzozxsV4ttNc4I3XYOEWShKNcaWiQ7rth9l0a6+qUBPq0T5HzXdrw=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=JWyNo4QV; arc=none smtp.client-ip=209.85.208.54
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org
Received: by mail-ed1-f54.google.com with SMTP id 4fb4d7f45d1cf-606bbe60c01so3622913a12.2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 08:25:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=linaro.org; s=google; t=1749050752; x=1749655552; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=pP407Ox1v91FomL1iN4XwON2iK1j8Ht0T+AJfPsmGsI=;
b=JWyNo4QVZIiV/llCGZCM/mgWS16dQa+u5O0J+eiD3dCtp+m7GzBDEQvyLhqG+2YydU
/QyvammoVG7aUvB4VKOSk5vEKxU6GMTYB8umvneqZvV7RdnEYNWNHWnBlO3xmIeTGZbO
RQbVOnvW6MK0Vi756tSP0vBj3UsGVLmCrOn1DtIkgCH7V/Oz1aUmOCEuqZWNizxDHAYy
qUYINT5xs1BEQDBLrsWe9txed0Kz6oZJNOYEU/eMOP5Rs5vLlAeaYYObfkRN5OHURJz7
jASrHNvktcVd/LSzifi/hm9jt1Dm+eVaGg1z4o4kWF/qxhUx8MCWhfm+WaYMhNTA+hbz
6L1w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749050752; x=1749655552;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=pP407Ox1v91FomL1iN4XwON2iK1j8Ht0T+AJfPsmGsI=;
b=CYOmyznhLXUrcwbhXXyolnlbtqduFU55XetS3MQMI6rHT0baUrnJtCb/UvCMY13CGl
wCS+zFxusu13MDHzU5RnRZdTvjTqLB4qFFsR9B3Pls6ytA04FC0xassBVD1d3nr6wx3V
GruXDc5uHupZNplda0VpxcGtrektZplJ/BfxOm4iCMETcks9AJSA6JPAspHGuVW7ITPr
YWF19NBNtIhNEwxTOhio/qV4uF5bJQpivFjoKKFejma3x+osMMc0LB6O4k3264P5/D31
EO/WUxkMFKIl/ySxDfOQMR2vv9H/wJ9P53xGlqurlUNl/fdcpTaJye4W8ItQFFfiIQQR
JXRw==
X-Forwarded-Encrypted: i=1; AJvYcCXPOMajALurZNFRrOwq8anUGwGPb8MlHKD0jPer/hxfhFSIMWVgjg4D6lxXMOflBFKsyYnmVLibLRm2oK4=@vger.kernel.org
X-Gm-Message-State: AOJu0YyKffaTdBTnkGqZXryLQ9c2Ssrizv2GP8VpelpVbCz7sCgsOKPd
Lwd4Eo2cGzF5iFOqsDjNDYC9g2r6RVPGklGnMhGY0pHnNfT/af1cWyv8/kMRXZKAee8=
X-Gm-Gg: ASbGncuU3sPjkr00mtbPUMkXWAPIAyro7EzIX3tecT7KmgBIQOjHrQ+Y7esD8XRLcl6
yoOR3EKTAfF2hxBEcIt1HBqjP+ZZZFv637LtGAKQ99/7p1AForRyiok2gohvBWLn91hmzVfFCTi
pSZa8iqS/6mF6t7BKaluybMgH+KtUNS44fjWkM+ocjxAlSxpa0f4KT2qXZAQ3LTlm4uTdPtGe1F
QFxBlex45Wk9iwrgGYhIsASsE5nSHhl90chAg3Bp5Lj0DNHx4QtNPPM0YJqp4ADvgFOecbd1iMp
DrQe7csjSF/swc31K/fgOnuijslDJYSOaT+NwAgTzrEh1fFOrJZn/1J1wQHdZMUzA1Uvu0/ml0e
V9nMe7Y97pfM51EfYSA2ugmWOQIeSGY4bkA8=
X-Google-Smtp-Source: AGHT+IFc62NxQDrp6Fd0aN6PA4dvCy44jt7oi4p68WSn0L0ytJoyIqbFgJ8vuOoNN2SWezfzZwIZWQ==
X-Received: by 2002:a05:6402:2789:b0:602:1b8b:2902 with SMTP id 4fb4d7f45d1cf-606e941b388mr3458933a12.15.1749050752175;
Wed, 04 Jun 2025 08:25:52 -0700 (PDT)
Received: from puffmais.c.googlers.com (140.20.91.34.bc.googleusercontent.com. [34.91.20.140])
by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-606ed984f63sm1051640a12.58.2025.06.04.08.25.51
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 08:25:51 -0700 (PDT)
From: =?utf-8?q?Andr=C3=A9_Draszik?= <andre.draszik@xxxxxxxxxx>
Date: Wed, 04 Jun 2025 16:25:51 +0100
Subject: [PATCH 12/17] regulator: s2mps11: refactor handling of external
rail control
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Message-Id: <20250604-s2mpg1x-regulators-v1-12-6038740f49ae@xxxxxxxxxx>
References: <20250604-s2mpg1x-regulators-v1-0-6038740f49ae@xxxxxxxxxx>
In-Reply-To: <20250604-s2mpg1x-regulators-v1-0-6038740f49ae@xxxxxxxxxx>
To: Tudor Ambarus <tudor.ambarus@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>, Krzysztof Kozlowski <krzk@xxxxxxxxxx>,
Liam Girdwood <lgirdwood@xxxxxxxxx>, Mark Brown <broonie@xxxxxxxxxx>,
Lee Jones <lee@xxxxxxxxxx>, Linus Walleij <linus.walleij@xxxxxxxxxx>,
Bartosz Golaszewski <brgl@xxxxxxxx>
Cc: Peter Griffin <peter.griffin@xxxxxxxxxx>,
Will McVicker <willmcvicker@xxxxxxxxxx>, kernel-team@xxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-samsung-soc@xxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-gpio@xxxxxxxxxxxxxxx,
=?utf-8?q?Andr=C3=A9_Draszik?= <andre.draszik@xxxxxxxxxx>
X-Mailer: b4 0.14.2
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Refactor s2mps14_pmic_enable_ext_control() and s2mps11_of_parse_cb()
slightly as a preparation for adding S2MPG10 and S2MPG11 support, as
both of those PMICs also support control of rails via GPIOs.
Signed-off-by: André Draszik <andre.draszik@xxxxxxxxxx>
---
drivers/regulator/s2mps11.c | 86 ++++++++++++++++++++++++++++++---------------
1 file changed, 57 insertions(+), 29 deletions(-)
diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
index d3739526add3c966eb2979b9be2e543b5ad9d89a..ff9124c998c685d9c598570148dca074e671a99b 100644
--- a/drivers/regulator/s2mps11.c
+++ b/drivers/regulator/s2mps11.c
@@ -328,27 +328,13 @@ static int s2mps11_regulator_set_suspend_disable(struct regulator_dev *rdev)
rdev->desc->enable_mask, state);
}
-static int s2mps11_of_parse_cb(struct device_node *np,
- const struct regulator_desc *desc,
- struct regulator_config *config)
+static int s2mps11_of_parse_gpiod(struct device_node *np,
+ const struct regulator_desc *desc,
+ struct regulator_config *config)
{
- const struct s2mps11_info *s2mps11 = config->driver_data;
struct gpio_desc *ena_gpiod;
int ret;
- if (s2mps11->dev_type == S2MPS14X)
- switch (desc->id) {
- case S2MPS14_LDO10:
- case S2MPS14_LDO11:
- case S2MPS14_LDO12:
- break;
-
- default:
- return 0;
- }
- else
- return 0;
-
ena_gpiod = fwnode_gpiod_get_index(of_fwnode_handle(np),
"samsung,ext-control", 0,
GPIOD_OUT_HIGH |
@@ -380,6 +366,28 @@ static int s2mps11_of_parse_cb(struct device_node *np,
return 0;
}
+static int s2mps11_of_parse_cb(struct device_node *np,
+ const struct regulator_desc *desc,
+ struct regulator_config *config)
+{
+ const struct s2mps11_info *s2mps11 = config->driver_data;
+
+ if (s2mps11->dev_type == S2MPS14X)
+ switch (desc->id) {
+ case S2MPS14_LDO10:
+ case S2MPS14_LDO11:
+ case S2MPS14_LDO12:
+ break;
+
+ default:
+ return 0;
+ }
+ else
+ return 0;
+
+ return s2mps11_of_parse_gpiod(np, desc, config);
+}
+
static const struct regulator_ops s2mps11_ldo_ops = {
.list_voltage = regulator_list_voltage_linear,
.map_voltage = regulator_map_voltage_linear,
@@ -903,10 +911,16 @@ static const struct regulator_desc s2mps15_regulators[] = {
};
static int s2mps14_pmic_enable_ext_control(struct s2mps11_info *s2mps11,
- struct regulator_dev *rdev)
+ struct regulator_dev *rdev)
{
- return regmap_update_bits(rdev->regmap, rdev->desc->enable_reg,
- rdev->desc->enable_mask, S2MPS14_ENABLE_EXT_CONTROL);
+ int ret = regmap_update_bits(rdev->regmap, rdev->desc->enable_reg,
+ rdev->desc->enable_mask,
+ S2MPS14_ENABLE_EXT_CONTROL);
+ if (ret < 0)
+ return dev_err_probe(rdev_get_dev(rdev), ret,
+ "failed to enable GPIO control over %d/%s\n",
+ rdev->desc->id, rdev->desc->name);
+ return 0;
}
static int s2mpu02_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay)
@@ -1244,6 +1258,26 @@ static const struct regulator_desc s2mpu05_regulators[] = {
regulator_desc_s2mpu05_buck45(5),
};
+static int s2mps11_handle_ext_control(struct s2mps11_info *s2mps11,
+ struct regulator_dev *rdev)
+{
+ int ret;
+
+ switch (s2mps11->dev_type) {
+ case S2MPS14X:
+ if (!rdev->ena_pin)
+ return 0;
+
+ ret = s2mps14_pmic_enable_ext_control(s2mps11, rdev);
+ break;
+
+ default:
+ return 0;
+ }
+
+ return ret;
+}
+
static int s2mps11_pmic_probe(struct platform_device *pdev)
{
struct sec_pmic_dev *iodev = dev_get_drvdata(pdev->dev.parent);
@@ -1314,15 +1348,9 @@ static int s2mps11_pmic_probe(struct platform_device *pdev)
regulators[i].id,
regulators[i].name);
- if (regulator->ena_pin) {
- ret = s2mps14_pmic_enable_ext_control(s2mps11,
- regulator);
- if (ret < 0)
- return dev_err_probe(&pdev->dev, ret,
- "failed to enable GPIO control over %d/%s\n",
- regulator->desc->id,
- regulator->desc->name);
- }
+ ret = s2mps11_handle_ext_control(s2mps11, regulator);
+ if (ret < 0)
+ return ret;
}
return 0;
--
2.49.0.1204.g71687c7c1d-goog
Return-Path: <linux-kernel+bounces-673448-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id E8AC641E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:28:56 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 638F51888561
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:29:10 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 3A6311F4C87;
Wed, 4 Jun 2025 15:26:03 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ya1/okbZ"
Received: from mail-ed1-f53.google.com (mail-ed1-f53.google.com [209.85.208.53])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id B32E01A0BF1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:25:53 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.53
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749050759; cv=none; b=E5+T8xtjUUzrvT11Dsn03Ftg49vYM4PMEivkQ5hbOgUcURhBK+CZjkA/ViUocTQTP0Da9QtQoDW7PdBl1jplAamnZJH9E5crWDtfiKGaKvSBZHDiwg2iHXsYYewcMShkLndecfOiReTcxdP/YjNNjQHwDfHX2n9hLgYWtriFqDY=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749050759; c=relaxed/simple;
bh=lnf7SEVDxo8nwqagFSOE0flwSyB56hz5pHr1gz36EtA=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=jSG8NWzQ9yRvGXvMKQ6Ztnnw5p2yRv43keXev7VQB/+Cxq2hFpPeY+ULu1mCSloVn+rUmdLODMyMsFyn7zswkbz6PF3Yjinp6aMJpEtITTpkVXx3SDE55mi8rnFOm3jqt+RfHrzCi8C1xyqJcJ8IixY4aGDvqw+We1ywv8thIt4=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=ya1/okbZ; arc=none smtp.client-ip=209.85.208.53
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org
Received: by mail-ed1-f53.google.com with SMTP id 4fb4d7f45d1cf-602039559d8so13164960a12.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 08:25:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=linaro.org; s=google; t=1749050752; x=1749655552; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=38adGzUOIG34FHDZWkeIubpSpyQdC1frANBQcuzE93c=;
b=ya1/okbZSAusMFUHDZMXTrDnzvX9hwD1lm9KJy3HetiEYsam4c5lZ/B1MVV4XRtZcu
qa6Rrfb8D4jBXaLwubGTrj/A2CwRGFCqiIQgy8ES6T3H7R+KjQ25HaLhSfmQcuqLjJNM
N07gs6rJ0KxzZY9KQk/Mwy143+pSps1PYF6F9NGF63JwpcxFkly3s4yRJQ4e5kqbPtvz
K50DJYL6ayx2PANFDgTxiKoLjEjAzs4AX6hUdVjn1sUEYUmS3Ha1R9eEkzOZ0Z6icP6m
ttjUhCTcc7tZiFmtZnWzDuIfzBWHKBU7V5zn3ogDLV/5pkSxzpdNgGyFCVMzoLbeuoDO
ZzgQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749050752; x=1749655552;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=38adGzUOIG34FHDZWkeIubpSpyQdC1frANBQcuzE93c=;
b=cQrqXWEW9YYFEygFE6jUYZPeFzswy8BonFOYV2ENg+2z4MzwNY6KB2C0zO1PAjeZ9h
LY7aljvWlkkmSuyNQxzSTmlHle5Wp38DB2Sb+XFHZAl1YE3GyFf7WGoj2pQ2gxzoJxOg
jFKejWg3N/XY1bGh2xoDs/QpCK4+x1FGfuY/cA8SpYvnPK1dHHWYk74yteznLEw6v0NP
uL0OdRZM/AVjpuFabML82UrxGouYPOB4wU/owJl7HS+4JpJiX9KHAWWXrpo55MOF8R3Z
0sqBmLbJsXZ09ZJiLPQ0r6507mIgB3T8LpbjQwgof6W5JjsohkM6R6p//oqf0oWF854L
bhcA==
X-Forwarded-Encrypted: i=1; AJvYcCWn7sqbx9mK30FKdIWdiM4DVirvyy8X+KbCjiRBC9SMETcPsUM7TIRTwqLOIL4FbuapRiNt4uYZUl8xPFg=@vger.kernel.org
X-Gm-Message-State: AOJu0YzZlFkQ39HzarJSD+gaQH6zl7livPO7o1mw1BGSCMzBGbvCln7c
Nnf74r0N9NJhQtns7x/LNkZCdpYKKZi4WjpSI74g8hCu6Jy8XKdu1eqy/lyxsF+jd9k=
X-Gm-Gg: ASbGncurLCTGHGeeCCq9hXHFjSihStTvFzldlxHxFEWHHElzgofrvrgEY3MN23aAAd6
c94vukQW2zhcsS+dgSw5cjowsWCnBSShbDzFoJC67UcYW0RGEIV/DDcGoXsc+u4lS5CmeHn9Qms
s2TomzhRYAJuUJ7MSICY2MyUS00JUIDf0Ty9WVCAlgegqrh4hqElBrQYy+gLxTXI8VotraIv2TQ
gNnxmrZiEZoZNScNF+TMT37+f75XmZ6kkKhcq+VrDUvhPyColFANQ9flaUDOpJSHh0k1aPxOwaJ
S6Vq2gf0Pn0DknbQz8MlZris7rBWiEZrmqz4tZ3SihHIxfbVnWNMwTbJjm6n3R+WYTfGCMiuGeR
Z7Ocyr1p3uvoyxn8sJ/b7ZfnMj05o0MmuMfw=
X-Google-Smtp-Source: AGHT+IHcuU+oqnxD9k5MrhyhDNTB0nxGiQIySmeHVPqdMikKo4QyRZSVRbG5YZsds1z4NiykU4LgMg==
X-Received: by 2002:a05:6402:1e8f:b0:602:ef0a:cef8 with SMTP id 4fb4d7f45d1cf-606ea3b6b7emr3477295a12.18.1749050751682;
Wed, 04 Jun 2025 08:25:51 -0700 (PDT)
Received: from puffmais.c.googlers.com (140.20.91.34.bc.googleusercontent.com. [34.91.20.140])
by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-606ed984f63sm1051640a12.58.2025.06.04.08.25.51
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 08:25:51 -0700 (PDT)
From: =?utf-8?q?Andr=C3=A9_Draszik?= <andre.draszik@xxxxxxxxxx>
Date: Wed, 04 Jun 2025 16:25:50 +0100
Subject: [PATCH 11/17] regulator: s2mps11: update node parsing (allow
-supply properties)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Message-Id: <20250604-s2mpg1x-regulators-v1-11-6038740f49ae@xxxxxxxxxx>
References: <20250604-s2mpg1x-regulators-v1-0-6038740f49ae@xxxxxxxxxx>
In-Reply-To: <20250604-s2mpg1x-regulators-v1-0-6038740f49ae@xxxxxxxxxx>
To: Tudor Ambarus <tudor.ambarus@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>, Krzysztof Kozlowski <krzk@xxxxxxxxxx>,
Liam Girdwood <lgirdwood@xxxxxxxxx>, Mark Brown <broonie@xxxxxxxxxx>,
Lee Jones <lee@xxxxxxxxxx>, Linus Walleij <linus.walleij@xxxxxxxxxx>,
Bartosz Golaszewski <brgl@xxxxxxxx>
Cc: Peter Griffin <peter.griffin@xxxxxxxxxx>,
Will McVicker <willmcvicker@xxxxxxxxxx>, kernel-team@xxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-samsung-soc@xxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-gpio@xxxxxxxxxxxxxxx,
=?utf-8?q?Andr=C3=A9_Draszik?= <andre.draszik@xxxxxxxxxx>
X-Mailer: b4 0.14.2
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
For the upcoming S2MPG10 and S2MPG11 support, we need to be able to
parse -supply properties in the PMIC's DT node.
This currently doesn't work, because the code here currently points the
regulator core at each individual regulator sub-node, and therefore the
regulator core is unable to find the -supply properties.
Update the code to simply let the regulator core handle all the parsing
by adding the ::of_match and ::regulators_node members to all existing
regulator descriptions, by adding ::of_parse_cb() to those
regulators which support the vendor-specific samsung,ext-control-gpios
to parse it (S2MPS14), and by dropping the explicit call to
of_regulator_match().
Configuring the PMIC to respect the external control GPIOs via
s2mps14_pmic_enable_ext_control() is left outside ::of_parse_cb()
because the regulator core ignores errors other than -EPROBE_DEFER from
that callback, while the code currently fails probe on register write
errors and I believe it should stay that way.
The driver can now avoid the devm_gpiod_unhinge() dance due to
simpler error handling of GPIO descriptor acquisition.
This change also has the advantage of reducing runtime memory
consumption by quite a bit as the driver doesn't need to allocate a
'struct of_regulator_match' and a 'struct gpio_desc *' for each
regulator for all PMICs as the regulator core does that. This saves
40+8 bytes on arm64 for each individual regulator on all supported
PMICs (even on non-S2MPS14 due to currently unnecessarily allocating
the extra memory unconditionally). With the upcoming S2MP10 and S2MPG11
support, this amounts to 1640+328 and 1120+224 bytes respectively.
Signed-off-by: André Draszik <andre.draszik@xxxxxxxxxx>
---
drivers/regulator/s2mps11.c | 192 ++++++++++++++++++++++++--------------------
1 file changed, 105 insertions(+), 87 deletions(-)
diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
index 30586e9884bfb998ff07e3148813344b307506c0..d3739526add3c966eb2979b9be2e543b5ad9d89a 100644
--- a/drivers/regulator/s2mps11.c
+++ b/drivers/regulator/s2mps11.c
@@ -40,12 +40,6 @@ struct s2mps11_info {
* the suspend mode was enabled.
*/
DECLARE_BITMAP(suspend_state, S2MPS_REGULATOR_MAX);
-
- /*
- * Array (size: number of regulators) with GPIO-s for external
- * sleep control.
- */
- struct gpio_desc **ext_control_gpiod;
};
static int get_ramp_delay(int ramp_delay)
@@ -244,7 +238,7 @@ static int s2mps11_regulator_enable(struct regulator_dev *rdev)
case S2MPS14X:
if (test_bit(rdev_id, s2mps11->suspend_state))
val = S2MPS14_ENABLE_SUSPEND;
- else if (s2mps11->ext_control_gpiod[rdev_id])
+ else if (rdev->ena_pin)
val = S2MPS14_ENABLE_EXT_CONTROL;
else
val = rdev->desc->enable_mask;
@@ -334,6 +328,58 @@ static int s2mps11_regulator_set_suspend_disable(struct regulator_dev *rdev)
rdev->desc->enable_mask, state);
}
+static int s2mps11_of_parse_cb(struct device_node *np,
+ const struct regulator_desc *desc,
+ struct regulator_config *config)
+{
+ const struct s2mps11_info *s2mps11 = config->driver_data;
+ struct gpio_desc *ena_gpiod;
+ int ret;
+
+ if (s2mps11->dev_type == S2MPS14X)
+ switch (desc->id) {
+ case S2MPS14_LDO10:
+ case S2MPS14_LDO11:
+ case S2MPS14_LDO12:
+ break;
+
+ default:
+ return 0;
+ }
+ else
+ return 0;
+
+ ena_gpiod = fwnode_gpiod_get_index(of_fwnode_handle(np),
+ "samsung,ext-control", 0,
+ GPIOD_OUT_HIGH |
+ GPIOD_FLAGS_BIT_NONEXCLUSIVE,
+ "s2mps11-regulator");
+ if (IS_ERR(ena_gpiod)) {
+ ret = PTR_ERR(ena_gpiod);
+
+ /* Ignore all errors except probe defer. */
+ if (ret == -EPROBE_DEFER)
+ return ret;
+
+ if (ret == -ENOENT)
+ dev_info(config->dev,
+ "No entry for control GPIO for %d/%s in node %pOF\n",
+ desc->id, desc->name, np);
+ else
+ dev_warn_probe(config->dev, ret,
+ "Failed to get control GPIO for %d/%s in node %pOF\n",
+ desc->id, desc->name, np);
+ return 0;
+ }
+
+ dev_info(config->dev, "Using GPIO for ext-control over %d/%s\n",
+ desc->id, desc->name);
+
+ config->ena_gpiod = ena_gpiod;
+
+ return 0;
+}
+
static const struct regulator_ops s2mps11_ldo_ops = {
.list_voltage = regulator_list_voltage_linear,
.map_voltage = regulator_map_voltage_linear,
@@ -362,6 +408,8 @@ static const struct regulator_ops s2mps11_buck_ops = {
#define regulator_desc_s2mps11_ldo(num, step) { \
.name = "LDO"#num, \
.id = S2MPS11_LDO##num, \
+ .of_match = of_match_ptr("LDO"#num), \
+ .regulators_node = of_match_ptr("regulators"), \
.ops = &s2mps11_ldo_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
@@ -378,6 +426,8 @@ static const struct regulator_ops s2mps11_buck_ops = {
#define regulator_desc_s2mps11_buck1_4(num) { \
.name = "BUCK"#num, \
.id = S2MPS11_BUCK##num, \
+ .of_match = of_match_ptr("BUCK"#num), \
+ .regulators_node = of_match_ptr("regulators"), \
.ops = &s2mps11_buck_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
@@ -395,6 +445,8 @@ static const struct regulator_ops s2mps11_buck_ops = {
#define regulator_desc_s2mps11_buck5 { \
.name = "BUCK5", \
.id = S2MPS11_BUCK5, \
+ .of_match = of_match_ptr("BUCK5"), \
+ .regulators_node = of_match_ptr("regulators"), \
.ops = &s2mps11_buck_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
@@ -412,6 +464,8 @@ static const struct regulator_ops s2mps11_buck_ops = {
#define regulator_desc_s2mps11_buck67810(num, min, step, min_sel, voltages) { \
.name = "BUCK"#num, \
.id = S2MPS11_BUCK##num, \
+ .of_match = of_match_ptr("BUCK"#num), \
+ .regulators_node = of_match_ptr("regulators"), \
.ops = &s2mps11_buck_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
@@ -429,6 +483,8 @@ static const struct regulator_ops s2mps11_buck_ops = {
#define regulator_desc_s2mps11_buck9 { \
.name = "BUCK9", \
.id = S2MPS11_BUCK9, \
+ .of_match = of_match_ptr("BUCK9"), \
+ .regulators_node = of_match_ptr("regulators"), \
.ops = &s2mps11_buck_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
@@ -502,6 +558,8 @@ static const struct regulator_ops s2mps14_reg_ops;
#define regulator_desc_s2mps13_ldo(num, min, step, min_sel) { \
.name = "LDO"#num, \
.id = S2MPS13_LDO##num, \
+ .of_match = of_match_ptr("LDO"#num), \
+ .regulators_node = of_match_ptr("regulators"), \
.ops = &s2mps14_reg_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
@@ -518,6 +576,8 @@ static const struct regulator_ops s2mps14_reg_ops;
#define regulator_desc_s2mps13_buck(num, min, step, min_sel) { \
.name = "BUCK"#num, \
.id = S2MPS13_BUCK##num, \
+ .of_match = of_match_ptr("BUCK"#num), \
+ .regulators_node = of_match_ptr("regulators"), \
.ops = &s2mps14_reg_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
@@ -535,6 +595,8 @@ static const struct regulator_ops s2mps14_reg_ops;
#define regulator_desc_s2mps13_buck7(num, min, step, min_sel) { \
.name = "BUCK"#num, \
.id = S2MPS13_BUCK##num, \
+ .of_match = of_match_ptr("BUCK"#num), \
+ .regulators_node = of_match_ptr("regulators"), \
.ops = &s2mps14_reg_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
@@ -552,6 +614,8 @@ static const struct regulator_ops s2mps14_reg_ops;
#define regulator_desc_s2mps13_buck8_10(num, min, step, min_sel) { \
.name = "BUCK"#num, \
.id = S2MPS13_BUCK##num, \
+ .of_match = of_match_ptr("BUCK"#num), \
+ .regulators_node = of_match_ptr("regulators"), \
.ops = &s2mps14_reg_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
@@ -634,6 +698,9 @@ static const struct regulator_ops s2mps14_reg_ops = {
#define regulator_desc_s2mps14_ldo(num, min, step) { \
.name = "LDO"#num, \
.id = S2MPS14_LDO##num, \
+ .of_match = of_match_ptr("LDO"#num), \
+ .regulators_node = of_match_ptr("regulators"), \
+ .of_parse_cb = s2mps11_of_parse_cb, \
.ops = &s2mps14_reg_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
@@ -649,6 +716,9 @@ static const struct regulator_ops s2mps14_reg_ops = {
#define regulator_desc_s2mps14_buck(num, min, step, min_sel) { \
.name = "BUCK"#num, \
.id = S2MPS14_BUCK##num, \
+ .of_match = of_match_ptr("BUCK"#num), \
+ .regulators_node = of_match_ptr("regulators"), \
+ .of_parse_cb = s2mps11_of_parse_cb, \
.ops = &s2mps14_reg_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
@@ -725,6 +795,8 @@ static const struct regulator_ops s2mps15_reg_buck_ops = {
#define regulator_desc_s2mps15_ldo(num, range) { \
.name = "LDO"#num, \
.id = S2MPS15_LDO##num, \
+ .of_match = of_match_ptr("LDO"#num), \
+ .regulators_node = of_match_ptr("regulators"), \
.ops = &s2mps15_reg_ldo_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
@@ -740,6 +812,8 @@ static const struct regulator_ops s2mps15_reg_buck_ops = {
#define regulator_desc_s2mps15_buck(num, range) { \
.name = "BUCK"#num, \
.id = S2MPS15_BUCK##num, \
+ .of_match = of_match_ptr("BUCK"#num), \
+ .regulators_node = of_match_ptr("regulators"), \
.ops = &s2mps15_reg_buck_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
@@ -835,60 +909,6 @@ static int s2mps14_pmic_enable_ext_control(struct s2mps11_info *s2mps11,
rdev->desc->enable_mask, S2MPS14_ENABLE_EXT_CONTROL);
}
-static void s2mps14_pmic_dt_parse_ext_control_gpio(struct platform_device *pdev,
- struct of_regulator_match *rdata, struct s2mps11_info *s2mps11)
-{
- struct gpio_desc **gpio = s2mps11->ext_control_gpiod;
- unsigned int i;
- unsigned int valid_regulators[3] = { S2MPS14_LDO10, S2MPS14_LDO11,
- S2MPS14_LDO12 };
-
- for (i = 0; i < ARRAY_SIZE(valid_regulators); i++) {
- unsigned int reg = valid_regulators[i];
-
- if (!rdata[reg].init_data || !rdata[reg].of_node)
- continue;
-
- gpio[reg] = devm_fwnode_gpiod_get(&pdev->dev,
- of_fwnode_handle(rdata[reg].of_node),
- "samsung,ext-control",
- GPIOD_OUT_HIGH | GPIOD_FLAGS_BIT_NONEXCLUSIVE,
- "s2mps11-regulator");
- if (PTR_ERR(gpio[reg]) == -ENOENT)
- gpio[reg] = NULL;
- else if (IS_ERR(gpio[reg])) {
- dev_err(&pdev->dev, "Failed to get control GPIO for %d/%s\n",
- reg, rdata[reg].name);
- gpio[reg] = NULL;
- continue;
- }
- if (gpio[reg])
- dev_dbg(&pdev->dev, "Using GPIO for ext-control over %d/%s\n",
- reg, rdata[reg].name);
- }
-}
-
-static int s2mps11_pmic_dt_parse(struct platform_device *pdev,
- struct of_regulator_match *rdata, struct s2mps11_info *s2mps11,
- unsigned int rdev_num)
-{
- struct device_node *reg_np;
-
- reg_np = of_get_child_by_name(pdev->dev.parent->of_node, "regulators");
- if (!reg_np) {
- dev_err(&pdev->dev, "could not find regulators sub-node\n");
- return -EINVAL;
- }
-
- of_regulator_match(&pdev->dev, reg_np, rdata, rdev_num);
- if (s2mps11->dev_type == S2MPS14X)
- s2mps14_pmic_dt_parse_ext_control_gpio(pdev, rdata, s2mps11);
-
- of_node_put(reg_np);
-
- return 0;
-}
-
static int s2mpu02_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay)
{
unsigned int ramp_val, ramp_shift, ramp_reg;
@@ -946,6 +966,8 @@ static const struct regulator_ops s2mpu02_buck_ops = {
#define regulator_desc_s2mpu02_ldo1(num) { \
.name = "LDO"#num, \
.id = S2MPU02_LDO##num, \
+ .of_match = of_match_ptr("LDO"#num), \
+ .regulators_node = of_match_ptr("regulators"), \
.ops = &s2mpu02_ldo_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
@@ -961,6 +983,8 @@ static const struct regulator_ops s2mpu02_buck_ops = {
#define regulator_desc_s2mpu02_ldo2(num) { \
.name = "LDO"#num, \
.id = S2MPU02_LDO##num, \
+ .of_match = of_match_ptr("LDO"#num), \
+ .regulators_node = of_match_ptr("regulators"), \
.ops = &s2mpu02_ldo_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
@@ -976,6 +1000,8 @@ static const struct regulator_ops s2mpu02_buck_ops = {
#define regulator_desc_s2mpu02_ldo3(num) { \
.name = "LDO"#num, \
.id = S2MPU02_LDO##num, \
+ .of_match = of_match_ptr("LDO"#num), \
+ .regulators_node = of_match_ptr("regulators"), \
.ops = &s2mpu02_ldo_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
@@ -991,6 +1017,8 @@ static const struct regulator_ops s2mpu02_buck_ops = {
#define regulator_desc_s2mpu02_ldo4(num) { \
.name = "LDO"#num, \
.id = S2MPU02_LDO##num, \
+ .of_match = of_match_ptr("LDO"#num), \
+ .regulators_node = of_match_ptr("regulators"), \
.ops = &s2mpu02_ldo_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
@@ -1006,6 +1034,8 @@ static const struct regulator_ops s2mpu02_buck_ops = {
#define regulator_desc_s2mpu02_ldo5(num) { \
.name = "LDO"#num, \
.id = S2MPU02_LDO##num, \
+ .of_match = of_match_ptr("LDO"#num), \
+ .regulators_node = of_match_ptr("regulators"), \
.ops = &s2mpu02_ldo_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
@@ -1022,6 +1052,8 @@ static const struct regulator_ops s2mpu02_buck_ops = {
#define regulator_desc_s2mpu02_buck1234(num) { \
.name = "BUCK"#num, \
.id = S2MPU02_BUCK##num, \
+ .of_match = of_match_ptr("BUCK"#num), \
+ .regulators_node = of_match_ptr("regulators"), \
.ops = &s2mpu02_buck_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
@@ -1038,6 +1070,8 @@ static const struct regulator_ops s2mpu02_buck_ops = {
#define regulator_desc_s2mpu02_buck5(num) { \
.name = "BUCK"#num, \
.id = S2MPU02_BUCK##num, \
+ .of_match = of_match_ptr("BUCK"#num), \
+ .regulators_node = of_match_ptr("regulators"), \
.ops = &s2mpu02_ldo_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
@@ -1054,6 +1088,8 @@ static const struct regulator_ops s2mpu02_buck_ops = {
#define regulator_desc_s2mpu02_buck6(num) { \
.name = "BUCK"#num, \
.id = S2MPU02_BUCK##num, \
+ .of_match = of_match_ptr("BUCK"#num), \
+ .regulators_node = of_match_ptr("regulators"), \
.ops = &s2mpu02_ldo_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
@@ -1070,6 +1106,8 @@ static const struct regulator_ops s2mpu02_buck_ops = {
#define regulator_desc_s2mpu02_buck7(num) { \
.name = "BUCK"#num, \
.id = S2MPU02_BUCK##num, \
+ .of_match = of_match_ptr("BUCK"#num), \
+ .regulators_node = of_match_ptr("regulators"), \
.ops = &s2mpu02_ldo_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
@@ -1125,6 +1163,8 @@ static const struct regulator_desc s2mpu02_regulators[] = {
#define regulator_desc_s2mpu05_ldo_reg(num, min, step, reg) { \
.name = "ldo"#num, \
.id = S2MPU05_LDO##num, \
+ .of_match = of_match_ptr("ldo"#num), \
+ .regulators_node = of_match_ptr("regulators"), \
.ops = &s2mpu02_ldo_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
@@ -1156,6 +1196,8 @@ static const struct regulator_desc s2mpu02_regulators[] = {
#define regulator_desc_s2mpu05_buck(num, which) { \
.name = "buck"#num, \
.id = S2MPU05_BUCK##num, \
+ .of_match = of_match_ptr("buck"#num), \
+ .regulators_node = of_match_ptr("regulators"), \
.ops = &s2mpu02_buck_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
@@ -1254,22 +1296,7 @@ static int s2mps11_pmic_probe(struct platform_device *pdev)
s2mps11->dev_type);
}
- s2mps11->ext_control_gpiod = devm_kcalloc(&pdev->dev, rdev_num,
- sizeof(*s2mps11->ext_control_gpiod), GFP_KERNEL);
- if (!s2mps11->ext_control_gpiod)
- return -ENOMEM;
-
- struct of_regulator_match *rdata __free(kfree) =
- kcalloc(rdev_num, sizeof(*rdata), GFP_KERNEL);
- if (!rdata)
- return -ENOMEM;
-
- for (i = 0; i < rdev_num; i++)
- rdata[i].name = regulators[i].name;
-
- ret = s2mps11_pmic_dt_parse(pdev, rdata, s2mps11, rdev_num);
- if (ret)
- return ret;
+ device_set_of_node_from_dev(&pdev->dev, pdev->dev.parent);
platform_set_drvdata(pdev, s2mps11);
@@ -1279,15 +1306,6 @@ static int s2mps11_pmic_probe(struct platform_device *pdev)
for (i = 0; i < rdev_num; i++) {
struct regulator_dev *regulator;
- config.init_data = rdata[i].init_data;
- config.of_node = rdata[i].of_node;
- config.ena_gpiod = s2mps11->ext_control_gpiod[i];
- /*
- * Hand the GPIO descriptor management over to the regulator
- * core, remove it from devres management.
- */
- if (config.ena_gpiod)
- devm_gpiod_unhinge(&pdev->dev, config.ena_gpiod);
regulator = devm_regulator_register(&pdev->dev,
®ulators[i], &config);
if (IS_ERR(regulator))
@@ -1296,7 +1314,7 @@ static int s2mps11_pmic_probe(struct platform_device *pdev)
regulators[i].id,
regulators[i].name);
- if (config.ena_gpiod) {
+ if (regulator->ena_pin) {
ret = s2mps14_pmic_enable_ext_control(s2mps11,
regulator);
if (ret < 0)
--
2.49.0.1204.g71687c7c1d-goog
Return-Path: <linux-kernel+bounces-673445-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id A673841E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:29:03 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 7B91216623C
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:28:54 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id DCA491F428F;
Wed, 4 Jun 2025 15:26:02 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="SJpuLOao"
Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0718418B47E
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:25:52 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.41
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749050757; cv=none; b=moudFhl1H9L6tCCVn3dgotcK/MAQqu0kt/vNpSffTiXijm6OugR12uZj82hJiCjl6/1aCYfJyEIL2w2tgaQ9d2Gvkv9SakcUnCFq8ia9VC9MiMr7oOHyj7Dx26UAHmsQnk/tDZbtGrs9c1rkiu07AU//LVeTeCI4pjzEaMTp6bQ=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749050757; c=relaxed/simple;
bh=hEZQpjBK7E4S4fNhXRiHmozkj65EBLBzpWmQesVJVXY=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=p/j4NnAo8o3/7g/Xt4WdIXvFm1GiIOcTS1KxeAHv1/YSrQiaJ1pMsEPyjUnBEIWr8pDbY8vGXmBxZx5CiCAhBnQC8eDnuUn2m4rgTc+ny28SGsMTlTx4fDKelP7EfAYJtaHrksSpvISScc7swodhN2dvY2usk5COCzYcyC/FrOs=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=SJpuLOao; arc=none smtp.client-ip=209.85.218.41
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org
Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-acb5ec407b1so1092368666b.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 08:25:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=linaro.org; s=google; t=1749050751; x=1749655551; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=WSCk1RCEvOr7TDmN41Gm/t/3PTvQDV7fG4m/TbYxnM4=;
b=SJpuLOaon3Cr+cl4zOdlPJQlrzncJdgmiY6i2JuXEQN45dGElW5R/wJRYwePhbAUjE
plsmev73G8jNqnF1jaoD14uXQYHXwnNlAya7SCZc+4gxNmjwb3N232kVbPDmVYn3khex
eAT/WOVn+QuQpItDiMhoRraMC3OcHbBHbErX7qxNHkvdd1EAZmySk4NFBBks6qieSZeD
gNLQAVxZg3cXModP4f1kM2h1vpQ9YF7ih5VPK9RAHW7L+GmmvSaserZjc0dbhO5tTs7y
xoE8UXq9MeQWMCmaWunwtOwy+5sqxOSxwyLPX8whHD7cN1tlEUroqhh15z+BAOh3tnNV
yqrw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749050751; x=1749655551;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=WSCk1RCEvOr7TDmN41Gm/t/3PTvQDV7fG4m/TbYxnM4=;
b=oeDASmRouisbEoFLcvsu0g+HLTsQDu0yA2ILTXrFxyqLqsS4XWdQwMpZjQdyWCHRCm
rmsZ9PVOA/zZCcFcxpqKshf7pk5+imBPSg+2IeSDaBHQgOmF6pNAB0G3tipBi3MrTDdX
V8dV3sVo7uQFFbPP4TFWx6qup5etwAp41MqzA8rjrmsMpS+R1a/CpYaZUECAWVkHyCsl
pkqblL8Kb70BT7tjMI3uF/oAvzweCUnuh2AXBHJ0DcSxSU7U8e8f3N9uPv2CryA/1fcO
uYQeh7gGfpmz0bovNSUAD8AL7ERhTu1RtXgF/+9p6Epk0O/q15Smq2xibNCn9gN32fci
djfQ==
X-Forwarded-Encrypted: i=1; AJvYcCVPBnLLvgnL8o+eMWOdwEg9FP3vS0erGrq9BsfeKPjQ7jBpkhHyQ5c45xKElDwqguL+ViVmWbeLijZ/Kp0=@vger.kernel.org
X-Gm-Message-State: AOJu0YyjIWTVtXzmPqxhLO2y8gdzOrJPZcoCirMpktCyeUPvHwCJkqVl
774j9AOp797jvfHj5fTaGN8jp8WCeCtC2zkq7Gjik1S0j66OZdIvEOZvYZJF2ikYLuk=
X-Gm-Gg: ASbGncul3RsP5663K5IwbYK/aaq8P5pr4Id7RhkD5/1RIxoVTJckNjxZC+o9pgsYGXg
8VIYNOyo5w5wqKGY2u1u+8R8Mjzk9f1msYVBsfzCZDk4U0h09q44utVv5BGVSL82ilufCJuMHXY
oyeg1NFwWmtpmtTsf07odgnoDgRUO5pAr1vUSHiMtXK353s0qvGki9i10frsDfzL6fEM8J9ojv5
S/suZScgdqcr0u0kPy5lQAIjs3Sb0ReZ58dbBOXn+E2tMHto4XaskWB3MzbAxbgcMX91R7Jy5e1
g1CoYmjy++kpnznMfC0WvC3EIKpbHCFJNLuKrhVfhenFgIAiv43rQfuWLt/h2P8VaBlgv3tJaU3
vAb9idjaxiry4rnTBzWtPt/tCqCW0AluBQpA=
X-Google-Smtp-Source: AGHT+IHxs49fPL3OhZlxz0pual1n3oAnI4X+vf8MtzzY07OyKvdLSmHWEZvMEza0KI0jlSsYkWJ2/g==
X-Received: by 2002:a17:907:9713:b0:add:ed3a:e792 with SMTP id a640c23a62f3a-addf8fb3ademr280186766b.47.1749050749542;
Wed, 04 Jun 2025 08:25:49 -0700 (PDT)
Received: from puffmais.c.googlers.com (140.20.91.34.bc.googleusercontent.com. [34.91.20.140])
by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-606ed984f63sm1051640a12.58.2025.06.04.08.25.49
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 08:25:49 -0700 (PDT)
From: =?utf-8?q?Andr=C3=A9_Draszik?= <andre.draszik@xxxxxxxxxx>
Date: Wed, 04 Jun 2025 16:25:47 +0100
Subject: [PATCH 08/17] mfd: sec: Add support for S2MPG11 PMIC via ACPM
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Message-Id: <20250604-s2mpg1x-regulators-v1-8-6038740f49ae@xxxxxxxxxx>
References: <20250604-s2mpg1x-regulators-v1-0-6038740f49ae@xxxxxxxxxx>
In-Reply-To: <20250604-s2mpg1x-regulators-v1-0-6038740f49ae@xxxxxxxxxx>
To: Tudor Ambarus <tudor.ambarus@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>, Krzysztof Kozlowski <krzk@xxxxxxxxxx>,
Liam Girdwood <lgirdwood@xxxxxxxxx>, Mark Brown <broonie@xxxxxxxxxx>,
Lee Jones <lee@xxxxxxxxxx>, Linus Walleij <linus.walleij@xxxxxxxxxx>,
Bartosz Golaszewski <brgl@xxxxxxxx>
Cc: Peter Griffin <peter.griffin@xxxxxxxxxx>,
Will McVicker <willmcvicker@xxxxxxxxxx>, kernel-team@xxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-samsung-soc@xxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-gpio@xxxxxxxxxxxxxxx,
=?utf-8?q?Andr=C3=A9_Draszik?= <andre.draszik@xxxxxxxxxx>
X-Mailer: b4 0.14.2
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Add support for Samsung's S2MPG11 PMIC, which is a Power Management IC
for mobile applications with buck converters, various LDOs, and power
meters. It typically complements an S2MPG10 PMIC in a main/sub
configuration as the sub-PMIC.
Like S2MPG10, communication is not via I2C, but via the Samsung ACPM
firmware.
Note: The firmware uses the ACPM channel ID and the Speedy channel ID
to select the PMIC address. Since these are firmware properties, they
can not be retrieved from DT, but instead are deducted from the
compatible for now.
Signed-off-by: André Draszik <andre.draszik@xxxxxxxxxx>
---
Note: checkpatch suggests to update MAINTAINERS, but the new file is
covered already due to using a wildcard.
---
drivers/mfd/sec-acpm.c | 213 +++++++++++++++++-
drivers/mfd/sec-common.c | 18 +-
drivers/mfd/sec-irq.c | 67 +++++-
include/linux/mfd/samsung/core.h | 1 +
include/linux/mfd/samsung/irq.h | 99 +++++++++
include/linux/mfd/samsung/s2mpg11.h | 420 ++++++++++++++++++++++++++++++++++++
6 files changed, 807 insertions(+), 11 deletions(-)
diff --git a/drivers/mfd/sec-acpm.c b/drivers/mfd/sec-acpm.c
index 8b31c816d65b86c54a108fa994384abfac0e7da4..b44af6f8b1cdfcb75cf9d4c55c9d973a88fd510c 100644
--- a/drivers/mfd/sec-acpm.c
+++ b/drivers/mfd/sec-acpm.c
@@ -13,6 +13,7 @@
#include <linux/mfd/samsung/core.h>
#include <linux/mfd/samsung/rtc.h>
#include <linux/mfd/samsung/s2mpg10.h>
+#include <linux/mfd/samsung/s2mpg11.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/of.h>
@@ -216,6 +217,155 @@ static const struct regmap_config s2mpg10_regmap_config_meter = {
.cache_type = REGCACHE_FLAT,
};
+static const struct regmap_range s2mpg11_common_registers[] = {
+ regmap_reg_range(0x00, 0x02), /* CHIP_ID_S, INT, INT_MASK */
+ regmap_reg_range(0x0a, 0x0c), /* Speedy control */
+ regmap_reg_range(0x1a, 0x27), /* Debug */
+};
+
+static const struct regmap_range s2mpg11_common_ro_registers[] = {
+ regmap_reg_range(0x00, 0x01), /* CHIP_ID_S, INT */
+ regmap_reg_range(0x25, 0x27), /* Debug */
+};
+
+static const struct regmap_range s2mpg11_common_nonvolatile_registers[] = {
+ regmap_reg_range(0x00, 0x00), /* CHIP_ID_S */
+ regmap_reg_range(0x02, 0x02), /* INT_MASK */
+ regmap_reg_range(0x0a, 0x0c), /* Speedy control */
+};
+
+static const struct regmap_range s2mpg11_common_precious_registers[] = {
+ regmap_reg_range(0x01, 0x01), /* INT */
+};
+
+static const struct regmap_access_table s2mpg11_common_wr_table = {
+ .yes_ranges = s2mpg11_common_registers,
+ .n_yes_ranges = ARRAY_SIZE(s2mpg11_common_registers),
+ .no_ranges = s2mpg11_common_ro_registers,
+ .n_no_ranges = ARRAY_SIZE(s2mpg11_common_ro_registers),
+};
+
+static const struct regmap_access_table s2mpg11_common_rd_table = {
+ .yes_ranges = s2mpg11_common_registers,
+ .n_yes_ranges = ARRAY_SIZE(s2mpg11_common_registers),
+};
+
+static const struct regmap_access_table s2mpg11_common_volatile_table = {
+ .no_ranges = s2mpg11_common_nonvolatile_registers,
+ .n_no_ranges = ARRAY_SIZE(s2mpg11_common_nonvolatile_registers),
+};
+
+static const struct regmap_access_table s2mpg11_common_precious_table = {
+ .yes_ranges = s2mpg11_common_precious_registers,
+ .n_yes_ranges = ARRAY_SIZE(s2mpg11_common_precious_registers),
+};
+
+static const struct regmap_config s2mpg11_regmap_config_common = {
+ .name = "common",
+ .reg_bits = ACPM_ADDR_BITS,
+ .val_bits = 8,
+ .max_register = S2MPG11_COMMON_SPD_DEBUG4,
+ .wr_table = &s2mpg11_common_wr_table,
+ .rd_table = &s2mpg11_common_rd_table,
+ .volatile_table = &s2mpg11_common_volatile_table,
+ .precious_table = &s2mpg11_common_precious_table,
+ .num_reg_defaults_raw = S2MPG11_COMMON_SPD_DEBUG4 + 1,
+ .cache_type = REGCACHE_FLAT,
+};
+
+static const struct regmap_range s2mpg11_pmic_registers[] = {
+ regmap_reg_range(0x00, 0x5a), /* All PMIC registers */
+ regmap_reg_range(0x5c, 0xb7), /* All PMIC registers */
+};
+
+static const struct regmap_range s2mpg11_pmic_ro_registers[] = {
+ regmap_reg_range(0x00, 0x05), /* INTx */
+ regmap_reg_range(0x0c, 0x0d), /* STATUS OFFSRC */
+ regmap_reg_range(0x98, 0x98), /* GPIO input */
+};
+
+static const struct regmap_range s2mpg11_pmic_nonvolatile_registers[] = {
+ regmap_reg_range(0x06, 0x0b), /* INTxM */
+};
+
+static const struct regmap_range s2mpg11_pmic_precious_registers[] = {
+ regmap_reg_range(0x00, 0x05), /* INTx */
+};
+
+static const struct regmap_access_table s2mpg11_pmic_wr_table = {
+ .yes_ranges = s2mpg11_pmic_registers,
+ .n_yes_ranges = ARRAY_SIZE(s2mpg11_pmic_registers),
+ .no_ranges = s2mpg11_pmic_ro_registers,
+ .n_no_ranges = ARRAY_SIZE(s2mpg11_pmic_ro_registers),
+};
+
+static const struct regmap_access_table s2mpg11_pmic_rd_table = {
+ .yes_ranges = s2mpg11_pmic_registers,
+ .n_yes_ranges = ARRAY_SIZE(s2mpg11_pmic_registers),
+};
+
+static const struct regmap_access_table s2mpg11_pmic_volatile_table = {
+ .no_ranges = s2mpg11_pmic_nonvolatile_registers,
+ .n_no_ranges = ARRAY_SIZE(s2mpg11_pmic_nonvolatile_registers),
+};
+
+static const struct regmap_access_table s2mpg11_pmic_precious_table = {
+ .yes_ranges = s2mpg11_pmic_precious_registers,
+ .n_yes_ranges = ARRAY_SIZE(s2mpg11_pmic_precious_registers),
+};
+
+static const struct regmap_config s2mpg11_regmap_config_pmic = {
+ .name = "pmic",
+ .reg_bits = ACPM_ADDR_BITS,
+ .val_bits = 8,
+ .max_register = S2MPG11_PMIC_LDO_SENSE2,
+ .wr_table = &s2mpg11_pmic_wr_table,
+ .rd_table = &s2mpg11_pmic_rd_table,
+ .volatile_table = &s2mpg11_pmic_volatile_table,
+ .precious_table = &s2mpg11_pmic_precious_table,
+ .num_reg_defaults_raw = S2MPG11_PMIC_LDO_SENSE2 + 1,
+ .cache_type = REGCACHE_FLAT,
+};
+
+static const struct regmap_range s2mpg11_meter_registers[] = {
+ regmap_reg_range(0x00, 0x3e), /* Meter config */
+ regmap_reg_range(0x40, 0x8a), /* Meter data */
+ regmap_reg_range(0x8d, 0x9c), /* Meter data */
+};
+
+static const struct regmap_range s2mpg11_meter_ro_registers[] = {
+ regmap_reg_range(0x40, 0x9c), /* Meter data */
+};
+
+static const struct regmap_access_table s2mpg11_meter_wr_table = {
+ .yes_ranges = s2mpg11_meter_registers,
+ .n_yes_ranges = ARRAY_SIZE(s2mpg11_meter_registers),
+ .no_ranges = s2mpg11_meter_ro_registers,
+ .n_no_ranges = ARRAY_SIZE(s2mpg11_meter_ro_registers),
+};
+
+static const struct regmap_access_table s2mpg11_meter_rd_table = {
+ .yes_ranges = s2mpg11_meter_registers,
+ .n_yes_ranges = ARRAY_SIZE(s2mpg11_meter_registers),
+};
+
+static const struct regmap_access_table s2mpg11_meter_volatile_table = {
+ .yes_ranges = s2mpg11_meter_ro_registers,
+ .n_yes_ranges = ARRAY_SIZE(s2mpg11_meter_ro_registers),
+};
+
+static const struct regmap_config s2mpg11_regmap_config_meter = {
+ .name = "meter",
+ .reg_bits = ACPM_ADDR_BITS,
+ .val_bits = 8,
+ .max_register = S2MPG11_METER_LPF_DATA_NTC7_2,
+ .wr_table = &s2mpg11_meter_wr_table,
+ .rd_table = &s2mpg11_meter_rd_table,
+ .volatile_table = &s2mpg11_meter_volatile_table,
+ .num_reg_defaults_raw = S2MPG11_METER_LPF_DATA_NTC7_2 + 1,
+ .cache_type = REGCACHE_FLAT,
+};
+
struct sec_pmic_acpm_shared_bus_context {
const struct acpm_handle *acpm;
unsigned int acpm_chan_id;
@@ -325,16 +475,22 @@ static struct regmap *sec_pmic_acpm_regmap_init(struct device *dev,
return regmap;
}
-static void sec_pmic_acpm_mask_common_irqs(void *regmap_common)
+static void sec_pmic_acpm_mask_common_s2mpg10_irqs(void *regmap_common)
{
regmap_write(regmap_common, S2MPG10_COMMON_INT_MASK, S2MPG10_COMMON_INT_SRC);
}
+static void sec_pmic_acpm_mask_common_s2mpg11_irqs(void *regmap_common)
+{
+ regmap_write(regmap_common, S2MPG11_COMMON_INT_MASK, S2MPG11_COMMON_INT_SRC);
+}
+
static int sec_pmic_acpm_probe(struct platform_device *pdev)
{
struct regmap *regmap_common, *regmap_pmic, *regmap;
const struct sec_pmic_acpm_platform_data *pdata;
struct sec_pmic_acpm_shared_bus_context *shared_ctx;
+ void (*masq_irqs_handler)(void *data);
const struct acpm_handle *acpm;
struct device *dev = &pdev->dev;
int ret, irq;
@@ -365,7 +521,19 @@ static int sec_pmic_acpm_probe(struct platform_device *pdev)
return PTR_ERR(regmap_common);
/* Mask all interrupts from 'common' block, until successful init */
- ret = regmap_write(regmap_common, S2MPG10_COMMON_INT_MASK, S2MPG10_COMMON_INT_SRC);
+ switch (pdata->device_type) {
+ case S2MPG10:
+ ret = regmap_write(regmap_common, S2MPG10_COMMON_INT_MASK, S2MPG10_COMMON_INT_SRC);
+ break;
+
+ case S2MPG11:
+ ret = regmap_write(regmap_common, S2MPG11_COMMON_INT_MASK, S2MPG11_COMMON_INT_SRC);
+ break;
+
+ default:
+ return dev_err_probe(dev, -EINVAL, "Unsupported device type %d\n",
+ pdata->device_type);
+ }
if (ret)
return dev_err_probe(dev, ret, "failed to mask common block interrupts\n");
@@ -374,10 +542,12 @@ static int sec_pmic_acpm_probe(struct platform_device *pdev)
if (IS_ERR(regmap_pmic))
return PTR_ERR(regmap_pmic);
- regmap = sec_pmic_acpm_regmap_init(dev, shared_ctx, SEC_PMIC_ACPM_ACCESSTYPE_RTC,
- pdata->regmap_cfg_rtc, true);
- if (IS_ERR(regmap))
- return PTR_ERR(regmap);
+ if (pdata->regmap_cfg_rtc) {
+ regmap = sec_pmic_acpm_regmap_init(dev, shared_ctx, SEC_PMIC_ACPM_ACCESSTYPE_RTC,
+ pdata->regmap_cfg_rtc, true);
+ if (IS_ERR(regmap))
+ return PTR_ERR(regmap);
+ }
regmap = sec_pmic_acpm_regmap_init(dev, shared_ctx, SEC_PMIC_ACPM_ACCESSTYPE_METER,
pdata->regmap_cfg_meter, true);
@@ -392,13 +562,28 @@ static int sec_pmic_acpm_probe(struct platform_device *pdev)
devm_device_init_wakeup(dev);
/* Unmask PMIC interrupt from 'common' block, now that everything is in place. */
- ret = regmap_clear_bits(regmap_common, S2MPG10_COMMON_INT_MASK,
- S2MPG10_COMMON_INT_SRC_PMIC);
+ switch (pdata->device_type) {
+ case S2MPG10:
+ ret = regmap_clear_bits(regmap_common, S2MPG10_COMMON_INT_MASK,
+ S2MPG10_COMMON_INT_SRC_PMIC);
+ masq_irqs_handler = sec_pmic_acpm_mask_common_s2mpg10_irqs;
+ break;
+
+ case S2MPG11:
+ ret = regmap_clear_bits(regmap_common, S2MPG11_COMMON_INT_MASK,
+ S2MPG11_COMMON_INT_SRC_PMIC);
+ masq_irqs_handler = sec_pmic_acpm_mask_common_s2mpg11_irqs;
+ break;
+
+ default:
+ return dev_err_probe(dev, -EINVAL, "Unsupported device type %d\n",
+ pdata->device_type);
+ }
if (ret)
return dev_err_probe(dev, ret, "failed to unmask PMIC interrupt\n");
/* Mask all interrupts from 'common' block on shutdown */
- ret = devm_add_action_or_reset(dev, sec_pmic_acpm_mask_common_irqs, regmap_common);
+ ret = devm_add_action_or_reset(dev, masq_irqs_handler, regmap_common);
if (ret)
return ret;
@@ -420,8 +605,18 @@ static const struct sec_pmic_acpm_platform_data s2mpg10_data = {
.regmap_cfg_meter = &s2mpg10_regmap_config_meter,
};
+static const struct sec_pmic_acpm_platform_data s2mpg11_data = {
+ .device_type = S2MPG11,
+ .acpm_chan_id = 2,
+ .speedy_channel = 1,
+ .regmap_cfg_common = &s2mpg11_regmap_config_common,
+ .regmap_cfg_pmic = &s2mpg11_regmap_config_pmic,
+ .regmap_cfg_meter = &s2mpg11_regmap_config_meter,
+};
+
static const struct of_device_id sec_pmic_acpm_of_match[] = {
{ .compatible = "samsung,s2mpg10-pmic", .data = &s2mpg10_data, },
+ { .compatible = "samsung,s2mpg11-pmic", .data = &s2mpg11_data, },
{ },
};
MODULE_DEVICE_TABLE(of, sec_pmic_acpm_of_match);
diff --git a/drivers/mfd/sec-common.c b/drivers/mfd/sec-common.c
index 8a1694c6ed8708397a51ebd4a49c22387d7e3495..497dcbb907c4e94db3be43c498f70996d72f13f6 100644
--- a/drivers/mfd/sec-common.c
+++ b/drivers/mfd/sec-common.c
@@ -43,6 +43,13 @@ static const struct mfd_cell s2mpg10_devs[] = {
MFD_CELL_OF("s2mpg10-gpio", NULL, NULL, 0, 0, "samsung,s2mpg10-gpio"),
};
+static const struct mfd_cell s2mpg11_devs[] = {
+ MFD_CELL_NAME("s2mpg11-meter"),
+ MFD_CELL_BASIC("s2mpg11-regulator", NULL, NULL, 0, S2MPG10_REGULATOR_CELL_ID_BUCKS),
+ MFD_CELL_BASIC("s2mpg11-regulator", NULL, NULL, 0, S2MPG10_REGULATOR_CELL_ID_LDOS),
+ MFD_CELL_OF("s2mpg11-gpio", NULL, NULL, 0, 0, "samsung,s2mpg11-gpio"),
+};
+
static const struct mfd_cell s2mps11_devs[] = {
MFD_CELL_NAME("s2mps11-regulator"),
MFD_CELL_NAME("s2mps14-rtc"),
@@ -86,8 +93,13 @@ static void sec_pmic_dump_rev(struct sec_pmic_dev *sec_pmic)
unsigned int val;
/* For s2mpg1x, the revision is in a different regmap */
- if (sec_pmic->device_type == S2MPG10)
+ switch (sec_pmic->device_type) {
+ case S2MPG10:
+ case S2MPG11:
return;
+ default:
+ break;
+ }
/* For each device type, the REG_ID is always the first register */
if (!regmap_read(sec_pmic->regmap_pmic, S2MPS11_REG_ID, &val))
@@ -192,6 +204,10 @@ int sec_pmic_probe(struct device *dev, int device_type, unsigned int irq,
sec_devs = s2mpg10_devs;
num_sec_devs = ARRAY_SIZE(s2mpg10_devs);
break;
+ case S2MPG11:
+ sec_devs = s2mpg11_devs;
+ num_sec_devs = ARRAY_SIZE(s2mpg11_devs);
+ break;
case S2MPS11X:
sec_devs = s2mps11_devs;
num_sec_devs = ARRAY_SIZE(s2mps11_devs);
diff --git a/drivers/mfd/sec-irq.c b/drivers/mfd/sec-irq.c
index c5c80b1ba104e6c5a55b442d2f10a8554201a961..a04e46144baae6a195a84df56c53e399e3875e3d 100644
--- a/drivers/mfd/sec-irq.c
+++ b/drivers/mfd/sec-irq.c
@@ -11,6 +11,7 @@
#include <linux/mfd/samsung/core.h>
#include <linux/mfd/samsung/irq.h>
#include <linux/mfd/samsung/s2mpg10.h>
+#include <linux/mfd/samsung/s2mpg11.h>
#include <linux/mfd/samsung/s2mps11.h>
#include <linux/mfd/samsung/s2mps14.h>
#include <linux/mfd/samsung/s2mpu02.h>
@@ -73,6 +74,58 @@ static const struct regmap_irq s2mpg10_irqs[] = {
REGMAP_IRQ_REG(S2MPG10_IRQ_PWR_WARN_CH7, 5, S2MPG10_IRQ_PWR_WARN_CH7_MASK),
};
+static const struct regmap_irq s2mpg11_irqs[] = {
+ REGMAP_IRQ_REG(S2MPG11_IRQ_PWRONF, 0, S2MPG11_IRQ_PWRONF_MASK),
+ REGMAP_IRQ_REG(S2MPG11_IRQ_PWRONR, 0, S2MPG11_IRQ_PWRONR_MASK),
+ REGMAP_IRQ_REG(S2MPG11_IRQ_PIF_TIMEOUT_MIF, 0, S2MPG11_IRQ_PIF_TIMEOUT_MIF_MASK),
+ REGMAP_IRQ_REG(S2MPG11_IRQ_PIF_TIMEOUTS, 0, S2MPG11_IRQ_PIF_TIMEOUTS_MASK),
+ REGMAP_IRQ_REG(S2MPG11_IRQ_WTSR, 0, S2MPG11_IRQ_WTSR_MASK),
+ REGMAP_IRQ_REG(S2MPG11_IRQ_SPD_ABNORMAL_STOP, 0, S2MPG11_IRQ_SPD_ABNORMAL_STOP_MASK),
+ REGMAP_IRQ_REG(S2MPG11_IRQ_SPD_PARITY_ERR, 0, S2MPG11_IRQ_SPD_PARITY_ERR_MASK),
+
+ REGMAP_IRQ_REG(S2MPG11_IRQ_140C, 1, S2MPG11_IRQ_INT140C_MASK),
+ REGMAP_IRQ_REG(S2MPG11_IRQ_120C, 1, S2MPG11_IRQ_INT120C_MASK),
+ REGMAP_IRQ_REG(S2MPG11_IRQ_TSD, 1, S2MPG11_IRQ_TSD_MASK),
+ REGMAP_IRQ_REG(S2MPG11_IRQ_WRST, 1, S2MPG11_IRQ_WRST_MASK),
+ REGMAP_IRQ_REG(S2MPG11_IRQ_NTC_CYCLE_DONE, 1, S2MPG11_IRQ_NTC_CYCLE_DONE_MASK),
+ REGMAP_IRQ_REG(S2MPG11_IRQ_PMETER_OVERF, 1, S2MPG11_IRQ_PMETER_OVERF_MASK),
+
+ REGMAP_IRQ_REG(S2MPG11_IRQ_OCP_B1S, 2, S2MPG11_IRQ_OCP_B1S_MASK),
+ REGMAP_IRQ_REG(S2MPG11_IRQ_OCP_B2S, 2, S2MPG11_IRQ_OCP_B2S_MASK),
+ REGMAP_IRQ_REG(S2MPG11_IRQ_OCP_B3S, 2, S2MPG11_IRQ_OCP_B3S_MASK),
+ REGMAP_IRQ_REG(S2MPG11_IRQ_OCP_B4S, 2, S2MPG11_IRQ_OCP_B4S_MASK),
+ REGMAP_IRQ_REG(S2MPG11_IRQ_OCP_B5S, 2, S2MPG11_IRQ_OCP_B5S_MASK),
+ REGMAP_IRQ_REG(S2MPG11_IRQ_OCP_B6S, 2, S2MPG11_IRQ_OCP_B6S_MASK),
+ REGMAP_IRQ_REG(S2MPG11_IRQ_OCP_B7S, 2, S2MPG11_IRQ_OCP_B7S_MASK),
+ REGMAP_IRQ_REG(S2MPG11_IRQ_OCP_B8S, 2, S2MPG11_IRQ_OCP_B8S_MASK),
+
+ REGMAP_IRQ_REG(S2MPG11_IRQ_OCP_B9S, 3, S2MPG11_IRQ_OCP_B9S_MASK),
+ REGMAP_IRQ_REG(S2MPG11_IRQ_OCP_B10S, 3, S2MPG11_IRQ_OCP_B10S_MASK),
+ REGMAP_IRQ_REG(S2MPG11_IRQ_OCP_BDS, 3, S2MPG11_IRQ_OCP_BDS_MASK),
+ REGMAP_IRQ_REG(S2MPG11_IRQ_OCP_BAS, 3, S2MPG11_IRQ_OCP_BAS_MASK),
+ REGMAP_IRQ_REG(S2MPG11_IRQ_OCP_BBS, 3, S2MPG11_IRQ_OCP_BBS_MASK),
+ REGMAP_IRQ_REG(S2MPG11_IRQ_WLWP_ACC, 3, S2MPG11_IRQ_WLWP_ACC_MASK),
+ REGMAP_IRQ_REG(S2MPG11_IRQ_SPD_SRP_PKT_RST, 3, S2MPG11_IRQ_SPD_SRP_PKT_RST_MASK),
+
+ REGMAP_IRQ_REG(S2MPG11_IRQ_PWR_WARN_CH0, 4, S2MPG11_IRQ_PWR_WARN_CH0_MASK),
+ REGMAP_IRQ_REG(S2MPG11_IRQ_PWR_WARN_CH1, 4, S2MPG11_IRQ_PWR_WARN_CH1_MASK),
+ REGMAP_IRQ_REG(S2MPG11_IRQ_PWR_WARN_CH2, 4, S2MPG11_IRQ_PWR_WARN_CH2_MASK),
+ REGMAP_IRQ_REG(S2MPG11_IRQ_PWR_WARN_CH3, 4, S2MPG11_IRQ_PWR_WARN_CH3_MASK),
+ REGMAP_IRQ_REG(S2MPG11_IRQ_PWR_WARN_CH4, 4, S2MPG11_IRQ_PWR_WARN_CH4_MASK),
+ REGMAP_IRQ_REG(S2MPG11_IRQ_PWR_WARN_CH5, 4, S2MPG11_IRQ_PWR_WARN_CH5_MASK),
+ REGMAP_IRQ_REG(S2MPG11_IRQ_PWR_WARN_CH6, 4, S2MPG11_IRQ_PWR_WARN_CH6_MASK),
+ REGMAP_IRQ_REG(S2MPG11_IRQ_PWR_WARN_CH7, 4, S2MPG11_IRQ_PWR_WARN_CH7_MASK),
+
+ REGMAP_IRQ_REG(S2MPG11_IRQ_NTC_WARN_CH0, 5, S2MPG11_IRQ_NTC_WARN_CH0_MASK),
+ REGMAP_IRQ_REG(S2MPG11_IRQ_NTC_WARN_CH1, 5, S2MPG11_IRQ_NTC_WARN_CH1_MASK),
+ REGMAP_IRQ_REG(S2MPG11_IRQ_NTC_WARN_CH2, 5, S2MPG11_IRQ_NTC_WARN_CH2_MASK),
+ REGMAP_IRQ_REG(S2MPG11_IRQ_NTC_WARN_CH3, 5, S2MPG11_IRQ_NTC_WARN_CH3_MASK),
+ REGMAP_IRQ_REG(S2MPG11_IRQ_NTC_WARN_CH4, 5, S2MPG11_IRQ_NTC_WARN_CH4_MASK),
+ REGMAP_IRQ_REG(S2MPG11_IRQ_NTC_WARN_CH5, 5, S2MPG11_IRQ_NTC_WARN_CH5_MASK),
+ REGMAP_IRQ_REG(S2MPG11_IRQ_NTC_WARN_CH6, 5, S2MPG11_IRQ_NTC_WARN_CH6_MASK),
+ REGMAP_IRQ_REG(S2MPG11_IRQ_NTC_WARN_CH7, 5, S2MPG11_IRQ_NTC_WARN_CH7_MASK),
+};
+
static const struct regmap_irq s2mps11_irqs[] = {
REGMAP_IRQ_REG(S2MPS11_IRQ_PWRONF, 0, S2MPS11_IRQ_PWRONF_MASK),
REGMAP_IRQ_REG(S2MPS11_IRQ_PWRONR, 0, S2MPS11_IRQ_PWRONR_MASK),
@@ -180,7 +233,7 @@ static const struct regmap_irq s5m8767_irqs[] = {
REGMAP_IRQ_REG(S5M8767_IRQ_WTSR, 2, S5M8767_IRQ_WTSR_MASK),
};
-/* All S2MPG10 interrupt sources are read-only and don't require clearing */
+/* All S2MPG1x interrupt sources are read-only and don't require clearing */
static const struct regmap_irq_chip s2mpg10_irq_chip = {
.name = "s2mpg10",
.irqs = s2mpg10_irqs,
@@ -190,6 +243,15 @@ static const struct regmap_irq_chip s2mpg10_irq_chip = {
.mask_base = S2MPG10_PMIC_INT1M,
};
+static const struct regmap_irq_chip s2mpg11_irq_chip = {
+ .name = "s2mpg11",
+ .irqs = s2mpg11_irqs,
+ .num_irqs = ARRAY_SIZE(s2mpg11_irqs),
+ .num_regs = 6,
+ .status_base = S2MPG11_PMIC_INT1,
+ .mask_base = S2MPG11_PMIC_INT1M,
+};
+
static const struct regmap_irq_chip s2mps11_irq_chip = {
.name = "s2mps11",
.irqs = s2mps11_irqs,
@@ -270,6 +332,9 @@ int sec_irq_init(struct sec_pmic_dev *sec_pmic)
case S2MPG10:
sec_irq_chip = &s2mpg10_irq_chip;
break;
+ case S2MPG11:
+ sec_irq_chip = &s2mpg11_irq_chip;
+ break;
case S2MPS11X:
sec_irq_chip = &s2mps11_irq_chip;
break;
diff --git a/include/linux/mfd/samsung/core.h b/include/linux/mfd/samsung/core.h
index d785e101fe795a5d8f9cccf4ccc4232437e89416..f5fba117bea61b3e3fb308759dc2748f6dd01dfb 100644
--- a/include/linux/mfd/samsung/core.h
+++ b/include/linux/mfd/samsung/core.h
@@ -40,6 +40,7 @@ enum sec_device_type {
S2DOS05,
S2MPA01,
S2MPG10,
+ S2MPG11,
S2MPS11X,
S2MPS13X,
S2MPS14X,
diff --git a/include/linux/mfd/samsung/irq.h b/include/linux/mfd/samsung/irq.h
index b4805cbd949bd605004bd88cf361109d1cbbc3bf..08b1ab33bad48194491fef88d48d5d0027e06a7c 100644
--- a/include/linux/mfd/samsung/irq.h
+++ b/include/linux/mfd/samsung/irq.h
@@ -160,6 +160,105 @@ enum s2mpg10_irq {
S2MPG10_IRQ_NR,
};
+enum s2mpg11_irq {
+ /* PMIC */
+ S2MPG11_IRQ_PWRONF,
+ S2MPG11_IRQ_PWRONR,
+ S2MPG11_IRQ_PIF_TIMEOUT_MIF,
+ S2MPG11_IRQ_PIF_TIMEOUTS,
+ S2MPG11_IRQ_WTSR,
+ S2MPG11_IRQ_SPD_ABNORMAL_STOP,
+ S2MPG11_IRQ_SPD_PARITY_ERR,
+#define S2MPG11_IRQ_PWRONF_MASK BIT(0)
+#define S2MPG11_IRQ_PWRONR_MASK BIT(1)
+#define S2MPG11_IRQ_PIF_TIMEOUT_MIF_MASK BIT(3)
+#define S2MPG11_IRQ_PIF_TIMEOUTS_MASK BIT(4)
+#define S2MPG11_IRQ_WTSR_MASK BIT(5)
+#define S2MPG11_IRQ_SPD_ABNORMAL_STOP_MASK BIT(6)
+#define S2MPG11_IRQ_SPD_PARITY_ERR_MASK BIT(7)
+
+ S2MPG11_IRQ_140C,
+ S2MPG11_IRQ_120C,
+ S2MPG11_IRQ_TSD,
+ S2MPG11_IRQ_WRST,
+ S2MPG11_IRQ_NTC_CYCLE_DONE,
+ S2MPG11_IRQ_PMETER_OVERF,
+#define S2MPG11_IRQ_INT140C_MASK BIT(0)
+#define S2MPG11_IRQ_INT120C_MASK BIT(1)
+#define S2MPG11_IRQ_TSD_MASK BIT(2)
+#define S2MPG11_IRQ_WRST_MASK BIT(5)
+#define S2MPG11_IRQ_NTC_CYCLE_DONE_MASK BIT(6)
+#define S2MPG11_IRQ_PMETER_OVERF_MASK BIT(7)
+
+ S2MPG11_IRQ_OCP_B1S,
+ S2MPG11_IRQ_OCP_B2S,
+ S2MPG11_IRQ_OCP_B3S,
+ S2MPG11_IRQ_OCP_B4S,
+ S2MPG11_IRQ_OCP_B5S,
+ S2MPG11_IRQ_OCP_B6S,
+ S2MPG11_IRQ_OCP_B7S,
+ S2MPG11_IRQ_OCP_B8S,
+#define S2MPG11_IRQ_OCP_B1S_MASK BIT(0)
+#define S2MPG11_IRQ_OCP_B2S_MASK BIT(1)
+#define S2MPG11_IRQ_OCP_B3S_MASK BIT(2)
+#define S2MPG11_IRQ_OCP_B4S_MASK BIT(3)
+#define S2MPG11_IRQ_OCP_B5S_MASK BIT(4)
+#define S2MPG11_IRQ_OCP_B6S_MASK BIT(5)
+#define S2MPG11_IRQ_OCP_B7S_MASK BIT(6)
+#define S2MPG11_IRQ_OCP_B8S_MASK BIT(7)
+
+ S2MPG11_IRQ_OCP_B9S,
+ S2MPG11_IRQ_OCP_B10S,
+ S2MPG11_IRQ_OCP_BDS,
+ S2MPG11_IRQ_OCP_BAS,
+ S2MPG11_IRQ_OCP_BBS,
+ S2MPG11_IRQ_WLWP_ACC,
+ S2MPG11_IRQ_SPD_SRP_PKT_RST,
+#define S2MPG11_IRQ_OCP_B9S_MASK BIT(0)
+#define S2MPG11_IRQ_OCP_B10S_MASK BIT(1)
+#define S2MPG11_IRQ_OCP_BDS_MASK BIT(2)
+#define S2MPG11_IRQ_OCP_BAS_MASK BIT(3)
+#define S2MPG11_IRQ_OCP_BBS_MASK BIT(4)
+#define S2MPG11_IRQ_WLWP_ACC_MASK BIT(5)
+#define S2MPG11_IRQ_SPD_SRP_PKT_RST_MASK BIT(7)
+
+ S2MPG11_IRQ_PWR_WARN_CH0,
+ S2MPG11_IRQ_PWR_WARN_CH1,
+ S2MPG11_IRQ_PWR_WARN_CH2,
+ S2MPG11_IRQ_PWR_WARN_CH3,
+ S2MPG11_IRQ_PWR_WARN_CH4,
+ S2MPG11_IRQ_PWR_WARN_CH5,
+ S2MPG11_IRQ_PWR_WARN_CH6,
+ S2MPG11_IRQ_PWR_WARN_CH7,
+#define S2MPG11_IRQ_PWR_WARN_CH0_MASK BIT(0)
+#define S2MPG11_IRQ_PWR_WARN_CH1_MASK BIT(1)
+#define S2MPG11_IRQ_PWR_WARN_CH2_MASK BIT(2)
+#define S2MPG11_IRQ_PWR_WARN_CH3_MASK BIT(3)
+#define S2MPG11_IRQ_PWR_WARN_CH4_MASK BIT(4)
+#define S2MPG11_IRQ_PWR_WARN_CH5_MASK BIT(5)
+#define S2MPG11_IRQ_PWR_WARN_CH6_MASK BIT(6)
+#define S2MPG11_IRQ_PWR_WARN_CH7_MASK BIT(7)
+
+ S2MPG11_IRQ_NTC_WARN_CH0,
+ S2MPG11_IRQ_NTC_WARN_CH1,
+ S2MPG11_IRQ_NTC_WARN_CH2,
+ S2MPG11_IRQ_NTC_WARN_CH3,
+ S2MPG11_IRQ_NTC_WARN_CH4,
+ S2MPG11_IRQ_NTC_WARN_CH5,
+ S2MPG11_IRQ_NTC_WARN_CH6,
+ S2MPG11_IRQ_NTC_WARN_CH7,
+#define S2MPG11_IRQ_NTC_WARN_CH0_MASK BIT(0)
+#define S2MPG11_IRQ_NTC_WARN_CH1_MASK BIT(1)
+#define S2MPG11_IRQ_NTC_WARN_CH2_MASK BIT(2)
+#define S2MPG11_IRQ_NTC_WARN_CH3_MASK BIT(3)
+#define S2MPG11_IRQ_NTC_WARN_CH4_MASK BIT(4)
+#define S2MPG11_IRQ_NTC_WARN_CH5_MASK BIT(5)
+#define S2MPG11_IRQ_NTC_WARN_CH6_MASK BIT(6)
+#define S2MPG11_IRQ_NTC_WARN_CH7_MASK BIT(7)
+
+ S2MPG11_IRQ_NR,
+};
+
enum s2mps11_irq {
S2MPS11_IRQ_PWRONF,
S2MPS11_IRQ_PWRONR,
diff --git a/include/linux/mfd/samsung/s2mpg11.h b/include/linux/mfd/samsung/s2mpg11.h
new file mode 100644
index 0000000000000000000000000000000000000000..e4de7665f19fdb05dc4fcb83752728013d7a79ff
--- /dev/null
+++ b/include/linux/mfd/samsung/s2mpg11.h
@@ -0,0 +1,420 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2015 Samsung Electronics
+ * Copyright 2020 Google Inc
+ * Copyright 2025 Linaro Ltd.
+ */
+
+#ifndef __LINUX_MFD_S2MPG11_H
+#define __LINUX_MFD_S2MPG11_H
+
+/* Common registers (type 0x000) */
+enum s2mpg11_common_reg {
+ S2MPG11_COMMON_CHIPID,
+ S2MPG11_COMMON_INT,
+ S2MPG11_COMMON_INT_MASK,
+ S2MPG11_COMMON_SPD_CTRL1 = 0x0a,
+ S2MPG11_COMMON_SPD_CTRL2,
+ S2MPG11_COMMON_SPD_CTRL3,
+ S2MPG11_COMMON_MON1SEL = 0x1a,
+ S2MPG11_COMMON_MON2SEL,
+ S2MPG11_COMMON_MONR,
+ S2MPG11_COMMON_DEBUG_CTRL1,
+ S2MPG11_COMMON_DEBUG_CTRL2,
+ S2MPG11_COMMON_DEBUG_CTRL3,
+ S2MPG11_COMMON_DEBUG_CTRL4,
+ S2MPG11_COMMON_DEBUG_CTRL5,
+ S2MPG11_COMMON_DEBUG_CTRL6,
+ S2MPG11_COMMON_TEST_MODE1,
+ S2MPG11_COMMON_SPD_DEBUG1,
+ S2MPG11_COMMON_SPD_DEBUG2,
+ S2MPG11_COMMON_SPD_DEBUG3,
+ S2MPG11_COMMON_SPD_DEBUG4,
+};
+
+/* For S2MPG11_COMMON_INT and S2MPG11_COMMON_INT_MASK */
+#define S2MPG11_COMMON_INT_SRC GENMASK(2, 0)
+#define S2MPG11_COMMON_INT_SRC_PMIC BIT(0)
+
+/* PMIC registers (type 0x100) */
+enum s2mpg11_pmic_reg {
+ S2MPG11_PMIC_INT1,
+ S2MPG11_PMIC_INT2,
+ S2MPG11_PMIC_INT3,
+ S2MPG11_PMIC_INT4,
+ S2MPG11_PMIC_INT5,
+ S2MPG11_PMIC_INT6,
+ S2MPG11_PMIC_INT1M,
+ S2MPG11_PMIC_INT2M,
+ S2MPG11_PMIC_INT3M,
+ S2MPG11_PMIC_INT4M,
+ S2MPG11_PMIC_INT5M,
+ S2MPG11_PMIC_INT6M,
+ S2MPG11_PMIC_STATUS1,
+ S2MPG11_PMIC_OFFSRC,
+ S2MPG11_PMIC_COMMON_CTRL1,
+ S2MPG11_PMIC_COMMON_CTRL2,
+ S2MPG11_PMIC_COMMON_CTRL3,
+ S2MPG11_PMIC_MIMICKING_CTRL,
+ S2MPG11_PMIC_B1S_CTRL,
+ S2MPG11_PMIC_B1S_OUT1,
+ S2MPG11_PMIC_B1S_OUT2,
+ S2MPG11_PMIC_B2S_CTRL,
+ S2MPG11_PMIC_B2S_OUT1,
+ S2MPG11_PMIC_B2S_OUT2,
+ S2MPG11_PMIC_B3S_CTRL,
+ S2MPG11_PMIC_B3S_OUT1,
+ S2MPG11_PMIC_B3S_OUT2,
+ S2MPG11_PMIC_B4S_CTRL,
+ S2MPG11_PMIC_B4S_OUT,
+ S2MPG11_PMIC_B5S_CTRL,
+ S2MPG11_PMIC_B5S_OUT,
+ S2MPG11_PMIC_B6S_CTRL,
+ S2MPG11_PMIC_B6S_OUT1,
+ S2MPG11_PMIC_B6S_OUT2,
+ S2MPG11_PMIC_B7S_CTRL,
+ S2MPG11_PMIC_B7S_OUT1,
+ S2MPG11_PMIC_B7S_OUT2,
+ S2MPG11_PMIC_B8S_CTRL,
+ S2MPG11_PMIC_B8S_OUT1,
+ S2MPG11_PMIC_B8S_OUT2,
+ S2MPG11_PMIC_B9S_CTRL,
+ S2MPG11_PMIC_B9S_OUT1,
+ S2MPG11_PMIC_B9S_OUT2,
+ S2MPG11_PMIC_B10S_CTRL,
+ S2MPG11_PMIC_B10S_OUT,
+ S2MPG11_PMIC_BUCKD_CTRL,
+ S2MPG11_PMIC_BUCKD_OUT,
+ S2MPG11_PMIC_BUCKA_CTRL,
+ S2MPG11_PMIC_BUCKA_OUT,
+ S2MPG11_PMIC_BB_CTRL,
+ S2MPG11_PMIC_BB_OUT1,
+ S2MPG11_PMIC_BB_OUT2,
+ S2MPG11_PMIC_BUCK1S_USONIC,
+ S2MPG11_PMIC_BUCK2S_USONIC,
+ S2MPG11_PMIC_BUCK3S_USONIC,
+ S2MPG11_PMIC_BUCK4S_USONIC,
+ S2MPG11_PMIC_BUCK5S_USONIC,
+ S2MPG11_PMIC_BUCK6S_USONIC,
+ S2MPG11_PMIC_BUCK7S_USONIC,
+ S2MPG11_PMIC_BUCK8S_USONIC,
+ S2MPG11_PMIC_BUCK9S_USONIC,
+ S2MPG11_PMIC_BUCK10S_USONIC,
+ S2MPG11_PMIC_BUCKD_USONIC,
+ S2MPG11_PMIC_BUCKA_USONIC,
+ S2MPG11_PMIC_BB_USONIC,
+ S2MPG11_PMIC_L1S_CTRL1,
+ S2MPG11_PMIC_L1S_CTRL2,
+ S2MPG11_PMIC_L2S_CTRL1,
+ S2MPG11_PMIC_L2S_CTRL2,
+ S2MPG11_PMIC_L3S_CTRL,
+ S2MPG11_PMIC_L4S_CTRL,
+ S2MPG11_PMIC_L5S_CTRL,
+ S2MPG11_PMIC_L6S_CTRL,
+ S2MPG11_PMIC_L7S_CTRL,
+ S2MPG11_PMIC_L8S_CTRL,
+ S2MPG11_PMIC_L9S_CTRL,
+ S2MPG11_PMIC_L10S_CTRL,
+ S2MPG11_PMIC_L11S_CTRL,
+ S2MPG11_PMIC_L12S_CTRL,
+ S2MPG11_PMIC_L13S_CTRL,
+ S2MPG11_PMIC_L14S_CTRL,
+ S2MPG11_PMIC_L15S_CTRL,
+ S2MPG11_PMIC_LDO_CTRL1,
+ S2MPG11_PMIC_LDO_DSCH1,
+ S2MPG11_PMIC_LDO_DSCH2,
+ S2MPG11_PMIC_DVS_RAMP1,
+ S2MPG11_PMIC_DVS_RAMP2,
+ S2MPG11_PMIC_DVS_RAMP3,
+ S2MPG11_PMIC_DVS_RAMP4,
+ S2MPG11_PMIC_DVS_RAMP5,
+ S2MPG11_PMIC_DVS_RAMP6,
+ /* Nothing @ 0x5a */
+ S2MPG11_PMIC_DVS_SYNC_CTRL1 = 0x5c,
+ S2MPG11_PMIC_DVS_SYNC_CTRL2,
+ S2MPG11_PMIC_OFF_CTRL1,
+ S2MPG11_PMIC_OFF_CTRL2,
+ S2MPG11_PMIC_OFF_CTRL3,
+ S2MPG11_PMIC_SEQ_CTRL1,
+ S2MPG11_PMIC_SEQ_CTRL2,
+ S2MPG11_PMIC_SEQ_CTRL3,
+ S2MPG11_PMIC_SEQ_CTRL4,
+ S2MPG11_PMIC_SEQ_CTRL5,
+ S2MPG11_PMIC_SEQ_CTRL6,
+ S2MPG11_PMIC_SEQ_CTRL7,
+ S2MPG11_PMIC_SEQ_CTRL8,
+ S2MPG11_PMIC_SEQ_CTRL9,
+ S2MPG11_PMIC_SEQ_CTRL10,
+ S2MPG11_PMIC_SEQ_CTRL11,
+ S2MPG11_PMIC_SEQ_CTRL12,
+ S2MPG11_PMIC_SEQ_CTRL13,
+ S2MPG11_PMIC_SEQ_CTRL14,
+ S2MPG11_PMIC_SEQ_CTRL15,
+ S2MPG11_PMIC_SEQ_CTRL16,
+ S2MPG11_PMIC_SEQ_CTRL17,
+ S2MPG11_PMIC_SEQ_CTRL18,
+ S2MPG11_PMIC_SEQ_CTRL19,
+ S2MPG11_PMIC_SEQ_CTRL20,
+ S2MPG11_PMIC_SEQ_CTRL21,
+ S2MPG11_PMIC_SEQ_CTRL22,
+ S2MPG11_PMIC_SEQ_CTRL23,
+ S2MPG11_PMIC_SEQ_CTRL24,
+ S2MPG11_PMIC_SEQ_CTRL25,
+ S2MPG11_PMIC_SEQ_CTRL26,
+ S2MPG11_PMIC_SEQ_CTRL27,
+ S2MPG11_PMIC_OFF_SEQ_CTRL1,
+ S2MPG11_PMIC_OFF_SEQ_CTRL2,
+ S2MPG11_PMIC_OFF_SEQ_CTRL3,
+ S2MPG11_PMIC_OFF_SEQ_CTRL4,
+ S2MPG11_PMIC_OFF_SEQ_CTRL5,
+ S2MPG11_PMIC_OFF_SEQ_CTRL6,
+ S2MPG11_PMIC_OFF_SEQ_CTRL7,
+ S2MPG11_PMIC_OFF_SEQ_CTRL8,
+ S2MPG11_PMIC_OFF_SEQ_CTRL9,
+ S2MPG11_PMIC_OFF_SEQ_CTRL10,
+ S2MPG11_PMIC_OFF_SEQ_CTRL11,
+ S2MPG11_PMIC_OFF_SEQ_CTRL12,
+ S2MPG11_PMIC_OFF_SEQ_CTRL13,
+ S2MPG11_PMIC_OFF_SEQ_CTRL14,
+ S2MPG11_PMIC_OFF_SEQ_CTRL15,
+ S2MPG11_PMIC_OFF_SEQ_CTRL16,
+ S2MPG11_PMIC_OFF_SEQ_CTRL17,
+ S2MPG11_PMIC_PCTRLSEL1,
+ S2MPG11_PMIC_PCTRLSEL2,
+ S2MPG11_PMIC_PCTRLSEL3,
+ S2MPG11_PMIC_PCTRLSEL4,
+ S2MPG11_PMIC_PCTRLSEL5,
+ S2MPG11_PMIC_PCTRLSEL6,
+ S2MPG11_PMIC_DCTRLSEL1,
+ S2MPG11_PMIC_DCTRLSEL2,
+ S2MPG11_PMIC_DCTRLSEL3,
+ S2MPG11_PMIC_DCTRLSEL4,
+ S2MPG11_PMIC_DCTRLSEL5,
+ S2MPG11_PMIC_GPIO_CTRL1,
+ S2MPG11_PMIC_GPIO_CTRL2,
+ S2MPG11_PMIC_GPIO_CTRL3,
+ S2MPG11_PMIC_GPIO_CTRL4,
+ S2MPG11_PMIC_GPIO_CTRL5,
+ S2MPG11_PMIC_GPIO_CTRL6,
+ S2MPG11_PMIC_GPIO_CTRL7,
+ S2MPG11_PMIC_B2S_OCP_WARN,
+ S2MPG11_PMIC_B2S_OCP_WARN_X,
+ S2MPG11_PMIC_B2S_OCP_WARN_Y,
+ S2MPG11_PMIC_B2S_OCP_WARN_Z,
+ S2MPG11_PMIC_B2S_SOFT_OCP_WARN,
+ S2MPG11_PMIC_B2S_SOFT_OCP_WARN_X,
+ S2MPG11_PMIC_B2S_SOFT_OCP_WARN_Y,
+ S2MPG11_PMIC_B2S_SOFT_OCP_WARN_Z,
+ S2MPG11_PMIC_BUCK_OCP_EN1,
+ S2MPG11_PMIC_BUCK_OCP_EN2,
+ S2MPG11_PMIC_BUCK_OCP_PD_EN1,
+ S2MPG11_PMIC_BUCK_OCP_PD_EN2,
+ S2MPG11_PMIC_BUCK_OCP_CTRL1,
+ S2MPG11_PMIC_BUCK_OCP_CTRL2,
+ S2MPG11_PMIC_BUCK_OCP_CTRL3,
+ S2MPG11_PMIC_BUCK_OCP_CTRL4,
+ S2MPG11_PMIC_BUCK_OCP_CTRL5,
+ S2MPG11_PMIC_BUCK_OCP_CTRL6,
+ S2MPG11_PMIC_BUCK_OCP_CTRL7,
+ S2MPG11_PMIC_PIF_CTRL,
+ S2MPG11_PMIC_BUCK_HR_MODE1,
+ S2MPG11_PMIC_BUCK_HR_MODE2,
+ S2MPG11_PMIC_FAULTOUT_CTRL,
+ S2MPG11_PMIC_LDO_SENSE1,
+ S2MPG11_PMIC_LDO_SENSE2,
+};
+
+/* Meter registers (type 0xa00) */
+enum s2mpg11_meter_reg {
+ S2MPG11_METER_CTRL1,
+ S2MPG11_METER_CTRL2,
+ S2MPG11_METER_CTRL3,
+ S2MPG11_METER_CTRL4,
+ S2MPG11_METER_CTRL5,
+ S2MPG11_METER_BUCKEN1,
+ S2MPG11_METER_BUCKEN2,
+ S2MPG11_METER_MUXSEL0,
+ S2MPG11_METER_MUXSEL1,
+ S2MPG11_METER_MUXSEL2,
+ S2MPG11_METER_MUXSEL3,
+ S2MPG11_METER_MUXSEL4,
+ S2MPG11_METER_MUXSEL5,
+ S2MPG11_METER_MUXSEL6,
+ S2MPG11_METER_MUXSEL7,
+ S2MPG11_METER_LPF_C0_0,
+ S2MPG11_METER_LPF_C0_1,
+ S2MPG11_METER_LPF_C0_2,
+ S2MPG11_METER_LPF_C0_3,
+ S2MPG11_METER_LPF_C0_4,
+ S2MPG11_METER_LPF_C0_5,
+ S2MPG11_METER_LPF_C0_6,
+ S2MPG11_METER_LPF_C0_7,
+ S2MPG11_METER_NTC_LPF_C0_0,
+ S2MPG11_METER_NTC_LPF_C0_1,
+ S2MPG11_METER_NTC_LPF_C0_2,
+ S2MPG11_METER_NTC_LPF_C0_3,
+ S2MPG11_METER_NTC_LPF_C0_4,
+ S2MPG11_METER_NTC_LPF_C0_5,
+ S2MPG11_METER_NTC_LPF_C0_6,
+ S2MPG11_METER_NTC_LPF_C0_7,
+ S2MPG11_METER_PWR_WARN0,
+ S2MPG11_METER_PWR_WARN1,
+ S2MPG11_METER_PWR_WARN2,
+ S2MPG11_METER_PWR_WARN3,
+ S2MPG11_METER_PWR_WARN4,
+ S2MPG11_METER_PWR_WARN5,
+ S2MPG11_METER_PWR_WARN6,
+ S2MPG11_METER_PWR_WARN7,
+ S2MPG11_METER_NTC_L_WARN0,
+ S2MPG11_METER_NTC_L_WARN1,
+ S2MPG11_METER_NTC_L_WARN2,
+ S2MPG11_METER_NTC_L_WARN3,
+ S2MPG11_METER_NTC_L_WARN4,
+ S2MPG11_METER_NTC_L_WARN5,
+ S2MPG11_METER_NTC_L_WARN6,
+ S2MPG11_METER_NTC_L_WARN7,
+ S2MPG11_METER_NTC_H_WARN0,
+ S2MPG11_METER_NTC_H_WARN1,
+ S2MPG11_METER_NTC_H_WARN2,
+ S2MPG11_METER_NTC_H_WARN3,
+ S2MPG11_METER_NTC_H_WARN4,
+ S2MPG11_METER_NTC_H_WARN5,
+ S2MPG11_METER_NTC_H_WARN6,
+ S2MPG11_METER_NTC_H_WARN7,
+ S2MPG11_METER_PWR_HYS1,
+ S2MPG11_METER_PWR_HYS2,
+ S2MPG11_METER_PWR_HYS3,
+ S2MPG11_METER_PWR_HYS4,
+ S2MPG11_METER_NTC_HYS1,
+ S2MPG11_METER_NTC_HYS2,
+ S2MPG11_METER_NTC_HYS3,
+ S2MPG11_METER_NTC_HYS4,
+ /* Nothing @ 0x3f */
+ S2MPG11_METER_ACC_DATA_CH0_1 = 0x40,
+ S2MPG11_METER_ACC_DATA_CH0_2,
+ S2MPG11_METER_ACC_DATA_CH0_3,
+ S2MPG11_METER_ACC_DATA_CH0_4,
+ S2MPG11_METER_ACC_DATA_CH0_5,
+ S2MPG11_METER_ACC_DATA_CH0_6,
+ S2MPG11_METER_ACC_DATA_CH1_1,
+ S2MPG11_METER_ACC_DATA_CH1_2,
+ S2MPG11_METER_ACC_DATA_CH1_3,
+ S2MPG11_METER_ACC_DATA_CH1_4,
+ S2MPG11_METER_ACC_DATA_CH1_5,
+ S2MPG11_METER_ACC_DATA_CH1_6,
+ S2MPG11_METER_ACC_DATA_CH2_1,
+ S2MPG11_METER_ACC_DATA_CH2_2,
+ S2MPG11_METER_ACC_DATA_CH2_3,
+ S2MPG11_METER_ACC_DATA_CH2_4,
+ S2MPG11_METER_ACC_DATA_CH2_5,
+ S2MPG11_METER_ACC_DATA_CH2_6,
+ S2MPG11_METER_ACC_DATA_CH3_1,
+ S2MPG11_METER_ACC_DATA_CH3_2,
+ S2MPG11_METER_ACC_DATA_CH3_3,
+ S2MPG11_METER_ACC_DATA_CH3_4,
+ S2MPG11_METER_ACC_DATA_CH3_5,
+ S2MPG11_METER_ACC_DATA_CH3_6,
+ S2MPG11_METER_ACC_DATA_CH4_1,
+ S2MPG11_METER_ACC_DATA_CH4_2,
+ S2MPG11_METER_ACC_DATA_CH4_3,
+ S2MPG11_METER_ACC_DATA_CH4_4,
+ S2MPG11_METER_ACC_DATA_CH4_5,
+ S2MPG11_METER_ACC_DATA_CH4_6,
+ S2MPG11_METER_ACC_DATA_CH5_1,
+ S2MPG11_METER_ACC_DATA_CH5_2,
+ S2MPG11_METER_ACC_DATA_CH5_3,
+ S2MPG11_METER_ACC_DATA_CH5_4,
+ S2MPG11_METER_ACC_DATA_CH5_5,
+ S2MPG11_METER_ACC_DATA_CH5_6,
+ S2MPG11_METER_ACC_DATA_CH6_1,
+ S2MPG11_METER_ACC_DATA_CH6_2,
+ S2MPG11_METER_ACC_DATA_CH6_3,
+ S2MPG11_METER_ACC_DATA_CH6_4,
+ S2MPG11_METER_ACC_DATA_CH6_5,
+ S2MPG11_METER_ACC_DATA_CH6_6,
+ S2MPG11_METER_ACC_DATA_CH7_1,
+ S2MPG11_METER_ACC_DATA_CH7_2,
+ S2MPG11_METER_ACC_DATA_CH7_3,
+ S2MPG11_METER_ACC_DATA_CH7_4,
+ S2MPG11_METER_ACC_DATA_CH7_5,
+ S2MPG11_METER_ACC_DATA_CH7_6,
+ S2MPG11_METER_ACC_COUNT_1,
+ S2MPG11_METER_ACC_COUNT_2,
+ S2MPG11_METER_ACC_COUNT_3,
+ S2MPG11_METER_LPF_DATA_CH0_1,
+ S2MPG11_METER_LPF_DATA_CH0_2,
+ S2MPG11_METER_LPF_DATA_CH0_3,
+ S2MPG11_METER_LPF_DATA_CH1_1,
+ S2MPG11_METER_LPF_DATA_CH1_2,
+ S2MPG11_METER_LPF_DATA_CH1_3,
+ S2MPG11_METER_LPF_DATA_CH2_1,
+ S2MPG11_METER_LPF_DATA_CH2_2,
+ S2MPG11_METER_LPF_DATA_CH2_3,
+ S2MPG11_METER_LPF_DATA_CH3_1,
+ S2MPG11_METER_LPF_DATA_CH3_2,
+ S2MPG11_METER_LPF_DATA_CH3_3,
+ S2MPG11_METER_LPF_DATA_CH4_1,
+ S2MPG11_METER_LPF_DATA_CH4_2,
+ S2MPG11_METER_LPF_DATA_CH4_3,
+ S2MPG11_METER_LPF_DATA_CH5_1,
+ S2MPG11_METER_LPF_DATA_CH5_2,
+ S2MPG11_METER_LPF_DATA_CH5_3,
+ S2MPG11_METER_LPF_DATA_CH6_1,
+ S2MPG11_METER_LPF_DATA_CH6_2,
+ S2MPG11_METER_LPF_DATA_CH6_3,
+ S2MPG11_METER_LPF_DATA_CH7_1,
+ S2MPG11_METER_LPF_DATA_CH7_2,
+ S2MPG11_METER_LPF_DATA_CH7_3,
+ /* Nothing @ 0x8b 0x8c */
+ S2MPG11_METER_LPF_DATA_NTC0_1 = 0x8d,
+ S2MPG11_METER_LPF_DATA_NTC0_2,
+ S2MPG11_METER_LPF_DATA_NTC1_1,
+ S2MPG11_METER_LPF_DATA_NTC1_2,
+ S2MPG11_METER_LPF_DATA_NTC2_1,
+ S2MPG11_METER_LPF_DATA_NTC2_2,
+ S2MPG11_METER_LPF_DATA_NTC3_1,
+ S2MPG11_METER_LPF_DATA_NTC3_2,
+ S2MPG11_METER_LPF_DATA_NTC4_1,
+ S2MPG11_METER_LPF_DATA_NTC4_2,
+ S2MPG11_METER_LPF_DATA_NTC5_1,
+ S2MPG11_METER_LPF_DATA_NTC5_2,
+ S2MPG11_METER_LPF_DATA_NTC6_1,
+ S2MPG11_METER_LPF_DATA_NTC6_2,
+ S2MPG11_METER_LPF_DATA_NTC7_1,
+ S2MPG11_METER_LPF_DATA_NTC7_2,
+};
+
+/* S2MPG11 regulator IDs */
+enum s2mpg11_regulators {
+ S2MPG11_LDO1,
+ S2MPG11_LDO2,
+ S2MPG11_LDO3,
+ S2MPG11_LDO4,
+ S2MPG11_LDO5,
+ S2MPG11_LDO6,
+ S2MPG11_LDO7,
+ S2MPG11_LDO8,
+ S2MPG11_LDO9,
+ S2MPG11_LDO10,
+ S2MPG11_LDO11,
+ S2MPG11_LDO12,
+ S2MPG11_LDO13,
+ S2MPG11_LDO14,
+ S2MPG11_LDO15,
+ S2MPG11_BUCK1,
+ S2MPG11_BUCK2,
+ S2MPG11_BUCK3,
+ S2MPG11_BUCK4,
+ S2MPG11_BUCK5,
+ S2MPG11_BUCK6,
+ S2MPG11_BUCK7,
+ S2MPG11_BUCK8,
+ S2MPG11_BUCK9,
+ S2MPG11_BUCK10,
+ S2MPG11_BUCKD,
+ S2MPG11_BUCKA,
+ S2MPG11_BUCKBOOST,
+ S2MPG11_REGULATOR_MAX,
+};
+
+#endif /* __LINUX_MFD_S2MPG11_H */
--
2.49.0.1204.g71687c7c1d-goog
Return-Path: <linux-kernel+bounces-673450-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 3CCFF41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:30:02 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 471943A8F62
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:28:53 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 2C4271F8ADB;
Wed, 4 Jun 2025 15:26:04 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ezlajlm8"
Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 24E981D5175
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:25:54 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.54
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749050760; cv=none; b=c8wNYxLdpaq0l93FjijIJ3ZpRB2COjl+pkVeKoSiRMQvjZW6krIT32/8oSzyXqCcx2hJGW2ZeEgD64DPlfwKQHlfqnZjwxQhovo/v0aQs6C1ZQG4KPgih/F0sf1oEHQZBfsST8auEgXj5Th4zSSvxrjRufNeCJR15jALrRlt1N4=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749050760; c=relaxed/simple;
bh=89g6kCobF3HR6J6w5n/pC7Io3EZ/ilt2DgZlXtsx9ns=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=qZGyL/pbm/bx9TYEHB16o8E0ocWOB3FnZBciXbEmWKFXoSG2msZrujN1COdFijdhJe1EuyVH003rWqiW19QoJWwiH8EhZChNKAS+LICRUV12p1MAkwAMSrsJP+H0PfvdHza75S/bPZwh2ZiTkIdurpHPo+VHPaarEcXoW3v5j7A=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=ezlajlm8; arc=none smtp.client-ip=209.85.208.54
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org
Received: by mail-ed1-f54.google.com with SMTP id 4fb4d7f45d1cf-604f26055c6so2214510a12.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 08:25:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=linaro.org; s=google; t=1749050753; x=1749655553; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=IEGYDV2khNy4gA3s7OfWJd0YI0OOgwREUGVpObDem1A=;
b=ezlajlm8vAdIPoYtIbuJqPue5w7aApxzV8LNf0JL4qA+sOuot5gcCDLrzcltngfT7W
Oj33GBD54oVWcE+1To4vBAxma6BcMVbQFuITMbawym4Uv5LemVFWVVnYApQ0/Mk7Wbkh
nFjXtwh6YKexAgEO50zJlRigv5/x+g+cnwqdSjUdFjrOIf5NgPn84bC1bAe2W0XJxakw
NkkE1CfXgao3dKs85WUnFGDD9nu4K8D4WYarEkTXjAddvRq/81+lYPPh8ZbdmsSgtGU6
VZhTgw8gtqLpWmjXQO+J5dolmfPuEsvX1FcziHtVwh42JdDL1nyvlVFVuOe1uFtBTz0R
4mkA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749050753; x=1749655553;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=IEGYDV2khNy4gA3s7OfWJd0YI0OOgwREUGVpObDem1A=;
b=IrixNyudhqE3nowEd5ENSJ4u+yHdvWE8mkiFf/8imbcKq13Vh+hUJKtGiDebl6zZ4/
Gv0TPqGIGwWOz3LohfHwyo9s4TtVoa1LkHTmU5uU4c2IuWfmVaUFPl+PotdpsCNAb8/z
0FGqm/HSpU/kxIiLxi7fLQwqhJqcatfvwyuPojxi/AzprcVLm8tFDWg6Fq/lbphlOBB3
LaRLXExnTYlxoqD2Vs0MU498BcX5Ys+K+YeapHrgH9mjAwmfpUGhFt8Snnsv2OBpYIZq
xhVYTNyiDITgiJNLwhtE37wWGbxGkJfOkF54IO+xMk644kHQS4A0XWtZvjvxlVaN+lS0
mrxQ==
X-Forwarded-Encrypted: i=1; AJvYcCUdK3VlcHFiw/l0xoShVHmuTNHZZ/PIqZJCAd5ee4ZYwt6Lek3bYCPR68kKfGRKlXSQknxvuzoVCQ22vrc=@vger.kernel.org
X-Gm-Message-State: AOJu0YwTPbHUxMecyBGCSoGPlJSuabSrqKn+dilziN8njOVg6KdEosvj
G6Ac3oKnjXtmCQMYzeZW2eMLAgmrogEGlbOFSotkDP50bFN1+jHQ/mDXc6GzdrDfi+U=
X-Gm-Gg: ASbGnctdRL3HuCyDMpEq7hcAWs4sHAHJM1WtJSP9vmHlnfQI3bLuwCmOUfOmb10fPNt
Q6T5e9FP+RjyJPcjfkd6QdTrLuGrxRpuTNhY1zIgJxJcRViov0Bm45hvzbVEJnDd+W5pLHHhFnH
oxxfRjw8LteAzXcEURlKn6xmxCPHSfFrT6EYI8lM7IQ8bOGQkg3a+GBq/kBHjtoNgm3cs/kvdXu
SI0hMhEqD/AkZNWfkaSnJZ5XTQEpjiLABunXp39Y0LNPKNU66cbWOc94lmUZCtwmCck0bCMjdJI
85p+bAWAHyAbRwS2ooRI09r+Vu64Zkb2npjbNRS4m3nAfCm4qMTEFgko2UFKLRN4ge+5FxNDxw4
G1Rk9fuIy36guKEQJXZD9e7g2n+nnTPf/ICw=
X-Google-Smtp-Source: AGHT+IF4GtmRZR1zAYaVAYqk931R2ALis05PVJfS7nUbUxre+k8POSxyxX9zkmikgkd1i/jh5IT9Ng==
X-Received: by 2002:a05:6402:2351:b0:607:1ebd:da75 with SMTP id 4fb4d7f45d1cf-6071ebdda91mr338186a12.15.1749050752754;
Wed, 04 Jun 2025 08:25:52 -0700 (PDT)
Received: from puffmais.c.googlers.com (140.20.91.34.bc.googleusercontent.com. [34.91.20.140])
by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-606ed984f63sm1051640a12.58.2025.06.04.08.25.52
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 08:25:52 -0700 (PDT)
From: =?utf-8?q?Andr=C3=A9_Draszik?= <andre.draszik@xxxxxxxxxx>
Date: Wed, 04 Jun 2025 16:25:52 +0100
Subject: [PATCH 13/17] regulator: s2mps11: add S2MPG10 regulator
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Message-Id: <20250604-s2mpg1x-regulators-v1-13-6038740f49ae@xxxxxxxxxx>
References: <20250604-s2mpg1x-regulators-v1-0-6038740f49ae@xxxxxxxxxx>
In-Reply-To: <20250604-s2mpg1x-regulators-v1-0-6038740f49ae@xxxxxxxxxx>
To: Tudor Ambarus <tudor.ambarus@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>, Krzysztof Kozlowski <krzk@xxxxxxxxxx>,
Liam Girdwood <lgirdwood@xxxxxxxxx>, Mark Brown <broonie@xxxxxxxxxx>,
Lee Jones <lee@xxxxxxxxxx>, Linus Walleij <linus.walleij@xxxxxxxxxx>,
Bartosz Golaszewski <brgl@xxxxxxxx>
Cc: Peter Griffin <peter.griffin@xxxxxxxxxx>,
Will McVicker <willmcvicker@xxxxxxxxxx>, kernel-team@xxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-samsung-soc@xxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-gpio@xxxxxxxxxxxxxxx,
=?utf-8?q?Andr=C3=A9_Draszik?= <andre.draszik@xxxxxxxxxx>
X-Mailer: b4 0.14.2
X-Spam-Status: No, score=-2.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,LOTS_OF_MONEY,
MAILING_LIST_MULTI,MONEY_NOHTML,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
The S2MPG10 PMIC is a Power Management IC for mobile applications with
buck converters, various LDOs, power meters, RTC, clock outputs, and
additional GPIOs interfaces.
It has 10 buck and 31 LDO rails. Several of these can either be
controlled via software or via external signals, e.g. input pins
connected to a main processor's GPIO pins.
This commit implements support for these rails.
Additional data needs to be stored for each regulator, e.g. the input
pin for external control, or a rail-specific ramp-rate for when
enabling a buck-rail. Therefore, probe() is updated slightly to make
that possible.
The rails are instantiated as separate driver instances for bucks and
LDOs, because S2MPG10 is typically used with an S2MPG11 sub-PMIC where
some bucks of one typically supply at least some of the LDOs of the
other.
Signed-off-by: André Draszik <andre.draszik@xxxxxxxxxx>
---
drivers/regulator/s2mps11.c | 561 +++++++++++++++++++++++++++++++++++-
include/linux/mfd/samsung/s2mpg10.h | 3 +
2 files changed, 561 insertions(+), 3 deletions(-)
diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
index ff9124c998c685d9c598570148dca074e671a99b..6fe6787044c40216f7a0355119981b74a8f56e58 100644
--- a/drivers/regulator/s2mps11.c
+++ b/drivers/regulator/s2mps11.c
@@ -3,6 +3,7 @@
// Copyright (c) 2012-2014 Samsung Electronics Co., Ltd
// http://www.samsung.com
+#include <dt-bindings/regulator/samsung,s2mpg10-regulator.h>
#include <linux/bug.h>
#include <linux/cleanup.h>
#include <linux/err.h>
@@ -16,6 +17,7 @@
#include <linux/regulator/machine.h>
#include <linux/regulator/of_regulator.h>
#include <linux/mfd/samsung/core.h>
+#include <linux/mfd/samsung/s2mpg10.h>
#include <linux/mfd/samsung/s2mps11.h>
#include <linux/mfd/samsung/s2mps13.h>
#include <linux/mfd/samsung/s2mps14.h>
@@ -42,6 +44,21 @@ struct s2mps11_info {
DECLARE_BITMAP(suspend_state, S2MPS_REGULATOR_MAX);
};
+#define to_s2mpg10_regulator_desc(x) container_of((x), struct s2mpg10_regulator_desc, desc)
+
+struct s2mpg10_regulator_desc {
+ struct regulator_desc desc;
+
+ /* Ramp rate during enable, valid for bucks only. */
+ unsigned int enable_ramp_rate;
+
+ /* Registers for external control of rail. */
+ unsigned int pctrlsel_reg;
+ unsigned int pctrlsel_mask;
+ /* Populated from DT. */
+ unsigned int pctrlsel_val;
+};
+
static int get_ramp_delay(int ramp_delay)
{
unsigned char cnt = 0;
@@ -388,6 +405,492 @@ static int s2mps11_of_parse_cb(struct device_node *np,
return s2mps11_of_parse_gpiod(np, desc, config);
}
+static int s2mpg10_of_parse_cb(struct device_node *np,
+ const struct regulator_desc *desc,
+ struct regulator_config *config)
+{
+ const struct s2mps11_info *s2mps11 = config->driver_data;
+ struct s2mpg10_regulator_desc *s2mpg10_desc = to_s2mpg10_regulator_desc(desc);
+ u32 ext_control;
+
+ if (s2mps11->dev_type != S2MPG10)
+ return 0;
+
+ if (of_property_read_u32(np, "samsung,ext-control", &ext_control))
+ return 0;
+
+ switch (s2mps11->dev_type) {
+ case S2MPG10:
+ switch (desc->id) {
+ case S2MPG10_BUCK1 ... S2MPG10_BUCK7:
+ case S2MPG10_BUCK10:
+ case S2MPG10_LDO3 ... S2MPG10_LDO19:
+ if (ext_control > S2MPG10_PCTRLSEL_TCXO_ON2)
+ return -EINVAL;
+ break;
+
+ case S2MPG10_LDO20:
+ if (ext_control > S2MPG10_PCTRLSEL_LDO20M_OFF)
+ return -EINVAL;
+ break;
+
+ default:
+ return -EINVAL;
+ }
+ break;
+
+ default:
+ return -EINVAL;
+ }
+
+ /*
+ * If the regulator should be configured for external control, then:
+ * 1) the PCTRLSELx register needs to be set accordingly
+ * 2) regulator_desc::enable_val needs to be:
+ * a) updated and
+ * b) written to the hardware
+ * 3) we switch to the ::ops that don't provide ::enable() and
+ * ::disable() implementations
+ *
+ * Points 1) and 2b) will be handled in _probe(), after
+ * devm_regulator_register() returns, so that we can properly act on
+ * failures, since the regulator core ignores most return values from
+ * this parse callback.
+ */
+ s2mpg10_desc->pctrlsel_val = ext_control;
+ s2mpg10_desc->pctrlsel_val <<= (ffs(s2mpg10_desc->pctrlsel_mask) - 1);
+
+ s2mpg10_desc->desc.enable_val = S2MPG10_PMIC_CTRL_ENABLE_EXT;
+ s2mpg10_desc->desc.enable_val <<= (ffs(desc->enable_mask) - 1);
+
+ ++s2mpg10_desc->desc.ops;
+
+ return s2mps11_of_parse_gpiod(np, desc, config);
+}
+
+static int s2mpg10_enable_ext_control(struct s2mps11_info *s2mps11,
+ struct regulator_dev *rdev)
+{
+ const struct s2mpg10_regulator_desc *s2mpg10_desc;
+ int ret;
+
+ switch (s2mps11->dev_type) {
+ case S2MPG10:
+ s2mpg10_desc = to_s2mpg10_regulator_desc(rdev->desc);
+ break;
+
+ default:
+ return 0;
+ }
+
+ ret = regmap_update_bits(rdev_get_regmap(rdev),
+ s2mpg10_desc->pctrlsel_reg,
+ s2mpg10_desc->pctrlsel_mask,
+ s2mpg10_desc->pctrlsel_val);
+ if (ret)
+ return dev_err_probe(rdev_get_dev(rdev), ret,
+ "failed to configure pctrlsel for %s\n",
+ rdev->desc->name);
+
+ ret = regulator_enable_regmap(rdev);
+ if (ret)
+ return dev_err_probe(rdev_get_dev(rdev), ret,
+ "failed to enable regulator %s\n",
+ rdev->desc->name);
+
+ return 0;
+}
+
+/* ops for regulators without ramp control */
+static const struct regulator_ops s2mpg10_reg_ldo_ops[] = {
+ {
+ .list_voltage = regulator_list_voltage_linear_range,
+ .map_voltage = regulator_map_voltage_linear_range,
+ .is_enabled = regulator_is_enabled_regmap,
+ .enable = regulator_enable_regmap,
+ .disable = regulator_disable_regmap,
+ .get_voltage_sel = regulator_get_voltage_sel_regmap,
+ .set_voltage_sel = regulator_set_voltage_sel_regmap,
+ .set_voltage_time_sel = regulator_set_voltage_time_sel,
+ }, {
+ .list_voltage = regulator_list_voltage_linear_range,
+ .map_voltage = regulator_map_voltage_linear_range,
+ .get_voltage_sel = regulator_get_voltage_sel_regmap,
+ .set_voltage_sel = regulator_set_voltage_sel_regmap,
+ .set_voltage_time_sel = regulator_set_voltage_time_sel,
+ }
+};
+
+/* ops for regulators that have ramp control */
+static const struct regulator_ops s2mpg10_reg_ldo_ramp_ops[] = {
+ {
+ .list_voltage = regulator_list_voltage_linear_range,
+ .map_voltage = regulator_map_voltage_linear_range,
+ .is_enabled = regulator_is_enabled_regmap,
+ .enable = regulator_enable_regmap,
+ .disable = regulator_disable_regmap,
+ .get_voltage_sel = regulator_get_voltage_sel_regmap,
+ .set_voltage_sel = regulator_set_voltage_sel_regmap,
+ .set_voltage_time_sel = regulator_set_voltage_time_sel,
+ .set_ramp_delay = regulator_set_ramp_delay_regmap,
+ }, {
+ .list_voltage = regulator_list_voltage_linear_range,
+ .map_voltage = regulator_map_voltage_linear_range,
+ .get_voltage_sel = regulator_get_voltage_sel_regmap,
+ .set_voltage_sel = regulator_set_voltage_sel_regmap,
+ .set_voltage_time_sel = regulator_set_voltage_time_sel,
+ .set_ramp_delay = regulator_set_ramp_delay_regmap,
+ }
+};
+
+static int s2mpg10_regulator_buck_enable_time(struct regulator_dev *rdev)
+{
+ const struct s2mpg10_regulator_desc * const s2mpg10_desc =
+ to_s2mpg10_regulator_desc(rdev->desc);
+ const struct regulator_ops * const ops = rdev->desc->ops;
+ int vsel, curr_uV;
+
+ vsel = ops->get_voltage_sel(rdev);
+ if (vsel < 0)
+ return vsel;
+
+ curr_uV = ops->list_voltage(rdev, vsel);
+ if (curr_uV < 0)
+ return curr_uV;
+
+ return (rdev->desc->enable_time
+ + DIV_ROUND_UP(curr_uV, s2mpg10_desc->enable_ramp_rate));
+}
+
+static int s2mpg10_regulator_buck_set_voltage_time(struct regulator_dev *rdev,
+ int old_uV, int new_uV)
+{
+ unsigned int ramp_reg, ramp_sel, ramp_rate;
+ int ret;
+
+ if (old_uV == new_uV)
+ return 0;
+
+ ramp_reg = rdev->desc->ramp_reg;
+ if (old_uV > new_uV)
+ /* The downwards ramp is at a different offset. */
+ ramp_reg += S2MPG10_PMIC_DVS_RAMP4 - S2MPG10_PMIC_DVS_RAMP1;
+
+ ret = regmap_read(rdev->regmap, ramp_reg, &ramp_sel);
+ if (ret)
+ return ret;
+
+ ramp_sel &= rdev->desc->ramp_mask;
+ ramp_sel >>= ffs(rdev->desc->ramp_mask) - 1;
+ if (ramp_sel >= rdev->desc->n_ramp_values ||
+ !rdev->desc->ramp_delay_table)
+ return -EINVAL;
+
+ ramp_rate = rdev->desc->ramp_delay_table[ramp_sel];
+
+ return DIV_ROUND_UP(abs(new_uV - old_uV), ramp_rate);
+}
+
+/*
+ * We assign both, ::set_voltage_time() and ::set_voltage_time_sel(), because
+ * only if the latter is != NULL, the regulator core will call neither during
+ * DVS if the regulator is disabled. If the latter is NULL, the core always
+ * calls the ::set_voltage_time() callback, which would give incorrect results
+ * if the regulator is off.
+ * At the same time, we do need ::set_voltage_time() due to differing upwards
+ * and downwards ramps and we can not make that code dependent on the regulator
+ * enable state, as that would break regulator_set_voltage_time() which
+ * expects a correct result no matter the enable state.
+ */
+static const struct regulator_ops s2mpg10_reg_buck_ops[] = {
+ {
+ .list_voltage = regulator_list_voltage_linear_range,
+ .map_voltage = regulator_map_voltage_linear_range,
+ .is_enabled = regulator_is_enabled_regmap,
+ .enable = regulator_enable_regmap,
+ .disable = regulator_disable_regmap,
+ .enable_time = s2mpg10_regulator_buck_enable_time,
+ .get_voltage_sel = regulator_get_voltage_sel_regmap,
+ .set_voltage_sel = regulator_set_voltage_sel_regmap,
+ .set_voltage_time = s2mpg10_regulator_buck_set_voltage_time,
+ .set_voltage_time_sel = regulator_set_voltage_time_sel,
+ .set_ramp_delay = regulator_set_ramp_delay_regmap,
+ }, {
+ .list_voltage = regulator_list_voltage_linear_range,
+ .map_voltage = regulator_map_voltage_linear_range,
+ .get_voltage_sel = regulator_get_voltage_sel_regmap,
+ .set_voltage_sel = regulator_set_voltage_sel_regmap,
+ .set_voltage_time = s2mpg10_regulator_buck_set_voltage_time,
+ .set_voltage_time_sel = regulator_set_voltage_time_sel,
+ .set_ramp_delay = regulator_set_ramp_delay_regmap,
+ }
+};
+
+#define regulator_desc_s2mpg10_ldo_cmn(_num, _supply, _ops, _vrange, \
+ _vsel_reg_sfx, _vsel_mask, _en_reg, _en_mask, \
+ _ramp_delay, _r_reg, _r_mask, _r_table, _r_table_sz) { \
+ .name = "ldo"#_num"m", \
+ .supply_name = _supply, \
+ .of_match = of_match_ptr("ldo"#_num"m"), \
+ .regulators_node = of_match_ptr("regulators"), \
+ .of_parse_cb = s2mpg10_of_parse_cb, \
+ .id = S2MPG10_LDO##_num, \
+ .ops = &_ops[0], \
+ .type = REGULATOR_VOLTAGE, \
+ .owner = THIS_MODULE, \
+ .linear_ranges = _vrange, \
+ .n_linear_ranges = ARRAY_SIZE(_vrange), \
+ .n_voltages = _vrange##_count, \
+ .vsel_reg = S2MPG10_PMIC_L##_num##M_##_vsel_reg_sfx, \
+ .vsel_mask = _vsel_mask, \
+ .enable_reg = S2MPG10_PMIC_##_en_reg, \
+ .enable_mask = _en_mask, \
+ .ramp_delay = _ramp_delay, \
+ .ramp_reg = _r_reg, \
+ .ramp_mask = _r_mask, \
+ .ramp_delay_table = _r_table, \
+ .n_ramp_values = _r_table_sz, \
+ .enable_time = 130, /* startup 20+-10 + ramp 30..100μs */ \
+}
+
+#define s2mpg10_regulator_desc_ldo_cmn(_num, _supply, _vrange, _ops, \
+ _vsel_reg_sfx, _vsel_mask, _en_reg, _en_mask, \
+ _ramp_delay, _r_reg, _r_mask, _r_table, _r_table_sz, \
+ _pc_reg, _pc_mask) \
+ { \
+ .desc = regulator_desc_s2mpg10_ldo_cmn(_num, _supply, \
+ _ops, \
+ _vrange, _vsel_reg_sfx, _vsel_mask, \
+ _en_reg, _en_mask, \
+ _ramp_delay, _r_reg, _r_mask, _r_table, \
+ _r_table_sz), \
+ .pctrlsel_reg = _pc_reg, \
+ .pctrlsel_mask = _pc_mask, \
+ }
+
+/* standard LDO via LxM_CTRL */
+#define s2mpg10_regulator_desc_ldo(_num, _supply, _vrange) \
+ s2mpg10_regulator_desc_ldo_cmn(_num, _supply, _vrange, \
+ s2mpg10_reg_ldo_ops, CTRL, GENMASK(5, 0), \
+ L##_num##M_CTRL, BIT(7), \
+ 0, 0, 0, NULL, 0, \
+ 0, 0) \
+
+/* standard LDO via LxM_CTRL but non-standard vsel mask */
+#define s2mpg10_regulator_desc_ldo_vmsk(_num, _supply, _vrange, \
+ _vsel_mask) \
+ s2mpg10_regulator_desc_ldo_cmn(_num, _supply, _vrange, \
+ s2mpg10_reg_ldo_ops, CTRL, _vsel_mask, \
+ L##_num##M_CTRL, BIT(7), \
+ 0, 0, 0, NULL, 0, \
+ 0, 0)
+
+/* standard LDO but possibly GPIO controlled */
+#define s2mpg10_regulator_desc_ldo_gpio(_num, _supply, _vrange, \
+ _pc_reg, _pc_mask) \
+ s2mpg10_regulator_desc_ldo_cmn(_num, _supply, _vrange, \
+ s2mpg10_reg_ldo_ops, CTRL, GENMASK(5, 0), \
+ L##_num##M_CTRL, GENMASK(7, 6), \
+ 0, 0, 0, NULL, 0, \
+ S2MPG10_PMIC_##_pc_reg, _pc_mask)
+
+/* LDO with ramp support and possibly GPIO controlled */
+#define s2mpg10_regulator_desc_ldo_ramp(_num, _supply, _vrange, \
+ _en_mask, _r_reg_sfx, _pc_reg, _pc_mask) \
+ s2mpg10_regulator_desc_ldo_cmn(_num, _supply, _vrange, \
+ s2mpg10_reg_ldo_ramp_ops, CTRL1, GENMASK(6, 0), \
+ LDO_CTRL2, _en_mask, \
+ 6250, S2MPG10_PMIC_##_r_reg_sfx, GENMASK(1, 0), \
+ s2mpg10_ldo_ramp_table, \
+ ARRAY_SIZE(s2mpg10_ldo_ramp_table), \
+ S2MPG10_PMIC_##_pc_reg, _pc_mask)
+
+#define s2mpg10_buck_to_ramp_mask(n) (GENMASK(1, 0) << (((n) % 4) * 2))
+
+/*
+ * The ramp_delay during enable is fixed (12.5mV/μs), while the ramp during
+ * DVS can be adjusted. Linux can adjust the ramp delay via DT, in which case
+ * the regulator core will modify the regulator's constraints and call our
+ * .set_ramp_delay() which updates the DVS ramp in ramp_reg.
+ * For enable, our .enable_time() unconditionally uses enable_ramp_rate
+ * (12.5mV/μs) while our ::set_voltage_time() takes the value in ramp_reg
+ * into account.
+ */
+#define regulator_desc_s2mpg10_buck(_num, _vrange, _r_reg) { \
+ .name = "buck"#_num"m", \
+ .supply_name = "vinb"#_num"m", \
+ .of_match = of_match_ptr("buck"#_num"m"), \
+ .of_parse_cb = s2mpg10_of_parse_cb, \
+ .regulators_node = of_match_ptr("regulators"), \
+ .id = S2MPG10_BUCK##_num, \
+ .ops = &s2mpg10_reg_buck_ops[0], \
+ .type = REGULATOR_VOLTAGE, \
+ .owner = THIS_MODULE, \
+ .linear_ranges = _vrange, \
+ .n_linear_ranges = ARRAY_SIZE(_vrange), \
+ .n_voltages = _vrange##_count, \
+ .vsel_reg = S2MPG10_PMIC_B##_num##M_OUT1, \
+ .vsel_mask = 0xff, \
+ .enable_reg = S2MPG10_PMIC_B##_num##M_CTRL, \
+ .enable_mask = GENMASK(7, 6), \
+ .ramp_reg = S2MPG10_PMIC_##_r_reg, \
+ .ramp_mask = s2mpg10_buck_to_ramp_mask(S2MPG10_BUCK##_num \
+ - S2MPG10_BUCK1), \
+ .ramp_delay_table = s2mpg10_buck_ramp_table, \
+ .n_ramp_values = ARRAY_SIZE(s2mpg10_buck_ramp_table), \
+ .enable_time = 30, /* + V/enable_ramp_rate */ \
+}
+
+#define s2mpg10_regulator_desc_buck_cm(_num, _vrange, _r_reg) \
+ .desc = regulator_desc_s2mpg10_buck(_num, _vrange, _r_reg), \
+ .enable_ramp_rate = 12500
+
+#define s2mpg10_regulator_desc_buck_gpio(_num, _vrange, _r_reg, \
+ _pc_reg, _pc_mask) \
+ { \
+ s2mpg10_regulator_desc_buck_cm(_num, _vrange, _r_reg), \
+ .pctrlsel_reg = S2MPG10_PMIC_##_pc_reg, \
+ .pctrlsel_mask = _pc_mask, \
+ }
+
+#define s2mpg10_regulator_desc_buck(_num, _vrange, _r_reg) \
+ { \
+ s2mpg10_regulator_desc_buck_cm(_num, _vrange, _r_reg), \
+ }
+
+#define S2MPG10_VOLTAGE_RANGE(_prefix, _idx, _start_uV, _min_uV, \
+ _max_uV, _step_uV) \
+static const struct linear_range _prefix##_vranges##_idx[] = { \
+ REGULATOR_LINEAR_RANGE(_min_uV, \
+ ((_min_uV) - (_start_uV)) / (_step_uV), \
+ ((_max_uV) - (_start_uV)) / (_step_uV), \
+ _step_uV) \
+}; \
+static const unsigned int _prefix##_vranges##_idx##_count = \
+ ((((_max_uV) - (_start_uV)) / (_step_uV)) + 1)
+
+/* voltage range for s2mpg10 LDO 1, 11, 12 */
+S2MPG10_VOLTAGE_RANGE(s2mpg10_ldo, 1, 300000, 700000, 1300000, STEP_12_5_MV);
+
+/* voltage range for s2mpg10 LDO 2, 4, 9, 14, 18, 19, 20, 23, 25, 29, 30, 31 */
+S2MPG10_VOLTAGE_RANGE(s2mpg10_ldo, 2, 700000, 1600000, 1950000, STEP_25_MV);
+
+/* voltage range for s2mpg10 LDO 3, 5, 6, 8, 16, 17, 24, 28 */
+S2MPG10_VOLTAGE_RANGE(s2mpg10_ldo, 3, 725000, 725000, 1300000, STEP_12_5_MV);
+
+/* voltage range for s2mpg10 LDO 7 */
+S2MPG10_VOLTAGE_RANGE(s2mpg10_ldo, 7, 300000, 450000, 1300000, STEP_12_5_MV);
+
+/* voltage range for s2mpg10 13, 15 */
+S2MPG10_VOLTAGE_RANGE(s2mpg10_ldo, 13, 300000, 450000, 950000, STEP_12_5_MV);
+
+/* voltage range for s2mpg10 LDO 10 */
+S2MPG10_VOLTAGE_RANGE(s2mpg10_ldo, 10, 1800000, 1800000, 3350000, STEP_25_MV);
+
+/* voltage range for s2mpg10 LDO 21, 22, 26, 27 */
+S2MPG10_VOLTAGE_RANGE(s2mpg10_ldo, 21, 1800000, 2500000, 3300000, STEP_25_MV);
+
+/* possible ramp values for s2mpg10 LDO 11, 12, 13, 15 */
+static const unsigned int s2mpg10_ldo_ramp_table[] = {
+ STEP_6_25_MV, STEP_12_5_MV
+};
+
+/* voltage range for s2mpg10 BUCK 1, 2, 3, 4, 5, 7, 8, 9, 10 */
+S2MPG10_VOLTAGE_RANGE(s2mpg10_buck, 1, 200000, 450000, 1300000, STEP_6_25_MV);
+
+/* voltage range for s2mpg10 BUCK 6 */
+S2MPG10_VOLTAGE_RANGE(s2mpg10_buck, 6, 200000, 450000, 1350000, STEP_6_25_MV);
+
+static const unsigned int s2mpg10_buck_ramp_table[] = {
+ STEP_6_25_MV, STEP_12_5_MV, STEP_25_MV
+};
+
+static const struct s2mpg10_regulator_desc s2mpg10_regulators_ldos[] = {
+ s2mpg10_regulator_desc_ldo_vmsk(1, "vinl3m", s2mpg10_ldo_vranges1,
+ GENMASK(6, 0)),
+ s2mpg10_regulator_desc_ldo(2, "vinl9m", s2mpg10_ldo_vranges2),
+ s2mpg10_regulator_desc_ldo_gpio(3, "vinl4m", s2mpg10_ldo_vranges3,
+ PCTRLSEL5, GENMASK(3, 0)),
+ s2mpg10_regulator_desc_ldo_gpio(4, "vinl9m", s2mpg10_ldo_vranges2,
+ PCTRLSEL5, GENMASK(7, 4)),
+ s2mpg10_regulator_desc_ldo_gpio(5, "vinl3m", s2mpg10_ldo_vranges3,
+ PCTRLSEL6, GENMASK(3, 0)),
+ s2mpg10_regulator_desc_ldo_gpio(6, "vinl7m", s2mpg10_ldo_vranges3,
+ PCTRLSEL6, GENMASK(7, 4)),
+ /*
+ * Possibly GPIO controlled, but non-standard (greater) V-range and
+ * enable reg & mask.
+ */
+ s2mpg10_regulator_desc_ldo_cmn(7, "vinl3m", s2mpg10_ldo_vranges7,
+ s2mpg10_reg_ldo_ops,
+ CTRL, GENMASK(6, 0),
+ LDO_CTRL1, GENMASK(4, 3),
+ 0, 0, 0, NULL, 0,
+ S2MPG10_PMIC_PCTRLSEL7, GENMASK(3, 0)),
+ s2mpg10_regulator_desc_ldo_gpio(8, "vinl4m", s2mpg10_ldo_vranges3,
+ PCTRLSEL7, GENMASK(7, 4)),
+ s2mpg10_regulator_desc_ldo_gpio(9, "vinl10m", s2mpg10_ldo_vranges2,
+ PCTRLSEL8, GENMASK(3, 0)),
+ s2mpg10_regulator_desc_ldo_gpio(10, "vinl15m", s2mpg10_ldo_vranges10,
+ PCTRLSEL8, GENMASK(7, 4)),
+ s2mpg10_regulator_desc_ldo_ramp(11, "vinl7m", s2mpg10_ldo_vranges1,
+ GENMASK(1, 0), DVS_SYNC_CTRL3,
+ PCTRLSEL9, GENMASK(3, 0)),
+ s2mpg10_regulator_desc_ldo_ramp(12, "vinl8m", s2mpg10_ldo_vranges1,
+ GENMASK(3, 2), DVS_SYNC_CTRL4,
+ PCTRLSEL9, GENMASK(7, 4)),
+ s2mpg10_regulator_desc_ldo_ramp(13, "vinl1m", s2mpg10_ldo_vranges13,
+ GENMASK(5, 4), DVS_SYNC_CTRL5,
+ PCTRLSEL10, GENMASK(3, 0)),
+ s2mpg10_regulator_desc_ldo_gpio(14, "vinl10m", s2mpg10_ldo_vranges2,
+ PCTRLSEL10, GENMASK(7, 4)),
+ s2mpg10_regulator_desc_ldo_ramp(15, "vinl2m", s2mpg10_ldo_vranges13,
+ GENMASK(7, 6), DVS_SYNC_CTRL6,
+ PCTRLSEL11, GENMASK(3, 0)),
+ s2mpg10_regulator_desc_ldo_gpio(16, "vinl5m", s2mpg10_ldo_vranges3,
+ PCTRLSEL11, GENMASK(7, 4)),
+ s2mpg10_regulator_desc_ldo_gpio(17, "vinl6m", s2mpg10_ldo_vranges3,
+ PCTRLSEL12, GENMASK(3, 0)),
+ s2mpg10_regulator_desc_ldo_gpio(18, "vinl10m", s2mpg10_ldo_vranges2,
+ PCTRLSEL12, GENMASK(7, 4)),
+ s2mpg10_regulator_desc_ldo_gpio(19, "vinl10m", s2mpg10_ldo_vranges2,
+ PCTRLSEL13, GENMASK(3, 0)),
+ s2mpg10_regulator_desc_ldo_gpio(20, "vinl10m", s2mpg10_ldo_vranges2,
+ PCTRLSEL13, GENMASK(7, 4)),
+ s2mpg10_regulator_desc_ldo(21, "vinl14m", s2mpg10_ldo_vranges21),
+ s2mpg10_regulator_desc_ldo(22, "vinl15m", s2mpg10_ldo_vranges21),
+ s2mpg10_regulator_desc_ldo(23, "vinl11m", s2mpg10_ldo_vranges2),
+ s2mpg10_regulator_desc_ldo(24, "vinl7m", s2mpg10_ldo_vranges3),
+ s2mpg10_regulator_desc_ldo(25, "vinl10m", s2mpg10_ldo_vranges2),
+ s2mpg10_regulator_desc_ldo(26, "vinl15m", s2mpg10_ldo_vranges21),
+ s2mpg10_regulator_desc_ldo(27, "vinl15m", s2mpg10_ldo_vranges21),
+ s2mpg10_regulator_desc_ldo(28, "vinl7m", s2mpg10_ldo_vranges3),
+ s2mpg10_regulator_desc_ldo(29, "vinl12m", s2mpg10_ldo_vranges2),
+ s2mpg10_regulator_desc_ldo(30, "vinl13m", s2mpg10_ldo_vranges2),
+ s2mpg10_regulator_desc_ldo(31, "vinl11m", s2mpg10_ldo_vranges2)
+};
+
+static const struct s2mpg10_regulator_desc s2mpg10_regulators_bucks[] = {
+ s2mpg10_regulator_desc_buck_gpio(1, s2mpg10_buck_vranges1, DVS_RAMP1,
+ PCTRLSEL1, GENMASK(3, 0)),
+ s2mpg10_regulator_desc_buck_gpio(2, s2mpg10_buck_vranges1, DVS_RAMP1,
+ PCTRLSEL1, GENMASK(7, 4)),
+ s2mpg10_regulator_desc_buck_gpio(3, s2mpg10_buck_vranges1, DVS_RAMP1,
+ PCTRLSEL2, GENMASK(3, 0)),
+ s2mpg10_regulator_desc_buck_gpio(4, s2mpg10_buck_vranges1, DVS_RAMP1,
+ PCTRLSEL2, GENMASK(7, 4)),
+ s2mpg10_regulator_desc_buck_gpio(5, s2mpg10_buck_vranges1, DVS_RAMP2,
+ PCTRLSEL3, GENMASK(3, 0)),
+ s2mpg10_regulator_desc_buck_gpio(6, s2mpg10_buck_vranges6, DVS_RAMP2,
+ PCTRLSEL3, GENMASK(7, 4)),
+ s2mpg10_regulator_desc_buck_gpio(7, s2mpg10_buck_vranges1, DVS_RAMP2,
+ PCTRLSEL4, GENMASK(3, 0)),
+ s2mpg10_regulator_desc_buck(8, s2mpg10_buck_vranges1, DVS_RAMP2),
+ s2mpg10_regulator_desc_buck(9, s2mpg10_buck_vranges1, DVS_RAMP3),
+ s2mpg10_regulator_desc_buck_gpio(10, s2mpg10_buck_vranges1, DVS_RAMP3,
+ PCTRLSEL4, GENMASK(7, 4))
+};
+
static const struct regulator_ops s2mps11_ldo_ops = {
.list_voltage = regulator_list_voltage_linear,
.map_voltage = regulator_map_voltage_linear,
@@ -1271,6 +1774,18 @@ static int s2mps11_handle_ext_control(struct s2mps11_info *s2mps11,
ret = s2mps14_pmic_enable_ext_control(s2mps11, rdev);
break;
+ case S2MPG10:
+ /*
+ * If desc.enable_val is != 0, then external control was
+ * requested. We can not test s2mpg10_desc::ext_control,
+ * because 0 is a valid value.
+ */
+ if (!rdev->desc->enable_val)
+ return 0;
+
+ ret = s2mpg10_enable_ext_control(s2mps11, rdev);
+ break;
+
default:
return 0;
}
@@ -1286,6 +1801,7 @@ static int s2mps11_pmic_probe(struct platform_device *pdev)
unsigned int rdev_num;
int i, ret;
const struct regulator_desc *regulators;
+ const struct s2mpg10_regulator_desc *s2mpg10_regulators = NULL;
s2mps11 = devm_kzalloc(&pdev->dev, sizeof(struct s2mps11_info),
GFP_KERNEL);
@@ -1294,6 +1810,30 @@ static int s2mps11_pmic_probe(struct platform_device *pdev)
s2mps11->dev_type = platform_get_device_id(pdev)->driver_data;
switch (s2mps11->dev_type) {
+ case S2MPG10:
+ /*
+ * Add 1, because our core driver subtracted 1 via
+ * devm_mfd_add_devices().
+ */
+ switch (pdev->id + 1) {
+ case S2MPG10_REGULATOR_CELL_ID_BUCKS:
+ rdev_num = ARRAY_SIZE(s2mpg10_regulators_bucks);
+ s2mpg10_regulators = s2mpg10_regulators_bucks;
+ break;
+ case S2MPG10_REGULATOR_CELL_ID_LDOS:
+ rdev_num = ARRAY_SIZE(s2mpg10_regulators_ldos);
+ s2mpg10_regulators = s2mpg10_regulators_ldos;
+ break;
+ default:
+ return -EINVAL;
+ }
+ /*
+ * Can not use ARRAY_SIZE() here, as it doesn't reflect the
+ * highest regulator id.
+ */
+ BUILD_BUG_ON((enum s2mpg10_regulators) S2MPS_REGULATOR_MAX <
+ S2MPG10_REGULATOR_MAX);
+ break;
case S2MPS11X:
rdev_num = ARRAY_SIZE(s2mps11_regulators);
regulators = s2mps11_regulators;
@@ -1339,14 +1879,28 @@ static int s2mps11_pmic_probe(struct platform_device *pdev)
config.driver_data = s2mps11;
for (i = 0; i < rdev_num; i++) {
struct regulator_dev *regulator;
+ const struct regulator_desc *rdesc = ®ulators[i];
+
+ if (s2mpg10_regulators) {
+ struct s2mpg10_regulator_desc *s2mpg10_desc;
+
+
+ s2mpg10_desc = devm_kmemdup(&pdev->dev,
+ &s2mpg10_regulators[i],
+ sizeof(*s2mpg10_desc),
+ GFP_KERNEL);
+ if (!s2mpg10_desc)
+ return -ENOMEM;
+
+ rdesc = &s2mpg10_desc->desc;
+ }
regulator = devm_regulator_register(&pdev->dev,
- ®ulators[i], &config);
+ rdesc, &config);
if (IS_ERR(regulator))
return dev_err_probe(&pdev->dev, PTR_ERR(regulator),
"regulator init failed for %d/%s\n",
- regulators[i].id,
- regulators[i].name);
+ rdesc->id, rdesc->name);
ret = s2mps11_handle_ext_control(s2mps11, regulator);
if (ret < 0)
@@ -1357,6 +1911,7 @@ static int s2mps11_pmic_probe(struct platform_device *pdev)
}
static const struct platform_device_id s2mps11_pmic_id[] = {
+ { "s2mpg10-regulator", S2MPG10},
{ "s2mps11-regulator", S2MPS11X},
{ "s2mps13-regulator", S2MPS13X},
{ "s2mps14-regulator", S2MPS14X},
diff --git a/include/linux/mfd/samsung/s2mpg10.h b/include/linux/mfd/samsung/s2mpg10.h
index 3e8bc65078472518c5e77f8bd199ee403eda18ea..f2e2c7923ad8116816ff5cae3b0c0eb98af2e42b 100644
--- a/include/linux/mfd/samsung/s2mpg10.h
+++ b/include/linux/mfd/samsung/s2mpg10.h
@@ -295,6 +295,9 @@ enum s2mpg10_pmic_reg {
S2MPG10_PMIC_LDO_SENSE4,
};
+/* rail controlled externally, based on PCTRLSELx */
+#define S2MPG10_PMIC_CTRL_ENABLE_EXT BIT(0)
+
/* Meter registers (type 0xa00) */
enum s2mpg10_meter_reg {
S2MPG10_METER_CTRL1,
--
2.49.0.1204.g71687c7c1d-goog
Return-Path: <linux-kernel+bounces-673447-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 81F8C41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:30:11 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id D44257ABA51
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:27:20 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 8B7681F417F;
Wed, 4 Jun 2025 15:26:02 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="WMK8MFW/"
Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 403F01DDA2D
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:25:55 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.44
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749050759; cv=none; b=O01bBpwEfgCVIRcGVkcFxO7CYnwmjD+X69W6DNMea6ocnQ+ALVHdU6hLjb57u/PwgZEQUlUfU5cU3eFS15VxdF4TBKRxl1UiASXfd93/BYIfHNGlFFuka9Cv7bsbU0YUzJgsMKPV2Yg/YIedxhi4a991MhL+D2kseJt307x43Ls=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749050759; c=relaxed/simple;
bh=xiw3+9QQT1R6rACHzAcfRAzeIULsoWcavNAe3lOvbNo=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=LqSUnT4ToM9KBtBvsaIP2aPCtSVcT7b4zcRY2FMt913bieFEOQHwRIWik+xUzLP8KRDuzuRp4wsB7k1dP44wokWoGIheASxQQ+AQIcbKUCk7N34mIqtX+e84y0yL3qPB9o9KSdH4Mc8NWw6e/bLmfEOWwTgGBhf8wBrWQEKgOWA=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=WMK8MFW/; arc=none smtp.client-ip=209.85.208.44
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org
Received: by mail-ed1-f44.google.com with SMTP id 4fb4d7f45d1cf-60462e180e2so3104266a12.2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 08:25:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=linaro.org; s=google; t=1749050753; x=1749655553; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=bqcmeBNmmkfD7/7jkYs7xVbtGf9PYopW68JKLRAxWfQ=;
b=WMK8MFW/jB1UTk5SjsLI8Pnx5mlvvop51NaNR4erhtjqe/Jln5vG1fHsZPybL3arIi
8nMVbNBbJobJebxhxDzshVLVxLW7FxPsP/q4Ju/JJ9LEyTOgvzeN+nRxWLpm6O5BrWiB
a786fS7jh6DHr4RE38zKFzVSlcDbnIY5hsMUhNvGJ+DOuGaJmcMuFnVekAHfKjKVvgRu
v++2ywKlQWUlmgRb1CAlPLQptYaO7ct+3cQGviIMcyWkAvM2UxWwZ2UxjgEV53Nr5NKT
L73Am5YQ27wD7PunsyxnnZCQ1wKprAX4XOc5xykIjA52XeiTtgkDGnYs9lKikTlrIhBu
MDcg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749050753; x=1749655553;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=bqcmeBNmmkfD7/7jkYs7xVbtGf9PYopW68JKLRAxWfQ=;
b=f16ESy1D/myug+X745ttoons91XT32jjp90EazyP9BRmJzAXmevKtOP74zTAr/rCEb
c20odx83mi4OSt0fAysDYdJNQcRswIjOKazqUxM6dz7RSmMqpSQiO8Lnpdns02H2GFkS
poC+59M2UWIK9wsYVDxFRLlerYvhO2lKiAwLG4qLlJ8q8nSSxYHtlfEIY4zj0fZj6II0
+G6vNL1tTP9lUTMlj5/wnBMN2DoIfUdFPgDTMIChuvjfmWWwKGH5oV6XKGOAbY2KtjLH
5Pn7UxuGPM0gbt0s59V7mpaX8eilpiSRmlmt3eijQAzPnBOoaz56AQ4hwGo/tGCAX7x4
EILA==
X-Forwarded-Encrypted: i=1; AJvYcCWPrvgLQmy59hfdhP+K9h96+73EkxdthcfTZdZ3KYw4XGXojEqS7VkE83BNSQxNpCXTxu2xRhF6qC9WNnk=@vger.kernel.org
X-Gm-Message-State: AOJu0YyeJNO39Rq0Y3XUgNLKQqOgaqSq6JbHdWh1JNtNakv/b5XdDegC
JiKwTQJeVOtQmDG5vUVC2TR/wjxudZxKSjimN4vio0rQ54hIVrMcQy0XPvLenTl4TRc=
X-Gm-Gg: ASbGncs6QX3KXQ15RmWWIKRTn9xRH7EwMOWKHa/jJJZm+53UPfTUgRf9htfHUi4+saE
8TPsF/DJ8UhOmi5ZhUuYdTlUMGHqizj9y88KzvHam/qpyfIsxvHOEfz1FLnct/ZS1n/9qM7X3oK
EmKphHv2VmGN0ooYzvRaN7Hxhyv9sfsBuIhE5HaZsYJ1yxzT2tbEYCnRVqUKDlJT3Kgrh55h4EM
Q1rLuFoS+Wn0bZPp702vY0Zo3iOR2DdMUbED6LSaoA+XE9JVWePgA6mLh2aiM1jIfmS7+f/rkQ0
qE4rJ4EBDoy5PFSezqK9C6E/WQDORErnTwOvkLmxkXg79GDuH79ueRrufJAMb15tGoz1jQBOu3V
usbi6Z8dxZN5iGNfD9H3zvOG/pBKwlXPhkOs=
X-Google-Smtp-Source: AGHT+IGtfaNvbOgLxL63zDuI4O0A+DETos0BCLMRQDwmpSXX87hd3C1qMtwAXr3zW2EH0X8wSGXcrg==
X-Received: by 2002:a05:6402:2547:b0:604:c4fc:70c with SMTP id 4fb4d7f45d1cf-606ea5bd9c5mr3000623a12.31.1749050753425;
Wed, 04 Jun 2025 08:25:53 -0700 (PDT)
Received: from puffmais.c.googlers.com (140.20.91.34.bc.googleusercontent.com. [34.91.20.140])
by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-606ed984f63sm1051640a12.58.2025.06.04.08.25.52
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 08:25:52 -0700 (PDT)
From: =?utf-8?q?Andr=C3=A9_Draszik?= <andre.draszik@xxxxxxxxxx>
Date: Wed, 04 Jun 2025 16:25:53 +0100
Subject: [PATCH 14/17] regulator: s2mps11: refactor S2MPG10
::set_voltage_time() for S2MPG11 reuse
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Message-Id: <20250604-s2mpg1x-regulators-v1-14-6038740f49ae@xxxxxxxxxx>
References: <20250604-s2mpg1x-regulators-v1-0-6038740f49ae@xxxxxxxxxx>
In-Reply-To: <20250604-s2mpg1x-regulators-v1-0-6038740f49ae@xxxxxxxxxx>
To: Tudor Ambarus <tudor.ambarus@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>, Krzysztof Kozlowski <krzk@xxxxxxxxxx>,
Liam Girdwood <lgirdwood@xxxxxxxxx>, Mark Brown <broonie@xxxxxxxxxx>,
Lee Jones <lee@xxxxxxxxxx>, Linus Walleij <linus.walleij@xxxxxxxxxx>,
Bartosz Golaszewski <brgl@xxxxxxxx>
Cc: Peter Griffin <peter.griffin@xxxxxxxxxx>,
Will McVicker <willmcvicker@xxxxxxxxxx>, kernel-team@xxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-samsung-soc@xxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-gpio@xxxxxxxxxxxxxxx,
=?utf-8?q?Andr=C3=A9_Draszik?= <andre.draszik@xxxxxxxxxx>
X-Mailer: b4 0.14.2
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
The upcoming S2MPG11 support needs a similar, but different version of
::set_voltage_time(). For S2MPG10, the downwards and upwards ramps for
a rail are at different offsets at the same bit positions, while for
S2MPG11 the ramps are at the same offset at different bit positions.
Refactor the existing version slightly to allow reuse.
Signed-off-by: André Draszik <andre.draszik@xxxxxxxxxx>
---
drivers/regulator/s2mps11.c | 32 ++++++++++++++++++++++----------
1 file changed, 22 insertions(+), 10 deletions(-)
diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
index 6fe6787044c40216f7a0355119981b74a8f56e58..f427895637a32f26e2960ce7c7879632f0bc2dcb 100644
--- a/drivers/regulator/s2mps11.c
+++ b/drivers/regulator/s2mps11.c
@@ -562,26 +562,23 @@ static int s2mpg10_regulator_buck_enable_time(struct regulator_dev *rdev)
+ DIV_ROUND_UP(curr_uV, s2mpg10_desc->enable_ramp_rate));
}
-static int s2mpg10_regulator_buck_set_voltage_time(struct regulator_dev *rdev,
- int old_uV, int new_uV)
+static int s2mpg1x_regulator_buck_set_voltage_time(struct regulator_dev *rdev,
+ int old_uV, int new_uV,
+ unsigned int ramp_reg,
+ unsigned int ramp_mask)
{
- unsigned int ramp_reg, ramp_sel, ramp_rate;
+ unsigned int ramp_sel, ramp_rate;
int ret;
if (old_uV == new_uV)
return 0;
- ramp_reg = rdev->desc->ramp_reg;
- if (old_uV > new_uV)
- /* The downwards ramp is at a different offset. */
- ramp_reg += S2MPG10_PMIC_DVS_RAMP4 - S2MPG10_PMIC_DVS_RAMP1;
-
ret = regmap_read(rdev->regmap, ramp_reg, &ramp_sel);
if (ret)
return ret;
- ramp_sel &= rdev->desc->ramp_mask;
- ramp_sel >>= ffs(rdev->desc->ramp_mask) - 1;
+ ramp_sel &= ramp_mask;
+ ramp_sel >>= ffs(ramp_mask) - 1;
if (ramp_sel >= rdev->desc->n_ramp_values ||
!rdev->desc->ramp_delay_table)
return -EINVAL;
@@ -591,6 +588,21 @@ static int s2mpg10_regulator_buck_set_voltage_time(struct regulator_dev *rdev,
return DIV_ROUND_UP(abs(new_uV - old_uV), ramp_rate);
}
+static int s2mpg10_regulator_buck_set_voltage_time(struct regulator_dev *rdev,
+ int old_uV, int new_uV)
+{
+ unsigned int ramp_reg;
+
+ ramp_reg = rdev->desc->ramp_reg;
+ if (old_uV > new_uV)
+ /* The downwards ramp is at a different offset. */
+ ramp_reg += S2MPG10_PMIC_DVS_RAMP4 - S2MPG10_PMIC_DVS_RAMP1;
+
+ return s2mpg1x_regulator_buck_set_voltage_time(rdev, old_uV, new_uV,
+ ramp_reg,
+ rdev->desc->ramp_mask);
+}
+
/*
* We assign both, ::set_voltage_time() and ::set_voltage_time_sel(), because
* only if the latter is != NULL, the regulator core will call neither during
--
2.49.0.1204.g71687c7c1d-goog
Return-Path: <linux-kernel+bounces-673451-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 7F86B41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:30:41 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 52C5B7A280B
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:27:34 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 2F14B1F463B;
Wed, 4 Jun 2025 15:26:03 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="SNm6Nlnz"
Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6A49B1DDC04
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:25:56 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.43
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749050760; cv=none; b=eTUUxHumY/VZIjXYC/baV2Pimyy0iLr3Dc4nUKdDpEggoYPxmyH2Xi0qumgNqA/Fxm5nj+1s+RcqAF7+lgv0iR88dXKgado8J/R0GWvogBBBNccu3lWtWs1bUYyeCxkxMccouYRnf5tq9BaBFtV6I/CuYC4h2DLhaFfDLZQWNQ8=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749050760; c=relaxed/simple;
bh=A/GHEuztfmgd1/p5cSNEjJ3+xiiEy5QUpmdgAvLhvKg=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=k2oXavDcOvZQfxrUd6t9FreXdmc5KuI4rCstfoPkffMgtGj1+QQz5utiC2+BS6KkMNoaFkCz9e21pHNnzluD+Fa9gStfn35jBUp4Vxk1q23IBPP6i/vtHbPH/E3ROLS0yRMpS4TET8x3OHl7Q/I4Cw3iJk9kU1l871hs2QXE6uQ=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=SNm6Nlnz; arc=none smtp.client-ip=209.85.208.43
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org
Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-604e745b6fbso13679546a12.2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 08:25:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=linaro.org; s=google; t=1749050754; x=1749655554; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=vn2J3nnAxbZSYZ0Pl0MdJxpTvr8+PeUSA3EZa6924LA=;
b=SNm6NlnzXNYUNidt32Y7GsuhNDSoLhlaTthVWBGNAAJiNY4b+ZLm45lEUGzcoYXv8z
vBsQKoZ1SB6oJ8mKoYC1vBpEj4DfBcpn62ltdHBvVwk5CAVmcV5RWoA4vDCLUtRz6rtY
nXT5ZemHlcSsoYl09iU92xrozxJKs2F6EZzASxOhUTOsN4nreyDekTrRTZDzN/w7/bLB
0v/RY3uzHB4Oira2qJ4AR7bkQbqjhsEjpsPaYq0gKXA/ht80YAhc8LGm1bAI4wev2RRM
7e6O5ELVT6itTJ2dPubcNb2ShC4fIXzeADTMBp4dZLz9GGmzxX7FuMVJ5DRx0J3yCWPz
MFHw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749050754; x=1749655554;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=vn2J3nnAxbZSYZ0Pl0MdJxpTvr8+PeUSA3EZa6924LA=;
b=OQBmSXUt1s7ICi97luCAV7vpbwA2oFUJs7L+Sq94abcGfqeFruZvdfSADl2H4eV22p
WUNhnqfWYZ8dq2Nbnaa2JJzfMfarO++NIB2YPsYjBUPbWnNMWIy7GKGXT6hvEMYC4IyQ
ErRC+W+25mDUB8S4/QYTOaRx4vm1XSMYhU7+3j+n/OgZZKfAYjQuaMWdtt2XOnDlECAY
xOKMfhftvDsWehbLexgnpQLbizdaKjOiVOBwmpMBkcJX1h1olWpIuuNJZo6+t3xCr+7n
7xyPh8FZYP/8vCa+YSPpKCnB0XEtmMayDtivBUfIQOrrs0ExevcW5aW6DYLEVJ6scBey
OYDg==
X-Forwarded-Encrypted: i=1; AJvYcCW8KY7Gmn/6OeobQcri/tBiiJZ9paj78YxsXl4coYNWqRj34LUUWa3A0qBUnyq958MH1kD0gCpRQ3ZBlE8=@vger.kernel.org
X-Gm-Message-State: AOJu0YzFJnAZ9ildAqU33bjqF0ooyh2L+Y0+C6w7WQjkZtQ3NYuxcLzk
MLZvrWhGUzEJko6eEn445dMoPY9hDAfYGiI8+zarGeD4Qas6VCo/msSFvQPqPBf/bVs=
X-Gm-Gg: ASbGncuD7T1rAQOGnNalQ2JteWWkzIozCP1X+8bp+IpMv8ESSHO1YOKaQQf5BxLpDAZ
ueAIXQDbDk1HyCSxLNl+6lqX6ne8TcEePtqfmakhTYc1Hvx0gFwUZL4g1De6MPCvlvyqq4jSnlW
EEkLltMHfd+/mf7XqdcGKT5c1+5vMMusluYT/hT/k7ZpMw0OY5eVaEdeIyBEDL88eSCnfLAZk1n
k1IRz91cX4dS7faJ3+EzycAWsB4hRoN43o3QEru9OL50tiJpJdmIEx4ui7ys3c9vrXEo2kR/HmW
hHQ+k3SzRksBBV7H8a/jQZCPwq21X9bYKm/368xFGNC+YLRPQ0yRQV5btv7MxWDQTp9+CJjS5Fw
esNl3TqBnBYxeVsF8NmiyD+1LCjRDf6OpfN8=
X-Google-Smtp-Source: AGHT+IGETXau/Hs1twpCO4F6DmcKfpU3VQ25hwN+cddBXzSz725FYngJL1uteD+Puz581oTrnBSHGg==
X-Received: by 2002:a05:6402:5c9:b0:5fc:9979:78f7 with SMTP id 4fb4d7f45d1cf-606f0b66b7bmr2628868a12.14.1749050754080;
Wed, 04 Jun 2025 08:25:54 -0700 (PDT)
Received: from puffmais.c.googlers.com (140.20.91.34.bc.googleusercontent.com. [34.91.20.140])
by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-606ed984f63sm1051640a12.58.2025.06.04.08.25.53
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 08:25:53 -0700 (PDT)
From: =?utf-8?q?Andr=C3=A9_Draszik?= <andre.draszik@xxxxxxxxxx>
Date: Wed, 04 Jun 2025 16:25:54 +0100
Subject: [PATCH 15/17] regulator: s2mps11: refactor S2MPG10 regulator
macros for S2MPG11 reuse
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Message-Id: <20250604-s2mpg1x-regulators-v1-15-6038740f49ae@xxxxxxxxxx>
References: <20250604-s2mpg1x-regulators-v1-0-6038740f49ae@xxxxxxxxxx>
In-Reply-To: <20250604-s2mpg1x-regulators-v1-0-6038740f49ae@xxxxxxxxxx>
To: Tudor Ambarus <tudor.ambarus@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>, Krzysztof Kozlowski <krzk@xxxxxxxxxx>,
Liam Girdwood <lgirdwood@xxxxxxxxx>, Mark Brown <broonie@xxxxxxxxxx>,
Lee Jones <lee@xxxxxxxxxx>, Linus Walleij <linus.walleij@xxxxxxxxxx>,
Bartosz Golaszewski <brgl@xxxxxxxx>
Cc: Peter Griffin <peter.griffin@xxxxxxxxxx>,
Will McVicker <willmcvicker@xxxxxxxxxx>, kernel-team@xxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-samsung-soc@xxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-gpio@xxxxxxxxxxxxxxx,
=?utf-8?q?Andr=C3=A9_Draszik?= <andre.draszik@xxxxxxxxxx>
X-Mailer: b4 0.14.2
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Rails in the S2MPG11 share a very similar set of properties with
S2MP10 with slight differences. Update the existing macros to allow
reuse by the upcoming S2MPG11 driver.
Signed-off-by: André Draszik <andre.draszik@xxxxxxxxxx>
---
Note: checkpatch complains about unused macro arguments _r_mask,
_r_table, and _r_table_sz, but these are false-positives due to patch
context.
---
drivers/regulator/s2mps11.c | 70 ++++++++++++++++++++++++++++-----------------
1 file changed, 43 insertions(+), 27 deletions(-)
diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
index f427895637a32f26e2960ce7c7879632f0bc2dcb..74f09b949ca7d6f1d61decd086480996fd444dbd 100644
--- a/drivers/regulator/s2mps11.c
+++ b/drivers/regulator/s2mps11.c
@@ -638,24 +638,24 @@ static const struct regulator_ops s2mpg10_reg_buck_ops[] = {
}
};
-#define regulator_desc_s2mpg10_ldo_cmn(_num, _supply, _ops, _vrange, \
- _vsel_reg_sfx, _vsel_mask, _en_reg, _en_mask, \
+#define regulator_desc_s2mpg1x_ldo_cmn(_name, _id, _supply, _ops, \
+ _vrange, _vsel_reg, _vsel_mask, _en_reg, _en_mask, \
_ramp_delay, _r_reg, _r_mask, _r_table, _r_table_sz) { \
- .name = "ldo"#_num"m", \
+ .name = "ldo"_name, \
.supply_name = _supply, \
- .of_match = of_match_ptr("ldo"#_num"m"), \
+ .of_match = of_match_ptr("ldo"_name), \
.regulators_node = of_match_ptr("regulators"), \
.of_parse_cb = s2mpg10_of_parse_cb, \
- .id = S2MPG10_LDO##_num, \
+ .id = _id, \
.ops = &_ops[0], \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
.linear_ranges = _vrange, \
.n_linear_ranges = ARRAY_SIZE(_vrange), \
.n_voltages = _vrange##_count, \
- .vsel_reg = S2MPG10_PMIC_L##_num##M_##_vsel_reg_sfx, \
+ .vsel_reg = _vsel_reg, \
.vsel_mask = _vsel_mask, \
- .enable_reg = S2MPG10_PMIC_##_en_reg, \
+ .enable_reg = _en_reg, \
.enable_mask = _en_mask, \
.ramp_delay = _ramp_delay, \
.ramp_reg = _r_reg, \
@@ -670,10 +670,12 @@ static const struct regulator_ops s2mpg10_reg_buck_ops[] = {
_ramp_delay, _r_reg, _r_mask, _r_table, _r_table_sz, \
_pc_reg, _pc_mask) \
{ \
- .desc = regulator_desc_s2mpg10_ldo_cmn(_num, _supply, \
- _ops, \
- _vrange, _vsel_reg_sfx, _vsel_mask, \
- _en_reg, _en_mask, \
+ .desc = regulator_desc_s2mpg1x_ldo_cmn(#_num"m", \
+ S2MPG10_LDO##_num, _supply, _ops, \
+ _vrange, \
+ S2MPG10_PMIC_L##_num##M_##_vsel_reg_sfx, \
+ _vsel_mask, \
+ S2MPG10_PMIC_##_en_reg, _en_mask, \
_ramp_delay, _r_reg, _r_mask, _r_table, \
_r_table_sz), \
.pctrlsel_reg = _pc_reg, \
@@ -728,31 +730,45 @@ static const struct regulator_ops s2mpg10_reg_buck_ops[] = {
* (12.5mV/μs) while our ::set_voltage_time() takes the value in ramp_reg
* into account.
*/
-#define regulator_desc_s2mpg10_buck(_num, _vrange, _r_reg) { \
- .name = "buck"#_num"m", \
- .supply_name = "vinb"#_num"m", \
- .of_match = of_match_ptr("buck"#_num"m"), \
+#define regulator_desc_s2mpg1x_buck_cmn(_name, _id, _supply, _ops, \
+ _vrange, _vsel_reg, _vsel_mask, _en_reg, _en_mask, \
+ _r_reg, _r_mask, _r_table, _r_table_sz, \
+ _en_time) { \
+ .name = "buck"_name, \
+ .supply_name = _supply, \
+ .of_match = of_match_ptr("buck"_name), \
.of_parse_cb = s2mpg10_of_parse_cb, \
.regulators_node = of_match_ptr("regulators"), \
- .id = S2MPG10_BUCK##_num, \
- .ops = &s2mpg10_reg_buck_ops[0], \
+ .of_parse_cb = s2mpg10_of_parse_cb, \
+ .id = _id, \
+ .ops = &_ops[0], \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
.linear_ranges = _vrange, \
.n_linear_ranges = ARRAY_SIZE(_vrange), \
.n_voltages = _vrange##_count, \
- .vsel_reg = S2MPG10_PMIC_B##_num##M_OUT1, \
- .vsel_mask = 0xff, \
- .enable_reg = S2MPG10_PMIC_B##_num##M_CTRL, \
- .enable_mask = GENMASK(7, 6), \
- .ramp_reg = S2MPG10_PMIC_##_r_reg, \
- .ramp_mask = s2mpg10_buck_to_ramp_mask(S2MPG10_BUCK##_num \
- - S2MPG10_BUCK1), \
- .ramp_delay_table = s2mpg10_buck_ramp_table, \
- .n_ramp_values = ARRAY_SIZE(s2mpg10_buck_ramp_table), \
- .enable_time = 30, /* + V/enable_ramp_rate */ \
+ .vsel_reg = _vsel_reg, \
+ .vsel_mask = _vsel_mask, \
+ .enable_reg = _en_reg, \
+ .enable_mask = _en_mask, \
+ .ramp_reg = _r_reg, \
+ .ramp_mask = _r_mask, \
+ .ramp_delay_table = _r_table, \
+ .n_ramp_values = _r_table_sz, \
+ .enable_time = _en_time, /* + V/enable_ramp_rate */ \
}
+#define regulator_desc_s2mpg10_buck(_num, _vrange, _r_reg) \
+ regulator_desc_s2mpg1x_buck_cmn(#_num"m", S2MPG10_BUCK##_num, \
+ "vinb"#_num"m", s2mpg10_reg_buck_ops, _vrange, \
+ S2MPG10_PMIC_B##_num##M_OUT1, GENMASK(7, 0), \
+ S2MPG10_PMIC_B##_num##M_CTRL, GENMASK(7, 6), \
+ S2MPG10_PMIC_##_r_reg, \
+ s2mpg10_buck_to_ramp_mask(S2MPG10_BUCK##_num \
+ - S2MPG10_BUCK1), \
+ s2mpg10_buck_ramp_table, \
+ ARRAY_SIZE(s2mpg10_buck_ramp_table), 30)
+
#define s2mpg10_regulator_desc_buck_cm(_num, _vrange, _r_reg) \
.desc = regulator_desc_s2mpg10_buck(_num, _vrange, _r_reg), \
.enable_ramp_rate = 12500
--
2.49.0.1204.g71687c7c1d-goog
Return-Path: <linux-kernel+bounces-673453-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 1A79B41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:30:44 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id C76327A2C4F
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:27:34 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 33F311AF0B4;
Wed, 4 Jun 2025 15:26:03 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="u/3wSDI2"
Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 95E011DE4E6
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:25:57 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.48
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749050762; cv=none; b=L1TGbLSmrCGAtAvoGwFO/eIyPMGfsf1DCDsNjbiv8iheeawSCs0TsSoAlkuXqdlKpKmCqymNNTWiJWyXsBd5tbHh6hYrCje6GJbrKwRgrHUA2JiT/riWzvnXo+UuFcdnlXuj8XgyP5+BA6FuANn3O6JlRAFg4lfVtp5rDdwOv3A=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749050762; c=relaxed/simple;
bh=38iyypFvEIDDo+XViI83hfrn7fp3ROVaa2JyQWVHtXI=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=vBqc0x/OGLwVKmntNeLSzQKQJVYfBLIW4gEfsEVK5G/55GJy8L2Wzx9IGRJDY+0uSFxs55hhKlqR/qa2BfzGV1naH3eGvMvhZKUtc6OdMhHUfYSDV1JHMmujjXfckcw7HJKbwpJhrv0Z6pRbIUEKJYInw6ODDKRLeYBWMbBbSJY=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=u/3wSDI2; arc=none smtp.client-ip=209.85.208.48
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org
Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-606b6dbe316so3193872a12.3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 08:25:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=linaro.org; s=google; t=1749050755; x=1749655555; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=QHL3sUIzhoW/yqDxEI2huZEz7k/6gYpbh53sq2QOYGk=;
b=u/3wSDI20VetYzJBc0CaJdFq5W42zu+a5LNRj4z0kHkGckg00rVca3cQOl5nPmSfSr
bW+S+zUmlhp+0T24YBXIfkzPdEjM2d5J0qdOdaJHwcbFUPC3I2jOZ8TSR0nWrMXs05Pl
ZcynzZnVRH6btyyKRlDBgS6G+dptTK39xt8lq3EU0LOH+le1PWzI9z8WR8Rtrjly01Dr
yEsJGISZs13eStjyQwFtTMgR7Zwb1ekeQo4UZ+ViijMuDoE1MA6G27uNtolX7LPttC75
BkMQwq2LydaxTiBppH/0AB5s+sGko1FwGuBR5Dpm1YexdMDud76f/pP0t4nYFGqf8I47
RAqg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749050755; x=1749655555;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=QHL3sUIzhoW/yqDxEI2huZEz7k/6gYpbh53sq2QOYGk=;
b=MyA+dgPXVidyZIxWwgkHmX7ZBxLRoaZO89rFHBcgxS6JI3KJNqjN8njF1UFJTunWbM
u/LbPV0PDgu+2FvwG62CKuikqRF72BgeVKzfuIpO9ved/dR9BGxCseWjaHn0050oFGVV
7qZGKddQbPpP9k0O8uUIkg1a2FviqVkuWRF6o16brYFTgAsDxwtRWYYQ1bebw3+5uxre
z6hbZkBtDC2LpWyqz8IRXaFPTW/yeNJUMlcZmZIzkvefFQNXW+xnyMz3PjdaOPxSgSpM
Q5lTrp0/KF5ZhuyLQjo940Tp7WxIVij4Pyc3TAAQDVp9k/FeCqS6U7OQCL3mhAs30Y0b
iBLg==
X-Forwarded-Encrypted: i=1; AJvYcCX279+P8bcfgZ+cCFst40clRtmmSH+Al8s2VnuE3HwGNRiaLsh8gFkIECcvuh3ZkYw7PFtkEaJMppEq7N0=@vger.kernel.org
X-Gm-Message-State: AOJu0YwkRhVcCGGWVvbTXKFXUcAxe5ng8+Er2cEPdFJzE8F+0PmAhIan
95DbJo25XPhuGt1Sor8+16iRlj3owtn/x9SSR6KEYjqXvKcaubJuUoXwSfseMRJYrks=
X-Gm-Gg: ASbGncuLZbJlJHzfs8dan+4ksFsKrkEPmC204HA7TKUh8CCWDaJ1dbTrR0fqMbrwA5m
dOASm+RQpaTozD5IP2aEY8j9aSmbgHhoA2ODqRTXId6jkn4ltoyR/XJiXaKjKQ4PdU0HbpOzrgb
ogQ3zycUZbeSkVfyuqqzHvU1OykQ4DPa12qaulAu/31XclrhYFdtSBZSmdaPDCqQsozTndSalr/
IZQncx8n/9aJnJN02EEj+gc/BOmR8EnG3xsHXxWi9pQIPuaIdB6EM2GiQI3LVXCFaCTTfABXIpy
iFJNTf8tfha/JV7ymuWqEcK2s3GA/lAQjdeq4YZg23nptF6c8uZVa4vAdX9I0bV/BDeOicLpLDB
BsgUQYpSGtxe/TnI4olGKwLkp8O4HBjoW710=
X-Google-Smtp-Source: AGHT+IE5xsg7Femx+fxJUmqis3En5XL3tdeKdVoLZHO6BHxnqgQt3JKQXfamnwt6W3l2CrMDnwEtNA==
X-Received: by 2002:a05:6402:348d:b0:5fb:c126:12c9 with SMTP id 4fb4d7f45d1cf-606ea17d2c0mr3262215a12.25.1749050755202;
Wed, 04 Jun 2025 08:25:55 -0700 (PDT)
Received: from puffmais.c.googlers.com (140.20.91.34.bc.googleusercontent.com. [34.91.20.140])
by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-606ed984f63sm1051640a12.58.2025.06.04.08.25.54
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 08:25:54 -0700 (PDT)
From: =?utf-8?q?Andr=C3=A9_Draszik?= <andre.draszik@xxxxxxxxxx>
Date: Wed, 04 Jun 2025 16:25:56 +0100
Subject: [PATCH 17/17] regulator: s2mps11: more descriptive gpio consumer
name
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Message-Id: <20250604-s2mpg1x-regulators-v1-17-6038740f49ae@xxxxxxxxxx>
References: <20250604-s2mpg1x-regulators-v1-0-6038740f49ae@xxxxxxxxxx>
In-Reply-To: <20250604-s2mpg1x-regulators-v1-0-6038740f49ae@xxxxxxxxxx>
To: Tudor Ambarus <tudor.ambarus@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>, Krzysztof Kozlowski <krzk@xxxxxxxxxx>,
Liam Girdwood <lgirdwood@xxxxxxxxx>, Mark Brown <broonie@xxxxxxxxxx>,
Lee Jones <lee@xxxxxxxxxx>, Linus Walleij <linus.walleij@xxxxxxxxxx>,
Bartosz Golaszewski <brgl@xxxxxxxx>
Cc: Peter Griffin <peter.griffin@xxxxxxxxxx>,
Will McVicker <willmcvicker@xxxxxxxxxx>, kernel-team@xxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-samsung-soc@xxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-gpio@xxxxxxxxxxxxxxx,
=?utf-8?q?Andr=C3=A9_Draszik?= <andre.draszik@xxxxxxxxxx>
X-Mailer: b4 0.14.2
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Currently, gpios claimed by this driver for external rail control
all show up with "s2mps11-regulator" as consumer, which is not
very informative.
Switch to using the regulator name via desc->name instead, using the
device name as fallback.
Signed-off-by: André Draszik <andre.draszik@xxxxxxxxxx>
---
drivers/regulator/s2mps11.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
index 3b5f6f2f2b11be81f27bc39d5d48005da4afeace..a1bb4e420acf23ed048c356004930c586d21b39f 100644
--- a/drivers/regulator/s2mps11.c
+++ b/drivers/regulator/s2mps11.c
@@ -357,7 +357,8 @@ static int s2mps11_of_parse_gpiod(struct device_node *np,
"samsung,ext-control", 0,
GPIOD_OUT_HIGH |
GPIOD_FLAGS_BIT_NONEXCLUSIVE,
- "s2mps11-regulator");
+ desc->name
+ ? : dev_name(config->dev));
if (IS_ERR(ena_gpiod)) {
ret = PTR_ERR(ena_gpiod);
--
2.49.0.1204.g71687c7c1d-goog
Return-Path: <linux-kernel+bounces-673457-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 3D29341E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:31:02 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 62F1F1778A8
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:30:53 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 6ACEF1C8621;
Wed, 4 Jun 2025 15:27:13 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="34Q7dwG4";
dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="YpY9q+Q6"
Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id C6E0B1953BB;
Wed, 4 Jun 2025 15:27:10 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749050832; cv=none; b=SebTGB7sr6PxRXkHA/zQHSgh/ugnXr7vRkNCOyurENmM4Rs6TYADH1VMYoZP/eHCb3EmXgJ9pq/JaWC0LVcyC99TD91/brdvguAhyYf+hsRcOZ2dOkKit7xmeSQ0hMAHsR3THhDQ6ZYtqBnwq/NDgynM4lfW/OyXsnxuXIBBgRE=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749050832; c=relaxed/simple;
bh=ECBw3mcegDKUHOLSOkINmT0psmeYZUxNdiRS0riunZY=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=ZZ6EEJFWBPx2X9BpSN5a7ji1mMKlswjB6SsrMTegP0slKcxp/z/av5raWAkucQybjnpS2BFzUAPZItWpB3P3Vs78z+f8Ou3B49M7LocJsv+y9MbxKqdGa8fXr8KuSMNvSlJnEYTQ+Kd9HCVQRTZLvN2Mf1Ruqkq4cK+v3hV9iDU=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=34Q7dwG4; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=YpY9q+Q6; arc=none smtp.client-ip=193.142.43.55
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de
Date: Wed, 4 Jun 2025 17:27:07 +0200
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de;
s=2020; t=1749050829;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
in-reply-to:in-reply-to:references:references;
bh=KeczW7bWlrnXwwKkhxyWJXZmEyyc0PgR7tMYRMUOC6I=;
b=34Q7dwG4LxD4q21PPvVoIzD3+E69BsgoN/OBVM3uCHFuMo6TtTovefwoogy9xK7FXCyyY3
NO9stWBO8jpUM3OhReD5Jq8Dfr8E05aGAdrzx2JKgF5FjXsAt7z8GuNVZqpphi9pofgmsm
voihIm2NFF3iFuq3EQcJ+2JgT8WGKb/ThSJiVut4k/dqR7foSWF5acrrkw7vlii4k+Boe/
aqe/5/Eh9BRrbxA+Q9ODz/YFnGeBydNi9MuZsMNNhAOG5Vd0J6jOE7P6d1DHui5PLCaEMP
W20IXFmeUiAQIthDnr88Z7Wr2L5ZuJe6TzcjSXocJjah8GN0O+V+sc7IUd0Vgw==
DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de;
s=2020e; t=1749050829;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
in-reply-to:in-reply-to:references:references;
bh=KeczW7bWlrnXwwKkhxyWJXZmEyyc0PgR7tMYRMUOC6I=;
b=YpY9q+Q6UGXz9kl8L+b9cC1SlKw7LULJmhHnZ4iD8pQxAMJ4TPc1zScPQ3/9UTTHoCuEQE
IKZGrmrYMtn8LRBA==
From: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
To: linux-modules@xxxxxxxxxxxxxxx
Cc: oe-lkp@xxxxxxxxxxxxxxx, lkp@xxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
kernel test robot <oliver.sang@xxxxxxxxx>,
Paolo Abeni <pabeni@xxxxxxxxxx>,
Allison Henderson <allison.henderson@xxxxxxxxxx>,
netdev@xxxxxxxxxxxxxxx, linux-rdma@xxxxxxxxxxxxxxx,
rds-devel@xxxxxxxxxxxxxx, Luis Chamberlain <mcgrof@xxxxxxxxxx>,
Petr Pavlu <petr.pavlu@xxxxxxxx>,
Sami Tolvanen <samitolvanen@xxxxxxxxxx>,
Daniel Gomez <da.gomez@xxxxxxxxxxx>,
Peter Zijlstra <peterz@xxxxxxxxxxxxx>,
Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Subject: [PATCH] module: Make sure relocations are applied to the per-CPU
section
Message-ID: <20250604152707.CieD9tN0@xxxxxxxxxxxxx>
References: <202506041623.e45e4f7d-lkp@xxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <202506041623.e45e4f7d-lkp@xxxxxxxxx>
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
The per-CPU data section is handled differently than the other sections.
The memory allocations requires a special __percpu pointer and then the
section is copied into the view of each CPU. Therefore the SHF_ALLOC
flag is removed to ensure move_module() skips it.
Later, relocations are applied and apply_relocations() skips sections
without SHF_ALLOC because they have not been copied. This also skips the
per-CPU data section.
The missing relocations result in a NULL pointer on x86-64 and very
small values on x86-32. This results in a crash because it is not
skipped like NULL pointer would and it can't be dereferenced.
Such an assignment happens during compile time per-CPU lock
initialisation with lockdep enabled.
Add the SHF_ALLOC flag back for the per-CPU section after move_module().
Reported-by: kernel test robot <oliver.sang@xxxxxxxxx>
Closes: https://lore.kernel.org/oe-lkp/202506041623.e45e4f7d-lkp@xxxxxxxxx
Fixes: 8d8022e8aba85 ("module: do percpu allocation after uniqueness check. No, really!")
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
---
kernel/module/main.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kernel/module/main.c b/kernel/module/main.c
index 5c6ab20240a6d..35abb5f13d7dc 100644
--- a/kernel/module/main.c
+++ b/kernel/module/main.c
@@ -2816,6 +2816,9 @@ static struct module *layout_and_allocate(struct load_info *info, int flags)
if (err)
return ERR_PTR(err);
+ /* Add SHF_ALLOC back so that relocations are applied. */
+ info->sechdrs[info->index.pcpu].sh_flags |= SHF_ALLOC;
+
/* Module has been copied to its final place now: return it. */
mod = (void *)info->sechdrs[info->index.mod].sh_addr;
kmemleak_load_module(mod, info);
--
2.49.0
Return-Path: <linux-kernel+bounces-673454-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 4215A41E003FB
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:31:05 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id AC83A3A91A4
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:29:40 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id C9CA6202C3B;
Wed, 4 Jun 2025 15:26:08 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="oskc130A"
Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id EE8581DDA2D
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:26:05 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749050767; cv=none; b=Xhytecu76CuBeloJ5QlZSASOR5k1BPseuEEnHylV8ewO4WNjvh7irqK/rG1xQ8PxZxC1a0lO13HTDS6eZz2sUGG6VosnCtSnpu6tyK2rPs2TWoKBGTOrm9KE/R0id5GhrNVNnSOhowfVX4MU3nAE71ZHlCU2S6dpVmjzjHaGmO0=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749050767; c=relaxed/simple;
bh=GBI1kOt6UTntFPnDAiCPurA9pwJ2CkH4038SpVinQWI=;
h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References:
In-Reply-To:Content-Type; b=WbINJqyfl1SZ24Oxu/6qZEwAPomn+qrvVg6lQCVLfYG56E9Z1yRSNcQRxdDLevZej7di2yvUmF5CKu69hJtAhOvkyeiOvn3TIldoke1iXoh1QUlL/geWbEAYj2ueP4MhBL4Y4Vdp1Cywp/K5WBGnh0LAqcLPAU/DDV2lBeeSRko=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=oskc130A; arc=none smtp.client-ip=209.85.128.44
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org
Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-441ab63a415so76416495e9.3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 08:26:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=linaro.org; s=google; t=1749050764; x=1749655564; darn=vger.kernel.org;
h=content-transfer-encoding:in-reply-to:organization:autocrypt
:content-language:references:cc:to:subject:reply-to:from:user-agent
:mime-version:date:message-id:from:to:cc:subject:date:message-id
:reply-to;
bh=B0lcqU7F4Smj0GWpb9honM7MK06fJTYKjPwZgoAkico=;
b=oskc130AdxRjqmMxXoOYbUC9bGSUPpgyU+EUCAQJNRLzRcrcp3J5VzA4j+Z5dgFfqP
OnNfb8D2pFYO1i/JJ8PxF2rkgjmejY0ZKCKsgMnrXcTlBW7LCIjHQ7bJ89PHUsXZ5cGn
aj8BOLqXTpHPcdnGeRjZH/5LIcosaNh3D4XMLv+W+jsfokUjaoD7w4QlKR32tMaEeRnW
EmBgBwY0keBv81BOAmDBNT4oYNGhJnqSjDoDK+xxwKqWbfCKBM9IIkz0bi73lYZa85oY
SOoFLwj+ryq6nKGqStanRlJXodVDWj0qoVIIaLXeNMd07gxGyZN+eEZTkcKXp9kgCvUW
g07g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749050764; x=1749655564;
h=content-transfer-encoding:in-reply-to:organization:autocrypt
:content-language:references:cc:to:subject:reply-to:from:user-agent
:mime-version:date:message-id:x-gm-message-state:from:to:cc:subject
:date:message-id:reply-to;
bh=B0lcqU7F4Smj0GWpb9honM7MK06fJTYKjPwZgoAkico=;
b=Igoj+oyB+z/3NYRKYQ6G3C0eHEkbISssNBoIJxmNdawe47+hcBV7R4gaHeeV2AvUuL
GV3N8KjkB7O+el/inI9+lVFN45iVK4VAcQbTueLy8jH7fSejXgDiYIJrlhPAy7CAa4QR
a5cCj84ZffbLigXDHq7PEcj0WYldC75VV+QdjyCW5BFGa7LZFVwMRHhxWR9o9IUCr23l
snG2GTNHVWzSERfKTfuEtvMK+0OFCfdyeQ7fYiCwxvIQJ3lhOjSCBFcQtBwwHdcCFUif
/7GgH6TmOPNOaww91/6zrrGDNg3JGhHcuvvODEeIfWAlOJOwbSCj/RDjnT7juxNHYIXF
p8aw==
X-Forwarded-Encrypted: i=1; AJvYcCXsblFnXFm934SyzJmJHBe0hwq3AspwbAf7AAMvyZUKOlPq/QiXIsDwYzI7S8cHo/yj3tdwCjHv9HZnYP4=@vger.kernel.org
X-Gm-Message-State: AOJu0YxnLhOjQLXYfRRYv8/AKIuzWDtbK2TQMgGPh5oDAnfKrYdfV+No
zfRdsayvfXppBvfRep7NRt4J1ZV2j6hPO0SZsE1j6ayXujXMB+8lyYXe9xHV3xQDexA=
X-Gm-Gg: ASbGncvgHWwUq22Mgi7OYSRL5aLH5/xaCJGj0B+YmRaWr+eRSwnXWjLBZwbV05kxkmB
S/2BIKDu2mBbzbD8+9g0yZQ5C6P5Avzwg6S2zAgenJhP7i/78z+EsX6rf+7zNrJExY7PArXJgq2
QgwH0XWPXBD+x6iop5HxYpNpgSLFe9Tig9xhMV0/6mEN4O+xbufV8qy25UB6jPz4TteIUe6m61u
67ibLd+jLzN1bEay35IgP7mIWAvwbESEkSqrICmtpUjTK84xHZy2mWWUggmzsP2XGdx0BohUUum
bZMjFYbLF1E3sFIjgsJ7OiHhifw7kCRUMAKn3zYV0F0w4WPC3zbNwyHiBsltGwF1cqns6O8d3IQ
VExJpIJuD6gVtmFc2iXH3gwd2JQ==
X-Google-Smtp-Source: AGHT+IHSHAjhdXAKFOooiLdh3xOijEcwpDuXOWN1lz1ky8KfmORabIgw+h1ADRjlvhvZfDXR1mvoYw==
X-Received: by 2002:a7b:c41a:0:b0:43c:ed61:2c26 with SMTP id 5b1f17b1804b1-451f6502b42mr12017605e9.17.1749050764240;
Wed, 04 Jun 2025 08:26:04 -0700 (PDT)
Received: from ?IPV6:2a01:e0a:3d9:2080:fef9:cf1c:18f:2ab8? ([2a01:e0a:3d9:2080:fef9:cf1c:18f:2ab8])
by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a4f00a0421sm22296664f8f.97.2025.06.04.08.26.03
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 08:26:03 -0700 (PDT)
Message-ID: <35789b5b-76a3-472f-adef-cc47f6d23dd4@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 17:26:03 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
From: Neil Armstrong <neil.armstrong@xxxxxxxxxx>
Reply-To: Neil Armstrong <neil.armstrong@xxxxxxxxxx>
Subject: Re: [PATCH v2] phy: use per-PHY lockdep keys
To: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>,
Vinod Koul <vkoul@xxxxxxxxxx>, Kishon Vijay Abraham I <kishon@xxxxxxxxxx>,
Abel Vesa <abel.vesa@xxxxxxxxxx>
Cc: linux-arm-msm@xxxxxxxxxxxxxxx, linux-phy@xxxxxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
References: <20250530-phy-subinit-v2-1-09dfe80e82a8@xxxxxxxxxxxxxxxx>
Content-Language: en-US, fr
Autocrypt: addr=neil.armstrong@xxxxxxxxxx; keydata=
xsBNBE1ZBs8BCAD78xVLsXPwV/2qQx2FaO/7mhWL0Qodw8UcQJnkrWmgTFRobtTWxuRx8WWP
GTjuhvbleoQ5Cxjr+v+1ARGCH46MxFP5DwauzPekwJUD5QKZlaw/bURTLmS2id5wWi3lqVH4
BVF2WzvGyyeV1o4RTCYDnZ9VLLylJ9bneEaIs/7cjCEbipGGFlfIML3sfqnIvMAxIMZrvcl9
qPV2k+KQ7q+aXavU5W+yLNn7QtXUB530Zlk/d2ETgzQ5FLYYnUDAaRl+8JUTjc0CNOTpCeik
80TZcE6f8M76Xa6yU8VcNko94Ck7iB4vj70q76P/J7kt98hklrr85/3NU3oti3nrIHmHABEB
AAHNKk5laWwgQXJtc3Ryb25nIDxuZWlsLmFybXN0cm9uZ0BsaW5hcm8ub3JnPsLAkQQTAQoA
OwIbIwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgBYhBInsPQWERiF0UPIoSBaat7Gkz/iuBQJk
Q5wSAhkBAAoJEBaat7Gkz/iuyhMIANiD94qDtUTJRfEW6GwXmtKWwl/mvqQtaTtZID2dos04
YqBbshiJbejgVJjy+HODcNUIKBB3PSLaln4ltdsV73SBcwUNdzebfKspAQunCM22Mn6FBIxQ
GizsMLcP/0FX4en9NaKGfK6ZdKK6kN1GR9YffMJd2P08EO8mHowmSRe/ExAODhAs9W7XXExw
UNCY4pVJyRPpEhv373vvff60bHxc1k/FF9WaPscMt7hlkbFLUs85kHtQAmr8pV5Hy9ezsSRa
GzJmiVclkPc2BY592IGBXRDQ38urXeM4nfhhvqA50b/nAEXc6FzqgXqDkEIwR66/Gbp0t3+r
yQzpKRyQif3OwE0ETVkGzwEIALyKDN/OGURaHBVzwjgYq+ZtifvekdrSNl8TIDH8g1xicBYp
QTbPn6bbSZbdvfeQPNCcD4/EhXZuhQXMcoJsQQQnO4vwVULmPGgtGf8PVc7dxKOeta+qUh6+
SRh3vIcAUFHDT3f/Zdspz+e2E0hPV2hiSvICLk11qO6cyJE13zeNFoeY3ggrKY+IzbFomIZY
4yG6xI99NIPEVE9lNBXBKIlewIyVlkOaYvJWSV+p5gdJXOvScNN1epm5YHmf9aE2ZjnqZGoM
Mtsyw18YoX9BqMFInxqYQQ3j/HpVgTSvmo5ea5qQDDUaCsaTf8UeDcwYOtgI8iL4oHcsGtUX
oUk33HEAEQEAAcLAXwQYAQIACQUCTVkGzwIbDAAKCRAWmrexpM/4rrXiB/sGbkQ6itMrAIfn
M7IbRuiSZS1unlySUVYu3SD6YBYnNi3G5EpbwfBNuT3H8//rVvtOFK4OD8cRYkxXRQmTvqa3
3eDIHu/zr1HMKErm+2SD6PO9umRef8V82o2oaCLvf4WeIssFjwB0b6a12opuRP7yo3E3gTCS
KmbUuLv1CtxKQF+fUV1cVaTPMyT25Od+RC1K+iOR0F54oUJvJeq7fUzbn/KdlhA8XPGzwGRy
4zcsPWvwnXgfe5tk680fEKZVwOZKIEuJC3v+/yZpQzDvGYJvbyix0lHnrCzq43WefRHI5XTT
QbM0WUIBIcGmq38+OgUsMYu4NzLu7uZFAcmp6h8g
Organization: Linaro
In-Reply-To: <20250530-phy-subinit-v2-1-09dfe80e82a8@xxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 30/05/2025 18:08, Dmitry Baryshkov wrote:
If the PHY driver uses another PHY internally (e.g. in case of eUSB2,
repeaters are represented as PHYs), then it would trigger the following
lockdep splat because all PHYs use a single static lockdep key and thus
lockdep can not identify whether there is a dependency or not and
reports a false positive.
Make PHY subsystem use dynamic lockdep keys, assigning each driver a
separate key. This way lockdep can correctly identify dependency graph
between mutexes.
============================================
WARNING: possible recursive locking detected
6.15.0-rc7-next-20250522-12896-g3932f283970c #3455 Not tainted
--------------------------------------------
kworker/u51:0/78 is trying to acquire lock:
ffff0008116554f0 (&phy->mutex){+.+.}-{4:4}, at: phy_init+0x4c/0x12c
but task is already holding lock:
ffff000813c10cf0 (&phy->mutex){+.+.}-{4:4}, at: phy_init+0x4c/0x12c
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
----
lock(&phy->mutex);
lock(&phy->mutex);
*** DEADLOCK ***
May be due to missing lock nesting notation
4 locks held by kworker/u51:0/78:
#0: ffff000800010948 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work+0x18c/0x5ec
#1: ffff80008036bdb0 (deferred_probe_work){+.+.}-{0:0}, at: process_one_work+0x1b4/0x5ec
#2: ffff0008094ac8f8 (&dev->mutex){....}-{4:4}, at: __device_attach+0x38/0x188
#3: ffff000813c10cf0 (&phy->mutex){+.+.}-{4:4}, at: phy_init+0x4c/0x12c
stack backtrace:
CPU: 0 UID: 0 PID: 78 Comm: kworker/u51:0 Not tainted 6.15.0-rc7-next-20250522-12896-g3932f283970c #3455 PREEMPT
Hardware name: Qualcomm CRD, BIOS 6.0.240904.BOOT.MXF.2.4-00528.1-HAMOA-1 09/ 4/2024
Workqueue: events_unbound deferred_probe_work_func
Call trace:
show_stack+0x18/0x24 (C)
dump_stack_lvl+0x90/0xd0
dump_stack+0x18/0x24
print_deadlock_bug+0x258/0x348
__lock_acquire+0x10fc/0x1f84
lock_acquire+0x1c8/0x338
__mutex_lock+0xb8/0x59c
mutex_lock_nested+0x24/0x30
phy_init+0x4c/0x12c
snps_eusb2_hsphy_init+0x54/0x1a0
phy_init+0xe0/0x12c
dwc3_core_init+0x450/0x10b4
dwc3_core_probe+0xce4/0x15fc
dwc3_probe+0x64/0xb0
platform_probe+0x68/0xc4
really_probe+0xbc/0x298
__driver_probe_device+0x78/0x12c
driver_probe_device+0x3c/0x160
__device_attach_driver+0xb8/0x138
bus_for_each_drv+0x84/0xe0
__device_attach+0x9c/0x188
device_initial_probe+0x14/0x20
bus_probe_device+0xac/0xb0
deferred_probe_work_func+0x8c/0xc8
process_one_work+0x208/0x5ec
worker_thread+0x1c0/0x368
kthread+0x14c/0x20c
ret_from_fork+0x10/0x20
Fixes: 3584f6392f09 ("phy: qcom: phy-qcom-snps-eusb2: Add support for eUSB2 repeater")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
---
Commented the wrong version:
In fact, other drivers were using sub-phys before:
./amlogic/phy-meson-axg-pcie.c
./amlogic/phy-meson-axg-mipi-dphy.c
(yeah I know, my bad !)
so it should be:
Fixes: e2463559ff1d ("phy: amlogic: Add Amlogic AXG PCIE PHY Driver")
With the Fixes changed:
Reviewed-by: Neil Armstrong <neil.armstrong@xxxxxxxxxx>
Return-Path: <linux-kernel+bounces-673452-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id B681541E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:31:14 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 2C6B57AAD91
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:27:48 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id BFFE31F582B;
Wed, 4 Jun 2025 15:26:03 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="QYXbmF/V"
Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5BD081DE3B5
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:25:57 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.54
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749050761; cv=none; b=CUU2VzDyn5aNVF409ZOLB9WeR5rUwhqNqRHcCeSBjTgPHBQBJzSqmyK5OVs4m93rynGGPhJ7KN0YPdgqD81Im0ujWGx53YjXJYbE2ZdEpseOuePtCJusQjzHUK931hxG03Z7qWyRjgfHSs/7nngEyH0QYC+Hc6vYCTiCWYvAGzo=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749050761; c=relaxed/simple;
bh=S58osScf9m+EZHP6ZPFv6S9jPWquICjN+2mKXJ7uBec=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=GOU25A/75XArSGLBkKJ7/jSEibXD6OkRnu3s9HqdZOfjc2OoeQW3LzyrrEt57dFaFHlA5Cy6erU6igpZBOAJKA8HCIgr2SQnLlrWEXCX0ufq0C5+3t+DxqIAXTnCUHGyvctxDhBnA6X+7x52jrPdMI+TqjB+cmkpduwkyNcb0NY=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=QYXbmF/V; arc=none smtp.client-ip=209.85.208.54
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org
Received: by mail-ed1-f54.google.com with SMTP id 4fb4d7f45d1cf-605b9488c28so8177576a12.2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 08:25:56 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=linaro.org; s=google; t=1749050755; x=1749655555; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=7B0+Nwu/HOkqYpijxQs4Jzs+csQzmp8Gn5FLuXG11/I=;
b=QYXbmF/VacG/6FgIsHsRfmjYL1ZGXi+lZU1KrZLBK4FC1kjZkRhG22WV+qeoytDOo7
rIgy1QMdypbG5+pj2dj0wODYQPuQXkS/d8phJzzMTjV9cDIpn62JcU8qChRhyeKWm2xy
e8zx0GXcRWi96FtrOiipwru07Iu7WrnpHUuAy/HaLRGHlnbzVzFFChyqvP5Irx+7kFGM
nJBkTXupD973Oo30U+7JgnuupVZveSirabPK+3bjBuQPoCH+fZPnZahqVBZ59aR6phbA
dW4C0TgwvaZ7Lq1gsHlWfAfYw1FeGVJnmIwWFIS8JYOGaSAQaHyFtkl0k4YGRZLltifW
Dv3A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749050755; x=1749655555;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=7B0+Nwu/HOkqYpijxQs4Jzs+csQzmp8Gn5FLuXG11/I=;
b=TQjTKWf4swigqaSElcw3Q63XDQ0YI/as6xJ26O+cpMdecNh8gngiOwFVOkc5B6EYqf
u2hgnxTLjQQGbDDPdB83hVFU+skesi4yw5LLxt8Loe8oAX+DCJ4WxsbyOreFRgA0HZn4
yt6wyhdDjMSamtVpFYNXm8XE1PId5fxcWMMAK251BA+nn/ldu9L3bVzyUff5h9B9ZlRN
tBvXsmS2xv1rVyLFb9gLqR2eIPfEG+d0bD3KVW5UVBGL6smqZTLPCW82jzoqt6Lb1zzf
yusenHPJPaW2cJQbPE5P9tZ2ueAhSuxP9xAhQPPck+ELsQ+0gQiPf3qAR/3ol7cw7V9V
XteQ==
X-Forwarded-Encrypted: i=1; AJvYcCVwJtL7YSZ8Xl+G1j03kQnM59AYYq3AkyCMC4cg1fbKEJj/r3vV8Xuc7crEjOMNzA37Kcs2b6Fncmvb3XY=@vger.kernel.org
X-Gm-Message-State: AOJu0Yyyr0CH5Djb8j6cTNMe73X2TIYfg4ltuOBrP5ODPT3ztap9PEpF
GxRvRuX+TXBs7hqsB2MztJDBfQ7yEsqYePmeRqu8YPZ/eggnzRN2G8JB5BCX5q3Rc/s=
X-Gm-Gg: ASbGncu0JyqZ1aYgpRni0rC2Yv+EqzdG/xbS3EtyUkzLNZ6pe4DzCqnAuIWz0mNxq7y
1IvT3x4tnAME8EF/V1CzxIJG9GGgBpWNl61bDozPldBfvTezCHhP4UNe1I/W2XZVjj0Ym/dxY8F
Y1t2b8ydHdliVxooXg12TQD1QfjbBEFvHkj3AUv7wsuOvIP2V+s3u0Z9jesQxeY4NQilJ/qLClt
e/swaS/ojSDGZY3DMSanQwO78COGz70vaRFeRo1TO+Dam0WDSF1nmXkuH4/mw0ynxOPJUZuFv/y
ppUikVCpXKU8Gg99HBMAqyz0gkJ6GK0h8h+qqxKJqHgg9KllN6X7ywPixeEOdZ38Q4ub/XlShQW
JGAwQ7E0PrjxKr6iTIqAvkI9aTww+1iSLETiMiKn9U5ejgTmZDt11HoT5
X-Google-Smtp-Source: AGHT+IFnvxqBiHW9G1Ii6JI98RPKz5RCaegMjvcGQbieSyHuvx0T2tzr+X2hIiYnkirxUQ7UEIZKZA==
X-Received: by 2002:a05:6402:280d:b0:607:116e:108d with SMTP id 4fb4d7f45d1cf-607116e12b9mr912806a12.21.1749050754729;
Wed, 04 Jun 2025 08:25:54 -0700 (PDT)
Received: from puffmais.c.googlers.com (140.20.91.34.bc.googleusercontent.com. [34.91.20.140])
by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-606ed984f63sm1051640a12.58.2025.06.04.08.25.54
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 08:25:54 -0700 (PDT)
From: =?utf-8?q?Andr=C3=A9_Draszik?= <andre.draszik@xxxxxxxxxx>
Date: Wed, 04 Jun 2025 16:25:55 +0100
Subject: [PATCH 16/17] regulator: s2mps11: add S2MPG11 regulator
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Message-Id: <20250604-s2mpg1x-regulators-v1-16-6038740f49ae@xxxxxxxxxx>
References: <20250604-s2mpg1x-regulators-v1-0-6038740f49ae@xxxxxxxxxx>
In-Reply-To: <20250604-s2mpg1x-regulators-v1-0-6038740f49ae@xxxxxxxxxx>
To: Tudor Ambarus <tudor.ambarus@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>, Krzysztof Kozlowski <krzk@xxxxxxxxxx>,
Liam Girdwood <lgirdwood@xxxxxxxxx>, Mark Brown <broonie@xxxxxxxxxx>,
Lee Jones <lee@xxxxxxxxxx>, Linus Walleij <linus.walleij@xxxxxxxxxx>,
Bartosz Golaszewski <brgl@xxxxxxxx>
Cc: Peter Griffin <peter.griffin@xxxxxxxxxx>,
Will McVicker <willmcvicker@xxxxxxxxxx>, kernel-team@xxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-samsung-soc@xxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-gpio@xxxxxxxxxxxxxxx,
=?utf-8?q?Andr=C3=A9_Draszik?= <andre.draszik@xxxxxxxxxx>
X-Mailer: b4 0.14.2
X-Spam-Status: No, score=-2.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,LOTS_OF_MONEY,
MAILING_LIST_MULTI,MONEY_NOHTML,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
The S2MPG10 PMIC is a Power Management IC for mobile applications with
buck converters, various LDOs, and power meters. It typically
complements an S2MPG10 PMIC in a main/sub configuration as the
sub-PMIC.
It has 12 buck, 1 buck-boost, and 15 LDO rails. Several of these can
either be controlled via software or via external signals, e.g. input
pins connected to a main processor's GPIO pins.
This commit implements support for these rails.
The rails are instantiated as separate driver instances for bucks and
LDOs, because S2MPG11 is typically used with an S2MPG10 main-PMIC where
some bucks of one typically supply at least some of the LDOs of the
other.
Signed-off-by: André Draszik <andre.draszik@xxxxxxxxxx>
---
drivers/regulator/s2mps11.c | 301 +++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 300 insertions(+), 1 deletion(-)
diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
index 74f09b949ca7d6f1d61decd086480996fd444dbd..3b5f6f2f2b11be81f27bc39d5d48005da4afeace 100644
--- a/drivers/regulator/s2mps11.c
+++ b/drivers/regulator/s2mps11.c
@@ -18,6 +18,7 @@
#include <linux/regulator/of_regulator.h>
#include <linux/mfd/samsung/core.h>
#include <linux/mfd/samsung/s2mpg10.h>
+#include <linux/mfd/samsung/s2mpg11.h>
#include <linux/mfd/samsung/s2mps11.h>
#include <linux/mfd/samsung/s2mps13.h>
#include <linux/mfd/samsung/s2mps14.h>
@@ -413,7 +414,7 @@ static int s2mpg10_of_parse_cb(struct device_node *np,
struct s2mpg10_regulator_desc *s2mpg10_desc = to_s2mpg10_regulator_desc(desc);
u32 ext_control;
- if (s2mps11->dev_type != S2MPG10)
+ if (s2mps11->dev_type != S2MPG10 && s2mps11->dev_type != S2MPG11)
return 0;
if (of_property_read_u32(np, "samsung,ext-control", &ext_control))
@@ -439,6 +440,27 @@ static int s2mpg10_of_parse_cb(struct device_node *np,
}
break;
+ case S2MPG11:
+ switch (desc->id) {
+ case S2MPG11_BUCK1 ... S2MPG11_BUCK3:
+ case S2MPG11_BUCK5:
+ case S2MPG11_BUCK8:
+ case S2MPG11_BUCK9:
+ case S2MPG11_BUCKD:
+ case S2MPG11_BUCKA:
+ case S2MPG10_LDO1:
+ case S2MPG10_LDO2:
+ case S2MPG10_LDO8:
+ case S2MPG10_LDO13:
+ if (ext_control > S2MPG11_PCTRLSEL_LDO13S_EN)
+ return -EINVAL;
+ break;
+
+ default:
+ return -EINVAL;
+ }
+ break;
+
default:
return -EINVAL;
}
@@ -476,6 +498,7 @@ static int s2mpg10_enable_ext_control(struct s2mps11_info *s2mps11,
switch (s2mps11->dev_type) {
case S2MPG10:
+ case S2MPG11:
s2mpg10_desc = to_s2mpg10_regulator_desc(rdev->desc);
break;
@@ -603,6 +626,21 @@ static int s2mpg10_regulator_buck_set_voltage_time(struct regulator_dev *rdev,
rdev->desc->ramp_mask);
}
+static int s2mpg11_regulator_buck_set_voltage_time(struct regulator_dev *rdev,
+ int old_uV, int new_uV)
+{
+ unsigned int ramp_mask;
+
+ ramp_mask = rdev->desc->ramp_mask;
+ if (old_uV > new_uV)
+ /* The downwards mask is at a different position. */
+ ramp_mask >>= 2;
+
+ return s2mpg1x_regulator_buck_set_voltage_time(rdev, old_uV, new_uV,
+ rdev->desc->ramp_reg,
+ ramp_mask);
+}
+
/*
* We assign both, ::set_voltage_time() and ::set_voltage_time_sel(), because
* only if the latter is != NULL, the regulator core will call neither during
@@ -919,6 +957,249 @@ static const struct s2mpg10_regulator_desc s2mpg10_regulators_bucks[] = {
PCTRLSEL4, GENMASK(7, 4))
};
+static const struct regulator_ops s2mpg11_reg_buck_ops[] = {
+ {
+ .list_voltage = regulator_list_voltage_linear_range,
+ .map_voltage = regulator_map_voltage_linear_range,
+ .is_enabled = regulator_is_enabled_regmap,
+ .enable = regulator_enable_regmap,
+ .disable = regulator_disable_regmap,
+ .get_voltage_sel = regulator_get_voltage_sel_regmap,
+ .set_voltage_sel = regulator_set_voltage_sel_regmap,
+ .set_voltage_time = s2mpg11_regulator_buck_set_voltage_time,
+ .set_voltage_time_sel = regulator_set_voltage_time_sel,
+ .enable_time = s2mpg10_regulator_buck_enable_time,
+ .set_ramp_delay = regulator_set_ramp_delay_regmap,
+ }, {
+ .list_voltage = regulator_list_voltage_linear_range,
+ .map_voltage = regulator_map_voltage_linear_range,
+ .get_voltage_sel = regulator_get_voltage_sel_regmap,
+ .set_voltage_sel = regulator_set_voltage_sel_regmap,
+ .set_voltage_time = s2mpg11_regulator_buck_set_voltage_time,
+ .set_voltage_time_sel = regulator_set_voltage_time_sel,
+ .enable_time = s2mpg10_regulator_buck_enable_time,
+ .set_ramp_delay = regulator_set_ramp_delay_regmap,
+ }
+};
+
+#define s2mpg11_regulator_desc_ldo_cmn(_num, _supply, _vrange, \
+ _vsel_reg_sfx, _vsel_mask, _en_reg, _en_mask, \
+ _ramp_delay, _r_reg, _r_mask, _r_table, _r_table_sz, \
+ _pc_reg, _pc_mask) \
+ { \
+ .desc = regulator_desc_s2mpg1x_ldo_cmn(#_num"s", \
+ S2MPG11_LDO##_num, _supply, \
+ s2mpg10_reg_ldo_ops, \
+ _vrange, \
+ S2MPG11_PMIC_L##_num##S_##_vsel_reg_sfx, \
+ _vsel_mask, \
+ S2MPG11_PMIC_##_en_reg, _en_mask, \
+ _ramp_delay, _r_reg, _r_mask, _r_table, \
+ _r_table_sz), \
+ .pctrlsel_reg = _pc_reg, \
+ .pctrlsel_mask = _pc_mask, \
+ }
+
+
+/* standard LDO via LxM_CTRL */
+#define s2mpg11_regulator_desc_ldo(_num, _supply, _vrange) \
+ s2mpg11_regulator_desc_ldo_cmn(_num, _supply, _vrange, \
+ CTRL, GENMASK(5, 0), \
+ L##_num##S_CTRL, BIT(7), \
+ 0, 0, 0, NULL, 0, \
+ 0, 0)
+
+/* standard LDO but possibly GPIO controlled */
+#define s2mpg11_regulator_desc_ldo_gpio(_num, _supply, _vrange, \
+ _pc_reg, _pc_mask) \
+ s2mpg11_regulator_desc_ldo_cmn(_num, _supply, _vrange, \
+ CTRL, GENMASK(5, 0), \
+ L##_num##S_CTRL, GENMASK(7, 6), \
+ 0, 0, 0, NULL, 0, \
+ S2MPG11_PMIC_##_pc_reg, _pc_mask)
+
+/* LDO with ramp support and possibly GPIO controlled */
+#define s2mpg11_regulator_desc_ldo_ramp(_num, _supply, _vrange, \
+ _en_mask, _r_reg_sfx, _pc_reg, _pc_mask) \
+ s2mpg11_regulator_desc_ldo_cmn(_num, _supply, _vrange, \
+ CTRL1, GENMASK(6, 0), \
+ LDO_CTRL1, _en_mask, \
+ 6250, S2MPG11_PMIC_##_r_reg_sfx, GENMASK(1, 0), \
+ s2mpg10_ldo_ramp_table, \
+ ARRAY_SIZE(s2mpg10_ldo_ramp_table), \
+ S2MPG11_PMIC_##_pc_reg, _pc_mask)
+
+#define s2mpg11_buck_to_ramp_mask(n) (GENMASK(3, 2) << (((n) % 2) * 4))
+
+#define regulator_desc_s2mpg11_buckx(_name, _id, _supply, _vrange, \
+ _vsel_reg, _en_reg, _en_mask, _r_reg) \
+ regulator_desc_s2mpg1x_buck_cmn(_name, _id, _supply, \
+ s2mpg11_reg_buck_ops, _vrange, \
+ S2MPG11_PMIC_##_vsel_reg, GENMASK(7, 0), \
+ S2MPG11_PMIC_##_en_reg, _en_mask, \
+ S2MPG11_PMIC_##_r_reg, \
+ s2mpg11_buck_to_ramp_mask(_id - S2MPG11_BUCK1), \
+ s2mpg10_buck_ramp_table, \
+ ARRAY_SIZE(s2mpg10_buck_ramp_table), 30)
+
+#define s2mpg11_regulator_desc_buck_xm(_num, _vrange, _vsel_reg_sfx, \
+ _en_mask, _r_reg, _en_rrate) \
+ .desc = regulator_desc_s2mpg11_buckx(#_num"s", \
+ S2MPG11_BUCK##_num, "vinb"#_num"s", \
+ _vrange, \
+ B##_num##S_##_vsel_reg_sfx, \
+ B##_num##S_CTRL, _en_mask, \
+ _r_reg), \
+ .enable_ramp_rate = _en_rrate
+
+#define s2mpg11_regulator_desc_buck_cm(_num, _vrange, _vsel_reg_sfx, \
+ _en_mask, _r_reg) \
+ { \
+ s2mpg11_regulator_desc_buck_xm(_num, _vrange, \
+ _vsel_reg_sfx, _en_mask, _r_reg, 12500), \
+ }
+
+#define s2mpg11_regulator_desc_buckn_cm_gpio(_num, _vrange, \
+ _vsel_reg_sfx, _en_mask, _r_reg, _pc_reg, _pc_mask) \
+ { \
+ s2mpg11_regulator_desc_buck_xm(_num, _vrange, \
+ _vsel_reg_sfx, _en_mask, _r_reg, 12500), \
+ .pctrlsel_reg = S2MPG11_PMIC_##_pc_reg, \
+ .pctrlsel_mask = _pc_mask, \
+ }
+
+#define s2mpg11_regulator_desc_buck_vm(_num, _vrange, _vsel_reg_sfx, \
+ _en_mask, _r_reg) \
+ { \
+ s2mpg11_regulator_desc_buck_xm(_num, _vrange, \
+ _vsel_reg_sfx, _en_mask, _r_reg, 25000), \
+ }
+
+#define s2mpg11_regulator_desc_bucka(_num, _num_lower, _r_reg, \
+ _pc_reg, _pc_mask) \
+ { \
+ .desc = regulator_desc_s2mpg11_buckx(#_num_lower, \
+ S2MPG11_BUCK##_num, "vinb"#_num_lower, \
+ s2mpg11_buck_vranges##_num_lower, \
+ BUCK##_num##_OUT, \
+ BUCK##_num##_CTRL, GENMASK(7, 6), \
+ _r_reg), \
+ .enable_ramp_rate = 25000, \
+ .pctrlsel_reg = S2MPG11_PMIC_##_pc_reg, \
+ .pctrlsel_mask = _pc_mask, \
+ }
+
+#define s2mpg11_regulator_desc_buckboost() \
+ { \
+ .desc = regulator_desc_s2mpg1x_buck_cmn("boost", \
+ S2MPG11_BUCKBOOST, "vinbb", \
+ s2mpg10_reg_ldo_ops, \
+ s2mpg11_buck_vrangesboost, \
+ S2MPG11_PMIC_BB_OUT1, GENMASK(6, 0), \
+ S2MPG11_PMIC_BB_CTRL, BIT(7), \
+ 0, 0, NULL, 0, 35), \
+ .enable_ramp_rate = 17500, \
+ }
+
+/* voltage range for s2mpg11 LDO 1, 2 */
+S2MPG10_VOLTAGE_RANGE(s2mpg11_ldo, 1, 300000, 450000, 950000, STEP_12_5_MV);
+
+/* voltage range for s2mpg11 LDO 3, 7, 10, 11, 12, 14, 15 */
+S2MPG10_VOLTAGE_RANGE(s2mpg11_ldo, 3, 700000, 1600000, 1950000, STEP_25_MV);
+
+/* voltage range for s2mpg11 LDO 4, 6 */
+S2MPG10_VOLTAGE_RANGE(s2mpg11_ldo, 4, 1800000, 2500000, 3300000, STEP_25_MV);
+
+/* voltage range for s2mpg11 LDO 5 */
+S2MPG10_VOLTAGE_RANGE(s2mpg11_ldo, 5, 1600000, 1600000, 1950000, STEP_12_5_MV);
+
+/* voltage range for s2mpg11 LDO 8 */
+S2MPG10_VOLTAGE_RANGE(s2mpg11_ldo, 8, 979600, 1130400, 1281200, 5800);
+
+/* voltage range for s2mpg11 LDO 9 */
+S2MPG10_VOLTAGE_RANGE(s2mpg11_ldo, 9, 725000, 725000, 1300000, STEP_12_5_MV);
+
+/* voltage range for s2mpg11 LDO 13 */
+S2MPG10_VOLTAGE_RANGE(s2mpg11_ldo, 13, 1800000, 1800000, 3350000, STEP_25_MV);
+
+/* voltage range for s2mpg11 BUCK 1, 2, 3, 4, 8, 9, 10 */
+S2MPG10_VOLTAGE_RANGE(s2mpg11_buck, 1, 200000, 450000, 1300000, STEP_6_25_MV);
+
+/* voltage range for s2mpg11 BUCK 5 */
+S2MPG10_VOLTAGE_RANGE(s2mpg11_buck, 5, 200000, 400000, 1300000, STEP_6_25_MV);
+
+/* voltage range for s2mpg11 BUCK 6 */
+S2MPG10_VOLTAGE_RANGE(s2mpg11_buck, 6, 200000, 1000000, 1500000, STEP_6_25_MV);
+
+/* voltage range for s2mpg11 BUCK 7 */
+S2MPG10_VOLTAGE_RANGE(s2mpg11_buck, 7, 600000, 1500000, 2200000, STEP_12_5_MV);
+
+/* voltage range for s2mpg11 BUCK D */
+S2MPG10_VOLTAGE_RANGE(s2mpg11_buck, d, 600000, 2400000, 3300000, STEP_12_5_MV);
+
+/* voltage range for s2mpg11 BUCK A */
+S2MPG10_VOLTAGE_RANGE(s2mpg11_buck, a, 600000, 1700000, 2100000, STEP_12_5_MV);
+
+/* voltage range for s2mpg11 BUCK BOOST */
+S2MPG10_VOLTAGE_RANGE(s2mpg11_buck, boost,
+ 2600000, 3000000, 3600000, STEP_12_5_MV);
+
+static const struct s2mpg10_regulator_desc s2mpg11_regulators_ldos[] = {
+ s2mpg11_regulator_desc_ldo_ramp(1, "vinl1s", s2mpg11_ldo_vranges1,
+ GENMASK(5, 4), DVS_SYNC_CTRL1,
+ PCTRLSEL5, GENMASK(3, 0)),
+ s2mpg11_regulator_desc_ldo_ramp(2, "vinl1s", s2mpg11_ldo_vranges1,
+ GENMASK(7, 6), DVS_SYNC_CTRL2,
+ PCTRLSEL5, GENMASK(7, 4)),
+ s2mpg11_regulator_desc_ldo(3, "vinl3s", s2mpg11_ldo_vranges3),
+ s2mpg11_regulator_desc_ldo(4, "vinl5s", s2mpg11_ldo_vranges4),
+ s2mpg11_regulator_desc_ldo(5, "vinl3s", s2mpg11_ldo_vranges5),
+ s2mpg11_regulator_desc_ldo(6, "vinl5s", s2mpg11_ldo_vranges4),
+ s2mpg11_regulator_desc_ldo(7, "vinl3s", s2mpg11_ldo_vranges3),
+ s2mpg11_regulator_desc_ldo_gpio(8, "vinl2s", s2mpg11_ldo_vranges8,
+ PCTRLSEL6, GENMASK(3, 0)),
+ s2mpg11_regulator_desc_ldo(9, "vinl2s", s2mpg11_ldo_vranges9),
+ s2mpg11_regulator_desc_ldo(10, "vinl4s", s2mpg11_ldo_vranges3),
+ s2mpg11_regulator_desc_ldo(11, "vinl4s", s2mpg11_ldo_vranges3),
+ s2mpg11_regulator_desc_ldo(12, "vinl4s", s2mpg11_ldo_vranges3),
+ s2mpg11_regulator_desc_ldo_gpio(13, "vinl6s", s2mpg11_ldo_vranges13,
+ PCTRLSEL6, GENMASK(7, 4)),
+ s2mpg11_regulator_desc_ldo(14, "vinl4s", s2mpg11_ldo_vranges3),
+ s2mpg11_regulator_desc_ldo(15, "vinl3s", s2mpg11_ldo_vranges3),
+};
+
+static const struct s2mpg10_regulator_desc s2mpg11_regulators_bucks[] = {
+ s2mpg11_regulator_desc_buckboost(),
+ s2mpg11_regulator_desc_buckn_cm_gpio(1, s2mpg11_buck_vranges1,
+ OUT1, GENMASK(7, 6), DVS_RAMP1,
+ PCTRLSEL1, GENMASK(3, 0)),
+ s2mpg11_regulator_desc_buckn_cm_gpio(2, s2mpg11_buck_vranges1,
+ OUT1, GENMASK(7, 6), DVS_RAMP1,
+ PCTRLSEL1, GENMASK(7, 4)),
+ s2mpg11_regulator_desc_buckn_cm_gpio(3, s2mpg11_buck_vranges1,
+ OUT1, GENMASK(7, 6), DVS_RAMP2,
+ PCTRLSEL2, GENMASK(3, 0)),
+ s2mpg11_regulator_desc_buck_cm(4, s2mpg11_buck_vranges1,
+ OUT, BIT(7), DVS_RAMP2),
+ s2mpg11_regulator_desc_buckn_cm_gpio(5, s2mpg11_buck_vranges5,
+ OUT, GENMASK(7, 6), DVS_RAMP3,
+ PCTRLSEL2, GENMASK(7, 4)),
+ s2mpg11_regulator_desc_buck_cm(6, s2mpg11_buck_vranges6,
+ OUT1, BIT(7), DVS_RAMP3),
+ s2mpg11_regulator_desc_buck_vm(7, s2mpg11_buck_vranges7,
+ OUT1, BIT(7), DVS_RAMP4),
+ s2mpg11_regulator_desc_buckn_cm_gpio(8, s2mpg11_buck_vranges1,
+ OUT1, GENMASK(7, 6), DVS_RAMP4,
+ PCTRLSEL3, GENMASK(3, 0)),
+ s2mpg11_regulator_desc_buckn_cm_gpio(9, s2mpg11_buck_vranges1,
+ OUT1, GENMASK(7, 6), DVS_RAMP5,
+ PCTRLSEL3, GENMASK(7, 4)),
+ s2mpg11_regulator_desc_buck_cm(10, s2mpg11_buck_vranges1,
+ OUT, BIT(7), DVS_RAMP5),
+ s2mpg11_regulator_desc_bucka(D, d, DVS_RAMP6, PCTRLSEL4, GENMASK(3, 0)),
+ s2mpg11_regulator_desc_bucka(A, a, DVS_RAMP6, PCTRLSEL4, GENMASK(7, 4)),
+};
+
static const struct regulator_ops s2mps11_ldo_ops = {
.list_voltage = regulator_list_voltage_linear,
.map_voltage = regulator_map_voltage_linear,
@@ -1803,6 +2084,7 @@ static int s2mps11_handle_ext_control(struct s2mps11_info *s2mps11,
break;
case S2MPG10:
+ case S2MPG11:
/*
* If desc.enable_val is != 0, then external control was
* requested. We can not test s2mpg10_desc::ext_control,
@@ -1862,6 +2144,22 @@ static int s2mps11_pmic_probe(struct platform_device *pdev)
BUILD_BUG_ON((enum s2mpg10_regulators) S2MPS_REGULATOR_MAX <
S2MPG10_REGULATOR_MAX);
break;
+ case S2MPG11:
+ switch (pdev->id + 1) {
+ case S2MPG10_REGULATOR_CELL_ID_BUCKS:
+ rdev_num = ARRAY_SIZE(s2mpg11_regulators_bucks);
+ s2mpg10_regulators = s2mpg11_regulators_bucks;
+ break;
+ case S2MPG10_REGULATOR_CELL_ID_LDOS:
+ rdev_num = ARRAY_SIZE(s2mpg11_regulators_ldos);
+ s2mpg10_regulators = s2mpg11_regulators_ldos;
+ break;
+ default:
+ return -EINVAL;
+ }
+ BUILD_BUG_ON((enum s2mpg11_regulators) S2MPS_REGULATOR_MAX <
+ S2MPG11_REGULATOR_MAX);
+ break;
case S2MPS11X:
rdev_num = ARRAY_SIZE(s2mps11_regulators);
regulators = s2mps11_regulators;
@@ -1940,6 +2238,7 @@ static int s2mps11_pmic_probe(struct platform_device *pdev)
static const struct platform_device_id s2mps11_pmic_id[] = {
{ "s2mpg10-regulator", S2MPG10},
+ { "s2mpg11-regulator", S2MPG11},
{ "s2mps11-regulator", S2MPS11X},
{ "s2mps13-regulator", S2MPS13X},
{ "s2mps14-regulator", S2MPS14X},
--
2.49.0.1204.g71687c7c1d-goog
Return-Path: <linux-kernel+bounces-673460-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 5C71A41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:32:09 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 261D61794CE
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:31:48 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 264E91A5B93;
Wed, 4 Jun 2025 15:30:33 +0000 (UTC)
Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0A69D13A3ED;
Wed, 4 Jun 2025 15:30:30 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749051032; cv=none; b=rS1Ldh33QfzUHrIyTP4kpdiXXk53TvCbz53H3rxjouYZBkXC+f/ZL2zLSNd13bieumGu0ao1BEWinla0L861K7YnX3pw9Dr88x6Ze5cJynEbD3X/qFpXBXmVjYwTUmlaGn/PF+YR8uLm0O9ZtlqV4lu/Fl7LAZdv5lrlYfJCwZs=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749051032; c=relaxed/simple;
bh=Vi54+MTJC05Rofk/bnZBllkeyCAg+RDLF5sCSBzbJX0=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=IhZ/4An49FnljHR7w+O2evvCJ3oL9sGPeX0wBMCuguWUq63MmaDN/YzhwbWYC6RWckJbXY58LL7xBlQpZ5IWzwzEZ5f1AYDqmcROLnYUMWmXMd6Qx7leW13QOTPt4hYzZYufcA5cDlnnN9w/FxCkyQKltkaySIl3AXKiMuhQV7k=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org; spf=fail smtp.mailfrom=kernel.org; arc=none smtp.client-ip=198.175.65.11
Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=kernel.org
Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=kernel.org
X-CSE-ConnectionGUID: XAn1vIKZSOugyxDDoxv91A==
X-CSE-MsgGUID: 9WauvoQcTZWIxlFkCMrSUg==
X-IronPort-AV: E=McAfee;i="6800,10657,11454"; a="61405822"
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="61405822"
Received: from orviesa002.jf.intel.com ([10.64.159.142])
by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 08:30:30 -0700
X-CSE-ConnectionGUID: TCxxyYDtQAC0rXI23RcsiA==
X-CSE-MsgGUID: 6aKuB2ElR7OU4wLhtq26/w==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="176180957"
Received: from smile.fi.intel.com ([10.237.72.52])
by orviesa002.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 08:30:18 -0700
Received: from andy by smile.fi.intel.com with local (Exim 4.98.2)
(envelope-from <andy@xxxxxxxxxx>)
id 1uMq4D-00000003abB-1jJd;
Wed, 04 Jun 2025 18:30:13 +0300
Date: Wed, 4 Jun 2025 18:30:13 +0300
From: Andy Shevchenko <andy@xxxxxxxxxx>
To: Colin Ian King <colin.i.king@xxxxxxxxx>
Cc: Jonathan Cameron <jic23@xxxxxxxxxx>,
David Lechner <dlechner@xxxxxxxxxxxx>,
Nuno =?iso-8859-1?Q?S=E1?= <nuno.sa@xxxxxxxxxx>,
linux-iio@xxxxxxxxxxxxxxx, kernel-janitors@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
Subject: Re: [PATCH][next] iio: adc: ti-ads131e08: Fix spelling mistake
"tweek" -> "tweak"
Message-ID: <aEBmhUv-xpNgmv6v@xxxxxxxxxxxxxxxxxx>
References: <20250603165706.126031-1-colin.i.king@xxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20250603165706.126031-1-colin.i.king@xxxxxxxxx>
Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo
X-Spam-Status: No, score=-3.3 required=5.0 tests=MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Tue, Jun 03, 2025 at 05:57:06PM +0100, Colin Ian King wrote:
There is a spelling mistake in variable tweek_offset and in comment
blocks. Fix these.
Reviewed-by: Andy Shevchenko <andy@xxxxxxxxxx>
Datasheet doesn't give any special term for this, so I think the patch
is correct. OTOH, the dictionary defines tweek as "A form of atmospherics
(radio interference) produced when the high-frequency components reach
the receiver before the low-frequency components." which is somehow might be
related (like high byte goes before low or vise versa).
--
With Best Regards,
Andy Shevchenko
Return-Path: <linux-kernel+bounces-673461-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 97FDB41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:32:24 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id EE21D1790BF
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:32:00 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 7AFE5DDC1;
Wed, 4 Jun 2025 15:31:16 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="RFZ1SKoC"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9036B18B47E;
Wed, 4 Jun 2025 15:31:14 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749051075; cv=none; b=iLI3RX8bbplynwN+frUr33S8gqJuSqjBmTz3tC6YgQia1L9NEwx92A6k53aOC6tjkJKFdnOqFuNBDnyiXaU0/GpGdYzzHE+KLSLQAqU+KzLb2tPkx55Foq7ezOdPzOxlfttWZ94iBqs/qPsBwJvwmCUI7T8m1loYWEWuHcylzow=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749051075; c=relaxed/simple;
bh=xjwQ85hYcU1ZrPH6YnswDzMKpczKMUcTOpAQm5SeA+8=;
h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References:
MIME-Version:Content-Type; b=XpmkHcqmtthetSrGinZLCXtNTJilwv4M9Ux2Xxez1XP5Ii80DRlXz40BvuifTmR9yYQxtysQm9wIu6S/1TmQ5v7AHeJ9BYj7AllIeA0uleuMSmML+ej/sR+Nod9YwOiUXpRxT/4gBdH/Bpo3tNTULs01Kt73vG3s89K3gl3dYM4=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=RFZ1SKoC; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id ECB9DC4CEE4;
Wed, 4 Jun 2025 15:31:13 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749051074;
bh=xjwQ85hYcU1ZrPH6YnswDzMKpczKMUcTOpAQm5SeA+8=;
h=Date:From:To:Cc:Subject:In-Reply-To:References:From;
b=RFZ1SKoCh5NLJ8Hir4XT3wS2hpvE9PKPaoXUwqK6A8Y6cyWPWxoiDHP0B3g97Ezw2
oHmbFqVnwwa+1BujyqnxsP0HYVzTaaMYo6TvJmShbXRzO+7+74vAELoOyv7PXZfuuE
vt8jqfGmV1yKX96vfbSYofPX1rrlrfdapV5NS/Q9kHfzwJkebOYVcgEkUqSvslFs+P
qRMsf01mcU1aGfLgFUgwkHhPDv1PbR2dnAGoC4JMZ/2/DoRmTpjTQvOwvN9RywAc3o
6IFzqzEnCBgdXkssXygB6MpnW+faE9oMjEnP1y9MXt03hRF5mZd6hxekaJkATa9hr4
fyxQftlHoBWTQ==
Received: from [149.88.19.236] (helo=lobster-girl.misterjones.org)
by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
(Exim 4.95)
(envelope-from <maz@xxxxxxxxxx>)
id 1uMq59-003Fww-Fx;
Wed, 04 Jun 2025 16:31:11 +0100
Date: Wed, 04 Jun 2025 16:31:08 +0100
Message-ID: <87a56ned6r.wl-maz@xxxxxxxxxx>
From: Marc Zyngier <maz@xxxxxxxxxx>
To: James Clark <james.clark@xxxxxxxxxx>
Cc: Catalin Marinas <catalin.marinas@xxxxxxx>,
Will Deacon <will@xxxxxxxxxx>,
Mark Rutland <mark.rutland@xxxxxxx>,
Jonathan Corbet <corbet@xxxxxxx>,
Oliver Upton <oliver.upton@xxxxxxxxx>,
Joey Gouly <joey.gouly@xxxxxxx>,
Suzuki K Poulose <suzuki.poulose@xxxxxxx>,
Zenghui Yu
<yuzenghui@xxxxxxxxxx>,
Peter Zijlstra <peterz@xxxxxxxxxxxxx>,
Ingo Molnar <mingo@xxxxxxxxxx>,
Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>,
Namhyung Kim <namhyung@xxxxxxxxxx>,
Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>,
Jiri Olsa <jolsa@xxxxxxxxxx>,
Ian Rogers <irogers@xxxxxxxxxx>,
Adrian Hunter <adrian.hunter@xxxxxxxxx>,
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx,
linux-perf-users@xxxxxxxxxxxxxxx,
linux-doc@xxxxxxxxxxxxxxx,
kvmarm@xxxxxxxxxxxxxxx
Subject: Re: [PATCH v2 06/11] KVM: arm64: Add trap configs for PMSDSFR_EL1
In-Reply-To: <2fb1965b-bef9-4a8e-a1c7-c8a77d957b23@xxxxxxxxxx>
References: <20250529-james-perf-feat_spe_eft-v2-0-a01a9baad06a@xxxxxxxxxx>
<20250529-james-perf-feat_spe_eft-v2-6-a01a9baad06a@xxxxxxxxxx>
<867c1ze4pg.wl-maz@xxxxxxxxxx>
<2fb1965b-bef9-4a8e-a1c7-c8a77d957b23@xxxxxxxxxx>
User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue)
FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.1
(aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue")
Content-Type: text/plain; charset=US-ASCII
X-SA-Exim-Connect-IP: 149.88.19.236
X-SA-Exim-Rcpt-To: james.clark@xxxxxxxxxx, catalin.marinas@xxxxxxx, will@xxxxxxxxxx, mark.rutland@xxxxxxx, corbet@xxxxxxx, oliver.upton@xxxxxxxxx, joey.gouly@xxxxxxx, suzuki.poulose@xxxxxxx, yuzenghui@xxxxxxxxxx, peterz@xxxxxxxxxxxxx, mingo@xxxxxxxxxx, acme@xxxxxxxxxx, namhyung@xxxxxxxxxx, alexander.shishkin@xxxxxxxxxxxxxxx, jolsa@xxxxxxxxxx, irogers@xxxxxxxxxx, adrian.hunter@xxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-perf-users@xxxxxxxxxxxxxxx, linux-doc@xxxxxxxxxxxxxxx, kvmarm@xxxxxxxxxxxxxxx
X-SA-Exim-Mail-From: maz@xxxxxxxxxx
X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Tue, 03 Jun 2025 10:50:23 +0100,
James Clark <james.clark@xxxxxxxxxx> wrote:
On 29/05/2025 5:56 pm, Marc Zyngier wrote:
> On Thu, 29 May 2025 12:30:27 +0100,
> James Clark <james.clark@xxxxxxxxxx> wrote:
>>
>> SPE data source filtering (SPE_FEAT_FDS) adds a new register
>> PMSDSFR_EL1, add the trap configs for it.
>>
>> Signed-off-by: James Clark <james.clark@xxxxxxxxxx>
>> ---
>> arch/arm64/kvm/emulate-nested.c | 1 +
>> arch/arm64/kvm/sys_regs.c | 1 +
>> 2 files changed, 2 insertions(+)
>>
>> diff --git a/arch/arm64/kvm/emulate-nested.c b/arch/arm64/kvm/emulate-nested.c
>> index 0fcfcc0478f9..05d3e6b93ae9 100644
>> --- a/arch/arm64/kvm/emulate-nested.c
>> +++ b/arch/arm64/kvm/emulate-nested.c
>> @@ -1169,6 +1169,7 @@ static const struct encoding_to_trap_config encoding_to_cgt[] __initconst = {
>> SR_TRAP(SYS_PMSIRR_EL1, CGT_MDCR_TPMS),
>> SR_TRAP(SYS_PMSLATFR_EL1, CGT_MDCR_TPMS),
>> SR_TRAP(SYS_PMSNEVFR_EL1, CGT_MDCR_TPMS),
>> + SR_TRAP(SYS_PMSDSFR_EL1, CGT_MDCR_TPMS),
>> SR_TRAP(SYS_TRFCR_EL1, CGT_MDCR_TTRF),
>> SR_TRAP(SYS_TRBBASER_EL1, CGT_MDCR_E2TB),
>> SR_TRAP(SYS_TRBLIMITR_EL1, CGT_MDCR_E2TB),
>> diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c
>> index 5dde9285afc8..9f544ac7b5a6 100644
>> --- a/arch/arm64/kvm/sys_regs.c
>> +++ b/arch/arm64/kvm/sys_regs.c
>> @@ -2956,6 +2956,7 @@ static const struct sys_reg_desc sys_reg_descs[] = {
>> { SYS_DESC(SYS_PMBLIMITR_EL1), undef_access },
>> { SYS_DESC(SYS_PMBPTR_EL1), undef_access },
>> { SYS_DESC(SYS_PMBSR_EL1), undef_access },
>> + { SYS_DESC(SYS_PMSDSFR_EL1), undef_access },
>
> PMSDSFR_EL1 has an offset in the VNCR page (0x858), and must be
> described as such. This is equally true for a bunch of other
> SPE-related registers, so you might as well fix those while you're at
> it.
>
> Thanks,
>
> M.
>
I got a bit stuck with what that would look like with registers that
are only undef in case there was something that I missed, but do I
just document the offsets?
+++ b/arch/arm64/include/asm/vncr_mapping.h
@@ -87,6 +87,8 @@
#define VNCR_PMSICR_EL1 0x838
#define VNCR_PMSIRR_EL1 0x840
#define VNCR_PMSLATFR_EL1 0x848
+#define VNCR_PMSNEVFR_EL1 0x850
+#define VNCR_PMSDSFR_EL1 0x858
This should be enough.
+++ b/arch/arm64/include/asm/kvm_host.h
@@ -596,6 +596,16 @@ enum vcpu_sysreg {
VNCR(ICH_HCR_EL2),
VNCR(ICH_VMCR_EL2),
+ /* SPE Registers */
+ VNCR(PMBLIMITR_EL1),
+ VNCR(PMBPTR_EL1),
+ VNCR(PMBSR_EL1),
+ VNCR(PMSCR_EL1),
+ VNCR(PMSEVFR_EL1),
+ VNCR(PMSICR_EL1),
+ VNCR(PMSIRR_EL1),
+ VNCR(PMSLATFR_EL1),
I don't see a point in having those until we actually have SPE support
for guests, if ever, as these will potentially increase the size of
the vcpu sysreg array for no good reason.
And then sys_reg_descs[] remain as "{ SYS_DESC(SYS_PMBLIMITR_EL1),
undef_access }," rather than EL2_REG_VNCR() because we don't actually
want to change to bad_vncr_trap()?
This seem OK for now. We may want to refine this in the future though,
as these registers cannot trap when NV is enabled. Yes, this is a bug
in the architecture.
There are some other parts about fine grained traps and res0 bits for
NV, but they all already look to be setup correctly. Except
HDFGRTR2_EL2.nPMSDSFR_EL1, but it's inverted, none of the FGT2 traps
are configured currently and PMSDSFR_EL1 is already trapped by
MDCR_EL2 anyway.
Can you elaborate on that? We have:
SR_FGT(SYS_PMSDSFR_EL1, HDFGRTR2, nPMSDSFR_EL1, 0),
which seems to match the spec.
We also have full support for FEAT_FGT2 already (even if we have no
support for the stuff they trap).
Thanks,
M.
--
Jazz isn't dead. It just smells funny.
Return-Path: <linux-kernel+bounces-673455-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id E72B841E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:34:02 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id A485E7ABAB6
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:29:07 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id CCE771A3A8A;
Wed, 4 Jun 2025 15:26:43 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="k7+i+946"
Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7323A18B47E;
Wed, 4 Jun 2025 15:26:41 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749050803; cv=none; b=mB+q9UMvOAu0y9YyFb1XHvs+vGKuEWOcfqpTewutmoqY/hku9HuCwETNpUZ7AqRepV5FCd/maz55m9lYExlsRX3QAPIUNaka+UXaA+JU/iVnb3AKnyj1gcU01jvc0SAP0YPYRAI9n5qWpoYGBzuzsU8b+EFieSWCcCJ/9tzF7to=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749050803; c=relaxed/simple;
bh=Oh8DXHV7AOdcNq84qhmXKNanG55G45tVRqaWXhrjhjA=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=nK9b2gRYAIFNj+pBf3u9OGsFqk68kWcv6rj3AUIPU5x+hOImeGzS8cu+IIrlxz/46DUi29voqO/fd8T5SoRBFVlNvMMKDGwEmN92r8/5GVGly8K9x/61OOVnc0Ae1WPqZaILVXv4QAezkprGTGHUYPeWiIKkAS787AkWCnkBHYI=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=k7+i+946; arc=none smtp.client-ip=192.198.163.19
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com
Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
t=1749050802; x=1780586802;
h=date:from:to:cc:subject:message-id:references:
mime-version:content-transfer-encoding:in-reply-to;
bh=Oh8DXHV7AOdcNq84qhmXKNanG55G45tVRqaWXhrjhjA=;
b=k7+i+9460YyC7xnNKKOY+Vu1tVsV1uF3wQYQDWydiFAtcjM5xhb/pk93
4FOIvk9abLbdkIn7Jb1zgF3oHE20Pndp2kByi+nndluggR7lHR+ky1czC
Xy7jF47eNIZQM3RKC+K3vZ98KTXvYxD9TMgg3acW05bjmcJ+XYW1Xmifc
DcpvUL15QV58OnPVt7MNrlPWZZXma/NP6Q5Mr3BhajP/5NVgXuaEzL8o9
C63pbqSqV1IENU6rf4JE27fmgEYr5Ch5qSu1r93wKbEXUy6m6QSRzDcSD
4mYoxSsucGcqZaj/+LguFqyA3yCdCl67DAi2xgaaGxnyI3Vl15w8CA+Wh
g==;
X-CSE-ConnectionGUID: sMx/LoGoTEe3/CfhBphkww==
X-CSE-MsgGUID: cfmWisK7RKegq+BkUJN7KQ==
X-IronPort-AV: E=McAfee;i="6800,10657,11454"; a="50255997"
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="50255997"
Received: from fmviesa007.fm.intel.com ([10.60.135.147])
by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 08:26:41 -0700
X-CSE-ConnectionGUID: m/hJNN4xS6qWugHkSbCL4A==
X-CSE-MsgGUID: nzEUE72oQYizrDPUsqdslA==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="145183241"
Received: from smile.fi.intel.com ([10.237.72.52])
by fmviesa007.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 08:26:35 -0700
Received: from andy by smile.fi.intel.com with local (Exim 4.98.2)
(envelope-from <andriy.shevchenko@xxxxxxxxxxxxxxx>)
id 1uMq0e-00000003aXx-3GkI;
Wed, 04 Jun 2025 18:26:32 +0300
Date: Wed, 4 Jun 2025 18:26:32 +0300
From: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
To: Pop Ioan Daniel <pop.ioan-daniel@xxxxxxxxxx>
Cc: Lars-Peter Clausen <lars@xxxxxxxxxx>,
Michael Hennerich <Michael.Hennerich@xxxxxxxxxx>,
Jonathan Cameron <jic23@xxxxxxxxxx>,
David Lechner <dlechner@xxxxxxxxxxxx>,
Nuno =?iso-8859-1?Q?S=E1?= <nuno.sa@xxxxxxxxxx>,
Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>,
Sergiu Cuciurean <sergiu.cuciurean@xxxxxxxxxx>,
Dragos Bogdan <dragos.bogdan@xxxxxxxxxx>,
Antoniu Miclaus <antoniu.miclaus@xxxxxxxxxx>,
Olivier Moysan <olivier.moysan@xxxxxxxxxxx>,
Javier Carrasco <javier.carrasco.cruz@xxxxxxxxx>,
Matti Vaittinen <mazziesaccount@xxxxxxxxx>,
Tobias Sperling <tobias.sperling@xxxxxxxxxxx>,
Alisa-Dariana Roman <alisadariana@xxxxxxxxx>,
Marcelo Schmitt <marcelo.schmitt@xxxxxxxxxx>,
Esteban Blanc <eblanc@xxxxxxxxxxxx>, linux-iio@xxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
Subject: Re: [PATCH v6 5/5] iio: adc: ad7405: add ad7405 driver
Message-ID: <aEBlqPqxd0-C7j63@xxxxxxxxxxxxxxxxxx>
References: <20250604133413.1528693-1-pop.ioan-daniel@xxxxxxxxxx>
<20250604133413.1528693-6-pop.ioan-daniel@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <20250604133413.1528693-6-pop.ioan-daniel@xxxxxxxxxx>
Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 04:34:07PM +0300, Pop Ioan Daniel wrote:
Add support for the AD7405/ADUM770x, a high performance isolated ADC,
1-channel, 16-bit with a second-order Σ-Δ modulator that converts an
analog input signal into a high speed, single-bit data stream.
Hmm...
Have you seen these?
https://lore.kernel.org/linux-iio/20250602134349.1930891-1-pop.ioan-daniel@xxxxxxxxxx/T/#m114842887de000752231d69bc0939445b8720382
https://lore.kernel.org/linux-iio/20250602134349.1930891-1-pop.ioan-daniel@xxxxxxxxxx/T/#m2d90d77cd4fb1444c0c51e006b53d82ab33c27ac
--
With Best Regards,
Andy Shevchenko
Return-Path: <linux-kernel+bounces-673456-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id D760141E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:34:32 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 139517ABB8B
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:29:20 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 97CA01ACEDF;
Wed, 4 Jun 2025 15:26:56 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="myovsk6y"
Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id B831C1AA1D5
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:26:53 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749050815; cv=none; b=h6NdT7Ou3QD4Ns3da6HQ8MaTUsalGqWYgUtwSbrmGhoa1IyZs6rRWx4yzVdkFQ13eZNsjtpre/x/cBtmJzIuidUfaDFrL71Qfh/tEqvFHKDuzaA8mzrTyw63bvO+zlKs9VcjCwwLm5GC0g7rPmE1efxKZ/NxlQ0/bOsUzxDwNVI=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749050815; c=relaxed/simple;
bh=ydc41CzZQexP8/Sacr0EAJ3wMyyt4S73arwwMKvXBWQ=;
h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References:
Content-Type:MIME-Version; b=P3RpYbMwS1sxPxDKEMbW6eQwPakaKBXALhJg6FMFBzD/lKWRuZnlwSXEVVmjqDPFL6Y1VpqkbqDVvfY1rq4VFZxgzccnev5JO4Vx2z5TkMRqUu3H+vIMHQYvQe0HKl//oCZ4LooVdyuNeh3HAplBfC75Y97cNNrtXjoJAGU6ubs=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=myovsk6y; arc=none smtp.client-ip=209.85.128.50
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org
Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-442f4a3a4d6so226355e9.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 08:26:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=linaro.org; s=google; t=1749050812; x=1749655612; darn=vger.kernel.org;
h=mime-version:user-agent:content-transfer-encoding:references
:in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject
:date:message-id:reply-to;
bh=ydc41CzZQexP8/Sacr0EAJ3wMyyt4S73arwwMKvXBWQ=;
b=myovsk6y0eaUHN1jjmHRGQB9M6ZIgguzKGKAqkcCe9z3Rs5hR1mIissMVdo1ISx3b3
vAnxjBWmHfqk1kwzeJGPU31+h3i+dTpSfPctX+b3agToNoClRmduwyvSWe7YYML963Oo
060mfrGxdY7/beWFCPRIeLJom30qSmdy2Nj+63ZZY02iGSJmyYUDi6bSK3p5ePpHfriF
mU6Ufh2AdEFJ+jt3nsHUbjqxxEQJswSK9o8sxxUDrMGZsOcMW7cTsNlI7ThdB3KTBrK6
KeDK4gJerLmRl3SlvDHsMXSSg9sI7BPDTo2tG4ilzbk+FhtluOKtqb+Ms6oSnkKpIx4j
Dfkw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749050812; x=1749655612;
h=mime-version:user-agent:content-transfer-encoding:references
:in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state
:from:to:cc:subject:date:message-id:reply-to;
bh=ydc41CzZQexP8/Sacr0EAJ3wMyyt4S73arwwMKvXBWQ=;
b=Y1JorqkMi4oE2U4MSU9VV7aYAAh/El4tjr7ebah8oK8taSIxopQQ3UyXOXgveXh/1Y
3Q+cTHX/k4ngQ7YVgufMX5mMijuc+sv/VkTh5iR2+zVkXWM1roaFENNrT/xGPuqFiWpF
tUWf4120DxDqkr7nEiqTXrqGf8+YFXCOvtsQZrzvSH8C4MFy/m1tpUfv1Spdov7xkDlp
Z5gQQxiVGbTU8Oj0iU+DxtOsyqi6gnp4NOJfBJAlGZPjWdLui1Y/cf65JT7weE5JMrqF
CjUNR4HU5BDTSeSKELjWg87o4ywUVqs1Nguav8dHPSNhPnC4BGzWEGqXd0hkiFb2FPfQ
Vp+g==
X-Forwarded-Encrypted: i=1; AJvYcCWYrtSafDPl4tKLfqhcktgcTLk/46+kW5QQFVZsIyhAEF01K7UqX75qG5PoEoIJZZNadYf1dzuUx0svgRE=@vger.kernel.org
X-Gm-Message-State: AOJu0YzPg7eskSDrbN5dNQbBG4ij7ytYL6K/Q+TyOveXgwYP9YoPTWXy
puxQrqHv+mH8Nh4DeKKGicv6+8YDlR4OOvE0Aiv9A+2tdKVqAuucVnm178cU09Mzr84=
X-Gm-Gg: ASbGncthXCcIiWAZkGKh05kxmcgA18uNeLVJqqj33wxrKnajNBG4qXVRP3T+g/MyIpA
ccObcqnyNdxWaiLdjdKrXCZuMO/RUsq9o9jyJPKl34dC6urV+hEgLbGwnrGa+WoUwMkyP7vQaYF
aZKCqK/GdaXHYkilJEHr7WC6wW1hbZo5Q47yDgy1aXw8OcxDeCS+l+u5nfhkheFyowoURyrA2V3
I++cErxcEE9B838tw/zVW+gAdLs67ghS6YF0OKDSYXXqvsmBQ4x/iTh3YvKlsMp92ACZrmngMvj
ipFaDZ56klCEAnECbrBO1j5hjOoArsmJckD0QxjFQJMInBSs82Nqt6U=
X-Google-Smtp-Source: AGHT+IEiwU1KAlbeFjdqPSk2zSDfPInt5xOQP3jHIbi9KVFJaCIn7u8JF88wihm+L69YbxxZtvGJmw==
X-Received: by 2002:a05:600c:8b6d:b0:43d:fa5f:7d30 with SMTP id 5b1f17b1804b1-451efed66f4mr33677765e9.16.1749050812086;
Wed, 04 Jun 2025 08:26:52 -0700 (PDT)
Received: from draszik.lan ([80.111.64.44])
by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a526057278sm280787f8f.63.2025.06.04.08.26.51
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 08:26:51 -0700 (PDT)
Message-ID: <963bbf8db71efc0d729bb9141c133df2c56881fc.camel@xxxxxxxxxx>
Subject: Re: [PATCH 06/17] dt-bindings: firmware: google,gs101-acpm-ipc:
update PMIC examples
From: =?ISO-8859-1?Q?Andr=E9?= Draszik <andre.draszik@xxxxxxxxxx>
To: Tudor Ambarus <tudor.ambarus@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>, Krzysztof Kozlowski <krzk@xxxxxxxxxx>,
Liam Girdwood <lgirdwood@xxxxxxxxx>, Mark Brown <broonie@xxxxxxxxxx>, Lee
Jones <lee@xxxxxxxxxx>, Linus Walleij <linus.walleij@xxxxxxxxxx>, Bartosz
Golaszewski <brgl@xxxxxxxx>
Cc: Peter Griffin <peter.griffin@xxxxxxxxxx>, Will McVicker
<willmcvicker@xxxxxxxxxx>, kernel-team@xxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-samsung-soc@xxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-gpio@xxxxxxxxxxxxxxx
Date: Wed, 04 Jun 2025 16:26:50 +0100
In-Reply-To: <20250604-s2mpg1x-regulators-v1-6-6038740f49ae@xxxxxxxxxx>
References: <20250604-s2mpg1x-regulators-v1-0-6038740f49ae@xxxxxxxxxx>
<20250604-s2mpg1x-regulators-v1-6-6038740f49ae@xxxxxxxxxx>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
User-Agent: Evolution 3.55.2-1
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, 2025-06-04 at 16:25 +0100, Andr=C3=A9 Draszik wrote:
In a typical system using the Samsung S2MPG10 PMIC, an S2MPG11 is used
as a sub-PMIC.
=20
The interface for both is the ACPM firmware protocol, so update the
example here to describe the connection for both.
=20
Signed-off-by: Andr=C3=A9 Draszik <andre.draszik@xxxxxxxxxx>
---
=C2=A0.../bindings/firmware/google,gs101-acpm-ipc.yaml=C2=A0=C2=A0 | 40 +=
+++++++++++++++++++--
=C2=A01 file changed, 37 insertions(+), 3 deletions(-)
=20
diff --git a/Documentation/devicetree/bindings/firmware/google,gs101-acpm=
-ipc.yaml
b/Documentation/devicetree/bindings/firmware/google,gs101-acpm-ipc.yaml
index 62a3a7dac5bd250a7f216c72f3315cd9632d93e1..408cf84e426b80b6c06e69fda=
87d0f8bfc61498d 100644
--- a/Documentation/devicetree/bindings/firmware/google,gs101-acpm-ipc.ya=
ml
+++ b/Documentation/devicetree/bindings/firmware/google,gs101-acpm-ipc.ya=
ml
@@ -36,6 +36,15 @@ properties:
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 compatible:
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 const: samsung,s2mpg10-p=
mic
=C2=A0
+=C2=A0 pmic2:
+=C2=A0=C2=A0=C2=A0 description: Child node describing the sub PMIC.
+=C2=A0=C2=A0=C2=A0 type: object
+=C2=A0=C2=A0=C2=A0 additionalProperties: true
+
+=C2=A0=C2=A0=C2=A0 properties:
+=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 compatible:
+=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 const: samsung,s2mpg11-pmic
+
Since we have two PMICs here, but can not use the 'reg' property (as the
addressing is based on software, i.e. the ACPM firmware), I've opted
for 'pmic' (existing) and 'pmic2' (new) as nodenames.
Maybe 'pmic-main' and 'pmic-sub' would be more appropriate, but 'pmic' is a
bit more standard I believe. I'm open for better suggestions :-)=20
Cheers,
Andre'
Return-Path: <linux-kernel+bounces-673462-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 712DA41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:34:34 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 052CF3A8EA8
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:32:21 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id A146D19995E;
Wed, 4 Jun 2025 15:32:36 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="B6oP9n3H"
Received: from casper.infradead.org (casper.infradead.org [90.155.50.34])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id BF751DDC1;
Wed, 4 Jun 2025 15:32:33 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749051155; cv=none; b=nEKTrhTA7NUYgn6B+txtKVCrbE8W+nhl6KOECTJV/rYl4sSbKNMPD6aPiYGNV+53gKU1ApoC9odf1BnKf379MV+R24iN1bxHtkQdu6JK+OC6LbMeL3vkS7Cia7eINgthL0QfjuIk/WqOTmq45rzgBDfXYPtxQcvazjdxKZaR3JU=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749051155; c=relaxed/simple;
bh=Oxj0L0vMUeF1rATIob8FyEydepIqKducGZ1bw6oENWI=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=u4pFkqYiNXbX5m/Sjpzd3k2T2O7Vhi8+GNbPD4grKpOi2x8tJPtrGSlaqSDMARNz+CdgLodupmAjCrDsLmPOAGwaJ9SvTlOH2X1LU/FCs4va33GXCrtli9RwfhAXzcMHw5hiutcot179Kk8wH/ylliRQnLJkmWVNXMyJ0W/0SG4=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=B6oP9n3H; arc=none smtp.client-ip=90.155.50.34
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org
Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version:
References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:
Content-Transfer-Encoding:Content-ID:Content-Description;
bh=zSIx60s8W1RWmCAF04ar6XaDTCMxl8+rRsS7EF61guU=; b=B6oP9n3HnEWwmroXUatjSLp0PB
NtpK3WbsPpN8PGKdq4svfO035Bd6PjgODgScaDHOjm5fCSfybX4KxecZlOhU5NB5Lzifu0guXSMQ8
M+GjaTu2GusJh0wpNjx5civ2v535J9ZftwnpJa8/RbmiBq81Lx+ejCGF6kKjR50sZvmw0y5HC9V1Y
rYksRqKo6BWLnF2VO7fKZXe937u3FN6t9MXvcf8/DqXS6xRJn6k1ZQz+ZRZGaVM7qoyK6lKbU7mVG
lYfiEmEUWU8yHX+zaABzBqHAcXmAiDZvvLqmHkTW1b+dBS0P9bkL3EEoD2fcFjNrrUfhGEX2hssVb
fwxGiKsA==;
Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net)
by casper.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux))
id 1uMq6G-00000003ED3-1d8p;
Wed, 04 Jun 2025 15:32:20 +0000
Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000)
id BD968300787; Wed, 4 Jun 2025 17:32:19 +0200 (CEST)
Date: Wed, 4 Jun 2025 17:32:19 +0200
From: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
To: Mark Rutland <mark.rutland@xxxxxxx>
Cc: Baisheng Gao <baisheng.gao@xxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>,
Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>,
Namhyung Kim <namhyung@xxxxxxxxxx>,
Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>,
Jiri Olsa <jolsa@xxxxxxxxxx>, Ian Rogers <irogers@xxxxxxxxxx>,
Adrian Hunter <adrian.hunter@xxxxxxxxx>,
"reviewer:PERFORMANCE EVENTS SUBSYSTEM" <kan.liang@xxxxxxxxxxxxxxx>,
"open list:PERFORMANCE EVENTS SUBSYSTEM" <linux-perf-users@xxxxxxxxxxxxxxx>,
"open list:PERFORMANCE EVENTS SUBSYSTEM" <linux-kernel@xxxxxxxxxxxxxxx>,
cixi.geng@xxxxxxxxx, hao_hao.wang@xxxxxxxxxx
Subject: Re: [PATCH] perf/core: Handling the race between exit_mmap and perf
sample
Message-ID: <20250604153219.GJ39944@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20250424025429.10942-1-baisheng.gao@xxxxxxxxxx>
<aEBSt2LN7YhxYX7N@J2N7QTR9R3>
<20250604142437.GM38114@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
<aEBeRfScZKD-7h5u@J2N7QTR9R3>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <aEBeRfScZKD-7h5u@J2N7QTR9R3>
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 03:55:01PM +0100, Mark Rutland wrote:
I think we might need something in the perf core for cpu-bound events, assuming
those can also potentially make samples.
From a quick scan of perf_event_sample_format:
PERF_SAMPLE_IP // safe
PERF_SAMPLE_TID // safe
PERF_SAMPLE_TIME // safe
PERF_SAMPLE_ADDR // ???
Safe, set by driver, or 0.
PERF_SAMPLE_READ // ???
This is basically read(2) on a fd, but in sample format. Only the count
values. This good.
PERF_SAMPLE_CALLCHAIN // may access mm
Right.
PERF_SAMPLE_ID // safe
PERF_SAMPLE_CPU // safe
PERF_SAMPLE_PERIOD // safe
PERF_SAMPLE_STREAM_ID // ???
safe
PERF_SAMPLE_RAW // ???
safe, this is random data returned by the driver
PERF_SAMPLE_BRANCH_STACK // safe
PERF_SAMPLE_REGS_USER // safe
PERF_SAMPLE_STACK_USER // may access mm
PERF_SAMPLE_WEIGHT // ???
PERF_SAMPLE_DATA_SRC // ???
Both should be safe, driver sets them.
PERF_SAMPLE_IDENTIFIER // safe
PERF_SAMPLE_TRANSACTION // ???
Safe, another random thing the driver can set. This was for
transactional memory stuff.
PERF_SAMPLE_REGS_INTR // safe
PERF_SAMPLE_PHYS_ADDR // safe; handles mm==NULL && addr < TASK_SIZE
PERF_SAMPLE_AUX // ???
Safe, should be driver, PT for Intel, or that CoreSight for ARM.
PERF_SAMPLE_CGROUP // safe
PERF_SAMPLE_DATA_PAGE_SIZE // partial; doesn't check addr < TASK_SIZE
PERF_SAMPLE_CODE_PAGE_SIZE // partial; doesn't check addr < TASK_SIZE
But does use init_mm when !mm, perf_get_page_size().
PERF_SAMPLE_WEIGHT_STRUCT // ???
Safe, driver bits again.
... I think all the dodgy cases use mm somehow, so maybe the perf core
should check for current->mm?
This then... I suppose.
---
diff --git a/kernel/events/core.c b/kernel/events/core.c
index f34c99f8ce8f..49944e4ec3e7 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -7439,6 +7439,10 @@ perf_sample_ustack_size(u16 stack_size, u16 header_size,
if (!regs)
return 0;
+ /* No mm, no stack, no dump. */
+ if (!current->mm)
+ return 0;
+
/*
* Check if we fit in with the requested stack size into the:
* - TASK_SIZE
@@ -8153,6 +8157,9 @@ perf_callchain(struct perf_event *event, struct pt_regs *regs)
if (!kernel && !user)
return &__empty_callchain;
+ if (!current->mm)
+ user = false;
+
callchain = get_perf_callchain(regs, 0, kernel, user,
max_stack, crosstask, true);
return callchain ?: &__empty_callchain;
Return-Path: <linux-kernel+bounces-673463-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id B18CB41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:34:56 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 9CBB83A6AC5
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:34:23 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id BAD71199237;
Wed, 4 Jun 2025 15:34:37 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="aHSdrBfd"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1502417332C
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:34:34 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749051276; cv=none; b=OMirVx7WIprLlCf0NpELcZDF10/mVeBZQTFzmrGE+sa1XHU32CQM9vzL0dntp9SiPDkLhqxv8TaAs3EhOM/ofeCt6c1ajB2uQL1ro/ZV4aYlzxg1DyiSm7hLXG/JWf5SuOZ7ZhKMOXWQFu6tC61Ssi022f0C+RAQ1zQ6v91Zf8E=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749051276; c=relaxed/simple;
bh=qTXEgU4faK8V3+o1webIL89G6tLPcijOJ2B4kkypv04=;
h=From:In-Reply-To:References:To:Cc:Subject:MIME-Version:
Content-Type:Date:Message-ID; b=SXD4mIQ1Pp7OnM3ZpwjMXDib7/ei+ms022T10sXtkmHj3JZb0MsMdu2lBWjYhnOHRyI0LPF68w1uPDHttFVupS1nY1t554G0wtKR1DfEeBwZo5/B+Sh4vrq+Sr0jjw0SBA/TZ1K3coF4qDSQ7qxwQNmi2ZJUZSt0z8y6qcOxoKA=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=aHSdrBfd; arc=none smtp.client-ip=170.10.133.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749051274;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
in-reply-to:in-reply-to:references:references;
bh=o2KiML0jpnv35I2ryANTISLMOhOT0NTQ+BIj5SUwYgU=;
b=aHSdrBfdpWo+VlBMNNWLM7vQrYqmLAhHjLfHW3BIKRcNXwgCJ+8JB/VLGOI/IVOhV0Xs+6
p9/Z3AUkfvexKcKsu8azXafIuEEjYMHYLyBThi1g7u61UqMOFgFmiudpSUxqKvtK+9wpGL
wapQT8R9p1LTdooCJyidUqYer8+IYk0=
Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com
(ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by
relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,
cipher=TLS_AES_256_GCM_SHA384) id us-mta-16-NZydtSNtNuymBvMkhyhlXA-1; Wed,
04 Jun 2025 11:34:31 -0400
X-MC-Unique: NZydtSNtNuymBvMkhyhlXA-1
X-Mimecast-MFC-AGG-ID: NZydtSNtNuymBvMkhyhlXA_1749051269
Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
(No client certificate requested)
by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 41659195608C;
Wed, 4 Jun 2025 15:34:29 +0000 (UTC)
Received: from warthog.procyon.org.uk (unknown [10.42.28.2])
by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id DCD6919560AE;
Wed, 4 Jun 2025 15:34:26 +0000 (UTC)
Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley
Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United
Kingdom.
Registered in England and Wales under Company Registration No. 3798903
From: David Howells <dhowells@xxxxxxxxxx>
In-Reply-To: <CAHS8izMMU8QZrvXRiDjqwsBg_34s+dhvSyrU7XGMBuPF6eWyTA@xxxxxxxxxxxxxx>
References: <CAHS8izMMU8QZrvXRiDjqwsBg_34s+dhvSyrU7XGMBuPF6eWyTA@xxxxxxxxxxxxxx> <770012.1748618092@xxxxxxxxxxxxxxxxxxxxxx>
To: Mina Almasry <almasrymina@xxxxxxxxxx>
Cc: dhowells@xxxxxxxxxx, willy@xxxxxxxxxxxxx, hch@xxxxxxxxxxxxx,
Jakub Kicinski <kuba@xxxxxxxxxx>, Eric Dumazet <edumazet@xxxxxxxxxx>,
netdev@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
Subject: Re: Device mem changes vs pinning/zerocopy changes
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-ID: <1098852.1749051265.1@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 16:34:25 +0100
Message-ID: <1098853.1749051265@xxxxxxxxxxxxxxxxxxxxxx>
X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Mina Almasry <almasrymina@xxxxxxxxxx> wrote:
Hi David! Yes, very happy to collaborate.
:-)
FWIW, my initial gut feeling is that the work doesn't conflict that much.
The tcp devmem netmem/net_iov stuff is designed to follow the page stuff,
and as the usage of struct page changes we're happy moving net_iovs and
netmems to do the same thing. My read is that it will take a small amount of
extra work, but there are no in-principle design conflicts, at least AFAICT
so far.
The problem is more the code you changed in the current merge window I'm also
wanting to change, so merge conflicts will arise.
However, I'm also looking to move the points at which refs are taken/dropped
which will directly inpinge on the design of the code that's currently
upstream.
Would it help if I created some diagrams to show what I'm thinking of?
I believe the main challenge here is that there are many code paths in
the net stack that expect to be able to grab a ref on skb frags. See
all the callers of skb_frag_ref/skb_frag_unref:
tcp_grow_skb, __skb_zcopy_downgrade_managed, __pskb_copy_fclone,
pskb_expand_head, skb_zerocopy, skb_split, pksb_carve_inside_header,
pskb_care_inside_nonlinear, tcp_clone_payload, skb_segment.
Oh, yes, I've come to appreciate that well. A chunk of that can actually go
away, I think.
I think to accomplish what you're describing we need to modify
skb_frag_ref to do something else other than taking a reference on the
page or net_iov. I think maybe taking a reference on the skb itself
may be acceptable, and the skb can 'guarantee' that the individual
frags underneath it don't disappear while these functions are
executing.
Maybe. There is an issue with that, though it may not be insurmountable: If a
userspace process does, say, a MSG_ZEROCOPY send of a page worth of data over
TCP, under a typicalish MTU, say, 1500, this will be split across at least
three skbuffs.
This would involve making a call into GUP to get a pin - but we'd need a
separate pin for each skbuff and we might (in fact we currently do) end up
calling into GUP thrice to do the address translation and page pinning.
What I want to do is to put this outside of the skbuff so that GUP pin can be
shared - but if, instead, we attach a pin to each skbuff, we need to get that
extra pin in some way. Now, it may be reasonable to add a "get me an extra
pin for such-and-such a range" thing and store the {physaddr,len} in the
skbuff fragment, but we also have to be careful not to overrun the pin count -
if there's even a pin count per se.
But devmem TCP doesn't get much in the way here, AFAICT. It's really
the fact that so many of the networking code paths want to obtain page
refs via skb_frag_ref so there is potentially a lot of code to touch.
Yep.
But, AFAICT, skb_frag_t needs a struct page inside of it, not just a
physical address. skb_frags can mmap'd into userspace for TCP
zerocopy, see tcp_zerocopy_vm_insert_batch (which is a very old
feature, it's not a recent change). There may be other call paths in
the net stack that require a full page and just a physical address
will do. (unless somehow we can mmap a physical address to the
userspace).
Yeah - I think this needs very careful consideration and will need some
adjustment. Some of the pages that may, in the future, get zerocopied or
spliced into the socket *really* shouldn't be spliced out into some random
process's address space - and, in fact, may not even have a refcount (say they
come from the slab). Basically, TCP has implemented async vmsplice()...
Is struct net_txbuf intended to replace struct sk_buff in the tx path
only? If so, I'm not sure that works.
No - the idea is that it runs a parallel track to it and holds "references" to
the buffer memory. This is then divided up amongst a number of sk_buffs that
hold refs on the first txbuf that it uses memory from.
txbufs would allow us to take and hold a single ref or pin (or even nothing,
just a destructor) on each piece of supplied buffer memory and for that to be
shared between a sequence of skbufs.
Currently TX and RX memory share a single data structure (sk_buff), and I
believe that is critical.
Yep. And we need to keep sk_buff because an sk_buff is more than just a
memory pinning device - it also retains the metadata for a packet.
... So I think, maybe, instead of introducing a new struct, you have to make
the modifications you envision to struct sk_buff itself?
It may be possible. But see above. I want to be able to share pins between
sk_buffs.
OK, you realize that TX packets can be forwarded to RX. The opposite
is true, RX can be forwarded to TX. And it's not just AF_UNIX and
loopback. Packets can be forwarded via ip forwarding, and tc, and
probably another half dozen features in the net stack I don't know
about.
Yeah, I'd noticed that.
I think you need to modify the existing sk_buff. I think adding
a new struct and migrating the entire net stack to use that is a bit
too ambitious. But up to you. Just my 2 cents here.
Return-Path: <linux-kernel+bounces-673464-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 069F141E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:35:17 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id DAA063A7C0C
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:34:38 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 7EE34199FAC;
Wed, 4 Jun 2025 15:34:47 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="HeT3cHDA"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id C2E0318F2DF
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:34:43 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749051286; cv=none; b=tDUtbRNhPzi7KCW3jlorqgaNJ7ddL16R3KpuqtE0CmpDODI3Jwktpp0FFLlG0MniLO4Z/TskyUsfWq3D00Uw3lcspIMDxcLk4a3bEns805rFRZrZDsqIubBaUNjGO4Z4mZOm3hzgqFPDRK/GJ3erhGMctpKJ6991v60npIackR8=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749051286; c=relaxed/simple;
bh=RINTIBLzTN0ku0aScR3FwXlQneypdbeTTT4uXBoDKc8=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=HTSenqgLHsSM2WqmQgx92x/RQrCP3FZlNuVvb2gWH9w5nnqNhKgZe9ItWl5J4JRJgAnwwH67yypYW/Orcx54EPjAGAvHo3KTc8J7kJuFWHvdpLZPIAoBCoqNcrhRHtnm6Q/0CcCZV6lavdIXGiKFmyu6EEyHrD8QQSNLxUEuUOg=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=HeT3cHDA; arc=none smtp.client-ip=170.10.129.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749051282;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
in-reply-to:in-reply-to:references:references;
bh=mfynHbafjDR5XmPD+vF/S3IYTbhu9p0ot28pFP/ysEk=;
b=HeT3cHDAedqCrBQNEAYuDLM8o6Ala9069kGBTszfgYRZ4ve6mZ4R/sxk96T+noTJsWtqIy
vLOBI7ihvkhuS9c5CvEW9O7fxSnSVFNuaiM3PnOM7Kv/cUFaPNzhu9fWpRef726sWT7L5q
7mSD0bc/PQdoTKsF+3A7E6qDnplPSUA=
Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com
[209.85.219.70]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-107-5_9r__9CM6ygdd1EqhyVmw-1; Wed, 04 Jun 2025 11:34:41 -0400
X-MC-Unique: 5_9r__9CM6ygdd1EqhyVmw-1
X-Mimecast-MFC-AGG-ID: 5_9r__9CM6ygdd1EqhyVmw_1749051281
Received: by mail-qv1-f70.google.com with SMTP id 6a1803df08f44-6faeebe9c5bso197316d6.2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 08:34:41 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749051281; x=1749656081;
h=in-reply-to:content-disposition:mime-version:references:message-id
:subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to;
bh=mfynHbafjDR5XmPD+vF/S3IYTbhu9p0ot28pFP/ysEk=;
b=UtaltvGGo8RCmFSeRL2x/rc7qPdIpZJjxqxmhNVNzlLv4nT6+VoRtozs13ZF66co0F
e6CVXXNEGrkE8wDQ9PW5TEtShD7hV8LHwy+dsBFmkXCUmNNWLon1b/zm3zPPpzelHor3
bbiUTKIdS2n3fDcETnQ67tyIkANYwjOgZfC3rRr5KmSc7EG1fhPEboRhdqLODjZoD3Bh
DumGR/YcQ/fk6f6dwaFnytI3im8cYbPFVXDZ1frhBJMYVfTyLIVjMCp89H0OomhK3SRc
pmhjhALRfmEV6SlqBdp9d3iQS8aW4s444UvcRcRNCA/aTWnH1qduB63owcJoers4ZYVv
To0w==
X-Forwarded-Encrypted: i=1; AJvYcCVi2448Heco8nEjDdZH87a+GPOc4//Q5SASfXPnBICGh2Wr8sEGjWor1Kxo7bCdLYvLDZ8dS9ou158xVyM=@vger.kernel.org
X-Gm-Message-State: AOJu0YxsuYZTqI+ssyb4pVVey2wKMMzofaoJ39Zy6SdWJs8CQcvTdX3R
mW9/Lbuaev72P4Ks7gHqK0APDYt0iXoposQrYrL3DkuO305ULgqSovuctFCog4QHhcwoj0s2P7X
6aplnlpkjXJb4mcTAIsqWlJaHfLMPat/Pb8ByO76WAnIQcfyTxBmNdIT21lxxgpKMiQ==
X-Gm-Gg: ASbGncur5K0750VzdjxID4WUoKTAeQPskoAu8JY8i9Sf88I6MCIepcJ9yZ8I56MIEz2
9hBWvSpNXCcEE5PSBhjubZ/qAKQ6ViuPPbWDBEEMPFkeq9bCIPLsO1mDg6FDMek+BOJ00P5uIdl
iVhU22rsM1rkCLK3rCejM/BtFXMRRbd7Cih+sXvL+O45k4oDK8U5MDC8xWYlBjOWDHRltL+9KeH
rMesFR/J3DtJI8Jx+CeJr3S2nShUDP0QmbQIFb+8Gw77jxpNtkxmHW2pJB86jZ9deD6xZKakEv2
oLs=
X-Received: by 2002:a05:6214:ac1:b0:6fa:ce35:1ab1 with SMTP id 6a1803df08f44-6faf6fb83c3mr38167716d6.29.1749051280773;
Wed, 04 Jun 2025 08:34:40 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IHvXfYwH6TWpq2t5A4sZ2wt/SNAp/Tp/227IPyexTsW11lGOGB7zsiZgDYEnEkSNOHjgemPhg==
X-Received: by 2002:a05:6214:ac1:b0:6fa:ce35:1ab1 with SMTP id 6a1803df08f44-6faf6fb83c3mr38167236d6.29.1749051280100;
Wed, 04 Jun 2025 08:34:40 -0700 (PDT)
Received: from x1.local ([85.131.185.92])
by smtp.gmail.com with ESMTPSA id af79cd13be357-7d09a195507sm1055594185a.88.2025.06.04.08.34.38
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 08:34:39 -0700 (PDT)
Date: Wed, 4 Jun 2025 11:34:37 -0400
From: Peter Xu <peterx@xxxxxxxxxx>
To: Kairui Song <kasong@xxxxxxxxxxx>
Cc: linux-mm@xxxxxxxxx, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
Barry Song <21cnbao@xxxxxxxxx>,
Suren Baghdasaryan <surenb@xxxxxxxxxx>,
Andrea Arcangeli <aarcange@xxxxxxxxxx>,
David Hildenbrand <david@xxxxxxxxxx>,
Lokesh Gidra <lokeshgidra@xxxxxxxxxx>, stable@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
Subject: Re: [PATCH v4] mm: userfaultfd: fix race of userfaultfd_move and
swap cache
Message-ID: <aEBnjWkghvXqlYZo@x1.local>
References: <20250604151038.21968-1-ryncsn@xxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <20250604151038.21968-1-ryncsn@xxxxxxxxx>
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 11:10:38PM +0800, Kairui Song wrote:
From: Kairui Song <kasong@xxxxxxxxxxx>
On seeing a swap entry PTE, userfaultfd_move does a lockless swap
cache lookup, and tries to move the found folio to the faulting vma.
Currently, it relies on checking the PTE value to ensure that the moved
folio still belongs to the src swap entry and that no new folio has
been added to the swap cache, which turns out to be unreliable.
While working and reviewing the swap table series with Barry, following
existing races are observed and reproduced [1]:
In the example below, move_pages_pte is moving src_pte to dst_pte,
where src_pte is a swap entry PTE holding swap entry S1, and S1
is not in the swap cache:
CPU1 CPU2
userfaultfd_move
move_pages_pte()
entry = pte_to_swp_entry(orig_src_pte);
// Here it got entry = S1
... < interrupted> ...
<swapin src_pte, alloc and use folio A>
// folio A is a new allocated folio
// and get installed into src_pte
<frees swap entry S1>
// src_pte now points to folio A, S1
// has swap count == 0, it can be freed
// by folio_swap_swap or swap
// allocator's reclaim.
<try to swap out another folio B>
// folio B is a folio in another VMA.
<put folio B to swap cache using S1 >
// S1 is freed, folio B can use it
// for swap out with no problem.
...
folio = filemap_get_folio(S1)
// Got folio B here !!!
... < interrupted again> ...
<swapin folio B and free S1>
// Now S1 is free to be used again.
<swapout src_pte & folio A using S1>
// Now src_pte is a swap entry PTE
// holding S1 again.
folio_trylock(folio)
move_swap_pte
double_pt_lock
is_pte_pages_stable
// Check passed because src_pte == S1
folio_move_anon_rmap(...)
// Moved invalid folio B here !!!
The race window is very short and requires multiple collisions of
multiple rare events, so it's very unlikely to happen, but with a
deliberately constructed reproducer and increased time window, it
can be reproduced easily.
This can be fixed by checking if the folio returned by filemap is the
valid swap cache folio after acquiring the folio lock.
Another similar race is possible: filemap_get_folio may return NULL, but
folio (A) could be swapped in and then swapped out again using the same
swap entry after the lookup. In such a case, folio (A) may remain in the
swap cache, so it must be moved too:
CPU1 CPU2
userfaultfd_move
move_pages_pte()
entry = pte_to_swp_entry(orig_src_pte);
// Here it got entry = S1, and S1 is not in swap cache
folio = filemap_get_folio(S1)
// Got NULL
... < interrupted again> ...
<swapin folio A and free S1>
<swapout folio A re-using S1>
move_swap_pte
double_pt_lock
is_pte_pages_stable
// Check passed because src_pte == S1
folio_move_anon_rmap(...)
// folio A is ignored !!!
Fix this by checking the swap cache again after acquiring the src_pte
lock. And to avoid the filemap overhead, we check swap_map directly [2].
The SWP_SYNCHRONOUS_IO path does make the problem more complex, but so
far we don't need to worry about that, since folios can only be exposed
to the swap cache in the swap out path, and this is covered in this
patch by checking the swap cache again after acquiring the src_pte lock.
Testing with a simple C program that allocates and moves several GB of
memory did not show any observable performance change.
Cc: <stable@xxxxxxxxxxxxxxx>
Fixes: adef440691ba ("userfaultfd: UFFDIO_MOVE uABI")
Closes: https://lore.kernel.org/linux-mm/CAMgjq7B1K=6OOrK2OUZ0-tqCzi+EJt+2_K97TPGoSt=9+JwP7Q@xxxxxxxxxxxxxx/ [1]
Link: https://lore.kernel.org/all/CAGsJ_4yJhJBo16XhiC-nUzSheyX-V3-nFE+tAi=8Y560K8eT=A@xxxxxxxxxxxxxx/ [2]
Signed-off-by: Kairui Song <kasong@xxxxxxxxxxx>
Reviewed-by: Lokesh Gidra <lokeshgidra@xxxxxxxxxx>
---
V1: https://lore.kernel.org/linux-mm/20250530201710.81365-1-ryncsn@xxxxxxxxx/
Changes:
- Check swap_map instead of doing a filemap lookup after acquiring the
PTE lock to minimize critical section overhead [ Barry Song, Lokesh Gidra ]
V2: https://lore.kernel.org/linux-mm/20250601200108.23186-1-ryncsn@xxxxxxxxx/
Changes:
- Move the folio and swap check inside move_swap_pte to avoid skipping
the check and potential overhead [ Lokesh Gidra ]
- Add a READ_ONCE for the swap_map read to ensure it reads a up to dated
value.
V3: https://lore.kernel.org/all/20250602181419.20478-1-ryncsn@xxxxxxxxx/
Changes:
- Add more comments and more context in commit message.
mm/userfaultfd.c | 33 +++++++++++++++++++++++++++++++--
1 file changed, 31 insertions(+), 2 deletions(-)
diff --git a/mm/userfaultfd.c b/mm/userfaultfd.c
index bc473ad21202..8253978ee0fb 100644
--- a/mm/userfaultfd.c
+++ b/mm/userfaultfd.c
@@ -1084,8 +1084,18 @@ static int move_swap_pte(struct mm_struct *mm, struct vm_area_struct *dst_vma,
pte_t orig_dst_pte, pte_t orig_src_pte,
pmd_t *dst_pmd, pmd_t dst_pmdval,
spinlock_t *dst_ptl, spinlock_t *src_ptl,
- struct folio *src_folio)
+ struct folio *src_folio,
+ struct swap_info_struct *si, swp_entry_t entry)
{
+ /*
+ * Check if the folio still belongs to the target swap entry after
+ * acquiring the lock. Folio can be freed in the swap cache while
+ * not locked.
+ */
+ if (src_folio && unlikely(!folio_test_swapcache(src_folio) ||
+ entry.val != src_folio->swap.val))
+ return -EAGAIN;
+
double_pt_lock(dst_ptl, src_ptl);
if (!is_pte_pages_stable(dst_pte, src_pte, orig_dst_pte, orig_src_pte,
@@ -1102,6 +1112,25 @@ static int move_swap_pte(struct mm_struct *mm, struct vm_area_struct *dst_vma,
if (src_folio) {
folio_move_anon_rmap(src_folio, dst_vma);
src_folio->index = linear_page_index(dst_vma, dst_addr);
+ } else {
+ /*
+ * Check if the swap entry is cached after acquiring the src_pte
+ * lock. Otherwise, we might miss a newly loaded swap cache folio.
+ *
+ * Check swap_map directly to minimize overhead, READ_ONCE is sufficient.
+ * We are trying to catch newly added swap cache, the only possible case is
+ * when a folio is swapped in and out again staying in swap cache, using the
+ * same entry before the PTE check above. The PTL is acquired and released
+ * twice, each time after updating the swap_map's flag. So holding
+ * the PTL here ensures we see the updated value. False positive is possible,
+ * e.g. SWP_SYNCHRONOUS_IO swapin may set the flag without touching the
+ * cache, or during the tiny synchronization window between swap cache and
+ * swap_map, but it will be gone very quickly, worst result is retry jitters.
+ */
The comment above may not be the best I can think of, but I think I'm
already too harsh. :) That's good enough to me. It's also great to
mention the 2nd race too as Barry suggested in the commit log.
Thank you!
Acked-by: Peter Xu <peterx@xxxxxxxxxx>
+ if (READ_ONCE(si->swap_map[swp_offset(entry)]) & SWAP_HAS_CACHE) {
+ double_pt_unlock(dst_ptl, src_ptl);
+ return -EAGAIN;
+ }
}
orig_src_pte = ptep_get_and_clear(mm, src_addr, src_pte);
@@ -1412,7 +1441,7 @@ static int move_pages_pte(struct mm_struct *mm, pmd_t *dst_pmd, pmd_t *src_pmd,
}
err = move_swap_pte(mm, dst_vma, dst_addr, src_addr, dst_pte, src_pte,
orig_dst_pte, orig_src_pte, dst_pmd, dst_pmdval,
- dst_ptl, src_ptl, src_folio);
+ dst_ptl, src_ptl, src_folio, si, entry);
}
out:
--
2.49.0
--
Peter Xu
Return-Path: <linux-kernel+bounces-673458-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 741FC41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:35:49 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id AD9A37A9FC2
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:29:53 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id EF48417A316;
Wed, 4 Jun 2025 15:29:22 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b="AOA9SBIM"
Received: from mail.zytor.com (terminus.zytor.com [198.137.202.136])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4AB3D18DF8D;
Wed, 4 Jun 2025 15:29:19 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.136
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749050962; cv=none; b=rQQZgWcC3ytY38eLbEbMuiL+dZanbWhlpK+LNv1gKJYynaNiOSmS1Rw9dMKHAYv9BHvAsWeonmt84kcsjSAbERBA07XkPy7M/o2nNcMRFXO7Yp1WnwIznm8QXTwz+by28INw/Kq/XR2CEQ0G5T5uvKU+tUkYjWskSxsFQhTcGuQ=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749050962; c=relaxed/simple;
bh=yOPlVwOdBaCxv/hYR1dfCxac+RC2Px2OphoTFgWqb08=;
h=Date:From:To:CC:Subject:In-Reply-To:References:Message-ID:
MIME-Version:Content-Type; b=VEJz2S1UnVhvz2JrZqY/xQ6ZR/kV8klWoU2ozBsyi4BwzDG2kQDbHa5ZZUU75AebvaMhRHlqARBIls0aeVTTXNnwmu6EMaqP0LN+ymmOwNFBU4S+wf/jYfBT1UKkyGlPjUxRAHtXevlCrg2a/oAAIQ/KU7/6r9zfqpRA89ra7mw=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com; spf=pass smtp.mailfrom=zytor.com; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b=AOA9SBIM; arc=none smtp.client-ip=198.137.202.136
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zytor.com
Received: from [127.0.0.1] (c-76-133-66-138.hsd1.ca.comcast.net [76.133.66.138])
(authenticated bits=0)
by mail.zytor.com (8.18.1/8.17.1) with ESMTPSA id 554FSkr1079064
(version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO);
Wed, 4 Jun 2025 08:28:47 -0700
DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 554FSkr1079064
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com;
s=2025052101; t=1749050928;
bh=dE+jTKIPauF7hwDHqLlJtFcIx6waYjcvh/bfpQweklA=;
h=Date:From:To:CC:Subject:In-Reply-To:References:From;
b=AOA9SBIMpV8B5nRKyCCcF42qOBFrO+8k0vN9qoDjZqjtEJap6hFo0LhTZS28bE/Bb
Wdh6AwjD6S1uI0CTBHoTrK0o7fy1mU1SGcwmdH3CwAMpXEM+xlL9F7d7hBl3gue0jx
LGD0+ZboRARuYz5po+uN8knuH7T39lKBDro+UtUF1MZLOMmrzcJ7oh/CcZAZQsDNGl
6FcVlAE3xVjnOT86xexXlRMx+DTETf2s7RICbhkP8dREiwrzcudYan+zUiFUvzGexR
4JITeXdoKs6HFOl4Q1nazWoCV4a85a07PmW4IPSM96eIcS5Wfv3KEewuITNBXnysCq
KaAJ0qRtIFAiw==
Date: Wed, 04 Jun 2025 08:28:47 -0700
From: "H. Peter Anvin" <hpa@xxxxxxxxx>
To: Xin Li <xin@xxxxxxxxx>, Sohil Mehta <sohil.mehta@xxxxxxxxx>,
x86@xxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
CC: Andy Lutomirski <luto@xxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>,
Ingo Molnar <mingo@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>,
Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>,
Peter Zijlstra <peterz@xxxxxxxxxxxxx>,
Sean Christopherson <seanjc@xxxxxxxxxx>,
Adrian Hunter <adrian.hunter@xxxxxxxxx>,
Kan Liang <kan.liang@xxxxxxxxxxxxxxx>, Tony Luck <tony.luck@xxxxxxxxx>,
Zhang Rui <rui.zhang@xxxxxxxxx>, Steven Rostedt <rostedt@xxxxxxxxxxx>,
Andrew Cooper <andrew.cooper3@xxxxxxxxxx>,
"Kirill A . Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx>,
Jacob Pan <jacob.pan@xxxxxxxxxxxxxxxxxxx>,
Andi Kleen <ak@xxxxxxxxxxxxxxx>, Kai Huang <kai.huang@xxxxxxxxx>,
Sandipan Das <sandipan.das@xxxxxxx>, linux-perf-users@xxxxxxxxxxxxxxx,
linux-edac@xxxxxxxxxxxxxxx, kvm@xxxxxxxxxxxxxxx,
linux-pm@xxxxxxxxxxxxxxx, linux-trace-kernel@xxxxxxxxxxxxxxx
Subject: Re: [PATCH v6 4/9] x86/nmi: Assign and register NMI-source vectors
User-Agent: K-9 Mail for Android
In-Reply-To: <9950dc5a-05ab-4a7c-a4e8-34012ef98549@xxxxxxxxx>
References: <20250513203803.2636561-1-sohil.mehta@xxxxxxxxx> <20250513203803.2636561-5-sohil.mehta@xxxxxxxxx> <9950dc5a-05ab-4a7c-a4e8-34012ef98549@xxxxxxxxx>
Message-ID: <FEE77392-D778-4412-B4B7-583EF58955EB@xxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain;
charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On June 3, 2025 9:34:27 AM PDT, Xin Li <xin@zytor=2Ecom> wrote:
On 5/13/2025 1:37 PM, Sohil Mehta wrote:
Prior to NMI-source support, the vector information was ignored by the
hardware while delivering NMIs=2E With NMI-source, the architecture
currently supports a 16-bit source bitmap to identify the source of the
NMI=2E Upon receiving an NMI, this bitmap is delivered as part of the F=
RED
event delivery mechanism to the kernel=2E
=20
Assign a vector space of 0-15 that is specific to NMI-source and
independent of the IDT vector space of 0-255=2E Being a bitmap, the
NMI-source vectors do not have any inherent priority associated with
them=2E The order of executing the NMI handlers is up to the kernel=2E
I'm thinking should we mention that the bitmap could be extended more
than 16 bits in future? Or we just don't emphasize 16-bit or 0~15?
=20
Existing NMI handling already has a priority mechanism for the NMI
handlers, with CPU-specific (NMI_LOCAL) handlers executed first,
followed by platform NMI handlers and unknown NMI (NMI_UNKNOWN) handler=
s
being last=2E Within each of these NMI types, the handlers registered w=
ith
NMI_FLAG_FIRST are given priority=2E
=20
NMI-source follows the same priority scheme to avoid unnecessary
complexity=2E Therefore, the NMI-source vectors are assigned arbitraril=
y,
except for vectors 0 and 2=2E
=20
Vector 0 is set by the hardware whenever a source vector was not used
while generating an NMI or the originator could not be reliably
identified=2E Do not assign it to any handler=2E
=20
Vector 2 is reserved for external NMIs corresponding to Local APIC -
LINT1=2E Some third-party chipsets may send NMI messages with a hardcod=
ed
vector of 2, which would result in vector 2 being set in the NMI-source
bitmap=2E To avoid confusion, do not assign vector 2 to any handler=2E
=20
NMI-source vectors are only assigned for NMI_LOCAL type handlers=2E
Platform NMI handlers have a single handler registered per type=2E They
don't need additional source information to differentiate among them=2E
=20
Use the assigned vectors to register the respective NMI handlers=2E War=
n
if the vector values are unexpected=2E
=20
A couple of NMI handlers, such as the microcode rendezvous and the cras=
h
reboot, do not use the typical NMI registration interface=2E Leave them
as-is for now=2E
=20
Originally-by: Jacob Pan <jacob=2Ejun=2Epan@linux=2Eintel=2Ecom>
Signed-off-by: Sohil Mehta <sohil=2Emehta@intel=2Ecom>
Reviewed-by: Xin Li (Intel) <xin@zytor=2Ecom>
The architectural maximum* is 63 sources (plus the error bit), although th=
e current version only supports 1-15=2E If extended to be wider, we would p=
resumably add a new cpuid bit=2E
However, we should make sure there is nothing in the implementation that l=
imits us to 16 or 32 bits; when manipulating the bitmask we should use a 64=
bit type=2E=20
-hpa
* If we were to use the additional error reporting fields in the FRED fram=
e at some future point it could be extended as far as 207, but since we at =
this point don't have anyone clamouring for more than 15 this seems like a =
very remote possibility=2E
Return-Path: <linux-kernel+bounces-673466-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 79F0E41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:35:53 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 5BC5D3A35E9
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:35:31 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id A6B6B1991D2;
Wed, 4 Jun 2025 15:35:47 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="L3WuvYsi"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0BE2718DF8D
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:35:43 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749051346; cv=none; b=iuQP3wUfbHXwIFnRURUZ/FsfWiwMdjkgd9l3smDhTyGAcNOk8KEDcjmW6VHLx5h/kdWAfId9rQc8XSj9is7i5H9ibgO3Elemo85gqeYlPp61OEoeHMlYVlCuXoYg1SRrIETpwoDbRdGxY7IlVJfBOoG3+tUReNpDoQVhWUkHNys=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749051346; c=relaxed/simple;
bh=VHSJz1dRNiP2G582gS4azghf/c6ZHxaFNwWXYVETiBI=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=uvbQfMqgq4v+HKR8as47u3o2Q1LYo+0165PxtXjD4tO/cjiudSlIYN4JZLkc+xRaq+0bnpdhOHbFf3+eR2dMzMuPUZJnj2OgduJZQW9FriLnx485ssQql8cWqf8PUbPZ9QfXT/cLvAiIdbYG9Q6obIPsYz+vaLhvDL/THMp4R+M=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=L3WuvYsi; arc=none smtp.client-ip=170.10.133.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749051343;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=ctKc+hSqozlgg1MRW5+HjrFvzU5NiOJ35GVuMd+Z1RY=;
b=L3WuvYsiQ8ywwXm+iUA9bI+YNd3ExuSgqIRO9dJBBLGHUgfvgRbyK1mlSwreYnp+G9R7eR
Ug2t4gnvnUUBvWsctkLjktrGHD9YqY947nA1LdzlVRp/gHDRIoFoa0UZyQEIx+tOxrYa1h
D6ZMlyeDBRGc62Xe5o6qmwx0TFL9r6M=
Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com
[209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-530-J4FimcstNPqhtutnrAXa5A-1; Wed, 04 Jun 2025 11:35:41 -0400
X-MC-Unique: J4FimcstNPqhtutnrAXa5A-1
X-Mimecast-MFC-AGG-ID: J4FimcstNPqhtutnrAXa5A_1749051340
Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-450d021b9b1so29471585e9.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 08:35:40 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749051339; x=1749656139;
h=content-transfer-encoding:in-reply-to:autocrypt:content-language
:from:references:cc:to:subject:user-agent:mime-version:date
:message-id:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=ctKc+hSqozlgg1MRW5+HjrFvzU5NiOJ35GVuMd+Z1RY=;
b=v6qyMTty08ZLNqAXik/yM6YEFM7IrO6beAhe5PKrJvcjm/7kKlwEInMkWQCo/DrO5O
XiXSUtnK9DpQvE7ZdRy+Sn1Q7AEmon2iC7u9uwfTP2CJEAhqCQ+TVjurXBkzj+Ul0UxW
ka2dpqttS+lbHGOMkUUBdXa4dADSw93uIri2eREgaX7TXFVqJ66FYgCyplU4kv6VYqDG
ESY/oZX2Od6C9f/KfMZ7jXDQmlQuQvfBHca7UFL5PpiN4SCiqPPsgATnJhfmZPI5xAGz
s+3hkEy36oRXc7VbFL5SeGfK/8KrkUxYT8yNbMvPf3iIafz3H7/03Was4LAtNoI4klwm
2unw==
X-Forwarded-Encrypted: i=1; AJvYcCVT1P6GstWkoEBcgf0189zEtIR8aoc2PXcM53McKaSRniKEQz2HemQwGe0sanrtPnloUDMHsjY6VUirIEE=@vger.kernel.org
X-Gm-Message-State: AOJu0Yxb+057G41A7+8WBKxf9GnmG4uvsB6gBFFfyEi0c+FRxYOi+fb0
j3YvE8CotutHbzm5epzDoaQfeSEW2rMvXBY2a8/GKovmj8FIbKRWiQQwuspYfxVtib8gKTKyMS5
8s6lJUw8mi7yQYJHu9Gsjct15zrHhaeLRIuxX3qqsZrHb3tUNFd2wrZxNJZvEf9xqVA==
X-Gm-Gg: ASbGnctp+SQAtUYG8MMQr70cq7l6j4/jHbhHuArycldfSco4fRAr4bCcTZFc9peinEz
vYdBrYbccPM7KckrOaQ6b/GqwKGLA/2BLIrvQYJqIHzZnpMLldzM34P/dplluC8Dmat56E/iHPI
qpIyuJgVeNqqn5LtSUTzHKWubOqcVI1R1ViyIcPUq6vh6S5xN3XkoriXC3uQKJQaIxbdw3Rpp4R
QkMPqQTYFYZin5SD7uWeYJYoqAG7GSFBMXcDLawZLj3gfchDdZaUu/zOcZfO85NMXKjtmPyJpLc
4mgo8q9So+S8ug==
X-Received: by 2002:a05:600c:8b53:b0:450:d386:1afb with SMTP id 5b1f17b1804b1-451f0a77343mr32588385e9.9.1749051339463;
Wed, 04 Jun 2025 08:35:39 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IEqo6iYnecfC7tHOZZ/TUYnSiglRzS3lZcm1gNy+NVTOapR4iugn8It+lJKFfkLebYYf0m8Dg==
X-Received: by 2002:a05:600c:8b53:b0:450:d386:1afb with SMTP id 5b1f17b1804b1-451f0a77343mr32588035e9.9.1749051338962;
Wed, 04 Jun 2025 08:35:38 -0700 (PDT)
Received: from [192.168.10.81] ([151.49.64.79])
by smtp.googlemail.com with ESMTPSA id 5b1f17b1804b1-450d7fa249esm210203565e9.13.2025.06.04.08.35.37
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 08:35:38 -0700 (PDT)
Message-ID: <688ba3c4-bf8a-47f1-ad14-85a23399582c@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 17:35:36 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH 08/28] KVM: nSVM: Use dedicated array of MSRPM offsets to
merge L0 and L1 bitmaps
To: Sean Christopherson <seanjc@xxxxxxxxxx>
Cc: kvm@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
Borislav Petkov <bp@xxxxxxxxx>, Xin Li <xin@xxxxxxxxx>,
Chao Gao <chao.gao@xxxxxxxxx>, Dapeng Mi <dapeng1.mi@xxxxxxxxxxxxxxx>
References: <20250529234013.3826933-1-seanjc@xxxxxxxxxx>
<20250529234013.3826933-9-seanjc@xxxxxxxxxx>
From: Paolo Bonzini <pbonzini@xxxxxxxxxx>
Content-Language: en-US
Autocrypt: addr=pbonzini@xxxxxxxxxx; keydata=
xsEhBFRCcBIBDqDGsz4K0zZun3jh+U6Z9wNGLKQ0kSFyjN38gMqU1SfP+TUNQepFHb/Gc0E2
CxXPkIBTvYY+ZPkoTh5xF9oS1jqI8iRLzouzF8yXs3QjQIZ2SfuCxSVwlV65jotcjD2FTN04
hVopm9llFijNZpVIOGUTqzM4U55sdsCcZUluWM6x4HSOdw5F5Utxfp1wOjD/v92Lrax0hjiX
DResHSt48q+8FrZzY+AUbkUS+Jm34qjswdrgsC5uxeVcLkBgWLmov2kMaMROT0YmFY6A3m1S
P/kXmHDXxhe23gKb3dgwxUTpENDBGcfEzrzilWueOeUWiOcWuFOed/C3SyijBx3Av/lbCsHU
Vx6pMycNTdzU1BuAroB+Y3mNEuW56Yd44jlInzG2UOwt9XjjdKkJZ1g0P9dwptwLEgTEd3Fo
UdhAQyRXGYO8oROiuh+RZ1lXp6AQ4ZjoyH8WLfTLf5g1EKCTc4C1sy1vQSdzIRu3rBIjAvnC
tGZADei1IExLqB3uzXKzZ1BZ+Z8hnt2og9hb7H0y8diYfEk2w3R7wEr+Ehk5NQsT2MPI2QBd
wEv1/Aj1DgUHZAHzG1QN9S8wNWQ6K9DqHZTBnI1hUlkp22zCSHK/6FwUCuYp1zcAEQEAAc0j
UGFvbG8gQm9uemluaSA8cGJvbnppbmlAcmVkaGF0LmNvbT7CwU0EEwECACMFAlRCcBICGwMH
CwkIBwMCAQYVCAIJCgsEFgIDAQIeAQIXgAAKCRB+FRAMzTZpsbceDp9IIN6BIA0Ol7MoB15E
11kRz/ewzryFY54tQlMnd4xxfH8MTQ/mm9I482YoSwPMdcWFAKnUX6Yo30tbLiNB8hzaHeRj
jx12K+ptqYbg+cevgOtbLAlL9kNgLLcsGqC2829jBCUTVeMSZDrzS97ole/YEez2qFpPnTV0
VrRWClWVfYh+JfzpXmgyhbkuwUxNFk421s4Ajp3d8nPPFUGgBG5HOxzkAm7xb1cjAuJ+oi/K
CHfkuN+fLZl/u3E/fw7vvOESApLU5o0icVXeakfSz0LsygEnekDbxPnE5af/9FEkXJD5EoYG
SEahaEtgNrR4qsyxyAGYgZlS70vkSSYJ+iT2rrwEiDlo31MzRo6Ba2FfHBSJ7lcYdPT7bbk9
AO3hlNMhNdUhoQv7M5HsnqZ6unvSHOKmReNaS9egAGdRN0/GPDWr9wroyJ65ZNQsHl9nXBqE
AukZNr5oJO5vxrYiAuuTSd6UI/xFkjtkzltG3mw5ao2bBpk/V/YuePrJsnPFHG7NhizrxttB
nTuOSCMo45pfHQ+XYd5K1+Cv/NzZFNWscm5htJ0HznY+oOsZvHTyGz3v91pn51dkRYN0otqr
bQ4tlFFuVjArBZcapSIe6NV8C4cEiSTOwE0EVEJx7gEIAMeHcVzuv2bp9HlWDp6+RkZe+vtl
KwAHplb/WH59j2wyG8V6i33+6MlSSJMOFnYUCCL77bucx9uImI5nX24PIlqT+zasVEEVGSRF
m8dgkcJDB7Tps0IkNrUi4yof3B3shR+vMY3i3Ip0e41zKx0CvlAhMOo6otaHmcxr35sWq1Jk
tLkbn3wG+fPQCVudJJECvVQ//UAthSSEklA50QtD2sBkmQ14ZryEyTHQ+E42K3j2IUmOLriF
dNr9NvE1QGmGyIcbw2NIVEBOK/GWxkS5+dmxM2iD4Jdaf2nSn3jlHjEXoPwpMs0KZsgdU0pP
JQzMUMwmB1wM8JxovFlPYrhNT9MAEQEAAcLBMwQYAQIACQUCVEJx7gIbDAAKCRB+FRAMzTZp
sadRDqCctLmYICZu4GSnie4lKXl+HqlLanpVMOoFNnWs9oRP47MbE2wv8OaYh5pNR9VVgyhD
OG0AU7oidG36OeUlrFDTfnPYYSF/mPCxHttosyt8O5kabxnIPv2URuAxDByz+iVbL+RjKaGM
GDph56ZTswlx75nZVtIukqzLAQ5fa8OALSGum0cFi4ptZUOhDNz1onz61klD6z3MODi0sBZN
Aj6guB2L/+2ZwElZEeRBERRd/uommlYuToAXfNRdUwrwl9gRMiA0WSyTb190zneRRDfpSK5d
usXnM/O+kr3Dm+Ui+UioPf6wgbn3T0o6I5BhVhs4h4hWmIW7iNhPjX1iybXfmb1gAFfjtHfL
xRUr64svXpyfJMScIQtBAm0ihWPltXkyITA92ngCmPdHa6M1hMh4RDX+Jf1fiWubzp1voAg0
JBrdmNZSQDz0iKmSrx8xkoXYfA3bgtFN8WJH2xgFL28XnqY4M6dLhJwV3z08tPSRqYFm4NMP
dRsn0/7oymhneL8RthIvjDDQ5ktUjMe8LtHr70OZE/TT88qvEdhiIVUogHdo4qBrk41+gGQh
b906Dudw5YhTJFU3nC6bbF2nrLlB4C/XSiH76ZvqzV0Z/cAMBo5NF/w=
In-Reply-To: <20250529234013.3826933-9-seanjc@xxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 5/30/25 01:39, Sean Christopherson wrote:
Use a dedicated array of MSRPM offsets to merge L0 and L1 bitmaps, i.e. to
merge KVM's vmcb01 bitmap with L1's vmcb12 bitmap. This will eventually
allow for the removal of direct_access_msrs, as the only path where
tracking the offsets is truly justified is the merge for nested SVM, where
merging in chunks is an easy way to batch uaccess reads/writes.
Opportunistically omit the x2APIC MSRs from the merge-specific array
instead of filtering them out at runtime.
Note, disabling interception of XSS, EFER, PAT, GHCB, and TSC_AUX is
mutually exclusive with nested virtualization, as KVM passes through the
MSRs only for SEV-ES guests, and KVM doesn't support nested virtualization
for SEV+ guests. Defer removing those MSRs to a future cleanup in order
to make this refactoring as benign as possible.
Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
---
arch/x86/kvm/svm/nested.c | 72 +++++++++++++++++++++++++++++++++------
arch/x86/kvm/svm/svm.c | 4 +++
arch/x86/kvm/svm/svm.h | 2 ++
3 files changed, 67 insertions(+), 11 deletions(-)
diff --git a/arch/x86/kvm/svm/nested.c b/arch/x86/kvm/svm/nested.c
index 89a77f0f1cc8..e53020939e60 100644
--- a/arch/x86/kvm/svm/nested.c
+++ b/arch/x86/kvm/svm/nested.c
@@ -184,6 +184,64 @@ void recalc_intercepts(struct vcpu_svm *svm)
}
}
+static int nested_svm_msrpm_merge_offsets[9] __ro_after_init;
+static int nested_svm_nr_msrpm_merge_offsets __ro_after_init;
+
+int __init nested_svm_init_msrpm_merge_offsets(void)
+{
+ const u32 merge_msrs[] = {
"static const", please.
Paolo
+ MSR_STAR,
+ MSR_IA32_SYSENTER_CS,
+ MSR_IA32_SYSENTER_EIP,
+ MSR_IA32_SYSENTER_ESP,
+ #ifdef CONFIG_X86_64
+ MSR_GS_BASE,
+ MSR_FS_BASE,
+ MSR_KERNEL_GS_BASE,
+ MSR_LSTAR,
+ MSR_CSTAR,
+ MSR_SYSCALL_MASK,
+ #endif
+ MSR_IA32_SPEC_CTRL,
+ MSR_IA32_PRED_CMD,
+ MSR_IA32_FLUSH_CMD,
+ MSR_IA32_LASTBRANCHFROMIP,
+ MSR_IA32_LASTBRANCHTOIP,
+ MSR_IA32_LASTINTFROMIP,
+ MSR_IA32_LASTINTTOIP,
+
+ MSR_IA32_XSS,
+ MSR_EFER,
+ MSR_IA32_CR_PAT,
+ MSR_AMD64_SEV_ES_GHCB,
+ MSR_TSC_AUX,
+ };
+ int i, j;
+
+ for (i = 0; i < ARRAY_SIZE(merge_msrs); i++) {
+ u32 offset = svm_msrpm_offset(merge_msrs[i]);
+
+ if (WARN_ON(offset == MSR_INVALID))
+ return -EIO;
+
+ for (j = 0; j < nested_svm_nr_msrpm_merge_offsets; j++) {
+ if (nested_svm_msrpm_merge_offsets[j] == offset)
+ break;
+ }
+
+ if (j < nested_svm_nr_msrpm_merge_offsets)
+ continue;
+
+ if (WARN_ON(j >= ARRAY_SIZE(nested_svm_msrpm_merge_offsets)))
+ return -EIO;
+
+ nested_svm_msrpm_merge_offsets[j] = offset;
+ nested_svm_nr_msrpm_merge_offsets++;
+ }
+
+ return 0;
+}
+
/*
* Merge L0's (KVM) and L1's (Nested VMCB) MSR permission bitmaps. The function
* is optimized in that it only merges the parts where KVM MSR permission bitmap
@@ -216,19 +274,11 @@ static bool nested_svm_merge_msrpm(struct kvm_vcpu *vcpu)
if (!(vmcb12_is_intercept(&svm->nested.ctl, INTERCEPT_MSR_PROT)))
return true;
- for (i = 0; i < MSRPM_OFFSETS; i++) {
- u32 value, p;
+ for (i = 0; i < nested_svm_nr_msrpm_merge_offsets; i++) {
+ const int p = nested_svm_msrpm_merge_offsets[i];
+ u32 value;
u64 offset;
- if (msrpm_offsets[i] == 0xffffffff)
- break;
-
- p = msrpm_offsets[i];
-
- /* x2apic msrs are intercepted always for the nested guest */
- if (is_x2apic_msrpm_offset(p))
- continue;
-
offset = svm->nested.ctl.msrpm_base_pa + (p * 4);
if (kvm_vcpu_read_guest(vcpu, offset, &value, 4))
diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
index 1c70293400bc..84dd1f220986 100644
--- a/arch/x86/kvm/svm/svm.c
+++ b/arch/x86/kvm/svm/svm.c
@@ -5689,6 +5689,10 @@ static int __init svm_init(void)
if (!kvm_is_svm_supported())
return -EOPNOTSUPP;
+ r = nested_svm_init_msrpm_merge_offsets();
+ if (r)
+ return r;
+
r = kvm_x86_vendor_init(&svm_init_ops);
if (r)
return r;
diff --git a/arch/x86/kvm/svm/svm.h b/arch/x86/kvm/svm/svm.h
index 909b9af6b3c1..0a8041d70994 100644
--- a/arch/x86/kvm/svm/svm.h
+++ b/arch/x86/kvm/svm/svm.h
@@ -686,6 +686,8 @@ static inline bool nested_exit_on_nmi(struct vcpu_svm *svm)
return vmcb12_is_intercept(&svm->nested.ctl, INTERCEPT_NMI);
}
+int __init nested_svm_init_msrpm_merge_offsets(void);
+
int enter_svm_guest_mode(struct kvm_vcpu *vcpu,
u64 vmcb_gpa, struct vmcb *vmcb12, bool from_vmrun);
void svm_leave_nested(struct kvm_vcpu *vcpu);
Return-Path: <linux-kernel+bounces-673459-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 0C87341E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:36:30 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 196E87ADCE6
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:30:14 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 99EA61DF748;
Wed, 4 Jun 2025 15:30:19 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b="CWJt10XU"
Received: from mail.zytor.com (terminus.zytor.com [198.137.202.136])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4A4CA148832;
Wed, 4 Jun 2025 15:30:15 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.136
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749051018; cv=none; b=b9eWPggKb9+8TkORa1qA2jL94T5LBe7DIi7JUIEYsJGaKWjF/JxfD8BCSZ3eo2c+AIlzCuPX9St/ME+Ny5tEu4yufoDapa+F5sHjC0tUOt97ppWDOpjDm8QjXeGxB65ZFfzqrTED6QQOjgAJKbiXXpTno0iQdKVf6Qu9zZgEePk=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749051018; c=relaxed/simple;
bh=IntO0/FbgwhgBAN77s9LpsP+6ciHFlDY2+k3/nq5G/0=;
h=Date:From:To:CC:Subject:In-Reply-To:References:Message-ID:
MIME-Version:Content-Type; b=Y2pTv81BJuPKeFdbEm7hrBizyHlqGLt8SevGA1k6MLJGXiWEnZ9HmqnEvw4M7JSFw5anBs08eMd1m21r51Wq1bU1dAO8SeCaJ8KbzyvuA8/xLWLrDXiusj+u68j+1U42ZJFn+Ig4PfQUMoTYtYcOTLn/mFiVDOiHISiXrxV9X7I=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com; spf=pass smtp.mailfrom=zytor.com; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b=CWJt10XU; arc=none smtp.client-ip=198.137.202.136
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zytor.com
Received: from [127.0.0.1] (c-76-133-66-138.hsd1.ca.comcast.net [76.133.66.138])
(authenticated bits=0)
by mail.zytor.com (8.18.1/8.17.1) with ESMTPSA id 554FTfWR079172
(version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO);
Wed, 4 Jun 2025 08:29:42 -0700
DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 554FTfWR079172
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com;
s=2025052101; t=1749050983;
bh=06DGrvhu1rhRSkUp5M4yyd9dVBhB/k8I9ffulUUuiZ4=;
h=Date:From:To:CC:Subject:In-Reply-To:References:From;
b=CWJt10XUfOPx1/nx9ZCg8yilsk+XhK7WFpAKz7w3Pr/GVmjyx931ADKMUVWGo0Cf9
BK9swHAH6bLOv/AKCFf89kclJ1EVrzrOE5ozFO583Wit4qvaHJslPf69jO+Xb10G/y
HDSkkCzpr8N1DBmV8tHNlTC8h/mVHLiic7FH6lWq0osexW4hVU8viTdhORNcLc+p/i
dwHVhQJyhp+6OyOsKaysK8dMKK1zQmc1U0WCq3uvvRuPwkrwsLOyzkXBvK/6OA+No7
f3TRDnipWQlRTtZnqnOhpWwXoiRZ3Q3qSirfp4/fq7x4AzXRpbjWyBI3ueoLvzfcrm
Vu0ZiW4gOySHw==
Date: Wed, 04 Jun 2025 08:29:42 -0700
From: "H. Peter Anvin" <hpa@xxxxxxxxx>
To: Xin Li <xin@xxxxxxxxx>, Sohil Mehta <sohil.mehta@xxxxxxxxx>,
x86@xxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
CC: Andy Lutomirski <luto@xxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>,
Ingo Molnar <mingo@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>,
Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>,
Peter Zijlstra <peterz@xxxxxxxxxxxxx>,
Sean Christopherson <seanjc@xxxxxxxxxx>,
Adrian Hunter <adrian.hunter@xxxxxxxxx>,
Kan Liang <kan.liang@xxxxxxxxxxxxxxx>, Tony Luck <tony.luck@xxxxxxxxx>,
Zhang Rui <rui.zhang@xxxxxxxxx>, Steven Rostedt <rostedt@xxxxxxxxxxx>,
Andrew Cooper <andrew.cooper3@xxxxxxxxxx>,
"Kirill A . Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx>,
Jacob Pan <jacob.pan@xxxxxxxxxxxxxxxxxxx>,
Andi Kleen <ak@xxxxxxxxxxxxxxx>, Kai Huang <kai.huang@xxxxxxxxx>,
Sandipan Das <sandipan.das@xxxxxxx>, linux-perf-users@xxxxxxxxxxxxxxx,
linux-edac@xxxxxxxxxxxxxxx, kvm@xxxxxxxxxxxxxxx,
linux-pm@xxxxxxxxxxxxxxx, linux-trace-kernel@xxxxxxxxxxxxxxx
Subject: =?US-ASCII?Q?Re=3A_=5BPATCH_v6_9/9=5D_x86/nmi=3A_Print_source_inf?=
=?US-ASCII?Q?ormation_with_the_unknown_NMI_console_message?=
User-Agent: K-9 Mail for Android
In-Reply-To: <31507dc8-b1dc-4df3-bc0c-6958b4218746@xxxxxxxxx>
References: <20250513203803.2636561-1-sohil.mehta@xxxxxxxxx> <20250513203803.2636561-10-sohil.mehta@xxxxxxxxx> <31507dc8-b1dc-4df3-bc0c-6958b4218746@xxxxxxxxx>
Message-ID: <CC71F714-803B-44F3-A46D-308B75FB3FD0@xxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain;
charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On June 3, 2025 9:55:32 AM PDT, Xin Li <xin@zytor=2Ecom> wrote:
On 5/13/2025 1:38 PM, Sohil Mehta wrote:
+ if (cpu_feature_enabled(X86_FEATURE_NMI_SOURCE))
+ pr_emerg_ratelimited("NMI-source bitmap is 0x%lx\n", fred_event_data=
(regs));
"0x%04lx"?
Seems unnecessary to me to zero-pad it; it just makes small numbers harder=
to read=2E We don't even use vector 12+ at this time, do we?
Return-Path: <linux-kernel+bounces-673465-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 259A741E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:39:39 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id A653C7AA244
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:34:18 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id CBFCF19CC0A;
Wed, 4 Jun 2025 15:35:27 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=ndufresne-ca.20230601.gappssmtp.com header.i=@ndufresne-ca.20230601.gappssmtp.com header.b="v3je2yRK"
Received: from mail-qv1-f47.google.com (mail-qv1-f47.google.com [209.85.219.47])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 70EC818B47E
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:35:25 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.47
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749051327; cv=none; b=XHjon5sGHxbqvxlRbme/8Vdvjy1Z5NdIR/rfd0jA/6riJcSBHwx0gQeLOGSdfDBx/VkgvzejbeG4xX3mQJkIkBCBFu+72aPbLyedzDp7/v2unqc7ghxB8x1omuvvMRquaTi92JXhCCtoA3pqZTPufhBpjHoKtHGXgbdUnV5snYw=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749051327; c=relaxed/simple;
bh=YoMzcreeLf0Uer5t9WftYAytQbmcukCa1uEM4ng5180=;
h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References:
Content-Type:MIME-Version; b=GbAmglUtEOClnUikaNjxyAoQhGcQIeyA4gQoaXf9kbAlr6hkPvs4IvIQ1yRz/dFaDjpq38vGU2LZWfV1/b2fDLhE84nA8CCR5IXDuRFxJYegl0fHy138hK/b80DRqihvTwNXVayK2s4bjZ1XrKEPl4ZjUhZeGbgUVbpQi5dHKi4=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ndufresne.ca; spf=pass smtp.mailfrom=ndufresne.ca; dkim=pass (2048-bit key) header.d=ndufresne-ca.20230601.gappssmtp.com header.i=@ndufresne-ca.20230601.gappssmtp.com header.b=v3je2yRK; arc=none smtp.client-ip=209.85.219.47
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ndufresne.ca
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ndufresne.ca
Received: by mail-qv1-f47.google.com with SMTP id 6a1803df08f44-6fadd3ad18eso412506d6.2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 08:35:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=ndufresne-ca.20230601.gappssmtp.com; s=20230601; t=1749051324; x=1749656124; darn=vger.kernel.org;
h=mime-version:user-agent:content-transfer-encoding:references
:in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject
:date:message-id:reply-to;
bh=q7DZnXDDw2f7bOVU5h41kTY3jPLyxY+7Em6dlbFk/dY=;
b=v3je2yRKPLXrJXXyYD0Yu1k5/CIu+2uUpSHbWDjPdzzgiHkgyX4mCskNkHieRVWiek
ZrBiJ8Z0wqtFrNXK0FOkJfxJvvhAzMtOEWFAAs8uPhd0nsaCHTp83/A94uOZB6SX0Rd3
qA32E6xyq3CyCxVilcJ+cQuIbN4aX7EPNdDTqKCM2Gi1v+uC3khauMvETzsWebMJ8rg3
wyp4PS7H7Ttn+4Qn0a0O56PWoKkjf/ANE2c6HJCWrjgRj4ffoMLgIr1MUdHZUBxMOpAJ
QWfw5A69NQlYRrCI1R97Hk42eH+Ncv3xM2vhtRmQptTCyFMg9UMzpl0xAdQhfv7khePU
ovfQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749051324; x=1749656124;
h=mime-version:user-agent:content-transfer-encoding:references
:in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state
:from:to:cc:subject:date:message-id:reply-to;
bh=q7DZnXDDw2f7bOVU5h41kTY3jPLyxY+7Em6dlbFk/dY=;
b=RbuHT4RV+BpM5j/HWpkCQWs/E1iOpq5Z0nm0c25d9z9saOHsaHrla/jMXXjkCxo2fC
2VsWJjqTPI6PunLeNvAZakDiyP7ZO2/UcZ9UCatameJK/dD7E96/UrEJeh2lk9EIzn/6
fb+5W930l0mNnCx6ZGtCl2xftRZthAlXOTN8Bx3OrKP+dsSAjuuFn4a8lDKROkckZo3h
m7kKnawTU9bVIWBoncB2AwYSC1wu4C2VLAYrDpOmX9XsiPwZE1tyMb/KKfJGTwPn91gy
2pYxSi9JzvWJwzbeAuLYKMZQ4qMAVZsKxm1iLfZtN3h2Hy7kSBFytcSdMP7NCkZJZCb5
m8DA==
X-Forwarded-Encrypted: i=1; AJvYcCW2MJbmsMjhdEzFfy39MEHsSpY5LMMdNLysxN7J5T+e7KsUqUt3RrWMJOH/9IugdBPlOS8ZfliBATKSGso=@vger.kernel.org
X-Gm-Message-State: AOJu0Yw/BLL9dG4Rz1qJvGzHhYqktz93XwUdNW80sP26TXW/e03BwO3w
Ftny2dTuelhT/z2Gw8r6Dl6Qwpyyvq2m273CloQdFUe4YK0TX2Dh8jfJqfEVLweAwLc=
X-Gm-Gg: ASbGncspzLW1Nvnk/T3yJmomq1/g5akNLj59DmhWJkhdlY0VghSJxQ9B+ZdZeFjq/cL
JtWjpK8q9fYwP476jiWI4FSPtAtg1MSqC/YWK4XEylkvS7Zl7Ecv0AdfOri+OV7NunpqvRhyMAt
8obskGTlYwA+fBBEn5PvtPOFBQNZPkULET70TCD6GDxhOwetyYF0rXaiugx8EI97FaV2k2CU+gJ
7c2cK8H6J93JN6wlY3JfpfDCTcK1lhwSU26kegP239p7CeV37whArFBTp0110zaENo140Vse+Fp
/HPQmAQODFvsO2kDgP5eO048ZUxJDNA4rR22JarOxnX+Zo8MV9tTecgI
X-Google-Smtp-Source: AGHT+IFTVb5P+MMCAOPUE3KfAdaPQyevv0cConXsNDIySkFVkZ+c+t8LYnjxLTtV0EwxgimezZwiiw==
X-Received: by 2002:ad4:5de8:0:b0:6fa:9baa:fad9 with SMTP id 6a1803df08f44-6faf6e87e73mr48632366d6.17.1749051324172;
Wed, 04 Jun 2025 08:35:24 -0700 (PDT)
Received: from ?IPv6:2606:6d00:10:5285::5ac? ([2606:6d00:10:5285::5ac])
by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6fac6e00d37sm101270436d6.79.2025.06.04.08.35.23
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 08:35:23 -0700 (PDT)
Message-ID: <254309f1c527d782e0c50c425602c94683f395b6.camel@xxxxxxxxxxxx>
Subject: Re: [PATCH] media: v4l2-ctrls: Fix H264 SEPARATE_COLOUR_PLANE check
From: Nicolas Dufresne <nicolas@xxxxxxxxxxxx>
To: James Cowgill <james.cowgill@xxxxxxxxxx>, Mauro Carvalho Chehab
<mchehab@xxxxxxxxxx>, Hans Verkuil <hverkuil@xxxxxxxxx>, Ezequiel Garcia
<ezequiel@xxxxxxxxxxxxxxxxxxxx>
Cc: "linux-media@xxxxxxxxxxxxxxx" <linux-media@xxxxxxxxxxxxxxx>,
"linux-kernel@xxxxxxxxxxxxxxx"
<linux-kernel@xxxxxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 11:35:22 -0400
In-Reply-To: <20250604143552.2955475-1-james.cowgill@xxxxxxxxxx>
References: <20250604143552.2955475-1-james.cowgill@xxxxxxxxxx>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
User-Agent: Evolution 3.56.2 (3.56.2-1.fc42)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hi James,
Le mercredi 04 juin 2025 =C3=A0 14:38 +0000, James Cowgill a =C3=A9crit=C2=
=A0:
The `separate_colour_plane_flag` element is only present in the SPS if
`chroma_format_idc =3D=3D 3`, so the corresponding flag should be disable=
d
whenever that is not the case and not just on profiles where
`chroma_format_idc` is not present.
The fix seems correct indeed. This has no incidence on any current driver, =
since
there is nothing upstream that supports decoding 4:4:4. Would you mind if w=
e
extend the commit with something such as:
This prevents invalid flags being passed, though no upstream drivers
currently supports YCbCr 4:4:4 decoding.
Feel free to to suggest a better edit. It will make stable people (and bot)=
aware
of the patch priority. I can make the edit while applying.
regards,
Nicolas
=20
Fixes: b32e48503df0 ("media: controls: Validate H264 stateless controls")
Signed-off-by: James Cowgill <james.cowgill@xxxxxxxxxx>
---
=C2=A0drivers/media/v4l2-core/v4l2-ctrls-core.c | 8 ++++----
=C2=A01 file changed, 4 insertions(+), 4 deletions(-)
=20
diff --git a/drivers/media/v4l2-core/v4l2-ctrls-core.c b/drivers/media/v4=
l2-core/v4l2-ctrls-core.c
index 90d25329661e..b45809a82f9a 100644
--- a/drivers/media/v4l2-core/v4l2-ctrls-core.c
+++ b/drivers/media/v4l2-core/v4l2-ctrls-core.c
@@ -968,12 +968,12 @@ static int std_validate_compound(const struct v4l2_=
ctrl *ctrl, u32 idx,
=C2=A0
=C2=A0 p_h264_sps->flags &=3D
=C2=A0 ~V4L2_H264_SPS_FLAG_QPPRIME_Y_ZERO_TRANSFORM_BYPASS;
-
- if (p_h264_sps->chroma_format_idc < 3)
- p_h264_sps->flags &=3D
- ~V4L2_H264_SPS_FLAG_SEPARATE_COLOUR_PLANE;
=C2=A0 }
=C2=A0
+ if (p_h264_sps->chroma_format_idc < 3)
+ p_h264_sps->flags &=3D
+ ~V4L2_H264_SPS_FLAG_SEPARATE_COLOUR_PLANE;
+
=C2=A0 if (p_h264_sps->flags & V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY)
=C2=A0 p_h264_sps->flags &=3D
=C2=A0 ~V4L2_H264_SPS_FLAG_MB_ADAPTIVE_FRAME_FIELD;
Return-Path: <linux-kernel+bounces-673469-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id BBC2841E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:39:56 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id CB3FB1899456
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:40:09 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 813CB19CC3D;
Wed, 4 Jun 2025 15:39:48 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="xLjRE2n+"
Received: from mail-qt1-f174.google.com (mail-qt1-f174.google.com [209.85.160.174])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id B45DC1624DD
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:39:45 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.174
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749051587; cv=none; b=G8yiL+/EOl0L/XW5Xvssns+uVcsZsmf235tNsF2lDeFw3RJLx5fzdFyCQ3pM/qKjCbQ9u8V4Z5qSJNBHEhae7+CQ+8Z0WgXDqg8V4wQWfr3LyRnmMQW2Pqp9UzIV54IXvbzDmHg1ybSrhfTW0Ue580S1wvBlrwwiNKydxehBrSE=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749051587; c=relaxed/simple;
bh=DRbtIFSLrs9jcYvzqOyx2Auzxn1+blLgpV3of5W2K3k=;
h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
To:Cc:Content-Type; b=gPQGyvifBcX7NtMrfwxwCET+/HILgs8Pdm2vFQZPClPoYjmcgwJUbUnmyIdB94pEe3YJVVrXNWTEhNLwc6rKtMDVFoyvDsjLnB8271ALshWu0SHU9e/bOYANUjvWz7Kf8oVTJcKV4qSnaH/ytjBRpXr9HdfaJNdHzU4CYbw800A=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=xLjRE2n+; arc=none smtp.client-ip=209.85.160.174
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com
Received: by mail-qt1-f174.google.com with SMTP id d75a77b69052e-4a58ef58a38so256981cf.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 08:39:45 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=google.com; s=20230601; t=1749051584; x=1749656384; darn=vger.kernel.org;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:from:to:cc:subject:date
:message-id:reply-to;
bh=jaIUTtis4g7w9h9/ucFToLx1kZiFQCisI5TV2JiWp7U=;
b=xLjRE2n+pBtwYK5s20RYtIokKS9LL/N5xTXdszymuijM1wbQcwE+g3xvSWAWa0N8a3
uW23ZgTUEM8jhbgtX9O2L9u17TsaGzVUjfy/KEAaiqh+vttvHcfso0fj5Wth1YELiTfY
UnCf9/Dask43QyEIVjNZqJwXHYQCUpUyZy9TjVpKKpWjdieyOAIHHCefZFQLl4pAeta5
ph1ur1J+oGZ+XsOXbxU38DuY1kCmcKdX1FF3A9y/D0DNF6d3ExHAod9ULxvtl4AxIoPe
wRuQgzlRALlI8E4qkLKtqpWgOJP5SaJSCid1Uopil15VxvI7cz7+anR5VJHnYuhv349q
nk8Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749051584; x=1749656384;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=jaIUTtis4g7w9h9/ucFToLx1kZiFQCisI5TV2JiWp7U=;
b=NSdH09Om+hWu5GWIZ0jxBdGXCl3Qf6d7AjRJXhauqgFfT1Ic/9cNPzXiYu6Yz+BeA+
p7NNupvP0f1xSYrbZn6UTvmG2t4f5hiL72MqKhlOJaw2x3hDZvRYqhC8tDMW7iWm+8jt
kA/+X1AI55J4cEF19/pWTuAF01zw+aLaOpFQ9C00F4cmmRT65BK6r4IficG/hrj4msgJ
ZGn6ovr9IYFOEL315m5LRmmsXW/9j2Bp1m7wUHYRtZClM04bh5rTWJxmBR3XOOoegZxm
5M6wZmU7SPS4BVvTLQdyjcs+UbaYD1IJKOoiANpETwZ/jtqNjFN/0aHE0heXtLEodvlW
BltA==
X-Forwarded-Encrypted: i=1; AJvYcCVcDHANSHnLV8kZPXo9Bw+HUM/gKpuG8ZaPpUcicM4HbHg0YmiUxReIXu1r7M50pgqeE4mhycec47UhKxU=@vger.kernel.org
X-Gm-Message-State: AOJu0YyOxk521E8QtSdX2Xmt52BVRHg7mReDaq5znHoClkqxSCuzrXar
GAoBlU5t/o43yIcpFLSEi2ECmSFG674Nkv3iqV6R0TSXy2P3iBmfNiNFiy91XAl72lO2pHLcPvS
zylcfuQqU6mrJDHqoQ1e0FSN0LGNz1kT/zUHEUXuh
X-Gm-Gg: ASbGncs4jOiTHpnN35bjE2M+85hEnvRSSY2PbdUadC1FPrWtAEfLlpZn1SxZAQruSWl
ZotGaTZBm+bkUQWevxpY5QrcgOXXZpt3ePtePgSGBqFnTSD9nYQYp2vAPwayNb3QrXS1XeXqE9d
9Exg77+bMlhRBRHN1Sohiuu1AxxiVkcQGzI8hPb04k6JqGz8HzRTRc+BDbzSLhnHBCzamUf5UP
X-Google-Smtp-Source: AGHT+IGRNN0Nu/Cd9xexZVozmzGYncXDcXneYvDGwMtEg8bwYQBRyVY6g+btTzUvAuW4Pg8yQBu3fuKnwJ8vlqK4mkY=
X-Received: by 2002:a05:622a:551b:b0:494:b641:4851 with SMTP id
d75a77b69052e-4a5a60fed52mr4023891cf.27.1749051583921; Wed, 04 Jun 2025
08:39:43 -0700 (PDT)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
References: <20250604151038.21968-1-ryncsn@xxxxxxxxx> <aEBnjWkghvXqlYZo@x1.local>
In-Reply-To: <aEBnjWkghvXqlYZo@x1.local>
From: Suren Baghdasaryan <surenb@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 08:39:32 -0700
X-Gm-Features: AX0GCFsWpIOVI6OZ80FViRxGFHREe5YmcX2RyGPtytnkb9wTVut9NUMVmwCE9zc
Message-ID: <CAJuCfpHC3eZuTWtzafbNWQHpKxx+vsLkXQcaf5_bZUtjbJos+g@xxxxxxxxxxxxxx>
Subject: Re: [PATCH v4] mm: userfaultfd: fix race of userfaultfd_move and swap cache
To: Peter Xu <peterx@xxxxxxxxxx>
Cc: Kairui Song <kasong@xxxxxxxxxxx>, linux-mm@xxxxxxxxx,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Barry Song <21cnbao@xxxxxxxxx>,
Andrea Arcangeli <aarcange@xxxxxxxxxx>, David Hildenbrand <david@xxxxxxxxxx>,
Lokesh Gidra <lokeshgidra@xxxxxxxxxx>, stable@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-11.0 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 4, 2025 at 8:34=E2=80=AFAM Peter Xu <peterx@xxxxxxxxxx> wrote:
On Wed, Jun 04, 2025 at 11:10:38PM +0800, Kairui Song wrote:
> From: Kairui Song <kasong@xxxxxxxxxxx>
>
> On seeing a swap entry PTE, userfaultfd_move does a lockless swap
> cache lookup, and tries to move the found folio to the faulting vma.
> Currently, it relies on checking the PTE value to ensure that the moved
> folio still belongs to the src swap entry and that no new folio has
> been added to the swap cache, which turns out to be unreliable.
>
> While working and reviewing the swap table series with Barry, following
> existing races are observed and reproduced [1]:
>
> In the example below, move_pages_pte is moving src_pte to dst_pte,
> where src_pte is a swap entry PTE holding swap entry S1, and S1
> is not in the swap cache:
>
> CPU1 CPU2
> userfaultfd_move
> move_pages_pte()
> entry =3D pte_to_swp_entry(orig_src_pte);
> // Here it got entry =3D S1
> ... < interrupted> ...
> <swapin src_pte, alloc and use folio=
A>
> // folio A is a new allocated folio
> // and get installed into src_pte
> <frees swap entry S1>
> // src_pte now points to folio A, S1
> // has swap count =3D=3D 0, it can b=
e freed
> // by folio_swap_swap or swap
> // allocator's reclaim.
> <try to swap out another folio B>
> // folio B is a folio in another VMA=
.
> <put folio B to swap cache using S1 =
> // S1 is freed, folio B can use it
> // for swap out with no problem.
> ...
> folio =3D filemap_get_folio(S1)
> // Got folio B here !!!
> ... < interrupted again> ...
> <swapin folio B and free S1>
> // Now S1 is free to be used again.
> <swapout src_pte & folio A using S1>
> // Now src_pte is a swap entry PTE
> // holding S1 again.
> folio_trylock(folio)
> move_swap_pte
> double_pt_lock
> is_pte_pages_stable
> // Check passed because src_pte =3D=3D S1
> folio_move_anon_rmap(...)
> // Moved invalid folio B here !!!
>
> The race window is very short and requires multiple collisions of
> multiple rare events, so it's very unlikely to happen, but with a
> deliberately constructed reproducer and increased time window, it
> can be reproduced easily.
>
> This can be fixed by checking if the folio returned by filemap is the
> valid swap cache folio after acquiring the folio lock.
>
> Another similar race is possible: filemap_get_folio may return NULL, bu=
t
> folio (A) could be swapped in and then swapped out again using the same
> swap entry after the lookup. In such a case, folio (A) may remain in th=
e
> swap cache, so it must be moved too:
>
> CPU1 CPU2
> userfaultfd_move
> move_pages_pte()
> entry =3D pte_to_swp_entry(orig_src_pte);
> // Here it got entry =3D S1, and S1 is not in swap cache
> folio =3D filemap_get_folio(S1)
> // Got NULL
> ... < interrupted again> ...
> <swapin folio A and free S1>
> <swapout folio A re-using S1>
> move_swap_pte
> double_pt_lock
> is_pte_pages_stable
> // Check passed because src_pte =3D=3D S1
> folio_move_anon_rmap(...)
> // folio A is ignored !!!
>
> Fix this by checking the swap cache again after acquiring the src_pte
> lock. And to avoid the filemap overhead, we check swap_map directly [2]=
.
>
> The SWP_SYNCHRONOUS_IO path does make the problem more complex, but so
> far we don't need to worry about that, since folios can only be exposed
> to the swap cache in the swap out path, and this is covered in this
> patch by checking the swap cache again after acquiring the src_pte lock=
.
>
> Testing with a simple C program that allocates and moves several GB of
> memory did not show any observable performance change.
>
> Cc: <stable@xxxxxxxxxxxxxxx>
> Fixes: adef440691ba ("userfaultfd: UFFDIO_MOVE uABI")
> Closes: https://lore.kernel.org/linux-mm/CAMgjq7B1K=3D6OOrK2OUZ0-tqCzi+=
EJt+2_K97TPGoSt=3D9+JwP7Q@xxxxxxxxxxxxxx/ [1]
> Link: https://lore.kernel.org/all/CAGsJ_4yJhJBo16XhiC-nUzSheyX-V3-nFE+t=
Ai=3D8Y560K8eT=3DA@xxxxxxxxxxxxxx/ [2]
> Signed-off-by: Kairui Song <kasong@xxxxxxxxxxx>
> Reviewed-by: Lokesh Gidra <lokeshgidra@xxxxxxxxxx>
Very interesting races. Thanks for the fix!
Reviewed-by: Suren Baghdasaryan <surenb@xxxxxxxxxx>
>
> ---
>
> V1: https://lore.kernel.org/linux-mm/20250530201710.81365-1-ryncsn@gmai=
l.com/
> Changes:
> - Check swap_map instead of doing a filemap lookup after acquiring the
> PTE lock to minimize critical section overhead [ Barry Song, Lokesh G=
idra ]
>
> V2: https://lore.kernel.org/linux-mm/20250601200108.23186-1-ryncsn@gmai=
l.com/
> Changes:
> - Move the folio and swap check inside move_swap_pte to avoid skipping
> the check and potential overhead [ Lokesh Gidra ]
> - Add a READ_ONCE for the swap_map read to ensure it reads a up to date=
d
> value.
>
> V3: https://lore.kernel.org/all/20250602181419.20478-1-ryncsn@xxxxxxxxx=
/
> Changes:
> - Add more comments and more context in commit message.
>
> mm/userfaultfd.c | 33 +++++++++++++++++++++++++++++++--
> 1 file changed, 31 insertions(+), 2 deletions(-)
>
> diff --git a/mm/userfaultfd.c b/mm/userfaultfd.c
> index bc473ad21202..8253978ee0fb 100644
> --- a/mm/userfaultfd.c
> +++ b/mm/userfaultfd.c
> @@ -1084,8 +1084,18 @@ static int move_swap_pte(struct mm_struct *mm, s=
truct vm_area_struct *dst_vma,
> pte_t orig_dst_pte, pte_t orig_src_pte,
> pmd_t *dst_pmd, pmd_t dst_pmdval,
> spinlock_t *dst_ptl, spinlock_t *src_ptl,
> - struct folio *src_folio)
> + struct folio *src_folio,
> + struct swap_info_struct *si, swp_entry_t entry)
> {
> + /*
> + * Check if the folio still belongs to the target swap entry afte=
r
> + * acquiring the lock. Folio can be freed in the swap cache while
> + * not locked.
> + */
> + if (src_folio && unlikely(!folio_test_swapcache(src_folio) ||
> + entry.val !=3D src_folio->swap.val))
> + return -EAGAIN;
> +
> double_pt_lock(dst_ptl, src_ptl);
>
> if (!is_pte_pages_stable(dst_pte, src_pte, orig_dst_pte, orig_src=
_pte,
> @@ -1102,6 +1112,25 @@ static int move_swap_pte(struct mm_struct *mm, s=
truct vm_area_struct *dst_vma,
> if (src_folio) {
> folio_move_anon_rmap(src_folio, dst_vma);
> src_folio->index =3D linear_page_index(dst_vma, dst_addr)=
;
> + } else {
> + /*
> + * Check if the swap entry is cached after acquiring the =
src_pte
> + * lock. Otherwise, we might miss a newly loaded swap cac=
he folio.
> + *
> + * Check swap_map directly to minimize overhead, READ_ONC=
E is sufficient.
> + * We are trying to catch newly added swap cache, the onl=
y possible case is
> + * when a folio is swapped in and out again staying in sw=
ap cache, using the
> + * same entry before the PTE check above. The PTL is acqu=
ired and released
> + * twice, each time after updating the swap_map's flag. S=
o holding
> + * the PTL here ensures we see the updated value. False p=
ositive is possible,
> + * e.g. SWP_SYNCHRONOUS_IO swapin may set the flag withou=
t touching the
> + * cache, or during the tiny synchronization window betwe=
en swap cache and
> + * swap_map, but it will be gone very quickly, worst resu=
lt is retry jitters.
> + */
The comment above may not be the best I can think of, but I think I'm
already too harsh. :) That's good enough to me. It's also great to
mention the 2nd race too as Barry suggested in the commit log.
Thank you!
Acked-by: Peter Xu <peterx@xxxxxxxxxx>
> + if (READ_ONCE(si->swap_map[swp_offset(entry)]) & SWAP_HAS=
_CACHE) {
> + double_pt_unlock(dst_ptl, src_ptl);
> + return -EAGAIN;
> + }
> }
>
> orig_src_pte =3D ptep_get_and_clear(mm, src_addr, src_pte);
> @@ -1412,7 +1441,7 @@ static int move_pages_pte(struct mm_struct *mm, p=
md_t *dst_pmd, pmd_t *src_pmd,
> }
> err =3D move_swap_pte(mm, dst_vma, dst_addr, src_addr, ds=
t_pte, src_pte,
> orig_dst_pte, orig_src_pte, dst_pmd, dst_=
pmdval,
> - dst_ptl, src_ptl, src_folio);
> + dst_ptl, src_ptl, src_folio, si, entry);
> }
>
> out:
> --
> 2.49.0
>
--
Peter Xu
Return-Path: <linux-kernel+bounces-673470-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 371FF41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:40:26 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 54D0D18993D7
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:40:39 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id C7BDB19CC3D;
Wed, 4 Jun 2025 15:40:19 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="E4phkCij"
Received: from casper.infradead.org (casper.infradead.org [90.155.50.34])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9C9421624DD
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:40:17 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749051619; cv=none; b=jz/aA0LAqOwFc44Fvg3FiNBsC7MoNw0yRsGKdsgdzHcey6oFJbqyPxN8FVkwnaK4rpP4p1Q8Vt8XVsbe9kRlKcSW9fPsp9SMviXp5MASbgazJSH0VJhMYFVLHDniLr00JLhLtWr2m0R9l77W+qL6H0XT9maIspsyYBYNijhznRI=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749051619; c=relaxed/simple;
bh=9k+IRgTSKZB80UaCJ/K2fADj600IkaunTAaY/RF0md4=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=tJYXZnLqb/SycGHS6lwFHX/fsXZ1fdlb0hCQEbiIhi3I76WnW71He4qOfj4sEnAgkDIAwIMgmUaleleIUQUg7zQ9IG38x9NF+DBhMvARtolofdg9UwdKXcYx1+FNtoF9ZYLkEUwee0kBJDjLfFK0YR4jn7JZXhk1BfGbOTt3ItI=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=E4phkCij; arc=none smtp.client-ip=90.155.50.34
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org
Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type:
In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender
:Reply-To:Content-ID:Content-Description;
bh=lY5/eHfXEHJTJnTx5q7SCMuh6jpmPnlI0ihTHUK4t+Q=; b=E4phkCija5f77m5g1x7VKmJW1O
5gnGCw/ioBrmWwmD0OdMOb+tTEKpGrcf4iLG8lFu/bZC3eH/N3jsQHTYENMmjyRPuIGXCaxVR2dYQ
FTsD4qtxM4D3j2FqXa7um5MDaEAbMRq9D20Vbs387E88+SlcWQCOAeq6H7HzuFxhddAeHIFGJ8P7s
ly5VnVLYizCNI1OwS2mwk8LogiY3kbrXA40eaLa/7Sy/bu9iDBP5Z4th3pCZdvTuXEscjqkJxX1Xr
BaCK9oR3OXCi9p8/2ICU5G4X/FG5QihFeJlgE9ZR6ZdyPVg3+ck15rrywdVU4e0iggkCyNbB3qOKH
eSSSisqQ==;
Received: from [50.53.25.54] (helo=[192.168.254.17])
by casper.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux))
id 1uMqDo-00000003EYL-3ImA;
Wed, 04 Jun 2025 15:40:09 +0000
Message-ID: <6736f668-474f-4ec5-a1b6-04e29c5093b4@xxxxxxxxxxxxx>
Date: Wed, 4 Jun 2025 08:40:04 -0700
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH] mm/vmstat: Fix build with MEMCG=y and VM_EVENT_COUNTERS=n
To: "Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
David Hildenbrand <david@xxxxxxxxxx>
Cc: lorenzo.stoakes@xxxxxxxxxx, Liam.Howlett@xxxxxxxxxx, vbabka@xxxxxxx,
rppt@xxxxxxxxxx, surenb@xxxxxxxxxx, mhocko@xxxxxxxx, hannes@xxxxxxxxxxx,
shakeel.butt@xxxxxxxxx, muchun.song@xxxxxxxxx, linux-mm@xxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, Konstantin Khlebnikov <koct9i@xxxxxxxxx>
References: <20250604095111.533783-1-kirill.shutemov@xxxxxxxxxxxxxxx>
Content-Language: en-US
From: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
In-Reply-To: <20250604095111.533783-1-kirill.shutemov@xxxxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 6/4/25 2:51 AM, Kirill A. Shutemov wrote:
When compiling with MEMCG enabled but VM_EVENT_COUNTERS disabled,
BUILD_BUG_ON() is triggered in vmstat_start because the vmstat_text
array is larger than NR_VMSTAT_ITEMS.
This issue arises because some elements of the vmstat_text array are
present when either MEMCG or VM_EVENT_COUNTERS is enabled, but
NR_VMSTAT_ITEMS only accounts for these elements if VM_EVENT_COUNTERS is
enabled.
The recent change in the BUILD_BUG_ON() check made it more strict,
disallowing extra elements in the array, which revealed the issue.
Instead of adjusting the NR_VMSTAT_ITEMS definition to account for
MEMCG, make MEMCG select VM_EVENT_COUNTERS. VM_EVENT_COUNTERS is
enabled in most configurations anyway.
There is no need to backport this fix to stable trees. Without the
strict BUILD_BUG_ON(), the issue is not harmful. The elements in
question would only be read by the memcg code, not by /proc/vmstat.
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>
Reported-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Fixes: ebc5d83d0443 ("mm/memcontrol: use vmstat names for printing statistics")
Cc: Konstantin Khlebnikov <koct9i@xxxxxxxxx>
Tested-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Acked-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Thanks.
---
include/linux/vmstat.h | 4 ++--
init/Kconfig | 1 +
mm/vmstat.c | 4 ++--
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h
index b2ccb6845595..c287998908bf 100644
--- a/include/linux/vmstat.h
+++ b/include/linux/vmstat.h
@@ -507,7 +507,7 @@ static inline const char *lru_list_name(enum lru_list lru)
return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
}
-#if defined(CONFIG_VM_EVENT_COUNTERS) || defined(CONFIG_MEMCG)
+#if defined(CONFIG_VM_EVENT_COUNTERS)
static inline const char *vm_event_name(enum vm_event_item item)
{
return vmstat_text[NR_VM_ZONE_STAT_ITEMS +
@@ -516,7 +516,7 @@ static inline const char *vm_event_name(enum vm_event_item item)
NR_VM_STAT_ITEMS +
item];
}
-#endif /* CONFIG_VM_EVENT_COUNTERS || CONFIG_MEMCG */
+#endif /* CONFIG_VM_EVENT_COUNTERS */
#ifdef CONFIG_MEMCG
diff --git a/init/Kconfig b/init/Kconfig
index ab83abe0fd9d..dd332cac6036 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -989,6 +989,7 @@ config MEMCG
select PAGE_COUNTER
select EVENTFD
select SLAB_OBJ_EXT
+ select VM_EVENT_COUNTERS
help
Provides control over the memory footprint of tasks in a cgroup.
diff --git a/mm/vmstat.c b/mm/vmstat.c
index 27dc37168cfd..c3114b8826e4 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -1301,7 +1301,7 @@ const char * const vmstat_text[] = {
[I(NR_MEMMAP_BOOT_PAGES)] = "nr_memmap_boot_pages",
#undef I
-#if defined(CONFIG_VM_EVENT_COUNTERS) || defined(CONFIG_MEMCG)
+#if defined(CONFIG_VM_EVENT_COUNTERS)
/* enum vm_event_item counters */
#define I(x) (NR_VM_ZONE_STAT_ITEMS + NR_VM_NUMA_EVENT_ITEMS + \
NR_VM_NODE_STAT_ITEMS + NR_VM_STAT_ITEMS + x)
@@ -1498,7 +1498,7 @@ const char * const vmstat_text[] = {
#endif
#endif
#undef I
-#endif /* CONFIG_VM_EVENT_COUNTERS || CONFIG_MEMCG */
+#endif /* CONFIG_VM_EVENT_COUNTERS */
};
#endif /* CONFIG_PROC_FS || CONFIG_SYSFS || CONFIG_NUMA || CONFIG_MEMCG */
--
~Randy
Return-Path: <linux-kernel+bounces-673467-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id A465541E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:40:44 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 843DF7AC4C6
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:34:57 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 138581A316C;
Wed, 4 Jun 2025 15:35:52 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="aH89siRN"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 681B21A2391
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:35:49 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749051351; cv=none; b=WOMMsFPvzqsTQysTZs4PPs6SF2li48Vds6rLbxBjLN2qrEx3y054cV2dL4+v2cng47kdh/ZQ0zt2L/9FLkk28hAklqSv4HTvR1mFVPXUPLH0Ki0gccjIBZJE6Mcgzxr2pjnG61EpZfzLLKRqg4FaMAfn6NR4keASK0WVqPZRad0=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749051351; c=relaxed/simple;
bh=VHSJz1dRNiP2G582gS4azghf/c6ZHxaFNwWXYVETiBI=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=ZUhHiAqYg1euW+1E1T/5zfF5XMM/JX6ShPDTk0NYpOsgGHWHPx56UdxINPBoQ+J6NCs5Sr+KaHQ1/MlAJ68TVoDqNygfOmU4MTk9AOIeQ7I1M1Y3L1JQEQCJUmXUP9hrs0o4IzwJnKygVTMn8aL+xbH44JyIg+0Bq0/bHBC/AJI=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=aH89siRN; arc=none smtp.client-ip=170.10.133.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749051347;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=ctKc+hSqozlgg1MRW5+HjrFvzU5NiOJ35GVuMd+Z1RY=;
b=aH89siRN+5YTejoSIp7qdHp76EDORqXHjrrSK4Z8COeXbiL5qGbiMNwCMbl0lGbWaiOH5x
RXWF+Da+YyI5vO+cQ8iRewlDPaRsNKYSw72BpiIXWykpXdBQDs4P0JQFj/rdpKdrxXMMQ7
9rQiq/4OzpfMN27wTGXMKoaVU+kT5qE=
Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com
[209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-562-1YVAAIHqNk2GoabjAz2izg-1; Wed, 04 Jun 2025 11:35:44 -0400
X-MC-Unique: 1YVAAIHqNk2GoabjAz2izg-1
X-Mimecast-MFC-AGG-ID: 1YVAAIHqNk2GoabjAz2izg_1749051343
Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-3a4f3796779so4282823f8f.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 08:35:44 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749051343; x=1749656143;
h=content-transfer-encoding:in-reply-to:autocrypt:content-language
:from:references:cc:to:subject:user-agent:mime-version:date
:message-id:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=ctKc+hSqozlgg1MRW5+HjrFvzU5NiOJ35GVuMd+Z1RY=;
b=qDeglnMmOMtRmmJPipEbl2QLvJRXc+VBqGVMzoODy92if91Mf+zWkPaCLXWxr91bi4
CjVfIkn+qg7L7aglKsKqjIWOI64kytBnLrtlyPoKJ85GkP13LHBD9eTJGnNr++QCWPMi
X0F+soFnjPTKjElEyn/4lFESJoQ89IrXrorZqT0PK5lG76NjJw1Ru55FS9GszTt5PYwC
uANsjYHrU65exuNNrLSYAF+yQ7wII8nrEzXCBtD8K91BP7z5vUYFUuMR73KU21wT8XOu
C21WGO+BquBKi4USu1ICK1Fp1Wid48EBB6fNhjEoUvNgfAuZShTDS+PA54d/pa3uMYsS
kpXw==
X-Forwarded-Encrypted: i=1; AJvYcCWuxfzVr98hX1HjYP5/w06tcAaFnJv/F1M/UwJDYJsdbq5nf01HZUG8REOY+TMF/8bIwap0NK11dmHP/2w=@vger.kernel.org
X-Gm-Message-State: AOJu0Yy4NlvI/7GJBLeRgDy5e/sULMJPq4p7Ar081COgtD7sGhrkgLOw
wfrysO4fYFBsK3Wu6a7wV55Vj2akvk/hXqKd7TauTCiaJxMR6KTkdfwURZZTzZ9zj00CZXdhGRw
YMs94cAuwCx5ecqFZ/Nq7xWIcl2y2ApCgTqssBwhNNI3gXc7B0P5L4MfJ0I1ZfYCYQQ==
X-Gm-Gg: ASbGnct7+pH1AbaFCCV85j8lil/xwXx/+YJstfwtbkWCuLLa4/gnP94azvZPWqumZeE
WpvE/Z4ynSI41arwNXMLwXhclAqtrvNwEb7iRW50KBqLKtRzQaYh2TEXFUVKpzMHuY+LADv082x
SbEa7gdac3k99+ref6aGMUPmWrK43+5ZYqPzigcG1aKkQI6w7TCej+mcrDt2E+KbfcILHS+sUVD
LGqpgfE2xetMq1hTvO9f4zeA3u6SNgy2ktlgr88UGHKC4H0qmX3lop6IhSoWXcu6t+vVovGXVOz
cMVIk/4AejJGBA==
X-Received: by 2002:a05:6000:250f:b0:3a4:e090:2274 with SMTP id ffacd0b85a97d-3a51d8f60efmr2697128f8f.8.1749051342977;
Wed, 04 Jun 2025 08:35:42 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IFgY+Mu+j0HY1zwFI63+9IOyhC3SrLeQUeGjZ9/kwUl9SqqTdNHZd6uwDOFaJ98tY42b+3myQ==
X-Received: by 2002:a05:6000:250f:b0:3a4:e090:2274 with SMTP id ffacd0b85a97d-3a51d8f60efmr2697105f8f.8.1749051342578;
Wed, 04 Jun 2025 08:35:42 -0700 (PDT)
Received: from [192.168.10.81] ([151.49.64.79])
by smtp.googlemail.com with ESMTPSA id ffacd0b85a97d-3a4efe6ca46sm22536035f8f.31.2025.06.04.08.35.41
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 08:35:42 -0700 (PDT)
Message-ID: <e826e3e8-1aec-478b-8ffa-d1807b3d8301@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 17:35:41 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH 08/28] KVM: nSVM: Use dedicated array of MSRPM offsets to
merge L0 and L1 bitmaps
To: Sean Christopherson <seanjc@xxxxxxxxxx>
Cc: kvm@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
Borislav Petkov <bp@xxxxxxxxx>, Xin Li <xin@xxxxxxxxx>,
Chao Gao <chao.gao@xxxxxxxxx>, Dapeng Mi <dapeng1.mi@xxxxxxxxxxxxxxx>
References: <20250529234013.3826933-1-seanjc@xxxxxxxxxx>
<20250529234013.3826933-9-seanjc@xxxxxxxxxx>
From: Paolo Bonzini <pbonzini@xxxxxxxxxx>
Content-Language: en-US
Autocrypt: addr=pbonzini@xxxxxxxxxx; keydata=
xsEhBFRCcBIBDqDGsz4K0zZun3jh+U6Z9wNGLKQ0kSFyjN38gMqU1SfP+TUNQepFHb/Gc0E2
CxXPkIBTvYY+ZPkoTh5xF9oS1jqI8iRLzouzF8yXs3QjQIZ2SfuCxSVwlV65jotcjD2FTN04
hVopm9llFijNZpVIOGUTqzM4U55sdsCcZUluWM6x4HSOdw5F5Utxfp1wOjD/v92Lrax0hjiX
DResHSt48q+8FrZzY+AUbkUS+Jm34qjswdrgsC5uxeVcLkBgWLmov2kMaMROT0YmFY6A3m1S
P/kXmHDXxhe23gKb3dgwxUTpENDBGcfEzrzilWueOeUWiOcWuFOed/C3SyijBx3Av/lbCsHU
Vx6pMycNTdzU1BuAroB+Y3mNEuW56Yd44jlInzG2UOwt9XjjdKkJZ1g0P9dwptwLEgTEd3Fo
UdhAQyRXGYO8oROiuh+RZ1lXp6AQ4ZjoyH8WLfTLf5g1EKCTc4C1sy1vQSdzIRu3rBIjAvnC
tGZADei1IExLqB3uzXKzZ1BZ+Z8hnt2og9hb7H0y8diYfEk2w3R7wEr+Ehk5NQsT2MPI2QBd
wEv1/Aj1DgUHZAHzG1QN9S8wNWQ6K9DqHZTBnI1hUlkp22zCSHK/6FwUCuYp1zcAEQEAAc0j
UGFvbG8gQm9uemluaSA8cGJvbnppbmlAcmVkaGF0LmNvbT7CwU0EEwECACMFAlRCcBICGwMH
CwkIBwMCAQYVCAIJCgsEFgIDAQIeAQIXgAAKCRB+FRAMzTZpsbceDp9IIN6BIA0Ol7MoB15E
11kRz/ewzryFY54tQlMnd4xxfH8MTQ/mm9I482YoSwPMdcWFAKnUX6Yo30tbLiNB8hzaHeRj
jx12K+ptqYbg+cevgOtbLAlL9kNgLLcsGqC2829jBCUTVeMSZDrzS97ole/YEez2qFpPnTV0
VrRWClWVfYh+JfzpXmgyhbkuwUxNFk421s4Ajp3d8nPPFUGgBG5HOxzkAm7xb1cjAuJ+oi/K
CHfkuN+fLZl/u3E/fw7vvOESApLU5o0icVXeakfSz0LsygEnekDbxPnE5af/9FEkXJD5EoYG
SEahaEtgNrR4qsyxyAGYgZlS70vkSSYJ+iT2rrwEiDlo31MzRo6Ba2FfHBSJ7lcYdPT7bbk9
AO3hlNMhNdUhoQv7M5HsnqZ6unvSHOKmReNaS9egAGdRN0/GPDWr9wroyJ65ZNQsHl9nXBqE
AukZNr5oJO5vxrYiAuuTSd6UI/xFkjtkzltG3mw5ao2bBpk/V/YuePrJsnPFHG7NhizrxttB
nTuOSCMo45pfHQ+XYd5K1+Cv/NzZFNWscm5htJ0HznY+oOsZvHTyGz3v91pn51dkRYN0otqr
bQ4tlFFuVjArBZcapSIe6NV8C4cEiSTOwE0EVEJx7gEIAMeHcVzuv2bp9HlWDp6+RkZe+vtl
KwAHplb/WH59j2wyG8V6i33+6MlSSJMOFnYUCCL77bucx9uImI5nX24PIlqT+zasVEEVGSRF
m8dgkcJDB7Tps0IkNrUi4yof3B3shR+vMY3i3Ip0e41zKx0CvlAhMOo6otaHmcxr35sWq1Jk
tLkbn3wG+fPQCVudJJECvVQ//UAthSSEklA50QtD2sBkmQ14ZryEyTHQ+E42K3j2IUmOLriF
dNr9NvE1QGmGyIcbw2NIVEBOK/GWxkS5+dmxM2iD4Jdaf2nSn3jlHjEXoPwpMs0KZsgdU0pP
JQzMUMwmB1wM8JxovFlPYrhNT9MAEQEAAcLBMwQYAQIACQUCVEJx7gIbDAAKCRB+FRAMzTZp
sadRDqCctLmYICZu4GSnie4lKXl+HqlLanpVMOoFNnWs9oRP47MbE2wv8OaYh5pNR9VVgyhD
OG0AU7oidG36OeUlrFDTfnPYYSF/mPCxHttosyt8O5kabxnIPv2URuAxDByz+iVbL+RjKaGM
GDph56ZTswlx75nZVtIukqzLAQ5fa8OALSGum0cFi4ptZUOhDNz1onz61klD6z3MODi0sBZN
Aj6guB2L/+2ZwElZEeRBERRd/uommlYuToAXfNRdUwrwl9gRMiA0WSyTb190zneRRDfpSK5d
usXnM/O+kr3Dm+Ui+UioPf6wgbn3T0o6I5BhVhs4h4hWmIW7iNhPjX1iybXfmb1gAFfjtHfL
xRUr64svXpyfJMScIQtBAm0ihWPltXkyITA92ngCmPdHa6M1hMh4RDX+Jf1fiWubzp1voAg0
JBrdmNZSQDz0iKmSrx8xkoXYfA3bgtFN8WJH2xgFL28XnqY4M6dLhJwV3z08tPSRqYFm4NMP
dRsn0/7oymhneL8RthIvjDDQ5ktUjMe8LtHr70OZE/TT88qvEdhiIVUogHdo4qBrk41+gGQh
b906Dudw5YhTJFU3nC6bbF2nrLlB4C/XSiH76ZvqzV0Z/cAMBo5NF/w=
In-Reply-To: <20250529234013.3826933-9-seanjc@xxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 5/30/25 01:39, Sean Christopherson wrote:
Use a dedicated array of MSRPM offsets to merge L0 and L1 bitmaps, i.e. to
merge KVM's vmcb01 bitmap with L1's vmcb12 bitmap. This will eventually
allow for the removal of direct_access_msrs, as the only path where
tracking the offsets is truly justified is the merge for nested SVM, where
merging in chunks is an easy way to batch uaccess reads/writes.
Opportunistically omit the x2APIC MSRs from the merge-specific array
instead of filtering them out at runtime.
Note, disabling interception of XSS, EFER, PAT, GHCB, and TSC_AUX is
mutually exclusive with nested virtualization, as KVM passes through the
MSRs only for SEV-ES guests, and KVM doesn't support nested virtualization
for SEV+ guests. Defer removing those MSRs to a future cleanup in order
to make this refactoring as benign as possible.
Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
---
arch/x86/kvm/svm/nested.c | 72 +++++++++++++++++++++++++++++++++------
arch/x86/kvm/svm/svm.c | 4 +++
arch/x86/kvm/svm/svm.h | 2 ++
3 files changed, 67 insertions(+), 11 deletions(-)
diff --git a/arch/x86/kvm/svm/nested.c b/arch/x86/kvm/svm/nested.c
index 89a77f0f1cc8..e53020939e60 100644
--- a/arch/x86/kvm/svm/nested.c
+++ b/arch/x86/kvm/svm/nested.c
@@ -184,6 +184,64 @@ void recalc_intercepts(struct vcpu_svm *svm)
}
}
+static int nested_svm_msrpm_merge_offsets[9] __ro_after_init;
+static int nested_svm_nr_msrpm_merge_offsets __ro_after_init;
+
+int __init nested_svm_init_msrpm_merge_offsets(void)
+{
+ const u32 merge_msrs[] = {
"static const", please.
Paolo
+ MSR_STAR,
+ MSR_IA32_SYSENTER_CS,
+ MSR_IA32_SYSENTER_EIP,
+ MSR_IA32_SYSENTER_ESP,
+ #ifdef CONFIG_X86_64
+ MSR_GS_BASE,
+ MSR_FS_BASE,
+ MSR_KERNEL_GS_BASE,
+ MSR_LSTAR,
+ MSR_CSTAR,
+ MSR_SYSCALL_MASK,
+ #endif
+ MSR_IA32_SPEC_CTRL,
+ MSR_IA32_PRED_CMD,
+ MSR_IA32_FLUSH_CMD,
+ MSR_IA32_LASTBRANCHFROMIP,
+ MSR_IA32_LASTBRANCHTOIP,
+ MSR_IA32_LASTINTFROMIP,
+ MSR_IA32_LASTINTTOIP,
+
+ MSR_IA32_XSS,
+ MSR_EFER,
+ MSR_IA32_CR_PAT,
+ MSR_AMD64_SEV_ES_GHCB,
+ MSR_TSC_AUX,
+ };
+ int i, j;
+
+ for (i = 0; i < ARRAY_SIZE(merge_msrs); i++) {
+ u32 offset = svm_msrpm_offset(merge_msrs[i]);
+
+ if (WARN_ON(offset == MSR_INVALID))
+ return -EIO;
+
+ for (j = 0; j < nested_svm_nr_msrpm_merge_offsets; j++) {
+ if (nested_svm_msrpm_merge_offsets[j] == offset)
+ break;
+ }
+
+ if (j < nested_svm_nr_msrpm_merge_offsets)
+ continue;
+
+ if (WARN_ON(j >= ARRAY_SIZE(nested_svm_msrpm_merge_offsets)))
+ return -EIO;
+
+ nested_svm_msrpm_merge_offsets[j] = offset;
+ nested_svm_nr_msrpm_merge_offsets++;
+ }
+
+ return 0;
+}
+
/*
* Merge L0's (KVM) and L1's (Nested VMCB) MSR permission bitmaps. The function
* is optimized in that it only merges the parts where KVM MSR permission bitmap
@@ -216,19 +274,11 @@ static bool nested_svm_merge_msrpm(struct kvm_vcpu *vcpu)
if (!(vmcb12_is_intercept(&svm->nested.ctl, INTERCEPT_MSR_PROT)))
return true;
- for (i = 0; i < MSRPM_OFFSETS; i++) {
- u32 value, p;
+ for (i = 0; i < nested_svm_nr_msrpm_merge_offsets; i++) {
+ const int p = nested_svm_msrpm_merge_offsets[i];
+ u32 value;
u64 offset;
- if (msrpm_offsets[i] == 0xffffffff)
- break;
-
- p = msrpm_offsets[i];
-
- /* x2apic msrs are intercepted always for the nested guest */
- if (is_x2apic_msrpm_offset(p))
- continue;
-
offset = svm->nested.ctl.msrpm_base_pa + (p * 4);
if (kvm_vcpu_read_guest(vcpu, offset, &value, 4))
diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
index 1c70293400bc..84dd1f220986 100644
--- a/arch/x86/kvm/svm/svm.c
+++ b/arch/x86/kvm/svm/svm.c
@@ -5689,6 +5689,10 @@ static int __init svm_init(void)
if (!kvm_is_svm_supported())
return -EOPNOTSUPP;
+ r = nested_svm_init_msrpm_merge_offsets();
+ if (r)
+ return r;
+
r = kvm_x86_vendor_init(&svm_init_ops);
if (r)
return r;
diff --git a/arch/x86/kvm/svm/svm.h b/arch/x86/kvm/svm/svm.h
index 909b9af6b3c1..0a8041d70994 100644
--- a/arch/x86/kvm/svm/svm.h
+++ b/arch/x86/kvm/svm/svm.h
@@ -686,6 +686,8 @@ static inline bool nested_exit_on_nmi(struct vcpu_svm *svm)
return vmcb12_is_intercept(&svm->nested.ctl, INTERCEPT_NMI);
}
+int __init nested_svm_init_msrpm_merge_offsets(void);
+
int enter_svm_guest_mode(struct kvm_vcpu *vcpu,
u64 vmcb_gpa, struct vmcb *vmcb12, bool from_vmrun);
void svm_leave_nested(struct kvm_vcpu *vcpu);
Return-Path: <linux-kernel+bounces-673468-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 51A2D41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:41:06 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id BD2BE7ACB94
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:35:35 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 173C619C558;
Wed, 4 Jun 2025 15:36:47 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gXBTY03Z"
Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id CE4AE18A6DF;
Wed, 4 Jun 2025 15:36:43 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.41
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749051406; cv=none; b=qrlJErJFdmT+k4C06ZDzfec8myZRb0qUkdP8lnGHdzK0iOdofQVvwuew74VUaqiBYajZJCr1WInKel2oVFo5I7kMROrkUFX2tvhjc1sJypP/kkc3EVLYzeI0PXzUmxAASXwPWscmQI87sruJAkf+b5dzOHYm2YNm6U4Y4ZdVi3I=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749051406; c=relaxed/simple;
bh=VAVBXJfyud+eYn9s3sAYWNbfc3RcXs5f9i6EwU+Eguk=;
h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=EpGaxnEUKI8yyXZ1x5IRYlL6uaZnW7ZU0rBI+JseJ0zWCGGO4QpnLy2XvEvvroe/OBw7sbpUqUK0iUQTNRVyedhYvfeDTs+9avY+tRFdsWGALQxTTj3WWAZqjV7pyCNyj7DWh5F2kVHIAUfIYbHsIMZGBYZhY3LTKNZgNpRjIcM=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=gXBTY03Z; arc=none smtp.client-ip=209.85.128.41
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-451e2f0d9c2so194305e9.1;
Wed, 04 Jun 2025 08:36:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1749051402; x=1749656202; darn=vger.kernel.org;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:from:to:cc:subject:date:message-id:reply-to;
bh=po4hRDSGCZuh9pjG/L2z6feCTEmaDMC+4+ptAw6xPXg=;
b=gXBTY03ZWKa+yDVJZmToZ8R6mJBCzRI9GlR+wcgEcJmXAQ3LCzYAaldxgkX8j1yK/D
XjNXXcXyOfnuYR/t5wuV44/4kxTH8R2knEgqNYYXJLLjYSJWoCPEYj329mXI37al9tqA
C9OIAa7lcen8yCUJt9wGCr6/bpNN4ndT/0B8QPdKBp5klRG5Br62mHLXUatTjCiN4FjA
LDkM86rhFkqt2YHsuAtKDTOwgDaYMbe50ZT3loIiktVFTEDnngodhZYQKGfZDT+FCBcA
O573KwFa/sFp1vAS2NvlPPhik/yEIAG4MaiWY7B6IvnYLbSyQ21MSCG1PADki+/437zE
/G2g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749051402; x=1749656202;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=po4hRDSGCZuh9pjG/L2z6feCTEmaDMC+4+ptAw6xPXg=;
b=baZFjT54vNrSUrPSXn587KGXOKAuPe7g2u4aRCq52CfFg5e7zCotmJtThIsVnnwO8g
6+mWz1Zv+P96g19gnQxwrBQIgyHHLvjAoWkwS9OQf2AZ3OqPqxDeO7DYEwpxqtdGOKO0
JUZaU5/04kn9aDt4PWp22tWE8RQqzyKTiZYepD7wOGHgwpbbLSslmQ8aKi4xK4eWMajZ
YTfgIus0HDfslkyN8gcRtTv0Gt2HGlZz8cBTJuLIxf5SNN4KroOP95uo4KDBnhYWFhtZ
qx+lnfmtJ8T4uM544foEW4RpG3/10UtkAgsOR5evSqxaoFQfInkzWPguXdXz6qOEc0Rp
0quA==
X-Forwarded-Encrypted: i=1; AJvYcCX3xRIR+P0UCoknz9o1Adi15PVwrwxSCfscby0OWE0d80MGYctvaSwq0QHy9qSgDjQJdQbcRBr+yvXhdto=@vger.kernel.org
X-Gm-Message-State: AOJu0YzOoBlgNnZ0tPn3XGJnDHYyOBGu924r8dD+jR9Gs4vp9dwjlFRh
t7Kp5/sLU+mRYvLjWTcXhHqJaN4FQ++Cfx2AIK9wDHflQ2eAa/GHTd9p3Mk47j6k
X-Gm-Gg: ASbGncvmZP2f6BEo83CCc4mK0K3EjRRJWFyvWPMURvR/X5nCeX+wgwDPtiz4MAo4WjT
h8KZSrhyoTMoW1nuOHd9laAdk41+JpTc8yb1yZR4JQP7jKnhXix1MfYzkhPeu+VvQn4PqaIMi43
KP/bRxiIFvLeqfLua5jnBuAXNqD3BjkpUo9Ea/Tg/i3rA4kMCZx9Ijjeu4MouVNZ590PobjaD/M
L+4FNpdMYTwfsEzkYTwJhMVWNnU4WvmOVSd3oz9Ihm4IJujoaEVRNxImLSLbytjYsYS5JvWSSui
etNMedefLU5jxzbd8InMTXv9dtZi5nAn8Nd/+vnnjxG9MVBVaHEwfoK9AbTBCOnXOx7f8Mj4VPi
2tXr7uiF5dqGGeMsugBEaVgIyEzDslIwOVdScJOvNDarFDQ==
X-Google-Smtp-Source: AGHT+IEiuiACGB5AsupJRC8pwPtzuBvDCDBA2W8wfZMmUi90dxJ20Ue6vRcyhVvfN7K/S5TF5w2O8g==
X-Received: by 2002:a05:600c:8b26:b0:43b:c6a7:ac60 with SMTP id 5b1f17b1804b1-451efe946acmr30208025e9.10.1749051401531;
Wed, 04 Jun 2025 08:36:41 -0700 (PDT)
Received: from Lord-Beerus.station (net-93-70-53-177.cust.vodafonedsl.it. [93.70.53.177])
by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-450d8012b09sm200711165e9.37.2025.06.04.08.36.40
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 08:36:41 -0700 (PDT)
From: Stefano Radaelli <stefano.radaelli21@xxxxxxxxx>
To: devicetree@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
Cc: othacehe@xxxxxxx,
Stefano Radaelli <stefano.radaelli21@xxxxxxxxx>,
Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>,
Shawn Guo <shawnguo@xxxxxxxxxx>,
Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>,
Pengutronix Kernel Team <kernel@xxxxxxxxxxxxxx>,
Fabio Estevam <festevam@xxxxxxxxx>,
imx@xxxxxxxxxxxxxxx,
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
Subject: [v2] arm64: dts: freescale: imx93-var-som: update eqos support for MaxLinear PHY
Date: Wed, 4 Jun 2025 17:35:09 +0200
Message-ID: <20250604153510.55689-1-stefano.radaelli21@xxxxxxxxx>
X-Mailer: git-send-email 2.43.0
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Variscite has updated the Ethernet PHY on the VAR-SOM-MX93 from the
Murata CYW43353 to the MaxLinear MXL86110, as documented in the
August 2023 revision changelog.
Link: https://variwiki.com/index.php?title=VAR-SOM-MX93_rev_changelog
Update the device tree accordingly:
- Drop the unused regulator node previously used to power the Murata PHY.
- Add support for the reset line using GPIO1_IO07 with proper timings.
- Configure the PHY LEDs via the LED subsystem under /sys/class/leds/,
leveraging the support implemented in the mxl86110 PHY driver
(drivers/net/phy/mxl-86110.c).
Two LEDs are defined to match the LED configuration on the Variscite
VAR-SOM Carrier Boards:
* LED@0: Yellow, netdev trigger.
* LED@1: Green, netdev trigger.
- Adjust the RGMII clock pad control settings to match the updated PHY
requirements.
These changes ensure proper PHY initialization and LED status indication
for the new MaxLinear MXL86110, improving board compatibility with the
latest hardware revision.
Signed-off-by: Stefano Radaelli <stefano.radaelli21@xxxxxxxxx>
---
v2:
- Clarified the use of 'rgmii' mode by adding a comment in the DT,
explaining that hardware delays are already implemented on the SOM PCB.
v1: https://lore.kernel.org/imx/20250603221416.74523-1-stefano.radaelli21@xxxxxxxxx/
.../boot/dts/freescale/imx93-var-som.dtsi | 45 ++++++++++++-------
1 file changed, 30 insertions(+), 15 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/imx93-var-som.dtsi b/arch/arm64/boot/dts/freescale/imx93-var-som.dtsi
index 783938245e4f..cea8d792328c 100644
--- a/arch/arm64/boot/dts/freescale/imx93-var-som.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx93-var-som.dtsi
@@ -19,26 +19,19 @@ mmc_pwrseq: mmc-pwrseq {
reset-gpios = <&gpio4 14 GPIO_ACTIVE_LOW>, /* WIFI_RESET */
<&gpio3 7 GPIO_ACTIVE_LOW>; /* WIFI_PWR_EN */
};
-
- reg_eqos_phy: regulator-eqos-phy {
- compatible = "regulator-fixed";
- pinctrl-names = "default";
- pinctrl-0 = <&pinctrl_reg_eqos_phy>;
- regulator-name = "eth_phy_pwr";
- regulator-min-microvolt = <3300000>;
- regulator-max-microvolt = <3300000>;
- gpio = <&gpio1 7 GPIO_ACTIVE_HIGH>;
- enable-active-high;
- startup-delay-us = <100000>;
- regulator-always-on;
- };
};
&eqos {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_eqos>;
+ /*
+ * The required RGMII TX and RX 2ns delays are implemented directly
+ * in hardware via passive delay elements on the SOM PCB.
+ * No delay configuration is needed in software via PHY driver.
+ */
phy-mode = "rgmii";
phy-handle = <ðphy0>;
+ snps,clk-csr = <5>;
status = "okay";
mdio {
@@ -51,6 +44,27 @@ ethphy0: ethernet-phy@0 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0>;
eee-broken-1000t;
+ reset-gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
+ reset-assert-us = <10000>;
+ reset-deassert-us = <100000>;
+ leds {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ led@0 {
+ reg = <0>;
+ color = <LED_COLOR_ID_YELLOW>;
+ function = LED_FUNCTION_LAN;
+ linux,default-trigger = "netdev";
+ };
+
+ led@1 {
+ reg = <1>;
+ color = <LED_COLOR_ID_GREEN>;
+ function = LED_FUNCTION_LAN;
+ linux,default-trigger = "netdev";
+ };
+ };
};
};
};
@@ -75,14 +89,15 @@ MX93_PAD_ENET1_RD0__ENET_QOS_RGMII_RD0 0x57e
MX93_PAD_ENET1_RD1__ENET_QOS_RGMII_RD1 0x57e
MX93_PAD_ENET1_RD2__ENET_QOS_RGMII_RD2 0x57e
MX93_PAD_ENET1_RD3__ENET_QOS_RGMII_RD3 0x57e
- MX93_PAD_ENET1_RXC__CCM_ENET_QOS_CLOCK_GENERATE_RX_CLK 0x5fe
+ MX93_PAD_ENET1_RXC__CCM_ENET_QOS_CLOCK_GENERATE_RX_CLK 0x58e
MX93_PAD_ENET1_RX_CTL__ENET_QOS_RGMII_RX_CTL 0x57e
MX93_PAD_ENET1_TD0__ENET_QOS_RGMII_TD0 0x57e
MX93_PAD_ENET1_TD1__ENET_QOS_RGMII_TD1 0x57e
MX93_PAD_ENET1_TD2__ENET_QOS_RGMII_TD2 0x57e
MX93_PAD_ENET1_TD3__ENET_QOS_RGMII_TD3 0x57e
- MX93_PAD_ENET1_TXC__CCM_ENET_QOS_CLOCK_GENERATE_TX_CLK 0x5fe
+ MX93_PAD_ENET1_TXC__CCM_ENET_QOS_CLOCK_GENERATE_TX_CLK 0x58e
MX93_PAD_ENET1_TX_CTL__ENET_QOS_RGMII_TX_CTL 0x57e
+ MX93_PAD_UART2_TXD__GPIO1_IO07 0x51e
>;
};
base-commit: a9dfb7db96f7bc1f30feae673aab7fdbfbc94e9c
prerequisite-patch-id: 2335ebcc90360b008c840e7edf7e34a595880edf
--
2.43.0
Return-Path: <linux-kernel+bounces-673471-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 9194C41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:42:12 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id CCF1E175D1C
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:42:13 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 681BA1A3029;
Wed, 4 Jun 2025 15:42:02 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b="MvpdE3Cp"
Received: from mail.zytor.com (terminus.zytor.com [198.137.202.136])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3DBE5146D6A;
Wed, 4 Jun 2025 15:41:59 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.136
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749051721; cv=none; b=K53DL7wL10StIAaUNLIBDP8nsx2I97xgdcRWwkuunuhmdWVuMtfpoyB4pIgv/K16IGXkKRew8sRDJUpCJdY7gNGhSQ9AdhQxdz7eOgspC0fRHWnKuf+8zN+6aN0oNkF11BZikOa/jtU8mhW0yQTd6Nzcd6yhQeKJfye8bb6H7T8=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749051721; c=relaxed/simple;
bh=rMc9LpBQ7NgcyLQMEUZqHc6toB/T5zpFVrloQqjog7U=;
h=Date:From:To:CC:Subject:In-Reply-To:References:Message-ID:
MIME-Version:Content-Type; b=fhl9/K6gSd9PKlp13x0v2eRagQc/JPjBSNI6WG1CVeqJgJo1SlVqtC0VHKJuZuSTCUcI+P8Vg4FMqaEoSCRBVpPpCd7s1gwp3x5u6SrGd5Qr+GAWZyi/I+9qtwMLJohZUW234gfFOMetjtvkQlGww4MA2GOvZcyr1hF8rZYXYJs=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com; spf=pass smtp.mailfrom=zytor.com; dkim=pass (2048-bit key) header.d=zytor.com header.i=@zytor.com header.b=MvpdE3Cp; arc=none smtp.client-ip=198.137.202.136
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=zytor.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=zytor.com
Received: from [127.0.0.1] (c-76-133-66-138.hsd1.ca.comcast.net [76.133.66.138])
(authenticated bits=0)
by mail.zytor.com (8.18.1/8.17.1) with ESMTPSA id 554FfQsf081940
(version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO);
Wed, 4 Jun 2025 08:41:26 -0700
DKIM-Filter: OpenDKIM Filter v2.11.0 mail.zytor.com 554FfQsf081940
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=zytor.com;
s=2025052101; t=1749051687;
bh=rMc9LpBQ7NgcyLQMEUZqHc6toB/T5zpFVrloQqjog7U=;
h=Date:From:To:CC:Subject:In-Reply-To:References:From;
b=MvpdE3CpvzKYKJG3yH7XtkkMgROUTMYdw8rO3e4a+GYp38wzCHaQXsv+V65NwyTbg
I1bkU7lonjMsEhnQ2FSKdRTeufL/h0+k+fVPA++oSUGRrVlbwjR2VCOEqIAi6igqPH
90b9QcJGKNqwwS0n/L34JOLxR5V9PBfW2vzDTHUq5k/0nr1afIZslRcNOXRYp3uLw/
lCK8Pt0FYC1WpVkosr+ROs3Bnzz1nJPpgi95PueEyDeZBWDmxHb2CQf1TfNbqSVntN
e89wmhZPGzgDgK4shpHpImP78rUi5sKlgV578xuIv8irkIezm696S/zV6JhrI1DeWf
iMpEqK+q+CNcg==
Date: Wed, 04 Jun 2025 08:41:25 -0700
From: "H. Peter Anvin" <hpa@xxxxxxxxx>
To: Sohil Mehta <sohil.mehta@xxxxxxxxx>, Xin Li <xin@xxxxxxxxx>,
x86@xxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
CC: Andy Lutomirski <luto@xxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>,
Ingo Molnar <mingo@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>,
Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>,
Peter Zijlstra <peterz@xxxxxxxxxxxxx>,
Sean Christopherson <seanjc@xxxxxxxxxx>,
Adrian Hunter <adrian.hunter@xxxxxxxxx>,
Kan Liang <kan.liang@xxxxxxxxxxxxxxx>, Tony Luck <tony.luck@xxxxxxxxx>,
Zhang Rui <rui.zhang@xxxxxxxxx>, Steven Rostedt <rostedt@xxxxxxxxxxx>,
Andrew Cooper <andrew.cooper3@xxxxxxxxxx>,
"Kirill A . Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx>,
Jacob Pan <jacob.pan@xxxxxxxxxxxxxxxxxxx>,
Andi Kleen <ak@xxxxxxxxxxxxxxx>, Kai Huang <kai.huang@xxxxxxxxx>,
Sandipan Das <sandipan.das@xxxxxxx>, linux-perf-users@xxxxxxxxxxxxxxx,
linux-edac@xxxxxxxxxxxxxxx, kvm@xxxxxxxxxxxxxxx,
linux-pm@xxxxxxxxxxxxxxx, linux-trace-kernel@xxxxxxxxxxxxxxx
Subject: =?US-ASCII?Q?Re=3A_=5BPATCH_v6_9/9=5D_x86/nmi=3A_Print_source_inf?=
=?US-ASCII?Q?ormation_with_the_unknown_NMI_console_message?=
User-Agent: K-9 Mail for Android
In-Reply-To: <fa948d41-3f95-4385-86c1-5c115561b939@xxxxxxxxx>
References: <20250513203803.2636561-1-sohil.mehta@xxxxxxxxx> <20250513203803.2636561-10-sohil.mehta@xxxxxxxxx> <31507dc8-b1dc-4df3-bc0c-6958b4218746@xxxxxxxxx> <fa948d41-3f95-4385-86c1-5c115561b939@xxxxxxxxx>
Message-ID: <8035D788-0F60-48B8-8B98-DC352EC9AE62@xxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain;
charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
I think printing the bitmap is fine for unknown bits set=2E=2E=2E after all=
, you might have surprise vectors=2E Maybe a list would be cleaner by some =
definition, but we already print bitmaps all over the place=2E It is not cr=
itical as long as the information necessary for debugging is there=2E In fa=
ct, it is often better for the information to be compact so users don't get=
tempted to abbreviate a bug report=2E
Return-Path: <linux-kernel+bounces-673472-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id B71AF41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:42:38 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 52A46189965A
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:42:52 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 0C54A19F48D;
Wed, 4 Jun 2025 15:42:30 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="qk3leJ1s"
Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 53BC3146D6A
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:42:27 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.47
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749051749; cv=none; b=qBGN/mlxeOJFYHUSP7sA4xDzi3ta0uF/bkekwg17I6bwJe0Nf6dgCTJl1RXgRzKjQDo4TLxVQPP+yX+rz5ilriUlgajVh+k+r+xrRHqyYx9+ORKMC0UlWy1lgT58d54NSxZdyR6uPMZZri4uk5oAlwrBR5gECRoyYAACzahH5XQ=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749051749; c=relaxed/simple;
bh=hhP/A7RLvwyRKQC/O9VmZbiaAZnWTJN7KauhrQU2JQE=;
h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
To:Cc:Content-Type; b=n6a7Xm2AcCqXTZ/wejHiLS8mvAcL3nheeAS9Cs0jK8Cz9H+Ftw0OPZn1FhnPztW9KQQXT1NgSYOHWLafWTGFujrYXllim8ffNpReCA4HJAIR+qOt6Xkg0JZYolxE/p0xB0oOYGxB+DW839FY2VWwjBY03XhnYPek9CgNR/p5WSk=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=qk3leJ1s; arc=none smtp.client-ip=209.85.208.47
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com
Received: by mail-ed1-f47.google.com with SMTP id 4fb4d7f45d1cf-5f438523d6fso10882a12.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 08:42:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=google.com; s=20230601; t=1749051746; x=1749656546; darn=vger.kernel.org;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:from:to:cc:subject:date
:message-id:reply-to;
bh=G7t9vtmyioTV7HgLglXfMiupzKVCAToEG32ldpNqXxc=;
b=qk3leJ1sLkzmXV1+gxW6N3B+/brtpW9ZXyXW+pvebFw8FeomAjHD6tRA+znmnCmNjB
A4U0idLE1xOmZxTP4Pw3FAtHNEyHG/VVvP5RuKIV2C83sr3QmsfbxK6QcVn1XRdnuQ/L
OzXKCGKH8d40pfH/xh0zUJhUSYZxpVpnvHqo4/g9TkOCWGENd/YxfVHHucz/M/YTWzHs
o28gLU8V7QzEL67I2P2ysSUrzjWq4eNpsW3TpPiLFuOLdhOiKkJZ+40QMGBf5n6P3b1T
XCHPzZc3aQE56Qf/1jyebCDtVB9ccwPU0yj1PiRO/0cBUW5crH5KX7/1euysXqYwGhrT
igOw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749051746; x=1749656546;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=G7t9vtmyioTV7HgLglXfMiupzKVCAToEG32ldpNqXxc=;
b=IbhTMI4i31/EUcYkY3bAxXBbfU9tudsJBgGTuDQR6GK7RxkjR3V6s241V/lO3DYvPZ
gCjgly3H8f38dw3bcmJvIHRXwTNKV0JmdJfpncbNmc5MBaPDAXLJKP8iNfiMo+PVxN32
fmjWc+ixWqijsgsSlMY+fo2qU3J/teVyPJ6tQEm3QUTCgrLihIuFlhfAU/gf+n+7E4QQ
uc9wn5yMuP7VCC1RujekWByUgJHkUrh/dGEvsiK3qK5KUrj59zyvay2OVg98B8XnN5Lf
MXk1qbqeLjXTJqA/c6vvFHidLhGI24h3Lvefp8JvR32C7VtHgvxBN72Q1b+OL/rerva7
/i3g==
X-Forwarded-Encrypted: i=1; AJvYcCXt4SOALzUFs64XPxBHwRWn2RmNMGyIz4S00M/5wMp2O01pZitGaF8pNK7IwTB056IH5agj9CkW5K7D5+k=@vger.kernel.org
X-Gm-Message-State: AOJu0YyO5drh+WL0N9jDNCXcpb7xC+xh8PFGhaNmbaU1Q96AOBQG9ycE
S17vmJl/1KmGoGrGj2qb2djGZnEqTwfoFIlJD3NdMY2Zszd/fppzWl2TEZmsmDnTHa56k6XY+TT
hRxevMWQ1RX0/RfwG/kdgLJe2MWDolxY+/Ya4C3l8
X-Gm-Gg: ASbGnctn6nDwfc2m7pQJO8AoIj8WP6NVi7UoNBmlEv2pysuSv//pInYB6hbLGTMSPpF
ry2LyZjeCdg3ZZghsdjBnboeIeljVS99GDk1is4Bv1M58nOdRjLDXUsE5s1/Bh7KWX0/1BXExrZ
VTbNzzbqK7wGBL5URxhH4eBftWeV4IMVGzCEy8s3sCarX26MxYVFAIyw8k0BFcA46JqMR+X16Lk
VV2jtoj
X-Google-Smtp-Source: AGHT+IGfPx1qQPMXmJnjVKhaEVQluNKuo3ENlcH6cBs0pacjJK5V/ek72eM4MKfZg2Ho+J1PAnctmEkhuhZRW6TjsQE=
X-Received: by 2002:a50:ee0d:0:b0:606:efc1:949b with SMTP id
4fb4d7f45d1cf-606efc199femr93289a12.3.1749051745229; Wed, 04 Jun 2025
08:42:25 -0700 (PDT)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
References: <20250603-fork-tearing-v1-0-a7f64b7cfc96@xxxxxxxxxx>
<20250603-fork-tearing-v1-1-a7f64b7cfc96@xxxxxxxxxx> <t5uqs6kbzmcl2sjplxa5tqy6luinuysi7lfimbademagop7323@gveunpi3eqyo>
In-Reply-To: <t5uqs6kbzmcl2sjplxa5tqy6luinuysi7lfimbademagop7323@gveunpi3eqyo>
From: Jann Horn <jannh@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 17:41:47 +0200
X-Gm-Features: AX0GCFsCvblCWcy9XKdf8MqurIoG-ndCCsP0NcLQgarcwuDEBT9XXvHYP38LsIc
Message-ID: <CAG48ez29awjpSXnupQGyxCLoLds72QcYtbhmkAyLT2dCqFzA5Q@xxxxxxxxxxxxxx>
Subject: Re: [PATCH 1/2] mm/memory: ensure fork child sees coherent memory snapshot
To: Pedro Falcato <pfalcato@xxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, David Hildenbrand <david@xxxxxxxxxx>,
Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>, "Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>, Mike Rapoport <rppt@xxxxxxxxxx>, Suren Baghdasaryan <surenb@xxxxxxxxxx>,
Michal Hocko <mhocko@xxxxxxxx>, linux-mm@xxxxxxxxx, Peter Xu <peterx@xxxxxxxxxx>,
linux-kernel@xxxxxxxxxxxxxxx, stable@xxxxxxxxxxxxxxx
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-11.0 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Tue, Jun 3, 2025 at 10:32=E2=80=AFPM Pedro Falcato <pfalcato@xxxxxxx> wr=
ote:
On Tue, Jun 03, 2025 at 08:21:02PM +0200, Jann Horn wrote:
> When fork() encounters possibly-pinned pages, those pages are immediate=
ly
> copied instead of just marking PTEs to make CoW happen later. If the pa=
rent
> is multithreaded, this can cause the child to see memory contents that =
are
> inconsistent in multiple ways:
>
> 1. We are copying the contents of a page with a memcpy() while userspac=
e
> may be writing to it. This can cause the resulting data in the child=
to
> be inconsistent.
This is an interesting problem, but we'll get to it later.
> 2. After we've copied this page, future writes to other pages may
> continue to be visible to the child while future writes to this page=
are
> no longer visible to the child.
>
Yes, and this is not fixable. It's also a problem for the regular write-p=
rotect
pte path where inevitably only a part of the address space will be write-=
protected.
I don't understand what you mean by "inevitably only a part of the
address space will be write-protected". Are you talking about how
shared pages are kept shared between parent in child? Or are you
talking about how there is a point in time at which part of the
address space is write-protected while another part is not yet
write-protected? In that case: Yes, that can happen, but that's not a
problem.
This would only be fixable if e.g we suspended every thread on a multi-th=
readed fork.
No, I think it is fine to keep threads running in parallel on a
multi-threaded fork as long as all the writes they do are guaranteed
to also be observable in the child. Such writes are no different from
writes performed before fork().
It would only get problematic if something in the parent first wrote
to page A, which has already been copied to the child (so the child no
longer sees the write) and then wrote to page B, which is CoWed (so
the child would see the write). I prevent this scenario by effectively
suspending the thread that tries to write to page A until the fork is
over (by making it block on the mmap lock in the fault handling path).
> This means the child could theoretically see incoherent states where
> allocator freelists point to objects that are actually in use or stuff =
like
> that. A mitigating factor is that, unless userspace already has a deadl=
ock
> bug, userspace can pretty much only observe such issues when fancy lock=
less
> data structures are used (because if another thread was in the middle o=
f
> mutating data during fork() and the post-fork child tried to take the m=
utex
> protecting that data, it might wait forever).
>
Ok, so the issue here is that atomics + memcpy (or our kernel variants) w=
ill
possibly observe tearing. This is indeed a problem, and POSIX doesn't _re=
ally_
tell us anything about this. _However_:
POSIX says:
> Any locks held by any thread in the calling process that have been set =
to be process-shared
> shall not be held by the child process. For locks held by any thread in=
the calling process
> that have not been set to be process-shared, any attempt by the child p=
rocess to perform
> any operation on the lock results in undefined behavior (regardless of =
whether the calling
> process is single-threaded or multi-threaded).
The interesting bit here is "For locks held by any thread [...] any attem=
pt by
the child [...] results in UB". I don't think it's entirely far-fetched t=
o say
the spirit of the law is that atomics may also be UB (just like a lock[1]=
that was
held by a separate thread, then unlocked mid-concurrent-fork is in a UB s=
tate).
I think interpreting atomic operations as locks is far-fetched. Also,
POSIX is a sort of minimal bar, and if we only implemented things
explicitly required by POSIX, we might not have a particularly useful
operating system.
Besides, I think things specified by the C standard override whatever
POSIX says, and C23 specifies that there are atomic operations, and I
haven't seen anything in C23 that restricts availability of those to
before fork().
In any way, I think the bottom-line is that fork memory snapshot coherenc=
y is
a fallacy. It's really impossible to reach without adding insane constrai=
nts
(like the aforementioned thread suspending + resume). It's not even possi=
ble
when going through normal write-protect paths that have been conceptually=
stable since
the BSDs in the 1980s (due to the write-protect-a-page-at-a-time-problem)=
.
No, Linux already had memory snapshot coherency before commit
70e806e4e645 ("mm: Do early cow for pinned pages during fork() for
ptes"). Write-protecting a page at a time does not cause coherency
issues, because letting a concurrent thread write into such memory
during fork() is no different from letting it do so before fork() from
a memory coherency perspective, as long as fork() write-locks memory
management for the process.
Return-Path: <linux-kernel+bounces-673473-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 0E34841E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:43:03 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id EFE0A7A7E52
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:41:42 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 258671A0711;
Wed, 4 Jun 2025 15:42:54 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="gWiZVUlL"
Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA91438384
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:42:50 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.50
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749051773; cv=none; b=Frd9kllHg+ywcHfWuKOcQifIYHrx6SSuXbUMGWzRUjEy0NuCmRsLCUMren/Fuz6n/m1xG8ja6TgrAZkuZIRyzZiMoItvgimyLRq3lovjwHGnScumrjgzB/G8xCciPD7drJ+QvGNEp4P83rdub7k8eMMAaw2O1ko3V386xwqMro0=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749051773; c=relaxed/simple;
bh=Qhrjv6hZn1nxtaluhsK7WsV/D9fLlQ6PICV6uLJb4Ac=;
h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
To:Cc:Content-Type; b=LCxiByOUhdtF9BBPii6IsSsQL5UOWybGg43cDGxbAIyrPviXYepbvT0SJzsEsVqIJr2y2d9M6pgLMusdo2p46JXHp1aQ/dW2j9JXXZKkdOJGVNAwTS7lqeu3hLXWIXTjabgN8sNves8QtoZ42YM206VmHE130vSbSXbkrhPkkEs=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org; spf=pass smtp.mailfrom=linuxfoundation.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=gWiZVUlL; arc=none smtp.client-ip=209.85.218.50
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linuxfoundation.org
Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-ad88d77314bso1249613266b.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 08:42:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=linux-foundation.org; s=google; t=1749051769; x=1749656569; darn=vger.kernel.org;
h=cc:to:subject:message-id:date:from:in-reply-to:references
:mime-version:from:to:cc:subject:date:message-id:reply-to;
bh=72BR0mnOxHdy2FcQxO8/Op0YCccM3iuq7r9CRzFPZg4=;
b=gWiZVUlLggnsgXVifPLmrLnlLRfOiNjVA2EpNYUwB5CwPjp7cuzucRhIbL8w4/Qsq2
bRAwvZJbtyUvsuduQS5qqerwYmlmb7bioqa1ZzQPqWp5GyDw1U7oStiSVMd8cETpvMYk
czbnUqBNM3IiD2KW04LRO8/d/qqPIOFnFblf0=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749051769; x=1749656569;
h=cc:to:subject:message-id:date:from:in-reply-to:references
:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=72BR0mnOxHdy2FcQxO8/Op0YCccM3iuq7r9CRzFPZg4=;
b=JJVfgS+WLhtGuiNwGZV9/2UnXo97CCgsPkfBeTKhrES+bxr6pYqB4uJ8q9xYKEfnsQ
HylpnrHEka8/caWU0XejjI47LMr5BOtrctpXe2Kq/I8w7cPYO4K5QjMKcqk3cJZgRokI
UKLbmGvMfOqI+HyXKvKCIZhUQsL5atfAmfw5PzqMWmPCYMIF/wo3wK8upphRECSJcUdr
73dkkP+yhpffzNYG2ZjJoOMCar7/j8f+thlVkopV3sDMNWRp1uSuuE/D0zxwzphcLSe8
OVwbc2nuip2KwehiG240X2mU040gaovnSTcgyTJ/9ziN/2Fuq8JM1tFqePgFM+2CCDim
mD+g==
X-Forwarded-Encrypted: i=1; AJvYcCWKsJWaUyAQsyBaWpoIGbsqNgsI8dlqvCmEpNGH4wawfMPg0Mnlj0cLUavvbU1/F8SYePyV6CPd8WidiD0=@vger.kernel.org
X-Gm-Message-State: AOJu0Yxcezw7HYnHT5puINQy0SayujrQQ3xkzJ33psGRv+qAwDmVxToA
xKrIXXeR4jDvk8mx0N6TI7tBcRgGE8fIyOULlbaiJ720gAYE/K5CamQYXW2h+LeURRT2rVaPFkz
DTneiK01zrQ==
X-Gm-Gg: ASbGncs+ya5ujWGFYKmvFTyc653CRe4rqvZQB6Rc4xLX+frM8t+Am3tokjElo9B2svx
Y+dPM05sxXnepKEoB6kz7QzJW/z+SuRxiVAY0/K+3kUoHWVuLI6UK/UgrN2JWL1UkYp5xSNhbzN
FZ2QZLwvlaPrE1I0Vpx+3RHHk0iLi9eclDaXn5lrG+VoCsLnOj9gbNJuyMiIV8N4fVrjmf/eyaY
y418P/2+mO4snoaAvmmqGu7vLmoOI8ambJmQ8g26gS/P/sk3df5JYgnPvXuUCd6EJBsDJqE1T/X
VMYE4s+h7RRqDFdeJ9O5Nc85koM/r2zxC4b2Pkk9bU+fYGRO9iNLyxl6zXTfYP1U1848l6NoQX3
vyKHSmVkyaiiw9zply69YvlU6Nw==
X-Google-Smtp-Source: AGHT+IGwhafMrrrIAtnQfakYUC96IEg8QQZ+VS364EFr7wPvCQcJeclUz4PDIwBgVksVZERA0mZwhA==
X-Received: by 2002:a17:906:3b4b:b0:add:fa4e:8a7a with SMTP id a640c23a62f3a-addfa4e9117mr204254266b.34.1749051768798;
Wed, 04 Jun 2025 08:42:48 -0700 (PDT)
Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com. [209.85.208.44])
by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ada5d82e846sm1111034766b.70.2025.06.04.08.42.47
for <linux-kernel@xxxxxxxxxxxxxxx>
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 08:42:47 -0700 (PDT)
Received: by mail-ed1-f44.google.com with SMTP id 4fb4d7f45d1cf-60179d8e65fso3195216a12.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 08:42:47 -0700 (PDT)
X-Forwarded-Encrypted: i=1; AJvYcCWj5QvleocpInTOqvwWRfk8c1TV2858RoPtyWo5S8EpcplTlctoPhAUNJZ9nALdjCLLV3jNOw3EJ9OJyr4=@vger.kernel.org
X-Received: by 2002:a05:6402:50cd:b0:602:ddbe:480f with SMTP id
4fb4d7f45d1cf-606e944ffdbmr3318338a12.9.1749051767165; Wed, 04 Jun 2025
08:42:47 -0700 (PDT)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
References: <20250604140544.688711-1-david@xxxxxxxxxx> <fb548cd0-4a6a-4e90-92b8-24c7b35df416@lucifer.local>
In-Reply-To: <fb548cd0-4a6a-4e90-92b8-24c7b35df416@lucifer.local>
From: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Date: Wed, 4 Jun 2025 08:42:30 -0700
X-Gmail-Original-Message-ID: <CAHk-=wjO1xL_ZRKUG_SJuh6sPTQ-6Lem3a3pGoo26CXEsx_w0g@xxxxxxxxxxxxxx>
X-Gm-Features: AX0GCFsf8ms4gV6ZUTVFCM9XPKVFpcGv2mCqTXaG91B4GGR1O9kNamR8xKRlH28
Message-ID: <CAHk-=wjO1xL_ZRKUG_SJuh6sPTQ-6Lem3a3pGoo26CXEsx_w0g@xxxxxxxxxxxxxx>
Subject: Re: [PATCH v1] mm/gup: remove (VM_)BUG_ONs
To: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>
Cc: David Hildenbrand <david@xxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, "Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>, Mike Rapoport <rppt@xxxxxxxxxx>, Suren Baghdasaryan <surenb@xxxxxxxxxx>,
Michal Hocko <mhocko@xxxxxxxx>, Jason Gunthorpe <jgg@xxxxxxxx>, John Hubbard <jhubbard@xxxxxxxxxx>,
Peter Xu <peterx@xxxxxxxxxx>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, 4 Jun 2025 at 07:49, Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx> wrote:
Linus's point of view is that we shouldn't use them _at all_ right? So
maybe even this situation isn't one where we'd want to use one?
So I think BUG_ON() basically grew from
(a) laziness. Not a good reason.
(b) we historically had a model where we'd just kill processes on
fatal errors, particularly page faults
That (b) in particular *used* to work quite well for recovery - a
couple of decades ago ago. A kernel bug would print out the
backtrace, and then kill the process (literally with do_exit()) and
try to run something else.
It was wonderfully useful in that you'd get an oops, and the system
would continue, but that *thread* wouldn't continue.
And decades ago, it worked quite well, because the system was much
simpler, and the likelihood that we held any critical locks was
generally pretty low.
But then SMP happened, and at first it wasn't a huge deal: we had one
special lock, and the exit path would just clean *that* lock up, and
life continued to be good.
But that was literally over two decades ago, and none of the above
actually ever used BUG_ON(). The page fault code would literally do
die("Oops", regs, error_code);
on a fatal page fault. A "BUG_ON()" didn't even exist back then, and
die() looked like this:
console_verbose();
spin_lock_irq(&die_lock);
printk("%s: %04lx\n", str, err & 0xffff);
show_registers(regs);
spin_unlock_irq(&die_lock);
do_exit(SIGSEGV);
which tried to simply serialize the error output, and then kill the process.
When it worked, it worked quite well.
(And yes, page faults are very relevant, because this is what BUG
looked like back then:
#define BUG() *(int *)0 = 0
so it all depended on that page fault printing out the state and exiting)
But as you can well imagine, it worked increasingly badly with
increasing complexity and locking depth.
When you come from that kind of "kill the process on errors" and you
then realize that you can't really do that any more, you end up with
BUG_ON().
The BUG_ON() thing was introduced in 2.5.0, and initially came from
debug code in the block layer rewrite.
And in that particular context, it actually made sense: this was new
code that changed the block elevator, and if that code got it wrong,
you were pretty much *guaranteed* disk corruption.
But then it became a pattern. And I think that pattern is basically never good.
I really think that the *ONLY* situation where BUG() is valid is when
you absolutely *know* that corruption will happen, and you cannot
continue.
Very much *not* some kind of "this is problematic, and who knows what
corruption it might cause". But "I *know* I can't continue without
major system because the hardware is broken sh*t".
In other words, don't use it. Ever. Unless you can explain exactly why
without any handwaving.
Cloud providers or others can do "panic-on-warn" if they want to stop
the machine at the first sign of trouble.
Linus
Return-Path: <linux-kernel+bounces-673474-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id A2EF741E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:43:20 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 5AD9C172B5D
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:43:19 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 02B491A2545;
Wed, 4 Jun 2025 15:43:10 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="NGCUjSWm"
Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id D696E38384;
Wed, 4 Jun 2025 15:43:06 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.15
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749051789; cv=none; b=g2CPtXxzxrLaPCTo1VDAs2vOoWuhM1mceGYnrJCC1iL2ZRsBs3BrCCYZxdhhOt+uY9vgX8eS1cZFJSV3yCkYlsbqo5bb8mHaO/SWCmJHeCG+sQqu6W/UDdTtUkax84wa96BScQzFG+pvm4XRF9tp5ff4Y9CuysihhYc7eaWjw2E=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749051789; c=relaxed/simple;
bh=KBvw1K5sntUXh/9Sm7OBz9ypq0dkXEpUOjGj1PVTgew=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=TCOn+3tIAE5OVwXeRmjY5PEVjZjgX11CF9w/F+ZHZOxY45juktRJb5jmZ5+Lcn3Vvow/GhgrHxrBO7rx6YIU6ZVW6d8cW9IY8uHS3MwdiEx3rP5ywwCnEQ/Wetv4YqhQTX0iaCx0yZ+um90ng+3CXxp6tnckdjJJTULkSmiAaic=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=NGCUjSWm; arc=none smtp.client-ip=198.175.65.15
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
t=1749051787; x=1780587787;
h=date:from:to:cc:subject:message-id:references:
mime-version:content-transfer-encoding:in-reply-to;
bh=KBvw1K5sntUXh/9Sm7OBz9ypq0dkXEpUOjGj1PVTgew=;
b=NGCUjSWmDbOruvhDnh5hgI5IFBax/CYRayIHn3YjYEDQq55HAOIQlRkB
oTcfe5LzQzWBnjBqyxoDqxeV4Vol+l1gI0jRMN7TL7hdyjAb8FwiOAU2r
0w0A/yNW0iDrNVa01RGu201zm3ydsz1oOhcFpOWF5076qhlNlKDMS89H7
2F6NOwC3qDQq7UsMzSzL72aF9csMEOhSequT5AaSn7JoTiNHJU2r5FAna
FqCp07DJX9m8daQfLWx5oBzXBknzsQsb6CWksgfE5pZslayvhJ/61dvBH
z4zLeHo/KmEnfwUNR2mNYKbeed8P1y2mjCIg7a6DFUDnpiGLGfkW/ffDO
Q==;
X-CSE-ConnectionGUID: WGPZyiQmSPK+tGc/HfVUsQ==
X-CSE-MsgGUID: 94z7YzrQQ4ieGv868V0LFw==
X-IronPort-AV: E=McAfee;i="6800,10657,11454"; a="54805232"
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="54805232"
Received: from fmviesa008.fm.intel.com ([10.60.135.148])
by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 08:43:06 -0700
X-CSE-ConnectionGUID: Hv+B9f7XStyUfmL40SnJng==
X-CSE-MsgGUID: mdH1lAQOTdeUENpSGK9z6g==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="145557168"
Received: from black.fi.intel.com ([10.237.72.28])
by fmviesa008.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 08:42:50 -0700
Date: Wed, 4 Jun 2025 18:42:47 +0300
From: Raag Jadav <raag.jadav@xxxxxxxxx>
To: "Rafael J. Wysocki" <rafael@xxxxxxxxxx>
Cc: Mario Limonciello <superm1@xxxxxxxxxx>,
Denis Benato <benato.denis96@xxxxxxxxx>, mahesh@xxxxxxxxxxxxx,
oohall@xxxxxxxxx, bhelgaas@xxxxxxxxxx, linux-pci@xxxxxxxxxxxxxxx,
linux-pm@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
ilpo.jarvinen@xxxxxxxxxxxxxxx, lukas@xxxxxxxxx,
aravind.iddamsetty@xxxxxxxxxxxxxxx,
"amd-gfx@xxxxxxxxxxxxxxxxxxxxx" <amd-gfx@xxxxxxxxxxxxxxxxxxxxx>,
Alex Deucher <alexander.deucher@xxxxxxx>
Subject: Re: [PATCH v4] PCI: Prevent power state transition of erroneous
device
Message-ID: <aEBpdwMfxp5M4Hxr@xxxxxxxxxxxxxxxxxx>
References: <552d75b2-2736-419f-887e-ce2692616578@xxxxxxxxxx>
<ee1117cf-6367-4e9a-aa85-ccfc6c63125d@xxxxxxxxx>
<6f23d82c-10cc-4d70-9dce-41978b05ec9a@xxxxxxxxxx>
<aCzNL9uXGbBSdF2S@xxxxxxxxxxxxxxxxxx>
<fea86161-2c47-4b0f-ac07-b3f9b0f10a03@xxxxxxxxxx>
<aC2UzG-eycjqYQep@xxxxxxxxxxxxxxxxxx>
<CAJZ5v0gRFwKhq21ima3kT0zzFLk4=47ivvzJqARksV7nYHTJAQ@xxxxxxxxxxxxxx>
<CAJZ5v0h9--jFVBtQ5F7Gee3Cy8P3TeSLdiHEWykQ=EsZdoffmg@xxxxxxxxxxxxxx>
<aDnpfKvLwRZsKxhH@xxxxxxxxxxxxxxxxxx>
<CAJZ5v0gjA2B4AnaYpfYpaNDo49k4LM2FGSrPFFuOCJ62bCMmkA@xxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <CAJZ5v0gjA2B4AnaYpfYpaNDo49k4LM2FGSrPFFuOCJ62bCMmkA@xxxxxxxxxxxxxx>
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Fri, May 30, 2025 at 07:49:26PM +0200, Rafael J. Wysocki wrote:
On Fri, May 30, 2025 at 7:23 PM Raag Jadav <raag.jadav@xxxxxxxxx> wrote:
> On Fri, May 23, 2025 at 05:23:10PM +0200, Rafael J. Wysocki wrote:
> > On Wed, May 21, 2025 at 1:27 PM Rafael J. Wysocki <rafael@xxxxxxxxxx> wrote:
> > > On Wed, May 21, 2025 at 10:54 AM Raag Jadav <raag.jadav@xxxxxxxxx> wrote:
> > > > On Tue, May 20, 2025 at 01:56:28PM -0500, Mario Limonciello wrote:
> > > > > On 5/20/2025 1:42 PM, Raag Jadav wrote:
> > > > > > On Tue, May 20, 2025 at 12:39:12PM -0500, Mario Limonciello wrote:
...
> > > > > From the driver perspective it does have expectations that the parts outside
> > > > > the driver did the right thing. If the driver was expecting the root port
> > > > > to be powered down at suspend and it wasn't there are hardware components
> > > > > that didn't power cycle and that's what we're seeing here.
> > > >
> > > > Which means the expectation set by the driver is the opposite of the
> > > > purpose of this patch, and it's going to fail if any kind of error is
> > > > detected under root port during suspend.
> > >
> > > And IMV this driver's expectation is questionable at least.
> > >
> > > There is no promise whatsoever that the device will always be put into
> > > D3cold during system suspend.
> >
> > For instance, user space may disable D3cold for any PCI device via the
> > d3cold_allowed attribute in sysfs.
> >
> > If the driver cannot handle this, it needs to be fixed.
>
> Thanks for confirming. So should we consider this patch to be valid
> and worth moving forward?
It doesn't do anything that would be invalid in principle IMV.
You need to consider one more thing, though: It may be necessary to
power-cycle the device in order to kick it out of the erroneous state
and the patch effectively blocks this if I'm not mistaken.
But admittedly I'm not sure if this really matters.
Wouldn't something like bus reset (SBR) be more predictable?
Raag
Return-Path: <linux-kernel+bounces-673475-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id C4BAB41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:44:44 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 4A7001899AD3
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:44:52 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 432871A3029;
Wed, 4 Jun 2025 15:44:28 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="Jq9sFDO+";
dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="FDqwOq0l";
dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="r74BRPCk";
dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="6plmO64f"
Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 017CD19E7D0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:44:25 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749051867; cv=none; b=paKk1hQD6b3VmvvWJkLq4vl9WyudptuT9vaYYLKjkPkm9nGqDXpC0Xh7TCFbbjnCxDc3DDRcqG3fgktnkp9S9o9nwZunSUslUOadpU2lR7UFXBTvkw//rvAO6RwHFjzn0/s4CAarXxYDqsuCMQfv2oGP94bwxXe1/CvcWHGqCrM=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749051867; c=relaxed/simple;
bh=f7lRk+b2SIr/M1jbrfGzBguI5XqViR8QimvPyjso0UY=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=DwbRl1XvRRuvB6oEDvkCBScVKIz3UW41osLJURuMHS1jmm7UdgWlIIPv6fpW+bigwqSytzSr3+klhe4SoEfu0hQypy39ohhAuUuxMxvikTkrZwc1rCh0IYafzyCefQAnA6CSIpA5uj0pOTz8QtOCC6vE6sSSr3bbHT0y3/YJepk=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz; spf=pass smtp.mailfrom=suse.cz; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=Jq9sFDO+; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=FDqwOq0l; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=r74BRPCk; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=6plmO64f; arc=none smtp.client-ip=195.135.223.131
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.cz
Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(No client certificate requested)
by smtp-out2.suse.de (Postfix) with ESMTPS id D7FBA1FEF2;
Wed, 4 Jun 2025 15:44:23 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa;
t=1749051864; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version:content-type:content-type:
in-reply-to:in-reply-to:references:references;
bh=FCC2WWItBuBB5emvqTSf3LdL7WM1Hvu7mLAtMLGblgE=;
b=Jq9sFDO+OXExv9H/ECrc3/kkj4FEJjvBUv/KUMLSokDTT/tDPCbBehkplqPUEzATPxyt2k
ZhWaZEB4Vk9YAMSMw1U3sgHguTHD6xy+6NLrX8TqDGW5XPABmnDnbx7kJtSfw3bmDXQMmS
JT4+rS97ATsiwIayfbWr3lv+n44wPCg=
DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz;
s=susede2_ed25519; t=1749051864;
h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version:content-type:content-type:
in-reply-to:in-reply-to:references:references;
bh=FCC2WWItBuBB5emvqTSf3LdL7WM1Hvu7mLAtMLGblgE=;
b=FDqwOq0lhb+b0Cel/nEtVwKCGhCq4IkCXU9OfHh+mlszveJzsP62aqjmNR5Kjchn7eCb/i
0kB4asU3ZXg3+MAQ==
Authentication-Results: smtp-out2.suse.de;
dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=r74BRPCk;
dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=6plmO64f
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa;
t=1749051863; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version:content-type:content-type:
in-reply-to:in-reply-to:references:references;
bh=FCC2WWItBuBB5emvqTSf3LdL7WM1Hvu7mLAtMLGblgE=;
b=r74BRPCktuxJVMtT86wnDKlCv9NvFGtd5toUKsd69F7Cl5Ql8P6yxv2f9S429HSCLHCWO0
yr6b8r6fGdw95ebKYO0Akeomnef1rhkwk8jWl3iu/h8wcQjBlHx2+rudYiyWv2jUSa17aA
sN7SwfP2Jm0x05b2L0xU9rLXg0v1vpo=
DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz;
s=susede2_ed25519; t=1749051863;
h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version:content-type:content-type:
in-reply-to:in-reply-to:references:references;
bh=FCC2WWItBuBB5emvqTSf3LdL7WM1Hvu7mLAtMLGblgE=;
b=6plmO64fjxDstv+2auLmT/Tkp0J4X35NypvAXEoohnGzTMJ0E64QMzJ7nZck2xsXqmcK5x
teWTEy9uyJLB8gAA==
Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(No client certificate requested)
by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id C0C511369A;
Wed, 4 Jun 2025 15:44:23 +0000 (UTC)
Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167])
by imap1.dmz-prg2.suse.org with ESMTPSA
id hskGL9dpQGgxFQAAD6G6ig
(envelope-from <jack@xxxxxxx>); Wed, 04 Jun 2025 15:44:23 +0000
Received: by quack3.suse.cz (Postfix, from userid 1000)
id E96B1A095C; Wed, 4 Jun 2025 17:44:22 +0200 (CEST)
Date: Wed, 4 Jun 2025 17:44:22 +0200
From: Jan Kara <jack@xxxxxxx>
To: Konstantin Ryabitsev <konstantin@xxxxxxxxxxxxxxxxxxx>
Cc: Christian Brauner <brauner@xxxxxxxxxx>,
Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>, Jan Kara <jack@xxxxxxx>, linux-fsdevel@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, Luka <luka.2016.cs@xxxxxxxxx>
Subject: Re: [Bug] possible deadlock in vfs_rmdir in Linux kernel v6.12
Message-ID: <bfyuxaa7cantq2fvrgizsawyclaciifxub3lortq5oox44vlsd@rxwrvg2avew7>
References: <CALm_T+2FtCDm4R5y-7mGyrY71Ex9G_9guaHCkELyggVfUbs1=w@xxxxxxxxxxxxxx>
<CALm_T+0j2FUr-tY5nvBqB6nvt=Dc8GBVfwzwchtrqOCoKw3rkQ@xxxxxxxxxxxxxx>
<CALm_T+3H5axrkgFdpAt23mkUyEbOaPyehAbdXbhgwutpyfMB7w@xxxxxxxxxxxxxx>
<20250604-quark-gastprofessor-9ac119a48aa1@brauner>
<20250604-alluring-resourceful-salamander-6561ff@lemur>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20250604-alluring-resourceful-salamander-6561ff@lemur>
X-Rspamd-Server: rspamd2.dmz-prg2.suse.org
X-Rspamd-Queue-Id: D7FBA1FEF2
X-Rspamd-Action: no action
X-Spamd-Result: default: False [-2.51 / 50.00];
BAYES_HAM(-3.00)[99.99%];
SUSPICIOUS_RECIPS(1.50)[];
NEURAL_HAM_LONG(-1.00)[-1.000];
MID_RHS_NOT_FQDN(0.50)[];
R_DKIM_ALLOW(-0.20)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519];
NEURAL_HAM_SHORT(-0.20)[-0.998];
MIME_GOOD(-0.10)[text/plain];
MX_GOOD(-0.01)[];
DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519];
RCVD_COUNT_THREE(0.00)[3];
FUZZY_BLOCKED(0.00)[rspamd.com];
ARC_NA(0.00)[];
RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from];
TO_DN_SOME(0.00)[];
MIME_TRACE(0.00)[0:+];
RCVD_TLS_LAST(0.00)[];
FREEMAIL_ENVRCPT(0.00)[gmail.com];
SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from];
RCPT_COUNT_SEVEN(0.00)[7];
TAGGED_RCPT(0.00)[];
FROM_EQ_ENVFROM(0.00)[];
FROM_HAS_DN(0.00)[];
TO_MATCH_ENVRCPT_ALL(0.00)[];
RCVD_VIA_SMTP_AUTH(0.00)[];
MISSING_XM_UA(0.00)[];
ASN(0.00)[asn:25478, ipnet:::/0, country:RU];
FREEMAIL_CC(0.00)[kernel.org,zeniv.linux.org.uk,suse.cz,vger.kernel.org,gmail.com];
DKIM_TRACE(0.00)[suse.cz:+];
DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo,suse.com:email]
X-Spam-Score: -2.51
X-Spam-Level:
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed 04-06-25 10:45:49, Konstantin Ryabitsev wrote:
On Wed, Jun 04, 2025 at 09:45:23AM +0200, Christian Brauner wrote:
> Konstantin, this looks actively malicious.
> Can we do something about this list-wise?
Malicious in what sense? Is it just junk, or is it attempting to have
maintainers perform some potentially dangerous operation?
Well, useless it is for certain but links like:
Bug Report: https://hastebin.com/share/pihohaniwi.bash
Entire Log: https://hastebin.com/share/orufevoquj.perl
are rather suspicious and suggest there's more in there than just a lack of
knowledge (but now that I've tried the suffixes seem to be automatically
added by some filetype detection logic in the hastebin.com site itself so
more likely this is not malicious after all). FWIW I've downloaded one of
the files through wget and looked into it and it seems to have a reasonable
content and does not seem malicious but it is difficult to be sure in the
maze of HTML and JS...
Honza
--
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR
Return-Path: <linux-kernel+bounces-673476-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 3EFD341E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:44:49 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id D665A16A09A
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:44:49 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id EDEF61A2391;
Wed, 4 Jun 2025 15:44:36 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="k8fqU9it";
dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="va5v19+0"
Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id BF28119E7D0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:44:33 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749051875; cv=fail; b=jgUko+5ZMvO+s8o3qcs67Ai0JmGwySvkcdWJIpA6h1p/+5ahal22qzcAmT0ZZ70JenNABcW4MQ54nM52E9l7maEc1/T4SWcYYvSNlmbJJjL9IhVumcgqzU0DY7LpxLXSI6Fs21YjUVN12Pkq+ITM6YmCjFnPF1r8INmUGbx3vdc=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749051875; c=relaxed/simple;
bh=M3uUVtLcxUskCKUZSzlaK8VCNAN4T74BkRZE4l69DUE=;
h=Date:From:To:Cc:Subject:Message-ID:References:Content-Type:
Content-Disposition:In-Reply-To:MIME-Version; b=QkmXLuVmuGtIWrlL3j5ZOj9YlBoAQiEML0+QmqmV0sd/xccxGm23uPrpbsW8eh0Di3WHTN9GkBx8ABJrNw4cUIIWkYMMmv01wNkjIX91zSLZvK5vRcmvFgwwc44Y5hQSNXJSNFnLnkJeT7OJb/K/KQ0LZcCTaz8/Pf7DLVWd6M4=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=k8fqU9it; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=va5v19+0; arc=fail smtp.client-ip=205.220.177.32
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com
Received: from pps.filterd (m0246631.ppops.net [127.0.0.1])
by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 554FduD0032152;
Wed, 4 Jun 2025 15:44:19 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc
:content-type:date:from:in-reply-to:message-id:mime-version
:references:subject:to; s=corp-2025-04-25; bh=VgggKxPv3yJiMqTRcB
OxCfYK+zgdKecMTBW/UUeFy94=; b=k8fqU9itgb6CVFK2VdR3jfh10Xw61Yi6qn
r55H3zdmgyGoOTmgxiAYK2a8ti8SLmMA+guCfsG5lo4Io/CHKkqd2HRAWmtIWKfW
Ozoh9kb07udC3HY9uAyfWDffKgJ5FwfQROxlb6c8Jr598CDBhSma5LfaSlBFz7Qr
5hnn22UykowQpcc373S/cSRrhYXEJelIA9clB+wEkkM+OKyYsbQU2H8S6b5wpNId
TH3s/rGUDn/YgRKKTlNqIwljl/CyUJhovZPZjvoxk0xEEl3X6h1a9MKgh1UxjoF5
n3DYwY8jqUeQTmOh0DXeHZuupUtgg/e/UViw7b4fSl+7mors7b3w==
Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129])
by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 471g8dvbks-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 04 Jun 2025 15:44:19 +0000 (GMT)
Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1])
by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 554EdKm7034835;
Wed, 4 Jun 2025 15:44:18 GMT
Received: from bn8pr05cu002.outbound.protection.outlook.com (mail-eastus2azon11011059.outbound.protection.outlook.com [52.101.57.59])
by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 46yr7b5ytq-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 04 Jun 2025 15:44:18 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=KAUEvOqAn2O/vGdqKv4zd6ljhu8qGrzUdcTUQEEuFfHF1Uuf0He5QK8L4x5yxEdWsy4GVf8Y2qsHVL//gVHCUr4rHqEKTyXkKgBf0DejU+HmpZ0g3mDhvzblPtVPixyjSEfsoWRWIQcMirWsCyELJ4uGCTMhlqOLRa3JYeEM5tvD+jb9F9mYCCr0AdkyEMfGWJuD0KXsfBZ+EsTZPweKzglJmYvCJe2y7FNzpZJp3rt4pR9z2b8tllqCWB8s6ohznhzEanJsjkiNZ+Yh2j7q/+XIuClnZhW+4tTo1BLdcJR8ubzFCUz14m0VYY9hWXrGGgJPXFNb3GuQrhgrpt/UYw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=VgggKxPv3yJiMqTRcBOxCfYK+zgdKecMTBW/UUeFy94=;
b=fhscMqVPwpKh7qDaMitJ8h+allKDmBzhrne5OJrX8wk5B4RQt5losd0Od4ON9Eu/PF2VxahXeldeeif0zWsR74Nb9587+reOsNPuXoILSGKzoyONmLYiULYmTUHyYWU0q1xti+pzkCRCR5rcR8OiTmTbiqJy8wwgaIUDlVYfV6XCtIs4s8L9PZVyRtkKLn5FiQCj9D2sXAXfqb1kXwqlb89mrBVd3YtxqqY0+4O/VDoLRi+7Ugm+BiIsXX2eFwaRyKqYMD34XCzaH1B0KFKy1F0YJ+xxJiwgrSXTcOYy3SzaKzj+chM/zgcbmK4RmFIMTm3nVuBp9ehRLjo32PMoIw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com;
dkim=pass header.d=oracle.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=VgggKxPv3yJiMqTRcBOxCfYK+zgdKecMTBW/UUeFy94=;
b=va5v19+0RDCeJ84zsb9xcq/TBf81KvXunXUu67StjSyGbHPIBju6O9hldIoWYR9++Aflz2gPktOwJR/5dah02x8/qjNDSn48tyl+mZdjnt7JM4cMmJdfqt3+hfiTzCeDrbQVSHqpm/FAeMUmNjtCcASkw2hi52qghBCJbd+Yc+o=
Received: from DM4PR10MB8218.namprd10.prod.outlook.com (2603:10b6:8:1cc::16)
by PH3PPF18C4487EB.namprd10.prod.outlook.com (2603:10b6:518:1::78b) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8746.41; Wed, 4 Jun
2025 15:44:15 +0000
Received: from DM4PR10MB8218.namprd10.prod.outlook.com
([fe80::2650:55cf:2816:5f2]) by DM4PR10MB8218.namprd10.prod.outlook.com
([fe80::2650:55cf:2816:5f2%6]) with mapi id 15.20.8746.041; Wed, 4 Jun 2025
15:44:14 +0000
Date: Wed, 4 Jun 2025 16:44:11 +0100
From: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>
To: David Hildenbrand <david@xxxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>, Mike Rapoport <rppt@xxxxxxxxxx>,
Suren Baghdasaryan <surenb@xxxxxxxxxx>, Michal Hocko <mhocko@xxxxxxxx>,
Jason Gunthorpe <jgg@xxxxxxxx>, John Hubbard <jhubbard@xxxxxxxxxx>,
Peter Xu <peterx@xxxxxxxxxx>,
Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Subject: Re: [PATCH v1] mm/gup: remove (VM_)BUG_ONs
Message-ID: <8fc9b4e3-55d2-48e2-a9ad-4f21dc283f35@lucifer.local>
References: <20250604140544.688711-1-david@xxxxxxxxxx>
<fb548cd0-4a6a-4e90-92b8-24c7b35df416@lucifer.local>
<5575b0cf-de59-4b4e-b339-c310f079bda7@xxxxxxxxxx>
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <5575b0cf-de59-4b4e-b339-c310f079bda7@xxxxxxxxxx>
X-ClientProxiedBy: LNXP265CA0054.GBRP265.PROD.OUTLOOK.COM
(2603:10a6:600:5d::18) To DM4PR10MB8218.namprd10.prod.outlook.com
(2603:10b6:8:1cc::16)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: DM4PR10MB8218:EE_|PH3PPF18C4487EB:EE_
X-MS-Office365-Filtering-Correlation-Id: f316265c-fd50-419a-6c4b-08dda37ea88b
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|1800799024|366016;
X-Microsoft-Antispam-Message-Info:
=?us-ascii?Q?B1CPJ3ZQ2rmXd3iV6QxHhwa5hklMSlaeMbyYq/rKmP0kMFtd8PIv3dl5jtX3?=
=?us-ascii?Q?PfLPZleQd3mq0cp2wC6UPp1VAcu6CC7S56+AjpGU/u0vNAlY4PKgEwdfOJcL?=
=?us-ascii?Q?HhG8ewAx54aFD3mEVqLHrkMsuj9zEGLi/Ki+UIIKCTLJnP4P8KL8S6GUS2z/?=
=?us-ascii?Q?yYEqpPU4YyLbk3Fq9wQdDF5ymLqU0N+/ExeokoQbzS9beWIMyOcQKl9xgmCH?=
=?us-ascii?Q?2tP7tqY2Gq08f8dP6RI76YFZH9+6qYLNdjfEoKHFwSF0BpNJS6H263iJYLr/?=
=?us-ascii?Q?3mRxwCzx+oQofqhroAFm4UES4qFjizIk02t0c8NwDvnIHJVjrdZfeF8WwAuG?=
=?us-ascii?Q?Vr03DZc0E/WfVjL30bRTYGr6r0BPz95s00J86YKXRm1wxwmrYzFoDxnnIIPf?=
=?us-ascii?Q?M4zxlcjz3e3aFx+NwUIQIHv5Gh7gt2/R7UYXlSw3EGDxCm9JE6q9JhV8enuV?=
=?us-ascii?Q?/p4fxV3bBSDaqv9lMwfQwwi6SQK/rUwFsVmRr1r6+BO0TZPZTkCHFc5fXqgm?=
=?us-ascii?Q?CLR9sotz27O85Nw8HDKSDCGzEwE7n/PdM04B1xDjbaF/0utF79ElErAzD41G?=
=?us-ascii?Q?3BEM3F8FS72MXzbYGLG48waelKszom30lL1JxoWb3F2mr8J1X9dH65wU2Hmo?=
=?us-ascii?Q?10Dd9VxlfXEGOxLNX33Og/M4oqgroTfxsY/f5uv4yX3thWC9tsvU5Zzlysl5?=
=?us-ascii?Q?qxgt9aMzo0zoZobHN4LBi8wdZTOVyw4+W7psxh33s//lQTtCCF4mkGxPlFyH?=
=?us-ascii?Q?aT4ayDx3ZHc2mmE3d3/1pMxMx9Ml+hD7hugm6pYcp6jLovTw0cdy44PIdSdx?=
=?us-ascii?Q?kPD0b8TnVTwpcoUxSTrdepRrkY7FL81AZEW9b4qircA9UJX85SnUXXwtvF6V?=
=?us-ascii?Q?R2ZdEBzr79WhQgufTKF1zN4jzgJojXsreSBwdl/b/Cvoa3JrQxmal4WoV7TX?=
=?us-ascii?Q?wgSaRZiDZOMzQcnwoMFYCTfHMN7fMvj7+7LDKEc0u6rCmgEb+ErgdYOPHcD8?=
=?us-ascii?Q?r51N7j+zAtzj7xZa9Prh908Di1Rdo9ayFamhYGOvqsCCIdx42/5eqnuDYHg9?=
=?us-ascii?Q?1/rFhl81k0LJ5iF13eWJbtud2xDsfpT42nTm005TEJ2E6uBJdqlDyh8vCvV+?=
=?us-ascii?Q?PQQDFyoyV/p3npCyykDW5pATEzTRIMXQW9Hj7mSFpdSTDv0RmmMNsJJ2mvGo?=
=?us-ascii?Q?KfSd1tMTCIodBHYiPVcN1dfdHuj7YMvgi8K7hC8xSKRjSO/3FVjDoOls8v2R?=
=?us-ascii?Q?/HVcH1T+mLIS9ZVyuZeN9h6JhtgPSAegzyhSJzl5cro3iA1QjP/60WX0ejLP?=
=?us-ascii?Q?9qWOe9edkZU+FJF6GG8USy1FpvmH+xCWKxjcOezxj6GVRviZUgNqgKS3bgs/?=
=?us-ascii?Q?KLj1f6SHpgVVOpdPgYyODw0toBObYHLFeNQDHxLH8j7ipUGm29QOhsNxnNsG?=
=?us-ascii?Q?3WxLyH6w5IQ=3D?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR10MB8218.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(376014)(1800799024)(366016);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?us-ascii?Q?WVSaUBpIZEyUo3N1vfVqdMEzXDLFxNL8CdzSAqu788h9wNNO3jiCpqcfhk7K?=
=?us-ascii?Q?iLZz/PcWXKopLt5F/RKwaHUXcYTmXw3XDcqx8yF93IZmS0Jwo4KmM9UKIAOW?=
=?us-ascii?Q?UzFRsgX0riadXOLNxUzOJI8Vey+cCnU3rqE8bF7uCvpgRxk+CiP0AmFrfPB7?=
=?us-ascii?Q?0yfoqEImvnhji9hdnNd4V/i2jHZbux6YLL5P5p9vDUfC2E2/Ih5+ibL9pakx?=
=?us-ascii?Q?wlq5d7LHXaqzseDzk6nD6np87cJn6PPD5pbdtTBgIc8tqtd29rLrI7d5iIDl?=
=?us-ascii?Q?YWq0LC8YyYINaSMk3HNzp2Vb+80E8OrWEYn1CsvC6bZxRjvaDa5M2V3XD8Xi?=
=?us-ascii?Q?Xijm11laK4oQgjOwShhuyl1xo23g4qg1aLqj9COHnFE+z2hyBlGHQ8rlj4H/?=
=?us-ascii?Q?jjXsN6JL7OKdKCF4PPOAaUu7pl5Ce210oIcz3wGH9B/OeEuR47WElgIMdxHf?=
=?us-ascii?Q?JxHhPz6+fVVJDAlvRTlMmmuZ/0Xvsvie8WssasEEVJGyRMF8h1H3s85nfm1h?=
=?us-ascii?Q?IIkw+juGvWAym6qkOyaD+R40/eo4rvrU8N2LbWOYYCC59fxXDmItQpVjFe2P?=
=?us-ascii?Q?3zapSDlVr+Ie0WStI8OFo0PJrvccLVEjWsLSGbMgLdN1Z/Ui+PcY7DEdgdsQ?=
=?us-ascii?Q?zpMHdHMjCTe9YUIvAiO/j924cENSPJJHVUGG5HLcMH2ZCjXN4gca82AwmaZT?=
=?us-ascii?Q?ZN3bB/X2ZnQpbJZPE+pnVN5JBgAbBGHpVfbZUO741xfvtUuB26o+Ba7ASHRx?=
=?us-ascii?Q?nX8zAQKBocXJEp9aes98k3FVAHsamk0gvUhd4D2Tv/pVEciNdJojoCMkRoxd?=
=?us-ascii?Q?9tXB6QSVoNKSBOvA8PH4u23u2hHF161otgxUjLPSiFD+a2XpYKv2BfK6tT06?=
=?us-ascii?Q?X7c/gQ0wStiuQWXBBPT9CZ0X8pONCecVzp+ocsQ03aElJWKE3acSUG3fcONy?=
=?us-ascii?Q?1HCmv3oDe1vLcbdNkBtJ2kjw/OjS5zd0XVBMOEehlWmYisBukXLh76CHM2jM?=
=?us-ascii?Q?gDYVpDIrFz8EQkWQxa2sm+M5Wn+WoPLLKIQfbF2Xk/ZcQyRWSTf1vZrs+mrP?=
=?us-ascii?Q?DK6fLo3yz+qTDal3F6nvRGJ+AOVZtS+yImsO2mBgmhjseg9HLDcKdnDripKJ?=
=?us-ascii?Q?BSIotRS60ltROgnPDusEGj9o275bdeIa9uFgWTfVZMq8djWPBU0Bb9gVZyzX?=
=?us-ascii?Q?1fyfyUD22lvI/vLjMM21poMwv9+YUTfGiR3JWqLvGlqCbQPew9cbT4/1Y35X?=
=?us-ascii?Q?NKYBGP1IzU9EbMaze79ieH4ZCa+zTn7APZ6KRb2v8+XDtuB8B6D/HZibUnmO?=
=?us-ascii?Q?XM8stOhBJA3zlPClCjs4e7kwyyKoWqejJuN/TEAMlxn5HpQx0/bQU9CKBof+?=
=?us-ascii?Q?S4rmvTWCsY6no9TOZTNBwx5HTGUyOf5pYs4JiHP2lr+wI585F5No2ZRyXSq2?=
=?us-ascii?Q?y+URqyhYQpHZM2gS22FmKvPx25eYet+AjrTY4q3aVrOo5KN3k7473gY7BlBL?=
=?us-ascii?Q?iHSm96wWK4ozrerUOgJj3YQpePto/ELYbSL2gCBtmcjj6aP4SWV8Yok/nxqK?=
=?us-ascii?Q?aTaC6QsH0a/1lPVqiS/UPGDWsmAM6F6v3aSUc4AjpbdsY9m7yskTGHULeMr4?=
=?us-ascii?Q?Ow=3D=3D?=
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0:
vZfqAO0GN9/o/126dA0fYcT5p5oBlkg2P9fakKTN+UXNX77hk4F+S4XPqEnTKaVXDSCDOxhvbH140VpfL60T6b2uZLfF2pdxqs3O+4PITOaTTM8/L77bOvIK9Ff4TPAhlNha4xCZfjV4rivaEEgGtlc29rlouf5OwzLuVtAA+1e4fZfTrM5sF1B16zHjvFfSUB3PIHAXoAbMqfdB729TDdolLSH3IsNIGC4KSh3RZvvjV0XghP+cBEujqb60vKiclQTAKMwlFclLMUjFdNmdB/75vDVJGm+X6TdmI7ojYLw7bdRJlT5DCfBfaFKbPYllgyCSDfKZ+8uJ3knkg5eKwK4/QE33NnMP8mk+ICxPpY2U/rP6O+KSO6jhN8a441V/3ccAA4F911xya0Ecls+Vf5FrS+u0NZnOxl4Z6fDOankW++UmN7hG2rXkcRh0hQx0whcIMFPMdjkGB/pe5I5WVUi1hStQOzgh3ZKs8417qXkbnglXuRNIlNjMVk41ywY68fcyVhSl9Im2Eiqx2NdQuP/xmVptvmySQk2sBSe01pE4VXbg/6Pclef+ze/k14jrlkZ+bmRghatYSUWON1vLQUIoaXVze4WgP0MdfFW/e+0=
X-OriginatorOrg: oracle.com
X-MS-Exchange-CrossTenant-Network-Message-Id: f316265c-fd50-419a-6c4b-08dda37ea88b
X-MS-Exchange-CrossTenant-AuthSource: DM4PR10MB8218.namprd10.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 15:44:14.6974
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: LQiAzbkhwOXE6G5O4sSjCATpWdC2pzCl57s4j8d0GCx79jMlNh/aRYYdcn3s+Pk8PD5qgCtxotchqpBKGtI9dumIP2QqaM69S5TEIlvojZs=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH3PPF18C4487EB
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 mlxlogscore=999
bulkscore=0 spamscore=0 suspectscore=0 malwarescore=0 mlxscore=0
adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1
engine=8.12.0-2505160000 definitions=main-2506040119
X-Authority-Analysis: v=2.4 cv=Va/3PEp9 c=1 sm=1 tr=0 ts=684069d3 b=1 cx=c_pps a=WeWmnZmh0fydH62SvGsd2A==:117 a=WeWmnZmh0fydH62SvGsd2A==:17 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19
a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=6IFa9wvqVegA:10 a=GoEa3M9JfhUA:10 a=Z4Rwk6OoAAAA:8 a=yPCof4ZbAAAA:8 a=VwQbUJbxAAAA:8 a=1XWaLZrsAAAA:8 a=iox4zFpeAAAA:8 a=9jRdOu3wAAAA:8 a=Ikd4Dj_1AAAA:8 a=20KFwNOVAAAA:8
a=IiUBJ2Na09XcJe3L1ysA:9 a=CjuIK1q_8ugA:10 a=HkZW87K1Qel5hWWM3VKY:22 a=WzC6qhA0u3u7Ye7llzcV:22 a=ZE6KLimJVUuLrTuGpvhn:22
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDExOSBTYWx0ZWRfX6YkH5R+O+db1 rLiXqv52Mmoq6wqV43o2RxOfCjBCEYweZub/KQwDiS3D6aoxOHyL8lhLigcSGDCl3HUV9o/59My swNNdBHNrlkNUrN1bwslGDSMwaJlhC3oX+O8MaZLt6HOQALDLUV38Uc0PXeb/pwLWa7EVrUjEJQ
7siHV2JeXhY6SzNZPanFh7CW+p7GJVs+ko/3KTD4aD8QbK791AbJaY5G46C+UWAegTvkbIlPYQc 5gitXr/t+LhgQa/qEZWWuXmfpV2eyWuC1vEwSPcA96FXEhKaO3x3Hoa7QJSMMO5RDHOLGKH0oVF hj1++CB4G1dFUj5D7EEz6SA9kbrTnv2QXIvAhiMh7KxJdccYu2y+cfL1+xlEX2ff3vaejQlWKXP
nqE+iYXJYc0OPWWtr+IugxJBmi8Xp7BLbijCo4iPCNua736B2prYQLE//qWHWCc9bahs6sN5
X-Proofpoint-ORIG-GUID: 69ftFrZajoV-cQnOXkQA8K2CaG_cNBvp
X-Proofpoint-GUID: 69ftFrZajoV-cQnOXkQA8K2CaG_cNBvp
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 04:58:25PM +0200, David Hildenbrand wrote:
On 04.06.25 16:48, Lorenzo Stoakes wrote:
> +Linus in case he has an opinion about BUG_ON() in general...
>
> On Wed, Jun 04, 2025 at 04:05:44PM +0200, David Hildenbrand wrote:
> > Especially once we hit one of the assertions in
> > sanity_check_pinned_pages(), observing follow-up assertions failing
> > in other code can give good clues about what went wrong, so use
> > VM_WARN_ON_ONCE instead.
>
> I guess the situation where you'd actually want a BUG_ON() is one where
> carrying on might cause further corruption so you just want things to stop.
Yes. Like, serious data corruption would be avoidable.
Yeah, I just wonder how often this is ever reliably for sure the case...
>
> But usually we're already pretty screwed if the thing happened right? So
> it's rare if ever that this would be legit?
>
> Linus's point of view is that we shouldn't use them _at all_ right? So
> maybe even this situation isn't one where we'd want to use one?
I think the grey zone is actual data corruption. But one has to have a
pretty good reason to use a BUG_ON and not a WARN_ON_ONCE() + recovery.
Right.
>
> >
> > While at it, let's just convert all VM_BUG_ON to VM_WARN_ON_ONCE as
> > well. Add one comment for the pfn_valid() check.
>
> Yeah VM_BUG_ON() is just _weird_. Maybe we should get rid of all of them
> full stop?
That's my thinking a well.
:)
>
> >
> > We have to introduce VM_WARN_ON_ONCE_VMA() to make that fly.
>
> I checked the implementation vs. the other VM_WARN_ON_ONCE_*()'s and it
> looks good.
>
> I wonder if we can find a way to not duplicate this code... but one for a
> follow up I think :>)
>
> >
> > Drop the BUG_ON after mmap_read_lock_killable(), if that ever returns
> > something > 0 we're in bigger trouble. Convert the other BUG_ON's into
> > VM_WARN_ON_ONCE as well, they are in a similar domain "should never
> > happen", but more reasonable to check for during early testing.
> >
> > Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> > Cc: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>
> > Cc: "Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>
> > Cc: Vlastimil Babka <vbabka@xxxxxxx>
> > Cc: Mike Rapoport <rppt@xxxxxxxxxx>
> > Cc: Suren Baghdasaryan <surenb@xxxxxxxxxx>
> > Cc: Michal Hocko <mhocko@xxxxxxxx>
> > Cc: Jason Gunthorpe <jgg@xxxxxxxx>
> > Cc: John Hubbard <jhubbard@xxxxxxxxxx>
> > Cc: Peter Xu <peterx@xxxxxxxxxx>
> > Signed-off-by: David Hildenbrand <david@xxxxxxxxxx>
>
> LGTM so,
>
> Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>
>
>
Thanks!
> One nit below.
>
> > ---
> >
> > Wanted to do this for a long time, but my todo list keeps growing ...
>
> Sounds familiar :) Merge window a chance to do some of these things...
>
> >
> > Based on mm/mm-unstable
> >
> > ---
> > include/linux/mmdebug.h | 12 ++++++++++++
> > mm/gup.c | 41 +++++++++++++++++++----------------------
> > 2 files changed, 31 insertions(+), 22 deletions(-)
> >
> > diff --git a/include/linux/mmdebug.h b/include/linux/mmdebug.h
> > index a0a3894900ed4..14a45979cccc9 100644
> > --- a/include/linux/mmdebug.h
> > +++ b/include/linux/mmdebug.h
> > @@ -89,6 +89,17 @@ void vma_iter_dump_tree(const struct vma_iterator *vmi);
> > } \
> > unlikely(__ret_warn_once); \
> > })
> > +#define VM_WARN_ON_ONCE_VMA(cond, vma) ({ \
> > + static bool __section(".data..once") __warned; \
> > + int __ret_warn_once = !!(cond); \
> > + \
> > + if (unlikely(__ret_warn_once && !__warned)) { \
> > + dump_vma(vma); \
> > + __warned = true; \
> > + WARN_ON(1); \
> > + } \
> > + unlikely(__ret_warn_once); \
> > +})
>
> An aside, I wonder if we could somehow make this generic for various
> WARN_ON_ONCE()'s?
Yeah, probably. Maybe it will get .... ugly :)
>
> > #define VM_WARN_ON_VMG(cond, vmg) ({ \
> > int __ret_warn = !!(cond); \
> > \
> > @@ -115,6 +126,7 @@ void vma_iter_dump_tree(const struct vma_iterator *vmi);
> > #define VM_WARN_ON_FOLIO(cond, folio) BUILD_BUG_ON_INVALID(cond)
> > #define VM_WARN_ON_ONCE_FOLIO(cond, folio) BUILD_BUG_ON_INVALID(cond)
> > #define VM_WARN_ON_ONCE_MM(cond, mm) BUILD_BUG_ON_INVALID(cond)
> > +#define VM_WARN_ON_ONCE_VMA(cond, vma) BUILD_BUG_ON_INVALID(cond)
> > #define VM_WARN_ON_VMG(cond, vmg) BUILD_BUG_ON_INVALID(cond)
> > #define VM_WARN_ONCE(cond, format...) BUILD_BUG_ON_INVALID(cond)
> > #define VM_WARN(cond, format...) BUILD_BUG_ON_INVALID(cond)
> > diff --git a/mm/gup.c b/mm/gup.c
> > index e065a49842a87..3c3931fcdd820 100644
> > --- a/mm/gup.c
> > +++ b/mm/gup.c
> > @@ -64,11 +64,11 @@ static inline void sanity_check_pinned_pages(struct page **pages,
> > !folio_test_anon(folio))
> > continue;
> > if (!folio_test_large(folio) || folio_test_hugetlb(folio))
> > - VM_BUG_ON_PAGE(!PageAnonExclusive(&folio->page), page);
> > + VM_WARN_ON_ONCE_PAGE(!PageAnonExclusive(&folio->page), page);
> > else
> > /* Either a PTE-mapped or a PMD-mapped THP. */
> > - VM_BUG_ON_PAGE(!PageAnonExclusive(&folio->page) &&
> > - !PageAnonExclusive(page), page);
> > + VM_WARN_ON_ONCE_PAGE(!PageAnonExclusive(&folio->page) &&
> > + !PageAnonExclusive(page), page);
>
> Nit but wouldn't VM_WARN_ON_ONCE_FOLIO() work better here?
No, we want the actual problematic page here, as that can give us clues what
is going wrong.
Ah yeah... didn't notice we're checking both folio and
page... PageAnonExclusive() seems to be a weird beast:
/*
* HugeTLB stores this information on the head page; THP keeps it per
* page
*/
But anyway I'm digressing :)
For the small-folio case above we could use it, though.
Ack, no big deal though.
--
Cheers,
David / dhildenb
Return-Path: <linux-kernel+bounces-673477-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 9F26241E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:46:23 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 500941899BC2
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:46:37 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 965951A316C;
Wed, 4 Jun 2025 15:46:14 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=vfemail.net header.i=@vfemail.net header.b="YQTIedBv"
Received: from smtp161.vfemail.net (smtp161.vfemail.net [146.59.185.161])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id D2B3214B086
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:46:11 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=146.59.185.161
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749051973; cv=none; b=U1EDIt1v6nFi7o9z4wJtX5RUxnfnE/QZhqyjAzBu/6DOD04gdtwNrM3faflRuz9q0dNHOjRq25sAfa3l/p1NirzB6Kte8h/CK0e/AXsi03NJuzKFt2L2BPq5Xv0W3bhW7Y3o2TFOHg84QUD3CmpdqsM3IKNxKFXfbEkwABfrEqo=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749051973; c=relaxed/simple;
bh=sVv9tfQSi/F3EG4Cu3S8TUx3854kAJcKUGCB7EOgU2Y=;
h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References:
MIME-Version:Content-Type; b=nKsbmx1O3ihHvbA9jKgzrkfSRej9oTToDcwODIDBV45SfWmxuc24TuAT3c2Je408jWmU4c3oOMfv5J02mT4lqPquWvWpwlHKk/fkT4nVycShwrBsh+hy55vtBWZ98TO4SV8g8qYGKIj2a9CYk9fgFFHnfDWZTNlC1jI+CmL7tLI=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=vfemail.net; spf=pass smtp.mailfrom=vfemail.net; dkim=pass (1024-bit key) header.d=vfemail.net header.i=@vfemail.net header.b=YQTIedBv; arc=none smtp.client-ip=146.59.185.161
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=vfemail.net
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=vfemail.net
Received: (qmail 3606 invoked from network); 4 Jun 2025 15:44:46 +0000
Received: from localhost (HELO nl101-3.vfemail.net) ()
by smtpout.vfemail.net with SMTP; 4 Jun 2025 15:44:46 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=vfemail.net; h=date:from
:to:cc:subject:message-id:in-reply-to:references:mime-version
:content-type:content-transfer-encoding; s=2018; bh=sVv9tfQSi/F3
EG4Cu3S8TUx3854kAJcKUGCB7EOgU2Y=; b=YQTIedBvvVd3v4PqdxVwfYexscjs
TNLX0TEi3+v7YNa42xUXx4PZTy32dD9Grc9ly3rUtmOjAS6KYmD9yRWTdC5iJH9T
nXRAfZnnAHj3RelylC/s8NjdF7JmlxF5bQz/t2uadJ0jwdpR43/mQ5Ib+echeTrO
WFllUPe5Zw/PlEQ=
Received: (qmail 52508 invoked from network); 4 Jun 2025 10:46:03 -0500
Received: by simscan 1.4.0 ppid: 52486, pid: 52504, t: 0.6537s
scanners:none
Received: from unknown (HELO bmwxMDEudmZlbWFpbC5uZXQ=) (aGdudGt3aXNAdmZlbWFpbC5uZXQ=@MTkyLjE2OC4xLjE5Mg==)
by nl101.vfemail.net with ESMTPA; 4 Jun 2025 15:46:02 -0000
Date: Wed, 4 Jun 2025 11:45:58 -0400
From: David Niklas <simd@xxxxxxxxxxx>
To: Linux RAID <linux-raid@xxxxxxxxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx
Subject: Re: Need help increasing raid scan efficiency.
Message-ID: <20250604114558.4d27abce@xxxxxxxxxxxxxxxxxxxxx>
In-Reply-To: <26688.15707.98922.15948@xxxxxxxxxxxxxxxxx>
References: <20250602210514.7acd5325@xxxxxxxxxxxxxxxxxxxxx>
<26688.15707.98922.15948@xxxxxxxxxxxxxxxxx>
X-Mailer: Claws Mail 4.3.0git38 (GTK 3.24.24; x86_64-pc-linux-gnu)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
I'm replying to everyone in the same email.
On Wed, 4 Jun 2025 08:34:35 -0400
"John Stoffel" <john@xxxxxxxxxxx> wrote:
>>>>> "David" == David Niklas <simd@xxxxxxxxxxx> writes:
> My PC suffered a rather nasty case of HW failure recently where the
> MB would break the CPU and RAM. I ended up with different data on
> different members of my RAID6 array.
Ouch, this is not good. But you have RAID6, so it should be ok...
> I wanted to scan through the drives and take some checksums of
> various files in an attempt to ascertain which drives took the most
> data corruption damage, to try and find the date that the damage
> started occurring (as it was unclear when exactly this began), and
> to try and rescue some of the data off of the good pairs.
What are you comparing the checksums too? Just because you assemble
drives 1 and 2 and read the filesystem, then assemble drives 3 and 4
into another array, how do you know which checksum is correct if they
differ?
Once I find some files whose checksums differ, I can perform some
automated data tests to find which file is the intact one.
> So I setup the array into read-only mode and started the array with
> only two of the drives. Drives 0 and 1. Then I proceeded to try and
> start a second pair, drives 2 and 3, so that I could scan them
> simultaneously. With the intent of then switching it over to 0 and
> 2 and 1 and 3, then 0 and 3 and 1 and 2.
I'm not sure this is really going to work how you think....
<snip>
I just think that I'll be able to read from all 4 drives but doing it in
2 arrays of 2 drives. Basically, I'll get a 2x speed increase over doing
it as 2 drives at a time.
On Wed, 4 Jun 2025 07:22:15 +0300
Jani Partanen <jiipee@xxxxxxxxxxx> wrote:
On 03/06/2025 23.04, David Niklas wrote:
> I think you misunderstood my original question, how do I assemble the
> RAID6 pairs (RO mode) into two different arrays such that I can read
> from them simultaneously?
I dont think there is any other way to do what you want to do than use
overlayfs. You may find some ideas from here:
https://archive.kernel.org/oldwiki/raid.wiki.kernel.org/index.php/Irreversible_mdadm_failure_recovery.html
Thanks for the idea. I'm not following why we setup the overlay but then
use mapper devices (which came from where?), with the mdadm commands.
On Tue, 3 Jun 2025 21:27:35 +0100
anthony <antmbox@xxxxxxxxxxxxxxx> wrote:
On 03/06/2025 21:04, David Niklas wrote:
> Searching online turned up raid6check.
> https://unix.stackexchange.com/questions/137384/raid6-scrubbing-
> mismatch-repair
>
> But the people there also pointed out that Linux's raid repair
> operation only recalculates the parity. I would have thought that it
> did a best of 3 option. I mean, that's a big part of why we have
> RAID6 instead of RAID5, right?
From what I remember of raid6check, it actually does a proper raid 6
calculation to recover the damaged data.
<snip>
I've done it slightly differently, I've got raid-5 sat on top of
dm-integrity, so if a disk gets corrupted dm-integrity will simply
return a read failure, and the raid doesn't have to work out what's
been corrupted. I've got a different problem at the moment - my array
has assembled itself as three spares, so I've got to fix that ... :-(
Cheers,
Wol
Good to know. Thanks Wol. I hope you're able to get your drives up and
running again.
On Wed, 4 Jun 2025 10:59:21 +0200
Reindl Harald <h.reindl@xxxxxxxxxxxxx> wrote:
<snip>
> as I don't have enough room otherwise
seriously?
an external 10 TB disk costs around 200 EUR
an external 20 TB disk costs around 400 EUR
<snip>
Every time I upgraded the size of my array, I'd take the old disks and
use them as backup disks. Over time, it became a matter of not having
enough SATA ports, not a matter of costing too much. I was trying to
reuse disks instead of the disks being tossed out or collecting dust. I've
learned better now.
Thanks,
David
Return-Path: <linux-kernel+bounces-673478-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id A93FA41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:46:54 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 6380E1899CBA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:47:08 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 740BF1D5CD4;
Wed, 4 Jun 2025 15:46:47 +0000 (UTC)
Received: from foss.arm.com (foss.arm.com [217.140.110.172])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 0F2D7146D6A;
Wed, 4 Jun 2025 15:46:44 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749052007; cv=none; b=XzJTSe2N/lh+wk5GfxcPdOep26NtLyhINDpwxwGtX/wUXNFR6ifz0yTjqLF7A/vhHr7UPBnNJEobdkO4UvCnXsF/m6kHcWq8vH/wKHcaK9k2s6keVAwd3o+rQcDvEeG8P2iQjghWGx1J45XW5nqVdGi6H7Q/qJsVa5u5jnx5nBo=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749052007; c=relaxed/simple;
bh=4uKaNsdRWPKAwZnIohgZ6Xw81iYiK0D1BgnFAv3sacI=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=mOn+cb8+tcyjB2mGRLD/4DWlFF+HOdD2Vvalh1UK89KcdZ24+tAzKiVEqiHLFAdfsObxOv41p8/nshe+RLECKWscaX023Qky/tni6TJ7RhJ/iv7dl71hZdIzxkB6/pvz3mPgb1M4WEkD3AeIm6U0eio9+kImENul7dpd7gCgI4k=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com
Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14])
by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CF7981758;
Wed, 4 Jun 2025 08:46:26 -0700 (PDT)
Received: from localhost (e132581.arm.com [10.1.196.87])
by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 89F773F59E;
Wed, 4 Jun 2025 08:46:43 -0700 (PDT)
Date: Wed, 4 Jun 2025 16:46:39 +0100
From: Leo Yan <leo.yan@xxxxxxx>
To: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Yeoreum Yun <yeoreum.yun@xxxxxxx>, mingo@xxxxxxxxxx, mingo@xxxxxxxxxx,
acme@xxxxxxxxxx, namhyung@xxxxxxxxxx, mark.rutland@xxxxxxx,
alexander.shishkin@xxxxxxxxxxxxxxx, jolsa@xxxxxxxxxx,
irogers@xxxxxxxxxx, adrian.hunter@xxxxxxxxx,
kan.liang@xxxxxxxxxxxxxxx, linux-perf-users@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, David Wang <00107082@xxxxxxx>
Subject: Re: [PATCH 1/1] perf/core: fix dangling cgroup pointer in cpuctx
Message-ID: <20250604154639.GE8020@xxxxxxxxxxxxxxx>
References: <20250602184049.4010919-1-yeoreum.yun@xxxxxxx>
<20250603140040.GB8020@xxxxxxxxxxxxxxx>
<20250603144414.GC38114@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
<20250604080339.GB35970@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
<20250604101821.GC8020@xxxxxxxxxxxxxxx>
<20250604141640.GL38114@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20250604141640.GL38114@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
X-Spam-Status: No, score=-3.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 04:16:40PM +0200, Peter Zijlstra wrote:
[...]
It might be prudent to do something like so:
Thanks for the patch.
+static void __event_disable(struct perf_event *event,
+ struct perf_event_context *ctx,
+ enum perf_event_state state)
+{
+ if (event == event->group_leader)
+ group_sched_out(event, ctx);
I am a bit struggle for this code line. It disables all events in a
group, but only clear cgroup pointer for group leader but miss to clear
for sibling events.
If the cgroup pointer is only used for group leader, maybe we only
maintain (set and clear) the cgroup pointer for the leader?
Thanks,
Leo
+ else
+ event_sched_out(event, ctx);
+
+ perf_event_set_state(event, state);
+ perf_cgroup_event_disable(event, ctx);
+}
+
/*
* Cross CPU call to disable a performance event
*/
@@ -2575,15 +2583,7 @@ static void __perf_event_disable(struct perf_event *event,
perf_pmu_disable(event->pmu_ctx->pmu);
ctx_time_update_event(ctx, event);
-
- if (event == event->group_leader)
- group_sched_out(event, ctx);
- else
- event_sched_out(event, ctx);
-
- perf_event_set_state(event, PERF_EVENT_STATE_OFF);
- perf_cgroup_event_disable(event, ctx);
-
+ __event_disable(event, ctx, PERF_EVENT_STATE_OFF);
perf_pmu_enable(event->pmu_ctx->pmu);
}
Return-Path: <linux-kernel+bounces-673479-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id D93D741E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:48:45 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id DB4C0179E35
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:48:46 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 4923A1D5ABA;
Wed, 4 Jun 2025 15:48:40 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=meta.com header.i=@meta.com header.b="fHIY6/CY"
Received: from mx0a-00082601.pphosted.com (mx0b-00082601.pphosted.com [67.231.153.30])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 17C481D5175
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:48:36 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=67.231.153.30
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749052119; cv=fail; b=nyXWe9c5+kVOUJ60zkHQscysNr5P3+qCDRa2vRj6vo4knO5uV6352hie5NAvogRJ5EB5OzD29H4f28dOM5j9RwO896WILoDi/iC9qmGmSOFCQltUo0X60/Rqj3xEkrmyhOvyCcuHbxfmv4GLJQjWWI5En25MBwzOv03Ll/oZ3n4=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749052119; c=relaxed/simple;
bh=8Eg6SEcZI6UCmvDPSLcIvWeJESs41demaWsFLXRfMuQ=;
h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To:
Content-Type:MIME-Version; b=aL7zv0dlK2x6wQwVgQ9D029O34qECUFTV0w+5jF91Jlr7JlCwRvn5ckJfYLu2xbgV825xUGNjSMfmKxgsZC86cTwdoygme72E4UHhWKOhEsur1/ZJuFoJD8YGGz2vQGncqA0eeY6wI8N+Nn0Uv8xibhg68HxHjuSscvgXQcKmpk=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=meta.com; spf=pass smtp.mailfrom=meta.com; dkim=pass (2048-bit key) header.d=meta.com header.i=@meta.com header.b=fHIY6/CY; arc=fail smtp.client-ip=67.231.153.30
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=meta.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=meta.com
Received: from pps.filterd (m0089730.ppops.net [127.0.0.1])
by m0089730.ppops.net (8.18.1.2/8.18.1.2) with ESMTP id 554DTckq026715;
Wed, 4 Jun 2025 08:48:27 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=meta.com; h=cc
:content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=s2048-2021-q4;
bh=KEKTCbfkNqxOXs5OwqF1sdWoUEQNJx/W1jqoegp+2W0=; b=fHIY6/CY9a1m
pwxgJ4lkPtwP+b9xz9HWVVmm3H6diUTtWfaV+rGbonAwzkFgxhBipTE2we4Deww9
9k+8r8jSDH/OApibgUag6dYNMr4ccAhRJEVS8T7zlWmLR6hUi4JtaGTCctgGEZdp
rKD+oj3X0hFTZ3lBtsy2M5R4JOIcwUOdxqew6dGDYgw5uTjkcx5/xZ93ydkhyfTQ
RR203WFeLgxR6bueZMyu6sIPS5DayhVwI1zr4LPuugZ5AujEAxysNnONazw0M9Pw
a4c1ZvEwKgv1hDvUSPumKOjYxSjK5eaqR1CIHWZhpIESrM1lE/xjKWfMFjnu0aM3
jRIzcsh3AA==
Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12on2053.outbound.protection.outlook.com [40.107.243.53])
by m0089730.ppops.net (PPS) with ESMTPS id 472nqphm1w-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 08:48:26 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=fZWBzBjbsP/kY4Cj62IQQZYigjFdk+4Fz+Vutq+CkT3bzuQbNsPxVWXW/euHsIlCVhthqTEmIYIFmF1DHBcv6SuJ7U2H2nB5Fw9ncsTPw5grML5qe/sQzqhVddB9iEpqUuMxHSfpYcNShz0z2iS+higLB7n2iHvGmL+xXH01UaCraevg1e3LvTSePY2a+5KUAQrxClI8QD0UGv7slf3lgrnsZTwlntOQTNkgZ8FoFMGpKzQPpkCmXtXhY+Li+/FAspxu4xxvkHAu/rSplHogQ686UYQmDJqURMlh+CPciZwxAjOoyX5jaf1HO78xeBSME5wiOx06NBxWfF9PbHQJ8w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=KEKTCbfkNqxOXs5OwqF1sdWoUEQNJx/W1jqoegp+2W0=;
b=XOB/l5Op8pF3I7zTt5F0oyL+R3Tz/KLm+xoYNCKmYzIPKdlkTsWrMSnK8fY3vnCubz8k9b5DA8z91dw0kmBdjjlTnCJsFDwdDtixjyNXLaToClELkBMlh6yF/qTytqcd8BjasCGqG9vwagY7jEJMFSrslUQS8v4RN5e1izt1gLCTp/sdLDsZL6dADVqp2ODpctqX8JsCeoTxRWr0yhhqmUQVtYo41klC0TFpW1pYElH42J0+juZ3bI2vwtcj9v6kRH3RoRwJ3qZ7k2lzjvmB1WUvw343lKxpQwX6sd4fJuoFd3sxb1rG2uzHBP/DQ2OHiWtOdHH3XykcVgHd+qvD2A==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=meta.com; dmarc=pass action=none header.from=meta.com;
dkim=pass header.d=meta.com; arc=none
Received: from LV3PR15MB6455.namprd15.prod.outlook.com (2603:10b6:408:1ad::10)
by CH0PR15MB6212.namprd15.prod.outlook.com (2603:10b6:610:191::10) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8813.21; Wed, 4 Jun
2025 15:48:15 +0000
Received: from LV3PR15MB6455.namprd15.prod.outlook.com
([fe80::595a:4648:51bc:d6e0]) by LV3PR15MB6455.namprd15.prod.outlook.com
([fe80::595a:4648:51bc:d6e0%7]) with mapi id 15.20.8769.037; Wed, 4 Jun 2025
15:48:15 +0000
Message-ID: <372d8277-7edb-4f78-99bd-6d23b8f94984@xxxxxxxx>
Date: Wed, 4 Jun 2025 11:48:05 -0400
User-Agent: Mozilla Thunderbird
Subject: Re: futex performance regression from "futex: Allow automatic
allocation of process wide futex hash"
To: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx
References: <3ad05298-351e-4d61-9972-ca45a0a50e33@xxxxxxxx>
<20250604092815.UtG-oi0v@xxxxxxxxxxxxx>
From: Chris Mason <clm@xxxxxxxx>
Content-Language: en-US
In-Reply-To: <20250604092815.UtG-oi0v@xxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-ClientProxiedBy: MN0PR05CA0009.namprd05.prod.outlook.com
(2603:10b6:208:52c::29) To LV3PR15MB6455.namprd15.prod.outlook.com
(2603:10b6:408:1ad::10)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: LV3PR15MB6455:EE_|CH0PR15MB6212:EE_
X-MS-Office365-Filtering-Correlation-Id: 458ff6c9-b134-409d-5a18-08dda37f3817
X-FB-Source: Internal
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014;
X-Microsoft-Antispam-Message-Info:
=?utf-8?B?WVpKU1ppejJGOTloTHBBaVBoU0JYU0VCU1BGelBJRjB4Z2VFZVozNkpSSDRq?=
=?utf-8?B?YitGQ3BrTC8vQXE5L0NmZ0pWSk9YZlNIMEgrWktEV3lReGZ1bGRjeVpLbjRW?=
=?utf-8?B?bC8yZVZmSmR5ejNWOTVLSDdKVi9UcFhWRDN5dWJVUFlpelk3S0tkcHhUYVRr?=
=?utf-8?B?RGhSOXFHMUZONVFUNmtwNSs3NnFmNVJPM1R6Ly83akJxbjhyWEFnOE95WTN3?=
=?utf-8?B?SVRSMGdXeXRMaHd0K3NCaFprUWljRGpmSXk0VXA4bTh3blRoU3AwK1RETkw5?=
=?utf-8?B?b3EwTEl0SUhOQi91TU4wRTBIN1Y0U25ValluN0NMZHlXL2VYWFgxV0I3SjNQ?=
=?utf-8?B?YmpIeFZJdlgvUkZxUGhMbTVxV0pRUW9RY0xtUGw4VmJuZ0NDVUd4M3oxWVZa?=
=?utf-8?B?WFdRQnlzVkVZMlZVbkMrdHpSckhtWEpPM21McXV0N2dPWjBqSU0yZjAvL01S?=
=?utf-8?B?R291Yy95elR3TEJCL0VRUUlnNDl0OURlTGwwUFZBLzBjWEJjblpjbktlRWV1?=
=?utf-8?B?b1ZzbU5PUStvK05YZTNSczFyZStleGZ0TmdNWmZCVWFOT0NXaUl1ckROeHVa?=
=?utf-8?B?OG5WZEp5ajFRd2w4WkdGYm1xSi9HeFhWQnd6R3ZLdFdST1lDS2hBUHlTRXN5?=
=?utf-8?B?Vmo2eE5MSUw2azNjS2xMMmwzZ202TDlsTHAwT1NEWmFWL3NpSkFLeHpnamhK?=
=?utf-8?B?QlZ2QTB4VUNaaTlVR0lVOVVFYWxYTXR1VWs0dWRYWEZYWEdxdS9rZHpnUXF1?=
=?utf-8?B?bGJyNXhZVHpMTXZXRktxY1F0c0U1TlNNSm1TbDgxbjA4S0ZtTi8za0IyRHVw?=
=?utf-8?B?T3NPQzQyeXBveDFrK0xSZURmam5VK3BZaERtYkZOK2cyS29IMHVHMUNNdjkz?=
=?utf-8?B?NkwvWlpDdHdjcjFhSm9US2l1YnhCK3JCdm9peXAraXFobTJYbTRFTVRmWWtq?=
=?utf-8?B?SlFUVk9CYjY0cW1EOTdYWDdvQXhGR1FMUnpQTUd0S1NORlF2dXhVTWlPYmwy?=
=?utf-8?B?dU1zUEtXb3ZIKzNlWkF6VlZ2NFF3N2Zhbmw3R3YrUDE3OWtWSXpKZ3Zib0JO?=
=?utf-8?B?dVBqbVRFNlI4b3FrNkt6VElTdEQ2N2VYK0JtbXpaRWVoTUF5a1QwY1NoNXRi?=
=?utf-8?B?dm5wUEFEUE5HYlZyS3J0WnFxdFV3eThPUzQ1VXlURzlVU2xiWWZWOXpjamtI?=
=?utf-8?B?WG1OVjYxZG5uMVFpYVA4cW0zTFhUUU1HeXdTbXdKaXVVRnNCaU4zNDMwOGhD?=
=?utf-8?B?Z0hYQmdtY2tyWEMzZjgwNDZER3IraXI4L3R0Vnl5QWVKeHhkSmY4TkZXUmZB?=
=?utf-8?B?RnN6aWRCR2Q3Y2YvVGJhd1dNTWJLaVl0VmVKQjZ2L0JQZzBIVUl3eW9UWWxU?=
=?utf-8?B?aDZwNnk1WUl3NFlSSm54VGJTRzAza1NDd0F2VFdUeVlSRWhHYjdIZjRXaFUz?=
=?utf-8?B?b0xVNTMxWDlWNUlxc1FOMkRmNTMwWHVEcGg0Zm1zNndXR2Z6SVB2b05wYnM1?=
=?utf-8?B?dVZZZ2F1Q0kvNjhOU2hEQ1BsRm0ybktNdnNVQmZ2S2lqdDlsRGFJMnhPUTBR?=
=?utf-8?B?ZStadHk0QWJhZktsNytMR2YzTU44NEFEQkgva0paU0ZrcGdZckEyYXp0VFk0?=
=?utf-8?B?cjBLOHdFbW5pYXhBRzEzQi9VNTEyalhNdndzelZTWVQzZ0QwK2ZJL2J3UDFw?=
=?utf-8?B?eVhqbm5teDJHMk5WZVZlK3FhbndOUmFxaHl6M0d2YkljOERkNXVOdXoyMkUy?=
=?utf-8?B?bjUwMXlzZXRpK3daMUhOMGVLQW1PWThYMnpUQUdUMTl5L05aWDl3eGJkeFor?=
=?utf-8?B?VlNBdFpMNmVRaENlRmF6M09PU0UvMTd5RVpTK1o3V3hvT25iN29qdGdKTU1t?=
=?utf-8?B?L2ZNWTFIcVVoRTBOS3lLQXJ1bmVnb0pPNVZiYUFiRExPczcwVFNBYmpNS0Ev?=
=?utf-8?Q?cqgItCRZt8I=3D?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:LV3PR15MB6455.namprd15.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?utf-8?B?cXozYW9uOVovYklpK2RpSEdUUjVwY01vajdLYzI0ZFBvbGFvRFFKdnBsNEdr?=
=?utf-8?B?a1ZoVzdIUk5TZHJyVndqOVRCd2pzVDV3SzFrMFJLZXR4YStzY1ZEWGJIOGRn?=
=?utf-8?B?VlA3RkZDcTVDTDI3N25pMHFDZjRYbU1zQldGNjFFT0lDeTdHUTlVRTdYNm04?=
=?utf-8?B?di9qUG9ETnRzWHNWSzNmOFo2YUxidGVuWldzTS85VEFWQTQzb1NQbENiMG9W?=
=?utf-8?B?dzY2M0NaeEVZWk9taXhKVEp4S1I3aUFLTmRzZG1nSlk2bFR0MWtONVAvNVk5?=
=?utf-8?B?aURKY2VEa2VFcE5wUzJqbWZrUVVrbTlKbEQzOGpnRjA1dVkydzY4Y0d6U1M2?=
=?utf-8?B?Z0VLa2F0NUZ3cTBTajZraUhHL0NuSVQ2Mk5jM3NxdHZrUkZTMHFBOFpVWVhr?=
=?utf-8?B?WllDQmovdWxWTEhiZmg3VnBGaFYxR3BWbHl1ZFBvYzFqQ29DR0ZkRVZBNENt?=
=?utf-8?B?SU5aaExCQ2Qrb2lqVENrVlFscG5HN0c2SStSc3dNaEsxTzBzRzNRS3I2eTd5?=
=?utf-8?B?VVp1alBGL0RiVUE3S3Vkd0FRYjhmVjdDK0J1VURmeEF3NXkxM2R6cWRla2Nt?=
=?utf-8?B?Uk84K0xLR1JGdzZGbFRnQzY4cTRQSjUzKzZxUVRuYjltczZTSHh4S0N5ekQ1?=
=?utf-8?B?WGdHaXFjN3FweG5ESUJ3TVpQRDljKzVTMlZJbXFyUFpRZzQrQjEzenEyRGVO?=
=?utf-8?B?em5yZnEvdE4vSm44YmZPUWtjTUoxZUc4TzlhK1hRM2twdWcvNlpKRkVnWWVW?=
=?utf-8?B?RHlZdGgwaW50NkZCdEpEZ2o4V2JwdlFwV0IrNW5WTkh2cFhBZWxWbjBDUVJw?=
=?utf-8?B?VjYvNjhVdDhKbkdITExOTHdML3MvaHMrZ1RHNHZJc1RVdnpqai9HVmJzNEJZ?=
=?utf-8?B?SlNjTllRRm1ua0NDcDNEOTN1Vk12bTYyMU9kMmRRcElJRFMxTGR6NGN6QUNj?=
=?utf-8?B?bDAyc2hDRHl6MDVsVjVnV01PcmVMa2w2VFRETUI3VUxLbEZMRmZFNDczQkk2?=
=?utf-8?B?bEpqZlZjekI0NkQwWE4vamVWQjkyRlY5R1lJMWRYTjBVdTFNOTQ0TzU3eXBY?=
=?utf-8?B?aTJYaXNBekxYRGhtN3FBcCtucW5yMG1rbEd5RTZrK1NvKzRzbWdZdGhGd3g2?=
=?utf-8?B?NHpKOUJLZHFqbHdsTVB0OC8vNThZNkNLV2Q5dktxNmFwTWhPSWJJcWoxSy9K?=
=?utf-8?B?MDhlajFuK0NyVUhqZzhCSThoNi81TGxianAzVTd3OXYxclREc0xpTEFxYmVh?=
=?utf-8?B?QzZpZE1aMVA2Q3d3OWNWK1pTNUJiUnlRYUMwYno1Snd5LzNOblNnUXBCeGJy?=
=?utf-8?B?aHl0RlJIRFh3N2xFVEFhRjZGYXY2NFNYMmNQSkdMamN2ZkduYi8wV0g1Y3Z6?=
=?utf-8?B?TlFqNzA4Y2l2RWt6ZjJRTjc1UlQrTG9XOGl0MTlIOGRkc09yVzJ2aVN0UmlQ?=
=?utf-8?B?UUtjNC9kcS9YazIrSlJyR29NcXhsd1Y3MFBlM0dGWmhFVzN6MTAwL0tWSlBa?=
=?utf-8?B?MlZKbEhtQjJHaDIxM3BSMnVKNVZ6UENkSDc3Y1NNWHNOWHlIcnhSRFc1V2J5?=
=?utf-8?B?bTNLdi9UYjRGVE8vVlNuY3YraUR0eDR4N1J1T0wyTEg2Z1VjbUsxaVpQZENr?=
=?utf-8?B?a1BEMWw4WEF5dTVVc0d2NVBpTDJWRzdHSENET0Q0TVMxZXM4MmxTVEZIRXdi?=
=?utf-8?B?RWZjWklodzdQVTF2N3lLdEYyc1dMZ05CMmo2Ry8ybWw3T0lscDBsNzVnNkp4?=
=?utf-8?B?M2c3SjZDY20wbXhOU2FRNmpOWGJkMGRyYVp4M0NiNndtTUtQdE1VSTlzREx2?=
=?utf-8?B?dEhTcDZoN01UVXZzQWpEaGxhWlp2bDR4VzBGbWNhc0taWXZjNVk1dnk5a0xS?=
=?utf-8?B?NWhqOHhnOVp0eXFJSU5KYXhYMWY2eGNtdDBNR0F5aGxudkdXY3lPY29vNThJ?=
=?utf-8?B?blZMY2hWR052eXJZT2F5T2U5MzBTZnVRY0dtT1FlRktrN2hOeksrZHNxbTBr?=
=?utf-8?B?ZE1QS292NVNsc0cvRk5naTJ5Mmxua0FCemJYMXBhS2QvUTAycks2c1c1U2Yz?=
=?utf-8?B?S3hPSkdEU3VKYlAzRFAvQlpOMmxCSm80SU9VR1JGTGNhZXpVN3MyOUNjZE1p?=
=?utf-8?Q?uBnk=3D?=
X-OriginatorOrg: meta.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 458ff6c9-b134-409d-5a18-08dda37f3817
X-MS-Exchange-CrossTenant-AuthSource: LV3PR15MB6455.namprd15.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 15:48:15.4930
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: xEwX8CIg1BW1QouyCNE9kTO0/0AM/7VlV7p1AC5UId5uPBsCf00TUeolcGNVbK2b
X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR15MB6212
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDEyMCBTYWx0ZWRfX/AWJky8R+1Em xUu5aNI3SVmg5n0tDsXhd5oOnOJxT6zBU12JydywymMsjg+GL6H8esMixs+OM/Ii7Ynhv0Tq6pK E1PXSXqzLz8pisRdPhIUnWB/rFPin/Z4b7BW0wMsH26+FDvecYa4TfA2/hWSdtvyFE3yMsVq9aw
LaxsHNY8NvHHSZUmD+iY1R4zhndFef0H4fkbDJnTGtUjiBnfRROLmVYNy9UHO0OVFOB+Xe2vOu6 aV7NzhZZ8XbF58T6rybFwq6VNZvuBkc4nhlaIotIJLOwir8Y2siWKs4+2XoE4jlpXx9lRIGDBmi SqR51a0a+/ecTp5Ch/NTjXsvezQCrefa/l+a1FAcyKQBu/vHBWOik0zxc+MOkVLB2GwXBcjuWy3
YayQ0KpPHjYPaHy1PbFFRpHu8VZfXakmAblJralP0gYsmlsmuyMIPEqamDt7v0i8OPeXKZkG
X-Proofpoint-ORIG-GUID: WrONG9v9W5k0KZDJteXywKUWNmUrVgg5
X-Authority-Analysis: v=2.4 cv=M7NNKzws c=1 sm=1 tr=0 ts=68406acb cx=c_pps a=W6EPrjjQM45bXwhc9OBL1g==:117 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19 a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19
a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10 a=NEAV23lmAAAA:8 a=2FqylPF2CGEeS-aIZ4UA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10
X-Proofpoint-GUID: WrONG9v9W5k0KZDJteXywKUWNmUrVgg5
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 6/4/25 5:28 AM, Sebastian Andrzej Siewior wrote:
On 2025-06-03 15:00:43 [-0400], Chris Mason wrote:
Hi everyone,
Hi,
While testing Peter's latest scheduler patches against current Linus
git, I found a pretty big performance regression with schbench:
https://github.com/masoncl/schbench
The command line I was using:
schbench -L -m 4 -M auto -t 256 -n 0 -r 60 -s 0
…
schbench uses one futex per thread, and the command line ends up
allocating 1024 threads, so the default bucket size used by this commit
is just too small. Using 2048 buckets makes the problem go away.
There is also this pthread_mutex_t but yeah
Yeah, but -L disables the pthread nonsense.
On my big turin system, this commit slows down RPS by 36%. But even a
VM on a skylake machine sees a 29% difference.
schbench is a microbenchmark, so grain of salt on all of this, but I
think our defaults are probably too low.
we could
diff --git a/kernel/futex/core.c b/kernel/futex/core.c
index abbd97c2fcba8..9046f3d9693e7 100644
--- a/kernel/futex/core.c
+++ b/kernel/futex/core.c
@@ -1687,7 +1687,7 @@ int futex_hash_allocate_default(void)
scoped_guard(rcu) {
threads = min_t(unsigned int,
get_nr_threads(current),
- num_online_cpus());
+ num_online_cpus() * 2);
fph = rcu_dereference(current->mm->futex_phash);
if (fph) {
which would increase it to 2048 as Chris asks for.
I haven't followed these changes, so asking some extra questions. This
would bump to num_online_cpus() * 2, which probably isn't 2048 right?
We've got large systems that are basically dedicated to single
workloads, and those will probably miss the larger global hash table,
regressing like schbench did. Then we have large systems spread over
multiple big workloads that will love the private tables.
In either case, I think growing the hash table as a multiple of thread
count instead of cpu count will probably better reflect the crazy things
multi-threaded applications do? At any rate, I don't think we want
applications to need prctl to get back to the performance they had on
older kernels.
For people that want to avoid that memory overhead, I'm assuming they
want the CONFIG_FUTEX_PRIVATE_HASH off, so the Kconfig help text should
make that more clear.
Then there the possibility of
diff --git a/kernel/futex/core.c b/kernel/futex/core.c> index
abbd97c2fcba8..a19a96cc09c9e 100644
--- a/kernel/futex/core.c
+++ b/kernel/futex/core.c
@@ -1680,6 +1680,8 @@ int futex_hash_allocate_default(void)
{
unsigned int threads, buckets, current_buckets = 0;
struct futex_private_hash *fph;
+ bool current_immutable = false;
+ unsigned int flags = 0;
if (!current->mm)
return 0;
@@ -1695,6 +1697,7 @@ int futex_hash_allocate_default(void)
return 0;
current_buckets = fph->hash_mask + 1;
+ current_immutable = fph->immutable;
}
}
@@ -1705,10 +1708,13 @@ int futex_hash_allocate_default(void)
buckets = roundup_pow_of_two(4 * threads);
buckets = clamp(buckets, 16, futex_hashmask + 1);
- if (current_buckets >= buckets)
- return 0;
+ if (current_buckets >= buckets) {
+ if (current_immutable)
+ return 0;
+ flags = FH_IMMUTABLE;
+ }
- return futex_hash_allocate(buckets, 0);
+ return futex_hash_allocate(buckets, flags);
}
> static int futex_hash_get_slots(void)
to make hash immutable once the upper limit has been reached. There will
be no more auto-resize. One could argue that if the user did not touch
it, he might not do it at all.
This would avoid the reference accounting. Some testing:
256 cores, 2xNUMA:
| average rps: 1 701 947.02 Futex HBs: 0 immutable: 1
| average rps: 785 446.07 Futex HBs: 1024 immutable: 0
| average rps: 1 586 755.62 Futex HBs: 1024 immutable: 1> | average
rps: 736 769.77 Futex HBs: 2048 immutable: 0
| average rps: 1 555 182.52 Futex HBs: 2048 immutable: 1
How long are these runs? That's a huge benefit from being immutable
(1.5M vs 736K?) but the hash table churn should be confined to early in
the schbench run right?
144 cores, 4xNUMA:
| average rps: 2 691 912.55 Futex HBs: 0 immutable: 1
| average rps: 1 306 443.68 Futex HBs: 1024 immutable: 0
| average rps: 2 471 382.28 Futex HBs: 1024 immutable: 1
| average rps: 1 269 503.90 Futex HBs: 2048 immutable: 0
| average rps: 2 656 228.67 Futex HBs: 2048 immutable: 1
tested with this on top:
This schbench hunk is just testing the performance impact of different
bucket sizes, but hopefully we don't need it long term unless we want to
play with even bigger hash tables?
-chris
diff --git a/schbench.c b/schbench.c
index 1be3e280f5c38..40a5f0091111e 100644
--- a/schbench.c
+++ b/schbench.c
@@ -19,6 +19,8 @@
#include <unistd.h>
#include <errno.h>
#include <getopt.h>
+#include <linux/prctl.h>
+#include <sys/prctl.h>
#include <sys/time.h>
#include <time.h>
#include <string.h>
@@ -42,6 +44,9 @@
#define USEC_PER_SEC (1000000)
+static int futex_size = -1;
+static int futex_flags;
+
/* -m number of message threads */
static int message_threads = 1;
/* -t number of workers per message thread */
@@ -127,7 +132,7 @@ enum {
HELP_LONG_OPT = 1,
};
-char *option_string = "p:m:M:W:t:Cr:R:w:i:z:A:n:F:Lj:s:J:";
+char *option_string = "p:m:M:W:t:Cr:R:w:i:z:A:n:F:Lj:s:J:H:I";
static struct option long_options[] = {
{"pipe", required_argument, 0, 'p'},
{"message-threads", required_argument, 0, 'm'},
@@ -176,6 +181,29 @@ static void print_usage(void)
exit(1);
}
+#ifndef PR_FUTEX_HASH
+#define PR_FUTEX_HASH 78
+# define PR_FUTEX_HASH_SET_SLOTS 1
+# define FH_FLAG_IMMUTABLE (1ULL << 0)
+# define PR_FUTEX_HASH_GET_SLOTS 2
+# define PR_FUTEX_HASH_GET_IMMUTABLE 3
+#endif
+
+static int futex_hash_slots_set(unsigned int slots, int flags)
+{
+ return prctl(PR_FUTEX_HASH, PR_FUTEX_HASH_SET_SLOTS, slots, flags);
+}
+
+static int futex_hash_slots_get(void)
+{
+ return prctl(PR_FUTEX_HASH, PR_FUTEX_HASH_GET_SLOTS);
+}
+
+static int futex_hash_immutable_get(void)
+{
+ return prctl(PR_FUTEX_HASH, PR_FUTEX_HASH_GET_IMMUTABLE);
+}
+
/*
* returns 0 if we fail to parse and 1 if we succeed
*/
@@ -347,6 +375,13 @@ static void parse_options(int ac, char **av)
exit(1);
}
break;
+ case 'H':
+ futex_size = atoi(optarg);
+ break;
+ case 'I':
+ futex_flags = FH_FLAG_IMMUTABLE;
+ break;
+
case '?':
case HELP_LONG_OPT:
print_usage();
@@ -1811,6 +1846,9 @@ int main(int ac, char **av)
}
}
+ if (futex_size >= 0)
+ futex_hash_slots_set(futex_size, futex_flags);
+
requests_per_sec /= message_threads;
loops_per_sec = 0;
stopping = 0;
@@ -1920,6 +1958,8 @@ int main(int ac, char **av)
}
free(message_threads_mem);
+ fprintf(stderr, "Futex HBs: %d immutable: %d\n", futex_hash_slots_get(),
+ futex_hash_immutable_get());
return 0;
}
Comments?
-chris
Sebastian
Return-Path: <linux-kernel+bounces-673480-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 47C9A41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:49:37 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 8B4FD7A9D9E
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:48:16 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 3857D1D63C5;
Wed, 4 Jun 2025 15:49:26 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="vb2N4Nwz"
Received: from mail-pj1-f74.google.com (mail-pj1-f74.google.com [209.85.216.74])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 190674C7C
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:49:23 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.74
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749052165; cv=none; b=t/TMcRY3vk6cBC56qAVHJPDfbnyuzw5ndvaATS1qagYM94MNBsamnRTHdfwxGTQZUiTv56RJS5czQCMRnfgW2aezI5ph4S9Y4aAfYClaPra+Wf+D4AFf+VsD/yMDSnC3VpLvj276GhnbeuHM/UdsF06uzNd1uHclyCGr1fHT2UY=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749052165; c=relaxed/simple;
bh=E355dxQOrr/PVcwroKhZnO7dWd/iZ1NHGiq889Ab9X0=;
h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From:
To:Cc:Content-Type; b=fXKudo2p7HXhr2LP3pRHqR5BrYRobGqo8e3P2EZ3DFDUGg9Cp9zQiLAio86MqRwuaYv8rxmLZKIAV8ltQAKMfuXFebO5/cz2ArT26LRdNKRF4Xejca3OUUNvrj5Q9vZ4xmJJelR4TBLpNY3XuIz30CNbrwundvyWjkdiWHVZveM=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=vb2N4Nwz; arc=none smtp.client-ip=209.85.216.74
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com
Received: by mail-pj1-f74.google.com with SMTP id 98e67ed59e1d1-312436c2224so5576a91.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 08:49:23 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=google.com; s=20230601; t=1749052163; x=1749656963; darn=vger.kernel.org;
h=cc:to:from:subject:message-id:references:mime-version:in-reply-to
:date:from:to:cc:subject:date:message-id:reply-to;
bh=APQsb45khTfPV4BXCtKSSbtPEml4hNZfBir9V5yfOUU=;
b=vb2N4NwzMmDUdRJy9eacC+fhVRJa7mVGnOlspJTZ9O3Xss488uiMNaRIKJd40aD849
Rm7SeSHbpi81siSGLq22lVAqEUKmgs8T4M1DQAbIvwycXvsG4iu1mtIKR652yA8VDA3v
Ndywt+Zw9NfRQjGbH+BDghFF+insHeaksYyGfKaQiav18JgGA0diVfgG8oVnZBz60mtI
tLPl4iYbrECgKPPDbPzQHKYX68SIEQjaB/RWrQA4gDd2paYFFM+9BkSI7E0qedC3svN/
TbB32QhsCMcTAUmiExOyO+zRBVIocf5DLW0RiwC/CBUUpC2uRTk4JwcdDsDFvjHVm9bB
jPDA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749052163; x=1749656963;
h=cc:to:from:subject:message-id:references:mime-version:in-reply-to
:date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=APQsb45khTfPV4BXCtKSSbtPEml4hNZfBir9V5yfOUU=;
b=htionW+9A8EM2A4DZkRafcj7cxipXStQXqTCMYQjzwyujgnDPqXSmi6QgyXZU4t8CW
SUiX2J+rsVnpB6c+INdYEeOxQ2Sbc2h/gwhhggvDOWAUnAIB9EnT2iA/knt+bHjdjP0O
aP7gMNQoe8ntN4dbWxcdBtvDV+kv851etSBZgnA0MWgR4iBA4RwMfEPPL33eSe48/mT3
xMr/3/2eB99LFmBu5yz/Lb0nlek9BFn5JBVjufY9zhRkY9GkjQUPDOsdShgxHjY53Bmf
LqTUOctb4TimvM/GMIMOqXLXDNSljpYIc164sMA8+Xr6IZOb7mQJprP8p68wYdhs855N
PzLA==
X-Forwarded-Encrypted: i=1; AJvYcCWYLu4hxQPnmkjufHoleFm2t8R9Um5Q6ySmS7qFqgKL6upm8OxxAr2bDozkFkdLzm6HUphkLk6JuD5TZ4M=@vger.kernel.org
X-Gm-Message-State: AOJu0YzZH/IIoiJnHXEz+pdK5CyugO+N23DoCHUB3Idpq/e0NZKzow4T
jAmu2mpy3XM0NjKjLa4LEwjsv2wJmEI/TVsRq45HUNoDrH851lugjB3nMmIxsWC18H2BTsUhn4a
4hfu0mg==
X-Google-Smtp-Source: AGHT+IEhBYHH0jG1lNTT5kDcZ2O2I2zO4DfrveKxEVf0tri6G7bWBC1AeFJUjRv/5iW3hgKOjhXeD0GyTU4=
X-Received: from pjboe5.prod.google.com ([2002:a17:90b:3945:b0:312:4274:c4ce])
(user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:4a:b0:311:bdea:dca0
with SMTP id 98e67ed59e1d1-3130ce0458fmr6517554a91.33.1749052163390; Wed, 04
Jun 2025 08:49:23 -0700 (PDT)
Date: Wed, 4 Jun 2025 08:49:21 -0700
In-Reply-To: <688ba3c4-bf8a-47f1-ad14-85a23399582c@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
Mime-Version: 1.0
References: <20250529234013.3826933-1-seanjc@xxxxxxxxxx> <20250529234013.3826933-9-seanjc@xxxxxxxxxx>
<688ba3c4-bf8a-47f1-ad14-85a23399582c@xxxxxxxxxx>
Message-ID: <aEBrAbhRFkou4Mvj@xxxxxxxxxx>
Subject: Re: [PATCH 08/28] KVM: nSVM: Use dedicated array of MSRPM offsets to
merge L0 and L1 bitmaps
From: Sean Christopherson <seanjc@xxxxxxxxxx>
To: Paolo Bonzini <pbonzini@xxxxxxxxxx>
Cc: kvm@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
Borislav Petkov <bp@xxxxxxxxx>, Xin Li <xin@xxxxxxxxx>, Chao Gao <chao.gao@xxxxxxxxx>,
Dapeng Mi <dapeng1.mi@xxxxxxxxxxxxxxx>
Content-Type: text/plain; charset="us-ascii"
X-Spam-Status: No, score=-11.0 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025, Paolo Bonzini wrote:
On 5/30/25 01:39, Sean Christopherson wrote:
> Use a dedicated array of MSRPM offsets to merge L0 and L1 bitmaps, i.e. to
> merge KVM's vmcb01 bitmap with L1's vmcb12 bitmap. This will eventually
> allow for the removal of direct_access_msrs, as the only path where
> tracking the offsets is truly justified is the merge for nested SVM, where
> merging in chunks is an easy way to batch uaccess reads/writes.
>
> Opportunistically omit the x2APIC MSRs from the merge-specific array
> instead of filtering them out at runtime.
>
> Note, disabling interception of XSS, EFER, PAT, GHCB, and TSC_AUX is
> mutually exclusive with nested virtualization, as KVM passes through the
> MSRs only for SEV-ES guests, and KVM doesn't support nested virtualization
> for SEV+ guests. Defer removing those MSRs to a future cleanup in order
> to make this refactoring as benign as possible.
>
> Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
> ---
> arch/x86/kvm/svm/nested.c | 72 +++++++++++++++++++++++++++++++++------
> arch/x86/kvm/svm/svm.c | 4 +++
> arch/x86/kvm/svm/svm.h | 2 ++
> 3 files changed, 67 insertions(+), 11 deletions(-)
>
> diff --git a/arch/x86/kvm/svm/nested.c b/arch/x86/kvm/svm/nested.c
> index 89a77f0f1cc8..e53020939e60 100644
> --- a/arch/x86/kvm/svm/nested.c
> +++ b/arch/x86/kvm/svm/nested.c
> @@ -184,6 +184,64 @@ void recalc_intercepts(struct vcpu_svm *svm)
> }
> }
> +static int nested_svm_msrpm_merge_offsets[9] __ro_after_init;
> +static int nested_svm_nr_msrpm_merge_offsets __ro_after_init;
> +
> +int __init nested_svm_init_msrpm_merge_offsets(void)
> +{
> + const u32 merge_msrs[] = {
"static const", please.
Ugh, I was thinking the compiler would be magical enough to not generate code to
fill an on-stack array at runtime, but that's not the case.
AFAICT, tagging it __initdata works, so I'll do this to hopefully ensure the
memory is discarded after module load.
diff --git a/arch/x86/kvm/svm/nested.c b/arch/x86/kvm/svm/nested.c
index fb4808cf4711..af530f45bf64 100644
--- a/arch/x86/kvm/svm/nested.c
+++ b/arch/x86/kvm/svm/nested.c
@@ -205,7 +205,7 @@ static int svm_msrpm_offset(u32 msr)
int __init nested_svm_init_msrpm_merge_offsets(void)
{
- const u32 merge_msrs[] = {
+ static const u32 __initdata merge_msrs[] = {
MSR_STAR,
MSR_IA32_SYSENTER_CS,
MSR_IA32_SYSENTER_EIP,
Return-Path: <linux-kernel+bounces-673482-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 256C541E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:49:52 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 018373A6857
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:49:30 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 53F961DE2BC;
Wed, 4 Jun 2025 15:49:38 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=analog.com header.i=@analog.com header.b="a0pcN45t"
Received: from mx0a-00128a01.pphosted.com (mx0a-00128a01.pphosted.com [148.163.135.77])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id DC1E41D5175;
Wed, 4 Jun 2025 15:49:35 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.135.77
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749052177; cv=none; b=GiayEiU1d1W79hPl25DZoK5dm4GNhdLimYXu5NXJB8QbiKJnedQlq+kJKplp9a6GU+cQ8v2pRLiCPsVNaYVdKqC/Ub1nKsx0kpAgfTMXPof7kAO8QqraH/vKsq5dRxZpQH2LQonIfWcJXjJiB02+byiajV2HZPqG2dbsDJGFQ2s=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749052177; c=relaxed/simple;
bh=8mkPg7mEcrb8I75RjBz1Bmbnu3KCBCssH5QspO2gOFE=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References:
In-Reply-To:To:CC; b=nik/s0/IKIo3MZkhPi8qHjGY9nDbfu7iq0qUDtWagPkfSk2qdW4XurrhNcI+TEigZtAvR3PBNOcIZBUPN9cuBY7R2W0LEKfpFKAeS2VLcfHOr9OpyPeb7FQgK0mAG8hBtiemscGEdHrGOdcSK4o0pY6n4dDHFOxv31W6+EW8Rdo=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=analog.com; spf=pass smtp.mailfrom=analog.com; dkim=pass (2048-bit key) header.d=analog.com header.i=@analog.com header.b=a0pcN45t; arc=none smtp.client-ip=148.163.135.77
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=analog.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=analog.com
Received: from pps.filterd (m0167088.ppops.net [127.0.0.1])
by mx0a-00128a01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 554D4Mui023283;
Wed, 4 Jun 2025 11:49:20 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=analog.com; h=cc
:content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=DKIM; bh=3Z7o8
DM2qIcGBH62grXBsYITC2RBxzrsg0t1Sq/TSEY=; b=a0pcN45t2IpTqRNUiAcfz
VDejd1XkAhS4Dg7RGIzHq+MHeU5WJrOBVGiVHjldQ+7wb8BSUBvKBPqIgrp3BArB
ouSnb+h9lS7cFf84VA5fP833ygFlAzZPxUX+g0QGbv5frJ2rJkjCL5T+gWG4c0z2
2F1E2BDlrnQZP1QRQt4mj3nRqtfLbZCao5KLFn9AWr59wTryAZBCgqDRyKEgJPLH
3MjY6l+7cCCfcjdrH0ehEOw1s/V52j9WJk3UG0oz/lWLOdj//RCpJo/nC4dOQHKO
9l2w7H3DKvhrFb8XIAxSTyxe3Dh9pQ3bBISUHuV4Fam0QkoGC484dIH7xZo3S52E
Q==
Received: from nwd2mta3.analog.com ([137.71.173.56])
by mx0a-00128a01.pphosted.com (PPS) with ESMTPS id 472k2u1w5d-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 11:49:20 -0400 (EDT)
Received: from ASHBMBX8.ad.analog.com (ASHBMBX8.ad.analog.com [10.64.17.5])
by nwd2mta3.analog.com (8.14.7/8.14.7) with ESMTP id 554FnJYl020822
(version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL);
Wed, 4 Jun 2025 11:49:19 -0400
Received: from ASHBMBX8.ad.analog.com (10.64.17.5) by ASHBMBX8.ad.analog.com
(10.64.17.5) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.10; Wed, 4 Jun
2025 11:49:19 -0400
Received: from zeus.spd.analog.com (10.66.68.11) by ashbmbx8.ad.analog.com
(10.64.17.5) with Microsoft SMTP Server id 15.2.1748.10 via Frontend
Transport; Wed, 4 Jun 2025 11:49:19 -0400
Received: from HYB-DlYm71t3hSl.ad.analog.com (HYB-DlYm71t3hSl.ad.analog.com [10.44.3.51])
by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 554Fn5K4003109;
Wed, 4 Jun 2025 11:49:13 -0400
From: Jorge Marques <jorge.marques@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 17:48:57 +0200
Subject: [PATCH 1/2] dt-bindings: i3c: Add adi-i3c-master
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Message-ID: <20250604-adi-i3c-master-v1-1-0488e80dafcb@xxxxxxxxxx>
References: <20250604-adi-i3c-master-v1-0-0488e80dafcb@xxxxxxxxxx>
In-Reply-To: <20250604-adi-i3c-master-v1-0-0488e80dafcb@xxxxxxxxxx>
To: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>,
Frank Li
<Frank.Li@xxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski
<krzk+dt@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>
CC: <linux-i3c@xxxxxxxxxxxxxxxxxxx>, <devicetree@xxxxxxxxxxxxxxx>,
<linux-kernel@xxxxxxxxxxxxxxx>,
Jorge Marques <jorge.marques@xxxxxxxxxx>
X-Mailer: b4 0.14.2
X-Developer-Signature: v=1; a=ed25519-sha256; t=1749052145; l=2640;
i=jorge.marques@xxxxxxxxxx; s=20250303; h=from:subject:message-id;
bh=8mkPg7mEcrb8I75RjBz1Bmbnu3KCBCssH5QspO2gOFE=;
b=1Fe2M4tiNDOHYQKgo8HJBDvfEaicq0YiWCDCn/VaB8HsAKk4jSx2YPaGOB5qf67w2KAE5ixAy
UpVfv4mgg+LD1pEHqfJLF8zQFoakmh/fNr4KWVsOQo++yl/VHcmR0rS
X-Developer-Key: i=jorge.marques@xxxxxxxxxx; a=ed25519;
pk=NUR1IZZMH0Da3QbJ2tBSznSPVfRpuoWdhBzKGSpAdbg=
X-ADIRuleOP-NewSCL: Rule Triggered
X-Proofpoint-GUID: 4ObCpcVnM3lZjKqVXZ3WVNOdnGW3Mk0S
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDExOSBTYWx0ZWRfXwF00/Mx5s4Q2
Yr6F3NZtlFGBSc98bSOOexvzLQfGpTZT4rByFgUUaxmMP8g85lnExO42ufP2w+IBX3/ROosrjwx
2sFdynhwBTj2jA7DBuC42qToka4/9KQkH5rAG77U/CmIC31vU7hFJHV3ekqZKCQZUmKXxqjmxuN
lG8a9ZrXIxLGynj/uBdiUbgk1amCy4sgnKD/j8rRrE3uVQnqnKE0iIya8Xeo7EwMPzANV0bV9WA
NykyB22B4eNBsrISl6Dye4zBzJF8L2P0t511hQ94lTF7NIJCx+nTASbGnnecb6fN9+WdIXINc14
q9P6p+gnR6SyJRVk25SCt+iUGIByZh+UqpHSFPTaqZHMNjIPO5g3DOALRJMJKPer7gQ07m9KvYz
juO6BRTPYr4mltMMYNFE4IwMq3G3uegeZnVOR31a6SquiUzhJp1ck0Nbf/IjQdbMyyBL/2bk
X-Proofpoint-ORIG-GUID: 4ObCpcVnM3lZjKqVXZ3WVNOdnGW3Mk0S
X-Authority-Analysis: v=2.4 cv=Fv4F/3rq c=1 sm=1 tr=0 ts=68406b00 cx=c_pps
a=PpDZqlmH/M8setHirZLBMw==:117 a=PpDZqlmH/M8setHirZLBMw==:17
a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10 a=gEfo2CItAAAA:8 a=wI1k2SEZAAAA:8
a=gAnH3GRIAAAA:8 a=Br2UW1UjAAAA:8 a=BiVzJI_yISUpa7ZiZSMA:9 a=3ZKOabzyN94A:10
a=QEXdDO2ut3YA:10 a=sptkURWiP4Gy88Gu7hUp:22 a=6HWbV-4b7c7AdzY24d_u:22
a=WmXOPjafLNExVIMTj843:22
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
adultscore=0 impostorscore=0 suspectscore=0 mlxlogscore=967 spamscore=0
malwarescore=0 phishscore=0 clxscore=1011 lowpriorityscore=0
priorityscore=1501 bulkscore=0 mlxscore=0 classifier=spam authscore=0
authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1
engine=8.19.0-2505280000 definitions=main-2506040119
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Add nodes for ADI I3C Controller IP core.
Signed-off-by: Jorge Marques <jorge.marques@xxxxxxxxxx>
---
.../devicetree/bindings/i3c/adi,i3c-master.yaml | 63 ++++++++++++++++++++++
MAINTAINERS | 5 ++
2 files changed, 68 insertions(+)
diff --git a/Documentation/devicetree/bindings/i3c/adi,i3c-master.yaml b/Documentation/devicetree/bindings/i3c/adi,i3c-master.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..859dbfde15f123db59d7aa46c120c4a3ac05198e
--- /dev/null
+++ b/Documentation/devicetree/bindings/i3c/adi,i3c-master.yaml
@@ -0,0 +1,63 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/i3c/adi,i3c-master.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices I3C Controller
+
+description: |
+ The ADI I3C controller implements a subset of the I3C-basic specification to
+ interface I3C and I2C peripherals [1].
+
+ [1] https://analogdevicesinc.github.io/hdl/library/i3c_controller
+
+maintainers:
+ - Jorge Marques <jorge.marques@xxxxxxxxxx>
+
+allOf:
+ - $ref: i3c.yaml#
+
+properties:
+ compatible:
+ const: adi,i3c-master
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ minItems: 1
+ items:
+ - description: The AXI interconnect clock.
+ - description: The I3C controller clock.
+
+ clock-names:
+ items:
+ - const: s_axi_aclk
+ - const: i3c_clk
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - interrupts
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ i3c@44a00000 {
+ compatible = "adi,i3c-master";
+ reg = <0x44a00000 0x1000>;
+ interrupts = <0 56 4>;
+ clocks = <&clkc 15>, <&clkc 15>;
+ clock-names = "s_axi_aclk", "i3c_clk";
+ #address-cells = <3>;
+ #size-cells = <0>;
+
+ /* I3C and I2C devices */
+ };
diff --git a/MAINTAINERS b/MAINTAINERS
index 96b82704950184bd71623ff41fc4df31e4c7fe87..6f56e17dcecf902c6812827c1ec3e067c65e9894 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -11243,6 +11243,11 @@ S: Maintained
F: Documentation/devicetree/bindings/i3c/aspeed,ast2600-i3c.yaml
F: drivers/i3c/master/ast2600-i3c-master.c
+I3C DRIVER FOR ANALOG DEVICES I3C CONTROLLER IP
+M: Jorge Marques <jorge.marques@xxxxxxxxxx>
+S: Maintained
+F: Documentation/devicetree/bindings/i3c/adi,i3c-master.yaml
+
I3C DRIVER FOR CADENCE I3C MASTER IP
M: Przemysław Gaj <pgaj@xxxxxxxxxxx>
S: Maintained
--
2.49.0
Return-Path: <linux-kernel+bounces-673481-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id E508A41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:49:53 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 600D37AACB8
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:48:33 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 0ED431DE2BA;
Wed, 4 Jun 2025 15:49:38 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=analog.com header.i=@analog.com header.b="wIzbmFq6"
Received: from mx0a-00128a01.pphosted.com (mx0a-00128a01.pphosted.com [148.163.135.77])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id BB54B1A725A;
Wed, 4 Jun 2025 15:49:35 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.135.77
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749052177; cv=none; b=Rv+EkCAFLABXC5xiJcQX7uU1MB6dWvbKQuzOcqZS7i2GvHTqq7bdsnAcIAEP3+NMH94pnjkoXwSxVoWJU1rER7xodq2zXRC8fhJH098cMgIko0fEy2XcIDB3qN7b5SwHk5S/tRx4430XaFjqx2C2QDBqV3xsanuYbfJUOScDlls=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749052177; c=relaxed/simple;
bh=vhhKf47KqG9CLznJkMhmlMXu58zLzVz7VvXyLhONGz8=;
h=From:Subject:Date:Message-ID:MIME-Version:Content-Type:To:CC; b=EYzpKvpi2sfY0Nr549878U7WI3OIZAky8Pus1k7hwu2vQ7olZPvNB9nnsFssMs1hzOo/q1ErIDJRwBCPZZ+uk3nnL6LGpMcE+vjmDyc9l7kGdCxXoGjnudYxbNbhsvoP56EIitJnGcbLtOaJyj5Q7GeISB6xn6yEudU/D3RLy0o=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=analog.com; spf=pass smtp.mailfrom=analog.com; dkim=pass (2048-bit key) header.d=analog.com header.i=@analog.com header.b=wIzbmFq6; arc=none smtp.client-ip=148.163.135.77
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=analog.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=analog.com
Received: from pps.filterd (m0167088.ppops.net [127.0.0.1])
by mx0a-00128a01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 554D6Q50023428;
Wed, 4 Jun 2025 11:49:19 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=analog.com; h=cc
:content-transfer-encoding:content-type:date:from:message-id
:mime-version:subject:to; s=DKIM; bh=gqvAslu0+W4zDZ/S9EiQb6vrEwe
o7vsyczUj4kc+3Jc=; b=wIzbmFq6/iMbAe4IovKqZOBzFM7F3QxqRotxCc7+0Oa
PttM+qVrSvBH92heJUSRnVxBIF00Sfa8ejvR3VPQ/yUcf2m+HyyxTPXB5AXI1zON
3nsVDnD4fhaU/DgIozZZUb5xTOB9C3oWQ3tihiWG+D1uvyVU05SyW/RPBrXv5Cfm
MOLMqPGZNlWjCTduh62bqAX0DIu3Gzsmba6nTVjKkSAAw0XTRF2Z1avWHlIK1IFR
mwRWywEEnk1Gjozm9KRlseAV4Esy6v72GqSO0H7Um5vrinK28Aj4kf8+RPBgci7O
/kxbjh24sbHCsT7MQzJ5M5Kwa5azp4L+UJYdHuCrxXA==
Received: from nwd2mta4.analog.com ([137.71.173.58])
by mx0a-00128a01.pphosted.com (PPS) with ESMTPS id 472k2u1w5a-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 11:49:18 -0400 (EDT)
Received: from ASHBMBX9.ad.analog.com (ASHBMBX9.ad.analog.com [10.64.17.10])
by nwd2mta4.analog.com (8.14.7/8.14.7) with ESMTP id 554FnH0u039301
(version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL);
Wed, 4 Jun 2025 11:49:17 -0400
Received: from ASHBCASHYB5.ad.analog.com (10.64.17.133) by
ASHBMBX9.ad.analog.com (10.64.17.10) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.2.1748.10; Wed, 4 Jun 2025 11:49:17 -0400
Received: from ASHBMBX8.ad.analog.com (10.64.17.5) by
ASHBCASHYB5.ad.analog.com (10.64.17.133) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.2.1748.10; Wed, 4 Jun 2025 11:49:17 -0400
Received: from zeus.spd.analog.com (10.66.68.11) by ashbmbx8.ad.analog.com
(10.64.17.5) with Microsoft SMTP Server id 15.2.1748.10 via Frontend
Transport; Wed, 4 Jun 2025 11:49:17 -0400
Received: from HYB-DlYm71t3hSl.ad.analog.com (HYB-DlYm71t3hSl.ad.analog.com [10.44.3.51])
by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 554Fn5K3003109;
Wed, 4 Jun 2025 11:49:08 -0400
From: Jorge Marques <jorge.marques@xxxxxxxxxx>
Subject: [PATCH 0/2] Add ADI I3C Controller
Date: Wed, 4 Jun 2025 17:48:56 +0200
Message-ID: <20250604-adi-i3c-master-v1-0-0488e80dafcb@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
X-B4-Tracking: v=1; b=H4sIAOhqQGgC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE
vPSU3UzU4B8JSMDI1MDMwMT3cSUTN1M42Td3MTiktQiXaNEU0MTi2RTi2QTcyWgpoKi1LTMCrC
B0bG1tQBTDA5QYAAAAA==
X-Change-ID: 20250604-adi-i3c-master-2a5148c58c47
To: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>,
Frank Li
<Frank.Li@xxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski
<krzk+dt@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>
CC: <linux-i3c@xxxxxxxxxxxxxxxxxxx>, <devicetree@xxxxxxxxxxxxxxx>,
<linux-kernel@xxxxxxxxxxxxxxx>,
Jorge Marques <jorge.marques@xxxxxxxxxx>
X-Mailer: b4 0.14.2
X-Developer-Signature: v=1; a=ed25519-sha256; t=1749052145; l=1126;
i=jorge.marques@xxxxxxxxxx; s=20250303; h=from:subject:message-id;
bh=vhhKf47KqG9CLznJkMhmlMXu58zLzVz7VvXyLhONGz8=;
b=9P83OD6xgp4adz+K/0eFSLadmPKclk9TLhzw1VCYW49YrWsCt9ffojNeAw7M9hHSXFfXvRRdL
H7bw+qbwuYBBZry/12hi6LiIf93nSTJd1hinZ2hzNLWWqcoQ2D4/9De
X-Developer-Key: i=jorge.marques@xxxxxxxxxx; a=ed25519;
pk=NUR1IZZMH0Da3QbJ2tBSznSPVfRpuoWdhBzKGSpAdbg=
X-ADIRuleOP-NewSCL: Rule Triggered
X-Proofpoint-GUID: 1dSFb5FUc3d1PfrHpKDBUqlFOBIORX27
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDExOSBTYWx0ZWRfX2bpw6Qp8wjEN
xoMePeKPZOXa2QaMqQ6uhklumG7/3GsKZu+SZZFG2ekP2zlbFHgF3p05Jl6nbw24qvAo8Eot/Fk
i8U3S6iygMgLLiHHu2rLu3xeqya0q5Ssg81ansEOWXXedEBbTWdJJbG04pei26BqOBCdvawQykR
UzBDfARYYi5HPC5Vq9llY9eibttMySoRdcYoZsnzko/43M4PGps4VWTc3luX1Uj3AVvQnnUAw73
5AuAG20AB2ZURRtJkJHs9Bj0NN4mu7n8171AOFw0O9dQv+Qm9YNOwVw7LpeqzOX2IcEghD0jZpH
1yxb/2PUEUh9BNiv0lnXTGc6qYTcdgiITrru+VuuRlhIafLLW024Ka94eve/hJ7uwa9/j8CuvCr
n2IMYJv5reGcFQBt5CFmVwGU0HXqtzQtr0ng1KNlFQZV1/QFikm7pEjCBjqe+tod5QQUijV3
X-Proofpoint-ORIG-GUID: 1dSFb5FUc3d1PfrHpKDBUqlFOBIORX27
X-Authority-Analysis: v=2.4 cv=Fv4F/3rq c=1 sm=1 tr=0 ts=68406afe cx=c_pps
a=3WNzaoukacrqR9RwcOSAdA==:117 a=3WNzaoukacrqR9RwcOSAdA==:17
a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10 a=wI1k2SEZAAAA:8 a=gAnH3GRIAAAA:8
a=AbWnsF95IPDzd2HxxOMA:9 a=QEXdDO2ut3YA:10 a=6HWbV-4b7c7AdzY24d_u:22
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
adultscore=0 impostorscore=0 suspectscore=0 mlxlogscore=820 spamscore=0
malwarescore=0 phishscore=0 clxscore=1011 lowpriorityscore=0
priorityscore=1501 bulkscore=0 mlxscore=0 classifier=spam authscore=0
authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1
engine=8.19.0-2505280000 definitions=main-2506040119
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
I3C Controller is subset of the I3C-basic specification to interface
peripherals through I3C and I2C. The controller RTL is FPGA
synthesizable and documentation is provided at
https://analogdevicesinc.github.io/hdl/library/i3c_controller
The main target for the I3C Controller IP is low-cost FPGAs.
In this version the driver supports IBI (only the MDB), I3C and I2C
transfers.
Signed-off-by: Jorge Marques <jorge.marques@xxxxxxxxxx>
---
Jorge Marques (2):
dt-bindings: i3c: Add adi-i3c-master
i3c: master: Add driver for Analog Devices I3C Controller IP
.../devicetree/bindings/i3c/adi,i3c-master.yaml | 63 ++
MAINTAINERS | 6 +
drivers/i3c/master/Kconfig | 11 +
drivers/i3c/master/Makefile | 1 +
drivers/i3c/master/adi-i3c-master.c | 1063 ++++++++++++++++++++
5 files changed, 1144 insertions(+)
---
base-commit: 00286d7d643d3c98e48d9cc3a9f471b37154f462
change-id: 20250604-adi-i3c-master-2a5148c58c47
Best regards,
--
Jorge Marques <jorge.marques@xxxxxxxxxx>
Return-Path: <linux-kernel+bounces-673483-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 13E9441E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:50:14 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 3B14F189A6EC
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:50:27 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id AFF541DDC00;
Wed, 4 Jun 2025 15:49:43 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=analog.com header.i=@analog.com header.b="mkcP1zm4"
Received: from mx0b-00128a01.pphosted.com (mx0a-00128a01.pphosted.com [148.163.135.77])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 40BCC1DE4DB;
Wed, 4 Jun 2025 15:49:38 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.135.77
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749052181; cv=none; b=gLAnfEoJrpyxrvmBeQiY+k7dquyOjV6M0A+ZZHEb+iMwOiCixIsKp4hloRnyzTuHjVUoFxFZfkrhATRXiHsa4S8ffE4ijYhu4e4aPB2i+dHss9hgEQep9cHhF79+Y9QBDC67sWvV4glS8CM9jHS/n3EGJqK96+ePPwftKzqv47g=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749052181; c=relaxed/simple;
bh=09PiIzolwuCMRCDoMH/yUdtQS+Ol13SA32X0JsTwpN8=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References:
In-Reply-To:To:CC; b=CS788X/1NQF4pRJ9jh9JgXwCaUGXwDaf+vPOEuqJC60LXHKbzsJQcJREvlX7xILIFDGa5m8xZpNmi8OmHnB6yGa7fW/7jqaxoMDn4Jc+c61I+sKUoBbKz5YH/BPKQaIbV5iQWg+JfHvbcgV4/OdvyQTma7DVCaIf//ijiVYQJz0=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=analog.com; spf=pass smtp.mailfrom=analog.com; dkim=pass (2048-bit key) header.d=analog.com header.i=@analog.com header.b=mkcP1zm4; arc=none smtp.client-ip=148.163.135.77
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=analog.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=analog.com
Received: from pps.filterd (m0375855.ppops.net [127.0.0.1])
by mx0b-00128a01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 554CLYsw030463;
Wed, 4 Jun 2025 11:49:22 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=analog.com; h=cc
:content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=DKIM; bh=PoOE0
dfsByiWridubbWDgLpHP3Agyz1FrZzORJb1Yok=; b=mkcP1zm4w8GcV8QoBwu6n
xvb1HmlU/3HrQK2DttzMoyQHX1X21zS3e44zSVZg1F+8mwt4tYjULpfUdiwVdGfU
ADV0xeFIw0Y+S/Fr8MAR+O4P9Kp4dapy9R0jNQbI11WwXmvq3DCQSOqLUq/qRhW7
XToZ2+7Y88Uf/SrU79Z6eep8XY0RuqGL/WST7w6hU8Sw+RVkX7KI2Q4BPrbAx0T/
f2z/FLFNq4Df9QZzUlt31aM3IaUcQPEpHgBojYL+rREaWnVYUL2tOATOnMvDjrm9
oqxPOB/LHXlRUyuVJMaLK4IbJsXccISQRvI74LlLZ5wppqkbz47aDP7A5GjSv2Cf
w==
Received: from nwd2mta4.analog.com ([137.71.173.58])
by mx0b-00128a01.pphosted.com (PPS) with ESMTPS id 472p2vh0yf-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 11:49:21 -0400 (EDT)
Received: from ASHBMBX9.ad.analog.com (ASHBMBX9.ad.analog.com [10.64.17.10])
by nwd2mta4.analog.com (8.14.7/8.14.7) with ESMTP id 554FnK9d039307
(version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL);
Wed, 4 Jun 2025 11:49:20 -0400
Received: from ASHBCASHYB5.ad.analog.com (10.64.17.133) by
ASHBMBX9.ad.analog.com (10.64.17.10) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.2.1748.10; Wed, 4 Jun 2025 11:49:20 -0400
Received: from ASHBMBX8.ad.analog.com (10.64.17.5) by
ASHBCASHYB5.ad.analog.com (10.64.17.133) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.2.1748.10; Wed, 4 Jun 2025 11:49:20 -0400
Received: from zeus.spd.analog.com (10.66.68.11) by ashbmbx8.ad.analog.com
(10.64.17.5) with Microsoft SMTP Server id 15.2.1748.10 via Frontend
Transport; Wed, 4 Jun 2025 11:49:19 -0400
Received: from HYB-DlYm71t3hSl.ad.analog.com (HYB-DlYm71t3hSl.ad.analog.com [10.44.3.51])
by zeus.spd.analog.com (8.15.1/8.15.1) with ESMTP id 554Fn5K5003109;
Wed, 4 Jun 2025 11:49:14 -0400
From: Jorge Marques <jorge.marques@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 17:48:58 +0200
Subject: [PATCH 2/2] i3c: master: Add driver for Analog Devices I3C
Controller IP
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Message-ID: <20250604-adi-i3c-master-v1-2-0488e80dafcb@xxxxxxxxxx>
References: <20250604-adi-i3c-master-v1-0-0488e80dafcb@xxxxxxxxxx>
In-Reply-To: <20250604-adi-i3c-master-v1-0-0488e80dafcb@xxxxxxxxxx>
To: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>,
Frank Li
<Frank.Li@xxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski
<krzk+dt@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>
CC: <linux-i3c@xxxxxxxxxxxxxxxxxxx>, <devicetree@xxxxxxxxxxxxxxx>,
<linux-kernel@xxxxxxxxxxxxxxx>,
Jorge Marques <jorge.marques@xxxxxxxxxx>
X-Mailer: b4 0.14.2
X-Developer-Signature: v=1; a=ed25519-sha256; t=1749052145; l=31092;
i=jorge.marques@xxxxxxxxxx; s=20250303; h=from:subject:message-id;
bh=09PiIzolwuCMRCDoMH/yUdtQS+Ol13SA32X0JsTwpN8=;
b=iHOMng2vnTIubdiVmZEJdOI7kiYr6crpQH9AnnSztMA1iHFAfUPvZzkFvduObg5F/HzI+LBmb
odo1E7TcbIwAtGmi7B+0hrj2rLGeG5lpj9iGBigqHiqu9i0M8pm8l3B
X-Developer-Key: i=jorge.marques@xxxxxxxxxx; a=ed25519;
pk=NUR1IZZMH0Da3QbJ2tBSznSPVfRpuoWdhBzKGSpAdbg=
X-ADIRuleOP-NewSCL: Rule Triggered
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDExOSBTYWx0ZWRfX5CxVHithJERK
faM7XfG1Q/GiZWVMbUTTDn4YRgPJ3eW6pNj+JqFyOtHPbfv61SdBga3xcBw061thxsNJJjJccz3
BPDp+iXChc/y/E4PZfHwE50qQwJ+0S8Nrjuj8oRz3ejdCQcD0oIbvFNzAGQcGMVLFMHtzcMoZJj
zgJPfQSk9MsLzb0n+5wUBOiLy+u5t6ou5TEO/JttMWA8kdkSkW39BnfcWU/x6tFDrTlibKgbFcF
OztDRB93i4fa5uQ+yhUCp8b9vrJQH+3WeqGMBkWmtO3w3kzx9q/tsEXExp3TDjJpqeAd9gPLdf+
JgVH915y0ewz9QF6Cs+RjTNuljOis4A9OYiNC0QsBTAm7mSewOXGGFNadqS0he/VcHIDf/Il8ID
o7M4bPeHjN2YL1lywQOm9ERW+f63nf0fruZ0KzXFS9FcONm+PfpnHgUNJPUrtwHtDgubqrqZ
X-Proofpoint-GUID: DKaU5bGB-UVTtC7qXZlbPfhcb3oLGAOY
X-Proofpoint-ORIG-GUID: DKaU5bGB-UVTtC7qXZlbPfhcb3oLGAOY
X-Authority-Analysis: v=2.4 cv=CdgI5Krl c=1 sm=1 tr=0 ts=68406b01 cx=c_pps
a=3WNzaoukacrqR9RwcOSAdA==:117 a=3WNzaoukacrqR9RwcOSAdA==:17
a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10 a=gAnH3GRIAAAA:8 a=Br2UW1UjAAAA:8
a=jPpI4jNERvfxAMYflC4A:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10
a=WmXOPjafLNExVIMTj843:22
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
priorityscore=1501 bulkscore=0 lowpriorityscore=0 impostorscore=0
clxscore=1015 mlxscore=0 adultscore=0 phishscore=0 mlxlogscore=999
spamscore=0 suspectscore=0 malwarescore=0 classifier=spam authscore=0
authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1
engine=8.19.0-2505280000 definitions=main-2506040119
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Add support for Analog Devices I3C Controller IP, an AXI-interfaced IP
core that supports I3C and I2C devices, multiple speed-grades and
I3C IBIs.
Signed-off-by: Jorge Marques <jorge.marques@xxxxxxxxxx>
---
MAINTAINERS | 1 +
drivers/i3c/master/Kconfig | 11 +
drivers/i3c/master/Makefile | 1 +
drivers/i3c/master/adi-i3c-master.c | 1063 +++++++++++++++++++++++++++++++++++
4 files changed, 1076 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 6f56e17dcecf902c6812827c1ec3e067c65e9894..9eb5b6c327590725d1641fd4b73e48fc1d1a3954 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -11247,6 +11247,7 @@ I3C DRIVER FOR ANALOG DEVICES I3C CONTROLLER IP
M: Jorge Marques <jorge.marques@xxxxxxxxxx>
S: Maintained
F: Documentation/devicetree/bindings/i3c/adi,i3c-master.yaml
+F: drivers/i3c/master/adi-i3c-master.c
I3C DRIVER FOR CADENCE I3C MASTER IP
M: Przemysław Gaj <pgaj@xxxxxxxxxxx>
diff --git a/drivers/i3c/master/Kconfig b/drivers/i3c/master/Kconfig
index 7b30db3253af9d5c6aee6544c060e491bfbeb643..328b7145cdefa20e708ebfa3383e849ce51c5a71 100644
--- a/drivers/i3c/master/Kconfig
+++ b/drivers/i3c/master/Kconfig
@@ -1,4 +1,15 @@
# SPDX-License-Identifier: GPL-2.0-only
+config ADI_I3C_MASTER
+ tristate "Analog Devices I3C master driver"
+ depends on HAS_IOMEM
+ help
+ Support for Analog Devices I3C Controller IP, an AXI-interfaced IP
+ core that supports I3C and I2C devices, multiple speed-grades and
+ I3C IBIs.
+
+ This driver can also be built as a module. If so, the module
+ will be called adi-i3c-master.
+
config CDNS_I3C_MASTER
tristate "Cadence I3C master driver"
depends on HAS_IOMEM
diff --git a/drivers/i3c/master/Makefile b/drivers/i3c/master/Makefile
index 3e97960160bc85e5eaf2966ec0c3fae458c2711e..6cc4f4b73e7bdc206b68c750390f9c3cc2ccb199 100644
--- a/drivers/i3c/master/Makefile
+++ b/drivers/i3c/master/Makefile
@@ -1,4 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-only
+obj-$(CONFIG_ADI_I3C_MASTER) += adi-i3c-master.o
obj-$(CONFIG_CDNS_I3C_MASTER) += i3c-master-cdns.o
obj-$(CONFIG_DW_I3C_MASTER) += dw-i3c-master.o
obj-$(CONFIG_AST2600_I3C_MASTER) += ast2600-i3c-master.o
diff --git a/drivers/i3c/master/adi-i3c-master.c b/drivers/i3c/master/adi-i3c-master.c
new file mode 100644
index 0000000000000000000000000000000000000000..6f44b0b6fc2020bb0131e8e2943806c0a9d9ce7b
--- /dev/null
+++ b/drivers/i3c/master/adi-i3c-master.c
@@ -0,0 +1,1063 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * I3C Controller driver
+ * Copyright 2024 Analog Devices Inc.
+ * Author: Jorge Marques <jorge.marques@xxxxxxxxxx>
+ */
+
+#include <linux/bitops.h>
+#include <linux/clk.h>
+#include <linux/err.h>
+#include <linux/errno.h>
+#include <linux/i3c/master.h>
+#include <linux/interrupt.h>
+#include <linux/io.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/platform_device.h>
+
+#define VERSION_MAJOR(x) (((x) >> 16) & 0xff)
+#define VERSION_MINOR(x) (((x) >> 8) & 0xff)
+#define VERSION_PATCH(x) ((x) & 0xff)
+
+#define MAX_DEVS 16
+
+#define REG_VERSION 0x000
+#define REG_ENABLE 0x040
+#define REG_IRQ_MASK 0x080
+#define REG_IRQ_PENDING 0x084
+#define REG_CMD_FIFO 0x0d4
+#define REG_CMDR_FIFO 0x0d8
+#define REG_SDO_FIFO 0x0dc
+#define REG_SDI_FIFO 0x0e0
+#define REG_IBI_FIFO 0x0e4
+#define REG_FIFO_STATUS 0x0e8
+#define REG_OPS 0x100
+#define REG_IBI_CONFIG 0x140
+#define REG_DEV_CHAR 0x180
+
+#define CMD0_FIFO_IS_CCC BIT(22)
+#define CMD0_FIFO_BCAST BIT(21)
+#define CMD0_FIFO_SR BIT(20)
+#define CMD0_FIFO_LEN(l) ((l) << 8)
+#define CMD0_FIFO_LEN_MAX 4095
+#define CMD0_FIFO_DEV_ADDR(a) ((a) << 1)
+#define CMD0_FIFO_RNW BIT(0)
+
+#define CMD1_FIFO_CCC(id) ((id) & GENMASK(7, 0))
+
+#define CMDR_NO_ERROR 0
+#define CMDR_CE0_ERROR 1
+#define CMDR_CE2_ERROR 4
+#define CMDR_NACK_RESP 6
+#define CMDR_UDA_ERROR 8
+#define CMDR_ERROR(x) (((x) & GENMASK(23, 20)) >> 20)
+#define CMDR_XFER_BYTES(x) (((x) & GENMASK(19, 8)) >> 8)
+
+#define FIFO_STATUS_CMDR_EMPTY BIT(0)
+#define FIFO_STATUS_IBI_EMPTY BIT(1)
+#define IRQ_PENDING_CMDR_PENDING BIT(5)
+#define IRQ_PENDING_IBI_PENDING BIT(6)
+#define IRQ_PENDING_DAA_PENDING BIT(7)
+
+#define DEV_CHAR_IS_I2C BIT(0)
+#define DEV_CHAR_IS_ATTACHED BIT(1)
+#define DEV_CHAR_BCR_IBI(x) (((x) & GENMASK(2, 1)) << 1)
+#define DEV_CHAR_WEN BIT(8)
+#define DEV_CHAR_ADDR(x) (((x) & GENMASK(6, 0)) << 9)
+
+#define REG_OPS_SET_SG(x) ((x) << 5)
+#define REG_OPS_PP_SG_MASK GENMASK(6, 5)
+
+#define REG_IBI_CONFIG_LISTEN BIT(1)
+#define REG_IBI_CONFIG_ENABLE BIT(0)
+
+enum speed_grade {PP_SG_UNSET, PP_SG_1MHZ, PP_SG_3MHZ, PP_SG_6MHZ, PP_SG_12MHZ};
+struct adi_i3c_cmd {
+ u32 cmd0;
+ u32 cmd1;
+ u32 tx_len;
+ const void *tx_buf;
+ u32 rx_len;
+ void *rx_buf;
+ u32 error;
+};
+
+struct adi_i3c_xfer {
+ struct list_head node;
+ struct completion comp;
+ int ret;
+ unsigned int ncmds;
+ unsigned int ncmds_comp;
+ struct adi_i3c_cmd cmds[];
+};
+
+struct adi_i3c_master {
+ struct i3c_master_controller base;
+ u32 free_rr_slots;
+ unsigned int maxdevs;
+ struct {
+ unsigned int num_slots;
+ struct i3c_dev_desc **slots;
+ spinlock_t lock; /* Protect IBI slot access */
+ } ibi;
+ struct {
+ struct list_head list;
+ struct adi_i3c_xfer *cur;
+ spinlock_t lock; /* Protect transfer */
+ } xferqueue;
+ void __iomem *regs;
+ struct clk *clk;
+ unsigned long i3c_scl_lim;
+ struct {
+ u8 addrs[MAX_DEVS];
+ u8 index;
+ } daa;
+};
+
+static inline struct adi_i3c_master *to_adi_i3c_master(struct i3c_master_controller *master)
+{
+ return container_of(master, struct adi_i3c_master, base);
+}
+
+static void adi_i3c_master_wr_to_tx_fifo(struct adi_i3c_master *master,
+ const u8 *bytes, int nbytes)
+{
+ writesl(master->regs + REG_SDO_FIFO, bytes, nbytes / 4);
+ if (nbytes & 3) {
+ u32 tmp = 0;
+
+ memcpy(&tmp, bytes + (nbytes & ~3), nbytes & 3);
+ writesl(master->regs + REG_SDO_FIFO, &tmp, 1);
+ }
+}
+
+static void adi_i3c_master_rd_from_rx_fifo(struct adi_i3c_master *master,
+ u8 *bytes, int nbytes)
+{
+ readsl(master->regs + REG_SDI_FIFO, bytes, nbytes / 4);
+ if (nbytes & 3) {
+ u32 tmp;
+
+ readsl(master->regs + REG_SDI_FIFO, &tmp, 1);
+ memcpy(bytes + (nbytes & ~3), &tmp, nbytes & 3);
+ }
+}
+
+static bool adi_i3c_master_supports_ccc_cmd(struct i3c_master_controller *m,
+ const struct i3c_ccc_cmd *cmd)
+{
+ if (cmd->ndests > 1)
+ return false;
+
+ switch (cmd->id) {
+ case I3C_CCC_ENEC(true):
+ case I3C_CCC_ENEC(false):
+ case I3C_CCC_DISEC(true):
+ case I3C_CCC_DISEC(false):
+ case I3C_CCC_RSTDAA(true):
+ case I3C_CCC_RSTDAA(false):
+ case I3C_CCC_ENTDAA:
+ case I3C_CCC_SETDASA:
+ case I3C_CCC_SETNEWDA:
+ case I3C_CCC_GETMWL:
+ case I3C_CCC_GETMRL:
+ case I3C_CCC_GETPID:
+ case I3C_CCC_GETBCR:
+ case I3C_CCC_GETDCR:
+ case I3C_CCC_GETSTATUS:
+ case I3C_CCC_GETHDRCAP:
+ return true;
+ default:
+ break;
+ }
+
+ return false;
+}
+
+static int adi_i3c_master_disable(struct adi_i3c_master *master)
+{
+ writel(~REG_IBI_CONFIG_LISTEN | ~REG_IBI_CONFIG_ENABLE,
+ master->regs + REG_IBI_CONFIG);
+
+ return 0;
+}
+
+static struct adi_i3c_xfer *adi_i3c_master_alloc_xfer(struct adi_i3c_master *master,
+ unsigned int ncmds)
+{
+ struct adi_i3c_xfer *xfer;
+
+ xfer = kzalloc(struct_size(xfer, cmds, ncmds), GFP_KERNEL);
+ if (!xfer)
+ return NULL;
+
+ INIT_LIST_HEAD(&xfer->node);
+ xfer->ncmds = ncmds;
+ xfer->ret = -ETIMEDOUT;
+
+ return xfer;
+}
+
+static void adi_i3c_master_start_xfer_locked(struct adi_i3c_master *master)
+{
+ struct adi_i3c_xfer *xfer = master->xferqueue.cur;
+ unsigned int i;
+
+ if (!xfer)
+ return;
+
+ for (i = 0; i < xfer->ncmds; i++) {
+ struct adi_i3c_cmd *cmd = &xfer->cmds[i];
+
+ adi_i3c_master_wr_to_tx_fifo(master, cmd->tx_buf, cmd->tx_len);
+ }
+
+ for (i = 0; i < xfer->ncmds; i++) {
+ struct adi_i3c_cmd *cmd = &xfer->cmds[i];
+
+ writel(cmd->cmd0, master->regs + REG_CMD_FIFO);
+ if (cmd->cmd0 & CMD0_FIFO_IS_CCC)
+ writel(cmd->cmd1, master->regs + REG_CMD_FIFO);
+ }
+}
+
+static void adi_i3c_master_end_xfer_locked(struct adi_i3c_master *master,
+ u32 pending)
+{
+ struct adi_i3c_xfer *xfer = master->xferqueue.cur;
+ int i, ret = 0;
+ u32 status0;
+
+ if (!xfer)
+ return;
+
+ for (status0 = readl(master->regs + REG_FIFO_STATUS);
+ !(status0 & FIFO_STATUS_CMDR_EMPTY);
+ status0 = readl(master->regs + REG_FIFO_STATUS)) {
+ struct adi_i3c_cmd *cmd;
+ u32 cmdr, rx_len;
+
+ cmdr = readl(master->regs + REG_CMDR_FIFO);
+
+ cmd = &xfer->cmds[xfer->ncmds_comp++];
+ rx_len = min_t(u32, CMDR_XFER_BYTES(cmdr), cmd->rx_len);
+ adi_i3c_master_rd_from_rx_fifo(master, cmd->rx_buf, rx_len);
+ cmd->error = CMDR_ERROR(cmdr);
+ }
+
+ for (i = 0; i < xfer->ncmds; i++) {
+ switch (xfer->cmds[i].error) {
+ case CMDR_NO_ERROR:
+ break;
+
+ case CMDR_CE0_ERROR:
+ case CMDR_CE2_ERROR:
+ case CMDR_NACK_RESP:
+ case CMDR_UDA_ERROR:
+ ret = -EIO;
+ break;
+
+ default:
+ ret = -EINVAL;
+ break;
+ }
+ }
+
+ xfer->ret = ret;
+
+ if (xfer->ncmds_comp != xfer->ncmds)
+ return;
+
+ complete(&xfer->comp);
+
+ xfer = list_first_entry_or_null(&master->xferqueue.list,
+ struct adi_i3c_xfer, node);
+ if (xfer)
+ list_del_init(&xfer->node);
+
+ master->xferqueue.cur = xfer;
+ adi_i3c_master_start_xfer_locked(master);
+}
+
+static void adi_i3c_master_queue_xfer(struct adi_i3c_master *master,
+ struct adi_i3c_xfer *xfer)
+{
+ unsigned long flags;
+
+ init_completion(&xfer->comp);
+ spin_lock_irqsave(&master->xferqueue.lock, flags);
+ if (master->xferqueue.cur) {
+ list_add_tail(&xfer->node, &master->xferqueue.list);
+ } else {
+ master->xferqueue.cur = xfer;
+ adi_i3c_master_start_xfer_locked(master);
+ }
+ spin_unlock_irqrestore(&master->xferqueue.lock, flags);
+}
+
+static void adi_i3c_master_unqueue_xfer(struct adi_i3c_master *master,
+ struct adi_i3c_xfer *xfer)
+{
+ unsigned long flags;
+
+ spin_lock_irqsave(&master->xferqueue.lock, flags);
+ if (master->xferqueue.cur == xfer)
+ master->xferqueue.cur = NULL;
+ else
+ list_del_init(&xfer->node);
+
+ writel(0x01, master->regs + REG_ENABLE);
+ writel(0x00, master->regs + REG_ENABLE);
+ writel(IRQ_PENDING_CMDR_PENDING, master->regs + REG_IRQ_MASK);
+
+ spin_unlock_irqrestore(&master->xferqueue.lock, flags);
+}
+
+static enum i3c_error_code adi_i3c_cmd_get_err(struct adi_i3c_cmd *cmd)
+{
+ switch (cmd->error) {
+ case CMDR_CE0_ERROR:
+ return I3C_ERROR_M0;
+
+ case CMDR_CE2_ERROR:
+ case CMDR_NACK_RESP:
+ return I3C_ERROR_M2;
+
+ default:
+ break;
+ }
+
+ return I3C_ERROR_UNKNOWN;
+}
+
+static int adi_i3c_master_send_ccc_cmd(struct i3c_master_controller *m,
+ struct i3c_ccc_cmd *cmd)
+{
+ struct adi_i3c_master *master = to_adi_i3c_master(m);
+ struct adi_i3c_xfer *xfer;
+ struct adi_i3c_cmd *ccmd;
+
+ xfer = adi_i3c_master_alloc_xfer(master, 1);
+ if (!xfer)
+ return -ENOMEM;
+
+ ccmd = xfer->cmds;
+ ccmd->cmd1 = CMD1_FIFO_CCC(cmd->id);
+ ccmd->cmd0 = CMD0_FIFO_IS_CCC |
+ CMD0_FIFO_LEN(cmd->dests[0].payload.len);
+
+ if (cmd->id & I3C_CCC_DIRECT)
+ ccmd->cmd0 |= CMD0_FIFO_DEV_ADDR(cmd->dests[0].addr);
+
+ if (cmd->rnw) {
+ ccmd->cmd0 |= CMD0_FIFO_RNW;
+ ccmd->rx_buf = cmd->dests[0].payload.data;
+ ccmd->rx_len = cmd->dests[0].payload.len;
+ } else {
+ ccmd->tx_buf = cmd->dests[0].payload.data;
+ ccmd->tx_len = cmd->dests[0].payload.len;
+ }
+
+ adi_i3c_master_queue_xfer(master, xfer);
+ if (!wait_for_completion_timeout(&xfer->comp, msecs_to_jiffies(1000)))
+ adi_i3c_master_unqueue_xfer(master, xfer);
+
+ cmd->err = adi_i3c_cmd_get_err(&xfer->cmds[0]);
+ kfree(xfer);
+
+ return 0;
+}
+
+static int adi_i3c_master_priv_xfers(struct i3c_dev_desc *dev,
+ struct i3c_priv_xfer *xfers,
+ int nxfers)
+{
+ struct i3c_master_controller *m = i3c_dev_get_master(dev);
+ struct adi_i3c_master *master = to_adi_i3c_master(m);
+ struct adi_i3c_xfer *xfer;
+ int i, ret;
+
+ for (i = 0; i < nxfers; i++) {
+ if (xfers[i].len > CMD0_FIFO_LEN_MAX)
+ return -EOPNOTSUPP;
+ }
+
+ if (!nxfers)
+ return 0;
+
+ xfer = adi_i3c_master_alloc_xfer(master, nxfers);
+ if (!xfer)
+ return -ENOMEM;
+
+ for (i = 0; i < nxfers; i++) {
+ struct adi_i3c_cmd *ccmd = &xfer->cmds[i];
+
+ ccmd->cmd0 = CMD0_FIFO_DEV_ADDR(dev->info.dyn_addr);
+
+ if (xfers[i].rnw) {
+ ccmd->cmd0 |= CMD0_FIFO_RNW;
+ ccmd->rx_buf = xfers[i].data.in;
+ ccmd->rx_len = xfers[i].len;
+ } else {
+ ccmd->tx_buf = xfers[i].data.out;
+ ccmd->tx_len = xfers[i].len;
+ }
+
+ ccmd->cmd0 |= CMD0_FIFO_LEN(xfers[i].len);
+
+ if (i < nxfers - 1)
+ ccmd->cmd0 |= CMD0_FIFO_SR;
+
+ if (!i)
+ ccmd->cmd0 |= CMD0_FIFO_BCAST;
+ }
+
+ adi_i3c_master_queue_xfer(master, xfer);
+ if (!wait_for_completion_timeout(&xfer->comp,
+ msecs_to_jiffies(1000)))
+ adi_i3c_master_unqueue_xfer(master, xfer);
+
+ ret = xfer->ret;
+
+ for (i = 0; i < nxfers; i++)
+ xfers[i].err = adi_i3c_cmd_get_err(&xfer->cmds[i]);
+
+ kfree(xfer);
+
+ return ret;
+}
+
+struct adi_i3c_i2c_dev_data {
+ u16 id;
+ s16 ibi;
+ struct i3c_generic_ibi_pool *ibi_pool;
+};
+
+static int adi_i3c_master_get_rr_slot(struct adi_i3c_master *master,
+ u8 dyn_addr)
+{
+ if (!master->free_rr_slots)
+ return -ENOSPC;
+
+ return ffs(master->free_rr_slots) - 1;
+}
+
+static int adi_i3c_master_reattach_i3c_dev(struct i3c_dev_desc *dev, u8 dyn_addr)
+{
+ struct i3c_master_controller *m = i3c_dev_get_master(dev);
+ struct adi_i3c_master *master = to_adi_i3c_master(m);
+ u8 addr;
+
+ addr = dev->info.dyn_addr ? dev->info.dyn_addr : dev->info.static_addr;
+
+ writel(DEV_CHAR_ADDR(dyn_addr), master->regs + REG_DEV_CHAR);
+ writel((readl(master->regs + REG_DEV_CHAR) &
+ ~DEV_CHAR_IS_ATTACHED) | DEV_CHAR_WEN,
+ master->regs + REG_DEV_CHAR);
+
+ writel(DEV_CHAR_ADDR(addr), master->regs + REG_DEV_CHAR);
+ writel(readl(master->regs + REG_DEV_CHAR) |
+ DEV_CHAR_IS_ATTACHED | DEV_CHAR_WEN,
+ master->regs + REG_DEV_CHAR);
+
+ return 0;
+}
+
+static int adi_i3c_master_attach_i3c_dev(struct i3c_dev_desc *dev)
+{
+ struct i3c_master_controller *m = i3c_dev_get_master(dev);
+ struct adi_i3c_master *master = to_adi_i3c_master(m);
+ struct adi_i3c_i2c_dev_data *data;
+ int slot;
+ u8 addr;
+
+ data = kzalloc(sizeof(*data), GFP_KERNEL);
+ if (!data)
+ return -ENOMEM;
+
+ slot = adi_i3c_master_get_rr_slot(master, dev->info.dyn_addr);
+ if (slot < 0) {
+ kfree(data);
+ return slot;
+ }
+
+ data->ibi = -1;
+ data->id = slot;
+ i3c_dev_set_master_data(dev, data);
+ master->free_rr_slots &= ~BIT(slot);
+
+ addr = dev->info.dyn_addr ? dev->info.dyn_addr : dev->info.static_addr;
+
+ writel(DEV_CHAR_ADDR(addr), master->regs + REG_DEV_CHAR);
+ writel(readl(master->regs + REG_DEV_CHAR) |
+ DEV_CHAR_IS_ATTACHED | DEV_CHAR_WEN,
+ master->regs + REG_DEV_CHAR);
+
+ return 0;
+}
+
+static void adi_i3c_master_sync_dev_char(struct i3c_master_controller *m)
+{
+ struct adi_i3c_master *master = to_adi_i3c_master(m);
+ struct i3c_dev_desc *i3cdev;
+ u8 addr;
+
+ i3c_bus_for_each_i3cdev(&m->bus, i3cdev) {
+ addr = i3cdev->info.dyn_addr ?
+ i3cdev->info.dyn_addr : i3cdev->info.static_addr;
+ writel(DEV_CHAR_ADDR(addr), master->regs + REG_DEV_CHAR);
+ writel(readl(master->regs + REG_DEV_CHAR) |
+ DEV_CHAR_BCR_IBI(i3cdev->info.bcr) | DEV_CHAR_WEN,
+ master->regs + REG_DEV_CHAR);
+ }
+}
+
+static void adi_i3c_master_detach_i3c_dev(struct i3c_dev_desc *dev)
+{
+ struct i3c_master_controller *m = i3c_dev_get_master(dev);
+ struct adi_i3c_master *master = to_adi_i3c_master(m);
+ struct adi_i3c_i2c_dev_data *data = i3c_dev_get_master_data(dev);
+ u8 addr;
+
+ addr = dev->info.dyn_addr ? dev->info.dyn_addr : dev->info.static_addr;
+
+ writel(DEV_CHAR_ADDR(addr), master->regs + REG_DEV_CHAR);
+ writel((readl(master->regs + REG_DEV_CHAR) &
+ ~DEV_CHAR_IS_ATTACHED) | DEV_CHAR_WEN,
+ master->regs + REG_DEV_CHAR);
+
+ i3c_dev_set_master_data(dev, NULL);
+ master->free_rr_slots |= BIT(data->id);
+ kfree(data);
+}
+
+static int adi_i3c_master_attach_i2c_dev(struct i2c_dev_desc *dev)
+{
+ struct i3c_master_controller *m = i2c_dev_get_master(dev);
+ struct adi_i3c_master *master = to_adi_i3c_master(m);
+ struct adi_i3c_i2c_dev_data *data;
+ int slot;
+
+ slot = adi_i3c_master_get_rr_slot(master, 0);
+ if (slot < 0)
+ return slot;
+
+ data = kzalloc(sizeof(*data), GFP_KERNEL);
+ if (!data)
+ return -ENOMEM;
+
+ data->id = slot;
+ master->free_rr_slots &= ~BIT(slot);
+ i2c_dev_set_master_data(dev, data);
+
+ writel(DEV_CHAR_ADDR(dev->addr) |
+ DEV_CHAR_IS_I2C | DEV_CHAR_IS_ATTACHED | DEV_CHAR_WEN,
+ master->regs + REG_DEV_CHAR);
+
+ return 0;
+}
+
+static void adi_i3c_master_detach_i2c_dev(struct i2c_dev_desc *dev)
+{
+ struct i3c_master_controller *m = i2c_dev_get_master(dev);
+ struct adi_i3c_master *master = to_adi_i3c_master(m);
+ struct adi_i3c_i2c_dev_data *data = i2c_dev_get_master_data(dev);
+
+ writel(DEV_CHAR_ADDR(dev->addr) |
+ DEV_CHAR_IS_I2C | DEV_CHAR_WEN,
+ master->regs + REG_DEV_CHAR);
+
+ i2c_dev_set_master_data(dev, NULL);
+ master->free_rr_slots |= BIT(data->id);
+ kfree(data);
+}
+
+static void adi_i3c_master_bus_cleanup(struct i3c_master_controller *m)
+{
+ struct adi_i3c_master *master = to_adi_i3c_master(m);
+
+ adi_i3c_master_disable(master);
+}
+
+static void adi_i3c_master_upd_i3c_scl_lim(struct adi_i3c_master *master)
+{
+ struct i3c_master_controller *m = &master->base;
+ struct i3c_bus *bus = i3c_master_get_bus(m);
+ u8 i3c_scl_lim = 0;
+ struct i3c_dev_desc *dev;
+ u8 pp_sg;
+
+ i3c_bus_for_each_i3cdev(bus, dev) {
+ u8 max_fscl;
+
+ max_fscl = max(I3C_CCC_MAX_SDR_FSCL(dev->info.max_read_ds),
+ I3C_CCC_MAX_SDR_FSCL(dev->info.max_write_ds));
+
+ switch (max_fscl) {
+ case I3C_SDR1_FSCL_8MHZ:
+ max_fscl = PP_SG_6MHZ;
+ break;
+ case I3C_SDR2_FSCL_6MHZ:
+ max_fscl = PP_SG_3MHZ;
+ break;
+ case I3C_SDR3_FSCL_4MHZ:
+ max_fscl = PP_SG_3MHZ;
+ break;
+ case I3C_SDR4_FSCL_2MHZ:
+ max_fscl = PP_SG_1MHZ;
+ break;
+ case I3C_SDR0_FSCL_MAX:
+ default:
+ max_fscl = PP_SG_12MHZ;
+ break;
+ }
+
+ if (max_fscl &&
+ (i3c_scl_lim > max_fscl || !i3c_scl_lim))
+ i3c_scl_lim = max_fscl;
+ }
+
+ if (!i3c_scl_lim)
+ return;
+
+ master->i3c_scl_lim = i3c_scl_lim - 1;
+
+ pp_sg = readl(master->regs + REG_OPS) &
+ ~REG_OPS_PP_SG_MASK;
+
+ pp_sg |= REG_OPS_SET_SG(master->i3c_scl_lim);
+
+ writel(pp_sg, master->regs + REG_OPS);
+}
+
+static void adi_i3c_master_get_features(struct adi_i3c_master *master,
+ unsigned int slot,
+ struct i3c_device_info *info)
+{
+ memset(info, 0, sizeof(*info));
+
+ info->dyn_addr = 0x31;
+ info->dcr = 0x00;
+ info->bcr = 0x40;
+ info->pid = 0;
+}
+
+static int adi_i3c_master_do_daa(struct i3c_master_controller *m)
+{
+ struct adi_i3c_master *master = to_adi_i3c_master(m);
+ int ret;
+ u32 irq_mask;
+
+ master->daa.index = 0x8;
+ for (u8 i = 0; i < MAX_DEVS; i++) {
+ ret = i3c_master_get_free_addr(m, master->daa.index);
+ if (ret < 0)
+ return -ENOSPC;
+
+ master->daa.index = ret;
+ master->daa.addrs[i] = master->daa.index;
+ }
+ /* Will be reused as index for daa.addrs */
+ master->daa.index = 0;
+
+ irq_mask = readl(master->regs + REG_IRQ_MASK);
+ writel(irq_mask | IRQ_PENDING_DAA_PENDING,
+ master->regs + REG_IRQ_MASK);
+
+ ret = i3c_master_entdaa_locked(&master->base);
+
+ writel(irq_mask, master->regs + REG_IRQ_MASK);
+
+ /* DAA always finishes with CE2_ERROR or NACK_RESP */
+ if (ret && ret != I3C_ERROR_M2)
+ return ret;
+
+ /* Add I3C devices discovered */
+ for (u8 i = 0; i < master->daa.index; i++)
+ i3c_master_add_i3c_dev_locked(m, master->daa.addrs[i]);
+ /* Sync retrieved devs info with the IP */
+ adi_i3c_master_sync_dev_char(m);
+
+ i3c_master_defslvs_locked(&master->base);
+
+ adi_i3c_master_upd_i3c_scl_lim(master);
+
+ return 0;
+}
+
+static int adi_i3c_master_bus_init(struct i3c_master_controller *m)
+{
+ struct adi_i3c_master *master = to_adi_i3c_master(m);
+ struct i3c_device_info info = { };
+ int ret;
+
+ ret = i3c_master_get_free_addr(m, 0);
+ if (ret < 0)
+ return ret;
+
+ adi_i3c_master_get_features(master, 0, &info);
+ ret = i3c_master_set_info(&master->base, &info);
+ if (ret)
+ return ret;
+
+ writel(REG_IBI_CONFIG_LISTEN | ~REG_IBI_CONFIG_ENABLE,
+ master->regs + REG_IBI_CONFIG);
+
+ return 0;
+}
+
+static void adi_i3c_master_handle_ibi(struct adi_i3c_master *master,
+ u32 ibi)
+{
+ struct adi_i3c_i2c_dev_data *data;
+ struct i3c_ibi_slot *slot;
+ struct i3c_dev_desc *dev;
+ u8 da, id;
+ u8 *mdb;
+
+ da = (ibi >> 17) & GENMASK(6, 0);
+ for (id = 0; id < master->ibi.num_slots; id++) {
+ if (master->ibi.slots[id] &&
+ master->ibi.slots[id]->info.dyn_addr == da)
+ break;
+ }
+
+ if (id == master->ibi.num_slots)
+ return;
+
+ dev = master->ibi.slots[id];
+ spin_lock(&master->ibi.lock);
+
+ data = i3c_dev_get_master_data(dev);
+ slot = i3c_generic_ibi_get_free_slot(data->ibi_pool);
+ if (!slot)
+ goto out_unlock;
+
+ mdb = slot->data;
+ mdb[0] = (ibi >> 8) & GENMASK(7, 0);
+
+ slot->len = 1;
+ i3c_master_queue_ibi(dev, slot);
+
+out_unlock:
+ spin_unlock(&master->ibi.lock);
+}
+
+static void adi_i3c_master_demux_ibis(struct adi_i3c_master *master)
+{
+ u32 status0;
+
+ for (status0 = readl(master->regs + REG_FIFO_STATUS);
+ !(status0 & FIFO_STATUS_IBI_EMPTY);
+ status0 = readl(master->regs + REG_FIFO_STATUS)) {
+ u32 ibi = readl(master->regs + REG_IBI_FIFO);
+
+ adi_i3c_master_handle_ibi(master, ibi);
+ }
+}
+
+static void adi_i3c_master_handle_da_req(struct adi_i3c_master *master)
+{
+ u8 payload0[8];
+ u32 addr;
+
+ /* Clear device characteristics */
+ adi_i3c_master_rd_from_rx_fifo(master, payload0, 6);
+ addr = master->daa.addrs[master->daa.index++];
+ addr = (addr << 1) | !parity8(addr);
+
+ writel(addr, master->regs + REG_SDO_FIFO);
+}
+
+static irqreturn_t adi_i3c_master_irq(int irq, void *data)
+{
+ struct adi_i3c_master *master = data;
+ u32 pending;
+
+ pending = readl_relaxed(master->regs + REG_IRQ_PENDING);
+ if (pending & IRQ_PENDING_CMDR_PENDING) {
+ spin_lock(&master->xferqueue.lock);
+ adi_i3c_master_end_xfer_locked(master, pending);
+ spin_unlock(&master->xferqueue.lock);
+ }
+ if (pending & IRQ_PENDING_IBI_PENDING)
+ adi_i3c_master_demux_ibis(master);
+ if (pending & IRQ_PENDING_DAA_PENDING)
+ adi_i3c_master_handle_da_req(master);
+ writel_relaxed(pending, master->regs + REG_IRQ_PENDING);
+
+ return IRQ_HANDLED;
+}
+
+static int adi_i3c_master_i2c_xfers(struct i2c_dev_desc *dev,
+ struct i2c_msg *xfers,
+ int nxfers)
+{
+ struct i3c_master_controller *m = i2c_dev_get_master(dev);
+ struct adi_i3c_master *master = to_adi_i3c_master(m);
+ struct adi_i3c_xfer *xfer;
+ int i, ret;
+
+ for (i = 0; i < nxfers; i++) {
+ if (xfers[i].len > CMD0_FIFO_LEN_MAX)
+ return -EOPNOTSUPP;
+ if (xfers[i].flags & I2C_M_TEN)
+ return -EOPNOTSUPP;
+ }
+
+ if (!nxfers)
+ return 0;
+
+ xfer = adi_i3c_master_alloc_xfer(master, nxfers);
+ if (!xfer)
+ return -ENOMEM;
+
+ for (i = 0; i < nxfers; i++) {
+ struct adi_i3c_cmd *ccmd = &xfer->cmds[i];
+
+ ccmd->cmd0 = CMD0_FIFO_DEV_ADDR(xfers[i].addr);
+
+ if (xfers[i].flags & I2C_M_RD) {
+ ccmd->cmd0 |= CMD0_FIFO_RNW;
+ ccmd->rx_buf = xfers[i].buf;
+ ccmd->rx_len = xfers[i].len;
+ } else {
+ ccmd->tx_buf = xfers[i].buf;
+ ccmd->tx_len = xfers[i].len;
+ }
+
+ ccmd->cmd0 |= CMD0_FIFO_LEN(xfers[i].len);
+ }
+
+ adi_i3c_master_queue_xfer(master, xfer);
+ if (!wait_for_completion_timeout(&xfer->comp,
+ msecs_to_jiffies(1000)))
+ adi_i3c_master_unqueue_xfer(master, xfer);
+
+ ret = xfer->ret;
+ kfree(xfer);
+ return ret;
+}
+
+static int adi_i3c_master_disable_ibi(struct i3c_dev_desc *dev)
+{
+ struct i3c_master_controller *m = i3c_dev_get_master(dev);
+ struct adi_i3c_master *master = to_adi_i3c_master(m);
+ struct i3c_dev_desc *i3cdev;
+ bool enabled = 0;
+ int ret;
+
+ ret = i3c_master_disec_locked(m, dev->info.dyn_addr,
+ I3C_CCC_EVENT_SIR);
+
+ i3c_bus_for_each_i3cdev(&m->bus, i3cdev) {
+ if (dev != i3cdev && i3cdev->ibi)
+ enabled |= i3cdev->ibi->enabled;
+ }
+ if (!enabled) {
+ writel(REG_IBI_CONFIG_LISTEN | ~REG_IBI_CONFIG_ENABLE,
+ master->regs + REG_IBI_CONFIG);
+ writel(readl(master->regs + REG_IRQ_MASK) | ~IRQ_PENDING_IBI_PENDING,
+ master->regs + REG_IRQ_MASK);
+ }
+
+ return ret;
+}
+
+static int adi_i3c_master_enable_ibi(struct i3c_dev_desc *dev)
+{
+ struct i3c_master_controller *m = i3c_dev_get_master(dev);
+ struct adi_i3c_master *master = to_adi_i3c_master(m);
+
+ writel(REG_IBI_CONFIG_LISTEN | REG_IBI_CONFIG_ENABLE,
+ master->regs + REG_IBI_CONFIG);
+
+ writel(readl(master->regs + REG_IRQ_MASK) | IRQ_PENDING_IBI_PENDING,
+ master->regs + REG_IRQ_MASK);
+
+ return i3c_master_enec_locked(m, dev->info.dyn_addr,
+ I3C_CCC_EVENT_SIR);
+}
+
+static int adi_i3c_master_request_ibi(struct i3c_dev_desc *dev,
+ const struct i3c_ibi_setup *req)
+{
+ struct i3c_master_controller *m = i3c_dev_get_master(dev);
+ struct adi_i3c_master *master = to_adi_i3c_master(m);
+ struct adi_i3c_i2c_dev_data *data;
+ unsigned long flags;
+ unsigned int i;
+
+ data = i3c_dev_get_master_data(dev);
+ data->ibi_pool = i3c_generic_ibi_alloc_pool(dev, req);
+ if (IS_ERR(data->ibi_pool))
+ return PTR_ERR(data->ibi_pool);
+
+ spin_lock_irqsave(&master->ibi.lock, flags);
+ for (i = 0; i < master->ibi.num_slots; i++) {
+ if (!master->ibi.slots[i]) {
+ data->ibi = i;
+ master->ibi.slots[i] = dev;
+ break;
+ }
+ }
+ spin_unlock_irqrestore(&master->ibi.lock, flags);
+
+ if (i < master->ibi.num_slots)
+ return 0;
+
+ i3c_generic_ibi_free_pool(data->ibi_pool);
+ data->ibi_pool = NULL;
+
+ return -ENOSPC;
+}
+
+static void adi_i3c_master_free_ibi(struct i3c_dev_desc *dev)
+{
+ struct i3c_master_controller *m = i3c_dev_get_master(dev);
+ struct adi_i3c_master *master = to_adi_i3c_master(m);
+ struct adi_i3c_i2c_dev_data *data = i3c_dev_get_master_data(dev);
+ unsigned long flags;
+
+ spin_lock_irqsave(&master->ibi.lock, flags);
+ master->ibi.slots[data->ibi] = NULL;
+ data->ibi = -1;
+ spin_unlock_irqrestore(&master->ibi.lock, flags);
+
+ i3c_generic_ibi_free_pool(data->ibi_pool);
+}
+
+static void adi_i3c_master_recycle_ibi_slot(struct i3c_dev_desc *dev,
+ struct i3c_ibi_slot *slot)
+{
+ struct adi_i3c_i2c_dev_data *data = i3c_dev_get_master_data(dev);
+
+ i3c_generic_ibi_recycle_slot(data->ibi_pool, slot);
+}
+
+static const struct i3c_master_controller_ops adi_i3c_master_ops = {
+ .bus_init = adi_i3c_master_bus_init,
+ .bus_cleanup = adi_i3c_master_bus_cleanup,
+ .attach_i3c_dev = adi_i3c_master_attach_i3c_dev,
+ .reattach_i3c_dev = adi_i3c_master_reattach_i3c_dev,
+ .detach_i3c_dev = adi_i3c_master_detach_i3c_dev,
+ .attach_i2c_dev = adi_i3c_master_attach_i2c_dev,
+ .detach_i2c_dev = adi_i3c_master_detach_i2c_dev,
+ .do_daa = adi_i3c_master_do_daa,
+ .supports_ccc_cmd = adi_i3c_master_supports_ccc_cmd,
+ .send_ccc_cmd = adi_i3c_master_send_ccc_cmd,
+ .priv_xfers = adi_i3c_master_priv_xfers,
+ .i2c_xfers = adi_i3c_master_i2c_xfers,
+ .request_ibi = adi_i3c_master_request_ibi,
+ .enable_ibi = adi_i3c_master_enable_ibi,
+ .disable_ibi = adi_i3c_master_disable_ibi,
+ .free_ibi = adi_i3c_master_free_ibi,
+ .recycle_ibi_slot = adi_i3c_master_recycle_ibi_slot,
+};
+
+static const struct of_device_id adi_i3c_master_of_match[] = {
+ { .compatible = "adi,i3c-master" },
+ {}
+};
+
+static int adi_i3c_master_probe(struct platform_device *pdev)
+{
+ struct adi_i3c_master *master;
+ unsigned int version;
+ int ret, irq;
+
+ master = devm_kzalloc(&pdev->dev, sizeof(*master), GFP_KERNEL);
+ if (!master)
+ return -ENOMEM;
+
+ master->regs = devm_platform_ioremap_resource(pdev, 0);
+ if (IS_ERR(master->regs))
+ return PTR_ERR(master->regs);
+
+ master->clk = devm_clk_get(&pdev->dev, "s_axi_aclk");
+ if (IS_ERR(master->clk))
+ return PTR_ERR(master->clk);
+
+ irq = platform_get_irq(pdev, 0);
+ if (irq < 0)
+ return irq;
+
+ ret = clk_prepare_enable(master->clk);
+ if (ret)
+ goto err_clk_disable;
+
+ version = readl(master->regs + REG_VERSION);
+ if (VERSION_MAJOR(version) != 0) {
+ dev_err(&pdev->dev, "Unsupported IP version %u.%u.%c\n",
+ VERSION_MAJOR(version),
+ VERSION_MINOR(version),
+ VERSION_PATCH(version));
+ ret = -EINVAL;
+ goto err_clk_disable;
+ }
+
+ writel(0x00, master->regs + REG_ENABLE);
+ writel(0x00, master->regs + REG_IRQ_MASK);
+
+ ret = devm_request_irq(&pdev->dev, irq, adi_i3c_master_irq, 0,
+ dev_name(&pdev->dev), master);
+ if (ret)
+ goto err_clk_disable;
+
+ platform_set_drvdata(pdev, master);
+
+ master->maxdevs = MAX_DEVS;
+ master->free_rr_slots = GENMASK(master->maxdevs, 1);
+
+ writel(IRQ_PENDING_CMDR_PENDING, master->regs + REG_IRQ_MASK);
+
+ spin_lock_init(&master->ibi.lock);
+ master->ibi.num_slots = 15;
+ master->ibi.slots = devm_kcalloc(&pdev->dev, master->ibi.num_slots,
+ sizeof(*master->ibi.slots),
+ GFP_KERNEL);
+ if (!master->ibi.slots) {
+ ret = -ENOMEM;
+ goto err_clk_disable;
+ }
+
+ ret = i3c_master_register(&master->base, &pdev->dev,
+ &adi_i3c_master_ops, false);
+ if (ret)
+ goto err_clk_disable;
+
+ return 0;
+
+err_clk_disable:
+ clk_disable_unprepare(master->clk);
+
+ return ret;
+}
+
+static void adi_i3c_master_remove(struct platform_device *pdev)
+{
+ struct adi_i3c_master *master = platform_get_drvdata(pdev);
+
+ i3c_master_unregister(&master->base);
+
+ writel(0xff, master->regs + REG_IRQ_PENDING);
+ writel(0x00, master->regs + REG_IRQ_MASK);
+ writel(0x01, master->regs + REG_ENABLE);
+
+ clk_disable_unprepare(master->clk);
+}
+
+static struct platform_driver adi_i3c_master = {
+ .probe = adi_i3c_master_probe,
+ .remove = adi_i3c_master_remove,
+ .driver = {
+ .name = "adi-i3c-master",
+ .of_match_table = adi_i3c_master_of_match,
+ },
+};
+module_platform_driver(adi_i3c_master);
+
+MODULE_AUTHOR("Jorge Marques <jorge.marques@xxxxxxxxxx>");
+MODULE_DESCRIPTION("Analog Devices I3C master driver");
+MODULE_LICENSE("GPL");
--
2.49.0
Return-Path: <linux-kernel+bounces-673484-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 9E59F41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:50:25 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 67205189A941
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:50:39 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 70DF61D619F;
Wed, 4 Jun 2025 15:49:57 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="KzcHHVug"
Received: from out-189.mta1.migadu.com (out-189.mta1.migadu.com [95.215.58.189])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5D0FD1D5ABA
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:49:54 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.189
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749052196; cv=none; b=lZMXxAMr1fo0i5X1rc9vIfEHLFDfZeM6/Ogs6h3mRUQRtGsLut4Ko0qoX1Z7f3Pyg0+Ny7NJDnoG0lZcGEOtSv/7x4zEnrpKYwvq6dUo3MdTs7cNRr2SBkvMtVIQad8uRRfntXdF5sHXiNOGg9tP3halWsC+2pZ5WR94MwYJYzw=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749052196; c=relaxed/simple;
bh=6G5JxN/BVDCcwydBLM00eHdMpYDGWh6mGgRQXDJ2llg=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=seJ8pyH6G4xXQDg7o29sCibgQwYWS3qMELPn6qkVqczdPcZ6EOk4QWUXT+/1w3hMELb6xILLHMPN1OB4mkIQ3auKipbIYYnFVBT+68/5AuIPQOtOp3ko002fuAVO7dHpvLajhoRbFsvImq5MCrnrOD5ANGJJMAF2YWtphaBxU2A=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=KzcHHVug; arc=none smtp.client-ip=95.215.58.189
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev
Date: Wed, 4 Jun 2025 08:49:12 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1;
t=1749052192;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
in-reply-to:in-reply-to:references:references;
bh=va3tPoFKvEZvnM+DL5DLzHoxmXtQwY1XyzpbkHe61Io=;
b=KzcHHVugoFfkefRf47HU3usVKdW0NqhvWH9TCHKIPBCJm9OajrSbQyqBMxB/46I1yHYkcp
UhtddbC8ziUjBCE0lZxtHO6EHO3InWGXbm8PaGzYPplYwCUWyTjcKWPU+tg7ASo7wui0uk
m9fd3AX2hvu2o2bmlX2XZUx7QgpbgnA=
X-Report-Abuse: Please report any abuse attempt to abuse@xxxxxxxxxx and include these headers.
From: Shakeel Butt <shakeel.butt@xxxxxxxxx>
To: "Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
David Hildenbrand <david@xxxxxxxxxx>, lorenzo.stoakes@xxxxxxxxxx, Liam.Howlett@xxxxxxxxxx,
vbabka@xxxxxxx, rppt@xxxxxxxxxx, surenb@xxxxxxxxxx, mhocko@xxxxxxxx,
hannes@xxxxxxxxxxx, muchun.song@xxxxxxxxx, linux-mm@xxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, Randy Dunlap <rdunlap@xxxxxxxxxxxxx>,
Konstantin Khlebnikov <koct9i@xxxxxxxxx>
Subject: Re: [PATCH] mm/vmstat: Fix build with MEMCG=y and VM_EVENT_COUNTERS=n
Message-ID: <hwn7s3xjgpfdtvjtnywvv4wwqqxh3ojha7nblp7vy4zfee4epb@25rgcpyhebb5>
References: <20250604095111.533783-1-kirill.shutemov@xxxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20250604095111.533783-1-kirill.shutemov@xxxxxxxxxxxxxxx>
X-Migadu-Flow: FLOW_OUT
X-Spam-Status: No, score=-3.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 12:51:11PM +0300, Kirill A. Shutemov wrote:
When compiling with MEMCG enabled but VM_EVENT_COUNTERS disabled,
BUILD_BUG_ON() is triggered in vmstat_start because the vmstat_text
array is larger than NR_VMSTAT_ITEMS.
This issue arises because some elements of the vmstat_text array are
present when either MEMCG or VM_EVENT_COUNTERS is enabled, but
NR_VMSTAT_ITEMS only accounts for these elements if VM_EVENT_COUNTERS is
enabled.
The recent change in the BUILD_BUG_ON() check made it more strict,
disallowing extra elements in the array, which revealed the issue.
Instead of adjusting the NR_VMSTAT_ITEMS definition to account for
MEMCG, make MEMCG select VM_EVENT_COUNTERS. VM_EVENT_COUNTERS is
enabled in most configurations anyway.
There is no need to backport this fix to stable trees. Without the
strict BUILD_BUG_ON(), the issue is not harmful. The elements in
question would only be read by the memcg code, not by /proc/vmstat.
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>
Reported-by: Randy Dunlap <rdunlap@xxxxxxxxxxxxx>
Fixes: ebc5d83d0443 ("mm/memcontrol: use vmstat names for printing statistics")
Cc: Konstantin Khlebnikov <koct9i@xxxxxxxxx>
Acked-by: Shakeel Butt <shakeel.butt@xxxxxxxxx>
Return-Path: <linux-kernel+bounces-673485-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id BF6FE41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:56:15 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id CA21B16EEF6
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:56:16 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 0815E1D63E6;
Wed, 4 Jun 2025 15:56:09 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="prTlrsWi"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3B1B24C7C;
Wed, 4 Jun 2025 15:56:07 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749052568; cv=none; b=BxzYu7AxJq+1hQnKuUpSTjqO2DNKtFcjYokV9vVsepFiUZOMktjJy9vZctXTXAIT8LFQT5/0ffyItisd9HDdGwFr0/8p5HvAl1LbkjysDv7SE3iA41bdLRrHR27aMvDE/MpsoRQ2V1tBNL0EDSs57fDnVlPd0zm5ssGgUM98hoM=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749052568; c=relaxed/simple;
bh=acLawW878StXvnWA+xjn0w4gxzlzkiefGpw3iDr4dkw=;
h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References:
MIME-Version:Content-Type; b=bVUr4bNq5GHw4huU5SJliTT2+1Dom2fl5DKjgvFxhOVuIIa05w+6vEIraIykEhZJlTbsAoZonlMq773VRqHyjNYAoxc9A4aIhQLje7VLWiOVtbU39NTBccsAeGm+6K3FoPUf+cxtKjLRaLD/rcMi/OIW/grIN1XvanGSCSthHBY=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=prTlrsWi; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 973F9C4CEE4;
Wed, 4 Jun 2025 15:56:07 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749052567;
bh=acLawW878StXvnWA+xjn0w4gxzlzkiefGpw3iDr4dkw=;
h=Date:From:To:Cc:Subject:In-Reply-To:References:From;
b=prTlrsWiHcJqPPXwDnLSeFSH1u1eaZofMsODN2b4qWWr9lvdVJOIvAfnitx4UhVcY
VXLHYyg1hEIgdjJPAr9PQQGyslvB3yAXfpiRkDy8nPPPMzzxi2KT0QQqoQmuSJQqji
wRkh3SIK73BAoVJ6YuYyw1pTcxZhkRs65TI1zpw5PyRIBaa9jDx3uvWAQzkFNmdguH
gcGEBitSnUEhKLrhYAA/5hnLyFS+GtWn4ZrMa1ZXOicI9ztcIU7TG5PCX1LgGrxZdc
AVsKDHCGncCvFQrJkFYUOlPrV8mjePvB6QU/Gg6WvwJ4FcnhtDrhqq+dr3zacyZbWn
3LJGOcZH2Sk3A==
Received: from [149.88.19.236] (helo=lobster-girl.misterjones.org)
by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
(Exim 4.95)
(envelope-from <maz@xxxxxxxxxx>)
id 1uMqTF-003GGp-8I;
Wed, 04 Jun 2025 16:56:05 +0100
Date: Wed, 04 Jun 2025 16:56:02 +0100
Message-ID: <878qm7ec19.wl-maz@xxxxxxxxxx>
From: Marc Zyngier <maz@xxxxxxxxxx>
To: Lorenzo Pieralisi <lpieralisi@xxxxxxxxxx>
Cc: Rob Herring <robh@xxxxxxxxxx>,
Peter Maydell <peter.maydell@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Thomas Gleixner <tglx@xxxxxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>,
Catalin Marinas <catalin.marinas@xxxxxxx>,
Will Deacon <will@xxxxxxxxxx>,
andre.przywara@xxxxxxx,
Arnd Bergmann <arnd@xxxxxxxx>,
Sascha Bischoff <sascha.bischoff@xxxxxxx>,
Timothy Hayes <timothy.hayes@xxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>,
Mark Rutland <mark.rutland@xxxxxxx>,
Jiri Slaby <jirislaby@xxxxxxxxxx>,
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx,
suzuki.poulose@xxxxxxx
Subject: Re: [PATCH v4 01/26] dt-bindings: interrupt-controller: Add Arm GICv5
In-Reply-To: <aD/0tuak7Hja8k4g@lpieralisi>
References: <20250513-gicv5-host-v4-0-b36e9b15a6c3@xxxxxxxxxx>
<20250513-gicv5-host-v4-1-b36e9b15a6c3@xxxxxxxxxx>
<aDhWlytLCxONZdF9@lpieralisi>
<CAFEAcA_3YLMSy+OsSsRayaRciQ1+jjh-dGzEjrh2Wa8BqdmqrA@xxxxxxxxxxxxxx>
<aD6ouVAXy5qcZtM/@lpieralisi>
<CAL_JsqJ5N2ZUBeAes=wexq=EstRSZ5=heF1_6crAw76yZ9uXog@xxxxxxxxxxxxxx>
<CAFEAcA-JrS0BiT66iin-pRVFadrY-pnJZ8TkDNxcjErknSCnUA@xxxxxxxxxxxxxx>
<CAL_JsqL7x53an2-MaLHP5tfVXb4JxT8ORUMaA8pL-gMsWLJqkA@xxxxxxxxxxxxxx>
<aD/0tuak7Hja8k4g@lpieralisi>
User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue)
FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.1
(aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue")
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-SA-Exim-Connect-IP: 149.88.19.236
X-SA-Exim-Rcpt-To: lpieralisi@xxxxxxxxxx, robh@xxxxxxxxxx, peter.maydell@xxxxxxxxxx, krzk+dt@xxxxxxxxxx, tglx@xxxxxxxxxxxxx, conor+dt@xxxxxxxxxx, catalin.marinas@xxxxxxx, will@xxxxxxxxxx, andre.przywara@xxxxxxx, arnd@xxxxxxxx, sascha.bischoff@xxxxxxx, timothy.hayes@xxxxxxx, Liam.Howlett@xxxxxxxxxx, mark.rutland@xxxxxxx, jirislaby@xxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, devicetree@xxxxxxxxxxxxxxx, suzuki.poulose@xxxxxxx
X-SA-Exim-Mail-From: maz@xxxxxxxxxx
X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, 04 Jun 2025 08:24:38 +0100,
Lorenzo Pieralisi <lpieralisi@xxxxxxxxxx> wrote:
=20
On Tue, Jun 03, 2025 at 02:11:34PM -0500, Rob Herring wrote:
> On Tue, Jun 3, 2025 at 10:37=E2=80=AFAM Peter Maydell <peter.maydell@li=
naro.org> wrote:
> >
> > On Tue, 3 Jun 2025 at 16:15, Rob Herring <robh@xxxxxxxxxx> wrote:
> > >
> > > On Tue, Jun 3, 2025 at 2:48=E2=80=AFAM Lorenzo Pieralisi <lpieralis=
i@xxxxxxxxxx> wrote:
> > > >
> > > > On Thu, May 29, 2025 at 02:17:26PM +0100, Peter Maydell wrote:
> > > > > secure.txt says:
> > > > > # The general principle of the naming scheme for Secure world b=
indings
> > > > > # is that any property that needs a different value in the Secu=
re world
> > > > > # can be supported by prefixing the property name with "secure-=
". So for
> > > > > # instance "secure-foo" would override "foo".
> > >
> > > Today I would say a 'secure-' prefix is a mistake. To my knowledge,
> > > it's never been used anyways. But I don't have much visibility into
> > > what secure world firmware is doing.
> >
> > QEMU uses it for communicating with the secure firmware if
> > you run secure firmware on the virt board. It's done that
> > since we introduced that binding. Indeed that use case is *why*
> > the binding is there. It works fine for the intended purpose,
> > which is "most devices are visible in both S and NS, but a few
> > things are S only (UART, a bit of RAM, secure-only flash").
>=20
> I meant "secure-" as a prefix allowed on *any* property, not
> "secure-status" specifically, which is the only thing QEMU uses
> AFAICT. IOW, I don't think we should be creating secure-reg,
> secure-interrupts, secure-clocks, etc.
=20
Reading secure.txt, what does it mean "device present and usable in
the secure world" ?
=20
So:
=20
status =3D "disabled"
secure-status =3D "okay"
=20
basically means that the device in question allows secure-only MMIO
access, is that what it says ?
=20
If that's the case and we really want to have all config frames
in a single DT, would it be reasonable to have an IRS/ITS DT node
per-frame ?
=20
Then yes, the secure- tag is not enough any longer (because we have to
cope with 4 interrupt domains) but that's a separate problem - again,
this would leave the current reviewed bindings unchanged.
No, this is the same problem, and we need a way to address it.
"secure-*" doesn't cut it in a system with FEAT_RME, where resources
are only available to a single Physical Address Space (PAS). So we
need a way to qualify these resources with a PAS.
Either that, or we have to restrict DT to describe the view of a
single PAS. Which Peter will understandably be unhappy about.
Thanks,
M.
--=20
Jazz isn't dead. It just smells funny.
Return-Path: <linux-kernel+bounces-673486-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 525AC41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:57:19 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 8C570174801
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:57:20 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id B48671D63E6;
Wed, 4 Jun 2025 15:57:13 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="bwyWL4LE"
Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2059.outbound.protection.outlook.com [40.107.244.59])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 35DA4192598;
Wed, 4 Jun 2025 15:57:10 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.244.59
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749052632; cv=fail; b=jEn4EOuP/1ehMOyeTBgwvH9aeKdkuIgn1dJtx1bVrjzyLkKZWTNdYtaqDQdUlP7Al+3isr97nqxeDtxi+3MRix3+DZHAZPw0iLut37qr+AwE+2EOSNCFn9gA6XsQR0AVzBH+DDTZJgTd9KXnkKRpByDj5F2Y+jNFeg8++D5n3DY=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749052632; c=relaxed/simple;
bh=OHrXWV1rKQM9VvVzFzQHIY9uHpVjpxmYlQysgo+dHGk=;
h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To:
Content-Type:MIME-Version; b=IIyLhzVSGfHwWw0ZiltzuZD2Iq4Osw0/+wmdg4iBFhaRJY7o8fFsaU+OtlXgItBtKfYeFySLqSVfSP9J9HbXmWdZr+zFdkOxaVVHjGPYQ4LxqoNaFIJfjFTg2nriZu1PgR/ACVlns+teSXVEXpCVTWP6bw9rftd8BwdaGZgTlYM=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=bwyWL4LE; arc=fail smtp.client-ip=40.107.244.59
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com
Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=Sy5jCaOjbC/YEb2gL6p5/XayvoDrGMwuCiYtZEfx6uDU/a1F5XTxDMzBYcy5e+XYbggO/7rprV2IJPpOwt9v67ws51YHTGHsE8onRAH9er6FYunF2yhqmn77t4iUTsNukTF3yVMMo3XRrlh+kUGJalY6aPhlcXJPkOSl2h2uWcvAeVDfXYvdVklP57XYaLQGOn44nW2bu/+UEYka/yimlRM+1zBAfIdlR5mfArE81VgbjOLDJhdxdf2DMm3t6I/qhOBsw5Fxa2ehL9DkUg5XEW/duMUCQreeBseamN4n7rV9bwyv6hwArPb3O9CPshcZJlc0rzi9LeA1KFvpeiTiZg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=7kc6ITDG6cbMSRaJw80DvIBpIRY2KAqxa56rHDznOfI=;
b=lGNmY6yEZ3Mkqzz0yTQANAT/NgQ8G0949zmxKqhWrJDD56NPmvUNfknLnk6Kkdk6kgVjSr5Y206L1rqqYp1ojE+b2LRMH9uTCPGRZ1kNA9uds6iT4+SzQ2Kj7FLMKV4jJZhT2ffDYjtpELh7ood0DxfEKKBmI7kh5PRGUDpFsilnd2Le3C6IXIojH5aMYo55fi/QfKhR1hFQeXZISppUp7NXcBi6Ab+TKSyRM/JEUoQF5PEwFDh5FkH1NXTH5sHZt/TH7JNyiaelmz0WJA9c/SUoI7apYLeBbHPTWHubZxImxV1giDCUttzNfcI8pTC9Ah6ui4lSMi7g94OZJx+QHA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass
header.d=amd.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=7kc6ITDG6cbMSRaJw80DvIBpIRY2KAqxa56rHDznOfI=;
b=bwyWL4LEmNse9uRQFYZyoG5VNFfJkgM6KtvA8LZDOevJkcwHMaaCOz3DvQwalCMcelj8v+CURPd4tVm/JvWe8L9VgLSURY6Le2sYMDrq9ehbsE9xfU6w0Xe6SPzf1ZA1Eyc0lf5cZx4wRDZMlOf4Ytjtty3izUyN1cwFpDJuqoU=
Authentication-Results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=amd.com;
Received: from DM4PR12MB5070.namprd12.prod.outlook.com (2603:10b6:5:389::22)
by CH2PR12MB9519.namprd12.prod.outlook.com (2603:10b6:610:27c::17) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.35; Wed, 4 Jun
2025 15:57:09 +0000
Received: from DM4PR12MB5070.namprd12.prod.outlook.com
([fe80::20a9:919e:fd6b:5a6e]) by DM4PR12MB5070.namprd12.prod.outlook.com
([fe80::20a9:919e:fd6b:5a6e%7]) with mapi id 15.20.8792.034; Wed, 4 Jun 2025
15:57:08 +0000
Message-ID: <8cd27c20-6439-deec-f09c-e4f6f789761c@xxxxxxx>
Date: Wed, 4 Jun 2025 10:57:05 -0500
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.15.1
Subject: Re: [PATCH] crypto: ccp: Fix SNP panic notifier unregistration
Content-Language: en-US
To: Ashish Kalra <Ashish.Kalra@xxxxxxx>, john.allen@xxxxxxx,
herbert@xxxxxxxxxxxxxxxxxxx, davem@xxxxxxxxxxxxx
Cc: aik@xxxxxxx, dionnaglaze@xxxxxxxxxx, michael.roth@xxxxxxx,
linux-crypto@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
References: <20250602191017.60936-1-Ashish.Kalra@xxxxxxx>
From: Tom Lendacky <thomas.lendacky@xxxxxxx>
In-Reply-To: <20250602191017.60936-1-Ashish.Kalra@xxxxxxx>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-ClientProxiedBy: BN0PR04CA0032.namprd04.prod.outlook.com
(2603:10b6:408:e8::7) To DM4PR12MB5070.namprd12.prod.outlook.com
(2603:10b6:5:389::22)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: DM4PR12MB5070:EE_|CH2PR12MB9519:EE_
X-MS-Office365-Filtering-Correlation-Id: 7ab15a9b-b07a-4864-275e-08dda38075c3
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|376014;
X-Microsoft-Antispam-Message-Info:
=?utf-8?B?RmszRTZWUGZ2SFQwK2N5ZG5Rc21pUUFsS05mU2tGUHdIZWZobnJkNnNVTXBn?=
=?utf-8?B?L1VNVGJtOXJnVGRsZHNwTkN3NHNhL3R5N3ZzdzRPMHFoQk1oRUhoWEwwaWJr?=
=?utf-8?B?c3N2L2Vra3ZMVFJmN3BOWm5SRUw4a0xwbkc3Tjc0NVgwL3NRYjBOL2RnKzBt?=
=?utf-8?B?RXozQTYyMGpCRC9QbWxYS1ZocW9pY2NVWUprSFcwWXNJMzhKREJ3RkFRRTJT?=
=?utf-8?B?ODNHby9DYzlwZFpqNXVVVzNhU3daSmFTbDE5bVl2Nnd4cEk1NFdieFRVNm5U?=
=?utf-8?B?VFI0OWp2VjdSOGd2UU41ei9Xc2Y2WisySlcyeWEwT3pBcGhxbGRtYTNpVVZX?=
=?utf-8?B?Vmt4WmpJZmtMUi9NcG9vc2w0ZlpBNGloeExCOGdCOGNkK2Jhd2ZZUktWTi8z?=
=?utf-8?B?aHZybFJOWW1iTnI2bG5jU1d6dmYyN0MwYkVqU204UUhweEM0dkZ6NXJpZ24z?=
=?utf-8?B?RjVhdDliOGZjOW5GeVZ0MDBLdjM5NEtvYjJTL3pvamNNcXJtVHpzZ2VRVTA3?=
=?utf-8?B?R3BOVkJZSE1NaUlGWHRJRk5MRXNKTmFMeGZuSXhRcGJXbE5uTkl3UWpoeDBk?=
=?utf-8?B?cldVVkdCMGdkOWs3aHZTeTFEeG5CMlkwVktOTTdhSW5MRkp2cSs2WWRicDgw?=
=?utf-8?B?c1BTUjBEZitJMFFrOG9JNGkxZWtVOVhVb0s0aU94NTkxb1QvL0E2M0RFM0FG?=
=?utf-8?B?aldjUFM4SDN1RWJBT3BtVElVOEtBdVdQT2c5SjVMWmdSY21TdE0zNmwrbURK?=
=?utf-8?B?MnV5THhOeGlTN2hEc2RITVFkS1lMYzQ0aC9SeE9uUGMvSmZuSzZxUDVqbExF?=
=?utf-8?B?aEpZc3V6eUZMakJyUGJ6Y3VId3dDVTY0a0oyUDQweWRmcHVqUXVOampkTHRX?=
=?utf-8?B?VldQNmQrbkdidmRkUGNGN2xZaWQxMW13VFNOYWx2V282OU1JV2F6SjlhR3Mx?=
=?utf-8?B?TXFhSFBRdmNYWVplNjdFZlNUMjdDNmhkTjhVekNhUFdkS1hGaFRLdndjK3NG?=
=?utf-8?B?YWlwUU1YZFNtYnNsa1BwVTc5RnpNVUN6ZVRHa1M3OUFuY2tQczRrR3Q0WGVY?=
=?utf-8?B?b2dwUUdGdGxUU3pQYW8wUUtCcTJ1c3pSb1lHVGc0K3o3MExOOXFSdXEyemM3?=
=?utf-8?B?b3pvMXphd3JPR29rTHAwRjVGM0RhblY0WWlRZFBrcnNIOWMreDJJbms3QlJ0?=
=?utf-8?B?UHYwd2VZZFpLL2gvUnhuMzNnSEw5dVFQS29QS29LSFA4OWJEcWFtL0c5MnA4?=
=?utf-8?B?WjJKQzBQR1dMVmtoeE9Od0M5VU5ydzJhNng3M0JJck5UQXN6VURLS3JRaDJU?=
=?utf-8?B?STJEL0JCR0dPTUVQc0g4T2FZRnoxd0xHZHFCSGd5V1lTNzgrOVM1TWxVUTJN?=
=?utf-8?B?RkFwSk9jY0RaTElJSUFRd0RpR3BISnhwNVJyRnAzcDhXWDhuNG9Db0FLQnZJ?=
=?utf-8?B?WjV3QTFESW5Id1FWQXhIb0YybXRpbXpsY2VraWRwb1R6bjhBNExEeFRFZ2lQ?=
=?utf-8?B?RnAzK2ppdXI3SjZ0WnYyRXJua1dndFk1ZE1zTkdzVjYyN2l1cEZvL1doQktz?=
=?utf-8?B?dC84R0RjWWpObnBQS3V4cVFidTMwVENvalREU3IwUndYRTM2ZXlTekg5NGY2?=
=?utf-8?B?RmQ1T3VxZy9lbjhKZWdkQWx1TVhQZW9CSURNRkIwUWgxS01qclBjaE5lWEZB?=
=?utf-8?B?bnpPK1pFOU11QVR0bmFCWkJIRnVlUHBHZ21YV1Z2SEkzU0FZaTltUTF6clo0?=
=?utf-8?B?SGR4WWxPTVlBNGtYOHFNdW53cUNDaXZqTEZocW5NMjB0dmNjeVNrTEtHTTBC?=
=?utf-8?B?cFdLQnQwVTZ0cnpCTW9GR0lyOWRjbzExcENWSWlDNElXUVhETkh0dmdHUzVi?=
=?utf-8?B?Mno1em9uVU9nNk5lYWhsM2xPN0xZMDNCMGN4SjdNSzU5YXo0a0tTbUJXVWda?=
=?utf-8?Q?fO6pTNDxaoc=3D?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR12MB5070.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?utf-8?B?c0ZlcXYrQ1JuVjVsTUdpaS9LMlIzSU5zWVdhdUozczVoSFh6dzlTazBzYnRP?=
=?utf-8?B?WWQzTHRvL1g1Sm1LN1o4WFAvcXlCLzdTaHNRWnNNeXVOTlpjYnRJWVAxWGcr?=
=?utf-8?B?cWJFTUlSeVVhTndQd1ZhZm9HYlpGVjMyU2daY3M0YzhaNk1oRW9EbVdKak5V?=
=?utf-8?B?NE8yeFNyMnpLQytxcS8xb3l2L0tQT1luNVVJRndUVGNEbnlyK3p1R3FzdUps?=
=?utf-8?B?d01zQnR1dGExUzBqKy9iNlFzY2x1L1FLMTU3UldhLytucCtqS3pXeVh1aW05?=
=?utf-8?B?dnp2ejFoTjZvQ2tEYnpUVHlVUzRxTDFEUTJad0lvOWJKdmYyaVBqVXZ5YVBP?=
=?utf-8?B?UzQ0TXhJQW9sZ3JSTk94VGNkMmVyTy9FUk9YcjhLTGR5VDZPSHU2c04wOTFl?=
=?utf-8?B?T1gyd3kxZUhSbForRnlUSGJJam5VMjlWS2F4b3Z2em5va1F2bitkNDFlTDZQ?=
=?utf-8?B?SWhZOFdQdll5SU02VXJYSWlkR3lnRDdGZWpkUWEwSGR1elZYM0VHQ2RkODRh?=
=?utf-8?B?U001MTR0NDAxMWtHcmlMMlkvNkttTVA2bThOVW5jZDRFRmIzVU1wNFZPZlhN?=
=?utf-8?B?OU9XZjR6NFM5Z0NVTWtucG1rQ0RzZ082cklVYnBMVnFNN0Fhby9yalhiWm5o?=
=?utf-8?B?VU5sY1lDQzJCZ2xvajUzL2FaM1hrUWdobmpKWXRDbDRpWEQydlhrWHlGamZ4?=
=?utf-8?B?SWxERUc0bXpuUjhQeHliTE51c1JuS1FNRlg1eE0wek40SE83ZmtXckZWM2xa?=
=?utf-8?B?dzQzZGhtdEdZT3JVK1FpdlI3YTk1MnVZSzh0MnJKRWhhaklHZ2xPT2ZmUk95?=
=?utf-8?B?Ym5PVWozV2E0YURRTGtPOHlqQTlORjBkMU9NZXRocXZWMkRDVEE2aVJqSkc3?=
=?utf-8?B?cUdXZmZZN1hBT05MYWU5VVQydTFSZWdYUnFQTmdTdlYxVi9jZVhFZjdwNWhp?=
=?utf-8?B?TzI0QjFkNzZCMmJFSUJJUlF0SHNOczNkMDViSDFENVRZdGFiZG4ySyszU2Zl?=
=?utf-8?B?OEVlckV2QmR4VHJvcG5EM2xnVTFaaVdEZHNSTUlrMDZxQlR1VmtxNHZJMjIz?=
=?utf-8?B?V0VpT3VNaU40c1dCWWtQOC8ram9sUEx1RHV5SFFCaytKVEU3UVlKYlZ5aThl?=
=?utf-8?B?aEdTSzVhRjErd010ZnVxNzJqVGNZMmFTVFpyaXRQQnZIaWF6UGdIOUxPMzRa?=
=?utf-8?B?dHlkZ3JhZHo1Y3JDMmYweVQ5dTl5dEtuTGI3RHhVajRIdmh3NHBKeUpjclRM?=
=?utf-8?B?aWc3aEJUTHVmSkRhZ1djSnZiekdPMnBNbmh2SHdGSTY2bk5CL1VZM0tlcmR0?=
=?utf-8?B?Ti81K3ZrU3ZIU0FIbUR1R2JWcDJqUlZ5d3VKNWthTHVJRUI0bVloWWh2YVNC?=
=?utf-8?B?RU1HUGlZR1c1dWZueDZBVnNMeVQ1VThscENMOHU2amxRMHAzZ2w5SUh4TlRv?=
=?utf-8?B?bGRyTkJqQTNGQVdqS1VVbW9GTWErdVJHeTRzL1BYZ1d6ZDdJYmp6UmhhbTdT?=
=?utf-8?B?VUsxTUJFTHF5WDR1RFl3ZnZCdWg2Sy8wQkx0b09BV3IvTGtZeWtveHdFSnNM?=
=?utf-8?B?RHZ0TzVhUWxOK3lqVWM5ekZzV1J4Q2pIc1NhdXBvTVM3YTlvMklVRmRoSmRN?=
=?utf-8?B?UlVzdWM2L1ZoVTFJSXhSU3g3M2JnT0tYSGRCVE56ck0waFAwbHo4RmtoRWhC?=
=?utf-8?B?TTQwT2ptejRCRzF3WmROOUFIWE9xd3ZaVjcxSVdwOWNFUUdza3hnVVM4L3hs?=
=?utf-8?B?TnI3dVp5ZCtTdkJFclM1Ym5oVzVnTGNscU5IU1ZTdXA4VzdTclZCY3ZNWllE?=
=?utf-8?B?MlI1NEFwb0dXZXIwRUJGYnB1S1JiVmoyQk1QVStpWllZQ2V6TFJoTTYzRmRC?=
=?utf-8?B?cnZYWXMvM0hWdkN3elpXWkhLa1NDL0tTUkx5cGxWMDFUalJMbjBpMW05RkRX?=
=?utf-8?B?TEdTblJWRlRLVHRPOHZ0ZWF3czVDZ1ZuRXEwa1FTUVBOdlo1SlFwQUwxTnEw?=
=?utf-8?B?Njk4Y3lCRDBKcWtRZzZiTnhsZ1dJc1pxV3R3MDF4YzhSK1pLNzF4YVRtYlVh?=
=?utf-8?B?eUFBbnlKUVp5R1ZrU2ozRkc3M2g5SDJNT0ROdCtzdU80NDNPOURNczk0cXcy?=
=?utf-8?Q?vMyTpF5qXjnNg1OPBOTzpZMuq?=
X-OriginatorOrg: amd.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 7ab15a9b-b07a-4864-275e-08dda38075c3
X-MS-Exchange-CrossTenant-AuthSource: DM4PR12MB5070.namprd12.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 15:57:08.5129
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: h9wtCwrnkAYkl8lYNO7g9L2kL0tg1cZ1PY0IDVENb6vy6mUSq8rxtFqA9yzw/6nOvDaT5TybMgJf02qDFx+SqQ==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB9519
X-Spam-Status: No, score=-6.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 6/2/25 14:10, Ashish Kalra wrote:
From: Ashish Kalra <ashish.kalra@xxxxxxx>
Panic notifiers are invoked with RCU read lock held and when the
SNP panic notifier tries to unregister itself from the panic
notifier callback itself it causes a deadlock as notifier
unregistration does RCU synchronization.
You mean that during a panic, __sev_snp_shutdown_locked() is trying to
unregister the notifier?
Wouldn't it be better to check if a panic is in progress and not try to
perform the unregister?
Or, is snp_panic_notifier() resilient enough to just always have it
registered / unregistered on module load/unload?
Also, wouldn't a better check be snp_panic_notifier.next != NULL during
sev_pci_exit()?
Thanks,
Tom
Fix SNP panic notifier to unregister itself during module unload
if SNP is initialized.
Fixes: 19860c3274fb ("crypto: ccp - Register SNP panic notifier only if SNP is enabled")
Signed-off-by: Ashish Kalra <ashish.kalra@xxxxxxx>
---
drivers/crypto/ccp/sev-dev.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/crypto/ccp/sev-dev.c b/drivers/crypto/ccp/sev-dev.c
index 8fb94c5f006a..942d93da1136 100644
--- a/drivers/crypto/ccp/sev-dev.c
+++ b/drivers/crypto/ccp/sev-dev.c
@@ -1787,9 +1787,6 @@ static int __sev_snp_shutdown_locked(int *error, bool panic)
sev->snp_initialized = false;
dev_dbg(sev->dev, "SEV-SNP firmware shutdown\n");
- atomic_notifier_chain_unregister(&panic_notifier_list,
- &snp_panic_notifier);
-
/* Reset TMR size back to default */
sev_es_tmr_size = SEV_TMR_SIZE;
@@ -2562,4 +2559,8 @@ void sev_pci_exit(void)
return;
sev_firmware_shutdown(sev);
+
+ if (sev->snp_initialized)
+ atomic_notifier_chain_unregister(&panic_notifier_list,
+ &snp_panic_notifier);
}
Return-Path: <linux-kernel+bounces-673487-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 9855141E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 11:58:09 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id E833D189AEA9
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:58:22 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 25A401D63C7;
Wed, 4 Jun 2025 15:58:03 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="dqNBvphO"
Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id BF7491D63C6
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:58:00 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.156.1
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749052682; cv=none; b=ZVvsnDSoWGKvsW+2wjiGfGHLPPBT3aQpQ0QLLF6A41l2pXpIHOTYXqmtuj6fd6T9ByQNom317kZZz/bJaL51hCigeAej6JZhy/HfYFLhAsqYcmdQUXN26hzwlYq2tcc06E1fvTB9IbwOrVEo/un+klzA7cCOOv3XH9gq1k0rUVU=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749052682; c=relaxed/simple;
bh=0ojI13sHPIQMkrRQYohZHtnXGa496cg8qn+xSF2G5MM=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=Cw5EWhUHxO6/KaWuJZG2ShSwUrBPSFuK+4T0qkgrgTer8jQ+wMfRgfksz6jeVeKXJMJrUVVvfVGVSngw2f+Ul4bOWs4hXEvahHQDYzWqZUXKgwD/vyKIpIegVNFq2bmKdhrJ+Xh5krU4+YGmxXPw//1JpNLa0wZy5l7pS97Ltn4=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=dqNBvphO; arc=none smtp.client-ip=148.163.156.1
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com
Received: from pps.filterd (m0360083.ppops.net [127.0.0.1])
by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 554DGuZV024325;
Wed, 4 Jun 2025 15:57:37 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc
:content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=pp1; bh=pz+EnW
/D+yNH/lAm96nc0b+2F4MOWXDHQcHk92rc5NI=; b=dqNBvphOMDWXYrspYqvDIU
wWMPFfxEUHSzA8DXllz4DhS/jH0jNd+ERl2YDnd6sUl7QMh1TZ4FN3A0MqQr8N4U
rYMiArAf7OQtx2KDk+VWIHGlFwhMAeXxBKE4wsq/4vpoOglJTc1NFWrfcZPy1TfE
jut00VjMu/VJigv0zu8TPTA2TYj3jcQo0EY2u9tHCMCFAXTsm80oWisj238DVUp8
rsnN1TJjguzmWEoPrlGgaKTEVXfOaj+CdSVp0VksGdrrB9t2171NDSG7GZN7NG09
RkOSTTo82mNlIw2BIkbO+9p5oLSOOez+rx3WV2OPf7CSMmpw/G6TgUjONvj+QWVw
==
Received: from pps.reinject (localhost [127.0.0.1])
by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 471geyurxh-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 15:57:37 +0000 (GMT)
Received: from m0360083.ppops.net (m0360083.ppops.net [127.0.0.1])
by pps.reinject (8.18.0.8/8.18.0.8) with ESMTP id 554FYtZY026153;
Wed, 4 Jun 2025 15:57:36 GMT
Received: from ppma13.dal12v.mail.ibm.com (dd.9e.1632.ip4.static.sl-reverse.com [50.22.158.221])
by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 471geyurxe-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 15:57:36 +0000 (GMT)
Received: from pps.filterd (ppma13.dal12v.mail.ibm.com [127.0.0.1])
by ppma13.dal12v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 554Ff1jE028437;
Wed, 4 Jun 2025 15:57:35 GMT
Received: from smtprelay07.wdc07v.mail.ibm.com ([172.16.1.74])
by ppma13.dal12v.mail.ibm.com (PPS) with ESMTPS id 470eakg9je-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 15:57:35 +0000
Received: from smtpav05.dal12v.mail.ibm.com (smtpav05.dal12v.mail.ibm.com [10.241.53.104])
by smtprelay07.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 554FvXX623593548
(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 4 Jun 2025 15:57:33 GMT
Received: from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1])
by IMSVA (Postfix) with ESMTP id 6828D58067;
Wed, 4 Jun 2025 15:57:33 +0000 (GMT)
Received: from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1])
by IMSVA (Postfix) with ESMTP id 8FA2F58052;
Wed, 4 Jun 2025 15:57:27 +0000 (GMT)
Received: from [9.39.21.166] (unknown [9.39.21.166])
by smtpav05.dal12v.mail.ibm.com (Postfix) with ESMTP;
Wed, 4 Jun 2025 15:57:27 +0000 (GMT)
Message-ID: <3d28858f-4ec6-43ea-8a3b-b9ce9a27bac7@xxxxxxxxxxxxx>
Date: Wed, 4 Jun 2025 21:27:25 +0530
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v7 1/5] drivers/base/node: Optimize memory block
registration to reduce boot time
To: David Hildenbrand <david@xxxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Mike Rapoport <rppt@xxxxxxxxxx>, Oscar Salvador <osalvador@xxxxxxx>,
Zi Yan <ziy@xxxxxxxxxx>,
Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>,
Ritesh Harjani <ritesh.list@xxxxxxxxx>, linux-mm@xxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, "Rafael J . Wysocki" <rafael@xxxxxxxxxx>,
Danilo Krummrich <dakr@xxxxxxxxxx>,
Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>,
Alison Schofield <alison.schofield@xxxxxxxxx>,
Yury Norov <yury.norov@xxxxxxxxx>, Dave Jiang <dave.jiang@xxxxxxxxx>,
Madhavan Srinivasan <maddy@xxxxxxxxxxxxx>,
Nilay Shroff
<nilay@xxxxxxxxxxxxx>, linuxppc-dev@xxxxxxxxxxxxxxxx
References: <2a0a05c2dffc62a742bf1dd030098be4ce99be28.1748452241.git.donettom@xxxxxxxxxxxxx>
<20250603200729.b7581e017e4ca63f502c795e@xxxxxxxxxxxxxxxxxxxx>
<b355e72d-0284-4a31-84e3-ae4a79ad922f@xxxxxxxxxx>
<9f7ae0e6-4640-418d-a4db-dba594377ac2@xxxxxxxxxxxxx>
<8abecd5b-2768-49d0-afc3-561b95d77a24@xxxxxxxxxx>
Content-Language: en-US
From: Donet Tom <donettom@xxxxxxxxxxxxx>
In-Reply-To: <8abecd5b-2768-49d0-afc3-561b95d77a24@xxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-TM-AS-GCONF: 00
X-Authority-Analysis: v=2.4 cv=Pq2TbxM3 c=1 sm=1 tr=0 ts=68406cf1 cx=c_pps a=AfN7/Ok6k8XGzOShvHwTGQ==:117 a=AfN7/Ok6k8XGzOShvHwTGQ==:17 a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10 a=VnNF1IyMAAAA:8 a=mxs0qDoQSYin1jJoqQcA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDExNyBTYWx0ZWRfX8WJCyVYxYOx4 ZwXF2L0hT9TVa9DCSZd0HnDTGnBLFWEQfIxdH7zNVM7GUVTw9QNAEgXFvI/Xf2VFj702xdpkOwZ sfqoXfWav9Rh6Q7PyjfPbaOH7gSnB9W1ScAh5rm/TsIwa5ei31ohpf9YVdbG04aMpO/YATwLmKc
Nu4l7OGkwJONLlda7cIGo5xN4tNoU5UWs7aWuldP0AxM+oI6kN/2TY/JBbQz7cKY93NcxIWW8tW WgHpy0zclU/Ytt607VyE1rKfvJD5sP9EHB1ztXnYinqH583LpBYXATXCdNBDhJPqPJ8R/vxLle1 avaH5sAL+9Pjua1nGH/CFx6EpV7DjmpkhInXsPuhnQOvipMOn0uGoH244A9l8nkKf4KiAHjDxo9
o+X4w74JpOyhMp51jOolPmtOZntcZfPPKt8xNLN8FXCuDhvXTNLasu1gWBqP7xtuOE954ekS
X-Proofpoint-GUID: 9l28POHsiWfHdlg-x-L2inqY-xBTAJNz
X-Proofpoint-ORIG-GUID: d6boryrX-Nv2vvbBUaTJBWLYcMY3GX1l
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0
lowpriorityscore=0 clxscore=1015 malwarescore=0 mlxlogscore=999
phishscore=0 bulkscore=0 spamscore=0 suspectscore=0 priorityscore=1501
mlxscore=0 adultscore=0 classifier=spam authscore=0 authtc=n/a authcc=
route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000
definitions=main-2506040117
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 6/4/25 7:00 PM, David Hildenbrand wrote:
On 04.06.25 15:17, Donet Tom wrote:
On 6/4/25 3:15 PM, David Hildenbrand wrote:
On 04.06.25 05:07, Andrew Morton wrote:
On Wed, 28 May 2025 12:18:00 -0500 Donet Tom <donettom@xxxxxxxxxxxxx>
wrote:
During node device initialization, `memory blocks` are registered
under
each NUMA node. The `memory blocks` to be registered are identified
using
the node’s start and end PFNs, which are obtained from the node's
pg_data
It's quite unconventional to omit the [0/N] changelog. This omission
somewhat messed up my processes so I added a one-liner to this.
Yeah, I was assuming that I simply did not get cc'ed on the cover
letter, but there is actually none.
Donet please add that in the future. git can do this using
--cover-letter.
Sure,
I will add cover letter in next revision.
...
Test Results on My system with 32TB RAM
=======================================
1. Boot time with CONFIG_DEFERRED_STRUCT_PAGE_INIT enabled.
Without this patch
------------------
Startup finished in 1min 16.528s (kernel)
With this patch
---------------
Startup finished in 17.236s (kernel) - 78% Improvement
Well someone is in for a nice surprise.
2. Boot time with CONFIG_DEFERRED_STRUCT_PAGE_INIT disabled.
Without this patch
------------------
Startup finished in 28.320s (kernel)
what. CONFIG_DEFERRED_STRUCT_PAGE_INIT is supposed to make bootup
faster.
Right, that's weird. Especially that it is still slower after these
changes.
CONFIG_DEFERRED_STRUCT_PAGE_INIT should be initializing in parallel
which ... should be faster.
@Donet, how many CPUs and nodes does your system have? Can you
identify what is taking longer than without
CONFIG_DEFERRED_STRUCT_PAGE_INIT?
My system has,
CPU - 1528
Holy cow.
Pure speculation: are we parallelizing *too much* ? :)
That's ~95 CPUs per node on average.
yes
Staring at deferred_init_memmap(), we do have
max_threads = deferred_page_init_max_threads(cpumask);
And that calls cpumask_weight(), essentially using all CPUs on the node.
... not sure what exactly happens if there are no CPUs for a node.
Okay.
I'm still debugging what's happening. I'll update you once I find something.
Node - 16
Are any of these memory-less?
No, there are no memory-less nodes. All nodes have around 2 TB of memory.
Memory - 31TB
Return-Path: <linux-kernel+bounces-673488-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 6753641E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:00:04 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 5E3ED3A7DD9
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:59:42 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id F0FF01DB92E;
Wed, 4 Jun 2025 15:59:58 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="C6GG0BOO"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 202C61C84D3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 15:59:52 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749052798; cv=none; b=PYrRcR2Gw25HRtPPoQpb4WnpHZHnjUjXsJZ4nsynDl0NFQ68unA532qJd1xzWYstr7QwSozgs1wYQgG4nzdDLRGgM7UOfAFlAmAAyQ5/jB5S0wcrUbd7nnAt/RwHN+oG3MhRUIvbwzhdR8DXwfs0EZMWP7tw0F0bLAKY/wBhs/4=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749052798; c=relaxed/simple;
bh=WqKFJv1SYHO6yFnl3qXFauziCa37HPaucEDx/YKs/vc=;
h=From:In-Reply-To:References:To:Cc:Subject:MIME-Version:
Content-Type:Date:Message-ID; b=J/1WQBk81u9Nr1LnsQj0svpE692PPgj2KnVVqTHPatRI6PNWUNA8H5oaHR0AZSHl+P42ug1PcoF+Fejo2i3U76oQqKemOEsRsPkKcL4rwmndbUf13FQ1sz6en1j7sONHF1sulP2DVqNbaHFce7ez3cHD7qAp9hvO7Vk3x0ZDHLs=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=C6GG0BOO; arc=none smtp.client-ip=170.10.129.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749052791;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
in-reply-to:in-reply-to:references:references;
bh=mT2+8JawHf8ng4PjdszIvOlvJnF7IbRbXA1vmx0mRW4=;
b=C6GG0BOO/ihGnO9nkK4Km/LeE5bT+bWsPaWLgjS9wpVzYy2YXHbBSsQX7UNT94L6GBmg10
e9wyiaRb54ETgIVLgchQsYdLaNObs4WgiNFVwOLkpA69T0Vatm07h27YWxbLI4TzO92CAX
veFQWWdaL3RbX328zpovmuE2rOHyRdI=
Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com
(ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by
relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,
cipher=TLS_AES_256_GCM_SHA384) id us-mta-19-owy3DbuLP02dRlJaJjlY1w-1; Wed,
04 Jun 2025 11:59:50 -0400
X-MC-Unique: owy3DbuLP02dRlJaJjlY1w-1
X-Mimecast-MFC-AGG-ID: owy3DbuLP02dRlJaJjlY1w_1749052789
Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
(No client certificate requested)
by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D15A318003FD;
Wed, 4 Jun 2025 15:59:26 +0000 (UTC)
Received: from warthog.procyon.org.uk (unknown [10.42.28.2])
by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 9DEC830002D0;
Wed, 4 Jun 2025 15:59:24 +0000 (UTC)
Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley
Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United
Kingdom.
Registered in England and Wales under Company Registration No. 3798903
From: David Howells <dhowells@xxxxxxxxxx>
In-Reply-To: <1098853.1749051265@xxxxxxxxxxxxxxxxxxxxxx>
References: <1098853.1749051265@xxxxxxxxxxxxxxxxxxxxxx> <CAHS8izMMU8QZrvXRiDjqwsBg_34s+dhvSyrU7XGMBuPF6eWyTA@xxxxxxxxxxxxxx> <770012.1748618092@xxxxxxxxxxxxxxxxxxxxxx>
To: Mina Almasry <almasrymina@xxxxxxxxxx>
Cc: dhowells@xxxxxxxxxx, willy@xxxxxxxxxxxxx, hch@xxxxxxxxxxxxx,
Jakub Kicinski <kuba@xxxxxxxxxx>, Eric Dumazet <edumazet@xxxxxxxxxx>,
netdev@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
Subject: Re: Device mem changes vs pinning/zerocopy changes
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-ID: <1099956.1749052763.1@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 16:59:23 +0100
Message-ID: <1099957.1749052763@xxxxxxxxxxxxxxxxxxxxxx>
X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
(Apologies, I accidentally sent the incomplete email)
I think you need to modify the existing sk_buff. I think adding
a new struct and migrating the entire net stack to use that is a bit
too ambitious. But up to you. Just my 2 cents here.
It may come down to that, and if it does, we'll need to handle frags
differently. Basically, for zerocopy, the following will all apply or come to
apply sometime in the future:
(1) We're going to be getting arrays of {physaddr,len} from the higher
layers. I think Christoph's idea is that this makes DMA mapping easier.
We will need to retain this.
(2) There will be no page refcount. We will obtain a pin (user zc) or there
will be a destructor (kernel zc). If the latter, it may have to be
shared amongst multiple skbuffs.
(3) We can't assume that a frag refers to a single page - or that there's
even a necessarily a page struct. And if there is a page struct, the
metadata isn't going to be stored in it. The page struct will contain a
typed pointer to some other struct (e.g. folio).
(4) We can't assume anything about the memory type of the frag (could be
slab, for instance).
Obviously, if we copy the data into netmem buffers, we have full control of
that memory type.
David
Return-Path: <linux-kernel+bounces-673489-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 567C741E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:00:32 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 8F531179F48
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:00:25 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id B57511DB92E;
Wed, 4 Jun 2025 16:00:06 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="aW1OegFc"
Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7D4471AA1D5;
Wed, 4 Jun 2025 16:00:04 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.92.199
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749052806; cv=none; b=dZLw48DJ5ObA5hV96bWFSsynPdtTKvBeMd/sDvAVRq4lXHBi4XSKI+bRWtZYMC9DX8JboMk7YhFA24IR7QEfOZW0pV2dLEUuLd6LNklYMGZMXJfVyHN6lje0IR2HcrMhmKKPaclshzGXAsOCsoIfAcwxiAzqEc3LKEh5iZJopKU=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749052806; c=relaxed/simple;
bh=UzvBQLQCA432LkL2VATkkRNLH1FaLFVPSbFrU4w1PHk=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=HPDF0oYx+5d4Vp7NFQDkT8oH1ZO9riCYWUa6Vm5PmegjeohzWpVrYbFb/HibiZzA0I0YZ71Hi4aYWB4JujckseS5b4iRSnyLO3SLt5uyvJIWwhyztLT3aHgum1VA3Zte97R/yhE0SqcyE/edqYCBYR2RTW90iq81rt8RRHPNLm4=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=aW1OegFc; arc=none smtp.client-ip=90.155.92.199
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org
Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version:
References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:
Content-Transfer-Encoding:Content-ID:Content-Description;
bh=SWCQk9cOoPmhCdT7cITTNHLcak2SqK86sZK5++8eMD8=; b=aW1OegFcb6ZnekRMsNtjRq9hEd
YOwjC8yuF6NhmFJfV9ZcSep5jL+C1NyXp5QRXuH7RSOqCXnaoRXMGeZPNzkJBZi9gv5a1MNDFZXUa
25YyMV+IGwq72wr4CkFMUzJSXgh+ciwa4Y1j/XT/adYKnFmqrlHPU3MmjgIexiUEF9c63yx31mYxu
fbF0C6OG0uSIKPzDk8V+JIx5cPEbd7P2ciab/tVESEQsSAiuCJjRntlJaO5TSzcjoTRGhR8mmVYhA
+TSpd3ey+Rn2b8Gbm6MrdqYlLGV2kCt6PkAx+t/A/uJaSbXMchhzWuHz3PJlk9AnQjXKDo65W4JkQ
cpJccaZQ==;
Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net)
by desiato.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux))
id 1uMqWs-00000000uix-0INF;
Wed, 04 Jun 2025 15:59:51 +0000
Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000)
id 21BAC300787; Wed, 4 Jun 2025 17:59:49 +0200 (CEST)
Date: Wed, 4 Jun 2025 17:59:49 +0200
From: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
To: Leo Yan <leo.yan@xxxxxxx>
Cc: Yeoreum Yun <yeoreum.yun@xxxxxxx>, mingo@xxxxxxxxxx, mingo@xxxxxxxxxx,
acme@xxxxxxxxxx, namhyung@xxxxxxxxxx, mark.rutland@xxxxxxx,
alexander.shishkin@xxxxxxxxxxxxxxx, jolsa@xxxxxxxxxx,
irogers@xxxxxxxxxx, adrian.hunter@xxxxxxxxx,
kan.liang@xxxxxxxxxxxxxxx, linux-perf-users@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, David Wang <00107082@xxxxxxx>
Subject: Re: [PATCH 1/1] perf/core: fix dangling cgroup pointer in cpuctx
Message-ID: <20250604155949.GK39944@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20250602184049.4010919-1-yeoreum.yun@xxxxxxx>
<20250603140040.GB8020@xxxxxxxxxxxxxxx>
<20250603144414.GC38114@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
<20250604080339.GB35970@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
<20250604101821.GC8020@xxxxxxxxxxxxxxx>
<20250604141640.GL38114@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
<20250604154639.GE8020@xxxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20250604154639.GE8020@xxxxxxxxxxxxxxx>
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 04:46:39PM +0100, Leo Yan wrote:
On Wed, Jun 04, 2025 at 04:16:40PM +0200, Peter Zijlstra wrote:
[...]
> It might be prudent to do something like so:
Thanks for the patch.
> +static void __event_disable(struct perf_event *event,
> + struct perf_event_context *ctx,
> + enum perf_event_state state)
> +{
> + if (event == event->group_leader)
> + group_sched_out(event, ctx);
I am a bit struggle for this code line. It disables all events in a
group, but only clear cgroup pointer for group leader but miss to clear
for sibling events.
If the cgroup pointer is only used for group leader, maybe we only
maintain (set and clear) the cgroup pointer for the leader?
Hmm, so yeah, that is weird indeed.
So perf_cgroup_event_enable() is called in list_add_event(), which is
perf_install_in_context() and that should be every single event.
So yeah, I'm thinking we're having more bugs here still :-(
Return-Path: <linux-kernel+bounces-673490-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 0591B41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:00:55 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 2BF933A89D7
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:00:32 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 6B1222AE6A;
Wed, 4 Jun 2025 16:00:48 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lEPttlt9"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 60F6D18E1F;
Wed, 4 Jun 2025 16:00:46 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749052847; cv=none; b=rcQAVdB8ToVRm2ingzGBhn2Q0Su+mSE+Tyb9Mz0E8f4bjK/RBYF/fqsZXNmT7xGjoD/6f3p5Y2kXR6yYYgjmCcB4lI1dbY+XJsy/hkvD8UMhZkFaiveza1Ruv6deSaQH8zMA/N+MabBEFIE19Mxv98zIjYUrM8V35LRG9+XfMYc=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749052847; c=relaxed/simple;
bh=LseHE7CfIFuvvOh+U0FuajD9jbePBoOdvRtrH+xsXB8=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID:
MIME-Version:Content-Type; b=fylNBakek8ZGMQ5cUCBQdT/T7gamg0qF+oXnl6+R5WJ8aHmSJ+KU6lYD9kZl3ivU+I0MnyFO/wmDsUlnWfHHSu806/yet4qF2FRLrQJfL5KcxvjTrx3iJOGXcgxW1soduIRxahBnMm39aDSeY3wruSYiifEk31By42kgniBC47M=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lEPttlt9; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0DDB4C4CEED;
Wed, 4 Jun 2025 16:00:38 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749052846;
bh=LseHE7CfIFuvvOh+U0FuajD9jbePBoOdvRtrH+xsXB8=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
b=lEPttlt9GFYQAihZiE9qokni6J8/wqL3E19DZR/6mX9ZuSBXulAhtBuhzXgAS1zgG
LOdP7zAgrx4pOv5aJitJYeAypb3BW4+i7ZXF/NLQTfEpA5u1buGgswV3+Sa+hkjyZK
R3MT9YqpvjYzCda0EmTR830WibZ8YhoSz5CCeMmBkZY7zG1hWIrytoV/Rhkv4zRL5N
Q0Wa4YFhUHzgvqjylLUjcxRqbY2k9FygCEyVWlkTOg2f1LXQo1g0n3BgwuAINt/G2v
OgfetaDbCH7inlGBeGqgUJYJ8rQwbRL+e+BaVde3d3UVaUhpxBr48Acp/ByH78SVcC
nzDnYzj55739A==
From: Pratyush Yadav <pratyush@xxxxxxxxxx>
To: Pasha Tatashin <pasha.tatashin@xxxxxxxxxx>
Cc: pratyush@xxxxxxxxxx, jasonmiu@xxxxxxxxxx, graf@xxxxxxxxxx,
changyuanl@xxxxxxxxxx, rppt@xxxxxxxxxx, dmatlack@xxxxxxxxxx,
rientjes@xxxxxxxxxx, corbet@xxxxxxx, rdunlap@xxxxxxxxxxxxx,
ilpo.jarvinen@xxxxxxxxxxxxxxx, kanie@xxxxxxxxxxxxxxxxx,
ojeda@xxxxxxxxxx, aliceryhl@xxxxxxxxxx, masahiroy@xxxxxxxxxx,
akpm@xxxxxxxxxxxxxxxxxxxx, tj@xxxxxxxxxx, yoann.congal@xxxxxxxx,
mmaurer@xxxxxxxxxx, roman.gushchin@xxxxxxxxx, chenridong@xxxxxxxxxx,
axboe@xxxxxxxxx, mark.rutland@xxxxxxx, jannh@xxxxxxxxxx,
vincent.guittot@xxxxxxxxxx, hannes@xxxxxxxxxxx,
dan.j.williams@xxxxxxxxx, david@xxxxxxxxxx, joel.granados@xxxxxxxxxx,
rostedt@xxxxxxxxxxx, anna.schumaker@xxxxxxxxxx, song@xxxxxxxxxx,
zhangguopeng@xxxxxxxxxx, linux@xxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-doc@xxxxxxxxxxxxxxx,
linux-mm@xxxxxxxxx, gregkh@xxxxxxxxxxxxxxxxxxx, tglx@xxxxxxxxxxxxx,
mingo@xxxxxxxxxx, bp@xxxxxxxxx, dave.hansen@xxxxxxxxxxxxxxx,
x86@xxxxxxxxxx, hpa@xxxxxxxxx, rafael@xxxxxxxxxx, dakr@xxxxxxxxxx,
bartosz.golaszewski@xxxxxxxxxx, cw00.choi@xxxxxxxxxxx,
myungjoo.ham@xxxxxxxxxxx, yesanishhere@xxxxxxxxx,
Jonathan.Cameron@xxxxxxxxxx, quic_zijuhu@xxxxxxxxxxx,
aleksander.lobakin@xxxxxxxxx, ira.weiny@xxxxxxxxx,
andriy.shevchenko@xxxxxxxxxxxxxxx, leon@xxxxxxxxxx, lukas@xxxxxxxxx,
bhelgaas@xxxxxxxxxx, wagi@xxxxxxxxxx, djeffery@xxxxxxxxxx,
stuart.w.hayes@xxxxxxxxx
Subject: Re: [RFC v2 05/16] luo: luo_core: integrate with KHO
In-Reply-To: <20250515182322.117840-6-pasha.tatashin@xxxxxxxxxx>
References: <20250515182322.117840-1-pasha.tatashin@xxxxxxxxxx>
<20250515182322.117840-6-pasha.tatashin@xxxxxxxxxx>
Date: Wed, 04 Jun 2025 18:00:37 +0200
Message-ID: <mafs0sekfts2i.fsf@xxxxxxxxxx>
User-Agent: Gnus/5.13 (Gnus v5.13)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Thu, May 15 2025, Pasha Tatashin wrote:
Integrate the LUO with the KHO framework to enable passing LUO state
across a kexec reboot.
This patch introduces the following changes:
- During the KHO finalization phase allocate FDT blob.
- Populate this FDT with a LUO compatibility string ("luo-v1") and the
current LUO state (`luo_state`).
- Implement a KHO notifier
LUO now depends on `CONFIG_KEXEC_HANDOVER`. The core state transition
logic (`luo_do_*_calls`) remains unimplemented in this patch.
Signed-off-by: Pasha Tatashin <pasha.tatashin@xxxxxxxxxx>
---
drivers/misc/liveupdate/luo_core.c | 222 ++++++++++++++++++++++++++++-
1 file changed, 219 insertions(+), 3 deletions(-)
diff --git a/drivers/misc/liveupdate/luo_core.c b/drivers/misc/liveupdate/luo_core.c
index 919c37b0b4d1..a76e886bc3b1 100644
--- a/drivers/misc/liveupdate/luo_core.c
+++ b/drivers/misc/liveupdate/luo_core.c
@@ -36,9 +36,12 @@
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/err.h>
+#include <linux/kexec_handover.h>
#include <linux/kobject.h>
+#include <linux/libfdt.h>
#include <linux/liveupdate.h>
#include <linux/rwsem.h>
+#include <linux/sizes.h>
#include <linux/string.h>
#include "luo_internal.h"
@@ -55,6 +58,12 @@ const char *const luo_state_str[] = {
bool luo_enabled;
+static void *luo_fdt_out;
+static void *luo_fdt_in;
+#define LUO_FDT_SIZE SZ_1M
+#define LUO_KHO_ENTRY_NAME "LUO"
+#define LUO_COMPATIBLE "luo-v1"
+
static int __init early_liveupdate_param(char *buf)
{
return kstrtobool(buf, &luo_enabled);
@@ -79,6 +88,60 @@ static inline void luo_set_state(enum liveupdate_state state)
__luo_set_state(state);
}
+/* Called during the prepare phase, to create LUO fdt tree */
+static int luo_fdt_setup(struct kho_serialization *ser)
+{
+ void *fdt_out;
+ int ret;
+
+ fdt_out = (void *)__get_free_pages(GFP_KERNEL | __GFP_ZERO,
+ get_order(LUO_FDT_SIZE));
Why not alloc_folio()? KHO already deals with folios so it seems
simpler. The kho_{un,}preserve_folio() functions exist exactly for these
kinds of allocations, so LUO also ends up being a first user. You also
won't end up needing kho_unpreserve_phys() and all the __pa() calls.
+ if (!fdt_out) {
+ pr_err("failed to allocate FDT memory\n");
+ return -ENOMEM;
+ }
+
+ ret = fdt_create_empty_tree(fdt_out, LUO_FDT_SIZE);
You are using FDT read/write functions throughout the series to create
new FDTs. The sequential write functions are generally more efficient
since they are meant for creating new FDT blobs. The read/write
functions are better for modifying an existing FDT blob.
Is there a particular reason you do this?
When using FDT SW functions, the creation of the tree would be something
like:
fdt_create()
fdt_finish_reservemap()
fdt_begin_node()
// Add stuff to FDT
fdt_end_node()
fdt_finish()
In this patch, the FDT does not change much after creation so it doesn't
look like it matters much, but in later patches, the FDT is passed to
luo_files_fdt_setup() and luo_subsystems_fdt_setup() which probably
modify the FDT a fair bit.
+ if (ret)
+ goto exit_free;
+
+ ret = fdt_setprop(fdt_out, 0, "compatible", LUO_COMPATIBLE,
+ strlen(LUO_COMPATIBLE) + 1);
fdt_setprop_string() instead? Or if you change to FDT SW,
fdt_property_string().
+ if (ret)
+ goto exit_free;
+
+ ret = kho_preserve_phys(__pa(fdt_out), LUO_FDT_SIZE);
+ if (ret)
+ goto exit_free;
+
+ ret = kho_add_subtree(ser, LUO_KHO_ENTRY_NAME, fdt_out);
+ if (ret)
+ goto exit_unpreserve;
+ luo_fdt_out = fdt_out;
+
+ return 0;
+
+exit_unpreserve:
+ kho_unpreserve_phys(__pa(fdt_out), LUO_FDT_SIZE);
+exit_free:
+ free_pages((unsigned long)fdt_out, get_order(LUO_FDT_SIZE));
+ pr_err("failed to prepare LUO FDT: %d\n", ret);
+
+ return ret;
+}
+
+static void luo_fdt_destroy(void)
+{
+ kho_unpreserve_phys(__pa(luo_fdt_out), LUO_FDT_SIZE);
+ free_pages((unsigned long)luo_fdt_out, get_order(LUO_FDT_SIZE));
+ luo_fdt_out = NULL;
+}
+
+static int luo_do_prepare_calls(void)
+{
+ return 0;
+}
+
static int luo_do_freeze_calls(void)
{
return 0;
@@ -88,11 +151,111 @@ static void luo_do_finish_calls(void)
{
}
-int luo_prepare(void)
+static void luo_do_cancel_calls(void)
+{
+}
+
+static int __luo_prepare(struct kho_serialization *ser)
{
+ int ret;
+
+ if (down_write_killable(&luo_state_rwsem)) {
+ pr_warn("[prepare] event canceled by user\n");
+ return -EAGAIN;
+ }
+
+ if (!is_current_luo_state(LIVEUPDATE_STATE_NORMAL)) {
+ pr_warn("Can't switch to [%s] from [%s] state\n",
+ luo_state_str[LIVEUPDATE_STATE_PREPARED],
+ LUO_STATE_STR);
+ ret = -EINVAL;
+ goto exit_unlock;
+ }
+
+ ret = luo_fdt_setup(ser);
+ if (ret)
+ goto exit_unlock;
+
+ ret = luo_do_prepare_calls();
+ if (ret)
+ goto exit_unlock;
With subsystems/filesystems support in place, this can fail. But since
luo_fdt_setup() called kho_add_subtree(), the debugfs file stays around,
and later calls to __luo_prepare() fail because the next
kho_add_subtree() tries to create a debugfs file that already exists. So
you would see an error like below:
[ 767.339920] debugfs: File 'LUO' in directory 'sub_fdts' already present!
[ 767.340613] luo_core: failed to prepare LUO FDT: -17
[ 767.341071] KHO: Failed to convert KHO state tree: -17
[ 767.341593] luo_core: Can't switch to [normal] from [normal] state
[ 767.342175] KHO: Failed to abort KHO finalization: -22
You probably need a kho_remove_subtree() that can be called from the
error paths.
Note that __luo_cancel() is called because failure in a KHO finalize
notifier calls the abort notifiers.
This is also something to fix, since if prepare fails, all other KHO
users who are already serialized won't even get to abort.
This weirdness happens because luo_prepare() and luo_cancel() control
the KHO state machine, but then also get controlled by it via the
notifier callbacks. So the relationship between then is not clear.
__luo_prepare() at least needs access to struct kho_serialization, so it
needs to come from the callback. So I don't have a clear way to clean
this all up off the top of my head.
I suppose one way to fix this would be to move the state check to
luo_cancel() instead. It would probably fix this problem but won't
actually do anything about the murky hierarchy between KHO and LUO.
+
+ luo_set_state(LIVEUPDATE_STATE_PREPARED);
+
+exit_unlock:
+ up_write(&luo_state_rwsem);
+
+ return ret;
+}
+
+static int __luo_cancel(void)
+{
+ if (down_write_killable(&luo_state_rwsem)) {
+ pr_warn("[cancel] event canceled by user\n");
+ return -EAGAIN;
+ }
+
+ if (!is_current_luo_state(LIVEUPDATE_STATE_PREPARED) &&
+ !is_current_luo_state(LIVEUPDATE_STATE_FROZEN)) {
+ pr_warn("Can't switch to [%s] from [%s] state\n",
+ luo_state_str[LIVEUPDATE_STATE_NORMAL],
+ LUO_STATE_STR);
+ up_write(&luo_state_rwsem);
+
+ return -EINVAL;
+ }
+
+ luo_do_cancel_calls();
+ luo_fdt_destroy();
+ luo_set_state(LIVEUPDATE_STATE_NORMAL);
+
+ up_write(&luo_state_rwsem);
+
return 0;
}
+static int luo_kho_notifier(struct notifier_block *self,
+ unsigned long cmd, void *v)
+{
+ int ret;
+
+ switch (cmd) {
+ case KEXEC_KHO_FINALIZE:
+ ret = __luo_prepare((struct kho_serialization *)v);
+ break;
+ case KEXEC_KHO_ABORT:
+ ret = __luo_cancel();
+ break;
+ default:
+ return NOTIFY_BAD;
+ }
+
+ return notifier_from_errno(ret);
+}
+
+static struct notifier_block luo_kho_notifier_nb = {
+ .notifier_call = luo_kho_notifier,
+};
+
+/**
+ * luo_prepare - Initiate the live update preparation phase.
+ *
+ * This function is called to begin the live update process. It attempts to
+ * transition the luo to the ``LIVEUPDATE_STATE_PREPARED`` state.
+ *
+ * If the calls complete successfully, the orchestrator state is set
+ * to ``LIVEUPDATE_STATE_PREPARED``. If any call fails a
+ * ``LIVEUPDATE_CANCEL`` is sent to roll back any actions.
+ *
+ * @return 0 on success, ``-EAGAIN`` if the state change was cancelled by the
+ * user while waiting for the lock, ``-EINVAL`` if the orchestrator is not in
+ * the normal state, or a negative error code returned by the calls.
+ */
+int luo_prepare(void)
+{
+ return kho_finalize();
+}
+
/**
* luo_freeze() - Initiate the final freeze notification phase for live update.
*
@@ -188,9 +351,23 @@ int luo_finish(void)
return 0;
}
+/**
+ * luo_cancel - Cancel the ongoing live update from prepared or frozen states.
+ *
+ * This function is called to abort a live update that is currently in the
+ * ``LIVEUPDATE_STATE_PREPARED`` state.
+ *
+ * If the state is correct, it triggers the ``LIVEUPDATE_CANCEL`` notifier chain
+ * to allow subsystems to undo any actions performed during the prepare or
+ * freeze events. Finally, the orchestrator state is transitioned back to
+ * ``LIVEUPDATE_STATE_NORMAL``.
+ *
+ * @return 0 on success, or ``-EAGAIN`` if the state change was cancelled by the
+ * user while waiting for the lock.
+ */
int luo_cancel(void)
{
- return 0;
+ return kho_abort();
}
void luo_state_read_enter(void)
@@ -205,7 +382,46 @@ void luo_state_read_exit(void)
static int __init luo_startup(void)
{
- __luo_set_state(LIVEUPDATE_STATE_NORMAL);
+ phys_addr_t fdt_phys;
+ int ret;
+
+ if (!kho_is_enabled()) {
+ if (luo_enabled)
+ pr_warn("Disabling liveupdate because KHO is disabled\n");
+ luo_enabled = false;
+ return 0;
+ }
+
+ ret = register_kho_notifier(&luo_kho_notifier_nb);
+ if (ret) {
+ luo_enabled = false;
You set luo_enabled to false here, but none of the LUO entry points like
luo_prepare() or luo_freeze() actually check it. So LUO will appear work
just fine even when it hasn't initialized properly.
+ pr_warn("Failed to register with KHO [%d]\n", ret);
I guess you don't return here so a previous liveupdate can still be
recovered, even though we won't be able to make the next one. If so, a
comment would be nice to point this out.
+ }
+
+ /*
+ * Retrieve LUO subtree, and verify its format. Panic in case of
+ * exceptions, since machine devices and memory is in unpredictable
+ * state.
+ */
+ ret = kho_retrieve_subtree(LUO_KHO_ENTRY_NAME, &fdt_phys);
+ if (ret) {
+ if (ret != -ENOENT) {
+ panic("failed to retrieve FDT '%s' from KHO: %d\n",
+ LUO_KHO_ENTRY_NAME, ret);
+ }
+ __luo_set_state(LIVEUPDATE_STATE_NORMAL);
+
+ return 0;
+ }
+
+ luo_fdt_in = __va(fdt_phys);
+ ret = fdt_node_check_compatible(luo_fdt_in, 0, LUO_COMPATIBLE);
+ if (ret) {
+ panic("FDT '%s' is incompatible with '%s' [%d]\n",
+ LUO_KHO_ENTRY_NAME, LUO_COMPATIBLE, ret);
+ }
+
+ __luo_set_state(LIVEUPDATE_STATE_UPDATED);
return 0;
}
--
Regards,
Pratyush Yadav
Return-Path: <linux-kernel+bounces-673491-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id B0C0741E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:01:18 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 20F95178667
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:01:19 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 20BAD18DB0D;
Wed, 4 Jun 2025 16:01:13 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="cxXIqpF/"
Received: from mail-il1-f169.google.com (mail-il1-f169.google.com [209.85.166.169])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8D00D15665C
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:01:09 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.169
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749052872; cv=none; b=C5OnbKZyImML0wic0JazTxVLpKPf4AMHytijN0ZrmzvngDZ0f52gjNd4Mz6Lc8C/PSb66qnlIwsyXvQP5IUK4bjIeQqngQb2DP2nI+m9kRxI8u9Po8iCiNyxQ+VeIa/Rzx/6ZQyB74x4HrQ7pTOwdLHuphjtiQz8mh0HCH68D0g=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749052872; c=relaxed/simple;
bh=ZNaiqJz3y1AytvrDmYno/j8yL7gmDpOSKywYWodv1CE=;
h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
To:Cc:Content-Type; b=f1CcBKxOWbxEpSHrQTy1QMGjDDYdPz5hRiOOCbL3tm2Ttbh1Qtd/h7NdqgJ45hgWZAsH10HZxlwOzVGIsxewJCRs3b8EUqkg30DMeO3GjbF8cS2znYjXrug/kmDvpIXunehGfYpwZCUPDignsOmPx/Y0z0qRceMCILrKEZ6RIDs=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=cxXIqpF/; arc=none smtp.client-ip=209.85.166.169
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com
Received: by mail-il1-f169.google.com with SMTP id e9e14a558f8ab-3da76aea6d5so169445ab.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 09:01:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=google.com; s=20230601; t=1749052868; x=1749657668; darn=vger.kernel.org;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:from:to:cc:subject:date
:message-id:reply-to;
bh=mY3VE9czFQShKHXxZIP9vZtbMEDzffpXg7Q/CD6REI8=;
b=cxXIqpF/ZDCtiHFTvEgqfM8TFUn9gF/6P1FlR9g2/VNLPqxOB5oTuiU91X8z+uifqG
wLDlLWqzoNqyB9lR/2ArCHziTusiSYv6yAksJJ101Ih9EW3VjjRU3osrDbgYoybQ/NrQ
4d0CWmVlY/q5lfC71AkfzetQ1M7a1401QAy4cuz9Kgf5JxSAS6YJ/d5O30NfIUj59K8b
H829CR2B4E2Tx6IPJgI3+m5K+bHmWCc7iSoOvLfjAQiXBm3PJ/oN+NPfZ+H1knL9cEnU
XLltSE8YUUNDZ0b2fVXgsjIG69bNfSWIO8jMSnrw/exgmZdunfwOARTjsAlC6ra8Oc0D
Dlpg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749052868; x=1749657668;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=mY3VE9czFQShKHXxZIP9vZtbMEDzffpXg7Q/CD6REI8=;
b=P5msY4T7a4MG1GH2OJF3RI8PnatYqfn8Wd9EHoVBCqYS3hj0IqJj60rV0Ej7/p6gX4
4S/q8E3xAVj/+b3wlFOsag1ApznsUbfCYKNWO7VTKh7rkffH9pi4RiOkRmTztkTY/A6A
occ1DotQ43UtF96lOZ+soCZLUaP0PO3R21h/2kb70rCe1zWR6+fPNECX9tRHQqNd+2s6
T5DMMgAlC0GwG9+fXqfNJ3dRsrr89f+OsjTcikVhOG8c/yV1pwnKvqlIN27HxjJ91Gde
dwlrcR+PUy6tnBWk+r033m2FE2GnZWogEWb2rpGE+rkLAIE01ejjcdx4fGSzutpCEx0r
SLfQ==
X-Forwarded-Encrypted: i=1; AJvYcCWwws7YGRH34FuoVKeKcHxvBiyhv65wCavP1LHV5sStnoUd1qO5sXYemsCrYGwrQbm0256OwhHojdDzGe8=@vger.kernel.org
X-Gm-Message-State: AOJu0Yx2D7PqflLtAANfpTzTQ/hIuuS0nQ4x9FUoNw9YWeTXeNvK/0Cj
yMwSrKgM/b1wS4w3kOoNZo/ewVGWkeE7/2Wlq3nLX3b95zeT9mAIZQxEE6Fd9Wr7uOV4gQcqibL
THl0FTXNheqa0gn3djKKNuqWsTFBEn0ugU6tQkUzO
X-Gm-Gg: ASbGnctOI8RiqFvn8RALWKApZX/YeZQcggsKVpUn58Z5w3KfhH53XhOhhCymscrcMpG
yhEa2yfxBEoENHs6RxPdMZhOQcVhXl6Jmw1fb8K2Cs2RFBVWBMeiAhfEaGHiL1h6p9SM9zSwPmm
VzUcXWOFOLelNTWuwF2cJ2aAM9ovujbs6pjKorouzLJwMNB83Prsok7oWwrGJZfBUYk0+D8Xc+6
V8V9s2JWg==
X-Google-Smtp-Source: AGHT+IG58E6QDHHMSgG62IIRKhYq/xB75dJaFUT7r81uMOGD1R9JRmeQRMlDFC4MLC5KlZ6EIiSSMdQcueXWylyXmEw=
X-Received: by 2002:a05:6e02:3712:b0:3dc:7e01:6f6a with SMTP id
e9e14a558f8ab-3ddbe7f1920mr4326265ab.26.1749052868151; Wed, 04 Jun 2025
09:01:08 -0700 (PDT)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
References: <20250604054234.23608-1-namhyung@xxxxxxxxxx>
In-Reply-To: <20250604054234.23608-1-namhyung@xxxxxxxxxx>
From: Ian Rogers <irogers@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 09:00:56 -0700
X-Gm-Features: AX0GCFsPBzBYxeEG_xn9wHFKD76SA0WA2zT1oLAKGF42jZeceXnvQLoTylM5ZMY
Message-ID: <CAP-5=fUwjAwyhKc=RGfKnZoPz9iKiVyKfBOYxm7EuP2QRsnhgw@xxxxxxxxxxxxxx>
Subject: Re: [PATCH] perf bpf-filter: Improve error messages
To: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>, Kan Liang <kan.liang@xxxxxxxxxxxxxxx>,
Jiri Olsa <jolsa@xxxxxxxxxx>, Adrian Hunter <adrian.hunter@xxxxxxxxx>,
Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>,
LKML <linux-kernel@xxxxxxxxxxxxxxx>, linux-perf-users@xxxxxxxxxxxxxxx
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-11.0 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Tue, Jun 3, 2025 at 10:42=E2=80=AFPM Namhyung Kim <namhyung@xxxxxxxxxx> =
wrote:
The BPF filter needs libbpf/BPF-skeleton support and root privilege.
Add error messages to help users understand the problem easily.
When it's not build with BPF support (make BUILD_BPF_SKEL=3D0).
$ sudo perf record -e cycles --filter "pid !=3D 0" true
Error: BPF filter is requested but perf is not built with BPF.
Please make sure to build with libbpf and BPF skeleton.
Usage: perf record [<options>] [<command>]
or: perf record [<options>] -- <command> [<options>]
--filter <filter>
event filter
When it supports BPF but runs without root or CAP_BPF. Note that it
also checks pinned BPF filters.
$ perf record -e cycles --filter "pid !=3D 0" -o /dev/null true
Error: BPF filter only works for users with the CAP_BPF capability!
Please run 'perf record --setup-filter pin' as root first.
Usage: perf record [<options>] [<command>]
or: perf record [<options>] -- <command> [<options>]
--filter <filter>
event filter
Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>
---
tools/perf/util/bpf-filter.c | 28 ++++++++++++++++++++++++++++
tools/perf/util/bpf-filter.h | 3 +++
tools/perf/util/cap.c | 1 -
tools/perf/util/cap.h | 5 +++++
4 files changed, 36 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/bpf-filter.c b/tools/perf/util/bpf-filter.c
index a4fdf6911ec1c32e..92e2f054b45e91dd 100644
--- a/tools/perf/util/bpf-filter.c
+++ b/tools/perf/util/bpf-filter.c
@@ -52,6 +52,7 @@
#include <internal/xyarray.h>
#include <perf/threadmap.h>
+#include "util/cap.h"
#include "util/debug.h"
#include "util/evsel.h"
#include "util/target.h"
@@ -618,11 +619,38 @@ struct perf_bpf_filter_expr *perf_bpf_filter_expr__=
new(enum perf_bpf_filter_term
return expr;
}
+static bool check_bpf_filter_capable(void)
+{
+ bool used_root;
+
+ if (perf_cap__capable(CAP_BPF, &used_root))
+ return true;
+
+ if (!used_root) {
+ /* Check if root already pinned the filter programs and m=
aps */
+ int fd =3D get_pinned_fd("filters");
+
+ if (fd >=3D 0) {
+ close(fd);
+ return true;
+ }
+ }
+
+ pr_err("Error: BPF filter only works for %s!\n"
+ "\tPlease run 'perf record --setup-filter pin' as root fir=
st.\n",
+ used_root ? "root" : "users with the CAP_BPF capability");
+
+ return false;
+}
+
int perf_bpf_filter__parse(struct list_head *expr_head, const char *str)
{
YY_BUFFER_STATE buffer;
int ret;
+ if (!check_bpf_filter_capable())
+ return -EPERM;
+
buffer =3D perf_bpf_filter__scan_string(str);
ret =3D perf_bpf_filter_parse(expr_head);
diff --git a/tools/perf/util/bpf-filter.h b/tools/perf/util/bpf-filter.h
index 916ed7770b734f15..187e5bbcc5910d78 100644
--- a/tools/perf/util/bpf-filter.h
+++ b/tools/perf/util/bpf-filter.h
@@ -2,6 +2,7 @@
#ifndef PERF_UTIL_BPF_FILTER_H
#define PERF_UTIL_BPF_FILTER_H
+#include <stdio.h>
#include <linux/list.h>
#include "bpf_skel/sample-filter.h"
@@ -38,6 +39,8 @@ int perf_bpf_filter__unpin(void);
static inline int perf_bpf_filter__parse(struct list_head *expr_head __m=
aybe_unused,
const char *str __maybe_unused)
{
+ fprintf(stderr, "Error: BPF filter is requested but perf is not b=
uilt with BPF.\n"
+ "\tPlease make sure to build with libbpf and BPF skeleton=
.\n");
Generally LGTM. This needs to be a pr_err otherwise nothing will be
displayed with TUI.
Thanks,
Ian
return -EOPNOTSUPP;
}
static inline int perf_bpf_filter__prepare(struct evsel *evsel __maybe_u=
nused,
diff --git a/tools/perf/util/cap.c b/tools/perf/util/cap.c
index 69d9a2bcd40bfdd1..24a0ea7e6d97749b 100644
--- a/tools/perf/util/cap.c
+++ b/tools/perf/util/cap.c
@@ -7,7 +7,6 @@
#include "debug.h"
#include <errno.h>
#include <string.h>
-#include <linux/capability.h>
#include <sys/syscall.h>
#include <unistd.h>
diff --git a/tools/perf/util/cap.h b/tools/perf/util/cap.h
index 0c6a1ff55f07340a..c1b8ac033ccc5826 100644
--- a/tools/perf/util/cap.h
+++ b/tools/perf/util/cap.h
@@ -3,6 +3,7 @@
#define __PERF_CAP_H
#include <stdbool.h>
+#include <linux/capability.h>
/* For older systems */
#ifndef CAP_SYSLOG
@@ -13,6 +14,10 @@
#define CAP_PERFMON 38
#endif
+#ifndef CAP_BPF
+#define CAP_BPF 39
+#endif
+
/* Query if a capability is supported, used_root is set if the fallback =
root check was used. */
bool perf_cap__capable(int cap, bool *used_root);
--
2.49.0
Return-Path: <linux-kernel+bounces-673493-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 2876841E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:01:47 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 4DE7D179E27
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:01:39 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 111FA42AA9;
Wed, 4 Jun 2025 16:01:27 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Bd5XYboK"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 90E2218E1F
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:01:24 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749052886; cv=none; b=NsQ8Dd9DXU1svMgSDAs9t3NeR05VCJQCYyeIYhpUrRFxmtOA+zPNYTp2LKSyfyKT91bw0j5o/wLpH7cfeA56TRmKSgcvWsazVxC1qifiytQqDVG9F3H2nYEZrVyw52MIN7zQep3xZGplONFKVNfNZHR/z1szX8obU3pjo2kiPzo=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749052886; c=relaxed/simple;
bh=So/HGqU97KJHHqPHYEMnLPE/RFB+cOZGCVzLOuORFyw=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=GbQVQbKSVfjsAj9MWKZfyzlHBtAyRvossGVYMY1NM8GTf4J/2y0H6vbWWNQwf0nyPSzBceqMD66y89FedLgXXFlhztQogfu0nBmrHmF6/UhEROh/735U8Eg4j8o9p363PK3svbZRvT7uib7CchtXL6jNPtoEZogAe3qtm6NEN4g=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Bd5XYboK; arc=none smtp.client-ip=170.10.133.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749052883;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=B56ZzCeADf+QuixmHfBf4Zix4sjQka+6qDzfyc/+jrI=;
b=Bd5XYboKulMZ9HFin3ch+5PjpON6GoXcdyJyyX47RZq82g3di8n9H+a/bxUQ647ikUbxtB
+6BXqK5uoQEyx/JtsH1G4I5rvlv5pLFAoXuhPmzfYF+58pXH8dfhImUGzkX+ZaUJPN0T+u
diZmJjUvH15h3w79JzQ+Cb2N+vodlDo=
Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com
[209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-68-yjjlgPRZOYaJT0ji_z_hFg-1; Wed, 04 Jun 2025 12:01:21 -0400
X-MC-Unique: yjjlgPRZOYaJT0ji_z_hFg-1
X-Mimecast-MFC-AGG-ID: yjjlgPRZOYaJT0ji_z_hFg_1749052881
Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-3a4f55ea44dso3101324f8f.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 09:01:21 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749052881; x=1749657681;
h=content-transfer-encoding:in-reply-to:organization:autocrypt
:content-language:from:references:cc:to:subject:user-agent
:mime-version:date:message-id:x-gm-message-state:from:to:cc:subject
:date:message-id:reply-to;
bh=B56ZzCeADf+QuixmHfBf4Zix4sjQka+6qDzfyc/+jrI=;
b=Q0bA6sWTaUqjILjaBzNuI4E0mYHgHiSayiNEVQesBn1uVl7A2bCDONy1s6NjhHJ/qY
yEh7998Ab2uF5UGTBDkfLUJeUvPtoL5ZsH22DWfu/yB/pbZQ58LSFfKPZZzVMkmyZDwH
032qIgCbK7pYUG+baKKRfasrKd2M3K1Ev0d9Wojy1oZpOCjX27wuZRqxLlxNJHXjaGre
Ff7ucRxS2S/RuhoYOYpaAteqXqHVIpwzAbMXtgN4W8XgaRT4255Aa2hoPv43+w/Up16j
6oYyILuOoq6QfDOQpoESPX8r5BJHBnPLNOWQRXb4JI2Mo//7upWeIzBaka7ZcBQygkrl
+l9A==
X-Gm-Message-State: AOJu0YzPoavUwEHNGGCUh48+HI4es4xT1q5zzuRDEem6nuM/yoycJFEk
fiP2UPYTp61a0bitfz3puL7w+GFIwMPNVnc4HmGiphYSn+3druLuLMkB0PUMquxeIvCU9xBvEVr
b8MeHF0hChCDaGu4KUNYO/j8BgtLaNHz52sTvlOSaEEvG1BzgFWGkc5pgHPvVWv3irA==
X-Gm-Gg: ASbGncv0u441JAcPzr/XRgaF4GaoEGJSxCWhE0NxQ+TcvimcHORo814awr+5QC9qAHd
PR8+pOcoUQLknTyirQB2sAccX5B6uKC9vsIJ+KJFn1Dinf7XlTd9wD1WQW72uMuOhbTzQCnqd3e
rds3SU7TsswNxNexyqCxqnR0CLfPcyvztPKfSc58AuxWNrpeVEKTZ3mka9S5xoe9i8puyBjpAkj
Zj7sb6t6yF9VF7FdzhuRT47tG2/Ibp8yGmy/mv8uC/zYkLA3aQ5nk86R82tM0ScOKgpdm7iK96m
MTWslthcejEX4EAsk7ALzW8q0VVnCgCR+V6V0ekxjt+nxy3J8ZpDk3MfAwGuBw1Zm7WSi9qK7wg
7ZC1ZL1bvOTKB9zDpGjBFCh3TG4Ede1ooVdxLUQ==
X-Received: by 2002:a05:6000:3105:b0:3a4:d4e5:498a with SMTP id ffacd0b85a97d-3a51d9744d4mr3009231f8f.42.1749052880628;
Wed, 04 Jun 2025 09:01:20 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IFNcOM5E1TMCd9aCuR/EMdBHoJZu1zLwHEDg1xmViWYAlHFlrGCO/djEJ0bT20tVETFzcuA6g==
X-Received: by 2002:a05:6000:3105:b0:3a4:d4e5:498a with SMTP id ffacd0b85a97d-3a51d9744d4mr3009114f8f.42.1749052879574;
Wed, 04 Jun 2025 09:01:19 -0700 (PDT)
Received: from ?IPV6:2003:d8:2f1b:b800:6fdb:1af2:4fbd:1fdf? (p200300d82f1bb8006fdb1af24fbd1fdf.dip0.t-ipconnect.de. [2003:d8:2f1b:b800:6fdb:1af2:4fbd:1fdf])
by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3a4f0097210sm22068168f8f.73.2025.06.04.09.01.18
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 09:01:19 -0700 (PDT)
Message-ID: <ef0a22a9-facf-4b3a-ab44-64fb1b06aba0@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 18:01:18 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v1] mm/gup: remove (VM_)BUG_ONs
To: Jason Gunthorpe <jgg@xxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>, Vlastimil Babka
<vbabka@xxxxxxx>, Mike Rapoport <rppt@xxxxxxxxxx>,
Suren Baghdasaryan <surenb@xxxxxxxxxx>, Michal Hocko <mhocko@xxxxxxxx>,
John Hubbard <jhubbard@xxxxxxxxxx>, Peter Xu <peterx@xxxxxxxxxx>
References: <20250604140544.688711-1-david@xxxxxxxxxx>
<20250604151432.GC17991@xxxxxxxx>
From: David Hildenbrand <david@xxxxxxxxxx>
Content-Language: en-US
Autocrypt: addr=david@xxxxxxxxxx; keydata=
xsFNBFXLn5EBEAC+zYvAFJxCBY9Tr1xZgcESmxVNI/0ffzE/ZQOiHJl6mGkmA1R7/uUpiCjJ
dBrn+lhhOYjjNefFQou6478faXE6o2AhmebqT4KiQoUQFV4R7y1KMEKoSyy8hQaK1umALTdL
QZLQMzNE74ap+GDK0wnacPQFpcG1AE9RMq3aeErY5tujekBS32jfC/7AnH7I0v1v1TbbK3Gp
XNeiN4QroO+5qaSr0ID2sz5jtBLRb15RMre27E1ImpaIv2Jw8NJgW0k/D1RyKCwaTsgRdwuK
Kx/Y91XuSBdz0uOyU/S8kM1+ag0wvsGlpBVxRR/xw/E8M7TEwuCZQArqqTCmkG6HGcXFT0V9
PXFNNgV5jXMQRwU0O/ztJIQqsE5LsUomE//bLwzj9IVsaQpKDqW6TAPjcdBDPLHvriq7kGjt
WhVhdl0qEYB8lkBEU7V2Yb+SYhmhpDrti9Fq1EsmhiHSkxJcGREoMK/63r9WLZYI3+4W2rAc
UucZa4OT27U5ZISjNg3Ev0rxU5UH2/pT4wJCfxwocmqaRr6UYmrtZmND89X0KigoFD/XSeVv
jwBRNjPAubK9/k5NoRrYqztM9W6sJqrH8+UWZ1Idd/DdmogJh0gNC0+N42Za9yBRURfIdKSb
B3JfpUqcWwE7vUaYrHG1nw54pLUoPG6sAA7Mehl3nd4pZUALHwARAQABzSREYXZpZCBIaWxk
ZW5icmFuZCA8ZGF2aWRAcmVkaGF0LmNvbT7CwZgEEwEIAEICGwMGCwkIBwMCBhUIAgkKCwQW
AgMBAh4BAheAAhkBFiEEG9nKrXNcTDpGDfzKTd4Q9wD/g1oFAl8Ox4kFCRKpKXgACgkQTd4Q
9wD/g1oHcA//a6Tj7SBNjFNM1iNhWUo1lxAja0lpSodSnB2g4FCZ4R61SBR4l/psBL73xktp
rDHrx4aSpwkRP6Epu6mLvhlfjmkRG4OynJ5HG1gfv7RJJfnUdUM1z5kdS8JBrOhMJS2c/gPf
wv1TGRq2XdMPnfY2o0CxRqpcLkx4vBODvJGl2mQyJF/gPepdDfcT8/PY9BJ7FL6Hrq1gnAo4
3Iv9qV0JiT2wmZciNyYQhmA1V6dyTRiQ4YAc31zOo2IM+xisPzeSHgw3ONY/XhYvfZ9r7W1l
pNQdc2G+o4Di9NPFHQQhDw3YTRR1opJaTlRDzxYxzU6ZnUUBghxt9cwUWTpfCktkMZiPSDGd
KgQBjnweV2jw9UOTxjb4LXqDjmSNkjDdQUOU69jGMUXgihvo4zhYcMX8F5gWdRtMR7DzW/YE
BgVcyxNkMIXoY1aYj6npHYiNQesQlqjU6azjbH70/SXKM5tNRplgW8TNprMDuntdvV9wNkFs
9TyM02V5aWxFfI42+aivc4KEw69SE9KXwC7FSf5wXzuTot97N9Phj/Z3+jx443jo2NR34XgF
89cct7wJMjOF7bBefo0fPPZQuIma0Zym71cP61OP/i11ahNye6HGKfxGCOcs5wW9kRQEk8P9
M/k2wt3mt/fCQnuP/mWutNPt95w9wSsUyATLmtNrwccz63XOwU0EVcufkQEQAOfX3n0g0fZz
Bgm/S2zF/kxQKCEKP8ID+Vz8sy2GpDvveBq4H2Y34XWsT1zLJdvqPI4af4ZSMxuerWjXbVWb
T6d4odQIG0fKx4F8NccDqbgHeZRNajXeeJ3R7gAzvWvQNLz4piHrO/B4tf8svmRBL0ZB5P5A
2uhdwLU3NZuK22zpNn4is87BPWF8HhY0L5fafgDMOqnf4guJVJPYNPhUFzXUbPqOKOkL8ojk
CXxkOFHAbjstSK5Ca3fKquY3rdX3DNo+EL7FvAiw1mUtS+5GeYE+RMnDCsVFm/C7kY8c2d0G
NWkB9pJM5+mnIoFNxy7YBcldYATVeOHoY4LyaUWNnAvFYWp08dHWfZo9WCiJMuTfgtH9tc75
7QanMVdPt6fDK8UUXIBLQ2TWr/sQKE9xtFuEmoQGlE1l6bGaDnnMLcYu+Asp3kDT0w4zYGsx
5r6XQVRH4+5N6eHZiaeYtFOujp5n+pjBaQK7wUUjDilPQ5QMzIuCL4YjVoylWiBNknvQWBXS
lQCWmavOT9sttGQXdPCC5ynI+1ymZC1ORZKANLnRAb0NH/UCzcsstw2TAkFnMEbo9Zu9w7Kv
AxBQXWeXhJI9XQssfrf4Gusdqx8nPEpfOqCtbbwJMATbHyqLt7/oz/5deGuwxgb65pWIzufa
N7eop7uh+6bezi+rugUI+w6DABEBAAHCwXwEGAEIACYCGwwWIQQb2cqtc1xMOkYN/MpN3hD3
AP+DWgUCXw7HsgUJEqkpoQAKCRBN3hD3AP+DWrrpD/4qS3dyVRxDcDHIlmguXjC1Q5tZTwNB
boaBTPHSy/Nksu0eY7x6HfQJ3xajVH32Ms6t1trDQmPx2iP5+7iDsb7OKAb5eOS8h+BEBDeq
3ecsQDv0fFJOA9ag5O3LLNk+3x3q7e0uo06XMaY7UHS341ozXUUI7wC7iKfoUTv03iO9El5f
XpNMx/YrIMduZ2+nd9Di7o5+KIwlb2mAB9sTNHdMrXesX8eBL6T9b+MZJk+mZuPxKNVfEQMQ
a5SxUEADIPQTPNvBewdeI80yeOCrN+Zzwy/Mrx9EPeu59Y5vSJOx/z6OUImD/GhX7Xvkt3kq
Er5KTrJz3++B6SH9pum9PuoE/k+nntJkNMmQpR4MCBaV/J9gIOPGodDKnjdng+mXliF3Ptu6
3oxc2RCyGzTlxyMwuc2U5Q7KtUNTdDe8T0uE+9b8BLMVQDDfJjqY0VVqSUwImzTDLX9S4g/8
kC4HRcclk8hpyhY2jKGluZO0awwTIMgVEzmTyBphDg/Gx7dZU1Xf8HFuE+UZ5UDHDTnwgv7E
th6RC9+WrhDNspZ9fJjKWRbveQgUFCpe1sa77LAw+XFrKmBHXp9ZVIe90RMe2tRL06BGiRZr
jPrnvUsUUsjRoRNJjKKA/REq+sAnhkNPPZ/NNMjaZ5b8Tovi8C0tmxiCHaQYqj7G2rgnT0kt
WNyWQQ==
Organization: Red Hat
In-Reply-To: <20250604151432.GC17991@xxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 04.06.25 17:14, Jason Gunthorpe wrote:
On Wed, Jun 04, 2025 at 04:05:44PM +0200, David Hildenbrand wrote:
Especially once we hit one of the assertions in
sanity_check_pinned_pages(), observing follow-up assertions failing
in other code can give good clues about what went wrong, so use
VM_WARN_ON_ONCE instead.
While at it, let's just convert all VM_BUG_ON to VM_WARN_ON_ONCE as
well. Add one comment for the pfn_valid() check.
We have to introduce VM_WARN_ON_ONCE_VMA() to make that fly.
I'm fine with this, but IMHO, using ON_ONCE is wasteful here.
They have been BUG_ONs for ages, they really do never happen. If there
was ever a case to justify not using ON_ONCE this is it..
Well, history told us that if one of them happens, we get a whole flood.
... which is usually not particularly helpful when trying to extract
information from a syslog :)
DEBUG_VM is already "wasteful" ... ;)
--
Cheers,
David / dhildenb
Return-Path: <linux-kernel+bounces-673492-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id D137141E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:01:48 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 3162F189A4CE
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:01:44 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 6C8091A76D4;
Wed, 4 Jun 2025 16:01:21 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YnHwdpRf"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id AD19A18E1F;
Wed, 4 Jun 2025 16:01:20 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749052880; cv=none; b=jlb7d+YVg1vFJxZDjOh8hVz8L4Ffqcce74lDhDeVr/VUWUYTO5JLRi+7mcwbEV7Kicoh8KSjROeW4A0erLSE4kBHr9HTfMEwtYI4CoVCMh3i5hO9xxlNDBcxSe1w83BnOgDOwuBz5uEw8X1FIapo78/N3Zo4nThdyHetFNWwARY=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749052880; c=relaxed/simple;
bh=aXDdtMeuURnJgZ1pn/LA8wH4VbiUiRq8LX3VuJ+8ubc=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=W3t2xSsHIKjD/gR3quDHK2qfpVa0PPLzypM2PT9OlvbTvfMcppamVHzYWqt1jiPAa7j0R1Xs3cpKFLf7Lkge/Q4D1JhcnKO8+I1wlna6COfTJ6uTF5U7RYdB9XHagr4JvfIAVbrdkaY7rMjyoJR7KW5OLUUrfPmkoAu4uFhN28k=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YnHwdpRf; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 59DAEC4CEED;
Wed, 4 Jun 2025 16:01:19 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749052880;
bh=aXDdtMeuURnJgZ1pn/LA8wH4VbiUiRq8LX3VuJ+8ubc=;
h=From:Date:Subject:To:Cc:From;
b=YnHwdpRf2ROUtKw5ELAY3EKIIakhuOwNeGkaXfS2qAEnxTExvn9DcxSl/BORcu6y4
u0WfUjAd78yI1IqusiTR79Ftr5SHOvegqwvTDt3CO4z81yjP+gj2EvoMLHuVvPK9Kh
/v6fVCdKQ8f5LCWRpJD5bv8RGYrvv/IlmvRveT6Ux9+sW8REO9uBi4jt0dTFhrrL01
1RVe48eMVYM5aIbDjORxKeyD1nPMHYqwTcUPq3Yn35dnogH+P1WQs7ZppAbmWAyZr2
x0e7Q45osMLkMS83eauoC11Ue9sfwisTek7jbo4cGlnL6j/dFifqBFYNE62/e2WcZv
4atbngQXIq3oQ==
From: Jeff Layton <jlayton@xxxxxxxxxx>
Date: Wed, 04 Jun 2025 12:01:10 -0400
Subject: [PATCH] nfsd: handle get_client_locked() failure in
nfsd4_setclientid_confirm()
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <20250604-testing-v1-1-e28a8e161e4f@xxxxxxxxxx>
X-B4-Tracking: v=1; b=H4sIAMVtQGgC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE
vPSU3UzU4B8JSMDI1MDMwMT3ZLU4pLMvHRdixRLC4u0NBMLA3MzJaDqgqLUtMwKsEnRsbW1AJb
LeptZAAAA
X-Change-ID: 20250604-testing-8d988ff48076
To: Chuck Lever <chuck.lever@xxxxxxxxxx>, NeilBrown <neil@xxxxxxxxxx>,
Olga Kornievskaia <okorniev@xxxxxxxxxx>, Dai Ngo <Dai.Ngo@xxxxxxxxxx>,
Tom Talpey <tom@xxxxxxxxxx>
Cc: lei lu <llfamsec@xxxxxxxxx>, linux-nfs@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, Jeff Layton <jlayton@xxxxxxxxxx>
X-Mailer: b4 0.14.2
X-Developer-Signature: v=1; a=openpgp-sha256; l=2442; i=jlayton@xxxxxxxxxx;
h=from:subject:message-id; bh=aXDdtMeuURnJgZ1pn/LA8wH4VbiUiRq8LX3VuJ+8ubc=;
b=owEBbQKS/ZANAwAKAQAOaEEZVoIVAcsmYgBoQG3JNHdO7p7llzbxU8vfhPF3MuwPrNlJR8bfd
qgNKdTSnU+JAjMEAAEKAB0WIQRLwNeyRHGyoYTq9dMADmhBGVaCFQUCaEBtyQAKCRAADmhBGVaC
Fd86D/4ml9mfn7bHWKYbPZ+4Y2cHHVWgbBW/NcIvqu2MC0XaI6yYvpRT2OwdzuSgsC4rF2D6svK
rUVJf35/obWy5ZPN49jBVP7BgBbSWBnCquWTde7LHabm1BfWGg2Ji8+Fxys3/Fjg7tZ9+Pwt6ay
Ra0CxiGZylNv+4nvvtcuTJfdboq/lyMyIeZHHGvk5hKzydW3v6i9DSPvfNZmCC+Aibj92qB+R50
UfxA54F+NLd//dg6jYOHR1+atlkB9Grp9dL1dOMc/akDSYv59/0ywnq2zKpX1FCqslMv3rP3nDE
fVkqoMmKAv2otybrve9dC7R0ey9+s7ogdKgGqh+xlT5pQmv0RyOZzEldmRJZPmAv1GbMyTI3miB
UuL1jM+NOE5YgsKg73A/PJk6HLeEfxyFalom1puH38MTNfzknCZj8gB6O+6wCjnfTW2f62qMi1+
xLcveTC6120YWlKBIzvxwEtG7supVqMykmvEEYKmRZuIwNY40QXBLQPEyd4aTVN80TLDNQblvSw
axKckiNg3Iloa4/eneMJkM/vLtANw8xEFxA9ZFo7Kl+zkF+QmTGq2R2kJpbT1v2k4py8k0eVRa/
evHu2FjnlcbLh/8Z8G2FNf3PhBhzNG5tiVZRJaCcnB13XmdNTxDgqhuP/aLV6z/BjIkqSEqj+89
2+PVl0KKnfdqo/A==
X-Developer-Key: i=jlayton@xxxxxxxxxx; a=openpgp;
fpr=4BC0D7B24471B2A184EAF5D3000E684119568215
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Lei Lu recently reported that nfsd4_setclientid_confirm() did not check
the return value from get_client_locked(). a SETCLIENTID_CONFIRM could
race with a confirmed client expiring and fail to get a reference. That
could later lead to a UAF.
Fix this by getting a reference early in the case where there is an
extant confirmed client. If that fails then treat it as if there were no
confirmed client found at all.
In the case where the unconfirmed client is expiring, just fail and
return the result from get_client_locked().
Reported-by: lei lu <llfamsec@xxxxxxxxx>
Closes: https://lore.kernel.org/linux-nfs/CAEBF3_b=UvqzNKdnfD_52L05Mqrqui9vZ2eFamgAbV0WG+FNWQ@xxxxxxxxxxxxxx/
Fixes: d20c11d86d8f ("nfsd: Protect session creation and client confirm using client_lock")
Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxx>
---
I ran this vs. pynfs and it seemed to do OK. lei lu, can you test this
patch vs. your reproducer and tell us whether it fixes it?
---
fs/nfsd/nfs4state.c | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index d5694987f86fadab985e55cce6261ad680e83b69..d61a7910dde3b8536b8715c2eebd1f1faec95f8f 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -4697,10 +4697,16 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp,
}
status = nfs_ok;
if (conf) {
- old = unconf;
- unhash_client_locked(old);
- nfsd4_change_callback(conf, &unconf->cl_cb_conn);
- } else {
+ if (get_client_locked(conf) == nfs_ok) {
+ old = unconf;
+ unhash_client_locked(old);
+ nfsd4_change_callback(conf, &unconf->cl_cb_conn);
+ } else {
+ conf = NULL;
+ }
+ }
+
+ if (!conf) {
old = find_confirmed_client_by_name(&unconf->cl_name, nn);
if (old) {
status = nfserr_clid_inuse;
@@ -4717,10 +4723,14 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp,
}
trace_nfsd_clid_replaced(&old->cl_clientid);
}
+ status = get_client_locked(unconf);
+ if (status != nfs_ok) {
+ old = NULL;
+ goto out;
+ }
move_to_confirmed(unconf);
conf = unconf;
}
- get_client_locked(conf);
spin_unlock(&nn->client_lock);
if (conf == unconf)
fsnotify_dentry(conf->cl_nfsd_info_dentry, FS_MODIFY);
---
base-commit: 5abc7438f1e9d62e91ad775cc83c9594c48d2282
change-id: 20250604-testing-8d988ff48076
Best regards,
--
Jeff Layton <jlayton@xxxxxxxxxx>
Return-Path: <linux-kernel+bounces-673494-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id D3E8341E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:02:52 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 40AF5189A107
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:03:06 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 7995318DB0D;
Wed, 4 Jun 2025 16:02:46 +0000 (UTC)
Received: from foss.arm.com (foss.arm.com [217.140.110.172])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 0B15C18E1F
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:02:43 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749052965; cv=none; b=gN7jrBIE0GOvUjWRShbFIxWXyEhbwB6/YLSqylTkqrNHe/f/m3dLlfaw34y2CwMF3AeVDQ6Y16gLwC2ruUUrp8QaIUOMuJSYWO2swzPuvY8zSJ/1rp6pWKwtVA5weu8K+X8bkGVprSUPY2ZFqLlNmvDBUtOAX8z/btfcLsuy+GU=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749052965; c=relaxed/simple;
bh=qZ5EHjmyeg2ocp1XLPS7/1rjthqw9EnH529CqoWDidU=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=Uq8sle432mZwqrrth0FE1vqpDCoLygmB8qm3TVa6gvER2Lbs6Hbo7PjzKuDav9egEuucKTNqVvwwihCFIkIPmLW09FhekeX7fz/xE8d+5R8vpZAKv+Or/zU6bSoaIb3cmgEL4nazArCf7YS6JbKknv/8g4Ulkp7JrgElD39xSVM=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com
Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14])
by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E52251758;
Wed, 4 Jun 2025 09:02:25 -0700 (PDT)
Received: from [10.1.27.175] (XHFQ2J9959.cambridge.arm.com [10.1.27.175])
by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C5CF73F5A1;
Wed, 4 Jun 2025 09:02:40 -0700 (PDT)
Message-ID: <99a0a2c8-d98e-4c81-9207-c55c72c00872@xxxxxxx>
Date: Wed, 4 Jun 2025 17:02:39 +0100
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v6] arm64/mm: Optimize loop to reduce redundant operations
of contpte_ptep_get
Content-Language: en-GB
To: Xavier Xia <xavier_qy@xxxxxxx>, 21cnbao@xxxxxxxxx, dev.jain@xxxxxxx,
ioworker0@xxxxxxxxx
Cc: akpm@xxxxxxxxxxxxxxxxxxxx, catalin.marinas@xxxxxxx, david@xxxxxxxxxx,
gshan@xxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, will@xxxxxxxxxx, willy@xxxxxxxxxxxxx,
ziy@xxxxxxxxxx, Barry Song <baohua@xxxxxxxxxx>
References: <20250510125948.2383778-1-xavier_qy@xxxxxxx>
From: Ryan Roberts <ryan.roberts@xxxxxxx>
In-Reply-To: <20250510125948.2383778-1-xavier_qy@xxxxxxx>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 10/05/2025 13:59, Xavier Xia wrote:
This commit optimizes the contpte_ptep_get and contpte_ptep_get_lockless
function by adding early termination logic. It checks if the dirty and
young bits of orig_pte are already set and skips redundant bit-setting
operations during the loop. This reduces unnecessary iterations and
improves performance.
In order to verify the optimization performance, a test function has been
designed. The function's execution time and instruction statistics have
been traced using perf, and the following are the operation results on a
certain Qualcomm mobile phone chip:
Test Code:
nit: It would have been good to include the source for the whole program,
including #includes and the main() function to make it quicker for others to get
up and running.
#define PAGE_SIZE 4096
#define CONT_PTES 16
#define TEST_SIZE (4096* CONT_PTES * PAGE_SIZE)
#define YOUNG_BIT 8
void rwdata(char *buf)
{
for (size_t i = 0; i < TEST_SIZE; i += PAGE_SIZE) {
buf[i] = 'a';
volatile char c = buf[i];
}
}
void clear_young_dirty(char *buf)
{
if (madvise(buf, TEST_SIZE, MADV_FREE) == -1) {
perror("madvise free failed");
free(buf);
exit(EXIT_FAILURE);
}
if (madvise(buf, TEST_SIZE, MADV_COLD) == -1) {
perror("madvise free failed");
free(buf);
exit(EXIT_FAILURE);
}
nit: MADV_FREE clears both young and dirty so I don't think MADV_COLD is
required? (MADV_COLD only clears young I think?)
}
void set_one_young(char *buf)
{
for (size_t i = 0; i < TEST_SIZE; i += CONT_PTES * PAGE_SIZE) {
volatile char c = buf[i + YOUNG_BIT * PAGE_SIZE];
}
}
void test_contpte_perf() {
char *buf;
int ret = posix_memalign((void **)&buf, CONT_PTES * PAGE_SIZE,
TEST_SIZE);
if ((ret != 0) || ((unsigned long)buf % CONT_PTES * PAGE_SIZE)) {
perror("posix_memalign failed");
exit(EXIT_FAILURE);
}
rwdata(buf);
#if TEST_CASE2 || TEST_CASE3
clear_young_dirty(buf);
#endif
#if TEST_CASE2
set_one_young(buf);
#endif
for (int j = 0; j < 500; j++) {
mlock(buf, TEST_SIZE);
munlock(buf, TEST_SIZE);
}
free(buf);
}
Descriptions of three test scenarios
Scenario 1
The data of all 16 PTEs are both dirty and young.
#define TEST_CASE2 0
#define TEST_CASE3 0
Scenario 2
Among the 16 PTEs, only the 8th one is young, and there are no dirty ones.
#define TEST_CASE2 1
#define TEST_CASE3 0
Scenario 3
Among the 16 PTEs, there are neither young nor dirty ones.
#define TEST_CASE2 0
#define TEST_CASE3 1
Test results
|Scenario 1 | Original| Optimized|
|-------------------|---------------|----------------|
|instructions | 37912436160| 18731580031|
|test time | 4.2797| 2.2949|
|overhead of | | |
|contpte_ptep_get() | 21.31%| 4.80%|
|Scenario 2 | Original| Optimized|
|-------------------|---------------|----------------|
|instructions | 36701270862| 36115790086|
|test time | 3.2335| 3.0874|
|Overhead of | | |
|contpte_ptep_get() | 32.26%| 33.57%|
|Scenario 3 | Original| Optimized|
|-------------------|---------------|----------------|
|instructions | 36706279735| 36750881878|
|test time | 3.2008| 3.1249|
|Overhead of | | |
|contpte_ptep_get() | 31.94%| 34.59%|
For Scenario 1, optimized code can achieve an instruction benefit of 50.59%
and a time benefit of 46.38%.
For Scenario 2, optimized code can achieve an instruction count benefit of
1.6% and a time benefit of 4.5%.
For Scenario 3, since all the PTEs have neither the young nor the dirty
flag, the branches taken by optimized code should be the same as those of
the original code. In fact, the test results of optimized code seem to be
closer to those of the original code.
I re-ran these tests on Apple M2 with 4K base pages + 64K mTHP.
Scenario 1: reduced to 56% of baseline execution time
Scenario 2: reduced to 89% of baseline execution time
Scenario 3: reduced to 91% of baseline execution time
I'm pretty amazed that scenario 3 got faster given it is doing the same number
of loops.
It can be proven through test function that the optimization for
contpte_ptep_get is effective. Since the logic of contpte_ptep_get_lockless
is similar to that of contpte_ptep_get, the same optimization scheme is
also adopted for it.
Reviewed-by: Barry Song <baohua@xxxxxxxxxx>
Signed-off-by: Xavier Xia <xavier_qy@xxxxxxx>
I don't love the extra complexity, but this version is much tidier. While the
micro-benchmark is clearly contrived, it shows that there will be cases where it
will be faster and there are no cases where it is slower. This will probably be
more valuable for 16K kernels because the number of PTEs in a contpte block is
128 there:
Reviewed-by: Ryan Roberts <ryan.roberts@xxxxxxx>
Tested-by: Ryan Roberts <ryan.roberts@xxxxxxx>
---
Changes in v6:
- Move prot = pte_pgprot(pte_mkold(pte_mkclean(pte))) into the contpte_is_consistent(),
as suggested by Barry.
- Link to v5: https://lore.kernel.org/all/20250509122728.2379466-1-xavier_qy@xxxxxxx/
Changes in v5:
- Replace macro CHECK_CONTPTE_CONSISTENCY with inline function contpte_is_consistent
for improved readability and clarity, as suggested by Barry.
- Link to v4: https://lore.kernel.org/all/20250508070353.2370826-1-xavier_qy@xxxxxxx/
Changes in v4:
- Convert macro CHECK_CONTPTE_FLAG to an internal loop for better readability.
- Refactor contpte_ptep_get_lockless using the same optimization logic, as suggested by Ryan.
- Link to v3: https://lore.kernel.org/all/3d338f91.8c71.1965cd8b1b8.Coremail.xavier_qy@xxxxxxx/
---
arch/arm64/mm/contpte.c | 74 +++++++++++++++++++++++++++++++++++------
1 file changed, 64 insertions(+), 10 deletions(-)
diff --git a/arch/arm64/mm/contpte.c b/arch/arm64/mm/contpte.c
index bcac4f55f9c1..71efe7dff0ad 100644
--- a/arch/arm64/mm/contpte.c
+++ b/arch/arm64/mm/contpte.c
@@ -169,17 +169,46 @@ pte_t contpte_ptep_get(pte_t *ptep, pte_t orig_pte)
for (i = 0; i < CONT_PTES; i++, ptep++) {
pte = __ptep_get(ptep);
- if (pte_dirty(pte))
+ if (pte_dirty(pte)) {
orig_pte = pte_mkdirty(orig_pte);
-
- if (pte_young(pte))
+ for (; i < CONT_PTES; i++, ptep++) {
+ pte = __ptep_get(ptep);
+ if (pte_young(pte)) {
+ orig_pte = pte_mkyoung(orig_pte);
+ break;
+ }
+ }
+ break;
+ }
+
+ if (pte_young(pte)) {
orig_pte = pte_mkyoung(orig_pte);
+ i++;
+ ptep++;
+ for (; i < CONT_PTES; i++, ptep++) {
+ pte = __ptep_get(ptep);
+ if (pte_dirty(pte)) {
+ orig_pte = pte_mkdirty(orig_pte);
+ break;
+ }
+ }
+ break;
+ }
}
return orig_pte;
}
EXPORT_SYMBOL_GPL(contpte_ptep_get);
+static inline bool contpte_is_consistent(pte_t pte, unsigned long pfn,
+ pgprot_t orig_prot)
+{
+ pgprot_t prot = pte_pgprot(pte_mkold(pte_mkclean(pte)));
+
+ return pte_valid_cont(pte) && pte_pfn(pte) == pfn &&
+ pgprot_val(prot) == pgprot_val(orig_prot);
+}
+
pte_t contpte_ptep_get_lockless(pte_t *orig_ptep)
{
/*
@@ -202,7 +231,6 @@ pte_t contpte_ptep_get_lockless(pte_t *orig_ptep)
pgprot_t orig_prot;
unsigned long pfn;
pte_t orig_pte;
- pgprot_t prot;
pte_t *ptep;
pte_t pte;
int i;
@@ -219,18 +247,44 @@ pte_t contpte_ptep_get_lockless(pte_t *orig_ptep)
for (i = 0; i < CONT_PTES; i++, ptep++, pfn++) {
pte = __ptep_get(ptep);
- prot = pte_pgprot(pte_mkold(pte_mkclean(pte)));
- if (!pte_valid_cont(pte) ||
- pte_pfn(pte) != pfn ||
- pgprot_val(prot) != pgprot_val(orig_prot))
+ if (!contpte_is_consistent(pte, pfn, orig_prot))
goto retry;
- if (pte_dirty(pte))
+ if (pte_dirty(pte)) {
orig_pte = pte_mkdirty(orig_pte);
+ for (; i < CONT_PTES; i++, ptep++, pfn++) {
+ pte = __ptep_get(ptep);
+
+ if (!contpte_is_consistent(pte, pfn, orig_prot))
+ goto retry;
+
+ if (pte_young(pte)) {
+ orig_pte = pte_mkyoung(orig_pte);
+ break;
+ }
+ }
+ break;
I considered for a while whether it is safe for contpte_ptep_get_lockless() to
exit early having not seen every PTE in the contpte block and confirmed that
they are all consistent. I eventually concluded that it is, as long as all the
PTEs that it does check are consistent I believe this is fine.
+ }
- if (pte_young(pte))
+ if (pte_young(pte)) {
orig_pte = pte_mkyoung(orig_pte);
+ i++;
+ ptep++;
+ pfn++;
+ for (; i < CONT_PTES; i++, ptep++, pfn++) {
+ pte = __ptep_get(ptep);
+
+ if (!contpte_is_consistent(pte, pfn, orig_prot))
+ goto retry;
+
+ if (pte_dirty(pte)) {
+ orig_pte = pte_mkdirty(orig_pte);
+ break;
+ }
+ }
+ break;
+ }
}
return orig_pte;
Return-Path: <linux-kernel+bounces-673495-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 9D50B41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:03:23 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 2DF2C189AE9E
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:03:37 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 42DCF1A0730;
Wed, 4 Jun 2025 16:03:17 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="uFRMqztp"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 816B618E1F;
Wed, 4 Jun 2025 16:03:15 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749052996; cv=none; b=Rf11S15IEDm+1ufQIFT7z0DcLOD8lykyhCkEmmc7BeJcx4j/OP/tt/gSLXTHsFV3s7kppbgAM8XdUXCJPmw96hcvlc4OyFpa+a3F15WZnIZ2Yo1Z+3BhCBRAOus/jPyM+yjyIYpVhq9Q+8bABYGT72IXBKzePDDT8ZSl3U4i0j8=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749052996; c=relaxed/simple;
bh=9aZRPwCzG+hd7s+OZOm2wdSI0vs5RWHmsaU+Uw6uWOM=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID:
MIME-Version:Content-Type; b=S9IAs8fJt6Y0+9V6d2npkFypi+uaZiYpQOZ04F/Penki5WujTlX8dyeVe0T8m0vxph12WOBSzCiNY98jnUYhoXKq4EKYmPI77YOFDvLEN4IRYDxBbrXlhOzvayCMjWJhftX9EcOWbiyLX88OZmAroguqX7N8soKe1QZFWiKUBbQ=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uFRMqztp; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 65E11C4CEE4;
Wed, 4 Jun 2025 16:03:07 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749052995;
bh=9aZRPwCzG+hd7s+OZOm2wdSI0vs5RWHmsaU+Uw6uWOM=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
b=uFRMqztpQ+FUYtVBFJNoUYnCssGOmr5EK0+hMQr+XR5SFyd9buqw1hj6WtapTgX4K
W/lTxSrO8C3FOiq6rsRfvLnck9w+7hwuq+74VhqHqm/QTeGhwvozOobNxyDbaOBG5m
sE4ol0DTfioMdqVIwfnpVa1xWsfHbit7DJdC+Rw0LXTSQcs5DvPRotIjkDP5rMt8aY
Gbackjv5P9WvQzxa5sqRvFZ8f5gOhKTWwiLlNKogQOnsFggK/YyhPvvxK3UsB0u2r9
hKE0izLUmcDi1cWc2g+wEFlSM1TyEJVpxmOZBEHs8ovgLkJ4dZfbbRX1AmYFi8vGMp
WBN7rlPWM1ngQ==
From: Pratyush Yadav <pratyush@xxxxxxxxxx>
To: Pasha Tatashin <pasha.tatashin@xxxxxxxxxx>
Cc: pratyush@xxxxxxxxxx, jasonmiu@xxxxxxxxxx, graf@xxxxxxxxxx,
changyuanl@xxxxxxxxxx, rppt@xxxxxxxxxx, dmatlack@xxxxxxxxxx,
rientjes@xxxxxxxxxx, corbet@xxxxxxx, rdunlap@xxxxxxxxxxxxx,
ilpo.jarvinen@xxxxxxxxxxxxxxx, kanie@xxxxxxxxxxxxxxxxx,
ojeda@xxxxxxxxxx, aliceryhl@xxxxxxxxxx, masahiroy@xxxxxxxxxx,
akpm@xxxxxxxxxxxxxxxxxxxx, tj@xxxxxxxxxx, yoann.congal@xxxxxxxx,
mmaurer@xxxxxxxxxx, roman.gushchin@xxxxxxxxx, chenridong@xxxxxxxxxx,
axboe@xxxxxxxxx, mark.rutland@xxxxxxx, jannh@xxxxxxxxxx,
vincent.guittot@xxxxxxxxxx, hannes@xxxxxxxxxxx,
dan.j.williams@xxxxxxxxx, david@xxxxxxxxxx, joel.granados@xxxxxxxxxx,
rostedt@xxxxxxxxxxx, anna.schumaker@xxxxxxxxxx, song@xxxxxxxxxx,
zhangguopeng@xxxxxxxxxx, linux@xxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-doc@xxxxxxxxxxxxxxx,
linux-mm@xxxxxxxxx, gregkh@xxxxxxxxxxxxxxxxxxx, tglx@xxxxxxxxxxxxx,
mingo@xxxxxxxxxx, bp@xxxxxxxxx, dave.hansen@xxxxxxxxxxxxxxx,
x86@xxxxxxxxxx, hpa@xxxxxxxxx, rafael@xxxxxxxxxx, dakr@xxxxxxxxxx,
bartosz.golaszewski@xxxxxxxxxx, cw00.choi@xxxxxxxxxxx,
myungjoo.ham@xxxxxxxxxxx, yesanishhere@xxxxxxxxx,
Jonathan.Cameron@xxxxxxxxxx, quic_zijuhu@xxxxxxxxxxx,
aleksander.lobakin@xxxxxxxxx, ira.weiny@xxxxxxxxx,
andriy.shevchenko@xxxxxxxxxxxxxxx, leon@xxxxxxxxxx, lukas@xxxxxxxxx,
bhelgaas@xxxxxxxxxx, wagi@xxxxxxxxxx, djeffery@xxxxxxxxxx,
stuart.w.hayes@xxxxxxxxx
Subject: Re: [RFC v2 01/16] kho: make debugfs interface optional
In-Reply-To: <20250515182322.117840-2-pasha.tatashin@xxxxxxxxxx>
References: <20250515182322.117840-1-pasha.tatashin@xxxxxxxxxx>
<20250515182322.117840-2-pasha.tatashin@xxxxxxxxxx>
Date: Wed, 04 Jun 2025 18:03:06 +0200
Message-ID: <mafs0msantryd.fsf@xxxxxxxxxx>
User-Agent: Gnus/5.13 (Gnus v5.13)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Thu, May 15 2025, Pasha Tatashin wrote:
Currently, KHO is controlled via debugfs interface, but once LUO is
introduced, it can control KHO, and the debug interface becomes
optional.
Add a separate config CONFIG_KEXEC_HANDOVER_DEBUG that enables
the debugfs interface, and allows to inspect the tree.
Move all debufs related code to a new file to keep the .c files
Nit: s/debufs/debugfs/
I don't have any other feedback for this patch so a lot of bits wasted
for one typo fix ;-)
clear of ifdefs.
Signed-off-by: Pasha Tatashin <pasha.tatashin@xxxxxxxxxx>
[...]
--
Regards,
Pratyush Yadav
Return-Path: <linux-kernel+bounces-673496-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 43B4441E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:04:22 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 4D9AF3A5B89
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:03:56 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 0475C1DDC00;
Wed, 4 Jun 2025 16:04:07 +0000 (UTC)
Received: from dediextern.your-server.de (dediextern.your-server.de [85.10.215.232])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id DAD0018E1F;
Wed, 4 Jun 2025 16:04:02 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=85.10.215.232
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749053046; cv=none; b=s1wAFkeK2R2FZyIgeA13q75UY43xGOZB2OJG3Th5z9PYX5xVc8PqWjCRUJbWgBkVh0MpXNc014ESlYyLZprjSeN0tXublBF3AstzbRrqYVAdXs8ColRI6LImhe0WQxvvfCbsEJMHogsPmlwHIQju0SMr3CH0CU8GAgtf4mqhxjk=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749053046; c=relaxed/simple;
bh=Vbss+hkHN6igBHYC0QfKfg2uSLdRpUecKqmMSm0PGo8=;
h=Message-ID:Date:MIME-Version:From:To:Cc:Subject:Content-Type; b=ZbAFKeOVvve15XtFfmS4tYFQ51oZUmvfig+WPCwM3qpFKryuB/NyyrCpw8nF1byjyMWhCNi1NRb9jDWOPcKhvHbUWMQz7yiM64kgVg8MXxYpZMc40XhatDQnOlD1KzgaZK3o8ivSdEat8kxmdITyIdfYCXCtmxNevxSQmGTrhdQ=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=hetzner-cloud.de; spf=pass smtp.mailfrom=hetzner-cloud.de; arc=none smtp.client-ip=85.10.215.232
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=hetzner-cloud.de
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=hetzner-cloud.de
Received: from sslproxy08.your-server.de ([78.47.166.52])
by dediextern.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384
(Exim 4.94.2)
(envelope-from <marcus.wichelmann@xxxxxxxxxxxxxxxx>)
id 1uMq7W-000Q0d-RO; Wed, 04 Jun 2025 17:33:39 +0200
Received: from localhost ([127.0.0.1])
by sslproxy08.your-server.de with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384
(Exim 4.96)
(envelope-from <marcus.wichelmann@xxxxxxxxxxxxxxxx>)
id 1uMq7W-000E76-2k;
Wed, 04 Jun 2025 17:33:39 +0200
Message-ID: <9da42688-bfaa-4364-8797-e9271f3bdaef@xxxxxxxxxxxxxxxx>
Date: Wed, 4 Jun 2025 17:33:36 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Content-Language: en-US
From: Marcus Wichelmann <marcus.wichelmann@xxxxxxxxxxxxxxxx>
Autocrypt: addr=marcus.wichelmann@xxxxxxxxxxxxxxxx; keydata=
xsFNBGJGrHIBEADXeHfBzzMvCfipCSW1oRhksIillcss321wYAvXrQ03a9VN2XJAzwDB/7Sa
N2Oqs6JJv4u5uOhaNp1Sx8JlhN6Oippc6MecXuQu5uOmN+DHmSLObKVQNC9I8PqEF2fq87zO
DCDViJ7VbYod/X9zUHQrGd35SB0PcDkXE5QaPX3dpz77mXFFWs/TvP6IvM6XVKZce3gitJ98
JO4pQ1gZniqaX4OSmgpHzHmaLCWZ2iU+Kn2M0KD1+/ozr/2bFhRkOwXSMYIdhmOXx96zjqFV
vIHa1vBguEt/Ax8+Pi7D83gdMCpyRCQ5AsKVyxVjVml0e/FcocrSb9j8hfrMFplv+Y43DIKu
kPVbE6pjHS+rqHf4vnxKBi8yQrfIpQqhgB/fgomBpIJAflu0Phj1nin/QIqKfQatoz5sRJb0
khSnRz8bxVM6Dr/T9i+7Y3suQGNXZQlxmRJmw4CYI/4zPVcjWkZyydq+wKqm39SOo4T512Nw
fuHmT6SV9DBD6WWevt2VYKMYSmAXLMcCp7I2EM7aYBEBvn5WbdqkamgZ36tISHBDhJl/k7pz
OlXOT+AOh12GCBiuPomnPkyyIGOf6wP/DW+vX6v5416MWiJaUmyH9h8UlhlehkWpEYqw1iCA
Wn6TcTXSILx+Nh5smWIel6scvxho84qSZplpCSzZGaidHZRytwARAQABzTZNYXJjdXMgV2lj
aGVsbWFubiA8bWFyY3VzLndpY2hlbG1hbm5AaGV0em5lci1jbG91ZC5kZT7CwZgEEwEIAEIW
IQQVqNeGYUnoSODnU2dJ0we/n6xHDgUCYkascgIbAwUJEswDAAULCQgHAgMiAgEGFQoJCAsC
BBYCAwECHgcCF4AACgkQSdMHv5+sRw4BNxAAlfufPZnHm+WKbvxcPVn6CJyexfuE7E2UkJQl
s/JXI+OGRhyqtguFGbQS6j7I06dJs/whj9fOhOBAHxFfMG2UkraqgAOlRUk/YjA98Wm9FvcQ
RGZe5DhAekI5Q9I9fBuhxdoAmhhKc/g7E5y/TcS1s2Cs6gnBR5lEKKVcIb0nFzB9bc+oMzfV
caStg+PejetxR/lMmcuBYi3s51laUQVCXV52bhnv0ROk0fdSwGwmoi2BDXljGBZl5i5n9wuQ
eHMp9hc5FoDF0PHNgr+1y9RsLRJ7sKGabDY6VRGp0MxQP0EDPNWlM5RwuErJThu+i9kU6D0e
HAPyJ6i4K7PsjGVE2ZcvOpzEr5e46bhIMKyfWzyMXwRVFuwE7erxvvNrSoM3SzbCUmgwC3P3
Wy30X7NS5xGOCa36p2AtqcY64ZwwoGKlNZX8wM0khaVjPttsynMlwpLcmOulqABwaUpdluUg
soqKCqyijBOXCeRSCZ/KAbA1FOvs3NnC9nVqeyCHtkKfuNDzqGY3uiAoD67EM/R9N4QM5w0X
HpxgyDk7EC1sCqdnd0N07BBQrnGZACOmz8pAQC2D2coje/nlnZm1xVK1tk18n6fkpYfR5Dnj
QvZYxO8MxP6wXamq2H5TRIzfLN1C2ddRsPv4wr9AqmbC9nIvfIQSvPMBx661kznCacANAP/O
wU0EYkascgEQAK15Hd7arsIkP7knH885NNcqmeNnhckmu0MoVd11KIO+SSCBXGFfGJ2/a/8M
y86SM4iL2774YYMWePscqtGNMPqa8Uk0NU76ojMbWG58gow2dLIyajXj20sQYd9RbNDiQqWp
RNmnp0o8K8lof3XgrqjwlSAJbo6JjgdZkun9ZQBQFDkeJtffIv6LFGap9UV7Y3OhU+4ZTWDM
XH76ne9u2ipTDu1pm9WeejgJIl6A7Z/7rRVpp6Qlq4Nm39C/ReNvXQIMT2l302wm0xaFQMfK
jAhXV/2/8VAAgDzlqxuRGdA8eGfWujAq68hWTP4FzRvk97L4cTu5Tq8WIBMpkjznRahyTzk8
7oev+W5xBhGe03hfvog+pA9rsQIWF5R1meNZgtxR+GBj9bhHV+CUD6Fp+M0ffaevmI5Untyl
AqXYdwfuOORcD9wHxw+XX7T/Slxq/Z0CKhfYJ4YlHV2UnjIvEI7EhV2fPhE4WZf0uiFOWw8X
XcvPA8u0P1al3EbgeHMBhWLBjh8+Y3/pm0hSOZksKRdNR6PpCksa52ioD+8Z/giTIDuFDCHo
p4QMLrv05kA490cNAkwkI/yRjrKL3eGg26FCBh2tQKoUw2H5pJ0TW67/Mn2mXNXjen9hDhAG
7gU40lS90ehhnpJxZC/73j2HjIxSiUkRpkCVKru2pPXx+zDzABEBAAHCwXwEGAEIACYWIQQV
qNeGYUnoSODnU2dJ0we/n6xHDgUCYkascgIbDAUJEswDAAAKCRBJ0we/n6xHDsmpD/9/4+pV
IsnYMClwfnDXNIU+x6VXTT/8HKiRiotIRFDIeI2skfWAaNgGBWU7iK7FkF/58ys8jKM3EykO
D5lvLbGfI/jrTcJVIm9bXX0F1pTiu3SyzOy7EdJur8Cp6CpCrkD+GwkWppNHP51u7da2zah9
CQx6E1NDGM0gSLlCJTciDi6doAkJ14aIX58O7dVeMqmabRAv6Ut45eWqOLvgjzBvdn1SArZm
7AQtxT7KZCz1yYLUgA6TG39bhwkXjtcfT0J4967LuXTgyoKCc969TzmwAT+pX3luMmbXOBl3
mAkwjD782F9sP8D/9h8tQmTAKzi/ON+DXBHjjqGrb8+rCocx2mdWLenDK9sNNsvyLb9oKJoE
DdXuCrEQpa3U79RGc7wjXT9h/8VsXmA48LSxhRKn2uOmkf0nCr9W4YmrP+g0RGeCKo3yvFxS
+2r2hEb/H7ZTP5PWyJM8We/4ttx32S5ues5+qjlqGhWSzmCcPrwKviErSiBCr4PtcioTBZcW
VUssNEOhjUERfkdnHNeuNBWfiABIb1Yn7QC2BUmwOvN2DsqsChyfyuknCbiyQGjAmj8mvfi/
18FxnhXRoPx3wr7PqGVWgTJD1pscTrbKnoI1jI1/pBCMun+q9v6E7JCgWY181WjxgKSnen0n
wySmewx3h/yfMh0aFxHhvLPxrO2IEQ==
To: Jesper Dangaard Brouer <hawk@xxxxxxxxxx>, bpf@xxxxxxxxxxxxxxx,
netdev@xxxxxxxxxxxxxxx
Cc: Alexei Starovoitov <ast@xxxxxxxxxx>,
Daniel Borkmann <daniel@xxxxxxxxxxxxx>,
John Fastabend <john.fastabend@xxxxxxxxx>,
Andrew Lunn <andrew+netdev@xxxxxxx>, "David S. Miller"
<davem@xxxxxxxxxxxxx>, Eric Dumazet <edumazet@xxxxxxxxxx>,
Jakub Kicinski <kuba@xxxxxxxxxx>, Paolo Abeni <pabeni@xxxxxxxxxx>,
Jamal Hadi Salim <jhs@xxxxxxxxxxxx>, Cong Wang <xiyou.wangcong@xxxxxxxxx>,
Jiri Pirko <jiri@xxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx
Subject: [BUG] veth: TX drops with NAPI enabled and crash in combination with
qdisc
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Authenticated-Sender: marcus.wichelmann@xxxxxxxxxxxxxxxx
X-Virus-Scanned: Clear (ClamAV 1.0.7/27658/Wed Jun 4 10:36:16 2025)
X-Spam-Status: No, score=-3.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hi,
while experimenting with XDP_REDIRECT from a veth-pair to another interface, I
noticed that the veth-pair looses lots of packets when multiple TCP streams go
through it, resulting in stalling TCP connections and noticeable instabilities.
This doesn't seem to be an issue with just XDP but rather occurs whenever the
NAPI mode of the veth driver is active.
I managed to reproduce the same behavior just by bringing the veth-pair into
NAPI mode (see commit d3256efd8e8b ("veth: allow enabling NAPI even without
XDP")) and running multiple TCP streams through it using a network namespace.
Here is how I reproduced it:
ip netns add lb
ip link add dev to-lb type veth peer name in-lb netns lb
# Enable NAPI
ethtool -K to-lb gro on
ethtool -K to-lb tso off
ip netns exec lb ethtool -K in-lb gro on
ip netns exec lb ethtool -K in-lb tso off
ip link set dev to-lb up
ip -netns lb link set dev in-lb up
Then run a HTTP server inside the "lb" namespace that serves a large file:
fallocate -l 10G testfiles/10GB.bin
caddy file-server --root testfiles/
Download this file from within the root namespace multiple times in parallel:
curl http://[fe80::...%to-lb]/10GB.bin -o /dev/null
In my tests, I ran four parallel curls at the same time and after just a few
seconds, three of them stalled while the other one "won" over the full bandwidth
and completed the download.
This is probably a result of the veth's ptr_ring running full, causing many
packet drops on TX, and the TCP congestion control reacting to that.
In this context, I also took notice of Jesper's patch which describes a very
similar issue and should help to resolve this:
commit dc82a33297fc ("veth: apply qdisc backpressure on full ptr_ring to
reduce TX drops")
But when repeating the above test with latest mainline, which includes this
patch, and enabling qdisc via
tc qdisc add dev in-lb root sfq perturb 10
the Kernel crashed just after starting the second TCP stream (see output below).
So I have two questions:
- Is my understanding of the described issue correct and is Jesper's patch
sufficient to solve this?
- Is my qdisc configuration to make use of this patch correct and the kernel
crash is likely a bug?
------------[ cut here ]------------
UBSAN: array-index-out-of-bounds in net/sched/sch_sfq.c:203:12
index 65535 is out of range for type 'sfq_head [128]'
CPU: 1 UID: 0 PID: 24 Comm: ksoftirqd/1 Not tainted 6.15.0+ #1 PREEMPT(voluntary)
Hardware name: GIGABYTE MP32-AR1-SW-HZ-001/MP32-AR1-00, BIOS F31n (SCP: 2.10.20220810) 09/30/2022
Call trace:
show_stack+0x24/0x50 (C)
dump_stack_lvl+0x80/0x140
dump_stack+0x1c/0x38
__ubsan_handle_out_of_bounds+0xd0/0x128
sfq_dequeue+0x37c/0x3e0 [sch_sfq]
__qdisc_run+0x90/0x760
net_tx_action+0x1b8/0x3b0
handle_softirqs+0x13c/0x418
run_ksoftirqd+0x9c/0xe8
smpboot_thread_fn+0x1c0/0x2e0
kthread+0x150/0x230
ret_from_fork+0x10/0x20
---[ end trace ]---
------------[ cut here ]------------
UBSAN: array-index-out-of-bounds in net/sched/sch_sfq.c:208:8
index 65535 is out of range for type 'sfq_head [128]'
CPU: 1 UID: 0 PID: 24 Comm: ksoftirqd/1 Not tainted 6.15.0+ #1 PREEMPT(voluntary)
Hardware name: GIGABYTE MP32-AR1-SW-HZ-001/MP32-AR1-00, BIOS F31n (SCP: 2.10.20220810) 09/30/2022
Call trace:
show_stack+0x24/0x50 (C)
dump_stack_lvl+0x80/0x140
dump_stack+0x1c/0x38
__ubsan_handle_out_of_bounds+0xd0/0x128
sfq_dequeue+0x394/0x3e0 [sch_sfq]
__qdisc_run+0x90/0x760
net_tx_action+0x1b8/0x3b0
handle_softirqs+0x13c/0x418
run_ksoftirqd+0x9c/0xe8
smpboot_thread_fn+0x1c0/0x2e0
kthread+0x150/0x230
ret_from_fork+0x10/0x20
---[ end trace ]---
Unable to handle kernel NULL pointer dereference at virtual address 0000000000000005
Mem abort info:
ESR = 0x0000000096000004
EC = 0x25: DABT (current EL), IL = 32 bits
SET = 0, FnV = 0
EA = 0, S1PTW = 0
FSC = 0x04: level 0 translation fault
Data abort info:
ISV = 0, ISS = 0x00000004, ISS2 = 0x00000000
CM = 0, WnR = 0, TnD = 0, TagAccess = 0
GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
user pgtable: 4k pages, 48-bit VAs, pgdp=000008002ad67000
[0000000000000005] pgd=0000000000000000, p4d=0000000000000000
Internal error: Oops: 0000000096000004 [#1] SMP
CPU: Ampere(R) Altra(R) Processor Q80-30 CPU @ 3.0GHz
# tc qdisc
qdisc sfq 8001: dev in-lb root refcnt 81 limit 127p quantum 1514b depth 127 divisor 1024 perturb 10sec
Thanks,
Marcus
Return-Path: <linux-kernel+bounces-673497-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 2073C41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:04:49 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id D99B53A43A9
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:04:26 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 29AAA1A08BC;
Wed, 4 Jun 2025 16:04:44 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="GopEpRFj"
Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1CE4118A6DF
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:04:41 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.92.199
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749053083; cv=none; b=chOs40dS9lNcVQCv7j5HteacBobvyHQ73nYAlE/lhG5SZ+LPzhuB8NoQcv1WK6r1HfEmswqe0PrUXdNwbszON9aYwTMNmXKMpeXT+6CuH/YQr9GYP3cAGuJQfqqfIrHb36PYvAaZlTyxTvXENOcskQdSVJC7gr5XIdRUZqb3Kz4=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749053083; c=relaxed/simple;
bh=aX7D/nHqjvADGjMie4fjxlziA0J8uk/7y2iQte4HpdQ=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=IZOakj1zILBrELmCCX8TR7TclSIaUVDDKgPWr77/XJqYLdda71UeinPmMJLpN+3fMM1ReoCAzW/pZDms+E+mExxkotFOuF5D65iVRHhFXAvPf0o+M6aVEtPembagjlCuvMKcJVl1GtRtoMhMZ+nlsBnqOsem9lIMdS0F+nvHYkQ=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=GopEpRFj; arc=none smtp.client-ip=90.155.92.199
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org
Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version:
References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:
Content-Transfer-Encoding:Content-ID:Content-Description;
bh=aX7D/nHqjvADGjMie4fjxlziA0J8uk/7y2iQte4HpdQ=; b=GopEpRFjfbxlPA8FYTjL6s1Ryg
vqJb82tDPgzwnXXrowEJMAl9XN0wQdRD0hrQTBXe9gPfIHQ6QlKxU6j1bILR6F4l56YaYFARpT+TC
8VV5v3fwMlRCM4Y5Kq9J1jL2jGClWVYzu6ViG+mtL3ThEsJkpA1Daq3XyWSBf9ENE1lCziTF8fpf3
85NC0CEBBdT1PEouMkKGSEKgLkvTIx25Z16vWVxdeg4wvZwlAPah4wcOHoaia7yEptcjqoOh9hV9M
H0NhLQ6eYGE7UfTM3aEo/WTIMHp0oLiu3P8d5VsXLqquejPspLhswv1M+GW+XBPA7LcRU9t7lHXNh
B0I5itqg==;
Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net)
by desiato.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux))
id 1uMqbV-00000000ulB-1MGc;
Wed, 04 Jun 2025 16:04:37 +0000
Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000)
id A756330057C; Wed, 4 Jun 2025 18:04:36 +0200 (CEST)
Date: Wed, 4 Jun 2025 18:04:36 +0200
From: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
To: Kuyo Chang <kuyo.chang@xxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>,
Matthias Brugger <matthias.bgg@xxxxxxxxx>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx>,
linux-kernel@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx,
linux-mediatek@xxxxxxxxxxxxxxxxxxx
Subject: Re: [PATCH 1/1] stop_machine: Fix migrate_swap() vs. balance_push()
racing
Message-ID: <20250604160436.GL39944@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20250529084614.885184-1-kuyo.chang@xxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20250529084614.885184-1-kuyo.chang@xxxxxxxxxxxx>
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
This and your other patch about migrate_swap() are two distinct
problems, right?
Return-Path: <linux-kernel+bounces-673498-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 297C241E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:06:24 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id A6A15189B17E
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:06:37 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 130511A08BC;
Wed, 4 Jun 2025 16:06:18 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="SD7qgNNk";
dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="pG4QLKXr"
Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6A4DF15665C
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:06:15 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749053177; cv=fail; b=EwH6lVtavzoqOQ8IUjN63iD2OaHXqJAgMSjlDwgwNDUpYBe8qxzW8hmKhDubwXSXvOjtpR+u5VPG8YI3KeFKKPnuFB7A9uZN6/QHVm3LgR2yNLvC8fYxr6DSOU4Lz8gRib4hai5YPo0uliC+GzaYT4vdTjMM3FCpVayxLmbIc1s=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749053177; c=relaxed/simple;
bh=BODUrsd0SR/f+szE0IwLM1GtBZEUcSzxrRE8ndyeM4Y=;
h=Date:From:To:Cc:Subject:Message-ID:References:Content-Type:
Content-Disposition:In-Reply-To:MIME-Version; b=Ymxi/b2DNb1hlzCQYm6FplEAagmKhjyY1Tp0PtsGH7vNQYEonaphc8vhV2FdOcwII/d+xVxjEmTBMQaW7RG3Hsk7vLOWIVjPROEqQaof60UtH+z1iH2WLVtPELiEpxBvWo6jViCn0ftrIyh+Ff4uXCv4d1YGqnZG5aas7KDrxLI=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=SD7qgNNk; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=pG4QLKXr; arc=fail smtp.client-ip=205.220.177.32
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com
Received: from pps.filterd (m0333520.ppops.net [127.0.0.1])
by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 554FduHZ009119;
Wed, 4 Jun 2025 16:06:01 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc
:content-type:date:from:in-reply-to:message-id:mime-version
:references:subject:to; s=corp-2025-04-25; bh=ZJmDZuBW/OKb6u74Gb
utW1nmqnO+v3jnEmjAK/mLrc8=; b=SD7qgNNkxZLRYa8DGTq5cA83BrIS5fQ1wm
WAMXUtXd5Jyb/SWOevMxAJya+y7kYLOf48d+JKd0sjh1K4FSeZBLBnp7dIWy2dhv
D3MARK2ZNQGgM32HtJeXvxDQ1PYby2B0WLZmWSUnSMF1tEforgVvZXmMETxlJpuj
Z0PQAFkOH8IT/TBa6b6BJMGh2TPe0GuKQ8EliSvkY9jNIP78LucotE2t5kqesDMZ
miycqK7StmtyZMiKXPCjdOZizqk1Ym4ux6LfXO9BAHwHSbjmab/PMzrs6ZraTWvf
K4gf9q5kuEJz51I/RRihOwnqQUOppoIjtCRpKqEe04lLP5SlxDsA==
Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129])
by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 471gahceg0-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 04 Jun 2025 16:06:00 +0000 (GMT)
Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1])
by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 554FNHbh034829;
Wed, 4 Jun 2025 16:06:00 GMT
Received: from nam02-bn1-obe.outbound.protection.outlook.com (mail-bn1nam02on2086.outbound.protection.outlook.com [40.107.212.86])
by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 46yr7b6wee-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 04 Jun 2025 16:05:59 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=LoUjge+7WF/AMXKJyGH3Rk40J3Mx/ItJRqeUrcI6TFhZJvI7HQ7Uhou3sl/1RLMLckN8dnCgvfOVEqIugoLDM+S7yqJu5ca6Aw2xEWaMrYYoyKCzOciEEwqCIDDKBcklxzfHdFO+sq97stBnrFrGzs0I4/eQrXpETsqWyldR9hBlBJ/BZDsnKkWn6mcc1tAoAbQh12YfPZXrzRl3wRjtPPdMOstAk0/GoTNsL75L7fSbFBkB0CmJYNU4xy4RfDK7SN6te704txDBXrQ6c+lOxHuOOlWra8uKz3cFZ0zH1Crg1msfuiujJ1k63XtNVi2nZlKtngl2+OCq+n6obrs61g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=ZJmDZuBW/OKb6u74GbutW1nmqnO+v3jnEmjAK/mLrc8=;
b=JfoemQ7ws30iKubKWn1YJVUkhcKC/JJAKJbbJybMaIYUhac92cTy0V8wKGLAHrRFmWWCtUSSbi4GK1RQ3RwkZQNsj3sfUbaS9g8nwJ8FykimchUt54UbsxXHozIHNs4+k9YfDDxJ2g3+t+aLozEYnPAayPUu4fSszEZ6/Mw83+l2qmexI9sGDzTVbqGGXTArWt5aaLTPkuHO6hThQ5+hBi9OovLEcPfiGIzl9buJPyhA9Jity+amH7OtJwj06pbobJEgshmgmJkKaDTpue5PjCOZSs7kQ2MeMSdJI1BQkzvqZ3BdLz78zV6a2K6HNpbQi3gCqsPZ3RZsyINuUqLMyw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com;
dkim=pass header.d=oracle.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=ZJmDZuBW/OKb6u74GbutW1nmqnO+v3jnEmjAK/mLrc8=;
b=pG4QLKXromH9OpRhi87aP9G4ZOD++EyZ76vTizkxY7u9VNhnz6OB/w6fLVuvCa2HUfQcUgpiwM/H2XNEaDAIUB0dxQGkAdcgUnwZ8Y/jrcjB1bJRg8FIHtUtqX8gRGHhfAGIo6h4pNpv6+u/0HlnuiM7fQy3yNfMmj3USVAXSbw=
Received: from DM4PR10MB8218.namprd10.prod.outlook.com (2603:10b6:8:1cc::16)
by BLAPR10MB5076.namprd10.prod.outlook.com (2603:10b6:208:30f::16) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8746.41; Wed, 4 Jun
2025 16:05:57 +0000
Received: from DM4PR10MB8218.namprd10.prod.outlook.com
([fe80::2650:55cf:2816:5f2]) by DM4PR10MB8218.namprd10.prod.outlook.com
([fe80::2650:55cf:2816:5f2%6]) with mapi id 15.20.8746.041; Wed, 4 Jun 2025
16:05:57 +0000
Date: Wed, 4 Jun 2025 17:05:54 +0100
From: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>
To: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Cc: David Hildenbrand <david@xxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx,
linux-mm@xxxxxxxxx, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>, Mike Rapoport <rppt@xxxxxxxxxx>,
Suren Baghdasaryan <surenb@xxxxxxxxxx>, Michal Hocko <mhocko@xxxxxxxx>,
Jason Gunthorpe <jgg@xxxxxxxx>, John Hubbard <jhubbard@xxxxxxxxxx>,
Peter Xu <peterx@xxxxxxxxxx>
Subject: Re: [PATCH v1] mm/gup: remove (VM_)BUG_ONs
Message-ID: <5041aaee-40e7-475d-81f1-020008dca3b1@lucifer.local>
References: <20250604140544.688711-1-david@xxxxxxxxxx>
<fb548cd0-4a6a-4e90-92b8-24c7b35df416@lucifer.local>
<CAHk-=wjO1xL_ZRKUG_SJuh6sPTQ-6Lem3a3pGoo26CXEsx_w0g@xxxxxxxxxxxxxx>
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <CAHk-=wjO1xL_ZRKUG_SJuh6sPTQ-6Lem3a3pGoo26CXEsx_w0g@xxxxxxxxxxxxxx>
X-ClientProxiedBy: LO4P123CA0306.GBRP123.PROD.OUTLOOK.COM
(2603:10a6:600:196::23) To DM4PR10MB8218.namprd10.prod.outlook.com
(2603:10b6:8:1cc::16)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: DM4PR10MB8218:EE_|BLAPR10MB5076:EE_
X-MS-Office365-Filtering-Correlation-Id: a85bce0f-a3c6-4c77-12c0-08dda381b0e8
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|1800799024|366016;
X-Microsoft-Antispam-Message-Info:
=?us-ascii?Q?9reS4JtQDLLBqMXBelPndAMZwzDp7mK1d1USAjG+e6bv0oIRUa/ideEbQngu?=
=?us-ascii?Q?5Ux4DLM1AoWgd0645IhbS8TGm6HEVSme8z3G0KSttpEjJICnLaynv6TVDwjU?=
=?us-ascii?Q?F3ZgKbWoBnTGYZ0qt7MECsaqxpUEs/Hg+yESYsMI4hKlnxZqUvxcuTpY0hTd?=
=?us-ascii?Q?iwwTn/0TXiXE8wZksTsQ5cLm0NYMwcd3udHI3drVF/ZjPc1BJgfUZfLsq1WZ?=
=?us-ascii?Q?09aIzFlHsTgi2+Cq/Ly2AYd5f4zuXLxEFbwsDHof0AmiN0+wz5N78zINPn/r?=
=?us-ascii?Q?whtzm0FQuyLODdqDNsEhjVXids6FHAJDEZ2k0hkQ3xS/Qgfu+8z2UvbA1EGb?=
=?us-ascii?Q?VtOzCRdmLIIO0Z599/lpI8jTEOtPA0fEC0wiBEdDwfNU5o8F0FX84mZ8P2fa?=
=?us-ascii?Q?uM1JOyr1wV3iqLnud4B1kikytTrTkPsRWBIEGZaJHcu0HeayOmdL5BBdaeLJ?=
=?us-ascii?Q?+7dKK/IIQ8FN6uwUcDGehnq+puFU6pgmLJFJTIZQDbGVPGAqsqJHU6YfUkcR?=
=?us-ascii?Q?8kh06zpQjFfwarPIi4n1dUiIRZXT7ellELpZ00aoCXyHFlGeZuVkQUVoxSgW?=
=?us-ascii?Q?InYi7TtSi6RzVAsegrQRpsjdRPemekdqCiPs0rUbJZWi2tuGh4FR/+c9Hgbx?=
=?us-ascii?Q?9iP1ODQrsSNrR/s+TWKGY4uVw4p5rrDAnc24u9o89ynSM0tpz8eVKZDGuVdt?=
=?us-ascii?Q?rEnsEnRPTp0lbiSnorSnmSFVBfByCHUp5o3jQer5TebAosWpzmPokTpYJax7?=
=?us-ascii?Q?n7jG1C2ruohaUOndviaJQgjEhd2ZMWikoxa2FfK34jka9E2dvdwPrBfTTLDG?=
=?us-ascii?Q?yD03/rBV2DlaG8SPvXiGsRglaCRJpkIZy7slkuqkg8W+maC+IswfI9fuxtvN?=
=?us-ascii?Q?9gtRseJissTtqi3gt7aLclcKZsVLucyB2sigaOQiEBK+HfztS6iO+K1AXf2k?=
=?us-ascii?Q?JD7/fUVJ//k88nU8gm2NVWR8PhS+XvMTbitO/H0hkEB6q+eScdOSmIluKmAg?=
=?us-ascii?Q?vB8LptBbmHGeXb5c05fa52DRaIOL5j5I+Q2/mT+e2nK0IjP4T+Ni6G1dRALb?=
=?us-ascii?Q?JiPVZAGVLZV33Osvuw3gkzyE2t6zA6QMoI0pq1v8WvZTUEdsZYFP2SB7VM2U?=
=?us-ascii?Q?Rctl9K1xSr5o1qbSzTR9c6bFHXu89ASLU3EhMIN4Moe9DAQAzx4OfXaWyRWX?=
=?us-ascii?Q?5577B9X30e7RF4aDZOg9hA1xf+dFHQvHMco02cCmgWNepc0/7ic0oLpsFV8W?=
=?us-ascii?Q?6j0dOrt6pwDe2BYTC4XbEtUbzYWpkNv7Z2zeGO+vrdVRIM0Ff7S2N/V+VuI+?=
=?us-ascii?Q?RRtlbK5CJG76n7SSIUTmfzJExPh1o9vzNwb8JDZ1x64Xa6fpxsRYaoeeHZ/j?=
=?us-ascii?Q?T/RvPhiv+/9xiY86FfIxdRdMHSjOmIcEIJFHLvrahk6bBnDDA27UyGTDFysG?=
=?us-ascii?Q?y1i0UYbbdvg=3D?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR10MB8218.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(376014)(1800799024)(366016);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?us-ascii?Q?HXLKiLOpTC8vvrPvk5LZRBiIDvHXmuFh5WXlJdxC7I6zOmTDL5iJWdle4r2x?=
=?us-ascii?Q?bcfk21aMgpP2tjhzuMWSRlTA0sRGrR+CQYVVAEEYPIUAma1WQOBcwhhU6cGw?=
=?us-ascii?Q?c5ye7nGAgyfMrKK0vMua/+LYIgtnO9bW+1RZC7DFuMEpnCNg49KZhwm6PXK+?=
=?us-ascii?Q?woO9sZ87TBvZtYk3uZjXGCpxB5WMURe3KRJ1BcSiZeu2GYrZTJ0QkHa8go9C?=
=?us-ascii?Q?Yj/9w5SR9lB0+3viD7GFZQQmzRdbsaR3EnJtGqFLsnj5CoC0+NyPBN7sIfrh?=
=?us-ascii?Q?TykasRXjBxFe/0rNyszoHPGxzGFVUZaKlapWuKINy8XtdHKOxwjWbm2YyLq9?=
=?us-ascii?Q?yS5aorCK4iwFX2ttbXTSSHgYyDz+f/wFmNrnXUPbWnGB6eLAzyt5pClBLxdU?=
=?us-ascii?Q?CZYalL0C/UscpfTwFylZNQ1fJIcVNWhCrSuAh7i+bGb4I1skM8ghdF2KVppC?=
=?us-ascii?Q?q8fh/1G24T1AQk8fuql+Yb3NzXpndSIWjsRC+gN/UkWSAmg+nGOp0XhqmtCF?=
=?us-ascii?Q?XXFjzSP0WAWl1SIc/sFZSZR+YWR13IJDQI6d7trI+W7dhdDUrHXTAQasX0Z9?=
=?us-ascii?Q?kdGKkBhAa0GfPXnIb8PICByA3/v0e0tO+gQZ7qM+S7ODMT9vvAgetN+owZpO?=
=?us-ascii?Q?yx03hZvymcDgfvxAPcEX9/IAuFjSy1dOD0x3tVsWK04trEP6Qty3Wqvwouwl?=
=?us-ascii?Q?V8CyOlsd8FvTPPEW2Lc8psDe7TcBcEs3oA2Somu4imHV5LyGT3BXSdskFB0f?=
=?us-ascii?Q?eV3A+VosnJCjmLf5nXF18kQcY+zprY6XBr6gZ8Oj18rbaE//P4E4oRBK9NNx?=
=?us-ascii?Q?WLmAG0J0I1XNCptVuu2yUmPJm+hi/fOqNgKDxpt47G+upHWSU5QvApsjkgRS?=
=?us-ascii?Q?ibwOAXxTkTTm7emE8Z6Yu9CP0kBVRR0oxj6BfaOLL/HVa+sA0QB6H5JQ+jF9?=
=?us-ascii?Q?EdnZDPj1Kv6t1h89rXfUu2r5ZNsx3T0eIcaEGnxnZ8+hq40q3HZwdgBKueHR?=
=?us-ascii?Q?jaYn91pm25+eEs04SxYz1KA/uZxelAzf19qEvu4OgHpIKudYKyI7HwON6qxo?=
=?us-ascii?Q?GoV+pVsIxxM3yJuPGctWsC0J4pWFwxe1EOiLrtGP6NdpWssYq7+0/o6O6yC1?=
=?us-ascii?Q?bzgKw1VadGebBAqyZo1Tt9JEnSjb5qagl+h9d5DaBu+kH0adrn9YjfYFyb8C?=
=?us-ascii?Q?Lio0kzPgtP0PW4/42kxKa4nblvzzSI2XU3W/mSXy9MHaXM65YDOOdXFTimmu?=
=?us-ascii?Q?MRKGo2+/G90wDV7+k1noRqrprfUVCc1xeYklQbLg+r9uZDnxbjY/5SArW5nF?=
=?us-ascii?Q?fpUkVtuLG9e0MJqCr1n6RXYXgTG9XvzGEl8Kbm6gekMlDRah6x6LuDOuYkR6?=
=?us-ascii?Q?ZbfLbUGCooXPHwuAoJ877Lyp2Qc1oyY07vAYmwLuMvAvQ4iXi5D36edlFB6p?=
=?us-ascii?Q?clNytSJOl9nD8Rr8kRTq1HBiAE3AjibHzwc0uQ+mVO92BT2bNZm9a9N/Rexq?=
=?us-ascii?Q?CA7nbJ5phajD8mmIMy97u6k6zCZnPgrvZJ/Xi1fOkPYuhlqW1Zf56Cqtz0Qs?=
=?us-ascii?Q?qgm58MxksJDny5zYjLDJasAl70vb8cEnE06Sf1gFJyaE247lSKF0FyIKVT+w?=
=?us-ascii?Q?gg=3D=3D?=
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0:
ve0Phv4SacqHpZx0LXou8S5UOcv6nJutnrjTDeZvbKPWonbqkmc2IPylhMwr+pZFO4tAr6uK8rUaqd3SdbMPC3nNuxaTMtYV/I/7Z1dwJNt683DsHJbsahp5RDEMJOhCqRkTdamTm5KhTNvqk/yKbDwU66yESfTz6NNHtMdEkcgIYdPJHFBXQsKgPHaWTm6PPAPVzUB9hOoXh5mooUnkCjSbZLaP5uio8o8X6woqYHmK7q6f4VbZdFiMzugJylJC58yM+L5jxQ/5Z4zLbEMt+7+usydcCMb3eDrQJ4Kcmn2l99OWCnpjdxyULe0erkRHjpXJTC+4jFJH3VhrS+1VFhgrAEd4OQRfdv2lysnWiOMfktn/sOAYdOHzP/dJ2c+kafQJ3M8Dm43cjK7It6bjcSjEir1MCgRqTcu/juWsRhWzQ3UL3+an/CxiaGOW0xuTkN5wMMYX8n2bwIptT5dq9pEgXKDu+bco9BwveYD7tZpmqwt0KSJy84/I9WGqlna024gcphzf74HecLug5GYkyQv3lE+vaaOU8IKBdtqhUlA6VW5uted0WJjkYjQ/AGytAsJlvmJ1870nzEMf2PIsHM2AH4Oy1qWBAhVY5G7Zd8I=
X-OriginatorOrg: oracle.com
X-MS-Exchange-CrossTenant-Network-Message-Id: a85bce0f-a3c6-4c77-12c0-08dda381b0e8
X-MS-Exchange-CrossTenant-AuthSource: DM4PR10MB8218.namprd10.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 16:05:57.1402
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: 8Zq6ckcxUL8zX+H9uNaEGZbGo56GaJ3EWz9dzXLwcQ/POsRRg6feFEA4xviqBZTa8BvUipJHyPT4AUDpTY1+/iQJG6OBsPmv3Z9NOzUwgvY=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLAPR10MB5076
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 mlxlogscore=999
bulkscore=0 spamscore=0 suspectscore=0 malwarescore=0 mlxscore=0
adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1
engine=8.12.0-2505160000 definitions=main-2506040122
X-Authority-Analysis: v=2.4 cv=aqqyCTZV c=1 sm=1 tr=0 ts=68406ee9 b=1 cx=c_pps a=WeWmnZmh0fydH62SvGsd2A==:117 a=WeWmnZmh0fydH62SvGsd2A==:17 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19
a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19 a=xqWC_Br6kY4A:10 a=kj9zAlcOel0A:10 a=6IFa9wvqVegA:10 a=GoEa3M9JfhUA:10 a=KBWr4bYY6LNpv2K2w98A:9 a=CjuIK1q_8ugA:10
X-Proofpoint-GUID: u8VG-x_YWD6ZWAcdokJk9a5AVh_KZjdG
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDEyMiBTYWx0ZWRfX8gR8/8tIqUHc LhhCMSCSTj9czzrZoB7WzwaFdnRav6dP5yRUXDb6IEV3dCrwM86ojStioHnup/ii428xht+2AJr Ntz8YfaAhWuSXWvoSxWeeTsnuqR9RkB+MG8ugLPV1V6atDJUT1kEVDAkRuhAzhM65s720QENosG
YpN3r8sc2KaWIbkOcMVcKuJOlSjpQLBKWQrGt2X/UvR4s1qpMLEmNmSMFwzRvSJBAqGK2jZb6Eh vNzc0uq0WZsCZnjLyaLUOz0leRryi1Q4d1IfAx2/snrMexpMhjz1NQRW3kwxSN8esrUmxWWpivV aRuSXuURGXb0sQnYAGrtmSc6TwWKpZFXKczr4K2ciW+IqTBRJ94jLlI+UagbVZ8bPHrXhGzn6hc
mq7nbkvl5h6bK1U5OV8CJm53yMzHdGIZKsbXCxbGTRIxxfvp5DIpPJD7JjHunWp8d/R4NIMF
X-Proofpoint-ORIG-GUID: u8VG-x_YWD6ZWAcdokJk9a5AVh_KZjdG
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 08:42:30AM -0700, Linus Torvalds wrote:
[snip]
I really think that the *ONLY* situation where BUG() is valid is when
you absolutely *know* that corruption will happen, and you cannot
continue.
Very much *not* some kind of "this is problematic, and who knows what
corruption it might cause". But "I *know* I can't continue without
major system because the hardware is broken sh*t".
In other words, don't use it. Ever. Unless you can explain exactly why
without any handwaving.
Thanks, this aligns with my understanding.
This does make VM_BUG_ON_xxx() look even more silly :) so I think we definitely
need to get rid of that...
'Absolutely definitely corruption but we only when CONFIG_DEBUG_VM is set' is
you know, insane.
Cloud providers or others can do "panic-on-warn" if they want to stop
the machine at the first sign of trouble.
Linus
Yeah, I have seen people object to WARN_ON()'s because of this though 'hey
some people might panic here!!'. My view on that is - right, they can,
that's fine, they asked for it :)
Cheers, Lorenzo
Return-Path: <linux-kernel+bounces-673499-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id C55B241E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:08:50 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 39D8718896F0
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:09:00 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 062561D799D;
Wed, 4 Jun 2025 16:08:38 +0000 (UTC)
Received: from foss.arm.com (foss.arm.com [217.140.110.172])
by smtp.subspace.kernel.org (Postfix) with ESMTP id D07B628DD0;
Wed, 4 Jun 2025 16:08:35 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749053317; cv=none; b=icvNMIT4yHcnFkzfABoEbyw8JAJJ1z7kpBXmNPseVlifqNF6PiRDtTnVXTf8f/TVAhqa814+NyRB9Zfz/JB6nD5pbbpNNXbtTsX/HZ0fZIvsf2Uefd3somdvy/c3mBrVsRod7c9OchnXu4jvkuR1DeozyBF/zS2khcagykbPKho=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749053317; c=relaxed/simple;
bh=ppswMUxkFPu2BpBWwr3iS8sQtvjltaCv3JhK3TXGmA8=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=nJTDDpSlju2ohF4+WUP7B/R2WbYBNC4EW9YswqD5WSYjA+dyMGyghMIs6oQnHheoskErSQndY5ITdjCrvRlngitYU8bogaP4kr/axbwox+BrHJHZxrD5kpfqetCuRJXmVNH1GUzYuxeVZCIC9aN6Ggs/qNSF1SlLqRKoHln9wzY=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com
Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14])
by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id DD8E01758;
Wed, 4 Jun 2025 09:08:17 -0700 (PDT)
Received: from J2N7QTR9R3 (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14])
by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5690C3F5A1;
Wed, 4 Jun 2025 09:08:32 -0700 (PDT)
Date: Wed, 4 Jun 2025 17:08:23 +0100
From: Mark Rutland <mark.rutland@xxxxxxx>
To: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Baisheng Gao <baisheng.gao@xxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>,
Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>,
Namhyung Kim <namhyung@xxxxxxxxxx>,
Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>,
Jiri Olsa <jolsa@xxxxxxxxxx>, Ian Rogers <irogers@xxxxxxxxxx>,
Adrian Hunter <adrian.hunter@xxxxxxxxx>,
"reviewer:PERFORMANCE EVENTS SUBSYSTEM" <kan.liang@xxxxxxxxxxxxxxx>,
"open list:PERFORMANCE EVENTS SUBSYSTEM" <linux-perf-users@xxxxxxxxxxxxxxx>,
"open list:PERFORMANCE EVENTS SUBSYSTEM" <linux-kernel@xxxxxxxxxxxxxxx>,
cixi.geng@xxxxxxxxx, hao_hao.wang@xxxxxxxxxx
Subject: Re: [PATCH] perf/core: Handling the race between exit_mmap and perf
sample
Message-ID: <aEBvd8fIdjlTV53j@J2N7QTR9R3>
References: <20250424025429.10942-1-baisheng.gao@xxxxxxxxxx>
<aEBSt2LN7YhxYX7N@J2N7QTR9R3>
<20250604142437.GM38114@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
<aEBeRfScZKD-7h5u@J2N7QTR9R3>
<20250604153219.GJ39944@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20250604153219.GJ39944@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
X-Spam-Status: No, score=-3.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 05:32:19PM +0200, Peter Zijlstra wrote:
On Wed, Jun 04, 2025 at 03:55:01PM +0100, Mark Rutland wrote:
> I think we might need something in the perf core for cpu-bound events, assuming
> those can also potentially make samples.
>
> From a quick scan of perf_event_sample_format:
> PERF_SAMPLE_DATA_PAGE_SIZE // partial; doesn't check addr < TASK_SIZE
> PERF_SAMPLE_CODE_PAGE_SIZE // partial; doesn't check addr < TASK_SIZE
But does use init_mm when !mm, perf_get_page_size().
Yeah; think there might be a distinct issue (at least on arm64) where
it's possible to probe the depth of the kernel page tables, but that
might only be a problem on arm64 due to the separate TTBR0/TTBR1 tables
for the low/high halves.
I'll go take another look; that needn't block the rest of this.
[...]
> PERF_SAMPLE_WEIGHT_STRUCT // ???
Safe, driver bits again.
Thanks for digging through the rest of these!
> ... I think all the dodgy cases use mm somehow, so maybe the perf core
> should check for current->mm?
This then... I suppose.
That looks good to me!
Mark.
---
diff --git a/kernel/events/core.c b/kernel/events/core.c
index f34c99f8ce8f..49944e4ec3e7 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -7439,6 +7439,10 @@ perf_sample_ustack_size(u16 stack_size, u16 header_size,
if (!regs)
return 0;
+ /* No mm, no stack, no dump. */
+ if (!current->mm)
+ return 0;
+
/*
* Check if we fit in with the requested stack size into the:
* - TASK_SIZE
@@ -8153,6 +8157,9 @@ perf_callchain(struct perf_event *event, struct pt_regs *regs)
if (!kernel && !user)
return &__empty_callchain;
+ if (!current->mm)
+ user = false;
+
callchain = get_perf_callchain(regs, 0, kernel, user,
max_stack, crosstask, true);
return callchain ?: &__empty_callchain;
Return-Path: <linux-kernel+bounces-673500-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 9A4B041E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:11:18 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 2F8703A8D5C
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:10:56 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 613321DDC00;
Wed, 4 Jun 2025 16:11:08 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="ouP5hwal"
Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 458D64C7C;
Wed, 4 Jun 2025 16:11:04 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749053467; cv=none; b=GihANo2hn2YaJEnbZy3cEYNGU+Bxw2ruduRtHQemww57bwth9IporzW9eUGTbRxwJIJNVVHFGx/0B2bay5yx8YFrjjoyvR1qKhysH1tEW0l1By4KPg7y4ruVPdtgjUs3jtyQtlCpH+cqopmZGi5U7DQjW75lZBBxGvnT6c0KIXA=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749053467; c=relaxed/simple;
bh=/AQiXiMnCVw9MLZbzb+2ZX0KxPHmK4p4CYe4vWhs9aM=;
h=Message-ID:Date:MIME-Version:Subject:From:To:CC:References:
In-Reply-To:Content-Type; b=Hf/HVL8EaXaTAKHpIcDurY2a7k18akAVjLh4aOtquc6KcjonX2KO6uNP8vcERrIdBJoJYAb1uF2piCkh5bausbJ5zCW9MV7dldz6eU5kgmBvlHaNauA38qIv2UBdUlRz4rHkRVNtLaMz21JJ1HEeOgpxXxXBA1yDrwN9rgiKVMU=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=ouP5hwal; arc=none smtp.client-ip=205.220.168.131
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com
Received: from pps.filterd (m0279864.ppops.net [127.0.0.1])
by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5547vaL1013506;
Wed, 4 Jun 2025 16:10:59 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=
cc:content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=qcppdkim1; bh=
FqqTBE/vlzD6SjR1Tr0okwBoLEJJCgNOcIrkG5NC+6Q=; b=ouP5hwalUwmShgQL
aLCGOQ07SaO2eHJCnGvX9kBMKv9wzZAw//Lf3a3ibDALsO791dqBWoB0sR8Nnbfu
vq6sJH4ke+vs4mX+zBdKfkpz0O2ZX/YfDbCvtmdXJ459idzcOiqaiGKyzjVBOZCN
3PmI7pqBpMXCfxaPE1H+rubjOsyQaLSXtAEZc0GqCLk8jQPX0b6c3K8gOuAbU4oK
w9nB+vAeMEXZqZFHsGhr9P8HEGw4fC2nkg6Qll5jiQIOqG23/VqSmOkdM5L59QcX
z7Cf/PiphbaN7cPW0o0MFJ5ExFJ9+ZElZf4JEr/XosZQPn0d4gEbjaONDIJL8/yr
rqBcYA==
Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254])
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 471g8npn5t-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 16:10:59 +0000 (GMT)
Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139])
by NASANPPMTA04.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 554GAwOD013879
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 4 Jun 2025 16:10:58 GMT
Received: from [10.216.5.91] (10.80.80.8) by nasanex01c.na.qualcomm.com
(10.45.79.139) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Wed, 4 Jun 2025
09:10:52 -0700
Message-ID: <ad91876e-508c-4f98-9b7c-c2e4a05a8276@xxxxxxxxxxx>
Date: Wed, 4 Jun 2025 21:40:47 +0530
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v5 5/8] serial: qcom-geni: move resource control logic to
separate functions
From: Praveen Talari <quic_ptalari@xxxxxxxxxxx>
To: Bryan O'Donoghue <bryan.odonoghue@xxxxxxxxxx>,
Greg Kroah-Hartman
<gregkh@xxxxxxxxxxxxxxxxxxx>,
Jiri Slaby <jirislaby@xxxxxxxxxx>, Rob Herring
<robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Conor Dooley
<conor+dt@xxxxxxxxxx>,
Bjorn Andersson <andersson@xxxxxxxxxx>,
Konrad Dybcio
<konradybcio@xxxxxxxxxx>,
<linux-arm-msm@xxxxxxxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>,
<linux-serial@xxxxxxxxxxxxxxx>, <devicetree@xxxxxxxxxxxxxxx>
CC: <psodagud@xxxxxxxxxxx>, <djaggi@xxxxxxxxxxx>, <quic_msavaliy@xxxxxxxxxxx>,
<quic_vtanuku@xxxxxxxxxxx>, <quic_arandive@xxxxxxxxxxx>,
<quic_mnaresh@xxxxxxxxxxx>, <quic_shazhuss@xxxxxxxxxxx>
References: <20250506180232.1299-1-quic_ptalari@xxxxxxxxxxx>
<vTOsjvsB7oSpu2Oe8i1ufoz5C2Hy3EtfDnfBsLag2p-s63J0BLdqbLn44Hds17WR12JGfo7sd52k7uHaXlTTeQ==@protonmail.internalid>
<20250506180232.1299-6-quic_ptalari@xxxxxxxxxxx>
<f912588b-fb54-4257-a4d8-db58e93b8378@xxxxxxxxxx>
<y41ikVJ5uSSaGZHmqsvTm9akz3EUUT7X6dTPrfSuIYqGmMdlEfPRWqPA630jmsEzwC-6JSgYRPobg4e933PgxA==@protonmail.internalid>
<afe41159-00e4-45d1-857f-0a68f6fc6c8e@xxxxxxxxxx>
<6b7ca51a-241a-49fc-8aac-da5af96b5e10@xxxxxxxxxx>
<0daf396a-29af-458b-a7ba-3b711b22cde9@xxxxxxxxxxx>
Content-Language: en-US
In-Reply-To: <0daf396a-29af-458b-a7ba-3b711b22cde9@xxxxxxxxxxx>
Content-Type: text/plain; charset="UTF-8"; format=flowed
Content-Transfer-Encoding: 8bit
X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To
nasanex01c.na.qualcomm.com (10.45.79.139)
X-QCInternal: smtphost
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085
X-Proofpoint-GUID: iZLz6X9zFbRBvzRXn8o7vX33aAgdeuC5
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDEyMyBTYWx0ZWRfX1gl2JQkaiwHK
xTnhdxgnOlrG009kkd2kISNeAGYHA9FovgLLk69vHlliAi1iHY6jMiG8Q9vuYpP+jVN0YQtOgbH
XGRRmSdJgA4/7JvoTm3IHk+lgFUwBmHOPXKKeJwfKLh8vGeaWyfDo7n1X110khkDrEs6g8oRXNW
22fGbc4xSbcM3PqyAZcXMbCVhZ8i7ST28XSel40ZXm3AZ0T+CLfEsSVBcHw6H3IVrHVCuS+TtVf
UujNcl+aplqrKmVaLxvs/PJKdiG1QQKSNoBRfFU6GnQzNLGa8Egil+D7ZPuOyt6vaUk+WZw4WyZ
LeageuC5cTkzJqL7Lt8GiMt+opgxLDpH+TaeaytznCkBnwbAOA8E5dy7eSITdj4/fEZ82/EjKKZ
PHv9TKryUDnyXy8hjjad4oq1a1ZsW7enHbh4N/KJ5T461FQBamfothPqX34yK0doP3yIU6Nj
X-Proofpoint-ORIG-GUID: iZLz6X9zFbRBvzRXn8o7vX33aAgdeuC5
X-Authority-Analysis: v=2.4 cv=UphjN/wB c=1 sm=1 tr=0 ts=68407013 cx=c_pps
a=JYp8KDb2vCoCEuGobkYCKw==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17
a=GEpy-HfZoHoA:10 a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10 a=KKAkSRfTAAAA:8
a=AxOswNciry8E2xLaaYYA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10
a=cvBusfyB2V15izCimMoJ:22
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
priorityscore=1501 spamscore=0 impostorscore=0 lowpriorityscore=0
phishscore=0 mlxlogscore=999 clxscore=1015 malwarescore=0 adultscore=0
bulkscore=0 mlxscore=0 suspectscore=0 classifier=spam authscore=0 authtc=n/a
authcc= route=outbound adjust=0 reason=mlx scancount=1
engine=8.19.0-2505280000 definitions=main-2506040123
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hi Bryan
On 6/4/2025 7:39 PM, Praveen Talari wrote:
Hi Bryan
On 6/3/2025 8:16 PM, Bryan O'Donoghue wrote:
On 03/06/2025 15:29, Bryan O'Donoghue wrote:
On 03/06/2025 15:28, Bryan O'Donoghue wrote:
2.17.1
Assuming you address my points.
[sic]
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@xxxxxxxxxx>
Oh please fix this in the next version
can i fix this in separate patch since i haven't touch these two lines
Sorry bit confused.
Will fix this in the same patch.
Thanks,
Praveen Talari
or
fix within same patch?
Thanks,
Praveen Talari
checkpatch.pl --strict mypatch.patch
CHECK: Alignment should match open parenthesis
#92: FILE: drivers/tty/serial/qcom_geni_serial.c:1675:
+ else if (new_state == UART_PM_STATE_OFF &&
+ old_state == UART_PM_STATE_ON)
total: 0 errors, 0 warnings, 1 checks, 71 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or
--fix-inplace.
0005-serial-qcom-geni-move-resource-control-logic-to-sepa.patch has
style problems, please review.
---
bod
Return-Path: <linux-kernel+bounces-673501-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 1491C41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:11:42 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id BC53A1672E2
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:11:42 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 97EBF1DDC08;
Wed, 4 Jun 2025 16:11:33 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=fail reason="signature verification failed" (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b="O7CYB3Ks"
Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id F08AC4C7C;
Wed, 4 Jun 2025 16:11:29 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.97.179.56
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749053492; cv=none; b=EVVQPfoB3yusHixU121VvRIbUDFjQUODz+3jIxukgfqnE9gZPop+NBYXWyM8JKFLT2yAEgGCycObjsoGbQAHiPNeldQzmxT/NPnafjkk6jgoT4+9DTYRBqXcaY0Y8gJphrwX/XGK5RFIxiUVLpdt4EvbJ5c/HxAiXhIstShr19Q=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749053492; c=relaxed/simple;
bh=o/cPNVE3IdWBRcC848YHNgxMGl8ijLAQ/13S2yCccfs=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=cRE/XSS/QSiMNgBNPhW4hJVAQ39N48Z7ogTczcx/kczdo0pTzwGsiAvxOpy8qe+jBtj3GEaPdRSIVWSo4Ll8Rt93+D7REter2pF2X70PX2Ezeqez3Exz42hzAVISzjBUHuzcqTBcRSg1mvJ4Ms80YNcx+4jdtIGdrbw0yEKu82o=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=igalia.com; spf=pass smtp.mailfrom=igalia.com; dkim=pass (2048-bit key) header.d=igalia.com header.i=@igalia.com header.b=O7CYB3Ks; arc=none smtp.client-ip=213.97.179.56
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=igalia.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=igalia.com
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com;
s=20170329; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From:
References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To:
Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
List-Subscribe:List-Post:List-Owner:List-Archive;
bh=B02BrHbdgIss0dPNetAPZKJEyGmeDOjXRF/xIMFxZOM=; b=O7CYB3KsKEIXdt1ubyBxCuiVfh
BOTw+/wS846kP1BPAr07Jn3Lv1szyyNAF6+tX4RF12MD4aMWWm4ZwxlGz2E11lhhg23/Q/CKUTZq6
rx5bXu79EbBM9a5Ukygx88oeWGITC+P9ETlQO8bX+uab28CnaER5iS2oBgH+RPbL2Y62Hvj7O8v0y
p5QxIapGA+OBhx6G3GOP5/LzAcVHF2rWgQ/ZIRQE0vUpTu1ajgehsGvOMp5EBf6FwY5Jswf/n3we9
yytXgwVsc4pBIPMtrNNjgoXWiuffh3hdnRR6+DJFMRFoAGYLe/a1IDrnrktpH73erV99I7Y/0vOir
0GrN1pEQ==;
Received: from [37.209.163.134] (helo=[172.16.18.203])
by fanzine2.igalia.com with esmtpsa
(Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_128_GCM:128) (Exim)
id 1uMqhk-00HASL-04; Wed, 04 Jun 2025 18:11:04 +0200
Message-ID: <be23f55c-329c-444d-b5d8-83ae29b05387@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 18:11:02 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH 04/11] PM: EM: Add the infrastructure for command
processing.
To: Lukas Wunner <lukas@xxxxxxxxx>
Cc: lukasz.luba@xxxxxxx, rafael@xxxxxxxxxx, len.brown@xxxxxxxxx,
pavel@xxxxxxxxxx, christian.loehle@xxxxxxx, tj@xxxxxxxxxx,
kernel-dev@xxxxxxxxxx, linux-pm@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
References: <20250529001315.233492-1-changwoo@xxxxxxxxxx>
<20250529001315.233492-5-changwoo@xxxxxxxxxx> <aD4CrOmIwhUI-pet@xxxxxxxxx>
From: Changwoo Min <changwoo@xxxxxxxxxx>
Content-Language: en-US, ko-KR, en-US-large, ko
In-Reply-To: <aD4CrOmIwhUI-pet@xxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 6/2/25 04:59, Lukas Wunner wrote:
On Thu, May 29, 2025 at 09:13:08AM +0900, Changwoo Min wrote:
+static int em_genl_cmd_doit(struct sk_buff *skb, struct genl_info *info)
+{
+ struct param p = { .attrs = info->attrs };
+ struct sk_buff *msg;
+ void *hdr;
+ int cmd = info->genlhdr->cmd;
+ int ret = -EMSGSIZE;
+
+ msg = genlmsg_new(NLMSG_GOODSIZE, GFP_KERNEL);
+ if (!msg)
+ return -ENOMEM;
Just a heads-up, I know everyone recommends NLMSG_GOODSIZE but in reality
it's not that great because netlink_trim() reallocates the skb and copies
the entire linear buffer if it determines that the skb is half-empty.
Performance suffers as a result. So it's actually better to calculate
the exact message length prior to allocation.
Thank you, Lukas, for sharing the experience. I will address it in the
next version.
Regards,
Changwoo Min
Return-Path: <linux-kernel+bounces-673502-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 7DDFB41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:11:57 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 6E5A8188FECB
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:12:10 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id B024C1DDA34;
Wed, 4 Jun 2025 16:11:48 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="cDtRzrhR"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1D81F1A0730
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:11:45 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749053507; cv=none; b=fERug+zTi+YKfr/0C1hs8YOH1o6T1BCd3n8n2C/yWENF4VMOKFkQTCZV0XL2U0aT6eirwuX97wELhHbnACj13zu10GLKIYmKq1478xa3p+xwMJQsWBvVFwjWp1My9AWuT2AM8opIIiSlN5miZLmVp2AHtY4BRrBlMh3VJN8mCZA=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749053507; c=relaxed/simple;
bh=PEBRC6vyw7Zzr/Dx+RgU1IbBLuh5V9Aboc7E0pI4nxs=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=DfonipRcxzvKekNM7Hq5OvQgRqJl7Gk2J7C0Vrw2Pesnl1bNCvyHjR4kM0QWNMjgEU9Bqhc3wuQoFwjzrTSBfwRrHVCZfR0qLBbiSsqp3p+4u4uMYht5nKFwQMWVsjq+5vp4+MJALrDcze+yTHQkgdKphnmt+bA4j1pGffNVPxg=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=cDtRzrhR; arc=none smtp.client-ip=170.10.133.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749053505;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=DsR/Xi77gXaYpWGLoi6n+eLDE2ORizgb2ZfPz94+A/w=;
b=cDtRzrhRgFC4KxcIoxRz9lnT+Jxwmj/WilC8f+XwAMlAevGZ2/N1WScvRN6giE6170maZ8
3m+fyAx8X3Ac9z97oTO3Uo64lAvxo/rZoRliQwgPNvKBdDtZbZNSUdNDLXIxBYaKNmN/vR
8vr6vyNSPg0p0rpc+BCQRNx+VNCAyHo=
Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com
[209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-644-sckkTm1JMHCTcWJ2opdOHw-1; Wed, 04 Jun 2025 12:11:43 -0400
X-MC-Unique: sckkTm1JMHCTcWJ2opdOHw-1
X-Mimecast-MFC-AGG-ID: sckkTm1JMHCTcWJ2opdOHw_1749053503
Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-450d021b9b1so29638535e9.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 09:11:43 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749053502; x=1749658302;
h=content-transfer-encoding:in-reply-to:autocrypt:content-language
:from:references:cc:to:subject:user-agent:mime-version:date
:message-id:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=DsR/Xi77gXaYpWGLoi6n+eLDE2ORizgb2ZfPz94+A/w=;
b=V+BY4cDX3YNVaRYBQ8WQ3g+tUDl6q9Snhx+WVq1AzGdKSlnCWqb8kWx81ukjUX6044
CQPSDsZL10R/dySBzDpi4vCMVFDFJjI3lmUh35WLn8nhwthBpvAR6HHeReTvrE18XN35
A/ks6SOxYNp2G09NDYaF7vZuJyYrm05vYCMTn3VzD+BWARix+GBb3x9nRr6kdwT0ZEIT
B4nFqUAK+4RJIrrN6buKS8rmG5SMK+PflxM7iTbNqoGuqJh976UaMubVVzGX8X95HA6D
cTQGS+F8qEGdTPnjB+TvkNiwSh6KeDbYQxwpJCYsgQ5YZ2GD+AuRVCvUtYFs4DXQk3YE
HPsg==
X-Forwarded-Encrypted: i=1; AJvYcCUHsDBFhLXpvCX7sTZgPAyzpCLLyrSqf3i7Ps4PRpxTla/gHD9qYgwGonWhd4rvkvBHurxW2ARGw/NyPvQ=@vger.kernel.org
X-Gm-Message-State: AOJu0Yz27upnzu4//X7zJ46jo3XIYXoRLju99OxJ8nWLpzuK8r9qH/fy
ktEF/+IGU9TMMyJhCBRxnEefSrEKY+eEopwKSx49HtYBgc5dHDr369Foy5VuZ3d+ame1NtyTkis
mAoX2xJKuVFH9ddZFEBFlRmlTh01dxPl8lIZ6ekfqQiwySIsT34o6S49r7QyC0mcKKg==
X-Gm-Gg: ASbGncscg9rcv8V3U25X2QVEqR9eFdDIKyxhrot4t0w5JQitiTVbg3YaZmknneSHCYN
tZkTTJvfJvyp1usQwYG04XmnrP7Lk9Yf8HVa0wnFM70GCwsgRaV7RKk50KCCA3E0UeqOVCca2W2
/v8N3lQhu+OyG6fs0+zvcgJXCnQQEzRpvDgAT9qI9f4A3VICSXSqCDNhMHilcvgMOcyK2Wva0cW
4bqEemw6JR3jQrwoRxZ8i9HgvG7fkv+DITKzjCVvJqDngYAU71AEym3EZPKNkwVMKqWc62BKswQ
gegvqlszBmOPmg==
X-Received: by 2002:a05:600c:c84:b0:442:dc75:5625 with SMTP id 5b1f17b1804b1-451f0a64fc7mr31302355e9.5.1749053502622;
Wed, 04 Jun 2025 09:11:42 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IHteOnS0Gg77gqG4u7I26C//pPyu/v0qnnwsZvQ18MOxZ2BNEIuvk8lMeeyoo1HHYFxGcsk3A==
X-Received: by 2002:a05:600c:c84:b0:442:dc75:5625 with SMTP id 5b1f17b1804b1-451f0a64fc7mr31301905e9.5.1749053502227;
Wed, 04 Jun 2025 09:11:42 -0700 (PDT)
Received: from [192.168.10.81] ([151.49.64.79])
by smtp.googlemail.com with ESMTPSA id ffacd0b85a97d-3a4efe6c7e5sm22134216f8f.28.2025.06.04.09.11.41
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 09:11:41 -0700 (PDT)
Message-ID: <1392db34-0c37-49db-8ece-68c02ff3520d@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 18:11:40 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH 11/28] KVM: SVM: Add helpers for accessing MSR bitmap that
don't rely on offsets
To: Sean Christopherson <seanjc@xxxxxxxxxx>
Cc: kvm@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
Borislav Petkov <bp@xxxxxxxxx>, Xin Li <xin@xxxxxxxxx>,
Chao Gao <chao.gao@xxxxxxxxx>, Dapeng Mi <dapeng1.mi@xxxxxxxxxxxxxxx>
References: <20250529234013.3826933-1-seanjc@xxxxxxxxxx>
<20250529234013.3826933-12-seanjc@xxxxxxxxxx>
From: Paolo Bonzini <pbonzini@xxxxxxxxxx>
Content-Language: en-US
Autocrypt: addr=pbonzini@xxxxxxxxxx; keydata=
xsEhBFRCcBIBDqDGsz4K0zZun3jh+U6Z9wNGLKQ0kSFyjN38gMqU1SfP+TUNQepFHb/Gc0E2
CxXPkIBTvYY+ZPkoTh5xF9oS1jqI8iRLzouzF8yXs3QjQIZ2SfuCxSVwlV65jotcjD2FTN04
hVopm9llFijNZpVIOGUTqzM4U55sdsCcZUluWM6x4HSOdw5F5Utxfp1wOjD/v92Lrax0hjiX
DResHSt48q+8FrZzY+AUbkUS+Jm34qjswdrgsC5uxeVcLkBgWLmov2kMaMROT0YmFY6A3m1S
P/kXmHDXxhe23gKb3dgwxUTpENDBGcfEzrzilWueOeUWiOcWuFOed/C3SyijBx3Av/lbCsHU
Vx6pMycNTdzU1BuAroB+Y3mNEuW56Yd44jlInzG2UOwt9XjjdKkJZ1g0P9dwptwLEgTEd3Fo
UdhAQyRXGYO8oROiuh+RZ1lXp6AQ4ZjoyH8WLfTLf5g1EKCTc4C1sy1vQSdzIRu3rBIjAvnC
tGZADei1IExLqB3uzXKzZ1BZ+Z8hnt2og9hb7H0y8diYfEk2w3R7wEr+Ehk5NQsT2MPI2QBd
wEv1/Aj1DgUHZAHzG1QN9S8wNWQ6K9DqHZTBnI1hUlkp22zCSHK/6FwUCuYp1zcAEQEAAc0j
UGFvbG8gQm9uemluaSA8cGJvbnppbmlAcmVkaGF0LmNvbT7CwU0EEwECACMFAlRCcBICGwMH
CwkIBwMCAQYVCAIJCgsEFgIDAQIeAQIXgAAKCRB+FRAMzTZpsbceDp9IIN6BIA0Ol7MoB15E
11kRz/ewzryFY54tQlMnd4xxfH8MTQ/mm9I482YoSwPMdcWFAKnUX6Yo30tbLiNB8hzaHeRj
jx12K+ptqYbg+cevgOtbLAlL9kNgLLcsGqC2829jBCUTVeMSZDrzS97ole/YEez2qFpPnTV0
VrRWClWVfYh+JfzpXmgyhbkuwUxNFk421s4Ajp3d8nPPFUGgBG5HOxzkAm7xb1cjAuJ+oi/K
CHfkuN+fLZl/u3E/fw7vvOESApLU5o0icVXeakfSz0LsygEnekDbxPnE5af/9FEkXJD5EoYG
SEahaEtgNrR4qsyxyAGYgZlS70vkSSYJ+iT2rrwEiDlo31MzRo6Ba2FfHBSJ7lcYdPT7bbk9
AO3hlNMhNdUhoQv7M5HsnqZ6unvSHOKmReNaS9egAGdRN0/GPDWr9wroyJ65ZNQsHl9nXBqE
AukZNr5oJO5vxrYiAuuTSd6UI/xFkjtkzltG3mw5ao2bBpk/V/YuePrJsnPFHG7NhizrxttB
nTuOSCMo45pfHQ+XYd5K1+Cv/NzZFNWscm5htJ0HznY+oOsZvHTyGz3v91pn51dkRYN0otqr
bQ4tlFFuVjArBZcapSIe6NV8C4cEiSTOwE0EVEJx7gEIAMeHcVzuv2bp9HlWDp6+RkZe+vtl
KwAHplb/WH59j2wyG8V6i33+6MlSSJMOFnYUCCL77bucx9uImI5nX24PIlqT+zasVEEVGSRF
m8dgkcJDB7Tps0IkNrUi4yof3B3shR+vMY3i3Ip0e41zKx0CvlAhMOo6otaHmcxr35sWq1Jk
tLkbn3wG+fPQCVudJJECvVQ//UAthSSEklA50QtD2sBkmQ14ZryEyTHQ+E42K3j2IUmOLriF
dNr9NvE1QGmGyIcbw2NIVEBOK/GWxkS5+dmxM2iD4Jdaf2nSn3jlHjEXoPwpMs0KZsgdU0pP
JQzMUMwmB1wM8JxovFlPYrhNT9MAEQEAAcLBMwQYAQIACQUCVEJx7gIbDAAKCRB+FRAMzTZp
sadRDqCctLmYICZu4GSnie4lKXl+HqlLanpVMOoFNnWs9oRP47MbE2wv8OaYh5pNR9VVgyhD
OG0AU7oidG36OeUlrFDTfnPYYSF/mPCxHttosyt8O5kabxnIPv2URuAxDByz+iVbL+RjKaGM
GDph56ZTswlx75nZVtIukqzLAQ5fa8OALSGum0cFi4ptZUOhDNz1onz61klD6z3MODi0sBZN
Aj6guB2L/+2ZwElZEeRBERRd/uommlYuToAXfNRdUwrwl9gRMiA0WSyTb190zneRRDfpSK5d
usXnM/O+kr3Dm+Ui+UioPf6wgbn3T0o6I5BhVhs4h4hWmIW7iNhPjX1iybXfmb1gAFfjtHfL
xRUr64svXpyfJMScIQtBAm0ihWPltXkyITA92ngCmPdHa6M1hMh4RDX+Jf1fiWubzp1voAg0
JBrdmNZSQDz0iKmSrx8xkoXYfA3bgtFN8WJH2xgFL28XnqY4M6dLhJwV3z08tPSRqYFm4NMP
dRsn0/7oymhneL8RthIvjDDQ5ktUjMe8LtHr70OZE/TT88qvEdhiIVUogHdo4qBrk41+gGQh
b906Dudw5YhTJFU3nC6bbF2nrLlB4C/XSiH76ZvqzV0Z/cAMBo5NF/w=
In-Reply-To: <20250529234013.3826933-12-seanjc@xxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 5/30/25 01:39, Sean Christopherson wrote:
diff --git a/arch/x86/kvm/svm/svm.h b/arch/x86/kvm/svm/svm.h
index 47a36a9a7fe5..e432cd7a7889 100644
--- a/arch/x86/kvm/svm/svm.h
+++ b/arch/x86/kvm/svm/svm.h
@@ -628,6 +628,50 @@ static_assert(SVM_MSRS_PER_RANGE == 8192);
#define SVM_MSRPM_RANGE_1_BASE_MSR 0xc0000000
#define SVM_MSRPM_RANGE_2_BASE_MSR 0xc0010000
+#define SVM_MSRPM_FIRST_MSR(range_nr) \
+ (SVM_MSRPM_RANGE_## range_nr ##_BASE_MSR)
+#define SVM_MSRPM_LAST_MSR(range_nr) \
+ (SVM_MSRPM_RANGE_## range_nr ##_BASE_MSR + SVM_MSRS_PER_RANGE - 1)
+
+#define SVM_MSRPM_BIT_NR(range_nr, msr) \
+ (range_nr * SVM_MSRPM_BYTES_PER_RANGE * BITS_PER_BYTE + \
+ (msr - SVM_MSRPM_RANGE_## range_nr ##_BASE_MSR) * SVM_BITS_PER_MSR)
+
+#define SVM_MSRPM_SANITY_CHECK_BITS(range_nr) \
+static_assert(SVM_MSRPM_BIT_NR(range_nr, SVM_MSRPM_FIRST_MSR(range_nr) + 1) == \
+ range_nr * 2048 * 8 + 2); \
+static_assert(SVM_MSRPM_BIT_NR(range_nr, SVM_MSRPM_FIRST_MSR(range_nr) + 7) == \
+ range_nr * 2048 * 8 + 14);
+
+SVM_MSRPM_SANITY_CHECK_BITS(0);
+SVM_MSRPM_SANITY_CHECK_BITS(1);
+SVM_MSRPM_SANITY_CHECK_BITS(2);
Replying here for patches 11/25/26. None of this is needed, just write
a function like this:
static inline u32 svm_msr_bit(u32 msr)
{
u32 msr_base = msr & ~(SVM_MSRS_PER_RANGE - 1);
if (msr_base == SVM_MSRPM_RANGE_0_BASE_MSR)
return SVM_MSRPM_BIT_NR(0, msr);
if (msr_base == SVM_MSRPM_RANGE_1_BASE_MSR)
return SVM_MSRPM_BIT_NR(1, msr);
if (msr_base == SVM_MSRPM_RANGE_2_BASE_MSR)
return SVM_MSRPM_BIT_NR(2, msr);
return MSR_INVALID;
}
and you can throw away most of the other macros. For example:
+#define SVM_BUILD_MSR_BITMAP_CASE(bitmap, range_nr, msr, bitop, bit_rw) \
+ case SVM_MSRPM_FIRST_MSR(range_nr) ... SVM_MSRPM_LAST_MSR(range_nr): \
+ return bitop##_bit(SVM_MSRPM_BIT_NR(range_nr, msr) + bit_rw, bitmap);
... becomes a lot more lowercase:
static inline rtype svm_##action##_msr_bitmap_##access(
unsigned long *bitmap, u32 msr)
{
u32 bit = svm_msr_bit(msr);
if (bit == MSR_INVALID)
return true;
return bitop##_bit(bit + bit_rw, bitmap);
}
In patch 25, also, you just get
static u32 svm_msrpm_offset(u32 msr)
{
u32 bit = svm_msr_bit(msr);
if (bit == MSR_INVALID)
return MSR_INVALID;
return bit / BITS_PER_BYTE;
}
And you change everything to -EINVAL in patch 26 to kill MSR_INVALID.
Another nit...
+#define BUILD_SVM_MSR_BITMAP_HELPERS(ret_type, action, bitop) \
+ __BUILD_SVM_MSR_BITMAP_HELPER(ret_type, action, bitop, read, 0) \
+ __BUILD_SVM_MSR_BITMAP_HELPER(ret_type, action, bitop, write, 1)
+
+BUILD_SVM_MSR_BITMAP_HELPERS(bool, test, test)
+BUILD_SVM_MSR_BITMAP_HELPERS(void, clear, __clear)
+BUILD_SVM_MSR_BITMAP_HELPERS(void, set, __set)
Yes it's a bit duplication, but no need for the nesting, just do:
BUILD_SVM_MSR_BITMAP_HELPERS(bool, test, test, read, 0)
BUILD_SVM_MSR_BITMAP_HELPERS(bool, test, test, write, 1)
BUILD_SVM_MSR_BITMAP_HELPERS(void, clear, __clear, read, 0)
BUILD_SVM_MSR_BITMAP_HELPERS(void, clear, __clear, write, 1)
BUILD_SVM_MSR_BITMAP_HELPERS(void, set, __set, read, 0)
BUILD_SVM_MSR_BITMAP_HELPERS(void, set, __set, write, 1)
Otherwise, really nice.
Paolo
Return-Path: <linux-kernel+bounces-673503-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 59D3941E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:13:17 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 5F66A3A3FEC
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:12:55 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id CDAF71DD9AD;
Wed, 4 Jun 2025 16:13:08 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=ispras.ru header.i=@ispras.ru header.b="PZiEpIsE"
Received: from mail.ispras.ru (mail.ispras.ru [83.149.199.84])
(using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4746A146D6A;
Wed, 4 Jun 2025 16:13:03 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=83.149.199.84
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749053588; cv=none; b=CrkURoPMBuy5n3W9xnprAlBHYo4tp5DmIxhq+iI2h59F9u4E4aqLcxPlqpWIHev4pMHnd+h4bV+yBTqd4VBPU+/elVch/W3HMDEMzn7IEcnTum4PHU4wrBc+lVy+/J/VbaDmFBhH2m1jrfKwFCx9A6c+SDonp35efi9A2FnGCJ0=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749053588; c=relaxed/simple;
bh=fB2UD26wzMl1GY+lHaukD4lWmoYr5jXMlH+/ugTc4yE=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=b21t60lGt9bOJ8o+29VkYifc2WxKd/e8bsl5gOcGu1Bf0hDXOo5OCbSkmHhETbz8ifkd5NSVtxS6eIdiNQSslOtJLOLJhJJK7rQ7JA42qXyu35QTYGmeiyVh4HrU8PCQW9IFMDRDijyyrnak/W8Xg0TA6SWP+6gPrqsmNEoYdj8=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ispras.ru; spf=pass smtp.mailfrom=ispras.ru; dkim=pass (1024-bit key) header.d=ispras.ru header.i=@ispras.ru header.b=PZiEpIsE; arc=none smtp.client-ip=83.149.199.84
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ispras.ru
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ispras.ru
Received: from localhost (unknown [10.10.165.17])
by mail.ispras.ru (Postfix) with ESMTPSA id 56334407618E;
Wed, 4 Jun 2025 16:06:20 +0000 (UTC)
DKIM-Filter: OpenDKIM Filter v2.11.0 mail.ispras.ru 56334407618E
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ispras.ru;
s=default; t=1749053180;
bh=srOffEYPm8C2RDInEtO8Jo4/UKBSIM6ojmOSklDGXgU=;
h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
b=PZiEpIsEb7xdqrOCjwzC05dxDw8244WL9mulD7qcA8mUMlXD6msBCg+dZ0VwzeI3T
/vKpPi2gRrN+RPO6Wy8880JyQ4xr29xdBwbakhXRX/hytV0KMVhGkHzjpD5LQ2BD+N
Ayzxm2lT4eFr/FzS52MpwzhoGMr+WApOvRHf91IM=
Date: Wed, 4 Jun 2025 19:06:20 +0300
From: Fedor Pchelkin <pchelkin@xxxxxxxxx>
To: Ping-Ke Shih <pkshih@xxxxxxxxxxx>
Cc: Zong-Zhe Yang <kevin_yang@xxxxxxxxxxx>,
"linux-wireless@xxxxxxxxxxxxxxx" <linux-wireless@xxxxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>,
"lvc-project@xxxxxxxxxxxxxxxx" <lvc-project@xxxxxxxxxxxxxxxx>
Subject: Re: [PATCH rtw-next] wifi: rtw89: sar: drop assertion from
rtw89_sar_set_src()
Message-ID: <ose7mun3sogq2434ba6v7pnzgpctusmhdfk4x5khwk5qnwhyoz@4bfb4jcljrae>
References: <20250603152642.185672-1-pchelkin@xxxxxxxxx>
<aa24adf30a1e4944acefa4effff46dfd@xxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <aa24adf30a1e4944acefa4effff46dfd@xxxxxxxxxxx>
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, 04. Jun 01:28, Ping-Ke Shih wrote:
Fedor Pchelkin <pchelkin@xxxxxxxxx> wrote:
> Urgh, this one wasn't caught as my system doesn't have any SAR available
> from ACPI. But it would be falsely triggered, too. If I saw it earlier,
> I'd better prepared this as a followup patch in a series though..
>
Good catch.
There are two consumers. One is rtw89_apply_sar_acpi() which should not
assert wiphy_lock, but the other rtw89_apply_sar_common() can be. As I know,
the assertion is added for the latter one initially.
Another way is to assert the lock under condition of
test_bit(RTW89_FLAG_PROBE_DONE, rtwdev->flags)
Ok, thanks! So I'll fold this reworked patch and the other one [1] into
a series and send them out.
[1]: https://lore.kernel.org/linux-wireless/20250603144614.175003-1-pchelkin@xxxxxxxxx/
Return-Path: <linux-kernel+bounces-673504-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 1552941E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:14:07 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 8C66C189AE46
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:14:20 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 90BED1DE3DB;
Wed, 4 Jun 2025 16:13:57 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=ispras.ru header.i=@ispras.ru header.b="PgC3zLsc"
Received: from mail.ispras.ru (mail.ispras.ru [83.149.199.84])
(using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9398D1DB34B;
Wed, 4 Jun 2025 16:13:54 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=83.149.199.84
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749053636; cv=none; b=npvp1gHp6vA7LW0102uejCSrSToUO+ZMxHnpdkLrLn/gWYitRGvIaImlpPacHjW4qT/6TpDc+TjIE4XXSCPoAVe171+nctDhyYF8Cnro8XPQ2MfDn3xgsYFB91jG5s8kffsPzT+s8XHufjfWsMbLvNGWFlP9tjWv/W0HK/nyhVc=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749053636; c=relaxed/simple;
bh=gT9GBvOSDzBhGo5mZNNkNzJ98TDzw354ctI3xOd57PA=;
h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=HUNZhjkneOsRYbwFeNcv/x/O+ooM3YlQB2BXWwIAVe+DoTnOYHAm6sUaHwrG4xOxbaMgTUUFeoG/h8/rIY4PHJkC0/ptYDQhxMBHQOhnsraJqmT8DpTbl7V/2u8by5izO+QLtoh2UM8lyP52ooYeZCYwN/aRPOvbE/a6CVmcOTw=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ispras.ru; spf=pass smtp.mailfrom=ispras.ru; dkim=pass (1024-bit key) header.d=ispras.ru header.i=@ispras.ru header.b=PgC3zLsc; arc=none smtp.client-ip=83.149.199.84
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ispras.ru
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ispras.ru
Received: from fedora.intra.ispras.ru (unknown [10.10.165.17])
by mail.ispras.ru (Postfix) with ESMTPSA id 3DDB0407618E;
Wed, 4 Jun 2025 16:13:52 +0000 (UTC)
DKIM-Filter: OpenDKIM Filter v2.11.0 mail.ispras.ru 3DDB0407618E
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ispras.ru;
s=default; t=1749053632;
bh=nkt1L82aQ6GsktfVLB7qp2/gA1gCgwVjkKxLM6i0PJg=;
h=From:To:Cc:Subject:Date:From;
b=PgC3zLsc1Ouq2zG3taX0bUnQ8246aBUrrOOsRYI7YKW09WxsJBtAPzE3v5utZ1iW4
FZltqut5lZbVuxM1pzUl8VZDMYOpnObCp9KlzKiaJ3BqHgb9AzM2Ekc5H/UjPrk0a7
CIQ50KdDb/p1jKY+DcZDKk6MbJa/nlhusnlOB4DA=
From: Fedor Pchelkin <pchelkin@xxxxxxxxx>
To: Ping-Ke Shih <pkshih@xxxxxxxxxxx>
Cc: Fedor Pchelkin <pchelkin@xxxxxxxxx>,
Zong-Zhe Yang <kevin_yang@xxxxxxxxxxx>,
linux-wireless@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx,
lvc-project@xxxxxxxxxxxxxxxx
Subject: [PATCH rtw-next v2 1/2] wifi: rtw89: sar: drop lockdep assertion in rtw89_set_sar_from_acpi
Date: Wed, 4 Jun 2025 19:13:32 +0300
Message-ID: <20250604161339.119954-1-pchelkin@xxxxxxxxx>
X-Mailer: git-send-email 2.49.0
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
The following assertion is triggered on the rtw89 driver startup. It
looks meaningless to hold wiphy lock on the early init stage so drop the
assertion.
WARNING: CPU: 7 PID: 629 at drivers/net/wireless/realtek/rtw89/sar.c:502 rtw89_set_sar_from_acpi+0x365/0x4d0 [rtw89_core]
CPU: 7 UID: 0 PID: 629 Comm: (udev-worker) Not tainted 6.15.0+ #29 PREEMPT(lazy)
Hardware name: LENOVO 21D0/LNVNB161216, BIOS J6CN50WW 09/27/2024
RIP: 0010:rtw89_set_sar_from_acpi+0x365/0x4d0 [rtw89_core]
Call Trace:
<TASK>
rtw89_sar_init+0x68/0x2c0 [rtw89_core]
rtw89_core_init+0x188e/0x1e50 [rtw89_core]
rtw89_pci_probe+0x530/0xb50 [rtw89_pci]
local_pci_probe+0xd9/0x190
pci_call_probe+0x183/0x540
pci_device_probe+0x171/0x2c0
really_probe+0x1e1/0x890
__driver_probe_device+0x18c/0x390
driver_probe_device+0x4a/0x120
__driver_attach+0x1a0/0x530
bus_for_each_dev+0x10b/0x190
bus_add_driver+0x2eb/0x540
driver_register+0x1a3/0x3a0
do_one_initcall+0xd5/0x450
do_init_module+0x2cc/0x8f0
init_module_from_file+0xe1/0x150
idempotent_init_module+0x226/0x760
__x64_sys_finit_module+0xcd/0x150
do_syscall_64+0x94/0x380
entry_SYSCALL_64_after_hwframe+0x76/0x7e
Found by Linux Verification Center (linuxtesting.org).
Fixes: 88ca3107d2ce ("wifi: rtw89: sar: add skeleton for SAR configuration via ACPI")
Signed-off-by: Fedor Pchelkin <pchelkin@xxxxxxxxx>
---
v2: no changes
drivers/net/wireless/realtek/rtw89/sar.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtw89/sar.c b/drivers/net/wireless/realtek/rtw89/sar.c
index 517b66022f18..33a4b5c23fe7 100644
--- a/drivers/net/wireless/realtek/rtw89/sar.c
+++ b/drivers/net/wireless/realtek/rtw89/sar.c
@@ -499,8 +499,6 @@ static void rtw89_set_sar_from_acpi(struct rtw89_dev *rtwdev)
struct rtw89_sar_cfg_acpi *cfg;
int ret;
- lockdep_assert_wiphy(rtwdev->hw->wiphy);
-
cfg = kzalloc(sizeof(*cfg), GFP_KERNEL);
if (!cfg)
return;
--
2.49.0
Return-Path: <linux-kernel+bounces-673505-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 398F741E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:14:17 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 7042A173B92
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:14:18 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 168C31DFD96;
Wed, 4 Jun 2025 16:13:59 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=ispras.ru header.i=@ispras.ru header.b="RqWS4ZkC"
Received: from mail.ispras.ru (mail.ispras.ru [83.149.199.84])
(using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 21A021DD9AD;
Wed, 4 Jun 2025 16:13:55 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=83.149.199.84
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749053638; cv=none; b=jaf9lHj+nz4y+3Z6YB3V5dCrvEwqBMOXckix7ZM0J6ROCdl5eESHeZ685Cm/3j67A30N3O94CKc5rDMTrZzUXH0sDRkfFNRPItLSsG0BEWQ2gfxIxvvjhlOdL3lzTyVgUKFPkdyv9Tv6oeYYPHCDz4tTFrszuori57ElyteaO4U=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749053638; c=relaxed/simple;
bh=dar1UznmH1Dll183/KM4lYfwaULVTLS18BvAxxVcJ9A=;
h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version; b=C/4poRjflEvcY5P+OxUO34nvXLMoBjrmIU1znsq49KUe47/LZa8yDTGbVaoExOsaDlqxMIwFa+a10rY0NysFJxKTGlPjEyc8qj5pTHIyuXWcbeQeiVUxeIYK14W6mATbtPh/9JSdtRdcrD84JlaDAVHEvDmPbGKsAP2O5nQ5X18=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ispras.ru; spf=pass smtp.mailfrom=ispras.ru; dkim=pass (1024-bit key) header.d=ispras.ru header.i=@ispras.ru header.b=RqWS4ZkC; arc=none smtp.client-ip=83.149.199.84
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ispras.ru
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ispras.ru
Received: from fedora.intra.ispras.ru (unknown [10.10.165.17])
by mail.ispras.ru (Postfix) with ESMTPSA id 7F32E4076195;
Wed, 4 Jun 2025 16:13:53 +0000 (UTC)
DKIM-Filter: OpenDKIM Filter v2.11.0 mail.ispras.ru 7F32E4076195
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ispras.ru;
s=default; t=1749053633;
bh=4RFK3EPTWy73fhjq1/g3Bo8lLlasyD5LV4zIUsgviZg=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=RqWS4ZkC2JjCmSRWkLHLSeIZzr14ClDzg0TXia1k4TjEvTxMH+NP4RnmExQagQB9C
mc3Ajf1m+x2AK31/OmJFc7m8Qyy/6+O0SSTC8t2dYKiN13WL9280bN83wgB/ADoOpl
enqeo2ByGgErB1kYaN9Xm6rE/wr3lb1MTP6xwAPY=
From: Fedor Pchelkin <pchelkin@xxxxxxxxx>
To: Ping-Ke Shih <pkshih@xxxxxxxxxxx>
Cc: Fedor Pchelkin <pchelkin@xxxxxxxxx>,
Zong-Zhe Yang <kevin_yang@xxxxxxxxxxx>,
linux-wireless@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx,
lvc-project@xxxxxxxxxxxxxxxx
Subject: [PATCH rtw-next v2 2/2] wifi: rtw89: sar: do not assert wiphy lock held until probing is done
Date: Wed, 4 Jun 2025 19:13:33 +0300
Message-ID: <20250604161339.119954-2-pchelkin@xxxxxxxxx>
X-Mailer: git-send-email 2.49.0
In-Reply-To: <20250604161339.119954-1-pchelkin@xxxxxxxxx>
References: <20250604161339.119954-1-pchelkin@xxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
rtw89_sar_set_src() may be called at driver early init phase when
applying SAR configuration via ACPI. wiphy lock is not held there.
Since the assertion was initially added for rtw89_apply_sar_common() call
path and may be helpful for other places in future changes, keep it but
move it under RTW89_FLAG_PROBE_DONE test.
Found by Linux Verification Center (linuxtesting.org).
Fixes: 88ca3107d2ce ("wifi: rtw89: sar: add skeleton for SAR configuration via ACPI")
Signed-off-by: Fedor Pchelkin <pchelkin@xxxxxxxxx>
---
v2: move the assertion under RTW89_FLAG_PROBE_DONE test (Ping-Ke Shih);
add Fixes
drivers/net/wireless/realtek/rtw89/sar.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/realtek/rtw89/sar.c b/drivers/net/wireless/realtek/rtw89/sar.c
index 33a4b5c23fe7..7f568ffb3766 100644
--- a/drivers/net/wireless/realtek/rtw89/sar.c
+++ b/drivers/net/wireless/realtek/rtw89/sar.c
@@ -199,7 +199,8 @@ struct rtw89_sar_handler rtw89_sar_handlers[RTW89_SAR_SOURCE_NR] = {
typeof(_dev) _d = (_dev); \
BUILD_BUG_ON(!rtw89_sar_handlers[_s].descr_sar_source); \
BUILD_BUG_ON(!rtw89_sar_handlers[_s].query_sar_config); \
- lockdep_assert_wiphy(_d->hw->wiphy); \
+ if (test_bit(RTW89_FLAG_PROBE_DONE, _d->flags)) \
+ lockdep_assert_wiphy(_d->hw->wiphy); \
_d->sar._cfg_name = *(_cfg_data); \
_d->sar.src = _s; \
} while (0)
--
2.49.0
Return-Path: <linux-kernel+bounces-673506-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id B6F1241E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:14:39 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 81B437A4DAD
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:13:19 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 942F01DE4DB;
Wed, 4 Jun 2025 16:14:10 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=nutanix.com header.i=@nutanix.com header.b="y5c61R8n";
dkim=pass (2048-bit key) header.d=nutanix.com header.i=@nutanix.com header.b="NOeMsgvD"
Received: from mx0b-002c1b01.pphosted.com (mx0b-002c1b01.pphosted.com [148.163.155.12])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0C20E1DD9AD;
Wed, 4 Jun 2025 16:14:06 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=148.163.155.12
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749053649; cv=fail; b=uKF/sncp2mi+5EqtK8FwrS8mjGY5U4lQLqC8qbpG+l54pYqFMMVJ9lOoziy0Bqd3cbRs0vQqn5qm0SuepHEJKJXj27ViWleEHZTViE3g8Me6wa1BarQsy7t+CNwTCj5sbs6MSKlou3bQBnzVll4WuAl2Z8F14P5X0YEnvRySDJo=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749053649; c=relaxed/simple;
bh=UP6tlCvpTy5sEFqAOyJSqFwxhT7c/bLmUNmVVsNCMlo=;
h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To:
Content-Type:MIME-Version; b=ucbof6+0xfQ6hezrubwgB+aTfkiBPau/b9dGze2OawKl2THhZCzESvxd6IYgp9QXUYDG4hF2b5ZvKXm/bzpj0qQxR/1JSz60FEA/vHrSczKVT38FmALc+0qgeTOdvIpwQuWKtXIZMmI9WwsEhs1rTgzGCwIH8H9wqYNWgZa/UTI=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nutanix.com; spf=pass smtp.mailfrom=nutanix.com; dkim=pass (2048-bit key) header.d=nutanix.com header.i=@nutanix.com header.b=y5c61R8n; dkim=pass (2048-bit key) header.d=nutanix.com header.i=@nutanix.com header.b=NOeMsgvD; arc=fail smtp.client-ip=148.163.155.12
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nutanix.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nutanix.com
Received: from pps.filterd (m0127843.ppops.net [127.0.0.1])
by mx0b-002c1b01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 554C1UHp024982;
Wed, 4 Jun 2025 08:57:38 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nutanix.com; h=
cc:content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=
proofpoint20171006; bh=1xV75CvoLZTM3uQRrHrxZP7xw5k7EoMnnodfjlQAi
Ug=; b=y5c61R8nSQe7RzB2uMoU8MUB98c/5ql3BI3tDh258E/eY3NX5CsjudJuQ
wbfNJNM3AsycnCVCcQJ3ipVTpjJ3vGLDQFXoTXzYynyBP8VqjSuW0fJybhcuwzze
kuAHwgZ2weHOrq3YAWjbMP6K1ZEeZIBm54WSBMIVhJhTW3fGY71tt89DfY4FK3ov
P4rBNZu5iPOHlr7n/L099lzMJRDPJ47O3D1fdu3eFymmRGjvzeZaPri/Wa7mNV5z
24UM+Px6VDT+uqdAsliJD1MHkOV0eTJKw1OnENVY2zEHWBkMJ322uHxXNrDdaMLE
Y3cDairaWW3FB3Fpxc4A7KcRFFL2w==
Received: from ch4pr04cu002.outbound.protection.outlook.com (mail-northcentralusazon11023085.outbound.protection.outlook.com [40.107.201.85])
by mx0b-002c1b01.pphosted.com (PPS) with ESMTPS id 471g88nmqv-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 08:57:38 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=vUCJatttTBljeRLw7KSslxtvM/E1Py7YuKKAPHkfIr98005I/mFUZ0TLQdIZx0MibA5BpbDVD47XsBq3QYMBYtw9PpKLKvO59d2kkU7A0li3MLHMXlCBpfP8i9+MpsDfbSObR//rw+JCMue1alJ2zLpVfi0LWTEKxvgKz+8fLEM1lDTOz51nLcLPjTcTms9ndzhTuprWzihGPoRAOxiVHbmwQDskr4WCZhByu4MZrRn+RLhdmHH8zFaT5Uyi/F4rklhoQJISuXczkeZR3S+ZS5qsOu9aSqPMlcHNZA1IaxidMw7XYkj3f7ti9ohRvrqy2M5cW0665tuy8HZr+iCPMA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=1xV75CvoLZTM3uQRrHrxZP7xw5k7EoMnnodfjlQAiUg=;
b=H+3sHWWoq6LKnoC9Ywo40B4Uz78eLnJ0b96WtJa2FU7o5O8btSpN5VUqOKQ2AW3JYiMIrgzSaYiNLH4S6xGZUk0UQ8JRyCUCD77qs6xdGSaL5tARcdWIc/LPth8Lhm3tFa/bLuFViNnHnmVUvadoTPFH8uc0pkPen+nbRGdOeZLqUueQj2wbJ42a9BcT83zd2J5BUiU9b2PDGO5UlA63ZrVtLpof5HGjip72InUdWIpb4DD+ZGBh3hwrMSyX67PP8cLKdx2fbedZHvkLklo3dojye4pmzrq9zhkgy3PCcen6pgabayiTX8qxU/Jqzitd7pZmNx0ElrmtxKOJ0mE7Cw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=nutanix.com; dmarc=pass action=none header.from=nutanix.com;
dkim=pass header.d=nutanix.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nutanix.com;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=1xV75CvoLZTM3uQRrHrxZP7xw5k7EoMnnodfjlQAiUg=;
b=NOeMsgvDXb3yNtmy4lqnXDELybodaTMv0TP+YBPQ8B4MnExP7gsNNMTFP8CfLsoM9br1IQwrP/ktfLUUUS90R4225qr+FvZ6FjwB53EAMNYN6SCqxmPEm3nLKn0tT2zuKAVkzdSphkOhLw3OgDy+6vyFpVY4GviojWBmY77ookuGsOSNJSyHlKRkRo7JDP0JwNZBzeKBr2/EjH6eWXzGF0uADLIHrFrHa/h5N0rn0alRtqCuy/xJNV02qAyhUM692Q1164TFqD6xIDGjp3BJcan6ItwQIuaecQsA/5HX+JQPt/zDBm2Lg/er2gFfUJxYYbfsyrIweLDamcxeC0c60A==
Received: from DS0PR02MB9101.namprd02.prod.outlook.com (2603:10b6:8:137::22)
by MN2PR02MB7008.namprd02.prod.outlook.com (2603:10b6:208:201::9) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8813.19; Wed, 4 Jun
2025 15:57:35 +0000
Received: from DS0PR02MB9101.namprd02.prod.outlook.com
([fe80::ca92:757d:a9c6:6ca3]) by DS0PR02MB9101.namprd02.prod.outlook.com
([fe80::ca92:757d:a9c6:6ca3%6]) with mapi id 15.20.8813.018; Wed, 4 Jun 2025
15:57:35 +0000
Message-ID: <0ed1eec4-512a-4831-a9be-8ad8bd00fcf1@xxxxxxxxxxx>
Date: Wed, 4 Jun 2025 16:57:31 +0100
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH] KVM: x86/mmu: Exempt nested EPT page tables from !USER,
CR0.WP=0 logic
To: Sean Christopherson <seanjc@xxxxxxxxxx>
Cc: kvm@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
Jon Kohler <jon@xxxxxxxxxxx>, Paolo Bonzini <pbonzini@xxxxxxxxxx>
References: <20250602234851.54573-1-seanjc@xxxxxxxxxx>
Content-Language: en-US
From: Sergey Dyasli <sergey.dyasli@xxxxxxxxxxx>
In-Reply-To: <20250602234851.54573-1-seanjc@xxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-ClientProxiedBy: PH8P221CA0062.NAMP221.PROD.OUTLOOK.COM
(2603:10b6:510:349::14) To DS0PR02MB9101.namprd02.prod.outlook.com
(2603:10b6:8:137::22)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: DS0PR02MB9101:EE_|MN2PR02MB7008:EE_
X-MS-Office365-Filtering-Correlation-Id: 494be67a-ac22-42ed-8517-08dda38085a1
x-proofpoint-crosstenant: true
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|366016|7053199007;
X-Microsoft-Antispam-Message-Info:
=?utf-8?B?YlpIc2VpVmpKNXk3bHVJN3hjY1pUdVpIZDRWQVZaQlpobU1ONkhheVJVUCtB?=
=?utf-8?B?Tk8zZXRKakZIbTJ4ZDNvMjlLcXROQ0F3M3E5Mm90Y2I3WW9pcGlPbVZkU3Vz?=
=?utf-8?B?ejJhd3ZCaktveXFMMWloSG1RT1BxNUliVXk4eFlCZ2NaaWJlMjRvb1lrbnk4?=
=?utf-8?B?L2hFcWNJVG9ERk0rdTdYcEtVZWJieVZsMGNxb0xqN05WaFFLZnE2RlVIcEJE?=
=?utf-8?B?ZHk2eFdKSE1rVnN0b2lDZE1tR2tuTWZYQ081ZnB2ODRlQkFUcW1ZaHBjYmRZ?=
=?utf-8?B?Y1FTQ0NmNGVtMEN0dEpLeVlrUXNtOW43WU51T2JoWTdCcGU1WEFyRHNRODRV?=
=?utf-8?B?N2F5Uk0xTVhKc3ZCcEZyUHZlQ204Ykcyb2FnTUdUUEVZUFAySXVXM2JMUmZV?=
=?utf-8?B?dHhlRHR3d05IZkh2MGt2SURaVTFkeFM2L3BCS2RwYkRLWVQxa3VweDBjWUhZ?=
=?utf-8?B?RzlkRTBrMlNrYlhZbHlFaFJQU3gxZ096cDZTNm1lcStGcHFMRCtOcnhNLytE?=
=?utf-8?B?eVU1cGNIMmlGNjRjaVpmdDBSYXJtdnlGWjVUMWR3c0o2OVl6dTZ4Tzc2QUNm?=
=?utf-8?B?cUVaSFJXRzI3NDhsUVZQWU4wcHFjaUkrUmMrSUZ2SHBFekhzYk03V2pVUzFZ?=
=?utf-8?B?SVNkSkU4Q29qd1Z5aG02c0tZbkxZR2ZhdUh5NmxBd0hiU2IyWTJ6bVBGMGFo?=
=?utf-8?B?a3JDRkk4SkxRUUowSHVqMjJrQ3NVdzFDQXQ5b2lJOE1LUnY4Wk1VWVBEcGhx?=
=?utf-8?B?bTF1NnB6M052WDlXNSs5TGx5MTg1Qzk4dGttVmcyREd6S0tjTHVuTUhYWXM0?=
=?utf-8?B?QlFHcDZ0UDJaMnROZWFPVWdxaXRDNjlieXNXcTBrbzFNNWNLckxLQVpvcVho?=
=?utf-8?B?V21mNzBDOUVRNFBYZWt0VmpwNHZuRUY4Ym9Gb01Xa2VaQkVBTXVxZkFxYUY3?=
=?utf-8?B?MkpydnN6QkQ4cnpwUmNlSnJnY0d2dUcyNHUwN09EYVJ1VEVSR2d6a0xQM0ZF?=
=?utf-8?B?dEVGdVh1NFl4WmphNEx2R3Y4OUFPL3NsRnVVdG1vQk5pdzNFcUxuSWVPRDRL?=
=?utf-8?B?eU0rTFgxN1lxSmc1bTVmMHdVeGkzQ0xrVHlYZ1RlS291VXZyTXVkNXQ0OWdr?=
=?utf-8?B?MzZNM09ueWFpNDU3dzJDbkIvbVdHZFNIYlFUY3l5Ukt6NmIvdHJVcXRQR0wz?=
=?utf-8?B?cXVTR3EyOVZvQ2VwMmNUaXFFSFpIcTZVV050R2ovZ0NRekJINGVDbkpaYXBK?=
=?utf-8?B?TThjMnE1bnlqa2h3czY2NzlyK1d0WlhuUWY2UFVwZkhuRllkOXJmUU83UkFN?=
=?utf-8?B?VUFlaVhqYkJKRXJQUzRhM3dnRE94M1RuL2ZnVzE5VEtFQTJ3dElzMEpudHhx?=
=?utf-8?B?bkZkY1ljRkdESjNjdHR4REQxQk1HQ3FuaVlRREo0STlhajZTZUtSOGo2MXVR?=
=?utf-8?B?ckRKM01STWgzSCtFUTNpekMvRDRiQjd3UzJoYWVnaHVyZUdSK3paQ1pnc0NI?=
=?utf-8?B?M0NGalFBM1ZISkY1Zjl1K3FzWFh1dVpCSWZRRnhhbWJNenFDMkg0K0pIeGRI?=
=?utf-8?B?WFZCTHdGWHJRSjJkRmx0RmQweklXcis2RlRxczVIV1M0dTBhOUtEZGs2UEJa?=
=?utf-8?B?dGxkcjA1VVB1b2FwV0M1emdST1BFdTMrMEltcVAvK0lwNE9sK21QNzdieVBq?=
=?utf-8?B?NGVLb28veUloQUhMN1M3WVd1R1FCd0N6M1pDWE1QcGV4a3Y1YkdxSTdydVps?=
=?utf-8?B?VERqYm1DRmVPL1kxSzFlVWx4OHBMQlpUcXVDcXZMSmVDVUFRUVpyOEhMM1I1?=
=?utf-8?B?b25KU3d5bjhSODNpYVE5Tit0WDlPbHNlTEFWTytGOUtCUUd6RGh6ZU8wNTJS?=
=?utf-8?B?OGVhTzNReTdOaTMwMTlDTDVxREx3L0J4blVlMWRpNUE4Um5Kd2xMWlpIbFY5?=
=?utf-8?Q?+UIiuomxgAY=3D?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS0PR02MB9101.namprd02.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(376014)(366016)(7053199007);DIR:OUT;SFP:1102;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?utf-8?B?a1ZjSW9EMldJMXJCYnBiaFBGQ1ZuVllkUzdtOHZxZTV3ZW1pb0w2MFNpTWF5?=
=?utf-8?B?VUZvakFSZjVyOUlqbzNGMTNRSlljMStpcG9NdHRYWjJYK1JCVTdUMjZ0cDQ4?=
=?utf-8?B?SDdweHcwRVh1eFdRVEpTUHBCS2dEcytUUk9SWDB4NGlBZ0R0azlHc3AxUFdQ?=
=?utf-8?B?SVdIeTBOUUFndlljVzBwTVliakJDVkdabmhVUDlCRDgzZ0h5RWpqdEt5bWJj?=
=?utf-8?B?WW51U3BvbEFTZFduaVdWT0JUUkJ6RnI5UEEveVVwTkl3aXMvN2VZbGczUzBs?=
=?utf-8?B?ZGk3bERMeHZGelFtMW0zM0s5MWxKVjlWY1Uxb1VtV0dsMFBUOU9MVWhTcm1S?=
=?utf-8?B?aGZKbjN1b2haeTdRWVYwdjBObmw0VnZsYWtRby9oVE40M0xRMG9PY0dnUTlZ?=
=?utf-8?B?ZFRoVXowQ1JMYWVQRlM2SWlOV3BjOHBhVzNieHFXZHoyeEpDZGtoS0lia241?=
=?utf-8?B?OTdrWTNPa0QrNjMxTTE4UHlPV1Vqdm9Pb09QVWYzVythd043VTcwd2NVT3pF?=
=?utf-8?B?VnFLTWNadm1qVis3dDRJM0dnTlZXamVzdms1OU5GWDQ5N1dCalRMN25zd29H?=
=?utf-8?B?UXZKUnV0RU9SOTYwdVJuOE9YZXJheFhhTDRKa3EzZjNvUm1ETXhweG1lOGlj?=
=?utf-8?B?YXVYRjBDc2tVV2JXSTZyV2FMY2ltc1VqZEZqUlpuM0tla1JZck40bEp0eXM3?=
=?utf-8?B?UVBHZ2JrZjBNRC91czhlN3VhSEwvajlLcklpNW1Edk51eFJ6U1c4WHdjamJL?=
=?utf-8?B?TjNDM0h0aVJUOVhTOUlIeDZoZ1hJYUZYN2xTMVVUOC9KckNwTDJuOGlNcWZJ?=
=?utf-8?B?Ulp0VTlJaDdScFNSaFZodmQ1Wmx6TkZKdVAxK1d0TUFJYWRrYVY4TFVoYlNr?=
=?utf-8?B?UnE1N0NlMHJRNE9qaExKbUZ5VE50NWFJTHArQTFTZ3luNTJRYjI0Zno4Vm8y?=
=?utf-8?B?L0h4S0FFZXkvYk9lT0RoMHBDdXFyS0hiWTRBTVdKZjNjTXU2KzhudGYrNUFL?=
=?utf-8?B?RmJTOGJnbTJETVlsYm9vSnpzeW5EYmh4QTBZa09qT01RRWd6Uy8xdTJ6eGp4?=
=?utf-8?B?REVRQVRkUVZBb3hmclUzNko5L3pPWGtHbTQ1VkVreStsTmJKcnJSalRMNjBN?=
=?utf-8?B?bEZwUXAyWHRDdEJOTjE4QnMrOGZwNTJlQXcxTHg2UWVNbk83K1JtdEdZSFVC?=
=?utf-8?B?NjF2WDBLZUprcDh2V1VvS0tpcUxla0RjMUpQNU1CZEExcE80QWhjNFFXUzJW?=
=?utf-8?B?cDRZTWlVNjM5eC9pVkliNHBYdTZsN2FsKzRjYml3djd5eXI2V1NlWkxKN1lt?=
=?utf-8?B?SGNaZll0Tm9kdnoyR040dFFBckpqdGNWWFJVczlTVHFqbzBrNWN0ODBwUGNi?=
=?utf-8?B?RE82QS9CNnBOc2Jkb240cFM2dUloRGYxTkFPOUVqWUJJS3R4UWFZN2N0aHZZ?=
=?utf-8?B?MGg1aDRBSWZzN3Era3NjaFpWTnprc2V3K0lNYVBvOTk0ZUJIcW1PZ2xWUHlZ?=
=?utf-8?B?V3g1eXVLNUlEbUozSTFrdmVRMGtYUW1aSDU3RkJDa1RnaWhWRkorR2ZIbWg2?=
=?utf-8?B?cG5yWCt2TVVVQUhvVm1XakRIVmgyb0M4WTFiRkF4UzRPWVhER3V3aEZqSlB5?=
=?utf-8?B?OU5zRUZlWlVrTWpnS21EejYrU0hZdnEwN0dCQmxZOHVWaWtGTW5pMEFpaGFQ?=
=?utf-8?B?TGF6ZVUrejNsWGVnWHpaZU5TajhBa3lteHl2ZzIrQTZWV1pYRExGV3FlTDdL?=
=?utf-8?B?czY0amlhWklUbHpscEQxVzFXWmg4MnBVOUZ3Q2w2SEtDOHVGN05vS0dHTDVU?=
=?utf-8?B?N2ZBQjVqazhIZnlXdGRHZ1gvdjZPZEFXd0F6cEJ3YzlNeUlIdmtwZjU2ZkZz?=
=?utf-8?B?UXNnU011MTl0THJTUUM4TElnVE42cGlNT2tsclJtUkxMZ0ZOdUE0MjBMY0to?=
=?utf-8?B?UllRK2wzbEFSMU5CK2hoUUloeUEzQ0VydWdQeC91dE05M0VTSlc5MVU0cHRF?=
=?utf-8?B?cXJObElnNDJrL0IvazhJVVlhcEZKODZYNzNocThOM21XaUMwWjhOa3kxL2Jy?=
=?utf-8?B?elF1OUR3d254NkVhV0tvU3JRZ1pMSmZoVml0K2lLYi9lYXF4djIxemFDdzNw?=
=?utf-8?B?eE0xRHMwU3hpRFNiVVlyN1p0NlFGMk5PTk5vSDg5eVE1MEJrbGtzalNQYmpy?=
=?utf-8?B?N0E9PQ==?=
X-OriginatorOrg: nutanix.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 494be67a-ac22-42ed-8517-08dda38085a1
X-MS-Exchange-CrossTenant-AuthSource: DS0PR02MB9101.namprd02.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 15:57:35.2466
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: bb047546-786f-4de1-bd75-24e5b6f79043
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: vEfrOAQOYoRUHOwh1JEMWufzqbb+hREaT7ba2MM3v0GwgCQ3yJElDylQve2qHD2oJcV9CKGYn16A0OG6GNzWBnvxkvtd/SMpGZ3FTQMUsFw=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR02MB7008
X-Authority-Analysis: v=2.4 cv=K5kiHzWI c=1 sm=1 tr=0 ts=68406cf2 cx=c_pps a=hLZKniPSsdZe/G0VmHakBw==:117 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19 a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19
a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10 a=0kUYKlekyDsA:10 a=64Cc0HZtAAAA:8 a=1XWaLZrsAAAA:8 a=I1SYLbdxCI6kIEYJAuMA:9 a=QEXdDO2ut3YA:10
X-Proofpoint-ORIG-GUID: EROlx7gofjMnoU7lwvZZAJBnZ6zg6EXD
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDEyMSBTYWx0ZWRfX5ooS4clchWYw XACjyQxzLTWER4fsrYGmd8QYZdzZjfvdjD3OxOXCmZmrPBrNhIj4Siq5VD2YycWRK7k+Vu7jd8V a3ZOOvtxbTGEKbIbWY6QsaeBdhnGAxy/sYFm2wKF8aBXJsZizKYQupPzqjcLKfCCxqDZ7iO1nIk
iO2+d2W1OBqUrrQnn80rOuZ7YDFss4OxZCLw8ldCU5HnoC9zhJCFYAJXMDxf+tlo51EzzH4seME 6BsAsaDjn1iNZME1PWs2Ea+QGHVncAdtmVAvDHYxR/AvYybfv6nsjbj1vpvrPk05SSyfqusUy9i QLQE8fNyFk6JtnBIKibxXb4GsE5p13xmQaADGtr3l4mEsvobGMXSBIUVCtm1X236q50YOEQEzmF
9XpTQFnjG/TeUyjT2JvxsXPvgl3oFFgW1wVRBLJ6ZxNvmNVhWcxVd0Z9ftu7o5R5OJaDwNDO
X-Proofpoint-GUID: EROlx7gofjMnoU7lwvZZAJBnZ6zg6EXD
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Reason: safe
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 03/06/2025 00:48, Sean Christopherson wrote:
Exempt nested EPT shadow pages tables from the CR0.WP=0 handling of
supervisor writes, as EPT doesn't have a U/S bit and isn't affected by
CR0.WP (or CR4.SMEP in the exception to the exception).
Opportunistically refresh the comment to explain what KVM is doing, as
the only record of why KVM shoves in WRITE and drops USER is buried in
years-old changelogs.
Cc: Jon Kohler <jon@xxxxxxxxxxx>
Cc: Sergey Dyasli <sergey.dyasli@xxxxxxxxxxx>
Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
Thank you for the patch, LGTM.
Reviewed-by: Sergey Dyasli <sergey.dyasli@xxxxxxxxxxx>
Sergey
Return-Path: <linux-kernel+bounces-673507-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 354BF41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:16:25 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 1F88E3A40EB
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:16:03 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 289CE1DE2CD;
Wed, 4 Jun 2025 16:16:17 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="JW3s5E4w";
dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="GiDYZjk3";
dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="qvVMw7e2";
dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Ib421YMQ"
Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id B8CB342AA9
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:16:14 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749053776; cv=none; b=WLkhLXvSMBhEtguIHVrya+lyLNARWl25hluhyXkyIfV37/PT6sckayq4yln2RGRBRvnz8SowqZ/NEfU3rqHdU1iPbg9PDMzP02HzuOd9uuupRFBCsKZcwTKIctT0kCFv50r/zf8djj5MkEiNvCA9QuWq19jQk4UEa9sd4CSoxBE=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749053776; c=relaxed/simple;
bh=weHQwns0gJTioruMnZ6e+lbjxPJy1R3/J0uJNHbei/Y=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=GfSFVsSwbPyxs3F4ds1nQB8V4MO6P+tXxKSW+1kfQPBFYCYHdjKX99yBO5bIBXkm9Yj8Mz8XMhji1408VHYBmUV3cnjZbOeNvkK1l10RXuy26FiGYlK8M6q6bU6aXYxJbLsJl/Z1KsrW7ArXZdfXZXmo9w+S8v0JseDrGbOMu3g=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=JW3s5E4w; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=GiDYZjk3; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=qvVMw7e2; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=Ib421YMQ; arc=none smtp.client-ip=195.135.223.131
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de
Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(No client certificate requested)
by smtp-out2.suse.de (Postfix) with ESMTPS id DEB912033D;
Wed, 4 Jun 2025 16:16:12 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa;
t=1749053773; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references;
bh=YmdkHicZ9vMglOkN9sId8WADOZ0AiEKxD+HKkXswifw=;
b=JW3s5E4w/Lq8bnMW7jFK4SnNpKvFd6SXiT2E5iKZJSsFk75BrW0vJSwSpL+o9geysesFIf
8saaOt3PhJj/bYi16+BZ2p1pDIfcTU8d1K2D3QaLnzWK5VPGEC1BnBxbqzedDmyKkKumrP
fdkwgF/NfXZ7iHY5+9MW07K1gZkegVY=
DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de;
s=susede2_ed25519; t=1749053773;
h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references;
bh=YmdkHicZ9vMglOkN9sId8WADOZ0AiEKxD+HKkXswifw=;
b=GiDYZjk3W/3b75T4+UMWn/ckf3lpcrUELe7rDdgSyeE4QJz59fduZu9ndYMV0lTLB5KTTg
Bmea3lFDHcTYpoDw==
Authentication-Results: smtp-out2.suse.de;
dkim=pass header.d=suse.de header.s=susede2_rsa header.b=qvVMw7e2;
dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=Ib421YMQ
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa;
t=1749053772; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references;
bh=YmdkHicZ9vMglOkN9sId8WADOZ0AiEKxD+HKkXswifw=;
b=qvVMw7e2XoaVcUE2le8pfxYUhFk5XJfc1fLEqRPChbEQ2ko9L3bWU7sSua9U3yYkZChYj8
FNONXjiWXRwXRKKeKdoHyUTZKRyxn09x4R/J2yhO1uyyB3090bijaEwEhX+tbGjTrOH3Op
xYOYUD2e1+7+hOltBZXxlfOYTr16prI=
DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de;
s=susede2_ed25519; t=1749053772;
h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references;
bh=YmdkHicZ9vMglOkN9sId8WADOZ0AiEKxD+HKkXswifw=;
b=Ib421YMQE2vfLRFvp8nrk30gIIOH/ThJCJEgYSbQgQYBc+TNJ5/X5OaqRLUMRx9BRpn374
J2mCcWDj3aWdxTBA==
Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(No client certificate requested)
by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 1D13C13A63;
Wed, 4 Jun 2025 16:16:12 +0000 (UTC)
Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167])
by imap1.dmz-prg2.suse.org with ESMTPSA
id GNQYBExxQGhiIAAAD6G6ig
(envelope-from <pfalcato@xxxxxxx>); Wed, 04 Jun 2025 16:16:12 +0000
Date: Wed, 4 Jun 2025 17:16:10 +0100
From: Pedro Falcato <pfalcato@xxxxxxx>
To: Jann Horn <jannh@xxxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
David Hildenbrand <david@xxxxxxxxxx>, Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>, Vlastimil Babka <vbabka@xxxxxxx>,
Mike Rapoport <rppt@xxxxxxxxxx>, Suren Baghdasaryan <surenb@xxxxxxxxxx>,
Michal Hocko <mhocko@xxxxxxxx>, linux-mm@xxxxxxxxx, Peter Xu <peterx@xxxxxxxxxx>,
linux-kernel@xxxxxxxxxxxxxxx, stable@xxxxxxxxxxxxxxx
Subject: Re: [PATCH 1/2] mm/memory: ensure fork child sees coherent memory
snapshot
Message-ID: <gm6gm4hmojfhgwjgyzxfzxjlr7yz2gtkspdocsufzxydyfc4ri@n5iynjdpoe33>
References: <20250603-fork-tearing-v1-0-a7f64b7cfc96@xxxxxxxxxx>
<20250603-fork-tearing-v1-1-a7f64b7cfc96@xxxxxxxxxx>
<t5uqs6kbzmcl2sjplxa5tqy6luinuysi7lfimbademagop7323@gveunpi3eqyo>
<CAG48ez29awjpSXnupQGyxCLoLds72QcYtbhmkAyLT2dCqFzA5Q@xxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <CAG48ez29awjpSXnupQGyxCLoLds72QcYtbhmkAyLT2dCqFzA5Q@xxxxxxxxxxxxxx>
X-Rspamd-Server: rspamd2.dmz-prg2.suse.org
X-Rspamd-Queue-Id: DEB912033D
X-Rspamd-Action: no action
X-Spamd-Result: default: False [-1.61 / 50.00];
BAYES_HAM(-3.00)[100.00%];
NEURAL_SPAM_SHORT(2.20)[0.733];
NEURAL_HAM_LONG(-1.00)[-1.000];
MID_RHS_NOT_FQDN(0.50)[];
R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519];
MIME_GOOD(-0.10)[text/plain];
MX_GOOD(-0.01)[];
RCVD_VIA_SMTP_AUTH(0.00)[];
ARC_NA(0.00)[];
MIME_TRACE(0.00)[0:+];
MISSING_XM_UA(0.00)[];
TO_DN_SOME(0.00)[];
RCPT_COUNT_TWELVE(0.00)[13];
RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received];
RCVD_TLS_ALL(0.00)[];
DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519];
FROM_EQ_ENVFROM(0.00)[];
FROM_HAS_DN(0.00)[];
FUZZY_BLOCKED(0.00)[rspamd.com];
RCVD_COUNT_TWO(0.00)[2];
TO_MATCH_ENVRCPT_ALL(0.00)[];
DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:dkim,suse.de:email,imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo];
DKIM_TRACE(0.00)[suse.de:+]
X-Spam-Score: -1.61
X-Spam-Level:
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 05:41:47PM +0200, Jann Horn wrote:
On Tue, Jun 3, 2025 at 10:32 PM Pedro Falcato <pfalcato@xxxxxxx> wrote:
> On Tue, Jun 03, 2025 at 08:21:02PM +0200, Jann Horn wrote:
> > When fork() encounters possibly-pinned pages, those pages are immediately
> > copied instead of just marking PTEs to make CoW happen later. If the parent
> > is multithreaded, this can cause the child to see memory contents that are
> > inconsistent in multiple ways:
> >
> > 1. We are copying the contents of a page with a memcpy() while userspace
> > may be writing to it. This can cause the resulting data in the child to
> > be inconsistent.
>
> This is an interesting problem, but we'll get to it later.
>
> > 2. After we've copied this page, future writes to other pages may
> > continue to be visible to the child while future writes to this page are
> > no longer visible to the child.
> >
>
> Yes, and this is not fixable. It's also a problem for the regular write-protect
> pte path where inevitably only a part of the address space will be write-protected.
I don't understand what you mean by "inevitably only a part of the
address space will be write-protected". Are you talking about how
shared pages are kept shared between parent in child? Or are you
talking about how there is a point in time at which part of the
address space is write-protected while another part is not yet
write-protected? In that case: Yes, that can happen, but that's not a
problem.
> This would only be fixable if e.g we suspended every thread on a multi-threaded fork.
No, I think it is fine to keep threads running in parallel on a
multi-threaded fork as long as all the writes they do are guaranteed
to also be observable in the child. Such writes are no different from
writes performed before fork().
It would only get problematic if something in the parent first wrote
to page A, which has already been copied to the child (so the child no
longer sees the write) and then wrote to page B, which is CoWed (so
the child would see the write). I prevent this scenario by effectively
suspending the thread that tries to write to page A until the fork is
over (by making it block on the mmap lock in the fault handling path).
Ah yes, I see my mistake - we write lock all VMAs as we dup them, so
the problem I described can't happen. Thanks for the explanation :)
--
Pedro
Return-Path: <linux-kernel+bounces-673508-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 08DA341E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:16:39 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id A061A189B497
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:16:52 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 1F5951DE3CB;
Wed, 4 Jun 2025 16:16:28 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="UGutifWO"
Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2082.outbound.protection.outlook.com [40.107.92.82])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 78908339A1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:16:25 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.92.82
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749053787; cv=fail; b=PH4ZjgiV0pHTIuyeEyc44P6f+oScgSLbGB6bJ6FyUffimDeYKWbSvqjr/V5yuMHBqd6XISO9nhWCkbo/cvmLx4d7pF4x3xZEBxE0VbepotQjy8HuEd/ZH9q+eUmDN+cLpmtQANit3oR1LMlNrUerk1UKUSBP3UOtHtqHGyf+TrI=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749053787; c=relaxed/simple;
bh=USfJuYM9dRU7iG77RUpC0Hm3coLzmOLl3ktUGw0MEsQ=;
h=Message-ID:Date:Subject:To:References:From:In-Reply-To:
Content-Type:MIME-Version; b=X4arQZtS1qzF0yaRNB0qQZ1g5TZxUMiyljlmayvUbZvlcpnJYTGV046naPkJ1FMRd6tQfDoqDRoc7Zpf69FFjq7kFcdo8Z6umSuU4XmVpKnM4hp4dfMCUBMa56hjQ3p90wJltWlMHHsNF72+PzlxGATTTQTF4ycDZA/ya4kb5Hg=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=UGutifWO; arc=fail smtp.client-ip=40.107.92.82
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com
Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=x8bZ/t92FSoUF7lGf+390WJAvpM39s2s+wyXHAib689DUe6ivkgYZiHbbJotiwwlq3/bEbMH1yuP6Ml3Kve0zRw9njw3hAnTU94T+zQXbW459Sb/1/d3lsU2cTAQegoZpq29s/byYMrOf2xSwytsVqpJcAEbggs87ZRleI6e83143j4l3mCNYRPw51YvpUjYE+3CSd92gZh/6iP93BnZpnaOYwNS9H0Uoqh11RDA2T0ScpQC8s0LIweUQdF4mOIUs5RchiPKuUqPsRyw2Zee6RyFqvblske0T05Nmwt/WSu7HheJlRslOgDv8aGQr6H9AJq/tAK+5AbR1BQ1AaRA5g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=UtEJOoCK5XOWa3zUVY2KraHUJcWk8fEzPHPiSC7r29s=;
b=XGwBKzlaixNuTOT1NWJOPVj+vP0dKF1SFCR81/B4ISn24Kbi9EJ6cAqH3I9hunp/foPH/Pgn2ngwcb7ZNGcOCg+r0AvikRvHjU2nOp4/ODl/NUso4nOmkBA1PCuRQEDQVm0KN4ccG37GntRWlvd9QBK0W85yehwwKMLz07Py1eWbXYhqE8equikWgUN+hnucxFzIlvu5q8Joplv3xFDUJKB5Otgy1zOIiHU4cv2lFIwV+0CPk+9I+BH7gX1g/ePhlPX9t5VeO1lV7+UC2G+m5go6Ago94H3ZVmOx1Qg/UNE0ERMVXJjTsvC5NIdQ6ZkwM1ojDHzbSC1AedM+LNErRg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass
header.d=amd.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=UtEJOoCK5XOWa3zUVY2KraHUJcWk8fEzPHPiSC7r29s=;
b=UGutifWOHvl65m/1AupnzkIJdCFVVziMrlBuZCS9uQCa4EuwjUb3Shr2vacUVd/+5tneOPYdti8XtrYeqCBuyLQtWEZpFTi07KPtp8wZpTU1NicCIjBVla4m03wUA3eW0HOH7NPZ5Ivu4OZjqUdN6GywcHRb5H3jFZHkUm6Lbh0=
Authentication-Results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=amd.com;
Received: from BN9PR12MB5163.namprd12.prod.outlook.com (2603:10b6:408:11c::7)
by CH1PPF73CDB1C12.namprd12.prod.outlook.com (2603:10b6:61f:fc00::615) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8678.30; Wed, 4 Jun
2025 16:16:22 +0000
Received: from BN9PR12MB5163.namprd12.prod.outlook.com
([fe80::61ca:6d43:a98d:3b7f]) by BN9PR12MB5163.namprd12.prod.outlook.com
([fe80::61ca:6d43:a98d:3b7f%4]) with mapi id 15.20.8792.034; Wed, 4 Jun 2025
16:16:22 +0000
Message-ID: <58921dc3-aa6e-41bc-90d3-d25a4a2cce8b@xxxxxxx>
Date: Wed, 4 Jun 2025 21:46:16 +0530
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v5 7/8] iommu/amd: Add debugfs support to dump IRT Table
To: Vasant Hegde <vasant.hegde@xxxxxxx>, joro@xxxxxxxxxx,
suravee.suthikulpanit@xxxxxxx, will@xxxxxxxxxx, robin.murphy@xxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, iommu@xxxxxxxxxxxxxxx
References: <20250407173500.1827-1-dheerajkumar.srivastava@xxxxxxx>
<20250407173500.1827-8-dheerajkumar.srivastava@xxxxxxx>
<a7d4929b-f7ff-4ce5-800e-79df3816d9d6@xxxxxxx>
Content-Language: en-US
From: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@xxxxxxx>
In-Reply-To: <a7d4929b-f7ff-4ce5-800e-79df3816d9d6@xxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-ClientProxiedBy: PN3PR01CA0182.INDPRD01.PROD.OUTLOOK.COM
(2603:1096:c01:be::18) To BN9PR12MB5163.namprd12.prod.outlook.com
(2603:10b6:408:11c::7)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: BN9PR12MB5163:EE_|CH1PPF73CDB1C12:EE_
X-MS-Office365-Filtering-Correlation-Id: db83357f-09d0-42e2-dce7-08dda383259d
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|366016;
X-Microsoft-Antispam-Message-Info:
=?utf-8?B?bmFNQ0EzcURQUWt0MXFST3FFdXAxTVVXMitoQ2hna3RyUXE2VkxzYmovSGdk?=
=?utf-8?B?aDl5MFYxVGY4eU9iNmdrM2dwMG5jaDR2d2F0dittTjFDdk5KdjJ1dXRRcElC?=
=?utf-8?B?RVZEbjdzRkxPcGUyZDh0WmE3TWJNbGNIa0U0RHlLQmZnNHU2SldQbWFFVzk3?=
=?utf-8?B?YzZ2N1k3Rlk0K0xJM3NxSHNINGlRWlFGcnMrWVRRNWJ5MXkvdDFmRzhiZUZz?=
=?utf-8?B?eURPU1kyN1ora0NWdnpBODBZbUJLVFdTdFNHY21RYzdkZWRoZFhwa09GSXhz?=
=?utf-8?B?TlQrVEFBQVBja1hES050V0xkMGhHRldtYXlPampmZWJLL1dXalgzZ1B3OFVl?=
=?utf-8?B?eDM4MWhua1pLODJkM0VlWHIrUXZwRjlpR2paQmx5ZnkyRTNpN3M4OU9lUk50?=
=?utf-8?B?cVRuUjNYTGV2Y0NzTmQrRWdKZWs2WUhIc1haUHk3RkZQMmRXaXZJWG9xUHl6?=
=?utf-8?B?ZlZ3SmtqQmsyRnRSWlZxR2hxWWlQUkRUelN2YjBkQ2d6M1FTOUgrNzRyNWhF?=
=?utf-8?B?M0hSc2tpNWR4VHpDTkEwRkZIREw1YmRGSHNRWkFVenhkVXhwbVdmeGlvS2Fj?=
=?utf-8?B?UU1sMXM4SjJJazJUZGpUR0pjMGxJczlHdmlWUnhvQWtvR2RwVHRYOExqNVRU?=
=?utf-8?B?QlFOdWRmV2c1ZzRMeUpVOHFub0srR1RnZG1lMXEyMDh3Mkt6dFJ0WWtOa1A2?=
=?utf-8?B?Q2VCTlByWndtVzdvczNVejRqUERaa3JQUGFqZkxRb0Q4ZzF1Ymh2eitpSHMr?=
=?utf-8?B?ZzBmRUdJOTI5bVRKZkxVUjBaV1hhdFpNK2FzZStYMlVNTG1udnF5bTNlSXZQ?=
=?utf-8?B?QVkrd2ZUL1ArWEV6UVdmU3Bhc3NKaHdvN0JWYWxxd29qL0ZMOHE4c1VZRWtN?=
=?utf-8?B?YU8yZ2RiWW1ZSkNnODh0Qi9vaU9BWmU0UW1HaGJ1VnBDa1dqSkM0OXZrMmk1?=
=?utf-8?B?eUg0eDMvNU1DVWRFR21McjRwaklzd0JCN3oxb2p2S2RTbVdReHFkSGVVWFFL?=
=?utf-8?B?ckRjeDd2YzZXM0Nxdjl6dU9lcGtZRnBBRkViOXhmQy9JVXF0SDV6K2M3WUJt?=
=?utf-8?B?VVNHeUIwbEJzSUtFVkhnc3oyMEZkZTNFUFVsdWFFMHp0RTBSem5MdGpodmpP?=
=?utf-8?B?UWFlYVNhY1hxbE05clptS2tEK0VNMnRFNW1sTjNQMndPMGpQWEFFaDdMbExV?=
=?utf-8?B?RDB4bXV3bjZZMzVuWUVjN1V0amM0WHFvdThqNE5ZMWxWUGxWV0VhOU1nUkFE?=
=?utf-8?B?SURIeWNTa0I4Ym5qaGhLS2d0V3hScmVkcTBpYW9zVjlHdkdtZDNtb1FmZUZ3?=
=?utf-8?B?ZTd4aDA0Q0NLa0E2ZklzM2dUc0F0NjZmajg4OHl1Z0RLZDE0VzRuclJUZlhU?=
=?utf-8?B?T083Wk9ySG9VVzNaLys5aVhMT0tUUVJUdFA5dGcyMVBNS0pLREw4c3A0aTI1?=
=?utf-8?B?L3JyNkQ3dnJ5RkRmTjJ3TXhLaFdNclIrcG9rV2Z2Z0lKblFPZzdDZlZlcUE0?=
=?utf-8?B?bkQwYzh2UXNWdjNKQnFlTHRxWlRTUUlUOGJGNldOOGE2MjVGT0hRNGs3VkpD?=
=?utf-8?B?N0JVeENydE0xWWVTL29sWEcyeGRuZUx0KzdGbjVKTTBEVG9lSmg4ZkZpNTg4?=
=?utf-8?B?T3pISmE2QXRLQTNPTENVcFBZNkNwZy9JK3JVREpJMnJPWUhZN0V5bGNudmR3?=
=?utf-8?B?azhoUktiYUllMzFuQWNLaTRaTG9PS1NwWUk4cGhaUDcyaExoZE5NaVFRbFRo?=
=?utf-8?B?SUR0aFRTcU1Qay9mQjV5ZkhsZkpVamxhSmtRM2NsbUxkMjZPV0dHR254K1o0?=
=?utf-8?B?cHM1djdQRllCd2ZUYWg5eWVnaVRVOEFLeGdWb3RWLzhnajVKeW5Hc0V1b3Js?=
=?utf-8?B?elMxMWU0RVNmS1BJMHhReWFvY01sNVYxNjY5UEdvVVhaRUk4VGptZ1Z0UTUw?=
=?utf-8?Q?yra1w11V3sg=3D?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN9PR12MB5163.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(376014)(366016);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?utf-8?B?NGxCNU8rOG83RHBVZjRoUU5WWDBlTUJqUkNLZXFJZUMvT3FDa3JvMFIyUUx4?=
=?utf-8?B?aFAzbEo3aGFBSElucGJXME45ZzlLU0VQMlFzV2J2OUYvclRmK1FhUEZlQm4r?=
=?utf-8?B?aG9icjVRbHB1TTJnMDNIdGswbEVaVGRtOUNWdDRpOGVsQ0I1Y1dxd0YzaGtW?=
=?utf-8?B?SVlmbnVDSnd1ZnpoWVE3RG1PMWtFekFEcm1ENkRmZWxnOE85eGVxTjMxYWZz?=
=?utf-8?B?VUpVUDZKODB0aWNiV294WWV1Y0ZHTWJjZnRhM1BQV0I5alNlckV1eEhqYzM3?=
=?utf-8?B?UVVobnV5MWZFZ1l4Ri9aK1lVa2owbFFuNFVjMUJOSU1tZ0pkVE1KL2lCRWoy?=
=?utf-8?B?V2tWdFA1UVNwMTgvZ1p6Q2hiQ0cvY04vTGJhWm8xTEhUK0ZmaHB3RDJHOCt5?=
=?utf-8?B?NzYxUWdpdWVBeXlpK1c3d2FVNGRQMUY3WnZVU2JxTWVnYTFwY0VsZU1uL0JO?=
=?utf-8?B?Wmptd2xPMEY5eFM3Mm8xZVJ5LzBLK0pwS2RrRTkyTGYvRVVTSWlWbHBaamxV?=
=?utf-8?B?NkFiZjZKNlQvVFZTa3Z6YlN4MkRiQzRNSERSMHBNVkZGakZlc2RzQkFlR21M?=
=?utf-8?B?WjFSS0hFZVBQcXJ3bGYwRGcwK3M4YnBwQnJZM3lRc29iYzR6ejl5TFMvTTNR?=
=?utf-8?B?RVQ0RVc0eEE0aC9uVUxFK1Y3NFFkR1h0Ti9DQno5U0NTN2Q1b1JwQlgwbWtC?=
=?utf-8?B?MENPY0xiL2RBMG1NZ3A0MUtzdUJKYmxKd1lDNTlQUGJSY2JzUy8zdEErakNl?=
=?utf-8?B?QlBOMUxlNVJ3Y2Q2MmtRNDJZaGxXT1AzRlBtYm5EVlNkSDR0eEI4TVVlc3Bl?=
=?utf-8?B?eFRoR09rVmFSSFNBQld5VHNacHh5SDZXZDhDUEtiMUlzbkpDM2tld3U0K0Rj?=
=?utf-8?B?dnN2MXBiV0xnSi9PRHBteXR6N0MxVjd5ZWlIQUE5UFIwZEhCQmNPN1MybVJH?=
=?utf-8?B?aXVXZ1N6NFVrM1J2MVlLK29SanJoaXU1b2ZVdGg1a3VwK0pPTTIxMDIyU0ty?=
=?utf-8?B?NWlZWDgveVhSZlVNNlJtZGg2bjFkNm8vcjIrSndiU1BjTk0xZis3MG5QNmJm?=
=?utf-8?B?dWZwQmhxQmg0UU1qWDVuZEFrR2kzVEpLaTFZa295S1J2eDN1RmZGUEZJNldW?=
=?utf-8?B?WDFBUnhpUjExNW5jQzB2Y3czcW44K2V0b295dEM1RGlqZW5IbzcrNFp1WmZr?=
=?utf-8?B?UCtDcDlFa0pRYWdjaG5UNjQ4TzNWOXVSem1uZk9lbnI2WUU2RUVNTXU5cW51?=
=?utf-8?B?SnBaSm45elVQR3VqbFBieW9TL0thdUhTV2pGa1NiMFM4dUtuNXNBYTFNMHhv?=
=?utf-8?B?TXZNU0ZkZ0NZZUQ2d3ROaE1ENDR5cmQ0N0cxdGpxSU00S1Z0S1dUNjR4cGta?=
=?utf-8?B?N3lJaDFISkhwV0RoZjJ3blNLK3hUNGJ6eldWRTR5N1FkV0txWmx6RVdHbTk3?=
=?utf-8?B?d2tKbnd1V3VIaUpJQ2VTM1pjeXhMTlEvK0FPVDg2d0t6dUFJUE9VRzNwdjFt?=
=?utf-8?B?RzNwaTMyZ3lFRlRXdVZGWVRSU3ljb25aUWpMMzBFd1hvRkw3djA2cS9JcDFL?=
=?utf-8?B?SVVBOExhRURoTTVhaHdaay9yV0s1RXZQbEdCbjM0S1c0bjhjZnZ2VVJvSEE2?=
=?utf-8?B?RkdOYmdnRmZaeHZDWEU3L1FVZjRyOWN6ZkR4SWtkUkJrT1RFV3dMTWlNTk9L?=
=?utf-8?B?UEhoY3l1NWtmSDc4ZlZ0MFZsZkhrSFNWRWppbkZvL0dWVjJNVk5USUh6aGY4?=
=?utf-8?B?eldyVVVQSzBaVzVzUkRvWW12dTRTTUwrcXBxQ28xUkZBTlZIbGRjSFJpZTBP?=
=?utf-8?B?RjVlbWZPaHZxbEpLQThUaDRTYUhNK0NqSkhZdUlXSSs2MXB2Qml0b3ZHaUE4?=
=?utf-8?B?d2JmVGpYYWU1dWphS1JkRE5PZjc5cEhYS1VoOEQyRVlGTDFqLzRNRzFucWtT?=
=?utf-8?B?YVNyTDZjdWdReVh2dU9Xa3dyREp4dDUza0FqMjRFWnN6Z0l6TkNSVjcvVit6?=
=?utf-8?B?Z0xVbGlSczFuTGxpTVMvT2tHTWROZTFSWVFxQmQ5ZEYxRDV3TG1LeUxaNE1w?=
=?utf-8?B?TjZCVFZKbmJnVmNZZVVwSFZiTGl4Q1ZGc2xKVVEzbE9nY0N6KzVYNE01V3RM?=
=?utf-8?Q?uZnKj2JL23MO0wyVhwY4NjEEJ?=
X-OriginatorOrg: amd.com
X-MS-Exchange-CrossTenant-Network-Message-Id: db83357f-09d0-42e2-dce7-08dda383259d
X-MS-Exchange-CrossTenant-AuthSource: BN9PR12MB5163.namprd12.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 16:16:22.7340
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: WJdzjfznxvonsPcORKG6O6Iiu7eVc+hvsrJJteL6Fvzr0Pztqil9QZ+O01CgF9zFSTR6h59VUY3t729LCx+Ocg==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH1PPF73CDB1C12
X-Spam-Status: No, score=-2.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_BL_SPAMCOP_NET,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hi Vasant,
Thanks for reviewing the patch.
On 5/1/2025 3:36 PM, Vasant Hegde wrote:
On 4/7/2025 11:04 PM, Dheeraj Kumar Srivastava wrote:
In cases where we have an issue in the device interrupt path with IOMMU
interrupt remapping enabled, dumping valid IRT table entries for the device
is very useful and good input for debugging the issue.
eg.
-> To dump irte entries for a particular device
#echo "c4:00.0" > /sys/kernel/debug/iommu/amd/devid
#cat /sys/kernel/debug/iommu/amd/irqtbl | less
or
#echo "0000:c4:00.0" > /sys/kernel/debug/iommu/amd/devid
#cat /sys/kernel/debug/iommu/amd/irqtbl | less
Signed-off-by: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@xxxxxxx>
---
drivers/iommu/amd/debugfs.c | 106 ++++++++++++++++++++++++++++++++++++
1 file changed, 106 insertions(+)
diff --git a/drivers/iommu/amd/debugfs.c b/drivers/iommu/amd/debugfs.c
index c6ff47561afb..28fe546e0bc0 100644
--- a/drivers/iommu/amd/debugfs.c
+++ b/drivers/iommu/amd/debugfs.c
@@ -11,6 +11,7 @@
#include <linux/pci.h>
#include "amd_iommu.h"
+#include "../irq_remapping.h"
static struct dentry *amd_iommu_debugfs;
@@ -254,6 +255,109 @@ static int iommu_devtbl_show(struct seq_file *m, void *unused)
}
DEFINE_SHOW_ATTRIBUTE(iommu_devtbl);
+static void dump_128_irte(struct seq_file *m, struct irq_remap_table *table, u16 int_tab_len)
+{
+ struct irte_ga *ptr, *irte;
+ int index;
+
+ for (index = 0; index < int_tab_len; index++) {
+ ptr = (struct irte_ga *)table->table;
+ irte = &ptr[index];
+
+ if (AMD_IOMMU_GUEST_IR_VAPIC(amd_iommu_guest_ir) &&
+ !irte->lo.fields_vapic.valid)
+ continue;
+ else if (!irte->lo.fields_remap.valid)
+ continue;
+ seq_printf(m, "IRT[%04d] %016llx %016llx\n", index, irte->hi.val, irte->lo.val);
+ }
+}
+
+static void dump_32_irte(struct seq_file *m, struct irq_remap_table *table, u16 int_tab_len)
+{
+ union irte *ptr, *irte;
+ int index;
+
+ for (index = 0; index < int_tab_len; index++) {
+ ptr = (union irte *)table->table;
+ irte = &ptr[index];
+
+ if (!irte->fields.valid)
+ continue;
+ seq_printf(m, "IRT[%04d] %08x\n", index, irte->val);
+ }
+}
+
+static void dump_irte(struct seq_file *m, u16 devid, struct amd_iommu_pci_seg *pci_seg)
+{
+ struct dev_table_entry *dev_table;
+ struct irq_remap_table *table;
+ struct amd_iommu *iommu;
+ unsigned long flags;
+ u16 int_tab_len;
+
+ table = pci_seg->irq_lookup_table[devid];
+ if (!table) {
+ seq_printf(m, "IRQ lookup table not set for %04x:%02x:%02x:%x\n",
+ pci_seg->id, PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid));
+ return;
+ }
+
+ iommu = pci_seg->rlookup_table[devid];
+ if (!iommu)
+ return;
+
+ dev_table = get_dev_table(iommu);
+ if (!dev_table) {
+ seq_puts(m, "Device table not found");
+ return;
+ }
+
+ int_tab_len = 1 << ((dev_table[devid].data[2] >> 1) & 0xfULL);
This is hard to read. Please use the macros like FIELD_GET
+ if (int_tab_len > 2048)
s/2048/MAX_IRQS_PER_TABLE_2K/
Sure I will use macros to fetch and validate IRT table length from DTE.
Thanks
Dheeraj
-Vasant
Return-Path: <linux-kernel+bounces-673509-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 1159241E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:17:21 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 64522189B4CE
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:17:34 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 1454C1DE4E3;
Wed, 4 Jun 2025 16:17:14 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="cd0lJAhb"
Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2F7D8339A1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:17:10 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749053833; cv=none; b=cvH5slxrEm+AP7tI+6HnhnlTG2718+nhcMYC9KmQPVGDucHVnzNxnjDIqHPbJCXENeNsqbuz2JrICfmGboQVGP0MJZ7Kl26/qRZsY/8Y+GqTC43/2AuzE9YkPU/6SQ1Xb7/APVreiYAvX4+tVz1lIh/OPp138dqP99XZ89+ef50=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749053833; c=relaxed/simple;
bh=NRKNdkhiCm3Mg2VKiD37TR2Pp5nvR2AWfzrXscNez5E=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=qede1huRvLovFOJAbEBNRX6UpE8hAHlEJJ5TMYZ1Fj8ztr390gbxRa30htaqLHWDXI5sw3z+ajCVpF88JVDnU1whBtHWNoqkcfbpJtr23mg245Oof0p4VibWovhq9JoPxjszXfWGElgV4gvroazgEhC2FEzvtqQNamiBYgNUBEI=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=cd0lJAhb; arc=none smtp.client-ip=192.198.163.19
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
t=1749053831; x=1780589831;
h=date:from:to:cc:subject:message-id:references:
mime-version:in-reply-to;
bh=NRKNdkhiCm3Mg2VKiD37TR2Pp5nvR2AWfzrXscNez5E=;
b=cd0lJAhbtW9pE4hj9VvQhBPoK7D8R7tPlsO9+DWgqAbuBhyhtmnbWcC+
P0PizwDVmZzOrJniHc57BK9gqmblarb+cgzujbzQmeTN/FwSZK+efHeG4
hXo5eadLviCEF+nOkNO78I7DjZbEdeUr7Dy5gynRps0YstKtXSTDyFc7F
1nq9OaMV+N4n6Od9jNMNYzyGmFgDG99gxSmegbCefrfGXGkq4i8q2/3NE
VH1rp5KhCdfUPk+tiuH+BFXRuFBbs2K1ngtkhcK4zUG7/ktwFSN8y96jG
j0QeigqHy0VDIg8BqHYX+d59g1xtcmB1GtTJxPg4YhLgYLDkjDoEmimzB
w==;
X-CSE-ConnectionGUID: 7v+zi+GuSyC4pf4Gc0c5og==
X-CSE-MsgGUID: 9c9qZC3ST5a4n+tZ34vWnQ==
X-IronPort-AV: E=McAfee;i="6800,10657,11454"; a="50261826"
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="50261826"
Received: from fmviesa009.fm.intel.com ([10.60.135.149])
by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 09:17:10 -0700
X-CSE-ConnectionGUID: VvzPzS8YTaO3fVliUioZRQ==
X-CSE-MsgGUID: ZJbG3SLUR7m33B7xCLoViQ==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="146173900"
Received: from lkp-server01.sh.intel.com (HELO e8142ee1dce2) ([10.239.97.150])
by fmviesa009.fm.intel.com with ESMTP; 04 Jun 2025 09:17:09 -0700
Received: from kbuild by e8142ee1dce2 with local (Exim 4.96)
(envelope-from <lkp@xxxxxxxxx>)
id 1uMqnb-0003IF-09;
Wed, 04 Jun 2025 16:17:07 +0000
Date: Thu, 5 Jun 2025 00:16:25 +0800
From: kernel test robot <lkp@xxxxxxxxx>
To: Donny Turizo <donnyturizo13@xxxxxxxxx>, gregkh@xxxxxxxxxxxxxxxxxxx
Cc: oe-kbuild-all@xxxxxxxxxxxxxxx, linux-staging@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx,
Donny Turizo <donnyturizo13@xxxxxxxxx>
Subject: Re: [PATCH v3] staging: rtl8723bs: Fix typo in variable name
'ips_deffer_ms'
Message-ID: <202506050029.f8Llelhe-lkp@xxxxxxxxx>
References: <20250522211626.4931-1-donnyturizo13@xxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20250522211626.4931-1-donnyturizo13@xxxxxxxxx>
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hi Donny,
kernel test robot noticed the following build errors:
[auto build test ERROR on staging/staging-testing]
url: https://github.com/intel-lab-lkp/linux/commits/Donny-Turizo/staging-rtl8723bs-Fix-typo-in-variable-name-ips_deffer_ms/20250523-052530
base: staging/staging-testing
patch link: https://lore.kernel.org/r/20250522211626.4931-1-donnyturizo13%40gmail.com
patch subject: [PATCH v3] staging: rtl8723bs: Fix typo in variable name 'ips_deffer_ms'
config: sparc64-allmodconfig (https://download.01.org/0day-ci/archive/20250605/202506050029.f8Llelhe-lkp@xxxxxxxxx/config)
compiler: sparc64-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250605/202506050029.f8Llelhe-lkp@xxxxxxxxx/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202506050029.f8Llelhe-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c: In function '_rtw_pwr_wakeup':
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c:1076:48: error: 'ips_deffer_ms' undeclared (first use in this function); did you mean 'ips_defer_ms'?
1076 | deny_time = jiffies + msecs_to_jiffies(ips_deffer_ms);
| ^~~~~~~~~~~~~
| ips_defer_ms
drivers/staging/rtl8723bs/core/rtw_pwrctrl.c:1076:48: note: each undeclared identifier is reported only once for each function it appears in
vim +1076 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
554c0a3abf216c Hans de Goede 2017-03-29 1012
3a0e883f688e25 Donny Turizo 2025-05-22 1013 int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_defer_ms, const char *caller)
554c0a3abf216c Hans de Goede 2017-03-29 1014 {
554c0a3abf216c Hans de Goede 2017-03-29 1015 struct dvobj_priv *dvobj = adapter_to_dvobj(padapter);
554c0a3abf216c Hans de Goede 2017-03-29 1016 struct pwrctrl_priv *pwrpriv = dvobj_to_pwrctl(dvobj);
554c0a3abf216c Hans de Goede 2017-03-29 1017 struct mlme_priv *pmlmepriv;
554c0a3abf216c Hans de Goede 2017-03-29 1018 int ret = _SUCCESS;
554c0a3abf216c Hans de Goede 2017-03-29 1019 unsigned long start = jiffies;
3a0e883f688e25 Donny Turizo 2025-05-22 1020 unsigned long deny_time = jiffies + msecs_to_jiffies(ips_defer_ms);
554c0a3abf216c Hans de Goede 2017-03-29 1021
554c0a3abf216c Hans de Goede 2017-03-29 1022 /* for LPS */
554c0a3abf216c Hans de Goede 2017-03-29 1023 LeaveAllPowerSaveMode(padapter);
554c0a3abf216c Hans de Goede 2017-03-29 1024
554c0a3abf216c Hans de Goede 2017-03-29 1025 /* IPS still bound with primary adapter */
554c0a3abf216c Hans de Goede 2017-03-29 1026 padapter = GET_PRIMARY_ADAPTER(padapter);
554c0a3abf216c Hans de Goede 2017-03-29 1027 pmlmepriv = &padapter->mlmepriv;
554c0a3abf216c Hans de Goede 2017-03-29 1028
554c0a3abf216c Hans de Goede 2017-03-29 1029 if (time_before(pwrpriv->ips_deny_time, deny_time))
554c0a3abf216c Hans de Goede 2017-03-29 1030 pwrpriv->ips_deny_time = deny_time;
554c0a3abf216c Hans de Goede 2017-03-29 1031
554c0a3abf216c Hans de Goede 2017-03-29 1032
709c8e49b51c37 Fabio Aiuto 2021-04-07 1033 if (pwrpriv->ps_processing)
554c0a3abf216c Hans de Goede 2017-03-29 1034 while (pwrpriv->ps_processing && jiffies_to_msecs(jiffies - start) <= 3000)
8204b61a775879 Jia-Ju Bai 2018-09-15 1035 mdelay(10);
554c0a3abf216c Hans de Goede 2017-03-29 1036
709c8e49b51c37 Fabio Aiuto 2021-04-07 1037 if (!(pwrpriv->bInternalAutoSuspend) && pwrpriv->bInSuspend)
8ec06b9ff8a4f5 Ross Schmidt 2020-11-09 1038 while (pwrpriv->bInSuspend && jiffies_to_msecs(jiffies - start) <= 3000
709c8e49b51c37 Fabio Aiuto 2021-04-07 1039 )
8204b61a775879 Jia-Ju Bai 2018-09-15 1040 mdelay(10);
554c0a3abf216c Hans de Goede 2017-03-29 1041
554c0a3abf216c Hans de Goede 2017-03-29 1042 /* System suspend is not allowed to wakeup */
2e20a5ac67f8a5 Nishka Dasgupta 2019-07-25 1043 if (!(pwrpriv->bInternalAutoSuspend) && pwrpriv->bInSuspend) {
554c0a3abf216c Hans de Goede 2017-03-29 1044 ret = _FAIL;
554c0a3abf216c Hans de Goede 2017-03-29 1045 goto exit;
554c0a3abf216c Hans de Goede 2017-03-29 1046 }
554c0a3abf216c Hans de Goede 2017-03-29 1047
554c0a3abf216c Hans de Goede 2017-03-29 1048 /* block??? */
2e20a5ac67f8a5 Nishka Dasgupta 2019-07-25 1049 if (pwrpriv->bInternalAutoSuspend && padapter->net_closed) {
554c0a3abf216c Hans de Goede 2017-03-29 1050 ret = _FAIL;
554c0a3abf216c Hans de Goede 2017-03-29 1051 goto exit;
554c0a3abf216c Hans de Goede 2017-03-29 1052 }
554c0a3abf216c Hans de Goede 2017-03-29 1053
554c0a3abf216c Hans de Goede 2017-03-29 1054 /* I think this should be check in IPS, LPS, autosuspend functions... */
2e20a5ac67f8a5 Nishka Dasgupta 2019-07-25 1055 if (check_fwstate(pmlmepriv, _FW_LINKED)) {
554c0a3abf216c Hans de Goede 2017-03-29 1056 ret = _SUCCESS;
554c0a3abf216c Hans de Goede 2017-03-29 1057 goto exit;
554c0a3abf216c Hans de Goede 2017-03-29 1058 }
554c0a3abf216c Hans de Goede 2017-03-29 1059
554c0a3abf216c Hans de Goede 2017-03-29 1060 if (rf_off == pwrpriv->rf_pwrstate) {
554c0a3abf216c Hans de Goede 2017-03-29 1061 {
bc21df678b4d5d Zhansaya Bagdauletkyzy 2021-04-06 1062 if (ips_leave(padapter) == _FAIL) {
554c0a3abf216c Hans de Goede 2017-03-29 1063 ret = _FAIL;
554c0a3abf216c Hans de Goede 2017-03-29 1064 goto exit;
554c0a3abf216c Hans de Goede 2017-03-29 1065 }
554c0a3abf216c Hans de Goede 2017-03-29 1066 }
554c0a3abf216c Hans de Goede 2017-03-29 1067 }
554c0a3abf216c Hans de Goede 2017-03-29 1068
554c0a3abf216c Hans de Goede 2017-03-29 1069 /* TODO: the following checking need to be merged... */
8ec06b9ff8a4f5 Ross Schmidt 2020-11-09 1070 if (padapter->bDriverStopped || !padapter->bup || !padapter->hw_init_completed) {
554c0a3abf216c Hans de Goede 2017-03-29 1071 ret = false;
554c0a3abf216c Hans de Goede 2017-03-29 1072 goto exit;
554c0a3abf216c Hans de Goede 2017-03-29 1073 }
554c0a3abf216c Hans de Goede 2017-03-29 1074
554c0a3abf216c Hans de Goede 2017-03-29 1075 exit:
554c0a3abf216c Hans de Goede 2017-03-29 @1076 deny_time = jiffies + msecs_to_jiffies(ips_deffer_ms);
554c0a3abf216c Hans de Goede 2017-03-29 1077 if (time_before(pwrpriv->ips_deny_time, deny_time))
554c0a3abf216c Hans de Goede 2017-03-29 1078 pwrpriv->ips_deny_time = deny_time;
554c0a3abf216c Hans de Goede 2017-03-29 1079 return ret;
554c0a3abf216c Hans de Goede 2017-03-29 1080
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Return-Path: <linux-kernel+bounces-673510-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id EECF441E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:17:33 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 31AB5177915
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:17:35 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id F15141E492D;
Wed, 4 Jun 2025 16:17:17 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="QNBL+0uu"
Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.19])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8EE7B1DF26F;
Wed, 4 Jun 2025 16:17:14 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749053836; cv=none; b=VrLgFUBjYCX8wGW0KBz/g9DP3KMGf3dG42CBCMRa4kOy/kEwTB08ZR3pd04J9MlbVWpbAB0amKxZeE5+Ij4NNpT0j/YKnFWQa0FVeRpZy2smZJt+P1xTgwbkGHMw3nwA8+MraWJlUD6vG8w8/u+Pz1lW8C+fl68iH/6lU6970jE=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749053836; c=relaxed/simple;
bh=t9R0BNfLsoAjJwDB8Ra2u+6DE3a31dhpCTFCKoZIuo8=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=qkrSKDMU4IUTawpcYT5GhTPx2GjsCOBrXmgDwp+wzNLbXekODQ37sHqKu0r1q4ECK6s5FvqEnvDhQD/z75wfaYBndAsRuLUxZ4x+buC5IMfxjgXoV+a6m4QLeDCwz5oy65C/DFm5n301Qtgo9RCWfXxRnp6214BFepSfG46aQFc=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=QNBL+0uu; arc=none smtp.client-ip=192.198.163.19
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
t=1749053835; x=1780589835;
h=date:from:to:cc:subject:message-id:references:
mime-version:in-reply-to;
bh=t9R0BNfLsoAjJwDB8Ra2u+6DE3a31dhpCTFCKoZIuo8=;
b=QNBL+0uumNDniDDZw32nO5dSE+S/sTYliFgloPtbIi5TLJ9egmu3eLdT
Hsw+mgB0ORowAcLa9huELpYoT+7kD1osH7kHfMeBmPCcGjFDZA7diO2Pe
8lFu4KI+foaUpUVTe3kM0Z1ktyaysv1OIaMkkHGBE2flNsybYSSzSF//o
tXcOjiytOIpb79oNNh0Q3f/DRPqj1UUwQtGaIuu87PIisNQk6V0qHkH0t
/CvOYXAcPdDU1USR/zZR200BjtJsPmPrHAsNNVCGEa8KOwmlLxG3hD0dE
u6OSeJ5lkKqg1nebAvp4VBRUavLgOhEoT8KRneAWzt01v6QiYr44jhZfB
Q==;
X-CSE-ConnectionGUID: 0aSnuAtyQ8W7EC47HZCfig==
X-CSE-MsgGUID: 2rtWTuoXSIeMQKw52IkF3A==
X-IronPort-AV: E=McAfee;i="6800,10657,11454"; a="50261840"
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="50261840"
Received: from fmviesa009.fm.intel.com ([10.60.135.149])
by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 09:17:14 -0700
X-CSE-ConnectionGUID: uLxvfQw7QeesG1OIOWVgbQ==
X-CSE-MsgGUID: YmgkNj1pTjqHY0wETX4OtA==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="146173901"
Received: from lkp-server01.sh.intel.com (HELO e8142ee1dce2) ([10.239.97.150])
by fmviesa009.fm.intel.com with ESMTP; 04 Jun 2025 09:17:09 -0700
Received: from kbuild by e8142ee1dce2 with local (Exim 4.96)
(envelope-from <lkp@xxxxxxxxx>)
id 1uMqnb-0003ID-05;
Wed, 04 Jun 2025 16:17:07 +0000
Date: Thu, 5 Jun 2025 00:16:26 +0800
From: kernel test robot <lkp@xxxxxxxxx>
To: Ziyue Zhang <quic_ziyuzhan@xxxxxxxxxxx>, lpieralisi@xxxxxxxxxx,
kwilczynski@xxxxxxxxxx, manivannan.sadhasivam@xxxxxxxxxx,
robh@xxxxxxxxxx, bhelgaas@xxxxxxxxxx, krzk+dt@xxxxxxxxxx,
neil.armstrong@xxxxxxxxxx, abel.vesa@xxxxxxxxxx, kw@xxxxxxxxx,
conor+dt@xxxxxxxxxx, vkoul@xxxxxxxxxx, kishon@xxxxxxxxxx,
andersson@xxxxxxxxxx, konradybcio@xxxxxxxxxx
Cc: oe-kbuild-all@xxxxxxxxxxxxxxx, linux-arm-msm@xxxxxxxxxxxxxxx,
linux-pci@xxxxxxxxxxxxxxx, linux-phy@xxxxxxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
quic_qianyu@xxxxxxxxxxx, Ziyue Zhang <quic_ziyuzhan@xxxxxxxxxxx>,
Qiang Yu <qiang.yu@xxxxxxxxxxxxxxxx>
Subject: Re: [PATCH v1 1/2] PCI: qcom: Add equalization settings for 8.0 GT/s
Message-ID: <202506050215.pkcXYJIN-lkp@xxxxxxxxx>
References: <20250604091946.1890602-2-quic_ziyuzhan@xxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20250604091946.1890602-2-quic_ziyuzhan@xxxxxxxxxxx>
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hi Ziyue,
kernel test robot noticed the following build errors:
[auto build test ERROR on 911483b25612c8bc32a706ba940738cc43299496]
url: https://github.com/intel-lab-lkp/linux/commits/Ziyue-Zhang/PCI-qcom-Add-equalization-settings-for-8-0-GT-s/20250604-172105
base: 911483b25612c8bc32a706ba940738cc43299496
patch link: https://lore.kernel.org/r/20250604091946.1890602-2-quic_ziyuzhan%40quicinc.com
patch subject: [PATCH v1 1/2] PCI: qcom: Add equalization settings for 8.0 GT/s
config: sparc64-randconfig-002-20250604 (https://download.01.org/0day-ci/archive/20250605/202506050215.pkcXYJIN-lkp@xxxxxxxxx/config)
compiler: sparc64-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250605/202506050215.pkcXYJIN-lkp@xxxxxxxxx/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202506050215.pkcXYJIN-lkp@xxxxxxxxx/
All errors (new ones prefixed by >>):
drivers/pci/controller/dwc/pcie-qcom-ep.c: In function 'qcom_pcie_perst_deassert':
drivers/pci/controller/dwc/pcie-qcom-ep.c:515:17: error: implicit declaration of function 'qcom_pcie_common_set_16gt_equalization'; did you mean 'qcom_pcie_common_set_equalization'? [-Wimplicit-function-declaration]
515 | qcom_pcie_common_set_16gt_equalization(pci);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| qcom_pcie_common_set_equalization
vim +515 drivers/pci/controller/dwc/pcie-qcom-ep.c
bc49681c96360e Dmitry Baryshkov 2022-05-02 389
bc49681c96360e Dmitry Baryshkov 2022-05-02 390 static int qcom_pcie_perst_deassert(struct dw_pcie *pci)
bc49681c96360e Dmitry Baryshkov 2022-05-02 391 {
bc49681c96360e Dmitry Baryshkov 2022-05-02 392 struct qcom_pcie_ep *pcie_ep = to_pcie_ep(pci);
bc49681c96360e Dmitry Baryshkov 2022-05-02 393 struct device *dev = pci->dev;
bc49681c96360e Dmitry Baryshkov 2022-05-02 394 u32 val, offset;
bc49681c96360e Dmitry Baryshkov 2022-05-02 395 int ret;
bc49681c96360e Dmitry Baryshkov 2022-05-02 396
bc49681c96360e Dmitry Baryshkov 2022-05-02 397 ret = qcom_pcie_enable_resources(pcie_ep);
bc49681c96360e Dmitry Baryshkov 2022-05-02 398 if (ret) {
bc49681c96360e Dmitry Baryshkov 2022-05-02 399 dev_err(dev, "Failed to enable resources: %d\n", ret);
bc49681c96360e Dmitry Baryshkov 2022-05-02 400 return ret;
bc49681c96360e Dmitry Baryshkov 2022-05-02 401 }
bc49681c96360e Dmitry Baryshkov 2022-05-02 402
7d7cf89b119af4 Manivannan Sadhasivam 2024-08-17 403 /* Perform cleanup that requires refclk */
7d7cf89b119af4 Manivannan Sadhasivam 2024-08-17 404 pci_epc_deinit_notify(pci->ep.epc);
7d7cf89b119af4 Manivannan Sadhasivam 2024-08-17 405 dw_pcie_ep_cleanup(&pci->ep);
7d7cf89b119af4 Manivannan Sadhasivam 2024-08-17 406
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 407 /* Assert WAKE# to RC to indicate device is ready */
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 408 gpiod_set_value_cansleep(pcie_ep->wake, 1);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 409 usleep_range(WAKE_DELAY_US, WAKE_DELAY_US + 500);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 410 gpiod_set_value_cansleep(pcie_ep->wake, 0);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 411
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 412 qcom_pcie_ep_configure_tcsr(pcie_ep);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 413
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 414 /* Disable BDF to SID mapping */
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 415 val = readl_relaxed(pcie_ep->parf + PARF_BDF_TO_SID_CFG);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 416 val |= PARF_BDF_TO_SID_BYPASS;
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 417 writel_relaxed(val, pcie_ep->parf + PARF_BDF_TO_SID_CFG);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 418
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 419 /* Enable debug IRQ */
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 420 val = readl_relaxed(pcie_ep->parf + PARF_DEBUG_INT_EN);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 421 val |= PARF_DEBUG_INT_RADM_PM_TURNOFF |
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 422 PARF_DEBUG_INT_CFG_BUS_MASTER_EN |
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 423 PARF_DEBUG_INT_PM_DSTATE_CHANGE;
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 424 writel_relaxed(val, pcie_ep->parf + PARF_DEBUG_INT_EN);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 425
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 426 /* Configure PCIe to endpoint mode */
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 427 writel_relaxed(PARF_DEVICE_TYPE_EP, pcie_ep->parf + PARF_DEVICE_TYPE);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 428
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 429 /* Allow entering L1 state */
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 430 val = readl_relaxed(pcie_ep->parf + PARF_PM_CTRL);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 431 val &= ~PARF_PM_CTRL_REQ_NOT_ENTR_L1;
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 432 writel_relaxed(val, pcie_ep->parf + PARF_PM_CTRL);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 433
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 434 /* Read halts write */
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 435 val = readl_relaxed(pcie_ep->parf + PARF_AXI_MSTR_RD_HALT_NO_WRITES);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 436 val &= ~PARF_AXI_MSTR_RD_HALT_NO_WRITE_EN;
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 437 writel_relaxed(val, pcie_ep->parf + PARF_AXI_MSTR_RD_HALT_NO_WRITES);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 438
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 439 /* Write after write halt */
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 440 val = readl_relaxed(pcie_ep->parf + PARF_AXI_MSTR_WR_ADDR_HALT);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 441 val |= PARF_AXI_MSTR_WR_ADDR_HALT_EN;
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 442 writel_relaxed(val, pcie_ep->parf + PARF_AXI_MSTR_WR_ADDR_HALT);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 443
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 444 /* Q2A flush disable */
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 445 val = readl_relaxed(pcie_ep->parf + PARF_Q2A_FLUSH);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 446 val &= ~PARF_Q2A_FLUSH_EN;
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 447 writel_relaxed(val, pcie_ep->parf + PARF_Q2A_FLUSH);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 448
0391632948d9c1 Manivannan Sadhasivam 2022-09-14 449 /*
0391632948d9c1 Manivannan Sadhasivam 2022-09-14 450 * Disable Master AXI clock during idle. Do not allow DBI access
0391632948d9c1 Manivannan Sadhasivam 2022-09-14 451 * to take the core out of L1. Disable core clock gating that
0391632948d9c1 Manivannan Sadhasivam 2022-09-14 452 * gates PIPE clock from propagating to core clock. Report to the
0391632948d9c1 Manivannan Sadhasivam 2022-09-14 453 * host that Vaux is present.
0391632948d9c1 Manivannan Sadhasivam 2022-09-14 454 */
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 455 val = readl_relaxed(pcie_ep->parf + PARF_SYS_CTRL);
0391632948d9c1 Manivannan Sadhasivam 2022-09-14 456 val &= ~PARF_SYS_CTRL_MSTR_ACLK_CGC_DIS;
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 457 val |= PARF_SYS_CTRL_SLV_DBI_WAKE_DISABLE |
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 458 PARF_SYS_CTRL_CORE_CLK_CGC_DIS |
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 459 PARF_SYS_CTRL_AUX_PWR_DET;
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 460 writel_relaxed(val, pcie_ep->parf + PARF_SYS_CTRL);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 461
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 462 /* Disable the debouncers */
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 463 val = readl_relaxed(pcie_ep->parf + PARF_DB_CTRL);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 464 val |= PARF_DB_CTRL_INSR_DBNCR_BLOCK | PARF_DB_CTRL_RMVL_DBNCR_BLOCK |
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 465 PARF_DB_CTRL_DBI_WKP_BLOCK | PARF_DB_CTRL_SLV_WKP_BLOCK |
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 466 PARF_DB_CTRL_MST_WKP_BLOCK;
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 467 writel_relaxed(val, pcie_ep->parf + PARF_DB_CTRL);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 468
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 469 /* Request to exit from L1SS for MSI and LTR MSG */
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 470 val = readl_relaxed(pcie_ep->parf + PARF_CFG_BITS);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 471 val |= PARF_CFG_BITS_REQ_EXIT_L1SS_MSI_LTR_EN;
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 472 writel_relaxed(val, pcie_ep->parf + PARF_CFG_BITS);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 473
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 474 dw_pcie_dbi_ro_wr_en(pci);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 475
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 476 /* Set the L0s Exit Latency to 2us-4us = 0x6 */
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 477 offset = dw_pcie_find_capability(pci, PCI_CAP_ID_EXP);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 478 val = dw_pcie_readl_dbi(pci, offset + PCI_EXP_LNKCAP);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 479 val &= ~PCI_EXP_LNKCAP_L0SEL;
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 480 val |= FIELD_PREP(PCI_EXP_LNKCAP_L0SEL, 0x6);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 481 dw_pcie_writel_dbi(pci, offset + PCI_EXP_LNKCAP, val);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 482
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 483 /* Set the L1 Exit Latency to be 32us-64 us = 0x6 */
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 484 offset = dw_pcie_find_capability(pci, PCI_CAP_ID_EXP);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 485 val = dw_pcie_readl_dbi(pci, offset + PCI_EXP_LNKCAP);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 486 val &= ~PCI_EXP_LNKCAP_L1EL;
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 487 val |= FIELD_PREP(PCI_EXP_LNKCAP_L1EL, 0x6);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 488 dw_pcie_writel_dbi(pci, offset + PCI_EXP_LNKCAP, val);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 489
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 490 dw_pcie_dbi_ro_wr_dis(pci);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 491
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 492 writel_relaxed(0, pcie_ep->parf + PARF_INT_ALL_MASK);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 493 val = PARF_INT_ALL_LINK_DOWN | PARF_INT_ALL_BME |
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 494 PARF_INT_ALL_PM_TURNOFF | PARF_INT_ALL_DSTATE_CHANGE |
ff8d92038cf92c Manivannan Sadhasivam 2023-07-17 495 PARF_INT_ALL_LINK_UP | PARF_INT_ALL_EDMA;
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 496 writel_relaxed(val, pcie_ep->parf + PARF_INT_ALL_MASK);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 497
5d6a6c7454ebae Manivannan Sadhasivam 2024-08-08 498 if (pcie_ep->cfg && pcie_ep->cfg->disable_mhi_ram_parity_check) {
5d6a6c7454ebae Manivannan Sadhasivam 2024-08-08 499 val = readl_relaxed(pcie_ep->parf + PARF_INT_ALL_5_MASK);
5d6a6c7454ebae Manivannan Sadhasivam 2024-08-08 500 val &= ~PARF_INT_ALL_5_MHI_RAM_DATA_PARITY_ERR;
5d6a6c7454ebae Manivannan Sadhasivam 2024-08-08 501 writel_relaxed(val, pcie_ep->parf + PARF_INT_ALL_5_MASK);
5d6a6c7454ebae Manivannan Sadhasivam 2024-08-08 502 }
5d6a6c7454ebae Manivannan Sadhasivam 2024-08-08 503
5fbfae69e78d24 Manivannan Sadhasivam 2025-05-05 504 val = readl_relaxed(pcie_ep->parf + PARF_INT_ALL_3_MASK);
5fbfae69e78d24 Manivannan Sadhasivam 2025-05-05 505 val &= ~PARF_INT_ALL_3_PTM_UPDATING;
5fbfae69e78d24 Manivannan Sadhasivam 2025-05-05 506 writel_relaxed(val, pcie_ep->parf + PARF_INT_ALL_3_MASK);
5fbfae69e78d24 Manivannan Sadhasivam 2025-05-05 507
7d6e64c443ea03 Manivannan Sadhasivam 2024-03-27 508 ret = dw_pcie_ep_init_registers(&pcie_ep->pci.ep);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 509 if (ret) {
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 510 dev_err(dev, "Failed to complete initialization: %d\n", ret);
bc49681c96360e Dmitry Baryshkov 2022-05-02 511 goto err_disable_resources;
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 512 }
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 513
d14bc28af34fb8 Shashank Babu Chinta Venkata 2024-09-11 514 if (pcie_link_speed[pci->max_link_speed] == PCIE_SPEED_16_0GT) {
d45736b5984954 Shashank Babu Chinta Venkata 2024-09-11 @515 qcom_pcie_common_set_16gt_equalization(pci);
d14bc28af34fb8 Shashank Babu Chinta Venkata 2024-09-11 516 qcom_pcie_common_set_16gt_lane_margining(pci);
d14bc28af34fb8 Shashank Babu Chinta Venkata 2024-09-11 517 }
d45736b5984954 Shashank Babu Chinta Venkata 2024-09-11 518
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 519 /*
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 520 * The physical address of the MMIO region which is exposed as the BAR
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 521 * should be written to MHI BASE registers.
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 522 */
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 523 writel_relaxed(pcie_ep->mmio_res->start,
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 524 pcie_ep->parf + PARF_MHI_BASE_ADDR_LOWER);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 525 writel_relaxed(0, pcie_ep->parf + PARF_MHI_BASE_ADDR_UPPER);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 526
c457ac029e443f Manivannan Sadhasivam 2022-09-14 527 /* Gate Master AXI clock to MHI bus during L1SS */
c457ac029e443f Manivannan Sadhasivam 2022-09-14 528 val = readl_relaxed(pcie_ep->parf + PARF_MHI_CLOCK_RESET_CTRL);
c457ac029e443f Manivannan Sadhasivam 2022-09-14 529 val &= ~PARF_MSTR_AXI_CLK_EN;
b9cbc06049cb6b Manivannan Sadhasivam 2023-06-27 530 writel_relaxed(val, pcie_ep->parf + PARF_MHI_CLOCK_RESET_CTRL);
c457ac029e443f Manivannan Sadhasivam 2022-09-14 531
245b9ebf7b8e2a Manivannan Sadhasivam 2024-06-06 532 pci_epc_init_notify(pcie_ep->pci.ep.epc);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 533
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 534 /* Enable LTSSM */
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 535 val = readl_relaxed(pcie_ep->parf + PARF_LTSSM);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 536 val |= BIT(8);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 537 writel_relaxed(val, pcie_ep->parf + PARF_LTSSM);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 538
c71b5eb3b86448 Mrinmay Sarkar 2024-03-11 539 if (pcie_ep->cfg && pcie_ep->cfg->override_no_snoop)
f4e026f454d7bb Bjorn Helgaas 2025-03-07 540 writel_relaxed(WR_NO_SNOOP_OVERRIDE_EN | RD_NO_SNOOP_OVERRIDE_EN,
f4e026f454d7bb Bjorn Helgaas 2025-03-07 541 pcie_ep->parf + PARF_NO_SNOOP_OVERRIDE);
c71b5eb3b86448 Mrinmay Sarkar 2024-03-11 542
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 543 return 0;
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 544
bc49681c96360e Dmitry Baryshkov 2022-05-02 545 err_disable_resources:
bc49681c96360e Dmitry Baryshkov 2022-05-02 546 qcom_pcie_disable_resources(pcie_ep);
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 547
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 548 return ret;
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 549 }
f55fee56a63103 Manivannan Sadhasivam 2021-09-20 550
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Return-Path: <linux-kernel+bounces-673511-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 88E4541E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:18:50 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id B179C3A31C4
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:18:28 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 8D7931DE2BC;
Wed, 4 Jun 2025 16:18:45 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=fooishbar.org header.i=@fooishbar.org header.b="Ul97M4au"
Received: from mail-qv1-f54.google.com (mail-qv1-f54.google.com [209.85.219.54])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id CBD9D339A1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:18:42 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.54
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749053924; cv=none; b=WkRAEFLBEDMGqPGfw38wvT5De2z3kjVxynsbsxZz2ZNj4CoLeBC+dIwiEGjPkPXSaoJa3RJMKCJ/4gNkocsRJAitOcGmmY+xPv+udL3OGJSRns5JISUqI7CMWhef0cJ5hbIdC8o/o3FTe5uVbnExcxkBFKpelCND963KoFSP/AU=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749053924; c=relaxed/simple;
bh=Xa8jPrzkHR+phbaz3krb7ugDZBKndKxpt7yIWX1fDJU=;
h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
To:Cc:Content-Type; b=VD6psHjXv30AqJrgbfhevUtV31NHTfA1WxGJXJwedzvjvC6V1ZjJsYe1pg2kHrWwR3TIlos1M1s3R1P8/DFxt210tL783JGiWUcGubcAOIupKezmSyIA0UqESrJMa7A6V3BN/0FkVv7hbHfBGjZcFhmKpTRNNnG6Qigbzij/C2c=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fooishbar.org; spf=pass smtp.mailfrom=fooishbar.org; dkim=pass (2048-bit key) header.d=fooishbar.org header.i=@fooishbar.org header.b=Ul97M4au; arc=none smtp.client-ip=209.85.219.54
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=fooishbar.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fooishbar.org
Received: by mail-qv1-f54.google.com with SMTP id 6a1803df08f44-6fac8c5b262so1312926d6.3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 09:18:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=fooishbar.org; s=google; t=1749053921; x=1749658721; darn=vger.kernel.org;
h=cc:to:subject:message-id:date:from:in-reply-to:references
:mime-version:from:to:cc:subject:date:message-id:reply-to;
bh=P8AKCIoAa/d1XSYeACl75HYH/kq79WoVL90DxYrmfW4=;
b=Ul97M4auabDOEhu2AeiJTH9wMBFUorRY7bWadbSaFbDIovT1rcKtXv82c0bvWEClfA
z/E0VDnF2SuyFuNAtmWQZLw3rOsJh12v7F+2H2L3JgX44jUNlPxy28cyQsqVylWXNIIh
vefa5eQnkYvHb/BYUjQnpOZkEauWrgVCxnhv9U6tHButf6a8R/gB48IWbX+cBQV6g7bU
sZChg+4lo8icz4TCY5dA4Yp9VizhXUYMvb6Eyj0E9RyJ8KksnSwbwSpDXwmZuJ7Jki4A
T0DJubFnWzUrym3CMQPKtn8iP6KodvT/qbkBIxNP/XGcc4IGf2nu2UsAIHhELbpGvVXc
aTEw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749053921; x=1749658721;
h=cc:to:subject:message-id:date:from:in-reply-to:references
:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=P8AKCIoAa/d1XSYeACl75HYH/kq79WoVL90DxYrmfW4=;
b=fi/87Ex0162ySZoEqkL6wvvMyk5TI2dG5ihtwsf6NLBdDJnJJkp35wBgQH1Q8XPNfi
3U4cYjE+9u6097KDeguC9sqdgNP91XSN3CzMhNw1OQ8CUXmiA7aR2FUcCL7HyjBO2JaD
N5aCnjEdONHDtQz9+nOM6PXbWpJyYXFmA5vOHBm+hoyTZj2L4/Pck6wLKAvzSEILGfCC
kRdYZBMY3DaOUS/doEkhkZX4Nm99lsH0DLOWmm8ytNjVuA7s3fBkg62fMZAlm+XHDfp+
Q1Z3xzHcC+p8TCNf1EJS6/MkVJy52R8UHw6jv4OBcSZ2rHu83VrF5sRQFd9RdNaQiGjm
NIeQ==
X-Forwarded-Encrypted: i=1; AJvYcCWoOGA7TIx8fE3rbWgS0KXsU1XZhxqm7ctMUx1L13zI59T5joskkRaXswPN4PlPti38aHgxui5baBqTCvQ=@vger.kernel.org
X-Gm-Message-State: AOJu0YwzY2Wlnv+x6KGTdo6adnkJFEbVtvNNXzRymfNL1Fkz6Mg4EpRP
rykv5M/mumA6b63k5LrOdfEvxgi2QuBttKKwt1UuIBRh9Q5jdHwOLxVXidm7vpnVQrPrw0F9eG8
UN/6RsNfPFWJossZVNwIkganm7Ea40EVVrj2Z5UrMeQ==
X-Gm-Gg: ASbGnctebmL79vqWcyDYd0MpFwwla66FB8WENj7ipehuT/TzFVMITw9ba5j3wa+udTO
iOA+FVpcXrpWKwcMLlkCrffW2FQ4zME/W7cIBj7QtnpsJDPMh07lKoaMcfFtEwnMPS0EmYPyhtG
n+we4Rpdat6oRvJ7FNOwlg/x/2e6BiDmo5GhbJoP02dp76fc4Fj3L7LZsW5FDH72KEW5prDprmW
I7sJA==
X-Google-Smtp-Source: AGHT+IHKumrpYp7KXj3Oppwg97YrZ8QLTUdlX7sch68BDDJcICEIYXc2OCGtCAc7AHX04x4oGqNiMhls5e1iB1AyII0=
X-Received: by 2002:a05:622a:4d44:b0:48b:4f9b:fcfc with SMTP id
d75a77b69052e-4a5a57559e0mr54446431cf.22.1749053921456; Wed, 04 Jun 2025
09:18:41 -0700 (PDT)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
References: <20250604-6-10-rocket-v6-0-237ac75ddb5e@xxxxxxxxxxxxxxx> <20250604-6-10-rocket-v6-6-237ac75ddb5e@xxxxxxxxxxxxxxx>
In-Reply-To: <20250604-6-10-rocket-v6-6-237ac75ddb5e@xxxxxxxxxxxxxxx>
From: Daniel Stone <daniel@xxxxxxxxxxxxx>
Date: Wed, 4 Jun 2025 17:18:29 +0100
X-Gm-Features: AX0GCFspq72tjQe2nH9NHC6pMzIvIPvg3yffH3OtDe0wEz2aVsnXcTNMk1xSlik
Message-ID: <CAPj87rPv7Pd5tbXhpRLaUJCGB8JmD4kfF50WRsEiST2gvtg3Bg@xxxxxxxxxxxxxx>
Subject: Re: [PATCH v6 06/10] accel/rocket: Add IOCTL for BO creation
To: Tomeu Vizoso <tomeu@xxxxxxxxxxxxxxx>
Cc: Rob Herring <robh@xxxxxxxxxx>, Maxime Ripard <mripard@xxxxxxxxxx>,
David Airlie <airlied@xxxxxxxxx>, Simona Vetter <simona@xxxxxxxx>,
Sebastian Reichel <sebastian.reichel@xxxxxxxxxxxxx>,
Nicolas Frattaroli <nicolas.frattaroli@xxxxxxxxxxxxx>, Kever Yang <kever.yang@xxxxxxxxxxxxxx>,
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-rockchip@xxxxxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx,
Robin Murphy <robin.murphy@xxxxxxx>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hi Tomeu,
I have some bad news ...
On Wed, 4 Jun 2025 at 08:57, Tomeu Vizoso <tomeu@xxxxxxxxxxxxxxx> wrote:
+int rocket_ioctl_create_bo(struct drm_device *dev, void *data, struct drm_file *file)
+{
+ [...]
+
+ /* This will map the pages to the IOMMU linked to core 0 */
+ sgt = drm_gem_shmem_get_pages_sgt(shmem_obj);
+ if (IS_ERR(sgt)) {
+ ret = PTR_ERR(sgt);
+ goto err;
+ }
+
+ /* Map the pages to the IOMMUs linked to the other cores, so all cores can access this BO */
So, uh, this is not great.
We only have a single IOMMU context (well, one per core, but one
effective VMA) for the whole device. Every BO that gets created, gets
mapped into the IOMMU until it's been destroyed. Given that there is
no client isolation and no CS validation, that means that every client
has RW access to every BO created by any other client, for the
lifetime of that BO.
I really don't think that this is tractable, given that anyone with
access to the device can exfiltrate anything that anyone else has
provided to the device.
I also don't think that CS validation is tractable tbh.
So I guess that leaves us with the third option: enforcing context
separation within the kernel driver.
The least preferable option I can think of is that rkt sets up and
tears down MMU mappings for each job, according to the BO list
provided for it. This seems like way too much overhead - especially
with RK IOMMU ops having been slow enough within DRM that we expended
a lot of effort in Weston doing caching of DRM BOs to avoid doing this
unless completely necessary. It also seems risky wrt allocating memory
in drm_sched paths to ensure forward progress.
Slightly more preferable than this would be that rkt kept a
per-context list of BOs and their VA mappings, and when switching
between different contexts, would tear down all MMU mappings from the
old context and set up mappings from the new. But this has the same
issues with drm_sched.
The most preferable option from where I sit is that we could have an
explicit notion of driver-managed IOMMU contexts, such that rkt could
prepare the IOMMU for each context, and then switching contexts at
job-run time would be a matter of changing the root DTE pointer and
issuing a flush. But I don't see that anywhere in the user-facing
IOMMU API, and I'm sure Robin (CCed) will be along shortly to explain
why it's not possible ...
Either way, I wonder if we have fully per-context mappings, userspace
should not manage IOVAs in the VM_BIND style common to newer drivers,
rather than relying on the kernel to do VA allocation and inform
userspace of them?
I'm really sorry this has come so late in the game.
Cheers,
Daniel
Return-Path: <linux-kernel+bounces-673512-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 027E741E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:19:59 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 52BD83A38B6
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:19:37 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 475981DF27F;
Wed, 4 Jun 2025 16:19:50 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="b/LtHklp"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7B852150997
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:19:47 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749053989; cv=none; b=AtB9bEx6U/E7+Z9wiRx3hklYcw9AAw985ICo8xoGYERGoyjAZGmnt16w3n4KvMGM5sl7J1eimKDGyCJZAgKrTQ4rw/USKK+VIm+Ql/jyqH2aanwc+ln2G+vv8tqXtTLFkfq6xUyB9BGOXgClfEurcsH/OarCindyP4XDpTGUirE=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749053989; c=relaxed/simple;
bh=y3F25a2pa6S8w4TqkjybCugMmFlZGUBOKp656lW4RBE=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=SdjWSpBBHg+7gtuNnQne/9rxa5zoi0mYpDbkg70jFdEg3aGCkXdA9BEve1Cp7slYvtbwYLfPQwNw9hmLHnQnL7AibNRG4y2cRZK9tO9Mk9JI5t/WHnqJgN9+xIwI6ze4i0N7DgrLMnvVrIxmLKP59FZl0ozO3CPYMfbOaFiathY=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=b/LtHklp; arc=none smtp.client-ip=170.10.133.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749053986;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=csg6622WwuHA1d9W4OikS57rwnjGZheDjPfoYpBH7sQ=;
b=b/LtHklpPRMXz2Tnc6b4kkYivkaeG5tNlCjUfvXU4jgWW52ytOrMcvqwqOTUz3ssa4bt41
/ci5uVZ6ZOXbVPoGPYtQJF/K2ll0HKC6E0pe5QvZrK6Bouw2Mesiczu0KPFDNiU0BQcsHO
7T0ZyuzTWe4F70eTTtVO/x9jTI7sxfc=
Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com
[209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-388-cLsrKwe8NtGe43AsfJXx1w-1; Wed, 04 Jun 2025 12:19:44 -0400
X-MC-Unique: cLsrKwe8NtGe43AsfJXx1w-1
X-Mimecast-MFC-AGG-ID: cLsrKwe8NtGe43AsfJXx1w_1749053984
Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-3a4eec544c6so8558f8f.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 09:19:44 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749053983; x=1749658783;
h=content-transfer-encoding:in-reply-to:autocrypt:content-language
:from:references:cc:to:subject:user-agent:mime-version:date
:message-id:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=csg6622WwuHA1d9W4OikS57rwnjGZheDjPfoYpBH7sQ=;
b=TF60yBWK8qhf70XTzXtc2YhUeVz4+F7xiMBsGlHiLWtyjtOK+Rg1wWKYHr92VDu1gC
XsnOzwgNj0dLd6MjPXWmeh4WhqKAqUrfCBB7V3B7f6RPSTZAwskAiyOO/5xc1MAWxWUv
Sr7vgmLGC30se0KW0rZa3jrE1SmM9erHNbFULY5b+d/2K4lQsooHnuowMyMN7cV9YE93
qkCVcDiKdWwQGMlZMdoe8w0LumD38tyTcym8arBSVw013jC/6Ux5DvIRN9nMxYoLh3xP
9DcjnYb3A1n97azd4mErUDuE9ND9DFKxrPMEpW2e3IpXvxSQ6RlSm4wlYC2DssneTlUs
qX8g==
X-Forwarded-Encrypted: i=1; AJvYcCWeE4ir0xwK7k+Otd6+U8lnm4Cj7hurIMY9iCuFea8FDtw7HJmgSm8EzSdm2cR/LCqOpbsZ4R+0D3ReZGc=@vger.kernel.org
X-Gm-Message-State: AOJu0YymnlXHS7a80hnlcC+IsSjKR0eJBhsj3+BGRGYcT6Hobse9LGKs
qulAWdSAetPPbM9me0VstQpbk21tBcwG2AvENHB0gQQfAA5o/YShPhuWfyM7Itxi4LtVhOLPRdu
WsENFhxXuG8yFh94Jj6dOoxZk8OXJbfD9fAZe4hh5tU+xkAcGcHxqRFIntRQRvD3s1Q==
X-Gm-Gg: ASbGncubijlv4l1r03ZM8i7LOl9os8b6AXHr7Hp3t75iMt5zW5sJ2dF8zzAEKBe9HY6
ZhUkXp766kRBemdVGXcQbK4TCnJw0Bosut0hy6MjG7cemKOTfhY4ZJMoAjFAaL2uUFT3Fpz5zlt
lTXTe0eX2OGyW3LuNAqp1jK10lWrQKky/rtsTca3cAe1i1aEgdqSN592sksskYwKeTNp2Zk8UOt
plMMamxWtSDWn+4y7wEZ4C1SKAxSeZycTYdO/3grFbLq+YYYKjKdobvOGjWch4svZWfHPFDA2+i
E1VI770MmZc+AA==
X-Received: by 2002:a05:6000:250c:b0:3a0:b84c:7c64 with SMTP id ffacd0b85a97d-3a51d8ff9e2mr2726969f8f.13.1749053983541;
Wed, 04 Jun 2025 09:19:43 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IEf43lIbEauPt+sDm35yLZ8848223C3hrJgOMF0TVNAStsqCrlELVBS19S2PHcrLlNfnUhapQ==
X-Received: by 2002:a05:6000:250c:b0:3a0:b84c:7c64 with SMTP id ffacd0b85a97d-3a51d8ff9e2mr2726951f8f.13.1749053983114;
Wed, 04 Jun 2025 09:19:43 -0700 (PDT)
Received: from [192.168.10.81] ([151.49.64.79])
by smtp.googlemail.com with ESMTPSA id 5b1f17b1804b1-450d7fa2493sm201440525e9.16.2025.06.04.09.19.42
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 09:19:42 -0700 (PDT)
Message-ID: <a9f3f64c-2f82-40b0-80c0-ed1482861dc2@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 18:19:41 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH 25/28] KVM: nSVM: Access MSRPM in 4-byte chunks only for
merging L0 and L1 bitmaps
To: Sean Christopherson <seanjc@xxxxxxxxxx>
Cc: kvm@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
Borislav Petkov <bp@xxxxxxxxx>, Xin Li <xin@xxxxxxxxx>,
Chao Gao <chao.gao@xxxxxxxxx>, Dapeng Mi <dapeng1.mi@xxxxxxxxxxxxxxx>
References: <20250529234013.3826933-1-seanjc@xxxxxxxxxx>
<20250529234013.3826933-26-seanjc@xxxxxxxxxx>
From: Paolo Bonzini <pbonzini@xxxxxxxxxx>
Content-Language: en-US
Autocrypt: addr=pbonzini@xxxxxxxxxx; keydata=
xsEhBFRCcBIBDqDGsz4K0zZun3jh+U6Z9wNGLKQ0kSFyjN38gMqU1SfP+TUNQepFHb/Gc0E2
CxXPkIBTvYY+ZPkoTh5xF9oS1jqI8iRLzouzF8yXs3QjQIZ2SfuCxSVwlV65jotcjD2FTN04
hVopm9llFijNZpVIOGUTqzM4U55sdsCcZUluWM6x4HSOdw5F5Utxfp1wOjD/v92Lrax0hjiX
DResHSt48q+8FrZzY+AUbkUS+Jm34qjswdrgsC5uxeVcLkBgWLmov2kMaMROT0YmFY6A3m1S
P/kXmHDXxhe23gKb3dgwxUTpENDBGcfEzrzilWueOeUWiOcWuFOed/C3SyijBx3Av/lbCsHU
Vx6pMycNTdzU1BuAroB+Y3mNEuW56Yd44jlInzG2UOwt9XjjdKkJZ1g0P9dwptwLEgTEd3Fo
UdhAQyRXGYO8oROiuh+RZ1lXp6AQ4ZjoyH8WLfTLf5g1EKCTc4C1sy1vQSdzIRu3rBIjAvnC
tGZADei1IExLqB3uzXKzZ1BZ+Z8hnt2og9hb7H0y8diYfEk2w3R7wEr+Ehk5NQsT2MPI2QBd
wEv1/Aj1DgUHZAHzG1QN9S8wNWQ6K9DqHZTBnI1hUlkp22zCSHK/6FwUCuYp1zcAEQEAAc0j
UGFvbG8gQm9uemluaSA8cGJvbnppbmlAcmVkaGF0LmNvbT7CwU0EEwECACMFAlRCcBICGwMH
CwkIBwMCAQYVCAIJCgsEFgIDAQIeAQIXgAAKCRB+FRAMzTZpsbceDp9IIN6BIA0Ol7MoB15E
11kRz/ewzryFY54tQlMnd4xxfH8MTQ/mm9I482YoSwPMdcWFAKnUX6Yo30tbLiNB8hzaHeRj
jx12K+ptqYbg+cevgOtbLAlL9kNgLLcsGqC2829jBCUTVeMSZDrzS97ole/YEez2qFpPnTV0
VrRWClWVfYh+JfzpXmgyhbkuwUxNFk421s4Ajp3d8nPPFUGgBG5HOxzkAm7xb1cjAuJ+oi/K
CHfkuN+fLZl/u3E/fw7vvOESApLU5o0icVXeakfSz0LsygEnekDbxPnE5af/9FEkXJD5EoYG
SEahaEtgNrR4qsyxyAGYgZlS70vkSSYJ+iT2rrwEiDlo31MzRo6Ba2FfHBSJ7lcYdPT7bbk9
AO3hlNMhNdUhoQv7M5HsnqZ6unvSHOKmReNaS9egAGdRN0/GPDWr9wroyJ65ZNQsHl9nXBqE
AukZNr5oJO5vxrYiAuuTSd6UI/xFkjtkzltG3mw5ao2bBpk/V/YuePrJsnPFHG7NhizrxttB
nTuOSCMo45pfHQ+XYd5K1+Cv/NzZFNWscm5htJ0HznY+oOsZvHTyGz3v91pn51dkRYN0otqr
bQ4tlFFuVjArBZcapSIe6NV8C4cEiSTOwE0EVEJx7gEIAMeHcVzuv2bp9HlWDp6+RkZe+vtl
KwAHplb/WH59j2wyG8V6i33+6MlSSJMOFnYUCCL77bucx9uImI5nX24PIlqT+zasVEEVGSRF
m8dgkcJDB7Tps0IkNrUi4yof3B3shR+vMY3i3Ip0e41zKx0CvlAhMOo6otaHmcxr35sWq1Jk
tLkbn3wG+fPQCVudJJECvVQ//UAthSSEklA50QtD2sBkmQ14ZryEyTHQ+E42K3j2IUmOLriF
dNr9NvE1QGmGyIcbw2NIVEBOK/GWxkS5+dmxM2iD4Jdaf2nSn3jlHjEXoPwpMs0KZsgdU0pP
JQzMUMwmB1wM8JxovFlPYrhNT9MAEQEAAcLBMwQYAQIACQUCVEJx7gIbDAAKCRB+FRAMzTZp
sadRDqCctLmYICZu4GSnie4lKXl+HqlLanpVMOoFNnWs9oRP47MbE2wv8OaYh5pNR9VVgyhD
OG0AU7oidG36OeUlrFDTfnPYYSF/mPCxHttosyt8O5kabxnIPv2URuAxDByz+iVbL+RjKaGM
GDph56ZTswlx75nZVtIukqzLAQ5fa8OALSGum0cFi4ptZUOhDNz1onz61klD6z3MODi0sBZN
Aj6guB2L/+2ZwElZEeRBERRd/uommlYuToAXfNRdUwrwl9gRMiA0WSyTb190zneRRDfpSK5d
usXnM/O+kr3Dm+Ui+UioPf6wgbn3T0o6I5BhVhs4h4hWmIW7iNhPjX1iybXfmb1gAFfjtHfL
xRUr64svXpyfJMScIQtBAm0ihWPltXkyITA92ngCmPdHa6M1hMh4RDX+Jf1fiWubzp1voAg0
JBrdmNZSQDz0iKmSrx8xkoXYfA3bgtFN8WJH2xgFL28XnqY4M6dLhJwV3z08tPSRqYFm4NMP
dRsn0/7oymhneL8RthIvjDDQ5ktUjMe8LtHr70OZE/TT88qvEdhiIVUogHdo4qBrk41+gGQh
b906Dudw5YhTJFU3nC6bbF2nrLlB4C/XSiH76ZvqzV0Z/cAMBo5NF/w=
In-Reply-To: <20250529234013.3826933-26-seanjc@xxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 5/30/25 01:40, Sean Christopherson wrote:
Access the MSRPM using u32/4-byte chunks (and appropriately adjusted
offsets) only when merging L0 and L1 bitmaps as part of emulating VMRUN.
The only reason to batch accesses to MSRPMs is to avoid the overhead of
uaccess operations (e.g. STAC/CLAC and bounds checks) when reading L1's
bitmap pointed at by vmcb12. For all other uses, either per-bit accesses
are more than fast enough (no uaccess), or KVM is only accessing a single
bit (nested_svm_exit_handled_msr()) and so there's nothing to batch.
In addition to (hopefully) documenting the uniqueness of the merging code,
restricting chunked access to _just_ the merging code will allow for
increasing the chunk size (to unsigned long) with minimal risk.
Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
---
arch/x86/kvm/svm/nested.c | 50 ++++++++++++++++-----------------------
arch/x86/kvm/svm/svm.h | 18 ++++++++++----
2 files changed, 34 insertions(+), 34 deletions(-)
diff --git a/arch/x86/kvm/svm/nested.c b/arch/x86/kvm/svm/nested.c
index e07e10fb52a5..a4e98ada732b 100644
--- a/arch/x86/kvm/svm/nested.c
+++ b/arch/x86/kvm/svm/nested.c
@@ -187,31 +187,19 @@ void recalc_intercepts(struct vcpu_svm *svm)
static int nested_svm_msrpm_merge_offsets[6] __ro_after_init;
static int nested_svm_nr_msrpm_merge_offsets __ro_after_init;
-static const u32 msrpm_ranges[] = {
- SVM_MSRPM_RANGE_0_BASE_MSR,
- SVM_MSRPM_RANGE_1_BASE_MSR,
- SVM_MSRPM_RANGE_2_BASE_MSR
-};
+#define SVM_BUILD_MSR_BYTE_NR_CASE(range_nr, msr) \
+ case SVM_MSRPM_FIRST_MSR(range_nr) ... SVM_MSRPM_LAST_MSR(range_nr): \
+ return SVM_MSRPM_BYTE_NR(range_nr, msr);
static u32 svm_msrpm_offset(u32 msr)
{
- u32 offset;
- int i;
-
- for (i = 0; i < ARRAY_SIZE(msrpm_ranges); i++) {
- if (msr < msrpm_ranges[i] ||
- msr >= msrpm_ranges[i] + SVM_MSRS_PER_RANGE)
- continue;
-
- offset = (msr - msrpm_ranges[i]) / SVM_MSRS_PER_BYTE;
- offset += (i * SVM_MSRPM_BYTES_PER_RANGE); /* add range offset */
-
- /* Now we have the u8 offset - but need the u32 offset */
- return offset / 4;
+ switch (msr) {
+ SVM_BUILD_MSR_BYTE_NR_CASE(0, msr)
+ SVM_BUILD_MSR_BYTE_NR_CASE(1, msr)
+ SVM_BUILD_MSR_BYTE_NR_CASE(2, msr)
+ default:
+ return MSR_INVALID;
}
-
- /* MSR not in any range */
- return MSR_INVALID;
}
int __init nested_svm_init_msrpm_merge_offsets(void)
@@ -245,6 +233,12 @@ int __init nested_svm_init_msrpm_merge_offsets(void)
if (WARN_ON(offset == MSR_INVALID))
return -EIO;
+ /*
+ * Merging is done in 32-bit chunks to reduce the number of
+ * accesses to L1's bitmap.
+ */
+ offset /= sizeof(u32);
+
for (j = 0; j < nested_svm_nr_msrpm_merge_offsets; j++) {
if (nested_svm_msrpm_merge_offsets[j] == offset)
break;
@@ -1363,8 +1357,9 @@ void svm_leave_nested(struct kvm_vcpu *vcpu)
static int nested_svm_exit_handled_msr(struct vcpu_svm *svm)
{
- u32 offset, msr, value;
- int write, mask;
+ u32 offset, msr;
+ int write;
+ u8 value;
if (!(vmcb12_is_intercept(&svm->nested.ctl, INTERCEPT_MSR_PROT)))
return NESTED_EXIT_HOST;
@@ -1372,18 +1367,15 @@ static int nested_svm_exit_handled_msr(struct vcpu_svm *svm)
msr = svm->vcpu.arch.regs[VCPU_REGS_RCX];
offset = svm_msrpm_offset(msr);
write = svm->vmcb->control.exit_info_1 & 1;
- mask = 1 << ((2 * (msr & 0xf)) + write);
This is wrong. The bit to read isn't always bit 0 or bit 1, therefore
mask needs to remain. But it can be written easily as:
msr = svm->vcpu.arch.regs[VCPU_REGS_RCX];
write = svm->vmcb->control.exit_info_1 & 1;
bit = svm_msrpm_bit(msr);
if (bit == MSR_INVALID)
return NESTED_EXIT_DONE;
offset = bit / BITS_PER_BYTE;
mask = BIT(write) << (bit & (BITS_PER_BYTE - 1));
and this even removes the need to use svm_msrpm_offset() in
nested_svm_exit_handled_msr().
At this point, it may even make sense to keep the adjustment for the
offset in svm_msrpm_offset(), like this:
static u32 svm_msrpm_offset(u32 msr)
{
u32 bit = svm_msr_bit(msr);
if (bit == MSR_INVALID)
return MSR_INVALID;
/*
* Merging is done in 32-bit chunks to reduce the number of
* accesses to L1's bitmap.
*/
return bit / (BITS_PER_BYTE * sizeof(u32));
}
I'll let you be the judge on this.
Paolo
if (offset == MSR_INVALID)
return NESTED_EXIT_DONE;
- /* Offset is in 32 bit units but need in 8 bit units */
- offset *= 4;
-
- if (kvm_vcpu_read_guest(&svm->vcpu, svm->nested.ctl.msrpm_base_pa + offset, &value, 4))
+ if (kvm_vcpu_read_guest(&svm->vcpu, svm->nested.ctl.msrpm_base_pa + offset,
+ &value, sizeof(value)))
return NESTED_EXIT_DONE;
- return (value & mask) ? NESTED_EXIT_DONE : NESTED_EXIT_HOST;
+ return (value & BIT(write)) ? NESTED_EXIT_DONE : NESTED_EXIT_HOST;
}
static int nested_svm_intercept_ioio(struct vcpu_svm *svm)
diff --git a/arch/x86/kvm/svm/svm.h b/arch/x86/kvm/svm/svm.h
index 77287c870967..155b6089fcd2 100644
--- a/arch/x86/kvm/svm/svm.h
+++ b/arch/x86/kvm/svm/svm.h
@@ -634,15 +634,23 @@ static_assert(SVM_MSRS_PER_RANGE == 8192);
(range_nr * SVM_MSRPM_BYTES_PER_RANGE * BITS_PER_BYTE + \
(msr - SVM_MSRPM_RANGE_## range_nr ##_BASE_MSR) * SVM_BITS_PER_MSR)
-#define SVM_MSRPM_SANITY_CHECK_BITS(range_nr) \
+#define SVM_MSRPM_BYTE_NR(range_nr, msr) \
+ (range_nr * SVM_MSRPM_BYTES_PER_RANGE + \
+ (msr - SVM_MSRPM_RANGE_## range_nr ##_BASE_MSR) / SVM_MSRS_PER_BYTE)
+
+#define SVM_MSRPM_SANITY_CHECK_BITS_AND_BYTES(range_nr) \
static_assert(SVM_MSRPM_BIT_NR(range_nr, SVM_MSRPM_FIRST_MSR(range_nr) + 1) == \
range_nr * 2048 * 8 + 2); \
static_assert(SVM_MSRPM_BIT_NR(range_nr, SVM_MSRPM_FIRST_MSR(range_nr) + 7) == \
- range_nr * 2048 * 8 + 14);
+ range_nr * 2048 * 8 + 14); \
+static_assert(SVM_MSRPM_BYTE_NR(range_nr, SVM_MSRPM_FIRST_MSR(range_nr) + 1) == \
+ range_nr * 2048); \
+static_assert(SVM_MSRPM_BYTE_NR(range_nr, SVM_MSRPM_FIRST_MSR(range_nr) + 7) == \
+ range_nr * 2048 + 1);
-SVM_MSRPM_SANITY_CHECK_BITS(0);
-SVM_MSRPM_SANITY_CHECK_BITS(1);
-SVM_MSRPM_SANITY_CHECK_BITS(2);
+SVM_MSRPM_SANITY_CHECK_BITS_AND_BYTES(0);
+SVM_MSRPM_SANITY_CHECK_BITS_AND_BYTES(1);
+SVM_MSRPM_SANITY_CHECK_BITS_AND_BYTES(2);
#define SVM_BUILD_MSR_BITMAP_CASE(bitmap, range_nr, msr, bitop, bit_rw) \
case SVM_MSRPM_FIRST_MSR(range_nr) ... SVM_MSRPM_LAST_MSR(range_nr): \
Return-Path: <linux-kernel+bounces-673513-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 0201441E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:22:20 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 700B818956F8
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:22:34 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 9E98E1DFDBB;
Wed, 4 Jun 2025 16:22:09 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="H76lsaDM"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id CCC5B339A1;
Wed, 4 Jun 2025 16:22:08 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749054129; cv=none; b=jMhyamVn6M8R3XwmzT7QoDtdAgx2joS5oBRj64Z5W+4ae9E8EZV4gmjUm5vLrg07KjnQvPDGQ5lSTlt1TPeCS2brjGfkSeJhIDgQf/f4XFADyMMJ9RE5XHBYD7RWJXs0e75pcJ467ZGX88lDSrFVrANb2I9TJbjAEETgpHEI0tE=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749054129; c=relaxed/simple;
bh=NwyhNX9L7Xq2ErWehfIalz8JzuMef0oO/ln44trXpA4=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=Gui4qMYhcfRWqIA4xziXBu5Oa3Kc06ASm9RapvP4lP8D/Qn3ehQeXuKL7T29Pkyepwm8uMlFkG7PaDx5CudMQjoZ/y0D5oC8zp8Vk8eXsEpWP5Vy8NQ10xGcViuUOMwUOkaB3gLgDj3gxidt+eKcRBbyqLHO2iRERJQXVk3fcNs=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=H76lsaDM; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id D2569C4CEE4;
Wed, 4 Jun 2025 16:22:07 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749054128;
bh=NwyhNX9L7Xq2ErWehfIalz8JzuMef0oO/ln44trXpA4=;
h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
b=H76lsaDMCV/V1fSovSqUD3ZgpyfaAK1GSAcEleRzyy09LC73xwV/QIc5PtBoh9sIp
kG8LzOzST625ooMG9JTmodtSLCJhJOoItoVy/NQK94w8L14M/wOScCcprXSwV6tUFL
D5z6yam1/tUrHUK5r5r0NXnjaPSZEESwIqJs2J1m9eJ3lq/veABA/7m/8ItlkpJlYg
F+B7FDrBIErALMwEN91J7NCms86WbbIgV6mJ3eKQJ3Pxt3t+Q8sqK/iMZ/Xo3NrnOv
XoezvNldvYykhgLZ8BNfqsTyaGtlBlhKxUcMNTlc6/TnPOQyBEd3yTZSoeN+w+Po1X
IMspJI66V/OxA==
Date: Wed, 4 Jun 2025 19:22:04 +0300
From: Jarkko Sakkinen <jarkko@xxxxxxxxxx>
To: Blaise Boscaccy <bboscaccy@xxxxxxxxxxxxxxxxxxx>
Cc: Paul Moore <paul@xxxxxxxxxxxxxx>, zeffron@xxxxxxxxxxxxx,
xiyou.wangcong@xxxxxxxxx, kysrinivasan@xxxxxxxxx, code@xxxxxxxxxxx,
linux-security-module@xxxxxxxxxxxxxxx, roberto.sassu@xxxxxxxxxx,
James.Bottomley@xxxxxxxxxxxxxxxxxxxxx,
Alexei Starovoitov <ast@xxxxxxxxxx>,
Daniel Borkmann <daniel@xxxxxxxxxxxxx>,
John Fastabend <john.fastabend@xxxxxxxxx>,
Andrii Nakryiko <andrii@xxxxxxxxxx>,
Martin KaFai Lau <martin.lau@xxxxxxxxx>,
Eduard Zingerman <eddyz87@xxxxxxxxx>, Song Liu <song@xxxxxxxxxx>,
Yonghong Song <yonghong.song@xxxxxxxxx>,
KP Singh <kpsingh@xxxxxxxxxx>, Stanislav Fomichev <sdf@xxxxxxxxxxx>,
Hao Luo <haoluo@xxxxxxxxxx>, Jiri Olsa <jolsa@xxxxxxxxxx>,
David Howells <dhowells@xxxxxxxxxx>, Lukas Wunner <lukas@xxxxxxxxx>,
Ignat Korchagin <ignat@xxxxxxxxxxxxxx>,
Quentin Monnet <qmo@xxxxxxxxxx>,
Jason Xing <kerneljasonxing@xxxxxxxxx>,
Willem de Bruijn <willemb@xxxxxxxxxx>,
Anton Protopopov <aspsk@xxxxxxxxxxxxx>,
Jordan Rome <linux@xxxxxxxxxxxxxx>,
Martin Kelly <martin.kelly@xxxxxxxxxxxxxxx>,
Alan Maguire <alan.maguire@xxxxxxxxxx>,
Matteo Croce <teknoraver@xxxxxxxx>, bpf@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, keyrings@xxxxxxxxxxxxxxx,
linux-crypto@xxxxxxxxxxxxxxx
Subject: Re: [PATCH 0/3] BPF signature verification
Message-ID: <aEByrCJ1R_OYDYxH@xxxxxxxxxx>
References: <20250528215037.2081066-1-bboscaccy@xxxxxxxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <20250528215037.2081066-1-bboscaccy@xxxxxxxxxxxxxxxxxxx>
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, May 28, 2025 at 02:49:02PM -0700, Blaise Boscaccy wrote:
As suggested or mandated by KP Singh
https://lore.kernel.org/linux-security-module/CACYkzJ6VQUExfyt0=-FmXz46GHJh3d=FXh5j4KfexcEFbHV-vg@xxxxxxxxxxxxxx/,
this patchset proposes and implements an alternative hash-chain
algorithm for signature verification of BPF programs.
This design diverges in two key ways:
1. Signature Strategy
Two different signature strategies are
implemented. One verifies only the signature of the loader program in
the kernel, as described in the link above. The other verifies the
Describe "the one" briefly, despite having the link. Label them A and
B, and also, why there are two strategies. Then you can use those labels
as references later on in this description.
program’s maps in-kernel via a hash chain. The original design
required loader programs to be “self-aborting” and embedded the
terminal hash verification logic as metaprogramming code generation
routines inside libbpf. While this patchset supports that scheme, it
is considered undesirable in certain environments due to the potential
for supply-chain attack vectors and the lack of visibility for the LSM
subsystem. Additionally, it is impossible to verify the code
performing the signature verification, as it is uniquely regenerated
for every program.
2. Timing of Signature Check
This patchset moves the signature check to a point before
security_bpf_prog_load is invoked, due to an unresolved discussion
here:
https://lore.kernel.org/linux-security-module/CAHC9VhTj3=ZXgrYMNA+G64zsOyZO+78uDs1g=kh91=GR5KypYg@xxxxxxxxxxxxxx/
This change allows the LSM subsystem to be informed of the signature
verification result—if it occurred—and the method used, all without
introducing a new hook. It improves visibility and auditability,
reducing the “trust me, friend” aspect of the original design.
Blaise Boscaccy (3):
bpf: Add bpf_check_signature
bpf: Support light-skeleton signatures in autogenerated code
bpftool: Allow signing of light-skeleton programs
include/linux/bpf.h | 2 +
include/linux/verification.h | 1 +
include/uapi/linux/bpf.h | 4 +
kernel/bpf/arraymap.c | 11 +-
kernel/bpf/syscall.c | 123 +++++++++++++++++++-
tools/bpf/bpftool/Makefile | 4 +-
tools/bpf/bpftool/common.c | 204 +++++++++++++++++++++++++++++++++
tools/bpf/bpftool/gen.c | 66 ++++++++++-
tools/bpf/bpftool/main.c | 24 +++-
tools/bpf/bpftool/main.h | 23 ++++
tools/include/uapi/linux/bpf.h | 4 +
tools/lib/bpf/libbpf.h | 4 +
tools/lib/bpf/skel_internal.h | 28 ++++-
13 files changed, 491 insertions(+), 7 deletions(-)
--
2.48.1
BR, Jarkko
Return-Path: <linux-kernel+bounces-673514-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 319F741E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:23:13 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id B00B01893FE6
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:23:26 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id C030D1DED66;
Wed, 4 Jun 2025 16:23:05 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b="Z8LqoEAq"
Received: from OS0P286CU010.outbound.protection.outlook.com (mail-japanwestazon11011001.outbound.protection.outlook.com [40.107.74.1])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id C9A84150997;
Wed, 4 Jun 2025 16:23:00 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.74.1
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749054184; cv=fail; b=lnORDjImppwj0j5N+cfE5W1PiLEDhkFRfV0/CAjWdgL8PjU1WQ3vMUUbroP4HmuipJSyQbXVrz/EnUSEYO7Y+/ojlfOehhpd0Yt68cn9npBklav0yrQqNVfG+UdbNaXMZ27KdDIML0xKoBZ7G+x3Y54dTrSght/x9JkL9ZchnQE=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749054184; c=relaxed/simple;
bh=GfG4DJ8VK0B2uJZLGxAk8VltiZQiLze46ZiD1eZfZUo=;
h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To:
Content-Type:MIME-Version; b=lIOQNCgTTpme4mMaFffXkqrayWYAfEQZONo9PONlKEVDKpoVs/ayt4EcJvV1YL/csNwOFgnSfDFarrsTcQF0xuCzGHxpB6/r0h2sUdysMT19HJa1V7UTosM8lwOzL2pYOIrxO7msXveZ3GWrAxgOQ2V1dfsHWWiXJeUUsGyS3eo=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com; spf=pass smtp.mailfrom=renesas.com; dkim=pass (1024-bit key) header.d=renesas.com header.i=@renesas.com header.b=Z8LqoEAq; arc=fail smtp.client-ip=40.107.74.1
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=renesas.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=renesas.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=w4/eQ7wsWbfTxA4tyUnmuszwrSR06MNzJwQKuF0z4TYJTftG0cOBFUy+e8BNzwJPpoa2rVXnbokbSS3cHfu1jwf66Zwx/BCPH3IXfMhST80UJ0LUgap+uN5BDbeK5u+fWTLmcz1/EFLL8N1QbFr020RIaaUr8Zzz4fRmAZSUdh1Tk7qC5uZ1SXz8KWebqbSuZhikbpyrwgC5S94RQxU/N7z5BMmOTAIXIOcKHtkVXPn5GsxcDkSKQj0tbmJWjnoTzSF/RGzED/no3a5It9a0FQCDyfvTQAUpwfv5JAGjFWDuiezXgmv7Lnh6H18u/xnJ7FHM8RRAgoIzDBBBL1pyhw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=JF9lkg2vxj5NkODe2Nn0xu0Gxb1kAk2vpLbW6h+WrDo=;
b=N+zuUB+z7xalGdC9vbxGtc5s9FZDjK37ENq8bAlVUnx8nTOKgy+jaC5BQoJwAhffezcEsIR6bVErS3QC7EbjijRvGa9rCwiCM314JeHXaG8OU9kCDZlNE+SLk+naNonhRGpqWw79jlGbx3pLPIMe36HQb5fR8ctg5P/DZg3qmd+ck5bakeKWAgpO7tY+Ac1Obw5VktNXM+THv1oCzXm/cs/ypUCEFbC41bpJ5LFSR/lop/lRmGveoIuRbJwWx76vV7UYrDx7xxzvkoCDObhwS2e7uHjQsoQrtm2Rgv//z0cn16h8L+O69ErC3ERMkiPc35idOQjVbpNjEbOrJq2XpA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=renesas.com; dmarc=pass action=none header.from=renesas.com;
dkim=pass header.d=renesas.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesas.com;
s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=JF9lkg2vxj5NkODe2Nn0xu0Gxb1kAk2vpLbW6h+WrDo=;
b=Z8LqoEAqpz32VIyP2q1nuDplLEB+Th3MkSAXK2cAJ3fmU8c0CSyu73CV2RBj90O4moakwHjVG1Qi08kG1cQg2d2ftPubyTRWaSXmU0dKfeS3OJeSuZNnydKpI3JUFpFcTIHgyRpbl8t1ERxgxBGbwCsUrXx3/UkY5F/OeBsL9uA=
Received: from OS3PR01MB8319.jpnprd01.prod.outlook.com (2603:1096:604:1a2::11)
by TY7PR01MB13730.jpnprd01.prod.outlook.com (2603:1096:405:1ec::13) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8813.20; Wed, 4 Jun
2025 16:22:57 +0000
Received: from OS3PR01MB8319.jpnprd01.prod.outlook.com
([fe80::3bc8:765f:f19e:16d5]) by OS3PR01MB8319.jpnprd01.prod.outlook.com
([fe80::3bc8:765f:f19e:16d5%5]) with mapi id 15.20.8813.020; Wed, 4 Jun 2025
16:22:56 +0000
From: Chris Brandt <Chris.Brandt@xxxxxxxxxxx>
To: Hugo Villeneuve <hugo@xxxxxxxxxxx>, Biju Das <biju.das.jz@xxxxxxxxxxxxxx>,
"maarten.lankhorst@xxxxxxxxxxxxxxx" <maarten.lankhorst@xxxxxxxxxxxxxxx>,
"mripard@xxxxxxxxxx" <mripard@xxxxxxxxxx>, "tzimmermann@xxxxxxx"
<tzimmermann@xxxxxxx>, "airlied@xxxxxxxxx" <airlied@xxxxxxxxx>,
"simona@xxxxxxxx" <simona@xxxxxxxx>
CC: "dri-devel@xxxxxxxxxxxxxxxxxxxxx" <dri-devel@xxxxxxxxxxxxxxxxxxxxx>,
"linux-renesas-soc@xxxxxxxxxxxxxxx" <linux-renesas-soc@xxxxxxxxxxxxxxx>,
"linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, Hugo
Villeneuve <hvilleneuve@xxxxxxxxxxxx>
Subject: RE: [PATCH v4 1/1] drm: renesas: rz-du: Implement MIPI DSI host
transfers
Thread-Topic: [PATCH v4 1/1] drm: renesas: rz-du: Implement MIPI DSI host
transfers
Thread-Index: AQHb1WC3wlwFteFT+UaegR5pEc2kwrPzLeMw
Date: Wed, 4 Jun 2025 16:22:56 +0000
Message-ID:
<OS3PR01MB8319EF8B4BD1508D753FDF568A6CA@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20250604145306.1170676-1-hugo@xxxxxxxxxxx>
<20250604145306.1170676-2-hugo@xxxxxxxxxxx>
In-Reply-To: <20250604145306.1170676-2-hugo@xxxxxxxxxxx>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=renesas.com;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: OS3PR01MB8319:EE_|TY7PR01MB13730:EE_
x-ms-office365-filtering-correlation-id: 4b25fc74-f941-4010-b1c6-08dda38410c3
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam:
BCL:0;ARA:13230040|7416014|376014|366016|1800799024|38070700018|7053199007;
x-microsoft-antispam-message-info:
=?us-ascii?Q?TaFlIOz7Tcj6n3YCekzLTL6J0T37Y/pC9CC13+PR6ypYsdfutPGNTCEaB7bD?=
=?us-ascii?Q?P/9OxUnImf3YUWzqWypDFlo6Zvxb184U8YIsnEQ+LexsNCSVh7qitYig5URq?=
=?us-ascii?Q?xzIgQwlOuDLzMmqSTimi5bDhms4yqvhAaqHaEv+28NBEu2kE62apF5Nm1iP7?=
=?us-ascii?Q?KNQl2BWjmb3BHlam+n+bbGD532xJGIorT/JwPnbhFRt/YfNVZvUSzaBr2hv4?=
=?us-ascii?Q?EEiKq08oNJvXfbwhHy/D/6lPWd0bbhTd/AgntC7HHfrnmlI2OHZmPLY9eBd2?=
=?us-ascii?Q?5+6ED7jjggMc/6gTJQ6PXv8yq6d2+0UjaEM2huKF2AmwOCHdf2Omp9A7ugT2?=
=?us-ascii?Q?CZyQ+r+OBQUUQ54PxPJNXqFja4KQ6HmKDJQ2/X3PhcBGxkzwZ0if33Owv20C?=
=?us-ascii?Q?pxcmCaChBteCZJn/y3SFnDYPmQPm68Oa/vRQ2JLcOLyf/KoSWoUtpvfrzyEt?=
=?us-ascii?Q?Y1r8QTwqSzU/9AFvMOUsaT8MM5vlYjqy0FMgULMD7EXdkcFECqMWup9OBZDC?=
=?us-ascii?Q?WWvnvyWawv3E4RSimZzmoqyTvhjTWEGdeI57zpHWxyznH3gGhpr9xVIIx5pj?=
=?us-ascii?Q?DHjjNijvTkV9Cmd32U/nRWDXwownot5HYU3vvjJmc05nEwJST9O2bjK0MStK?=
=?us-ascii?Q?kbXoJThJva8qpfqEUmY4Z91vLjJ5iYhv3F5QcVo2EKv0cbHbBPex2TCU7wpb?=
=?us-ascii?Q?/B241LE+kiCmqb5TTSyuqRkxi4O2a1peR414qaI/HYS3idHJfBYd9Pm6duVf?=
=?us-ascii?Q?Gxl1xoxEKiWSwnjvOYyo/v18Smtv9OvnE+gz4FadfjQKsuyVLQvD3JBuk/Oz?=
=?us-ascii?Q?GJmy7l/0tw99kD87cYstnED6MoKNyOraRgpVXiFcWJ5TuUHTw9OMQWB6p0Ax?=
=?us-ascii?Q?l90R2+P9uVwxwKw81tRoE00MicsoRnnjYhihvBksBtuKp9OMmj51VTa1YYp8?=
=?us-ascii?Q?KszFEwLBLZ48sKZo1GQbu9yXHkh18HeutxI1lvb/oJY2DHpmbyW/1QiOUrej?=
=?us-ascii?Q?UF0RMLRuACyskpoCWIbSK/6t1D2gKg12drsmnvnPNKrioRxVwjrsTUhtgKHn?=
=?us-ascii?Q?t47W3ErjAak4ZDaERoLAXHXQxTOtv5Fv4hCdbCqAyyqhKwk4kvknooonrb8m?=
=?us-ascii?Q?OgIXu29XyRF5a7BgkQETtq9ZM22k7W+scNCvRldRDLroPhHR0MvvcKzg3PIr?=
=?us-ascii?Q?xpVG97KexYJWnfjY9UQSOi1IDPWf7GRfat7Ne5aLKLpmSpYXoCuPc3HBaydq?=
=?us-ascii?Q?VWtkMIZGG3jVp0sjgLMq7X7Iad7UGPf4sopwsf27WSmOEZK8HgryP9e8Th7T?=
=?us-ascii?Q?AwDPTS4RjYlLSZXwzDjA2LqAV2oYxPRurx+J0muOjd285pIyUSpvgIL7d9yK?=
=?us-ascii?Q?hyngLk7MQ7HwsB//KYSQ/T7BjoClThJAGV442zDdOEGiK18NiW0h4vLnAuwD?=
=?us-ascii?Q?TOo4WoQXaX3Lq7pGzkr6ZQikOCuo9s8u4uIe8hfGNgUcYKkrhozbpdwcO4rR?=
=?us-ascii?Q?bGp8koslIZ91yGk=3D?=
x-forefront-antispam-report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS3PR01MB8319.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(376014)(366016)(1800799024)(38070700018)(7053199007);DIR:OUT;SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0:
=?us-ascii?Q?yR0IIgiyiUlcGqfykGv5k0t/E/6qCOzuZA/bSfffKbViuWmlp3evPQ+L/U5+?=
=?us-ascii?Q?zcAs+ohqtnte9w+MsvYZSCjKTQK15kENZj5aAcSXpR1G9DVM+M4Cy7mXJeLk?=
=?us-ascii?Q?GJnJb+t1U1uENYHq5IfvUD9i89qsbn5HxOQu/z0eK+Z0rh2Gva/XpSaBIhfB?=
=?us-ascii?Q?xBUQ+eQNx2MEZh6WZ/ybjaTqZPb3moH0wyG+g/YGB1lgRE55fLp75+bgTPZc?=
=?us-ascii?Q?yF7pmdHK4oLkz9BOUxhpSqjgkOeVnY333i/gfg99SfCHje2r2qVg7L7cBd38?=
=?us-ascii?Q?1PubYLEY6Y+U3thfgagfKpQMFY7029I3RwkPwd1AtJlT2O8sxu3Ls/1+Xz/J?=
=?us-ascii?Q?Sy8dF8iNbzzCs6IU+xIf4CuXRmdYzmNwVHyfDxRzo3T78omhaLAOhiZClW/O?=
=?us-ascii?Q?AVHurkduTI7nz+LSE1hAtil/bIoKq8HLGrldiwdx+w3V3CBH0KAqxNYq33T7?=
=?us-ascii?Q?N4jdvj9g4q2n4t5bwc5V/6dBRgLNdPd9CKFdPEpT0i4S9IJvLOo744vy2BsY?=
=?us-ascii?Q?OzP/Llhy+Rd92lBzQ3Ph9ONeSyIv304pR5KOWWjLPKWpMyTNpeAz4S+I9ddu?=
=?us-ascii?Q?JLSXqewF+xokfIyq+bdzXvxphphRJpZuf69yup1jHxmVQEH3s1DTdGF8oKH1?=
=?us-ascii?Q?bSNofMVglHWZLT2ODztTkd2iGK311FisCk9Cw24UDwEozcnNOy6jkBLOQx8z?=
=?us-ascii?Q?brXJ2CbG36hI2r3b1Gx0kgBmn1D4x9Y8bgiMr7H35tg7wiHggKYVdbnwT5fW?=
=?us-ascii?Q?w+uHc6bBJWHv87ctaWu/OiJkS3ixtA74Q69Pa00OfeUIn3rv2jyBz+NmNCS/?=
=?us-ascii?Q?brLKx9gaifqjgLvorZrPw9uHRJPCIKzOLX4HBJ6IDzj6K4cVMatT+nRjqEaw?=
=?us-ascii?Q?wm3RiqxQMzN6y6Q4Ft8PwdJgnriAm/wd1AJRVySoslR1fKAW31NT4QGE49KR?=
=?us-ascii?Q?dPI2c89eT+9/ZyXeNXCg7aT042ik7J4dhJxx0TUfL/u3lE3hk6Clym2rOQBf?=
=?us-ascii?Q?nT4KH8w3QbkEc0OGD9zsWMtXgfey81QB9LZfFgvYLCX7cPiOcxoDmMw9CHxm?=
=?us-ascii?Q?RC7JnmRfKfhrYNyJqm8ebCQNy7t0JjSoBdw2QXX1TZvnpOJqYMvGZ2UQLT2J?=
=?us-ascii?Q?z/IUvy8w+H897nn1icqc6oheXUqZXQwRsEGT2Xz33wJtSyZGRkH4QXzKmPCD?=
=?us-ascii?Q?p1e/if7g61xE4F/ULynPzo4TAA8XIcSWnAXGwPkzqHL7WKAJjTN/sCRR914h?=
=?us-ascii?Q?YG7xApnxVC8PCp0oSuvsBbO1Y+zb+z8VNhRyQnClCwFiCz8SEoAPWdiqgZwZ?=
=?us-ascii?Q?GJzDfe4WQZc4qTEtSH35wTPkN/piLYTkP5u/ECbp3CiGAHtuQ6/B4VmKnqQc?=
=?us-ascii?Q?b9y7P17Mt4B8giARs98xewuSrvj4XccKF15T+e12Razsf3b7BAUPP2Sv83GM?=
=?us-ascii?Q?GkdXcc1fdP2u5vncDB1BzfiiltU3CcPajJ3OY9wpMx5XeLp93/8AKv4F4pkg?=
=?us-ascii?Q?MDZSAQ2gBp9mG8DdjqlC/XWOwugeJGb6KEmWW5kc6/QO2xP/1pqkdrrXevHv?=
=?us-ascii?Q?nGbgUZS7woE6whaYVcZL1fjug9CYi/YXAgGF1ggc?=
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-OriginatorOrg: renesas.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: OS3PR01MB8319.jpnprd01.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 4b25fc74-f941-4010-b1c6-08dda38410c3
X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jun 2025 16:22:56.8132
(UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 53d82571-da19-47e4-9cb4-625a166a4a2a
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: vZLTyFvT7Y2pB8y85WxJsFSZa93Z078j/g0n/O+AW9zg+cE1O8av4HpEcJPvToVPBDwUahpkGhHNy+YSvfyGOnHVTAXbEGHMGMgH5YW7/c8=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY7PR01MB13730
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Tested on 2 different panels, with an RZ/G2L and RZ/V2L.
Thanks Hugo!
Tested-by: Chris Brandt <Chris.Brandt@xxxxxxxxxxx>
-----Original Message-----
From: Hugo Villeneuve <hugo@xxxxxxxxxxx>=20
Sent: Wednesday, June 4, 2025 10:53 AM
To: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>; maarten.lankhorst@xxxxxxxxxxxxxx=
m; mripard@xxxxxxxxxx; tzimmermann@xxxxxxx; airlied@xxxxxxxxx; simona@ffwll=
.ch
Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx; linux-renesas-soc@xxxxxxxxxxxxxxx; lin=
ux-kernel@xxxxxxxxxxxxxxx; hugo@xxxxxxxxxxx; Chris Brandt <Chris.Brandt@ren=
esas.com>; Hugo Villeneuve <hvilleneuve@xxxxxxxxxxxx>
Subject: [PATCH v4 1/1] drm: renesas: rz-du: Implement MIPI DSI host transf=
ers
From: Hugo Villeneuve <hvilleneuve@xxxxxxxxxxxx>
Add support for sending MIPI DSI command packets from the host to a periphe=
ral. This is required for panels that need configuration before they accept=
video data.
Also for long reads to work properly, set DCS maximum return packet size to=
the value of the DMA buffer size.
Based on Renesas Linux kernel v5.10 repos [1].
Link: https://github.com/renesas-rz/rz_linux-cip.git
Cc: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
Signed-off-by: Hugo Villeneuve <hvilleneuve@xxxxxxxxxxxx>
---
.../gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c | 186 ++++++++++++++++++
.../drm/renesas/rz-du/rzg2l_mipi_dsi_regs.h | 54 +++++
2 files changed, 240 insertions(+)
diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c b/drivers/gpu/d=
rm/renesas/rz-du/rzg2l_mipi_dsi.c
index 91e1a9adad7d6..50ec109aa6ed3 100644
--- a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
+++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi.c
@@ -4,8 +4,11 @@
*
* Copyright (C) 2022 Renesas Electronics Corporation
*/
+
+#include <linux/bitfield.h>
#include <linux/clk.h>
#include <linux/delay.h>
+#include <linux/dma-mapping.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/module.h>
@@ -23,9 +26,12 @@
#include <drm/drm_of.h>
#include <drm/drm_panel.h>
#include <drm/drm_probe_helper.h>
+#include <video/mipi_display.h>
=20
#include "rzg2l_mipi_dsi_regs.h"
=20
+#define RZG2L_DCS_BUF_SIZE 128 /* Maximum DCS buffer size in external memo=
ry. */
+
struct rzg2l_mipi_dsi {
struct device *dev;
void __iomem *mmio;
@@ -44,6 +50,10 @@ struct rzg2l_mipi_dsi {
unsigned int num_data_lanes;
unsigned int lanes;
unsigned long mode_flags;
+
+ /* DCS buffer pointers when using external memory. */
+ dma_addr_t dcs_buf_phys;
+ u8 *dcs_buf_virt;
};
=20
static inline struct rzg2l_mipi_dsi *
@@ -267,6 +277,7 @@ static int rzg2l_mipi_dsi_startup(struct rzg2l_mipi_dsi=
*dsi,
u32 clkbfht;
u32 clkstpt;
u32 golpbkt;
+ u32 dsisetr;
int ret;
=20
/*
@@ -328,6 +339,15 @@ static int rzg2l_mipi_dsi_startup(struct rzg2l_mipi_ds=
i *dsi,
lptrnstsetr =3D LPTRNSTSETR_GOLPBKT(golpbkt);
rzg2l_mipi_dsi_link_write(dsi, LPTRNSTSETR, lptrnstsetr);
=20
+ /*
+ * Increase MRPSZ as the default value of 1 will result in long read
+ * commands payload not being saved to memory.
+ */
+ dsisetr =3D rzg2l_mipi_dsi_link_read(dsi, DSISETR);
+ dsisetr &=3D ~DSISETR_MRPSZ;
+ dsisetr |=3D FIELD_PREP(DSISETR_MRPSZ, RZG2L_DCS_BUF_SIZE);
+ rzg2l_mipi_dsi_link_write(dsi, DSISETR, dsisetr);
+
return 0;
=20
err_phy:
@@ -659,9 +679,168 @@ static int rzg2l_mipi_dsi_host_detach(struct mipi_dsi=
_host *host,
return 0;
}
=20
+static ssize_t rzg2l_mipi_dsi_read_response(struct rzg2l_mipi_dsi *dsi,
+ const struct mipi_dsi_msg *msg) {
+ u8 *msg_rx =3D msg->rx_buf;
+ u8 datatype;
+ u32 result;
+ u16 size;
+
+ result =3D rzg2l_mipi_dsi_link_read(dsi, RXRSS0R);
+ if (result & RXRSS0R_RXPKTDFAIL) {
+ dev_err(dsi->dev, "packet rx data did not save correctly\n");
+ return -EPROTO;
+ }
+
+ if (result & RXRSS0R_RXFAIL) {
+ dev_err(dsi->dev, "packet rx failure\n");
+ return -EPROTO;
+ }
+
+ if (!(result & RXRSS0R_RXSUC))
+ return -EPROTO;
+
+ datatype =3D FIELD_GET(RXRSS0R_DT, result);
+
+ switch (datatype) {
+ case 0:
+ dev_dbg(dsi->dev, "ACK\n");
+ return 0;
+ case MIPI_DSI_RX_END_OF_TRANSMISSION:
+ dev_dbg(dsi->dev, "EoTp\n");
+ return 0;
+ case MIPI_DSI_RX_ACKNOWLEDGE_AND_ERROR_REPORT:
+ dev_dbg(dsi->dev, "Acknowledge and error report: $%02x%02x\n",
+ (u8)FIELD_GET(RXRSS0R_DATA1, result),
+ (u8)FIELD_GET(RXRSS0R_DATA0, result));
+ return 0;
+ case MIPI_DSI_RX_DCS_SHORT_READ_RESPONSE_1BYTE:
+ case MIPI_DSI_RX_GENERIC_SHORT_READ_RESPONSE_1BYTE:
+ msg_rx[0] =3D FIELD_GET(RXRSS0R_DATA0, result);
+ return 1;
+ case MIPI_DSI_RX_DCS_SHORT_READ_RESPONSE_2BYTE:
+ case MIPI_DSI_RX_GENERIC_SHORT_READ_RESPONSE_2BYTE:
+ msg_rx[0] =3D FIELD_GET(RXRSS0R_DATA0, result);
+ msg_rx[1] =3D FIELD_GET(RXRSS0R_DATA1, result);
+ return 2;
+ case MIPI_DSI_RX_GENERIC_LONG_READ_RESPONSE:
+ case MIPI_DSI_RX_DCS_LONG_READ_RESPONSE:
+ size =3D FIELD_GET(RXRSS0R_WC, result);
+
+ if (size > msg->rx_len) {
+ dev_err(dsi->dev, "rx buffer too small");
+ return -ENOSPC;
+ }
+
+ memcpy(msg_rx, dsi->dcs_buf_virt, size);
+ return size;
+ default:
+ dev_err(dsi->dev, "unhandled response type: %02x\n", datatype);
+ return -EPROTO;
+ }
+}
+
+static ssize_t rzg2l_mipi_dsi_host_transfer(struct mipi_dsi_host *host,
+ const struct mipi_dsi_msg *msg) {
+ struct rzg2l_mipi_dsi *dsi =3D host_to_rzg2l_mipi_dsi(host);
+ struct mipi_dsi_packet packet;
+ bool need_bta;
+ u32 value;
+ int ret;
+
+ ret =3D mipi_dsi_create_packet(&packet, msg);
+ if (ret < 0)
+ return ret;
+
+ /* Terminate operation after this descriptor is finished */
+ value =3D SQCH0DSC0AR_NXACT_TERM;
+
+ if (msg->flags & MIPI_DSI_MSG_REQ_ACK) {
+ need_bta =3D true; /* Message with explicitly requested ACK */
+ value |=3D FIELD_PREP(SQCH0DSC0AR_BTA, SQCH0DSC0AR_BTA_NON_READ);
+ } else if (msg->rx_buf && msg->rx_len > 0) {
+ need_bta =3D true; /* Read request */
+ value |=3D FIELD_PREP(SQCH0DSC0AR_BTA, SQCH0DSC0AR_BTA_READ);
+ } else {
+ need_bta =3D false;
+ value |=3D FIELD_PREP(SQCH0DSC0AR_BTA, SQCH0DSC0AR_BTA_NONE);
+ }
+
+ /* Set transmission speed */
+ if (msg->flags & MIPI_DSI_MSG_USE_LPM)
+ value |=3D SQCH0DSC0AR_SPD_LOW;
+ else
+ value |=3D SQCH0DSC0AR_SPD_HIGH;
+
+ /* Write TX packet header */
+ value |=3D FIELD_PREP(SQCH0DSC0AR_DT, packet.header[0]) |
+ FIELD_PREP(SQCH0DSC0AR_DATA0, packet.header[1]) |
+ FIELD_PREP(SQCH0DSC0AR_DATA1, packet.header[2]);
+
+ if (mipi_dsi_packet_format_is_long(msg->type)) {
+ value |=3D SQCH0DSC0AR_FMT_LONG;
+
+ if (packet.payload_length > RZG2L_DCS_BUF_SIZE) {
+ dev_err(dsi->dev, "Packet Tx payload size (%d) too large",
+ (unsigned int)packet.payload_length);
+ return -ENOSPC;
+ }
+
+ /* Copy TX packet payload data to memory space */
+ memcpy(dsi->dcs_buf_virt, packet.payload, packet.payload_length);
+ } else {
+ value |=3D SQCH0DSC0AR_FMT_SHORT;
+ }
+
+ rzg2l_mipi_dsi_link_write(dsi, SQCH0DSC0AR, value);
+
+ /*
+ * Write: specify payload data source location, only used for
+ * long packet.
+ * Read: specify payload data storage location of response
+ * packet. Note: a read packet is always a short packet.
+ * If the response packet is a short packet or a long packet
+ * with WC =3D 0 (no payload), DTSEL is meaningless.
+ */
+ rzg2l_mipi_dsi_link_write(dsi, SQCH0DSC0BR,=20
+SQCH0DSC0BR_DTSEL_MEM_SPACE);
+
+ /*
+ * Set SQCHxSR.AACTFIN bit when descriptor actions are finished.
+ * Read: set Rx result save slot number to 0 (ACTCODE).
+ */
+ rzg2l_mipi_dsi_link_write(dsi, SQCH0DSC0CR, SQCH0DSC0CR_FINACT);
+
+ /* Set rx/tx payload data address, only relevant for long packet. */
+ rzg2l_mipi_dsi_link_write(dsi, SQCH0DSC0DR, (u32)dsi->dcs_buf_phys);
+
+ /* Start sequence 0 operation */
+ value =3D rzg2l_mipi_dsi_link_read(dsi, SQCH0SET0R);
+ value |=3D SQCH0SET0R_START;
+ rzg2l_mipi_dsi_link_write(dsi, SQCH0SET0R, value);
+
+ /* Wait for operation to finish */
+ ret =3D read_poll_timeout(rzg2l_mipi_dsi_link_read,
+ value, value & SQCH0SR_ADESFIN,
+ 2000, 20000, false, dsi, SQCH0SR);
+ if (ret =3D=3D 0) {
+ /* Success: clear status bit */
+ rzg2l_mipi_dsi_link_write(dsi, SQCH0SCR, SQCH0SCR_ADESFIN);
+
+ if (need_bta)
+ ret =3D rzg2l_mipi_dsi_read_response(dsi, msg);
+ else
+ ret =3D packet.payload_length;
+ }
+
+ return ret;
+}
+
static const struct mipi_dsi_host_ops rzg2l_mipi_dsi_host_ops =3D {
.attach =3D rzg2l_mipi_dsi_host_attach,
.detach =3D rzg2l_mipi_dsi_host_detach,
+ .transfer =3D rzg2l_mipi_dsi_host_transfer,
};
=20
/* -----------------------------------------------------------------------=
------
@@ -779,6 +958,11 @@ static int rzg2l_mipi_dsi_probe(struct platform_device=
*pdev)
if (ret < 0)
goto err_pm_disable;
=20
+ dsi->dcs_buf_virt =3D dma_alloc_coherent(dsi->host.dev, RZG2L_DCS_BUF_SIZ=
E,
+ &dsi->dcs_buf_phys, GFP_KERNEL);
+ if (!dsi->dcs_buf_virt)
+ return -ENOMEM;
+
return 0;
=20
err_phy:
@@ -793,6 +977,8 @@ static void rzg2l_mipi_dsi_remove(struct platform_devic=
e *pdev) {
struct rzg2l_mipi_dsi *dsi =3D platform_get_drvdata(pdev);
=20
+ dma_free_coherent(dsi->host.dev, RZG2L_DCS_BUF_SIZE, dsi->dcs_buf_virt,
+ dsi->dcs_buf_phys);
mipi_dsi_host_unregister(&dsi->host);
pm_runtime_disable(&pdev->dev);
}
diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi_regs.h b/drivers/=
gpu/drm/renesas/rz-du/rzg2l_mipi_dsi_regs.h
index 1dbc16ec64a4b..26d8a37ee6351 100644
--- a/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi_regs.h
+++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_mipi_dsi_regs.h
@@ -81,6 +81,20 @@
#define RSTSR_SWRSTLP (1 << 1)
#define RSTSR_SWRSTHS (1 << 0)
=20
+/* DSI Set Register */
+#define DSISETR 0x120
+#define DSISETR_MRPSZ GENMASK(15, 0)
+
+/* Rx Result Save Slot 0 Register */
+#define RXRSS0R 0x240
+#define RXRSS0R_RXPKTDFAIL BIT(28)
+#define RXRSS0R_RXFAIL BIT(27)
+#define RXRSS0R_RXSUC BIT(25)
+#define RXRSS0R_DT GENMASK(21, 16)
+#define RXRSS0R_DATA1 GENMASK(15, 8)
+#define RXRSS0R_DATA0 GENMASK(7, 0)
+#define RXRSS0R_WC GENMASK(15, 0) /* Word count for long packet. */
+
/* Clock Lane Stop Time Set Register */
#define CLSTPTSETR 0x314
#define CLSTPTSETR_CLKKPT(x) ((x) << 24)
@@ -148,4 +162,44 @@
#define VICH1HPSETR_HFP(x) (((x) & 0x1fff) << 16)
#define VICH1HPSETR_HBP(x) (((x) & 0x1fff) << 0)
=20
+/* Sequence Channel 0 Set 0 Register */
+#define SQCH0SET0R 0x5c0
+#define SQCH0SET0R_START BIT(0)
+
+/* Sequence Channel 0 Status Register */
+#define SQCH0SR 0x5d0
+#define SQCH0SR_ADESFIN BIT(8)
+
+/* Sequence Channel 0 Status Clear Register */
+#define SQCH0SCR 0x5d4
+#define SQCH0SCR_ADESFIN BIT(8)
+
+/* Sequence Channel 0 Descriptor 0-A Register */
+#define SQCH0DSC0AR 0x780
+#define SQCH0DSC0AR_NXACT_TERM 0 /* Bit 28 */
+#define SQCH0DSC0AR_BTA GENMASK(27, 26)
+#define SQCH0DSC0AR_BTA_NONE 0
+#define SQCH0DSC0AR_BTA_NON_READ 1
+#define SQCH0DSC0AR_BTA_READ 2
+#define SQCH0DSC0AR_BTA_ONLY 3
+#define SQCH0DSC0AR_SPD_HIGH 0
+#define SQCH0DSC0AR_SPD_LOW BIT(25)
+#define SQCH0DSC0AR_FMT_SHORT 0
+#define SQCH0DSC0AR_FMT_LONG BIT(24)
+#define SQCH0DSC0AR_DT GENMASK(21, 16)
+#define SQCH0DSC0AR_DATA1 GENMASK(15, 8)
+#define SQCH0DSC0AR_DATA0 GENMASK(7, 0)
+
+/* Sequence Channel 0 Descriptor 0-B Register */
+#define SQCH0DSC0BR 0x784
+#define SQCH0DSC0BR_DTSEL_MEM_SPACE BIT(24) /* Use external memory */
+
+/* Sequence Channel 0 Descriptor 0-C Register */
+#define SQCH0DSC0CR 0x788
+#define SQCH0DSC0CR_FINACT BIT(0)
+#define SQCH0DSC0CR_AUXOP BIT(22)
+
+/* Sequence Channel 0 Descriptor 0-D Register */
+#define SQCH0DSC0DR 0x78c
+
#endif /* __RZG2L_MIPI_DSI_REGS_H__ */
--
2.39.5
Return-Path: <linux-kernel+bounces-673515-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 5532741E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:24:45 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 572103A5118
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:24:23 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 791E31DED69;
Wed, 4 Jun 2025 16:24:39 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="KJfXl3ER"
Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 366AE339A1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:24:36 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749054278; cv=none; b=jd6mpGfPHsb6ZlTtIBNJl7wsS9vjeF3PnUEGEktw8CSxgkAnTWdoWLi89O76zGuaZCHNSubCk2OVifby/D8igjrO8rKoXYLvXvgryQEwzKBdGRf3Aq7iloKwpi1JFcr0xZgNjwf7an3/OYafXEQbiM/GHYhQVqDcQTXNWLqnG+U=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749054278; c=relaxed/simple;
bh=PO3jUPStlFmT1m2wkC43j6GeI16ajnRuXqsKw7nCnHw=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=ku3ib6b72uFUKwPKFQ7X8IuV30Z/jA9kSg2szEY75NlStO29+VZN/0krDaMdM9TNhZMhkZ+jAfI+x+TI7hkeK4IM7BxPv8n2nKuFu5qxoNtK2CLkLRgyzoPnCnu3tfb1b8/lJ5WB2P2djPstBzsxjrk36P8m33mPcyk7D6upfGA=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=KJfXl3ER; arc=none smtp.client-ip=205.220.168.131
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com
Received: from pps.filterd (m0279863.ppops.net [127.0.0.1])
by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5548B4Ns027453
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:24:36 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h=
cc:content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=qcppdkim1; bh=
UmqjCOK/2PV+3jpeh7XZghC3MKfY9pGurM7qJBU/Zyc=; b=KJfXl3ERFqlZhjj3
21STEtvBdDAbkpQsizC8Gvb74Fv8Nse5ic109dL5yKJ8iNC3iOoIFq+CP3iOrC1o
wEQEq1qUJdXVV/jDWF3WlfpysKmCxf04km6UJRU6/RxRKsoj11Aigttyp7jwcR/R
Cdbm6AnzT0EVPlC6uHfswTs2rAWCRks3cxKpmFy7AWedXgbHqLU+6lABjF7lp1Xj
pxmDEG8Nq/Ze0tSnAeWoggdg2D+0v9BR5A4iowj6cRLjsMLCkaQuXRb+BPn6Xg3a
1orNNQx+eRrZ7iREFvp/41TkodY9XfWP+IJkSGDYjWAUyRudElRWQ/FBEDVWGvms
GKO+Kg==
Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72])
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 471g8t6q8x-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT)
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 16:24:36 +0000 (GMT)
Received: by mail-pj1-f72.google.com with SMTP id 98e67ed59e1d1-310efe825ccso14995a91.3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 09:24:36 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749054275; x=1749659075;
h=content-transfer-encoding:in-reply-to:content-language:from
:references:cc:to:subject:user-agent:mime-version:date:message-id
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=UmqjCOK/2PV+3jpeh7XZghC3MKfY9pGurM7qJBU/Zyc=;
b=TTlftSSHfwTZE+IC5lbq/QI2ENwpEya0NChyTuP8l9cFLN7xoczW5eu/W7+4D3m2ZU
Z+B58H6izbrDouKJPj6ef4kna0zcWgj0uC7WMJmopmVWqKtYX4Rko+ZHpdHrZrWOvAtx
rpRYf8gffR1u+4SF+wdb0zBwynmG195DsBNfAD+dV8TF6kc+LtvqSIdTpdRIit9k/RgC
k9hF1+f0gGAPBUFeDKwk8uwjQ2n2BXAUTxRPm5A4wep+HyYVmPlG+nAS5q/G/giGRaux
M+KQW+L8HYAktN6GTZj0f3gRIXJ9/L85Igy8FHb03se2Ou4PKFrT3rIvvrvQ6T4T5hJJ
M5PQ==
X-Forwarded-Encrypted: i=1; AJvYcCXi/Y9mRSMONbO7m2TZFFqqqWR+itm33NsEnwbWlABxuttcBj4kyzH+KJCsydGg0ET90Yl+n65MZ++G0vY=@vger.kernel.org
X-Gm-Message-State: AOJu0YxJWKr+rSlONlk7+FxarF0iR+XOLCNBxbWxGK9lffBqdls0fYZO
Wgwunxzm2qlKqHTIy1196aQ6KpL+318XkEl8hzkcz0T9Q1Z5rH4Ch95zmCKNDAuV1TIdziJLl0v
6uSPRhgc3wE3Llvh5B/Yks7nydeh65VNjyfInzIEyGPyespa8xIHxhO8ZpzIJ3QtCaa4=
X-Gm-Gg: ASbGncve5FOP7HR++5t7mhEumORxD5/v63mCLEP6WNAdCs3znpXqoxvpYwhOgjDteV5
w60B+t1C1dpXsdiRjIS1yyydl6+Mgwdo6YLaQYC4r5S7nhD22WaN/ERMys4xIaSdIH8p0C/2Hkm
wu7WT8fLL+ta1YWdXQKt8zIUtY+a0g4Clmt5odYauGqVZdE5vffMKrP+WvtQdhN561Gjzqfc+V6
lvjifDc0U+eakKKIIFNaZKE3nOmyl3seAqbkkEjhyq60E5PpHpTgKdqnzZno+4Gr4HMWR5pZZfT
kmTA/f3a7pAkvETgJrH49QX1TSC6UNeCGEtH9+zaa50tj6mYFHUF7d4ZxZKFRI9Y7NU=
X-Received: by 2002:a17:90b:48cc:b0:311:2f5:6b1 with SMTP id 98e67ed59e1d1-3130cd3c193mr4541065a91.22.1749054275293;
Wed, 04 Jun 2025 09:24:35 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IEyeX7AH3Z2qmV4RyPhkzwExHjRAMbx65+A1uhcePobw4T+CSD/5pREJy2bkxvhQy4rzQER5Q==
X-Received: by 2002:a17:90b:48cc:b0:311:2f5:6b1 with SMTP id 98e67ed59e1d1-3130cd3c193mr4541044a91.22.1749054274900;
Wed, 04 Jun 2025 09:24:34 -0700 (PDT)
Received: from [10.227.110.203] (i-global254.qualcomm.com. [199.106.103.254])
by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3124e2d1689sm9089572a91.12.2025.06.04.09.24.33
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 09:24:34 -0700 (PDT)
Message-ID: <50555c1a-c200-4ac0-8dfb-424ff121b41d@xxxxxxxxxxxxxxxx>
Date: Wed, 4 Jun 2025 09:24:32 -0700
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH 1/3] wifi: ath11k: fix dest ring-buffer corruption
To: Miaoqing Pan <quic_miaoqing@xxxxxxxxxxx>, Johan Hovold
<johan@xxxxxxxxxx>,
Baochen Qiang <quic_bqiang@xxxxxxxxxxx>
Cc: Johan Hovold <johan+linaro@xxxxxxxxxx>,
Jeff Johnson
<jjohnson@xxxxxxxxxx>, linux-wireless@xxxxxxxxxxxxxxx,
ath11k@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
stable@xxxxxxxxxxxxxxx
References: <20250526114803.2122-1-johan+linaro@xxxxxxxxxx>
<20250526114803.2122-2-johan+linaro@xxxxxxxxxx>
<026b710f-b50f-4302-ad4f-36932c2558ff@xxxxxxxxxxx>
<aD1axxSAJsbUfnHH@xxxxxxxxxxxxxxxxxxxx>
<5268c9ba-16cf-4d3a-87df-bbe0ddd3d584@xxxxxxxxxxx>
<aD7h0OOoGjVm8pDK@xxxxxxxxxxxxxxxxxxxx>
<01634993-80b1-496e-8453-e94b2efe658c@xxxxxxxxxxx>
From: Jeff Johnson <jeff.johnson@xxxxxxxxxxxxxxxx>
Content-Language: en-US
In-Reply-To: <01634993-80b1-496e-8453-e94b2efe658c@xxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Authority-Analysis: v=2.4 cv=eJQTjGp1 c=1 sm=1 tr=0 ts=68407344 cx=c_pps
a=RP+M6JBNLl+fLTcSJhASfg==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17
a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10 a=VwQbUJbxAAAA:8 a=COk6AnOGAAAA:8
a=OOj_HejH6eEqbjqsXVoA:9 a=QEXdDO2ut3YA:10 a=iS9zxrgQBfv6-_F4QbHw:22
a=TjNXssC_j7lpFel5tvFf:22
X-Proofpoint-ORIG-GUID: Z9YjwYEsreRyweYvuuPSjgcNH6lQ7fpC
X-Proofpoint-GUID: Z9YjwYEsreRyweYvuuPSjgcNH6lQ7fpC
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDEyNSBTYWx0ZWRfXyXiue4fuHgjZ
UVkQ6g4GTY/+KKZP2/W+u4bvZnNU7Fy5ZWup+/s7GAZUXgS7I1Nswc3EzOBJ7a5/HuEucXwTXhz
zjVzu2D52zwCesVGAd3eDrKTqLdFTVrdHzJ1LVqwzFHAK/reTmj2e01LgSznqvx/WH3XDXyWNPM
J9Ut8DlOaonIG6IM6gN4vimR2NY9N0EKEV3rhFnVwD0sTmMimP8KGSRqGYXOxyVMxv8BUBm6jds
jzRMXrRaoVWZ6abQ4J3mQpfUZQkjBhPVrSjuLzAZWEJ8NkZ5fJDJ0rTLQowlFkuSour7r23y/+I
nccbgfbV5lIHcCkXLOxUtLnKOyGb2B7f0oCTuVQ6+05EzEkMSq5ZR5oIHlvuOt9y3v+rb/reEyl
7Q8aAeNNaWVl6/oG7nhCb5cwlXikvHbTb4sUiHVuf7otUwSpNeNYSQTROkbPQWUXiInftUDa
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
malwarescore=0 adultscore=0 lowpriorityscore=0 clxscore=1015
priorityscore=1501 bulkscore=0 mlxlogscore=999 impostorscore=0 spamscore=0
phishscore=0 mlxscore=0 suspectscore=0 classifier=spam authscore=0 authtc=n/a
authcc= route=outbound adjust=0 reason=mlx scancount=1
engine=8.19.0-2505280000 definitions=main-2506040125
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 6/3/2025 7:34 PM, Miaoqing Pan wrote:
We previously had extensive discussions on this topic in the
https://lore.kernel.org/linux-wireless/ecfe850c-b263-4bee-b888-c34178e690fc@xxxxxxxxxxx/
thread. On my platform, dma_rmb() did not work as expected. The issue
only disappeared after disabling PCIe endpoint relaxed ordering in
firmware side. So it seems that HP was updated (Memory write) before
descriptor (Memory write), which led to the problem.
Have all ath11k and ath12k firmware been updated to prevent this problem from
the firmware side?
Or do we need both the barriers and the logic to retry reading the descriptor?
Return-Path: <linux-kernel+bounces-673516-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id D771041E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:24:58 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 0465B176B6A
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:25:00 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id C949E1E4928;
Wed, 4 Jun 2025 16:24:41 +0000 (UTC)
Received: from smtp-42a8.mail.infomaniak.ch (smtp-42a8.mail.infomaniak.ch [84.16.66.168])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id DC0031AF0A7
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:24:37 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=84.16.66.168
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749054281; cv=none; b=Li+YfG349et+Zka86Fs6sUqZNwVQi1LckNJq8t9lqx5Fdr5IYi0n51djkS9uW2IKVbg1F9VR0JqPvjTg6Rb9QsJ8aRAvyYegpmCF7yb73PnYdQaAmXzB2T1m5b29ZbYeKsw+3rC4sPPI+87TK3y3crpSO54rCGggYZuFbmmqh8U=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749054281; c=relaxed/simple;
bh=qjXjUJymlImoU6MaTAesmTEEzR86Afl/s/bf6nLcYPw=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=s5kslE1r6+2E3g0Zdmi6+1ltgrWk9ztAtmYAKOJxUVo/QGyPpZWub082+3vdRWXU7pR1Q6rGcbRPMUQMW/KeKFZ3cKKU5WbwyNdDD5xn+4DIEX69xESR/FK0EJncPww1iOGfhXEgccI7YfFshSSJYd1M2ogaNEdc/mc7dTmVxuA=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=0leil.net; spf=pass smtp.mailfrom=0leil.net; arc=none smtp.client-ip=84.16.66.168
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=0leil.net
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=0leil.net
Received: from smtp-3-0001.mail.infomaniak.ch (unknown [IPv6:2001:1600:4:17::246c])
by smtp-3-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4bCCRs1k0Vz2q8;
Wed, 4 Jun 2025 18:18:17 +0200 (CEST)
Received: from unknown by smtp-3-0001.mail.infomaniak.ch (Postfix) with ESMTPA id 4bCCRr39Q3zXxC;
Wed, 4 Jun 2025 18:18:16 +0200 (CEST)
From: Quentin Schulz <foss+kernel@xxxxxxxxx>
Date: Wed, 04 Jun 2025 18:18:08 +0200
Subject: [PATCH v3] arm64: dts: rockchip: support Ethernet Switch adapter
for RK3588 Jaguar
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <20250604-jaguar-mezz-eth-switch-v3-1-c68123240f9e@xxxxxxxxx>
X-B4-Tracking: v=1; b=H4sIAL9xQGgC/4XNTQ6CMBCG4auQrh1DCwV05T2Mi/4MtCaCaWsVC
He3sGJjXL5fMs/MxKOz6Mk5m4nDaL0d+hTFISPKiL5DsDo1YTnjOWcU7qJ7CQcPnCbAYMC/bVA
Gal6WvNVU1YyTdPx02NrPBl9vqY31YXDj9ifSdf1LRgo5nCRXZYNSNlV9UQadG48ayUpGtmeKn
wwDCkKhbmRbVZTpPbMsyxcrQaQRAwEAAA==
X-Change-ID: 20250521-jaguar-mezz-eth-switch-75445fd1c725
To: Rob Herring <robh@xxxxxxxxxx>, Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>, Heiko Stuebner <heiko@xxxxxxxxx>
Cc: Jakob Unterwurzacher <jakob.unterwurzacher@xxxxxxxxx>,
devicetree@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx,
linux-rockchip@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
Quentin Schulz <quentin.schulz@xxxxxxxxx>
X-Mailer: b4 0.14.2
X-Infomaniak-Routing: alpha
X-Spam-Status: No, score=-3.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
From: Quentin Schulz <quentin.schulz@xxxxxxxxx>
This adds support for the Ethernet Switch adapter connected to the
mezzanine connector on RK3588 Jaguar.
This adapter has a KSZ9896 Ethernet Switch with 4 1GbE Ethernet
connectors, two user controllable LEDs, and an M12 12-pin connector
which exposes the following signals:
- RS232/RS485 (max 250Kbps/500Kbps, RX pin1, TX pin2)
- two digital inputs (pin4 routed to GPIO3_C5 on SoC, pin5 to GPIO4_B4)
- two digital outputs (pin7 routed to GPIO3_D3 on SoC, pin8 to
GPIO3_D1)
- two analog inputs (pin10 to channel1 of ADS1015, pin11 to channel2)
Signed-off-by: Quentin Schulz <quentin.schulz@xxxxxxxxx>
---
@Andrew, I haven't forgotten the request for adding tx-internal-delay-ps
support to RK3588 GMAC but it wouldn't change the Device Tree for Jaguar
as we have the delay on the PHY side only.
I have a patch that needs testing and then will send it for review.
---
Changes in v3:
- fixed comment style in i2c1,
- added link to manual (content half broken at the moment but will be
fixed soon (tm)),
- Link to v2: https://lore.kernel.org/r/20250523-jaguar-mezz-eth-switch-v2-1-aced8bf6612d@xxxxxxxxx
Changes in v2:
- removed patch 1 adding ethernet1 alias to jaguar base DTS,
- added ethernet1 alias in the DTSO,
- change rgmii phy-mode to rgmii-id and have the delay in the PHY
instead, as suggested by Andrew,
- Link to v1: https://lore.kernel.org/r/20250521-jaguar-mezz-eth-switch-v1-0-9b5c48ebb867@xxxxxxxxx
---
arch/arm64/boot/dts/rockchip/Makefile | 5 +
.../rockchip/rk3588-jaguar-ethernet-switch.dtso | 195 +++++++++++++++++++++
2 files changed, 200 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
index 4bf84622db473696f64b157ba94560f476d4f52f..1321f54da28ad6aefae7eccf02ad95a4ee2264d5 100644
--- a/arch/arm64/boot/dts/rockchip/Makefile
+++ b/arch/arm64/boot/dts/rockchip/Makefile
@@ -160,6 +160,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-firefly-itx-3588j.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-friendlyelec-cm3588-nas.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-h96-max-v58.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-jaguar.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-jaguar-ethernet-switch.dtbo
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-jaguar-pre-ict-tester.dtbo
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-mnt-reform2.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-nanopc-t6.dtb
@@ -233,6 +234,10 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-edgeble-neu6b-wifi.dtb
rk3588-edgeble-neu6b-wifi-dtbs := rk3588-edgeble-neu6b-io.dtb \
rk3588-edgeble-neu6a-wifi.dtbo
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-jaguar-ethernet-switch.dtb
+rk3588-jaguar-ethernet-switch-dtbs := rk3588-jaguar.dtb \
+ rk3588-jaguar-ethernet-switch.dtbo
+
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-jaguar-pre-ict-tester.dtb
rk3588-jaguar-pre-ict-tester-dtbs := rk3588-jaguar.dtb \
rk3588-jaguar-pre-ict-tester.dtbo
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-jaguar-ethernet-switch.dtso b/arch/arm64/boot/dts/rockchip/rk3588-jaguar-ethernet-switch.dtso
new file mode 100644
index 0000000000000000000000000000000000000000..7d9b1f080b3fcc9e19ff4973e90b763bfaa573b5
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/rk3588-jaguar-ethernet-switch.dtso
@@ -0,0 +1,195 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2025 Cherry Embedded Solutions GmbH
+ *
+ * Device Tree Overlay for the Ethernet Switch adapter for the Mezzanine
+ * connector on RK3588 Jaguar
+ * (manual: https://embedded.cherry.de/jaguar-ethernet-switch-user-manual/)
+ *
+ * This adapter has a KSZ9896 Ethernet Switch with 4 1GbE Ethernet connectors,
+ * two user controllable LEDs, and an M12 12-pin connector which exposes the
+ * following signals:
+ * - RS232/RS485 (max 250Kbps/500Kbps, RX pin1, TX pin2)
+ * - two digital inputs (pin4 routed to GPIO3_C5 on SoC, pin5 to GPIO4_B4)
+ * - two digital outputs (pin7 routed to GPIO3_D3 on SoC, pin8 to GPIO3_D1)
+ * - two analog inputs (pin10 to channel1 of ADS1015, pin11 to channel2)
+ *
+ * RK3588 Jaguar can be powered entirely through the adapter via the M8 3-pin
+ * connector (12-24V).
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/clock/rockchip,rk3588-cru.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/rockchip.h>
+
+&{/} {
+ aliases {
+ ethernet1 = "/ethernet@fe1c0000";
+ };
+
+ mezzanine-leds {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&led_usr1_pin &led_usr2_pin>;
+
+ led-1 {
+ gpios = <&gpio1 RK_PC1 GPIO_ACTIVE_HIGH>;
+ label = "USR1";
+ };
+
+ led-2 {
+ gpios = <&gpio3 RK_PC4 GPIO_ACTIVE_HIGH>;
+ label = "USR2";
+ };
+ };
+};
+
+&gmac1 {
+ clock_in_out = "output";
+ phy-mode = "rgmii-id";
+ pinctrl-names = "default";
+ pinctrl-0 = <&gmac1_rx_bus2
+ &gmac1_tx_bus2
+ &gmac1_rgmii_clk
+ &gmac1_rgmii_bus
+ ð1_pins>;
+ rx_delay = <0x0>;
+ tx_delay = <0x0>;
+ status = "okay";
+
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ };
+};
+
+&i2c1 {
+ #address-cells = <1>;
+ /*
+ * ADS1015 can handle high-speed (HS) mode (up to 3.4MHz) on I2C bus,
+ * but SoC can handle only up to 400kHz.
+ */
+ clock-frequency = <400000>;
+ #size-cells = <0>;
+ status = "okay";
+
+ adc@48 {
+ compatible = "ti,ads1015";
+ reg = <0x48>;
+ #address-cells = <1>;
+ interrupt-parent = <&gpio3>;
+ interrupts = <RK_PC7 IRQ_TYPE_EDGE_FALLING>;
+ pinctrl-0 = <&adc_alert>;
+ pinctrl-names = "default";
+ #io-channel-cells = <1>;
+ #size-cells = <0>;
+
+ channel@1 {
+ reg = <5>; /* Single-ended between AIN1 and GND */
+ ti,datarate = <0>;
+ ti,gain = <5>;
+ };
+
+ channel@2 {
+ reg = <6>; /* Single-ended between AIN2 and GND */
+ ti,datarate = <0>;
+ ti,gain = <5>;
+ };
+ };
+
+ switch@5f {
+ compatible = "microchip,ksz9896";
+ reg = <0x5f>;
+ interrupt-parent = <&gpio3>;
+ interrupts = <RK_PB7 IRQ_TYPE_EDGE_FALLING>; /* ETH_INTRP_N */
+ pinctrl-0 = <ð_reset_n ð_intrp_n>;
+ pinctrl-names = "default";
+ reset-gpios = <&gpio3 RK_PB6 GPIO_ACTIVE_LOW>; /* ETH_RESET */
+ microchip,synclko-disable; /* CLKO_25_125 only routed to TP1 */
+
+ ethernet-ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ lan1: port@0 {
+ reg = <0>;
+ label = "ETH1";
+ };
+
+ lan2: port@1 {
+ reg = <1>;
+ label = "ETH2";
+ };
+
+ lan3: port@2 {
+ reg = <2>;
+ label = "ETH3";
+ };
+
+ lan4: port@3 {
+ reg = <3>;
+ label = "ETH4";
+ };
+
+ port@5 {
+ reg = <5>;
+ ethernet = <&gmac1>;
+ label = "CPU";
+ phy-mode = "rgmii-id";
+ rx-internal-delay-ps = <2000>;
+ tx-internal-delay-ps = <2000>;
+
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ };
+ };
+ };
+ };
+};
+
+&pinctrl {
+ adc {
+ adc_alert: adc-alert-irq {
+ rockchip,pins =
+ <3 RK_PC7 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
+
+ ethernet {
+ eth_intrp_n: eth-intrp-n {
+ rockchip,pins =
+ <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ eth_reset_n: eth-reset-n {
+ rockchip,pins =
+ <3 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ leds {
+ led_usr1_pin: led-usr1-pin {
+ rockchip,pins =
+ <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
+ };
+
+ led_usr2_pin: led-usr2-pin {
+ rockchip,pins =
+ <3 RK_PC4 RK_FUNC_GPIO &pcfg_pull_down>;
+ };
+ };
+};
+
+&uart9 {
+ /* GPIO3_D0/EN_RS485_MODE for switching between RS232 and RS485 */
+ pinctrl-0 = <&uart9m2_xfer &uart9m2_rtsn>;
+ pinctrl-names = "default";
+ linux,rs485-enabled-at-boot-time;
+ status = "okay";
+};
---
base-commit: 5abc7438f1e9d62e91ad775cc83c9594c48d2282
change-id: 20250521-jaguar-mezz-eth-switch-75445fd1c725
Best regards,
--
Quentin Schulz <quentin.schulz@xxxxxxxxx>
Return-Path: <linux-kernel+bounces-673517-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 4C66341E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:25:16 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id D0D747A98EB
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:23:55 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 571A41DFDBB;
Wed, 4 Jun 2025 16:25:03 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="Qge8JJvd"
Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 778B718DB0D;
Wed, 4 Jun 2025 16:25:00 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749054302; cv=none; b=DhwBGIsqimJ838N0GFrgb40UU/p/Y4H4/O5XbMmSiUSB/m5zdcKP76iw5Lr/1+TquMOXmKl8MJFKg1n59S5Kxqx4QYfUkwCOZMoMKSGT+7mziDsoaZpe1YDgBb5+rYKc6v9Y6q3gU88JA0NdvnYZRnslF5jyw92J9Q5flA74WdI=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749054302; c=relaxed/simple;
bh=87W48LqVY/aMuSheLPpnBNAoFGMDeu7rhmQlYwPnwdk=;
h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=iWTvarJd2wVyK03wlXtpKkz6xvitkuNjHnb9dmxxhYvJIVqhyaVkx87aryumXOSmGVkTcpoBvY0P3aOWnaMtnqcte2VLXROhGNowHEUECoi3ALx6ZpAwDQu/+GI7H/Ejg++BJVSP3Xz2qJhUBDrQevgx8kEbu9iF/lgnqI9qMbw=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=Qge8JJvd; arc=none smtp.client-ip=205.220.180.131
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com
Received: from pps.filterd (m0279869.ppops.net [127.0.0.1])
by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5549256e012946;
Wed, 4 Jun 2025 16:24:56 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=
cc:content-type:date:from:in-reply-to:message-id:mime-version
:references:subject:to; s=qcppdkim1; bh=xksDVfmyMji+kYXngBYT/on4
bbpSsAwyMiFwj7QJ/ro=; b=Qge8JJvd+NC37P/XOKTvAH2tk9tS8ZSIUjUoUW+i
XWD5MLndsOYiAJBE9KzEqe7C+WhmDqFlv3JyIVkcMADadmrZpRQGYrX1bnI5awNl
+4x4KS8iJ3SHmLP4wDlDU0E7Bf7BsjQtswe5hraAlrKmkWbs1G6RvvJ2j400ZesJ
wg/guvUYYF3SDxOd1Feb4scVKEicDRmI9YjxUJtc0u2ignlP7kGBgQjzu/jvC/NA
f3rQW4ON9zZKItUxa6FAoiw/Dny640+0vTU9YMZ6Ar3nyRXpAvUzCDLO2Ca72L9D
6oWP/m2rthg72Ssh3L5TV4j2oqq5VGBipFVpeuNADCIPpQ==
Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20])
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 47202wcb9b-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 16:24:56 +0000 (GMT)
Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197])
by NALASPPMTA04.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 554GOtV6015416
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 4 Jun 2025 16:24:55 GMT
Received: from hu-wasimn-hyd.qualcomm.com (10.80.80.8) by
nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.2.1544.9; Wed, 4 Jun 2025 09:24:48 -0700
Date: Wed, 4 Jun 2025 21:54:38 +0530
From: Wasim Nazir <quic_wasimn@xxxxxxxxxxx>
To: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
CC: Bjorn Andersson <andersson@xxxxxxxxxx>,
Konrad Dybcio
<konradybcio@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski
<krzk+dt@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>, <linux-arm-msm@xxxxxxxxxxxxxxx>,
<devicetree@xxxxxxxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>,
<kernel@xxxxxxxxxxx>, <kernel@xxxxxxxxxxxxxxxx>,
Pratyush Brahma <quic_pbrahma@xxxxxxxxxxx>,
Prakash Gupta <quic_guptap@xxxxxxxxxxx>
Subject: Re: [PATCH v9 2/4] arm64: dts: qcom: iq9: Introduce new memory map
for qcs9100/qcs9075
Message-ID: <aEBzNnnyqt/aZ35r@xxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20250530092850.631831-1-quic_wasimn@xxxxxxxxxxx>
<20250530092850.631831-3-quic_wasimn@xxxxxxxxxxx>
<ss3xhat6v3s4ivcypw6fqcmblqait56pqhzwuhzyfhevp4kzlr@5e3f5nwb6lhb>
<aEATe3pi1SsfZVI3@xxxxxxxxxxxxxxxxxxxxxxxxxx>
<q3hzryk4s7jd4kyavcg7s6d3oyzfpnjy4jhpeluvnikiglbeng@r4ydugwidgv7>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <q3hzryk4s7jd4kyavcg7s6d3oyzfpnjy4jhpeluvnikiglbeng@r4ydugwidgv7>
X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To
nalasex01b.na.qualcomm.com (10.47.209.197)
X-QCInternal: smtphost
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085
X-Proofpoint-ORIG-GUID: QjUTpZFUt24HSENUyB9pNlAsHz4BwPro
X-Proofpoint-GUID: QjUTpZFUt24HSENUyB9pNlAsHz4BwPro
X-Authority-Analysis: v=2.4 cv=Y/D4sgeN c=1 sm=1 tr=0 ts=68407358 cx=c_pps
a=ouPCqIW2jiPt+lZRy3xVPw==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17
a=GEpy-HfZoHoA:10 a=kj9zAlcOel0A:10 a=6IFa9wvqVegA:10 a=VwQbUJbxAAAA:8
a=COk6AnOGAAAA:8 a=wt0p8g2Xs4n1KaSH9c4A:9 a=CjuIK1q_8ugA:10
a=TjNXssC_j7lpFel5tvFf:22
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDEyNSBTYWx0ZWRfXyzhnEDRPmatr
P8zCi4SZfRxKz/8SI9kfuhuhlpdHIlHNZvnUsnJ06oW6Cmw7BSlbhnmpWTGDtDD9cQKlvP0wu3/
VuzpJAOsGe2i8xqAGfBev2ySQOWXmFU6RmJAiln2/Rd1l0DecsY2j/VSqPjJVD5OIjw6NZM6bAM
RY6Q7GwylCJsLIJ+a1ullbH21pARhXAEEW3HmOobf2cw6379BiebeX/S+mWyYfoSRpHAs6eJLkr
iKrUXhKF+KoM5JVvPyNGYp9sr5LV73ZJi3YQsD4oXd0kcwYjsqr+YYdnzDVOMj7d1RKWIGAZvT4
rUTAx/ZLkonqCMw6enLxRMZ/rLV9/HSe20zzanauEpTCRng2ghfNNqDrxhocE39bJjddAS4Cktl
9bPExlQ5eyu3m89Q19DCLwGNeh9mSK8XW9V/Y+o878omQzmJT7mqokWvoMoScDjifOPSUL5m
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
clxscore=1015 priorityscore=1501 spamscore=0 adultscore=0 impostorscore=0
lowpriorityscore=0 phishscore=0 mlxscore=0 mlxlogscore=999 malwarescore=0
bulkscore=0 suspectscore=0 classifier=spam authscore=0 authtc=n/a authcc=
route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000
definitions=main-2506040125
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 04:21:46PM +0300, Dmitry Baryshkov wrote:
On Wed, Jun 04, 2025 at 03:05:55PM +0530, Wasim Nazir wrote:
> On Mon, Jun 02, 2025 at 10:41:39AM -0500, Bjorn Andersson wrote:
> > On Fri, May 30, 2025 at 02:58:45PM +0530, Wasim Nazir wrote:
> > > From: Pratyush Brahma <quic_pbrahma@xxxxxxxxxxx>
> > >
> > > SA8775P has a memory map which caters to the auto specific requirements.
> >
> > I thought SA8775P was the IoT platform and SA8255P was the automotive
> > one. Has this changed?
>
> Both SA8775P & SA8255P is for auto but former one is non-SCMI based while
> the later one is SCMI based chip.
>
> Only IQ9 series of chips (QCS9100 & QCS9075) are for IOT.
>
> >
> > > QCS9100 & QCS9075 are its IOT variants (with marketing name as IQ9) which
> > > inherit the memory map of SA8775P require a slightly different memory
> > > map as compared to SA8775P auto parts.
> > > This new memory map is applicable for all the IoT boards which inherit
> > > the initial SA8775P memory map. This is not applicable for non-IoT
> >
> > Is there are platform out there that actually uses the "initial SA8775P
> > memory map"?
>
> Yes currently sa8775p-ride and sa8775p-ride-r3 are using initial memory
> map.
>
> >
> > > boards.
> > >
> > > Some new carveouts (viz. gunyah_md and a few pil dtb carveouts) have been
> > > introduced as part of firmware updates for IoT. The size and base address
> > > have been updated for video PIL carveout compared to SA8775P since it is
> > > being brought up for the first time on IoT boards. The base addresses
> > > of the rest of the PIL carveouts have been updated to accommodate the
> > > change in size of video since PIL regions are relocatable and their
> > > functionality is not impacted due to this change. The size of camera
> > > pil has also been increased without breaking any feature.
> > >
> > > The size of trusted apps carveout has also been reduced since it is
> > > sufficient to meet IoT requirements. Also, audio_mdf_mem & tz_ffi_mem
> > > carveout and its corresponding scm reference has been removed as these
> > > are not required for IoT parts.
> > >
> > > Incorporate these changes in the updated memory map.
> > >
> > > Signed-off-by: Pratyush Brahma <quic_pbrahma@xxxxxxxxxxx>
> > > Signed-off-by: Prakash Gupta <quic_guptap@xxxxxxxxxxx>
> > > Signed-off-by: Wasim Nazir <quic_wasimn@xxxxxxxxxxx>
> > > ---
> > > .../boot/dts/qcom/iq9-reserved-memory.dtsi | 113 ++++++++++++++++++
> > > 1 file changed, 113 insertions(+)
> > > create mode 100644 arch/arm64/boot/dts/qcom/iq9-reserved-memory.dtsi
> > >
> > > diff --git a/arch/arm64/boot/dts/qcom/iq9-reserved-memory.dtsi b/arch/arm64/boot/dts/qcom/iq9-reserved-memory.dtsi
> > > new file mode 100644
> > > index 000000000000..ff2600eb5e3d
> > > --- /dev/null
> > > +++ b/arch/arm64/boot/dts/qcom/iq9-reserved-memory.dtsi
> >
> > The naming convention is <soc>-<something>.dtsi and I don't see any
> > other uses of the "iq9" naming.
>
> As this new memory map is common for IQ9 series of SoC (QCS9100 &
> QCS9075), so we have used its common name.
IQ9 name is not known or visible outside of this commit.
Are you referring to add the same in cover-letter?
> Once the DT structure for QCS9100 is refactored, we would update this
> common file there.
Can you refactor it first?
This refactoring involves changes in all the ride/ride-r3 boards which
are based on sa8775p & qcs9100. Even though we had sent v0[1] but we still
need to conclude on the final structure. Since, ethernet is broken in upstream,
we are working on its fix before sending another series.
Hence, we want to proceed for iq9075-evk for now and once qcs9100 is
finalized, we can use the memory-map there.
But to avoid this dependency and to proceed with iq9075-evk alone,
I can rename it to qcs9075-reserved-memory.dtsi.
Let me know if that works here.
[1] https://lore.kernel.org/all/20250507065116.353114-1-quic_wasimn@xxxxxxxxxxx/
>
> >
--
With best wishes
Dmitry
Regards,
Wasim
Return-Path: <linux-kernel+bounces-673518-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 54A7141E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:25:58 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id E87773A544F
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:25:34 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 480F41E0DEA;
Wed, 4 Jun 2025 16:25:47 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="RB8BIpHd"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 795E1339A1;
Wed, 4 Jun 2025 16:25:46 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749054346; cv=none; b=iXZ+emyUKnEMAqqZbQu9P21cZtww+kf2LFTcw2zmWXfuVq8i9kHaa1i81PQYD6SGb+md+Rr4F5QyEiQSCinzB7uzlXYRVIsf/3mLGkxZAzlJ8zMXgV8Bc0L2VcIDn2BbwZggWEjsWG29S3b2eV7NWTSsfsLeSAX/hHUQRzKpjn4=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749054346; c=relaxed/simple;
bh=ghWPhTJt8vtU/IFkZSAXQHMW5a8nxv+PINVZ/OZqkAQ=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=j1zlC0TJKH8YvpgrXzSlBlvCiU7FgVDhi3cQoRye/Pv2G3CBF5sLYntkzNtARS3SxfpT2SHSOo1Tu3Nud5MNJkgtsXgHCcN1tIH0bPZ1yZuPfKC4zVBppR8HLwz/UKfIpsJul8yXALt4DPIyohWGYBD593ja68+pw2emRuwkD3I=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=RB8BIpHd; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 647F0C4CEE4;
Wed, 4 Jun 2025 16:25:45 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749054345;
bh=ghWPhTJt8vtU/IFkZSAXQHMW5a8nxv+PINVZ/OZqkAQ=;
h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
b=RB8BIpHdGyIOP+ZMGEj9My7w1u3/zdQFKRAKSB2KnrlZyS46581SBgBip0r/ATuJN
tTsF6Kyb9q4XzqtCj+j1idCwZMCq68jfE2vqO87sry+de6j1PJFckCmkq7TChQIUPs
xRcJW58dWb25CW+Mt5Arqe/du2QfeIIL+rz6eVj08qgLadKtv3UxUKhFvEooAkUpZX
XCKqFwImpwE+4J0908tC/rO1LXfWB6m1NN/de91WtAn89yONW0nN/luRPQE0V5wL7e
0R3ATaLXYnEPGNF87cB7dzsNPK44LJLHsxeMKQGXPN8YlhOfMp+ldxUBQihgaMTk0j
VTcmlDR0cEKJw==
Date: Wed, 4 Jun 2025 19:25:42 +0300
From: Jarkko Sakkinen <jarkko@xxxxxxxxxx>
To: Blaise Boscaccy <bboscaccy@xxxxxxxxxxxxxxxxxxx>
Cc: Paul Moore <paul@xxxxxxxxxxxxxx>, zeffron@xxxxxxxxxxxxx,
xiyou.wangcong@xxxxxxxxx, kysrinivasan@xxxxxxxxx, code@xxxxxxxxxxx,
linux-security-module@xxxxxxxxxxxxxxx, roberto.sassu@xxxxxxxxxx,
James.Bottomley@xxxxxxxxxxxxxxxxxxxxx,
Alexei Starovoitov <ast@xxxxxxxxxx>,
Daniel Borkmann <daniel@xxxxxxxxxxxxx>,
John Fastabend <john.fastabend@xxxxxxxxx>,
Andrii Nakryiko <andrii@xxxxxxxxxx>,
Martin KaFai Lau <martin.lau@xxxxxxxxx>,
Eduard Zingerman <eddyz87@xxxxxxxxx>, Song Liu <song@xxxxxxxxxx>,
Yonghong Song <yonghong.song@xxxxxxxxx>,
KP Singh <kpsingh@xxxxxxxxxx>, Stanislav Fomichev <sdf@xxxxxxxxxxx>,
Hao Luo <haoluo@xxxxxxxxxx>, Jiri Olsa <jolsa@xxxxxxxxxx>,
David Howells <dhowells@xxxxxxxxxx>, Lukas Wunner <lukas@xxxxxxxxx>,
Ignat Korchagin <ignat@xxxxxxxxxxxxxx>,
Quentin Monnet <qmo@xxxxxxxxxx>,
Jason Xing <kerneljasonxing@xxxxxxxxx>,
Willem de Bruijn <willemb@xxxxxxxxxx>,
Anton Protopopov <aspsk@xxxxxxxxxxxxx>,
Jordan Rome <linux@xxxxxxxxxxxxxx>,
Martin Kelly <martin.kelly@xxxxxxxxxxxxxxx>,
Alan Maguire <alan.maguire@xxxxxxxxxx>,
Matteo Croce <teknoraver@xxxxxxxx>, bpf@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, keyrings@xxxxxxxxxxxxxxx,
linux-crypto@xxxxxxxxxxxxxxx
Subject: Re: [PATCH 1/3] bpf: Add bpf_check_signature
Message-ID: <aEBzhhqab75jE080@xxxxxxxxxx>
References: <20250528215037.2081066-1-bboscaccy@xxxxxxxxxxxxxxxxxxx>
<20250528215037.2081066-2-bboscaccy@xxxxxxxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20250528215037.2081066-2-bboscaccy@xxxxxxxxxxxxxxxxxxx>
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, May 28, 2025 at 02:49:03PM -0700, Blaise Boscaccy wrote:
This introduces signature verification for eBPF programs inside of the
s/This introduces signature verification/Introduce a signature verification ???/
I.e. Explain what sort of "thing" is "signature verification thing" ...
BR, Jarkko
Return-Path: <linux-kernel+bounces-673519-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 2630241E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:26:58 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id EC2E27A517E
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:25:37 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 55F781DE4E3;
Wed, 4 Jun 2025 16:26:50 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Sg8txfAy"
Received: from mail-ot1-f48.google.com (mail-ot1-f48.google.com [209.85.210.48])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 05127339A1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:26:47 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.48
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749054409; cv=none; b=qI7gU1axnH5raoX2pXJUTUq8axChvePBvpP6Q+k0sZEZMnPyggUyCR3ZnqFT54/05FbH5AkPudSoIxZjc7rqYbplsp7CS6a0cIQHqNbDUBuCG5ofxm+W9hfWN73K4nyjj8TZqP+ErK/BV3Lv23U/JpV1LZWhwBLsregfbNtqs1M=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749054409; c=relaxed/simple;
bh=b2Jp9y1aS3dq0K/b3a9Q4JLHQgTnLOLgMzTeqWA6jGU=;
h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:
MIME-Version:Content-Type; b=F4Jl21xMhDCinmrkmHk7KEqZ85/oQ3MgH6e3AVIOu/jLY2f1yWw04emTDc2NW5KWVcLX8SO/fBL1sNwP2M67jhfsnh+cRdNc28Hx9EwyyxrHDa/EPsT/Hx/k1V+dSFLdDnFTpnyFJE62Joaj0WfyRBHj76+vC4J95OOGP3RJcSE=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=Sg8txfAy; arc=none smtp.client-ip=209.85.210.48
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com
Received: by mail-ot1-f48.google.com with SMTP id 46e09a7af769-735ae79a44bso5786362a34.2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 09:26:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=google.com; s=20230601; t=1749054407; x=1749659207; darn=vger.kernel.org;
h=mime-version:references:message-id:in-reply-to:subject:cc:to:from
:date:from:to:cc:subject:date:message-id:reply-to;
bh=ll3GQZZx1aAM5fgTmVcrO9i0nGXI4VPhhW9oOfi4ATE=;
b=Sg8txfAyFJrCWHpvrorCXdZqmFvZ4Ap+tkrZyBW3nqp/q8eITQ2sX/Ac1qhSOcl7CT
EHOJXtZFXkTJg+h4IK1ghZK1vplWw54mH8PTiHScDPS6H8TowE0cccD2IaiztfhWwK89
fJfznLME5OQYHa+Asilr091z0nwJWqIdtpuvJdpEyRNOz2brMZ1+bb9mIXn++BDMLDyO
u35wJZnLJaKUWiKQFOo7aK5/w6SxjBB3+ucHXta8THu8Sg5BL6IXzHf3dlQ5NpSjVCuo
6R2orCRFXdf8T1FRGUpMWJ5rdHInUbdXeWCUnAPV9uYRpry9m+HNLHGehdYoeuMhy1Ww
itxw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749054407; x=1749659207;
h=mime-version:references:message-id:in-reply-to:subject:cc:to:from
:date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=ll3GQZZx1aAM5fgTmVcrO9i0nGXI4VPhhW9oOfi4ATE=;
b=R+yldbaFxrxw8V1/B+KgVLcKTbDiRW9bMTCVm/Iy1hiiLB8LQO6jHZQ2PM40FXFQtA
5Mti6zDNl2rCCwvckEZsani49uoOW66Tuvp0GWPJoBr+J2Bs8kkDV6W6hsqy6HndhG3S
ddZlESQ+u+x8C7x9Ilvfk7Qmc+5O/YFU2JGEbR6ZSWFYAKk+lOYVpVLrknFrzgKJ7Sg4
1ooN5DmugznI/9PvYa00AGBUSm5/hi8z1iiV+FO4K8xeFCGHnv+mQzR39O0G8+t9PTAn
D9wqRt82WejKYOCnzTDz6Z/UWln/KsMSi2AfK/jdeajfMZQPp9xCR4qKIi/n8UmNb6cU
hoow==
X-Forwarded-Encrypted: i=1; AJvYcCURyObFP9ahsv9SNexvCm2vj6/TGtgx2kBBS17AJpOOBMuS4vQu7VGWhm2ZagRG27jtmUMCer4EgM+LlM8=@vger.kernel.org
X-Gm-Message-State: AOJu0YxAUEIL1KV8UvksrzagMfXXpTt8siOt20rog/c19oaRWTgRVkFh
wq97Xdaj4d6+Rh/IWUUtwJev2UVueJ6Q7a6lQRhoMgTcIk623YEehQCXsgglBxSJS2iDeW77C/G
wYmboaw==
X-Gm-Gg: ASbGncswoiR5B5Xrhcjud5LWIm9sneTshyBwQNdmRbpsjsFA+TMqAEHwxTigm+o1dRm
qjKB+u0Lci0d1p5CWRvdcwd0n7K3ObeXs/RSBa+Sm0HQz2PHh2ExSuT+KGS5hDdmaIh10UemtMC
d3acADTlaes0+KPGjE80mdWHkUswvLr95AGhJfkRkt7yqoHpz+jbAueYfo5iaipGGgkdcwtCYgv
tADqDD0evBMIPIvEBGx23kFoj+xvLAGJdfrkzNw/BHRQnycqxlAGRC67uiPAfVK108mC7BnuIDW
YbKAxkvlK0M2CBFFmDmLvF7kvPhoX311pfMs/mvdxv5p+q/3ZV4M/vHk4FwrpqsrQeZWma7vwCi
b8y2N+uLdV5EE74R8yIj1f9z+KCbxXAnfCHGTXeXfnovvYA==
X-Google-Smtp-Source: AGHT+IGSJuYZ5PsSec3GKgHBhYBIFvpgIeA062k15kkewiYaZixAYmRU9waq5Y86IJBjw0vOZ1huZA==
X-Received: by 2002:a05:6808:99a:b0:408:e711:9a8 with SMTP id 5614622812f47-408f0f68e39mr2160313b6e.15.1749054396518;
Wed, 04 Jun 2025 09:26:36 -0700 (PDT)
Received: from darker.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147])
by smtp.gmail.com with ESMTPSA id 5614622812f47-40678d038c0sm2244681b6e.46.2025.06.04.09.26.33
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 09:26:35 -0700 (PDT)
Date: Wed, 4 Jun 2025 09:26:21 -0700 (PDT)
From: Hugh Dickins <hughd@xxxxxxxxxx>
To: =?UTF-8?Q?Thomas_Hellstr=C3=B6m?= <thomas.hellstrom@xxxxxxxxxxxxxxx>
cc: Steven Rostedt <rostedt@xxxxxxxxxxx>, LKML <linux-kernel@xxxxxxxxxxxxxxx>,
Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>,
Matthew Wilcox <willy@xxxxxxxxxxxxx>, linux-mm@xxxxxxxxx,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
Christian Koenig <christian.koenig@xxxxxxx>, Huang Rui <ray.huang@xxxxxxx>,
Matthew Auld <matthew.auld@xxxxxxxxx>,
Matthew Brost <matthew.brost@xxxxxxxxx>, dri-devel@xxxxxxxxxxxxxxxxxxxxx,
Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>,
Maxime Ripard <mripard@xxxxxxxxxx>,
Thomas Zimmermann <tzimmermann@xxxxxxx>, David Airlie <airlied@xxxxxxxxx>,
Simona Vetter <simona@xxxxxxxx>
Subject: Re: [PATCH v2] drm/ttm: Fix compile error when CONFIG_SHMEM is not
set
In-Reply-To: <6b3a37712330ec4b17968075f71296717db54046.camel@xxxxxxxxxxxxxxx>
Message-ID: <d996ffad-42f1-1643-e44e-e837b2e3949d@xxxxxxxxxx>
References: <20250604085121.324be8c1@xxxxxxxxxxxxxxxxxx> <6b3a37712330ec4b17968075f71296717db54046.camel@xxxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="-1463770367-1698767313-1749054395=:6218"
X-Spam-Status: No, score=-11.0 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
---1463770367-1698767313-1749054395=:6218
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: QUOTED-PRINTABLE
On Wed, 4 Jun 2025, Thomas Hellstr=C3=B6m wrote:
On Wed, 2025-06-04 at 08:51 -0400, Steven Rostedt wrote:
> From: Steven Rostedt <rostedt@xxxxxxxxxxx>
>=20
> When CONFIG_SHMEM is not set, the following compiler error occurs:
>=20
> ld: vmlinux.o: in function `ttm_backup_backup_page':
> (.text+0x10363bc): undefined reference to `shmem_writeout'
> make[3]: ***
> [/work/build/trace/nobackup/linux.git/scripts/Makefile.vmlinux:91:
> vmlinux.unstripped] Error 1
> make[2]: *** [/work/build/trace/nobackup/linux.git/Makefile:1241:
> vmlinux] Error 2
> make[1]: *** [/work/build/trace/nobackup/linux.git/Makefile:248:
> __sub-make] Error 2
> make[1]: Leaving directory '/work/build/nobackup/tracetest'
> make: *** [Makefile:248: __sub-make] Error 2
>=20
> This is due to the replacement of writepage and calling
> swap_writeout()
> and shmem_writeout() directly. The issue is that when CONFIG_SHMEM is
> not
> defined, shmem_writeout() is also not defined.
>=20
> The function ttm_backup_backup_page() called mapping->a_ops-
> >writepage()
> which was then changed to call shmem_writeout() directly.
>=20
> Even before commit 84798514db50 ("mm: Remove swap_writepage() and
> shmem_writepage()"), it didn't make sense to call anything other than
> shmem_writeout() as the ttm_backup deals only with shmem folios.
>=20
> Have DRM_TTM config option select SHMEM to guarantee that
> shmem_writeout()
> is available.
>=20
> Link:
> https://lore.kernel.org/all/20250602170500.48713a2b@xxxxxxxxxxxxxxxxxx/
>=20
> Suggested-by: Hugh Dickins <hughd@xxxxxxxxxx>
> Fixes: 84798514db50 ("mm: Remove swap_writepage() and
> shmem_writepage()")
> Signed-off-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx>
> ---
> Changes since v1:
> https://lore.kernel.org/all/20250602170500.48713a2b@xxxxxxxxxxxxxxxxxx/
>=20
> - Instead of adding a shmem_writeout() stub, just make CONFIG_DRM_TTM
> =C2=A0 select CONFIG_SHMEM (Hugh Dickins)
>=20
> =C2=A0drivers/gpu/drm/Kconfig | 1 +
> =C2=A01 file changed, 1 insertion(+)
>=20
> diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
> index f094797f3b2b..ded28c71d89c 100644
> --- a/drivers/gpu/drm/Kconfig
> +++ b/drivers/gpu/drm/Kconfig
> @@ -188,6 +188,7 @@ source "drivers/gpu/drm/display/Kconfig"
> =C2=A0config DRM_TTM
> =C2=A0=09tristate
> =C2=A0=09depends on DRM && MMU
> +=09select SHMEM
> =C2=A0=09help
> =C2=A0=09=C2=A0 GPU memory management subsystem for devices with multip=
le
> =C2=A0=09=C2=A0 GPU memory types. Will be enabled automatically if a
> device driver
=20
Reviewed-by: Thomas Hellstr=C3=B6m <thomas.hellstrom@xxxxxxxxxxxxxxx>
Acked-by: Hugh Dickins <hughd@xxxxxxxxxx>
Thanks a lot!
---1463770367-1698767313-1749054395=:6218--
Return-Path: <linux-kernel+bounces-673520-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 177FC41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:28:10 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id E62E73A4CD7
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:27:46 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 0B05E1DF990;
Wed, 4 Jun 2025 16:28:02 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="GGDTKJDd"
Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id C1B52339A1;
Wed, 4 Jun 2025 16:27:59 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.158.5
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749054481; cv=none; b=QAXyggpiP8zzhH1Y2jaMd1geg0irfAjBAGIMMxCEl8Z6bIFDsRXabo3EAKTsMqaD9TlvUz+mEoi88RKmt4AYwbY0dJ708iaG8PUWlFBN6QjxUWH7iJFzg4Hf53ocWOGtZPSlKbUufPCBwEDL4CAjdaDPzxDmjMAYc/oPJYgv4Ac=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749054481; c=relaxed/simple;
bh=M5CwoT9fT6WRXkVfDF7hfLXgzn+49k9G+Q1xlBia7Ck=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=KCtwYVxTIP8R7gzv3upjjA0g4rNd9lPWNP0jGl+htZ6k7nVtep7UnFqhX51LtmGVnjXBg8xQKtJJOcl0Yz6dq4pknOIwknFQtaDVgq7DDayxLh7tfcFVUaMvROfFFgnVcvJ9lKOnwqv5KXfaU19WghA85lyCjRUuTxAiFTp72eU=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=GGDTKJDd; arc=none smtp.client-ip=148.163.158.5
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com
Received: from pps.filterd (m0356516.ppops.net [127.0.0.1])
by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 554C8Fku031727;
Wed, 4 Jun 2025 16:27:56 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc
:content-type:date:from:in-reply-to:message-id:mime-version
:references:subject:to; s=pp1; bh=odV9eqRZtddxv8cXsVKaJfeGVY72dp
B5o5Jyqa1hHPg=; b=GGDTKJDdyFUUgdnHT8bHLAcvAeBZC4sdD4sUduWm8Ix9pZ
BQqhb8GrMiPX7KIGcZGd5Jvzsy6GYWVKN9YlLeMInYeSwVR/5vwHKG5zC8Odi00X
crkOyaKJNd7h8L5IZYpHjjRUTAlVzzlzk6Zk8E43zUp4q8KFsjxgf1JDZRQPnqrE
F/dL59kjCNkCDsRY5gC0jxMHBfws3dNaIc8vw+TOs5juMtnOHp4U54UjFTzXU44u
mHeeLuWLmT/yI9On8PDHLRB6aOSpBXunQUeovxITEHxVeKm57MiLTUv31VtuJ1pj
761wnilUJPkjhFn/c3DYQdJGFiXnBNBft5JnJMoQ==
Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93])
by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 471geyushx-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 16:27:55 +0000 (GMT)
Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1])
by ppma23.wdc07v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 554FgW7s024914;
Wed, 4 Jun 2025 16:27:55 GMT
Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229])
by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 470dkmgjc9-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 16:27:55 +0000
Received: from smtpav07.fra02v.mail.ibm.com (smtpav07.fra02v.mail.ibm.com [10.20.54.106])
by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 554GRpRZ48234854
(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 4 Jun 2025 16:27:51 GMT
Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1])
by IMSVA (Postfix) with ESMTP id 3A2182004E;
Wed, 4 Jun 2025 16:27:51 +0000 (GMT)
Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1])
by IMSVA (Postfix) with ESMTP id E0EED20040;
Wed, 4 Jun 2025 16:27:50 +0000 (GMT)
Received: from li-008a6a4c-3549-11b2-a85c-c5cc2836eea2.ibm.com (unknown [9.155.204.135])
by smtpav07.fra02v.mail.ibm.com (Postfix) with ESMTPS;
Wed, 4 Jun 2025 16:27:50 +0000 (GMT)
Date: Wed, 4 Jun 2025 18:27:49 +0200
From: Alexander Gordeev <agordeev@xxxxxxxxxxxxx>
To: Heiko Carstens <hca@xxxxxxxxxxxxx>
Cc: Claudio Imbrenda <imbrenda@xxxxxxxxxxxxx>,
Janosch Frank <frankja@xxxxxxxxxxxxx>,
Christian Borntraeger <borntraeger@xxxxxxxxxxxxx>,
David Hildenbrand <david@xxxxxxxxxx>,
Sven Schnelle <svens@xxxxxxxxxxxxx>, Vasily Gorbik <gor@xxxxxxxxxxxxx>,
kvm@xxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
Subject: Re: [PATCH] s390/mm: Fix in_atomic() handling in
do_secure_storage_access()
Message-ID: <aEB0BfLG9yM3Gb4u@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20250603134936.1314139-1-hca@xxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20250603134936.1314139-1-hca@xxxxxxxxxxxxx>
X-TM-AS-GCONF: 00
X-Proofpoint-GUID: XXR5RXs-nmhHCVi5aTsnkL_WPjZgyPqb
X-Proofpoint-ORIG-GUID: XXR5RXs-nmhHCVi5aTsnkL_WPjZgyPqb
X-Authority-Analysis: v=2.4 cv=X4dSKHTe c=1 sm=1 tr=0 ts=6840740b cx=c_pps a=3Bg1Hr4SwmMryq2xdFQyZA==:117 a=3Bg1Hr4SwmMryq2xdFQyZA==:17 a=kj9zAlcOel0A:10 a=6IFa9wvqVegA:10 a=kcu79PlnQnCj__8gWF0A:9 a=CjuIK1q_8ugA:10
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDEyMiBTYWx0ZWRfXxreFWSEaAFdM Kw0yp+1C5a0AEsyRQYizXnAiu+q38eNgrMQQ2PUS0RKCGgd4C7fc3rsHaGA9DePfqQLwfpzECXV zAxTy6cf2i5VLAL74qupbQUbV6NwUXV6QS/uNgcffN2LPCUq/YHWtWbFq7IP3mjI3yT8fKnKhnt
EhDrSmG9B++U55a4YudEJSBQFCb7exFxa5m1xQwvBJTynvBVnMm7nmGe+WxaCl/8UBECCQlfPau dYfbJM1sGI5XUN55AQpdMCYhB+fvQzeDbxcIJp9u1FkvmiIS4PkXKJ5f9K1efGCT8+SzohJ4LsE tRwPZFuZ579S7lQdgSByQmHy3lLH3d+jkZS7Vd+V/PbtKNy4jMI2iv4cZwGP8GQj6M4wXRJhhe/
2GAyXj/Q1cW5GRt9G//o8Ma8stXgit0BhErvd3IZbdZnSK5OhOC1Tgn9whdaA3+7wW+O23Gg
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0
priorityscore=1501 lowpriorityscore=0 mlxscore=0 impostorscore=0
mlxlogscore=627 adultscore=0 clxscore=1011 phishscore=0 bulkscore=0
malwarescore=0 spamscore=0 classifier=spam authscore=0 authtc=n/a authcc=
route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000
definitions=main-2506040122
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Tue, Jun 03, 2025 at 03:49:36PM +0200, Heiko Carstens wrote:
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c
index 3829521450dd..e1ad05bfd28a 100644
--- a/arch/s390/mm/fault.c
+++ b/arch/s390/mm/fault.c
@@ -441,6 +441,8 @@ void do_secure_storage_access(struct pt_regs *regs)
if (rc)
BUG();
} else {
+ if (faulthandler_disabled())
+ return handle_fault_error_nolock(regs, 0);
This could trigger WARN_ON_ONCE() in handle_fault_error_nolock():
if (WARN_ON_ONCE(!si_code))
si_code = SEGV_MAPERR;
Would this warning be justified in this case (aka user_mode(regs) == true)?
mm = current->mm;
mmap_read_lock(mm);
vma = find_vma(mm, addr);
Return-Path: <linux-kernel+bounces-673521-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 8DDC041E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:28:33 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 125B63A4492
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:28:11 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 95A091DFE0B;
Wed, 4 Jun 2025 16:28:26 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="P+brBL3G"
Received: from mail-pg1-f202.google.com (mail-pg1-f202.google.com [209.85.215.202])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 75D381DED69
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:28:24 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.202
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749054505; cv=none; b=pdW8ipCKGM3Xghm2GwzNfWPeKMxMs5b4Rw4JxPnTaDnb3xvvlcME9wqdTXJrww3nZzWztauKxzo6QfjrfY8EFAxwmMapmqm0IpsNvdknwbBxwe22bedoY9DdZwN6MqUoQ/X3A2asRK38QcJBGoR6mBAlnWQVt/ca5G9v0VxbD4Q=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749054505; c=relaxed/simple;
bh=ZJyIckFTExpj1Y90auHWc4FV90jywqVwpSKCRNl8zVM=;
h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From:
To:Cc:Content-Type; b=ivpLboILITFsfy/mZBX7fDypL4Z8IP/CExWr9xRptL1yb/iIBjtbpKvmwsJkYRrPSgFgmS2DW4hGDVLEOczuAZeibsTn3/4cgmyFEDMvfdWRT8H9y9pu/bTQUl/oxMGkCB7zPAnFls+3QDjFAPf8/rnxdLGmyb4X1jGz0EHcimA=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=P+brBL3G; arc=none smtp.client-ip=209.85.215.202
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com
Received: by mail-pg1-f202.google.com with SMTP id 41be03b00d2f7-b2c36951518so6373440a12.2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 09:28:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=google.com; s=20230601; t=1749054503; x=1749659303; darn=vger.kernel.org;
h=cc:to:from:subject:message-id:references:mime-version:in-reply-to
:date:from:to:cc:subject:date:message-id:reply-to;
bh=1/PzlSGATB5QLnfIO/9xMz9wdcBK9gS0k4KlE7K+2X4=;
b=P+brBL3GL+WkCqCZG73OPSkr1aeaFNiXEruGWSKDXLPmxdiJxBfu+xZmMeMYQDOBrN
yvWoBMvhf/SjodiTb13kEGg2iIDG584yORArRgQH+6CoLI19I2RV4d4xtdB5u/F2ofvI
bUlWii+utYBh0MBoiBqrZdFPijc4gPRPGFtcS/bsHY9oLzPKdK3YHlQAFT1OYD4ujQjV
hKOcDzPyEKp0N4kjG6bHYhk1gAXCnsRiYgfQs1nP0Fc3dx2BHPiwqMFbYoRONDWoaAwh
hQQCjMbDCE/yck5DLAi33NsXJzp/w0xPVznk10EgLQB9PfgBxE9JAM3f8kvl4/AXkY+A
o9Nw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749054503; x=1749659303;
h=cc:to:from:subject:message-id:references:mime-version:in-reply-to
:date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=1/PzlSGATB5QLnfIO/9xMz9wdcBK9gS0k4KlE7K+2X4=;
b=FxjTLPhzf3ufx9q4l+bY3SVbFWYHBDpRe9vNhB8B3lsbl5DHTz0Oi1IXS2TIAkciNI
+hjtXdR1HCp735A4++aHLBAFeENiyJkYWsE47mmmC6GfjXnuCOyNGYgn43KjO+dinHA6
W8NN8KRGxP9ZXvn+xQov5bChnpVEPSYJHutYn1mcZdjy+TunZZb1pGELetly1EvZ6EHI
hoJkcCLvpbgUGue9EJDsYRYoqd8GVTmuS7wgVjhk3huQ8m7L/N6sFwpeOhW0A+qk2Dbu
tx3Cx5nTgrB6bFsre7AS0/d8VQBbfDhMrVxlVNxtuV+wWSBcuLIBpM4Lw+5N2104NarO
Hndg==
X-Forwarded-Encrypted: i=1; AJvYcCUAnN3hO49s/5JB0ctvQxr/JRjXc3vM+0+pAPm0Lyn4Q9khIju6Z43r7ZPYXvwOjymm00Hoa3iTUWsMMic=@vger.kernel.org
X-Gm-Message-State: AOJu0Yy1GhIgam7gLTB/EsiGfNflnao2/Q4wdADui9WV+iq7TAME+kVh
LNxIYh97rGERbbl9ZvmnTWSwmpGobNci7Itj479qAB2Fiu2ruL3THvDtyCHnwVSfc2JozdUzqYp
UuhNSxQ==
X-Google-Smtp-Source: AGHT+IEKjmRcgY92eBfv/tMGluyG//CiEtS2rija0phY6qR/oNwBHkY8e9r7FMkUXjtbaeAfSjA+T/QL5JE=
X-Received: from pfjt21.prod.google.com ([2002:a05:6a00:21d5:b0:747:a97f:513f])
(user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a21:a24b:b0:1f5:a577:dd10
with SMTP id adf61e73a8af0-21d22c86371mr6166950637.36.1749054503567; Wed, 04
Jun 2025 09:28:23 -0700 (PDT)
Date: Wed, 4 Jun 2025 09:28:21 -0700
In-Reply-To: <a9f3f64c-2f82-40b0-80c0-ed1482861dc2@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
Mime-Version: 1.0
References: <20250529234013.3826933-1-seanjc@xxxxxxxxxx> <20250529234013.3826933-26-seanjc@xxxxxxxxxx>
<a9f3f64c-2f82-40b0-80c0-ed1482861dc2@xxxxxxxxxx>
Message-ID: <aEB0JZJNs3dDZWJx@xxxxxxxxxx>
Subject: Re: [PATCH 25/28] KVM: nSVM: Access MSRPM in 4-byte chunks only for
merging L0 and L1 bitmaps
From: Sean Christopherson <seanjc@xxxxxxxxxx>
To: Paolo Bonzini <pbonzini@xxxxxxxxxx>
Cc: kvm@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
Borislav Petkov <bp@xxxxxxxxx>, Xin Li <xin@xxxxxxxxx>, Chao Gao <chao.gao@xxxxxxxxx>,
Dapeng Mi <dapeng1.mi@xxxxxxxxxxxxxxx>
Content-Type: text/plain; charset="us-ascii"
X-Spam-Status: No, score=-11.0 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025, Paolo Bonzini wrote:
On 5/30/25 01:40, Sean Christopherson wrote:
> @@ -1363,8 +1357,9 @@ void svm_leave_nested(struct kvm_vcpu *vcpu)
> static int nested_svm_exit_handled_msr(struct vcpu_svm *svm)
> {
> - u32 offset, msr, value;
> - int write, mask;
> + u32 offset, msr;
> + int write;
> + u8 value;
> if (!(vmcb12_is_intercept(&svm->nested.ctl, INTERCEPT_MSR_PROT)))
> return NESTED_EXIT_HOST;
> @@ -1372,18 +1367,15 @@ static int nested_svm_exit_handled_msr(struct vcpu_svm *svm)
> msr = svm->vcpu.arch.regs[VCPU_REGS_RCX];
> offset = svm_msrpm_offset(msr);
> write = svm->vmcb->control.exit_info_1 & 1;
> - mask = 1 << ((2 * (msr & 0xf)) + write);
This is wrong. The bit to read isn't always bit 0 or bit 1, therefore mask
needs to remain.
/facepalm
Duh. I managed to forget that multiple MSRs are packed into a byte. Hrm, which
means our nSVM test is even more worthless than I thought. I'll see if I can get
it to detect this bug.
Return-Path: <linux-kernel+bounces-673522-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 5D1C941E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:30:23 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 75631174D83
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:30:24 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id CB15E1DFE12;
Wed, 4 Jun 2025 16:30:17 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LX3EfVya"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0EF331DDA0C;
Wed, 4 Jun 2025 16:30:16 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749054617; cv=none; b=GjMYuikXkdFVA7wTe6lkWJ0UX43Ue+sDiQZK+FNOQbiR1u39+cZPeOklEIqfDL2A37K+Yfm79UJBIBgk7ithwxg4YnCXrW0MqmaGEmNSriBZhBRfBhkPFfF9l7e8SodA/dWGYq2pfH9+t37U00SB9v361cT5jQBofJoXztKtuEw=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749054617; c=relaxed/simple;
bh=1Dkfld7z7Nz/jU3LSfpdgyvyWJ0WOr284arW7DyFew4=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID:
MIME-Version:Content-Type; b=JC9XJK3vlx+Tckgk/SiIt5BSayWj24ckh1/77yRITdNe65IPFV2Lw0v3rvriLf6uLPDSjZcRnVwC3Di3uOBFs1OTI7Z8Qy7RZH911m2G3RWGarxfbdiS6+stoqQF6eCDDasMNgTvYY4MD4qeAIKwSjOY7UWTaVvXOnk3tdJ6Z38=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LX3EfVya; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 98FC8C4CEE4;
Wed, 4 Jun 2025 16:30:08 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749054616;
bh=1Dkfld7z7Nz/jU3LSfpdgyvyWJ0WOr284arW7DyFew4=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
b=LX3EfVyaLIfpmPLwRexknSU0TIIK28XO7r0RXp96qDPl8vwqunyVvHzvdu7yKQ/w/
ux+Mpd3pS3CC6t2zHvMRibzNivZNuP5TJWYptRmWPSTeBxaD7cHPImZFtu2ZZbGXUQ
0EXLq3db7FtfNheso90cWfC1hY35rcEoW5/LeDroePH+N5dq3xd9ECyaykBANnnyDX
WLSNcAqLWbZmvJwB84YEgvrMjyla9/b59NSKpLiYbDK7mATzwdbyf50lyasPXLGtLn
t9SMREzpOgrkiOoXNbjwptAiehjhoFVC7/0suH3ZzB6OM12ZzSizJzetUKFDHT6vNK
GX8Vc8AhBn5oA==
From: Pratyush Yadav <pratyush@xxxxxxxxxx>
To: Pasha Tatashin <pasha.tatashin@xxxxxxxxxx>
Cc: pratyush@xxxxxxxxxx, jasonmiu@xxxxxxxxxx, graf@xxxxxxxxxx,
changyuanl@xxxxxxxxxx, rppt@xxxxxxxxxx, dmatlack@xxxxxxxxxx,
rientjes@xxxxxxxxxx, corbet@xxxxxxx, rdunlap@xxxxxxxxxxxxx,
ilpo.jarvinen@xxxxxxxxxxxxxxx, kanie@xxxxxxxxxxxxxxxxx,
ojeda@xxxxxxxxxx, aliceryhl@xxxxxxxxxx, masahiroy@xxxxxxxxxx,
akpm@xxxxxxxxxxxxxxxxxxxx, tj@xxxxxxxxxx, yoann.congal@xxxxxxxx,
mmaurer@xxxxxxxxxx, roman.gushchin@xxxxxxxxx, chenridong@xxxxxxxxxx,
axboe@xxxxxxxxx, mark.rutland@xxxxxxx, jannh@xxxxxxxxxx,
vincent.guittot@xxxxxxxxxx, hannes@xxxxxxxxxxx,
dan.j.williams@xxxxxxxxx, david@xxxxxxxxxx, joel.granados@xxxxxxxxxx,
rostedt@xxxxxxxxxxx, anna.schumaker@xxxxxxxxxx, song@xxxxxxxxxx,
zhangguopeng@xxxxxxxxxx, linux@xxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, linux-doc@xxxxxxxxxxxxxxx,
linux-mm@xxxxxxxxx, gregkh@xxxxxxxxxxxxxxxxxxx, tglx@xxxxxxxxxxxxx,
mingo@xxxxxxxxxx, bp@xxxxxxxxx, dave.hansen@xxxxxxxxxxxxxxx,
x86@xxxxxxxxxx, hpa@xxxxxxxxx, rafael@xxxxxxxxxx, dakr@xxxxxxxxxx,
bartosz.golaszewski@xxxxxxxxxx, cw00.choi@xxxxxxxxxxx,
myungjoo.ham@xxxxxxxxxxx, yesanishhere@xxxxxxxxx,
Jonathan.Cameron@xxxxxxxxxx, quic_zijuhu@xxxxxxxxxxx,
aleksander.lobakin@xxxxxxxxx, ira.weiny@xxxxxxxxx,
andriy.shevchenko@xxxxxxxxxxxxxxx, leon@xxxxxxxxxx, lukas@xxxxxxxxx,
bhelgaas@xxxxxxxxxx, wagi@xxxxxxxxxx, djeffery@xxxxxxxxxx,
stuart.w.hayes@xxxxxxxxx
Subject: Re: [RFC v2 06/16] luo: luo_subsystems: add subsystem registration
In-Reply-To: <20250515182322.117840-7-pasha.tatashin@xxxxxxxxxx>
References: <20250515182322.117840-1-pasha.tatashin@xxxxxxxxxx>
<20250515182322.117840-7-pasha.tatashin@xxxxxxxxxx>
Date: Wed, 04 Jun 2025 18:30:07 +0200
Message-ID: <mafs0iklbtqpc.fsf@xxxxxxxxxx>
User-Agent: Gnus/5.13 (Gnus v5.13)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Thu, May 15 2025, Pasha Tatashin wrote:
Introduce the framework for kernel subsystems (e.g., KVM, IOMMU, device
drivers) to register with LUO and participate in the live update process
via callbacks.
Subsystem Registration:
- Defines struct liveupdate_subsystem in linux/liveupdate.h,
which subsystems use to provide their name and optional callbacks
(prepare, freeze, cancel, finish). The callbacks accept
a u64 *data intended for passing state/handles.
- Exports liveupdate_register_subsystem() and
liveupdate_unregister_subsystem() API functions.
- Adds drivers/misc/liveupdate/luo_subsystems.c to manage a list
of registered subsystems.
Registration/unregistration is restricted to
specific LUO states (NORMAL/UPDATED).
Callback Framework:
- The main luo_core.c state transition functions
now delegate to new luo_do_subsystems_*_calls() functions
defined in luo_subsystems.c.
- These new functions are intended to iterate through the registered
subsystems and invoke their corresponding callbacks.
FDT Integration:
- Adds a /subsystems subnode within the main LUO FDT created in
luo_core.c. This node has its own compatibility string
(subsystems-v1).
- luo_subsystems_fdt_setup() populates this node by adding a
property for each registered subsystem, using the subsystem's
name.
Currently, these properties are initialized with a placeholder
u64 value (0).
- luo_subsystems_startup() is called from luo_core.c on boot to
find and validate the /subsystems node in the FDT received via
KHO. It panics if the node is missing or incompatible.
- Adds a stub API function liveupdate_get_subsystem_data() intended
for subsystems to retrieve their persisted u64 data from the FDT
in the new kernel.
Signed-off-by: Pasha Tatashin <pasha.tatashin@xxxxxxxxxx>
[...]
+/**
+ * liveupdate_unregister_subsystem - Unregister a kernel subsystem handler from
+ * LUO
+ * @h: Pointer to the same liveupdate_subsystem structure that was used during
+ * registration.
+ *
+ * Unregisters a previously registered subsystem handler. Typically called
+ * during module exit or subsystem teardown. LUO removes the structure from its
+ * internal list; the caller is responsible for any necessary memory cleanup
+ * of the structure itself.
+ *
+ * Return: 0 on success, negative error code otherwise.
+ * -EINVAL if h is NULL.
+ * -ENOENT if the specified handler @h is not found in the registration list.
+ * -EBUSY if LUO is not in the NORMAL state.
+ */
+int liveupdate_unregister_subsystem(struct liveupdate_subsystem *h)
+{
+ struct liveupdate_subsystem *iter;
+ bool found = false;
+ int ret = 0;
+
+ luo_state_read_enter();
+ if (!liveupdate_state_normal() && !liveupdate_state_updated()) {
+ luo_state_read_exit();
+ return -EBUSY;
+ }
+
+ mutex_lock(&luo_subsystem_list_mutex);
+ list_for_each_entry(iter, &luo_subsystems_list, list) {
+ if (iter == h) {
+ found = true;
Nit: you don't actually need the found variable. You can do the same
check that list_for_each_entry() uses, which is to call
list_entry_is_head().
+ break;
+ }
+ }
+
+ if (found) {
+ list_del_init(&h->list);
+ } else {
+ pr_warn("Subsystem handler '%s' not found for unregistration.\n",
+ h->name);
+ ret = -ENOENT;
+ }
+
+ mutex_unlock(&luo_subsystem_list_mutex);
+ luo_state_read_exit();
+
+ return ret;
+}
+EXPORT_SYMBOL_GPL(liveupdate_unregister_subsystem);
[...]
--
Regards,
Pratyush Yadav
Return-Path: <linux-kernel+bounces-673523-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 3FD4F41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:32:37 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 06F643A5416
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:32:15 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id B8DF11DE3DB;
Wed, 4 Jun 2025 16:32:32 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="nW6OZS04";
dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="qfGTnh54"
Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 023D46FC3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:32:29 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749054751; cv=fail; b=s61MEctRqqoacgf5gzhuOaMe9ww+7cIz7pNnc4VAfeeJdIIUTZKkNmQ15iK6LGNpZ4p+cpfGpWvRiJDIlskzvFL0daM04zytzT2lXbY84tvLKA3jPP28bG9mzY0un0SBpL1G5PSxMA9JsTrYoMn15b0MXpnafg6sjLCrNajzfEs=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749054751; c=relaxed/simple;
bh=abS7qUi2e3YR2MVdIavKCYdGFBlCVWvpO+IggeJFnlY=;
h=From:To:Cc:Subject:Date:Message-ID:Content-Type:MIME-Version; b=tThyDef6lrioNnEqMUAFL1hTkdDJkuLALw2Zc9iMlHXQEHXMsL5k0HcM9z5LdJYmAU7D5h7UEtAV6scFpsBFQv5K2cuhQ7cqYNbKMH3w/kNLU6hUADQpEP97fkCzIwYEpeCjCeBB8eXBLlK+etGXXEm5rm85JdcgvoM0aAMbXEk=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=nW6OZS04; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=qfGTnh54; arc=fail smtp.client-ip=205.220.177.32
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com
Received: from pps.filterd (m0246632.ppops.net [127.0.0.1])
by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 554FeEGU009623;
Wed, 4 Jun 2025 16:31:55 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc
:content-transfer-encoding:content-type:date:from:message-id
:mime-version:subject:to; s=corp-2025-04-25; bh=89bRWuNyk2mvuOzk
45CwOMdqpH4xw5mtBuyn7ITrAm8=; b=nW6OZS048BdD7s78yA1eIxLNS2Cg4ZNy
Ol0drhuloeCLmKGIygGQKTrMUgZVrlxLavV7vUelQOuOX2mwa+2H+vA1I2vusKFw
ohZazf32OgLxups7HGZsR5csvbLnXOP23ujObuqBj9yYcfMbUkb4D9p2jXVNVtU+
bzKHb/eH3TbfUUbKdwuWnVJQNQRlv3FZCPSbAHU+KO0bCYobfu6g3VmKokWjJKJX
xXiDrYcssGFkk+Q+/VGrWcCcx+7B8GiJbXiJh4V+vptalRPFJbbaXivnnQc5O6Nf
A4z2U3GO9Yi16eLEZKVT23EF3ZAXlu0YVP6HOrZF/G6CuqcR/DTSxQ==
Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223])
by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 471g8j4f86-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 04 Jun 2025 16:31:54 +0000 (GMT)
Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1])
by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 554F0R0r040614;
Wed, 4 Jun 2025 16:31:54 GMT
Received: from bl2pr02cu003.outbound.protection.outlook.com (mail-eastusazon11010024.outbound.protection.outlook.com [52.101.51.24])
by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 46yr7b82at-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 04 Jun 2025 16:31:54 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=JkwjIV3koaJNcUcycQcTvDrXNPyKvexrvJOdPCLpT3o2LTstxhB7SqEiB0YuBDGP4rSsGeKrLy//Wfze8pBL5IH0b2XOXHyQL0KZaV+9gooFZ/bLQ5bdZsquEV/C//Zp5EHNzttw1wY4I5Zrje4b4Kp+mDyUm2I5tFMEt3YGhE19ZxsjcMUhfKyyvCCNM8+xTVZj0zBS377IDjM84UKxg4ixqJqoIzGs9iADt7L3CTOwS/iU181S6hM+HwHKNcuG7lQDDRWxgXcmatT0nBp0IOycm5mB0G5x5oKP4eIoYvb2MSx1lqY0EUKFEYgHdVygJcp4o8d9zZ8C9W0astWMpg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=89bRWuNyk2mvuOzk45CwOMdqpH4xw5mtBuyn7ITrAm8=;
b=cGdmslJHF/l7/Kciht9+K3TkBuVKFc61trmE7nUaYfOLT2wlPCwsDIrxNPRorj6LyNC8fUBR/UlRcMwb9BKr9iG0qTpdIFnmJQ4rMGTzeCoTSBf4XQbI7WxWGoRDNzJRwF3fHOLScmghUln7FAwNTG2s56nZyhoymqGg/hEoXkcp5xWeiuESV4Klq92j1O0UBXXjVMXctVoQZmEqLMzVIJIInT4I1Z3O3Y66nzB/Im7kpwZTTTObs/xqC1W4+OEeplyGroKmbkQUnUeUz+1kbx5CBugkpLc1kNSDaGu2z7oHyd//NYVdlbRN5/sb66LHn0teSQG1S7c+zAAZqXqFXw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com;
dkim=pass header.d=oracle.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=89bRWuNyk2mvuOzk45CwOMdqpH4xw5mtBuyn7ITrAm8=;
b=qfGTnh54wH9dT4Lq+5eIXS71FiiTQMNwnsilbIECNbEF2RNlaAsff+QSckzI2NTzLkXGsTszy3ahuhO3bY9aZgQDUxrg+xtAeuQddi7wr5Bl+4SOGT5RWYTjWCYlm21k4IjXiRD+cVIpTUymfqz+b9YnetqZqAF2I84uwi5TpRo=
Received: from DM4PR10MB8218.namprd10.prod.outlook.com (2603:10b6:8:1cc::16)
by IA1PR10MB6879.namprd10.prod.outlook.com (2603:10b6:208:421::5) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8813.19; Wed, 4 Jun
2025 16:31:45 +0000
Received: from DM4PR10MB8218.namprd10.prod.outlook.com
([fe80::2650:55cf:2816:5f2]) by DM4PR10MB8218.namprd10.prod.outlook.com
([fe80::2650:55cf:2816:5f2%6]) with mapi id 15.20.8746.041; Wed, 4 Jun 2025
16:31:45 +0000
From: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>
To: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Yu Zhao <yuzhao@xxxxxxxxxx>, Kemeng Shi <shikemeng@xxxxxxxxxxxxxxx>,
Kairui Song <kasong@xxxxxxxxxxx>, Nhat Pham <nphamcs@xxxxxxxxx>,
Baoquan He <bhe@xxxxxxxxxx>, Barry Song <baohua@xxxxxxxxxx>,
Chris Li <chrisl@xxxxxxxxxx>, linux-mm@xxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
Subject: [PATCH] MAINTAINERS: add mm swap section
Date: Wed, 4 Jun 2025 17:31:39 +0100
Message-ID: <20250604163139.126630-1-lorenzo.stoakes@xxxxxxxxxx>
X-Mailer: git-send-email 2.49.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain
X-ClientProxiedBy: LO4P123CA0328.GBRP123.PROD.OUTLOOK.COM
(2603:10a6:600:18c::9) To DM4PR10MB8218.namprd10.prod.outlook.com
(2603:10b6:8:1cc::16)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: DM4PR10MB8218:EE_|IA1PR10MB6879:EE_
X-MS-Office365-Filtering-Correlation-Id: 49c702c5-02d0-4183-e87c-08dda3854baa
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam:
BCL:0;ARA:13230040|7416014|376014|1800799024|366016|7053199007;
X-Microsoft-Antispam-Message-Info:
=?us-ascii?Q?tjZfuBWVkt4hYMf6DvoP/uY3p7jN8meAlZ6bWxbw39qPSCOYFqr4xwhOM+Ns?=
=?us-ascii?Q?lFtr9XpA4+gMeevxU/bC+MuJM9X9Qk+53e0F2J4NvoJp/q1eSy8Kool5TJkV?=
=?us-ascii?Q?z7mclZfMuMN0v7h/GSxxini8vOkgb6zgFmCSsinJKPsUGnrGiURMyoCekTFP?=
=?us-ascii?Q?pXclCF1YaQtmhUPb4dgFTZJqmGD0FjUYzo1ORxk5UORM6AH3Oh0lTMEYP2u5?=
=?us-ascii?Q?jTAz3YGJft7Z4oKqkza30DcWkot+9qiRxkwQkyXuLJsJ67NyFSEfde+T3tzA?=
=?us-ascii?Q?6Vyv2sVz4xOYcRJOqGNh4EL7pt1kONT3jSd0l7nEln5rprA7/R0UgXEu0fPP?=
=?us-ascii?Q?HKgjcGCJoyUmQWwbg+OpzD0ZQ34hfg4+QjCUMhYoZiKPRbWSqsxoUOtzpKsW?=
=?us-ascii?Q?dHgBJNz2UwyDH24j3NPnbWpxM85E2ToH6OtdKCdT7Cbpv5BhnPmxU5hxqdSH?=
=?us-ascii?Q?dXJ4ci4Jo9knPj6i5rmH6MVJ/pV/gFQVSmwhHqA9si1w9Z6v/yYpOLnfKyth?=
=?us-ascii?Q?6BQDOXPPt6+5wXHph/rhhUstSrdPWrJ2BnCRgUMiakqLuE9dG+H54nzzsCCu?=
=?us-ascii?Q?pVFkW0PjPKJBe9UpHgs/pJPeUux999nlbPoyVAloQOCK9W1mRoipQ2SOCBbL?=
=?us-ascii?Q?9fE2Ws5KW/JIyk42ZPenHkqLeBQHADHtVqvew//zhOJb66iQm+jNMgZbIAYL?=
=?us-ascii?Q?MiS9GXQFtozgPxNHPFxRHWQFdn0hsMuzZJci3PdUBFYAE8cVo/p/9WRZ6eDT?=
=?us-ascii?Q?aQTOUn/DgUBrfhSjPZQHs5Bm4LCAK4NLTFDxxiIGgluzhAJvNG/+cEETgBqK?=
=?us-ascii?Q?l6I3h5hTAMVvnKCsteHqU+toV7FqSlr3Yh0jn6xQ8AmcGIUjPgELnjQx5QQA?=
=?us-ascii?Q?Hqw1WqwlvY57/012lJ0ULiMcJcXvQxiIGGtUmeLASEvyTGkgPPqfBURNun/h?=
=?us-ascii?Q?isk8LLbDAT4lrKuEEp6ZWbxoTrVPOaKKgyoY03dVkMZRCzJLlzo3nRR//hoi?=
=?us-ascii?Q?vs68AqQ1ohc4yjkqP49gTlV7LP17LK3eOw0n0POSt2BHEyR+uRhkLHRMc/xh?=
=?us-ascii?Q?A7StBns54EyNqcLKqObH05+E5GdNS2dfKFmyTIMYsN9cxM9nA1lN1X7RJb+R?=
=?us-ascii?Q?KEneAELCy/I+vokt1Fu20nqJIy+GSq6haxGYAqLq8nBccqs/AnoM64x0RL3W?=
=?us-ascii?Q?DvefckxPEaXcV3lXMfMhbZ/ITKLBI0RR2M0nKha5I5Ua48IZrqiNk4iz7AFf?=
=?us-ascii?Q?it+APDjo0MuT7UIB8pQyP4VvVNE/kcNtuyvzUzUlrWtDkIopVMZWQ43IusI0?=
=?us-ascii?Q?a8pvIYM8NV4KT63wqSx4CtvllE6Pdi3keqiAX3Zc+CdqAVT3jl+ZUYVKctJd?=
=?us-ascii?Q?wD32HoLyTxJQvWMSQmGpK5Ux/PRuMTOv93NLQL5Vsm2iad2KaNRwuTM41/u7?=
=?us-ascii?Q?KtUe0P6EJeQ=3D?=
X-Forefront-Antispam-Report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR10MB8218.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(376014)(1800799024)(366016)(7053199007);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0:
=?us-ascii?Q?qAMjGr5atnj0hRLj3FjPud1ZcK1gx0eCwga342sFi0UBUtan3JeLIVPY0dHO?=
=?us-ascii?Q?3IZONUzRjGeI4TjKcUk37MEm3zyrm6VI0VYuY8Z37az1jnZcAyFWqGCQiXek?=
=?us-ascii?Q?oLwdwZch5SfjNPlFClC2p8pP8rVr+ytkuaSEJEcB87IVX33vnArAJGfc0veC?=
=?us-ascii?Q?g1igh9HbQnRgk4vmDU1DSqKZPauivMKhyqkq0AvHiY4olj4EVf1hhdhaA31v?=
=?us-ascii?Q?aOgPJZCuMpTG+OkODZJuWQoMJfET0ZytaWmpShGboMG63uqdMiMhvUveilld?=
=?us-ascii?Q?2mDsaPRTCMfVNCaveQ+Mk7yVhgPM7E4Mg1jtMEAVgMooKbrq7YPB36hQIgJL?=
=?us-ascii?Q?WoMFyf+HPtdTmGuXNrlAYyN1WG37i6B1hB/HmE1H3xEIW0OMCLySAfJ4lnr9?=
=?us-ascii?Q?i+TjI2+3xfkZWiqBJLjzMRwLk/08HVk29EXsnflYmiby97iW0UxpOsJUNPeo?=
=?us-ascii?Q?TrYPkYlBigZHLiTAZGZoq58eya8yP49o+XJ4dU9vSeK0GYM+Z0PxQ0kur9nA?=
=?us-ascii?Q?UFNi5Ge18k0t3zVlOWt7Xm/x0osq3Zc+vj8aSB18qRvHurIiE6yDbq/sCQDs?=
=?us-ascii?Q?aHXaqlweHYSzMnnfl6oieNcyifBnXWereEq2Bd7z1e+jPZ71kzwbAHf1GsL0?=
=?us-ascii?Q?jfCiwF3cEQAk8D68A9/OgJ66rd93AmQ/nwfcGJNVy2yD77Eo7wlJFgK7BwKG?=
=?us-ascii?Q?W/eVAKkfZZvf8xiyG9isUOyFpZduGLpeSej23WGTNBM/wTN8qKGbPdU9TfqL?=
=?us-ascii?Q?OankjoWgRiPviX7Pz/nglhM9Mh81QlwBOea6ClFxN8Y32DdPoebsPhj4Hc3L?=
=?us-ascii?Q?xq8oNRiqOQMg4ost8kQXFr1TRUO6Egzhq9HJb8ylSwDrFWkQ4qt45h/jqZ+c?=
=?us-ascii?Q?E36AjFicvdqMIG6huXXuLZgep5AqbTpRDMLpWCFg2hDUHX09Iu4QdGSRUFb0?=
=?us-ascii?Q?XBSe1yafY2uZqXjWptmNZ1VhAlwaO8sWA7ebVTep3Ja/U5i375l3qozM9Ayd?=
=?us-ascii?Q?8TpkXjASs/wqIOvLV2padrYjURz7qF1b0khN4KjUHUDkLGULB21tK214QD+H?=
=?us-ascii?Q?u3SLRiVoe7j6t5NeL5GqL/PfpZY+dCrbpcIdEBEZ7neARHr404r7xVl4jP5O?=
=?us-ascii?Q?y/q08HFNUwzQQ9KzCd9wfGBxrfj/Ax82smRd26a7FLDO0MfkvCmE5ZZNJ5ho?=
=?us-ascii?Q?8zY7k1x0ewXEcqdektA4iQpWgXVg6ykwE0N7TILFb83ygGkn4WMas3n0tm8u?=
=?us-ascii?Q?nqpZX5BE5W+T641Vsho+UICiIHR4BhLONKUhJOXytdg8WqhpPDycpBnlp5WJ?=
=?us-ascii?Q?k1NA8LqkQBungVB7xzaE8kbLGGoF7O6EdHBGwOncGYTxHu8biWXDnrnUfzSj?=
=?us-ascii?Q?8D/8g5NKfHmu4zY/zn2A5u0Hj1536KdNHIc5BSVs1I/7rPw5X/P/TJjJTaTv?=
=?us-ascii?Q?Y32e53/WjmrbppyzAJ9CZu57jIbFm0JLa+vDmqR2R3LZfzvh5YBZIxr96E8H?=
=?us-ascii?Q?K2Yu71MPqRN896bNELulv31XTBy8GIIs3DCEO47KHm8CutStrHADf9vNRCaf?=
=?us-ascii?Q?JjZYM9OrL6lHpZFhnvc4CVuwQBsrSYYjzpya1wtlYug+F7osZfsNkuN4LOyQ?=
=?us-ascii?Q?iQ=3D=3D?=
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0:
MqqOrGDjJ9nydBMkcWHiLpUULCLlQK2JhYO1ymF8hB7LlQ8Pj7fMB6Sp9OTmgPAf5yxzA/LD9rnjnpMcEw6euNA21nIAfqXbRk77eQ5Scdwnx7gShsVWWQgJ2aT5MB4HfEowyPqExnVqYnz8qR49l9WqHIFrRlsf8smdGzcGeXlRRqocuRA1eXeOP4MJFchoQ5ulhi678UwX9daA2JdUB91eU0rNSxRc0dtvOOSrCvBVv9C2qDABqEYNz2On15p55NMPDO/WzHgSPnbt5t8EV3Td5ZqHF26vUHU40vSVaf4WnMNTH+Zfo0lZd3eldMZZnmxtPmYSIOPuJamxSd3Ma5f7V7nRxqA7UItzYK2yAhVAXIIJ2ao0Z2rn23AC8GIBwcQhCX71EeJYgpjK5+MwdGqr1Z9txN53UuUN0Cy2ZNN4RJY/cPotEZr/VNEC9Sld5hpwnMdOr//3SaroO1UTg/1dnn3rCnATQll6LRMPU3wPTE0rHjWcnEBOwCKyZpJl55XcHspzMsurzU2oQSXKauItSEI0/wSf1SNHh926Uqpz1MN3BC+9+7Cm0xzjhmP/LNrrO65/cikweAqCu7h0lUoE1YAdJO7lvj2LGb+6hLM=
X-OriginatorOrg: oracle.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 49c702c5-02d0-4183-e87c-08dda3854baa
X-MS-Exchange-CrossTenant-AuthSource: DM4PR10MB8218.namprd10.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 16:31:45.2771
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: VfkLCNJVigmAMJdu2QDAH/xQqSiq4p/4CfmCVDdillmmojrGquEUEX/hrvFBjttPAr9g3pf+99f/GgUMweVDQsTNfgvlsNeXHYlA70ABz90=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR10MB6879
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 adultscore=0 malwarescore=0
phishscore=0 mlxscore=0 mlxlogscore=999 suspectscore=0 bulkscore=0
classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2505160000
definitions=main-2506040125
X-Proofpoint-GUID: ySOiQBP3iCFWKLTiXmv1sProPFxWiJLT
X-Proofpoint-ORIG-GUID: ySOiQBP3iCFWKLTiXmv1sProPFxWiJLT
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDEyNSBTYWx0ZWRfX7necSdxhG8zE BBCtMWsL90AAQNUlbtcz/yBpjRg4yAdsj+3Z26JcDuK3u/1Y/dOIr9tQ4gzYyWu0E0XVBbkhWi2 xSGgEGOGKPrauVc5htMBEHmdvJ9lk2S+G+FDDesmKrrQrY20MDuAlPi7VUl0LdQGcM/J2m+ynGm
Ctpn2WNzG8YXxorOiXQ927Pr2H9dWRtmuTeI6/khq3fEynq39b5cHHSnrslW2JrbcSwGa2qEI4o 8fo6C52GjUPSPK7RNdcTORL8Gwvsq7wtEcXevgRvOKfHtp7vtcSH7K8FSHZcakycF+7AKrKVrTq ULDG33RrFvytOFIT0E6fMUydA6vCKWfLx6wLnDr/pD/PpD+lsACOipUWSVs41cgmQDFSXv24sWB
IE7ICyKsHwr/Gl++eEcah88ODU9Az82iOBtokdjFWeLR6oxviql4cXR5rDFyHLzjrWpVm6SB
X-Authority-Analysis: v=2.4 cv=QI1oRhLL c=1 sm=1 tr=0 ts=684074fa b=1 cx=c_pps a=zPCbziy225d3KhSqZt3L1A==:117 a=zPCbziy225d3KhSqZt3L1A==:17 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19
a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19 a=xqWC_Br6kY4A:10 a=6IFa9wvqVegA:10 a=GoEa3M9JfhUA:10 a=VwQbUJbxAAAA:8 a=yPCof4ZbAAAA:8 a=GvQkQWPkAAAA:8 a=AiHppB-aAAAA:8 a=20KFwNOVAAAA:8 a=pGLkceISAAAA:8 a=Z4Rwk6OoAAAA:8 a=37rDS-QxAAAA:8 a=eQKO4FnNY5kshQ2SyKgA:9
a=HkZW87K1Qel5hWWM3VKY:22 a=k1Nq6YrhK2t884LQW06G:22 cc=ntf awl=host:13206
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
In furtherance of ongoing efforts to ensure people are aware of who
de-facto maintains/has an interest in specific parts of mm, as well trying
to avoid get_maintainers.pl listing only Andrew and the mailing list for
mm files - establish a swap memory management section and add relevant
maintainers/reviewers.
Acked-by: Chris Li <chrisl@xxxxxxxxxx>
Acked-by: Kairui Song <kasong@xxxxxxxxxxx>
Acked-by: Kemeng Shi <shikemeng@xxxxxxxxxxxxxxx>
Acked-by: Baoquan He <bhe@xxxxxxxxxx>
Acked-by: Barry Song <baohua@xxxxxxxxxx>
Acked-by: Nhat Pham <nphamcs@xxxxxxxxx>
Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>
---
non-RFC:
* Propagated tags (thanks everyone!)
* Yu Zhao hasn't been active on-list for a few months as far as I can tell, so
will drop R for now as seems unlikely to get an OK on adding him, we can of
course add him back in very easily :)
* Added missing mm/page_io.c as per Baoquan and Nhat.
RFC:
https://lore.kernel.org/all/20250602152015.54366-1-lorenzo.stoakes@xxxxxxxxxx/
MAINTAINERS | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 26a0925c3830..839e1ee1854f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -15816,6 +15816,25 @@ S: Maintained
F: include/linux/secretmem.h
F: mm/secretmem.c
+MEMORY MANAGEMENT - SWAP
+M: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
+R: Kemeng Shi <shikemeng@xxxxxxxxxxxxxxx>
+R: Kairui Song <kasong@xxxxxxxxxxx>
+R: Nhat Pham <nphamcs@xxxxxxxxx>
+R: Baoquan He <bhe@xxxxxxxxxx>
+R: Barry Song <baohua@xxxxxxxxxx>
+R: Chris Li <chrisl@xxxxxxxxxx>
+L: linux-mm@xxxxxxxxx
+S: Maintained
+F: include/linux/swap.h
+F: include/linux/swapfile.h
+F: include/linux/swapops.h
+F: mm/page_io.c
+F: mm/swap.c
+F: mm/swap.h
+F: mm/swap_state.c
+F: mm/swapfile.c
+
MEMORY MANAGEMENT - THP (TRANSPARENT HUGE PAGE)
M: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
M: David Hildenbrand <david@xxxxxxxxxx>
--
2.49.0
Return-Path: <linux-kernel+bounces-673524-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id B444441E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:33:28 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id D48063A51E6
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:33:06 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 5E51E1DE889;
Wed, 4 Jun 2025 16:33:23 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Hb49oWMK"
Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1D8AC18C937
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:33:20 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.11
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749054802; cv=none; b=ZcSV8Hk0Mb+4sexC+6gWhVY1QKxbGB8Bp68UGH5WmxcvlpgYR+iygc0T4A14+dwHrNYbSFM4cdDRu9/surrOwSU31xHdjRelSW9vtfviPolrCdXMmBV0ROF5FvR8M+1ALTkqIRpdC19c1yW0rNcaGDQ+wD3jDAZKauec5+zJJH4=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749054802; c=relaxed/simple;
bh=m8wrsrYetnFPXLpdb3LHDq6bHI0VFrmQjNBUVQzBUvg=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=gmNekDkSWVnEqXAAqxQRW+Ogjz24s3ZY1tP+tuCYYwiAdH3swM5Gn/0pxSqxpfFNTl/WrV12tCcFQvEczwPPbiG5RXOnHmboaG9ZFow+KgZ8AXdxn0YD0Z1XRv1M41B0Da/Xo7GOuLhufKDiBbXUgjlaqkpOAKGhgTSryjoDx0s=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Hb49oWMK; arc=none smtp.client-ip=198.175.65.11
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
t=1749054801; x=1780590801;
h=date:from:to:cc:subject:message-id:references:
mime-version:in-reply-to;
bh=m8wrsrYetnFPXLpdb3LHDq6bHI0VFrmQjNBUVQzBUvg=;
b=Hb49oWMK5dfGQZIBjX8PLvk+02V7oNqY8GFovpGJCCgoi87JD9iAa3CC
p/dc2Z3YoxKXdM3WkpkrybclXlGNAJLLRBUR+zmBZvoyDFy1nL1TUItUy
07jw//27cw4sgQSd/sX0OlSlpTczTByIDAufr/aHJb5IMy4njtvRF/M/r
QmYFh5nBb5DaAMl01seL9IlTG9jQ9Ie29dTXJZPioxw6C8cMnwNf6btKS
EqHH5s9S1RDB7xj+4tPpSd+cWoQKpo/asZObONFxO+If0XSMnMNDMKUzl
x32UE/qyLusbGUSbseBBCKOmBXf2oxdsxN08bDmTshEEpRC66gCj8WHkN
Q==;
X-CSE-ConnectionGUID: aTHY21ZSSFGLBYHKSVrN3w==
X-CSE-MsgGUID: HpRdJYJrRjS7GMpmgjFUTw==
X-IronPort-AV: E=McAfee;i="6800,10657,11454"; a="61412241"
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="61412241"
Received: from fmviesa005.fm.intel.com ([10.60.135.145])
by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 09:33:20 -0700
X-CSE-ConnectionGUID: n0iGB6tNQqK0vyV181+V/g==
X-CSE-MsgGUID: DcL2yp/LRBqedDGBaK+8Rg==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="150121986"
Received: from agluck-desk3.sc.intel.com (HELO agluck-desk3) ([172.25.103.51])
by fmviesa005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 09:33:20 -0700
Date: Wed, 4 Jun 2025 09:33:19 -0700
From: "Luck, Tony" <tony.luck@xxxxxxxxx>
To: Reinette Chatre <reinette.chatre@xxxxxxxxx>
Cc: Fenghua Yu <fenghuay@xxxxxxxxxx>,
Maciej Wieczor-Retman <maciej.wieczor-retman@xxxxxxxxx>,
Peter Newman <peternewman@xxxxxxxxxx>,
James Morse <james.morse@xxxxxxx>, Babu Moger <babu.moger@xxxxxxx>,
Drew Fustini <dfustini@xxxxxxxxxxxx>,
Dave Martin <Dave.Martin@xxxxxxx>,
Anil Keshavamurthy <anil.s.keshavamurthy@xxxxxxxxx>,
Chen Yu <yu.c.chen@xxxxxxxxx>, x86@xxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, patches@xxxxxxxxxxxxxxx
Subject: Re: [PATCH v5 01/29] x86,fs/resctrl: Consolidate monitor event
descriptions
Message-ID: <aEB1T0GFqLl6RG22@agluck-desk3>
References: <20250521225049.132551-1-tony.luck@xxxxxxxxx>
<20250521225049.132551-2-tony.luck@xxxxxxxxx>
<7eec0d2a-457a-42c7-904d-2c85633dc2a3@xxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <7eec0d2a-457a-42c7-904d-2c85633dc2a3@xxxxxxxxx>
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Tue, Jun 03, 2025 at 08:25:56PM -0700, Reinette Chatre wrote:
Hi Tony,
> +void resctrl_enable_mon_event(enum resctrl_event_id evtid);
> +
> bool resctrl_arch_is_evt_configurable(enum resctrl_event_id evt);
nit: When code is consistent in name use it is easier to read.
Above there is already resctrl_arch_is_evt_configurable() that uses "evt"
as parameter name so naming the new parameter "evt" instead of "evtid"
will be much easier on the eye to make clear that this is the "same thing".
Also later, when resctrl_is_mbm_event() is moved it will be clean to have
it also use "evt" as parameter name and not end up with three different
"evtid", "evt", and "e" for these related functions.
Should I also clean up existing muddled naming? Upstream has the
following names for parameters and local variables of type enum
resctrl_event_id (counts for number of occurrences of each):
6 eventid
2 evt
1 evt_id
3 evtid
2 mba_mbps_default_event
1 mba_mbps_event
It seems that "eventid" is the most popular of existing uses.
Also seems the most descriptive.
Perhaps "mevt" would be a good standard choice for "struct mon_evt *mevt"?
Upstream uses this three times, but I add some extra using "*evt".
-Tony
Return-Path: <linux-kernel+bounces-673525-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 55C3F41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:35:44 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 5190D3A5134
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:35:22 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id D00A01DF26F;
Wed, 4 Jun 2025 16:35:38 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="scI70OW0"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 185424C7C;
Wed, 4 Jun 2025 16:35:37 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749054938; cv=none; b=qf4D2LQ6BXBhZHdsZRdbw3pBjIh//HuAwDg08PGKxxrJLpUAvaan72H8BAR20R6723q8FgY+UxP7p4OW4Ummlba4izvn3FSt7Gw4beMSzKrNebGaKKNdNCWc7VnR1/5Zf8xkW4M3zp6eTgcHvs7IWA4m3vt/zhKY7YZDTUWaSWc=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749054938; c=relaxed/simple;
bh=bvurVI1LpPnY3JIRxy7/BJjVKXElOxjO6xxlddeu1CU=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=gGYM9uXh0aZAdlgw/6+Mu7KM0rXYTS5x1EdB7mAH15sUs/EqLC8ux284glD8qXrWHpsXAN3HUlDDd0shMvTuswNlTHXWGSAsZrzCruFZkRD65A3akYsPzTvHiAT1Wsph/HUEMt0fMhMLlsIi2dvsl5T9oHw7yx79e+sXNORhLaA=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=scI70OW0; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id AD4B8C4CEE4;
Wed, 4 Jun 2025 16:35:31 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749054937;
bh=bvurVI1LpPnY3JIRxy7/BJjVKXElOxjO6xxlddeu1CU=;
h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
b=scI70OW08HFi5o6W890W7Xetgm51jFGoRvAoyEflLYSXv+VQ1O9lNMBkXQg7lxYXX
wh+7cLfW5d0l6zyyM4qgVCV8tg2Kxv0t+yFa5rj2PwHlXUApQvsnR094N1fzvveMDG
GH2kwyvLqrF3jFffdFDiVh7zRdHIb9YV8CyW0wcgZUIkOFR6FpStap15X4vDLufD+v
/AWrul29FnQbuy41U467dT4+53KeuNzGqw90T+h1pA8Lm+w3Q9A8KZ54BDMaYqJ6su
fAZSBbVmOckDm4vnEZOzZRlrm6D+FJPBeTj1jeIiwUShd4zzC5bQyIW7wNuugFXzHI
l24x4Ijc1RLGA==
Date: Wed, 4 Jun 2025 18:35:28 +0200
From: Lorenzo Pieralisi <lpieralisi@xxxxxxxxxx>
To: Marc Zyngier <maz@xxxxxxxxxx>
Cc: Rob Herring <robh@xxxxxxxxxx>, Peter Maydell <peter.maydell@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Thomas Gleixner <tglx@xxxxxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>,
Catalin Marinas <catalin.marinas@xxxxxxx>,
Will Deacon <will@xxxxxxxxxx>, andre.przywara@xxxxxxx,
Arnd Bergmann <arnd@xxxxxxxx>,
Sascha Bischoff <sascha.bischoff@xxxxxxx>,
Timothy Hayes <timothy.hayes@xxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>,
Mark Rutland <mark.rutland@xxxxxxx>,
Jiri Slaby <jirislaby@xxxxxxxxxx>,
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, suzuki.poulose@xxxxxxx
Subject: Re: [PATCH v4 01/26] dt-bindings: interrupt-controller: Add Arm GICv5
Message-ID: <aEB10JC1bwwOJfWh@lpieralisi>
References: <20250513-gicv5-host-v4-0-b36e9b15a6c3@xxxxxxxxxx>
<20250513-gicv5-host-v4-1-b36e9b15a6c3@xxxxxxxxxx>
<aDhWlytLCxONZdF9@lpieralisi>
<CAFEAcA_3YLMSy+OsSsRayaRciQ1+jjh-dGzEjrh2Wa8BqdmqrA@xxxxxxxxxxxxxx>
<aD6ouVAXy5qcZtM/@lpieralisi>
<CAL_JsqJ5N2ZUBeAes=wexq=EstRSZ5=heF1_6crAw76yZ9uXog@xxxxxxxxxxxxxx>
<CAFEAcA-JrS0BiT66iin-pRVFadrY-pnJZ8TkDNxcjErknSCnUA@xxxxxxxxxxxxxx>
<CAL_JsqL7x53an2-MaLHP5tfVXb4JxT8ORUMaA8pL-gMsWLJqkA@xxxxxxxxxxxxxx>
<aD/0tuak7Hja8k4g@lpieralisi>
<878qm7ec19.wl-maz@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <878qm7ec19.wl-maz@xxxxxxxxxx>
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 04:56:02PM +0100, Marc Zyngier wrote:
On Wed, 04 Jun 2025 08:24:38 +0100,
Lorenzo Pieralisi <lpieralisi@xxxxxxxxxx> wrote:
>
> On Tue, Jun 03, 2025 at 02:11:34PM -0500, Rob Herring wrote:
> > On Tue, Jun 3, 2025 at 10:37 AM Peter Maydell <peter.maydell@xxxxxxxxxx> wrote:
> > >
> > > On Tue, 3 Jun 2025 at 16:15, Rob Herring <robh@xxxxxxxxxx> wrote:
> > > >
> > > > On Tue, Jun 3, 2025 at 2:48 AM Lorenzo Pieralisi <lpieralisi@xxxxxxxxxx> wrote:
> > > > >
> > > > > On Thu, May 29, 2025 at 02:17:26PM +0100, Peter Maydell wrote:
> > > > > > secure.txt says:
> > > > > > # The general principle of the naming scheme for Secure world bindings
> > > > > > # is that any property that needs a different value in the Secure world
> > > > > > # can be supported by prefixing the property name with "secure-". So for
> > > > > > # instance "secure-foo" would override "foo".
> > > >
> > > > Today I would say a 'secure-' prefix is a mistake. To my knowledge,
> > > > it's never been used anyways. But I don't have much visibility into
> > > > what secure world firmware is doing.
> > >
> > > QEMU uses it for communicating with the secure firmware if
> > > you run secure firmware on the virt board. It's done that
> > > since we introduced that binding. Indeed that use case is *why*
> > > the binding is there. It works fine for the intended purpose,
> > > which is "most devices are visible in both S and NS, but a few
> > > things are S only (UART, a bit of RAM, secure-only flash").
> >
> > I meant "secure-" as a prefix allowed on *any* property, not
> > "secure-status" specifically, which is the only thing QEMU uses
> > AFAICT. IOW, I don't think we should be creating secure-reg,
> > secure-interrupts, secure-clocks, etc.
>
> Reading secure.txt, what does it mean "device present and usable in
> the secure world" ?
>
> So:
>
> status = "disabled"
> secure-status = "okay"
>
> basically means that the device in question allows secure-only MMIO
> access, is that what it says ?
>
> If that's the case and we really want to have all config frames
> in a single DT, would it be reasonable to have an IRS/ITS DT node
> per-frame ?
>
> Then yes, the secure- tag is not enough any longer (because we have to
> cope with 4 interrupt domains) but that's a separate problem - again,
> this would leave the current reviewed bindings unchanged.
No, this is the same problem, and we need a way to address it.
"secure-*" doesn't cut it in a system with FEAT_RME, where resources
are only available to a single Physical Address Space (PAS). So we
need a way to qualify these resources with a PAS.
Can I ask again what:
status = "disabled"
secure-status = "okay"
for a device means in practice in the current bindings ?
When I said "a separate problem", I meant that, extending secure- tag
(that applies to the "status" property only) to cover other PASes is
independent from the GICv5 binding *if* we define, for a single DT an eg
IRS device per-PAS (with realm-status, root-status, describing what the
reg property represents. Is that what secure-status does today ? Does
it say "this device MMIO space is secure-only" ?).
It does not look like there is much appetite for tagging the reg
property either and making it GICv5 specific is a shortcut IMO.
Either that, or we have to restrict DT to describe the view of a
single PAS. Which Peter will understandably be unhappy about.
Well, I listed a couple of options in this thread, let's try
to converge.
Thanks,
Lorenzo
Return-Path: <linux-kernel+bounces-673526-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 933F741E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:37:01 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 1821F3A4238
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:36:39 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 71A1D1DE889;
Wed, 4 Jun 2025 16:36:56 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DgKo04ol"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id B58934C7C
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:36:55 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749055015; cv=none; b=SBKYnjBED6i9TqCtx0ZrAZ6c5FJ8FKPQikxkEhTjcW9+qkBoNQF7L4n0W0mWo8eKsMETSH6sEV7ap0EUAJNR88/O0r2UHRM5lwBaQWg+H1LJaWRBAxYbGKAYz7OdzeZLz3e0/rGLHhMNoe8lf4gw3JlLlyVkkMjJnkFIRCvares=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749055015; c=relaxed/simple;
bh=8FvrIvwVR8DvP3z82rscLc7TuW8jO6+WpmOxo+bXGFc=;
h=Subject:From:In-Reply-To:References:Message-Id:Date:To:Cc; b=aIYnN30a+rTEcmE90TLBKp0vTdFtdemGRD7rwoxkiSjtlzhFeqqyDC2trhtEORO9rn8cSF5QJSw7j+vaPoxAx+b2m8oWV8LvdBCDwyeASR3fjdeRKR0XAILpCY0+UtY4ZB6OYgNbaAlQzO7s2upmt5jKpgYTFfWfTQ2z7bSld7Y=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DgKo04ol; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95C11C4CEE4;
Wed, 4 Jun 2025 16:36:55 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749055015;
bh=8FvrIvwVR8DvP3z82rscLc7TuW8jO6+WpmOxo+bXGFc=;
h=Subject:From:In-Reply-To:References:Date:To:Cc:From;
b=DgKo04ol7E7ixevKUuklIgw5Xv5VgoGDYgzdmClvG55DtY9M18CWv+vjS/tRSVKlE
9kGCBvejxRIkPLHtKjBUlSRF9rwjzIuBxYkroR/sEAvjFL46BAgg0kROBXmm4o7qCI
DEYoqhcaTwjHWAq18s/7Bjr34FOdJ4L2rQjV4cJqmvp/8gKIB7lg71vDPeDEZ6P/SZ
AArDn47vaavwrhCLrdpdPDMzvfS01bK55WSVXZyPEfYns7yB4CbNRvDs5CTXvW+pLN
leRpsmpHMFgqRI6i/qjir+BGvBvBtgvvPOYiGKu5lOBqcbmKbbH/OWsDfT+xvzymtw
MVlzVVRVX6T0g==
Received: from [10.30.226.235] (localhost [IPv6:::1])
by aws-us-west-2-korg-oddjob-rhel9-1.codeaurora.org (Postfix) with ESMTP id EB13238111E5;
Wed, 4 Jun 2025 16:37:28 +0000 (UTC)
Subject: Re: [GIT PULL] slab updates for 6.16
From: pr-tracker-bot@xxxxxxxxxx
In-Reply-To: <7f9a7fe2-da23-422f-a5f1-14fa99eb38d9@xxxxxxx>
References: <7f9a7fe2-da23-422f-a5f1-14fa99eb38d9@xxxxxxx>
X-PR-Tracked-List-Id: <linux-mm.kvack.org>
X-PR-Tracked-Message-Id: <7f9a7fe2-da23-422f-a5f1-14fa99eb38d9@xxxxxxx>
X-PR-Tracked-Remote: git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab.git tags/slab-for-6.16
X-PR-Tracked-Commit-Id: 354ad60e123dad8e231e7443735020806f3c57d0
X-PR-Merge-Tree: torvalds/linux.git
X-PR-Merge-Refname: refs/heads/master
X-PR-Merge-Commit-Id: 1af80d00e1e026c317c6ec19b1072f81ba7af64c
Message-Id: <174905504751.2350857.15253248105981984997.pr-tracker-bot@xxxxxxxxxx>
Date: Wed, 04 Jun 2025 16:37:27 +0000
To: Vlastimil Babka <vbabka@xxxxxxx>
Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>, David Rientjes <rientjes@xxxxxxxxxx>, Christoph Lameter <cl@xxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, "linux-mm@xxxxxxxxx" <linux-mm@xxxxxxxxx>, LKML <linux-kernel@xxxxxxxxxxxxxxx>, Roman Gushchin <roman.gushchin@xxxxxxxxx>, Hyeonggon Yoo <42.hyeyoo@xxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
The pull request you sent on Wed, 4 Jun 2025 11:02:26 +0200:
git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab.git tags/slab-for-6.16
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/1af80d00e1e026c317c6ec19b1072f81ba7af64c
Thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
Return-Path: <linux-kernel+bounces-673527-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 622D041E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:37:19 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 76A1C7A732E
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:35:59 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 6EBE61DFE12;
Wed, 4 Jun 2025 16:37:12 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mKbMHIey"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id AA40D1DC98C;
Wed, 4 Jun 2025 16:37:11 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749055031; cv=none; b=T1Vra5Zrx3YjmIY40ppbjNMlCAZlXLI9Sqaaxfdk92nHEaw8b6ZbQiS31WflNRN0s3B0MHXtulNhBvtxc9gXWg/lFRfXJ+5MKSK/+bl2QgU2NDDbOBpiga1LK4tf/I4Z8R5y3ZNNrebdlm090iWP5iPIb8pvrr6WOY/KhQoxuCs=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749055031; c=relaxed/simple;
bh=2OJ1OM9loK83DVZMpQuXau4isC73/KHxvpXf6wuAVA0=;
h=Subject:From:In-Reply-To:References:Message-Id:Date:To:Cc; b=AOLG5w3Y/pZ24k/NSBG4Mbz3RFbpOPQXEdIhfdXW7xun7vfVXrudRYLFL3pCfjsfJluU3Ax6+x+S123bfdBneZiZhzosNmSIgm9b6mcs+KiNY5qgnX5iuwqQM3bOQU7qZaSXbronii6M4U6CewwJafw7P/0PyyoOOYjt40UdHtA=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mKbMHIey; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0D6F2C4CEE4;
Wed, 4 Jun 2025 16:37:11 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749055031;
bh=2OJ1OM9loK83DVZMpQuXau4isC73/KHxvpXf6wuAVA0=;
h=Subject:From:In-Reply-To:References:Date:To:Cc:From;
b=mKbMHIeydVd5bKp2Otqj59fuE5Rbc0h17KXff+xgAvHZnTa0K635Rk/LoHdi0Irf0
pTAKQOTiDEORsYAZA61HXmZrIrhJHOIPBHmypIJfNx8CP7ZrpaZKDbBR/RSQfgWJFx
y1rPFAaDtdAD5BdYQYCxmRYOh1YWakTxgeheSO5MnFeFFvSlqSuv4DGQ4SEb/koMQo
Y/2AHdHSuYvHeHD8aMqn3WIIshp7c92Y9haWmnBZ5uGP6Cu/Bn0//jRyn1Xj4ED23H
dv9auJZz+Lyslkn2ZsuFvTpc4Y7cJUZW42gQs5ZgqDXskC6tcq/omOJz0QRHroukVF
GeMKcQpu81KXA==
Received: from [10.30.226.235] (localhost [IPv6:::1])
by aws-us-west-2-korg-oddjob-rhel9-1.codeaurora.org (Postfix) with ESMTP id 70D7338111E5;
Wed, 4 Jun 2025 16:37:44 +0000 (UTC)
Subject: Re: [GIT PULL] SPDX/LICENSES update for 6.16-rc1
From: pr-tracker-bot@xxxxxxxxxx
In-Reply-To: <aEAFnFOS-8tH00ko@xxxxxxxxx>
References: <aEAFnFOS-8tH00ko@xxxxxxxxx>
X-PR-Tracked-List-Id: <linux-spdx.vger.kernel.org>
X-PR-Tracked-Message-Id: <aEAFnFOS-8tH00ko@xxxxxxxxx>
X-PR-Tracked-Remote: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx.git tags/spdx-6.16-rc1
X-PR-Tracked-Commit-Id: 59c11a7a9a138a28c7dff81032a7b7b6f1794540
X-PR-Merge-Tree: torvalds/linux.git
X-PR-Merge-Refname: refs/heads/master
X-PR-Merge-Commit-Id: f5ebe7bb87e04537b37573f0a2516baa90ee23c0
Message-Id: <174905506287.2350857.11142661323825669523.pr-tracker-bot@xxxxxxxxxx>
Date: Wed, 04 Jun 2025 16:37:42 +0000
To: Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx>
Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, linux-spdx@xxxxxxxxxxxxxxx
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
The pull request you sent on Wed, 4 Jun 2025 10:36:44 +0200:
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/spdx.git tags/spdx-6.16-rc1
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/f5ebe7bb87e04537b37573f0a2516baa90ee23c0
Thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
Return-Path: <linux-kernel+bounces-673528-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 2B21941E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:37:27 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 22777177255
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:37:27 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 296EB1E2823;
Wed, 4 Jun 2025 16:37:15 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="iBz7jso+"
Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2064.outbound.protection.outlook.com [40.107.100.64])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 160D81DDA0C
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:37:10 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.100.64
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749055033; cv=fail; b=TSePquVo0KfcBhTtEDtHme4U9HEUSFy4SFXCZ9gySyZKT3Tk+4emYnU8CM4ebYksIHUDZnMZX2mntQn9FMkY8xugztg8L5HsHUuJ+jmwdMm54lxGBxEindcsseKZmBEbybWEY+lRY5FGN0zVbfUlSKRgGk3AiwHDVUMHZB5CZwI=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749055033; c=relaxed/simple;
bh=Vq+HYFCwT11ULTLVDdo5JzFhb7CE6OWcW1SdIqYXydo=;
h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=WNm401+8v0ytUXNT8QQd2J+rKuSRljSk+aV8G1KRhu6c2FCeXBOPwSEHKjIOchIwpEOR3Eazh81fQTqTVatRBRgVfEUotbnslj245IGBO1LiwF3h9XNt+KDxCvGWykpyYI4OmZSa6GPA8R0r5aXjFjgYpUSg+3V9IyWtzJpuFKA=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=iBz7jso+; arc=fail smtp.client-ip=40.107.100.64
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com
Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=xaTyMpDuHNhnoY54Y42lu8huPR5W1KZ+DHozkOOXvTvR94jwAc3FAy/xul7FBOmQe5eMkLKe5gZL3Qzw51Z+2qbALADAnlHb6YInedQBJgCqTt7qvLGiL9LFObWevIDxgyqCouGkXbMnKaLFNWsXLzmasZP+ijSYBgbF9E+9uI+xopJpxkoB2qzIuzm9QXGSqRerfD6uHjsLJiG3aixqVpHb8Ch/u9QdHiGzQV8JVQU99lBBsMQT33x15gJvGNG3Og/3DyvaJOG4OP2nDPzfvcKlGTUpVJsLMATt7KTVuGORL+VXSis6eHyYBPEE/0Cjsn+8lOYafrSg6X1rzgQOcA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=5bTWfySqgmskk4JL0V2UEJFiynYPxJVbQi2m5aLDNbw=;
b=YtPpmJ5ac9MwMdgikjULHfanu69UbxkiSRIvK4lyoqlP3YW9Z/c0znstfs7DhSAYPJBK9tS2XUNfxz7bB/kNmbAmmlDwGy6YtDRutHPzKdYeD5hdvvRXStUPM5BI051CFA6lG4u9GntS4+BweWMgVYVlm2gf3koTjX4g3oJNVhA2OSY0B1yKgB4XydIhclFkMk7gO/JwEfWB7chC2giYbkawJpzbMOkRNZ2hnmgH8hkD5MiaxoBpB6O6o/h0lQZcXey5PPnOtlF4Zr6nu9Pc3r735e+JfK6oSobhkspvEX1+PxknyKYOq33PQaLbsf2jj+LLtOq2qBsSWPHXnxihxA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is
165.204.84.17) smtp.rcpttodomain=8bytes.org smtp.mailfrom=amd.com; dmarc=pass
(p=quarantine sp=quarantine pct=100) action=none header.from=amd.com;
dkim=none (message not signed); arc=none (0)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=5bTWfySqgmskk4JL0V2UEJFiynYPxJVbQi2m5aLDNbw=;
b=iBz7jso+Cw1XOgK+OH/uIxMpB1uzaV66nsoGU6sk1/7jIlEsKy1zlkA/8GsDE7oVTK7p6bn8LQ+wauMr7sbADQVP/XJEvNWr/dHjlxnOjgrqNo975N98ph4g4y09ycADHz32yl7+uKHBGTVi2ZY7dsJXmHnk+Gs0SuZMrv6RuIY=
Received: from MW4PR02CA0006.namprd02.prod.outlook.com (2603:10b6:303:16d::12)
by SA1PR12MB6703.namprd12.prod.outlook.com (2603:10b6:806:253::18) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.34; Wed, 4 Jun
2025 16:37:07 +0000
Received: from CO1PEPF000075EF.namprd03.prod.outlook.com
(2603:10b6:303:16d:cafe::e7) by MW4PR02CA0006.outlook.office365.com
(2603:10b6:303:16d::12) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8792.19 via Frontend Transport; Wed,
4 Jun 2025 16:37:07 +0000
X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17)
smtp.mailfrom=amd.com; dkim=none (message not signed)
header.d=none;dmarc=pass action=none header.from=amd.com;
Received-SPF: Pass (protection.outlook.com: domain of amd.com designates
165.204.84.17 as permitted sender) receiver=protection.outlook.com;
client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C
Received: from SATLEXMB04.amd.com (165.204.84.17) by
CO1PEPF000075EF.mail.protection.outlook.com (10.167.249.38) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
15.20.8792.29 via Frontend Transport; Wed, 4 Jun 2025 16:37:07 +0000
Received: from BLRDHSRIVAS.amd.com (10.180.168.240) by SATLEXMB04.amd.com
(10.181.40.145) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 4 Jun
2025 11:37:03 -0500
From: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@xxxxxxx>
To: <joro@xxxxxxxxxx>, <suravee.suthikulpanit@xxxxxxx>, <will@xxxxxxxxxx>,
<robin.murphy@xxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>,
<iommu@xxxxxxxxxxxxxxx>, <Vasant.Hegde@xxxxxxx>,
<dheerajkumar.srivastava@xxxxxxx>
Subject: [PATCH v6 0/8] Introduce debugfs support in IOMMU
Date: Wed, 4 Jun 2025 22:06:39 +0530
Message-ID: <20250604163647.1439-1-dheerajkumar.srivastava@xxxxxxx>
X-Mailer: git-send-email 2.25.1
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain
X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com
(10.181.40.145)
X-EOPAttributedMessage: 0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: CO1PEPF000075EF:EE_|SA1PR12MB6703:EE_
X-MS-Office365-Filtering-Correlation-Id: f065e445-b5b6-4bc3-3313-08dda3860bc2
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam:
BCL:0;ARA:13230040|1800799024|376014|36860700013|82310400026;
X-Microsoft-Antispam-Message-Info:
=?us-ascii?Q?C9Bvwpe8oGlipFQ/2jk9PzkLWQy3q7zlir8PUvcD/56Ix0xHIx3X06h88u0a?=
=?us-ascii?Q?NRbaY1pmnsb4EnqaclYS+XSvmezsw32WiWyXfMtPOpmM+Gn6d5CYkgkRd1Zx?=
=?us-ascii?Q?R+nxExc/i3/BshgIFEcP4XGu2BbZItcUeFpxuWqa7ZjVqZx1FdNH1E9lbnQw?=
=?us-ascii?Q?xxrXb8dB0QeB3SfVnAMUoJpIOtUs/arjqhoa8sfZqNZ4Ea59k6FahAMYwMsz?=
=?us-ascii?Q?K1Orqb+tzmyXColkJe/51eANM3yUt31iBiIPqNIzLkkKjUgy4d3D9cdCybVo?=
=?us-ascii?Q?2yrru+Lzq4WvCnjemGqNNDIR6TwmjBFybHl+zro9ZG9PiAameyPiO8I0M1+j?=
=?us-ascii?Q?IhUwBLnxrA6LGoXMf3+W2dxybhtqzijXccbUezckIPD/khyrbcDtPikteRRP?=
=?us-ascii?Q?ohbs+0n7uWAAcHaQ8c4v8Ha5oxoCrE1IhJKAZMTHO9mu+ymUQAdozjDDBuX5?=
=?us-ascii?Q?FgKuToshJ6vKEMjxRdYJUTUk6BzPIkS+T2i6IaiZUQP8e5etKxcmkjac6vfl?=
=?us-ascii?Q?K4r10XQnZmxvTaW1JInW163nLeyvo1FZbWANjdfOAAbBC+ByncevjVl7AgDZ?=
=?us-ascii?Q?iv1+MkoxOwrRlE9rYnJ4iWCQCzcfbsst6E3G7xufhg6i2aC5345nbb+M+Dz2?=
=?us-ascii?Q?y8A/5/by2ejrljZklRJJDgHDS2m4geNk4Ea3G5UTMAIIeAhIE12E5+mK+dZt?=
=?us-ascii?Q?liZPw4LMRMCzcjfa2FCAKQdsY8R93p7DJqBDp+ZGm1+Obt5vOtSgxHtHAOl3?=
=?us-ascii?Q?JBpZe8TgKL8Mio22KeKDjRj6L+rAjZ5o+X69vpsFJF1FR2hJwfkFa5Xni6pp?=
=?us-ascii?Q?UVqbPcckSIToIXiZFGafZMPdfvOFMnP0E024GxaLloIjSSEAXsY65AcCQvlm?=
=?us-ascii?Q?djeLd7yHIMEZWY4ZZ6DZ6SmVATdl1fjczlitvoRHlZa5MSvLETW9c6V+cR3+?=
=?us-ascii?Q?54r1O4RjX3GQPogg4wotwZ4DchBr2L3OGMIEuGbONqPQqWrdbP9q0I9vozM/?=
=?us-ascii?Q?Q6T8Ft3DkbNHmV9R3WUPJ9hb/3ZEwNuqe5pHnw4iAPctBGD53PfRNaHjhHw3?=
=?us-ascii?Q?2pZ6cTg2U1U9urzqos1faOqhFgLNE4BVl98WMmxKWAz2nTkc0+5CfZBtKx8A?=
=?us-ascii?Q?vyu3oXSKDt4xdxyVz0TWeKKIX82PCLnG9FM6DFxQRc5N/kPZ/rnxFQwGBaRy?=
=?us-ascii?Q?hu/oKM3+Q469KKFKyJkD1C0GeaRK4NySft8aBOfVSpoaHudpxlzvNzq+dP0X?=
=?us-ascii?Q?xj7EKbmYVlzmsAR6gn9lkEzJLHH3Wd46bzFWpKF/WMEzbvXif21IRoXt3U+G?=
=?us-ascii?Q?exMPselrN4r7zpoARcbdRdvVgkhTtY59l4X9jiRhgmLwF4i3wcBoKQ/hyD49?=
=?us-ascii?Q?BAytfQKcHS6tXBYXTj3N6+hWXkAL2FuowSKzImiay8GR2qr/WpyxX6RA1xhf?=
=?us-ascii?Q?3xUx4fCB9tVM9yus1iPKUAJ7ipcfAA/qSMKpNw5mfSNahgGVFAQ5x5oLaZPn?=
=?us-ascii?Q?HIbmCZ/97qAfcTKMb4vHwxWhinHKlmAXNJtg?=
X-Forefront-Antispam-Report:
CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(1800799024)(376014)(36860700013)(82310400026);DIR:OUT;SFP:1101;
X-OriginatorOrg: amd.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 16:37:07.3236
(UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: f065e445-b5b6-4bc3-3313-08dda3860bc2
X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com]
X-MS-Exchange-CrossTenant-AuthSource:
CO1PEPF000075EF.namprd03.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB6703
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Introducing debugfs support in AMD/IOMMU driver that will allow
userspace to dump below IOMMU information
1) MMIO and Capability register per IOMMU
2) Command buffer
3) Device table entry
4) Interrupt remapping table entry
Analyzing contents of IOMMU data structures helps in understanding IOMMU
capabilities and behavior and debug issues faster.
1. MMIO and Capability registers - Add support to dump MMIO and Capability
registers per IOMMU.
Example:
a. Write MMIO register offset to dump it
$ echo 0x18 > /sys/kernel/debug/iommu/amd/iommu00/mmio
$ cat /sys/kernel/debug/iommu/amd/iommu00/mmio
Output:
$ Offset:0x18 Value:0x000c22000003f48d
b. Write capability register offset to dump it
$ echo 0x10 > /sys/kernel/debug/iommu/amd/iommu00/capability
$ cat /sys/kernel/debug/iommu/amd/iommu00/capability
Output:
$ Offset:0x10 Value:0x00203040
2. Command buffer - Add support to dump per IOMMU command buffer.
Example:
a. cat /sys/kernel/debug/iommu/amd/iommu00/cmdbuf
Output:
CMD Buffer Head Offset:339 Tail Offset:339
0: 00835001 10000001 00009900 00000000
1: 00000000 30000005 fffff003 7fffffff
2: 00835001 10000001 00009901 00000000
3: 00000000 30000005 fffff003 7fffffff
4: 00835001 10000001 00009902 00000000
........................................
........................................
........................................
3. Device table - Add support to dump device table per IOMMU.
Example:
a. Write device id to dump device table entry for that device
$ echo 0000:01:00.0 > /sys/kernel/debug/iommu/amd/devid
$ cat /sys/kernel/debug/iommu/amd/devid
Output:
0000:01:00.0
Dump the device table entry for the input given
$ cat /sys/kernel/debug/iommu/amd/devtbl
Output:
DeviceId QWORD[3] QWORD[2] QWORD[1] QWORD[0] iommu
0000:01:00.0 0000000000000000 20000001373b8013 0000000000000038 6000000114d7b603 iommu3
b. Write device id to dump device table entry for that device
$ echo 01:00.0 > /sys/kernel/debug/iommu/amd/devid
$ cat /sys/kernel/debug/iommu/amd/devid
Output:
0000:01:00.0
Dump the device table entry for the input given
$ cat /sys/kernel/debug/iommu/amd/devtbl
Output:
DeviceId QWORD[3] QWORD[2] QWORD[1] QWORD[0] iommu
0000:01:00.0 0000000000000000 20000001373b8013 0000000000000038 6000000114d7b603 iommu3
4. Interrupt remapping table - Add support to dump IRT table valid entries in
"iommu_irqtbl" file. This supports user input to dump IRT entry for a
specific pci device.
Example:
a. Write device id to dump device table entry for that device
$ echo 0000:01:00.0 > /sys/kernel/debug/iommu/amd/devid
$ cat /sys/kernel/debug/iommu/amd/devid
Output:
0000:01:00.0
Dump the device table entry for the input given
$ cat /sys/kernel/debug/iommu/amd/irtbl
Output:
DeviceId 0000:01:00.0
IRT[0000] 0000000000000020 0000000000000241
IRT[0001] 0000000000000020 0000000000000841
IRT[0002] 0000000000000020 0000000000002041
IRT[0003] 0000000000000020 0000000000008041
IRT[0004] 0000000000000020 0000000000020041
..........................................
..........................................
..........................................
b. Write device id to dump device table entry for that device
$ echo 01:00.0 > /sys/kernel/debug/iommu/amd/devid
$ cat /sys/kernel/debug/iommu/amd/devid
Output:
0000:01:00.0
Dump the device table entry for the input given
$ cat /sys/kernel/debug/iommu/amd/irttbl
Output:
Device 0000:01:00.0
IRT[0000] 0000000000000020 0000000000000241
IRT[0001] 0000000000000020 0000000000000841
IRT[0002] 0000000000000020 0000000000002041
IRT[0003] 0000000000000020 0000000000008041
IRT[0004] 0000000000000020 0000000000020041
..........................................
..........................................
..........................................
Changes since v5:
-> Patch 7/8: Use macros to fetch IRT table length for DTE.
Changes since v4:
-> Maintain per IOMMU variable for mmio_offset and capability_offset.
-> Get intrrupt table length from DTE instead of using MAX_IRQS_PER_TABLE.
Changes since v3:
-> Patch 2/8: Print 64 bits instead of 32 bits for MMIO registers dump. Since most of
the MMIO registers are 64 bits.
-> Patch 5/8: Update commit message with the need to add support for device_id input.
-> Patch 3/8: Throw error message mentioning valid capability offset range if user capability
offset's input is not in valid range and input fails.
Changes since v2:
-> Patch 2/8 and 3/8: Use single file mmio and capability for input and output registers
offset and register's dump respctively.
-> Patch 8/8: Correct path for files "irqtbl" and "devtbl" in Documentation
Changes since v1:
-> Patch 2/8 and 3/8: Use kstrtou32_from_user() instead of memdup_user_nul() --> kstrtou32()
-> Patch 4/8: Dump command buffer head and tail offset instead of head and tail pointer registers.
-> Patch 8/8: Fix bot reported warning on v1 patch series.
Dheeraj Kumar Srivastava (8):
iommu/amd: Refactor AMD IOMMU debugfs initial setup
iommu/amd: Add debugfs support to dump IOMMU MMIO registers
iommu/amd: Add debugfs support to dump IOMMU Capability registers
iommu/amd: Add debugfs support to dump IOMMU command buffer
iommu/amd: Add support for device id user input
iommu/amd: Add debugfs support to dump device table
iommu/amd: Add debugfs support to dump IRT Table
iommu/amd: Add documentation for AMD IOMMU debugfs support
Documentation/ABI/testing/debugfs-amd-iommu | 114 ++++++
drivers/iommu/amd/amd_iommu.h | 4 +-
drivers/iommu/amd/amd_iommu_types.h | 9 +
drivers/iommu/amd/debugfs.c | 377 +++++++++++++++++++-
drivers/iommu/amd/init.c | 5 +-
drivers/iommu/amd/iommu.c | 7 -
6 files changed, 495 insertions(+), 21 deletions(-)
create mode 100644 Documentation/ABI/testing/debugfs-amd-iommu
--
2.25.1
Return-Path: <linux-kernel+bounces-673529-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id DF1AA41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:37:37 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 39CD4179ADC
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:37:37 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 0915F1E32A2;
Wed, 4 Jun 2025 16:37:24 +0000 (UTC)
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 960CE1DDA0C
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:37:23 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749055043; cv=none; b=QzGDn09poundHCVwlBJg/9VfPnIIhpkLhZGkcGHGUTT+MADoEv9p7R2gJuzbBCTeJvx7PoN66J2V2jcodvPpcEISEXiEScypVk8V9bjw7Rq+rPRndWdYgWe4ErG5Lxhg958sdsav3YKCmzX/a7+Xfb7LpEipHqGl/FnycFl0dRM=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749055043; c=relaxed/simple;
bh=jC+2l4bpQLFniTd2XMMKy3YMABlelBNu/BiI4joa0Ck=;
h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References:
MIME-Version:Content-Type; b=eYah8PnLOeG9SYWjzJ68RrqTjKToDYaCNOZfbhIxu3S7aY5+7TnYlbcJ+O6ImLzAZHiFiE5cDGyq9mRG+kZqE/IkyVY6TtZ0r/PdN54fPI94HNYW389RZfcHPyVWkdjtRXlkoKkwALVVKMA5kq8H3e8v1S9ZSItCiAtNie0ftzY=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 49A3AC4CEE4;
Wed, 4 Jun 2025 16:37:21 +0000 (UTC)
Date: Wed, 4 Jun 2025 12:38:37 -0400
From: Steven Rostedt <rostedt@xxxxxxxxxxx>
To: Hugh Dickins <hughd@xxxxxxxxxx>
Cc: Thomas =?UTF-8?B?SGVsbHN0csO2bQ==?= <thomas.hellstrom@xxxxxxxxxxxxxxx>,
LKML <linux-kernel@xxxxxxxxxxxxxxx>, Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx>, Matthew Wilcox <willy@xxxxxxxxxxxxx>,
linux-mm@xxxxxxxxx, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Christian
Koenig <christian.koenig@xxxxxxx>, Huang Rui <ray.huang@xxxxxxx>, Matthew
Auld <matthew.auld@xxxxxxxxx>, Matthew Brost <matthew.brost@xxxxxxxxx>,
dri-devel@xxxxxxxxxxxxxxxxxxxxx, Maarten Lankhorst
<maarten.lankhorst@xxxxxxxxxxxxxxx>, Maxime Ripard <mripard@xxxxxxxxxx>,
Thomas Zimmermann <tzimmermann@xxxxxxx>, David Airlie <airlied@xxxxxxxxx>,
Simona Vetter <simona@xxxxxxxx>
Subject: Re: [PATCH v2] drm/ttm: Fix compile error when CONFIG_SHMEM is not
set
Message-ID: <20250604123837.0603354d@xxxxxxxxxxxxxxxxxx>
In-Reply-To: <d996ffad-42f1-1643-e44e-e837b2e3949d@xxxxxxxxxx>
References: <20250604085121.324be8c1@xxxxxxxxxxxxxxxxxx>
<6b3a37712330ec4b17968075f71296717db54046.camel@xxxxxxxxxxxxxxx>
<d996ffad-42f1-1643-e44e-e837b2e3949d@xxxxxxxxxx>
X-Mailer: Claws Mail 3.20.0git84 (GTK+ 2.24.33; x86_64-pc-linux-gnu)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, 4 Jun 2025 09:26:21 -0700 (PDT)
Hugh Dickins <hughd@xxxxxxxxxx> wrote:
> Reviewed-by: Thomas Hellstr=C3=B6m <thomas.hellstrom@xxxxxxxxxxxxxxx> =
=20
=20
Acked-by: Hugh Dickins <hughd@xxxxxxxxxx>
Thanks Thomas and Hugh,
Now the question is, who's gonna take it? ;-)
-- Steve
Return-Path: <linux-kernel+bounces-673530-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id C4DA241E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:37:56 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id D60C73A5E18
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:37:23 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 3BC301DDA0C;
Wed, 4 Jun 2025 16:37:31 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="zOuPMEKw"
Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2069.outbound.protection.outlook.com [40.107.236.69])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id ADFFF1E51F6
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:37:28 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.236.69
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749055050; cv=fail; b=mHXbKyUzP5ERucrE5xg+fxUi346RfgEshjTv1gJtb6FWqf6gD8b57OuwCaXqbb7xtG7REwRQ6k1zUCDdOEYKO3SN8m654FJtcEhppkel69+GODzwcc1j1l9DuiwYHk6WKlsAWvIuJDlS9OZ55XxDP+IbCgKUufYWl5xhnxQWbu4=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749055050; c=relaxed/simple;
bh=fZcOoid2iiMnOEkU4yDbi1eIaGDGbcPoDrcrQGoNCIc=;
h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version:Content-Type; b=aJU6hOnUj8YfaoeZ4ZrKO/QZNiY0nzwz1J2WQxrO14sM6vzVOg6ZF/2cYshqTyKC18NOiVSolt+isWcx07crTBq8hwFLxMLs/hJSalFB8x0lxkwFgy95k8/qFyY9uXkL56HexRF1K4MPEXRl7X6KyiogyMKhw2DD2zhJjJumtD8=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=zOuPMEKw; arc=fail smtp.client-ip=40.107.236.69
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com
Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=Ko/ctveeBVJKCUcVHJgoSYVcuhGWv8Mauupz/SvQt1AxAWTCYutZ88513LIPeu3ShPNlFQ+Y8ih1AxldekOMVFeerm/YLa3g1MqA1EBmO4Gri1INmwp/tr3gJOmAzdxWpoF/XItwGA1nVg7gpkRNxlA/Wz7LYdKcFnK8pbQOK3/MDWpcBFLbD0723806O9uMFWpZRl2cYbQwlHUgd+mdprO8dacevtCGcBmA2XpVCkMFaOXtodlCzh8/AJ8je9jW4j8Llcoh7th0oDmehedtari3Eya4YEzg7wHKZxl9A+x7h9zBHqjRP+T0+n1YWCo9ASeRFE3U8htUoFxtNP8fQw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=n/22qpuEXc2iSpGELsQIKflWqo39wLrEdAbW5wTRVTI=;
b=oMKhzCIg5xfDDL4AP77SRplF5IcGzJc8UOOkgRCegIu8+QOeNK21XLeDwcYuL6g84uWryY1DyHlGrwyBfIg0+5tt2U0EK4NTLZg8zHiBIiJg6RmiilRaCbOqsl8VsiM1i0QJ/Iu2MJRiOap4WcbYrZl4Vse47t8LhTQVUehOZSlymNgYhRfr5jxvqCH2Vi02oxsUNQ5O5W8Au3/ZM75gDb7y+OtYaZufGc/8QkoqF6n1O6DSNPmQtSDLMa4TQFYqfUf4yo45MOFm6aOIgf/eoJygHxD9xBXgj6H+UJX+slpavr3t3mJ4ZvnnaOBbtaDf2ZMZiqsbzDo8qzV6IrI8CA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is
165.204.84.17) smtp.rcpttodomain=8bytes.org smtp.mailfrom=amd.com; dmarc=pass
(p=quarantine sp=quarantine pct=100) action=none header.from=amd.com;
dkim=none (message not signed); arc=none (0)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=n/22qpuEXc2iSpGELsQIKflWqo39wLrEdAbW5wTRVTI=;
b=zOuPMEKwCA4GQX9zZGbgjQAJjXrQQOFy07swz10cLzgGo9HIBq+qxoAhIMYWEHh3WUagyMBtsJyTPbc8NTg5ISG1XnswfcFFahNAfEzHxsGpnUG0ZQaEJ4r+F6O7DdpHFhSa/9QFd2FaDs2QUM6O8xIxgv21Du76oLYg6TjVkVY=
Received: from SJ0PR03CA0346.namprd03.prod.outlook.com (2603:10b6:a03:39c::21)
by BN7PPF0D942FA9A.namprd12.prod.outlook.com (2603:10b6:40f:fc02::6c7) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8678.27; Wed, 4 Jun
2025 16:37:26 +0000
Received: from CO1PEPF000075F4.namprd03.prod.outlook.com
(2603:10b6:a03:39c:cafe::8f) by SJ0PR03CA0346.outlook.office365.com
(2603:10b6:a03:39c::21) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8792.23 via Frontend Transport; Wed,
4 Jun 2025 16:37:25 +0000
X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17)
smtp.mailfrom=amd.com; dkim=none (message not signed)
header.d=none;dmarc=pass action=none header.from=amd.com;
Received-SPF: Pass (protection.outlook.com: domain of amd.com designates
165.204.84.17 as permitted sender) receiver=protection.outlook.com;
client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C
Received: from SATLEXMB04.amd.com (165.204.84.17) by
CO1PEPF000075F4.mail.protection.outlook.com (10.167.249.43) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
15.20.8792.29 via Frontend Transport; Wed, 4 Jun 2025 16:37:25 +0000
Received: from BLRDHSRIVAS.amd.com (10.180.168.240) by SATLEXMB04.amd.com
(10.181.40.145) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 4 Jun
2025 11:37:22 -0500
From: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@xxxxxxx>
To: <joro@xxxxxxxxxx>, <suravee.suthikulpanit@xxxxxxx>, <will@xxxxxxxxxx>,
<robin.murphy@xxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>,
<iommu@xxxxxxxxxxxxxxx>, <Vasant.Hegde@xxxxxxx>,
<dheerajkumar.srivastava@xxxxxxx>
CC: Vasant Hegde <vasant.hegde@xxxxxxx>
Subject: [PATCH v6 1/8] iommu/amd: Refactor AMD IOMMU debugfs initial setup
Date: Wed, 4 Jun 2025 22:06:40 +0530
Message-ID: <20250604163647.1439-2-dheerajkumar.srivastava@xxxxxxx>
X-Mailer: git-send-email 2.25.1
In-Reply-To: <20250604163647.1439-1-dheerajkumar.srivastava@xxxxxxx>
References: <20250604163647.1439-1-dheerajkumar.srivastava@xxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain
X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com
(10.181.40.145)
X-EOPAttributedMessage: 0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: CO1PEPF000075F4:EE_|BN7PPF0D942FA9A:EE_
X-MS-Office365-Filtering-Correlation-Id: 8f021166-cdb8-414c-eab7-08dda3861694
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam:
BCL:0;ARA:13230040|376014|36860700013|82310400026|1800799024;
X-Microsoft-Antispam-Message-Info:
=?us-ascii?Q?Uv6o2H2QLnBIU3LM+yb29J7Wf6Vg4lqcrk0qTECn07g0WHYw+gn2IaMx6K1I?=
=?us-ascii?Q?7ZHDjAR2Z+FaLKmJ8i9vgpWUTNrvGM/M3GKTDbbE0bTElQZYffO1GN8z9CxG?=
=?us-ascii?Q?ZJOrHG4Q96EdxzHChQcEj4WOCuf3ClU/HpdBw7Ska45xATfvxT9yFOTKTg64?=
=?us-ascii?Q?69OiR2Wvq9YAq7qmrpkKUDdSzC/krC3tAu/pWp32obU7UUCQF3KmEl36LaKz?=
=?us-ascii?Q?44Lfwr8Opx3eCr7Pi7dRI1fzK9EET2fBqPsEdsHHtejVWATEVy4Vp+ff3vjZ?=
=?us-ascii?Q?K/eNpgrFoTjYlzwIDh+w03oJulWvDouILoMT0PmkEUBgUEh6Q6tKwOTXLqhO?=
=?us-ascii?Q?86D5Mh4J4jlmQFrzSm49Betl6pD0MGojOi54YjXzqUYbvfJNsbtT2J67AL8o?=
=?us-ascii?Q?l6hsO++jOExiOwYB7YckkP/WODoN2wU6PyX3DdXMrMNsUe43QG5Sf6THjcKe?=
=?us-ascii?Q?7JHBbG2LeZ50qvydFA9Zuz7klSdwy29pqiPvowQSiHBZmC73sLJoHUjbN2aQ?=
=?us-ascii?Q?rQaysWOF2MLc1hog5q7oK0OI49goGcOZAGZR2PwtnrFKSrkgzFMLHsjuzvR6?=
=?us-ascii?Q?EGgng9jbe1becyvVg9bP+OnB4wYwVjZ32DpUxAbyzW9J6HlzFg5DNn5nfjQG?=
=?us-ascii?Q?LX8CuBqYix3w9RrSoj5U/uZgr6bxXqtrK12dsTiqjDzNvZ1Uenita8fqOR5X?=
=?us-ascii?Q?LCdO6tpAcf//kK+tt9eYNEJXk0ftD8WfJ3NT7AnJ0Fsn4VEflP6/dAIPPOoD?=
=?us-ascii?Q?fSiLaGIqufZR6aOJjvHXHSFRC+76z6162GQ4DiyYa88O3LUnonB+VMRkizED?=
=?us-ascii?Q?PPlVTYVv2ElgMgqhhDfZGuUTTnPEOHZNy8PxV7Z0Bc7wszmI6SRF0zxViibG?=
=?us-ascii?Q?zSkz3a/V6th2Go/Ll0NlihwvSgUIGriC3EVcHzKxJ0xFSAyQ4GsJXu+y4DOt?=
=?us-ascii?Q?Wx2LlyG4L0Ew/4ocKO7PUDzZ8X7R6EteXAur0BwVkRW9ZNbPV5Mpl+9ufgSf?=
=?us-ascii?Q?G01pkHNDeJTh+AkL74Q8F3bYeV+Oc6mxJpM/T7ClK0K9PDIpP48q5lqZxWKz?=
=?us-ascii?Q?kgKfGNkiMUKX9z54oMuzrBmJKo0yrYWRObuH+SawtEX+U1A/tIzzbdNVxhV3?=
=?us-ascii?Q?4FYr7FqfAcCHMYqaOEfDYuod1B51A8dpZjzRNORkMhhDuah2flNqDQZtJYgQ?=
=?us-ascii?Q?w7Eay3icK7MYFYmdeHOiVl/cc8Ope/NzK64Vo2d7WWApneTx14UcF2I0De01?=
=?us-ascii?Q?PFIGMqm18GufLhqBbGkl9iwCmquPj6WSvbB2j0+phNIEIqp1rp6d9utesg+P?=
=?us-ascii?Q?kearl01AbsdzZLWrN9T7M7FuqzNqAvs6KmFF8h7K96sck8d8vEWNlqP7mrMK?=
=?us-ascii?Q?5E/r2yFMmCCp9JS5c3vEWhgV17cDzluxoskgG4oEZj4qcJ19ItXCH3JLPJK0?=
=?us-ascii?Q?AY9bEHWA9tISiE9biOsLzW+Cx9uP5/4BO0ZQW7OPV/J6QQeRLD/VPxuup70e?=
=?us-ascii?Q?6ghwAgHd7F3KDgZHhlwSMbD3YpUAsTyYb0hE?=
X-Forefront-Antispam-Report:
CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(376014)(36860700013)(82310400026)(1800799024);DIR:OUT;SFP:1101;
X-OriginatorOrg: amd.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 16:37:25.4821
(UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: 8f021166-cdb8-414c-eab7-08dda3861694
X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com]
X-MS-Exchange-CrossTenant-AuthSource:
CO1PEPF000075F4.namprd03.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PPF0D942FA9A
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Rearrange initial setup of AMD IOMMU debugfs to segregate per IOMMU
setup and setup which is common for all IOMMUs. This ensures that common
debugfs paths (introduced in subsequent patches) are created only once
instead of being created for each IOMMU.
With the change, there is no need to use lock as amd_iommu_debugfs_setup()
will be called only once during AMD IOMMU initialization. So remove lock
acquisition in amd_iommu_debugfs_setup().
Signed-off-by: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@xxxxxxx>
Reviewed-by: Suravee Suthikulpanit <suravee.suthikulpanit@xxxxxxx>
Reviewed-by: Vasant Hegde <vasant.hegde@xxxxxxx>
---
drivers/iommu/amd/amd_iommu.h | 4 ++--
drivers/iommu/amd/debugfs.c | 16 +++++++---------
drivers/iommu/amd/init.c | 5 ++---
3 files changed, 11 insertions(+), 14 deletions(-)
diff --git a/drivers/iommu/amd/amd_iommu.h b/drivers/iommu/amd/amd_iommu.h
index 220c598b7e14..70873bb78b3c 100644
--- a/drivers/iommu/amd/amd_iommu.h
+++ b/drivers/iommu/amd/amd_iommu.h
@@ -28,9 +28,9 @@ void *__init iommu_alloc_4k_pages(struct amd_iommu *iommu,
gfp_t gfp, size_t size);
#ifdef CONFIG_AMD_IOMMU_DEBUGFS
-void amd_iommu_debugfs_setup(struct amd_iommu *iommu);
+void amd_iommu_debugfs_setup(void);
#else
-static inline void amd_iommu_debugfs_setup(struct amd_iommu *iommu) {}
+static inline void amd_iommu_debugfs_setup(void) {}
#endif
/* Needed for interrupt remapping */
diff --git a/drivers/iommu/amd/debugfs.c b/drivers/iommu/amd/debugfs.c
index 545372fcc72f..ff9520e002be 100644
--- a/drivers/iommu/amd/debugfs.c
+++ b/drivers/iommu/amd/debugfs.c
@@ -13,20 +13,18 @@
#include "amd_iommu.h"
static struct dentry *amd_iommu_debugfs;
-static DEFINE_MUTEX(amd_iommu_debugfs_lock);
#define MAX_NAME_LEN 20
-void amd_iommu_debugfs_setup(struct amd_iommu *iommu)
+void amd_iommu_debugfs_setup(void)
{
+ struct amd_iommu *iommu;
char name[MAX_NAME_LEN + 1];
- mutex_lock(&amd_iommu_debugfs_lock);
- if (!amd_iommu_debugfs)
- amd_iommu_debugfs = debugfs_create_dir("amd",
- iommu_debugfs_dir);
- mutex_unlock(&amd_iommu_debugfs_lock);
+ amd_iommu_debugfs = debugfs_create_dir("amd", iommu_debugfs_dir);
- snprintf(name, MAX_NAME_LEN, "iommu%02d", iommu->index);
- iommu->debugfs = debugfs_create_dir(name, amd_iommu_debugfs);
+ for_each_iommu(iommu) {
+ snprintf(name, MAX_NAME_LEN, "iommu%02d", iommu->index);
+ iommu->debugfs = debugfs_create_dir(name, amd_iommu_debugfs);
+ }
}
diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c
index 14aa0d77df26..ecc6c246f87e 100644
--- a/drivers/iommu/amd/init.c
+++ b/drivers/iommu/amd/init.c
@@ -3387,7 +3387,6 @@ int amd_iommu_enable_faulting(unsigned int cpu)
*/
static int __init amd_iommu_init(void)
{
- struct amd_iommu *iommu;
int ret;
ret = iommu_go_to_state(IOMMU_INITIALIZED);
@@ -3401,8 +3400,8 @@ static int __init amd_iommu_init(void)
}
#endif
- for_each_iommu(iommu)
- amd_iommu_debugfs_setup(iommu);
+ if (!ret)
+ amd_iommu_debugfs_setup();
return ret;
}
--
2.25.1
Return-Path: <linux-kernel+bounces-673531-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id E9B1241E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:37:57 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id CD66218976B9
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:38:10 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id AA1481E0DE8;
Wed, 4 Jun 2025 16:37:48 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="aMePBzl/"
Received: from out-179.mta0.migadu.com (out-179.mta0.migadu.com [91.218.175.179])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 09B631DED51
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:37:44 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.179
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749055067; cv=none; b=sG4GukOC7iFx4dTELptGWAHeLV5FMCeaukyn9vFHN3XUraAdYdd1uAGrvGmQ5xSRVBHRsqZQgEYwKNrSnUssMKQPxB1imqY/GORWYRTe/I20v+oYVToI32AOSpZdkTtQGbkLErDJAPs00Fa4Dn2azjc6z2Y81fxWviFZLpkwfrA=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749055067; c=relaxed/simple;
bh=k1VAhtvWn1mdnc82A42urCXNfSl687+frp/shs2RzIQ=;
h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=i1Dao87Av/qMsounI1C9gzGM/Vq2mvjvqVSENcO58vCubtt+vIpuMXnDXChK13pQNSujg1ZJb3f/FidWKJsTlt8PMNP2hmO8LlGI3JnSCUkFVS5xa8xuYDKVfFUryqSyBKyehvZt9fxjBitsz+2XiWwvlpTlTdR+9QC6xb5ihcE=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=aMePBzl/; arc=none smtp.client-ip=91.218.175.179
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev
X-Report-Abuse: Please report any abuse attempt to abuse@xxxxxxxxxx and include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1;
t=1749055062;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:
content-transfer-encoding:content-transfer-encoding;
bh=LpQJtvbQ0WTNzxLrRi6c5eMnvReMC88RFvMxCl1x3Ss=;
b=aMePBzl/Kpp/mc2Qthi84fsO91CCWhQU6s10DjhzRzngNpjRGDzyOpYaS/Vd78OtVKBHmU
B6XxJLcdvcmWF8gxU20PBS6FgsEhyiBp81BcOpkjUcwC6EOgZK7h6DExgVCL/pUBulrwJn
cTL90JD5YNNQiu0R0zBQlYz7tjIvNXg=
From: Tao Chen <chen.dylane@xxxxxxxxx>
To: ast@xxxxxxxxxx,
daniel@xxxxxxxxxxxxx,
john.fastabend@xxxxxxxxx,
andrii@xxxxxxxxxx,
martin.lau@xxxxxxxxx,
eddyz87@xxxxxxxxx,
song@xxxxxxxxxx,
yonghong.song@xxxxxxxxx,
kpsingh@xxxxxxxxxx,
sdf@xxxxxxxxxxx,
haoluo@xxxxxxxxxx,
jolsa@xxxxxxxxxx
Cc: bpf@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx,
Tao Chen <chen.dylane@xxxxxxxxx>
Subject: [PATCH bpf-next] bpf: Add show_fdinfo for perf_event
Date: Thu, 5 Jun 2025 00:37:22 +0800
Message-Id: <20250604163723.3175258-1-chen.dylane@xxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Migadu-Flow: FLOW_OUT
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
After commit 1b715e1b0ec5 ("bpf: Support ->fill_link_info for perf_event") add
perf_event info, we can also show the info with the method of cat /proc/[fd]/fdinfo.
kprobe fdinfo:
link_type: perf
link_id: 2
prog_tag: bcf7977d3b93787c
prog_id: 18
name: bpf_fentry_test1
offset: 0
missed: 0
addr: ffffffffaea8d134
event_type: 3
cookie: 3735928559
uprobe fdinfo:
link_type: perf
link_id: 6
prog_tag: bcf7977d3b93787c
prog_id: 7
name: /proc/self/exe
offset: 6507541
event_type: 1
cookie: 3735928559
tracepoint fdinfo:
link_type: perf
link_id: 4
prog_tag: bcf7977d3b93787c
prog_id: 8
tp_name: sched_switch
event_type: 5
cookie: 3735928559
perf_event fdinfo:
link_type: perf
link_id: 5
prog_tag: bcf7977d3b93787c
prog_id: 9
type: 1
config: 2
event_type: 6
cookie: 3735928559
Signed-off-by: Tao Chen <chen.dylane@xxxxxxxxx>
---
kernel/bpf/syscall.c | 126 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 126 insertions(+)
diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c
index 9794446bc8..9af54852eb 100644
--- a/kernel/bpf/syscall.c
+++ b/kernel/bpf/syscall.c
@@ -3793,6 +3793,35 @@ static int bpf_perf_link_fill_kprobe(const struct perf_event *event,
info->perf_event.kprobe.cookie = event->bpf_cookie;
return 0;
}
+
+static void bpf_perf_link_fdinfo_kprobe(const struct perf_event *event,
+ struct seq_file *seq)
+{
+ const char *name;
+ int err;
+ u32 prog_id, type;
+ u64 offset, addr;
+ unsigned long missed;
+
+ err = bpf_get_perf_event_info(event, &prog_id, &type, &name,
+ &offset, &addr, &missed);
+ if (err)
+ return;
+
+ if (type == BPF_FD_TYPE_KRETPROBE)
+ type = BPF_PERF_EVENT_KRETPROBE;
+ else
+ type = BPF_PERF_EVENT_KPROBE;
+
+ seq_printf(seq,
+ "name:\t%s\n"
+ "offset:\t%llu\n"
+ "missed:\t%lu\n"
+ "addr:\t%llx\n"
+ "event_type:\t%u\n"
+ "cookie:\t%llu\n",
+ name, offset, missed, addr, type, event->bpf_cookie);
+}
#endif
#ifdef CONFIG_UPROBE_EVENTS
@@ -3820,6 +3849,34 @@ static int bpf_perf_link_fill_uprobe(const struct perf_event *event,
info->perf_event.uprobe.cookie = event->bpf_cookie;
return 0;
}
+
+static void bpf_perf_link_fdinfo_uprobe(const struct perf_event *event,
+ struct seq_file *seq)
+{
+ const char *name;
+ int err;
+ u32 prog_id, type;
+ u64 offset, addr;
+ unsigned long missed;
+
+ err = bpf_get_perf_event_info(event, &prog_id, &type, &name,
+ &offset, &addr, &missed);
+ if (err)
+ return;
+
+ if (type == BPF_FD_TYPE_URETPROBE)
+ type = BPF_PERF_EVENT_URETPROBE;
+ else
+ type = BPF_PERF_EVENT_UPROBE;
+
+ seq_printf(seq,
+ "name:\t%s\n"
+ "offset:\t%llu\n"
+ "event_type:\t%u\n"
+ "cookie:\t%llu\n",
+ name, offset, type, event->bpf_cookie);
+
+}
#endif
static int bpf_perf_link_fill_probe(const struct perf_event *event,
@@ -3888,10 +3945,79 @@ static int bpf_perf_link_fill_link_info(const struct bpf_link *link,
}
}
+static void bpf_perf_event_link_show_fdinfo(const struct perf_event *event,
+ struct seq_file *seq)
+{
+ seq_printf(seq,
+ "type:\t%u\n"
+ "config:\t%llu\n"
+ "event_type:\t%u\n"
+ "cookie:\t%llu\n",
+ event->attr.type, event->attr.config,
+ BPF_PERF_EVENT_EVENT, event->bpf_cookie);
+}
+
+static void bpf_tracepoint_link_show_fdinfo(const struct perf_event *event,
+ struct seq_file *seq)
+{
+ int err;
+ const char *name;
+ u32 prog_id;
+
+ err = bpf_get_perf_event_info(event, &prog_id, NULL, &name, NULL,
+ NULL, NULL);
+ if (err)
+ return;
+
+ seq_printf(seq,
+ "tp_name:\t%s\n"
+ "event_type:\t%u\n"
+ "cookie:\t%llu\n",
+ name, BPF_PERF_EVENT_TRACEPOINT, event->bpf_cookie);
+}
+
+static void bpf_probe_link_show_fdinfo(const struct perf_event *event,
+ struct seq_file *seq)
+{
+#ifdef CONFIG_KPROBE_EVENTS
+ if (event->tp_event->flags & TRACE_EVENT_FL_KPROBE)
+ return bpf_perf_link_fdinfo_kprobe(event, seq);
+#endif
+
+#ifdef CONFIG_UPROBE_EVENTS
+ if (event->tp_event->flags & TRACE_EVENT_FL_UPROBE)
+ return bpf_perf_link_fdinfo_uprobe(event, seq);
+#endif
+}
+
+static void bpf_perf_link_show_fdinfo(const struct bpf_link *link,
+ struct seq_file *seq)
+{
+ struct bpf_perf_link *perf_link;
+ const struct perf_event *event;
+
+ perf_link = container_of(link, struct bpf_perf_link, link);
+ event = perf_get_event(perf_link->perf_file);
+ if (IS_ERR(event))
+ return;
+
+ switch (event->prog->type) {
+ case BPF_PROG_TYPE_PERF_EVENT:
+ return bpf_perf_event_link_show_fdinfo(event, seq);
+ case BPF_PROG_TYPE_TRACEPOINT:
+ return bpf_tracepoint_link_show_fdinfo(event, seq);
+ case BPF_PROG_TYPE_KPROBE:
+ return bpf_probe_link_show_fdinfo(event, seq);
+ default:
+ return;
+ }
+}
+
static const struct bpf_link_ops bpf_perf_link_lops = {
.release = bpf_perf_link_release,
.dealloc = bpf_perf_link_dealloc,
.fill_link_info = bpf_perf_link_fill_link_info,
+ .show_fdinfo = bpf_perf_link_show_fdinfo,
};
static int bpf_perf_link_attach(const union bpf_attr *attr, struct bpf_prog *prog)
--
2.43.0
Return-Path: <linux-kernel+bounces-673532-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 9774741E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:38:03 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 132F518972F8
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:38:17 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 137E91E3DED;
Wed, 4 Jun 2025 16:37:50 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="ez07Df/1"
Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2059.outbound.protection.outlook.com [40.107.212.59])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 751BA1DE4E0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:37:47 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.212.59
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749055069; cv=fail; b=umsIagDCqaaBEf5GZ0qHQpI19F4rm1k63mAKXM2eZ0Hd97zq4lR7FPXlPiN9NvChgjuLqTsxSTiQ6UVBEGOSigjhc6QrZDsb7zpFm/Rmtoa6KF55XrndK9n+KqGFWftVlfYYI0ki1SODeD1Zv27KRkmIy7CZPBq8N5wrmd8wvX8=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749055069; c=relaxed/simple;
bh=pGoGo8qdMgfBXhSZZJS1qql96kplezBM5B3Td4ya3/c=;
h=From:To:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version:Content-Type; b=aZnzAgdazDyvHToCJtDNpvaBezpIUPMSoo0LBiuTa65hjP3cx7P17YdYfhYHt3BIHCM+dQejNXE7U8DkT5EmUDAhoXcv6v//CKwi5GpbpBr9fS8mqaLWD1cDhXwF5OpeUIdz94So008510w7bc8Tmw3BSsuXulAJCtIiWlFWPLk=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=ez07Df/1; arc=fail smtp.client-ip=40.107.212.59
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com
Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=GyBMZq+lciCqzBMpZHicOu3lhmyusMbchBk6V93I8XVoIY0Ck5465NFBzBVQwBf5oIy4sSGM2LWEIaFfhUKx6YLF15h3ssbEvOiG75lBBbrWqGwfppSiFFjlyP1eYB8ojo5o2ooG4haJ4uoKSk4ut/Hjdk7I1nEptxBBmXJcorHt9wWVLuZ8lsEnZqsQvVw1mn+IUtp6fyIETMzyBXGinx4RnA9dAMEKfN9OACsYN/1sPXbQMWXEO+TPajlMx6gxUi1NbRNOd5Il3Cqlc4UyP+aFlArCSEv3EHA5Y+LEoorf0+mX50pQdnifOfM0JE2tojkbUE1a7mrpBoC1X1KmrA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=zDRtWsOMfTLYOdkGwHoz9iy3Hy08VEGzNf+TXQ6E2L0=;
b=w4yT6ciqIXhO8dmU6gGmoC+1odkZUBJLMBNYZlDaibr1DXkwHwFGgp0lz67+zIBOF6UrPD0AtKzujOjI88KiNrzcWz3odU4oy2I3xyTAmyNes+KdY3daWGw+2QMP+uFzKkjFjweKwAhL/smFLZjDpyHZrh69xOZWAwCjb2/ydG9mloGMfFRBpK5gVZlSOsW4R635FZSEOHLt/HxXfV4i1yF7jJclmKPlyRpPSRTTcAS7I/BoQJ9cU3mlbSB0O47NAB55mBP3qNUuze9+poD56Ch8L1oPJ6td/Xv0XI/uEokfrzI8aVagN1OL22I0b9ee5qoFPaYpgRLJG77PuG7dWA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is
165.204.84.17) smtp.rcpttodomain=8bytes.org smtp.mailfrom=amd.com; dmarc=pass
(p=quarantine sp=quarantine pct=100) action=none header.from=amd.com;
dkim=none (message not signed); arc=none (0)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=zDRtWsOMfTLYOdkGwHoz9iy3Hy08VEGzNf+TXQ6E2L0=;
b=ez07Df/1BaW+2j43Ov+Pw279hZxN1vMCdYUfU51eUw1vq7Ur7UGEnJJfevdc+oHlwkxPDSgCkpLKgssmNqA5QDB+wjYM5ARMx5U0qWX3KWlw67ngBDqS3Wrhr+72k+zZcB7t/rJSad+Dan/Eh/qWyzhuzQGmdMpaS8VkyWpQWA0=
Received: from BY3PR04CA0001.namprd04.prod.outlook.com (2603:10b6:a03:217::6)
by SA5PPFF3CB57EDE.namprd12.prod.outlook.com (2603:10b6:80f:fc04::8eb) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8678.27; Wed, 4 Jun
2025 16:37:45 +0000
Received: from CO1PEPF000075F4.namprd03.prod.outlook.com
(2603:10b6:a03:217:cafe::57) by BY3PR04CA0001.outlook.office365.com
(2603:10b6:a03:217::6) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8746.30 via Frontend Transport; Wed,
4 Jun 2025 16:37:44 +0000
X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17)
smtp.mailfrom=amd.com; dkim=none (message not signed)
header.d=none;dmarc=pass action=none header.from=amd.com;
Received-SPF: Pass (protection.outlook.com: domain of amd.com designates
165.204.84.17 as permitted sender) receiver=protection.outlook.com;
client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C
Received: from SATLEXMB04.amd.com (165.204.84.17) by
CO1PEPF000075F4.mail.protection.outlook.com (10.167.249.43) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
15.20.8792.29 via Frontend Transport; Wed, 4 Jun 2025 16:37:44 +0000
Received: from BLRDHSRIVAS.amd.com (10.180.168.240) by SATLEXMB04.amd.com
(10.181.40.145) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 4 Jun
2025 11:37:39 -0500
From: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@xxxxxxx>
To: <joro@xxxxxxxxxx>, <suravee.suthikulpanit@xxxxxxx>, <will@xxxxxxxxxx>,
<robin.murphy@xxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>,
<iommu@xxxxxxxxxxxxxxx>, <Vasant.Hegde@xxxxxxx>,
<dheerajkumar.srivastava@xxxxxxx>
Subject: [PATCH v6 2/8] iommu/amd: Add debugfs support to dump IOMMU MMIO registers
Date: Wed, 4 Jun 2025 22:06:41 +0530
Message-ID: <20250604163647.1439-3-dheerajkumar.srivastava@xxxxxxx>
X-Mailer: git-send-email 2.25.1
In-Reply-To: <20250604163647.1439-1-dheerajkumar.srivastava@xxxxxxx>
References: <20250604163647.1439-1-dheerajkumar.srivastava@xxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain
X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com
(10.181.40.145)
X-EOPAttributedMessage: 0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: CO1PEPF000075F4:EE_|SA5PPFF3CB57EDE:EE_
X-MS-Office365-Filtering-Correlation-Id: 35173e8a-ddca-4557-0ff8-08dda38621aa
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam:
BCL:0;ARA:13230040|36860700013|376014|82310400026|1800799024;
X-Microsoft-Antispam-Message-Info:
=?us-ascii?Q?Y07Tx3PfdflZa+oHKsgipVO8W4Bwr8t1yJO6bJQuS9WE/JnO5IwH0rICFcRo?=
=?us-ascii?Q?uOPK43U3PoRZfB6SKethQz2+TD3ldEF6j+wxiILEn1xnJcefJVDZK5wxx58O?=
=?us-ascii?Q?GDk8R0FzrmJAdOaEzlZP7dKCZPyrzjpzMyHtHs+xCIEvq4Q2ugUU/ttUoi+4?=
=?us-ascii?Q?EasE8fJuUMFl0M+v7Ap13Wrmr2DBX1dl/nL55AP+E+/CYt4/YAZ/cveJ6+rp?=
=?us-ascii?Q?VgUrY9ZvBbny9Z9ZL1BobfkZGoqbZbbGwPTnujF6zHyjze/upY+lTkExIXrM?=
=?us-ascii?Q?AHrpb3G6O+r5q+c+dUzLE11RN0VRxyg9Gm9q6SiD0hwE0O609upGMkhd9u00?=
=?us-ascii?Q?8k2XkCrBu69ZACFLcY2ODTEtXDR8vdhKG/WljlvUIv6qTKVcSAlICc8Y9b90?=
=?us-ascii?Q?HbPtYfTVXAqX3lfbi0mQOLiJ8n7k20fR1PI0SSO0KKeN7Txp9Gy/rjZE/o0v?=
=?us-ascii?Q?3CQPquXahMeArBl6TeomBdhDIAo/+riw9Zy5VnzDn4sYHXI+UjeXuaDnwOhu?=
=?us-ascii?Q?LkVOWUWSp1f3Zd6UC/naUBbWhEEO8rI8TmA1H2jNqyokaTnWqBX9rb0Y5kit?=
=?us-ascii?Q?GgUEIDuWZRIVK80PF+zfVTObCnBYBT28k1/0+OAA/Obnx1uXabt6O9JWBPXW?=
=?us-ascii?Q?/fl8R8Be8QSNGbwtI8zB+v6iM2ZRtsZp5+2JXKPcSJ+N6ioMF41pQffZP7HR?=
=?us-ascii?Q?ABcIhnT+WEiqMGGmxTqbT57rXYi1DdgsZssJA5zjN6J1tlsmKPQngcniKtwa?=
=?us-ascii?Q?YTI1hXnFv959s0zDQvrap8UAMNSFM+C/8NfnLpPescG008pzt8h3IOLAfp3h?=
=?us-ascii?Q?dGpP1R1tmoDwiUpupt57rF+PO2d6MuxQXGrETDwm+o6mhQVQc2SOKTFrywVD?=
=?us-ascii?Q?L6aBnKmnKJ7amexcbawk6UAURE/puC7JkXEhjQwhLR+djxlaf6h1nryT9uw8?=
=?us-ascii?Q?w4FHL0G1vCZfzoC0Bf/4nGyA8/F1Kmfk+WCGEIUSTi9VZjg/GvTDi4QpCMBn?=
=?us-ascii?Q?APqcFyf0gwmKUQsu6AIR5Ws2Eq2MtCTvQuYciuTPV2HPaJW4BWFqKMrAT+BX?=
=?us-ascii?Q?xbFAORAZaZ/bzJzv5sXHvYR/Rz7lpoRwslU2jklmcdW6jJFLn+KS0x8tc6Pp?=
=?us-ascii?Q?x/wqEr/koFloSGvkiCctJM9zlqJCEJR1qG3H4wiXNciSNn3NNZMw1G2avb2Q?=
=?us-ascii?Q?O/Ycfpth38jQt2kjTRiWRKJQb6TWakdhK7cNHsWXESwl67S9xeH8ZQRwnvl7?=
=?us-ascii?Q?4/KmmMFBhisQnaQi3rIa1wphoDsmTjVQbtmwXNmEhDyq0mQrBgY3O5pu2IkU?=
=?us-ascii?Q?3igRdFCfF0C+IuNjNNbrWtuyy49VnxY7vlWRT0pPwBVLFycMLskyrfSslVnO?=
=?us-ascii?Q?6Sas5YvLV2dctxEH1UtWv/Wtnm+zoQmIWNVS6SAcVkUJeb7Agb1/F6vaJFJK?=
=?us-ascii?Q?8FqiZo+k0uUkkHMnHfhXWxFutH56mRDygiVHnf1noVqdiGFH6QtV/GCNxFKD?=
=?us-ascii?Q?Y+PBryyVe+85wFCF4zCRRFVQwjdy7YAw8MX9?=
X-Forefront-Antispam-Report:
CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(36860700013)(376014)(82310400026)(1800799024);DIR:OUT;SFP:1101;
X-OriginatorOrg: amd.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 16:37:44.0755
(UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: 35173e8a-ddca-4557-0ff8-08dda38621aa
X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com]
X-MS-Exchange-CrossTenant-AuthSource:
CO1PEPF000075F4.namprd03.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA5PPFF3CB57EDE
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Analyzing IOMMU MMIO registers gives a view of what IOMMU is
configured with on the system and is helpful to debug issues
with IOMMU.
eg.
-> To get mmio registers value at offset 0x18 for iommu<x> (say, iommu00)
# echo "0x18" > /sys/kernel/debug/iommu/amd/iommu00/mmio
# cat /sys/kernel/debug/iommu/amd/iommu00/mmio
Signed-off-by: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@xxxxxxx>
---
drivers/iommu/amd/amd_iommu_types.h | 1 +
drivers/iommu/amd/debugfs.c | 47 +++++++++++++++++++++++++++++
2 files changed, 48 insertions(+)
diff --git a/drivers/iommu/amd/amd_iommu_types.h b/drivers/iommu/amd/amd_iommu_types.h
index 5089b58e528a..38eca75f6ef1 100644
--- a/drivers/iommu/amd/amd_iommu_types.h
+++ b/drivers/iommu/amd/amd_iommu_types.h
@@ -796,6 +796,7 @@ struct amd_iommu {
#ifdef CONFIG_AMD_IOMMU_DEBUGFS
/* DebugFS Info */
struct dentry *debugfs;
+ int mmio_offset;
#endif
/* IOPF support */
diff --git a/drivers/iommu/amd/debugfs.c b/drivers/iommu/amd/debugfs.c
index ff9520e002be..520377ab6731 100644
--- a/drivers/iommu/amd/debugfs.c
+++ b/drivers/iommu/amd/debugfs.c
@@ -15,6 +15,48 @@
static struct dentry *amd_iommu_debugfs;
#define MAX_NAME_LEN 20
+#define OFS_IN_SZ 8
+
+static ssize_t iommu_mmio_write(struct file *filp, const char __user *ubuf,
+ size_t cnt, loff_t *ppos)
+{
+ struct seq_file *m = filp->private_data;
+ struct amd_iommu *iommu = m->private;
+ int ret;
+
+ iommu->mmio_offset = -1;
+
+ if (cnt > OFS_IN_SZ)
+ return -EINVAL;
+
+ ret = kstrtou32_from_user(ubuf, cnt, 0, &iommu->mmio_offset);
+ if (ret)
+ return ret;
+
+ if (iommu->mmio_offset > iommu->mmio_phys_end - 4) {
+ iommu->mmio_offset = -1;
+ return -EINVAL;
+ }
+
+ return cnt;
+}
+
+static int iommu_mmio_show(struct seq_file *m, void *unused)
+{
+ struct amd_iommu *iommu = m->private;
+ u64 value;
+
+ if (iommu->mmio_offset < 0) {
+ seq_puts(m, "Please provide mmio register's offset\n");
+ return 0;
+ }
+
+ value = readq(iommu->mmio_base + iommu->mmio_offset);
+ seq_printf(m, "Offset:0x%x Value:0x%016llx\n", iommu->mmio_offset, value);
+
+ return 0;
+}
+DEFINE_SHOW_STORE_ATTRIBUTE(iommu_mmio);
void amd_iommu_debugfs_setup(void)
{
@@ -24,7 +66,12 @@ void amd_iommu_debugfs_setup(void)
amd_iommu_debugfs = debugfs_create_dir("amd", iommu_debugfs_dir);
for_each_iommu(iommu) {
+ iommu->mmio_offset = -1;
+
snprintf(name, MAX_NAME_LEN, "iommu%02d", iommu->index);
iommu->debugfs = debugfs_create_dir(name, amd_iommu_debugfs);
+
+ debugfs_create_file("mmio", 0644, iommu->debugfs, iommu,
+ &iommu_mmio_fops);
}
}
--
2.25.1
Return-Path: <linux-kernel+bounces-673534-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 3C96641E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:38:33 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 6213018974C7
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:38:46 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 1617C1E32B9;
Wed, 4 Jun 2025 16:38:25 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="W0u2/1P0"
Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2052.outbound.protection.outlook.com [40.107.237.52])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7E25970814
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:38:22 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.237.52
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749055104; cv=fail; b=HlS7u5zcnsE0yhlz8SWItN8Wa3TFARiluHfmHmPZoWVcpRZ4k3SWctBFWELc+zmkKANCZmKKyMoXbVv1Qa13MERwPt1XLx6s8lyi7am9byQZxaD/VExsq8kCe84QmXlWb7UApEQvCuu8MryqmbyVeU4m/Qwe+AHo/HXcMpBl9/0=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749055104; c=relaxed/simple;
bh=rrrnIEHbzW1N9olh+46U9BKwE4kwgdbLwZLynlGszNk=;
h=From:To:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version:Content-Type; b=G/VH2ENk7Q1kbwcF0yKkNXAmSTAdd6R1SDyj2rdzpeHsGw3PU+qjPtuEOgtHllW4vKl05LW/vANbH8diH05fPAyBdmdvhS+geye+LUAwBNPc4eXr9ibJgjhgoedUcJz1hTnMwmQBIxJOnq9zI6cGYareyE3//DmO5hldKu7Iuek=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=W0u2/1P0; arc=fail smtp.client-ip=40.107.237.52
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com
Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=cl2boWwWghTVh4m/mHruAWF/oynzOPz7KFcbttAg7KJ3ojQPjqG9Sq7JOcEaMlvsq/a14tvgAkS2eBEZ426lCrEp5EFY7AGwohCkPQMdg193keeA4P2Ol0XT0wmamMO8TctQn5z7NfFeb3a39B42j5EjW6LKGVQew+ooEaOTWoEDjUsk/NDA2ukVS4IglSd5qFkxxJzxs3ntlhQ4VxCMkOAr4PZ75fKf9Zh+ueBREO6omoP3CH4E3dvASFZQcsetH9f5qN8jDB/LJiQDy/q7kiaZH9KmwzEvB9DXz0D+aa6sLpGz4MUGRR01dLKlZICw4XOnRfGwcFvNptJDxipy5g==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=5ymOvmTvCjIy5d7nKTYWHEAEeHpSUjjhMIDYfyBbbHI=;
b=nBZBhCkB3UjwVj4zJ32/Xgwu4lPiWbBTjcDH3Aa1sEQEkGONANiVLVC0DqvhPdf8WVlj7z380cWLEfimddZ9bYDc0p/YZA5+EkGhXLfUO2LS+jTWfWpQkbERoNUYEkpZ/f5b1f1THEEl4XcFZJsbtBuIa2dhA8dAYofm9sDop/z/c/lukv4+qDS9BciQyoEskCkM1cMZ6Kibs1qhQYZGQa724Rs4h5rYRdOQ/DeeSF/L7FpHWSJXq53uCDt1WvVguGUnoN8sSMs64/OOvA3fekPo+hSnczrJ4hoBQ6+0o3fi0SyYriXEGENU5i0zuU0PmOOLmfLwKOrmDrnCSyc9aQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is
165.204.84.17) smtp.rcpttodomain=8bytes.org smtp.mailfrom=amd.com; dmarc=pass
(p=quarantine sp=quarantine pct=100) action=none header.from=amd.com;
dkim=none (message not signed); arc=none (0)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=5ymOvmTvCjIy5d7nKTYWHEAEeHpSUjjhMIDYfyBbbHI=;
b=W0u2/1P0tKlVREoku0inKm9twZ+W8G3dctUqDccMu8MvKjApkJQYEZ16qNKPzNhm202L+giZ9Uv0khX6IOXZDrmDHdNkn9jW4tV9x3Opln6RmUDZo7VDbr8Dw4vsKk2PBibfJmvJDCbCF/fzP80x+alkXYbNPLGI7cmd2AnT1Vw=
Received: from SJ0PR13CA0146.namprd13.prod.outlook.com (2603:10b6:a03:2c6::31)
by DS4PR12MB9636.namprd12.prod.outlook.com (2603:10b6:8:27f::13) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.33; Wed, 4 Jun
2025 16:38:19 +0000
Received: from CO1PEPF000075EE.namprd03.prod.outlook.com
(2603:10b6:a03:2c6:cafe::44) by SJ0PR13CA0146.outlook.office365.com
(2603:10b6:a03:2c6::31) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8769.16 via Frontend Transport; Wed,
4 Jun 2025 16:38:19 +0000
X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17)
smtp.mailfrom=amd.com; dkim=none (message not signed)
header.d=none;dmarc=pass action=none header.from=amd.com;
Received-SPF: Pass (protection.outlook.com: domain of amd.com designates
165.204.84.17 as permitted sender) receiver=protection.outlook.com;
client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C
Received: from SATLEXMB04.amd.com (165.204.84.17) by
CO1PEPF000075EE.mail.protection.outlook.com (10.167.249.37) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
15.20.8792.29 via Frontend Transport; Wed, 4 Jun 2025 16:38:19 +0000
Received: from BLRDHSRIVAS.amd.com (10.180.168.240) by SATLEXMB04.amd.com
(10.181.40.145) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 4 Jun
2025 11:38:15 -0500
From: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@xxxxxxx>
To: <joro@xxxxxxxxxx>, <suravee.suthikulpanit@xxxxxxx>, <will@xxxxxxxxxx>,
<robin.murphy@xxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>,
<iommu@xxxxxxxxxxxxxxx>, <Vasant.Hegde@xxxxxxx>,
<dheerajkumar.srivastava@xxxxxxx>
Subject: [PATCH v6 4/8] iommu/amd: Add debugfs support to dump IOMMU command buffer
Date: Wed, 4 Jun 2025 22:06:43 +0530
Message-ID: <20250604163647.1439-5-dheerajkumar.srivastava@xxxxxxx>
X-Mailer: git-send-email 2.25.1
In-Reply-To: <20250604163647.1439-1-dheerajkumar.srivastava@xxxxxxx>
References: <20250604163647.1439-1-dheerajkumar.srivastava@xxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain
X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com
(10.181.40.145)
X-EOPAttributedMessage: 0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: CO1PEPF000075EE:EE_|DS4PR12MB9636:EE_
X-MS-Office365-Filtering-Correlation-Id: a1a618fd-8a66-4189-a162-08dda3863689
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam:
BCL:0;ARA:13230040|376014|1800799024|36860700013|82310400026;
X-Microsoft-Antispam-Message-Info:
=?us-ascii?Q?LQjugXzF17Sb0OQPMwSx2JKd3BVfduySxo3uphCm8YJGOWZ5XJRSyStToK2X?=
=?us-ascii?Q?JvrqOAZvfAXFkxueXxRMLvlD7oB3PSjw8Te6TYjzbuIf/Us5bulWB/yYUkWL?=
=?us-ascii?Q?QEV/OYYMgvHfXbZzxfybm+kjt9I1FXlFxHpC/9FIAGd3rym+ASmIqHag7EyE?=
=?us-ascii?Q?Sb/CrFyveSnAWdC7E3srld04xARgwg/LqnWvueoJN9H33M4/P6fAmh8roQQK?=
=?us-ascii?Q?2mUXkRpUQvJHiYJg6VaM3LD4VYprozAFlSLb+XpDRo1gTwcZaiFJPAaP8Siy?=
=?us-ascii?Q?3gyE7HssL+EbFGzAkkQglqBcgAX+sS0klk2In6hO54t7gccCAa5szOaouGHg?=
=?us-ascii?Q?hr9l5AiA642HGpQGqoY2mUhGbzmCsJjtgdCwaaiIfdomdxxX+GV/bFc5zbrg?=
=?us-ascii?Q?nIV/w4LzKPVTcJTSlNrWk5c29aezSokZkG9GLqnC9lSqhQhqI4Qcjwy+bKpv?=
=?us-ascii?Q?MFeMFXInUN++yyhU5kE+GDdIRJxd6KMSYR1o9Mv+ilImAVPz+0dYptzEhlWY?=
=?us-ascii?Q?Cm4pwHZBI4uBuP7TGUDHjp6zCgmpgpV6qq++IXgdLKJ4hgC+q3B1j5TgyU8o?=
=?us-ascii?Q?HUYMVnZXhr6Zy20AJ/i5JcW3oRyoI6gDxcS8+INbPvIzy5raW+jNvX61cYi9?=
=?us-ascii?Q?iW/+nDC4duE+QTVWYLItSeNliH4k9jlXaTNClrHtpVu4ebcqaRJ8gjrbdFqJ?=
=?us-ascii?Q?BQtpfv+7YDXJuSyw1mK1lxP22kpPR/3NmtYyjwlRY2/ywu/E3koWj/fU2Fwm?=
=?us-ascii?Q?zb1csOWiQ3UKd95rMvXwAQMtNRu5uOpgA0iXD1GNxd0UK3CnxaYphPE5zsmQ?=
=?us-ascii?Q?znA4DHnAUwYmPnUVvO/dd3XN8J/Ppzn8ls5hmJ8H6YxqF7IRQnrsUyNy69kj?=
=?us-ascii?Q?gDhMnecCeS/Ols6/ThMR34NMvWqjB0auQwTG/oSQm41Fmmk6Sia8AaJejy0i?=
=?us-ascii?Q?fxMXxXq36NDnWjzozPEnYBx2IANtUf5I7nnJGWmwYqnm5AiL2nmrjbE9dZf5?=
=?us-ascii?Q?3w5fJPL447kVARM6Xn/Hq0OBk9FQvg0hOvjIQwK4pt2npDsjUNSl6poE99gA?=
=?us-ascii?Q?LW5Y5FYiTUT/8kuDYu6uSVFyP5AdHe5mVpucMcWomfjNTT91qEQ0xUuAYDk0?=
=?us-ascii?Q?XXpqlrzpgW1YEAvH2OqjI154uNfewk0bBnPxSlIGrmB8G/nRtNYZqrmMHY7c?=
=?us-ascii?Q?n8oXOP4QoViTV0aD3qff/9z5Tghvy19rj3j8PznZ3LRL+E3Z+Z9y2j1BrknW?=
=?us-ascii?Q?Wf8wxir9//4DhujhrEtqpV9P2hK7tG2goXJXsLGUAxhMcoEkCUA3XsAAEVof?=
=?us-ascii?Q?/ItISKNfNW6frFbD6cCC5AFhHiS+IvOQHd3+LcyyZUCV+TbpmKVpjiuHH1SF?=
=?us-ascii?Q?d1X7uZzdEP1XnlVxzAZbrvcb6qlaE0VTQxv10vrF+ld2+QD8GxFDsXGp/D20?=
=?us-ascii?Q?dG0HRPBrBSSure/IUsqOYzvkGZGEy7qb+iST13H03I5QuZU/BhPmnIIn8+DZ?=
=?us-ascii?Q?T1UzZCByqc0W4nMLvPaiMO/iOUCqRcd9T+5j?=
X-Forefront-Antispam-Report:
CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(376014)(1800799024)(36860700013)(82310400026);DIR:OUT;SFP:1101;
X-OriginatorOrg: amd.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 16:38:19.0944
(UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: a1a618fd-8a66-4189-a162-08dda3863689
X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com]
X-MS-Exchange-CrossTenant-AuthSource:
CO1PEPF000075EE.namprd03.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS4PR12MB9636
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
IOMMU driver sends command to IOMMU hardware via command buffer. In cases
where IOMMU hardware fails to process commands in command buffer, dumping
it is a valuable input to debug the issue.
IOMMU hardware processes command buffer entry at offset equals to the head
pointer. Dumping just the entry at the head pointer may not always be
useful. The current head may not be pointing to the entry of the command
buffer which is causing the issue. IOMMU Hardware may have processed the
entry and updated the head pointer. So dumping the entire command buffer
gives a broad understanding of what hardware was/is doing. The command
buffer dump will have all entries from start to end of the command buffer.
Along with that, it will have a head and tail command buffer pointer
register dump to facilitate where the IOMMU driver and hardware are in
the command buffer for injecting and processing the entries respectively.
Command buffer is a per IOMMU data structure. So dumping on per IOMMU
basis.
eg.
-> To get command buffer dump for iommu<x> (say, iommu00)
#cat /sys/kernel/debug/iommu/amd/iommu00/cmdbuf
Signed-off-by: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@xxxxxxx>
---
drivers/iommu/amd/amd_iommu_types.h | 7 +++++++
drivers/iommu/amd/debugfs.c | 26 ++++++++++++++++++++++++++
drivers/iommu/amd/iommu.c | 7 -------
3 files changed, 33 insertions(+), 7 deletions(-)
diff --git a/drivers/iommu/amd/amd_iommu_types.h b/drivers/iommu/amd/amd_iommu_types.h
index 22679ca0bc26..2cf6fd676979 100644
--- a/drivers/iommu/amd/amd_iommu_types.h
+++ b/drivers/iommu/amd/amd_iommu_types.h
@@ -898,6 +898,13 @@ struct dev_table_entry {
};
};
+/*
+ * Structure defining one entry in the command buffer
+ */
+struct iommu_cmd {
+ u32 data[4];
+};
+
/*
* Structure to sture persistent DTE flags from IVHD
*/
diff --git a/drivers/iommu/amd/debugfs.c b/drivers/iommu/amd/debugfs.c
index 5ac12c3fe069..61fde9ebfcfa 100644
--- a/drivers/iommu/amd/debugfs.c
+++ b/drivers/iommu/amd/debugfs.c
@@ -106,6 +106,30 @@ static int iommu_capability_show(struct seq_file *m, void *unused)
}
DEFINE_SHOW_STORE_ATTRIBUTE(iommu_capability);
+static int iommu_cmdbuf_show(struct seq_file *m, void *unused)
+{
+ struct amd_iommu *iommu = m->private;
+ struct iommu_cmd *cmd;
+ unsigned long flag;
+ u32 head, tail;
+ int i;
+
+ raw_spin_lock_irqsave(&iommu->lock, flag);
+ head = readl(iommu->mmio_base + MMIO_CMD_HEAD_OFFSET);
+ tail = readl(iommu->mmio_base + MMIO_CMD_TAIL_OFFSET);
+ seq_printf(m, "CMD Buffer Head Offset:%d Tail Offset:%d\n",
+ (head >> 4) & 0x7fff, (tail >> 4) & 0x7fff);
+ for (i = 0; i < CMD_BUFFER_ENTRIES; i++) {
+ cmd = (struct iommu_cmd *)(iommu->cmd_buf + i * sizeof(*cmd));
+ seq_printf(m, "%3d: %08x %08x %08x %08x\n", i, cmd->data[0],
+ cmd->data[1], cmd->data[2], cmd->data[3]);
+ }
+ raw_spin_unlock_irqrestore(&iommu->lock, flag);
+
+ return 0;
+}
+DEFINE_SHOW_ATTRIBUTE(iommu_cmdbuf);
+
void amd_iommu_debugfs_setup(void)
{
struct amd_iommu *iommu;
@@ -124,5 +148,7 @@ void amd_iommu_debugfs_setup(void)
&iommu_mmio_fops);
debugfs_create_file("capability", 0644, iommu->debugfs, iommu,
&iommu_capability_fops);
+ debugfs_create_file("cmdbuf", 0444, iommu->debugfs, iommu,
+ &iommu_cmdbuf_fops);
}
}
diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c
index f34209b08b4c..522251f60e8e 100644
--- a/drivers/iommu/amd/iommu.c
+++ b/drivers/iommu/amd/iommu.c
@@ -62,13 +62,6 @@ static const struct iommu_dirty_ops amd_dirty_ops;
int amd_iommu_max_glx_val = -1;
-/*
- * general struct to manage commands send to an IOMMU
- */
-struct iommu_cmd {
- u32 data[4];
-};
-
/*
* AMD IOMMU allows up to 2^16 different protection domains. This is a bitmap
* to know which ones are already in use.
--
2.25.1
Return-Path: <linux-kernel+bounces-673533-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id C4F9041E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:38:52 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 50D68179F88
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:38:21 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id BB51270814;
Wed, 4 Jun 2025 16:38:08 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="Qff5nev/"
Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2055.outbound.protection.outlook.com [40.107.244.55])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D5E21E4928
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:38:04 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.244.55
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749055087; cv=fail; b=TyHIs/iswYYbzeEo5P3yCMq8PI+dJtRA7bIXgX8hWgDXbr8fkx0yxG9JbeyANjUH2+7mtB9o4TTS6zsLz0aEMfqQCPoqgXflYhaB/o8WVKxYuVd6+Sn8unaDHbxGgyFtBfyUCx9Qt9HcLqmUA2kfA20m1mEE3eMJtM4IzfYluJ0=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749055087; c=relaxed/simple;
bh=VmpqOBYvfyyu8PG+/jbvj0tq3TkSFEqPkU4KxvHoWpA=;
h=From:To:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version:Content-Type; b=RhKaz6cpVCSvO4TTpdLGe+Gx4CoPl6hSfPoAOceXQRgumbmKpd/Od2hCEegWqVocrD++rkIx8RE8tEqn20wlqn3lTlxEb6KqyuPbqpwnKwfb59XRbtw4QsmAL7wM7B17c+6vt/nKrQe8ZTV+/nfb7NV9y1QNcPyVfzFG7B9SkpY=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=Qff5nev/; arc=fail smtp.client-ip=40.107.244.55
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com
Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=oGYWQNdpRQU06HOk8P9IADn7+Wd1qaDjyrzKTKUhZCDaV762DwD4NkLeVmR6CX9pfiIvZzdm3vNzFuVxay9SjAUn+f57XYlK1J+W6qVTU0fNVFvmK67CaC3+mSQgTjC+Uklce/BVNOTVEodEazvKcl7++zdTpg6MJ1IqFmB2W4KAgjyOTxJo4yU/Ef0vhWzVDVvobNonroKULoWWHK1ztQvYvrrQLycStHVOncWuPkGgmuW2dOeR8X+tZIMi1IRk1wppjeyGHlHl344VnuOFmTkyMRY7ZAPdqxKpIztJ2Tl/gNjTeVdXIFxE+keDJVfkl8SMGN3/uUprrHgQzGjVQw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=u/Xn1LSFfluE4CEwT5l5JsDcdxU1GNKDIqy2Eapn8Zg=;
b=vMxJWBaOLK9YBycY5LSXng0q9roGIiHmWX/CpzvfT+WLPdQjt3OnYxwHHn/1tjtUiL8otBFbDXS6T/e+EHaB+SkLOyqSVAhQYyCCfMLfUHueFAstQBMmrz/PjTXm/+rMyKNhs92iaj7FwCLGt3JvPGacxyni3fp6HhMRHw5LF54yYfEo8E5BovjpXVROjYQOcjVF+WbB6XccSxCYDMzXPgVinFj4itjORgzguFQkDcnJa3TBe+nAJAToRNtg0d2rc3qdg/oEBMaRV0ILruXetL45b1FmA3TRNNW5FwHIWlRc+TNpxhS9kLYe5X+O6tDI8PjK/6eVra7tzMdtd88nLA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is
165.204.84.17) smtp.rcpttodomain=8bytes.org smtp.mailfrom=amd.com; dmarc=pass
(p=quarantine sp=quarantine pct=100) action=none header.from=amd.com;
dkim=none (message not signed); arc=none (0)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=u/Xn1LSFfluE4CEwT5l5JsDcdxU1GNKDIqy2Eapn8Zg=;
b=Qff5nev/4cP1+4UzMXBLkDq8466DIMwmY3Iv8V/ppQpuW91+shOqUpioMXK2lORM6GiFzl1qMhdueut1tI6AhuDw6KoET8tZcxPxBFFYLmyEr1LVmyEvnfNCOgJmSJgHaDOKo2DXVCYBxkhKfc7QkO54XdMVFZElknTPj4SsfXE=
Received: from BY5PR13CA0003.namprd13.prod.outlook.com (2603:10b6:a03:180::16)
by DM4PR12MB6470.namprd12.prod.outlook.com (2603:10b6:8:b8::12) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.34; Wed, 4 Jun
2025 16:38:01 +0000
Received: from CO1PEPF000075F2.namprd03.prod.outlook.com
(2603:10b6:a03:180:cafe::6f) by BY5PR13CA0003.outlook.office365.com
(2603:10b6:a03:180::16) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8769.18 via Frontend Transport; Wed,
4 Jun 2025 16:38:01 +0000
X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17)
smtp.mailfrom=amd.com; dkim=none (message not signed)
header.d=none;dmarc=pass action=none header.from=amd.com;
Received-SPF: Pass (protection.outlook.com: domain of amd.com designates
165.204.84.17 as permitted sender) receiver=protection.outlook.com;
client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C
Received: from SATLEXMB04.amd.com (165.204.84.17) by
CO1PEPF000075F2.mail.protection.outlook.com (10.167.249.41) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
15.20.8792.29 via Frontend Transport; Wed, 4 Jun 2025 16:38:01 +0000
Received: from BLRDHSRIVAS.amd.com (10.180.168.240) by SATLEXMB04.amd.com
(10.181.40.145) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 4 Jun
2025 11:37:57 -0500
From: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@xxxxxxx>
To: <joro@xxxxxxxxxx>, <suravee.suthikulpanit@xxxxxxx>, <will@xxxxxxxxxx>,
<robin.murphy@xxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>,
<iommu@xxxxxxxxxxxxxxx>, <Vasant.Hegde@xxxxxxx>,
<dheerajkumar.srivastava@xxxxxxx>
Subject: [PATCH v6 3/8] iommu/amd: Add debugfs support to dump IOMMU Capability registers
Date: Wed, 4 Jun 2025 22:06:42 +0530
Message-ID: <20250604163647.1439-4-dheerajkumar.srivastava@xxxxxxx>
X-Mailer: git-send-email 2.25.1
In-Reply-To: <20250604163647.1439-1-dheerajkumar.srivastava@xxxxxxx>
References: <20250604163647.1439-1-dheerajkumar.srivastava@xxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain
X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com
(10.181.40.145)
X-EOPAttributedMessage: 0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: CO1PEPF000075F2:EE_|DM4PR12MB6470:EE_
X-MS-Office365-Filtering-Correlation-Id: b9234d04-6a51-4a7f-0f7d-08dda3862be1
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam:
BCL:0;ARA:13230040|82310400026|1800799024|36860700013|376014;
X-Microsoft-Antispam-Message-Info:
=?us-ascii?Q?r/3WFWKr8JyX03uViQhw9F38oNwfFUg1xm6g2n9fSQIZt8gQZxqIk98rUgur?=
=?us-ascii?Q?a3pnH3vEmF0C3AE7Ut5/MqdShDhXx/Gwmc2RvKkattAkvLC9QbWa5JQmjrVJ?=
=?us-ascii?Q?yHqH72GW6e3igiZxHVXk6SX2bqGiXSwOHFEWxsl+JIVRUMN3tLm/cU5LIOAd?=
=?us-ascii?Q?UNFmH4Jyqzo1tymsx1XZekSeGjisJo0gn4reYBynRQCiq5blEriflh6nGsEl?=
=?us-ascii?Q?ZCyG7Sd6TJdSpYtC5qOj1NbZA4ME5/NP51KGykAnu4EK/43TDEVfdQBMZw4Y?=
=?us-ascii?Q?FQuW1vIBVQab4v0HWleLspL3kJUxtzYoL6n+hL7JAvO7Fj6myr8lwYZRZl4U?=
=?us-ascii?Q?P3HAc+Z1OP6+Lo5cdQDwbto7rZr30CVadgJsUFssC6ajqUrmhAsI/gJYFx+3?=
=?us-ascii?Q?8bXp7iRSQHbmXrVuhubkkTHsiPx/1+T1mA5tzg/3PxEMK51NycU58DFPIU5a?=
=?us-ascii?Q?wMM1+/Ebc/x6/WNgGOOWPYSDiK0HoizgXmqHwGNh8sP/Gm9V8uW0ztii4Kmk?=
=?us-ascii?Q?2aGBQERMdGQJHFLmclst+cpLQ4ck9fP4Wf8ly6CdwL4gttJkYjlZz4aLyn9h?=
=?us-ascii?Q?wRS3g8UUHhynRa3YY6o0XfVzW+6FMt4IfPe3+qXHfaYaAil1+nEPkEkGWYqh?=
=?us-ascii?Q?RIT/PzYSFHjrF7b5iBcY97NYkxXUxO4BZhmMHRTAsxZS7EDIT4LBFR42Brvk?=
=?us-ascii?Q?DXnII0pyeTnOIRoMZ+6W5VU9iybSMLNNkLfacsft7tQ4axdLcFZSgwFzPc8W?=
=?us-ascii?Q?ycBB1pbInbRxa4BQrxsUQvPE/fkaQZhMKcFPIUxU/jdqGR2VzJfqiAb0VRtv?=
=?us-ascii?Q?C9fQ3QqJSfVzwlSgxFPkUbkajiTAP4Ez23Ji3C82OgZmyW7Oq5HQH+OZd6/K?=
=?us-ascii?Q?FkYNsQAjlRZnQozxcidcnQ7/793LNUS7XApDOK4OOSSYsXqLNAD6C/wu9xYp?=
=?us-ascii?Q?XGyseCnDZKvYOQ37lvtBqpTkoGRKMsWVnedyPzDXQGddAqJsRbzjnIl/eF7H?=
=?us-ascii?Q?f9uG5NFscpcKyvlfBOOImGX1DHIqZH6Sd7SST0BXv5713RbcbGybxMEOk+fm?=
=?us-ascii?Q?30vethWIyJ5Uz7C6ICA9Uvww6o8xkLokYUnAnlWqA0maGbfPR1vqG+DR44hk?=
=?us-ascii?Q?YGVPMbAPqEyzPCOP0vmAU3McO9CTxd0xOF68rzfINnH1e6INk7wxQs/wOwx6?=
=?us-ascii?Q?s9E/f42RSF50MGxDnPLCTpkGK9bntdpNjXS2F0sgLzVCW4Qxeq1koHCkqntE?=
=?us-ascii?Q?uUqG2b/wuXc/crGTVyYrgmWgkirSLIhXH7Oar9NjJZL/cWZ0QtK26syQP9p1?=
=?us-ascii?Q?GmU+s88kkf1y6CXt/mQpMCyJwIggDploZ2D8rGB8Kv4LaQ2O5+tSPqk9NPkS?=
=?us-ascii?Q?EcSpBl17W9h9W9oCAI/7oF7rYUxzBU00EJj0VZJZQMpntl/5VKQO1Y+ny89C?=
=?us-ascii?Q?G8/TflAqpc7LJEPcI3o68SEOvDmxIT+cO5o5gUurZvnMU9cBih+YoBBDiU0w?=
=?us-ascii?Q?ZTAqnuhSW/u+RntSUS0WGP5c3almouHJMdEy?=
X-Forefront-Antispam-Report:
CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(82310400026)(1800799024)(36860700013)(376014);DIR:OUT;SFP:1101;
X-OriginatorOrg: amd.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 16:38:01.2123
(UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: b9234d04-6a51-4a7f-0f7d-08dda3862be1
X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com]
X-MS-Exchange-CrossTenant-AuthSource:
CO1PEPF000075F2.namprd03.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6470
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
IOMMU Capability registers defines capabilities of IOMMU and information
needed for initialising MMIO registers and device table. This is useful
to dump these registers for debugging IOMMU related issues.
e.g.
-> To get capability registers value at offset 0x10 for iommu<x> (say,
iommu00)
# echo "0x10" > /sys/kernel/debug/iommu/amd/iommu00/capability
# cat /sys/kernel/debug/iommu/amd/iommu00/capability
Signed-off-by: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@xxxxxxx>
---
drivers/iommu/amd/amd_iommu_types.h | 1 +
drivers/iommu/amd/debugfs.c | 51 +++++++++++++++++++++++++++++
2 files changed, 52 insertions(+)
diff --git a/drivers/iommu/amd/amd_iommu_types.h b/drivers/iommu/amd/amd_iommu_types.h
index 38eca75f6ef1..22679ca0bc26 100644
--- a/drivers/iommu/amd/amd_iommu_types.h
+++ b/drivers/iommu/amd/amd_iommu_types.h
@@ -797,6 +797,7 @@ struct amd_iommu {
/* DebugFS Info */
struct dentry *debugfs;
int mmio_offset;
+ int cap_offset;
#endif
/* IOPF support */
diff --git a/drivers/iommu/amd/debugfs.c b/drivers/iommu/amd/debugfs.c
index 520377ab6731..5ac12c3fe069 100644
--- a/drivers/iommu/amd/debugfs.c
+++ b/drivers/iommu/amd/debugfs.c
@@ -58,6 +58,54 @@ static int iommu_mmio_show(struct seq_file *m, void *unused)
}
DEFINE_SHOW_STORE_ATTRIBUTE(iommu_mmio);
+static ssize_t iommu_capability_write(struct file *filp, const char __user *ubuf,
+ size_t cnt, loff_t *ppos)
+{
+ struct seq_file *m = filp->private_data;
+ struct amd_iommu *iommu = m->private;
+ int ret;
+
+ iommu->cap_offset = -1;
+
+ if (cnt > OFS_IN_SZ)
+ return -EINVAL;
+
+ ret = kstrtou32_from_user(ubuf, cnt, 0, &iommu->cap_offset);
+ if (ret)
+ return ret;
+
+ /* Capability register at offset 0x14 is the last IOMMU capability register. */
+ if (iommu->cap_offset > 0x14) {
+ iommu->cap_offset = -1;
+ return -EINVAL;
+ }
+
+ return cnt;
+}
+
+static int iommu_capability_show(struct seq_file *m, void *unused)
+{
+ struct amd_iommu *iommu = m->private;
+ u32 value;
+ int err;
+
+ if (iommu->cap_offset < 0) {
+ seq_puts(m, "Please provide capability register's offset in the range [0x00 - 0x14]\n");
+ return 0;
+ }
+
+ err = pci_read_config_dword(iommu->dev, iommu->cap_ptr + iommu->cap_offset, &value);
+ if (err) {
+ seq_printf(m, "Not able to read capability register at 0x%x\n", iommu->cap_offset);
+ return 0;
+ }
+
+ seq_printf(m, "Offset:0x%x Value:0x%08x\n", iommu->cap_offset, value);
+
+ return 0;
+}
+DEFINE_SHOW_STORE_ATTRIBUTE(iommu_capability);
+
void amd_iommu_debugfs_setup(void)
{
struct amd_iommu *iommu;
@@ -67,11 +115,14 @@ void amd_iommu_debugfs_setup(void)
for_each_iommu(iommu) {
iommu->mmio_offset = -1;
+ iommu->cap_offset = -1;
snprintf(name, MAX_NAME_LEN, "iommu%02d", iommu->index);
iommu->debugfs = debugfs_create_dir(name, amd_iommu_debugfs);
debugfs_create_file("mmio", 0644, iommu->debugfs, iommu,
&iommu_mmio_fops);
+ debugfs_create_file("capability", 0644, iommu->debugfs, iommu,
+ &iommu_capability_fops);
}
}
--
2.25.1
Return-Path: <linux-kernel+bounces-673535-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 4200441E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:39:02 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 1869F3A44D8
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:38:25 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 3F62B1E3775;
Wed, 4 Jun 2025 16:38:42 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="gO8Dc16j"
Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2056.outbound.protection.outlook.com [40.107.220.56])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 860B51DDA0C
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:38:39 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.56
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749055121; cv=fail; b=lUVRGIv+60JQBUrgo1ALN8d6HCmaQd/mytox/oWwlk2uyoTI9Fqh/E1JaJK5Hjb1EV0iP9zuEfLJYo5VmDjun6qACnDhOoC87ISLbpZ3R4mTApFrVA0JMvDrTaesFYjlqpI7YkMMx8+YgbkdQ2ojvLOiNtf3P89YVLdzWGf15jc=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749055121; c=relaxed/simple;
bh=QBWQMCp1ot/oUC+9LlM3uip373Cfb/f4BsQV3mezTH0=;
h=From:To:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version:Content-Type; b=HorLHaORScunL1fzfuceTVi/IuiCxhWkhLeUH7dG0vQBQAD+jPFMS21DqOQHcX8ht2ZSdJJCBBeOdn2Y+6KMlRvLWaeo8L1BZ0x0YQnsRClVo+dT5qa5VO15gAnDeT4+Qi+p2nlPWpvyoTTBzNbjDpEikwhxUS6VewsFHsqmqVQ=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=gO8Dc16j; arc=fail smtp.client-ip=40.107.220.56
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com
Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=VnsbKckVVwpFVBQDPFMnkFGUA9/rGVxsvHRcdylF5R/xJTHeln/BKPDmIld//YEe3MtUrEX4A0uoNFufmK5ZmrDqCbhSL5pBY6OeqgkbH6xy1z9xcfot4VJOU8F+A3NM0/hgQBsaLKWOIt2IEHZI/mYY4WQjmZXZOozgK/C3hGn7JA6FjoxDb+BFRdNoXW7k21hIjxHmGkFwXf9xK28wU6EfEl3bQs6roPdoTJLmbou6JPoXFdRKu2Nr7YW6TqA4vAVwcRInvYKSwfiJ/YX7koAvSg+zuQE3b5l2dWf+jdL+t1DI/jXsbEFxOuFeobqAfd6zxK+2vpwZK8cGqE4P7w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=Hcv8uK3Ii7YTtqii8MIgRit6IlZvaw4k09ONJ0OtYcc=;
b=vqb0wQM6Q85gLIvu7Ziifior1z949yliqLQ6q1LzOqyYHOcac7h3w3EMKnDitna2n8BveGTnAAKGuCeRTMJBhSI86/C94QZZfdXDh5erLXUI55DXRrDUztM+HJ1KSCUYfMOgPuMKhkWu1GFYnIG/9lhyGkiFrZV8RHvnVERHSJC/V+uDxsLAcA3HrJh2uR1n2MMDRKnM5LclU9TgOSqa6GUB74Mz0m4/DSIy5EWkTErIo5bWcapW/kQwC10fXYaZVuVm0o4+a09rkYotdUKToqbaPh6f1GFovURpCYKKeSmPx+xb5x4+cO6zypnHArOYPZVpa3AdoBnxDEJ4BtYaGw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is
165.204.84.17) smtp.rcpttodomain=8bytes.org smtp.mailfrom=amd.com; dmarc=pass
(p=quarantine sp=quarantine pct=100) action=none header.from=amd.com;
dkim=none (message not signed); arc=none (0)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=Hcv8uK3Ii7YTtqii8MIgRit6IlZvaw4k09ONJ0OtYcc=;
b=gO8Dc16jizEgSURW+nJLQqdILbQzuN96YvXPcFB3BWYnA20/1ajvV+7C65yhEN+ShPVAqla+rAIRMgBU0Uv5NPaVLiubjmg5NyT5s9afeiZ7dWszJ0TVBh2ee6oden4R4/aPyTjyf2rRpCVOiQQUYQ0GDA4XgdlVRr1kbgVtWws=
Received: from BY3PR04CA0021.namprd04.prod.outlook.com (2603:10b6:a03:217::26)
by DM6PR12MB4171.namprd12.prod.outlook.com (2603:10b6:5:21f::18) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.36; Wed, 4 Jun
2025 16:38:37 +0000
Received: from CO1PEPF000075F4.namprd03.prod.outlook.com
(2603:10b6:a03:217:cafe::ed) by BY3PR04CA0021.outlook.office365.com
(2603:10b6:a03:217::26) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8746.31 via Frontend Transport; Wed,
4 Jun 2025 16:38:37 +0000
X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17)
smtp.mailfrom=amd.com; dkim=none (message not signed)
header.d=none;dmarc=pass action=none header.from=amd.com;
Received-SPF: Pass (protection.outlook.com: domain of amd.com designates
165.204.84.17 as permitted sender) receiver=protection.outlook.com;
client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C
Received: from SATLEXMB04.amd.com (165.204.84.17) by
CO1PEPF000075F4.mail.protection.outlook.com (10.167.249.43) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
15.20.8792.29 via Frontend Transport; Wed, 4 Jun 2025 16:38:36 +0000
Received: from BLRDHSRIVAS.amd.com (10.180.168.240) by SATLEXMB04.amd.com
(10.181.40.145) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 4 Jun
2025 11:38:33 -0500
From: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@xxxxxxx>
To: <joro@xxxxxxxxxx>, <suravee.suthikulpanit@xxxxxxx>, <will@xxxxxxxxxx>,
<robin.murphy@xxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>,
<iommu@xxxxxxxxxxxxxxx>, <Vasant.Hegde@xxxxxxx>,
<dheerajkumar.srivastava@xxxxxxx>
Subject: [PATCH v6 5/8] iommu/amd: Add support for device id user input
Date: Wed, 4 Jun 2025 22:06:44 +0530
Message-ID: <20250604163647.1439-6-dheerajkumar.srivastava@xxxxxxx>
X-Mailer: git-send-email 2.25.1
In-Reply-To: <20250604163647.1439-1-dheerajkumar.srivastava@xxxxxxx>
References: <20250604163647.1439-1-dheerajkumar.srivastava@xxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain
X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com
(10.181.40.145)
X-EOPAttributedMessage: 0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: CO1PEPF000075F4:EE_|DM6PR12MB4171:EE_
X-MS-Office365-Filtering-Correlation-Id: facfb49c-3c0b-4840-7902-08dda3864135
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam:
BCL:0;ARA:13230040|82310400026|376014|36860700013|1800799024;
X-Microsoft-Antispam-Message-Info:
=?us-ascii?Q?0RqMEbKHaQ4N7lF3dVQLvt51QO28vEvXyGqcO7Rq33CzGVFZIHbX9Xc42S4l?=
=?us-ascii?Q?N5LKRX/9XIkGezphNE/Y3fgmzTzZgV3wf4MUClQhl72ONowWnd5NpkIk3ECu?=
=?us-ascii?Q?QmyhJ1nj1SywxwmgpYTQAIQ6vHRVI9FyPFPNkjUAX0L4JgL1RJ9nvQZOChIw?=
=?us-ascii?Q?L6wX6SIS7a6kkom4rQ0c1i3xLeBZ7nkzNfBdb9owNDImgs2PRizfQ/3a/T6b?=
=?us-ascii?Q?SLjpjpEmOuy8nN1hzOkVyOUEak2g21AUcCKHkGXo4VE8w06I25icAanmNn3V?=
=?us-ascii?Q?HFYMOSdOE81YBn7a03Ib96puWRUQrtsCgHvpLvzNw2dAgGZZ5s4FMvMmeOln?=
=?us-ascii?Q?fCtPChc+vDrLrdmcOT6rY+rrKXnO+CjlyxmfzBfgR7cKiuLe7NkLMbNLrqva?=
=?us-ascii?Q?h10RES7PS5UFQdYrA+emJXgB0VKudImgu9rwi9t7lokEwg39OfL2fc7pEnVJ?=
=?us-ascii?Q?IRXRTUTM1seDRdmpyYhaBHC8W8CyPmG3fX/x3hpRNDDo4gkk/dueQjwILd3N?=
=?us-ascii?Q?kzVVOYzN3i/hLi5AV/vihyPGrY5RydY+o0q1gatkWArFs6FXHxThcYfrogcW?=
=?us-ascii?Q?+TVGrwPz8069oiSxCJ+Gg16V7dQRtISwHNKjXTRfBC22m1enJ5Bq4kRp8aCv?=
=?us-ascii?Q?RSnZYKiel+eoJEi8RZjLJWwuS0FHK1nZAdvj36APD3/w06gEgGjADwsnZWFA?=
=?us-ascii?Q?VQv5oCTEZzBaz9hVf0EjncGkJFAXCpFTNCkW22R6io07PGnGrghTw3MPTQUB?=
=?us-ascii?Q?k3/Uegu4xGMjDE6BLeqBaU/46uYcUsbbjKHYoKzXSUEIm4Elv8azpkcoXHBb?=
=?us-ascii?Q?b2Di5CzqRFjZf+e3o/UXGLEUUiBB3BmKWT2wKvhMyTxc9N9T+fzkLjfOiJVO?=
=?us-ascii?Q?DMJwlMZVJqSKtcNzHHMYJjCMFp0AeTerWoo7O5glqmGXz6vdLCQIRgZO43qC?=
=?us-ascii?Q?Gg1IjQN4PCGNwqSKzbljcYIoQ+77zRmwa1MRch4t1iRouWF9l2G8bWHW0rXD?=
=?us-ascii?Q?xX3Z+9wfkmH00pIs72H5GU8hlTncB7Nn0Pn1azLmD1p1yGH5+wbuirfY1eKs?=
=?us-ascii?Q?f1dleHs4eUSryX3qiwdjBFmCAutTcRzUAZXQ3Vff6ebtUwalkMqZAV2kbwRF?=
=?us-ascii?Q?3spVDyDIQtIH52lQmKAwnljOcKi6kQSGyCRPT8d+dkJC30QZOVeLOuLJ/Tlj?=
=?us-ascii?Q?vvjQHgbD71BrwjXUFX5QtkCEsU6/G/nlTk1qAJHd3zfC3UnX7asmA8QZ3tL2?=
=?us-ascii?Q?3SSqw0TJvq5AfPtoFZBcVyLEG84y3jkDcW33w4bg4ht3kdUZ3/rYjjYYH0x1?=
=?us-ascii?Q?y8WkGhQAlFPsoGQUwMba5pVtQuiBJrKz4/XInfo0HbB1Gkyuwzj8fc5Tuk4r?=
=?us-ascii?Q?c0f9Yey67HS7Q3NBnqobzmcwnr/8VNp6UJL1Ae3oM06EOeyn0JkFTrxNyidE?=
=?us-ascii?Q?V62Tlv59Po8ftJMwAiy8Bk3XJqFshpXmPU0ckP2OeNfDkSgCYNRjis0m1OeT?=
=?us-ascii?Q?+0L2LEUoSatcSsG5ixFrcGELB9VtV+ns1RmT?=
X-Forefront-Antispam-Report:
CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(82310400026)(376014)(36860700013)(1800799024);DIR:OUT;SFP:1101;
X-OriginatorOrg: amd.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 16:38:36.9974
(UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: facfb49c-3c0b-4840-7902-08dda3864135
X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com]
X-MS-Exchange-CrossTenant-AuthSource:
CO1PEPF000075F4.namprd03.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4171
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Dumping IOMMU data structures like device table, IRT, etc., for all devices
on the system will be a lot of data dumped in a file. Also, user may want
to dump and analyze these data structures just for one or few devices. So
dumping IOMMU data structures like device table, IRT etc for all devices
is not a good approach.
Add "device id" user input to be used for dumping IOMMU data structures
like device table, IRT etc in AMD IOMMU debugfs.
eg.
1. # echo 0000:01:00.0 > /sys/kernel/debug/iommu/amd/devid
# cat /sys/kernel/debug/iommu/amd/devid
Output : 0000:01:00.0
2. # echo 01:00.0 > /sys/kernel/debug/iommu/amd/devid
# cat /sys/kernel/debug/iommu/amd/devid
Output : 0000:01:00.0
Signed-off-by: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@xxxxxxx>
---
drivers/iommu/amd/debugfs.c | 80 +++++++++++++++++++++++++++++++++++++
1 file changed, 80 insertions(+)
diff --git a/drivers/iommu/amd/debugfs.c b/drivers/iommu/amd/debugfs.c
index 61fde9ebfcfa..8b57ab4ab809 100644
--- a/drivers/iommu/amd/debugfs.c
+++ b/drivers/iommu/amd/debugfs.c
@@ -16,6 +16,9 @@ static struct dentry *amd_iommu_debugfs;
#define MAX_NAME_LEN 20
#define OFS_IN_SZ 8
+#define DEVID_IN_SZ 16
+
+static int sbdf = -1;
static ssize_t iommu_mmio_write(struct file *filp, const char __user *ubuf,
size_t cnt, loff_t *ppos)
@@ -130,6 +133,80 @@ static int iommu_cmdbuf_show(struct seq_file *m, void *unused)
}
DEFINE_SHOW_ATTRIBUTE(iommu_cmdbuf);
+static ssize_t devid_write(struct file *filp, const char __user *ubuf,
+ size_t cnt, loff_t *ppos)
+{
+ struct amd_iommu_pci_seg *pci_seg;
+ int seg, bus, slot, func;
+ struct amd_iommu *iommu;
+ char *srcid_ptr;
+ u16 devid;
+ int i;
+
+ sbdf = -1;
+
+ if (cnt >= DEVID_IN_SZ)
+ return -EINVAL;
+
+ srcid_ptr = memdup_user_nul(ubuf, cnt);
+ if (IS_ERR(srcid_ptr))
+ return PTR_ERR(srcid_ptr);
+
+ i = sscanf(srcid_ptr, "%x:%x:%x.%x", &seg, &bus, &slot, &func);
+ if (i != 4) {
+ i = sscanf(srcid_ptr, "%x:%x.%x", &bus, &slot, &func);
+ if (i != 3) {
+ kfree(srcid_ptr);
+ return -EINVAL;
+ }
+ seg = 0;
+ }
+
+ devid = PCI_DEVID(bus, PCI_DEVFN(slot, func));
+
+ /* Check if user device id input is a valid input */
+ for_each_pci_segment(pci_seg) {
+ if (pci_seg->id != seg)
+ continue;
+ if (devid > pci_seg->last_bdf) {
+ kfree(srcid_ptr);
+ return -EINVAL;
+ }
+ iommu = pci_seg->rlookup_table[devid];
+ if (!iommu) {
+ kfree(srcid_ptr);
+ return -ENODEV;
+ }
+ break;
+ }
+
+ if (pci_seg->id != seg) {
+ kfree(srcid_ptr);
+ return -EINVAL;
+ }
+
+ sbdf = PCI_SEG_DEVID_TO_SBDF(seg, devid);
+
+ kfree(srcid_ptr);
+
+ return cnt;
+}
+
+static int devid_show(struct seq_file *m, void *unused)
+{
+ u16 devid;
+
+ if (sbdf >= 0) {
+ devid = PCI_SBDF_TO_DEVID(sbdf);
+ seq_printf(m, "%04x:%02x:%02x.%x\n", PCI_SBDF_TO_SEGID(sbdf),
+ PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid));
+ } else
+ seq_puts(m, "No or Invalid input provided\n");
+
+ return 0;
+}
+DEFINE_SHOW_STORE_ATTRIBUTE(devid);
+
void amd_iommu_debugfs_setup(void)
{
struct amd_iommu *iommu;
@@ -151,4 +228,7 @@ void amd_iommu_debugfs_setup(void)
debugfs_create_file("cmdbuf", 0444, iommu->debugfs, iommu,
&iommu_cmdbuf_fops);
}
+
+ debugfs_create_file("devid", 0644, amd_iommu_debugfs, NULL,
+ &devid_fops);
}
--
2.25.1
Return-Path: <linux-kernel+bounces-673536-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id D340941E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:39:07 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 6E5841888301
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:39:21 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 1804B1DFE12;
Wed, 4 Jun 2025 16:39:01 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="qCbb7Tes"
Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2048.outbound.protection.outlook.com [40.107.102.48])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id CE6CC1DE3DB
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:38:58 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.102.48
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749055140; cv=fail; b=glMDGG8YZmAwOvXqFsmCGbw1J+A1WJcqOger0gbxJKNN3PdsWBXUWbH5S1iValQQbCxM6QCn6hRwFYntxFSnrEPMlAO6AudAZxBj+lO8SN1Rrkj9sQmvFeYc/gZ0HqaOjkoJRJqzoxuvpODUcxQSzOqwPFOq3QlsATwWTAWknS8=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749055140; c=relaxed/simple;
bh=pdxaG6WNxVTSVRGxvLjrkoeOLxNURNPsBx7Gy8QmDQM=;
h=From:To:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version:Content-Type; b=GSZ1zOq5gF8Lc8UmFbkczHDVzoeh/oRLZHfdeKxHNE41oLkOCVKOEkb7yl9vb/8sfCcizK2w2vQoYIhPxCcQdRj0kjyPIo62/VEP+NCsLUacHJKDLNGGfxIOrpjc2FNTgLmKaaqZsHTxbC7zUFgYQv13oeTTjK6gquvLpMlu34g=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=qCbb7Tes; arc=fail smtp.client-ip=40.107.102.48
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com
Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=QBmZm6ye6Gl+911aGJC8oVZuJGLRaZXDmRQuK/d3lJRYaYvNGtyGAETTBG53fqVeTqmrArLsf1j1SX+J19PisGGZOW15S7oiPzkNQlSJ4Fe5Y/nO1PpL2CalH1sWvQDqVOua+3ytJQmTZOVIJPMbbYiaTchFxqkFzGBwD/jIVdrQQCHipX7zmMnwjQPohOlatPCAWBbFHCwOOjuy1axcXjC+7LDsN2G56bzLX7yG5wdVLdi3PaUKN3CI6a94pZXukEEr++mH5AgRtW40dhQMLdWcdsiTQnq+Duh024wZCFxibt62R2s6Ml1xB/+vmGGrKuc17sukZ/5Jau0/juizgg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=Aft8R2XJZrN/Vig+tFYoNFWGv3qJYhRLGJFn3V62ZdI=;
b=ScoruPvNrwExJpa2LaEQYPEeYR2WxYXqqFDUArUHxo59yArEMXB8L/b73LQBL12Kab5CeJZR/A0pzxlNxh9/IKls1byM5yMWDFLFx3FwPTa1P/3X/YBNv8PBKPgcq8mzCDiKmMWvL3isGiVSpXbBi7Wj7O5d+SSeGXnLEc/iFQdhkBt/wkSOMCKLXKwZbF10ESYba3y3x9ecwgXS3m5jhcOXALenlte2asMvrpDREgWOSUIF4vOSyeSKbkfLtsPSh6lGwtM+3M50bgxGzMJD4/3/hj4s6OteDIaLn3CxcWAziOQWEulhLEnmQtaUQ2UK47yiH23gmpcG0iGU2JUZpA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is
165.204.84.17) smtp.rcpttodomain=8bytes.org smtp.mailfrom=amd.com; dmarc=pass
(p=quarantine sp=quarantine pct=100) action=none header.from=amd.com;
dkim=none (message not signed); arc=none (0)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=Aft8R2XJZrN/Vig+tFYoNFWGv3qJYhRLGJFn3V62ZdI=;
b=qCbb7Tesm7v1PLZwQphOIGPs/UST0JoWPTLika5VXMvD6m9pvkt3htDLdmrvvKfU+RqVGwQYsVkOKnPP1Dx7/IgkjEHtNeEk555fRKDDtU6BkLGMeN8yUuHBHDqENnRNForZV0w+1Rhe7Jjhcbz+sj4oDTUibOkp1Eee4cMjR0g=
Received: from BY3PR10CA0028.namprd10.prod.outlook.com (2603:10b6:a03:255::33)
by DS7PR12MB5910.namprd12.prod.outlook.com (2603:10b6:8:7b::7) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.8792.33; Wed, 4 Jun 2025 16:38:56 +0000
Received: from CO1PEPF000075F3.namprd03.prod.outlook.com
(2603:10b6:a03:255:cafe::2f) by BY3PR10CA0028.outlook.office365.com
(2603:10b6:a03:255::33) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8746.31 via Frontend Transport; Wed,
4 Jun 2025 16:38:56 +0000
X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17)
smtp.mailfrom=amd.com; dkim=none (message not signed)
header.d=none;dmarc=pass action=none header.from=amd.com;
Received-SPF: Pass (protection.outlook.com: domain of amd.com designates
165.204.84.17 as permitted sender) receiver=protection.outlook.com;
client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C
Received: from SATLEXMB04.amd.com (165.204.84.17) by
CO1PEPF000075F3.mail.protection.outlook.com (10.167.249.42) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
15.20.8792.29 via Frontend Transport; Wed, 4 Jun 2025 16:38:56 +0000
Received: from BLRDHSRIVAS.amd.com (10.180.168.240) by SATLEXMB04.amd.com
(10.181.40.145) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 4 Jun
2025 11:38:52 -0500
From: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@xxxxxxx>
To: <joro@xxxxxxxxxx>, <suravee.suthikulpanit@xxxxxxx>, <will@xxxxxxxxxx>,
<robin.murphy@xxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>,
<iommu@xxxxxxxxxxxxxxx>, <Vasant.Hegde@xxxxxxx>,
<dheerajkumar.srivastava@xxxxxxx>
Subject: [PATCH v6 6/8] iommu/amd: Add debugfs support to dump device table
Date: Wed, 4 Jun 2025 22:06:45 +0530
Message-ID: <20250604163647.1439-7-dheerajkumar.srivastava@xxxxxxx>
X-Mailer: git-send-email 2.25.1
In-Reply-To: <20250604163647.1439-1-dheerajkumar.srivastava@xxxxxxx>
References: <20250604163647.1439-1-dheerajkumar.srivastava@xxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain
X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com
(10.181.40.145)
X-EOPAttributedMessage: 0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: CO1PEPF000075F3:EE_|DS7PR12MB5910:EE_
X-MS-Office365-Filtering-Correlation-Id: a1f0f5e6-6036-4275-5610-08dda3864ca7
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam:
BCL:0;ARA:13230040|1800799024|376014|36860700013|82310400026;
X-Microsoft-Antispam-Message-Info:
=?us-ascii?Q?ik9xrM0j5tV5R4gf16Gn95Rld7Hgcxyox2YLH2FlfeCSs5ymlJ4RojhNe7Ke?=
=?us-ascii?Q?F9VnfEsk9maZiburvarWwNFGRl4M2dSC0uonkZcCSCo941V/hT3R8OWydgHS?=
=?us-ascii?Q?Z3zG3TTvbso5yzQCTOO600uPPMxOfxg8gzbJlHU7m9EEIE1xVMR4KOgt7L++?=
=?us-ascii?Q?q7KPdIsGCMLfll1QJtq85J30x4up1QXXFBMKcoZN8B3BRp6lftq7glUX9yPs?=
=?us-ascii?Q?57JE7souwoz7rcgTrNQ/HqJyIxKxsFAIt7SHgmBwMLvsJ7GZoMwDYVPGPeR2?=
=?us-ascii?Q?+Hw/8cmyKIHIK/yNYAlzBoX9vA3FQ2/uvzbGKhQhW2yk/QLj7CrM5RXFA2Jx?=
=?us-ascii?Q?ICrDKWjjSzh4kMcm/P0UTKrxPlYprPIcrwiFw0Yy3bkAP0LuW74e5Em6nqLP?=
=?us-ascii?Q?nlXGMUF9c/qbNMJ/Rh1fy6wiZGUyJj3Qvp6BWj17fLb7XngDYlz8zj7q5gvh?=
=?us-ascii?Q?Z1fR/AffHCHJuxetBmN9SicdfBb6AMB4LBWjvpbI+GPZsqaWFx93sqUYVFML?=
=?us-ascii?Q?KV8uXjqfMxhxhye3KxF/Ms+9vbOjkOXhuADIp7U6fijAKiWUR+JWbbOF9No2?=
=?us-ascii?Q?WoDlCinHK11pBAXAa8ODUqt/T/FcmyXH7cphk+hkCqSZvjvY3QTf32xyMwpQ?=
=?us-ascii?Q?LMjwq7lj0bliTYgeg3ozwcErn9xEEfaIc42ErAOPgQE9H/eAd6VBEgCzfULU?=
=?us-ascii?Q?RltCk4XDh9tYERG7tOCFmgIT1rwvdOEzCuhG0t2lMakYbEUGZIvVBXwkByN5?=
=?us-ascii?Q?sToKM9OS+CJFqTd/OUpKzbBtBYII76cUc/ECzut/RIoU30shvKe4Dnw0D/O1?=
=?us-ascii?Q?5CU9njsZKXhvcvI1KtTrL0oeOxFDrLCjcEtpD0GVBLnbB4BXXUqHuL8LzT1Y?=
=?us-ascii?Q?CDRVYs7CzoRf2dmKVrZJ9O4Hc54NX1qGPu8WsLtxUbUXIQJdKKjD0Z5D2XB3?=
=?us-ascii?Q?boG+v5/nD8uLAyR+6iBsGigf/Eps4H8PLjYJBywpIXqFcNelnZNSIz6S9vmO?=
=?us-ascii?Q?SENooHptPkF7dt6cHnLPxYAl4/s3twZs5E3hSZK4EyfFS61mK0KmR45uyy+D?=
=?us-ascii?Q?JSZ5M8B5JrlcLsGAQdONh8f6UI9S5biG1Y6ZpYNXqu8Qy+PcrcZ070kE7STv?=
=?us-ascii?Q?2I025tcIqaZYJ8o+ANoWm5aVjI/Rg3wr4JJ1j9NVHCqLRR3+hOzaVpvqx8pV?=
=?us-ascii?Q?7Sa0fPnCFlaXcdWuYzEJ6lVPVVVzbSCwXRAu1foXuXIiH6yxyfPWZnaa0M12?=
=?us-ascii?Q?C7TVKlIUMt+Gt1slH48XKjuo/P7U96M74YlK+CbWCzjrd2ctW4dD/4KDIqD5?=
=?us-ascii?Q?+wYxX4GpLGFJ/ib4R5YMvc0djAUqJWgK7Wghh4TQyDC4AF4/beNqWlrLhvm8?=
=?us-ascii?Q?q4crgZ0TcoQiu/J+L6IXqAZuD2uH0pUADxDrCUjKNRxKHiY6vuaZY7+LTa7r?=
=?us-ascii?Q?TXwuPpR5AJOUxFhOQKQW/bdXZbVT1Oj9AgaM0GpnlV/HnHnpAd5fWnvYHU84?=
=?us-ascii?Q?iD5Ja/rwduIwos0ovLMVCrSrkFA9OM0i9lnV?=
X-Forefront-Antispam-Report:
CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(1800799024)(376014)(36860700013)(82310400026);DIR:OUT;SFP:1101;
X-OriginatorOrg: amd.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 16:38:56.2005
(UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: a1f0f5e6-6036-4275-5610-08dda3864ca7
X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com]
X-MS-Exchange-CrossTenant-AuthSource:
CO1PEPF000075F3.namprd03.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB5910
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
IOMMU uses device table data structure to get per-device information for
DMA remapping, interrupt remapping, and other functionalities. It's a
valuable data structure to visualize for debugging issues related to
IOMMU.
eg.
-> To dump device table entry for a particular device
#echo 0000:c4:00.0 > /sys/kernel/debug/iommu/amd/devid
#cat /sys/kernel/debug/iommu/amd/devtbl
or
#echo c4:00.0 > /sys/kernel/debug/iommu/amd/devid
#cat /sys/kernel/debug/iommu/amd/devtbl
Signed-off-by: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@xxxxxxx>
---
drivers/iommu/amd/debugfs.c | 49 +++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
diff --git a/drivers/iommu/amd/debugfs.c b/drivers/iommu/amd/debugfs.c
index 8b57ab4ab809..38d3cab5fd8d 100644
--- a/drivers/iommu/amd/debugfs.c
+++ b/drivers/iommu/amd/debugfs.c
@@ -207,6 +207,53 @@ static int devid_show(struct seq_file *m, void *unused)
}
DEFINE_SHOW_STORE_ATTRIBUTE(devid);
+static void dump_dte(struct seq_file *m, struct amd_iommu_pci_seg *pci_seg, u16 devid)
+{
+ struct dev_table_entry *dev_table;
+ struct amd_iommu *iommu;
+
+ iommu = pci_seg->rlookup_table[devid];
+ if (!iommu)
+ return;
+
+ dev_table = get_dev_table(iommu);
+ if (!dev_table) {
+ seq_puts(m, "Device table not found");
+ return;
+ }
+
+ seq_printf(m, "%-12s %16s %16s %16s %16s iommu\n", "DeviceId",
+ "QWORD[3]", "QWORD[2]", "QWORD[1]", "QWORD[0]");
+ seq_printf(m, "%04x:%02x:%02x.%x ", pci_seg->id, PCI_BUS_NUM(devid),
+ PCI_SLOT(devid), PCI_FUNC(devid));
+ for (int i = 3; i >= 0; --i)
+ seq_printf(m, "%016llx ", dev_table[devid].data[i]);
+ seq_printf(m, "iommu%d\n", iommu->index);
+}
+
+static int iommu_devtbl_show(struct seq_file *m, void *unused)
+{
+ struct amd_iommu_pci_seg *pci_seg;
+ u16 seg, devid;
+
+ if (sbdf < 0) {
+ seq_puts(m, "Please provide valid device id input\n");
+ return 0;
+ }
+ seg = PCI_SBDF_TO_SEGID(sbdf);
+ devid = PCI_SBDF_TO_DEVID(sbdf);
+
+ for_each_pci_segment(pci_seg) {
+ if (pci_seg->id != seg)
+ continue;
+ dump_dte(m, pci_seg, devid);
+ break;
+ }
+
+ return 0;
+}
+DEFINE_SHOW_ATTRIBUTE(iommu_devtbl);
+
void amd_iommu_debugfs_setup(void)
{
struct amd_iommu *iommu;
@@ -231,4 +278,6 @@ void amd_iommu_debugfs_setup(void)
debugfs_create_file("devid", 0644, amd_iommu_debugfs, NULL,
&devid_fops);
+ debugfs_create_file("devtbl", 0444, amd_iommu_debugfs, NULL,
+ &iommu_devtbl_fops);
}
--
2.25.1
Return-Path: <linux-kernel+bounces-673537-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 6639D41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:39:27 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id F01E31895FB4
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:39:40 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 097B71E32B9;
Wed, 4 Jun 2025 16:39:22 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="P/rMQhik"
Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2053.outbound.protection.outlook.com [40.107.236.53])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7FAF31E1E1E
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:39:17 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.236.53
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749055161; cv=fail; b=dPfaqAKzjdNz9jB9TxC0iV9F7i/T2YWrLYStq9jzK/8YdTvJ5R3UXuZMe80UQT8yJKkjDLtHZ8BTGvwBlnJMvw8NY05dr2EJCO8P2qTPgtg/mYiowdYze+FYK3We8OB4REz4aHcOeuyE3jgKxSTdY5IoiVjxCj95dG8y0CxsJuo=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749055161; c=relaxed/simple;
bh=DI1qbokCFjN2vslZAawGheSEy/KilKMdmcx2h7mHXnw=;
h=From:To:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version:Content-Type; b=HcRXZFONNRYQwnVL5LpwXiKd4THgvc78z1K32S9mxPxG/ffp/8B+8Yf9KNWZF0TmV6yU+ttlLLSeV2q9ETW79K3nl82P5ziGvmtIrerWMBY/CChxbNpI/NfvAlq8ukdfTHLgWFcyHV/sevxn7Kq0I9xSoeHIcwpnFgMVeK9YQ8o=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=P/rMQhik; arc=fail smtp.client-ip=40.107.236.53
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com
Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=tL2NBycdUiM7UjJVd43lsMC9FfV+vipXJkpc3DqJttmdVvmbEwZB95iivRHGJKD4HX12f23HQ9xD5hIqFNTyMUqaEbAoTUmDppypSw4uQ2XfQUJIV9ShI8YNCqI/I80W5kHlKj/1SknSmgAC9np6UIVCukhr3Vr12FM8dyYhRQ/JgBV+FIjkI+15nDZTJ03SwwCn7N8diyN8GJ3RAxnJ5n0P78HGkf+Ok6mp19p2CKvNme9cwUJe2wJ1+4C9lBBGym1ZSn4RvAQI4a1oS0QpR3YvMHl6UUJHWx+W4V7EolnFUaB2QJiTD+HH/fASma6AAMMqC88h8mZPY0htdigTtA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=/P9hlaLL0C1c9sksHAa4tLqUAiPpMZms7trreQPvmyQ=;
b=nH2gIXjftDoEhVC58Nhh9/KcCRcRCgtKdSLGmIX/JEmduqFhzz6d1Cehn5HIg5VbWCYjwPVg8+J5QHGsrcxEL0VWcWEOMB90LOCxBBFTBdrft3rfkhOAhNlIH4FTGJDYKVDD5YbWqbvz45PMrHmX+X2fw9D5whTsdK6l/Dwhv1yWqV9UJFD5jD9Jbe1fDqpRmo1XqJXG9hVGM3dzOm03J4Hydp3LQwGGzpVdBfNNHzRNE6s7OuOxWXb4Oroflh0w05Q+GHSB4D3sodfHYLmNZy4xiycPmsf67ILsRrBAvYUDsA0HzT7llhA6/fLknAtFUQpjv5aXJwJ5eiccpOhSWA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is
165.204.84.17) smtp.rcpttodomain=8bytes.org smtp.mailfrom=amd.com; dmarc=pass
(p=quarantine sp=quarantine pct=100) action=none header.from=amd.com;
dkim=none (message not signed); arc=none (0)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=/P9hlaLL0C1c9sksHAa4tLqUAiPpMZms7trreQPvmyQ=;
b=P/rMQhikC4dq2TeMUdZxkk8gVgchJW9KtyPQLZ1IaAFBpMgqpjABmSVynyNInVA8RsqcowDNG9pnvSSxUHaBubJEBe2qdOClErBPXMnZTj6aWKJ0o8GbQqNptFokR7rPgu+as99nQm25V98cDWsibP0SEwpvPamtm7d4AoLp52M=
Received: from BY5PR13CA0034.namprd13.prod.outlook.com (2603:10b6:a03:180::47)
by CY8PR12MB8242.namprd12.prod.outlook.com (2603:10b6:930:77::5) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.34; Wed, 4 Jun
2025 16:39:15 +0000
Received: from CO1PEPF000075F2.namprd03.prod.outlook.com
(2603:10b6:a03:180:cafe::68) by BY5PR13CA0034.outlook.office365.com
(2603:10b6:a03:180::47) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8769.15 via Frontend Transport; Wed,
4 Jun 2025 16:39:14 +0000
X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17)
smtp.mailfrom=amd.com; dkim=none (message not signed)
header.d=none;dmarc=pass action=none header.from=amd.com;
Received-SPF: Pass (protection.outlook.com: domain of amd.com designates
165.204.84.17 as permitted sender) receiver=protection.outlook.com;
client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C
Received: from SATLEXMB04.amd.com (165.204.84.17) by
CO1PEPF000075F2.mail.protection.outlook.com (10.167.249.41) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
15.20.8792.29 via Frontend Transport; Wed, 4 Jun 2025 16:39:13 +0000
Received: from BLRDHSRIVAS.amd.com (10.180.168.240) by SATLEXMB04.amd.com
(10.181.40.145) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 4 Jun
2025 11:39:10 -0500
From: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@xxxxxxx>
To: <joro@xxxxxxxxxx>, <suravee.suthikulpanit@xxxxxxx>, <will@xxxxxxxxxx>,
<robin.murphy@xxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>,
<iommu@xxxxxxxxxxxxxxx>, <Vasant.Hegde@xxxxxxx>,
<dheerajkumar.srivastava@xxxxxxx>
Subject: [PATCH v6 7/8] iommu/amd: Add debugfs support to dump IRT Table
Date: Wed, 4 Jun 2025 22:06:46 +0530
Message-ID: <20250604163647.1439-8-dheerajkumar.srivastava@xxxxxxx>
X-Mailer: git-send-email 2.25.1
In-Reply-To: <20250604163647.1439-1-dheerajkumar.srivastava@xxxxxxx>
References: <20250604163647.1439-1-dheerajkumar.srivastava@xxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain
X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com
(10.181.40.145)
X-EOPAttributedMessage: 0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: CO1PEPF000075F2:EE_|CY8PR12MB8242:EE_
X-MS-Office365-Filtering-Correlation-Id: c30e7867-06a7-4d8b-e6ff-08dda386573d
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam:
BCL:0;ARA:13230040|36860700013|1800799024|82310400026|376014;
X-Microsoft-Antispam-Message-Info:
=?us-ascii?Q?301IBOs4VHeqH4+plNYBXTPcKi9eJQAb1o7DaMKKOInPMLNzi8BaTpOwu05L?=
=?us-ascii?Q?lSiL4sTNb4FVOAq7uxasy7XyyNfUM/srLpu5m2t0w5sce80PJXzFG8cP+aQ1?=
=?us-ascii?Q?LSnVzDMdmPcVkcxDIy5N8qJoo6VR/thKHzStjd/xZVFevHeHo6zE+wsyCvnv?=
=?us-ascii?Q?ld88eerBw2cgqicSNVeH7JL69lmvZEe3rKYjNjnwU5tNkOSomaZ4ektjgVwM?=
=?us-ascii?Q?MA1DHE9xn1VlZf7WBO0q7TX4Lg1rnTHAzz7cqmCAlwIN/GN2VS7k8iRlsP4a?=
=?us-ascii?Q?rGdMJHjVLNdxvt6xyD+gHzmONBm+sSXmhfOYQvbnvxosTiDeVdDUWn0km20B?=
=?us-ascii?Q?6MzxnH1CrcLVdaCRTmKZQgumQXHp7/hzHg9jV0x+IWcjcGBcCBe50U/Yfbk9?=
=?us-ascii?Q?hna0UmtMykw3X1iG5qtuO9VELz1xZA3KmYaZIw9lgaY9guEpw8hqavyqzK7R?=
=?us-ascii?Q?hXb/Y6Ru90D/2Qg5N3m/ovmWkw1BerKXQUYfxOaUcfCrDaZrlO7aJ9zjL+o9?=
=?us-ascii?Q?WSrNHjojzANXcYkXUGVBaw0eVn1rUyJJLLjFmwViGPZb/U2Vbyq+IdnaxCpD?=
=?us-ascii?Q?Opp6sN1Qx3y1emvD2Oqe9x/NVqt05Y91z0dcWeWYHwbO4xoOBxdJ9ApjtkaR?=
=?us-ascii?Q?rp6pJum5T2j4PHrColQFn763yo6JxOT0i5Nsa00rbFOfXxxiO6R1XpcvC5M/?=
=?us-ascii?Q?g5kPqoxHnVDFSjNn14v3V/jUlmH0uwC4svnRq3XDij67A/pjmd6QkNtlFGFM?=
=?us-ascii?Q?88WJYw4aE7trza0KF2Q2tuW4dBP+c154EZD0HOUJUplhM5QnuGex3g+zwZH0?=
=?us-ascii?Q?nN9P+jhCrHBDGjznBpDF4JM/cUJCbLwo2PtTLqqcRjH4im53dBw5Z0SgoXS/?=
=?us-ascii?Q?X9ydtGMIJsQGpmqT2CnEyG6m7Wkdq7ribNgaartid5WyuuHSNbokoM31hclg?=
=?us-ascii?Q?EeeIkZSz0bDxTHErNsStk1KwSN98J8OfYf1m88BdXNP5Gir3xe4QHEtwIhUF?=
=?us-ascii?Q?O9U18AetlKDDCVFxLxyJP+wEpo+Zaym3CfswUl/TO64q4sahQ9/F7cxhlMdP?=
=?us-ascii?Q?rjpYx8M89Sb4wFOWpBlvwqVUjD1luZTPn4AnjMROKg4u3sDVrc2Z1qp0l4/0?=
=?us-ascii?Q?tdYbobc/l2eyvSV0ggJqBuy2tuvC8fCrfI1OCUNDrNCVoT9Sn8akpBpO0R9b?=
=?us-ascii?Q?EZUlxZ/sDfBj0FBAkZkkETgWH3jwaL5QoT55WR/riJIL1vM+O8qtiXE6LWDj?=
=?us-ascii?Q?VG+lTXX/VdJuJxKPlIYYdu0/vkVMTwhyO0zHNGfZZ8PiXIIpxmF3oM38wC9A?=
=?us-ascii?Q?dspaf4/p6EA7cNqD8ZxOI5USaboAtBhyQi8t7vIdWX/EV+gcDqS3TsPeNt2O?=
=?us-ascii?Q?nm3pAo9Ld7UM44qPSMbhursJoc9J/9hh0Ql0xllb0Zl54ymsDMlodNl0i14Y?=
=?us-ascii?Q?uAWAIpYoFw9SQVLa3IsoE7afv8s2BU4OS6dZu503tZqeokAYo/W+/suz03C4?=
=?us-ascii?Q?l5yXsXVUb+FF1FOQ0U6VbjmwYrjZICnpyz3M?=
X-Forefront-Antispam-Report:
CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(36860700013)(1800799024)(82310400026)(376014);DIR:OUT;SFP:1101;
X-OriginatorOrg: amd.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 16:39:13.9632
(UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: c30e7867-06a7-4d8b-e6ff-08dda386573d
X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com]
X-MS-Exchange-CrossTenant-AuthSource:
CO1PEPF000075F2.namprd03.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB8242
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
In cases where we have an issue in the device interrupt path with IOMMU
interrupt remapping enabled, dumping valid IRT table entries for the device
is very useful and good input for debugging the issue.
eg.
-> To dump irte entries for a particular device
#echo "c4:00.0" > /sys/kernel/debug/iommu/amd/devid
#cat /sys/kernel/debug/iommu/amd/irqtbl | less
or
#echo "0000:c4:00.0" > /sys/kernel/debug/iommu/amd/devid
#cat /sys/kernel/debug/iommu/amd/irqtbl | less
Signed-off-by: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@xxxxxxx>
---
drivers/iommu/amd/debugfs.c | 108 ++++++++++++++++++++++++++++++++++++
1 file changed, 108 insertions(+)
diff --git a/drivers/iommu/amd/debugfs.c b/drivers/iommu/amd/debugfs.c
index 38d3cab5fd8d..7a056ebcc7c3 100644
--- a/drivers/iommu/amd/debugfs.c
+++ b/drivers/iommu/amd/debugfs.c
@@ -11,6 +11,7 @@
#include <linux/pci.h>
#include "amd_iommu.h"
+#include "../irq_remapping.h"
static struct dentry *amd_iommu_debugfs;
@@ -254,6 +255,111 @@ static int iommu_devtbl_show(struct seq_file *m, void *unused)
}
DEFINE_SHOW_ATTRIBUTE(iommu_devtbl);
+static void dump_128_irte(struct seq_file *m, struct irq_remap_table *table, u16 int_tab_len)
+{
+ struct irte_ga *ptr, *irte;
+ int index;
+
+ for (index = 0; index < int_tab_len; index++) {
+ ptr = (struct irte_ga *)table->table;
+ irte = &ptr[index];
+
+ if (AMD_IOMMU_GUEST_IR_VAPIC(amd_iommu_guest_ir) &&
+ !irte->lo.fields_vapic.valid)
+ continue;
+ else if (!irte->lo.fields_remap.valid)
+ continue;
+ seq_printf(m, "IRT[%04d] %016llx %016llx\n", index, irte->hi.val, irte->lo.val);
+ }
+}
+
+static void dump_32_irte(struct seq_file *m, struct irq_remap_table *table, u16 int_tab_len)
+{
+ union irte *ptr, *irte;
+ int index;
+
+ for (index = 0; index < int_tab_len; index++) {
+ ptr = (union irte *)table->table;
+ irte = &ptr[index];
+
+ if (!irte->fields.valid)
+ continue;
+ seq_printf(m, "IRT[%04d] %08x\n", index, irte->val);
+ }
+}
+
+static void dump_irte(struct seq_file *m, u16 devid, struct amd_iommu_pci_seg *pci_seg)
+{
+ struct dev_table_entry *dev_table;
+ struct irq_remap_table *table;
+ struct amd_iommu *iommu;
+ unsigned long flags;
+ u16 int_tab_len;
+
+ table = pci_seg->irq_lookup_table[devid];
+ if (!table) {
+ seq_printf(m, "IRQ lookup table not set for %04x:%02x:%02x:%x\n",
+ pci_seg->id, PCI_BUS_NUM(devid), PCI_SLOT(devid), PCI_FUNC(devid));
+ return;
+ }
+
+ iommu = pci_seg->rlookup_table[devid];
+ if (!iommu)
+ return;
+
+ dev_table = get_dev_table(iommu);
+ if (!dev_table) {
+ seq_puts(m, "Device table not found");
+ return;
+ }
+
+ int_tab_len = dev_table[devid].data[2] & DTE_INTTABLEN_MASK;
+ if (int_tab_len != DTE_INTTABLEN_512 && int_tab_len != DTE_INTTABLEN_2K) {
+ seq_puts(m, "The device's DTE contains an invalid IRT length value.");
+ return;
+ }
+
+ seq_printf(m, "DeviceId %04x:%02x:%02x.%x\n", pci_seg->id, PCI_BUS_NUM(devid),
+ PCI_SLOT(devid), PCI_FUNC(devid));
+
+ raw_spin_lock_irqsave(&table->lock, flags);
+ if (AMD_IOMMU_GUEST_IR_GA(amd_iommu_guest_ir))
+ dump_128_irte(m, table, BIT(int_tab_len >> 1));
+ else
+ dump_32_irte(m, table, BIT(int_tab_len >> 1));
+ seq_puts(m, "\n");
+ raw_spin_unlock_irqrestore(&table->lock, flags);
+}
+
+static int iommu_irqtbl_show(struct seq_file *m, void *unused)
+{
+ struct amd_iommu_pci_seg *pci_seg;
+ u16 devid, seg;
+
+ if (!irq_remapping_enabled) {
+ seq_puts(m, "Interrupt remapping is disabled\n");
+ return 0;
+ }
+
+ if (sbdf < 0) {
+ seq_puts(m, "Please provide valid device id input\n");
+ return 0;
+ }
+
+ seg = PCI_SBDF_TO_SEGID(sbdf);
+ devid = PCI_SBDF_TO_DEVID(sbdf);
+
+ for_each_pci_segment(pci_seg) {
+ if (pci_seg->id != seg)
+ continue;
+ dump_irte(m, devid, pci_seg);
+ break;
+ }
+
+ return 0;
+}
+DEFINE_SHOW_ATTRIBUTE(iommu_irqtbl);
+
void amd_iommu_debugfs_setup(void)
{
struct amd_iommu *iommu;
@@ -280,4 +386,6 @@ void amd_iommu_debugfs_setup(void)
&devid_fops);
debugfs_create_file("devtbl", 0444, amd_iommu_debugfs, NULL,
&iommu_devtbl_fops);
+ debugfs_create_file("irqtbl", 0444, amd_iommu_debugfs, NULL,
+ &iommu_irqtbl_fops);
}
--
2.25.1
Return-Path: <linux-kernel+bounces-673538-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 12BC041E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:39:47 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id A8FBF1897F22
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:40:00 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 82CC61E0DE8;
Wed, 4 Jun 2025 16:39:39 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="SZy2zeh+"
Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2051.outbound.protection.outlook.com [40.107.237.51])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0539B1DED7C
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:39:36 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.237.51
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749055178; cv=fail; b=SML3KHHWyWWa9PX7YH9s0BCvr/QIT3Tcw4GOgbiA7jiRJPVpa8Bo+URsuyfiRO9LWSxyc0F38NV6B2yCYK1ZXzPqoYzUhsLMnmDOdYBZYi5OZ7vxLqHFS9ywWaB8hmiI+/1DAzDawhCAMGxi34FRmVpXMkbDIFqDXEm1jGo87QQ=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749055178; c=relaxed/simple;
bh=0rk3R9SZ+AXNmTy8D21OmTkESyjvQg71OQKf90faPW8=;
h=From:To:Subject:Date:Message-ID:In-Reply-To:References:
MIME-Version:Content-Type; b=nSzmGTwLgFZTX4m7J8dP/igWRayjmDsvPIB6/P2my+NeZY35hGEcZ3BSKB8UEmZiBu/b3WTLTOzAgr+1aL0gHT6GvVdxrsd85QNPdX6jMTW3X2kiUK34V58TDnFcUHMc/MN4XyGYQ3paHmXoy+2EmxLlCtktr5DJ/IQal4J9y9k=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=SZy2zeh+; arc=fail smtp.client-ip=40.107.237.51
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com
Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=sjnY8KxTbWrfSq51jpsCIBushftu94KvgS327GbUjHkhdF7iPXQGXK+0+GLvL+QEFYgp+X/D2o3krY7RwOIZtGQdu+S8zAdRg1lVPuBnaZ0Xu6mEBSK+2Z4PTw9teIdcgVER/gpdS3NswjmTm7UDSObHSRVKjnpNkF4ssDJKK0f9xTtTTCy7b6TvnIDkhTt50tZYwVlrtgDrU4oZQcSgTKuqiTNVb0fbDSeXK0YngkWnczATxvqz1QcRcVJng29dCcFPoz+jVVlp7aqgUIrapCt8Jj2OaXxcdcLJBY5PYL//XXvhuYXuhAtKLv2UDlGY9nn4uNWUknRi6ybwVLljZQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=Dzu4iNpyeuOBW8qNSg9xV+4SnO95FhoMf0dI192aRfA=;
b=ZVhEbL7Z8wMNRYPSXEOMv4R6BC2UmemVoi18R38wbVAWlpUugEBwoLRF8WEVBrvloqZDNpoRwoqRESRNiI79/JybpO8ke+XRxyXOJbvtycZGldwOWwEvV75QJY89VAUX9I/fMk40xHGY6ysTpZsSzrml7bdgl6eaQA8Reg+4q2AV/X6rOrInHvzwHKQThHlLz9Ic7XRUAZmrhBSzKcE36ws5kIZMlB9ufACOrpbjvflp6X1baXpSgfl+utxsg6lnWH8Y0Etcpf1TWABQvasiopMWosjkn7mPH+gEKMvuxKx2hI/NUyazm7heI27KnC5cn5p/i7TQ2i8YU0a6i8AHJg==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is
165.204.84.17) smtp.rcpttodomain=8bytes.org smtp.mailfrom=amd.com; dmarc=pass
(p=quarantine sp=quarantine pct=100) action=none header.from=amd.com;
dkim=none (message not signed); arc=none (0)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=Dzu4iNpyeuOBW8qNSg9xV+4SnO95FhoMf0dI192aRfA=;
b=SZy2zeh++PI7y7Qg8oioZVqypS3JwEtIbKFvB+5gqCBhXAES5bLccly3nHdbBfW9SQypSBkP7LBxuF89jX/kSLpiASBH2IS0s+k0It7cX0LxSRb/QR1gWFfWqUYKyG0AInIHd6R5DJ2zGHpHzZYFPlMEk6/R3HotE+9vy2LiCSg=
Received: from MW4P223CA0023.NAMP223.PROD.OUTLOOK.COM (2603:10b6:303:80::28)
by SA0PR12MB4382.namprd12.prod.outlook.com (2603:10b6:806:9a::14) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8792.34; Wed, 4 Jun
2025 16:39:32 +0000
Received: from CO1PEPF000075F0.namprd03.prod.outlook.com
(2603:10b6:303:80:cafe::22) by MW4P223CA0023.outlook.office365.com
(2603:10b6:303:80::28) with Microsoft SMTP Server (version=TLS1_3,
cipher=TLS_AES_256_GCM_SHA384) id 15.20.8769.18 via Frontend Transport; Wed,
4 Jun 2025 16:39:32 +0000
X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17)
smtp.mailfrom=amd.com; dkim=none (message not signed)
header.d=none;dmarc=pass action=none header.from=amd.com;
Received-SPF: Pass (protection.outlook.com: domain of amd.com designates
165.204.84.17 as permitted sender) receiver=protection.outlook.com;
client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C
Received: from SATLEXMB04.amd.com (165.204.84.17) by
CO1PEPF000075F0.mail.protection.outlook.com (10.167.249.39) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id
15.20.8792.29 via Frontend Transport; Wed, 4 Jun 2025 16:39:31 +0000
Received: from BLRDHSRIVAS.amd.com (10.180.168.240) by SATLEXMB04.amd.com
(10.181.40.145) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 4 Jun
2025 11:39:28 -0500
From: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@xxxxxxx>
To: <joro@xxxxxxxxxx>, <suravee.suthikulpanit@xxxxxxx>, <will@xxxxxxxxxx>,
<robin.murphy@xxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>,
<iommu@xxxxxxxxxxxxxxx>, <Vasant.Hegde@xxxxxxx>,
<dheerajkumar.srivastava@xxxxxxx>
Subject: [PATCH v6 8/8] iommu/amd: Add documentation for AMD IOMMU debugfs support
Date: Wed, 4 Jun 2025 22:06:47 +0530
Message-ID: <20250604163647.1439-9-dheerajkumar.srivastava@xxxxxxx>
X-Mailer: git-send-email 2.25.1
In-Reply-To: <20250604163647.1439-1-dheerajkumar.srivastava@xxxxxxx>
References: <20250604163647.1439-1-dheerajkumar.srivastava@xxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain
X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com
(10.181.40.145)
X-EOPAttributedMessage: 0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: CO1PEPF000075F0:EE_|SA0PR12MB4382:EE_
X-MS-Office365-Filtering-Correlation-Id: 8a94430f-bb9c-4c91-3414-08dda38661f6
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam:
BCL:0;ARA:13230040|82310400026|1800799024|376014|36860700013;
X-Microsoft-Antispam-Message-Info:
=?us-ascii?Q?bH7P6FF9CIiU4T+E8orQFrFO15w0yQW2spgLXcU5QsJcPbfSTN4/H+W9afr7?=
=?us-ascii?Q?1VuzNrFvqmuCZwbvx8ypsgyG1NzX3R3cu8tljk5dvpz80pABdaeDBc/wC2cU?=
=?us-ascii?Q?elz6pfq8jgpJDdTfSfE+EYWDhro3/kKV7W4UjVi1P/ydau+i+siR5Y3O3p9T?=
=?us-ascii?Q?BdUhtGxrEP2UE5oShHl7AjVYCC+j+JrawQLsbm7z5uTmViuOVzfyK45QKSLq?=
=?us-ascii?Q?D22DNeJcDi/07u3CrpjC+sxu9KCL3ThAZrXkZXqS2dTUsyj+TYCBL0XGBWa2?=
=?us-ascii?Q?d98LSmBXa5r2UMXkirtiyavWUYgKWluMBsXQUWvYXnttK2pL58heEsz24fqu?=
=?us-ascii?Q?4liQKoPZm1GO0EiZZuDer/rMUlVPG4iSEcU+dpy18pXH9BWXXyaV1q8phRg+?=
=?us-ascii?Q?2saGMDb+5DNAX1YbmDLQ4qvFoftOi5gpEyHA/aVNoqvJ1GNfQAb+jpQ7kpJM?=
=?us-ascii?Q?tVoMZRCeMVTZCCzP9xgJiVOstxK5xLOdzXpxKR3ai4L1bQ81UeEnlaUu4aQ+?=
=?us-ascii?Q?zb4bdBynZG07g+BhjLmipwwIuvVL1lTwl47/93OTg8hXUC49pCRulYfg6tNW?=
=?us-ascii?Q?+Tut2a2dzuGvECP8xEnCDOVfWYHCzNf8W05MwjGeJMwgLrc7rKPHePZbuF87?=
=?us-ascii?Q?PiPQLfGoyUWocM0HxfrU4Oj6I2xxTMzxwWQb+g4jm42rb83mSa2fQFW1xPnh?=
=?us-ascii?Q?uN6HOvZ1btY3sNX/26qlffAxvY8jPb13qHMSZeKZluN3KWaX16qNmWspv+L1?=
=?us-ascii?Q?WC8cxrMGE7JxeVufowjeR8NsKwQDS2xtufzwIN0YKSYXf+/7DD/fXjnDERXe?=
=?us-ascii?Q?FI3jenJpi4Sr5pTZe7OUCD2tyz8byPI5/ctpRobBth24qQJnlB2bufYnyvsE?=
=?us-ascii?Q?V2FCGYSXAzdgmv4vDOyFMsZNjfZsRmCr/9RI/WvrFMIPr4hsr6kZt+YVO9LX?=
=?us-ascii?Q?boKKJNPsLYFDeP6Tv1brPo9VYkl1XsdX/j6+FhbpSLb/1e/WzENs6I1pS1ZH?=
=?us-ascii?Q?7ER4aLs/9qfNpWPcAA0pO8QM545F3vO/ssyHfisYcSC9b9KOH9bMqFdfoVab?=
=?us-ascii?Q?YCKFFPiox2eFj+VubfU5wGvLHwd4QbpFbxfLJ9OSYYNGUfvbIo6nko73zgmO?=
=?us-ascii?Q?E7dOk/yVcWZLNBKFVBaAre/7YdRWHcTg/EDk0Kfs5JfHUYi1kYOJ/LDVA0HE?=
=?us-ascii?Q?rtvVhMuc74uB1zXwQzNSKeE5FI4E/p6G82FRTh8jrdiJy/yhSWMtaOCQVGM2?=
=?us-ascii?Q?lZaQj63I5CrEYHfXvfMJKbejwQGb7vHfcMDKdv/Do1a9hgI1H8T7YH1TRVVd?=
=?us-ascii?Q?j0kX+nnXpM6yX+wVpZtDSCWLzis6ocIp/BuXg8MzDUhRsnBqLRa77TbyEjdJ?=
=?us-ascii?Q?hH9zT7BFBTwU/CR2VeStodCQu9muoJroLF7crP/6u4I7j17edFnNEf7uqwHl?=
=?us-ascii?Q?2vDur1JqV4M0beCmhb8/+LxYl7OF0eHZWRRg4G182B/KCjcgiLWDkHaurjDF?=
=?us-ascii?Q?gYAt6Jr5AOo35yWELPUb0A4BOATJGLSEKByP?=
X-Forefront-Antispam-Report:
CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(82310400026)(1800799024)(376014)(36860700013);DIR:OUT;SFP:1101;
X-OriginatorOrg: amd.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 16:39:31.9484
(UTC)
X-MS-Exchange-CrossTenant-Network-Message-Id: 8a94430f-bb9c-4c91-3414-08dda38661f6
X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com]
X-MS-Exchange-CrossTenant-AuthSource:
CO1PEPF000075F0.namprd03.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Anonymous
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB4382
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Add documentation describing how to use AMD IOMMU debugfs support to
dump IOMMU data structures - IRT table, Device table, Registers (MMIO and
Capability) and command buffer.
Signed-off-by: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@xxxxxxx>
---
Documentation/ABI/testing/debugfs-amd-iommu | 114 ++++++++++++++++++++
1 file changed, 114 insertions(+)
create mode 100644 Documentation/ABI/testing/debugfs-amd-iommu
diff --git a/Documentation/ABI/testing/debugfs-amd-iommu b/Documentation/ABI/testing/debugfs-amd-iommu
new file mode 100644
index 000000000000..7d6cf1f602ed
--- /dev/null
+++ b/Documentation/ABI/testing/debugfs-amd-iommu
@@ -0,0 +1,114 @@
+What: /sys/kernel/debug/iommu/amd/iommu<x>/mmio
+Date: January 2025
+Contact: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@xxxxxxx>
+Description:
+ This is an input read/write access file. In this file, the user input
+ mmio register offset for iommu<x> to print corresponding mmio register
+ of iommu<x>.
+
+ Example:
+ $ echo "0x18" > /sys/kernel/debug/iommu/amd/iommu00/mmio
+ $ cat /sys/kernel/debug/iommu/amd/iommu00/mmio
+
+ Output:
+ Offset:0x18 Value:0x000c22000003f48d
+
+What: /sys/kernel/debug/iommu/amd/iommu<x>/capability
+Date: January 2025
+Contact: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@xxxxxxx>
+Description:
+ This is an input read/write access file. In this file, the user input
+ capability register offset for iommu<x> to print corresponding capability
+ register of iommu<x>.
+
+ Example:
+ $ echo "0x10" > /sys/kernel/debug/iommu/amd/iommu00/capability
+ $ cat /sys/kernel/debug/iommu/amd/iommu00/capability
+
+ Output:
+ Offset:0x10 Value:0x00203040
+
+What: /sys/kernel/debug/iommu/amd/iommu<x>/cmdbuf
+Date: January 2025
+Contact: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@xxxxxxx>
+Description:
+ This file is an output read only file that contains iommu<x> command
+ buffer entries.
+
+ Examples:
+ $ cat /sys/kernel/debug/iommu/amd/iommu<x>/cmdbuf
+
+ Output:
+ CMD Buffer Head Offset:339 Tail Offset:339
+ 0: 00835001 10000001 00003c00 00000000
+ 1: 00000000 30000005 fffff003 7fffffff
+ 2: 00835001 10000001 00003c01 00000000
+ 3: 00000000 30000005 fffff003 7fffffff
+ 4: 00835001 10000001 00003c02 00000000
+ 5: 00000000 30000005 fffff003 7fffffff
+ 6: 00835001 10000001 00003c03 00000000
+ 7: 00000000 30000005 fffff003 7fffffff
+ 8: 00835001 10000001 00003c04 00000000
+ 9: 00000000 30000005 fffff003 7fffffff
+ 10: 00835001 10000001 00003c05 00000000
+ 11: 00000000 30000005 fffff003 7fffffff
+ [...]
+
+What: /sys/kernel/debug/iommu/amd/devid
+Date: January 2025
+Contact: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@xxxxxxx>
+Description:
+ This is an input read/write file that takes device id user input.
+ This input can be used for dumping iommu data structures like
+ interrupt remapping table, device table etc.
+
+ Example:
+ 1.
+ $ echo 0000:01:00.0 > /sys/kernel/debug/iommu/amd/devid
+ $ cat /sys/kernel/debug/iommu/amd/devid
+
+ Output:
+ 0000:01:00.0
+
+ 2.
+ $ echo 01:00.0 > /sys/kernel/debug/iommu/amd/devid
+ $ cat /sys/kernel/debug/iommu/amd/devid
+
+ Output:
+ 0000:01:00.0
+
+What: /sys/kernel/debug/iommu/amd/devtbl
+Date: January 2025
+Contact: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@xxxxxxx>
+Description:
+ This is an output read only file that contains device table entry for
+ the device id input given in /sys/kernel/debug/iommu/amd/devid.
+
+ Example:
+ $ cat /sys/kernel/debug/iommu/amd/devtbl
+
+ Output:
+ DeviceId QWORD[3] QWORD[2] QWORD[1] QWORD[0] iommu
+ 0000:01:00.0 0000000000000000 20000001373b8013 0000000000000038 6000000114d7b603 iommu3
+
+What: /sys/kernel/debug/iommu/amd/irqtbl
+Date: January 2025
+Contact: Dheeraj Kumar Srivastava <dheerajkumar.srivastava@xxxxxxx>
+Description:
+ This is an output read only file that contains IRT table valid entries
+ for the device id input given in /sys/kernel/debug/iommu/amd/devid.
+
+ Example:
+ $ cat /sys/kernel/debug/iommu/amd/irqtbl
+
+ Output:
+ DeviceId 0000:01:00.0
+ IRT[0000] 0000000000000020 0000000000000241
+ IRT[0001] 0000000000000020 0000000000000841
+ IRT[0002] 0000000000000020 0000000000002041
+ IRT[0003] 0000000000000020 0000000000008041
+ IRT[0004] 0000000000000020 0000000000020041
+ IRT[0005] 0000000000000020 0000000000080041
+ IRT[0006] 0000000000000020 0000000000200041
+ IRT[0007] 0000000000000020 0000000000800041
+ [...]
--
2.25.1
Return-Path: <linux-kernel+bounces-673539-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 2754641E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:40:19 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 9DA1A1897436
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:40:32 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 009291E32B9;
Wed, 4 Jun 2025 16:40:11 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=xen0n.name header.i=@xen0n.name header.b="rlUTbXSG"
Received: from mailbox.box.xen0n.name (mail.xen0n.name [115.28.160.31])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 253D81DDA0C;
Wed, 4 Jun 2025 16:40:07 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.28.160.31
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749055210; cv=none; b=SH+CjLmiUmVfJnH+bl0OBdY5Ht0BTZu75+CoDOD2Jj94x7XnQuQPMysgzGQV2Gtpvk7njDEA8CP7BRXekcOU5NDuLnHqnnddrLUqrELHttvQVNmTlP40BaxBF6SWsYFuPD05bMdSg80ChTfYOq41M/ESX2YD4+697UX9SwuUvvM=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749055210; c=relaxed/simple;
bh=Z2ajJa3jqcL9eosQXVw90LfEQcomAMUhBxXUYrZ+pRk=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=PfM97pUOMpZsoK5yRpjk6S7yliI3b5FHcXgdAeTT7Gvkqq/y+MCxdv+93QMqia7dDqI4n/ifPl/+CR+jYJsxzz76rRn+6VhKTNThFFR7ghBP+EKUF2DAWoWlJq8spzQTy2gNEYyCiSxSUhDi4hDTlMLemeOuKOWAG6luz0kh9d0=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=xen0n.name; spf=pass smtp.mailfrom=xen0n.name; dkim=pass (1024-bit key) header.d=xen0n.name header.i=@xen0n.name header.b=rlUTbXSG; arc=none smtp.client-ip=115.28.160.31
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=xen0n.name
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=xen0n.name
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xen0n.name; s=mail;
t=1749055199; bh=Z2ajJa3jqcL9eosQXVw90LfEQcomAMUhBxXUYrZ+pRk=;
h=Date:Subject:To:Cc:References:From:In-Reply-To:From;
b=rlUTbXSG4Q/CMfpm3kh5zEqXZbLVZFgjlx2DWFw2onvZNU5gbu41LEbtC4VnOTn/y
kLz/mGTdxNxZlQl3yv3Pe48fI4iYGObu/WyNUS7VimW/Ed0KUPpfGilhq4T7SNi1pA
oTvT52PIUJE7uWqYRUPn507LoQsVo7AtsfHH/InA=
Received: from [IPV6:240e:b8f:949a:9000:aa4b:215a:c634:4370] (unknown [IPv6:240e:b8f:949a:9000:aa4b:215a:c634:4370])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
(No client certificate requested)
by mailbox.box.xen0n.name (Postfix) with ESMTPSA id EFA376011F;
Thu, 5 Jun 2025 00:39:58 +0800 (CST)
Message-ID: <edca541e-a2a7-4c26-bea7-15fd0b25597b@xxxxxxxxxx>
Date: Thu, 5 Jun 2025 00:39:58 +0800
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH] LoongArch: vDSO: correctly use asm parameters in syscall
wrappers
To: Huacai Chen <chenhuacai@xxxxxxxxxx>,
=?UTF-8?Q?Thomas_Wei=C3=9Fschuh?= <thomas.weissschuh@xxxxxxxxxxxxx>
Cc: Theodore Ts'o <tytso@xxxxxxx>, "Jason A. Donenfeld" <Jason@xxxxxxxxx>,
Nathan Chancellor <nathan@xxxxxxxxxx>,
Nick Desaulniers <nick.desaulniers+lkml@xxxxxxxxx>,
Bill Wendling <morbo@xxxxxxxxxx>, Justin Stitt <justinstitt@xxxxxxxxxx>,
Jiaxun Yang <jiaxun.yang@xxxxxxxxxxx>, Xi Ruoyao <xry111@xxxxxxxxxxx>,
loongarch@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
llvm@xxxxxxxxxxxxxxx, stable@xxxxxxxxxxxxxxx
References: <20250603-loongarch-vdso-syscall-v1-1-6d12d6dfbdd0@xxxxxxxxxxxxx>
<CAAhV-H4Ba7DMV6AvGnvNBJ8FL_YcHjeeHYZWw2NG6JHL=X4PkQ@xxxxxxxxxxxxxx>
Content-Language: en-US
From: WANG Xuerui <kernel@xxxxxxxxxx>
In-Reply-To: <CAAhV-H4Ba7DMV6AvGnvNBJ8FL_YcHjeeHYZWw2NG6JHL=X4PkQ@xxxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 6/4/25 22:05, Huacai Chen wrote:
On Tue, Jun 3, 2025 at 7:49 PM Thomas Weißschuh
<thomas.weissschuh@xxxxxxxxxxxxx> wrote:
The syscall wrappers use the "a0" register for two different register
variables, both the first argument and the return value. The "ret"
variable is used as both input and output while the argument register is
only used as input. Clang treats the conflicting input parameters as
undefined behaviour and optimizes away the argument assignment.
The code seems to work by chance for the most part today but that may
change in the future. Specifically clock_gettime_fallback() fails with
clockids from 16 to 23, as implemented by the upcoming auxiliary clocks.
Switch the "ret" register variable to a pure output, similar to the other
architectures' vDSO code. This works in both clang and GCC.
Hmmm, at first the constraint is "=r", during the progress of
upstream, Xuerui suggested me to use "+r" instead [1].
[1] https://lore.kernel.org/linux-arch/5b14144a-9725-41db-7179-c059c41814cf@xxxxxxxxxx/
Oops, I've already completely forgotten! That said...
I didn't notice back then, that `ret` and the first parameter actually
shared the same manually allocated register, so I replied as if the two
shared one variable. If it were me to write the original code, I would
re-used `ret` for arg0 (with a comment explaining the a0 situation) so
that "+r" could be properly used there without UB.
As for the current situation -- both this patch's approach or my
alternative above are OK to me. Feel free to take either; and have my
R-b tag if you send a v2.
Reviewed-by: WANG Xuerui <git@xxxxxxxxxx>
Thanks!
--
WANG "xen0n" Xuerui
Linux/LoongArch mailing list: https://lore.kernel.org/loongarch/
Return-Path: <linux-kernel+bounces-673540-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 5B4FC41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:41:31 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 8EE073A4BBA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:41:09 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id AABCC1E1C36;
Wed, 4 Jun 2025 16:41:25 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="EIgnawx2";
dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="UQ1Fgfvm";
dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="EIgnawx2";
dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="UQ1Fgfvm"
Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id E2B521DDA0C
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:41:22 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749055284; cv=none; b=DxYKJHXJx2l6TJQkjgB/yRKO0GfHcYqaFS531shNDON9X39ouy88UnaLmYEm5xJFzkRyLdOeoRJrKiKcmDaDzO/ZB6pMxaTQJLRZCSvrnEHw0yIJb2dmX0RzdlD/I0iNS1mStW6wOlDyj0UKNr/ENcr5bHSvMdJGp1JGgTpvr6M=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749055284; c=relaxed/simple;
bh=C9rm+XJZJ0kW9eOg3VwjO1wOGy0L3PX6/Zc32yEI4LI=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=XO9JSkaKqkteiiPoqNJXgbaOs7CQfNCHpjunrFkh74Q0EEabQPq0bCaM/lLUitD2x9pbLYF4inx0d04AtJ2tT+Y6hLmL/hVXXxVIKw+EENfDn+2AtiDAQBCdKZepNN3pvY8A+zImQ9oKGVHgN5YXUgyPAxBSeP5Pa4d4ICz6udw=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=EIgnawx2; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=UQ1Fgfvm; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=EIgnawx2; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=UQ1Fgfvm; arc=none smtp.client-ip=195.135.223.131
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de
Received: from kitsune.suse.cz (unknown [10.100.12.127])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256)
(No client certificate requested)
by smtp-out2.suse.de (Postfix) with ESMTPS id 1D29D20209;
Wed, 4 Jun 2025 16:41:21 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa;
t=1749055281; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references;
bh=0egcYhcf51j/LkwCnpKG56NS3g4NQU4yYCzICMwTCgg=;
b=EIgnawx2HdMThsgyIJTmhuAupLMZsQV2hpSmN8+0vIcjkFS+sEX/wVBd/yQTM9nx5q6Cjl
mjC3YPfSJyh6BUNTSNZgBEBhKfNRGOX07PhVuc83T9ow+oINElJQ9+mwJMajWSv4F4sXdZ
x4jigFchjBMHOBMaFZqjOV3AucYoJYI=
DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de;
s=susede2_ed25519; t=1749055281;
h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references;
bh=0egcYhcf51j/LkwCnpKG56NS3g4NQU4yYCzICMwTCgg=;
b=UQ1Fgfvmbzl2TK9I3IIA/dGIvUjazWn+4niLAhZ7JSAPh/POMnL7L4Ob0ovDX27ctzdNIX
iSkkLJPVBdWXf8DA==
Authentication-Results: smtp-out2.suse.de;
none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa;
t=1749055281; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references;
bh=0egcYhcf51j/LkwCnpKG56NS3g4NQU4yYCzICMwTCgg=;
b=EIgnawx2HdMThsgyIJTmhuAupLMZsQV2hpSmN8+0vIcjkFS+sEX/wVBd/yQTM9nx5q6Cjl
mjC3YPfSJyh6BUNTSNZgBEBhKfNRGOX07PhVuc83T9ow+oINElJQ9+mwJMajWSv4F4sXdZ
x4jigFchjBMHOBMaFZqjOV3AucYoJYI=
DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de;
s=susede2_ed25519; t=1749055281;
h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc:
mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references;
bh=0egcYhcf51j/LkwCnpKG56NS3g4NQU4yYCzICMwTCgg=;
b=UQ1Fgfvmbzl2TK9I3IIA/dGIvUjazWn+4niLAhZ7JSAPh/POMnL7L4Ob0ovDX27ctzdNIX
iSkkLJPVBdWXf8DA==
Date: Wed, 4 Jun 2025 18:41:20 +0200
From: Michal =?iso-8859-1?Q?Such=E1nek?= <msuchanek@xxxxxxx>
To: Srish Srinivasan <ssrish@xxxxxxxxxxxxx>
Cc: linux-integrity@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx,
maddy@xxxxxxxxxxxxx, mpe@xxxxxxxxxxxxxx, npiggin@xxxxxxxxx,
christophe.leroy@xxxxxxxxxx, naveen@xxxxxxxxxx, ajd@xxxxxxxxxxxxx,
zohar@xxxxxxxxxxxxx, nayna@xxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
Subject: Re: [PATCH v2 2/3] powerpc/secvar: Expose secvars relevant to the
key management mode
Message-ID: <aEB3MPAYeAaFVpTc@xxxxxxxxxxxxxxx>
References: <20250521105759.8408-1-ssrish@xxxxxxxxxxxxx>
<20250521105759.8408-3-ssrish@xxxxxxxxxxxxx>
<aDATahmPIsOmiFAK@xxxxxxxxxxxxxxx>
<7dcd0f77-852b-4f4c-9842-f1d96e1d8b65@xxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <7dcd0f77-852b-4f4c-9842-f1d96e1d8b65@xxxxxxxxxxxxx>
X-Spamd-Result: default: False [-4.30 / 50.00];
BAYES_HAM(-3.00)[100.00%];
NEURAL_HAM_LONG(-1.00)[-1.000];
NEURAL_HAM_SHORT(-0.20)[-0.993];
MIME_GOOD(-0.10)[text/plain];
MIME_TRACE(0.00)[0:+];
MISSING_XM_UA(0.00)[];
RCVD_COUNT_ZERO(0.00)[0];
ARC_NA(0.00)[];
RCPT_COUNT_TWELVE(0.00)[12];
FREEMAIL_ENVRCPT(0.00)[gmail.com];
FUZZY_BLOCKED(0.00)[rspamd.com];
FREEMAIL_CC(0.00)[vger.kernel.org,lists.ozlabs.org,linux.ibm.com,ellerman.id.au,gmail.com,csgroup.eu,kernel.org];
DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519];
FROM_HAS_DN(0.00)[];
TO_MATCH_ENVRCPT_ALL(0.00)[];
FROM_EQ_ENVFROM(0.00)[];
TO_DN_SOME(0.00)[]
X-Spam-Level:
X-Spam-Score: -4.30
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Thu, May 29, 2025 at 10:39:58PM +0530, Srish Srinivasan wrote:
On 5/23/25 11:49 AM, Michal Such�k wrote:
> Hello,
>
> On Wed, May 21, 2025 at 04:27:58PM +0530, Srish Srinivasan wrote:
> > The PLPKS enabled PowerVM LPAR sysfs exposes all of the secure boot
> > secvars irrespective of the key management mode.
> >
> > The PowerVM LPAR supports static and dynamic key management for secure
> > boot. The key management option can be updated in the management
> > console. Only in the dynamic key mode can the user modify the secure
> > boot secvars db, dbx, grubdb, grubdbx, and sbat, which are exposed via
> > the sysfs interface. But the sysfs interface exposes these secvars even
> > in the static key mode. This could lead to errors when reading them or
> > writing to them in the static key mode.
> would it cause an error when reading these variables or only when
> writing them?
>
> Thanks
>
> Michal
Hi Michal,
Thanks for taking a look.
Yes, when PKS is enabled without enabling dynamic key secure boot, the
secvars
are NOT yet initialized with the default keys built into the binaries, and
therefore
reading them will result in an error.
That suggests that 'cannot be written' as said in the documentation and
commit message, which would imply readonly, is misleading. The value is
not accessible at all.
Now, while in static key management mode with PKS enabled, if one tries to
populate secvars that are relevant to dynamic key management, the write does
not fail as long as the "Platform KeyStore Signed Update Infrastructure"
flag on
the HMC is enabled and the signed updates are authorized by valid PK/KEK
keys.
Which suggests that some variables can if fact be written
However, secvars like db and grubdb populated while in static key management
mode are not used by the Partition Firmware or grub as SB_VERSION is not
present,
but are not used until the key management is switched to dynamic
i.e dynamic key secure boot has not been enabled yet. In this case, when
there is a
transition from static key management to dynamic key management, secvars
with
the signed update policy bit set will not be overwritten by the hypervisor
with the
default keys. Now, if the keys written into these secvars were not the ones
that were
used to sign the grub and kernel, it would fail to verify them.
Which is the case even for the case the system is already in dynamic key
mode, unless the variables are append-only.
Thanks
Michal
These are the reasons behind the decision to expose only those secvars that
are
relevant to the key management mode.
>
>
> > Expose only PK, trustedcadb, and moduledb in the static key mode to
> > enable loading of signed third-party kernel modules.
> >
> > Co-developed-by: Souradeep <soura@xxxxxxxxxxxxxxxxxx>
> > Signed-off-by: Souradeep <soura@xxxxxxxxxxxxxxxxxx>
> > Signed-off-by: Srish Srinivasan <ssrish@xxxxxxxxxxxxx>
> > Reviewed-by: Mimi Zohar <zohar@xxxxxxxxxxxxx>
> > Reviewed-by: Stefan Berger <stefanb@xxxxxxxxxxxxx>
> > Reviewed-by: Nayna Jain <nayna@xxxxxxxxxxxxx>
> > Reviewed-by: Andrew Donnellan <ajd@xxxxxxxxxxxxx>
> > ---
> > Documentation/ABI/testing/sysfs-secvar | 6 ++++
> > arch/powerpc/platforms/pseries/plpks-secvar.c | 28 ++++++++++++++++---
> > 2 files changed, 30 insertions(+), 4 deletions(-)
> >
> > diff --git a/Documentation/ABI/testing/sysfs-secvar b/Documentation/ABI/testing/sysfs-secvar
> > index 45281888e520..948df3446a03 100644
> > --- a/Documentation/ABI/testing/sysfs-secvar
> > +++ b/Documentation/ABI/testing/sysfs-secvar
> > @@ -37,6 +37,12 @@ Description: Each secure variable is represented as a directory named as
> > representation. The data and size can be determined by reading
> > their respective attribute files.
> > + Only secvars relevant to the key management mode are exposed.
> > + Only in the dynamic key mode can the user modify the secure boot
> > + secvars db, dbx, grubdb, grubdbx, and sbat. PK, trustedcadb and
> > + moduledb are the secvars common to both static and dynamic key
> > + management modes.
> > +
> > What: /sys/firmware/secvar/vars/<variable_name>/size
> > Date: August 2019
> > Contact: Nayna Jain <nayna@xxxxxxxxxxxxx>
> > diff --git a/arch/powerpc/platforms/pseries/plpks-secvar.c b/arch/powerpc/platforms/pseries/plpks-secvar.c
> > index 767e5e8c6990..f9e9cc40c9d0 100644
> > --- a/arch/powerpc/platforms/pseries/plpks-secvar.c
> > +++ b/arch/powerpc/platforms/pseries/plpks-secvar.c
> > @@ -59,7 +59,14 @@ static u32 get_policy(const char *name)
> > return PLPKS_SIGNEDUPDATE;
> > }
> > -static const char * const plpks_var_names[] = {
> > +static const char * const plpks_var_names_static[] = {
> > + "PK",
> > + "moduledb",
> > + "trustedcadb",
> > + NULL,
> > +};
> > +
> > +static const char * const plpks_var_names_dynamic[] = {
> > "PK",
> > "KEK",
> > "db",
> > @@ -213,21 +220,34 @@ static int plpks_max_size(u64 *max_size)
> > return 0;
> > }
> > +static const struct secvar_operations plpks_secvar_ops_static = {
> > + .get = plpks_get_variable,
> > + .set = plpks_set_variable,
> > + .format = plpks_secvar_format,
> > + .max_size = plpks_max_size,
> > + .config_attrs = config_attrs,
> > + .var_names = plpks_var_names_static,
> > +};
> > -static const struct secvar_operations plpks_secvar_ops = {
> > +static const struct secvar_operations plpks_secvar_ops_dynamic = {
> > .get = plpks_get_variable,
> > .set = plpks_set_variable,
> > .format = plpks_secvar_format,
> > .max_size = plpks_max_size,
> > .config_attrs = config_attrs,
> > - .var_names = plpks_var_names,
> > + .var_names = plpks_var_names_dynamic,
> > };
> > static int plpks_secvar_init(void)
> > {
> > + u8 mode;
> > +
> > if (!plpks_is_available())
> > return -ENODEV;
> > - return set_secvar_ops(&plpks_secvar_ops);
> > + mode = plpks_get_sb_keymgmt_mode();
> > + if (mode)
> > + return set_secvar_ops(&plpks_secvar_ops_dynamic);
> > + return set_secvar_ops(&plpks_secvar_ops_static);
> > }
> > machine_device_initcall(pseries, plpks_secvar_init);
> > --
> > 2.47.1
> >
> >
Return-Path: <linux-kernel+bounces-673541-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 1847341E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:42:25 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 6100416469A
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:42:26 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 02AB11DFE12;
Wed, 4 Jun 2025 16:42:20 +0000 (UTC)
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 906191DB546
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:42:18 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749055339; cv=none; b=NoqzELU7ChKHWBKc4Ii7+yWXHCDEIYhmXu/F8Zv1lijczxHZMylj/JYxTm/MmDrig1CXkkCmpHWVzDaD3D1FwX43We/n0Gz/X6e5ywhd3TEpzAWwb/SD3xPRqtATkZ+7PudrDYTIltTtqyd35HMVlO9GpiRubCLBkHRWmI0iUBU=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749055339; c=relaxed/simple;
bh=6oDaVMR5T7a4UGEhgBoYgoqpmln5pkjysQIFT94z3lA=;
h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References:
MIME-Version:Content-Type; b=E96Wj2rVHtw+T+7nqlMNvQrYlroFwaBSKCzmOH+rtTVifWEMCwC1LZyVrW+BL62Ym83OhwoOSaOHJgnOK+xFLuzZ26vXyhoPAdZKqJNicoLsl58pGUFcmfBkzeMjCs9i+c6RT7IQkD4Bb5eCHdJG3Lp2hREtKSOIK3z5SoCAEeU=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id 396C3C4CEE4;
Wed, 4 Jun 2025 16:42:16 +0000 (UTC)
Date: Wed, 4 Jun 2025 12:43:32 -0400
From: Steven Rostedt <rostedt@xxxxxxxxxxx>
To: Hugh Dickins <hughd@xxxxxxxxxx>
Cc: Thomas =?UTF-8?B?SGVsbHN0csO2bQ==?= <thomas.hellstrom@xxxxxxxxxxxxxxx>,
LKML <linux-kernel@xxxxxxxxxxxxxxx>, Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx>, Matthew Wilcox <willy@xxxxxxxxxxxxx>,
linux-mm@xxxxxxxxx, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Christian
Koenig <christian.koenig@xxxxxxx>, Huang Rui <ray.huang@xxxxxxx>, Matthew
Auld <matthew.auld@xxxxxxxxx>, Matthew Brost <matthew.brost@xxxxxxxxx>,
dri-devel@xxxxxxxxxxxxxxxxxxxxx, Maarten Lankhorst
<maarten.lankhorst@xxxxxxxxxxxxxxx>, Maxime Ripard <mripard@xxxxxxxxxx>,
Thomas Zimmermann <tzimmermann@xxxxxxx>, David Airlie <airlied@xxxxxxxxx>,
Simona Vetter <simona@xxxxxxxx>
Subject: Re: [PATCH v2] drm/ttm: Fix compile error when CONFIG_SHMEM is not
set
Message-ID: <20250604124332.5291e30d@xxxxxxxxxxxxxxxxxx>
In-Reply-To: <20250604123837.0603354d@xxxxxxxxxxxxxxxxxx>
References: <20250604085121.324be8c1@xxxxxxxxxxxxxxxxxx>
<6b3a37712330ec4b17968075f71296717db54046.camel@xxxxxxxxxxxxxxx>
<d996ffad-42f1-1643-e44e-e837b2e3949d@xxxxxxxxxx>
<20250604123837.0603354d@xxxxxxxxxxxxxxxxxx>
X-Mailer: Claws Mail 3.20.0git84 (GTK+ 2.24.33; x86_64-pc-linux-gnu)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, 4 Jun 2025 12:38:37 -0400
Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
On Wed, 4 Jun 2025 09:26:21 -0700 (PDT)
Hugh Dickins <hughd@xxxxxxxxxx> wrote:
=20
> > Reviewed-by: Thomas Hellstr=C3=B6m <thomas.hellstrom@xxxxxxxxxxxxxxx>=
=20
>=20
> Acked-by: Hugh Dickins <hughd@xxxxxxxxxx> =20
=20
Thanks Thomas and Hugh,
=20
Now the question is, who's gonna take it? ;-)
Never mind, I see Linus took it.
-- Steve
Return-Path: <linux-kernel+bounces-673542-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id C370B41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:44:06 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 26EB91897941
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:44:20 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id CC6D31E1E1E;
Wed, 4 Jun 2025 16:44:00 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="b0Yvpkl0"
Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id E852C1DE3DB
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:43:57 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=192.198.163.11
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749055439; cv=fail; b=BtKg/xg/6RW0uqTjrYEUkpENIjdHbOk9j3J/yL4AEEQZQ7bWW3dwb1PRiyXY1eZrWf9vTmRaQ5fKnL9hojhHYuix7WVHQniqvAXbq+AzRxAtZghqniejrknGQOCAGvJpd7g639E9g+0G+w/9HZ9aHI/megp22hKNeg0EskWxzyA=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749055439; c=relaxed/simple;
bh=cA7KT+Ue7OBxEMDCxj2q02T7iPkdHm/j5m9Sbyq+7q4=;
h=Date:From:To:CC:Subject:Message-ID:References:Content-Type:
Content-Disposition:In-Reply-To:MIME-Version; b=bwqZkjUBgHmm/h6OmBI74c9GTRVSKSD981r7vv7GZ5A5CXe4j0mAh4b2LeqIqFdz6+UvA0CBcu3X3Q0PNElcS4IHDqLEcNxh7RUZ6ufoZprx9SKmmgQCnj7+EbC2He9obr50Dy/fIxNNzb2/KcQpKkrcN+jxR3cYvVFv88tkpjw=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=b0Yvpkl0; arc=fail smtp.client-ip=192.198.163.11
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
t=1749055438; x=1780591438;
h=date:from:to:cc:subject:message-id:references:
content-transfer-encoding:in-reply-to:mime-version;
bh=cA7KT+Ue7OBxEMDCxj2q02T7iPkdHm/j5m9Sbyq+7q4=;
b=b0Yvpkl02bVc/Gl0OFkluqsStJF/5KpeBvEGaQ7iKdt0XN7yzD4IpTAv
v2xYIsm12z4jTSCWkNb7fx0N8rpE2xetSZmLHkEief8btSpxVTuNneDSM
kCaOY2PqoQEpodeNPx8P1Z/6Lizf8Eg3G8zXssKN34mRUO8JaELn3QXFe
fyCF0ZJrS7dSDD2Yz40Bn4ernJGjIBZ2c4Z0EbfO/KAPuZUKwWkqFpagC
c69qTaLHKZu3WDSzjdZAPf8hjRSPaFNAvMfoudbMo2VzZqiSlOJ45/8D+
9hTSnJgzT2imTztaXgsPVoLU8YVXvegNjgjqIM8Qh5ZUuDCg79cAT53t8
Q==;
X-CSE-ConnectionGUID: kAE38NdWTVe7OFSnaU5ndw==
X-CSE-MsgGUID: r3nF5koSTruULfqFoGXvcg==
X-IronPort-AV: E=McAfee;i="6800,10657,11454"; a="61769217"
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="61769217"
Received: from orviesa002.jf.intel.com ([10.64.159.142])
by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 09:43:51 -0700
X-CSE-ConnectionGUID: cdSPxojrQMOoZ0r4FZmiWg==
X-CSE-MsgGUID: LyC7H82RTU2Ju/m7fX4K8A==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="176205759"
Received: from orsmsx903.amr.corp.intel.com ([10.22.229.25])
by orviesa002.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 09:43:50 -0700
Received: from ORSMSX901.amr.corp.intel.com (10.22.229.23) by
ORSMSX903.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.2.1544.25; Wed, 4 Jun 2025 09:43:50 -0700
Received: from ORSEDG901.ED.cps.intel.com (10.7.248.11) by
ORSMSX901.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.2.1544.25 via Frontend Transport; Wed, 4 Jun 2025 09:43:50 -0700
Received: from NAM12-DM6-obe.outbound.protection.outlook.com (40.107.243.66)
by edgegateway.intel.com (134.134.137.111) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.2.1544.25; Wed, 4 Jun 2025 09:43:49 -0700
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=CwCA9eXCRM9qhTPJ16zr9P/IvycnCWn8tb//+JoyH7w00fPH8Kep4IRWxF8g5iuLGfbJfdpxNigiCwhjMj5k9BbhtxQFonxTRSrWr/l3fzqh+5HnoHAfYD7MrZpRGtgdIiaedYB3WFXzll/1oht8moE7dZD1s1EmEbxdaxsznGw8uW9t66uQUFu87UjxfUFCvwdPf6DbRTXIkKpB1nYdJMt45iOaas3cM4jw7hJDYNQ1hnU2Wd2WiHidUtoZ0EfMQqoXKumiQFpyyHKl/bfgxOC4x7pRyzjbaB905OnxGCq63j6pHB8JNoKXfrpyzSAkTHyRHaBqFdNVR/tW+JKZmA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=wCLfVeNDCWU4jdng1w6nMkiPfAYyzkg/2DRxpnhQOc4=;
b=pSffTo9a0+yT0ZpEL9aR8U3Ut03MHlZw7/L2x7BO+/YHFGCMc6cpLrGDUsxkAtrzk1/ZyeRNFGWltisMFNgk7m7V1jW0oqQa290xA9Q8rStMdJMC7BYeleB1mQBcfFfQwLVkgNhcmTmVn2JPfUgV5dHxnQ4S2iUlfvkHv4N/e9Q1H7zQEV0EKyNUWSpdP0gvZ+zpzEgawlimrbwhHDCLI3p/s1DVePHCMGzKAUXe32CLO45T+ocMg5ZBm4LT0eEbHfomJpKRsAz/d/vybv/erNJ8a7BsJdUwiPJVIYcHXQ4rZ+SYskXJ+EB9IKHN89Gz3eMm713xD85qyQwikBaxlQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com;
dkim=pass header.d=intel.com; arc=none
Authentication-Results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=intel.com;
Received: from PH7PR11MB6522.namprd11.prod.outlook.com (2603:10b6:510:212::12)
by SA1PR11MB8326.namprd11.prod.outlook.com (2603:10b6:806:379::19) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8769.37; Wed, 4 Jun
2025 16:43:28 +0000
Received: from PH7PR11MB6522.namprd11.prod.outlook.com
([fe80::9e94:e21f:e11a:332]) by PH7PR11MB6522.namprd11.prod.outlook.com
([fe80::9e94:e21f:e11a:332%5]) with mapi id 15.20.8769.029; Wed, 4 Jun 2025
16:43:28 +0000
Date: Wed, 4 Jun 2025 09:45:00 -0700
From: Matthew Brost <matthew.brost@xxxxxxxxx>
To: Simona Vetter <simona.vetter@xxxxxxxx>
CC: Christian =?iso-8859-1?Q?K=F6nig?= <christian.koenig@xxxxxxx>, "Philipp
Stanner" <phasta@xxxxxxxxxx>, Danilo Krummrich <dakr@xxxxxxxxxx>, David
Airlie <airlied@xxxxxxxxx>, Simona Vetter <simona@xxxxxxxx>,
<dri-devel@xxxxxxxxxxxxxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>
Subject: Re: [PATCH] drm/sched: Discourage usage of separate workqueues
Message-ID: <aEB4DFFE2C7gElRL@xxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20250604081657.124453-2-phasta@xxxxxxxxxx>
<7a09c357-2d28-4dd6-b637-4387cc430938@xxxxxxx>
<aEBhIzccXBPyt_58@phenom.ffwll.local>
Content-Type: text/plain; charset="iso-8859-1"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <aEBhIzccXBPyt_58@phenom.ffwll.local>
X-ClientProxiedBy: BYAPR05CA0031.namprd05.prod.outlook.com
(2603:10b6:a03:c0::44) To PH7PR11MB6522.namprd11.prod.outlook.com
(2603:10b6:510:212::12)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: PH7PR11MB6522:EE_|SA1PR11MB8326:EE_
X-MS-Office365-Filtering-Correlation-Id: 34b9202d-44a4-4a04-be40-08dda386ee87
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016;
X-Microsoft-Antispam-Message-Info: =?iso-8859-1?Q?aXByBqqyISLcGrGetO2QKjf+Bs0zv7YkBBQgADxDiqDj34FsINCuhGe1R1?=
=?iso-8859-1?Q?Yi/coLanqtvvFMsI1wpYNvZ1YXlrnKBxI8onmnFrpZAR1FGTqlW9gauUlX?=
=?iso-8859-1?Q?zIFT+LfRzIdRTiEGdrg4tWR7br98KylW5fozuEgSaD1/vQKwsXo7MG1b35?=
=?iso-8859-1?Q?WSFNt0zviotVmL0aUjU6790ZQ1U+Gb9T4Iw7KNjTvkR7D0e9FAhP3xSIKZ?=
=?iso-8859-1?Q?Kec95tWq1yGtsa9fsDkPbzmwEVsVTiltOC2zNKucgLPUbrZWJk8qsUZ0K2?=
=?iso-8859-1?Q?7zeZvma1i3uYUlqCVqovLPeuFvnmccwdF5Z5Y+2tnzLOR8D8VpjWuSF7tu?=
=?iso-8859-1?Q?P6/5JIlSwQVEpPRXCJfN8zfqKPX6bL5n7AS2o+IKd4zqGZd0/ANt96kt52?=
=?iso-8859-1?Q?/hbJNWfjNCjyocM5kpXeYRAtS+xdKebS2p+taTowINLU8AFSWq4doY3LLA?=
=?iso-8859-1?Q?vJb/nPEsKGe1D/VSx8rzUAIFrEXDAaFnp10W/AVmXOtRtxEglJrHft46lC?=
=?iso-8859-1?Q?cYxgSJDYvVmAANsZAmkPVmlC+btUINmF9XrL6xQs5OOQKMfHlhIv5HLPye?=
=?iso-8859-1?Q?KsRUN+7gSHTwAeB8x9Ua6ijt1BvCBdSgzIZr+IlmiHOlL20R5l8keJD4hX?=
=?iso-8859-1?Q?+X1i+sx51Ot6Y71VoKWgtUCHGDlWhGATVp/8rkdSdaeYs1/52Thk+n7yjP?=
=?iso-8859-1?Q?xUPjLTSbQIlQYVB9AldLtGcyDbeIoUXVIx+VlabAm9bxWeqpynpauC6LXt?=
=?iso-8859-1?Q?/MEXrVXCEyLpcCVotLvPxx83i658+RB1peO41tJuSF8Ku+hjP8G+RdqZZQ?=
=?iso-8859-1?Q?BqLLMYYA0lIpwZOlSEpsqUM85R0Vc3+hd/g7ekGZuiAdz6iLxECe5MBIwj?=
=?iso-8859-1?Q?jjWo8mZ3HY+ynwrzEIIDVdE/J24UM9+IilZTi2k38zWhZmuPi1ww7K1q9A?=
=?iso-8859-1?Q?5GrB0UxVxTzXGuigV+3Rf1d6YKNpObw7L1Q+g22WX1kv2odJzCqJ3qAdC7?=
=?iso-8859-1?Q?CryC2I5cEhrHJMx5YiH46QXpnEKYX2xEZIBXlZoy9xJ43/Oj/4QOFBf+Zp?=
=?iso-8859-1?Q?PiYGjL3xaT2RpsAj2RfBoNd2vpUVrSHdsCftsuPbjslDsV4sgxWDueFz3t?=
=?iso-8859-1?Q?3fizZcwTS2Hws5dBJxfyjVGyM4kXpjd7mkYL/Q9fhp9Hhg3X2UindeR5ix?=
=?iso-8859-1?Q?PvDRH60zZvwPipqTLwL3Atm9rSqFoK87BRgJFo7niwPMkBQYgRjzo21RBr?=
=?iso-8859-1?Q?I+PMnRTP8Yr9zoL+dJmvknSTrinTu3cP9OFAt72khQKng4gEuaL5Q9Mc7z?=
=?iso-8859-1?Q?FTgs7fkYbwFwiZczJjJtQgipyBjTt2y3/2X+JF1FvNmQt2vVT7IqvB59cM?=
=?iso-8859-1?Q?3On/1fVTx0gXbv6EZhk4a7Qra7/9d+wm9lrhWIgVHHx8UI6f+191E=3D?=
X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH7PR11MB6522.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(1800799024)(366016);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-1?Q?bGQFW+0RfVyLnrVmI9nwvlcFL3MJYp7zzrNkkQRHj4JqX42+qtWQi8L52F?=
=?iso-8859-1?Q?dRjXE5Tsmitd8c7JT1YVnsW9jOrBMHQdDfB64zx/7UcrdGGrBpY2wclmQM?=
=?iso-8859-1?Q?QTiMThUL/M06cH0SsD7cmTnMzAIco8qao6+dawPPEiYrlc8nV4mcYtNnJI?=
=?iso-8859-1?Q?KG7d/JtDfaGpmMqQdOPryZ7peFK/S7vYHvt2x9lHR8iTvVNGM92hH8NKo7?=
=?iso-8859-1?Q?8oVutpxr3f1N6us0VJ0TIziDUY7gizZqCcf574ahfILq4atOSw9dZyq+v/?=
=?iso-8859-1?Q?kyrT36SdTARXTJY8qLanQsTbtLYMIzVoR6NyT01qdupBumDM/s8MOsPtbI?=
=?iso-8859-1?Q?0DF6t+44+V2g+hgYTqFnO9+ZrAsTnPqo+MqfCaSm7EcDzLYEFUdPN/+192?=
=?iso-8859-1?Q?FZntkZlP5/T65yVU9u77rAIwgsz41zG/ktgTlEedK5jNfhvfMv+xN5kH2W?=
=?iso-8859-1?Q?9E4qe5Fi5Y26Zk1OM61sCvgUDzIgXEvvERTKTF3JmREyiRdGcTlF8WIFnf?=
=?iso-8859-1?Q?vzMc/ybxyS0V/ecNZlpSvSesN630ieV/wzli/Xdt+EkHYCpH1+t6eZIQq2?=
=?iso-8859-1?Q?SyaOtuDkLRSqPWCr4l3KylVPCauYfxG5og7IQ8opKikRpoIEsvY7xBlh8O?=
=?iso-8859-1?Q?8umjWVf2iKD79q44OChC2A4ht5w6CVKwpaj3V/IrenpfbaUj2KDCbybd3s?=
=?iso-8859-1?Q?35PQzJTgbInMLGR+BmpZHXwB8OL/enzL3MHq3TLvaE8hK7Lct3zU+j5tm3?=
=?iso-8859-1?Q?E8VkKiBMCbK6fu0t3P9v2+nG0WiUAZeuG35zfHoJ/ZKkxMJH9CdrpHQoU+?=
=?iso-8859-1?Q?lLvAxTU4ly723w5nBAEL/UrQQ+U21WRW9bDtz11AaanHbcproeo+xDnWIF?=
=?iso-8859-1?Q?3kzBjY57wQI4fjOzDoiwiL5ApnlY73g1Ce0cgRnPAGFnvGaqVKQbJhS3N3?=
=?iso-8859-1?Q?Ta2zkqkhCJWLVm5DJecybwFM0YkdwgBaxUcxXvXTFC68KIpNKvwaUA3k2a?=
=?iso-8859-1?Q?8EHIj/61VWDcB/glN9vrpVJ6KDcUgZH52L895FXYY4YykNj6liPWPbsRdt?=
=?iso-8859-1?Q?CJA2iKF7MZYtsRzHuUkBv9Xyko5+SyVpPXIYmv+ePnSkL8uY08BLPFcETc?=
=?iso-8859-1?Q?JbmtnYHwHutmVDqdMzaWgQoULVPng+czTcB5TE8iUrpULyRtk591xz0DHC?=
=?iso-8859-1?Q?vhJyUC90LLMSJGUdOa6n9enEnvni+iORQo49eWyXtk1MJEYKgwRVyQcEfO?=
=?iso-8859-1?Q?XRGMCAgspEgnlBPRcOt7Y3y9IwxYdIndDoUEhmap2aClpHcUtxyNw9siu3?=
=?iso-8859-1?Q?Dm3D3gbaBJGpNEXIQDo/WdUlvPiDdd4XBv/7iL1x9+PktkVzOE/uCMw7XI?=
=?iso-8859-1?Q?0JqY4djI5TPGovG+CO/qI13g6Q0RFwoBTD4M8lncl7YWLDCXw5DxtN1CIx?=
=?iso-8859-1?Q?V3y7z8FpwSXDBjY1IYnKl+B7ns+g5HYFi+SvYRvXzt/mxL3ND6lUgAkoiu?=
=?iso-8859-1?Q?EFR+Oxvx82tfJOvVyb/B/43zOPTGXykz7xa39dPdYmKhjE1kKpSiYZwcPh?=
=?iso-8859-1?Q?cglzFXr/KyzOoV573pPC9eNoIexR7W1vkv0JAldVOaIDePtg8GZ9BEjWWO?=
=?iso-8859-1?Q?ayRGbLDHssTqKJ3+PvrVo/cv6Jvbrsx5s0CwXypqyz8wnN7QBJoMBhRA?=
=?iso-8859-1?Q?=3D=3D?=
X-MS-Exchange-CrossTenant-Network-Message-Id: 34b9202d-44a4-4a04-be40-08dda386ee87
X-MS-Exchange-CrossTenant-AuthSource: PH7PR11MB6522.namprd11.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 16:43:28.2380
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: Q829CvP3XxxgW1a5ZwvIEkbpgwziS67nt81AHFR7QkxuPV5gwnLpRVdxE3AHAR6NzBzKrS0vNkhn29jMQFCOZQ==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR11MB8326
X-OriginatorOrg: intel.com
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 05:07:15PM +0200, Simona Vetter wrote:
On Wed, Jun 04, 2025 at 11:41:25AM +0200, Christian K� wrote:
> On 6/4/25 10:16, Philipp Stanner wrote:
> > struct drm_sched_init_args provides the possibility of letting the
> > scheduler use user-controlled workqueues, instead of the scheduler
> > creating its own workqueues. It's currently not documented who would
> > want to use that.
> >
> > Not sharing the submit_wq between driver and scheduler has the advantage
> > of no negative intereference between them being able to occur (e.g.,
> > MMU notifier callbacks waiting for fences to get signaled). A separate
> > timeout_wq should rarely be necessary, since using the system_wq could,
> > in the worst case, delay a timeout.
> >
> > Discourage the usage of own workqueues in the documentation.
> >
> > Suggested-by: Danilo Krummrich <dakr@xxxxxxxxxx>
> > Signed-off-by: Philipp Stanner <phasta@xxxxxxxxxx>
> > ---
> > include/drm/gpu_scheduler.h | 7 +++++--
> > 1 file changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/include/drm/gpu_scheduler.h b/include/drm/gpu_scheduler.h
> > index 81dcbfc8c223..11740d745223 100644
> > --- a/include/drm/gpu_scheduler.h
> > +++ b/include/drm/gpu_scheduler.h
> > @@ -590,14 +590,17 @@ struct drm_gpu_scheduler {
> > *
> > * @ops: backend operations provided by the driver
> > * @submit_wq: workqueue to use for submission. If NULL, an ordered wq is
> > - * allocated and used.
> > + * allocated and used. It is recommended to pass NULL unless there
> > + * is a good reason not to.
>
> Yeah, that's probably a good idea. I'm not sure why xe and nouveau actually wanted that.
At one point before workqueues could share a lockdep map we had to pass
in a workqueue to not run out of lockdep keys. That restriction is now
gone, so Xe passes in NULL.
Part of reasoning also was there was an interface to pass in the TDR
workqueue, so added one for the submit workqueue.
Xe does have an upcoming use for this though. We have a mode where
multiple queues share FW resources so interaction with the FW between
multiple queues needs to exclusive so we use a single submit workqueue
for queues sharing FW resources to avoid using locks in scheduler ops.
queues == GPU scheduler / entry in this context.
The idea of this trick is that you have a fw scheduler which only has one
queue, and a bunch of other things in your driver that also need to be
stuffed into this fw queue (or handled by talking with the fw through
these ringbuffers).
If you use one single-threaded wq for everything then you don't need
additional locking anymore, and a lot of things become easier.
Yes, this how Xe avoid locks in all scheduler ops. Same in upcoming use
case above - multiple queues uses the same single-threaded wq.
We should definitely document this trick better though, I didn't find any
place where that was documented.
This is a good idea.
Maybe a new overview section about "how to concurrency with drm/sched"?
That's also a good place to better highlight the existing documentation
for the 2nd part here.
> > * @num_rqs: Number of run-queues. This may be at most DRM_SCHED_PRIORITY_COUNT,
> > * as there's usually one run-queue per priority, but may be less.
> > * @credit_limit: the number of credits this scheduler can hold from all jobs
> > * @hang_limit: number of times to allow a job to hang before dropping it.
> > * This mechanism is DEPRECATED. Set it to 0.
> > * @timeout: timeout value in jiffies for submitted jobs.
> > - * @timeout_wq: workqueue to use for timeout work. If NULL, the system_wq is used.
> > + * @timeout_wq: workqueue to use for timeout work. If NULL, the system_wq is
> > + * used. It is recommended to pass NULL unless there is a good
> > + * reason not to.
>
> Well, that's a rather bad idea.
>
Yea, I've found using system workqueues in driver code usually creates
problems. In Xe, we pass in a single ordered workqueue shared among all
queues for the TDR. GT (device) resets are also run on this ordered
workqueue too to avoid jobs timing out in parallel. I think most drivers
would benefit from this type of design.
Matt
> Using a the same single threaded work queue for the timeout of multiple
> schedulers instances has the major advantage of being able to handle
> their occurrence sequentially.
>
> In other words multiple schedulers post their timeout work items on the
> same queue, the first one to run resets the specific HW block in
> question and cancels all timeouts and work items from other schedulers
> which use the same HW block.
>
> It was Sima, I and a few other people who came up with this approach
> because both amdgpu and IIRC panthor implemented that in their own
> specific way, and as usual got it wrong.
>
> If I'm not completely mistaken this approach is now used by amdgpu,
> panthor, xe and imagination and has proven to be rather flexible and
> reliable. It just looks like we never documented that you should do it
> this way.
It is documented, just not here. See the note in
drm_sched_backend_ops.timedout_job at the very bottom.
We should definitely have a lot more cross-links between the various
pieces of this puzzle though, that's for sure :-)
Cheers, Sima
>
> Regards,
> Christian.
>
> > * @score: score atomic shared with other schedulers. May be NULL.
> > * @name: name (typically the driver's name). Used for debugging
> > * @dev: associated device. Used for debugging
>
--
Simona Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
Return-Path: <linux-kernel+bounces-673543-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 3EC7D41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:44:10 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 682E13A2FED
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:43:48 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 351E21E51EA;
Wed, 4 Jun 2025 16:44:02 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="SGQZeTkV"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 615E71DED51
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:43:58 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749055441; cv=none; b=ocigoq6PcquUHzQ03wgqIOhxWI5EhBxxHuGX7dvt3Swg5E5M8nNqSSeDC1IA8NA5dXDb2bjiq++77FmIN2pmQUT8bO6SZOcB5kPBzMikQyRmmb/qE6+rxyXIdVYxy3I3ATyB3QZsiA/6mvif6qiRuYjXdmZgGx9g5+hccKV8FKI=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749055441; c=relaxed/simple;
bh=D+aWTJlBR5Z1dDFyEuWrqwhKgcw6YgC3O9B89j9DBdM=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=Hw4Nkh/PepavTMEoQtrmjpElSSRXM9sUNFJjgY8Gw9Q65XrwlkauKJEhjJYU/doyI7z2eLBh3qiSyIiy9IcHshJT+WxxrKvofl7XgnxMPZmeZZpwrIkwuUJsw1ZkvaYGo5sk7LU+g6UmR2rRlm5RNJpf+2KOS0C/REUCW7yfQBM=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=SGQZeTkV; arc=none smtp.client-ip=170.10.129.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749055438;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=5uX+RcrMuYZZlT9e7PZl8kq+9gKjyZrSElVvecqGEe0=;
b=SGQZeTkVwub0G4YYLmmpJB0qeXFJbYrjgzLGZDJUFGvxK6hoAG0hS7NEkqmJVFAkW18Cvx
vVyRuDS/o+nxITyjlo3dChtoG+yOIV2ntsaPuMBvdgbcl1jERCkGR96vZLTUUw7RFtZPnZ
YMPvckPrEY3a798DKC1aNrJ4bSmaRsA=
Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com
[209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-533-Zp-K8omzMw-dD0I6nzLn2g-1; Wed, 04 Jun 2025 12:43:57 -0400
X-MC-Unique: Zp-K8omzMw-dD0I6nzLn2g-1
X-Mimecast-MFC-AGG-ID: Zp-K8omzMw-dD0I6nzLn2g_1749055436
Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-3a5232c6ae8so7587f8f.3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 09:43:56 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749055434; x=1749660234;
h=content-transfer-encoding:in-reply-to:autocrypt:content-language
:from:references:cc:to:subject:user-agent:mime-version:date
:message-id:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=5uX+RcrMuYZZlT9e7PZl8kq+9gKjyZrSElVvecqGEe0=;
b=A5HC75Bp8MnF2z0W9O0eFBGPOZ8G0V5Ihf+UvSyQKgWKdBBwyMSAG1VM0VuH5kj3Nz
cmm9iUUTqrHKA/gdpkQob+tDW8HMzF9HeX5dEFtOMymO8vOfndOANnOAaJtiyssxR5+s
RONRsZ++QFpaknrGfu/YlQnSDkN6NOCDybuhFoq3UekOUue4M73so6MHiFZAeYnz4bmM
uG7kqy0NMTn7GxDKIrQz8q5yC4OPxLg1kRpZeVW4JM/15QZWjGZpM7o9EC93i81ccPNC
d4hD7hXS+J67zP68r8M5CMHG+UUUCv6jiXvwOUAaCzZQ7FzQ32s3aVvfUe2Uiu5HmFMH
gULw==
X-Forwarded-Encrypted: i=1; AJvYcCXHokJ3S6BVLlg+2HhYClyUO1oKZaG8s0OwTbQUftyZ4yHG/MrvYQcdGPX7O7gaHw31xPZLKjZ7FeR7deY=@vger.kernel.org
X-Gm-Message-State: AOJu0YwNbrotbxX/3fHvy/bjlybF2Kk4Dy8JUd+kV9G7PwKT25EoEKRe
b89KbDL9AGiGaisgB7RsdqnNfSAhYWLVgUnizXpWx4ln46V2aaySeTyxkLRIESmTTkpLcmbXY32
WeEp9eNnUFvaLfIUq4XFAc/1hTN86y9H3IIpF6tuts4NXBH19rvwwipFW8dH6KFkEmg==
X-Gm-Gg: ASbGncv3vC9/0FurDZya0xcA8eCp+Hti2LXdKAK1f0NlyrKX61n75cGT+IiYPc+AAWF
31+VYfxmmF9QitovviWf0R2lncJsXxfAjGnoJCyp7hSLTPeVEP02uSEezn7RPKU3zcDYjpE9m74
2bRIrdJQwSi3FoPCePEuXuef3zYXe/WqwvtLa5aYiJIa0iWiGLJsLYmOtjyjY6CNmiVqeSzHDXf
uXBCeinzvM/UgCWyU6TP62rSHj/ERZhDMjSLg4n8DsK5vYTM8inG6KbzzFTcqXnWajLHfUukUap
WU6a8P5G4xe9KW3GbCFWIiYC
X-Received: by 2002:a05:6000:400d:b0:3a4:db94:2cfc with SMTP id ffacd0b85a97d-3a51d97b8c9mr3072855f8f.43.1749055433848;
Wed, 04 Jun 2025 09:43:53 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IGCntt0U7ekMD/3TwxfttPyNya1EiPp8j8ZDG5E1tlDGzx3/ONAjY/WPQcKTOr2WSgewAeoZQ==
X-Received: by 2002:a05:6000:400d:b0:3a4:db94:2cfc with SMTP id ffacd0b85a97d-3a51d97b8c9mr3072830f8f.43.1749055433447;
Wed, 04 Jun 2025 09:43:53 -0700 (PDT)
Received: from [192.168.10.81] ([151.49.64.79])
by smtp.googlemail.com with ESMTPSA id ffacd0b85a97d-3a4f009748fsm21929578f8f.80.2025.06.04.09.43.52
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 09:43:52 -0700 (PDT)
Message-ID: <e84bd556-38db-49eb-9ea1-f30ea84f2d3a@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 18:43:51 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH 05/15] KVM: x86: Fold kvm_setup_default_irq_routing() into
kvm_ioapic_init()
To: Sean Christopherson <seanjc@xxxxxxxxxx>,
Vitaly Kuznetsov <vkuznets@xxxxxxxxxx>
Cc: kvm@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
References: <20250519232808.2745331-1-seanjc@xxxxxxxxxx>
<20250519232808.2745331-6-seanjc@xxxxxxxxxx>
From: Paolo Bonzini <pbonzini@xxxxxxxxxx>
Content-Language: en-US
Autocrypt: addr=pbonzini@xxxxxxxxxx; keydata=
xsEhBFRCcBIBDqDGsz4K0zZun3jh+U6Z9wNGLKQ0kSFyjN38gMqU1SfP+TUNQepFHb/Gc0E2
CxXPkIBTvYY+ZPkoTh5xF9oS1jqI8iRLzouzF8yXs3QjQIZ2SfuCxSVwlV65jotcjD2FTN04
hVopm9llFijNZpVIOGUTqzM4U55sdsCcZUluWM6x4HSOdw5F5Utxfp1wOjD/v92Lrax0hjiX
DResHSt48q+8FrZzY+AUbkUS+Jm34qjswdrgsC5uxeVcLkBgWLmov2kMaMROT0YmFY6A3m1S
P/kXmHDXxhe23gKb3dgwxUTpENDBGcfEzrzilWueOeUWiOcWuFOed/C3SyijBx3Av/lbCsHU
Vx6pMycNTdzU1BuAroB+Y3mNEuW56Yd44jlInzG2UOwt9XjjdKkJZ1g0P9dwptwLEgTEd3Fo
UdhAQyRXGYO8oROiuh+RZ1lXp6AQ4ZjoyH8WLfTLf5g1EKCTc4C1sy1vQSdzIRu3rBIjAvnC
tGZADei1IExLqB3uzXKzZ1BZ+Z8hnt2og9hb7H0y8diYfEk2w3R7wEr+Ehk5NQsT2MPI2QBd
wEv1/Aj1DgUHZAHzG1QN9S8wNWQ6K9DqHZTBnI1hUlkp22zCSHK/6FwUCuYp1zcAEQEAAc0j
UGFvbG8gQm9uemluaSA8cGJvbnppbmlAcmVkaGF0LmNvbT7CwU0EEwECACMFAlRCcBICGwMH
CwkIBwMCAQYVCAIJCgsEFgIDAQIeAQIXgAAKCRB+FRAMzTZpsbceDp9IIN6BIA0Ol7MoB15E
11kRz/ewzryFY54tQlMnd4xxfH8MTQ/mm9I482YoSwPMdcWFAKnUX6Yo30tbLiNB8hzaHeRj
jx12K+ptqYbg+cevgOtbLAlL9kNgLLcsGqC2829jBCUTVeMSZDrzS97ole/YEez2qFpPnTV0
VrRWClWVfYh+JfzpXmgyhbkuwUxNFk421s4Ajp3d8nPPFUGgBG5HOxzkAm7xb1cjAuJ+oi/K
CHfkuN+fLZl/u3E/fw7vvOESApLU5o0icVXeakfSz0LsygEnekDbxPnE5af/9FEkXJD5EoYG
SEahaEtgNrR4qsyxyAGYgZlS70vkSSYJ+iT2rrwEiDlo31MzRo6Ba2FfHBSJ7lcYdPT7bbk9
AO3hlNMhNdUhoQv7M5HsnqZ6unvSHOKmReNaS9egAGdRN0/GPDWr9wroyJ65ZNQsHl9nXBqE
AukZNr5oJO5vxrYiAuuTSd6UI/xFkjtkzltG3mw5ao2bBpk/V/YuePrJsnPFHG7NhizrxttB
nTuOSCMo45pfHQ+XYd5K1+Cv/NzZFNWscm5htJ0HznY+oOsZvHTyGz3v91pn51dkRYN0otqr
bQ4tlFFuVjArBZcapSIe6NV8C4cEiSTOwE0EVEJx7gEIAMeHcVzuv2bp9HlWDp6+RkZe+vtl
KwAHplb/WH59j2wyG8V6i33+6MlSSJMOFnYUCCL77bucx9uImI5nX24PIlqT+zasVEEVGSRF
m8dgkcJDB7Tps0IkNrUi4yof3B3shR+vMY3i3Ip0e41zKx0CvlAhMOo6otaHmcxr35sWq1Jk
tLkbn3wG+fPQCVudJJECvVQ//UAthSSEklA50QtD2sBkmQ14ZryEyTHQ+E42K3j2IUmOLriF
dNr9NvE1QGmGyIcbw2NIVEBOK/GWxkS5+dmxM2iD4Jdaf2nSn3jlHjEXoPwpMs0KZsgdU0pP
JQzMUMwmB1wM8JxovFlPYrhNT9MAEQEAAcLBMwQYAQIACQUCVEJx7gIbDAAKCRB+FRAMzTZp
sadRDqCctLmYICZu4GSnie4lKXl+HqlLanpVMOoFNnWs9oRP47MbE2wv8OaYh5pNR9VVgyhD
OG0AU7oidG36OeUlrFDTfnPYYSF/mPCxHttosyt8O5kabxnIPv2URuAxDByz+iVbL+RjKaGM
GDph56ZTswlx75nZVtIukqzLAQ5fa8OALSGum0cFi4ptZUOhDNz1onz61klD6z3MODi0sBZN
Aj6guB2L/+2ZwElZEeRBERRd/uommlYuToAXfNRdUwrwl9gRMiA0WSyTb190zneRRDfpSK5d
usXnM/O+kr3Dm+Ui+UioPf6wgbn3T0o6I5BhVhs4h4hWmIW7iNhPjX1iybXfmb1gAFfjtHfL
xRUr64svXpyfJMScIQtBAm0ihWPltXkyITA92ngCmPdHa6M1hMh4RDX+Jf1fiWubzp1voAg0
JBrdmNZSQDz0iKmSrx8xkoXYfA3bgtFN8WJH2xgFL28XnqY4M6dLhJwV3z08tPSRqYFm4NMP
dRsn0/7oymhneL8RthIvjDDQ5ktUjMe8LtHr70OZE/TT88qvEdhiIVUogHdo4qBrk41+gGQh
b906Dudw5YhTJFU3nC6bbF2nrLlB4C/XSiH76ZvqzV0Z/cAMBo5NF/w=
In-Reply-To: <20250519232808.2745331-6-seanjc@xxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 5/20/25 01:27, Sean Christopherson wrote:
Move the default IRQ routing table used for in-kernel I/O APIC routing to
ioapic.c where it belongs, and fold the call to kvm_set_irq_routing() into
kvm_ioapic_init() (the call via kvm_setup_default_irq_routing() is done
immediately after kvm_ioapic_init()).
In addition to making it more obvious that the so called "default" routing
only applies to an in-kernel I/O APIC, getting it out of irq_comm.c will
allow removing irq_comm.c entirely, and will also allow for guarding KVM's
in-kernel I/O APIC emulation with a Kconfig with minimal #ifdefs.
No functional change intended.
Well, it also applies to the PIC. Even though the IOAPIC and PIC (and
PIT) do come in a bundle, it's a bit weird to have the PIC routing
entries initialized by kvm_ioapic_init(). Please keep
kvm_setup_default_irq_routine() a separate function.
Paolo
Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
---
arch/x86/kvm/ioapic.c | 32 ++++++++++++++++++++++++++++++++
arch/x86/kvm/irq.h | 1 -
arch/x86/kvm/irq_comm.c | 32 --------------------------------
arch/x86/kvm/x86.c | 6 ------
4 files changed, 32 insertions(+), 39 deletions(-)
diff --git a/arch/x86/kvm/ioapic.c b/arch/x86/kvm/ioapic.c
index 8c8a8062eb19..dc45ea9f5b9c 100644
--- a/arch/x86/kvm/ioapic.c
+++ b/arch/x86/kvm/ioapic.c
@@ -710,6 +710,32 @@ static const struct kvm_io_device_ops ioapic_mmio_ops = {
.write = ioapic_mmio_write,
};
+#define IOAPIC_ROUTING_ENTRY(irq) \
+ { .gsi = irq, .type = KVM_IRQ_ROUTING_IRQCHIP, \
+ .u.irqchip = { .irqchip = KVM_IRQCHIP_IOAPIC, .pin = (irq) } }
+#define ROUTING_ENTRY1(irq) IOAPIC_ROUTING_ENTRY(irq)
+
+#define PIC_ROUTING_ENTRY(irq) \
+ { .gsi = irq, .type = KVM_IRQ_ROUTING_IRQCHIP, \
+ .u.irqchip = { .irqchip = SELECT_PIC(irq), .pin = (irq) % 8 } }
+#define ROUTING_ENTRY2(irq) \
+ IOAPIC_ROUTING_ENTRY(irq), PIC_ROUTING_ENTRY(irq)
+
+static const struct kvm_irq_routing_entry default_routing[] = {
+ ROUTING_ENTRY2(0), ROUTING_ENTRY2(1),
+ ROUTING_ENTRY2(2), ROUTING_ENTRY2(3),
+ ROUTING_ENTRY2(4), ROUTING_ENTRY2(5),
+ ROUTING_ENTRY2(6), ROUTING_ENTRY2(7),
+ ROUTING_ENTRY2(8), ROUTING_ENTRY2(9),
+ ROUTING_ENTRY2(10), ROUTING_ENTRY2(11),
+ ROUTING_ENTRY2(12), ROUTING_ENTRY2(13),
+ ROUTING_ENTRY2(14), ROUTING_ENTRY2(15),
+ ROUTING_ENTRY1(16), ROUTING_ENTRY1(17),
+ ROUTING_ENTRY1(18), ROUTING_ENTRY1(19),
+ ROUTING_ENTRY1(20), ROUTING_ENTRY1(21),
+ ROUTING_ENTRY1(22), ROUTING_ENTRY1(23),
+};
+
int kvm_ioapic_init(struct kvm *kvm)
{
struct kvm_ioapic *ioapic;
@@ -731,8 +757,14 @@ int kvm_ioapic_init(struct kvm *kvm)
if (ret < 0) {
kvm->arch.vioapic = NULL;
kfree(ioapic);
+ return ret;
}
+ ret = kvm_set_irq_routing(kvm, default_routing,
+ ARRAY_SIZE(default_routing), 0);
+ if (ret)
+ kvm_ioapic_destroy(kvm);
+
return ret;
}
diff --git a/arch/x86/kvm/irq.h b/arch/x86/kvm/irq.h
index 33dd5666b656..f6134289523e 100644
--- a/arch/x86/kvm/irq.h
+++ b/arch/x86/kvm/irq.h
@@ -107,7 +107,6 @@ void __kvm_migrate_timers(struct kvm_vcpu *vcpu);
int apic_has_pending_timer(struct kvm_vcpu *vcpu);
-int kvm_setup_default_irq_routing(struct kvm *kvm);
int kvm_irq_delivery_to_apic(struct kvm *kvm, struct kvm_lapic *src,
struct kvm_lapic_irq *irq,
struct dest_map *dest_map);
diff --git a/arch/x86/kvm/irq_comm.c b/arch/x86/kvm/irq_comm.c
index b85e4be2ddff..998c4a34d87c 100644
--- a/arch/x86/kvm/irq_comm.c
+++ b/arch/x86/kvm/irq_comm.c
@@ -334,38 +334,6 @@ bool kvm_intr_is_single_vcpu(struct kvm *kvm, struct kvm_lapic_irq *irq,
}
EXPORT_SYMBOL_GPL(kvm_intr_is_single_vcpu);
-#define IOAPIC_ROUTING_ENTRY(irq) \
- { .gsi = irq, .type = KVM_IRQ_ROUTING_IRQCHIP, \
- .u.irqchip = { .irqchip = KVM_IRQCHIP_IOAPIC, .pin = (irq) } }
-#define ROUTING_ENTRY1(irq) IOAPIC_ROUTING_ENTRY(irq)
-
-#define PIC_ROUTING_ENTRY(irq) \
- { .gsi = irq, .type = KVM_IRQ_ROUTING_IRQCHIP, \
- .u.irqchip = { .irqchip = SELECT_PIC(irq), .pin = (irq) % 8 } }
-#define ROUTING_ENTRY2(irq) \
- IOAPIC_ROUTING_ENTRY(irq), PIC_ROUTING_ENTRY(irq)
-
-static const struct kvm_irq_routing_entry default_routing[] = {
- ROUTING_ENTRY2(0), ROUTING_ENTRY2(1),
- ROUTING_ENTRY2(2), ROUTING_ENTRY2(3),
- ROUTING_ENTRY2(4), ROUTING_ENTRY2(5),
- ROUTING_ENTRY2(6), ROUTING_ENTRY2(7),
- ROUTING_ENTRY2(8), ROUTING_ENTRY2(9),
- ROUTING_ENTRY2(10), ROUTING_ENTRY2(11),
- ROUTING_ENTRY2(12), ROUTING_ENTRY2(13),
- ROUTING_ENTRY2(14), ROUTING_ENTRY2(15),
- ROUTING_ENTRY1(16), ROUTING_ENTRY1(17),
- ROUTING_ENTRY1(18), ROUTING_ENTRY1(19),
- ROUTING_ENTRY1(20), ROUTING_ENTRY1(21),
- ROUTING_ENTRY1(22), ROUTING_ENTRY1(23),
-};
-
-int kvm_setup_default_irq_routing(struct kvm *kvm)
-{
- return kvm_set_irq_routing(kvm, default_routing,
- ARRAY_SIZE(default_routing), 0);
-}
-
void kvm_scan_ioapic_irq(struct kvm_vcpu *vcpu, u32 dest_id, u16 dest_mode,
u8 vector, unsigned long *ioapic_handled_vectors)
{
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index f9f798f286ce..4a9c252c9dab 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -7118,12 +7118,6 @@ int kvm_arch_vm_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg)
goto create_irqchip_unlock;
}
- r = kvm_setup_default_irq_routing(kvm);
- if (r) {
- kvm_ioapic_destroy(kvm);
- kvm_pic_destroy(kvm);
- goto create_irqchip_unlock;
- }
/* Write kvm->irq_routing before enabling irqchip_in_kernel. */
smp_wmb();
kvm->arch.irqchip_mode = KVM_IRQCHIP_KERNEL;
Return-Path: <linux-kernel+bounces-673544-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id F0B9A41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:44:45 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 8C20318981EE
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:44:59 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 038CB1E47A8;
Wed, 4 Jun 2025 16:44:38 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="C7tMonCT"
Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8E3D61DFDBB;
Wed, 4 Jun 2025 16:44:35 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.54
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749055477; cv=none; b=Jm8IFMltM5RFbgKfAuOx1eXHxOsbLxam+PbJqV6wD6Kdy9nhEPC1zU0qjZrMoXjgJD/5VaxyFaHYDLoPLjRHib/uH5y8yIKWYiGhqhpyrxY+Zai6tqHoXt0v9lvIUzjvlX3mZJTdpt+6+35A1zO7U65d9/U07myLWNY8RwpqF6s=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749055477; c=relaxed/simple;
bh=wFMCMbJITuoovSp6CQHXf/DpRmcuSqQ1RVhHc0lV4rE=;
h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
To:Cc:Content-Type; b=szGbH43v4PUnG4/Rus8/InPJpxV4DNA6i/Tla9U9vUEgBs/cQYzElMscIdOKoIUEWu1txEC4LGYBa2SeiqIPROdi0QHQ6yQjxp1HHG/++XQAqVzYona05X+fFVyJXk2UrYLSSiE/14KNvvg73HHLXvFcxfIfDptTttnpyscWwoI=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=C7tMonCT; arc=none smtp.client-ip=209.85.167.54
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-5533302b49bso8654028e87.2;
Wed, 04 Jun 2025 09:44:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1749055474; x=1749660274; darn=vger.kernel.org;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:from:to:cc:subject:date
:message-id:reply-to;
bh=wFMCMbJITuoovSp6CQHXf/DpRmcuSqQ1RVhHc0lV4rE=;
b=C7tMonCTwoD0eOI8Yd1pSJVvuRXz0eGiyC1b2idGozB/7yvgfcO9WW05YUWXk5RIxa
bKfyvARQ/ZobkF1HZYSmm/EWe5kvj7csArrn5pYaT4Y1tKxI6JUGcMBGKn3Ux1VSBja2
N+WBJ1O/x9E7QOX5enDecFFcAb7g83RJTxC5/I7szEGj3zr1K6aL6qp7HTtY7pf60wTR
vHr5tHj4xAVE+UQUo/jyaGbd7LvOb1MwNaKp0/jaACMXmG1bCWsaVBtzUQpRTqCjTVLH
EmNFwAUDqi6XUM4ElJKTvFDd+nZRtV7/5cwUZyZrF6pyyhgeTjrLeppC///vEq8NVkKt
a5VQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749055474; x=1749660274;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=wFMCMbJITuoovSp6CQHXf/DpRmcuSqQ1RVhHc0lV4rE=;
b=iRtaRGaKkk28OMgJgtaQbSSqdWgnMlJiOSGDJ9FrwDjF8uTm1M2nQNN2szxpzx3RpE
VvyyZ7LhrPfID7NJ8q5hrx5p4yWvAv+lUWHyNFl9PV6fU5fs8QfE9cH/YpjqbRiAxohg
BZ921uuUoIaHm3gxQl0QRXLkkajD4q0xGdkwVMx/7bC8txWNdQRPDC5ktfHf9DgIZ7N2
wVAi70fBrzTRqKyKlJWUh1S2rFjHbhR3X1UO5jA7RG7wajVwqJvuIp85SP05t+x+Soge
naysqQbb2GRAAoPEMijLy7cfAPIDVUAxb8bf27FhFghHcNI/1MFPjh+LVLKpvoiIzwwF
3R6g==
X-Forwarded-Encrypted: i=1; AJvYcCUEgOBow22FWOVYgZzZyRzR2WMrRmTkPY43YbAw7fNIcYtXjlETAAeZwpQQw8/dEl9OT87OJE4HSZ1QPuw=@vger.kernel.org
X-Gm-Message-State: AOJu0YycElDVqG/I6sjjfBz2xk9eb9WsLPHFfMA21g/Ud9A4jai0Gt2i
SAaLAY1vb5/PmrN8o4lT3CSUP28lbmhkcNlp5AbPiz+FgX1wjVqEI00iI4/VNi6nanF+R3DHeYt
CHKF0dzeM9qY+8fx0QkNQvr9yu8A7GinflEl3
X-Gm-Gg: ASbGncvef4yL5JTuajuuC7J1ku3jum5OkWVlfYarx1Lk2LUwEqPPi3FfDVQ//fXmevZ
S5XKaizZTeCDhHqPOELfkLSSXvy0VljU70SnWMtl9ve2J2XBT/Obi9L3p8adB1Uyq0YHyvmWGhF
zbuRTc90k1l74BnR9jXaXbYFRfthA3DOYmrvjWplUhWculeWQ5EeGVhxDDo+ObVpGVdudUt5xxx
vSfFNqtuKXONA==
X-Google-Smtp-Source: AGHT+IF/YsIUFahxFoeFKA3DR2RVxvuZILJjjOA/b6Zn6AHVPsWFoSWcKKxSdkTyVWeKMDIAuj3FRHVXkASKTjwKFFY=
X-Received: by 2002:a05:6512:b86:b0:553:25b2:357d with SMTP id
2adb3069b0e04-55357bd6f7fmr943933e87.52.1749055473351; Wed, 04 Jun 2025
09:44:33 -0700 (PDT)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
References: <20250604153510.55689-1-stefano.radaelli21@xxxxxxxxx>
In-Reply-To: <20250604153510.55689-1-stefano.radaelli21@xxxxxxxxx>
From: Fabio Estevam <festevam@xxxxxxxxx>
Date: Wed, 4 Jun 2025 13:44:22 -0300
X-Gm-Features: AX0GCFtSAkrZTNsALuZF7FxrEF2hbsck5XT79hM6Y37nNbT0k-G0Qzh3cVE1Gmw
Message-ID: <CAOMZO5BYBMq=5ir8WQBEH=h6SPpm4MiUrDoDJvJEH6ioUCB11g@xxxxxxxxxxxxxx>
Subject: Re: [v2] arm64: dts: freescale: imx93-var-som: update eqos support
for MaxLinear PHY
To: Stefano Radaelli <stefano.radaelli21@xxxxxxxxx>
Cc: devicetree@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, othacehe@xxxxxxx,
Rob Herring <robh@xxxxxxxxxx>, Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>,
Shawn Guo <shawnguo@xxxxxxxxxx>, Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>,
Pengutronix Kernel Team <kernel@xxxxxxxxxxxxxx>, imx@xxxxxxxxxxxxxxx,
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hi Stefano,
Nitpik: The subject line of your path should be:
Subject: [PATCH v2] arm64: dts: ....
and not only
Subject: [v2] rm64: dts: ....
On Wed, Jun 4, 2025 at 12:36=E2=80=AFPM Stefano Radaelli
<stefano.radaelli21@xxxxxxxxx> wrote:
Variscite has updated the Ethernet PHY on the VAR-SOM-MX93 from the
Murata CYW43353 to the MaxLinear MXL86110, as documented in the
Murata CYW43353 is a Wifi chip, not an Ethernet PHY.
I think you meant:
"from the ADIN1300BCPZ to the MaxLinear MXL86110"
Return-Path: <linux-kernel+bounces-673545-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 5E41541E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:49:15 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 5DE9E3A5F6F
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:48:53 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 1EB931E51F6;
Wed, 4 Jun 2025 16:49:08 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="nNoswRFS"
Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0087C1487F6;
Wed, 4 Jun 2025 16:49:05 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.156.1
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749055747; cv=none; b=PaKPpL+dF8Ul4GWFClyuvoT5uE50KMctcbslEXuXobWJtoZmJjJKPtVjTKlL1HYO/iEVFajmb3AquQsOgFX1YC5tHWy85JdJnWf+Gm4B/T3wE+K0mJW1eOS10nJfJTT/NBviS1b63jSQQGGbtN+X2XmA4+TwAnnZ+azNbMykJHY=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749055747; c=relaxed/simple;
bh=n11zh9YiiUxBI/UWsmUihybLUSm6s7qq0XhQ8nMz0RY=;
h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References:
MIME-Version:Content-Type; b=XbAAuzjB2oTelcLy/PlfYOD8Z5z1chrWU90YRvKFAqHmwVTF3lD+dZXIJAN3hZyNsSrr9U7DgFuWovUver1iHlv4cYJNXHJgFjkAqSmnkIRzwVQXuhtoB3+T76j9A9toCq2SJ1lR/C7dENMAGR76OPeA4Z+CBTFGMzKbcj6Uwhc=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b=nNoswRFS; arc=none smtp.client-ip=148.163.156.1
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com
Received: from pps.filterd (m0356517.ppops.net [127.0.0.1])
by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 554Cd8Ev029660;
Wed, 4 Jun 2025 16:49:03 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc
:content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=pp1; bh=oUOEtN
vQ8pY/J5z+Im9aP1U/jEGj+Nn/6nZ08QyR1gg=; b=nNoswRFSofGj6jiH1f+Wp2
vpU6dQkl75KAOnoD25ItFzb3xLveZU5sXvlvwpeox6IbPqqn1a4+LWv+wu8TehmL
AbR4xbYWUMIGucF/A2v56j83WkcDcUx6tLQwyBpLKg6CkInm9KJqrf/3AxFzky+d
oLhTFxdHbsoYVY7a/zn9Lsby+yM9IrEHAgiXOlW6IfzP2BuJymMumlgmEjvMxOFu
YTGJHjWyxxIs35sq1T9b4yFhqJv2omSg+XAr9SI+BC6oY4UCLcypnQvz+FfzGAMa
ABXYtZrrOh/IbWU98nOzmpsVO0Owo+cCpKCb5EWocnE7ZazUJY87v8xpBZvmmseg
==
Received: from ppma21.wdc07v.mail.ibm.com (5b.69.3da9.ip4.static.sl-reverse.com [169.61.105.91])
by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 471geyv1jh-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 16:49:03 +0000 (GMT)
Received: from pps.filterd (ppma21.wdc07v.mail.ibm.com [127.0.0.1])
by ppma21.wdc07v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 554FX1W2019937;
Wed, 4 Jun 2025 16:49:02 GMT
Received: from smtprelay01.fra02v.mail.ibm.com ([9.218.2.227])
by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 470d3p0r88-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 16:49:01 +0000
Received: from smtpav07.fra02v.mail.ibm.com (smtpav07.fra02v.mail.ibm.com [10.20.54.106])
by smtprelay01.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 554GmvoO59310456
(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 4 Jun 2025 16:48:57 GMT
Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1])
by IMSVA (Postfix) with ESMTP id C395A20043;
Wed, 4 Jun 2025 16:48:57 +0000 (GMT)
Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1])
by IMSVA (Postfix) with ESMTP id 71DCE20040;
Wed, 4 Jun 2025 16:48:57 +0000 (GMT)
Received: from p-imbrenda (unknown [9.152.224.66])
by smtpav07.fra02v.mail.ibm.com (Postfix) with ESMTP;
Wed, 4 Jun 2025 16:48:57 +0000 (GMT)
Date: Wed, 4 Jun 2025 18:48:55 +0200
From: Claudio Imbrenda <imbrenda@xxxxxxxxxxxxx>
To: Alexander Gordeev <agordeev@xxxxxxxxxxxxx>
Cc: Heiko Carstens <hca@xxxxxxxxxxxxx>, Janosch Frank
<frankja@xxxxxxxxxxxxx>,
Christian Borntraeger <borntraeger@xxxxxxxxxxxxx>,
David Hildenbrand <david@xxxxxxxxxx>,
Sven Schnelle <svens@xxxxxxxxxxxxx>, Vasily Gorbik <gor@xxxxxxxxxxxxx>,
kvm@xxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
Subject: Re: [PATCH] s390/mm: Fix in_atomic() handling in
do_secure_storage_access()
Message-ID: <20250604184855.44793208@p-imbrenda>
In-Reply-To: <aEB0BfLG9yM3Gb4u@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20250603134936.1314139-1-hca@xxxxxxxxxxxxx>
<aEB0BfLG9yM3Gb4u@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Organization: IBM
X-Mailer: Claws Mail 4.3.1 (GTK 3.24.49; x86_64-redhat-linux-gnu)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-TM-AS-GCONF: 00
X-Proofpoint-ORIG-GUID: G2iT3uC2J9R6Zm1NoMnzWw990neAQgQs
X-Authority-Analysis: v=2.4 cv=DYMXqutW c=1 sm=1 tr=0 ts=684078ff cx=c_pps a=GFwsV6G8L6GxiO2Y/PsHdQ==:117 a=GFwsV6G8L6GxiO2Y/PsHdQ==:17 a=kj9zAlcOel0A:10 a=6IFa9wvqVegA:10 a=VnNF1IyMAAAA:8 a=oF2f3jwwvDOvwd7SqYoA:9 a=CjuIK1q_8ugA:10
X-Proofpoint-GUID: G2iT3uC2J9R6Zm1NoMnzWw990neAQgQs
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDEyNiBTYWx0ZWRfXwt/clli9/hF6 +v/8tZHdYnY4AUwQ0xxWArvChe+H33lBTUjgU/+/ePA50Jq3gK6CmRJ5vM4gR7k7NSCN1ME88dt YMbLabE9fQOCzwOwaWToSSWCdBzBSHeWgLl2VRz+beSYYHVibAcEOSXDtM1uKCkdDNUZm7wYJlM
2Tt037ogMksfnTn1DGlBCh/r0i44a3XB2nJ0VzHR1DVlICtsiwctZEq8WmBm+85nn4+NVpOmtcX ngC/qC0vi9ZNthAADC801UT/jzvwJPaDZiTQclcIcKrsafF00HhUTBGeOy/JtRbjnE+9dianOl6 4on0HEUe1o+8xVxxagc2j0393l+1lXchYp8eRPahHrl90Q6AF3FDlvc00YP10JslOt62vNOcdf4
u1Mp0EV+IZm/bKw4hbi8AhOV/If59xn74KMm08Q9bnb//KFDLQnWBqBTJEfQJbmAZPMXw2b8
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0
lowpriorityscore=0 suspectscore=0 spamscore=0 mlxscore=0
priorityscore=1501 clxscore=1015 phishscore=0 mlxlogscore=596 adultscore=0
malwarescore=0 bulkscore=0 classifier=spam authscore=0 authtc=n/a authcc=
route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000
definitions=main-2506040126
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, 4 Jun 2025 18:27:49 +0200
Alexander Gordeev <agordeev@xxxxxxxxxxxxx> wrote:
On Tue, Jun 03, 2025 at 03:49:36PM +0200, Heiko Carstens wrote:
> diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c
> index 3829521450dd..e1ad05bfd28a 100644
> --- a/arch/s390/mm/fault.c
> +++ b/arch/s390/mm/fault.c
> @@ -441,6 +441,8 @@ void do_secure_storage_access(struct pt_regs *regs)
> if (rc)
> BUG();
> } else {
> + if (faulthandler_disabled())
> + return handle_fault_error_nolock(regs, 0);
>
This could trigger WARN_ON_ONCE() in handle_fault_error_nolock():
if (WARN_ON_ONCE(!si_code))
si_code = SEGV_MAPERR;
Would this warning be justified in this case (aka user_mode(regs) ==
true)?
I think so, because if we are in usermode, we should never trigger
faulthandler_disabled()
> mm = current->mm;
> mmap_read_lock(mm);
> vma = find_vma(mm, addr);
Return-Path: <linux-kernel+bounces-673546-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 0BD2D41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:49:47 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 2A2DF1718DA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:49:48 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id D48E91E1C36;
Wed, 4 Jun 2025 16:49:42 +0000 (UTC)
Received: from mail-il1-f207.google.com (mail-il1-f207.google.com [209.85.166.207])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6B16D1DE4E3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:49:40 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.207
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749055782; cv=none; b=e2grYgN+/+OV/Pf2POQLs12jPdRfl9kI4U2kYdWs7pLbwHuUyBtVywUyfg7oig5vW5SU+/kmbg30YqPlMsvqcR7mMSjjmCzBtERy01gR3T5lzwi23GfCSsOw6L8mNmj3SGg1vgS3wXogzzD339NlNFh+LtiIqDr0IhGJ9kvkH1k=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749055782; c=relaxed/simple;
bh=YHu4jGF1YZkVGWIkqN8M9mNusZtcaNE6i9u1jHDIVjM=;
h=MIME-Version:Date:Message-ID:Subject:From:To:Content-Type; b=a88Fs9M6EPhAmovWMupCHpTg/iTBlyv9y6xXEdijiEvYs1jpnC7bexVYbWitoQ7PhkC+unt0Ps+jS+8qKGyn96rSlt4CP9IIAleCQppu8tIDtW2X1LanRfXeeBAJ2ur/hCI6pG13w6ESj8TpgEZoYYb7WNsUqQLphng7QFjwlyY=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com; arc=none smtp.client-ip=209.85.166.207
Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=syzkaller.appspotmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=M3KW2WVRGUFZ5GODRSRYTGD7.apphosting.bounces.google.com
Received: by mail-il1-f207.google.com with SMTP id e9e14a558f8ab-3ddc0a6d4bdso1254065ab.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 09:49:40 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749055779; x=1749660579;
h=to:from:subject:message-id:date:mime-version:x-gm-message-state
:from:to:cc:subject:date:message-id:reply-to;
bh=LY0iAR1mVKVdvCWEoGg6XCJvj+K1kuwpgZIryLUf6Uo=;
b=sExsv6Rf5rIr44QxINIDVtJxSaXdwDTpfX4VT9q1GzstVOFpuTxwD14wwNjLoQnIYF
ONW+D8ckrYuEJMpPuo8d8H91YDn4u7ckZFSL93FWTEKUo5FLEW5f85B4JPsGWNZO30YX
LsqWVP5ITWaubu/SFU2zo976GvD3dsXiocSgzmsWaOhqA063j387d53LliN6h24ZETI+
7Lls9kuJkQNLxTEPY9EK1dncsPuw/QajfbgG8nHkSfmKTF7jxjAc0soWhM++9Mr8LX9L
4mS+A3fB83nDvFre/8S4XvBx5QyanRIPST5GSm5tmUjMFbZ3EOZ3qZuml1WWcFrvm95Z
oreg==
X-Forwarded-Encrypted: i=1; AJvYcCW0fdhauq2cMe8cXCM1Enjjh/wANN0MK6+CwsJEskgNCOzlH7zm7xwJnkGcxTNvB5TfJDQzKdBWAWTLZjA=@vger.kernel.org
X-Gm-Message-State: AOJu0YzoP1fX92oglL+dsgWE/LojWjd1e5o3uSIf/iKoS6lG9d6HDuqL
tgypZA6iqM7lhFLYCWZM9duhpfpdsT+A/ZgkF47dqQCIUgVSnrkiJvdGUHP6kw8wAoRMn3zjo49
TwlvUPGL3QhwnQazdIfDdGJqfnDkx3jmHxvGj25ELA7K15d6Jy0Y8gr3iELY=
X-Google-Smtp-Source: AGHT+IHl7MMEDMkYIj0El3grfSetVsJPbG3tlPNbWW9btv6EsUelEiy1s4MjFIDgxQAlTmjpmRKkoOePK7YFjFhslEgFncrCRDi4
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-Received: by 2002:a05:6e02:4508:10b0:3dc:8b29:30b1 with SMTP id
e9e14a558f8ab-3ddbed5f03dmr26573375ab.14.1749055779521; Wed, 04 Jun 2025
09:49:39 -0700 (PDT)
Date: Wed, 04 Jun 2025 09:49:39 -0700
X-Google-Appengine-App-Id: s~syzkaller
X-Google-Appengine-App-Id-Alias: syzkaller
Message-ID: <68407923.a00a0220.d8eae.008f.GAE@xxxxxxxxxx>
Subject: [syzbot] [ntfs3?] KASAN: slab-out-of-bounds Read in ntfs_utf16_to_nls
From: syzbot <syzbot+598057afa0f49e62bd23@xxxxxxxxxxxxxxxxxxxxxxxxx>
To: almaz.alexandrovich@xxxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
ntfs3@xxxxxxxxxxxxxxx, syzkaller-bugs@xxxxxxxxxxxxxxxx
Content-Type: text/plain; charset="UTF-8"
X-Spam-Status: No, score=-3.0 required=5.0 tests=FROM_LOCAL_HEX,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hello,
syzbot found the following issue on:
HEAD commit: 0f70f5b08a47 Merge tag 'pull-automount' of git://git.kerne..
git tree: upstream
console+strace: https://syzkaller.appspot.com/x/log.txt?x=167abed4580000
kernel config: https://syzkaller.appspot.com/x/.config?x=22765942f2e2ebcf
dashboard link: https://syzkaller.appspot.com/bug?extid=598057afa0f49e62bd23
compiler: Debian clang version 20.1.6 (++20250514063057+1e4d39e07757-1~exp1~20250514183223.118), Debian LLD 20.1.6
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=13a2200c580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=12831970580000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/4af859a809ab/disk-0f70f5b0.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/d3df10c6aa23/vmlinux-0f70f5b0.xz
kernel image: https://storage.googleapis.com/syzbot-assets/3a2d5f44d739/bzImage-0f70f5b0.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/d6f6d89632f0/mount_0.gz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+598057afa0f49e62bd23@xxxxxxxxxxxxxxxxxxxxxxxxx
ntfs3(loop0): failed to convert "0000" to maccroatian
==================================================================
BUG: KASAN: slab-out-of-bounds in ntfs_utf16_to_nls+0x3c9/0x5a0 fs/ntfs3/dir.c:49
Read of size 2 at addr ffff88807c7f1000 by task syz-executor243/5824
CPU: 0 UID: 0 PID: 5824 Comm: syz-executor243 Not tainted 6.15.0-syzkaller-09161-g0f70f5b08a47 #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Call Trace:
<TASK>
dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:408 [inline]
print_report+0xd2/0x2b0 mm/kasan/report.c:521
kasan_report+0x118/0x150 mm/kasan/report.c:634
ntfs_utf16_to_nls+0x3c9/0x5a0 fs/ntfs3/dir.c:49
ntfs_dir_emit fs/ntfs3/dir.c:307 [inline]
ntfs_read_hdr+0x508/0xbc0 fs/ntfs3/dir.c:383
ntfs_readdir+0xa5c/0xdd0 fs/ntfs3/dir.c:494
iterate_dir+0x5ac/0x770 fs/readdir.c:108
__do_sys_getdents64 fs/readdir.c:410 [inline]
__se_sys_getdents64+0xe4/0x260 fs/readdir.c:396
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f34189bde59
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 17 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fff44014e48 EFLAGS: 00000246 ORIG_RAX: 00000000000000d9
RAX: ffffffffffffffda RBX: 0000200000000080 RCX: 00007f34189bde59
RDX: 0000000000001000 RSI: 0000200000000f80 RDI: 0000000000000004
RBP: 00007f3418a515f0 R08: 000055556d8c34c0 R09: 000055556d8c34c0
R10: 000055556d8c34c0 R11: 0000000000000246 R12: 00007fff44014e70
R13: 00007fff44015098 R14: 431bde82d7b634db R15: 00007f3418a0703b
</TASK>
Allocated by task 5824:
kasan_save_stack mm/kasan/common.c:47 [inline]
kasan_save_track+0x3e/0x80 mm/kasan/common.c:68
poison_kmalloc_redzone mm/kasan/common.c:377 [inline]
__kasan_kmalloc+0x93/0xb0 mm/kasan/common.c:394
kasan_kmalloc include/linux/kasan.h:260 [inline]
__do_kmalloc_node mm/slub.c:4327 [inline]
__kmalloc_noprof+0x27a/0x4f0 mm/slub.c:4339
kmalloc_noprof include/linux/slab.h:909 [inline]
indx_read+0x27c/0xc20 fs/ntfs3/index.c:1059
ntfs_readdir+0x9d8/0xdd0 fs/ntfs3/dir.c:489
iterate_dir+0x5ac/0x770 fs/readdir.c:108
__do_sys_getdents64 fs/readdir.c:410 [inline]
__se_sys_getdents64+0xe4/0x260 fs/readdir.c:396
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff88807c7f0000
which belongs to the cache kmalloc-4k of size 4096
The buggy address is located 0 bytes to the right of
allocated 4096-byte region [ffff88807c7f0000, ffff88807c7f1000)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x7c7f0
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff88801a442140 dead000000000122 0000000000000000
raw: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff88801a442140 dead000000000122 0000000000000000
head: 0000000000000000 0000000080040004 00000000f5000000 0000000000000000
head: 00fff00000000003 ffffea0001f1fc01 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5824, tgid 5824 (syz-executor243), ts 94062103587, free_ts 87837995758
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x240/0x2a0 mm/page_alloc.c:1710
prep_new_page mm/page_alloc.c:1718 [inline]
get_page_from_freelist+0x21d1/0x22b0 mm/page_alloc.c:3680
__alloc_frozen_pages_noprof+0x181/0x370 mm/page_alloc.c:4970
alloc_pages_mpol+0x232/0x4a0 mm/mempolicy.c:2301
alloc_slab_page mm/slub.c:2450 [inline]
allocate_slab+0x8a/0x3b0 mm/slub.c:2618
new_slab mm/slub.c:2672 [inline]
___slab_alloc+0xbfc/0x1480 mm/slub.c:3858
__slab_alloc mm/slub.c:3948 [inline]
__slab_alloc_node mm/slub.c:4023 [inline]
slab_alloc_node mm/slub.c:4184 [inline]
__do_kmalloc_node mm/slub.c:4326 [inline]
__kmalloc_noprof+0x305/0x4f0 mm/slub.c:4339
kmalloc_noprof include/linux/slab.h:909 [inline]
indx_read+0x27c/0xc20 fs/ntfs3/index.c:1059
ntfs_readdir+0x9d8/0xdd0 fs/ntfs3/dir.c:489
iterate_dir+0x5ac/0x770 fs/readdir.c:108
__do_sys_getdents64 fs/readdir.c:410 [inline]
__se_sys_getdents64+0xe4/0x260 fs/readdir.c:396
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 5814 tgid 5814 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
free_pages_prepare mm/page_alloc.c:1254 [inline]
__free_frozen_pages+0xc65/0xe50 mm/page_alloc.c:2717
discard_slab mm/slub.c:2716 [inline]
__put_partials+0x161/0x1c0 mm/slub.c:3185
put_cpu_partial+0x17c/0x250 mm/slub.c:3260
__slab_free+0x2f7/0x400 mm/slub.c:4512
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x97/0x140 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x148/0x160 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x22/0x80 mm/kasan/common.c:329
kasan_slab_alloc include/linux/kasan.h:250 [inline]
slab_post_alloc_hook mm/slub.c:4147 [inline]
slab_alloc_node mm/slub.c:4196 [inline]
kmem_cache_alloc_noprof+0x1c1/0x3c0 mm/slub.c:4203
vm_area_dup+0x28/0x540 kernel/fork.c:488
__split_vma+0x1a0/0x9b0 mm/vma.c:477
vms_gather_munmap_vmas+0x2de/0x12b0 mm/vma.c:1315
do_vmi_align_munmap+0x25d/0x420 mm/vma.c:1483
__do_sys_brk mm/mmap.c:176 [inline]
__se_sys_brk+0x74e/0xb90 mm/mmap.c:115
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff88807c7f0f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88807c7f0f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88807c7f1000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
^
ffff88807c7f1080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
ffff88807c7f1100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================
---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@xxxxxxxxxxxxxxxx.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup
Return-Path: <linux-kernel+bounces-673547-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 01AA641E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:53:20 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id BF977177A47
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:53:18 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id E44C21E8324;
Wed, 4 Jun 2025 16:53:10 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="dvgBp8vC"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9B9941D619F
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:53:08 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749055990; cv=none; b=GByAsmnObha8u+uoWOxgEqjUkBeE2KqxMY1pBKHy+xRJqpYlRULMf1RaWgQNK0K6lfzc3Locve5mrfIA0TexFKDmIb05x1hiiYGm9wlXia+7jXWTzczhSZQSgxR6nu/lRDS+LRZ9yEmr2V4GkaqrUf7bhYagtxldq3ba615BEVU=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749055990; c=relaxed/simple;
bh=Y6psz76j6Q54BLu/dla5y9lVeHPkpDqvYnlf52GvYWU=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID:
MIME-Version:Content-Type; b=bKdzPl/NAqpsI3nJiQIGU6DfuOgIvf3KII9XXnQ4eY8VwXq0ej4H+9igr8SYqt78mZ6DTLpXAG/kr/e8ooqN64Fjce51yzJKCU/Z3xelLSzTYMk5spiJCJvSxAcBFnxvqli1vGbu8QWc8G5lu58f4gnu1b5B8d94+g5AoYtGmnY=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=dvgBp8vC; arc=none smtp.client-ip=170.10.133.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749055987;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references;
bh=Y6psz76j6Q54BLu/dla5y9lVeHPkpDqvYnlf52GvYWU=;
b=dvgBp8vC/q8thG/Z5+iTVw4PwPwI6svJq+U/Cc2do8UgvUl57QswQvHC29L8VJnrNlNpSP
XLAKWHRK+AzJKQXv2zZ5QsBPAuFnblZTFMzbDJ9UbhNOP6pn26Nsl4HKwx2nwg+y0Ctgil
3RPPY/t+Py+f72Xk88p45eYRJxU6iI4=
Received: from mail-lj1-f199.google.com (mail-lj1-f199.google.com
[209.85.208.199]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-134-iA0Q4afDMiKXToZr96b7sA-1; Wed, 04 Jun 2025 12:53:06 -0400
X-MC-Unique: iA0Q4afDMiKXToZr96b7sA-1
X-Mimecast-MFC-AGG-ID: iA0Q4afDMiKXToZr96b7sA_1749055985
Received: by mail-lj1-f199.google.com with SMTP id 38308e7fff4ca-32a64f93c68so831891fa.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 09:53:06 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749055985; x=1749660785;
h=content-transfer-encoding:mime-version:message-id:date:references
:in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=Y6psz76j6Q54BLu/dla5y9lVeHPkpDqvYnlf52GvYWU=;
b=Iir998zA2ZYbwLgmAqVFQSv/tSZ711AxMabBS7CWQNeOrq4Q4WkPqNalvL9Dmqwcgq
CF9diMoI4FAV9yw0cFsB6S6nfLfEiVHo0L1/dszY7C/dhKzpkD5Dff4J1fYKNmY+/20C
0FzNdqJ6V3qqbYaeaikRla15I4jyAXBISaa0OIJfujNesFVnlMWHLQ+RDXos+uQVjbLl
vot1eMXQ3247kbW0siJpcfHoU35socmId1bHJv5cYedeEBEgDkzJuuk4GFXdHZz8dr4l
PI7zxTiA4X+byjPWRo9BN3MRGO9e33UmIzZvfwo3E6f6jzVbFbXTm7mwXS9b5L0m8f82
KygA==
X-Gm-Message-State: AOJu0YwA/2QvVAkxxoxbtunvDsOQekpY+P+/HIy9b9XPVD0OWEXmC1ks
Ye2o07xfv4fHRevbWOKd62VJqWfYVH/4CKadPgSHC/G5wKUEPTYM3uT02xWgJ9oZLVWdI/x128f
s38SQPeszBUuQKhFFw8cYzLsDezX/fOr5v5jpaYkVwy9xzxpX6tWk1hkQ7zsWC2YReQ==
X-Gm-Gg: ASbGncsdJyIFNs7IuvGORdOYjVacovpohyCstYyPaCekNg7Rw7dk+9e642iUvrb6nJd
ki+wRX9Fi6fnR4aK6wJ5/WXvcLYtWJSWuCVucFzfCTyWHrBG+/W395hHEPzfLluUVrLqvQAOT17
YppUcsL+EPk5PYjO/HpXm5gJcysNsOQjzU465H0AWGjHmUCEcn1lUKg6SNtcKnL57jIWRKwSPcI
YCYOgyiCzkyz9Ga5qTD7TBHHTk76kc7I13c7EMq9QVUhBMSlUi+dAhbMD2Cd1EePGbxQMOBl4c9
x0qgGsB/9eaDYIk+OeugiuVW38QibwjjZ8mH
X-Received: by 2002:a05:651c:1508:b0:309:20da:6188 with SMTP id 38308e7fff4ca-32ad11be38amr1206301fa.6.1749055984821;
Wed, 04 Jun 2025 09:53:04 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IFOVkK8aXlCZgkjT/0iG8wOa9KpXdYeRE73KlsXw6lWnYujNdB6WOp6huRvzJhw27fbEzbHrw==
X-Received: by 2002:a05:651c:1508:b0:309:20da:6188 with SMTP id 38308e7fff4ca-32ad11be38amr1206111fa.6.1749055984366;
Wed, 04 Jun 2025 09:53:04 -0700 (PDT)
Received: from alrua-x1.borgediget.toke.dk ([45.145.92.2])
by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-32a85b527e1sm22753181fa.47.2025.06.04.09.53.03
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 09:53:03 -0700 (PDT)
Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000)
id B3D351AA9156; Wed, 04 Jun 2025 18:53:02 +0200 (CEST)
From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= <toke@xxxxxxxxxx>
To: Byungchul Park <byungchul@xxxxxx>, willy@xxxxxxxxxxxxx,
netdev@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx,
kernel_team@xxxxxxxxxxx, kuba@xxxxxxxxxx, almasrymina@xxxxxxxxxx,
ilias.apalodimas@xxxxxxxxxx, harry.yoo@xxxxxxxxxx, hawk@xxxxxxxxxx,
akpm@xxxxxxxxxxxxxxxxxxxx, davem@xxxxxxxxxxxxx, john.fastabend@xxxxxxxxx,
andrew+netdev@xxxxxxx, asml.silence@xxxxxxxxx, tariqt@xxxxxxxxxx,
edumazet@xxxxxxxxxx, pabeni@xxxxxxxxxx, saeedm@xxxxxxxxxx,
leon@xxxxxxxxxx, ast@xxxxxxxxxx, daniel@xxxxxxxxxxxxx, david@xxxxxxxxxx,
lorenzo.stoakes@xxxxxxxxxx, Liam.Howlett@xxxxxxxxxx, vbabka@xxxxxxx,
rppt@xxxxxxxxxx, surenb@xxxxxxxxxx, mhocko@xxxxxxxx, horms@xxxxxxxxxx,
linux-rdma@xxxxxxxxxxxxxxx, bpf@xxxxxxxxxxxxxxx, vishal.moola@xxxxxxxxx
Subject: Re: [RFC v4 01/18] netmem: introduce struct netmem_desc mirroring
struct page
In-Reply-To: <20250604025246.61616-2-byungchul@xxxxxx>
References: <20250604025246.61616-1-byungchul@xxxxxx>
<20250604025246.61616-2-byungchul@xxxxxx>
X-Clacks-Overhead: GNU Terry Pratchett
Date: Wed, 04 Jun 2025 18:53:02 +0200
Message-ID: <877c1rwis1.fsf@xxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Byungchul Park <byungchul@xxxxxx> writes:
To simplify struct page, the page pool members of struct page should be
moved to other, allowing these members to be removed from struct page.
Introduce a network memory descriptor to store the members, struct
netmem_desc, and make it union'ed with the existing fields in struct
net_iov, allowing to organize the fields of struct net_iov.
Signed-off-by: Byungchul Park <byungchul@xxxxxx>
Reviewed-by: Toke H=C3=B8iland-J=C3=B8rgensen <toke@xxxxxxxxxx>
Return-Path: <linux-kernel+bounces-673548-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 4091041E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:53:46 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id B2B29189A5AA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:53:49 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 98ABB1E5B72;
Wed, 4 Jun 2025 16:53:16 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=foss.st.com header.i=@foss.st.com header.b="mSugKeI2"
Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 095AF1D619F;
Wed, 4 Jun 2025 16:53:13 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.207.212.93
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749055995; cv=none; b=hEbiNaNE4fDKWYQYl9rRC7sTfb29JoWZt3CwIm9m9xiqh4qUfZpCKLLa54P4gW2+Qr7oQfpF/B55+FmwW992ZJJ0prdrRHOUZL1/e2N1tRYVOtXQFbNL4zSaPf9eUVlr46oYCAMnSjBR+kzZPsnQnL85NqkNqZLLnCnudA2hO1A=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749055995; c=relaxed/simple;
bh=Wuj00UCDsD3DRRwGoINhagwJ5TSoXk+8da3/MXsZGlo=;
h=Message-ID:Date:MIME-Version:From:Subject:To:CC:References:
In-Reply-To:Content-Type; b=MpwcnQK+//kOBk0cYjSmrCHL6yIDz6LaQoaAeII/s/CSIp9KuHTgFsoi2DHDZc7mOkWjHFSoF0LIBFHz2EZ1p6UCa0E1Twj3XFz8GMv+rjOyJ7rLDErG6fU+/1bn0x8tm6ogpE3BJsna1LboFt4QvSdAW4cUsMGdJ2MmTlv/Q+8=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foss.st.com; spf=pass smtp.mailfrom=foss.st.com; dkim=pass (2048-bit key) header.d=foss.st.com header.i=@foss.st.com header.b=mSugKeI2; arc=none smtp.client-ip=91.207.212.93
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foss.st.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=foss.st.com
Received: from pps.filterd (m0046661.ppops.net [127.0.0.1])
by mx07-00178001.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 554F7slN011211;
Wed, 4 Jun 2025 18:39:21 +0200
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=
cc:content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=selector1; bh=
0BbnVS9D20ezMI4EQTDWMDtbyTWlsW9ZoYQZlC7MMog=; b=mSugKeI2mDPxVCh1
HeGvrpJFummrgU1JBzlCbO6Inv6ABcTf1xTboAGXebQ4Va750dqiRf4t7gDXvgcp
WylEgtUpxhieyEkf9TNCZeZoPe6Oc0DQBD9JmAUCQhNLPztUPazCLOGgUSCwHoFx
2DEIoVPRSjgIfJOTjizbCsMG3KTVl44wQGE/Czla21dwM++eZZ3DCb6d+lJIvmbe
7mk7Y+PWPbC9AyIhOGtgRr6A9yIhAfXzbVA3BODhITE/zm00qhRKH0LI8SVW+PEU
arW8pHI5Jvm538mPnHgbSljWUwKisScM0COJ7pIgjE2Zslf6i4LMPz9yNWd4H4ug
qgA7Lg==
Received: from beta.dmz-ap.st.com (beta.dmz-ap.st.com [138.198.100.35])
by mx07-00178001.pphosted.com (PPS) with ESMTPS id 471g8vanv1-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 18:39:21 +0200 (MEST)
Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20])
by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id B11B840049;
Wed, 4 Jun 2025 18:37:36 +0200 (CEST)
Received: from Webmail-eu.st.com (shfdag1node3.st.com [10.75.129.71])
by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 45605B4A8DE;
Wed, 4 Jun 2025 18:35:51 +0200 (CEST)
Received: from [10.130.77.120] (10.130.77.120) by SHFDAG1NODE3.st.com
(10.75.129.71) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 4 Jun
2025 18:35:50 +0200
Message-ID: <3c7da784-e58e-4acd-a37f-93020796c0e7@xxxxxxxxxxx>
Date: Wed, 4 Jun 2025 18:35:49 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
From: Christian Bruel <christian.bruel@xxxxxxxxxxx>
Subject: Re: [PATCH v8 2/9] PCI: stm32: Add PCIe host support for STM32MP25
To: Manivannan Sadhasivam <mani@xxxxxxxxxx>
CC: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>,
<lpieralisi@xxxxxxxxxx>, <kw@xxxxxxxxx>, <robh@xxxxxxxxxx>,
<bhelgaas@xxxxxxxxxx>, <krzk+dt@xxxxxxxxxx>, <conor+dt@xxxxxxxxxx>,
<mcoquelin.stm32@xxxxxxxxx>, <alexandre.torgue@xxxxxxxxxxx>,
<p.zabel@xxxxxxxxxxxxxx>, <thippeswamy.havalige@xxxxxxx>,
<shradha.t@xxxxxxxxxxx>, <quic_schintav@xxxxxxxxxxx>,
<cassel@xxxxxxxxxx>, <johan+linaro@xxxxxxxxxx>,
<linux-pci@xxxxxxxxxxxxxxx>, <devicetree@xxxxxxxxxxxxxxx>,
<linux-stm32@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
<linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>
References: <20250423090119.4003700-1-christian.bruel@xxxxxxxxxxx>
<20250423090119.4003700-3-christian.bruel@xxxxxxxxxxx>
<gzw3rcuwuu7yswljzde2zszqlzkfsilozdfv2ebrcxjpvngpkk@hvzqb5wbjalb>
<c01d0d72-e43c-4e10-b298-c8ed4f5d1942@xxxxxxxxxxx>
<ec33uuugief45swij7eu3mbx7htfxov6qa5miucqsrdp36z7qe@svpbhliveks4>
<7df0c1e5-f53b-4a44-920a-c2dfe8842481@xxxxxxxxxxx>
<q4rbaadr7amsrtwaeickdjmcst77onuopir5rzpvixa7ow7udk@txwsmidjs3im>
Content-Language: en-US
In-Reply-To: <q4rbaadr7amsrtwaeickdjmcst77onuopir5rzpvixa7ow7udk@txwsmidjs3im>
Content-Type: text/plain; charset="UTF-8"; format=flowed
Content-Transfer-Encoding: 7bit
X-ClientProxiedBy: EQNCAS1NODE4.st.com (10.75.129.82) To SHFDAG1NODE3.st.com
(10.75.129.71)
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
+
+ ret = devm_pm_runtime_enable(dev);
+ if (ret < 0) {
+ dev_err(dev, "Failed to enable runtime PM %d\n", ret);
+ return ret;
+ }
+
+ pm_runtime_get_noresume(dev);
+
I know that a lot of the controller drivers do this for no obvious reason. But
in this case, I believe you want to enable power domain or genpd before
registering the host bridge. Is that right?
...
Runtime PM was broken in version 6.6 without pm_runtime_get_noresume()
On the 6.15 baseline, without this call, pm_genpd_summary reports the
correct information: active when a device is plugged, and suspended when not
So, I can proceed without pm_runtime_get_noresume(), as you mentioned in
your review.
I suspect the other platforms might have this call for the same
historical reasons.
thank you,
Christian
Return-Path: <linux-kernel+bounces-673549-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id D7E9B41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:54:15 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 08EBF1883BDF
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:54:10 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 01DE51E5B72;
Wed, 4 Jun 2025 16:53:50 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WXT6NWtA"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3798418E1F
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:53:48 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749056029; cv=none; b=NyZvk8P1cDg2V1ndifikeRbum4EcE4MzbE1aL+i8uX5d2EEGU8AU4Ffw2up0c4XP13kmKyh2iCtjqwhejmrJah31KIuhYnPRQu//k21iBwV59xBFJsqLRRYgfc12oonji6nyv4tsNC7uhlhI+qjvhqRuaNSd0AKwHnDQIoZATJ8=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749056029; c=relaxed/simple;
bh=hhaoHECGZqzEpU9MTiy2t7cqLq5LWg93CmxEmAbN2pM=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=sUACOlnR5Xl1xx9NyGsNazNnpBrmhIfo5Q/C8fz8yo2OJHU3WfrF9B1fcK0y9lhooiO2j8JH0okR3yoAM7I7Ww9z8T3PHWAAqjyN3rT6hUoDbuzfqUEM7X8xxWMQv8qeLYeRD4caTqyfsGezXSa7RrUP+CenE0NNuxU6BHK3bbI=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WXT6NWtA; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id E8F77C4CEE4;
Wed, 4 Jun 2025 16:53:46 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749056028;
bh=hhaoHECGZqzEpU9MTiy2t7cqLq5LWg93CmxEmAbN2pM=;
h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
b=WXT6NWtAmVdO6YCKYmBq1oxfVRkO/uSH6SnVzBZ9qhEGoHV3lrl4Jx8S+qcptwIK+
Jur1H7p5sTLycJzMoZkbRM6r91ygI3u/LdNCS+r7jOOZFKrVF2iX8OADTmL7YRXbqI
RBYvJtHKr2U7FrsWXRo7ajPyntQ0ic276AXO2okaHqaufPnVMpuVNuT90qqJyH14eF
uWxGA259OB44qflNK5oQnKvnd1AR2vnoGaXmK4FAQEgAMbC/KupBpbMCGzNl2qQVfc
dn0OII6WNP5UCHsQJU2kTp/IOQCG0R52C8VCfGA4d+JvOSKm7gBnogf8CfuUwqhARt
5j4NlWpwaoqFg==
Date: Wed, 4 Jun 2025 18:53:44 +0200
From: Danilo Krummrich <dakr@xxxxxxxxxx>
To: Matthew Brost <matthew.brost@xxxxxxxxx>
Cc: Simona Vetter <simona.vetter@xxxxxxxx>,
Christian =?iso-8859-1?Q?K=F6nig?= <christian.koenig@xxxxxxx>,
Philipp Stanner <phasta@xxxxxxxxxx>,
David Airlie <airlied@xxxxxxxxx>, Simona Vetter <simona@xxxxxxxx>,
dri-devel@xxxxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
Subject: Re: [PATCH] drm/sched: Discourage usage of separate workqueues
Message-ID: <aEB6GOTlC_Z_Rq8b@cassiopeiae>
References: <20250604081657.124453-2-phasta@xxxxxxxxxx>
<7a09c357-2d28-4dd6-b637-4387cc430938@xxxxxxx>
<aEBhIzccXBPyt_58@phenom.ffwll.local>
<aEB4DFFE2C7gElRL@xxxxxxxxxxxxxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <aEB4DFFE2C7gElRL@xxxxxxxxxxxxxxxxxxxxxxxxx>
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 09:45:00AM -0700, Matthew Brost wrote:
On Wed, Jun 04, 2025 at 05:07:15PM +0200, Simona Vetter wrote:
> We should definitely document this trick better though, I didn't find any
> place where that was documented.
This is a good idea.
I think - and I also mentioned this a few times in the patch series that added
the workqueue support - we should also really document the pitfalls of this.
If the scheduler shares a workqueue with the driver, the driver needs to take
special care when submitting work that it's not possible to prevent run_job and
free_job work from running by doing this.
For instance, if it's a single threaded workqueue and the driver submits work
that allocates with GFP_KERNEL, this is a deadlock condition.
More generally, if the driver submits N work that, for instance allocates with
GFP_KERNEL, it's also a deadlock condition if N == max_active.
Return-Path: <linux-kernel+bounces-673550-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id BB98841E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:54:56 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id DF8CC188A321
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:54:56 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 310511E885A;
Wed, 4 Jun 2025 16:54:34 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="RKqaVa60"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0959C19DF8D
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:54:31 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749056073; cv=none; b=Kyvd68hoXrs0hIlLh8SCjnr3ytDJQwzODdSQqpPGlPR6NuWskkeE6xkS2FoeAFCg8Hzlk8isGTBuhagAt3lgaslwW8GR8Kon7pJUmTxpS41M2TttwG+AtqRjdrg4cBhSaVh2zrVfFYRpE0z6ixRpoK+ismkeqj4i/dxdkSeS+Yw=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749056073; c=relaxed/simple;
bh=CBJrqZ+K8qtu4Y1ldouIvNxY9hw3rtwJv5cO0xC+o1Q=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID:
MIME-Version:Content-Type; b=aYhumVsKHk7sv3B2AH7wSuY6uC+Opoif9rFlUPMOyDz3EPflJL0IkfW36WbLE3Lm/PuzXS1VSuKcgCVdmtYVA8gQT3dwXv3bzs8N0xDBkXs2z2HzlDIAeo6uxXjMMj0FNDoQ7O7WGhjO45KpCCRhbNHko5NHZCFJJgZ9DC86QHs=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=RKqaVa60; arc=none smtp.client-ip=170.10.129.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749056071;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references;
bh=CBJrqZ+K8qtu4Y1ldouIvNxY9hw3rtwJv5cO0xC+o1Q=;
b=RKqaVa60G09kku/ouAhm2a1n6fsTN4+nSYbsfbE9JeikfVCKFny3tLCg64PL8/pq+f+El1
H4dTG1A4Zgm3zYRVin0psUHQVBoacfuCIlH35LKkJDL8f/f848k5tKECWO7jTR8mdnxsUX
vA/es69d9FMfmswo1+J857SSft29woc=
Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com
[209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-527-3GUCPYFzNvmClI_SdgGO-A-1; Wed, 04 Jun 2025 12:54:29 -0400
X-MC-Unique: 3GUCPYFzNvmClI_SdgGO-A-1
X-Mimecast-MFC-AGG-ID: 3GUCPYFzNvmClI_SdgGO-A_1749056069
Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-ac79e4764e5so4259466b.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 09:54:29 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749056069; x=1749660869;
h=content-transfer-encoding:mime-version:message-id:date:references
:in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=CBJrqZ+K8qtu4Y1ldouIvNxY9hw3rtwJv5cO0xC+o1Q=;
b=QFHqEjGljflF+EQ6y7Uw8nOx87+wGnDtM0ldjM+kmZduF0O8ycCq/VX3si7O79Oeh8
mPU940cmqPYajKbZCqqVIkTF3Gq0yzrVYrhHZx1r0t43NP6UCD/1R0gliEoqyG0b/Vwc
CzNupMKpKuPFK/zF6VRLfQjX5UC4EzVRRfFIIFvIocuGR6ErXNvUZQh1EFTkwR+/dPq4
3Od6psrTY9eiv1qlrYJx9cU4wQzI4kahPEhWh7i+OdkcPJ4p57H+YejnFkSg9nwxcC0p
6syuAcAI57cxdtpv0E4eJzQVkfpjQujUDcEchfaEXh8PvE/R5yaYHOUZgUsh7B8QNJc6
/T0g==
X-Gm-Message-State: AOJu0YyL9xI37AwaLh1+PxSEWGdKUZuLcgxOrWyS3ONqVMp5/AMS4VX6
lb7RYy05tDJWsAOUpDxrhQd8pbJnIUZZVWMbigxoErwyQV0k04ncDcGYQPdqYIUQMcTy0NeXrXw
4V2LM/hZ9+bMWLs8kbeFW1fmlch7RFWg4b4BjkUdT4PiDBQXJbwbyldJ+40efyGz8yQ==
X-Gm-Gg: ASbGncsz8NRW2D+XpC2Spcqa1A/bjCo2zyW1jng1sl/teMalkJrSpRYBQ8jNgUK4JTt
uaIEbSJbmssU7mvr/aN6DqKqiOkX6CPRnPJjppgCS3gZ14mljLyNNYQRG5qrbq1WOVw7tKYb38P
1/riIKktuHAoA0Ou7vMKfXC+tz6OVhg+8iBjTR25MYgMiypdZsT7K6B9TSMEOKOIh7rieihlqvP
Mj8kUiGMBvJV1J9vwhkjXfkkNTZyUCdPRQUql6btc1Ro6Ndb3qOhpTTnXp3rJCteQJeO5NWliJa
ubOusdzo
X-Received: by 2002:a17:907:d1b:b0:adb:7f8:9ec2 with SMTP id a640c23a62f3a-addf8fb2d1dmr279356166b.53.1749056068612;
Wed, 04 Jun 2025 09:54:28 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IE72YuMsy54qWRNWHktjij3Nn8sx5T48vgaRUFWDRjP/O8/fKC1PRWFpCbXd9M9VbWIKd6C2g==
X-Received: by 2002:a17:907:d1b:b0:adb:7f8:9ec2 with SMTP id a640c23a62f3a-addf8fb2d1dmr279352866b.53.1749056068172;
Wed, 04 Jun 2025 09:54:28 -0700 (PDT)
Received: from alrua-x1.borgediget.toke.dk ([2a0c:4d80:42:443::2])
by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ada6ad39479sm1120713266b.124.2025.06.04.09.54.27
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 09:54:27 -0700 (PDT)
Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000)
id C59421AA915A; Wed, 04 Jun 2025 18:54:26 +0200 (CEST)
From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= <toke@xxxxxxxxxx>
To: Byungchul Park <byungchul@xxxxxx>, willy@xxxxxxxxxxxxx,
netdev@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx,
kernel_team@xxxxxxxxxxx, kuba@xxxxxxxxxx, almasrymina@xxxxxxxxxx,
ilias.apalodimas@xxxxxxxxxx, harry.yoo@xxxxxxxxxx, hawk@xxxxxxxxxx,
akpm@xxxxxxxxxxxxxxxxxxxx, davem@xxxxxxxxxxxxx, john.fastabend@xxxxxxxxx,
andrew+netdev@xxxxxxx, asml.silence@xxxxxxxxx, tariqt@xxxxxxxxxx,
edumazet@xxxxxxxxxx, pabeni@xxxxxxxxxx, saeedm@xxxxxxxxxx,
leon@xxxxxxxxxx, ast@xxxxxxxxxx, daniel@xxxxxxxxxxxxx, david@xxxxxxxxxx,
lorenzo.stoakes@xxxxxxxxxx, Liam.Howlett@xxxxxxxxxx, vbabka@xxxxxxx,
rppt@xxxxxxxxxx, surenb@xxxxxxxxxx, mhocko@xxxxxxxx, horms@xxxxxxxxxx,
linux-rdma@xxxxxxxxxxxxxxx, bpf@xxxxxxxxxxxxxxx, vishal.moola@xxxxxxxxx
Subject: Re: [RFC v4 04/18] page_pool: rename __page_pool_alloc_page_order()
to __page_pool_alloc_netmem_order()
In-Reply-To: <20250604025246.61616-5-byungchul@xxxxxx>
References: <20250604025246.61616-1-byungchul@xxxxxx>
<20250604025246.61616-5-byungchul@xxxxxx>
X-Clacks-Overhead: GNU Terry Pratchett
Date: Wed, 04 Jun 2025 18:54:26 +0200
Message-ID: <871przwipp.fsf@xxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Byungchul Park <byungchul@xxxxxx> writes:
Now that __page_pool_alloc_page_order() uses netmem alloc/put APIs, not
page alloc/put APIs, rename it to __page_pool_alloc_netmem_order() to
reflect what it does.
Signed-off-by: Byungchul Park <byungchul@xxxxxx>
Reviewed-by: Mina Almasry <almasrymina@xxxxxxxxxx>
I think it would be OK to squash this with the preceding patch; but
regardless:
Reviewed-by: Toke H=C3=B8iland-J=C3=B8rgensen <toke@xxxxxxxxxx>
Return-Path: <linux-kernel+bounces-673551-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 92BC241E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:55:09 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 7500A178499
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:55:06 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id D89201F2BAE;
Wed, 4 Jun 2025 16:54:41 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="X30HERd1"
Received: from out-183.mta0.migadu.com (out-183.mta0.migadu.com [91.218.175.183])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id B2C4F139CE3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:54:38 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.183
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749056081; cv=none; b=EW8N9t95CwhywYIrrvEyuBA48xOl80/6xZMfrMS4YHKpggqeKU36L0JjaNPOCMeMjkzHdaHUGnroNGev/zlBejPbIQd6qn2C2M29+4MrUe62eiwy++nTxkZNV7dt2fFBrGC+ijbl1SQ3OhU8Gyn2Ov58Cwq9KvsrRL25+i8CxEw=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749056081; c=relaxed/simple;
bh=S5D0xR40f/10NsdU7h3f038LLDftKbp2RstcgeDGaAA=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=M20+QqH40ALNAmSNyIRYr6MKw7e7Y4j3H+ypqs3nehJ0ufq8cVFvLmIPtnlnBmDZbqc/mm3rKdVc3UvbkrySEE3KYGi2TUmfn9RzBZBjugDToYBO4Q2uXx3ORcO8Eb/pb2BNqfL5VQmJtWfIsb0bkNhNnCJ/QTbHlUgoJnm1pU8=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=X30HERd1; arc=none smtp.client-ip=91.218.175.183
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev
Date: Wed, 4 Jun 2025 09:54:29 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1;
t=1749056075;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
in-reply-to:in-reply-to:references:references;
bh=RP8vXXqZC1dV9MZzM2sbviKeH5etUynIrbvM5lyh9U4=;
b=X30HERd1QENPJC6P5RkbkC+iyoz6/q62YbxfyhIYVHzrfpu4OENJdT7gw4sIZmyEynEj0Y
ElYtY3ieSk8/+c25AF/yARE8YRQtYc/05JK0i+w48d4ntt7CbqL6zG3YnQCsmYbKLiMNaA
A1bGPTJuPCIohQ/KyrnIZ/uwBVJY81s=
X-Report-Abuse: Please report any abuse attempt to abuse@xxxxxxxxxx and include these headers.
From: Shakeel Butt <shakeel.butt@xxxxxxxxx>
To: Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx>
Cc: Vlastimil Babka <vbabka@xxxxxxx>, Michal Hocko <mhocko@xxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, david@xxxxxxxxxx, lorenzo.stoakes@xxxxxxxxxx,
Liam.Howlett@xxxxxxxxxx, rppt@xxxxxxxxxx, surenb@xxxxxxxxxx, donettom@xxxxxxxxxxxxx,
aboorvad@xxxxxxxxxxxxx, sj@xxxxxxxxxx, linux-mm@xxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
Subject: Re: [PATCH] mm: fix the inaccurate memory statistics issue for users
Message-ID: <nohu552nfqkfumrj3zc7akbdrq3bzwexle3i6weyta76dltppv@txizmvtg3swd>
References: <72f0dc8c-def3-447c-b54e-c390705f8c26@xxxxxxxxxxxxxxxxx>
<aD6vHzRhwyTxBqcl@tiehlicka>
<ef2c9e13-cb38-4447-b595-f461f3f25432@xxxxxxxxxxxxxxxxx>
<aD7OM5Mrg5jnEnBc@tiehlicka>
<7307bb7a-7c45-43f7-b073-acd9e1389000@xxxxxxxxxxxxxxxxx>
<aD8LKHfCca1wQ5pS@tiehlicka>
<obfnlpvc4tmb6gbd4mw7h7jamp3kouyhnpl4cusetyctswznod@yr6dyrsbay6w>
<250ec733-8b2d-4c56-858c-6aada9544a55@xxxxxxxxxxxxxxxxx>
<1aa7c368-c37f-4b00-876c-dcf51a523c42@xxxxxxx>
<d2b76402-7e1a-4b2d-892a-2e8ffe1a37a9@xxxxxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <d2b76402-7e1a-4b2d-892a-2e8ffe1a37a9@xxxxxxxxxxxxxxxxx>
X-Migadu-Flow: FLOW_OUT
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 10:16:18PM +0800, Baolin Wang wrote:
On 2025/6/4 21:46, Vlastimil Babka wrote:
> On 6/4/25 14:46, Baolin Wang wrote:
> > > Baolin, please run stress-ng command that stresses minor anon page
> > > faults in multiple threads and then run multiple bash scripts which cat
> > > /proc/pidof(stress-ng)/status. That should be how much the stress-ng
> > > process is impacted by the parallel status readers versus without them.
> >
> > Sure. Thanks Shakeel. I run the stress-ng with the 'stress-ng --fault 32
> > --perf -t 1m' command, while simultaneously running the following
> > scripts to read the /proc/pidof(stress-ng)/status for each thread.
>
> How many of those scripts?
1 script, but will start 32 threads to read each stress-ng thread's status
interface.
> > From the following data, I did not observe any obvious impact of this
> > patch on the stress-ng tests when repeatedly reading the
> > /proc/pidof(stress-ng)/status.
> >
> > w/o patch
> > stress-ng: info: [6891] 3,993,235,331,584 CPU Cycles
> > 59.767 B/sec
> > stress-ng: info: [6891] 1,472,101,565,760 Instructions
> > 22.033 B/sec (0.369 instr. per cycle)
> > stress-ng: info: [6891] 36,287,456 Page Faults Total
> > 0.543 M/sec
> > stress-ng: info: [6891] 36,287,456 Page Faults Minor
> > 0.543 M/sec
> >
> > w/ patch
> > stress-ng: info: [6872] 4,018,592,975,968 CPU Cycles
> > 60.177 B/sec
> > stress-ng: info: [6872] 1,484,856,150,976 Instructions
> > 22.235 B/sec (0.369 instr. per cycle)
> > stress-ng: info: [6872] 36,547,456 Page Faults Total
> > 0.547 M/sec
> > stress-ng: info: [6872] 36,547,456 Page Faults Minor
> > 0.547 M/sec
> >
> > =========================
> > #!/bin/bash
> >
> > # Get the PIDs of stress-ng processes
> > PIDS=$(pgrep stress-ng)
> >
> > # Loop through each PID and monitor /proc/[pid]/status
> > for PID in $PIDS; do
> > while true; do
> > cat /proc/$PID/status
> > usleep 100000
>
> Hm but this limits the reading to 10 per second? If we want to simulate an
> adversary process, it should be without the sleeps I think?
OK. I drop the usleep, and I still can not see obvious impact.
w/o patch:
stress-ng: info: [6848] 4,399,219,085,152 CPU Cycles
67.327 B/sec
stress-ng: info: [6848] 1,616,524,844,832 Instructions
24.740 B/sec (0.367 instr. per cycle)
stress-ng: info: [6848] 39,529,792 Page Faults Total
0.605 M/sec
stress-ng: info: [6848] 39,529,792 Page Faults Minor
0.605 M/sec
w/patch:
stress-ng: info: [2485] 4,462,440,381,856 CPU Cycles
68.382 B/sec
stress-ng: info: [2485] 1,615,101,503,296 Instructions
24.750 B/sec (0.362 instr. per cycle)
stress-ng: info: [2485] 39,439,232 Page Faults Total
0.604 M/sec
stress-ng: info: [2485] 39,439,232 Page Faults Minor
0.604 M/sec
Is the above with 32 non-sleeping parallel reader scripts?
Return-Path: <linux-kernel+bounces-673553-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id AD1D541E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:55:43 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 8EBA0178F9C
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:55:35 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id C89171F463A;
Wed, 4 Jun 2025 16:54:52 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="c64g4RHi"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0E00D198E81
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:54:49 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749056091; cv=none; b=euNDmzb3speaFzlsmHd6U4TB4YMuObTaVytSLy21jyquSFZb2faiiiCBqH1RDxIY3nYAf54wE//Qe3H9Zap308n3z/U69qrafjRI0EQMsjVvtFPmDlcQ1iiIPgZ1Y+UDY5XifNhh8Lv8xp2OTo1K1iL2C6x7kdDUJQNwKyGFQ+o=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749056091; c=relaxed/simple;
bh=4DKEyF4tpd5LE4WYj/Ecz1SQwUxE88FvS29eKBTxUcM=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=mKNbdDCuUtUvrpWwVIkOEgG0gSZ06yo9BfPNGHzMIZRwcT7nev+eLhxhPoGPdSCcapQLSxX7+R06O3a5EoQmq0MkTG309CQZPu6ql9jBA1Xx5w13aRJCjliua+jOLdcMnK6jjIAIhit3QnyF1UW1RfZY8DCceGqPVG+UvsxOx1I=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=c64g4RHi; arc=none smtp.client-ip=170.10.129.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749056088;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=Mcu2aJZ7tNizCqp+CAr0S3BB27I77lxIBXbe3cEyD/k=;
b=c64g4RHi9rKJekwG+HEabPmOgkZi+9/D3xZ7UJXzsaeHZq0S6bDIey+hq8i6KOMuYOwrE+
H5oiKHmbwApbv233vwA1zRHV6qDLsRJS77hDPn5XBVQHeFT+9c3lB3uJR9+p6KAyY/RR61
cP1MgRH71+4iTrdPQ0A3w+6hUns/OzI=
Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com
[209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-193-82JEwE54Pl2rHdBtiJzBFw-1; Wed, 04 Jun 2025 12:54:47 -0400
X-MC-Unique: 82JEwE54Pl2rHdBtiJzBFw-1
X-Mimecast-MFC-AGG-ID: 82JEwE54Pl2rHdBtiJzBFw_1749056087
Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-39ee4b91d1cso614708f8f.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 09:54:47 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749056086; x=1749660886;
h=content-transfer-encoding:in-reply-to:autocrypt:content-language
:from:references:cc:to:subject:user-agent:mime-version:date
:message-id:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=Mcu2aJZ7tNizCqp+CAr0S3BB27I77lxIBXbe3cEyD/k=;
b=U3XeAKki5ToWtK3zwEuYNzVxNnpawJhFyST60f0wXXb4RYKzahfQl/hxmEouuirE9K
iUZva0SAJkEPYdQTC0d/IHe1BGBOQH0OCkc7ddONe7ah0d9RRIxSmjCzVg5wWSWQXmKr
IbZjgxsCWK9Nkv1mK/824fbXSMVreRacsSjYqUT9nGw7SOCUIyWqgy7HhYN8IpHdljGB
MkTQRRNnV1WuA9zWyDHPPVXFx8qMdX5j85RPhxYdCWdITLWySMnfvIlCSZ5TWOdUpUnd
sR7njHXszz4rlrepD6BmCR0wGr1ZSZcTXtoz7EAYP47tx4NBPs2I+Esclz0j/E2dl37t
54vA==
X-Forwarded-Encrypted: i=1; AJvYcCV/ICMk/gwInJ4d+RqSK2AudHuJDJT0/8RehkFaWGmodkP360Vy0o6Bm4x0RHXwTdJOQskzrs4333PXSHI=@vger.kernel.org
X-Gm-Message-State: AOJu0YyDlEpiFOS23gBAcj+rRh61AWO9OrB3Va5jiNSHS5w/pNkfrung
9hTBlOeI0JIQE+iaNPnPtzl2cIfDeeJZD2jNS9jm5P94uNIyRKGREem2xFIzxbYOVEGn6Wrndpq
e8EDifVcB3isjZpg1ntZtzlhcnhVarusxV6/dt9KFanW8j4eg4jb/dl8VSnRuakWQXQ==
X-Gm-Gg: ASbGncsMteiN7rp2vhF17/TEVdO0iKz7Gciuad3cucQ3iUml2KL0x8D4s0QmeASb+yd
hw/BN6bGBOpNPk1hmyOVyuQl70c2WCEot+FQgHmnmVytWI+A/RWfML2J4P6fIE5BK0Obp0sdLFE
xjdNErzUnrn2zHNL+ZoxXvI3OvAUR6Uu0F10Mlu68SiK2t7iKF+du5fN/7w4VftarhFNLyXMUGo
lBwzmbnW9p6wn3I0PJhAcujX71ziD4CRz7+32GGdbsuJgfH4z17lYIa6eiNNOohHMSchlWpXCD5
BNXE7vYJ7J5png==
X-Received: by 2002:a05:6000:2c13:b0:3a4:ed9a:7016 with SMTP id ffacd0b85a97d-3a526e1d833mr225600f8f.26.1749056086584;
Wed, 04 Jun 2025 09:54:46 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IEGyE8OyvTcTRJ+Ojy5kNOLlEVm5dxXrNtoBkm4cJYtYHAXG13nNuoW0OzHVyL762PpnSHlww==
X-Received: by 2002:a05:6000:2c13:b0:3a4:ed9a:7016 with SMTP id ffacd0b85a97d-3a526e1d833mr225575f8f.26.1749056086177;
Wed, 04 Jun 2025 09:54:46 -0700 (PDT)
Received: from [192.168.10.81] ([151.49.64.79])
by smtp.googlemail.com with ESMTPSA id 5b1f17b1804b1-450d800658csm203489145e9.27.2025.06.04.09.54.45
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 09:54:45 -0700 (PDT)
Message-ID: <2667fad4-3635-413b-87a9-26cb6102ffab@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 18:54:44 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH 11/15] KVM: x86: Add CONFIG_KVM_IOAPIC to allow disabling
in-kernel I/O APIC
To: Sean Christopherson <seanjc@xxxxxxxxxx>, Kai Huang <kai.huang@xxxxxxxxx>
Cc: "kvm@xxxxxxxxxxxxxxx" <kvm@xxxxxxxxxxxxxxx>,
"linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>,
"vkuznets@xxxxxxxxxx" <vkuznets@xxxxxxxxxx>
References: <20250519232808.2745331-1-seanjc@xxxxxxxxxx>
<20250519232808.2745331-12-seanjc@xxxxxxxxxx>
<d131524927ffe1ec70300296343acdebd31c35b3.camel@xxxxxxxxx>
<019c1023c26e827dc538f24d885ec9a8530ad4af.camel@xxxxxxxxx>
<aDhvs1tXH6pv8MxN@xxxxxxxxxx>
<58a580b0f3274f6a7bba8431b2a6e6fef152b237.camel@xxxxxxxxx>
<aDjo16EcJiWx9Nfa@xxxxxxxxxx>
From: Paolo Bonzini <pbonzini@xxxxxxxxxx>
Content-Language: en-US
Autocrypt: addr=pbonzini@xxxxxxxxxx; keydata=
xsEhBFRCcBIBDqDGsz4K0zZun3jh+U6Z9wNGLKQ0kSFyjN38gMqU1SfP+TUNQepFHb/Gc0E2
CxXPkIBTvYY+ZPkoTh5xF9oS1jqI8iRLzouzF8yXs3QjQIZ2SfuCxSVwlV65jotcjD2FTN04
hVopm9llFijNZpVIOGUTqzM4U55sdsCcZUluWM6x4HSOdw5F5Utxfp1wOjD/v92Lrax0hjiX
DResHSt48q+8FrZzY+AUbkUS+Jm34qjswdrgsC5uxeVcLkBgWLmov2kMaMROT0YmFY6A3m1S
P/kXmHDXxhe23gKb3dgwxUTpENDBGcfEzrzilWueOeUWiOcWuFOed/C3SyijBx3Av/lbCsHU
Vx6pMycNTdzU1BuAroB+Y3mNEuW56Yd44jlInzG2UOwt9XjjdKkJZ1g0P9dwptwLEgTEd3Fo
UdhAQyRXGYO8oROiuh+RZ1lXp6AQ4ZjoyH8WLfTLf5g1EKCTc4C1sy1vQSdzIRu3rBIjAvnC
tGZADei1IExLqB3uzXKzZ1BZ+Z8hnt2og9hb7H0y8diYfEk2w3R7wEr+Ehk5NQsT2MPI2QBd
wEv1/Aj1DgUHZAHzG1QN9S8wNWQ6K9DqHZTBnI1hUlkp22zCSHK/6FwUCuYp1zcAEQEAAc0j
UGFvbG8gQm9uemluaSA8cGJvbnppbmlAcmVkaGF0LmNvbT7CwU0EEwECACMFAlRCcBICGwMH
CwkIBwMCAQYVCAIJCgsEFgIDAQIeAQIXgAAKCRB+FRAMzTZpsbceDp9IIN6BIA0Ol7MoB15E
11kRz/ewzryFY54tQlMnd4xxfH8MTQ/mm9I482YoSwPMdcWFAKnUX6Yo30tbLiNB8hzaHeRj
jx12K+ptqYbg+cevgOtbLAlL9kNgLLcsGqC2829jBCUTVeMSZDrzS97ole/YEez2qFpPnTV0
VrRWClWVfYh+JfzpXmgyhbkuwUxNFk421s4Ajp3d8nPPFUGgBG5HOxzkAm7xb1cjAuJ+oi/K
CHfkuN+fLZl/u3E/fw7vvOESApLU5o0icVXeakfSz0LsygEnekDbxPnE5af/9FEkXJD5EoYG
SEahaEtgNrR4qsyxyAGYgZlS70vkSSYJ+iT2rrwEiDlo31MzRo6Ba2FfHBSJ7lcYdPT7bbk9
AO3hlNMhNdUhoQv7M5HsnqZ6unvSHOKmReNaS9egAGdRN0/GPDWr9wroyJ65ZNQsHl9nXBqE
AukZNr5oJO5vxrYiAuuTSd6UI/xFkjtkzltG3mw5ao2bBpk/V/YuePrJsnPFHG7NhizrxttB
nTuOSCMo45pfHQ+XYd5K1+Cv/NzZFNWscm5htJ0HznY+oOsZvHTyGz3v91pn51dkRYN0otqr
bQ4tlFFuVjArBZcapSIe6NV8C4cEiSTOwE0EVEJx7gEIAMeHcVzuv2bp9HlWDp6+RkZe+vtl
KwAHplb/WH59j2wyG8V6i33+6MlSSJMOFnYUCCL77bucx9uImI5nX24PIlqT+zasVEEVGSRF
m8dgkcJDB7Tps0IkNrUi4yof3B3shR+vMY3i3Ip0e41zKx0CvlAhMOo6otaHmcxr35sWq1Jk
tLkbn3wG+fPQCVudJJECvVQ//UAthSSEklA50QtD2sBkmQ14ZryEyTHQ+E42K3j2IUmOLriF
dNr9NvE1QGmGyIcbw2NIVEBOK/GWxkS5+dmxM2iD4Jdaf2nSn3jlHjEXoPwpMs0KZsgdU0pP
JQzMUMwmB1wM8JxovFlPYrhNT9MAEQEAAcLBMwQYAQIACQUCVEJx7gIbDAAKCRB+FRAMzTZp
sadRDqCctLmYICZu4GSnie4lKXl+HqlLanpVMOoFNnWs9oRP47MbE2wv8OaYh5pNR9VVgyhD
OG0AU7oidG36OeUlrFDTfnPYYSF/mPCxHttosyt8O5kabxnIPv2URuAxDByz+iVbL+RjKaGM
GDph56ZTswlx75nZVtIukqzLAQ5fa8OALSGum0cFi4ptZUOhDNz1onz61klD6z3MODi0sBZN
Aj6guB2L/+2ZwElZEeRBERRd/uommlYuToAXfNRdUwrwl9gRMiA0WSyTb190zneRRDfpSK5d
usXnM/O+kr3Dm+Ui+UioPf6wgbn3T0o6I5BhVhs4h4hWmIW7iNhPjX1iybXfmb1gAFfjtHfL
xRUr64svXpyfJMScIQtBAm0ihWPltXkyITA92ngCmPdHa6M1hMh4RDX+Jf1fiWubzp1voAg0
JBrdmNZSQDz0iKmSrx8xkoXYfA3bgtFN8WJH2xgFL28XnqY4M6dLhJwV3z08tPSRqYFm4NMP
dRsn0/7oymhneL8RthIvjDDQ5ktUjMe8LtHr70OZE/TT88qvEdhiIVUogHdo4qBrk41+gGQh
b906Dudw5YhTJFU3nC6bbF2nrLlB4C/XSiH76ZvqzV0Z/cAMBo5NF/w=
In-Reply-To: <aDjo16EcJiWx9Nfa@xxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 5/30/25 01:08, Sean Christopherson wrote:
On Thu, May 29, 2025, Kai Huang wrote:
On Thu, 2025-05-29 at 07:31 -0700, Sean Christopherson wrote:
On Thu, May 29, 2025, Kai Huang wrote:
On Thu, 2025-05-29 at 23:55 +1200, Kai Huang wrote:
Do they only support userspace IRQ chip, or not support any IRQ chip at all?
The former, only userspace I/O APIC (and associated devices), though some VM
shapes, e.g. TDX, don't provide an I/O APIC or PIC.
Thanks for the info.
Just wondering what's the benefit of using userspace IRQCHIP instead of
emulating in the kernel?
Reduced kernel attack surface (this was especially true years ago, before KVM's
I/O APIC emulation was well-tested) and more flexibility (e.g. shipping userspace
changes is typically easier than shipping new kernels. I'm pretty sure there's
one more big one that I'm blanking on at the moment.
Feature-wise, the big one is support for IRQ remapping which is not
implemented in the in-kernel IOAPIC.
Forgot to ask:
Since this new Kconfig option is not only for IOAPIC but also includes PIC and
PIT, is CONFIG_KVM_IRQCHIP a better name?
I much prefer IOAPIC, because IRQCHIP is far too ambiguous and confusing, e.g.
just look at KVM's internal APIs, where these:
irqchip_in_kernel()
irqchip_kernel()
are not equivalent. In practice, no modern guest kernel is going to utilize the
PIC, and the PIT isn't an IRQ chip, i.e. isn't strictly covered by IRQCHIP either.
Right.
Maybe it is worth to further have dedicated Kconfig for PIC, PIT and IOAPIC?
Nah. PIC and I/O APIC can't be split (without new uAPI and non-trivial complexity),
and I highly doubt there is any use case that would want an in-kernel I/O APIC
with a userspace PIT. I.e. in practice, the three almost always come as a group;
either a setup wants all, or a setup wants none.
Without "almost", even. I think it's okay to make it CONFIG_KVM_IOAPIC,
it's not super accurate but there's no single word that convey "IOAPIC,
PIC and PIT".
Btw, I also find irqchip_in_kernel() and irqchip_kernel() confusing. I am not
sure the value of having irqchip_in_kernel() in fact. The guest should always
have an in-kernel APIC for modern guests. I am wondering whether we can get rid
of it completely (the logic will be it is always be true), or we can have a
Kconfig to only build it when user truly wants it.
irqchip_kernel() can be renamed to irqchip_full().
For better or worse, an in-kernel local APIC is still optional. I do hope/want
to make it mandatory, but that's not a small ABI change.
I am pretty sure that some users (was it DOSBox? or maybe even gVisor?)
would break.
Paolo
Return-Path: <linux-kernel+bounces-673554-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 10A1941E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:55:48 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 3993C3A6E8E
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:55:12 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id CC8461F4722;
Wed, 4 Jun 2025 16:54:52 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="I3svuSBm"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 84A7F1DDC00
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:54:50 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749056092; cv=none; b=HRNoTehAbwddXhwb4oj2UGhVnyLXtEgdxZeTjfFLwDwJihECxkZZG8AvO75L2bbZXHupQ91eDdSxkzhyJPV0F+Iv3ds/2sA5/JeFnbKEp3VoMi6TiHi0QxGFYLc4ADYk07z2r5UzkNjeUNyhqLdlc3IzmgezI3xarKvcWRt1JNA=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749056092; c=relaxed/simple;
bh=W01do5wY76nWoxIg5mxKnfoZrGLR+i9S8Z7A2Dc9Ies=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID:
MIME-Version:Content-Type; b=tbRjkMqD0S0yuyABZaxmEDQ4V5tLassGrIdPPHTp/KJVVDu/9/pBbhCsJpDPBgBK0pwELTh6pV/BjPwakuuJ94v8O/eAyAAm+PoKgzv+1A2S1BFLeS5TBPoMBJZ0oLaWRb0fWix5ZfHQvSrJpO5lN5dbQPcihGMkSo+olZvf83o=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=I3svuSBm; arc=none smtp.client-ip=170.10.129.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749056089;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references;
bh=W01do5wY76nWoxIg5mxKnfoZrGLR+i9S8Z7A2Dc9Ies=;
b=I3svuSBmD0ZYhc8GwaEwWk8eQ37WcUqwoPSTXWPWO+8nJDa+8pA2vU/F3KyLd2tRFSxyaY
eq/FgzwkfZ9emlUwI5RxQUWqm93oeZuDsi3ukUdI9HT1iizaOuQw0AuzZ2cQ8KZHms8gSn
EHoVxxpRGfRm5URnHRRMqkXtmAq1zJk=
Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com
[209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-489-4mzViDvOPMOAYHkplT0xrA-1; Wed, 04 Jun 2025 12:54:48 -0400
X-MC-Unique: 4mzViDvOPMOAYHkplT0xrA-1
X-Mimecast-MFC-AGG-ID: 4mzViDvOPMOAYHkplT0xrA_1749056087
Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-adb2a6688a4so3391566b.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 09:54:48 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749056087; x=1749660887;
h=content-transfer-encoding:mime-version:message-id:date:references
:in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=W01do5wY76nWoxIg5mxKnfoZrGLR+i9S8Z7A2Dc9Ies=;
b=ihT9IoHa5So2MtqP+p00ukr9CP78JfxZezB1AaNhFychXtd/K1V1qdF8z3BMAuyMt0
limDrKyqfqoosvGNDRs+hfg8gRgI4+T7FgBQ6pxjQ1PPWOr/yLsvNUGnVRVXYLO4aR0s
FbD8tS9+45hvWcapTUizB0K4cBZTihXpK0mWPa+C5mLjex4CSwEGIo5EoDKUxVqZp14Z
yrJS5Pe8TYOMvq1UIY94Q21FRGxHvESLYSRqjFzcwOQKK659AxNhL4LtOS4YNvsNBlu/
B5e1jEjx4DEuMsC6rY34fEgBeXjCja3Exhzc8cSaxLh5Ayhm4SS9AOE+tJqLzVgBa3cD
8URw==
X-Gm-Message-State: AOJu0Yxr+T8x18/krRDhZd9Q2ORv2z/l4Akedj1TgrHTYEJFf6D2ELLU
T48amtcKPJH6LoIeA3USP8wFkxSpgCP5dUmNSDHGch64kbLX2M7y5y6ESWTgFGCBxkYfuBCbSJ8
6Q55k2DfCy0hcRikQrvOfD277HlD1MjufvlMDN/4IjqE/NLTrfphUPNt0XifHx172dA==
X-Gm-Gg: ASbGncto94NAOHL4z4GUUSlFWK5FGrZZV06jJQlkwTdN6mksOqXXFUUUDROFkqVHyUq
XHyW7z+xBEVeDhnJOG7KWbnZXrApoISKhrkjE8ZA03FyfaU/qV+1F2iFiHoO07pvxq0cTMsxzV6
8j9Q7J3VT7ukcrMcPm/H3nI8yheTTYY/vTQGUd6dmimSPdA/eRbG9EQH7QFCqr3rHQ25r4pvX8i
+KYkYmikiFFDtdzNEnmCLVG2bjuovpKu2hVHaWUn+X/hCSTze38JK+lB8Y9oJHrysNUDfQdwjr7
bZCT+uM7LTzJypOexomh/W9shPd6oHBpXDmW
X-Received: by 2002:a17:907:60ca:b0:adb:469d:2221 with SMTP id a640c23a62f3a-addf8fb3392mr316906166b.45.1749056087034;
Wed, 04 Jun 2025 09:54:47 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IF4qiEZwqMaU8PlogC4zz14GcOUJ6vF7+mDiQZEwc00xgVAfFjugss6CGYBiTVHOcZyOXoQUA==
X-Received: by 2002:a17:907:60ca:b0:adb:469d:2221 with SMTP id a640c23a62f3a-addf8fb3392mr316901966b.45.1749056086612;
Wed, 04 Jun 2025 09:54:46 -0700 (PDT)
Received: from alrua-x1.borgediget.toke.dk ([45.145.92.2])
by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ada5d82e7ffsm1136170866b.68.2025.06.04.09.54.45
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 09:54:46 -0700 (PDT)
Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000)
id 286601AA915C; Wed, 04 Jun 2025 18:54:45 +0200 (CEST)
From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= <toke@xxxxxxxxxx>
To: Byungchul Park <byungchul@xxxxxx>, willy@xxxxxxxxxxxxx,
netdev@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx,
kernel_team@xxxxxxxxxxx, kuba@xxxxxxxxxx, almasrymina@xxxxxxxxxx,
ilias.apalodimas@xxxxxxxxxx, harry.yoo@xxxxxxxxxx, hawk@xxxxxxxxxx,
akpm@xxxxxxxxxxxxxxxxxxxx, davem@xxxxxxxxxxxxx, john.fastabend@xxxxxxxxx,
andrew+netdev@xxxxxxx, asml.silence@xxxxxxxxx, tariqt@xxxxxxxxxx,
edumazet@xxxxxxxxxx, pabeni@xxxxxxxxxx, saeedm@xxxxxxxxxx,
leon@xxxxxxxxxx, ast@xxxxxxxxxx, daniel@xxxxxxxxxxxxx, david@xxxxxxxxxx,
lorenzo.stoakes@xxxxxxxxxx, Liam.Howlett@xxxxxxxxxx, vbabka@xxxxxxx,
rppt@xxxxxxxxxx, surenb@xxxxxxxxxx, mhocko@xxxxxxxx, horms@xxxxxxxxxx,
linux-rdma@xxxxxxxxxxxxxxx, bpf@xxxxxxxxxxxxxxx, vishal.moola@xxxxxxxxx
Subject: Re: [RFC v4 07/18] page_pool: use netmem put API in
page_pool_return_netmem()
In-Reply-To: <20250604025246.61616-8-byungchul@xxxxxx>
References: <20250604025246.61616-1-byungchul@xxxxxx>
<20250604025246.61616-8-byungchul@xxxxxx>
X-Clacks-Overhead: GNU Terry Pratchett
Date: Wed, 04 Jun 2025 18:54:45 +0200
Message-ID: <87y0u7v44q.fsf@xxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Byungchul Park <byungchul@xxxxxx> writes:
Use netmem put API, put_netmem(), instead of put_page() in
page_pool_return_netmem().
While at it, delete #include <linux/mm.h> since the last put_page() in
page_pool.c has been just removed with this patch.
Signed-off-by: Byungchul Park <byungchul@xxxxxx>
Reviewed-by: Mina Almasry <almasrymina@xxxxxxxxxx>
Reviewed-by: Toke H=C3=B8iland-J=C3=B8rgensen <toke@xxxxxxxxxx>
Return-Path: <linux-kernel+bounces-673552-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 3FD0141E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:55:55 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 9175C1899934
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:55:23 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 76DB11EEA40;
Wed, 4 Jun 2025 16:54:42 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="icXspVYL"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id F36B31F1306
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:54:39 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749056081; cv=none; b=YEg+l/1jBaCFxQcNjTozGJhIoJlCHJxFDu9c/wQdTYfHb8l38dp1LgOaqUlLdWTQK+71/Fu+wHw005DkhumWeLolXdl8PQqRnVj87FZb6LjVvG4Lhz6lqFDvouXICZ2Qzd6DmSTMcRG7ZqkoDZU2eGxgaTPtqIXYVBAPoKm6JDc=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749056081; c=relaxed/simple;
bh=tcd0Zzewl9fyLQbRjA4EgreSr8MAtbggVIRO6sDPbgk=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID:
MIME-Version:Content-Type; b=sxby5W7jXTn6JBsf2Xw/J47OSp8bUlTPqkzU1AHY/QiGtMIMwqEVuBV1y9kST52VNozQw/yhccg1caWMG0ysFJPWdGWHWoC5Hke4qyqFFBdpYcg2IKWcgns3ateSGEXVnoi8b592UWlJ4OvrEeVgHekHrYlgnpb78gMSSOY5u6U=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=icXspVYL; arc=none smtp.client-ip=170.10.129.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749056079;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references;
bh=tcd0Zzewl9fyLQbRjA4EgreSr8MAtbggVIRO6sDPbgk=;
b=icXspVYLppPhFIJOs+7UyET7C/99Cx7SzcEAUjeDGFcDC9l10NVhMpBWxN+K/C5HMatSFI
sVzPhHW/FKpjE3cPRwz7K/EWiAVd8FHgkPfGmzrvfZMuWkzQO3QiiJo7GOfC8/YcRQmh5W
3LGrCXnYgPTFEMB9MZviF0tfxoVBlfI=
Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com
[209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-271-FxfIfxDMPy-ju0WBlupz6Q-1; Wed, 04 Jun 2025 12:54:37 -0400
X-MC-Unique: FxfIfxDMPy-ju0WBlupz6Q-1
X-Mimecast-MFC-AGG-ID: FxfIfxDMPy-ju0WBlupz6Q_1749056076
Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-55328b79ec3so72186e87.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 09:54:37 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749056076; x=1749660876;
h=content-transfer-encoding:mime-version:message-id:date:references
:in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=tcd0Zzewl9fyLQbRjA4EgreSr8MAtbggVIRO6sDPbgk=;
b=J4YryhwlZ8AKQk2yudlaJoCAAyhXvSBFp6MsbcjZ+prJfS4Dw183LMJ8L3SrWTd6Mn
414r5f41Vytu7VBMGRhalMwC8Xc4hAk2nAnbmerhv1nSI5EfmixsHMckT2phC8UDlT3M
9LpcMOGY/up586usWKuv+nSNVpGh9/UiFNYCSYmQOPFIWUlert22qp5pOwdqXjo+XMiP
RTlCIzRD/9qyd16laT2qWtoeRGzbU+kXu2qscNhUmSfMBPrMujqPATt665DDWjstf2C8
Q/JuvaBtu/smsS0sDTE7HTwVFBHFXAvX1gEmYLv8s6nqOHpJPLLvNQVgaXSBvSVAxcBl
pwMA==
X-Gm-Message-State: AOJu0Yx7sNGhwpiJ5y4tXNnZY8qeTJqIwhXtnoliTqPCywRXs1/5SB/P
Et4QIcKdJFNSRLQiv76PeOVj92PnhIGPqererWcd5juvYP0MQep41OJlWcP8ajBShPvB/fCvtYt
ivgNtsthRRowDIzjFQkXZncTkfMQFwRDGfK0ud3qFdF//LlZjLU8IM4AuRbviBBKsqg==
X-Gm-Gg: ASbGncvC2qmEEezOt2tPJbNQnYcySJCRK5KFhGPHepMHeaAfjtx2JLmNMGAs6OabhP/
YAd30z5zejB7uxp24+aIbxKB0e6hB5PZuZqiUKt8N3N3IrOxzjTBrtg26fV7ruP3q6RPB2gmC/d
iPlMxuqvJ7/vOZZCc4I/LYwYAhOvWNTTJ/SdoJHLkFSAr1idH9siEktpstbN/VpdrayHzOKT1yw
nRft8L+BNYm3Hkkswluu4o3aD1MXHt31v0QohOxHIZrihJjdjTa4oG2Ng3QbUqZqXSPRKNGX2ny
VCBX2gGzayw3UFIWGDM=
X-Received: by 2002:a17:907:7eaa:b0:adb:4085:fb88 with SMTP id a640c23a62f3a-ade075beddcmr32537866b.1.1749056064122;
Wed, 04 Jun 2025 09:54:24 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IE+FyEzbRQ7ljsnYaqZEY9RyRG/Pit4hUmUJvWYN4/otGwuEi027SbI5iZa7eBk4SkzaaVb2g==
X-Received: by 2002:a17:907:72c7:b0:ad8:93a3:29c2 with SMTP id a640c23a62f3a-ade077dafb1mr27934766b.14.1749056049265;
Wed, 04 Jun 2025 09:54:09 -0700 (PDT)
Received: from alrua-x1.borgediget.toke.dk ([2a0c:4d80:42:443::2])
by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ada6ad6abc2sm1124547566b.173.2025.06.04.09.54.08
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 09:54:08 -0700 (PDT)
Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000)
id 9A0E71AA9158; Wed, 04 Jun 2025 18:54:07 +0200 (CEST)
From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= <toke@xxxxxxxxxx>
To: Byungchul Park <byungchul@xxxxxx>, willy@xxxxxxxxxxxxx,
netdev@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx,
kernel_team@xxxxxxxxxxx, kuba@xxxxxxxxxx, almasrymina@xxxxxxxxxx,
ilias.apalodimas@xxxxxxxxxx, harry.yoo@xxxxxxxxxx, hawk@xxxxxxxxxx,
akpm@xxxxxxxxxxxxxxxxxxxx, davem@xxxxxxxxxxxxx, john.fastabend@xxxxxxxxx,
andrew+netdev@xxxxxxx, asml.silence@xxxxxxxxx, tariqt@xxxxxxxxxx,
edumazet@xxxxxxxxxx, pabeni@xxxxxxxxxx, saeedm@xxxxxxxxxx,
leon@xxxxxxxxxx, ast@xxxxxxxxxx, daniel@xxxxxxxxxxxxx, david@xxxxxxxxxx,
lorenzo.stoakes@xxxxxxxxxx, Liam.Howlett@xxxxxxxxxx, vbabka@xxxxxxx,
rppt@xxxxxxxxxx, surenb@xxxxxxxxxx, mhocko@xxxxxxxx, horms@xxxxxxxxxx,
linux-rdma@xxxxxxxxxxxxxxx, bpf@xxxxxxxxxxxxxxx, vishal.moola@xxxxxxxxx
Subject: Re: [RFC v4 03/18] page_pool: use netmem alloc/put APIs in
__page_pool_alloc_page_order()
In-Reply-To: <20250604025246.61616-4-byungchul@xxxxxx>
References: <20250604025246.61616-1-byungchul@xxxxxx>
<20250604025246.61616-4-byungchul@xxxxxx>
X-Clacks-Overhead: GNU Terry Pratchett
Date: Wed, 04 Jun 2025 18:54:07 +0200
Message-ID: <874iwvwiq8.fsf@xxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Byungchul Park <byungchul@xxxxxx> writes:
Use netmem alloc/put APIs instead of page alloc/put APIs and make it
return netmem_ref instead of struct page * in
__page_pool_alloc_page_order().
Signed-off-by: Byungchul Park <byungchul@xxxxxx>
Reviewed-by: Mina Almasry <almasrymina@xxxxxxxxxx>
Reviewed-by: Toke H=C3=B8iland-J=C3=B8rgensen <toke@xxxxxxxxxx>
Return-Path: <linux-kernel+bounces-673555-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 729F141E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:56:12 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 7DD0E1769D6
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:56:02 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 907321E5B9E;
Wed, 4 Jun 2025 16:55:14 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="VA99ODXP"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id B22A81E47B4
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:55:11 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749056113; cv=none; b=hcjgHJSYoRDQ1axmorU21yemx7LMh9jOs67/o45mNgjs29EsZHl5+cjeaU9gIpcVtgCaj/cVfvoxJ4/ZYQQBlEvu0C/xs4zsvewESra9RpWzLsfW12D59dX3gUM0vdzhrNvZCm7q/8i4LIWDLYMxF/QyqpAxmuFXdKdzZby/s2Y=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749056113; c=relaxed/simple;
bh=91TmU08FsImP3F4T6u8nGlGa+H7u7HZ0VJLL7es6Lfk=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID:
MIME-Version:Content-Type; b=cOo68m6pB+N/ykuaoJctt+SGHocnYj8jjISn/pg/1JWiVn98b8B5idS2XF9i6R49TGjp/i/32mgofDvkGEJq4JNSfwNd9KB2TMdgi14+bJXbAZqVUIqViNmcMOlXvH5eioYNuiiv/RTXGUXpFnX01ItBsDyjWvgqXelqYdp4kFE=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=VA99ODXP; arc=none smtp.client-ip=170.10.133.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749056110;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references;
bh=91TmU08FsImP3F4T6u8nGlGa+H7u7HZ0VJLL7es6Lfk=;
b=VA99ODXPXg6zqh4kZPT4CCBZfPIsmXUIYv/vYl5Ka5kITWH2qhcGFISvbHwK9S/b6DBN/j
dwYzyl3VJnIDjJ1JFiwgPH4MFngGY5fKnvhKrgob/k/6By/D8KcF6g8NL7BItoAqdbOxhS
ZCG+ueBQHnQPyPuvzGZN33Jl/D0Hoy0=
Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com
[209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-642-xfuiS45KMgWIgT7tYrC9uA-1; Wed, 04 Jun 2025 12:55:09 -0400
X-MC-Unique: xfuiS45KMgWIgT7tYrC9uA-1
X-Mimecast-MFC-AGG-ID: xfuiS45KMgWIgT7tYrC9uA_1749056108
Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-ad51ceda1d9so110249866b.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 09:55:09 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749056108; x=1749660908;
h=content-transfer-encoding:mime-version:message-id:date:references
:in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=91TmU08FsImP3F4T6u8nGlGa+H7u7HZ0VJLL7es6Lfk=;
b=EZzrrY+W+CgVYu0jrnzcGLjrtoKRso2/GsEEow5f15kUmOOcA2pOVnldhe5uyNx6jF
HgDCQL/NvOvbU3BY+boi9qXFXd1SeUr2umSukZcB4f/d1MMG9aA/YPjUTP5N9u1axdNY
KYIcMGXYGXjwNSrgoi6qsUGoP2miMN7oGbLZjepCIM/+6o0ZkA7p85GG9Bus5ol/MDYy
KgU4EfUnk43P7Pv8D9aWTKTfECOAwUn3I1k+miOQDg3hphcvqHBLhrIjYmPoaII290l6
q/UGZZFBLs++FM3V7Y9/EDFFKPMTzdwk7ejWWkr8JrqFjzIqeY/Lqv6oO90Q8IBMWUR3
7oyA==
X-Gm-Message-State: AOJu0YwBMXlhDuVxTU8NAJ1CYGSHNtTas1SbwPQKfQlav4AtsfjrIwB9
34k3ZqWvvLToAdJXXYji8mHEdhu+wS0bOizTDIw733XAabT0eL1vD8IW1ScEt5POLgfqztgZ6GF
vb0q41/6M7AUjR8ksbV3G8OMsdcuwTC4hCW1YrH4yCQnqbuhYCa4OonUdQRlPYRwemg==
X-Gm-Gg: ASbGncu8tcIApQ5Bs5ndKMkVWROkrB1yxzd+XUtKRyByVU+dMjDpP9qKwDgfmfEzmyN
5jrYCz0PbN8ZgfK4fnqbR3rR+8esiuynzpTM+crIBt7fPV9+r7yv3BQ1m4EwL+Ronl4xqOKGO9j
8tWxY0j+FwHGRHBFuybHISGbEgOjYSrrf2mhcIG22bFmtYPGvDjyAtmw/EkBNK/qAKIssrpEpmy
7FlbIq2uN5jp2Eiz7/4p7Lr8uouMy8yJz81CwFqLeb863952tHIoZ68XLLzOUilwQTmRdg5Irxu
QyHSL6D2
X-Received: by 2002:a17:907:3e08:b0:ad8:ace9:e280 with SMTP id a640c23a62f3a-ade075bc502mr29799866b.5.1749056108273;
Wed, 04 Jun 2025 09:55:08 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IHBc27ssHQiTtB4EgXSQkSof2j5qNISk4hB2PmUnwayLy3gFqhE1o5UG3eo/R6RPx6tePP/GQ==
X-Received: by 2002:a17:907:3e08:b0:ad8:ace9:e280 with SMTP id a640c23a62f3a-ade075bc502mr29794366b.5.1749056107818;
Wed, 04 Jun 2025 09:55:07 -0700 (PDT)
Received: from alrua-x1.borgediget.toke.dk ([2a0c:4d80:42:443::2])
by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ada5d84d1f7sm1118264566b.74.2025.06.04.09.55.07
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 09:55:07 -0700 (PDT)
Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000)
id 6A2151AA915E; Wed, 04 Jun 2025 18:55:06 +0200 (CEST)
From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= <toke@xxxxxxxxxx>
To: Byungchul Park <byungchul@xxxxxx>, willy@xxxxxxxxxxxxx,
netdev@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx,
kernel_team@xxxxxxxxxxx, kuba@xxxxxxxxxx, almasrymina@xxxxxxxxxx,
ilias.apalodimas@xxxxxxxxxx, harry.yoo@xxxxxxxxxx, hawk@xxxxxxxxxx,
akpm@xxxxxxxxxxxxxxxxxxxx, davem@xxxxxxxxxxxxx, john.fastabend@xxxxxxxxx,
andrew+netdev@xxxxxxx, asml.silence@xxxxxxxxx, tariqt@xxxxxxxxxx,
edumazet@xxxxxxxxxx, pabeni@xxxxxxxxxx, saeedm@xxxxxxxxxx,
leon@xxxxxxxxxx, ast@xxxxxxxxxx, daniel@xxxxxxxxxxxxx, david@xxxxxxxxxx,
lorenzo.stoakes@xxxxxxxxxx, Liam.Howlett@xxxxxxxxxx, vbabka@xxxxxxx,
rppt@xxxxxxxxxx, surenb@xxxxxxxxxx, mhocko@xxxxxxxx, horms@xxxxxxxxxx,
linux-rdma@xxxxxxxxxxxxxxx, bpf@xxxxxxxxxxxxxxx, vishal.moola@xxxxxxxxx
Subject: Re: [RFC v4 08/18] page_pool: rename __page_pool_release_page_dma()
to __page_pool_release_netmem_dma()
In-Reply-To: <20250604025246.61616-9-byungchul@xxxxxx>
References: <20250604025246.61616-1-byungchul@xxxxxx>
<20250604025246.61616-9-byungchul@xxxxxx>
X-Clacks-Overhead: GNU Terry Pratchett
Date: Wed, 04 Jun 2025 18:55:06 +0200
Message-ID: <87v7pbv445.fsf@xxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Byungchul Park <byungchul@xxxxxx> writes:
Now that __page_pool_release_page_dma() is for releasing netmem, not
struct page, rename it to __page_pool_release_netmem_dma() to reflect
what it does.
Signed-off-by: Byungchul Park <byungchul@xxxxxx>
Reviewed-by: Mina Almasry <almasrymina@xxxxxxxxxx>
Reviewed-by: Toke H=C3=B8iland-J=C3=B8rgensen <toke@xxxxxxxxxx>
Return-Path: <linux-kernel+bounces-673558-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 2118941E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:57:22 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id E56B8179179
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:57:06 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id D83931F4CA0;
Wed, 4 Jun 2025 16:55:53 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="bj4rCBMa"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 83DDA1EF37C
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:55:51 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749056153; cv=none; b=eA7CQ8Wu/1iZNyWn0LJ85LcCz4Js3cAEtUnYDPMegxu2bqr7CAriY/FX+SE4g90ijI071cGEHbv/NNwDMRhp0bAn9/6qNtJvyUwXBWf0HVXbLIIaRwjowHMPifJvKlwXm8L51vyi1q1/19rvRAOw2b/tIyrsHcCXHzkoan+9YqM=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749056153; c=relaxed/simple;
bh=8Sw6ZrIatdp9zV8VYnA2N077NI0xfChsEjWe7K4eQws=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID:
MIME-Version:Content-Type; b=NVPU2jNHHSq0KbHKC+SGRDc1m40zhgvCs+7cBudDoao1akuUWp766tnHef57T/YcXqv+URfiVK86USuo/n9J80YjbE3Kdd56qSRg0kQgVnTxqJVcBFNvBHQsVsmxMQ8en5huKMjvgsje28Nf0ZzUFIyi1lTeienPT6eSh56TPNk=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=bj4rCBMa; arc=none smtp.client-ip=170.10.129.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749056150;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references;
bh=8Sw6ZrIatdp9zV8VYnA2N077NI0xfChsEjWe7K4eQws=;
b=bj4rCBMahxrglJlQwhFjCbyHi7++XPXL15t3/hPuGy4AuNiDw7QafJ1izFDKdxAp3znrhD
K4r+txjXX5xmrkBy5rWaxSeREy9tbsJY2cVoMjE3stnXnYAtPUwI0tdoz1oXK5LSew8OzE
rOoq63oNzPfp1G57N/2ibKFz6PgAcCQ=
Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com
[209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-387-s_0IADkQOQebjUXXEERAyw-1; Wed, 04 Jun 2025 12:55:49 -0400
X-MC-Unique: s_0IADkQOQebjUXXEERAyw-1
X-Mimecast-MFC-AGG-ID: s_0IADkQOQebjUXXEERAyw_1749056148
Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-ad88ede92e2so2136366b.3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 09:55:48 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749056148; x=1749660948;
h=content-transfer-encoding:mime-version:message-id:date:references
:in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=8Sw6ZrIatdp9zV8VYnA2N077NI0xfChsEjWe7K4eQws=;
b=KLfWRVGWr1dr7qdR9XUfTviM4Aj8S8p/LRxPtcBiv19yMsdiQ5cQ6fwvykh83a7lIJ
yyfxHZ9WLc2xt60umxrhMwl5xcScaMHd8FvoLEfw2tGM0ozBbypa0EFAXkfCU4yLtB0M
z/04Z0JZBByVOSGjXE0OyrblTm1Joj8RB6xyeKRyul+t1ObEg0PDW0VcY8/kCiC6EsBg
g1XuVYxJz8hstsm1FrIv9IOGXxtqKUYB+v21LP5r0gyByy4MM6632UXCGaVAgvEEyq9h
en/Ml/+2NMIOlMZGmPEHOG4Q2ltOqphqrlefO+uUpKFg8UAlBrGWbdmOcqPWY8N5Cixe
a9Eg==
X-Gm-Message-State: AOJu0Yx4A23zQXHY2O+VZsROFPsUcllX5022jRgUI7Mp8UhSD7JGzJzM
p+sIWVXllDEbVzCjaEKwLG69vqGm5iXrNCZgETuOYzpirkobAc46k3o5GEvZZTfVlA3cKU+GpBo
IGaqKq7q/togGl+slyXbXFwxBfgHk+WOvF8SoL99gAO8rJmuyDzrmXUw+gtRqJM2L3A==
X-Gm-Gg: ASbGncutpvocJa+bozpj+cK/Ev8qXaqfQW7j/2tdU1gVQh/CAE96qkYbNsiaSKLk/9L
EPz9kYHXXQnIuiD92roDwQImTTY2pFtv4h66d7q4ZIiQtSfjn3kzkPPGuNURkCCVgm7It/yAb5s
bqLgcSFhDHU0UExHMgmoS2wt+3X5aA5Sc79ip+q+G+fCn9S7Ea1y8bHfmAoJh6/4VSoM33QpwdT
+4jkJH440mSig3RhUxxMjHZrZZVrA+2fk+GiuARCMg+PaLELLluQkAQSGnfYM/sXVj7gBswkBMC
4r+HFy7u0F4dcxgmOyv5GEEBIf97MFgTQz0F
X-Received: by 2002:a17:907:6e9e:b0:ad2:4fb7:6cd7 with SMTP id a640c23a62f3a-addf8c99908mr343451766b.2.1749056147782;
Wed, 04 Jun 2025 09:55:47 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IGYPG/Bjmaa00gr70znOgvLxuMNOHBq9tzeMq8cTFVTOyJdUQkjk6QowoSWQ/jATpsw4qluaQ==
X-Received: by 2002:a17:907:6e9e:b0:ad2:4fb7:6cd7 with SMTP id a640c23a62f3a-addf8c99908mr343446666b.2.1749056147365;
Wed, 04 Jun 2025 09:55:47 -0700 (PDT)
Received: from alrua-x1.borgediget.toke.dk ([45.145.92.2])
by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ada5dd043a9sm1117788866b.89.2025.06.04.09.55.46
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 09:55:46 -0700 (PDT)
Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000)
id EA8FF1AA9162; Wed, 04 Jun 2025 18:55:45 +0200 (CEST)
From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= <toke@xxxxxxxxxx>
To: Byungchul Park <byungchul@xxxxxx>, willy@xxxxxxxxxxxxx,
netdev@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx,
kernel_team@xxxxxxxxxxx, kuba@xxxxxxxxxx, almasrymina@xxxxxxxxxx,
ilias.apalodimas@xxxxxxxxxx, harry.yoo@xxxxxxxxxx, hawk@xxxxxxxxxx,
akpm@xxxxxxxxxxxxxxxxxxxx, davem@xxxxxxxxxxxxx, john.fastabend@xxxxxxxxx,
andrew+netdev@xxxxxxx, asml.silence@xxxxxxxxx, tariqt@xxxxxxxxxx,
edumazet@xxxxxxxxxx, pabeni@xxxxxxxxxx, saeedm@xxxxxxxxxx,
leon@xxxxxxxxxx, ast@xxxxxxxxxx, daniel@xxxxxxxxxxxxx, david@xxxxxxxxxx,
lorenzo.stoakes@xxxxxxxxxx, Liam.Howlett@xxxxxxxxxx, vbabka@xxxxxxx,
rppt@xxxxxxxxxx, surenb@xxxxxxxxxx, mhocko@xxxxxxxx, horms@xxxxxxxxxx,
linux-rdma@xxxxxxxxxxxxxxx, bpf@xxxxxxxxxxxxxxx, vishal.moola@xxxxxxxxx
Subject: Re: [RFC v4 12/18] netmem: use _Generic to cover const casting for
page_to_netmem()
In-Reply-To: <20250604025246.61616-13-byungchul@xxxxxx>
References: <20250604025246.61616-1-byungchul@xxxxxx>
<20250604025246.61616-13-byungchul@xxxxxx>
X-Clacks-Overhead: GNU Terry Pratchett
Date: Wed, 04 Jun 2025 18:55:45 +0200
Message-ID: <87plfjv432.fsf@xxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Byungchul Park <byungchul@xxxxxx> writes:
The current page_to_netmem() doesn't cover const casting resulting in
trying to cast const struct page * to const netmem_ref fails.
To cover the case, change page_to_netmem() to use macro and _Generic.
Signed-off-by: Byungchul Park <byungchul@xxxxxx>
Reviewed-by: Mina Almasry <almasrymina@xxxxxxxxxx>
Reviewed-by: Toke H=C3=B8iland-J=C3=B8rgensen <toke@xxxxxxxxxx>
Return-Path: <linux-kernel+bounces-673556-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 2910C41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:57:24 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 30AD4189B0C0
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:56:36 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 112FA1F4285;
Wed, 4 Jun 2025 16:55:22 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=riotgames.com header.i=@riotgames.com header.b="iXdqDuZl"
Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id AC3821E8348
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:55:19 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.48
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749056121; cv=none; b=Tg+wdrfFPX9XlRI3Y18/z6XVwsISLvduTqAwKV9b0U6FlDIRk6IYXCZHpml/JM89m8wirVtHs4WQav03O39F6hmDfyENIguM8qdbX7Gpt0cApLG7k48jReDwVBhopKl8jvPnYBYrXNOkviD/0clLMNNmFBm4eFSUHKSZgq72/7s=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749056121; c=relaxed/simple;
bh=AM+A6P9w2wkT0X0Ss8sfC+rK4sLbZj/SNTI2K8QsSFg=;
h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
To:Cc:Content-Type; b=EZkzcWsE1l/e6fKzTDJlREq/arFkfIM6BHzE8dWLylZedYphIUphTDe5kG2Blaf6nVKZ+fQpGACBbiYiud+g8TTrUqQ8g2ZcHr4BWfPvSzAM2YL4fVq8QNaJS9Wg+B21CzunUUxtacQQkbLVSCOEIxpHAoz+sqOGjhhk6jEDzSk=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=riotgames.com; spf=pass smtp.mailfrom=riotgames.com; dkim=pass (1024-bit key) header.d=riotgames.com header.i=@riotgames.com header.b=iXdqDuZl; arc=none smtp.client-ip=209.85.216.48
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=riotgames.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=riotgames.com
Received: by mail-pj1-f48.google.com with SMTP id 98e67ed59e1d1-3122a63201bso74642a91.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 09:55:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=riotgames.com; s=riotgames; t=1749056119; x=1749660919; darn=vger.kernel.org;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:from:to:cc:subject:date
:message-id:reply-to;
bh=AM+A6P9w2wkT0X0Ss8sfC+rK4sLbZj/SNTI2K8QsSFg=;
b=iXdqDuZlBH4gDyQQxyUTHepKQrLj73ZDyIYN5fhnC0YHLzKnBYRsD+LyXnLyYHPjlO
GPaiBxrQQ5epRK0oeJc4kP/t7aY7HhHVENHyLD03QmoSxF77odqBo2osHWJcmvtUhXAX
hhBi4s3uRpKFvQcyfJtSGAHBEvVmPcyoxENhw=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749056119; x=1749660919;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=AM+A6P9w2wkT0X0Ss8sfC+rK4sLbZj/SNTI2K8QsSFg=;
b=bj0EECofGu48JQS/MxiFYkTNlYNz9ksu/eAJZ+nU99heoPH3GfQ7zWwkATEzsx5GRE
2rSMh2uvFigZur2+1pnapdLwmRJnlUfKw0e7ncCQs0yuMOltNolChN92BWtt4TYHBHLr
ooEpIxo8CV5WPm37rlJkQig6jrius5mTCNKqgcwo2XXV6Rn/KDyllWXvOcj9yQy0I94H
kNsfiJlmOtspxl7WEfGsZaNYyFnQoRzfFuULo8X3z2dGhDHt08UueiFq867sSxqjP/yK
MN8xUzmVQesXG6QoS+Es2Cc2TUmPK+psA9KRSSl8D8S6F9raJxfE3RX/tTMOewGCHiYx
4eGw==
X-Forwarded-Encrypted: i=1; AJvYcCUOrCwCqU/t5yj96J0zQYtZEvGusu2Qndu11Sso5XH5WxPy78KyyfbrSYtnz9EaUL8TDXj2peYx8Ao27tM=@vger.kernel.org
X-Gm-Message-State: AOJu0YzyzTUgKL+r4KHr4mIuQfhmwNoDOS2vNpc7e/6Zt3zXMTyJq7mO
tou9r1icwasnnnpTRHvbYX/NSymH/WhChFMef6mNAe9C7wmSBG+K+KMIOlzgKvumbs0p1g3l7BB
eFHaiDO5npVE2UkTjjYzA0x6yp0Jfdvdrq+vB+Hi70Q==
X-Gm-Gg: ASbGncvPRiB4/eJEblDt0PCgTMlac1LTmFhOCkAdpaw3+qySzn61+r1eFA1PtcNwzty
opw9MB3rlEtQB4NxQ0R+12/vbgJbNN9vJTIanWgcDrJSg0A36fdl6AYnSzZx2BowgNdUPK5DtjK
AWAkb4qn0fPAQfVeoXv5/4BsE8FYxskYjd
X-Google-Smtp-Source: AGHT+IHSFm7AlkobZVkgSc2uHdOWwSJZnf8VUDuCELETibH45kd+R/oYzSGq4wkai7atxPvVDpyDGYc+gyHX+9/SSX8=
X-Received: by 2002:a17:90b:3d02:b0:312:e9d:4002 with SMTP id
98e67ed59e1d1-3130cdad8e7mr5604061a91.28.1749056118925; Wed, 04 Jun 2025
09:55:18 -0700 (PDT)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
References: <20250603150613.83802-1-minhquangbui99@xxxxxxxxx>
In-Reply-To: <20250603150613.83802-1-minhquangbui99@xxxxxxxxx>
From: Zvi Effron <zeffron@xxxxxxxxxxxxx>
Date: Wed, 4 Jun 2025 09:55:06 -0700
X-Gm-Features: AX0GCFuTjwtD_LQoMjFITQPds6k3nNGJ-eA3Q34d-mo_X9J99JpFJ2MIxKJ-Rd8
Message-ID: <CAC1LvL0xTSv9sBRYnD-ykDqQr+Reg7yB0uwAR158-+aAm1J1Ew@xxxxxxxxxxxxxx>
Subject: Re: [PATCH net] virtio-net: drop the multi-buffer XDP packet in zerocopy
To: Bui Quang Minh <minhquangbui99@xxxxxxxxx>
Cc: netdev@xxxxxxxxxxxxxxx, "Michael S. Tsirkin" <mst@xxxxxxxxxx>,
Jason Wang <jasowang@xxxxxxxxxx>, Xuan Zhuo <xuanzhuo@xxxxxxxxxxxxxxxxx>,
=?UTF-8?Q?Eugenio_P=C3=A9rez?= <eperezma@xxxxxxxxxx>,
Andrew Lunn <andrew+netdev@xxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>,
Eric Dumazet <edumazet@xxxxxxxxxx>, Jakub Kicinski <kuba@xxxxxxxxxx>, Paolo Abeni <pabeni@xxxxxxxxxx>,
Alexei Starovoitov <ast@xxxxxxxxxx>, Daniel Borkmann <daniel@xxxxxxxxxxxxx>,
Jesper Dangaard Brouer <hawk@xxxxxxxxxx>, John Fastabend <john.fastabend@xxxxxxxxx>,
virtualization@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
bpf@xxxxxxxxxxxxxxx, stable@xxxxxxxxxxxxxxx
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Tue, Jun 3, 2025 at 8:09=E2=80=AFAM Bui Quang Minh <minhquangbui99@gmail=
.com> wrote:
In virtio-net, we have not yet supported multi-buffer XDP packet in
zerocopy mode when there is a binding XDP program. However, in that
case, when receiving multi-buffer XDP packet, we skip the XDP program
and return XDP_PASS. As a result, the packet is passed to normal network
stack which is an incorrect behavior. This commit instead returns
XDP_DROP in that case.
Does it make more sense to return XDP_ABORTED? This seems like an unexpecte=
d
exception case to me, but I'm not familiar enough with virtio-net's multibu=
ffer
support.
Fixes: 99c861b44eb1 ("virtio_net: xsk: rx: support recv merge mode")
Cc: stable@xxxxxxxxxxxxxxx
Signed-off-by: Bui Quang Minh <minhquangbui99@xxxxxxxxx>
---
drivers/net/virtio_net.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index e53ba600605a..4c35324d6e5b 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -1309,9 +1309,14 @@ static struct sk_buff *virtnet_receive_xsk_merge(s=
truct net_device *dev, struct
ret =3D XDP_PASS;
rcu_read_lock();
prog =3D rcu_dereference(rq->xdp_prog);
- /* TODO: support multi buffer. */
- if (prog && num_buf =3D=3D 1)
- ret =3D virtnet_xdp_handler(prog, xdp, dev, xdp_xmit, stats);
+ if (prog) {
+ /* TODO: support multi buffer. */
+ if (num_buf =3D=3D 1)
+ ret =3D virtnet_xdp_handler(prog, xdp, dev, xdp_xmit,
+ stats);
+ else
+ ret =3D XDP_DROP;
+ }
rcu_read_unlock();
switch (ret) {
--
2.43.0
Return-Path: <linux-kernel+bounces-673559-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 1C58941E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:57:36 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 32FE717A524
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:57:18 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id C3B5A1EF37C;
Wed, 4 Jun 2025 16:56:09 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="M2cfcRLB"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 659AB1DE89A
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:56:07 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749056168; cv=none; b=RdsfwJ+bNU3dakg9wpCaMfkCkvfmIYrMvN7tK31Jb/LFw1ZNU9ec49FX8JsSK/+WtKvfroy0uwMlBqWL0WR7y9+lRwqd5QZyifTjKjxrKSfIwAIGfbmFFQYUegpVSz9YRldxJhYU9DwLheSb4DtM8mjqJ1kf0QgkSRDXJcA3pqE=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749056168; c=relaxed/simple;
bh=guOI/IMUZQ9iLqAt5X6Xtn9qc6QdSHzu5FrWDlK72OE=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=FEwbrPhcRvGydzMMH2NCGQ3ypJ48XPq0lPzCRC83xu/cNoe8OzmpMIW3RZM5PMZKQ1ZHBLoXd1pjwj2vOQrZ7UzE+f/6Z+Nxq7ZwSB74eFlinVX2HAvPb7XaZQILwFCzeKHcI3giSvFxR+RDcmeaPO3CdCSNTxGkc1FmS43Txwo=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=M2cfcRLB; arc=none smtp.client-ip=170.10.129.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749056166;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=I9PhEN/LIEN/gLsXY9mpqwVLXpzLhsWCN/lzXheaQis=;
b=M2cfcRLBlqfGo0brHMN4nGZfp9ieS90r2jwSfszbo3pQ4zYgfFlggL7aGlKa5EfBMyFycM
dk1qA4pAWewpr+yY9Zynf+XbIO0FJK61kzK0uJw0XNxP6bPzI3ykk4Cjt0fKT+W1vkaaRV
zLcVdqh6aCiMIZ7nDiKQlEaG/+0SL7I=
Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com
[209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-581-Bzgc3vrpO2iHpFEXfRzTJA-1; Wed, 04 Jun 2025 12:56:05 -0400
X-MC-Unique: Bzgc3vrpO2iHpFEXfRzTJA-1
X-Mimecast-MFC-AGG-ID: Bzgc3vrpO2iHpFEXfRzTJA_1749056164
Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-3a4eeed54c2so20982f8f.3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 09:56:05 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749056164; x=1749660964;
h=content-transfer-encoding:in-reply-to:autocrypt:content-language
:from:references:cc:to:subject:user-agent:mime-version:date
:message-id:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=I9PhEN/LIEN/gLsXY9mpqwVLXpzLhsWCN/lzXheaQis=;
b=jJ57wfi1+nAci5ui8WzJ9vTdnqrXrz71Rn+S7OtwyxVRPxLx5JJc9MVsLzpdMHXETf
d+r/w5eold8A2aTKsY3XU973hb4gqiqDyrdB/wWer5N9xGLLBsefIRj5rLnuCoZK0qGc
Xz8O6A4YvS6OgbvcCeim5VkuIEgtipsjtC+ZqSjAO7rvpUM6P3j9Y4XXbRubGtLtVSOu
pS6QAl6ESa+/JIRsNA09MNwH+u4xZhBZDF1SqV15muieRHFTmnRzPieyBmjAMKXbZHMv
JAu1cCc7mf5iJDzo5NcacAKujdXaEoidB45PJmyafKpv0Nj0wjwbYRAA0YYzhEJ0BAb8
RAdQ==
X-Forwarded-Encrypted: i=1; AJvYcCVuZYLbE9zIPmEXtuTUxNSRooQ83wGWjTOsjtbLPBS7zWX98O6109cEXdKvSltYh6WtWSM2F0gMKjltPCA=@vger.kernel.org
X-Gm-Message-State: AOJu0Yy5rSU2zvJqV0HlHbmrsLKfdqn5TGEjqceCQzhq8avebZsY4jqg
7GwdM2MymMHcprlnr1uccGaYH1tflKlwViQ16VxwF0PgAo4JQIl6nhXxDKYlV+4IsdWXhAptuLS
rGu4oywwTNosprBmDHAK4/1QOiYfpCo9qeQTB+h609hTUtbLiRgggrMKyZCBNqNSbNw==
X-Gm-Gg: ASbGncv60HamC4vSdlAIioOCJff9yohbEOefZ/VDP1WeUnb9x32EqKofcKhFw7XyUTX
bUEIFGLafXkHHswIXldUiPME5z+b3LWXyat3abtAEuJSYXa1AQB6TVA5touJfnA57fxeUonruyB
cMAdY5f8fw67gNc9S11XbSm+dPGxvVtO2FCh+vAw0AszdFr+l1yv1GUO4gcjqeR2UR38YDxJ5iY
LxPTz78Cqw6IJa5ZS9bXC2dkRxLK4EWplWb5+AjkdBjV3Ys2vT4UYaEs1Uz52jASsPymoviXlmY
KqeSu3apF4H9dw==
X-Received: by 2002:a5d:64c7:0:b0:3a4:dc0a:5c03 with SMTP id ffacd0b85a97d-3a51d96a1ffmr3221286f8f.39.1749056164121;
Wed, 04 Jun 2025 09:56:04 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IGS1/rFeCnYX1T3YAOENXA746Vcb7+JQHLYtoc/dOzG7V2U1TM7oVk/frUr9KrMyDQeVAs/Lw==
X-Received: by 2002:a5d:64c7:0:b0:3a4:dc0a:5c03 with SMTP id ffacd0b85a97d-3a51d96a1ffmr3221265f8f.39.1749056163705;
Wed, 04 Jun 2025 09:56:03 -0700 (PDT)
Received: from [192.168.10.81] ([151.49.64.79])
by smtp.googlemail.com with ESMTPSA id 5b1f17b1804b1-451f82879d8sm1959195e9.1.2025.06.04.09.56.02
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 09:56:02 -0700 (PDT)
Message-ID: <69a46b99-83af-4913-b5ec-e993d2edde35@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 18:56:02 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH 00/15] KVM: x86: Add I/O APIC kconfig, delete irq_comm.c
To: Sean Christopherson <seanjc@xxxxxxxxxx>,
Vitaly Kuznetsov <vkuznets@xxxxxxxxxx>
Cc: kvm@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx
References: <20250519232808.2745331-1-seanjc@xxxxxxxxxx>
From: Paolo Bonzini <pbonzini@xxxxxxxxxx>
Content-Language: en-US
Autocrypt: addr=pbonzini@xxxxxxxxxx; keydata=
xsEhBFRCcBIBDqDGsz4K0zZun3jh+U6Z9wNGLKQ0kSFyjN38gMqU1SfP+TUNQepFHb/Gc0E2
CxXPkIBTvYY+ZPkoTh5xF9oS1jqI8iRLzouzF8yXs3QjQIZ2SfuCxSVwlV65jotcjD2FTN04
hVopm9llFijNZpVIOGUTqzM4U55sdsCcZUluWM6x4HSOdw5F5Utxfp1wOjD/v92Lrax0hjiX
DResHSt48q+8FrZzY+AUbkUS+Jm34qjswdrgsC5uxeVcLkBgWLmov2kMaMROT0YmFY6A3m1S
P/kXmHDXxhe23gKb3dgwxUTpENDBGcfEzrzilWueOeUWiOcWuFOed/C3SyijBx3Av/lbCsHU
Vx6pMycNTdzU1BuAroB+Y3mNEuW56Yd44jlInzG2UOwt9XjjdKkJZ1g0P9dwptwLEgTEd3Fo
UdhAQyRXGYO8oROiuh+RZ1lXp6AQ4ZjoyH8WLfTLf5g1EKCTc4C1sy1vQSdzIRu3rBIjAvnC
tGZADei1IExLqB3uzXKzZ1BZ+Z8hnt2og9hb7H0y8diYfEk2w3R7wEr+Ehk5NQsT2MPI2QBd
wEv1/Aj1DgUHZAHzG1QN9S8wNWQ6K9DqHZTBnI1hUlkp22zCSHK/6FwUCuYp1zcAEQEAAc0j
UGFvbG8gQm9uemluaSA8cGJvbnppbmlAcmVkaGF0LmNvbT7CwU0EEwECACMFAlRCcBICGwMH
CwkIBwMCAQYVCAIJCgsEFgIDAQIeAQIXgAAKCRB+FRAMzTZpsbceDp9IIN6BIA0Ol7MoB15E
11kRz/ewzryFY54tQlMnd4xxfH8MTQ/mm9I482YoSwPMdcWFAKnUX6Yo30tbLiNB8hzaHeRj
jx12K+ptqYbg+cevgOtbLAlL9kNgLLcsGqC2829jBCUTVeMSZDrzS97ole/YEez2qFpPnTV0
VrRWClWVfYh+JfzpXmgyhbkuwUxNFk421s4Ajp3d8nPPFUGgBG5HOxzkAm7xb1cjAuJ+oi/K
CHfkuN+fLZl/u3E/fw7vvOESApLU5o0icVXeakfSz0LsygEnekDbxPnE5af/9FEkXJD5EoYG
SEahaEtgNrR4qsyxyAGYgZlS70vkSSYJ+iT2rrwEiDlo31MzRo6Ba2FfHBSJ7lcYdPT7bbk9
AO3hlNMhNdUhoQv7M5HsnqZ6unvSHOKmReNaS9egAGdRN0/GPDWr9wroyJ65ZNQsHl9nXBqE
AukZNr5oJO5vxrYiAuuTSd6UI/xFkjtkzltG3mw5ao2bBpk/V/YuePrJsnPFHG7NhizrxttB
nTuOSCMo45pfHQ+XYd5K1+Cv/NzZFNWscm5htJ0HznY+oOsZvHTyGz3v91pn51dkRYN0otqr
bQ4tlFFuVjArBZcapSIe6NV8C4cEiSTOwE0EVEJx7gEIAMeHcVzuv2bp9HlWDp6+RkZe+vtl
KwAHplb/WH59j2wyG8V6i33+6MlSSJMOFnYUCCL77bucx9uImI5nX24PIlqT+zasVEEVGSRF
m8dgkcJDB7Tps0IkNrUi4yof3B3shR+vMY3i3Ip0e41zKx0CvlAhMOo6otaHmcxr35sWq1Jk
tLkbn3wG+fPQCVudJJECvVQ//UAthSSEklA50QtD2sBkmQ14ZryEyTHQ+E42K3j2IUmOLriF
dNr9NvE1QGmGyIcbw2NIVEBOK/GWxkS5+dmxM2iD4Jdaf2nSn3jlHjEXoPwpMs0KZsgdU0pP
JQzMUMwmB1wM8JxovFlPYrhNT9MAEQEAAcLBMwQYAQIACQUCVEJx7gIbDAAKCRB+FRAMzTZp
sadRDqCctLmYICZu4GSnie4lKXl+HqlLanpVMOoFNnWs9oRP47MbE2wv8OaYh5pNR9VVgyhD
OG0AU7oidG36OeUlrFDTfnPYYSF/mPCxHttosyt8O5kabxnIPv2URuAxDByz+iVbL+RjKaGM
GDph56ZTswlx75nZVtIukqzLAQ5fa8OALSGum0cFi4ptZUOhDNz1onz61klD6z3MODi0sBZN
Aj6guB2L/+2ZwElZEeRBERRd/uommlYuToAXfNRdUwrwl9gRMiA0WSyTb190zneRRDfpSK5d
usXnM/O+kr3Dm+Ui+UioPf6wgbn3T0o6I5BhVhs4h4hWmIW7iNhPjX1iybXfmb1gAFfjtHfL
xRUr64svXpyfJMScIQtBAm0ihWPltXkyITA92ngCmPdHa6M1hMh4RDX+Jf1fiWubzp1voAg0
JBrdmNZSQDz0iKmSrx8xkoXYfA3bgtFN8WJH2xgFL28XnqY4M6dLhJwV3z08tPSRqYFm4NMP
dRsn0/7oymhneL8RthIvjDDQ5ktUjMe8LtHr70OZE/TT88qvEdhiIVUogHdo4qBrk41+gGQh
b906Dudw5YhTJFU3nC6bbF2nrLlB4C/XSiH76ZvqzV0Z/cAMBo5NF/w=
In-Reply-To: <20250519232808.2745331-1-seanjc@xxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 5/20/25 01:27, Sean Christopherson wrote:
This series is prep work for the big device posted IRQs overhaul[1], in which
Paolo suggested getting rid of arch/x86/kvm/irq_comm.c[2]. As I started
chipping away bits of irq_comm.c to make the final code movement to irq.c as
small as possible, I realized that (a) a rather large amount of irq_comm.c was
actually I/O APIC code and (b) this would be a perfect opportunity to further
isolate the I/O APIC code.
So, a bit of hacking later and voila, CONFIG_KVM_IOAPIC. Similar to KVM's SMM
and Xen Kconfigs, this is something we would enable in production straightaway,
if we could magically fast-forwarded our kernel, as fully disabling I/O APIC
emulation puts a decent chunk of guest-visible surface entirely out of reach.
Side topic, Paolo's recollection that irq_comm.c was to hold common APIs between
x86 and Itanium was spot on. Though when I read Paolo's mail, I parsed "ia64"
as x86-64. I got quite a good laugh when I eventually realized that he really
did mean ia64 :-)
I totally did!
Looks good, other than the small comments here and there that you
received and my "preference" for keeping kvm_setup_default_irq_routing()
a separate function.
Thanks,
Paolo
Return-Path: <linux-kernel+bounces-673557-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 4746E41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:57:44 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 3DF26189BB7B
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:56:59 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id E1D981FBCAF;
Wed, 4 Jun 2025 16:55:27 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="e+JY7lRk"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8CF861FAC4A
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:55:25 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749056127; cv=none; b=DRSS7zScKCfjJS6IGhe5r821UPXArWN4zQJZMvJJ+R3sD59WgnRfkWb2281ZhQyj6Ef6jeq1V+nCaHpCAnmxCh+DUYuFnAhtNQ4do7IHCBWPzXgTV6l5OXgMWt7BmRtWVctXITuwrADYKk/v9j99SpRIdaNJupFa1VDzh0TEm0U=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749056127; c=relaxed/simple;
bh=EnhN4jFQnJm7PRT0iNbSmd2PcRrtPdhuDjTVGsmqhS4=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID:
MIME-Version:Content-Type; b=oZX1f/pHebqVRhev5rK2Tw4d6O3DmEol9PfBSu9UAxr6U6k+Aj9q1HFqXcEb1z91Sj6eMlVzIfI0zt7u9ToxXQyKN/3oOAok0dqqgOYW5VjBgRZQ+Y7V8ly5MRRrjyE2oIV2sJ9UDV+AuAzOhYVWLOBXTZ51Lh/rP3VyYjRcI1I=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=e+JY7lRk; arc=none smtp.client-ip=170.10.133.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749056124;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references;
bh=EnhN4jFQnJm7PRT0iNbSmd2PcRrtPdhuDjTVGsmqhS4=;
b=e+JY7lRkeEFH1WDkkSgZX4cdKUaYz14uMpxSe9UBmezBezA3Yqe9f7NAjfna6JLgne7K6B
lWXypxLVS7i0Z7/qt4PV5S/aLiEATVaF1QOjSkQhpxI7wWOf8lWFI1XGLfzw1m8QfqqEsN
0+aesdrky074C/w2gOD6czvCu870s7w=
Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com
[209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-50-NIooSwK4NLedkY1Et2X7Yg-1; Wed, 04 Jun 2025 12:55:23 -0400
X-MC-Unique: NIooSwK4NLedkY1Et2X7Yg-1
X-Mimecast-MFC-AGG-ID: NIooSwK4NLedkY1Et2X7Yg_1749056122
Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-60498322443so7171407a12.2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 09:55:23 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749056122; x=1749660922;
h=content-transfer-encoding:mime-version:message-id:date:references
:in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=EnhN4jFQnJm7PRT0iNbSmd2PcRrtPdhuDjTVGsmqhS4=;
b=Iuv/lWWnWXW8ibUOHUqv6ilP0QIVVK/DKxlCcrEH7xgKtYfM1lOnRYvyOd7xnoU82E
nXLWXovsFDEnS1Wes3aBVgsVOOaCARfPF9yETHT2XtdaaTdRnCmJgy2dipuEnBEZMHxE
xIMo7Q4YGxBgNwSTAT+rGH5++atzNsgb39YRL3LhbFOxo7T0ZI5sVnhhXhYh5JFrm9sh
MWN2wai7esyhAAdiEB1VkCbUhv3llq1kYsNCi16k1lSPa60THIWAKij14G3zVxbqpJEP
Wffm/tKSnDsQiWQhXtaVzqNb7f9ZvvQ3ySSdMFwl+WYBkBz1k88Ta5XxIRamGn+pm/J2
9IMg==
X-Gm-Message-State: AOJu0Yyh0yn8x6pKUiyy3/zNtBQF19ExSc++UbMDKL5Lm5Uq+1ECK4hF
T2OadO56yoxGlcLBvB66xwUWtgOBqqnA0tNv9pVWFkp/38vpeFPGlKNXNE/vkmG9wHhoS7en2tO
zZqv7/c4OEBEsTeLBQqgF2Izy+Yf7K0x1VOOTEtjYhy8XUhuml07wFxpjqCoCo/xDCQ==
X-Gm-Gg: ASbGncsgU0ibn8SEFPNnWJUXtz3x4OK2Klb77tEtXpNK6hi2GfaGPruSvEBaIaXu6JP
GuWvFkyW2JsaCyBMuTQWH1oFIIAxrs+yGycj6+djGailTsuzFVLTAjy3RL/VEsA+LXYhpcYfF8m
Ve7ryEyxyY8YKBWEFWQ/U/jxe3YHzb0Xpc4qLsZ9KubOwgCPPcz4rVh4fkjbjbA56jQsiOf1Tn3
MbcABsdr81rw3seBKGF2vmMU11be7GNs99xYwdhO9KJFgkOIVHIVznxkl6fZR5pHSGT+vXJP7Pz
otM64oSz
X-Received: by 2002:a50:9f8a:0:b0:606:f836:c656 with SMTP id 4fb4d7f45d1cf-606f836d433mr1955694a12.19.1749056122169;
Wed, 04 Jun 2025 09:55:22 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IF+BjJ2HDUdmh+5/RYHtCz7LviWdEXcE1ZllvhVdcERGB6/R14KgQ+G7LcqUq87LQrs0WIhnw==
X-Received: by 2002:a50:9f8a:0:b0:606:f836:c656 with SMTP id 4fb4d7f45d1cf-606f836d433mr1955643a12.19.1749056121651;
Wed, 04 Jun 2025 09:55:21 -0700 (PDT)
Received: from alrua-x1.borgediget.toke.dk ([2a0c:4d80:42:443::2])
by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-60566c5a8f1sm9163889a12.20.2025.06.04.09.55.20
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 09:55:21 -0700 (PDT)
Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000)
id 0ABE61AA9160; Wed, 04 Jun 2025 18:55:20 +0200 (CEST)
From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= <toke@xxxxxxxxxx>
To: Byungchul Park <byungchul@xxxxxx>, willy@xxxxxxxxxxxxx,
netdev@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx,
kernel_team@xxxxxxxxxxx, kuba@xxxxxxxxxx, almasrymina@xxxxxxxxxx,
ilias.apalodimas@xxxxxxxxxx, harry.yoo@xxxxxxxxxx, hawk@xxxxxxxxxx,
akpm@xxxxxxxxxxxxxxxxxxxx, davem@xxxxxxxxxxxxx, john.fastabend@xxxxxxxxx,
andrew+netdev@xxxxxxx, asml.silence@xxxxxxxxx, tariqt@xxxxxxxxxx,
edumazet@xxxxxxxxxx, pabeni@xxxxxxxxxx, saeedm@xxxxxxxxxx,
leon@xxxxxxxxxx, ast@xxxxxxxxxx, daniel@xxxxxxxxxxxxx, david@xxxxxxxxxx,
lorenzo.stoakes@xxxxxxxxxx, Liam.Howlett@xxxxxxxxxx, vbabka@xxxxxxx,
rppt@xxxxxxxxxx, surenb@xxxxxxxxxx, mhocko@xxxxxxxx, horms@xxxxxxxxxx,
linux-rdma@xxxxxxxxxxxxxxx, bpf@xxxxxxxxxxxxxxx, vishal.moola@xxxxxxxxx
Subject: Re: [RFC v4 09/18] page_pool: rename __page_pool_put_page() to
__page_pool_put_netmem()
In-Reply-To: <20250604025246.61616-10-byungchul@xxxxxx>
References: <20250604025246.61616-1-byungchul@xxxxxx>
<20250604025246.61616-10-byungchul@xxxxxx>
X-Clacks-Overhead: GNU Terry Pratchett
Date: Wed, 04 Jun 2025 18:55:19 +0200
Message-ID: <87sekfv43s.fsf@xxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Byungchul Park <byungchul@xxxxxx> writes:
Now that __page_pool_put_page() puts netmem, not struct page, rename it
to __page_pool_put_netmem() to reflect what it does.
Signed-off-by: Byungchul Park <byungchul@xxxxxx>
Reviewed-by: Mina Almasry <almasrymina@xxxxxxxxxx>
Reviewed-by: Toke H=C3=B8iland-J=C3=B8rgensen <toke@xxxxxxxxxx>
Return-Path: <linux-kernel+bounces-673560-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 36F5541E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:57:45 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 463FE7A8D94
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:56:25 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id EB0261F7575;
Wed, 4 Jun 2025 16:56:42 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="FDNhrA2t"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 65A5E1F2C44
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:56:39 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749056202; cv=none; b=HTWNAqCj0Wva+BlKuWZ3gCTAIxOW+3o52UJT3/dFVhTz/KP49OleVFSq/wGobSTc/WVrqdiKgjec6zmzHhVMq+FzPU2os59oECfBBDogLnwE6cULWqhBhGp2Wuf5ccZV6cosMSOsj+4fOrRsp7N40DBSOcFpOTZdjj6o55cUsG0=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749056202; c=relaxed/simple;
bh=hHWkN+1W3r8pcWm5IykqgahYA5ORV1Tz/OpKi1g0bhg=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID:
MIME-Version:Content-Type; b=ujboKMvBLkbp6d29QuyJhnW02D7XzsKttj8sfDPUDJAT9KhwaxgEAtL1lBKjk+/bwrV32Pt+76mHz2J/5qMSL5PLCWHqp3oSTRqgRPphNvESWSOLXum3HypIva0zbVm5wTfWsgIELur5Bdfw+/4EZ9Bh36kHGRi7Ubi54Mzfuq8=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=FDNhrA2t; arc=none smtp.client-ip=170.10.133.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749056198;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references;
bh=2I81AuUlYQ9366SJCkTTKCrVJZ04owtIVy2X3Og2iB4=;
b=FDNhrA2tBSuNsYVdsr+ntslc40l//cJPdwjELnunNdTvwWlzRmLXNJr0/pNnoqowpA0f2/
ExQJ4rQ7dyXaEKSKYZTbTjQrLB5h+2Ou2f7AyhHdw9/LOBR5gITCF7Fu/Z2ndev4CS2eL5
fVtJEo6/sYaXDw4vSdJXJ/kkqp4rXlI=
Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com
[209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-590-tpyY9lqCOZ6WIiBppIvszQ-1; Wed, 04 Jun 2025 12:56:37 -0400
X-MC-Unique: tpyY9lqCOZ6WIiBppIvszQ-1
X-Mimecast-MFC-AGG-ID: tpyY9lqCOZ6WIiBppIvszQ_1749056196
Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-ad89a3bcc62so10975466b.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 09:56:36 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749056196; x=1749660996;
h=content-transfer-encoding:mime-version:message-id:date:references
:in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=2I81AuUlYQ9366SJCkTTKCrVJZ04owtIVy2X3Og2iB4=;
b=k3th6Ff02FUbhIdC/Pxy0SzgobMN67TzE0v8SbFnhI7ERMzhixtbcCr9g1JPYPI3sy
WetYV0omzfUlWTppZ+VBeg2wXn4+gf4dHN9mFCrVz6Pm+M14OXrJqf5ZhW0EnJjnVWv6
gZwxaZbRFW0+kWxva/5pjx89vYnwfEZQQml4ppFelX6N/UGYk7klQWJ4uWwPGBLO4y7L
G/2j7Ph4MxwBrv+jjKo9lXWuUpSkyQRo6jHkO9M5iYjE/DF2cjwcZFPPXV+/r3JQIwaP
NvDrUDGoc68wzbF8oM3r68fogUbDbojwZmtCodTOI8vVTOw9gS136hD9CAVCEPK+6Cmq
z9MQ==
X-Gm-Message-State: AOJu0YyQoTlyiby05EcwpmQG+8R1xz7+ttT+T4u0Le0BTkDB5fFRAy7E
P8x6rcAw5/4O90vUbUpNt+t1Qxaig4a6rUkzlG0pzfuV6SKvXwHow/CL8E+WALTEn5H5FjvRiUP
V78m43XWw7KWT+HI1RFqhmq+7IdUFphdFq45zToo8TrWCWOmH/wWAY1KEfNtJ3nSLzQ==
X-Gm-Gg: ASbGncv+OtUEhKwkBrlvBuRRXNv2DKntp+g68A/d1Y09YRo49iyJo5hhKQxKtH2cqm1
i7fMo71pROb1L5EZyo9fSC18T8ZhL6FUQbchSxIIQ+KpmDaPHGCZqPjC+43vL4hYszlTxI5HvZN
b8UbYGlJvtf053R6A9A9ZTDdyZ6ivl2wGUu1Ir6es1dKl6SJ9DDEif1PmvC78sPISuomRnruXNM
QURIjG3ugV1hrI8AlDJBrh7xsRFpm9I2Eh8+oG5oQ5cB6xQdx5oZDWjNqEio4T8Pd0nKfUXeVq4
aCZSgAi6
X-Received: by 2002:a17:907:9410:b0:ad5:eff:db32 with SMTP id a640c23a62f3a-addf8fbbcbamr374232566b.48.1749056195764;
Wed, 04 Jun 2025 09:56:35 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IFyDZZleVWiVesfO9YTAhzLK2xLG6f1Ssys6/5lTY37/ymkAbmNiWcQtPEP0I7NoOuKWqtMkg==
X-Received: by 2002:a17:907:9410:b0:ad5:eff:db32 with SMTP id a640c23a62f3a-addf8fbbcbamr374230266b.48.1749056195333;
Wed, 04 Jun 2025 09:56:35 -0700 (PDT)
Received: from alrua-x1.borgediget.toke.dk ([2a0c:4d80:42:443::2])
by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ada6ad39f08sm1135981966b.144.2025.06.04.09.56.34
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 09:56:34 -0700 (PDT)
Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000)
id 06E6B1AA9164; Wed, 04 Jun 2025 18:56:34 +0200 (CEST)
From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= <toke@xxxxxxxxxx>
To: Byungchul Park <byungchul@xxxxxx>, willy@xxxxxxxxxxxxx,
netdev@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx,
kernel_team@xxxxxxxxxxx, kuba@xxxxxxxxxx, almasrymina@xxxxxxxxxx,
ilias.apalodimas@xxxxxxxxxx, harry.yoo@xxxxxxxxxx, hawk@xxxxxxxxxx,
akpm@xxxxxxxxxxxxxxxxxxxx, davem@xxxxxxxxxxxxx, john.fastabend@xxxxxxxxx,
andrew+netdev@xxxxxxx, asml.silence@xxxxxxxxx, tariqt@xxxxxxxxxx,
edumazet@xxxxxxxxxx, pabeni@xxxxxxxxxx, saeedm@xxxxxxxxxx,
leon@xxxxxxxxxx, ast@xxxxxxxxxx, daniel@xxxxxxxxxxxxx, david@xxxxxxxxxx,
lorenzo.stoakes@xxxxxxxxxx, Liam.Howlett@xxxxxxxxxx, vbabka@xxxxxxx,
rppt@xxxxxxxxxx, surenb@xxxxxxxxxx, mhocko@xxxxxxxx, horms@xxxxxxxxxx,
linux-rdma@xxxxxxxxxxxxxxx, bpf@xxxxxxxxxxxxxxx, vishal.moola@xxxxxxxxx
Subject: Re: [RFC v4 13/18] netmem: remove __netmem_get_pp()
In-Reply-To: <20250604025246.61616-14-byungchul@xxxxxx>
References: <20250604025246.61616-1-byungchul@xxxxxx>
<20250604025246.61616-14-byungchul@xxxxxx>
X-Clacks-Overhead: GNU Terry Pratchett
Date: Wed, 04 Jun 2025 18:56:33 +0200
Message-ID: <87msanv41q.fsf@xxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Byungchul Park <byungchul@xxxxxx> writes:
There are no users of __netmem_get_pp(). Remove it.
Signed-off-by: Byungchul Park <byungchul@xxxxxx>
Reviewed-by: Mina Almasry <almasrymina@xxxxxxxxxx>
Reviewed-by: Toke H=C3=B8iland-J=C3=B8rgensen <toke@xxxxxxxxxx>
Return-Path: <linux-kernel+bounces-673562-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 2EC4C41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:59:39 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 667E13A22AD
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:59:11 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id B7A901EE03D;
Wed, 4 Jun 2025 16:59:24 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ZVv59Uga"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9A8291E5714
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:59:22 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749056364; cv=none; b=sio/AQc7Xedwyyp2Y2a8Yjcd40fii6PVen00zUn8mcZ4Xz7KLUs4dkH+6rTdJLKeCtEx46Z8vkJSJEC0bQ4U19Zwrhp0/frPk4S1bDAQFMsT7YDxUlV9Sz/yWRhxzskQQD+0wnUza1n5AQcSV1I3hSvzN/FA0tnen6vK6JhIpCE=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749056364; c=relaxed/simple;
bh=AwLlp//63F4GIVocx29/odhVq+nfcN5ufbpel09x4kk=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID:
MIME-Version:Content-Type; b=G6ENExg8GrZH90wL/yoyJgYFJgI7QF/704WMUFyCp6ImC8hV8/GCbmB5NChETvFBkCZ2rDDeOkWznOVZUFe6SCcGd+6aGsFQektcIVj2gob/u1ovl0Via+25VvavyIyYybt72GzKOlayBoX6c+5U4O0QEg2zfInH5J4Lueb58zk=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=ZVv59Uga; arc=none smtp.client-ip=170.10.133.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749056361;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references;
bh=AwLlp//63F4GIVocx29/odhVq+nfcN5ufbpel09x4kk=;
b=ZVv59UgawJsysdOnA13WI8zKUnVZiBUG4EmtlbGuasyDuPdHRQH/aoOBdBOkIh7QniKbzw
u8frrlUXwpT8iDl5wezwFzcRPURCTNcFihqlHVt/GCh9MUuOZV89kydguEoQoRuNtamR3H
f8GxB2bKMDEuyceBTNSZZuX6/zPv8NM=
Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com
[209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-450-euThyyFCNBieWwcb94z3iA-1; Wed, 04 Jun 2025 12:59:20 -0400
X-MC-Unique: euThyyFCNBieWwcb94z3iA-1
X-Mimecast-MFC-AGG-ID: euThyyFCNBieWwcb94z3iA_1749056359
Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-ad5697c4537so12496566b.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 09:59:20 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749056359; x=1749661159;
h=content-transfer-encoding:mime-version:message-id:date:references
:in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=AwLlp//63F4GIVocx29/odhVq+nfcN5ufbpel09x4kk=;
b=Y1Raec2OSVkbitT12p4woIpJwqCetbT3lFnn8hOPqeMyxpEUQyE1IYBXX/0FaOhH/D
8gDkHLWzNAAdV4LEdOCLkvGRdVEEkPIJobuYympg3JXyYB9CcqEaCw5ENdIJWzsFyUYj
T8B7+yUJLDtZxCrwrVbHD2UumCaCzp34jPfdbyxEAPtEsfBqZqyZdvv/JmW5SY4p5CMs
lsVwUZFOphXBO6mvF/FK0/ZTyaNIU/WY83TaOJPFYZ8ACveRaeJe/cGz+uUMfPIqntP6
Eq59r8iz0nv2jGljRf+jlonRkSVP4bfLs9YQj9EVUceeIjgJ/bdK8ndfRCH3ww8d/vkF
aAsA==
X-Gm-Message-State: AOJu0YxMl7E0a37J3Y8u5dFn3x29GoQ0M1PZe/ua26nkwLCSnGwk0o8w
alxFUryey5us5rXtgfM3JfKeJjzqMm296BVudxzrDXrnJcwcc8hJAF0kR8/VVQbpitTNg8QVy+/
w4AljWpsLQSXZwfAN4DwRZnAtKngXGAY7kEywKUWH7kkBnDA0maGypFfDCAn2CkxXFA==
X-Gm-Gg: ASbGncssA/lDU7xeNqaDpbBe5DrGuNr26DIH/SiTcSSquYJk18Ee/njW3dW51r1s3c5
md7N3MM6K3OQ5P3ue52HfLLTliRCt88/odl/3mbqbpD0HvKYMLROoefAmcJxJupGwJoI4rVzFFY
9MR+4rCbF5XB9IAMhSgyrQAWq4/peM/O52xf7VEQrKQGRyFnaW9P8MkKeVYoXe3M03RJumpNl+5
i9LL0aCqzMuG8llm7lVIJpx+wNo6NiPRtwUuv/PyazKKu1Nh0s7Nqv6yFugRWsohkt045weL0+e
cbfYn8B+
X-Received: by 2002:a17:907:3d02:b0:ad5:7048:5177 with SMTP id a640c23a62f3a-ade07826795mr23292966b.23.1749056359069;
Wed, 04 Jun 2025 09:59:19 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IE4ivvclbp7JuzcZvieRJ0FZQ1qJdp5hxjTJ3O1n+o2T0S7e90wjVjWqBmgYnG1KObQxDSmLA==
X-Received: by 2002:a17:907:3d02:b0:ad5:7048:5177 with SMTP id a640c23a62f3a-ade07826795mr23290366b.23.1749056358629;
Wed, 04 Jun 2025 09:59:18 -0700 (PDT)
Received: from alrua-x1.borgediget.toke.dk ([2a0c:4d80:42:443::2])
by smtp.gmail.com with ESMTPSA id a640c23a62f3a-adb2d1e2d32sm1031777366b.60.2025.06.04.09.59.17
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 09:59:18 -0700 (PDT)
Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000)
id 1929B1AA9168; Wed, 04 Jun 2025 18:59:17 +0200 (CEST)
From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= <toke@xxxxxxxxxx>
To: Byungchul Park <byungchul@xxxxxx>, willy@xxxxxxxxxxxxx,
netdev@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx,
kernel_team@xxxxxxxxxxx, kuba@xxxxxxxxxx, almasrymina@xxxxxxxxxx,
ilias.apalodimas@xxxxxxxxxx, harry.yoo@xxxxxxxxxx, hawk@xxxxxxxxxx,
akpm@xxxxxxxxxxxxxxxxxxxx, davem@xxxxxxxxxxxxx, john.fastabend@xxxxxxxxx,
andrew+netdev@xxxxxxx, asml.silence@xxxxxxxxx, tariqt@xxxxxxxxxx,
edumazet@xxxxxxxxxx, pabeni@xxxxxxxxxx, saeedm@xxxxxxxxxx,
leon@xxxxxxxxxx, ast@xxxxxxxxxx, daniel@xxxxxxxxxxxxx, david@xxxxxxxxxx,
lorenzo.stoakes@xxxxxxxxxx, Liam.Howlett@xxxxxxxxxx, vbabka@xxxxxxx,
rppt@xxxxxxxxxx, surenb@xxxxxxxxxx, mhocko@xxxxxxxx, horms@xxxxxxxxxx,
linux-rdma@xxxxxxxxxxxxxxx, bpf@xxxxxxxxxxxxxxx, vishal.moola@xxxxxxxxx
Subject: Re: [RFC v4 16/18] netmem: introduce a netmem API,
virt_to_head_netmem()
In-Reply-To: <20250604025246.61616-17-byungchul@xxxxxx>
References: <20250604025246.61616-1-byungchul@xxxxxx>
<20250604025246.61616-17-byungchul@xxxxxx>
X-Clacks-Overhead: GNU Terry Pratchett
Date: Wed, 04 Jun 2025 18:59:17 +0200
Message-ID: <87h60vv3x6.fsf@xxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Byungchul Park <byungchul@xxxxxx> writes:
To eliminate the use of struct page in page pool, the page pool code
should use netmem descriptor and APIs instead.
As part of the work, introduce a netmem API to convert a virtual address
to a head netmem allowing the code to use it rather than the existing
API, virt_to_head_page() for struct page.
Signed-off-by: Byungchul Park <byungchul@xxxxxx>
Reviewed-by: Toke H=C3=B8iland-J=C3=B8rgensen <toke@xxxxxxxxxx>
Return-Path: <linux-kernel+bounces-673561-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 219B641E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 12:59:41 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id E859C189D09B
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:58:17 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 924DC1F4611;
Wed, 4 Jun 2025 16:57:10 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="C21mvKqk"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5492A1E633C
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:57:08 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749056229; cv=none; b=lWWNJ2kfD/emz2GSb6DkLkbplhVNWa7jsjjgeOgKgrdqMeRqmE4RXyFVQTW5wdhugmVviA/LRYzBSREtCoGXclLjFLOt+2Q7mREyPCnlv23FOUAomBC0insazzEbkjM09N/fpROqlwXB8hoA8AEXgPgsqs62BXT7SBQdCDV/cP4=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749056229; c=relaxed/simple;
bh=Gw+d+3S7IYA06FhUQyd+hYu00sNtRnUnl76qT+h9VuM=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID:
MIME-Version:Content-Type; b=pBGY8Wt4ALYyE+PMlFRZniWkiM2SiTn4TuHhSbT1YXVaDWBgl/2Qe/ZXNsBIC373981WUxcXQV/nJCgBezZNVYO+ulfT7KbKKAGiEaD1x2rm9DvwcwQccqo+yGqYTd0pp3nbsSZo/GzzkCwI7vMNw0NsR+tIWix1CuNehbywIQE=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=C21mvKqk; arc=none smtp.client-ip=170.10.129.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749056227;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references;
bh=Gw+d+3S7IYA06FhUQyd+hYu00sNtRnUnl76qT+h9VuM=;
b=C21mvKqkLS0A/YrHS/EtdqzOYjc98nNuFpGO1bflNmzD7R9KSJTSTkheFTCtQV9dZaMjrM
Ecd/InFBn1gFdVjXuNrYkzZAJvI3JnKs+tNejMEM3B2EKgMiKe36Qx53mxuQJ/tWlBmAAT
IhvAPgpcB1SQ7LAncp3Q6sET49Iuczo=
Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com
[209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-665-nHu2NNCgMb-_wPZ8tsBZqg-1; Wed, 04 Jun 2025 12:57:06 -0400
X-MC-Unique: nHu2NNCgMb-_wPZ8tsBZqg-1
X-Mimecast-MFC-AGG-ID: nHu2NNCgMb-_wPZ8tsBZqg_1749056225
Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-ad5697c4537so12338066b.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 09:57:06 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749056225; x=1749661025;
h=content-transfer-encoding:mime-version:message-id:date:references
:in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=Gw+d+3S7IYA06FhUQyd+hYu00sNtRnUnl76qT+h9VuM=;
b=E+mhSLj/o+bcT3++H3m6c2lYXK+GjHqqmFHEiojXhiJ8wZubRcqPscqk9KPQW5M5dG
6u9vYTMueJ1O3RLIEARyB775umvK8UT6lFDgjsQLeejH78JVoY16h8V4Me7Bymt+oaU4
alSyUbrNE7DJhFbwgbePGzbkiBjuwp/4y62EIie8LAt+YXQi4jCEUYKcbVSddlp2Z4ZI
leI3obPtqEITLuvc4CP5gOSUIe9MUyn+j+RIcJir8724kj+0KG9niOtLHHfkrNhdSMK/
9Nj7VKSZTR3xxGHfX0PgI1EEkyNTh5bCNPfDs2IFvTLpk2j8SOwIPA9GE83YJziQgUOJ
N2rA==
X-Gm-Message-State: AOJu0YypkU9hVOfrfQqoqZ71mZyTrTt+KeW/ArVE7vSwTUNOTHwQZaQ+
2s0IaTOOoPKiO9odEsPGfrukQCAZhPDFcAKRgvidmBP3B3NoIW1daV+Eugfc3D++Roh8pL4jC0S
vY2kz/vXw/3QtuYPHize4zhJvwiZwcoo7Gu/4V81nG6dnoJvzz7e7N5ENUqDsvud+JQ==
X-Gm-Gg: ASbGncujP8yarN6WjJDg2z7NKm7NogC2bDZvhR1W0+X9XO91bjz/4U+lcF/dD4+MjGA
VeWnn7etV4TgC2k65urA1jRsJEIAyeG8P4FsjSvU+xUY2+v/H7UYWdGdS4gqxSQULIg4dsc1QpT
jpN/rpQPGB4ufOasTZ4krJe2/H/3QT2MS4O6B84v6ssMq5PgYZyoMchm7iXKbyqfa2kalSiKkT/
lkmqZv+MKRQUfPv/cagqcw0eHDaP6SP/PiiyH3S60C4TQMIsYet3MCr927EHmzdtX5H7wFivHQH
ZRah7M1KKFjVZbhMie8=
X-Received: by 2002:a17:907:1c26:b0:ad8:942b:1d53 with SMTP id a640c23a62f3a-ade078951c7mr24902266b.27.1749056225228;
Wed, 04 Jun 2025 09:57:05 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IHqG4TOAjPvMml/YdZyEoQ+QahksC02aQ5Whxm4dNHjvxJYD+wb6qalU2zcWL3KxMHhCO06XA==
X-Received: by 2002:a17:907:1c26:b0:ad8:942b:1d53 with SMTP id a640c23a62f3a-ade078951c7mr24899166b.27.1749056224800;
Wed, 04 Jun 2025 09:57:04 -0700 (PDT)
Received: from alrua-x1.borgediget.toke.dk ([2a0c:4d80:42:443::2])
by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ada6ad6ab8esm1110204166b.185.2025.06.04.09.57.03
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 09:57:04 -0700 (PDT)
Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000)
id 59CA91AA9166; Wed, 04 Jun 2025 18:57:03 +0200 (CEST)
From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= <toke@xxxxxxxxxx>
To: Byungchul Park <byungchul@xxxxxx>, willy@xxxxxxxxxxxxx,
netdev@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx,
kernel_team@xxxxxxxxxxx, kuba@xxxxxxxxxx, almasrymina@xxxxxxxxxx,
ilias.apalodimas@xxxxxxxxxx, harry.yoo@xxxxxxxxxx, hawk@xxxxxxxxxx,
akpm@xxxxxxxxxxxxxxxxxxxx, davem@xxxxxxxxxxxxx, john.fastabend@xxxxxxxxx,
andrew+netdev@xxxxxxx, asml.silence@xxxxxxxxx, tariqt@xxxxxxxxxx,
edumazet@xxxxxxxxxx, pabeni@xxxxxxxxxx, saeedm@xxxxxxxxxx,
leon@xxxxxxxxxx, ast@xxxxxxxxxx, daniel@xxxxxxxxxxxxx, david@xxxxxxxxxx,
lorenzo.stoakes@xxxxxxxxxx, Liam.Howlett@xxxxxxxxxx, vbabka@xxxxxxx,
rppt@xxxxxxxxxx, surenb@xxxxxxxxxx, mhocko@xxxxxxxx, horms@xxxxxxxxxx,
linux-rdma@xxxxxxxxxxxxxxx, bpf@xxxxxxxxxxxxxxx, vishal.moola@xxxxxxxxx
Subject: Re: [RFC v4 14/18] page_pool: make page_pool_get_dma_addr() just
wrap page_pool_get_dma_addr_netmem()
In-Reply-To: <20250604025246.61616-15-byungchul@xxxxxx>
References: <20250604025246.61616-1-byungchul@xxxxxx>
<20250604025246.61616-15-byungchul@xxxxxx>
X-Clacks-Overhead: GNU Terry Pratchett
Date: Wed, 04 Jun 2025 18:57:03 +0200
Message-ID: <87jz5rv40w.fsf@xxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Byungchul Park <byungchul@xxxxxx> writes:
The page pool members in struct page cannot be removed unless it's not
allowed to access any of them via struct page.
Do not access 'page->dma_addr' directly in page_pool_get_dma_addr() but
just wrap page_pool_get_dma_addr_netmem() safely.
Signed-off-by: Byungchul Park <byungchul@xxxxxx>
Reviewed-by: Mina Almasry <almasrymina@xxxxxxxxxx>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@xxxxxxxxxx>
Reviewed-by: Toke H=C3=B8iland-J=C3=B8rgensen <toke@xxxxxxxxxx>
Return-Path: <linux-kernel+bounces-673563-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 2A5F841E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:00:48 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 8BC501893F83
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:00:06 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 7E2321BEF8C;
Wed, 4 Jun 2025 16:59:45 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="gBt9+c9J"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 49B04199237
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 16:59:42 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749056384; cv=none; b=nATzDfJdl2m6F1iS51f3Hgjcqpr7A2QYodI5PFr5OW4NIZArCY+oDCgN5vGJIS6EbUH4ZzwCSBL5pZAQV8KwkfPIGEnRxzvYt955RQxUZc8fFFINn+ldmYVF5X4kS/L3TvSNRi6d0u8KoN5eIfa853+uAFrFM5HHkvjKp4qxCRM=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749056384; c=relaxed/simple;
bh=TisxmFxL/O31Am4LeVuPkcK1xwB3+HHPha7PZiRcrV8=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID:
MIME-Version:Content-Type; b=cDqM7spJQLXsckx/DkGKTPMN/JNGyrnwqAyFXIXR5GtlE0ZY3vdhV6tBAZ/4ixJbC5KxQQrB6+iiEKUa3x0jeDazdL1BqetNE4l1y4cm7IcOvQ90S8rIa/Tu1emT30/fNqy2NnyaUVzMa2nHIOZtBVLJqrvcJcijujbehJGbZM0=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=gBt9+c9J; arc=none smtp.client-ip=170.10.133.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749056382;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references;
bh=RcDq3LrKSOS2wxrwTduRvwlyf6+kgRTg7vc6C+v+3YI=;
b=gBt9+c9J1qHaBqJCg4JT/z/ogrWIBvKWE2eKGh8hM+PxXd+AYlLWwddiYEExWu2hG/mO+J
z4+NWrjE+2LAeSAFEgcqSlGjT1Uxy1OWsu+MS4ky36qT+E2MB329vZy08wMFs8H63LOwhi
FKoM5GqGGTz3eUM4h3sL2wkxH6LhJVY=
Received: from mail-ed1-f70.google.com (mail-ed1-f70.google.com
[209.85.208.70]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-674-6w1GgkI5P_Cy5vSfdwRIWw-1; Wed, 04 Jun 2025 12:59:41 -0400
X-MC-Unique: 6w1GgkI5P_Cy5vSfdwRIWw-1
X-Mimecast-MFC-AGG-ID: 6w1GgkI5P_Cy5vSfdwRIWw_1749056380
Received: by mail-ed1-f70.google.com with SMTP id 4fb4d7f45d1cf-601ed3871a1so80715a12.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 09:59:40 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749056380; x=1749661180;
h=content-transfer-encoding:mime-version:message-id:date:references
:in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=RcDq3LrKSOS2wxrwTduRvwlyf6+kgRTg7vc6C+v+3YI=;
b=k18mlKB7jX+9NnBgP3Ae8lPzQ3A9aACAMgLUYjtmi8LlmfV5bomEjqj/23mp3SI/qG
LYc8bqyWRvfvlAgEvDyHYb6FIsrGPvFLm46xnl4T7tGpDz0XCP1+OBuKPsxx2dZpLMNO
PtJzj/fOh8uV4HuUMT35qcC3QcIbTj+LD9b7M5UDOXY8l0iyMFoGRVVe7GqR+ocNZ5JD
FwOYuLJjef6xh1vPU6hS8v5Y6Cx4C66eziWJxtp4ga02k8AxhELBFHifFSvfskIzgSUm
yO61Wbmq468Vm/+OwFCM3rZLUENbn97k21FrqG2DI/kvFFExs0qsj2iRJk3DhIxe8jh5
m15A==
X-Gm-Message-State: AOJu0Yy6xIIaAV/x80tLGPamsJ9biOtg3kpt1L0gbNFM8uVBPx/zO0tC
5Te/6ToAXHDYFZDqhrFClKx6L3L4c8AbVLVONQ5tvUXk31A/0/KsIvhCeUQZjjMsfHFRYNLMXwg
Cw2Jt+7DgjWmX58unvDNfuVD+eoUwveCs+ZLEcKttUlRj+Csy1OAOsqNcL0XwEvslrg==
X-Gm-Gg: ASbGncuxh+0626UiWauvgcJ7PWNIwiJpf4p73gfGRgySk6OZWBuUliIyse1AJbbNSsY
V2sRjXXXQxQ8fd410HDd/Yioyo0ejwkOlTvQ5nLcNLctZLvVdRP4qgUm6yuOsHcWUYGCQzmtsoy
NPgeyK71eMpUUqrBSFvgFQyjQvuVxGl+yEMSHDOHU9osVnf2HbR4a+THrdSqCM6TbsrQXZ5rucy
IiNHAuYIOQyaml3BnSkLeieuiWyaYaa3zHXpTXGMCwPw8DqS0PuUNsv3XEG9qZjRJ4ICRzeGiX4
vHz2dKLq
X-Received: by 2002:a05:6402:358e:b0:604:b87f:88b4 with SMTP id 4fb4d7f45d1cf-607226293a8mr293577a12.2.1749056379672;
Wed, 04 Jun 2025 09:59:39 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IEZxMOZadu+KBXSHu7RkEeaN6qtSvGLWFm1vInB8dLTiO0dgyXATXc6Hz79i4hKaPIEOdbWXw==
X-Received: by 2002:a05:6402:358e:b0:604:b87f:88b4 with SMTP id 4fb4d7f45d1cf-607226293a8mr293550a12.2.1749056379325;
Wed, 04 Jun 2025 09:59:39 -0700 (PDT)
Received: from alrua-x1.borgediget.toke.dk ([2a0c:4d80:42:443::2])
by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-606d7e17dd7sm1783024a12.48.2025.06.04.09.59.38
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 09:59:38 -0700 (PDT)
Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000)
id C55081AA916A; Wed, 04 Jun 2025 18:59:37 +0200 (CEST)
From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= <toke@xxxxxxxxxx>
To: Byungchul Park <byungchul@xxxxxx>, willy@xxxxxxxxxxxxx,
netdev@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx,
kernel_team@xxxxxxxxxxx, kuba@xxxxxxxxxx, almasrymina@xxxxxxxxxx,
ilias.apalodimas@xxxxxxxxxx, harry.yoo@xxxxxxxxxx, hawk@xxxxxxxxxx,
akpm@xxxxxxxxxxxxxxxxxxxx, davem@xxxxxxxxxxxxx, john.fastabend@xxxxxxxxx,
andrew+netdev@xxxxxxx, asml.silence@xxxxxxxxx, tariqt@xxxxxxxxxx,
edumazet@xxxxxxxxxx, pabeni@xxxxxxxxxx, saeedm@xxxxxxxxxx,
leon@xxxxxxxxxx, ast@xxxxxxxxxx, daniel@xxxxxxxxxxxxx, david@xxxxxxxxxx,
lorenzo.stoakes@xxxxxxxxxx, Liam.Howlett@xxxxxxxxxx, vbabka@xxxxxxx,
rppt@xxxxxxxxxx, surenb@xxxxxxxxxx, mhocko@xxxxxxxx, horms@xxxxxxxxxx,
linux-rdma@xxxxxxxxxxxxxxx, bpf@xxxxxxxxxxxxxxx, vishal.moola@xxxxxxxxx
Subject: Re: [RFC v4 18/18] page_pool: access ->pp_magic through struct
netmem_desc in page_pool_page_is_pp()
In-Reply-To: <20250604025246.61616-19-byungchul@xxxxxx>
References: <20250604025246.61616-1-byungchul@xxxxxx>
<20250604025246.61616-19-byungchul@xxxxxx>
X-Clacks-Overhead: GNU Terry Pratchett
Date: Wed, 04 Jun 2025 18:59:37 +0200
Message-ID: <87ecvzv3wm.fsf@xxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Byungchul Park <byungchul@xxxxxx> writes:
To simplify struct page, the effort to separate its own descriptor from
struct page is required and the work for page pool is on going.
To achieve that, all the code should avoid directly accessing page pool
members of struct page.
Access ->pp_magic through struct netmem_desc instead of directly
accessing it through struct page in page_pool_page_is_pp(). Plus, move
page_pool_page_is_pp() from mm.h to netmem.h to use struct netmem_desc
without header dependency issue.
Signed-off-by: Byungchul Park <byungchul@xxxxxx>
Reviewed-by: Toke H=C3=B8iland-J=C3=B8rgensen <toke@xxxxxxxxxx>
Return-Path: <linux-kernel+bounces-673564-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id A050241E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:02:04 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 5D0EB188A479
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:02:18 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 70E081EF39E;
Wed, 4 Jun 2025 17:01:57 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WkH5g+Tm"
Received: from mail-yw1-f179.google.com (mail-yw1-f179.google.com [209.85.128.179])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 53FE918E1F;
Wed, 4 Jun 2025 17:01:55 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.179
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749056516; cv=none; b=JMos5op84fF4hOc99ghhoo9Rz3lgtoVPKWrbtiDXjdkSHtgIMv8nWDwPhwffrqx3sW8qeghqWixsH92NakeKzLdQdkSUr2Vukr6p8/MPz+wEcv4nQJtGusuQI9ltC1PkS/rKqY/LhT9DMjxUBX6O9GiK7jUyhUPW2s9Q5VUaciU=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749056516; c=relaxed/simple;
bh=z4D7BKewdsk6/sKzjeJAuyPQOP5LvNsLtoRKwrLZjwc=;
h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject:
To:Cc:Content-Type; b=CdqbYK291Sdq96MJ3G1G+LYzKW5e0Nm40WsBYXAYxrtfGF0+unJsDMxOJSrNjOp7HBs8OQE7e+3dLbrSlDvrpAmqwU1FWNZQJmmheK+TsFuEMMw4XAvSezN+Zn7TEQCP/N+LuTf/fwITHXZ9jtEhflbIvw624YYsGqnBfL2vH0U=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=WkH5g+Tm; arc=none smtp.client-ip=209.85.128.179
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
Received: by mail-yw1-f179.google.com with SMTP id 00721157ae682-70e64b430daso938967b3.3;
Wed, 04 Jun 2025 10:01:55 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20230601; t=1749056514; x=1749661314; darn=vger.kernel.org;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:from:to:cc:subject:date
:message-id:reply-to;
bh=z4D7BKewdsk6/sKzjeJAuyPQOP5LvNsLtoRKwrLZjwc=;
b=WkH5g+TmihttARgEvOcqoAV7p00+lSH9JCX8I7Idj4Lns99bnqEacWw2TK/AgnkQp/
buCdsZv6Zwhld9nO82Rw+Zlx4TAoNVqFRwW8asKp3OqHtPyzipDsrpGtcup75qGSy05u
Io3/RKA8QrbY+rumqRGu8bfGjvaeqTDoCQY2APnizZ60C3gvq5gjVWgWQTM+hg++/byE
+iX4tOLav5keW1hzPRQGh/NJSk00PGWvNEE2JvY56NmvP7RaxKICEmG3peio1VEvly+9
BRtuT8X5qNSRpB7mJdiT5MjiM9zyCh6cziDf9l6/vKn4Xe4ufC+MRdIk+7eJX35X2IIJ
qtOg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749056514; x=1749661314;
h=content-transfer-encoding:cc:to:subject:message-id:date:from
:in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=z4D7BKewdsk6/sKzjeJAuyPQOP5LvNsLtoRKwrLZjwc=;
b=pgs4e9dhoY7Q57g2mAeuCxalZdWntgdaoFG8MLsa36SXGXafxQRD7O6bV4AL8SkO/w
KlysvRAE7kVlQQu7Pn9jrtPh5Dv/qDQMws1A9S+rNnqzi7/LKow00VFtotlD6xxCeeLT
U0tUEsdaOGh99LAzCvjvMeGoypu6wggMbQ9sfgVA0xWAFHhHrXfheRMwGIKoPwDmqt1/
E2IANVZsxKPg/2Jrg1S1/OIkh66LMcfXr1zfYrZx4zt9dqPGMT71WeOl5YhE8UfSu8gK
05+gAjC5Blgz+sSoh3HjAkR7UVVKSGFTnnbIE1Lq1vXbMUFgEWRYbubfTg7CUVm2+oDg
c9EA==
X-Forwarded-Encrypted: i=1; AJvYcCVD/Hlm4Q6wp90Rb6TGgxTMlVnBoN6l4RHwkjlg5xnzMM/+nLwHvfmsdUDdENhnEzC0Ciw/kpYGB1rkfsE=@vger.kernel.org
X-Gm-Message-State: AOJu0YzZi44w4S5DmX3xHLCT+JAQ82/hMJ4y2/nfrypMF8u7VJa6qHHN
WM7JKYT57JSz1bsAQMZNT9zePJMqd4o8LKsdiCOv5BcF5BsrysX7ylMtpCDDO2BbhbJajy8BZ3y
BzZbFF4IXyE6Cce9urDkjssFz9ScCML8=
X-Gm-Gg: ASbGncsZ+mr+nCM6+pfe8um/UuD6GCxFcX3k7/wMAxhjDzVjvDJXzFwTsr9kquXYxtx
NdvmvFU6k5m+E2du7oaFCoFRi5CDRi91XQ+5WcV9GOQmI5IMcNB6/y01vCQL1STf1ZQY8JZAFua
G+8ST8Ym2Vi2doFg9DBZbuP+SOTJvgigc=
X-Google-Smtp-Source: AGHT+IFIhKizpoGLqwiOSIUP8iiRAfmZbXmSeT9TIyueWI/d67XSMiKCYVWQ4BB4rdEMzKzneBplYge2hVU91ufFUJQ=
X-Received: by 2002:a05:690c:9a91:b0:70e:16a3:ce75 with SMTP id
00721157ae682-710d96a0d66mr49320637b3.0.1749056514120; Wed, 04 Jun 2025
10:01:54 -0700 (PDT)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
References: <20250604153510.55689-1-stefano.radaelli21@xxxxxxxxx> <CAOMZO5BYBMq=5ir8WQBEH=h6SPpm4MiUrDoDJvJEH6ioUCB11g@xxxxxxxxxxxxxx>
In-Reply-To: <CAOMZO5BYBMq=5ir8WQBEH=h6SPpm4MiUrDoDJvJEH6ioUCB11g@xxxxxxxxxxxxxx>
From: Stefano Radaelli <stefano.radaelli21@xxxxxxxxx>
Date: Wed, 4 Jun 2025 19:01:38 +0200
X-Gm-Features: AX0GCFsB5wB9ZHZCQ-2HQEOl8VOk15KDbCSQ2np75Eb_OgkyR8kGihI0TyVk6mw
Message-ID: <CAK+owojFg+A-_akaEO5wn=ghQpHBEvtc25bFp9qJX-vHh6SuHA@xxxxxxxxxxxxxx>
Subject: Re: [v2] arm64: dts: freescale: imx93-var-som: update eqos support
for MaxLinear PHY
To: Fabio Estevam <festevam@xxxxxxxxx>
Cc: devicetree@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, othacehe@xxxxxxx,
Rob Herring <robh@xxxxxxxxxx>, Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>,
Shawn Guo <shawnguo@xxxxxxxxxx>, Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>,
Pengutronix Kernel Team <kernel@xxxxxxxxxxxxxx>, imx@xxxxxxxxxxxxxxx,
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hi Fabio,
Good catch on both points, you're absolutely right.
I'll update the subject line to include "PATCH" and fix the incorrect refer=
ence
to the Murata chip (should have been ADIN1300BCPZ, of course).
Thanks again for the careful review!
Best Regards,
Stefano
Il giorno mer 4 giu 2025 alle ore 18:44 Fabio Estevam
<festevam@xxxxxxxxx> ha scritto:
Hi Stefano,
Nitpik: The subject line of your path should be:
Subject: [PATCH v2] arm64: dts: ....
and not only
Subject: [v2] rm64: dts: ....
On Wed, Jun 4, 2025 at 12:36=E2=80=AFPM Stefano Radaelli
<stefano.radaelli21@xxxxxxxxx> wrote:
>
> Variscite has updated the Ethernet PHY on the VAR-SOM-MX93 from the
> Murata CYW43353 to the MaxLinear MXL86110, as documented in the
Murata CYW43353 is a Wifi chip, not an Ethernet PHY.
I think you meant:
"from the ADIN1300BCPZ to the MaxLinear MXL86110"
Return-Path: <linux-kernel+bounces-673565-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 3BF5641E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:02:53 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 35A143A5FC1
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:02:29 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 1CF851F1522;
Wed, 4 Jun 2025 17:02:43 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="SnVW0jdU";
dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="wHTQ6Iok"
Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1929D1CAA82;
Wed, 4 Jun 2025 17:02:39 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749056561; cv=fail; b=el3YVlEtgLOq175+YiE7U/RwK3DBvWqMzK9rBfslgx0nvLO497cYSTgztxKfYyXy7EaMh9K5j3WBpqXJM67PuavTcp+P+MXhXwFyXCxKTbhsgM0XCHdp6EzGdPPZ9+i/BJMARpkIrTeezgzPDloG22TVK9ZSnPBlRmdtLoHt0bE=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749056561; c=relaxed/simple;
bh=6yE7+eIxvaUwzXtzJFwTmiRCV7cNRiofdxOL8aVCDpU=;
h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To:
Content-Type:MIME-Version; b=uTz+DqOD/KZ1NYQtd06FmcCJrqXGC1M2czWW7wW4K4Smpsp7KGikzx4cvi3nMVTRMED6LT7fhJQP9J2CzaQ+Hetfld0vDFTh+USp5H0VWuKmXkgJnILd+VJ9gr5g+1DUpzPHTr3fK31W6XtUe6VAu9vdUrkoCH6SebW6h8J6GHk=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=SnVW0jdU; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=wHTQ6Iok; arc=fail smtp.client-ip=205.220.177.32
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com
Received: from pps.filterd (m0246631.ppops.net [127.0.0.1])
by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 554FdvSn032156;
Wed, 4 Jun 2025 17:02:02 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc
:content-id:content-transfer-encoding:content-type:date:from
:in-reply-to:message-id:mime-version:references:subject:to; s=
corp-2025-04-25; bh=6yE7+eIxvaUwzXtzJFwTmiRCV7cNRiofdxOL8aVCDpU=; b=
SnVW0jdUz+RMkQa9r8YpLzu2tkik365YJbFePO6ECHVRPWXCh6cNNe1mdmjqiwXq
aMYhW+u9OcS5RR6+5XTsmoAkNaHbA+whi9mb3B+ec9dwTWL/jHMt9prBCFMPzB98
1zYmryuJMq4qaMqAXUYurWlDMSOcjpcS3SM+ipU07+78LSdeLJ2lrzgg1lIV+O5I
ADXOTyDDENgDwO4G9oXahnn9DKr+Texm4SX0e74GFtEtbISncO3v7p60kXFj89+O
FOCUx6AuUTQUQRAfdBYRUpLgejGHu6o2CElUNcVszSrV++LJpV/Y0Megr9kkGnGs
ephImpYtWRs8I/+eMFfWcw==
Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129])
by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 471g8dvg2k-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 04 Jun 2025 17:02:02 +0000 (GMT)
Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1])
by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 554FroXf034871;
Wed, 4 Jun 2025 17:02:01 GMT
Received: from sj2pr03cu001.outbound.protection.outlook.com (mail-westusazon11012058.outbound.protection.outlook.com [52.101.43.58])
by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 46yr7b945v-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 04 Jun 2025 17:02:01 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=Xw8ZEriaC/iq+JFclA9pMrqOhUvim/Q1NuNR6TYEj2r7SAVfQrI1UiA8lEbJBum7zEPgD8ggGVgVyH+qxZFcTZqf5pNLFJqaxb6/ohCrnPCPnKSXqP7wwR9dpWIItXcCJwNlL60YFb9f0My7lvjA09xVj9jKzhg3DRId5V2rJ1icXi2UZbBgFEqMX7gn8N7pKqEQ1PwP8ojEZfx51N6fr80jTlMdzCpsXD25BDRs8LxH1Oc536xPTo4svPbTsiHMJMifOypR3j/dMySVICKu27MCkmxPK6Im3Pq3JRnEeMZha3CPDrI+094nhCfyeucAlvYo81GhToq7rDZgf082iQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=6yE7+eIxvaUwzXtzJFwTmiRCV7cNRiofdxOL8aVCDpU=;
b=Yj9cePz1i4eLHI8iuUgIMkee3qzR8Fj7M4m6yc0gRad9BRxNbtybz8ivSBe5NSO9JDA/EODL5XLosPYgBk1EdWCDCGg9QK+1i3zAmXUkJSauZU4eByD089PsKV2yBWkb3jQq+sEIX386hsY6LTsgiuFQESYJBa7CcC/WVBFB0auQzye0d8IWGxETdhb/h/hY2MAPi+9jqNBRtXza9WCRS3uOvu9Uh6eeK0cMB+jIHeeKMA1kyvEmerQ7X0vyJYBd8tz/NL4B6cIPH77clugSTmNiSE1oZQLo+dx/sPgRhqZyTCa/VAMzBaGD02YKwqHW73PdDxXksGxL3RaNPD9dEQ==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com;
dkim=pass header.d=oracle.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=6yE7+eIxvaUwzXtzJFwTmiRCV7cNRiofdxOL8aVCDpU=;
b=wHTQ6IokwGUptqS40nPCSVq0Y+aSTWKid6R4saYx5eWK0utT0RG6lB5Ui9aBxrf5901JaM9CySohiQZNgq/WI1rSt+tlW/rwHaYn8/8C+8qZ5sjPu4xualhLgh6NAq4t3qc1QrzIZhX52/roNOTfNAE/ICIPHTy423U51AwOddU=
Received: from PH7PR10MB7730.namprd10.prod.outlook.com (2603:10b6:510:308::13)
by DS0PR10MB6152.namprd10.prod.outlook.com (2603:10b6:8:c4::19) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8746.41; Wed, 4 Jun
2025 17:01:58 +0000
Received: from PH7PR10MB7730.namprd10.prod.outlook.com
([fe80::7ac6:2653:966f:9411]) by PH7PR10MB7730.namprd10.prod.outlook.com
([fe80::7ac6:2653:966f:9411%4]) with mapi id 15.20.8792.034; Wed, 4 Jun 2025
17:01:58 +0000
From: Eric Snowberg <eric.snowberg@xxxxxxxxxx>
To: Vitaly Kuznetsov <vkuznets@xxxxxxxxxx>
CC: "linux-security-module@xxxxxxxxxxxxxxx"
<linux-security-module@xxxxxxxxxxxxxxx>,
"linux-integrity@xxxxxxxxxxxxxxx"
<linux-integrity@xxxxxxxxxxxxxxx>,
"linux-modules@xxxxxxxxxxxxxxx"
<linux-modules@xxxxxxxxxxxxxxx>,
"linux-kernel@xxxxxxxxxxxxxxx"
<linux-kernel@xxxxxxxxxxxxxxx>,
"linux-doc@xxxxxxxxxxxxxxx"
<linux-doc@xxxxxxxxxxxxxxx>,
"keyrings@xxxxxxxxxxxxxxx"
<keyrings@xxxxxxxxxxxxxxx>,
David Howells <dhowells@xxxxxxxxxx>,
David
Woodhouse <dwmw2@xxxxxxxxxxxxx>,
Jonathan Corbet <corbet@xxxxxxx>,
Luis
Chamberlain <mcgrof@xxxxxxxxxx>,
Petr Pavlu <petr.pavlu@xxxxxxxx>,
Sami
Tolvanen <samitolvanen@xxxxxxxxxx>,
Daniel Gomez <da.gomez@xxxxxxxxxxx>, Mimi
Zohar <zohar@xxxxxxxxxxxxx>,
Roberto Sassu <roberto.sassu@xxxxxxxxxx>,
Dmitry
Kasatkin <dmitry.kasatkin@xxxxxxxxx>,
Paul Moore <paul@xxxxxxxxxxxxxx>, James
Morris <jmorris@xxxxxxxxx>,
"Serge E. Hallyn" <serge@xxxxxxxxxx>, Peter Jones
<pjones@xxxxxxxxxx>,
Robert Holmes <robeholmes@xxxxxxxxx>,
Jeremy Cline
<jcline@xxxxxxxxxx>, Coiby Xu <coxu@xxxxxxxxxx>,
James Bottomley
<James.Bottomley@xxxxxxxxxxxxxxxxxxxxx>,
Gerd Hoffmann <kraxel@xxxxxxxxxx>
Subject: Re: [PATCH RFC 0/1] module: Optionally use .platform keyring for
signatures verification
Thread-Topic: [PATCH RFC 0/1] module: Optionally use .platform keyring for
signatures verification
Thread-Index: AQHb08HkgcEyJxmAAEWMnJeO5wKlP7PzPTKA
Date: Wed, 4 Jun 2025 17:01:58 +0000
Message-ID: <0FD18D05-6114-4A25-BD77-C32C1D706CC3@xxxxxxxxxx>
References: <20250602132535.897944-1-vkuznets@xxxxxxxxxx>
In-Reply-To: <20250602132535.897944-1-vkuznets@xxxxxxxxxx>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-mailer: Apple Mail (2.3826.600.51.1.1)
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: PH7PR10MB7730:EE_|DS0PR10MB6152:EE_
x-ms-office365-filtering-correlation-id: 9e5fb36e-eaf8-4f55-e2eb-08dda389846f
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam:
BCL:0;ARA:13230040|7416014|1800799024|366016|376014|38070700018;
x-microsoft-antispam-message-info:
=?utf-8?B?QTB2TTY0UnA0NmZvME9xdFRBekV4SkdoWVlzZDFFZVNZbndHWFczYUZROHN5?=
=?utf-8?B?dVRqM2E4bVpvb2NGeWNXRUhqRGswQjhpTkkxWk1SK3htbDNuZFdSUVVnWmhH?=
=?utf-8?B?NkNLb3lXYjBGUlZVWk0vOEorcG9pMXRJQkV6TXBZazhvbG5uYktUVW43ZlMw?=
=?utf-8?B?VUZwa2xmNXZFNVhJNU12SVZ4MzF3RFBwMmhOcXBkQnQwVFV0dkpQaTlGVDVp?=
=?utf-8?B?aHEwU2p3NG9oTS9aMHJqUk44Y3dKQ2RNTzhvSlhZdjJldmhRTU1sMmQ3TS9n?=
=?utf-8?B?RGJUelhtZGhuMFlsbGJPRk5Yc05WK0REeU1DQ0ZudmRFSXBDaVlhRVBrZlIy?=
=?utf-8?B?OEV6Rk5iMjVnOWlqa0VlUW1tZ29xaitJYkxFMEdqVi93cHhLWGRJNHVMTkRS?=
=?utf-8?B?NzZqeXVXN1BKRnJNZXExWWxsY1hIVHBoV3ZJcUdTMnpkaUdxa1RoOGZLV2pm?=
=?utf-8?B?Z0lCdEttUmkyemMzdXAvWXJVRVpTZ2hydjhqV3V3Nld2MUdmWHVYdFRSS2hL?=
=?utf-8?B?VU02Vkg4ZDJFVGp2clFjRXZkbUlFS3ovMml1MDQ3bjdaQUR0UmI1RVh6NnVW?=
=?utf-8?B?ZlVkSW9OU1pRMytrQzRRdnR1WkVHN2dRcFB1ZGNubkM3MkdWa1FNcmptVGhl?=
=?utf-8?B?NFhXQVVoNHRoTDJ6ZWVWQWhta0ZCRER1NXFJdkxlQjA1QldMeWlxVkNQZlZl?=
=?utf-8?B?QjJzU0FqNk43dm1sSFBMZzhYMXNHMnE0UStjbUxneGhWZFVxd1JKUk1IcTA1?=
=?utf-8?B?RlIyR3YzdVRwVEsxTThCVUlISURVd0lOQmVLUFlpdXM3aTZKREZBWFZmQmVi?=
=?utf-8?B?Qk1KaUdURUhYQ2QrZ1pCTXZlZFZrQ1EyL3h4alBGK3g2ekJVc1VJR3lhRHpa?=
=?utf-8?B?eXI0TkZuWXhnSWszZlFTREQ5MXV2WjI1ODBKNTFjT2d5Sko4M1F5VG5oclIv?=
=?utf-8?B?NHFBUnEvcDVISXlQN2pXR1Bad1cwUmlSbmRJKytWL1YxT0dHRE91MmtlNkt0?=
=?utf-8?B?TWNaS2FMcjAvOGNYNi9OU3hNNnUzSnVYeVBqY0RPd3dYcHZrY2ZDcGF1bFJV?=
=?utf-8?B?NUtuMXd6K0J0OGJZQkIwdXRIbGh2ZTlYTHdvdWFBakNVdFc2U2NOb1FQTVY0?=
=?utf-8?B?VmFXL0xkMEd3OEtWb0hNVFZWL21tMUl0bDc1c1pWazRobDFTSVlOMXJTWFRU?=
=?utf-8?B?a0FBdzFJekpjNE93MjJzRUpKRXFRV1daR1NuY0MyQUQyVVowcmR6T09PZ3da?=
=?utf-8?B?RWsrWEp5NWRTd3BUb1hVUHpQVzV2enFyZ2c0WUlXem1tV2hnRFBzaHAyTjZL?=
=?utf-8?B?U2FyZnZCVUtvUCs3bURYK0VNcU9HOVFqemZuVWdCcC9WRVhuZXp5bEV2cTkw?=
=?utf-8?B?NW9yRDYvdnlyYk1uSzNuSDc5T3djTWpRaUxmYmdQSTZVak5vSkh2R01sM0J4?=
=?utf-8?B?S1hBQTNJdlRySXZNZUpzb3VaNENoemtPTS9VeFpvbUUrNFZJcVBFL1NWcExy?=
=?utf-8?B?ZU5NZnlQTEhNZldyS3BXTFRNNW80cDVKRUlxS3A3cXY3T3AyOXJuczlVbXd5?=
=?utf-8?B?QnpRZlorUHN6V2tRaUFBSW92eHB4OGFhbXNPTHAyUzhnSHlpTU05QXZlRmNn?=
=?utf-8?B?dTU3ZEptem9qTEZidnhhejdvOGg0VFRVRjNReXpNQUxRZVUrcEI0Y3IxVEpk?=
=?utf-8?B?L0h3aUdzcHZBZnVuYk5ZV3RRSU5BaTZxQ0pCR3oxbTJncEpmUnNqQ1RBdUYv?=
=?utf-8?B?OFdPeHk4aEo2Ukx2cklTVS9FWHlUMDI1MjQwYUZYbk1xRytwVkJ4M2k5K2pv?=
=?utf-8?B?WW1kMzJjTGZkaUVSVUMrbW5tclp2aXdudFlvbXRjdHkvQlFMZTVkeEtPeXA4?=
=?utf-8?B?UDJOblgwa0ZEVmpvejNrQnZMenNSUUpSeVNuZ2dMOGQwNXE2YUNzU2RQQTFE?=
=?utf-8?B?MHJZVU9Ra21Lci9ZYndiN2JEdkJpdjR1TS82WlAybzhCS2FKaTRpOEUzbWd5?=
=?utf-8?Q?nrFCrl86j5ZMBAOJmNL/aY1i+1cDoU=3D?=
x-forefront-antispam-report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH7PR10MB7730.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(1800799024)(366016)(376014)(38070700018);DIR:OUT;SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0:
=?utf-8?B?M3ZiaktVTDQwa3Z0bDZ0TmdvSmd6WDQzdmVOK3BiN1oxNlhVeDRPMFFEMHVi?=
=?utf-8?B?ZHJHWmRtQzFJTXhhYUtBYWJNdlloWFVNZFpMbk9HcFl2MTBOd0RxVWJyN2Mr?=
=?utf-8?B?L0UvVjJIeVFZcVJFSUhuSmMrNm4rQnhuWUYzVXFEN2VZNDdlREFzSFF1ZmtF?=
=?utf-8?B?VVRBK00ybGtDcVNkeVkrRG1KSkptWTBMTTA5VVRMdTVVRkFnSkFDSDY2Wk9n?=
=?utf-8?B?SlpOTmlQSWx5NXBxOVNQOHJyZXlCL0EvdHFEZ1FybnJvazNIMTdzc2lHMmV4?=
=?utf-8?B?RXpDNXNacGlZK3FYSFJ3aDZCdEZ2dWtJNmw4K3dnTUs3R0NOMzFYUkxmS1lR?=
=?utf-8?B?VVh0ZUdpdlByTGh5Si83amsrM05VU1prWWFlSkU1YzNaT3Z0cHNsM0FFKzJK?=
=?utf-8?B?U3ViaytsbFZsaVVBdlpBYjM4N0F1aVBqZ2dNMGRGYkZzZTUvNTZWOWlmZ25j?=
=?utf-8?B?REx4cW5HbWFieVFQZFdHdXZTWHh0anZvSWNoNTI4STAxTVc3bElPaEFwbHU2?=
=?utf-8?B?dTgxTHNoaFFQdEVzcDFPZ0ZMU2NCV01ORURaWGxOUUpHKzRTREE3TktMN1hi?=
=?utf-8?B?cU4zV0lFTFRQUkxoZTAyaFZNRDB4QUNzQ1JQRy85aEp1d0FPeDE1OURKTnhC?=
=?utf-8?B?MWdFS1UyUmR4emJpeXV2RDFidTJhd1pvaEtUT1JFWUY2VEVINVdFR0g5ZlFS?=
=?utf-8?B?MDlBMjhocnA4NVBsbDNySTUzQVp5VWVNaXVuM21kbHQxMElramh5ZmhxNGdh?=
=?utf-8?B?cWM3OGtaSFhiZmwzbDFzWXBpbUNNZUV0Um81YWd6cmtnakkyQzdxVkV4S0JT?=
=?utf-8?B?eWIyTmVPc3FNVGRUcmJhVmFMNC91Si9HSW9RbE9HalFHQVFINzFNRDhjMldy?=
=?utf-8?B?Y1pZQklEMmFUeklYU3ZGTGZXSlIvaFlCSDZSWVZIZ2xjakJxbVd3aDNNNmtq?=
=?utf-8?B?T0VHbHY5UXZST3h5emdYMGYyNFlYd08wdkNyYjBKVk5mbGNMdjNFV2NSTFNh?=
=?utf-8?B?ZXhXcTI5a25LZkpiVmpqV041UVk5UFhrUEh1RVphSE9tanFZaDFXcVlRaHVu?=
=?utf-8?B?emxMY3FPUGxTREVTeHczZHRia1pjOGdsQTQ1ZGRleERMaGc5eG5DYU05ZElQ?=
=?utf-8?B?dDBGbzRGWmoxWUZxTFZMSVVnemNoMDN1WlR1WHR4eTh1cklEWWUyY09abU5z?=
=?utf-8?B?Tld3amdxdnkxLytveVNYNTRzWE5PWDZXOTFGVkxQMDBJaUZTeW5FaHBkSTVD?=
=?utf-8?B?MTdxR08vZFlkcWxMSElHL0tXUjhWVlNkUGo4Y25BZmhCdWM3akpIUG5LVDJZ?=
=?utf-8?B?NG92WkhjRXloaWV1UXF6MjVKdS9xT1NFTlZYdUtjV2Z6WWROQnVlUmlHaUtH?=
=?utf-8?B?TlNZM3ljR3AwTUUxdlFQV1NmUDR0NVJjZXY1UjBmRVVBZ3dEYkRPNTVzb3h1?=
=?utf-8?B?emI1SFBsckFjTHgyODZHb3ZNWXVUZnJ5SzVXWndLQU5YNEwycms1MDR5T0xx?=
=?utf-8?B?SElEL0pMS044L0l5RlkyV2IxOXkxeGJtY2lsMEtoMU9DZmhlbm5KR1ZwSFdK?=
=?utf-8?B?S3F2NFFCVUowNzBmNkI2d25QMUhwcXFtc2R4Uis4eUtsRm9TVUJtcEVwbjNo?=
=?utf-8?B?dTkvNEZLcXRhbWlWQ29PN2F0UEVJMVJMZGk5U0xLL3dTdVRZc1hscnd1ekQ0?=
=?utf-8?B?YnFXa2tTK25PZnE5bkRnNG1jQ1ZSNmFMdU95a1UzV1hDRHFudzRpbllQdEg5?=
=?utf-8?B?SDhZeEdaMU5KN3Z3d0NEYUZSbEZlMldORjZIdmQ2RDgyN0cxTDY5NWpDYUht?=
=?utf-8?B?TG1xTnFOZmdia3dCS0ladVVEbXUzRmNMU1ZOL0svOE1mZ3VpMmQzaGJLRkpR?=
=?utf-8?B?MWtkOUFSdFJVOWZwVE51LzJjY25Sb0Jvck5ZYW15QjdrR25odFk4eGFDcnZo?=
=?utf-8?B?emJDMU9qd0UzQ0ZLUFRMaW43aHNWd2xzMWNFUUpZc2RXOGFkdHQxVkZPSEJL?=
=?utf-8?B?Z2NjTGNPQU90YVlkMkNiN1ZuUUluNVJSMU5veDZXMGNGL3drcTl6aEpFZTFR?=
=?utf-8?B?eUFsSnRJOTRveitBZFFTTk4rMDNvZHBkSmtTQWJrRVhmZ0w2bHVZT3Z6ZDMr?=
=?utf-8?B?eVd5aHRZb1VSdXd1Q0lTZDBLN0k1S2pWcDB5THM2SG1GemFxbVV3cnpUVnM5?=
=?utf-8?B?ZVE9PQ==?=
Content-Type: text/plain; charset="utf-8"
Content-ID: <619B304D7BC4A4479E8ADA5FDAC8E57F@xxxxxxxxxxxxxxxxxxxxxxxxx>
Content-Transfer-Encoding: base64
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0:
xqZ0k1J1OSqHJziUxaOogpSdQ2F4FvOGGvEwVTCM9fkSD4E6VcAol/m3A1nk0QlGSMATDIalwkf7PXFqFQ+JRIvs0SUjTpFhKF/7EHT/EsmlZL09L8qofEWi7l5VgZEgBpFXdi+3CL7twhxaRS9WFf9XIJSc/82UEdbFJ2VkZv1CIf+Ae5rd5q6kpK+xFq6D+jXy29Q+x86QVGFLuF/o810WbgRxXS3cwK1IHMOmBQdeafoQwRu4c8NT0oAuFc8BYEgNJPulgxf3391KeuBd/jACX4VtPudppU0YKEKRRR63OGyLhf9iGvOugbG5QZUOFh0RlFg1ICEqEo86N1zd7hs5ERVYEwhtCZqJ+3HfE+1aqww4dBQCSeIneF3IxDQ9mtl7TdukTUnZ4V7Z+iTkBvfsApg1Q9l3gAVoiTnj8GMRET5evPgoRqAJX4Nnx/BkUCW7PQtJqopmvBlEkxUUPDhjj+WP9h47ebjfyNg6JWA8U2UzT0qy3KgznBGrS532Hnk8xW9FtNwQBOYPkH111W7LpWybWs5qQdhh7A8eNFQeDC+Z6zsxOrTOez9f7ykMqcYLQvbOAZ3tLkCKmd16FwQ8qasH4kx/vpcJ+NapCvY=
X-OriginatorOrg: oracle.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: PH7PR10MB7730.namprd10.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 9e5fb36e-eaf8-4f55-e2eb-08dda389846f
X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jun 2025 17:01:58.3981
(UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: yhm5aM/VK2KeXeA+A1WfEayBhxQ/pnJceLoEkcNn8QxLdM+gpITU/DwMcPo5Y6ZzqIB0TQDAain7t4MdDWrlBmrkibHjGXVuBzbzdf5BFB8=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR10MB6152
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 mlxlogscore=999
bulkscore=0 spamscore=0 suspectscore=0 malwarescore=0 mlxscore=0
adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1
engine=8.12.0-2505160000 definitions=main-2506040130
X-Authority-Analysis: v=2.4 cv=Va/3PEp9 c=1 sm=1 tr=0 ts=68407c0a b=1 cx=c_pps a=WeWmnZmh0fydH62SvGsd2A==:117 a=WeWmnZmh0fydH62SvGsd2A==:17 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19 a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19
a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10 a=GoEa3M9JfhUA:10 a=VwQbUJbxAAAA:8 a=pGLkceISAAAA:8 a=yPCof4ZbAAAA:8 a=20KFwNOVAAAA:8 a=uNL9aFTXj9Qd37RXVEYA:9 a=QEXdDO2ut3YA:10
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDEzMCBTYWx0ZWRfX70ItgEH5h5Ad sbZ968wXX4AA0HiyGFViLlWIaMvyPnPDX7r4lOM6FvMx10y7pFA35ysO11Sbi3qt7otSvX1kDZj fxjuJIYNofMQEkf1RR3NIbXsgcTpPGagGAyoOQZjzlrF9J6r/ejsgViROCPZeogHaT5XkCmFnZY
orcRgrKX083Jm8t39bxPoEyhJyuhxWeIMoP37Oy7sEsN2sOYGlaLFNhzav3aIC5kMGf4XW4jYrY ak4uf5st3iruNYbil79xAar4N46nLQanlXHAjrEN3LakD23cf+53c9a0NUI0GGOCjYCpkUQHxri j4lNl/ii8kajCsbLKTdZEIxytNyQ6kmV57jrI57qTiL9flBacMYYEVQxi1ysBQn6vZJvH2ovVIR
i7Vzp8H5OMh+6B9Zi36n1HzaiTrWDLIlGgJE/PVo48izrKp8PKCS53/uUA24avO4sKl+5PdY
X-Proofpoint-ORIG-GUID: XUklkQZnEWxVHbmfd-RISP_tgs5KpRIi
X-Proofpoint-GUID: XUklkQZnEWxVHbmfd-RISP_tgs5KpRIi
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
DQoNCj4gT24gSnVuIDIsIDIwMjUsIGF0IDc6MjXigK9BTSwgVml0YWx5IEt1em5ldHNvdiA8dmt1
em5ldHNAcmVkaGF0LmNvbT4gd3JvdGU6DQo+IA0KPiBVRUZJIFNlY3VyZUJvb3QgJ2RiJyBrZXlz
IGFyZSBjdXJyZW50bHkgbm90IHRydXN0ZWQgZm9yIG1vZHVsZXMgc2lnbmF0dXJlcw0KPiB2ZXJp
ZmljYXRpb24uIFJlZEhhdCBiYXNlZCBkb3duc3RyZWFtIGRpc3Ryb3MgKFJIRUwsIEZlZG9yYSwg
Li4uKSBjYXJyeSBhDQo+IHBhdGNoIGNoYW5naW5nIHRoYXQgZm9yIG1hbnkgeWVhcnMgKHNpbmNl
IDIwMTkgYXQgbGVhc3QpLiBUaGlzIFJGQyBpcyBhbg0KPiBhdHRlbXB0IHRvIHVwc3RyZWFtIGl0
IGFzIHRoZSBmdW5jdGlvbmFsaXR5IHNlZW1zIHRvIGJlIGdlbmVyYWxseSB1c2VmdWwuDQo+IA0K
PiBQcmV2aW91c2x5LCBwcmUtYm9vdCBrZXlzIChTZWN1cmVCb290ICdkYicsIE1PSykgd2VyZSBu
b3QgdHJ1c3RlZCB3aXRoaW4NCj4ga2VybmVsIGF0IGFsbC4gVGhpbmdzIGhhdmUgY2hhbmdlZCBz
aW5jZSAnLm1hY2hpbmUnIGtleXJpbmcgZ290IGludHJvZHVjZWQNCj4gbWFraW5nIE1PSyBrZXlz
IG9wdGlvbmFsbHkgdHJ1c3RlZC4gQmVmb3JlIHRoYXQsIHRoZXJlIHdhcyBhIGRpc2N1c3Npb24g
dG8NCj4gbWFrZSAucGxhdGZvcm0gdHJ1c3RlZCBieSBkZWZhdWx0Og0KPiBodHRwczovL2xvcmUu
a2VybmVsLm9yZy9sa21sLzE1NTYxMTY0MzEtNzEyOS0xLWdpdC1zZW5kLWVtYWlsLXJvYmVob2xt
ZXNAZ21haWwuY29tLw0KPiB3aGljaCBkaWRuJ3QgZ28gdmVyeSBmYXIgYmVjYXVzZSB0aGUgYXNz
dW1wdGlvbiB3YXMgdGhhdCB0aGlzIGlzIG9ubHkgdXNlZnVsDQo+IHdoZW4gdGhlIHVzZXIgaGFz
IGNvbnRyb2wgb3ZlciAnZGInLiBJIGJlbGlldmUgdGhlcmUncyBhIGZhaXJseSBjb21tb24NCj4g
dXNlLWNhc2Ugd2hlcmUgdGhpcyBpcyB0cnVlLg0KPiANCj4gVGhlIHVzZS1jYXNlOiB2aXJ0dWFs
aXplZCBhbmQgY2xvdWQgaW5mcmFzdHJ1Y3R1cmUgZ2VuZXJhbGx5IHByb3ZpZGUgYW4NCj4gYWJp
bGl0eSB0byBjdXN0b21pemUgU2VjdXJlQm9vdCB2YXJpYWJsZXMsIGluIHBhcnRpY3VsYXIsIGl0
IGlzIHBvc3NpYmxlDQo+IHRvIGJyaW5nIHlvdXIgb3duIFNlY3VyZUJvb3QgJ2RiJy4gVGhpcyBt
YXkgY29tZSBoYW5keSB3aGVuIGEgdXNlciB3YW50cyB0bw0KPiBsb2FkIGEgdGhpcmQgcGFydHkg
a2VybmVsIG1vZHVsZSAoc2VsZiBidWlsdCBvciBwcm92aWRlZCBieSBhIHRoaXJkIHBhcnR5DQo+
IHZlbmRvcikgd2hpbGUgc3RpbGwgdXNpbmcgYSBkaXN0cm8gcHJvdmlkZWQga2VybmVsLiBHZW5l
cmFsbHksIGRpc3Rybw0KPiBwcm92aWRlZCBrZXJuZWxzIHNpZ24gbW9kdWxlcyB3aXRoIGFuIGVw
aGVtZXJhbCBrZXkgYW5kIGRpc2NhcmQgdGhlIHByaXZhdGUNCj4gcGFydCBkdXJpbmcgdGhlIGJ1
aWxkLiBXaGlsZSBNT0sgY2FuIHNvbWV0aW1lcyBiZSB1c2VkIHRvIHNpZ24gc29tZXRoaW5nDQo+
IG91dC1vZi10cmVlLCBpdCBpcyBhIHRlZGlvdXMgcHJvY2VzcyByZXF1aXJpbmcgZWl0aGVyIGEg
bWFudWFsIGludGVydmVudGlvbg0KPiB3aXRoIHNoaW0gb3IgYSAnY2VydG11bGUnIA0KPiAoc2Vl
IGh0dHBzOi8vYmxvZ3Mub3JhY2xlLmNvbS9saW51eC9wb3N0L3RoZS1tYWNoaW5lLWtleXJpbmcp
LiBJbiBjb250cmFzdCwNCj4gdGhlIGJlYXV0eSBvZiB1c2luZyBTZWN1cmVCb290ICdkYicgaW4g
dGhpcyBzY2VuYXJpbyBpcyB0aGF0IGZvciBwdWJsaWMNCj4gY2xvdWRzIGFuZCB2aXJ0dWFsaXpl
ZCBpbmZyYXN0cnVjdHVyZSBpdCBpcyBub3JtYWxseSBhIHByb3BlcnR5IG9mIHRoZSBPUw0KPiBp
bWFnZSAob3IgdGhlIHdob2xlIGluZnJhc3RydWN0dXJlL2hvc3QpIGFuZCBub3QgYW4gaW5kaXZp
ZHVhbCBpbnN0YW5jZTsNCj4gdGhpcyBtZWFucyB0aGF0IGFsbCBpbnN0YW5jZXMgY3JlYXRlZCBm
cm9tIHRoZSBzYW1lIHRlbXBsYXRlIHdpbGwgaGF2ZSAnZGInDQo+IGtleXMgaW4gJy5wbGF0Zm9y
bScgYnkgZGVmYXVsdC4NCg0KSGFzbuKAmXQgdGhpcyBhcHByb2FjaCBiZWVuIHJlamVjdGVkIG11
bHRpcGxlIHRpbWVzIGluIHRoZSBwYXN0Pw0KDQpUaGUgYWRkaXRpb24gb2YgdGhlIGNlcnRtdWxl
IChub3cgY2FsbGVkIGNlcnR3cmFwcGVyKSB3YXMgcHJlY2lzZWx5IGFkZGVkIA0KZm9yIHRoZSB1
c2UgY2FzZSB5b3XigJl2ZSBkZXNjcmliZWQuIElmIHRoZXkgY29udHJvbCB0aGUg4oCYZGLigJks
IHRoZXkgY2FuIGNyZWF0ZSBhIA0KY2VydHdyYXBwZXIgY29udGFpbmluZyB0aGVpciBrZXkuDQoN
CldpdGggdGhlIG1hY2hpbmUga2V5cmluZywgdGhlIGVuZC11c2VyIGlzIGluIGNvbnRyb2wuIElm
IHRoZXkgZG9u4oCZdCB3YW50IHRvIA0KdHJ1c3QgTU9LIGtleXMgaW4gdGhlaXIga2VybmVsLCB0
aGV5IGhhdmUgdGhlIGFiaWxpdHkgdG8gZGlzYWJsZSBpdC4gVGhpcyB3aWxsIA0KcHJldmVudCBz
aGltIGZyb20gY3JlYXRpbmcgdGhlIE1va0xpc3RUcnVzdGVkUlQgdmFyIGFuZCBwcmV2ZW50IExp
bnV4IA0KZnJvbSB1c2luZyBNT0sga2V5cyB0byB2YWxpZGF0ZSBrZXJuZWwgbW9kdWxlcy4NCg0K
Return-Path: <linux-kernel+bounces-673566-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 4043B41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:03:12 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 8B0CB3A541B
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:02:42 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id E06B21F418D;
Wed, 4 Jun 2025 17:02:51 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Zn4hnpY+"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9CE141CAA82
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:02:49 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749056571; cv=none; b=DE45DS2ie+G+1UoGGI4IMKLtPNvGq+uBsF3E5R+E6Tky9zIyA9v2cxMqgV3EbgvJ2K+QgXbfDan7p/25tYmJuCl41vkjhcSUNVoFrwgHptZdThZkopb4UgtZaJd5KWeY53lqmpaWX55X9Vo1v3ftHFKl1Y6RLLjlezkWLcGQrIA=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749056571; c=relaxed/simple;
bh=P92Z/lDShPFdDV0ba/bd+B1EUgMMMMP1rDAJOEmCppY=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID:
MIME-Version:Content-Type; b=RatRCFMLVFF8yIVPexMqwUFfa/9l6rYvaUgldY84jAwa+9VZoy8vfX9hMFJc8AVv9hpS4h2nVDv4lv2jawCNcbYhGXUiwm03TgnT8G+Hrn21CnEap7aBgkorvqW0F2HYqI+YlWuL7puOb3dFKs5kOqr6fxdb8eYkBc0oI36qdrE=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Zn4hnpY+; arc=none smtp.client-ip=170.10.133.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749056568;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references;
bh=P92Z/lDShPFdDV0ba/bd+B1EUgMMMMP1rDAJOEmCppY=;
b=Zn4hnpY+1dmX0bdbUpIZMnvaJ/25MpMCwmKysbBUv0Ck9wn8E0ZCHonwXYiV0PmQ3MOcTr
TYPHAPkMmuMQrcgS462Q5ZxEImW/gN2ViMV7dhZq6bsSAZgyF1ZY/n96qhf8IgZi1c9ypR
36Jx+MAMBqzdCmeBockU/4i9QqdQAio=
Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com
[209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-550-cju-VPZxPwi2NKpnQpczSA-1; Wed, 04 Jun 2025 13:02:47 -0400
X-MC-Unique: cju-VPZxPwi2NKpnQpczSA-1
X-Mimecast-MFC-AGG-ID: cju-VPZxPwi2NKpnQpczSA_1749056566
Received: by mail-ed1-f72.google.com with SMTP id 4fb4d7f45d1cf-602df3e7adcso7873860a12.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 10:02:47 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749056566; x=1749661366;
h=content-transfer-encoding:mime-version:message-id:date:references
:in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=P92Z/lDShPFdDV0ba/bd+B1EUgMMMMP1rDAJOEmCppY=;
b=ow9ZjPHm9YrUJpRFZpWVC66P+GHILAYC4WBZ3JEBv883Bi1qCFscLVWCYBePF3Q5bq
A2Vkc2W5DB9/cuf42OIP2BWaIsb082PVxOaspBZSnBxt8wRHa8GjHNE9aDN4fYxjzhJX
sPujXSwKEycPRsFdaEj9Fcq1JPUD25GqArltWEVet8eMmSSpCeACEn4uNQORhhvpBuB0
7RjMzY+/6ndo8Y2llcx9ccduEnL1bF8KKB6RiS7ceuazpAweqmrfGg/S5x4UXakOxNba
hNVDBs0YyQsvv1CNuplWn35qDzIRtzcz2bBSEe8c76L0oxa5Zkr8bgMWUMxMlKsyAbUy
AO/A==
X-Gm-Message-State: AOJu0YwzHpuF/8488kTjQ3yD0lw2G6QSony/Ov8GxBJLayHe2wkVCjGN
dsv/nu3oKxhiDE4VuimU/qpawUy/bC6hEpjsgxC8uI5MB/EsMan42dYSfJ+G8BdD+XYvtERH9ak
ghdd3iXTxpLFNr6DraixsGGm0GAphQDfiyFL3DYdRp7VM8EvNHViEUcQ6+1Dc1a4R2w==
X-Gm-Gg: ASbGncunnkTqaECT0fX1PKTYWiht9i++u9kbR7GQjHJofVV8ekpxNEDjAsKuzLHKeFu
MdynaC9okb5mzUuGCOjoLzoxhrNlEA8M0RSTEMP4ZUAvARDxr6UmxCk/t51Ntf+JkMitWU7ne3W
pY1Pxp99wACHVAn4/qa+Cg4MIFOX2ZyJBk6xglP0su2eN2OdFVp8Y78U7/Jo7ykSW29SKY2juWA
fJofDhGv9bcKql3dKe9XHCW2a3m75jh71GRMUhLc2I40fzLfVDc8LS6nzJ4HnLoZrpVYqZ7/6zf
5Md7iWU2
X-Received: by 2002:a05:6402:348e:b0:601:f3f1:f10e with SMTP id 4fb4d7f45d1cf-606e98b0c7fmr3783609a12.5.1749056566236;
Wed, 04 Jun 2025 10:02:46 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IGAdY6lpY2ygDLbTrWvUQe7gwiHA2y3sjXZHMWjovtfZAcIj8f4Ly3/xK0aa9hY0kNARvcHRw==
X-Received: by 2002:a05:6402:348e:b0:601:f3f1:f10e with SMTP id 4fb4d7f45d1cf-606e98b0c7fmr3783554a12.5.1749056565710;
Wed, 04 Jun 2025 10:02:45 -0700 (PDT)
Received: from alrua-x1.borgediget.toke.dk ([2a0c:4d80:42:443::2])
by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-606da099aebsm1673134a12.63.2025.06.04.10.02.44
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 10:02:45 -0700 (PDT)
Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000)
id 39C481AA916F; Wed, 04 Jun 2025 19:02:44 +0200 (CEST)
From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= <toke@xxxxxxxxxx>
To: Byungchul Park <byungchul@xxxxxx>, willy@xxxxxxxxxxxxx,
netdev@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx,
kernel_team@xxxxxxxxxxx, kuba@xxxxxxxxxx, almasrymina@xxxxxxxxxx,
ilias.apalodimas@xxxxxxxxxx, harry.yoo@xxxxxxxxxx, hawk@xxxxxxxxxx,
akpm@xxxxxxxxxxxxxxxxxxxx, davem@xxxxxxxxxxxxx, john.fastabend@xxxxxxxxx,
andrew+netdev@xxxxxxx, asml.silence@xxxxxxxxx, tariqt@xxxxxxxxxx,
edumazet@xxxxxxxxxx, pabeni@xxxxxxxxxx, saeedm@xxxxxxxxxx,
leon@xxxxxxxxxx, ast@xxxxxxxxxx, daniel@xxxxxxxxxxxxx, david@xxxxxxxxxx,
lorenzo.stoakes@xxxxxxxxxx, Liam.Howlett@xxxxxxxxxx, vbabka@xxxxxxx,
rppt@xxxxxxxxxx, surenb@xxxxxxxxxx, mhocko@xxxxxxxx, horms@xxxxxxxxxx,
linux-rdma@xxxxxxxxxxxxxxx, bpf@xxxxxxxxxxxxxxx, vishal.moola@xxxxxxxxx
Subject: Re: [RFC v4 05/18] page_pool: use netmem alloc/put APIs in
__page_pool_alloc_pages_slow()
In-Reply-To: <20250604025246.61616-6-byungchul@xxxxxx>
References: <20250604025246.61616-1-byungchul@xxxxxx>
<20250604025246.61616-6-byungchul@xxxxxx>
X-Clacks-Overhead: GNU Terry Pratchett
Date: Wed, 04 Jun 2025 19:02:44 +0200
Message-ID: <87bjr3v3rf.fsf@xxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Byungchul Park <byungchul@xxxxxx> writes:
Use netmem alloc/put APIs instead of page alloc/put APIs in
__page_pool_alloc_pages_slow().
While at it, improved some comments.
Signed-off-by: Byungchul Park <byungchul@xxxxxx>
Reviewed-by: Mina Almasry <almasrymina@xxxxxxxxxx>
Reviewed-by: Toke H=C3=B8iland-J=C3=B8rgensen <toke@xxxxxxxxxx>
Return-Path: <linux-kernel+bounces-673567-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 58DFF41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:03:44 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 4E9BF3A7541
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:02:59 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id ED10F1F09AD;
Wed, 4 Jun 2025 17:03:13 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="bZYb064A"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6B9BD1DE89A
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:03:11 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749056593; cv=none; b=lMYB9FFHiOuixRmZv73wgkKzF61i95YaFaL5P5hMnf5GTEzVc8Nw1fQNrHBW9+4ganmESzhgF17UyzGiZCEZDXPaDWeBQXyjmoa5FQxVYP/6+ZdgOMIZx4NjgkMn+fuMcQvnY6HHDrTLenbDBsZ+mXGSRAiLZGFCSTk4v6Y9AoQ=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749056593; c=relaxed/simple;
bh=BdQGqhIQcXP7dsPfNkEdiTmcnCKK5h488sLxxJBhbs8=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID:
MIME-Version:Content-Type; b=E1VdNUFM0cUS70UaOwn9SsS8S2btP9sdO+hZvhIYbAteVhdNLaxErCBAAdA4wiT/74Zz8XfABrLlPdcsynRkZ1QbU0CijGoNRBk1e1WEMgl8uxpM1ONM7BDBMChaHEfLeclebcALlKZUEZQZaT2ssTJtKgsaa48UjzSpvW3TZPw=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=bZYb064A; arc=none smtp.client-ip=170.10.129.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749056590;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references;
bh=BdQGqhIQcXP7dsPfNkEdiTmcnCKK5h488sLxxJBhbs8=;
b=bZYb064AIfM12bdCj9RULmkW9iAlNjAsLOF2aDGIvUCuH30evdbx+lorwPqFVIRr8QCTIa
Gk2i0gCHK6e8QllwElUNJQMgBeo3chtAOZnAr1dkB9AbpK6qjN9TxjjK310YDNikdWzvqi
Gyx9livvBH0YsmrgUhq5y0zc4oJtxJo=
Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com
[209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-679-Aifg1KTdNmeMr7NbxNRdWg-1; Wed, 04 Jun 2025 13:03:09 -0400
X-MC-Unique: Aifg1KTdNmeMr7NbxNRdWg-1
X-Mimecast-MFC-AGG-ID: Aifg1KTdNmeMr7NbxNRdWg_1749056588
Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-ac6ce5fe9bfso4268766b.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 10:03:08 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749056588; x=1749661388;
h=content-transfer-encoding:mime-version:message-id:date:references
:in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=BdQGqhIQcXP7dsPfNkEdiTmcnCKK5h488sLxxJBhbs8=;
b=iU2V8Jf8NTi0CB6iQkPzS+VGws26bwZTfpSHFSri7PL5A3pfjays+CrFCoLZpWKwYw
XifUbrvRYoGJjMFo9FNKnlPcIeOybnz2oUpSZovLWZEQt1us/xzzNYWbnSJ2GdYNUUd1
M0X488RF9et73wVFj0vFLccdjRRTE4pvEpd0AS2/ho4cPXIZiyCdHPXayeASBP17MXc1
gHuEh3YZ2DFW34xsbBIarKawrXw3JOqzF3ZeqCFW0CRt9zY58bIcprumEM2OfOujYOMf
LXhU5kh1rYZd9Uxj5pmbFa/092qqu+TZ/tfxB/7iq8hLtFxLMex3qv1jugqWPwZ7j9Wk
/P8g==
X-Gm-Message-State: AOJu0YxSV0Dnr6sRMzsNZnTyHznjxs/sTI1lmQMe80n26CmaioHKGLoO
Diw2Hz1Kj7LR7cIsQ7k7XaNi1X54l0gOSGOFC1+2oFWRarvOKA3SU0XchQVhcsrexczd8D4FjAC
rN3mckauLWKJpXTdfhCfJafgBSMmML95qQYTebRv8DMLVIZrWTeH+IkagkmR3w6LGVA==
X-Gm-Gg: ASbGnct9wGWOxW0aUJyNl2uwl78Uo42E9b/DZvVlX2tr+6mUV2+hH1emoEXQEL7f7mZ
tIyKRBjncIxEg36inNMngT9GIUaWmG3IiaHpQpskZeCJJQF8Y3Qeq9mSj/SsRfIjvwj4LHGYgDg
ujIdUnSEn+igGR5Eafjk9vcH5H+yw182ZxrybTjesQlAZxrINg9Om7Ga30tnjo6vfXjyeHGTd2h
PsBxk9dZHfQzhrKHBJNgpaqA0c1AZZ9pNFaqxtSy2V9+0sBZfFg576Y++BGuCpLQBD/8BPlx5E6
V5A41kSq
X-Received: by 2002:a17:907:3fa6:b0:ad8:8c09:a51a with SMTP id a640c23a62f3a-addf8c30aefmr329525966b.4.1749056587554;
Wed, 04 Jun 2025 10:03:07 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IEts9xRj/XK3SRKIWyfVZvu6UAgFyS0hpnI7mT5nnKFo1hg8wg/AtXBkeW4IXe7ZmieN8tHNQ==
X-Received: by 2002:a17:907:3fa6:b0:ad8:8c09:a51a with SMTP id a640c23a62f3a-addf8c30aefmr329518466b.4.1749056587038;
Wed, 04 Jun 2025 10:03:07 -0700 (PDT)
Received: from alrua-x1.borgediget.toke.dk ([2a0c:4d80:42:443::2])
by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ada5dd045edsm1116783966b.119.2025.06.04.10.03.06
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 10:03:06 -0700 (PDT)
Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000)
id C8F371AA9171; Wed, 04 Jun 2025 19:03:05 +0200 (CEST)
From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= <toke@xxxxxxxxxx>
To: Byungchul Park <byungchul@xxxxxx>, willy@xxxxxxxxxxxxx,
netdev@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx,
kernel_team@xxxxxxxxxxx, kuba@xxxxxxxxxx, almasrymina@xxxxxxxxxx,
ilias.apalodimas@xxxxxxxxxx, harry.yoo@xxxxxxxxxx, hawk@xxxxxxxxxx,
akpm@xxxxxxxxxxxxxxxxxxxx, davem@xxxxxxxxxxxxx, john.fastabend@xxxxxxxxx,
andrew+netdev@xxxxxxx, asml.silence@xxxxxxxxx, tariqt@xxxxxxxxxx,
edumazet@xxxxxxxxxx, pabeni@xxxxxxxxxx, saeedm@xxxxxxxxxx,
leon@xxxxxxxxxx, ast@xxxxxxxxxx, daniel@xxxxxxxxxxxxx, david@xxxxxxxxxx,
lorenzo.stoakes@xxxxxxxxxx, Liam.Howlett@xxxxxxxxxx, vbabka@xxxxxxx,
rppt@xxxxxxxxxx, surenb@xxxxxxxxxx, mhocko@xxxxxxxx, horms@xxxxxxxxxx,
linux-rdma@xxxxxxxxxxxxxxx, bpf@xxxxxxxxxxxxxxx, vishal.moola@xxxxxxxxx
Subject: Re: [RFC v4 06/18] page_pool: rename page_pool_return_page() to
page_pool_return_netmem()
In-Reply-To: <20250604025246.61616-7-byungchul@xxxxxx>
References: <20250604025246.61616-1-byungchul@xxxxxx>
<20250604025246.61616-7-byungchul@xxxxxx>
X-Clacks-Overhead: GNU Terry Pratchett
Date: Wed, 04 Jun 2025 19:03:05 +0200
Message-ID: <878qm7v3qu.fsf@xxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Byungchul Park <byungchul@xxxxxx> writes:
Now that page_pool_return_page() is for returning netmem, not struct
page, rename it to page_pool_return_netmem() to reflect what it does.
Signed-off-by: Byungchul Park <byungchul@xxxxxx>
Reviewed-by: Mina Almasry <almasrymina@xxxxxxxxxx>
Reviewed-by: Toke H=C3=B8iland-J=C3=B8rgensen <toke@xxxxxxxxxx>
Return-Path: <linux-kernel+bounces-673568-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 618CC41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:03:50 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id A784B16393A
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:03:45 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 9D3FA1EFF8B;
Wed, 4 Jun 2025 17:03:39 +0000 (UTC)
Received: from foss.arm.com (foss.arm.com [217.140.110.172])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 8290132C85
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:03:35 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749056619; cv=none; b=EFBj/Cd8P0FoCopQ0Hr+AFpfEOjuzSO9CJn13hH6ZRxncd2ZKlubaqqP7KG1Al8Mtyoxr5iLt/runt+h4ubzfVhDbfywtmOASDqTH0I9mUo11oTeyr39Rulq+cTu83Yo3q4dS2E5AHrNVgNrXqamTk1i3cuWd8l/0YKiCZgmxIE=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749056619; c=relaxed/simple;
bh=grGSitnTH19S2NYEdjGEX2ayjTDvLYWHek1SY6iYyhU=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=irZ7gfaD2V58ntp6ZMwdNnSdZp4hxluryR/EbZ9PTUc2OCxRolSzVMNNx5Vow2waJGtXKXth3V3oyoMKJDjZ1PCdE0dh7EQCdGS8mwIRkhW4/qKq3OFD5C+3HT6IpoLIQu7rQOOMBSByUZwahbSCtJ+G0BtA4LoZj8imBkzrvr4=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com
Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14])
by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4DF2F1758;
Wed, 4 Jun 2025 10:03:17 -0700 (PDT)
Received: from [10.57.26.187] (unknown [10.57.26.187])
by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 358D43F59E;
Wed, 4 Jun 2025 10:03:30 -0700 (PDT)
Message-ID: <cc21a090-801d-4b32-bac2-01cebf896c85@xxxxxxx>
Date: Wed, 4 Jun 2025 18:03:28 +0100
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v6 06/10] accel/rocket: Add IOCTL for BO creation
To: Daniel Stone <daniel@xxxxxxxxxxxxx>, Tomeu Vizoso <tomeu@xxxxxxxxxxxxxxx>
Cc: Rob Herring <robh@xxxxxxxxxx>, Maxime Ripard <mripard@xxxxxxxxxx>,
David Airlie <airlied@xxxxxxxxx>, Simona Vetter <simona@xxxxxxxx>,
Sebastian Reichel <sebastian.reichel@xxxxxxxxxxxxx>,
Nicolas Frattaroli <nicolas.frattaroli@xxxxxxxxxxxxx>,
Kever Yang <kever.yang@xxxxxxxxxxxxxx>,
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-rockchip@xxxxxxxxxxxxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx
References: <20250604-6-10-rocket-v6-0-237ac75ddb5e@xxxxxxxxxxxxxxx>
<20250604-6-10-rocket-v6-6-237ac75ddb5e@xxxxxxxxxxxxxxx>
<CAPj87rPv7Pd5tbXhpRLaUJCGB8JmD4kfF50WRsEiST2gvtg3Bg@xxxxxxxxxxxxxx>
From: Robin Murphy <robin.murphy@xxxxxxx>
Content-Language: en-GB
In-Reply-To: <CAPj87rPv7Pd5tbXhpRLaUJCGB8JmD4kfF50WRsEiST2gvtg3Bg@xxxxxxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.3 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 2025-06-04 5:18 pm, Daniel Stone wrote:
Hi Tomeu,
I have some bad news ...
On Wed, 4 Jun 2025 at 08:57, Tomeu Vizoso <tomeu@xxxxxxxxxxxxxxx> wrote:
+int rocket_ioctl_create_bo(struct drm_device *dev, void *data, struct drm_file *file)
+{
+ [...]
+
+ /* This will map the pages to the IOMMU linked to core 0 */
+ sgt = drm_gem_shmem_get_pages_sgt(shmem_obj);
+ if (IS_ERR(sgt)) {
+ ret = PTR_ERR(sgt);
+ goto err;
+ }
+
+ /* Map the pages to the IOMMUs linked to the other cores, so all cores can access this BO */
So, uh, this is not great.
We only have a single IOMMU context (well, one per core, but one
effective VMA) for the whole device. Every BO that gets created, gets
mapped into the IOMMU until it's been destroyed. Given that there is
no client isolation and no CS validation, that means that every client
has RW access to every BO created by any other client, for the
lifetime of that BO.
I really don't think that this is tractable, given that anyone with
access to the device can exfiltrate anything that anyone else has
provided to the device.
I also don't think that CS validation is tractable tbh.
So I guess that leaves us with the third option: enforcing context
separation within the kernel driver.
The least preferable option I can think of is that rkt sets up and
tears down MMU mappings for each job, according to the BO list
provided for it. This seems like way too much overhead - especially
with RK IOMMU ops having been slow enough within DRM that we expended
a lot of effort in Weston doing caching of DRM BOs to avoid doing this
unless completely necessary. It also seems risky wrt allocating memory
in drm_sched paths to ensure forward progress.
Slightly more preferable than this would be that rkt kept a
per-context list of BOs and their VA mappings, and when switching
between different contexts, would tear down all MMU mappings from the
old context and set up mappings from the new. But this has the same
issues with drm_sched.
The most preferable option from where I sit is that we could have an
explicit notion of driver-managed IOMMU contexts, such that rkt could
prepare the IOMMU for each context, and then switching contexts at
job-run time would be a matter of changing the root DTE pointer and
issuing a flush. But I don't see that anywhere in the user-facing
IOMMU API, and I'm sure Robin (CCed) will be along shortly to explain
why it's not possible ...
On the contrary, it's called iommu_attach_group() :)
In fact this is precisely the usage model I would suggest for this sort
of thing, and IIRC I had a similar conversation with the Ethos driver
folks a few years back. Running your own IOMMU domain is no biggie, see
several other DRM drivers (including rockchip). As long as you have a
separate struct device per NPU core then indeed it should be perfectly
straightforward to maintain distinct IOMMU domains per job, and
attach/detach them as part of scheduling the jobs on and off the cores.
Looks like rockchip-iommu supports cross-instance attach, so if
necessary you should already be OK to have multiple cores working on the
same job at once, without needing extra work at the IOMMU end.
Either way, I wonder if we have fully per-context mappings, userspace
should not manage IOVAs in the VM_BIND style common to newer drivers,
rather than relying on the kernel to do VA allocation and inform
userspace of them?
Indeed if you're using the IOMMU API directly then you need to do your
own address space management either way, so matching bits of process VA
space is pretty simple to put on the table.
Thanks,
Robin.
I'm really sorry this has come so late in the game.
Cheers,
Daniel
Return-Path: <linux-kernel+bounces-673569-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id DC75C41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:04:49 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id E0379188322F
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:04:11 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id A74E21EEA47;
Wed, 4 Jun 2025 17:03:41 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="NfJojYoi"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D4401EB5C2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:03:38 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749056620; cv=none; b=Ak0FmwN+g/M4+I8Hba7JBzWjV5hlKYJMn0DYfQojp2FC4/jjVU8TFDzTmSG1oV5GVgigT/otY0tXYrkyWy9ucwOm2UUhuDezbHK9LekRu8ZDSeYjP1ROoDSrDRxPXr2tx7MceRje3t8ULjk4Us1I5esZc6ZrLk2d5X2Zlzsw4Zo=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749056620; c=relaxed/simple;
bh=jayrpGQ8EMuNrxluCYCn92f4Z9jqZ5yLz/s/cukRdq8=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID:
MIME-Version:Content-Type; b=OLbDK68NzqJ1fzhOwHS39O88whPAERGuuEoyX5qlkmagglrPRuE2STTD629lb/msSWjndsPWZxMQYirydbsnA+1O5MFeOvPwyd3wuyamYoPsA+q8X8uJKGe1jwGLF/MWJtkoe9UbFfxbUzklik+GbxtJqJnhpDVB/KGEuA797NE=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=NfJojYoi; arc=none smtp.client-ip=170.10.133.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749056618;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references;
bh=jayrpGQ8EMuNrxluCYCn92f4Z9jqZ5yLz/s/cukRdq8=;
b=NfJojYoioFhA8YQ6Zr1J5w9TwqfFXsqGbf+EgQt0+GgAc/rbjouSdi7BvpfbSB0f2TpkQV
pbjDO+LwRsSyIKHRyRe3RbzPEdRayB779m321u7UJS1blKKqugiWFfh+yGbSyOyzSMGhv+
uPB6GRAi37ojUFOJPbwKKmGKb+/U6Bo=
Received: from mail-lj1-f198.google.com (mail-lj1-f198.google.com
[209.85.208.198]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-66-LTulYyNyPw-_zFv0FPWqbA-1; Wed, 04 Jun 2025 13:03:37 -0400
X-MC-Unique: LTulYyNyPw-_zFv0FPWqbA-1
X-Mimecast-MFC-AGG-ID: LTulYyNyPw-_zFv0FPWqbA_1749056615
Received: by mail-lj1-f198.google.com with SMTP id 38308e7fff4ca-32aaad533c7so143861fa.3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 10:03:36 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749056615; x=1749661415;
h=content-transfer-encoding:mime-version:message-id:date:references
:in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=jayrpGQ8EMuNrxluCYCn92f4Z9jqZ5yLz/s/cukRdq8=;
b=T4xE7i6lv+lczf7I1oDeGI7FeYFCBbQZD1pOL+sVgB75DafRgFCMZ7sRgM1xmDH2b9
gT7pAHY91U5QZj4MH6HOl78GvuCGyPomYlu+Mt12s76aeuu4WmOjC9nMk14fRi1A+546
RbNuKOyamcp+WFuwH/VNY2Agx0NASLpHQa+oDNUdtk6dQUS5EpnQ2i9XF9s4zjMesmXS
WI6tiJ7ByREs9KEMYI3qSeuHYK8R5VVaIVXcnjfHadNCBHF09CvDZ0CCe1WxURhNIkKh
3Go26qEO9iIVZwlUjiojIMQJcJrzKOjPE8M39TZTKPn0+/d1j1L96Hys3d20aypCIlv9
QfRw==
X-Gm-Message-State: AOJu0YzeVxztjLAHOSoavRIT4EDe1sdiWA/b5xFS5kKqoJuuG/3Trj9F
ZLek0EFI/2vajtarX1TD2GcUSdGc+LAnqyLi2utlnd9J+qLUdRPVPBn2Lo7CsCeFBVzq3XFSuUY
xhclVwx5VgKHZGg3haavyEUpequyUKxoqPtOtsjvJfaMx+MxkkQMrPTyWRS5dSpxtRA==
X-Gm-Gg: ASbGncs4OHyqgbLOt6TQj5Qui04A0scemAmIH4YSHzJyrnPDhWWcsReWhO7ohShzJiO
nCkDd1rvOqicT1oO/cYPVCu4FuzrTm0RtubUyUkdn5g0JH8lD/CI9nUScW4Mtnw5O0w6fZ26/0o
SU74r4/Wjpd7cnFu05ooafYq5DyO6Iw21sSZbD5Y0giHKbTbr2UOvaetb2zuHDfscZfEjCCYdCK
CtI+5nAMir5hLXsCbMr8DBY8SXdasvGOwMs6/YW8OZHj/4qla1U5Wij+mB7vSPde7q5pvtLB2jt
WREoRH3K/VHx7v0toxZ26UHW+0qnoM3+al2jCybEZ5MVIh4=
X-Received: by 2002:a2e:a581:0:b0:30b:b908:ce06 with SMTP id 38308e7fff4ca-32ac79599f8mr11789881fa.19.1749056615276;
Wed, 04 Jun 2025 10:03:35 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IFhvowgSTP9uwRV+BqJt6GC7sN1OE+Dwxjsqttfw8aGqFJyzPj9td+LDCaCRBwp+P5agViq4g==
X-Received: by 2002:a2e:a581:0:b0:30b:b908:ce06 with SMTP id 38308e7fff4ca-32ac79599f8mr11789411fa.19.1749056614743;
Wed, 04 Jun 2025 10:03:34 -0700 (PDT)
Received: from alrua-x1.borgediget.toke.dk ([45.145.92.2])
by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-32a85bd26d7sm22115981fa.106.2025.06.04.10.03.34
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 10:03:34 -0700 (PDT)
Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000)
id 74C7C1AA9173; Wed, 04 Jun 2025 19:03:33 +0200 (CEST)
From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= <toke@xxxxxxxxxx>
To: Byungchul Park <byungchul@xxxxxx>, willy@xxxxxxxxxxxxx,
netdev@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-mm@xxxxxxxxx,
kernel_team@xxxxxxxxxxx, kuba@xxxxxxxxxx, almasrymina@xxxxxxxxxx,
ilias.apalodimas@xxxxxxxxxx, harry.yoo@xxxxxxxxxx, hawk@xxxxxxxxxx,
akpm@xxxxxxxxxxxxxxxxxxxx, davem@xxxxxxxxxxxxx, john.fastabend@xxxxxxxxx,
andrew+netdev@xxxxxxx, asml.silence@xxxxxxxxx, tariqt@xxxxxxxxxx,
edumazet@xxxxxxxxxx, pabeni@xxxxxxxxxx, saeedm@xxxxxxxxxx,
leon@xxxxxxxxxx, ast@xxxxxxxxxx, daniel@xxxxxxxxxxxxx, david@xxxxxxxxxx,
lorenzo.stoakes@xxxxxxxxxx, Liam.Howlett@xxxxxxxxxx, vbabka@xxxxxxx,
rppt@xxxxxxxxxx, surenb@xxxxxxxxxx, mhocko@xxxxxxxx, horms@xxxxxxxxxx,
linux-rdma@xxxxxxxxxxxxxxx, bpf@xxxxxxxxxxxxxxx, vishal.moola@xxxxxxxxx
Subject: Re: [RFC v4 10/18] page_pool: rename __page_pool_alloc_pages_slow()
to __page_pool_alloc_netmems_slow()
In-Reply-To: <20250604025246.61616-11-byungchul@xxxxxx>
References: <20250604025246.61616-1-byungchul@xxxxxx>
<20250604025246.61616-11-byungchul@xxxxxx>
X-Clacks-Overhead: GNU Terry Pratchett
Date: Wed, 04 Jun 2025 19:03:33 +0200
Message-ID: <875xhbv3q2.fsf@xxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Byungchul Park <byungchul@xxxxxx> writes:
Now that __page_pool_alloc_pages_slow() is for allocating netmem, not
struct page, rename it to __page_pool_alloc_netmems_slow() to reflect
what it does.
Signed-off-by: Byungchul Park <byungchul@xxxxxx>
Reviewed-by: Mina Almasry <almasrymina@xxxxxxxxxx>
Reviewed-by: Toke H=C3=B8iland-J=C3=B8rgensen <toke@xxxxxxxxxx>
Return-Path: <linux-kernel+bounces-673570-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id BA6D041E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:05:20 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 3D821188A309
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:04:28 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 530D5175A5;
Wed, 4 Jun 2025 17:04:06 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="E37B+14x"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id B0A8D1EB5C2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:04:03 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749056645; cv=none; b=XIB4GlvXmmZFYNbytWAkivamw5nohE66fenWjNgpipxP74cL87zzVRbWdZixi1EENRxsTKXgccrWf90sPAed+a/B/f6/FBj7wrtovwVJ9NaQLYNyhh55oruQj12YsLb8A2eRnSaOO+BBTVeSYEEp79nOzfajyO8vWx0DKwJhiO8=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749056645; c=relaxed/simple;
bh=dg9wIJkOGB/TKSx73q31T7Hr/V6bVEWMbnLOupX7Qq0=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=KzTImIgK/xJvJySfr3m3gDiIclOf+mz9g2Sueb1d9o9XkLtbHc4hhdX58pQDhWv3DolpjPLt1jqnz4m2y+OmoRH9iNGH72gOBIL37S2Krou1HaHZJHF6AYGFeLObXQGxfADVmyYtNZRzwOsxhKlTJ4CuiUDhgPk8xspj6aNQCaQ=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=E37B+14x; arc=none smtp.client-ip=170.10.129.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749056642;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
in-reply-to:in-reply-to:references:references;
bh=KXYECtp31evftfpREsHH1UacYDYuxjJZpbQfu51cYzw=;
b=E37B+14x8lR4DmHP31JwKpkC4pHocEfR2/DP8arVjYlIv5I0+Xgwxv5aBZoar427O6qTxg
jFVf0js+uP6/RfsfgWqe+2b5bZ8ZjoP2G+PZwXwjsw41yCqVVFvfHsjZv4W+QyRARAnxYU
yTv9ShF0Os/T4GA+DOTqbWVW3Khvd80=
Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com
[209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-641-yIz9q067NjmcHf5YU4VP2w-1; Wed, 04 Jun 2025 13:04:01 -0400
X-MC-Unique: yIz9q067NjmcHf5YU4VP2w-1
X-Mimecast-MFC-AGG-ID: yIz9q067NjmcHf5YU4VP2w_1749056640
Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-7ceb5b5140eso14417385a.2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 10:04:00 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749056640; x=1749661440;
h=in-reply-to:content-disposition:mime-version:references:message-id
:subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to;
bh=KXYECtp31evftfpREsHH1UacYDYuxjJZpbQfu51cYzw=;
b=sgRiiSwVNr6uWFLnfPi8zs1s4A/vPUGkFv+sDmn4mHgIECbK7qCcbI54EATXDUJ4rY
DwVY1Dq4jywXU19ITrYvRYcdpgT99QyjPy644jhf9HnCUq3CEayLB/etdsh8U41tSQnr
vevvelvG35LGUA3tyc5vPFNLXhmiCqoBTuad/zd0mbjS2I/nkwC7NFoEnv870K60vLVP
xhZOa8IXO1m12/X+C67jlClzRPFJFk+i32rbv9/wlN9mg67gHCMJfGpwQb67bUf8NR69
fhtGRVF88yZm30LHdF97ynxRSltZU/xMyaOwGUjiA7LfArSxMZquI6foRxZT8Uoecw94
hXIg==
X-Forwarded-Encrypted: i=1; AJvYcCW8Drfl/DmiXV7oKEq9PkE7YwA42wHXBWaf/BhAWcD1Rw7N5Mxm7OPmxp4pw1dMFM9QGux08rlrY3ZJCGk=@vger.kernel.org
X-Gm-Message-State: AOJu0Ywi86uMXXee7ZIG/rwDvPeyb7NNOGoLDccDlddM1WsfaOEhsF/5
TOL3oypoL4wCqhWbV4Gt9njvpW8aSnWmsL4CI3FMczo7/hl/mqPsqBZoD+5ghmJuVQED5D2DWIL
sGSmyS1qYAI1vy65T3/iKYa+Ndbe+cD7x4FWtDWlRRufzekdHsgCbgC5E6SXiGdiiBw==
X-Gm-Gg: ASbGnctrXja+hN3CD3jdcKg+lMuh7vFZ2tSHjUCs6C0Sh8YAxTQCFaIE8OOUgscApVu
MKInM9eDHmgms/5e8g8WvnmEUny+znrJVfLjaEkf5cIqmwgqV9R/ZYeZFL25p2rDMFF+4Z5vk2e
J5F5z2Io4ameMVHmvW19ZGN5wgmBRlvSy2NbtraS5CQmm+XjdeLW4ELYcHVoa9d8VFZ7P3NPEz4
RAmQHqt+VxmDwztosw/nwmNmC9Mfd7cGIbYt+EW9/dEEvwxt8nwVdmYDcQoLs/DsIwehAr77iMk
qP8yrir+/PxXVw==
X-Received: by 2002:ad4:5dec:0:b0:6fa:9baa:face with SMTP id 6a1803df08f44-6faf6fc3deamr54288826d6.35.1749056640000;
Wed, 04 Jun 2025 10:04:00 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IEOvQDaKnUU3r62FtrvsKHhJElDFbbpfiXfuDmF6cUSLcZ7REl/ix2InFDElBeDf4MxXpK8jw==
X-Received: by 2002:ad4:5dec:0:b0:6fa:9baa:face with SMTP id 6a1803df08f44-6faf6fc3deamr54288406d6.35.1749056639598;
Wed, 04 Jun 2025 10:03:59 -0700 (PDT)
Received: from x1.local ([85.131.185.92])
by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6fac6d33ab1sm102398986d6.2.2025.06.04.10.03.58
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 10:03:59 -0700 (PDT)
Date: Wed, 4 Jun 2025 13:03:56 -0400
From: Peter Xu <peterx@xxxxxxxxxx>
To: Jann Horn <jannh@xxxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
David Hildenbrand <david@xxxxxxxxxx>,
Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>, Mike Rapoport <rppt@xxxxxxxxxx>,
Suren Baghdasaryan <surenb@xxxxxxxxxx>,
Michal Hocko <mhocko@xxxxxxxx>, linux-mm@xxxxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx
Subject: Re: [PATCH 2/2] mm/memory: Document how we make a coherent memory
snapshot
Message-ID: <aEB8fFEXKPR54LdA@x1.local>
References: <20250603-fork-tearing-v1-0-a7f64b7cfc96@xxxxxxxxxx>
<20250603-fork-tearing-v1-2-a7f64b7cfc96@xxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <20250603-fork-tearing-v1-2-a7f64b7cfc96@xxxxxxxxxx>
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Tue, Jun 03, 2025 at 08:21:03PM +0200, Jann Horn wrote:
It is not currently documented that the child of fork() should receive a
coherent snapshot of the parent's memory, or how we get such a snapshot.
Add a comment block to explain this.
Signed-off-by: Jann Horn <jannh@xxxxxxxxxx>
---
kernel/fork.c | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/kernel/fork.c b/kernel/fork.c
index 85afccfdf3b1..f78f5df596a9 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -604,6 +604,40 @@ static void dup_mm_exe_file(struct mm_struct *mm, struct mm_struct *oldmm)
}
#ifdef CONFIG_MMU
+/*
+ * Anonymous memory inherited by the child MM must, on success, contain a
+ * coherent snapshot of corresponding anonymous memory in the parent MM.
Should we better define what is a coherent snapshot? Or maybe avoid using
this term which seems to apply to the whole mm?
I think it's at least not a snapshot of whole mm at a specific time,
because as long as there can be more than one concurrent writers (hence, it
needs to be at least 3 threads in the parent process, 1 in charge of fork),
this can happen:
parent writer 1 parent writer 2 parent fork thr
--------------- --------------- ---------------
wr-protect P1
write P1 <---- T1
(trapped, didn't happen)
write PN <---- T2
(went through)
...
wr-protect PN
The result of above would be that child process will see a mixture of old
P1 (at timestamp T1) but updated P2 (timestamp T2). I don't think it's
impossible that the userapp could try to serialize "write P1" and "write
PN" operations in a way that it would also get a surprise seeing in the
child PN updated but P1 didn't.
I do agree it at least recovered the per-page coherence, though, no matter
what is the POSIX definition of that. IIUC an userapp can always fix such
problem, but maybe it's too complicated in some cases, and if Linux used to
at least maintain per-page coherency, then it may make sense to recover the
behavior especially when it only affects pinned.
Said that, maybe we still want to be specific on the goal of the change.
Thanks,
+ * (An exception are anonymous memory regions which are concurrently written
+ * by kernel code or hardware devices through page references obtained via GUP.)
+ * We effectively snapshot the parent's memory just before
+ * mmap_write_unlock(oldmm); any writes after that point are invisible to the
+ * child, while attempted writes before that point are either visible to the
+ * child or delayed until after mmap_write_unlock(oldmm).
+ *
+ * To make that work while only needing a single pass through the parent's VMA
+ * tree and page tables, we follow these rules:
+ *
+ * - Before mmap_write_unlock(), a TLB flush ensures that parent threads can't
+ * write to copy-on-write pages anymore.
+ * - Before dup_mmap() copies page contents (which happens rarely), the
+ * parent's PTE for the page is made read-only and a TLB flush is issued, so
+ * subsequent writes are delayed until mmap_write_unlock().
+ * - Before dup_mmap() starts walking the page tables of a VMA in the parent,
+ * the VMA is write-locked to ensure that the parent can't perform writes
+ * that won't be visible in the child before mmap_write_unlock():
+ * a) through concurrent copy-on-write handling
+ * b) by upgrading read-only PTEs to writable
+ *
+ * Not following these rules, and giving the child a torn copy of the parent's
+ * memory contents where different segments come from different points in time,
+ * would likely _mostly_ work:
+ * Any memory to which a concurrent parent thread could be writing under a lock
+ * can't be accessed from the child without risking deadlocks (since the child
+ * might inherit the lock in a locked state, in which case the lock will stay
+ * locked forever in the child).
+ * But if userspace is using trylock or lock-free algorithms, providing a torn
+ * view of memory could break the child.
+ */
static __latent_entropy int dup_mmap(struct mm_struct *mm,
struct mm_struct *oldmm)
{
--
2.49.0.1204.g71687c7c1d-goog
--
Peter Xu
Return-Path: <linux-kernel+bounces-673571-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 308E241E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:06:43 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 872571882CCE
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:06:56 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 8927E1F1909;
Wed, 4 Jun 2025 17:06:34 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=imgtec.com header.i=@imgtec.com header.b="gb45xPOa";
dkim=pass (1024-bit key) header.d=IMGTecCRM.onmicrosoft.com header.i=@IMGTecCRM.onmicrosoft.com header.b="YoOGYGdb"
Received: from mx08-00376f01.pphosted.com (mx08-00376f01.pphosted.com [91.207.212.86])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id CB88D32C85;
Wed, 4 Jun 2025 17:06:27 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=91.207.212.86
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749056793; cv=fail; b=SE7GYhhJ8upeh+t7fI9eSrNORddvJ7STQrMUMKsz10Mz4bW32L4BJ+w/1VgPwiJziImLwocPysUcUX+D/TdqkNZT1CkaCEgEBGFQ0PIhOejOpdwPMuJP6gXL94w2zlrJpYQUROOks9Gp1hnlBkAsZso1mO5rVSstuPjIfBBcYvw=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749056793; c=relaxed/simple;
bh=Hi52ycIfXvVja0Vt1wmm5GlQelnoLjxs5eAeauxxXFY=;
h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To:
Content-Type:MIME-Version; b=kNjyjU396FQGyXrd/ZPRMW7fOG3byif5oPp5Pma2mBUxz9rw6bnMWmr4f5hvavJK4Idg5oGL8gEaZ39KFlII1uOGcOTXVhWsZF+hNHfhSJ4JpueDdAtXQZ8ibQPOtv/HzLditexUJmmmB1M/ffjMPDyPmaxPS5RCWkYXoR0Lr4w=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=imgtec.com; spf=pass smtp.mailfrom=imgtec.com; dkim=pass (2048-bit key) header.d=imgtec.com header.i=@imgtec.com header.b=gb45xPOa; dkim=pass (1024-bit key) header.d=IMGTecCRM.onmicrosoft.com header.i=@IMGTecCRM.onmicrosoft.com header.b=YoOGYGdb; arc=fail smtp.client-ip=91.207.212.86
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=imgtec.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=imgtec.com
Received: from pps.filterd (m0168888.ppops.net [127.0.0.1])
by mx08-00376f01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 554GhuCH031919;
Wed, 4 Jun 2025 17:47:57 +0100
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=imgtec.com; h=cc
:content-type:date:from:in-reply-to:message-id:mime-version
:references:subject:to; s=dk201812; bh=9nqqi1jx4wmNiwWMZ84d1DIH5
Yd13jhUmXG6SiBBMgo=; b=gb45xPOaibs5JsrZ5/O9LgFm3ThtHchsnmQ/oxRgV
v1HUx1rFCjgFRlqAmtNKVesxK/OSAerx6rJ6pOek28mposEs/44q6ryHNpWBAKiJ
m4hsCjgWdjvdmOZu8OeoFCbDAjvwIOe2SyURZL+5v7Om7MzzuQvBT1ZfZhduvTjj
wUtYA+uidUK5NB889yhypZ8EmAqdPiEO4UbkmTaJfEiM1gppymr+1hfES/+vVWUC
ZkWoZp8MA5BWXSqySrs2xv1YN89TQa8QtgrDjZ7SHO72FpiqrOKAdshvo0bZgBqe
Ppw45Za6UFCo0eBKJ6F4IKCOxf35xZ8QcFjJKR80O76Kg==
Received: from lo3p265cu004.outbound.protection.outlook.com (mail-uksouthazon11020114.outbound.protection.outlook.com [52.101.196.114])
by mx08-00376f01.pphosted.com (PPS) with ESMTPS id 46yr1s49kn-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 17:47:56 +0100 (BST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=sQrJtQHTRr6L/LOTPwE9Q+sCeZzok9KcDSMzalJF6tUZCpAO1wZlj1wLJIRxLtd3fx7E1axg/Ro96Ef42CxwStC5OwdN9Cj4DDxCXN+nS2lF6xYzyBjZ6cX3EXIsoA64yqfpAUhzsgMeD7IUVXLD+0ZCeDWk0XLCtB3eI/pTtFYk1dhzC+iqU6B0qRmqG+YHeDGUXSJZwVZDl2rO3ahpBW9z+JNRKSCBYsJ9oXJtKVFZxNnmEo08R+HrfcdJyjW8ZKSl7jcIz632WY/5ETYPzANSmDQdijWtEvRz0tgKzn/JfVYGCXCQHr3T09GUbpvQScLBTrC41Q+P7mENKPTYOA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=9nqqi1jx4wmNiwWMZ84d1DIH5Yd13jhUmXG6SiBBMgo=;
b=odR+KTUbbSTs6FhxdLC4Ma6tj5GRpZjqk3xby+VP7kvuZXbs44ivIttFChjkLCIL3meiCrKgGJn+SvKOeZndlB2A3W/B1x/zVp2nRGBnVRNMLCDt8nakKF9Hbspve9hN8p6bmZLGQFpglkE7kyDLWqN3o8R6Q/PTLUOR6Q8K8mimo2n9qrYFyAd8TZ6+CjkR/bO0pynZe7ca8k+QFW+6PhOzVnSk0ppOTWMXMlDABcBAEI2L51/RMSW2oJFC23U/+Ee+sy5HqpMeZZxNOAn5agYttF7zl8uF2tI+rN+gaAsoG2/7Htl+pYUvJgKiiLlsu7Gtdt79Ck1jbqoDLrMh5Q==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=imgtec.com; dmarc=pass action=none header.from=imgtec.com;
dkim=pass header.d=imgtec.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=IMGTecCRM.onmicrosoft.com; s=selector2-IMGTecCRM-onmicrosoft-com;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=9nqqi1jx4wmNiwWMZ84d1DIH5Yd13jhUmXG6SiBBMgo=;
b=YoOGYGdb1HGBBGPtjin2LgUSgMCCGXWxFIpMEmg+xRMVb1hppHeoqJE/G6gXXMqhYV93dX1VPu8Sa6OPUFvoR3GC5XJ1f341Rzhzu+vw4izMGdoqo9pVLoiH8UicFy7DQHN3wxOWFXWNdBkXFE1Rd0NiSjL8ng9nzyipfBDx7pc=
Received: from CWXP265MB3397.GBRP265.PROD.OUTLOOK.COM (2603:10a6:400:e7::8) by
CWLP265MB1794.GBRP265.PROD.OUTLOOK.COM (2603:10a6:400:5b::8) with Microsoft
SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.20.8813.19; Wed, 4 Jun 2025 16:47:53 +0000
Received: from CWXP265MB3397.GBRP265.PROD.OUTLOOK.COM
([fe80::8e9d:6b2f:9881:1e15]) by CWXP265MB3397.GBRP265.PROD.OUTLOOK.COM
([fe80::8e9d:6b2f:9881:1e15%5]) with mapi id 15.20.8813.018; Wed, 4 Jun 2025
16:47:53 +0000
From: Matt Coster <Matt.Coster@xxxxxxxxxx>
To: Ulf Hansson <ulf.hansson@xxxxxxxxxx>,
Michal Wilczynski
<m.wilczynski@xxxxxxxxxxx>
CC: Drew Fustini <drew@xxxxxxxx>, Guo Ren <guoren@xxxxxxxxxx>,
Fu Wei
<wefu@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski
<krzk+dt@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>,
Bartosz Golaszewski
<brgl@xxxxxxxx>,
Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>,
Frank Binns
<Frank.Binns@xxxxxxxxxx>,
Maarten Lankhorst
<maarten.lankhorst@xxxxxxxxxxxxxxx>,
Maxime Ripard <mripard@xxxxxxxxxx>,
Thomas Zimmermann <tzimmermann@xxxxxxx>,
David Airlie <airlied@xxxxxxxxx>, Simona Vetter <simona@xxxxxxxx>,
Paul Walmsley <paul.walmsley@xxxxxxxxxx>,
Palmer Dabbelt <palmer@xxxxxxxxxxx>, Albert Ou <aou@xxxxxxxxxxxxxxxxx>,
Alexandre Ghiti <alex@xxxxxxxx>,
Marek Szyprowski <m.szyprowski@xxxxxxxxxxx>,
"linux-riscv@xxxxxxxxxxxxxxxxxxx" <linux-riscv@xxxxxxxxxxxxxxxxxxx>,
"devicetree@xxxxxxxxxxxxxxx" <devicetree@xxxxxxxxxxxxxxx>,
"linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>,
"linux-pm@xxxxxxxxxxxxxxx" <linux-pm@xxxxxxxxxxxxxxx>,
"dri-devel@xxxxxxxxxxxxxxxxxxxxx" <dri-devel@xxxxxxxxxxxxxxxxxxxxx>
Subject: Re: [PATCH v3 7/8] riscv: dts: thead: th1520: Add IMG BXM-4-64 GPU
node
Thread-Topic: [PATCH v3 7/8] riscv: dts: thead: th1520: Add IMG BXM-4-64 GPU
node
Thread-Index: AQHb1XBqRHesCZ2fGEShg2Dpl2yN/g==
Date: Wed, 4 Jun 2025 16:47:52 +0000
Message-ID: <e39c6748-59aa-4c4a-98f3-263751a120c1@xxxxxxxxxx>
References:
<CGME20250529222410eucas1p2e1d41a2fc717caef1aed51367a7db944@xxxxxxxxxxxxxxxxxxxx>
<20250530-apr_14_for_sending-v3-0-83d5744d997c@xxxxxxxxxxx>
<20250530-apr_14_for_sending-v3-7-83d5744d997c@xxxxxxxxxxx>
<CAPDyKFpYfZNthdRN=pCv4FEdFCzrKEH4aFBy4ew-xLKtpbJ5Tg@xxxxxxxxxxxxxx>
In-Reply-To:
<CAPDyKFpYfZNthdRN=pCv4FEdFCzrKEH4aFBy4ew-xLKtpbJ5Tg@xxxxxxxxxxxxxx>
Accept-Language: en-GB, en-US
Content-Language: en-US
X-MS-Has-Attach: yes
X-MS-TNEF-Correlator:
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: CWXP265MB3397:EE_|CWLP265MB1794:EE_
x-ms-office365-filtering-correlation-id: 7f92d714-b6b7-4e9b-0c8f-08dda3878c85
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam:
BCL:0;ARA:13230040|1800799024|7416014|366016|376014|38070700018|4053099003;
x-microsoft-antispam-message-info:
=?utf-8?B?QklzMmlIZGVZQjhZemp0Z1hlUXAyNjNXaHNHUHYvSTdGMjQvZjBSRXdyNjhr?=
=?utf-8?B?djBGT1dDOWdpRjVNTEhLZlNENW1iQ1J4ZElTR1pTSExBMHFBM0ZVWDJQVFpF?=
=?utf-8?B?clZwZWlsTXorVFYrdXZSYnBRMFdESzRHUThyQzB2T2dueWVsWWVMT1kwazFt?=
=?utf-8?B?d2hDbnpFdDNWYnE2ajVGdDY3bno0amw5MVlpZElySDBLVW5iY3dpSDloQ3JU?=
=?utf-8?B?K21ZTWpKOEZMbmhHdUwyY2IvUEVVMkQ1ZTU5TTNFbUV3cXMvV1pvQW5YamtL?=
=?utf-8?B?K25KdWNjUTltaUZxTmN6WEVXVDZNUDBjNjFJVmwwL29LcUlNWVpsUHRRMnJs?=
=?utf-8?B?a2hBdEN3WVQ4Zlh3VnNNbVlKT3ZyL3JVMUFab2Fpb0xTVi9TYWZ1SDZ4UW9t?=
=?utf-8?B?aDQxYmMzU00rUzFBQnlvRDNNSVMyOFFWRWtGRXhoTmJxS3BHZ0tiNjVuMSsw?=
=?utf-8?B?ZGlHYll6N3NwL2lqZ1hoVUVSZWN6SlZvazgyOTZoaGdvWE5CQldqZG1leGo3?=
=?utf-8?B?Z0Q5dFUrZ2FYOEVuSnJ4UEprZ0ZpeThZSmdvSzdiSDVzcEdkNHIzcHJveWVY?=
=?utf-8?B?bUl1TzdLMkFHVjEzU3hzMWRPZGJtaUtyTVNxSVhVdWo4NmNpc21EWXhsVVYy?=
=?utf-8?B?Y05icTZ2ckxBVzN0cDl1Y0lFYkh6RkMvNTZiZWs2TWhuakNVYzZlUVFncjI1?=
=?utf-8?B?ak5VTFdka1FFcjA5SDZmcVFFUlJEY2E1QkdvajhHTXVaaEZTOG1mN3phcE0v?=
=?utf-8?B?Z2tlbkRXWDlSNUt2WjJEYkpqdnJ3N0FBbzlJV0ttS2MxSDl0SjA0dVROM2hv?=
=?utf-8?B?Qm43MXgyRklrQlFWS2c0MnNubkh1RDNMM1RNZld4dHBtTnU4ODBiM3B3MTNF?=
=?utf-8?B?YkFVdzlGNGFWM3ZMYTEvZHY4ZUtMaEFxaVRBeHV0ZUp6a3dTU2JiSXJuVUVH?=
=?utf-8?B?NFE2Wk5paG84TDUvdU5UVXprc1ZJMVdmemFPRGxSMzNMaE5oMkRoZ291WXQw?=
=?utf-8?B?eFQ3NW1lMzhJNmh0T0tNbldHVGhaMjZneFNId3pWdk40OWxMTzFHMkM0VjNh?=
=?utf-8?B?N2V4ZnNxeHY4MTRYS3NtQU5MeENpNllHcXJGWmw3dmtGby9PbnpVbVVqWXhB?=
=?utf-8?B?M0RSY0FuQzYvcFlJaVJzT1JvWnJEUTZrZTRXS21SOTVSbHVWR0pBYkQ5Q0dL?=
=?utf-8?B?UUU2WDFpakxYTGNoeTFPZjRXNzgxdytBQ0thdEFZTHJkOSt1bFpaYnZFQlFs?=
=?utf-8?B?QklVaUlsb25OZENxWkw4TEdoOWw0RDYxN1VESllUd0grYWxOOEZTSU55YnQ3?=
=?utf-8?B?dGpsV1I1cW9oVjkxWUxQQ20wYXlnRDEvU3NGVC9HUnl6b056aGNQNG82QTNM?=
=?utf-8?B?aittZHJqN0pEdTlPQ1pDKzhGNjltaWxNejh4b0RBakxXRTRiOHl4aXZrd1E2?=
=?utf-8?B?TjluZ1d5VXp0R0xUWXRVVWlDS09mTUZzYytreGRtN1FkR0t6U1haWnlEQ2Jn?=
=?utf-8?B?eWFndVlPTWQxVm54S2V6cHg1SG1DcU9JeWxrWnNaS0tOUkRsanVPdnJsNTRF?=
=?utf-8?B?Yi81d1hvbUFhRlYxbkJLWnhoVi9NdU9UUEt2U3QxN3lYNUpsMkVYWlBvZHNF?=
=?utf-8?B?T2lYMFlTb05xelBNbVg4M3R5Rkl0b01TY2VyY0M0L0haaGlIcVV1UnJyRGZx?=
=?utf-8?B?dURhWklnNFFqWXFBenk1OG5VUFBzWWhwYnRFNXF5alViR1lUUXJpR0pRbFY0?=
=?utf-8?B?Q2JGNUdWNVBSODFaTHhEZklOUFZuS2hVbG5zTzZxckJnd3RQclFtZ1lYSnQ0?=
=?utf-8?B?ZEQyOEQwN2xMUm9lSjE0Mmw3K29UN0hPT05SZHRodnpaK2xOalRucnhkT2hx?=
=?utf-8?B?YXJVdEVGRWdlR2Z0L21aL0VvSXhFd3phTXE0Z0l5Z29WMzY0Nk1wa2dCYmdH?=
=?utf-8?B?dEplSVY4MVY1WjZsY1RNSCtneXdzdjhtR0pLVHV4VmRSdmtuWEtmTlUxdldR?=
=?utf-8?Q?m09FPfSw4ac+vrdKZHhxTdM71XW+qQ=3D?=
x-forefront-antispam-report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CWXP265MB3397.GBRP265.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(7416014)(366016)(376014)(38070700018)(4053099003);DIR:OUT;SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0:
=?utf-8?B?WWkrZU5hQm9jdXVpNjk0REtPTFhIb3k3d0ZWajNweTZCQVJ2eHBnb0dhalJ0?=
=?utf-8?B?TC9KRVE5Ujdzb0R5RHlkdS9hZE9WaDVscXMzUnBjbko2K0lTSzVpdXBhaE1r?=
=?utf-8?B?VVl1YjR3L00yWGlyaDlhdDlmZWlhZUFuQ1RZM29DT2tlOHhhUUg3UkVVc2dC?=
=?utf-8?B?cHphUjcwaHdTR3VTYnhWNDgrRXE4NmhNak43RHFTakcrblFIalp2OThJWmtp?=
=?utf-8?B?M0Vac2RZQW9kUmNHRWhYTGlXNEVzNG91cFpiRzhPSEl1cGJVS0YzNVZkNUtL?=
=?utf-8?B?eS8wbHVNQXBoUFp5dlVVMlpSZWVZaEJHa1ZabkdhZ09nMGpJODZMM1hPajUw?=
=?utf-8?B?RXlXZHlFZW1BaWNsc3ArUXdSSSsyVGJRei9YSzZrM0hHK2dOMTBrZ0ZyTjZQ?=
=?utf-8?B?N0QrV280R3JhVlJkQ0dBZnBxRmVrWDBtT0E5MGJ1V3g2Ti9CWGk0NEI3ZUww?=
=?utf-8?B?UlBCbFdMMnE3YU51bW5sbVF0MmRTSHB6SVFhYnZJckhhSEg3T25HRHVSU0dW?=
=?utf-8?B?bDB6QXRZTzRySkRZb2h4V1h5TG51MVNVNFBJZU5oc2tubEhQaVBrZm52UUVK?=
=?utf-8?B?a29oQ24yTkJIcytwYTczTzRtR0pWL21PRnk3SnhJY3BqRFk1R1dMNkU4eGxB?=
=?utf-8?B?c244QWwwKzZYaXNhalF2SHhzQ0pUYXl5ODZMU2FLZFZuZFdnenFMMzdUa08w?=
=?utf-8?B?V2MrY0IzV3NHUEdiaElYa2hCeFRxbnFmL1BNOWVVYmFTNlZlK3JQUUdseTdN?=
=?utf-8?B?aURIbGVNVzNtdjB3VGQ3dk9DbDJoNTREaGtUM2tjNllhYzdOVVdxN3ErV2JL?=
=?utf-8?B?RnhPSkU1WDhHdkdJOEI2L1hwb0hjTkpndnUwd01ZdUtnZ2NPVHgxdThIVDRO?=
=?utf-8?B?K1NCMkJCK0k5d2Iza0EvTkhNb21JWFA5eWRWSmhMeTBYSjgxR3h1bm5ycHRw?=
=?utf-8?B?emdydmVYUDVsck1vSHRQalZza256dlA2NkxDQ2N0T0VOUzFNR0NMd0dkU0M2?=
=?utf-8?B?Y09ROXJnV0I1NFAwUms1SUQxSE5mdVlUR01YVTlSQlRkdENWMllseW9IZ3hB?=
=?utf-8?B?ckQzY3djOUdlUUlBa21ZOEV5SlVnZ254djh3TlVqOG5TTEE0TXdocGx5bkJy?=
=?utf-8?B?YkpkNWFrK2MzZ0VVUjN3TDRZQmd2bEtydFdIWVVnV0RNbHd3ZTh4UXZtUmZm?=
=?utf-8?B?R0RaMlpjaWtoUk9MYmFRMWk1dlBTSGJma1p5NTJlNTUvelJrS0ozSU5LMXND?=
=?utf-8?B?SzBVdjdqbDZ4UW9vTXE4M20rbm5yZFdFRFJBUjN4UGltQ1JPV3R1d3VYYXZj?=
=?utf-8?B?eUk3VWs4MnpIenEwMWV6bElqNTRkNWRaZWM4TE4vcUJPWTIxY3JNNDErQXph?=
=?utf-8?B?cTFaWHpVTEZta0tGenVTLzBJUWx1VWRPeGFkZlRwK3RnRGx6SkRsZkRaZWph?=
=?utf-8?B?V3ZiTEt5angyMkxrYmRZZmhsK2grNDI5czNoUVN0OGQ3RmphY0dnUkE0RW55?=
=?utf-8?B?YWRubUlqSHZWY1FEcVZxUC9tbmpGeFRaRDRqMFlqTkUrUUpGc0JsK2ovc3ZB?=
=?utf-8?B?VVdlVVhaM0RoU0hpZExwckNJOTVwYU1QUE1NODJ0UXNFM010bmNORUUzcVQ3?=
=?utf-8?B?UUtFUjc0RW11MXlHVStNV1Y5VEx1OUYvYllibzRsaXFCMGhuU0hsWkxhSjZ3?=
=?utf-8?B?eEhnTk5FQWQzMFl1K0VsSm9ZOFl4elU1aUFpOEpLUllSbnptL0tsc2QxZTBu?=
=?utf-8?B?cVZXWTNmWDNNbjVCSjdicUdXZVR0elZHYUJ1Wm8yek53UkpiOU1IZXI5RGJR?=
=?utf-8?B?UGlPV3FuR2MxMk1XM3Fid0NsdDJNa1cvenNWTnN3azZabnRFNnY3bXFDeFZR?=
=?utf-8?B?eFRPQzd1QXZyRlpkeW54WW94RDhwcXBrclNZSW10c2d6alRyekNkSDl2Y2la?=
=?utf-8?B?c2tFVmo3bXdUSlBjbmVCK2dOandpOFVEcHZFazdyVFhJVjNLNFI5NXhHT2Nh?=
=?utf-8?B?NVh2ejZ2WG9YOERUOCtuVnBHQ2dEN1hGTTBvVXE3SjIvTzFuVS9vcFJkdTlI?=
=?utf-8?B?cE5BQ2dvVnc2cG5nSm5CSU9qYjhsSVZMK1NyOGhmNnNsbURHdDlRSTNYVktE?=
=?utf-8?B?U3gyc3VxM3NlTDlITnoya2xZZTE5MXQ1UlRFcUszOG9McVVCZlR1dUVZMUUz?=
=?utf-8?B?RlE9PQ==?=
Content-Type: multipart/signed; micalg=pgp-sha256;
protocol="application/pgp-signature";
boundary="------------exTRLs9Cek9O8APVswKEMWcT"
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-OriginatorOrg: imgtec.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: CWXP265MB3397.GBRP265.PROD.OUTLOOK.COM
X-MS-Exchange-CrossTenant-Network-Message-Id: 7f92d714-b6b7-4e9b-0c8f-08dda3878c85
X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jun 2025 16:47:52.9357
(UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 0d5fd8bb-e8c2-4e0a-8dd5-2c264f7140fe
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: A88zxH7j4F1c9cjIKIpj0Wudvzexo9Aw7smWNG5j5/DvhwBy5Eb3PGX6Pw5FjNYNqieadxebf2LKSmqPeholSQ==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: CWLP265MB1794
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDEyOCBTYWx0ZWRfX/PFfBKkVcsWq nwMEWN2hg2ICk3mdC3v+AHT8y1cD6Y1JfmsfyqfMzMNCKWF+YZKky8RgFSyn0Rh7X44E8/j2MH/ HZzSn/FIkZ5qpGVx+Z04eNu+nRqdniuRYJxtdWucMC92vu6HTjPxkrW1Wq9Uwvo5fLBW1jWSlJp
WxH2h++Y9vShWhn5+cu7Y3L6PAFLbq7XD22KaT8/BJC8aeVZa1PQRxX/m5zrGGv7WP3fTvHZmKi JpdCEnh+7PYVb+lujVbrrUrt+rqpUt900GCwguzr8ZloYsd35bV9Ts3SdC4nyA4aBLQOVMykczf Y9cMTkSgZDPt9l+rWunf+jTs4wI4p53KKg0auTqbrGLs+wlGNFAX+HzfR+Qe7Oxc2rLfLszPdg0
RgnwSQEgMTaSjZB0yphkrJFgDF6S1QYQ7O/bfvh2SV35AvQJ/BqM+90tENKKfn/eXeNiopJ7
X-Proofpoint-GUID: e_1YUH3p9QYAwFdylkjhfdCir3ZH3ybt
X-Proofpoint-ORIG-GUID: e_1YUH3p9QYAwFdylkjhfdCir3ZH3ybt
X-Authority-Analysis: v=2.4 cv=ENAG00ZC c=1 sm=1 tr=0 ts=684078bd cx=c_pps a=CHxeKWPuyM/8WOKZB4mBQA==:117 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19 a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19 a=xqWC_Br6kY4A:10 a=6IFa9wvqVegA:10
a=NgoYpvdbvlAA:10 a=VwQbUJbxAAAA:8 a=r_1tXGB3AAAA:8 a=hD80L64hAAAA:8 a=tmvp2RcnOXokmnWo3QEA:9 a=QEXdDO2ut3YA:10 a=baHJk7X-Z76wR6_dnLYA:9 a=FfaGCDsud1wA:10 a=t8nPyN_e6usw4ciXM-Pk:22
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
--------------exTRLs9Cek9O8APVswKEMWcT
Content-Type: multipart/mixed; boundary="------------uNH0PIMu3PbikIDBZOzmuitr";
protected-headers="v1"
From: Matt Coster <matt.coster@xxxxxxxxxx>
To: Ulf Hansson <ulf.hansson@xxxxxxxxxx>,
Michal Wilczynski <m.wilczynski@xxxxxxxxxxx>
Cc: Drew Fustini <drew@xxxxxxxx>, Guo Ren <guoren@xxxxxxxxxx>,
Fu Wei <wefu@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Conor Dooley
<conor+dt@xxxxxxxxxx>, Bartosz Golaszewski <brgl@xxxxxxxx>,
Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>, Frank Binns
<frank.binns@xxxxxxxxxx>,
Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>,
Maxime Ripard <mripard@xxxxxxxxxx>, Thomas Zimmermann <tzimmermann@xxxxxxx>,
David Airlie <airlied@xxxxxxxxx>, Simona Vetter <simona@xxxxxxxx>,
Paul Walmsley <paul.walmsley@xxxxxxxxxx>, Palmer Dabbelt
<palmer@xxxxxxxxxxx>, Albert Ou <aou@xxxxxxxxxxxxxxxxx>,
Alexandre Ghiti <alex@xxxxxxxx>, Marek Szyprowski
<m.szyprowski@xxxxxxxxxxx>, linux-riscv@xxxxxxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
linux-pm@xxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx
Message-ID: <e39c6748-59aa-4c4a-98f3-263751a120c1@xxxxxxxxxx>
Subject: Re: [PATCH v3 7/8] riscv: dts: thead: th1520: Add IMG BXM-4-64 GPU
node
References: <CGME20250529222410eucas1p2e1d41a2fc717caef1aed51367a7db944@xxxxxxxxxxxxxxxxxxxx>
<20250530-apr_14_for_sending-v3-0-83d5744d997c@xxxxxxxxxxx>
<20250530-apr_14_for_sending-v3-7-83d5744d997c@xxxxxxxxxxx>
<CAPDyKFpYfZNthdRN=pCv4FEdFCzrKEH4aFBy4ew-xLKtpbJ5Tg@xxxxxxxxxxxxxx>
In-Reply-To: <CAPDyKFpYfZNthdRN=pCv4FEdFCzrKEH4aFBy4ew-xLKtpbJ5Tg@xxxxxxxxxxxxxx>
--------------uNH0PIMu3PbikIDBZOzmuitr
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
On 03/06/2025 13:27, Ulf Hansson wrote:
On Fri, 30 May 2025 at 00:24, Michal Wilczynski
<m.wilczynski@xxxxxxxxxxx> wrote:
Add a device tree node for the IMG BXM-4-64 GPU present in the T-HEAD
TH1520 SoC used by the Lichee Pi 4A board. This node enables support f=
or
the GPU using the drm/imagination driver.
By adding this node, the kernel can recognize and initialize the GPU,
providing graphics acceleration capabilities on the Lichee Pi 4A and
other boards based on the TH1520 SoC.
Add fixed clock gpu_mem_clk, as the MEM clock on the T-HEAD SoC can't =
be
controlled programatically.
Signed-off-by: Michal Wilczynski <m.wilczynski@xxxxxxxxxxx>
---
arch/riscv/boot/dts/thead/th1520.dtsi | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/arch/riscv/boot/dts/thead/th1520.dtsi b/arch/riscv/boot/d=
ts/thead/th1520.dtsi
index 6170eec79e919b606a2046ac8f52db07e47ef441..ee937bbdb7c08439a70306=
f035b1cc82ddb4bae2 100644
--- a/arch/riscv/boot/dts/thead/th1520.dtsi
+++ b/arch/riscv/boot/dts/thead/th1520.dtsi
@@ -225,6 +225,13 @@ aonsys_clk: clock-73728000 {
#clock-cells =3D <0>;
};
+ gpu_mem_clk: mem-clk {
+ compatible =3D "fixed-clock";
+ clock-frequency =3D <0>;
+ clock-output-names =3D "gpu_mem_clk";
+ #clock-cells =3D <0>;
+ };
+
stmmac_axi_config: stmmac-axi-config {
snps,wr_osr_lmt =3D <15>;
snps,rd_osr_lmt =3D <15>;
@@ -504,6 +511,21 @@ clk: clock-controller@ffef010000 {
#clock-cells =3D <1>;
};
+ gpu: gpu@ffef400000 {
+ compatible =3D "thead,th1520-gpu", "img,img-bx=
m-4-64",
+ "img,img-rogue";
+ reg =3D <0xff 0xef400000 0x0 0x100000>;
+ interrupt-parent =3D <&plic>;
+ interrupts =3D <102 IRQ_TYPE_LEVEL_HIGH>;
+ clocks =3D <&clk_vo CLK_GPU_CORE>,
+ <&gpu_mem_clk>,
+ <&clk_vo CLK_GPU_CFG_ACLK>;
+ clock-names =3D "core", "mem", "sys";
+ power-domains =3D <&aon TH1520_GPU_PD>;
+ power-domain-names =3D "a";
=20
If the power-domain-names are really needed, please pick a
useful/descriptive name.
This isn't the first time our unfortunate power domain names have come
up [1][2]. Sadly, we're stuck with them for Rogue.
Matt
[1]: https://lore.kernel.org/r/ff4e96e4-ebc2-4c50-9715-82ba3d7b8612@imgte=
c.com/
[2]: https://lore.kernel.org/r/cc6a19b3-ba35-465c-9fa6-a764df7c01c1@imgte=
c.com/
=20
[...]
=20
Kind regards
Uffe
--=20
Matt Coster
E: matt.coster@xxxxxxxxxx
--------------uNH0PIMu3PbikIDBZOzmuitr--
--------------exTRLs9Cek9O8APVswKEMWcT
Content-Type: application/pgp-signature; name="OpenPGP_signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="OpenPGP_signature.asc"
-----BEGIN PGP SIGNATURE-----
wnsEABYIACMWIQS4qDmoJvwmKhjY+nN5vBnz2d5qsAUCaEB4uAUDAAAAAAAKCRB5vBnz2d5qsGV3
AQC/7N/zmcYvgZrABEuCu3uACvSLqpDrSEIs2JyCNo6s9wD/WKK5Mts6A0DGwlzdbLq4m26L3u/0
iOYcPioWwhyQ+Q4=
=M/Kr
-----END PGP SIGNATURE-----
--------------exTRLs9Cek9O8APVswKEMWcT--
Return-Path: <linux-kernel+bounces-673572-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 9C48E41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:08:59 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id AC7A516E738
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:09:00 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 7C2B41F0E47;
Wed, 4 Jun 2025 17:08:55 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="fKWrcfvD"
Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id B4E251E5B9E
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:08:52 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=192.198.163.18
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749056934; cv=fail; b=l090fwkuPvcjpVt2QDmkEat4NRz42NPrGXmH8L7G5yYncUgkWs5W7nn7BGskoYr9YbGUUamESgQln9fYw8HwTMygHFzSFs7dIEsr2aUOmpYe1sIP41n6HTTfYlqt3aKO0Yj7O2rcquTZUwHUtETJDrlV7dXYD0Smchu5BjmF++4=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749056934; c=relaxed/simple;
bh=CJ6zOhMcIt7IAqPH8AK+tLxkIgSk3RkuR7fuDl4SFcA=;
h=Date:From:To:CC:Subject:Message-ID:References:Content-Type:
Content-Disposition:In-Reply-To:MIME-Version; b=NWBbh2bLPd4do1EQihlz/yBpcdZFs9ZKeClyix0wj80KWcRZt5wj0w74XT4QC3dRrMs8+YMUqh3rWPefGElVGBH644g4ZdptcNHNy+Ynb9EBwiJPxW3Pd0k0eOsHVYnlHJxI6vsLu9Y+IE9X56Y2Fe2l0v1Eh3ndqhlZLkHX0LU=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=fKWrcfvD; arc=fail smtp.client-ip=192.198.163.18
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
t=1749056933; x=1780592933;
h=date:from:to:cc:subject:message-id:references:
in-reply-to:mime-version;
bh=CJ6zOhMcIt7IAqPH8AK+tLxkIgSk3RkuR7fuDl4SFcA=;
b=fKWrcfvDhvfVlt/rogtDzZ+Z2c+Rpq9ixEmUmbQSzdT2ZuEkAkXwxS4R
LEcPp8pYLGJxMLWSrsPhsLgLevorx1EabLZFiwoFWZvbOyW9Fr2ZZhSdt
O9GkRVD7JTFOUYoYWpjWdtWLXxY6ZnkJVeRC6RZNWQaWkx+pMooJ4Cea7
qs3DWgW0RPNXoS9aWsuFHOEUJQv0H/4o6QcmP+4m6KEef+OPBHyCxZnBf
/J9WDP+swVYS4CE+/oteoPNy6eqcKCZkMoOSzzG81WNqWQVHHQYUxAQ02
pOmEPesnsfpo0fqcY8ZfZqIvYnALZGwjbxo9Lo9HnmRpNPytz//dbG7tM
Q==;
X-CSE-ConnectionGUID: ZucS9SBmS6iwU3yS8vP+ig==
X-CSE-MsgGUID: hPz99G+QQAum2A1FRtPyKQ==
X-IronPort-AV: E=McAfee;i="6800,10657,11454"; a="50392930"
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="50392930"
Received: from orviesa006.jf.intel.com ([10.64.159.146])
by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 10:08:51 -0700
X-CSE-ConnectionGUID: VXZi/FsJSUOvIGGk36B/Wg==
X-CSE-MsgGUID: wISv0FkaR4iBAgA0sDLnIA==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="145148475"
Received: from orsmsx903.amr.corp.intel.com ([10.22.229.25])
by orviesa006.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 10:08:52 -0700
Received: from ORSMSX901.amr.corp.intel.com (10.22.229.23) by
ORSMSX903.amr.corp.intel.com (10.22.229.25) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.2.1544.25; Wed, 4 Jun 2025 10:08:50 -0700
Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by
ORSMSX901.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.2.1544.25 via Frontend Transport; Wed, 4 Jun 2025 10:08:50 -0700
Received: from NAM11-BN8-obe.outbound.protection.outlook.com (40.107.236.51)
by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server
(version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
15.1.2507.55; Wed, 4 Jun 2025 10:08:50 -0700
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=t9gLjrKtsnF8kgC8ZX7LcOWH8gKTiduTmfHOChw3wz3aoSK4aXfcbU9xnF01S+MFvwxPbh/K3pgaux8pmyyqzA4efbiqjnqwN6z//DdOkiFh5oUvh+sD8BY4rP3ZiIlEftjlM2VVjO9ZvBjpKzmjyjHJ+25fR+ugiMzuY8ZT3O4jVEUlwRXA8nB+J7UR8P0uOKuxvGJooTyO/ur2GoIN5gkRpAG3QpnnCtoAIGYJM7Ov+IAmTF4NFHspRzb1IUqwHRyMaa19MM/n9AmiFmOWD2DSK+ixOxgsYaQwCwnDo8r0SF6cHDX9G5GXiGve32CrrmxxNAvAyeNwoXuBzQCEEQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=VbKFrNnRhEyJ7+VNXq0XFEbkg5YbupuotEaEuMyU1pY=;
b=U4fRBDPFwI8YZL06NEFDFnIldAXTLvGq4lB5xPuqgJcznO9D83sDHVt/189RSakuLAYBv+z/tP6WZGv0xYQBQPn4YnTZVn5h/v0rxYj8Xoqrwf0qYxie7Erni43Egd3HNdcnpbajS8apLcCM8cOo5W/tYXGUUdWduhgKHNrnF8EoZH7Mp3Yux0dQoxfPmxuIUOmeDjA9FjTIcBJm5STNdsg3rz4tkuR7xMyBCjuXLY3cV9IDkX1LHwylUPrC2UZ2N5+28l3OGpYOVMoDxCo7ZwT2dHQ28MB4MHjpq0molafAAUbh/ueW+SVVpb0IMt5z+OgvBoWG0QAbrXcR1k0z2w==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com;
dkim=pass header.d=intel.com; arc=none
Authentication-Results: dkim=none (message not signed)
header.d=none;dmarc=none action=none header.from=intel.com;
Received: from PH7PR11MB6522.namprd11.prod.outlook.com (2603:10b6:510:212::12)
by SJ0PR11MB6742.namprd11.prod.outlook.com (2603:10b6:a03:47b::19) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8769.34; Wed, 4 Jun
2025 17:08:48 +0000
Received: from PH7PR11MB6522.namprd11.prod.outlook.com
([fe80::9e94:e21f:e11a:332]) by PH7PR11MB6522.namprd11.prod.outlook.com
([fe80::9e94:e21f:e11a:332%5]) with mapi id 15.20.8769.029; Wed, 4 Jun 2025
17:08:48 +0000
Date: Wed, 4 Jun 2025 10:10:21 -0700
From: Matthew Brost <matthew.brost@xxxxxxxxx>
To: Danilo Krummrich <dakr@xxxxxxxxxx>
CC: Simona Vetter <simona.vetter@xxxxxxxx>, Christian =?iso-8859-1?Q?K=F6nig?=
<christian.koenig@xxxxxxx>, Philipp Stanner <phasta@xxxxxxxxxx>, David Airlie
<airlied@xxxxxxxxx>, Simona Vetter <simona@xxxxxxxx>,
<dri-devel@xxxxxxxxxxxxxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>
Subject: Re: [PATCH] drm/sched: Discourage usage of separate workqueues
Message-ID: <aEB9/VGHJGnY4+fP@xxxxxxxxxxxxxxxxxxxxxxxxx>
References: <20250604081657.124453-2-phasta@xxxxxxxxxx>
<7a09c357-2d28-4dd6-b637-4387cc430938@xxxxxxx>
<aEBhIzccXBPyt_58@phenom.ffwll.local>
<aEB4DFFE2C7gElRL@xxxxxxxxxxxxxxxxxxxxxxxxx>
<aEB6GOTlC_Z_Rq8b@cassiopeiae>
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <aEB6GOTlC_Z_Rq8b@cassiopeiae>
X-ClientProxiedBy: SJ0PR05CA0058.namprd05.prod.outlook.com
(2603:10b6:a03:33f::33) To PH7PR11MB6522.namprd11.prod.outlook.com
(2603:10b6:510:212::12)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-PublicTrafficType: Email
X-MS-TrafficTypeDiagnostic: PH7PR11MB6522:EE_|SJ0PR11MB6742:EE_
X-MS-Office365-Filtering-Correlation-Id: 49787855-1923-4ee9-6abd-08dda38a78e8
X-MS-Exchange-SenderADCheck: 1
X-MS-Exchange-AntiSpam-Relay: 0
X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|1800799024;
X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?Ra1TOoOhbX4G3WJTDMAJFkRdZEFNDQVY9eRB4wS4U8YXDce/4c+9InkvaUFj?=
=?us-ascii?Q?Nre+Uc1W8i5hPH3ZoUL00oUNcXQS9waDZyDQA2pceEC1790oaygXKW2NQljQ?=
=?us-ascii?Q?TSwOeWenNEBQr5cNYolO/llOx13XA6llQzb7XO0hBHJPgGN8k+guontx4+uo?=
=?us-ascii?Q?QKeU4seG2ZGNYb2Ur90XbHlUnPXS1DPtZthP0BDdCcUoVGB1Xzfa3nxOTlSd?=
=?us-ascii?Q?OiMYqZ+6twj2N+ciPoGQZW2dEPO1CyzsGa6r17l2U77YCaFNZ0oD/Uwk3uKB?=
=?us-ascii?Q?sddRAuspZYwIYLjM4/i7B4bLB8BbiBwnprzv/fsHVsjbHAuqSLBka2x9ZdsL?=
=?us-ascii?Q?b276q+nyuzNSalMK3nWmUsjyPGXBIPWt81HxGp3ImL01dNCZwr4pQFhObv8N?=
=?us-ascii?Q?nIKzTZULj3ZZHbA9+pnOudxE4Tm9Fspmz5SR0m3HcT/9hQyM3MuEX+BHHL/x?=
=?us-ascii?Q?/qhpUgntPrTPHs3J6/3T6CzOsxeKZI8Il79FEAPPk/NklbCnMNhLmdIE/sMW?=
=?us-ascii?Q?Ggy39nsw0bWue9jzmNBth0L7dTy3N2rv8SfPTZZDdLNRPgoMlh37JYgJTzt9?=
=?us-ascii?Q?gH4EmAUMMMd/1ZibxTbAicwYarz5iPw05uJD9A2boNHExI8C/xGFnMhKDHQ9?=
=?us-ascii?Q?HSCfxReye1SAC67k2z74d+FXOou5f5uWMIvRJWAotoFVtwvbzlyWD9BGYWTr?=
=?us-ascii?Q?MbbYF1VSbtoI8CFJLWHP1gVMsXaoQ7ZxtJoup8ZCJdSXEF2T/ZUQ3tJ+Vtdb?=
=?us-ascii?Q?QPkn1T96Am13LBYQ8G4/3tCrGNeQEIhJ26XIIvISI39JYR7T2T7Pi1naQkcx?=
=?us-ascii?Q?RiAD4jiLOHwNvAMAEZUhBs66aBWxIf5EM5EIo4UeKlQ9Asjv+0DOXfnE/1bm?=
=?us-ascii?Q?HfKK35/Wvdzv3QtUcsmIRIcWCDHm+J2VMoogjy6zgh2QbGHLJs/Sp4MN/tio?=
=?us-ascii?Q?7e0fikZZZBJKwCUCGot/2J5xrLisJgUEHwjM212+keuNZI5YnFeCG7PqAu8s?=
=?us-ascii?Q?xFnE4cgEIsGW63pz5AWPk0S9JacdnjH7PTctwzLg1uqyukPpsO4IrtOyJgtO?=
=?us-ascii?Q?9gu6STYSsCO/zxvDVY+xQbdbwjUjszjFCi+JmyYPQC3juKG2fyzQDPJVd/nt?=
=?us-ascii?Q?s1ii/y0VpRyj6LQoPE9FW7uDXDeqrafSX+NTBG5rVD53zp6NnfxuiyUfF8KY?=
=?us-ascii?Q?srhW67Cs2f5dvAZ5i74wiVpAW1zZy9VtrdPHScANb9XNkUJLKbabLEBJzWa3?=
=?us-ascii?Q?HZB2BP14QGTSpHd7X1Prj3PExuGUj7luSInVhd2BvncdNDV8Ufxy/sJczdbp?=
=?us-ascii?Q?QOhYb9vXfTftiWiosQmZNybRjJDL+qq0jQ5sh+5lNGOYDX0U1ZnwRJudCPEV?=
=?us-ascii?Q?EwcoO2beuNMH6qPpfLsPlD6x2Q0cjODS+ejQQN657wprKZMr5/Toc55yGXuv?=
=?us-ascii?Q?LYH8TYW0Md8=3D?=
X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH7PR11MB6522.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(376014)(1800799024);DIR:OUT;SFP:1101;
X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?mfDrGyQdHDbBOiyWrLeGrCr4ZaHwud9ElFJfGTc7ovQkUQKN99vJSiXE/AmY?=
=?us-ascii?Q?KV/LmD9Px2eXEZO4lmwPOFV8ugMe3yWkwkZsR2t1NFLKbmQvuOfFcTEUVpVz?=
=?us-ascii?Q?4JQsxOl4hljA2Y7c9jp2pavU69w2pa15KCqIUwhuu3RN4Tz1k6Z4J3QcKAm3?=
=?us-ascii?Q?vEtqUpD0XsU11zoU8nqxYmxBICst5+0PIJmPhpdRit3LXA1L1t25SmjMTdE1?=
=?us-ascii?Q?NYPgZrneJv1wM4Bca+b6dKqAVmjXensWOLdfo7OVu2KedL9nusWM9RWuJA9f?=
=?us-ascii?Q?YkhWeszYbANAtk8vf7KJfhJU6k9Va/9dQPFRYt0rfI5JLYm/slEoMgU2tbP2?=
=?us-ascii?Q?Rq2PFjj7UyXN+8LqXOG4ATK6mj4olLlmun1e4G9pUyrIAvk3SPhEf3EHcACY?=
=?us-ascii?Q?h8aNtBLN+LFpwNoNJx8A5WIm9TaTJ4BU108mQ7SUPiTYsm8sRaGc7e/Lqcg4?=
=?us-ascii?Q?uCbqRX/SEiUi3WD6+c0JyFlOmJSB8C2laeZA3l3jJvBG+qw1F9gX6aScdSHN?=
=?us-ascii?Q?YgEr9MzENfJUWvc1lNA30nsoQ/blf8n3/0QaYsXEFOXi4/e5om4KKlgZA81O?=
=?us-ascii?Q?mtDu9ZNDNAVOWDOh9gOKzw+5sja34GngWwwwDJf93axujg8ygkWILOmOsG4m?=
=?us-ascii?Q?K/GoBaCjNGnq7t0eyMZBGo7I6aWiukpSZ99wpJLNxmjqxEFJ3FQSRTD1SMN+?=
=?us-ascii?Q?nLL6gUH0VU7St8+IOSZFk3AJWoaj35JyfuRJ1Mv5J4RP/sqJOhjCf45uWNDJ?=
=?us-ascii?Q?smWuOk/WdhS5eo+BVSKu5DeB/oYo1HFxK9UqEXepE728tAE0uU3WHghwec8p?=
=?us-ascii?Q?JqKAU7s2tZtboKz83/w1qi0zZsWJZL9dny9oY5Cx6qVCpf2wqKZEh4fQWkfO?=
=?us-ascii?Q?vXm3hC4sFXxsj06kNYQPU1Yzvshtc941SrVkyDYGV/nJHuL1iW3Loj7tmGij?=
=?us-ascii?Q?lNs+DvmPSKDft6zjAx3k8v2tBmXayUjuZiPUuKf1sQ303AFfGiO8HHqmtNmH?=
=?us-ascii?Q?euRKLwRh2hZe9TPeK1TiOcZkckegavzlJcrIhYP+mbRIAyOnjd/tjL1mU3An?=
=?us-ascii?Q?CJsL0adGPRL8FwJllD0DRbW76XKOKP2jOq8pLaZ1vJrYkK0Gjpm2TC9dVBg7?=
=?us-ascii?Q?0Xn40qCbsY9/3WAe8JN3loqMaaZirm03fgM/j+aOzw8GeQ/giKAaEY5/4Xto?=
=?us-ascii?Q?F/FQpGCYibmppj8lNca7IlxRC2ZYrrmxiymON7d5yexdJlVaC0lxoQB3V5f+?=
=?us-ascii?Q?OpFmFVe38gsDkQIkQmiV7RldnX/dhHqY8l5rlvCCAETwpKcjT855IDUX951Y?=
=?us-ascii?Q?pTCJ6nwPp3YcX0TtRT7Xi30EX7j26esZfFXcPa9GbA9OBzDN8ctzY+Tuy+u2?=
=?us-ascii?Q?TFfdlCNLNHf0QlnIj0Yx0JjLTfL49regZCHxDpobqlKUlpXo6vvDldyawfDm?=
=?us-ascii?Q?R95BSpuIABugg2kEOIHR4ZTzz6YxxUnuZHA+6R7f81nK6zukdZEg0RbEH/lW?=
=?us-ascii?Q?dLF1NxUQzl+Oe31pgrHtsH+9aLmi+/g00GWtrLr4Td9knSEEUnZN4C3YhDpC?=
=?us-ascii?Q?yg/dj3p+2axG9KuLtASdGXaoIabvXuwlKR2475U9x/V0Uyxk0uyL1uMIKNYN?=
=?us-ascii?Q?Zw=3D=3D?=
X-MS-Exchange-CrossTenant-Network-Message-Id: 49787855-1923-4ee9-6abd-08dda38a78e8
X-MS-Exchange-CrossTenant-AuthSource: PH7PR11MB6522.namprd11.prod.outlook.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2025 17:08:48.7114
(UTC)
X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted
X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d
X-MS-Exchange-CrossTenant-MailboxType: HOSTED
X-MS-Exchange-CrossTenant-UserPrincipalName: F/12nFpGBLMWOiiS2yAnLHXMopBst59/3ZO0Z1hoxVu4EkF3IlwNOvdgWte3edzNLw8vQroBzmRknMUQKd9JkQ==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB6742
X-OriginatorOrg: intel.com
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 06:53:44PM +0200, Danilo Krummrich wrote:
On Wed, Jun 04, 2025 at 09:45:00AM -0700, Matthew Brost wrote:
> On Wed, Jun 04, 2025 at 05:07:15PM +0200, Simona Vetter wrote:
> > We should definitely document this trick better though, I didn't find any
> > place where that was documented.
>
> This is a good idea.
I think - and I also mentioned this a few times in the patch series that added
the workqueue support - we should also really document the pitfalls of this.
If the scheduler shares a workqueue with the driver, the driver needs to take
special care when submitting work that it's not possible to prevent run_job and
free_job work from running by doing this.
For instance, if it's a single threaded workqueue and the driver submits work
that allocates with GFP_KERNEL, this is a deadlock condition.
More generally, if the driver submits N work that, for instance allocates with
GFP_KERNEL, it's also a deadlock condition if N == max_active.
Can we prime lockdep on scheduler init? e.g.
fs_reclaim_acquire(GFP_KERNEL);
workqueue_lockdep_acquire();
workqueue_lockdep_release();
fs_reclaim_release(GFP_KERNEL);
In addition to documentation, this would prevent workqueues from being
used that allocate with GFP_KERNEL.
Maybe we could use dma_fence_sigaling annotations instead of
fs_reclaim_acquire, but at one point those gave Xe false lockdep
positives so use fs_reclaim_acquire in similar cases. Maybe that has
been fixed though.
Matt
Return-Path: <linux-kernel+bounces-673573-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id EFAC441E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:10:15 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 3B6F816E805
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:10:17 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 783841F0E47;
Wed, 4 Jun 2025 17:10:10 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="ojHCDSZn";
dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="ocgGTxBJ"
Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id BC17418DB24
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:10:07 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.165.32
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749057009; cv=fail; b=OkXieWYPWUq0AAXcpQ4emRp9Y98oyvRrPE3v3nF0wwOY7mT3Zjz7cHeiWGJ7pRld/7w6bgbMqveoNq8tsByvmqBmeBI36Lc48D8r07/4ONN13/mZLGcF7a20dJhiHewT5FktV6LKiwYpYmA+HkNDt0rcodiLPs71jejkkgSR7hE=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749057009; c=relaxed/simple;
bh=Zucoz3XTzCVF34HnCBxcdx7qGrt7auANSzRWfu0DCt0=;
h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To:
Content-Type:MIME-Version; b=pN0rU0laPeOFJxy7IQ5QTupAk6nx6l8fuP8C6iDlm1viOR+cEfE4IS8/gigkVq9wOQPkh1j95C8Qt5Gfj0Awp2dlwOMltmEOhW8h2/a/UfDAyXP/OWJ9KX4Hp8kAdLhWod5ZDsVTtq7D8TKrclEZZzEaxZaUn2C7hEGoAGpkM1U=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=ojHCDSZn; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=ocgGTxBJ; arc=fail smtp.client-ip=205.220.165.32
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com
Received: from pps.filterd (m0246627.ppops.net [127.0.0.1])
by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 554FdxdP023843;
Wed, 4 Jun 2025 17:09:57 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc
:content-id:content-transfer-encoding:content-type:date:from
:in-reply-to:message-id:mime-version:references:subject:to; s=
corp-2025-04-25; bh=Zucoz3XTzCVF34HnCBxcdx7qGrt7auANSzRWfu0DCt0=; b=
ojHCDSZnldlFt2f7/dZoUWtc0oWEDgSeZjuy69DCmjfMPnJCWt1BhCmixB6op2pg
Pa4wCp2Zgd8pRiZQclE6wiTm2R2XdeLRJbtRNk13xMI+n01tZlRrsyZDVBnQodgB
XdGNRJ6bk++psVsx21sc3XGZs+nc6mA3A1b/kDRjozoxdJRqkFP02FoNpf1e8zvS
Nxzgc5ZP7jbNEFoXryKw4PXBnARVCfEsxr9J4EKwaCgOamAFn50HB3D9XOy1pLQT
pIRtu2sscAjA355BPDpgTPnOScWvHm/BzPUJIg0VvcowK5WVNj0K+nqbgFzBO7kH
HRC1qIvSh/CSv0/uMegtpA==
Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129])
by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 471g8cvey2-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 04 Jun 2025 17:09:56 +0000 (GMT)
Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1])
by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 554GR0PC034872;
Wed, 4 Jun 2025 17:09:56 GMT
Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10on2085.outbound.protection.outlook.com [40.107.93.85])
by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 46yr7b9d7t-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 04 Jun 2025 17:09:56 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=hIGSXukHFCw9mG6uhAZnZB3Qr5xkCslUUb5EBBn9fxCwpej4JjvA7BQFWnm0MaqdobcAnMoYBOzYLIaA3EZqJ1vdn5olA9wVIYZ/47jlsjhnC0BDyiXcIcmvDMFvLfcfhmy5GCKZPY0WNVQQ3lHEu61hpdVYEejvRHxojhFcvZwprJJBnTnqNuecGzTIMQwI4gRZZw1b0LXMvfk+CUsbHdZp3S1WrKAwSIkvcpq3paiPQgTzZZwYzGIUzfynOKZzI3pCuCHGwg1fkbcz/oK4jRHPjwrNTSn6OE/aiMK1RaxqWSk8LXhfBOtvJ6wIna8P4GPx3OOO//NpKt2q6zoNrw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=Zucoz3XTzCVF34HnCBxcdx7qGrt7auANSzRWfu0DCt0=;
b=UrYOUviphrHflZQMPbHqzwUt/R6dHmxGexP2JrORNDmxYd0aOn6fNfDvhzT//3YTe8F//1090V7DTZOiKU65rXoFOPxN98yxKjSR8/2gxGoAB4jMPN1EbYyc65ClS6Vs0xuEUuW19EbTM65SPICgpEYPLDZUql4ls+LkjSurUhkSUqIctNct7ZmgBewVNF1KNcz5wj6UGeYmiDKZeMAhdrgy+UHvswQVs/XxxyxT9MMHhujnaJUnZzenAZWTtPxvj6Y3BQEecxjNya8X5esDqlp6IQhxA6bFH9+JCJow7alp3QTqSoP7tuYJv/toVHuHwDXYZZjsXrdSwmK/67BMgw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com;
dkim=pass header.d=oracle.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=Zucoz3XTzCVF34HnCBxcdx7qGrt7auANSzRWfu0DCt0=;
b=ocgGTxBJLLgX6a5bxT2RQ5azm1ca0RrG8Jrl2OTXhbVdwawEyofbdneTXhyXhFTa+UfcuLwBuF8qb8+x8XdxooHABT6fBq/Bo4GXRYULfUGp8pWeCnzuOaQzQSgqSKSqMVKH4ctsphDc3NpSh2HQf/KF1bj7k8njLD8AVdRvovc=
Received: from IA1PR10MB7309.namprd10.prod.outlook.com (2603:10b6:208:3fe::13)
by IA1PR10MB6219.namprd10.prod.outlook.com (2603:10b6:208:3a4::15) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8746.41; Wed, 4 Jun
2025 17:09:50 +0000
Received: from IA1PR10MB7309.namprd10.prod.outlook.com
([fe80::818c:4ed2:2a1a:757a]) by IA1PR10MB7309.namprd10.prod.outlook.com
([fe80::818c:4ed2:2a1a:757a%4]) with mapi id 15.20.8746.041; Wed, 4 Jun 2025
17:09:50 +0000
From: Prakash Sangappa <prakash.sangappa@xxxxxxxxxx>
To: Steven Rostedt <rostedt@xxxxxxxxxxx>
CC: "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>,
"peterz@xxxxxxxxxxxxx" <peterz@xxxxxxxxxxxxx>,
"mathieu.desnoyers@xxxxxxxxxxxx" <mathieu.desnoyers@xxxxxxxxxxxx>,
"tglx@xxxxxxxxxxxxx" <tglx@xxxxxxxxxxxxx>,
"bigeasy@xxxxxxxxxxxxx"
<bigeasy@xxxxxxxxxxxxx>,
"kprateek.nayak@xxxxxxx" <kprateek.nayak@xxxxxxx>,
"vineethr@xxxxxxxxxxxxx" <vineethr@xxxxxxxxxxxxx>
Subject: Re: [PATCH V5 1/6] Sched: Scheduler time slice extension
Thread-Topic: [PATCH V5 1/6] Sched: Scheduler time slice extension
Thread-Index: AQHb1V0mtwlUIwQHSki21OTBoge6R7PzPCsA
Date: Wed, 4 Jun 2025 17:09:50 +0000
Message-ID: <04E4EFD3-0FF1-475E-802B-97C72CBCC452@xxxxxxxxxx>
References: <20250603233654.1838967-1-prakash.sangappa@xxxxxxxxxx>
<20250603233654.1838967-2-prakash.sangappa@xxxxxxxxxx>
<20250604103106.1465f847@xxxxxxxxxxxxxxxxxx>
In-Reply-To: <20250604103106.1465f847@xxxxxxxxxxxxxxxxxx>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-mailer: Apple Mail (2.3826.600.51.1.1)
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: IA1PR10MB7309:EE_|IA1PR10MB6219:EE_
x-ms-office365-filtering-correlation-id: b1c16569-e455-471c-6ccd-08dda38a9d8e
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;ARA:13230040|366016|1800799024|376014|38070700018;
x-microsoft-antispam-message-info:
=?utf-8?B?WDJSMEpBWHp5cXZibVRWM3I4T0ROWGRmUXcvNEVPZ0lZdDd1eURNRVhoeVRl?=
=?utf-8?B?bnFOdTUvRG02d0VuTGhCQVdnVTFUZzRYbkVBWWM4azg3MFRqTjJhOXdOVi9T?=
=?utf-8?B?RTgvb1pUTStuYWdmOUoyZExKR1hOOGRjbFRQSHNJa2g2djhqVm41RFlsVWdC?=
=?utf-8?B?c09xeWxBc2ZxT3FETFJMNFF5NWwyTDErZ3RvVndERmtvajA5RGRmOERZQ3B3?=
=?utf-8?B?M0t0bU5ES05XZEVLSW4rL0JGK0xLYlpsZm83QnZwV0pxMTRTRk5lQ0ZEU1Za?=
=?utf-8?B?c0E4OUx4dmQrREg3YW9KaFB3UHZ2Zms2OUhwWXpJR2QvWkN0dkNKL1ZreDZh?=
=?utf-8?B?TlJ2QjVJOFBoSG4vY0dNZkJyT3pXU3RUMkI3Tm5wQVVYUnpsd0ZPL1hUMm4r?=
=?utf-8?B?dDNSMVVjcGtTMi90K3FMd202UnlUUWNhK3pvMWNMSG5kZ0dhRlRkSjFVbEJx?=
=?utf-8?B?c29uWHhVMkFFck5YQlJuVXdXbEhJcUtiUW1uU2ZMUkIrRDI0eE9CNGJDeDRr?=
=?utf-8?B?VENDMGNsR1l6dlllTGZTNkxWbGlrSzdqRjR4cjBzdXFVZFd5bHhsV3FOcERI?=
=?utf-8?B?TVNXSEJQU2dwcnFVNVhpZm00YTBHMEVPcTdoQlF5dVJOZE5qTFpIOVJOMU5H?=
=?utf-8?B?Z2R4c2gybHBkWWJ2SjRZTkx6YkFHTTAzVlBSYXBZem1ldktFN29iTnh3K050?=
=?utf-8?B?NnA4eDM0dnI5Rkk1MmJyQ01pc2hGUWlnSTN2SS9KNE9GcEJockVnRUlpSjh4?=
=?utf-8?B?WStvcjBqUnhhN3JyTmFXM0JiZ0FnREN2T3o3d0tZczU5L3FRVmFkSWdEY0lD?=
=?utf-8?B?YUxISlJPR0VxVlo1ZVpTVjVBY0JJN0xPZnBObEQ3a2lkTTdjVklLZlhCN2h0?=
=?utf-8?B?R2hFUktZQnpDL2poZGNOSkEzb29NclhtUVJxMTlVQmJ0WWMxQ2lTUllScnhq?=
=?utf-8?B?a2FNSndpTG9OMkxOSUFmditIZTJzdXZRdU9EeGNkWU02bTBVcmhmTEE0aDdN?=
=?utf-8?B?cXgyMk9ucks4MjdHamIzWnptZkplVmM3WkQ4NHlxVEpSWnNnUUQ5RWduWXRp?=
=?utf-8?B?U0IvaGVIS0lvYjhTdjNqQWJHMFpDUUprVVZ6UDQyRVZRa0RFMTBmcFo1SjFy?=
=?utf-8?B?Sy96N29XZk9BTmpoWnVpMjdSL29WQVY5Mm4zdG4wOG5xSXNBREI3MC83bXdW?=
=?utf-8?B?OVlkVWhiTk1Ib0FqWlcyQ1hNZVg5d3pXOXcwUnM5c2V3eXNUbGRJTitxTFJp?=
=?utf-8?B?OG5DMzNMNmdCS3N5cjFwbmZERVBwRGZObGMyQzZlYVROWk9sWDhtV1RYemt4?=
=?utf-8?B?aEJoMEk2QTJ1dFloZjczdHloUXYrRW1zbVRSWVZGV0NlYUlvYUh2dmFFMlRN?=
=?utf-8?B?Y2J2WDVBQUcvQjlZUVlpWlA1TllqWVJwLzhvRERnbVlqUHAyWXZVYk9VTERt?=
=?utf-8?B?NkpHd3lEei9NVHNGMkRMSnVTdkxBR3BvLzhMVkl6V01xK0c2ZVFHcTNCZmVY?=
=?utf-8?B?cjZ6SEU4K1o1S0cxR2ZSVExZZEhHNW5aZHB3b056Sm9QcjJONzBvd0tPYkdW?=
=?utf-8?B?KzhvU1pKeExLaE5EbmIrTlIxa1FIUlR4eHhFb3V3SFlibnhRTjJ5MmtCVlpI?=
=?utf-8?B?MzBzTnVhMUZzYmxuMkNGekhKL2g1dnR5WkdSSmZTTm8rQjEzTjViZVJueUdq?=
=?utf-8?B?RG5jZXBUcVlzeEJGU1luUG1tM3RtUCt1Z25Pd25obkh6cUsxTFFaL2YwODV5?=
=?utf-8?B?OXNWd3JZbFVDSno2aWFEeGJRZTFFSnJtRFpGZkcrdVVLNlRhN05DV2ZsMU1R?=
=?utf-8?B?R3VCWnRHUWN4TUY3eCtFMXJCdzN5ZWhFRWxrcUprQnBkL0NUZHM3cGkyUGFS?=
=?utf-8?B?L2twd3orM2lFNndBcDZtMlhuYTRDclVCY05SYUgrYnpwcUlLT3VFcWc3dzdK?=
=?utf-8?B?QnFHV2hxUmpNdWRHQ0ZRQ1VnWVZDMkZrb1U2NGFDVmd0VWlZbnpDQzBQYkpZ?=
=?utf-8?Q?2zTXzECIJz73Ei6IKPNdSoPtuwOrDk=3D?=
x-forefront-antispam-report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:IA1PR10MB7309.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(376014)(38070700018);DIR:OUT;SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0:
=?utf-8?B?Mks2a202RDFwbDM5YWJ4dVdDR0Z0QWIrSkZSYzNlT0JsZldZZUhkUHlpYVl5?=
=?utf-8?B?YzV5MTVkL3ZXNWRBYWVxc3l5RzRIY3c3TmF3SVF4NDhUYjRlSzZoVi9yMlN4?=
=?utf-8?B?Qnh5dE9JQ3ZOa1FPZmhGRVM0YlY4K2hTZ0ZSSXowbjFSUTcvRU83eC8vc0ds?=
=?utf-8?B?dytqaHA4dkt4RW1DTk1lcFFPZW9PQ1NCUFpmY2d3MkxQZ2ZzREw5OWUxODVD?=
=?utf-8?B?VGNMYS9DbnFGT0w1UGkrWFZ5T0ExQ1lXK3FsdURzUGYveDd5ZE1UQU1mTDkr?=
=?utf-8?B?ejdEVHVxeHgzWlZ4STRzOU83OWF5anhndWx5bGFRK2RvbWwvdFFqL0tWRW41?=
=?utf-8?B?eE9aQUMrNDUwRkIwNWRZVmNOajlyS2I1SFl3L1dMR3YxemlndTBrbjRSZURj?=
=?utf-8?B?bmJTbkVvT0xXSXZQS0VrU2cxSXR3cGIxcVloY21Ta3NOQUpWVVEzZ0tCbkk3?=
=?utf-8?B?OE1JRGxuUWNrbkxxL0picTlucnBNT2p6VXlIRWZjRFJQcVJqZ3F0cjJYdmFP?=
=?utf-8?B?aTZvN0tYMm5pdW5zYXRNbE5jQjRNeC82aXRMVTRZeGpVSFdwTXdac0RBOEFt?=
=?utf-8?B?V0FhczJSOTNjR0hxNDg3ZDlkM2R3Vm4xOHhuenNFS1FKeWhtYW0rdTRzd2hl?=
=?utf-8?B?OXpjRERac1l5V0ZCMG9Lc08wSDBySnJHN3RjcVdwK3dvNlVpeStnN2pwb3Q0?=
=?utf-8?B?ZVpMV0hndGF4T0lodWx2QkhzT0dqWjZJMkFCTy9zSHV1enFjNzhueDBCK2Rx?=
=?utf-8?B?WDI0bUdXQTVCV0d0RHcxa2hFOTNrUVN0dE9PVFkzWm1pWHJlUG9QNjBEcElv?=
=?utf-8?B?UmdDVVVSZ0FBT000R2w1T0trR2RXUW5yN2pNQzVWbGlNRzF5NmFDN0MwNytF?=
=?utf-8?B?ZjZqSWF4bkpnYnlJelhwazhZN1cvZ01jTStSa1dLZDVFTnIxaUpObFpJSWtP?=
=?utf-8?B?Z3V0ak9Eekl2SWxzRmtVem5BUExtVEtWUXR0ekpURWZ1RjVvd2xsNWdvbHFZ?=
=?utf-8?B?eTRzYmpLQWVNaXdhRnM2WmFkcTVXSWs3SjJuWXV6ZHVJK3NyT2RBTis4YWc3?=
=?utf-8?B?Yi91TzZCYXR2ZWtYMjVUV0lQTlZEN0x1U1AvVTdEZk1tVWVOQ0lJeUQ3bGdB?=
=?utf-8?B?SFN2ZnI4UEFpaVdha1p4WUdSVFEybjRHUkwzY1VrZGJoZmZBaXU5cXRPWi9Y?=
=?utf-8?B?YW1YOWYyeFdUMmxtNkVHRjM3c29UcjdDYUNZN0ZzblFyZ2tjZlRCc1c2RWJN?=
=?utf-8?B?UU1LeG0zZTIzWGtrWWNpZXMrb1N6UXYrSXhlc3BJZjg1NU1OT3lBdEkrOHZp?=
=?utf-8?B?SE1VZHdLUjJWL3RZeTloYVlhSCtwb0tHeXRNR3RKZXh4UENOcEFJeUlyb0Ew?=
=?utf-8?B?cTlBS3laR1lKVTZadWdQS1NJdVZJa2JocThYcm9YT0FOZkU0a3ZmSXlDekJp?=
=?utf-8?B?UXkxcmxLOXVWNmE0VWkrTHZjTTE1MHJnWGViSFRVRjRQbGc0NlVwblFuSDNR?=
=?utf-8?B?ZXpIMTRFbTNuTHVJWloyMGZOc3lEUGEzeTNvUGNNQU0wdTJJdGlmYWxoNmp6?=
=?utf-8?B?SmhVZ1BPbzllU2lVSVJveWdEOSswUnZnbGRDeWpkbUQ5a01WakJPQUdMMTVY?=
=?utf-8?B?OTJwMDBrZG84Vm5YUFRHVW1XRWxIclNYMFczdWZVNDZCSS84MDdyUTBXOWdU?=
=?utf-8?B?NW4reEppY0s5cTFLSHc1NHJlbm1NVk9NRmZKdUNMSU1GRmVLMVp1N2JYWklP?=
=?utf-8?B?TkY5VVV4Rmc5TlQ1bXJTMHBtaE1EKzl2bWhrbERDTzVoUU5oektZU2h1NklO?=
=?utf-8?B?V3dWMFAyaXZwa1MxakFHNFpoMGlMVnZJQ2dzTHBZcGkxbTdxN243MlVIYTRh?=
=?utf-8?B?QWtGSWJkWW1Cc1cremhaTjA4RE4vTUhURElja0pvKzlxenhUVXhoOXQyWkVG?=
=?utf-8?B?SFcxTFVhaFRlaTg2ZjVLWVBQeW1KQitReXNhZ3EycXNiQ1V6NEFCVHQ5UExS?=
=?utf-8?B?NDB4cXNYaC81YkN5SnRxU0VhMzRoL1J2TmtxMG5kanRWcm43OXVnTkZPVzhu?=
=?utf-8?B?a1BmRUZQVmhyZzhENU9Ubk53NTZOeWw5NVRNZXN2RERNdGNaS3dRQnIweFBw?=
=?utf-8?B?ZzdJYS9LM044bUY1ei92YThPT0xvVzZXZ2pYUWN4Vm1wdkJYeXJtQWU4azVq?=
=?utf-8?Q?TR0t7ZJlgttP4bi5ruswxqw=3D?=
Content-Type: text/plain; charset="utf-8"
Content-ID: <10DE733FFF93644FA63AD74973A7F020@xxxxxxxxxxxxxxxxxxxxxxxxx>
Content-Transfer-Encoding: base64
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0:
H2uuxo4LkfAzuiW/2ZMtYO+i+a1X0gqTTPRaE/UNNAF3Aw8AaV9OaOSbHvkJ+5c/CTQ8/Govge86FCar4+1a+cT7YZo3JrjLe/J32+Zjj8I00PEOFejE/1o3nkG+TCw9Y7UpqHrjxUUy8oX0NisFUrQ4zyzyP7OjWOWW57fttDIfXH2fOA4gEKutrWcpnYJnsPuXxjL/6kDgKov4OYDSvNy6fWYdtcgUTR1wB77ByBEUnznBhFnnLnvxnAp4D9X8+lvg2qsufva62sb60m2rgqf3WH2wAk5cdOSE5p0olp44OajCIrF+IyxG74R6nZfQrdMGL4MZVPqmScp7wTVAE3+FtUFhL5cbPz8fqpKYwDOqjpsiCClOR4a56KyyZeVgESvNlwLwABxez2VJSa4JImBatbyBIiMOcB80fjAgNrII2PWhUxYnTv77+MwzCkjoIycRF/VNBOXn5TjmnPSlBh2wlk0wUJFj34AAzo9kpwIXsakDG5MW4OcG3y6lJBWzt0YrYqyRgUKYbtm6952cqeJrALjWuiu+dL5BocR0m39k82aYVFJS63Wv3moj7Dupl2bZAsfRV5eGGOQM68K6OZZKyFRlS/9aR5DgzoiSGqc=
X-OriginatorOrg: oracle.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: IA1PR10MB7309.namprd10.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: b1c16569-e455-471c-6ccd-08dda38a9d8e
X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jun 2025 17:09:50.0566
(UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: uCw3dpj4bPZ1JpMEhhStaxVTf0g1DSzxZyAS5jCI7qrqd7nLTqM42x5G5Q/yN9wZn+5WFx2wIt3QE00UAY7/d00kNzSPao0J8o9Nf+Fcud4=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR10MB6219
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 mlxlogscore=999
bulkscore=0 spamscore=0 suspectscore=0 malwarescore=0 mlxscore=0
adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1
engine=8.12.0-2505160000 definitions=main-2506040132
X-Proofpoint-GUID: ew_Hmh644ToWi8O0q7tFQQgAQZtXUeV0
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDEzMiBTYWx0ZWRfX9pp9croxmVPp CKBsaUkBEWHX3bIVuC3IKJ7K7/epaxk6b6v2WURBeHLYkQRsqPIJiMqFBjPxoR7nLbq+Tny0jx9 X+oN/m6GUmIfY8wDo0Gg828Pm+pAidq4qq0X5dPjyaRDV6FpPoU9Q5jNCZDTUuRv/EQckCkY28V
+sQCoUaDXU+5dRcrz9cCn3u0CLifWM6HTQRIQrDuKPG5av/tROW6k3zG/TK2GHSvydlItjJneUJ r6hhRZfmBgjuVLoANjI6uttD0Bqc/sS3S7AD4sK2naUWGi/aBaSmPE1zq0lZ51cnb3UZO2L7+79 i+7gOhog3Tsir0sIMvScALyJnebb5UM+IymTCWWhXkxZ+FYbC/ryrJKW6WJlmiFOeQkIcGqRmTz
lPMgFKlPUgL3TnSYTP3cUlhQ2Qx+KxL8r3+W2/1O6fEZmvFTVKGnRaIp7AQqt9n0kmNxiPWR
X-Authority-Analysis: v=2.4 cv=KaTSsRYD c=1 sm=1 tr=0 ts=68407de4 b=1 cx=c_pps a=WeWmnZmh0fydH62SvGsd2A==:117 a=WeWmnZmh0fydH62SvGsd2A==:17 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19 a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19
a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10 a=GoEa3M9JfhUA:10 a=meVymXHHAAAA:8 a=yPCof4ZbAAAA:8 a=nnC6LwUoCx7AKfdz1I0A:9 a=QEXdDO2ut3YA:10 a=2JgSa4NbpEOStq-L5dxp:22
X-Proofpoint-ORIG-GUID: ew_Hmh644ToWi8O0q7tFQQgAQZtXUeV0
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
DQoNCj4gT24gSnVuIDQsIDIwMjUsIGF0IDc6MzHigK9BTSwgU3RldmVuIFJvc3RlZHQgPHJvc3Rl
ZHRAZ29vZG1pcy5vcmc+IHdyb3RlOg0KPiANCj4gT24gVHVlLCAgMyBKdW4gMjAyNSAyMzozNjo0
OSArMDAwMA0KPiBQcmFrYXNoIFNhbmdhcHBhIDxwcmFrYXNoLnNhbmdhcHBhQG9yYWNsZS5jb20+
IHdyb3RlOg0KPiANCj4+IEBAIC0yMjQ5LDYgKzIyNTEsMjAgQEAgc3RhdGljIGlubGluZSBib29s
IG93bmVyX29uX2NwdShzdHJ1Y3QgdGFza19zdHJ1Y3QgKm93bmVyKQ0KPj4gdW5zaWduZWQgbG9u
ZyBzY2hlZF9jcHVfdXRpbChpbnQgY3B1KTsNCj4+ICNlbmRpZiAvKiBDT05GSUdfU01QICovDQo+
PiANCj4+ICsjaWZkZWYgQ09ORklHX1JTRVENCj4+ICsNCj4+ICtleHRlcm4gYm9vbCByc2VxX2Rl
bGF5X3Jlc2NoZWQodm9pZCk7DQo+PiArZXh0ZXJuIHZvaWQgcnNlcV9kZWxheV9yZXNjaGVkX2Zp
bmkodm9pZCk7DQo+PiArZXh0ZXJuIHZvaWQgcnNlcV9kZWxheV9yZXNjaGVkX3RpY2sodm9pZCk7
DQo+PiArDQo+PiArI2Vsc2UNCj4+ICsNCj4+ICtzdGF0aWMgaW5saW5lIGJvb2wgcnNlcV9kZWxh
eV9yZXNjaGVkKHZvaWQpIHsgcmV0dXJuIGZhbHNlOyB9DQo+PiArc3RhdGljIGlubGluZSB2b2lk
IHJzZXFfZGVsYXlfcmVzY2hlZF9maW5pKHZvaWQpIHsgfQ0KPj4gK3N0YXRpYyBpbmxpbmUgdm9p
ZCByc2VxX2RlbGF5X3Jlc2NoZWRfdGljayh2b2lkKSB7IH0NCj4+ICsNCj4+ICsjZW5kaWYNCj4+
ICsNCj4gDQo+IENhbiB3ZSBhZGQgYSBjb25maWcgdG8gbWFrZSB0aGlzIG9wdGlvbmFsLiBJIGRv
bid0IHdhbnQgdG8gYWxsb3cgYW55IHRhc2sNCj4gdG8gaGF2ZSBhbiBleHRlbmRlZCB0aW1lc2xp
Y2Ugb3ZlciBSVCB0YXNrcyByZWdhcmRsZXNzIG9mIGhvdyBzbWFsbCB0aGUNCj4gZGVsYXkgaXMu
DQoNCkFyZSB5b3Ugc3VnZ2VzdGluZyBpbmNsdWRpbmcgYSBDT05GSUcgdG8gZW5hYmxlIHRoaXMg
ZmVhdHVyZSBvcg0KdG8gY2hvb3NlIHRvIGJlIGFwcGxpY2FibGUgdG8gUFJFRU1QVF9MQVpZIHRh
c2sgb25seT8NCg0KDQo+IA0KPiAtLSBTdGV2ZQ0KDQo=
Return-Path: <linux-kernel+bounces-673574-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id BEDAD41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:10:34 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id E8F1D18910A2
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:10:46 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id A3B251F09AD;
Wed, 4 Jun 2025 17:10:27 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="p/eu5ANI";
dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="ebEuwe1P"
Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id DCE131E5B9E
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:10:24 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32
ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749057026; cv=fail; b=jBgRBoxPiHpogXe1PPyFNRMWcSpOqi7qlE/r7H7tyuHB3W1mAbGalLILYzvKSgmgJQKo4WyGbLjl/xvpTd+QNITxfE4e9mpxHkFUmX0o9jWNdTmYdWA6sCmXArwsa/JBzSIuXlDgGzcwKOcB6PJBmQd1bVXi4HsVbSWMvPpMlcA=
ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749057026; c=relaxed/simple;
bh=smtLHrhbS4Rd6HLfLqfjlCeLUfc99ye8LCMgHvvudRc=;
h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To:
Content-Type:MIME-Version; b=GPKF0ru2t6TSfvgUdBxKdStdvCI/7WO9MzPiWKFtcLQhTuA6sarUU5MZnztVAa/4Q7eNdbDfMJj8n4JH/t61on8YprtTA974rRnDJGLWw3/9lYBf8I8e4RE1hR5hsm9bd6wQRONg433XYBqs5HwppK/fKTzVBx48FYuPZLnhhHM=
ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=p/eu5ANI; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=ebEuwe1P; arc=fail smtp.client-ip=205.220.177.32
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com
Received: from pps.filterd (m0246631.ppops.net [127.0.0.1])
by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 554FduLK032149;
Wed, 4 Jun 2025 17:10:13 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc
:content-id:content-transfer-encoding:content-type:date:from
:in-reply-to:message-id:mime-version:references:subject:to; s=
corp-2025-04-25; bh=smtLHrhbS4Rd6HLfLqfjlCeLUfc99ye8LCMgHvvudRc=; b=
p/eu5ANIbDEhnhPpkt2mDKTmURmJa7VkzfGQxVhhXF8yb+01p80C0gdkrja2Ggy3
CiK2sLqXGCLlsJDs9//G6vTuRRs0odJfEE3X0xFw8zXpcthIvgGwXfWMLtODAjwr
FJY7zB/1jHAVkM3Qhl3+/49gb1R2BUsmE11J9RKC6Nd0A9YMi0t6zoyTp2m/15JR
kk6p/GRviHAAQHgmqrZpk8CHs3VwxPWo6CqKhHwofApNvP15BIqmggndZtfgOgvb
jmxW0UiEbMQJjskNkbSLNCTWvubekT8ABDn+WF10KDQ1BaIsuRTOqXocM1qGSlXX
m6Nheglnx2juOciznV2pmw==
Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223])
by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 471g8dvgkm-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 04 Jun 2025 17:10:13 +0000 (GMT)
Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1])
by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 554GJhKa040698;
Wed, 4 Jun 2025 17:10:12 GMT
Received: from sa9pr02cu001.outbound.protection.outlook.com (mail-southcentralusazon11011006.outbound.protection.outlook.com [40.93.194.6])
by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 46yr7b9ffh-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Wed, 04 Jun 2025 17:10:12 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;
b=GiBI2z10l5yJ9/R5KTBkRnlGcrbe5b8HijBcD/yV74Bo/zvNfjZvANHQMBOJMHdQR8CEwdeXKx2WxGQlxDF7EcvSpBCy4tIvQf09/EWn0duGB66vbt0pgPsqjc5ZnKqSKF/JduXOt4BBINpVp9Xp90WK16Mty38B4erVzgKkqw7sXBVqFNhk0qFyixu3yeXHIZRdhCwbPSImLT+1ZUWa+5C2pDE7B0gOxQC3v9LlRups9nfT35BFPZP9EMGKq96heElwlt2EbGJGZqnqYRcFDzC4q7nlgNRh4Ct2RLhTkquuVSRgOvFSeMU6YtyGWCqhvpPnEs3sSFHxYMuu0TiTNw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;
s=arcselector10001;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
bh=smtLHrhbS4Rd6HLfLqfjlCeLUfc99ye8LCMgHvvudRc=;
b=G/Bof2yooQNwafOFDa7+vp0P1Y8FWwjwysFn+cMRQkjcTPT5zH+KzniW2hGWvUnZcn18VsZDLVzAQUdWJ7VCnCQJAL1XEBOTTgk9EtUI/+4OKN82Ixp3X7gU8cTtcRXKQiJUfW9ST54AsAS9K7cGY6r9HBivX2FJeeTzrhBTBE4kB7dZ4GNqjh3I3t9UDznAEHiU5itZuSvS/YsU31eRV2EIfzOtjSsiI/MFaqatCwp4xX1UbvEkyPJNFajEOTqgBvTe3owh+r6+6rQdxAbzJ9upUdDHz7dEqdLUlHcRrCTpPK02ZT50BW+S9Gh1bIWxr8coTxU2AEYrL0ENEIQTbA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com;
dkim=pass header.d=oracle.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com;
h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
bh=smtLHrhbS4Rd6HLfLqfjlCeLUfc99ye8LCMgHvvudRc=;
b=ebEuwe1PuIi4tuFJwJX85U1MwVQYLau3dIfXVzSGqBZw+nib7kQ2oh9umwMJ93M8m+Pu0sN+5aJslaaFhnyjV7ivdJ3pTcZzToJvmqDNfGg2oKbvm5M9O8B6vgPQ8hn6YPoxvJiyl8yppQrfDYWXA3tCsvp+x0vBSfInyKIJ37E=
Received: from IA1PR10MB7309.namprd10.prod.outlook.com (2603:10b6:208:3fe::13)
by IA0PR10MB7157.namprd10.prod.outlook.com (2603:10b6:208:400::12) with
Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8746.41; Wed, 4 Jun
2025 17:10:09 +0000
Received: from IA1PR10MB7309.namprd10.prod.outlook.com
([fe80::818c:4ed2:2a1a:757a]) by IA1PR10MB7309.namprd10.prod.outlook.com
([fe80::818c:4ed2:2a1a:757a%4]) with mapi id 15.20.8746.041; Wed, 4 Jun 2025
17:10:09 +0000
From: Prakash Sangappa <prakash.sangappa@xxxxxxxxxx>
To: Steven Rostedt <rostedt@xxxxxxxxxxx>
CC: "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>,
"peterz@xxxxxxxxxxxxx" <peterz@xxxxxxxxxxxxx>,
"mathieu.desnoyers@xxxxxxxxxxxx" <mathieu.desnoyers@xxxxxxxxxxxx>,
"tglx@xxxxxxxxxxxxx" <tglx@xxxxxxxxxxxxx>,
"bigeasy@xxxxxxxxxxxxx"
<bigeasy@xxxxxxxxxxxxx>,
"kprateek.nayak@xxxxxxx" <kprateek.nayak@xxxxxxx>,
"vineethr@xxxxxxxxxxxxx" <vineethr@xxxxxxxxxxxxx>
Subject: Re: [PATCH V5 5/6] Sched: Add tracepoint for sched time slice
extension
Thread-Topic: [PATCH V5 5/6] Sched: Add tracepoint for sched time slice
extension
Thread-Index: AQHb1V3v8YMWIQxbp0WxB8CF0dA8BLPzPESA
Date: Wed, 4 Jun 2025 17:10:09 +0000
Message-ID: <972B9853-0BCA-4790-B909-A4ABA3FCDDB4@xxxxxxxxxx>
References: <20250603233654.1838967-1-prakash.sangappa@xxxxxxxxxx>
<20250603233654.1838967-6-prakash.sangappa@xxxxxxxxxx>
<20250604103644.4b41b9a3@xxxxxxxxxxxxxxxxxx>
In-Reply-To: <20250604103644.4b41b9a3@xxxxxxxxxxxxxxxxxx>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-mailer: Apple Mail (2.3826.600.51.1.1)
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: IA1PR10MB7309:EE_|IA0PR10MB7157:EE_
x-ms-office365-filtering-correlation-id: 9a8fb6ca-2591-4297-5584-08dda38aa922
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;ARA:13230040|366016|376014|1800799024|38070700018;
x-microsoft-antispam-message-info:
=?utf-8?B?dWk5T0FXUUNnMW81SDA5VzZ1RlpMOEhHNkZGNk1XS2VFVCs1WEpubWRpSDJ4?=
=?utf-8?B?WWc5UFVNcFdUYkRMMFZBaHlFa0ZHcjQ0eHRwL1psQ2Z1MDJjUU9qMXloNVpK?=
=?utf-8?B?dnl1UVFzZHZLbE8yOTdmRzZkbWhGcHdNSk5LdXBqZ3hNcjNHU3p0QWxjWjZG?=
=?utf-8?B?NjJ0Wk1EcFUvWUNzcHBDTEVhRFZNZ1NZcGZ0czRCb2c5eGdqeFFSTHduNlkw?=
=?utf-8?B?R1BCdnZmakVpY0NsK0t1U3RJMU52cmVBUHFEUmE5WEJYejZ0T3RxQ3ljWktO?=
=?utf-8?B?NmVRWkl6UmRpaXpSZ2psUlpydzFZRXZtakphcW5OdmdXOVgvWmNuZ1R0R0Jx?=
=?utf-8?B?ZlBMZkMvazRRZEgrbFdnd29IMFh0V1VuandJdGEyVFQvSHllSmpFeVdhUjl5?=
=?utf-8?B?ZWE5YXB5K3J6Vzg3U01zVHRSQWZqN1E4M0lPV2tpMWttN3hOMjlxQzJieEF4?=
=?utf-8?B?R2FRT0QyTEZ6bEpKZldqK1l1Smc1ak9CMU1SOHpoenNQcytMck8xYzRJdXJC?=
=?utf-8?B?dkIwZlBrREJIdFF1QmRVY0gvbkxoWFpjTWVhK0hLZnIxS3BzMGVSc2lZU1M4?=
=?utf-8?B?ZjZhOTQzaGZqTWRoeWdYZFVDOC9oaWpKcGNQeDFPSzdVd0dVdEcraEFDa3VM?=
=?utf-8?B?Q0UyN0llNi9seHk3YUFyVENrdWhHR25WM093eWpRLzdPY3dtQ2V0aTY0eElB?=
=?utf-8?B?M015YmJOOWtIQ1BpaVZqQ1VsQmgrMHcybEZYRHUxZnhMZjhGQVRBblRZQXJj?=
=?utf-8?B?UlFHejVwei9HaWxkakhmMllFeHdvQzlWV01OemV2ZEpGS3k5d2RFakRLcWZ4?=
=?utf-8?B?UmovSWxJN2t3YkFGTXpLTG1LdG5UVjdjMVRDYW4ybTVoQ09ueVkwVC91SlZU?=
=?utf-8?B?SVdoOUpKMFZIK1FhTDJweVpkL05XNE1qQ1E2c0IrVENIUWdNTk01ZnVnc1c3?=
=?utf-8?B?TGFEdVgzSEpBTktNcW9lZ1lEaWJhZTlXakF0UUNaUzQvTXRQOWRxYmtqa2Zu?=
=?utf-8?B?L3dwYTcrT0dqMVExWkVUWDhYSEh3UW5ZMFhNeWFUMHd4cFM4N2RSY0w5MzVs?=
=?utf-8?B?SjBWYWczNHNMaG9rVDhhQnRlUE1Xa1ZDeCtsaDIvUi84TE42aVJIYVY2NEJs?=
=?utf-8?B?bk5kNjZpN285RUprOWMyai9NYkQzTURiSENqVkQ1NFdoYmZXZ1pqSUV2M2dU?=
=?utf-8?B?VUhQZzR6NE5uU2w3TEJUSTgyT09nVkJDOFVCT3pLa1ZLRmltS3JzTHVYTjRP?=
=?utf-8?B?c2kxWEVwd0RNdDJYY1dBMjRLakUxRTVxa05hYi83czk3SFVJQWd6TVYvWTUz?=
=?utf-8?B?Zjg4VmFvbk9MWjcrbTh1MGZmc3RRbUVOMUFra0NTL0VpSHg1NjhPNzNiVmNY?=
=?utf-8?B?U3hCTG5vS0ptVzhUNzBwSG9lV280ZE9WaVVXaDNrcG43RkI5cExyeDdNaXpx?=
=?utf-8?B?RTZ2K210Q0NjZGg3NWlvMHdyb0FXM3dpdUxwSEtuU2lwa2xzNmVpVWNJVS9C?=
=?utf-8?B?OUJsRmtuM0g4TU1mVUhPbEZiVlBvZjgzL3NmL0g1RUZNZFVFa3Y2MWJpYW5O?=
=?utf-8?B?TGl0T0wyTTJ6NktVN3JvNk5wYnNENkRkZGtpQkRqVGZlZHNEQjJrQmh0MTZt?=
=?utf-8?B?MkFmMEhkSmJxTThMM2dSc0RkQytrZW1nS2lyTFJJSytPcHYvSmNHcEhQVjJQ?=
=?utf-8?B?Y1pJNDVuYThkRzcrcVpNcmYzVlViaUNjTnJad2hGbGtaRUU4SjZ5K0VJa0J0?=
=?utf-8?B?MStYSmh2aExoRmhBbEhoWHhsM1VtWWNSbE1sQTdqY0NTS1Q4VDVaK0ZQOVY1?=
=?utf-8?B?blU4RC9BWVJjaGZCMTBhb0M1TU0xL01uWmlLRjE0dXgyWHl5M1hsUzlvQVhl?=
=?utf-8?B?TTlvYy9YSlZ3UHZsR0dWME5kSzlvVFpUWjZJU0ZRZ2dHVTdLdkFQNkp0MWlN?=
=?utf-8?B?Z0EzRTdKblVTd0tRVHNFRGJSSmxVSHZqTHpUNk1jeXpCd0t0dUdaTHBNYjhH?=
=?utf-8?Q?y95Se/M63MOEVPrcm8SSFwyYOO9EbQ=3D?=
x-forefront-antispam-report:
CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:IA1PR10MB7309.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(376014)(1800799024)(38070700018);DIR:OUT;SFP:1101;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0:
=?utf-8?B?cVFxN3hNUWQ3S1U3Q2hHbG5kdjNTNXBjOWVuS3FUZ0ZrdHFUVS85RUpsbXQ5?=
=?utf-8?B?WEhQS1V5d1R2dEVUcjFFUWlzSVd6Umx1emVpUHJGb2EzbjJFQlRZWExNZ0NL?=
=?utf-8?B?WC8xZkJsWnIzU2ZXd3N3VjI1dzhhcUgyYnV1U2F5YnpOMDU0UWNCWDJHVk9X?=
=?utf-8?B?QndKbVlsQkRWdTl6U3drdXVwTmRSQkp5eUJEakpHcFgvR2pld3lyOXpEb2Zj?=
=?utf-8?B?NHVLcGpDVngrdkJYSnErYlJhZm1nbmdkcnJaSzJ0OVdjcmlyWU54L0ROSllX?=
=?utf-8?B?dk9BZGVQWVBDMnJqbkRTQStybDBhR3ZFV3hSVjJMMFpjd2tFUDdDWHh2OTRt?=
=?utf-8?B?VGRlYXdsOGZiaHV5UFpYWVd0N1QvdDlqU2hERlFJQXF4cGN6Y3RBME4wTzFH?=
=?utf-8?B?OWJOeXR1dWszMStaYWJ0TmpLbHZWMVFsbEFnTEtpd2tNL3JzRUNFT2hIcTBW?=
=?utf-8?B?SnRoLzR2eTE3cWg4OXdWdE1xZ0xOVTB0TU5YOUFNK3JkQmV5SWg0WFBpejFn?=
=?utf-8?B?SEV2R0tRclZGU3VHdkExT09kY2x2MEg4ZHZCODBMb3BnRlVMQm9QelhQOU96?=
=?utf-8?B?MktwRy9BbDBLM0I2ZmJhVEc3ejl4bFBoMURFQTJMeUJrWjJZTDltL1pGVEx3?=
=?utf-8?B?QmREYjZGYlNUMWh2QWNQNVk2Y2JqSFY2c0RJcXpTUlk3TGxhYzdnaDhmK3Zl?=
=?utf-8?B?T2puOXAyUlpuRDZTRUM5UUV6SDdwYUt1Ui8rdlFKa0FJRW8xZzZFckUxZjlX?=
=?utf-8?B?ZTBPd1lTS3E0M2ZHM3k4R0RJSHJpdDkzZTM1NlpTcHdxOFQ1M2pVb1ZieEh6?=
=?utf-8?B?eHI5L2dacG5mQWlkVENpUTlJOVVnUWI3cisveTk3QzFpRlhYa1h2ZGpueUVy?=
=?utf-8?B?Qk55SktNN0puelovenArYWFuTm5zRTlwalVhRjVobThGN0VqS2JXYXIvVVgz?=
=?utf-8?B?bU9NUnBLaXhTS1hiVE51aWhzTkFRMEFobGhFOWZBRFdxVTVzZlozUW5ndjhJ?=
=?utf-8?B?N3hRQWdidVNiK0IyZlIrMWFDVVYyQzZGMVZoNXNJYitBaUg0Y3gvUGhySDVX?=
=?utf-8?B?YjFMSG9CNFhnN2xuMnpuZE5XbnZqbG9hWnZNSlg2NlBVT3BGdGNmUlBueHAx?=
=?utf-8?B?c1d4N0p3K2xKbnM3ZGgvK2JmeVc1Unc2RWVjVWxJQVlMYXhHSzVCRUYydjhx?=
=?utf-8?B?eVowTUM5MG9WSXZQYVhkQ2p1MmlNZGpQMnF2MW16SnhSVEo0L2pGZGtRaFJM?=
=?utf-8?B?UlluenVNZXpRb1lObnZxcXlNTmV1bm5hZ25VQnlKYXYwNitxUGpjNTZ6Z0Uw?=
=?utf-8?B?RkkxQVhmbVU3RjFUK3YwelI3K2lJN3cwSVhDcU50RTNseUFUbDJoSXNlMEt5?=
=?utf-8?B?cVBGNnBJb3NJYXNQWXpCVzFxVGdpRFd5SjlTczA3Q3dKWU9mWHQreE1TZnBv?=
=?utf-8?B?Uno1Q2xzVHJOS2FhZy9OR2dhK0txaFJhY2FYeElxZnJzYVB4OUhsOWIyRklm?=
=?utf-8?B?UWszUm5JUTB0d3NteGx0WVhIbm16bnJ6MEFJblhYdkxEMmFrZEEwbSttdWhT?=
=?utf-8?B?STFRZUVJUGNxQUtidGpoMVVpSTkyVFJScmRhdGR2emtjOGd3eDB2YTBGMDRi?=
=?utf-8?B?UHlBYUpGTkw5TnhSa3J2Rmk3N3BYNWVQN1ZzUDU4amZENGs3dmJxT2kzOVJx?=
=?utf-8?B?Qk16Nk9jVHpKaitKcFkycFhmcStiVFZLdVRmbEtRbHlmbi82cGVrQ2hMSzdv?=
=?utf-8?B?LzAyM0ZuRkY1YzZCN0tHalJVMWtnZnZTSXVkc1J6UHRFN0w5bm0xRGNCM0xw?=
=?utf-8?B?NEkrS3htQzNwbHFQdUt3QTRIU25OOXhWOXFzWHdJTCtZaHllVFJ5ZmorbTdm?=
=?utf-8?B?NU5BalQxWm1kczVMOXM1NFhnMnp2U01jWHJuZVd4amNoRmNEUXN3MHZaY3Jn?=
=?utf-8?B?WlNNVWs3NDgydzFUS3B2NERNNDdOQ3hOOEVqRlB0V1BTTnZsSGsvTThPS0Zu?=
=?utf-8?B?dXNzbHg5ak84ODU0QUR0Z1J6aldJenEyV0QyN2hkK2RscmEzZ1hzUXJOcGZy?=
=?utf-8?B?YnVNTHQzUUZqbzR2STdUN3pEbGQ4YzVkazN3WUh0RE9PdFNTd1NReGVwK3lO?=
=?utf-8?B?TGpCYVdkWmlKMWVFbUJkQ3piazVaR1JSVG9CQkJ2cVBickROU1ljeGJIY3NU?=
=?utf-8?Q?8FOhnacDnh5vAq6/z5jgPOI=3D?=
Content-Type: text/plain; charset="utf-8"
Content-ID: <6BF1DDBE932D21498317CF5E8F713D6A@xxxxxxxxxxxxxxxxxxxxxxxxx>
Content-Transfer-Encoding: base64
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0:
eReipGgrDJpZ8gqBVnBx9enYVoGsbghQSygeDSQalMYlgqnKbRErkjfJ8VMrEw3e6KzpsNEA/9Ya5668tQ5pSdZtCUwUbYQLZb/a0fwPGMroBvOzTozL28ry1+6ip/phnlrqYzoAB8M1UiuWUxKNdFCTJY0UfS6WyRY8D3OYjGhxny2rcjAGarfahyBnAkqjWuMtLDVueevbU8Ih7/m2bjRtTMYDut+89MluV4Kz+FI1ZeeiNdAusZVTWhqtg07yIIz8MY8MHVe53/+d05OrV+gHrWQijXJsXtHdgzmBo/IW5ipNgWIKxsT0BilZiYv8hqKoz/G9/S+Xhkc88HMY2EDFVBa8svc6BU/m4fwLg7riBT1duHrUOcKlKiErwrLFVbbLsOf//BBVmrc0l9EcD14xzMl11Le+Up04NSjH+UxbUq8KUw5mLX4n7GfVBQYXOk1BxYUV2IQqRS5UvfkRJZOzVmn+0w56BEqlK05cSr/3e9NT8X5/YWCp+VajmWVNfmGMjHWMzAti9CGndQ78WTQewAxvhgkrbL75GskXsFgimcH+SDRoR5VNBoVh5PIcgeTz1WEgblXy88cfo2QMDuzTGeZNqzMFO/DLhnWBHJQ=
X-OriginatorOrg: oracle.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: IA1PR10MB7309.namprd10.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 9a8fb6ca-2591-4297-5584-08dda38aa922
X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Jun 2025 17:10:09.4762
(UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: zKd/f+zqSZMEAZLxWRXr2bqDjn/kU13DxDMbuupc0AC6pUxHexqZeVl5pY9Ajw8nP7DkTevdZPCF7ac4yf7xvcNE9uBKFcAGtE2moxl6RIE=
X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR10MB7157
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 adultscore=0 malwarescore=0
phishscore=0 mlxscore=0 mlxlogscore=999 suspectscore=0 bulkscore=0
classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2505160000
definitions=main-2506040132
X-Authority-Analysis: v=2.4 cv=Va/3PEp9 c=1 sm=1 tr=0 ts=68407df5 b=1 cx=c_pps a=zPCbziy225d3KhSqZt3L1A==:117 a=zPCbziy225d3KhSqZt3L1A==:17 a=lCpzRmAYbLLaTzLvsPZ7Mbvzbb8=:19 a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19 a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19
a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10 a=GoEa3M9JfhUA:10 a=meVymXHHAAAA:8 a=yPCof4ZbAAAA:8 a=BNQB1_rShqGLDg3vYjgA:9 a=QEXdDO2ut3YA:10 a=2JgSa4NbpEOStq-L5dxp:22 cc=ntf awl=host:13206
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDEzMiBTYWx0ZWRfX/MaQ3IFsczcZ /QtwPI/+5cl/qwrBIPdU6EbAHqBfWbxjxphzwePuwobPdfMa9hu25qQcdU9i8FP8xBw4I/i/BZg Gcoq8GlYKhZRbx2WMv2iJXG7mR7drAwdahVW+Bp1ZusC8ZEES0m5MKt+5Oa1H8a6q2/PTbmULbS
ZfKjmQV8IJBeell0XPgY+JOent3oAhGhtDGQGmIG5OYGz85PzzZmFIFx8JlT5ig10ZEx+BaZ6Y/ EG5QjDgau+u1SCEHVPyXbCRq0ugRZBqAK0ak4Jd1nndCS+TOGJsBy+WsXmK+NTiiLXqHj0LCOEz mdcU/3dCYwsWSB+DZ/LZEIg8dHJYKz0g92K2+Ycsme4pD+u9jLbnF9ZIvat8f+fXPMMhuir5U6n
/En2qalOxhYpgsAhaMARFaDoY6w7oylDgb2dndgezEKeqEpehhm03lsZOECnATpzvyWvHFjw
X-Proofpoint-ORIG-GUID: UOtyPPzs3Yij3dFVa3ZPegfHg3QWagsh
X-Proofpoint-GUID: UOtyPPzs3Yij3dFVa3ZPegfHg3QWagsh
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
DQoNCj4gT24gSnVuIDQsIDIwMjUsIGF0IDc6MzbigK9BTSwgU3RldmVuIFJvc3RlZHQgPHJvc3Rl
ZHRAZ29vZG1pcy5vcmc+IHdyb3RlOg0KPiANCj4gT24gVHVlLCAgMyBKdW4gMjAyNSAyMzozNjo1
MyArMDAwMA0KPiBQcmFrYXNoIFNhbmdhcHBhIDxwcmFrYXNoLnNhbmdhcHBhQG9yYWNsZS5jb20+
IHdyb3RlOg0KPiANCj4+IEBAIC0xMzQsNiArMTM4LDEwIEBAIF9fYWx3YXlzX2lubGluZSB1bnNp
Z25lZCBsb25nIGV4aXRfdG9fdXNlcl9tb2RlX2xvb3Aoc3RydWN0IHB0X3JlZ3MgKnJlZ3MsDQo+
PiB0aV93b3JrID0gcmVhZF90aHJlYWRfZmxhZ3MoKTsNCj4+IH0NCj4+IA0KPj4gKyBpZiAodGlf
d29ya19jbGVhcmVkKQ0KPj4gKyB0cmFjZV9zY2hlZF9kZWxheV9yZXNjaGVkKGN1cnJlbnQsIHRp
X3dvcmtfY2xlYXJlZCAmDQo+PiArIChfVElGX05FRURfUkVTQ0hFRCB8IF9USUZfTkVFRF9SRVND
SEVEX0xBWlkpKTsNCj4+ICsNCj4gDQo+IFBsZWFzZSBtYWtlIHRoZSBhYm92ZSBpbnRvIGEgY29u
ZGl0aW9uYWwgdHJhY2Vwb2ludCBhbmQgeW91IGNhbiBhbHNvIGp1c3QNCj4gcGFzcyBpbiB0aV93
b3JrX2NsZWFyZWQuIE5vIHJlYXNvbiB0byBkbyB0aGF0IG91dHNpZGUgdGhlIHRyYWNlcG9pbnQu
IEFzDQo+IHRoZSBhYm92ZSBpcyBhbHdheXMgY2hlY2tlZCByZWdhcmRsZXNzIGlmIHRyYWNpbmcg
aXMgZW5hYmxlZCBvciBub3QuDQo+IA0KPiBUUkFDRV9FVkVOVF9DT05ESVRJT04oc2NoZWRfZGVs
YXlfcmVzY2hlZCwNCj4gDQo+IFRQX1BST1RPKHN0cnVjdCB0YXNrX3N0cnVjdCAqcCwgdW5zaWdu
ZWQgaW50IHRpX3dvcmtfY2xlYXJlZCksDQo+IA0KPiBUUF9BUkdTKHAsIHRpX3dvcmtfY2xlYXJl
ZCksDQo+IA0KPiBUUF9DT05ESVRJT04odGlfd29ya19jbGVhcmVkKSwNCj4gDQo+IFRQX1NUUlVD
VF9fZW50cnkoDQo+IF9fYXJyYXkoIGNoYXIsIGNvbW0sIFRBU0tfQ09NTV9MRU4gKQ0KPiBfX2Zp
ZWxkKCBwaWRfdCwgcGlkICkNCj4gX19maWVsZCggaW50LCBjcHUgKQ0KPiBfX2ZpZWxkKCBpbnQs
IGZsZyApDQo+ICksDQo+IA0KPiBUUF9mYXN0X2Fzc2lnbigNCj4gbWVtY3B5KF9fZW50cnktPmNv
bW0sIHAtPmNvbW0sIFRBU0tfQ09NTV9MRU4pOw0KPiBfX2VudHJ5LT5waWQgPSBwLT5waWQ7DQo+
IF9fZW50cnktPmNwdSA9IHRhc2tfY3B1KHApOw0KPiBfX2VudHJ5LT5mbGcgPSB0aV93b3JrX2Ns
ZWFyZWQgJiAoX1RJRl9ORUVEX1JFU0NIRUQgfCBfVElGX05FRURfUkVTQ0hFRF9MQVpZKTsNCj4g
KSwNCg0KT2ssIHdpbGwgbWFrZSB0aGF0IGNoYW5nZS4NClRoYW5rcw0KLVByYWthc2gNCg0KPiAN
Cj4gDQo+IC0tIFN0ZXZlDQoNCg==
Return-Path: <linux-kernel+bounces-673575-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id B84E841E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:11:58 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id AEB501891FFF
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:12:11 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 0B4951F30C3;
Wed, 4 Jun 2025 17:11:49 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="jQAn5OhK"
Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 75E9432C85;
Wed, 4 Jun 2025 17:11:46 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749057108; cv=none; b=rmTTpw/kAOZoe7mxMdnnPCeD4BnjdX9wZxMJM06SqYZUMBawPS5dLGzNAFTAE5o+/bDNwlbKBdPalYyfQB1W7gmzWz6V7ky3WbgmkGFl5IQ9Jqz9XBf4OunOmFd7XMuvRngx4VhKn8I9OLzRVuStskscRIKYkygTDbfeD5IdF28=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749057108; c=relaxed/simple;
bh=u3RQ0MuAj7Hb7zignGUFDcyFEUbjoKeV7VD5W4yl4Ds=;
h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From:
In-Reply-To:Content-Type; b=SlAfoa6gHG+STJtbX6etUGAzMjQoz1tM2xqZXietne4O8P8nzr94fRuS1wWAoFhvAfpekRuba6u4Qr/fLaFpkB+WDe586rQDBHHm8nq6JXxSD90r1wVMKGuQq3M9WGZUWkZlyuwvGH+06gosNjVfUr17siLTzF+0UvXmhvrtmwI=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=jQAn5OhK; arc=none smtp.client-ip=205.220.180.131
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com
Received: from pps.filterd (m0279869.ppops.net [127.0.0.1])
by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5549PEuC012867;
Wed, 4 Jun 2025 17:11:41 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=
cc:content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=qcppdkim1; bh=
4i/ajO3EBvye/1TdHU6V/5kg4qohajAkIxEF+I0YpZo=; b=jQAn5OhKTrqEHiMd
zW/+EUK8xtFGjFf7qflhY0x+7VcdHnGthBYYW5KBCO6a/7R3SsIQzsV4tH30BaHy
QSEDSTVI8DH0V+AAoNbG0I2pnSJTNob802aTr6AP98cl0GRSc7gb5DCOv4udt80D
Xogl01iHu/OXBMQGL8xoQEgOUwCCon7bh9Hpa7LNXdWt+5oQx6IXETOxmNA7jZWP
8gRRHov3x6hZ7NEQ0xm+1qGOPQallVyGudmtQVhxhFkhX9X08W/RsI6b7cpFw4fE
RYOupe14ApzF+GyV8YQb/fgtBvqm8MHyST8ZuxekYygYbZmtLI15tlbk0mbjXZ9c
uHnhTw==
Received: from nasanppmta02.qualcomm.com (i-global254.qualcomm.com [199.106.103.254])
by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 47202wcewv-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 04 Jun 2025 17:11:40 +0000 (GMT)
Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139])
by NASANPPMTA02.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 554HBdfj027919
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Wed, 4 Jun 2025 17:11:39 GMT
Received: from [10.216.5.91] (10.80.80.8) by nasanex01c.na.qualcomm.com
(10.45.79.139) with Microsoft SMTP Server (version=TLS1_2,
cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Wed, 4 Jun 2025
10:11:33 -0700
Message-ID: <8f18716f-cba2-4615-950a-63b6b73e23e9@xxxxxxxxxxx>
Date: Wed, 4 Jun 2025 22:41:30 +0530
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v5 6/8] serial: qcom-geni: move clock-rate logic to
separate function
To: Bryan O'Donoghue <bryan.odonoghue@xxxxxxxxxx>,
Greg Kroah-Hartman
<gregkh@xxxxxxxxxxxxxxxxxxx>,
Jiri Slaby <jirislaby@xxxxxxxxxx>, Rob Herring
<robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Conor Dooley
<conor+dt@xxxxxxxxxx>,
Bjorn Andersson <andersson@xxxxxxxxxx>,
Konrad Dybcio
<konradybcio@xxxxxxxxxx>,
<linux-arm-msm@xxxxxxxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>,
<linux-serial@xxxxxxxxxxxxxxx>, <devicetree@xxxxxxxxxxxxxxx>
CC: <psodagud@xxxxxxxxxxx>, <djaggi@xxxxxxxxxxx>, <quic_msavaliy@xxxxxxxxxxx>,
<quic_vtanuku@xxxxxxxxxxx>, <quic_arandive@xxxxxxxxxxx>,
<quic_mnaresh@xxxxxxxxxxx>, <quic_shazhuss@xxxxxxxxxxx>
References: <20250506180232.1299-1-quic_ptalari@xxxxxxxxxxx>
<VkNsXqYDdmwW9dutwc76Dv8ks2pvgcUwpf1UREJXhbXDQRaobVZL8m0hLz6rsOG-v6CjyAW3vHbuKMiPc9kN_Q==@protonmail.internalid>
<20250506180232.1299-7-quic_ptalari@xxxxxxxxxxx>
<47d19ad8-37ad-462f-8cb3-d39c29008709@xxxxxxxxxx>
Content-Language: en-US
From: Praveen Talari <quic_ptalari@xxxxxxxxxxx>
In-Reply-To: <47d19ad8-37ad-462f-8cb3-d39c29008709@xxxxxxxxxx>
Content-Type: text/plain; charset="UTF-8"; format=flowed
Content-Transfer-Encoding: 8bit
X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To
nasanex01c.na.qualcomm.com (10.45.79.139)
X-QCInternal: smtphost
X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085
X-Proofpoint-ORIG-GUID: iWmGidyfj-w3FQMyXgezkWXLZfUxlxSI
X-Proofpoint-GUID: iWmGidyfj-w3FQMyXgezkWXLZfUxlxSI
X-Authority-Analysis: v=2.4 cv=Y/D4sgeN c=1 sm=1 tr=0 ts=68407e4c cx=c_pps
a=JYp8KDb2vCoCEuGobkYCKw==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17
a=GEpy-HfZoHoA:10 a=IkcTkHD0fZMA:10 a=6IFa9wvqVegA:10
a=_xQr-q912Lc-BbZZ_8YA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjA0MDEzMiBTYWx0ZWRfXyXwx1MucbnsN
OGiLiLBKmhrD1SKNCUV9IfBS4kYo9csA5FA2AcadXHwtYokIyPuBWKX/ZH/qaW1kgiTcvkZW2Kx
iC/H9VldSVmaf9oSkbMwWCior114Ayww47nq9dROiP6KwhdrjQ3YkFzL5h9+mNdipoqMSP/Hq0g
DjRoDJ1igVDxPU03cOuwoD8DsM8vjUuFnhKUQ4YvhrTJZhTg7tZnQFt3/6vCwb13yGCl4/Bt0/v
ocNAleuf6KxncmZqIg/zGumoRYElX4Bq4JX8PGH74BTyILqqk4DTXsJytza+wbOHGKrt9IJMwmy
uio9x5i8fZEVxTgU3waQaHuDPLQLHP1NbTuhQFjGf4giRi9pywgU8fLqcRx1bDK1ww0FYP1XY54
U9tBvtZJQUHiy8wBQW2Hv2bBlXcksFa5YseSFUfft7iT4k17irNzcFSfGYKfJXTkxpPGyAgG
X-Proofpoint-Virus-Version: vendor=baseguard
engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40
definitions=2025-06-04_03,2025-06-03_02,2025-03-28_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
clxscore=1015 priorityscore=1501 spamscore=0 adultscore=0 impostorscore=0
lowpriorityscore=0 phishscore=0 mlxscore=0 mlxlogscore=999 malwarescore=0
bulkscore=0 suspectscore=0 classifier=spam authscore=0 authtc=n/a authcc=
route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000
definitions=main-2506040132
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Hi Bryan,
On 6/3/2025 8:11 PM, Bryan O'Donoghue wrote:
On 06/05/2025 19:02, Praveen Talari wrote:
- "Couldn't find suitable clock rate for %u\n",
+ "Couldn't find suitable clock rate for %lu\n",
baud * sampling_rate);
- return;
+ return -EINVAL;
}
- dev_dbg(port->se.dev, "desired_rate = %u, clk_rate = %lu, clk_div
= %u\n",
- baud * sampling_rate, clk_rate, clk_div);
+ dev_dbg(port->se.dev, "desired_rate = %lu, clk_rate = %lu,
clk_div = %u\n",
+ baud * sampling_rate, clk_rate, clk_div);
Separate this stuff out.
Your code should match the commit log. If you want to convert %u to %lu
make a patch to do that, even if it seems trivial, it is better to make
granular submissions.
It comes under newly added API. Do we still need to make separate patch?
Thanks,
Praveen Talari
---
bod
Return-Path: <linux-kernel+bounces-673576-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id E010F41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:12:07 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 1D2C616F058
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:12:08 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id BE6661F2BBB;
Wed, 4 Jun 2025 17:12:04 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="QF+nS6JH"
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id BD2731E5B9E
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:12:01 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749057123; cv=none; b=URH1Rq5JfLoKm7Iivta0hLexbKevqDLTJ/rSYFo7BgunlI4mxQJW3KdO77RP9xE9eWYeJ0l6FP4hnDHVKg+tqLQC4ok7Yv47IDDghFvtF3Fiv2Gr0/GM19yhnu9nWueNACT8nvYDFZ/uMRSCpTiIFhr8e3MDiFGecHcRpd7d/tY=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749057123; c=relaxed/simple;
bh=HiHytsPGnbds4NKPpbjAmG1nUz+qlL9ytwVZGIeGhZ4=;
h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From:
In-Reply-To:Content-Type; b=nt9iKx/L4SvaRyYZeAILHtSnDujwNK8EOQQgM62Hhbdd3y+cOUMF9YKhs1daP3kZ4c8/p2W1rIQRrMB4o1nkHVp+R+f14jBsuzt8r9CKW0i0UIDSYSL6SDh7IDEl6Bx33+k9eg7mnujfZYtUyq91kanhYSpQVJwD6Uen6Suh2sc=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=QF+nS6JH; arc=none smtp.client-ip=170.10.129.124
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
s=mimecast20190719; t=1749057120;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding:
in-reply-to:in-reply-to:references:references:autocrypt:autocrypt;
bh=fDmYKcTik3HdHnbp9kttCgGiDzVQ6UMn5CSkP0a5vfo=;
b=QF+nS6JHJ0nPT3lB5kjRE1ASiaWCSmc+QaGHZ7mTP4bVTj1VIs86vNafJ0GyuWucU1z1zk
a26MTUm21rhM5DECVQ65dyotbZxMxdUB133/8GApsj5+tmrZNV2BcLtzJP7316J1UOjLoA
TBHtlOFkrlGykq6PGAwwtLRJdHRy0fg=
Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com
[209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id
us-mta-531-UP4HKMtAMiWnSp9d1LjFgQ-1; Wed, 04 Jun 2025 13:11:59 -0400
X-MC-Unique: UP4HKMtAMiWnSp9d1LjFgQ-1
X-Mimecast-MFC-AGG-ID: UP4HKMtAMiWnSp9d1LjFgQ_1749057118
Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-450cb902173so575095e9.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 10:11:58 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749057117; x=1749661917;
h=content-transfer-encoding:in-reply-to:autocrypt:content-language
:from:references:cc:to:subject:user-agent:mime-version:date
:message-id:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=fDmYKcTik3HdHnbp9kttCgGiDzVQ6UMn5CSkP0a5vfo=;
b=Onm84CYgrQ+Y9njZjDQfzdw8WKfRNfr3drwcJ9IjRHEHwzflCGgiQi8RC7UH9VyLl7
ECbAjh3KBikZq5w+cHJauROcQ5olsLGQM+LBWS6Qj4z6RxQ9g0oR6/TD6a1naW6Wz1Wk
zl6fj9POUfGcnYKo3FbWHgtYvNkbrXiFmSJ3yhxRLwchXTfjGIkx5y6vsG9NGgJFs9xO
eNywpBVoNz4mnD6NxW8Ud94C7ElOvwgmGwNtCuSC61srXR/1sViCH6i6kBKEu2O7vb1J
hDV5JXG3CxdChHbPuqXr2dTZMOISHyzHMfO9cmg3zo/yGe8uStqMKsp8bcA4fXszJaYB
EyRg==
X-Forwarded-Encrypted: i=1; AJvYcCUnuj2stu13O9bfiY3BgLXiXbvoBzNPePsHhZw7bSoR3G8og1ZdmtDEkHaUOibpzkhaKlV9PPN6DHCkQwc=@vger.kernel.org
X-Gm-Message-State: AOJu0Yw0pKUInYZOIj18Ek1e/dgEYt80dHj5Oz+aGqv8RV67cR97V7Ta
HngFFo2aWT2Sc6CcuQmg88r6LHyWdsYCjON2+hC5oI72UTRjXHV5iboIxwbqnDD2Qnhhqv3VvRd
VXXv72O9A8PD2EqcVySMrTo3RuqJsSyGxXbqP/WRZvXvWVhywY4D1u6SfVw1ZYuxoDz/geCtK8g
==
X-Gm-Gg: ASbGncv1gOuWh5DNJ20o+6mBHep0QnItvSf9R9LMKraO1mLwiCRRXfoXSwhpQl1WpDn
7Lk5W5QlZNosvGqRhPDsAWUdgk+LTgupyRpKWN3+IDGGpt7XjIn1LSpoOLNrc/In+x79fy0b5Ix
ZRrMGZlQkfs0lVRn7elY7+6h4FmWl5gOh40jumtxf+6inSIJPylk2sk5pmZf5HMFzjcNgm395Ke
15QTs9UTmIH1bDdpFWuW6Ty2T11cUxPrVtfU5V3uJCvQhpT+udQuVzRa/patx06rKiOrd2XWoGO
1z55UkleOd8kXw==
X-Received: by 2002:a05:600c:3b1f:b0:448:d54a:ca23 with SMTP id 5b1f17b1804b1-451f8854e92mr3973355e9.8.1749057116971;
Wed, 04 Jun 2025 10:11:56 -0700 (PDT)
X-Google-Smtp-Source: AGHT+IEspzn/21MdE4chVnb4+euJWwR2y7B8B3JjYm3OBvogR9YRRy0pD1DwLpOBJ/z0MGIz3j6UVw==
X-Received: by 2002:a05:600c:3b1f:b0:448:d54a:ca23 with SMTP id 5b1f17b1804b1-451f8854e92mr3973065e9.8.1749057116433;
Wed, 04 Jun 2025 10:11:56 -0700 (PDT)
Received: from [192.168.10.81] ([151.49.64.79])
by smtp.googlemail.com with ESMTPSA id ffacd0b85a97d-3a4efe6ca08sm23102833f8f.33.2025.06.04.10.11.54
(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
Wed, 04 Jun 2025 10:11:55 -0700 (PDT)
Message-ID: <8b57d98d-aa53-40d9-ac5e-3f9b74643b38@xxxxxxxxxx>
Date: Wed, 4 Jun 2025 19:11:54 +0200
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
Subject: Re: [PATCH v2 00/59] KVM: iommu: Overhaul device posted IRQs support
To: Sean Christopherson <seanjc@xxxxxxxxxx>, Joerg Roedel <joro@xxxxxxxxxx>,
David Woodhouse <dwmw2@xxxxxxxxxxxxx>, Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>
Cc: kvm@xxxxxxxxxxxxxxx, iommu@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
Sairaj Kodilkar <sarunkod@xxxxxxx>, Vasant Hegde <vasant.hegde@xxxxxxx>,
Maxim Levitsky <mlevitsk@xxxxxxxxxx>,
Joao Martins <joao.m.martins@xxxxxxxxxx>,
Francesco Lavra <francescolavra.fl@xxxxxxxxx>,
David Matlack <dmatlack@xxxxxxxxxx>
References: <20250523010004.3240643-1-seanjc@xxxxxxxxxx>
From: Paolo Bonzini <pbonzini@xxxxxxxxxx>
Content-Language: en-US
Autocrypt: addr=pbonzini@xxxxxxxxxx; keydata=
xsEhBFRCcBIBDqDGsz4K0zZun3jh+U6Z9wNGLKQ0kSFyjN38gMqU1SfP+TUNQepFHb/Gc0E2
CxXPkIBTvYY+ZPkoTh5xF9oS1jqI8iRLzouzF8yXs3QjQIZ2SfuCxSVwlV65jotcjD2FTN04
hVopm9llFijNZpVIOGUTqzM4U55sdsCcZUluWM6x4HSOdw5F5Utxfp1wOjD/v92Lrax0hjiX
DResHSt48q+8FrZzY+AUbkUS+Jm34qjswdrgsC5uxeVcLkBgWLmov2kMaMROT0YmFY6A3m1S
P/kXmHDXxhe23gKb3dgwxUTpENDBGcfEzrzilWueOeUWiOcWuFOed/C3SyijBx3Av/lbCsHU
Vx6pMycNTdzU1BuAroB+Y3mNEuW56Yd44jlInzG2UOwt9XjjdKkJZ1g0P9dwptwLEgTEd3Fo
UdhAQyRXGYO8oROiuh+RZ1lXp6AQ4ZjoyH8WLfTLf5g1EKCTc4C1sy1vQSdzIRu3rBIjAvnC
tGZADei1IExLqB3uzXKzZ1BZ+Z8hnt2og9hb7H0y8diYfEk2w3R7wEr+Ehk5NQsT2MPI2QBd
wEv1/Aj1DgUHZAHzG1QN9S8wNWQ6K9DqHZTBnI1hUlkp22zCSHK/6FwUCuYp1zcAEQEAAc0j
UGFvbG8gQm9uemluaSA8cGJvbnppbmlAcmVkaGF0LmNvbT7CwU0EEwECACMFAlRCcBICGwMH
CwkIBwMCAQYVCAIJCgsEFgIDAQIeAQIXgAAKCRB+FRAMzTZpsbceDp9IIN6BIA0Ol7MoB15E
11kRz/ewzryFY54tQlMnd4xxfH8MTQ/mm9I482YoSwPMdcWFAKnUX6Yo30tbLiNB8hzaHeRj
jx12K+ptqYbg+cevgOtbLAlL9kNgLLcsGqC2829jBCUTVeMSZDrzS97ole/YEez2qFpPnTV0
VrRWClWVfYh+JfzpXmgyhbkuwUxNFk421s4Ajp3d8nPPFUGgBG5HOxzkAm7xb1cjAuJ+oi/K
CHfkuN+fLZl/u3E/fw7vvOESApLU5o0icVXeakfSz0LsygEnekDbxPnE5af/9FEkXJD5EoYG
SEahaEtgNrR4qsyxyAGYgZlS70vkSSYJ+iT2rrwEiDlo31MzRo6Ba2FfHBSJ7lcYdPT7bbk9
AO3hlNMhNdUhoQv7M5HsnqZ6unvSHOKmReNaS9egAGdRN0/GPDWr9wroyJ65ZNQsHl9nXBqE
AukZNr5oJO5vxrYiAuuTSd6UI/xFkjtkzltG3mw5ao2bBpk/V/YuePrJsnPFHG7NhizrxttB
nTuOSCMo45pfHQ+XYd5K1+Cv/NzZFNWscm5htJ0HznY+oOsZvHTyGz3v91pn51dkRYN0otqr
bQ4tlFFuVjArBZcapSIe6NV8C4cEiSTOwE0EVEJx7gEIAMeHcVzuv2bp9HlWDp6+RkZe+vtl
KwAHplb/WH59j2wyG8V6i33+6MlSSJMOFnYUCCL77bucx9uImI5nX24PIlqT+zasVEEVGSRF
m8dgkcJDB7Tps0IkNrUi4yof3B3shR+vMY3i3Ip0e41zKx0CvlAhMOo6otaHmcxr35sWq1Jk
tLkbn3wG+fPQCVudJJECvVQ//UAthSSEklA50QtD2sBkmQ14ZryEyTHQ+E42K3j2IUmOLriF
dNr9NvE1QGmGyIcbw2NIVEBOK/GWxkS5+dmxM2iD4Jdaf2nSn3jlHjEXoPwpMs0KZsgdU0pP
JQzMUMwmB1wM8JxovFlPYrhNT9MAEQEAAcLBMwQYAQIACQUCVEJx7gIbDAAKCRB+FRAMzTZp
sadRDqCctLmYICZu4GSnie4lKXl+HqlLanpVMOoFNnWs9oRP47MbE2wv8OaYh5pNR9VVgyhD
OG0AU7oidG36OeUlrFDTfnPYYSF/mPCxHttosyt8O5kabxnIPv2URuAxDByz+iVbL+RjKaGM
GDph56ZTswlx75nZVtIukqzLAQ5fa8OALSGum0cFi4ptZUOhDNz1onz61klD6z3MODi0sBZN
Aj6guB2L/+2ZwElZEeRBERRd/uommlYuToAXfNRdUwrwl9gRMiA0WSyTb190zneRRDfpSK5d
usXnM/O+kr3Dm+Ui+UioPf6wgbn3T0o6I5BhVhs4h4hWmIW7iNhPjX1iybXfmb1gAFfjtHfL
xRUr64svXpyfJMScIQtBAm0ihWPltXkyITA92ngCmPdHa6M1hMh4RDX+Jf1fiWubzp1voAg0
JBrdmNZSQDz0iKmSrx8xkoXYfA3bgtFN8WJH2xgFL28XnqY4M6dLhJwV3z08tPSRqYFm4NMP
dRsn0/7oymhneL8RthIvjDDQ5ktUjMe8LtHr70OZE/TT88qvEdhiIVUogHdo4qBrk41+gGQh
b906Dudw5YhTJFU3nC6bbF2nrLlB4C/XSiH76ZvqzV0Z/cAMBo5NF/w=
In-Reply-To: <20250523010004.3240643-1-seanjc@xxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-3.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,
MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On 5/23/25 02:59, Sean Christopherson wrote:
TL;DR: Overhaul device posted interrupts in KVM and IOMMU, and AVIC in
general.
This applies on the series to add CONFIG_KVM_IOAPIC (and to kill irq_comm.c):
https://lore.kernel.org/all/20250519232808.2745331-1-seanjc@xxxxxxxxxx
Fix a variety of bugs related to device posted IRQs, especially on the
AMD side, and clean up KVM's implementation (this series actually removes
more code than it adds).
Stating the obvious, this series is comically large. Though it's smaller than
v1! (Ignoring that I cheated by moving 15 patches to a prep series, and that
Paolo already grabbed several patches).
Sairaj, I applied your Tested-by somewhat sparingly, as some of the patches
changed (most notably "Consolidate IRTE update when toggling AVIC on/off").
Please holler if you want me to remove/add any tags. And when you get time,
I'd greatly appreciate a sanity check!
Batch #1 is mostly SVM specific:
- Cleans up various warts and bugs in the IRTE tracking
- Fixes AVIC to not reject large VMs (honor KVM's ABI)
- Wire up AVIC to enable_ipiv to support disabling IPI virtualization while
still utilizing device posted interrupts, and to workaround erratum #1235.
Batch #3 overhauls the guts of IRQ bypass in KVM, and moves the vast majority
of the logic to common x86; only the code that needs to communicate with the
IOMMU is truly vendor specific.
Batch #4 is more SVM/AVIC cleanups that are made possible by batch #3.
Batch #5 adds WARNs and drops dead code after all the previous cleanups and
fixes (I don't want to add the WARNs earlier; I don't see any point in adding
WARNs in code that's known to be broken).
Batch #6 is yet more SVM/AVIC cleanups, with the specific goal of configuring
IRTEs to generate GA log interrupts if and only if KVM actually needs a wake
event.
Looks good - it's not even that different from v1. Thanks!
Paolo
v2:
- Drop patches that were already merged.
- Move code into irq.c, not x86.c. [Paolo]
- Collect review/testing tags. [Sairaj, Vasant]
- Sqaush fixup for a comment that was added in the prior patch. [Sairaj]
- Rewrote the changelog for "Delete IRTE link from previous vCPU irrespective
of new routing". [Sairaj]
- Actually drop "struct amd_svm_iommu_ir" and all usage in "Track per-vCPU
IRTEs using kvm_kernel_irqfd structure" (the previous version was getting
hilarious lucky with struct offsets). [Sairaj]
- Drop unused params from kvm_pi_update_irte() and pi_update_irte(). [Sairaj]
- Document the rules and behavior of amd_iommu_update_ga(). [Joerg]
- Fix a changelog typo. [Paolo]
- Document that GALogIntr isn't cached, i.e. can be safely updated without
an invalidation. [Joao, Vasant]
- Rework avic_vcpu_{load,put}() to use an enumerated parameter instead of a
series of booleans. [Paolo]
- Drop a redundant "&& new". [Francesco]
- Drop the *** DO NOT MERGE *** testing hack patches.
v1: https://lore.kernel.org/all/20250404193923.1413163-1-seanjc@xxxxxxxxxx
Maxim Levitsky (2):
KVM: SVM: Add enable_ipiv param, never set IsRunning if disabled
KVM: SVM: Disable (x2)AVIC IPI virtualization if CPU has erratum #1235
Sean Christopherson (57):
KVM: x86: Pass new routing entries and irqfd when updating IRTEs
KVM: SVM: Track per-vCPU IRTEs using kvm_kernel_irqfd structure
KVM: SVM: Delete IRTE link from previous vCPU before setting new IRTE
iommu/amd: KVM: SVM: Delete now-unused cached/previous GA tag fields
KVM: SVM: Delete IRTE link from previous vCPU irrespective of new
routing
KVM: SVM: Drop pointless masking of default APIC base when setting
V_APIC_BAR
KVM: SVM: Drop pointless masking of kernel page pa's with AVIC HPA
masks
KVM: SVM: Add helper to deduplicate code for getting AVIC backing page
KVM: SVM: Drop vcpu_svm's pointless avic_backing_page field
KVM: SVM: Inhibit AVIC if ID is too big instead of rejecting vCPU
creation
KVM: SVM: Drop redundant check in AVIC code on ID during vCPU creation
KVM: SVM: Track AVIC tables as natively sized pointers, not "struct
pages"
KVM: SVM: Drop superfluous "cache" of AVIC Physical ID entry pointer
KVM: VMX: Move enable_ipiv knob to common x86
KVM: VMX: Suppress PI notifications whenever the vCPU is put
KVM: SVM: Add a comment to explain why avic_vcpu_blocking() ignores
IRQ blocking
iommu/amd: KVM: SVM: Use pi_desc_addr to derive ga_root_ptr
iommu/amd: KVM: SVM: Pass NULL @vcpu_info to indicate "not guest mode"
KVM: SVM: Stop walking list of routing table entries when updating
IRTE
KVM: VMX: Stop walking list of routing table entries when updating
IRTE
KVM: SVM: Extract SVM specific code out of get_pi_vcpu_info()
KVM: x86: Move IRQ routing/delivery APIs from x86.c => irq.c
KVM: x86: Nullify irqfd->producer after updating IRTEs
KVM: x86: Dedup AVIC vs. PI code for identifying target vCPU
KVM: x86: Move posted interrupt tracepoint to common code
KVM: SVM: Clean up return handling in avic_pi_update_irte()
iommu: KVM: Split "struct vcpu_data" into separate AMD vs. Intel
structs
KVM: Don't WARN if updating IRQ bypass route fails
KVM: Fold kvm_arch_irqfd_route_changed() into
kvm_arch_update_irqfd_routing()
KVM: x86: Track irq_bypass_vcpu in common x86 code
KVM: x86: Skip IOMMU IRTE updates if there's no old or new vCPU being
targeted
KVM: x86: Don't update IRTE entries when old and new routes were !MSI
KVM: SVM: Revert IRTE to legacy mode if IOMMU doesn't provide IR
metadata
KVM: SVM: Take and hold ir_list_lock across IRTE updates in IOMMU
iommu/amd: Document which IRTE fields amd_iommu_update_ga() can modify
iommu/amd: KVM: SVM: Infer IsRun from validity of pCPU destination
iommu/amd: Factor out helper for manipulating IRTE GA/CPU info
iommu/amd: KVM: SVM: Set pCPU info in IRTE when setting vCPU affinity
iommu/amd: KVM: SVM: Add IRTE metadata to affined vCPU's list if AVIC
is inhibited
KVM: SVM: Don't check for assigned device(s) when updating affinity
KVM: SVM: Don't check for assigned device(s) when activating AVIC
KVM: SVM: WARN if (de)activating guest mode in IOMMU fails
KVM: SVM: Process all IRTEs on affinity change even if one update
fails
KVM: SVM: WARN if updating IRTE GA fields in IOMMU fails
KVM: x86: Drop superfluous "has assigned device" check in
kvm_pi_update_irte()
KVM: x86: WARN if IRQ bypass isn't supported in kvm_pi_update_irte()
KVM: x86: WARN if IRQ bypass routing is updated without in-kernel
local APIC
KVM: SVM: WARN if ir_list is non-empty at vCPU free
KVM: x86: Decouple device assignment from IRQ bypass
KVM: VMX: WARN if VT-d Posted IRQs aren't possible when starting IRQ
bypass
KVM: SVM: Use vcpu_idx, not vcpu_id, for GA log tag/metadata
iommu/amd: WARN if KVM calls GA IRTE helpers without virtual APIC
support
KVM: SVM: Fold avic_set_pi_irte_mode() into its sole caller
KVM: SVM: Don't check vCPU's blocking status when toggling AVIC on/off
KVM: SVM: Consolidate IRTE update when toggling AVIC on/off
iommu/amd: KVM: SVM: Allow KVM to control need for GA log interrupts
KVM: SVM: Generate GA log IRQs only if the associated vCPUs is
blocking
arch/x86/include/asm/irq_remapping.h | 17 +-
arch/x86/include/asm/kvm-x86-ops.h | 2 +-
arch/x86/include/asm/kvm_host.h | 20 +-
arch/x86/include/asm/svm.h | 13 +-
arch/x86/kvm/irq.c | 140 ++++++
arch/x86/kvm/svm/avic.c | 702 ++++++++++++---------------
arch/x86/kvm/svm/svm.c | 4 +
arch/x86/kvm/svm/svm.h | 32 +-
arch/x86/kvm/trace.h | 19 +-
arch/x86/kvm/vmx/capabilities.h | 1 -
arch/x86/kvm/vmx/main.c | 2 +-
arch/x86/kvm/vmx/posted_intr.c | 140 ++----
arch/x86/kvm/vmx/posted_intr.h | 10 +-
arch/x86/kvm/vmx/vmx.c | 2 -
arch/x86/kvm/x86.c | 90 +---
drivers/iommu/amd/amd_iommu_types.h | 1 -
drivers/iommu/amd/iommu.c | 125 +++--
drivers/iommu/intel/irq_remapping.c | 10 +-
include/linux/amd-iommu.h | 25 +-
include/linux/kvm_host.h | 9 +-
include/linux/kvm_irqfd.h | 4 +
virt/kvm/eventfd.c | 22 +-
22 files changed, 672 insertions(+), 718 deletions(-)
base-commit: 3debd5461fba1dcb33e732b16153da0cf5d0c251
Return-Path: <linux-kernel+bounces-673577-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id CFFB241E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:13:09 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 55E4B3A6DB2
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:12:46 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 752201F2BBB;
Wed, 4 Jun 2025 17:13:04 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="uq8DhPJP"
Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8565532C85;
Wed, 4 Jun 2025 17:13:02 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749057182; cv=none; b=FZ36Fnm1lUdROX72c01cjxudFONGn69+81ApurqQE2hz/TauC+1ECYZqqgaNkRB/EV9XfTjalqeK9NAFpZRmfMUVqEPOdgRoWVybVj0XiOUt5/ST6CsLcGWHemXPrOf1KkRRL6C8LzUnPUqeqTGSofVAq0pVAUr35gKONmmS55k=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749057182; c=relaxed/simple;
bh=zenKx8uoevSrDIqPqROPm+UNn1VyyWz9jPqh6BVPk2U=;
h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type:
Content-Disposition; b=MerQt6KsiSFVze8Q/PoP4LGFa+MpWbY2vG9wYwo0qi/1ximcgSwSGgP3447DmCw1XqMYSqDNk/dDjyQ4zR7EJzUUoK3o0SKIB8CUrJVG4i1d1kuFgiWTn/AgNUfr4sdZYlUxgyRDIGRLqk0FTBJahmOPeJ0cJsdmwv6MXz5ojG8=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uq8DhPJP; arc=none smtp.client-ip=10.30.226.201
Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE56BC4CEE4;
Wed, 4 Jun 2025 17:13:01 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;
s=k20201202; t=1749057182;
bh=zenKx8uoevSrDIqPqROPm+UNn1VyyWz9jPqh6BVPk2U=;
h=Date:From:To:Cc:Subject:From;
b=uq8DhPJPlbkWclEEXa9bizuMHAqiYWoL8ow61EJFVQ2CZ934Zsi5GsvTdxnGgnIlO
j3zNM1GneNje8o1RcArDMzxWQjIGAJCBgH09k0ubY7vHQik4gENj9ShqVf78vdF+L4
iDofSO3zq6v7Wb36jwG+XDnLVwiqGwhiuiH0t3IpY4KXj0+vS1m2OmMl/IE/wGPmJu
TgjaITgNmpYSnUCdzjdhYOINkjYnZremmoLLde6NG5UInDyt2g5uesUx9Zuc+aYCXB
abjF+vQf+sS9qTc6q1pr8S5rr+U/td45Wj2UJ/lQqZD9WElkWtFGsWEniOt/x0C1Jd
NwTYbKjLfwBnw==
Date: Wed, 4 Jun 2025 12:13:00 -0500
From: Bjorn Helgaas <helgaas@xxxxxxxxxx>
To: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Cc: linux-pci@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
Rob Herring <robh@xxxxxxxxxx>,
Lorenzo Pieralisi <lorenzo.pieralisi@xxxxxxx>,
Manivannan Sadhasivam <mani@xxxxxxxxxx>,
Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= <kwilczynski@xxxxxxxxxx>
Subject: [GIT PULL] PCI changes for v6.16
Message-ID: <20250604171300.GA533412@bhelgaas>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
The following changes since commit fdc348121f2465897792f946715a5da7887e5f97:
irqdomain: pci: Switch to of_fwnode_handle() (2025-04-07 12:15:14 -0500)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git tags/pci-v6.16-changes
for you to fetch changes up to 3de914864c0d53b7c49aaa94e4ccda9e1dd271d7:
Merge branch 'pci/misc' (2025-06-04 10:50:45 -0500)
NB:
- Rebased this morning to add Mani's email address change and update
merge commit logs.
- These are changes since fdc348121f24 ("irqdomain: pci: Switch to
of_fwnode_handle()"), not the usual v6.15-rc1.
I applied fdc348121f24 to the PCI tree, but Thomas picked it up
via 6a08164de9fc ("Merge irq/cleanup fragments into irq/msi"), and
you already merged it via 44ed0f35df34 ("Merge tag
'irq-msi-2025-05-25' of
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip"). Confused
me a bit.
- You should see the following conflicts:
* MAINTAINERS between commit:
0747c136753e ("MAINTAINERS: Move Manivannan Sadhasivam as PCI Native host bridge and endpoint maintainer")
from upstream and commit:
308f8c7a626e ("MAINTAINERS: Update Manivannan Sadhasivam email address")
from the PCI tree.
* drivers/pci/controller/pcie-apple.c between commit:
5d627a9484ec ("PCI: apple: Convert to MSI parent infrastructure")
from upstream and commit:
3f1ccd6e85d7 ("PCI: apple: Abstract register offsets via a SoC-specific structure")
from the PCI tree.
* drivers/pci/pci.h between commit:
d5124a9957b2 ("PCI/MSI: Provide a sane mechanism for TPH")
and commits:
51f6aec99cb0 ("PCI: Remove hybrid devres nature from request functions")
8e9987485d9a ("PCI: Remove pcim_request_region_exclusive()")
dfc970ad6197 ("PCI: Remove function pcim_intx() prototype from pci.h")
from the PCI tree.
* drivers/gpu/drm/xe/Kconfig between commit:
e4931f8be347 ("drm/xe/vsec: fix CONFIG_INTEL_VSEC dependency")
from the drm-xe tree (not merged to upstream yet AFAICS) and commit:
8fe743b5eba0 ("PCI: Add CONFIG_MMU dependency")
from the PCI tree.
----------------------------------------------------------------
Enumeration:
- Print the actual delay time in pci_bridge_wait_for_secondary_bus()
instead of assuming it was 1000ms (Wilfred Mallawa)
- Revert 'iommu/amd: Prevent binding other PCI drivers to IOMMU PCI
devices', which broke resume from system sleep on AMD platforms and has
been fixed by other commits (Lukas Wunner)
Resource management:
- Remove mtip32xx use of pcim_iounmap_regions(), which is deprecated and
unnecessary (Philipp Stanner)
- Remove pcim_iounmap_regions() and pcim_request_region_exclusive() and
related flags since all uses have been removed (Philipp Stanner)
- Rework devres 'request' functions so they are no longer 'hybrid', i.e.,
their behavior no longer depends on whether pcim_enable_device or
pci_enable_device() was used, and remove related code (Philipp Stanner)
- Warn (not BUG()) about failure to assign optional resources (Ilpo
Järvinen)
Error handling:
- Log the DPC Error Source ID only when it's actually valid (when
ERR_FATAL or ERR_NONFATAL was received from a downstream device) and
decode into bus/device/function (Bjorn Helgaas)
- Determine AER log level once and save it so all related messages use
the same level (Karolina Stolarek)
- Use KERN_WARNING, not KERN_ERR, when logging PCIe Correctable Errors
(Karolina Stolarek)
- Ratelimit PCIe Correctable and Non-Fatal error logging, with sysfs
controls on interval and burst count, to avoid flooding logs and RCU
stall warnings (Jon Pan-Doh)
Power management:
- Increment PM usage counter when probing reset methods so we don't try
to read config space of a powered-off device (Alex Williamson)
- Set all devices to D0 during enumeration to ensure ACPI opregion is
connected via _REG (Mario Limonciello)
Power control:
- Rename pwrctrl Kconfig symbols from 'PWRCTL' to 'PWRCTRL' to match the
filename paths. Retain old deprecated symbols for compatibility,
except for the pwrctrl slot driver (PCI_PWRCTRL_SLOT) (Johan Hovold)
- When unregistering pwrctrl, cancel outstanding rescan work before
cleaning up data structures to avoid use-after-free issues (Brian
Norris)
Bandwidth control:
- Simplify link bandwidth controller by replacing the count of Link
Bandwidth Management Status (LBMS) events with a PCI_LINK_LBMS_SEEN
flag (Ilpo Järvinen)
- Update the Link Speed after retraining, since the Link Speed may have
changed (Ilpo Järvinen)
PCIe native device hotplug:
- Ignore Presence Detect Changed caused by DPC. pciehp already ignores
Link Down/Up events caused by DPC, but on slots using in-band presence
detect, DPC causes a spurious Presence Detect Changed event (Lukas
Wunner)
- Ignore Link Down/Up caused by Secondary Bus Reset. On hotplug ports
using in-band presence detect, the reset causes a Presence Detect
Changed event, which mistakenly caused teardown and re-enumeration of
the device. Drivers may need to annotate code that resets their device
(Lukas Wunner)
Virtualization:
- Add an ACS quirk for Loongson Root Ports that don't advertise ACS but
don't allow peer-to-peer transactions between Root Ports; the quirk
allows each Root Port to be in a separate IOMMU group (Huacai Chen)
Endpoint framework:
- For fixed-size BARs, retain both the actual size and the possibly
larger size allocated to accommodate iATU alignment requirements
(Jerome Brunet)
- Simplify ctrl/SPAD space allocation and avoid allocating more space
than needed (Jerome Brunet)
- Correct MSI-X PBA offset calculations for DesignWare and Cadence
endpoint controllers (Niklas Cassel)
- Align the return value (number of interrupts) encoding for
pci_epc_get_msi()/pci_epc_ops::get_msi() and
pci_epc_get_msix()/pci_epc_ops::get_msix() (Niklas Cassel)
- Align the nr_irqs parameter encoding for
pci_epc_set_msi()/pci_epc_ops::set_msi() and
pci_epc_set_msix()/pci_epc_ops::set_msix() (Niklas Cassel)
Common host controller library:
- Convert pci-host-common to a library so platforms that don't need
native host controller drivers don't need to include these helper
functions (Manivannan Sadhasivam)
Apple PCIe controller driver:
- Extract ECAM bridge creation helper from pci_host_common_probe() to
separate driver-specific things like MSI from PCI things (Marc Zyngier)
- Dynamically allocate RID-to_SID bitmap to prepare for SoCs with varying
capabilities (Marc Zyngier)
- Skip ports disabled in DT when setting up ports (Janne Grunau)
- Add t6020 compatible string (Alyssa Rosenzweig)
- Add T602x PCIe support (Hector Martin)
- Directly set/clear INTx mask bits because T602x dropped the accessors
that could do this without locking (Marc Zyngier)
- Move port PHY registers to their own reg items to accommodate T602x,
which moves them around; retain default offsets for existing DTs that
lack phy%d entries with the reg offsets (Hector Martin)
- Stop polling for core refclk, which doesn't work on T602x and the
bootloader has already done anyway (Hector Martin)
- Use gpiod_set_value_cansleep() when asserting PERST# in probe because
we're allowed to sleep there (Hector Martin)
Cadence PCIe controller driver:
- Drop a runtime PM 'put' to resolve a runtime atomic count underflow
(Hans Zhang)
- Make the cadence core buildable as a module (Kishon Vijay Abraham I)
- Add cdns_pcie_host_disable() and cdns_pcie_ep_disable() for use by
loadable drivers when they are removed (Siddharth Vadapalli)
Freescale i.MX6 PCIe controller driver:
- Apply link training workaround only on IMX6Q, IMX6SX, IMX6SP (Richard
Zhu)
- Remove redundant dw_pcie_wait_for_link() from imx_pcie_start_link();
since the DWC core does this, imx6 only needs it when retraining for a
faster link speed (Richard Zhu)
- Toggle i.MX95 core reset to align with PHY powerup (Richard Zhu)
- Set SYS_AUX_PWR_DET to work around i.MX95 ERR051624 erratum: in some
cases, the controller can't exit 'L23 Ready' through Beacon or PERST#
deassertion (Richard Zhu)
- Clear GEN3_ZRXDC_NONCOMPL to work around i.MX95 ERR051586 erratum:
controller can't meet 2.5 GT/s ZRX-DC timing when operating at 8 GT/s,
causing timeouts in L1 (Richard Zhu)
- Wait for i.MX95 PLL lock before enabling controller (Richard Zhu)
- Save/restore i.MX95 LUT for suspend/resume (Richard Zhu)
Mobiveil PCIe controller driver:
- Return bool (not int) for link-up check in mobiveil_pab_ops.link_up()
and layerscape-gen4, mobiveil (Hans Zhang)
NVIDIA Tegra194 PCIe controller driver:
- Create debugfs directory for 'aspm_state_cnt' only when CONFIG_PCIEASPM
is enabled, since there are no other entries (Hans Zhang)
Qualcomm PCIe controller driver:
- Add OF support for parsing DT 'eq-presets-<N>gts' property for lane
equalization presets (Krishna Chaitanya Chundru)
- Read Maximum Link Width from the Link Capabilities register if DT lacks
'num-lanes' property (Krishna Chaitanya Chundru)
- Add Physical Layer 64 GT/s Capability ID and register offsets for 8,
32, and 64 GT/s lane equalization registers (Krishna Chaitanya Chundru)
- Add generic dwc support for configuring lane equalization presets
(Krishna Chaitanya Chundru)
- Add DT and driver support for PCIe on IPQ5018 SoC (Nitheesh Sekar)
Renesas R-Car PCIe controller driver:
- Describe endpoint BAR 4 as being fixed size (Jerome Brunet)
- Document how to obtain R-Car V4H (r8a779g0) controller firmware
(Yoshihiro Shimoda)
Rockchip PCIe controller driver:
- Reorder rockchip_pci_core_rsts because reset_control_bulk_deassert()
deasserts in reverse order, to fix a link training regression (Jensen
Huang)
- Mark RK3399 as being capable of raising INTx interrupts (Niklas Cassel)
Rockchip DesignWare PCIe controller driver:
- Check only PCIE_LINKUP, not LTSSM status, to determine whether the link
is up (Shawn Lin)
- Increase N_FTS (used in L0s->L0 transitions) and enable ASPM L0s for
Root Complex and Endpoint modes (Shawn Lin)
- Hide the broken ATS Capability in rockchip_pcie_ep_init() instead of
rockchip_pcie_ep_pre_init() so it stays hidden after PERST# resets
non-sticky registers (Shawn Lin)
- Call phy_power_off() before phy_exit() in rockchip_pcie_phy_deinit()
(Diederik de Haas)
Synopsys DesignWare PCIe controller driver:
- Set PORT_LOGIC_LINK_WIDTH to one lane to make initial link training
more robust; this will not affect the intended link width if all lanes
are functional (Wenbin Yao)
- Return bool (not int) for link-up check in dw_pcie_ops.link_up() and
armada8k, dra7xx, dw-rockchip, exynos, histb, keembay, keystone, kirin,
meson, qcom, qcom-ep, rcar_gen4, spear13xx, tegra194, uniphier,
visconti (Hans Zhang)
- Add debugfs support for exposing DWC device-specific PTM context
(Manivannan Sadhasivam)
TI J721E PCIe driver:
- Make j721e buildable as a loadable and removable module (Siddharth
Vadapalli)
- Fix j721e host/endpoint dependencies that result in link failures in
some configs (Arnd Bergmann)
Device tree bindings:
- Add qcom DT binding for 'global' interrupt (PCIe controller and
link-specific events) for ipq8074, ipq8074-gen3, ipq6018, sa8775p,
sc7280, sc8180x sdm845, sm8150, sm8250, sm8350 (Manivannan Sadhasivam)
- Add qcom DT binding for 8 MSI SPI interrupts for msm8998, ipq8074,
ipq8074-gen3, ipq6018 (Manivannan Sadhasivam)
- Add dw rockchip DT binding for rk3576 and rk3562 (Kever Yang)
- Correct indentation and style of examples in brcm,stb-pcie,
cdns,cdns-pcie-ep, intel,keembay-pcie-ep, intel,keembay-pcie,
microchip,pcie-host, rcar-pci-ep, rcar-pci-host, xilinx-versal-cpm
(Krzysztof Kozlowski)
- Convert Marvell EBU (dove, kirkwood, armada-370, armada-xp) and
armada8k from text to schema DT bindings (Rob Herring)
- Remove obsolete .txt DT bindings for content that has been moved to
schemas (Rob Herring)
- Add qcom DT binding for MHI registers in IPQ5332, IPQ6018, IPQ8074 and
IPQ9574 (Varadarajan Narayanan)
- Convert v3,v360epc-pci from text to DT schema binding (Rob Herring)
- Change microchip,pcie-host DT binding to be 'dma-noncoherent' since
PolarFire may be configured that way (Conor Dooley)
Miscellaneous:
- Drop 'pci' suffix from intel_mid_pci.c filename to match similar files
(Andy Shevchenko)
- All platforms with PCI have an MMU, so add PCI Kconfig dependency on
MMU to simplify build testing and avoid inadvertent build regressions
(Arnd Bergmann)
- Update Krzysztof Wilczyński's email address in MAINTAINERS (Krzysztof
Wilczyński)
- Update Manivannan Sadhasivam's email address in MAINTAINERS (Manivannan
Sadhasivam)
----------------------------------------------------------------
Alex Williamson (2):
PM: runtime: Define pm_runtime_put cleanup helper
PCI: Increment PM usage counter when probing reset methods
Alyssa Rosenzweig (1):
dt-bindings: pci: apple,pcie: Add t6020 compatible string
Andy Shevchenko (1):
x86/PCI: Drop 'pci' suffix from intel_mid_pci.c
Arnd Bergmann (2):
PCI: Add CONFIG_MMU dependency
PCI: j721e: Fix host/endpoint dependencies
Bjorn Helgaas (40):
PCI/DPC: Initialize aer_err_info before using it
PCI/DPC: Log Error Source ID only when valid
PCI/AER: Factor COR/UNCOR error handling out from aer_isr_one_error()
PCI/AER: Consolidate Error Source ID logging in aer_isr_one_error_type()
PCI/AER: Extract bus/dev/fn in aer_print_port_info() with PCI_BUS_NUM(), etc
PCI/AER: Move aer_print_source() earlier in file
PCI/AER: Initialize aer_err_info before using it
PCI/AER: Simplify pci_print_aer()
PCI/AER: Update statistics before ratelimiting
PCI/AER: Trace error event before ratelimiting
PCI/ERR: Add printk level to pcie_print_tlp_log()
PCI/AER: Convert aer_get_device_error_info(), aer_print_error() to index
PCI/AER: Simplify add_error_device()
Merge branch 'pci/aer'
Merge branch 'pci/bwctrl'
Merge branch 'pci/devres'
Merge branch 'pci/enumeration'
Merge branch 'pci/hotplug'
Merge branch 'pci/irq'
Merge branch 'pci/pci-acpi'
Merge branch 'pci/pm'
Merge branch 'pci/pwrctrl'
Merge branch 'pci/reset'
Merge branch 'pci/virtualization'
Merge branch 'pci/endpoint'
Merge branch 'pci/controller/apple'
Merge branch 'pci/controller/cadence'
Merge branch 'pci/controller/dw-rockchip'
Merge branch 'pci/controller/dwc-ep'
Merge branch 'pci/controller/dwc'
Merge branch 'pci/controller/imx6'
Merge branch 'pci/controller/mobiveil'
Merge branch 'pci/controller/mvebu'
Merge branch 'pci/controller/qcom'
Merge branch 'pci/controller/rcar-gen4'
Merge branch 'pci/controller/rockchip'
Merge branch 'pci/controller/tegra194'
Merge branch 'pci/ptm-debugfs'
Merge branch 'pci/dt-bindings'
Merge branch 'pci/misc'
Brian Norris (1):
PCI/pwrctrl: Cancel outstanding rescan work when unregistering
Chen Ni (1):
PCI: ls-gen4: Use to_delayed_work()
Conor Dooley (1):
dt-bindings: PCI: microchip,pcie-host: Fix DMA coherency property
Diederik de Haas (1):
PCI: dw-rockchip: Fix PHY function call sequence in rockchip_pcie_phy_deinit()
Hans Zhang (10):
PCI: cadence: Fix runtime atomic count underflow
PCI: dw-rockchip: Remove unused PCIE_CLIENT_GENERAL_DEBUG definition
PCI: dw-rockchip: Reorganize register and bitfield definitions
PCI: dw-rockchip: Use rockchip_pcie_link_up() to check link up instead of open coding
PCI: tegra194: Create debugfs directory only when CONFIG_PCIEASPM is enabled
PCI: dwc: ep: Use FIELD_GET() where applicable
PCI: dwc: Return bool from link up check
PCI: mobiveil: Return bool from link up check
PCI: cadence: Simplify J721e link status check
PCI: cadence: Remove duplicate message code definitions
Hector Martin (6):
PCI: apple: Fix missing OF node reference in apple_pcie_setup_port
PCI: apple: Move port PHY registers to their own reg items
PCI: apple: Drop poll for CORE_RC_PHYIF_STAT_REFCLK
PCI: apple: Use gpiod_set_value_cansleep in probe flow
PCI: apple: Abstract register offsets via a SoC-specific structure
PCI: apple: Add T602x PCIe support
Heiner Kallweit (1):
PCI: Remove pci_fixup_cardbus()
Huacai Chen (1):
PCI: Add ACS quirk for Loongson PCIe
Ilpo Järvinen (7):
PCI: Use PCI_STD_NUM_BARS instead of 6
PCI: Fix lock symmetry in pci_slot_unlock()
PCI/bwctrl: Replace lbms_count with PCI_LINK_LBMS_SEEN flag
PCI: Update Link Speed after retraining
PCI: Remove unused pci_printk()
PCI: WARN (not BUG()) when we fail to assign optional resources
PCI: Remove unnecessary linesplit in __pci_setup_bridge()
Janne Grunau (1):
PCI: apple: Set only available ports up
Jensen Huang (1):
PCI: rockchip: Fix order of rockchip_pci_core_rsts
Jerome Brunet (3):
PCI: rcar-gen4: set ep BAR4 fixed size
PCI: endpoint: Retain fixed-size BAR size as well as aligned size
PCI: endpoint: pci-epf-vntb: Simplify ctrl/SPAD space allocation
Johan Hovold (4):
PCI/pwrctrl: Rename pwrctrl Kconfig symbols and slot module
wifi: ath11k: switch to PCI_PWRCTRL_PWRSEQ
wifi: ath12k: switch to PCI_PWRCTRL_PWRSEQ
arm64: Kconfig: switch to HAVE_PWRCTRL
Jon Pan-Doh (4):
PCI/AER: Rename aer_print_port_info() to aer_print_source()
PCI/AER: Ratelimit correctable and non-fatal error logging
PCI/AER: Add ratelimits to PCI AER Documentation
PCI/AER: Add sysfs attributes for log ratelimits
Karolina Stolarek (3):
PCI/AER: Check log level once and remember it
PCI/AER: Reduce pci_print_aer() correctable error level to KERN_WARNING
PCI/AER: Rename struct aer_stats to aer_info
Kever Yang (2):
dt-bindings: PCI: dw: rockchip: Add rk3576 support
dt-bindings: PCI: dwc: rockchip: Add rk3562 support
Kishon Vijay Abraham I (1):
PCI: cadence: Add support to build pcie-cadence library as a kernel module
Krishna Chaitanya Chundru (4):
PCI: of: Add of_pci_get_equalization_presets() API
PCI: dwc: Update pci->num_lanes to maximum supported link width
PCI: Add lane equalization register offsets
PCI: dwc: Add support for configuring lane equalization presets
Krzysztof Kozlowski (2):
dt-bindings: PCI: Correct indentation and style in DTS example
dt-bindings: PCI: sifive,fu740-pcie: Fix include placement in DTS example
Krzysztof Wilczyński (1):
MAINTAINERS: Update Krzysztof Wilczyński email address
Lukas Wunner (5):
PCI: pciehp: Ignore Presence Detect Changed caused by DPC
PCI: pciehp: Ignore Link Down/Up caused by Secondary Bus Reset
PCI: hotplug: Drop superfluous #include directives
Revert "iommu/amd: Prevent binding other PCI drivers to IOMMU PCI devices"
PCI: Limit visibility of match_driver flag to PCI core
Manivannan Sadhasivam (17):
dt-bindings: PCI: qcom,pcie-sm8150: Add 'global' interrupt
dt-bindings: PCI: qcom,pcie-sm8250: Add 'global' interrupt
dt-bindings: PCI: qcom,pcie-sm8350: Add 'global' interrupt
dt-bindings: PCI: qcom,pcie-sa8775p: Add 'global' interrupt
dt-bindings: PCI: qcom,pcie-sc7280: Add 'global' interrupt
dt-bindings: PCI: qcom: Add 'global' interrupt for SDM845 SoC
dt-bindings: PCI: qcom: Allow MSM8998 to use 8 MSI and one 'global' interrupt
dt-bindings: PCI: qcom: Allow IPQ8074 to use 8 MSI and one 'global' interrupt
dt-bindings: PCI: qcom: Allow IPQ6018 to use 8 MSI and one 'global' interrupt
dt-bindings: PCI: qcom,pcie-sc8180x: Add 'global' interrupt
PCI: Add debugfs support for exposing PTM context
PCI: dwc: Pass DWC PCIe mode to dwc_pcie_debugfs_init()
PCI: dwc: Add debugfs support for PTM context
PCI: qcom-ep: Mask PTM_UPDATING interrupt
PCI/ERR: Remove misleading TODO regarding kernel panic
PCI: host-common: Convert to library for host controller drivers
MAINTAINERS: Update Manivannan Sadhasivam email address
Marc Zyngier (5):
PCI: host-generic: Extract an ECAM bridge creation helper from pci_host_common_probe()
PCI: ecam: Allow cfg->priv to be pre-populated from the root port device
PCI: apple: Move over to standalone probing
PCI: apple: Dynamically allocate RID-to_SID bitmap
PCI: apple: Move away from INTMSK{SET,CLR} for INTx and private interrupts
Mario Limonciello (1):
PCI: Explicitly put devices into D0 when initializing
Niklas Cassel (10):
PCI: rockchip-ep: Mark RK3399 as intx_capable
PCI: dwc: ep: Fix errno typo
PCI: dwc: ep: Correct PBA offset in .set_msix() callback
PCI: cadence-ep: Correct PBA offset in .set_msix() callback
PCI: endpoint: Align pci_epc_get_msi(), pci_epc_ops::get_msi() return value encoding
PCI: endpoint: Align pci_epc_get_msix(), pci_epc_ops::get_msix() return value encoding
PCI: endpoint: Align pci_epc_set_msi(), pci_epc_ops::set_msi() nr_irqs encoding
PCI: endpoint: Align pci_epc_set_msix(), pci_epc_ops::set_msix() nr_irqs encoding
PCI: dw-rockchip: Replace PERST# sleep time with proper macro
PCI: qcom: Replace PERST# sleep time with proper macro
Nitheesh Sekar (2):
dt-bindings: PCI: qcom: Add IPQ5018 SoC
PCI: qcom: Add support for IPQ5018
Philipp Stanner (9):
mtip32xx: Remove unnecessary pcim_iounmap_regions() calls
PCI: Remove pcim_iounmap_regions()
PCI: Remove hybrid devres nature from request functions
Documentation/driver-api: Update pcim_enable_device()
PCI: Remove pcim_request_region_exclusive()
PCI: Remove exclusive requests flags from _pcim_request_region()
PCI: Remove redundant set of request functions
PCI: Remove hybrid-devres usage warnings from kernel-doc
PCI: Remove function pcim_intx() prototype from pci.h
Richard Zhu (7):
PCI: imx6: Skip link up workaround for newer platforms
PCI: imx6: Call dw_pcie_wait_for_link() from start_link() callback only when required
PCI: imx6: Toggle the core reset for i.MX95 PCIe
PCI: imx6: Add workaround for errata ERR051624
PCI: imx6: Add workaround for errata ERR051586
PCI: imx6: Add PLL lock check for i.MX95 SoC
PCI: imx6: Save and restore the LUT setting during suspend/resume for i.MX95 SoC
Rick Wertenbroek (1):
Documentation: Fix path for NVMe PCI endpoint target driver
Rob Herring (Arm) (5):
PCI: mvebu: Use for_each_of_range() iterator for parsing "ranges"
dt-bindings: PCI: Convert Marvell EBU to schema
dt-bindings: PCI: Convert marvell,armada8k-pcie to schema
dt-bindings: PCI: Remove obsolete .txt docs
dt-bindings: PCI: Convert v3,v360epc-pci to DT schema
Shawn Lin (3):
PCI: dw-rockchip: Remove PCIE_L0S_ENTRY check from rockchip_pcie_link_up()
PCI: dw-rockchip: Enable ASPM L0s capability for both RC and EP modes
PCI: dw-rockchip: Move rockchip_pcie_ep_hide_broken_ats_cap_rk3588() to dw_pcie_ep_ops::init()
Siddharth Vadapalli (3):
PCI: cadence-host: Introduce cdns_pcie_host_disable() helper for cleanup
PCI: cadence-ep: Introduce cdns_pcie_ep_disable() helper for cleanup
PCI: j721e: Add support to build as a loadable module
Varadarajan Narayanan (1):
dt-bindings: PCI: qcom: Add MHI registers for IPQ9574
Wenbin Yao (1):
PCI: dwc: Make link training more robust by setting PORT_LOGIC_LINK_WIDTH to one lane
Wilfred Mallawa (1):
PCI: Print the actual delay time in pci_bridge_wait_for_secondary_bus()
Yoshihiro Shimoda (1):
PCI: rcar-gen4: Document how to obtain platform firmware
Zhe Qiao (1):
PCI/ACPI: Fix allocated memory release on error in pci_acpi_scan_root()
.mailmap | 3 +
Documentation/ABI/testing/debugfs-pcie-ptm | 70 ++++
...devices-aer_stats => sysfs-bus-pci-devices-aer} | 44 +++
Documentation/PCI/controller/index.rst | 10 +
.../PCI/controller/rcar-pcie-firmware.rst | 32 ++
Documentation/PCI/endpoint/pci-nvme-function.rst | 2 +-
Documentation/PCI/index.rst | 1 +
Documentation/PCI/pcieaer-howto.rst | 17 +-
.../devicetree/bindings/pci/apple,pcie.yaml | 33 +-
.../devicetree/bindings/pci/brcm,stb-pcie.yaml | 81 ++--
.../devicetree/bindings/pci/cdns,cdns-pcie-ep.yaml | 16 +-
.../bindings/pci/intel,keembay-pcie-ep.yaml | 26 +-
.../bindings/pci/intel,keembay-pcie.yaml | 38 +-
.../bindings/pci/marvell,armada8k-pcie.yaml | 100 +++++
.../bindings/pci/marvell,kirkwood-pcie.yaml | 277 +++++++++++++
.../bindings/pci/microchip,pcie-host.yaml | 56 +--
.../devicetree/bindings/pci/mvebu-pci.txt | 310 ---------------
.../bindings/pci/nvidia,tegra194-pcie-ep.yaml | 2 +-
.../devicetree/bindings/pci/pci-armada8k.txt | 48 ---
.../devicetree/bindings/pci/pci-iommu.txt | 171 --------
Documentation/devicetree/bindings/pci/pci-msi.txt | 220 -----------
Documentation/devicetree/bindings/pci/pci.txt | 84 ----
.../devicetree/bindings/pci/qcom,pcie-sa8775p.yaml | 10 +-
.../devicetree/bindings/pci/qcom,pcie-sc7280.yaml | 9 +-
.../devicetree/bindings/pci/qcom,pcie-sc8180x.yaml | 10 +-
.../devicetree/bindings/pci/qcom,pcie-sm8150.yaml | 9 +-
.../devicetree/bindings/pci/qcom,pcie-sm8250.yaml | 9 +-
.../devicetree/bindings/pci/qcom,pcie-sm8350.yaml | 9 +-
.../devicetree/bindings/pci/qcom,pcie.yaml | 65 ++-
.../devicetree/bindings/pci/rcar-pci-ep.yaml | 34 +-
.../devicetree/bindings/pci/rcar-pci-host.yaml | 46 +--
.../bindings/pci/rockchip-dw-pcie-common.yaml | 10 +-
.../devicetree/bindings/pci/rockchip-dw-pcie.yaml | 60 ++-
.../devicetree/bindings/pci/sifive,fu740-pcie.yaml | 2 +-
.../bindings/pci/snps,dw-pcie-common.yaml | 3 +-
.../devicetree/bindings/pci/snps,dw-pcie.yaml | 4 +-
.../devicetree/bindings/pci/v3,v360epc-pci.yaml | 100 +++++
.../devicetree/bindings/pci/v3-v360epc-pci.txt | 76 ----
.../devicetree/bindings/pci/xilinx-versal-cpm.yaml | 112 +++---
Documentation/driver-api/driver-model/devres.rst | 3 +-
MAINTAINERS | 50 +--
arch/arm64/Kconfig.platforms | 2 +-
arch/x86/pci/Makefile | 6 +-
arch/x86/pci/{intel_mid_pci.c => intel_mid.c} | 0
drivers/accel/qaic/Kconfig | 1 -
drivers/block/mtip32xx/mtip32xx.c | 7 +-
drivers/firewire/Kconfig | 2 +-
drivers/gpu/drm/Kconfig | 2 +-
drivers/gpu/drm/amd/amdgpu/Kconfig | 3 +-
drivers/gpu/drm/ast/Kconfig | 2 +-
drivers/gpu/drm/gma500/Kconfig | 2 +-
drivers/gpu/drm/hisilicon/hibmc/Kconfig | 1 -
drivers/gpu/drm/loongson/Kconfig | 2 +-
drivers/gpu/drm/mgag200/Kconfig | 2 +-
drivers/gpu/drm/nouveau/Kconfig | 3 +-
drivers/gpu/drm/qxl/Kconfig | 2 +-
drivers/gpu/drm/radeon/Kconfig | 2 +-
drivers/gpu/drm/tiny/Kconfig | 2 +-
drivers/gpu/drm/vmwgfx/Kconfig | 2 +-
drivers/gpu/drm/xe/Kconfig | 2 +-
drivers/iommu/amd/init.c | 3 -
drivers/net/ethernet/broadcom/Kconfig | 1 -
drivers/net/wireless/ath/ath11k/Kconfig | 2 +-
drivers/net/wireless/ath/ath12k/Kconfig | 2 +-
drivers/pci/Kconfig | 1 +
drivers/pci/bus.c | 4 +-
drivers/pci/controller/Kconfig | 8 +-
drivers/pci/controller/cadence/Kconfig | 16 +-
drivers/pci/controller/cadence/pci-j721e.c | 40 +-
drivers/pci/controller/cadence/pcie-cadence-ep.c | 36 +-
drivers/pci/controller/cadence/pcie-cadence-host.c | 124 +++++-
drivers/pci/controller/cadence/pcie-cadence.c | 12 +
drivers/pci/controller/cadence/pcie-cadence.h | 25 +-
drivers/pci/controller/dwc/pci-dra7xx.c | 4 +-
drivers/pci/controller/dwc/pci-exynos.c | 4 +-
drivers/pci/controller/dwc/pci-imx6.c | 213 ++++++++--
drivers/pci/controller/dwc/pci-keystone.c | 5 +-
drivers/pci/controller/dwc/pci-meson.c | 6 +-
drivers/pci/controller/dwc/pcie-armada8k.c | 6 +-
.../pci/controller/dwc/pcie-designware-debugfs.c | 252 +++++++++++-
drivers/pci/controller/dwc/pcie-designware-ep.c | 30 +-
drivers/pci/controller/dwc/pcie-designware-host.c | 81 +++-
drivers/pci/controller/dwc/pcie-designware.c | 29 +-
drivers/pci/controller/dwc/pcie-designware.h | 32 +-
drivers/pci/controller/dwc/pcie-dw-rockchip.c | 102 +++--
drivers/pci/controller/dwc/pcie-hisi.c | 1 +
drivers/pci/controller/dwc/pcie-histb.c | 9 +-
drivers/pci/controller/dwc/pcie-keembay.c | 2 +-
drivers/pci/controller/dwc/pcie-kirin.c | 7 +-
drivers/pci/controller/dwc/pcie-qcom-ep.c | 10 +-
drivers/pci/controller/dwc/pcie-qcom.c | 7 +-
drivers/pci/controller/dwc/pcie-rcar-gen4.c | 3 +-
drivers/pci/controller/dwc/pcie-spear13xx.c | 7 +-
drivers/pci/controller/dwc/pcie-tegra194.c | 23 +-
drivers/pci/controller/dwc/pcie-uniphier.c | 2 +-
drivers/pci/controller/dwc/pcie-visconti.c | 4 +-
.../pci/controller/mobiveil/pcie-layerscape-gen4.c | 12 +-
drivers/pci/controller/mobiveil/pcie-mobiveil.h | 2 +-
drivers/pci/controller/pci-host-common.c | 30 +-
drivers/pci/controller/pci-host-common.h | 20 +
drivers/pci/controller/pci-host-generic.c | 2 +
drivers/pci/controller/pci-mvebu.c | 26 +-
drivers/pci/controller/pci-thunder-ecam.c | 2 +
drivers/pci/controller/pci-thunder-pem.c | 1 +
drivers/pci/controller/pcie-apple.c | 247 ++++++++----
drivers/pci/controller/pcie-rcar-ep.c | 8 +-
drivers/pci/controller/pcie-rockchip-ep.c | 10 +-
drivers/pci/controller/pcie-rockchip.h | 7 +-
drivers/pci/controller/plda/pcie-microchip-host.c | 1 +
drivers/pci/devres.c | 225 ++---------
drivers/pci/ecam.c | 2 +
drivers/pci/endpoint/functions/pci-epf-vntb.c | 26 +-
drivers/pci/endpoint/pci-epc-core.c | 26 +-
drivers/pci/endpoint/pci-epf-core.c | 22 +-
drivers/pci/hotplug/pci_hotplug_core.c | 73 +++-
drivers/pci/hotplug/pciehp.h | 1 +
drivers/pci/hotplug/pciehp_core.c | 29 --
drivers/pci/hotplug/pciehp_ctrl.c | 2 +-
drivers/pci/hotplug/pciehp_hpc.c | 78 ++--
drivers/pci/iomap.c | 16 -
drivers/pci/of.c | 44 +++
drivers/pci/pci-acpi.c | 23 +-
drivers/pci/pci-driver.c | 8 +-
drivers/pci/pci-sysfs.c | 4 +
drivers/pci/pci.c | 88 ++---
drivers/pci/pci.h | 75 +++-
drivers/pci/pcie/aer.c | 438 +++++++++++++++------
drivers/pci/pcie/bwctrl.c | 86 +---
drivers/pci/pcie/dpc.c | 73 ++--
drivers/pci/pcie/err.c | 1 -
drivers/pci/pcie/ptm.c | 300 ++++++++++++++
drivers/pci/pcie/tlp.c | 6 +-
drivers/pci/probe.c | 3 +-
drivers/pci/pwrctrl/Kconfig | 22 +-
drivers/pci/pwrctrl/Makefile | 8 +-
drivers/pci/pwrctrl/core.c | 2 +
drivers/pci/quirks.c | 33 +-
drivers/pci/setup-bus.c | 16 +-
drivers/pcmcia/cardbus.c | 1 -
drivers/scsi/bnx2fc/Kconfig | 1 -
drivers/scsi/bnx2i/Kconfig | 1 -
drivers/vfio/pci/Kconfig | 2 +-
include/linux/pci-ecam.h | 6 -
include/linux/pci-epc.h | 11 +-
include/linux/pci-epf.h | 3 +
include/linux/pci.h | 64 ++-
include/linux/pm_runtime.h | 2 +
include/uapi/linux/pci_regs.h | 12 +-
148 files changed, 3401 insertions(+), 2220 deletions(-)
create mode 100644 Documentation/ABI/testing/debugfs-pcie-ptm
rename Documentation/ABI/testing/{sysfs-bus-pci-devices-aer_stats => sysfs-bus-pci-devices-aer} (72%)
create mode 100644 Documentation/PCI/controller/index.rst
create mode 100644 Documentation/PCI/controller/rcar-pcie-firmware.rst
create mode 100644 Documentation/devicetree/bindings/pci/marvell,armada8k-pcie.yaml
create mode 100644 Documentation/devicetree/bindings/pci/marvell,kirkwood-pcie.yaml
delete mode 100644 Documentation/devicetree/bindings/pci/mvebu-pci.txt
delete mode 100644 Documentation/devicetree/bindings/pci/pci-armada8k.txt
delete mode 100644 Documentation/devicetree/bindings/pci/pci-iommu.txt
delete mode 100644 Documentation/devicetree/bindings/pci/pci-msi.txt
delete mode 100644 Documentation/devicetree/bindings/pci/pci.txt
create mode 100644 Documentation/devicetree/bindings/pci/v3,v360epc-pci.yaml
delete mode 100644 Documentation/devicetree/bindings/pci/v3-v360epc-pci.txt
rename arch/x86/pci/{intel_mid_pci.c => intel_mid.c} (100%)
create mode 100644 drivers/pci/controller/pci-host-common.h
Return-Path: <linux-kernel+bounces-673579-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 89F0941E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:16:43 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 0811318926D3
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:16:55 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 43CB01F582C;
Wed, 4 Jun 2025 17:16:19 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="O/zuGXmY"
Received: from mail-pj1-f45.google.com (mail-pj1-f45.google.com [209.85.216.45])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 072311F3B9E
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:16:16 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.45
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749057378; cv=none; b=BEkjkXqt8wEVlp/yjyC/iUpdRB9wceT/BLtUD90XZyvJvDi/a4A/l5bTzgtyuOiqHdDirk2HxfE5xYIC2g1NQnxLv9w7lyfIQDRkYWtWA0FDwD03JaFA2jMahW7mVJqLscE5s+9m2St8uhKhUBOkKT6nGwXO64CIqCqRmff981k=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749057378; c=relaxed/simple;
bh=uG4QPZVjl5gDK86VnIwXxVnXWRkca87HCRZHSL9+/F4=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=Sen27qreuM0TVi2rSxHPH5Sy5VZ3mOKWaxXkrM5efBBTipDhDhImmVSOuHIiV0mUwOG3yZUJsNPzMwD0RhyADWb/T71tX6JvshzM+jUAjXTeKatv2fIlecx23Qja5Nc1Tgf8tew+xeaLwgUsUucAS8NfoiWDTTpLAauwtnlN/Uw=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=O/zuGXmY; arc=none smtp.client-ip=209.85.216.45
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com
Received: by mail-pj1-f45.google.com with SMTP id 98e67ed59e1d1-306b6ae4fb2so92741a91.3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 10:16:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1749057376; x=1749662176; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=7X54j1g90psIDWU5pz15Bdf5E+ehG4+aRIqU9eaNKxE=;
b=O/zuGXmYL86lTvTOiAnuQF4/gKf0p+Y98HAYr+0xwH199VVC9yyaV2lE62tA+R6Cs8
bqIwEQJOSE0tg5+W5dWjGqjCkrDgvnRQ/DKHs0zGLlLiSH8gKCTUHEBqY0NFWnWzMMWu
k11Axp1YFpNsduAZ1/AuTKklZqwhWkOmuVmqaFfOUOnd9fN5NPrDk1EbXglzuecFxr5O
ZRyuCj9/g5kjhApp9SjHa/B8sb3tZP5SSZt5ZCtf5n4BvOAebZeDzr1rOCStqoj2EsXL
UjkcT3DAYadd2YUkwU6X2wBKYg2OfJfaR3OlwRQGugSo2BSQqYEuL1J54bzi49xkAFP2
eerg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749057376; x=1749662176;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=7X54j1g90psIDWU5pz15Bdf5E+ehG4+aRIqU9eaNKxE=;
b=WOTaxB+ZUlgiyGgq3Rh+E51IakNCrHUA6xjZ/Z+LEBU5g8Rv55ZzPNRWhNmztEakn5
Jsoh2g9jeGxvEGg3/OBoTaBO9NpdOn0bGg+jfbSK6i8xOQY/MlxztkknXgUFUHe8KLz8
nDooPatC0UYgGqQs4IZU2AquIJ0iNKUJuI7JFPVJkZCQeRoG4j26jvI5QlrP1LL4al5w
aHfeDGnQ/swbSpCmlPlJwG/rLL6bp+XgEixkS6UpwFzCMtuRHeN0zZ2ZKfkIp+ZjLfuN
IgOhU2SVWLaD4LKeNzvZp5ecAWWVlYsnD7I6Mlr6fjwiHBb1uP38vfYFUcVlq9LqNmBZ
5H5w==
X-Gm-Message-State: AOJu0YxMfPYIpkJnhezcWlmXVzwHxxp1tTm0tH51NshNtfPYsTF2Ch8t
TsO6F5sC62M+P/V7jj65oK/jeX+4/rC6VAN4wO/2/j0lgGtHdFJZ0aBxn6tiLXg73As=
X-Gm-Gg: ASbGncvDPfAkFn6b/Y351dS/tuNgoTv1WUQmnnE85dL90n86J6LTTT6MzuNK/4l5Ies
npLNFdmm0jkG3onCKiIlNq2VWXxS7rsPblZXhga6e5y5JOugj2Ve9zioHKeP31IadquDhDyepTT
c1mGj3Dlwo25QS23Wbhv98R2ld++xM7fVm2J/z3DAbixUvSYh/bIRXxyfk7s3VE70c3bjKR39eU
k1s+1/hsg9Q31GEAn02IVo1FLv34MxAsZ61EWmREexJV/z2loUM/pC5cP/gbc+TAbmtoJhWELw0
E/83ENfIqh8CgEGvURyFbty9pETBjqz4CCdfBgGpaKdsKzS0Dg6HpsFKCkW6UMNj7Wg7c9wd
X-Google-Smtp-Source: AGHT+IHxPqIk1owtxlyp5LegtYf4MjOLT64nMI3kVgiGthtvO0lFym3JvM1rzmQWvRKFQF65n5vIwg==
X-Received: by 2002:a17:90b:28c7:b0:312:e731:5a6b with SMTP id 98e67ed59e1d1-3130cdfb38dmr4440357a91.32.1749057376016;
Wed, 04 Jun 2025 10:16:16 -0700 (PDT)
Received: from debug.ba.rivosinc.com ([64.71.180.162])
by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3124e2e9c9fsm9178972a91.30.2025.06.04.10.16.13
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 10:16:15 -0700 (PDT)
From: Deepak Gupta <debug@xxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 10:15:25 -0700
Subject: [PATCH v17 01/27] mm: VM_SHADOW_STACK definition for riscv
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <20250604-v5_user_cfi_series-v17-1-4565c2cf869f@xxxxxxxxxxxx>
References: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
In-Reply-To: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
To: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>,
Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>,
x86@xxxxxxxxxx, "H. Peter Anvin" <hpa@xxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>,
Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>,
Paul Walmsley <paul.walmsley@xxxxxxxxxx>,
Palmer Dabbelt <palmer@xxxxxxxxxxx>, Albert Ou <aou@xxxxxxxxxxxxxxxxx>,
Conor Dooley <conor@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>,
Christian Brauner <brauner@xxxxxxxxxx>,
Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Oleg Nesterov <oleg@xxxxxxxxxx>,
Eric Biederman <ebiederm@xxxxxxxxxxxx>, Kees Cook <kees@xxxxxxxxxx>,
Jonathan Corbet <corbet@xxxxxxx>, Shuah Khan <shuah@xxxxxxxxxx>,
Jann Horn <jannh@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>,
Miguel Ojeda <ojeda@xxxxxxxxxx>, Alex Gaynor <alex.gaynor@xxxxxxxxx>,
Boqun Feng <boqun.feng@xxxxxxxxx>, Gary Guo <gary@xxxxxxxxxxx>,
=?utf-8?q?Bj=C3=B6rn_Roy_Baron?= <bjorn3_gh@xxxxxxxxxxxxxx>,
Benno Lossin <benno.lossin@xxxxxxxxx>,
Andreas Hindborg <a.hindborg@xxxxxxxxxx>, Alice Ryhl <aliceryhl@xxxxxxxxxx>,
Trevor Gross <tmgross@xxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx,
linux-mm@xxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx,
linux-doc@xxxxxxxxxxxxxxx, linux-kselftest@xxxxxxxxxxxxxxx,
alistair.francis@xxxxxxx, richard.henderson@xxxxxxxxxx, jim.shu@xxxxxxxxxx,
andybnac@xxxxxxxxx, kito.cheng@xxxxxxxxxx, charlie@xxxxxxxxxxxx,
atishp@xxxxxxxxxxxx, evan@xxxxxxxxxxxx, cleger@xxxxxxxxxxxx,
alexghiti@xxxxxxxxxxxx, samitolvanen@xxxxxxxxxx, broonie@xxxxxxxxxx,
rick.p.edgecombe@xxxxxxxxx, rust-for-linux@xxxxxxxxxxxxxxx,
Zong Li <zong.li@xxxxxxxxxx>, David Hildenbrand <david@xxxxxxxxxx>,
Deepak Gupta <debug@xxxxxxxxxxxx>
X-Mailer: b4 0.13.0
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
VM_HIGH_ARCH_5 is used for riscv
Reviewed-by: Zong Li <zong.li@xxxxxxxxxx>
Reviewed-by: Alexandre Ghiti <alexghiti@xxxxxxxxxxxx>
Acked-by: David Hildenbrand <david@xxxxxxxxxx>
Signed-off-by: Deepak Gupta <debug@xxxxxxxxxxxx>
---
include/linux/mm.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index b7f13f087954..3487f28fa0bf 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -352,6 +352,13 @@ extern unsigned int kobjsize(const void *objp);
# define VM_SHADOW_STACK VM_HIGH_ARCH_6
#endif
+#if defined(CONFIG_RISCV_USER_CFI)
+/*
+ * Following x86 and picking up the same bitpos.
+ */
+# define VM_SHADOW_STACK VM_HIGH_ARCH_5
+#endif
+
#ifndef VM_SHADOW_STACK
# define VM_SHADOW_STACK VM_NONE
#endif
--
2.43.0
Return-Path: <linux-kernel+bounces-673578-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 4CB5C41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:16:52 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id ECDA63A6258
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:16:22 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id C1A061F6679;
Wed, 4 Jun 2025 17:16:19 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="EaJohHCv"
Received: from mail-pg1-f172.google.com (mail-pg1-f172.google.com [209.85.215.172])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2BA3D18DF8D
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:16:13 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.172
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749057378; cv=none; b=TBz/qAaSNdo1BZMmrw7JePD0v80C5wvMrdggiQASOhIn4bdEaPcGHxDxYZxOok6NWoKFWkzVaZHDHY4myhekB6pS0DRNEqDaa8ppDzy1zljsm0v2infFHFSIVVmF0+JJ+AgBinXfL3hKWp3MupQjVkapUk0wzxR/q13b/0W51v0=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749057378; c=relaxed/simple;
bh=75VO9d5iLkd4GCA7ik1ldzeCSl5HAzwUPueqR1rAE+Y=;
h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=gVc2cfNHLykZyO98oOLs5XgaKqWLGODxW0JO/5b+CZ7RCYt7MnToOLElnNCc/z+bDYs9ugGp48KrEs3jxZ+5K5LVqztShXRVQ1cK2O80cVbpcx8lvAZCPKjy8R42P7VgpWQn9jkkivh29hMtmBrU9D/JZgpoeyEhevfafj1ro1I=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=EaJohHCv; arc=none smtp.client-ip=209.85.215.172
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com
Received: by mail-pg1-f172.google.com with SMTP id 41be03b00d2f7-b07d607dc83so26263a12.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 10:16:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1749057373; x=1749662173; darn=vger.kernel.org;
h=cc:to:content-transfer-encoding:mime-version:message-id:date
:subject:from:from:to:cc:subject:date:message-id:reply-to;
bh=3DDEZCNtsvRZOHYMd2nOy0jeQIHw6YJanFKsy8XbCfk=;
b=EaJohHCvaQb3/Qgaf7M37sJBMCbFb5Bzs5f5maKF78SPsbcVemHWqBE0Izxihn41I0
f23pbY9d1R+tRgbqOi8xknPLtO9OKmvc62M2MfwGC7T0x1PQUFA/f9CCiwSj9J08LJAj
Y0+zibRZtsxHBTPX3Tdt4LpoPPVLDtBoV6tNw6UGBiOXjmXXYyYy8UZNzVeKmVvM5GYx
e6JfFaD8HS7GCFHm5it9tNk/0x0QxciL+IOnvTt3vW0zruGVraM5xVxzCCTQ2nuyi7Mp
93mwEexBuJ2QHTtI3FK8jkqNgrqVA0/fx5OAs0gJrhOziLjbOvUmP97rZbC6E5RkyL7v
OXRA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749057373; x=1749662173;
h=cc:to:content-transfer-encoding:mime-version:message-id:date
:subject:from:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=3DDEZCNtsvRZOHYMd2nOy0jeQIHw6YJanFKsy8XbCfk=;
b=K6+KDr8vlEmlRhyexprZHCkNcMz4kYdPNryVR8B8PjoOdKfra6imTyR+DQRTSediDs
x3CDlXlm8Ehujag5SryK+XJizKwLeBHodhVqKnBdES05kK8DySUoGYacuj7URF/mP7Ir
sVQfDrcA5+Pz6vHe9guwRR7rUKOCBnPJk34z/8mYNKuSytpegJ1XXnlJVRJxdl7f3nBc
sbqnKFtZ0cM+0HjMQF0w6DXiXJqPfKrmypmVTGvfjn3ZVdPhwlObgatv68hTP0EVWAQw
FNi6JMLwSzTfbTEYMasfEfhcpqqQKqVf16T6p0A+iB1//C2IY6AW3F7gH5nPeKdadF+O
1q7Q==
X-Gm-Message-State: AOJu0YxlsvMBT8slqSsSe+m6shQhyDlZHxpV7CfsqW33zCtFk321bg1B
J6SdHBlv2d8oKHjP6SOJ3kzmn5YffZgScp8TKInbR0WQaEhvsy2O2MHIE3YepTReBaw=
X-Gm-Gg: ASbGnct0hf6o6pWI7dSCVREBrJswtsQi5Wz65PmYHlZV4IHIE1jE4td8OkWr7a/uRKO
NetrGXkK+lNBUIiafOn8Mmoasy5HB9t+1e/ajwKe2Pqh1ZnnRbFUSx2tLXVvO8I+rM1QrcUxLn1
h6IXJXKZGEneZGorV+bJbUD6jFizUTfyQQ0xPkl03WxHq6njRc5gwC9KNkRX+UgXO7Jb9SwDmAA
xRKxwIgYRlyfnOzjXCchI4+De2Mne+XIxhhV7TWKfKA6J8/tP0OjWmA6/Au9HWUH4duuRZrMYrN
l2WJ5X9Jg0AUu5MXOy0ASsog1C3MKbcHq9v/JAlLi5SRWNR50Nxq2bg21MFrQeOWQqt3nuO+
X-Google-Smtp-Source: AGHT+IG5hANOGAdenUoRuSEpLRD2wRaP2u1hKPdL9MtwMOffhbFqSSrHuaElPJfzRX64TYq6ldIqIg==
X-Received: by 2002:a17:90a:d444:b0:311:abba:53c0 with SMTP id 98e67ed59e1d1-3130cd12d75mr5472518a91.9.1749057372805;
Wed, 04 Jun 2025 10:16:12 -0700 (PDT)
Received: from debug.ba.rivosinc.com ([64.71.180.162])
by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3124e2e9c9fsm9178972a91.30.2025.06.04.10.16.09
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 10:16:12 -0700 (PDT)
From: Deepak Gupta <debug@xxxxxxxxxxxx>
Subject: [PATCH v17 00/27] riscv control-flow integrity for usermode
Date: Wed, 04 Jun 2025 10:15:24 -0700
Message-Id: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
X-B4-Tracking: v=1; b=H4sIACx/QGgC/3XSzU7DMAwA4FdBPVNkx/nlxHsgNCVpwnJgRS1Uo
GnvjluEViEvt0TxF8f2uZvL1MrcPd6du6ksbW7jiTfo7u+6fIyn19K3gQ86BUpDIOgXc/jkoEO
u7fAb3NOQiVT11STVceD7VGr72tTnF94f2/wxTt/bIwuupxuHAChxC/bQU4rWJFuMgfo0tWWc2
yk/5PGtW8XF7hUvKpYVC0OoBRxVcoLidooKouJYUU65XEIgm5Og+KvCS1Q8K0MuqGMkUCDlEv4
Uwxe0qARWErmoQzYKTBYUhB2DIJcX2EHLXauRMFuQHLw6dMtZ++RtWstSU0DRUXtH/hYqdopBv
pQMIXnJoauj1Q2H2AkONbmhGG+j5Oi9I7ec04TeKAo8FQOgEh1zdbjSsmPWfFAHa7VD743k2J2
jbjjbJOtqMZIppfyfnsvl8gNxEbweyAMAAA==
To: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>,
Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>,
x86@xxxxxxxxxx, "H. Peter Anvin" <hpa@xxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>,
Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>,
Paul Walmsley <paul.walmsley@xxxxxxxxxx>,
Palmer Dabbelt <palmer@xxxxxxxxxxx>, Albert Ou <aou@xxxxxxxxxxxxxxxxx>,
Conor Dooley <conor@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>,
Christian Brauner <brauner@xxxxxxxxxx>,
Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Oleg Nesterov <oleg@xxxxxxxxxx>,
Eric Biederman <ebiederm@xxxxxxxxxxxx>, Kees Cook <kees@xxxxxxxxxx>,
Jonathan Corbet <corbet@xxxxxxx>, Shuah Khan <shuah@xxxxxxxxxx>,
Jann Horn <jannh@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>,
Miguel Ojeda <ojeda@xxxxxxxxxx>, Alex Gaynor <alex.gaynor@xxxxxxxxx>,
Boqun Feng <boqun.feng@xxxxxxxxx>, Gary Guo <gary@xxxxxxxxxxx>,
=?utf-8?q?Bj=C3=B6rn_Roy_Baron?= <bjorn3_gh@xxxxxxxxxxxxxx>,
Benno Lossin <benno.lossin@xxxxxxxxx>,
Andreas Hindborg <a.hindborg@xxxxxxxxxx>, Alice Ryhl <aliceryhl@xxxxxxxxxx>,
Trevor Gross <tmgross@xxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx,
linux-mm@xxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx,
linux-doc@xxxxxxxxxxxxxxx, linux-kselftest@xxxxxxxxxxxxxxx,
alistair.francis@xxxxxxx, richard.henderson@xxxxxxxxxx, jim.shu@xxxxxxxxxx,
andybnac@xxxxxxxxx, kito.cheng@xxxxxxxxxx, charlie@xxxxxxxxxxxx,
atishp@xxxxxxxxxxxx, evan@xxxxxxxxxxxx, cleger@xxxxxxxxxxxx,
alexghiti@xxxxxxxxxxxx, samitolvanen@xxxxxxxxxx, broonie@xxxxxxxxxx,
rick.p.edgecombe@xxxxxxxxx, rust-for-linux@xxxxxxxxxxxxxxx,
Zong Li <zong.li@xxxxxxxxxx>, David Hildenbrand <david@xxxxxxxxxx>,
Deepak Gupta <debug@xxxxxxxxxxxx>, Andy Chiu <andybnac@xxxxxxxxx>
X-Mailer: b4 0.13.0
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Basics and overview
===================
Software with larger attack surfaces (e.g. network facing apps like databases,
browsers or apps relying on browser runtimes) suffer from memory corruption
issues which can be utilized by attackers to bend control flow of the program
to eventually gain control (by making their payload executable). Attackers are
able to perform such attacks by leveraging call-sites which rely on indirect
calls or return sites which rely on obtaining return address from stack memory.
To mitigate such attacks, risc-v extension zicfilp enforces that all indirect
calls must land on a landing pad instruction `lpad` else cpu will raise software
check exception (a new cpu exception cause code on riscv).
Similarly for return flow, risc-v extension zicfiss extends architecture with
- `sspush` instruction to push return address on a shadow stack
- `sspopchk` instruction to pop return address from shadow stack
and compare with input operand (i.e. return address on stack)
- `sspopchk` to raise software check exception if comparision above
was a mismatch
- Protection mechanism using which shadow stack is not writeable via
regular store instructions
More information an details can be found at extensions github repo [1].
Equivalent to landing pad (zicfilp) on x86 is `ENDBRANCH` instruction in Intel
CET [3] and branch target identification (BTI) [4] on arm.
Similarly x86's Intel CET has shadow stack [5] and arm64 has guarded control
stack (GCS) [6] which are very similar to risc-v's zicfiss shadow stack.
x86 and arm64 support for user mode shadow stack is already in mainline.
Kernel awareness for user control flow integrity
================================================
This series picks up Samuel Holland's envcfg changes [2] as well. So if those are
being applied independently, they should be removed from this series.
Enabling:
In order to maintain compatibility and not break anything in user mode, kernel
doesn't enable control flow integrity cpu extensions on binary by default.
Instead exposes a prctl interface to enable, disable and lock the shadow stack
or landing pad feature for a task. This allows userspace (loader) to enumerate
if all objects in its address space are compiled with shadow stack and landing
pad support and accordingly enable the feature. Additionally if a subsequent
`dlopen` happens on a library, user mode can take a decision again to disable
the feature (if incoming library is not compiled with support) OR terminate the
task (if user mode policy is strict to have all objects in address space to be
compiled with control flow integirty cpu feature). prctl to enable shadow stack
results in allocating shadow stack from virtual memory and activating for user
address space. x86 and arm64 are also following same direction due to similar
reason(s).
clone/fork:
On clone and fork, cfi state for task is inherited by child. Shadow stack is
part of virtual memory and is a writeable memory from kernel perspective
(writeable via a restricted set of instructions aka shadow stack instructions)
Thus kernel changes ensure that this memory is converted into read-only when
fork/clone happens and COWed when fault is taken due to sspush, sspopchk or
ssamoswap. In case `CLONE_VM` is specified and shadow stack is to be enabled,
kernel will automatically allocate a shadow stack for that clone call.
map_shadow_stack:
x86 introduced `map_shadow_stack` system call to allow user space to explicitly
map shadow stack memory in its address space. It is useful to allocate shadow
for different contexts managed by a single thread (green threads or contexts)
risc-v implements this system call as well.
signal management:
If shadow stack is enabled for a task, kernel performs an asynchronous control
flow diversion to deliver the signal and eventually expects userspace to issue
sigreturn so that original execution can be resumed. Even though resume context
is prepared by kernel, it is in user space memory and is subject to memory
corruption and corruption bugs can be utilized by attacker in this race window
to perform arbitrary sigreturn and eventually bypass cfi mechanism.
Another issue is how to ensure that cfi related state on sigcontext area is not
trampled by legacy apps or apps compiled with old kernel headers.
In order to mitigate control-flow hijacting, kernel prepares a token and place
it on shadow stack before signal delivery and places address of token in
sigcontext structure. During sigreturn, kernel obtains address of token from
sigcontext struture, reads token from shadow stack and validates it and only
then allow sigreturn to succeed. Compatiblity issue is solved by adopting
dynamic sigcontext management introduced for vector extension. This series
re-factor the code little bit to allow future sigcontext management easy (as
proposed by Andy Chiu from SiFive)
config and compilation:
Introduce a new risc-v config option `CONFIG_RISCV_USER_CFI`. Selecting this
config option picks the kernel support for user control flow integrity. This
optin is presented only if toolchain has shadow stack and landing pad support.
And is on purpose guarded by toolchain support. Reason being that eventually
vDSO also needs to be compiled in with shadow stack and landing pad support.
vDSO compile patches are not included as of now because landing pad labeling
scheme is yet to settle for usermode runtime.
To get more information on kernel interactions with respect to
zicfilp and zicfiss, patch series adds documentation for
`zicfilp` and `zicfiss` in following:
Documentation/arch/riscv/zicfiss.rst
Documentation/arch/riscv/zicfilp.rst
How to test this series
=======================
Toolchain
---------
$ git clone git@xxxxxxxxxx:sifive/riscv-gnu-toolchain.git -b cfi-dev
$ riscv-gnu-toolchain/configure --prefix=<path-to-where-to-build> --with-arch=rv64gc_zicfilp_zicfiss --enable-linux --disable-gdb --with-extra-multilib-test="rv64gc_zicfilp_zicfiss-lp64d:-static"
$ make -j$(nproc)
Qemu
----
Get the lastest qemu
$ cd qemu
$ mkdir build
$ cd build
$ ../configure --target-list=riscv64-softmmu
$ make -j$(nproc)
Opensbi
-------
$ git clone git@xxxxxxxxxx:deepak0414/opensbi.git -b v6_cfi_spec_split_opensbi
$ make CROSS_COMPILE=<your riscv toolchain> -j$(nproc) PLATFORM=generic
Linux
-----
Running defconfig is fine. CFI is enabled by default if the toolchain
supports it.
$ make ARCH=riscv CROSS_COMPILE=<path-to-cfi-riscv-gnu-toolchain>/build/bin/riscv64-unknown-linux-gnu- -j$(nproc) defconfig
$ make ARCH=riscv CROSS_COMPILE=<path-to-cfi-riscv-gnu-toolchain>/build/bin/riscv64-unknown-linux-gnu- -j$(nproc)
In case you're building your own rootfs using toolchain, please make sure you
pick following patch to ensure that vDSO compiled with lpad and shadow stack.
"arch/riscv: compile vdso with landing pad"
Branch where above patch can be picked
https://github.com/deepak0414/linux-riscv-cfi/tree/vdso_user_cfi_v6.12-rc1
Running
-------
Modify your qemu command to have:
-bios <path-to-cfi-opensbi>/build/platform/generic/firmware/fw_dynamic.bin
-cpu rv64,zicfilp=true,zicfiss=true,zimop=true,zcmop=true
vDSO related Opens (in the flux)
=================================
I am listing these opens for laying out plan and what to expect in future
patch sets. And of course for the sake of discussion.
Shadow stack and landing pad enabling in vDSO
----------------------------------------------
vDSO must have shadow stack and landing pad support compiled in for task
to have shadow stack and landing pad support. This patch series doesn't
enable that (yet). Enabling shadow stack support in vDSO should be
straight forward (intend to do that in next versions of patch set). Enabling
landing pad support in vDSO requires some collaboration with toolchain folks
to follow a single label scheme for all object binaries. This is necessary to
ensure that all indirect call-sites are setting correct label and target landing
pads are decorated with same label scheme.
How many vDSOs
---------------
Shadow stack instructions are carved out of zimop (may be operations) and if CPU
doesn't implement zimop, they're illegal instructions. Kernel could be running on
a CPU which may or may not implement zimop. And thus kernel will have to carry 2
different vDSOs and expose the appropriate one depending on whether CPU implements
zimop or not.
References
==========
[1] - https://github.com/riscv/riscv-cfi
[2] - https://lore.kernel.org/all/20240814081126.956287-1-samuel.holland@xxxxxxxxxx/
[3] - https://lwn.net/Articles/889475/
[4] - https://developer.arm.com/documentation/109576/0100/Branch-Target-Identification
[5] - https://www.intel.com/content/dam/develop/external/us/en/documents/catc17-introduction-intel-cet-844137.pdf
[6] - https://lwn.net/Articles/940403/
To: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
To: Ingo Molnar <mingo@xxxxxxxxxx>
To: Borislav Petkov <bp@xxxxxxxxx>
To: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>
To: x86@xxxxxxxxxx
To: H. Peter Anvin <hpa@xxxxxxxxx>
To: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
To: Liam R. Howlett <Liam.Howlett@xxxxxxxxxx>
To: Vlastimil Babka <vbabka@xxxxxxx>
To: Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>
To: Paul Walmsley <paul.walmsley@xxxxxxxxxx>
To: Palmer Dabbelt <palmer@xxxxxxxxxxx>
To: Albert Ou <aou@xxxxxxxxxxxxxxxxx>
To: Conor Dooley <conor@xxxxxxxxxx>
To: Rob Herring <robh@xxxxxxxxxx>
To: Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>
To: Arnd Bergmann <arnd@xxxxxxxx>
To: Christian Brauner <brauner@xxxxxxxxxx>
To: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
To: Oleg Nesterov <oleg@xxxxxxxxxx>
To: Eric Biederman <ebiederm@xxxxxxxxxxxx>
To: Kees Cook <kees@xxxxxxxxxx>
To: Jonathan Corbet <corbet@xxxxxxx>
To: Shuah Khan <shuah@xxxxxxxxxx>
To: Jann Horn <jannh@xxxxxxxxxx>
To: Conor Dooley <conor+dt@xxxxxxxxxx>
To: Miguel Ojeda <ojeda@xxxxxxxxxx>
To: Alex Gaynor <alex.gaynor@xxxxxxxxx>
To: Boqun Feng <boqun.feng@xxxxxxxxx>
To: Gary Guo <gary@xxxxxxxxxxx>
To: Björn Roy Baron <bjorn3_gh@xxxxxxxxxxxxxx>
To: Benno Lossin <benno.lossin@xxxxxxxxx>
To: Andreas Hindborg <a.hindborg@xxxxxxxxxx>
To: Alice Ryhl <aliceryhl@xxxxxxxxxx>
To: Trevor Gross <tmgross@xxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx
Cc: linux-fsdevel@xxxxxxxxxxxxxxx
Cc: linux-mm@xxxxxxxxx
Cc: linux-riscv@xxxxxxxxxxxxxxxxxxx
Cc: devicetree@xxxxxxxxxxxxxxx
Cc: linux-arch@xxxxxxxxxxxxxxx
Cc: linux-doc@xxxxxxxxxxxxxxx
Cc: linux-kselftest@xxxxxxxxxxxxxxx
Cc: alistair.francis@xxxxxxx
Cc: richard.henderson@xxxxxxxxxx
Cc: jim.shu@xxxxxxxxxx
Cc: andybnac@xxxxxxxxx
Cc: kito.cheng@xxxxxxxxxx
Cc: charlie@xxxxxxxxxxxx
Cc: atishp@xxxxxxxxxxxx
Cc: evan@xxxxxxxxxxxx
Cc: cleger@xxxxxxxxxxxx
Cc: alexghiti@xxxxxxxxxxxx
Cc: samitolvanen@xxxxxxxxxx
Cc: broonie@xxxxxxxxxx
Cc: rick.p.edgecombe@xxxxxxxxx
Cc: rust-for-linux@xxxxxxxxxxxxxxx
changelog
---------
v17:
- fixed warnings due to empty macros in usercfi.h (reported by alexg)
- fixed prefixes in commit titles reported by alexg
- took below uprobe with fcfi v2 patch from Zong Li and squashed it with
"riscv/traps: Introduce software check exception and uprobe handling"
https://lore.kernel.org/all/20250604093403.10916-1-zong.li@xxxxxxxxxx/
v16:
- If FWFT is not implemented or returns error for shadow stack activation, then
no_usercfi is set to disable shadow stack. Although this should be picked up
by extension validation and activation. Fixed this bug for zicfilp and zicfiss
both. Thanks to Charlie Jenkins for reporting this.
- If toolchain doesn't support cfi, cfi kselftest shouldn't build. Suggested by
Charlie Jenkins.
- Default for CONFIG_RISCV_USER_CFI is set to no. Charlie/Atish suggested to
keep it off till we have more hardware availibility with RVA23 profile and
zimop/zcmop implemented. Else this will start breaking people's workflow
- Includes the fix if "!RV64 and !SBI" then definitions for FWFT in
asm-offsets.c error.
v15:
- Toolchain has been updated to include `-fcf-protection` flag. This
exists for x86 as well. Updated kernel patches to compile vDSO and
selftest to compile with `fcf-protection=full` flag.
- selecting CONFIG_RISCV_USERCFI selects CONFIG_RISCV_SBI.
- Patch to enable shadow stack for kernel wasn't hidden behind
CONFIG_RISCV_USERCFI and CONFIG_RISCV_SBI. fixed that.
v14:
- rebased on top of palmer/sbi-v3. Thus dropped clement's FWFT patches
Updated RISCV_ISA_EXT_XXXX in hwcap and hwprobe constants.
- Took Radim's suggestions on bitfields.
- Placed cfi_state at the end of thread_info block so that current situation
is not disturbed with respect to member fields of thread_info in single
cacheline.
v13:
- cpu_supports_shadow_stack/cpu_supports_indirect_br_lp_instr uses
riscv_has_extension_unlikely()
- uses nops(count) to create nop slide
- RISCV_ACQUIRE_BARRIER is not needed in `amo_user_shstk`. Removed it
- changed ternaries to simply use implicit casting to convert to bool.
- kernel command line allows to disable zicfilp and zicfiss independently.
updated kernel-parameters.txt.
- ptrace user abi for cfi uses bitmasks instead of bitfields. Added ptrace
kselftest.
- cosmetic and grammatical changes to documentation.
v12:
- It seems like I had accidently squashed arch agnostic indirect branch
tracking prctl and riscv implementation of those prctls. Split them again.
- set_shstk_status/set_indir_lp_status perform CSR writes only when CPU
support is available. As suggested by Zong Li.
- Some minor clean up in kselftests as suggested by Zong Li.
v11:
- patch "arch/riscv: compile vdso with landing pad" was unconditionally
selecting `_zicfilp` for vDSO compile. fixed that. Changed `lpad 1` to
to `lpad 0`.
v10:
- dropped "mm: helper `is_shadow_stack_vma` to check shadow stack vma". This patch
is not that interesting to this patch series for risc-v. There are instances in
arch directories where VM_SHADOW_STACK flag is anyways used. Dropping this patch
to expedite merging in riscv tree.
- Took suggestions from `Clement` on "riscv: zicfiss / zicfilp enumeration" to
validate presence of cfi based on config.
- Added a patch for vDSO to have `lpad 0`. I had omitted this earlier to make sure
we add single vdso object with cfi enabled. But a vdso object with scheme of
zero labeled landing pad is least common denominator and should work with all
objects of zero labeled as well as function-signature labeled objects.
v9:
- rebased on master (39a803b754d5 fix braino in "9p: fix ->rename_sem exclusion")
- dropped "mm: Introduce ARCH_HAS_USER_SHADOW_STACK" (master has it from arm64/gcs)
- dropped "prctl: arch-agnostic prctl for shadow stack" (master has it from arm64/gcs)
v8:
- rebased on palmer/for-next
- dropped samuel holland's `envcfg` context switch patches.
they are in parlmer/for-next
v7:
- Removed "riscv/Kconfig: enable HAVE_EXIT_THREAD for riscv"
Instead using `deactivate_mm` flow to clean up.
see here for more context
https://lore.kernel.org/all/20230908203655.543765-1-rick.p.edgecombe@xxxxxxxxx/#t
- Changed the header include in `kselftest`. Hopefully this fixes compile
issue faced by Zong Li at SiFive.
- Cleaned up an orphaned change to `mm/mmap.c` in below patch
"riscv/mm : ensure PROT_WRITE leads to VM_READ | VM_WRITE"
- Lock interfaces for shadow stack and indirect branch tracking expect arg == 0
Any future evolution of this interface should accordingly define how arg should
be setup.
- `mm/map.c` has an instance of using `VM_SHADOW_STACK`. Fixed it to use helper
`is_shadow_stack_vma`.
- Link to v6: https://lore.kernel.org/r/20241008-v5_user_cfi_series-v6-0-60d9fe073f37@xxxxxxxxxxxx
v6:
- Picked up Samuel Holland's changes as is with `envcfg` placed in
`thread` instead of `thread_info`
- fixed unaligned newline escapes in kselftest
- cleaned up messages in kselftest and included test output in commit message
- fixed a bug in clone path reported by Zong Li
- fixed a build issue if CONFIG_RISCV_ISA_V is not selected
(this was introduced due to re-factoring signal context
management code)
v5:
- rebased on v6.12-rc1
- Fixed schema related issues in device tree file
- Fixed some of the documentation related issues in zicfilp/ss.rst
(style issues and added index)
- added `SHADOW_STACK_SET_MARKER` so that implementation can define base
of shadow stack.
- Fixed warnings on definitions added in usercfi.h when
CONFIG_RISCV_USER_CFI is not selected.
- Adopted context header based signal handling as proposed by Andy Chiu
- Added support for enabling kernel mode access to shadow stack using
FWFT
(https://github.com/riscv-non-isa/riscv-sbi-doc/blob/master/src/ext-firmware-features.adoc)
- Link to v5: https://lore.kernel.org/r/20241001-v5_user_cfi_series-v1-0-3ba65b6e550f@xxxxxxxxxxxx
(Note: I had an issue in my workflow due to which version number wasn't
picked up correctly while sending out patches)
v4:
- rebased on 6.11-rc6
- envcfg: Converged with Samuel Holland's patches for envcfg management on per-
thread basis.
- vma_is_shadow_stack is renamed to is_vma_shadow_stack
- picked up Mark Brown's `ARCH_HAS_USER_SHADOW_STACK` patch
- signal context: using extended context management to maintain compatibility.
- fixed `-Wmissing-prototypes` compiler warnings for prctl functions
- Documentation fixes and amending typos.
- Link to v4: https://lore.kernel.org/all/20240912231650.3740732-1-debug@xxxxxxxxxxxx/
v3:
- envcfg
logic to pick up base envcfg had a bug where `ENVCFG_CBZE` could have been
picked on per task basis, even though CPU didn't implement it. Fixed in
this series.
- dt-bindings
As suggested, split into separate commit. fixed the messaging that spec is
in public review
- arch_is_shadow_stack change
arch_is_shadow_stack changed to vma_is_shadow_stack
- hwprobe
zicfiss / zicfilp if present will get enumerated in hwprobe
- selftests
As suggested, added object and binary filenames to .gitignore
Selftest binary anyways need to be compiled with cfi enabled compiler which
will make sure that landing pad and shadow stack are enabled. Thus removed
separate enable/disable tests. Cleaned up tests a bit.
- Link to v3: https://lore.kernel.org/lkml/20240403234054.2020347-1-debug@xxxxxxxxxxxx/
v2:
- Using config `CONFIG_RISCV_USER_CFI`, kernel support for riscv control flow
integrity for user mode programs can be compiled in the kernel.
- Enabling of control flow integrity for user programs is left to user runtime
- This patch series introduces arch agnostic `prctls` to enable shadow stack
and indirect branch tracking. And implements them on riscv.
---
Changes in v17:
- Link to v16: https://lore.kernel.org/r/20250522-v5_user_cfi_series-v16-0-64f61a35eee7@xxxxxxxxxxxx
Changes in v16:
- Link to v15: https://lore.kernel.org/r/20250502-v5_user_cfi_series-v15-0-914966471885@xxxxxxxxxxxx
Changes in v15:
- changelog posted just below cover letter
- Link to v14: https://lore.kernel.org/r/20250429-v5_user_cfi_series-v14-0-5239410d012a@xxxxxxxxxxxx
Changes in v14:
- changelog posted just below cover letter
- Link to v13: https://lore.kernel.org/r/20250424-v5_user_cfi_series-v13-0-971437de586a@xxxxxxxxxxxx
Changes in v13:
- changelog posted just below cover letter
- Link to v12: https://lore.kernel.org/r/20250314-v5_user_cfi_series-v12-0-e51202b53138@xxxxxxxxxxxx
Changes in v12:
- changelog posted just below cover letter
- Link to v11: https://lore.kernel.org/r/20250310-v5_user_cfi_series-v11-0-86b36cbfb910@xxxxxxxxxxxx
Changes in v11:
- changelog posted just below cover letter
- Link to v10: https://lore.kernel.org/r/20250210-v5_user_cfi_series-v10-0-163dcfa31c60@xxxxxxxxxxxx
---
Andy Chiu (1):
riscv: signal: abstract header saving for setup_sigcontext
Deepak Gupta (25):
mm: VM_SHADOW_STACK definition for riscv
dt-bindings: riscv: zicfilp and zicfiss in dt-bindings (extensions.yaml)
riscv: zicfiss / zicfilp enumeration
riscv: zicfiss / zicfilp extension csr and bit definitions
riscv: usercfi state for task and save/restore of CSR_SSP on trap entry/exit
riscv/mm : ensure PROT_WRITE leads to VM_READ | VM_WRITE
riscv/mm: manufacture shadow stack pte
riscv/mm: teach pte_mkwrite to manufacture shadow stack PTEs
riscv/mm: write protect and shadow stack
riscv/mm: Implement map_shadow_stack() syscall
riscv/shstk: If needed allocate a new shadow stack on clone
riscv: Implements arch agnostic shadow stack prctls
prctl: arch-agnostic prctl for indirect branch tracking
riscv: Implements arch agnostic indirect branch tracking prctls
riscv/traps: Introduce software check exception and uprobe handling
riscv/signal: save and restore of shadow stack for signal
riscv/kernel: update __show_regs to print shadow stack register
riscv/ptrace: riscv cfi status and state via ptrace and in core files
riscv/hwprobe: zicfilp / zicfiss enumeration in hwprobe
riscv: kernel command line option to opt out of user cfi
riscv: enable kernel access to shadow stack memory via FWFT sbi call
riscv: create a config for shadow stack and landing pad instr support
riscv: Documentation for landing pad / indirect branch tracking
riscv: Documentation for shadow stack on riscv
kselftest/riscv: kselftest for user mode cfi
Jim Shu (1):
arch/riscv: compile vdso with landing pad
Documentation/admin-guide/kernel-parameters.txt | 8 +
Documentation/arch/riscv/index.rst | 2 +
Documentation/arch/riscv/zicfilp.rst | 115 +++++
Documentation/arch/riscv/zicfiss.rst | 179 +++++++
.../devicetree/bindings/riscv/extensions.yaml | 14 +
arch/riscv/Kconfig | 21 +
arch/riscv/Makefile | 5 +-
arch/riscv/include/asm/asm-prototypes.h | 1 +
arch/riscv/include/asm/assembler.h | 44 ++
arch/riscv/include/asm/cpufeature.h | 12 +
arch/riscv/include/asm/csr.h | 16 +
arch/riscv/include/asm/entry-common.h | 2 +
arch/riscv/include/asm/hwcap.h | 2 +
arch/riscv/include/asm/mman.h | 26 +
arch/riscv/include/asm/mmu_context.h | 7 +
arch/riscv/include/asm/pgtable.h | 30 +-
arch/riscv/include/asm/processor.h | 2 +
arch/riscv/include/asm/thread_info.h | 3 +
arch/riscv/include/asm/usercfi.h | 95 ++++
arch/riscv/include/asm/vector.h | 3 +
arch/riscv/include/uapi/asm/hwprobe.h | 2 +
arch/riscv/include/uapi/asm/ptrace.h | 34 ++
arch/riscv/include/uapi/asm/sigcontext.h | 1 +
arch/riscv/kernel/Makefile | 1 +
arch/riscv/kernel/asm-offsets.c | 10 +
arch/riscv/kernel/cpufeature.c | 27 +
arch/riscv/kernel/entry.S | 33 +-
arch/riscv/kernel/head.S | 27 +
arch/riscv/kernel/process.c | 27 +-
arch/riscv/kernel/ptrace.c | 95 ++++
arch/riscv/kernel/signal.c | 148 +++++-
arch/riscv/kernel/sys_hwprobe.c | 2 +
arch/riscv/kernel/sys_riscv.c | 10 +
arch/riscv/kernel/traps.c | 51 ++
arch/riscv/kernel/usercfi.c | 545 +++++++++++++++++++++
arch/riscv/kernel/vdso/Makefile | 6 +
arch/riscv/kernel/vdso/flush_icache.S | 4 +
arch/riscv/kernel/vdso/getcpu.S | 4 +
arch/riscv/kernel/vdso/rt_sigreturn.S | 4 +
arch/riscv/kernel/vdso/sys_hwprobe.S | 4 +
arch/riscv/mm/init.c | 2 +-
arch/riscv/mm/pgtable.c | 16 +
include/linux/cpu.h | 4 +
include/linux/mm.h | 7 +
include/uapi/linux/elf.h | 2 +
include/uapi/linux/prctl.h | 27 +
kernel/sys.c | 30 ++
tools/testing/selftests/riscv/Makefile | 2 +-
tools/testing/selftests/riscv/cfi/.gitignore | 3 +
tools/testing/selftests/riscv/cfi/Makefile | 16 +
tools/testing/selftests/riscv/cfi/cfi_rv_test.h | 82 ++++
tools/testing/selftests/riscv/cfi/riscv_cfi_test.c | 173 +++++++
tools/testing/selftests/riscv/cfi/shadowstack.c | 385 +++++++++++++++
tools/testing/selftests/riscv/cfi/shadowstack.h | 27 +
54 files changed, 2369 insertions(+), 29 deletions(-)
---
base-commit: 4181f8ad7a1061efed0219951d608d4988302af7
change-id: 20240930-v5_user_cfi_series-3dc332f8f5b2
--
- debug
Return-Path: <linux-kernel+bounces-673580-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 1D6FF41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:17:25 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 98CB03A777C
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:16:43 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 79C331F75A6;
Wed, 4 Jun 2025 17:16:22 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="YYZImV4X"
Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 10CA81F8755
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:16:19 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.47
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749057381; cv=none; b=nRKECtcpq7FP9v+3k9QIog7CRBoFgscg9FCNnjwA3OnXqbpPtDPXtA8EX6ZJsXpcOFqHEa61wGeK4PCxrS6mhMxMTZpgP40QPPva62WEHMxIxmywQYWVeLzmdFPsPDT7dIaV4mZdLk4Ist7vpP8f6gy0SDhSSgXm8DLVVkFx2Do=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749057381; c=relaxed/simple;
bh=0tq61D9uccU6FiQqC8xv/y4u19vkZ7ShJckqXhsFT6s=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=XRmoU3UZAnKW7W+/1vW0Qqio13nLHsbkddzK1iGIm2ayjbVJwIZhJwyQJ7rDFYFfAb7j7qXlIi52YEAESytSD4scUFgKlUP9f0xKC5sPxbiXYHf1fceCwH3XLkU7bOjiJ5FrK5jntrEPAsoDbdyyEeP/ClCRlltpxxrZrDp9VJw=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=YYZImV4X; arc=none smtp.client-ip=209.85.216.47
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com
Received: by mail-pj1-f47.google.com with SMTP id 98e67ed59e1d1-312a62055d0so93880a91.3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 10:16:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1749057379; x=1749662179; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=yHp8skVfcDwQ99Y8qvuLL+UOu6n4/KmOGLmf3JbJ7iE=;
b=YYZImV4XAxaoX3dv1PEm4++u4SUVmagxZ5gO6578St8oHtI9Yq+C54jWNio035aFQf
drwQ3kAA3DWXVEF6TtBub4CmoS9epqX1qBGuI2QO1+5lZXtOBTGVE0SX03C6xSAu9fEu
Tr4zKwupKeBjLdh6ErJEYkCd1xy4g4jnxDH1Ym8H+SxRYMkeBUIx1FYBMlN9119NH5dL
H1fBBhuK4mjP7hF1PqMyRbvfRpMV3oocFkNTwwctZ/K1t9RfRXO65DhgeYUwBGmf93Vi
gIKTKg08X7Ew2fjPwnTqqoPyW+YKVNXypYnZ1w5elSzyRmmN+/u3Q90Vq4S8Si7w+AHt
Q6rA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749057379; x=1749662179;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=yHp8skVfcDwQ99Y8qvuLL+UOu6n4/KmOGLmf3JbJ7iE=;
b=tRG+DELQNxOqxupZO3e2cXt1mVaDT5IqRWHEvxR32XF5KTuTYy/YZ32msmeaJ1j4xd
S043E7piPegVUZzrSQeN1R+AW16zL+z0mVxnEZjSddhHypikRVepEUnkQgD3BcknwK1T
a73H9pUF0MkUg+mO32O6IBvGNTTeh77ERnBEVCnClo97Y5Kk5baLXzWg6W4CQIv/jU0h
cbrPgaz+sqsfECdzlxH37BdrC5TyV93k++P66y2JxRl3L8a0bh+I2/6FAgGXwHA7g96K
VqpQyZMmhmVkB6bbgX8f1wt+lE5NgLwKdcwejkGP0+xaOLnz2ezmPmSYqC+Zg1I6djgH
2UDg==
X-Gm-Message-State: AOJu0Yzy4gMEXm4ZTW/ADkKHHlxIPBRcCACAYOkB0NNOWU16zLJ6yPks
3MISXYrkall0ri2/RWs3zHhGvQ+fBCAp9hrUO38Sp2PllpFOhQYxNQN247rvkCLhfcQ=
X-Gm-Gg: ASbGnctQTz9AEbKqAS0Q51cJ/3ixp/B2byeyGdNZBSZ/WupqTCb27T6wQeFHdd8z94d
swLY4VncEKCB0/ze19IQwK1pcvdLAzo9f4KAABSNgrarFv/urim2LaPP72M9vqyIfqDZ8xih3j7
bYlwtnnXPKbR9MBWZOuPfbj+2ml7Yb3vRY98VJMPGmARXmKOweA7JXUGlwK0HhRjbNilxYgi/Ij
qETRga8EMATYZikmtywsYIWxrP52pj7cLZbGlLWzw7UrgZ8xNZbZLymEL/Lpm+aUOC+vLdiQFpd
lDh+mvter37cOK1YY6qC+P9J2s1Fhv9qO3cWpEK9ZLqMnXpJ93PRvQTCC6yKPs3QwKjVRTMe
X-Google-Smtp-Source: AGHT+IGkexVwRd4MBugt686K9ooA6BwNW7BY3mlzIvdhU2r4+d354fip8huOwZDJ0pdHlmWrSOoHpw==
X-Received: by 2002:a17:90b:2692:b0:313:279d:665c with SMTP id 98e67ed59e1d1-313279d6ba1mr1336750a91.7.1749057379093;
Wed, 04 Jun 2025 10:16:19 -0700 (PDT)
Received: from debug.ba.rivosinc.com ([64.71.180.162])
by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3124e2e9c9fsm9178972a91.30.2025.06.04.10.16.16
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 10:16:18 -0700 (PDT)
From: Deepak Gupta <debug@xxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 10:15:26 -0700
Subject: [PATCH v17 02/27] dt-bindings: riscv: zicfilp and zicfiss in
dt-bindings (extensions.yaml)
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <20250604-v5_user_cfi_series-v17-2-4565c2cf869f@xxxxxxxxxxxx>
References: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
In-Reply-To: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
To: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>,
Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>,
x86@xxxxxxxxxx, "H. Peter Anvin" <hpa@xxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>,
Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>,
Paul Walmsley <paul.walmsley@xxxxxxxxxx>,
Palmer Dabbelt <palmer@xxxxxxxxxxx>, Albert Ou <aou@xxxxxxxxxxxxxxxxx>,
Conor Dooley <conor@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>,
Christian Brauner <brauner@xxxxxxxxxx>,
Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Oleg Nesterov <oleg@xxxxxxxxxx>,
Eric Biederman <ebiederm@xxxxxxxxxxxx>, Kees Cook <kees@xxxxxxxxxx>,
Jonathan Corbet <corbet@xxxxxxx>, Shuah Khan <shuah@xxxxxxxxxx>,
Jann Horn <jannh@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>,
Miguel Ojeda <ojeda@xxxxxxxxxx>, Alex Gaynor <alex.gaynor@xxxxxxxxx>,
Boqun Feng <boqun.feng@xxxxxxxxx>, Gary Guo <gary@xxxxxxxxxxx>,
=?utf-8?q?Bj=C3=B6rn_Roy_Baron?= <bjorn3_gh@xxxxxxxxxxxxxx>,
Benno Lossin <benno.lossin@xxxxxxxxx>,
Andreas Hindborg <a.hindborg@xxxxxxxxxx>, Alice Ryhl <aliceryhl@xxxxxxxxxx>,
Trevor Gross <tmgross@xxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx,
linux-mm@xxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx,
linux-doc@xxxxxxxxxxxxxxx, linux-kselftest@xxxxxxxxxxxxxxx,
alistair.francis@xxxxxxx, richard.henderson@xxxxxxxxxx, jim.shu@xxxxxxxxxx,
andybnac@xxxxxxxxx, kito.cheng@xxxxxxxxxx, charlie@xxxxxxxxxxxx,
atishp@xxxxxxxxxxxx, evan@xxxxxxxxxxxx, cleger@xxxxxxxxxxxx,
alexghiti@xxxxxxxxxxxx, samitolvanen@xxxxxxxxxx, broonie@xxxxxxxxxx,
rick.p.edgecombe@xxxxxxxxx, rust-for-linux@xxxxxxxxxxxxxxx,
Deepak Gupta <debug@xxxxxxxxxxxx>
X-Mailer: b4 0.13.0
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Make an entry for cfi extensions in extensions.yaml.
Signed-off-by: Deepak Gupta <debug@xxxxxxxxxxxx>
Acked-by: Rob Herring (Arm) <robh@xxxxxxxxxx>
---
Documentation/devicetree/bindings/riscv/extensions.yaml | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/Documentation/devicetree/bindings/riscv/extensions.yaml b/Documentation/devicetree/bindings/riscv/extensions.yaml
index bcab59e0cc2e..c9e68bdbf099 100644
--- a/Documentation/devicetree/bindings/riscv/extensions.yaml
+++ b/Documentation/devicetree/bindings/riscv/extensions.yaml
@@ -444,6 +444,20 @@ properties:
The standard Zicboz extension for cache-block zeroing as ratified
in commit 3dd606f ("Create cmobase-v1.0.pdf") of riscv-CMOs.
+ - const: zicfilp
+ description: |
+ The standard Zicfilp extension for enforcing forward edge
+ control-flow integrity as ratified in commit 3f8e450 ("merge
+ pull request #227 from ved-rivos/0709") of riscv-cfi
+ github repo.
+
+ - const: zicfiss
+ description: |
+ The standard Zicfiss extension for enforcing backward edge
+ control-flow integrity as ratified in commit 3f8e450 ("merge
+ pull request #227 from ved-rivos/0709") of riscv-cfi
+ github repo.
+
- const: zicntr
description:
The standard Zicntr extension for base counters and timers, as
--
2.43.0
Return-Path: <linux-kernel+bounces-673581-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 33FCC41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:17:32 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 6220916FC4E
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:17:33 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 627DA202C2B;
Wed, 4 Jun 2025 17:16:26 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="bGq5YpUf"
Received: from mail-pg1-f174.google.com (mail-pg1-f174.google.com [209.85.215.174])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0DF181FDA9B
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:16:22 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.174
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749057385; cv=none; b=mJTzktxIttXII/P09XvMZjbnK8LasUuebkEIjszby31PXxbftQE5NcI3Rfjzt73DXjDdssT6/poVz+71qn6NPO8lra+Up61WvJKIHReybJaDmWUjlqMbo2VlFcrhLksA1a6olJdYpOZSX29A8WJSl6/IYHarQef91MD9exjTVxE=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749057385; c=relaxed/simple;
bh=9PDO8z/tbOe1lGT80gKwSIkcb5+Kq37kj7Zs5n5s9wE=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=ACpcAWYaZ0qtmjTYJEWN6q20qJpb9KscyeNakQiR9O3FBama8qV5kAMlFbggwNxrGx7uTKtlkR9IovHgIcQcpej4eOeCWxNrQJs4+Qz82H1frcgMp84Fpu+U7844YcRzV+/Z2zgeeahfd1V9Cy89NPZzwrViDqVzSMLOe5hxq3M=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=bGq5YpUf; arc=none smtp.client-ip=209.85.215.174
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com
Received: by mail-pg1-f174.google.com with SMTP id 41be03b00d2f7-b26f5f47ba1so18389a12.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 10:16:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1749057382; x=1749662182; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=2ZZoGehI751WEnlyiA7Yu8/Xg1oNedSIkF4OaPbny4E=;
b=bGq5YpUfL9CwwRhMyvhz+wzFawtgQ5iAmMDZ6LcaMfQFxWswd6Q+sX7CfclAghqZhP
pVfbJwU1EjrP/YAaPBlS9xmBL0wfC9/Ct+/6hD58+tO4b3X8zfgikbdQGABLl9GR5Hr8
+1WCXVA/zwh42bNpByEHTXtXqlk7sxsYESL8jwWl+HUi0tho18xtoiQRHCuyarc1abOW
3dzBKT0OSDc9mXB/51InnYPra9CIv7iqW3az5pSVoswWUKxqYbkb34CAMV5Zsltf7T3N
yUzj8t6bN4xgDyXdBX+27RBWmUWiae7gN+GkaTI3yNKdjHhNTMnPEj/n5TeIlopuekYo
HL6w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749057382; x=1749662182;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=2ZZoGehI751WEnlyiA7Yu8/Xg1oNedSIkF4OaPbny4E=;
b=XawsMxdliizQwe/JU1yJm8klE3S2HlXwzkLAyLEmo+XMtXf6atDNPXIX8ZALTW42mz
Q6YGNLLmFQFeQFQ4x2ZmZ4PMiASCZSBt9FZ5aapyczigQtEi8dAJZ+RDNnDwUpNS/MpB
gRRG5I8PZtUheIAxsHE5JXgHDmlNk8egPIEIonhk4HcWTHlHiQf9RBVPuI7lyZYdFjKi
cReqGWB+/KSw0RG02l3578tq9vrZ81BUNvtFJOlvFW385YJ2cu+tM1PJUpTZ8QbtPPlq
1S2AE6fwtYPfRPk+QlmbYGvJylb8/bgNviYajdYGMKBxmRskL+q6ojFVugAlotdP7w7u
xuWQ==
X-Gm-Message-State: AOJu0Yy9xAJRb5FCiCooxDE5r0RRwszcY9nu6Qlp/LS/35Kjcsw3Oro+
FQFRXoS7UroPipUQkTqxG1VbQ6fgDW3nbCURVAvm2zZoIlCxuVKnlABLhotxvAEJpnk=
X-Gm-Gg: ASbGncsDPjYsS0rPKkO/BV/EO1D2YOayss+iwTv2Fi6zjI9S/o6NzgsuQtA6Whlu5US
vnj92n/0DM7v2EwQZpAZXQaNbpr6cfQ2QMIsye1vx3IBSE5i7VWZkQHO1EZGMwaHiVOrVDbuBLy
ZDZ1Pq6D6j0yyM47dljmYTbiYKSZ6yO98mVIA7zGhXVp9H1BXhCJbMA4sN/EUZBXVKl6XESMCj1
p0I60PB9EA2pkZPvXZqlIiBgQVy6fMPlJfTVwqrHMsK7gogfda4Q0H7kWH3e4uCM/+O9seGGWmK
V6Qal3bqxsRTPFQT2aoXk9Bei50pnh4epufMYxdhIytt3mFB9t9DJiACMNysuA==
X-Google-Smtp-Source: AGHT+IFlI3du6uAs4xKMSeHrsCAE9HV8F985B1I10na2c+A//L1Bd5F1huM4LJFKUEO9PRurphiymg==
X-Received: by 2002:a17:90b:48cc:b0:311:2f5:6b1 with SMTP id 98e67ed59e1d1-3130cd3c193mr4732650a91.22.1749057382230;
Wed, 04 Jun 2025 10:16:22 -0700 (PDT)
Received: from debug.ba.rivosinc.com ([64.71.180.162])
by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3124e2e9c9fsm9178972a91.30.2025.06.04.10.16.19
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 10:16:21 -0700 (PDT)
From: Deepak Gupta <debug@xxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 10:15:27 -0700
Subject: [PATCH v17 03/27] riscv: zicfiss / zicfilp enumeration
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <20250604-v5_user_cfi_series-v17-3-4565c2cf869f@xxxxxxxxxxxx>
References: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
In-Reply-To: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
To: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>,
Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>,
x86@xxxxxxxxxx, "H. Peter Anvin" <hpa@xxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>,
Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>,
Paul Walmsley <paul.walmsley@xxxxxxxxxx>,
Palmer Dabbelt <palmer@xxxxxxxxxxx>, Albert Ou <aou@xxxxxxxxxxxxxxxxx>,
Conor Dooley <conor@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>,
Christian Brauner <brauner@xxxxxxxxxx>,
Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Oleg Nesterov <oleg@xxxxxxxxxx>,
Eric Biederman <ebiederm@xxxxxxxxxxxx>, Kees Cook <kees@xxxxxxxxxx>,
Jonathan Corbet <corbet@xxxxxxx>, Shuah Khan <shuah@xxxxxxxxxx>,
Jann Horn <jannh@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>,
Miguel Ojeda <ojeda@xxxxxxxxxx>, Alex Gaynor <alex.gaynor@xxxxxxxxx>,
Boqun Feng <boqun.feng@xxxxxxxxx>, Gary Guo <gary@xxxxxxxxxxx>,
=?utf-8?q?Bj=C3=B6rn_Roy_Baron?= <bjorn3_gh@xxxxxxxxxxxxxx>,
Benno Lossin <benno.lossin@xxxxxxxxx>,
Andreas Hindborg <a.hindborg@xxxxxxxxxx>, Alice Ryhl <aliceryhl@xxxxxxxxxx>,
Trevor Gross <tmgross@xxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx,
linux-mm@xxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx,
linux-doc@xxxxxxxxxxxxxxx, linux-kselftest@xxxxxxxxxxxxxxx,
alistair.francis@xxxxxxx, richard.henderson@xxxxxxxxxx, jim.shu@xxxxxxxxxx,
andybnac@xxxxxxxxx, kito.cheng@xxxxxxxxxx, charlie@xxxxxxxxxxxx,
atishp@xxxxxxxxxxxx, evan@xxxxxxxxxxxx, cleger@xxxxxxxxxxxx,
alexghiti@xxxxxxxxxxxx, samitolvanen@xxxxxxxxxx, broonie@xxxxxxxxxx,
rick.p.edgecombe@xxxxxxxxx, rust-for-linux@xxxxxxxxxxxxxxx,
Zong Li <zong.li@xxxxxxxxxx>, Deepak Gupta <debug@xxxxxxxxxxxx>
X-Mailer: b4 0.13.0
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
This patch adds support for detecting zicfiss and zicfilp. zicfiss and
zicfilp stands for unprivleged integer spec extension for shadow stack
and branch tracking on indirect branches, respectively.
This patch looks for zicfiss and zicfilp in device tree and accordinlgy
lights up bit in cpu feature bitmap. Furthermore this patch adds detection
utility functions to return whether shadow stack or landing pads are
supported by cpu.
Reviewed-by: Zong Li <zong.li@xxxxxxxxxx>
Reviewed-by: Alexandre Ghiti <alexghiti@xxxxxxxxxxxx>
Signed-off-by: Deepak Gupta <debug@xxxxxxxxxxxx>
---
arch/riscv/include/asm/cpufeature.h | 12 ++++++++++++
arch/riscv/include/asm/hwcap.h | 2 ++
arch/riscv/include/asm/processor.h | 1 +
arch/riscv/kernel/cpufeature.c | 22 ++++++++++++++++++++++
4 files changed, 37 insertions(+)
diff --git a/arch/riscv/include/asm/cpufeature.h b/arch/riscv/include/asm/cpufeature.h
index 3a87f612035c..100f4b53ba5d 100644
--- a/arch/riscv/include/asm/cpufeature.h
+++ b/arch/riscv/include/asm/cpufeature.h
@@ -146,4 +146,16 @@ static __always_inline bool riscv_cpu_has_extension_unlikely(int cpu, const unsi
return __riscv_isa_extension_available(hart_isa[cpu].isa, ext);
}
+static inline bool cpu_supports_shadow_stack(void)
+{
+ return (IS_ENABLED(CONFIG_RISCV_USER_CFI) &&
+ riscv_has_extension_unlikely(RISCV_ISA_EXT_ZICFISS));
+}
+
+static inline bool cpu_supports_indirect_br_lp_instr(void)
+{
+ return (IS_ENABLED(CONFIG_RISCV_USER_CFI) &&
+ riscv_has_extension_unlikely(RISCV_ISA_EXT_ZICFILP));
+}
+
#endif
diff --git a/arch/riscv/include/asm/hwcap.h b/arch/riscv/include/asm/hwcap.h
index e3cbf203cdde..abc33ca1302e 100644
--- a/arch/riscv/include/asm/hwcap.h
+++ b/arch/riscv/include/asm/hwcap.h
@@ -105,6 +105,8 @@
#define RISCV_ISA_EXT_ZVFBFWMA 96
#define RISCV_ISA_EXT_ZAAMO 97
#define RISCV_ISA_EXT_ZALRSC 98
+#define RISCV_ISA_EXT_ZICFILP 99
+#define RISCV_ISA_EXT_ZICFISS 100
#define RISCV_ISA_EXT_XLINUXENVCFG 127
diff --git a/arch/riscv/include/asm/processor.h b/arch/riscv/include/asm/processor.h
index 5f56eb9d114a..e3aba3336e63 100644
--- a/arch/riscv/include/asm/processor.h
+++ b/arch/riscv/include/asm/processor.h
@@ -13,6 +13,7 @@
#include <vdso/processor.h>
#include <asm/ptrace.h>
+#include <asm/hwcap.h>
#define arch_get_mmap_end(addr, len, flags) \
({ \
diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c
index 2054f6c4b0ae..c54de1bbe206 100644
--- a/arch/riscv/kernel/cpufeature.c
+++ b/arch/riscv/kernel/cpufeature.c
@@ -258,6 +258,24 @@ static int riscv_ext_svadu_validate(const struct riscv_isa_ext_data *data,
return 0;
}
+static int riscv_cfilp_validate(const struct riscv_isa_ext_data *data,
+ const unsigned long *isa_bitmap)
+{
+ if (!IS_ENABLED(CONFIG_RISCV_USER_CFI))
+ return -EINVAL;
+
+ return 0;
+}
+
+static int riscv_cfiss_validate(const struct riscv_isa_ext_data *data,
+ const unsigned long *isa_bitmap)
+{
+ if (!IS_ENABLED(CONFIG_RISCV_USER_CFI))
+ return -EINVAL;
+
+ return 0;
+}
+
static const unsigned int riscv_a_exts[] = {
RISCV_ISA_EXT_ZAAMO,
RISCV_ISA_EXT_ZALRSC,
@@ -444,6 +462,10 @@ const struct riscv_isa_ext_data riscv_isa_ext[] = {
__RISCV_ISA_EXT_SUPERSET_VALIDATE(zicbom, RISCV_ISA_EXT_ZICBOM, riscv_xlinuxenvcfg_exts, riscv_ext_zicbom_validate),
__RISCV_ISA_EXT_SUPERSET_VALIDATE(zicboz, RISCV_ISA_EXT_ZICBOZ, riscv_xlinuxenvcfg_exts, riscv_ext_zicboz_validate),
__RISCV_ISA_EXT_DATA(ziccrse, RISCV_ISA_EXT_ZICCRSE),
+ __RISCV_ISA_EXT_SUPERSET_VALIDATE(zicfilp, RISCV_ISA_EXT_ZICFILP, riscv_xlinuxenvcfg_exts,
+ riscv_cfilp_validate),
+ __RISCV_ISA_EXT_SUPERSET_VALIDATE(zicfiss, RISCV_ISA_EXT_ZICFISS, riscv_xlinuxenvcfg_exts,
+ riscv_cfiss_validate),
__RISCV_ISA_EXT_DATA(zicntr, RISCV_ISA_EXT_ZICNTR),
__RISCV_ISA_EXT_DATA(zicond, RISCV_ISA_EXT_ZICOND),
__RISCV_ISA_EXT_DATA(zicsr, RISCV_ISA_EXT_ZICSR),
--
2.43.0
Return-Path: <linux-kernel+bounces-673582-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 8E66A41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:17:54 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 77F831892902
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:18:07 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 9C50420B813;
Wed, 4 Jun 2025 17:16:29 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="bGMRT4jX"
Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0EC9D202997
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:16:25 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.177
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749057388; cv=none; b=MtKl9LFaPe6IBslJMxD2Wjvm168dpwPZ6zljP9PCOpgD2DGjS5wnP4TPoSYNJX1UV/bJnkcTe/ndAKWauLZGwPD25JSbu4dGFC+Sd8eKU42TFxNFZg2hTExdfHexFpmVKYc9DMqKO/BpU+L1ZZnTjLHsyLVYS+ORB+94sODc51g=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749057388; c=relaxed/simple;
bh=ynTUDLBp2gEKhFeiYfxgOCPe6wht1rOzpyg0Vu3jGXs=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=R7I6qxdis4yKeB2AuL3gyxhj9CRz68hIiHXbq3D2LjH1rQnbQQIPv+Bctc7qjWgpFe3ntjWZqDSYNEJA7r8Ul+xDb/pu0YgA4TOGqeP96uuHgbRYe6NfjgIvW4Xnhe1HzZbYr/4aVeayxtCnDpPvHVFhwzQXhPObFvxjH6t+ssc=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=bGMRT4jX; arc=none smtp.client-ip=209.85.214.177
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com
Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-234bfe37cccso1148645ad.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 10:16:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1749057385; x=1749662185; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=Ome3u7rmCNb01KyjL0hHySpySbFvJDab/QcqkVOgxo4=;
b=bGMRT4jXUFfL6pialkPmDofJUp7aaUhI5yJDVHaddRB7MYV7qPIJyBC6KWl/QdSKEo
gxn41IhyEkEm9r0y7HmhHkawBcWnplkzf4ls17WbrvqV/UDR6GizCkso6LuBFxxcG/MG
EsxaPasXuyu0lZJ6WWSapIQFtQu9miOva+jyD6kTOMe45PnQpvwmV28Qsz7q6CUdc4Zz
NbUB64izqER6F72h0KQK00i2+aQ0PCGi6MtIIxBRocjGvWcDaOSVd0jsVTstg1lAWeqc
JOyQVgrFhYmhr1SpVZWtC//nkeIiVjz7v4jh6OTn2jSdmFjGcmQuc6miCEOPBRtuUHD9
w//A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749057385; x=1749662185;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=Ome3u7rmCNb01KyjL0hHySpySbFvJDab/QcqkVOgxo4=;
b=t6fzqioucWui1PuixYH8THZow/d30tG7FWkKIj2nFQb78oL5C2kZYakK8wQbMv7Wyl
l+LBpLKev647/xFJWO/bF/7k47HT9aBRodGVJ2nvnaOMRs/OCkzgMwbUFW/0Pptu0y+3
ldsThVLjAF77r7GFb/RAcTHrLgYJ4P+FPCFJVKKxusE5JHdYghxvog98SmBwfDaO6TxR
5BWe0dfloMGLvXr2iiTEIqSGgOqUmtoWxRn9acihKyfVzp7UCviGRxKKaGX0OAHRe3CH
67VuSRRQ3XbzrphQd7ge+iT+D1R8URT73g+4JHXnf2U54WlPzLOHVRM5xSORDh7edtH5
aDLA==
X-Gm-Message-State: AOJu0YyiW60dYOv1kWZlr9LrfqXjrbdicICb1ntn8FZklga6rsBuIMat
ciLXisq8+DSdIRdPz748TUK0lZzqGZ8vOUMmtk0davQDwf0UIip8eOWJcf14lO9YmVw=
X-Gm-Gg: ASbGncv6NBuKAp/9mEqGgeMcVeR3gVxASVweAgyi4JrogG2fm6R6463NZilVzCf5AQY
rQmsrhy3NE3VeX+eppJvynssU7buUDr7W6AKOehi0E/S612zOXbE6phjQfoicymDho54+WZWwhj
vITRcuEImMh+hQT00BkiF+VtJBPELvbwAp95uIbnjg/zgMK06wC3E17ss/vajorm5k9+AOnlM0J
A1sNppDsIJ/8Zf0SxvhzcJ/VBYBybJagByT7O/4V2sSrzvVWoekMeRMeqpqE43UwmwWXnVPie3+
UmE8kNdz3MQXP6ISSop3N29U4paF/MbxNbFc0LwOWJm4SNqMtsDOj/KG4Qu06nFrQK3J6AzX
X-Google-Smtp-Source: AGHT+IHOq7jdfe1QXesVQTTYh9pdMzuQq9fifPPejLKBYzrKsJ2+M42lgYFnihYLRnJ8kIRxucrJ3w==
X-Received: by 2002:a17:903:1b45:b0:234:d292:be84 with SMTP id d9443c01a7336-235e110dc8dmr60521145ad.10.1749057385225;
Wed, 04 Jun 2025 10:16:25 -0700 (PDT)
Received: from debug.ba.rivosinc.com ([64.71.180.162])
by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3124e2e9c9fsm9178972a91.30.2025.06.04.10.16.22
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 10:16:24 -0700 (PDT)
From: Deepak Gupta <debug@xxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 10:15:28 -0700
Subject: [PATCH v17 04/27] riscv: zicfiss / zicfilp extension csr and bit
definitions
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <20250604-v5_user_cfi_series-v17-4-4565c2cf869f@xxxxxxxxxxxx>
References: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
In-Reply-To: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
To: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>,
Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>,
x86@xxxxxxxxxx, "H. Peter Anvin" <hpa@xxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>,
Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>,
Paul Walmsley <paul.walmsley@xxxxxxxxxx>,
Palmer Dabbelt <palmer@xxxxxxxxxxx>, Albert Ou <aou@xxxxxxxxxxxxxxxxx>,
Conor Dooley <conor@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>,
Christian Brauner <brauner@xxxxxxxxxx>,
Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Oleg Nesterov <oleg@xxxxxxxxxx>,
Eric Biederman <ebiederm@xxxxxxxxxxxx>, Kees Cook <kees@xxxxxxxxxx>,
Jonathan Corbet <corbet@xxxxxxx>, Shuah Khan <shuah@xxxxxxxxxx>,
Jann Horn <jannh@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>,
Miguel Ojeda <ojeda@xxxxxxxxxx>, Alex Gaynor <alex.gaynor@xxxxxxxxx>,
Boqun Feng <boqun.feng@xxxxxxxxx>, Gary Guo <gary@xxxxxxxxxxx>,
=?utf-8?q?Bj=C3=B6rn_Roy_Baron?= <bjorn3_gh@xxxxxxxxxxxxxx>,
Benno Lossin <benno.lossin@xxxxxxxxx>,
Andreas Hindborg <a.hindborg@xxxxxxxxxx>, Alice Ryhl <aliceryhl@xxxxxxxxxx>,
Trevor Gross <tmgross@xxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx,
linux-mm@xxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx,
linux-doc@xxxxxxxxxxxxxxx, linux-kselftest@xxxxxxxxxxxxxxx,
alistair.francis@xxxxxxx, richard.henderson@xxxxxxxxxx, jim.shu@xxxxxxxxxx,
andybnac@xxxxxxxxx, kito.cheng@xxxxxxxxxx, charlie@xxxxxxxxxxxx,
atishp@xxxxxxxxxxxx, evan@xxxxxxxxxxxx, cleger@xxxxxxxxxxxx,
alexghiti@xxxxxxxxxxxx, samitolvanen@xxxxxxxxxx, broonie@xxxxxxxxxx,
rick.p.edgecombe@xxxxxxxxx, rust-for-linux@xxxxxxxxxxxxxxx,
Deepak Gupta <debug@xxxxxxxxxxxx>
X-Mailer: b4 0.13.0
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
zicfiss and zicfilp extension gets enabled via b3 and b2 in *envcfg CSR.
menvcfg controls enabling for S/HS mode. henvcfg control enabling for VS
while senvcfg controls enabling for U/VU mode.
zicfilp extension extends *status CSR to hold `expected landing pad` bit.
A trap or interrupt can occur between an indirect jmp/call and target
instr. `expected landing pad` bit from CPU is recorded into xstatus CSR so
that when supervisor performs xret, `expected landing pad` state of CPU can
be restored.
zicfiss adds one new CSR
- CSR_SSP: CSR_SSP contains current shadow stack pointer.
Signed-off-by: Deepak Gupta <debug@xxxxxxxxxxxx>
Reviewed-by: Charlie Jenkins <charlie@xxxxxxxxxxxx>
---
arch/riscv/include/asm/csr.h | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/arch/riscv/include/asm/csr.h b/arch/riscv/include/asm/csr.h
index 6fed42e37705..2f49b9663640 100644
--- a/arch/riscv/include/asm/csr.h
+++ b/arch/riscv/include/asm/csr.h
@@ -18,6 +18,15 @@
#define SR_MPP _AC(0x00001800, UL) /* Previously Machine */
#define SR_SUM _AC(0x00040000, UL) /* Supervisor User Memory Access */
+/* zicfilp landing pad status bit */
+#define SR_SPELP _AC(0x00800000, UL)
+#define SR_MPELP _AC(0x020000000000, UL)
+#ifdef CONFIG_RISCV_M_MODE
+#define SR_ELP SR_MPELP
+#else
+#define SR_ELP SR_SPELP
+#endif
+
#define SR_FS _AC(0x00006000, UL) /* Floating-point Status */
#define SR_FS_OFF _AC(0x00000000, UL)
#define SR_FS_INITIAL _AC(0x00002000, UL)
@@ -212,6 +221,8 @@
#define ENVCFG_PMM_PMLEN_16 (_AC(0x3, ULL) << 32)
#define ENVCFG_CBZE (_AC(1, UL) << 7)
#define ENVCFG_CBCFE (_AC(1, UL) << 6)
+#define ENVCFG_LPE (_AC(1, UL) << 2)
+#define ENVCFG_SSE (_AC(1, UL) << 3)
#define ENVCFG_CBIE_SHIFT 4
#define ENVCFG_CBIE (_AC(0x3, UL) << ENVCFG_CBIE_SHIFT)
#define ENVCFG_CBIE_ILL _AC(0x0, UL)
@@ -230,6 +241,11 @@
#define SMSTATEEN0_HSENVCFG (_ULL(1) << SMSTATEEN0_HSENVCFG_SHIFT)
#define SMSTATEEN0_SSTATEEN0_SHIFT 63
#define SMSTATEEN0_SSTATEEN0 (_ULL(1) << SMSTATEEN0_SSTATEEN0_SHIFT)
+/*
+ * zicfiss user mode csr
+ * CSR_SSP holds current shadow stack pointer.
+ */
+#define CSR_SSP 0x011
/* mseccfg bits */
#define MSECCFG_PMM ENVCFG_PMM
--
2.43.0
Return-Path: <linux-kernel+bounces-673583-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 96E1F41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:18:19 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 40A94169366
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:18:11 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 2098420E018;
Wed, 4 Jun 2025 17:16:32 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="kqvIZqTZ"
Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 54DC820B7FB
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:16:29 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.43
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749057391; cv=none; b=hGv+FgAcRuuOud+iJ0tRro/ZmbP5DoMuMIlQOkNvUZbvVg+3fGNS3MMxBgDKGnv9RRts6qsD0o/8pAz+hkLSqzhw+X9YTLnC1DjD6maXgCU+x3stHHDG9hjy2EzyDh9+cJk37CofdL7/4P7rR8PEBz7tuSz7QG4lBDWRmhoDcEY=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749057391; c=relaxed/simple;
bh=IVp1L32E8a9jVUlfHVcjufgvP6ZGHAk+tTWTIvB9zVo=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=mk6f/HlHRzxuzW6obv/1kaM77Gp2okutaJ9kUfGlVzZWk0czJB676HxCsrZBKazuWX4Os0pzBK/tOQcc8nVUSXHSe2kP6t1k1aGao11PCTqV10pVJFl9Y7YShkW95rde+a6vvBiEmwm/Znws5I1g23T6jmjT2sb6I89CMcT01V0=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=kqvIZqTZ; arc=none smtp.client-ip=209.85.216.43
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com
Received: by mail-pj1-f43.google.com with SMTP id 98e67ed59e1d1-313132d1f7aso64097a91.3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 10:16:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1749057388; x=1749662188; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=eyCgE0sNHOlyx9zGD2XlqTc9W1j01DyA5vw9LyX8zMs=;
b=kqvIZqTZatOoyu1PyIJLrGP6XCJWDAtFZjHiKv1I6lTPhV1Cmb9siv/86P4uTi3p+f
IIxCKY5Mu5dwGnEhmF8W/9mq+a2WAqYCd3njHCSKUEV9ccCW0nuCqStJAAm22CK3a6mA
3CYzyxYPSP+gmRQhg2QQPM18i3Df/S2PcLfiJu6u9goA1O4qEEP/QvAkym7H0i0//4O8
by7JJIpcmjfgwlNDZp798rU5EdP6k4V7LKjlguSOeFbvOxhWldV9GLnC0VEmM1q7ucKH
URRchOe7/hqsi7RWRXcFrZmOxrnohW+uBggvrRLGkdDGkOfDMrIb8/pvN47yhvBkw6Iy
x8FQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749057388; x=1749662188;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=eyCgE0sNHOlyx9zGD2XlqTc9W1j01DyA5vw9LyX8zMs=;
b=F1fgCdoOQ/Ha5b6XOkKTl3gg9uVDzCZbppvzYarpj58vskUixgrBUKJ+gsB3k8CBxY
aR7cQDhhY6Rk7/nCPOmFKgqTiTWNvKlHHrApVLw3yDayyRMIz8pInS8JyRbyvhOEGlmK
bHpP4SX1CD+D3lOxWOZ3mcTKxU0TVTuzqqbX/OYmR60wyYBnB63f0OWwHp25iuSVeLw5
ynnyIBtOLYnVw8JZFLgcE7mh5L6rxPZx/apXGcqAJQbsZJfHwOXzGPBVhAHdSyWa+duI
r7gGE6XT6xNSQyKdThKrySYpfkU53avnoti7cQ7mw27KBmHrfiWik7lBZtAHx0Iq9c85
vw2w==
X-Gm-Message-State: AOJu0Ywk+pdgKuYKnLJl9z78qCCgJ01sROrDBFDft96+x1ikA7zQuWGe
8pZ6kuMR+2U9JD27OElGGOsLKT01iawo0YhkimsShtEpc/4mAhtJv+Cz/BE7i91Xix0=
X-Gm-Gg: ASbGncsxa6tZJMNSfX9jPKlxn8JIFiBBRlVc8a1l+T2HEjNeSjcYe+XVZp2XF20ChJZ
n3vneh7a7R+6Q6QTT6uHeRKCNPsxiAn9ib6KrMUfb7Z18Y/qQ7fJd1nJioSuKB616w4Cx8pIUJT
aAzEm1LtZrwB973qklaQHd/DYFm77FV7H37UNhNTwAZVEf+yAcYtSvhx+fNiYlxijZAACnLyrml
8PbKxDu8mgrqnoYGDGa6ZTBI0TJF6mjAoSV33AHDsTml9XvHYGqbecUuhIMpgrmMtQdUXqvbea6
b+fNJRbYMKzi8wUjIoK7IS16UGISKbUZK6rrDScPXyJ9nqkPWkrddzYur+dBs4Df5/lIpfI9
X-Google-Smtp-Source: AGHT+IHMOq/u2tFRTZvHKVb54drs49US8l1H7uubvUaLV8NV+WZds+TZeiMTNEPUQiklHTteNj9xxw==
X-Received: by 2002:a17:90b:1d51:b0:313:2464:ad20 with SMTP id 98e67ed59e1d1-3132464ad44mr2126953a91.13.1749057388336;
Wed, 04 Jun 2025 10:16:28 -0700 (PDT)
Received: from debug.ba.rivosinc.com ([64.71.180.162])
by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3124e2e9c9fsm9178972a91.30.2025.06.04.10.16.25
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 10:16:27 -0700 (PDT)
From: Deepak Gupta <debug@xxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 10:15:29 -0700
Subject: [PATCH v17 05/27] riscv: usercfi state for task and save/restore
of CSR_SSP on trap entry/exit
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <20250604-v5_user_cfi_series-v17-5-4565c2cf869f@xxxxxxxxxxxx>
References: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
In-Reply-To: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
To: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>,
Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>,
x86@xxxxxxxxxx, "H. Peter Anvin" <hpa@xxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>,
Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>,
Paul Walmsley <paul.walmsley@xxxxxxxxxx>,
Palmer Dabbelt <palmer@xxxxxxxxxxx>, Albert Ou <aou@xxxxxxxxxxxxxxxxx>,
Conor Dooley <conor@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>,
Christian Brauner <brauner@xxxxxxxxxx>,
Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Oleg Nesterov <oleg@xxxxxxxxxx>,
Eric Biederman <ebiederm@xxxxxxxxxxxx>, Kees Cook <kees@xxxxxxxxxx>,
Jonathan Corbet <corbet@xxxxxxx>, Shuah Khan <shuah@xxxxxxxxxx>,
Jann Horn <jannh@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>,
Miguel Ojeda <ojeda@xxxxxxxxxx>, Alex Gaynor <alex.gaynor@xxxxxxxxx>,
Boqun Feng <boqun.feng@xxxxxxxxx>, Gary Guo <gary@xxxxxxxxxxx>,
=?utf-8?q?Bj=C3=B6rn_Roy_Baron?= <bjorn3_gh@xxxxxxxxxxxxxx>,
Benno Lossin <benno.lossin@xxxxxxxxx>,
Andreas Hindborg <a.hindborg@xxxxxxxxxx>, Alice Ryhl <aliceryhl@xxxxxxxxxx>,
Trevor Gross <tmgross@xxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx,
linux-mm@xxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx,
linux-doc@xxxxxxxxxxxxxxx, linux-kselftest@xxxxxxxxxxxxxxx,
alistair.francis@xxxxxxx, richard.henderson@xxxxxxxxxx, jim.shu@xxxxxxxxxx,
andybnac@xxxxxxxxx, kito.cheng@xxxxxxxxxx, charlie@xxxxxxxxxxxx,
atishp@xxxxxxxxxxxx, evan@xxxxxxxxxxxx, cleger@xxxxxxxxxxxx,
alexghiti@xxxxxxxxxxxx, samitolvanen@xxxxxxxxxx, broonie@xxxxxxxxxx,
rick.p.edgecombe@xxxxxxxxx, rust-for-linux@xxxxxxxxxxxxxxx,
Zong Li <zong.li@xxxxxxxxxx>, Deepak Gupta <debug@xxxxxxxxxxxx>
X-Mailer: b4 0.13.0
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Carves out space in arch specific thread struct for cfi status and shadow
stack in usermode on riscv.
This patch does following
- defines a new structure cfi_status with status bit for cfi feature
- defines shadow stack pointer, base and size in cfi_status structure
- defines offsets to new member fields in thread in asm-offsets.c
- Saves and restore shadow stack pointer on trap entry (U --> S) and exit
(S --> U)
Shadow stack save/restore is gated on feature availiblity and implemented
using alternative. CSR can be context switched in `switch_to` as well but
soon as kernel shadow stack support gets rolled in, shadow stack pointer
will need to be switched at trap entry/exit point (much like `sp`). It can
be argued that kernel using shadow stack deployment scenario may not be as
prevalant as user mode using this feature. But even if there is some
minimal deployment of kernel shadow stack, that means that it needs to be
supported. And thus save/restore of shadow stack pointer in entry.S instead
of in `switch_to.h`.
Reviewed-by: Charlie Jenkins <charlie@xxxxxxxxxxxx>
Reviewed-by: Zong Li <zong.li@xxxxxxxxxx>
Reviewed-by: Alexandre Ghiti <alexghiti@xxxxxxxxxxxx>
Signed-off-by: Deepak Gupta <debug@xxxxxxxxxxxx>
---
arch/riscv/include/asm/processor.h | 1 +
arch/riscv/include/asm/thread_info.h | 3 +++
arch/riscv/include/asm/usercfi.h | 23 +++++++++++++++++++++++
arch/riscv/kernel/asm-offsets.c | 4 ++++
arch/riscv/kernel/entry.S | 28 ++++++++++++++++++++++++++++
5 files changed, 59 insertions(+)
diff --git a/arch/riscv/include/asm/processor.h b/arch/riscv/include/asm/processor.h
index e3aba3336e63..d851bb5c6da0 100644
--- a/arch/riscv/include/asm/processor.h
+++ b/arch/riscv/include/asm/processor.h
@@ -14,6 +14,7 @@
#include <asm/ptrace.h>
#include <asm/hwcap.h>
+#include <asm/usercfi.h>
#define arch_get_mmap_end(addr, len, flags) \
({ \
diff --git a/arch/riscv/include/asm/thread_info.h b/arch/riscv/include/asm/thread_info.h
index f5916a70879a..e066f41176ca 100644
--- a/arch/riscv/include/asm/thread_info.h
+++ b/arch/riscv/include/asm/thread_info.h
@@ -73,6 +73,9 @@ struct thread_info {
*/
unsigned long a0, a1, a2;
#endif
+#ifdef CONFIG_RISCV_USER_CFI
+ struct cfi_state user_cfi_state;
+#endif
};
#ifdef CONFIG_SHADOW_CALL_STACK
diff --git a/arch/riscv/include/asm/usercfi.h b/arch/riscv/include/asm/usercfi.h
new file mode 100644
index 000000000000..94b214c295c0
--- /dev/null
+++ b/arch/riscv/include/asm/usercfi.h
@@ -0,0 +1,23 @@
+/* SPDX-License-Identifier: GPL-2.0
+ * Copyright (C) 2024 Rivos, Inc.
+ * Deepak Gupta <debug@xxxxxxxxxxxx>
+ */
+#ifndef _ASM_RISCV_USERCFI_H
+#define _ASM_RISCV_USERCFI_H
+
+#ifndef __ASSEMBLY__
+#include <linux/types.h>
+
+#ifdef CONFIG_RISCV_USER_CFI
+struct cfi_state {
+ unsigned long ubcfi_en : 1; /* Enable for backward cfi. */
+ unsigned long user_shdw_stk; /* Current user shadow stack pointer */
+ unsigned long shdw_stk_base; /* Base address of shadow stack */
+ unsigned long shdw_stk_size; /* size of shadow stack */
+};
+
+#endif /* CONFIG_RISCV_USER_CFI */
+
+#endif /* __ASSEMBLY__ */
+
+#endif /* _ASM_RISCV_USERCFI_H */
diff --git a/arch/riscv/kernel/asm-offsets.c b/arch/riscv/kernel/asm-offsets.c
index 16490755304e..f33945432f8f 100644
--- a/arch/riscv/kernel/asm-offsets.c
+++ b/arch/riscv/kernel/asm-offsets.c
@@ -49,6 +49,10 @@ void asm_offsets(void)
#endif
OFFSET(TASK_TI_CPU_NUM, task_struct, thread_info.cpu);
+#ifdef CONFIG_RISCV_USER_CFI
+ OFFSET(TASK_TI_CFI_STATE, task_struct, thread_info.user_cfi_state);
+ OFFSET(TASK_TI_USER_SSP, task_struct, thread_info.user_cfi_state.user_shdw_stk);
+#endif
OFFSET(TASK_THREAD_F0, task_struct, thread.fstate.f[0]);
OFFSET(TASK_THREAD_F1, task_struct, thread.fstate.f[1]);
OFFSET(TASK_THREAD_F2, task_struct, thread.fstate.f[2]);
diff --git a/arch/riscv/kernel/entry.S b/arch/riscv/kernel/entry.S
index 33a5a9f2a0d4..c4bfe2085c41 100644
--- a/arch/riscv/kernel/entry.S
+++ b/arch/riscv/kernel/entry.S
@@ -91,6 +91,32 @@
REG_L a0, TASK_TI_A0(tp)
.endm
+/*
+ * If previous mode was U, capture shadow stack pointer and save it away
+ * Zero CSR_SSP at the same time for sanitization.
+ */
+.macro save_userssp tmp, status
+ ALTERNATIVE("nops(4)",
+ __stringify( \
+ andi \tmp, \status, SR_SPP; \
+ bnez \tmp, skip_ssp_save; \
+ csrrw \tmp, CSR_SSP, x0; \
+ REG_S \tmp, TASK_TI_USER_SSP(tp); \
+ skip_ssp_save:),
+ 0,
+ RISCV_ISA_EXT_ZICFISS,
+ CONFIG_RISCV_USER_CFI)
+.endm
+
+.macro restore_userssp tmp
+ ALTERNATIVE("nops(2)",
+ __stringify( \
+ REG_L \tmp, TASK_TI_USER_SSP(tp); \
+ csrw CSR_SSP, \tmp),
+ 0,
+ RISCV_ISA_EXT_ZICFISS,
+ CONFIG_RISCV_USER_CFI)
+.endm
SYM_CODE_START(handle_exception)
/*
@@ -147,6 +173,7 @@ SYM_CODE_START(handle_exception)
REG_L s0, TASK_TI_USER_SP(tp)
csrrc s1, CSR_STATUS, t0
+ save_userssp s2, s1
csrr s2, CSR_EPC
csrr s3, CSR_TVAL
csrr s4, CSR_CAUSE
@@ -236,6 +263,7 @@ SYM_CODE_START_NOALIGN(ret_from_exception)
* structures again.
*/
csrw CSR_SCRATCH, tp
+ restore_userssp s3
1:
#ifdef CONFIG_RISCV_ISA_V_PREEMPTIVE
move a0, sp
--
2.43.0
Return-Path: <linux-kernel+bounces-673584-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org [147.75.48.161])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id CC79741E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:18:31 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sy.mirrors.kernel.org (Postfix) with ESMTPS id 2BB917A6D91
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:17:11 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 5172620B7FB;
Wed, 4 Jun 2025 17:16:37 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="legGlQyY"
Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 764D520E71E;
Wed, 4 Jun 2025 17:16:34 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749057396; cv=none; b=S+gQZ/5LAbDKTO9CytwWCyuVbVHBxEfWHVMQjY8iQaGdj+U/7kEhtiJDf1z8RFMLEiV55FXoKXbU37HICffw8ILOa5rnTqL1gCqr6wX2cMoXb4aQK4wbk0ih0YQwRIGukMqtp1e9KDwvQyEOQNpn5tH/ybtAKj++QzGXCdyOm3o=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749057396; c=relaxed/simple;
bh=kjLd+ddb6deYgxmwwC4dNdpjsazgtApHNAXz/v7lLt8=;
h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=PCB4sC2ppWu5qPbetl2eP3aTS4fV2SejgaeGc2ij1FrA37arYUSFc/aiCeeZKddmhmkeL25L2gzwEvdAKsrJv2ul7hfNBk7D/wppOrYnZxqUto+p6/HW5Q8qpGY0xJB5H2GGXLbUO9rzRgi0bgfELWCDg12H1vNvkUJQDA4ALZE=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=legGlQyY; arc=none smtp.client-ip=198.175.65.9
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com
Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
t=1749057395; x=1780593395;
h=from:to:cc:subject:date:message-id:mime-version:
content-transfer-encoding;
bh=kjLd+ddb6deYgxmwwC4dNdpjsazgtApHNAXz/v7lLt8=;
b=legGlQyYqZ7wxYWTwPRMTZaVe0QEqWVC8quKGA/qgUVoDIbU/M2aKNzy
I4C1XB0ujiNene7+hUzIXrPsU36IH0m4KX0P7eKcXYBTkzVLx0ma3WE8b
mqqBD7gGrG7ftne46kQOvooCNzE6DJvEIQp5Ghg2RXfQe0PYEj/jXhclk
uta3xWHgFzP5Yd5fCUzvNNMPQpDqNq8rrEYXlinCYwfjTwUv50sSls3Pj
fkJdh7d1mBk5DOVQCWIBRr45rYpVLv8imJ103XHNurNcmnnPipKo0MvyX
/a9/B3P/ywjsStUMopEAikoyJz5Z4OLqzG/YF10rIh8iECxMmdY5eiNH8
A==;
X-CSE-ConnectionGUID: bR2ajoBlTrag82TUZHL8QA==
X-CSE-MsgGUID: +Wyx6HpCSta1UpApgE6Ihg==
X-IronPort-AV: E=McAfee;i="6800,10657,11454"; a="73688075"
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="73688075"
Received: from fmviesa008.fm.intel.com ([10.60.135.148])
by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2025 10:16:30 -0700
X-CSE-ConnectionGUID: FJy0HTRgQwOQUcGRKNBd1Q==
X-CSE-MsgGUID: kUg5iJ9+TZO17cpeoK7Jdw==
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="6.16,209,1744095600";
d="scan'208";a="145594823"
Received: from kanliang-dev.jf.intel.com ([10.165.154.102])
by fmviesa008.fm.intel.com with ESMTP; 04 Jun 2025 10:16:28 -0700
From: kan.liang@xxxxxxxxxxxxxxx
To: peterz@xxxxxxxxxxxxx,
mingo@xxxxxxxxxx,
namhyung@xxxxxxxxxx,
irogers@xxxxxxxxxx,
mark.rutland@xxxxxxx,
linux-kernel@xxxxxxxxxxxxxxx,
linux-perf-users@xxxxxxxxxxxxxxx
Cc: eranian@xxxxxxxxxx,
ctshao@xxxxxxxxxx,
tmricht@xxxxxxxxxxxxx,
Kan Liang <kan.liang@xxxxxxxxxxxxxxx>,
Leo Yan <leo.yan@xxxxxxx>,
Aishwarya TCV <aishwarya.tcv@xxxxxxx>,
Alexei Starovoitov <alexei.starovoitov@xxxxxxxxx>,
Venkat Rao Bagalkote <venkat88@xxxxxxxxxxxxx>
Subject: [PATCH V3] perf: Fix the throttle error of some clock events
Date: Wed, 4 Jun 2025 10:15:54 -0700
Message-Id: <20250604171554.3909897-1-kan.liang@xxxxxxxxxxxxxxx>
X-Mailer: git-send-email 2.38.1
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED,
DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
From: Kan Liang <kan.liang@xxxxxxxxxxxxxxx>
Both ARM and IBM CI reports RCU stall, which can be reproduced by the
below perf command.
perf record -a -e cpu-clock -- sleep 2
The issue is introduced by the generic throttle patch set, which
unconditionally invoke the event_stop() when throttle is triggered.
The cpu-clock and task-clock are two special SW events, which rely on
the hrtimer. The throttle is invoked in the hrtimer handler. The
event_stop()->hrtimer_cancel() waits for the handler to finish, which is
a deadlock. Instead of invoking the stop(), the HRTIMER_NORESTART should
be used to stop the timer.
There may be two ways to fix it.
- Introduce a PMU flag to track the case. Avoid the event_stop in
perf_event_throttle() if the flag is detected.
It has been implemented in the
https://lore.kernel.org/lkml/20250528175832.2999139-1-kan.liang@xxxxxxxxxxxxxxx/
The new flag was thought to be an overkill for the issue.
- Add a check in the event_stop. Return immediately if the throttle is
invoked in the hrtimer handler. Rely on the existing HRTIMER_NORESTART
method to stop the timer.
The latter is implemented here.
Move event->hw.interrupts = MAX_INTERRUPTS before the stop(). It makes
the order the same as perf_event_unthrottle(). Except the patch, no one
checks the hw.interrupts in the stop(). There is no impact from the
order change.
Reported-by: Leo Yan <leo.yan@xxxxxxx>
Reported-by: Aishwarya TCV <aishwarya.tcv@xxxxxxx>
Closes: https://lore.kernel.org/lkml/20250527161656.GJ2566836@xxxxxxxxxxxxxxx/
Reported-by: Alexei Starovoitov <alexei.starovoitov@xxxxxxxxx>
Closes: https://lore.kernel.org/lkml/djxlh5fx326gcenwrr52ry3pk4wxmugu4jccdjysza7tlc5fef@ktp4rffawgcw/
Reported-by: Venkat Rao Bagalkote <venkat88@xxxxxxxxxxxxx>
Closes: https://lore.kernel.org/lkml/8e8f51d8-af64-4d9e-934b-c0ee9f131293@xxxxxxxxxxxxx/
Signed-off-by: Kan Liang <kan.liang@xxxxxxxxxxxxxxx>
---
Changes since V2:
- Apply a different way to fix the issue.
Remove all Tested-by since a different way is applied
- Update the change log
- Add more Reported-by
kernel/events/core.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/kernel/events/core.c b/kernel/events/core.c
index f34c99f8ce8f..46441c23475d 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -2656,8 +2656,8 @@ static void perf_event_unthrottle(struct perf_event *event, bool start)
static void perf_event_throttle(struct perf_event *event)
{
- event->pmu->stop(event, 0);
event->hw.interrupts = MAX_INTERRUPTS;
+ event->pmu->stop(event, 0);
if (event == event->group_leader)
perf_log_throttle(event, 0);
}
@@ -11749,7 +11749,12 @@ static void perf_swevent_cancel_hrtimer(struct perf_event *event)
{
struct hw_perf_event *hwc = &event->hw;
- if (is_sampling_event(event)) {
+ /*
+ * The throttle can be triggered in the hrtimer handler.
+ * The HRTIMER_NORESTART should be used to stop the timer,
+ * rather than hrtimer_cancel(). See perf_swevent_hrtimer()
+ */
+ if (is_sampling_event(event) && (hwc->interrupts != MAX_INTERRUPTS)) {
ktime_t remaining = hrtimer_get_remaining(&hwc->hrtimer);
local64_set(&hwc->period_left, ktime_to_ns(remaining));
--
2.38.1
Return-Path: <linux-kernel+bounces-673585-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 8D55C41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:19:21 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id EFD9F3A5253
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:18:20 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id AC3EB220F41;
Wed, 4 Jun 2025 17:16:38 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="AFkwo8kR"
Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id DE00C20FA81
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:16:35 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.52
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749057397; cv=none; b=KtZI/+KKCfj7ShnhAaD8IsM0Rw7umBNDBdNZd6aZCfNJN7SVQlahhYUqY2W6tyKBrk4BKQHS006Gy1CEBmotPVOJY0seAxsIMqQ0TcKV2vCKwK9gqsV2JKEiqG/ZRZSg08LwUMBy2slUNSvPfMQXy5Fl0srmpvPpTZbWIpdQEzA=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749057397; c=relaxed/simple;
bh=5l4eYXK/UGIl+TXQnZwANU66ClnBTNssKdiHYV/yMZ4=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=AiCzWriL1zXfKGzhOBkbuIhoVyP52dr9Q0f3cEZtJoJbw+owku8ZBh2wuzY7z6NCaxQliPgcOGTZhQZINEpCo63StdyrNLaHBxbsrSk6fCVHZkVfb7EQBCV0a6tHELHek50nXdz0GseBDg0+T54kNXNFyTIfsiw0dW1iwfbW3PE=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=AFkwo8kR; arc=none smtp.client-ip=209.85.216.52
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com
Received: by mail-pj1-f52.google.com with SMTP id 98e67ed59e1d1-311a6236effso64773a91.2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 10:16:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1749057395; x=1749662195; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=2tvKQDIIBJb26wPDVIJoD2xzubcY8uay1NjKLxC4PFw=;
b=AFkwo8kRJMjud/rwko8n6NMqRVUEg5eXTYwB2mg8Sz38y1yTr6IMjHYWq7SBPzafXw
9L4Y16FkzdBoBjQBMj0hUBCii6H73b8EmumPhqYXqRmqumJNeHQbYRLGesVMoj/+/3pO
nw29qRumIb4h265dL1GE7Br6Seh1mfp80kLWtYdSXCGtp55Z3wmkmwzuos3JIk1UKxmf
9T4LubxFNgMUyPBdmEL5zxLpYCCPOfVbirRBFV8uo4BweAsfYynFa8GF2xu32NZw5jIh
zl1hitW5Z7vyEoGZOpfdcw3z2dw6fMbUdBGJldbL9Hg263zyU7iLQWUqh2D4Nu+d6bWZ
LfwA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749057395; x=1749662195;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=2tvKQDIIBJb26wPDVIJoD2xzubcY8uay1NjKLxC4PFw=;
b=TjWXLGfDaLtNFHGHYZ5kHyJPCOn5uRiKY0fDw2lIzydix+72b0UIarmJkBkWRD6ZkP
80OxkHyk8fSa4cmv8O7pouyFu9z5+bXtLQZGSEEp88WUVED2dQi7zVjKOQjubUdLO7id
02SjjPRnKw+7/w92mT79OdHGnsq6+8nOZnZMBh9gnfaHdJ2mjITmW4Yg6CqhXVtYltYm
T0vPOjyYeNEWCHZsRjwfjprTlc5CPXYsc07zU92xu0QGDxZJQX4Y/s37nKmVcz60A/Dn
z+33Z4BuatVBtBvl6gFHLuYcWwPRx0IEb0DZCTVPGFDri6mvtywj3GgW1xXFg5LXACIQ
0cYg==
X-Gm-Message-State: AOJu0Yy38ehk6J+9MDjemHky+LMX0/coBTuct00VI/OnhEIm/qontrWa
aQSaZXBUFnqnWorjVdufCL/nkeqwi5x98ccZOr+vK/yp06v3MISOD85mNvCbRgMkWps=
X-Gm-Gg: ASbGnctNFfQXXsiDLCwqLce/UvzP0UIjXTNsUNShIAyaGZLaW+ePH7A1ZhC2WKHUtIP
971Q20WQFdbkQvPLIicq9ZOzN1BZaW4a4EOK3wgeuAamF2y+HkTnRJrEN9j8Qf+6modkBAsyLlC
+FiFObpBrN2t9GnN2gTHY1CkLghu18cTtyD/LwCfhMRTykgzdsc4wCJC8yu4DbdIS7SjiOHhsGn
Wb0tWrJAkO9O9LxsL99ckEwxqxLUI1i9m2Tbxx9Tu3mudlTgXimVwggjAFWCcjD3E57MYkBna5S
w4btp4RSJyQDyr6LcgztvDX80l87ZppKkpo6v/XXgK5pkOkV/81XIwBYZfkJPAgMiyR2U47W
X-Google-Smtp-Source: AGHT+IG+Qv2DNy5GUYLSr8qaMd4z1JKIMYQvC0rcwVPQ/+dBpmSSBbz8jQQs3wb6D/V0cK/kK11nfA==
X-Received: by 2002:a17:90b:54cf:b0:311:c5d9:2c79 with SMTP id 98e67ed59e1d1-3130cd31ea9mr4868567a91.21.1749057395003;
Wed, 04 Jun 2025 10:16:35 -0700 (PDT)
Received: from debug.ba.rivosinc.com ([64.71.180.162])
by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3124e2e9c9fsm9178972a91.30.2025.06.04.10.16.32
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 10:16:34 -0700 (PDT)
From: Deepak Gupta <debug@xxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 10:15:31 -0700
Subject: [PATCH v17 07/27] riscv/mm: manufacture shadow stack pte
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <20250604-v5_user_cfi_series-v17-7-4565c2cf869f@xxxxxxxxxxxx>
References: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
In-Reply-To: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
To: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>,
Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>,
x86@xxxxxxxxxx, "H. Peter Anvin" <hpa@xxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>,
Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>,
Paul Walmsley <paul.walmsley@xxxxxxxxxx>,
Palmer Dabbelt <palmer@xxxxxxxxxxx>, Albert Ou <aou@xxxxxxxxxxxxxxxxx>,
Conor Dooley <conor@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>,
Christian Brauner <brauner@xxxxxxxxxx>,
Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Oleg Nesterov <oleg@xxxxxxxxxx>,
Eric Biederman <ebiederm@xxxxxxxxxxxx>, Kees Cook <kees@xxxxxxxxxx>,
Jonathan Corbet <corbet@xxxxxxx>, Shuah Khan <shuah@xxxxxxxxxx>,
Jann Horn <jannh@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>,
Miguel Ojeda <ojeda@xxxxxxxxxx>, Alex Gaynor <alex.gaynor@xxxxxxxxx>,
Boqun Feng <boqun.feng@xxxxxxxxx>, Gary Guo <gary@xxxxxxxxxxx>,
=?utf-8?q?Bj=C3=B6rn_Roy_Baron?= <bjorn3_gh@xxxxxxxxxxxxxx>,
Benno Lossin <benno.lossin@xxxxxxxxx>,
Andreas Hindborg <a.hindborg@xxxxxxxxxx>, Alice Ryhl <aliceryhl@xxxxxxxxxx>,
Trevor Gross <tmgross@xxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx,
linux-mm@xxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx,
linux-doc@xxxxxxxxxxxxxxx, linux-kselftest@xxxxxxxxxxxxxxx,
alistair.francis@xxxxxxx, richard.henderson@xxxxxxxxxx, jim.shu@xxxxxxxxxx,
andybnac@xxxxxxxxx, kito.cheng@xxxxxxxxxx, charlie@xxxxxxxxxxxx,
atishp@xxxxxxxxxxxx, evan@xxxxxxxxxxxx, cleger@xxxxxxxxxxxx,
alexghiti@xxxxxxxxxxxx, samitolvanen@xxxxxxxxxx, broonie@xxxxxxxxxx,
rick.p.edgecombe@xxxxxxxxx, rust-for-linux@xxxxxxxxxxxxxxx,
Zong Li <zong.li@xxxxxxxxxx>, Deepak Gupta <debug@xxxxxxxxxxxx>
X-Mailer: b4 0.13.0
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
This patch implements creating shadow stack pte (on riscv). Creating
shadow stack PTE on riscv means that clearing RWX and then setting W=1.
Reviewed-by: Alexandre Ghiti <alexghiti@xxxxxxxxxxxx>
Reviewed-by: Zong Li <zong.li@xxxxxxxxxx>
Signed-off-by: Deepak Gupta <debug@xxxxxxxxxxxx>
---
arch/riscv/include/asm/pgtable.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h
index dba257cc4e2d..f21c888f59eb 100644
--- a/arch/riscv/include/asm/pgtable.h
+++ b/arch/riscv/include/asm/pgtable.h
@@ -433,6 +433,11 @@ static inline pte_t pte_mkwrite_novma(pte_t pte)
return __pte(pte_val(pte) | _PAGE_WRITE);
}
+static inline pte_t pte_mkwrite_shstk(pte_t pte)
+{
+ return __pte((pte_val(pte) & ~(_PAGE_LEAF)) | _PAGE_WRITE);
+}
+
/* static inline pte_t pte_mkexec(pte_t pte) */
static inline pte_t pte_mkdirty(pte_t pte)
@@ -778,6 +783,11 @@ static inline pmd_t pmd_mkwrite_novma(pmd_t pmd)
return pte_pmd(pte_mkwrite_novma(pmd_pte(pmd)));
}
+static inline pmd_t pmd_mkwrite_shstk(pmd_t pte)
+{
+ return __pmd((pmd_val(pte) & ~(_PAGE_LEAF)) | _PAGE_WRITE);
+}
+
static inline pmd_t pmd_wrprotect(pmd_t pmd)
{
return pte_pmd(pte_wrprotect(pmd_pte(pmd)));
--
2.43.0
Return-Path: <linux-kernel+bounces-673586-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 5105941E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:19:25 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 5BB64188F5C2
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:19:22 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 8A46522D790;
Wed, 4 Jun 2025 17:16:41 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="Tg/7NlgR"
Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0429C212FB0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:16:38 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.171
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749057400; cv=none; b=GHCKY7UzmDSrl8jemhtaUCFztZktl/JoxnQ8M1uAulqAGWKDEcU4Gs8k8IkZkWIRxjGufaloHE+89YXIoxCUcKNn7vO6pvnR9PjyW7eMwHHHLTQluTRowmMXn5ox3tUfJtxPtJlGTalRh9UgGihIXG0YWgW+UpD2S4/2X0jjdf4=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749057400; c=relaxed/simple;
bh=sfs/voBRgEO0N2IxC4EipgroXAUwYP7ftsvLbUORtCw=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=F/74ZHOz4SDVr1dWVTeM7YYRMR1n/a86UApsCXBOQkTu5jE4f/ZD0jQOz6A6qoQXuCW03/C+RhcaP9EhyM4usDZWEjEYd0PsKhbwk8E4A5oMT9egdMGN1XFKgXXY/sVdsHojss7AkoaB/Djrk/rX52rV0/OmEl5sI+h9L1zFV4g=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=Tg/7NlgR; arc=none smtp.client-ip=209.85.214.171
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com
Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-234d366e5f2so897265ad.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 10:16:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1749057398; x=1749662198; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=RWhABZTC7HgMOVZUdFo2P0cmdg9cGlaFRd3WQ+8L7gE=;
b=Tg/7NlgROD1tWblZMmMRK0vAHPpTgvb0aSzjnTE80f7xZObh0ut1lgIIMa4jLMj/hq
X3Bv82f7ydU30tSttR9NUxsYQssAvX6MP+00sf8px+aVEN5QhalnkCZRhHevs19TrWOa
/RUu6CFBds3CznmXTUc2hc07/MMYqJHlfNDzipfLMp6BcFh3NQiPytfMm+DcruXVVCr1
9zeptFYKAIe+hx6Wyc+zdDBgvtuhZtfhydQuJJudafkar+IEVR3IeB+u+BEWD0N0f24u
RxzQ0d8evm2MB/yIuibSf9S8Yv5MeuFBHeVjvN+xKsgQgrSJybw6Qk2Qo6n8Nn+Es+48
S4yQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749057398; x=1749662198;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=RWhABZTC7HgMOVZUdFo2P0cmdg9cGlaFRd3WQ+8L7gE=;
b=JNkR2n/0jX3RBMlioLXD7sA81iBAD2cy/9QJf+8D9auojmXCywG/+Fmizo9bRtP57Q
czdGx/tHlb8I22gZ9vOzSinz9pAGQcFHDfquyuEpZ3PSXZs7B+EXTuqw2F/Ytx5GKB+/
dnKj0scqkBijr5khe/1FC5YfAsDGIer9QLVZUXk8kA85M/Gz0HiHq+sCvbE9C8LtxeCH
32Mv063U8Tr8sIhcIOXsbiv3dFSj76b8S5ig+UvQY3HWCnNi45P2AYM55dqNkuGIXRAR
uGUWOnyBY9vx6FfjuV/ov7XsRbVlN7AWDNMiV5QIitsi1plonwAwUt9Mg2C7Lige6Buh
zeJA==
X-Gm-Message-State: AOJu0Yyc8aulxKPaA6rbbg7Voy9OwjGdac2DbvgAUYZ8CtqPdgNoWJG0
qgF0RWeMVv5d5a6ma5n6dO9z6i9viAwvPetwjZjcLXXqwiS47AvRsJ2UG5vUOhcAbI4=
X-Gm-Gg: ASbGncvxHoJIlOPpI97Hdo0ldMIG6Wrt8J63gpVz/eP/BEh+R9f4BK8rxSrETBvvvg3
00cDhdaWG2dmla6RpyCOSF/brDoMyvyaq1o1Fj5YUDEzIC6XAs1TdlA33DjMOPTWmzFqFVJ1Mhw
o9ZefmB7DaGh04XHg253R3zaeaY6+YsnPdXQsqj+q2nQkQfIDEOgyAk5Lbtgv1d/Wo19c4uOOjK
cjlWeMFUHBtudSer6baASiQN1nHk2/wdVWqrpnZKvkrfdfl28JoYdszw3bp7mYYfq+/RJhCDIWO
pSZOqaZQ/4pD+JuvrgcFYHdHLvxVLlElaeF7k5ybh9WC+xy5lDHYdftDsAVhcw==
X-Google-Smtp-Source: AGHT+IESzgVoI6jsn8EBaGsznchFbfhdmr9dOihFSf5lgEfKGzXoOOTnsQHJIuLLab2X/wZNB3LJLg==
X-Received: by 2002:a17:903:3d0b:b0:234:a033:b6f6 with SMTP id d9443c01a7336-235e11cb901mr49065825ad.31.1749057398132;
Wed, 04 Jun 2025 10:16:38 -0700 (PDT)
Received: from debug.ba.rivosinc.com ([64.71.180.162])
by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3124e2e9c9fsm9178972a91.30.2025.06.04.10.16.35
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 10:16:37 -0700 (PDT)
From: Deepak Gupta <debug@xxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 10:15:32 -0700
Subject: [PATCH v17 08/27] riscv/mm: teach pte_mkwrite to manufacture
shadow stack PTEs
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <20250604-v5_user_cfi_series-v17-8-4565c2cf869f@xxxxxxxxxxxx>
References: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
In-Reply-To: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
To: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>,
Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>,
x86@xxxxxxxxxx, "H. Peter Anvin" <hpa@xxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>,
Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>,
Paul Walmsley <paul.walmsley@xxxxxxxxxx>,
Palmer Dabbelt <palmer@xxxxxxxxxxx>, Albert Ou <aou@xxxxxxxxxxxxxxxxx>,
Conor Dooley <conor@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>,
Christian Brauner <brauner@xxxxxxxxxx>,
Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Oleg Nesterov <oleg@xxxxxxxxxx>,
Eric Biederman <ebiederm@xxxxxxxxxxxx>, Kees Cook <kees@xxxxxxxxxx>,
Jonathan Corbet <corbet@xxxxxxx>, Shuah Khan <shuah@xxxxxxxxxx>,
Jann Horn <jannh@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>,
Miguel Ojeda <ojeda@xxxxxxxxxx>, Alex Gaynor <alex.gaynor@xxxxxxxxx>,
Boqun Feng <boqun.feng@xxxxxxxxx>, Gary Guo <gary@xxxxxxxxxxx>,
=?utf-8?q?Bj=C3=B6rn_Roy_Baron?= <bjorn3_gh@xxxxxxxxxxxxxx>,
Benno Lossin <benno.lossin@xxxxxxxxx>,
Andreas Hindborg <a.hindborg@xxxxxxxxxx>, Alice Ryhl <aliceryhl@xxxxxxxxxx>,
Trevor Gross <tmgross@xxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx,
linux-mm@xxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx,
linux-doc@xxxxxxxxxxxxxxx, linux-kselftest@xxxxxxxxxxxxxxx,
alistair.francis@xxxxxxx, richard.henderson@xxxxxxxxxx, jim.shu@xxxxxxxxxx,
andybnac@xxxxxxxxx, kito.cheng@xxxxxxxxxx, charlie@xxxxxxxxxxxx,
atishp@xxxxxxxxxxxx, evan@xxxxxxxxxxxx, cleger@xxxxxxxxxxxx,
alexghiti@xxxxxxxxxxxx, samitolvanen@xxxxxxxxxx, broonie@xxxxxxxxxx,
rick.p.edgecombe@xxxxxxxxx, rust-for-linux@xxxxxxxxxxxxxxx,
Zong Li <zong.li@xxxxxxxxxx>, Deepak Gupta <debug@xxxxxxxxxxxx>
X-Mailer: b4 0.13.0
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
pte_mkwrite creates PTEs with WRITE encodings for underlying arch.
Underlying arch can have two types of writeable mappings. One that can be
written using regular store instructions. Another one that can only be
written using specialized store instructions (like shadow stack stores).
pte_mkwrite can select write PTE encoding based on VMA range (i.e.
VM_SHADOW_STACK)
Reviewed-by: Alexandre Ghiti <alexghiti@xxxxxxxxxxxx>
Reviewed-by: Zong Li <zong.li@xxxxxxxxxx>
Signed-off-by: Deepak Gupta <debug@xxxxxxxxxxxx>
---
arch/riscv/include/asm/pgtable.h | 7 +++++++
arch/riscv/mm/pgtable.c | 16 ++++++++++++++++
2 files changed, 23 insertions(+)
diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h
index f21c888f59eb..60d4821627d2 100644
--- a/arch/riscv/include/asm/pgtable.h
+++ b/arch/riscv/include/asm/pgtable.h
@@ -428,6 +428,10 @@ static inline pte_t pte_wrprotect(pte_t pte)
/* static inline pte_t pte_mkread(pte_t pte) */
+struct vm_area_struct;
+pte_t pte_mkwrite(pte_t pte, struct vm_area_struct *vma);
+#define pte_mkwrite pte_mkwrite
+
static inline pte_t pte_mkwrite_novma(pte_t pte)
{
return __pte(pte_val(pte) | _PAGE_WRITE);
@@ -778,6 +782,9 @@ static inline pmd_t pmd_mkyoung(pmd_t pmd)
return pte_pmd(pte_mkyoung(pmd_pte(pmd)));
}
+pmd_t pmd_mkwrite(pmd_t pmd, struct vm_area_struct *vma);
+#define pmd_mkwrite pmd_mkwrite
+
static inline pmd_t pmd_mkwrite_novma(pmd_t pmd)
{
return pte_pmd(pte_mkwrite_novma(pmd_pte(pmd)));
diff --git a/arch/riscv/mm/pgtable.c b/arch/riscv/mm/pgtable.c
index 4ae67324f992..0bedf6523108 100644
--- a/arch/riscv/mm/pgtable.c
+++ b/arch/riscv/mm/pgtable.c
@@ -155,3 +155,19 @@ pmd_t pmdp_collapse_flush(struct vm_area_struct *vma,
return pmd;
}
#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
+
+pte_t pte_mkwrite(pte_t pte, struct vm_area_struct *vma)
+{
+ if (vma->vm_flags & VM_SHADOW_STACK)
+ return pte_mkwrite_shstk(pte);
+
+ return pte_mkwrite_novma(pte);
+}
+
+pmd_t pmd_mkwrite(pmd_t pmd, struct vm_area_struct *vma)
+{
+ if (vma->vm_flags & VM_SHADOW_STACK)
+ return pmd_mkwrite_shstk(pmd);
+
+ return pmd_mkwrite_novma(pmd);
+}
--
2.43.0
Return-Path: <linux-kernel+bounces-673587-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id CB6DB41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:19:28 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id F0F71189313E
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:19:24 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id EDCA822DFB5;
Wed, 4 Jun 2025 17:16:41 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="5LMJuy8c"
Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 042F9216605;
Wed, 4 Jun 2025 17:16:38 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749057401; cv=none; b=n9S/vlxpvTJPFrvLeyg5QIVQo14rQREGw+yuYzbqucyhYqr06okpR0FfZCsoOj8hLj/syyeT4H9isHldX3s/8EwIoQZDPVW6u1fBp900sOcOfsbfNJw6N9vL4iiK65EjzZ6r+XVULG7DVu/wir65MSnJkFhxyA//5mtB165cWiM=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749057401; c=relaxed/simple;
bh=jqI3bnr2y0DT3lT0IjpB2KyKs3IAiXIr+YBxZOeldNk=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=Ow8n/Zam8UwJEdljYZ3eZvmASIwmRvJZyo59pUS7sDkp+dIQYE0gbC8b7jXDd2ck9ikZh8PPInQcZ58QVxxE9l1dzfhcyubaPJ8a9l72IFaKjJbweRzkkMvnQ2EQwJ9WeUDD+9IGp2zRuxME46qMVu/q+yT3W3DQMKqnP5mKeQE=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=5LMJuy8c; arc=none smtp.client-ip=156.67.10.101
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch;
s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version:
References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject:
Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:
Content-ID:Content-Description:Content-Disposition:In-Reply-To:References;
bh=pbjjAievrk0TRpJw/qD0GOXbcxqQaMhuiUNPc/d2A7k=; b=5LMJuy8czXGhJbnvQhd/7KM5jD
xTa7+YBTRAVXVqntNCeDTCOV8p8YdzlX479W00i+Zc4rVUj/Ytd2u4EdMhrqVfrKBSYofbfOUA0X9
dqwY8Jipbbud+Qt2813lGG7FaNXlnpzblFG7oIcsHY/9L+SoNnNIXq1/wzThGSQch2Uo=;
Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2)
(envelope-from <andrew@xxxxxxx>)
id 1uMrj3-00EhMP-QE; Wed, 04 Jun 2025 19:16:29 +0200
Date: Wed, 4 Jun 2025 19:16:29 +0200
From: Andrew Lunn <andrew@xxxxxxx>
To: Stefano Radaelli <stefano.radaelli21@xxxxxxxxx>
Cc: devicetree@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
othacehe@xxxxxxx, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>, Shawn Guo <shawnguo@xxxxxxxxxx>,
Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>,
Pengutronix Kernel Team <kernel@xxxxxxxxxxxxxx>,
Fabio Estevam <festevam@xxxxxxxxx>, imx@xxxxxxxxxxxxxxx,
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [v2] arm64: dts: freescale: imx93-var-som: update eqos support
for MaxLinear PHY
Message-ID: <92e4de77-07da-4583-bf0f-46891101c327@xxxxxxx>
References: <20250604153510.55689-1-stefano.radaelli21@xxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20250604153510.55689-1-stefano.radaelli21@xxxxxxxxx>
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
&eqos {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_eqos>;
+ /*
+ * The required RGMII TX and RX 2ns delays are implemented directly
+ * in hardware via passive delay elements on the SOM PCB.
+ * No delay configuration is needed in software via PHY driver.
+ */
phy-mode = "rgmii";
For this part only:
Reviewed-by: Andrew Lunn <andrew@xxxxxxx>
Andrew
Return-Path: <linux-kernel+bounces-673588-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 1A4B041E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:20:03 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 5E0081894057
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:19:53 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 7BA2D234964;
Wed, 4 Jun 2025 17:16:46 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="zdt7k5Df"
Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 82624231832
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:16:43 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.172
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749057405; cv=none; b=fXv8rOeUXMETTlz2L/MTyrOT5WHvxFFGF6SyFOfo/mHGQOfFyOUDwznEnyb8ZWFqyYy2znWCq3SYMtQjF8VX8howHKQZL9Qg2QmBydO8FOarZjge/jzt+ilxdn+U9m5Zh8BqB2Xze0/hvhYA5ZP7w/+KRe4utow2k118LV0skEA=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749057405; c=relaxed/simple;
bh=eDl9/FLAtbK/flEu4IAVWy5gxeoiMiEB2MqW8GUlkO0=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=aVz6gvQmhZ7+ib91KH01bL936XDIBSaX71HLNg7nvkRU/nc+JV99XITaGyHN3DTJ2ZmwsiAUBLoviDTxCk0x07ukB1+5KeF6oIvCTD1lxncccl4In9JacNjE+um+R+PTnqIZhp8swhHLTNXglZo88SE74vH2vMBjfR8DjIiWf9w=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=zdt7k5Df; arc=none smtp.client-ip=209.85.214.172
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com
Received: by mail-pl1-f172.google.com with SMTP id d9443c01a7336-22e16234307so1447085ad.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 10:16:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1749057403; x=1749662203; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=OtKPI2Naweua6KOKoYxAPpZu6IW/4+X8POy/Zey8NJ8=;
b=zdt7k5DfyAIEj0TR7W+EhubRuhRId3YvtcoUGGdvtMCoKwRBmxJcgI0qN06E1pfvAc
84+Um7/wy//6R1+04Z4GfdQ8a/WSAJs8zoRnUl7/a9CePdie+Ga62uP01X7RPaMPZpvq
1DE549+SpyCpAypzK3BuJF+CFL/HMBC4uqu1xksQF5dhou/T1/57ZMvp/OJNEWyyVF6h
0LeGDvP6WAtl7FkdESjPIWg96L5+89tWg6cpqeBmKOAdiF7nEoiSBKHmv4LdtXDQBc71
+e5RP0bRsdbR7RA+MgK8pXCxC9zaFwgALxLJjYoPlVp2XU41iEVxvC0s0H9KYscj26M3
HdEA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749057403; x=1749662203;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=OtKPI2Naweua6KOKoYxAPpZu6IW/4+X8POy/Zey8NJ8=;
b=QZKcfQS66gk9fzivGA1Epji/iWrvg36IJLx9IPTxni6JXR7TtxM480VfgdGmpAM/cU
4jRZaM0WDKAr+k5liEtB57TXxw8aveyxap8o3sNlQWUqimHOQCIecugaAXPR7z3kIocO
hB8vvqeiIQPcaCyK/ugxsujL7a6RwouKQKaK4aENgv2oGWHNlHzJR3EYKl8yIbILalP8
x+cuMMAIWtTsrnqJQ9o2Z3jA2DdadVp0ff9AFUB82EHR3/YsjievT00O3h7tV7Qyv9Bd
aJK/dzlfmnkDLGylG8QaRgDyGEva1QNYgdMGonnFVeyXjOA00zGFfIJb9uZQ53HHf8CC
6D4A==
X-Gm-Message-State: AOJu0YwEM/FwIgzDYdyUptJohU4GYGfk2dKiipoPkW5HKfzYfsrTgCIk
7vBCz/6/6Br78lmohYhPoznZq+oh+Q02eKpBvEAsIjFUq3xoVTrqixx6qftvGgffX6Op4YzJwcL
K8+oi
X-Gm-Gg: ASbGncvgNGBxHfqKsovj6a5bGDaPb4+zxnotXZFA+ps6cCRUvaWvXPPZiyQPLNxYglu
rkwOe6bogRVk2P2r+55wtvOZzElC71HQEQ55Ec0AUOxDCv0Q1vEIsWaD+bWzDFumYLi9mGc7rYE
ygGrKX/Z2QZaGujn3R2gPCc143Hp0Ynfgh3tUTcslmGPEoRoA20e2WgX1wFpBTNpuZLNxZBCJTi
44y152nokrnRhn8hC2BRxD89hothk9sNBq4uuiEySfBbx7iaVSxc7Tpw3oH9YajbRAsyJo9/cdQ
RNyXGmlcnhH7EZz2BI6J6kFXUuecwu8kcK+fHeLA+QHGv5LL7NFHrCkFBgsvvA==
X-Google-Smtp-Source: AGHT+IHE2S1H2Kp8xKCw0ZpGRZuaXR3xr247uSwdF5+LhUIbu38f5b5b/U4ShdbPQxItyXeG4sG0mQ==
X-Received: by 2002:a17:90b:38c9:b0:311:b5ac:6f7d with SMTP id 98e67ed59e1d1-31328f8b1admr363794a91.6.1749057391469;
Wed, 04 Jun 2025 10:16:31 -0700 (PDT)
Received: from debug.ba.rivosinc.com ([64.71.180.162])
by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3124e2e9c9fsm9178972a91.30.2025.06.04.10.16.28
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 10:16:31 -0700 (PDT)
From: Deepak Gupta <debug@xxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 10:15:30 -0700
Subject: [PATCH v17 06/27] riscv/mm : ensure PROT_WRITE leads to VM_READ |
VM_WRITE
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <20250604-v5_user_cfi_series-v17-6-4565c2cf869f@xxxxxxxxxxxx>
References: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
In-Reply-To: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
To: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>,
Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>,
x86@xxxxxxxxxx, "H. Peter Anvin" <hpa@xxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>,
Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>,
Paul Walmsley <paul.walmsley@xxxxxxxxxx>,
Palmer Dabbelt <palmer@xxxxxxxxxxx>, Albert Ou <aou@xxxxxxxxxxxxxxxxx>,
Conor Dooley <conor@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>,
Christian Brauner <brauner@xxxxxxxxxx>,
Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Oleg Nesterov <oleg@xxxxxxxxxx>,
Eric Biederman <ebiederm@xxxxxxxxxxxx>, Kees Cook <kees@xxxxxxxxxx>,
Jonathan Corbet <corbet@xxxxxxx>, Shuah Khan <shuah@xxxxxxxxxx>,
Jann Horn <jannh@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>,
Miguel Ojeda <ojeda@xxxxxxxxxx>, Alex Gaynor <alex.gaynor@xxxxxxxxx>,
Boqun Feng <boqun.feng@xxxxxxxxx>, Gary Guo <gary@xxxxxxxxxxx>,
=?utf-8?q?Bj=C3=B6rn_Roy_Baron?= <bjorn3_gh@xxxxxxxxxxxxxx>,
Benno Lossin <benno.lossin@xxxxxxxxx>,
Andreas Hindborg <a.hindborg@xxxxxxxxxx>, Alice Ryhl <aliceryhl@xxxxxxxxxx>,
Trevor Gross <tmgross@xxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx,
linux-mm@xxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx,
linux-doc@xxxxxxxxxxxxxxx, linux-kselftest@xxxxxxxxxxxxxxx,
alistair.francis@xxxxxxx, richard.henderson@xxxxxxxxxx, jim.shu@xxxxxxxxxx,
andybnac@xxxxxxxxx, kito.cheng@xxxxxxxxxx, charlie@xxxxxxxxxxxx,
atishp@xxxxxxxxxxxx, evan@xxxxxxxxxxxx, cleger@xxxxxxxxxxxx,
alexghiti@xxxxxxxxxxxx, samitolvanen@xxxxxxxxxx, broonie@xxxxxxxxxx,
rick.p.edgecombe@xxxxxxxxx, rust-for-linux@xxxxxxxxxxxxxxx,
Zong Li <zong.li@xxxxxxxxxx>, Deepak Gupta <debug@xxxxxxxxxxxx>
X-Mailer: b4 0.13.0
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
`arch_calc_vm_prot_bits` is implemented on risc-v to return VM_READ |
VM_WRITE if PROT_WRITE is specified. Similarly `riscv_sys_mmap` is
updated to convert all incoming PROT_WRITE to (PROT_WRITE | PROT_READ).
This is to make sure that any existing apps using PROT_WRITE still work.
Earlier `protection_map[VM_WRITE]` used to pick read-write PTE encodings.
Now `protection_map[VM_WRITE]` will always pick PAGE_SHADOWSTACK PTE
encodings for shadow stack. Above changes ensure that existing apps
continue to work because underneath kernel will be picking
`protection_map[VM_WRITE|VM_READ]` PTE encodings.
Reviewed-by: Zong Li <zong.li@xxxxxxxxxx>
Reviewed-by: Alexandre Ghiti <alexghiti@xxxxxxxxxxxx>
Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
Signed-off-by: Deepak Gupta <debug@xxxxxxxxxxxx>
---
arch/riscv/include/asm/mman.h | 26 ++++++++++++++++++++++++++
arch/riscv/include/asm/pgtable.h | 1 +
arch/riscv/kernel/sys_riscv.c | 10 ++++++++++
arch/riscv/mm/init.c | 2 +-
4 files changed, 38 insertions(+), 1 deletion(-)
diff --git a/arch/riscv/include/asm/mman.h b/arch/riscv/include/asm/mman.h
new file mode 100644
index 000000000000..0ad1d19832eb
--- /dev/null
+++ b/arch/riscv/include/asm/mman.h
@@ -0,0 +1,26 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __ASM_MMAN_H__
+#define __ASM_MMAN_H__
+
+#include <linux/compiler.h>
+#include <linux/types.h>
+#include <linux/mm.h>
+#include <uapi/asm/mman.h>
+
+static inline unsigned long arch_calc_vm_prot_bits(unsigned long prot,
+ unsigned long pkey __always_unused)
+{
+ unsigned long ret = 0;
+
+ /*
+ * If PROT_WRITE was specified, force it to VM_READ | VM_WRITE.
+ * Only VM_WRITE means shadow stack.
+ */
+ if (prot & PROT_WRITE)
+ ret = (VM_READ | VM_WRITE);
+ return ret;
+}
+
+#define arch_calc_vm_prot_bits(prot, pkey) arch_calc_vm_prot_bits(prot, pkey)
+
+#endif /* ! __ASM_MMAN_H__ */
diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h
index 428e48e5f57d..dba257cc4e2d 100644
--- a/arch/riscv/include/asm/pgtable.h
+++ b/arch/riscv/include/asm/pgtable.h
@@ -182,6 +182,7 @@ extern struct pt_alloc_ops pt_ops __meminitdata;
#define PAGE_READ_EXEC __pgprot(_PAGE_BASE | _PAGE_READ | _PAGE_EXEC)
#define PAGE_WRITE_EXEC __pgprot(_PAGE_BASE | _PAGE_READ | \
_PAGE_EXEC | _PAGE_WRITE)
+#define PAGE_SHADOWSTACK __pgprot(_PAGE_BASE | _PAGE_WRITE)
#define PAGE_COPY PAGE_READ
#define PAGE_COPY_EXEC PAGE_READ_EXEC
diff --git a/arch/riscv/kernel/sys_riscv.c b/arch/riscv/kernel/sys_riscv.c
index d77afe05578f..43a448bf254b 100644
--- a/arch/riscv/kernel/sys_riscv.c
+++ b/arch/riscv/kernel/sys_riscv.c
@@ -7,6 +7,7 @@
#include <linux/syscalls.h>
#include <asm/cacheflush.h>
+#include <asm-generic/mman-common.h>
static long riscv_sys_mmap(unsigned long addr, unsigned long len,
unsigned long prot, unsigned long flags,
@@ -16,6 +17,15 @@ static long riscv_sys_mmap(unsigned long addr, unsigned long len,
if (unlikely(offset & (~PAGE_MASK >> page_shift_offset)))
return -EINVAL;
+ /*
+ * If PROT_WRITE is specified then extend that to PROT_READ
+ * protection_map[VM_WRITE] is now going to select shadow stack encodings.
+ * So specifying PROT_WRITE actually should select protection_map [VM_WRITE | VM_READ]
+ * If user wants to create shadow stack then they should use `map_shadow_stack` syscall.
+ */
+ if (unlikely((prot & PROT_WRITE) && !(prot & PROT_READ)))
+ prot |= PROT_READ;
+
return ksys_mmap_pgoff(addr, len, prot, flags, fd,
offset >> (PAGE_SHIFT - page_shift_offset));
}
diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
index ab475ec6ca42..78b27164bf83 100644
--- a/arch/riscv/mm/init.c
+++ b/arch/riscv/mm/init.c
@@ -375,7 +375,7 @@ pgd_t early_pg_dir[PTRS_PER_PGD] __initdata __aligned(PAGE_SIZE);
static const pgprot_t protection_map[16] = {
[VM_NONE] = PAGE_NONE,
[VM_READ] = PAGE_READ,
- [VM_WRITE] = PAGE_COPY,
+ [VM_WRITE] = PAGE_SHADOWSTACK,
[VM_WRITE | VM_READ] = PAGE_COPY,
[VM_EXEC] = PAGE_EXEC,
[VM_EXEC | VM_READ] = PAGE_READ_EXEC,
--
2.43.0
Return-Path: <linux-kernel+bounces-673590-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 5864D41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:20:27 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id C27561899D4A
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:20:14 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 3AC5F2367BB;
Wed, 4 Jun 2025 17:16:48 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="npdBRfLc"
Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.181])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0FE5823371B
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:16:44 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.181
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749057407; cv=none; b=MbL3AFCTmdT5tbcQUn1F2/sUoCdtq1sXsEO/DO3LgNSwXjLTIsPoXSllRW2fPK4XYOFYs2iorx06DDSveLMQi5Ux4TfvEkEKk1AtTfKUXjDkQjEN1PhaRZQlNfsaehggG+aAJdXX6mPkIIZ7eAwVZc4EbAcWLpNbkMkM0+I25HA=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749057407; c=relaxed/simple;
bh=blEoqggQsQhRB0qQ2LOUYe1TBy9Har2a+Y7ff8LDB+0=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=J65uAjqlZtFkX0kOUJC7kTdy8cKznTFNkne4Rjy5+m6tZQkQ6A+C9M9ocrd92aFULFN0VsunFs8Uc46zgWHFCdNVoEF5Zpu1/eYPIe0qTYDd0bxBIkIQl3MozKYU8k/eW/tOZgc/GyGrGfN+14rvtL4lL38XUqNijx73m27CKe4=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=npdBRfLc; arc=none smtp.client-ip=209.85.215.181
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com
Received: by mail-pg1-f181.google.com with SMTP id 41be03b00d2f7-b2efa17ed25so1064961a12.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 10:16:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1749057404; x=1749662204; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=YoM38xw3FRuDhuA6RoI5dV9L/poXJy4s4CZPvznw1r4=;
b=npdBRfLcUzI5YgRVuUZT30G+0m8hl7eg7720AmTG3/VfGWMIcGhfXuq7HvSKyxTUVg
gtPM7quRN5v3oV9PuRTHalwfsYk5ls8NU5W2joELd4TcbioEfR7lTP723pDrx/0sGbiW
4GvDaz+rhdD/ArRS0C6AuoDSzchLkgILphisgpwVuaIdQpBicbQORZ6yrIaxjpNlfqpt
eCsC+JqSvdSuxri4BfEccIs8zz/Q5ttD8gdInQLThRd59NIyMBsF/xY6/uOAZDis4jCJ
7ED8Q2WrZuXzQubGbGt5A6lJUQlh3kVeXcKSjQ3JkB6ML91Zx/qkGnuitpYVWxMlslgn
DOMg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749057404; x=1749662204;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=YoM38xw3FRuDhuA6RoI5dV9L/poXJy4s4CZPvznw1r4=;
b=fiYPvBtf5gtwAv41ddojd2goqsmJgvjZjQVaq/3sUNMcflJyeRLh/fXGjO75R+2kcC
5stoHtIjCmfZaoZnlchGCmFr/2IOUKCfmc0QIZXzuZXoJd2xD+lbh1saVIWlF7bmofp/
XABNwO88gJOKOG9FKsSZqSJmsyr0e35gZxg/R/Rf4va/MSlcVw0SvNUZ+MnuZHU8eCvj
BNTuQdeGpy+5k5RlsZcrkV9eRmwOlBq3yGUwUH85XZadreNldZ7TP+houJDdrmWBOALk
Zp8SkwA9epkLWL/MhUcwH5hiaOnJSgU86iGNZxHRL5oJk3SDfTygu9zQ2JyXhOx6crWU
PdNw==
X-Gm-Message-State: AOJu0YzdCUfa8jUH6oBznioWl3oofmrXMFVQRdqp5yQHfeoibbpJpZyf
bEm5LcDIO75NVavVcMSIQHOLU0QGMA5BOTxgp6rzsgIMWtxDeO/UzkEjgT5nK4C1qcY=
X-Gm-Gg: ASbGncv/u4kD8s1d5g4LuyTlE00I6UXP8bQThmPz4ZpTdC8VPpQvOaJAc6RtfVtIvmE
DOlxXrF45Lonz7SIu/nSwFbhkhDPgimfPTCBJ9UvY5v1hkNE7zkxYVLOKPEmu2S3qUtL7NpVTIH
/xlZl69LURoEq5dxb8K3APDCRKBQ1ZJcdsDdVdPs21xa3YTPtvHBmGw+5+iqofVEeRl0VDgS0j8
hWrgh1uUCEuIdBjRjJEcC753DetjXFaorzAjs29BW907sjDC31W2csM+lm55x3qAX2rCYq9FNaK
qPzY21ckzp2CLSAKN8wztmBKYmlC9QuuatCRIlHxvrsbIGffXHAiXBYcbgHLIA==
X-Google-Smtp-Source: AGHT+IFBxT7tPaOrpPF7sde6qhKuVx4ogFmSUvoSFEAOz1EBm5/ZBDZn152sFiz/avWWkGCG8jXVIw==
X-Received: by 2002:a17:902:f64f:b0:234:11e2:f41 with SMTP id d9443c01a7336-235f123da57mr4585425ad.6.1749057404295;
Wed, 04 Jun 2025 10:16:44 -0700 (PDT)
Received: from debug.ba.rivosinc.com ([64.71.180.162])
by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3124e2e9c9fsm9178972a91.30.2025.06.04.10.16.41
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 10:16:43 -0700 (PDT)
From: Deepak Gupta <debug@xxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 10:15:34 -0700
Subject: [PATCH v17 10/27] riscv/mm: Implement map_shadow_stack() syscall
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <20250604-v5_user_cfi_series-v17-10-4565c2cf869f@xxxxxxxxxxxx>
References: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
In-Reply-To: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
To: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>,
Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>,
x86@xxxxxxxxxx, "H. Peter Anvin" <hpa@xxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>,
Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>,
Paul Walmsley <paul.walmsley@xxxxxxxxxx>,
Palmer Dabbelt <palmer@xxxxxxxxxxx>, Albert Ou <aou@xxxxxxxxxxxxxxxxx>,
Conor Dooley <conor@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>,
Christian Brauner <brauner@xxxxxxxxxx>,
Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Oleg Nesterov <oleg@xxxxxxxxxx>,
Eric Biederman <ebiederm@xxxxxxxxxxxx>, Kees Cook <kees@xxxxxxxxxx>,
Jonathan Corbet <corbet@xxxxxxx>, Shuah Khan <shuah@xxxxxxxxxx>,
Jann Horn <jannh@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>,
Miguel Ojeda <ojeda@xxxxxxxxxx>, Alex Gaynor <alex.gaynor@xxxxxxxxx>,
Boqun Feng <boqun.feng@xxxxxxxxx>, Gary Guo <gary@xxxxxxxxxxx>,
=?utf-8?q?Bj=C3=B6rn_Roy_Baron?= <bjorn3_gh@xxxxxxxxxxxxxx>,
Benno Lossin <benno.lossin@xxxxxxxxx>,
Andreas Hindborg <a.hindborg@xxxxxxxxxx>, Alice Ryhl <aliceryhl@xxxxxxxxxx>,
Trevor Gross <tmgross@xxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx,
linux-mm@xxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx,
linux-doc@xxxxxxxxxxxxxxx, linux-kselftest@xxxxxxxxxxxxxxx,
alistair.francis@xxxxxxx, richard.henderson@xxxxxxxxxx, jim.shu@xxxxxxxxxx,
andybnac@xxxxxxxxx, kito.cheng@xxxxxxxxxx, charlie@xxxxxxxxxxxx,
atishp@xxxxxxxxxxxx, evan@xxxxxxxxxxxx, cleger@xxxxxxxxxxxx,
alexghiti@xxxxxxxxxxxx, samitolvanen@xxxxxxxxxx, broonie@xxxxxxxxxx,
rick.p.edgecombe@xxxxxxxxx, rust-for-linux@xxxxxxxxxxxxxxx,
Zong Li <zong.li@xxxxxxxxxx>, Deepak Gupta <debug@xxxxxxxxxxxx>
X-Mailer: b4 0.13.0
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
As discussed extensively in the changelog for the addition of this
syscall on x86 ("x86/shstk: Introduce map_shadow_stack syscall") the
existing mmap() and madvise() syscalls do not map entirely well onto the
security requirements for shadow stack memory since they lead to windows
where memory is allocated but not yet protected or stacks which are not
properly and safely initialised. Instead a new syscall map_shadow_stack()
has been defined which allocates and initialises a shadow stack page.
This patch implements this syscall for riscv. riscv doesn't require token
to be setup by kernel because user mode can do that by itself. However to
provide compatibility and portability with other architectues, user mode
can specify token set flag.
Reviewed-by: Zong Li <zong.li@xxxxxxxxxx>
Signed-off-by: Deepak Gupta <debug@xxxxxxxxxxxx>
---
arch/riscv/kernel/Makefile | 1 +
arch/riscv/kernel/usercfi.c | 143 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 144 insertions(+)
diff --git a/arch/riscv/kernel/Makefile b/arch/riscv/kernel/Makefile
index 8d186bfced45..3a861d320654 100644
--- a/arch/riscv/kernel/Makefile
+++ b/arch/riscv/kernel/Makefile
@@ -125,3 +125,4 @@ obj-$(CONFIG_ACPI) += acpi.o
obj-$(CONFIG_ACPI_NUMA) += acpi_numa.o
obj-$(CONFIG_GENERIC_CPU_VULNERABILITIES) += bugs.o
+obj-$(CONFIG_RISCV_USER_CFI) += usercfi.o
diff --git a/arch/riscv/kernel/usercfi.c b/arch/riscv/kernel/usercfi.c
new file mode 100644
index 000000000000..0b3bbb41490a
--- /dev/null
+++ b/arch/riscv/kernel/usercfi.c
@@ -0,0 +1,143 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (C) 2024 Rivos, Inc.
+ * Deepak Gupta <debug@xxxxxxxxxxxx>
+ */
+
+#include <linux/sched.h>
+#include <linux/bitops.h>
+#include <linux/types.h>
+#include <linux/mm.h>
+#include <linux/mman.h>
+#include <linux/uaccess.h>
+#include <linux/sizes.h>
+#include <linux/user.h>
+#include <linux/syscalls.h>
+#include <linux/prctl.h>
+#include <asm/csr.h>
+#include <asm/usercfi.h>
+
+#define SHSTK_ENTRY_SIZE sizeof(void *)
+
+/*
+ * Writes on shadow stack can either be `sspush` or `ssamoswap`. `sspush` can happen
+ * implicitly on current shadow stack pointed to by CSR_SSP. `ssamoswap` takes pointer to
+ * shadow stack. To keep it simple, we plan to use `ssamoswap` to perform writes on shadow
+ * stack.
+ */
+static noinline unsigned long amo_user_shstk(unsigned long *addr, unsigned long val)
+{
+ /*
+ * Never expect -1 on shadow stack. Expect return addresses and zero
+ */
+ unsigned long swap = -1;
+
+ __enable_user_access();
+ asm goto(
+ ".option push\n"
+ ".option arch, +zicfiss\n"
+ "1: ssamoswap.d %[swap], %[val], %[addr]\n"
+ _ASM_EXTABLE(1b, %l[fault])
+ ".option pop\n"
+ : [swap] "=r" (swap), [addr] "+A" (*addr)
+ : [val] "r" (val)
+ : "memory"
+ : fault
+ );
+ __disable_user_access();
+ return swap;
+fault:
+ __disable_user_access();
+ return -1;
+}
+
+/*
+ * Create a restore token on the shadow stack. A token is always XLEN wide
+ * and aligned to XLEN.
+ */
+static int create_rstor_token(unsigned long ssp, unsigned long *token_addr)
+{
+ unsigned long addr;
+
+ /* Token must be aligned */
+ if (!IS_ALIGNED(ssp, SHSTK_ENTRY_SIZE))
+ return -EINVAL;
+
+ /* On RISC-V we're constructing token to be function of address itself */
+ addr = ssp - SHSTK_ENTRY_SIZE;
+
+ if (amo_user_shstk((unsigned long __user *)addr, (unsigned long)ssp) == -1)
+ return -EFAULT;
+
+ if (token_addr)
+ *token_addr = addr;
+
+ return 0;
+}
+
+static unsigned long allocate_shadow_stack(unsigned long addr, unsigned long size,
+ unsigned long token_offset, bool set_tok)
+{
+ int flags = MAP_ANONYMOUS | MAP_PRIVATE;
+ struct mm_struct *mm = current->mm;
+ unsigned long populate, tok_loc = 0;
+
+ if (addr)
+ flags |= MAP_FIXED_NOREPLACE;
+
+ mmap_write_lock(mm);
+ addr = do_mmap(NULL, addr, size, PROT_READ, flags,
+ VM_SHADOW_STACK | VM_WRITE, 0, &populate, NULL);
+ mmap_write_unlock(mm);
+
+ if (!set_tok || IS_ERR_VALUE(addr))
+ goto out;
+
+ if (create_rstor_token(addr + token_offset, &tok_loc)) {
+ vm_munmap(addr, size);
+ return -EINVAL;
+ }
+
+ addr = tok_loc;
+
+out:
+ return addr;
+}
+
+SYSCALL_DEFINE3(map_shadow_stack, unsigned long, addr, unsigned long, size, unsigned int, flags)
+{
+ bool set_tok = flags & SHADOW_STACK_SET_TOKEN;
+ unsigned long aligned_size = 0;
+
+ if (!cpu_supports_shadow_stack())
+ return -EOPNOTSUPP;
+
+ /* Anything other than set token should result in invalid param */
+ if (flags & ~SHADOW_STACK_SET_TOKEN)
+ return -EINVAL;
+
+ /*
+ * Unlike other architectures, on RISC-V, SSP pointer is held in CSR_SSP and is available
+ * CSR in all modes. CSR accesses are performed using 12bit index programmed in instruction
+ * itself. This provides static property on register programming and writes to CSR can't
+ * be unintentional from programmer's perspective. As long as programmer has guarded areas
+ * which perform writes to CSR_SSP properly, shadow stack pivoting is not possible. Since
+ * CSR_SSP is writeable by user mode, it itself can setup a shadow stack token subsequent
+ * to allocation. Although in order to provide portablity with other architecture (because
+ * `map_shadow_stack` is arch agnostic syscall), RISC-V will follow expectation of a token
+ * flag in flags and if provided in flags, setup a token at the base.
+ */
+
+ /* If there isn't space for a token */
+ if (set_tok && size < SHSTK_ENTRY_SIZE)
+ return -ENOSPC;
+
+ if (addr && (addr & (PAGE_SIZE - 1)))
+ return -EINVAL;
+
+ aligned_size = PAGE_ALIGN(size);
+ if (aligned_size < size)
+ return -EOVERFLOW;
+
+ return allocate_shadow_stack(addr, aligned_size, size, set_tok);
+}
--
2.43.0
Return-Path: <linux-kernel+bounces-673589-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id BC55741E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:20:34 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 11D7F3A7B1F
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:19:29 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 8A26D2356C6;
Wed, 4 Jun 2025 17:16:47 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="Exqxvysc"
Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 247F7232376
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:16:41 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.176
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749057406; cv=none; b=lktOCNft1iBbjUmWwFtvS2DRP/3NHwtGU1SXOqZHeufaXgWxZR6k2jmB6YwPVGBii+5s5DMtA6LDIV4LuUfPj+wHjLdMJ9SIRVikAQk4aLCWYBMFR3abll/K2uNjMU5k0DIBd1cw2hzOnIdBxf7VWtr+TbFXuHIsKboAsSuHs84=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749057406; c=relaxed/simple;
bh=6epe1IklbdE30nYdZrV0ZHwki5ITawyBnbVBknH019E=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=n5RNiWyWWZi/aTH10VdnZ45F8uLqH8YY6e8QWhM7rhYC4tMVkPt6msAnEZWR0Z7d2GOM6Pw2St2JheS/LIpmPUNIGndXFa0slcQdIMvgpIVe3LNjI58bIfOY4M2cXVdmuXx4NmGLoy0do077vowDuOCPZDHqpSahYyLMGdbyWbY=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=Exqxvysc; arc=none smtp.client-ip=209.85.214.176
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com
Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-234d2d914bcso608385ad.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 10:16:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1749057401; x=1749662201; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=DsODLDfRcPuDSErfbs+tzfaJx/MFrIF5cCrvvQql1Yk=;
b=Exqxvysc44tA2QiFIap193qfdDCgBb3YA2VzSlyrOYBdrEFcEXEvwPymYkVWnk7UZY
QKJx55iwFyhJXmci5k1eaUAp9tmM19Q5SiDz7HPzZIvKQwIyh9joiyYff+T/QayQG0Jx
FyLd7+v/trbJS13Yw7KNdfRZYU/CRY2MuRQCvcIVn7tlEOeHVfmOHd1iYDZcOMQ9dXRb
CcVVMSDCmPk3CSWUZZTBt/pZYfl8dyJNUPh36GCK9TTZc+hH9ju8PVrHcLjLDZDgCubO
A9/JvbUERqh9wozzxon7X+JbglRMKftxud8SfbkSx6/vZNGR1m1s88fObK6HAzhcMHr1
ka/g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749057401; x=1749662201;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=DsODLDfRcPuDSErfbs+tzfaJx/MFrIF5cCrvvQql1Yk=;
b=C1sBXYzXVTkMJBgnsP7y9lrsE5sKv0BJwTbttk7UsmTaVuc56xOkFFHDOjTBn7mfe5
4Q8MuO03FqoCQgWTonFGaZR0wLmSViRWhcb1O/v4gqfcjhX2H8+hvr3C6sJF7afbZT+8
LN4VCYxXvxGHyDQJhTl0o4718KtAty4oP415GDveOvSNNcmWwJPFVHjlpYFQK4krKMA6
xSaGGKfM22J2vs/tlPQI+xryhkS7k9XmOK/EplavxOXVlnrZJgQZdQhugReJvG3unQfp
U5fUrxH5PU5trvkNXfnbkbbGmD96II71DKFB/EMJ4/0aXAK9Cwdc5vQ6yyHYi1gc6Scy
gXcg==
X-Gm-Message-State: AOJu0YyJUOn3kobyspGvMFlZfMTvv1RkBBJ7/9vV5s9A9sYGsyv1ySMR
HItYU5cLGAO5c1zgZFzbbDxb3fd2YOps3xCCphqFDHNK1FEbuLgyc6ftx4nglgKFjCw=
X-Gm-Gg: ASbGncswfAf/SjqGosBfKfQhVcBZMYE1K+T5ACOKD1xNVuyjIwpHAixyxIxxM6TmmZ3
cFZVh7qpFzq4uCgNqXbv2wlvDOjddfnMGBO+qvzjbFK0VvaMjZimAs+PfYOiLA8AWNJu3vHC8ni
kEyzMg0RyTbieAh53sNWwKfpWWRSxvPJNZ87LKnYvyk56amK2ZxZUxJAWKTcoCJzy1j22ADztk3
6itSfwQdDdF7TCHQxpKQ4DVVsFT4PoV6ktroDdMi530lRSP5a/HoAwwrUDOUJYuoQGso2Krvud1
DtyEt3P9RY8rE+oUzNbwQVmPHSClBSWTusj495Wx+pNzhzOghQehJVkme/WT+YbuRlDI/4MU
X-Google-Smtp-Source: AGHT+IF6+7HWMrKywJhrl4jitMY9SAQNbrLC1TZh5PiZA/JMuNouzuXYRzL70WULkmw+C8CMgKh2Qg==
X-Received: by 2002:a17:90b:4a04:b0:312:f263:954a with SMTP id 98e67ed59e1d1-31310fc5071mr4462982a91.5.1749057401215;
Wed, 04 Jun 2025 10:16:41 -0700 (PDT)
Received: from debug.ba.rivosinc.com ([64.71.180.162])
by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3124e2e9c9fsm9178972a91.30.2025.06.04.10.16.38
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 10:16:40 -0700 (PDT)
From: Deepak Gupta <debug@xxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 10:15:33 -0700
Subject: [PATCH v17 09/27] riscv/mm: write protect and shadow stack
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <20250604-v5_user_cfi_series-v17-9-4565c2cf869f@xxxxxxxxxxxx>
References: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
In-Reply-To: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
To: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>,
Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>,
x86@xxxxxxxxxx, "H. Peter Anvin" <hpa@xxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>,
Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>,
Paul Walmsley <paul.walmsley@xxxxxxxxxx>,
Palmer Dabbelt <palmer@xxxxxxxxxxx>, Albert Ou <aou@xxxxxxxxxxxxxxxxx>,
Conor Dooley <conor@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>,
Christian Brauner <brauner@xxxxxxxxxx>,
Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Oleg Nesterov <oleg@xxxxxxxxxx>,
Eric Biederman <ebiederm@xxxxxxxxxxxx>, Kees Cook <kees@xxxxxxxxxx>,
Jonathan Corbet <corbet@xxxxxxx>, Shuah Khan <shuah@xxxxxxxxxx>,
Jann Horn <jannh@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>,
Miguel Ojeda <ojeda@xxxxxxxxxx>, Alex Gaynor <alex.gaynor@xxxxxxxxx>,
Boqun Feng <boqun.feng@xxxxxxxxx>, Gary Guo <gary@xxxxxxxxxxx>,
=?utf-8?q?Bj=C3=B6rn_Roy_Baron?= <bjorn3_gh@xxxxxxxxxxxxxx>,
Benno Lossin <benno.lossin@xxxxxxxxx>,
Andreas Hindborg <a.hindborg@xxxxxxxxxx>, Alice Ryhl <aliceryhl@xxxxxxxxxx>,
Trevor Gross <tmgross@xxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx,
linux-mm@xxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx,
linux-doc@xxxxxxxxxxxxxxx, linux-kselftest@xxxxxxxxxxxxxxx,
alistair.francis@xxxxxxx, richard.henderson@xxxxxxxxxx, jim.shu@xxxxxxxxxx,
andybnac@xxxxxxxxx, kito.cheng@xxxxxxxxxx, charlie@xxxxxxxxxxxx,
atishp@xxxxxxxxxxxx, evan@xxxxxxxxxxxx, cleger@xxxxxxxxxxxx,
alexghiti@xxxxxxxxxxxx, samitolvanen@xxxxxxxxxx, broonie@xxxxxxxxxx,
rick.p.edgecombe@xxxxxxxxx, rust-for-linux@xxxxxxxxxxxxxxx,
Zong Li <zong.li@xxxxxxxxxx>, Deepak Gupta <debug@xxxxxxxxxxxx>
X-Mailer: b4 0.13.0
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
`fork` implements copy on write (COW) by making pages readonly in child
and parent both.
ptep_set_wrprotect and pte_wrprotect clears _PAGE_WRITE in PTE.
Assumption is that page is readable and on fault copy on write happens.
To implement COW on shadow stack pages, clearing up W bit makes them XWR =
000. This will result in wrong PTE setting which says no perms but V=1 and
PFN field pointing to final page. Instead desired behavior is to turn it
into a readable page, take an access (load/store) fault on sspush/sspop
(shadow stack) and then perform COW on such pages. This way regular reads
would still be allowed and not lead to COW maintaining current behavior
of COW on non-shadow stack but writeable memory.
On the other hand it doesn't interfere with existing COW for read-write
memory. Assumption is always that _PAGE_READ must have been set and thus
setting _PAGE_READ is harmless.
Reviewed-by: Alexandre Ghiti <alexghiti@xxxxxxxxxxxx>
Reviewed-by: Zong Li <zong.li@xxxxxxxxxx>
Signed-off-by: Deepak Gupta <debug@xxxxxxxxxxxx>
---
arch/riscv/include/asm/pgtable.h | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/arch/riscv/include/asm/pgtable.h b/arch/riscv/include/asm/pgtable.h
index 60d4821627d2..4e3431ccf634 100644
--- a/arch/riscv/include/asm/pgtable.h
+++ b/arch/riscv/include/asm/pgtable.h
@@ -423,7 +423,7 @@ static inline int pte_devmap(pte_t pte)
static inline pte_t pte_wrprotect(pte_t pte)
{
- return __pte(pte_val(pte) & ~(_PAGE_WRITE));
+ return __pte((pte_val(pte) & ~(_PAGE_WRITE)) | (_PAGE_READ));
}
/* static inline pte_t pte_mkread(pte_t pte) */
@@ -624,7 +624,15 @@ static inline pte_t ptep_get_and_clear(struct mm_struct *mm,
static inline void ptep_set_wrprotect(struct mm_struct *mm,
unsigned long address, pte_t *ptep)
{
- atomic_long_and(~(unsigned long)_PAGE_WRITE, (atomic_long_t *)ptep);
+ pte_t read_pte = READ_ONCE(*ptep);
+ /*
+ * ptep_set_wrprotect can be called for shadow stack ranges too.
+ * shadow stack memory is XWR = 010 and thus clearing _PAGE_WRITE will lead to
+ * encoding 000b which is wrong encoding with V = 1. This should lead to page fault
+ * but we dont want this wrong configuration to be set in page tables.
+ */
+ atomic_long_set((atomic_long_t *)ptep,
+ ((pte_val(read_pte) & ~(unsigned long)_PAGE_WRITE) | _PAGE_READ));
}
#define __HAVE_ARCH_PTEP_CLEAR_YOUNG_FLUSH
--
2.43.0
Return-Path: <linux-kernel+bounces-673591-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 29EB641E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:21:00 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id D5AB31899DDA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:20:45 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 58068236A79;
Wed, 4 Jun 2025 17:16:52 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="vPn3u4yC"
Received: from mail-pl1-f178.google.com (mail-pl1-f178.google.com [209.85.214.178])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4CEFB2367C4
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:16:48 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.178
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749057411; cv=none; b=u0jDsCoPNRPZD/xSbNIOxBqte0acJZItlfgfUdqh+3KPuSgBF6RBnF69gnvmlGEcMv4JuT2swAihXTLIRDSdYO0dMPC+9VUvJu4nXAUeb5xPpgq400xTtBNNKiLEcKHV2XTU2F9SfASVhilE9TKaU+henxF/EmwaORC2r2l43a8=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749057411; c=relaxed/simple;
bh=C7ks50ikNOOOGz0rAMPvdaV+qpFKBmIGG1rjxsnPvAg=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=Y8AJ0Vur4m8QfTjRMWlBsrx3uZ7z9K4c7ZQn7TU9qJ0dCcbrY0h+wRRDXAQH2BKy7Is4Xn8sirkK3JkeIqyJdoxwxJhKtY1uSzK8+HOzjafwWh2/DyIKJm1h0Hr5eRVDqUvX46TQjS2aNGb8M636uca0EHCHawjWWpXVDLaaaA8=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=vPn3u4yC; arc=none smtp.client-ip=209.85.214.178
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com
Received: by mail-pl1-f178.google.com with SMTP id d9443c01a7336-23508d30142so1078055ad.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 10:16:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1749057408; x=1749662208; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=d/8dVnIOzdzC1nuKUYhAi1mzOdRHXwnCzbO7JbF3xaI=;
b=vPn3u4yCiKoPFHdhjixxUuSz2sW7TzjW5XmC1qFY0iiyVDR4fqxfP4upxMyqLke7Di
jU8yf99LDCYk2dciU4BbrEgFDKrHitamlSW2RDTULM+/e6jBVYKEQk345oT66Dob0iWx
6ZSbVNh+B5a0nItAV99vcqp1+KUlWrn1QbHCLc1PrlaBJfKqZFUyvNSQbROXBahE00fc
VsNIQ5tIe09tFkXGMU66vM/NGzcvD+wmkaPF7UowCKWgsIsOaZHpDfNDKX636EcEzq85
WCaiXVr1GcjWcg3JDRCdife0hT49C6rLXxaB04g4KtcJ/As8SrYrhLN3YPwvVOn7TLRV
JEMQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749057408; x=1749662208;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=d/8dVnIOzdzC1nuKUYhAi1mzOdRHXwnCzbO7JbF3xaI=;
b=isECi+xXAbnc+c7j1lAvKA7GpR3t6Y3Sh/Xeyc4zeBvsFt+cQ5edSeSYToJX6/Y/K6
hSI6bl4ejlu9NKRve/X+lBTDWP77sIqaOveFNci8chCbC6P4YVH/kObZKK4Vl1F9aMCG
ZjkKM5JAnqcYqVscmfLLswxwxkPo5m7R3VzjI4WRCom+InPUvBuck5GtSPQOQWw0We+y
AE604P2gShPQHzYAy/bt/gyWnvorCvwZBwITSWMlD3JrPBAX5DjVgA0dAlILqpu0CwgZ
Nk0alTfrxaPPfr7CU/3JMX2+8kHcEkbzcNFg6cOaMec4oGmRoGIwoI791deeZQeALiEp
WglA==
X-Gm-Message-State: AOJu0YxYVvT+BewpClVvhkLfYBTYRkFAnCOl6bcXiUGt8dhk3r8z6TWC
ykYagDG820f3ZFP4D3gZcTSJi5sC14HpEUI2KgSAKOtfXNbcQelrGLjrC6ffLRqQaek=
X-Gm-Gg: ASbGnctH/9uYwhyBr6PWjihUdZZtemh90B657VUHANZBaN/JTwN6i2cTWmguih5UOfc
MSIUyrh5qiDatMLNR78kn1L1/ndYrq2i5aos085/Hyf/Z++79el+VUTzjJ5Agmkp33W9GzRuEkN
flB/ZLhjakPPhm5ZeggX4dGPkJxyM5XSGfhcrOKvldxJUeFa2CYUXfDsgXJcMA9EiJv5ez66iqq
j2EmqXdOjZiO3sVRuJP1KobugsM/DGwV/RlYEpUUhSWVRy9e+aR1WlnyN9vzWk1xZDCFW0w/skG
nm4jn6kSymxQZnUfFNHT+NCWM5bnhIp3GQVHQwMiLI0C6UR3V5LgKLX7L5wceQ==
X-Google-Smtp-Source: AGHT+IHNmPq2kRFPpP/2Xfnnj9OgV1dbK4DhifLrHJ4EBa0EpdqwFqn7tJV9R6Wj9Bf2iZgpfOyyEQ==
X-Received: by 2002:a17:902:f683:b0:234:ef42:5d5b with SMTP id d9443c01a7336-235e11501f9mr50138895ad.16.1749057407461;
Wed, 04 Jun 2025 10:16:47 -0700 (PDT)
Received: from debug.ba.rivosinc.com ([64.71.180.162])
by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3124e2e9c9fsm9178972a91.30.2025.06.04.10.16.44
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 10:16:47 -0700 (PDT)
From: Deepak Gupta <debug@xxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 10:15:35 -0700
Subject: [PATCH v17 11/27] riscv/shstk: If needed allocate a new shadow
stack on clone
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <20250604-v5_user_cfi_series-v17-11-4565c2cf869f@xxxxxxxxxxxx>
References: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
In-Reply-To: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
To: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>,
Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>,
x86@xxxxxxxxxx, "H. Peter Anvin" <hpa@xxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>,
Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>,
Paul Walmsley <paul.walmsley@xxxxxxxxxx>,
Palmer Dabbelt <palmer@xxxxxxxxxxx>, Albert Ou <aou@xxxxxxxxxxxxxxxxx>,
Conor Dooley <conor@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>,
Christian Brauner <brauner@xxxxxxxxxx>,
Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Oleg Nesterov <oleg@xxxxxxxxxx>,
Eric Biederman <ebiederm@xxxxxxxxxxxx>, Kees Cook <kees@xxxxxxxxxx>,
Jonathan Corbet <corbet@xxxxxxx>, Shuah Khan <shuah@xxxxxxxxxx>,
Jann Horn <jannh@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>,
Miguel Ojeda <ojeda@xxxxxxxxxx>, Alex Gaynor <alex.gaynor@xxxxxxxxx>,
Boqun Feng <boqun.feng@xxxxxxxxx>, Gary Guo <gary@xxxxxxxxxxx>,
=?utf-8?q?Bj=C3=B6rn_Roy_Baron?= <bjorn3_gh@xxxxxxxxxxxxxx>,
Benno Lossin <benno.lossin@xxxxxxxxx>,
Andreas Hindborg <a.hindborg@xxxxxxxxxx>, Alice Ryhl <aliceryhl@xxxxxxxxxx>,
Trevor Gross <tmgross@xxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx,
linux-mm@xxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx,
linux-doc@xxxxxxxxxxxxxxx, linux-kselftest@xxxxxxxxxxxxxxx,
alistair.francis@xxxxxxx, richard.henderson@xxxxxxxxxx, jim.shu@xxxxxxxxxx,
andybnac@xxxxxxxxx, kito.cheng@xxxxxxxxxx, charlie@xxxxxxxxxxxx,
atishp@xxxxxxxxxxxx, evan@xxxxxxxxxxxx, cleger@xxxxxxxxxxxx,
alexghiti@xxxxxxxxxxxx, samitolvanen@xxxxxxxxxx, broonie@xxxxxxxxxx,
rick.p.edgecombe@xxxxxxxxx, rust-for-linux@xxxxxxxxxxxxxxx,
Zong Li <zong.li@xxxxxxxxxx>, Deepak Gupta <debug@xxxxxxxxxxxx>
X-Mailer: b4 0.13.0
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Userspace specifies CLONE_VM to share address space and spawn new thread.
`clone` allow userspace to specify a new stack for new thread. However
there is no way to specify new shadow stack base address without changing
API. This patch allocates a new shadow stack whenever CLONE_VM is given.
In case of CLONE_VFORK, parent is suspended until child finishes and thus
can child use parent shadow stack. In case of !CLONE_VM, COW kicks in
because entire address space is copied from parent to child.
`clone3` is extensible and can provide mechanisms using which shadow stack
as an input parameter can be provided. This is not settled yet and being
extensively discussed on mailing list. Once that's settled, this commit
will adapt to that.
Reviewed-by: Zong Li <zong.li@xxxxxxxxxx>
Signed-off-by: Deepak Gupta <debug@xxxxxxxxxxxx>
---
arch/riscv/include/asm/mmu_context.h | 7 ++
arch/riscv/include/asm/usercfi.h | 25 ++++++++
arch/riscv/kernel/process.c | 10 +++
arch/riscv/kernel/usercfi.c | 120 +++++++++++++++++++++++++++++++++++
4 files changed, 162 insertions(+)
diff --git a/arch/riscv/include/asm/mmu_context.h b/arch/riscv/include/asm/mmu_context.h
index 8c4bc49a3a0f..dbf27a78df6c 100644
--- a/arch/riscv/include/asm/mmu_context.h
+++ b/arch/riscv/include/asm/mmu_context.h
@@ -48,6 +48,13 @@ static inline unsigned long mm_untag_mask(struct mm_struct *mm)
}
#endif
+#define deactivate_mm deactivate_mm
+static inline void deactivate_mm(struct task_struct *tsk,
+ struct mm_struct *mm)
+{
+ shstk_release(tsk);
+}
+
#include <asm-generic/mmu_context.h>
#endif /* _ASM_RISCV_MMU_CONTEXT_H */
diff --git a/arch/riscv/include/asm/usercfi.h b/arch/riscv/include/asm/usercfi.h
index 94b214c295c0..0c81cc9a2b6d 100644
--- a/arch/riscv/include/asm/usercfi.h
+++ b/arch/riscv/include/asm/usercfi.h
@@ -8,6 +8,9 @@
#ifndef __ASSEMBLY__
#include <linux/types.h>
+struct task_struct;
+struct kernel_clone_args;
+
#ifdef CONFIG_RISCV_USER_CFI
struct cfi_state {
unsigned long ubcfi_en : 1; /* Enable for backward cfi. */
@@ -16,6 +19,28 @@ struct cfi_state {
unsigned long shdw_stk_size; /* size of shadow stack */
};
+unsigned long shstk_alloc_thread_stack(struct task_struct *tsk,
+ const struct kernel_clone_args *args);
+void shstk_release(struct task_struct *tsk);
+void set_shstk_base(struct task_struct *task, unsigned long shstk_addr, unsigned long size);
+unsigned long get_shstk_base(struct task_struct *task, unsigned long *size);
+void set_active_shstk(struct task_struct *task, unsigned long shstk_addr);
+bool is_shstk_enabled(struct task_struct *task);
+
+#else
+
+#define shstk_alloc_thread_stack(tsk, args) 0
+
+#define shstk_release(tsk)
+
+#define get_shstk_base(task, size) 0UL
+
+#define set_shstk_base(task, shstk_addr, size) do {} while (0)
+
+#define set_active_shstk(task, shstk_addr) do {} while (0)
+
+#define is_shstk_enabled(task) false
+
#endif /* CONFIG_RISCV_USER_CFI */
#endif /* __ASSEMBLY__ */
diff --git a/arch/riscv/kernel/process.c b/arch/riscv/kernel/process.c
index 7c244de77180..46f38e53ddec 100644
--- a/arch/riscv/kernel/process.c
+++ b/arch/riscv/kernel/process.c
@@ -29,6 +29,7 @@
#include <asm/vector.h>
#include <asm/cpufeature.h>
#include <asm/exec.h>
+#include <asm/usercfi.h>
#if defined(CONFIG_STACKPROTECTOR) && !defined(CONFIG_STACKPROTECTOR_PER_TASK)
#include <linux/stackprotector.h>
@@ -211,6 +212,7 @@ int copy_thread(struct task_struct *p, const struct kernel_clone_args *args)
unsigned long clone_flags = args->flags;
unsigned long usp = args->stack;
unsigned long tls = args->tls;
+ unsigned long ssp = 0;
struct pt_regs *childregs = task_pt_regs(p);
/* Ensure all threads in this mm have the same pointer masking mode. */
@@ -229,11 +231,19 @@ int copy_thread(struct task_struct *p, const struct kernel_clone_args *args)
p->thread.s[0] = (unsigned long)args->fn;
p->thread.s[1] = (unsigned long)args->fn_arg;
} else {
+ /* allocate new shadow stack if needed. In case of CLONE_VM we have to */
+ ssp = shstk_alloc_thread_stack(p, args);
+ if (IS_ERR_VALUE(ssp))
+ return PTR_ERR((void *)ssp);
+
*childregs = *(current_pt_regs());
/* Turn off status.VS */
riscv_v_vstate_off(childregs);
if (usp) /* User fork */
childregs->sp = usp;
+ /* if needed, set new ssp */
+ if (ssp)
+ set_active_shstk(p, ssp);
if (clone_flags & CLONE_SETTLS)
childregs->tp = tls;
childregs->a0 = 0; /* Return value of fork() */
diff --git a/arch/riscv/kernel/usercfi.c b/arch/riscv/kernel/usercfi.c
index 0b3bbb41490a..ec3d78efd6f3 100644
--- a/arch/riscv/kernel/usercfi.c
+++ b/arch/riscv/kernel/usercfi.c
@@ -19,6 +19,41 @@
#define SHSTK_ENTRY_SIZE sizeof(void *)
+bool is_shstk_enabled(struct task_struct *task)
+{
+ return task->thread_info.user_cfi_state.ubcfi_en;
+}
+
+void set_shstk_base(struct task_struct *task, unsigned long shstk_addr, unsigned long size)
+{
+ task->thread_info.user_cfi_state.shdw_stk_base = shstk_addr;
+ task->thread_info.user_cfi_state.shdw_stk_size = size;
+}
+
+unsigned long get_shstk_base(struct task_struct *task, unsigned long *size)
+{
+ if (size)
+ *size = task->thread_info.user_cfi_state.shdw_stk_size;
+ return task->thread_info.user_cfi_state.shdw_stk_base;
+}
+
+void set_active_shstk(struct task_struct *task, unsigned long shstk_addr)
+{
+ task->thread_info.user_cfi_state.user_shdw_stk = shstk_addr;
+}
+
+/*
+ * If size is 0, then to be compatible with regular stack we want it to be as big as
+ * regular stack. Else PAGE_ALIGN it and return back
+ */
+static unsigned long calc_shstk_size(unsigned long size)
+{
+ if (size)
+ return PAGE_ALIGN(size);
+
+ return PAGE_ALIGN(min_t(unsigned long long, rlimit(RLIMIT_STACK), SZ_4G));
+}
+
/*
* Writes on shadow stack can either be `sspush` or `ssamoswap`. `sspush` can happen
* implicitly on current shadow stack pointed to by CSR_SSP. `ssamoswap` takes pointer to
@@ -141,3 +176,88 @@ SYSCALL_DEFINE3(map_shadow_stack, unsigned long, addr, unsigned long, size, unsi
return allocate_shadow_stack(addr, aligned_size, size, set_tok);
}
+
+/*
+ * This gets called during clone/clone3/fork. And is needed to allocate a shadow stack for
+ * cases where CLONE_VM is specified and thus a different stack is specified by user. We
+ * thus need a separate shadow stack too. How does separate shadow stack is specified by
+ * user is still being debated. Once that's settled, remove this part of the comment.
+ * This function simply returns 0 if shadow stack are not supported or if separate shadow
+ * stack allocation is not needed (like in case of !CLONE_VM)
+ */
+unsigned long shstk_alloc_thread_stack(struct task_struct *tsk,
+ const struct kernel_clone_args *args)
+{
+ unsigned long addr, size;
+
+ /* If shadow stack is not supported, return 0 */
+ if (!cpu_supports_shadow_stack())
+ return 0;
+
+ /*
+ * If shadow stack is not enabled on the new thread, skip any
+ * switch to a new shadow stack.
+ */
+ if (!is_shstk_enabled(tsk))
+ return 0;
+
+ /*
+ * For CLONE_VFORK the child will share the parents shadow stack.
+ * Set base = 0 and size = 0, this is special means to track this state
+ * so the freeing logic run for child knows to leave it alone.
+ */
+ if (args->flags & CLONE_VFORK) {
+ set_shstk_base(tsk, 0, 0);
+ return 0;
+ }
+
+ /*
+ * For !CLONE_VM the child will use a copy of the parents shadow
+ * stack.
+ */
+ if (!(args->flags & CLONE_VM))
+ return 0;
+
+ /*
+ * reaching here means, CLONE_VM was specified and thus a separate shadow
+ * stack is needed for new cloned thread. Note: below allocation is happening
+ * using current mm.
+ */
+ size = calc_shstk_size(args->stack_size);
+ addr = allocate_shadow_stack(0, size, 0, false);
+ if (IS_ERR_VALUE(addr))
+ return addr;
+
+ set_shstk_base(tsk, addr, size);
+
+ return addr + size;
+}
+
+void shstk_release(struct task_struct *tsk)
+{
+ unsigned long base = 0, size = 0;
+ /* If shadow stack is not supported or not enabled, nothing to release */
+ if (!cpu_supports_shadow_stack() || !is_shstk_enabled(tsk))
+ return;
+
+ /*
+ * When fork() with CLONE_VM fails, the child (tsk) already has a
+ * shadow stack allocated, and exit_thread() calls this function to
+ * free it. In this case the parent (current) and the child share
+ * the same mm struct. Move forward only when they're same.
+ */
+ if (!tsk->mm || tsk->mm != current->mm)
+ return;
+
+ /*
+ * We know shadow stack is enabled but if base is NULL, then
+ * this task is not managing its own shadow stack (CLONE_VFORK). So
+ * skip freeing it.
+ */
+ base = get_shstk_base(tsk, &size);
+ if (!base)
+ return;
+
+ vm_munmap(base, size);
+ set_shstk_base(tsk, 0, 0);
+}
--
2.43.0
Return-Path: <linux-kernel+bounces-673592-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 520A341E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:21:31 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 6040A3A82F5
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:20:23 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id C4B31242901;
Wed, 4 Jun 2025 17:16:54 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="mCA9fbZ0"
Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6428A23D2AC
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:16:51 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.48
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749057413; cv=none; b=ubyrtZDIStvaO/4g3MJM0Fbn7p8rUO2PChNZvQfhfJHX07y0vobNqB641yz0G47fzsS5spXH0RCQkuM8lIpmF+ykmCKrgqLoPYCPCN48TWjdYJYp+Ix667imTpjU1J8JdYy7GQWbAIAzG/+ep+XTpm6lzm9MOqi+fKWDV2dZHYs=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749057413; c=relaxed/simple;
bh=6UcuVsm+5XARMGTOayGDmC6rkuM13ZZ11wlWmiFbwj4=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=lh+GQjyijIYDZ1D0wREai/omIezX3MZK+RrrmZHSsUGJ+ZrBw4lPop2OD+NkKUOmq6OG2gWqQObM62mjPMjBRA5Liyjhnd8ggDUndcmTbISCuA9GFo5hVJnXs1JXZo2J2+j/ysj7OA50S7/OV1f2HDTBTo+lf2DGX4gLQLdXm08=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=mCA9fbZ0; arc=none smtp.client-ip=209.85.216.48
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com
Received: by mail-pj1-f48.google.com with SMTP id 98e67ed59e1d1-3119822df05so113560a91.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 10:16:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1749057411; x=1749662211; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=F0XZmZGXQguJXTTs7yc7Y2zAiwpuwR+GOqO6NersdS4=;
b=mCA9fbZ0MMwOgGIykwOpVCDmzy4tqu4aGXollQ2ny/s/yccyYmao5JS15p5f5hl46q
oQiAV79VbGHsRbvhdS/lARWxROZtA1QYCdHB9l1WKlVDTYHi4u8lnAqP4/Kin+ESp34Y
LwQrhJmkLTLpUKoFC+bmpD1+0lAwUnbC+kQVj9UPiR/28Y7wyvpSlRozmqDOl77ni1O8
1Vj/yUmB6PC21h3kowTQdQYRSQvDNw4HZkrPveIHriWYhoDJh15UkhXj1ueLMpal+vjc
gJXG0WsCAZRzbQZIv9WkPHV/oJMHIir40WwxoxEyYBbbWhi2XGd2PKrQfmW6gUsYgwGj
xtTw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749057411; x=1749662211;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=F0XZmZGXQguJXTTs7yc7Y2zAiwpuwR+GOqO6NersdS4=;
b=gFy+CUpTqJ/RsI6HpFCsI72HVVBCtH+rQVnfCNUN6Xcg2ZN2GoBdJIPITX8S/6zsq3
3Wsnk2oGQJNwROPAETU+6AkmqzFe9IV9AJpHcJ3+K7HWkK2CKqq/KPnf52mh5aFBhPFj
ddA6P7E6wx0WvSHQ8ZynDfqsn9lz/RZUaUvPOcONpI9KJ++TJEFVzQe+J4pvluVraaRE
ydwLWp/ST4CaRsSIUipibk+oYpX6NEsObtCxz0fkwwMUv6B3LMBVIWD3hxPU98G39euQ
PerEqy+gXtpo7wqNi3USSGCFgoUfaVnJLDCpH2YSTMNBV5ZyJ/aNUEDJTeUAvxiH+84W
yCNw==
X-Gm-Message-State: AOJu0YzgvpmfzxfsPHit2Z2BA8afy9sPnU9uQoc2vMXUSrlLTTB0nYk0
lOtcx5pkMi1Lau5eLrU5Y6cgs1ELhZo+fBmHsQ+DGpGm9OXaovLo2WCEMo2spkOKT4U=
X-Gm-Gg: ASbGnct7h7SO8QEDkKNjC5W8JyucXHmBnh1C95VFq5z245izd+asmK/1qgbe8CUGMTg
6T3Ry9JkiGAwNlJGuoIxYrs7pFWQAk7bq8+LZjdrL23++x/Txw+t3qx1QijLGvVwC9T4/OpkErd
OmK7vgRSPAS3S6sJPSusmtugy7KxmZwoQDk6KfCQ798FaIj8RZr6d+VpWh9Xt1IzZrNrmnAsra+
Rx0t8+7Pv/89RR6dSQ/UIntFvyJHafEvFrHo+y2TqQyjVLqSq/b+D2U0Xy7zLumL9lSSxd/ASp5
1XPV53HY43eU08iuU48/cqLJvj3LBljuNymooWIZrnuIQXN1tWz3QqlIXbaJFw==
X-Google-Smtp-Source: AGHT+IFwZwWseZlrf3vDFxck4fH7qGOhZXmEzl0kVhLOvVDJdSB5jVvKz6MH30dIxiIknbMFZP9mGw==
X-Received: by 2002:a17:90a:6fa5:b0:30e:3718:e9d with SMTP id 98e67ed59e1d1-3130cd862f5mr4154153a91.35.1749057410565;
Wed, 04 Jun 2025 10:16:50 -0700 (PDT)
Received: from debug.ba.rivosinc.com ([64.71.180.162])
by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3124e2e9c9fsm9178972a91.30.2025.06.04.10.16.47
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 10:16:50 -0700 (PDT)
From: Deepak Gupta <debug@xxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 10:15:36 -0700
Subject: [PATCH v17 12/27] riscv: Implements arch agnostic shadow stack
prctls
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <20250604-v5_user_cfi_series-v17-12-4565c2cf869f@xxxxxxxxxxxx>
References: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
In-Reply-To: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
To: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>,
Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>,
x86@xxxxxxxxxx, "H. Peter Anvin" <hpa@xxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>,
Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>,
Paul Walmsley <paul.walmsley@xxxxxxxxxx>,
Palmer Dabbelt <palmer@xxxxxxxxxxx>, Albert Ou <aou@xxxxxxxxxxxxxxxxx>,
Conor Dooley <conor@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>,
Christian Brauner <brauner@xxxxxxxxxx>,
Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Oleg Nesterov <oleg@xxxxxxxxxx>,
Eric Biederman <ebiederm@xxxxxxxxxxxx>, Kees Cook <kees@xxxxxxxxxx>,
Jonathan Corbet <corbet@xxxxxxx>, Shuah Khan <shuah@xxxxxxxxxx>,
Jann Horn <jannh@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>,
Miguel Ojeda <ojeda@xxxxxxxxxx>, Alex Gaynor <alex.gaynor@xxxxxxxxx>,
Boqun Feng <boqun.feng@xxxxxxxxx>, Gary Guo <gary@xxxxxxxxxxx>,
=?utf-8?q?Bj=C3=B6rn_Roy_Baron?= <bjorn3_gh@xxxxxxxxxxxxxx>,
Benno Lossin <benno.lossin@xxxxxxxxx>,
Andreas Hindborg <a.hindborg@xxxxxxxxxx>, Alice Ryhl <aliceryhl@xxxxxxxxxx>,
Trevor Gross <tmgross@xxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx,
linux-mm@xxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx,
linux-doc@xxxxxxxxxxxxxxx, linux-kselftest@xxxxxxxxxxxxxxx,
alistair.francis@xxxxxxx, richard.henderson@xxxxxxxxxx, jim.shu@xxxxxxxxxx,
andybnac@xxxxxxxxx, kito.cheng@xxxxxxxxxx, charlie@xxxxxxxxxxxx,
atishp@xxxxxxxxxxxx, evan@xxxxxxxxxxxx, cleger@xxxxxxxxxxxx,
alexghiti@xxxxxxxxxxxx, samitolvanen@xxxxxxxxxx, broonie@xxxxxxxxxx,
rick.p.edgecombe@xxxxxxxxx, rust-for-linux@xxxxxxxxxxxxxxx,
Zong Li <zong.li@xxxxxxxxxx>, Deepak Gupta <debug@xxxxxxxxxxxx>
X-Mailer: b4 0.13.0
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Implement architecture agnostic prctls() interface for setting and getting
shadow stack status.
prctls implemented are PR_GET_SHADOW_STACK_STATUS,
PR_SET_SHADOW_STACK_STATUS and PR_LOCK_SHADOW_STACK_STATUS.
As part of PR_SET_SHADOW_STACK_STATUS/PR_GET_SHADOW_STACK_STATUS, only
PR_SHADOW_STACK_ENABLE is implemented because RISCV allows each mode to
write to their own shadow stack using `sspush` or `ssamoswap`.
PR_LOCK_SHADOW_STACK_STATUS locks current configuration of shadow stack
enabling.
Reviewed-by: Zong Li <zong.li@xxxxxxxxxx>
Signed-off-by: Deepak Gupta <debug@xxxxxxxxxxxx>
---
arch/riscv/include/asm/usercfi.h | 16 ++++++
arch/riscv/kernel/process.c | 8 +++
arch/riscv/kernel/usercfi.c | 110 +++++++++++++++++++++++++++++++++++++++
3 files changed, 134 insertions(+)
diff --git a/arch/riscv/include/asm/usercfi.h b/arch/riscv/include/asm/usercfi.h
index 0c81cc9a2b6d..f747ad469c7c 100644
--- a/arch/riscv/include/asm/usercfi.h
+++ b/arch/riscv/include/asm/usercfi.h
@@ -7,6 +7,7 @@
#ifndef __ASSEMBLY__
#include <linux/types.h>
+#include <linux/prctl.h>
struct task_struct;
struct kernel_clone_args;
@@ -14,6 +15,7 @@ struct kernel_clone_args;
#ifdef CONFIG_RISCV_USER_CFI
struct cfi_state {
unsigned long ubcfi_en : 1; /* Enable for backward cfi. */
+ unsigned long ubcfi_locked : 1;
unsigned long user_shdw_stk; /* Current user shadow stack pointer */
unsigned long shdw_stk_base; /* Base address of shadow stack */
unsigned long shdw_stk_size; /* size of shadow stack */
@@ -26,6 +28,12 @@ void set_shstk_base(struct task_struct *task, unsigned long shstk_addr, unsigned
unsigned long get_shstk_base(struct task_struct *task, unsigned long *size);
void set_active_shstk(struct task_struct *task, unsigned long shstk_addr);
bool is_shstk_enabled(struct task_struct *task);
+bool is_shstk_locked(struct task_struct *task);
+bool is_shstk_allocated(struct task_struct *task);
+void set_shstk_lock(struct task_struct *task);
+void set_shstk_status(struct task_struct *task, bool enable);
+
+#define PR_SHADOW_STACK_SUPPORTED_STATUS_MASK (PR_SHADOW_STACK_ENABLE)
#else
@@ -41,6 +49,14 @@ bool is_shstk_enabled(struct task_struct *task);
#define is_shstk_enabled(task) false
+#define is_shstk_locked(task) false
+
+#define is_shstk_allocated(task) false
+
+#define set_shstk_lock(task) do {} while (0)
+
+#define set_shstk_status(task, enable) do {} while (0)
+
#endif /* CONFIG_RISCV_USER_CFI */
#endif /* __ASSEMBLY__ */
diff --git a/arch/riscv/kernel/process.c b/arch/riscv/kernel/process.c
index 46f38e53ddec..3099fadb0397 100644
--- a/arch/riscv/kernel/process.c
+++ b/arch/riscv/kernel/process.c
@@ -153,6 +153,14 @@ void start_thread(struct pt_regs *regs, unsigned long pc,
regs->epc = pc;
regs->sp = sp;
+ /*
+ * clear shadow stack state on exec.
+ * libc will set it later via prctl.
+ */
+ set_shstk_status(current, false);
+ set_shstk_base(current, 0, 0);
+ set_active_shstk(current, 0);
+
#ifdef CONFIG_64BIT
regs->status &= ~SR_UXL;
diff --git a/arch/riscv/kernel/usercfi.c b/arch/riscv/kernel/usercfi.c
index ec3d78efd6f3..08620bdae696 100644
--- a/arch/riscv/kernel/usercfi.c
+++ b/arch/riscv/kernel/usercfi.c
@@ -24,6 +24,16 @@ bool is_shstk_enabled(struct task_struct *task)
return task->thread_info.user_cfi_state.ubcfi_en;
}
+bool is_shstk_allocated(struct task_struct *task)
+{
+ return task->thread_info.user_cfi_state.shdw_stk_base;
+}
+
+bool is_shstk_locked(struct task_struct *task)
+{
+ return task->thread_info.user_cfi_state.ubcfi_locked;
+}
+
void set_shstk_base(struct task_struct *task, unsigned long shstk_addr, unsigned long size)
{
task->thread_info.user_cfi_state.shdw_stk_base = shstk_addr;
@@ -42,6 +52,26 @@ void set_active_shstk(struct task_struct *task, unsigned long shstk_addr)
task->thread_info.user_cfi_state.user_shdw_stk = shstk_addr;
}
+void set_shstk_status(struct task_struct *task, bool enable)
+{
+ if (!cpu_supports_shadow_stack())
+ return;
+
+ task->thread_info.user_cfi_state.ubcfi_en = enable ? 1 : 0;
+
+ if (enable)
+ task->thread.envcfg |= ENVCFG_SSE;
+ else
+ task->thread.envcfg &= ~ENVCFG_SSE;
+
+ csr_write(CSR_ENVCFG, task->thread.envcfg);
+}
+
+void set_shstk_lock(struct task_struct *task)
+{
+ task->thread_info.user_cfi_state.ubcfi_locked = 1;
+}
+
/*
* If size is 0, then to be compatible with regular stack we want it to be as big as
* regular stack. Else PAGE_ALIGN it and return back
@@ -261,3 +291,83 @@ void shstk_release(struct task_struct *tsk)
vm_munmap(base, size);
set_shstk_base(tsk, 0, 0);
}
+
+int arch_get_shadow_stack_status(struct task_struct *t, unsigned long __user *status)
+{
+ unsigned long bcfi_status = 0;
+
+ if (!cpu_supports_shadow_stack())
+ return -EINVAL;
+
+ /* this means shadow stack is enabled on the task */
+ bcfi_status |= (is_shstk_enabled(t) ? PR_SHADOW_STACK_ENABLE : 0);
+
+ return copy_to_user(status, &bcfi_status, sizeof(bcfi_status)) ? -EFAULT : 0;
+}
+
+int arch_set_shadow_stack_status(struct task_struct *t, unsigned long status)
+{
+ unsigned long size = 0, addr = 0;
+ bool enable_shstk = false;
+
+ if (!cpu_supports_shadow_stack())
+ return -EINVAL;
+
+ /* Reject unknown flags */
+ if (status & ~PR_SHADOW_STACK_SUPPORTED_STATUS_MASK)
+ return -EINVAL;
+
+ /* bcfi status is locked and further can't be modified by user */
+ if (is_shstk_locked(t))
+ return -EINVAL;
+
+ enable_shstk = status & PR_SHADOW_STACK_ENABLE;
+ /* Request is to enable shadow stack and shadow stack is not enabled already */
+ if (enable_shstk && !is_shstk_enabled(t)) {
+ /* shadow stack was allocated and enable request again
+ * no need to support such usecase and return EINVAL.
+ */
+ if (is_shstk_allocated(t))
+ return -EINVAL;
+
+ size = calc_shstk_size(0);
+ addr = allocate_shadow_stack(0, size, 0, false);
+ if (IS_ERR_VALUE(addr))
+ return -ENOMEM;
+ set_shstk_base(t, addr, size);
+ set_active_shstk(t, addr + size);
+ }
+
+ /*
+ * If a request to disable shadow stack happens, let's go ahead and release it
+ * Although, if CLONE_VFORKed child did this, then in that case we will end up
+ * not releasing the shadow stack (because it might be needed in parent). Although
+ * we will disable it for VFORKed child. And if VFORKed child tries to enable again
+ * then in that case, it'll get entirely new shadow stack because following condition
+ * are true
+ * - shadow stack was not enabled for vforked child
+ * - shadow stack base was anyways pointing to 0
+ * This shouldn't be a big issue because we want parent to have availability of shadow
+ * stack whenever VFORKed child releases resources via exit or exec but at the same
+ * time we want VFORKed child to break away and establish new shadow stack if it desires
+ *
+ */
+ if (!enable_shstk)
+ shstk_release(t);
+
+ set_shstk_status(t, enable_shstk);
+ return 0;
+}
+
+int arch_lock_shadow_stack_status(struct task_struct *task,
+ unsigned long arg)
+{
+ /* If shtstk not supported or not enabled on task, nothing to lock here */
+ if (!cpu_supports_shadow_stack() ||
+ !is_shstk_enabled(task) || arg != 0)
+ return -EINVAL;
+
+ set_shstk_lock(task);
+
+ return 0;
+}
--
2.43.0
Return-Path: <linux-kernel+bounces-673593-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 2F0B641E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:21:49 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 1DDDD3A8B0A
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:20:42 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id A669E253F08;
Wed, 4 Jun 2025 17:16:57 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="VwqlK/s0"
Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id A3AA61FA272
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:16:54 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.44
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749057416; cv=none; b=ER3u5Oze5dUSu0G7SUxybTGG0mDR1smQFpTJfuKrQOU7smGbIq/G61hIInF3VKCv8CNtWgwHeblHOdAVWCDzhdkYwCDf4k2cNBdhnV3lXgFxSPgAPWFFIPOw49GEr/pxmUEJgbSMXAubbftho94kH3qjp8FuQCtnRe4S3o4UuGk=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749057416; c=relaxed/simple;
bh=4V/vc+IGuEXLJLSMGAlz1mzVikhLjzrFyJ0kt0SiHdA=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=Ut8rjxf+l2ZmnkEQ32TSVLDy5fi2TKO77GVGmMEW6h6M98lEBktz2G8cnT6S1CWkF4WijioO7AMhPq+zuvO0TCuCsrhbrFKym5ztsFnbwXxBKQN5XaMNFqH2hmsqye/msM1dlx+FwArLyYjSDm1aS99FUn8N1XTr9ZkNUZTSjHU=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=VwqlK/s0; arc=none smtp.client-ip=209.85.216.44
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com
Received: by mail-pj1-f44.google.com with SMTP id 98e67ed59e1d1-311e46d38ddso93651a91.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 10:16:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1749057414; x=1749662214; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=Wqa+EnEmqD/WcxsFXdACBzGsJGhuUJWdKCVGNJwyc08=;
b=VwqlK/s0LB8lGDLv4uFELiaibJhgQ52C1bzjVod3wt3YlF3gFrADml87qXLgeGkS9t
LLly/RGiFpCuyFMN9lrL5PvN1h+xB2yF7miEYJrCMCCMa0G1/WTH5bs4nvUPmHtm56SX
qkvB4MutOOR0WqaSvacloriRb9zULJsUVzj+JLYM9IAWn620CEo5bCCZA3xdw3Ot9DCg
sEHuiYPwSURQM8h2prgOUAP2ZjiFaDSAjEhOpkAxMSvpEe3XkAqnyc5MAx6/KYlvHyyF
PhfVoQ5JVbjEexHmXHXjcomQ4KpN2rLBgPUQs7xSm6+33zJmCI0bttczi/UnA3CTLa/P
L9Cg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749057414; x=1749662214;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=Wqa+EnEmqD/WcxsFXdACBzGsJGhuUJWdKCVGNJwyc08=;
b=dkXPHOv4LiylX1534Ito+41grARs7KZtiawpwS6JaHyBGuliteMKytiK9IwT6vJyAl
oBLjKiGlu0lNE+5JUEzxChqUOEV/6SgUtXgJg5qYnmQpIiTjqqzyEM/bKpFdz6sEJLg4
/jglr9YDwoqEt1Srmy6hNXguJcH+RPFFuKaiKBuc8sUHp09iprAEUTJHinJkWFYmnk4Q
q3CwLaxz51cHVH8qTEQEIlNYftrHqPwyFiwNTcA1WtLYYsEZqCcsyTRg0Qb/nHenelPe
nscI9NyadxTaQUpWzacaWmKKaQ3+NMXTzCiMNjGVpllA+z7espm/UGhnB2+YO5msHpgo
UINg==
X-Gm-Message-State: AOJu0YyYcWASdS0IFMb3EMpny+Ti2ZQVkw1saYyj8+tXQXjyu1fHT7EM
Dy9+/eAVqQb00UzcDj36BZH+Eg8pLLehTr3LqBPQJM7+TXT3IHVYxC39Q8cg82O9XtY=
X-Gm-Gg: ASbGnctYuFCShhPufqa596gzr/Rz2ia2Gzhz7LzvH2B7IMvabPlHYppnOqfImUelWV2
lRAO0Nt3gvFN8sClxl5RikhbQSd9VGo8KBjovn9oJeve7yOSGiOq/2JPRRAR9edVU0XuCFR4cSl
zKyxE88JxBw6/F7+Wlen1tqNiSUSirFBGhRHZ51kCfulKQr13DxZvAUJw/BBYaXxnfqwJN9OAaO
3GDAzgjHd5XxxJvCazUdlSf87Sz+8YpWu+A/b/pwaggzyUUXICgCIS19OL6AixqmbVrto65Q22C
N81EyRYuPV9IB48VL2dEjoMD7R3/8yP7+WIhS2jthCDQDBeXv+THWy2BQRR9ZA==
X-Google-Smtp-Source: AGHT+IGAN+V+Sjgw1p4+7njSBeXUK/t726mOXFn2wI3bqeVGLlQXdIKh+krwjWfYFwDLqrz6odtP6w==
X-Received: by 2002:a17:90b:17c4:b0:311:c93b:3ca2 with SMTP id 98e67ed59e1d1-31310fc4faamr4399376a91.6.1749057413670;
Wed, 04 Jun 2025 10:16:53 -0700 (PDT)
Received: from debug.ba.rivosinc.com ([64.71.180.162])
by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3124e2e9c9fsm9178972a91.30.2025.06.04.10.16.50
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 10:16:53 -0700 (PDT)
From: Deepak Gupta <debug@xxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 10:15:37 -0700
Subject: [PATCH v17 13/27] prctl: arch-agnostic prctl for indirect branch
tracking
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <20250604-v5_user_cfi_series-v17-13-4565c2cf869f@xxxxxxxxxxxx>
References: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
In-Reply-To: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
To: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>,
Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>,
x86@xxxxxxxxxx, "H. Peter Anvin" <hpa@xxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>,
Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>,
Paul Walmsley <paul.walmsley@xxxxxxxxxx>,
Palmer Dabbelt <palmer@xxxxxxxxxxx>, Albert Ou <aou@xxxxxxxxxxxxxxxxx>,
Conor Dooley <conor@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>,
Christian Brauner <brauner@xxxxxxxxxx>,
Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Oleg Nesterov <oleg@xxxxxxxxxx>,
Eric Biederman <ebiederm@xxxxxxxxxxxx>, Kees Cook <kees@xxxxxxxxxx>,
Jonathan Corbet <corbet@xxxxxxx>, Shuah Khan <shuah@xxxxxxxxxx>,
Jann Horn <jannh@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>,
Miguel Ojeda <ojeda@xxxxxxxxxx>, Alex Gaynor <alex.gaynor@xxxxxxxxx>,
Boqun Feng <boqun.feng@xxxxxxxxx>, Gary Guo <gary@xxxxxxxxxxx>,
=?utf-8?q?Bj=C3=B6rn_Roy_Baron?= <bjorn3_gh@xxxxxxxxxxxxxx>,
Benno Lossin <benno.lossin@xxxxxxxxx>,
Andreas Hindborg <a.hindborg@xxxxxxxxxx>, Alice Ryhl <aliceryhl@xxxxxxxxxx>,
Trevor Gross <tmgross@xxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx,
linux-mm@xxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx,
linux-doc@xxxxxxxxxxxxxxx, linux-kselftest@xxxxxxxxxxxxxxx,
alistair.francis@xxxxxxx, richard.henderson@xxxxxxxxxx, jim.shu@xxxxxxxxxx,
andybnac@xxxxxxxxx, kito.cheng@xxxxxxxxxx, charlie@xxxxxxxxxxxx,
atishp@xxxxxxxxxxxx, evan@xxxxxxxxxxxx, cleger@xxxxxxxxxxxx,
alexghiti@xxxxxxxxxxxx, samitolvanen@xxxxxxxxxx, broonie@xxxxxxxxxx,
rick.p.edgecombe@xxxxxxxxx, rust-for-linux@xxxxxxxxxxxxxxx,
Zong Li <zong.li@xxxxxxxxxx>, Deepak Gupta <debug@xxxxxxxxxxxx>
X-Mailer: b4 0.13.0
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Three architectures (x86, aarch64, riscv) have support for indirect branch
tracking feature in a very similar fashion. On a very high level, indirect
branch tracking is a CPU feature where CPU tracks branches which uses
memory operand to perform control transfer in program. As part of this
tracking on indirect branches, CPU goes in a state where it expects a
landing pad instr on target and if not found then CPU raises some fault
(architecture dependent)
x86 landing pad instr - `ENDBRANCH`
arch64 landing pad instr - `BTI`
riscv landing instr - `lpad`
Given that three major arches have support for indirect branch tracking,
This patch makes `prctl` for indirect branch tracking arch agnostic.
To allow userspace to enable this feature for itself, following prtcls are
defined:
- PR_GET_INDIR_BR_LP_STATUS: Gets current configured status for indirect
branch tracking.
- PR_SET_INDIR_BR_LP_STATUS: Sets a configuration for indirect branch
tracking.
Following status options are allowed
- PR_INDIR_BR_LP_ENABLE: Enables indirect branch tracking on user
thread.
- PR_INDIR_BR_LP_DISABLE; Disables indirect branch tracking on user
thread.
- PR_LOCK_INDIR_BR_LP_STATUS: Locks configured status for indirect branch
tracking for user thread.
Reviewed-by: Mark Brown <broonie@xxxxxxxxxx>
Reviewed-by: Zong Li <zong.li@xxxxxxxxxx>
Signed-off-by: Deepak Gupta <debug@xxxxxxxxxxxx>
---
include/linux/cpu.h | 4 ++++
include/uapi/linux/prctl.h | 27 +++++++++++++++++++++++++++
kernel/sys.c | 30 ++++++++++++++++++++++++++++++
3 files changed, 61 insertions(+)
diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index e3049543008b..ea8b351b5bc5 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -204,4 +204,8 @@ static inline bool cpu_mitigations_auto_nosmt(void)
}
#endif
+int arch_get_indir_br_lp_status(struct task_struct *t, unsigned long __user *status);
+int arch_set_indir_br_lp_status(struct task_struct *t, unsigned long status);
+int arch_lock_indir_br_lp_status(struct task_struct *t, unsigned long status);
+
#endif /* _LINUX_CPU_H_ */
diff --git a/include/uapi/linux/prctl.h b/include/uapi/linux/prctl.h
index 15c18ef4eb11..2e09b19317a3 100644
--- a/include/uapi/linux/prctl.h
+++ b/include/uapi/linux/prctl.h
@@ -364,4 +364,31 @@ struct prctl_mm_map {
# define PR_TIMER_CREATE_RESTORE_IDS_ON 1
# define PR_TIMER_CREATE_RESTORE_IDS_GET 2
+/*
+ * Get the current indirect branch tracking configuration for the current
+ * thread, this will be the value configured via PR_SET_INDIR_BR_LP_STATUS.
+ */
+#define PR_GET_INDIR_BR_LP_STATUS 78
+
+/*
+ * Set the indirect branch tracking configuration. PR_INDIR_BR_LP_ENABLE will
+ * enable cpu feature for user thread, to track all indirect branches and ensure
+ * they land on arch defined landing pad instruction.
+ * x86 - If enabled, an indirect branch must land on `ENDBRANCH` instruction.
+ * arch64 - If enabled, an indirect branch must land on `BTI` instruction.
+ * riscv - If enabled, an indirect branch must land on `lpad` instruction.
+ * PR_INDIR_BR_LP_DISABLE will disable feature for user thread and indirect
+ * branches will no more be tracked by cpu to land on arch defined landing pad
+ * instruction.
+ */
+#define PR_SET_INDIR_BR_LP_STATUS 79
+# define PR_INDIR_BR_LP_ENABLE (1UL << 0)
+
+/*
+ * Prevent further changes to the specified indirect branch tracking
+ * configuration. All bits may be locked via this call, including
+ * undefined bits.
+ */
+#define PR_LOCK_INDIR_BR_LP_STATUS 80
+
#endif /* _LINUX_PRCTL_H */
diff --git a/kernel/sys.c b/kernel/sys.c
index c434968e9f5d..91a1dc093c2a 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -2340,6 +2340,21 @@ int __weak arch_lock_shadow_stack_status(struct task_struct *t, unsigned long st
return -EINVAL;
}
+int __weak arch_get_indir_br_lp_status(struct task_struct *t, unsigned long __user *status)
+{
+ return -EINVAL;
+}
+
+int __weak arch_set_indir_br_lp_status(struct task_struct *t, unsigned long status)
+{
+ return -EINVAL;
+}
+
+int __weak arch_lock_indir_br_lp_status(struct task_struct *t, unsigned long status)
+{
+ return -EINVAL;
+}
+
#define PR_IO_FLUSHER (PF_MEMALLOC_NOIO | PF_LOCAL_THROTTLE)
#ifdef CONFIG_ANON_VMA_NAME
@@ -2820,6 +2835,21 @@ SYSCALL_DEFINE5(prctl, int, option, unsigned long, arg2, unsigned long, arg3,
return -EINVAL;
error = posixtimer_create_prctl(arg2);
break;
+ case PR_GET_INDIR_BR_LP_STATUS:
+ if (arg3 || arg4 || arg5)
+ return -EINVAL;
+ error = arch_get_indir_br_lp_status(me, (unsigned long __user *)arg2);
+ break;
+ case PR_SET_INDIR_BR_LP_STATUS:
+ if (arg3 || arg4 || arg5)
+ return -EINVAL;
+ error = arch_set_indir_br_lp_status(me, arg2);
+ break;
+ case PR_LOCK_INDIR_BR_LP_STATUS:
+ if (arg3 || arg4 || arg5)
+ return -EINVAL;
+ error = arch_lock_indir_br_lp_status(me, arg2);
+ break;
default:
trace_task_prctl_unknown(option, arg2, arg3, arg4, arg5);
error = -EINVAL;
--
2.43.0
Return-Path: <linux-kernel+bounces-673594-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 6A7E941E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:22:02 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 6F4E7189C41F
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:21:42 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id E60151FA272;
Wed, 4 Jun 2025 17:17:01 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="qJ+oLvgV"
Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id DC538253F2B
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:16:57 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.169
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749057420; cv=none; b=Y/GeXI1xE+CDC76qjyrVkMJs3XEo6jUrSGx6A+c7Ta+14GSJeTT+N0jKowVSuwq4Dhnj8bJ/m6c6pqMikIYlGcJU2AUIyzq6eXH51TL4ThKiEZqM22IoC29KBg9d5Q397pSeJA027EeXLJF2cboa6s0k2sEFmhG+EYK1e+YSXb4=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749057420; c=relaxed/simple;
bh=MZX1nuc6r7AdZDyTz8TwYjYHi8teeiTBoLNNZOIRIYo=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=eGyYwK/zxAZ4zcMcTxOhliV/0RfuDBbeTFGKRDI06Zr/wAm60nwBRvWk+pybZ1SNhFm7Sdi6LuRgoBTw+d5IWDyWqPFNUtMQP/BnWBkdifTeoaRyoN+uTJeXfftLORUyjSNHYaIgbGRWFxZYy9S9C/DKm1g4EoFdvZPDvMFeVro=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=qJ+oLvgV; arc=none smtp.client-ip=209.85.215.169
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com
Received: by mail-pg1-f169.google.com with SMTP id 41be03b00d2f7-b26d7ddbfd7so51170a12.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 10:16:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1749057417; x=1749662217; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=4/f0L0aM2im1hNI4FqeJBncnA+adhlVAx9+n6QIigJg=;
b=qJ+oLvgVCSv5wVvFBdmoL33F2iBizPRw0DYq1ENMTRnMf6lVxX97KODCPSps0pLD61
+qpntjuQJOB/IYGTNnahXvKYFSbDxVzlHYCv8ASEx6dfasTkDe8ZTauruUwJcx7jSun4
WsguMBoIsL/1fUMfm63NJCOpkTan+uaTiNaqsmFpL0c+hm2su2fvKFe0+O60tkKsZF5j
baQxmnq4IXAYR46VgQ/1QCw/tvHzWyQPO6iFuIv8CqdYiDQylWju0GxzWT4pmIb4XJai
dwd+aSdxoRMjuIeM1D/J8A+sFvpTQS9utAyplI342knEGtJbLgWimlsz2VddzpS8fkYf
kc0g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749057417; x=1749662217;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=4/f0L0aM2im1hNI4FqeJBncnA+adhlVAx9+n6QIigJg=;
b=BqIBfxlpfEPrOg+ctUf3amN3+/PfwFn2FuX2b7zha+1FgeXt/91JwDjX0UuyxtWkQb
ULO/2xW9WS4iPpZmO/aYnP4Iu/zZ1BPgjvAVVJl5IBHH2tmGCp87mL/IHxK4ydCwk0dJ
owVgCPUUrHsKZxV17nV0p0SJ7Zkmw8OmhVLoTHvCWd4cUO47MDv4hdOyB5htgnqjRa8n
3D1VvIiakb7bnvKD7aV3GtGV2PNtePV/W11IJnxxhZ5Dwjp3XGoMSNdHHYIgC6GrhGaJ
vjqCsdHqmKVf5k+ehlNTMJn9XPCjr/f384z+vBOImJkKNjLOCcVK6EK6UTJOkzW/EPT/
8jZA==
X-Gm-Message-State: AOJu0YxUxuGAwvnBE0JfTbfHuWetMh9RTAiBiX7i/NSqXEwaNuZM6Zuu
rd807RlW9j9mZzO1Yfi9hc1VR7jXo3IGwqe+5+on9Pw0lTqRaPkwVYGqWHK+fWnWP4g=
X-Gm-Gg: ASbGncue2B6DSkub+EWtlepiA0tR9L5Ffa2nKHBp/WnJmVUsVlYFM9LLWA7Afr8WIVu
p05Tk0t5dg9BKsQ2ScsGrlM3RuK2nQgTGusfn8San192TTNEEIur5PHI1E7udZ/eg1LLHpRk92i
EwGXSedlLWvK91wcGWSAqpF5nDZ4nPuBiqpixhs4nSTzmqicz3Mr2CQFo9o/INrhYQVHG2vDZLC
BddXhFwKrYvAcPcIlkeo1jAN/Y4kZ8uxS9XYMAYbdbwMgVNNUGxFFJbF4B9N4gBZDeTYzYcS37I
iEZKVdN+gypjHka0Feu5BNvi8S9hSIvlz1MUfPXIjc516m3J8qWRACPZftIc9YrSuZF4xHA3hE/
hfkVnRkI=
X-Google-Smtp-Source: AGHT+IGUQ+606zAFEeN3EdNg/32lSEpOR8pjT3Wpzkm+BItxN7Z6b3x4NPSTnjln/92NqMxTfmUeAQ==
X-Received: by 2002:a17:90b:4fca:b0:311:abba:53d2 with SMTP id 98e67ed59e1d1-3130cd96febmr6564673a91.17.1749057416742;
Wed, 04 Jun 2025 10:16:56 -0700 (PDT)
Received: from debug.ba.rivosinc.com ([64.71.180.162])
by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3124e2e9c9fsm9178972a91.30.2025.06.04.10.16.53
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 10:16:56 -0700 (PDT)
From: Deepak Gupta <debug@xxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 10:15:38 -0700
Subject: [PATCH v17 14/27] riscv: Implements arch agnostic indirect branch
tracking prctls
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <20250604-v5_user_cfi_series-v17-14-4565c2cf869f@xxxxxxxxxxxx>
References: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
In-Reply-To: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
To: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>,
Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>,
x86@xxxxxxxxxx, "H. Peter Anvin" <hpa@xxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>,
Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>,
Paul Walmsley <paul.walmsley@xxxxxxxxxx>,
Palmer Dabbelt <palmer@xxxxxxxxxxx>, Albert Ou <aou@xxxxxxxxxxxxxxxxx>,
Conor Dooley <conor@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>,
Christian Brauner <brauner@xxxxxxxxxx>,
Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Oleg Nesterov <oleg@xxxxxxxxxx>,
Eric Biederman <ebiederm@xxxxxxxxxxxx>, Kees Cook <kees@xxxxxxxxxx>,
Jonathan Corbet <corbet@xxxxxxx>, Shuah Khan <shuah@xxxxxxxxxx>,
Jann Horn <jannh@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>,
Miguel Ojeda <ojeda@xxxxxxxxxx>, Alex Gaynor <alex.gaynor@xxxxxxxxx>,
Boqun Feng <boqun.feng@xxxxxxxxx>, Gary Guo <gary@xxxxxxxxxxx>,
=?utf-8?q?Bj=C3=B6rn_Roy_Baron?= <bjorn3_gh@xxxxxxxxxxxxxx>,
Benno Lossin <benno.lossin@xxxxxxxxx>,
Andreas Hindborg <a.hindborg@xxxxxxxxxx>, Alice Ryhl <aliceryhl@xxxxxxxxxx>,
Trevor Gross <tmgross@xxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx,
linux-mm@xxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx,
linux-doc@xxxxxxxxxxxxxxx, linux-kselftest@xxxxxxxxxxxxxxx,
alistair.francis@xxxxxxx, richard.henderson@xxxxxxxxxx, jim.shu@xxxxxxxxxx,
andybnac@xxxxxxxxx, kito.cheng@xxxxxxxxxx, charlie@xxxxxxxxxxxx,
atishp@xxxxxxxxxxxx, evan@xxxxxxxxxxxx, cleger@xxxxxxxxxxxx,
alexghiti@xxxxxxxxxxxx, samitolvanen@xxxxxxxxxx, broonie@xxxxxxxxxx,
rick.p.edgecombe@xxxxxxxxx, rust-for-linux@xxxxxxxxxxxxxxx,
Zong Li <zong.li@xxxxxxxxxx>, Deepak Gupta <debug@xxxxxxxxxxxx>
X-Mailer: b4 0.13.0
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
prctls implemented are:
PR_SET_INDIR_BR_LP_STATUS, PR_GET_INDIR_BR_LP_STATUS and
PR_LOCK_INDIR_BR_LP_STATUS
Reviewed-by: Zong Li <zong.li@xxxxxxxxxx>
Signed-off-by: Deepak Gupta <debug@xxxxxxxxxxxx>
---
arch/riscv/include/asm/usercfi.h | 14 +++++++
arch/riscv/kernel/entry.S | 2 +-
arch/riscv/kernel/process.c | 5 +++
arch/riscv/kernel/usercfi.c | 79 ++++++++++++++++++++++++++++++++++++++++
4 files changed, 99 insertions(+), 1 deletion(-)
diff --git a/arch/riscv/include/asm/usercfi.h b/arch/riscv/include/asm/usercfi.h
index f747ad469c7c..98820d93c6e1 100644
--- a/arch/riscv/include/asm/usercfi.h
+++ b/arch/riscv/include/asm/usercfi.h
@@ -16,6 +16,8 @@ struct kernel_clone_args;
struct cfi_state {
unsigned long ubcfi_en : 1; /* Enable for backward cfi. */
unsigned long ubcfi_locked : 1;
+ unsigned long ufcfi_en : 1; /* Enable for forward cfi. Note that ELP goes in sstatus */
+ unsigned long ufcfi_locked : 1;
unsigned long user_shdw_stk; /* Current user shadow stack pointer */
unsigned long shdw_stk_base; /* Base address of shadow stack */
unsigned long shdw_stk_size; /* size of shadow stack */
@@ -32,6 +34,10 @@ bool is_shstk_locked(struct task_struct *task);
bool is_shstk_allocated(struct task_struct *task);
void set_shstk_lock(struct task_struct *task);
void set_shstk_status(struct task_struct *task, bool enable);
+bool is_indir_lp_enabled(struct task_struct *task);
+bool is_indir_lp_locked(struct task_struct *task);
+void set_indir_lp_status(struct task_struct *task, bool enable);
+void set_indir_lp_lock(struct task_struct *task);
#define PR_SHADOW_STACK_SUPPORTED_STATUS_MASK (PR_SHADOW_STACK_ENABLE)
@@ -57,6 +63,14 @@ void set_shstk_status(struct task_struct *task, bool enable);
#define set_shstk_status(task, enable) do {} while (0)
+#define is_indir_lp_enabled(task) false
+
+#define is_indir_lp_locked(task) false
+
+#define set_indir_lp_status(task, enable) do {} while (0)
+
+#define set_indir_lp_lock(task) do {} while (0)
+
#endif /* CONFIG_RISCV_USER_CFI */
#endif /* __ASSEMBLY__ */
diff --git a/arch/riscv/kernel/entry.S b/arch/riscv/kernel/entry.S
index c4bfe2085c41..978115567bca 100644
--- a/arch/riscv/kernel/entry.S
+++ b/arch/riscv/kernel/entry.S
@@ -169,7 +169,7 @@ SYM_CODE_START(handle_exception)
* Disable the FPU/Vector to detect illegal usage of floating point
* or vector in kernel space.
*/
- li t0, SR_SUM | SR_FS_VS
+ li t0, SR_SUM | SR_FS_VS | SR_ELP
REG_L s0, TASK_TI_USER_SP(tp)
csrrc s1, CSR_STATUS, t0
diff --git a/arch/riscv/kernel/process.c b/arch/riscv/kernel/process.c
index 3099fadb0397..2caddcd62848 100644
--- a/arch/riscv/kernel/process.c
+++ b/arch/riscv/kernel/process.c
@@ -160,6 +160,11 @@ void start_thread(struct pt_regs *regs, unsigned long pc,
set_shstk_status(current, false);
set_shstk_base(current, 0, 0);
set_active_shstk(current, 0);
+ /*
+ * disable indirect branch tracking on exec.
+ * libc will enable it later via prctl.
+ */
+ set_indir_lp_status(current, false);
#ifdef CONFIG_64BIT
regs->status &= ~SR_UXL;
diff --git a/arch/riscv/kernel/usercfi.c b/arch/riscv/kernel/usercfi.c
index 08620bdae696..2ebe789caa6b 100644
--- a/arch/riscv/kernel/usercfi.c
+++ b/arch/riscv/kernel/usercfi.c
@@ -72,6 +72,35 @@ void set_shstk_lock(struct task_struct *task)
task->thread_info.user_cfi_state.ubcfi_locked = 1;
}
+bool is_indir_lp_enabled(struct task_struct *task)
+{
+ return task->thread_info.user_cfi_state.ufcfi_en;
+}
+
+bool is_indir_lp_locked(struct task_struct *task)
+{
+ return task->thread_info.user_cfi_state.ufcfi_locked;
+}
+
+void set_indir_lp_status(struct task_struct *task, bool enable)
+{
+ if (!cpu_supports_indirect_br_lp_instr())
+ return;
+
+ task->thread_info.user_cfi_state.ufcfi_en = enable ? 1 : 0;
+
+ if (enable)
+ task->thread.envcfg |= ENVCFG_LPE;
+ else
+ task->thread.envcfg &= ~ENVCFG_LPE;
+
+ csr_write(CSR_ENVCFG, task->thread.envcfg);
+}
+
+void set_indir_lp_lock(struct task_struct *task)
+{
+ task->thread_info.user_cfi_state.ufcfi_locked = 1;
+}
/*
* If size is 0, then to be compatible with regular stack we want it to be as big as
* regular stack. Else PAGE_ALIGN it and return back
@@ -371,3 +400,53 @@ int arch_lock_shadow_stack_status(struct task_struct *task,
return 0;
}
+
+int arch_get_indir_br_lp_status(struct task_struct *t, unsigned long __user *status)
+{
+ unsigned long fcfi_status = 0;
+
+ if (!cpu_supports_indirect_br_lp_instr())
+ return -EINVAL;
+
+ /* indirect branch tracking is enabled on the task or not */
+ fcfi_status |= (is_indir_lp_enabled(t) ? PR_INDIR_BR_LP_ENABLE : 0);
+
+ return copy_to_user(status, &fcfi_status, sizeof(fcfi_status)) ? -EFAULT : 0;
+}
+
+int arch_set_indir_br_lp_status(struct task_struct *t, unsigned long status)
+{
+ bool enable_indir_lp = false;
+
+ if (!cpu_supports_indirect_br_lp_instr())
+ return -EINVAL;
+
+ /* indirect branch tracking is locked and further can't be modified by user */
+ if (is_indir_lp_locked(t))
+ return -EINVAL;
+
+ /* Reject unknown flags */
+ if (status & ~PR_INDIR_BR_LP_ENABLE)
+ return -EINVAL;
+
+ enable_indir_lp = (status & PR_INDIR_BR_LP_ENABLE);
+ set_indir_lp_status(t, enable_indir_lp);
+
+ return 0;
+}
+
+int arch_lock_indir_br_lp_status(struct task_struct *task,
+ unsigned long arg)
+{
+ /*
+ * If indirect branch tracking is not supported or not enabled on task,
+ * nothing to lock here
+ */
+ if (!cpu_supports_indirect_br_lp_instr() ||
+ !is_indir_lp_enabled(task) || arg != 0)
+ return -EINVAL;
+
+ set_indir_lp_lock(task);
+
+ return 0;
+}
--
2.43.0
Return-Path: <linux-kernel+bounces-673595-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id BD3B141E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:22:21 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 93E68189C4CD
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:21:58 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 3C04E2571A2;
Wed, 4 Jun 2025 17:17:04 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="15inJDo8"
Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9E54925291D
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:17:00 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.47
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749057422; cv=none; b=IFpEEhTYM39ngE4FPmHo3fvYu4mKMnaIVk/poVbMHyun2KLbobRzrZqO/YYhg6NWXRIMvwNsAWi1ShRIZd45VCCBiBMXepufjDO5p0h/v/LFSlXiK4A0IIDEoYAYYYAOpAkO3KMDsJAt1VKnPF5BkDFsvX2qzLZOcoSTTb5Hjwk=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749057422; c=relaxed/simple;
bh=4Xxqpxv+T1y7YgfFKCv6LuC+R+mfz27divdflKMeay8=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=e0nIKSBGBl55K2g1KIi/8DOT7FvYhQO9H/SP2FAvFfTKZ6Ds6VJhP2ROVydO0XK0qAujlQnlTU0A8m88qtUWdto5mxdp39VMQawNS/b/7ZX74gY4NJOPijTqaCD+uRHL9cwVcXZVCLJeDVyMmm8qaKLloqMwDYJ+mkfmS/Rf3Jc=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=15inJDo8; arc=none smtp.client-ip=209.85.216.47
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com
Received: by mail-pj1-f47.google.com with SMTP id 98e67ed59e1d1-311c95ddfb5so83562a91.2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 10:17:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1749057420; x=1749662220; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=4Ps8NKTexRvfBcPPDMVIyCvPCvYZAn4HwKLuefOdoqE=;
b=15inJDo8QquhiJy/pQcHsoZ68YTv8EAwGgugPxuA3lHC3NPJMPYVa4LdBH5wf+nEE8
/L95E6iBuYroJbz4c+aMuQU+M+FLGdLt9JlpaUFpRZey1DsybVoXDT4yKKXyLLL+y+CF
ixAYVIl5NEHnN+T4BxnxtkPxq9KKuxL+UG0CqRyJI/7ztkoOQQnsGh7Vx0lfnkhsPHrJ
Jqe7ozo4qOsSD88/eHT5gJRkzySL0RPVt+GOfdcRKopFsZ2IEYtPguxTn4m+dL0go4D4
MmtJgE6r4NoicM6bdBQWq09VsXDCkprolCoXQXgGpBdQ6t8icajfAS6UHQatbQMYzXbW
MW2w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749057420; x=1749662220;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=4Ps8NKTexRvfBcPPDMVIyCvPCvYZAn4HwKLuefOdoqE=;
b=EEkTXqT8nKLd1Lw5CKZcE2ubXQ695wdJG8d5Y3XHiptz8eN4W6EtOh3G8GWiHxlr3e
teTslnWwwaa0FFMOrT0uwhKPhgdym2vfrZNO2OX6wJbwHM3mKqxuUWnhxUqKhXGUUgc6
cA25hRHEPU/FgBftf8weOIsS0jE3L3EXjG+F/55UVqirbmB3C/pu63C1fhiRAPLS+pOx
4TBobSO2fdDYrT/GJ3T+zupkbeZWq6f4dv73Uq8cr1bVbPqfTekrN8n9EOwJiOuzXl2W
MQZMPhnweHGpYDXi+Npn7oXrVRuqTaCOjzHhV8C4CQ/JAS6hXG3wK2Ip2ojM14C1VoQA
bj/g==
X-Gm-Message-State: AOJu0Yy+e7Rbb5qs6KcLLlnr3ogJ73DKEAMYeiAyR0DyigEiNOWU6RwF
rnSyhGf4KW/HpVpGX5OXDXDWS1YlRM9cDIsf6qHkEHZJtKcnmMiUs6RoonKyczEAKXc=
X-Gm-Gg: ASbGncvFyeF1JGB/Ko2L+RHfxt2xiJELUaYL6jIUuZ4DUnuP30x3r91GALWBRTrUzT6
NOdsnGdogHyyNc5922TLgzEMsgeg3eP2eV+Lh9pQQMB1WO+82B3RhHJgFBcwILhR0a6mdfOriaL
UxWqwURbhEgHQwghvbMIwdOLhW8f7T/llRTzckYanNeGXd2ymfbF76e62srwC4Xit5pXZbR05t+
n/X3VMk89Z2BHqIbt+52HG8XlM0HxW8Z1rEi5GcsfDQ32R+UBD6RtVw+qJU7aUF+xBGmwTWKsGE
A+gx5rDmLm3z0UuJ0QVVYfZCSFKs3Z8ByEwvxk7HbhOdMl7TWvaIItS5ZlGIpXHdzeotdviR
X-Google-Smtp-Source: AGHT+IEP2bk43fPAFF7uUJX75rcN5qw/Z+TfMZHF8o/fNykZeh+3oEly2k/Cb3HM5oBmyE9aSHSFyQ==
X-Received: by 2002:a17:90b:2681:b0:311:a314:c2dc with SMTP id 98e67ed59e1d1-3130ccbf58fmr5616146a91.14.1749057419811;
Wed, 04 Jun 2025 10:16:59 -0700 (PDT)
Received: from debug.ba.rivosinc.com ([64.71.180.162])
by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3124e2e9c9fsm9178972a91.30.2025.06.04.10.16.56
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 10:16:59 -0700 (PDT)
From: Deepak Gupta <debug@xxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 10:15:39 -0700
Subject: [PATCH v17 15/27] riscv/traps: Introduce software check exception
and uprobe handling
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <20250604-v5_user_cfi_series-v17-15-4565c2cf869f@xxxxxxxxxxxx>
References: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
In-Reply-To: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
To: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>,
Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>,
x86@xxxxxxxxxx, "H. Peter Anvin" <hpa@xxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>,
Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>,
Paul Walmsley <paul.walmsley@xxxxxxxxxx>,
Palmer Dabbelt <palmer@xxxxxxxxxxx>, Albert Ou <aou@xxxxxxxxxxxxxxxxx>,
Conor Dooley <conor@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>,
Christian Brauner <brauner@xxxxxxxxxx>,
Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Oleg Nesterov <oleg@xxxxxxxxxx>,
Eric Biederman <ebiederm@xxxxxxxxxxxx>, Kees Cook <kees@xxxxxxxxxx>,
Jonathan Corbet <corbet@xxxxxxx>, Shuah Khan <shuah@xxxxxxxxxx>,
Jann Horn <jannh@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>,
Miguel Ojeda <ojeda@xxxxxxxxxx>, Alex Gaynor <alex.gaynor@xxxxxxxxx>,
Boqun Feng <boqun.feng@xxxxxxxxx>, Gary Guo <gary@xxxxxxxxxxx>,
=?utf-8?q?Bj=C3=B6rn_Roy_Baron?= <bjorn3_gh@xxxxxxxxxxxxxx>,
Benno Lossin <benno.lossin@xxxxxxxxx>,
Andreas Hindborg <a.hindborg@xxxxxxxxxx>, Alice Ryhl <aliceryhl@xxxxxxxxxx>,
Trevor Gross <tmgross@xxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx,
linux-mm@xxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx,
linux-doc@xxxxxxxxxxxxxxx, linux-kselftest@xxxxxxxxxxxxxxx,
alistair.francis@xxxxxxx, richard.henderson@xxxxxxxxxx, jim.shu@xxxxxxxxxx,
andybnac@xxxxxxxxx, kito.cheng@xxxxxxxxxx, charlie@xxxxxxxxxxxx,
atishp@xxxxxxxxxxxx, evan@xxxxxxxxxxxx, cleger@xxxxxxxxxxxx,
alexghiti@xxxxxxxxxxxx, samitolvanen@xxxxxxxxxx, broonie@xxxxxxxxxx,
rick.p.edgecombe@xxxxxxxxx, rust-for-linux@xxxxxxxxxxxxxxx,
Zong Li <zong.li@xxxxxxxxxx>, Deepak Gupta <debug@xxxxxxxxxxxx>
X-Mailer: b4 0.13.0
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
zicfiss / zicfilp introduces a new exception to priv isa `software check
exception` with cause code = 18. This patch implements software check
exception.
Additionally it implements a cfi violation handler which checks for code
in xtval. If xtval=2, it means that sw check exception happened because of
an indirect branch not landing on 4 byte aligned PC or not landing on
`lpad` instruction or label value embedded in `lpad` not matching label
value setup in `x7`. If xtval=3, it means that sw check exception happened
because of mismatch between link register (x1 or x5) and top of shadow
stack (on execution of `sspopchk`).
In case of cfi violation, SIGSEGV is raised with code=SEGV_CPERR.
SEGV_CPERR was introduced by x86 shadow stack patches.
To keep uprobes working, handle the uprobe event first before reporting
the CFI violation in software-check exception handler. Because when the
landing pad is activated, if the uprobe point is set at the lpad
instruction at the beginning of a function, the system triggers a software
-check exception instead of an ebreak exception due to the exception
priority, then uprobe can't work successfully.
Co-developed-by: Zong Li <zong.li@xxxxxxxxxx>
Reviewed-by: Zong Li <zong.li@xxxxxxxxxx>
Signed-off-by: Zong Li <zong.li@xxxxxxxxxx>
Signed-off-by: Deepak Gupta <debug@xxxxxxxxxxxx>
---
arch/riscv/include/asm/asm-prototypes.h | 1 +
arch/riscv/include/asm/entry-common.h | 2 ++
arch/riscv/kernel/entry.S | 3 ++
arch/riscv/kernel/traps.c | 51 +++++++++++++++++++++++++++++++++
4 files changed, 57 insertions(+)
diff --git a/arch/riscv/include/asm/asm-prototypes.h b/arch/riscv/include/asm/asm-prototypes.h
index cd627ec289f1..5a27cefd7805 100644
--- a/arch/riscv/include/asm/asm-prototypes.h
+++ b/arch/riscv/include/asm/asm-prototypes.h
@@ -51,6 +51,7 @@ DECLARE_DO_ERROR_INFO(do_trap_ecall_u);
DECLARE_DO_ERROR_INFO(do_trap_ecall_s);
DECLARE_DO_ERROR_INFO(do_trap_ecall_m);
DECLARE_DO_ERROR_INFO(do_trap_break);
+DECLARE_DO_ERROR_INFO(do_trap_software_check);
asmlinkage void handle_bad_stack(struct pt_regs *regs);
asmlinkage void do_page_fault(struct pt_regs *regs);
diff --git a/arch/riscv/include/asm/entry-common.h b/arch/riscv/include/asm/entry-common.h
index b28ccc6cdeea..34ed149af5d1 100644
--- a/arch/riscv/include/asm/entry-common.h
+++ b/arch/riscv/include/asm/entry-common.h
@@ -40,4 +40,6 @@ static inline int handle_misaligned_store(struct pt_regs *regs)
}
#endif
+bool handle_user_cfi_violation(struct pt_regs *regs);
+
#endif /* _ASM_RISCV_ENTRY_COMMON_H */
diff --git a/arch/riscv/kernel/entry.S b/arch/riscv/kernel/entry.S
index 978115567bca..8d25837a9384 100644
--- a/arch/riscv/kernel/entry.S
+++ b/arch/riscv/kernel/entry.S
@@ -474,6 +474,9 @@ SYM_DATA_START_LOCAL(excp_vect_table)
RISCV_PTR do_page_fault /* load page fault */
RISCV_PTR do_trap_unknown
RISCV_PTR do_page_fault /* store page fault */
+ RISCV_PTR do_trap_unknown /* cause=16 */
+ RISCV_PTR do_trap_unknown /* cause=17 */
+ RISCV_PTR do_trap_software_check /* cause=18 is sw check exception */
SYM_DATA_END_LABEL(excp_vect_table, SYM_L_LOCAL, excp_vect_table_end)
#ifndef CONFIG_MMU
diff --git a/arch/riscv/kernel/traps.c b/arch/riscv/kernel/traps.c
index 8ff8e8b36524..64388370e1ad 100644
--- a/arch/riscv/kernel/traps.c
+++ b/arch/riscv/kernel/traps.c
@@ -354,6 +354,57 @@ void do_trap_ecall_u(struct pt_regs *regs)
}
+#define CFI_TVAL_FCFI_CODE 2
+#define CFI_TVAL_BCFI_CODE 3
+/* handle cfi violations */
+bool handle_user_cfi_violation(struct pt_regs *regs)
+{
+ unsigned long tval = csr_read(CSR_TVAL);
+ bool is_fcfi = (tval == CFI_TVAL_FCFI_CODE && cpu_supports_indirect_br_lp_instr());
+ bool is_bcfi = (tval == CFI_TVAL_BCFI_CODE && cpu_supports_shadow_stack());
+
+ /*
+ * Handle uprobe event first. The probe point can be a valid target
+ * of indirect jumps or calls, in this case, forward cfi violation
+ * will be triggered instead of breakpoint exception.
+ */
+ if (is_fcfi && probe_breakpoint_handler(regs))
+ return true;
+
+ if (is_fcfi || is_bcfi) {
+ do_trap_error(regs, SIGSEGV, SEGV_CPERR, regs->epc,
+ "Oops - control flow violation");
+ return true;
+ }
+
+ return false;
+}
+
+/*
+ * software check exception is defined with risc-v cfi spec. Software check
+ * exception is raised when:-
+ * a) An indirect branch doesn't land on 4 byte aligned PC or `lpad`
+ * instruction or `label` value programmed in `lpad` instr doesn't
+ * match with value setup in `x7`. reported code in `xtval` is 2.
+ * b) `sspopchk` instruction finds a mismatch between top of shadow stack (ssp)
+ * and x1/x5. reported code in `xtval` is 3.
+ */
+asmlinkage __visible __trap_section void do_trap_software_check(struct pt_regs *regs)
+{
+ if (user_mode(regs)) {
+ irqentry_enter_from_user_mode(regs);
+
+ /* not a cfi violation, then merge into flow of unknown trap handler */
+ if (!handle_user_cfi_violation(regs))
+ do_trap_unknown(regs);
+
+ irqentry_exit_to_user_mode(regs);
+ } else {
+ /* sw check exception coming from kernel is a bug in kernel */
+ die(regs, "Kernel BUG");
+ }
+}
+
#ifdef CONFIG_MMU
asmlinkage __visible noinstr void do_page_fault(struct pt_regs *regs)
{
--
2.43.0
Return-Path: <linux-kernel+bounces-673597-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 490CF41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:22:24 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 7FA60171718
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:22:25 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id C47B72586C5;
Wed, 4 Jun 2025 17:17:10 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="WVsiHI0l"
Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2BB4A2580EE
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:17:06 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.51
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749057429; cv=none; b=Me9wJXlIiqasYMtJdyQWZqM5em0e1HyPm98V9JSeiiO0YuSRDzNrMMV+RioNA031vSePHsQ9G02bBmkgyAKm7ls8rtlRNNGLE83dlqDDX4KKgI5bvsAPCav4DzHj3XLLzVANojHBl+p7qXvzoYbpRYFuRw9ZUS0dmjFbsXhuykE=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749057429; c=relaxed/simple;
bh=0u4ezDqaJpxbdEUTzM407JE+DopCFC7uqs4ygHz0I+I=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=iqZcvKbqs4Ih/N0HZkbospBw33fGlFcMenAd+MwmrVAnES3tVDJiljVDmmPvbZYGU8wujipCryPg6DvyFL4fwIrulmldFPRyzNXfxqJXo/krihG71VWWLDgjPDXjdGq6Un2XNLYgCLyntlDLUR7lfh/Ul4y5Dbw19BRAw/URtkQ=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=WVsiHI0l; arc=none smtp.client-ip=209.85.216.51
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com
Received: by mail-pj1-f51.google.com with SMTP id 98e67ed59e1d1-3122a63201bso100465a91.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 10:17:06 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1749057426; x=1749662226; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=NiyUtsRc4plmi7vohRqdQjzwfkHQI38tOt31f5L5qaY=;
b=WVsiHI0l2WDyk6nxFOyV0Mjij+IiGUrsTBIJpzs7fq3MX0QB+/9TSNb5FZdrsW7Pwv
SoYQkQkbLo7StRVkLChENs1CVvNOTONPk5SnQlLVVW3SXA9inzRPsFdaYD0OehS6vqjD
7E3rGjlit9JkJwzYo97sLCPbelOy1LdUavsychs7oy1a0PTjMULkfGcFmOftNBweFH/w
xjMoLdKyQZvlkL4JxNdwUK1gfl3QaSSXK2J5tYLb9bh9ttaxmaezYChEAbfHVQbTqHTj
+0ZBN0yLGUv5GgLq2x2I1LC5jbx6pFcvAnZr1utzHyPDOBTRMEkFf7kHdOjuO7+uzQJ0
JEGg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749057426; x=1749662226;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=NiyUtsRc4plmi7vohRqdQjzwfkHQI38tOt31f5L5qaY=;
b=SvBJ/4+k+PHmIPWQk49AD5MS/WRumCvg6fXsrYd6I+bGcpPtELfQxgVBJK+/eUE7mN
4K1d6xyhUdA250CNI/WDPYnuIDkNv6h4ZugXQXdlhPLbdP57F1CSAk6sit9EJtbNOEs0
n0AzXiog/mnIQDv7RUDq5DTfT4vh+xgRy9uUMnAO8Aupga0zoOZ5C42hMI2BfWktMzyI
QGe8pP09Oct79/fLEeVXQU+LEokq+rWyyaTMTXADei83ZQRn4f3ZpZV31+P4M6L9SzWt
smKKPkiEOCkHwDZH1FwMBVwdaxhhZ5GD77nCTBa3S8w/VNPd9KasC6aSmKJ+vgfwXOx2
KIkA==
X-Gm-Message-State: AOJu0YwfRF4ggpgK8ZFHD/hos1/H1IRlgfCqW1ovC2nVmrWwHg8QOqm6
OFWGhPdbM7tqTnD2L4YiZrVvJjrvBydHIQ1zpJjZz2ap/YKTTeDiFDu+++hLK6+rjQc=
X-Gm-Gg: ASbGncv67RjemXXgvG4CfpX0/w4RleFbgAwzQi4VsEoE/Y3CKldudjCRieYlb7H4XWS
qFTPX6t4Xid0bTXp+rGc6oY3rQVCDFYcHvbAFB5+lBXYW4OjE8InbG9kSBqqXvNuD3u8MGD/b2i
0vMDGh9ITdw6wkdncxD/tPWp0p9CQPnwC+W9Ujc0DQh74jE92J3hlMPfTshLH11tC6NYMBRP5AT
fFtnYiVmUX5LIo1OJa+wB0P8UMGRjnj+wCgH9KsHG+FwVLHvwXPJr0INdDiU0oRT7f0mNoLnfR0
woA3rHu3EFYL+cyKTRRhVv0jxh8abXdhwEM00FaGn1u84YXmQvQCipvqpj6Skg==
X-Google-Smtp-Source: AGHT+IENsceiydaczLF85CA2pd1BqERPQ7DevIEbnP76ZOR4Nrejne4EaY7oK0TZKe3L1vdtAjnIzw==
X-Received: by 2002:a17:90b:268f:b0:311:ba32:164f with SMTP id 98e67ed59e1d1-3130cd14f29mr5260557a91.8.1749057425950;
Wed, 04 Jun 2025 10:17:05 -0700 (PDT)
Received: from debug.ba.rivosinc.com ([64.71.180.162])
by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3124e2e9c9fsm9178972a91.30.2025.06.04.10.17.03
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 10:17:05 -0700 (PDT)
From: Deepak Gupta <debug@xxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 10:15:41 -0700
Subject: [PATCH v17 17/27] riscv/signal: save and restore of shadow stack
for signal
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <20250604-v5_user_cfi_series-v17-17-4565c2cf869f@xxxxxxxxxxxx>
References: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
In-Reply-To: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
To: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>,
Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>,
x86@xxxxxxxxxx, "H. Peter Anvin" <hpa@xxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>,
Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>,
Paul Walmsley <paul.walmsley@xxxxxxxxxx>,
Palmer Dabbelt <palmer@xxxxxxxxxxx>, Albert Ou <aou@xxxxxxxxxxxxxxxxx>,
Conor Dooley <conor@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>,
Christian Brauner <brauner@xxxxxxxxxx>,
Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Oleg Nesterov <oleg@xxxxxxxxxx>,
Eric Biederman <ebiederm@xxxxxxxxxxxx>, Kees Cook <kees@xxxxxxxxxx>,
Jonathan Corbet <corbet@xxxxxxx>, Shuah Khan <shuah@xxxxxxxxxx>,
Jann Horn <jannh@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>,
Miguel Ojeda <ojeda@xxxxxxxxxx>, Alex Gaynor <alex.gaynor@xxxxxxxxx>,
Boqun Feng <boqun.feng@xxxxxxxxx>, Gary Guo <gary@xxxxxxxxxxx>,
=?utf-8?q?Bj=C3=B6rn_Roy_Baron?= <bjorn3_gh@xxxxxxxxxxxxxx>,
Benno Lossin <benno.lossin@xxxxxxxxx>,
Andreas Hindborg <a.hindborg@xxxxxxxxxx>, Alice Ryhl <aliceryhl@xxxxxxxxxx>,
Trevor Gross <tmgross@xxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx,
linux-mm@xxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx,
linux-doc@xxxxxxxxxxxxxxx, linux-kselftest@xxxxxxxxxxxxxxx,
alistair.francis@xxxxxxx, richard.henderson@xxxxxxxxxx, jim.shu@xxxxxxxxxx,
andybnac@xxxxxxxxx, kito.cheng@xxxxxxxxxx, charlie@xxxxxxxxxxxx,
atishp@xxxxxxxxxxxx, evan@xxxxxxxxxxxx, cleger@xxxxxxxxxxxx,
alexghiti@xxxxxxxxxxxx, samitolvanen@xxxxxxxxxx, broonie@xxxxxxxxxx,
rick.p.edgecombe@xxxxxxxxx, rust-for-linux@xxxxxxxxxxxxxxx,
Deepak Gupta <debug@xxxxxxxxxxxx>, Andy Chiu <andybnac@xxxxxxxxx>
X-Mailer: b4 0.13.0
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Save shadow stack pointer in sigcontext structure while delivering signal.
Restore shadow stack pointer from sigcontext on sigreturn.
As part of save operation, kernel uses `ssamoswap` to save snapshot of
current shadow stack on shadow stack itself (can be called as a save
token). During restore on sigreturn, kernel retrieves token from top of
shadow stack and validates it. This allows that user mode can't arbitrary
pivot to any shadow stack address without having a token and thus provide
strong security assurance between signaly delivery and sigreturn window.
Use ABI compatible way of saving/restoring shadow stack pointer into
signal stack. This follows what Vector extension, where extra registers
are placed in a form of extension header + extension body in the stack.
The extension header indicates the size of the extra architectural
states plus the size of header itself, and a magic identifier of the
extension. Then, the extensions body contains the new architectural
states in the form defined by uapi.
Signed-off-by: Andy Chiu <andy.chiu@xxxxxxxxxx>
Signed-off-by: Deepak Gupta <debug@xxxxxxxxxxxx>
---
arch/riscv/include/asm/usercfi.h | 10 ++++
arch/riscv/include/uapi/asm/ptrace.h | 4 ++
arch/riscv/include/uapi/asm/sigcontext.h | 1 +
arch/riscv/kernel/signal.c | 86 ++++++++++++++++++++++++++++++++
arch/riscv/kernel/usercfi.c | 56 +++++++++++++++++++++
5 files changed, 157 insertions(+)
diff --git a/arch/riscv/include/asm/usercfi.h b/arch/riscv/include/asm/usercfi.h
index 98820d93c6e1..54add512a4dc 100644
--- a/arch/riscv/include/asm/usercfi.h
+++ b/arch/riscv/include/asm/usercfi.h
@@ -8,6 +8,7 @@
#ifndef __ASSEMBLY__
#include <linux/types.h>
#include <linux/prctl.h>
+#include <linux/errno.h>
struct task_struct;
struct kernel_clone_args;
@@ -34,6 +35,9 @@ bool is_shstk_locked(struct task_struct *task);
bool is_shstk_allocated(struct task_struct *task);
void set_shstk_lock(struct task_struct *task);
void set_shstk_status(struct task_struct *task, bool enable);
+unsigned long get_active_shstk(struct task_struct *task);
+int restore_user_shstk(struct task_struct *tsk, unsigned long shstk_ptr);
+int save_user_shstk(struct task_struct *tsk, unsigned long *saved_shstk_ptr);
bool is_indir_lp_enabled(struct task_struct *task);
bool is_indir_lp_locked(struct task_struct *task);
void set_indir_lp_status(struct task_struct *task, bool enable);
@@ -71,6 +75,12 @@ void set_indir_lp_lock(struct task_struct *task);
#define set_indir_lp_lock(task) do {} while (0)
+#define restore_user_shstk(tsk, shstk_ptr) -EINVAL
+
+#define save_user_shstk(tsk, saved_shstk_ptr) -EINVAL
+
+#define get_active_shstk(task) 0UL
+
#endif /* CONFIG_RISCV_USER_CFI */
#endif /* __ASSEMBLY__ */
diff --git a/arch/riscv/include/uapi/asm/ptrace.h b/arch/riscv/include/uapi/asm/ptrace.h
index a38268b19c3d..659ea3af5680 100644
--- a/arch/riscv/include/uapi/asm/ptrace.h
+++ b/arch/riscv/include/uapi/asm/ptrace.h
@@ -127,6 +127,10 @@ struct __riscv_v_regset_state {
*/
#define RISCV_MAX_VLENB (8192)
+struct __sc_riscv_cfi_state {
+ unsigned long ss_ptr; /* shadow stack pointer */
+};
+
#endif /* __ASSEMBLY__ */
#endif /* _UAPI_ASM_RISCV_PTRACE_H */
diff --git a/arch/riscv/include/uapi/asm/sigcontext.h b/arch/riscv/include/uapi/asm/sigcontext.h
index cd4f175dc837..f37e4beffe03 100644
--- a/arch/riscv/include/uapi/asm/sigcontext.h
+++ b/arch/riscv/include/uapi/asm/sigcontext.h
@@ -10,6 +10,7 @@
/* The Magic number for signal context frame header. */
#define RISCV_V_MAGIC 0x53465457
+#define RISCV_ZICFISS_MAGIC 0x9487
#define END_MAGIC 0x0
/* The size of END signal context header. */
diff --git a/arch/riscv/kernel/signal.c b/arch/riscv/kernel/signal.c
index a5e3d54fe54b..1bcda11e0680 100644
--- a/arch/riscv/kernel/signal.c
+++ b/arch/riscv/kernel/signal.c
@@ -22,11 +22,13 @@
#include <asm/vector.h>
#include <asm/csr.h>
#include <asm/cacheflush.h>
+#include <asm/usercfi.h>
unsigned long signal_minsigstksz __ro_after_init;
extern u32 __user_rt_sigreturn[2];
static size_t riscv_v_sc_size __ro_after_init;
+static size_t riscv_zicfiss_sc_size __ro_after_init;
#define DEBUG_SIG 0
@@ -140,6 +142,62 @@ static long __restore_v_state(struct pt_regs *regs, void __user *sc_vec)
return copy_from_user(current->thread.vstate.datap, datap, riscv_v_vsize);
}
+static long save_cfiss_state(struct pt_regs *regs, void __user *sc_cfi)
+{
+ struct __sc_riscv_cfi_state __user *state = sc_cfi;
+ unsigned long ss_ptr = 0;
+ long err = 0;
+
+ if (!is_shstk_enabled(current))
+ return 0;
+
+ /*
+ * Save a pointer to shadow stack itself on shadow stack as a form of token.
+ * A token on shadow gives following properties
+ * - Safe save and restore for shadow stack switching. Any save of shadow stack
+ * must have had saved a token on shadow stack. Similarly any restore of shadow
+ * stack must check the token before restore. Since writing to shadow stack with
+ * address of shadow stack itself is not easily allowed. A restore without a save
+ * is quite difficult for an attacker to perform.
+ * - A natural break. A token in shadow stack provides a natural break in shadow stack
+ * So a single linear range can be bucketed into different shadow stack segments. Any
+ * sspopchk will detect the condition and fault to kernel as sw check exception.
+ */
+ err |= save_user_shstk(current, &ss_ptr);
+ err |= __put_user(ss_ptr, &state->ss_ptr);
+ if (unlikely(err))
+ return -EFAULT;
+
+ return riscv_zicfiss_sc_size;
+}
+
+static long __restore_cfiss_state(struct pt_regs *regs, void __user *sc_cfi)
+{
+ struct __sc_riscv_cfi_state __user *state = sc_cfi;
+ unsigned long ss_ptr = 0;
+ long err;
+
+ /*
+ * Restore shadow stack as a form of token stored on shadow stack itself as a safe
+ * way to restore.
+ * A token on shadow gives following properties
+ * - Safe save and restore for shadow stack switching. Any save of shadow stack
+ * must have had saved a token on shadow stack. Similarly any restore of shadow
+ * stack must check the token before restore. Since writing to shadow stack with
+ * address of shadow stack itself is not easily allowed. A restore without a save
+ * is quite difficult for an attacker to perform.
+ * - A natural break. A token in shadow stack provides a natural break in shadow stack
+ * So a single linear range can be bucketed into different shadow stack segments.
+ * sspopchk will detect the condition and fault to kernel as sw check exception.
+ */
+ err = __copy_from_user(&ss_ptr, &state->ss_ptr, sizeof(unsigned long));
+
+ if (unlikely(err))
+ return err;
+
+ return restore_user_shstk(current, ss_ptr);
+}
+
struct arch_ext_priv {
__u32 magic;
long (*save)(struct pt_regs *regs, void __user *sc_vec);
@@ -150,6 +208,10 @@ struct arch_ext_priv arch_ext_list[] = {
.magic = RISCV_V_MAGIC,
.save = &save_v_state,
},
+ {
+ .magic = RISCV_ZICFISS_MAGIC,
+ .save = &save_cfiss_state,
+ },
};
const size_t nr_arch_exts = ARRAY_SIZE(arch_ext_list);
@@ -202,6 +264,12 @@ static long restore_sigcontext(struct pt_regs *regs,
err = __restore_v_state(regs, sc_ext_ptr);
break;
+ case RISCV_ZICFISS_MAGIC:
+ if (!is_shstk_enabled(current) || size != riscv_zicfiss_sc_size)
+ return -EINVAL;
+
+ err = __restore_cfiss_state(regs, sc_ext_ptr);
+ break;
default:
return -EINVAL;
}
@@ -223,6 +291,16 @@ static size_t get_rt_frame_size(bool cal_all)
total_context_size += riscv_v_sc_size;
}
+ if (is_shstk_enabled(current))
+ total_context_size += riscv_zicfiss_sc_size;
+
+ /*
+ * Preserved a __riscv_ctx_hdr for END signal context header if an
+ * extension uses __riscv_extra_ext_header
+ */
+ if (total_context_size)
+ total_context_size += sizeof(struct __riscv_ctx_hdr);
+
frame_size += total_context_size;
frame_size = round_up(frame_size, 16);
@@ -359,6 +437,11 @@ static int setup_rt_frame(struct ksignal *ksig, sigset_t *set,
#ifdef CONFIG_MMU
regs->ra = (unsigned long)VDSO_SYMBOL(
current->mm->context.vdso, rt_sigreturn);
+
+ /* if bcfi is enabled x1 (ra) and x5 (t0) must match. not sure if we need this? */
+ if (is_shstk_enabled(current))
+ regs->t0 = regs->ra;
+
#else
/*
* For the nommu case we don't have a VDSO. Instead we push two
@@ -487,6 +570,9 @@ void __init init_rt_signal_env(void)
{
riscv_v_sc_size = sizeof(struct __riscv_ctx_hdr) +
sizeof(struct __sc_riscv_v_state) + riscv_v_vsize;
+
+ riscv_zicfiss_sc_size = sizeof(struct __riscv_ctx_hdr) +
+ sizeof(struct __sc_riscv_cfi_state);
/*
* Determine the stack space required for guaranteed signal delivery.
* The signal_minsigstksz will be populated into the AT_MINSIGSTKSZ entry
diff --git a/arch/riscv/kernel/usercfi.c b/arch/riscv/kernel/usercfi.c
index 2ebe789caa6b..8bc3e1e3f712 100644
--- a/arch/riscv/kernel/usercfi.c
+++ b/arch/riscv/kernel/usercfi.c
@@ -52,6 +52,11 @@ void set_active_shstk(struct task_struct *task, unsigned long shstk_addr)
task->thread_info.user_cfi_state.user_shdw_stk = shstk_addr;
}
+unsigned long get_active_shstk(struct task_struct *task)
+{
+ return task->thread_info.user_cfi_state.user_shdw_stk;
+}
+
void set_shstk_status(struct task_struct *task, bool enable)
{
if (!cpu_supports_shadow_stack())
@@ -169,6 +174,57 @@ static int create_rstor_token(unsigned long ssp, unsigned long *token_addr)
return 0;
}
+/*
+ * Save user shadow stack pointer on shadow stack itself and return pointer to saved location
+ * returns -EFAULT if operation was unsuccessful
+ */
+int save_user_shstk(struct task_struct *tsk, unsigned long *saved_shstk_ptr)
+{
+ unsigned long ss_ptr = 0;
+ unsigned long token_loc = 0;
+ int ret = 0;
+
+ if (saved_shstk_ptr == NULL)
+ return -EINVAL;
+
+ ss_ptr = get_active_shstk(tsk);
+ ret = create_rstor_token(ss_ptr, &token_loc);
+
+ if (!ret) {
+ *saved_shstk_ptr = token_loc;
+ set_active_shstk(tsk, token_loc);
+ }
+
+ return ret;
+}
+
+/*
+ * Restores user shadow stack pointer from token on shadow stack for task `tsk`
+ * returns -EFAULT if operation was unsuccessful
+ */
+int restore_user_shstk(struct task_struct *tsk, unsigned long shstk_ptr)
+{
+ unsigned long token = 0;
+
+ token = amo_user_shstk((unsigned long __user *)shstk_ptr, 0);
+
+ if (token == -1)
+ return -EFAULT;
+
+ /* invalid token, return EINVAL */
+ if ((token - shstk_ptr) != SHSTK_ENTRY_SIZE) {
+ pr_info_ratelimited(
+ "%s[%d]: bad restore token in %s: pc=%p sp=%p, token=%p, shstk_ptr=%p\n",
+ tsk->comm, task_pid_nr(tsk), __func__, (void *)(task_pt_regs(tsk)->epc),
+ (void *)(task_pt_regs(tsk)->sp), (void *)token, (void *)shstk_ptr);
+ return -EINVAL;
+ }
+
+ /* all checks passed, set active shstk and return success */
+ set_active_shstk(tsk, token);
+ return 0;
+}
+
static unsigned long allocate_shadow_stack(unsigned long addr, unsigned long size,
unsigned long token_offset, bool set_tok)
{
--
2.43.0
Return-Path: <linux-kernel+bounces-673596-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id BA77F41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:22:43 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id 34484189AA4B
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:22:18 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 9255C2580CC;
Wed, 4 Jun 2025 17:17:06 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="0Wv+F79s"
Received: from mail-pj1-f45.google.com (mail-pj1-f45.google.com [209.85.216.45])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 96225256C70
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:17:03 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.45
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749057425; cv=none; b=sBrHAbhaq2IkwXId6ToAH8EtvT4LLBhh9hTH7SCQozd7BdrMkP2DNmkWiPWd/AV+Yo9e0svRbYhEPuR0iHx8s+NbZOesJ8dm8t9bplOvZKe/vWcLlwtsMEyNMj1Pba59EwoAh/ohydaqSL8+Xggp3n3xD09DjbT0oRduxSVh7I4=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749057425; c=relaxed/simple;
bh=sceMDvU8DoYKg5vxiA9YsPZLUrKbHYFHIRo8Vx6EGT8=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=FkZpamxKir22pRBdJWNDJpTE0FQkpRztR8toEq6fheZTzkcUOPOce8BxrXCT711yxPAylgmuRn1FceLyVZ4p4tC0p1mWMFiOrCTCkcxzMjjWzn/TE01JU3garpOsZNvxRV7sjgzerdtg2yB7ygSKbIFEHCei8tbbVIKPX1OFGrA=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=0Wv+F79s; arc=none smtp.client-ip=209.85.216.45
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com
Received: by mail-pj1-f45.google.com with SMTP id 98e67ed59e1d1-312a62055d0so94712a91.3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 10:17:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1749057423; x=1749662223; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=+D4QltF1Nc7VEdA5n+UDPSlZueufWbEVbyRTdYC5Tzo=;
b=0Wv+F79saOtMvA9IOVujOJ5Hl+IC3aahZQGAqXNb8W/AhRBJpcZjpD7ew0UlNb4659
kMyT/EW2ld+epKZ2ZFi+Rp82asef6yvBjLw6MuYoreFwCL2TACJZKl69csep4Ju+w8jb
h5OmoAjfTRf/JnoUDiQld4FGndEV+6xPqxR6Frd7nrav8dYNPkhdtkxnVTLklbflMZs7
z0xeTH1oz7bw1tBoG++xsTXhwdBdtLWqrOZT/LlVEoTlnaQoStez/gpVGamOd6j+BDKC
N4ZvLQul3REZxGFKbQqDNg99nAoRdFoGNJZKpisx9V+BjYvUDoD2iaAlOBIlt5BdSYFw
FEhQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749057423; x=1749662223;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=+D4QltF1Nc7VEdA5n+UDPSlZueufWbEVbyRTdYC5Tzo=;
b=I9HlHBZLAcT3OnRpyx2+rev9gIWuc8Ke7fC+2aiNu5IzfZBWVQ6iC6kvJ8vzxfPojX
81Bk5wMOIBfUZTxQ3WRl2e6eitevxszRjpaTDCbsjPCF1wLbl+U8DYpBxDAK7CNmk+UB
yi0xfg0cDIdYKyfuwjdZkYvTM9uLhTA0O3EhvFufFsQ4RWVspQQYk9QS8HERLD5jcxTn
t/jdM/ORDmc4zUBcuhnq4XNzXFEyl2RWr4svsH1GL7rPNkdJ0LQ09OhtVRDmv1SFDEOO
rftPOw4hgM2hH1aI16BKqjKpJWKmEsyanUN56jqR8HkRHbDApUyrUH/wK7MrgQKXkv0U
4RLw==
X-Gm-Message-State: AOJu0YxjmGLpFga/v3SAVDb9rX3LAETsP/QYoTAbmp9rEoI/tN7VSreV
K6jHR9LR4OSoKFBvsovpTKCdsBg0uxg1f/N7M1J54Qc1aw6rbB2wABPuV0ePDL5o8cM=
X-Gm-Gg: ASbGncuv+8EORo4vs+AfwClelhQLuDAV6D3bw8YH41oY1rQ7yVkIHClwyLpM2lN3P2q
T2xtQNo+zy5r4f3m5KD3Z9PRbxl8M4yK2kXuR1nR47kByBIl7hWA0RwJoQHQI+Hjmj7WwDxoeDO
6qQrH93rkzbBLvGb+ZAFna0l7ZjnpEdrI7vZrX87ulnxVPWqha+sNzKQZbN/lwLPiYpYtAIo/iC
5vOtVfQlQy76LLo8KTYzZjb22Ugsylfwqq/knEZ2uwhpn3Klg0FMasl4B/TmucsXwbAvq7KMEiT
fh95f186J+bYZIDjcFFv5OaPVFXjHqYMHO8FtIL+bBtPSa9VL1bfOZIlJxQ1xg==
X-Google-Smtp-Source: AGHT+IF1MRU8r/0x7Bku8ApOV4tVsfopxDMC3sSKcwO5hJCplqPzWNvN6RMHdK+J4Hl7kft6EglKAA==
X-Received: by 2002:a17:90b:3811:b0:312:959:dc3f with SMTP id 98e67ed59e1d1-3130ccf659fmr5139917a91.3.1749057422819;
Wed, 04 Jun 2025 10:17:02 -0700 (PDT)
Received: from debug.ba.rivosinc.com ([64.71.180.162])
by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3124e2e9c9fsm9178972a91.30.2025.06.04.10.17.00
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 10:17:02 -0700 (PDT)
From: Deepak Gupta <debug@xxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 10:15:40 -0700
Subject: [PATCH v17 16/27] riscv: signal: abstract header saving for
setup_sigcontext
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <20250604-v5_user_cfi_series-v17-16-4565c2cf869f@xxxxxxxxxxxx>
References: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
In-Reply-To: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
To: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>,
Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>,
x86@xxxxxxxxxx, "H. Peter Anvin" <hpa@xxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>,
Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>,
Paul Walmsley <paul.walmsley@xxxxxxxxxx>,
Palmer Dabbelt <palmer@xxxxxxxxxxx>, Albert Ou <aou@xxxxxxxxxxxxxxxxx>,
Conor Dooley <conor@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>,
Christian Brauner <brauner@xxxxxxxxxx>,
Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Oleg Nesterov <oleg@xxxxxxxxxx>,
Eric Biederman <ebiederm@xxxxxxxxxxxx>, Kees Cook <kees@xxxxxxxxxx>,
Jonathan Corbet <corbet@xxxxxxx>, Shuah Khan <shuah@xxxxxxxxxx>,
Jann Horn <jannh@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>,
Miguel Ojeda <ojeda@xxxxxxxxxx>, Alex Gaynor <alex.gaynor@xxxxxxxxx>,
Boqun Feng <boqun.feng@xxxxxxxxx>, Gary Guo <gary@xxxxxxxxxxx>,
=?utf-8?q?Bj=C3=B6rn_Roy_Baron?= <bjorn3_gh@xxxxxxxxxxxxxx>,
Benno Lossin <benno.lossin@xxxxxxxxx>,
Andreas Hindborg <a.hindborg@xxxxxxxxxx>, Alice Ryhl <aliceryhl@xxxxxxxxxx>,
Trevor Gross <tmgross@xxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx,
linux-mm@xxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx,
linux-doc@xxxxxxxxxxxxxxx, linux-kselftest@xxxxxxxxxxxxxxx,
alistair.francis@xxxxxxx, richard.henderson@xxxxxxxxxx, jim.shu@xxxxxxxxxx,
andybnac@xxxxxxxxx, kito.cheng@xxxxxxxxxx, charlie@xxxxxxxxxxxx,
atishp@xxxxxxxxxxxx, evan@xxxxxxxxxxxx, cleger@xxxxxxxxxxxx,
alexghiti@xxxxxxxxxxxx, samitolvanen@xxxxxxxxxx, broonie@xxxxxxxxxx,
rick.p.edgecombe@xxxxxxxxx, rust-for-linux@xxxxxxxxxxxxxxx
X-Mailer: b4 0.13.0
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
From: Andy Chiu <andybnac@xxxxxxxxx>
The function save_v_state() served two purposes. First, it saved
extension context into the signal stack. Then, it constructed the
extension header if there was no fault. The second part is independent
of the extension itself. As a result, we can pull that part out, so
future extensions may reuse it. This patch adds arch_ext_list and makes
setup_sigcontext() go through all possible extensions' save() callback.
The callback returns a positive value indicating the size of the
successfully saved extension. Then the kernel proceeds to construct the
header for that extension. The kernel skips an extension if it does
not exist, or if the saving fails for some reasons. The error code is
propagated out on the later case.
This patch does not introduce any functional changes.
Signed-off-by: Andy Chiu <andybnac@xxxxxxxxx>
---
arch/riscv/include/asm/vector.h | 3 ++
arch/riscv/kernel/signal.c | 62 +++++++++++++++++++++++++++--------------
2 files changed, 44 insertions(+), 21 deletions(-)
diff --git a/arch/riscv/include/asm/vector.h b/arch/riscv/include/asm/vector.h
index e8a83f55be2b..05390538ea8a 100644
--- a/arch/riscv/include/asm/vector.h
+++ b/arch/riscv/include/asm/vector.h
@@ -407,6 +407,9 @@ static inline bool riscv_v_vstate_ctrl_user_allowed(void) { return false; }
#define riscv_v_thread_free(tsk) do {} while (0)
#define riscv_v_setup_ctx_cache() do {} while (0)
#define riscv_v_thread_alloc(tsk) do {} while (0)
+#define get_cpu_vector_context() do {} while (0)
+#define put_cpu_vector_context() do {} while (0)
+#define riscv_v_vstate_set_restore(task, regs) do {} while (0)
#endif /* CONFIG_RISCV_ISA_V */
diff --git a/arch/riscv/kernel/signal.c b/arch/riscv/kernel/signal.c
index 08378fea3a11..a5e3d54fe54b 100644
--- a/arch/riscv/kernel/signal.c
+++ b/arch/riscv/kernel/signal.c
@@ -68,18 +68,19 @@ static long save_fp_state(struct pt_regs *regs,
#define restore_fp_state(task, regs) (0)
#endif
-#ifdef CONFIG_RISCV_ISA_V
-
-static long save_v_state(struct pt_regs *regs, void __user **sc_vec)
+static long save_v_state(struct pt_regs *regs, void __user *sc_vec)
{
- struct __riscv_ctx_hdr __user *hdr;
struct __sc_riscv_v_state __user *state;
void __user *datap;
long err;
- hdr = *sc_vec;
- /* Place state to the user's signal context space after the hdr */
- state = (struct __sc_riscv_v_state __user *)(hdr + 1);
+ if (!IS_ENABLED(CONFIG_RISCV_ISA_V) ||
+ !((has_vector() || has_xtheadvector()) &&
+ riscv_v_vstate_query(regs)))
+ return 0;
+
+ /* Place state to the user's signal context spac */
+ state = (struct __sc_riscv_v_state __user *)sc_vec;
/* Point datap right after the end of __sc_riscv_v_state */
datap = state + 1;
@@ -97,15 +98,11 @@ static long save_v_state(struct pt_regs *regs, void __user **sc_vec)
err |= __put_user((__force void *)datap, &state->v_state.datap);
/* Copy the whole vector content to user space datap. */
err |= __copy_to_user(datap, current->thread.vstate.datap, riscv_v_vsize);
- /* Copy magic to the user space after saving all vector conetext */
- err |= __put_user(RISCV_V_MAGIC, &hdr->magic);
- err |= __put_user(riscv_v_sc_size, &hdr->size);
if (unlikely(err))
- return err;
+ return -EFAULT;
- /* Only progress the sv_vec if everything has done successfully */
- *sc_vec += riscv_v_sc_size;
- return 0;
+ /* Only return the size if everything has done successfully */
+ return riscv_v_sc_size;
}
/*
@@ -142,10 +139,20 @@ static long __restore_v_state(struct pt_regs *regs, void __user *sc_vec)
*/
return copy_from_user(current->thread.vstate.datap, datap, riscv_v_vsize);
}
-#else
-#define save_v_state(task, regs) (0)
-#define __restore_v_state(task, regs) (0)
-#endif
+
+struct arch_ext_priv {
+ __u32 magic;
+ long (*save)(struct pt_regs *regs, void __user *sc_vec);
+};
+
+struct arch_ext_priv arch_ext_list[] = {
+ {
+ .magic = RISCV_V_MAGIC,
+ .save = &save_v_state,
+ },
+};
+
+const size_t nr_arch_exts = ARRAY_SIZE(arch_ext_list);
static long restore_sigcontext(struct pt_regs *regs,
struct sigcontext __user *sc)
@@ -270,7 +277,8 @@ static long setup_sigcontext(struct rt_sigframe __user *frame,
{
struct sigcontext __user *sc = &frame->uc.uc_mcontext;
struct __riscv_ctx_hdr __user *sc_ext_ptr = &sc->sc_extdesc.hdr;
- long err;
+ struct arch_ext_priv *arch_ext;
+ long err, i, ext_size;
/* sc_regs is structured the same as the start of pt_regs */
err = __copy_to_user(&sc->sc_regs, regs, sizeof(sc->sc_regs));
@@ -278,8 +286,20 @@ static long setup_sigcontext(struct rt_sigframe __user *frame,
if (has_fpu())
err |= save_fp_state(regs, &sc->sc_fpregs);
/* Save the vector state. */
- if ((has_vector() || has_xtheadvector()) && riscv_v_vstate_query(regs))
- err |= save_v_state(regs, (void __user **)&sc_ext_ptr);
+ for (i = 0; i < nr_arch_exts; i++) {
+ arch_ext = &arch_ext_list[i];
+ if (!arch_ext->save)
+ continue;
+
+ ext_size = arch_ext->save(regs, sc_ext_ptr + 1);
+ if (ext_size <= 0) {
+ err |= ext_size;
+ } else {
+ err |= __put_user(arch_ext->magic, &sc_ext_ptr->magic);
+ err |= __put_user(ext_size, &sc_ext_ptr->size);
+ sc_ext_ptr = (void *)sc_ext_ptr + ext_size;
+ }
+ }
/* Write zero to fp-reserved space and check it on restore_sigcontext */
err |= __put_user(0, &sc->sc_extdesc.reserved);
/* And put END __riscv_ctx_hdr at the end. */
--
2.43.0
Return-Path: <linux-kernel+bounces-673600-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 9F4AE41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:23:35 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id AC5F11745F4
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:23:30 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 623DD25C6F0;
Wed, 4 Jun 2025 17:17:22 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="ozRr8y7/"
Received: from mail-pj1-f42.google.com (mail-pj1-f42.google.com [209.85.216.42])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 61D6625B1CF
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:17:16 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.42
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749057441; cv=none; b=l2OctgOH2uIo4MxN0g1Vah1IJuiV1skRDu+QEF2qXy4ZjDp0ieEL2AHn3Gu7Gytq/bb4JQe0ELyaHdGpMpJNg5c3weLgQFhQ71aEljJVHZ/hNuF35VQ+2jUyaD0BICIrcp6y7vwn7j5aO/7G8gdIpyuoqO/HY8214CdhbNycwoY=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749057441; c=relaxed/simple;
bh=ZMNfJGQcTcXW+Ox6hYmgZeihjxgbaJ9GC8ja8XfQDIg=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=k8gkRrNoAQtZtTyAS2JzgYpCiervoXHt8Ki7ET8hJ3zdtkbKDyNLfVxuNOQ+qRSn2Rc/MqDaRKC4XZ7O3/JQwtqUW8Qpf4/BxBIEnwgVY+VLi2tUPjOEkpRsB0S10LKEE3e9pcTbIrBxuCdIDbketOLpy1rYiPHVOSBqsSGu0LU=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=ozRr8y7/; arc=none smtp.client-ip=209.85.216.42
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com
Received: by mail-pj1-f42.google.com with SMTP id 98e67ed59e1d1-306bf444ba2so86262a91.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 10:17:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1749057435; x=1749662235; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=DXNrGX2eIDDqqmRRfhE1GhCa5+tzqdtGdU7JTzGQSvA=;
b=ozRr8y7/5j+NNkAT8S024NAEtpV7T1b8AJ1B5wrqR6/IgnmFrmMVUJDExVEtdyWB6w
mdPYF1KrjuIObV4YNm6RXeJ8o28VkoOTL3CarVIZ+DjvK1vRdY/UuJ2aGPVpXR3rPdS4
AM+RtC4C83iaxo60atQPSNiBe/vll9Ftod8Ypz6edpS8M1TIbhWpVnRG81TGOK2teu/f
5tyPo+2KtO6V2MkQTQHoYts0i2riJbyJV1BNpAxtKXOqTxNI4GlbVzOtdkL5K2/K01R6
VWNcI+xF2VIRicX8Rp1s3LUtt3NDT4A5rYpszx55fVEkI+YkF9pbc2wC4t6oiGpShxkd
EqKg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749057435; x=1749662235;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=DXNrGX2eIDDqqmRRfhE1GhCa5+tzqdtGdU7JTzGQSvA=;
b=D+fvxBSEzYJvGRhX/d/ILY1iIvXhXGVxcLIspJBZmIrFiDjeqM2XoWBHyp5B4X08r+
1HWBBc4wXiZZZ7PwJxpJKxu33l+ZNdOO709PQUhfWPeHwvhP9k38+bckSzu++6RN/B5m
ESHBO1eGbOcu4gyc1cQCjyqx/MD2bx2lV9mPKCHJIddP+Jr9Eu0Ys7yrEGL4oyl7jq0k
CtJXZ66KcZ1RlwR2M6/guGZ2RZGrMOgRs5PadDVIv1xd5PpO4yvjscJLtq5dAcmrv/wF
eqN/yzr1+yIl8J5iSG/uvIwzmBIBctS759witRDjLdXHXf2i9ISPOaIyBpmQ9mGRjIDc
AzeA==
X-Gm-Message-State: AOJu0YzcBP9zZyP/VsjEjIV1AmGOKzh0KtrP6o7Wnt2Nd5n3txmbf7sW
yWTB2MNh2cp6o5kPY+Kr/y+2v9SLNoSaGuTe4kzrutxijB/NZ93BJk6KhLsUx+8evVU=
X-Gm-Gg: ASbGncvb96dicaRiaeymciLztjzvmXbWkD3glkLoXPRNEBImEtd4YJ0ZMQNJ4zggRg9
wShbUoi6ywKFYp70oc/WJ71aTzLOvja+xy7G2aqKdz82zid5k3V6huJ5T21GmRB5IYSH8Ta8mIc
ToLyMJ7pmW3+4vheoDbD+7ge4DRjJcnavOgjN5gwAsJDx/pwY3xyq2ITtuqiMZYzkxLUgrWj2no
d/7MQTWkW2W7RCix5yegn5vYRufytCZ+KG4W4bYsAsnsju79yKRnQxDXLrvm5WhbcFlSunT1FH7
az/3P632R7BA6X6BH3bIhcPOfnY4fwjwSH/+qLXE0IV15pqkvM0hHEHJBP82Wpph9niigRMB
X-Google-Smtp-Source: AGHT+IFRkG/ueZmWo+NqSTRZ9V3ys7So/QoEVgn4dpe4KHFol1emcatYOtg6C5H9Gx/Ts8HBIn3E3A==
X-Received: by 2002:a17:90b:3d02:b0:312:e9d:4002 with SMTP id 98e67ed59e1d1-3130cdad8e7mr5727605a91.28.1749057435352;
Wed, 04 Jun 2025 10:17:15 -0700 (PDT)
Received: from debug.ba.rivosinc.com ([64.71.180.162])
by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3124e2e9c9fsm9178972a91.30.2025.06.04.10.17.12
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 10:17:15 -0700 (PDT)
From: Deepak Gupta <debug@xxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 10:15:44 -0700
Subject: [PATCH v17 20/27] riscv/hwprobe: zicfilp / zicfiss enumeration in
hwprobe
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <20250604-v5_user_cfi_series-v17-20-4565c2cf869f@xxxxxxxxxxxx>
References: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
In-Reply-To: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
To: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>,
Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>,
x86@xxxxxxxxxx, "H. Peter Anvin" <hpa@xxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>,
Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>,
Paul Walmsley <paul.walmsley@xxxxxxxxxx>,
Palmer Dabbelt <palmer@xxxxxxxxxxx>, Albert Ou <aou@xxxxxxxxxxxxxxxxx>,
Conor Dooley <conor@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>,
Christian Brauner <brauner@xxxxxxxxxx>,
Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Oleg Nesterov <oleg@xxxxxxxxxx>,
Eric Biederman <ebiederm@xxxxxxxxxxxx>, Kees Cook <kees@xxxxxxxxxx>,
Jonathan Corbet <corbet@xxxxxxx>, Shuah Khan <shuah@xxxxxxxxxx>,
Jann Horn <jannh@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>,
Miguel Ojeda <ojeda@xxxxxxxxxx>, Alex Gaynor <alex.gaynor@xxxxxxxxx>,
Boqun Feng <boqun.feng@xxxxxxxxx>, Gary Guo <gary@xxxxxxxxxxx>,
=?utf-8?q?Bj=C3=B6rn_Roy_Baron?= <bjorn3_gh@xxxxxxxxxxxxxx>,
Benno Lossin <benno.lossin@xxxxxxxxx>,
Andreas Hindborg <a.hindborg@xxxxxxxxxx>, Alice Ryhl <aliceryhl@xxxxxxxxxx>,
Trevor Gross <tmgross@xxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx,
linux-mm@xxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx,
linux-doc@xxxxxxxxxxxxxxx, linux-kselftest@xxxxxxxxxxxxxxx,
alistair.francis@xxxxxxx, richard.henderson@xxxxxxxxxx, jim.shu@xxxxxxxxxx,
andybnac@xxxxxxxxx, kito.cheng@xxxxxxxxxx, charlie@xxxxxxxxxxxx,
atishp@xxxxxxxxxxxx, evan@xxxxxxxxxxxx, cleger@xxxxxxxxxxxx,
alexghiti@xxxxxxxxxxxx, samitolvanen@xxxxxxxxxx, broonie@xxxxxxxxxx,
rick.p.edgecombe@xxxxxxxxx, rust-for-linux@xxxxxxxxxxxxxxx,
Zong Li <zong.li@xxxxxxxxxx>, Deepak Gupta <debug@xxxxxxxxxxxx>
X-Mailer: b4 0.13.0
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Adding enumeration of zicfilp and zicfiss extensions in hwprobe syscall.
Reviewed-by: Zong Li <zong.li@xxxxxxxxxx>
Signed-off-by: Deepak Gupta <debug@xxxxxxxxxxxx>
---
arch/riscv/include/uapi/asm/hwprobe.h | 2 ++
arch/riscv/kernel/sys_hwprobe.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/arch/riscv/include/uapi/asm/hwprobe.h b/arch/riscv/include/uapi/asm/hwprobe.h
index 3c2fce939673..9bc96881dc9b 100644
--- a/arch/riscv/include/uapi/asm/hwprobe.h
+++ b/arch/riscv/include/uapi/asm/hwprobe.h
@@ -81,6 +81,8 @@ struct riscv_hwprobe {
#define RISCV_HWPROBE_EXT_ZICBOM (1ULL << 55)
#define RISCV_HWPROBE_EXT_ZAAMO (1ULL << 56)
#define RISCV_HWPROBE_EXT_ZALRSC (1ULL << 57)
+#define RISCV_HWPROBE_EXT_ZICFILP (1ULL << 58)
+#define RISCV_HWPROBE_EXT_ZICFISS (1ULL << 59)
#define RISCV_HWPROBE_KEY_CPUPERF_0 5
#define RISCV_HWPROBE_MISALIGNED_UNKNOWN (0 << 0)
#define RISCV_HWPROBE_MISALIGNED_EMULATED (1 << 0)
diff --git a/arch/riscv/kernel/sys_hwprobe.c b/arch/riscv/kernel/sys_hwprobe.c
index 249aec8594a9..c86cba0e4506 100644
--- a/arch/riscv/kernel/sys_hwprobe.c
+++ b/arch/riscv/kernel/sys_hwprobe.c
@@ -111,6 +111,8 @@ static void hwprobe_isa_ext0(struct riscv_hwprobe *pair,
EXT_KEY(ZCMOP);
EXT_KEY(ZICBOM);
EXT_KEY(ZICBOZ);
+ EXT_KEY(ZICFILP);
+ EXT_KEY(ZICFISS);
EXT_KEY(ZICNTR);
EXT_KEY(ZICOND);
EXT_KEY(ZIHINTNTL);
--
2.43.0
Return-Path: <linux-kernel+bounces-673598-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id D9D6B41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:23:37 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 9217B3A9765
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:22:12 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 2D8F5259CBB;
Wed, 4 Jun 2025 17:17:12 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="A0PJRaE4"
Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id CCDD6258CEA
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:17:09 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.50
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749057431; cv=none; b=TpunkAbsaw1xMbnGr9ZeK7Wk50CAjvx47sLb6wcDXXiOf+h4WgZztGJsTjWP1ikwx5Y6AFb35WadsnXtWwioBY9ORYAiZ2mbxtnZMT4DNwLTZ97ar/sETj5m5MwImdLZdLpXJCLbbpUG4W++eNSccazs8t+KU6fdveFXLhZe4Qw=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749057431; c=relaxed/simple;
bh=2H2m5simIewFsayNAW49lR1H6/0qCUpR7o1kzaULgpg=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=HxSuQVCFWlukxu6CO3J/HjNdAmGimEPMuOx0/aOhDttVVSyV+NkqeWRFhdBfN+Uluj2O9e55tpHWNyg+JYHEi3yewQbZsQ7GDB5sIg2LSvKgLAh4H116LWAa3sBYd+YesmIdo8y3e/2oc5HfkIQyzLu5pBjDbkD1Ajtg/BvlpL0=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=A0PJRaE4; arc=none smtp.client-ip=209.85.216.50
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com
Received: by mail-pj1-f50.google.com with SMTP id 98e67ed59e1d1-3127cc662e2so169742a91.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 10:17:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1749057429; x=1749662229; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=lFMrn6lkdv1X+ZfMlc48xC4H7OLYGGf0+TbWHzoGarc=;
b=A0PJRaE4UMdxCWOgbRbQp/oA8vHmixYNHF5+hGdAdKL0ZAOWYXDER5yhBtyNAyBHHl
1NuHo0cJ/bDnMtHZrQcQDxSTCIMAj6AQ2JtyR4vgOdWA1ICZ8R8Nv+vIZ/5HVFXzwt3y
873TfACm8C4zv0sqjw4Ua6+LItGu1HM+7nDdWCMiw8uzTpuTn3eqPwFILHn59tuarJp2
XDZnjIBhXqgzRL4f84H3v+iEsFNACR2/XOg7VTVYnIpRnw9PiN9izyIefSyURtUeDMex
dLVgI3BlYyKmg9pxZObfjdQyJUHYkH9g9Pn3hC9pljDWbeKJvz6uWiW5oUJG8gFo0LOI
YehQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749057429; x=1749662229;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=lFMrn6lkdv1X+ZfMlc48xC4H7OLYGGf0+TbWHzoGarc=;
b=B+hFbYvx2CAqFQM6hKPMFoFGopAO+pc7Wxw7R4uQlZ/UHFtvArfBbZLZP/zngIVJED
j0MlontirO9XSe1hQJZVHXyESfBYHlp65Uj3VDbfTz0x3qhRVtWhbsDdfHLF5Gznaona
KwYNygUW1k0yWF2FKbU4wGJXs8K23IAHnWJjaFUxuIjcgrOQE90RrVtUblNACUqf88vA
cqt0+JgsjTc6tQ+3Gqss3nALJjL0dd4bbLhbAHgLoDExVV1AG8fwl2VN8oIV/3EKE/6z
he+zmCjtaqZzYttXeDHjmS7jo6v47y3alZC5UGFIf1O6NUuRaMsTy/6jMl439rxeRzK5
mpGw==
X-Gm-Message-State: AOJu0YyQRXfBgHBY9V7ENs7fX6/piXmQmI7uYfxgK+yeBHtIu7+wRHb/
sjZdz/+nkco5NkF0jlN2ogD/3UVg+h/XDFpr+0bCArLuTt36kVu00bv0hn+GDfEbH8E=
X-Gm-Gg: ASbGncvawxRZPPXcldWwlZiCe52eR0UqBIbwAN8XTnUYTY1Sc1dDJD7fx/xwoR1VOWp
LKFDHVF75/1yJzGGO4SEZsN6pwLyd7bNT6i53wt+1x9E36l/qYJLUvsv9OlIH/vLp/5/mi/+AEO
F8oVUWST7kojq1vPgKJGKNbYm0PC9/ARHZxiB6qgMVsAD4AVFaFNkIVEgvGkZUD8n/BZUbLYqFf
Z79ca0iJdKHGBKWlysX7KHfdLG/1zfSxZvhxxHT8ShSla7c1E8LazAaHfizrNJeL7UYZcJx8Ues
bROhTloQk5fa5fl9fWHUsXWvCfkA6xEuqXBa9c7bavUxTrzfQqvUSAClArCsXw==
X-Google-Smtp-Source: AGHT+IFlP8U7HwtoOSXd944WBBufrK/n2f/2k4GAFM1M0xT22Zrh/4VuKUI/K1nQAjXVjiuSif/1Og==
X-Received: by 2002:a17:90b:2885:b0:2ff:4a8d:74f9 with SMTP id 98e67ed59e1d1-31328fa1825mr342034a91.10.1749057429139;
Wed, 04 Jun 2025 10:17:09 -0700 (PDT)
Received: from debug.ba.rivosinc.com ([64.71.180.162])
by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3124e2e9c9fsm9178972a91.30.2025.06.04.10.17.06
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 10:17:08 -0700 (PDT)
From: Deepak Gupta <debug@xxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 10:15:42 -0700
Subject: [PATCH v17 18/27] riscv/kernel: update __show_regs to print shadow
stack register
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <20250604-v5_user_cfi_series-v17-18-4565c2cf869f@xxxxxxxxxxxx>
References: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
In-Reply-To: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
To: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>,
Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>,
x86@xxxxxxxxxx, "H. Peter Anvin" <hpa@xxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>,
Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>,
Paul Walmsley <paul.walmsley@xxxxxxxxxx>,
Palmer Dabbelt <palmer@xxxxxxxxxxx>, Albert Ou <aou@xxxxxxxxxxxxxxxxx>,
Conor Dooley <conor@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>,
Christian Brauner <brauner@xxxxxxxxxx>,
Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Oleg Nesterov <oleg@xxxxxxxxxx>,
Eric Biederman <ebiederm@xxxxxxxxxxxx>, Kees Cook <kees@xxxxxxxxxx>,
Jonathan Corbet <corbet@xxxxxxx>, Shuah Khan <shuah@xxxxxxxxxx>,
Jann Horn <jannh@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>,
Miguel Ojeda <ojeda@xxxxxxxxxx>, Alex Gaynor <alex.gaynor@xxxxxxxxx>,
Boqun Feng <boqun.feng@xxxxxxxxx>, Gary Guo <gary@xxxxxxxxxxx>,
=?utf-8?q?Bj=C3=B6rn_Roy_Baron?= <bjorn3_gh@xxxxxxxxxxxxxx>,
Benno Lossin <benno.lossin@xxxxxxxxx>,
Andreas Hindborg <a.hindborg@xxxxxxxxxx>, Alice Ryhl <aliceryhl@xxxxxxxxxx>,
Trevor Gross <tmgross@xxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx,
linux-mm@xxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx,
linux-doc@xxxxxxxxxxxxxxx, linux-kselftest@xxxxxxxxxxxxxxx,
alistair.francis@xxxxxxx, richard.henderson@xxxxxxxxxx, jim.shu@xxxxxxxxxx,
andybnac@xxxxxxxxx, kito.cheng@xxxxxxxxxx, charlie@xxxxxxxxxxxx,
atishp@xxxxxxxxxxxx, evan@xxxxxxxxxxxx, cleger@xxxxxxxxxxxx,
alexghiti@xxxxxxxxxxxx, samitolvanen@xxxxxxxxxx, broonie@xxxxxxxxxx,
rick.p.edgecombe@xxxxxxxxx, rust-for-linux@xxxxxxxxxxxxxxx,
Deepak Gupta <debug@xxxxxxxxxxxx>
X-Mailer: b4 0.13.0
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Updating __show_regs to print captured shadow stack pointer as well.
On tasks where shadow stack is disabled, it'll simply print 0.
Signed-off-by: Deepak Gupta <debug@xxxxxxxxxxxx>
Reviewed-by: Alexandre Ghiti <alexghiti@xxxxxxxxxxxx>
---
arch/riscv/kernel/process.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/riscv/kernel/process.c b/arch/riscv/kernel/process.c
index 2caddcd62848..b801217bd4b8 100644
--- a/arch/riscv/kernel/process.c
+++ b/arch/riscv/kernel/process.c
@@ -90,8 +90,8 @@ void __show_regs(struct pt_regs *regs)
regs->s8, regs->s9, regs->s10);
pr_cont(" s11: " REG_FMT " t3 : " REG_FMT " t4 : " REG_FMT "\n",
regs->s11, regs->t3, regs->t4);
- pr_cont(" t5 : " REG_FMT " t6 : " REG_FMT "\n",
- regs->t5, regs->t6);
+ pr_cont(" t5 : " REG_FMT " t6 : " REG_FMT " ssp : " REG_FMT "\n",
+ regs->t5, regs->t6, get_active_shstk(current));
pr_cont("status: " REG_FMT " badaddr: " REG_FMT " cause: " REG_FMT "\n",
regs->status, regs->badaddr, regs->cause);
--
2.43.0
Return-Path: <linux-kernel+bounces-673602-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 4172941E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:23:50 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id A9ECF174764
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:23:46 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 2AA3525C832;
Wed, 4 Jun 2025 17:17:25 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="L+1SMaHO"
Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4C1621FFC5D
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:17:22 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.48
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749057444; cv=none; b=s5GHzakyDCDbadbnOn/CH/pOpOn75rr4l5rYmzceL8knTbiDy8tUMt220HYJd43f1+Jdhxu9ufbSUnkGK3hZtmkVXJG5syYgQnGDiODB+aYuDcS9K7PL/HlBaboqUGIc5q69WKRoxXsSr8LlnNfPgbbqrXz8GKIwxKP5+n09dMk=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749057444; c=relaxed/simple;
bh=fgM4DxuXyswQwWUgiwSMnk3UHniH160971fZistB2MI=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=CVcxqZE+UXXAmqZTXNfWLxgjVrXZ7AzX/lvtV5zEWkCNtB87iL1AS9YeBiHOyECrjfh+xe7B8WItBkffAn8ygNLuGBF3qQn88Ng/ewqe4UL7gF9/MnxKtG2JiX0S57XcYlrAKlFIN7lMrk9AgZDglt3fphrCrV31OKPtVQhERyQ=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=L+1SMaHO; arc=none smtp.client-ip=209.85.216.48
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com
Received: by mail-pj1-f48.google.com with SMTP id 98e67ed59e1d1-306bf444ba2so86418a91.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 10:17:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1749057442; x=1749662242; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=SRVZyg5TbDWDMLZOF7W+PGgxfQ2OnZA5ElwRPiEh+VA=;
b=L+1SMaHODCxnvmlahNikNorEY6bciEEt2Ss5zp0b2e4hLFYE4aUUft/iHb70MFLm78
7poYccMrlUa5ytAqah7Hte3OAgVfLWqeUJLVLYULTQpmnPSPZJYbVlgX4YCx2xyzv4mp
3DgvVzW5YrxoJ6XK62fIS7pZPoXC5QOurbjEi9GQ/Zv15r/SwVQAQh8NAzsnNehMpPVG
RIu0OJYbEoJwv0X0vyTm+Dxo4vhDhL4pXaohQEaZ2YR4OREEa1D2LmzKrjf7ULqUhjNj
J6SOKpnnjJ+V3z1lCMfm0uG/FkBlzHsqUesGZwt4HKobmwdR9fQnzLokxKT0HHCPuAiR
ddHg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749057442; x=1749662242;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=SRVZyg5TbDWDMLZOF7W+PGgxfQ2OnZA5ElwRPiEh+VA=;
b=Q1Bs3F5CNZBQaymOAA++Dr66OIu05ivyCVRJd+qelSVS2dCIF49B0p82/MivycS0CL
TQNj4SDLcXiyox3BVTfdSOCAp5xT9m3CjvNUiiqfiQQEg5XN+64Xn184OmJq0QfmjhFJ
Hk2F3ZVZAJiN7mPADQcaAXUKj0Y1Fx45VQARBgeauvhg9SMuyThs4/W96a7EFEHsjvNd
HyyKMTgUYhRPbC8FskvBX9mG7LV4CfvLYoelpuia2nfFqJ5kBd+a44oWNkQ0J2ioAwsO
pRA3c/YTTk0o6qCChkLk0DAhnIJDNm9iAwriLE56cmrB1YpgkGNhwv8MHF3g2YRE+/V+
vpdA==
X-Gm-Message-State: AOJu0Yx2ZilG/qkOPacEXYGD5RJe+CRIOSeiyXjNDhfBgEJciBslZuwP
KeBkRkcg6jPhWHEiEJOePXyrmA08gncfyp5k3KalLIuvU2svwDHEZj4IInT84Hez6zo=
X-Gm-Gg: ASbGncv12Q9hmhducTNoL2ly2VUqagDzPbQ6RxlffSfctl2Puk42m3p+3i18Z1rSi8i
j+7Ct2re3jnv7yCs1PKxCl5vR7XNNxPlILmRlmnZ66agl6M6ho/1yDhNyHIukmEXtfhatcXm2Ic
zCgO1r+zhS9tdZCbj1SXq3ozGrF6yI5ALhBO0wjyCTRHPZ3/sRDT2may4FVZ2R1VJYUvu2gTGWK
O3A4qlkjdb3K1IDpa/pTUX73gaaW1DmKEBWqg21cx+BRKFXO6lhHEoQyv79fJQdcPMVnFsRLEtj
Gmg3unPf4TuGB3oFHDNHPYJFGsdUgsWnGTEZ/O8RyJLJ0/Zk8bAlZrv0jHwZ8yaRX9FAA78Y
X-Google-Smtp-Source: AGHT+IFgYucDp6wdab3oCQsMca+Xxo8mGVq4ki4MbG38XP6NlR55ZVWpB4I4rykVbZOBh8FR63avfw==
X-Received: by 2002:a17:90b:264c:b0:312:1d2d:18e1 with SMTP id 98e67ed59e1d1-3130cd97a86mr4309387a91.22.1749057441661;
Wed, 04 Jun 2025 10:17:21 -0700 (PDT)
Received: from debug.ba.rivosinc.com ([64.71.180.162])
by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3124e2e9c9fsm9178972a91.30.2025.06.04.10.17.18
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 10:17:21 -0700 (PDT)
From: Deepak Gupta <debug@xxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 10:15:46 -0700
Subject: [PATCH v17 22/27] riscv: enable kernel access to shadow stack
memory via FWFT sbi call
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <20250604-v5_user_cfi_series-v17-22-4565c2cf869f@xxxxxxxxxxxx>
References: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
In-Reply-To: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
To: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>,
Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>,
x86@xxxxxxxxxx, "H. Peter Anvin" <hpa@xxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>,
Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>,
Paul Walmsley <paul.walmsley@xxxxxxxxxx>,
Palmer Dabbelt <palmer@xxxxxxxxxxx>, Albert Ou <aou@xxxxxxxxxxxxxxxxx>,
Conor Dooley <conor@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>,
Christian Brauner <brauner@xxxxxxxxxx>,
Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Oleg Nesterov <oleg@xxxxxxxxxx>,
Eric Biederman <ebiederm@xxxxxxxxxxxx>, Kees Cook <kees@xxxxxxxxxx>,
Jonathan Corbet <corbet@xxxxxxx>, Shuah Khan <shuah@xxxxxxxxxx>,
Jann Horn <jannh@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>,
Miguel Ojeda <ojeda@xxxxxxxxxx>, Alex Gaynor <alex.gaynor@xxxxxxxxx>,
Boqun Feng <boqun.feng@xxxxxxxxx>, Gary Guo <gary@xxxxxxxxxxx>,
=?utf-8?q?Bj=C3=B6rn_Roy_Baron?= <bjorn3_gh@xxxxxxxxxxxxxx>,
Benno Lossin <benno.lossin@xxxxxxxxx>,
Andreas Hindborg <a.hindborg@xxxxxxxxxx>, Alice Ryhl <aliceryhl@xxxxxxxxxx>,
Trevor Gross <tmgross@xxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx,
linux-mm@xxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx,
linux-doc@xxxxxxxxxxxxxxx, linux-kselftest@xxxxxxxxxxxxxxx,
alistair.francis@xxxxxxx, richard.henderson@xxxxxxxxxx, jim.shu@xxxxxxxxxx,
andybnac@xxxxxxxxx, kito.cheng@xxxxxxxxxx, charlie@xxxxxxxxxxxx,
atishp@xxxxxxxxxxxx, evan@xxxxxxxxxxxx, cleger@xxxxxxxxxxxx,
alexghiti@xxxxxxxxxxxx, samitolvanen@xxxxxxxxxx, broonie@xxxxxxxxxx,
rick.p.edgecombe@xxxxxxxxx, rust-for-linux@xxxxxxxxxxxxxxx,
Zong Li <zong.li@xxxxxxxxxx>, Deepak Gupta <debug@xxxxxxxxxxxx>
X-Mailer: b4 0.13.0
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Kernel will have to perform shadow stack operations on user shadow stack.
Like during signal delivery and sigreturn, shadow stack token must be
created and validated respectively. Thus shadow stack access for kernel
must be enabled.
In future when kernel shadow stacks are enabled for linux kernel, it must
be enabled as early as possible for better coverage and prevent imbalance
between regular stack and shadow stack. After `relocate_enable_mmu` has
been done, this is as early as possible it can enabled.
Reviewed-by: Zong Li <zong.li@xxxxxxxxxx>
Signed-off-by: Deepak Gupta <debug@xxxxxxxxxxxx>
---
arch/riscv/kernel/asm-offsets.c | 6 ++++++
arch/riscv/kernel/head.S | 27 +++++++++++++++++++++++++++
2 files changed, 33 insertions(+)
diff --git a/arch/riscv/kernel/asm-offsets.c b/arch/riscv/kernel/asm-offsets.c
index f33945432f8f..91738394f834 100644
--- a/arch/riscv/kernel/asm-offsets.c
+++ b/arch/riscv/kernel/asm-offsets.c
@@ -514,4 +514,10 @@ void asm_offsets(void)
DEFINE(FREGS_A6, offsetof(struct __arch_ftrace_regs, a6));
DEFINE(FREGS_A7, offsetof(struct __arch_ftrace_regs, a7));
#endif
+#ifdef CONFIG_RISCV_SBI
+ DEFINE(SBI_EXT_FWFT, SBI_EXT_FWFT);
+ DEFINE(SBI_EXT_FWFT_SET, SBI_EXT_FWFT_SET);
+ DEFINE(SBI_FWFT_SHADOW_STACK, SBI_FWFT_SHADOW_STACK);
+ DEFINE(SBI_FWFT_SET_FLAG_LOCK, SBI_FWFT_SET_FLAG_LOCK);
+#endif
}
diff --git a/arch/riscv/kernel/head.S b/arch/riscv/kernel/head.S
index 356d5397b2a2..7eae9a172351 100644
--- a/arch/riscv/kernel/head.S
+++ b/arch/riscv/kernel/head.S
@@ -15,6 +15,7 @@
#include <asm/image.h>
#include <asm/scs.h>
#include <asm/xip_fixup.h>
+#include <asm/usercfi.h>
#include "efi-header.S"
__HEAD
@@ -164,6 +165,19 @@ secondary_start_sbi:
call relocate_enable_mmu
#endif
call .Lsetup_trap_vector
+#if defined(CONFIG_RISCV_SBI) && defined(CONFIG_RISCV_USER_CFI)
+ li a7, SBI_EXT_FWFT
+ li a6, SBI_EXT_FWFT_SET
+ li a0, SBI_FWFT_SHADOW_STACK
+ li a1, 1 /* enable supervisor to access shadow stack access */
+ li a2, SBI_FWFT_SET_FLAG_LOCK
+ ecall
+ beqz a0, 1f
+ la a1, riscv_nousercfi
+ li a0, CMDLINE_DISABLE_RISCV_USERCFI_BCFI
+ REG_S a0, (a1)
+1:
+#endif
scs_load_current
call smp_callin
#endif /* CONFIG_SMP */
@@ -320,6 +334,19 @@ SYM_CODE_START(_start_kernel)
la tp, init_task
la sp, init_thread_union + THREAD_SIZE
addi sp, sp, -PT_SIZE_ON_STACK
+#if defined(CONFIG_RISCV_SBI) && defined(CONFIG_RISCV_USER_CFI)
+ li a7, SBI_EXT_FWFT
+ li a6, SBI_EXT_FWFT_SET
+ li a0, SBI_FWFT_SHADOW_STACK
+ li a1, 1 /* enable supervisor to access shadow stack access */
+ li a2, SBI_FWFT_SET_FLAG_LOCK
+ ecall
+ beqz a0, 1f
+ la a1, riscv_nousercfi
+ li a0, CMDLINE_DISABLE_RISCV_USERCFI_BCFI
+ REG_S a0, (a1)
+1:
+#endif
scs_load_current
#ifdef CONFIG_KASAN
--
2.43.0
Return-Path: <linux-kernel+bounces-673599-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id EEEAB41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:24:09 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id 2D65C3A8679
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:22:39 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 9AF1525A646;
Wed, 4 Jun 2025 17:17:16 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="kxgjn/+x"
Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4ECA325A2D2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:17:12 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.54
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749057435; cv=none; b=tsBegdnBlNXlapZTpzPNgqFBMUhzhNVasxsHYZv307CsbnEqf/0//QeqLUSXc3fT3saFupU+E2UQuBqkWvas3UPYrK6LhOWUCrGMNBWmSmw2Keh0PDZ+F7OhZqzFvVuCcz7MSijCgcDkEW1bd/KrXUmHk0eAZy6pRhXKK/QbWtE=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749057435; c=relaxed/simple;
bh=DD8AZK8ySfZe7gMGHOO9A42rFShjR5wdUyvOAGK6saQ=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=aSxiyX8iwky9J7LTrFS6o80pIFFR8iNZ+9ZTZDRFQbkqlP+41cO0fuF4DAmw8lxdKn7IahizNVMy/2qKvXkFBchpO+W7PbXy/+oQF+zd1j6u6oH7ZFLG8xfhGky12sbQEUMRCpqU72KShH4zAi/U5fgPvu0c14KSmqyFlV/+Zyk=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=kxgjn/+x; arc=none smtp.client-ip=209.85.216.54
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com
Received: by mail-pj1-f54.google.com with SMTP id 98e67ed59e1d1-31223a4cddeso73944a91.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 10:17:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1749057432; x=1749662232; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=Ju4eTa3aeO/W78J21C+hNLwsAKoKH1MKseai5GOrm10=;
b=kxgjn/+xXh+j8G8KMYeQtENH2+oHGcvTjKheTorOe6acY9YvNb4FteNwKNBu1SusbG
yyHVtkwIYt5pl8pCdHZsRP9o8lOW9oNvDqAVAAk5xFnBKLba9LZEs0yK3a++M0GJ+PDy
ECX8PKu0QIHevQCMiZOVlwp+cxtAANPUn5znJc9/KVAISFqy2LidRvb+8rtiQzZPPQ6/
BWOlvRltmO/Xo5fpZ0QnA+H61wLRZdaITiAqK4CpfOyv4L5HhNjkEkxGclpjqmU2yFUM
OxSjXo00/SXNVJ1vCjsXaBQ3pue08c2m0YmD8a9L1IA5cZhv6gFLfAiBMdm+ZwkezyWV
+OaQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749057432; x=1749662232;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=Ju4eTa3aeO/W78J21C+hNLwsAKoKH1MKseai5GOrm10=;
b=DK38624kc4a2rpYAklTTaq26/8CzZgMshCObom4jvZJZ7tLW7ADY26YalioWWWcPDS
tPtLRib0YfkvFrn0UIiu1sZt/2EfNGnU1B79UjXp1xx0xuY9RvZb8pMvAqzlJgvVqM/z
F5cjnKKZdPqz0/4OnnPhdyTPTrYdSmLe39iR0/B/CfC2sDsKtKTzlY/nlNEND8jRHYpR
qRGuTGP3gGH5QCgAfyyeelAITjVwb/ekv/3zFXEv1CmDXDjootagbLvbAvpBHQam7rHi
gmrIGs1uqoekTpiZ9MccAHx4AQFHBCcaU0GirCtKlVycu2qXFdMbtl6aJ44IBgIVynEW
xYvg==
X-Gm-Message-State: AOJu0YxMWZQ5OeDQ6U9MTACh0b0XWIcOhNXEVoSfX4LaJNY3MvUd+jR5
/ajFxARlmEDkoaQLXCwXJ1e15E0ht5MHVzMOfRcjFwmTHpjB7vyEVoCJCwgbZP/9olc=
X-Gm-Gg: ASbGnctvwzwbSTmS3a2Y/EZjypJqBrsDiGm04bbicDO/vPGc5hLMaoAWzOP65XJV//J
jJ+o7gPO22NDlhQXOVNE9quPqnWMjYr4YmoFYi/wFIV/ldKhkU82sMP90VDR6uSvIGJdKWKghoM
fbTFvn19J1SvRMahLdSmzSPBgki8XbRc2vCOSS36m7tK1tfU66siEOwlhI/d4TVydfk0bfcDM3v
qi/Lg4Y09UvzT3O/+FuWwd8EjS53X9SbViAdSFV+ouVYrT+9WzUNDzN9P9cW4jN3+u0sL1RCSDB
jC6i8UodmncBteUtPNUpsRw/rNKuulj/uv1NVvCEPb7j5iBDhZMa3x0DGqWDuA==
X-Google-Smtp-Source: AGHT+IHgVJhDAjt6tkfrANqFjuO63r0JLkq82Vda2ApTFWgnfpRSjrPN268cHgF/skx0Xvfsnyoc0A==
X-Received: by 2002:a17:90b:1a8d:b0:311:ae39:3dad with SMTP id 98e67ed59e1d1-3130ce4cadcmr5205762a91.30.1749057432238;
Wed, 04 Jun 2025 10:17:12 -0700 (PDT)
Received: from debug.ba.rivosinc.com ([64.71.180.162])
by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3124e2e9c9fsm9178972a91.30.2025.06.04.10.17.09
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 10:17:11 -0700 (PDT)
From: Deepak Gupta <debug@xxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 10:15:43 -0700
Subject: [PATCH v17 19/27] riscv/ptrace: riscv cfi status and state via
ptrace and in core files
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <20250604-v5_user_cfi_series-v17-19-4565c2cf869f@xxxxxxxxxxxx>
References: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
In-Reply-To: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
To: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>,
Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>,
x86@xxxxxxxxxx, "H. Peter Anvin" <hpa@xxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>,
Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>,
Paul Walmsley <paul.walmsley@xxxxxxxxxx>,
Palmer Dabbelt <palmer@xxxxxxxxxxx>, Albert Ou <aou@xxxxxxxxxxxxxxxxx>,
Conor Dooley <conor@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>,
Christian Brauner <brauner@xxxxxxxxxx>,
Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Oleg Nesterov <oleg@xxxxxxxxxx>,
Eric Biederman <ebiederm@xxxxxxxxxxxx>, Kees Cook <kees@xxxxxxxxxx>,
Jonathan Corbet <corbet@xxxxxxx>, Shuah Khan <shuah@xxxxxxxxxx>,
Jann Horn <jannh@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>,
Miguel Ojeda <ojeda@xxxxxxxxxx>, Alex Gaynor <alex.gaynor@xxxxxxxxx>,
Boqun Feng <boqun.feng@xxxxxxxxx>, Gary Guo <gary@xxxxxxxxxxx>,
=?utf-8?q?Bj=C3=B6rn_Roy_Baron?= <bjorn3_gh@xxxxxxxxxxxxxx>,
Benno Lossin <benno.lossin@xxxxxxxxx>,
Andreas Hindborg <a.hindborg@xxxxxxxxxx>, Alice Ryhl <aliceryhl@xxxxxxxxxx>,
Trevor Gross <tmgross@xxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx,
linux-mm@xxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx,
linux-doc@xxxxxxxxxxxxxxx, linux-kselftest@xxxxxxxxxxxxxxx,
alistair.francis@xxxxxxx, richard.henderson@xxxxxxxxxx, jim.shu@xxxxxxxxxx,
andybnac@xxxxxxxxx, kito.cheng@xxxxxxxxxx, charlie@xxxxxxxxxxxx,
atishp@xxxxxxxxxxxx, evan@xxxxxxxxxxxx, cleger@xxxxxxxxxxxx,
alexghiti@xxxxxxxxxxxx, samitolvanen@xxxxxxxxxx, broonie@xxxxxxxxxx,
rick.p.edgecombe@xxxxxxxxx, rust-for-linux@xxxxxxxxxxxxxxx,
Deepak Gupta <debug@xxxxxxxxxxxx>
X-Mailer: b4 0.13.0
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Expose a new register type NT_RISCV_USER_CFI for risc-v cfi status and
state. Intentionally both landing pad and shadow stack status and state
are rolled into cfi state. Creating two different NT_RISCV_USER_XXX would
not be useful and wastage of a note type. Enabling, disabling and locking
of feature is not allowed via ptrace set interface. However setting `elp`
state or setting shadow stack pointer are allowed via ptrace set interface
. It is expected `gdb` might have use to fixup `elp` state or `shadow
stack` pointer.
Signed-off-by: Deepak Gupta <debug@xxxxxxxxxxxx>
---
arch/riscv/include/uapi/asm/ptrace.h | 30 ++++++++++++
arch/riscv/kernel/ptrace.c | 95 ++++++++++++++++++++++++++++++++++++
include/uapi/linux/elf.h | 2 +
3 files changed, 127 insertions(+)
diff --git a/arch/riscv/include/uapi/asm/ptrace.h b/arch/riscv/include/uapi/asm/ptrace.h
index 659ea3af5680..42c3fc8bd513 100644
--- a/arch/riscv/include/uapi/asm/ptrace.h
+++ b/arch/riscv/include/uapi/asm/ptrace.h
@@ -131,6 +131,36 @@ struct __sc_riscv_cfi_state {
unsigned long ss_ptr; /* shadow stack pointer */
};
+#define PTRACE_CFI_LP_EN_BIT 0
+#define PTRACE_CFI_LP_LOCK_BIT 1
+#define PTRACE_CFI_ELP_BIT 2
+#define PTRACE_CFI_SS_EN_BIT 3
+#define PTRACE_CFI_SS_LOCK_BIT 4
+#define PTRACE_CFI_SS_PTR_BIT 5
+
+#define PTRACE_CFI_LP_EN_STATE (1 << PTRACE_CFI_LP_EN_BIT)
+#define PTRACE_CFI_LP_LOCK_STATE (1 << PTRACE_CFI_LP_LOCK_BIT)
+#define PTRACE_CFI_ELP_STATE (1 << PTRACE_CFI_ELP_BIT)
+#define PTRACE_CFI_SS_EN_STATE (1 << PTRACE_CFI_SS_EN_BIT)
+#define PTRACE_CFI_SS_LOCK_STATE (1 << PTRACE_CFI_SS_LOCK_BIT)
+#define PTRACE_CFI_SS_PTR_STATE (1 << PTRACE_CFI_SS_PTR_BIT)
+
+#define PRACE_CFI_STATE_INVALID_MASK ~(PTRACE_CFI_LP_EN_STATE | \
+ PTRACE_CFI_LP_LOCK_STATE | \
+ PTRACE_CFI_ELP_STATE | \
+ PTRACE_CFI_SS_EN_STATE | \
+ PTRACE_CFI_SS_LOCK_STATE | \
+ PTRACE_CFI_SS_PTR_STATE)
+
+struct __cfi_status {
+ __u64 cfi_state;
+};
+
+struct user_cfi_state {
+ struct __cfi_status cfi_status;
+ __u64 shstk_ptr;
+};
+
#endif /* __ASSEMBLY__ */
#endif /* _UAPI_ASM_RISCV_PTRACE_H */
diff --git a/arch/riscv/kernel/ptrace.c b/arch/riscv/kernel/ptrace.c
index ea67e9fb7a58..933a3d26d33c 100644
--- a/arch/riscv/kernel/ptrace.c
+++ b/arch/riscv/kernel/ptrace.c
@@ -19,6 +19,7 @@
#include <linux/regset.h>
#include <linux/sched.h>
#include <linux/sched/task_stack.h>
+#include <asm/usercfi.h>
enum riscv_regset {
REGSET_X,
@@ -31,6 +32,9 @@ enum riscv_regset {
#ifdef CONFIG_RISCV_ISA_SUPM
REGSET_TAGGED_ADDR_CTRL,
#endif
+#ifdef CONFIG_RISCV_USER_CFI
+ REGSET_CFI,
+#endif
};
static int riscv_gpr_get(struct task_struct *target,
@@ -184,6 +188,87 @@ static int tagged_addr_ctrl_set(struct task_struct *target,
}
#endif
+#ifdef CONFIG_RISCV_USER_CFI
+static int riscv_cfi_get(struct task_struct *target,
+ const struct user_regset *regset,
+ struct membuf to)
+{
+ struct user_cfi_state user_cfi;
+ struct pt_regs *regs;
+
+ memset(&user_cfi, 0, sizeof(user_cfi));
+ regs = task_pt_regs(target);
+
+ if (is_indir_lp_enabled(target)) {
+ user_cfi.cfi_status.cfi_state |= PTRACE_CFI_LP_EN_STATE;
+ user_cfi.cfi_status.cfi_state |= is_indir_lp_locked(target) ?
+ PTRACE_CFI_LP_LOCK_STATE : 0;
+ user_cfi.cfi_status.cfi_state |= (regs->status & SR_ELP) ?
+ PTRACE_CFI_ELP_STATE : 0;
+ }
+
+ if (is_shstk_enabled(target)) {
+ user_cfi.cfi_status.cfi_state |= (PTRACE_CFI_SS_EN_STATE |
+ PTRACE_CFI_SS_PTR_STATE);
+ user_cfi.cfi_status.cfi_state |= is_shstk_locked(target) ?
+ PTRACE_CFI_SS_LOCK_STATE : 0;
+ user_cfi.shstk_ptr = get_active_shstk(target);
+ }
+
+ return membuf_write(&to, &user_cfi, sizeof(user_cfi));
+}
+
+/*
+ * Does it make sense to allowing enable / disable of cfi via ptrace?
+ * Not allowing enable / disable / locking control via ptrace for now.
+ * Setting shadow stack pointer is allowed. GDB might use it to unwind or
+ * some other fixup. Similarly gdb might want to suppress elp and may want
+ * to reset elp state.
+ */
+static int riscv_cfi_set(struct task_struct *target,
+ const struct user_regset *regset,
+ unsigned int pos, unsigned int count,
+ const void *kbuf, const void __user *ubuf)
+{
+ int ret;
+ struct user_cfi_state user_cfi;
+ struct pt_regs *regs;
+
+ regs = task_pt_regs(target);
+
+ ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf, &user_cfi, 0, -1);
+ if (ret)
+ return ret;
+
+ /*
+ * Not allowing enabling or locking shadow stack or landing pad
+ * There is no disabling of shadow stack or landing pad via ptrace
+ * rsvd field should be set to zero so that if those fields are needed in future
+ */
+ if ((user_cfi.cfi_status.cfi_state &
+ (PTRACE_CFI_LP_EN_STATE | PTRACE_CFI_LP_LOCK_STATE |
+ PTRACE_CFI_SS_EN_STATE | PTRACE_CFI_SS_LOCK_STATE)) ||
+ (user_cfi.cfi_status.cfi_state & PRACE_CFI_STATE_INVALID_MASK))
+ return -EINVAL;
+
+ /* If lpad is enabled on target and ptrace requests to set / clear elp, do that */
+ if (is_indir_lp_enabled(target)) {
+ if (user_cfi.cfi_status.cfi_state &
+ PTRACE_CFI_ELP_STATE) /* set elp state */
+ regs->status |= SR_ELP;
+ else
+ regs->status &= ~SR_ELP; /* clear elp state */
+ }
+
+ /* If shadow stack enabled on target, set new shadow stack pointer */
+ if (is_shstk_enabled(target) &&
+ (user_cfi.cfi_status.cfi_state & PTRACE_CFI_SS_PTR_STATE))
+ set_active_shstk(target, user_cfi.shstk_ptr);
+
+ return 0;
+}
+#endif
+
static const struct user_regset riscv_user_regset[] = {
[REGSET_X] = {
.core_note_type = NT_PRSTATUS,
@@ -224,6 +309,16 @@ static const struct user_regset riscv_user_regset[] = {
.set = tagged_addr_ctrl_set,
},
#endif
+#ifdef CONFIG_RISCV_USER_CFI
+ [REGSET_CFI] = {
+ .core_note_type = NT_RISCV_USER_CFI,
+ .align = sizeof(__u64),
+ .n = sizeof(struct user_cfi_state) / sizeof(__u64),
+ .size = sizeof(__u64),
+ .regset_get = riscv_cfi_get,
+ .set = riscv_cfi_set,
+ },
+#endif
};
static const struct user_regset_view riscv_user_native_view = {
diff --git a/include/uapi/linux/elf.h b/include/uapi/linux/elf.h
index 819ded2d39de..ee30dcd80901 100644
--- a/include/uapi/linux/elf.h
+++ b/include/uapi/linux/elf.h
@@ -545,6 +545,8 @@ typedef struct elf64_shdr {
#define NT_RISCV_VECTOR 0x901 /* RISC-V vector registers */
#define NN_RISCV_TAGGED_ADDR_CTRL "LINUX"
#define NT_RISCV_TAGGED_ADDR_CTRL 0x902 /* RISC-V tagged address control (prctl()) */
+#define NN_RISCV_USER_CFI "LINUX"
+#define NT_RISCV_USER_CFI 0x903 /* RISC-V shadow stack state */
#define NN_LOONGARCH_CPUCFG "LINUX"
#define NT_LOONGARCH_CPUCFG 0xa00 /* LoongArch CPU config registers */
#define NN_LOONGARCH_CSR "LINUX"
--
2.43.0
Return-Path: <linux-kernel+bounces-673601-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id F0E2341E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:24:25 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id C29C0189AF30
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:23:48 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 74EB325C809;
Wed, 4 Jun 2025 17:17:23 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="pxItCd5v"
Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id A137D25B683
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:17:19 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.51
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749057441; cv=none; b=G9D1mk1isOQGrBNPlLKZzFEWoqARUC0j1ubGq1X74kLLci57naUsXElbqPFlhBfnM8SOW0M5Mdtw6mEy5RBpYkpbN5Mdda0kTVG/qneRXx0SWGXY4xFpJQMNXob2AUfMAk1hK0s3qvgHxI4uZDJiN7p+qBt2iCTnKJ0n3QSmbsE=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749057441; c=relaxed/simple;
bh=194F+Jj35jzERjvorkrUlHWChXXWubQgkHjsZCIRg7c=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=FRC/29O4wioEe+HpTs9FEZLoCjpdx2KbMiwi846B6C6hBvrFaPhJGE9eKrP8lrs7bpUcQriMw2qIE6fVnh8dKGk4UIs2ugs6y3tDxBk18S08dBQ1fPEp0zyrNvwB5JjwrmKbTa52VegCSLVxIIMVlGIrwpt5Gk5fC/iHSr/H8f0=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=pxItCd5v; arc=none smtp.client-ip=209.85.216.51
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com
Received: by mail-pj1-f51.google.com with SMTP id 98e67ed59e1d1-3121aed2435so81197a91.2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 10:17:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1749057439; x=1749662239; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=foYmSE8QGTj6OsjwjyAtgl0KqM6ab8/LcERlA2kAM38=;
b=pxItCd5vMMHZNoNjmZ8BS6pFucUtDgqG7CfZqY7QZXlSvqEdjOjsbwGJOlbDGJTeoz
poP38wDT+iLdzmRLNoq1ThyVjl4Tpgl/ZOB1GQ5xI8tihI81uW7n+1BxlnKZ7Lou9Ack
kQHTMhSU/F/vRiWWBXo9kABvn0K82RxydQaMmCg/LJRDn8chPeoDug9nIJwD7U2he6sI
92lvSZvLCwwm2UlX8UkEinHkh51HoG8vEUCjGtxwsMW3hDLv/fEVZk7o8+abvlLln7Fo
H2OaBWIqRBsuyQWQXFwVPJ7q6iFID1rlCLjc6OHkIV8yLuRFh+wRfDGJ3Jg3LTWsz8nj
Jm9w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749057439; x=1749662239;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=foYmSE8QGTj6OsjwjyAtgl0KqM6ab8/LcERlA2kAM38=;
b=uD1OoN5iuLJfMOK+Ft2dINMQ/ki/Jj3wCORlOizWTYh3Nu9LIMyRwjk96JLt3MPvgN
z64TW+LuMAqQQdWEl99vwmJ5IyqER9QdXSJTtG57UKB5oxb7CHgvlZOl8l+7ZHIS9w9R
EO6P2qCmW/82j9iwASOmd2vge9uXQwpY+LhGrGkweWZ6cZCYYyUZRoKLcXBkA+EjB2DQ
hjV/EJIyb9UJBnvr+gDyXWMPIeZ+hs4SSe8QIyOGqV4nVZSgTeEDRAvwgtyZZhc5NPYu
YW0Kd15g2nyUl9TxmpL81h1gveB0ZzPco+hIJ6HqINJ/PEFyevSWg+zLVW846L1SBMcm
ewUg==
X-Gm-Message-State: AOJu0YwOz6ujunIoLMZ34A118Au2aGOdHaiQfjCFXSgXnjGJYRzYnqIm
o3PzWRnCSJ1mq031bIila8NkSD0rIE+lXT3jIXfAmY1YW3Dfc58scYswrufoJY25AlU=
X-Gm-Gg: ASbGncvKG8rj95cb4BWelSTpXvPVH+LyFiwn1W2+l5pzoxB3T5MEXFzKSi0/MIDwMyp
R1wfW32+pUR9O24F1wNxbQloKo1XIN9AAzNS8bVWwN09crDQb5k0cNs/PRZcylT2yOXV2e2gvmn
VErt/K+vmGcK/TCwIQDr/az/3jiXCWpA84hWOPGicpFcqm7kSNfsfhxSaa+rQ1j5d40Ue0+lEny
0osVtFUyM/Os+hJfDytn5AS6VfgRXjhBmqVvs6evF/YHqUPu6OXvzrZPYZTYJO4YEYAhkA21kmy
cgr0Vis5QSKAdV5rxMP2NdxDUkuFz5wN2PG/YgNpXeq6PEU/XQIlg/Hii5BDzuzDe1RhFSHO
X-Google-Smtp-Source: AGHT+IGJhjh0kvZLc6RuLGBBVqBMsHdNmNXMfM27N0lWonKw8YFWiZrhYkm+qI70a4qYAAVttggEfA==
X-Received: by 2002:a17:90b:254e:b0:311:f05b:86a5 with SMTP id 98e67ed59e1d1-3130cc227b6mr6921150a91.0.1749057438462;
Wed, 04 Jun 2025 10:17:18 -0700 (PDT)
Received: from debug.ba.rivosinc.com ([64.71.180.162])
by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3124e2e9c9fsm9178972a91.30.2025.06.04.10.17.15
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 10:17:18 -0700 (PDT)
From: Deepak Gupta <debug@xxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 10:15:45 -0700
Subject: [PATCH v17 21/27] riscv: kernel command line option to opt out of
user cfi
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <20250604-v5_user_cfi_series-v17-21-4565c2cf869f@xxxxxxxxxxxx>
References: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
In-Reply-To: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
To: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>,
Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>,
x86@xxxxxxxxxx, "H. Peter Anvin" <hpa@xxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>,
Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>,
Paul Walmsley <paul.walmsley@xxxxxxxxxx>,
Palmer Dabbelt <palmer@xxxxxxxxxxx>, Albert Ou <aou@xxxxxxxxxxxxxxxxx>,
Conor Dooley <conor@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>,
Christian Brauner <brauner@xxxxxxxxxx>,
Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Oleg Nesterov <oleg@xxxxxxxxxx>,
Eric Biederman <ebiederm@xxxxxxxxxxxx>, Kees Cook <kees@xxxxxxxxxx>,
Jonathan Corbet <corbet@xxxxxxx>, Shuah Khan <shuah@xxxxxxxxxx>,
Jann Horn <jannh@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>,
Miguel Ojeda <ojeda@xxxxxxxxxx>, Alex Gaynor <alex.gaynor@xxxxxxxxx>,
Boqun Feng <boqun.feng@xxxxxxxxx>, Gary Guo <gary@xxxxxxxxxxx>,
=?utf-8?q?Bj=C3=B6rn_Roy_Baron?= <bjorn3_gh@xxxxxxxxxxxxxx>,
Benno Lossin <benno.lossin@xxxxxxxxx>,
Andreas Hindborg <a.hindborg@xxxxxxxxxx>, Alice Ryhl <aliceryhl@xxxxxxxxxx>,
Trevor Gross <tmgross@xxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx,
linux-mm@xxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx,
linux-doc@xxxxxxxxxxxxxxx, linux-kselftest@xxxxxxxxxxxxxxx,
alistair.francis@xxxxxxx, richard.henderson@xxxxxxxxxx, jim.shu@xxxxxxxxxx,
andybnac@xxxxxxxxx, kito.cheng@xxxxxxxxxx, charlie@xxxxxxxxxxxx,
atishp@xxxxxxxxxxxx, evan@xxxxxxxxxxxx, cleger@xxxxxxxxxxxx,
alexghiti@xxxxxxxxxxxx, samitolvanen@xxxxxxxxxx, broonie@xxxxxxxxxx,
rick.p.edgecombe@xxxxxxxxx, rust-for-linux@xxxxxxxxxxxxxxx,
Deepak Gupta <debug@xxxxxxxxxxxx>
X-Mailer: b4 0.13.0
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
This commit adds a kernel command line option using which user cfi can be
disabled. User backward cfi and forward cfi can be enabled independently.
Kernel command line parameter "riscv_nousercfi" can take below values:
- "all" : Disable forward and backward cfi both.
- "bcfi" : Disable backward cfi.
- "fcfi" : Disable forward cfi
Signed-off-by: Deepak Gupta <debug@xxxxxxxxxxxx>
---
Documentation/admin-guide/kernel-parameters.txt | 8 ++++
arch/riscv/include/asm/usercfi.h | 7 +++
arch/riscv/kernel/cpufeature.c | 9 +++-
arch/riscv/kernel/usercfi.c | 59 ++++++++++++++++++++-----
4 files changed, 70 insertions(+), 13 deletions(-)
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index 76e538c77e31..f75d50420a56 100644
--- a/Documentation/admin-guide/kernel-parameters.txt
+++ b/Documentation/admin-guide/kernel-parameters.txt
@@ -6237,6 +6237,14 @@
replacement properties are not found. See the Kconfig
entry for RISCV_ISA_FALLBACK.
+ riscv_nousercfi=
+ all Disable user cfi ABI to userspace even if cpu extension
+ are available.
+ bcfi Disable user backward cfi ABI to userspace even if
+ shadow stack extension is available.
+ fcfi Disable user forward cfi ABI to userspace even if landing
+ pad extension is available.
+
ro [KNL] Mount root device read-only on boot
rodata= [KNL,EARLY]
diff --git a/arch/riscv/include/asm/usercfi.h b/arch/riscv/include/asm/usercfi.h
index 54add512a4dc..afef69910601 100644
--- a/arch/riscv/include/asm/usercfi.h
+++ b/arch/riscv/include/asm/usercfi.h
@@ -5,6 +5,10 @@
#ifndef _ASM_RISCV_USERCFI_H
#define _ASM_RISCV_USERCFI_H
+#define CMDLINE_DISABLE_RISCV_USERCFI_FCFI 1
+#define CMDLINE_DISABLE_RISCV_USERCFI_BCFI 2
+#define CMDLINE_DISABLE_RISCV_USERCFI 3
+
#ifndef __ASSEMBLY__
#include <linux/types.h>
#include <linux/prctl.h>
@@ -83,6 +87,9 @@ void set_indir_lp_lock(struct task_struct *task);
#endif /* CONFIG_RISCV_USER_CFI */
+bool is_user_shstk_enabled(void);
+bool is_user_lpad_enabled(void);
+
#endif /* __ASSEMBLY__ */
#endif /* _ASM_RISCV_USERCFI_H */
diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c
index c54de1bbe206..bf2035c0c136 100644
--- a/arch/riscv/kernel/cpufeature.c
+++ b/arch/riscv/kernel/cpufeature.c
@@ -28,6 +28,7 @@
#include <asm/vector.h>
#include <asm/vendor_extensions.h>
#include <asm/vendor_extensions/thead.h>
+#include <asm/usercfi.h>
#define NUM_ALPHA_EXTS ('z' - 'a' + 1)
@@ -44,6 +45,8 @@ struct riscv_isainfo hart_isa[NR_CPUS];
u32 thead_vlenb_of;
+extern unsigned int riscv_nousercfi;
+
/**
* riscv_isa_extension_base() - Get base extension word
*
@@ -261,7 +264,8 @@ static int riscv_ext_svadu_validate(const struct riscv_isa_ext_data *data,
static int riscv_cfilp_validate(const struct riscv_isa_ext_data *data,
const unsigned long *isa_bitmap)
{
- if (!IS_ENABLED(CONFIG_RISCV_USER_CFI))
+ if (!IS_ENABLED(CONFIG_RISCV_USER_CFI) ||
+ (riscv_nousercfi & CMDLINE_DISABLE_RISCV_USERCFI_FCFI))
return -EINVAL;
return 0;
@@ -270,7 +274,8 @@ static int riscv_cfilp_validate(const struct riscv_isa_ext_data *data,
static int riscv_cfiss_validate(const struct riscv_isa_ext_data *data,
const unsigned long *isa_bitmap)
{
- if (!IS_ENABLED(CONFIG_RISCV_USER_CFI))
+ if (!IS_ENABLED(CONFIG_RISCV_USER_CFI) ||
+ (riscv_nousercfi & CMDLINE_DISABLE_RISCV_USERCFI_BCFI))
return -EINVAL;
return 0;
diff --git a/arch/riscv/kernel/usercfi.c b/arch/riscv/kernel/usercfi.c
index 8bc3e1e3f712..5ef357f43ad7 100644
--- a/arch/riscv/kernel/usercfi.c
+++ b/arch/riscv/kernel/usercfi.c
@@ -17,6 +17,8 @@
#include <asm/csr.h>
#include <asm/usercfi.h>
+unsigned int riscv_nousercfi;
+
#define SHSTK_ENTRY_SIZE sizeof(void *)
bool is_shstk_enabled(struct task_struct *task)
@@ -59,7 +61,7 @@ unsigned long get_active_shstk(struct task_struct *task)
void set_shstk_status(struct task_struct *task, bool enable)
{
- if (!cpu_supports_shadow_stack())
+ if (!is_user_shstk_enabled())
return;
task->thread_info.user_cfi_state.ubcfi_en = enable ? 1 : 0;
@@ -89,7 +91,7 @@ bool is_indir_lp_locked(struct task_struct *task)
void set_indir_lp_status(struct task_struct *task, bool enable)
{
- if (!cpu_supports_indirect_br_lp_instr())
+ if (!is_user_lpad_enabled())
return;
task->thread_info.user_cfi_state.ufcfi_en = enable ? 1 : 0;
@@ -259,7 +261,7 @@ SYSCALL_DEFINE3(map_shadow_stack, unsigned long, addr, unsigned long, size, unsi
bool set_tok = flags & SHADOW_STACK_SET_TOKEN;
unsigned long aligned_size = 0;
- if (!cpu_supports_shadow_stack())
+ if (!is_user_shstk_enabled())
return -EOPNOTSUPP;
/* Anything other than set token should result in invalid param */
@@ -306,7 +308,7 @@ unsigned long shstk_alloc_thread_stack(struct task_struct *tsk,
unsigned long addr, size;
/* If shadow stack is not supported, return 0 */
- if (!cpu_supports_shadow_stack())
+ if (!is_user_shstk_enabled())
return 0;
/*
@@ -352,7 +354,7 @@ void shstk_release(struct task_struct *tsk)
{
unsigned long base = 0, size = 0;
/* If shadow stack is not supported or not enabled, nothing to release */
- if (!cpu_supports_shadow_stack() || !is_shstk_enabled(tsk))
+ if (!is_user_shstk_enabled() || !is_shstk_enabled(tsk))
return;
/*
@@ -381,7 +383,7 @@ int arch_get_shadow_stack_status(struct task_struct *t, unsigned long __user *st
{
unsigned long bcfi_status = 0;
- if (!cpu_supports_shadow_stack())
+ if (!is_user_shstk_enabled())
return -EINVAL;
/* this means shadow stack is enabled on the task */
@@ -395,7 +397,7 @@ int arch_set_shadow_stack_status(struct task_struct *t, unsigned long status)
unsigned long size = 0, addr = 0;
bool enable_shstk = false;
- if (!cpu_supports_shadow_stack())
+ if (!is_user_shstk_enabled())
return -EINVAL;
/* Reject unknown flags */
@@ -448,7 +450,7 @@ int arch_lock_shadow_stack_status(struct task_struct *task,
unsigned long arg)
{
/* If shtstk not supported or not enabled on task, nothing to lock here */
- if (!cpu_supports_shadow_stack() ||
+ if (!is_user_shstk_enabled() ||
!is_shstk_enabled(task) || arg != 0)
return -EINVAL;
@@ -461,7 +463,7 @@ int arch_get_indir_br_lp_status(struct task_struct *t, unsigned long __user *sta
{
unsigned long fcfi_status = 0;
- if (!cpu_supports_indirect_br_lp_instr())
+ if (!is_user_lpad_enabled())
return -EINVAL;
/* indirect branch tracking is enabled on the task or not */
@@ -474,7 +476,7 @@ int arch_set_indir_br_lp_status(struct task_struct *t, unsigned long status)
{
bool enable_indir_lp = false;
- if (!cpu_supports_indirect_br_lp_instr())
+ if (!is_user_lpad_enabled())
return -EINVAL;
/* indirect branch tracking is locked and further can't be modified by user */
@@ -498,7 +500,7 @@ int arch_lock_indir_br_lp_status(struct task_struct *task,
* If indirect branch tracking is not supported or not enabled on task,
* nothing to lock here
*/
- if (!cpu_supports_indirect_br_lp_instr() ||
+ if (!is_user_lpad_enabled() ||
!is_indir_lp_enabled(task) || arg != 0)
return -EINVAL;
@@ -506,3 +508,38 @@ int arch_lock_indir_br_lp_status(struct task_struct *task,
return 0;
}
+
+bool is_user_shstk_enabled(void)
+{
+ return (cpu_supports_shadow_stack() &&
+ !(riscv_nousercfi & CMDLINE_DISABLE_RISCV_USERCFI_BCFI));
+}
+
+bool is_user_lpad_enabled(void)
+{
+ return (cpu_supports_indirect_br_lp_instr() &&
+ !(riscv_nousercfi & CMDLINE_DISABLE_RISCV_USERCFI_FCFI));
+}
+
+static int __init setup_global_riscv_enable(char *str)
+{
+ if (strcmp(str, "all") == 0)
+ riscv_nousercfi = CMDLINE_DISABLE_RISCV_USERCFI;
+
+ if (strcmp(str, "fcfi") == 0)
+ riscv_nousercfi |= CMDLINE_DISABLE_RISCV_USERCFI_FCFI;
+
+ if (strcmp(str, "bcfi") == 0)
+ riscv_nousercfi |= CMDLINE_DISABLE_RISCV_USERCFI_BCFI;
+
+ if (riscv_nousercfi)
+ pr_info("riscv user cfi disabled via cmdline"
+ "shadow stack status : %s, landing pad status : %s\n",
+ (riscv_nousercfi & CMDLINE_DISABLE_RISCV_USERCFI_BCFI) ? "disabled" :
+ "enabled", (riscv_nousercfi & CMDLINE_DISABLE_RISCV_USERCFI_FCFI) ?
+ "disabled" : "enabled");
+
+ return 1;
+}
+
+__setup("riscv_nousercfi=", setup_global_riscv_enable);
--
2.43.0
Return-Path: <linux-kernel+bounces-673605-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 2676A41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:24:58 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id B4BE7164740
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:24:57 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 16E7425D20A;
Wed, 4 Jun 2025 17:17:35 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="RHTwxysr"
Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 32A6325D8FD
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:17:31 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.179
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749057454; cv=none; b=e9dkSO6is+km1CdeB4v9esFz59mUhVcUfd0IgkGs3HfgrRsj4EJl6wmYD5kjcIw7RpldeEsne7rn7w886GIJy4+nVMfQ2gzqrGimyEUyVYHZC/tHDVuY7NrfnpeWvNE/YPmUsELVYld0TzUFx6HwndXWzMf6jLvEaNSSkhY5YII=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749057454; c=relaxed/simple;
bh=rpxI7deGxR1b1p2DEnatELgrO8HyrKziLzhoGXBzZ0c=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=Rlp7fHJYH58EBom4fcIqiMkvVjO2KQNL6yzkeihSKrAoBdrRc0jsJiC/zom0v7h51NBeQMhXJ2UrhzVeAngqEgB8pDPuf40bY3WllNgsz0K8yR9D/OULwrli5jWY4ifzCF0OpiYFgevUS88DMiG56QgnYMUYuJxeagr7riHCvGc=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=RHTwxysr; arc=none smtp.client-ip=209.85.214.179
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com
Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-234d366e5f2so915675ad.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 10:17:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1749057451; x=1749662251; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=04baGaWIOcpAM10BsvDKc2YnzV44Y+9Sv7IQZJnFcq0=;
b=RHTwxysrq04UICxuH6Uo97fcNbAUoLZU/8KUqjIVn/mOiteBkmC0xj1/CyT5wkbawl
/kIiVsD1HFy4QoGRIiD0/yub78yJMKIb2Tt7ZrZnkwBzJPp0n1MxiG9tf6Xs9Y5zmlh2
iggH1xXjqdueD5AvtfST05bOZonCHoFsdt07Qf3SuP9o6j7mq8LaN5Crdldjfg+zFyrt
KzWj3tO7yWIK2aA1b5HJvU8kyS6ZC7zZLVzVZ/e0ZxLoZAN5qcA8wcVL0KmNDZfw2zBn
WZm/eX/sO9x+9fz1G2W2Qvs+WA8I/7fMoyF8Gzgfn7Ehq30rveUQ3xsqfQFmqXrEYYev
a2sA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749057451; x=1749662251;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=04baGaWIOcpAM10BsvDKc2YnzV44Y+9Sv7IQZJnFcq0=;
b=m+QRuEkbtVcD4Vg3+J1kqkoSWEkV4TM7DLSk/+yVmO9iYb1kykZPkXjJZznLTGVhhE
e4W9CarrC/iF6YDo5h6raeesnv+mEy06Xf8V2y87CFLjRfKYSofiz7z3g27RgHbY9Tsz
YGytOyUEb1Shzz6j9jrmt4bBAJayF/VlIykbgoMV1skHHN6EB7bVF9iDHPbC2+hA1euS
XTtm161jy/H8HPwuSm1RYl9DE6lcz8im/dgqHDeMNzlJQ+i1P4LzkP1XD1ixRyTPqNbP
GR5ByGCm8g7rQie/j4CoHvNWpehFKR86QkXGyVGe41neMQI+6KBCzVjIl4vTyZbVKfbs
V1GA==
X-Gm-Message-State: AOJu0YzslFbHait3HHmNYby9qQyuHmQ9PEV8kV1Ii+23m5ygR80C6Rqk
W/8zPr+7KMDpiV8/gTi9abAQy2KdBbdT++SZhxTQCaZuTCRm9xzBns3UnZ2ognWNQ2Y=
X-Gm-Gg: ASbGnct/5jByvq7VUDgrqciXfTt77NkCuhgXyIps8auxZoWC7T1IfkmIiAXByKRwegA
ETDSdIbYjWIhGvhOeJHfo/9+4tf5ac+uqmTC4H0RGAcfWxlPMTfdBRKnsjDiw9kDHbpVIaQ4nJJ
xdr4fOG4eVf5PR740AXh2ZidFw2IT4TJMK5LNRt7AO75tia2ABmUxlJ8QPo1JRcKSWFFz1/ZBAW
THyntzFk7pJKM8YqK32p3Z3j6RS4oa2a5bDshUn5cHAoSCza96PyoLrqaJJhQY4qcYxgojPSJvw
krawcAaPOU6+EblolycHX+BQRb4YZhGWxR194L2pvl7YJqWIm4rhZIoluV3E2Q==
X-Google-Smtp-Source: AGHT+IFcq5WB+U9iWrH30KPItPtSFCK4VQFpk5Sy2sACj00+P1FwDLODuLCzKbJ98QmMK99qkmq+JQ==
X-Received: by 2002:a17:902:e543:b0:235:1706:1fe7 with SMTP id d9443c01a7336-235e1015d8cmr51502395ad.4.1749057451320;
Wed, 04 Jun 2025 10:17:31 -0700 (PDT)
Received: from debug.ba.rivosinc.com ([64.71.180.162])
by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3124e2e9c9fsm9178972a91.30.2025.06.04.10.17.28
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 10:17:30 -0700 (PDT)
From: Deepak Gupta <debug@xxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 10:15:49 -0700
Subject: [PATCH v17 25/27] riscv: Documentation for landing pad / indirect
branch tracking
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <20250604-v5_user_cfi_series-v17-25-4565c2cf869f@xxxxxxxxxxxx>
References: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
In-Reply-To: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
To: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>,
Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>,
x86@xxxxxxxxxx, "H. Peter Anvin" <hpa@xxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>,
Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>,
Paul Walmsley <paul.walmsley@xxxxxxxxxx>,
Palmer Dabbelt <palmer@xxxxxxxxxxx>, Albert Ou <aou@xxxxxxxxxxxxxxxxx>,
Conor Dooley <conor@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>,
Christian Brauner <brauner@xxxxxxxxxx>,
Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Oleg Nesterov <oleg@xxxxxxxxxx>,
Eric Biederman <ebiederm@xxxxxxxxxxxx>, Kees Cook <kees@xxxxxxxxxx>,
Jonathan Corbet <corbet@xxxxxxx>, Shuah Khan <shuah@xxxxxxxxxx>,
Jann Horn <jannh@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>,
Miguel Ojeda <ojeda@xxxxxxxxxx>, Alex Gaynor <alex.gaynor@xxxxxxxxx>,
Boqun Feng <boqun.feng@xxxxxxxxx>, Gary Guo <gary@xxxxxxxxxxx>,
=?utf-8?q?Bj=C3=B6rn_Roy_Baron?= <bjorn3_gh@xxxxxxxxxxxxxx>,
Benno Lossin <benno.lossin@xxxxxxxxx>,
Andreas Hindborg <a.hindborg@xxxxxxxxxx>, Alice Ryhl <aliceryhl@xxxxxxxxxx>,
Trevor Gross <tmgross@xxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx,
linux-mm@xxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx,
linux-doc@xxxxxxxxxxxxxxx, linux-kselftest@xxxxxxxxxxxxxxx,
alistair.francis@xxxxxxx, richard.henderson@xxxxxxxxxx, jim.shu@xxxxxxxxxx,
andybnac@xxxxxxxxx, kito.cheng@xxxxxxxxxx, charlie@xxxxxxxxxxxx,
atishp@xxxxxxxxxxxx, evan@xxxxxxxxxxxx, cleger@xxxxxxxxxxxx,
alexghiti@xxxxxxxxxxxx, samitolvanen@xxxxxxxxxx, broonie@xxxxxxxxxx,
rick.p.edgecombe@xxxxxxxxx, rust-for-linux@xxxxxxxxxxxxxxx,
Zong Li <zong.li@xxxxxxxxxx>, Deepak Gupta <debug@xxxxxxxxxxxx>
X-Mailer: b4 0.13.0
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Adding documentation on landing pad aka indirect branch tracking on riscv
and kernel interfaces exposed so that user tasks can enable it.
Reviewed-by: Zong Li <zong.li@xxxxxxxxxx>
Signed-off-by: Deepak Gupta <debug@xxxxxxxxxxxx>
---
Documentation/arch/riscv/index.rst | 1 +
Documentation/arch/riscv/zicfilp.rst | 115 +++++++++++++++++++++++++++++++++++
2 files changed, 116 insertions(+)
diff --git a/Documentation/arch/riscv/index.rst b/Documentation/arch/riscv/index.rst
index eecf347ce849..be7237b69682 100644
--- a/Documentation/arch/riscv/index.rst
+++ b/Documentation/arch/riscv/index.rst
@@ -14,6 +14,7 @@ RISC-V architecture
uabi
vector
cmodx
+ zicfilp
features
diff --git a/Documentation/arch/riscv/zicfilp.rst b/Documentation/arch/riscv/zicfilp.rst
new file mode 100644
index 000000000000..dcf43de73a06
--- /dev/null
+++ b/Documentation/arch/riscv/zicfilp.rst
@@ -0,0 +1,115 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+:Author: Deepak Gupta <debug@xxxxxxxxxxxx>
+:Date: 12 January 2024
+
+====================================================
+Tracking indirect control transfers on RISC-V Linux
+====================================================
+
+This document briefly describes the interface provided to userspace by Linux
+to enable indirect branch tracking for user mode applications on RISC-V
+
+1. Feature Overview
+--------------------
+
+Memory corruption issues usually result into crashes, however when in hands of
+an adversary and if used creatively can result into a variety security issues.
+
+One of those security issues can be code re-use attacks on program where adversary
+can use corrupt function pointers and chain them together to perform jump oriented
+programming (JOP) or call oriented programming (COP) and thus compromising control
+flow integrity (CFI) of the program.
+
+Function pointers live in read-write memory and thus are susceptible to corruption
+and allows an adversary to reach any program counter (PC) in address space. On
+RISC-V zicfilp extension enforces a restriction on such indirect control
+transfers:
+
+- indirect control transfers must land on a landing pad instruction ``lpad``.
+ There are two exception to this rule:
+
+ - rs1 = x1 or rs1 = x5, i.e. a return from a function and returns are
+ protected using shadow stack (see zicfiss.rst)
+
+ - rs1 = x7. On RISC-V compiler usually does below to reach function
+ which is beyond the offset possible J-type instruction::
+
+ auipc x7, <imm>
+ jalr (x7)
+
+ Such form of indirect control transfer are still immutable and don't rely
+ on memory and thus rs1=x7 is exempted from tracking and considered software
+ guarded jumps.
+
+``lpad`` instruction is pseudo of ``auipc rd, <imm_20bit>`` with ``rd=x0`` and
+is a HINT nop. ``lpad`` instruction must be aligned on 4 byte boundary and
+compares 20 bit immediate with x7. If ``imm_20bit`` == 0, CPU doesn't perform
+any comparision with ``x7``. If ``imm_20bit`` != 0, then ``imm_20bit`` must
+match ``x7`` else CPU will raise ``software check exception`` (``cause=18``)
+with ``*tval = 2``.
+
+Compiler can generate a hash over function signatures and setup them (truncated
+to 20bit) in x7 at callsites and function prologues can have ``lpad`` with same
+function hash. This further reduces number of program counters a call site can
+reach.
+
+2. ELF and psABI
+-----------------
+
+Toolchain sets up :c:macro:`GNU_PROPERTY_RISCV_FEATURE_1_FCFI` for property
+:c:macro:`GNU_PROPERTY_RISCV_FEATURE_1_AND` in notes section of the object file.
+
+3. Linux enabling
+------------------
+
+User space programs can have multiple shared objects loaded in its address space
+and it's a difficult task to make sure all the dependencies have been compiled
+with support of indirect branch. Thus it's left to dynamic loader to enable
+indirect branch tracking for the program.
+
+4. prctl() enabling
+--------------------
+
+:c:macro:`PR_SET_INDIR_BR_LP_STATUS` / :c:macro:`PR_GET_INDIR_BR_LP_STATUS` /
+:c:macro:`PR_LOCK_INDIR_BR_LP_STATUS` are three prctls added to manage indirect
+branch tracking. prctls are arch agnostic and returns -EINVAL on other arches.
+
+* prctl(PR_SET_INDIR_BR_LP_STATUS, unsigned long arg)
+
+If arg1 is :c:macro:`PR_INDIR_BR_LP_ENABLE` and if CPU supports ``zicfilp``
+then kernel will enable indirect branch tracking for the task. Dynamic loader
+can issue this :c:macro:`prctl` once it has determined that all the objects
+loaded in address space support indirect branch tracking. Additionally if there
+is a `dlopen` to an object which wasn't compiled with ``zicfilp``, dynamic
+loader can issue this prctl with arg1 set to 0 (i.e.
+:c:macro:`PR_INDIR_BR_LP_ENABLE` being clear)
+
+* prctl(PR_GET_INDIR_BR_LP_STATUS, unsigned long arg)
+
+Returns current status of indirect branch tracking. If enabled it'll return
+:c:macro:`PR_INDIR_BR_LP_ENABLE`
+
+* prctl(PR_LOCK_INDIR_BR_LP_STATUS, unsigned long arg)
+
+Locks current status of indirect branch tracking on the task. User space may
+want to run with strict security posture and wouldn't want loading of objects
+without ``zicfilp`` support in it and thus would want to disallow disabling of
+indirect branch tracking. In that case user space can use this prctl to lock
+current settings.
+
+5. violations related to indirect branch tracking
+--------------------------------------------------
+
+Pertaining to indirect branch tracking, CPU raises software check exception in
+following conditions:
+
+- missing ``lpad`` after indirect call / jmp
+- ``lpad`` not on 4 byte boundary
+- ``imm_20bit`` embedded in ``lpad`` instruction doesn't match with ``x7``
+
+In all 3 cases, ``*tval = 2`` is captured and software check exception is
+raised (``cause=18``)
+
+Linux kernel will treat this as :c:macro:`SIGSEV`` with code =
+:c:macro:`SEGV_CPERR` and follow normal course of signal delivery.
--
2.43.0
Return-Path: <linux-kernel+bounces-673606-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 51C6F41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:25:15 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 60FF617061B
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:25:16 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 8B8ED25E814;
Wed, 4 Jun 2025 17:17:38 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="z5WIyh2f"
Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 71E6125DD15
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:17:35 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.52
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749057457; cv=none; b=Bm2b3Cxiu9lm9qbMx7HMOdF7KAtLy1QRx7Jgf6bcHHw3pDDtznoQMd+2E3Y3lzhU/O6fiD8a8WNBbPXfNMy/OKNuiQD7fChIvPq3CjJiuY9OFj6bsboBr60eFndI/erW0CAJqXoiu1HJvfl3qzyf/uvF1AofnMN+bPO26HlMaZA=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749057457; c=relaxed/simple;
bh=UjrPxm23xyVLvZKVJ+57X6UUhI2Ibix0KGq+K0XyrcE=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=fX6tN9CnnYCPQXhoYrLbjYafkhY97NBFnk+8AXKa0l3zv/RPjaLjHz7Sv3S8QVgFKN7ECqCUUgrfuMl2HZD9CJlgvuo5GJ3EoEiDj4sXuMOOCOUxlTVGhJsa5byajN8++uyCf9ylE4LErCoqPC8c1MMzuUV88aaiCdQX5Cq+ZqI=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=z5WIyh2f; arc=none smtp.client-ip=209.85.216.52
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com
Received: by mail-pj1-f52.google.com with SMTP id 98e67ed59e1d1-306b6ae4fb2so95220a91.3
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 10:17:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1749057455; x=1749662255; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=VgTX5jh6pXjtEDHfXrNgVX78ota6UPFjSNVgqZFbeUU=;
b=z5WIyh2fzblsx4FYC1qEvFqhjs2tCMqzySdjdFr9Mlo1S/uCdzhlVQnYH4kXDoM2P0
Ia4wIGKc3vn3tR+keHY2AbO6A0wfU+ztT+amohuwxtOhZY+oKF4y+uL2BCjeNJTdomnI
VN4QGJIrzhf9cheRg1B953OIGHkkrZ6Eq95SUzeyb7QopUKIOdZf2nw8pTxOQ1RRLHqV
iB9jcbu9ZlZx3ZyXHcO9nKX5omvFtCt8OannMr87u1klwczXf/pIo8CwqsbTZNYq6bqU
r10q0Uh2eNLfRxIE6ZDEsYpWLNWYBKJvtyv4bxAn1e8GByhZXrUd1qhACqISTY3/irJi
+C5w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749057455; x=1749662255;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=VgTX5jh6pXjtEDHfXrNgVX78ota6UPFjSNVgqZFbeUU=;
b=hzkv95bCMh5BwePNTF8KeksduschOKlxVIe8Dk+u03MsHbOQM0SSMye6uZEGfXbibc
J9OAqUMV20XhU6nU36AwApc4w8pjkVzWeHfvtJ93W+jpayQt/TZJMYCNuURf1T0iHDab
l6OCEEo/0+NcCgtSL93iEyPxMRRx48YNfO+qU0V4ePWD8rYyAUZ3ygJ8emXf0wVoKD/t
I/c0+IW+I9ntUTvxeJskMJaJWvS0rg3J4iF8NL9iattEnUec8XrGeWoi6IL9OWnsIFg2
hwMhVZ1GOTH03Q28XKwNg1f/vKHs+N991JvfSpxEOrnVzDrLGoEt2KjUCOgEYb4vvx9T
6ZdA==
X-Gm-Message-State: AOJu0Yw1na/1/CkS/kAL6xBKoch0JVHuAkGnqXNTtBr6oDZsFcEAQ+14
S1mDUfrvtxGruAmHKl+IYxHOPk8W09XLmilr6eHZUvdDHRMxWNVnC/QPhWaC2Lq4Iok=
X-Gm-Gg: ASbGncuxJETMoIvQhucoQ6b3wazgW47LaqH+p38i1GezubNlHpACLUwAvPeQxfammHD
0Of6WTGQJd6BFX3GoK0kYvneE/s4Yrcoi69J6F3IWrTwMclVgCEiYyvGNCW4/meV4XbuP/zJ41i
7a+SUrpMh1HdbsdRBC19klryhajyvkI3pqCLOlPtB4R9vpFzwsXR9yF9js/E7furE3IOv8f4szk
Go/fvS1qWEjYRTgiz+8wG6fwvniutzPAA1SZiuV2tUufMYnwLuw3TyOUg+jzC5B9Yl5k5nLpfVm
dQZqHYs+gbc6vAldSUsluSVuBxkECdKq7jZ6i/IeGIpRa6UoWionzg7PGqL22A==
X-Google-Smtp-Source: AGHT+IHaxDRLkkT7jDX7sxtQ8q2Hvyx5mNNhlV+VfX5KaM/kNrMKELo28N+2Mp5yv9YZl0K57aVYQg==
X-Received: by 2002:a17:90b:4ccb:b0:311:a314:c2d1 with SMTP id 98e67ed59e1d1-3130ccf6a5fmr5153252a91.6.1749057454441;
Wed, 04 Jun 2025 10:17:34 -0700 (PDT)
Received: from debug.ba.rivosinc.com ([64.71.180.162])
by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3124e2e9c9fsm9178972a91.30.2025.06.04.10.17.31
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 10:17:34 -0700 (PDT)
From: Deepak Gupta <debug@xxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 10:15:50 -0700
Subject: [PATCH v17 26/27] riscv: Documentation for shadow stack on riscv
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <20250604-v5_user_cfi_series-v17-26-4565c2cf869f@xxxxxxxxxxxx>
References: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
In-Reply-To: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
To: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>,
Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>,
x86@xxxxxxxxxx, "H. Peter Anvin" <hpa@xxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>,
Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>,
Paul Walmsley <paul.walmsley@xxxxxxxxxx>,
Palmer Dabbelt <palmer@xxxxxxxxxxx>, Albert Ou <aou@xxxxxxxxxxxxxxxxx>,
Conor Dooley <conor@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>,
Christian Brauner <brauner@xxxxxxxxxx>,
Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Oleg Nesterov <oleg@xxxxxxxxxx>,
Eric Biederman <ebiederm@xxxxxxxxxxxx>, Kees Cook <kees@xxxxxxxxxx>,
Jonathan Corbet <corbet@xxxxxxx>, Shuah Khan <shuah@xxxxxxxxxx>,
Jann Horn <jannh@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>,
Miguel Ojeda <ojeda@xxxxxxxxxx>, Alex Gaynor <alex.gaynor@xxxxxxxxx>,
Boqun Feng <boqun.feng@xxxxxxxxx>, Gary Guo <gary@xxxxxxxxxxx>,
=?utf-8?q?Bj=C3=B6rn_Roy_Baron?= <bjorn3_gh@xxxxxxxxxxxxxx>,
Benno Lossin <benno.lossin@xxxxxxxxx>,
Andreas Hindborg <a.hindborg@xxxxxxxxxx>, Alice Ryhl <aliceryhl@xxxxxxxxxx>,
Trevor Gross <tmgross@xxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx,
linux-mm@xxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx,
linux-doc@xxxxxxxxxxxxxxx, linux-kselftest@xxxxxxxxxxxxxxx,
alistair.francis@xxxxxxx, richard.henderson@xxxxxxxxxx, jim.shu@xxxxxxxxxx,
andybnac@xxxxxxxxx, kito.cheng@xxxxxxxxxx, charlie@xxxxxxxxxxxx,
atishp@xxxxxxxxxxxx, evan@xxxxxxxxxxxx, cleger@xxxxxxxxxxxx,
alexghiti@xxxxxxxxxxxx, samitolvanen@xxxxxxxxxx, broonie@xxxxxxxxxx,
rick.p.edgecombe@xxxxxxxxx, rust-for-linux@xxxxxxxxxxxxxxx,
Zong Li <zong.li@xxxxxxxxxx>, Deepak Gupta <debug@xxxxxxxxxxxx>
X-Mailer: b4 0.13.0
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
Adding documentation on shadow stack for user mode on riscv and kernel
interfaces exposed so that user tasks can enable it.
Reviewed-by: Zong Li <zong.li@xxxxxxxxxx>
Signed-off-by: Deepak Gupta <debug@xxxxxxxxxxxx>
---
Documentation/arch/riscv/index.rst | 1 +
Documentation/arch/riscv/zicfiss.rst | 179 +++++++++++++++++++++++++++++++++++
2 files changed, 180 insertions(+)
diff --git a/Documentation/arch/riscv/index.rst b/Documentation/arch/riscv/index.rst
index be7237b69682..e240eb0ceb70 100644
--- a/Documentation/arch/riscv/index.rst
+++ b/Documentation/arch/riscv/index.rst
@@ -15,6 +15,7 @@ RISC-V architecture
vector
cmodx
zicfilp
+ zicfiss
features
diff --git a/Documentation/arch/riscv/zicfiss.rst b/Documentation/arch/riscv/zicfiss.rst
new file mode 100644
index 000000000000..b50089e6a52b
--- /dev/null
+++ b/Documentation/arch/riscv/zicfiss.rst
@@ -0,0 +1,179 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+:Author: Deepak Gupta <debug@xxxxxxxxxxxx>
+:Date: 12 January 2024
+
+=========================================================
+Shadow stack to protect function returns on RISC-V Linux
+=========================================================
+
+This document briefly describes the interface provided to userspace by Linux
+to enable shadow stack for user mode applications on RISC-V
+
+1. Feature Overview
+--------------------
+
+Memory corruption issues usually result into crashes, however when in hands of
+an adversary and if used creatively can result into a variety security issues.
+
+One of those security issues can be code re-use attacks on program where
+adversary can use corrupt return addresses present on stack and chain them
+together to perform return oriented programming (ROP) and thus compromising
+control flow integrity (CFI) of the program.
+
+Return addresses live on stack and thus in read-write memory and thus are
+susceptible to corruption and which allows an adversary to reach any program
+counter (PC) in address space. On RISC-V ``zicfiss`` extension provides an
+alternate stack termed as shadow stack on which return addresses can be safely
+placed in prolog of the function and retrieved in epilog. ``zicfiss`` extension
+makes following changes:
+
+- PTE encodings for shadow stack virtual memory
+ An earlier reserved encoding in first stage translation i.e.
+ PTE.R=0, PTE.W=1, PTE.X=0 becomes PTE encoding for shadow stack pages.
+
+- ``sspush x1/x5`` instruction pushes (stores) ``x1/x5`` to shadow stack.
+
+- ``sspopchk x1/x5`` instruction pops (loads) from shadow stack and compares
+ with ``x1/x5`` and if un-equal, CPU raises ``software check exception`` with
+ ``*tval = 3``
+
+Compiler toolchain makes sure that function prologue have ``sspush x1/x5`` to
+save return address on shadow stack in addition to regular stack. Similarly
+function epilogs have ``ld x5, offset(x2)`` followed by ``sspopchk x5`` to
+ensure that popped value from regular stack matches with popped value from
+shadow stack.
+
+2. Shadow stack protections and linux memory manager
+-----------------------------------------------------
+
+As mentioned earlier, shadow stacks get new page table encodings and thus have
+some special properties assigned to them and instructions that operate on them
+as below:
+
+- Regular stores to shadow stack memory raises access store faults. This way
+ shadow stack memory is protected from stray inadvertent writes.
+
+- Regular loads to shadow stack memory are allowed. This allows stack trace
+ utilities or backtrace functions to read true callstack (not tampered).
+
+- Only shadow stack instructions can generate shadow stack load or shadow stack
+ store.
+
+- Shadow stack load / shadow stack store on read-only memory raises AMO/store
+ page fault. Thus both ``sspush x1/x5`` and ``sspopchk x1/x5`` will raise AMO/
+ store page fault. This simplies COW handling in kernel during fork, kernel
+ can convert shadow stack pages into read-only memory (as it does for regular
+ read-write memory) and as soon as subsequent ``sspush`` or ``sspopchk`` in
+ userspace is encountered, then kernel can perform COW.
+
+- Shadow stack load / shadow stack store on read-write, read-write-execute
+ memory raises an access fault. This is a fatal condition because shadow stack
+ should never be operating on read-write, read-write-execute memory.
+
+3. ELF and psABI
+-----------------
+
+Toolchain sets up :c:macro:`GNU_PROPERTY_RISCV_FEATURE_1_BCFI` for property
+:c:macro:`GNU_PROPERTY_RISCV_FEATURE_1_AND` in notes section of the object file.
+
+4. Linux enabling
+------------------
+
+User space programs can have multiple shared objects loaded in its address space
+and it's a difficult task to make sure all the dependencies have been compiled
+with support of shadow stack. Thus it's left to dynamic loader to enable
+shadow stack for the program.
+
+5. prctl() enabling
+--------------------
+
+:c:macro:`PR_SET_SHADOW_STACK_STATUS` / :c:macro:`PR_GET_SHADOW_STACK_STATUS` /
+:c:macro:`PR_LOCK_SHADOW_STACK_STATUS` are three prctls added to manage shadow
+stack enabling for tasks. prctls are arch agnostic and returns -EINVAL on other
+arches.
+
+* prctl(PR_SET_SHADOW_STACK_STATUS, unsigned long arg)
+
+If arg1 :c:macro:`PR_SHADOW_STACK_ENABLE` and if CPU supports ``zicfiss`` then
+kernel will enable shadow stack for the task. Dynamic loader can issue this
+:c:macro:`prctl` once it has determined that all the objects loaded in address
+space have support for shadow stack. Additionally if there is a
+:c:macro:`dlopen` to an object which wasn't compiled with ``zicfiss``, dynamic
+loader can issue this prctl with arg1 set to 0 (i.e.
+:c:macro:`PR_SHADOW_STACK_ENABLE` being clear)
+
+* prctl(PR_GET_SHADOW_STACK_STATUS, unsigned long *arg)
+
+Returns current status of indirect branch tracking. If enabled it'll return
+:c:macro:`PR_SHADOW_STACK_ENABLE`.
+
+* prctl(PR_LOCK_SHADOW_STACK_STATUS, unsigned long arg)
+
+Locks current status of shadow stack enabling on the task. User space may want
+to run with strict security posture and wouldn't want loading of objects
+without ``zicfiss`` support in it and thus would want to disallow disabling of
+shadow stack on current task. In that case user space can use this prctl to
+lock current settings.
+
+5. violations related to returns with shadow stack enabled
+-----------------------------------------------------------
+
+Pertaining to shadow stack, CPU raises software check exception in following
+condition:
+
+- On execution of ``sspopchk x1/x5``, ``x1/x5`` didn't match top of shadow
+ stack. If mismatch happens then cpu does ``*tval = 3`` and raise software
+ check exception.
+
+Linux kernel will treat this as :c:macro:`SIGSEV`` with code =
+:c:macro:`SEGV_CPERR` and follow normal course of signal delivery.
+
+6. Shadow stack tokens
+-----------------------
+Regular stores on shadow stacks are not allowed and thus can't be tampered
+with via arbitrary stray writes due to bugs. However method of pivoting /
+switching to shadow stack is simply writing to csr ``CSR_SSP`` and that will
+change active shadow stack for the program. Instances of writes to ``CSR_SSP``
+in the address space of the program should be mostly limited to context
+switching, stack unwind, longjmp or similar mechanisms (like context switching
+of green threads) in languages like go, rust. This can be problematic because
+an attacker can use memory corruption bugs and eventually use such context
+switching routines to pivot to any shadow stack. Shadow stack tokens can help
+mitigate this problem by making sure that:
+
+- When software is switching away from a shadow stack, shadow stack pointer
+ should be saved on shadow stack itself and call it ``shadow stack token``
+
+- When software is switching to a shadow stack, it should read the
+ ``shadow stack token`` from shadow stack pointer and verify that
+ ``shadow stack token`` itself is pointer to shadow stack itself.
+
+- Once the token verification is done, software can perform the write to
+ ``CSR_SSP`` to switch shadow stack.
+
+Here software can be user mode task runtime itself which is managing various
+contexts as part of single thread. Software can be kernel as well when kernel
+has to deliver a signal to user task and must save shadow stack pointer. Kernel
+can perform similar procedure by saving a token on user shadow stack itself.
+This way whenever :c:macro:`sigreturn` happens, kernel can read the token and
+verify the token and then switch to shadow stack. Using this mechanism, kernel
+helps user task so that any corruption issue in user task is not exploited by
+adversary by arbitrarily using :c:macro:`sigreturn`. Adversary will have to
+make sure that there is a ``shadow stack token`` in addition to invoking
+:c:macro:`sigreturn`
+
+7. Signal shadow stack
+-----------------------
+Following structure has been added to sigcontext for RISC-V::
+
+ struct __sc_riscv_cfi_state {
+ unsigned long ss_ptr;
+ };
+
+As part of signal delivery, shadow stack token is saved on current shadow stack
+itself and updated pointer is saved away in :c:macro:`ss_ptr` field in
+:c:macro:`__sc_riscv_cfi_state` under :c:macro:`sigcontext`. Existing shadow
+stack allocation is used for signal delivery. During :c:macro:`sigreturn`,
+kernel will obtain :c:macro:`ss_ptr` from :c:macro:`sigcontext` and verify the
+saved token on shadow stack itself and switch shadow stack.
--
2.43.0
Return-Path: <linux-kernel+bounces-673603-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [139.178.88.99])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id EE55F41E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:25:30 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by sv.mirrors.kernel.org (Postfix) with ESMTPS id AD90F3A87C3
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:23:56 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id A1A2525CC52;
Wed, 4 Jun 2025 17:17:29 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="tLyxZF+S"
Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 176E11FECDD
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:17:25 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.169
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749057448; cv=none; b=Tmd8QBkQrHDDk5z2aHJ6inGxtPY46wNjVum5zHL7vesqK6bmMkI6blzFGTwRuwn+4QFMwJQMdxrDuBVugnIVfSA1EIJygsR4nmGQwMJReZT4TbjWdfoBschSxT9ygIZ6iyldwXpP1qy6+tTQdO/N9RzUae32ZsRqHWdQGKVTPKI=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749057448; c=relaxed/simple;
bh=zTBLHDmOutNpZax/HGCcVxm7U60GFHDV96+fuNo6yX0=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=Bst5ZlicZ+q9RImyaoMoc0B9iLNW9fM8IX5y6BvFwBS4nugwR7K77V5egZBWUYeYkf/zTUhi4PeXnCOWMYCzWj2IoxYix+wo2/IooUsuHrtzhWC90D3X+IOS2OB2RUtTsDv4q8uOHMlksdR2/UJpKI6oJ0I1o98bOd3AVjuQXA0=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=tLyxZF+S; arc=none smtp.client-ip=209.85.215.169
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com
Received: by mail-pg1-f169.google.com with SMTP id 41be03b00d2f7-b2c4e46a89fso19156a12.2
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 10:17:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1749057445; x=1749662245; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=H0Lpssa4FFZpcPHQwOt7vFOEiyyUWWrWhSwc1jf+7uw=;
b=tLyxZF+S3N56QesN0OkJm0MpZaZd1dmYTT5mqsdx/9xd5zDjaOdRDUfdMkpVY70AF7
S5y4agLV721tplpmawpDVlGM8kNDRvYxcxNquYYO5wIdVWRti/crLIr0KhHK4VZv+73r
fJSoDeeP69DDlXMdtHwAfp1q9uxfAOOX4Q7CL/rPzNJDuqYHTLxUcySWMSLrz+W7NZjc
L9Hs4mBoT1slcaL7TluHRwUqHsyOok2tdHFI1x6+vee35G3YcsxE5DJq3fO7RYh118yj
cFwWdgxGN2DU0srwOQJ4G71JZ/ZRRKChEBVnJKVcy9806cMcTg95vjIoaqWja5GvYve2
Di9A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749057445; x=1749662245;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=H0Lpssa4FFZpcPHQwOt7vFOEiyyUWWrWhSwc1jf+7uw=;
b=Q5q+OZszEGSc6r22fvFyfVTVAJ+n49SCK0Id2J/RynsJ6ZMmpeuRkM8jr+jKI9DDtI
v9M89YdQaPqVG+Qlv33V2KWlNVvZQaoMonAZfQ3mhLCE9eqQUhko0u2Qst+Jui25a3EK
Htma8xW8zU330Rl1GfuhTCGMbO2zQQShzuRMBzyz3YJEZiAwYc6QHmMrR9saOyuA+m/c
Ox0PAqEX4de0u3oTn4ya5uDXJwqn1WfTig7v9XfBE8peVAx9H0UbcwN0vG2cZqnUyOO7
ejwzZu1rPl3eRPEINXNIHAE2x02ebIbaktM9GyQEjgVv6fKm6TY0zRBUQetpVAwIfadk
Pf8Q==
X-Gm-Message-State: AOJu0YzST/eeS9eFB8Ykq8MSisnJW/we9TZNM2A7hkFng47pkUhGhN7W
Bn/XvOP5wRhGhBHT/A2gR64rjVlNL3s65P7uHueXWkeRwpK1sxbH8u8R+SghUpfZYqI=
X-Gm-Gg: ASbGncvqKmerwprA5Ed6Pz4sYPHPTzOkztJEYKf3OfdtMX0QBkl2oWCPH326pbQsoZw
PEP3sQunmnil84xF0QR2sdrBB+yaS+DLMtOrn86xB268Mo71uF1KA96zp8H8oCEroKKJBqd0ZsY
ZqYAZ/i5UP/E+VqZVCy5l9oIWVYRUBHPOOUZ//CwM2U0vxkDi3cSFpIACg7lLRYEglf19Qf0YTe
zn9tQRMnJQ1y8X/79b6iyQmrr239nlh/SJrvPXjc5TMYAGQQZymXWOYnQWEkRN5cX+jES41aRXA
/UkhJyQhEwCJrYeYDBHSzDlsy+ZNTeONGk5/CZ7+mP+ToC7UJxJX4oga18P4pQ==
X-Google-Smtp-Source: AGHT+IHtnJUflTu1uvvucB6Ee3tNMuV0H6i/cc/cNNLd9oBxeeqr3LHx3B28lleNPgDKQ5dpFxUxRA==
X-Received: by 2002:a17:90b:350c:b0:313:27b2:f729 with SMTP id 98e67ed59e1d1-31327b2f8fdmr894157a91.23.1749057444796;
Wed, 04 Jun 2025 10:17:24 -0700 (PDT)
Received: from debug.ba.rivosinc.com ([64.71.180.162])
by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3124e2e9c9fsm9178972a91.30.2025.06.04.10.17.21
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 10:17:24 -0700 (PDT)
From: Deepak Gupta <debug@xxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 10:15:47 -0700
Subject: [PATCH v17 23/27] arch/riscv: compile vdso with landing pad
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <20250604-v5_user_cfi_series-v17-23-4565c2cf869f@xxxxxxxxxxxx>
References: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
In-Reply-To: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
To: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>,
Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>,
x86@xxxxxxxxxx, "H. Peter Anvin" <hpa@xxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>,
Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>,
Paul Walmsley <paul.walmsley@xxxxxxxxxx>,
Palmer Dabbelt <palmer@xxxxxxxxxxx>, Albert Ou <aou@xxxxxxxxxxxxxxxxx>,
Conor Dooley <conor@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>,
Christian Brauner <brauner@xxxxxxxxxx>,
Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Oleg Nesterov <oleg@xxxxxxxxxx>,
Eric Biederman <ebiederm@xxxxxxxxxxxx>, Kees Cook <kees@xxxxxxxxxx>,
Jonathan Corbet <corbet@xxxxxxx>, Shuah Khan <shuah@xxxxxxxxxx>,
Jann Horn <jannh@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>,
Miguel Ojeda <ojeda@xxxxxxxxxx>, Alex Gaynor <alex.gaynor@xxxxxxxxx>,
Boqun Feng <boqun.feng@xxxxxxxxx>, Gary Guo <gary@xxxxxxxxxxx>,
=?utf-8?q?Bj=C3=B6rn_Roy_Baron?= <bjorn3_gh@xxxxxxxxxxxxxx>,
Benno Lossin <benno.lossin@xxxxxxxxx>,
Andreas Hindborg <a.hindborg@xxxxxxxxxx>, Alice Ryhl <aliceryhl@xxxxxxxxxx>,
Trevor Gross <tmgross@xxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx,
linux-mm@xxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx,
linux-doc@xxxxxxxxxxxxxxx, linux-kselftest@xxxxxxxxxxxxxxx,
alistair.francis@xxxxxxx, richard.henderson@xxxxxxxxxx, jim.shu@xxxxxxxxxx,
andybnac@xxxxxxxxx, kito.cheng@xxxxxxxxxx, charlie@xxxxxxxxxxxx,
atishp@xxxxxxxxxxxx, evan@xxxxxxxxxxxx, cleger@xxxxxxxxxxxx,
alexghiti@xxxxxxxxxxxx, samitolvanen@xxxxxxxxxx, broonie@xxxxxxxxxx,
rick.p.edgecombe@xxxxxxxxx, rust-for-linux@xxxxxxxxxxxxxxx,
Zong Li <zong.li@xxxxxxxxxx>, Deepak Gupta <debug@xxxxxxxxxxxx>
X-Mailer: b4 0.13.0
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
From: Jim Shu <jim.shu@xxxxxxxxxx>
user mode tasks compiled with zicfilp may call indirectly into vdso (like
hwprobe indirect calls). Add landing pad compile support in vdso. vdso
with landing pad in it will be nop for tasks which have not enabled
landing pad.
This patch allows to run user mode tasks with cfi eanbled and do no harm.
Future work can be done on this to do below
- labeled landing pad on vdso functions (whenever labeling support shows
up in gnu-toolchain)
- emit shadow stack instructions only in vdso compiled objects as part of
kernel compile.
Signed-off-by: Jim Shu <jim.shu@xxxxxxxxxx>
Reviewed-by: Zong Li <zong.li@xxxxxxxxxx>
Signed-off-by: Deepak Gupta <debug@xxxxxxxxxxxx>
---
arch/riscv/Makefile | 5 +++-
arch/riscv/include/asm/assembler.h | 44 +++++++++++++++++++++++++++++++++++
arch/riscv/kernel/vdso/Makefile | 6 +++++
arch/riscv/kernel/vdso/flush_icache.S | 4 ++++
arch/riscv/kernel/vdso/getcpu.S | 4 ++++
arch/riscv/kernel/vdso/rt_sigreturn.S | 4 ++++
arch/riscv/kernel/vdso/sys_hwprobe.S | 4 ++++
7 files changed, 70 insertions(+), 1 deletion(-)
diff --git a/arch/riscv/Makefile b/arch/riscv/Makefile
index 539d2aef5cab..c2dd09bb9db3 100644
--- a/arch/riscv/Makefile
+++ b/arch/riscv/Makefile
@@ -88,9 +88,12 @@ riscv-march-$(CONFIG_TOOLCHAIN_HAS_ZACAS) := $(riscv-march-y)_zacas
# Check if the toolchain supports Zabha
riscv-march-$(CONFIG_TOOLCHAIN_HAS_ZABHA) := $(riscv-march-y)_zabha
+KBUILD_BASE_ISA = -march=$(shell echo $(riscv-march-y) | sed -E 's/(rv32ima|rv64ima)fd([^v_]*)v?/\1\2/')
+export KBUILD_BASE_ISA
+
# Remove F,D,V from isa string for all. Keep extensions between "fd" and "v" by
# matching non-v and non-multi-letter extensions out with the filter ([^v_]*)
-KBUILD_CFLAGS += -march=$(shell echo $(riscv-march-y) | sed -E 's/(rv32ima|rv64ima)fd([^v_]*)v?/\1\2/')
+KBUILD_CFLAGS += $(KBUILD_BASE_ISA)
KBUILD_AFLAGS += -march=$(riscv-march-y)
diff --git a/arch/riscv/include/asm/assembler.h b/arch/riscv/include/asm/assembler.h
index 44b1457d3e95..a058ea5e9c58 100644
--- a/arch/riscv/include/asm/assembler.h
+++ b/arch/riscv/include/asm/assembler.h
@@ -80,3 +80,47 @@
.endm
#endif /* __ASM_ASSEMBLER_H */
+
+#if defined(CONFIG_RISCV_USER_CFI) && (__riscv_xlen == 64)
+.macro vdso_lpad
+lpad 0
+.endm
+#else
+.macro vdso_lpad
+.endm
+#endif
+
+/*
+ * This macro emits a program property note section identifying
+ * architecture features which require special handling, mainly for
+ * use in assembly files included in the VDSO.
+ */
+#define NT_GNU_PROPERTY_TYPE_0 5
+#define GNU_PROPERTY_RISCV_FEATURE_1_AND 0xc0000000
+
+#define GNU_PROPERTY_RISCV_FEATURE_1_ZICFILP (1U << 0)
+#define GNU_PROPERTY_RISCV_FEATURE_1_ZICFISS (1U << 1)
+
+#if defined(CONFIG_RISCV_USER_CFI) && (__riscv_xlen == 64)
+#define GNU_PROPERTY_RISCV_FEATURE_1_DEFAULT \
+ (GNU_PROPERTY_RISCV_FEATURE_1_ZICFILP)
+#endif
+
+#ifdef GNU_PROPERTY_RISCV_FEATURE_1_DEFAULT
+.macro emit_riscv_feature_1_and, feat = GNU_PROPERTY_RISCV_FEATURE_1_DEFAULT
+ .pushsection .note.gnu.property, "a"
+ .p2align 3
+ .word 4
+ .word 16
+ .word NT_GNU_PROPERTY_TYPE_0
+ .asciz "GNU"
+ .word GNU_PROPERTY_RISCV_FEATURE_1_AND
+ .word 4
+ .word \feat
+ .word 0
+ .popsection
+.endm
+#else
+.macro emit_riscv_feature_1_and, feat = 0
+.endm
+#endif
diff --git a/arch/riscv/kernel/vdso/Makefile b/arch/riscv/kernel/vdso/Makefile
index ad73607abc28..441c5431d27e 100644
--- a/arch/riscv/kernel/vdso/Makefile
+++ b/arch/riscv/kernel/vdso/Makefile
@@ -13,12 +13,18 @@ vdso-syms += flush_icache
vdso-syms += hwprobe
vdso-syms += sys_hwprobe
+ifdef CONFIG_RISCV_USER_CFI
+LPAD_MARCH = _zicfilp_zicfiss -fcf-protection=full
+endif
+
# Files to link into the vdso
obj-vdso = $(patsubst %, %.o, $(vdso-syms)) note.o
ccflags-y := -fno-stack-protector
ccflags-y += -DDISABLE_BRANCH_PROFILING
ccflags-y += -fno-builtin
+ccflags-y += $(KBUILD_BASE_ISA)$(LPAD_MARCH)
+asflags-y += $(KBUILD_BASE_ISA)$(LPAD_MARCH)
ifneq ($(c-gettimeofday-y),)
CFLAGS_vgettimeofday.o += -fPIC -include $(c-gettimeofday-y)
diff --git a/arch/riscv/kernel/vdso/flush_icache.S b/arch/riscv/kernel/vdso/flush_icache.S
index 8f884227e8bc..e4c56970905e 100644
--- a/arch/riscv/kernel/vdso/flush_icache.S
+++ b/arch/riscv/kernel/vdso/flush_icache.S
@@ -5,11 +5,13 @@
#include <linux/linkage.h>
#include <asm/unistd.h>
+#include <asm/assembler.h>
.text
/* int __vdso_flush_icache(void *start, void *end, unsigned long flags); */
SYM_FUNC_START(__vdso_flush_icache)
.cfi_startproc
+ vdso_lpad
#ifdef CONFIG_SMP
li a7, __NR_riscv_flush_icache
ecall
@@ -20,3 +22,5 @@ SYM_FUNC_START(__vdso_flush_icache)
ret
.cfi_endproc
SYM_FUNC_END(__vdso_flush_icache)
+
+emit_riscv_feature_1_and
diff --git a/arch/riscv/kernel/vdso/getcpu.S b/arch/riscv/kernel/vdso/getcpu.S
index 9c1bd531907f..5c1ecc4e1465 100644
--- a/arch/riscv/kernel/vdso/getcpu.S
+++ b/arch/riscv/kernel/vdso/getcpu.S
@@ -5,14 +5,18 @@
#include <linux/linkage.h>
#include <asm/unistd.h>
+#include <asm/assembler.h>
.text
/* int __vdso_getcpu(unsigned *cpu, unsigned *node, void *unused); */
SYM_FUNC_START(__vdso_getcpu)
.cfi_startproc
+ vdso_lpad
/* For now, just do the syscall. */
li a7, __NR_getcpu
ecall
ret
.cfi_endproc
SYM_FUNC_END(__vdso_getcpu)
+
+emit_riscv_feature_1_and
diff --git a/arch/riscv/kernel/vdso/rt_sigreturn.S b/arch/riscv/kernel/vdso/rt_sigreturn.S
index 3dc022aa8931..e82987dc3739 100644
--- a/arch/riscv/kernel/vdso/rt_sigreturn.S
+++ b/arch/riscv/kernel/vdso/rt_sigreturn.S
@@ -5,12 +5,16 @@
#include <linux/linkage.h>
#include <asm/unistd.h>
+#include <asm/assembler.h>
.text
SYM_FUNC_START(__vdso_rt_sigreturn)
.cfi_startproc
.cfi_signal_frame
+ vdso_lpad
li a7, __NR_rt_sigreturn
ecall
.cfi_endproc
SYM_FUNC_END(__vdso_rt_sigreturn)
+
+emit_riscv_feature_1_and
diff --git a/arch/riscv/kernel/vdso/sys_hwprobe.S b/arch/riscv/kernel/vdso/sys_hwprobe.S
index 77e57f830521..f1694451a60c 100644
--- a/arch/riscv/kernel/vdso/sys_hwprobe.S
+++ b/arch/riscv/kernel/vdso/sys_hwprobe.S
@@ -3,13 +3,17 @@
#include <linux/linkage.h>
#include <asm/unistd.h>
+#include <asm/assembler.h>
.text
SYM_FUNC_START(riscv_hwprobe)
.cfi_startproc
+ vdso_lpad
li a7, __NR_riscv_hwprobe
ecall
ret
.cfi_endproc
SYM_FUNC_END(riscv_hwprobe)
+
+emit_riscv_feature_1_and
--
2.43.0
Return-Path: <linux-kernel+bounces-673604-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [147.75.80.249])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id D95F541E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:25:37 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by am.mirrors.kernel.org (Postfix) with ESMTPS id BFF28189CB15
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:24:49 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id D389E1DE3AC;
Wed, 4 Jun 2025 17:17:31 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="1t6DWDGX"
Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1941325D20A
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:17:28 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.53
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749057451; cv=none; b=hBVQwLAHD9qfCAaboClIVwbAXnP3MOnmCpy2rFn36KA5bOgokm9GnBeV3Axr455S4ypBoDQLo7Xy0jSM2VeGuNlgk6rNPMykN5pEnTpcF6rQx8YRnabCMyXZm9KtTSiwaCMdgSi3nLHYlTFPBONu1WdSj47LXESryEAE8cMU77M=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749057451; c=relaxed/simple;
bh=YhfdOBzKEEebS8YngpHiUP828c0FLw+RSd9OBhsOuOM=;
h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:
In-Reply-To:To:Cc; b=CYF9+Xc+2vBXDb40z9LNRbBvgVvXUrZjk3+9fG1y8/XWQyB74HduEWX3AyWWNd/VuqOhNnck7teQEMYGl8bXmf5CFVeX7DEux3LZUUFIjOwq0b9xd7VNr15llh6P35excEUd/uYs85Y/pBFdZRwkiZ7n1enNUefw5OiGJYrs74U=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=1t6DWDGX; arc=none smtp.client-ip=209.85.216.53
Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com
Received: by mail-pj1-f53.google.com with SMTP id 98e67ed59e1d1-3122368d7c4so79321a91.1
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 10:17:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1749057448; x=1749662248; darn=vger.kernel.org;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:from:to:cc:subject:date:message-id
:reply-to;
bh=zd01FxT3OlMOzWqIaODnmoUPnuHtuVmONb+HNJjd/YM=;
b=1t6DWDGXL85bnyW6DwbcUA4nnIMzJ3z5/DMR1vtpsHCG+IV9kF4eduBG1tA9SvxLHS
fpd08CRFsamOhZcZs0RiKju06O+dMwx9KpHEsK2KUmk1LQVud8Yxjf0cGSOGThunFbdf
GxYLa0LNr9zkWKq/7TMoGjtfnFkH8xuxQEMPivrmzlw8LOwVXqviJAdAwxLh+R1eDHdA
/uEwmNhcX0L6VB5bVc7Mq+K/LunZhYixShUCdvfxDPw2Fo++xPc36JC94nlOMiEDFOfu
g9SY9mxf7vnQa32GBKkVKCTWh0UTMXgzEhMh73RrIjlK5awJCG+4efkE/jcMRX5lMo3s
Ds/Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749057448; x=1749662248;
h=cc:to:in-reply-to:references:message-id:content-transfer-encoding
:mime-version:subject:date:from:x-gm-message-state:from:to:cc
:subject:date:message-id:reply-to;
bh=zd01FxT3OlMOzWqIaODnmoUPnuHtuVmONb+HNJjd/YM=;
b=HJZjfo+y5fLfgw8WdCkr8B6uM2SfpK1wojjlTjtdV0TcTWsI64KS9ma29uPc72ek1b
eEcyd4wDKLS2OYqGhQE83fSkEj3U9ZedzzOVwoNlci4u3kDiqtE3/ECQAdexYnq094Qf
J9S5aLrTdQC2UOuRZxcbsXRg5j7uMG8E/Q+cvHrFP8td7nUa553W2fgpiJf3p0QpQiAx
m5BCcUbPqz3jmfBqTgEItb3ljt4uJhkk0iZwkNl0qcjaT2kjzZpAhSa8oYDVdiz82pTC
N2zyuE0Foh1kWXo4zsC6xw3YfNDG4Kq8YVk+s2yi1GYFXgIR8FghE+AsuEM7a2+tQpoH
CJ7Q==
X-Gm-Message-State: AOJu0YwCpxQ8vMbsOmsUJWgZuoBurkL3WnjCBF2ASuqUHnNc7K1I9jrQ
3NTMYPu2hh3p2HTDGttgK6tMg0mtghXC+dPdjvhaJlFEjlNcQPDYwgLTEfmYbHhr0TA=
X-Gm-Gg: ASbGncu0UDNzuJ4QcmgF1pjAo6whGXvlpgwr1MJwKI6jfSHXkpbUPWtOEUJ3SF2B2SS
oH4qOh+HXsWkVoJ1WuZDR2CdpnIp0vMV0TCv2UDa1nGugKnj2iFfzwmeoz+L/FTyMQFywO2XnKE
pa3WzX/J76pwhLL5xxt0nCxQ8fXTnPquVsQnHTcjqKSfhtjveeuNz/K3Frc4oR7xcKkZ1YtOumu
Cvl/jPo411sXx4TbNXyhAkZpjJt39/ikcb9IZGIKUqxu4KF0qi07USyR+BYAoPKjwaMDqv49JXS
Aide1ObwyeMea46Z1G8KNz99i3u4v/mc+3OzPprqVw1l/SyHyJzQA3W1Xf7obA==
X-Google-Smtp-Source: AGHT+IFWkJ78wFMwg3GliR7Galn0PbhhfnyCNBUVVp6rLtdMWNFL3ewFiC9H95Yfi/uZOn7VC4Cxkg==
X-Received: by 2002:a17:90b:3c4d:b0:312:f88d:25f9 with SMTP id 98e67ed59e1d1-31310fc4f72mr4513419a91.7.1749057447912;
Wed, 04 Jun 2025 10:17:27 -0700 (PDT)
Received: from debug.ba.rivosinc.com ([64.71.180.162])
by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3124e2e9c9fsm9178972a91.30.2025.06.04.10.17.25
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 10:17:27 -0700 (PDT)
From: Deepak Gupta <debug@xxxxxxxxxxxx>
Date: Wed, 04 Jun 2025 10:15:48 -0700
Subject: [PATCH v17 24/27] riscv: create a config for shadow stack and
landing pad instr support
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <20250604-v5_user_cfi_series-v17-24-4565c2cf869f@xxxxxxxxxxxx>
References: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
In-Reply-To: <20250604-v5_user_cfi_series-v17-0-4565c2cf869f@xxxxxxxxxxxx>
To: Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>,
Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>,
x86@xxxxxxxxxx, "H. Peter Anvin" <hpa@xxxxxxxxx>,
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>,
"Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx>,
Vlastimil Babka <vbabka@xxxxxxx>,
Lorenzo Stoakes <lorenzo.stoakes@xxxxxxxxxx>,
Paul Walmsley <paul.walmsley@xxxxxxxxxx>,
Palmer Dabbelt <palmer@xxxxxxxxxxx>, Albert Ou <aou@xxxxxxxxxxxxxxxxx>,
Conor Dooley <conor@xxxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>, Arnd Bergmann <arnd@xxxxxxxx>,
Christian Brauner <brauner@xxxxxxxxxx>,
Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Oleg Nesterov <oleg@xxxxxxxxxx>,
Eric Biederman <ebiederm@xxxxxxxxxxxx>, Kees Cook <kees@xxxxxxxxxx>,
Jonathan Corbet <corbet@xxxxxxx>, Shuah Khan <shuah@xxxxxxxxxx>,
Jann Horn <jannh@xxxxxxxxxx>, Conor Dooley <conor+dt@xxxxxxxxxx>,
Miguel Ojeda <ojeda@xxxxxxxxxx>, Alex Gaynor <alex.gaynor@xxxxxxxxx>,
Boqun Feng <boqun.feng@xxxxxxxxx>, Gary Guo <gary@xxxxxxxxxxx>,
=?utf-8?q?Bj=C3=B6rn_Roy_Baron?= <bjorn3_gh@xxxxxxxxxxxxxx>,
Benno Lossin <benno.lossin@xxxxxxxxx>,
Andreas Hindborg <a.hindborg@xxxxxxxxxx>, Alice Ryhl <aliceryhl@xxxxxxxxxx>,
Trevor Gross <tmgross@xxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx,
linux-mm@xxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx,
devicetree@xxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx,
linux-doc@xxxxxxxxxxxxxxx, linux-kselftest@xxxxxxxxxxxxxxx,
alistair.francis@xxxxxxx, richard.henderson@xxxxxxxxxx, jim.shu@xxxxxxxxxx,
andybnac@xxxxxxxxx, kito.cheng@xxxxxxxxxx, charlie@xxxxxxxxxxxx,
atishp@xxxxxxxxxxxx, evan@xxxxxxxxxxxx, cleger@xxxxxxxxxxxx,
alexghiti@xxxxxxxxxxxx, samitolvanen@xxxxxxxxxx, broonie@xxxxxxxxxx,
rick.p.edgecombe@xxxxxxxxx, rust-for-linux@xxxxxxxxxxxxxxx,
Zong Li <zong.li@xxxxxxxxxx>, Deepak Gupta <debug@xxxxxxxxxxxx>
X-Mailer: b4 0.13.0
X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,
RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED,
SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
This patch creates a config for shadow stack support and landing pad instr
support. Shadow stack support and landing instr support can be enabled by
selecting `CONFIG_RISCV_USER_CFI`. Selecting `CONFIG_RISCV_USER_CFI` wires
up path to enumerate CPU support and if cpu support exists, kernel will
support cpu assisted user mode cfi.
If CONFIG_RISCV_USER_CFI is selected, select `ARCH_USES_HIGH_VMA_FLAGS`,
`ARCH_HAS_USER_SHADOW_STACK` and DYNAMIC_SIGFRAME for riscv.
Reviewed-by: Zong Li <zong.li@xxxxxxxxxx>
Signed-off-by: Deepak Gupta <debug@xxxxxxxxxxxx>
---
arch/riscv/Kconfig | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index bbec87b79309..147ae201823e 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -256,6 +256,27 @@ config ARCH_HAS_BROKEN_DWARF5
# https://github.com/llvm/llvm-project/commit/7ffabb61a5569444b5ac9322e22e5471cc5e4a77
depends on LD_IS_LLD && LLD_VERSION < 180000
+config RISCV_USER_CFI
+ def_bool n
+ bool "riscv userspace control flow integrity"
+ depends on 64BIT && $(cc-option,-mabi=lp64 -march=rv64ima_zicfiss)
+ depends on RISCV_ALTERNATIVE
+ select RISCV_SBI
+ select ARCH_HAS_USER_SHADOW_STACK
+ select ARCH_USES_HIGH_VMA_FLAGS
+ select DYNAMIC_SIGFRAME
+ help
+ Provides CPU assisted control flow integrity to userspace tasks.
+ Control flow integrity is provided by implementing shadow stack for
+ backward edge and indirect branch tracking for forward edge in program.
+ Shadow stack protection is a hardware feature that detects function
+ return address corruption. This helps mitigate ROP attacks.
+ Indirect branch tracking enforces that all indirect branches must land
+ on a landing pad instruction else CPU will fault. This mitigates against
+ JOP / COP attacks. Applications must be enabled to use it, and old user-
+ space does not get protection "for free".
+ default y
+
config ARCH_MMAP_RND_BITS_MIN
default 18 if 64BIT
default 8
--
2.43.0
Return-Path: <linux-kernel+bounces-673608-lkml=lkml.rescloud.iu.edu@xxxxxxxxxxxxxxx>
X-Original-To: lkml@xxxxxxxxxxxxxxxxxxxx
Delivered-To: lkml@xxxxxxxxxxxxxxxxxxxx
Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223])
by lkml.rescloud.iu.edu (Postfix) with ESMTPS id 7BC3041E003FA
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 13:25:55 -0400 (EDT)
Received: from smtp.subspace.kernel.org (relay.kernel.org [52.25.139.140])
(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))
(No client certificate requested)
by ny.mirrors.kernel.org (Postfix) with ESMTPS id 5D306173F0C
for <lkml@xxxxxxxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:25:56 +0000 (UTC)
Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 57C311F5847;
Wed, 4 Jun 2025 17:22:22 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="tqI6fcgw"
Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id A44991F4631
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 4 Jun 2025 17:22:19 +0000 (UTC)
Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.169
ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
t=1749057741; cv=none; b=iAjoX0fGKusSDa1//65aq2r5Meoszxo+H61st4CSwvqGHiAgRSjkt3QN+SXhpkcVUMjj8ua4HLrs2uySF7ZiTpecwUzEVd9EhdcNTZV2623pbY3PUsbLJmP0IzWhMEr597f7Nj9qvIl1d1UbVYKUN5Amt01659heQsCSfxf3xvM=
ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org;
s=arc-20240116; t=1749057741; c=relaxed/simple;
bh=sKSYyUTmKbFRcwzxl/2agtBhqQgXK9AN08QzSiogKtM=;
h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To; b=P5j4SFbDILAM1+ueZZS/FDjlSVYZ/BXBu8vNEE6ANFKUywmuti45OVZbWLwfhmg4/RWqYtt643+cXJ/ffDdEjCN4b2rztKJLQ4G70fgyo9KRyp5UFs1GLlZJ+1jvXy/nSU9yreSTXlEAMKqCxRh8t0QFriY3KqJqzhZqmpOFGpE=
ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=tqI6fcgw; arc=none smtp.client-ip=209.85.210.169
Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org
Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org
Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-7406c6dd2b1so1154496b3a.0
for <linux-kernel@xxxxxxxxxxxxxxx>; Wed, 04 Jun 2025 10:22:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=linaro.org; s=google; t=1749057739; x=1749662539; darn=vger.kernel.org;
h=in-reply-to:content-transfer-encoding:content-disposition
:mime-version:references:message-id:subject:cc:to:from:date:from:to
:cc:subject:date:message-id:reply-to;
bh=eRFhhLJjI4zA7koH9NNbXkaz3+o0i9nOOHT1b6Am9B4=;
b=tqI6fcgwECZShrNWkE7HO9IkhId5FzM7tdTO5DuK1q6LT82Fpqtn56uQBj2Qmw+mX2
4n0shTp+6KoDbxNUPUwYgfD4u0Kee9qEt7PyMwTqGxJRM0k2fmJ9dezCq8o/OE5sq30D
XWCYhJQjKBDtogm6A8aFM6RZN3Z8EWQUQ7LiGk63MciQJ4sRVUu+zzRzFKm92eNLZgXs
eHwMr2cvUYmVVU9PK8St56UimKPnO/yKeqOjneYztOemYbC+z7G0AiplxZiu5BhczGww
grFYlDP5l4Hhr+lJZJhhu2B+f+UEo+d0CyQ+hhZSfZtksPdrfkbYXFi8MFIqisks/ok9
7ykg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1749057739; x=1749662539;
h=in-reply-to:content-transfer-encoding:content-disposition
:mime-version:references:message-id:subject:cc:to:from:date
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=eRFhhLJjI4zA7koH9NNbXkaz3+o0i9nOOHT1b6Am9B4=;
b=ArnbZ3h9gGMuErTxTTsjDw1Z7S55NorOcVzavtS1deqplCH7x+Qc3LftkQYjBK/Koy
5RBwoMOl3NrylX72ksSV0JW95VJdJk8+oC2vUsIR4A4EDQGWk8nJYclLqSAp7/Hbz/r6
07Bh1F4POnJdwbkAKcdc+aFGzrbC7wnba+lHjVgIGCV+No0NmPJbUIYKSXAfe3lLEQ28
LlSuyLuEbktQdePJSr0QCkdji3kcz6bNPS6kMKqAZOfzfWNP4uP157+Qy5PowKMmYxgF
xe0/9ds8gzxQBcwaXCnoKLmClBuRc/f6vKyU8UzzYlJ5UqoPNxyb4KLbvL/p9W3INbjr
MgxQ==
X-Forwarded-Encrypted: i=1; AJvYcCUSeJC5P+jpiFobruin252DcDt6N5rTATAS3cqAe6ya5wJ4FnnN9HkAt48DmZ0lIeoZ/x75zyrjwF6jFTA=@vger.kernel.org
X-Gm-Message-State: AOJu0YwHCXgF1PlWFUh040uunl8armA5LA6MePuPm7+wN816MEja6bbc
WAGmtI/1PNkQc8sY7/jI4bPxE67EukDRA9f5l7OOjUuNNkgYShBCBkvIIt2eyPUIRw==
X-Gm-Gg: ASbGncuegbPPUJfXMiOWu2ddmY7HYtiEk437J4QMTCkHKswRaafo1QM28SRJeWtsL0a
SaY/rU7bFHLoMM5Qg0FgsOAWtRAnhTVtNJAp7laCL08sbJ5Q5NZwgBjYj3YeQsRtRe/PtYj2x8G
B8jsE8yBiPD07JOwScyra/vOYemAJdrnXty12At/WKN/MEJhTN3JidTNXeyotmL4Mu05CdeRkuv
RHz6FvGzyKTmKgntnlheMHI5KIiZpzx+bBSHf0ckWfA/NClXBhkZj5nDFbG7hfr6rREX8tcwY6M
9XlbpDMiZtRjs0uW+RhwUvkcRJ1O49AFe4HhaQMejFdMO6/YZzWv37B8bMnN/A==
X-Google-Smtp-Source: AGHT+IEfy4DmIHTrKSJlkqSXJHSlJ3gLkmiP8MmaPN6LL/v90GBnAH1FIJiiM09/woNRLt0+WHE+iQ==
X-Received: by 2002:a05:6a00:3b0d:b0:736:b400:b58f with SMTP id d2e1a72fcca58-7481814420fmr375938b3a.0.1749057738824;
Wed, 04 Jun 2025 10:22:18 -0700 (PDT)
Received: from thinkpad ([120.60.60.253])
by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-747afff7e3bsm11735265b3a.175.2025.06.04.10.22.14
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 04 Jun 2025 10:22:18 -0700 (PDT)
Date: Wed, 4 Jun 2025 22:52:12 +0530
From: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
To: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
Cc: Marek Vasut <marek.vasut+renesas@xxxxxxxxxxx>,
linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, Anand Moon <linux.amoon@xxxxxxxxx>,
Bartosz Golaszewski <brgl@xxxxxxxx>, Bjorn Helgaas <bhelgaas@xxxxxxxxxx>,
Conor Dooley <conor+dt@xxxxxxxxxx>, Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>,
Magnus Damm <magnus.damm@xxxxxxxxx>, Rob Herring <robh@xxxxxxxxxx>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx>, devicetree@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx,
linux-pci@xxxxxxxxxxxxxxx, linux-renesas-soc@xxxxxxxxxxxxxxx
Subject: Re: [PATCH v2 1/3] PCI/pwrctrl: Add optional slot clock to pwrctrl
driver for PCI slots
Message-ID: <zzm2nyrm4nw5di7afe5nxte3hxbx3dvorjg74rsjhl3jlaywp4@x7icn3epnh67>
References: <20250530225504.55042-1-marek.vasut+renesas@xxxxxxxxxxx>
<CAMuHMdUFHKHKfymqa6jwfNnxZTAuH3kbj5WL+-zN=TR6XGd0eA@xxxxxxxxxxxxxx>
Precedence: bulk
X-Mailing-List: linux-kernel@xxxxxxxxxxxxxxx
List-Id: <linux-kernel.vger.kernel.org>
List-Subscribe: <mailto:linux-kernel+subscribe@xxxxxxxxxxxxxxx>
List-Unsubscribe: <mailto:linux-kernel+unsubscribe@xxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <CAMuHMdUFHKHKfymqa6jwfNnxZTAuH3kbj5WL+-zN=TR6XGd0eA@xxxxxxxxxxxxxx>
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,
RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,
RCVD_IN_VALIDITY_RPBL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham
autolearn_force=no version=3.4.6
X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lkml.rescloud.iu.edu
On Wed, Jun 04, 2025 at 10:40:25AM +0200, Geert Uytterhoeven wrote:
Hi Marek,
Thanks for your patch!
On Sat, 31 May 2025 at 00:55, Marek Vasut
<marek.vasut+renesas@xxxxxxxxxxx> wrote:
> Add the ability to enable optional slot clock into the pwrctrl driver.
> This is used to enable slot clock in split-clock topologies, where the
> PCIe host/controller supply and PCIe slot supply are not provided by
> the same clock. The PCIe host/controller clock should be described in
> the controller node as the controller clock, while the slot clock should
> be described in controller bridge/slot subnode.
>
> Example DT snippet:
> &pcicontroller {
> clocks = <&clk_dif 0>; /* PCIe controller clock */
>
> pci@0,0 {
> #address-cells = <3>;
> #size-cells = <2>;
> reg = <0x0 0x0 0x0 0x0 0x0>;
> compatible = "pciclass,0604";
> device_type = "pci";
> clocks = <&clk_dif 1>; /* PCIe slot clock */
I assume this should be documented in
dtschema/schemas/pci/pci-bus-common.yaml, too?
You are right.
> vpcie3v3-supply = <®_3p3v>;
> ranges;
> };
> };
>
> Example clock topology:
> ____________ ____________
> | PCIe host | | PCIe slot |
> | | | |
> | PCIe RX<|==================|>PCIe TX |
> | PCIe TX<|==================|>PCIe RX |
> | | | |
> | PCIe CLK<|======.. ..======|>PCIe CLK |
> '------------' || || '------------'
> || ||
> ____________ || ||
> | 9FGV0441 | || ||
> | | || ||
> | CLK DIF0<|======'' ||
> | CLK DIF1<|==========''
> | CLK DIF2<|
> | CLK DIF3<|
> '------------'
>
> Reviewed-by: Anand Moon <linux.amoon@xxxxxxxxx>
> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxx>
> Signed-off-by: Marek Vasut <marek.vasut+renesas@xxxxxxxxxxx>
> --- a/drivers/pci/pwrctrl/slot.c
> +++ b/drivers/pci/pwrctrl/slot.c
> @@ -30,6 +31,7 @@ static int pci_pwrctrl_slot_probe(struct platform_device *pdev)
> {
> struct pci_pwrctrl_slot_data *slot;
> struct device *dev = &pdev->dev;
> + struct clk *clk;
> int ret;
>
> slot = devm_kzalloc(dev, sizeof(*slot), GFP_KERNEL);
> @@ -50,6 +52,13 @@ static int pci_pwrctrl_slot_probe(struct platform_device *pdev)
> goto err_regulator_free;
> }
>
> + clk = devm_clk_get_optional_enabled(dev, NULL);
> + if (IS_ERR(clk)) {
> + ret = dev_err_probe(dev, PTR_ERR(clk),
> + "Failed to enable slot clock\n");
> + goto err_regulator_disable;
> + }
You are adding this block in the middle of the regulator handling.
Please move it below, under the devm_add_action_or_reset() call
(which is handled wrong, I have sent a patch[1]).
Good catch!
- Mani
--
மணிவண்ணன் சதாசிவம்